summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-06 21:58:15 +0000
committerKarl Berry <karl@freefriends.org>2021-03-06 21:58:15 +0000
commit974640d66e61e81cb197ad96fdff7b08343e4c5a (patch)
tree2e1f75f32f312b7f24ba82b4590ae230bcd6f399
parentb4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff)
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun1153
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl33
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/tlshell/tlshell.tcl6
-rwxr-xr-xMaster/bin/win32/mtxrun.lua1153
-rw-r--r--Master/texmf-dist/context/data/npp/context/notepad++.ini57
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua4
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua9
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua4
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua6
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua6
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties477
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties2725
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties58
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties76
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties265
-rw-r--r--Master/texmf-dist/context/data/textadept/context/data/scite-context-data-context.lua4
-rw-r--r--Master/texmf-dist/context/data/textadept/context/data/scite-context-data-interfaces.lua9
-rw-r--r--Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metafun.lua4
-rw-r--r--Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metapost.lua6
-rw-r--r--Master/texmf-dist/context/data/textadept/context/data/scite-context-data-tex.lua6
-rw-r--r--Master/texmf-dist/context/data/textadept/context/init.lua4
-rw-r--r--Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json8
-rw-r--r--Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json8
-rw-r--r--Master/texmf-dist/doc/context/documents/general/leaflets/leaflet-mixing.pdfbin65347 -> 65629 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/magazines/mag-1105-mkiv.pdfbin0 -> 57255 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/cld-mkiv.pdfbin798293 -> 804291 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/evenmore.pdfbin1538298 -> 1624341 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdfbin75834 -> 78543 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdfbin0 -> 52979 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdfbin95412 -> 104674 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdfbin0 -> 30762 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdfbin0 -> 87655 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdfbin0 -> 208745 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdfbin0 -> 46060 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdfbin0 -> 41760 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/luametafun.pdfbin1697432 -> 5553137 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/luametatex.pdfbin1189457 -> 1385220 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/luatex.pdfbin1542992 -> 1544345 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/primitives.pdfbin0 -> 143288 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/manuals/units-mkiv.pdfbin164604 -> 113203 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdfbin932229 -> 950852 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdfbin932682 -> 952439 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdfbin930546 -> 963860 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdfbin930422 -> 961163 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdfbin934059 -> 958941 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin352043 -> 354602 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-de.pdfbin351418 -> 354810 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-en.pdfbin349070 -> 354208 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin351319 -> 357723 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-it.pdfbin350931 -> 355763 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin349696 -> 353260 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin552014 -> 564601 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdfbin926927 -> 947389 bytes
-rw-r--r--Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdfbin930145 -> 949594 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.pdfbin0 -> 156486 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex694
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.pdfbin0 -> 42978 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.tex454
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.pdfbin0 -> 39008 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.tex272
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.gp8
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.svg157
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.pdfbin0 -> 39686 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.tex380
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.pdfbin0 -> 40944 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex529
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.pdfbin0 -> 27908 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.tex208
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.pdfbin0 -> 55930 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.tex342
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-sin.svg163
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.pdfbin0 -> 33787 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.tex123
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.pdfbin0 -> 45873 bytes
-rw-r--r--Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex287
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/pdftools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/texexec.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/textools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/texutil.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/tmftools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkii/xmltools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/context.html8
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/context.man11
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/context.xml13
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/luatools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html8
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man11
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml13
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html1
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man5
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml1
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man2
-rw-r--r--Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/leaflets/leaflet-mixing.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex194
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/about/about-titlepage.tex6
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex61
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex22
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex6
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex8
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex1048
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex340
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex395
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex272
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex365
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex449
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex425
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex456
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex18
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex71
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex711
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex1
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex25
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex18
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex256
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex182
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex40
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex170
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex904
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex948
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex341
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex254
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex8
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex6
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex138
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex159
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex89
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex6
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex189
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex22
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex172
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex1025
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex166
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex140
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex386
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex53
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex279
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex124
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex172
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex227
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex10
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-preamble.tex79
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex396
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex144
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex706
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex132
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex23
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex21
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-math.tex30
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex9
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/mathml/envexamp.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/mcommon.tex8
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp1284
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-basics.tex309
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-debugging.tex237
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-effects.tex265
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-layout.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment.tex46
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-examples.tex253
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-gadgets.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-introduction.tex9
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-layout.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-lua.tex995
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-macros.tex13
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-reference.tex29
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-sneaky.tex149
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-styles.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text-lmtx.tex1519
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text.tex125
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-welcome.tex64
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun.tex18
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-environment.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-memory.tex8
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-punk.tex3
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-tokenspeak.tex2
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-style.tex15
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/primitives/primitives.tex2378
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/publications/publications-titlepage.tex6
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/spreadsheets/spreadsheets-mkiv.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/sql/sql-mkiv.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/swiglib/swiglib-mkiv.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/templates/templates-mkiv.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/tools/tools-mkiv.tex6
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/units/units-mkiv.tex40
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex1
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-parallel.tex123
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-commands.tex4
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-expressions.tex1
-rw-r--r--Master/texmf-dist/doc/context/sources/general/manuals/xtables/xtables-mkiv.tex4
-rw-r--r--Master/texmf-dist/doc/man/man1/context.111
-rw-r--r--Master/texmf-dist/doc/man/man1/context.man1.pdfbin23027 -> 23824 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/luatools.12
-rw-r--r--Master/texmf-dist/doc/man/man1/luatools.man1.pdfbin18206 -> 18212 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-babel.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdfbin15940 -> 15951 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-base.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-base.man1.pdfbin18226 -> 18231 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-bibtex.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdfbin14670 -> 14676 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-cache.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdfbin15474 -> 15482 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-chars.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdfbin15649 -> 15657 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-check.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-check.man1.pdfbin15839 -> 15848 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-colors.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdfbin14643 -> 14651 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-context.111
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-context.man1.pdfbin23027 -> 23824 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-dvi.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdfbin15261 -> 15271 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-epub.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdfbin16363 -> 16370 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-evohome.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-evohome.man1.pdfbin15972 -> 15981 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-fcd.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdfbin16594 -> 16610 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-flac.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdfbin15616 -> 15627 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-fonts.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdfbin17190 -> 17198 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-grep.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdfbin16304 -> 16311 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-interface.15
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdfbin17293 -> 17356 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-metapost.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdfbin15595 -> 15602 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-modules.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdfbin15990 -> 15992 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-package.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-package.man1.pdfbin15604 -> 15610 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-patterns.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdfbin16712 -> 16727 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-pdf.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdfbin15907 -> 15915 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-plain.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdfbin15643 -> 15652 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-profile.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdfbin16228 -> 16240 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-rsync.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdfbin15652 -> 15663 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-scite.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdfbin15743 -> 15754 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-server.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-server.man1.pdfbin15872 -> 15880 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-texworks.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdfbin15156 -> 15163 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-timing.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdfbin15337 -> 15347 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-tools.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdfbin17623 -> 17636 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-unicode.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdfbin15068 -> 15074 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-unzip.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdfbin15237 -> 15240 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-update.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-update.man1.pdfbin17667 -> 17670 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-vscode.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-vscode.man1.pdfbin14853 -> 14862 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-watch.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdfbin16445 -> 16452 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-youless.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdfbin15992 -> 16004 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtxrun.12
-rw-r--r--Master/texmf-dist/doc/man/man1/mtxrun.man1.pdfbin20277 -> 20286 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/texexec.12
-rw-r--r--Master/texmf-dist/doc/man/man1/texexec.man1.pdfbin17103 -> 17108 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/texmfstart.12
-rw-r--r--Master/texmf-dist/doc/man/man1/texmfstart.man1.pdfbin20277 -> 20286 bytes
-rw-r--r--Master/texmf-dist/fonts/map/pdftex/context/mkiv-px.map14
-rw-r--r--Master/texmf-dist/fonts/map/pdftex/context/mkiv-tx.map36
-rw-r--r--Master/texmf-dist/metapost/context/base/mpii/mp-tool.mpii10
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/metafun.mpxl46
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-back.mpiv336
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-base.mpiv6
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-blob.mpiv5
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpiv2
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpxl158
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-core.mpiv1558
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-grap.mpiv34
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpiv5
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpxl250
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-math.mpxl161
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-mlib.mpiv41
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-page.mpxl243
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv25
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/metafun.mpxl62
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/minifun.mpxl (renamed from Master/texmf-dist/metapost/context/base/mpiv/minifun.mpxl)19
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-abck.mpxl291
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-apos.mpxl112
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl1049
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-blob.mpxl120
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-butt.mpxl77
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-cont.mpxl198
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-figs.mpxl47
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl28
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-func.mpxl87
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-grid.mpxl127
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-grph.mpxl209
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-lmtx.mpxl (renamed from Master/texmf-dist/metapost/context/base/mpiv/mp-lmtx.mpxl)211
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-luas.mpxl319
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-math.mpxl183
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-miss.mpxl68
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-mlib.mpxl1830
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-node.mpxl275
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-page.mpxl296
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-shap.mpxl228
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-text.mpxl217
-rw-r--r--Master/texmf-dist/metapost/context/base/mpxl/mp-tool.mpxl3831
-rw-r--r--Master/texmf-dist/metapost/context/fonts/mpiv/bidi-symbols.mp4
-rw-r--r--Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.mp3
-rw-r--r--Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.tex35
-rw-r--r--Master/texmf-dist/metapost/context/fonts/mpiv/punkfont-characters.mp19
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-context.lua146
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-context.xml13
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-epub.lua4
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-fonts.lua9
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-install.lua38
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-interface.lua61
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-kpse.lua124
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-patterns.lua50
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-scite.lua4
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-timing.lua218
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-unicode.lua27
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-update.lua7
-rwxr-xr-xMaster/texmf-dist/scripts/context/lua/mtxrun.lua1153
-rw-r--r--Master/texmf-dist/scripts/context/ruby/graphics/inkscape.rb3
-rw-r--r--Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua1153
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/mtxrun1153
-rw-r--r--Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua1153
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii2
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/cont-new.mkii2
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/context.mkii2
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-cs.mkii215
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-de.mkii215
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-en.mkii212
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii2725
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-it.mkii215
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii212
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii215
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii215
-rw-r--r--Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua1109
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-col.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua43
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv60
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-exp.lua224
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-ini.lua32
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-out.lua259
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-out.mkxl23
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkxl156
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua58
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/back-res.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua159
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv88
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv46
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-def.lua7611
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-ini.lua13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-tex.lua161
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/char-utf.lua94
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua660
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua405
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua57
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua107
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv19
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv102
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv19
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-run.lua118
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv85
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-characters.lmx110
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-debug.lmx112
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context-performance.tex2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context.lus71
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context.mkiv18
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/context.mkxl619
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-con.lua628
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv74
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv33
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-env.lua50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-lmt.lua34
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-sys.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/core-uti.lua41
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-env.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-fil.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-ini.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-tex.lua24
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/data-use.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/driv-ini.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/export-example.css64
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/export-example.tex2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi56
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-job.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi129
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-lib.mkiv (renamed from Master/texmf-dist/tex/context/base/mkiv/file-lib.mkvi)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/file-mod.lua110
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-cff.lua66
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-cft.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-chk.lua21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-col.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-con.lua107
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua654
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-def.lua5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-imp-combining.lua170
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua171
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua28
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-imp-tracing.lua164
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi19
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-map.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-mis.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-nod.lua136
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua117
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua874
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-one.lua21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-onr.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ota.lua116
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otd.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otj.lua62
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otl.lua36
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-otr.lua117
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ots.lua374
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ott.lua38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv29
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-prv.lua33
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sel.lua54
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-shp.lua133
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sol.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua36
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-tpk.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-vfc.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/good-ctx.lua25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/good-mth.lua169
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-bmp.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-chk.lua21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-con.lua23
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-img.lua16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv33
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-trf.lua126
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv163
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-lua.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-os.lua14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-package.lua71
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv106
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv31
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv18
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua365
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua123
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-tra.mkiv98
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua660
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-url.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua31
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-eng.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua49
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-pde.lua5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-vfc.lua50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua113
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv28
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-env.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua187
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua18
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv99
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-log.lua795
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua131
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-run.lua49
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua133
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua232
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv201
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua29
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-act.lua123
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-dim.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv80
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-frc.lua46
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-inc.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ini.lua100
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv81
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-map.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-noa.lua51
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi60
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi77
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-tag.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv34
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/meta-lua.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv11
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkxl31
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua85
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua352
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-lmp.lua229
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-lmt.lua63
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua1318
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua1244
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua41
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua245
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-meaning.tex20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex23
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv324
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-def.lua4862
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua338
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua160
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv174
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-low.lua125
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua13
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua145
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv29
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-acc.lua7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-aux.lua425
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-bck.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ext.lua30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-fin.lua99
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua64
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua96
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ini.lua126
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua65
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-met.lua234
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-mig.lua227
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv23
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-nut.lua80
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-pag.lua30
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-par.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ref.lua29
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-res.lua37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-rul.lua5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-scn.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-ser.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-shp.lua109
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-syn.lua63
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-tex.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-tra.lua33
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/node-typ.lua45
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv83
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ffl.mkiv25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv19
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ini.lua17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ins.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv42
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-lin.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-otr.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-run.lua36
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi15
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua106
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/prop-ini.mkiv64
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi40
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi26
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv44
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/publ-usr.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua59
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua251
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/scrp-tib.lua31
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua46
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv46
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua34
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv33
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv61
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv58
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua143
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv114
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/status-files.pdfbin28109 -> 25384 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/status-lua.pdfbin271171 -> 257025 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi83
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua5
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi82
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi58
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi20
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi102
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-not.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi370
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv21
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi81
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua25
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv50
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv326
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-box.lua75
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv453
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv51
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv45
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua19
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv37
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv84
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-emj.mkiv1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv17
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua245
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv1102
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-con.lua18
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv39
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv194
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkxl1116
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua346
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-mac.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv31
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/task-ini.lua16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua233
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua236
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/toks-tra.mkiv34
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua36
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua158
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua43
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-log.lua587
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-set.lua75
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua366
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv24
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/type-ini.lua8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua3
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv9
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv18
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua124
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-fkr.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi8
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua14
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-ovl.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-plc.mkiv39
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-pnc.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-dim.lua18
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-fil.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-lib.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-prs.lua38
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-sac.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-soc-imp-http.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-str.lua156
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-tab.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-bar.mkxl220
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-bck.mklx775
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-pgr.lmt1325
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-pgr.mkxl444
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-pos.lmt1636
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-pos.mkxl506
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-snc.mkxl157
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/anch-tab.mkxl387
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-alt.lmt111
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-alt.mkxl55
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-col.lmt666
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-col.mkxl22
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl60
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-ini.mkxl141
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-lay.lmt311
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-lay.mkxl107
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl25
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl28
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-mth.lmt742
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-ref.lmt261
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-tag.lmt846
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-exp.lmt2719
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-exp.mkxl361
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-ext.mkxl95
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-ini.lmt127
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-ini.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/back-ini.mkxl)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-lua.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/back-lua.lua)14
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-lua.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/back-lua.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-mps.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/back-mps.lua)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-mps.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/back-mps.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-pdf.lmt55
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-pdf.mkxl157
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-pdp.lmt291
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-res.lmt177
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-res.mkxl34
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/back-u3d.mkxl158
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/bibl-bib.mkxl983
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/bibl-tra.mkxl1508
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/blob-ini.lmt210
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl56
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/buff-ini.lmt900
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/buff-ini.mkxl233
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/buff-par.mklx186
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/buff-ver.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkxl)411
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/catc-act.mkxl51
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/catc-def.mkxl273
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/catc-ini.lmt44
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl274
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/catc-sym.mkxl96
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/char-act.mkxl99
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/char-enc.mkxl18
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/char-ini.mkxl126
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt994
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/char-utf.mkxl44
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/chem-ini.mkxl53
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/chem-str.mkxl751
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cldf-bas.mkxl19
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cldf-com.mkxl19
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl45
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cldf-int.lmt252
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cldf-int.mkxl34
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt949
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cldf-ver.mkxl18
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/colo-ext.mkxl99
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/colo-grp.mkxl163
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/colo-ini.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkxl)569
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/colo-nod.lmt40
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/colo-nod.mkxl20
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-cs.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-cs.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-de.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-de.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-en.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-en.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-fil.mkxl152
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-fr.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-fr.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-gb.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-gb.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-it.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-it.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-log.mkxl306
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl54
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-nl.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-nl.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-pe.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-pe.mkxl)6
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-ro.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/cont-ro.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-run.lmt311
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/cont-run.mkxl59
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/context.mkxl614
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-con.mkxl1002
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-ctx.mkxl29
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl110
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-def.mkxl182
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-env.lmt213
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-env.mkxl807
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-ini.mkxl224
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-lmt.lmt95
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-lmt.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/core-lmt.mkxl)7
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-sys.lmt83
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-sys.mkxl451
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl111
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-uti.lua470
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/core-uti.mkxl35
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/driv-ini.lmt375
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/driv-ini.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/driv-ini.mkxl)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/driv-shp.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/driv-shp.lua)806
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/driv-shp.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/driv-shp.mkxl)2
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl488
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-ini.mklx231
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-job.lmt1283
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-job.mklx361
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-lib.mkxl20
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt309
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-mod.mklx262
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-res.mklx145
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/file-syn.mklx61
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-aux.mklx26
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt452
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-chk.mkxl56
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-col.lmt525
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-col.mklx150
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-con.lmt1508
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt3231
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-def.lmt516
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-emp.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/font-emp.mklx)108
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-enh.lmt90
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt350
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-fea.mklx389
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-fil.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/font-fil.mklx)174
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-fmp.lmt123
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-gds.mklx97
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-glf.mklx41
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-imp-math.lmt226
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-imp-tracing.lmt286
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt40
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-ini.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/font-ini.mklx)870
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx156
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-mat.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/font-mat.mklx)225
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-mpf.lmt173
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-mps.lmt398
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-ogr.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/font-ogr.lua)291
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt580
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-otj.lmt2556
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt4475
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-pre.mkxl1025
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-sel.mklx282
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-set.mklx158
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-sol.mklx131
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-sty.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/font-sty.mklx)137
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-sym.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/font-sym.mklx)57
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt160
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-tex.mkxl121
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-tra.mkxl118
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-uni.mkxl27
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-unk.mkxl150
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-var.mklx57
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-vfc.lmt181
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/font-vir.lmt159
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/good-mth.lmt464
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-epd.mkxl93
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-fig.mkxl367
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-inc.lmt2160
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-inc.mkxl1073
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-pat.mkxl119
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-raw.mkxl64
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt124
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-rul.mkxl89
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-trf.lmt126
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/grph-trf.mkxl1003
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/hand-ini.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/hand-ini.mkxl)40
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/java-ini.mkxl157
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl844
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-dis.lmt222
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-frd.mkxl143
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-frq.mkxl234
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-hyp.lmt1806
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-hyp.mkxl262
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-ini.lmt670
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-ini.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkxl)311
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-lab.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/lang-lab.mkxl)215
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-mis.mkxl586
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-rep.mkxl74
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-spa.mkxl74
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-tra.mkxl95
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-url.mkxl167
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl69
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/layo-ini.lmt115
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/layo-ini.mkxl30
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-curl.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-curl.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-ghostscript.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-ghostscript.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-graphicsmagick.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-graphicsmagick.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.lmt58
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.mkxl38
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-mujs.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-mujs.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-mujs.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-mujs.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-mysql.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-mysql.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-postgress.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-postgress.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-sqlite.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-sqlite.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-zint.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-zint.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-imp-zint.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-imp-zint.mkxl)4
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/libs-ini.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/libs-ini.mkxl)17
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt1401
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-aux.lmt153
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-col.lmt837
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-emb.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/lpdf-emb.lua)185
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-enc.lmt157
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-epa.lmt1107
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-fld.lmt1501
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-fmt.lmt1020
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-fnt.lmt194
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-grp.lmt302
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-img.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/lpdf-img.lua)17
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-ini.lmt1363
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-lmt.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/lpdf-lmt.lua)1138
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-mis.lmt639
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-mov.lmt68
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt1211
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-ren.lmt399
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-res.lmt41
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt388
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-tag.lmt743
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-u3d.lmt495
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt789
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt311
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-bas.mkxl52
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt287
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-cod.lmt308
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl48
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-fio.lmt107
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt46
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-ini.mkxl299
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl104
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-log.lmt739
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-soc.mkxl52
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-usr.lmt177
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/luat-usr.mkxl121
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lxml-css.mkxl76
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lxml-ctx.mkxl58
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl448
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/lxml-sor.mkxl99
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/m-mkivmkxl.mkxl3
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx153
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-act.lmt478
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl1964
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl172
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-del.mkxl164
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-dis.mkxl20
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl841
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-for.mkxl47
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl833
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-inc.mkxl69
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl3022
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-inl.mkxl22
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-int.mkxl141
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-mis.mkxl60
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt2412
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-pln.mkxl237
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx271
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-scr.mkxl58
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx1379
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-tag.lmt596
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-toy.mkxl54
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt1153
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-blb.mkxl53
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-fig.mkxl69
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-fnt.lmt150
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-fnt.mkxl44
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-fun.mkxl25
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-grd.mkxl105
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-clock.mkxl141
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-demo.mkxl233
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-experiments.mkxl358
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-gamesymbols.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/meta-imp-gamesymbols.mkxl)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-punk.mkxl272
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-symbols.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/meta-imp-symbols.mkxl)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-threesix.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/meta-imp-threesix.mkxl)167
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-imp-txt.mkxl277
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-ini.lmt161
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-ini.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkxl)641
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-lua.mkxl95
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-mac.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/meta-mac.mkxl)51
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-nod.mkxl248
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-pag.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/meta-pag.mkxl)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-pdf.mkxl95
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-pdh.mkxl716
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-tex.mkxl235
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/meta-xml.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/node-pag.mkiv)12
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-cnt.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/mlib-cnt.lua)11
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.lmt420
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.mkxl34
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-fio.lmt289
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-int.lmt160
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-lmp.lmt104
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-lmt.lmt199
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-lua.lmt210
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-mat.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/mlib-mat.lua)10
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-mpf.lmt1260
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-pdf.lmt742
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-pdf.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.mkxl)54
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-pps.lmt1647
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-pps.mkxl228
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-ran.lmt237
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt722
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-scn.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/mlib-scn.lua)194
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mlib-svg.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/mlib-svg.lua)353
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mult-aux.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkxl)938
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mult-def.mkxl32
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mult-dim.mklx156
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mult-ini.lmt389
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mult-ini.mkxl804
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mult-prm.mkxl117
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl607
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-acc.lmt112
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-aux.lmt396
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-bck.lmt294
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-bck.mkxl80
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-cmp.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/node-cmp.lua)17
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-ext.lmt650
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-fin.lmt939
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-fin.mkxl78
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-fnt.lmt550
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-gcm.lmt114
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt200
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-ini.mkxl56
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-met.lmt633
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-mig.lmt134
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-mig.mkxl44
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-nut.lmt601
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-par.lmt101
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-pro.lmt219
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt831
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-res.lmt563
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-rul.lmt725
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-rul.mkxl610
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-scn.lmt314
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-ser.lmt284
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-shp.lmt115
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-snp.lmt69
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-syn.lmt782
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-tex.lmt39
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt739
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/norm-ctx.mkxl87
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-bar.mkxl94
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-bck.mklx245
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl1121
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl990
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-cut.mkxl164
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-fen.mkxl81
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-lyr.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkxl)185
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-mis.mklx112
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-mrl.mkxl845
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt305
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-obj.mkxl168
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-ori.lmt (renamed from Master/texmf-dist/tex/context/base/mkiv/pack-ori.lua)0
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-ori.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/pack-ori.mkxl)19
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-pos.mkxl160
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt258
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/pack-rul.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkxl)720
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-app.mkxl205
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-bck.mkxl708
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-box.mklx289
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl483
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-col.mkxl165
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-com.mkxl180
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-cst.mkxl791
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-fac.mkxl87
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-ffl.mkxl247
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl333
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-flw.mkxl178
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl1404
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-inf.mkxl124
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-ini.mkxl376
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx228
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-ins.mkxl209
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-lay.mkxl1630
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-lin.lmt418
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-lin.mklx604
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-mak.mklx280
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx243
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-mcl.mkxl542
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-mix.mkxl1086
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-mrk.mkxl229
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-not.mkxl32
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-one.mkxl709
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-otr.lmt14
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-otr.mklx333
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-par.mkxl73
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-pcl.mkxl853
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-plg.mkxl213
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-pst.mkxl112
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-sel.mklx420
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-sid.mkxl1019
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-smp.mkxl56
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-spr.mkxl129
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-str.mkxl128
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-txt.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/page-txt.mklx)302
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/page-var.mkxl20
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl817
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/publ-inc.mkxl63
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl2038
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/publ-old.mkxl22
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/publ-xml.mkxl111
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/regi-ini.mkxl37
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-bar.mklx404
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-but.mklx1049
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx1040
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-hlp.mklx160
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-ini.mklx254
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-pag.lmt56
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-pag.mklx324
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-ref.mklx107
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrn-wid.mklx757
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/scrp-ini.mkxl111
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/sort-ini.mkxl19
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt134
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl1218
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-chr.lmt348
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-chr.mkxl78
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-def.mkxl91
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-flr.mkxl196
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-grd.mkxl377
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-hor.lmt38
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl1218
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-lin.mkxl211
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl170
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-par.lmt81
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-par.mkxl456
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-prf.lmt949
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-prf.mklx113
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-ver.lmt2516
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/spac-ver.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkxl)1107
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-bkm.mkxl182
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-blk.mkxl171
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-con.mklx1186
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-def.mkxl338
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-des.mklx199
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl85
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-enu.mklx372
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx2609
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-ind.mkxl128
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-ini.mklx81
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-itm.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/strc-itm.mklx)447
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-lab.mkxl199
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-lev.mklx98
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-lnt.mklx361
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx1574
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl136
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl1317
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-not.mklx1971
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-num.mkxl691
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-pag.mkxl487
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx2217
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl1276
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-ren.mkxl820
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-sbe.mkxl137
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl1322
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl680
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-tag.lmt615
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-tag.mkxl531
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-tnt.mkxl117
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/strc-usr.mkxl169
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt1395
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/supp-box.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/supp-box.mkxl)1094
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/supp-dir.mkxl44
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/supp-mat.mkxl180
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/supp-ran.mkxl52
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt76
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/symb-emj.mkxl26
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt59
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/symb-ini.mkxl340
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-aux.lmt782
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-aux.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkxl)5090
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-cmp.mkxl22
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-con.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/syst-con.mkxl)41
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-fnt.mkxl47
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl1319
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt521
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-lua.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkxl)40
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-mac.lmt117
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-pln.mkxl119
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/syst-rtp.mkxl18
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl96
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-frm.mkxl263
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-ltb.mkxl803
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-mis.mkxl299
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-ntb.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkxl)475
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-nte.mkxl107
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl2267
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-tbl.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkxl)937
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-tsp.mkxl580
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-xnt.mklx142
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.mklx976
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/task-ini.mkxl22
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt183
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/toks-aux.mkxl68
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt332
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/toks-ini.mkxl20
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt582
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/toks-scn.mkxl23
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-ctx.mkxl58
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt417
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-deb.mkxl45
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-inf.lmt425
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-jus.mkxl24
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-tex.mkxl70
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-tim.lmt178
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-vis.lmt1757
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/trac-vis.mkxl219
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/type-def.mkxl48
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/type-fbk.mkxl70
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt45
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/type-ini.mklx (renamed from Master/texmf-dist/tex/context/base/mkiv/type-ini.mklx)313
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/type-lua.mkxl86
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/type-set.mkxl139
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/type-siz.mkxl169
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-bld.lmt414
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-bld.mkxl62
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-brk.lmt498
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-brk.mkxl94
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-cap.lmt458
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-cap.mkxl271
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-chr.lmt291
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-chr.mkxl87
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-cln.mkxl32
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-del.mkxl925
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-dig.lmt181
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl58
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-dir.mkxl205
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-drp.lmt341
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-drp.mkxl129
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-duc.lmt1048
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-fkr.mkxl38
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-fln.lmt406
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-fln.mkxl109
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-ini.lmt11
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-ini.mkxl49
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-inj.mkxl75
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-itc.lmt703
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-itc.mklx56
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-itm.mkxl273
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-krn.lmt630
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-krn.mkxl143
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl64
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-lig.mkxl23
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-lin.lmt402
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-lin.mkxl25
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-mar.lmt995
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-mar.mkxl478
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-ovl.lmt184
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-ovl.mkxl116
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-pag.lmt206
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-pag.mkxl20
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-par.lmt96
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-par.mkxl60
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-plc.mkxl39
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-pnc.mkxl55
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-prc.mklx99
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-rep.mkxl42
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-rub.lmt397
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-rub.mkxl173
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-scr.mkxl266
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-shp.lmt267
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-shp.mkxl130
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-spa.lmt255
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-spa.mkxl78
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-sus.lmt308
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-sus.mkxl51
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-tal.lmt439
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-tal.mkxl303
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-txt.mklx231
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-wrp.mkxl58
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/unic-ini.mkxl36
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-ams.tex25
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-apa-de.tex28
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-apa-fr.tex28
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-apa-it.tex2
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-apa.tex2
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-aps.tex32
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-num-fr.tex30
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-num.tex32
-rw-r--r--Master/texmf-dist/tex/context/bib/mkii/bibl-ssa.tex52
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/bonum-math.lfg22
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/color-latin.lfg49
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/dejavu-math.lfg15
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/minion-math.lfg10
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/pagella-math.lfg24
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/px-math.lfg16
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/schola-math.lfg16
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/termes-math.lfg22
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/tx-math.lfg10
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-dejavu.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-euler.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-libertinus.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-plex.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-punk.mkxl54
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-stix.mkiv22
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/fonts/mkiv/xits-math.lfg1
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-cs.xml215
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-de.xml215
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-en.xml212
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-fr.xml2725
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-it.xml215
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-nl.xml212
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-pe.xml215
-rw-r--r--Master/texmf-dist/tex/context/interface/mkii/keys-ro.xml215
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/context-en.xml5480
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-accent.xml148
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-align.xml92
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-anchor.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-attachment.xml38
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-attribute.xml30
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-backend.xml19
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-background.xml8
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-bar.xml104
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-blackrule.xml25
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-bleed.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-block.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-bookmark.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-boxes.xml402
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-buffer.xml26
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-button.xml36
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-capitals.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-catcodes.xml12
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-character.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-characteralign.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-characterspacing.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-characterstripping.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-chart.xml60
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-charwidth.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-chemical.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-cleaning.xml20
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-clipping.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-collector.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-color.xml19
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-columns.xml95
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-combination.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-commandhandler.xml80
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-comment.xml25
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-common-argument.xml53
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-common-assignment.xml8
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-common-definitions.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-common-instance.xml11
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-common-keyword.xml41
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-common-string.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-common-value.xml740
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-context-modules.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-context.pdfbin930546 -> 963860 bytes
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-context.xml17
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-contextname.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-conversion.xml282
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-counter.xml21
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-database.xml20
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-dataset.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-define.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-delimitedtext.xml80
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-description.xml22
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-digits.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-dimension.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-direction.xml18
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-document.xml24
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-dummy.xml18
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-enumeration.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-export.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-field.xml22
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-file.xml64
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-filler.xml94
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-fillinline.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-fillinrule.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-firstline.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-fittingpage.xml34
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-floats.xml262
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-fontfamily.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-fonts.xml109
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-form.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-formula.xml28
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-fraction.xml70
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-framed.xml153
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-framedtable.xml16
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-graphics.xml68
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-help.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-hemistich.xml14
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-highlight.xml14
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-hspace.xml40
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-hyphenation.xml16
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-imposition.xml4
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-indent.xml7
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-indentedtext.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-injector.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-insertion.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-interaction.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-interactionbar.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-interactionmenu.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-interface.xml57
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-interlinespace.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-ipsum.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-italiccorrection.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-itemgroup.xml20
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-items.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-javascript.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-kerning.xml28
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-label.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-labeltext.xml387
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-language.xml8
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-layer.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-layout.xml19
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-linefiller.xml64
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-linenumber.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-lines.xml42
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-linetable.xml4
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-linewidth.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-list.xml45
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-logo.xml9
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-lohi.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-lua.xml49
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-luatable.xml76
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-makeup.xml46
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-marginblock.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-margindata.xml267
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-marker.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-marking.xml46
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-math.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mathalignment.xml28
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mathcases.xml28
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mathmatrix.xml46
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mathname.xml1086
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mathornament.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mathradical.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mathstackers.xml850
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-metapost.xml121
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-mixedcolumns.xml22
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-modes.xml18
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-modules.xml26
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-narrow.xml14
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-naturaltable.xml52
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-note.xml168
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-object.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-offset.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-opposite.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-orientation.xml69
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-ornament.xml14
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-output.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-overlay.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagebreak.xml28
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagecolumns.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagecomment.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagefigure.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagegrid.xml56
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pageinjection.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagelayout.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagemarks.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagenumber.xml89
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pageselection.xml12
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pageshift.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pagestate.xml31
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pairedbox.xml50
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-papersize.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-paragraph.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-paragraphnumber.xml4
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-paragraphs.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-parallel.xml16
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-parbuilder.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-parwrapper.xml80
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-pdf.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-penalty.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-periods.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-phantom.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-placeholder.xml46
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-placement.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-position.xml52
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-positionbar.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-positioning.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-postponing.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-processor.xml8
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-profile.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-publication.xml30
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-random.xml22
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdfbin25081 -> 24990 bytes
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-references.xml40
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-regime.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-renderingwindow.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-replacement.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-rotation.xml54
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-ruby.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-scale.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-scite.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-script.xml24
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-section.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-sectionblock.xml50
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-selector.xml12
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-setup.xml62
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-setups.xml66
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-shift.xml18
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-sidebar.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-simplecolumns.xml19
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-smash.xml24
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-sort.xml37
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-soundtrack.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-spellchecking.xml4
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-spreadsheet.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-startstop.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-steps.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-stream.xml26
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-string.xml22
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-strut.xml44
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-symbol.xml18
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-synctex.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-synonym.xml53
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-system.xml1044
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-systemlog.xml8
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-table.xml4
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-tabulation.xml205
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-tagging.xml8
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-tex.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-textbackground.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-textflow.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-textrule.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-texts.xml28
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-thinrule.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-token.xml20
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-tolerance.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-tooltip.xml28
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-tracker.xml34
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-translate.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-translation.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-twopassdata.xml34
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-typography.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-unit.xml12
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-userdata.xml6
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-variables.xml84
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-verbatim.xml113
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-version.xml10
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-viewerlayer.xml2
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-visual.xml48
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-visualizer.xml50
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-vspace.xml12
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-whitespace.xml4
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-xml.xml23
-rw-r--r--Master/texmf-dist/tex/context/interface/mkiv/i-xtable.xml52
-rw-r--r--Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex6
-rw-r--r--Master/texmf-dist/tex/context/modules/common/s-obsolete-tokens.mkiv (renamed from Master/texmf-dist/tex/context/base/mkiv/toks-tra.lua)101
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua28
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi18
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-educat.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-examn.mkiv577
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-format.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-gnuplot.mkxl (renamed from Master/texmf-dist/tex/context/base/mkiv/m-gnuplot.mkxl)2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-ipsum.mkiv50
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-morse.mkvi4
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-nodechart.lua4
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-ntb-to-xtb.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-oldfun.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-oldnum.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv5
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv39
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-steps.lua2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-steps.mkvi40
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-system-aliasing.mkiv120
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-system-readers.mkxl148
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-tikz.mkiv75
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-timing.mkxl113
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-visual.mkiv10
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-article-titlepage.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-coverage.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-shapes.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua12
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi38
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-languages-hyphenation.lua25
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-module-basic.mkiv45
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-bars.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-boring.mkiv143
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-colorful.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-funny.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-fuzzy.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-green.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-organic.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-original.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-split.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-stack.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-stepper.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-tiles.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-weird.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-windows.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-references-show.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-syntax.mkiv84
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-system-macros.mkxl311
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-system-tokens.mkxl84
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-system-visual.mkiv94
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-tugboat-columns.mkiv16
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-math-svg.lua6
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-mathml-basics.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-mathml.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv12
-rw-r--r--Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.lmt30
-rw-r--r--Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.mkxl61
-rw-r--r--Master/texmf-dist/tex/context/modules/mkxl/s-colors-show.mkxl276
-rw-r--r--Master/texmf-dist/tex/context/modules/mkxl/s-fonts-show.mkxl658
-rw-r--r--Master/texmf-dist/tex/context/modules/mkxl/s-layout-show.mkxl243
-rw-r--r--Master/texmf-dist/tex/context/modules/mkxl/s-publications-show.mkxl84
-rw-r--r--Master/texmf-dist/tex/context/modules/mkxl/s-symbols-show.mkxl110
-rw-r--r--Master/texmf-dist/tex/context/patterns/common/lang-eo.rme3
-rw-r--r--Master/texmf-dist/tex/context/patterns/common/lang-sr.rme5
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkii/lang-ala.pat26718
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkii/lang-eo.hyp8
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkii/lang-eo.pat2210
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkii/lang-es.pat1863
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkiv/lang-ala.lua8
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkiv/lang-eo.lua20
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkiv/lang-es.lua6
-rw-r--r--Master/texmf-dist/tex/context/patterns/mkiv/lang-sr.lua4
-rw-r--r--Master/texmf-dist/tex/context/sample/common/cuomo.tex17
-rw-r--r--Master/texmf-dist/tex/context/sample/third/aesop-de.tex6
-rw-r--r--Master/texmf-dist/tex/context/sample/third/herbert-en.tex23
-rw-r--r--Master/texmf-dist/tex/context/sample/third/herbert-es.tex23
-rw-r--r--Master/texmf-dist/tex/context/sample/third/jaros-sk.tex10
-rw-r--r--Master/texmf-dist/tex/context/sample/third/jaros-vlnka-sk.tex10
-rw-r--r--Master/texmf-dist/tex/context/sample/third/khatt-en.tex8
-rw-r--r--Master/texmf-dist/tex/context/sample/third/komensky-cz.tex54
-rw-r--r--Master/texmf-dist/tex/context/sample/third/komensky-vlnka-cz.tex52
-rw-r--r--Master/texmf-dist/tex/context/sample/third/krdel-sk.tex3
-rw-r--r--Master/texmf-dist/tex/context/sample/third/kun-cz.tex3
-rw-r--r--Master/texmf-dist/tex/context/sample/third/pope-en.tex28
-rw-r--r--Master/texmf-dist/tex/context/sample/third/pope-es.tex28
-rw-r--r--Master/texmf-dist/tex/context/sample/third/readme.txt128
-rw-r--r--Master/texmf-dist/tex/context/sample/third/shakespeare-en.tex21
-rw-r--r--Master/texmf-dist/tex/context/sample/third/shakespeare-es.tex21
-rw-r--r--Master/texmf-dist/tex/context/sample/third/shelley-en.tex21
-rw-r--r--Master/texmf-dist/tex/context/sample/third/shelley-es.tex21
-rw-r--r--Master/texmf-dist/tex/context/sample/third/shelley-fr.tex21
-rw-r--r--Master/texmf-dist/tex/context/sample/third/vallejo-trilce-es.tex28
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua4
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-basics-nod.lua26
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua10653
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-fonts.lua32
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex11
1806 files changed, 324967 insertions, 56237 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun b/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun
index 6eaf5ff449f..6fc17adb022 100755
--- a/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun
+++ b/Build/source/texk/texlive/linked_scripts/context/stubs/unix/mtxrun
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -852,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11605, stripped down to: 8299
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -861,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -891,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -907,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1040,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1082,11 +1087,18 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
methods["preload table"]=function(name)
- return builtin["preload table"](name)
+ local f=builtin["preload table"]
+ if f then
+ return f(name)
+ end
end
methods["qualified path"]=function(name)
return loadedbyname(addsuffix(lualibfile(name),"lua"),name)
@@ -1098,19 +1110,31 @@ methods["lib extra list"]=function(name)
return loadedbypath(addsuffix(lualibfile(name),os.libsuffix),name,getextralibpaths(),true,"lib")
end
methods["path specification"]=function(name)
- getluapaths()
- return builtin["path specification"](name)
+ local f=builtin["path specification"]
+ if f then
+ getluapaths()
+ return f(name)
+ end
end
methods["cpath specification"]=function(name)
- getlibpaths()
- return builtin["cpath specification"](name)
+ local f=builtin["cpath specification"]
+ if f then
+ getlibpaths()
+ return f(name)
+ end
end
methods["all in one fallback"]=function(name)
- return builtin["all in one fallback"](name)
+ local f=builtin["all in one fallback"]
+ if f then
+ return f(name)
+ end
end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -1122,19 +1146,22 @@ function helpers.loaded(name)
level=level+1
for i=1,#sequence do
local method=sequence[i]
- if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
- end
- local result,rest=methods[method](name)
- if type(result)=="function" then
+ local lookup=method and methods[method]
+ if type(lookup)=="function" then
if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
end
- if helpers.traceused then
- used[#used+1]={ level=level,name=name }
+ local result,rest=lookup(name)
+ if type(result)=="function" then
+ if helpers.trace then
+ helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
+ level=level-1
+ return result,rest
end
- level=level-1
- return result,rest
end
end
level=level-1
@@ -1174,7 +1201,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 38440, stripped down to: 19316
+-- original size: 38703, stripped down to: 19489
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1272,11 +1299,13 @@ local fullstripper=whitespace^0*C((whitespace^0*nonwhitespace^1)^0)
local collapser=Cs(spacer^0/""*nonspacer^0*((spacer^0/" "*nonspacer^1)^0))
local nospacer=Cs((whitespace^1/""+nonwhitespace^1)^0)
local b_collapser=Cs(whitespace^0/""*(nonwhitespace^1+whitespace^1/" ")^0)
-local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
local m_collapser=Cs((nonwhitespace^1+whitespace^1/" ")^0)
+local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
+local x_collapser=Cs((nonwhitespace^1+whitespace^1/"" )^0)
local b_stripper=Cs(spacer^0/""*(nonspacer^1+spacer^1/" ")^0)
-local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
local m_stripper=Cs((nonspacer^1+spacer^1/" ")^0)
+local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
+local x_stripper=Cs((nonspacer^1+spacer^1/"" )^0)
patterns.stripper=stripper
patterns.fullstripper=fullstripper
patterns.collapser=collapser
@@ -1284,9 +1313,11 @@ patterns.nospacer=nospacer
patterns.b_collapser=b_collapser
patterns.m_collapser=m_collapser
patterns.e_collapser=e_collapser
+patterns.x_collapser=x_collapser
patterns.b_stripper=b_stripper
patterns.m_stripper=m_stripper
patterns.e_stripper=e_stripper
+patterns.x_stripper=x_stripper
patterns.lowercase=lowercase
patterns.uppercase=uppercase
patterns.letter=patterns.lowercase+patterns.uppercase
@@ -3806,7 +3837,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 19120, stripped down to: 10208
+-- original size: 19409, stripped down to: 10419
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4029,6 +4060,8 @@ elseif name=="macosx" then
platform="osx-intel"
elseif find(architecture,"x86_64",1,true) then
platform="osx-64"
+ elseif find(architecture,"arm64",1,true) then
+ platform="osx-64"
else
platform="osx-ppc"
end
@@ -4200,11 +4233,19 @@ local function isleapyear(year)
end
os.isleapyear=isleapyear
local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
-local function nofdays(year,month)
+local function nofdays(year,month,day)
if not month then
return isleapyear(year) and 365 or 364
- else
+ elseif not day then
return month==2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day=day+days[i]
+ end
+ if month>2 and isleapyear(year) then
+ day=day+1
+ end
+ return day
end
end
os.nofdays=nofdays
@@ -5729,10 +5770,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-unicode"] = package.loaded["l-unicode"] or true
--- original size: 41281, stripped down to: 17261
+-- original size: 41303, stripped down to: 17277
if not modules then modules={} end modules ['l-unicode']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -6563,7 +6605,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 45153, stripped down to: 22734
+-- original size: 45129, stripped down to: 23525
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -6615,25 +6657,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -6911,7 +6987,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -7106,10 +7184,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -7219,33 +7305,36 @@ local format_extension=function(extensions,f,name)
local extension=extensions[name] or "tostring(%s)"
local f=tonumber(f) or 1
local w=find(extension,"%.%.%.")
- if w then
- if f==0 then
+ if f==0 then
+ if w then
extension=gsub(extension,"%.%.%.","")
- return extension
- elseif f==1 then
+ end
+ return extension
+ elseif f==1 then
+ if w then
extension=gsub(extension,"%.%.%.","%%s")
- n=n+1
- local a="a"..n
- return format(extension,a,a)
- elseif f<0 then
+ end
+ n=n+1
+ local a="a"..n
+ return format(extension,a,a)
+ elseif f<0 then
+ if w then
+ extension=gsub(extension,"%.%.%.","")
+ return extension
+ else
local a="a"..(n+f+1)
return format(extension,a,a)
- else
- extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- local t={}
- for i=1,f do
- n=n+1
- t[i]="a"..n
- end
- return format(extension,unpack(t))
end
else
- extension=gsub(extension,"%%s",function()
+ if w then
+ extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ local t={}
+ for i=1,f do
n=n+1
- return "a"..n
- end)
- return extension
+ t[i]="a"..n
+ end
+ return format(extension,unpack(t))
end
end
local builder=Cs { "start",
@@ -7259,7 +7348,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -7297,7 +7386,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -7448,7 +7539,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 32649, stripped down to: 18257
+-- original size: 32815, stripped down to: 18257
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8194,10 +8285,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 11530, stripped down to: 9007
+-- original size: 11552, stripped down to: 9023
if not modules then modules={} end modules ['util-fil']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -8562,10 +8654,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 12946, stripped down to: 9507
+-- original size: 12968, stripped down to: 9523
if not modules then modules={} end modules ['util-sac']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -9215,7 +9308,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 24132, stripped down to: 16210
+-- original size: 24683, stripped down to: 16431
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9228,7 +9321,7 @@ local lpeg,table,string=lpeg,table,string
local P,R,V,S,C,Ct,Cs,Carg,Cc,Cg,Cf,Cp=lpeg.P,lpeg.R,lpeg.V,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.Carg,lpeg.Cc,lpeg.Cg,lpeg.Cf,lpeg.Cp
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local concat,gmatch,find=table.concat,string.gmatch,string.find
-local tostring,type,next,rawset=tostring,type,next,rawset
+local tonumber,tostring,type,next,rawset=tonumber,tostring,type,next,rawset
local mod,div=math.mod,math.div
utilities=utilities or {}
local parsers=utilities.parsers or {}
@@ -9620,13 +9713,15 @@ function parsers.csvsplitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
local separator=specification.separator
local quotechar=specification.quote
+ local numbers=specification.numbers
local separator=S(separator~="" and separator or ",")
local whatever=C((1-separator-newline)^0)
if quotechar and quotechar~="" then
local quotedata=nil
for chr in gmatch(quotechar,".") do
local quotechar=P(chr)
- local quoteword=quotechar*C((1-quotechar)^0)*quotechar
+ local quoteitem=(1-quotechar)^0
+ local quoteword=quotechar*(numbers and (quoteitem/tonumber) or C(quoteitem))*quotechar
if quotedata then
quotedata=quotedata+quoteword
else
@@ -9642,12 +9737,14 @@ function parsers.csvsplitter(specification)
end
function parsers.rfc4180splitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
+ local numbers=specification.numbers
local separator=specification.separator
local quotechar=P(specification.quote)
local dquotechar=quotechar*quotechar
/specification.quote
local separator=S(separator~="" and separator or ",")
- local escaped=quotechar*Cs((dquotechar+(1-quotechar))^0)*quotechar
+ local whatever=(dquotechar+(1-quotechar))^0
+ local escaped=quotechar*(numbers and (whatever/tonumber) or Cs(whatever))*quotechar
local non_escaped=C((1-quotechar-newline-separator)^1)
local field=escaped+non_escaped+Cc("")
local record=Ct(field*(separator*field)^1)
@@ -11718,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11763,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11773,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11799,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11810,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -12712,7 +12809,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-set"] = package.loaded["trac-set"] or true
--- original size: 13394, stripped down to: 8882
+-- original size: 13901, stripped down to: 9175
if not modules then modules={} end modules ['trac-set']={
version=1.001,
@@ -12735,7 +12832,7 @@ utilities.setters=setters
local data={}
local trace_initialize=false
local frozen=true
-function setters.initialize(filename,name,values)
+local function initialize_setter(filename,name,values)
local setter=data[name]
if setter then
local data=setter.data
@@ -12776,8 +12873,8 @@ function setters.initialize(filename,name,values)
end
end
local function set(t,what,newvalue)
- local data=t.data
- if not data.frozen then
+ local data=t.data
+ if data and not data.frozen then
local done=t.done
if type(what)=="string" then
what=settings_to_hash(what)
@@ -12813,7 +12910,7 @@ local function set(t,what,newvalue)
end
local function reset(t)
local data=t.data
- if not data.frozen then
+ if data and not data.frozen then
for name,functions in sortedthash(data) do
for i=1,#functions do
functions[i](false)
@@ -12834,7 +12931,7 @@ local function disable(t,what)
set(t,what,false)
end
end
-function setters.register(t,what,...)
+local function register_setter(t,what,...)
local data=t.data
what=lower(what)
local functions=data[what]
@@ -12869,23 +12966,24 @@ function setters.register(t,what,...)
end
return false
end
-function setters.enable(t,what)
+local function enable_setter(t,what)
local e=t.enable
t.enable,t.done=enable,{}
+ set(t,what,true)
enable(t,what)
t.enable,t.done=e,{}
end
-function setters.disable(t,what)
+local function disable_setter(t,what)
local e=t.disable
t.disable,t.done=disable,{}
disable(t,what)
t.disable,t.done=e,{}
end
-function setters.reset(t)
+local function reset_setter(t)
t.done={}
reset(t)
end
-function setters.list(t)
+local function list_setter(t)
local list=table.sortedkeys(t.data)
local user,system={},{}
for l=1,#list do
@@ -12898,8 +12996,8 @@ function setters.list(t)
end
return user,system
end
-function setters.show(t)
- local list=setters.list(t)
+local function show_setter(t)
+ local list=list_setter(t)
t.report()
for k=1,#list do
local name=list[k]
@@ -12930,39 +13028,50 @@ function setters.show(t)
end
end
end
-local enable,disable,register,list,show=setters.enable,setters.disable,setters.register,setters.list,setters.show
function setters.report(setter,fmt,...)
- print(formatters["%-15s : %s\n"](setter.name,formatters[fmt](...)))
+ if fmt then
+ print(formatters["%-15s : %s"](setter.name,formatters[fmt](...)))
+ else
+ print("")
+ end
end
-local function default(setter,name)
+local function setter_default(setter,name)
local d=setter.data[name]
return d and d.default
end
-local function value(setter,name)
+local function setter_value(setter,name)
local d=setter.data[name]
return d and (d.value or d.default)
end
-function setters.new(name)
+local function new_setter(name)
local setter
setter={
data=allocate(),
name=name,
- report=function(...) setters.report (setter,...) end,
- enable=function(...) enable (setter,...) end,
- disable=function(...) disable (setter,...) end,
- reset=function(...) reset (setter,...) end,
- register=function(...) register(setter,...) end,
- list=function(...) return list (setter,...) end,
- show=function(...) show (setter,...) end,
- default=function(...) return default (setter,...) end,
- value=function(...) return value (setter,...) end,
+ report=function(...) setters.report (setter,...) end,
+ enable=function(...) enable_setter (setter,...) end,
+ disable=function(...) disable_setter (setter,...) end,
+ reset=function(...) reset_setter (setter,...) end,
+ register=function(...) register_setter(setter,...) end,
+ list=function(...) return list_setter (setter,...) end,
+ show=function(...) show_setter (setter,...) end,
+ default=function(...) return setter_default (setter,...) end,
+ value=function(...) return setter_value (setter,...) end,
}
data[name]=setter
return setter
end
-trackers=setters.new("trackers")
-directives=setters.new("directives")
-experiments=setters.new("experiments")
+setters.enable=enable_setter
+setters.disable=disable_setter
+setters.register=register_setter
+setters.list=list_setter
+setters.show=show_setter
+setters.reset=reset_setter
+setters.new=new_setter
+setters.initialize=initialize_setter
+trackers=new_setter("trackers")
+directives=new_setter("directives")
+experiments=new_setter("experiments")
local t_enable,t_disable=trackers .enable,trackers .disable
local d_enable,d_disable=directives .enable,directives .disable
local e_enable,e_disable=experiments.enable,experiments.disable
@@ -13009,11 +13118,11 @@ if environment then
if engineflags then
local list=engineflags["c:trackers"] or engineflags["trackers"]
if type(list)=="string" then
- setters.initialize("commandline flags","trackers",settings_to_hash(list))
+ initialize_setter("commandline flags","trackers",settings_to_hash(list))
end
local list=engineflags["c:directives"] or engineflags["directives"]
if type(list)=="string" then
- setters.initialize("commandline flags","directives",settings_to_hash(list))
+ initialize_setter("commandline flags","directives",settings_to_hash(list))
end
end
end
@@ -13055,7 +13164,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 33003, stripped down to: 21667
+-- original size: 16017, stripped down to: 11045
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13071,9 +13180,8 @@ local topattern=string.topattern
local utfchar=utf.char
local datetime=os.date
local openfile=io.open
-local runningtex=tex and (tex.jobname or tex.formatname)
-local write_nl=runningtex and texio and texio.write_nl or print
-local write=runningtex and texio and texio.write or io.write
+local write_nl=print
+local write=io.write
local setmetatableindex=table.setmetatableindex
local formatters=string.formatters
local settings_to_hash=utilities.parsers.settings_to_hash
@@ -13109,273 +13217,7 @@ local function ansisupported(specification)
return false
end
end
-if runningtex and texio then
- if texio.setescape then
- texio.setescape(0)
- end
- if arg and ansisupported then
- for k,v in next,arg do
- if v=="--ansi" or v=="--c:ansi" then
- if ansisupported("ansi") then
- variant="ansi"
- end
- break
- elseif v=="--ansilog" or v=="--c:ansilog" then
- if ansisupported("ansilog") then
- variant="ansilog"
- end
- break
- end
- end
- end
- local function useluawrites()
- local texio_write_nl=texio.write_nl
- local texio_write=texio.write
- local io_write=io.write
- write_nl=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write_nl("log",...)
- texio_write_nl("term","")
- io_write(...)
- elseif target=="log" then
- texio_write_nl("log",...)
- elseif target=="term" then
- texio_write_nl("term","")
- io_write(...)
- elseif type(target)=="number" then
- texio_write_nl(target,...)
- elseif target~="none" then
- texio_write_nl("log",target,...)
- texio_write_nl("term","")
- io_write(target,...)
- end
- end
- write=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write("log",...)
- io_write(...)
- elseif target=="log" then
- texio_write("log",...)
- elseif target=="term" then
- io_write(...)
- elseif type(target)=="number" then
- texio_write(target,...)
- elseif target~="none" then
- texio_write("log",target,...)
- io_write(target,...)
- end
- end
- texio.write=write
- texio.write_nl=write_nl
- useluawrites=ignore
- end
- local whereto="both"
- local target=nil
- local targets=nil
- local formats=table.setmetatableindex("self")
- local translations=table.setmetatableindex("self")
- local report_yes,subreport_yes,direct_yes,subdirect_yes,status_yes
- local report_nop,subreport_nop,direct_nop,subdirect_nop,status_nop
- local variants={
- default={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="log",
- log="log",
- file="log",
- console="term",
- terminal="term",
- both="term and log",
- },
- },
- ansi={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="none",
- log="none",
- file="none",
- console="term",
- terminal="term",
- both="term",
- },
- }
- }
- variants.ansilog={
- formats=variants.ansi.formats,
- targets=variants.default.targets,
- }
- logs.flush=io.flush
- writer=function(...)
- write_nl(target,...)
- end
- newline=function()
- write_nl(target,"\n")
- end
- report=function(a,b,c,...)
- if c~=nil then
- write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,report_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,report_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- direct=function(a,b,c,...)
- if c~=nil then
- return direct_yes(translations[a],formatters[formats[b]](c,...))
- elseif b then
- return direct_yes(translations[a],formats[b])
- elseif a then
- return direct_nop(translations[a])
- else
- return ""
- end
- end
- subreport=function(a,s,b,c,...)
- if c~=nil then
- write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
- elseif a then
- write_nl(target,subreport_nop(translations[a],translations[s]))
- else
- write_nl(target,"\n")
- end
- end
- subdirect=function(a,s,b,c,...)
- if c~=nil then
- return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
- elseif b then
- return subdirect_yes(translations[a],translations[s],formats[b])
- elseif a then
- return subdirect_nop(translations[a],translations[s])
- else
- return ""
- end
- end
- status=function(a,b,c,...)
- if c~=nil then
- write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,status_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,status_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- settarget=function(askedwhereto)
- whereto=askedwhereto or whereto or "both"
- target=targets[whereto]
- if not target then
- whereto="both"
- target=targets[whereto]
- end
- if target=="term" or target=="term and log" then
- logs.flush=io.flush
- else
- logs.flush=ignore
- end
- end
- local stack={}
- pushtarget=function(newtarget)
- insert(stack,target)
- settarget(newtarget)
- end
- poptarget=function()
- if #stack>0 then
- settarget(remove(stack))
- end
- end
- setformats=function(f)
- formats=f
- end
- settranslations=function(t)
- translations=t
- end
- setprocessor=function(f)
- local writeline=write_nl
- write_nl=function(target,...)
- writeline(target,f(...))
- end
- end
- setformatters=function(specification)
- local t=nil
- local f=nil
- local d=variants.default
- if not specification then
- elseif type(specification)=="table" then
- t=specification.targets
- f=specification.formats or specification
- else
- if not ansisupported(specification) then
- specification="default"
- end
- local v=variants[specification]
- if v then
- t=v.targets
- f=v.formats
- variant=specification
- end
- end
- targets=t or d.targets
- target=targets[whereto] or target
- if f then
- d=d.formats
- else
- f=d.formats
- d=f
- end
- setmetatableindex(f,d)
- report_yes=f.report_yes
- report_nop=f.report_nop
- subreport_yes=f.subreport_yes
- subreport_nop=f.subreport_nop
- direct_yes=f.direct_yes
- direct_nop=f.direct_nop
- subdirect_yes=f.subdirect_yes
- subdirect_nop=f.subdirect_nop
- status_yes=f.status_yes
- status_nop=f.status_nop
- if variant=="ansi" or variant=="ansilog" then
- useluawrites()
- end
- settarget(whereto)
- end
- setformatters(variant)
- setlogfile=ignore
- settimedlog=ignore
-else
+do
local report_yes,subreport_yes,status_yes
local report_nop,subreport_nop,status_nop
local variants={
@@ -13675,46 +13517,6 @@ end)
directives.register("logs.target",function(v)
settarget(v)
end)
-if tex then
- local report=logs.reporter("pages")
- local texgetcount=tex and tex.getcount
- local real,user,sub=0,0,0
- function logs.start_page_number()
- real=texgetcount("realpageno")
- user=texgetcount("userpageno")
- sub=texgetcount("subpageno")
- end
- local timing=false
- local lasttime=nil
- trackers.register("pages.timing",function(v)
- timing=""
- end)
- function logs.stop_page_number()
- if timing then
- local elapsed=statistics.currenttime(statistics)
- local average,page
- if not lasttime or real<2 then
- average=elapsed
- page=elapsed
- else
- average=elapsed/(real-1)
- page=elapsed-lasttime
- end
- lasttime=elapsed
- timing=formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
- end
- if real<=0 then
- report("flushing page%s",timing)
- elseif user<=0 then
- report("flushing realpage %s%s",real,timing)
- elseif sub<=0 then
- report("flushing realpage %s, userpage %s%s",real,user,timing)
- else
- report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
- end
- logs.flush()
- end
-end
local nesting=0
local verbose=false
local hasscheme=url.hasscheme
@@ -13826,133 +13628,12 @@ function logs.system(whereto,process,jobname,category,fmt,arg,...)
end
end
local report_system=logs.reporter("system","logs")
-function logs.obsolete(old,new)
- local o=loadstring("return "..new)()
- if type(o)=="function" then
- return function(...)
- report_system("function %a is obsolete, use %a",old,new)
- loadstring(old.."="..new.." return "..old)()(...)
- end
- elseif type(o)=="table" then
- local t,m={},{}
- m.__index=function(t,k)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- return o[k]
- end
- m.__newindex=function(t,k,v)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- o[k]=v
- end
- if libraries then
- libraries.obsolete[old]=t
- end
- setmetatable(t,m)
- return t
- end
-end
if utilities then
utilities.report=report_system
end
-if tex and tex.error then
- function logs.texerrormessage(...)
- tex.error(format(...))
- end
-else
- function logs.texerrormessage(...)
- print(format(...))
- end
-end
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
-if tex then
- local finalactions={}
- local fatalerrors={}
- local possiblefatal={}
- local loggingerrors=false
- function logs.loggingerrors()
- return loggingerrors
- end
- directives.register("logs.errors",function(v)
- loggingerrors=v
- if type(v)=="string" then
- fatalerrors=settings_to_hash(v)
- else
- fatalerrors={}
- end
- end)
- function logs.registerfinalactions(...)
- insert(finalactions,...)
- end
- local what=nil
- local report=nil
- local state=nil
- local target=nil
- local function startlogging(t,r,w,s)
- target=t
- state=force
- force=true
- report=type(r)=="function" and r or logs.reporter(r)
- what=w
- pushtarget(target)
- newline()
- if s then
- report("start %s: %s",what,s)
- else
- report("start %s",what)
- end
- if target=="logfile" then
- newline()
- end
- return report
- end
- local function stoplogging()
- if target=="logfile" then
- newline()
- end
- report("stop %s",what)
- if target=="logfile" then
- newline()
- end
- poptarget()
- state=oldstate
- end
- function logs.startfilelogging(...)
- return startlogging("logfile",...)
- end
- logs.stopfilelogging=stoplogging
- local done=false
- function logs.starterrorlogging(r,w,...)
- if not done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","start possible issues")
- poptarget()
- done=true
- end
- if fatalerrors[w] then
- possiblefatal[w]=true
- end
- return startlogging("terminal",r,w,...)
- end
- logs.stoperrorlogging=stoplogging
- function logs.finalactions()
- if #finalactions>0 then
- for i=1,#finalactions do
- finalactions[i]()
- end
- if done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","stop possible issues")
- poptarget()
- end
- return next(possiblefatal) and sortedkeys(possiblefatal) or false
- end
- end
-end
end -- of closure
@@ -13961,7 +13642,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10184, stripped down to: 7500
+-- original size: 9740, stripped down to: 7296
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14055,10 +13736,8 @@ local function stoptiming(instance)
timer.loadtime=timer.loadtime+loadtime
timer.timing=0
timer.starttime=0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
local timer=timers[instance or "notimer"]
@@ -14135,18 +13814,11 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
- register("control sequences",function()
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
+ register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
register("callbacks",statistics.callbacks)
@@ -14160,15 +13832,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14224,6 +13891,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -15920,7 +15594,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-env"] = package.loaded["luat-env"] or true
--- original size: 6551, stripped down to: 4315
+-- original size: 6267, stripped down to: 4115
if not modules then modules={} end modules ['luat-env']={
version=1.001,
@@ -15948,14 +15622,6 @@ local mt={
else
return "unknown"
end
- elseif k=="kind" then
- local kind=texgettoks and texgettoks("contextkindtoks")
- if kind and kind~="" then
- rawset(environment,"kind",kind)
- return kind
- else
- return "unknown"
- end
elseif k=="jobname" or k=="formatname" then
local name=tex and tex[k]
if name or name=="" then
@@ -16530,7 +16196,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 61191, stripped down to: 35864
+-- original size: 61808, stripped down to: 36227
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17523,12 +17189,25 @@ local function xmlconvert(data,settings)
end
end
xml.convert=xmlconvert
-function xml.inheritedconvert(data,xmldata)
+function xml.inheritedconvert(data,xmldata,cleanup)
local settings=xmldata.settings
if settings then
settings.parent_root=xmldata
end
- local xc=xmlconvert(data,settings)
+ local xc=xmlconvert(data,settings)
+ if cleanup then
+ local x=xc.dt
+ if x then
+ x=x[1]
+ if x and x.tg=="@pi@" then
+ local dt=x.dt
+ local pi=dt and dt[1]
+ if type(pi)=="string" and find(pi,"^xml") then
+ remove(dt,1)
+ end
+ end
+ end
+ end
return xc
end
function xml.is_valid(root)
@@ -17586,9 +17265,17 @@ local function copy(old,p)
new[k]=t
elseif k=="dt" then
v.__p__=nil
- v=copy(v,new)
- new[k]=v
- v.__p__=p
+ local t={}
+ for i=1,#v do
+ local vi=v[i]
+ if type(vi)=="table" then
+ t[i]=copy(vi,new)
+ else
+ t[i]=vi
+ end
+ end
+ new[k]=t
+ t.__p__=p
else
new[k]=v
end
@@ -17992,7 +17679,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54626, stripped down to: 31255
+-- original size: 54667, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -18487,7 +18174,7 @@ local builtin={
local lp_builtin=lpeg.utfchartabletopattern(builtin)/builtin*((spaces*P("(")*spaces*P(")"))/"")
local lp_attribute=(P("@")+P("attribute::"))/""*Cc("(ll.at and ll.at['")*((R("az","AZ")+S("-_:"))^1)*Cc("'])")
local lp_fastpos_p=P("+")^0*R("09")^1*P(-1)/"l==%0"
-local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0==l))"
+local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0+1==l))"
local lp_fastpos=lp_fastpos_n+lp_fastpos_p
local lp_reserved=C("and")+C("or")+C("not")+C("div")+C("mod")+C("true")+C("false")
local lp_lua_function=Cs((R("az","AZ","__")^1*(P(".")*R("az","AZ","__")^1)^1)*("("))/"%0"
@@ -19312,7 +18999,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 30771, stripped down to: 19680
+-- original size: 33708, stripped down to: 20953
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -19330,7 +19017,7 @@ local xmlinheritedconvert=xml.inheritedconvert
local xmlapplylpath=xml.applylpath
local type,next,setmetatable,getmetatable=type,next,setmetatable,getmetatable
local insert,remove,fastcopy,concat=table.insert,table.remove,table.fastcopy,table.concat
-local gmatch,gsub,format,find,strip=string.gmatch,string.gsub,string.format,string.find,string.strip
+local gmatch,gsub,format,find,strip,match=string.gmatch,string.gsub,string.format,string.find,string.strip,string.match
local utfbyte=utf.byte
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local striplinepatterns=utilities.strings.striplinepatterns
@@ -19461,7 +19148,7 @@ local function xmltoelement(whatever,root)
end
local element
if type(whatever)=="string" then
- element=xmlinheritedconvert(whatever,root)
+ element=xmlinheritedconvert(whatever,root,true)
else
element=whatever
end
@@ -19474,15 +19161,18 @@ local function xmltoelement(whatever,root)
end
xml.toelement=xmltoelement
local function copiedelement(element,newparent)
- if type(element)=="string" then
- return element
- else
+ if type(element)~="string" then
element=xmlcopy(element).dt
if newparent and type(element)=="table" then
- element.__p__=newparent
+ for i=1,#element do
+ local e=element[i]
+ if type(e)=="table" then
+ e.__p__=newparent
+ end
+ end
end
- return element
end
+ return element
end
function xml.delete(root,pattern)
if not pattern or pattern=="" then
@@ -19521,6 +19211,32 @@ function xml.delete(root,pattern)
end
end
end
+function xml.wipe(root,pattern)
+ local collected=xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e=collected[c]
+ local p=e.__p__
+ if p then
+ local d=p.dt
+ local ni=e.ni
+ if ni<=#d then
+ local dt=e.dt
+ if #dt==1 then
+ local d1=dt[1]
+ if type(d1)=="string" and match(d1,"^%s*$") then
+ if trace_manipulations then
+ report('wiping',pattern,c,e)
+ end
+ remove(d,ni)
+ redo_ni(d)
+ end
+ end
+ end
+ end
+ end
+ end
+end
function xml.replace(root,pattern,whatever)
local element=root and xmltoelement(whatever,root)
local collected=element and xmlapplylpath(root,pattern)
@@ -19690,10 +19406,10 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
elseif ekat["parse"]=="text" then
epdt[ek.ni]=xml.escaped(data)
else
-local settings=xmldata.settings
-local savedresource=settings.currentresource
-settings.currentresource=name
- local xi=xmlinheritedconvert(data,xmldata)
+ local settings=xmldata.settings
+ local savedresource=settings.currentresource
+ settings.currentresource=name
+ local xi=xmlinheritedconvert(data,xmldata,true)
if not xi then
epdt[ek.ni]=""
else
@@ -19703,7 +19419,7 @@ settings.currentresource=name
local child=xml.body(xi)
child.__p__=ekrt
child.__f__=name
-child.cf=name
+ child.cf=name
epdt[ek.ni]=child
local settings=xmldata.settings
local inclusions=settings and settings.inclusions
@@ -19771,28 +19487,47 @@ end
local b_collapser=lpegpatterns.b_collapser
local m_collapser=lpegpatterns.m_collapser
local e_collapser=lpegpatterns.e_collapser
+local x_collapser=lpegpatterns.x_collapser
local b_stripper=lpegpatterns.b_stripper
local m_stripper=lpegpatterns.m_stripper
local e_stripper=lpegpatterns.e_stripper
-local function stripelement(e,nolines,anywhere)
+local x_stripper=lpegpatterns.x_stripper
+local function stripelement(e,nolines,anywhere,everything)
local edt=e.dt
if edt then
local n=#edt
if n==0 then
return e
+ elseif everything then
+ local t={}
+ local m=0
+ for i=1,n do
+ local str=edt[i]
+ if type(str)~="string" then
+ m=m+1
+ t[m]=str
+ elseif str~="" then
+ str=lpegmatch(x_collapser,str)
+ if str~="" then
+ m=m+1
+ t[m]=str
+ end
+ end
+ end
+ e.dt=t
elseif anywhere then
local t={}
local m=0
- for e=1,n do
- local str=edt[e]
+ for i=1,n do
+ local str=edt[i]
if type(str)~="string" then
m=m+1
t[m]=str
elseif str~="" then
if nolines then
- str=lpegmatch((n==1 and b_collapser) or (n==m and e_collapser) or m_collapser,str)
+ str=lpegmatch((i==1 and b_collapser) or (i==m and e_collapser) or m_collapser,str)
else
- str=lpegmatch((n==1 and b_stripper) or (n==m and e_stripper) or m_stripper,str)
+ str=lpegmatch((i==1 and b_stripper) or (i==m and e_stripper) or m_stripper,str)
end
if str~="" then
m=m+1
@@ -19834,14 +19569,27 @@ local function stripelement(e,nolines,anywhere)
return e
end
xml.stripelement=stripelement
-function xml.strip(root,pattern,nolines,anywhere)
+function xml.strip(root,pattern,nolines,anywhere,everything)
local collected=xmlapplylpath(root,pattern)
if collected then
for i=1,#collected do
- stripelement(collected[i],nolines,anywhere)
+ stripelement(collected[i],nolines,anywhere,everything)
+ end
+ end
+end
+local function compactelement(e)
+ local edt=e.dt
+ if edt then
+ for e=1,#edt do
+ local str=edt[e]
+ if type(str)=="string" and not find(str,"%S") then
+ edt[e]=""
+ end
end
end
+ return e
end
+xml.compactelement=compactelement
local function renamespace(root,oldspace,newspace)
local ndt=#root.dt
for i=1,ndt or 0 do
@@ -20790,7 +20538,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-ini"] = package.loaded["data-ini"] or true
--- original size: 10847, stripped down to: 7086
+-- original size: 10947, stripped down to: 7176
if not modules then modules={} end modules ['data-ini']={
version=1.001,
@@ -20836,7 +20584,8 @@ do
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//")
end
end
-do
+if not environment.homedir then
+ local oldhome=osgetenv('HOME')
local homedir=osgetenv(ostype=="windows" and 'USERPROFILE' or 'HOME') or ''
if not homedir or homedir=="" then
homedir=char(127)
@@ -20844,6 +20593,7 @@ do
homedir=file.collapsepath(homedir)
ossetenv("HOME",homedir)
ossetenv("USERPROFILE",homedir)
+ environment.oldhome=oldhome
environment.homedir=homedir
end
do
@@ -21449,7 +21199,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-env"] = package.loaded["data-env"] or true
--- original size: 9400, stripped down to: 6347
+-- original size: 9501, stripped down to: 6411
if not modules then modules={} end modules ['data-env']={
version=1.001,
@@ -21540,7 +21290,9 @@ local relations=allocate {
mp={
names={ "mp" },
variable='MPINPUTS',
- suffixes={ 'mp','mpvi','mpiv','mpxl','mpii' },
+ suffixes=CONTEXTLMTXMODE>0
+ and { 'mp','mpxl','mpvi','mpiv','mpii' }
+ or { 'mp','mpvi','mpiv','mpii' },
usertype=true,
},
tex={
@@ -21734,7 +21486,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16099, stripped down to: 11379
+-- original size: 16409, stripped down to: 11591
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -21984,7 +21736,10 @@ caches.getwritablepath=getwritablepath
caches.setfirstwritablefile=setfirstwritablefile
caches.getfirstreadablefile=getfirstreadablefile
caches.setluanames=setluanames
+local checkmemory=utilities and utilities.lua and utilities.lua.checkmemory
+local threshold=100
function caches.loaddata(readables,name,writable)
+ local used=checkmemory and checkmemory()
if type(readables)=="string" then
readables={ readables }
end
@@ -22011,7 +21766,11 @@ function caches.loaddata(readables,name,writable)
end
if loader then
loader=loader()
- collectgarbage("step")
+ if checkmemory then
+ checkmemory(used,threshold)
+ else
+ collectgarbage("step")
+ end
return loader
end
end
@@ -24110,7 +23869,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-fil"] = package.loaded["data-fil"] or true
--- original size: 4365, stripped down to: 3588
+-- original size: 4365, stripped down to: 3452
if not modules then modules={} end modules ['data-fil']={
version=1.001,
@@ -24130,7 +23889,6 @@ local scanfiles=resolvers.scanfiles
local registerfilehash=resolvers.registerfilehash
local appendhash=resolvers.appendhash
local loadcachecontent=caches.loadcontent
-local checkgarbage=utilities.garbagecollector and utilities.garbagecollector.check
function resolvers.locators.file(specification)
local filename=specification.filename
local realname=resolveprefix(filename)
@@ -24220,10 +23978,7 @@ function loaders.file(specification,filetype)
if trace_locating then
report_files("file loader: %a loaded",filename)
end
- local s=f:read("*a")
- if checkgarbage then
- checkgarbage(#s)
- end
+ local s=f:read("*a")
f:close()
if s then
return true,s,#s
@@ -24371,7 +24126,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-use"] = package.loaded["data-use"] or true
--- original size: 5790, stripped down to: 2910
+-- original size: 5785, stripped down to: 2905
if not modules then modules={} end modules ['data-use']={
version=1.001,
@@ -24387,7 +24142,7 @@ local resolvers=resolvers
local findfile=resolvers.findfile
statistics.register("used config file",function() return caches.configfiles() end)
statistics.register("used cache path",function() return caches.usedpaths() end)
-function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner)
+function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner)
local enginebanner=status.banner
if formatbanner and enginebanner and sourcefile then
local luvname=file.replacesuffix(texname,"luv")
@@ -25532,7 +25287,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["libs-ini"] = package.loaded["libs-ini"] or true
--- original size: 5822, stripped down to: 3629
+-- original size: 6459, stripped down to: 4006
if not modules then modules={} end modules ['libs-ini']={
version=1.001,
@@ -25542,7 +25297,7 @@ if not modules then modules={} end modules ['libs-ini']={
license="see context related readme files"
}
local type,unpack=type,unpack
-local type=type
+local find=string.find
local nameonly=file.nameonly
local joinfile=file.join
local addsuffix=file.addsuffix
@@ -25552,7 +25307,9 @@ local findfile=resolvers.findfile
local expandpaths=resolvers.expandedpathlistfromvariable
local report=logs.reporter("resolvers","libraries")
local trace=false
+local silent=false
trackers.register("resolvers.lib",function(v) trace=v end)
+trackers.register("resolvers.lib.silent",function(v) silent=v end)
local function findlib(required)
local suffix=os.libsuffix or "so"
if not qualifiedpath(required) then
@@ -25653,10 +25410,10 @@ function libraries.optionalloaded(name,libnames)
end
end
local initialized=thelib_initialize(unpack(libnames))
- if initialized then
- report("using library '% + t'",libnames)
- else
+ if not initialized then
report("unable to initialize library '% + t'",libnames)
+ elseif not silent then
+ report("using library '% + t'",libnames)
end
return initialized
end
@@ -25674,6 +25431,19 @@ if FFISUPPORTED and ffi and ffi.load then
end
end
end
+local dofile=dofile
+local savedrequire=require
+function require(name,version)
+ if find(name,"%.lua$") or find(name,"%.lmt$") then
+ local m=dofile(findfile(name))
+ if m then
+ package.loaded[name]=m
+ return m
+ end
+ else
+ return savedrequire(name)
+ end
+end
end -- of closure
@@ -25785,7 +25555,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 13843, stripped down to: 9991
+-- original size: 11691, stripped down to: 8350
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25836,27 +25606,26 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
- luatex=sandbox.registerrunner {
- name="make luatex format",
- program="luatex",
+ luametatex=sandbox.registerrunner {
+ name="make luametatex format",
+ program="luametatex",
template=template,
checkers=checkers,
reporter=report_format,
},
- luametatex=sandbox.registerrunner {
- name="make luametatex format",
- program="luametatex",
+ luatex=sandbox.registerrunner {
+ name="make luatex format",
+ program="luatex",
template=template,
checkers=checkers,
reporter=report_format,
@@ -25869,6 +25638,16 @@ local runners={
reporter=report_format,
},
}
+local stubfiles={
+ luametatex="luat-cod.lmt",
+ luatex="luat-cod.lua",
+ luajittex="luat-cod.lua",
+}
+local suffixes={
+ luametatex="mkxl",
+ luatex="mkiv",
+ luajittex="mkiv",
+}
local function validbinarypath()
if not environment.arguments.nobinarypath then
local path=environment.ownpath or file.dirname(environment.ownname)
@@ -25880,101 +25659,50 @@ local function validbinarypath()
end
end
end
+local function fatalerror(startupdir,...)
+ report_format(...)
+ lfs.chdir(startupdir)
+end
function environment.make_format(formatname)
local arguments=environment.arguments
local engine=environment.ownmain or "luatex"
local silent=arguments.silent
local errors=arguments.errors
- local texsourcename=""
- local texsourcepath=""
- local fulltexsourcename=""
- if engine=="luametatex" then
- texsourcename=file.addsuffix(formatname,"mkxl")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local runner=runners[engine]
+ local startupdir=dir.current()
+ if not runner then
+ return fatalerror(startupdir,"the format %a cannot be generated, no runner available for engine %a",name,engine)
end
- if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"mkiv")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local luasourcename=stubfiles[engine]
+ if not luasourcename then
+ return fatalerror(startupdir,"no lua stub file specified for %a",engine)
end
+ local texsourcename=file.addsuffix(formatname,suffixes[engine])
+ local fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"tex")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ return fatalerror(startupdir,"no tex source file with name %a (mkiv or tex)",formatname)
end
- if fulltexsourcename=="" then
- report_format("no tex source file with name %a (mkiv or tex)",formatname)
- return
- end
- report_format("using tex source file %a",fulltexsourcename)
- fulltexsourcename=dir.expandname(fulltexsourcename)
- texsourcepath=file.dirname(fulltexsourcename)
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
- end
- local specificationname="context.lus"
- local specificationpath=""
- local fullspecificationname=resolvers.findfile(specificationname) or ""
- if fullspecificationname=="" then
- report_format("unable to locate specification file %a",specificationname)
- return
- end
- report_format("using specification file %a",fullspecificationname)
- fullspecificationname=dir.expandname(fullspecificationname)
- specificationpath=file.dirname(fullspecificationname)
- if texsourcepath~=specificationpath then
- report_format("tex source file and specification file are on different paths")
- return
- end
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
+ local fulltexsourcename=dir.expandname(fulltexsourcename)
+ local texsourcepath=file.dirname(fulltexsourcename)
+ if lfs.isfile(fulltexsourcename) then
+ report_format("using tex source file %a",fulltexsourcename)
+ else
+ return fatalerror(startupdir,"no accessible tex source file with name %a",fulltexsourcename)
end
- if not lfs.isfile(fullspecificationname) then
- report_format("no accessible specification file with name %a",fulltexsourcename)
- return
+ local fullluasourcename=dir.expandname(file.join(texsourcepath,luasourcename) or "")
+ if lfs.isfile(fullluasourcename) then
+ report_format("using lua stub file %a",fullluasourcename)
+ else
+ return fatalerror(startupdir,"no accessible lua stub file with name %a",fulltexsourcename)
end
- report_format("using tex source path %a",texsourcepath)
local validformatpath=caches.getwritablepath("formats",engine) or ""
- local startupdir=dir.current()
if validformatpath=="" then
- report_format("invalid format path, insufficient write access")
- return
+ return fatalerror(startupdir,"invalid format path, insufficient write access")
end
local binarypath=validbinarypath()
report_format("changing to format path %a",validformatpath)
- lfs.chdir(validformatpath)
- if dir.current()~=validformatpath then
- report_format("unable to change to format path %a",validformatpath)
- return
- end
- local usedluastub=nil
- local usedlualibs=dofile(fullspecificationname)
- if type(usedlualibs)=="string" then
- usedluastub=file.join(specificationpath,usedlualibs)
- elseif type(usedlualibs)=="table" then
- report_format("using stub specification %a",fullspecificationname)
- local texbasename=file.basename(name)
- local luastubname=file.addsuffix(texbasename,luasuffixes.lua)
- local lucstubname=file.addsuffix(texbasename,luasuffixes.luc)
- report_format("creating initialization file %a",luastubname)
- utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
- if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- report_format("using compiled initialization file %a",lucstubname)
- usedluastub=lucstubname
- else
- report_format("using uncompiled initialization file %a",luastubname)
- usedluastub=luastubname
- end
- else
- report_format("invalid stub specification %a",fullspecificationname)
- lfs.chdir(startupdir)
- return
- end
- local runner=runners[engine]
- if not runner then
- report_format("the format %a cannot be generated, no runner available for engine %a",name,engine)
- lfs.chdir(startupdir)
- return
+ if not lfs.chdir(validformatpath) then
+ return fatalerror(startupdir,"unable to change to format path %a",validformatpath)
end
local primaryflags=primaryflags(arguments)
local secondaryflags=secondaryflags(arguments)
@@ -25982,9 +25710,8 @@ function environment.make_format(formatname)
binarypath=binarypath,
primaryflags=primaryflags,
secondaryflags=secondaryflags,
- luafile=quoted(usedluastub),
+ luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26001,7 +25728,7 @@ function environment.make_format(formatname)
end
report_format("format path : %s",validformatpath)
report_format("luatex engine : %s",engine)
- report_format("lua startup file : %s",usedluastub)
+ report_format("lua startup file : %s",fullluasourcename)
if primaryflags~="" then
report_format("primary flags : %s",primaryflags)
end
@@ -26083,9 +25810,9 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
luafile=quoted(scriptname),
texfile=filename~="" and quoted(filename) or "",
}
- statistics.starttiming()
+ statistics.starttiming("make format")
local result=runner(specification)
- local runtime=statistics.stoptiming()
+ statistics.stoptiming("make format")
if verbose then
report_format()
if binarypath and binarypath~="" then
@@ -26103,7 +25830,7 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
if secondaryflags~="" then
report_format("secondary flags : %s",secondaryflags)
end
- report_format("run time : %.3f seconds",runtime)
+ report_format("run time : %0.3f seconds",statistics.elapsed("make format"))
report_format("return value : %s",result==0 and "okay" or "error")
report_format()
end
@@ -26115,8 +25842,8 @@ end -- of closure
-- 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 : 1038373
--- stripped bytes : 409980
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
@@ -26771,12 +26498,14 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
end
function runners.save_script_session(filename, list)
- local t = { }
- for i=1,#list do
- local key = list[i]
- t[key] = environment.arguments[key]
+ if type(list) == "table" then
+ local t = { }
+ for i=1,#list do
+ local key = list[i]
+ t[key] = environment.arguments[key]
+ end
+ io.savedata(filename,table.serialize(t,true))
end
- io.savedata(filename,table.serialize(t,true))
end
function runners.load_script_session(filename)
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 13d5e83641f..44a604e48ac 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,12 +1,12 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 57772 2021-02-17 19:01:36Z karl $
+# $Id: tlmgr.pl 57970 2021-02-27 14:17:34Z siepo $
#
# Copyright 2008-2021 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 57772 $';
-my $datrev = '$Date: 2021-02-17 20:01:36 +0100 (Wed, 17 Feb 2021) $';
+my $svnrev = '$Revision: 57970 $';
+my $datrev = '$Date: 2021-02-27 15:17:34 +0100 (Sat, 27 Feb 2021) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
@@ -21,7 +21,6 @@ $datrev =~ s/ \(.*$//;
$tlmgrversion = "$tlmgrrevision ($datrev)";
our $Master;
-our $ismain;
our $loadmediasrcerror;
our $packagelogfile;
our $packagelogged;
@@ -41,12 +40,6 @@ END {
BEGIN {
$^W = 1;
- $ismain = (__FILE__ eq $0);
- # WARNING
- # The only use anticipated for tlmgr.pl as library for the 2009 release
- # is the Windows w32client prototype script.
- # Unix-specific problems with use as library will probably go undetected.
-
# make subprograms (including kpsewhich) have the right path:
my $kpsewhichname;
if ($^O =~ /^MSWin/i) {
@@ -61,14 +54,8 @@ BEGIN {
} else {
$Master = __FILE__;
$Master =~ s,/*[^/]*$,,;
- if ($ismain) {
- $bindir = $Master;
- $Master = "$Master/../..";
- } else {
- # for the time being, this code will not be used or tested
- $Master = "$Master/../../..";
- # no code yet for $bindir; would have to detect platform
- }
+ $bindir = $Master;
+ $Master = "$Master/../..";
# make subprograms (including kpsewhich) have the right path:
$ENV{"PATH"} = "$bindir:$ENV{PATH}";
$kpsewhichname = "kpsewhich";
@@ -374,7 +361,7 @@ my %globaloptions = (
"version" => 1,
);
-main() if $ismain;
+main();
### main ##################################################################
@@ -438,6 +425,12 @@ sub main {
}
ddebug("arguments: @ARGV\n") if @ARGV;
+ # prepare for loading of lang.pl which expects $::lang and $::opt_lang
+ $::opt_lang = $config{"gui-lang"} if (defined($config{"gui-lang"}));
+ $::opt_lang = $opts{"gui-lang"} if (defined($opts{"gui-lang"}));
+ require("TeXLive/trans.pl");
+ load_translations();
+
if ($opts{"version"} || (defined $action && $action eq "version")) {
if ($::machinereadable) {
# give_version already is machinereadable aware
@@ -10117,7 +10110,7 @@ This script and its documentation were written for the TeX Live
distribution (L<https://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 57772 2021-02-17 19:01:36Z karl $
+$Id: tlmgr.pl 57970 2021-02-27 14:17:34Z siepo $
=cut
# test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html
diff --git a/Build/source/texk/texlive/linked_scripts/tlshell/tlshell.tcl b/Build/source/texk/texlive/linked_scripts/tlshell/tlshell.tcl
index 1afe782355b..c81a713f360 100755
--- a/Build/source/texk/texlive/linked_scripts/tlshell/tlshell.tcl
+++ b/Build/source/texk/texlive/linked_scripts/tlshell/tlshell.tcl
@@ -1,6 +1,8 @@
-#!/usr/bin/env wish
+#!/bin/sh
+# next line ignored by wish but not by sh \
+TK_SILENCE_DEPRECATION=1 exec wish "$0" "$@"
-# Copyright 2017-2020 Siep Kroonenberg
+# Copyright 2017-2021 Siep Kroonenberg
# This file is licensed under the GNU General Public License version 2
# or any later version.
diff --git a/Master/bin/win32/mtxrun.lua b/Master/bin/win32/mtxrun.lua
index 6eaf5ff449f..6fc17adb022 100755
--- a/Master/bin/win32/mtxrun.lua
+++ b/Master/bin/win32/mtxrun.lua
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -852,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11605, stripped down to: 8299
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -861,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -891,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -907,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1040,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1082,11 +1087,18 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
methods["preload table"]=function(name)
- return builtin["preload table"](name)
+ local f=builtin["preload table"]
+ if f then
+ return f(name)
+ end
end
methods["qualified path"]=function(name)
return loadedbyname(addsuffix(lualibfile(name),"lua"),name)
@@ -1098,19 +1110,31 @@ methods["lib extra list"]=function(name)
return loadedbypath(addsuffix(lualibfile(name),os.libsuffix),name,getextralibpaths(),true,"lib")
end
methods["path specification"]=function(name)
- getluapaths()
- return builtin["path specification"](name)
+ local f=builtin["path specification"]
+ if f then
+ getluapaths()
+ return f(name)
+ end
end
methods["cpath specification"]=function(name)
- getlibpaths()
- return builtin["cpath specification"](name)
+ local f=builtin["cpath specification"]
+ if f then
+ getlibpaths()
+ return f(name)
+ end
end
methods["all in one fallback"]=function(name)
- return builtin["all in one fallback"](name)
+ local f=builtin["all in one fallback"]
+ if f then
+ return f(name)
+ end
end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -1122,19 +1146,22 @@ function helpers.loaded(name)
level=level+1
for i=1,#sequence do
local method=sequence[i]
- if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
- end
- local result,rest=methods[method](name)
- if type(result)=="function" then
+ local lookup=method and methods[method]
+ if type(lookup)=="function" then
if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
end
- if helpers.traceused then
- used[#used+1]={ level=level,name=name }
+ local result,rest=lookup(name)
+ if type(result)=="function" then
+ if helpers.trace then
+ helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
+ level=level-1
+ return result,rest
end
- level=level-1
- return result,rest
end
end
level=level-1
@@ -1174,7 +1201,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 38440, stripped down to: 19316
+-- original size: 38703, stripped down to: 19489
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1272,11 +1299,13 @@ local fullstripper=whitespace^0*C((whitespace^0*nonwhitespace^1)^0)
local collapser=Cs(spacer^0/""*nonspacer^0*((spacer^0/" "*nonspacer^1)^0))
local nospacer=Cs((whitespace^1/""+nonwhitespace^1)^0)
local b_collapser=Cs(whitespace^0/""*(nonwhitespace^1+whitespace^1/" ")^0)
-local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
local m_collapser=Cs((nonwhitespace^1+whitespace^1/" ")^0)
+local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
+local x_collapser=Cs((nonwhitespace^1+whitespace^1/"" )^0)
local b_stripper=Cs(spacer^0/""*(nonspacer^1+spacer^1/" ")^0)
-local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
local m_stripper=Cs((nonspacer^1+spacer^1/" ")^0)
+local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
+local x_stripper=Cs((nonspacer^1+spacer^1/"" )^0)
patterns.stripper=stripper
patterns.fullstripper=fullstripper
patterns.collapser=collapser
@@ -1284,9 +1313,11 @@ patterns.nospacer=nospacer
patterns.b_collapser=b_collapser
patterns.m_collapser=m_collapser
patterns.e_collapser=e_collapser
+patterns.x_collapser=x_collapser
patterns.b_stripper=b_stripper
patterns.m_stripper=m_stripper
patterns.e_stripper=e_stripper
+patterns.x_stripper=x_stripper
patterns.lowercase=lowercase
patterns.uppercase=uppercase
patterns.letter=patterns.lowercase+patterns.uppercase
@@ -3806,7 +3837,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 19120, stripped down to: 10208
+-- original size: 19409, stripped down to: 10419
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4029,6 +4060,8 @@ elseif name=="macosx" then
platform="osx-intel"
elseif find(architecture,"x86_64",1,true) then
platform="osx-64"
+ elseif find(architecture,"arm64",1,true) then
+ platform="osx-64"
else
platform="osx-ppc"
end
@@ -4200,11 +4233,19 @@ local function isleapyear(year)
end
os.isleapyear=isleapyear
local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
-local function nofdays(year,month)
+local function nofdays(year,month,day)
if not month then
return isleapyear(year) and 365 or 364
- else
+ elseif not day then
return month==2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day=day+days[i]
+ end
+ if month>2 and isleapyear(year) then
+ day=day+1
+ end
+ return day
end
end
os.nofdays=nofdays
@@ -5729,10 +5770,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-unicode"] = package.loaded["l-unicode"] or true
--- original size: 41281, stripped down to: 17261
+-- original size: 41303, stripped down to: 17277
if not modules then modules={} end modules ['l-unicode']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -6563,7 +6605,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 45153, stripped down to: 22734
+-- original size: 45129, stripped down to: 23525
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -6615,25 +6657,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -6911,7 +6987,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -7106,10 +7184,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -7219,33 +7305,36 @@ local format_extension=function(extensions,f,name)
local extension=extensions[name] or "tostring(%s)"
local f=tonumber(f) or 1
local w=find(extension,"%.%.%.")
- if w then
- if f==0 then
+ if f==0 then
+ if w then
extension=gsub(extension,"%.%.%.","")
- return extension
- elseif f==1 then
+ end
+ return extension
+ elseif f==1 then
+ if w then
extension=gsub(extension,"%.%.%.","%%s")
- n=n+1
- local a="a"..n
- return format(extension,a,a)
- elseif f<0 then
+ end
+ n=n+1
+ local a="a"..n
+ return format(extension,a,a)
+ elseif f<0 then
+ if w then
+ extension=gsub(extension,"%.%.%.","")
+ return extension
+ else
local a="a"..(n+f+1)
return format(extension,a,a)
- else
- extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- local t={}
- for i=1,f do
- n=n+1
- t[i]="a"..n
- end
- return format(extension,unpack(t))
end
else
- extension=gsub(extension,"%%s",function()
+ if w then
+ extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ local t={}
+ for i=1,f do
n=n+1
- return "a"..n
- end)
- return extension
+ t[i]="a"..n
+ end
+ return format(extension,unpack(t))
end
end
local builder=Cs { "start",
@@ -7259,7 +7348,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -7297,7 +7386,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -7448,7 +7539,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 32649, stripped down to: 18257
+-- original size: 32815, stripped down to: 18257
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8194,10 +8285,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 11530, stripped down to: 9007
+-- original size: 11552, stripped down to: 9023
if not modules then modules={} end modules ['util-fil']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -8562,10 +8654,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 12946, stripped down to: 9507
+-- original size: 12968, stripped down to: 9523
if not modules then modules={} end modules ['util-sac']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -9215,7 +9308,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 24132, stripped down to: 16210
+-- original size: 24683, stripped down to: 16431
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9228,7 +9321,7 @@ local lpeg,table,string=lpeg,table,string
local P,R,V,S,C,Ct,Cs,Carg,Cc,Cg,Cf,Cp=lpeg.P,lpeg.R,lpeg.V,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.Carg,lpeg.Cc,lpeg.Cg,lpeg.Cf,lpeg.Cp
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local concat,gmatch,find=table.concat,string.gmatch,string.find
-local tostring,type,next,rawset=tostring,type,next,rawset
+local tonumber,tostring,type,next,rawset=tonumber,tostring,type,next,rawset
local mod,div=math.mod,math.div
utilities=utilities or {}
local parsers=utilities.parsers or {}
@@ -9620,13 +9713,15 @@ function parsers.csvsplitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
local separator=specification.separator
local quotechar=specification.quote
+ local numbers=specification.numbers
local separator=S(separator~="" and separator or ",")
local whatever=C((1-separator-newline)^0)
if quotechar and quotechar~="" then
local quotedata=nil
for chr in gmatch(quotechar,".") do
local quotechar=P(chr)
- local quoteword=quotechar*C((1-quotechar)^0)*quotechar
+ local quoteitem=(1-quotechar)^0
+ local quoteword=quotechar*(numbers and (quoteitem/tonumber) or C(quoteitem))*quotechar
if quotedata then
quotedata=quotedata+quoteword
else
@@ -9642,12 +9737,14 @@ function parsers.csvsplitter(specification)
end
function parsers.rfc4180splitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
+ local numbers=specification.numbers
local separator=specification.separator
local quotechar=P(specification.quote)
local dquotechar=quotechar*quotechar
/specification.quote
local separator=S(separator~="" and separator or ",")
- local escaped=quotechar*Cs((dquotechar+(1-quotechar))^0)*quotechar
+ local whatever=(dquotechar+(1-quotechar))^0
+ local escaped=quotechar*(numbers and (whatever/tonumber) or Cs(whatever))*quotechar
local non_escaped=C((1-quotechar-newline-separator)^1)
local field=escaped+non_escaped+Cc("")
local record=Ct(field*(separator*field)^1)
@@ -11718,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11763,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11773,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11799,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11810,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -12712,7 +12809,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-set"] = package.loaded["trac-set"] or true
--- original size: 13394, stripped down to: 8882
+-- original size: 13901, stripped down to: 9175
if not modules then modules={} end modules ['trac-set']={
version=1.001,
@@ -12735,7 +12832,7 @@ utilities.setters=setters
local data={}
local trace_initialize=false
local frozen=true
-function setters.initialize(filename,name,values)
+local function initialize_setter(filename,name,values)
local setter=data[name]
if setter then
local data=setter.data
@@ -12776,8 +12873,8 @@ function setters.initialize(filename,name,values)
end
end
local function set(t,what,newvalue)
- local data=t.data
- if not data.frozen then
+ local data=t.data
+ if data and not data.frozen then
local done=t.done
if type(what)=="string" then
what=settings_to_hash(what)
@@ -12813,7 +12910,7 @@ local function set(t,what,newvalue)
end
local function reset(t)
local data=t.data
- if not data.frozen then
+ if data and not data.frozen then
for name,functions in sortedthash(data) do
for i=1,#functions do
functions[i](false)
@@ -12834,7 +12931,7 @@ local function disable(t,what)
set(t,what,false)
end
end
-function setters.register(t,what,...)
+local function register_setter(t,what,...)
local data=t.data
what=lower(what)
local functions=data[what]
@@ -12869,23 +12966,24 @@ function setters.register(t,what,...)
end
return false
end
-function setters.enable(t,what)
+local function enable_setter(t,what)
local e=t.enable
t.enable,t.done=enable,{}
+ set(t,what,true)
enable(t,what)
t.enable,t.done=e,{}
end
-function setters.disable(t,what)
+local function disable_setter(t,what)
local e=t.disable
t.disable,t.done=disable,{}
disable(t,what)
t.disable,t.done=e,{}
end
-function setters.reset(t)
+local function reset_setter(t)
t.done={}
reset(t)
end
-function setters.list(t)
+local function list_setter(t)
local list=table.sortedkeys(t.data)
local user,system={},{}
for l=1,#list do
@@ -12898,8 +12996,8 @@ function setters.list(t)
end
return user,system
end
-function setters.show(t)
- local list=setters.list(t)
+local function show_setter(t)
+ local list=list_setter(t)
t.report()
for k=1,#list do
local name=list[k]
@@ -12930,39 +13028,50 @@ function setters.show(t)
end
end
end
-local enable,disable,register,list,show=setters.enable,setters.disable,setters.register,setters.list,setters.show
function setters.report(setter,fmt,...)
- print(formatters["%-15s : %s\n"](setter.name,formatters[fmt](...)))
+ if fmt then
+ print(formatters["%-15s : %s"](setter.name,formatters[fmt](...)))
+ else
+ print("")
+ end
end
-local function default(setter,name)
+local function setter_default(setter,name)
local d=setter.data[name]
return d and d.default
end
-local function value(setter,name)
+local function setter_value(setter,name)
local d=setter.data[name]
return d and (d.value or d.default)
end
-function setters.new(name)
+local function new_setter(name)
local setter
setter={
data=allocate(),
name=name,
- report=function(...) setters.report (setter,...) end,
- enable=function(...) enable (setter,...) end,
- disable=function(...) disable (setter,...) end,
- reset=function(...) reset (setter,...) end,
- register=function(...) register(setter,...) end,
- list=function(...) return list (setter,...) end,
- show=function(...) show (setter,...) end,
- default=function(...) return default (setter,...) end,
- value=function(...) return value (setter,...) end,
+ report=function(...) setters.report (setter,...) end,
+ enable=function(...) enable_setter (setter,...) end,
+ disable=function(...) disable_setter (setter,...) end,
+ reset=function(...) reset_setter (setter,...) end,
+ register=function(...) register_setter(setter,...) end,
+ list=function(...) return list_setter (setter,...) end,
+ show=function(...) show_setter (setter,...) end,
+ default=function(...) return setter_default (setter,...) end,
+ value=function(...) return setter_value (setter,...) end,
}
data[name]=setter
return setter
end
-trackers=setters.new("trackers")
-directives=setters.new("directives")
-experiments=setters.new("experiments")
+setters.enable=enable_setter
+setters.disable=disable_setter
+setters.register=register_setter
+setters.list=list_setter
+setters.show=show_setter
+setters.reset=reset_setter
+setters.new=new_setter
+setters.initialize=initialize_setter
+trackers=new_setter("trackers")
+directives=new_setter("directives")
+experiments=new_setter("experiments")
local t_enable,t_disable=trackers .enable,trackers .disable
local d_enable,d_disable=directives .enable,directives .disable
local e_enable,e_disable=experiments.enable,experiments.disable
@@ -13009,11 +13118,11 @@ if environment then
if engineflags then
local list=engineflags["c:trackers"] or engineflags["trackers"]
if type(list)=="string" then
- setters.initialize("commandline flags","trackers",settings_to_hash(list))
+ initialize_setter("commandline flags","trackers",settings_to_hash(list))
end
local list=engineflags["c:directives"] or engineflags["directives"]
if type(list)=="string" then
- setters.initialize("commandline flags","directives",settings_to_hash(list))
+ initialize_setter("commandline flags","directives",settings_to_hash(list))
end
end
end
@@ -13055,7 +13164,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 33003, stripped down to: 21667
+-- original size: 16017, stripped down to: 11045
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13071,9 +13180,8 @@ local topattern=string.topattern
local utfchar=utf.char
local datetime=os.date
local openfile=io.open
-local runningtex=tex and (tex.jobname or tex.formatname)
-local write_nl=runningtex and texio and texio.write_nl or print
-local write=runningtex and texio and texio.write or io.write
+local write_nl=print
+local write=io.write
local setmetatableindex=table.setmetatableindex
local formatters=string.formatters
local settings_to_hash=utilities.parsers.settings_to_hash
@@ -13109,273 +13217,7 @@ local function ansisupported(specification)
return false
end
end
-if runningtex and texio then
- if texio.setescape then
- texio.setescape(0)
- end
- if arg and ansisupported then
- for k,v in next,arg do
- if v=="--ansi" or v=="--c:ansi" then
- if ansisupported("ansi") then
- variant="ansi"
- end
- break
- elseif v=="--ansilog" or v=="--c:ansilog" then
- if ansisupported("ansilog") then
- variant="ansilog"
- end
- break
- end
- end
- end
- local function useluawrites()
- local texio_write_nl=texio.write_nl
- local texio_write=texio.write
- local io_write=io.write
- write_nl=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write_nl("log",...)
- texio_write_nl("term","")
- io_write(...)
- elseif target=="log" then
- texio_write_nl("log",...)
- elseif target=="term" then
- texio_write_nl("term","")
- io_write(...)
- elseif type(target)=="number" then
- texio_write_nl(target,...)
- elseif target~="none" then
- texio_write_nl("log",target,...)
- texio_write_nl("term","")
- io_write(target,...)
- end
- end
- write=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write("log",...)
- io_write(...)
- elseif target=="log" then
- texio_write("log",...)
- elseif target=="term" then
- io_write(...)
- elseif type(target)=="number" then
- texio_write(target,...)
- elseif target~="none" then
- texio_write("log",target,...)
- io_write(target,...)
- end
- end
- texio.write=write
- texio.write_nl=write_nl
- useluawrites=ignore
- end
- local whereto="both"
- local target=nil
- local targets=nil
- local formats=table.setmetatableindex("self")
- local translations=table.setmetatableindex("self")
- local report_yes,subreport_yes,direct_yes,subdirect_yes,status_yes
- local report_nop,subreport_nop,direct_nop,subdirect_nop,status_nop
- local variants={
- default={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="log",
- log="log",
- file="log",
- console="term",
- terminal="term",
- both="term and log",
- },
- },
- ansi={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="none",
- log="none",
- file="none",
- console="term",
- terminal="term",
- both="term",
- },
- }
- }
- variants.ansilog={
- formats=variants.ansi.formats,
- targets=variants.default.targets,
- }
- logs.flush=io.flush
- writer=function(...)
- write_nl(target,...)
- end
- newline=function()
- write_nl(target,"\n")
- end
- report=function(a,b,c,...)
- if c~=nil then
- write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,report_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,report_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- direct=function(a,b,c,...)
- if c~=nil then
- return direct_yes(translations[a],formatters[formats[b]](c,...))
- elseif b then
- return direct_yes(translations[a],formats[b])
- elseif a then
- return direct_nop(translations[a])
- else
- return ""
- end
- end
- subreport=function(a,s,b,c,...)
- if c~=nil then
- write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
- elseif a then
- write_nl(target,subreport_nop(translations[a],translations[s]))
- else
- write_nl(target,"\n")
- end
- end
- subdirect=function(a,s,b,c,...)
- if c~=nil then
- return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
- elseif b then
- return subdirect_yes(translations[a],translations[s],formats[b])
- elseif a then
- return subdirect_nop(translations[a],translations[s])
- else
- return ""
- end
- end
- status=function(a,b,c,...)
- if c~=nil then
- write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,status_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,status_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- settarget=function(askedwhereto)
- whereto=askedwhereto or whereto or "both"
- target=targets[whereto]
- if not target then
- whereto="both"
- target=targets[whereto]
- end
- if target=="term" or target=="term and log" then
- logs.flush=io.flush
- else
- logs.flush=ignore
- end
- end
- local stack={}
- pushtarget=function(newtarget)
- insert(stack,target)
- settarget(newtarget)
- end
- poptarget=function()
- if #stack>0 then
- settarget(remove(stack))
- end
- end
- setformats=function(f)
- formats=f
- end
- settranslations=function(t)
- translations=t
- end
- setprocessor=function(f)
- local writeline=write_nl
- write_nl=function(target,...)
- writeline(target,f(...))
- end
- end
- setformatters=function(specification)
- local t=nil
- local f=nil
- local d=variants.default
- if not specification then
- elseif type(specification)=="table" then
- t=specification.targets
- f=specification.formats or specification
- else
- if not ansisupported(specification) then
- specification="default"
- end
- local v=variants[specification]
- if v then
- t=v.targets
- f=v.formats
- variant=specification
- end
- end
- targets=t or d.targets
- target=targets[whereto] or target
- if f then
- d=d.formats
- else
- f=d.formats
- d=f
- end
- setmetatableindex(f,d)
- report_yes=f.report_yes
- report_nop=f.report_nop
- subreport_yes=f.subreport_yes
- subreport_nop=f.subreport_nop
- direct_yes=f.direct_yes
- direct_nop=f.direct_nop
- subdirect_yes=f.subdirect_yes
- subdirect_nop=f.subdirect_nop
- status_yes=f.status_yes
- status_nop=f.status_nop
- if variant=="ansi" or variant=="ansilog" then
- useluawrites()
- end
- settarget(whereto)
- end
- setformatters(variant)
- setlogfile=ignore
- settimedlog=ignore
-else
+do
local report_yes,subreport_yes,status_yes
local report_nop,subreport_nop,status_nop
local variants={
@@ -13675,46 +13517,6 @@ end)
directives.register("logs.target",function(v)
settarget(v)
end)
-if tex then
- local report=logs.reporter("pages")
- local texgetcount=tex and tex.getcount
- local real,user,sub=0,0,0
- function logs.start_page_number()
- real=texgetcount("realpageno")
- user=texgetcount("userpageno")
- sub=texgetcount("subpageno")
- end
- local timing=false
- local lasttime=nil
- trackers.register("pages.timing",function(v)
- timing=""
- end)
- function logs.stop_page_number()
- if timing then
- local elapsed=statistics.currenttime(statistics)
- local average,page
- if not lasttime or real<2 then
- average=elapsed
- page=elapsed
- else
- average=elapsed/(real-1)
- page=elapsed-lasttime
- end
- lasttime=elapsed
- timing=formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
- end
- if real<=0 then
- report("flushing page%s",timing)
- elseif user<=0 then
- report("flushing realpage %s%s",real,timing)
- elseif sub<=0 then
- report("flushing realpage %s, userpage %s%s",real,user,timing)
- else
- report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
- end
- logs.flush()
- end
-end
local nesting=0
local verbose=false
local hasscheme=url.hasscheme
@@ -13826,133 +13628,12 @@ function logs.system(whereto,process,jobname,category,fmt,arg,...)
end
end
local report_system=logs.reporter("system","logs")
-function logs.obsolete(old,new)
- local o=loadstring("return "..new)()
- if type(o)=="function" then
- return function(...)
- report_system("function %a is obsolete, use %a",old,new)
- loadstring(old.."="..new.." return "..old)()(...)
- end
- elseif type(o)=="table" then
- local t,m={},{}
- m.__index=function(t,k)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- return o[k]
- end
- m.__newindex=function(t,k,v)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- o[k]=v
- end
- if libraries then
- libraries.obsolete[old]=t
- end
- setmetatable(t,m)
- return t
- end
-end
if utilities then
utilities.report=report_system
end
-if tex and tex.error then
- function logs.texerrormessage(...)
- tex.error(format(...))
- end
-else
- function logs.texerrormessage(...)
- print(format(...))
- end
-end
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
-if tex then
- local finalactions={}
- local fatalerrors={}
- local possiblefatal={}
- local loggingerrors=false
- function logs.loggingerrors()
- return loggingerrors
- end
- directives.register("logs.errors",function(v)
- loggingerrors=v
- if type(v)=="string" then
- fatalerrors=settings_to_hash(v)
- else
- fatalerrors={}
- end
- end)
- function logs.registerfinalactions(...)
- insert(finalactions,...)
- end
- local what=nil
- local report=nil
- local state=nil
- local target=nil
- local function startlogging(t,r,w,s)
- target=t
- state=force
- force=true
- report=type(r)=="function" and r or logs.reporter(r)
- what=w
- pushtarget(target)
- newline()
- if s then
- report("start %s: %s",what,s)
- else
- report("start %s",what)
- end
- if target=="logfile" then
- newline()
- end
- return report
- end
- local function stoplogging()
- if target=="logfile" then
- newline()
- end
- report("stop %s",what)
- if target=="logfile" then
- newline()
- end
- poptarget()
- state=oldstate
- end
- function logs.startfilelogging(...)
- return startlogging("logfile",...)
- end
- logs.stopfilelogging=stoplogging
- local done=false
- function logs.starterrorlogging(r,w,...)
- if not done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","start possible issues")
- poptarget()
- done=true
- end
- if fatalerrors[w] then
- possiblefatal[w]=true
- end
- return startlogging("terminal",r,w,...)
- end
- logs.stoperrorlogging=stoplogging
- function logs.finalactions()
- if #finalactions>0 then
- for i=1,#finalactions do
- finalactions[i]()
- end
- if done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","stop possible issues")
- poptarget()
- end
- return next(possiblefatal) and sortedkeys(possiblefatal) or false
- end
- end
-end
end -- of closure
@@ -13961,7 +13642,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10184, stripped down to: 7500
+-- original size: 9740, stripped down to: 7296
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14055,10 +13736,8 @@ local function stoptiming(instance)
timer.loadtime=timer.loadtime+loadtime
timer.timing=0
timer.starttime=0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
local timer=timers[instance or "notimer"]
@@ -14135,18 +13814,11 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
- register("control sequences",function()
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
+ register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
register("callbacks",statistics.callbacks)
@@ -14160,15 +13832,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14224,6 +13891,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -15920,7 +15594,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-env"] = package.loaded["luat-env"] or true
--- original size: 6551, stripped down to: 4315
+-- original size: 6267, stripped down to: 4115
if not modules then modules={} end modules ['luat-env']={
version=1.001,
@@ -15948,14 +15622,6 @@ local mt={
else
return "unknown"
end
- elseif k=="kind" then
- local kind=texgettoks and texgettoks("contextkindtoks")
- if kind and kind~="" then
- rawset(environment,"kind",kind)
- return kind
- else
- return "unknown"
- end
elseif k=="jobname" or k=="formatname" then
local name=tex and tex[k]
if name or name=="" then
@@ -16530,7 +16196,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 61191, stripped down to: 35864
+-- original size: 61808, stripped down to: 36227
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17523,12 +17189,25 @@ local function xmlconvert(data,settings)
end
end
xml.convert=xmlconvert
-function xml.inheritedconvert(data,xmldata)
+function xml.inheritedconvert(data,xmldata,cleanup)
local settings=xmldata.settings
if settings then
settings.parent_root=xmldata
end
- local xc=xmlconvert(data,settings)
+ local xc=xmlconvert(data,settings)
+ if cleanup then
+ local x=xc.dt
+ if x then
+ x=x[1]
+ if x and x.tg=="@pi@" then
+ local dt=x.dt
+ local pi=dt and dt[1]
+ if type(pi)=="string" and find(pi,"^xml") then
+ remove(dt,1)
+ end
+ end
+ end
+ end
return xc
end
function xml.is_valid(root)
@@ -17586,9 +17265,17 @@ local function copy(old,p)
new[k]=t
elseif k=="dt" then
v.__p__=nil
- v=copy(v,new)
- new[k]=v
- v.__p__=p
+ local t={}
+ for i=1,#v do
+ local vi=v[i]
+ if type(vi)=="table" then
+ t[i]=copy(vi,new)
+ else
+ t[i]=vi
+ end
+ end
+ new[k]=t
+ t.__p__=p
else
new[k]=v
end
@@ -17992,7 +17679,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54626, stripped down to: 31255
+-- original size: 54667, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -18487,7 +18174,7 @@ local builtin={
local lp_builtin=lpeg.utfchartabletopattern(builtin)/builtin*((spaces*P("(")*spaces*P(")"))/"")
local lp_attribute=(P("@")+P("attribute::"))/""*Cc("(ll.at and ll.at['")*((R("az","AZ")+S("-_:"))^1)*Cc("'])")
local lp_fastpos_p=P("+")^0*R("09")^1*P(-1)/"l==%0"
-local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0==l))"
+local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0+1==l))"
local lp_fastpos=lp_fastpos_n+lp_fastpos_p
local lp_reserved=C("and")+C("or")+C("not")+C("div")+C("mod")+C("true")+C("false")
local lp_lua_function=Cs((R("az","AZ","__")^1*(P(".")*R("az","AZ","__")^1)^1)*("("))/"%0"
@@ -19312,7 +18999,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 30771, stripped down to: 19680
+-- original size: 33708, stripped down to: 20953
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -19330,7 +19017,7 @@ local xmlinheritedconvert=xml.inheritedconvert
local xmlapplylpath=xml.applylpath
local type,next,setmetatable,getmetatable=type,next,setmetatable,getmetatable
local insert,remove,fastcopy,concat=table.insert,table.remove,table.fastcopy,table.concat
-local gmatch,gsub,format,find,strip=string.gmatch,string.gsub,string.format,string.find,string.strip
+local gmatch,gsub,format,find,strip,match=string.gmatch,string.gsub,string.format,string.find,string.strip,string.match
local utfbyte=utf.byte
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local striplinepatterns=utilities.strings.striplinepatterns
@@ -19461,7 +19148,7 @@ local function xmltoelement(whatever,root)
end
local element
if type(whatever)=="string" then
- element=xmlinheritedconvert(whatever,root)
+ element=xmlinheritedconvert(whatever,root,true)
else
element=whatever
end
@@ -19474,15 +19161,18 @@ local function xmltoelement(whatever,root)
end
xml.toelement=xmltoelement
local function copiedelement(element,newparent)
- if type(element)=="string" then
- return element
- else
+ if type(element)~="string" then
element=xmlcopy(element).dt
if newparent and type(element)=="table" then
- element.__p__=newparent
+ for i=1,#element do
+ local e=element[i]
+ if type(e)=="table" then
+ e.__p__=newparent
+ end
+ end
end
- return element
end
+ return element
end
function xml.delete(root,pattern)
if not pattern or pattern=="" then
@@ -19521,6 +19211,32 @@ function xml.delete(root,pattern)
end
end
end
+function xml.wipe(root,pattern)
+ local collected=xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e=collected[c]
+ local p=e.__p__
+ if p then
+ local d=p.dt
+ local ni=e.ni
+ if ni<=#d then
+ local dt=e.dt
+ if #dt==1 then
+ local d1=dt[1]
+ if type(d1)=="string" and match(d1,"^%s*$") then
+ if trace_manipulations then
+ report('wiping',pattern,c,e)
+ end
+ remove(d,ni)
+ redo_ni(d)
+ end
+ end
+ end
+ end
+ end
+ end
+end
function xml.replace(root,pattern,whatever)
local element=root and xmltoelement(whatever,root)
local collected=element and xmlapplylpath(root,pattern)
@@ -19690,10 +19406,10 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
elseif ekat["parse"]=="text" then
epdt[ek.ni]=xml.escaped(data)
else
-local settings=xmldata.settings
-local savedresource=settings.currentresource
-settings.currentresource=name
- local xi=xmlinheritedconvert(data,xmldata)
+ local settings=xmldata.settings
+ local savedresource=settings.currentresource
+ settings.currentresource=name
+ local xi=xmlinheritedconvert(data,xmldata,true)
if not xi then
epdt[ek.ni]=""
else
@@ -19703,7 +19419,7 @@ settings.currentresource=name
local child=xml.body(xi)
child.__p__=ekrt
child.__f__=name
-child.cf=name
+ child.cf=name
epdt[ek.ni]=child
local settings=xmldata.settings
local inclusions=settings and settings.inclusions
@@ -19771,28 +19487,47 @@ end
local b_collapser=lpegpatterns.b_collapser
local m_collapser=lpegpatterns.m_collapser
local e_collapser=lpegpatterns.e_collapser
+local x_collapser=lpegpatterns.x_collapser
local b_stripper=lpegpatterns.b_stripper
local m_stripper=lpegpatterns.m_stripper
local e_stripper=lpegpatterns.e_stripper
-local function stripelement(e,nolines,anywhere)
+local x_stripper=lpegpatterns.x_stripper
+local function stripelement(e,nolines,anywhere,everything)
local edt=e.dt
if edt then
local n=#edt
if n==0 then
return e
+ elseif everything then
+ local t={}
+ local m=0
+ for i=1,n do
+ local str=edt[i]
+ if type(str)~="string" then
+ m=m+1
+ t[m]=str
+ elseif str~="" then
+ str=lpegmatch(x_collapser,str)
+ if str~="" then
+ m=m+1
+ t[m]=str
+ end
+ end
+ end
+ e.dt=t
elseif anywhere then
local t={}
local m=0
- for e=1,n do
- local str=edt[e]
+ for i=1,n do
+ local str=edt[i]
if type(str)~="string" then
m=m+1
t[m]=str
elseif str~="" then
if nolines then
- str=lpegmatch((n==1 and b_collapser) or (n==m and e_collapser) or m_collapser,str)
+ str=lpegmatch((i==1 and b_collapser) or (i==m and e_collapser) or m_collapser,str)
else
- str=lpegmatch((n==1 and b_stripper) or (n==m and e_stripper) or m_stripper,str)
+ str=lpegmatch((i==1 and b_stripper) or (i==m and e_stripper) or m_stripper,str)
end
if str~="" then
m=m+1
@@ -19834,14 +19569,27 @@ local function stripelement(e,nolines,anywhere)
return e
end
xml.stripelement=stripelement
-function xml.strip(root,pattern,nolines,anywhere)
+function xml.strip(root,pattern,nolines,anywhere,everything)
local collected=xmlapplylpath(root,pattern)
if collected then
for i=1,#collected do
- stripelement(collected[i],nolines,anywhere)
+ stripelement(collected[i],nolines,anywhere,everything)
+ end
+ end
+end
+local function compactelement(e)
+ local edt=e.dt
+ if edt then
+ for e=1,#edt do
+ local str=edt[e]
+ if type(str)=="string" and not find(str,"%S") then
+ edt[e]=""
+ end
end
end
+ return e
end
+xml.compactelement=compactelement
local function renamespace(root,oldspace,newspace)
local ndt=#root.dt
for i=1,ndt or 0 do
@@ -20790,7 +20538,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-ini"] = package.loaded["data-ini"] or true
--- original size: 10847, stripped down to: 7086
+-- original size: 10947, stripped down to: 7176
if not modules then modules={} end modules ['data-ini']={
version=1.001,
@@ -20836,7 +20584,8 @@ do
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//")
end
end
-do
+if not environment.homedir then
+ local oldhome=osgetenv('HOME')
local homedir=osgetenv(ostype=="windows" and 'USERPROFILE' or 'HOME') or ''
if not homedir or homedir=="" then
homedir=char(127)
@@ -20844,6 +20593,7 @@ do
homedir=file.collapsepath(homedir)
ossetenv("HOME",homedir)
ossetenv("USERPROFILE",homedir)
+ environment.oldhome=oldhome
environment.homedir=homedir
end
do
@@ -21449,7 +21199,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-env"] = package.loaded["data-env"] or true
--- original size: 9400, stripped down to: 6347
+-- original size: 9501, stripped down to: 6411
if not modules then modules={} end modules ['data-env']={
version=1.001,
@@ -21540,7 +21290,9 @@ local relations=allocate {
mp={
names={ "mp" },
variable='MPINPUTS',
- suffixes={ 'mp','mpvi','mpiv','mpxl','mpii' },
+ suffixes=CONTEXTLMTXMODE>0
+ and { 'mp','mpxl','mpvi','mpiv','mpii' }
+ or { 'mp','mpvi','mpiv','mpii' },
usertype=true,
},
tex={
@@ -21734,7 +21486,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16099, stripped down to: 11379
+-- original size: 16409, stripped down to: 11591
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -21984,7 +21736,10 @@ caches.getwritablepath=getwritablepath
caches.setfirstwritablefile=setfirstwritablefile
caches.getfirstreadablefile=getfirstreadablefile
caches.setluanames=setluanames
+local checkmemory=utilities and utilities.lua and utilities.lua.checkmemory
+local threshold=100
function caches.loaddata(readables,name,writable)
+ local used=checkmemory and checkmemory()
if type(readables)=="string" then
readables={ readables }
end
@@ -22011,7 +21766,11 @@ function caches.loaddata(readables,name,writable)
end
if loader then
loader=loader()
- collectgarbage("step")
+ if checkmemory then
+ checkmemory(used,threshold)
+ else
+ collectgarbage("step")
+ end
return loader
end
end
@@ -24110,7 +23869,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-fil"] = package.loaded["data-fil"] or true
--- original size: 4365, stripped down to: 3588
+-- original size: 4365, stripped down to: 3452
if not modules then modules={} end modules ['data-fil']={
version=1.001,
@@ -24130,7 +23889,6 @@ local scanfiles=resolvers.scanfiles
local registerfilehash=resolvers.registerfilehash
local appendhash=resolvers.appendhash
local loadcachecontent=caches.loadcontent
-local checkgarbage=utilities.garbagecollector and utilities.garbagecollector.check
function resolvers.locators.file(specification)
local filename=specification.filename
local realname=resolveprefix(filename)
@@ -24220,10 +23978,7 @@ function loaders.file(specification,filetype)
if trace_locating then
report_files("file loader: %a loaded",filename)
end
- local s=f:read("*a")
- if checkgarbage then
- checkgarbage(#s)
- end
+ local s=f:read("*a")
f:close()
if s then
return true,s,#s
@@ -24371,7 +24126,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-use"] = package.loaded["data-use"] or true
--- original size: 5790, stripped down to: 2910
+-- original size: 5785, stripped down to: 2905
if not modules then modules={} end modules ['data-use']={
version=1.001,
@@ -24387,7 +24142,7 @@ local resolvers=resolvers
local findfile=resolvers.findfile
statistics.register("used config file",function() return caches.configfiles() end)
statistics.register("used cache path",function() return caches.usedpaths() end)
-function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner)
+function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner)
local enginebanner=status.banner
if formatbanner and enginebanner and sourcefile then
local luvname=file.replacesuffix(texname,"luv")
@@ -25532,7 +25287,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["libs-ini"] = package.loaded["libs-ini"] or true
--- original size: 5822, stripped down to: 3629
+-- original size: 6459, stripped down to: 4006
if not modules then modules={} end modules ['libs-ini']={
version=1.001,
@@ -25542,7 +25297,7 @@ if not modules then modules={} end modules ['libs-ini']={
license="see context related readme files"
}
local type,unpack=type,unpack
-local type=type
+local find=string.find
local nameonly=file.nameonly
local joinfile=file.join
local addsuffix=file.addsuffix
@@ -25552,7 +25307,9 @@ local findfile=resolvers.findfile
local expandpaths=resolvers.expandedpathlistfromvariable
local report=logs.reporter("resolvers","libraries")
local trace=false
+local silent=false
trackers.register("resolvers.lib",function(v) trace=v end)
+trackers.register("resolvers.lib.silent",function(v) silent=v end)
local function findlib(required)
local suffix=os.libsuffix or "so"
if not qualifiedpath(required) then
@@ -25653,10 +25410,10 @@ function libraries.optionalloaded(name,libnames)
end
end
local initialized=thelib_initialize(unpack(libnames))
- if initialized then
- report("using library '% + t'",libnames)
- else
+ if not initialized then
report("unable to initialize library '% + t'",libnames)
+ elseif not silent then
+ report("using library '% + t'",libnames)
end
return initialized
end
@@ -25674,6 +25431,19 @@ if FFISUPPORTED and ffi and ffi.load then
end
end
end
+local dofile=dofile
+local savedrequire=require
+function require(name,version)
+ if find(name,"%.lua$") or find(name,"%.lmt$") then
+ local m=dofile(findfile(name))
+ if m then
+ package.loaded[name]=m
+ return m
+ end
+ else
+ return savedrequire(name)
+ end
+end
end -- of closure
@@ -25785,7 +25555,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 13843, stripped down to: 9991
+-- original size: 11691, stripped down to: 8350
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25836,27 +25606,26 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
- luatex=sandbox.registerrunner {
- name="make luatex format",
- program="luatex",
+ luametatex=sandbox.registerrunner {
+ name="make luametatex format",
+ program="luametatex",
template=template,
checkers=checkers,
reporter=report_format,
},
- luametatex=sandbox.registerrunner {
- name="make luametatex format",
- program="luametatex",
+ luatex=sandbox.registerrunner {
+ name="make luatex format",
+ program="luatex",
template=template,
checkers=checkers,
reporter=report_format,
@@ -25869,6 +25638,16 @@ local runners={
reporter=report_format,
},
}
+local stubfiles={
+ luametatex="luat-cod.lmt",
+ luatex="luat-cod.lua",
+ luajittex="luat-cod.lua",
+}
+local suffixes={
+ luametatex="mkxl",
+ luatex="mkiv",
+ luajittex="mkiv",
+}
local function validbinarypath()
if not environment.arguments.nobinarypath then
local path=environment.ownpath or file.dirname(environment.ownname)
@@ -25880,101 +25659,50 @@ local function validbinarypath()
end
end
end
+local function fatalerror(startupdir,...)
+ report_format(...)
+ lfs.chdir(startupdir)
+end
function environment.make_format(formatname)
local arguments=environment.arguments
local engine=environment.ownmain or "luatex"
local silent=arguments.silent
local errors=arguments.errors
- local texsourcename=""
- local texsourcepath=""
- local fulltexsourcename=""
- if engine=="luametatex" then
- texsourcename=file.addsuffix(formatname,"mkxl")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local runner=runners[engine]
+ local startupdir=dir.current()
+ if not runner then
+ return fatalerror(startupdir,"the format %a cannot be generated, no runner available for engine %a",name,engine)
end
- if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"mkiv")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local luasourcename=stubfiles[engine]
+ if not luasourcename then
+ return fatalerror(startupdir,"no lua stub file specified for %a",engine)
end
+ local texsourcename=file.addsuffix(formatname,suffixes[engine])
+ local fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"tex")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ return fatalerror(startupdir,"no tex source file with name %a (mkiv or tex)",formatname)
end
- if fulltexsourcename=="" then
- report_format("no tex source file with name %a (mkiv or tex)",formatname)
- return
- end
- report_format("using tex source file %a",fulltexsourcename)
- fulltexsourcename=dir.expandname(fulltexsourcename)
- texsourcepath=file.dirname(fulltexsourcename)
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
- end
- local specificationname="context.lus"
- local specificationpath=""
- local fullspecificationname=resolvers.findfile(specificationname) or ""
- if fullspecificationname=="" then
- report_format("unable to locate specification file %a",specificationname)
- return
- end
- report_format("using specification file %a",fullspecificationname)
- fullspecificationname=dir.expandname(fullspecificationname)
- specificationpath=file.dirname(fullspecificationname)
- if texsourcepath~=specificationpath then
- report_format("tex source file and specification file are on different paths")
- return
- end
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
+ local fulltexsourcename=dir.expandname(fulltexsourcename)
+ local texsourcepath=file.dirname(fulltexsourcename)
+ if lfs.isfile(fulltexsourcename) then
+ report_format("using tex source file %a",fulltexsourcename)
+ else
+ return fatalerror(startupdir,"no accessible tex source file with name %a",fulltexsourcename)
end
- if not lfs.isfile(fullspecificationname) then
- report_format("no accessible specification file with name %a",fulltexsourcename)
- return
+ local fullluasourcename=dir.expandname(file.join(texsourcepath,luasourcename) or "")
+ if lfs.isfile(fullluasourcename) then
+ report_format("using lua stub file %a",fullluasourcename)
+ else
+ return fatalerror(startupdir,"no accessible lua stub file with name %a",fulltexsourcename)
end
- report_format("using tex source path %a",texsourcepath)
local validformatpath=caches.getwritablepath("formats",engine) or ""
- local startupdir=dir.current()
if validformatpath=="" then
- report_format("invalid format path, insufficient write access")
- return
+ return fatalerror(startupdir,"invalid format path, insufficient write access")
end
local binarypath=validbinarypath()
report_format("changing to format path %a",validformatpath)
- lfs.chdir(validformatpath)
- if dir.current()~=validformatpath then
- report_format("unable to change to format path %a",validformatpath)
- return
- end
- local usedluastub=nil
- local usedlualibs=dofile(fullspecificationname)
- if type(usedlualibs)=="string" then
- usedluastub=file.join(specificationpath,usedlualibs)
- elseif type(usedlualibs)=="table" then
- report_format("using stub specification %a",fullspecificationname)
- local texbasename=file.basename(name)
- local luastubname=file.addsuffix(texbasename,luasuffixes.lua)
- local lucstubname=file.addsuffix(texbasename,luasuffixes.luc)
- report_format("creating initialization file %a",luastubname)
- utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
- if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- report_format("using compiled initialization file %a",lucstubname)
- usedluastub=lucstubname
- else
- report_format("using uncompiled initialization file %a",luastubname)
- usedluastub=luastubname
- end
- else
- report_format("invalid stub specification %a",fullspecificationname)
- lfs.chdir(startupdir)
- return
- end
- local runner=runners[engine]
- if not runner then
- report_format("the format %a cannot be generated, no runner available for engine %a",name,engine)
- lfs.chdir(startupdir)
- return
+ if not lfs.chdir(validformatpath) then
+ return fatalerror(startupdir,"unable to change to format path %a",validformatpath)
end
local primaryflags=primaryflags(arguments)
local secondaryflags=secondaryflags(arguments)
@@ -25982,9 +25710,8 @@ function environment.make_format(formatname)
binarypath=binarypath,
primaryflags=primaryflags,
secondaryflags=secondaryflags,
- luafile=quoted(usedluastub),
+ luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26001,7 +25728,7 @@ function environment.make_format(formatname)
end
report_format("format path : %s",validformatpath)
report_format("luatex engine : %s",engine)
- report_format("lua startup file : %s",usedluastub)
+ report_format("lua startup file : %s",fullluasourcename)
if primaryflags~="" then
report_format("primary flags : %s",primaryflags)
end
@@ -26083,9 +25810,9 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
luafile=quoted(scriptname),
texfile=filename~="" and quoted(filename) or "",
}
- statistics.starttiming()
+ statistics.starttiming("make format")
local result=runner(specification)
- local runtime=statistics.stoptiming()
+ statistics.stoptiming("make format")
if verbose then
report_format()
if binarypath and binarypath~="" then
@@ -26103,7 +25830,7 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
if secondaryflags~="" then
report_format("secondary flags : %s",secondaryflags)
end
- report_format("run time : %.3f seconds",runtime)
+ report_format("run time : %0.3f seconds",statistics.elapsed("make format"))
report_format("return value : %s",result==0 and "okay" or "error")
report_format()
end
@@ -26115,8 +25842,8 @@ end -- of closure
-- 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 : 1038373
--- stripped bytes : 409980
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
@@ -26771,12 +26498,14 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
end
function runners.save_script_session(filename, list)
- local t = { }
- for i=1,#list do
- local key = list[i]
- t[key] = environment.arguments[key]
+ if type(list) == "table" then
+ local t = { }
+ for i=1,#list do
+ local key = list[i]
+ t[key] = environment.arguments[key]
+ end
+ io.savedata(filename,table.serialize(t,true))
end
- io.savedata(filename,table.serialize(t,true))
end
function runners.load_script_session(filename)
diff --git a/Master/texmf-dist/context/data/npp/context/notepad++.ini b/Master/texmf-dist/context/data/npp/context/notepad++.ini
deleted file mode 100644
index 50b02e294c1..00000000000
--- a/Master/texmf-dist/context/data/npp/context/notepad++.ini
+++ /dev/null
@@ -1,57 +0,0 @@
-# You can use the lexers that come with context and athat are meant for scite also for notepad++. On
-# my machine I always install such a portable program in c:\data\system\notepadplusplus (avoiding
-# funny characters).
-#
-# (1) Download a version of scintillua++ that matches the current version if notepad++ and unzip
-# the archive in a temporary place.
-#
-# c:\data\notepadplusplus\*
-#
-# (2) Copy these two dlls::
-#
-# c:\data\notepadplusplus\plugins\Scintillua++.dll
-# c:\data\notepadplusplus\plugins\Config\Scintillua++\LexLPeg.dll
-#
-# (3) Copy this file to:
-#
-# c:\data\notepadplusplus\plugins\Config\Scintillua++.ini
-#
-# (4) Copy the files from the texmf/context/data/scite/context so that you get:
-#
-# c:\data\notepadplusplus\plugins\Config\data\scite-context-data-*.lua
-# c:\data\notepadplusplus\plugins\Config\themes\scite-context-theme.lua
-# c:\data\notepadplusplus\plugins\Config\themes\lexer.lua
-# c:\data\notepadplusplus\plugins\Config\themes\scite-context-lexer.lua
-# c:\data\notepadplusplus\plugins\Config\themes\scite-context-lexer-*.lua
-#
-# Now you should get the standard context lexing for the file types mentioned below. I might add a few
-# more (consistent) lexers. Beware: we don't use the lexer.lua file that ships with scintillua++. Among
-# the reasons is that when I first played with this variant of lexing the scintillua implementation was
-# quite slow, so I redid the code with some agressive optimization (in context a good test file is the
-# character database file. There is still room for improvement. One problem with the lua lexer is that
-# there is not much communication possible so that getting the state involves guesswork.
-#
-# Also, we already had lpeg based lexing in context so it made more sense to find some common ground so
-# that I could share code (a bit of a hybrid approach). There are some extra features like showing
-# invisible spaces and most noticeably spell checking (for more info see the manual).
-#
-# The lexer assumes that you have the dejavu mono fonts installed. These cover a wide repertoire of
-# characters. Some features offered for scite won't be available because no additional menu items etc
-# are defined.
-#
-# In due time some more configuration files will be added for notepad++. Maybe some more can be set up
-# below.
-
-theme=scite-context-theme
-override=true
-
-scite-context-lexer-tex=*.tex;*.mkii;*.mkiv;*.mkvi;*.mkix;*.mkxi
-scite-context-lexer-xml=*.xml;*.xsl;*.xsd;*.fo;*.exa;*.rlb;*.rlg;*.rlv;*.rng;*.xfdf;*.xslt;*.dtd;*.lmx;*.htm;*.html;*.xhtml;*.ctx;*.export;*.svg;*.xul
-scite-context-lexer-mps=*.mp;*.mpx
-scite-context-lexer-lua=*.lua;*.luc;*.cld;*.tuc;*.luj;*.lum;*.tma;*.lfg;*.luv;*.lui
-scite-context-lexer-txt=*.txt
-scite-context-lexer-pdf=*.pdf
-scite-context-lexer-web=*.w;*.ww
-scite-context-lexer-cpp=*.h;*.c;*.hh;*.cc;*.hpp;*.cpp;*.hxx;*.cxx
-scite-context-lexer-bibtex=*.bib
-scite-context-lexer-sql=*.sql
diff --git a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua
index 3db7d14fd0f..2f8a6a5b1a9 100644
--- a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
- ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextkind", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "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", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "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", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol" },
- ["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", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "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", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "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", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "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", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "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", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "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", "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", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "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", "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", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "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", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" },
+ ["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", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "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", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode", "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode", "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenhyphenationcode", "frozenallcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "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", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "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", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode", "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode", "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode", "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode", "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode", "forcecheckhyphenationmodecode", "lazyligatureshyphenationmodecode", "normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode", "clipwidthcode", "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode", "noexpansioncode", "noprotrusioncode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "continuewhenlmtxmode" },
+ ["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", "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", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "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", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "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", "pickupgroupedcommand", "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", "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", "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", "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", "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", "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", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "triggermathstyle", "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", "Umathbotaccent", "Umathtopaccent", "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", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "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", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode", "pushrunstate", "poprunstate", "suggestedalias", "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox", "newlocalwrite", "newlocalread", "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua
index 5cbf4dce3f8..d2b00064590 100644
--- a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua
@@ -1,11 +1,4 @@
return {
- ["common"]={ "AEacute", "AEligature", "AEmacron", "AMSTEX", "Aacute", "Abreve", "Abreveacute", "Abrevedotbelow", "Abrevegrave", "Abrevehook", "Abrevetilde", "Acaron", "Acircumflex", "Acircumflexacute", "Acircumflexdotbelow", "Acircumflexgrave", "Acircumflexhook", "Acircumflextilde", "Adiaeresis", "Adiaeresismacron", "Adotaccent", "Adotaccentmacron", "Adotbelow", "Adoublegrave", "AfterPar", "Agrave", "Ahook", "Ainvertedbreve", "Alpha", "Alphabeticnumerals", "AmSTeX", "Amacron", "And", "Angstrom", "Aogonek", "Aring", "Aringacute", "Arrowvert", "Astroke", "Atilde", "BeforePar", "Beta", "Bhook", "Big", "Bigg", "Biggl", "Biggm", "Biggr", "Bigl", "Bigm", "Bigr", "Box", "Bumpeq", "CONTEXT", "Cacute", "Cap", "Caps", "Ccaron", "Ccedilla", "Ccircumflex", "Cdotaccent", "Character", "Characters", "Chi", "Chook", "ConTeXt", "Context", "ConvertConstantAfter", "ConvertToConstant", "Cstroke", "Cup", "DZcaronligature", "DZligature", "Dafrican", "Dcaron", "Ddownarrow", "Delta", "Dhook", "Doteq", "Downarrow", "Dstroke", "Dzcaronligature", "Dzligature", "ETEX", "Eacute", "Ebreve", "Ecaron", "Ecedilla", "Ecircumflex", "Ecircumflexacute", "Ecircumflexdotbelow", "Ecircumflexgrave", "Ecircumflexhook", "Ecircumflextilde", "Ediaeresis", "Edotaccent", "Edotbelow", "Edoublegrave", "Egrave", "Ehook", "Einvertedbreve", "Emacron", "Eogonek", "Epsilon", "Eta", "Eth", "Etilde", "Eulerconst", "EveryLine", "EveryPar", "Fhook", "Finv", "Gacute", "Game", "Gamma", "Gbreve", "Gcaron", "Gcircumflex", "Gcommaaccent", "Gdotaccent", "GetPar", "Ghook", "GotoPar", "Greeknumerals", "Gstroke", "Hat", "Hcaron", "Hcircumflex", "Hstroke", "IJligature", "INRSTEX", "Iacute", "Ibreve", "Icaron", "Icircumflex", "Idiaeresis", "Idotaccent", "Idotbelow", "Idoublegrave", "Igrave", "Ihook", "Iinvertedbreve", "Im", "Imacron", "Iogonek", "Iota", "Istroke", "Itilde", "Jcircumflex", "Join", "Kappa", "Kcaron", "Kcommaaccent", "Khook", "LAMSTEX", "LATEX", "LJligature", "LUAJITTEX", "LUAMETATEX", "LUATEX", "LaTeX", "Lacute", "LamSTeX", "Lambda", "Lbar", "Lcaron", "Lcommaaccent", "Ldotmiddle", "Ldsh", "Leftarrow", "Leftrightarrow", "Ljligature", "Lleftarrow", "Longleftarrow", "Longleftrightarrow", "Longmapsfrom", "Longmapsto", "Longrightarrow", "Lsh", "Lstroke", "Lua", "LuaMetaTeX", "LuaTeX", "LuajitTeX", "METAFONT", "METAFUN", "METAPOST", "MKII", "MKIV", "MKIX", "MKVI", "MKXI", "MONTH", "MONTHLONG", "MONTHSHORT", "MPII", "MPIV", "MPVI", "MPanchor", "MPbetex", "MPc", "MPcode", "MPcolor", "MPcoloronly", "MPcolumn", "MPd", "MPdrawing", "MPfontsizehskip", "MPgetmultipars", "MPgetmultishape", "MPgetposboxes", "MPh", "MPinclusions", "MPleftskip", "MPll", "MPlr", "MPls", "MPmenubuttons", "MPn", "MPoptions", "MPoverlayanchor", "MPp", "MPpage", "MPpardata", "MPplus", "MPpos", "MPpositiongraphic", "MPposset", "MPr", "MPrawvar", "MPregion", "MPrest", "MPrightskip", "MPrs", "MPstring", "MPtext", "MPtransparency", "MPul", "MPur", "MPv", "MPvar", "MPvariable", "MPvv", "MPw", "MPwhd", "MPx", "MPxy", "MPxywhd", "MPy", "Mapsfrom", "Mapsto", "MetaFont", "MetaFun", "MetaPost", "Mu", "NJligature", "Nacute", "Ncaron", "Ncommaaccent", "Nearrow", "Neng", "Ngrave", "Njligature", "NormalizeFontHeight", "NormalizeFontWidth", "NormalizeTextHeight", "NormalizeTextWidth", "Ntilde", "Nu", "Numbers", "Nwarrow", "OEligature", "Oacute", "Obreve", "Ocaron", "Ocircumflex", "Ocircumflexacute", "Ocircumflexdotbelow", "Ocircumflexgrave", "Ocircumflexhook", "Ocircumflextilde", "Odiaeresis", "Odiaeresismacron", "Odotaccent", "Odotaccentmacron", "Odotbelow", "Odoublegrave", "Ograve", "Ohook", "Ohorn", "Ohornacute", "Ohorndotbelow", "Ohorngrave", "Ohornhook", "Ohorntilde", "Ohungarumlaut", "Oinvertedbreve", "Omacron", "Omega", "Omicron", "Oogonek", "Oogonekmacron", "Ostroke", "Ostrokeacute", "Otilde", "Otildemacron", "P", "PDFETEX", "PDFTEX", "PDFcolor", "PICTEX", "PPCHTEX", "PPCHTeX", "PRAGMA", "Phi", "Phook", "Pi", "PiCTeX", "Plankconst", "PointsToBigPoints", "PointsToReal", "PointsToWholeBigPoints", "PropertyLine", "Psi", "PtToCm", "Racute", "Rcaron", "Rcommaaccent", "Rdoublegrave", "Rdsh", "Re", "ReadFile", "Relbar", "Rho", "Rightarrow", "Rinvertedbreve", "Romannumerals", "Rrightarrow", "Rsh", "S", "Sacute", "ScaledPointsToBigPoints", "ScaledPointsToWholeBigPoints", "Scaron", "Scedilla", "Schwa", "Scircumflex", "Scommaaccent", "Searrow", "Sigma", "Smallcapped", "Subset", "Supset", "Swarrow", "TABLE", "TEX", "TaBlE", "Tau", "Tcaron", "Tcedilla", "Tcommaaccent", "TeX", "TheNormalizedFontSize", "Theta", "Thook", "Thorn", "TransparencyHack", "Tstroke", "Uacute", "Ubreve", "Ucaron", "Ucircumflex", "Udiaeresis", "Udiaeresisacute", "Udiaeresiscaron", "Udiaeresisgrave", "Udiaeresismacron", "Udotbelow", "Udoublegrave", "Ugrave", "Uhook", "Uhorn", "Uhornacute", "Uhorndotbelow", "Uhorngrave", "Uhornhook", "Uhorntilde", "Uhungarumlaut", "Uinvertedbreve", "Umacron", "Uogonek", "Uparrow", "Updownarrow", "Upsilon", "Uring", "Utilde", "Uuparrow", "VDash", "Vdash", "VerboseNumber", "Vert", "Vvdash", "WEEKDAY", "WORD", "WORDS", "Wcircumflex", "WidthSpanningText", "Word", "Words", "XETEX", "XeTeX", "Xi", "Yacute", "Ycircumflex", "Ydiaeresis", "Ydotbelow", "Ygrave", "Yhook", "Ymacron", "Ytilde", "Zacute", "Zcaron", "Zdotaccent", "Zeta", "Zhook", "Zstroke", "aacute", "abbreviation", "abjadnaivenumerals", "abjadnodotnumerals", "abjadnumerals", "about", "abreve", "abreveacute", "abrevedotbelow", "abrevegrave", "abrevehook", "abrevetilde", "acaron", "acircumflex", "acircumflexacute", "acircumflexdotbelow", "acircumflexgrave", "acircumflexhook", "acircumflextilde", "activatespacehandler", "actualday", "actualmonth", "actualyear", "actuarial", "acute", "acwopencirclearrow", "adaptcollector", "adaptfontfeature", "adaptlayout", "adaptpapersize", "addfeature", "addfontpath", "addtoJSpreamble", "addtocommalist", "addvalue", "adiaeresis", "adiaeresismacron", "adotaccent", "adotaccentmacron", "adotbelow", "adoublegrave", "aeacute", "aeligature", "aemacron", "afghanicurrency", "aftersplitstring", "aftertestandsplitstring", "agrave", "ahook", "ainvertedbreve", "aleph", "alignbottom", "aligned", "alignedbox", "alignedline", "alignhere", "alignmentcharacter", "allinputpaths", "alpha", "alphabeticnumerals", "alwayscitation", "alwayscite", "amacron", "amalg", "ampersand", "anchor", "angle", "aogonek", "appendetoks", "appendgvalue", "appendtocommalist", "appendtoks", "appendtoksonce", "appendvalue", "apply", "applyalternativestyle", "applyprocessor", "applytocharacters", "applytofirstcharacter", "applytosplitstringchar", "applytosplitstringcharspaced", "applytosplitstringline", "applytosplitstringlinespaced", "applytosplitstringword", "applytosplitstringwordspaced", "applytowords", "approx", "approxEq", "approxeq", "approxnEq", "arabicakbar", "arabicalayhe", "arabicallah", "arabicallallahou", "arabicasterisk", "arabicbasmalah", "arabiccomma", "arabiccuberoot", "arabicdateseparator", "arabicdecimals", "arabicdisputedendofayah", "arabicendofayah", "arabicexnumerals", "arabicfootnotemarker", "arabicfourthroot", "arabichighain", "arabichighalayheassallam", "arabichigheqala", "arabichighesala", "arabichighfootnotemarker", "arabichighjeem", "arabichighlamalef", "arabichighmadda", "arabichighmeemlong", "arabichighmeemshort", "arabichighnisf", "arabichighnoon", "arabichighnoonkasra", "arabichighqaf", "arabichighqif", "arabichighradiallahouanhu", "arabichighrahmatullahalayhe", "arabichighrubc", "arabichighsad", "arabichighsajda", "arabichighsakta", "arabichighsallallahou", "arabichighseen", "arabichighsmallsafha", "arabichightah", "arabichightakhallus", "arabichighthalatha", "arabichighwaqf", "arabichighyeh", "arabichighzain", "arabicjallajalalouhou", "arabiclettermark", "arabiclowmeemlong", "arabiclownoonkasra", "arabiclowseen", "arabicmisra", "arabicmuhammad", "arabicnumber", "arabicnumberabove", "arabicnumerals", "arabicparenleft", "arabicparenright", "arabicpercent", "arabicperiod", "arabicpermille", "arabicpertenthousand", "arabicpoeticverse", "arabicqala", "arabicquestion", "arabicrasoul", "arabicray", "arabicrialsign", "arabicsafha", "arabicsajdah", "arabicsalla", "arabicsamvat", "arabicsanah", "arabicsemicolon", "arabicshighthreedots", "arabicslcm", "arabicstartofrubc", "arabictripledot", "arabicvowelwaw", "arabicvowelyeh", "arabicwasallam", "arg", "aring", "aringacute", "arrowvert", "asciistr", "aside", "assignalfadimension", "assigndimen", "assigndimension", "assignifempty", "assigntranslation", "assignvalue", "assignwidth", "assumelongusagecs", "ast", "astype", "asymp", "at", "atilde", "atleftmargin", "atpage", "atrightmargin", "attachment", "autocap", "autodirhbox", "autodirvbox", "autodirvtop", "autoinsertnextspace", "autointegral", "automathematics", "autopagestaterealpage", "autopagestaterealpageorder", "autosetups", "availablehsize", "averagecharwidth", "backepsilon", "background", "backgroundimage", "backgroundimagefill", "backgroundline", "backprime", "backsim", "backslash", "bar", "barleftarrow", "barleftarrowrightarrowbar", "barovernorthwestarrow", "barwedge", "basegrid", "baselinebottom", "baselineleftbox", "baselinemiddlebox", "baselinerightbox", "bbordermatrix", "bbox", "because", "beforesplitstring", "beforetestandsplitstring", "beta", "beth", "between", "bhook", "big", "bigbodyfont", "bigcap", "bigcirc", "bigcircle", "bigcup", "bigdiamond", "bigg", "bigger", "biggl", "biggm", "biggr", "bigl", "bigm", "bigodot", "bigoplus", "bigotimes", "bigr", "bigskip", "bigsqcap", "bigsqcup", "bigsquare", "bigstar", "bigtimes", "bigtriangledown", "bigtriangleup", "bigudot", "biguplus", "bigvee", "bigwedge", "binom", "bitmapimage", "blacklozenge", "blackrule", "blackrules", "blacksquare", "blacktriangle", "blacktriangledown", "blacktriangleleft", "blacktriangleright", "blank", "blap", "bleed", "bleedheight", "bleedwidth", "blockligatures", "blockquote", "blocksynctexfile", "blockuservariable", "bodyfontenvironmentlist", "bodyfontsize", "bold", "boldface", "bolditalic", "boldslanted", "bookmark", "booleanmodevalue", "bordermatrix", "bot", "bottombox", "bottomleftbox", "bottomrightbox", "bowtie", "boxcursor", "boxdot", "boxmarker", "boxminus", "boxofsize", "boxplus", "boxreference", "boxtimes", "bpos", "breakablethinspace", "breakhere", "breve", "bstroke", "btxabbreviatedjournal", "btxaddjournal", "btxalwayscitation", "btxauthorfield", "btxdetail", "btxdirect", "btxdoif", "btxdoifcombiinlistelse", "btxdoifelse", "btxdoifelsecombiinlist", "btxdoifelsesameasprevious", "btxdoifelsesameaspreviouschecked", "btxdoifelseuservariable", "btxdoifnot", "btxdoifsameaspreviouscheckedelse", "btxdoifsameaspreviouselse", "btxdoifuservariableelse", "btxexpandedjournal", "btxfield", "btxfieldname", "btxfieldtype", "btxfirstofrange", "btxflush", "btxflushauthor", "btxflushauthorinverted", "btxflushauthorinvertedshort", "btxflushauthorname", "btxflushauthornormal", "btxflushauthornormalshort", "btxflushsuffix", "btxfoundname", "btxfoundtype", "btxhiddencitation", "btxhybridcite", "btxlabellanguage", "btxlabeltext", "btxlistcitation", "btxloadjournalist", "btxoneorrange", "btxremapauthor", "btxsavejournalist", "btxsetup", "btxsingularorplural", "btxsingularplural", "btxtextcitation", "buildmathaccent", "buildtextaccent", "buildtextbottomcomma", "buildtextbottomdot", "buildtextcedilla", "buildtextgrave", "buildtextmacron", "buildtextognek", "bullet", "button", "cacute", "calligraphic", "camel", "cap", "capital", "carriagereturn", "catcodetablename", "cbox", "ccaron", "ccedilla", "ccircumflex", "ccurl", "cdot", "cdotaccent", "cdotp", "cdots", "centeraligned", "centerbox", "centerdot", "centeredbox", "centeredlastline", "centerednextbox", "centerline", "cfrac", "chapter", "character", "characters", "chardescription", "charwidthlanguage", "check", "checkcharacteralign", "checkedblank", "checkedchar", "checkedfiller", "checkedstrippedcsname", "checkinjector", "checkmark", "checknextindentation", "checknextinjector", "checkpage", "checkparameters", "checkpreviousinjector", "checksoundtrack", "checktwopassdata", "checkvariables", "chem", "chemical", "chemicalbottext", "chemicalmidtext", "chemicalsymbol", "chemicaltext", "chemicaltoptext", "chi", "chineseallnumerals", "chinesecapnumerals", "chinesenumerals", "chook", "circ", "circeq", "circlearrowleft", "circlearrowright", "circledR", "circledS", "circledast", "circledcirc", "circleddash", "circledequals", "circleonrightarrow", "citation", "cite", "clap", "classfont", "cldcommand", "cldcontext", "cldloadfile", "cldprocessfile", "cleftarrow", "clip", "clippedoverlayimage", "clonefield", "clubsuit", "collect", "collectedtext", "collectexpanded", "colon", "coloncolonequals", "colonequals", "color", "colorbar", "colorcomponents", "colored", "coloronly", "colorvalue", "column", "columnbreak", "columnsetspanwidth", "combinepages", "commalistelement", "commalistsentence", "commalistsize", "comment", "comparecolorgroup", "comparedimension", "comparedimensioneps", "comparepalet", "complement", "completebtxrendering", "completecontent", "completeindex", "completelist", "completelistofabbreviations", "completelistofchemicals", "completelistoffigures", "completelistofgraphics", "completelistofintermezzi", "completelistoflogos", "completelistofpublications", "completelistofsorts", "completelistofsynonyms", "completelistoftables", "completepagenumber", "completeregister", "complexes", "complexorsimple", "complexorsimpleempty", "component", "composedcollector", "composedlayer", "compresult", "cong", "constantdimen", "constantdimenargument", "constantemptyargument", "constantnumber", "constantnumberargument", "contentreference", "continuednumber", "continueifinputfile", "convertargument", "convertcommand", "convertedcounter", "converteddimen", "convertedsubcounter", "convertmonth", "convertnumber", "convertvalue", "convertvboxtohbox", "coprod", "copyboxfromcache", "copybtxlabeltext", "copyfield", "copyheadtext", "copylabeltext", "copymathlabeltext", "copyoperatortext", "copypages", "copyparameters", "copyposition", "copyprefixtext", "copyright", "copysetups", "copysuffixtext", "copytaglabeltext", "copyunittext", "correctwhitespace", "countersubs", "counttoken", "counttokens", "cramped", "crampedclap", "crampedllap", "crampedrlap", "crightarrow", "crightoverleftarrow", "crlf", "crlfplaceholder", "cstroke", "ctop", "ctxcommand", "ctxdirectcommand", "ctxdirectlua", "ctxfunction", "ctxlatecommand", "ctxlatelua", "ctxloadluafile", "ctxlua", "ctxluabuffer", "ctxluacode", "ctxreport", "ctxsprint", "cup", "curlyeqprec", "curlyeqsucc", "curlyvee", "curlywedge", "currentassignmentlistkey", "currentassignmentlistvalue", "currentbtxuservariable", "currentcommalistitem", "currentcomponent", "currentdate", "currentenvironment", "currentfeaturetest", "currentheadnumber", "currentinterface", "currentlanguage", "currentlistentrydestinationattribute", "currentlistentrylimitedtext", "currentlistentrynumber", "currentlistentrypagenumber", "currentlistentryreferenceattribute", "currentlistentrytitle", "currentlistentrytitlerendered", "currentlistsymbol", "currentmainlanguage", "currentmessagetext", "currentmoduleparameter", "currentoutputstream", "currentproduct", "currentproject", "currentregime", "currentregisterpageuserdata", "currentresponses", "currenttime", "currentvalue", "currentxtablecolumn", "currentxtablerow", "curvearrowleft", "curvearrowright", "cwopencirclearrow", "cyrillicA", "cyrillicAE", "cyrillicAbreve", "cyrillicAdiaeresis", "cyrillicB", "cyrillicBIGYUS", "cyrillicBIGYUSiotified", "cyrillicC", "cyrillicCH", "cyrillicCHEDC", "cyrillicCHEDCabkhasian", "cyrillicCHEabkhasian", "cyrillicCHEdiaeresis", "cyrillicCHEkhakassian", "cyrillicCHEvertstroke", "cyrillicD", "cyrillicDASIAPNEUMATA", "cyrillicDJE", "cyrillicDZE", "cyrillicDZEabkhasian", "cyrillicDZHE", "cyrillicE", "cyrillicELtail", "cyrillicEMtail", "cyrillicENDC", "cyrillicENGHE", "cyrillicENhook", "cyrillicENtail", "cyrillicEREV", "cyrillicERY", "cyrillicERtick", "cyrillicEbreve", "cyrillicEdiaeresis", "cyrillicEgrave", "cyrillicEiotified", "cyrillicF", "cyrillicFITA", "cyrillicG", "cyrillicGHEmidhook", "cyrillicGHEstroke", "cyrillicGHEupturn", "cyrillicGJE", "cyrillicH", "cyrillicHA", "cyrillicHADC", "cyrillicHRDSN", "cyrillicI", "cyrillicIE", "cyrillicII", "cyrillicISHRT", "cyrillicISHRTtail", "cyrillicIZHITSA", "cyrillicIZHITSAdoublegrave", "cyrillicIdiaeresis", "cyrillicIgrave", "cyrillicImacron", "cyrillicJE", "cyrillicK", "cyrillicKADC", "cyrillicKAbashkir", "cyrillicKAhook", "cyrillicKAstroke", "cyrillicKAvertstroke", "cyrillicKJE", "cyrillicKOPPA", "cyrillicKSI", "cyrillicL", "cyrillicLITTLEYUS", "cyrillicLITTLEYUSiotified", "cyrillicLJE", "cyrillicM", "cyrillicN", "cyrillicNJE", "cyrillicO", "cyrillicOMEGA", "cyrillicOMEGAround", "cyrillicOMEGAtitlo", "cyrillicOT", "cyrillicObarred", "cyrillicObarreddiaeresis", "cyrillicOdiaeresis", "cyrillicP", "cyrillicPALATALIZATION", "cyrillicPALOCHKA", "cyrillicPEmidhook", "cyrillicPSI", "cyrillicPSILIPNEUMATA", "cyrillicR", "cyrillicS", "cyrillicSCHWA", "cyrillicSCHWAdiaeresis", "cyrillicSDSC", "cyrillicSEMISOFT", "cyrillicSFTSN", "cyrillicSH", "cyrillicSHCH", "cyrillicSHHA", "cyrillicT", "cyrillicTEDC", "cyrillicTETSE", "cyrillicTITLO", "cyrillicTSHE", "cyrillicU", "cyrillicUK", "cyrillicUSHRT", "cyrillicUdiaeresis", "cyrillicUdoubleacute", "cyrillicUmacron", "cyrillicV", "cyrillicYA", "cyrillicYAT", "cyrillicYERUdiaeresis", "cyrillicYI", "cyrillicYO", "cyrillicYU", "cyrillicYstr", "cyrillicYstrstroke", "cyrillicZ", "cyrillicZDSC", "cyrillicZEdiaeresis", "cyrillicZH", "cyrillicZHEbreve", "cyrillicZHEdescender", "cyrillicZHEdiaeresis", "cyrillica", "cyrillicabreve", "cyrillicadiaeresis", "cyrillicae", "cyrillicb", "cyrillicbigyus", "cyrillicbigyusiotified", "cyrillicc", "cyrillicch", "cyrilliccheabkhasian", "cyrillicchedc", "cyrillicchedcabkhasian", "cyrillicchediaeresis", "cyrillicchekhakassian", "cyrillicchevertstroke", "cyrillicd", "cyrillicdje", "cyrillicdze", "cyrillicdzeabkhasian", "cyrillicdzhe", "cyrillice", "cyrillicebreve", "cyrillicediaeresis", "cyrillicegrave", "cyrilliceiotified", "cyrilliceltail", "cyrillicemtail", "cyrillicendc", "cyrillicenghe", "cyrillicenhook", "cyrillicentail", "cyrillicerev", "cyrillicertick", "cyrillicery", "cyrillicf", "cyrillicfita", "cyrillicg", "cyrillicghemidhook", "cyrillicghestroke", "cyrillicgheupturn", "cyrillicgje", "cyrillich", "cyrillicha", "cyrillichadc", "cyrillichrdsn", "cyrillici", "cyrillicidiaeresis", "cyrillicie", "cyrillicigrave", "cyrillicii", "cyrillicimacron", "cyrillicishrt", "cyrillicishrttail", "cyrillicizhitsa", "cyrillicizhitsadoublegrave", "cyrillicje", "cyrillick", "cyrillickabashkir", "cyrillickadc", "cyrillickahook", "cyrillickastroke", "cyrillickavertstroke", "cyrillickje", "cyrillickoppa", "cyrillicksi", "cyrillicl", "cyrilliclittleyus", "cyrilliclittleyusiotified", "cyrilliclje", "cyrillicm", "cyrillicn", "cyrillicnje", "cyrillico", "cyrillicobarred", "cyrillicobarreddiaeresis", "cyrillicodiaeresis", "cyrillicomega", "cyrillicomegaround", "cyrillicomegatitlo", "cyrillicot", "cyrillicp", "cyrillicpemidhook", "cyrillicpsi", "cyrillicr", "cyrillics", "cyrillicschwa", "cyrillicschwadiaeresis", "cyrillicsdsc", "cyrillicsemisoft", "cyrillicsftsn", "cyrillicsh", "cyrillicshch", "cyrillicshha", "cyrillict", "cyrillictedc", "cyrillictetse", "cyrillictshe", "cyrillicu", "cyrillicudiaeresis", "cyrillicudoubleacute", "cyrillicuk", "cyrillicumacron", "cyrillicushrt", "cyrillicv", "cyrillicya", "cyrillicyat", "cyrillicyerudiaeresis", "cyrillicyi", "cyrillicyo", "cyrillicystr", "cyrillicystrstroke", "cyrillicyu", "cyrillicz", "cyrilliczdsc", "cyrilliczediaeresis", "cyrilliczh", "cyrilliczhebreve", "cyrilliczhedescender", "cyrilliczhediaeresis", "d", "dag", "dagger", "daleth", "dasharrow", "dashedleftarrow", "dashedrightarrow", "dashv", "datasetvariable", "date", "dayoftheweek", "dayspermonth", "dbinom", "dcaron", "dcurl", "ddag", "ddagger", "dddot", "ddot", "ddots", "decrement", "decrementcounter", "decrementedcounter", "decrementpagenumber", "decrementsubpagenumber", "decrementvalue", "defaultinterface", "defaultobjectpage", "defaultobjectreference", "defcatcodecommand", "defconvertedargument", "defconvertedcommand", "defconvertedvalue", "define", "defineMPinstance", "defineTABLEsetup", "defineaccent", "defineactivecharacter", "definealternativestyle", "defineanchor", "defineattachment", "defineattribute", "definebackground", "definebar", "defineblock", "definebodyfont", "definebodyfontenvironment", "definebodyfontswitch", "definebreakpoint", "definebreakpoints", "definebtx", "definebtxdataset", "definebtxregister", "definebtxrendering", "definebuffer", "definebutton", "definecapitals", "definecharacter", "definecharacterkerning", "definecharacterspacing", "definechemical", "definechemicals", "definechemicalsymbol", "definecollector", "definecolor", "definecolorgroup", "definecolumnbreak", "definecolumnset", "definecolumnsetarea", "definecolumnsetspan", "definecombination", "definecombinedlist", "definecommand", "definecomment", "definecomplexorsimple", "definecomplexorsimpleempty", "defineconversion", "defineconversionset", "definecounter", "definedataset", "definedelimitedtext", "definedeq", "definedescription", "definedfont", "defineeffect", "defineenumeration", "defineexpandable", "defineexternalfigure", "definefacingfloat", "definefallbackfamily", "definefield", "definefieldbody", "definefieldbodyset", "definefieldcategory", "definefieldstack", "definefiguresymbol", "definefileconstant", "definefilefallback", "definefilesynonym", "definefiller", "definefirstline", "definefittingpage", "definefloat", "definefont", "definefontalternative", "definefontfallback", "definefontfamily", "definefontfamilypreset", "definefontfeature", "definefontfile", "definefontsize", "definefontsolution", "definefontstyle", "definefontsynonym", "defineformula", "defineformulaalternative", "defineformulaframed", "defineframed", "defineframedcontent", "defineframedtable", "defineframedtext", "definefrozenfont", "defineglobalcolor", "definegraphictypesynonym", "definegridsnapping", "definehbox", "definehead", "defineheadalternative", "definehelp", "definehigh", "definehighlight", "definehspace", "definehypenationfeatures", "defineindentedtext", "defineindenting", "defineinitial", "defineinsertion", "defineinteraction", "defineinteractionbar", "defineinteractionmenu", "defineinterfaceconstant", "defineinterfaceelement", "defineinterfacevariable", "defineinterlinespace", "defineintermediatecolor", "defineitemgroup", "defineitems", "definelabel", "definelabelclass", "definelayer", "definelayerpreset", "definelayout", "definelinefiller", "definelinenote", "definelinenumbering", "definelines", "definelist", "definelistalternative", "definelistextra", "definelow", "definelowhigh", "definelowmidhigh", "definemakeup", "definemarginblock", "definemargindata", "definemarker", "definemarking", "definemathaccent", "definemathalignment", "definemathcases", "definemathcommand", "definemathdouble", "definemathdoubleextensible", "definemathematics", "definemathextensible", "definemathfence", "definemathfraction", "definemathframed", "definemathmatrix", "definemathornament", "definemathover", "definemathoverextensible", "definemathovertextextensible", "definemathradical", "definemathstackers", "definemathstyle", "definemathtriplet", "definemathunder", "definemathunderextensible", "definemathundertextextensible", "definemathunstacked", "definemeasure", "definemessageconstant", "definemixedcolumns", "definemode", "definemultitonecolor", "definenamedcolor", "definenamespace", "definenarrower", "definenote", "defineornament", "defineoutputroutine", "defineoutputroutinecommand", "defineoverlay", "definepage", "definepagebreak", "definepagechecker", "definepagecolumns", "definepageinjection", "definepageinjectionalternative", "definepageshift", "definepagestate", "definepairedbox", "definepalet", "definepapersize", "defineparagraph", "defineparagraphs", "defineparallel", "defineparbuilder", "defineperiodkerning", "defineplacement", "definepositioning", "defineprefixset", "defineprocesscolor", "defineprocessor", "defineprofile", "defineprogram", "definepushbutton", "definepushsymbol", "definereference", "definereferenceformat", "defineregister", "definerenderingwindow", "defineresetset", "defineruby", "definescale", "definescript", "definesection", "definesectionblock", "definesectionlevels", "defineselector", "defineseparatorset", "defineshift", "definesidebar", "definesort", "definesorting", "definespotcolor", "definestartstop", "definestyle", "definestyleinstance", "definesubfield", "definesubformula", "definesymbol", "definesynonym", "definesynonyms", "definesystemattribute", "definesystemconstant", "definesystemvariable", "definetabletemplate", "definetabulate", "definetabulation", "definetext", "definetextbackground", "definetextflow", "definetextnote", "definetokenlist", "definetooltip", "definetransparency", "definetwopasslist", "definetype", "definetypeface", "definetypescriptprefix", "definetypescriptsynonym", "definetypesetting", "definetyping", "defineunit", "defineuserdata", "defineuserdataalternative", "defineviewerlayer", "definevspace", "definevspacing", "definevspacingamount", "definextable", "delimited", "delimitedtext", "delta", "depthofstring", "depthonlybox", "depthspanningtext", "depthstrut", "determineheadnumber", "determinelistcharacteristics", "determinenoflines", "determineregistercharacteristics", "devanagarinumerals", "dfrac", "dhook", "diameter", "diamond", "diamondsuit", "differentialD", "differentiald", "digamma", "digits", "dimensiontocount", "directboxfromcache", "directcolor", "directcolored", "directconvertedcounter", "directcopyboxfromcache", "directdummyparameter", "directgetboxllx", "directgetboxlly", "directhighlight", "directlocalframed", "directluacode", "directselect", "directsetbar", "directsetup", "directsymbol", "directvspacing", "dis", "disabledirectives", "disableexperiments", "disablemode", "disableoutputstream", "disableparpositions", "disableregime", "disabletrackers", "displaymath", "displaymathematics", "displaymessage", "distributedhsize", "div", "dividedsize", "divideontimes", "divides", "doadaptleftskip", "doadaptrightskip", "doaddfeature", "doassign", "doassignempty", "doboundtext", "docheckassignment", "docheckedpagestate", "docheckedpair", "documentvariable", "dodoubleargument", "dodoubleargumentwithset", "dodoubleempty", "dodoubleemptywithset", "dodoublegroupempty", "doeassign", "doexpandedrecurse", "dofastloopcs", "dogetattribute", "dogetattributeid", "dogetcommacommandelement", "dogobbledoubleempty", "dogobblesingleempty", "doif", "doifMPgraphicelse", "doifallcommon", "doifallcommonelse", "doifalldefinedelse", "doifallmodes", "doifallmodeselse", "doifassignmentelse", "doifassignmentelsecs", "doifblackelse", "doifbothsides", "doifbothsidesoverruled", "doifboxelse", "doifbufferelse", "doifcolor", "doifcolorelse", "doifcommandhandler", "doifcommandhandlerelse", "doifcommon", "doifcommonelse", "doifcontent", "doifconversiondefinedelse", "doifconversionnumberelse", "doifcounter", "doifcounterelse", "doifcurrentfonthasfeatureelse", "doifdefined", "doifdefinedcounter", "doifdefinedcounterelse", "doifdefinedelse", "doifdimensionelse", "doifdimenstringelse", "doifdocumentargument", "doifdocumentargumentelse", "doifdocumentfilename", "doifdocumentfilenameelse", "doifdocumentvariable", "doifdocumentvariableelse", "doifdrawingblackelse", "doifelse", "doifelseMPgraphic", "doifelseallcommon", "doifelsealldefined", "doifelseallmodes", "doifelseassignment", "doifelseassignmentcs", "doifelseblack", "doifelsebox", "doifelseboxincache", "doifelsebuffer", "doifelsecolor", "doifelsecommandhandler", "doifelsecommon", "doifelseconversiondefined", "doifelseconversionnumber", "doifelsecounter", "doifelsecurrentfonthasfeature", "doifelsecurrentsortingused", "doifelsecurrentsynonymshown", "doifelsecurrentsynonymused", "doifelsedefined", "doifelsedefinedcounter", "doifelsedimension", "doifelsedimenstring", "doifelsedocumentargument", "doifelsedocumentfilename", "doifelsedocumentvariable", "doifelsedrawingblack", "doifelseempty", "doifelseemptyvalue", "doifelseemptyvariable", "doifelseenv", "doifelsefastoptionalcheck", "doifelsefastoptionalcheckcs", "doifelsefieldbody", "doifelsefieldcategory", "doifelsefigure", "doifelsefile", "doifelsefiledefined", "doifelsefileexists", "doifelsefirstchar", "doifelseflagged", "doifelsefontchar", "doifelsefontfeature", "doifelsefontpresent", "doifelsefontsynonym", "doifelseframed", "doifelsehasspace", "doifelsehelp", "doifelseincsname", "doifelseinelement", "doifelseinputfile", "doifelseinsertion", "doifelseinset", "doifelseinstring", "doifelseinsymbolset", "doifelseintoks", "doifelseintwopassdata", "doifelseitalic", "doifelselanguage", "doifelselayerdata", "doifelselayoutdefined", "doifelselayoutsomeline", "doifelselayouttextline", "doifelseleapyear", "doifelselist", "doifelselocation", "doifelselocfile", "doifelsemainfloatbody", "doifelsemarkedpage", "doifelsemarking", "doifelsemeaning", "doifelsemessage", "doifelsemode", "doifelsenextbgroup", "doifelsenextbgroupcs", "doifelsenextchar", "doifelsenextoptional", "doifelsenextoptionalcs", "doifelsenextparenthesis", "doifelsenonzeropositive", "doifelsenoteonsamepage", "doifelsenothing", "doifelsenumber", "doifelseobjectfound", "doifelseobjectreferencefound", "doifelseoddpage", "doifelseoddpagefloat", "doifelseoldercontext", "doifelseolderversion", "doifelseoverlapping", "doifelseoverlay", "doifelseparallel", "doifelseparentfile", "doifelsepath", "doifelsepathexists", "doifelsepatterns", "doifelseposition", "doifelsepositionaction", "doifelsepositiononpage", "doifelsepositionsonsamepage", "doifelsepositionsonthispage", "doifelsepositionsused", "doifelsereferencefound", "doifelserightpage", "doifelserightpagefloat", "doifelserighttoleftinbox", "doifelsesamelinereference", "doifelsesamestring", "doifelsesetups", "doifelsesomebackground", "doifelsesomespace", "doifelsesomething", "doifelsesometoks", "doifelsestringinstring", "doifelsestructurelisthasnumber", "doifelsestructurelisthaspage", "doifelsesymboldefined", "doifelsesymbolset", "doifelsetext", "doifelsetextflow", "doifelsetextflowcollector", "doifelsetopofpage", "doifelsetypingfile", "doifelseundefined", "doifelseurldefined", "doifelsevalue", "doifelsevaluenothing", "doifelsevariable", "doifempty", "doifemptyelse", "doifemptytoks", "doifemptyvalue", "doifemptyvalueelse", "doifemptyvariable", "doifemptyvariableelse", "doifenv", "doifenvelse", "doiffastoptionalcheckcselse", "doiffastoptionalcheckelse", "doiffieldbodyelse", "doiffieldcategoryelse", "doiffigureelse", "doiffile", "doiffiledefinedelse", "doiffileelse", "doiffileexistselse", "doiffirstcharelse", "doifflaggedelse", "doiffontcharelse", "doiffontfeatureelse", "doiffontpresentelse", "doiffontsynonymelse", "doifhasspaceelse", "doifhelpelse", "doifincsnameelse", "doifinelementelse", "doifinputfileelse", "doifinsertionelse", "doifinset", "doifinsetelse", "doifinstring", "doifinstringelse", "doifinsymbolset", "doifinsymbolsetelse", "doifintokselse", "doifintwopassdataelse", "doifitalicelse", "doiflanguageelse", "doiflayerdataelse", "doiflayoutdefinedelse", "doiflayoutsomelineelse", "doiflayouttextlineelse", "doifleapyearelse", "doiflistelse", "doiflocationelse", "doiflocfileelse", "doifmainfloatbodyelse", "doifmarkingelse", "doifmeaningelse", "doifmessageelse", "doifmode", "doifmodeelse", "doifnextbgroupcselse", "doifnextbgroupelse", "doifnextcharelse", "doifnextoptionalcselse", "doifnextoptionalelse", "doifnextparenthesiselse", "doifnonzeropositiveelse", "doifnot", "doifnotallcommon", "doifnotallmodes", "doifnotcommandhandler", "doifnotcommon", "doifnotcounter", "doifnotdocumentargument", "doifnotdocumentfilename", "doifnotdocumentvariable", "doifnotempty", "doifnotemptyvalue", "doifnotemptyvariable", "doifnotenv", "doifnoteonsamepageelse", "doifnotescollected", "doifnotfile", "doifnotflagged", "doifnothing", "doifnothingelse", "doifnotinset", "doifnotinsidesplitfloat", "doifnotinstring", "doifnotmode", "doifnotnumber", "doifnotsamestring", "doifnotsetups", "doifnotvalue", "doifnotvariable", "doifnumber", "doifnumberelse", "doifobjectfoundelse", "doifobjectreferencefoundelse", "doifoddpageelse", "doifoddpagefloatelse", "doifoldercontextelse", "doifolderversionelse", "doifoverlappingelse", "doifoverlayelse", "doifparallelelse", "doifparentfileelse", "doifpathelse", "doifpathexistselse", "doifpatternselse", "doifposition", "doifpositionaction", "doifpositionactionelse", "doifpositionelse", "doifpositiononpageelse", "doifpositionsonsamepageelse", "doifpositionsonthispageelse", "doifpositionsusedelse", "doifreferencefoundelse", "doifrightpagefloatelse", "doifrighttoleftinboxelse", "doifsamelinereferenceelse", "doifsamestring", "doifsamestringelse", "doifsetups", "doifsetupselse", "doifsomebackground", "doifsomebackgroundelse", "doifsomespaceelse", "doifsomething", "doifsomethingelse", "doifsometoks", "doifsometokselse", "doifstringinstringelse", "doifstructurelisthasnumberelse", "doifstructurelisthaspageelse", "doifsymboldefinedelse", "doifsymbolsetelse", "doiftext", "doiftextelse", "doiftextflowcollectorelse", "doiftextflowelse", "doiftopofpageelse", "doiftypingfileelse", "doifundefined", "doifundefinedcounter", "doifundefinedelse", "doifunknownfontfeature", "doifurldefinedelse", "doifvalue", "doifvalueelse", "doifvaluenothing", "doifvaluenothingelse", "doifvaluesomething", "doifvariable", "doifvariableelse", "doindentation", "dollar", "doloop", "doloopoverlist", "donothing", "dontconvertfont", "dontleavehmode", "dontpermitspacesbetweengroups", "dopositionaction", "doprocesslocalsetups", "doquadrupleargument", "doquadrupleempty", "doquadruplegroupempty", "doquintupleargument", "doquintupleempty", "doquintuplegroupempty", "dorechecknextindentation", "dorecurse", "dorepeatwithcommand", "doreplacefeature", "doresetandafffeature", "doresetattribute", "dorotatebox", "dosetattribute", "dosetleftskipadaption", "dosetrightskipadaption", "dosetupcheckedinterlinespace", "doseventupleargument", "doseventupleempty", "dosingleargument", "dosingleempty", "dosinglegroupempty", "dosixtupleargument", "dosixtupleempty", "dostepwiserecurse", "dosubtractfeature", "dot", "doteq", "doteqdot", "dotfskip", "dotlessI", "dotlessJ", "dotlessi", "dotlessj", "dotlessjstroke", "dotminus", "dotoks", "dotplus", "dotripleargument", "dotripleargumentwithset", "dotripleempty", "dotripleemptywithset", "dotriplegroupempty", "dots", "dottedcircle", "dottedrightarrow", "doublebar", "doublebond", "doublebrace", "doublebracket", "doublecap", "doublecup", "doubleparent", "doubleprime", "doubleverticalbar", "dowith", "dowithnextbox", "dowithnextboxcontent", "dowithnextboxcontentcs", "dowithnextboxcs", "dowithpargument", "dowithrange", "dowithwargument", "downarrow", "downdasharrow", "downdownarrows", "downharpoonleft", "downharpoonright", "downuparrows", "downwhitearrow", "downzigzagarrow", "dpofstring", "dstroke", "dtail", "dummydigit", "dummyparameter", "dzcaronligature", "dzligature", "eTeX", "eacute", "ebreve", "ecaron", "ecedilla", "ecircumflex", "ecircumflexacute", "ecircumflexdotbelow", "ecircumflexgrave", "ecircumflexhook", "ecircumflextilde", "edefconvertedargument", "ediaeresis", "edotaccent", "edotbelow", "edoublegrave", "efcmaxheight", "efcmaxwidth", "efcminheight", "efcminwidth", "efcparameter", "effect", "egrave", "ehook", "einvertedbreve", "elapsedseconds", "elapsedtime", "eleftarrowfill", "eleftharpoondownfill", "eleftharpoonupfill", "eleftrightarrowfill", "ell", "em", "emacron", "emdash", "emphasisboldface", "emphasistypeface", "emptylines", "emptyset", "emquad", "emspace", "enabledirectives", "enableexperiments", "enablemode", "enableoutputstream", "enableparpositions", "enableregime", "enabletrackers", "endash", "endnote", "enquad", "enskip", "enspace", "env", "environment", "envvar", "eogonek", "eoverbarfill", "eoverbracefill", "eoverbracketfill", "eoverparentfill", "epos", "epsilon", "eq", "eqcirc", "eqeq", "eqeqeq", "eqgtr", "eqless", "eqsim", "eqslantgtr", "eqslantless", "equaldigits", "equalscolon", "equiv", "erightarrowfill", "erightharpoondownfill", "erightharpoonupfill", "eta", "eth", "ethiopic", "etilde", "etwoheadrightarrowfill", "eunderbarfill", "eunderbracefill", "eunderbracketfill", "eunderparentfill", "exclamdown", "executeifdefined", "exists", "exitloop", "exitloopnow", "expandcheckedcsname", "expanded", "expandeddoif", "expandeddoifelse", "expandeddoifnot", "expandfontsynonym", "expdoif", "expdoifcommonelse", "expdoifelse", "expdoifelsecommon", "expdoifelseinset", "expdoifinsetelse", "expdoifnot", "exponentiale", "externalfigure", "externalfigurecollectionmaxheight", "externalfigurecollectionmaxwidth", "externalfigurecollectionminheight", "externalfigurecollectionminwidth", "externalfigurecollectionparameter", "fakebox", "fallingdotseq", "fastdecrement", "fastincrement", "fastlocalframed", "fastloopfinal", "fastloopindex", "fastscale", "fastsetup", "fastsetupwithargument", "fastsetupwithargumentswapped", "fastswitchtobodyfont", "fastsxsy", "feature", "fence", "fenced", "fetchallmarkings", "fetchallmarks", "fetchmark", "fetchmarking", "fetchonemark", "fetchonemarking", "fetchruntinecommand", "fetchtwomarkings", "fetchtwomarks", "ffiligature", "ffligature", "fflligature", "fhook", "field", "fieldbody", "fieldstack", "fifthoffivearguments", "fifthofsixarguments", "figurefilename", "figurefilepath", "figurefiletype", "figurefullname", "figureheight", "figurenaturalheight", "figurenaturalwidth", "figurespace", "figuresymbol", "figurewidth", "filename", "filigature", "filledhboxb", "filledhboxc", "filledhboxg", "filledhboxk", "filledhboxm", "filledhboxr", "filledhboxy", "filler", "fillinline", "fillinrules", "fillintext", "fillupto", "filterfromnext", "filterfromvalue", "filterpages", "filterreference", "findtwopassdata", "finishregisterentry", "firstcharacter", "firstcounter", "firstcountervalue", "firstinlist", "firstoffivearguments", "firstoffourarguments", "firstofoneargument", "firstofoneunexpanded", "firstofsixarguments", "firstofthreearguments", "firstofthreeunexpanded", "firstoftwoarguments", "firstoftwounexpanded", "firstrealpage", "firstrealpagenumber", "firstsubcountervalue", "firstsubpage", "firstsubpagenumber", "firstuserpage", "firstuserpagenumber", "fitfield", "fitfieldframed", "fittopbaselinegrid", "fiveeighths", "fivesixths", "fixedspace", "fixedspaces", "flag", "flat", "flligature", "floatuserdataparameter", "flushbox", "flushboxregister", "flushcollector", "flushedrightlastline", "flushlayer", "flushlocalfloats", "flushnextbox", "flushnotes", "flushoutputstream", "flushshapebox", "flushtextflow", "flushtokens", "flushtoks", "fontalternative", "fontbody", "fontchar", "fontcharbyindex", "fontclass", "fontclassname", "fontface", "fontfeaturelist", "fontsize", "fontstyle", "footnote", "footnotetext", "forall", "forcecharacterstripping", "forcelocalfloats", "forgeteverypar", "forgetparameters", "forgetparskip", "forgetragged", "formula", "formulanumber", "foundbox", "fourfifths", "fourperemspace", "fourthoffivearguments", "fourthoffourarguments", "fourthofsixarguments", "frac", "framed", "frameddimension", "framedparameter", "framedtext", "freezedimenmacro", "freezemeasure", "frenchspacing", "from", "fromlinenote", "frown", "frozenhbox", "frule", "gacute", "gamma", "gbreve", "gcaron", "gcircumflex", "gcommaaccent", "gdefconvertedargument", "gdefconvertedcommand", "gdotaccent", "ge", "geq", "geqq", "geqslant", "getMPdrawing", "getMPlayer", "getboxfromcache", "getboxllx", "getboxlly", "getbuffer", "getbufferdata", "getcommacommandsize", "getcommalistsize", "getdayoftheweek", "getdayspermonth", "getdefinedbuffer", "getdocumentargument", "getdocumentargumentdefault", "getdocumentfilename", "getdummyparameters", "getemptyparameters", "geteparameters", "getexpandedparameters", "getfiguredimensions", "getfirstcharacter", "getfirsttwopassdata", "getfromcommacommand", "getfromcommalist", "getfromtwopassdata", "getglyphdirect", "getglyphstyled", "getgparameters", "getinlineuserdata", "getlasttwopassdata", "getlocalfloat", "getlocalfloats", "getmarking", "getmessage", "getnamedglyphdirect", "getnamedglyphstyled", "getnamedtwopassdatalist", "getnaturaldimensions", "getnoflines", "getobject", "getobjectdimensions", "getpaletsize", "getparameters", "getprivatechar", "getprivateslot", "getrandomcount", "getrandomdimen", "getrandomfloat", "getrandomnumber", "getrandomseed", "getraweparameters", "getrawgparameters", "getrawnoflines", "getrawparameters", "getrawxparameters", "getreference", "getreferenceentry", "getroundednoflines", "gets", "getsubstring", "gettokenlist", "gettwopassdata", "gettwopassdatalist", "getuserdata", "getuvalue", "getvalue", "getvariable", "getvariabledefault", "getxparameters", "gg", "ggg", "gggtr", "gimel", "globaldisablemode", "globalenablemode", "globalletempty", "globalpopbox", "globalpopmacro", "globalpreventmode", "globalprocesscommalist", "globalpushbox", "globalpushmacro", "globalswapcounts", "globalswapdimens", "globalswapmacros", "globalundefine", "glyphfontfile", "gnapprox", "gneqq", "gnsim", "gobbledoubleempty", "gobbleeightarguments", "gobblefivearguments", "gobblefiveoptionals", "gobblefourarguments", "gobblefouroptionals", "gobbleninearguments", "gobbleoneargument", "gobbleoneoptional", "gobblesevenarguments", "gobblesingleempty", "gobblesixarguments", "gobblespacetokens", "gobbletenarguments", "gobblethreearguments", "gobblethreeoptionals", "gobbletwoarguments", "gobbletwooptionals", "gobbleuntil", "gobbleuntilrelax", "godown", "goto", "gotobox", "gotopage", "grabbufferdata", "grabbufferdatadirect", "grabuntil", "grave", "graycolor", "grayvalue", "greedysplitstring", "greekAlpha", "greekAlphadasia", "greekAlphadasiaperispomeni", "greekAlphadasiatonos", "greekAlphadasiavaria", "greekAlphaiotasub", "greekAlphaiotasubdasia", "greekAlphaiotasubdasiaperispomeni", "greekAlphaiotasubdasiatonos", "greekAlphaiotasubdasiavaria", "greekAlphaiotasubpsili", "greekAlphaiotasubpsiliperispomeni", "greekAlphaiotasubpsilitonos", "greekAlphaiotasubpsilivaria", "greekAlphamacron", "greekAlphapsili", "greekAlphapsiliperispomeni", "greekAlphapsilitonos", "greekAlphapsilivaria", "greekAlphatonos", "greekAlphavaria", "greekAlphavrachy", "greekBeta", "greekChi", "greekCoronis", "greekDelta", "greekEpsilon", "greekEpsilondasia", "greekEpsilondasiatonos", "greekEpsilondasiavaria", "greekEpsilonpsili", "greekEpsilonpsilitonos", "greekEpsilonpsilivaria", "greekEpsilontonos", "greekEpsilonvaria", "greekEta", "greekEtadasia", "greekEtadasiaperispomeni", "greekEtadasiatonos", "greekEtadasiavaria", "greekEtaiotasub", "greekEtaiotasubdasia", "greekEtaiotasubdasiaperispomeni", "greekEtaiotasubdasiatonos", "greekEtaiotasubdasiavaria", "greekEtaiotasubpsili", "greekEtaiotasubpsiliperispomeni", "greekEtaiotasubpsilitonos", "greekEtaiotasubpsilivaria", "greekEtapsili", "greekEtapsiliperispomeni", "greekEtapsilitonos", "greekEtapsilivaria", "greekEtatonos", "greekEtavaria", "greekGamma", "greekIota", "greekIotadasia", "greekIotadasiaperispomeni", "greekIotadasiatonos", "greekIotadasiavaria", "greekIotadialytika", "greekIotamacron", "greekIotapsili", "greekIotapsiliperispomeni", "greekIotapsilitonos", "greekIotapsilivaria", "greekIotatonos", "greekIotavaria", "greekIotavrachy", "greekKappa", "greekLambda", "greekMu", "greekNu", "greekOmega", "greekOmegadasia", "greekOmegadasiaperispomeni", "greekOmegadasiatonos", "greekOmegadasiavaria", "greekOmegaiotasub", "greekOmegaiotasubdasia", "greekOmegaiotasubdasiaperispomeni", "greekOmegaiotasubdasiatonos", "greekOmegaiotasubdasiavaria", "greekOmegaiotasubpsili", "greekOmegaiotasubpsiliperispomeni", "greekOmegaiotasubpsilitonos", "greekOmegaiotasubpsilivaria", "greekOmegapsili", "greekOmegapsiliperispomeni", "greekOmegapsilitonos", "greekOmegapsilivaria", "greekOmegatonos", "greekOmegavaria", "greekOmicron", "greekOmicrondasia", "greekOmicrondasiatonos", "greekOmicrondasiavaria", "greekOmicronpsili", "greekOmicronpsilitonos", "greekOmicronpsilivaria", "greekOmicrontonos", "greekOmicronvaria", "greekPhi", "greekPi", "greekPsi", "greekRho", "greekRhodasia", "greekSigma", "greekSigmalunate", "greekTau", "greekTheta", "greekUpsilon", "greekUpsilondasia", "greekUpsilondasiaperispomeni", "greekUpsilondasiatonos", "greekUpsilondasiavaria", "greekUpsilondialytika", "greekUpsilonmacron", "greekUpsilontonos", "greekUpsilonvaria", "greekUpsilonvrachy", "greekXi", "greekZeta", "greekalpha", "greekalphadasia", "greekalphadasiaperispomeni", "greekalphadasiatonos", "greekalphadasiavaria", "greekalphaiotasub", "greekalphaiotasubdasia", "greekalphaiotasubdasiaperispomeni", "greekalphaiotasubdasiatonos", "greekalphaiotasubdasiavaria", "greekalphaiotasubperispomeni", "greekalphaiotasubpsili", "greekalphaiotasubpsiliperispomeni", "greekalphaiotasubpsilitonos", "greekalphaiotasubpsilivaria", "greekalphaiotasubtonos", "greekalphaiotasubvaria", "greekalphamacron", "greekalphaoxia", "greekalphaperispomeni", "greekalphapsili", "greekalphapsiliperispomeni", "greekalphapsilitonos", "greekalphapsilivaria", "greekalphatonos", "greekalphavaria", "greekalphavrachy", "greekbeta", "greekbetaalt", "greekchi", "greekdasia", "greekdasiaperispomeni", "greekdasiatonos", "greekdasiavaria", "greekdelta", "greekdialytikaperispomeni", "greekdialytikatonos", "greekdialytikavaria", "greekdigamma", "greekepsilon", "greekepsilonalt", "greekepsilondasia", "greekepsilondasiatonos", "greekepsilondasiavaria", "greekepsilonoxia", "greekepsilonpsili", "greekepsilonpsilitonos", "greekepsilonpsilivaria", "greekepsilontonos", "greekepsilonvaria", "greeketa", "greeketadasia", "greeketadasiaperispomeni", "greeketadasiatonos", "greeketadasiavaria", "greeketaiotasub", "greeketaiotasubdasia", "greeketaiotasubdasiaperispomeni", "greeketaiotasubdasiatonos", "greeketaiotasubdasiavaria", "greeketaiotasubperispomeni", "greeketaiotasubpsili", "greeketaiotasubpsiliperispomeni", "greeketaiotasubpsilitonos", "greeketaiotasubpsilivaria", "greeketaiotasubtonos", "greeketaiotasubvaria", "greeketaoxia", "greeketaperispomeni", "greeketapsili", "greeketapsiliperispomeni", "greeketapsilitonos", "greeketapsilivaria", "greeketatonos", "greeketavaria", "greekfinalsigma", "greekgamma", "greekiota", "greekiotadasia", "greekiotadasiaperispomeni", "greekiotadasiatonos", "greekiotadasiavaria", "greekiotadialytika", "greekiotadialytikaperispomeni", "greekiotadialytikatonos", "greekiotadialytikavaria", "greekiotamacron", "greekiotaoxia", "greekiotaperispomeni", "greekiotapsili", "greekiotapsiliperispomeni", "greekiotapsilitonos", "greekiotapsilivaria", "greekiotatonos", "greekiotavaria", "greekiotavrachy", "greekkappa", "greekkoppa", "greeklambda", "greekmu", "greeknu", "greeknumerals", "greeknumkoppa", "greekomega", "greekomegadasia", "greekomegadasiaperispomeni", "greekomegadasiatonos", "greekomegadasiavaria", "greekomegaiotasub", "greekomegaiotasubdasia", "greekomegaiotasubdasiaperispomeni", "greekomegaiotasubdasiatonos", "greekomegaiotasubdasiavaria", "greekomegaiotasubperispomeni", "greekomegaiotasubpsili", "greekomegaiotasubpsiliperispomeni", "greekomegaiotasubpsilitonos", "greekomegaiotasubpsilivaria", "greekomegaiotasubtonos", "greekomegaiotasubvaria", "greekomegaoxia", "greekomegaperispomeni", "greekomegapsili", "greekomegapsiliperispomeni", "greekomegapsilitonos", "greekomegapsilivaria", "greekomegatonos", "greekomegavaria", "greekomicron", "greekomicrondasia", "greekomicrondasiatonos", "greekomicrondasiavaria", "greekomicronoxia", "greekomicronpsili", "greekomicronpsilitonos", "greekomicronpsilivaria", "greekomicrontonos", "greekomicronvaria", "greekoxia", "greekperispomeni", "greekphi", "greekphialt", "greekpi", "greekpialt", "greekprosgegrammeni", "greekpsi", "greekpsili", "greekpsiliperispomeni", "greekpsilitonos", "greekpsilivaria", "greekrho", "greekrhoalt", "greekrhodasia", "greekrhopsili", "greeksampi", "greeksigma", "greeksigmalunate", "greekstigma", "greektau", "greektheta", "greekthetaalt", "greektonos", "greekupsilon", "greekupsilondasia", "greekupsilondasiaperispomeni", "greekupsilondasiatonos", "greekupsilondasiavaria", "greekupsilondiaeresis", "greekupsilondialytikaperispomeni", "greekupsilondialytikatonos", "greekupsilondialytikavaria", "greekupsilonmacron", "greekupsilonoxia", "greekupsilonperispomeni", "greekupsilonpsili", "greekupsilonpsiliperispomeni", "greekupsilonpsilitonos", "greekupsilonpsilivaria", "greekupsilontonos", "greekupsilonvaria", "greekupsilonvrachy", "greekvaria", "greekxi", "greekzeta", "grid", "groupedcommand", "gsetboxllx", "gsetboxlly", "gstroke", "gt", "gtrapprox", "gtrdot", "gtreqless", "gtreqqless", "gtrless", "gtrsim", "guilsingleleft", "guilsingleright", "gujaratinumerals", "gurmurkhinumerals", "hairline", "hairspace", "halflinestrut", "halfstrut", "halfwaybox", "handletokens", "handwritten", "hangul", "hanzi", "hash", "hat", "hbar", "hboxofvbox", "hboxreference", "hcaron", "hcircumflex", "hdofstring", "headhbox", "headlanguage", "headnumber", "headnumbercontent", "headnumberdistance", "headnumberwidth", "headreferenceattributes", "headsetupspacing", "headtext", "headtextcontent", "headtextdistance", "headtexts", "headtextwidth", "headvbox", "headwidth", "heartsuit", "hebrewAlef", "hebrewAyin", "hebrewBet", "hebrewDalet", "hebrewGimel", "hebrewHe", "hebrewHet", "hebrewKaf", "hebrewKaffinal", "hebrewLamed", "hebrewMem", "hebrewMemfinal", "hebrewNun", "hebrewNunfinal", "hebrewPe", "hebrewPefinal", "hebrewQof", "hebrewResh", "hebrewSamekh", "hebrewShin", "hebrewTav", "hebrewTet", "hebrewTsadi", "hebrewTsadifinal", "hebrewVav", "hebrewYod", "hebrewZayin", "heightanddepthofstring", "heightofstring", "heightspanningtext", "helptext", "hglue", "hiddenbar", "hiddencitation", "hiddencite", "hideblocks", "high", "highlight", "highordinalstr", "hilo", "himilo", "hl", "hookleftarrow", "hookrightarrow", "horizontalgrowingbar", "horizontalpositionbar", "hpackbox", "hpackedbox", "hphantom", "hpos", "hsizefraction", "hslash", "hsmash", "hsmashbox", "hsmashed", "hspace", "hstroke", "htdpofstring", "htofstring", "hyphen", "hyphenatedcoloredword", "hyphenatedfile", "hyphenatedfilename", "hyphenatedhbox", "hyphenatedpar", "hyphenatedurl", "hyphenatedword", "iacute", "ibox", "ibreve", "icaron", "icircumflex", "ideographichalffillspace", "ideographicspace", "idiaeresis", "idotaccent", "idotbelow", "idoublegrave", "ifassignment", "iff", "ifinobject", "ifinoutputstream", "ifparameters", "iftrialtypesetting", "ignoreimplicitspaces", "ignoretagsinexport", "ignorevalue", "igrave", "ihook", "iiiint", "iiiintop", "iiint", "iiintop", "iint", "iintop", "iinvertedbreve", "ijligature", "imacron", "imaginaryi", "imaginaryj", "imath", "immediatesavetwopassdata", "impliedby", "implies", "imply", "in", "includemenu", "includeversioninfo", "increment", "incrementcounter", "incrementedcounter", "incrementpagenumber", "incrementsubpagenumber", "incrementvalue", "indentation", "index", "infofont", "infofontbold", "inframed", "infty", "infull", "inheritparameter", "inhibitblank", "ininner", "ininneredge", "ininnermargin", "initializeboxstack", "inleft", "inleftedge", "inleftmargin", "inline", "inlinebuffer", "inlinedbox", "inlinemath", "inlinemathematics", "inlinemessage", "inlineordisplaymath", "inlineprettyprintbuffer", "inlinerange", "inmargin", "inmframed", "innerflushshapebox", "inother", "inouter", "inouteredge", "inoutermargin", "input", "inputfilebarename", "inputfilename", "inputfilerealsuffix", "inputfilesuffix", "inputgivenfile", "inright", "inrightedge", "inrightmargin", "insertpages", "installactionhandler", "installactivecharacter", "installanddefineactivecharacter", "installattributestack", "installautocommandhandler", "installautosetuphandler", "installbasicautosetuphandler", "installbasicparameterhandler", "installbottomframerenderer", "installcommandhandler", "installcorenamespace", "installdefinehandler", "installdefinitionset", "installdefinitionsetmember", "installdirectcommandhandler", "installdirectparameterhandler", "installdirectparametersethandler", "installdirectsetuphandler", "installdirectstyleandcolorhandler", "installframedautocommandhandler", "installframedcommandhandler", "installglobalmacrostack", "installlanguage", "installleftframerenderer", "installmacrostack", "installnamespace", "installoutputroutine", "installpagearrangement", "installparameterhandler", "installparameterhashhandler", "installparametersethandler", "installparentinjector", "installrightframerenderer", "installrootparameterhandler", "installsetuphandler", "installsetuponlycommandhandler", "installshipoutmethod", "installsimplecommandhandler", "installsimpleframedcommandhandler", "installstyleandcolorhandler", "installswitchcommandhandler", "installswitchsetuphandler", "installtexdirective", "installtextracker", "installtopframerenderer", "installunitsseparator", "installunitsspace", "installversioninfo", "int", "intclockwise", "integerrounding", "integers", "interactionbar", "interactionbuttons", "interactionmenu", "intercal", "intertext", "intop", "invisibletimes", "invokepageheandler", "iogonek", "iota", "italic", "italicbold", "italiccorrection", "italicface", "item", "items", "itemtag", "itilde", "jcaron", "jcircumflex", "jmath", "jobfilename", "jobfilesuffix", "kap", "kappa", "kcaron", "kcommaaccent", "keepblocks", "keeplinestogether", "keepunwantedspaces", "kerncharacters", "khook", "kkra", "koreancirclenumerals", "koreannumerals", "koreannumeralsc", "koreannumeralsp", "koreanparentnumerals", "lVert", "labellanguage", "labeltext", "labeltexts", "lacute", "lambda", "lambdabar", "land", "langle", "language", "languageCharacters", "languagecharacters", "languagecharwidth", "lastcounter", "lastcountervalue", "lastdigit", "lastlinewidth", "lastnaturalboxdp", "lastnaturalboxht", "lastnaturalboxwd", "lastpredefinedsymbol", "lastrealpage", "lastrealpagenumber", "lastsubcountervalue", "lastsubpage", "lastsubpagenumber", "lasttwodigits", "lastuserpage", "lastuserpagenumber", "lateluacode", "latin", "layeredtext", "layerheight", "layerwidth", "lazysavetaggedtwopassdata", "lazysavetwopassdata", "lbar", "lbox", "lbrace", "lbracket", "lcaron", "lceil", "lcommaaccent", "lcurl", "ldotmiddle", "ldotp", "ldots", "le", "leadsto", "left", "leftaligned", "leftarrow", "leftarrowtail", "leftarrowtriangle", "leftbottombox", "leftbox", "leftdasharrow", "leftguillemot", "leftharpoondown", "leftharpoonup", "lefthbox", "leftheadtext", "leftlabeltext", "leftleftarrows", "leftline", "leftmathlabeltext", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "leftrightarrow", "leftrightarrows", "leftrightarrowtriangle", "leftrightharpoons", "leftrightsquigarrow", "leftskipadaption", "leftsquigarrow", "leftsubguillemot", "leftthreetimes", "lefttopbox", "lefttoright", "lefttorighthbox", "lefttorightvbox", "lefttorightvtop", "leftwavearrow", "leftwhitearrow", "leq", "leqq", "leqslant", "lessapprox", "lessdot", "lesseqgtr", "lesseqqgtr", "lessgtr", "lesssim", "letbeundefined", "letcatcodecommand", "letcscsname", "letcsnamecs", "letcsnamecsname", "letdummyparameter", "letempty", "letgvalue", "letgvalueempty", "letgvalurelax", "letterampersand", "letterat", "letterbackslash", "letterbar", "letterbgroup", "letterclosebrace", "lettercolon", "letterdollar", "letterdoublequote", "letteregroup", "letterescape", "letterexclamationmark", "letterhash", "letterhat", "letterleftbrace", "letterleftbracket", "letterleftparenthesis", "letterless", "lettermore", "letteropenbrace", "letterpercent", "letterquestionmark", "letterrightbrace", "letterrightbracket", "letterrightparenthesis", "lettersinglequote", "letterslash", "letterspacing", "lettertilde", "letterunderscore", "letvalue", "letvalueempty", "letvaluerelax", "lfence", "lfloor", "lgroup", "lhbox", "lhooknwarrow", "lhooksearrow", "limitatefirstline", "limitatelines", "limitatetext", "line", "linebox", "linefeed", "linenote", "linespanningtext", "linethickness", "linterval", "listcitation", "listcite", "listlength", "listnamespaces", "ljligature", "ll", "llangle", "llap", "llbracket", "llcorner", "lll", "llless", "lmoustache", "lnapprox", "lneq", "lneqq", "lnot", "lnsim", "loadanyfile", "loadanyfileonce", "loadbtxdefinitionfile", "loadbtxreplacementfile", "loadcldfile", "loadcldfileonce", "loadfontgoodies", "loadluafile", "loadluafileonce", "loadspellchecklist", "loadtexfile", "loadtexfileonce", "loadtypescriptfile", "localframed", "localframedwithsettings", "localhsize", "localpopbox", "localpopmacro", "localpushbox", "localpushmacro", "localundefine", "locatedfilepath", "locatefilepath", "locfilename", "logo", "lohi", "lointerval", "lomihi", "longleftarrow", "longleftrightarrow", "longmapsfrom", "longmapsto", "longrightarrow", "longrightsquigarrow", "looparrowleft", "looparrowright", "lor", "low", "lowerbox", "lowercased", "lowercasestring", "lowerleftdoubleninequote", "lowerleftsingleninequote", "lowerrightdoubleninequote", "lowerrightsingleninequote", "lozenge", "lparent", "lrcorner", "lrointerval", "lrtbbox", "lstroke", "lt", "ltimes", "ltop", "ltrhbox", "ltrvbox", "ltrvtop", "luaTeX", "luacode", "luaconditional", "luaenvironment", "luaexpanded", "luaexpr", "luafunction", "luajitTeX", "luamajorversion", "luametaTeX", "luaminorversion", "luaparameterset", "luasetup", "luaversion", "lvert", "m", "mLeftarrow", "mLeftrightarrow", "mRightarrow", "mainlanguage", "makecharacteractive", "makerawcommalist", "makestrutofbox", "maltese", "mapfontsize", "mapsdown", "mapsfrom", "mapsto", "mapsup", "margindata", "margintext", "markcontent", "markedpages", "marking", "markinjector", "markpage", "mat", "math", "mathampersand", "mathbf", "mathbi", "mathblackboard", "mathbs", "mathdefault", "mathdollar", "mathdouble", "mathematics", "mathfraktur", "mathfunction", "mathhash", "mathhyphen", "mathit", "mathitalic", "mathlabellanguage", "mathlabeltext", "mathlabeltexts", "mathop", "mathover", "mathpercent", "mathrm", "mathscript", "mathsl", "mathss", "mathtext", "mathtextbf", "mathtextbi", "mathtextbs", "mathtextit", "mathtextsl", "mathtexttf", "mathtf", "mathtriplet", "mathtt", "mathunder", "mathupright", "mathword", "mathwordbf", "mathwordbi", "mathwordbs", "mathwordit", "mathwordsl", "mathwordtf", "maxaligned", "mbox", "mcframed", "measure", "measured", "measuredangle", "measuredeq", "medskip", "medspace", "menubutton", "mequal", "message", "mfence", "mframed", "mfunction", "mfunctionlabeltext", "mhbox", "mho", "mhookleftarrow", "mhookrightarrow", "mid", "midaligned", "middle", "middlealigned", "middlebox", "midhbox", "midsubsentence", "minimalhbox", "minus", "minuscolon", "mirror", "mixedcaps", "mkvibuffer", "mleftarrow", "mleftharpoondown", "mleftharpoonup", "mleftrightarrow", "mleftrightharpoons", "mmapsto", "models", "moduleparameter", "molecule", "mono", "monobold", "mononormal", "month", "monthlong", "monthshort", "mp", "mprandomnumber", "mrel", "mrightarrow", "mrightharpoondown", "mrightharpoonup", "mrightleftharpoons", "mrightoverleftarrow", "mtext", "mtriplerel", "mtwoheadleftarrow", "mtwoheadrightarrow", "mu", "multimap", "nHdownarrow", "nHuparrow", "nLeftarrow", "nLeftrightarrow", "nRightarrow", "nVDash", "nVdash", "nVleftarrow", "nVleftrightarrow", "nVrightarrow", "nabla", "nacute", "namedheadnumber", "namedstructureheadlocation", "namedstructureuservariable", "namedstructurevariable", "namedtaggedlabeltexts", "napostrophe", "napprox", "napproxEq", "narrownobreakspace", "nasymp", "natural", "naturalhbox", "naturalhpack", "naturalnumbers", "naturaltpack", "naturalvbox", "naturalvcenter", "naturalvpack", "naturalvtop", "naturalwd", "ncaron", "ncommaaccent", "ncong", "ncurl", "ndivides", "ne", "nearrow", "neg", "negatecolorbox", "negated", "negativesign", "negemspace", "negenspace", "negthinspace", "neng", "neq", "nequiv", "neswarrow", "newattribute", "newcatcodetable", "newcounter", "newevery", "newfrenchspacing", "newmode", "newsignal", "newsystemmode", "nexists", "nextbox", "nextboxdp", "nextboxht", "nextboxhtdp", "nextboxwd", "nextcounter", "nextcountervalue", "nextdepth", "nextparagraphs", "nextrealpage", "nextrealpagenumber", "nextsubcountervalue", "nextsubpage", "nextsubpagenumber", "nextuserpage", "nextuserpagenumber", "ngeq", "ngrave", "ngtr", "ngtrless", "ngtrsim", "ni", "nihongo", "nin", "njligature", "nleftarrow", "nleftrightarrow", "nleq", "nless", "nlessgtr", "nlesssim", "nmid", "nni", "nobar", "nobreakspace", "nocap", "nocharacteralign", "nocitation", "nocite", "nodetostring", "noffigurepages", "noflines", "noflocalfloats", "noheaderandfooterlines", "noheightstrut", "noindentation", "noitem", "nonfrenchspacing", "nonmathematics", "normal", "normalboldface", "normalframedwithsettings", "normalitalicface", "normalizebodyfontsize", "normalizedfontsize", "normalizefontdepth", "normalizefontheight", "normalizefontline", "normalizefontwidth", "normalizetextdepth", "normalizetextheight", "normalizetextline", "normalizetextwidth", "normalslantedface", "normaltypeface", "nospace", "not", "note", "notesymbol", "notin", "notopandbottomlines", "notragged", "nowns", "nparallel", "nprec", "npreccurlyeq", "nrightarrow", "nsim", "nsimeq", "nsqsubseteq", "nsqsupseteq", "nsubset", "nsubseteq", "nsucc", "nsucccurlyeq", "nsupset", "nsupseteq", "ntilde", "ntimes", "ntriangleleft", "ntrianglelefteq", "ntriangleright", "ntrianglerighteq", "nu", "numberofpoints", "numbers", "nvDash", "nvdash", "nvleftarrow", "nvleftrightarrow", "nvrightarrow", "nwarrow", "nwsearrow", "oacute", "obeydepth", "objectdepth", "objectheight", "objectmargin", "objectwidth", "obox", "obreve", "ocaron", "ocircumflex", "ocircumflexacute", "ocircumflexdotbelow", "ocircumflexgrave", "ocircumflexhook", "ocircumflextilde", "odiaeresis", "odiaeresismacron", "odot", "odotaccent", "odotaccentmacron", "odotbelow", "odoublegrave", "oeligature", "offset", "offsetbox", "ograve", "ohm", "ohook", "ohorn", "ohornacute", "ohorndotbelow", "ohorngrave", "ohornhook", "ohorntilde", "ohungarumlaut", "oiiint", "oiint", "oint", "ointclockwise", "ointctrclockwise", "oinvertedbreve", "omacron", "omega", "omicron", "ominus", "onedigitrounding", "oneeighth", "onefifth", "onehalf", "onequarter", "onesixth", "onesuperior", "onethird", "oogonek", "oogonekmacron", "operatorlanguage", "operatortext", "oplus", "ordfeminine", "ordinaldaynumber", "ordinalstr", "ordmasculine", "ornamenttext", "oslash", "ostroke", "ostrokeacute", "otilde", "otildemacron", "otimes", "outputfilename", "outputstreambox", "outputstreamcopy", "outputstreamunvbox", "outputstreamunvcopy", "over", "overbar", "overbars", "overbarunderbar", "overbrace", "overbraceunderbrace", "overbracket", "overbracketunderbracket", "overlaybutton", "overlaycolor", "overlaydepth", "overlayfigure", "overlayheight", "overlayimage", "overlaylinecolor", "overlaylinewidth", "overlayoffset", "overlayrollbutton", "overlaywidth", "overleftarrow", "overloaderror", "overparent", "overparentunderparent", "overrightarrow", "overset", "overstrike", "overstrikes", "owns", "page", "pagearea", "pagebreak", "pagefigure", "pageinjection", "pagenumber", "pagereference", "pagestaterealpage", "pagestaterealpageorder", "paletsize", "paragraphmark", "parallel", "part", "partial", "pdfTeX", "pdfactualtext", "pdfbackendactualtext", "pdfbackendcurrentresources", "pdfbackendsetcatalog", "pdfbackendsetcolorspace", "pdfbackendsetextgstate", "pdfbackendsetinfo", "pdfbackendsetname", "pdfbackendsetpageattribute", "pdfbackendsetpageresource", "pdfbackendsetpagesattribute", "pdfbackendsetpattern", "pdfbackendsetshade", "pdfcolor", "pdfeTeX", "percent", "percentdimen", "periodcentered", "periods", "permitcaretescape", "permitcircumflexescape", "permitspacesbetweengroups", "perp", "persiandecimals", "persiandecimalseparator", "persiannumerals", "persianthousandsseparator", "perthousand", "phantom", "phantombox", "phi", "phook", "pi", "pickupgroupedcommand", "pitchfork", "placeattachments", "placebookmarks", "placebtxrendering", "placechemical", "placecitation", "placecombinedlist", "placecomments", "placecontent", "placecurrentformulanumber", "placedbox", "placefigure", "placefloat", "placefloatwithsetups", "placefootnotes", "placeformula", "placeframed", "placegraphic", "placeheadnumber", "placeheadtext", "placehelp", "placeindex", "placeinitial", "placeintermezzo", "placelayer", "placelayeredtext", "placelegend", "placelist", "placelistofabbreviations", "placelistofchemicals", "placelistoffigures", "placelistofgraphics", "placelistofintermezzi", "placelistoflogos", "placelistofpublications", "placelistofsorts", "placelistofsynonyms", "placelistoftables", "placelocalfootnotes", "placelocalnotes", "placement", "placenamedfloat", "placenamedformula", "placenotes", "placeongrid", "placeontopofeachother", "placepagenumber", "placepairedbox", "placeparallel", "placerawheaddata", "placerawheadnumber", "placerawheadtext", "placerawlist", "placeregister", "placerenderingwindow", "placesidebyside", "placesubformula", "placetable", "pm", "popattribute", "popmacro", "popmode", "popsystemmode", "position", "positionoverlay", "positionregionoverlay", "positivesign", "postponenotes", "prec", "precapprox", "preccurlyeq", "preceq", "preceqq", "precnapprox", "precneq", "precneqq", "precnsim", "precsim", "predefinedfont", "predefinefont", "predefinesymbol", "prefixedpagenumber", "prefixlanguage", "prefixtext", "prependetoks", "prependgvalue", "prependtocommalist", "prependtoks", "prependtoksonce", "prependvalue", "prerollblank", "presetbtxlabeltext", "presetdocument", "presetfieldsymbols", "presetheadtext", "presetlabeltext", "presetmathlabeltext", "presetoperatortext", "presetprefixtext", "presetsuffixtext", "presettaglabeltext", "presetunittext", "pretocommalist", "prettyprintbuffer", "prevcounter", "prevcountervalue", "preventmode", "prevrealpage", "prevrealpagenumber", "prevsubcountervalue", "prevsubpage", "prevsubpagenumber", "prevuserpage", "prevuserpagenumber", "prime", "primes", "procent", "processMPbuffer", "processMPfigurefile", "processaction", "processallactionsinset", "processassignlist", "processassignmentcommand", "processassignmentlist", "processbetween", "processblocks", "processbodyfontenvironmentlist", "processcolorcomponents", "processcommacommand", "processcommalist", "processcommalistwithparameters", "processcontent", "processfile", "processfilemany", "processfilenone", "processfileonce", "processfirstactioninset", "processisolatedchars", "processisolatedwords", "processlinetablebuffer", "processlinetablefile", "processlist", "processmonth", "processranges", "processseparatedlist", "processtexbuffer", "processtokens", "processuntil", "processxtablebuffer", "processyear", "prod", "product", "profiledbox", "profilegivenbox", "program", "project", "propto", "pseudoMixedCapped", "pseudoSmallCapped", "pseudoSmallcapped", "pseudosmallcapped", "psi", "punctuationspace", "purenumber", "pushattribute", "pushbutton", "pushmacro", "pushmode", "pushoutputstream", "pushsystemmode", "putboxincache", "putnextboxincache", "qquad", "quad", "quadrupleprime", "quads", "quarterstrut", "questiondown", "questionedeq", "quitcommalist", "quitprevcommalist", "quittypescriptscanning", "quotation", "quote", "quotedbl", "quotedblbase", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "quotesingle", "quotesinglebase", "rVert", "racute", "raggedbottom", "raggedcenter", "raggedleft", "raggedright", "raggedwidecenter", "raisebox", "randomizetext", "randomnumber", "rangle", "rationals", "rawcounter", "rawcountervalue", "rawdate", "rawdoifelseinset", "rawdoifinset", "rawdoifinsetelse", "rawgetparameters", "rawprocessaction", "rawprocesscommacommand", "rawprocesscommalist", "rawstructurelistuservariable", "rawsubcountervalue", "rbox", "rbrace", "rbracket", "rcaron", "rceil", "rcommaaccent", "rdoublegrave", "readfile", "readfixfile", "readjobfile", "readlocfile", "readsetfile", "readsysfile", "readtexfile", "readxmlfile", "realSmallCapped", "realSmallcapped", "realpagenumber", "reals", "realsmallcapped", "recursedepth", "recurselevel", "recursestring", "redoconvertfont", "ref", "reference", "referenceprefix", "referring", "registerattachment", "registerctxluafile", "registered", "registerexternalfigure", "registerfontclass", "registerhyphenationexception", "registerhyphenationpattern", "registermenubuttons", "registersort", "registersynonym", "registerunit", "regular", "relatemarking", "relateparameterhandlers", "relaxvalueifundefined", "relbar", "remainingcharacters", "remark", "removebottomthings", "removedepth", "removefromcommalist", "removelastskip", "removelastspace", "removemarkedcontent", "removepunctuation", "removesubstring", "removetoks", "removeunwantedspaces", "repeathead", "replacefeature", "replaceincommalist", "replaceword", "rescan", "rescanwithsetup", "resetMPdrawing", "resetMPenvironment", "resetMPinstance", "resetallattributes", "resetandaddfeature", "resetbar", "resetboxesincache", "resetbreakpoints", "resetbuffer", "resetcharacteralign", "resetcharacterkerning", "resetcharacterspacing", "resetcharacterstripping", "resetcollector", "resetcounter", "resetdigitsmanipulation", "resetdirection", "resetfeature", "resetflag", "resetfontcolorsheme", "resetfontfallback", "resetfontsolution", "resethyphenationfeatures", "resetinjector", "resetinteractionmenu", "resetitaliccorrection", "resetlayer", "resetlocalfloats", "resetmarker", "resetmarking", "resetmode", "resetpagenumber", "resetparallel", "resetpath", "resetpenalties", "resetperiodkerning", "resetprofile", "resetrecurselevel", "resetreference", "resetreplacement", "resetscript", "resetsetups", "resetshownsynonyms", "resetsubpagenumber", "resetsymbolset", "resetsystemmode", "resettimer", "resettokenlist", "resettrackers", "resettrialtypesetting", "resetusedsortings", "resetusedsynonyms", "resetuserpagenumber", "resetvalue", "resetvisualizers", "reshapebox", "resolvedglyphdirect", "resolvedglyphstyled", "restartcounter", "restorebox", "restorecatcodes", "restorecounter", "restorecurrentattributes", "restoreendofline", "restoreglobalbodyfont", "restriction", "reusableMPgraphic", "reuseMPgraphic", "reuserandomseed", "reverseddoubleprime", "reversedprime", "reversedtripleprime", "reversehbox", "reversehpack", "reversetpack", "reversevbox", "reversevpack", "reversevtop", "revivefeature", "rfence", "rfloor", "rgroup", "rhbox", "rho", "rhooknearrow", "rhookswarrow", "right", "rightaligned", "rightangle", "rightarrow", "rightarrowbar", "rightarrowtail", "rightarrowtriangle", "rightbottombox", "rightbox", "rightdasharrow", "rightguillemot", "rightharpoondown", "rightharpoonup", "righthbox", "rightheadtext", "rightlabeltext", "rightleftarrows", "rightleftharpoons", "rightline", "rightmathlabeltext", "rightorleftpageaction", "rightpageorder", "rightrightarrows", "rightskipadaption", "rightsquigarrow", "rightsubguillemot", "rightthreearrows", "rightthreetimes", "righttoleft", "righttolefthbox", "righttoleftvbox", "righttoleftvtop", "righttopbox", "rightwavearrow", "rightwhitearrow", "ring", "rinterval", "rinvertedbreve", "risingdotseq", "rlap", "rlointerval", "rmoustache", "rneq", "robustaddtocommalist", "robustdoifelseinset", "robustdoifinsetelse", "robustpretocommalist", "rointerval", "rollbutton", "roman", "romanC", "romanD", "romanI", "romanII", "romanIII", "romanIV", "romanIX", "romanL", "romanM", "romanV", "romanVI", "romanVII", "romanVIII", "romanX", "romanXI", "romanXII", "romanc", "romand", "romani", "romanii", "romaniii", "romaniv", "romanix", "romanl", "romanm", "romannumerals", "romanv", "romanvi", "romanvii", "romanviii", "romanx", "romanxi", "romanxii", "rootradical", "rotate", "rparent", "rrangle", "rrbracket", "rrointerval", "rtimes", "rtlhbox", "rtlvbox", "rtlvtop", "rtop", "ruby", "ruledhbox", "ruledhpack", "ruledmbox", "ruledtopv", "ruledtpack", "ruledvbox", "ruledvpack", "ruledvtop", "runMPbuffer", "runninghbox", "rvert", "sacute", "safechar", "samplefile", "sans", "sansbold", "sansnormal", "sansserif", "savebox", "savebtxdataset", "savebuffer", "savecounter", "savecurrentattributes", "savenormalmeaning", "savetaggedtwopassdata", "savetwopassdata", "sbox", "scale", "scaron", "scedilla", "schwa", "schwahook", "scircumflex", "scommaaccent", "screen", "searrow", "secondoffivearguments", "secondoffourarguments", "secondofsixarguments", "secondofthreearguments", "secondofthreeunexpanded", "secondoftwoarguments", "secondoftwounexpanded", "section", "sectionmark", "seeindex", "select", "selectblocks", "serializecommalist", "serializedcommalist", "serif", "serifbold", "serifnormal", "setJSpreamble", "setMPlayer", "setMPpositiongraphic", "setMPpositiongraphicrange", "setMPtext", "setMPvariable", "setMPvariables", "setautopagestaterealpageno", "setbar", "setbigbodyfont", "setboxllx", "setboxlly", "setbreakpoints", "setcapstrut", "setcatcodetable", "setcharacteralign", "setcharacteraligndetail", "setcharactercasing", "setcharactercleaning", "setcharacterkerning", "setcharacterspacing", "setcharacterstripping", "setcharstrut", "setcollector", "setcolormodell", "setcounter", "setcounterown", "setcurrentfontclass", "setdataset", "setdefaultpenalties", "setdigitsmanipulation", "setdirection", "setdocumentargument", "setdocumentargumentdefault", "setdocumentfilename", "setdummyparameter", "setelementexporttag", "setemeasure", "setevalue", "setevariable", "setevariables", "setfirstline", "setfirstpasscharacteralign", "setflag", "setfont", "setfontcolorsheme", "setfontfeature", "setfontsolution", "setfontstrut", "setglobalscript", "setgmeasure", "setgvalue", "setgvariable", "setgvariables", "sethboxregister", "sethyphenatedurlafter", "sethyphenatedurlbefore", "sethyphenatedurlnormal", "sethyphenationfeatures", "setinitial", "setinjector", "setinteraction", "setinterfacecommand", "setinterfaceconstant", "setinterfaceelement", "setinterfacemessage", "setinterfacevariable", "setinternalrendering", "setitaliccorrection", "setlayer", "setlayerframed", "setlayertext", "setlinefiller", "setlocalhsize", "setlocalscript", "setmainbodyfont", "setmainparbuilder", "setmarker", "setmarking", "setmathstyle", "setmeasure", "setmessagetext", "setminus", "setmode", "setnostrut", "setnote", "setnotetext", "setobject", "setoldstyle", "setpagereference", "setpagestate", "setpagestaterealpageno", "setpenalties", "setpercentdimen", "setperiodkerning", "setposition", "setpositionbox", "setpositiondata", "setpositiondataplus", "setpositiononly", "setpositionplus", "setpositionstrut", "setprofile", "setrandomseed", "setreference", "setreferencedobject", "setregisterentry", "setreplacement", "setrigidcolumnbalance", "setrigidcolumnhsize", "setscript", "setsecondpasscharacteralign", "setsectionblock", "setsimplecolumnshsize", "setsmallbodyfont", "setsmallcaps", "setstackbox", "setstructurepageregister", "setstrut", "setsuperiors", "setsystemmode", "settabular", "settaggedmetadata", "settestcrlf", "settextcontent", "settightobject", "settightreferencedobject", "settightstrut", "settightunreferencedobject", "settokenlist", "settrialtypesetting", "setuevalue", "setugvalue", "setunreferencedobject", "setup", "setupMPgraphics", "setupMPinstance", "setupMPpage", "setupMPvariables", "setupTABLE", "setupTEXpage", "setupalign", "setupalternativestyles", "setuparranging", "setupattachment", "setupattachments", "setupbackend", "setupbackground", "setupbackgrounds", "setupbar", "setupbars", "setupblackrules", "setupblank", "setupbleeding", "setupblock", "setupbodyfont", "setupbookmark", "setupbottom", "setupbottomtexts", "setupbtx", "setupbtxdataset", "setupbtxlabeltext", "setupbtxlist", "setupbtxregister", "setupbtxrendering", "setupbuffer", "setupbutton", "setupcapitals", "setupcaption", "setupcaptions", "setupcharacteralign", "setupcharacterkerning", "setupcharacterspacing", "setupchemical", "setupchemicalframed", "setupclipping", "setupcollector", "setupcolor", "setupcolors", "setupcolumns", "setupcolumnset", "setupcolumnsetarea", "setupcolumnsetareatext", "setupcolumnsetlines", "setupcolumnsetspan", "setupcolumnsetstart", "setupcombination", "setupcombinedlist", "setupcomment", "setupcontent", "setupcounter", "setupdataset", "setupdelimitedtext", "setupdescription", "setupdirections", "setupdocument", "setupeffect", "setupenumeration", "setupenumerations", "setupenv", "setupexport", "setupexternalfigure", "setupexternalsoundtracks", "setupfacingfloat", "setupfield", "setupfieldbody", "setupfieldcategory", "setupfieldcontentframed", "setupfieldlabelframed", "setupfields", "setupfieldtotalframed", "setupfiller", "setupfillinlines", "setupfillinrules", "setupfirstline", "setupfittingpage", "setupfloat", "setupfloatframed", "setupfloats", "setupfloatsplitting", "setupfontexpansion", "setupfontprotrusion", "setupfonts", "setupfontsolution", "setupfooter", "setupfootertexts", "setupfootnotes", "setupforms", "setupformula", "setupformulae", "setupformulaframed", "setupframed", "setupframedcontent", "setupframedtable", "setupframedtablecolumn", "setupframedtablerow", "setupframedtext", "setupframedtexts", "setupglobalreferenceprefix", "setuphead", "setupheadalternative", "setupheader", "setupheadertexts", "setupheadnumber", "setupheads", "setupheadtext", "setuphelp", "setuphigh", "setuphighlight", "setuphyphenation", "setuphyphenmark", "setupindentedtext", "setupindenting", "setupindex", "setupinitial", "setupinsertion", "setupinteraction", "setupinteractionbar", "setupinteractionmenu", "setupinteractionscreen", "setupinterlinespace", "setupitaliccorrection", "setupitemgroup", "setupitemizations", "setupitemize", "setupitems", "setuplabel", "setuplabeltext", "setuplanguage", "setuplayer", "setuplayeredtext", "setuplayout", "setuplayouttext", "setuplegend", "setuplinefiller", "setuplinefillers", "setuplinenote", "setuplinenumbering", "setuplines", "setuplinetable", "setuplinewidth", "setuplist", "setuplistalternative", "setuplistextra", "setuplocalfloats", "setuplocalinterlinespace", "setuplow", "setuplowhigh", "setuplowmidhigh", "setupmakeup", "setupmarginblock", "setupmargindata", "setupmarginframed", "setupmarginrule", "setupmarginrules", "setupmarking", "setupmathalignment", "setupmathcases", "setupmathematics", "setupmathfence", "setupmathfraction", "setupmathfractions", "setupmathframed", "setupmathlabeltext", "setupmathmatrix", "setupmathornament", "setupmathradical", "setupmathstackers", "setupmathstyle", "setupmixedcolumns", "setupmodule", "setupnarrower", "setupnotation", "setupnotations", "setupnote", "setupnotes", "setupoffset", "setupoffsetbox", "setupoperatortext", "setupoppositeplacing", "setupoutputroutine", "setuppagechecker", "setuppagecolumns", "setuppagecomment", "setuppageinjection", "setuppageinjectionalternative", "setuppagenumber", "setuppagenumbering", "setuppageshift", "setuppagestate", "setuppagetransitions", "setuppairedbox", "setuppalet", "setuppaper", "setuppapersize", "setupparagraph", "setupparagraphintro", "setupparagraphnumbering", "setupparagraphs", "setupparallel", "setupperiodkerning", "setupperiods", "setupplacement", "setuppositionbar", "setuppositioning", "setupprefixtext", "setupprocessor", "setupprofile", "setupprograms", "setupquotation", "setupquote", "setuprealpagenumber", "setupreferenceformat", "setupreferenceprefix", "setupreferencestructureprefix", "setupreferencing", "setupregister", "setupregisters", "setuprenderingwindow", "setuprotate", "setupruby", "setups", "setupscale", "setupscript", "setupscripts", "setupsectionblock", "setupselector", "setupshift", "setupsidebar", "setupsorting", "setupspacing", "setupspellchecking", "setupstartstop", "setupstretched", "setupstruts", "setupstyle", "setupsubformula", "setupsubformulas", "setupsubpagenumber", "setupsuffixtext", "setupsymbols", "setupsymbolset", "setupsynctex", "setupsynonyms", "setuptables", "setuptabulate", "setuptabulation", "setuptagging", "setuptaglabeltext", "setuptext", "setuptextbackground", "setuptextflow", "setuptextnote", "setuptextrules", "setuptexttexts", "setupthinrules", "setuptolerance", "setuptooltip", "setuptop", "setuptoptexts", "setuptype", "setuptyping", "setupunit", "setupunittext", "setupurl", "setupuserdata", "setupuserdataalternative", "setupuserpagenumber", "setupversion", "setupviewerlayer", "setupvspacing", "setupwhitespace", "setupwithargument", "setupwithargumentswapped", "setupxml", "setupxtable", "setuvalue", "setuxvalue", "setvalue", "setvariable", "setvariables", "setvboxregister", "setvisualizerfont", "setvtopregister", "setwidthof", "setxmeasure", "setxvalue", "setxvariable", "setxvariables", "seveneighths", "sfrac", "shapedhbox", "sharp", "shiftbox", "shiftdown", "shiftup", "showallmakeup", "showattributes", "showbodyfont", "showbodyfontenvironment", "showboxes", "showbtxdatasetauthors", "showbtxdatasetcompleteness", "showbtxdatasetfields", "showbtxfields", "showbtxhashedauthors", "showbtxtables", "showchardata", "showcharratio", "showcolor", "showcolorbar", "showcolorcomponents", "showcolorgroup", "showcolorset", "showcolorstruts", "showcounter", "showdirectives", "showdirsinmargin", "showedebuginfo", "showexperiments", "showfont", "showfontdata", "showfontexpansion", "showfontitalics", "showfontkerns", "showfontparameters", "showfontstrip", "showfontstyle", "showframe", "showglyphdata", "showglyphs", "showgrid", "showgridsnapping", "showhelp", "showhyphenationtrace", "showhyphens", "showinjector", "showjustification", "showkerning", "showlayout", "showlayoutcomponents", "showligature", "showligatures", "showlogcategories", "showmakeup", "showmargins", "showmessage", "showminimalbaseline", "shownextbox", "showotfcomposition", "showpalet", "showparentchain", "showprint", "showsetups", "showsetupsdefinition", "showstruts", "showsymbolset", "showtimer", "showtokens", "showtrackers", "showvalue", "showvariable", "showwarning", "sigma", "signalrightpage", "sim", "simeq", "simplealignedbox", "simplealignedboxplus", "simplealignedspreadbox", "simplegroupedcommand", "simplereversealignedbox", "simplereversealignedboxplus", "singalcharacteralign", "singlebond", "singleverticalbar", "sixperemspace", "sixthofsixarguments", "slanted", "slantedbold", "slantedface", "slash", "slicepages", "slong", "slovenianNumerals", "sloveniannumerals", "small", "smallbodyfont", "smallbold", "smallbolditalic", "smallboldslanted", "smallcappedcharacters", "smallcappedromannumerals", "smallcaps", "smaller", "smallitalicbold", "smallnormal", "smallskip", "smallslanted", "smallslantedbold", "smalltype", "smash", "smashbox", "smashboxed", "smashedhbox", "smashedvbox", "smile", "snaptogrid", "softhyphen", "solidus", "someheadnumber", "somekindoftab", "someline", "somelocalfloat", "somenamedheadnumber", "someplace", "somewhere", "space", "spaceddigits", "spaceddigitsmethod", "spaceddigitsseparator", "spaceddigitssymbol", "spadesuit", "spanishNumerals", "spanishnumerals", "speech", "sphericalangle", "splitatasterisk", "splitatcolon", "splitatcolons", "splitatcomma", "splitatperiod", "splitdfrac", "splitfilename", "splitfloat", "splitfrac", "splitoffbase", "splitofffull", "splitoffkind", "splitoffname", "splitoffpath", "splitoffroot", "splitofftokens", "splitofftype", "splitstring", "spreadhbox", "sqcap", "sqcup", "sqrt", "sqsubset", "sqsubseteq", "sqsubsetneq", "sqsupset", "sqsupseteq", "sqsupsetneq", "square", "squaredots", "ssharp", "stackrel", "stackscripts", "star", "stareq", "startJScode", "startJSpreamble", "startLUA", "startMP", "startMPclip", "startMPcode", "startMPdefinitions", "startMPdrawing", "startMPenvironment", "startMPextensions", "startMPinclusions", "startMPinitializations", "startMPpage", "startMPpositiongraphic", "startMPpositionmethod", "startMPrun", "startPARSEDXML", "startTABLE", "startTABLEbody", "startTABLEfoot", "startTABLEhead", "startTABLEnext", "startTC", "startTD", "startTDs", "startTEX", "startTEXpage", "startTH", "startTN", "startTR", "startTRs", "startTX", "startTY", "startXML", "startalign", "startalignment", "startallmodes", "startappendices", "startarrangedpages", "startaside", "startattachment", "startbackground", "startbackmatter", "startbar", "startbbordermatrix", "startbitmapimage", "startblockquote", "startbodymatter", "startbordermatrix", "startboxedcolumns", "startbtxlabeltext", "startbtxrenderingdefinitions", "startbuffer", "startcases", "startcatcodetable", "startcenteraligned", "startchapter", "startcharacteralign", "startcheckedfences", "startchemical", "startchemicaltext", "startcollect", "startcollecting", "startcolor", "startcolorintent", "startcoloronly", "startcolorset", "startcolumns", "startcolumnset", "startcolumnsetspan", "startcombination", "startcomment", "startcomponent", "startcontextcode", "startcontextdefinitioncode", "startctxfunction", "startctxfunctiondefinition", "startcurrentcolor", "startcurrentlistentrywrapper", "startdelimited", "startdelimitedtext", "startdisplaymath", "startdmath", "startdocument", "starteffect", "startelement", "startembeddedxtable", "startendnote", "startendofline", "startenvironment", "startexceptions", "startexpanded", "startexpandedcollect", "startextendedcatcodetable", "startexternalfigurecollection", "startfacingfloat", "startfact", "startfigure", "startfiguretext", "startfittingpage", "startfixed", "startfloatcombination", "startfont", "startfontclass", "startfontsolution", "startfootnote", "startformula", "startformulas", "startframed", "startframedcell", "startframedcontent", "startframedrow", "startframedtable", "startframedtext", "startfrontmatter", "startgoto", "startgraphictext", "startgridsnapping", "starthanging", "starthbox", "starthboxestohbox", "starthboxregister", "starthead", "startheadtext", "starthelptext", "starthiding", "starthighlight", "starthyphenation", "startimath", "startindentation", "startindentedtext", "startinteraction", "startinteractionmenu", "startinterface", "startintermezzotext", "startintertext", "startitem", "startitemgroup", "startitemgroupcolumns", "startitemize", "startknockout", "startlabeltext", "startlanguage", "startlayout", "startleftaligned", "startlegend", "startline", "startlinealignment", "startlinecorrection", "startlinefiller", "startlinenote", "startlinenumbering", "startlines", "startlinetable", "startlinetablebody", "startlinetablecell", "startlinetablehead", "startlocalfootnotes", "startlocalheadsetup", "startlocallinecorrection", "startlocalnotes", "startlocalsetups", "startlua", "startluacode", "startluaparameterset", "startluasetups", "startmakeup", "startmarginblock", "startmarginrule", "startmarkedcontent", "startmarkpages", "startmathalignment", "startmathcases", "startmathlabeltext", "startmathmatrix", "startmathmode", "startmathstyle", "startmatrices", "startmatrix", "startmaxaligned", "startmdformula", "startmidaligned", "startmiddlealigned", "startmiddlemakeup", "startmixedcolumns", "startmode", "startmodeset", "startmodule", "startmoduletestsection", "startmpformula", "startnamedsection", "startnamedsubformulas", "startnarrow", "startnarrower", "startnegative", "startnicelyfilledbox", "startnointerference", "startnotallmodes", "startnotext", "startnotmode", "startoperatortext", "startopposite", "startoutputstream", "startoverlay", "startoverprint", "startpacked", "startpagecolumns", "startpagecomment", "startpagefigure", "startpagelayout", "startpagemakeup", "startpar", "startparagraph", "startparagraphs", "startparagraphscell", "startparbuilder", "startpart", "startpath", "startplacechemical", "startplacefigure", "startplacefloat", "startplaceformula", "startplacegraphic", "startplaceintermezzo", "startplacelegend", "startplacepairedbox", "startplacetable", "startpositioning", "startpositionoverlay", "startpositive", "startpostponing", "startpostponingnotes", "startprefixtext", "startprocessassignmentcommand", "startprocessassignmentlist", "startprocesscommacommand", "startprocesscommalist", "startproduct", "startproject", "startprotect", "startprotectedcolors", "startpublication", "startpunctuation", "startquotation", "startquote", "startrandomized", "startrandomseed", "startrawsetups", "startreadingfile", "startreferenceprefix", "startregime", "startregister", "startreusableMPgraphic", "startrightaligned", "startruby", "startscript", "startsdformula", "startsection", "startsectionblock", "startsectionblockenvironment", "startsectionlevel", "startsetups", "startshapebox", "startshift", "startsidebar", "startsimplecolumns", "startspecialitem", "startspeech", "startspformula", "startsplitformula", "startsplittext", "startspread", "startstandardmakeup", "startstaticMPfigure", "startstaticMPgraphic", "startstrictinspectnextcharacter", "startstructurepageregister", "startstrut", "startstyle", "startsubformulas", "startsubject", "startsubjectlevel", "startsubsection", "startsubsentence", "startsubstack", "startsubsubject", "startsubsubsection", "startsubsubsubject", "startsubsubsubsection", "startsubsubsubsubject", "startsubsubsubsubsection", "startsubsubsubsubsubject", "startsuffixtext", "startsymbolset", "starttable", "starttablehead", "starttables", "starttabletail", "starttabletext", "starttabulate", "starttabulatehead", "starttabulatetail", "starttagged", "starttaglabeltext", "starttexcode", "starttexdefinition", "starttext", "starttextbackground", "starttextbackgroundmanual", "starttextcolor", "starttextcolorintent", "starttextflow", "starttextmakeup", "starttextrule", "starttitle", "starttokenlist", "starttokens", "starttransparent", "starttypescript", "starttypescriptcollection", "starttyping", "startuniqueMPgraphic", "startuniqueMPpagegraphic", "startunittext", "startunpacked", "startusableMPgraphic", "startuseMPgraphic", "startusemathstyleparameter", "startuserdata", "startusingbtxspecification", "startvbox", "startvboxregister", "startvboxtohbox", "startvboxtohboxseparator", "startviewerlayer", "startvtop", "startvtopregister", "startxcell", "startxcellgroup", "startxcolumn", "startxgroup", "startxmldisplayverbatim", "startxmlinlineverbatim", "startxmlraw", "startxmlsetups", "startxrow", "startxrowgroup", "startxtable", "startxtablebody", "startxtablefoot", "startxtablehead", "startxtablenext", "stligature", "stopJScode", "stopJSpreamble", "stopLUA", "stopMP", "stopMPclip", "stopMPcode", "stopMPdefinitions", "stopMPdrawing", "stopMPenvironment", "stopMPextensions", "stopMPinclusions", "stopMPinitializations", "stopMPpage", "stopMPpositiongraphic", "stopMPpositionmethod", "stopMPrun", "stopPARSEDXML", "stopTABLE", "stopTABLEbody", "stopTABLEfoot", "stopTABLEhead", "stopTABLEnext", "stopTC", "stopTD", "stopTDs", "stopTEX", "stopTEXpage", "stopTH", "stopTN", "stopTR", "stopTRs", "stopTX", "stopTY", "stopXML", "stopalign", "stopalignment", "stopallmodes", "stopappendices", "stoparrangedpages", "stopaside", "stopattachment", "stopbackground", "stopbackmatter", "stopbar", "stopbbordermatrix", "stopbitmapimage", "stopblockquote", "stopbodymatter", "stopbordermatrix", "stopboxedcolumns", "stopbtxlabeltext", "stopbtxrenderingdefinitions", "stopbuffer", "stopcases", "stopcatcodetable", "stopcenteraligned", "stopchapter", "stopcharacteralign", "stopcheckedfences", "stopchemical", "stopchemicaltext", "stopcollect", "stopcollecting", "stopcolor", "stopcolorintent", "stopcoloronly", "stopcolorset", "stopcolumns", "stopcolumnset", "stopcolumnsetspan", "stopcombination", "stopcomment", "stopcomponent", "stopcontextcode", "stopcontextdefinitioncode", "stopctxfunction", "stopctxfunctiondefinition", "stopcurrentcolor", "stopcurrentlistentrywrapper", "stopdelimited", "stopdelimitedtext", "stopdisplaymath", "stopdmath", "stopdocument", "stopeffect", "stopelement", "stopembeddedxtable", "stopendnote", "stopendofline", "stopenvironment", "stopexceptions", "stopexpanded", "stopexpandedcollect", "stopextendedcatcodetable", "stopexternalfigurecollection", "stopfacingfloat", "stopfact", "stopfigure", "stopfiguretext", "stopfittingpage", "stopfixed", "stopfloatcombination", "stopfont", "stopfontclass", "stopfontsolution", "stopfootnote", "stopformula", "stopformulas", "stopframed", "stopframedcell", "stopframedcontent", "stopframedrow", "stopframedtable", "stopframedtext", "stopfrontmatter", "stopgoto", "stopgraphictext", "stopgridsnapping", "stophanging", "stophbox", "stophboxestohbox", "stophboxregister", "stophead", "stopheadtext", "stophelptext", "stophiding", "stophighlight", "stophyphenation", "stopimath", "stopindentation", "stopindentedtext", "stopinteraction", "stopinteractionmenu", "stopinterface", "stopintermezzotext", "stopintertext", "stopitem", "stopitemgroup", "stopitemgroupcolumns", "stopitemize", "stopknockout", "stoplabeltext", "stoplanguage", "stoplayout", "stopleftaligned", "stoplegend", "stopline", "stoplinealignment", "stoplinecorrection", "stoplinefiller", "stoplinenote", "stoplinenumbering", "stoplines", "stoplinetable", "stoplinetablebody", "stoplinetablecell", "stoplinetablehead", "stoplocalfootnotes", "stoplocalheadsetup", "stoplocallinecorrection", "stoplocalnotes", "stoplocalsetups", "stoplua", "stopluacode", "stopluaparameterset", "stopluasetups", "stopmakeup", "stopmarginblock", "stopmarginrule", "stopmarkedcontent", "stopmarkpages", "stopmathalignment", "stopmathcases", "stopmathlabeltext", "stopmathmatrix", "stopmathmode", "stopmathstyle", "stopmatrices", "stopmatrix", "stopmaxaligned", "stopmdformula", "stopmidaligned", "stopmiddlealigned", "stopmiddlemakeup", "stopmixedcolumns", "stopmode", "stopmodeset", "stopmodule", "stopmoduletestsection", "stopmpformula", "stopnamedsection", "stopnamedsubformulas", "stopnarrow", "stopnarrower", "stopnegative", "stopnicelyfilledbox", "stopnointerference", "stopnotallmodes", "stopnotext", "stopnotmode", "stopoperatortext", "stopopposite", "stopoutputstream", "stopoverlay", "stopoverprint", "stoppacked", "stoppagecolumns", "stoppagecomment", "stoppagefigure", "stoppagelayout", "stoppagemakeup", "stoppar", "stopparagraph", "stopparagraphs", "stopparagraphscell", "stopparbuilder", "stoppart", "stoppath", "stopplacechemical", "stopplacefigure", "stopplacefloat", "stopplaceformula", "stopplacegraphic", "stopplaceintermezzo", "stopplacelegend", "stopplacepairedbox", "stopplacetable", "stoppositioning", "stoppositionoverlay", "stoppositive", "stoppostponing", "stoppostponingnotes", "stopprefixtext", "stopprocessassignmentcommand", "stopprocessassignmentlist", "stopprocesscommacommand", "stopprocesscommalist", "stopproduct", "stopproject", "stopprotect", "stopprotectedcolors", "stoppublication", "stoppunctuation", "stopquotation", "stopquote", "stoprandomized", "stoprandomseed", "stoprawsetups", "stopreadingfile", "stopreferenceprefix", "stopregime", "stopreusableMPgraphic", "stoprightaligned", "stopruby", "stopscript", "stopsdformula", "stopsection", "stopsectionblock", "stopsectionblockenvironment", "stopsectionlevel", "stopsetups", "stopshapebox", "stopshift", "stopsidebar", "stopsimplecolumns", "stopspecialitem", "stopspeech", "stopspformula", "stopsplitformula", "stopsplittext", "stopspread", "stopstandardmakeup", "stopstaticMPfigure", "stopstaticMPgraphic", "stopstrictinspectnextcharacter", "stopstrut", "stopstyle", "stopsubformulas", "stopsubject", "stopsubjectlevel", "stopsubsection", "stopsubsentence", "stopsubstack", "stopsubsubject", "stopsubsubsection", "stopsubsubsubject", "stopsubsubsubsection", "stopsubsubsubsubject", "stopsubsubsubsubsection", "stopsubsubsubsubsubject", "stopsuffixtext", "stopsymbolset", "stoptable", "stoptablehead", "stoptables", "stoptabletail", "stoptabletext", "stoptabulate", "stoptabulatehead", "stoptabulatetail", "stoptagged", "stoptaglabeltext", "stoptexcode", "stoptexdefinition", "stoptext", "stoptextbackground", "stoptextbackgroundmanual", "stoptextcolor", "stoptextcolorintent", "stoptextflow", "stoptextmakeup", "stoptextrule", "stoptitle", "stoptokenlist", "stoptokens", "stoptransparent", "stoptypescript", "stoptypescriptcollection", "stoptyping", "stopuniqueMPgraphic", "stopuniqueMPpagegraphic", "stopunittext", "stopunpacked", "stopusableMPgraphic", "stopuseMPgraphic", "stopusemathstyleparameter", "stopuserdata", "stopusingbtxspecification", "stopvbox", "stopvboxregister", "stopvboxtohbox", "stopvboxtohboxseparator", "stopviewerlayer", "stopvtop", "stopvtopregister", "stopxcell", "stopxcellgroup", "stopxcolumn", "stopxgroup", "stopxmldisplayverbatim", "stopxmlinlineverbatim", "stopxmlraw", "stopxmlsetups", "stopxrow", "stopxrowgroup", "stopxtable", "stopxtablebody", "stopxtablefoot", "stopxtablehead", "stopxtablenext", "stretched", "strictdoifelsenextoptional", "strictdoifnextoptionalelse", "stripcharacter", "strippedcsname", "stripspaces", "structurelistuservariable", "structurenumber", "structuretitle", "structureuservariable", "structurevariable", "strut", "strutdp", "strutgap", "strutht", "struthtdp", "struttedbox", "strutwd", "style", "styleinstance", "subject", "subpagenumber", "subsection", "subsentence", "subset", "subseteq", "subseteqq", "subsetneq", "subsetneqq", "substituteincommalist", "subsubject", "subsubsection", "subsubsubject", "subsubsubsection", "subsubsubsubject", "subsubsubsubsection", "subsubsubsubsubject", "subtractfeature", "succ", "succapprox", "succcurlyeq", "succeq", "succeqq", "succnapprox", "succneq", "succneqq", "succnsim", "succsim", "suffixlanguage", "suffixtext", "sum", "supset", "supseteq", "supseteqq", "supsetneq", "supsetneqq", "surd", "surdradical", "swapcounts", "swapdimens", "swapface", "swapmacros", "swaptypeface", "swarrow", "switchstyleonly", "switchtobodyfont", "switchtocolor", "switchtointerlinespace", "symbol", "symbolreference", "synchronizeblank", "synchronizeindenting", "synchronizemarking", "synchronizeoutputstreams", "synchronizestrut", "synchronizewhitespace", "synctexblockfilename", "synctexresetfilename", "synctexsetfilename", "systemlog", "systemlogfirst", "systemloglast", "systemsetups", "tLeftarrow", "tLeftrightarrow", "tRightarrow", "tabulateautoline", "tabulateautorule", "tabulateline", "tabulaterule", "taggedctxcommand", "taggedlabeltexts", "taglabellanguage", "taglabeltext", "tau", "tbinom", "tbox", "tcaron", "tcedilla", "tcommaaccent", "tcurl", "tequal", "test", "testandsplitstring", "testcolumn", "testfeature", "testfeatureonce", "testpage", "testpageonly", "testpagesync", "testtokens", "tex", "texdefinition", "texsetup", "textAngstrom", "textacute", "textampersand", "textasciicircum", "textasciitilde", "textat", "textbackslash", "textbar", "textbottomcomma", "textbottomdot", "textbraceleft", "textbraceright", "textbreve", "textbrokenbar", "textbullet", "textcaron", "textcedilla", "textcelsius", "textcent", "textcircledP", "textcircumflex", "textcitation", "textcite", "textcomma", "textcontrolspace", "textcurrency", "textdag", "textddag", "textdegree", "textdiaeresis", "textdiv", "textdollar", "textdong", "textdotaccent", "textellipsis", "texteuro", "textflowcollector", "textfraction", "textgrave", "texthash", "texthorizontalbar", "texthungarumlaut", "texthyphen", "textkelvin", "textlognot", "textmacron", "textmath", "textmho", "textminus", "textmu", "textmultiply", "textnumero", "textogonek", "textohm", "textormathchar", "textormathchars", "textounce", "textpercent", "textperiod", "textplus", "textpm", "textreference", "textring", "textrule", "textslash", "textsterling", "texttilde", "textunderscore", "textvisiblespace", "textyen", "thai", "thainumerals", "thefirstcharacter", "thenormalizedbodyfontsize", "therefore", "theremainingcharacters", "theta", "thickspace", "thinrule", "thinrules", "thinspace", "thirdoffivearguments", "thirdoffourarguments", "thirdofsixarguments", "thirdofthreearguments", "thirdofthreeunexpanded", "thook", "thookleftarrow", "thookrightarrow", "thorn", "threedigitrounding", "threeeighths", "threefifths", "threeperemspace", "threequarter", "threesuperior", "tibetannumerals", "tightlayer", "tilde", "times", "tinyfont", "title", "tlap", "tleftarrow", "tleftharpoondown", "tleftharpoonup", "tleftrightarrow", "tleftrightharpoons", "tmapsto", "to", "tochar", "tolinenote", "tooltip", "top", "topbox", "topleftbox", "toplinebox", "toprightbox", "topskippedbox", "tracecatcodetables", "tracedfontname", "traceoutputroutines", "tracepositions", "trademark", "translate", "transparencycomponents", "transparent", "trel", "triangle", "triangledown", "triangleleft", "triangleq", "triangleright", "trightarrow", "trightharpoondown", "trightharpoonup", "trightleftharpoons", "trightoverleftarrow", "triplebond", "tripleprime", "tripleverticalbar", "truefilename", "truefontname", "tstroke", "ttraggedright", "ttriplerel", "ttwoheadleftarrow", "ttwoheadrightarrow", "turnediota", "twodigitrounding", "twofifths", "twoheaddownarrow", "twoheadleftarrow", "twoheadrightarrow", "twoheadrightarrowtail", "twoheaduparrow", "twosuperior", "twothirds", "tx", "txx", "typ", "type", "typebuffer", "typedefinedbuffer", "typeface", "typefile", "typeinlinebuffer", "typescriptone", "typescriptprefix", "typescriptthree", "typescripttwo", "typesetbuffer", "typesetfile", "uacute", "ubreve", "ucaron", "ucircumflex", "uconvertnumber", "udiaeresis", "udiaeresisacute", "udiaeresiscaron", "udiaeresisgrave", "udiaeresismacron", "udotbelow", "udots", "udoublegrave", "uedcatcodecommand", "ugrave", "uhook", "uhorn", "uhornacute", "uhorndotbelow", "uhorngrave", "uhornhook", "uhorntilde", "uhungarumlaut", "uinvertedbreve", "ulcorner", "umacron", "undefinevalue", "undepthed", "underbar", "underbars", "underbrace", "underbracket", "underdash", "underdashes", "underdot", "underdots", "underleftarrow", "underparent", "underrandom", "underrandoms", "underrightarrow", "underset", "understrike", "understrikes", "undoassign", "unexpandeddocumentvariable", "unframed", "unhhbox", "unihex", "uniqueMPgraphic", "uniqueMPpagegraphic", "unit", "unitlanguage", "unitshigh", "unitslow", "unittext", "unknown", "unprotected", "unregisterhyphenationpattern", "unspaceafter", "unspaceargument", "unspaced", "unspacestring", "unstackscripts", "untexargument", "untexcommand", "uogonek", "upand", "uparrow", "updasharrow", "updownarrow", "updownarrowbar", "updownarrows", "upharpoonleft", "upharpoonright", "uplus", "uppercased", "uppercasestring", "upperleftdoubleninequote", "upperleftdoublesixquote", "upperleftsingleninequote", "upperleftsinglesixquote", "upperrightdoubleninequote", "upperrightdoublesixquote", "upperrightsingleninequote", "upperrightsinglesixquote", "upsilon", "upuparrows", "upwhitearrow", "urcorner", "uring", "url", "useJSscripts", "useMPenvironmentbuffer", "useMPgraphic", "useMPlibrary", "useMPrun", "useMPvariables", "useURL", "usealignparameter", "useblankparameter", "useblocks", "usebodyfont", "usebodyfontparameter", "usebtxdataset", "usebtxdefinitions", "usecitation", "usecolors", "usecomponent", "usedirectory", "usedummycolorparameter", "usedummystyleandcolor", "usedummystyleparameter", "useenvironment", "useexternaldocument", "useexternalfigure", "useexternalrendering", "useexternalsoundtrack", "usefigurebase", "usefile", "usegridparameter", "useindentingparameter", "useindentnextparameter", "useinterlinespaceparameter", "uselanguageparameter", "useluamodule", "usemathstyleparameter", "usemodule", "useproduct", "useprofileparameter", "useproject", "usereferenceparameter", "userpagenumber", "usesetupsparameter", "usestaticMPfigure", "usesubpath", "usesymbols", "usetexmodule", "usetypescript", "usetypescriptfile", "useurl", "usezipfile", "utfchar", "utflower", "utfupper", "utilde", "utilityregisterlength", "vDash", "varTheta", "varepsilon", "varkappa", "varnothing", "varphi", "varpi", "varrho", "varsigma", "vartheta", "vboxreference", "vdash", "vdots", "vec", "vee", "veebar", "veeeq", "verbatim", "verbatimstring", "verbosenumber", "version", "vert", "verticalgrowingbar", "verticalpositionbar", "veryraggedcenter", "veryraggedleft", "veryraggedright", "vglue", "viewerlayer", "vl", "vpackbox", "vpackedbox", "vphantom", "vpos", "vsmash", "vsmashbox", "vsmashed", "vspace", "vspacing", "wcircumflex", "wdofstring", "wedge", "wedgeeq", "weekday", "whitearrowupfrombar", "widehat", "widetilde", "widthofstring", "widthspanningtext", "withoutpt", "word", "wordright", "words", "wordtonumber", "wp", "wr", "writebetweenlist", "writedatatolist", "writestatus", "writetolist", "xLeftarrow", "xLeftrightarrow", "xRightarrow", "xdefconvertedargument", "xequal", "xfrac", "xhookleftarrow", "xhookrightarrow", "xi", "xleftarrow", "xleftharpoondown", "xleftharpoonup", "xleftrightarrow", "xleftrightharpoons", "xmapsto", "xmladdindex", "xmlafterdocumentsetup", "xmlaftersetup", "xmlall", "xmlappenddocumentsetup", "xmlappendsetup", "xmlapplyselectors", "xmlatt", "xmlattdef", "xmlattribute", "xmlattributedef", "xmlbadinclusions", "xmlbeforedocumentsetup", "xmlbeforesetup", "xmlchainatt", "xmlchainattdef", "xmlchecknamespace", "xmlcommand", "xmlconcat", "xmlconcatrange", "xmlcontext", "xmlcount", "xmldefaulttotext", "xmldirectives", "xmldirectivesafter", "xmldirectivesbefore", "xmldisplayverbatim", "xmldoif", "xmldoifatt", "xmldoifelse", "xmldoifelseatt", "xmldoifelseempty", "xmldoifelseselfempty", "xmldoifelsetext", "xmldoifelsevalue", "xmldoifnot", "xmldoifnotatt", "xmldoifnotselfempty", "xmldoifnottext", "xmldoifselfempty", "xmldoiftext", "xmlelement", "xmlfilter", "xmlfirst", "xmlflush", "xmlflushcontext", "xmlflushdocumentsetups", "xmlflushlinewise", "xmlflushpure", "xmlflushspacewise", "xmlflushtext", "xmlinclude", "xmlinclusion", "xmlinclusions", "xmlinfo", "xmlinjector", "xmlinlineprettyprint", "xmlinlineprettyprinttext", "xmlinlineverbatim", "xmlinstalldirective", "xmllast", "xmllastatt", "xmllastmatch", "xmllastpar", "xmlloadbuffer", "xmlloaddata", "xmlloaddirectives", "xmlloadfile", "xmlloadonly", "xmlmain", "xmlmapvalue", "xmlname", "xmlnamespace", "xmlnonspace", "xmlpar", "xmlparam", "xmlpath", "xmlpos", "xmlposition", "xmlprependdocumentsetup", "xmlprependsetup", "xmlprettyprint", "xmlprettyprinttext", "xmlprocessbuffer", "xmlprocessdata", "xmlprocessfile", "xmlpure", "xmlraw", "xmlrefatt", "xmlregistereddocumentsetups", "xmlregisteredsetups", "xmlregisterns", "xmlremapname", "xmlremapnamespace", "xmlremovedocumentsetup", "xmlremovesetup", "xmlresetdocumentsetups", "xmlresetinjectors", "xmlresetsetups", "xmlsave", "xmlsetatt", "xmlsetattribute", "xmlsetentity", "xmlsetfunction", "xmlsetinjectors", "xmlsetpar", "xmlsetparam", "xmlsetsetup", "xmlsetup", "xmlshow", "xmlsnippet", "xmlstrip", "xmlstripnolines", "xmlstripped", "xmlstrippednolines", "xmltag", "xmltexentity", "xmltext", "xmltobuffer", "xmltobufferverbose", "xmltofile", "xmlvalue", "xmlverbatim", "xrel", "xrightarrow", "xrightharpoondown", "xrightharpoonup", "xrightleftharpoons", "xrightoverleftarrow", "xsplitstring", "xtriplerel", "xtwoheadleftarrow", "xtwoheadrightarrow", "xxfrac", "xypos", "yacute", "ycircumflex", "ydiaeresis", "ydotbelow", "yen", "ygrave", "yhook", "ymacron", "ytilde", "zacute", "zcaron", "zdotaccent", "zeronumberconversion", "zerowidthnobreakspace", "zerowidthspace", "zeta", "zhook", "zstroke", "zwj", "zwnj" },
- ["cs"]={ "Cisla", "Kap", "MESIC", "Rimskecislice", "SLOVA", "SLOVO", "Slova", "Slovo", "VSEDNIDEN", "Znak", "Znaky", "aktualnicislonadpisu", "aktualnidatum", "barevnalista", "barva", "cernalinka", "cernelinky", "cisla", "cislonadpisu", "cislorovnice", "cislostrany", "datum", "definuj", "definujakcent", "definujbarvu", "definujblok", "definujbloksekce", "definujbuffer", "definujfont", "definujformatodkazu", "definujhbox", "definujinterakcnimenu", "definujkombinovanyseznam", "definujkonverzi", "definujnadpis", "definujobrazeksymbol", "definujodkaz", "definujodstavce", "definujopis", "definujoramovani", "definujoramovanytext", "definujpaletu", "definujplvouciobjekt", "definujpodpole", "definujpole", "definujpopis", "definujpopisek", "definujprekryv", "definujprikaz", "definujprofil", "definujprogram", "definujprostredizakladnihofontu", "definujrejstrik", "definujsablonutabulky", "definujsekci", "definujseznam", "definujskupinubarev", "definujstartstop", "definujstyl", "definujstylfontu", "definujsymbol", "definujsynonumumfontu", "definujsynonyma", "definujtabelaci", "definujtext", "definujtrideni", "definujupravu", "definujvelikostpapiru", "definujvycet", "definujzakladnifont", "definujzasobnikpoli", "definujznaceni", "definujznak", "delkaseznamu", "externiobraz", "hlavnijazyk", "hodnotabarvy", "instalacejazyka", "interakcnilista", "interakcnitlacitka", "interaktivnimenu", "jazyk", "jdidolu", "jdina", "jdinabox", "jdinastranu", "klonujpole", "komponenta", "konvertujcislo", "kopirujpole", "korekcebilehomista", "matematika", "meritko", "mesic", "mezera", "mrizka", "nastavbarvu", "nastavbarvy", "nastavbilamista", "nastavblok", "nastavbloksekce", "nastavbuffer", "nastavcernelinky", "nastavcislonadpisu", "nastavcislostrany", "nastavcislovaniodstavcu", "nastavcislovaniradku", "nastavcislovanistran", "nastavcitaci", "nastavdeleniplvoucichobjektu", "nastavdelitko", "nastavdolnitexty", "nastavhorejsek", "nastavhornitexty", "nastavinterakci", "nastavinterakcnilistu", "nastavinterakcnimenu", "nastavinterakcniobrazovku", "nastavjazyk", "nastavkapitalky", "nastavkombinovanyseznam", "nastavkomentar", "nastavkomentarstrany", "nastavmarginalnilinky", "nastavmeziradkovoumezeru", "nastavnadpis", "nastavnadpisy", "nastavodkazovani", "nastavodsazovani", "nastavodstavce", "nastavopis", "nastavoramovanetexty", "nastavoramovani", "nastavorez", "nastavotoceni", "nastavpaletu", "nastavplvouciobjekt", "nastavplvouciobjekty", "nastavpodcislostrany", "nastavpole", "nastavpolozky", "nastavpopisek", "nastavpopisky", "nastavpozadi", "nastavpoznamkypodcarou", "nastavprechodstrany", "nastavpreskok", "nastavprogramy", "nastavradkovani", "nastavradky", "nastavrejstrik", "nastavrovnice", "nastavsadusymbolu", "nastavseznam", "nastavsirkucary", "nastavsloupce", "nastavspodek", "nastavsynonyma", "nastavtabelaci", "nastavtabulky", "nastavtenkelinky", "nastavtext", "nastavtextovelinky", "nastavtexttexty", "nastavtextyupati", "nastavtextyzahlavi", "nastavtoleranci", "nastavtrideni", "nastavtype", "nastavumisteniprotejsku", "nastavumistovani", "nastavupati", "nastavupravu", "nastavurl", "nastavusporadani", "nastavvelikostpapiru", "nastavvsechnapole", "nastavvycty", "nastavvyplnovelinky", "nastavvyplnoveradky", "nastavvzhled", "nastavzahlavi", "nastavzakladnifont", "nastavzarovnani", "nastavznaceni", "nastavzuzeni", "nastrane", "nejakyradek", "nekde", "neznamo", "nivy", "nizky", "nokap", "obrazovka", "odkaz", "odkaznastranu", "odkaznatext", "odkazujici", "opis", "opissoubor", "oramovani", "oref", "orez", "otocit", "oznaceni", "pis", "plnezneni", "pole", "polozka", "polozky", "porovnejpaletu", "porovnejskupinubarev", "pozadi", "pozice", "poznamka", "pref", "prelozit", "prepninazakladnifont", "preskoc", "prizpusobivepole", "prizpusobvzhled", "produkt", "projekt", "prostredi", "resetznaceni", "rimskecislice", "rozdelplvouciobjekt", "roztazene", "schovejbloky", "sedabarva", "sloupec", "slovovpravo", "stanovcharakteristickuseznamu", "stanovcislonadpisu", "startbarva", "startinteraktivnimenu", "startjazyk", "startjdina", "startkomponenta", "startmarginalnilinka", "startnadpis", "startoramovani", "startpolozka", "startpozadi", "startprodukt", "startprojekt", "startprostredi", "startpublikace", "startradek", "starttextovalinka", "startumistirovnici", "startzarovnanonastred", "startzarovnanovlevo", "startzarovnanovpravo", "startzhustene", "stopbarva", "stopinteraktivnimenu", "stopjazyk", "stopjdina", "stopkomponenta", "stopmarginalnilinka", "stopnadpis", "stoporamovani", "stoppolozka", "stoppozadi", "stopprodukt", "stopprojekt", "stopprostredi", "stoppublikace", "stopradek", "stoptextovalinka", "stopumistirovnici", "stopzarovnanonastred", "stopzarovnanovlevo", "stopzarovnanovpravo", "stopzhustene", "strana", "tecky", "tenkalinka", "tenkelinky", "textovalinka", "tlacitko", "tlacitkomenu", "tloustkacary", "tref", "tvrdamezera", "tvrdemezery", "ukazbarvu", "ukazmrizku", "ukaznastaveni", "ukazpaletu", "ukazpodpery", "ukazpostredizakladnihofontu", "ukazramecek", "ukazsadusymbolu", "ukazskupinubarev", "ukazupravu", "ukazvytisk", "ukazvzhled", "ukazzakladnifont", "umistikombinovanyseznam", "umistilokalnipoznamkypodcarou", "umistinadsebe", "umistinamrizku", "umistipodrovnici", "umistipoznamkypodcarou", "umistirejstrik", "umistirovnici", "umistiseznam", "umistivedlesebe", "umistizalozky", "urcicharakteristikurejstriku", "uzijJSscripts", "uzijURL", "uzijadresar", "uzijbloky", "uzijexternidokument", "uzijexterniobraz", "uzijexternizvuk", "uzijmodul", "uzijsymbol", "uzijurl", "verze", "vlasovalinka", "vradku", "vsedniden", "vyberbloky", "vyplnenytext", "vyplnovelinky", "vyplnovyradek", "vysoky", "zachovejbloky", "zadnamezera", "zadnehorniadolniradky", "zadnezahlaviaupati", "zalozka", "zapisdoseznamu", "zapismeziseznam", "zaramovani", "zarovnanonastred", "zarovnanovlevo", "zarovnanovpravo", "zasobnikpoli", "ziskejbuffer", "ziskejznaceni", "znaceni", "znak", "znaky", "zpracujbloky", "zrcadlit", "zref" },
- ["de"]={ "Buchstabe", "Buchstaben", "Kap", "MONAT", "Roemischezahlen", "WOCHENTAG", "WOERTER", "WORT", "Woerter", "Wort", "Ziffern", "amgitterausrichten", "aufseite", "ausfuelltext", "ausschnitt", "bearbeitebloecke", "behaltebloecke", "bei", "bemerkung", "benutzeverzeichnis", "beschriftung", "bestimmekopfnummer", "bestimmelistencharakeristika", "bestimmeregistercharakteristika", "bildschirm", "blanko", "buchstabe", "buchstaben", "datum", "defineschriftsynonym", "definiereabbsymbol", "definiereabsaetze", "definiereabschnitt", "definiereabschnittsblock", "definiereakzent", "definierebefehl", "definierebeschreibung", "definierebeschriftung", "definiereblock", "definierefarbe", "definierefarbengruppe", "definierefeld", "definierefeldstapel", "definierefliesstext", "definierefliesstextumgebung", "definieregleitobjekt", "definierehbox", "definiereinteraktionsmenue", "definierekonversion", "definierelabel", "definiereliste", "definieren", "definierenummerierung", "definiereoverlay", "definierepalette", "definierepapierformat", "definiereprofil", "definiereprogramme", "definierepuffer", "definierereferenz", "definierereferenzformat", "definiereregister", "definiereschrift", "definiereschriftstil", "definieresortieren", "definierestartstop", "definierestil", "definieresubfeld", "definieresymbol", "definieresynonyme", "definieretabellenvorlage", "definieretabulator", "definieretext", "definieretippen", "definiereueberschrift", "definiereumbruch", "definiereumrahmt", "definiereumrahmtertext", "definierezeichen", "definierezusammengestellteliste", "drehen", "duennelinie", "duennerumriss", "einezeile", "externeabbildung", "farbbalken", "farbe", "farbewert", "feld", "feldstapel", "festesspatium", "format", "formelnummer", "gefuelltesrechteck", "gefuelltezeile", "gestreckt", "gitter", "graufarbe", "haarlinie", "hauptsprache", "heutigesdatum", "heutigeskopfnummer", "hintergrund", "hoch", "holebeschriftung", "holepuffer", "imumriss", "installieresprache", "interaktionsbalken", "interaktionsknopfe", "interaktionsmenue", "inzeile", "irgendwo", "keinekopfundfusszeilen", "keinspatium", "keinzeilenobenundunten", "klonierefeld", "knopf", "komponente", "konvertierezahl", "kopfnummer", "kopierefeld", "korrigierezwischenraum", "liniendicke", "linksbuendig", "listenlaenge", "mathematik", "menueknopf", "monat", "nachunten", "nokap", "notiz", "passelayoutan", "passendfeld", "platzierebookmarks", "platziereformel", "platzierefussnoten", "platziereliste", "platzierelokalefussnoten", "platzierenebeneinander", "platziereregister", "platziereuntereinander", "platziereunterformel", "platzierezusammengestellteliste", "pos", "posten", "produkt", "programm", "projekt", "punkt", "rechteck", "rechtecke", "rechtsbuendig", "referenz", "referieren", "roemischezahlen", "ruecksetztenbeschriftung", "schreibezurliste", "schreibezwischenliste", "seite", "seitenreferenz", "seitenummer", "settext", "spalte", "spatium", "spiegeln", "sprache", "startfarbe", "starthintergrund", "startinteraktionsmenue", "startkleinerdurchschuss", "startkomponente", "startkopf", "startlinksbuendig", "startmarginallinie", "startplatziereformel", "startpos", "startprodukt", "startprojekt", "startpublikation", "startrechtsbuendig", "startsprache", "starttextlinie", "startumgebung", "startumrahmt", "startzeile", "startzentriert", "startzu", "stelleabsaetzeein", "stelleabsatznummerierungein", "stelleabschnittsblockein", "stelleanordnenein", "stelleaufzaehlungenein", "stelleausrichtungein", "stelleausschnittein", "stellebeschreibungein", "stellebeschriftungein", "stellebilderunterschriftein", "stellebildunterschriftein", "stellebindestrichein", "stelleblankoein", "stelleblockein", "stelledrehenein", "stelleduennerumrissein", "stelleeinziehenein", "stelleengerein", "stellefarbeein", "stellefarbenein", "stellefeldein", "stellefelderin", "stellefliesstextein", "stelleformelnein", "stellefussnotenein", "stellefusszeileein", "stellefusszeilentextein", "stellegefuelltesrechteckein", "stellegefuelltezeileein", "stellegegenueberplatzierenein", "stellegleitobjekteein", "stellegleitobjektein", "stellehintergruendeein", "stellehintergrundein", "stelleinteraktionein", "stelleinteraktionsbalkenein", "stelleinteraktionsbildschirmein", "stelleinteraktionsmenueein", "stellekommentarein", "stellekopfzahlein", "stellekopfzeileein", "stellekopfzeilentextein", "stellelayoutein", "stellelinienbreiteein", "stellelisteein", "stellemarginallinieein", "stellenobenein", "stellepaletteein", "stellepapierformatein", "stelleplatziegeteiltegleitobjekt", "stellepositionierenein", "stellepostenein", "stelleprogrammein", "stellepufferein", "stellerechteckein", "stellereferenzierenein", "stelleregisterein", "stelleseitenkommentarein", "stelleseitennummerein", "stelleseitennummeriernungein", "stelleseitenuebergangein", "stellesortierenein", "stellespaltenein", "stellespatiumein", "stellespracheein", "stellesymbolsetein", "stellesynonymein", "stelletabellenein", "stelletabulatorein", "stelletextein", "stelletextobenein", "stelletexttexteein", "stelletextumrissein", "stelletextuntenein", "stelletipein", "stelletippenein", "stelletoleranzein", "stelleueberschriftein", "stelleueberschriftenein", "stelleumbruchein", "stelleumrahmtein", "stelleumrahmtetexteein", "stelleuntenein", "stelleunterseitennummerein", "stelleurlein", "stelleversalienein", "stellezeilenabstandein", "stellezeilenein", "stellezeilennumerierungein", "stellezitierenein", "stellezusammengestelltelisteein", "stellezwischenraumein", "stopfarbe", "stophintergrund", "stopinteraktionsmenue", "stopkleinerdurchschuss", "stopkomponente", "stopkopf", "stoplinksbuendig", "stopmarginallinie", "stopplatziereformel", "stoppos", "stopprodukt", "stopprojekt", "stoppublikation", "stoprechtsbuendig", "stopsprache", "stoptextlinie", "stopumgebung", "stopumrahmt", "stopzeile", "stopzentriert", "stopzu", "teilegleitobjekt", "textlinie", "textreferenz", "tief", "tiho", "tip", "tippedatei", "tippen", "tippepuffer", "ueber", "uebersetzten", "umgebung", "umrahmt", "unbekant", "verbergebloecke", "vergleichefarbengruppe", "vergleichepalette", "verwendeJSscript", "verwendeURL", "verwendebloecke", "verwendeexteresdokument", "verwendeexterneabbildung", "verwendeexternestonstueck", "verwendemodul", "verwendesymbole", "verwendeurl", "volleswort", "von", "waehlebloeckeaus", "wechselezumfliesstext", "wochentag", "wortrechts", "zeigedruck", "zeigeeinstellungen", "zeigefarbe", "zeigefarbengruppe", "zeigefliesstext", "zeigefliesstextumgebung", "zeigegitter", "zeigelayout", "zeigepalette", "zeigerahmen", "zeigestruts", "zeigeumbruch", "zentriert", "ziffern", "zu", "zurbox", "zurseite" },
+ ["common"]={ "AEacute", "AEligature", "AEmacron", "AMSTEX", "Aacute", "Abreve", "Abreveacute", "Abrevedotbelow", "Abrevegrave", "Abrevehook", "Abrevetilde", "Acaron", "Acircumflex", "Acircumflexacute", "Acircumflexdotbelow", "Acircumflexgrave", "Acircumflexhook", "Acircumflextilde", "Adiaeresis", "Adiaeresismacron", "Adotaccent", "Adotaccentmacron", "Adotbelow", "Adoublegrave", "AfterPar", "Agrave", "Ahook", "Ainvertedbreve", "Alpha", "Alphabeticnumerals", "AmSTeX", "Amacron", "And", "Angstrom", "Aogonek", "Aring", "Aringacute", "Arrowvert", "Astroke", "Atilde", "BeforePar", "Beta", "Bhook", "Big", "Bigg", "Biggl", "Biggm", "Biggr", "Bigl", "Bigm", "Bigr", "Box", "Bumpeq", "CONTEXT", "Cacute", "Cap", "Caps", "Ccaron", "Ccedilla", "Ccircumflex", "Cdotaccent", "Character", "Characters", "Chi", "Chook", "ConTeXt", "Context", "ConvertConstantAfter", "ConvertToConstant", "Cstroke", "Cup", "DAYLONG", "DAYSHORT", "DZcaronligature", "DZligature", "Dafrican", "Dcaron", "Ddownarrow", "Delta", "Dhook", "Doteq", "Downarrow", "Dstroke", "Dzcaronligature", "Dzligature", "ETEX", "Eacute", "Ebreve", "Ecaron", "Ecedilla", "Ecircumflex", "Ecircumflexacute", "Ecircumflexdotbelow", "Ecircumflexgrave", "Ecircumflexhook", "Ecircumflextilde", "Ediaeresis", "Edotaccent", "Edotbelow", "Edoublegrave", "Egrave", "Ehook", "Einvertedbreve", "Emacron", "Eogonek", "Epsilon", "Eta", "Eth", "Etilde", "Eulerconst", "EveryLine", "EveryPar", "Fhook", "Finv", "Gacute", "Game", "Gamma", "Gbreve", "Gcaron", "Gcircumflex", "Gcommaaccent", "Gdotaccent", "GetPar", "Ghook", "GotoPar", "Greeknumerals", "Gstroke", "Hat", "Hcaron", "Hcircumflex", "Hstroke", "IJligature", "INRSTEX", "Iacute", "Ibreve", "Icaron", "Icircumflex", "Idiaeresis", "Idotaccent", "Idotbelow", "Idoublegrave", "Igrave", "Ihook", "Iinvertedbreve", "Im", "Imacron", "Iogonek", "Iota", "Istroke", "Itilde", "Jcircumflex", "Join", "Kappa", "Kcaron", "Kcommaaccent", "Khook", "LAMSTEX", "LATEX", "LJligature", "LUAJITTEX", "LUAMETATEX", "LUATEX", "LaTeX", "Lacute", "LamSTeX", "Lambda", "Lbar", "Lcaron", "Lcommaaccent", "Ldotmiddle", "Ldsh", "Leftarrow", "Leftrightarrow", "Ljligature", "Lleftarrow", "Longleftarrow", "Longleftrightarrow", "Longmapsfrom", "Longmapsto", "Longrightarrow", "Lsh", "Lstroke", "Lua", "LuaMetaTeX", "LuaTeX", "LuajitTeX", "METAFONT", "METAFUN", "METAPOST", "MKII", "MKIV", "MKIX", "MKLX", "MKVI", "MKXI", "MKXL", "MONTH", "MONTHLONG", "MONTHSHORT", "MPII", "MPIV", "MPLX", "MPVI", "MPXL", "MPanchor", "MPbetex", "MPc", "MPcode", "MPcolor", "MPcoloronly", "MPcolumn", "MPd", "MPdrawing", "MPfontsizehskip", "MPgetmultipars", "MPgetmultishape", "MPgetposboxes", "MPh", "MPinclusions", "MPleftskip", "MPll", "MPlr", "MPls", "MPmenubuttons", "MPn", "MPoptions", "MPoverlayanchor", "MPp", "MPpage", "MPpardata", "MPplus", "MPpos", "MPpositiongraphic", "MPposset", "MPr", "MPrawvar", "MPregion", "MPrest", "MPrightskip", "MPrs", "MPstring", "MPtext", "MPtransparency", "MPul", "MPur", "MPv", "MPvar", "MPvariable", "MPvv", "MPw", "MPwhd", "MPx", "MPxy", "MPxywhd", "MPy", "Mapsfrom", "Mapsto", "MetaFont", "MetaFun", "MetaPost", "Mu", "NJligature", "Nacute", "Ncaron", "Ncommaaccent", "Nearrow", "Neng", "Ngrave", "Njligature", "NormalizeFontHeight", "NormalizeFontWidth", "NormalizeTextHeight", "NormalizeTextWidth", "Ntilde", "Nu", "Numbers", "Nwarrow", "OEligature", "Oacute", "Obreve", "Ocaron", "Ocircumflex", "Ocircumflexacute", "Ocircumflexdotbelow", "Ocircumflexgrave", "Ocircumflexhook", "Ocircumflextilde", "Odiaeresis", "Odiaeresismacron", "Odotaccent", "Odotaccentmacron", "Odotbelow", "Odoublegrave", "Ograve", "Ohook", "Ohorn", "Ohornacute", "Ohorndotbelow", "Ohorngrave", "Ohornhook", "Ohorntilde", "Ohungarumlaut", "Oinvertedbreve", "Omacron", "Omega", "Omicron", "Oogonek", "Oogonekmacron", "Ostroke", "Ostrokeacute", "Otilde", "Otildemacron", "P", "PDFETEX", "PDFTEX", "PDFcolor", "PICTEX", "PPCHTEX", "PPCHTeX", "PRAGMA", "Phi", "Phook", "Pi", "PiCTeX", "Plankconst", "PointsToBigPoints", "PointsToReal", "PointsToWholeBigPoints", "PropertyLine", "Psi", "PtToCm", "Racute", "Rcaron", "Rcommaaccent", "Rdoublegrave", "Rdsh", "Re", "ReadFile", "Relbar", "Rho", "Rightarrow", "Rinvertedbreve", "Romannumerals", "Rrightarrow", "Rsh", "S", "Sacute", "ScaledPointsToBigPoints", "ScaledPointsToWholeBigPoints", "Scaron", "Scedilla", "Schwa", "Scircumflex", "Scommaaccent", "Searrow", "Sigma", "Smallcapped", "Subset", "Supset", "Swarrow", "TABLE", "TEX", "TaBlE", "Tau", "Tcaron", "Tcedilla", "Tcommaaccent", "TeX", "TheNormalizedFontSize", "Theta", "Thook", "Thorn", "TransparencyHack", "Tstroke", "Uacute", "Ubreve", "Ucaron", "Ucircumflex", "Udiaeresis", "Udiaeresisacute", "Udiaeresiscaron", "Udiaeresisgrave", "Udiaeresismacron", "Udotbelow", "Udoublegrave", "Ugrave", "Uhook", "Uhorn", "Uhornacute", "Uhorndotbelow", "Uhorngrave", "Uhornhook", "Uhorntilde", "Uhungarumlaut", "Uinvertedbreve", "Umacron", "Uogonek", "Uparrow", "Updownarrow", "Upsilon", "Uring", "Utilde", "Uuparrow", "VDash", "Vdash", "VerboseNumber", "Vert", "Vhook", "Vvdash", "WEEKDAY", "WORD", "WORDS", "Wcircumflex", "WidthSpanningText", "Word", "Words", "XETEX", "XeTeX", "Xi", "Yacute", "Ycircumflex", "Ydiaeresis", "Ydotbelow", "Ygrave", "Yhook", "Ymacron", "Ytilde", "Zacute", "Zcaron", "Zdotaccent", "Zeta", "Zhook", "Zstroke", "aacute", "abbreviation", "abjadnaivenumerals", "abjadnodotnumerals", "abjadnumerals", "about", "abreve", "abreveacute", "abrevedotbelow", "abrevegrave", "abrevehook", "abrevetilde", "acaron", "acircumflex", "acircumflexacute", "acircumflexdotbelow", "acircumflexgrave", "acircumflexhook", "acircumflextilde", "activatespacehandler", "actualday", "actualmonth", "actualyear", "actuarial", "acute", "acwopencirclearrow", "adaptcollector", "adaptfontfeature", "adaptlayout", "adaptpapersize", "addfeature", "addtoJSpreamble", "addtocommalist", "addvalue", "adiaeresis", "adiaeresismacron", "adotaccent", "adotaccentmacron", "adotbelow", "adoublegrave", "aeacute", "aeligature", "aemacron", "afghanicurrency", "aftersplitstring", "aftertestandsplitstring", "agrave", "ahook", "ainvertedbreve", "aleph", "alignbottom", "aligned", "alignedbox", "alignedline", "alignhere", "alignmentcharacter", "allinputpaths", "alpha", "alphabeticnumerals", "alwayscitation", "alwayscite", "amacron", "amalg", "ampersand", "anchor", "angle", "aogonek", "appendetoks", "appendgvalue", "appendtocommalist", "appendtoks", "appendtoksonce", "appendvalue", "apply", "applyalternativestyle", "applyprocessor", "applytocharacters", "applytofirstcharacter", "applytosplitstringchar", "applytosplitstringcharspaced", "applytosplitstringline", "applytosplitstringlinespaced", "applytosplitstringword", "applytosplitstringwordspaced", "applytowords", "approx", "approxEq", "approxeq", "approxnEq", "arabicakbar", "arabicalayhe", "arabicallah", "arabicallallahou", "arabicasterisk", "arabicbasmalah", "arabiccomma", "arabiccuberoot", "arabicdateseparator", "arabicdecimals", "arabicdisputedendofayah", "arabicendofayah", "arabicexnumerals", "arabicfootnotemarker", "arabicfourthroot", "arabichighain", "arabichighalayheassallam", "arabichigheqala", "arabichighesala", "arabichighfootnotemarker", "arabichighjeem", "arabichighlamalef", "arabichighmadda", "arabichighmeemlong", "arabichighmeemshort", "arabichighnisf", "arabichighnoon", "arabichighnoonkasra", "arabichighqaf", "arabichighqif", "arabichighradiallahouanhu", "arabichighrahmatullahalayhe", "arabichighrubc", "arabichighsad", "arabichighsajda", "arabichighsakta", "arabichighsallallahou", "arabichighseen", "arabichighsmallsafha", "arabichightah", "arabichightakhallus", "arabichighthalatha", "arabichighwaqf", "arabichighyeh", "arabichighzain", "arabicjallajalalouhou", "arabiclettermark", "arabiclowmeemlong", "arabiclownoonkasra", "arabiclowseen", "arabicmisra", "arabicmuhammad", "arabicnumber", "arabicnumberabove", "arabicnumerals", "arabicparenleft", "arabicparenright", "arabicpercent", "arabicperiod", "arabicpermille", "arabicpertenthousand", "arabicpoeticverse", "arabicqala", "arabicquestion", "arabicrasoul", "arabicray", "arabicrialsign", "arabicsafha", "arabicsajdah", "arabicsalla", "arabicsamvat", "arabicsanah", "arabicsemicolon", "arabicshighthreedots", "arabicslcm", "arabicstartofrubc", "arabictripledot", "arabicvowelwaw", "arabicvowelyeh", "arabicwasallam", "arg", "aring", "aringacute", "arrowvert", "asciimode", "asciistr", "aside", "assignalfadimension", "assigndimen", "assigndimension", "assignifempty", "assigntranslation", "assignvalue", "assignwidth", "assumelongusagecs", "ast", "astype", "asymp", "at", "atilde", "atleftmargin", "atpage", "atrightmargin", "attachment", "autocap", "autodirhbox", "autodirvbox", "autodirvtop", "autoinsertnextspace", "autointegral", "automathematics", "autoorientation", "autopagestaterealpage", "autopagestaterealpageorder", "autorule", "autosetups", "availablehsize", "averagecharwidth", "backepsilon", "background", "backgroundimage", "backgroundimagefill", "backgroundline", "backprime", "backsim", "backslash", "bar", "barleftarrow", "barleftarrowrightarrowbar", "barovernorthwestarrow", "barwedge", "basegrid", "baselinebottom", "baselineleftbox", "baselinemiddlebox", "baselinerightbox", "bbordermatrix", "bbox", "because", "beforesplitstring", "beforetestandsplitstring", "beta", "beth", "between", "bhook", "big", "bigbodyfont", "bigcap", "bigcirc", "bigcircle", "bigcup", "bigdiamond", "bigg", "bigger", "biggl", "biggm", "biggr", "bigl", "bigm", "bigodot", "bigoplus", "bigotimes", "bigr", "bigskip", "bigsqcap", "bigsqcup", "bigsquare", "bigstar", "bigtimes", "bigtriangledown", "bigtriangleup", "bigudot", "biguplus", "bigvee", "bigwedge", "binom", "bitmapimage", "blacklozenge", "blackrule", "blackrules", "blacksquare", "blacktriangle", "blacktriangledown", "blacktriangleleft", "blacktriangleright", "blank", "blap", "bleed", "bleedheight", "bleedwidth", "blockligatures", "blockquote", "blocksynctexfile", "blockuservariable", "bodyfontenvironmentlist", "bodyfontsize", "bold", "boldface", "bolditalic", "boldslanted", "bookmark", "booleanmodevalue", "bordermatrix", "bot", "bottombox", "bottomleftbox", "bottomrightbox", "bowtie", "boxcursor", "boxdot", "boxmarker", "boxminus", "boxofsize", "boxplus", "boxreference", "boxtimes", "bpos", "breakablethinspace", "breakhere", "breve", "bstroke", "btxabbreviatedjournal", "btxaddjournal", "btxalwayscitation", "btxauthorfield", "btxdetail", "btxdirect", "btxdoif", "btxdoifcombiinlistelse", "btxdoifelse", "btxdoifelsecombiinlist", "btxdoifelsesameasprevious", "btxdoifelsesameaspreviouschecked", "btxdoifelseuservariable", "btxdoifnot", "btxdoifsameaspreviouscheckedelse", "btxdoifsameaspreviouselse", "btxdoifuservariableelse", "btxexpandedjournal", "btxfield", "btxfieldname", "btxfieldtype", "btxfirstofrange", "btxflush", "btxflushauthor", "btxflushauthorinverted", "btxflushauthorinvertedshort", "btxflushauthorname", "btxflushauthornormal", "btxflushauthornormalshort", "btxflushsuffix", "btxfoundname", "btxfoundtype", "btxhiddencitation", "btxhybridcite", "btxlabellanguage", "btxlabeltext", "btxlistcitation", "btxloadjournalist", "btxoneorrange", "btxremapauthor", "btxsavejournalist", "btxsetup", "btxsingularorplural", "btxsingularplural", "btxtextcitation", "buildmathaccent", "buildtextaccent", "buildtextbottomcomma", "buildtextbottomdot", "buildtextcedilla", "buildtextgrave", "buildtextmacron", "buildtextognek", "bullet", "button", "cacute", "calligraphic", "camel", "cap", "capital", "carriagereturn", "catcodetablename", "cbox", "ccaron", "ccedilla", "ccircumflex", "ccurl", "cdot", "cdotaccent", "cdotp", "cdots", "centeraligned", "centerbox", "centerdot", "centeredbox", "centeredlastline", "centerednextbox", "centerline", "cfrac", "chapter", "character", "characters", "chardescription", "charwidthlanguage", "check", "checkcharacteralign", "checkedblank", "checkedchar", "checkedfiller", "checkedstrippedcsname", "checkinjector", "checkmark", "checknextindentation", "checknextinjector", "checkpage", "checkparameters", "checkpreviousinjector", "checksoundtrack", "checktwopassdata", "checkvariables", "chem", "chemical", "chemicalbottext", "chemicalmidtext", "chemicalsymbol", "chemicaltext", "chemicaltoptext", "chi", "chineseallnumerals", "chinesecapnumerals", "chinesenumerals", "chook", "circ", "circeq", "circlearrowleft", "circlearrowright", "circledR", "circledS", "circledast", "circledcirc", "circleddash", "circledequals", "circleonrightarrow", "citation", "cite", "clap", "classfont", "cldcommand", "cldcontext", "cldloadfile", "cldprocessfile", "cleftarrow", "clip", "clippedoverlayimage", "clonefield", "clubsuit", "collect", "collectedtext", "collectexpanded", "colon", "coloncolonequals", "colonequals", "color", "colorbar", "colorcomponents", "colored", "coloronly", "colorvalue", "column", "columnbreak", "columnsetspanwidth", "combinepages", "commalistelement", "commalistsentence", "commalistsize", "comment", "comparecolorgroup", "comparedimension", "comparedimensioneps", "comparepalet", "complement", "completebtxrendering", "completecontent", "completeindex", "completelist", "completelistofabbreviations", "completelistofchemicals", "completelistoffigures", "completelistofgraphics", "completelistofintermezzi", "completelistoflogos", "completelistofpublications", "completelistofsorts", "completelistofsynonyms", "completelistoftables", "completepagenumber", "completeregister", "complexes", "complexorsimple", "complexorsimpleempty", "component", "composedcollector", "composedlayer", "compounddiscretionary", "compresult", "cong", "constantdimen", "constantdimenargument", "constantemptyargument", "constantnumber", "constantnumberargument", "contentreference", "continuednumber", "continueifinputfile", "convertargument", "convertcommand", "convertedcounter", "converteddimen", "convertedsubcounter", "convertmonth", "convertnumber", "convertvalue", "convertvboxtohbox", "coprod", "copyboxfromcache", "copybtxlabeltext", "copyfield", "copyheadtext", "copylabeltext", "copymathlabeltext", "copyoperatortext", "copypages", "copyparameters", "copyposition", "copyprefixtext", "copyright", "copysetups", "copysuffixtext", "copytaglabeltext", "copyunittext", "correctwhitespace", "countersubs", "counttoken", "counttokens", "cramped", "crampedclap", "crampedllap", "crampedrlap", "crightarrow", "crightoverleftarrow", "crlf", "crlfplaceholder", "cstroke", "ctop", "ctxcommand", "ctxdirectcommand", "ctxdirectlua", "ctxfunction", "ctxlatecommand", "ctxlatelua", "ctxloadluafile", "ctxlua", "ctxluabuffer", "ctxluacode", "ctxreport", "ctxsprint", "cup", "curlyeqprec", "curlyeqsucc", "curlyvee", "curlywedge", "currentassignmentlistkey", "currentassignmentlistvalue", "currentbtxuservariable", "currentcommalistitem", "currentcomponent", "currentdate", "currentenvironment", "currentfeaturetest", "currentheadnumber", "currentinterface", "currentlanguage", "currentlistentrydestinationattribute", "currentlistentrylimitedtext", "currentlistentrynumber", "currentlistentrypagenumber", "currentlistentryreferenceattribute", "currentlistentrytitle", "currentlistentrytitlerendered", "currentlistsymbol", "currentmainlanguage", "currentmessagetext", "currentmoduleparameter", "currentoutputstream", "currentproduct", "currentproject", "currentregime", "currentregisterpageuserdata", "currentresponses", "currenttime", "currentvalue", "currentxtablecolumn", "currentxtablerow", "curvearrowleft", "curvearrowright", "cwopencirclearrow", "cyrillicA", "cyrillicAE", "cyrillicAbreve", "cyrillicAdiaeresis", "cyrillicB", "cyrillicBIGYUS", "cyrillicBIGYUSiotified", "cyrillicC", "cyrillicCH", "cyrillicCHEDC", "cyrillicCHEDCabkhasian", "cyrillicCHEabkhasian", "cyrillicCHEdiaeresis", "cyrillicCHEkhakassian", "cyrillicCHEvertstroke", "cyrillicD", "cyrillicDASIAPNEUMATA", "cyrillicDJE", "cyrillicDZE", "cyrillicDZEabkhasian", "cyrillicDZHE", "cyrillicE", "cyrillicELtail", "cyrillicEMtail", "cyrillicENDC", "cyrillicENGHE", "cyrillicENhook", "cyrillicENtail", "cyrillicEREV", "cyrillicERY", "cyrillicERtick", "cyrillicEbreve", "cyrillicEdiaeresis", "cyrillicEgrave", "cyrillicEiotified", "cyrillicF", "cyrillicFITA", "cyrillicG", "cyrillicGHEmidhook", "cyrillicGHEstroke", "cyrillicGHEupturn", "cyrillicGJE", "cyrillicH", "cyrillicHA", "cyrillicHADC", "cyrillicHRDSN", "cyrillicI", "cyrillicIE", "cyrillicII", "cyrillicISHRT", "cyrillicISHRTtail", "cyrillicIZHITSA", "cyrillicIZHITSAdoublegrave", "cyrillicIdiaeresis", "cyrillicIgrave", "cyrillicImacron", "cyrillicJE", "cyrillicK", "cyrillicKADC", "cyrillicKAbashkir", "cyrillicKAhook", "cyrillicKAstroke", "cyrillicKAvertstroke", "cyrillicKJE", "cyrillicKOPPA", "cyrillicKSI", "cyrillicL", "cyrillicLITTLEYUS", "cyrillicLITTLEYUSiotified", "cyrillicLJE", "cyrillicM", "cyrillicN", "cyrillicNJE", "cyrillicO", "cyrillicOMEGA", "cyrillicOMEGAround", "cyrillicOMEGAtitlo", "cyrillicOT", "cyrillicObarred", "cyrillicObarreddiaeresis", "cyrillicOdiaeresis", "cyrillicP", "cyrillicPALATALIZATION", "cyrillicPALOCHKA", "cyrillicPEmidhook", "cyrillicPSI", "cyrillicPSILIPNEUMATA", "cyrillicR", "cyrillicS", "cyrillicSCHWA", "cyrillicSCHWAdiaeresis", "cyrillicSDSC", "cyrillicSEMISOFT", "cyrillicSFTSN", "cyrillicSH", "cyrillicSHCH", "cyrillicSHHA", "cyrillicT", "cyrillicTEDC", "cyrillicTETSE", "cyrillicTITLO", "cyrillicTSHE", "cyrillicU", "cyrillicUK", "cyrillicUSHRT", "cyrillicUdiaeresis", "cyrillicUdoubleacute", "cyrillicUmacron", "cyrillicV", "cyrillicYA", "cyrillicYAT", "cyrillicYERUdiaeresis", "cyrillicYI", "cyrillicYO", "cyrillicYU", "cyrillicYstr", "cyrillicYstrstroke", "cyrillicZ", "cyrillicZDSC", "cyrillicZEdiaeresis", "cyrillicZH", "cyrillicZHEbreve", "cyrillicZHEdescender", "cyrillicZHEdiaeresis", "cyrillica", "cyrillicabreve", "cyrillicadiaeresis", "cyrillicae", "cyrillicb", "cyrillicbigyus", "cyrillicbigyusiotified", "cyrillicc", "cyrillicch", "cyrilliccheabkhasian", "cyrillicchedc", "cyrillicchedcabkhasian", "cyrillicchediaeresis", "cyrillicchekhakassian", "cyrillicchevertstroke", "cyrillicd", "cyrillicdje", "cyrillicdze", "cyrillicdzeabkhasian", "cyrillicdzhe", "cyrillice", "cyrillicebreve", "cyrillicediaeresis", "cyrillicegrave", "cyrilliceiotified", "cyrilliceltail", "cyrillicemtail", "cyrillicendc", "cyrillicenghe", "cyrillicenhook", "cyrillicentail", "cyrillicerev", "cyrillicertick", "cyrillicery", "cyrillicf", "cyrillicfita", "cyrillicg", "cyrillicghemidhook", "cyrillicghestroke", "cyrillicgheupturn", "cyrillicgje", "cyrillich", "cyrillicha", "cyrillichadc", "cyrillichrdsn", "cyrillici", "cyrillicidiaeresis", "cyrillicie", "cyrillicigrave", "cyrillicii", "cyrillicimacron", "cyrillicishrt", "cyrillicishrttail", "cyrillicizhitsa", "cyrillicizhitsadoublegrave", "cyrillicje", "cyrillick", "cyrillickabashkir", "cyrillickadc", "cyrillickahook", "cyrillickastroke", "cyrillickavertstroke", "cyrillickje", "cyrillickoppa", "cyrillicksi", "cyrillicl", "cyrilliclittleyus", "cyrilliclittleyusiotified", "cyrilliclje", "cyrillicm", "cyrillicn", "cyrillicnje", "cyrillico", "cyrillicobarred", "cyrillicobarreddiaeresis", "cyrillicodiaeresis", "cyrillicomega", "cyrillicomegaround", "cyrillicomegatitlo", "cyrillicot", "cyrillicp", "cyrillicpemidhook", "cyrillicpsi", "cyrillicr", "cyrillics", "cyrillicschwa", "cyrillicschwadiaeresis", "cyrillicsdsc", "cyrillicsemisoft", "cyrillicsftsn", "cyrillicsh", "cyrillicshch", "cyrillicshha", "cyrillict", "cyrillictedc", "cyrillictetse", "cyrillictshe", "cyrillicu", "cyrillicudiaeresis", "cyrillicudoubleacute", "cyrillicuk", "cyrillicumacron", "cyrillicushrt", "cyrillicv", "cyrillicya", "cyrillicyat", "cyrillicyerudiaeresis", "cyrillicyi", "cyrillicyo", "cyrillicystr", "cyrillicystrstroke", "cyrillicyu", "cyrillicz", "cyrilliczdsc", "cyrilliczediaeresis", "cyrilliczh", "cyrilliczhebreve", "cyrilliczhedescender", "cyrilliczhediaeresis", "d", "dag", "dagger", "daleth", "dasharrow", "dashedleftarrow", "dashedrightarrow", "dashv", "datasetvariable", "date", "daylong", "dayoftheweek", "dayshort", "dayspermonth", "dbinom", "dcaron", "dcurl", "ddag", "ddagger", "dddot", "ddot", "ddots", "decrement", "decrementcounter", "decrementedcounter", "decrementpagenumber", "decrementsubpagenumber", "decrementvalue", "defaultinterface", "defaultobjectpage", "defaultobjectreference", "defcatcodecommand", "defconvertedargument", "defconvertedcommand", "defconvertedvalue", "define", "defineMPinstance", "defineTABLEsetup", "defineaccent", "defineactivecharacter", "definealternativestyle", "defineanchor", "defineattachment", "defineattribute", "definebackground", "definebar", "defineblock", "definebodyfont", "definebodyfontenvironment", "definebodyfontswitch", "definebreakpoint", "definebreakpoints", "definebtx", "definebtxdataset", "definebtxregister", "definebtxrendering", "definebuffer", "definebutton", "definecapitals", "definecharacter", "definecharacterkerning", "definecharacterspacing", "definechemical", "definechemicals", "definechemicalsymbol", "definecollector", "definecolor", "definecolorgroup", "definecolumnbreak", "definecolumnset", "definecolumnsetarea", "definecolumnsetspan", "definecombination", "definecombinedlist", "definecommand", "definecomment", "definecomplexorsimple", "definecomplexorsimpleempty", "defineconversion", "defineconversionset", "definecounter", "definedataset", "definedate", "definedelimitedtext", "definedeq", "definedescription", "definedfont", "definedocument", "defineeffect", "defineenumeration", "defineexpandable", "defineexpansion", "defineexternalfigure", "definefacingfloat", "definefallbackfamily", "definefield", "definefieldbody", "definefieldbodyset", "definefieldcategory", "definefieldstack", "definefiguresymbol", "definefileconstant", "definefilefallback", "definefilesynonym", "definefiller", "definefirstline", "definefittingpage", "definefloat", "definefont", "definefontalternative", "definefontfallback", "definefontfamily", "definefontfamilypreset", "definefontfeature", "definefontfile", "definefontsize", "definefontsolution", "definefontstyle", "definefontsynonym", "defineformula", "defineformulaalternative", "defineformulaframed", "defineframed", "defineframedcontent", "defineframedtable", "defineframedtext", "definefrozenfont", "defineglobalcolor", "definegraphictypesynonym", "definegridsnapping", "definehbox", "definehead", "defineheadalternative", "definehelp", "definehigh", "definehighlight", "definehspace", "definehyphenationfeatures", "defineindentedtext", "defineindenting", "defineinitial", "defineinsertion", "defineinteraction", "defineinteractionbar", "defineinteractionmenu", "defineinterfaceconstant", "defineinterfaceelement", "defineinterfacevariable", "defineinterlinespace", "defineintermediatecolor", "defineitemgroup", "defineitems", "definelabel", "definelabelclass", "definelayer", "definelayerpreset", "definelayout", "definelinefiller", "definelinenote", "definelinenumbering", "definelines", "definelist", "definelistalternative", "definelistextra", "definelow", "definelowhigh", "definelowmidhigh", "definemakeup", "definemarginblock", "definemargindata", "definemarker", "definemarking", "definemathaccent", "definemathalignment", "definemathcases", "definemathcommand", "definemathdouble", "definemathdoubleextensible", "definemathematics", "definemathextensible", "definemathfence", "definemathfraction", "definemathframed", "definemathmatrix", "definemathornament", "definemathover", "definemathoverextensible", "definemathovertextextensible", "definemathradical", "definemathstackers", "definemathstyle", "definemathtriplet", "definemathunder", "definemathunderextensible", "definemathundertextextensible", "definemathunstacked", "definemeasure", "definemessageconstant", "definemixedcolumns", "definemode", "definemulticolumns", "definemultitonecolor", "definenamedcolor", "definenamespace", "definenarrower", "definenote", "defineorientation", "defineornament", "defineoutputroutine", "defineoutputroutinecommand", "defineoverlay", "definepage", "definepagebreak", "definepagechecker", "definepagecolumns", "definepageinjection", "definepageinjectionalternative", "definepageshift", "definepagestate", "definepairedbox", "definepalet", "definepapersize", "defineparagraph", "defineparagraphs", "defineparallel", "defineparbuilder", "defineperiodkerning", "defineplaceholder", "defineplacement", "definepositioning", "defineprefixset", "defineprocesscolor", "defineprocessor", "defineprofile", "defineprogram", "definepushbutton", "definepushsymbol", "definereference", "definereferenceformat", "defineregister", "definerenderingwindow", "defineresetset", "defineruby", "definescale", "definescript", "definesection", "definesectionblock", "definesectionlevels", "defineselector", "defineseparatorset", "defineshift", "definesidebar", "definesort", "definesorting", "definespotcolor", "definestartstop", "definestyle", "definestyleinstance", "definesubfield", "definesubformula", "definesymbol", "definesynonym", "definesynonyms", "definesystemattribute", "definesystemconstant", "definesystemvariable", "definetabletemplate", "definetabulate", "definetext", "definetextbackground", "definetextflow", "definetextnote", "definetokenlist", "definetooltip", "definetransparency", "definetwopasslist", "definetype", "definetypeface", "definetypescriptprefix", "definetypescriptsynonym", "definetypesetting", "definetyping", "defineunit", "defineuserdata", "defineuserdataalternative", "defineviewerlayer", "definevspace", "definevspacing", "definevspacingamount", "definextable", "defrostparagraphproperties", "delimited", "delimitedtext", "delta", "depthofstring", "depthonlybox", "depthspanningtext", "depthstrut", "determineheadnumber", "determinelistcharacteristics", "determinenoflines", "determineregistercharacteristics", "devanagarinumerals", "dfrac", "dhook", "diameter", "diamond", "diamondsuit", "differentialD", "differentiald", "digamma", "digits", "dimensiontocount", "directboxfromcache", "directcolor", "directcolored", "directconvertedcounter", "directcopyboxfromcache", "directdummyparameter", "directgetboxllx", "directgetboxlly", "directhighlight", "directlocalframed", "directluacode", "directparwrapper", "directselect", "directsetbar", "directsetup", "directsymbol", "directvspacing", "dis", "disabledirectives", "disableexperiments", "disablemode", "disableoutputstream", "disableparpositions", "disableregime", "disabletrackers", "displaymath", "displaymathematics", "displaymessage", "disposeluatable", "distributedhsize", "div", "dividedsize", "divideontimes", "divides", "doadaptleftskip", "doadaptrightskip", "doaddfeature", "doassign", "doassignempty", "doboundtext", "docheckassignment", "docheckedpair", "documentvariable", "dodoubleargument", "dodoubleargumentwithset", "dodoubleempty", "dodoubleemptywithset", "dodoublegroupempty", "doeassign", "doexpandedrecurse", "dofastloopcs", "dogetattribute", "dogetattributeid", "dogetcommacommandelement", "dogobbledoubleempty", "dogobblesingleempty", "dohyphens", "doif", "doifMPgraphicelse", "doifallcommon", "doifallcommonelse", "doifalldefinedelse", "doifallmodes", "doifallmodeselse", "doifassignmentelse", "doifassignmentelsecs", "doifblackelse", "doifbothsides", "doifbothsidesoverruled", "doifboxelse", "doifbufferelse", "doifcheckedpagestate", "doifcolor", "doifcolorelse", "doifcommandhandler", "doifcommandhandlerelse", "doifcommon", "doifcommonelse", "doifcontent", "doifconversiondefinedelse", "doifconversionnumberelse", "doifcounter", "doifcounterelse", "doifcurrentfonthasfeatureelse", "doifdefined", "doifdefinedcounter", "doifdefinedcounterelse", "doifdefinedelse", "doifdimensionelse", "doifdimenstringelse", "doifdocumentargument", "doifdocumentargumentelse", "doifdocumentfilename", "doifdocumentfilenameelse", "doifdocumentvariable", "doifdocumentvariableelse", "doifdrawingblackelse", "doifelse", "doifelseMPgraphic", "doifelseallcommon", "doifelsealldefined", "doifelseallmodes", "doifelseassignment", "doifelseassignmentcs", "doifelseblack", "doifelsebox", "doifelseboxincache", "doifelsebuffer", "doifelsecolor", "doifelsecommandhandler", "doifelsecommon", "doifelseconversiondefined", "doifelseconversionnumber", "doifelsecounter", "doifelsecurrentfonthasfeature", "doifelsecurrentsortingused", "doifelsecurrentsynonymshown", "doifelsecurrentsynonymused", "doifelsedefined", "doifelsedefinedcounter", "doifelsedimension", "doifelsedimenstring", "doifelsedocumentargument", "doifelsedocumentfilename", "doifelsedocumentvariable", "doifelsedrawingblack", "doifelseempty", "doifelseemptyvalue", "doifelseemptyvariable", "doifelseenv", "doifelsefastoptionalcheck", "doifelsefastoptionalcheckcs", "doifelsefieldbody", "doifelsefieldcategory", "doifelsefigure", "doifelsefile", "doifelsefiledefined", "doifelsefileexists", "doifelsefirstchar", "doifelseflagged", "doifelsefontchar", "doifelsefontfeature", "doifelsefontpresent", "doifelsefontsynonym", "doifelseframed", "doifelsehasspace", "doifelsehelp", "doifelseincsname", "doifelseindented", "doifelseinelement", "doifelseinputfile", "doifelseinsertion", "doifelseinset", "doifelseinstring", "doifelseinsymbolset", "doifelseintoks", "doifelseintwopassdata", "doifelseitalic", "doifelselanguage", "doifelselayerdata", "doifelselayoutdefined", "doifelselayoutsomeline", "doifelselayouttextline", "doifelseleapyear", "doifelselist", "doifelselocation", "doifelselocfile", "doifelsemainfloatbody", "doifelsemarkedcontent", "doifelsemarkedpage", "doifelsemarking", "doifelsemeaning", "doifelsemessage", "doifelsemode", "doifelsenextbgroup", "doifelsenextbgroupcs", "doifelsenextchar", "doifelsenextoptional", "doifelsenextoptionalcs", "doifelsenextparenthesis", "doifelsenonzeropositive", "doifelsenoteonsamepage", "doifelsenothing", "doifelsenumber", "doifelseobjectfound", "doifelseobjectreferencefound", "doifelseoddpage", "doifelseoddpagefloat", "doifelseoldercontext", "doifelseolderversion", "doifelseorientation", "doifelseoverlapping", "doifelseoverlay", "doifelseparallel", "doifelseparentfile", "doifelseparwrapper", "doifelsepath", "doifelsepathexists", "doifelsepatterns", "doifelseposition", "doifelsepositionaction", "doifelsepositiononpage", "doifelsepositionsonsamepage", "doifelsepositionsonthispage", "doifelsepositionsused", "doifelsereferencefound", "doifelserightpage", "doifelserightpagefloat", "doifelserighttoleftinbox", "doifelsesamelinereference", "doifelsesamestring", "doifelsesetups", "doifelsesomebackground", "doifelsesomespace", "doifelsesomething", "doifelsesometoks", "doifelsestringinstring", "doifelsestructurelisthasnumber", "doifelsestructurelisthaspage", "doifelsesymboldefined", "doifelsesymbolset", "doifelsetext", "doifelsetextflow", "doifelsetextflowcollector", "doifelsetopofpage", "doifelsetypingfile", "doifelseundefined", "doifelseurldefined", "doifelsevalue", "doifelsevaluenothing", "doifelsevariable", "doifempty", "doifemptyelse", "doifemptytoks", "doifemptyvalue", "doifemptyvalueelse", "doifemptyvariable", "doifemptyvariableelse", "doifenv", "doifenvelse", "doiffastoptionalcheckcselse", "doiffastoptionalcheckelse", "doiffieldbodyelse", "doiffieldcategoryelse", "doiffigureelse", "doiffile", "doiffiledefinedelse", "doiffileelse", "doiffileexistselse", "doiffirstcharelse", "doifflaggedelse", "doiffontcharelse", "doiffontfeatureelse", "doiffontpresentelse", "doiffontsynonymelse", "doifhasspaceelse", "doifhelpelse", "doifincsnameelse", "doifinelementelse", "doifinputfileelse", "doifinsertionelse", "doifinset", "doifinsetelse", "doifinstring", "doifinstringelse", "doifinsymbolset", "doifinsymbolsetelse", "doifintokselse", "doifintwopassdataelse", "doifitalicelse", "doiflanguageelse", "doiflayerdataelse", "doiflayoutdefinedelse", "doiflayoutsomelineelse", "doiflayouttextlineelse", "doifleapyearelse", "doiflistelse", "doiflocationelse", "doiflocfileelse", "doifmainfloatbodyelse", "doifmarkingelse", "doifmeaningelse", "doifmessageelse", "doifmode", "doifmodeelse", "doifnextbgroupcselse", "doifnextbgroupelse", "doifnextcharelse", "doifnextoptionalcselse", "doifnextoptionalelse", "doifnextparenthesiselse", "doifnonzeropositiveelse", "doifnot", "doifnotallcommon", "doifnotallmodes", "doifnotcommandhandler", "doifnotcommon", "doifnotcounter", "doifnotdocumentargument", "doifnotdocumentfilename", "doifnotdocumentvariable", "doifnotempty", "doifnotemptyvalue", "doifnotemptyvariable", "doifnotenv", "doifnoteonsamepageelse", "doifnotescollected", "doifnotfile", "doifnotflagged", "doifnothing", "doifnothingelse", "doifnotinset", "doifnotinsidesplitfloat", "doifnotinstring", "doifnotmode", "doifnotnumber", "doifnotsamestring", "doifnotsetups", "doifnotvalue", "doifnotvariable", "doifnumber", "doifnumberelse", "doifobjectfoundelse", "doifobjectreferencefoundelse", "doifoddpageelse", "doifoddpagefloatelse", "doifoldercontextelse", "doifolderversionelse", "doifoutervmode", "doifoverlappingelse", "doifoverlayelse", "doifparallelelse", "doifparentfileelse", "doifpathelse", "doifpathexistselse", "doifpatternselse", "doifposition", "doifpositionaction", "doifpositionactionelse", "doifpositionelse", "doifpositiononpageelse", "doifpositionsonsamepageelse", "doifpositionsonthispageelse", "doifpositionsusedelse", "doifreferencefoundelse", "doifrightpageelse", "doifrightpagefloatelse", "doifrighttoleftinboxelse", "doifsamelinereferenceelse", "doifsamestring", "doifsamestringelse", "doifsetups", "doifsetupselse", "doifsomebackground", "doifsomebackgroundelse", "doifsomespaceelse", "doifsomething", "doifsomethingelse", "doifsometoks", "doifsometokselse", "doifstringinstringelse", "doifstructurelisthasnumberelse", "doifstructurelisthaspageelse", "doifsymboldefinedelse", "doifsymbolsetelse", "doiftext", "doiftextelse", "doiftextflowcollectorelse", "doiftextflowelse", "doiftopofpageelse", "doiftypingfileelse", "doifundefined", "doifundefinedcounter", "doifundefinedelse", "doifunknownfontfeature", "doifurldefinedelse", "doifvalue", "doifvalueelse", "doifvaluenothing", "doifvaluenothingelse", "doifvaluesomething", "doifvariable", "doifvariableelse", "doindentation", "dollar", "doloop", "doloopoverlist", "donothing", "dontconvertfont", "dontleavehmode", "dontpermitspacesbetweengroups", "dopositionaction", "doprocesslocalsetups", "doquadrupleargument", "doquadrupleempty", "doquadruplegroupempty", "doquintupleargument", "doquintupleempty", "doquintuplegroupempty", "dorechecknextindentation", "dorecurse", "dorepeatwithcommand", "doreplacefeature", "doresetandafffeature", "doresetattribute", "dorotatebox", "dosetattribute", "dosetleftskipadaption", "dosetrightskipadaption", "dosetupcheckedinterlinespace", "doseventupleargument", "doseventupleempty", "dosingleargument", "dosingleempty", "dosinglegroupempty", "dosixtupleargument", "dosixtupleempty", "dosomebreak", "dostepwiserecurse", "dosubtractfeature", "dot", "doteq", "doteqdot", "dotfill", "dotfskip", "dotlessI", "dotlessJ", "dotlessi", "dotlessj", "dotlessjstroke", "dotminus", "dotoks", "dotplus", "dotripleargument", "dotripleargumentwithset", "dotripleempty", "dotripleemptywithset", "dotriplegroupempty", "dots", "dottedcircle", "dottedrightarrow", "doublebar", "doublebond", "doublebrace", "doublebracket", "doublecap", "doublecup", "doubleparent", "doubleprime", "doubleverticalbar", "dowith", "dowithnextbox", "dowithnextboxcontent", "dowithnextboxcontentcs", "dowithnextboxcs", "dowithpargument", "dowithrange", "dowithwargument", "downarrow", "downdasharrow", "downdownarrows", "downharpoonleft", "downharpoonright", "downuparrows", "downwhitearrow", "downzigzagarrow", "dpofstring", "dstroke", "dtail", "dummydigit", "dummyparameter", "dzcaronligature", "dzligature", "eTeX", "eacute", "ebreve", "ecaron", "ecedilla", "ecircumflex", "ecircumflexacute", "ecircumflexdotbelow", "ecircumflexgrave", "ecircumflexhook", "ecircumflextilde", "edefconvertedargument", "ediaeresis", "edotaccent", "edotbelow", "edoublegrave", "efcmaxheight", "efcmaxwidth", "efcminheight", "efcminwidth", "efcparameter", "effect", "egrave", "ehook", "einvertedbreve", "elapsedseconds", "elapsedsteptime", "elapsedtime", "eleftarrowfill", "eleftharpoondownfill", "eleftharpoonupfill", "eleftrightarrowfill", "ell", "em", "emacron", "emdash", "emphasisboldface", "emphasistypeface", "emptylines", "emptyset", "emquad", "emspace", "enableasciimode", "enabledirectives", "enableexperiments", "enablemode", "enableoutputstream", "enableparpositions", "enableregime", "enabletrackers", "endash", "endnote", "enquad", "enskip", "enspace", "env", "environment", "envvar", "eogonek", "eoverbarfill", "eoverbracefill", "eoverbracketfill", "eoverparentfill", "epos", "epsilon", "eq", "eqcirc", "eqeq", "eqeqeq", "eqgtr", "eqless", "eqsim", "eqslantgtr", "eqslantless", "equaldigits", "equalscolon", "equiv", "erightarrowfill", "erightharpoondownfill", "erightharpoonupfill", "eta", "eth", "ethiopic", "etilde", "etwoheadrightarrowfill", "eunderbarfill", "eunderbracefill", "eunderbracketfill", "eunderparentfill", "exclamdown", "executeifdefined", "exists", "exitloop", "exitloopnow", "expandcheckedcsname", "expanded", "expandeddoif", "expandeddoifelse", "expandeddoifnot", "expandfontsynonym", "expdoif", "expdoifcommonelse", "expdoifelse", "expdoifelsecommon", "expdoifelseinset", "expdoifinsetelse", "expdoifnot", "exponentiale", "externalfigure", "externalfigurecollectionmaxheight", "externalfigurecollectionmaxwidth", "externalfigurecollectionminheight", "externalfigurecollectionminwidth", "externalfigurecollectionparameter", "fakebox", "fallingdotseq", "fastdecrement", "fastincrement", "fastlocalframed", "fastloopfinal", "fastloopindex", "fastscale", "fastsetup", "fastsetupwithargument", "fastsetupwithargumentswapped", "fastswitchtobodyfont", "fastsxsy", "feature", "fence", "fenced", "fetchallmarkings", "fetchallmarks", "fetchmark", "fetchmarking", "fetchonemark", "fetchonemarking", "fetchruntinecommand", "fetchtwomarkings", "fetchtwomarks", "ffiligature", "ffligature", "fflligature", "fhook", "field", "fieldbody", "fieldstack", "fifthoffivearguments", "fifthofsixarguments", "figurefilename", "figurefilepath", "figurefiletype", "figurefullname", "figureheight", "figurenaturalheight", "figurenaturalwidth", "figurespace", "figuresymbol", "figurewidth", "filename", "filigature", "filledhboxb", "filledhboxc", "filledhboxg", "filledhboxk", "filledhboxm", "filledhboxr", "filledhboxy", "filler", "fillinline", "fillinrules", "fillintext", "fillupto", "filterfromnext", "filterfromvalue", "filterpages", "filterreference", "findtwopassdata", "finishregisterentry", "firstcharacter", "firstcounter", "firstcountervalue", "firstinlist", "firstoffivearguments", "firstoffourarguments", "firstofoneargument", "firstofoneunexpanded", "firstofsixarguments", "firstofthreearguments", "firstofthreeunexpanded", "firstoftwoarguments", "firstoftwounexpanded", "firstrealpage", "firstrealpagenumber", "firstsubcountervalue", "firstsubpage", "firstsubpagenumber", "firstuserpage", "firstuserpagenumber", "fitfield", "fitfieldframed", "fittopbaselinegrid", "fiveeighths", "fivesixths", "fixedspace", "fixedspaces", "flag", "flat", "flligature", "floatuserdataparameter", "flushbox", "flushboxregister", "flushcollector", "flushedrightlastline", "flushlayer", "flushlocalfloats", "flushnextbox", "flushnotes", "flushoutputstream", "flushshapebox", "flushtextflow", "flushtokens", "flushtoks", "fontalternative", "fontbody", "fontchar", "fontcharbyindex", "fontclass", "fontclassname", "fontface", "fontfeaturelist", "fontsize", "fontstyle", "footnote", "footnotetext", "forall", "forcecharacterstripping", "forcelocalfloats", "forgeteverypar", "forgetparagraphfreezing", "forgetparameters", "forgetparskip", "forgetparwrapper", "forgetragged", "formula", "formulanumber", "foundbox", "fourfifths", "fourperemspace", "fourthoffivearguments", "fourthoffourarguments", "fourthofsixarguments", "frac", "framed", "frameddimension", "framedparameter", "framedtext", "freezedimenmacro", "freezemeasure", "freezeparagraphproperties", "frenchspacing", "from", "fromlinenote", "frown", "frozenhbox", "frule", "gacute", "gamma", "gbreve", "gcaron", "gcircumflex", "gcommaaccent", "gdefconvertedargument", "gdefconvertedcommand", "gdotaccent", "ge", "geq", "geqq", "geqslant", "getMPdrawing", "getMPlayer", "getboxfromcache", "getboxllx", "getboxlly", "getbuffer", "getbufferdata", "getcommacommandsize", "getcommalistsize", "getdatavalue", "getdayoftheweek", "getdayspermonth", "getdefinedbuffer", "getdocumentargument", "getdocumentargumentdefault", "getdocumentfilename", "getdummyparameters", "getemptyparameters", "geteparameters", "getexpandedparameters", "getfiguredimensions", "getfirstcharacter", "getfirsttwopassdata", "getfromcommacommand", "getfromcommalist", "getfromluatable", "getfromtwopassdata", "getglyphdirect", "getglyphstyled", "getgparameters", "getinlineuserdata", "getlasttwopassdata", "getlocalfloat", "getlocalfloats", "getmarking", "getmessage", "getnamedglyphdirect", "getnamedglyphstyled", "getnamedtwopassdatalist", "getnaturaldimensions", "getnoflines", "getobject", "getobjectdimensions", "getpaletsize", "getparameters", "getparwrapper", "getprivatechar", "getprivateslot", "getrandomcount", "getrandomdimen", "getrandomfloat", "getrandomnumber", "getrandomseed", "getraweparameters", "getrawgparameters", "getrawnoflines", "getrawparameters", "getrawxparameters", "getreference", "getreferenceentry", "getroundednoflines", "gets", "getsubstring", "gettokenlist", "gettwopassdata", "gettwopassdatalist", "getuserdata", "getuvalue", "getvalue", "getvariable", "getvariabledefault", "getxparameters", "gg", "ggg", "gggtr", "gimel", "globaldisablemode", "globalenablemode", "globalletempty", "globalpopbox", "globalpopmacro", "globalpreventmode", "globalprocesscommalist", "globalpushbox", "globalpushmacro", "globalswapcounts", "globalswapdimens", "globalswapmacros", "globalundefine", "glyphfontfile", "gnapprox", "gneqq", "gnsim", "gobbledoubleempty", "gobbleeightarguments", "gobblefivearguments", "gobblefiveoptionals", "gobblefourarguments", "gobblefouroptionals", "gobbleninearguments", "gobbleoneargument", "gobbleoneoptional", "gobblesevenarguments", "gobblesingleempty", "gobblesixarguments", "gobblespacetokens", "gobbletenarguments", "gobblethreearguments", "gobblethreeoptionals", "gobbletwoarguments", "gobbletwooptionals", "gobbleuntil", "gobbleuntilrelax", "godown", "goto", "gotobox", "gotopage", "grabbufferdata", "grabbufferdatadirect", "grabuntil", "grave", "graycolor", "grayvalue", "greedysplitstring", "greekAlpha", "greekAlphadasia", "greekAlphadasiaperispomeni", "greekAlphadasiatonos", "greekAlphadasiavaria", "greekAlphaiotasub", "greekAlphaiotasubdasia", "greekAlphaiotasubdasiaperispomeni", "greekAlphaiotasubdasiatonos", "greekAlphaiotasubdasiavaria", "greekAlphaiotasubpsili", "greekAlphaiotasubpsiliperispomeni", "greekAlphaiotasubpsilitonos", "greekAlphaiotasubpsilivaria", "greekAlphamacron", "greekAlphapsili", "greekAlphapsiliperispomeni", "greekAlphapsilitonos", "greekAlphapsilivaria", "greekAlphatonos", "greekAlphavaria", "greekAlphavrachy", "greekBeta", "greekChi", "greekCoronis", "greekDelta", "greekEpsilon", "greekEpsilondasia", "greekEpsilondasiatonos", "greekEpsilondasiavaria", "greekEpsilonpsili", "greekEpsilonpsilitonos", "greekEpsilonpsilivaria", "greekEpsilontonos", "greekEpsilonvaria", "greekEta", "greekEtadasia", "greekEtadasiaperispomeni", "greekEtadasiatonos", "greekEtadasiavaria", "greekEtaiotasub", "greekEtaiotasubdasia", "greekEtaiotasubdasiaperispomeni", "greekEtaiotasubdasiatonos", "greekEtaiotasubdasiavaria", "greekEtaiotasubpsili", "greekEtaiotasubpsiliperispomeni", "greekEtaiotasubpsilitonos", "greekEtaiotasubpsilivaria", "greekEtapsili", "greekEtapsiliperispomeni", "greekEtapsilitonos", "greekEtapsilivaria", "greekEtatonos", "greekEtavaria", "greekGamma", "greekIota", "greekIotadasia", "greekIotadasiaperispomeni", "greekIotadasiatonos", "greekIotadasiavaria", "greekIotadialytika", "greekIotamacron", "greekIotapsili", "greekIotapsiliperispomeni", "greekIotapsilitonos", "greekIotapsilivaria", "greekIotatonos", "greekIotavaria", "greekIotavrachy", "greekKappa", "greekLambda", "greekMu", "greekNu", "greekOmega", "greekOmegadasia", "greekOmegadasiaperispomeni", "greekOmegadasiatonos", "greekOmegadasiavaria", "greekOmegaiotasub", "greekOmegaiotasubdasia", "greekOmegaiotasubdasiaperispomeni", "greekOmegaiotasubdasiatonos", "greekOmegaiotasubdasiavaria", "greekOmegaiotasubpsili", "greekOmegaiotasubpsiliperispomeni", "greekOmegaiotasubpsilitonos", "greekOmegaiotasubpsilivaria", "greekOmegapsili", "greekOmegapsiliperispomeni", "greekOmegapsilitonos", "greekOmegapsilivaria", "greekOmegatonos", "greekOmegavaria", "greekOmicron", "greekOmicrondasia", "greekOmicrondasiatonos", "greekOmicrondasiavaria", "greekOmicronpsili", "greekOmicronpsilitonos", "greekOmicronpsilivaria", "greekOmicrontonos", "greekOmicronvaria", "greekPhi", "greekPi", "greekPsi", "greekRho", "greekRhodasia", "greekSigma", "greekSigmalunate", "greekTau", "greekTheta", "greekUpsilon", "greekUpsilondasia", "greekUpsilondasiaperispomeni", "greekUpsilondasiatonos", "greekUpsilondasiavaria", "greekUpsilondialytika", "greekUpsilonmacron", "greekUpsilontonos", "greekUpsilonvaria", "greekUpsilonvrachy", "greekXi", "greekZeta", "greekalpha", "greekalphadasia", "greekalphadasiaperispomeni", "greekalphadasiatonos", "greekalphadasiavaria", "greekalphaiotasub", "greekalphaiotasubdasia", "greekalphaiotasubdasiaperispomeni", "greekalphaiotasubdasiatonos", "greekalphaiotasubdasiavaria", "greekalphaiotasubperispomeni", "greekalphaiotasubpsili", "greekalphaiotasubpsiliperispomeni", "greekalphaiotasubpsilitonos", "greekalphaiotasubpsilivaria", "greekalphaiotasubtonos", "greekalphaiotasubvaria", "greekalphamacron", "greekalphaoxia", "greekalphaperispomeni", "greekalphapsili", "greekalphapsiliperispomeni", "greekalphapsilitonos", "greekalphapsilivaria", "greekalphatonos", "greekalphavaria", "greekalphavrachy", "greekbeta", "greekbetaalt", "greekchi", "greekdasia", "greekdasiaperispomeni", "greekdasiavaria", "greekdelta", "greekdialytikaperispomeni", "greekdialytikatonos", "greekdialytikavaria", "greekdigamma", "greekepsilon", "greekepsilonalt", "greekepsilondasia", "greekepsilondasiatonos", "greekepsilondasiavaria", "greekepsilonoxia", "greekepsilonpsili", "greekepsilonpsilitonos", "greekepsilonpsilivaria", "greekepsilontonos", "greekepsilonvaria", "greeketa", "greeketadasia", "greeketadasiaperispomeni", "greeketadasiatonos", "greeketadasiavaria", "greeketaiotasub", "greeketaiotasubdasia", "greeketaiotasubdasiaperispomeni", "greeketaiotasubdasiatonos", "greeketaiotasubdasiavaria", "greeketaiotasubperispomeni", "greeketaiotasubpsili", "greeketaiotasubpsiliperispomeni", "greeketaiotasubpsilitonos", "greeketaiotasubpsilivaria", "greeketaiotasubtonos", "greeketaiotasubvaria", "greeketaoxia", "greeketaperispomeni", "greeketapsili", "greeketapsiliperispomeni", "greeketapsilitonos", "greeketapsilivaria", "greeketatonos", "greeketavaria", "greekfinalsigma", "greekgamma", "greekiota", "greekiotadasia", "greekiotadasiaperispomeni", "greekiotadasiatonos", "greekiotadasiavaria", "greekiotadialytika", "greekiotadialytikaperispomeni", "greekiotadialytikatonos", "greekiotadialytikavaria", "greekiotamacron", "greekiotaoxia", "greekiotaperispomeni", "greekiotapsili", "greekiotapsiliperispomeni", "greekiotapsilitonos", "greekiotapsilivaria", "greekiotatonos", "greekiotavaria", "greekiotavrachy", "greekkappa", "greekkoppa", "greeklambda", "greekmu", "greeknu", "greeknumerals", "greeknumkoppa", "greekomega", "greekomegadasia", "greekomegadasiaperispomeni", "greekomegadasiatonos", "greekomegadasiavaria", "greekomegaiotasub", "greekomegaiotasubdasia", "greekomegaiotasubdasiaperispomeni", "greekomegaiotasubdasiatonos", "greekomegaiotasubdasiavaria", "greekomegaiotasubperispomeni", "greekomegaiotasubpsili", "greekomegaiotasubpsiliperispomeni", "greekomegaiotasubpsilitonos", "greekomegaiotasubpsilivaria", "greekomegaiotasubtonos", "greekomegaiotasubvaria", "greekomegaoxia", "greekomegaperispomeni", "greekomegapsili", "greekomegapsiliperispomeni", "greekomegapsilitonos", "greekomegapsilivaria", "greekomegatonos", "greekomegavaria", "greekomicron", "greekomicrondasia", "greekomicrondasiatonos", "greekomicrondasiavaria", "greekomicronoxia", "greekomicronpsili", "greekomicronpsilitonos", "greekomicronpsilivaria", "greekomicrontonos", "greekomicronvaria", "greekoxia", "greekperispomeni", "greekphi", "greekphialt", "greekpi", "greekpialt", "greekprosgegrammeni", "greekpsi", "greekpsili", "greekpsiliperispomeni", "greekpsilivaria", "greekrho", "greekrhoalt", "greekrhodasia", "greekrhopsili", "greeksampi", "greeksigma", "greeksigmalunate", "greekstigma", "greektau", "greektheta", "greekthetaalt", "greektonos", "greekupsilon", "greekupsilondasia", "greekupsilondasiaperispomeni", "greekupsilondasiatonos", "greekupsilondasiavaria", "greekupsilondiaeresis", "greekupsilondialytikaperispomeni", "greekupsilondialytikatonos", "greekupsilondialytikavaria", "greekupsilonmacron", "greekupsilonoxia", "greekupsilonperispomeni", "greekupsilonpsili", "greekupsilonpsiliperispomeni", "greekupsilonpsilitonos", "greekupsilonpsilivaria", "greekupsilontonos", "greekupsilonvaria", "greekupsilonvrachy", "greekvaria", "greekxi", "greekzeta", "grid", "groupedcommand", "gsetboxllx", "gsetboxlly", "gstroke", "gt", "gtrapprox", "gtrdot", "gtreqless", "gtreqqless", "gtrless", "gtrsim", "guilsingleleft", "guilsingleright", "gujaratinumerals", "gurmurkhinumerals", "hairline", "hairspace", "halflinestrut", "halfstrut", "halfwaybox", "handletokens", "handwritten", "hangul", "hanzi", "hash", "hat", "hbar", "hboxofvbox", "hboxreference", "hcaron", "hcircumflex", "hdofstring", "headhbox", "headlanguage", "headnumber", "headnumbercontent", "headnumberdistance", "headnumberwidth", "headreferenceattributes", "headsetupspacing", "headtext", "headtextcontent", "headtextdistance", "headtexts", "headtextwidth", "headvbox", "headwidth", "heartsuit", "hebrewAlef", "hebrewAyin", "hebrewBet", "hebrewDalet", "hebrewGimel", "hebrewHe", "hebrewHet", "hebrewKaf", "hebrewKaffinal", "hebrewLamed", "hebrewMem", "hebrewMemfinal", "hebrewNun", "hebrewNunfinal", "hebrewPe", "hebrewPefinal", "hebrewQof", "hebrewResh", "hebrewSamekh", "hebrewShin", "hebrewTav", "hebrewTet", "hebrewTsadi", "hebrewTsadifinal", "hebrewVav", "hebrewYod", "hebrewZayin", "hebrewnumerals", "heightanddepthofstring", "heightofstring", "heightspanningtext", "helptext", "hexnumber", "hexstringtonumber", "hglue", "hiddenbar", "hiddencitation", "hiddencite", "hideblocks", "high", "highlight", "highordinalstr", "hilo", "himilo", "hl", "hookleftarrow", "hookrightarrow", "horizontalgrowingbar", "horizontalpositionbar", "hpackbox", "hpackedbox", "hphantom", "hpos", "hsizefraction", "hslash", "hsmash", "hsmashbox", "hsmashed", "hspace", "hstroke", "htdpofstring", "htofstring", "hyphen", "hyphenatedcoloredword", "hyphenatedfile", "hyphenatedfilename", "hyphenatedhbox", "hyphenatedpar", "hyphenatedurl", "hyphenatedword", "iacute", "ibox", "ibreve", "icaron", "icircumflex", "ideographichalffillspace", "ideographicspace", "idiaeresis", "idotaccent", "idotbelow", "idoublegrave", "idxfromluatable", "ifassignment", "iff", "ifinobject", "ifinoutputstream", "ifparameters", "iftrialtypesetting", "ignoreimplicitspaces", "ignoretagsinexport", "ignorevalue", "igrave", "ihook", "iiiint", "iiiintop", "iiint", "iiintop", "iint", "iintop", "iinvertedbreve", "ijligature", "imacron", "imaginaryi", "imaginaryj", "imath", "immediatesavetwopassdata", "impliedby", "implies", "imply", "in", "includemenu", "includesvgbuffer", "includesvgfile", "includeversioninfo", "increment", "incrementcounter", "incrementedcounter", "incrementpagenumber", "incrementsubpagenumber", "incrementvalue", "indentation", "index", "infofont", "infofontbold", "inframed", "infty", "infull", "inheritparameter", "inhibitblank", "ininner", "ininneredge", "ininnermargin", "initializeboxstack", "inleft", "inleftedge", "inleftmargin", "inline", "inlinebuffer", "inlinedbox", "inlinemath", "inlinemathematics", "inlinemessage", "inlineordisplaymath", "inlineprettyprintbuffer", "inlinerange", "inmargin", "inmframed", "innerflushshapebox", "inother", "inouter", "inouteredge", "inoutermargin", "input", "inputfilebarename", "inputfilename", "inputfilerealsuffix", "inputfilesuffix", "inputgivenfile", "inright", "inrightedge", "inrightmargin", "insertpages", "inspectluatable", "installactionhandler", "installactivecharacter", "installanddefineactivecharacter", "installattributestack", "installautocommandhandler", "installautosetuphandler", "installbasicautosetuphandler", "installbasicparameterhandler", "installbottomframerenderer", "installcommandhandler", "installcorenamespace", "installctxfunction", "installctxscanner", "installdefinehandler", "installdefinitionset", "installdefinitionsetmember", "installdirectcommandhandler", "installdirectparameterhandler", "installdirectparametersethandler", "installdirectsetuphandler", "installdirectstyleandcolorhandler", "installframedautocommandhandler", "installframedcommandhandler", "installglobalmacrostack", "installlanguage", "installleftframerenderer", "installmacrostack", "installnamespace", "installoutputroutine", "installpagearrangement", "installparameterhandler", "installparameterhashhandler", "installparametersethandler", "installparentinjector", "installprotectedctxfunction", "installprotectedctxscanner", "installrightframerenderer", "installrootparameterhandler", "installsetuphandler", "installsetuponlycommandhandler", "installshipoutmethod", "installsimplecommandhandler", "installsimpleframedcommandhandler", "installstyleandcolorhandler", "installswitchcommandhandler", "installswitchsetuphandler", "installtexdirective", "installtextracker", "installtopframerenderer", "installunitsseparator", "installunitsspace", "installversioninfo", "int", "intclockwise", "integerrounding", "integers", "interactionbar", "interactionbuttons", "interactionmenu", "intercal", "intertext", "interwordspaceafter", "interwordspacebefore", "interwordspaces", "interwordspacesafter", "interwordspacesbefore", "intop", "invisibletimes", "invokepagehandler", "iogonek", "iota", "italic", "italicbold", "italiccorrection", "italicface", "item", "items", "itemtag", "itilde", "jcaron", "jcircumflex", "jmath", "jobfilename", "jobfilesuffix", "kap", "kappa", "kcaron", "kcommaaccent", "keepblocks", "keeplinestogether", "keepunwantedspaces", "kerncharacters", "khook", "kkra", "koreancirclenumerals", "koreannumerals", "koreannumeralsc", "koreannumeralsp", "koreanparentnumerals", "lVert", "labellanguage", "labeltext", "labeltexts", "lacute", "lambda", "lambdabar", "land", "langle", "language", "languageCharacters", "languagecharacters", "languagecharwidth", "lastcounter", "lastcountervalue", "lastdigit", "lastlinewidth", "lastnaturalboxdp", "lastnaturalboxht", "lastnaturalboxwd", "lastparwrapper", "lastpredefinedsymbol", "lastrealpage", "lastrealpagenumber", "lastsubcountervalue", "lastsubpage", "lastsubpagenumber", "lasttwodigits", "lastuserpage", "lastuserpagenumber", "lateluacode", "latin", "layeredtext", "layerheight", "layerwidth", "lazysavetaggedtwopassdata", "lazysavetwopassdata", "lbar", "lbox", "lbrace", "lbracket", "lcaron", "lceil", "lchexnumber", "lchexnumbers", "lcommaaccent", "lcurl", "ldotmiddle", "ldotp", "ldots", "le", "leadsto", "left", "leftaligned", "leftarrow", "leftarrowtail", "leftarrowtriangle", "leftbottombox", "leftbox", "leftdasharrow", "leftguillemot", "leftharpoondown", "leftharpoonup", "lefthbox", "leftheadtext", "leftlabeltext", "leftleftarrows", "leftline", "leftmathlabeltext", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "leftrightarrow", "leftrightarrows", "leftrightarrowtriangle", "leftrightharpoons", "leftrightsquigarrow", "leftskipadaption", "leftsquigarrow", "leftsubguillemot", "leftthreetimes", "lefttopbox", "lefttoright", "lefttorighthbox", "lefttorightvbox", "lefttorightvtop", "leftwavearrow", "leftwhitearrow", "leq", "leqq", "leqslant", "lessapprox", "lessdot", "lesseqgtr", "lesseqqgtr", "lessgtr", "lesssim", "letbeundefined", "letcatcodecommand", "letcscsname", "letcsnamecs", "letcsnamecsname", "letdummyparameter", "letempty", "letgvalue", "letgvalueempty", "letgvalurelax", "letterampersand", "letterat", "letterbackslash", "letterbar", "letterbgroup", "letterclosebrace", "lettercolon", "letterdollar", "letterdoublequote", "letteregroup", "letterescape", "letterexclamationmark", "letterhash", "letterhat", "letterleftbrace", "letterleftbracket", "letterleftparenthesis", "letterless", "lettermore", "letteropenbrace", "letterpercent", "letterquestionmark", "letterrightbrace", "letterrightbracket", "letterrightparenthesis", "lettersinglequote", "letterslash", "letterspacing", "lettertilde", "letterunderscore", "letvalue", "letvalueempty", "letvaluerelax", "lfence", "lfloor", "lgroup", "lhbox", "lhooknwarrow", "lhooksearrow", "limitatefirstline", "limitatelines", "limitatetext", "line", "linebox", "linefeed", "linefillerhbox", "linefillervbox", "linefillervtop", "linenote", "linespanningtext", "linethickness", "linterval", "listcitation", "listcite", "listlength", "listnamespaces", "literalmode", "ljligature", "ll", "llangle", "llap", "llbracket", "llcorner", "lll", "llless", "llointerval", "lmoustache", "lnapprox", "lneq", "lneqq", "lnot", "lnsim", "loadanyfile", "loadanyfileonce", "loadbtxdefinitionfile", "loadbtxreplacementfile", "loadcldfile", "loadcldfileonce", "loadfontgoodies", "loadluafile", "loadluafileonce", "loadspellchecklist", "loadtexfile", "loadtexfileonce", "loadtypescriptfile", "localframed", "localframedwithsettings", "localhsize", "localpopbox", "localpopmacro", "localpushbox", "localpushmacro", "localundefine", "locatedfilepath", "locatefilepath", "locfilename", "logo", "lohi", "lointerval", "lomihi", "longleftarrow", "longleftrightarrow", "longmapsfrom", "longmapsto", "longrightarrow", "longrightsquigarrow", "looparrowleft", "looparrowright", "lor", "low", "lowerbox", "lowercased", "lowercasestring", "lowercasing", "lowerleftdoubleninequote", "lowerleftsingleninequote", "lowerrightdoubleninequote", "lowerrightsingleninequote", "lozenge", "lparent", "lrcorner", "lrointerval", "lrtbbox", "lstroke", "lt", "ltimes", "ltop", "ltrhbox", "ltrvbox", "ltrvtop", "luaTeX", "luacode", "luaconditional", "luaenvironment", "luaexpanded", "luaexpr", "luafunction", "luajitTeX", "luamajorversion", "luametaTeX", "luaminorversion", "luaparameterset", "luasetup", "luaversion", "lvert", "m", "mLeftarrow", "mLeftrightarrow", "mRightarrow", "mainlanguage", "makecharacteractive", "makerawcommalist", "makestrutofbox", "maltese", "mapfontsize", "mapsdown", "mapsfrom", "mapsto", "mapsup", "margindata", "margintext", "markcontent", "markedpages", "marking", "markinjector", "markpage", "markreferencepage", "mat", "math", "mathampersand", "mathbf", "mathbi", "mathblackboard", "mathbs", "mathdefault", "mathdollar", "mathdouble", "mathematics", "mathfraktur", "mathfunction", "mathhash", "mathhyphen", "mathit", "mathitalic", "mathlabellanguage", "mathlabeltext", "mathlabeltexts", "mathop", "mathover", "mathpercent", "mathrm", "mathscript", "mathsl", "mathss", "mathtext", "mathtextbf", "mathtextbi", "mathtextbs", "mathtextit", "mathtextsl", "mathtexttf", "mathtf", "mathtriplet", "mathtt", "mathunder", "mathupright", "mathword", "mathwordbf", "mathwordbi", "mathwordbs", "mathwordit", "mathwordsl", "mathwordtf", "maxaligned", "mbox", "mcframed", "measure", "measured", "measuredangle", "measuredeq", "medskip", "medspace", "menubutton", "mequal", "message", "mfence", "mframed", "mfunction", "mfunctionlabeltext", "mhbox", "mho", "mhookleftarrow", "mhookrightarrow", "mid", "midaligned", "middle", "middlealigned", "middlebox", "midhbox", "midsubsentence", "minimalhbox", "minus", "minuscolon", "mirror", "mixedcaps", "mkvibuffer", "mleftarrow", "mleftharpoondown", "mleftharpoonup", "mleftrightarrow", "mleftrightharpoons", "mmapsto", "models", "moduleparameter", "molecule", "mono", "monobold", "mononormal", "month", "monthlong", "monthshort", "mp", "mprandomnumber", "mrel", "mrightarrow", "mrightharpoondown", "mrightharpoonup", "mrightleftharpoons", "mrightoverleftarrow", "mtext", "mtriplerel", "mtwoheadleftarrow", "mtwoheadrightarrow", "mu", "multimap", "nHdownarrow", "nHuparrow", "nLeftarrow", "nLeftrightarrow", "nRightarrow", "nVDash", "nVdash", "nVleftarrow", "nVleftrightarrow", "nVrightarrow", "nabla", "nacute", "namedheadnumber", "namedstructureheadlocation", "namedstructureuservariable", "namedstructurevariable", "namedtaggedlabeltexts", "napostrophe", "napprox", "napproxEq", "narrownobreakspace", "nasymp", "natural", "naturalhbox", "naturalhpack", "naturalnumbers", "naturaltpack", "naturalvbox", "naturalvcenter", "naturalvpack", "naturalvtop", "naturalwd", "ncaron", "ncommaaccent", "ncong", "ncurl", "ndivides", "ne", "nearrow", "neg", "negatecolorbox", "negated", "negativesign", "negemspace", "negenspace", "negthinspace", "neng", "neq", "nequiv", "neswarrow", "newattribute", "newcatcodetable", "newcounter", "newevery", "newfrenchspacing", "newluatable", "newmode", "newsignal", "newsystemmode", "nexists", "nextbox", "nextboxdp", "nextboxht", "nextboxhtdp", "nextboxwd", "nextcounter", "nextcountervalue", "nextdepth", "nextparagraphs", "nextrealpage", "nextrealpagenumber", "nextsubcountervalue", "nextsubpage", "nextsubpagenumber", "nextuserpage", "nextuserpagenumber", "ngeq", "ngrave", "ngtr", "ngtrless", "ngtrsim", "ni", "nihongo", "nin", "njligature", "nleftarrow", "nleftrightarrow", "nleq", "nless", "nlessgtr", "nlesssim", "nmid", "nni", "nobar", "nobreakspace", "nocap", "nocharacteralign", "nocitation", "nocite", "nodetostring", "noffigurepages", "noflines", "noflinesinbox", "noflocalfloats", "noheaderandfooterlines", "noheightstrut", "nohyphens", "noindentation", "noitem", "nonfrenchspacing", "nonmathematics", "nonvalidassignment", "normal", "normalboldface", "normalframedwithsettings", "normalitalicface", "normalizebodyfontsize", "normalizedfontsize", "normalizefontdepth", "normalizefontheight", "normalizefontline", "normalizefontwidth", "normalizetextdepth", "normalizetextheight", "normalizetextline", "normalizetextwidth", "normalslantedface", "normaltypeface", "nospace", "not", "note", "notesymbol", "notin", "notopandbottomlines", "notragged", "nowns", "nparallel", "nprec", "npreccurlyeq", "nrightarrow", "nsim", "nsimeq", "nsqsubseteq", "nsqsupseteq", "nsubset", "nsubseteq", "nsucc", "nsucccurlyeq", "nsupset", "nsupseteq", "ntilde", "ntimes", "ntriangleleft", "ntrianglelefteq", "ntriangleright", "ntrianglerighteq", "nu", "numberofpoints", "numbers", "nvDash", "nvdash", "nvleftarrow", "nvleftrightarrow", "nvrightarrow", "nwarrow", "nwsearrow", "oacute", "obeydepth", "objectdepth", "objectheight", "objectmargin", "objectwidth", "obox", "obreve", "ocaron", "ocircumflex", "ocircumflexacute", "ocircumflexdotbelow", "ocircumflexgrave", "ocircumflexhook", "ocircumflextilde", "octnumber", "octstringtonumber", "odiaeresis", "odiaeresismacron", "odot", "odotaccent", "odotaccentmacron", "odotbelow", "odoublegrave", "oeligature", "offset", "offsetbox", "ograve", "ohm", "ohook", "ohorn", "ohornacute", "ohorndotbelow", "ohorngrave", "ohornhook", "ohorntilde", "ohungarumlaut", "oiiint", "oiint", "oint", "ointclockwise", "ointctrclockwise", "oinvertedbreve", "omacron", "omega", "omicron", "ominus", "onedigitrounding", "oneeighth", "onefifth", "onehalf", "onequarter", "onesixth", "onesuperior", "onethird", "oogonek", "oogonekmacron", "operatorlanguage", "operatortext", "oplus", "ordfeminine", "ordinaldaynumber", "ordinalstr", "ordmasculine", "ornamenttext", "oslash", "ostroke", "ostrokeacute", "otilde", "otildemacron", "otimes", "outputfilename", "outputstreambox", "outputstreamcopy", "outputstreamunvbox", "outputstreamunvcopy", "over", "overbar", "overbars", "overbartext", "overbarunderbar", "overbrace", "overbracetext", "overbraceunderbrace", "overbracket", "overbrackettext", "overbracketunderbracket", "overlaybutton", "overlaycolor", "overlaydepth", "overlayfigure", "overlayheight", "overlayimage", "overlaylinecolor", "overlaylinewidth", "overlayoffset", "overlayrollbutton", "overlaywidth", "overleftarrow", "overleftharpoondown", "overleftharpoonup", "overleftrightarrow", "overloaderror", "overparent", "overparenttext", "overparentunderparent", "overrightarrow", "overrightharpoondown", "overrightharpoonup", "overset", "overstrike", "overstrikes", "overtwoheadleftarrow", "overtwoheadrightarrow", "owns", "page", "pagearea", "pagebreak", "pagefigure", "pageinjection", "pagenumber", "pagereference", "pagestaterealpage", "pagestaterealpageorder", "paletsize", "paragraphmark", "parallel", "part", "partial", "pdfTeX", "pdfactualtext", "pdfbackendactualtext", "pdfbackendcurrentresources", "pdfbackendsetcatalog", "pdfbackendsetcolorspace", "pdfbackendsetextgstate", "pdfbackendsetinfo", "pdfbackendsetname", "pdfbackendsetpageattribute", "pdfbackendsetpageresource", "pdfbackendsetpagesattribute", "pdfbackendsetpattern", "pdfbackendsetshade", "pdfcolor", "pdfeTeX", "percent", "percentdimen", "periodcentered", "periods", "permitcaretescape", "permitcircumflexescape", "permitspacesbetweengroups", "perp", "persiandecimals", "persiandecimalseparator", "persiannumerals", "persianthousandsseparator", "perthousand", "phantom", "phantombox", "phi", "phook", "pi", "pickupgroupedcommand", "pitchfork", "placeattachments", "placebookmarks", "placebtxrendering", "placechemical", "placecitation", "placecombinedlist", "placecomments", "placecontent", "placecurrentformulanumber", "placedbox", "placefigure", "placefloat", "placefloatcaption", "placefloatwithsetups", "placefootnotes", "placeformula", "placeframed", "placegraphic", "placeheadnumber", "placeheadtext", "placehelp", "placeholder", "placeindex", "placeinitial", "placeintermezzo", "placelayer", "placelayeredtext", "placelegend", "placelist", "placelistofabbreviations", "placelistofchemicals", "placelistoffigures", "placelistofgraphics", "placelistofintermezzi", "placelistoflogos", "placelistofpublications", "placelistofsorts", "placelistofsynonyms", "placelistoftables", "placelocalfootnotes", "placelocalnotes", "placement", "placenamedfloat", "placenamedformula", "placenotes", "placeongrid", "placeontopofeachother", "placepagenumber", "placepairedbox", "placeparallel", "placerawheaddata", "placerawheadnumber", "placerawheadtext", "placerawlist", "placeregister", "placerenderingwindow", "placesidebyside", "placesubformula", "placetable", "pm", "popattribute", "popmacro", "popmode", "popsystemmode", "position", "positionoverlay", "positionregionoverlay", "positivesign", "postponenotes", "prec", "precapprox", "preccurlyeq", "preceq", "preceqq", "precnapprox", "precneq", "precneqq", "precnsim", "precsim", "predefinedfont", "predefinefont", "predefinesymbol", "prefixedpagenumber", "prefixlanguage", "prefixtext", "prependetoks", "prependgvalue", "prependtocommalist", "prependtoks", "prependtoksonce", "prependvalue", "prerollblank", "presetbtxlabeltext", "presetdocument", "presetfieldsymbols", "presetheadtext", "presetlabeltext", "presetmathlabeltext", "presetoperatortext", "presetprefixtext", "presetsuffixtext", "presettaglabeltext", "presetunittext", "pretocommalist", "prettyprintbuffer", "prevcounter", "prevcountervalue", "preventmode", "prevrealpage", "prevrealpagenumber", "prevsubcountervalue", "prevsubpage", "prevsubpagenumber", "prevuserpage", "prevuserpagenumber", "prime", "primes", "procent", "processMPbuffer", "processMPfigurefile", "processaction", "processallactionsinset", "processassignlist", "processassignmentcommand", "processassignmentlist", "processbetween", "processblocks", "processbodyfontenvironmentlist", "processcolorcomponents", "processcommacommand", "processcommalist", "processcommalistwithparameters", "processcontent", "processfile", "processfilemany", "processfilenone", "processfileonce", "processfirstactioninset", "processisolatedchars", "processisolatedwords", "processlinetablebuffer", "processlinetablefile", "processlist", "processmonth", "processranges", "processseparatedlist", "processtexbuffer", "processtokens", "processuntil", "processxtablebuffer", "processyear", "prod", "product", "profiledbox", "profilegivenbox", "program", "project", "propto", "pseudoMixedCapped", "pseudoSmallCapped", "pseudoSmallcapped", "pseudosmallcapped", "psi", "punctuationspace", "purenumber", "pushattribute", "pushbutton", "pushmacro", "pushmode", "pushoutputstream", "pushsystemmode", "putboxincache", "putnextboxincache", "qquad", "quad", "quadrupleprime", "quads", "quarterstrut", "questiondown", "questionedeq", "quitcommalist", "quitprevcommalist", "quittypescriptscanning", "quotation", "quote", "quotedbl", "quotedblbase", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "quotesingle", "quotesinglebase", "rVert", "racute", "raggedbottom", "raggedcenter", "raggedleft", "raggedright", "raggedwidecenter", "raisebox", "randomizetext", "randomnumber", "rangle", "rationals", "rawcounter", "rawcountervalue", "rawdate", "rawdoifelseinset", "rawdoifinset", "rawdoifinsetelse", "rawgetparameters", "rawprocessaction", "rawprocesscommacommand", "rawprocesscommalist", "rawstructurelistuservariable", "rawsubcountervalue", "rbox", "rbrace", "rbracket", "rcaron", "rceil", "rcommaaccent", "rdoublegrave", "readfile", "readfixfile", "readjobfile", "readlocfile", "readsetfile", "readsysfile", "readtexfile", "readxmlfile", "realSmallCapped", "realSmallcapped", "realpagenumber", "reals", "realsmallcapped", "recursedepth", "recurselevel", "recursestring", "redoconvertfont", "ref", "reference", "referencecolumnnumber", "referencepagedetail", "referencepagestate", "referenceprefix", "referencerealpage", "referencesymbol", "referring", "registerattachment", "registerctxluafile", "registered", "registerexternalfigure", "registerfontclass", "registerhyphenationexception", "registerhyphenationpattern", "registermenubuttons", "registerparwrapper", "registerparwrapperreverse", "registersort", "registersynonym", "registerunit", "regular", "relatemarking", "relateparameterhandlers", "relaxvalueifundefined", "relbar", "remainingcharacters", "remark", "removebottomthings", "removedepth", "removefromcommalist", "removelastskip", "removelastspace", "removemarkedcontent", "removepunctuation", "removesubstring", "removetoks", "removeunwantedspaces", "repeathead", "replacefeature", "replaceincommalist", "replaceword", "rescan", "rescanwithsetup", "resetMPdrawing", "resetMPenvironment", "resetMPinstance", "resetallattributes", "resetandaddfeature", "resetbar", "resetboxesincache", "resetbreakpoints", "resetbuffer", "resetcharacteralign", "resetcharacterkerning", "resetcharacterspacing", "resetcharacterstripping", "resetcollector", "resetcounter", "resetctxscanner", "resetdigitsmanipulation", "resetdirection", "resetfeature", "resetflag", "resetfontcolorsheme", "resetfontfallback", "resetfontsolution", "resethyphenationfeatures", "resetinjector", "resetinteractionmenu", "resetitaliccorrection", "resetlayer", "resetlocalfloats", "resetmarker", "resetmarking", "resetmode", "resetpagenumber", "resetparallel", "resetpath", "resetpenalties", "resetperiodkerning", "resetprofile", "resetrecurselevel", "resetreference", "resetreplacements", "resetscript", "resetsetups", "resetshownsynonyms", "resetsubpagenumber", "resetsymbolset", "resetsystemmode", "resettimer", "resettokenlist", "resettrackers", "resettrialtypesetting", "resetusedsortings", "resetusedsynonyms", "resetuserpagenumber", "resetvalue", "resetvisualizers", "reshapebox", "resolvedglyphdirect", "resolvedglyphstyled", "restartcounter", "restorebox", "restorecatcodes", "restorecounter", "restorecurrentattributes", "restoreendofline", "restoreglobalbodyfont", "restriction", "retestfeature", "reusableMPgraphic", "reuseMPgraphic", "reuserandomseed", "reverseddoubleprime", "reversedprime", "reversedtripleprime", "reversehbox", "reversehpack", "reversetpack", "reversevbox", "reversevboxcontent", "reversevpack", "reversevtop", "revivefeature", "rfence", "rfloor", "rgroup", "rhbox", "rho", "rhooknearrow", "rhookswarrow", "right", "rightaligned", "rightangle", "rightarrow", "rightarrowbar", "rightarrowtail", "rightarrowtriangle", "rightbottombox", "rightbox", "rightdasharrow", "rightguillemot", "rightharpoondown", "rightharpoonup", "righthbox", "rightheadtext", "rightlabeltext", "rightleftarrows", "rightleftharpoons", "rightline", "rightmathlabeltext", "rightorleftpageaction", "rightpageorder", "rightrightarrows", "rightskipadaption", "rightsquigarrow", "rightsubguillemot", "rightthreearrows", "rightthreetimes", "righttoleft", "righttolefthbox", "righttoleftvbox", "righttoleftvtop", "righttopbox", "rightwavearrow", "rightwhitearrow", "ring", "rinterval", "rinvertedbreve", "risingdotseq", "rlap", "rlointerval", "rmoustache", "rneq", "robustaddtocommalist", "robustdoifelseinset", "robustdoifinsetelse", "robustpretocommalist", "rointerval", "rollbutton", "roman", "romanC", "romanD", "romanI", "romanII", "romanIII", "romanIV", "romanIX", "romanL", "romanM", "romanV", "romanVI", "romanVII", "romanVIII", "romanX", "romanXI", "romanXII", "romanc", "romand", "romani", "romanii", "romaniii", "romaniv", "romanix", "romanl", "romanm", "romannumerals", "romanv", "romanvi", "romanvii", "romanviii", "romanx", "romanxi", "romanxii", "rootradical", "rotate", "rparent", "rrangle", "rrbracket", "rrointerval", "rtimes", "rtlhbox", "rtlvbox", "rtlvtop", "rtop", "ruby", "ruledhbox", "ruledhpack", "ruledmbox", "ruledtopv", "ruledtpack", "ruledvbox", "ruledvpack", "ruledvtop", "runMPbuffer", "runninghbox", "russianNumerals", "russiannumerals", "rvert", "sacute", "safechar", "samplefile", "sans", "sansbold", "sansnormal", "sansserif", "savebox", "savebtxdataset", "savebuffer", "savecounter", "savecurrentattributes", "savenormalmeaning", "savetaggedtwopassdata", "savetwopassdata", "sbox", "scale", "scaron", "scedilla", "schwa", "schwahook", "scircumflex", "scommaaccent", "screen", "searrow", "secondoffivearguments", "secondoffourarguments", "secondofsixarguments", "secondofthreearguments", "secondofthreeunexpanded", "secondoftwoarguments", "secondoftwounexpanded", "section", "sectionmark", "seeindex", "select", "selectblocks", "serializecommalist", "serializedcommalist", "serif", "serifbold", "serifnormal", "setJSpreamble", "setMPlayer", "setMPpositiongraphic", "setMPpositiongraphicrange", "setMPtext", "setMPvariable", "setMPvariables", "setautopagestaterealpageno", "setbar", "setbigbodyfont", "setboxllx", "setboxlly", "setbreakpoints", "setcapstrut", "setcatcodetable", "setcharacteralign", "setcharacteraligndetail", "setcharactercasing", "setcharactercleaning", "setcharacterkerning", "setcharacterspacing", "setcharacterstripping", "setcharstrut", "setcollector", "setcolormodell", "setcounter", "setcounterown", "setctxluafunction", "setcurrentfontclass", "setdataset", "setdatavalue", "setdefaultpenalties", "setdigitsmanipulation", "setdirection", "setdocumentargument", "setdocumentargumentdefault", "setdocumentfilename", "setdummyparameter", "setelementexporttag", "setemeasure", "setevalue", "setevariable", "setevariables", "setexpansion", "setfirstline", "setfirstpasscharacteralign", "setflag", "setfont", "setfontcolorsheme", "setfontfeature", "setfontsolution", "setfontstrut", "setfractions", "setglobalscript", "setgmeasure", "setgvalue", "setgvariable", "setgvariables", "sethboxregister", "sethyphenatedurlafter", "sethyphenatedurlbefore", "sethyphenatedurlnormal", "sethyphenationfeatures", "setinitial", "setinjector", "setinteraction", "setinterfacecommand", "setinterfaceconstant", "setinterfaceelement", "setinterfacemessage", "setinterfacevariable", "setinternalrendering", "setitaliccorrection", "setlayer", "setlayerframed", "setlayertext", "setlinefiller", "setlocalhsize", "setlocalscript", "setluatable", "setmainbodyfont", "setmainparbuilder", "setmarker", "setmarking", "setmathstyle", "setmeasure", "setmessagetext", "setminus", "setmode", "setnostrut", "setnote", "setnotetext", "setobject", "setoldstyle", "setpagereference", "setpagestate", "setpagestaterealpageno", "setparagraphfreezing", "setpenalties", "setpercentdimen", "setperiodkerning", "setposition", "setpositionbox", "setpositiondata", "setpositiondataplus", "setpositiononly", "setpositionplus", "setpositionstrut", "setprofile", "setrandomseed", "setreference", "setreferencedobject", "setregisterentry", "setreplacements", "setrigidcolumnbalance", "setrigidcolumnhsize", "setscript", "setsecondpasscharacteralign", "setsectionblock", "setsimplecolumnshsize", "setsmallbodyfont", "setsmallcaps", "setstackbox", "setstructurepageregister", "setstrut", "setsuperiors", "setsystemmode", "settabular", "settaggedmetadata", "settestcrlf", "settextcontent", "settightobject", "settightreferencedobject", "settightstrut", "settightunreferencedobject", "settokenlist", "settrialtypesetting", "setuevalue", "setugvalue", "setunreferencedobject", "setup", "setupMPgraphics", "setupMPinstance", "setupMPpage", "setupMPvariables", "setupTABLE", "setupTEXpage", "setupalign", "setupalternativestyles", "setuparranging", "setupattachment", "setupattachments", "setupbackend", "setupbackground", "setupbackgrounds", "setupbar", "setupbars", "setupblackrules", "setupblank", "setupbleeding", "setupblock", "setupbodyfont", "setupbodyfontenvironment", "setupbookmark", "setupbottom", "setupbottomtexts", "setupbtx", "setupbtxdataset", "setupbtxlabeltext", "setupbtxlist", "setupbtxregister", "setupbtxrendering", "setupbuffer", "setupbutton", "setupcapitals", "setupcaption", "setupcaptions", "setupcharacteralign", "setupcharacterkerning", "setupcharacterspacing", "setupchemical", "setupchemicalframed", "setupclipping", "setupcollector", "setupcolor", "setupcolors", "setupcolumns", "setupcolumnset", "setupcolumnsetarea", "setupcolumnsetareatext", "setupcolumnsetlines", "setupcolumnsetspan", "setupcolumnsetstart", "setupcombination", "setupcombinedlist", "setupcomment", "setupcontent", "setupcounter", "setupdataset", "setupdelimitedtext", "setupdescription", "setupdescriptions", "setupdirections", "setupdocument", "setupeffect", "setupenumeration", "setupenumerations", "setupenv", "setupexpansion", "setupexport", "setupexternalfigure", "setupexternalfigures", "setupexternalsoundtracks", "setupfacingfloat", "setupfield", "setupfieldbody", "setupfieldcategory", "setupfieldcontentframed", "setupfieldlabelframed", "setupfields", "setupfieldtotalframed", "setupfiller", "setupfillinlines", "setupfillinrules", "setupfirstline", "setupfittingpage", "setupfloat", "setupfloatframed", "setupfloats", "setupfloatsplitting", "setupfontexpansion", "setupfontprotrusion", "setupfonts", "setupfontsolution", "setupfooter", "setupfootertexts", "setupfootnotes", "setupforms", "setupformula", "setupformulae", "setupformulaframed", "setupframed", "setupframedcontent", "setupframedtable", "setupframedtablecolumn", "setupframedtablerow", "setupframedtext", "setupframedtexts", "setupglobalreferenceprefix", "setuphead", "setupheadalternative", "setupheader", "setupheadertexts", "setupheadnumber", "setupheads", "setupheadtext", "setuphelp", "setuphigh", "setuphighlight", "setuphyphenation", "setuphyphenmark", "setupindentedtext", "setupindenting", "setupindex", "setupinitial", "setupinsertion", "setupinteraction", "setupinteractionbar", "setupinteractionmenu", "setupinteractionscreen", "setupinterlinespace", "setupitaliccorrection", "setupitemgroup", "setupitemizations", "setupitemize", "setupitems", "setuplabel", "setuplabeltext", "setuplanguage", "setuplayer", "setuplayeredtext", "setuplayout", "setuplayouttext", "setuplegend", "setuplinefiller", "setuplinefillers", "setuplinenote", "setuplinenumbering", "setuplines", "setuplinetable", "setuplinewidth", "setuplist", "setuplistalternative", "setuplistextra", "setuplocalfloats", "setuplocalinterlinespace", "setuplow", "setuplowhigh", "setuplowmidhigh", "setupmakeup", "setupmarginblock", "setupmargindata", "setupmarginframed", "setupmarginrule", "setupmarginrules", "setupmarking", "setupmathalignment", "setupmathcases", "setupmathematics", "setupmathfence", "setupmathfraction", "setupmathfractions", "setupmathframed", "setupmathlabeltext", "setupmathmatrix", "setupmathornament", "setupmathradical", "setupmathstackers", "setupmathstyle", "setupmixedcolumns", "setupmodule", "setupmulticolumns", "setupnarrower", "setupnotation", "setupnotations", "setupnote", "setupnotes", "setupoffset", "setupoffsetbox", "setupoperatortext", "setupoppositeplacing", "setuporientation", "setupoutput", "setupoutputroutine", "setuppagechecker", "setuppagecolumns", "setuppagecomment", "setuppageinjection", "setuppageinjectionalternative", "setuppagenumber", "setuppagenumbering", "setuppageshift", "setuppagestate", "setuppagetransitions", "setuppairedbox", "setuppalet", "setuppaper", "setuppapersize", "setupparagraph", "setupparagraphintro", "setupparagraphnumbering", "setupparagraphs", "setupparallel", "setupperiodkerning", "setupperiods", "setupplaceholder", "setupplacement", "setuppositionbar", "setuppositioning", "setupprefixtext", "setupprocessor", "setupprofile", "setupprograms", "setupquotation", "setupquote", "setuprealpagenumber", "setupreferenceformat", "setupreferenceprefix", "setupreferencestructureprefix", "setupreferencing", "setupregister", "setupregisters", "setuprenderingwindow", "setuprotate", "setupruby", "setups", "setupscale", "setupscript", "setupscripts", "setupsectionblock", "setupselector", "setupshift", "setupsidebar", "setupsorting", "setupspacing", "setupspellchecking", "setupstartstop", "setupstretched", "setupstrut", "setupstyle", "setupsubformula", "setupsubformulas", "setupsubpagenumber", "setupsuffixtext", "setupsymbols", "setupsymbolset", "setupsynctex", "setupsynonyms", "setupsystem", "setuptables", "setuptabulate", "setuptagging", "setuptaglabeltext", "setuptext", "setuptextbackground", "setuptextflow", "setuptextnote", "setuptextrules", "setuptexttexts", "setupthinrules", "setuptolerance", "setuptooltip", "setuptop", "setuptoptexts", "setuptype", "setuptyping", "setupunit", "setupunittext", "setupurl", "setupuserdata", "setupuserdataalternative", "setupuserpagenumber", "setupversion", "setupviewerlayer", "setupvspacing", "setupwhitespace", "setupwithargument", "setupwithargumentswapped", "setupxml", "setupxtable", "setuvalue", "setuxvalue", "setvalue", "setvariable", "setvariables", "setvboxregister", "setvisualizerfont", "setvtopregister", "setwidthof", "setxmeasure", "setxvalue", "setxvariable", "setxvariables", "seveneighths", "sfrac", "shapedhbox", "sharp", "shiftbox", "shiftdown", "shiftup", "showallmakeup", "showattributes", "showbodyfont", "showbodyfontenvironment", "showboxes", "showbtxdatasetauthors", "showbtxdatasetcompleteness", "showbtxdatasetfields", "showbtxfields", "showbtxhashedauthors", "showbtxtables", "showchardata", "showcharratio", "showcolor", "showcolorbar", "showcolorcomponents", "showcolorgroup", "showcolorset", "showcolorstruts", "showcounter", "showdirectives", "showdirsinmargin", "showedebuginfo", "showexperiments", "showfont", "showfontdata", "showfontexpansion", "showfontitalics", "showfontkerns", "showfontparameters", "showfontstrip", "showfontstyle", "showframe", "showglyphdata", "showglyphs", "showgrid", "showgridsnapping", "showhelp", "showhyphenationtrace", "showhyphens", "showinjector", "showjustification", "showkerning", "showlayout", "showlayoutcomponents", "showligature", "showligatures", "showlogcategories", "showluatables", "showmakeup", "showmargins", "showmessage", "showminimalbaseline", "shownextbox", "showotfcomposition", "showpalet", "showparentchain", "showparwrapperstate", "showprint", "showsetups", "showsetupsdefinition", "showstruts", "showsymbolset", "showtimer", "showtokens", "showtrackers", "showvalue", "showvariable", "showwarning", "sigma", "signalrightpage", "sim", "simeq", "simplealignedbox", "simplealignedboxplus", "simplealignedspreadbox", "simplegroupedcommand", "simplereversealignedbox", "simplereversealignedboxplus", "singalcharacteralign", "singlebond", "singleverticalbar", "sixperemspace", "sixthofsixarguments", "slanted", "slantedbold", "slantedface", "slash", "slicepages", "slong", "slovenianNumerals", "sloveniannumerals", "small", "smallbodyfont", "smallbold", "smallbolditalic", "smallboldslanted", "smallcappedcharacters", "smallcappedromannumerals", "smallcaps", "smaller", "smallitalicbold", "smallnormal", "smallskip", "smallslanted", "smallslantedbold", "smalltype", "smash", "smashbox", "smashboxed", "smashedhbox", "smashedvbox", "smile", "snaptogrid", "softhyphen", "solidus", "someheadnumber", "somekindoftab", "someline", "somelocalfloat", "somenamedheadnumber", "someplace", "somewhere", "space", "spaceddigits", "spaceddigitsmethod", "spaceddigitsseparator", "spaceddigitssymbol", "spadesuit", "spanishNumerals", "spanishnumerals", "speech", "sphericalangle", "splitatasterisk", "splitatcolon", "splitatcolons", "splitatcomma", "splitatperiod", "splitdfrac", "splitfilename", "splitfloat", "splitfrac", "splitoffbase", "splitofffull", "splitoffkind", "splitoffname", "splitoffpath", "splitoffroot", "splitofftokens", "splitofftype", "splitstring", "spreadhbox", "sqcap", "sqcup", "sqrt", "sqsubset", "sqsubseteq", "sqsubsetneq", "sqsupset", "sqsupseteq", "sqsupsetneq", "square", "squaredots", "ssharp", "stackrel", "stackscripts", "star", "stareq", "startJScode", "startJSpreamble", "startLUA", "startMP", "startMPclip", "startMPcode", "startMPdefinitions", "startMPdrawing", "startMPenvironment", "startMPextensions", "startMPinclusions", "startMPinitializations", "startMPpage", "startMPpositiongraphic", "startMPpositionmethod", "startMPrun", "startPARSEDXML", "startTABLE", "startTABLEbody", "startTABLEfoot", "startTABLEhead", "startTABLEnested", "startTABLEnext", "startTC", "startTD", "startTDs", "startTEX", "startTEXpage", "startTH", "startTN", "startTR", "startTRs", "startTX", "startTY", "startXML", "startalign", "startalignment", "startallmodes", "startappendices", "startarrangedpages", "startasciimode", "startaside", "startattachment", "startbackground", "startbackmatter", "startbar", "startbbordermatrix", "startbitmapimage", "startblockquote", "startbodymatter", "startbordermatrix", "startboxedcolumns", "startbtxlabeltext", "startbtxrenderingdefinitions", "startbuffer", "startcases", "startcatcodetable", "startcenteraligned", "startchapter", "startcharacteralign", "startcheckedfences", "startchemical", "startchemicaltext", "startcollect", "startcollecting", "startcolor", "startcolorintent", "startcoloronly", "startcolorset", "startcolumns", "startcolumnset", "startcolumnsetspan", "startcombination", "startcomment", "startcomponent", "startcontextcode", "startcontextdefinitioncode", "startctxfunction", "startctxfunctiondefinition", "startcurrentcolor", "startcurrentlistentrywrapper", "startdelimited", "startdelimitedtext", "startdisplaymath", "startdmath", "startdocument", "starteffect", "startelement", "startembeddedxtable", "startendnote", "startendofline", "startenvironment", "startexceptions", "startexpanded", "startexpandedcollect", "startextendedcatcodetable", "startexternalfigurecollection", "startfacingfloat", "startfact", "startfigure", "startfiguretext", "startfittingpage", "startfixed", "startfloatcombination", "startfont", "startfontclass", "startfontsolution", "startfootnote", "startformula", "startformulas", "startframed", "startframedcell", "startframedcontent", "startframedrow", "startframedtable", "startframedtext", "startfrontmatter", "startgoto", "startgraphictext", "startgridsnapping", "starthanging", "starthbox", "starthboxestohbox", "starthboxregister", "starthead", "startheadtext", "starthelptext", "starthiding", "starthighlight", "starthyphenation", "startimath", "startindentation", "startindentedtext", "startinteraction", "startinteractionmenu", "startinterface", "startintermezzotext", "startintertext", "startitem", "startitemgroup", "startitemgroupcolumns", "startitemize", "startknockout", "startlabeltext", "startlanguage", "startlayout", "startleftaligned", "startlegend", "startline", "startlinealignment", "startlinecorrection", "startlinefiller", "startlinenote", "startlinenumbering", "startlines", "startlinetable", "startlinetablebody", "startlinetablecell", "startlinetablehead", "startlocalfootnotes", "startlocalheadsetup", "startlocallinecorrection", "startlocalnotes", "startlocalsetups", "startlua", "startluacode", "startluaparameterset", "startluasetups", "startmakeup", "startmarginblock", "startmarginrule", "startmarkedcontent", "startmarkpages", "startmathalignment", "startmathcases", "startmathlabeltext", "startmathmatrix", "startmathmode", "startmathstyle", "startmatrices", "startmatrix", "startmaxaligned", "startmdformula", "startmidaligned", "startmiddlealigned", "startmiddlemakeup", "startmixedcolumns", "startmode", "startmodeset", "startmodule", "startmoduletestsection", "startmpformula", "startmulticolumns", "startnamedsection", "startnamedsubformulas", "startnarrow", "startnarrower", "startnegative", "startnicelyfilledbox", "startnointerference", "startnotallmodes", "startnotext", "startnotmode", "startoperatortext", "startopposite", "startoutputstream", "startoverlay", "startoverprint", "startpacked", "startpagecolumns", "startpagecomment", "startpagefigure", "startpagelayout", "startpagemakeup", "startpar", "startparagraph", "startparagraphs", "startparagraphscell", "startparbuilder", "startpart", "startpath", "startplacechemical", "startplacefigure", "startplacefloat", "startplaceformula", "startplacegraphic", "startplaceintermezzo", "startplacelegend", "startplacepairedbox", "startplacetable", "startpositioning", "startpositionoverlay", "startpositive", "startpostponing", "startpostponingnotes", "startprefixtext", "startprocessassignmentcommand", "startprocessassignmentlist", "startprocesscommacommand", "startprocesscommalist", "startproduct", "startproject", "startprotect", "startprotectedcolors", "startpublication", "startpunctuation", "startquotation", "startquote", "startrandomized", "startrandomseed", "startrawsetups", "startreadingfile", "startreferenceprefix", "startregime", "startregister", "startreusableMPgraphic", "startrightaligned", "startruby", "startscript", "startsdformula", "startsection", "startsectionblock", "startsectionblockenvironment", "startsectionlevel", "startsetups", "startshapebox", "startshift", "startsidebar", "startsimplecolumns", "startspecialitem", "startspeech", "startspformula", "startsplitformula", "startsplittext", "startspread", "startstandardmakeup", "startstaticMPfigure", "startstaticMPgraphic", "startstrictinspectnextcharacter", "startstructurepageregister", "startstrut", "startstyle", "startsubformulas", "startsubject", "startsubjectlevel", "startsubsection", "startsubsentence", "startsubstack", "startsubsubject", "startsubsubsection", "startsubsubsubject", "startsubsubsubsection", "startsubsubsubsubject", "startsubsubsubsubsection", "startsubsubsubsubsubject", "startsuffixtext", "startsymbolset", "starttable", "starttablehead", "starttables", "starttabletail", "starttabletext", "starttabulate", "starttabulatehead", "starttabulatetail", "starttagged", "starttaglabeltext", "starttexcode", "starttexdefinition", "starttext", "starttextbackground", "starttextbackgroundmanual", "starttextcolor", "starttextcolorintent", "starttextflow", "starttextmakeup", "starttextrule", "startthematrix", "starttitle", "starttokenlist", "starttokens", "starttransparent", "starttypescript", "starttypescriptcollection", "starttyping", "startuniqueMPgraphic", "startuniqueMPpagegraphic", "startunittext", "startunpacked", "startusableMPgraphic", "startuseMPgraphic", "startusemathstyleparameter", "startuserdata", "startusingbtxspecification", "startvbox", "startvboxregister", "startvboxtohbox", "startvboxtohboxseparator", "startviewerlayer", "startvtop", "startvtopregister", "startxcell", "startxcellgroup", "startxcolumn", "startxgroup", "startxmldisplayverbatim", "startxmlinlineverbatim", "startxmlraw", "startxmlsetups", "startxrow", "startxrowgroup", "startxtable", "startxtablebody", "startxtablefoot", "startxtablehead", "startxtablenext", "stligature", "stopJScode", "stopJSpreamble", "stopLUA", "stopMP", "stopMPclip", "stopMPcode", "stopMPdefinitions", "stopMPdrawing", "stopMPenvironment", "stopMPextensions", "stopMPinclusions", "stopMPinitializations", "stopMPpage", "stopMPpositiongraphic", "stopMPpositionmethod", "stopMPrun", "stopPARSEDXML", "stopTABLE", "stopTABLEbody", "stopTABLEfoot", "stopTABLEhead", "stopTABLEnested", "stopTABLEnext", "stopTC", "stopTD", "stopTDs", "stopTEX", "stopTEXpage", "stopTH", "stopTN", "stopTR", "stopTRs", "stopTX", "stopTY", "stopXML", "stopalign", "stopalignment", "stopallmodes", "stopappendices", "stoparrangedpages", "stopasciimode", "stopaside", "stopattachment", "stopbackground", "stopbackmatter", "stopbar", "stopbbordermatrix", "stopbitmapimage", "stopblockquote", "stopbodymatter", "stopbordermatrix", "stopboxedcolumns", "stopbtxlabeltext", "stopbtxrenderingdefinitions", "stopbuffer", "stopcases", "stopcatcodetable", "stopcenteraligned", "stopchapter", "stopcharacteralign", "stopcheckedfences", "stopchemical", "stopchemicaltext", "stopcollect", "stopcollecting", "stopcolor", "stopcolorintent", "stopcoloronly", "stopcolorset", "stopcolumns", "stopcolumnset", "stopcolumnsetspan", "stopcombination", "stopcomment", "stopcomponent", "stopcontextcode", "stopcontextdefinitioncode", "stopctxfunction", "stopctxfunctiondefinition", "stopcurrentcolor", "stopcurrentlistentrywrapper", "stopdelimited", "stopdelimitedtext", "stopdisplaymath", "stopdmath", "stopdocument", "stopeffect", "stopelement", "stopembeddedxtable", "stopendnote", "stopendofline", "stopenvironment", "stopexceptions", "stopexpanded", "stopexpandedcollect", "stopextendedcatcodetable", "stopexternalfigurecollection", "stopfacingfloat", "stopfact", "stopfigure", "stopfiguretext", "stopfittingpage", "stopfixed", "stopfloatcombination", "stopfont", "stopfontclass", "stopfontsolution", "stopfootnote", "stopformula", "stopformulas", "stopframed", "stopframedcell", "stopframedcontent", "stopframedrow", "stopframedtable", "stopframedtext", "stopfrontmatter", "stopgoto", "stopgraphictext", "stopgridsnapping", "stophanging", "stophbox", "stophboxestohbox", "stophboxregister", "stophead", "stopheadtext", "stophelptext", "stophiding", "stophighlight", "stophyphenation", "stopimath", "stopindentation", "stopindentedtext", "stopinteraction", "stopinteractionmenu", "stopinterface", "stopintermezzotext", "stopintertext", "stopitem", "stopitemgroup", "stopitemgroupcolumns", "stopitemize", "stopknockout", "stoplabeltext", "stoplanguage", "stoplayout", "stopleftaligned", "stoplegend", "stopline", "stoplinealignment", "stoplinecorrection", "stoplinefiller", "stoplinenote", "stoplinenumbering", "stoplines", "stoplinetable", "stoplinetablebody", "stoplinetablecell", "stoplinetablehead", "stoplocalfootnotes", "stoplocalheadsetup", "stoplocallinecorrection", "stoplocalnotes", "stoplocalsetups", "stoplua", "stopluacode", "stopluaparameterset", "stopluasetups", "stopmakeup", "stopmarginblock", "stopmarginrule", "stopmarkedcontent", "stopmarkpages", "stopmathalignment", "stopmathcases", "stopmathlabeltext", "stopmathmatrix", "stopmathmode", "stopmathstyle", "stopmatrices", "stopmatrix", "stopmaxaligned", "stopmdformula", "stopmidaligned", "stopmiddlealigned", "stopmiddlemakeup", "stopmixedcolumns", "stopmode", "stopmodeset", "stopmodule", "stopmoduletestsection", "stopmpformula", "stopmulticolumns", "stopnamedsection", "stopnamedsubformulas", "stopnarrow", "stopnarrower", "stopnegative", "stopnicelyfilledbox", "stopnointerference", "stopnotallmodes", "stopnotext", "stopnotmode", "stopoperatortext", "stopopposite", "stopoutputstream", "stopoverlay", "stopoverprint", "stoppacked", "stoppagecolumns", "stoppagecomment", "stoppagefigure", "stoppagelayout", "stoppagemakeup", "stoppar", "stopparagraph", "stopparagraphs", "stopparagraphscell", "stopparbuilder", "stoppart", "stoppath", "stopplacechemical", "stopplacefigure", "stopplacefloat", "stopplaceformula", "stopplacegraphic", "stopplaceintermezzo", "stopplacelegend", "stopplacepairedbox", "stopplacetable", "stoppositioning", "stoppositionoverlay", "stoppositive", "stoppostponing", "stoppostponingnotes", "stopprefixtext", "stopprocessassignmentcommand", "stopprocessassignmentlist", "stopprocesscommacommand", "stopprocesscommalist", "stopproduct", "stopproject", "stopprotect", "stopprotectedcolors", "stoppublication", "stoppunctuation", "stopquotation", "stopquote", "stoprandomized", "stoprandomseed", "stoprawsetups", "stopreadingfile", "stopreferenceprefix", "stopregime", "stopreusableMPgraphic", "stoprightaligned", "stopruby", "stopscript", "stopsdformula", "stopsection", "stopsectionblock", "stopsectionblockenvironment", "stopsectionlevel", "stopsetups", "stopshapebox", "stopshift", "stopsidebar", "stopsimplecolumns", "stopspecialitem", "stopspeech", "stopspformula", "stopsplitformula", "stopsplittext", "stopspread", "stopstandardmakeup", "stopstaticMPfigure", "stopstaticMPgraphic", "stopstrictinspectnextcharacter", "stopstrut", "stopstyle", "stopsubformulas", "stopsubject", "stopsubjectlevel", "stopsubsection", "stopsubsentence", "stopsubstack", "stopsubsubject", "stopsubsubsection", "stopsubsubsubject", "stopsubsubsubsection", "stopsubsubsubsubject", "stopsubsubsubsubsection", "stopsubsubsubsubsubject", "stopsuffixtext", "stopsymbolset", "stoptable", "stoptablehead", "stoptables", "stoptabletail", "stoptabletext", "stoptabulate", "stoptabulatehead", "stoptabulatetail", "stoptagged", "stoptaglabeltext", "stoptexcode", "stoptexdefinition", "stoptext", "stoptextbackground", "stoptextbackgroundmanual", "stoptextcolor", "stoptextcolorintent", "stoptextflow", "stoptextmakeup", "stoptextrule", "stopthematrix", "stoptitle", "stoptokenlist", "stoptokens", "stoptransparent", "stoptypescript", "stoptypescriptcollection", "stoptyping", "stopuniqueMPgraphic", "stopuniqueMPpagegraphic", "stopunittext", "stopunpacked", "stopusableMPgraphic", "stopuseMPgraphic", "stopusemathstyleparameter", "stopuserdata", "stopusingbtxspecification", "stopvbox", "stopvboxregister", "stopvboxtohbox", "stopvboxtohboxseparator", "stopviewerlayer", "stopvtop", "stopvtopregister", "stopxcell", "stopxcellgroup", "stopxcolumn", "stopxgroup", "stopxmldisplayverbatim", "stopxmlinlineverbatim", "stopxmlraw", "stopxmlsetups", "stopxrow", "stopxrowgroup", "stopxtable", "stopxtablebody", "stopxtablefoot", "stopxtablehead", "stopxtablenext", "stretched", "strictdoifelsenextoptional", "strictdoifnextoptionalelse", "stripcharacter", "strippedcsname", "stripspaces", "structurelistuservariable", "structurenumber", "structuretitle", "structureuservariable", "structurevariable", "strut", "strutdp", "strutgap", "strutht", "struthtdp", "struttedbox", "strutwd", "style", "styleinstance", "subject", "subpagenumber", "subsection", "subsentence", "subset", "subseteq", "subseteqq", "subsetneq", "subsetneqq", "substituteincommalist", "subsubject", "subsubsection", "subsubsubject", "subsubsubsection", "subsubsubsubject", "subsubsubsubsection", "subsubsubsubsubject", "subtractfeature", "succ", "succapprox", "succcurlyeq", "succeq", "succeqq", "succnapprox", "succneq", "succneqq", "succnsim", "succsim", "suffixlanguage", "suffixtext", "sum", "supset", "supseteq", "supseteqq", "supsetneq", "supsetneqq", "surd", "surdradical", "swapcounts", "swapdimens", "swapface", "swapmacros", "swaptypeface", "swarrow", "switchstyleonly", "switchtobodyfont", "switchtocolor", "switchtointerlinespace", "symbol", "symbolreference", "synchronizeblank", "synchronizeindenting", "synchronizemarking", "synchronizeoutputstreams", "synchronizestrut", "synchronizewhitespace", "synctexblockfilename", "synctexresetfilename", "synctexsetfilename", "systemlog", "systemlogfirst", "systemloglast", "systemsetups", "tLeftarrow", "tLeftrightarrow", "tRightarrow", "tabulateautoline", "tabulateautorule", "tabulateline", "tabulaterule", "taggedctxcommand", "taggedlabeltexts", "taglabellanguage", "taglabeltext", "tau", "tbinom", "tbox", "tcaron", "tcedilla", "tcommaaccent", "tcurl", "tequal", "test", "testandsplitstring", "testcolumn", "testfeature", "testfeatureonce", "testpage", "testpageonly", "testpagesync", "testtokens", "tex", "texdefinition", "texsetup", "textAngstrom", "textacute", "textampersand", "textasciicircum", "textasciitilde", "textat", "textbackslash", "textbar", "textbottomcomma", "textbottomdot", "textbraceleft", "textbraceright", "textbreve", "textbrokenbar", "textbullet", "textcaron", "textcedilla", "textcelsius", "textcent", "textcircledP", "textcircumflex", "textcitation", "textcite", "textcomma", "textcontrolspace", "textcurrency", "textdag", "textddag", "textdegree", "textdiaeresis", "textdiv", "textdollar", "textdong", "textdotaccent", "textellipsis", "texteuro", "textflowcollector", "textfraction", "textgrave", "texthash", "texthorizontalbar", "texthungarumlaut", "texthyphen", "textkelvin", "textlognot", "textmacron", "textmath", "textmho", "textminus", "textmu", "textmultiply", "textnumero", "textogonek", "textohm", "textormathchar", "textormathchars", "textounce", "textpercent", "textperiod", "textplus", "textpm", "textreference", "textring", "textrule", "textslash", "textsterling", "texttilde", "textunderscore", "textvisiblespace", "textyen", "thai", "thainumerals", "thedatavalue", "thefirstcharacter", "thematrix", "thenormalizedbodyfontsize", "theorientation", "therefore", "theremainingcharacters", "theta", "thickspace", "thinrule", "thinrules", "thinspace", "thirdoffivearguments", "thirdoffourarguments", "thirdofsixarguments", "thirdofthreearguments", "thirdofthreeunexpanded", "thook", "thookleftarrow", "thookrightarrow", "thorn", "threedigitrounding", "threeeighths", "threefifths", "threeperemspace", "threequarter", "threesuperior", "tibetannumerals", "tightlayer", "tilde", "times", "tinyfont", "title", "tlap", "tleftarrow", "tleftharpoondown", "tleftharpoonup", "tleftrightarrow", "tleftrightharpoons", "tmapsto", "to", "tochar", "tolinenote", "tooltip", "top", "topbox", "topleftbox", "toplinebox", "toprightbox", "topskippedbox", "tracecatcodetables", "tracedfontname", "tracedpagestate", "traceoutputroutines", "tracepositions", "trademark", "translate", "transparencycomponents", "transparent", "trel", "triangle", "triangledown", "triangleleft", "triangleq", "triangleright", "trightarrow", "trightharpoondown", "trightharpoonup", "trightleftharpoons", "trightoverleftarrow", "triplebond", "tripleprime", "tripleverticalbar", "truefilename", "truefontname", "tstroke", "ttraggedright", "ttriplerel", "ttwoheadleftarrow", "ttwoheadrightarrow", "turnediota", "twodigitrounding", "twofifths", "twoheaddownarrow", "twoheadleftarrow", "twoheadrightarrow", "twoheadrightarrowtail", "twoheaduparrow", "twosuperior", "twothirds", "tx", "txx", "typ", "type", "typebuffer", "typedefinedbuffer", "typeface", "typefile", "typeinlinebuffer", "typescriptone", "typescriptprefix", "typescriptthree", "typescripttwo", "typesetbuffer", "typesetbufferonly", "typesetfile", "uacute", "ubreve", "ucaron", "uchexnumber", "uchexnumbers", "ucircumflex", "uconvertnumber", "udiaeresis", "udiaeresisacute", "udiaeresiscaron", "udiaeresisgrave", "udiaeresismacron", "udotbelow", "udots", "udoublegrave", "uedcatcodecommand", "ugrave", "uhook", "uhorn", "uhornacute", "uhorndotbelow", "uhorngrave", "uhornhook", "uhorntilde", "uhungarumlaut", "uinvertedbreve", "ulcorner", "umacron", "undefinevalue", "undepthed", "underbar", "underbars", "underbartext", "underbrace", "underbracetext", "underbracket", "underbrackettext", "underdash", "underdashes", "underdot", "underdots", "underleftarrow", "underleftharpoondown", "underleftharpoonup", "underleftrightarrow", "underparent", "underparenttext", "underrandom", "underrandoms", "underrightarrow", "underrightharpoondown", "underrightharpoonup", "underset", "understrike", "understrikes", "undertwoheadleftarrow", "undertwoheadrightarrow", "undoassign", "unexpandeddocumentvariable", "unframed", "unhhbox", "unihex", "uniqueMPgraphic", "uniqueMPpagegraphic", "unit", "unitlanguage", "unitshigh", "unitslow", "unittext", "unknown", "unprotected", "unregisterhyphenationpattern", "unregisterparwrapper", "unspaceafter", "unspaceargument", "unspaced", "unspacestring", "unstackscripts", "untexargument", "untexcommand", "uogonek", "upand", "uparrow", "updasharrow", "updateparagraphdemerits", "updateparagraphpenalties", "updateparagraphproperties", "updateparagraphshapes", "updownarrow", "updownarrowbar", "updownarrows", "upharpoonleft", "upharpoonright", "uplus", "uppercased", "uppercasestring", "uppercasing", "upperleftdoubleninequote", "upperleftdoublesixquote", "upperleftsingleninequote", "upperleftsinglesixquote", "upperrightdoubleninequote", "upperrightdoublesixquote", "upperrightsingleninequote", "upperrightsinglesixquote", "upsilon", "upuparrows", "upwhitearrow", "urcorner", "uring", "url", "useJSscripts", "useMPenvironmentbuffer", "useMPgraphic", "useMPlibrary", "useMPrun", "useMPvariables", "useURL", "usealignparameter", "useblankparameter", "useblocks", "usebodyfont", "usebodyfontparameter", "usebtxdataset", "usebtxdefinitions", "usecitation", "usecolors", "usecomponent", "usedirectory", "usedummycolorparameter", "usedummystyleandcolor", "usedummystyleparameter", "useenvironment", "useexternaldocument", "useexternalfigure", "useexternalrendering", "useexternalsoundtrack", "usefigurebase", "usefile", "usefontpath", "usegridparameter", "usehyphensparameter", "useindentingparameter", "useindentnextparameter", "useinterlinespaceparameter", "uselanguageparameter", "useluamodule", "useluatable", "usemathstyleparameter", "usemodule", "useproduct", "useprofileparameter", "useproject", "usereferenceparameter", "userpagenumber", "usesetupsparameter", "usestaticMPfigure", "usesubpath", "usesymbols", "usetexmodule", "usetypescript", "usetypescriptfile", "useurl", "usezipfile", "utfchar", "utflower", "utfupper", "utilde", "utilityregisterlength", "vDash", "validassignment", "varTheta", "varepsilon", "varkappa", "varnothing", "varphi", "varpi", "varrho", "varsigma", "vartheta", "vboxreference", "vdash", "vdots", "vec", "vee", "veebar", "veeeq", "verbatim", "verbatimstring", "verbosenumber", "version", "vert", "verticalgrowingbar", "verticalpositionbar", "veryraggedcenter", "veryraggedleft", "veryraggedright", "vglue", "viewerlayer", "vl", "vpackbox", "vpackedbox", "vphantom", "vpos", "vsmash", "vsmashbox", "vsmashed", "vspace", "vspacing", "wcircumflex", "wdofstring", "wedge", "wedgeeq", "weekday", "whitearrowupfrombar", "widehat", "widetilde", "widthofstring", "widthspanningtext", "withoutpt", "word", "wordright", "words", "wordtonumber", "wp", "wr", "writebetweenlist", "writedatatolist", "writestatus", "writetolist", "xLeftarrow", "xLeftrightarrow", "xRightarrow", "xdefconvertedargument", "xequal", "xfrac", "xhookleftarrow", "xhookrightarrow", "xi", "xleftarrow", "xleftharpoondown", "xleftharpoonup", "xleftrightarrow", "xleftrightharpoons", "xmapsto", "xmladdindex", "xmlafterdocumentsetup", "xmlaftersetup", "xmlall", "xmlappenddocumentsetup", "xmlappendsetup", "xmlapplyselectors", "xmlatt", "xmlattdef", "xmlattribute", "xmlattributedef", "xmlbadinclusions", "xmlbeforedocumentsetup", "xmlbeforesetup", "xmlchainatt", "xmlchainattdef", "xmlchecknamespace", "xmlcommand", "xmlconcat", "xmlconcatrange", "xmlcontext", "xmlcount", "xmldefaulttotext", "xmldepth", "xmldirectives", "xmldirectivesafter", "xmldirectivesbefore", "xmldisplayverbatim", "xmldoif", "xmldoifatt", "xmldoifelse", "xmldoifelseatt", "xmldoifelseempty", "xmldoifelseselfempty", "xmldoifelsetext", "xmldoifelsevalue", "xmldoifnot", "xmldoifnotatt", "xmldoifnotselfempty", "xmldoifnottext", "xmldoifselfempty", "xmldoiftext", "xmlelement", "xmlfilter", "xmlfirst", "xmlflush", "xmlflushcontext", "xmlflushdocumentsetups", "xmlflushlinewise", "xmlflushpure", "xmlflushspacewise", "xmlflushtext", "xmlinclude", "xmlinclusion", "xmlinclusions", "xmlinfo", "xmlinjector", "xmlinlineprettyprint", "xmlinlineprettyprinttext", "xmlinlineverbatim", "xmlinstalldirective", "xmllast", "xmllastatt", "xmllastmatch", "xmllastpar", "xmlloadbuffer", "xmlloaddata", "xmlloaddirectives", "xmlloadfile", "xmlloadonly", "xmlmain", "xmlmapvalue", "xmlname", "xmlnamespace", "xmlnonspace", "xmlpar", "xmlparam", "xmlpath", "xmlpos", "xmlposition", "xmlprependdocumentsetup", "xmlprependsetup", "xmlprettyprint", "xmlprettyprinttext", "xmlprocessbuffer", "xmlprocessdata", "xmlprocessfile", "xmlpure", "xmlraw", "xmlrefatt", "xmlregistereddocumentsetups", "xmlregisteredsetups", "xmlregisterns", "xmlremapname", "xmlremapnamespace", "xmlremovedocumentsetup", "xmlremovesetup", "xmlresetdocumentsetups", "xmlresetinjectors", "xmlresetsetups", "xmlsave", "xmlsetatt", "xmlsetattribute", "xmlsetentity", "xmlsetfunction", "xmlsetinjectors", "xmlsetpar", "xmlsetparam", "xmlsetsetup", "xmlsetup", "xmlshow", "xmlsnippet", "xmlstrip", "xmlstripnolines", "xmlstripped", "xmlstrippednolines", "xmltag", "xmltexentity", "xmltext", "xmltobuffer", "xmltobufferverbose", "xmltofile", "xmlvalue", "xmlverbatim", "xrel", "xrightarrow", "xrightharpoondown", "xrightharpoonup", "xrightleftharpoons", "xrightoverleftarrow", "xsplitstring", "xtriplerel", "xtwoheadleftarrow", "xtwoheadrightarrow", "xxfrac", "xypos", "yacute", "ycircumflex", "ydiaeresis", "ydotbelow", "yen", "ygrave", "yhook", "yiddishnumerals", "ymacron", "ytilde", "zacute", "zcaron", "zdotaccent", "zeronumberconversion", "zerowidthnobreakspace", "zerowidthspace", "zeta", "zhook", "zstroke", "zwj", "zwnj" },
["en"]={},
- ["fr"]={ "Caractere", "Caracteres", "Chiffresromains", "JOURSEMAINE", "MOIS", "MOT", "MOTS", "Mot", "Mots", "Numeros", "a", "adaptedisposition", "ajustechamp", "alaligne", "alapage", "aligneadroite", "aligneagauche", "aligneaumilieu", "arriereplan", "baha", "barrecouleur", "barreinteraction", "bas", "bouton", "boutonmenu", "boutonsinteraction", "cacheblocs", "caractere", "caracteres", "champ", "changepolicecorps", "chiffresromains", "clonechamp", "colonne", "commentaire", "comparegroupecouleur", "comparepalette", "completenumeropage", "completeregistre", "composant", "concernant", "convertitnumero", "copitchamp", "corrigeespaceblanc", "couleur", "couleurgrise", "dactylographier", "dans", "datecourante", "de", "definicaractere", "definit", "definitaccent", "definitbloc", "definitblocsection", "definitbuffer", "definitcalque", "definitchamp", "definitcommande", "definitconversion", "definitcouleur", "definitdactylo", "definitdemarrestoppe", "definitdescription", "definitdisposition", "definitenumeration", "definitenvironnementpolicecorps", "definitetiquette", "definitflottant", "definitformatreference", "definitgroupecouleur", "definithbox", "definitjeucolonne", "definitliste", "definitlisteimbriquee", "definitmakeup", "definitmarquage", "definitmenuinteraction", "definitpalette", "definitparagraphes", "definitpilechamp", "definitpolice", "definitpolicecorps", "definitprofil", "definitprogramme", "definitreference", "definitregistre", "definitrevetement", "definitsautdecolonne", "definitsautdepage", "definitsection", "definitsouschamp", "definitstyle", "definitstylepolice", "definitsymbole", "definitsymbolefigure", "definitsynonymepolice", "definitsynonymes", "definittabulation", "definittaillepapier", "definittete", "definittexte", "definittrametableau", "definittri", "definittype", "definitvide", "demarreJScode", "demarreJSpreamble", "demarreLUA", "demarreMP", "demarreMPclip", "demarreMPcode", "demarreMPdefinitions", "demarreMPdrawing", "demarreMPenvironment", "demarreMPextensions", "demarreMPinclusions", "demarreMPinitializations", "demarreMPpage", "demarreMPpositiongraphic", "demarreMPpositionmethod", "demarreMPrun", "demarrePARSEDXML", "demarreTABLE", "demarreTABLEbody", "demarreTABLEfoot", "demarreTABLEhead", "demarreTABLEnext", "demarreTC", "demarreTD", "demarreTDs", "demarreTEX", "demarreTEXpage", "demarreTH", "demarreTN", "demarreTR", "demarreTRs", "demarreTX", "demarreTY", "demarreXML", "demarrealign", "demarrealigneadroite", "demarrealigneagauche", "demarrealigneaumilieu", "demarrealignment", "demarreallmodes", "demarreappendices", "demarrearrangedpages", "demarrearriereplan", "demarreaside", "demarreattachment", "demarrebackmatter", "demarrebar", "demarrebbordermatrix", "demarrebitmapimage", "demarreblockquote", "demarrebodymatter", "demarrebordermatrix", "demarreboxedcolumns", "demarrebtxlabeltext", "demarrebtxrenderingdefinitions", "demarrebuffer", "demarrecases", "demarrecatcodetable", "demarrecenteraligned", "demarrechapter", "demarrecharacteralign", "demarrecheckedfences", "demarrechemical", "demarrechemicaltext", "demarreciter", "demarrecollect", "demarrecollecting", "demarrecolorintent", "demarrecoloronly", "demarrecolorset", "demarrecolumns", "demarrecolumnset", "demarrecolumnsetspan", "demarrecombination", "demarrecomment", "demarrecomposant", "demarrecontextcode", "demarrecontextdefinitioncode", "demarrecouleur", "demarrectxfunction", "demarrectxfunctiondefinition", "demarrecurrentcolor", "demarrecurrentlistentrywrapper", "demarredelimited", "demarredelimitedtext", "demarredisplaymath", "demarredmath", "demarredocument", "demarreeffect", "demarreelement", "demarreembeddedxtable", "demarreendnote", "demarreendofline", "demarreenvironement", "demarreexceptions", "demarreexpanded", "demarreexpandedcollect", "demarreextendedcatcodetable", "demarreexternalfigurecollection", "demarrefacingfloat", "demarrefact", "demarrefigure", "demarrefiguretext", "demarrefittingpage", "demarrefixed", "demarrefloatcombination", "demarrefont", "demarrefontclass", "demarrefontsolution", "demarrefootnote", "demarreformula", "demarreformulas", "demarreframed", "demarreframedcell", "demarreframedcontent", "demarreframedrow", "demarreframedtable", "demarreframedtext", "demarrefrontmatter", "demarregraphictext", "demarregridsnapping", "demarregroupe", "demarrehanging", "demarrehbox", "demarrehboxestohbox", "demarrehboxregister", "demarreheadtext", "demarrehelptext", "demarrehiding", "demarrehighlight", "demarrehyphenation", "demarreimath", "demarreindentation", "demarreindentedtext", "demarreinteraction", "demarreinterface", "demarreintermezzotext", "demarreintertext", "demarreitemgroup", "demarreitemgroupcolumns", "demarreitemize", "demarreknockout", "demarrelabeltext", "demarrelangue", "demarrelayout", "demarrelegend", "demarreligne", "demarreligneregleetexte", "demarrelinealignment", "demarrelinecorrection", "demarrelinefiller", "demarrelinenumbering", "demarrelines", "demarrelinetable", "demarrelinetablebody", "demarrelinetablecell", "demarrelinetablehead", "demarrelocalfootnotes", "demarrelocalheadsetup", "demarrelocallinecorrection", "demarrelocalnotes", "demarrelocalsetups", "demarrelua", "demarreluacode", "demarreluaparameterset", "demarreluasetups", "demarremakeup", "demarremargereglee", "demarremarginblock", "demarremarkedcontent", "demarremarkpages", "demarremathalignment", "demarremathcases", "demarremathlabeltext", "demarremathmatrix", "demarremathmode", "demarremathstyle", "demarrematrices", "demarrematrix", "demarremaxaligned", "demarremdformula", "demarremenuinteraction", "demarremiddlealigned", "demarremiddlemakeup", "demarremixedcolumns", "demarremode", "demarremodeset", "demarremodule", "demarremoduletestsection", "demarrempformula", "demarrenamedsection", "demarrenamedsubformulas", "demarrenarrow", "demarrenarrower", "demarrenegative", "demarrenicelyfilledbox", "demarrenointerference", "demarrenotallmodes", "demarrenotext", "demarrenotmode", "demarreoperatortext", "demarreopposite", "demarreoutputstream", "demarreoverlay", "demarreoverprint", "demarrepagecolumns", "demarrepagecomment", "demarrepagefigure", "demarrepagelayout", "demarrepagemakeup", "demarrepar", "demarreparagraph", "demarreparagraphs", "demarreparagraphscell", "demarreparbuilder", "demarrepart", "demarrepath", "demarreplacechemical", "demarreplacefigure", "demarreplaceflottant", "demarreplaceformule", "demarreplacegraphic", "demarreplaceintermezzo", "demarreplacelegend", "demarreplacepairedbox", "demarreplacetable", "demarrepositioning", "demarrepositionoverlay", "demarrepositive", "demarrepostponing", "demarrepostponingnotes", "demarreprefixtext", "demarreprocessassignmentcommand", "demarreprocessassignmentlist", "demarreprocesscommacommand", "demarreprocesscommalist", "demarreproduit", "demarreprojet", "demarreprotect", "demarreprotectedcolors", "demarrepublication", "demarrepunctuation", "demarrequotation", "demarrequote", "demarrerandomized", "demarrerandomseed", "demarrerawsetups", "demarrereadingfile", "demarrereferenceprefix", "demarreregime", "demarrereusableMPgraphic", "demarreruby", "demarrescript", "demarresdformula", "demarresection", "demarresectionblock", "demarresectionblockenvironment", "demarresectionlevel", "demarresetups", "demarreshapebox", "demarreshift", "demarresidebar", "demarresimplecolumns", "demarrespecialitem", "demarrespeech", "demarrespformula", "demarresplitformula", "demarresplittext", "demarrespread", "demarrestandardmakeup", "demarrestaticMPfigure", "demarrestaticMPgraphic", "demarrestrictinspectnextcharacter", "demarrestrut", "demarrestyle", "demarresubformulas", "demarresubject", "demarresubjectlevel", "demarresubsection", "demarresubsentence", "demarresubstack", "demarresubsubject", "demarresubsubsection", "demarresubsubsubject", "demarresubsubsubsection", "demarresubsubsubsubject", "demarresubsubsubsubsection", "demarresubsubsubsubsubject", "demarresuffixtext", "demarresymbolset", "demarretable", "demarretablehead", "demarretables", "demarretabletail", "demarretabletext", "demarretabulate", "demarretabulatehead", "demarretabulatetail", "demarretagged", "demarretaglabeltext", "demarretete", "demarretexcode", "demarretexdefinition", "demarretext", "demarretextbackground", "demarretextbackgroundmanual", "demarretextcolor", "demarretextcolorintent", "demarretextflow", "demarretextmakeup", "demarretitle", "demarretokenlist", "demarretokens", "demarretransparent", "demarretypescript", "demarretypescriptcollection", "demarretyping", "demarreuniqueMPgraphic", "demarreuniqueMPpagegraphic", "demarreunittext", "demarreunpacked", "demarreusableMPgraphic", "demarreuseMPgraphic", "demarreusemathstyleparameter", "demarreuserdata", "demarreusingbtxspecification", "demarreva", "demarrevbox", "demarrevboxregister", "demarrevboxtohbox", "demarrevboxtohboxseparator", "demarreviewerlayer", "demarrevtop", "demarrevtopregister", "demarrexcell", "demarrexcellgroup", "demarrexcolumn", "demarrexgroup", "demarrexmldisplayverbatim", "demarrexmlinlineverbatim", "demarrexmlraw", "demarrexmlsetups", "demarrexrow", "demarrexrowgroup", "demarrextable", "demarrextablebody", "demarrextablefoot", "demarrextablehead", "demarrextablenext", "determinecaracteristiqueliste", "determinecaracteristiquesregistre", "determinenumerotete", "echelle", "ecran", "ecritdansliste", "ecritentreliste", "element", "elements", "environement", "espace", "espacefixe", "espacesfixes", "etire", "faitreference", "fichierdactylo", "figureexterne", "gardeblocs", "grille", "haut", "inconnu", "installelangue", "joursemaine", "langue", "langueprincipale", "largeurligne", "ligneh", "lignenoire", "ligneregleetexte", "lignesnoires", "llongueurliste", "marquage", "marquepage", "mathematique", "menuinteraction", "mois", "montrecadre", "montrecouleur", "montredisposition", "montreedition", "montreenvironnementpolicecorps", "montregrille", "montregroupecouleur", "montrejeusymboles", "montremakeup", "montrepalette", "montrepolicecorps", "montrereglages", "montrestruts", "motdroit", "numeroformule", "numeropage", "numeros", "numerotete", "numerotetecourant", "obtientmarquage", "oriente", "periodes", "pilechamp", "placecoteacote", "placeflottant", "placeformule", "placelesunsaudessusdesautres", "placeliste", "placelisteinmbriquee", "placemarquespages", "placenotespdp", "placenotespdplocales", "placenumeropage", "placenumerotete", "placeregistre", "placesousformule", "placesurgrille", "placetextetete", "prendbuffer", "produit", "programme", "projet", "qqpart", "razmarquage", "referencepage", "referencetexte", "reflete", "reglealignement", "reglearrangement", "reglearriereplan", "reglearriereplans", "reglebarreinteraction", "reglebloc", "regleblocsection", "reglebuffer", "reglecapitales", "reglechamp", "reglechamps", "regleclipping", "reglecolonnes", "reglecommentaire", "reglecommentairepage", "reglecompoetroite", "reglecomposeenalinea", "reglecouleur", "reglecouleurs", "regledactylo", "regledemarrestoppe", "regledisposition", "regleecraninteraction", "regleelements", "regleencadre", "regleentete", "regleenumerations", "regleepaisseurligne", "regleespaceblanc", "regleespacement", "regleespacementinterligne", "regleflottant", "regleflottants", "regleformulaires", "regleformules", "reglegroupeselements", "regleinf", "regleinteraction", "regleintitule", "regleintitules", "reglejeucolonne", "reglejeusymboles", "reglelangue", "reglelignes", "reglelignesnoires", "reglelignesreglestexte", "regleliste", "reglelisteimbriquee", "reglemakeup", "reglemargereglee", "reglemarquage", "reglemarquagehyphenation", "reglemenuinteraction", "reglenotepdp", "reglenumeropage", "reglenumerotationligne", "reglenumerotationpage", "reglenumerotationparagraphe", "reglenumerotete", "regleoriente", "reglepalette", "reglepapier", "regleparagraphes", "reglepdp", "regleplacementopposition", "reglepolicecorps", "reglepositionnement", "regleprogrammes", "reglereferencage", "regleregistre", "regleremplitligne", "regleremplitlignesreglees", "regleseparationflottant", "reglesousnumeropage", "reglesup", "reglesynonymes", "regletableaux", "regletabulation", "regletaillepapier", "regletete", "regletetes", "regletexte", "regletextesentete", "regletextesinf", "regletextespdp", "regletextessup", "regletextestexte", "regletolerance", "regletraitsfins", "regletransitionspage", "regletri", "regletype", "regleurl", "remplitligne", "remplitlignesreglees", "remplittexte", "sansespace", "sanslignesenteteetpdp", "sanslignessupetinf", "selectionneblocs", "separeflottant", "settext", "sousnumeropage", "stoppeJScode", "stoppeJSpreamble", "stoppeLUA", "stoppeMP", "stoppeMPclip", "stoppeMPcode", "stoppeMPdefinitions", "stoppeMPdrawing", "stoppeMPenvironment", "stoppeMPextensions", "stoppeMPinclusions", "stoppeMPinitializations", "stoppeMPpage", "stoppeMPpositiongraphic", "stoppeMPpositionmethod", "stoppeMPrun", "stoppePARSEDXML", "stoppeTABLE", "stoppeTABLEbody", "stoppeTABLEfoot", "stoppeTABLEhead", "stoppeTABLEnext", "stoppeTC", "stoppeTD", "stoppeTDs", "stoppeTEX", "stoppeTEXpage", "stoppeTH", "stoppeTN", "stoppeTR", "stoppeTRs", "stoppeTX", "stoppeTY", "stoppeXML", "stoppealign", "stoppealigneadroite", "stoppealigneagauche", "stoppealigneaumilieu", "stoppealignment", "stoppeallmodes", "stoppeappendices", "stoppearrangedpages", "stoppearriereplan", "stoppeaside", "stoppeattachment", "stoppebackmatter", "stoppebar", "stoppebbordermatrix", "stoppebitmapimage", "stoppeblockquote", "stoppebodymatter", "stoppebordermatrix", "stoppeboxedcolumns", "stoppebtxlabeltext", "stoppebtxrenderingdefinitions", "stoppebuffer", "stoppecases", "stoppecatcodetable", "stoppecenteraligned", "stoppechapter", "stoppecharacteralign", "stoppecheckedfences", "stoppechemical", "stoppechemicaltext", "stoppecollect", "stoppecollecting", "stoppecolorintent", "stoppecoloronly", "stoppecolorset", "stoppecolumns", "stoppecolumnset", "stoppecolumnsetspan", "stoppecombination", "stoppecomment", "stoppecomposant", "stoppecontextcode", "stoppecontextdefinitioncode", "stoppecouleur", "stoppectxfunction", "stoppectxfunctiondefinition", "stoppecurrentcolor", "stoppecurrentlistentrywrapper", "stoppedelimited", "stoppedelimitedtext", "stoppedisplaymath", "stoppedmath", "stoppedocument", "stoppeeffect", "stoppeelement", "stoppeembeddedxtable", "stoppeendnote", "stoppeendofline", "stoppeenvironement", "stoppeexceptions", "stoppeexpanded", "stoppeexpandedcollect", "stoppeextendedcatcodetable", "stoppeexternalfigurecollection", "stoppefacingfloat", "stoppefact", "stoppefigure", "stoppefiguretext", "stoppefittingpage", "stoppefixed", "stoppefloatcombination", "stoppefont", "stoppefontclass", "stoppefontsolution", "stoppefootnote", "stoppeformula", "stoppeformulas", "stoppeframed", "stoppeframedcell", "stoppeframedcontent", "stoppeframedrow", "stoppeframedtable", "stoppeframedtext", "stoppefrontmatter", "stoppegraphictext", "stoppegridsnapping", "stoppegroupe", "stoppehanging", "stoppehbox", "stoppehboxestohbox", "stoppehboxregister", "stoppeheadtext", "stoppehelptext", "stoppehiding", "stoppehighlight", "stoppehyphenation", "stoppeimath", "stoppeindentation", "stoppeindentedtext", "stoppeinteraction", "stoppeinterface", "stoppeintermezzotext", "stoppeintertext", "stoppeitemgroup", "stoppeitemgroupcolumns", "stoppeitemize", "stoppeknockout", "stoppelabeltext", "stoppelangue", "stoppelayout", "stoppelegend", "stoppeligne", "stoppeligneregleetexte", "stoppelinealignment", "stoppelinecorrection", "stoppelinefiller", "stoppelinenumbering", "stoppelines", "stoppelinetable", "stoppelinetablebody", "stoppelinetablecell", "stoppelinetablehead", "stoppelocalfootnotes", "stoppelocalheadsetup", "stoppelocallinecorrection", "stoppelocalnotes", "stoppelocalsetups", "stoppelua", "stoppeluacode", "stoppeluaparameterset", "stoppeluasetups", "stoppemakeup", "stoppemargereglee", "stoppemarginblock", "stoppemarkedcontent", "stoppemarkpages", "stoppemathalignment", "stoppemathcases", "stoppemathlabeltext", "stoppemathmatrix", "stoppemathmode", "stoppemathstyle", "stoppematrices", "stoppematrix", "stoppemaxaligned", "stoppemdformula", "stoppemenuinteraction", "stoppemiddlealigned", "stoppemiddlemakeup", "stoppemixedcolumns", "stoppemode", "stoppemodeset", "stoppemodule", "stoppemoduletestsection", "stoppempformula", "stoppenamedsection", "stoppenamedsubformulas", "stoppenarrow", "stoppenarrower", "stoppenegative", "stoppenicelyfilledbox", "stoppenointerference", "stoppenotallmodes", "stoppenotext", "stoppenotmode", "stoppeoperatortext", "stoppeopposite", "stoppeoutputstream", "stoppeoverlay", "stoppeoverprint", "stoppepagecolumns", "stoppepagecomment", "stoppepagefigure", "stoppepagelayout", "stoppepagemakeup", "stoppepar", "stoppeparagraph", "stoppeparagraphs", "stoppeparagraphscell", "stoppeparbuilder", "stoppepart", "stoppepath", "stoppeplacechemical", "stoppeplacefigure", "stoppeplaceflottant", "stoppeplaceformule", "stoppeplacegraphic", "stoppeplaceintermezzo", "stoppeplacelegend", "stoppeplacepairedbox", "stoppeplacetable", "stoppepositioning", "stoppepositionoverlay", "stoppepositive", "stoppepostponing", "stoppepostponingnotes", "stoppeprefixtext", "stoppeprocessassignmentcommand", "stoppeprocessassignmentlist", "stoppeprocesscommacommand", "stoppeprocesscommalist", "stoppeproduit", "stoppeprojet", "stoppeprotect", "stoppeprotectedcolors", "stoppepublication", "stoppepunctuation", "stoppequotation", "stoppequote", "stopperandomized", "stopperandomseed", "stopperawsetups", "stoppereadingfile", "stoppereferenceprefix", "stopperegime", "stoppereusableMPgraphic", "stopperuby", "stoppescript", "stoppesdformula", "stoppesection", "stoppesectionblock", "stoppesectionblockenvironment", "stoppesectionlevel", "stoppesetups", "stoppeshapebox", "stoppeshift", "stoppesidebar", "stoppesimplecolumns", "stoppespecialitem", "stoppespeech", "stoppespformula", "stoppesplitformula", "stoppesplittext", "stoppespread", "stoppestandardmakeup", "stoppestaticMPfigure", "stoppestaticMPgraphic", "stoppestrictinspectnextcharacter", "stoppestrut", "stoppestyle", "stoppesubformulas", "stoppesubject", "stoppesubjectlevel", "stoppesubsection", "stoppesubsentence", "stoppesubstack", "stoppesubsubject", "stoppesubsubsection", "stoppesubsubsubject", "stoppesubsubsubsection", "stoppesubsubsubsubject", "stoppesubsubsubsubsection", "stoppesubsubsubsubsubject", "stoppesuffixtext", "stoppesymbolset", "stoppetable", "stoppetablehead", "stoppetables", "stoppetabletail", "stoppetabletext", "stoppetabulate", "stoppetabulatehead", "stoppetabulatetail", "stoppetagged", "stoppetaglabeltext", "stoppetete", "stoppetexcode", "stoppetexdefinition", "stoppetext", "stoppetextbackground", "stoppetextbackgroundmanual", "stoppetextcolor", "stoppetextcolorintent", "stoppetextflow", "stoppetextmakeup", "stoppetitle", "stoppetokenlist", "stoppetokens", "stoppetransparent", "stoppetypescript", "stoppetypescriptcollection", "stoppetyping", "stoppeuniqueMPgraphic", "stoppeuniqueMPpagegraphic", "stoppeunittext", "stoppeunpacked", "stoppeusableMPgraphic", "stoppeuseMPgraphic", "stoppeusemathstyleparameter", "stoppeuserdata", "stoppeusingbtxspecification", "stoppeva", "stoppevbox", "stoppevboxregister", "stoppevboxtohbox", "stoppevboxtohboxseparator", "stoppeviewerlayer", "stoppevtop", "stoppevtopregister", "stoppexcell", "stoppexcellgroup", "stoppexcolumn", "stoppexgroup", "stoppexmldisplayverbatim", "stoppexmlinlineverbatim", "stoppexmlraw", "stoppexmlsetups", "stoppexrow", "stoppexrowgroup", "stoppextable", "stoppextablebody", "stoppextablefoot", "stoppextablehead", "stoppextablenext", "symbole", "tapebuffer", "textenotepdp", "traduire", "traiteblocs", "traitfin", "traitsfins", "uneligne", "utiliseJSscripts", "utiliseURL", "utiliseblocs", "utilisechemin", "utilisedocumentexterne", "utilisefigureexterne", "utilisemodule", "utilisepsiteaudioexterne", "utilisesymboles", "utiliseurl", "va", "vaalaboite", "vaalapage", "vaenbas", "valeurcouleur", "vide" },
- ["it"]={ "GIORNOSETTIMANA", "Lettera", "Lettere", "MESE", "Numeri", "Numeriromani", "PAROLA", "PAROLE", "Parola", "Parole", "adattacampo", "adattalayout", "al", "allineacentro", "allineadestra", "allineasinistra", "ambiente", "ap", "apagina", "barracolori", "barrainterazione", "cambiaafontdeltesto", "campi", "capello", "chim", "circondato", "clonacampo", "colonna", "colore", "coloregrigio", "commento", "componenet", "confrontagruppocolori", "confrontatavolozza", "convertinumero", "copiacampo", "correggispaziobianco", "da", "daqualcheparte", "data", "datadioggi", "definisci", "definisciaccento", "definisciambientefontdeltesto", "definisciblocco", "definiscibloccosezione", "definiscibuffer", "definiscicampo", "definiscicapoversi", "definiscicarattere", "definiscicolore", "definiscicomando", "definisciconversione", "definiscidescrizione", "definiscidimensionicarta", "definiscielenco", "definiscielencocombinato", "definiscienumerazione", "definiscietichetta", "definiscifigurasimbolo", "definiscifont", "definiscifontdeltesto", "definisciformatoriferimento", "definiscigruppocolonne", "definiscigruppocolori", "definiscihbox", "definisciincorniciato", "definisciiniziatermina", "definiscilayout", "definiscimakeup", "definiscimarcatura", "definiscimenuinterazione", "definiscimodellotabella", "definiscioggettomobile", "definisciordinamento", "definisciprofilo", "definisciprogramma", "definisciregistro", "definisciriferimento", "definiscisezione", "definiscisimbolo", "definiscisinonimi", "definiscisinonimofont", "definiscisottocampo", "definiscisovrapposizione", "definiscistackcampi", "definiscistile", "definiscistilefont", "definiscitabulato", "definiscitavolozza", "definiscitesta", "definiscitesto", "definiscitestoincorniciato", "definiscitype", "definiscityping", "determinacaratteristicheregistro", "determinacarattersticheelenco", "determinanumerotesta", "elaborablocchi", "elementi", "elemento", "figuraesterna", "giornosettimana", "griglia", "ignoto", "impostaallineamento", "impostaampiezzariga", "impostabarrainterazione", "impostablocco", "impostabloccosezione", "impostabuffer", "impostacampi", "impostacampo", "impostacapoversi", "impostacaption", "impostacaptions", "impostacima", "impostaclippling", "impostacolonne", "impostacolore", "impostacolori", "impostacommento", "impostacommentopagina", "impostadimensionicarta", "impostaelementi", "impostaelencazioni", "impostaelenco", "impostaelencocombinato", "impostaenumerazioni", "impostafondo", "impostafontdeltesto", "impostaforms", "impostaformule", "impostagruppocolonne", "impostaincorniciato", "impostainiziatermina", "impostainstestazione", "impostainterazione", "impostainterlinea", "impostalayout", "impostalineemargine", "impostalineenere", "impostalineeriempimento", "impostalineesottili", "impostalineetesto", "impostalingua", "impostamaiuscole", "impostamakeup", "impostamarcatura", "impostamenuinterazione", "impostamenzione", "impostanotepdp", "impostanumerazionecapoversi", "impostanumerazionepagina", "impostanumerazionerighe", "impostanumeropagina", "impostanumerosottopagina", "impostanumerotesta", "impostaoggettimobili", "impostaoggettomobile", "impostaordinamento", "impostaparranging", "impostapdp", "impostapiustretto", "impostaposizionamento", "impostaposizionamentoopposti", "impostaprogrammi", "impostaregistro", "impostarientro", "impostariferimento", "impostarighe", "impostarigheriempimento", "impostarigovuoto", "impostarotazione", "impostaschermointerazione", "impostasegnosillabazione", "impostasetsimboli", "impostasfondi", "impostasfondo", "impostasinonimi", "impostaspaziatura", "impostaspaziobianco", "impostaspezzamentooggettomobile", "impostatabelle", "impostatabulato", "impostatavolozza", "impostatesta", "impostateste", "impostatesticima", "impostatestifondo", "impostatestiincorniciati", "impostatestiintestazioni", "impostatestipdp", "impostatesto", "impostatestotesti", "impostatolleranza", "impostatransizionepagina", "impostatype", "impostatyping", "impostaurl", "incorniciato", "iniziaJScode", "iniziaJSpreamble", "iniziaLUA", "iniziaMP", "iniziaMPclip", "iniziaMPcode", "iniziaMPdefinitions", "iniziaMPdrawing", "iniziaMPenvironment", "iniziaMPextensions", "iniziaMPinclusions", "iniziaMPinitializations", "iniziaMPpage", "iniziaMPpositiongraphic", "iniziaMPpositionmethod", "iniziaMPrun", "iniziaPARSEDXML", "iniziaTABLE", "iniziaTABLEbody", "iniziaTABLEfoot", "iniziaTABLEhead", "iniziaTABLEnext", "iniziaTC", "iniziaTD", "iniziaTDs", "iniziaTEX", "iniziaTEXpage", "iniziaTH", "iniziaTN", "iniziaTR", "iniziaTRs", "iniziaTX", "iniziaTY", "iniziaXML", "iniziaalign", "iniziaalignment", "iniziaallineacentro", "iniziaallineadestra", "iniziaallineasinistra", "iniziaallmodes", "iniziaambiente", "iniziaappendices", "iniziaarrangedpages", "iniziaaside", "iniziaattachment", "iniziabackmatter", "iniziabar", "iniziabbordermatrix", "iniziabitmapimage", "iniziablockquote", "iniziabodymatter", "iniziabordermatrix", "iniziaboxedcolumns", "iniziabtxlabeltext", "iniziabtxrenderingdefinitions", "iniziabuffer", "iniziacases", "iniziacatcodetable", "iniziacenteraligned", "iniziachapter", "iniziacharacteralign", "iniziacheckedfences", "iniziachemical", "iniziachemicaltext", "iniziacollect", "iniziacollecting", "iniziacolore", "iniziacolorintent", "iniziacoloronly", "iniziacolorset", "iniziacolumns", "iniziacolumnset", "iniziacolumnsetspan", "iniziacombination", "iniziacomment", "iniziacomponenet", "iniziacontextcode", "iniziacontextdefinitioncode", "iniziactxfunction", "iniziactxfunctiondefinition", "iniziacurrentcolor", "iniziacurrentlistentrywrapper", "iniziadelimited", "iniziadelimitedtext", "iniziadisplaymath", "iniziadmath", "iniziadocument", "iniziaeffect", "iniziaelement", "iniziaelemento", "iniziaembeddedxtable", "iniziaendnote", "iniziaendofline", "iniziaexceptions", "iniziaexpanded", "iniziaexpandedcollect", "iniziaextendedcatcodetable", "iniziaexternalfigurecollection", "iniziafacingfloat", "iniziafact", "iniziafigure", "iniziafiguretext", "iniziafittingpage", "iniziafixed", "iniziafloatcombination", "iniziafont", "iniziafontclass", "iniziafontsolution", "iniziafootnote", "iniziaformula", "iniziaformulas", "iniziaframedcell", "iniziaframedcontent", "iniziaframedrow", "iniziaframedtable", "iniziaframedtext", "iniziafrontmatter", "iniziagraphictext", "iniziagridsnapping", "iniziahanging", "iniziahbox", "iniziahboxestohbox", "iniziahboxregister", "iniziaheadtext", "iniziahelptext", "iniziahiding", "iniziahighlight", "iniziahyphenation", "iniziaimath", "iniziaimpaccato", "iniziaincorniciato", "iniziaindentation", "iniziaindentedtext", "iniziainteraction", "iniziainterface", "iniziaintermezzotext", "iniziaintertext", "iniziaitemgroup", "iniziaitemgroupcolumns", "iniziaitemize", "iniziaknockout", "inizialabeltext", "inizialayout", "inizialegend", "inizialinealignment", "inizialineamargine", "inizialineatesto", "inizialinecorrection", "inizialinefiller", "inizialinenumbering", "inizialines", "inizialinetable", "inizialinetablebody", "inizialinetablecell", "inizialinetablehead", "inizialingua", "inizialocalfootnotes", "inizialocalheadsetup", "inizialocallinecorrection", "inizialocalnotes", "inizialocalsetups", "inizialua", "inizialuacode", "inizialuaparameterset", "inizialuasetups", "iniziamakeup", "iniziamarginblock", "iniziamarkedcontent", "iniziamarkpages", "iniziamathalignment", "iniziamathcases", "iniziamathlabeltext", "iniziamathmatrix", "iniziamathmode", "iniziamathstyle", "iniziamatrices", "iniziamatrix", "iniziamaxaligned", "iniziamdformula", "iniziamenuinterattivo", "iniziamettiformula", "iniziamiddlealigned", "iniziamiddlemakeup", "iniziamixedcolumns", "iniziamode", "iniziamodeset", "iniziamodule", "iniziamoduletestsection", "iniziampformula", "inizianamedsection", "inizianamedsubformulas", "inizianarrow", "inizianarrower", "inizianegative", "inizianicelyfilledbox", "inizianointerference", "inizianotallmodes", "inizianotext", "inizianotmode", "iniziaoperatortext", "iniziaopposite", "iniziaoutputstream", "iniziaoverlay", "iniziaoverprint", "iniziapagecolumns", "iniziapagecomment", "iniziapagefigure", "iniziapagelayout", "iniziapagemakeup", "iniziapar", "iniziaparagraph", "iniziaparagraphs", "iniziaparagraphscell", "iniziaparbuilder", "iniziapart", "iniziapath", "iniziaplacechemical", "iniziaplacefigure", "iniziaplacefloat", "iniziaplacegraphic", "iniziaplaceintermezzo", "iniziaplacelegend", "iniziaplacepairedbox", "iniziaplacetable", "iniziapositioning", "iniziapositionoverlay", "iniziapositive", "iniziapostponing", "iniziapostponingnotes", "iniziaprefixtext", "iniziaprocessassignmentcommand", "iniziaprocessassignmentlist", "iniziaprocesscommacommand", "iniziaprocesscommalist", "iniziaprodotto", "iniziaprogetto", "iniziaprotect", "iniziaprotectedcolors", "iniziapubblicazione", "iniziapunctuation", "iniziaquotation", "iniziaquote", "iniziarandomized", "iniziarandomseed", "iniziarawsetups", "iniziareadingfile", "iniziareferenceprefix", "iniziaregime", "iniziareusableMPgraphic", "iniziariga", "iniziaruby", "iniziascript", "iniziasdformula", "iniziasection", "iniziasectionblock", "iniziasectionblockenvironment", "iniziasectionlevel", "iniziasetups", "iniziasfondo", "iniziashapebox", "iniziashift", "iniziasidebar", "iniziasimplecolumns", "iniziaspecialitem", "iniziaspeech", "iniziaspformula", "iniziasplitformula", "iniziasplittext", "iniziaspread", "iniziastandardmakeup", "iniziastaticMPfigure", "iniziastaticMPgraphic", "iniziastrictinspectnextcharacter", "iniziastrut", "iniziastyle", "iniziasubformulas", "iniziasubject", "iniziasubjectlevel", "iniziasubsection", "iniziasubsentence", "iniziasubstack", "iniziasubsubject", "iniziasubsubsection", "iniziasubsubsubject", "iniziasubsubsubsection", "iniziasubsubsubsubject", "iniziasubsubsubsubsection", "iniziasubsubsubsubsubject", "iniziasuffixtext", "iniziasymbolset", "iniziatable", "iniziatablehead", "iniziatables", "iniziatabletail", "iniziatabletext", "iniziatabulate", "iniziatabulatehead", "iniziatabulatetail", "iniziatagged", "iniziataglabeltext", "iniziatesta", "iniziatexcode", "iniziatexdefinition", "iniziatext", "iniziatextbackground", "iniziatextbackgroundmanual", "iniziatextcolor", "iniziatextcolorintent", "iniziatextflow", "iniziatextmakeup", "iniziatitle", "iniziatokenlist", "iniziatokens", "iniziatransparent", "iniziatypescript", "iniziatypescriptcollection", "iniziatyping", "iniziauniqueMPgraphic", "iniziauniqueMPpagegraphic", "iniziaunittext", "iniziaunpacked", "iniziausableMPgraphic", "iniziauseMPgraphic", "iniziausemathstyleparameter", "iniziauserdata", "iniziausingbtxspecification", "iniziavaia", "iniziavbox", "iniziavboxregister", "iniziavboxtohbox", "iniziavboxtohboxseparator", "iniziaviewerlayer", "iniziavtop", "iniziavtopregister", "iniziaxcell", "iniziaxcellgroup", "iniziaxcolumn", "iniziaxgroup", "iniziaxmldisplayverbatim", "iniziaxmlinlineverbatim", "iniziaxmlraw", "iniziaxmlsetups", "iniziaxrow", "iniziaxrowgroup", "iniziaxtable", "iniziaxtablebody", "iniziaxtablefoot", "iniziaxtablehead", "iniziaxtablenext", "inriga", "installalingua", "intorno", "lettera", "lettere", "lineanera", "lineasottile", "lineatesto", "lineenere", "lineeriempimento", "lineesottili", "lingua", "linguaprincipale", "lunghezzaelenco", "marcatura", "matematica", "menuinterattivo", "mese", "mettielenco", "mettielencocombinato", "mettifiancoafianco", "mettiformula", "mettiingriglia", "mettinotepdp", "mettinotepdplocali", "mettinumeropagina", "mettiregistro", "mettisegnalibro", "mettisottoformula", "mettiunosullaltro", "mostraambientefontdeltesto", "mostracolore", "mostracornice", "mostrafontdeltesto", "mostragriglia", "mostragruppocolori", "mostraimpostazioni", "mostralyout", "mostramakeup", "mostrasetsimboli", "mostrastampa", "mostrastruts", "mostratavolozza", "nascondiblocchi", "nientelineecimafondo", "nientelineintestazionepdp", "nientespazio", "nota", "numeri", "numeriromani", "numeroformula", "numeropagina", "numeropaginacompleto", "numerotesta", "numerotestacorrente", "pagina", "paroladestra", "ped", "pedap", "perlungo", "posizionanumerotesta", "posizionatestotesta", "posizione", "prendibuffer", "prendimarcatura", "prodotto", "progetto", "programma", "pulsante", "pulsantemenu", "pulsantinterazione", "punti", "qualcheriga", "reimpostamarcatura", "rif", "riferimento", "riferimentopagina", "riferimentotesto", "riflessione", "rigariempimento", "rigovuoto", "ruota", "scala", "schermo", "scrividentroelenco", "scriviinelenco", "segnalibro", "selezionablocchi", "settext", "sfondo", "simbolo", "spazifissi", "spazio", "spaziofisso", "spessoreriga", "spezzaoggettomobile", "stackcampi", "stirato", "terminaJScode", "terminaJSpreamble", "terminaLUA", "terminaMP", "terminaMPclip", "terminaMPcode", "terminaMPdefinitions", "terminaMPdrawing", "terminaMPenvironment", "terminaMPextensions", "terminaMPinclusions", "terminaMPinitializations", "terminaMPpage", "terminaMPpositiongraphic", "terminaMPpositionmethod", "terminaMPrun", "terminaPARSEDXML", "terminaTABLE", "terminaTABLEbody", "terminaTABLEfoot", "terminaTABLEhead", "terminaTABLEnext", "terminaTC", "terminaTD", "terminaTDs", "terminaTEX", "terminaTEXpage", "terminaTH", "terminaTN", "terminaTR", "terminaTRs", "terminaTX", "terminaTY", "terminaXML", "terminaalign", "terminaalignment", "terminaallineacentro", "terminaallineadestra", "terminaallineasinistra", "terminaallmodes", "terminaambiente", "terminaappendices", "terminaarrangedpages", "terminaaside", "terminaattachment", "terminabackmatter", "terminabar", "terminabbordermatrix", "terminabitmapimage", "terminablockquote", "terminabodymatter", "terminabordermatrix", "terminaboxedcolumns", "terminabtxlabeltext", "terminabtxrenderingdefinitions", "terminabuffer", "terminacases", "terminacatcodetable", "terminacenteraligned", "terminachapter", "terminacharacteralign", "terminacheckedfences", "terminachemical", "terminachemicaltext", "terminacollect", "terminacollecting", "terminacolore", "terminacolorintent", "terminacoloronly", "terminacolorset", "terminacolumns", "terminacolumnset", "terminacolumnsetspan", "terminacombination", "terminacomment", "terminacomponenet", "terminacontextcode", "terminacontextdefinitioncode", "terminactxfunction", "terminactxfunctiondefinition", "terminacurrentcolor", "terminacurrentlistentrywrapper", "terminadelimited", "terminadelimitedtext", "terminadisplaymath", "terminadmath", "terminadocument", "terminaeffect", "terminaelement", "terminaelemento", "terminaembeddedxtable", "terminaendnote", "terminaendofline", "terminaexceptions", "terminaexpanded", "terminaexpandedcollect", "terminaextendedcatcodetable", "terminaexternalfigurecollection", "terminafacingfloat", "terminafact", "terminafigure", "terminafiguretext", "terminafittingpage", "terminafixed", "terminafloatcombination", "terminafont", "terminafontclass", "terminafontsolution", "terminafootnote", "terminaformula", "terminaformulas", "terminaframedcell", "terminaframedcontent", "terminaframedrow", "terminaframedtable", "terminaframedtext", "terminafrontmatter", "terminagraphictext", "terminagridsnapping", "terminahanging", "terminahbox", "terminahboxestohbox", "terminahboxregister", "terminaheadtext", "terminahelptext", "terminahiding", "terminahighlight", "terminahyphenation", "terminaimath", "terminaimpaccato", "terminaincorniciato", "terminaindentation", "terminaindentedtext", "terminainteraction", "terminainterface", "terminaintermezzotext", "terminaintertext", "terminaitemgroup", "terminaitemgroupcolumns", "terminaitemize", "terminaknockout", "terminalabeltext", "terminalayout", "terminalegend", "terminalinealignment", "terminalineamargine", "terminalineatesto", "terminalinecorrection", "terminalinefiller", "terminalinenumbering", "terminalines", "terminalinetable", "terminalinetablebody", "terminalinetablecell", "terminalinetablehead", "terminalingua", "terminalocalfootnotes", "terminalocalheadsetup", "terminalocallinecorrection", "terminalocalnotes", "terminalocalsetups", "terminalua", "terminaluacode", "terminaluaparameterset", "terminaluasetups", "terminamakeup", "terminamarginblock", "terminamarkedcontent", "terminamarkpages", "terminamathalignment", "terminamathcases", "terminamathlabeltext", "terminamathmatrix", "terminamathmode", "terminamathstyle", "terminamatrices", "terminamatrix", "terminamaxaligned", "terminamdformula", "terminamenuinterattivo", "terminamettiformula", "terminamiddlealigned", "terminamiddlemakeup", "terminamixedcolumns", "terminamode", "terminamodeset", "terminamodule", "terminamoduletestsection", "terminampformula", "terminanamedsection", "terminanamedsubformulas", "terminanarrow", "terminanarrower", "terminanegative", "terminanicelyfilledbox", "terminanointerference", "terminanotallmodes", "terminanotext", "terminanotmode", "terminaoperatortext", "terminaopposite", "terminaoutputstream", "terminaoverlay", "terminaoverprint", "terminapagecolumns", "terminapagecomment", "terminapagefigure", "terminapagelayout", "terminapagemakeup", "terminapar", "terminaparagraph", "terminaparagraphs", "terminaparagraphscell", "terminaparbuilder", "terminapart", "terminapath", "terminaplacechemical", "terminaplacefigure", "terminaplacefloat", "terminaplacegraphic", "terminaplaceintermezzo", "terminaplacelegend", "terminaplacepairedbox", "terminaplacetable", "terminapositioning", "terminapositionoverlay", "terminapositive", "terminapostponing", "terminapostponingnotes", "terminaprefixtext", "terminaprocessassignmentcommand", "terminaprocessassignmentlist", "terminaprocesscommacommand", "terminaprocesscommalist", "terminaprodotto", "terminaprogetto", "terminaprotect", "terminaprotectedcolors", "terminapubblicazione", "terminapunctuation", "terminaquotation", "terminaquote", "terminarandomized", "terminarandomseed", "terminarawsetups", "terminareadingfile", "terminareferenceprefix", "terminaregime", "terminareusableMPgraphic", "terminariga", "terminaruby", "terminascript", "terminasdformula", "terminasection", "terminasectionblock", "terminasectionblockenvironment", "terminasectionlevel", "terminasetups", "terminasfondo", "terminashapebox", "terminashift", "terminasidebar", "terminasimplecolumns", "terminaspecialitem", "terminaspeech", "terminaspformula", "terminasplitformula", "terminasplittext", "terminaspread", "terminastandardmakeup", "terminastaticMPfigure", "terminastaticMPgraphic", "terminastrictinspectnextcharacter", "terminastrut", "terminastyle", "terminasubformulas", "terminasubject", "terminasubjectlevel", "terminasubsection", "terminasubsentence", "terminasubstack", "terminasubsubject", "terminasubsubsection", "terminasubsubsubject", "terminasubsubsubsection", "terminasubsubsubsubject", "terminasubsubsubsubsection", "terminasubsubsubsubsubject", "terminasuffixtext", "terminasymbolset", "terminatable", "terminatablehead", "terminatables", "terminatabletail", "terminatabletext", "terminatabulate", "terminatabulatehead", "terminatabulatetail", "terminatagged", "terminataglabeltext", "terminatesta", "terminatexcode", "terminatexdefinition", "terminatext", "terminatextbackground", "terminatextbackgroundmanual", "terminatextcolor", "terminatextcolorintent", "terminatextflow", "terminatextmakeup", "terminatitle", "terminatokenlist", "terminatokens", "terminatransparent", "terminatypescript", "terminatypescriptcollection", "terminatyping", "terminauniqueMPgraphic", "terminauniqueMPpagegraphic", "terminaunittext", "terminaunpacked", "terminausableMPgraphic", "terminauseMPgraphic", "terminausemathstyleparameter", "terminauserdata", "terminausingbtxspecification", "terminavaia", "terminavbox", "terminavboxregister", "terminavboxtohbox", "terminavboxtohboxseparator", "terminaviewerlayer", "terminavtop", "terminavtopregister", "terminaxcell", "terminaxcellgroup", "terminaxcolumn", "terminaxgroup", "terminaxmldisplayverbatim", "terminaxmlinlineverbatim", "terminaxmlraw", "terminaxmlsetups", "terminaxrow", "terminaxrowgroup", "terminaxtable", "terminaxtablebody", "terminaxtablefoot", "terminaxtablehead", "terminaxtablenext", "testonotapdp", "testoriempimento", "tieniblocchi", "traduci", "usaJSscripts", "usaURL", "usablocco", "usacartella", "usacolonnasonoraesterna", "usadocumentoesterno", "usafiguraesterna", "usamodulo", "usasimboli", "usaurl", "vaia", "vaiabox", "vaiapagina", "vaigiu", "valorecolore", "versione" },
- ["nl"]={ "Cijfers", "Kap", "Letter", "Letters", "MAAND", "Romeins", "WEEKDAG", "WOORD", "WOORDEN", "Woord", "Woorden", "achtergrond", "bepaalkopnummer", "bepaallijstkenmerken", "bepaalregisterkenmerken", "bewaarbuffer", "blanko", "blokje", "blokjes", "cijfers", "converteernummer", "copieerveld", "corrigeerwitruimte", "datum", "definieer", "definieeraccent", "definieeralineas", "definieerblok", "definieerbuffer", "definieercombinatie", "definieercommando", "definieerconversie", "definieerfiguursymbool", "definieerfont", "definieerfontstijl", "definieerfontsynoniem", "definieerhbox", "definieeringesprongentext", "definieerinteractiemenu", "definieeritemgroep", "definieerkadertekst", "definieerkarakter", "definieerkleur", "definieerkleurgroep", "definieerkolomgroep", "definieerkolomovergang", "definieerkop", "definieerkorps", "definieerkorpsomgeving", "definieerlayer", "definieerlayout", "definieerletter", "definieerlijst", "definieermarkering", "definieeromlijnd", "definieeropmaak", "definieeroverlay", "definieerpaginaovergang", "definieerpalet", "definieerpapierformaat", "definieerplaats", "definieerplaatsblok", "definieerprofiel", "definieerprogramma", "definieerreferentie", "definieerreferentieformaat", "definieerregister", "definieersamengesteldelijst", "definieersectie", "definieersectieblok", "definieersorteren", "definieerstartstop", "definieersubveld", "definieersymbool", "definieersynoniemen", "definieertabelvorm", "definieertabulatie", "definieertekst", "definieertekstachtergrond", "definieertype", "definieertypen", "definieerveld", "definieerveldstapel", "definieerwiskundeuitlijnen", "doordefinieren", "doorlabelen", "doornummeren", "dunnelijn", "dunnelijnen", "eenregel", "ergens", "externfiguur", "formulenummer", "gebruikJSscripts", "gebruikURL", "gebruikblokken", "gebruikexterndocument", "gebruikexternfiguur", "gebruikexterngeluidsfragment", "gebruikmodule", "gebruikpad", "gebruiksymbolen", "gebruiktypescript", "gebruiktypescriptfile", "gebruikurl", "geenbovenenonderregels", "geenhoofdenvoetregels", "geenspatie", "grijskleur", "haalbuffer", "haalmarkering", "haarlijn", "handhaafblokken", "hoofdtaal", "hoog", "huidigedatum", "huidigekopnummer", "inlijnd", "inregel", "installeertaal", "interactiebalk", "interactiebuttons", "interactiemenu", "invullijnen", "invulregel", "invultekst", "kleur", "kleurenbalk", "kleurwaarde", "kloonveld", "kolom", "kopnummer", "laag", "laho", "legeregels", "letter", "letters", "lijndikte", "lijstlengte", "maand", "markeer", "naar", "naarbox", "naarpagina", "nokap", "noot", "omgeving", "omlaag", "omlijnd", "onbekend", "onderdeel", "op", "oppagina", "pagina", "paginanummer", "paginareferentie", "paslayoutaan", "passendveld", "plaatsbookmarks", "plaatsformule", "plaatskopnummer", "plaatskoptekst", "plaatslijst", "plaatslijstmetsynoniemen", "plaatslokalevoetnoten", "plaatsnaastelkaar", "plaatsonderelkaar", "plaatsopgrid", "plaatspaginanummer", "plaatsplaatsblok", "plaatsregister", "plaatsruwelijst", "plaatssamengesteldelijst", "plaatssubformule", "plaatsvoetnoten", "positioneer", "produkt", "programma", "projekt", "punten", "refereer", "referentie", "regellinks", "regelmidden", "regelrechts", "resetmarkering", "romeins", "rooster", "roteer", "schaal", "scherm", "schrijfnaarlijst", "schrijftussenlijst", "selecteerblokken", "som", "spatie", "spiegel", "splitsplaatsblok", "startachtergrond", "startinteractiemenu", "startkantlijn", "startkleur", "startkop", "startlokalevoetnoten", "startmargeblok", "startnaar", "startomgeving", "startomlijnd", "startonderdeel", "startopelkaar", "startplaatsformule", "startplaatsplaatsblok", "startprodukt", "startprojekt", "startpublicatie", "startregel", "startregelcorrectie", "startregellinks", "startregelmidden", "startregelrechts", "startsom", "starttaal", "starttekstachtergrond", "starttekstlijn", "startuitlijnen", "stelachtergrondenin", "stelachtergrondin", "stelalineasin", "stelarrangerenin", "stelblankoin", "stelblokin", "stelblokjesin", "stelblokkopjein", "stelblokkopjesin", "stelbovenin", "stelboventekstenin", "stelbufferin", "stelciterenin", "stelclipin", "stelcommentaarin", "steldoordefinierenin", "steldoornummerenin", "steldunnelijnenin", "stelformulein", "stelformulesin", "stelformulierenin", "stelhoofdin", "stelhoofdtekstenin", "stelingesprongentextin", "stelinmargein", "stelinspringenin", "stelinteractiebalkin", "stelinteractiein", "stelinteractiemenuin", "stelinteractieschermin", "stelinterliniein", "stelinvullijnenin", "stelinvulregelsin", "stelitemgroepin", "stelitemsin", "stelkadertekstenin", "stelkadertekstin", "stelkantlijnin", "stelkapitalenin", "stelkleurenin", "stelkleurin", "stelkolomgroepin", "stelkolomgroepregelsin", "stelkolomgroepstartin", "stelkolommenin", "stelkopin", "stelkopnummerin", "stelkoppeltekenin", "stelkoppenin", "stelkorpsin", "stellayoutin", "stellijndiktein", "stellijstin", "stelmargeblokkenin", "stelmarkeringin", "stelnaastplaatsenin", "stelomlijndin", "stelonderin", "stelondertekstenin", "stelopmaakin", "stelopsommingenin", "stelpaginacommentaarin", "stelpaginanummerin", "stelpaginanummeringin", "stelpaginaovergangenin", "stelpaletin", "stelpapierformaatin", "stelpapierin", "stelparagraafnummerenin", "stelplaatsblokin", "stelplaatsblokkenin", "stelplaatsbloksplitsenin", "stelplaatsin", "stelpositionerenin", "stelprogrammasin", "stelrefererenin", "stelregelnummerenin", "stelregelsin", "stelregisterin", "stelroterenin", "stelsamengesteldelijstin", "stelsectieblokin", "stelsmallerin", "stelsorterenin", "stelspatieringin", "stelstartstopin", "stelsubpaginanummerin", "stelsymboolsetin", "stelsynoniemenin", "steltaalin", "steltabellenin", "steltabulatiein", "steltekstachtergrondin", "steltekstin", "steltekstinhoudin", "steltekstlijnenin", "stelteksttekstenin", "steltolerantiein", "steltypein", "steltypenin", "steluitlijnenin", "stelurlin", "stelveldenin", "stelveldin", "stelvoetin", "stelvoetnotenin", "stelvoettekstenin", "stelwiskundeuitlijnenin", "stelwitruimtein", "stopachtergrond", "stopinteractiemenu", "stopkantlijn", "stopkleur", "stopkop", "stoplokalevoetnoten", "stopmargeblok", "stopnaar", "stopomgeving", "stopomlijnd", "stoponderdeel", "stopopelkaar", "stopplaatsformule", "stopplaatsplaatsblok", "stopprodukt", "stopprojekt", "stoppublicatie", "stopregel", "stopregelcorrectie", "stopregellinks", "stopregelmidden", "stopregelrechts", "stopsom", "stoptaal", "stoptekstachtergrond", "stoptekstlijn", "stopuitlijnen", "subpaginanummer", "switchnaarkorps", "symbool", "taal", "tekstlijn", "tekstreferentie", "testkolom", "testpagina", "toelichting", "toongrid", "tooninstellingen", "toonkader", "toonkleur", "toonkleurgroep", "toonkorps", "toonkorpsomgeving", "toonlayout", "toonopmaak", "toonpalet", "toonprint", "toonstruts", "toonsymboolset", "uit", "uitgerekt", "vastespatie", "vastespaties", "veld", "veldstapel", "verbergblokken", "vergelijkkleurgroep", "vergelijkpalet", "versie", "vertaal", "verwerkblokken", "voetnoottekst", "volledigepaginanummer", "volledigregister", "voluit", "weekdag", "wiskunde", "woordrechts" },
- ["pe"]={ "آیتم", "آیتمها", "آینه", "از", "استÙاده‌بلوکها", "استÙاده‌دستخط‌تایپ", "استÙاده‌شکل‌خارجی", "استÙاده‌قطعه‌موزیک‌خارجی", "استÙاده‌مدول", "استÙاده‌مسیر", "استÙاده‌نمادها", "استÙاده‌نوشتارخارجی", "استÙاده‌پرونده‌دستخط‌تایپ", "اعدادلاتین", "اÙزودن", "انتخاب‌بلوکها", "بارگذاری‌آرایش", "بارگذاری‌آیتمها", "بارگذاری‌ارجاع", "بارگذاری‌اندازه‌برگ", "بارگذاری‌باریکتر", "بارگذاری‌باÙر", "بارگذاری‌بالا", "بارگذاری‌بردباری", "بارگذاری‌برنامه‌ها", "بارگذاری‌برگ", "بارگذاری‌بلوک", "بارگذاری‌بلوک‌بخش", "بارگذاری‌تایپ", "بارگذاری‌تایپ‌کردن", "بارگذاری‌ترتیب", "بارگذاری‌تنظیم", "بارگذاری‌تنظیم‌ریاضی", "بارگذاری‌ته‌برگ", "بارگذاری‌تورÙتگی", "بارگذاری‌توضیح", "بارگذاری‌توضیح‌صÙحه", "بارگذاری‌ثبت", "بارگذاری‌جانشانی", "بارگذاری‌جدولها", "بارگذاری‌جدول‌بندی", "بارگذاری‌خالی", "بارگذاری‌خطها", "بارگذاری‌خطهای‌حاشیه", "بارگذاری‌خطهای‌سیاه", "بارگذاری‌خطهای‌متن", "بارگذاری‌خطهای‌مجموعه‌ستون", "بارگذاری‌خطها‌ی‌نازک", "بارگذاری‌درج‌درخطها", "بارگذاری‌درج‌مخالÙ", "بارگذاری‌دوران", "بارگذاری‌رنگ", "بارگذاری‌رنگها", "بارگذاری‌زبان", "بارگذاری‌ستونها", "بارگذاری‌سر", "بارگذاری‌سربرگ", "بارگذاری‌سرها", "بارگذاری‌شرح", "بارگذاری‌شرحها", "بارگذاری‌شروع‌مجموعه‌ستون", "بارگذاری‌شروع‌پایان", "بارگذاری‌شماره‌زیرصÙحه", "بارگذاری‌شماره‌سر", "بارگذاری‌شماره‌صÙحه", "بارگذاری‌شماره‌گذاریها", "بارگذاری‌شماره‌گذاری‌صÙحه", "بارگذاری‌شماره‌گذاری‌پاراگراÙ", "بارگذاری‌شماره‌‌گذاری‌خط", "بارگذاری‌شناور", "بارگذاری‌شناورها", "بارگذاری‌شکاÙتن‌شناورها", "بارگذاری‌طرح", "بارگذاری‌طرح‌بندی", "بارگذاری‌عرض‌خط", "بارگذاری‌Ùاصله‌بین‌خط", "بارگذاری‌Ùرمولها", "بارگذاری‌Ùضای‌سÙید", "بارگذاری‌Ùضا‌گذاری", "بارگذاری‌قالبی", "بارگذاری‌قلم‌متن", "بارگذاری‌لوح", "بارگذاری‌لیست", "بارگذاری‌لیست‌ترکیبی", "بارگذاری‌مترادÙها", "بارگذاری‌متن", "بارگذاری‌متنهای‌بالا", "بارگذاری‌متن‌سربرگ", "بارگذاری‌متن‌قالبی", "بارگذاری‌متن‌متنها", "بارگذاری‌متن‌پانوشت", "بارگذاری‌متن‌پایین", "بارگذاری‌مجموعه‌ستون", "بارگذاری‌مجموعه‌نماد", "بارگذاری‌منوی‌پانل", "بارگذاری‌مکان‌گذاری", "بارگذاری‌میدان", "بارگذاری‌میدانها", "بارگذاری‌میله‌پانل", "بارگذاری‌نشانه‌شکستن", "بارگذاری‌نشانه‌گذاری", "بارگذاری‌نقل", "بارگذاری‌پاراگراÙها", "بارگذاری‌پانل", "بارگذاری‌پانوشتها", "بارگذاری‌پایین", "بارگذاری‌پرده‌پانل", "بارگذاری‌پرکردن‌خطها", "بارگذاری‌پس‌زمینه", "بارگذاری‌پس‌زمینه‌ها", "بارگذاری‌چیدن", "بارگذاری‌گذارصÙحه", "بارگذاری‌گروههای‌آیتم", "بارگذاری‌گروه‌آیتم", "بازنشانی‌نشانه‌گذاری", "بدون‌خط‌بالاوپایین", "بدون‌خط‌سروته‌برگ", "بدون‌Ùضا", "برنامه", "بروبه", "بروبه‌جعبه", "بروبه‌صÙحه", "بروپایین", "بلند", "بلوکهای‌پردازش", "بلوکها‌پنهان", "بنویس‌بین‌لیست", "بنویس‌در‌لیست", "تاریخ", "تاریخ‌جاری", "تایپ", "تایپ‌باÙر", "تایپ‌پرونده", "ترجمه", "تعریÙ", "تعریÙ‌آرایش", "تعریÙ‌الگوی‌جدول", "تعریÙ‌اندازه‌برگ", "تعریÙ‌باÙر", "تعریÙ‌بخش", "تعریÙ‌برنامه", "تعریÙ‌برچسب", "تعریÙ‌بلوک", "تعریÙ‌بلوک‌بخش", "تعریÙ‌تایپ", "تعریÙ‌تایپ‌کردن", "تعریÙ‌تبدیل", "تعریÙ‌ترتیب", "تعریÙ‌ترکیب", "تعریÙ‌تنظیم‌ریاضی", "تعریÙ‌توده‌میدان", "تعریÙ‌ثبت", "تعریÙ‌جانشانی", "تعریÙ‌جدول‌بندی", "تعریÙ‌جعبه‌‌اÙÙ‚ÛŒ", "تعریÙ‌حرÙ", "تعریÙ‌رنگ", "تعریÙ‌زیرمیدان", "تعریÙ‌سبک", "تعریÙ‌سبک‌قلم", "تعریÙ‌سر", "تعریÙ‌شرح", "تعریÙ‌شروع‌پایان", "تعریÙ‌شماره‌بندی", "تعریÙ‌شمایل‌مرجع", "تعریÙ‌شناور", "تعریÙ‌شکستن‌ستون", "تعریÙ‌شکست‌صÙحه", "تعریÙ‌طرح‌بندی", "تعریÙ‌Ùرمان", "تعریÙ‌قالبی", "تعریÙ‌قلم", "تعریÙ‌قلم‌متن", "تعریÙ‌لایه", "تعریÙ‌لهجه", "تعریÙ‌لوح", "تعریÙ‌لیست", "تعریÙ‌لیست‌ترکیبی", "تعریÙ‌مترادÙها", "تعریÙ‌مترادÙ‌قلم", "تعریÙ‌متن", "تعریÙ‌متن‌قالبی", "تعریÙ‌مجموعه‌ستون", "تعریÙ‌محیط‌قلم‌بدنه", "تعریÙ‌مرجع", "تعریÙ‌منوی‌پانل", "تعریÙ‌میدان", "تعریÙ‌نشانه‌گذاری", "تعریÙ‌نماد", "تعریÙ‌نمادشکل", "تعریÙ‌پاراگراÙها", "تعریÙ‌پروÙایل", "تعریÙ‌پوشش", "تعریÙ‌گروه‌آیتم", "تعریÙ‌گروه‌رنگ", "تعیین‌شماره‌سر", "تعیین‌محتوای‌متن", "تعیین‌مشخصات‌ثبت", "تعیین‌مشخصات‌لیست", "تغییربه‌قلم‌بدنه", "تنظیم‌راست", "تنظیم‌طرح‌بندی", "تنظیم‌وسط", "توجه", "توری", "تولید", "تک", "ثبت‌کامل", "حرÙ", "حرÙها", "Ø­Ùظ‌بلوکها", "خالی", "خطهای‌سیاه", "خطهای‌نازک", "خطها‌خالی", "خط‌سیاه", "خط‌متن", "خط‌مو", "خط‌نازک", "خ‌ا", "خ‌ع", "در", "درج‌ثبت", "درج‌درخط", "درج‌درخطها", "درج‌درمتن", "درج‌در‌بالای‌یکدیگر", "درج‌در‌توری", "درج‌زیرÙرمول", "درج‌شماره‌سر", "درج‌شماره‌صÙحه", "درج‌شناور", "درج‌Ùرمول", "درج‌لیست", "درج‌لیست‌خام", "درج‌لیست‌مختلط", "درج‌متن‌سر", "درج‌پانوشتها", "درج‌پانوشتهای‌موضعی", "درج‌چوب‌خط", "درج‌کنار‌به‌کنار", "درخط", "درصÙحه", "درقالبی", "درمورد", "درون", "درپر", "دریاÙت‌باÙر", "دریاÙت‌نشانه", "دوران", "دکمه", "دکمه‌منو", "دکمه‌پانل", "رج", "رنگ", "رنگ‌خاکستری", "روزهÙته", "ریاضی", "زبان", "زبان‌اصلی", "ستون", "ستون‌امتحان", "سرپوش‌کوچک‌نه", "شروعJScode", "شروعJSpreamble", "شروعLUA", "شروعMP", "شروعMPclip", "شروعMPcode", "شروعMPdefinitions", "شروعMPdrawing", "شروعMPenvironment", "شروعMPextensions", "شروعMPinclusions", "شروعMPinitializations", "شروعMPpage", "شروعMPpositiongraphic", "شروعMPpositionmethod", "شروعMPrun", "شروعPARSEDXML", "شروعTABLE", "شروعTABLEbody", "شروعTABLEfoot", "شروعTABLEhead", "شروعTABLEnext", "شروعTC", "شروعTD", "شروعTDs", "شروعTEX", "شروعTEXpage", "شروعTH", "شروعTN", "شروعTR", "شروعTRs", "شروعTX", "شروعTY", "شروعXML", "شروعalign", "شروعalignment", "شروعallmodes", "شروعappendices", "شروعarrangedpages", "شروعaside", "شروعattachment", "شروعbackmatter", "شروعbar", "شروعbbordermatrix", "شروعbitmapimage", "شروعblockquote", "شروعbodymatter", "شروعbordermatrix", "شروعboxedcolumns", "شروعbtxlabeltext", "شروعbtxrenderingdefinitions", "شروعbuffer", "شروعcases", "شروعcatcodetable", "شروعcenteraligned", "شروعchapter", "شروعcharacteralign", "شروعcheckedfences", "شروعchemical", "شروعchemicaltext", "شروعcollect", "شروعcollecting", "شروعcolorintent", "شروعcoloronly", "شروعcolorset", "شروعcolumns", "شروعcolumnset", "شروعcolumnsetspan", "شروعcombination", "شروعcomment", "شروعcontextcode", "شروعcontextdefinitioncode", "شروعctxfunction", "شروعctxfunctiondefinition", "شروعcurrentcolor", "شروعcurrentlistentrywrapper", "شروعdelimited", "شروعdelimitedtext", "شروعdisplaymath", "شروعdmath", "شروعdocument", "شروعeffect", "شروعelement", "شروعembeddedxtable", "شروعendnote", "شروعendofline", "شروعexceptions", "شروعexpanded", "شروعexpandedcollect", "شروعextendedcatcodetable", "شروعexternalfigurecollection", "شروعfacingfloat", "شروعfact", "شروعfigure", "شروعfiguretext", "شروعfittingpage", "شروعfixed", "شروعfloatcombination", "شروعfont", "شروعfontclass", "شروعfontsolution", "شروعfootnote", "شروعformula", "شروعformulas", "شروعframedcell", "شروعframedcontent", "شروعframedrow", "شروعframedtable", "شروعframedtext", "شروعfrontmatter", "شروعgraphictext", "شروعgridsnapping", "شروعhanging", "شروعhbox", "شروعhboxestohbox", "شروعhboxregister", "شروعheadtext", "شروعhelptext", "شروعhiding", "شروعhighlight", "شروعhyphenation", "شروعimath", "شروعindentation", "شروعindentedtext", "شروعinteraction", "شروعinterface", "شروعintermezzotext", "شروعintertext", "شروعitemgroup", "شروعitemgroupcolumns", "شروعitemize", "شروعknockout", "شروعlabeltext", "شروعlayout", "شروعlegend", "شروعlinealignment", "شروعlinecorrection", "شروعlinefiller", "شروعlinenumbering", "شروعlines", "شروعlinetable", "شروعlinetablebody", "شروعlinetablecell", "شروعlinetablehead", "شروعlocalfootnotes", "شروعlocalheadsetup", "شروعlocallinecorrection", "شروعlocalnotes", "شروعlocalsetups", "شروعlua", "شروعluacode", "شروعluaparameterset", "شروعluasetups", "شروعmakeup", "شروعmarginblock", "شروعmarkedcontent", "شروعmarkpages", "شروعmathalignment", "شروعmathcases", "شروعmathlabeltext", "شروعmathmatrix", "شروعmathmode", "شروعmathstyle", "شروعmatrices", "شروعmatrix", "شروعmaxaligned", "شروعmdformula", "شروعmiddlealigned", "شروعmiddlemakeup", "شروعmixedcolumns", "شروعmode", "شروعmodeset", "شروعmodule", "شروعmoduletestsection", "شروعmpformula", "شروعnamedsection", "شروعnamedsubformulas", "شروعnarrow", "شروعnarrower", "شروعnegative", "شروعnicelyfilledbox", "شروعnointerference", "شروعnotallmodes", "شروعnotext", "شروعnotmode", "شروعoperatortext", "شروعopposite", "شروعoutputstream", "شروعoverlay", "شروعoverprint", "شروعpagecolumns", "شروعpagecomment", "شروعpagefigure", "شروعpagelayout", "شروعpagemakeup", "شروعpar", "شروعparagraph", "شروعparagraphs", "شروعparagraphscell", "شروعparbuilder", "شروعpart", "شروعpath", "شروعplacechemical", "شروعplacefigure", "شروعplacegraphic", "شروعplaceintermezzo", "شروعplacelegend", "شروعplacepairedbox", "شروعplacetable", "شروعpositioning", "شروعpositionoverlay", "شروعpositive", "شروعpostponing", "شروعpostponingnotes", "شروعprefixtext", "شروعprocessassignmentcommand", "شروعprocessassignmentlist", "شروعprocesscommacommand", "شروعprocesscommalist", "شروعprotect", "شروعprotectedcolors", "شروعpunctuation", "شروعquotation", "شروعquote", "شروعrandomized", "شروعrandomseed", "شروعrawsetups", "شروعreadingfile", "شروعreferenceprefix", "شروعregime", "شروعreusableMPgraphic", "شروعruby", "شروعscript", "شروعsdformula", "شروعsection", "شروعsectionblock", "شروعsectionblockenvironment", "شروعsectionlevel", "شروعsetups", "شروعshapebox", "شروعshift", "شروعsidebar", "شروعsimplecolumns", "شروعspecialitem", "شروعspeech", "شروعspformula", "شروعsplitformula", "شروعsplittext", "شروعspread", "شروعstandardmakeup", "شروعstaticMPfigure", "شروعstaticMPgraphic", "شروعstrictinspectnextcharacter", "شروعstrut", "شروعstyle", "شروعsubformulas", "شروعsubject", "شروعsubjectlevel", "شروعsubsection", "شروعsubsentence", "شروعsubstack", "شروعsubsubject", "شروعsubsubsection", "شروعsubsubsubject", "شروعsubsubsubsection", "شروعsubsubsubsubject", "شروعsubsubsubsubsection", "شروعsubsubsubsubsubject", "شروعsuffixtext", "شروعsymbolset", "شروعtable", "شروعtablehead", "شروعtables", "شروعtabletail", "شروعtabletext", "شروعtabulate", "شروعtabulatehead", "شروعtabulatetail", "شروعtagged", "شروعtaglabeltext", "شروعtexcode", "شروعtexdefinition", "شروعtext", "شروعtextbackground", "شروعtextbackgroundmanual", "شروعtextcolor", "شروعtextcolorintent", "شروعtextflow", "شروعtextmakeup", "شروعtitle", "شروعtokenlist", "شروعtokens", "شروعtransparent", "شروعtypescript", "شروعtypescriptcollection", "شروعtyping", "شروعuniqueMPgraphic", "شروعuniqueMPpagegraphic", "شروعunittext", "شروعunpacked", "شروعusableMPgraphic", "شروعuseMPgraphic", "شروعusemathstyleparameter", "شروعuserdata", "شروعusingbtxspecification", "شروعvbox", "شروعvboxregister", "شروعvboxtohbox", "شروعvboxtohboxseparator", "شروعviewerlayer", "شروعvtop", "شروعvtopregister", "شروعxcell", "شروعxcellgroup", "شروعxcolumn", "شروعxgroup", "شروعxmldisplayverbatim", "شروعxmlinlineverbatim", "شروعxmlraw", "شروعxmlsetups", "شروعxrow", "شروعxrowgroup", "شروعxtable", "شروعxtablebody", "شروعxtablefoot", "شروعxtablehead", "شروعxtablenext", "شروعآیتم", "شروعبروبه", "شروعتنظیم‌راست", "شروعتنظیم‌وسط", "شروعتولید", "شروعخط‌حاشیه", "شروعخط‌متن", "شروعدرج‌شناور", "شروعدرج‌Ùرمول", "شروعرنگ", "شروعزبان", "شروعسر", "شروعÙشرده", "شروعقالبی", "شروعمحیط", "شروعمنوی‌پانل", "شروعمولÙÙ‡", "شروعنشر", "شروعپروژه", "شروعپس‌زمینه", "شروعچپ‌چین", "شروع‌خط", "شماره‌زیرصÙحه", "شماره‌سر", "شماره‌سرجاری", "شماره‌صÙحه", "شماره‌صÙحه‌کامل", "شماره‌Ùرمول", "شماره‌مبدل", "شماره‌ها", "شکاÙتن‌شناور", "شکل‌خارجی", "صÙحه", "صÙحه‌تست", "طول‌لیست", "عرض‌خط", "Ùضا", "Ùضاهای‌ثابت", "Ùضای‌ثابت", "Ùضای‌سÙیدصحیح", "قالبی", "لوح‌مقایسه", "ماه", "متن‌پانوشت", "محیط", "مراجعه", "مرجع", "مرجع‌صÙحه", "مرجع‌متن", "مقایسه‌گروه‌رنگ", "مقداررنگ", "مقیاس", "منوی‌پانل", "مولÙÙ‡", "مکان", "میدان", "میدان‌شبیه‌سازی", "میدان‌پشته", "میدان‌کپی", "میله‌رنگ", "میله‌پانل", "ناشناس", "نسخه", "نشانه‌گذاری", "نصب‌زبان", "نقطه‌ها", "نماد", "نمایش‌آرایش", "نمایش‌بارگذاریها", "نمایش‌بستها", "نمایش‌توری", "نمایش‌رنگ", "نمایش‌طرح‌بندی", "نمایش‌قالب", "نمایش‌قلم‌بدنه", "نمایش‌لوح", "نمایش‌مجموعه‌علامت", "نمایش‌محیط‌قلم‌بدنه", "نمایش‌چاپ", "نمایش‌گروه‌رنگ", "پابا", "پایانJScode", "پایانJSpreamble", "پایانLUA", "پایانMP", "پایانMPclip", "پایانMPcode", "پایانMPdefinitions", "پایانMPdrawing", "پایانMPenvironment", "پایانMPextensions", "پایانMPinclusions", "پایانMPinitializations", "پایانMPpage", "پایانMPpositiongraphic", "پایانMPpositionmethod", "پایانMPrun", "پایانPARSEDXML", "پایانTABLE", "پایانTABLEbody", "پایانTABLEfoot", "پایانTABLEhead", "پایانTABLEnext", "پایانTC", "پایانTD", "پایانTDs", "پایانTEX", "پایانTEXpage", "پایانTH", "پایانTN", "پایانTR", "پایانTRs", "پایانTX", "پایانTY", "پایانXML", "پایانalign", "پایانalignment", "پایانallmodes", "پایانappendices", "پایانarrangedpages", "پایانaside", "پایانattachment", "پایانbackmatter", "پایانbar", "پایانbbordermatrix", "پایانbitmapimage", "پایانblockquote", "پایانbodymatter", "پایانbordermatrix", "پایانboxedcolumns", "پایانbtxlabeltext", "پایانbtxrenderingdefinitions", "پایانbuffer", "پایانcases", "پایانcatcodetable", "پایانcenteraligned", "پایانchapter", "پایانcharacteralign", "پایانcheckedfences", "پایانchemical", "پایانchemicaltext", "پایانcollect", "پایانcollecting", "پایانcolorintent", "پایانcoloronly", "پایانcolorset", "پایانcolumns", "پایانcolumnset", "پایانcolumnsetspan", "پایانcombination", "پایانcomment", "پایانcontextcode", "پایانcontextdefinitioncode", "پایانctxfunction", "پایانctxfunctiondefinition", "پایانcurrentcolor", "پایانcurrentlistentrywrapper", "پایانdelimited", "پایانdelimitedtext", "پایانdisplaymath", "پایانdmath", "پایانdocument", "پایانeffect", "پایانelement", "پایانembeddedxtable", "پایانendnote", "پایانendofline", "پایانexceptions", "پایانexpanded", "پایانexpandedcollect", "پایانextendedcatcodetable", "پایانexternalfigurecollection", "پایانfacingfloat", "پایانfact", "پایانfigure", "پایانfiguretext", "پایانfittingpage", "پایانfixed", "پایانfloatcombination", "پایانfont", "پایانfontclass", "پایانfontsolution", "پایانfootnote", "پایانformula", "پایانformulas", "پایانframedcell", "پایانframedcontent", "پایانframedrow", "پایانframedtable", "پایانframedtext", "پایانfrontmatter", "پایانgraphictext", "پایانgridsnapping", "پایانhanging", "پایانhbox", "پایانhboxestohbox", "پایانhboxregister", "پایانheadtext", "پایانhelptext", "پایانhiding", "پایانhighlight", "پایانhyphenation", "پایانimath", "پایانindentation", "پایانindentedtext", "پایانinteraction", "پایانinterface", "پایانintermezzotext", "پایانintertext", "پایانitemgroup", "پایانitemgroupcolumns", "پایانitemize", "پایانknockout", "پایانlabeltext", "پایانlayout", "پایانlegend", "پایانlinealignment", "پایانlinecorrection", "پایانlinefiller", "پایانlinenumbering", "پایانlines", "پایانlinetable", "پایانlinetablebody", "پایانlinetablecell", "پایانlinetablehead", "پایانlocalfootnotes", "پایانlocalheadsetup", "پایانlocallinecorrection", "پایانlocalnotes", "پایانlocalsetups", "پایانlua", "پایانluacode", "پایانluaparameterset", "پایانluasetups", "پایانmakeup", "پایانmarginblock", "پایانmarkedcontent", "پایانmarkpages", "پایانmathalignment", "پایانmathcases", "پایانmathlabeltext", "پایانmathmatrix", "پایانmathmode", "پایانmathstyle", "پایانmatrices", "پایانmatrix", "پایانmaxaligned", "پایانmdformula", "پایانmiddlealigned", "پایانmiddlemakeup", "پایانmixedcolumns", "پایانmode", "پایانmodeset", "پایانmodule", "پایانmoduletestsection", "پایانmpformula", "پایانnamedsection", "پایانnamedsubformulas", "پایانnarrow", "پایانnarrower", "پایانnegative", "پایانnicelyfilledbox", "پایانnointerference", "پایانnotallmodes", "پایانnotext", "پایانnotmode", "پایانoperatortext", "پایانopposite", "پایانoutputstream", "پایانoverlay", "پایانoverprint", "پایانpagecolumns", "پایانpagecomment", "پایانpagefigure", "پایانpagelayout", "پایانpagemakeup", "پایانpar", "پایانparagraph", "پایانparagraphs", "پایانparagraphscell", "پایانparbuilder", "پایانpart", "پایانpath", "پایانplacechemical", "پایانplacefigure", "پایانplacegraphic", "پایانplaceintermezzo", "پایانplacelegend", "پایانplacepairedbox", "پایانplacetable", "پایانpositioning", "پایانpositionoverlay", "پایانpositive", "پایانpostponing", "پایانpostponingnotes", "پایانprefixtext", "پایانprocessassignmentcommand", "پایانprocessassignmentlist", "پایانprocesscommacommand", "پایانprocesscommalist", "پایانprotect", "پایانprotectedcolors", "پایانpunctuation", "پایانquotation", "پایانquote", "پایانrandomized", "پایانrandomseed", "پایانrawsetups", "پایانreadingfile", "پایانreferenceprefix", "پایانregime", "پایانreusableMPgraphic", "پایانruby", "پایانscript", "پایانsdformula", "پایانsection", "پایانsectionblock", "پایانsectionblockenvironment", "پایانsectionlevel", "پایانsetups", "پایانshapebox", "پایانshift", "پایانsidebar", "پایانsimplecolumns", "پایانspecialitem", "پایانspeech", "پایانspformula", "پایانsplitformula", "پایانsplittext", "پایانspread", "پایانstandardmakeup", "پایانstaticMPfigure", "پایانstaticMPgraphic", "پایانstrictinspectnextcharacter", "پایانstrut", "پایانstyle", "پایانsubformulas", "پایانsubject", "پایانsubjectlevel", "پایانsubsection", "پایانsubsentence", "پایانsubstack", "پایانsubsubject", "پایانsubsubsection", "پایانsubsubsubject", "پایانsubsubsubsection", "پایانsubsubsubsubject", "پایانsubsubsubsubsection", "پایانsubsubsubsubsubject", "پایانsuffixtext", "پایانsymbolset", "پایانtable", "پایانtablehead", "پایانtables", "پایانtabletail", "پایانtabletext", "پایانtabulate", "پایانtabulatehead", "پایانtabulatetail", "پایانtagged", "پایانtaglabeltext", "پایانtexcode", "پایانtexdefinition", "پایانtext", "پایانtextbackground", "پایانtextbackgroundmanual", "پایانtextcolor", "پایانtextcolorintent", "پایانtextflow", "پایانtextmakeup", "پایانtitle", "پایانtokenlist", "پایانtokens", "پایانtransparent", "پایانtypescript", "پایانtypescriptcollection", "پایانtyping", "پایانuniqueMPgraphic", "پایانuniqueMPpagegraphic", "پایانunittext", "پایانunpacked", "پایانusableMPgraphic", "پایانuseMPgraphic", "پایانusemathstyleparameter", "پایانuserdata", "پایانusingbtxspecification", "پایانvbox", "پایانvboxregister", "پایانvboxtohbox", "پایانvboxtohboxseparator", "پایانviewerlayer", "پایانvtop", "پایانvtopregister", "پایانxcell", "پایانxcellgroup", "پایانxcolumn", "پایانxgroup", "پایانxmldisplayverbatim", "پایانxmlinlineverbatim", "پایانxmlraw", "پایانxmlsetups", "پایانxrow", "پایانxrowgroup", "پایانxtable", "پایانxtablebody", "پایانxtablefoot", "پایانxtablehead", "پایانxtablenext", "پایانآیتم", "پایانبروبه", "پایانتنظیم‌راست", "پایانتنظیم‌وسط", "پایانتولید", "پایانخط‌حاشیه", "پایانخط‌متن", "پایاندرج‌شناور", "پایاندرج‌Ùرمول", "پایانرنگ", "پایانزبان", "پایانسر", "پایانÙشرده", "پایانقالبی", "پایانمحیط", "پایانمنوی‌پانل", "پایانمولÙÙ‡", "پایاننشر", "پایانپروژه", "پایانپس‌زمینه", "پایانچپ‌چین", "پایان‌خط", "پایین", "پرده", "پروژه", "پرکردن‌میدان", "پس‌زمینه", "چوبخط", "چپ‌چین", "کشیده", "کلمه‌راست", "گیره", "یادداشت", "یک‌جا", "یک‌خط" },
- ["ro"]={ "CUVANT", "CUVINTE", "Cuvant", "Cuvinte", "Kap", "LUNA", "Litera", "Litere", "Numere", "Numereromane", "ZIDINSAPTAMANA", "adapteazaaspect", "adubuffer", "adumarcaje", "afiseazaaspect", "afiseazaculoare", "afiseazafonttext", "afiseazagrid", "afiseazagrupculoare", "afiseazamakeup", "afiseazamediufonttext", "afiseazapaleta", "afiseazarama", "afiseazasetari", "afiseazasetsimboluri", "afiseazastruts", "afiseazatiparire", "aliniatcentru", "aliniatdreapta", "aliniatstanga", "ascundeblocuri", "baraculoare", "barainteractiune", "blanc", "butoaneinteractiune", "buton", "butonmeniu", "camp", "cloneazacamp", "coloana", "comparagrupculoare", "comparapaleta", "completeazanumarpagina", "componenta", "convertestenumar", "copiazacamp", "corecteazaspatiualb", "culoare", "culoaregri", "cuvantdreapta", "data", "datacurenta", "defineste", "definesteaccent", "definesteantet", "definestebloc", "definesteblocsectiune", "definestebuffer", "definestecamp", "definestecaracter", "definestecomanda", "definesteconversie", "definesteculoare", "definestedescriere", "definestedimensiunehartie", "definesteenumerare", "definesteeticheta", "definestefloat", "definestefont", "definestefonttext", "definesteformatreferinte", "definestegrupculori", "definestehbox", "definesteinconjurare", "definestelista", "definestelistacombinata", "definestemakeup", "definestemarcaje", "definestemediulfonttext", "definestemeniuinteractiune", "definesteoverlay", "definestepaleta", "definesteparagraf", "definesteprofil", "definesteprogram", "definestereferinte", "definesteregistru", "definestesablontabel", "definestesectiune", "definestesimbol", "definestesimbolfigura", "definestesinonim", "definestesinonimfont", "definestesortare", "definestestartstop", "definestestil", "definestestilfont", "definestestivacampuri", "definestesubcamp", "definestetabulatori", "definestetext", "definestetexteinconjurate", "definestetextinconjurat", "definestetyping", "despre", "determinacaracteristicilelistei", "determinacaracteristiciregistru", "determinanumartitlu", "din", "dute", "dutebox", "dutepagina", "ecran", "element", "faraliniiantetsisubsol", "faraliniisussijos", "faraspatiu", "figuraexterna", "firdepar", "folosesteURL", "folosestebloc", "folosestedirector", "folosestedocumentextern", "folosestefiguraexterna", "folosestemodul", "folosestemuzicaexterna", "folosestescriptJS", "folosestesimboluri", "folosesteurl", "fundal", "grosimelinie", "impartefloat", "inalt", "injos", "inlinie", "instalarelimba", "intins", "jos", "jossus", "la", "lapagina", "limba", "limbaprincipala", "linieneagra", "liniesubtire", "linieumplere", "liniinegre", "liniisubtiri", "litera", "litere", "luna", "lungimelista", "marcaje", "matematica", "mediu", "meniuinteractiune", "necunoscut", "nokap", "nota", "numarformula", "numarpagina", "numartitlu", "numartitlucurent", "numere", "numereromane", "olinie", "pagina", "pastreazablocuri", "pelung", "plaseazapegrid", "plaseazasemnecarte", "potrivestecamp", "pozitie", "proceseazabloc", "produs", "proiect", "puncte", "punedeasuprafiecareia", "punefatainfata", "puneformula", "punelista", "punelistacombinata", "punenotesubsol", "punenotesubsollocale", "punenumarpagina", "puneregistru", "punesubformula", "referinta", "referintapagina", "referintatext", "reflexie", "remarca", "reseteazamarcaje", "riglatext", "rigleumplere", "roteste", "scala", "scriebuffer", "scrieinlista", "scrieintreliste", "selecteazablocuri", "semncarte", "setareitemization", "setarelimba", "setarepozitie", "seteazaaliniat", "seteazaalinierea", "seteazaantet", "seteazaaranjareapag", "seteazaaspect", "seteazabarainteractiune", "seteazablanc", "seteazabloc", "seteazablocsectiune", "seteazabuffer", "seteazacamp", "seteazacampuri", "seteazaclipping", "seteazacoloane", "seteazacomentariu", "seteazacomentariupagina", "seteazaculoare", "seteazaculori", "seteazadimensiunihartie", "seteazaecraninteractiune", "seteazaelemente", "seteazaenumerare", "seteazafloat", "seteazafloats", "seteazafonttext", "seteazaformulare", "seteazaformule", "seteazafundal", "seteazafundaluri", "seteazagrosimelinie", "seteazaimpartireafloat", "seteazainconjurat", "seteazaingust", "seteazainteractiunea", "seteazajos", "seteazalegenda", "seteazalegendele", "seteazaliniesilabe", "seteazaliniesubtire", "seteazalinii", "seteazaliniimargine", "seteazaliniinegre", "seteazaliniiumplere", "seteazalista", "seteazalistacombinata", "seteazamajuscule", "seteazamakeup", "seteazamarcaje", "seteazameniuinteractiune", "seteazaminicitat", "seteazanotasubsol", "seteazanumarpagina", "seteazanumarsubpagina", "seteazanumartitlu", "seteazanumerotarelinii", "seteazanumerotarepagina", "seteazanumerotareparagrafe", "seteazapaleta", "seteazaparagrafe", "seteazaplasareaopozita", "seteazaprograme", "seteazareferinte", "seteazaregistru", "seteazarigletext", "seteazarigleumplere", "seteazarotare", "seteazasimbol", "seteazasinonime", "seteazasortare", "seteazaspatiu", "seteazaspatiualb", "seteazaspatiuinterliniar", "seteazasubsol", "seteazasus", "seteazatabele", "seteazatabulatori", "seteazatext", "seteazatexteantet", "seteazatextejos", "seteazatextesubsol", "seteazatextesus", "seteazatextetext", "seteazatitlu", "seteazatitluri", "seteazatoleranta", "seteazatranzitiepagina", "seteazatype", "seteazatyping", "seteazaurl", "simbol", "spatiifixate", "spatiu", "spatiufixat", "startaliniatcentru", "startaliniatdreapta", "startaliniatstanga", "startcomponenta", "startculoare", "startdute", "startfundal", "startimpachetat", "startlimba", "startlinie", "startliniemargine", "startmediu", "startmeniuinteractiune", "startprodus", "startproiect", "startpublicatie", "startpuneformula", "startriglatext", "starttitlu", "stivacampuri", "stopaliniatcentru", "stopaliniatdreapta", "stopaliniatstanga", "stopcomponenta", "stopculoare", "stopdute", "stopfundal", "stopimpachetat", "stoplimba", "stoplinie", "stopliniemargine", "stopmediu", "stopmeniuinteractiune", "stopprodus", "stopproiect", "stoppublicatie", "stoppuneformula", "stopriglatext", "stoptitlu", "textumplere", "traduce", "trecilafonttext", "undeva", "valoareculoare", "versiune", "zidinsaptamana" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
index c2d4440f18e..e4bdafaa8ed 100644
--- a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
@@ -1,4 +1,4 @@
return {
- ["commands"]={ "loadfile", "loadimage", "loadmodule", "dispose", "nothing", "transparency", "tolist", "topath", "tocycle", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "tanh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "randomizedcontrols", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "perpendicular", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "drawdoublearrows", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "boundingradius", "boundingcircle", "boundingpoint", "crossingunder", "insideof", "outsideof", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", "withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "filloutlinetext", "drawoutlinetext", "outlinetexttopath", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", "notcached", "keepcached", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "colorlike", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "resetarrows", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "complementary", "complemented", "resolvedcolor", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "pencilled", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright", "sortlist", "copylist", "shapedlist", "listtocurves", "listtolines", "listsize", "listlast", "uniquelist", "circularpath", "squarepath", "linearpath", "theoffset", "texmode", "systemmode", "texvar", "texstr", "isarray", "prefix", "dimension", "getmacro", "getdimen", "getcount", "gettoks", "setmacro", "setdimen", "setcount", "settoks", "positionpath", "positioncurve", "positionxy", "positionpxy", "positionwhd", "positionpage", "positionregion", "positionbox", "positionanchor", "positioninregion", "positionatanchor", "wdpart", "htpart", "dppart", "texvar", "texstr", "inpath", "pointof", "leftof", "rightof", "utflen", "utfsub", "newhash", "disposehash", "inhash", "tohash", "isarray", "prefix", "isobject", "comment", "report", "lua", "mp", "MP", "luacall", "mirrored", "mirroredabout", "scriptindex" },
- ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "textextanchor", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "ahvariant", "ahdimple", "ahfactor", "ahscale", "metapostversion", "maxdimensions", "drawoptionsfactor", "dq", "sq", "crossingscale", "crossingoption", "contextlmtxmode", "getparameters", "presetparameters", "hasparameter", "hasoption", "getparameter", "getparameterdefault", "getparametercount", "getmaxparametercount", "getparameterpath", "getparameterpen", "getparametertext", "applyparameters", "pushparameters", "popparameters", "definecolor" },
+ ["commands"]={ "loadfile", "loadimage", "loadmodule", "dispose", "nothing", "transparency", "tolist", "topath", "tocycle", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "tanh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "randomizedcontrols", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "perpendicular", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "drawdoublearrows", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "boundingradius", "boundingcircle", "boundingpoint", "crossingunder", "insideof", "outsideof", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", "withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin", "shownshadedirection", "shownshadecenter", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "filloutlinetext", "drawoutlinetext", "outlinetexttopath", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", "rawmadetext", "validtexbox", "onetimetextext", "rawfmttext", "thefmttext", "fmttext", "onetimefmttext", "notcached", "keepcached", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "withopacity", "property", "properties", "withproperties", "asgroup", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "colorlike", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "resetarrows", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "complementary", "complemented", "resolvedcolor", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "pencilled", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright", "sortlist", "copylist", "shapedlist", "listtocurves", "listtolines", "listsize", "listlast", "uniquelist", "circularpath", "squarepath", "linearpath", "theoffset", "texmode", "systemmode", "texvar", "texstr", "isarray", "prefix", "dimension", "getmacro", "getdimen", "getcount", "gettoks", "setmacro", "setdimen", "setcount", "settoks", "setglobalmacro", "setglobaldimen", "setglobalcount", "setglobaltoks", "positionpath", "positioncurve", "positionxy", "positionpxy", "positionwhd", "positionpage", "positionregion", "positionbox", "positionanchor", "positioninregion", "positionatanchor", "wdpart", "htpart", "dppart", "texvar", "texstr", "inpath", "pointof", "leftof", "rightof", "utfnum", "utflen", "utfsub", "newhash", "disposehash", "inhash", "tohash", "isarray", "prefix", "isobject", "comment", "report", "lua", "lualist", "mp", "MP", "luacall", "mirrored", "mirroredabout", "scriptindex", "newscriptindex", "newcolor", "newrgbcolor", "newcmykcolor", "newnumeric", "newboolean", "newtransform", "newpath", "newpicture", "newstring", "newpair", "mpvar" },
+ ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "shadeoffset", "textextoffset", "textextanchor", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "ahvariant", "ahdimple", "ahfactor", "ahscale", "metapostversion", "maxdimensions", "drawoptionsfactor", "dq", "sq", "crossingscale", "crossingoption", "contextlmtxmode", "metafunversion", "minifunversion", "getparameters", "presetparameters", "hasparameter", "hasoption", "getparameter", "getparameterdefault", "getparametercount", "getmaxparametercount", "getparameterpath", "getparameterpen", "getparametertext", "applyparameters", "pushparameters", "popparameters", "definecolor" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua
index 9304b2dd201..1bb01b34724 100644
--- a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua
@@ -1,9 +1,9 @@
return {
- ["commands"]={ "upto", "downto", "beginfig", "endfig", "beginglyph", "endglyph", "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", "center", "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", "triplet", "quadruplet", "totransform", "bymatrix" },
+ ["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", "center", "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", "triplet", "quadruplet", "totransform", "bymatrix", "primitive", "permanent", "immutable", "mutable", "frozen", "showproperty", "showhashentry" },
["disabled"]={ "verbatimtex", "troffmode" },
- ["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "charscale", "ditto", "EOF", "pen_lft", "pen_rt", "pen_top", "pen_bot" },
+ ["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" },
- ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "setgroup", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext", "numbersystem" },
+ ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "setgroup", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext", "numbersystem", "overloadmode", "setproperty" },
["shortcuts"]={ "..", "...", "--", "---", "&", "\\" },
["tex"]={ "btex", "etex", "verbatimtex" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua
index f7551d2886b..93f696f5f09 100644
--- a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua
@@ -1,9 +1,9 @@
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", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Umiddle", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uright", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "aftergrouped", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "beginlocalcontrol", "boundary", "boxattr", "boxdirection", "boxorientation", "boxtotal", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "efcode", "endlocalcontrol", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "fixupboxesmode", "fontid", "formatname", "frozen", "futureexpand", "futureexpandis", "futureexpandisap", "gleaders", "glet", "glyphdatafield", "gtoksapp", "gtokspre", "hjcode", "hpack", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifchkdim", "ifchknum", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimval", "iffrozen", "ifincsname", "ifnumval", "ifprotected", "iftok", "ifusercmd", "ignorepars", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "internalcodesmode", "lastnamedcs", "lastnodesubtype", "leftghost", "leftmarginkern", "letcharcode", "letfrozen", "letprotected", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "matholdmode", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "noboundary", "nohrule", "nokerns", "noligs", "nospaces", "novrule", "outputbox", "pardirection", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitvmode", "rightghost", "rightmarginkern", "rpcode", "savecatcodetable", "scantextokens", "setfontid", "shapemode", "textdirection", "toksapp", "tokspre", "tpack", "tracingfonts", "unletfrozen", "unletprotected", "vpack", "wordboundary", "xtoksapp", "xtokspre" },
+ ["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", "lastchkdim", "lastchknum", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numericscale", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingalignments", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "unexpanded", "unless", "widowpenalties" },
+ ["luatex"]={ "UUskewed", "UUskewedwithdelims", "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaccentbaseheight", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclass", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathspacebeforescript", "Umathspacingmode", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uradical", "Uright", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "afterassigned", "aftergrouped", "aliased", "alignmark", "aligntab", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "begincsname", "beginlocalcontrol", "boundary", "boxattribute", "boxdirection", "boxorientation", "boxtotal", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "clearmarks", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "defcsname", "dimensiondef", "directlua", "edefcsname", "efcode", "endlocalcontrol", "enforced", "etoksapp", "etokspre", "everytab", "exceptionpenalty", "expand", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "fontid", "fontspecifiedsize", "formatname", "frozen", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "gluespecdef", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "glyphscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphxscale", "glyphyoffset", "glyphyscale", "gtoksapp", "gtokspre", "hjcode", "hpack", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchknum", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimval", "ifempty", "ifflags", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifmathparameter", "ifmathstyle", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ignorearguments", "ignorepars", "immediate", "immutable", "initcatcodetable", "insertheights", "insertht", "instance", "integerdef", "lastarguments", "lastnamedcs", "lastnodesubtype", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letprotected", "linedirection", "linepar", "listcallbackmode", "localbrokenpenalty", "localcontrol", "localcontrolled", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscale", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "mugluespecdef", "mutable", "noaligned", "noboundary", "nohrule", "norelax", "normalizelinemode", "nospaces", "novrule", "orelse", "orunless", "outputbox", "overloaded", "overloadmode", "parametercount", "parattr", "pardirection", "permanent", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitvmode", "rightmarginkern", "rpcode", "savecatcodetable", "scantextokens", "setfontid", "snapshotpar", "supmarkmode", "swapcsvalues", "textdirection", "thewithoutunit", "tokenized", "toksapp", "tokspre", "tolerant", "tpack", "tracingfonts", "tracingmath", "undent", "unletfrozen", "unletprotected", "vpack", "wordboundary", "wrapuppar", "xdefcsname", "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", "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", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everytab", "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", "hoffset", "holdinginserts", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "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", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "or", "ordlimits", "orelse", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "radical", "raise", "read", "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", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "xdef", "xleaders", "xspaceskip", "year" },
+ ["tex"]={ " ", "-", "/", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "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", "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", "fontspecifiedname", "futurelet", "gdef", "global", "globaldefs", "glyph", "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", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "meaningfull", "meaningless", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "or", "ordlimits", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overshoot", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillleftskip", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "radical", "raise", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scaledfontdimen", "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", "todimension", "tointeger", "toks", "toksdef", "tolerance", "topmark", "topskip", "toscaled", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unhpack", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "unvpack", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "xdef", "xleaders", "xspaceskip", "year" },
["xetex"]={ "XeTeXversion" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties
index 6891c94000c..672d045b125 100644
--- a/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties
@@ -1,79 +1,94 @@
keywordclass.context.constants=\
zerocount minusone minustwo plusone \
plustwo plusthree plusfour plusfive plussix \
-plusseven pluseight plusnine plusten plussixteen \
-plusfifty plushundred plusonehundred plustwohundred plusfivehundred \
-plusthousand plustenthousand plustwentythousand medcard maxcard \
-maxcardminusone zeropoint onepoint halfapoint onebasepoint \
-maxcount maxdimen scaledpoint thousandpoint points \
-halfpoint zeroskip zeromuskip onemuskip pluscxxvii \
-pluscxxviii pluscclv pluscclvi normalpagebox directionlefttoright \
-directionrighttoleft endoflinetoken outputnewlinechar emptytoks empty \
-undefined voidbox emptybox emptyvbox emptyhbox \
-bigskipamount medskipamount smallskipamount fmtname fmtversion \
-texengine texenginename texengineversion texenginefunctionality luatexengine \
-pdftexengine xetexengine unknownengine contextformat contextversion \
-contextkind contextlmtxmode contextmark mksuffix activecatcode \
-bgroup egroup endline conditionaltrue conditionalfalse \
-attributeunsetvalue uprotationangle rightrotationangle downrotationangle leftrotationangle \
-inicatcodes ctxcatcodes texcatcodes notcatcodes txtcatcodes \
-vrbcatcodes prtcatcodes nilcatcodes luacatcodes tpacatcodes \
-tpbcatcodes xmlcatcodes ctdcatcodes escapecatcode begingroupcatcode \
-endgroupcatcode mathshiftcatcode alignmentcatcode endoflinecatcode parametercatcode \
-superscriptcatcode subscriptcatcode ignorecatcode spacecatcode lettercatcode \
-othercatcode activecatcode commentcatcode invalidcatcode tabasciicode \
-newlineasciicode formfeedasciicode endoflineasciicode endoffileasciicode spaceasciicode \
+plusseven pluseight plusnine plusten pluseleven \
+plustwelve plussixteen plusfifty plushundred plusonehundred \
+plustwohundred plusfivehundred plusthousand plustenthousand plustwentythousand \
+medcard maxcard maxcardminusone zeropoint onepoint \
+halfapoint onebasepoint maxcount maxdimen scaledpoint \
+thousandpoint points halfpoint zeroskip zeromuskip \
+onemuskip pluscxxvii pluscxxviii pluscclv pluscclvi \
+normalpagebox directionlefttoright directionrighttoleft endoflinetoken outputnewlinechar \
+emptytoks empty undefined 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 \
backslashasciicode circumflexasciicode underscoreasciicode leftbraceasciicode barasciicode \
rightbraceasciicode tildeasciicode delasciicode leftparentasciicode rightparentasciicode \
lessthanasciicode morethanasciicode doublecommentsignal atsignasciicode exclamationmarkasciicode \
questionmarkasciicode doublequoteasciicode singlequoteasciicode forwardslashasciicode primeasciicode \
-hyphenasciicode activemathcharcode activetabtoken activeformfeedtoken activeendoflinetoken \
-batchmodecode nonstopmodecode scrollmodecode errorstopmodecode bottomlevelgroupcode \
-simplegroupcode hboxgroupcode adjustedhboxgroupcode vboxgroupcode vtopgroupcode \
-aligngroupcode noaligngroupcode outputgroupcode mathgroupcode discretionarygroupcode \
-insertgroupcode vcentergroupcode mathchoicegroupcode semisimplegroupcode mathshiftgroupcode \
-mathleftgroupcode vadjustgroupcode charnodecode hlistnodecode vlistnodecode \
-rulenodecode insertnodecode marknodecode adjustnodecode ligaturenodecode \
-discretionarynodecode whatsitnodecode mathnodecode gluenodecode kernnodecode \
-penaltynodecode unsetnodecode mathsnodecode charifcode catifcode \
-numifcode dimifcode oddifcode vmodeifcode hmodeifcode \
-mmodeifcode innerifcode voidifcode hboxifcode vboxifcode \
-xifcode eofifcode trueifcode falseifcode caseifcode \
-definedifcode csnameifcode fontcharifcode fontslantperpoint fontinterwordspace \
-fontinterwordstretch fontinterwordshrink fontexheight fontemwidth fontextraspace \
-slantperpoint mathexheight mathemwidth interwordspace interwordstretch \
-interwordshrink exheight emwidth extraspace mathsupdisplay \
-mathsupnormal mathsupcramped mathsubnormal mathsubcombined 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 mathordcode mathopcode mathbincode \
-mathrelcode mathopencode mathclosecode mathpunctcode mathalphacode \
-mathinnercode mathnothingcode mathlimopcode mathnolopcode mathboxcode \
-mathchoicecode mathaccentcode mathradicalcode constantnumber constantnumberargument \
-constantdimen constantdimenargument constantemptyargument continueifinputfile 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 Ux eUx Umathaccents parfillleftskip \
-parfillrightskip startlmtxmode stoplmtxmode startmkivmode stopmkivmode \
-wildcardsymbol
+hyphenasciicode percentasciicode leftbracketasciicode rightbracketasciicode frozenhsizecode \
+frozenskipcode frozenhangcode frozenindentcode frozenparfillcode frozenadjustcode \
+frozenprotrudecode frozentolerancecode frozenstretchcode frozenloosenesscode frozenlastlinecode \
+frozenlinepenaltycode frozenclubpenaltycode frozenwidowpenaltycode frozendisplaypenaltycode frozenbrokenpenaltycode \
+frozendemeritscode frozenshapecode frozenlinecode frozenhyphenationcode frozenallcode \
+activemathcharcode activetabtoken activeformfeedtoken activeendoflinetoken batchmodecode \
+nonstopmodecode scrollmodecode errorstopmodecode bottomlevelgroupcode simplegroupcode \
+hboxgroupcode adjustedhboxgroupcode vboxgroupcode vtopgroupcode aligngroupcode \
+noaligngroupcode outputgroupcode mathgroupcode discretionarygroupcode insertgroupcode \
+vadjustgroupcode vcentergroupcode mathabovegroupcode mathchoicegroupcode semisimplegroupcode \
+mathshiftgroupcode mathleftgroupcode localboxgroupcode splitoffgroupcode splitkeepgroupcode \
+preamblegroupcode alignsetgroupcode finrowgroupcode discretionarygroupcode charnodecode \
+hlistnodecode vlistnodecode rulenodecode insertnodecode marknodecode \
+adjustnodecode ligaturenodecode discretionarynodecode whatsitnodecode mathnodecode \
+gluenodecode kernnodecode penaltynodecode unsetnodecode mathsnodecode \
+charifcode catifcode numifcode dimifcode oddifcode \
+vmodeifcode hmodeifcode mmodeifcode innerifcode voidifcode \
+hboxifcode vboxifcode xifcode eofifcode trueifcode \
+falseifcode caseifcode definedifcode csnameifcode fontcharifcode \
+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 mathordcode \
+mathopcode mathbincode mathrelcode mathopencode mathclosecode \
+mathpunctcode mathalphacode mathinnercode mathnothingcode mathlimopcode \
+mathnolopcode mathboxcode mathchoicecode mathaccentcode mathradicalcode \
+constantnumber constantnumberargument constantdimen constantdimenargument constantemptyargument \
+continueifinputfile 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 Ux eUx \
+Umathaccents parfillleftskip parfillrightskip startlmtxmode stoplmtxmode \
+startmkivmode stopmkivmode wildcardsymbol normalhyphenationmodecode automatichyphenationmodecode \
+explicithyphenationmodecode syllablehyphenationmodecode uppercasehyphenationmodecode completehyphenationmodecode compoundhyphenationmodecode \
+strictstarthyphenationmodecode strictendhyphenationmodecode automaticpenaltyhyphenationmodecode explicitpenaltyhyphenationmodecode permitgluehyphenationmodecode \
+permitallhyphenationmodecode permitmathreplacehyphenationmodecode forcecheckhyphenationmodecode lazyligatureshyphenationmodecode normalizelinecode \
+parindentskipcode swaphangindentcode swapparsshapecode breakafterdircode removemarginkernscode \
+clipwidthcode noligaturingcode nokerningcode noleftligaturecode noleftkerncode \
+norightligaturecode norightkerncode noexpansioncode noprotrusioncode frozenflagcode \
+tolerantflagcode protectedflagcode primitiveflagcode permanentflagcode noalignedflagcode \
+immutableflagcode mutableflagcode globalflagcode overloadedflagcode immediateflagcode \
+conditionalflagcode valueflagcode instanceflagcode continuewhenlmtxmode
keywordclass.context.helpers=\
startsetups stopsetups startxmlsetups stopxmlsetups \
@@ -90,159 +105,185 @@ globalresetsystemmode booleanmodevalue newcount newdimen newskip \
newmuskip newbox newtoks newread newwrite \
newmarks newinsert newattribute newif newlanguage \
newfamily newfam newhelp then begcsname \
-autorule strippedcsname checkedstrippedcsname firstargumentfalse firstargumenttrue \
-secondargumentfalse secondargumenttrue thirdargumentfalse thirdargumenttrue fourthargumentfalse \
-fourthargumenttrue fifthargumentfalse fifthargumenttrue sixthargumentfalse sixthargumenttrue \
-seventhargumentfalse seventhargumenttrue vkern hkern doglobal \
-dodoglobal redoglobal resetglobal donothing dontcomplain \
-forgetall donetrue donefalse foundtrue foundfalse \
-inlineordisplaymath indisplaymath forcedisplaymath startforceddisplaymath stopforceddisplaymath \
-startpickupmath stoppickupmath reqno mathortext 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 ruledhss \
-ruledhfil ruledhfill ruledhfilll ruledhfilneg ruledhfillneg \
-normalhfillneg normalhfilllneg ruledvss ruledvfil ruledvfill \
-ruledvfilll ruledvfilneg ruledvfillneg normalvfillneg normalvfilllneg \
-ruledhbox ruledvbox ruledvtop ruledvcenter ruledmbox \
-ruledhpack ruledvpack ruledtpack ruledhskip ruledvskip \
-ruledkern ruledmskip ruledmkern ruledhglue ruledvglue \
-normalhglue normalvglue ruledpenalty filledhboxb filledhboxr \
-filledhboxg filledhboxc filledhboxm filledhboxy filledhboxk \
-scratchcounter globalscratchcounter privatescratchcounter scratchdimen globalscratchdimen \
-privatescratchdimen scratchskip globalscratchskip privatescratchskip scratchmuskip \
-globalscratchmuskip privatescratchmuskip scratchtoks globalscratchtoks privatescratchtoks \
-scratchbox globalscratchbox privatescratchbox globalscratchcounterone globalscratchcountertwo \
+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 dontcomplain forgetall donetrue \
+donefalse foundtrue foundfalse inlineordisplaymath indisplaymath \
+forcedisplaymath startforceddisplaymath stopforceddisplaymath startpickupmath stoppickupmath \
+reqno 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 ruledhss ruledhfil \
+ruledhfill ruledhfilll ruledhfilneg ruledhfillneg normalhfillneg \
+normalhfilllneg ruledvss ruledvfil ruledvfill ruledvfilll \
+ruledvfilneg ruledvfillneg normalvfillneg normalvfilllneg ruledhbox \
+ruledvbox ruledvtop ruledvcenter ruledmbox ruledhpack \
+ruledvpack ruledtpack 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 pickupgroupedcommand normalbaselineskip normallineskip normallineskiplimit \
+simplegroupedcommand pickupgroupedcommand usedbaselineskip usedlineskip usedlineskiplimit \
availablehsize localhsize setlocalhsize distributedhsize hsizefraction \
next nexttoken nextbox dowithnextbox dowithnextboxcs \
-dowithnextboxcontent dowithnextboxcontentcs flushnextbox boxisempty givenwidth \
-givenheight givendepth scangivendimensions scratchwidth scratchheight \
-scratchdepth scratchoffset scratchdistance scratchtotal 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 removetoks \
+dowithnextboxcontent dowithnextboxcontentcs flushnextbox boxisempty boxtostring \
+contentostring prerolltostring givenwidth givenheight givendepth \
+scangivendimensions scratchwidth scratchheight scratchdepth scratchoffset \
+scratchdistance scratchtotal 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 showluatokens aliasmacro removetoks \
appendtoks prependtoks appendtotoks prependtotoks to \
-endgraf endpar everyendpar reseteverypar finishpar \
-empty null space quad enspace \
-emspace charspace nbsp crlf obeyspaces \
-obeylines obeyedspace obeyedline obeyedtab obeyedpage \
-normalspace 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 glet udef \
-ugdef uedef uxdef checked unique \
-getparameters geteparameters getgparameters getxparameters forgetparameters \
-copyparameters getdummyparameters dummyparameter directdummyparameter setdummyparameter \
-letdummyparameter setexpandeddummyparameter usedummystyleandcolor usedummystyleparameter usedummycolorparameter \
-processcommalist processcommacommand quitcommalist quitprevcommalist processaction \
-processallactions processfirstactioninset processallactionsinset unexpanded expanded \
-startexpanded stopexpanded protected 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 newconstant setnewconstant setconstant \
+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 \
+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 newmacro setnewmacro newfraction newsignal \
-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 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 shiftbox vpackbox \
-hpackbox vpackedbox hpackedbox ordordspacing ordopspacing \
-ordbinspacing ordrelspacing ordopenspacing ordclosespacing ordpunctspacing \
-ordinnerspacing opordspacing opopspacing opbinspacing oprelspacing \
-opopenspacing opclosespacing oppunctspacing opinnerspacing binordspacing \
-binopspacing binbinspacing binrelspacing binopenspacing binclosespacing \
-binpunctspacing bininnerspacing relordspacing relopspacing relbinspacing \
-relrelspacing relopenspacing relclosespacing relpunctspacing relinnerspacing \
-openordspacing openopspacing openbinspacing openrelspacing openopenspacing \
-openclosespacing openpunctspacing openinnerspacing closeordspacing closeopspacing \
-closebinspacing closerelspacing closeopenspacing closeclosespacing closepunctspacing \
-closeinnerspacing punctordspacing punctopspacing punctbinspacing punctrelspacing \
-punctopenspacing punctclosespacing punctpunctspacing punctinnerspacing innerordspacing \
-inneropspacing innerbinspacing innerrelspacing inneropenspacing innerclosespacing \
-innerpunctspacing innerinnerspacing normalreqno startimath stopimath \
-normalstartimath normalstopimath startdmath stopdmath normalstartdmath \
-normalstopdmath normalsuperscript normalsubscript normalnosuperscript normalnosubscript \
-superscript subscript nosuperscript nosubscript uncramped \
-cramped triggermathstyle 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 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 lastlinewidth \
-assumelongusagecs Umathbotaccent 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 lesshyphens morehyphens nohyphens dohyphens \
-Ucheckedstartdisplaymath Ucheckedstopdisplaymath break nobreak allowbreak \
-goodbreak nospace nospacing dospacing naturalhbox \
-naturalvbox naturalvtop naturalhpack naturalvpack naturaltpack \
-reversehbox reversevbox reversevtop reversehpack reversevpack \
-reversetpack frule compoundhyphenpenalty start stop \
-unsupportedcs
+setfalsevalue setconditional newmacro setnewmacro newfraction \
+newsignal 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 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 shiftbox \
+vpackbox hpackbox vpackedbox hpackedbox ordordspacing \
+ordopspacing ordbinspacing ordrelspacing ordopenspacing ordclosespacing \
+ordpunctspacing ordinnerspacing opordspacing opopspacing opbinspacing \
+oprelspacing opopenspacing opclosespacing oppunctspacing opinnerspacing \
+binordspacing binopspacing binbinspacing binrelspacing binopenspacing \
+binclosespacing binpunctspacing bininnerspacing relordspacing relopspacing \
+relbinspacing relrelspacing relopenspacing relclosespacing relpunctspacing \
+relinnerspacing openordspacing openopspacing openbinspacing openrelspacing \
+openopenspacing openclosespacing openpunctspacing openinnerspacing closeordspacing \
+closeopspacing closebinspacing closerelspacing closeopenspacing closeclosespacing \
+closepunctspacing closeinnerspacing punctordspacing punctopspacing punctbinspacing \
+punctrelspacing punctopenspacing punctclosespacing punctpunctspacing punctinnerspacing \
+innerordspacing inneropspacing innerbinspacing innerrelspacing inneropenspacing \
+innerclosespacing innerpunctspacing innerinnerspacing normalreqno startimath \
+stopimath normalstartimath normalstopimath startdmath stopdmath \
+normalstartdmath normalstopdmath normalsuperscript normalsubscript normalnosuperscript \
+normalnosubscript superscript subscript nosuperscript nosubscript \
+superprescript subprescript nosuperprescript nosubsprecript uncramped \
+cramped mathstyletrigger triggermathstyle 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 Umathbotaccent Umathtopaccent 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 lesshyphens morehyphens \
+nohyphens dohyphens 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 futureletnexttoken defbackslashbreak \
+letbackslashbreak pushoverloadmode popoverloadmode pushrunstate poprunstate \
+suggestedalias newlocalcount newlocaldimen newlocalskip newlocalmuskip \
+newlocaltoks newlocalbox newlocalwrite newlocalread setnewlocalcount \
+setnewlocaldimen setnewlocalskip setnewlocalmuskip setnewlocaltoks setnewlocalbox
diff --git a/Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties
index 626ee931bd0..f1153a3f83d 100644
--- a/Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties
@@ -13,176 +13,178 @@ Bigm Bigr Box Bumpeq CONTEXT \
Cacute Cap Caps Ccaron Ccedilla \
Ccircumflex Cdotaccent Character Characters Chi \
Chook ConTeXt Context ConvertConstantAfter ConvertToConstant \
-Cstroke Cup DZcaronligature DZligature Dafrican \
-Dcaron Ddownarrow Delta Dhook Doteq \
-Downarrow Dstroke Dzcaronligature Dzligature ETEX \
-Eacute Ebreve Ecaron Ecedilla Ecircumflex \
-Ecircumflexacute Ecircumflexdotbelow Ecircumflexgrave Ecircumflexhook Ecircumflextilde \
-Ediaeresis Edotaccent Edotbelow Edoublegrave Egrave \
-Ehook Einvertedbreve Emacron Eogonek Epsilon \
-Eta Eth Etilde Eulerconst EveryLine \
-EveryPar Fhook Finv Gacute Game \
-Gamma Gbreve Gcaron Gcircumflex Gcommaaccent \
-Gdotaccent GetPar Ghook GotoPar Greeknumerals \
-Gstroke Hat Hcaron Hcircumflex Hstroke \
-IJligature INRSTEX Iacute Ibreve Icaron \
-Icircumflex Idiaeresis Idotaccent Idotbelow Idoublegrave \
-Igrave Ihook Iinvertedbreve Im Imacron \
-Iogonek Iota Istroke Itilde Jcircumflex \
-Join Kappa Kcaron Kcommaaccent Khook \
-LAMSTEX LATEX LJligature LUAJITTEX LUAMETATEX \
-LUATEX LaTeX Lacute LamSTeX Lambda \
-Lbar Lcaron Lcommaaccent Ldotmiddle Ldsh \
-Leftarrow Leftrightarrow Ljligature Lleftarrow Longleftarrow \
-Longleftrightarrow Longmapsfrom Longmapsto Longrightarrow Lsh \
-Lstroke Lua LuaMetaTeX LuaTeX LuajitTeX \
-METAFONT METAFUN METAPOST MKII MKIV \
-MKIX MKVI MKXI MONTH MONTHLONG \
-MONTHSHORT MPII MPIV MPVI MPanchor \
-MPbetex MPc MPcode MPcolor MPcoloronly \
-MPcolumn MPd MPdrawing MPfontsizehskip MPgetmultipars \
-MPgetmultishape MPgetposboxes MPh MPinclusions MPleftskip \
-MPll MPlr MPls MPmenubuttons MPn \
-MPoptions MPoverlayanchor MPp MPpage MPpardata \
-MPplus MPpos MPpositiongraphic MPposset MPr \
-MPrawvar MPregion MPrest MPrightskip MPrs \
-MPstring MPtext MPtransparency MPul MPur \
-MPv MPvar MPvariable MPvv MPw \
-MPwhd MPx MPxy MPxywhd MPy \
-Mapsfrom Mapsto MetaFont MetaFun MetaPost \
-Mu NJligature Nacute Ncaron Ncommaaccent \
-Nearrow Neng Ngrave Njligature NormalizeFontHeight \
-NormalizeFontWidth NormalizeTextHeight NormalizeTextWidth Ntilde Nu \
-Numbers Nwarrow OEligature Oacute Obreve \
-Ocaron Ocircumflex Ocircumflexacute Ocircumflexdotbelow Ocircumflexgrave \
-Ocircumflexhook Ocircumflextilde Odiaeresis Odiaeresismacron Odotaccent \
-Odotaccentmacron Odotbelow Odoublegrave Ograve Ohook \
-Ohorn Ohornacute Ohorndotbelow Ohorngrave Ohornhook \
-Ohorntilde Ohungarumlaut Oinvertedbreve Omacron Omega \
-Omicron Oogonek Oogonekmacron Ostroke Ostrokeacute \
-Otilde Otildemacron P PDFETEX PDFTEX \
-PDFcolor PICTEX PPCHTEX PPCHTeX PRAGMA \
-Phi Phook Pi PiCTeX Plankconst \
-PointsToBigPoints PointsToReal PointsToWholeBigPoints PropertyLine Psi \
-PtToCm Racute Rcaron Rcommaaccent Rdoublegrave \
-Rdsh Re ReadFile Relbar Rho \
-Rightarrow Rinvertedbreve Romannumerals Rrightarrow Rsh \
-S Sacute ScaledPointsToBigPoints ScaledPointsToWholeBigPoints Scaron \
-Scedilla Schwa Scircumflex Scommaaccent Searrow \
-Sigma Smallcapped Subset Supset Swarrow \
-TABLE TEX TaBlE Tau Tcaron \
-Tcedilla Tcommaaccent TeX TheNormalizedFontSize Theta \
-Thook Thorn TransparencyHack Tstroke Uacute \
-Ubreve Ucaron Ucircumflex Udiaeresis Udiaeresisacute \
-Udiaeresiscaron Udiaeresisgrave Udiaeresismacron Udotbelow Udoublegrave \
-Ugrave Uhook Uhorn Uhornacute Uhorndotbelow \
-Uhorngrave Uhornhook Uhorntilde Uhungarumlaut Uinvertedbreve \
-Umacron Uogonek Uparrow Updownarrow Upsilon \
-Uring Utilde Uuparrow VDash Vdash \
-VerboseNumber Vert Vvdash WEEKDAY WORD \
-WORDS Wcircumflex WidthSpanningText Word Words \
-XETEX XeTeX Xi Yacute Ycircumflex \
-Ydiaeresis Ydotbelow Ygrave Yhook Ymacron \
-Ytilde Zacute Zcaron Zdotaccent Zeta \
-Zhook Zstroke aacute abbreviation abjadnaivenumerals \
-abjadnodotnumerals abjadnumerals about abreve abreveacute \
-abrevedotbelow abrevegrave abrevehook abrevetilde acaron \
-acircumflex acircumflexacute acircumflexdotbelow acircumflexgrave acircumflexhook \
-acircumflextilde activatespacehandler actualday actualmonth actualyear \
-actuarial acute acwopencirclearrow adaptcollector adaptfontfeature \
-adaptlayout adaptpapersize addfeature addfontpath addtoJSpreamble \
-addtocommalist addvalue adiaeresis adiaeresismacron adotaccent \
-adotaccentmacron adotbelow adoublegrave aeacute aeligature \
-aemacron afghanicurrency aftersplitstring aftertestandsplitstring agrave \
-ahook ainvertedbreve aleph alignbottom aligned \
-alignedbox alignedline alignhere alignmentcharacter allinputpaths \
-alpha alphabeticnumerals alwayscitation alwayscite amacron \
-amalg ampersand anchor angle aogonek \
-appendetoks appendgvalue appendtocommalist appendtoks appendtoksonce \
-appendvalue apply applyalternativestyle applyprocessor applytocharacters \
-applytofirstcharacter applytosplitstringchar applytosplitstringcharspaced applytosplitstringline applytosplitstringlinespaced \
-applytosplitstringword applytosplitstringwordspaced applytowords approx approxEq \
-approxeq approxnEq arabicakbar arabicalayhe arabicallah \
-arabicallallahou arabicasterisk arabicbasmalah arabiccomma arabiccuberoot \
-arabicdateseparator arabicdecimals arabicdisputedendofayah arabicendofayah arabicexnumerals \
-arabicfootnotemarker arabicfourthroot arabichighain arabichighalayheassallam arabichigheqala \
-arabichighesala arabichighfootnotemarker arabichighjeem arabichighlamalef arabichighmadda \
-arabichighmeemlong arabichighmeemshort arabichighnisf arabichighnoon arabichighnoonkasra \
-arabichighqaf arabichighqif arabichighradiallahouanhu arabichighrahmatullahalayhe arabichighrubc \
-arabichighsad arabichighsajda arabichighsakta arabichighsallallahou arabichighseen \
-arabichighsmallsafha arabichightah arabichightakhallus arabichighthalatha arabichighwaqf \
-arabichighyeh arabichighzain arabicjallajalalouhou arabiclettermark arabiclowmeemlong \
-arabiclownoonkasra arabiclowseen arabicmisra arabicmuhammad arabicnumber \
-arabicnumberabove arabicnumerals arabicparenleft arabicparenright arabicpercent \
-arabicperiod arabicpermille arabicpertenthousand arabicpoeticverse arabicqala \
-arabicquestion arabicrasoul arabicray arabicrialsign arabicsafha \
-arabicsajdah arabicsalla arabicsamvat arabicsanah arabicsemicolon \
-arabicshighthreedots arabicslcm arabicstartofrubc arabictripledot arabicvowelwaw \
-arabicvowelyeh arabicwasallam arg aring aringacute \
-arrowvert asciistr aside assignalfadimension assigndimen \
-assigndimension assignifempty assigntranslation assignvalue assignwidth \
-assumelongusagecs ast astype asymp at \
-atilde atleftmargin atpage atrightmargin attachment \
-autocap autodirhbox autodirvbox autodirvtop autoinsertnextspace \
-autointegral automathematics autopagestaterealpage autopagestaterealpageorder autosetups \
-availablehsize averagecharwidth backepsilon background backgroundimage \
-backgroundimagefill backgroundline backprime backsim backslash \
-bar barleftarrow barleftarrowrightarrowbar barovernorthwestarrow barwedge \
-basegrid baselinebottom baselineleftbox baselinemiddlebox baselinerightbox \
-bbordermatrix bbox because beforesplitstring beforetestandsplitstring \
-beta beth between bhook big \
-bigbodyfont bigcap bigcirc bigcircle bigcup \
-bigdiamond bigg bigger biggl biggm \
-biggr bigl bigm bigodot bigoplus \
-bigotimes bigr bigskip bigsqcap bigsqcup \
-bigsquare bigstar bigtimes bigtriangledown bigtriangleup \
-bigudot biguplus bigvee bigwedge binom \
-bitmapimage blacklozenge blackrule blackrules blacksquare \
-blacktriangle blacktriangledown blacktriangleleft blacktriangleright blank \
-blap bleed bleedheight bleedwidth blockligatures \
-blockquote blocksynctexfile blockuservariable bodyfontenvironmentlist bodyfontsize \
-bold boldface bolditalic boldslanted bookmark \
-booleanmodevalue bordermatrix bot bottombox bottomleftbox \
-bottomrightbox bowtie boxcursor boxdot boxmarker \
-boxminus boxofsize boxplus boxreference boxtimes \
-bpos breakablethinspace breakhere breve bstroke \
-btxabbreviatedjournal btxaddjournal btxalwayscitation btxauthorfield btxdetail \
-btxdirect btxdoif btxdoifcombiinlistelse btxdoifelse btxdoifelsecombiinlist \
-btxdoifelsesameasprevious btxdoifelsesameaspreviouschecked btxdoifelseuservariable btxdoifnot btxdoifsameaspreviouscheckedelse \
-btxdoifsameaspreviouselse btxdoifuservariableelse btxexpandedjournal btxfield btxfieldname \
-btxfieldtype btxfirstofrange btxflush btxflushauthor btxflushauthorinverted \
-btxflushauthorinvertedshort btxflushauthorname btxflushauthornormal btxflushauthornormalshort btxflushsuffix \
-btxfoundname btxfoundtype btxhiddencitation btxhybridcite btxlabellanguage \
-btxlabeltext btxlistcitation btxloadjournalist btxoneorrange btxremapauthor \
-btxsavejournalist btxsetup btxsingularorplural btxsingularplural btxtextcitation \
-buildmathaccent buildtextaccent buildtextbottomcomma buildtextbottomdot buildtextcedilla \
-buildtextgrave buildtextmacron buildtextognek bullet button \
-cacute calligraphic camel cap capital \
-carriagereturn catcodetablename cbox ccaron ccedilla \
-ccircumflex ccurl cdot cdotaccent cdotp \
-cdots centeraligned centerbox centerdot centeredbox \
-centeredlastline centerednextbox centerline cfrac chapter \
-character characters chardescription charwidthlanguage check \
-checkcharacteralign checkedblank checkedchar checkedfiller checkedstrippedcsname \
-checkinjector checkmark checknextindentation checknextinjector checkpage \
-checkparameters checkpreviousinjector checksoundtrack checktwopassdata checkvariables \
-chem chemical chemicalbottext chemicalmidtext chemicalsymbol \
-chemicaltext chemicaltoptext chi chineseallnumerals chinesecapnumerals \
-chinesenumerals chook circ circeq circlearrowleft \
-circlearrowright circledR circledS circledast circledcirc \
-circleddash circledequals circleonrightarrow citation cite \
-clap classfont cldcommand cldcontext cldloadfile \
-cldprocessfile cleftarrow clip clippedoverlayimage clonefield \
-clubsuit collect collectedtext collectexpanded colon \
-coloncolonequals colonequals color colorbar colorcomponents \
-colored coloronly colorvalue column columnbreak \
-columnsetspanwidth combinepages commalistelement commalistsentence commalistsize \
-comment comparecolorgroup comparedimension comparedimensioneps comparepalet \
-complement completebtxrendering completecontent completeindex completelist \
-completelistofabbreviations completelistofchemicals completelistoffigures completelistofgraphics completelistofintermezzi \
-completelistoflogos completelistofpublications completelistofsorts completelistofsynonyms completelistoftables \
-completepagenumber completeregister complexes complexorsimple complexorsimpleempty \
-component composedcollector composedlayer compresult cong \
+Cstroke Cup DAYLONG DAYSHORT DZcaronligature \
+DZligature Dafrican Dcaron Ddownarrow Delta \
+Dhook Doteq Downarrow Dstroke Dzcaronligature \
+Dzligature ETEX Eacute Ebreve Ecaron \
+Ecedilla Ecircumflex Ecircumflexacute Ecircumflexdotbelow Ecircumflexgrave \
+Ecircumflexhook Ecircumflextilde Ediaeresis Edotaccent Edotbelow \
+Edoublegrave Egrave Ehook Einvertedbreve Emacron \
+Eogonek Epsilon Eta Eth Etilde \
+Eulerconst EveryLine EveryPar Fhook Finv \
+Gacute Game Gamma Gbreve Gcaron \
+Gcircumflex Gcommaaccent Gdotaccent GetPar Ghook \
+GotoPar Greeknumerals Gstroke Hat Hcaron \
+Hcircumflex Hstroke IJligature INRSTEX Iacute \
+Ibreve Icaron Icircumflex Idiaeresis Idotaccent \
+Idotbelow Idoublegrave Igrave Ihook Iinvertedbreve \
+Im Imacron Iogonek Iota Istroke \
+Itilde Jcircumflex Join Kappa Kcaron \
+Kcommaaccent Khook LAMSTEX LATEX LJligature \
+LUAJITTEX LUAMETATEX LUATEX LaTeX Lacute \
+LamSTeX Lambda Lbar Lcaron Lcommaaccent \
+Ldotmiddle Ldsh Leftarrow Leftrightarrow Ljligature \
+Lleftarrow Longleftarrow Longleftrightarrow Longmapsfrom Longmapsto \
+Longrightarrow Lsh Lstroke Lua LuaMetaTeX \
+LuaTeX LuajitTeX METAFONT METAFUN METAPOST \
+MKII MKIV MKIX MKLX MKVI \
+MKXI MKXL MONTH MONTHLONG MONTHSHORT \
+MPII MPIV MPLX MPVI MPXL \
+MPanchor MPbetex MPc MPcode MPcolor \
+MPcoloronly MPcolumn MPd MPdrawing MPfontsizehskip \
+MPgetmultipars MPgetmultishape MPgetposboxes MPh MPinclusions \
+MPleftskip MPll MPlr MPls MPmenubuttons \
+MPn MPoptions MPoverlayanchor MPp MPpage \
+MPpardata MPplus MPpos MPpositiongraphic MPposset \
+MPr MPrawvar MPregion MPrest MPrightskip \
+MPrs MPstring MPtext MPtransparency MPul \
+MPur MPv MPvar MPvariable MPvv \
+MPw MPwhd MPx MPxy MPxywhd \
+MPy Mapsfrom Mapsto MetaFont MetaFun \
+MetaPost Mu NJligature Nacute Ncaron \
+Ncommaaccent Nearrow Neng Ngrave Njligature \
+NormalizeFontHeight NormalizeFontWidth NormalizeTextHeight NormalizeTextWidth Ntilde \
+Nu Numbers Nwarrow OEligature Oacute \
+Obreve Ocaron Ocircumflex Ocircumflexacute Ocircumflexdotbelow \
+Ocircumflexgrave Ocircumflexhook Ocircumflextilde Odiaeresis Odiaeresismacron \
+Odotaccent Odotaccentmacron Odotbelow Odoublegrave Ograve \
+Ohook Ohorn Ohornacute Ohorndotbelow Ohorngrave \
+Ohornhook Ohorntilde Ohungarumlaut Oinvertedbreve Omacron \
+Omega Omicron Oogonek Oogonekmacron Ostroke \
+Ostrokeacute Otilde Otildemacron P PDFETEX \
+PDFTEX PDFcolor PICTEX PPCHTEX PPCHTeX \
+PRAGMA Phi Phook Pi PiCTeX \
+Plankconst PointsToBigPoints PointsToReal PointsToWholeBigPoints PropertyLine \
+Psi PtToCm Racute Rcaron Rcommaaccent \
+Rdoublegrave Rdsh Re ReadFile Relbar \
+Rho Rightarrow Rinvertedbreve Romannumerals Rrightarrow \
+Rsh S Sacute ScaledPointsToBigPoints ScaledPointsToWholeBigPoints \
+Scaron Scedilla Schwa Scircumflex Scommaaccent \
+Searrow Sigma Smallcapped Subset Supset \
+Swarrow TABLE TEX TaBlE Tau \
+Tcaron Tcedilla Tcommaaccent TeX TheNormalizedFontSize \
+Theta Thook Thorn TransparencyHack Tstroke \
+Uacute Ubreve Ucaron Ucircumflex Udiaeresis \
+Udiaeresisacute Udiaeresiscaron Udiaeresisgrave Udiaeresismacron Udotbelow \
+Udoublegrave Ugrave Uhook Uhorn Uhornacute \
+Uhorndotbelow Uhorngrave Uhornhook Uhorntilde Uhungarumlaut \
+Uinvertedbreve Umacron Uogonek Uparrow Updownarrow \
+Upsilon Uring Utilde Uuparrow VDash \
+Vdash VerboseNumber Vert Vhook Vvdash \
+WEEKDAY WORD WORDS Wcircumflex WidthSpanningText \
+Word Words XETEX XeTeX Xi \
+Yacute Ycircumflex Ydiaeresis Ydotbelow Ygrave \
+Yhook Ymacron Ytilde Zacute Zcaron \
+Zdotaccent Zeta Zhook Zstroke aacute \
+abbreviation abjadnaivenumerals abjadnodotnumerals abjadnumerals about \
+abreve abreveacute abrevedotbelow abrevegrave abrevehook \
+abrevetilde acaron acircumflex acircumflexacute acircumflexdotbelow \
+acircumflexgrave acircumflexhook acircumflextilde activatespacehandler actualday \
+actualmonth actualyear actuarial acute acwopencirclearrow \
+adaptcollector adaptfontfeature adaptlayout adaptpapersize addfeature \
+addtoJSpreamble addtocommalist addvalue adiaeresis adiaeresismacron \
+adotaccent adotaccentmacron adotbelow adoublegrave aeacute \
+aeligature aemacron afghanicurrency aftersplitstring aftertestandsplitstring \
+agrave ahook ainvertedbreve aleph alignbottom \
+aligned alignedbox alignedline alignhere alignmentcharacter \
+allinputpaths alpha alphabeticnumerals alwayscitation alwayscite \
+amacron amalg ampersand anchor angle \
+aogonek appendetoks appendgvalue appendtocommalist appendtoks \
+appendtoksonce appendvalue apply applyalternativestyle applyprocessor \
+applytocharacters applytofirstcharacter applytosplitstringchar applytosplitstringcharspaced applytosplitstringline \
+applytosplitstringlinespaced applytosplitstringword applytosplitstringwordspaced applytowords approx \
+approxEq approxeq approxnEq arabicakbar arabicalayhe \
+arabicallah arabicallallahou arabicasterisk arabicbasmalah arabiccomma \
+arabiccuberoot arabicdateseparator arabicdecimals arabicdisputedendofayah arabicendofayah \
+arabicexnumerals arabicfootnotemarker arabicfourthroot arabichighain arabichighalayheassallam \
+arabichigheqala arabichighesala arabichighfootnotemarker arabichighjeem arabichighlamalef \
+arabichighmadda arabichighmeemlong arabichighmeemshort arabichighnisf arabichighnoon \
+arabichighnoonkasra arabichighqaf arabichighqif arabichighradiallahouanhu arabichighrahmatullahalayhe \
+arabichighrubc arabichighsad arabichighsajda arabichighsakta arabichighsallallahou \
+arabichighseen arabichighsmallsafha arabichightah arabichightakhallus arabichighthalatha \
+arabichighwaqf arabichighyeh arabichighzain arabicjallajalalouhou arabiclettermark \
+arabiclowmeemlong arabiclownoonkasra arabiclowseen arabicmisra arabicmuhammad \
+arabicnumber arabicnumberabove arabicnumerals arabicparenleft arabicparenright \
+arabicpercent arabicperiod arabicpermille arabicpertenthousand arabicpoeticverse \
+arabicqala arabicquestion arabicrasoul arabicray arabicrialsign \
+arabicsafha arabicsajdah arabicsalla arabicsamvat arabicsanah \
+arabicsemicolon arabicshighthreedots arabicslcm arabicstartofrubc arabictripledot \
+arabicvowelwaw arabicvowelyeh arabicwasallam arg aring \
+aringacute arrowvert asciimode asciistr aside \
+assignalfadimension assigndimen assigndimension assignifempty assigntranslation \
+assignvalue assignwidth assumelongusagecs ast astype \
+asymp at atilde atleftmargin atpage \
+atrightmargin attachment autocap autodirhbox autodirvbox \
+autodirvtop autoinsertnextspace autointegral automathematics autoorientation \
+autopagestaterealpage autopagestaterealpageorder autorule autosetups availablehsize \
+averagecharwidth backepsilon background backgroundimage backgroundimagefill \
+backgroundline backprime backsim backslash bar \
+barleftarrow barleftarrowrightarrowbar barovernorthwestarrow barwedge basegrid \
+baselinebottom baselineleftbox baselinemiddlebox baselinerightbox bbordermatrix \
+bbox because beforesplitstring beforetestandsplitstring beta \
+beth between bhook big bigbodyfont \
+bigcap bigcirc bigcircle bigcup bigdiamond \
+bigg bigger biggl biggm biggr \
+bigl bigm bigodot bigoplus bigotimes \
+bigr bigskip bigsqcap bigsqcup bigsquare \
+bigstar bigtimes bigtriangledown bigtriangleup bigudot \
+biguplus bigvee bigwedge binom bitmapimage \
+blacklozenge blackrule blackrules blacksquare blacktriangle \
+blacktriangledown blacktriangleleft blacktriangleright blank blap \
+bleed bleedheight bleedwidth blockligatures blockquote \
+blocksynctexfile blockuservariable bodyfontenvironmentlist bodyfontsize bold \
+boldface bolditalic boldslanted bookmark booleanmodevalue \
+bordermatrix bot bottombox bottomleftbox bottomrightbox \
+bowtie boxcursor boxdot boxmarker boxminus \
+boxofsize boxplus boxreference boxtimes bpos \
+breakablethinspace breakhere breve bstroke btxabbreviatedjournal \
+btxaddjournal btxalwayscitation btxauthorfield btxdetail btxdirect \
+btxdoif btxdoifcombiinlistelse btxdoifelse btxdoifelsecombiinlist btxdoifelsesameasprevious \
+btxdoifelsesameaspreviouschecked btxdoifelseuservariable btxdoifnot btxdoifsameaspreviouscheckedelse btxdoifsameaspreviouselse \
+btxdoifuservariableelse btxexpandedjournal btxfield btxfieldname btxfieldtype \
+btxfirstofrange btxflush btxflushauthor btxflushauthorinverted btxflushauthorinvertedshort \
+btxflushauthorname btxflushauthornormal btxflushauthornormalshort btxflushsuffix btxfoundname \
+btxfoundtype btxhiddencitation btxhybridcite btxlabellanguage btxlabeltext \
+btxlistcitation btxloadjournalist btxoneorrange btxremapauthor btxsavejournalist \
+btxsetup btxsingularorplural btxsingularplural btxtextcitation buildmathaccent \
+buildtextaccent buildtextbottomcomma buildtextbottomdot buildtextcedilla buildtextgrave \
+buildtextmacron buildtextognek bullet button cacute \
+calligraphic camel cap capital carriagereturn \
+catcodetablename cbox ccaron ccedilla ccircumflex \
+ccurl cdot cdotaccent cdotp cdots \
+centeraligned centerbox centerdot centeredbox centeredlastline \
+centerednextbox centerline cfrac chapter character \
+characters chardescription charwidthlanguage check checkcharacteralign \
+checkedblank checkedchar checkedfiller checkedstrippedcsname checkinjector \
+checkmark checknextindentation checknextinjector checkpage checkparameters \
+checkpreviousinjector checksoundtrack checktwopassdata checkvariables chem \
+chemical chemicalbottext chemicalmidtext chemicalsymbol chemicaltext \
+chemicaltoptext chi chineseallnumerals chinesecapnumerals chinesenumerals \
+chook circ circeq circlearrowleft circlearrowright \
+circledR circledS circledast circledcirc circleddash \
+circledequals circleonrightarrow citation cite clap \
+classfont cldcommand cldcontext cldloadfile cldprocessfile \
+cleftarrow clip clippedoverlayimage clonefield clubsuit \
+collect collectedtext collectexpanded colon coloncolonequals \
+colonequals color colorbar colorcomponents colored \
+coloronly colorvalue column columnbreak columnsetspanwidth \
+combinepages commalistelement commalistsentence commalistsize comment \
+comparecolorgroup comparedimension comparedimensioneps comparepalet complement \
+completebtxrendering completecontent completeindex completelist completelistofabbreviations \
+completelistofchemicals completelistoffigures completelistofgraphics completelistofintermezzi completelistoflogos \
+completelistofpublications completelistofsorts completelistofsynonyms completelistoftables completepagenumber \
+completeregister complexes complexorsimple complexorsimpleempty component \
+composedcollector composedlayer compounddiscretionary compresult cong \
constantdimen constantdimenargument constantemptyargument constantnumber constantnumberargument \
contentreference continuednumber continueifinputfile convertargument convertcommand \
convertedcounter converteddimen convertedsubcounter convertmonth convertnumber \
@@ -253,22 +255,23 @@ cyrillicyerudiaeresis cyrillicyi cyrillicyo cyrillicystr cyrillicystrstroke \
cyrillicyu cyrillicz cyrilliczdsc cyrilliczediaeresis cyrilliczh \
cyrilliczhebreve cyrilliczhedescender cyrilliczhediaeresis d dag \
dagger daleth dasharrow dashedleftarrow dashedrightarrow \
-dashv datasetvariable date dayoftheweek dayspermonth \
-dbinom dcaron dcurl ddag ddagger \
-dddot ddot ddots decrement decrementcounter \
-decrementedcounter decrementpagenumber decrementsubpagenumber decrementvalue defaultinterface \
-defaultobjectpage defaultobjectreference defcatcodecommand defconvertedargument defconvertedcommand \
-defconvertedvalue define defineMPinstance defineTABLEsetup defineaccent \
-defineactivecharacter definealternativestyle defineanchor defineattachment defineattribute \
-definebackground definebar defineblock definebodyfont definebodyfontenvironment \
-definebodyfontswitch definebreakpoint definebreakpoints definebtx definebtxdataset \
-definebtxregister definebtxrendering definebuffer definebutton definecapitals \
-definecharacter definecharacterkerning definecharacterspacing definechemical definechemicals \
-definechemicalsymbol definecollector definecolor definecolorgroup definecolumnbreak \
-definecolumnset definecolumnsetarea definecolumnsetspan definecombination definecombinedlist \
-definecommand definecomment definecomplexorsimple definecomplexorsimpleempty defineconversion \
-defineconversionset definecounter definedataset definedelimitedtext definedeq \
-definedescription definedfont defineeffect defineenumeration defineexpandable \
+dashv datasetvariable date daylong dayoftheweek \
+dayshort dayspermonth dbinom dcaron dcurl \
+ddag ddagger dddot ddot ddots \
+decrement decrementcounter decrementedcounter decrementpagenumber decrementsubpagenumber \
+decrementvalue defaultinterface defaultobjectpage defaultobjectreference defcatcodecommand \
+defconvertedargument defconvertedcommand defconvertedvalue define defineMPinstance \
+defineTABLEsetup defineaccent defineactivecharacter definealternativestyle defineanchor \
+defineattachment defineattribute definebackground definebar defineblock \
+definebodyfont definebodyfontenvironment definebodyfontswitch definebreakpoint definebreakpoints \
+definebtx definebtxdataset definebtxregister definebtxrendering definebuffer \
+definebutton definecapitals definecharacter definecharacterkerning definecharacterspacing \
+definechemical definechemicals definechemicalsymbol definecollector definecolor \
+definecolorgroup definecolumnbreak definecolumnset definecolumnsetarea definecolumnsetspan \
+definecombination definecombinedlist definecommand definecomment definecomplexorsimple \
+definecomplexorsimpleempty defineconversion defineconversionset definecounter definedataset \
+definedate definedelimitedtext definedeq definedescription definedfont \
+definedocument defineeffect defineenumeration defineexpandable defineexpansion \
defineexternalfigure definefacingfloat definefallbackfamily definefield definefieldbody \
definefieldbodyset definefieldcategory definefieldstack definefiguresymbol definefileconstant \
definefilefallback definefilesynonym definefiller definefirstline definefittingpage \
@@ -278,7 +281,7 @@ definefontstyle definefontsynonym defineformula defineformulaalternative definef
defineframed defineframedcontent defineframedtable defineframedtext definefrozenfont \
defineglobalcolor definegraphictypesynonym definegridsnapping definehbox definehead \
defineheadalternative definehelp definehigh definehighlight definehspace \
-definehypenationfeatures defineindentedtext defineindenting defineinitial defineinsertion \
+definehyphenationfeatures defineindentedtext defineindenting defineinitial defineinsertion \
defineinteraction defineinteractionbar defineinteractionmenu defineinterfaceconstant defineinterfaceelement \
defineinterfacevariable defineinterlinespace defineintermediatecolor defineitemgroup defineitems \
definelabel definelabelclass definelayer definelayerpreset definelayout \
@@ -290,67 +293,69 @@ definemathdoubleextensible definemathematics definemathextensible definemathfenc
definemathframed definemathmatrix definemathornament definemathover definemathoverextensible \
definemathovertextextensible definemathradical definemathstackers definemathstyle definemathtriplet \
definemathunder definemathunderextensible definemathundertextextensible definemathunstacked definemeasure \
-definemessageconstant definemixedcolumns definemode definemultitonecolor definenamedcolor \
-definenamespace definenarrower definenote defineornament defineoutputroutine \
-defineoutputroutinecommand defineoverlay definepage definepagebreak definepagechecker \
-definepagecolumns definepageinjection definepageinjectionalternative definepageshift definepagestate \
-definepairedbox definepalet definepapersize defineparagraph defineparagraphs \
-defineparallel defineparbuilder defineperiodkerning defineplacement definepositioning \
-defineprefixset defineprocesscolor defineprocessor defineprofile defineprogram \
-definepushbutton definepushsymbol definereference definereferenceformat defineregister \
-definerenderingwindow defineresetset defineruby definescale definescript \
-definesection definesectionblock definesectionlevels defineselector defineseparatorset \
-defineshift definesidebar definesort definesorting definespotcolor \
-definestartstop definestyle definestyleinstance definesubfield definesubformula \
-definesymbol definesynonym definesynonyms definesystemattribute definesystemconstant \
-definesystemvariable definetabletemplate definetabulate definetabulation definetext \
-definetextbackground definetextflow definetextnote definetokenlist definetooltip \
-definetransparency definetwopasslist definetype definetypeface definetypescriptprefix \
-definetypescriptsynonym definetypesetting definetyping defineunit defineuserdata \
-defineuserdataalternative defineviewerlayer definevspace definevspacing definevspacingamount \
-definextable delimited delimitedtext delta depthofstring \
-depthonlybox depthspanningtext depthstrut determineheadnumber determinelistcharacteristics \
-determinenoflines determineregistercharacteristics devanagarinumerals dfrac dhook \
-diameter diamond diamondsuit differentialD differentiald \
-digamma digits dimensiontocount directboxfromcache directcolor \
-directcolored directconvertedcounter directcopyboxfromcache directdummyparameter directgetboxllx \
-directgetboxlly directhighlight directlocalframed directluacode directselect \
-directsetbar directsetup directsymbol directvspacing dis \
-disabledirectives disableexperiments disablemode disableoutputstream disableparpositions \
-disableregime disabletrackers displaymath displaymathematics displaymessage \
+definemessageconstant definemixedcolumns definemode definemulticolumns definemultitonecolor \
+definenamedcolor definenamespace definenarrower definenote defineorientation \
+defineornament defineoutputroutine defineoutputroutinecommand defineoverlay definepage \
+definepagebreak definepagechecker definepagecolumns definepageinjection definepageinjectionalternative \
+definepageshift definepagestate definepairedbox definepalet definepapersize \
+defineparagraph defineparagraphs defineparallel defineparbuilder defineperiodkerning \
+defineplaceholder defineplacement definepositioning defineprefixset defineprocesscolor \
+defineprocessor defineprofile defineprogram definepushbutton definepushsymbol \
+definereference definereferenceformat defineregister definerenderingwindow defineresetset \
+defineruby definescale definescript definesection definesectionblock \
+definesectionlevels defineselector defineseparatorset defineshift definesidebar \
+definesort definesorting definespotcolor definestartstop definestyle \
+definestyleinstance definesubfield definesubformula definesymbol definesynonym \
+definesynonyms definesystemattribute definesystemconstant definesystemvariable definetabletemplate \
+definetabulate definetext definetextbackground definetextflow definetextnote \
+definetokenlist definetooltip definetransparency definetwopasslist definetype \
+definetypeface definetypescriptprefix definetypescriptsynonym definetypesetting definetyping \
+defineunit defineuserdata defineuserdataalternative defineviewerlayer definevspace \
+definevspacing definevspacingamount definextable defrostparagraphproperties delimited \
+delimitedtext delta depthofstring depthonlybox depthspanningtext \
+depthstrut determineheadnumber determinelistcharacteristics determinenoflines determineregistercharacteristics \
+devanagarinumerals dfrac dhook diameter diamond \
+diamondsuit differentialD differentiald digamma digits \
+dimensiontocount directboxfromcache directcolor directcolored directconvertedcounter \
+directcopyboxfromcache directdummyparameter directgetboxllx directgetboxlly directhighlight \
+directlocalframed directluacode directparwrapper directselect directsetbar \
+directsetup directsymbol directvspacing dis disabledirectives \
+disableexperiments disablemode disableoutputstream disableparpositions disableregime \
+disabletrackers displaymath displaymathematics displaymessage disposeluatable \
distributedhsize div dividedsize divideontimes divides \
doadaptleftskip doadaptrightskip doaddfeature doassign doassignempty \
-doboundtext docheckassignment docheckedpagestate docheckedpair documentvariable \
-dodoubleargument dodoubleargumentwithset dodoubleempty dodoubleemptywithset dodoublegroupempty \
-doeassign doexpandedrecurse dofastloopcs dogetattribute dogetattributeid \
-dogetcommacommandelement dogobbledoubleempty dogobblesingleempty doif doifMPgraphicelse \
+doboundtext docheckassignment docheckedpair documentvariable dodoubleargument \
+dodoubleargumentwithset dodoubleempty dodoubleemptywithset dodoublegroupempty doeassign \
+doexpandedrecurse dofastloopcs dogetattribute dogetattributeid dogetcommacommandelement \
+dogobbledoubleempty dogobblesingleempty dohyphens doif doifMPgraphicelse \
doifallcommon doifallcommonelse doifalldefinedelse doifallmodes doifallmodeselse \
doifassignmentelse doifassignmentelsecs doifblackelse doifbothsides doifbothsidesoverruled \
-doifboxelse doifbufferelse doifcolor doifcolorelse doifcommandhandler \
-doifcommandhandlerelse doifcommon doifcommonelse doifcontent doifconversiondefinedelse \
-doifconversionnumberelse doifcounter doifcounterelse doifcurrentfonthasfeatureelse doifdefined \
-doifdefinedcounter doifdefinedcounterelse doifdefinedelse doifdimensionelse doifdimenstringelse \
-doifdocumentargument doifdocumentargumentelse doifdocumentfilename doifdocumentfilenameelse doifdocumentvariable \
-doifdocumentvariableelse doifdrawingblackelse doifelse doifelseMPgraphic doifelseallcommon \
-doifelsealldefined doifelseallmodes doifelseassignment doifelseassignmentcs doifelseblack \
-doifelsebox doifelseboxincache doifelsebuffer doifelsecolor doifelsecommandhandler \
-doifelsecommon doifelseconversiondefined doifelseconversionnumber doifelsecounter doifelsecurrentfonthasfeature \
-doifelsecurrentsortingused doifelsecurrentsynonymshown doifelsecurrentsynonymused doifelsedefined doifelsedefinedcounter \
-doifelsedimension doifelsedimenstring doifelsedocumentargument doifelsedocumentfilename doifelsedocumentvariable \
-doifelsedrawingblack doifelseempty doifelseemptyvalue doifelseemptyvariable doifelseenv \
-doifelsefastoptionalcheck doifelsefastoptionalcheckcs doifelsefieldbody doifelsefieldcategory doifelsefigure \
-doifelsefile doifelsefiledefined doifelsefileexists doifelsefirstchar doifelseflagged \
-doifelsefontchar doifelsefontfeature doifelsefontpresent doifelsefontsynonym doifelseframed \
-doifelsehasspace doifelsehelp doifelseincsname doifelseinelement doifelseinputfile \
-doifelseinsertion doifelseinset doifelseinstring doifelseinsymbolset doifelseintoks \
-doifelseintwopassdata doifelseitalic doifelselanguage doifelselayerdata doifelselayoutdefined \
-doifelselayoutsomeline doifelselayouttextline doifelseleapyear doifelselist doifelselocation \
-doifelselocfile doifelsemainfloatbody doifelsemarkedpage doifelsemarking doifelsemeaning \
-doifelsemessage doifelsemode doifelsenextbgroup doifelsenextbgroupcs doifelsenextchar \
-doifelsenextoptional doifelsenextoptionalcs doifelsenextparenthesis doifelsenonzeropositive doifelsenoteonsamepage \
-doifelsenothing doifelsenumber doifelseobjectfound doifelseobjectreferencefound doifelseoddpage \
-doifelseoddpagefloat doifelseoldercontext doifelseolderversion doifelseoverlapping doifelseoverlay \
-doifelseparallel doifelseparentfile doifelsepath doifelsepathexists doifelsepatterns \
+doifboxelse doifbufferelse doifcheckedpagestate doifcolor doifcolorelse \
+doifcommandhandler doifcommandhandlerelse doifcommon doifcommonelse doifcontent \
+doifconversiondefinedelse doifconversionnumberelse doifcounter doifcounterelse doifcurrentfonthasfeatureelse \
+doifdefined doifdefinedcounter doifdefinedcounterelse doifdefinedelse doifdimensionelse \
+doifdimenstringelse doifdocumentargument doifdocumentargumentelse doifdocumentfilename doifdocumentfilenameelse \
+doifdocumentvariable doifdocumentvariableelse doifdrawingblackelse doifelse doifelseMPgraphic \
+doifelseallcommon doifelsealldefined doifelseallmodes doifelseassignment doifelseassignmentcs \
+doifelseblack doifelsebox doifelseboxincache doifelsebuffer doifelsecolor \
+doifelsecommandhandler doifelsecommon doifelseconversiondefined doifelseconversionnumber doifelsecounter \
+doifelsecurrentfonthasfeature doifelsecurrentsortingused doifelsecurrentsynonymshown doifelsecurrentsynonymused doifelsedefined \
+doifelsedefinedcounter doifelsedimension doifelsedimenstring doifelsedocumentargument doifelsedocumentfilename \
+doifelsedocumentvariable doifelsedrawingblack doifelseempty doifelseemptyvalue doifelseemptyvariable \
+doifelseenv doifelsefastoptionalcheck doifelsefastoptionalcheckcs doifelsefieldbody doifelsefieldcategory \
+doifelsefigure doifelsefile doifelsefiledefined doifelsefileexists doifelsefirstchar \
+doifelseflagged doifelsefontchar doifelsefontfeature doifelsefontpresent doifelsefontsynonym \
+doifelseframed doifelsehasspace doifelsehelp doifelseincsname doifelseindented \
+doifelseinelement doifelseinputfile doifelseinsertion doifelseinset doifelseinstring \
+doifelseinsymbolset doifelseintoks doifelseintwopassdata doifelseitalic doifelselanguage \
+doifelselayerdata doifelselayoutdefined doifelselayoutsomeline doifelselayouttextline doifelseleapyear \
+doifelselist doifelselocation doifelselocfile doifelsemainfloatbody doifelsemarkedcontent \
+doifelsemarkedpage doifelsemarking doifelsemeaning doifelsemessage doifelsemode \
+doifelsenextbgroup doifelsenextbgroupcs doifelsenextchar doifelsenextoptional doifelsenextoptionalcs \
+doifelsenextparenthesis doifelsenonzeropositive doifelsenoteonsamepage doifelsenothing doifelsenumber \
+doifelseobjectfound doifelseobjectreferencefound doifelseoddpage doifelseoddpagefloat doifelseoldercontext \
+doifelseolderversion doifelseorientation doifelseoverlapping doifelseoverlay doifelseparallel \
+doifelseparentfile doifelseparwrapper doifelsepath doifelsepathexists doifelsepatterns \
doifelseposition doifelsepositionaction doifelsepositiononpage doifelsepositionsonsamepage doifelsepositionsonthispage \
doifelsepositionsused doifelsereferencefound doifelserightpage doifelserightpagefloat doifelserighttoleftinbox \
doifelsesamelinereference doifelsesamestring doifelsesetups doifelsesomebackground doifelsesomespace \
@@ -376,169 +381,171 @@ doifnotenv doifnoteonsamepageelse doifnotescollected doifnotfile doifnotflagged
doifnothing doifnothingelse doifnotinset doifnotinsidesplitfloat doifnotinstring \
doifnotmode doifnotnumber doifnotsamestring doifnotsetups doifnotvalue \
doifnotvariable doifnumber doifnumberelse doifobjectfoundelse doifobjectreferencefoundelse \
-doifoddpageelse doifoddpagefloatelse doifoldercontextelse doifolderversionelse doifoverlappingelse \
-doifoverlayelse doifparallelelse doifparentfileelse doifpathelse doifpathexistselse \
-doifpatternselse doifposition doifpositionaction doifpositionactionelse doifpositionelse \
-doifpositiononpageelse doifpositionsonsamepageelse doifpositionsonthispageelse doifpositionsusedelse doifreferencefoundelse \
-doifrightpagefloatelse doifrighttoleftinboxelse doifsamelinereferenceelse doifsamestring doifsamestringelse \
-doifsetups doifsetupselse doifsomebackground doifsomebackgroundelse doifsomespaceelse \
-doifsomething doifsomethingelse doifsometoks doifsometokselse doifstringinstringelse \
-doifstructurelisthasnumberelse doifstructurelisthaspageelse doifsymboldefinedelse doifsymbolsetelse doiftext \
-doiftextelse doiftextflowcollectorelse doiftextflowelse doiftopofpageelse doiftypingfileelse \
-doifundefined doifundefinedcounter doifundefinedelse doifunknownfontfeature doifurldefinedelse \
-doifvalue doifvalueelse doifvaluenothing doifvaluenothingelse doifvaluesomething \
-doifvariable doifvariableelse doindentation dollar doloop \
-doloopoverlist donothing dontconvertfont dontleavehmode dontpermitspacesbetweengroups \
-dopositionaction doprocesslocalsetups doquadrupleargument doquadrupleempty doquadruplegroupempty \
-doquintupleargument doquintupleempty doquintuplegroupempty dorechecknextindentation dorecurse \
-dorepeatwithcommand doreplacefeature doresetandafffeature doresetattribute dorotatebox \
-dosetattribute dosetleftskipadaption dosetrightskipadaption dosetupcheckedinterlinespace doseventupleargument \
-doseventupleempty dosingleargument dosingleempty dosinglegroupempty dosixtupleargument \
-dosixtupleempty dostepwiserecurse dosubtractfeature dot doteq \
-doteqdot dotfskip dotlessI dotlessJ dotlessi \
-dotlessj dotlessjstroke dotminus dotoks dotplus \
-dotripleargument dotripleargumentwithset dotripleempty dotripleemptywithset dotriplegroupempty \
-dots dottedcircle dottedrightarrow doublebar doublebond \
-doublebrace doublebracket doublecap doublecup doubleparent \
-doubleprime doubleverticalbar dowith dowithnextbox dowithnextboxcontent \
-dowithnextboxcontentcs dowithnextboxcs dowithpargument dowithrange dowithwargument \
-downarrow downdasharrow downdownarrows downharpoonleft downharpoonright \
-downuparrows downwhitearrow downzigzagarrow dpofstring dstroke \
-dtail dummydigit dummyparameter dzcaronligature dzligature \
-eTeX eacute ebreve ecaron ecedilla \
-ecircumflex ecircumflexacute ecircumflexdotbelow ecircumflexgrave ecircumflexhook \
-ecircumflextilde edefconvertedargument ediaeresis edotaccent edotbelow \
-edoublegrave efcmaxheight efcmaxwidth efcminheight efcminwidth \
-efcparameter effect egrave ehook einvertedbreve \
-elapsedseconds elapsedtime eleftarrowfill eleftharpoondownfill eleftharpoonupfill \
+doifoddpageelse doifoddpagefloatelse doifoldercontextelse doifolderversionelse doifoutervmode \
+doifoverlappingelse doifoverlayelse doifparallelelse doifparentfileelse doifpathelse \
+doifpathexistselse doifpatternselse doifposition doifpositionaction doifpositionactionelse \
+doifpositionelse doifpositiononpageelse doifpositionsonsamepageelse doifpositionsonthispageelse doifpositionsusedelse \
+doifreferencefoundelse doifrightpageelse doifrightpagefloatelse doifrighttoleftinboxelse doifsamelinereferenceelse \
+doifsamestring doifsamestringelse doifsetups doifsetupselse doifsomebackground \
+doifsomebackgroundelse doifsomespaceelse doifsomething doifsomethingelse doifsometoks \
+doifsometokselse doifstringinstringelse doifstructurelisthasnumberelse doifstructurelisthaspageelse doifsymboldefinedelse \
+doifsymbolsetelse doiftext doiftextelse doiftextflowcollectorelse doiftextflowelse \
+doiftopofpageelse doiftypingfileelse doifundefined doifundefinedcounter doifundefinedelse \
+doifunknownfontfeature doifurldefinedelse doifvalue doifvalueelse doifvaluenothing \
+doifvaluenothingelse doifvaluesomething doifvariable doifvariableelse doindentation \
+dollar doloop doloopoverlist donothing dontconvertfont \
+dontleavehmode dontpermitspacesbetweengroups dopositionaction doprocesslocalsetups doquadrupleargument \
+doquadrupleempty doquadruplegroupempty doquintupleargument doquintupleempty doquintuplegroupempty \
+dorechecknextindentation dorecurse dorepeatwithcommand doreplacefeature doresetandafffeature \
+doresetattribute dorotatebox dosetattribute dosetleftskipadaption dosetrightskipadaption \
+dosetupcheckedinterlinespace doseventupleargument doseventupleempty dosingleargument dosingleempty \
+dosinglegroupempty dosixtupleargument dosixtupleempty dosomebreak dostepwiserecurse \
+dosubtractfeature dot doteq doteqdot dotfill \
+dotfskip dotlessI dotlessJ dotlessi dotlessj \
+dotlessjstroke dotminus dotoks dotplus dotripleargument \
+dotripleargumentwithset dotripleempty dotripleemptywithset dotriplegroupempty dots \
+dottedcircle dottedrightarrow doublebar doublebond doublebrace \
+doublebracket doublecap doublecup doubleparent doubleprime \
+doubleverticalbar dowith dowithnextbox dowithnextboxcontent dowithnextboxcontentcs \
+dowithnextboxcs dowithpargument dowithrange dowithwargument downarrow \
+downdasharrow downdownarrows downharpoonleft downharpoonright downuparrows \
+downwhitearrow downzigzagarrow dpofstring dstroke dtail \
+dummydigit dummyparameter dzcaronligature dzligature eTeX \
+eacute ebreve ecaron ecedilla ecircumflex \
+ecircumflexacute ecircumflexdotbelow ecircumflexgrave ecircumflexhook ecircumflextilde \
+edefconvertedargument ediaeresis edotaccent edotbelow edoublegrave \
+efcmaxheight efcmaxwidth efcminheight efcminwidth efcparameter \
+effect egrave ehook einvertedbreve elapsedseconds \
+elapsedsteptime elapsedtime eleftarrowfill eleftharpoondownfill eleftharpoonupfill \
eleftrightarrowfill ell em emacron emdash \
emphasisboldface emphasistypeface emptylines emptyset emquad \
-emspace enabledirectives enableexperiments enablemode enableoutputstream \
-enableparpositions enableregime enabletrackers endash endnote \
-enquad enskip enspace env environment \
-envvar eogonek eoverbarfill eoverbracefill eoverbracketfill \
-eoverparentfill epos epsilon eq eqcirc \
-eqeq eqeqeq eqgtr eqless eqsim \
-eqslantgtr eqslantless equaldigits equalscolon equiv \
-erightarrowfill erightharpoondownfill erightharpoonupfill eta eth \
-ethiopic etilde etwoheadrightarrowfill eunderbarfill eunderbracefill \
-eunderbracketfill eunderparentfill exclamdown executeifdefined exists \
-exitloop exitloopnow expandcheckedcsname expanded expandeddoif \
-expandeddoifelse expandeddoifnot expandfontsynonym expdoif expdoifcommonelse \
-expdoifelse expdoifelsecommon expdoifelseinset expdoifinsetelse expdoifnot \
-exponentiale externalfigure externalfigurecollectionmaxheight externalfigurecollectionmaxwidth externalfigurecollectionminheight \
-externalfigurecollectionminwidth externalfigurecollectionparameter fakebox fallingdotseq fastdecrement \
-fastincrement fastlocalframed fastloopfinal fastloopindex fastscale \
-fastsetup fastsetupwithargument fastsetupwithargumentswapped fastswitchtobodyfont fastsxsy \
-feature fence fenced fetchallmarkings fetchallmarks \
-fetchmark fetchmarking fetchonemark fetchonemarking fetchruntinecommand \
-fetchtwomarkings fetchtwomarks ffiligature ffligature fflligature \
-fhook field fieldbody fieldstack fifthoffivearguments \
-fifthofsixarguments figurefilename figurefilepath figurefiletype figurefullname \
-figureheight figurenaturalheight figurenaturalwidth figurespace figuresymbol \
-figurewidth filename filigature filledhboxb filledhboxc \
-filledhboxg filledhboxk filledhboxm filledhboxr filledhboxy \
-filler fillinline fillinrules fillintext fillupto \
-filterfromnext filterfromvalue filterpages filterreference findtwopassdata \
-finishregisterentry firstcharacter firstcounter firstcountervalue firstinlist \
-firstoffivearguments firstoffourarguments firstofoneargument firstofoneunexpanded firstofsixarguments \
-firstofthreearguments firstofthreeunexpanded firstoftwoarguments firstoftwounexpanded firstrealpage \
-firstrealpagenumber firstsubcountervalue firstsubpage firstsubpagenumber firstuserpage \
-firstuserpagenumber fitfield fitfieldframed fittopbaselinegrid fiveeighths \
-fivesixths fixedspace fixedspaces flag flat \
-flligature floatuserdataparameter flushbox flushboxregister flushcollector \
-flushedrightlastline flushlayer flushlocalfloats flushnextbox flushnotes \
-flushoutputstream flushshapebox flushtextflow flushtokens flushtoks \
-fontalternative fontbody fontchar fontcharbyindex fontclass \
-fontclassname fontface fontfeaturelist fontsize fontstyle \
-footnote footnotetext forall forcecharacterstripping forcelocalfloats \
-forgeteverypar forgetparameters forgetparskip forgetragged formula \
-formulanumber foundbox fourfifths fourperemspace fourthoffivearguments \
-fourthoffourarguments fourthofsixarguments frac framed frameddimension \
-framedparameter framedtext freezedimenmacro freezemeasure frenchspacing \
-from fromlinenote frown frozenhbox frule \
-gacute gamma gbreve gcaron gcircumflex \
-gcommaaccent gdefconvertedargument gdefconvertedcommand gdotaccent ge \
-geq geqq geqslant getMPdrawing getMPlayer \
-getboxfromcache getboxllx getboxlly getbuffer getbufferdata \
-getcommacommandsize getcommalistsize getdayoftheweek getdayspermonth getdefinedbuffer \
+emspace enableasciimode enabledirectives enableexperiments enablemode \
+enableoutputstream enableparpositions enableregime enabletrackers endash \
+endnote enquad enskip enspace env \
+environment envvar eogonek eoverbarfill eoverbracefill \
+eoverbracketfill eoverparentfill epos epsilon eq \
+eqcirc eqeq eqeqeq eqgtr eqless \
+eqsim eqslantgtr eqslantless equaldigits equalscolon \
+equiv erightarrowfill erightharpoondownfill erightharpoonupfill eta \
+eth ethiopic etilde etwoheadrightarrowfill eunderbarfill \
+eunderbracefill eunderbracketfill eunderparentfill exclamdown executeifdefined \
+exists exitloop exitloopnow expandcheckedcsname expanded \
+expandeddoif expandeddoifelse expandeddoifnot expandfontsynonym expdoif \
+expdoifcommonelse expdoifelse expdoifelsecommon expdoifelseinset expdoifinsetelse \
+expdoifnot exponentiale externalfigure externalfigurecollectionmaxheight externalfigurecollectionmaxwidth \
+externalfigurecollectionminheight externalfigurecollectionminwidth externalfigurecollectionparameter fakebox fallingdotseq \
+fastdecrement fastincrement fastlocalframed fastloopfinal fastloopindex \
+fastscale fastsetup fastsetupwithargument fastsetupwithargumentswapped fastswitchtobodyfont \
+fastsxsy feature fence fenced fetchallmarkings \
+fetchallmarks fetchmark fetchmarking fetchonemark fetchonemarking \
+fetchruntinecommand fetchtwomarkings fetchtwomarks ffiligature ffligature \
+fflligature fhook field fieldbody fieldstack \
+fifthoffivearguments fifthofsixarguments figurefilename figurefilepath figurefiletype \
+figurefullname figureheight figurenaturalheight figurenaturalwidth figurespace \
+figuresymbol figurewidth filename filigature filledhboxb \
+filledhboxc filledhboxg filledhboxk filledhboxm filledhboxr \
+filledhboxy filler fillinline fillinrules fillintext \
+fillupto filterfromnext filterfromvalue filterpages filterreference \
+findtwopassdata finishregisterentry firstcharacter firstcounter firstcountervalue \
+firstinlist firstoffivearguments firstoffourarguments firstofoneargument firstofoneunexpanded \
+firstofsixarguments firstofthreearguments firstofthreeunexpanded firstoftwoarguments firstoftwounexpanded \
+firstrealpage firstrealpagenumber firstsubcountervalue firstsubpage firstsubpagenumber \
+firstuserpage firstuserpagenumber fitfield fitfieldframed fittopbaselinegrid \
+fiveeighths fivesixths fixedspace fixedspaces flag \
+flat flligature floatuserdataparameter flushbox flushboxregister \
+flushcollector flushedrightlastline flushlayer flushlocalfloats flushnextbox \
+flushnotes flushoutputstream flushshapebox flushtextflow flushtokens \
+flushtoks fontalternative fontbody fontchar fontcharbyindex \
+fontclass fontclassname fontface fontfeaturelist fontsize \
+fontstyle footnote footnotetext forall forcecharacterstripping \
+forcelocalfloats forgeteverypar forgetparagraphfreezing forgetparameters forgetparskip \
+forgetparwrapper forgetragged formula formulanumber foundbox \
+fourfifths fourperemspace fourthoffivearguments fourthoffourarguments fourthofsixarguments \
+frac framed frameddimension framedparameter framedtext \
+freezedimenmacro freezemeasure freezeparagraphproperties frenchspacing from \
+fromlinenote frown frozenhbox frule gacute \
+gamma gbreve gcaron gcircumflex gcommaaccent \
+gdefconvertedargument gdefconvertedcommand gdotaccent ge geq \
+geqq geqslant getMPdrawing getMPlayer getboxfromcache \
+getboxllx getboxlly getbuffer getbufferdata getcommacommandsize \
+getcommalistsize getdatavalue getdayoftheweek getdayspermonth getdefinedbuffer \
getdocumentargument getdocumentargumentdefault getdocumentfilename getdummyparameters getemptyparameters \
geteparameters getexpandedparameters getfiguredimensions getfirstcharacter getfirsttwopassdata \
-getfromcommacommand getfromcommalist getfromtwopassdata getglyphdirect getglyphstyled \
-getgparameters getinlineuserdata getlasttwopassdata getlocalfloat getlocalfloats \
-getmarking getmessage getnamedglyphdirect getnamedglyphstyled getnamedtwopassdatalist \
-getnaturaldimensions getnoflines getobject getobjectdimensions getpaletsize \
-getparameters getprivatechar getprivateslot getrandomcount getrandomdimen \
-getrandomfloat getrandomnumber getrandomseed getraweparameters getrawgparameters \
-getrawnoflines getrawparameters getrawxparameters getreference getreferenceentry \
-getroundednoflines gets getsubstring gettokenlist gettwopassdata \
-gettwopassdatalist getuserdata getuvalue getvalue getvariable \
-getvariabledefault getxparameters gg ggg gggtr \
-gimel globaldisablemode globalenablemode globalletempty globalpopbox \
-globalpopmacro globalpreventmode globalprocesscommalist globalpushbox globalpushmacro \
-globalswapcounts globalswapdimens globalswapmacros globalundefine glyphfontfile \
-gnapprox gneqq gnsim gobbledoubleempty gobbleeightarguments \
-gobblefivearguments gobblefiveoptionals gobblefourarguments gobblefouroptionals gobbleninearguments \
-gobbleoneargument gobbleoneoptional gobblesevenarguments gobblesingleempty gobblesixarguments \
-gobblespacetokens gobbletenarguments gobblethreearguments gobblethreeoptionals gobbletwoarguments \
-gobbletwooptionals gobbleuntil gobbleuntilrelax godown goto \
-gotobox gotopage grabbufferdata grabbufferdatadirect grabuntil \
-grave graycolor grayvalue greedysplitstring greekAlpha \
-greekAlphadasia greekAlphadasiaperispomeni greekAlphadasiatonos greekAlphadasiavaria greekAlphaiotasub \
-greekAlphaiotasubdasia greekAlphaiotasubdasiaperispomeni greekAlphaiotasubdasiatonos greekAlphaiotasubdasiavaria greekAlphaiotasubpsili \
-greekAlphaiotasubpsiliperispomeni greekAlphaiotasubpsilitonos greekAlphaiotasubpsilivaria greekAlphamacron greekAlphapsili \
-greekAlphapsiliperispomeni greekAlphapsilitonos greekAlphapsilivaria greekAlphatonos greekAlphavaria \
-greekAlphavrachy greekBeta greekChi greekCoronis greekDelta \
-greekEpsilon greekEpsilondasia greekEpsilondasiatonos greekEpsilondasiavaria greekEpsilonpsili \
-greekEpsilonpsilitonos greekEpsilonpsilivaria greekEpsilontonos greekEpsilonvaria greekEta \
-greekEtadasia greekEtadasiaperispomeni greekEtadasiatonos greekEtadasiavaria greekEtaiotasub \
-greekEtaiotasubdasia greekEtaiotasubdasiaperispomeni greekEtaiotasubdasiatonos greekEtaiotasubdasiavaria greekEtaiotasubpsili \
-greekEtaiotasubpsiliperispomeni greekEtaiotasubpsilitonos greekEtaiotasubpsilivaria greekEtapsili greekEtapsiliperispomeni \
-greekEtapsilitonos greekEtapsilivaria greekEtatonos greekEtavaria greekGamma \
-greekIota greekIotadasia greekIotadasiaperispomeni greekIotadasiatonos greekIotadasiavaria \
-greekIotadialytika greekIotamacron greekIotapsili greekIotapsiliperispomeni greekIotapsilitonos \
-greekIotapsilivaria greekIotatonos greekIotavaria greekIotavrachy greekKappa \
-greekLambda greekMu greekNu greekOmega greekOmegadasia \
-greekOmegadasiaperispomeni greekOmegadasiatonos greekOmegadasiavaria greekOmegaiotasub greekOmegaiotasubdasia \
-greekOmegaiotasubdasiaperispomeni greekOmegaiotasubdasiatonos greekOmegaiotasubdasiavaria greekOmegaiotasubpsili greekOmegaiotasubpsiliperispomeni \
-greekOmegaiotasubpsilitonos greekOmegaiotasubpsilivaria greekOmegapsili greekOmegapsiliperispomeni greekOmegapsilitonos \
-greekOmegapsilivaria greekOmegatonos greekOmegavaria greekOmicron greekOmicrondasia \
-greekOmicrondasiatonos greekOmicrondasiavaria greekOmicronpsili greekOmicronpsilitonos greekOmicronpsilivaria \
-greekOmicrontonos greekOmicronvaria greekPhi greekPi greekPsi \
-greekRho greekRhodasia greekSigma greekSigmalunate greekTau \
-greekTheta greekUpsilon greekUpsilondasia greekUpsilondasiaperispomeni greekUpsilondasiatonos \
-greekUpsilondasiavaria greekUpsilondialytika greekUpsilonmacron greekUpsilontonos greekUpsilonvaria \
-greekUpsilonvrachy greekXi greekZeta greekalpha greekalphadasia \
-greekalphadasiaperispomeni greekalphadasiatonos greekalphadasiavaria greekalphaiotasub greekalphaiotasubdasia \
-greekalphaiotasubdasiaperispomeni greekalphaiotasubdasiatonos greekalphaiotasubdasiavaria greekalphaiotasubperispomeni greekalphaiotasubpsili \
-greekalphaiotasubpsiliperispomeni greekalphaiotasubpsilitonos greekalphaiotasubpsilivaria greekalphaiotasubtonos greekalphaiotasubvaria \
-greekalphamacron greekalphaoxia greekalphaperispomeni greekalphapsili greekalphapsiliperispomeni \
-greekalphapsilitonos greekalphapsilivaria greekalphatonos greekalphavaria greekalphavrachy \
-greekbeta greekbetaalt greekchi greekdasia greekdasiaperispomeni \
-greekdasiatonos greekdasiavaria greekdelta greekdialytikaperispomeni greekdialytikatonos \
-greekdialytikavaria greekdigamma greekepsilon greekepsilonalt greekepsilondasia \
-greekepsilondasiatonos greekepsilondasiavaria greekepsilonoxia greekepsilonpsili greekepsilonpsilitonos \
-greekepsilonpsilivaria greekepsilontonos greekepsilonvaria greeketa greeketadasia \
-greeketadasiaperispomeni greeketadasiatonos greeketadasiavaria greeketaiotasub greeketaiotasubdasia \
-greeketaiotasubdasiaperispomeni greeketaiotasubdasiatonos greeketaiotasubdasiavaria greeketaiotasubperispomeni greeketaiotasubpsili \
-greeketaiotasubpsiliperispomeni greeketaiotasubpsilitonos greeketaiotasubpsilivaria greeketaiotasubtonos greeketaiotasubvaria \
-greeketaoxia greeketaperispomeni greeketapsili greeketapsiliperispomeni greeketapsilitonos \
-greeketapsilivaria greeketatonos greeketavaria greekfinalsigma greekgamma \
-greekiota greekiotadasia greekiotadasiaperispomeni greekiotadasiatonos greekiotadasiavaria \
-greekiotadialytika greekiotadialytikaperispomeni greekiotadialytikatonos greekiotadialytikavaria greekiotamacron \
-greekiotaoxia greekiotaperispomeni greekiotapsili greekiotapsiliperispomeni greekiotapsilitonos \
-greekiotapsilivaria greekiotatonos greekiotavaria greekiotavrachy greekkappa \
-greekkoppa greeklambda greekmu greeknu greeknumerals \
-greeknumkoppa greekomega greekomegadasia greekomegadasiaperispomeni greekomegadasiatonos \
-greekomegadasiavaria greekomegaiotasub greekomegaiotasubdasia greekomegaiotasubdasiaperispomeni greekomegaiotasubdasiatonos \
-greekomegaiotasubdasiavaria greekomegaiotasubperispomeni greekomegaiotasubpsili greekomegaiotasubpsiliperispomeni greekomegaiotasubpsilitonos \
-greekomegaiotasubpsilivaria greekomegaiotasubtonos greekomegaiotasubvaria greekomegaoxia greekomegaperispomeni \
-greekomegapsili greekomegapsiliperispomeni greekomegapsilitonos greekomegapsilivaria greekomegatonos \
-greekomegavaria greekomicron greekomicrondasia greekomicrondasiatonos greekomicrondasiavaria \
-greekomicronoxia greekomicronpsili greekomicronpsilitonos greekomicronpsilivaria greekomicrontonos \
-greekomicronvaria greekoxia greekperispomeni greekphi greekphialt \
-greekpi greekpialt greekprosgegrammeni greekpsi greekpsili \
-greekpsiliperispomeni greekpsilitonos greekpsilivaria greekrho greekrhoalt \
+getfromcommacommand getfromcommalist getfromluatable getfromtwopassdata getglyphdirect \
+getglyphstyled getgparameters getinlineuserdata getlasttwopassdata getlocalfloat \
+getlocalfloats getmarking getmessage getnamedglyphdirect getnamedglyphstyled \
+getnamedtwopassdatalist getnaturaldimensions getnoflines getobject getobjectdimensions \
+getpaletsize getparameters getparwrapper getprivatechar getprivateslot \
+getrandomcount getrandomdimen getrandomfloat getrandomnumber getrandomseed \
+getraweparameters getrawgparameters getrawnoflines getrawparameters getrawxparameters \
+getreference getreferenceentry getroundednoflines gets getsubstring \
+gettokenlist gettwopassdata gettwopassdatalist getuserdata getuvalue \
+getvalue getvariable getvariabledefault getxparameters gg \
+ggg gggtr gimel globaldisablemode globalenablemode \
+globalletempty globalpopbox globalpopmacro globalpreventmode globalprocesscommalist \
+globalpushbox globalpushmacro globalswapcounts globalswapdimens globalswapmacros \
+globalundefine glyphfontfile gnapprox gneqq gnsim \
+gobbledoubleempty gobbleeightarguments gobblefivearguments gobblefiveoptionals gobblefourarguments \
+gobblefouroptionals gobbleninearguments gobbleoneargument gobbleoneoptional gobblesevenarguments \
+gobblesingleempty gobblesixarguments gobblespacetokens gobbletenarguments gobblethreearguments \
+gobblethreeoptionals gobbletwoarguments gobbletwooptionals gobbleuntil gobbleuntilrelax \
+godown goto gotobox gotopage grabbufferdata \
+grabbufferdatadirect grabuntil grave graycolor grayvalue \
+greedysplitstring greekAlpha greekAlphadasia greekAlphadasiaperispomeni greekAlphadasiatonos \
+greekAlphadasiavaria greekAlphaiotasub greekAlphaiotasubdasia greekAlphaiotasubdasiaperispomeni greekAlphaiotasubdasiatonos \
+greekAlphaiotasubdasiavaria greekAlphaiotasubpsili greekAlphaiotasubpsiliperispomeni greekAlphaiotasubpsilitonos greekAlphaiotasubpsilivaria \
+greekAlphamacron greekAlphapsili greekAlphapsiliperispomeni greekAlphapsilitonos greekAlphapsilivaria \
+greekAlphatonos greekAlphavaria greekAlphavrachy greekBeta greekChi \
+greekCoronis greekDelta greekEpsilon greekEpsilondasia greekEpsilondasiatonos \
+greekEpsilondasiavaria greekEpsilonpsili greekEpsilonpsilitonos greekEpsilonpsilivaria greekEpsilontonos \
+greekEpsilonvaria greekEta greekEtadasia greekEtadasiaperispomeni greekEtadasiatonos \
+greekEtadasiavaria greekEtaiotasub greekEtaiotasubdasia greekEtaiotasubdasiaperispomeni greekEtaiotasubdasiatonos \
+greekEtaiotasubdasiavaria greekEtaiotasubpsili greekEtaiotasubpsiliperispomeni greekEtaiotasubpsilitonos greekEtaiotasubpsilivaria \
+greekEtapsili greekEtapsiliperispomeni greekEtapsilitonos greekEtapsilivaria greekEtatonos \
+greekEtavaria greekGamma greekIota greekIotadasia greekIotadasiaperispomeni \
+greekIotadasiatonos greekIotadasiavaria greekIotadialytika greekIotamacron greekIotapsili \
+greekIotapsiliperispomeni greekIotapsilitonos greekIotapsilivaria greekIotatonos greekIotavaria \
+greekIotavrachy greekKappa greekLambda greekMu greekNu \
+greekOmega greekOmegadasia greekOmegadasiaperispomeni greekOmegadasiatonos greekOmegadasiavaria \
+greekOmegaiotasub greekOmegaiotasubdasia greekOmegaiotasubdasiaperispomeni greekOmegaiotasubdasiatonos greekOmegaiotasubdasiavaria \
+greekOmegaiotasubpsili greekOmegaiotasubpsiliperispomeni greekOmegaiotasubpsilitonos greekOmegaiotasubpsilivaria greekOmegapsili \
+greekOmegapsiliperispomeni greekOmegapsilitonos greekOmegapsilivaria greekOmegatonos greekOmegavaria \
+greekOmicron greekOmicrondasia greekOmicrondasiatonos greekOmicrondasiavaria greekOmicronpsili \
+greekOmicronpsilitonos greekOmicronpsilivaria greekOmicrontonos greekOmicronvaria greekPhi \
+greekPi greekPsi greekRho greekRhodasia greekSigma \
+greekSigmalunate greekTau greekTheta greekUpsilon greekUpsilondasia \
+greekUpsilondasiaperispomeni greekUpsilondasiatonos greekUpsilondasiavaria greekUpsilondialytika greekUpsilonmacron \
+greekUpsilontonos greekUpsilonvaria greekUpsilonvrachy greekXi greekZeta \
+greekalpha greekalphadasia greekalphadasiaperispomeni greekalphadasiatonos greekalphadasiavaria \
+greekalphaiotasub greekalphaiotasubdasia greekalphaiotasubdasiaperispomeni greekalphaiotasubdasiatonos greekalphaiotasubdasiavaria \
+greekalphaiotasubperispomeni greekalphaiotasubpsili greekalphaiotasubpsiliperispomeni greekalphaiotasubpsilitonos greekalphaiotasubpsilivaria \
+greekalphaiotasubtonos greekalphaiotasubvaria greekalphamacron greekalphaoxia greekalphaperispomeni \
+greekalphapsili greekalphapsiliperispomeni greekalphapsilitonos greekalphapsilivaria greekalphatonos \
+greekalphavaria greekalphavrachy greekbeta greekbetaalt greekchi \
+greekdasia greekdasiaperispomeni greekdasiavaria greekdelta greekdialytikaperispomeni \
+greekdialytikatonos greekdialytikavaria greekdigamma greekepsilon greekepsilonalt \
+greekepsilondasia greekepsilondasiatonos greekepsilondasiavaria greekepsilonoxia greekepsilonpsili \
+greekepsilonpsilitonos greekepsilonpsilivaria greekepsilontonos greekepsilonvaria greeketa \
+greeketadasia greeketadasiaperispomeni greeketadasiatonos greeketadasiavaria greeketaiotasub \
+greeketaiotasubdasia greeketaiotasubdasiaperispomeni greeketaiotasubdasiatonos greeketaiotasubdasiavaria greeketaiotasubperispomeni \
+greeketaiotasubpsili greeketaiotasubpsiliperispomeni greeketaiotasubpsilitonos greeketaiotasubpsilivaria greeketaiotasubtonos \
+greeketaiotasubvaria greeketaoxia greeketaperispomeni greeketapsili greeketapsiliperispomeni \
+greeketapsilitonos greeketapsilivaria greeketatonos greeketavaria greekfinalsigma \
+greekgamma greekiota greekiotadasia greekiotadasiaperispomeni greekiotadasiatonos \
+greekiotadasiavaria greekiotadialytika greekiotadialytikaperispomeni greekiotadialytikatonos greekiotadialytikavaria \
+greekiotamacron greekiotaoxia greekiotaperispomeni greekiotapsili greekiotapsiliperispomeni \
+greekiotapsilitonos greekiotapsilivaria greekiotatonos greekiotavaria greekiotavrachy \
+greekkappa greekkoppa greeklambda greekmu greeknu \
+greeknumerals greeknumkoppa greekomega greekomegadasia greekomegadasiaperispomeni \
+greekomegadasiatonos greekomegadasiavaria greekomegaiotasub greekomegaiotasubdasia greekomegaiotasubdasiaperispomeni \
+greekomegaiotasubdasiatonos greekomegaiotasubdasiavaria greekomegaiotasubperispomeni greekomegaiotasubpsili greekomegaiotasubpsiliperispomeni \
+greekomegaiotasubpsilitonos greekomegaiotasubpsilivaria greekomegaiotasubtonos greekomegaiotasubvaria greekomegaoxia \
+greekomegaperispomeni greekomegapsili greekomegapsiliperispomeni greekomegapsilitonos greekomegapsilivaria \
+greekomegatonos greekomegavaria greekomicron greekomicrondasia greekomicrondasiatonos \
+greekomicrondasiavaria greekomicronoxia greekomicronpsili greekomicronpsilitonos greekomicronpsilivaria \
+greekomicrontonos greekomicronvaria greekoxia greekperispomeni greekphi \
+greekphialt greekpi greekpialt greekprosgegrammeni greekpsi \
+greekpsili greekpsiliperispomeni greekpsilivaria greekrho greekrhoalt \
greekrhodasia greekrhopsili greeksampi greeksigma greeksigmalunate \
greekstigma greektau greektheta greekthetaalt greektonos \
greekupsilon greekupsilondasia greekupsilondasiaperispomeni greekupsilondasiatonos greekupsilondasiavaria \
@@ -560,93 +567,98 @@ hebrewGimel hebrewHe hebrewHet hebrewKaf hebrewKaffinal \
hebrewLamed hebrewMem hebrewMemfinal hebrewNun hebrewNunfinal \
hebrewPe hebrewPefinal hebrewQof hebrewResh hebrewSamekh \
hebrewShin hebrewTav hebrewTet hebrewTsadi hebrewTsadifinal \
-hebrewVav hebrewYod hebrewZayin heightanddepthofstring heightofstring \
-heightspanningtext helptext hglue hiddenbar hiddencitation \
-hiddencite hideblocks high highlight highordinalstr \
-hilo himilo hl hookleftarrow hookrightarrow \
-horizontalgrowingbar horizontalpositionbar hpackbox hpackedbox hphantom \
-hpos hsizefraction hslash hsmash hsmashbox \
-hsmashed hspace hstroke htdpofstring htofstring \
-hyphen hyphenatedcoloredword hyphenatedfile hyphenatedfilename hyphenatedhbox \
-hyphenatedpar hyphenatedurl hyphenatedword iacute ibox \
-ibreve icaron icircumflex ideographichalffillspace ideographicspace \
-idiaeresis idotaccent idotbelow idoublegrave ifassignment \
-iff ifinobject ifinoutputstream ifparameters iftrialtypesetting \
-ignoreimplicitspaces ignoretagsinexport ignorevalue igrave ihook \
-iiiint iiiintop iiint iiintop iint \
-iintop iinvertedbreve ijligature imacron imaginaryi \
-imaginaryj imath immediatesavetwopassdata impliedby implies \
-imply in includemenu includeversioninfo increment \
-incrementcounter incrementedcounter incrementpagenumber incrementsubpagenumber incrementvalue \
-indentation index infofont infofontbold inframed \
-infty infull inheritparameter inhibitblank ininner \
-ininneredge ininnermargin initializeboxstack inleft inleftedge \
-inleftmargin inline inlinebuffer inlinedbox inlinemath \
-inlinemathematics inlinemessage inlineordisplaymath inlineprettyprintbuffer inlinerange \
-inmargin inmframed innerflushshapebox inother inouter \
-inouteredge inoutermargin input inputfilebarename inputfilename \
-inputfilerealsuffix inputfilesuffix inputgivenfile inright inrightedge \
-inrightmargin insertpages installactionhandler installactivecharacter installanddefineactivecharacter \
-installattributestack installautocommandhandler installautosetuphandler installbasicautosetuphandler installbasicparameterhandler \
-installbottomframerenderer installcommandhandler installcorenamespace installdefinehandler installdefinitionset \
-installdefinitionsetmember installdirectcommandhandler installdirectparameterhandler installdirectparametersethandler installdirectsetuphandler \
-installdirectstyleandcolorhandler installframedautocommandhandler installframedcommandhandler installglobalmacrostack installlanguage \
-installleftframerenderer installmacrostack installnamespace installoutputroutine installpagearrangement \
-installparameterhandler installparameterhashhandler installparametersethandler installparentinjector installrightframerenderer \
-installrootparameterhandler installsetuphandler installsetuponlycommandhandler installshipoutmethod installsimplecommandhandler \
-installsimpleframedcommandhandler installstyleandcolorhandler installswitchcommandhandler installswitchsetuphandler installtexdirective \
-installtextracker installtopframerenderer installunitsseparator installunitsspace installversioninfo \
-int intclockwise integerrounding integers interactionbar \
-interactionbuttons interactionmenu intercal intertext intop \
-invisibletimes invokepageheandler iogonek iota italic \
-italicbold italiccorrection italicface item items \
-itemtag itilde jcaron jcircumflex jmath \
-jobfilename jobfilesuffix kap kappa kcaron \
-kcommaaccent keepblocks keeplinestogether keepunwantedspaces kerncharacters \
-khook kkra koreancirclenumerals koreannumerals koreannumeralsc \
-koreannumeralsp koreanparentnumerals lVert labellanguage labeltext \
-labeltexts lacute lambda lambdabar land \
-langle language languageCharacters languagecharacters languagecharwidth \
-lastcounter lastcountervalue lastdigit lastlinewidth lastnaturalboxdp \
-lastnaturalboxht lastnaturalboxwd lastpredefinedsymbol lastrealpage lastrealpagenumber \
-lastsubcountervalue lastsubpage lastsubpagenumber lasttwodigits lastuserpage \
-lastuserpagenumber lateluacode latin layeredtext layerheight \
-layerwidth lazysavetaggedtwopassdata lazysavetwopassdata lbar lbox \
-lbrace lbracket lcaron lceil lcommaaccent \
-lcurl ldotmiddle ldotp ldots le \
-leadsto left leftaligned leftarrow leftarrowtail \
-leftarrowtriangle leftbottombox leftbox leftdasharrow leftguillemot \
-leftharpoondown leftharpoonup lefthbox leftheadtext leftlabeltext \
-leftleftarrows leftline leftmathlabeltext leftorrighthbox leftorrightvbox \
-leftorrightvtop leftrightarrow leftrightarrows leftrightarrowtriangle leftrightharpoons \
-leftrightsquigarrow leftskipadaption leftsquigarrow leftsubguillemot leftthreetimes \
-lefttopbox lefttoright lefttorighthbox lefttorightvbox lefttorightvtop \
-leftwavearrow leftwhitearrow leq leqq leqslant \
-lessapprox lessdot lesseqgtr lesseqqgtr lessgtr \
-lesssim letbeundefined letcatcodecommand letcscsname letcsnamecs \
-letcsnamecsname letdummyparameter letempty letgvalue letgvalueempty \
-letgvalurelax letterampersand letterat letterbackslash letterbar \
-letterbgroup letterclosebrace lettercolon letterdollar letterdoublequote \
-letteregroup letterescape letterexclamationmark letterhash letterhat \
-letterleftbrace letterleftbracket letterleftparenthesis letterless lettermore \
-letteropenbrace letterpercent letterquestionmark letterrightbrace letterrightbracket \
-letterrightparenthesis lettersinglequote letterslash letterspacing lettertilde \
-letterunderscore letvalue letvalueempty letvaluerelax lfence \
-lfloor lgroup lhbox lhooknwarrow lhooksearrow \
-limitatefirstline limitatelines limitatetext line linebox \
-linefeed linenote linespanningtext linethickness linterval \
-listcitation listcite listlength listnamespaces ljligature \
-ll llangle llap llbracket llcorner \
-lll llless lmoustache lnapprox lneq \
-lneqq lnot lnsim loadanyfile loadanyfileonce \
-loadbtxdefinitionfile loadbtxreplacementfile loadcldfile loadcldfileonce loadfontgoodies \
-loadluafile loadluafileonce loadspellchecklist loadtexfile loadtexfileonce \
-loadtypescriptfile localframed localframedwithsettings localhsize localpopbox \
-localpopmacro localpushbox localpushmacro localundefine locatedfilepath \
-locatefilepath locfilename logo lohi lointerval \
-lomihi longleftarrow longleftrightarrow longmapsfrom longmapsto \
-longrightarrow longrightsquigarrow looparrowleft looparrowright lor \
-low lowerbox lowercased lowercasestring lowerleftdoubleninequote \
+hebrewVav hebrewYod hebrewZayin hebrewnumerals heightanddepthofstring \
+heightofstring heightspanningtext helptext hexnumber hexstringtonumber \
+hglue hiddenbar hiddencitation hiddencite hideblocks \
+high highlight highordinalstr hilo himilo \
+hl hookleftarrow hookrightarrow horizontalgrowingbar horizontalpositionbar \
+hpackbox hpackedbox hphantom hpos hsizefraction \
+hslash hsmash hsmashbox hsmashed hspace \
+hstroke htdpofstring htofstring hyphen hyphenatedcoloredword \
+hyphenatedfile hyphenatedfilename hyphenatedhbox hyphenatedpar hyphenatedurl \
+hyphenatedword iacute ibox ibreve icaron \
+icircumflex ideographichalffillspace ideographicspace idiaeresis idotaccent \
+idotbelow idoublegrave idxfromluatable ifassignment iff \
+ifinobject ifinoutputstream ifparameters iftrialtypesetting ignoreimplicitspaces \
+ignoretagsinexport ignorevalue igrave ihook iiiint \
+iiiintop iiint iiintop iint iintop \
+iinvertedbreve ijligature imacron imaginaryi imaginaryj \
+imath immediatesavetwopassdata impliedby implies imply \
+in includemenu includesvgbuffer includesvgfile includeversioninfo \
+increment incrementcounter incrementedcounter incrementpagenumber incrementsubpagenumber \
+incrementvalue indentation index infofont infofontbold \
+inframed infty infull inheritparameter inhibitblank \
+ininner ininneredge ininnermargin initializeboxstack inleft \
+inleftedge inleftmargin inline inlinebuffer inlinedbox \
+inlinemath inlinemathematics inlinemessage inlineordisplaymath inlineprettyprintbuffer \
+inlinerange inmargin inmframed innerflushshapebox inother \
+inouter inouteredge inoutermargin input inputfilebarename \
+inputfilename inputfilerealsuffix inputfilesuffix inputgivenfile inright \
+inrightedge inrightmargin insertpages inspectluatable installactionhandler \
+installactivecharacter installanddefineactivecharacter installattributestack installautocommandhandler installautosetuphandler \
+installbasicautosetuphandler installbasicparameterhandler installbottomframerenderer installcommandhandler installcorenamespace \
+installctxfunction installctxscanner installdefinehandler installdefinitionset installdefinitionsetmember \
+installdirectcommandhandler installdirectparameterhandler installdirectparametersethandler installdirectsetuphandler installdirectstyleandcolorhandler \
+installframedautocommandhandler installframedcommandhandler installglobalmacrostack installlanguage installleftframerenderer \
+installmacrostack installnamespace installoutputroutine installpagearrangement installparameterhandler \
+installparameterhashhandler installparametersethandler installparentinjector installprotectedctxfunction installprotectedctxscanner \
+installrightframerenderer installrootparameterhandler installsetuphandler installsetuponlycommandhandler installshipoutmethod \
+installsimplecommandhandler installsimpleframedcommandhandler installstyleandcolorhandler installswitchcommandhandler installswitchsetuphandler \
+installtexdirective installtextracker installtopframerenderer installunitsseparator installunitsspace \
+installversioninfo int intclockwise integerrounding integers \
+interactionbar interactionbuttons interactionmenu intercal intertext \
+interwordspaceafter interwordspacebefore interwordspaces interwordspacesafter interwordspacesbefore \
+intop invisibletimes invokepagehandler iogonek iota \
+italic italicbold italiccorrection italicface item \
+items itemtag itilde jcaron jcircumflex \
+jmath jobfilename jobfilesuffix kap kappa \
+kcaron kcommaaccent keepblocks keeplinestogether keepunwantedspaces \
+kerncharacters khook kkra koreancirclenumerals koreannumerals \
+koreannumeralsc koreannumeralsp koreanparentnumerals lVert labellanguage \
+labeltext labeltexts lacute lambda lambdabar \
+land langle language languageCharacters languagecharacters \
+languagecharwidth lastcounter lastcountervalue lastdigit lastlinewidth \
+lastnaturalboxdp lastnaturalboxht lastnaturalboxwd lastparwrapper lastpredefinedsymbol \
+lastrealpage lastrealpagenumber lastsubcountervalue lastsubpage lastsubpagenumber \
+lasttwodigits lastuserpage lastuserpagenumber lateluacode latin \
+layeredtext layerheight layerwidth lazysavetaggedtwopassdata lazysavetwopassdata \
+lbar lbox lbrace lbracket lcaron \
+lceil lchexnumber lchexnumbers lcommaaccent lcurl \
+ldotmiddle ldotp ldots le leadsto \
+left leftaligned leftarrow leftarrowtail leftarrowtriangle \
+leftbottombox leftbox leftdasharrow leftguillemot leftharpoondown \
+leftharpoonup lefthbox leftheadtext leftlabeltext leftleftarrows \
+leftline leftmathlabeltext leftorrighthbox leftorrightvbox leftorrightvtop \
+leftrightarrow leftrightarrows leftrightarrowtriangle leftrightharpoons leftrightsquigarrow \
+leftskipadaption leftsquigarrow leftsubguillemot leftthreetimes lefttopbox \
+lefttoright lefttorighthbox lefttorightvbox lefttorightvtop leftwavearrow \
+leftwhitearrow leq leqq leqslant lessapprox \
+lessdot lesseqgtr lesseqqgtr lessgtr lesssim \
+letbeundefined letcatcodecommand letcscsname letcsnamecs letcsnamecsname \
+letdummyparameter letempty letgvalue letgvalueempty letgvalurelax \
+letterampersand letterat letterbackslash letterbar letterbgroup \
+letterclosebrace lettercolon letterdollar letterdoublequote letteregroup \
+letterescape letterexclamationmark letterhash letterhat letterleftbrace \
+letterleftbracket letterleftparenthesis letterless lettermore letteropenbrace \
+letterpercent letterquestionmark letterrightbrace letterrightbracket letterrightparenthesis \
+lettersinglequote letterslash letterspacing lettertilde letterunderscore \
+letvalue letvalueempty letvaluerelax lfence lfloor \
+lgroup lhbox lhooknwarrow lhooksearrow limitatefirstline \
+limitatelines limitatetext line linebox linefeed \
+linefillerhbox linefillervbox linefillervtop linenote linespanningtext \
+linethickness linterval listcitation listcite listlength \
+listnamespaces literalmode ljligature ll llangle \
+llap llbracket llcorner lll llless \
+llointerval lmoustache lnapprox lneq lneqq \
+lnot lnsim loadanyfile loadanyfileonce loadbtxdefinitionfile \
+loadbtxreplacementfile loadcldfile loadcldfileonce loadfontgoodies loadluafile \
+loadluafileonce loadspellchecklist loadtexfile loadtexfileonce loadtypescriptfile \
+localframed localframedwithsettings localhsize localpopbox localpopmacro \
+localpushbox localpushmacro localundefine locatedfilepath locatefilepath \
+locfilename logo lohi lointerval lomihi \
+longleftarrow longleftrightarrow longmapsfrom longmapsto longrightarrow \
+longrightsquigarrow looparrowleft looparrowright lor low \
+lowerbox lowercased lowercasestring lowercasing lowerleftdoubleninequote \
lowerleftsingleninequote lowerrightdoubleninequote lowerrightsingleninequote lozenge lparent \
lrcorner lrointerval lrtbbox lstroke lt \
ltimes ltop ltrhbox ltrvbox ltrvtop \
@@ -657,50 +669,51 @@ m mLeftarrow mLeftrightarrow mRightarrow mainlanguage \
makecharacteractive makerawcommalist makestrutofbox maltese mapfontsize \
mapsdown mapsfrom mapsto mapsup margindata \
margintext markcontent markedpages marking markinjector \
-markpage mat math mathampersand mathbf \
-mathbi mathblackboard mathbs mathdefault mathdollar \
-mathdouble mathematics mathfraktur mathfunction mathhash \
-mathhyphen mathit mathitalic mathlabellanguage mathlabeltext \
-mathlabeltexts mathop mathover mathpercent mathrm \
-mathscript mathsl mathss mathtext mathtextbf \
-mathtextbi mathtextbs mathtextit mathtextsl mathtexttf \
-mathtf mathtriplet mathtt mathunder mathupright \
-mathword mathwordbf mathwordbi mathwordbs mathwordit \
-mathwordsl mathwordtf maxaligned mbox mcframed \
-measure measured measuredangle measuredeq medskip \
-medspace menubutton mequal message mfence \
-mframed mfunction mfunctionlabeltext mhbox mho \
-mhookleftarrow mhookrightarrow mid midaligned middle \
-middlealigned middlebox midhbox midsubsentence minimalhbox \
-minus minuscolon mirror mixedcaps mkvibuffer \
-mleftarrow mleftharpoondown mleftharpoonup mleftrightarrow mleftrightharpoons \
-mmapsto models moduleparameter molecule mono \
-monobold mononormal month monthlong monthshort \
-mp mprandomnumber mrel mrightarrow mrightharpoondown \
-mrightharpoonup mrightleftharpoons mrightoverleftarrow mtext mtriplerel \
-mtwoheadleftarrow mtwoheadrightarrow mu multimap nHdownarrow \
-nHuparrow nLeftarrow nLeftrightarrow nRightarrow nVDash \
-nVdash nVleftarrow nVleftrightarrow nVrightarrow nabla \
-nacute namedheadnumber namedstructureheadlocation namedstructureuservariable namedstructurevariable \
-namedtaggedlabeltexts napostrophe napprox napproxEq narrownobreakspace \
-nasymp natural naturalhbox naturalhpack naturalnumbers \
-naturaltpack naturalvbox naturalvcenter naturalvpack naturalvtop \
-naturalwd ncaron ncommaaccent ncong ncurl \
-ndivides ne nearrow neg negatecolorbox \
-negated negativesign negemspace negenspace negthinspace \
-neng neq nequiv neswarrow newattribute \
-newcatcodetable newcounter newevery newfrenchspacing newmode \
-newsignal newsystemmode nexists nextbox nextboxdp \
-nextboxht nextboxhtdp nextboxwd nextcounter nextcountervalue \
-nextdepth nextparagraphs nextrealpage nextrealpagenumber nextsubcountervalue \
-nextsubpage nextsubpagenumber nextuserpage nextuserpagenumber ngeq \
-ngrave ngtr ngtrless ngtrsim ni \
-nihongo nin njligature nleftarrow nleftrightarrow \
-nleq nless nlessgtr nlesssim nmid \
-nni nobar nobreakspace nocap nocharacteralign \
-nocitation nocite nodetostring noffigurepages noflines \
-noflocalfloats noheaderandfooterlines noheightstrut noindentation noitem \
-nonfrenchspacing nonmathematics normal normalboldface normalframedwithsettings \
+markpage markreferencepage mat math mathampersand \
+mathbf mathbi mathblackboard mathbs mathdefault \
+mathdollar mathdouble mathematics mathfraktur mathfunction \
+mathhash mathhyphen mathit mathitalic mathlabellanguage \
+mathlabeltext mathlabeltexts mathop mathover mathpercent \
+mathrm mathscript mathsl mathss mathtext \
+mathtextbf mathtextbi mathtextbs mathtextit mathtextsl \
+mathtexttf mathtf mathtriplet mathtt mathunder \
+mathupright mathword mathwordbf mathwordbi mathwordbs \
+mathwordit mathwordsl mathwordtf maxaligned mbox \
+mcframed measure measured measuredangle measuredeq \
+medskip medspace menubutton mequal message \
+mfence mframed mfunction mfunctionlabeltext mhbox \
+mho mhookleftarrow mhookrightarrow mid midaligned \
+middle middlealigned middlebox midhbox midsubsentence \
+minimalhbox minus minuscolon mirror mixedcaps \
+mkvibuffer mleftarrow mleftharpoondown mleftharpoonup mleftrightarrow \
+mleftrightharpoons mmapsto models moduleparameter molecule \
+mono monobold mononormal month monthlong \
+monthshort mp mprandomnumber mrel mrightarrow \
+mrightharpoondown mrightharpoonup mrightleftharpoons mrightoverleftarrow mtext \
+mtriplerel mtwoheadleftarrow mtwoheadrightarrow mu multimap \
+nHdownarrow nHuparrow nLeftarrow nLeftrightarrow nRightarrow \
+nVDash nVdash nVleftarrow nVleftrightarrow nVrightarrow \
+nabla nacute namedheadnumber namedstructureheadlocation namedstructureuservariable \
+namedstructurevariable namedtaggedlabeltexts napostrophe napprox napproxEq \
+narrownobreakspace nasymp natural naturalhbox naturalhpack \
+naturalnumbers naturaltpack naturalvbox naturalvcenter naturalvpack \
+naturalvtop naturalwd ncaron ncommaaccent ncong \
+ncurl ndivides ne nearrow neg \
+negatecolorbox negated negativesign negemspace negenspace \
+negthinspace neng neq nequiv neswarrow \
+newattribute newcatcodetable newcounter newevery newfrenchspacing \
+newluatable newmode newsignal newsystemmode nexists \
+nextbox nextboxdp nextboxht nextboxhtdp nextboxwd \
+nextcounter nextcountervalue nextdepth nextparagraphs nextrealpage \
+nextrealpagenumber nextsubcountervalue nextsubpage nextsubpagenumber nextuserpage \
+nextuserpagenumber ngeq ngrave ngtr ngtrless \
+ngtrsim ni nihongo nin njligature \
+nleftarrow nleftrightarrow nleq nless nlessgtr \
+nlesssim nmid nni nobar nobreakspace \
+nocap nocharacteralign nocitation nocite nodetostring \
+noffigurepages noflines noflinesinbox noflocalfloats noheaderandfooterlines \
+noheightstrut nohyphens noindentation noitem nonfrenchspacing \
+nonmathematics nonvalidassignment normal normalboldface normalframedwithsettings \
normalitalicface normalizebodyfontsize normalizedfontsize normalizefontdepth normalizefontheight \
normalizefontline normalizefontwidth normalizetextdepth normalizetextheight normalizetextline \
normalizetextwidth normalslantedface normaltypeface nospace not \
@@ -714,38 +727,41 @@ nvdash nvleftarrow nvleftrightarrow nvrightarrow nwarrow \
nwsearrow oacute obeydepth objectdepth objectheight \
objectmargin objectwidth obox obreve ocaron \
ocircumflex ocircumflexacute ocircumflexdotbelow ocircumflexgrave ocircumflexhook \
-ocircumflextilde odiaeresis odiaeresismacron odot odotaccent \
-odotaccentmacron odotbelow odoublegrave oeligature offset \
-offsetbox ograve ohm ohook ohorn \
-ohornacute ohorndotbelow ohorngrave ohornhook ohorntilde \
-ohungarumlaut oiiint oiint oint ointclockwise \
-ointctrclockwise oinvertedbreve omacron omega omicron \
-ominus onedigitrounding oneeighth onefifth onehalf \
-onequarter onesixth onesuperior onethird oogonek \
-oogonekmacron operatorlanguage operatortext oplus ordfeminine \
-ordinaldaynumber ordinalstr ordmasculine ornamenttext oslash \
-ostroke ostrokeacute otilde otildemacron otimes \
-outputfilename outputstreambox outputstreamcopy outputstreamunvbox outputstreamunvcopy \
-over overbar overbars overbarunderbar overbrace \
-overbraceunderbrace overbracket overbracketunderbracket overlaybutton overlaycolor \
+ocircumflextilde octnumber octstringtonumber odiaeresis odiaeresismacron \
+odot odotaccent odotaccentmacron odotbelow odoublegrave \
+oeligature offset offsetbox ograve ohm \
+ohook ohorn ohornacute ohorndotbelow ohorngrave \
+ohornhook ohorntilde ohungarumlaut oiiint oiint \
+oint ointclockwise ointctrclockwise oinvertedbreve omacron \
+omega omicron ominus onedigitrounding oneeighth \
+onefifth onehalf onequarter onesixth onesuperior \
+onethird oogonek oogonekmacron operatorlanguage operatortext \
+oplus ordfeminine ordinaldaynumber ordinalstr ordmasculine \
+ornamenttext oslash ostroke ostrokeacute otilde \
+otildemacron otimes outputfilename outputstreambox outputstreamcopy \
+outputstreamunvbox outputstreamunvcopy over overbar overbars \
+overbartext overbarunderbar overbrace overbracetext overbraceunderbrace \
+overbracket overbrackettext overbracketunderbracket overlaybutton overlaycolor \
overlaydepth overlayfigure overlayheight overlayimage overlaylinecolor \
overlaylinewidth overlayoffset overlayrollbutton overlaywidth overleftarrow \
-overloaderror overparent overparentunderparent overrightarrow overset \
-overstrike overstrikes owns page pagearea \
-pagebreak pagefigure pageinjection pagenumber pagereference \
-pagestaterealpage pagestaterealpageorder paletsize paragraphmark parallel \
-part partial pdfTeX pdfactualtext pdfbackendactualtext \
-pdfbackendcurrentresources pdfbackendsetcatalog pdfbackendsetcolorspace pdfbackendsetextgstate pdfbackendsetinfo \
-pdfbackendsetname pdfbackendsetpageattribute pdfbackendsetpageresource pdfbackendsetpagesattribute pdfbackendsetpattern \
-pdfbackendsetshade pdfcolor pdfeTeX percent percentdimen \
-periodcentered periods permitcaretescape permitcircumflexescape permitspacesbetweengroups \
-perp persiandecimals persiandecimalseparator persiannumerals persianthousandsseparator \
-perthousand phantom phantombox phi phook \
-pi pickupgroupedcommand pitchfork placeattachments placebookmarks \
-placebtxrendering placechemical placecitation placecombinedlist placecomments \
-placecontent placecurrentformulanumber placedbox placefigure placefloat \
-placefloatwithsetups placefootnotes placeformula placeframed placegraphic \
-placeheadnumber placeheadtext placehelp placeindex placeinitial \
+overleftharpoondown overleftharpoonup overleftrightarrow overloaderror overparent \
+overparenttext overparentunderparent overrightarrow overrightharpoondown overrightharpoonup \
+overset overstrike overstrikes overtwoheadleftarrow overtwoheadrightarrow \
+owns page pagearea pagebreak pagefigure \
+pageinjection pagenumber pagereference pagestaterealpage pagestaterealpageorder \
+paletsize paragraphmark parallel part partial \
+pdfTeX pdfactualtext pdfbackendactualtext pdfbackendcurrentresources pdfbackendsetcatalog \
+pdfbackendsetcolorspace pdfbackendsetextgstate pdfbackendsetinfo pdfbackendsetname pdfbackendsetpageattribute \
+pdfbackendsetpageresource pdfbackendsetpagesattribute pdfbackendsetpattern pdfbackendsetshade pdfcolor \
+pdfeTeX percent percentdimen periodcentered periods \
+permitcaretescape permitcircumflexescape permitspacesbetweengroups perp persiandecimals \
+persiandecimalseparator persiannumerals persianthousandsseparator perthousand phantom \
+phantombox phi phook pi pickupgroupedcommand \
+pitchfork placeattachments placebookmarks placebtxrendering placechemical \
+placecitation placecombinedlist placecomments placecontent placecurrentformulanumber \
+placedbox placefigure placefloat placefloatcaption placefloatwithsetups \
+placefootnotes placeformula placeframed placegraphic placeheadnumber \
+placeheadtext placehelp placeholder placeindex placeinitial \
placeintermezzo placelayer placelayeredtext placelegend placelist \
placelistofabbreviations placelistofchemicals placelistoffigures placelistofgraphics placelistofintermezzi \
placelistoflogos placelistofpublications placelistofsorts placelistofsynonyms placelistoftables \
@@ -789,30 +805,32 @@ rbracket rcaron rceil rcommaaccent rdoublegrave \
readfile readfixfile readjobfile readlocfile readsetfile \
readsysfile readtexfile readxmlfile realSmallCapped realSmallcapped \
realpagenumber reals realsmallcapped recursedepth recurselevel \
-recursestring redoconvertfont ref reference referenceprefix \
+recursestring redoconvertfont ref reference referencecolumnnumber \
+referencepagedetail referencepagestate referenceprefix referencerealpage referencesymbol \
referring registerattachment registerctxluafile registered registerexternalfigure \
-registerfontclass registerhyphenationexception registerhyphenationpattern registermenubuttons registersort \
-registersynonym registerunit regular relatemarking relateparameterhandlers \
-relaxvalueifundefined relbar remainingcharacters remark removebottomthings \
-removedepth removefromcommalist removelastskip removelastspace removemarkedcontent \
-removepunctuation removesubstring removetoks removeunwantedspaces repeathead \
-replacefeature replaceincommalist replaceword rescan rescanwithsetup \
-resetMPdrawing resetMPenvironment resetMPinstance resetallattributes resetandaddfeature \
-resetbar resetboxesincache resetbreakpoints resetbuffer resetcharacteralign \
-resetcharacterkerning resetcharacterspacing resetcharacterstripping resetcollector resetcounter \
-resetdigitsmanipulation resetdirection resetfeature resetflag resetfontcolorsheme \
-resetfontfallback resetfontsolution resethyphenationfeatures resetinjector resetinteractionmenu \
-resetitaliccorrection resetlayer resetlocalfloats resetmarker resetmarking \
-resetmode resetpagenumber resetparallel resetpath resetpenalties \
-resetperiodkerning resetprofile resetrecurselevel resetreference resetreplacement \
-resetscript resetsetups resetshownsynonyms resetsubpagenumber resetsymbolset \
-resetsystemmode resettimer resettokenlist resettrackers resettrialtypesetting \
-resetusedsortings resetusedsynonyms resetuserpagenumber resetvalue resetvisualizers \
-reshapebox resolvedglyphdirect resolvedglyphstyled restartcounter restorebox \
-restorecatcodes restorecounter restorecurrentattributes restoreendofline restoreglobalbodyfont \
-restriction reusableMPgraphic reuseMPgraphic reuserandomseed reverseddoubleprime \
-reversedprime reversedtripleprime reversehbox reversehpack reversetpack \
-reversevbox reversevpack reversevtop revivefeature rfence \
+registerfontclass registerhyphenationexception registerhyphenationpattern registermenubuttons registerparwrapper \
+registerparwrapperreverse registersort registersynonym registerunit regular \
+relatemarking relateparameterhandlers relaxvalueifundefined relbar remainingcharacters \
+remark removebottomthings removedepth removefromcommalist removelastskip \
+removelastspace removemarkedcontent removepunctuation removesubstring removetoks \
+removeunwantedspaces repeathead replacefeature replaceincommalist replaceword \
+rescan rescanwithsetup resetMPdrawing resetMPenvironment resetMPinstance \
+resetallattributes resetandaddfeature resetbar resetboxesincache resetbreakpoints \
+resetbuffer resetcharacteralign resetcharacterkerning resetcharacterspacing resetcharacterstripping \
+resetcollector resetcounter resetctxscanner resetdigitsmanipulation resetdirection \
+resetfeature resetflag resetfontcolorsheme resetfontfallback resetfontsolution \
+resethyphenationfeatures resetinjector resetinteractionmenu resetitaliccorrection resetlayer \
+resetlocalfloats resetmarker resetmarking resetmode resetpagenumber \
+resetparallel resetpath resetpenalties resetperiodkerning resetprofile \
+resetrecurselevel resetreference resetreplacements resetscript resetsetups \
+resetshownsynonyms resetsubpagenumber resetsymbolset resetsystemmode resettimer \
+resettokenlist resettrackers resettrialtypesetting resetusedsortings resetusedsynonyms \
+resetuserpagenumber resetvalue resetvisualizers reshapebox resolvedglyphdirect \
+resolvedglyphstyled restartcounter restorebox restorecatcodes restorecounter \
+restorecurrentattributes restoreendofline restoreglobalbodyfont restriction retestfeature \
+reusableMPgraphic reuseMPgraphic reuserandomseed reverseddoubleprime reversedprime \
+reversedtripleprime reversehbox reversehpack reversetpack reversevbox \
+reversevboxcontent reversevpack reversevtop revivefeature rfence \
rfloor rgroup rhbox rho rhooknearrow \
rhookswarrow right rightaligned rightangle rightarrow \
rightarrowbar rightarrowtail rightarrowtriangle rightbottombox rightbox \
@@ -835,143 +853,147 @@ rotate rparent rrangle rrbracket rrointerval \
rtimes rtlhbox rtlvbox rtlvtop rtop \
ruby ruledhbox ruledhpack ruledmbox ruledtopv \
ruledtpack ruledvbox ruledvpack ruledvtop runMPbuffer \
-runninghbox rvert sacute safechar samplefile \
-sans sansbold sansnormal sansserif savebox \
-savebtxdataset savebuffer savecounter savecurrentattributes savenormalmeaning \
-savetaggedtwopassdata savetwopassdata sbox scale scaron \
-scedilla schwa schwahook scircumflex scommaaccent \
-screen searrow secondoffivearguments secondoffourarguments secondofsixarguments \
-secondofthreearguments secondofthreeunexpanded secondoftwoarguments secondoftwounexpanded section \
-sectionmark seeindex select selectblocks serializecommalist \
-serializedcommalist serif serifbold serifnormal setJSpreamble \
-setMPlayer setMPpositiongraphic setMPpositiongraphicrange setMPtext setMPvariable \
-setMPvariables setautopagestaterealpageno setbar setbigbodyfont setboxllx \
-setboxlly setbreakpoints setcapstrut setcatcodetable setcharacteralign \
-setcharacteraligndetail setcharactercasing setcharactercleaning setcharacterkerning setcharacterspacing \
-setcharacterstripping setcharstrut setcollector setcolormodell setcounter \
-setcounterown setcurrentfontclass setdataset setdefaultpenalties setdigitsmanipulation \
-setdirection setdocumentargument setdocumentargumentdefault setdocumentfilename setdummyparameter \
-setelementexporttag setemeasure setevalue setevariable setevariables \
+runninghbox russianNumerals russiannumerals rvert sacute \
+safechar samplefile sans sansbold sansnormal \
+sansserif savebox savebtxdataset savebuffer savecounter \
+savecurrentattributes savenormalmeaning savetaggedtwopassdata savetwopassdata sbox \
+scale scaron scedilla schwa schwahook \
+scircumflex scommaaccent screen searrow secondoffivearguments \
+secondoffourarguments secondofsixarguments secondofthreearguments secondofthreeunexpanded secondoftwoarguments \
+secondoftwounexpanded section sectionmark seeindex select \
+selectblocks serializecommalist serializedcommalist serif serifbold \
+serifnormal setJSpreamble setMPlayer setMPpositiongraphic setMPpositiongraphicrange \
+setMPtext setMPvariable setMPvariables setautopagestaterealpageno setbar \
+setbigbodyfont setboxllx setboxlly setbreakpoints setcapstrut \
+setcatcodetable setcharacteralign setcharacteraligndetail setcharactercasing setcharactercleaning \
+setcharacterkerning setcharacterspacing setcharacterstripping setcharstrut setcollector \
+setcolormodell setcounter setcounterown setctxluafunction setcurrentfontclass \
+setdataset setdatavalue setdefaultpenalties setdigitsmanipulation setdirection \
+setdocumentargument setdocumentargumentdefault setdocumentfilename setdummyparameter setelementexporttag \
+setemeasure setevalue setevariable setevariables setexpansion \
setfirstline setfirstpasscharacteralign setflag setfont setfontcolorsheme \
-setfontfeature setfontsolution setfontstrut setglobalscript setgmeasure \
-setgvalue setgvariable setgvariables sethboxregister sethyphenatedurlafter \
-sethyphenatedurlbefore sethyphenatedurlnormal sethyphenationfeatures setinitial setinjector \
-setinteraction setinterfacecommand setinterfaceconstant setinterfaceelement setinterfacemessage \
-setinterfacevariable setinternalrendering setitaliccorrection setlayer setlayerframed \
-setlayertext setlinefiller setlocalhsize setlocalscript setmainbodyfont \
-setmainparbuilder setmarker setmarking setmathstyle setmeasure \
-setmessagetext setminus setmode setnostrut setnote \
-setnotetext setobject setoldstyle setpagereference setpagestate \
-setpagestaterealpageno setpenalties setpercentdimen setperiodkerning setposition \
-setpositionbox setpositiondata setpositiondataplus setpositiononly setpositionplus \
-setpositionstrut setprofile setrandomseed setreference setreferencedobject \
-setregisterentry setreplacement setrigidcolumnbalance setrigidcolumnhsize setscript \
-setsecondpasscharacteralign setsectionblock setsimplecolumnshsize setsmallbodyfont setsmallcaps \
-setstackbox setstructurepageregister setstrut setsuperiors setsystemmode \
-settabular settaggedmetadata settestcrlf settextcontent settightobject \
-settightreferencedobject settightstrut settightunreferencedobject settokenlist settrialtypesetting \
-setuevalue setugvalue setunreferencedobject setup setupMPgraphics \
-setupMPinstance setupMPpage setupMPvariables setupTABLE setupTEXpage \
-setupalign setupalternativestyles setuparranging setupattachment setupattachments \
-setupbackend setupbackground setupbackgrounds setupbar setupbars \
-setupblackrules setupblank setupbleeding setupblock setupbodyfont \
-setupbookmark setupbottom setupbottomtexts setupbtx setupbtxdataset \
-setupbtxlabeltext setupbtxlist setupbtxregister setupbtxrendering setupbuffer \
-setupbutton setupcapitals setupcaption setupcaptions setupcharacteralign \
-setupcharacterkerning setupcharacterspacing setupchemical setupchemicalframed setupclipping \
-setupcollector setupcolor setupcolors setupcolumns setupcolumnset \
-setupcolumnsetarea setupcolumnsetareatext setupcolumnsetlines setupcolumnsetspan setupcolumnsetstart \
-setupcombination setupcombinedlist setupcomment setupcontent setupcounter \
-setupdataset setupdelimitedtext setupdescription setupdirections setupdocument \
-setupeffect setupenumeration setupenumerations setupenv setupexport \
-setupexternalfigure setupexternalsoundtracks setupfacingfloat setupfield setupfieldbody \
-setupfieldcategory setupfieldcontentframed setupfieldlabelframed setupfields setupfieldtotalframed \
-setupfiller setupfillinlines setupfillinrules setupfirstline setupfittingpage \
-setupfloat setupfloatframed setupfloats setupfloatsplitting setupfontexpansion \
-setupfontprotrusion setupfonts setupfontsolution setupfooter setupfootertexts \
-setupfootnotes setupforms setupformula setupformulae setupformulaframed \
-setupframed setupframedcontent setupframedtable setupframedtablecolumn setupframedtablerow \
-setupframedtext setupframedtexts setupglobalreferenceprefix setuphead setupheadalternative \
-setupheader setupheadertexts setupheadnumber setupheads setupheadtext \
-setuphelp setuphigh setuphighlight setuphyphenation setuphyphenmark \
-setupindentedtext setupindenting setupindex setupinitial setupinsertion \
-setupinteraction setupinteractionbar setupinteractionmenu setupinteractionscreen setupinterlinespace \
-setupitaliccorrection setupitemgroup setupitemizations setupitemize setupitems \
-setuplabel setuplabeltext setuplanguage setuplayer setuplayeredtext \
-setuplayout setuplayouttext setuplegend setuplinefiller setuplinefillers \
-setuplinenote setuplinenumbering setuplines setuplinetable setuplinewidth \
-setuplist setuplistalternative setuplistextra setuplocalfloats setuplocalinterlinespace \
-setuplow setuplowhigh setuplowmidhigh setupmakeup setupmarginblock \
-setupmargindata setupmarginframed setupmarginrule setupmarginrules setupmarking \
-setupmathalignment setupmathcases setupmathematics setupmathfence setupmathfraction \
-setupmathfractions setupmathframed setupmathlabeltext setupmathmatrix setupmathornament \
-setupmathradical setupmathstackers setupmathstyle setupmixedcolumns setupmodule \
-setupnarrower setupnotation setupnotations setupnote setupnotes \
-setupoffset setupoffsetbox setupoperatortext setupoppositeplacing setupoutputroutine \
+setfontfeature setfontsolution setfontstrut setfractions setglobalscript \
+setgmeasure setgvalue setgvariable setgvariables sethboxregister \
+sethyphenatedurlafter sethyphenatedurlbefore sethyphenatedurlnormal sethyphenationfeatures setinitial \
+setinjector setinteraction setinterfacecommand setinterfaceconstant setinterfaceelement \
+setinterfacemessage setinterfacevariable setinternalrendering setitaliccorrection setlayer \
+setlayerframed setlayertext setlinefiller setlocalhsize setlocalscript \
+setluatable setmainbodyfont setmainparbuilder setmarker setmarking \
+setmathstyle setmeasure setmessagetext setminus setmode \
+setnostrut setnote setnotetext setobject setoldstyle \
+setpagereference setpagestate setpagestaterealpageno setparagraphfreezing setpenalties \
+setpercentdimen setperiodkerning setposition setpositionbox setpositiondata \
+setpositiondataplus setpositiononly setpositionplus setpositionstrut setprofile \
+setrandomseed setreference setreferencedobject setregisterentry setreplacements \
+setrigidcolumnbalance setrigidcolumnhsize setscript setsecondpasscharacteralign setsectionblock \
+setsimplecolumnshsize setsmallbodyfont setsmallcaps setstackbox setstructurepageregister \
+setstrut setsuperiors setsystemmode settabular settaggedmetadata \
+settestcrlf settextcontent settightobject settightreferencedobject settightstrut \
+settightunreferencedobject settokenlist settrialtypesetting setuevalue setugvalue \
+setunreferencedobject setup setupMPgraphics setupMPinstance setupMPpage \
+setupMPvariables setupTABLE setupTEXpage setupalign setupalternativestyles \
+setuparranging setupattachment setupattachments setupbackend setupbackground \
+setupbackgrounds setupbar setupbars setupblackrules setupblank \
+setupbleeding setupblock setupbodyfont setupbodyfontenvironment setupbookmark \
+setupbottom setupbottomtexts setupbtx setupbtxdataset setupbtxlabeltext \
+setupbtxlist setupbtxregister setupbtxrendering setupbuffer setupbutton \
+setupcapitals setupcaption setupcaptions setupcharacteralign setupcharacterkerning \
+setupcharacterspacing setupchemical setupchemicalframed setupclipping setupcollector \
+setupcolor setupcolors setupcolumns setupcolumnset setupcolumnsetarea \
+setupcolumnsetareatext setupcolumnsetlines setupcolumnsetspan setupcolumnsetstart setupcombination \
+setupcombinedlist setupcomment setupcontent setupcounter setupdataset \
+setupdelimitedtext setupdescription setupdescriptions setupdirections setupdocument \
+setupeffect setupenumeration setupenumerations setupenv setupexpansion \
+setupexport setupexternalfigure setupexternalfigures setupexternalsoundtracks setupfacingfloat \
+setupfield setupfieldbody setupfieldcategory setupfieldcontentframed setupfieldlabelframed \
+setupfields setupfieldtotalframed setupfiller setupfillinlines setupfillinrules \
+setupfirstline setupfittingpage setupfloat setupfloatframed setupfloats \
+setupfloatsplitting setupfontexpansion setupfontprotrusion setupfonts setupfontsolution \
+setupfooter setupfootertexts setupfootnotes setupforms setupformula \
+setupformulae setupformulaframed setupframed setupframedcontent setupframedtable \
+setupframedtablecolumn setupframedtablerow setupframedtext setupframedtexts setupglobalreferenceprefix \
+setuphead setupheadalternative setupheader setupheadertexts setupheadnumber \
+setupheads setupheadtext setuphelp setuphigh setuphighlight \
+setuphyphenation setuphyphenmark setupindentedtext setupindenting setupindex \
+setupinitial setupinsertion setupinteraction setupinteractionbar setupinteractionmenu \
+setupinteractionscreen setupinterlinespace setupitaliccorrection setupitemgroup setupitemizations \
+setupitemize setupitems setuplabel setuplabeltext setuplanguage \
+setuplayer setuplayeredtext setuplayout setuplayouttext setuplegend \
+setuplinefiller setuplinefillers setuplinenote setuplinenumbering setuplines \
+setuplinetable setuplinewidth setuplist setuplistalternative setuplistextra \
+setuplocalfloats setuplocalinterlinespace setuplow setuplowhigh setuplowmidhigh \
+setupmakeup setupmarginblock setupmargindata setupmarginframed setupmarginrule \
+setupmarginrules setupmarking setupmathalignment setupmathcases setupmathematics \
+setupmathfence setupmathfraction setupmathfractions setupmathframed setupmathlabeltext \
+setupmathmatrix setupmathornament setupmathradical setupmathstackers setupmathstyle \
+setupmixedcolumns setupmodule setupmulticolumns setupnarrower setupnotation \
+setupnotations setupnote setupnotes setupoffset setupoffsetbox \
+setupoperatortext setupoppositeplacing setuporientation setupoutput setupoutputroutine \
setuppagechecker setuppagecolumns setuppagecomment setuppageinjection setuppageinjectionalternative \
setuppagenumber setuppagenumbering setuppageshift setuppagestate setuppagetransitions \
setuppairedbox setuppalet setuppaper setuppapersize setupparagraph \
setupparagraphintro setupparagraphnumbering setupparagraphs setupparallel setupperiodkerning \
-setupperiods setupplacement setuppositionbar setuppositioning setupprefixtext \
-setupprocessor setupprofile setupprograms setupquotation setupquote \
-setuprealpagenumber setupreferenceformat setupreferenceprefix setupreferencestructureprefix setupreferencing \
-setupregister setupregisters setuprenderingwindow setuprotate setupruby \
-setups setupscale setupscript setupscripts setupsectionblock \
-setupselector setupshift setupsidebar setupsorting setupspacing \
-setupspellchecking setupstartstop setupstretched setupstruts setupstyle \
-setupsubformula setupsubformulas setupsubpagenumber setupsuffixtext setupsymbols \
-setupsymbolset setupsynctex setupsynonyms setuptables setuptabulate \
-setuptabulation setuptagging setuptaglabeltext setuptext setuptextbackground \
-setuptextflow setuptextnote setuptextrules setuptexttexts setupthinrules \
-setuptolerance setuptooltip setuptop setuptoptexts setuptype \
-setuptyping setupunit setupunittext setupurl setupuserdata \
-setupuserdataalternative setupuserpagenumber setupversion setupviewerlayer setupvspacing \
-setupwhitespace setupwithargument setupwithargumentswapped setupxml setupxtable \
-setuvalue setuxvalue setvalue setvariable setvariables \
-setvboxregister setvisualizerfont setvtopregister setwidthof setxmeasure \
-setxvalue setxvariable setxvariables seveneighths sfrac \
-shapedhbox sharp shiftbox shiftdown shiftup \
-showallmakeup showattributes showbodyfont showbodyfontenvironment showboxes \
-showbtxdatasetauthors showbtxdatasetcompleteness showbtxdatasetfields showbtxfields showbtxhashedauthors \
-showbtxtables showchardata showcharratio showcolor showcolorbar \
-showcolorcomponents showcolorgroup showcolorset showcolorstruts showcounter \
-showdirectives showdirsinmargin showedebuginfo showexperiments showfont \
-showfontdata showfontexpansion showfontitalics showfontkerns showfontparameters \
-showfontstrip showfontstyle showframe showglyphdata showglyphs \
-showgrid showgridsnapping showhelp showhyphenationtrace showhyphens \
-showinjector showjustification showkerning showlayout showlayoutcomponents \
-showligature showligatures showlogcategories showmakeup showmargins \
-showmessage showminimalbaseline shownextbox showotfcomposition showpalet \
-showparentchain showprint showsetups showsetupsdefinition showstruts \
-showsymbolset showtimer showtokens showtrackers showvalue \
-showvariable showwarning sigma signalrightpage sim \
-simeq simplealignedbox simplealignedboxplus simplealignedspreadbox simplegroupedcommand \
-simplereversealignedbox simplereversealignedboxplus singalcharacteralign singlebond singleverticalbar \
-sixperemspace sixthofsixarguments slanted slantedbold slantedface \
-slash slicepages slong slovenianNumerals sloveniannumerals \
-small smallbodyfont smallbold smallbolditalic smallboldslanted \
-smallcappedcharacters smallcappedromannumerals smallcaps smaller smallitalicbold \
-smallnormal smallskip smallslanted smallslantedbold smalltype \
-smash smashbox smashboxed smashedhbox smashedvbox \
-smile snaptogrid softhyphen solidus someheadnumber \
-somekindoftab someline somelocalfloat somenamedheadnumber someplace \
-somewhere space spaceddigits spaceddigitsmethod spaceddigitsseparator \
-spaceddigitssymbol spadesuit spanishNumerals spanishnumerals speech \
-sphericalangle splitatasterisk splitatcolon splitatcolons splitatcomma \
-splitatperiod splitdfrac splitfilename splitfloat splitfrac \
-splitoffbase splitofffull splitoffkind splitoffname splitoffpath \
-splitoffroot splitofftokens splitofftype splitstring spreadhbox \
-sqcap sqcup sqrt sqsubset sqsubseteq \
-sqsubsetneq sqsupset sqsupseteq sqsupsetneq square \
-squaredots ssharp stackrel stackscripts star \
-stareq startJScode startJSpreamble startLUA startMP \
-startMPclip startMPcode startMPdefinitions startMPdrawing startMPenvironment \
-startMPextensions startMPinclusions startMPinitializations startMPpage startMPpositiongraphic \
-startMPpositionmethod startMPrun startPARSEDXML startTABLE startTABLEbody \
-startTABLEfoot startTABLEhead startTABLEnext startTC startTD \
-startTDs startTEX startTEXpage startTH startTN \
-startTR startTRs startTX startTY startXML \
-startalign startalignment startallmodes startappendices startarrangedpages \
+setupperiods setupplaceholder setupplacement setuppositionbar setuppositioning \
+setupprefixtext setupprocessor setupprofile setupprograms setupquotation \
+setupquote setuprealpagenumber setupreferenceformat setupreferenceprefix setupreferencestructureprefix \
+setupreferencing setupregister setupregisters setuprenderingwindow setuprotate \
+setupruby setups setupscale setupscript setupscripts \
+setupsectionblock setupselector setupshift setupsidebar setupsorting \
+setupspacing setupspellchecking setupstartstop setupstretched setupstrut \
+setupstyle setupsubformula setupsubformulas setupsubpagenumber setupsuffixtext \
+setupsymbols setupsymbolset setupsynctex setupsynonyms setupsystem \
+setuptables setuptabulate setuptagging setuptaglabeltext setuptext \
+setuptextbackground setuptextflow setuptextnote setuptextrules setuptexttexts \
+setupthinrules setuptolerance setuptooltip setuptop setuptoptexts \
+setuptype setuptyping setupunit setupunittext setupurl \
+setupuserdata setupuserdataalternative setupuserpagenumber setupversion setupviewerlayer \
+setupvspacing setupwhitespace setupwithargument setupwithargumentswapped setupxml \
+setupxtable setuvalue setuxvalue setvalue setvariable \
+setvariables setvboxregister setvisualizerfont setvtopregister setwidthof \
+setxmeasure setxvalue setxvariable setxvariables seveneighths \
+sfrac shapedhbox sharp shiftbox shiftdown \
+shiftup showallmakeup showattributes showbodyfont showbodyfontenvironment \
+showboxes showbtxdatasetauthors showbtxdatasetcompleteness showbtxdatasetfields showbtxfields \
+showbtxhashedauthors showbtxtables showchardata showcharratio showcolor \
+showcolorbar showcolorcomponents showcolorgroup showcolorset showcolorstruts \
+showcounter showdirectives showdirsinmargin showedebuginfo showexperiments \
+showfont showfontdata showfontexpansion showfontitalics showfontkerns \
+showfontparameters showfontstrip showfontstyle showframe showglyphdata \
+showglyphs showgrid showgridsnapping showhelp showhyphenationtrace \
+showhyphens showinjector showjustification showkerning showlayout \
+showlayoutcomponents showligature showligatures showlogcategories showluatables \
+showmakeup showmargins showmessage showminimalbaseline shownextbox \
+showotfcomposition showpalet showparentchain showparwrapperstate showprint \
+showsetups showsetupsdefinition showstruts showsymbolset showtimer \
+showtokens showtrackers showvalue showvariable showwarning \
+sigma signalrightpage sim simeq simplealignedbox \
+simplealignedboxplus simplealignedspreadbox simplegroupedcommand simplereversealignedbox simplereversealignedboxplus \
+singalcharacteralign singlebond singleverticalbar sixperemspace sixthofsixarguments \
+slanted slantedbold slantedface slash slicepages \
+slong slovenianNumerals sloveniannumerals small smallbodyfont \
+smallbold smallbolditalic smallboldslanted smallcappedcharacters smallcappedromannumerals \
+smallcaps smaller smallitalicbold smallnormal smallskip \
+smallslanted smallslantedbold smalltype smash smashbox \
+smashboxed smashedhbox smashedvbox smile snaptogrid \
+softhyphen solidus someheadnumber somekindoftab someline \
+somelocalfloat somenamedheadnumber someplace somewhere space \
+spaceddigits spaceddigitsmethod spaceddigitsseparator spaceddigitssymbol spadesuit \
+spanishNumerals spanishnumerals speech sphericalangle splitatasterisk \
+splitatcolon splitatcolons splitatcomma splitatperiod splitdfrac \
+splitfilename splitfloat splitfrac splitoffbase splitofffull \
+splitoffkind splitoffname splitoffpath splitoffroot splitofftokens \
+splitofftype splitstring spreadhbox sqcap sqcup \
+sqrt sqsubset sqsubseteq sqsubsetneq sqsupset \
+sqsupseteq sqsupsetneq square squaredots ssharp \
+stackrel stackscripts star stareq startJScode \
+startJSpreamble startLUA startMP startMPclip startMPcode \
+startMPdefinitions startMPdrawing startMPenvironment startMPextensions startMPinclusions \
+startMPinitializations startMPpage startMPpositiongraphic startMPpositionmethod startMPrun \
+startPARSEDXML startTABLE startTABLEbody startTABLEfoot startTABLEhead \
+startTABLEnested startTABLEnext startTC startTD startTDs \
+startTEX startTEXpage startTH startTN startTR \
+startTRs startTX startTY startXML startalign \
+startalignment startallmodes startappendices startarrangedpages startasciimode \
startaside startattachment startbackground startbackmatter startbar \
startbbordermatrix startbitmapimage startblockquote startbodymatter startbordermatrix \
startboxedcolumns startbtxlabeltext startbtxrenderingdefinitions startbuffer startcases \
@@ -1002,77 +1024,78 @@ startmarkedcontent startmarkpages startmathalignment startmathcases startmathlab
startmathmatrix startmathmode startmathstyle startmatrices startmatrix \
startmaxaligned startmdformula startmidaligned startmiddlealigned startmiddlemakeup \
startmixedcolumns startmode startmodeset startmodule startmoduletestsection \
-startmpformula startnamedsection startnamedsubformulas startnarrow startnarrower \
-startnegative startnicelyfilledbox startnointerference startnotallmodes startnotext \
-startnotmode startoperatortext startopposite startoutputstream startoverlay \
-startoverprint startpacked startpagecolumns startpagecomment startpagefigure \
-startpagelayout startpagemakeup startpar startparagraph startparagraphs \
-startparagraphscell startparbuilder startpart startpath startplacechemical \
-startplacefigure startplacefloat startplaceformula startplacegraphic startplaceintermezzo \
-startplacelegend startplacepairedbox startplacetable startpositioning startpositionoverlay \
-startpositive startpostponing startpostponingnotes startprefixtext startprocessassignmentcommand \
-startprocessassignmentlist startprocesscommacommand startprocesscommalist startproduct startproject \
-startprotect startprotectedcolors startpublication startpunctuation startquotation \
-startquote startrandomized startrandomseed startrawsetups startreadingfile \
-startreferenceprefix startregime startregister startreusableMPgraphic startrightaligned \
-startruby startscript startsdformula startsection startsectionblock \
-startsectionblockenvironment startsectionlevel startsetups startshapebox startshift \
-startsidebar startsimplecolumns startspecialitem startspeech startspformula \
-startsplitformula startsplittext startspread startstandardmakeup startstaticMPfigure \
-startstaticMPgraphic startstrictinspectnextcharacter startstructurepageregister startstrut startstyle \
-startsubformulas startsubject startsubjectlevel startsubsection startsubsentence \
-startsubstack startsubsubject startsubsubsection startsubsubsubject startsubsubsubsection \
-startsubsubsubsubject startsubsubsubsubsection startsubsubsubsubsubject startsuffixtext startsymbolset \
-starttable starttablehead starttables starttabletail starttabletext \
-starttabulate starttabulatehead starttabulatetail starttagged starttaglabeltext \
-starttexcode starttexdefinition starttext starttextbackground starttextbackgroundmanual \
-starttextcolor starttextcolorintent starttextflow starttextmakeup starttextrule \
-starttitle starttokenlist starttokens starttransparent starttypescript \
-starttypescriptcollection starttyping startuniqueMPgraphic startuniqueMPpagegraphic startunittext \
-startunpacked startusableMPgraphic startuseMPgraphic startusemathstyleparameter startuserdata \
-startusingbtxspecification startvbox startvboxregister startvboxtohbox startvboxtohboxseparator \
-startviewerlayer startvtop startvtopregister startxcell startxcellgroup \
-startxcolumn startxgroup startxmldisplayverbatim startxmlinlineverbatim startxmlraw \
-startxmlsetups startxrow startxrowgroup startxtable startxtablebody \
-startxtablefoot startxtablehead startxtablenext stligature stopJScode \
-stopJSpreamble stopLUA stopMP stopMPclip stopMPcode \
-stopMPdefinitions stopMPdrawing stopMPenvironment stopMPextensions stopMPinclusions \
-stopMPinitializations stopMPpage stopMPpositiongraphic stopMPpositionmethod stopMPrun \
-stopPARSEDXML stopTABLE stopTABLEbody stopTABLEfoot stopTABLEhead \
-stopTABLEnext stopTC stopTD stopTDs stopTEX \
-stopTEXpage stopTH stopTN stopTR stopTRs \
-stopTX stopTY stopXML stopalign stopalignment \
-stopallmodes stopappendices stoparrangedpages stopaside stopattachment \
-stopbackground stopbackmatter stopbar stopbbordermatrix stopbitmapimage \
-stopblockquote stopbodymatter stopbordermatrix stopboxedcolumns stopbtxlabeltext \
-stopbtxrenderingdefinitions stopbuffer stopcases stopcatcodetable stopcenteraligned \
-stopchapter stopcharacteralign stopcheckedfences stopchemical stopchemicaltext \
-stopcollect stopcollecting stopcolor stopcolorintent stopcoloronly \
-stopcolorset stopcolumns stopcolumnset stopcolumnsetspan stopcombination \
-stopcomment stopcomponent stopcontextcode stopcontextdefinitioncode stopctxfunction \
-stopctxfunctiondefinition stopcurrentcolor stopcurrentlistentrywrapper stopdelimited stopdelimitedtext \
-stopdisplaymath stopdmath stopdocument stopeffect stopelement \
-stopembeddedxtable stopendnote stopendofline stopenvironment stopexceptions \
-stopexpanded stopexpandedcollect stopextendedcatcodetable stopexternalfigurecollection stopfacingfloat \
-stopfact stopfigure stopfiguretext stopfittingpage stopfixed \
-stopfloatcombination stopfont stopfontclass stopfontsolution stopfootnote \
-stopformula stopformulas stopframed stopframedcell stopframedcontent \
-stopframedrow stopframedtable stopframedtext stopfrontmatter stopgoto \
-stopgraphictext stopgridsnapping stophanging stophbox stophboxestohbox \
-stophboxregister stophead stopheadtext stophelptext stophiding \
-stophighlight stophyphenation stopimath stopindentation stopindentedtext \
-stopinteraction stopinteractionmenu stopinterface stopintermezzotext stopintertext \
-stopitem stopitemgroup stopitemgroupcolumns stopitemize stopknockout \
-stoplabeltext stoplanguage stoplayout stopleftaligned stoplegend \
-stopline stoplinealignment stoplinecorrection stoplinefiller stoplinenote \
-stoplinenumbering stoplines stoplinetable stoplinetablebody stoplinetablecell \
-stoplinetablehead stoplocalfootnotes stoplocalheadsetup stoplocallinecorrection stoplocalnotes \
-stoplocalsetups stoplua stopluacode stopluaparameterset stopluasetups \
-stopmakeup stopmarginblock stopmarginrule stopmarkedcontent stopmarkpages \
-stopmathalignment stopmathcases stopmathlabeltext stopmathmatrix stopmathmode \
-stopmathstyle stopmatrices stopmatrix stopmaxaligned stopmdformula \
-stopmidaligned stopmiddlealigned stopmiddlemakeup stopmixedcolumns stopmode \
-stopmodeset stopmodule stopmoduletestsection stopmpformula stopnamedsection \
+startmpformula startmulticolumns startnamedsection startnamedsubformulas startnarrow \
+startnarrower startnegative startnicelyfilledbox startnointerference startnotallmodes \
+startnotext startnotmode startoperatortext startopposite startoutputstream \
+startoverlay startoverprint startpacked startpagecolumns startpagecomment \
+startpagefigure startpagelayout startpagemakeup startpar startparagraph \
+startparagraphs startparagraphscell startparbuilder startpart startpath \
+startplacechemical startplacefigure startplacefloat startplaceformula startplacegraphic \
+startplaceintermezzo startplacelegend startplacepairedbox startplacetable startpositioning \
+startpositionoverlay startpositive startpostponing startpostponingnotes startprefixtext \
+startprocessassignmentcommand startprocessassignmentlist startprocesscommacommand startprocesscommalist startproduct \
+startproject startprotect startprotectedcolors startpublication startpunctuation \
+startquotation startquote startrandomized startrandomseed startrawsetups \
+startreadingfile startreferenceprefix startregime startregister startreusableMPgraphic \
+startrightaligned startruby startscript startsdformula startsection \
+startsectionblock startsectionblockenvironment startsectionlevel startsetups startshapebox \
+startshift startsidebar startsimplecolumns startspecialitem startspeech \
+startspformula startsplitformula startsplittext startspread startstandardmakeup \
+startstaticMPfigure startstaticMPgraphic startstrictinspectnextcharacter startstructurepageregister startstrut \
+startstyle startsubformulas startsubject startsubjectlevel startsubsection \
+startsubsentence startsubstack startsubsubject startsubsubsection startsubsubsubject \
+startsubsubsubsection startsubsubsubsubject startsubsubsubsubsection startsubsubsubsubsubject startsuffixtext \
+startsymbolset starttable starttablehead starttables starttabletail \
+starttabletext starttabulate starttabulatehead starttabulatetail starttagged \
+starttaglabeltext starttexcode starttexdefinition starttext starttextbackground \
+starttextbackgroundmanual starttextcolor starttextcolorintent starttextflow starttextmakeup \
+starttextrule startthematrix starttitle starttokenlist starttokens \
+starttransparent starttypescript starttypescriptcollection starttyping startuniqueMPgraphic \
+startuniqueMPpagegraphic startunittext startunpacked startusableMPgraphic startuseMPgraphic \
+startusemathstyleparameter startuserdata startusingbtxspecification startvbox startvboxregister \
+startvboxtohbox startvboxtohboxseparator startviewerlayer startvtop startvtopregister \
+startxcell startxcellgroup startxcolumn startxgroup startxmldisplayverbatim \
+startxmlinlineverbatim startxmlraw startxmlsetups startxrow startxrowgroup \
+startxtable startxtablebody startxtablefoot startxtablehead startxtablenext \
+stligature stopJScode stopJSpreamble stopLUA stopMP \
+stopMPclip stopMPcode stopMPdefinitions stopMPdrawing stopMPenvironment \
+stopMPextensions stopMPinclusions stopMPinitializations stopMPpage stopMPpositiongraphic \
+stopMPpositionmethod stopMPrun stopPARSEDXML stopTABLE stopTABLEbody \
+stopTABLEfoot stopTABLEhead stopTABLEnested stopTABLEnext stopTC \
+stopTD stopTDs stopTEX stopTEXpage stopTH \
+stopTN stopTR stopTRs stopTX stopTY \
+stopXML stopalign stopalignment stopallmodes stopappendices \
+stoparrangedpages stopasciimode stopaside stopattachment stopbackground \
+stopbackmatter stopbar stopbbordermatrix stopbitmapimage stopblockquote \
+stopbodymatter stopbordermatrix stopboxedcolumns stopbtxlabeltext stopbtxrenderingdefinitions \
+stopbuffer stopcases stopcatcodetable stopcenteraligned stopchapter \
+stopcharacteralign stopcheckedfences stopchemical stopchemicaltext stopcollect \
+stopcollecting stopcolor stopcolorintent stopcoloronly stopcolorset \
+stopcolumns stopcolumnset stopcolumnsetspan stopcombination stopcomment \
+stopcomponent stopcontextcode stopcontextdefinitioncode stopctxfunction stopctxfunctiondefinition \
+stopcurrentcolor stopcurrentlistentrywrapper stopdelimited stopdelimitedtext stopdisplaymath \
+stopdmath stopdocument stopeffect stopelement stopembeddedxtable \
+stopendnote stopendofline stopenvironment stopexceptions stopexpanded \
+stopexpandedcollect stopextendedcatcodetable stopexternalfigurecollection stopfacingfloat stopfact \
+stopfigure stopfiguretext stopfittingpage stopfixed stopfloatcombination \
+stopfont stopfontclass stopfontsolution stopfootnote stopformula \
+stopformulas stopframed stopframedcell stopframedcontent stopframedrow \
+stopframedtable stopframedtext stopfrontmatter stopgoto stopgraphictext \
+stopgridsnapping stophanging stophbox stophboxestohbox stophboxregister \
+stophead stopheadtext stophelptext stophiding stophighlight \
+stophyphenation stopimath stopindentation stopindentedtext stopinteraction \
+stopinteractionmenu stopinterface stopintermezzotext stopintertext stopitem \
+stopitemgroup stopitemgroupcolumns stopitemize stopknockout stoplabeltext \
+stoplanguage stoplayout stopleftaligned stoplegend stopline \
+stoplinealignment stoplinecorrection stoplinefiller stoplinenote stoplinenumbering \
+stoplines stoplinetable stoplinetablebody stoplinetablecell stoplinetablehead \
+stoplocalfootnotes stoplocalheadsetup stoplocallinecorrection stoplocalnotes stoplocalsetups \
+stoplua stopluacode stopluaparameterset stopluasetups stopmakeup \
+stopmarginblock stopmarginrule stopmarkedcontent stopmarkpages stopmathalignment \
+stopmathcases stopmathlabeltext stopmathmatrix stopmathmode stopmathstyle \
+stopmatrices stopmatrix stopmaxaligned stopmdformula stopmidaligned \
+stopmiddlealigned stopmiddlemakeup stopmixedcolumns stopmode stopmodeset \
+stopmodule stopmoduletestsection stopmpformula stopmulticolumns stopnamedsection \
stopnamedsubformulas stopnarrow stopnarrower stopnegative stopnicelyfilledbox \
stopnointerference stopnotallmodes stopnotext stopnotmode stopoperatortext \
stopopposite stopoutputstream stopoverlay stopoverprint stoppacked \
@@ -1097,61 +1120,62 @@ stopsymbolset stoptable stoptablehead stoptables stoptabletail \
stoptabletext stoptabulate stoptabulatehead stoptabulatetail stoptagged \
stoptaglabeltext stoptexcode stoptexdefinition stoptext stoptextbackground \
stoptextbackgroundmanual stoptextcolor stoptextcolorintent stoptextflow stoptextmakeup \
-stoptextrule stoptitle stoptokenlist stoptokens stoptransparent \
-stoptypescript stoptypescriptcollection stoptyping stopuniqueMPgraphic stopuniqueMPpagegraphic \
-stopunittext stopunpacked stopusableMPgraphic stopuseMPgraphic stopusemathstyleparameter \
-stopuserdata stopusingbtxspecification stopvbox stopvboxregister stopvboxtohbox \
-stopvboxtohboxseparator stopviewerlayer stopvtop stopvtopregister stopxcell \
-stopxcellgroup stopxcolumn stopxgroup stopxmldisplayverbatim stopxmlinlineverbatim \
-stopxmlraw stopxmlsetups stopxrow stopxrowgroup stopxtable \
-stopxtablebody stopxtablefoot stopxtablehead stopxtablenext stretched \
-strictdoifelsenextoptional strictdoifnextoptionalelse stripcharacter strippedcsname stripspaces \
-structurelistuservariable structurenumber structuretitle structureuservariable structurevariable \
-strut strutdp strutgap strutht struthtdp \
-struttedbox strutwd style styleinstance subject \
-subpagenumber subsection subsentence subset subseteq \
-subseteqq subsetneq subsetneqq substituteincommalist subsubject \
-subsubsection subsubsubject subsubsubsection subsubsubsubject subsubsubsubsection \
-subsubsubsubsubject subtractfeature succ succapprox succcurlyeq \
-succeq succeqq succnapprox succneq succneqq \
-succnsim succsim suffixlanguage suffixtext sum \
-supset supseteq supseteqq supsetneq supsetneqq \
-surd surdradical swapcounts swapdimens swapface \
-swapmacros swaptypeface swarrow switchstyleonly switchtobodyfont \
-switchtocolor switchtointerlinespace symbol symbolreference synchronizeblank \
-synchronizeindenting synchronizemarking synchronizeoutputstreams synchronizestrut synchronizewhitespace \
-synctexblockfilename synctexresetfilename synctexsetfilename systemlog systemlogfirst \
-systemloglast systemsetups tLeftarrow tLeftrightarrow tRightarrow \
-tabulateautoline tabulateautorule tabulateline tabulaterule taggedctxcommand \
-taggedlabeltexts taglabellanguage taglabeltext tau tbinom \
-tbox tcaron tcedilla tcommaaccent tcurl \
-tequal test testandsplitstring testcolumn testfeature \
-testfeatureonce testpage testpageonly testpagesync testtokens \
-tex texdefinition texsetup textAngstrom textacute \
-textampersand textasciicircum textasciitilde textat textbackslash \
-textbar textbottomcomma textbottomdot textbraceleft textbraceright \
-textbreve textbrokenbar textbullet textcaron textcedilla \
-textcelsius textcent textcircledP textcircumflex textcitation \
-textcite textcomma textcontrolspace textcurrency textdag \
-textddag textdegree textdiaeresis textdiv textdollar \
-textdong textdotaccent textellipsis texteuro textflowcollector \
-textfraction textgrave texthash texthorizontalbar texthungarumlaut \
-texthyphen textkelvin textlognot textmacron textmath \
-textmho textminus textmu textmultiply textnumero \
-textogonek textohm textormathchar textormathchars textounce \
-textpercent textperiod textplus textpm textreference \
-textring textrule textslash textsterling texttilde \
-textunderscore textvisiblespace textyen thai thainumerals \
-thefirstcharacter thenormalizedbodyfontsize therefore theremainingcharacters theta \
-thickspace thinrule thinrules thinspace thirdoffivearguments \
-thirdoffourarguments thirdofsixarguments thirdofthreearguments thirdofthreeunexpanded thook \
-thookleftarrow thookrightarrow thorn threedigitrounding threeeighths \
-threefifths threeperemspace threequarter threesuperior tibetannumerals \
-tightlayer tilde times tinyfont title \
-tlap tleftarrow tleftharpoondown tleftharpoonup tleftrightarrow \
-tleftrightharpoons tmapsto to tochar tolinenote \
-tooltip top topbox topleftbox toplinebox \
-toprightbox topskippedbox tracecatcodetables tracedfontname traceoutputroutines \
+stoptextrule stopthematrix stoptitle stoptokenlist stoptokens \
+stoptransparent stoptypescript stoptypescriptcollection stoptyping stopuniqueMPgraphic \
+stopuniqueMPpagegraphic stopunittext stopunpacked stopusableMPgraphic stopuseMPgraphic \
+stopusemathstyleparameter stopuserdata stopusingbtxspecification stopvbox stopvboxregister \
+stopvboxtohbox stopvboxtohboxseparator stopviewerlayer stopvtop stopvtopregister \
+stopxcell stopxcellgroup stopxcolumn stopxgroup stopxmldisplayverbatim \
+stopxmlinlineverbatim stopxmlraw stopxmlsetups stopxrow stopxrowgroup \
+stopxtable stopxtablebody stopxtablefoot stopxtablehead stopxtablenext \
+stretched strictdoifelsenextoptional strictdoifnextoptionalelse stripcharacter strippedcsname \
+stripspaces structurelistuservariable structurenumber structuretitle structureuservariable \
+structurevariable strut strutdp strutgap strutht \
+struthtdp struttedbox strutwd style styleinstance \
+subject subpagenumber subsection subsentence subset \
+subseteq subseteqq subsetneq subsetneqq substituteincommalist \
+subsubject subsubsection subsubsubject subsubsubsection subsubsubsubject \
+subsubsubsubsection subsubsubsubsubject subtractfeature succ succapprox \
+succcurlyeq succeq succeqq succnapprox succneq \
+succneqq succnsim succsim suffixlanguage suffixtext \
+sum supset supseteq supseteqq supsetneq \
+supsetneqq surd surdradical swapcounts swapdimens \
+swapface swapmacros swaptypeface swarrow switchstyleonly \
+switchtobodyfont switchtocolor switchtointerlinespace symbol symbolreference \
+synchronizeblank synchronizeindenting synchronizemarking synchronizeoutputstreams synchronizestrut \
+synchronizewhitespace synctexblockfilename synctexresetfilename synctexsetfilename systemlog \
+systemlogfirst systemloglast systemsetups tLeftarrow tLeftrightarrow \
+tRightarrow tabulateautoline tabulateautorule tabulateline tabulaterule \
+taggedctxcommand taggedlabeltexts taglabellanguage taglabeltext tau \
+tbinom tbox tcaron tcedilla tcommaaccent \
+tcurl tequal test testandsplitstring testcolumn \
+testfeature testfeatureonce testpage testpageonly testpagesync \
+testtokens tex texdefinition texsetup textAngstrom \
+textacute textampersand textasciicircum textasciitilde textat \
+textbackslash textbar textbottomcomma textbottomdot textbraceleft \
+textbraceright textbreve textbrokenbar textbullet textcaron \
+textcedilla textcelsius textcent textcircledP textcircumflex \
+textcitation textcite textcomma textcontrolspace textcurrency \
+textdag textddag textdegree textdiaeresis textdiv \
+textdollar textdong textdotaccent textellipsis texteuro \
+textflowcollector textfraction textgrave texthash texthorizontalbar \
+texthungarumlaut texthyphen textkelvin textlognot textmacron \
+textmath textmho textminus textmu textmultiply \
+textnumero textogonek textohm textormathchar textormathchars \
+textounce textpercent textperiod textplus textpm \
+textreference textring textrule textslash textsterling \
+texttilde textunderscore textvisiblespace textyen thai \
+thainumerals thedatavalue thefirstcharacter thematrix thenormalizedbodyfontsize \
+theorientation therefore theremainingcharacters theta thickspace \
+thinrule thinrules thinspace thirdoffivearguments thirdoffourarguments \
+thirdofsixarguments thirdofthreearguments thirdofthreeunexpanded thook thookleftarrow \
+thookrightarrow thorn threedigitrounding threeeighths threefifths \
+threeperemspace threequarter threesuperior tibetannumerals tightlayer \
+tilde times tinyfont title tlap \
+tleftarrow tleftharpoondown tleftharpoonup tleftrightarrow tleftrightharpoons \
+tmapsto to tochar tolinenote tooltip \
+top topbox topleftbox toplinebox toprightbox \
+topskippedbox tracecatcodetables tracedfontname tracedpagestate traceoutputroutines \
tracepositions trademark translate transparencycomponents transparent \
trel triangle triangledown triangleleft triangleq \
triangleright trightarrow trightharpoondown trightharpoonup trightleftharpoons \
@@ -1162,22 +1186,26 @@ twoheadleftarrow twoheadrightarrow twoheadrightarrowtail twoheaduparrow twosuper
twothirds tx txx typ type \
typebuffer typedefinedbuffer typeface typefile typeinlinebuffer \
typescriptone typescriptprefix typescriptthree typescripttwo typesetbuffer \
-typesetfile uacute ubreve ucaron ucircumflex \
-uconvertnumber udiaeresis udiaeresisacute udiaeresiscaron udiaeresisgrave \
-udiaeresismacron udotbelow udots udoublegrave uedcatcodecommand \
-ugrave uhook uhorn uhornacute uhorndotbelow \
-uhorngrave uhornhook uhorntilde uhungarumlaut uinvertedbreve \
-ulcorner umacron undefinevalue undepthed underbar \
-underbars underbrace underbracket underdash underdashes \
-underdot underdots underleftarrow underparent underrandom \
-underrandoms underrightarrow underset understrike understrikes \
-undoassign unexpandeddocumentvariable unframed unhhbox unihex \
-uniqueMPgraphic uniqueMPpagegraphic unit unitlanguage unitshigh \
-unitslow unittext unknown unprotected unregisterhyphenationpattern \
+typesetbufferonly typesetfile uacute ubreve ucaron \
+uchexnumber uchexnumbers ucircumflex uconvertnumber udiaeresis \
+udiaeresisacute udiaeresiscaron udiaeresisgrave udiaeresismacron udotbelow \
+udots udoublegrave uedcatcodecommand ugrave uhook \
+uhorn uhornacute uhorndotbelow uhorngrave uhornhook \
+uhorntilde uhungarumlaut uinvertedbreve ulcorner umacron \
+undefinevalue undepthed underbar underbars underbartext \
+underbrace underbracetext underbracket underbrackettext underdash \
+underdashes underdot underdots underleftarrow underleftharpoondown \
+underleftharpoonup underleftrightarrow underparent underparenttext underrandom \
+underrandoms underrightarrow underrightharpoondown underrightharpoonup underset \
+understrike understrikes undertwoheadleftarrow undertwoheadrightarrow undoassign \
+unexpandeddocumentvariable unframed unhhbox unihex uniqueMPgraphic \
+uniqueMPpagegraphic unit unitlanguage unitshigh unitslow \
+unittext unknown unprotected unregisterhyphenationpattern unregisterparwrapper \
unspaceafter unspaceargument unspaced unspacestring unstackscripts \
untexargument untexcommand uogonek upand uparrow \
-updasharrow updownarrow updownarrowbar updownarrows upharpoonleft \
-upharpoonright uplus uppercased uppercasestring upperleftdoubleninequote \
+updasharrow updateparagraphdemerits updateparagraphpenalties updateparagraphproperties updateparagraphshapes \
+updownarrow updownarrowbar updownarrows upharpoonleft upharpoonright \
+uplus uppercased uppercasestring uppercasing upperleftdoubleninequote \
upperleftdoublesixquote upperleftsingleninequote upperleftsinglesixquote upperrightdoubleninequote upperrightdoublesixquote \
upperrightsingleninequote upperrightsinglesixquote upsilon upuparrows upwhitearrow \
urcorner uring url useJSscripts useMPenvironmentbuffer \
@@ -1186,32 +1214,33 @@ usealignparameter useblankparameter useblocks usebodyfont usebodyfontparameter \
usebtxdataset usebtxdefinitions usecitation usecolors usecomponent \
usedirectory usedummycolorparameter usedummystyleandcolor usedummystyleparameter useenvironment \
useexternaldocument useexternalfigure useexternalrendering useexternalsoundtrack usefigurebase \
-usefile usegridparameter useindentingparameter useindentnextparameter useinterlinespaceparameter \
-uselanguageparameter useluamodule usemathstyleparameter usemodule useproduct \
-useprofileparameter useproject usereferenceparameter userpagenumber usesetupsparameter \
-usestaticMPfigure usesubpath usesymbols usetexmodule usetypescript \
-usetypescriptfile useurl usezipfile utfchar utflower \
-utfupper utilde utilityregisterlength vDash varTheta \
-varepsilon varkappa varnothing varphi varpi \
-varrho varsigma vartheta vboxreference vdash \
-vdots vec vee veebar veeeq \
-verbatim verbatimstring verbosenumber version vert \
-verticalgrowingbar verticalpositionbar veryraggedcenter veryraggedleft veryraggedright \
-vglue viewerlayer vl vpackbox vpackedbox \
-vphantom vpos vsmash vsmashbox vsmashed \
-vspace vspacing wcircumflex wdofstring wedge \
-wedgeeq weekday whitearrowupfrombar widehat widetilde \
-widthofstring widthspanningtext withoutpt word wordright \
-words wordtonumber wp wr writebetweenlist \
-writedatatolist writestatus writetolist xLeftarrow xLeftrightarrow \
-xRightarrow xdefconvertedargument xequal xfrac xhookleftarrow \
-xhookrightarrow xi xleftarrow xleftharpoondown xleftharpoonup \
-xleftrightarrow xleftrightharpoons xmapsto xmladdindex xmlafterdocumentsetup \
-xmlaftersetup xmlall xmlappenddocumentsetup xmlappendsetup xmlapplyselectors \
-xmlatt xmlattdef xmlattribute xmlattributedef xmlbadinclusions \
-xmlbeforedocumentsetup xmlbeforesetup xmlchainatt xmlchainattdef xmlchecknamespace \
-xmlcommand xmlconcat xmlconcatrange xmlcontext xmlcount \
-xmldefaulttotext xmldirectives xmldirectivesafter xmldirectivesbefore xmldisplayverbatim \
+usefile usefontpath usegridparameter usehyphensparameter useindentingparameter \
+useindentnextparameter useinterlinespaceparameter uselanguageparameter useluamodule useluatable \
+usemathstyleparameter usemodule useproduct useprofileparameter useproject \
+usereferenceparameter userpagenumber usesetupsparameter usestaticMPfigure usesubpath \
+usesymbols usetexmodule usetypescript usetypescriptfile useurl \
+usezipfile utfchar utflower utfupper utilde \
+utilityregisterlength vDash validassignment varTheta varepsilon \
+varkappa varnothing varphi varpi varrho \
+varsigma vartheta vboxreference vdash vdots \
+vec vee veebar veeeq verbatim \
+verbatimstring verbosenumber version vert verticalgrowingbar \
+verticalpositionbar veryraggedcenter veryraggedleft veryraggedright vglue \
+viewerlayer vl vpackbox vpackedbox vphantom \
+vpos vsmash vsmashbox vsmashed vspace \
+vspacing wcircumflex wdofstring wedge wedgeeq \
+weekday whitearrowupfrombar widehat widetilde widthofstring \
+widthspanningtext withoutpt word wordright words \
+wordtonumber wp wr writebetweenlist writedatatolist \
+writestatus writetolist xLeftarrow xLeftrightarrow xRightarrow \
+xdefconvertedargument xequal xfrac xhookleftarrow xhookrightarrow \
+xi xleftarrow xleftharpoondown xleftharpoonup xleftrightarrow \
+xleftrightharpoons xmapsto xmladdindex xmlafterdocumentsetup xmlaftersetup \
+xmlall xmlappenddocumentsetup xmlappendsetup xmlapplyselectors xmlatt \
+xmlattdef xmlattribute xmlattributedef xmlbadinclusions xmlbeforedocumentsetup \
+xmlbeforesetup xmlchainatt xmlchainattdef xmlchecknamespace xmlcommand \
+xmlconcat xmlconcatrange xmlcontext xmlcount xmldefaulttotext \
+xmldepth xmldirectives xmldirectivesafter xmldirectivesbefore xmldisplayverbatim \
xmldoif xmldoifatt xmldoifelse xmldoifelseatt xmldoifelseempty \
xmldoifelseselfempty xmldoifelsetext xmldoifelsevalue xmldoifnot xmldoifnotatt \
xmldoifnotselfempty xmldoifnottext xmldoifselfempty xmldoiftext xmlelement \
@@ -1235,930 +1264,10 @@ xmlverbatim xrel xrightarrow xrightharpoondown xrightharpoonup \
xrightleftharpoons xrightoverleftarrow xsplitstring xtriplerel xtwoheadleftarrow \
xtwoheadrightarrow xxfrac xypos yacute ycircumflex \
ydiaeresis ydotbelow yen ygrave yhook \
-ymacron ytilde zacute zcaron zdotaccent \
-zeronumberconversion zerowidthnobreakspace zerowidthspace zeta zhook \
-zstroke zwj zwnj
-
-keywordclass.context.cs=\
-Cisla Kap MESIC Rimskecislice \
-SLOVA SLOVO Slova Slovo VSEDNIDEN \
-Znak Znaky aktualnicislonadpisu aktualnidatum barevnalista \
-barva cernalinka cernelinky cisla cislonadpisu \
-cislorovnice cislostrany datum definuj definujakcent \
-definujbarvu definujblok definujbloksekce definujbuffer definujfont \
-definujformatodkazu definujhbox definujinterakcnimenu definujkombinovanyseznam definujkonverzi \
-definujnadpis definujobrazeksymbol definujodkaz definujodstavce definujopis \
-definujoramovani definujoramovanytext definujpaletu definujplvouciobjekt definujpodpole \
-definujpole definujpopis definujpopisek definujprekryv definujprikaz \
-definujprofil definujprogram definujprostredizakladnihofontu definujrejstrik definujsablonutabulky \
-definujsekci definujseznam definujskupinubarev definujstartstop definujstyl \
-definujstylfontu definujsymbol definujsynonumumfontu definujsynonyma definujtabelaci \
-definujtext definujtrideni definujupravu definujvelikostpapiru definujvycet \
-definujzakladnifont definujzasobnikpoli definujznaceni definujznak delkaseznamu \
-externiobraz hlavnijazyk hodnotabarvy instalacejazyka interakcnilista \
-interakcnitlacitka interaktivnimenu jazyk jdidolu jdina \
-jdinabox jdinastranu klonujpole komponenta konvertujcislo \
-kopirujpole korekcebilehomista matematika meritko mesic \
-mezera mrizka nastavbarvu nastavbarvy nastavbilamista \
-nastavblok nastavbloksekce nastavbuffer nastavcernelinky nastavcislonadpisu \
-nastavcislostrany nastavcislovaniodstavcu nastavcislovaniradku nastavcislovanistran nastavcitaci \
-nastavdeleniplvoucichobjektu nastavdelitko nastavdolnitexty nastavhorejsek nastavhornitexty \
-nastavinterakci nastavinterakcnilistu nastavinterakcnimenu nastavinterakcniobrazovku nastavjazyk \
-nastavkapitalky nastavkombinovanyseznam nastavkomentar nastavkomentarstrany nastavmarginalnilinky \
-nastavmeziradkovoumezeru nastavnadpis nastavnadpisy nastavodkazovani nastavodsazovani \
-nastavodstavce nastavopis nastavoramovanetexty nastavoramovani nastavorez \
-nastavotoceni nastavpaletu nastavplvouciobjekt nastavplvouciobjekty nastavpodcislostrany \
-nastavpole nastavpolozky nastavpopisek nastavpopisky nastavpozadi \
-nastavpoznamkypodcarou nastavprechodstrany nastavpreskok nastavprogramy nastavradkovani \
-nastavradky nastavrejstrik nastavrovnice nastavsadusymbolu nastavseznam \
-nastavsirkucary nastavsloupce nastavspodek nastavsynonyma nastavtabelaci \
-nastavtabulky nastavtenkelinky nastavtext nastavtextovelinky nastavtexttexty \
-nastavtextyupati nastavtextyzahlavi nastavtoleranci nastavtrideni nastavtype \
-nastavumisteniprotejsku nastavumistovani nastavupati nastavupravu nastavurl \
-nastavusporadani nastavvelikostpapiru nastavvsechnapole nastavvycty nastavvyplnovelinky \
-nastavvyplnoveradky nastavvzhled nastavzahlavi nastavzakladnifont nastavzarovnani \
-nastavznaceni nastavzuzeni nastrane nejakyradek nekde \
-neznamo nivy nizky nokap obrazovka \
-odkaz odkaznastranu odkaznatext odkazujici opis \
-opissoubor oramovani oref orez otocit \
-oznaceni pis plnezneni pole polozka \
-polozky porovnejpaletu porovnejskupinubarev pozadi pozice \
-poznamka pref prelozit prepninazakladnifont preskoc \
-prizpusobivepole prizpusobvzhled produkt projekt prostredi \
-resetznaceni rimskecislice rozdelplvouciobjekt roztazene schovejbloky \
-sedabarva sloupec slovovpravo stanovcharakteristickuseznamu stanovcislonadpisu \
-startbarva startinteraktivnimenu startjazyk startjdina startkomponenta \
-startmarginalnilinka startnadpis startoramovani startpolozka startpozadi \
-startprodukt startprojekt startprostredi startpublikace startradek \
-starttextovalinka startumistirovnici startzarovnanonastred startzarovnanovlevo startzarovnanovpravo \
-startzhustene stopbarva stopinteraktivnimenu stopjazyk stopjdina \
-stopkomponenta stopmarginalnilinka stopnadpis stoporamovani stoppolozka \
-stoppozadi stopprodukt stopprojekt stopprostredi stoppublikace \
-stopradek stoptextovalinka stopumistirovnici stopzarovnanonastred stopzarovnanovlevo \
-stopzarovnanovpravo stopzhustene strana tecky tenkalinka \
-tenkelinky textovalinka tlacitko tlacitkomenu tloustkacary \
-tref tvrdamezera tvrdemezery ukazbarvu ukazmrizku \
-ukaznastaveni ukazpaletu ukazpodpery ukazpostredizakladnihofontu ukazramecek \
-ukazsadusymbolu ukazskupinubarev ukazupravu ukazvytisk ukazvzhled \
-ukazzakladnifont umistikombinovanyseznam umistilokalnipoznamkypodcarou umistinadsebe umistinamrizku \
-umistipodrovnici umistipoznamkypodcarou umistirejstrik umistirovnici umistiseznam \
-umistivedlesebe umistizalozky urcicharakteristikurejstriku uzijJSscripts uzijURL \
-uzijadresar uzijbloky uzijexternidokument uzijexterniobraz uzijexternizvuk \
-uzijmodul uzijsymbol uzijurl verze vlasovalinka \
-vradku vsedniden vyberbloky vyplnenytext vyplnovelinky \
-vyplnovyradek vysoky zachovejbloky zadnamezera zadnehorniadolniradky \
-zadnezahlaviaupati zalozka zapisdoseznamu zapismeziseznam zaramovani \
-zarovnanonastred zarovnanovlevo zarovnanovpravo zasobnikpoli ziskejbuffer \
-ziskejznaceni znaceni znak znaky zpracujbloky \
-zrcadlit zref
-
-keywordclass.context.de=\
-Buchstabe Buchstaben Kap MONAT \
-Roemischezahlen WOCHENTAG WOERTER WORT Woerter \
-Wort Ziffern amgitterausrichten aufseite ausfuelltext \
-ausschnitt bearbeitebloecke behaltebloecke bei bemerkung \
-benutzeverzeichnis beschriftung bestimmekopfnummer bestimmelistencharakeristika bestimmeregistercharakteristika \
-bildschirm blanko buchstabe buchstaben datum \
-defineschriftsynonym definiereabbsymbol definiereabsaetze definiereabschnitt definiereabschnittsblock \
-definiereakzent definierebefehl definierebeschreibung definierebeschriftung definiereblock \
-definierefarbe definierefarbengruppe definierefeld definierefeldstapel definierefliesstext \
-definierefliesstextumgebung definieregleitobjekt definierehbox definiereinteraktionsmenue definierekonversion \
-definierelabel definiereliste definieren definierenummerierung definiereoverlay \
-definierepalette definierepapierformat definiereprofil definiereprogramme definierepuffer \
-definierereferenz definierereferenzformat definiereregister definiereschrift definiereschriftstil \
-definieresortieren definierestartstop definierestil definieresubfeld definieresymbol \
-definieresynonyme definieretabellenvorlage definieretabulator definieretext definieretippen \
-definiereueberschrift definiereumbruch definiereumrahmt definiereumrahmtertext definierezeichen \
-definierezusammengestellteliste drehen duennelinie duennerumriss einezeile \
-externeabbildung farbbalken farbe farbewert feld \
-feldstapel festesspatium format formelnummer gefuelltesrechteck \
-gefuelltezeile gestreckt gitter graufarbe haarlinie \
-hauptsprache heutigesdatum heutigeskopfnummer hintergrund hoch \
-holebeschriftung holepuffer imumriss installieresprache interaktionsbalken \
-interaktionsknopfe interaktionsmenue inzeile irgendwo keinekopfundfusszeilen \
-keinspatium keinzeilenobenundunten klonierefeld knopf komponente \
-konvertierezahl kopfnummer kopierefeld korrigierezwischenraum liniendicke \
-linksbuendig listenlaenge mathematik menueknopf monat \
-nachunten nokap notiz passelayoutan passendfeld \
-platzierebookmarks platziereformel platzierefussnoten platziereliste platzierelokalefussnoten \
-platzierenebeneinander platziereregister platziereuntereinander platziereunterformel platzierezusammengestellteliste \
-pos posten produkt programm projekt \
-punkt rechteck rechtecke rechtsbuendig referenz \
-referieren roemischezahlen ruecksetztenbeschriftung schreibezurliste schreibezwischenliste \
-seite seitenreferenz seitenummer settext spalte \
-spatium spiegeln sprache startfarbe starthintergrund \
-startinteraktionsmenue startkleinerdurchschuss startkomponente startkopf startlinksbuendig \
-startmarginallinie startplatziereformel startpos startprodukt startprojekt \
-startpublikation startrechtsbuendig startsprache starttextlinie startumgebung \
-startumrahmt startzeile startzentriert startzu stelleabsaetzeein \
-stelleabsatznummerierungein stelleabschnittsblockein stelleanordnenein stelleaufzaehlungenein stelleausrichtungein \
-stelleausschnittein stellebeschreibungein stellebeschriftungein stellebilderunterschriftein stellebildunterschriftein \
-stellebindestrichein stelleblankoein stelleblockein stelledrehenein stelleduennerumrissein \
-stelleeinziehenein stelleengerein stellefarbeein stellefarbenein stellefeldein \
-stellefelderin stellefliesstextein stelleformelnein stellefussnotenein stellefusszeileein \
-stellefusszeilentextein stellegefuelltesrechteckein stellegefuelltezeileein stellegegenueberplatzierenein stellegleitobjekteein \
-stellegleitobjektein stellehintergruendeein stellehintergrundein stelleinteraktionein stelleinteraktionsbalkenein \
-stelleinteraktionsbildschirmein stelleinteraktionsmenueein stellekommentarein stellekopfzahlein stellekopfzeileein \
-stellekopfzeilentextein stellelayoutein stellelinienbreiteein stellelisteein stellemarginallinieein \
-stellenobenein stellepaletteein stellepapierformatein stelleplatziegeteiltegleitobjekt stellepositionierenein \
-stellepostenein stelleprogrammein stellepufferein stellerechteckein stellereferenzierenein \
-stelleregisterein stelleseitenkommentarein stelleseitennummerein stelleseitennummeriernungein stelleseitenuebergangein \
-stellesortierenein stellespaltenein stellespatiumein stellespracheein stellesymbolsetein \
-stellesynonymein stelletabellenein stelletabulatorein stelletextein stelletextobenein \
-stelletexttexteein stelletextumrissein stelletextuntenein stelletipein stelletippenein \
-stelletoleranzein stelleueberschriftein stelleueberschriftenein stelleumbruchein stelleumrahmtein \
-stelleumrahmtetexteein stelleuntenein stelleunterseitennummerein stelleurlein stelleversalienein \
-stellezeilenabstandein stellezeilenein stellezeilennumerierungein stellezitierenein stellezusammengestelltelisteein \
-stellezwischenraumein stopfarbe stophintergrund stopinteraktionsmenue stopkleinerdurchschuss \
-stopkomponente stopkopf stoplinksbuendig stopmarginallinie stopplatziereformel \
-stoppos stopprodukt stopprojekt stoppublikation stoprechtsbuendig \
-stopsprache stoptextlinie stopumgebung stopumrahmt stopzeile \
-stopzentriert stopzu teilegleitobjekt textlinie textreferenz \
-tief tiho tip tippedatei tippen \
-tippepuffer ueber uebersetzten umgebung umrahmt \
-unbekant verbergebloecke vergleichefarbengruppe vergleichepalette verwendeJSscript \
-verwendeURL verwendebloecke verwendeexteresdokument verwendeexterneabbildung verwendeexternestonstueck \
-verwendemodul verwendesymbole verwendeurl volleswort von \
-waehlebloeckeaus wechselezumfliesstext wochentag wortrechts zeigedruck \
-zeigeeinstellungen zeigefarbe zeigefarbengruppe zeigefliesstext zeigefliesstextumgebung \
-zeigegitter zeigelayout zeigepalette zeigerahmen zeigestruts \
-zeigeumbruch zentriert ziffern zu zurbox \
-zurseite
+yiddishnumerals ymacron ytilde zacute zcaron \
+zdotaccent zeronumberconversion zerowidthnobreakspace zerowidthspace zeta \
+zhook zstroke zwj zwnj
keywordclass.context.en=\
-keywordclass.context.fr=\
-Caractere Caracteres Chiffresromains JOURSEMAINE \
-MOIS MOT MOTS Mot Mots \
-Numeros a adaptedisposition ajustechamp alaligne \
-alapage aligneadroite aligneagauche aligneaumilieu arriereplan \
-baha barrecouleur barreinteraction bas bouton \
-boutonmenu boutonsinteraction cacheblocs caractere caracteres \
-champ changepolicecorps chiffresromains clonechamp colonne \
-commentaire comparegroupecouleur comparepalette completenumeropage completeregistre \
-composant concernant convertitnumero copitchamp corrigeespaceblanc \
-couleur couleurgrise dactylographier dans datecourante \
-de definicaractere definit definitaccent definitbloc \
-definitblocsection definitbuffer definitcalque definitchamp definitcommande \
-definitconversion definitcouleur definitdactylo definitdemarrestoppe definitdescription \
-definitdisposition definitenumeration definitenvironnementpolicecorps definitetiquette definitflottant \
-definitformatreference definitgroupecouleur definithbox definitjeucolonne definitliste \
-definitlisteimbriquee definitmakeup definitmarquage definitmenuinteraction definitpalette \
-definitparagraphes definitpilechamp definitpolice definitpolicecorps definitprofil \
-definitprogramme definitreference definitregistre definitrevetement definitsautdecolonne \
-definitsautdepage definitsection definitsouschamp definitstyle definitstylepolice \
-definitsymbole definitsymbolefigure definitsynonymepolice definitsynonymes definittabulation \
-definittaillepapier definittete definittexte definittrametableau definittri \
-definittype definitvide demarreJScode demarreJSpreamble demarreLUA \
-demarreMP demarreMPclip demarreMPcode demarreMPdefinitions demarreMPdrawing \
-demarreMPenvironment demarreMPextensions demarreMPinclusions demarreMPinitializations demarreMPpage \
-demarreMPpositiongraphic demarreMPpositionmethod demarreMPrun demarrePARSEDXML demarreTABLE \
-demarreTABLEbody demarreTABLEfoot demarreTABLEhead demarreTABLEnext demarreTC \
-demarreTD demarreTDs demarreTEX demarreTEXpage demarreTH \
-demarreTN demarreTR demarreTRs demarreTX demarreTY \
-demarreXML demarrealign demarrealigneadroite demarrealigneagauche demarrealigneaumilieu \
-demarrealignment demarreallmodes demarreappendices demarrearrangedpages demarrearriereplan \
-demarreaside demarreattachment demarrebackmatter demarrebar demarrebbordermatrix \
-demarrebitmapimage demarreblockquote demarrebodymatter demarrebordermatrix demarreboxedcolumns \
-demarrebtxlabeltext demarrebtxrenderingdefinitions demarrebuffer demarrecases demarrecatcodetable \
-demarrecenteraligned demarrechapter demarrecharacteralign demarrecheckedfences demarrechemical \
-demarrechemicaltext demarreciter demarrecollect demarrecollecting demarrecolorintent \
-demarrecoloronly demarrecolorset demarrecolumns demarrecolumnset demarrecolumnsetspan \
-demarrecombination demarrecomment demarrecomposant demarrecontextcode demarrecontextdefinitioncode \
-demarrecouleur demarrectxfunction demarrectxfunctiondefinition demarrecurrentcolor demarrecurrentlistentrywrapper \
-demarredelimited demarredelimitedtext demarredisplaymath demarredmath demarredocument \
-demarreeffect demarreelement demarreembeddedxtable demarreendnote demarreendofline \
-demarreenvironement demarreexceptions demarreexpanded demarreexpandedcollect demarreextendedcatcodetable \
-demarreexternalfigurecollection demarrefacingfloat demarrefact demarrefigure demarrefiguretext \
-demarrefittingpage demarrefixed demarrefloatcombination demarrefont demarrefontclass \
-demarrefontsolution demarrefootnote demarreformula demarreformulas demarreframed \
-demarreframedcell demarreframedcontent demarreframedrow demarreframedtable demarreframedtext \
-demarrefrontmatter demarregraphictext demarregridsnapping demarregroupe demarrehanging \
-demarrehbox demarrehboxestohbox demarrehboxregister demarreheadtext demarrehelptext \
-demarrehiding demarrehighlight demarrehyphenation demarreimath demarreindentation \
-demarreindentedtext demarreinteraction demarreinterface demarreintermezzotext demarreintertext \
-demarreitemgroup demarreitemgroupcolumns demarreitemize demarreknockout demarrelabeltext \
-demarrelangue demarrelayout demarrelegend demarreligne demarreligneregleetexte \
-demarrelinealignment demarrelinecorrection demarrelinefiller demarrelinenumbering demarrelines \
-demarrelinetable demarrelinetablebody demarrelinetablecell demarrelinetablehead demarrelocalfootnotes \
-demarrelocalheadsetup demarrelocallinecorrection demarrelocalnotes demarrelocalsetups demarrelua \
-demarreluacode demarreluaparameterset demarreluasetups demarremakeup demarremargereglee \
-demarremarginblock demarremarkedcontent demarremarkpages demarremathalignment demarremathcases \
-demarremathlabeltext demarremathmatrix demarremathmode demarremathstyle demarrematrices \
-demarrematrix demarremaxaligned demarremdformula demarremenuinteraction demarremiddlealigned \
-demarremiddlemakeup demarremixedcolumns demarremode demarremodeset demarremodule \
-demarremoduletestsection demarrempformula demarrenamedsection demarrenamedsubformulas demarrenarrow \
-demarrenarrower demarrenegative demarrenicelyfilledbox demarrenointerference demarrenotallmodes \
-demarrenotext demarrenotmode demarreoperatortext demarreopposite demarreoutputstream \
-demarreoverlay demarreoverprint demarrepagecolumns demarrepagecomment demarrepagefigure \
-demarrepagelayout demarrepagemakeup demarrepar demarreparagraph demarreparagraphs \
-demarreparagraphscell demarreparbuilder demarrepart demarrepath demarreplacechemical \
-demarreplacefigure demarreplaceflottant demarreplaceformule demarreplacegraphic demarreplaceintermezzo \
-demarreplacelegend demarreplacepairedbox demarreplacetable demarrepositioning demarrepositionoverlay \
-demarrepositive demarrepostponing demarrepostponingnotes demarreprefixtext demarreprocessassignmentcommand \
-demarreprocessassignmentlist demarreprocesscommacommand demarreprocesscommalist demarreproduit demarreprojet \
-demarreprotect demarreprotectedcolors demarrepublication demarrepunctuation demarrequotation \
-demarrequote demarrerandomized demarrerandomseed demarrerawsetups demarrereadingfile \
-demarrereferenceprefix demarreregime demarrereusableMPgraphic demarreruby demarrescript \
-demarresdformula demarresection demarresectionblock demarresectionblockenvironment demarresectionlevel \
-demarresetups demarreshapebox demarreshift demarresidebar demarresimplecolumns \
-demarrespecialitem demarrespeech demarrespformula demarresplitformula demarresplittext \
-demarrespread demarrestandardmakeup demarrestaticMPfigure demarrestaticMPgraphic demarrestrictinspectnextcharacter \
-demarrestrut demarrestyle demarresubformulas demarresubject demarresubjectlevel \
-demarresubsection demarresubsentence demarresubstack demarresubsubject demarresubsubsection \
-demarresubsubsubject demarresubsubsubsection demarresubsubsubsubject demarresubsubsubsubsection demarresubsubsubsubsubject \
-demarresuffixtext demarresymbolset demarretable demarretablehead demarretables \
-demarretabletail demarretabletext demarretabulate demarretabulatehead demarretabulatetail \
-demarretagged demarretaglabeltext demarretete demarretexcode demarretexdefinition \
-demarretext demarretextbackground demarretextbackgroundmanual demarretextcolor demarretextcolorintent \
-demarretextflow demarretextmakeup demarretitle demarretokenlist demarretokens \
-demarretransparent demarretypescript demarretypescriptcollection demarretyping demarreuniqueMPgraphic \
-demarreuniqueMPpagegraphic demarreunittext demarreunpacked demarreusableMPgraphic demarreuseMPgraphic \
-demarreusemathstyleparameter demarreuserdata demarreusingbtxspecification demarreva demarrevbox \
-demarrevboxregister demarrevboxtohbox demarrevboxtohboxseparator demarreviewerlayer demarrevtop \
-demarrevtopregister demarrexcell demarrexcellgroup demarrexcolumn demarrexgroup \
-demarrexmldisplayverbatim demarrexmlinlineverbatim demarrexmlraw demarrexmlsetups demarrexrow \
-demarrexrowgroup demarrextable demarrextablebody demarrextablefoot demarrextablehead \
-demarrextablenext determinecaracteristiqueliste determinecaracteristiquesregistre determinenumerotete echelle \
-ecran ecritdansliste ecritentreliste element elements \
-environement espace espacefixe espacesfixes etire \
-faitreference fichierdactylo figureexterne gardeblocs grille \
-haut inconnu installelangue joursemaine langue \
-langueprincipale largeurligne ligneh lignenoire ligneregleetexte \
-lignesnoires llongueurliste marquage marquepage mathematique \
-menuinteraction mois montrecadre montrecouleur montredisposition \
-montreedition montreenvironnementpolicecorps montregrille montregroupecouleur montrejeusymboles \
-montremakeup montrepalette montrepolicecorps montrereglages montrestruts \
-motdroit numeroformule numeropage numeros numerotete \
-numerotetecourant obtientmarquage oriente periodes pilechamp \
-placecoteacote placeflottant placeformule placelesunsaudessusdesautres placeliste \
-placelisteinmbriquee placemarquespages placenotespdp placenotespdplocales placenumeropage \
-placenumerotete placeregistre placesousformule placesurgrille placetextetete \
-prendbuffer produit programme projet qqpart \
-razmarquage referencepage referencetexte reflete reglealignement \
-reglearrangement reglearriereplan reglearriereplans reglebarreinteraction reglebloc \
-regleblocsection reglebuffer reglecapitales reglechamp reglechamps \
-regleclipping reglecolonnes reglecommentaire reglecommentairepage reglecompoetroite \
-reglecomposeenalinea reglecouleur reglecouleurs regledactylo regledemarrestoppe \
-regledisposition regleecraninteraction regleelements regleencadre regleentete \
-regleenumerations regleepaisseurligne regleespaceblanc regleespacement regleespacementinterligne \
-regleflottant regleflottants regleformulaires regleformules reglegroupeselements \
-regleinf regleinteraction regleintitule regleintitules reglejeucolonne \
-reglejeusymboles reglelangue reglelignes reglelignesnoires reglelignesreglestexte \
-regleliste reglelisteimbriquee reglemakeup reglemargereglee reglemarquage \
-reglemarquagehyphenation reglemenuinteraction reglenotepdp reglenumeropage reglenumerotationligne \
-reglenumerotationpage reglenumerotationparagraphe reglenumerotete regleoriente reglepalette \
-reglepapier regleparagraphes reglepdp regleplacementopposition reglepolicecorps \
-reglepositionnement regleprogrammes reglereferencage regleregistre regleremplitligne \
-regleremplitlignesreglees regleseparationflottant reglesousnumeropage reglesup reglesynonymes \
-regletableaux regletabulation regletaillepapier regletete regletetes \
-regletexte regletextesentete regletextesinf regletextespdp regletextessup \
-regletextestexte regletolerance regletraitsfins regletransitionspage regletri \
-regletype regleurl remplitligne remplitlignesreglees remplittexte \
-sansespace sanslignesenteteetpdp sanslignessupetinf selectionneblocs separeflottant \
-settext sousnumeropage stoppeJScode stoppeJSpreamble stoppeLUA \
-stoppeMP stoppeMPclip stoppeMPcode stoppeMPdefinitions stoppeMPdrawing \
-stoppeMPenvironment stoppeMPextensions stoppeMPinclusions stoppeMPinitializations stoppeMPpage \
-stoppeMPpositiongraphic stoppeMPpositionmethod stoppeMPrun stoppePARSEDXML stoppeTABLE \
-stoppeTABLEbody stoppeTABLEfoot stoppeTABLEhead stoppeTABLEnext stoppeTC \
-stoppeTD stoppeTDs stoppeTEX stoppeTEXpage stoppeTH \
-stoppeTN stoppeTR stoppeTRs stoppeTX stoppeTY \
-stoppeXML stoppealign stoppealigneadroite stoppealigneagauche stoppealigneaumilieu \
-stoppealignment stoppeallmodes stoppeappendices stoppearrangedpages stoppearriereplan \
-stoppeaside stoppeattachment stoppebackmatter stoppebar stoppebbordermatrix \
-stoppebitmapimage stoppeblockquote stoppebodymatter stoppebordermatrix stoppeboxedcolumns \
-stoppebtxlabeltext stoppebtxrenderingdefinitions stoppebuffer stoppecases stoppecatcodetable \
-stoppecenteraligned stoppechapter stoppecharacteralign stoppecheckedfences stoppechemical \
-stoppechemicaltext stoppecollect stoppecollecting stoppecolorintent stoppecoloronly \
-stoppecolorset stoppecolumns stoppecolumnset stoppecolumnsetspan stoppecombination \
-stoppecomment stoppecomposant stoppecontextcode stoppecontextdefinitioncode stoppecouleur \
-stoppectxfunction stoppectxfunctiondefinition stoppecurrentcolor stoppecurrentlistentrywrapper stoppedelimited \
-stoppedelimitedtext stoppedisplaymath stoppedmath stoppedocument stoppeeffect \
-stoppeelement stoppeembeddedxtable stoppeendnote stoppeendofline stoppeenvironement \
-stoppeexceptions stoppeexpanded stoppeexpandedcollect stoppeextendedcatcodetable stoppeexternalfigurecollection \
-stoppefacingfloat stoppefact stoppefigure stoppefiguretext stoppefittingpage \
-stoppefixed stoppefloatcombination stoppefont stoppefontclass stoppefontsolution \
-stoppefootnote stoppeformula stoppeformulas stoppeframed stoppeframedcell \
-stoppeframedcontent stoppeframedrow stoppeframedtable stoppeframedtext stoppefrontmatter \
-stoppegraphictext stoppegridsnapping stoppegroupe stoppehanging stoppehbox \
-stoppehboxestohbox stoppehboxregister stoppeheadtext stoppehelptext stoppehiding \
-stoppehighlight stoppehyphenation stoppeimath stoppeindentation stoppeindentedtext \
-stoppeinteraction stoppeinterface stoppeintermezzotext stoppeintertext stoppeitemgroup \
-stoppeitemgroupcolumns stoppeitemize stoppeknockout stoppelabeltext stoppelangue \
-stoppelayout stoppelegend stoppeligne stoppeligneregleetexte stoppelinealignment \
-stoppelinecorrection stoppelinefiller stoppelinenumbering stoppelines stoppelinetable \
-stoppelinetablebody stoppelinetablecell stoppelinetablehead stoppelocalfootnotes stoppelocalheadsetup \
-stoppelocallinecorrection stoppelocalnotes stoppelocalsetups stoppelua stoppeluacode \
-stoppeluaparameterset stoppeluasetups stoppemakeup stoppemargereglee stoppemarginblock \
-stoppemarkedcontent stoppemarkpages stoppemathalignment stoppemathcases stoppemathlabeltext \
-stoppemathmatrix stoppemathmode stoppemathstyle stoppematrices stoppematrix \
-stoppemaxaligned stoppemdformula stoppemenuinteraction stoppemiddlealigned stoppemiddlemakeup \
-stoppemixedcolumns stoppemode stoppemodeset stoppemodule stoppemoduletestsection \
-stoppempformula stoppenamedsection stoppenamedsubformulas stoppenarrow stoppenarrower \
-stoppenegative stoppenicelyfilledbox stoppenointerference stoppenotallmodes stoppenotext \
-stoppenotmode stoppeoperatortext stoppeopposite stoppeoutputstream stoppeoverlay \
-stoppeoverprint stoppepagecolumns stoppepagecomment stoppepagefigure stoppepagelayout \
-stoppepagemakeup stoppepar stoppeparagraph stoppeparagraphs stoppeparagraphscell \
-stoppeparbuilder stoppepart stoppepath stoppeplacechemical stoppeplacefigure \
-stoppeplaceflottant stoppeplaceformule stoppeplacegraphic stoppeplaceintermezzo stoppeplacelegend \
-stoppeplacepairedbox stoppeplacetable stoppepositioning stoppepositionoverlay stoppepositive \
-stoppepostponing stoppepostponingnotes stoppeprefixtext stoppeprocessassignmentcommand stoppeprocessassignmentlist \
-stoppeprocesscommacommand stoppeprocesscommalist stoppeproduit stoppeprojet stoppeprotect \
-stoppeprotectedcolors stoppepublication stoppepunctuation stoppequotation stoppequote \
-stopperandomized stopperandomseed stopperawsetups stoppereadingfile stoppereferenceprefix \
-stopperegime stoppereusableMPgraphic stopperuby stoppescript stoppesdformula \
-stoppesection stoppesectionblock stoppesectionblockenvironment stoppesectionlevel stoppesetups \
-stoppeshapebox stoppeshift stoppesidebar stoppesimplecolumns stoppespecialitem \
-stoppespeech stoppespformula stoppesplitformula stoppesplittext stoppespread \
-stoppestandardmakeup stoppestaticMPfigure stoppestaticMPgraphic stoppestrictinspectnextcharacter stoppestrut \
-stoppestyle stoppesubformulas stoppesubject stoppesubjectlevel stoppesubsection \
-stoppesubsentence stoppesubstack stoppesubsubject stoppesubsubsection stoppesubsubsubject \
-stoppesubsubsubsection stoppesubsubsubsubject stoppesubsubsubsubsection stoppesubsubsubsubsubject stoppesuffixtext \
-stoppesymbolset stoppetable stoppetablehead stoppetables stoppetabletail \
-stoppetabletext stoppetabulate stoppetabulatehead stoppetabulatetail stoppetagged \
-stoppetaglabeltext stoppetete stoppetexcode stoppetexdefinition stoppetext \
-stoppetextbackground stoppetextbackgroundmanual stoppetextcolor stoppetextcolorintent stoppetextflow \
-stoppetextmakeup stoppetitle stoppetokenlist stoppetokens stoppetransparent \
-stoppetypescript stoppetypescriptcollection stoppetyping stoppeuniqueMPgraphic stoppeuniqueMPpagegraphic \
-stoppeunittext stoppeunpacked stoppeusableMPgraphic stoppeuseMPgraphic stoppeusemathstyleparameter \
-stoppeuserdata stoppeusingbtxspecification stoppeva stoppevbox stoppevboxregister \
-stoppevboxtohbox stoppevboxtohboxseparator stoppeviewerlayer stoppevtop stoppevtopregister \
-stoppexcell stoppexcellgroup stoppexcolumn stoppexgroup stoppexmldisplayverbatim \
-stoppexmlinlineverbatim stoppexmlraw stoppexmlsetups stoppexrow stoppexrowgroup \
-stoppextable stoppextablebody stoppextablefoot stoppextablehead stoppextablenext \
-symbole tapebuffer textenotepdp traduire traiteblocs \
-traitfin traitsfins uneligne utiliseJSscripts utiliseURL \
-utiliseblocs utilisechemin utilisedocumentexterne utilisefigureexterne utilisemodule \
-utilisepsiteaudioexterne utilisesymboles utiliseurl va vaalaboite \
-vaalapage vaenbas valeurcouleur vide
-
-keywordclass.context.it=\
-GIORNOSETTIMANA Lettera Lettere MESE \
-Numeri Numeriromani PAROLA PAROLE Parola \
-Parole adattacampo adattalayout al allineacentro \
-allineadestra allineasinistra ambiente ap apagina \
-barracolori barrainterazione cambiaafontdeltesto campi capello \
-chim circondato clonacampo colonna colore \
-coloregrigio commento componenet confrontagruppocolori confrontatavolozza \
-convertinumero copiacampo correggispaziobianco da daqualcheparte \
-data datadioggi definisci definisciaccento definisciambientefontdeltesto \
-definisciblocco definiscibloccosezione definiscibuffer definiscicampo definiscicapoversi \
-definiscicarattere definiscicolore definiscicomando definisciconversione definiscidescrizione \
-definiscidimensionicarta definiscielenco definiscielencocombinato definiscienumerazione definiscietichetta \
-definiscifigurasimbolo definiscifont definiscifontdeltesto definisciformatoriferimento definiscigruppocolonne \
-definiscigruppocolori definiscihbox definisciincorniciato definisciiniziatermina definiscilayout \
-definiscimakeup definiscimarcatura definiscimenuinterazione definiscimodellotabella definiscioggettomobile \
-definisciordinamento definisciprofilo definisciprogramma definisciregistro definisciriferimento \
-definiscisezione definiscisimbolo definiscisinonimi definiscisinonimofont definiscisottocampo \
-definiscisovrapposizione definiscistackcampi definiscistile definiscistilefont definiscitabulato \
-definiscitavolozza definiscitesta definiscitesto definiscitestoincorniciato definiscitype \
-definiscityping determinacaratteristicheregistro determinacarattersticheelenco determinanumerotesta elaborablocchi \
-elementi elemento figuraesterna giornosettimana griglia \
-ignoto impostaallineamento impostaampiezzariga impostabarrainterazione impostablocco \
-impostabloccosezione impostabuffer impostacampi impostacampo impostacapoversi \
-impostacaption impostacaptions impostacima impostaclippling impostacolonne \
-impostacolore impostacolori impostacommento impostacommentopagina impostadimensionicarta \
-impostaelementi impostaelencazioni impostaelenco impostaelencocombinato impostaenumerazioni \
-impostafondo impostafontdeltesto impostaforms impostaformule impostagruppocolonne \
-impostaincorniciato impostainiziatermina impostainstestazione impostainterazione impostainterlinea \
-impostalayout impostalineemargine impostalineenere impostalineeriempimento impostalineesottili \
-impostalineetesto impostalingua impostamaiuscole impostamakeup impostamarcatura \
-impostamenuinterazione impostamenzione impostanotepdp impostanumerazionecapoversi impostanumerazionepagina \
-impostanumerazionerighe impostanumeropagina impostanumerosottopagina impostanumerotesta impostaoggettimobili \
-impostaoggettomobile impostaordinamento impostaparranging impostapdp impostapiustretto \
-impostaposizionamento impostaposizionamentoopposti impostaprogrammi impostaregistro impostarientro \
-impostariferimento impostarighe impostarigheriempimento impostarigovuoto impostarotazione \
-impostaschermointerazione impostasegnosillabazione impostasetsimboli impostasfondi impostasfondo \
-impostasinonimi impostaspaziatura impostaspaziobianco impostaspezzamentooggettomobile impostatabelle \
-impostatabulato impostatavolozza impostatesta impostateste impostatesticima \
-impostatestifondo impostatestiincorniciati impostatestiintestazioni impostatestipdp impostatesto \
-impostatestotesti impostatolleranza impostatransizionepagina impostatype impostatyping \
-impostaurl incorniciato iniziaJScode iniziaJSpreamble iniziaLUA \
-iniziaMP iniziaMPclip iniziaMPcode iniziaMPdefinitions iniziaMPdrawing \
-iniziaMPenvironment iniziaMPextensions iniziaMPinclusions iniziaMPinitializations iniziaMPpage \
-iniziaMPpositiongraphic iniziaMPpositionmethod iniziaMPrun iniziaPARSEDXML iniziaTABLE \
-iniziaTABLEbody iniziaTABLEfoot iniziaTABLEhead iniziaTABLEnext iniziaTC \
-iniziaTD iniziaTDs iniziaTEX iniziaTEXpage iniziaTH \
-iniziaTN iniziaTR iniziaTRs iniziaTX iniziaTY \
-iniziaXML iniziaalign iniziaalignment iniziaallineacentro iniziaallineadestra \
-iniziaallineasinistra iniziaallmodes iniziaambiente iniziaappendices iniziaarrangedpages \
-iniziaaside iniziaattachment iniziabackmatter iniziabar iniziabbordermatrix \
-iniziabitmapimage iniziablockquote iniziabodymatter iniziabordermatrix iniziaboxedcolumns \
-iniziabtxlabeltext iniziabtxrenderingdefinitions iniziabuffer iniziacases iniziacatcodetable \
-iniziacenteraligned iniziachapter iniziacharacteralign iniziacheckedfences iniziachemical \
-iniziachemicaltext iniziacollect iniziacollecting iniziacolore iniziacolorintent \
-iniziacoloronly iniziacolorset iniziacolumns iniziacolumnset iniziacolumnsetspan \
-iniziacombination iniziacomment iniziacomponenet iniziacontextcode iniziacontextdefinitioncode \
-iniziactxfunction iniziactxfunctiondefinition iniziacurrentcolor iniziacurrentlistentrywrapper iniziadelimited \
-iniziadelimitedtext iniziadisplaymath iniziadmath iniziadocument iniziaeffect \
-iniziaelement iniziaelemento iniziaembeddedxtable iniziaendnote iniziaendofline \
-iniziaexceptions iniziaexpanded iniziaexpandedcollect iniziaextendedcatcodetable iniziaexternalfigurecollection \
-iniziafacingfloat iniziafact iniziafigure iniziafiguretext iniziafittingpage \
-iniziafixed iniziafloatcombination iniziafont iniziafontclass iniziafontsolution \
-iniziafootnote iniziaformula iniziaformulas iniziaframedcell iniziaframedcontent \
-iniziaframedrow iniziaframedtable iniziaframedtext iniziafrontmatter iniziagraphictext \
-iniziagridsnapping iniziahanging iniziahbox iniziahboxestohbox iniziahboxregister \
-iniziaheadtext iniziahelptext iniziahiding iniziahighlight iniziahyphenation \
-iniziaimath iniziaimpaccato iniziaincorniciato iniziaindentation iniziaindentedtext \
-iniziainteraction iniziainterface iniziaintermezzotext iniziaintertext iniziaitemgroup \
-iniziaitemgroupcolumns iniziaitemize iniziaknockout inizialabeltext inizialayout \
-inizialegend inizialinealignment inizialineamargine inizialineatesto inizialinecorrection \
-inizialinefiller inizialinenumbering inizialines inizialinetable inizialinetablebody \
-inizialinetablecell inizialinetablehead inizialingua inizialocalfootnotes inizialocalheadsetup \
-inizialocallinecorrection inizialocalnotes inizialocalsetups inizialua inizialuacode \
-inizialuaparameterset inizialuasetups iniziamakeup iniziamarginblock iniziamarkedcontent \
-iniziamarkpages iniziamathalignment iniziamathcases iniziamathlabeltext iniziamathmatrix \
-iniziamathmode iniziamathstyle iniziamatrices iniziamatrix iniziamaxaligned \
-iniziamdformula iniziamenuinterattivo iniziamettiformula iniziamiddlealigned iniziamiddlemakeup \
-iniziamixedcolumns iniziamode iniziamodeset iniziamodule iniziamoduletestsection \
-iniziampformula inizianamedsection inizianamedsubformulas inizianarrow inizianarrower \
-inizianegative inizianicelyfilledbox inizianointerference inizianotallmodes inizianotext \
-inizianotmode iniziaoperatortext iniziaopposite iniziaoutputstream iniziaoverlay \
-iniziaoverprint iniziapagecolumns iniziapagecomment iniziapagefigure iniziapagelayout \
-iniziapagemakeup iniziapar iniziaparagraph iniziaparagraphs iniziaparagraphscell \
-iniziaparbuilder iniziapart iniziapath iniziaplacechemical iniziaplacefigure \
-iniziaplacefloat iniziaplacegraphic iniziaplaceintermezzo iniziaplacelegend iniziaplacepairedbox \
-iniziaplacetable iniziapositioning iniziapositionoverlay iniziapositive iniziapostponing \
-iniziapostponingnotes iniziaprefixtext iniziaprocessassignmentcommand iniziaprocessassignmentlist iniziaprocesscommacommand \
-iniziaprocesscommalist iniziaprodotto iniziaprogetto iniziaprotect iniziaprotectedcolors \
-iniziapubblicazione iniziapunctuation iniziaquotation iniziaquote iniziarandomized \
-iniziarandomseed iniziarawsetups iniziareadingfile iniziareferenceprefix iniziaregime \
-iniziareusableMPgraphic iniziariga iniziaruby iniziascript iniziasdformula \
-iniziasection iniziasectionblock iniziasectionblockenvironment iniziasectionlevel iniziasetups \
-iniziasfondo iniziashapebox iniziashift iniziasidebar iniziasimplecolumns \
-iniziaspecialitem iniziaspeech iniziaspformula iniziasplitformula iniziasplittext \
-iniziaspread iniziastandardmakeup iniziastaticMPfigure iniziastaticMPgraphic iniziastrictinspectnextcharacter \
-iniziastrut iniziastyle iniziasubformulas iniziasubject iniziasubjectlevel \
-iniziasubsection iniziasubsentence iniziasubstack iniziasubsubject iniziasubsubsection \
-iniziasubsubsubject iniziasubsubsubsection iniziasubsubsubsubject iniziasubsubsubsubsection iniziasubsubsubsubsubject \
-iniziasuffixtext iniziasymbolset iniziatable iniziatablehead iniziatables \
-iniziatabletail iniziatabletext iniziatabulate iniziatabulatehead iniziatabulatetail \
-iniziatagged iniziataglabeltext iniziatesta iniziatexcode iniziatexdefinition \
-iniziatext iniziatextbackground iniziatextbackgroundmanual iniziatextcolor iniziatextcolorintent \
-iniziatextflow iniziatextmakeup iniziatitle iniziatokenlist iniziatokens \
-iniziatransparent iniziatypescript iniziatypescriptcollection iniziatyping iniziauniqueMPgraphic \
-iniziauniqueMPpagegraphic iniziaunittext iniziaunpacked iniziausableMPgraphic iniziauseMPgraphic \
-iniziausemathstyleparameter iniziauserdata iniziausingbtxspecification iniziavaia iniziavbox \
-iniziavboxregister iniziavboxtohbox iniziavboxtohboxseparator iniziaviewerlayer iniziavtop \
-iniziavtopregister iniziaxcell iniziaxcellgroup iniziaxcolumn iniziaxgroup \
-iniziaxmldisplayverbatim iniziaxmlinlineverbatim iniziaxmlraw iniziaxmlsetups iniziaxrow \
-iniziaxrowgroup iniziaxtable iniziaxtablebody iniziaxtablefoot iniziaxtablehead \
-iniziaxtablenext inriga installalingua intorno lettera \
-lettere lineanera lineasottile lineatesto lineenere \
-lineeriempimento lineesottili lingua linguaprincipale lunghezzaelenco \
-marcatura matematica menuinterattivo mese mettielenco \
-mettielencocombinato mettifiancoafianco mettiformula mettiingriglia mettinotepdp \
-mettinotepdplocali mettinumeropagina mettiregistro mettisegnalibro mettisottoformula \
-mettiunosullaltro mostraambientefontdeltesto mostracolore mostracornice mostrafontdeltesto \
-mostragriglia mostragruppocolori mostraimpostazioni mostralyout mostramakeup \
-mostrasetsimboli mostrastampa mostrastruts mostratavolozza nascondiblocchi \
-nientelineecimafondo nientelineintestazionepdp nientespazio nota numeri \
-numeriromani numeroformula numeropagina numeropaginacompleto numerotesta \
-numerotestacorrente pagina paroladestra ped pedap \
-perlungo posizionanumerotesta posizionatestotesta posizione prendibuffer \
-prendimarcatura prodotto progetto programma pulsante \
-pulsantemenu pulsantinterazione punti qualcheriga reimpostamarcatura \
-rif riferimento riferimentopagina riferimentotesto riflessione \
-rigariempimento rigovuoto ruota scala schermo \
-scrividentroelenco scriviinelenco segnalibro selezionablocchi settext \
-sfondo simbolo spazifissi spazio spaziofisso \
-spessoreriga spezzaoggettomobile stackcampi stirato terminaJScode \
-terminaJSpreamble terminaLUA terminaMP terminaMPclip terminaMPcode \
-terminaMPdefinitions terminaMPdrawing terminaMPenvironment terminaMPextensions terminaMPinclusions \
-terminaMPinitializations terminaMPpage terminaMPpositiongraphic terminaMPpositionmethod terminaMPrun \
-terminaPARSEDXML terminaTABLE terminaTABLEbody terminaTABLEfoot terminaTABLEhead \
-terminaTABLEnext terminaTC terminaTD terminaTDs terminaTEX \
-terminaTEXpage terminaTH terminaTN terminaTR terminaTRs \
-terminaTX terminaTY terminaXML terminaalign terminaalignment \
-terminaallineacentro terminaallineadestra terminaallineasinistra terminaallmodes terminaambiente \
-terminaappendices terminaarrangedpages terminaaside terminaattachment terminabackmatter \
-terminabar terminabbordermatrix terminabitmapimage terminablockquote terminabodymatter \
-terminabordermatrix terminaboxedcolumns terminabtxlabeltext terminabtxrenderingdefinitions terminabuffer \
-terminacases terminacatcodetable terminacenteraligned terminachapter terminacharacteralign \
-terminacheckedfences terminachemical terminachemicaltext terminacollect terminacollecting \
-terminacolore terminacolorintent terminacoloronly terminacolorset terminacolumns \
-terminacolumnset terminacolumnsetspan terminacombination terminacomment terminacomponenet \
-terminacontextcode terminacontextdefinitioncode terminactxfunction terminactxfunctiondefinition terminacurrentcolor \
-terminacurrentlistentrywrapper terminadelimited terminadelimitedtext terminadisplaymath terminadmath \
-terminadocument terminaeffect terminaelement terminaelemento terminaembeddedxtable \
-terminaendnote terminaendofline terminaexceptions terminaexpanded terminaexpandedcollect \
-terminaextendedcatcodetable terminaexternalfigurecollection terminafacingfloat terminafact terminafigure \
-terminafiguretext terminafittingpage terminafixed terminafloatcombination terminafont \
-terminafontclass terminafontsolution terminafootnote terminaformula terminaformulas \
-terminaframedcell terminaframedcontent terminaframedrow terminaframedtable terminaframedtext \
-terminafrontmatter terminagraphictext terminagridsnapping terminahanging terminahbox \
-terminahboxestohbox terminahboxregister terminaheadtext terminahelptext terminahiding \
-terminahighlight terminahyphenation terminaimath terminaimpaccato terminaincorniciato \
-terminaindentation terminaindentedtext terminainteraction terminainterface terminaintermezzotext \
-terminaintertext terminaitemgroup terminaitemgroupcolumns terminaitemize terminaknockout \
-terminalabeltext terminalayout terminalegend terminalinealignment terminalineamargine \
-terminalineatesto terminalinecorrection terminalinefiller terminalinenumbering terminalines \
-terminalinetable terminalinetablebody terminalinetablecell terminalinetablehead terminalingua \
-terminalocalfootnotes terminalocalheadsetup terminalocallinecorrection terminalocalnotes terminalocalsetups \
-terminalua terminaluacode terminaluaparameterset terminaluasetups terminamakeup \
-terminamarginblock terminamarkedcontent terminamarkpages terminamathalignment terminamathcases \
-terminamathlabeltext terminamathmatrix terminamathmode terminamathstyle terminamatrices \
-terminamatrix terminamaxaligned terminamdformula terminamenuinterattivo terminamettiformula \
-terminamiddlealigned terminamiddlemakeup terminamixedcolumns terminamode terminamodeset \
-terminamodule terminamoduletestsection terminampformula terminanamedsection terminanamedsubformulas \
-terminanarrow terminanarrower terminanegative terminanicelyfilledbox terminanointerference \
-terminanotallmodes terminanotext terminanotmode terminaoperatortext terminaopposite \
-terminaoutputstream terminaoverlay terminaoverprint terminapagecolumns terminapagecomment \
-terminapagefigure terminapagelayout terminapagemakeup terminapar terminaparagraph \
-terminaparagraphs terminaparagraphscell terminaparbuilder terminapart terminapath \
-terminaplacechemical terminaplacefigure terminaplacefloat terminaplacegraphic terminaplaceintermezzo \
-terminaplacelegend terminaplacepairedbox terminaplacetable terminapositioning terminapositionoverlay \
-terminapositive terminapostponing terminapostponingnotes terminaprefixtext terminaprocessassignmentcommand \
-terminaprocessassignmentlist terminaprocesscommacommand terminaprocesscommalist terminaprodotto terminaprogetto \
-terminaprotect terminaprotectedcolors terminapubblicazione terminapunctuation terminaquotation \
-terminaquote terminarandomized terminarandomseed terminarawsetups terminareadingfile \
-terminareferenceprefix terminaregime terminareusableMPgraphic terminariga terminaruby \
-terminascript terminasdformula terminasection terminasectionblock terminasectionblockenvironment \
-terminasectionlevel terminasetups terminasfondo terminashapebox terminashift \
-terminasidebar terminasimplecolumns terminaspecialitem terminaspeech terminaspformula \
-terminasplitformula terminasplittext terminaspread terminastandardmakeup terminastaticMPfigure \
-terminastaticMPgraphic terminastrictinspectnextcharacter terminastrut terminastyle terminasubformulas \
-terminasubject terminasubjectlevel terminasubsection terminasubsentence terminasubstack \
-terminasubsubject terminasubsubsection terminasubsubsubject terminasubsubsubsection terminasubsubsubsubject \
-terminasubsubsubsubsection terminasubsubsubsubsubject terminasuffixtext terminasymbolset terminatable \
-terminatablehead terminatables terminatabletail terminatabletext terminatabulate \
-terminatabulatehead terminatabulatetail terminatagged terminataglabeltext terminatesta \
-terminatexcode terminatexdefinition terminatext terminatextbackground terminatextbackgroundmanual \
-terminatextcolor terminatextcolorintent terminatextflow terminatextmakeup terminatitle \
-terminatokenlist terminatokens terminatransparent terminatypescript terminatypescriptcollection \
-terminatyping terminauniqueMPgraphic terminauniqueMPpagegraphic terminaunittext terminaunpacked \
-terminausableMPgraphic terminauseMPgraphic terminausemathstyleparameter terminauserdata terminausingbtxspecification \
-terminavaia terminavbox terminavboxregister terminavboxtohbox terminavboxtohboxseparator \
-terminaviewerlayer terminavtop terminavtopregister terminaxcell terminaxcellgroup \
-terminaxcolumn terminaxgroup terminaxmldisplayverbatim terminaxmlinlineverbatim terminaxmlraw \
-terminaxmlsetups terminaxrow terminaxrowgroup terminaxtable terminaxtablebody \
-terminaxtablefoot terminaxtablehead terminaxtablenext testonotapdp testoriempimento \
-tieniblocchi traduci usaJSscripts usaURL usablocco \
-usacartella usacolonnasonoraesterna usadocumentoesterno usafiguraesterna usamodulo \
-usasimboli usaurl vaia vaiabox vaiapagina \
-vaigiu valorecolore versione
-
-keywordclass.context.nl=\
-Cijfers Kap Letter Letters \
-MAAND Romeins WEEKDAG WOORD WOORDEN \
-Woord Woorden achtergrond bepaalkopnummer bepaallijstkenmerken \
-bepaalregisterkenmerken bewaarbuffer blanko blokje blokjes \
-cijfers converteernummer copieerveld corrigeerwitruimte datum \
-definieer definieeraccent definieeralineas definieerblok definieerbuffer \
-definieercombinatie definieercommando definieerconversie definieerfiguursymbool definieerfont \
-definieerfontstijl definieerfontsynoniem definieerhbox definieeringesprongentext definieerinteractiemenu \
-definieeritemgroep definieerkadertekst definieerkarakter definieerkleur definieerkleurgroep \
-definieerkolomgroep definieerkolomovergang definieerkop definieerkorps definieerkorpsomgeving \
-definieerlayer definieerlayout definieerletter definieerlijst definieermarkering \
-definieeromlijnd definieeropmaak definieeroverlay definieerpaginaovergang definieerpalet \
-definieerpapierformaat definieerplaats definieerplaatsblok definieerprofiel definieerprogramma \
-definieerreferentie definieerreferentieformaat definieerregister definieersamengesteldelijst definieersectie \
-definieersectieblok definieersorteren definieerstartstop definieersubveld definieersymbool \
-definieersynoniemen definieertabelvorm definieertabulatie definieertekst definieertekstachtergrond \
-definieertype definieertypen definieerveld definieerveldstapel definieerwiskundeuitlijnen \
-doordefinieren doorlabelen doornummeren dunnelijn dunnelijnen \
-eenregel ergens externfiguur formulenummer gebruikJSscripts \
-gebruikURL gebruikblokken gebruikexterndocument gebruikexternfiguur gebruikexterngeluidsfragment \
-gebruikmodule gebruikpad gebruiksymbolen gebruiktypescript gebruiktypescriptfile \
-gebruikurl geenbovenenonderregels geenhoofdenvoetregels geenspatie grijskleur \
-haalbuffer haalmarkering haarlijn handhaafblokken hoofdtaal \
-hoog huidigedatum huidigekopnummer inlijnd inregel \
-installeertaal interactiebalk interactiebuttons interactiemenu invullijnen \
-invulregel invultekst kleur kleurenbalk kleurwaarde \
-kloonveld kolom kopnummer laag laho \
-legeregels letter letters lijndikte lijstlengte \
-maand markeer naar naarbox naarpagina \
-nokap noot omgeving omlaag omlijnd \
-onbekend onderdeel op oppagina pagina \
-paginanummer paginareferentie paslayoutaan passendveld plaatsbookmarks \
-plaatsformule plaatskopnummer plaatskoptekst plaatslijst plaatslijstmetsynoniemen \
-plaatslokalevoetnoten plaatsnaastelkaar plaatsonderelkaar plaatsopgrid plaatspaginanummer \
-plaatsplaatsblok plaatsregister plaatsruwelijst plaatssamengesteldelijst plaatssubformule \
-plaatsvoetnoten positioneer produkt programma projekt \
-punten refereer referentie regellinks regelmidden \
-regelrechts resetmarkering romeins rooster roteer \
-schaal scherm schrijfnaarlijst schrijftussenlijst selecteerblokken \
-som spatie spiegel splitsplaatsblok startachtergrond \
-startinteractiemenu startkantlijn startkleur startkop startlokalevoetnoten \
-startmargeblok startnaar startomgeving startomlijnd startonderdeel \
-startopelkaar startplaatsformule startplaatsplaatsblok startprodukt startprojekt \
-startpublicatie startregel startregelcorrectie startregellinks startregelmidden \
-startregelrechts startsom starttaal starttekstachtergrond starttekstlijn \
-startuitlijnen stelachtergrondenin stelachtergrondin stelalineasin stelarrangerenin \
-stelblankoin stelblokin stelblokjesin stelblokkopjein stelblokkopjesin \
-stelbovenin stelboventekstenin stelbufferin stelciterenin stelclipin \
-stelcommentaarin steldoordefinierenin steldoornummerenin steldunnelijnenin stelformulein \
-stelformulesin stelformulierenin stelhoofdin stelhoofdtekstenin stelingesprongentextin \
-stelinmargein stelinspringenin stelinteractiebalkin stelinteractiein stelinteractiemenuin \
-stelinteractieschermin stelinterliniein stelinvullijnenin stelinvulregelsin stelitemgroepin \
-stelitemsin stelkadertekstenin stelkadertekstin stelkantlijnin stelkapitalenin \
-stelkleurenin stelkleurin stelkolomgroepin stelkolomgroepregelsin stelkolomgroepstartin \
-stelkolommenin stelkopin stelkopnummerin stelkoppeltekenin stelkoppenin \
-stelkorpsin stellayoutin stellijndiktein stellijstin stelmargeblokkenin \
-stelmarkeringin stelnaastplaatsenin stelomlijndin stelonderin stelondertekstenin \
-stelopmaakin stelopsommingenin stelpaginacommentaarin stelpaginanummerin stelpaginanummeringin \
-stelpaginaovergangenin stelpaletin stelpapierformaatin stelpapierin stelparagraafnummerenin \
-stelplaatsblokin stelplaatsblokkenin stelplaatsbloksplitsenin stelplaatsin stelpositionerenin \
-stelprogrammasin stelrefererenin stelregelnummerenin stelregelsin stelregisterin \
-stelroterenin stelsamengesteldelijstin stelsectieblokin stelsmallerin stelsorterenin \
-stelspatieringin stelstartstopin stelsubpaginanummerin stelsymboolsetin stelsynoniemenin \
-steltaalin steltabellenin steltabulatiein steltekstachtergrondin steltekstin \
-steltekstinhoudin steltekstlijnenin stelteksttekstenin steltolerantiein steltypein \
-steltypenin steluitlijnenin stelurlin stelveldenin stelveldin \
-stelvoetin stelvoetnotenin stelvoettekstenin stelwiskundeuitlijnenin stelwitruimtein \
-stopachtergrond stopinteractiemenu stopkantlijn stopkleur stopkop \
-stoplokalevoetnoten stopmargeblok stopnaar stopomgeving stopomlijnd \
-stoponderdeel stopopelkaar stopplaatsformule stopplaatsplaatsblok stopprodukt \
-stopprojekt stoppublicatie stopregel stopregelcorrectie stopregellinks \
-stopregelmidden stopregelrechts stopsom stoptaal stoptekstachtergrond \
-stoptekstlijn stopuitlijnen subpaginanummer switchnaarkorps symbool \
-taal tekstlijn tekstreferentie testkolom testpagina \
-toelichting toongrid tooninstellingen toonkader toonkleur \
-toonkleurgroep toonkorps toonkorpsomgeving toonlayout toonopmaak \
-toonpalet toonprint toonstruts toonsymboolset uit \
-uitgerekt vastespatie vastespaties veld veldstapel \
-verbergblokken vergelijkkleurgroep vergelijkpalet versie vertaal \
-verwerkblokken voetnoottekst volledigepaginanummer volledigregister voluit \
-weekdag wiskunde woordrechts
-
-keywordclass.context.pe=\
-آیتم آیتمها آینه از \
-استÙاده‌بلوکها استÙاده‌دستخط‌تایپ استÙاده‌شکل‌خارجی استÙاده‌قطعه‌موزیک‌خارجی استÙاده‌مدول \
-استÙاده‌مسیر استÙاده‌نمادها استÙاده‌نوشتارخارجی استÙاده‌پرونده‌دستخط‌تایپ اعدادلاتین \
-اÙزودن انتخاب‌بلوکها بارگذاری‌آرایش بارگذاری‌آیتمها بارگذاری‌ارجاع \
-بارگذاری‌اندازه‌برگ بارگذاری‌باریکتر بارگذاری‌باÙر بارگذاری‌بالا بارگذاری‌بردباری \
-بارگذاری‌برنامه‌ها بارگذاری‌برگ بارگذاری‌بلوک بارگذاری‌بلوک‌بخش بارگذاری‌تایپ \
-بارگذاری‌تایپ‌کردن بارگذاری‌ترتیب بارگذاری‌تنظیم بارگذاری‌تنظیم‌ریاضی بارگذاری‌ته‌برگ \
-بارگذاری‌تورÙتگی بارگذاری‌توضیح بارگذاری‌توضیح‌صÙحه بارگذاری‌ثبت بارگذاری‌جانشانی \
-بارگذاری‌جدولها بارگذاری‌جدول‌بندی بارگذاری‌خالی بارگذاری‌خطها بارگذاری‌خطهای‌حاشیه \
-بارگذاری‌خطهای‌سیاه بارگذاری‌خطهای‌متن بارگذاری‌خطهای‌مجموعه‌ستون بارگذاری‌خطها‌ی‌نازک بارگذاری‌درج‌درخطها \
-بارگذاری‌درج‌مخال٠بارگذاری‌دوران بارگذاری‌رنگ بارگذاری‌رنگها بارگذاری‌زبان \
-بارگذاری‌ستونها بارگذاری‌سر بارگذاری‌سربرگ بارگذاری‌سرها بارگذاری‌شرح \
-بارگذاری‌شرحها بارگذاری‌شروع‌مجموعه‌ستون بارگذاری‌شروع‌پایان بارگذاری‌شماره‌زیرصÙحه بارگذاری‌شماره‌سر \
-بارگذاری‌شماره‌صÙحه بارگذاری‌شماره‌گذاریها بارگذاری‌شماره‌گذاری‌صÙحه بارگذاری‌شماره‌گذاری‌پاراگرا٠بارگذاری‌شماره‌‌گذاری‌خط \
-بارگذاری‌شناور بارگذاری‌شناورها بارگذاری‌شکاÙتن‌شناورها بارگذاری‌طرح بارگذاری‌طرح‌بندی \
-بارگذاری‌عرض‌خط بارگذاری‌Ùاصله‌بین‌خط بارگذاری‌Ùرمولها بارگذاری‌Ùضای‌سÙید بارگذاری‌Ùضا‌گذاری \
-بارگذاری‌قالبی بارگذاری‌قلم‌متن بارگذاری‌لوح بارگذاری‌لیست بارگذاری‌لیست‌ترکیبی \
-بارگذاری‌مترادÙها بارگذاری‌متن بارگذاری‌متنهای‌بالا بارگذاری‌متن‌سربرگ بارگذاری‌متن‌قالبی \
-بارگذاری‌متن‌متنها بارگذاری‌متن‌پانوشت بارگذاری‌متن‌پایین بارگذاری‌مجموعه‌ستون بارگذاری‌مجموعه‌نماد \
-بارگذاری‌منوی‌پانل بارگذاری‌مکان‌گذاری بارگذاری‌میدان بارگذاری‌میدانها بارگذاری‌میله‌پانل \
-بارگذاری‌نشانه‌شکستن بارگذاری‌نشانه‌گذاری بارگذاری‌نقل بارگذاری‌پاراگراÙها بارگذاری‌پانل \
-بارگذاری‌پانوشتها بارگذاری‌پایین بارگذاری‌پرده‌پانل بارگذاری‌پرکردن‌خطها بارگذاری‌پس‌زمینه \
-بارگذاری‌پس‌زمینه‌ها بارگذاری‌چیدن بارگذاری‌گذارصÙحه بارگذاری‌گروههای‌آیتم بارگذاری‌گروه‌آیتم \
-بازنشانی‌نشانه‌گذاری بدون‌خط‌بالاوپایین بدون‌خط‌سروته‌برگ بدون‌Ùضا برنامه \
-بروبه بروبه‌جعبه بروبه‌صÙحه بروپایین بلند \
-بلوکهای‌پردازش بلوکها‌پنهان بنویس‌بین‌لیست بنویس‌در‌لیست تاریخ \
-تاریخ‌جاری تایپ تایپ‌باÙر تایپ‌پرونده ترجمه \
-تعری٠تعریÙ‌آرایش تعریÙ‌الگوی‌جدول تعریÙ‌اندازه‌برگ تعریÙ‌باÙر \
-تعریÙ‌بخش تعریÙ‌برنامه تعریÙ‌برچسب تعریÙ‌بلوک تعریÙ‌بلوک‌بخش \
-تعریÙ‌تایپ تعریÙ‌تایپ‌کردن تعریÙ‌تبدیل تعریÙ‌ترتیب تعریÙ‌ترکیب \
-تعریÙ‌تنظیم‌ریاضی تعریÙ‌توده‌میدان تعریÙ‌ثبت تعریÙ‌جانشانی تعریÙ‌جدول‌بندی \
-تعریÙ‌جعبه‌‌اÙÙ‚ÛŒ تعریÙ‌حر٠تعریÙ‌رنگ تعریÙ‌زیرمیدان تعریÙ‌سبک \
-تعریÙ‌سبک‌قلم تعریÙ‌سر تعریÙ‌شرح تعریÙ‌شروع‌پایان تعریÙ‌شماره‌بندی \
-تعریÙ‌شمایل‌مرجع تعریÙ‌شناور تعریÙ‌شکستن‌ستون تعریÙ‌شکست‌صÙحه تعریÙ‌طرح‌بندی \
-تعریÙ‌Ùرمان تعریÙ‌قالبی تعریÙ‌قلم تعریÙ‌قلم‌متن تعریÙ‌لایه \
-تعریÙ‌لهجه تعریÙ‌لوح تعریÙ‌لیست تعریÙ‌لیست‌ترکیبی تعریÙ‌مترادÙها \
-تعریÙ‌مترادÙ‌قلم تعریÙ‌متن تعریÙ‌متن‌قالبی تعریÙ‌مجموعه‌ستون تعریÙ‌محیط‌قلم‌بدنه \
-تعریÙ‌مرجع تعریÙ‌منوی‌پانل تعریÙ‌میدان تعریÙ‌نشانه‌گذاری تعریÙ‌نماد \
-تعریÙ‌نمادشکل تعریÙ‌پاراگراÙها تعریÙ‌پروÙایل تعریÙ‌پوشش تعریÙ‌گروه‌آیتم \
-تعریÙ‌گروه‌رنگ تعیین‌شماره‌سر تعیین‌محتوای‌متن تعیین‌مشخصات‌ثبت تعیین‌مشخصات‌لیست \
-تغییربه‌قلم‌بدنه تنظیم‌راست تنظیم‌طرح‌بندی تنظیم‌وسط توجه \
-توری تولید تک ثبت‌کامل حر٠\
-حرÙها Ø­Ùظ‌بلوکها خالی خطهای‌سیاه خطهای‌نازک \
-خطها‌خالی خط‌سیاه خط‌متن خط‌مو خط‌نازک \
-خ‌ا خ‌ع در درج‌ثبت درج‌درخط \
-درج‌درخطها درج‌درمتن درج‌در‌بالای‌یکدیگر درج‌در‌توری درج‌زیرÙرمول \
-درج‌شماره‌سر درج‌شماره‌صÙحه درج‌شناور درج‌Ùرمول درج‌لیست \
-درج‌لیست‌خام درج‌لیست‌مختلط درج‌متن‌سر درج‌پانوشتها درج‌پانوشتهای‌موضعی \
-درج‌چوب‌خط درج‌کنار‌به‌کنار درخط درصÙحه درقالبی \
-درمورد درون درپر دریاÙت‌باÙر دریاÙت‌نشانه \
-دوران دکمه دکمه‌منو دکمه‌پانل رج \
-رنگ رنگ‌خاکستری روزهÙته ریاضی زبان \
-زبان‌اصلی ستون ستون‌امتحان سرپوش‌کوچک‌نه شروعJScode \
-شروعJSpreamble شروعLUA شروعMP شروعMPclip شروعMPcode \
-شروعMPdefinitions شروعMPdrawing شروعMPenvironment شروعMPextensions شروعMPinclusions \
-شروعMPinitializations شروعMPpage شروعMPpositiongraphic شروعMPpositionmethod شروعMPrun \
-شروعPARSEDXML شروعTABLE شروعTABLEbody شروعTABLEfoot شروعTABLEhead \
-شروعTABLEnext شروعTC شروعTD شروعTDs شروعTEX \
-شروعTEXpage شروعTH شروعTN شروعTR شروعTRs \
-شروعTX شروعTY شروعXML شروعalign شروعalignment \
-شروعallmodes شروعappendices شروعarrangedpages شروعaside شروعattachment \
-شروعbackmatter شروعbar شروعbbordermatrix شروعbitmapimage شروعblockquote \
-شروعbodymatter شروعbordermatrix شروعboxedcolumns شروعbtxlabeltext شروعbtxrenderingdefinitions \
-شروعbuffer شروعcases شروعcatcodetable شروعcenteraligned شروعchapter \
-شروعcharacteralign شروعcheckedfences شروعchemical شروعchemicaltext شروعcollect \
-شروعcollecting شروعcolorintent شروعcoloronly شروعcolorset شروعcolumns \
-شروعcolumnset شروعcolumnsetspan شروعcombination شروعcomment شروعcontextcode \
-شروعcontextdefinitioncode شروعctxfunction شروعctxfunctiondefinition شروعcurrentcolor شروعcurrentlistentrywrapper \
-شروعdelimited شروعdelimitedtext شروعdisplaymath شروعdmath شروعdocument \
-شروعeffect شروعelement شروعembeddedxtable شروعendnote شروعendofline \
-شروعexceptions شروعexpanded شروعexpandedcollect شروعextendedcatcodetable شروعexternalfigurecollection \
-شروعfacingfloat شروعfact شروعfigure شروعfiguretext شروعfittingpage \
-شروعfixed شروعfloatcombination شروعfont شروعfontclass شروعfontsolution \
-شروعfootnote شروعformula شروعformulas شروعframedcell شروعframedcontent \
-شروعframedrow شروعframedtable شروعframedtext شروعfrontmatter شروعgraphictext \
-شروعgridsnapping شروعhanging شروعhbox شروعhboxestohbox شروعhboxregister \
-شروعheadtext شروعhelptext شروعhiding شروعhighlight شروعhyphenation \
-شروعimath شروعindentation شروعindentedtext شروعinteraction شروعinterface \
-شروعintermezzotext شروعintertext شروعitemgroup شروعitemgroupcolumns شروعitemize \
-شروعknockout شروعlabeltext شروعlayout شروعlegend شروعlinealignment \
-شروعlinecorrection شروعlinefiller شروعlinenumbering شروعlines شروعlinetable \
-شروعlinetablebody شروعlinetablecell شروعlinetablehead شروعlocalfootnotes شروعlocalheadsetup \
-شروعlocallinecorrection شروعlocalnotes شروعlocalsetups شروعlua شروعluacode \
-شروعluaparameterset شروعluasetups شروعmakeup شروعmarginblock شروعmarkedcontent \
-شروعmarkpages شروعmathalignment شروعmathcases شروعmathlabeltext شروعmathmatrix \
-شروعmathmode شروعmathstyle شروعmatrices شروعmatrix شروعmaxaligned \
-شروعmdformula شروعmiddlealigned شروعmiddlemakeup شروعmixedcolumns شروعmode \
-شروعmodeset شروعmodule شروعmoduletestsection شروعmpformula شروعnamedsection \
-شروعnamedsubformulas شروعnarrow شروعnarrower شروعnegative شروعnicelyfilledbox \
-شروعnointerference شروعnotallmodes شروعnotext شروعnotmode شروعoperatortext \
-شروعopposite شروعoutputstream شروعoverlay شروعoverprint شروعpagecolumns \
-شروعpagecomment شروعpagefigure شروعpagelayout شروعpagemakeup شروعpar \
-شروعparagraph شروعparagraphs شروعparagraphscell شروعparbuilder شروعpart \
-شروعpath شروعplacechemical شروعplacefigure شروعplacegraphic شروعplaceintermezzo \
-شروعplacelegend شروعplacepairedbox شروعplacetable شروعpositioning شروعpositionoverlay \
-شروعpositive شروعpostponing شروعpostponingnotes شروعprefixtext شروعprocessassignmentcommand \
-شروعprocessassignmentlist شروعprocesscommacommand شروعprocesscommalist شروعprotect شروعprotectedcolors \
-شروعpunctuation شروعquotation شروعquote شروعrandomized شروعrandomseed \
-شروعrawsetups شروعreadingfile شروعreferenceprefix شروعregime شروعreusableMPgraphic \
-شروعruby شروعscript شروعsdformula شروعsection شروعsectionblock \
-شروعsectionblockenvironment شروعsectionlevel شروعsetups شروعshapebox شروعshift \
-شروعsidebar شروعsimplecolumns شروعspecialitem شروعspeech شروعspformula \
-شروعsplitformula شروعsplittext شروعspread شروعstandardmakeup شروعstaticMPfigure \
-شروعstaticMPgraphic شروعstrictinspectnextcharacter شروعstrut شروعstyle شروعsubformulas \
-شروعsubject شروعsubjectlevel شروعsubsection شروعsubsentence شروعsubstack \
-شروعsubsubject شروعsubsubsection شروعsubsubsubject شروعsubsubsubsection شروعsubsubsubsubject \
-شروعsubsubsubsubsection شروعsubsubsubsubsubject شروعsuffixtext شروعsymbolset شروعtable \
-شروعtablehead شروعtables شروعtabletail شروعtabletext شروعtabulate \
-شروعtabulatehead شروعtabulatetail شروعtagged شروعtaglabeltext شروعtexcode \
-شروعtexdefinition شروعtext شروعtextbackground شروعtextbackgroundmanual شروعtextcolor \
-شروعtextcolorintent شروعtextflow شروعtextmakeup شروعtitle شروعtokenlist \
-شروعtokens شروعtransparent شروعtypescript شروعtypescriptcollection شروعtyping \
-شروعuniqueMPgraphic شروعuniqueMPpagegraphic شروعunittext شروعunpacked شروعusableMPgraphic \
-شروعuseMPgraphic شروعusemathstyleparameter شروعuserdata شروعusingbtxspecification شروعvbox \
-شروعvboxregister شروعvboxtohbox شروعvboxtohboxseparator شروعviewerlayer شروعvtop \
-شروعvtopregister شروعxcell شروعxcellgroup شروعxcolumn شروعxgroup \
-شروعxmldisplayverbatim شروعxmlinlineverbatim شروعxmlraw شروعxmlsetups شروعxrow \
-شروعxrowgroup شروعxtable شروعxtablebody شروعxtablefoot شروعxtablehead \
-شروعxtablenext شروعآیتم شروعبروبه شروعتنظیم‌راست شروعتنظیم‌وسط \
-شروعتولید شروعخط‌حاشیه شروعخط‌متن شروعدرج‌شناور شروعدرج‌Ùرمول \
-شروعرنگ شروعزبان شروعسر شروعÙشرده شروعقالبی \
-شروعمحیط شروعمنوی‌پانل شروعمولÙÙ‡ شروعنشر شروعپروژه \
-شروعپس‌زمینه شروعچپ‌چین شروع‌خط شماره‌زیرصÙحه شماره‌سر \
-شماره‌سرجاری شماره‌صÙحه شماره‌صÙحه‌کامل شماره‌Ùرمول شماره‌مبدل \
-شماره‌ها شکاÙتن‌شناور شکل‌خارجی صÙحه صÙحه‌تست \
-طول‌لیست عرض‌خط Ùضا Ùضاهای‌ثابت Ùضای‌ثابت \
-Ùضای‌سÙیدصحیح قالبی لوح‌مقایسه ماه متن‌پانوشت \
-محیط مراجعه مرجع مرجع‌صÙحه مرجع‌متن \
-مقایسه‌گروه‌رنگ مقداررنگ مقیاس منوی‌پانل مولÙÙ‡ \
-مکان میدان میدان‌شبیه‌سازی میدان‌پشته میدان‌کپی \
-میله‌رنگ میله‌پانل ناشناس نسخه نشانه‌گذاری \
-نصب‌زبان نقطه‌ها نماد نمایش‌آرایش نمایش‌بارگذاریها \
-نمایش‌بستها نمایش‌توری نمایش‌رنگ نمایش‌طرح‌بندی نمایش‌قالب \
-نمایش‌قلم‌بدنه نمایش‌لوح نمایش‌مجموعه‌علامت نمایش‌محیط‌قلم‌بدنه نمایش‌چاپ \
-نمایش‌گروه‌رنگ پابا پایانJScode پایانJSpreamble پایانLUA \
-پایانMP پایانMPclip پایانMPcode پایانMPdefinitions پایانMPdrawing \
-پایانMPenvironment پایانMPextensions پایانMPinclusions پایانMPinitializations پایانMPpage \
-پایانMPpositiongraphic پایانMPpositionmethod پایانMPrun پایانPARSEDXML پایانTABLE \
-پایانTABLEbody پایانTABLEfoot پایانTABLEhead پایانTABLEnext پایانTC \
-پایانTD پایانTDs پایانTEX پایانTEXpage پایانTH \
-پایانTN پایانTR پایانTRs پایانTX پایانTY \
-پایانXML پایانalign پایانalignment پایانallmodes پایانappendices \
-پایانarrangedpages پایانaside پایانattachment پایانbackmatter پایانbar \
-پایانbbordermatrix پایانbitmapimage پایانblockquote پایانbodymatter پایانbordermatrix \
-پایانboxedcolumns پایانbtxlabeltext پایانbtxrenderingdefinitions پایانbuffer پایانcases \
-پایانcatcodetable پایانcenteraligned پایانchapter پایانcharacteralign پایانcheckedfences \
-پایانchemical پایانchemicaltext پایانcollect پایانcollecting پایانcolorintent \
-پایانcoloronly پایانcolorset پایانcolumns پایانcolumnset پایانcolumnsetspan \
-پایانcombination پایانcomment پایانcontextcode پایانcontextdefinitioncode پایانctxfunction \
-پایانctxfunctiondefinition پایانcurrentcolor پایانcurrentlistentrywrapper پایانdelimited پایانdelimitedtext \
-پایانdisplaymath پایانdmath پایانdocument پایانeffect پایانelement \
-پایانembeddedxtable پایانendnote پایانendofline پایانexceptions پایانexpanded \
-پایانexpandedcollect پایانextendedcatcodetable پایانexternalfigurecollection پایانfacingfloat پایانfact \
-پایانfigure پایانfiguretext پایانfittingpage پایانfixed پایانfloatcombination \
-پایانfont پایانfontclass پایانfontsolution پایانfootnote پایانformula \
-پایانformulas پایانframedcell پایانframedcontent پایانframedrow پایانframedtable \
-پایانframedtext پایانfrontmatter پایانgraphictext پایانgridsnapping پایانhanging \
-پایانhbox پایانhboxestohbox پایانhboxregister پایانheadtext پایانhelptext \
-پایانhiding پایانhighlight پایانhyphenation پایانimath پایانindentation \
-پایانindentedtext پایانinteraction پایانinterface پایانintermezzotext پایانintertext \
-پایانitemgroup پایانitemgroupcolumns پایانitemize پایانknockout پایانlabeltext \
-پایانlayout پایانlegend پایانlinealignment پایانlinecorrection پایانlinefiller \
-پایانlinenumbering پایانlines پایانlinetable پایانlinetablebody پایانlinetablecell \
-پایانlinetablehead پایانlocalfootnotes پایانlocalheadsetup پایانlocallinecorrection پایانlocalnotes \
-پایانlocalsetups پایانlua پایانluacode پایانluaparameterset پایانluasetups \
-پایانmakeup پایانmarginblock پایانmarkedcontent پایانmarkpages پایانmathalignment \
-پایانmathcases پایانmathlabeltext پایانmathmatrix پایانmathmode پایانmathstyle \
-پایانmatrices پایانmatrix پایانmaxaligned پایانmdformula پایانmiddlealigned \
-پایانmiddlemakeup پایانmixedcolumns پایانmode پایانmodeset پایانmodule \
-پایانmoduletestsection پایانmpformula پایانnamedsection پایانnamedsubformulas پایانnarrow \
-پایانnarrower پایانnegative پایانnicelyfilledbox پایانnointerference پایانnotallmodes \
-پایانnotext پایانnotmode پایانoperatortext پایانopposite پایانoutputstream \
-پایانoverlay پایانoverprint پایانpagecolumns پایانpagecomment پایانpagefigure \
-پایانpagelayout پایانpagemakeup پایانpar پایانparagraph پایانparagraphs \
-پایانparagraphscell پایانparbuilder پایانpart پایانpath پایانplacechemical \
-پایانplacefigure پایانplacegraphic پایانplaceintermezzo پایانplacelegend پایانplacepairedbox \
-پایانplacetable پایانpositioning پایانpositionoverlay پایانpositive پایانpostponing \
-پایانpostponingnotes پایانprefixtext پایانprocessassignmentcommand پایانprocessassignmentlist پایانprocesscommacommand \
-پایانprocesscommalist پایانprotect پایانprotectedcolors پایانpunctuation پایانquotation \
-پایانquote پایانrandomized پایانrandomseed پایانrawsetups پایانreadingfile \
-پایانreferenceprefix پایانregime پایانreusableMPgraphic پایانruby پایانscript \
-پایانsdformula پایانsection پایانsectionblock پایانsectionblockenvironment پایانsectionlevel \
-پایانsetups پایانshapebox پایانshift پایانsidebar پایانsimplecolumns \
-پایانspecialitem پایانspeech پایانspformula پایانsplitformula پایانsplittext \
-پایانspread پایانstandardmakeup پایانstaticMPfigure پایانstaticMPgraphic پایانstrictinspectnextcharacter \
-پایانstrut پایانstyle پایانsubformulas پایانsubject پایانsubjectlevel \
-پایانsubsection پایانsubsentence پایانsubstack پایانsubsubject پایانsubsubsection \
-پایانsubsubsubject پایانsubsubsubsection پایانsubsubsubsubject پایانsubsubsubsubsection پایانsubsubsubsubsubject \
-پایانsuffixtext پایانsymbolset پایانtable پایانtablehead پایانtables \
-پایانtabletail پایانtabletext پایانtabulate پایانtabulatehead پایانtabulatetail \
-پایانtagged پایانtaglabeltext پایانtexcode پایانtexdefinition پایانtext \
-پایانtextbackground پایانtextbackgroundmanual پایانtextcolor پایانtextcolorintent پایانtextflow \
-پایانtextmakeup پایانtitle پایانtokenlist پایانtokens پایانtransparent \
-پایانtypescript پایانtypescriptcollection پایانtyping پایانuniqueMPgraphic پایانuniqueMPpagegraphic \
-پایانunittext پایانunpacked پایانusableMPgraphic پایانuseMPgraphic پایانusemathstyleparameter \
-پایانuserdata پایانusingbtxspecification پایانvbox پایانvboxregister پایانvboxtohbox \
-پایانvboxtohboxseparator پایانviewerlayer پایانvtop پایانvtopregister پایانxcell \
-پایانxcellgroup پایانxcolumn پایانxgroup پایانxmldisplayverbatim پایانxmlinlineverbatim \
-پایانxmlraw پایانxmlsetups پایانxrow پایانxrowgroup پایانxtable \
-پایانxtablebody پایانxtablefoot پایانxtablehead پایانxtablenext پایانآیتم \
-پایانبروبه پایانتنظیم‌راست پایانتنظیم‌وسط پایانتولید پایانخط‌حاشیه \
-پایانخط‌متن پایاندرج‌شناور پایاندرج‌Ùرمول پایانرنگ پایانزبان \
-پایانسر پایانÙشرده پایانقالبی پایانمحیط پایانمنوی‌پانل \
-پایانمولÙÙ‡ پایاننشر پایانپروژه پایانپس‌زمینه پایانچپ‌چین \
-پایان‌خط پایین پرده پروژه پرکردن‌میدان \
-پس‌زمینه چوبخط چپ‌چین کشیده کلمه‌راست \
-گیره یادداشت یک‌جا یک‌خط
-
-keywordclass.context.ro=\
-CUVANT CUVINTE Cuvant Cuvinte \
-Kap LUNA Litera Litere Numere \
-Numereromane ZIDINSAPTAMANA adapteazaaspect adubuffer adumarcaje \
-afiseazaaspect afiseazaculoare afiseazafonttext afiseazagrid afiseazagrupculoare \
-afiseazamakeup afiseazamediufonttext afiseazapaleta afiseazarama afiseazasetari \
-afiseazasetsimboluri afiseazastruts afiseazatiparire aliniatcentru aliniatdreapta \
-aliniatstanga ascundeblocuri baraculoare barainteractiune blanc \
-butoaneinteractiune buton butonmeniu camp cloneazacamp \
-coloana comparagrupculoare comparapaleta completeazanumarpagina componenta \
-convertestenumar copiazacamp corecteazaspatiualb culoare culoaregri \
-cuvantdreapta data datacurenta defineste definesteaccent \
-definesteantet definestebloc definesteblocsectiune definestebuffer definestecamp \
-definestecaracter definestecomanda definesteconversie definesteculoare definestedescriere \
-definestedimensiunehartie definesteenumerare definesteeticheta definestefloat definestefont \
-definestefonttext definesteformatreferinte definestegrupculori definestehbox definesteinconjurare \
-definestelista definestelistacombinata definestemakeup definestemarcaje definestemediulfonttext \
-definestemeniuinteractiune definesteoverlay definestepaleta definesteparagraf definesteprofil \
-definesteprogram definestereferinte definesteregistru definestesablontabel definestesectiune \
-definestesimbol definestesimbolfigura definestesinonim definestesinonimfont definestesortare \
-definestestartstop definestestil definestestilfont definestestivacampuri definestesubcamp \
-definestetabulatori definestetext definestetexteinconjurate definestetextinconjurat definestetyping \
-despre determinacaracteristicilelistei determinacaracteristiciregistru determinanumartitlu din \
-dute dutebox dutepagina ecran element \
-faraliniiantetsisubsol faraliniisussijos faraspatiu figuraexterna firdepar \
-folosesteURL folosestebloc folosestedirector folosestedocumentextern folosestefiguraexterna \
-folosestemodul folosestemuzicaexterna folosestescriptJS folosestesimboluri folosesteurl \
-fundal grosimelinie impartefloat inalt injos \
-inlinie instalarelimba intins jos jossus \
-la lapagina limba limbaprincipala linieneagra \
-liniesubtire linieumplere liniinegre liniisubtiri litera \
-litere luna lungimelista marcaje matematica \
-mediu meniuinteractiune necunoscut nokap nota \
-numarformula numarpagina numartitlu numartitlucurent numere \
-numereromane olinie pagina pastreazablocuri pelung \
-plaseazapegrid plaseazasemnecarte potrivestecamp pozitie proceseazabloc \
-produs proiect puncte punedeasuprafiecareia punefatainfata \
-puneformula punelista punelistacombinata punenotesubsol punenotesubsollocale \
-punenumarpagina puneregistru punesubformula referinta referintapagina \
-referintatext reflexie remarca reseteazamarcaje riglatext \
-rigleumplere roteste scala scriebuffer scrieinlista \
-scrieintreliste selecteazablocuri semncarte setareitemization setarelimba \
-setarepozitie seteazaaliniat seteazaalinierea seteazaantet seteazaaranjareapag \
-seteazaaspect seteazabarainteractiune seteazablanc seteazabloc seteazablocsectiune \
-seteazabuffer seteazacamp seteazacampuri seteazaclipping seteazacoloane \
-seteazacomentariu seteazacomentariupagina seteazaculoare seteazaculori seteazadimensiunihartie \
-seteazaecraninteractiune seteazaelemente seteazaenumerare seteazafloat seteazafloats \
-seteazafonttext seteazaformulare seteazaformule seteazafundal seteazafundaluri \
-seteazagrosimelinie seteazaimpartireafloat seteazainconjurat seteazaingust seteazainteractiunea \
-seteazajos seteazalegenda seteazalegendele seteazaliniesilabe seteazaliniesubtire \
-seteazalinii seteazaliniimargine seteazaliniinegre seteazaliniiumplere seteazalista \
-seteazalistacombinata seteazamajuscule seteazamakeup seteazamarcaje seteazameniuinteractiune \
-seteazaminicitat seteazanotasubsol seteazanumarpagina seteazanumarsubpagina seteazanumartitlu \
-seteazanumerotarelinii seteazanumerotarepagina seteazanumerotareparagrafe seteazapaleta seteazaparagrafe \
-seteazaplasareaopozita seteazaprograme seteazareferinte seteazaregistru seteazarigletext \
-seteazarigleumplere seteazarotare seteazasimbol seteazasinonime seteazasortare \
-seteazaspatiu seteazaspatiualb seteazaspatiuinterliniar seteazasubsol seteazasus \
-seteazatabele seteazatabulatori seteazatext seteazatexteantet seteazatextejos \
-seteazatextesubsol seteazatextesus seteazatextetext seteazatitlu seteazatitluri \
-seteazatoleranta seteazatranzitiepagina seteazatype seteazatyping seteazaurl \
-simbol spatiifixate spatiu spatiufixat startaliniatcentru \
-startaliniatdreapta startaliniatstanga startcomponenta startculoare startdute \
-startfundal startimpachetat startlimba startlinie startliniemargine \
-startmediu startmeniuinteractiune startprodus startproiect startpublicatie \
-startpuneformula startriglatext starttitlu stivacampuri stopaliniatcentru \
-stopaliniatdreapta stopaliniatstanga stopcomponenta stopculoare stopdute \
-stopfundal stopimpachetat stoplimba stoplinie stopliniemargine \
-stopmediu stopmeniuinteractiune stopprodus stopproiect stoppublicatie \
-stoppuneformula stopriglatext stoptitlu textumplere traduce \
-trecilafonttext undeva valoareculoare versiune zidinsaptamana
-
diff --git a/Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties
index 87647eb4c78..7b09abc2d61 100644
--- a/Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties
@@ -28,16 +28,18 @@ withshade withcircularshade withlinearshade defineshade shaded \
shadedinto withshadecolors withshadedomain withshademethod withshadefactor \
withshadevector withshadecenter withshadedirection withshaderadius withshadetransform \
withshadestep withshadefraction withshadeorigin shownshadevector shownshadeorigin \
-cmyk spotcolor multitonecolor namedcolor drawfill \
-undrawfill inverted uncolored softened grayed \
-greyed onlayer along graphictext loadfigure \
-externalfigure figure register outlinetext filloutlinetext \
-drawoutlinetext outlinetexttopath checkedbounds checkbounds strut \
-rule withmask bitmapimage colordecimals ddecimal \
-dddecimal ddddecimal colordecimalslist textext thetextext \
-rawtextext textextoffset texbox thetexbox rawtexbox \
-istextext notcached keepcached verbatim thelabel \
-label autoalign transparent withtransparency property \
+shownshadedirection shownshadecenter cmyk spotcolor multitonecolor \
+namedcolor drawfill undrawfill inverted uncolored \
+softened grayed greyed onlayer along \
+graphictext loadfigure externalfigure figure register \
+outlinetext filloutlinetext drawoutlinetext outlinetexttopath checkedbounds \
+checkbounds strut rule withmask bitmapimage \
+colordecimals ddecimal dddecimal ddddecimal colordecimalslist \
+textext thetextext rawtextext textextoffset texbox \
+thetexbox rawtexbox istextext rawmadetext validtexbox \
+onetimetextext rawfmttext thefmttext fmttext onetimefmttext \
+notcached keepcached verbatim thelabel label \
+autoalign transparent withtransparency withopacity property \
properties withproperties asgroup infont space \
crlf dquote percent SPACE CRLF \
DQUOTE PERCENT grayscale greyscale withgray \
@@ -66,25 +68,29 @@ uniquelist circularpath squarepath linearpath theoffset \
texmode systemmode texvar texstr isarray \
prefix dimension getmacro getdimen getcount \
gettoks setmacro setdimen setcount settoks \
-positionpath positioncurve positionxy positionpxy positionwhd \
-positionpage positionregion positionbox positionanchor positioninregion \
-positionatanchor wdpart htpart dppart texvar \
-texstr inpath pointof leftof rightof \
+setglobalmacro setglobaldimen setglobalcount setglobaltoks positionpath \
+positioncurve positionxy positionpxy positionwhd positionpage \
+positionregion positionbox positionanchor positioninregion positionatanchor \
+wdpart htpart dppart texvar texstr \
+inpath pointof leftof rightof utfnum \
utflen utfsub newhash disposehash inhash \
tohash isarray prefix isobject comment \
-report lua mp MP luacall \
-mirrored mirroredabout scriptindex
+report lua lualist mp MP \
+luacall mirrored mirroredabout scriptindex newscriptindex \
+newcolor newrgbcolor newcmykcolor newnumeric newboolean \
+newtransform newpath newpicture newstring newpair \
+mpvar
keywordclass.metafun.internals=\
nocolormodel greycolormodel graycolormodel rgbcolormodel \
-cmykcolormodel shadefactor textextoffset textextanchor normaltransparent \
-multiplytransparent screentransparent overlaytransparent softlighttransparent hardlighttransparent \
-colordodgetransparent colorburntransparent darkentransparent lightentransparent differencetransparent \
-exclusiontransparent huetransparent saturationtransparent colortransparent luminositytransparent \
-ahvariant ahdimple ahfactor ahscale metapostversion \
-maxdimensions drawoptionsfactor dq sq crossingscale \
-crossingoption contextlmtxmode getparameters presetparameters hasparameter \
-hasoption getparameter getparameterdefault getparametercount getmaxparametercount \
-getparameterpath getparameterpen getparametertext applyparameters pushparameters \
-popparameters definecolor
+cmykcolormodel shadefactor shadeoffset textextoffset textextanchor \
+normaltransparent multiplytransparent screentransparent overlaytransparent softlighttransparent \
+hardlighttransparent colordodgetransparent colorburntransparent darkentransparent lightentransparent \
+differencetransparent exclusiontransparent huetransparent saturationtransparent colortransparent \
+luminositytransparent ahvariant ahdimple ahfactor ahscale \
+metapostversion maxdimensions drawoptionsfactor dq sq \
+crossingscale crossingoption contextlmtxmode metafunversion minifunversion \
+getparameters presetparameters hasparameter hasoption getparameter \
+getparameterdefault getparametercount getmaxparametercount getparameterpath getparameterpen \
+getparametertext applyparameters pushparameters popparameters definecolor
diff --git a/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties
index 19bd711b0bd..9c89060ce14 100644
--- a/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties
@@ -1,6 +1,7 @@
keywordclass.metapost.commands=\
-upto downto beginfig endfig \
-beginglyph endglyph rotatedaround reflectedabout arrowhead \
+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 \
@@ -28,7 +29,8 @@ laboff bye red green blue \
cyan magenta yellow black white \
background mm pt dd bp \
cm pc cc in triplet \
-quadruplet totransform bymatrix
+quadruplet totransform bymatrix primitive permanent \
+immutable mutable frozen showproperty showhashentry
keywordclass.metapost.disabled=\
verbatimtex troffmode
@@ -37,8 +39,10 @@ keywordclass.metapost.internals=\
mitered rounded beveled butt \
squared eps epsilon infinity bboxmargin \
ahlength ahangle labeloffset dotlabeldiam defaultpen \
-defaultscale join_radius charscale ditto EOF \
-pen_lft pen_rt pen_top pen_bot
+defaultscale join_radius charscale inicatcoderegime texcatcoderegime \
+luacatcoderegime notcatcoderegime vrbcatcoderegime prtcatcoderegime ctxcatcoderegime \
+txtcatcoderegime catcoderegime ditto EOF pen_lft \
+pen_rt pen_top pen_bot
keywordclass.metapost.metafont=\
autorounding beginchar blacker boundarychar \
@@ -87,37 +91,37 @@ clip input interim let newinternal \
save setbounds setgroup shipout show \
showdependencies showtoken showvariable special begingroup \
endgroup of curl tension and \
-controls interpath on off def \
-vardef enddef expr suffix text \
-primary secondary tertiary primarydef secondarydef \
-tertiarydef randomseed also contour doublepath \
-withcolor withcmykcolor withpen dashed envelope \
-if else elseif fi for \
-endfor forever exitif within forsuffixes \
-step until charlist extensible fontdimen \
-headerbyte kern ligtable boundarychar chardp \
-charext charht charic charwd designsize \
-fontmaking charexists cullit currenttransform gfcorners \
-grayfont hround imagerules lowres_fix nodisplays \
-notransforms openit displaying currentwindow screen_rows \
-screen_cols pixels_per_inch cull display openwindow \
-numspecial totalweight autorounding fillin proofing \
-tracingpens xoffset chardx granularity smoothing \
-turningcheck yoffset chardy hppp tracingedges \
-vppp extra_beginfig extra_endfig mpxbreak endinput \
-message delimiters turningnumber errmessage scantokens \
-end outer inner write to \
-readfrom closefrom withprescript withpostscript top \
-bot lft rt ulft urt \
-llft lrt redpart greenpart bluepart \
-cyanpart magentapart yellowpart blackpart prescriptpart \
-postscriptpart rgbcolor cmykcolor colormodel graypart \
-greypart greycolor graycolor dashpart penpart \
-stroked filled textual clipped bounded \
-pathpart expandafter minute hour outputformat \
-outputtemplate filenametemplate fontmapfile fontmapline fontpart \
-fontsize glyph restoreclipcolor troffmode runscript \
-maketext numbersystem
+controls def vardef enddef expr \
+suffix text primary secondary tertiary \
+primarydef secondarydef tertiarydef randomseed also \
+contour doublepath withcolor withcmykcolor withpen \
+dashed envelope if else elseif \
+fi for endfor forever exitif \
+within forsuffixes step until charlist \
+extensible fontdimen headerbyte kern ligtable \
+boundarychar chardp charext charht charic \
+charwd designsize fontmaking charexists cullit \
+currenttransform gfcorners grayfont hround imagerules \
+lowres_fix nodisplays notransforms openit displaying \
+currentwindow screen_rows screen_cols pixels_per_inch cull \
+display openwindow numspecial totalweight autorounding \
+fillin proofing tracingpens xoffset chardx \
+granularity smoothing turningcheck yoffset chardy \
+hppp tracingedges vppp extra_beginfig extra_endfig \
+mpxbreak endinput message delimiters turningnumber \
+errmessage scantokens end outer inner \
+write to readfrom closefrom withprescript \
+withpostscript top bot lft rt \
+ulft urt llft lrt redpart \
+greenpart bluepart cyanpart magentapart yellowpart \
+blackpart prescriptpart postscriptpart rgbcolor cmykcolor \
+colormodel graypart greypart greycolor graycolor \
+dashpart penpart stroked filled textual \
+clipped bounded pathpart expandafter minute \
+hour outputformat outputtemplate filenametemplate fontmapfile \
+fontmapline fontpart fontsize glyph restoreclipcolor \
+troffmode runscript maketext numbersystem overloadmode \
+setproperty
keywordclass.metapost.shortcuts=\
.. ... -- --- \
diff --git a/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties
index f7e55372322..bbacc7a021b 100644
--- a/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties
@@ -7,77 +7,94 @@ 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 \
-readline savinghyphcodes savingvdiscards scantokens showgroups \
-showifs showtokens splitbotmarks splitdiscards splitfirstmarks \
-topmarks tracingassigns tracinggroups tracingifs tracingnesting \
-tracingscantokens unexpanded unless widowpenalties
+iffontchar interactionmode interlinepenalties lastchkdim lastchknum \
+lastlinefit lastnodetype marks muexpr mutoglue \
+numericscale numexpr pagediscards parshapedimen parshapeindent \
+parshapelength predisplaydirection protected savinghyphcodes savingvdiscards \
+scantokens showgroups showifs showtokens splitbotmarks \
+splitdiscards splitfirstmarks topmarks tracingalignments tracingassigns \
+tracinggroups tracingifs tracingnesting unexpanded unless \
+widowpenalties
keywordclass.tex.luatex=\
-Uchar Udelcode Udelcodenum Udelimiter \
-Udelimiterover Udelimiterunder Uhextensible Uleft Umathaccent \
-Umathaxis Umathbinbinspacing Umathbinclosespacing Umathbininnerspacing Umathbinopenspacing \
-Umathbinopspacing Umathbinordspacing Umathbinpunctspacing Umathbinrelspacing Umathchar \
-Umathcharclass Umathchardef Umathcharfam Umathcharnum Umathcharnumdef \
-Umathcharslot Umathclosebinspacing Umathcloseclosespacing Umathcloseinnerspacing Umathcloseopenspacing \
-Umathcloseopspacing Umathcloseordspacing Umathclosepunctspacing Umathcloserelspacing Umathcode \
-Umathcodenum Umathconnectoroverlapmin Umathfractiondelsize Umathfractiondenomdown Umathfractiondenomvgap \
-Umathfractionnumup Umathfractionnumvgap Umathfractionrule Umathinnerbinspacing Umathinnerclosespacing \
-Umathinnerinnerspacing Umathinneropenspacing Umathinneropspacing Umathinnerordspacing Umathinnerpunctspacing \
-Umathinnerrelspacing Umathlimitabovebgap Umathlimitabovekern Umathlimitabovevgap Umathlimitbelowbgap \
-Umathlimitbelowkern Umathlimitbelowvgap Umathnolimitsubfactor Umathnolimitsupfactor Umathopbinspacing \
-Umathopclosespacing Umathopenbinspacing Umathopenclosespacing Umathopeninnerspacing Umathopenopenspacing \
-Umathopenopspacing Umathopenordspacing Umathopenpunctspacing Umathopenrelspacing Umathoperatorsize \
-Umathopinnerspacing Umathopopenspacing Umathopopspacing Umathopordspacing Umathoppunctspacing \
-Umathoprelspacing Umathordbinspacing Umathordclosespacing Umathordinnerspacing Umathordopenspacing \
-Umathordopspacing Umathordordspacing Umathordpunctspacing Umathordrelspacing Umathoverbarkern \
-Umathoverbarrule Umathoverbarvgap Umathoverdelimiterbgap Umathoverdelimitervgap Umathpunctbinspacing \
-Umathpunctclosespacing Umathpunctinnerspacing Umathpunctopenspacing Umathpunctopspacing Umathpunctordspacing \
-Umathpunctpunctspacing Umathpunctrelspacing Umathquad Umathradicaldegreeafter Umathradicaldegreebefore \
-Umathradicaldegreeraise Umathradicalkern Umathradicalrule Umathradicalvgap Umathrelbinspacing \
-Umathrelclosespacing Umathrelinnerspacing Umathrelopenspacing Umathrelopspacing Umathrelordspacing \
-Umathrelpunctspacing Umathrelrelspacing Umathskewedfractionhgap Umathskewedfractionvgap Umathspaceafterscript \
+UUskewed UUskewedwithdelims Uabove Uabovewithdelims \
+Uatop Uatopwithdelims Uchar Udelcode Udelcodenum \
+Udelimiter Udelimiterover Udelimiterunder Uhextensible Uleft \
+Umathaccent Umathaccentbaseheight Umathaxis Umathbinbinspacing Umathbinclosespacing \
+Umathbininnerspacing Umathbinopenspacing Umathbinopspacing Umathbinordspacing Umathbinpunctspacing \
+Umathbinrelspacing Umathchar Umathcharclass Umathchardef Umathcharfam \
+Umathcharnum Umathcharnumdef Umathcharslot Umathclass Umathclosebinspacing \
+Umathcloseclosespacing Umathcloseinnerspacing Umathcloseopenspacing Umathcloseopspacing Umathcloseordspacing \
+Umathclosepunctspacing Umathcloserelspacing Umathcode Umathcodenum Umathconnectoroverlapmin \
+Umathfractiondelsize Umathfractiondenomdown Umathfractiondenomvgap Umathfractionnumup Umathfractionnumvgap \
+Umathfractionrule Umathinnerbinspacing Umathinnerclosespacing Umathinnerinnerspacing Umathinneropenspacing \
+Umathinneropspacing Umathinnerordspacing Umathinnerpunctspacing Umathinnerrelspacing Umathlimitabovebgap \
+Umathlimitabovekern Umathlimitabovevgap Umathlimitbelowbgap Umathlimitbelowkern Umathlimitbelowvgap \
+Umathnolimitsubfactor Umathnolimitsupfactor Umathopbinspacing Umathopclosespacing Umathopenbinspacing \
+Umathopenclosespacing Umathopeninnerspacing Umathopenopenspacing Umathopenopspacing Umathopenordspacing \
+Umathopenpunctspacing Umathopenrelspacing Umathoperatorsize Umathopinnerspacing Umathopopenspacing \
+Umathopopspacing Umathopordspacing Umathoppunctspacing Umathoprelspacing Umathordbinspacing \
+Umathordclosespacing Umathordinnerspacing Umathordopenspacing Umathordopspacing Umathordordspacing \
+Umathordpunctspacing Umathordrelspacing Umathoverbarkern Umathoverbarrule Umathoverbarvgap \
+Umathoverdelimiterbgap Umathoverdelimitervgap Umathpunctbinspacing Umathpunctclosespacing Umathpunctinnerspacing \
+Umathpunctopenspacing Umathpunctopspacing Umathpunctordspacing Umathpunctpunctspacing Umathpunctrelspacing \
+Umathquad Umathradicaldegreeafter Umathradicaldegreebefore Umathradicaldegreeraise Umathradicalkern \
+Umathradicalrule Umathradicalvgap Umathrelbinspacing Umathrelclosespacing Umathrelinnerspacing \
+Umathrelopenspacing Umathrelopspacing Umathrelordspacing Umathrelpunctspacing Umathrelrelspacing \
+Umathskewedfractionhgap Umathskewedfractionvgap Umathspaceafterscript Umathspacebeforescript Umathspacingmode \
Umathstackdenomdown Umathstacknumup Umathstackvgap Umathsubshiftdown Umathsubshiftdrop \
Umathsubsupshiftdown Umathsubsupvgap Umathsubtopmax Umathsupbottommin Umathsupshiftdrop \
Umathsupshiftup Umathsupsubbottommax Umathunderbarkern Umathunderbarrule Umathunderbarvgap \
-Umathunderdelimiterbgap Umathunderdelimitervgap Umiddle Unosubscript Unosuperscript \
-Uoverdelimiter Uradical Uright Uroot Uskewed \
-Uskewedwithdelims Ustack Ustartdisplaymath Ustartmath Ustopdisplaymath \
-Ustopmath Usubscript Usuperscript Uunderdelimiter Uvextensible \
-adjustspacing adjustspacingshrink adjustspacingstep adjustspacingstretch aftergrouped \
-alignmark aligntab attribute attributedef automaticdiscretionary \
-automatichyphenmode automatichyphenpenalty begincsname beginlocalcontrol boundary \
-boxattr boxdirection boxorientation boxtotal boxxmove \
-boxxoffset boxymove boxyoffset breakafterdirmode catcodetable \
-clearmarks compoundhyphenmode crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle \
-crampedtextstyle csstring efcode endlocalcontrol etoksapp \
-etokspre exceptionpenalty expanded explicitdiscretionary explicithyphenpenalty \
-firstvalidlanguage fixupboxesmode fontid formatname frozen \
-futureexpand futureexpandis futureexpandisap gleaders glet \
-glyphdatafield gtoksapp gtokspre hjcode hpack \
-hyphenationbounds hyphenationmin hyphenpenaltymode ifabsdim ifabsnum \
-ifchkdim ifchknum ifcmpdim ifcmpnum ifcondition \
-ifcstok ifdimval iffrozen ifincsname ifnumval \
-ifprotected iftok ifusercmd ignorepars immediateassigned \
-immediateassignment initcatcodetable insertht internalcodesmode lastnamedcs \
-lastnodesubtype leftghost leftmarginkern letcharcode letfrozen \
-letprotected linedirection localbrokenpenalty localinterlinepenalty localleftbox \
-localrightbox lpcode luabytecode luabytecodecall luacopyinputnodes \
-luadef luaescapestring luafunction luafunctioncall luatexbanner \
-luatexrevision luatexversion mathdelimitersmode mathdirection mathdisplayskipmode \
-matheqnogapstep mathflattenmode mathitalicsmode mathnolimitsmode matholdmode \
-mathpenaltiesmode mathrulesfam mathrulesmode mathrulethicknessmode mathscriptboxmode \
-mathscriptcharmode mathscriptsmode mathstyle mathsurroundmode mathsurroundskip \
-noboundary nohrule nokerns noligs nospaces \
-novrule outputbox pardirection postexhyphenchar posthyphenchar \
-prebinoppenalty predisplaygapfactor preexhyphenchar prehyphenchar prerelpenalty \
-protrudechars protrusionboundary pxdimen quitvmode rightghost \
+Umathunderdelimiterbgap Umathunderdelimitervgap Umiddle Unosubprescript Unosubscript \
+Unosuperprescript Unosuperscript Uover Uoverdelimiter Uoverwithdelims \
+Uradical Uright Uroot Uskewed Uskewedwithdelims \
+Ustack Ustartdisplaymath Ustartmath Ustopdisplaymath Ustopmath \
+Ustyle Usubprescript Usubscript Usuperprescript Usuperscript \
+Uunderdelimiter Uvextensible adjustspacing adjustspacingshrink adjustspacingstep \
+adjustspacingstretch afterassigned aftergrouped aliased alignmark \
+aligntab atendofgroup atendofgrouped attribute attributedef \
+automaticdiscretionary automatichyphenpenalty automigrationmode begincsname beginlocalcontrol \
+boundary boxattribute boxdirection boxorientation boxtotal \
+boxxmove boxxoffset boxymove boxyoffset catcodetable \
+clearmarks crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle \
+csstring defcsname dimensiondef directlua edefcsname \
+efcode endlocalcontrol enforced etoksapp etokspre \
+everytab exceptionpenalty expand expandafterpars expandafterspaces \
+expandcstoken expanded expandtoken explicitdiscretionary explicithyphenpenalty \
+firstvalidlanguage fontid fontspecifiedsize formatname frozen \
+futuredef futureexpand futureexpandis futureexpandisap gdefcsname \
+gleaders glet gletcsname gluespecdef glyphdatafield \
+glyphoptions glyphscale glyphscriptfield glyphscriptscale glyphscriptscriptscale \
+glyphstatefield glyphtextscale glyphxoffset glyphxscale glyphyoffset \
+glyphyscale gtoksapp gtokspre hjcode hpack \
+hyphenationmin hyphenationmode ifabsdim ifabsnum ifarguments \
+ifboolean ifchkdim ifchknum ifcmpdim ifcmpnum \
+ifcondition ifcstok ifdimval ifempty ifflags \
+ifhastok ifhastoks ifhasxtoks ifincsname ifmathparameter \
+ifmathstyle ifnumval ifparameter ifparameters ifrelax \
+iftok ignorearguments ignorepars immediate immutable \
+initcatcodetable insertheights insertht instance integerdef \
+lastarguments lastnamedcs lastnodesubtype leftmarginkern letcharcode \
+letcsname letfrozen letprotected linedirection linepar \
+listcallbackmode localbrokenpenalty localcontrol localcontrolled localinterlinepenalty \
+localleftbox localrightbox lpcode luabytecode luabytecodecall \
+luacopyinputnodes luadef luaescapestring luafunction luafunctioncall \
+luatexbanner luatexrevision luatexversion mathdelimitersmode mathdirection \
+mathdisplayskipmode matheqnogapstep mathflattenmode mathitalicsmode mathnolimitsmode \
+mathpenaltiesmode mathrulesfam mathrulesmode mathrulethicknessmode mathscale \
+mathscriptboxmode mathscriptcharmode mathscriptsmode mathstyle mathsurroundmode \
+mathsurroundskip mugluespecdef mutable noaligned noboundary \
+nohrule norelax normalizelinemode nospaces novrule \
+orelse orunless outputbox overloaded overloadmode \
+parametercount parattr pardirection permanent postexhyphenchar \
+posthyphenchar prebinoppenalty predisplaygapfactor preexhyphenchar prehyphenchar \
+prerelpenalty protrudechars protrusionboundary pxdimen quitvmode \
rightmarginkern rpcode savecatcodetable scantextokens setfontid \
-shapemode textdirection toksapp tokspre tpack \
-tracingfonts unletfrozen unletprotected vpack wordboundary \
-xtoksapp xtokspre
+snapshotpar supmarkmode swapcsvalues textdirection thewithoutunit \
+tokenized toksapp tokspre tolerant tpack \
+tracingfonts tracingmath undent unletfrozen unletprotected \
+vpack wordboundary wrapuppar xdefcsname xtoksapp \
+xtokspre
keywordclass.tex.omega=\
Omegaminorversion Omegarevision Omegaversion
@@ -114,66 +131,66 @@ advance afterassignment aftergroup atop atopwithdelims \
badness baselineskip batchmode begingroup belowdisplayshortskip \
belowdisplayskip binoppenalty botmark box boxmaxdepth \
brokenpenalty catcode char chardef cleaders \
-closein clubpenalty copy count countdef \
-cr crcr csname day deadcycles \
-def defaulthyphenchar defaultskewchar delcode delimiter \
-delimiterfactor delimitershortfall dimen dimendef directlua \
-discretionary displayindent displaylimits displaystyle displaywidowpenalty \
-displaywidth divide doublehyphendemerits dp dump \
-edef else emergencystretch end endcsname \
-endgroup endinput endlinechar eqno errhelp \
-errmessage errorcontextlines errorstopmode escapechar everycr \
-everydisplay everyhbox everyjob everymath everypar \
-everytab 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 hoffset holdinginserts hrule hsize \
-hskip hss ht hyphenation hyphenchar \
-hyphenpenalty if ifcase ifcat ifdim \
-ifeof 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 mag mark mathaccent \
-mathbin mathchar mathchardef mathchoice mathclose \
-mathcode mathinner mathop mathopen mathord \
-mathpunct mathrel mathsurround maxdeadcycles maxdepth \
-meaning medmuskip message middle mkern \
-month moveleft moveright mskip multiply \
-muskip muskipdef newlinechar noalign noexpand \
-noindent nolimits nonscript nonstopmode nulldelimiterspace \
-nullfont number omit openin or \
-ordlimits orelse outer output outputpenalty \
-over overfullrule overline overwithdelims pagedepth \
-pagefilllstretch pagefillstretch pagefilstretch pagegoal pageshrink \
-pagestretch pagetotal par parfillskip parindent \
-parshape parskip patterns pausing penalty \
-postdisplaypenalty predisplaypenalty predisplaysize pretolerance prevdepth \
-prevgraf radical raise read 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 \
+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 \
+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 \
+fontspecifiedname futurelet gdef global globaldefs \
+glyph 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 \
+mathaccent mathbin mathchar mathchardef mathchoice \
+mathclose mathcode mathinner mathop mathopen \
+mathord mathpunct mathrel mathsurround maxdeadcycles \
+maxdepth meaning meaningfull meaningless medmuskip \
+message middle mkern month moveleft \
+moveright mskip multiply muskip muskipdef \
+newlinechar noalign noexpand noindent nolimits \
+nonscript nonstopmode nulldelimiterspace nullfont number \
+omit or ordlimits outer output \
+outputpenalty over overfullrule overline overshoot \
+overwithdelims pagedepth pagefilllstretch pagefillstretch pagefilstretch \
+pagegoal pageshrink pagestretch pagetotal par \
+parfillleftskip parfillskip parindent parshape parskip \
+patterns pausing penalty postdisplaypenalty predisplaypenalty \
+predisplaysize pretolerance prevdepth prevgraf radical \
+raise relax relpenalty right righthyphenmin \
+rightskip romannumeral scaledfontdimen 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 todimension tointeger \
toks toksdef tolerance topmark topskip \
-tracingcommands tracinglostchars tracingmacros tracingonline tracingoutput \
-tracingpages tracingparagraphs tracingrestores tracingstats uccode \
-uchyph underline unhbox unhcopy unkern \
-unpenalty unskip unvbox unvcopy uppercase \
-vadjust valign vbadness vbox vcenter \
-vfil vfill vfilneg vfuzz voffset \
-vrule vsize vskip vsplit vss \
-vtop wd widowpenalty xdef xleaders \
-xspaceskip year
+toscaled tracingcommands tracinglostchars tracingmacros tracingonline \
+tracingoutput tracingpages tracingparagraphs tracingrestores tracingstats \
+uccode uchyph underline unhbox unhcopy \
+unhpack unkern unpenalty unskip unvbox \
+unvcopy unvpack uppercase vadjust valign \
+vbadness vbox vcenter vfil vfill \
+vfilneg vfuzz vrule vsize vskip \
+vsplit vss vtop wd widowpenalty \
+xdef xleaders xspaceskip year
keywordclass.tex.xetex=\
XeTeXversion
diff --git a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-context.lua b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-context.lua
index 3db7d14fd0f..2f8a6a5b1a9 100644
--- a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-context.lua
+++ b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
- ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextkind", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "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", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "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", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol" },
- ["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", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "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", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "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", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "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", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "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", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "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", "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", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "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", "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", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "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", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" },
+ ["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", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "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", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode", "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode", "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenhyphenationcode", "frozenallcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "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", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "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", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode", "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode", "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode", "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode", "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode", "forcecheckhyphenationmodecode", "lazyligatureshyphenationmodecode", "normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode", "clipwidthcode", "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode", "noexpansioncode", "noprotrusioncode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "continuewhenlmtxmode" },
+ ["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", "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", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "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", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "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", "pickupgroupedcommand", "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", "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", "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", "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", "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", "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", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "triggermathstyle", "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", "Umathbotaccent", "Umathtopaccent", "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", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "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", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode", "pushrunstate", "poprunstate", "suggestedalias", "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox", "newlocalwrite", "newlocalread", "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-interfaces.lua b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-interfaces.lua
index 5cbf4dce3f8..d2b00064590 100644
--- a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-interfaces.lua
+++ b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-interfaces.lua
@@ -1,11 +1,4 @@
return {
- ["common"]={ "AEacute", "AEligature", "AEmacron", "AMSTEX", "Aacute", "Abreve", "Abreveacute", "Abrevedotbelow", "Abrevegrave", "Abrevehook", "Abrevetilde", "Acaron", "Acircumflex", "Acircumflexacute", "Acircumflexdotbelow", "Acircumflexgrave", "Acircumflexhook", "Acircumflextilde", "Adiaeresis", "Adiaeresismacron", "Adotaccent", "Adotaccentmacron", "Adotbelow", "Adoublegrave", "AfterPar", "Agrave", "Ahook", "Ainvertedbreve", "Alpha", "Alphabeticnumerals", "AmSTeX", "Amacron", "And", "Angstrom", "Aogonek", "Aring", "Aringacute", "Arrowvert", "Astroke", "Atilde", "BeforePar", "Beta", "Bhook", "Big", "Bigg", "Biggl", "Biggm", "Biggr", "Bigl", "Bigm", "Bigr", "Box", "Bumpeq", "CONTEXT", "Cacute", "Cap", "Caps", "Ccaron", "Ccedilla", "Ccircumflex", "Cdotaccent", "Character", "Characters", "Chi", "Chook", "ConTeXt", "Context", "ConvertConstantAfter", "ConvertToConstant", "Cstroke", "Cup", "DZcaronligature", "DZligature", "Dafrican", "Dcaron", "Ddownarrow", "Delta", "Dhook", "Doteq", "Downarrow", "Dstroke", "Dzcaronligature", "Dzligature", "ETEX", "Eacute", "Ebreve", "Ecaron", "Ecedilla", "Ecircumflex", "Ecircumflexacute", "Ecircumflexdotbelow", "Ecircumflexgrave", "Ecircumflexhook", "Ecircumflextilde", "Ediaeresis", "Edotaccent", "Edotbelow", "Edoublegrave", "Egrave", "Ehook", "Einvertedbreve", "Emacron", "Eogonek", "Epsilon", "Eta", "Eth", "Etilde", "Eulerconst", "EveryLine", "EveryPar", "Fhook", "Finv", "Gacute", "Game", "Gamma", "Gbreve", "Gcaron", "Gcircumflex", "Gcommaaccent", "Gdotaccent", "GetPar", "Ghook", "GotoPar", "Greeknumerals", "Gstroke", "Hat", "Hcaron", "Hcircumflex", "Hstroke", "IJligature", "INRSTEX", "Iacute", "Ibreve", "Icaron", "Icircumflex", "Idiaeresis", "Idotaccent", "Idotbelow", "Idoublegrave", "Igrave", "Ihook", "Iinvertedbreve", "Im", "Imacron", "Iogonek", "Iota", "Istroke", "Itilde", "Jcircumflex", "Join", "Kappa", "Kcaron", "Kcommaaccent", "Khook", "LAMSTEX", "LATEX", "LJligature", "LUAJITTEX", "LUAMETATEX", "LUATEX", "LaTeX", "Lacute", "LamSTeX", "Lambda", "Lbar", "Lcaron", "Lcommaaccent", "Ldotmiddle", "Ldsh", "Leftarrow", "Leftrightarrow", "Ljligature", "Lleftarrow", "Longleftarrow", "Longleftrightarrow", "Longmapsfrom", "Longmapsto", "Longrightarrow", "Lsh", "Lstroke", "Lua", "LuaMetaTeX", "LuaTeX", "LuajitTeX", "METAFONT", "METAFUN", "METAPOST", "MKII", "MKIV", "MKIX", "MKVI", "MKXI", "MONTH", "MONTHLONG", "MONTHSHORT", "MPII", "MPIV", "MPVI", "MPanchor", "MPbetex", "MPc", "MPcode", "MPcolor", "MPcoloronly", "MPcolumn", "MPd", "MPdrawing", "MPfontsizehskip", "MPgetmultipars", "MPgetmultishape", "MPgetposboxes", "MPh", "MPinclusions", "MPleftskip", "MPll", "MPlr", "MPls", "MPmenubuttons", "MPn", "MPoptions", "MPoverlayanchor", "MPp", "MPpage", "MPpardata", "MPplus", "MPpos", "MPpositiongraphic", "MPposset", "MPr", "MPrawvar", "MPregion", "MPrest", "MPrightskip", "MPrs", "MPstring", "MPtext", "MPtransparency", "MPul", "MPur", "MPv", "MPvar", "MPvariable", "MPvv", "MPw", "MPwhd", "MPx", "MPxy", "MPxywhd", "MPy", "Mapsfrom", "Mapsto", "MetaFont", "MetaFun", "MetaPost", "Mu", "NJligature", "Nacute", "Ncaron", "Ncommaaccent", "Nearrow", "Neng", "Ngrave", "Njligature", "NormalizeFontHeight", "NormalizeFontWidth", "NormalizeTextHeight", "NormalizeTextWidth", "Ntilde", "Nu", "Numbers", "Nwarrow", "OEligature", "Oacute", "Obreve", "Ocaron", "Ocircumflex", "Ocircumflexacute", "Ocircumflexdotbelow", "Ocircumflexgrave", "Ocircumflexhook", "Ocircumflextilde", "Odiaeresis", "Odiaeresismacron", "Odotaccent", "Odotaccentmacron", "Odotbelow", "Odoublegrave", "Ograve", "Ohook", "Ohorn", "Ohornacute", "Ohorndotbelow", "Ohorngrave", "Ohornhook", "Ohorntilde", "Ohungarumlaut", "Oinvertedbreve", "Omacron", "Omega", "Omicron", "Oogonek", "Oogonekmacron", "Ostroke", "Ostrokeacute", "Otilde", "Otildemacron", "P", "PDFETEX", "PDFTEX", "PDFcolor", "PICTEX", "PPCHTEX", "PPCHTeX", "PRAGMA", "Phi", "Phook", "Pi", "PiCTeX", "Plankconst", "PointsToBigPoints", "PointsToReal", "PointsToWholeBigPoints", "PropertyLine", "Psi", "PtToCm", "Racute", "Rcaron", "Rcommaaccent", "Rdoublegrave", "Rdsh", "Re", "ReadFile", "Relbar", "Rho", "Rightarrow", "Rinvertedbreve", "Romannumerals", "Rrightarrow", "Rsh", "S", "Sacute", "ScaledPointsToBigPoints", "ScaledPointsToWholeBigPoints", "Scaron", "Scedilla", "Schwa", "Scircumflex", "Scommaaccent", "Searrow", "Sigma", "Smallcapped", "Subset", "Supset", "Swarrow", "TABLE", "TEX", "TaBlE", "Tau", "Tcaron", "Tcedilla", "Tcommaaccent", "TeX", "TheNormalizedFontSize", "Theta", "Thook", "Thorn", "TransparencyHack", "Tstroke", "Uacute", "Ubreve", "Ucaron", "Ucircumflex", "Udiaeresis", "Udiaeresisacute", "Udiaeresiscaron", "Udiaeresisgrave", "Udiaeresismacron", "Udotbelow", "Udoublegrave", "Ugrave", "Uhook", "Uhorn", "Uhornacute", "Uhorndotbelow", "Uhorngrave", "Uhornhook", "Uhorntilde", "Uhungarumlaut", "Uinvertedbreve", "Umacron", "Uogonek", "Uparrow", "Updownarrow", "Upsilon", "Uring", "Utilde", "Uuparrow", "VDash", "Vdash", "VerboseNumber", "Vert", "Vvdash", "WEEKDAY", "WORD", "WORDS", "Wcircumflex", "WidthSpanningText", "Word", "Words", "XETEX", "XeTeX", "Xi", "Yacute", "Ycircumflex", "Ydiaeresis", "Ydotbelow", "Ygrave", "Yhook", "Ymacron", "Ytilde", "Zacute", "Zcaron", "Zdotaccent", "Zeta", "Zhook", "Zstroke", "aacute", "abbreviation", "abjadnaivenumerals", "abjadnodotnumerals", "abjadnumerals", "about", "abreve", "abreveacute", "abrevedotbelow", "abrevegrave", "abrevehook", "abrevetilde", "acaron", "acircumflex", "acircumflexacute", "acircumflexdotbelow", "acircumflexgrave", "acircumflexhook", "acircumflextilde", "activatespacehandler", "actualday", "actualmonth", "actualyear", "actuarial", "acute", "acwopencirclearrow", "adaptcollector", "adaptfontfeature", "adaptlayout", "adaptpapersize", "addfeature", "addfontpath", "addtoJSpreamble", "addtocommalist", "addvalue", "adiaeresis", "adiaeresismacron", "adotaccent", "adotaccentmacron", "adotbelow", "adoublegrave", "aeacute", "aeligature", "aemacron", "afghanicurrency", "aftersplitstring", "aftertestandsplitstring", "agrave", "ahook", "ainvertedbreve", "aleph", "alignbottom", "aligned", "alignedbox", "alignedline", "alignhere", "alignmentcharacter", "allinputpaths", "alpha", "alphabeticnumerals", "alwayscitation", "alwayscite", "amacron", "amalg", "ampersand", "anchor", "angle", "aogonek", "appendetoks", "appendgvalue", "appendtocommalist", "appendtoks", "appendtoksonce", "appendvalue", "apply", "applyalternativestyle", "applyprocessor", "applytocharacters", "applytofirstcharacter", "applytosplitstringchar", "applytosplitstringcharspaced", "applytosplitstringline", "applytosplitstringlinespaced", "applytosplitstringword", "applytosplitstringwordspaced", "applytowords", "approx", "approxEq", "approxeq", "approxnEq", "arabicakbar", "arabicalayhe", "arabicallah", "arabicallallahou", "arabicasterisk", "arabicbasmalah", "arabiccomma", "arabiccuberoot", "arabicdateseparator", "arabicdecimals", "arabicdisputedendofayah", "arabicendofayah", "arabicexnumerals", "arabicfootnotemarker", "arabicfourthroot", "arabichighain", "arabichighalayheassallam", "arabichigheqala", "arabichighesala", "arabichighfootnotemarker", "arabichighjeem", "arabichighlamalef", "arabichighmadda", "arabichighmeemlong", "arabichighmeemshort", "arabichighnisf", "arabichighnoon", "arabichighnoonkasra", "arabichighqaf", "arabichighqif", "arabichighradiallahouanhu", "arabichighrahmatullahalayhe", "arabichighrubc", "arabichighsad", "arabichighsajda", "arabichighsakta", "arabichighsallallahou", "arabichighseen", "arabichighsmallsafha", "arabichightah", "arabichightakhallus", "arabichighthalatha", "arabichighwaqf", "arabichighyeh", "arabichighzain", "arabicjallajalalouhou", "arabiclettermark", "arabiclowmeemlong", "arabiclownoonkasra", "arabiclowseen", "arabicmisra", "arabicmuhammad", "arabicnumber", "arabicnumberabove", "arabicnumerals", "arabicparenleft", "arabicparenright", "arabicpercent", "arabicperiod", "arabicpermille", "arabicpertenthousand", "arabicpoeticverse", "arabicqala", "arabicquestion", "arabicrasoul", "arabicray", "arabicrialsign", "arabicsafha", "arabicsajdah", "arabicsalla", "arabicsamvat", "arabicsanah", "arabicsemicolon", "arabicshighthreedots", "arabicslcm", "arabicstartofrubc", "arabictripledot", "arabicvowelwaw", "arabicvowelyeh", "arabicwasallam", "arg", "aring", "aringacute", "arrowvert", "asciistr", "aside", "assignalfadimension", "assigndimen", "assigndimension", "assignifempty", "assigntranslation", "assignvalue", "assignwidth", "assumelongusagecs", "ast", "astype", "asymp", "at", "atilde", "atleftmargin", "atpage", "atrightmargin", "attachment", "autocap", "autodirhbox", "autodirvbox", "autodirvtop", "autoinsertnextspace", "autointegral", "automathematics", "autopagestaterealpage", "autopagestaterealpageorder", "autosetups", "availablehsize", "averagecharwidth", "backepsilon", "background", "backgroundimage", "backgroundimagefill", "backgroundline", "backprime", "backsim", "backslash", "bar", "barleftarrow", "barleftarrowrightarrowbar", "barovernorthwestarrow", "barwedge", "basegrid", "baselinebottom", "baselineleftbox", "baselinemiddlebox", "baselinerightbox", "bbordermatrix", "bbox", "because", "beforesplitstring", "beforetestandsplitstring", "beta", "beth", "between", "bhook", "big", "bigbodyfont", "bigcap", "bigcirc", "bigcircle", "bigcup", "bigdiamond", "bigg", "bigger", "biggl", "biggm", "biggr", "bigl", "bigm", "bigodot", "bigoplus", "bigotimes", "bigr", "bigskip", "bigsqcap", "bigsqcup", "bigsquare", "bigstar", "bigtimes", "bigtriangledown", "bigtriangleup", "bigudot", "biguplus", "bigvee", "bigwedge", "binom", "bitmapimage", "blacklozenge", "blackrule", "blackrules", "blacksquare", "blacktriangle", "blacktriangledown", "blacktriangleleft", "blacktriangleright", "blank", "blap", "bleed", "bleedheight", "bleedwidth", "blockligatures", "blockquote", "blocksynctexfile", "blockuservariable", "bodyfontenvironmentlist", "bodyfontsize", "bold", "boldface", "bolditalic", "boldslanted", "bookmark", "booleanmodevalue", "bordermatrix", "bot", "bottombox", "bottomleftbox", "bottomrightbox", "bowtie", "boxcursor", "boxdot", "boxmarker", "boxminus", "boxofsize", "boxplus", "boxreference", "boxtimes", "bpos", "breakablethinspace", "breakhere", "breve", "bstroke", "btxabbreviatedjournal", "btxaddjournal", "btxalwayscitation", "btxauthorfield", "btxdetail", "btxdirect", "btxdoif", "btxdoifcombiinlistelse", "btxdoifelse", "btxdoifelsecombiinlist", "btxdoifelsesameasprevious", "btxdoifelsesameaspreviouschecked", "btxdoifelseuservariable", "btxdoifnot", "btxdoifsameaspreviouscheckedelse", "btxdoifsameaspreviouselse", "btxdoifuservariableelse", "btxexpandedjournal", "btxfield", "btxfieldname", "btxfieldtype", "btxfirstofrange", "btxflush", "btxflushauthor", "btxflushauthorinverted", "btxflushauthorinvertedshort", "btxflushauthorname", "btxflushauthornormal", "btxflushauthornormalshort", "btxflushsuffix", "btxfoundname", "btxfoundtype", "btxhiddencitation", "btxhybridcite", "btxlabellanguage", "btxlabeltext", "btxlistcitation", "btxloadjournalist", "btxoneorrange", "btxremapauthor", "btxsavejournalist", "btxsetup", "btxsingularorplural", "btxsingularplural", "btxtextcitation", "buildmathaccent", "buildtextaccent", "buildtextbottomcomma", "buildtextbottomdot", "buildtextcedilla", "buildtextgrave", "buildtextmacron", "buildtextognek", "bullet", "button", "cacute", "calligraphic", "camel", "cap", "capital", "carriagereturn", "catcodetablename", "cbox", "ccaron", "ccedilla", "ccircumflex", "ccurl", "cdot", "cdotaccent", "cdotp", "cdots", "centeraligned", "centerbox", "centerdot", "centeredbox", "centeredlastline", "centerednextbox", "centerline", "cfrac", "chapter", "character", "characters", "chardescription", "charwidthlanguage", "check", "checkcharacteralign", "checkedblank", "checkedchar", "checkedfiller", "checkedstrippedcsname", "checkinjector", "checkmark", "checknextindentation", "checknextinjector", "checkpage", "checkparameters", "checkpreviousinjector", "checksoundtrack", "checktwopassdata", "checkvariables", "chem", "chemical", "chemicalbottext", "chemicalmidtext", "chemicalsymbol", "chemicaltext", "chemicaltoptext", "chi", "chineseallnumerals", "chinesecapnumerals", "chinesenumerals", "chook", "circ", "circeq", "circlearrowleft", "circlearrowright", "circledR", "circledS", "circledast", "circledcirc", "circleddash", "circledequals", "circleonrightarrow", "citation", "cite", "clap", "classfont", "cldcommand", "cldcontext", "cldloadfile", "cldprocessfile", "cleftarrow", "clip", "clippedoverlayimage", "clonefield", "clubsuit", "collect", "collectedtext", "collectexpanded", "colon", "coloncolonequals", "colonequals", "color", "colorbar", "colorcomponents", "colored", "coloronly", "colorvalue", "column", "columnbreak", "columnsetspanwidth", "combinepages", "commalistelement", "commalistsentence", "commalistsize", "comment", "comparecolorgroup", "comparedimension", "comparedimensioneps", "comparepalet", "complement", "completebtxrendering", "completecontent", "completeindex", "completelist", "completelistofabbreviations", "completelistofchemicals", "completelistoffigures", "completelistofgraphics", "completelistofintermezzi", "completelistoflogos", "completelistofpublications", "completelistofsorts", "completelistofsynonyms", "completelistoftables", "completepagenumber", "completeregister", "complexes", "complexorsimple", "complexorsimpleempty", "component", "composedcollector", "composedlayer", "compresult", "cong", "constantdimen", "constantdimenargument", "constantemptyargument", "constantnumber", "constantnumberargument", "contentreference", "continuednumber", "continueifinputfile", "convertargument", "convertcommand", "convertedcounter", "converteddimen", "convertedsubcounter", "convertmonth", "convertnumber", "convertvalue", "convertvboxtohbox", "coprod", "copyboxfromcache", "copybtxlabeltext", "copyfield", "copyheadtext", "copylabeltext", "copymathlabeltext", "copyoperatortext", "copypages", "copyparameters", "copyposition", "copyprefixtext", "copyright", "copysetups", "copysuffixtext", "copytaglabeltext", "copyunittext", "correctwhitespace", "countersubs", "counttoken", "counttokens", "cramped", "crampedclap", "crampedllap", "crampedrlap", "crightarrow", "crightoverleftarrow", "crlf", "crlfplaceholder", "cstroke", "ctop", "ctxcommand", "ctxdirectcommand", "ctxdirectlua", "ctxfunction", "ctxlatecommand", "ctxlatelua", "ctxloadluafile", "ctxlua", "ctxluabuffer", "ctxluacode", "ctxreport", "ctxsprint", "cup", "curlyeqprec", "curlyeqsucc", "curlyvee", "curlywedge", "currentassignmentlistkey", "currentassignmentlistvalue", "currentbtxuservariable", "currentcommalistitem", "currentcomponent", "currentdate", "currentenvironment", "currentfeaturetest", "currentheadnumber", "currentinterface", "currentlanguage", "currentlistentrydestinationattribute", "currentlistentrylimitedtext", "currentlistentrynumber", "currentlistentrypagenumber", "currentlistentryreferenceattribute", "currentlistentrytitle", "currentlistentrytitlerendered", "currentlistsymbol", "currentmainlanguage", "currentmessagetext", "currentmoduleparameter", "currentoutputstream", "currentproduct", "currentproject", "currentregime", "currentregisterpageuserdata", "currentresponses", "currenttime", "currentvalue", "currentxtablecolumn", "currentxtablerow", "curvearrowleft", "curvearrowright", "cwopencirclearrow", "cyrillicA", "cyrillicAE", "cyrillicAbreve", "cyrillicAdiaeresis", "cyrillicB", "cyrillicBIGYUS", "cyrillicBIGYUSiotified", "cyrillicC", "cyrillicCH", "cyrillicCHEDC", "cyrillicCHEDCabkhasian", "cyrillicCHEabkhasian", "cyrillicCHEdiaeresis", "cyrillicCHEkhakassian", "cyrillicCHEvertstroke", "cyrillicD", "cyrillicDASIAPNEUMATA", "cyrillicDJE", "cyrillicDZE", "cyrillicDZEabkhasian", "cyrillicDZHE", "cyrillicE", "cyrillicELtail", "cyrillicEMtail", "cyrillicENDC", "cyrillicENGHE", "cyrillicENhook", "cyrillicENtail", "cyrillicEREV", "cyrillicERY", "cyrillicERtick", "cyrillicEbreve", "cyrillicEdiaeresis", "cyrillicEgrave", "cyrillicEiotified", "cyrillicF", "cyrillicFITA", "cyrillicG", "cyrillicGHEmidhook", "cyrillicGHEstroke", "cyrillicGHEupturn", "cyrillicGJE", "cyrillicH", "cyrillicHA", "cyrillicHADC", "cyrillicHRDSN", "cyrillicI", "cyrillicIE", "cyrillicII", "cyrillicISHRT", "cyrillicISHRTtail", "cyrillicIZHITSA", "cyrillicIZHITSAdoublegrave", "cyrillicIdiaeresis", "cyrillicIgrave", "cyrillicImacron", "cyrillicJE", "cyrillicK", "cyrillicKADC", "cyrillicKAbashkir", "cyrillicKAhook", "cyrillicKAstroke", "cyrillicKAvertstroke", "cyrillicKJE", "cyrillicKOPPA", "cyrillicKSI", "cyrillicL", "cyrillicLITTLEYUS", "cyrillicLITTLEYUSiotified", "cyrillicLJE", "cyrillicM", "cyrillicN", "cyrillicNJE", "cyrillicO", "cyrillicOMEGA", "cyrillicOMEGAround", "cyrillicOMEGAtitlo", "cyrillicOT", "cyrillicObarred", "cyrillicObarreddiaeresis", "cyrillicOdiaeresis", "cyrillicP", "cyrillicPALATALIZATION", "cyrillicPALOCHKA", "cyrillicPEmidhook", "cyrillicPSI", "cyrillicPSILIPNEUMATA", "cyrillicR", "cyrillicS", "cyrillicSCHWA", "cyrillicSCHWAdiaeresis", "cyrillicSDSC", "cyrillicSEMISOFT", "cyrillicSFTSN", "cyrillicSH", "cyrillicSHCH", "cyrillicSHHA", "cyrillicT", "cyrillicTEDC", "cyrillicTETSE", "cyrillicTITLO", "cyrillicTSHE", "cyrillicU", "cyrillicUK", "cyrillicUSHRT", "cyrillicUdiaeresis", "cyrillicUdoubleacute", "cyrillicUmacron", "cyrillicV", "cyrillicYA", "cyrillicYAT", "cyrillicYERUdiaeresis", "cyrillicYI", "cyrillicYO", "cyrillicYU", "cyrillicYstr", "cyrillicYstrstroke", "cyrillicZ", "cyrillicZDSC", "cyrillicZEdiaeresis", "cyrillicZH", "cyrillicZHEbreve", "cyrillicZHEdescender", "cyrillicZHEdiaeresis", "cyrillica", "cyrillicabreve", "cyrillicadiaeresis", "cyrillicae", "cyrillicb", "cyrillicbigyus", "cyrillicbigyusiotified", "cyrillicc", "cyrillicch", "cyrilliccheabkhasian", "cyrillicchedc", "cyrillicchedcabkhasian", "cyrillicchediaeresis", "cyrillicchekhakassian", "cyrillicchevertstroke", "cyrillicd", "cyrillicdje", "cyrillicdze", "cyrillicdzeabkhasian", "cyrillicdzhe", "cyrillice", "cyrillicebreve", "cyrillicediaeresis", "cyrillicegrave", "cyrilliceiotified", "cyrilliceltail", "cyrillicemtail", "cyrillicendc", "cyrillicenghe", "cyrillicenhook", "cyrillicentail", "cyrillicerev", "cyrillicertick", "cyrillicery", "cyrillicf", "cyrillicfita", "cyrillicg", "cyrillicghemidhook", "cyrillicghestroke", "cyrillicgheupturn", "cyrillicgje", "cyrillich", "cyrillicha", "cyrillichadc", "cyrillichrdsn", "cyrillici", "cyrillicidiaeresis", "cyrillicie", "cyrillicigrave", "cyrillicii", "cyrillicimacron", "cyrillicishrt", "cyrillicishrttail", "cyrillicizhitsa", "cyrillicizhitsadoublegrave", "cyrillicje", "cyrillick", "cyrillickabashkir", "cyrillickadc", "cyrillickahook", "cyrillickastroke", "cyrillickavertstroke", "cyrillickje", "cyrillickoppa", "cyrillicksi", "cyrillicl", "cyrilliclittleyus", "cyrilliclittleyusiotified", "cyrilliclje", "cyrillicm", "cyrillicn", "cyrillicnje", "cyrillico", "cyrillicobarred", "cyrillicobarreddiaeresis", "cyrillicodiaeresis", "cyrillicomega", "cyrillicomegaround", "cyrillicomegatitlo", "cyrillicot", "cyrillicp", "cyrillicpemidhook", "cyrillicpsi", "cyrillicr", "cyrillics", "cyrillicschwa", "cyrillicschwadiaeresis", "cyrillicsdsc", "cyrillicsemisoft", "cyrillicsftsn", "cyrillicsh", "cyrillicshch", "cyrillicshha", "cyrillict", "cyrillictedc", "cyrillictetse", "cyrillictshe", "cyrillicu", "cyrillicudiaeresis", "cyrillicudoubleacute", "cyrillicuk", "cyrillicumacron", "cyrillicushrt", "cyrillicv", "cyrillicya", "cyrillicyat", "cyrillicyerudiaeresis", "cyrillicyi", "cyrillicyo", "cyrillicystr", "cyrillicystrstroke", "cyrillicyu", "cyrillicz", "cyrilliczdsc", "cyrilliczediaeresis", "cyrilliczh", "cyrilliczhebreve", "cyrilliczhedescender", "cyrilliczhediaeresis", "d", "dag", "dagger", "daleth", "dasharrow", "dashedleftarrow", "dashedrightarrow", "dashv", "datasetvariable", "date", "dayoftheweek", "dayspermonth", "dbinom", "dcaron", "dcurl", "ddag", "ddagger", "dddot", "ddot", "ddots", "decrement", "decrementcounter", "decrementedcounter", "decrementpagenumber", "decrementsubpagenumber", "decrementvalue", "defaultinterface", "defaultobjectpage", "defaultobjectreference", "defcatcodecommand", "defconvertedargument", "defconvertedcommand", "defconvertedvalue", "define", "defineMPinstance", "defineTABLEsetup", "defineaccent", "defineactivecharacter", "definealternativestyle", "defineanchor", "defineattachment", "defineattribute", "definebackground", "definebar", "defineblock", "definebodyfont", "definebodyfontenvironment", "definebodyfontswitch", "definebreakpoint", "definebreakpoints", "definebtx", "definebtxdataset", "definebtxregister", "definebtxrendering", "definebuffer", "definebutton", "definecapitals", "definecharacter", "definecharacterkerning", "definecharacterspacing", "definechemical", "definechemicals", "definechemicalsymbol", "definecollector", "definecolor", "definecolorgroup", "definecolumnbreak", "definecolumnset", "definecolumnsetarea", "definecolumnsetspan", "definecombination", "definecombinedlist", "definecommand", "definecomment", "definecomplexorsimple", "definecomplexorsimpleempty", "defineconversion", "defineconversionset", "definecounter", "definedataset", "definedelimitedtext", "definedeq", "definedescription", "definedfont", "defineeffect", "defineenumeration", "defineexpandable", "defineexternalfigure", "definefacingfloat", "definefallbackfamily", "definefield", "definefieldbody", "definefieldbodyset", "definefieldcategory", "definefieldstack", "definefiguresymbol", "definefileconstant", "definefilefallback", "definefilesynonym", "definefiller", "definefirstline", "definefittingpage", "definefloat", "definefont", "definefontalternative", "definefontfallback", "definefontfamily", "definefontfamilypreset", "definefontfeature", "definefontfile", "definefontsize", "definefontsolution", "definefontstyle", "definefontsynonym", "defineformula", "defineformulaalternative", "defineformulaframed", "defineframed", "defineframedcontent", "defineframedtable", "defineframedtext", "definefrozenfont", "defineglobalcolor", "definegraphictypesynonym", "definegridsnapping", "definehbox", "definehead", "defineheadalternative", "definehelp", "definehigh", "definehighlight", "definehspace", "definehypenationfeatures", "defineindentedtext", "defineindenting", "defineinitial", "defineinsertion", "defineinteraction", "defineinteractionbar", "defineinteractionmenu", "defineinterfaceconstant", "defineinterfaceelement", "defineinterfacevariable", "defineinterlinespace", "defineintermediatecolor", "defineitemgroup", "defineitems", "definelabel", "definelabelclass", "definelayer", "definelayerpreset", "definelayout", "definelinefiller", "definelinenote", "definelinenumbering", "definelines", "definelist", "definelistalternative", "definelistextra", "definelow", "definelowhigh", "definelowmidhigh", "definemakeup", "definemarginblock", "definemargindata", "definemarker", "definemarking", "definemathaccent", "definemathalignment", "definemathcases", "definemathcommand", "definemathdouble", "definemathdoubleextensible", "definemathematics", "definemathextensible", "definemathfence", "definemathfraction", "definemathframed", "definemathmatrix", "definemathornament", "definemathover", "definemathoverextensible", "definemathovertextextensible", "definemathradical", "definemathstackers", "definemathstyle", "definemathtriplet", "definemathunder", "definemathunderextensible", "definemathundertextextensible", "definemathunstacked", "definemeasure", "definemessageconstant", "definemixedcolumns", "definemode", "definemultitonecolor", "definenamedcolor", "definenamespace", "definenarrower", "definenote", "defineornament", "defineoutputroutine", "defineoutputroutinecommand", "defineoverlay", "definepage", "definepagebreak", "definepagechecker", "definepagecolumns", "definepageinjection", "definepageinjectionalternative", "definepageshift", "definepagestate", "definepairedbox", "definepalet", "definepapersize", "defineparagraph", "defineparagraphs", "defineparallel", "defineparbuilder", "defineperiodkerning", "defineplacement", "definepositioning", "defineprefixset", "defineprocesscolor", "defineprocessor", "defineprofile", "defineprogram", "definepushbutton", "definepushsymbol", "definereference", "definereferenceformat", "defineregister", "definerenderingwindow", "defineresetset", "defineruby", "definescale", "definescript", "definesection", "definesectionblock", "definesectionlevels", "defineselector", "defineseparatorset", "defineshift", "definesidebar", "definesort", "definesorting", "definespotcolor", "definestartstop", "definestyle", "definestyleinstance", "definesubfield", "definesubformula", "definesymbol", "definesynonym", "definesynonyms", "definesystemattribute", "definesystemconstant", "definesystemvariable", "definetabletemplate", "definetabulate", "definetabulation", "definetext", "definetextbackground", "definetextflow", "definetextnote", "definetokenlist", "definetooltip", "definetransparency", "definetwopasslist", "definetype", "definetypeface", "definetypescriptprefix", "definetypescriptsynonym", "definetypesetting", "definetyping", "defineunit", "defineuserdata", "defineuserdataalternative", "defineviewerlayer", "definevspace", "definevspacing", "definevspacingamount", "definextable", "delimited", "delimitedtext", "delta", "depthofstring", "depthonlybox", "depthspanningtext", "depthstrut", "determineheadnumber", "determinelistcharacteristics", "determinenoflines", "determineregistercharacteristics", "devanagarinumerals", "dfrac", "dhook", "diameter", "diamond", "diamondsuit", "differentialD", "differentiald", "digamma", "digits", "dimensiontocount", "directboxfromcache", "directcolor", "directcolored", "directconvertedcounter", "directcopyboxfromcache", "directdummyparameter", "directgetboxllx", "directgetboxlly", "directhighlight", "directlocalframed", "directluacode", "directselect", "directsetbar", "directsetup", "directsymbol", "directvspacing", "dis", "disabledirectives", "disableexperiments", "disablemode", "disableoutputstream", "disableparpositions", "disableregime", "disabletrackers", "displaymath", "displaymathematics", "displaymessage", "distributedhsize", "div", "dividedsize", "divideontimes", "divides", "doadaptleftskip", "doadaptrightskip", "doaddfeature", "doassign", "doassignempty", "doboundtext", "docheckassignment", "docheckedpagestate", "docheckedpair", "documentvariable", "dodoubleargument", "dodoubleargumentwithset", "dodoubleempty", "dodoubleemptywithset", "dodoublegroupempty", "doeassign", "doexpandedrecurse", "dofastloopcs", "dogetattribute", "dogetattributeid", "dogetcommacommandelement", "dogobbledoubleempty", "dogobblesingleempty", "doif", "doifMPgraphicelse", "doifallcommon", "doifallcommonelse", "doifalldefinedelse", "doifallmodes", "doifallmodeselse", "doifassignmentelse", "doifassignmentelsecs", "doifblackelse", "doifbothsides", "doifbothsidesoverruled", "doifboxelse", "doifbufferelse", "doifcolor", "doifcolorelse", "doifcommandhandler", "doifcommandhandlerelse", "doifcommon", "doifcommonelse", "doifcontent", "doifconversiondefinedelse", "doifconversionnumberelse", "doifcounter", "doifcounterelse", "doifcurrentfonthasfeatureelse", "doifdefined", "doifdefinedcounter", "doifdefinedcounterelse", "doifdefinedelse", "doifdimensionelse", "doifdimenstringelse", "doifdocumentargument", "doifdocumentargumentelse", "doifdocumentfilename", "doifdocumentfilenameelse", "doifdocumentvariable", "doifdocumentvariableelse", "doifdrawingblackelse", "doifelse", "doifelseMPgraphic", "doifelseallcommon", "doifelsealldefined", "doifelseallmodes", "doifelseassignment", "doifelseassignmentcs", "doifelseblack", "doifelsebox", "doifelseboxincache", "doifelsebuffer", "doifelsecolor", "doifelsecommandhandler", "doifelsecommon", "doifelseconversiondefined", "doifelseconversionnumber", "doifelsecounter", "doifelsecurrentfonthasfeature", "doifelsecurrentsortingused", "doifelsecurrentsynonymshown", "doifelsecurrentsynonymused", "doifelsedefined", "doifelsedefinedcounter", "doifelsedimension", "doifelsedimenstring", "doifelsedocumentargument", "doifelsedocumentfilename", "doifelsedocumentvariable", "doifelsedrawingblack", "doifelseempty", "doifelseemptyvalue", "doifelseemptyvariable", "doifelseenv", "doifelsefastoptionalcheck", "doifelsefastoptionalcheckcs", "doifelsefieldbody", "doifelsefieldcategory", "doifelsefigure", "doifelsefile", "doifelsefiledefined", "doifelsefileexists", "doifelsefirstchar", "doifelseflagged", "doifelsefontchar", "doifelsefontfeature", "doifelsefontpresent", "doifelsefontsynonym", "doifelseframed", "doifelsehasspace", "doifelsehelp", "doifelseincsname", "doifelseinelement", "doifelseinputfile", "doifelseinsertion", "doifelseinset", "doifelseinstring", "doifelseinsymbolset", "doifelseintoks", "doifelseintwopassdata", "doifelseitalic", "doifelselanguage", "doifelselayerdata", "doifelselayoutdefined", "doifelselayoutsomeline", "doifelselayouttextline", "doifelseleapyear", "doifelselist", "doifelselocation", "doifelselocfile", "doifelsemainfloatbody", "doifelsemarkedpage", "doifelsemarking", "doifelsemeaning", "doifelsemessage", "doifelsemode", "doifelsenextbgroup", "doifelsenextbgroupcs", "doifelsenextchar", "doifelsenextoptional", "doifelsenextoptionalcs", "doifelsenextparenthesis", "doifelsenonzeropositive", "doifelsenoteonsamepage", "doifelsenothing", "doifelsenumber", "doifelseobjectfound", "doifelseobjectreferencefound", "doifelseoddpage", "doifelseoddpagefloat", "doifelseoldercontext", "doifelseolderversion", "doifelseoverlapping", "doifelseoverlay", "doifelseparallel", "doifelseparentfile", "doifelsepath", "doifelsepathexists", "doifelsepatterns", "doifelseposition", "doifelsepositionaction", "doifelsepositiononpage", "doifelsepositionsonsamepage", "doifelsepositionsonthispage", "doifelsepositionsused", "doifelsereferencefound", "doifelserightpage", "doifelserightpagefloat", "doifelserighttoleftinbox", "doifelsesamelinereference", "doifelsesamestring", "doifelsesetups", "doifelsesomebackground", "doifelsesomespace", "doifelsesomething", "doifelsesometoks", "doifelsestringinstring", "doifelsestructurelisthasnumber", "doifelsestructurelisthaspage", "doifelsesymboldefined", "doifelsesymbolset", "doifelsetext", "doifelsetextflow", "doifelsetextflowcollector", "doifelsetopofpage", "doifelsetypingfile", "doifelseundefined", "doifelseurldefined", "doifelsevalue", "doifelsevaluenothing", "doifelsevariable", "doifempty", "doifemptyelse", "doifemptytoks", "doifemptyvalue", "doifemptyvalueelse", "doifemptyvariable", "doifemptyvariableelse", "doifenv", "doifenvelse", "doiffastoptionalcheckcselse", "doiffastoptionalcheckelse", "doiffieldbodyelse", "doiffieldcategoryelse", "doiffigureelse", "doiffile", "doiffiledefinedelse", "doiffileelse", "doiffileexistselse", "doiffirstcharelse", "doifflaggedelse", "doiffontcharelse", "doiffontfeatureelse", "doiffontpresentelse", "doiffontsynonymelse", "doifhasspaceelse", "doifhelpelse", "doifincsnameelse", "doifinelementelse", "doifinputfileelse", "doifinsertionelse", "doifinset", "doifinsetelse", "doifinstring", "doifinstringelse", "doifinsymbolset", "doifinsymbolsetelse", "doifintokselse", "doifintwopassdataelse", "doifitalicelse", "doiflanguageelse", "doiflayerdataelse", "doiflayoutdefinedelse", "doiflayoutsomelineelse", "doiflayouttextlineelse", "doifleapyearelse", "doiflistelse", "doiflocationelse", "doiflocfileelse", "doifmainfloatbodyelse", "doifmarkingelse", "doifmeaningelse", "doifmessageelse", "doifmode", "doifmodeelse", "doifnextbgroupcselse", "doifnextbgroupelse", "doifnextcharelse", "doifnextoptionalcselse", "doifnextoptionalelse", "doifnextparenthesiselse", "doifnonzeropositiveelse", "doifnot", "doifnotallcommon", "doifnotallmodes", "doifnotcommandhandler", "doifnotcommon", "doifnotcounter", "doifnotdocumentargument", "doifnotdocumentfilename", "doifnotdocumentvariable", "doifnotempty", "doifnotemptyvalue", "doifnotemptyvariable", "doifnotenv", "doifnoteonsamepageelse", "doifnotescollected", "doifnotfile", "doifnotflagged", "doifnothing", "doifnothingelse", "doifnotinset", "doifnotinsidesplitfloat", "doifnotinstring", "doifnotmode", "doifnotnumber", "doifnotsamestring", "doifnotsetups", "doifnotvalue", "doifnotvariable", "doifnumber", "doifnumberelse", "doifobjectfoundelse", "doifobjectreferencefoundelse", "doifoddpageelse", "doifoddpagefloatelse", "doifoldercontextelse", "doifolderversionelse", "doifoverlappingelse", "doifoverlayelse", "doifparallelelse", "doifparentfileelse", "doifpathelse", "doifpathexistselse", "doifpatternselse", "doifposition", "doifpositionaction", "doifpositionactionelse", "doifpositionelse", "doifpositiononpageelse", "doifpositionsonsamepageelse", "doifpositionsonthispageelse", "doifpositionsusedelse", "doifreferencefoundelse", "doifrightpagefloatelse", "doifrighttoleftinboxelse", "doifsamelinereferenceelse", "doifsamestring", "doifsamestringelse", "doifsetups", "doifsetupselse", "doifsomebackground", "doifsomebackgroundelse", "doifsomespaceelse", "doifsomething", "doifsomethingelse", "doifsometoks", "doifsometokselse", "doifstringinstringelse", "doifstructurelisthasnumberelse", "doifstructurelisthaspageelse", "doifsymboldefinedelse", "doifsymbolsetelse", "doiftext", "doiftextelse", "doiftextflowcollectorelse", "doiftextflowelse", "doiftopofpageelse", "doiftypingfileelse", "doifundefined", "doifundefinedcounter", "doifundefinedelse", "doifunknownfontfeature", "doifurldefinedelse", "doifvalue", "doifvalueelse", "doifvaluenothing", "doifvaluenothingelse", "doifvaluesomething", "doifvariable", "doifvariableelse", "doindentation", "dollar", "doloop", "doloopoverlist", "donothing", "dontconvertfont", "dontleavehmode", "dontpermitspacesbetweengroups", "dopositionaction", "doprocesslocalsetups", "doquadrupleargument", "doquadrupleempty", "doquadruplegroupempty", "doquintupleargument", "doquintupleempty", "doquintuplegroupempty", "dorechecknextindentation", "dorecurse", "dorepeatwithcommand", "doreplacefeature", "doresetandafffeature", "doresetattribute", "dorotatebox", "dosetattribute", "dosetleftskipadaption", "dosetrightskipadaption", "dosetupcheckedinterlinespace", "doseventupleargument", "doseventupleempty", "dosingleargument", "dosingleempty", "dosinglegroupempty", "dosixtupleargument", "dosixtupleempty", "dostepwiserecurse", "dosubtractfeature", "dot", "doteq", "doteqdot", "dotfskip", "dotlessI", "dotlessJ", "dotlessi", "dotlessj", "dotlessjstroke", "dotminus", "dotoks", "dotplus", "dotripleargument", "dotripleargumentwithset", "dotripleempty", "dotripleemptywithset", "dotriplegroupempty", "dots", "dottedcircle", "dottedrightarrow", "doublebar", "doublebond", "doublebrace", "doublebracket", "doublecap", "doublecup", "doubleparent", "doubleprime", "doubleverticalbar", "dowith", "dowithnextbox", "dowithnextboxcontent", "dowithnextboxcontentcs", "dowithnextboxcs", "dowithpargument", "dowithrange", "dowithwargument", "downarrow", "downdasharrow", "downdownarrows", "downharpoonleft", "downharpoonright", "downuparrows", "downwhitearrow", "downzigzagarrow", "dpofstring", "dstroke", "dtail", "dummydigit", "dummyparameter", "dzcaronligature", "dzligature", "eTeX", "eacute", "ebreve", "ecaron", "ecedilla", "ecircumflex", "ecircumflexacute", "ecircumflexdotbelow", "ecircumflexgrave", "ecircumflexhook", "ecircumflextilde", "edefconvertedargument", "ediaeresis", "edotaccent", "edotbelow", "edoublegrave", "efcmaxheight", "efcmaxwidth", "efcminheight", "efcminwidth", "efcparameter", "effect", "egrave", "ehook", "einvertedbreve", "elapsedseconds", "elapsedtime", "eleftarrowfill", "eleftharpoondownfill", "eleftharpoonupfill", "eleftrightarrowfill", "ell", "em", "emacron", "emdash", "emphasisboldface", "emphasistypeface", "emptylines", "emptyset", "emquad", "emspace", "enabledirectives", "enableexperiments", "enablemode", "enableoutputstream", "enableparpositions", "enableregime", "enabletrackers", "endash", "endnote", "enquad", "enskip", "enspace", "env", "environment", "envvar", "eogonek", "eoverbarfill", "eoverbracefill", "eoverbracketfill", "eoverparentfill", "epos", "epsilon", "eq", "eqcirc", "eqeq", "eqeqeq", "eqgtr", "eqless", "eqsim", "eqslantgtr", "eqslantless", "equaldigits", "equalscolon", "equiv", "erightarrowfill", "erightharpoondownfill", "erightharpoonupfill", "eta", "eth", "ethiopic", "etilde", "etwoheadrightarrowfill", "eunderbarfill", "eunderbracefill", "eunderbracketfill", "eunderparentfill", "exclamdown", "executeifdefined", "exists", "exitloop", "exitloopnow", "expandcheckedcsname", "expanded", "expandeddoif", "expandeddoifelse", "expandeddoifnot", "expandfontsynonym", "expdoif", "expdoifcommonelse", "expdoifelse", "expdoifelsecommon", "expdoifelseinset", "expdoifinsetelse", "expdoifnot", "exponentiale", "externalfigure", "externalfigurecollectionmaxheight", "externalfigurecollectionmaxwidth", "externalfigurecollectionminheight", "externalfigurecollectionminwidth", "externalfigurecollectionparameter", "fakebox", "fallingdotseq", "fastdecrement", "fastincrement", "fastlocalframed", "fastloopfinal", "fastloopindex", "fastscale", "fastsetup", "fastsetupwithargument", "fastsetupwithargumentswapped", "fastswitchtobodyfont", "fastsxsy", "feature", "fence", "fenced", "fetchallmarkings", "fetchallmarks", "fetchmark", "fetchmarking", "fetchonemark", "fetchonemarking", "fetchruntinecommand", "fetchtwomarkings", "fetchtwomarks", "ffiligature", "ffligature", "fflligature", "fhook", "field", "fieldbody", "fieldstack", "fifthoffivearguments", "fifthofsixarguments", "figurefilename", "figurefilepath", "figurefiletype", "figurefullname", "figureheight", "figurenaturalheight", "figurenaturalwidth", "figurespace", "figuresymbol", "figurewidth", "filename", "filigature", "filledhboxb", "filledhboxc", "filledhboxg", "filledhboxk", "filledhboxm", "filledhboxr", "filledhboxy", "filler", "fillinline", "fillinrules", "fillintext", "fillupto", "filterfromnext", "filterfromvalue", "filterpages", "filterreference", "findtwopassdata", "finishregisterentry", "firstcharacter", "firstcounter", "firstcountervalue", "firstinlist", "firstoffivearguments", "firstoffourarguments", "firstofoneargument", "firstofoneunexpanded", "firstofsixarguments", "firstofthreearguments", "firstofthreeunexpanded", "firstoftwoarguments", "firstoftwounexpanded", "firstrealpage", "firstrealpagenumber", "firstsubcountervalue", "firstsubpage", "firstsubpagenumber", "firstuserpage", "firstuserpagenumber", "fitfield", "fitfieldframed", "fittopbaselinegrid", "fiveeighths", "fivesixths", "fixedspace", "fixedspaces", "flag", "flat", "flligature", "floatuserdataparameter", "flushbox", "flushboxregister", "flushcollector", "flushedrightlastline", "flushlayer", "flushlocalfloats", "flushnextbox", "flushnotes", "flushoutputstream", "flushshapebox", "flushtextflow", "flushtokens", "flushtoks", "fontalternative", "fontbody", "fontchar", "fontcharbyindex", "fontclass", "fontclassname", "fontface", "fontfeaturelist", "fontsize", "fontstyle", "footnote", "footnotetext", "forall", "forcecharacterstripping", "forcelocalfloats", "forgeteverypar", "forgetparameters", "forgetparskip", "forgetragged", "formula", "formulanumber", "foundbox", "fourfifths", "fourperemspace", "fourthoffivearguments", "fourthoffourarguments", "fourthofsixarguments", "frac", "framed", "frameddimension", "framedparameter", "framedtext", "freezedimenmacro", "freezemeasure", "frenchspacing", "from", "fromlinenote", "frown", "frozenhbox", "frule", "gacute", "gamma", "gbreve", "gcaron", "gcircumflex", "gcommaaccent", "gdefconvertedargument", "gdefconvertedcommand", "gdotaccent", "ge", "geq", "geqq", "geqslant", "getMPdrawing", "getMPlayer", "getboxfromcache", "getboxllx", "getboxlly", "getbuffer", "getbufferdata", "getcommacommandsize", "getcommalistsize", "getdayoftheweek", "getdayspermonth", "getdefinedbuffer", "getdocumentargument", "getdocumentargumentdefault", "getdocumentfilename", "getdummyparameters", "getemptyparameters", "geteparameters", "getexpandedparameters", "getfiguredimensions", "getfirstcharacter", "getfirsttwopassdata", "getfromcommacommand", "getfromcommalist", "getfromtwopassdata", "getglyphdirect", "getglyphstyled", "getgparameters", "getinlineuserdata", "getlasttwopassdata", "getlocalfloat", "getlocalfloats", "getmarking", "getmessage", "getnamedglyphdirect", "getnamedglyphstyled", "getnamedtwopassdatalist", "getnaturaldimensions", "getnoflines", "getobject", "getobjectdimensions", "getpaletsize", "getparameters", "getprivatechar", "getprivateslot", "getrandomcount", "getrandomdimen", "getrandomfloat", "getrandomnumber", "getrandomseed", "getraweparameters", "getrawgparameters", "getrawnoflines", "getrawparameters", "getrawxparameters", "getreference", "getreferenceentry", "getroundednoflines", "gets", "getsubstring", "gettokenlist", "gettwopassdata", "gettwopassdatalist", "getuserdata", "getuvalue", "getvalue", "getvariable", "getvariabledefault", "getxparameters", "gg", "ggg", "gggtr", "gimel", "globaldisablemode", "globalenablemode", "globalletempty", "globalpopbox", "globalpopmacro", "globalpreventmode", "globalprocesscommalist", "globalpushbox", "globalpushmacro", "globalswapcounts", "globalswapdimens", "globalswapmacros", "globalundefine", "glyphfontfile", "gnapprox", "gneqq", "gnsim", "gobbledoubleempty", "gobbleeightarguments", "gobblefivearguments", "gobblefiveoptionals", "gobblefourarguments", "gobblefouroptionals", "gobbleninearguments", "gobbleoneargument", "gobbleoneoptional", "gobblesevenarguments", "gobblesingleempty", "gobblesixarguments", "gobblespacetokens", "gobbletenarguments", "gobblethreearguments", "gobblethreeoptionals", "gobbletwoarguments", "gobbletwooptionals", "gobbleuntil", "gobbleuntilrelax", "godown", "goto", "gotobox", "gotopage", "grabbufferdata", "grabbufferdatadirect", "grabuntil", "grave", "graycolor", "grayvalue", "greedysplitstring", "greekAlpha", "greekAlphadasia", "greekAlphadasiaperispomeni", "greekAlphadasiatonos", "greekAlphadasiavaria", "greekAlphaiotasub", "greekAlphaiotasubdasia", "greekAlphaiotasubdasiaperispomeni", "greekAlphaiotasubdasiatonos", "greekAlphaiotasubdasiavaria", "greekAlphaiotasubpsili", "greekAlphaiotasubpsiliperispomeni", "greekAlphaiotasubpsilitonos", "greekAlphaiotasubpsilivaria", "greekAlphamacron", "greekAlphapsili", "greekAlphapsiliperispomeni", "greekAlphapsilitonos", "greekAlphapsilivaria", "greekAlphatonos", "greekAlphavaria", "greekAlphavrachy", "greekBeta", "greekChi", "greekCoronis", "greekDelta", "greekEpsilon", "greekEpsilondasia", "greekEpsilondasiatonos", "greekEpsilondasiavaria", "greekEpsilonpsili", "greekEpsilonpsilitonos", "greekEpsilonpsilivaria", "greekEpsilontonos", "greekEpsilonvaria", "greekEta", "greekEtadasia", "greekEtadasiaperispomeni", "greekEtadasiatonos", "greekEtadasiavaria", "greekEtaiotasub", "greekEtaiotasubdasia", "greekEtaiotasubdasiaperispomeni", "greekEtaiotasubdasiatonos", "greekEtaiotasubdasiavaria", "greekEtaiotasubpsili", "greekEtaiotasubpsiliperispomeni", "greekEtaiotasubpsilitonos", "greekEtaiotasubpsilivaria", "greekEtapsili", "greekEtapsiliperispomeni", "greekEtapsilitonos", "greekEtapsilivaria", "greekEtatonos", "greekEtavaria", "greekGamma", "greekIota", "greekIotadasia", "greekIotadasiaperispomeni", "greekIotadasiatonos", "greekIotadasiavaria", "greekIotadialytika", "greekIotamacron", "greekIotapsili", "greekIotapsiliperispomeni", "greekIotapsilitonos", "greekIotapsilivaria", "greekIotatonos", "greekIotavaria", "greekIotavrachy", "greekKappa", "greekLambda", "greekMu", "greekNu", "greekOmega", "greekOmegadasia", "greekOmegadasiaperispomeni", "greekOmegadasiatonos", "greekOmegadasiavaria", "greekOmegaiotasub", "greekOmegaiotasubdasia", "greekOmegaiotasubdasiaperispomeni", "greekOmegaiotasubdasiatonos", "greekOmegaiotasubdasiavaria", "greekOmegaiotasubpsili", "greekOmegaiotasubpsiliperispomeni", "greekOmegaiotasubpsilitonos", "greekOmegaiotasubpsilivaria", "greekOmegapsili", "greekOmegapsiliperispomeni", "greekOmegapsilitonos", "greekOmegapsilivaria", "greekOmegatonos", "greekOmegavaria", "greekOmicron", "greekOmicrondasia", "greekOmicrondasiatonos", "greekOmicrondasiavaria", "greekOmicronpsili", "greekOmicronpsilitonos", "greekOmicronpsilivaria", "greekOmicrontonos", "greekOmicronvaria", "greekPhi", "greekPi", "greekPsi", "greekRho", "greekRhodasia", "greekSigma", "greekSigmalunate", "greekTau", "greekTheta", "greekUpsilon", "greekUpsilondasia", "greekUpsilondasiaperispomeni", "greekUpsilondasiatonos", "greekUpsilondasiavaria", "greekUpsilondialytika", "greekUpsilonmacron", "greekUpsilontonos", "greekUpsilonvaria", "greekUpsilonvrachy", "greekXi", "greekZeta", "greekalpha", "greekalphadasia", "greekalphadasiaperispomeni", "greekalphadasiatonos", "greekalphadasiavaria", "greekalphaiotasub", "greekalphaiotasubdasia", "greekalphaiotasubdasiaperispomeni", "greekalphaiotasubdasiatonos", "greekalphaiotasubdasiavaria", "greekalphaiotasubperispomeni", "greekalphaiotasubpsili", "greekalphaiotasubpsiliperispomeni", "greekalphaiotasubpsilitonos", "greekalphaiotasubpsilivaria", "greekalphaiotasubtonos", "greekalphaiotasubvaria", "greekalphamacron", "greekalphaoxia", "greekalphaperispomeni", "greekalphapsili", "greekalphapsiliperispomeni", "greekalphapsilitonos", "greekalphapsilivaria", "greekalphatonos", "greekalphavaria", "greekalphavrachy", "greekbeta", "greekbetaalt", "greekchi", "greekdasia", "greekdasiaperispomeni", "greekdasiatonos", "greekdasiavaria", "greekdelta", "greekdialytikaperispomeni", "greekdialytikatonos", "greekdialytikavaria", "greekdigamma", "greekepsilon", "greekepsilonalt", "greekepsilondasia", "greekepsilondasiatonos", "greekepsilondasiavaria", "greekepsilonoxia", "greekepsilonpsili", "greekepsilonpsilitonos", "greekepsilonpsilivaria", "greekepsilontonos", "greekepsilonvaria", "greeketa", "greeketadasia", "greeketadasiaperispomeni", "greeketadasiatonos", "greeketadasiavaria", "greeketaiotasub", "greeketaiotasubdasia", "greeketaiotasubdasiaperispomeni", "greeketaiotasubdasiatonos", "greeketaiotasubdasiavaria", "greeketaiotasubperispomeni", "greeketaiotasubpsili", "greeketaiotasubpsiliperispomeni", "greeketaiotasubpsilitonos", "greeketaiotasubpsilivaria", "greeketaiotasubtonos", "greeketaiotasubvaria", "greeketaoxia", "greeketaperispomeni", "greeketapsili", "greeketapsiliperispomeni", "greeketapsilitonos", "greeketapsilivaria", "greeketatonos", "greeketavaria", "greekfinalsigma", "greekgamma", "greekiota", "greekiotadasia", "greekiotadasiaperispomeni", "greekiotadasiatonos", "greekiotadasiavaria", "greekiotadialytika", "greekiotadialytikaperispomeni", "greekiotadialytikatonos", "greekiotadialytikavaria", "greekiotamacron", "greekiotaoxia", "greekiotaperispomeni", "greekiotapsili", "greekiotapsiliperispomeni", "greekiotapsilitonos", "greekiotapsilivaria", "greekiotatonos", "greekiotavaria", "greekiotavrachy", "greekkappa", "greekkoppa", "greeklambda", "greekmu", "greeknu", "greeknumerals", "greeknumkoppa", "greekomega", "greekomegadasia", "greekomegadasiaperispomeni", "greekomegadasiatonos", "greekomegadasiavaria", "greekomegaiotasub", "greekomegaiotasubdasia", "greekomegaiotasubdasiaperispomeni", "greekomegaiotasubdasiatonos", "greekomegaiotasubdasiavaria", "greekomegaiotasubperispomeni", "greekomegaiotasubpsili", "greekomegaiotasubpsiliperispomeni", "greekomegaiotasubpsilitonos", "greekomegaiotasubpsilivaria", "greekomegaiotasubtonos", "greekomegaiotasubvaria", "greekomegaoxia", "greekomegaperispomeni", "greekomegapsili", "greekomegapsiliperispomeni", "greekomegapsilitonos", "greekomegapsilivaria", "greekomegatonos", "greekomegavaria", "greekomicron", "greekomicrondasia", "greekomicrondasiatonos", "greekomicrondasiavaria", "greekomicronoxia", "greekomicronpsili", "greekomicronpsilitonos", "greekomicronpsilivaria", "greekomicrontonos", "greekomicronvaria", "greekoxia", "greekperispomeni", "greekphi", "greekphialt", "greekpi", "greekpialt", "greekprosgegrammeni", "greekpsi", "greekpsili", "greekpsiliperispomeni", "greekpsilitonos", "greekpsilivaria", "greekrho", "greekrhoalt", "greekrhodasia", "greekrhopsili", "greeksampi", "greeksigma", "greeksigmalunate", "greekstigma", "greektau", "greektheta", "greekthetaalt", "greektonos", "greekupsilon", "greekupsilondasia", "greekupsilondasiaperispomeni", "greekupsilondasiatonos", "greekupsilondasiavaria", "greekupsilondiaeresis", "greekupsilondialytikaperispomeni", "greekupsilondialytikatonos", "greekupsilondialytikavaria", "greekupsilonmacron", "greekupsilonoxia", "greekupsilonperispomeni", "greekupsilonpsili", "greekupsilonpsiliperispomeni", "greekupsilonpsilitonos", "greekupsilonpsilivaria", "greekupsilontonos", "greekupsilonvaria", "greekupsilonvrachy", "greekvaria", "greekxi", "greekzeta", "grid", "groupedcommand", "gsetboxllx", "gsetboxlly", "gstroke", "gt", "gtrapprox", "gtrdot", "gtreqless", "gtreqqless", "gtrless", "gtrsim", "guilsingleleft", "guilsingleright", "gujaratinumerals", "gurmurkhinumerals", "hairline", "hairspace", "halflinestrut", "halfstrut", "halfwaybox", "handletokens", "handwritten", "hangul", "hanzi", "hash", "hat", "hbar", "hboxofvbox", "hboxreference", "hcaron", "hcircumflex", "hdofstring", "headhbox", "headlanguage", "headnumber", "headnumbercontent", "headnumberdistance", "headnumberwidth", "headreferenceattributes", "headsetupspacing", "headtext", "headtextcontent", "headtextdistance", "headtexts", "headtextwidth", "headvbox", "headwidth", "heartsuit", "hebrewAlef", "hebrewAyin", "hebrewBet", "hebrewDalet", "hebrewGimel", "hebrewHe", "hebrewHet", "hebrewKaf", "hebrewKaffinal", "hebrewLamed", "hebrewMem", "hebrewMemfinal", "hebrewNun", "hebrewNunfinal", "hebrewPe", "hebrewPefinal", "hebrewQof", "hebrewResh", "hebrewSamekh", "hebrewShin", "hebrewTav", "hebrewTet", "hebrewTsadi", "hebrewTsadifinal", "hebrewVav", "hebrewYod", "hebrewZayin", "heightanddepthofstring", "heightofstring", "heightspanningtext", "helptext", "hglue", "hiddenbar", "hiddencitation", "hiddencite", "hideblocks", "high", "highlight", "highordinalstr", "hilo", "himilo", "hl", "hookleftarrow", "hookrightarrow", "horizontalgrowingbar", "horizontalpositionbar", "hpackbox", "hpackedbox", "hphantom", "hpos", "hsizefraction", "hslash", "hsmash", "hsmashbox", "hsmashed", "hspace", "hstroke", "htdpofstring", "htofstring", "hyphen", "hyphenatedcoloredword", "hyphenatedfile", "hyphenatedfilename", "hyphenatedhbox", "hyphenatedpar", "hyphenatedurl", "hyphenatedword", "iacute", "ibox", "ibreve", "icaron", "icircumflex", "ideographichalffillspace", "ideographicspace", "idiaeresis", "idotaccent", "idotbelow", "idoublegrave", "ifassignment", "iff", "ifinobject", "ifinoutputstream", "ifparameters", "iftrialtypesetting", "ignoreimplicitspaces", "ignoretagsinexport", "ignorevalue", "igrave", "ihook", "iiiint", "iiiintop", "iiint", "iiintop", "iint", "iintop", "iinvertedbreve", "ijligature", "imacron", "imaginaryi", "imaginaryj", "imath", "immediatesavetwopassdata", "impliedby", "implies", "imply", "in", "includemenu", "includeversioninfo", "increment", "incrementcounter", "incrementedcounter", "incrementpagenumber", "incrementsubpagenumber", "incrementvalue", "indentation", "index", "infofont", "infofontbold", "inframed", "infty", "infull", "inheritparameter", "inhibitblank", "ininner", "ininneredge", "ininnermargin", "initializeboxstack", "inleft", "inleftedge", "inleftmargin", "inline", "inlinebuffer", "inlinedbox", "inlinemath", "inlinemathematics", "inlinemessage", "inlineordisplaymath", "inlineprettyprintbuffer", "inlinerange", "inmargin", "inmframed", "innerflushshapebox", "inother", "inouter", "inouteredge", "inoutermargin", "input", "inputfilebarename", "inputfilename", "inputfilerealsuffix", "inputfilesuffix", "inputgivenfile", "inright", "inrightedge", "inrightmargin", "insertpages", "installactionhandler", "installactivecharacter", "installanddefineactivecharacter", "installattributestack", "installautocommandhandler", "installautosetuphandler", "installbasicautosetuphandler", "installbasicparameterhandler", "installbottomframerenderer", "installcommandhandler", "installcorenamespace", "installdefinehandler", "installdefinitionset", "installdefinitionsetmember", "installdirectcommandhandler", "installdirectparameterhandler", "installdirectparametersethandler", "installdirectsetuphandler", "installdirectstyleandcolorhandler", "installframedautocommandhandler", "installframedcommandhandler", "installglobalmacrostack", "installlanguage", "installleftframerenderer", "installmacrostack", "installnamespace", "installoutputroutine", "installpagearrangement", "installparameterhandler", "installparameterhashhandler", "installparametersethandler", "installparentinjector", "installrightframerenderer", "installrootparameterhandler", "installsetuphandler", "installsetuponlycommandhandler", "installshipoutmethod", "installsimplecommandhandler", "installsimpleframedcommandhandler", "installstyleandcolorhandler", "installswitchcommandhandler", "installswitchsetuphandler", "installtexdirective", "installtextracker", "installtopframerenderer", "installunitsseparator", "installunitsspace", "installversioninfo", "int", "intclockwise", "integerrounding", "integers", "interactionbar", "interactionbuttons", "interactionmenu", "intercal", "intertext", "intop", "invisibletimes", "invokepageheandler", "iogonek", "iota", "italic", "italicbold", "italiccorrection", "italicface", "item", "items", "itemtag", "itilde", "jcaron", "jcircumflex", "jmath", "jobfilename", "jobfilesuffix", "kap", "kappa", "kcaron", "kcommaaccent", "keepblocks", "keeplinestogether", "keepunwantedspaces", "kerncharacters", "khook", "kkra", "koreancirclenumerals", "koreannumerals", "koreannumeralsc", "koreannumeralsp", "koreanparentnumerals", "lVert", "labellanguage", "labeltext", "labeltexts", "lacute", "lambda", "lambdabar", "land", "langle", "language", "languageCharacters", "languagecharacters", "languagecharwidth", "lastcounter", "lastcountervalue", "lastdigit", "lastlinewidth", "lastnaturalboxdp", "lastnaturalboxht", "lastnaturalboxwd", "lastpredefinedsymbol", "lastrealpage", "lastrealpagenumber", "lastsubcountervalue", "lastsubpage", "lastsubpagenumber", "lasttwodigits", "lastuserpage", "lastuserpagenumber", "lateluacode", "latin", "layeredtext", "layerheight", "layerwidth", "lazysavetaggedtwopassdata", "lazysavetwopassdata", "lbar", "lbox", "lbrace", "lbracket", "lcaron", "lceil", "lcommaaccent", "lcurl", "ldotmiddle", "ldotp", "ldots", "le", "leadsto", "left", "leftaligned", "leftarrow", "leftarrowtail", "leftarrowtriangle", "leftbottombox", "leftbox", "leftdasharrow", "leftguillemot", "leftharpoondown", "leftharpoonup", "lefthbox", "leftheadtext", "leftlabeltext", "leftleftarrows", "leftline", "leftmathlabeltext", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "leftrightarrow", "leftrightarrows", "leftrightarrowtriangle", "leftrightharpoons", "leftrightsquigarrow", "leftskipadaption", "leftsquigarrow", "leftsubguillemot", "leftthreetimes", "lefttopbox", "lefttoright", "lefttorighthbox", "lefttorightvbox", "lefttorightvtop", "leftwavearrow", "leftwhitearrow", "leq", "leqq", "leqslant", "lessapprox", "lessdot", "lesseqgtr", "lesseqqgtr", "lessgtr", "lesssim", "letbeundefined", "letcatcodecommand", "letcscsname", "letcsnamecs", "letcsnamecsname", "letdummyparameter", "letempty", "letgvalue", "letgvalueempty", "letgvalurelax", "letterampersand", "letterat", "letterbackslash", "letterbar", "letterbgroup", "letterclosebrace", "lettercolon", "letterdollar", "letterdoublequote", "letteregroup", "letterescape", "letterexclamationmark", "letterhash", "letterhat", "letterleftbrace", "letterleftbracket", "letterleftparenthesis", "letterless", "lettermore", "letteropenbrace", "letterpercent", "letterquestionmark", "letterrightbrace", "letterrightbracket", "letterrightparenthesis", "lettersinglequote", "letterslash", "letterspacing", "lettertilde", "letterunderscore", "letvalue", "letvalueempty", "letvaluerelax", "lfence", "lfloor", "lgroup", "lhbox", "lhooknwarrow", "lhooksearrow", "limitatefirstline", "limitatelines", "limitatetext", "line", "linebox", "linefeed", "linenote", "linespanningtext", "linethickness", "linterval", "listcitation", "listcite", "listlength", "listnamespaces", "ljligature", "ll", "llangle", "llap", "llbracket", "llcorner", "lll", "llless", "lmoustache", "lnapprox", "lneq", "lneqq", "lnot", "lnsim", "loadanyfile", "loadanyfileonce", "loadbtxdefinitionfile", "loadbtxreplacementfile", "loadcldfile", "loadcldfileonce", "loadfontgoodies", "loadluafile", "loadluafileonce", "loadspellchecklist", "loadtexfile", "loadtexfileonce", "loadtypescriptfile", "localframed", "localframedwithsettings", "localhsize", "localpopbox", "localpopmacro", "localpushbox", "localpushmacro", "localundefine", "locatedfilepath", "locatefilepath", "locfilename", "logo", "lohi", "lointerval", "lomihi", "longleftarrow", "longleftrightarrow", "longmapsfrom", "longmapsto", "longrightarrow", "longrightsquigarrow", "looparrowleft", "looparrowright", "lor", "low", "lowerbox", "lowercased", "lowercasestring", "lowerleftdoubleninequote", "lowerleftsingleninequote", "lowerrightdoubleninequote", "lowerrightsingleninequote", "lozenge", "lparent", "lrcorner", "lrointerval", "lrtbbox", "lstroke", "lt", "ltimes", "ltop", "ltrhbox", "ltrvbox", "ltrvtop", "luaTeX", "luacode", "luaconditional", "luaenvironment", "luaexpanded", "luaexpr", "luafunction", "luajitTeX", "luamajorversion", "luametaTeX", "luaminorversion", "luaparameterset", "luasetup", "luaversion", "lvert", "m", "mLeftarrow", "mLeftrightarrow", "mRightarrow", "mainlanguage", "makecharacteractive", "makerawcommalist", "makestrutofbox", "maltese", "mapfontsize", "mapsdown", "mapsfrom", "mapsto", "mapsup", "margindata", "margintext", "markcontent", "markedpages", "marking", "markinjector", "markpage", "mat", "math", "mathampersand", "mathbf", "mathbi", "mathblackboard", "mathbs", "mathdefault", "mathdollar", "mathdouble", "mathematics", "mathfraktur", "mathfunction", "mathhash", "mathhyphen", "mathit", "mathitalic", "mathlabellanguage", "mathlabeltext", "mathlabeltexts", "mathop", "mathover", "mathpercent", "mathrm", "mathscript", "mathsl", "mathss", "mathtext", "mathtextbf", "mathtextbi", "mathtextbs", "mathtextit", "mathtextsl", "mathtexttf", "mathtf", "mathtriplet", "mathtt", "mathunder", "mathupright", "mathword", "mathwordbf", "mathwordbi", "mathwordbs", "mathwordit", "mathwordsl", "mathwordtf", "maxaligned", "mbox", "mcframed", "measure", "measured", "measuredangle", "measuredeq", "medskip", "medspace", "menubutton", "mequal", "message", "mfence", "mframed", "mfunction", "mfunctionlabeltext", "mhbox", "mho", "mhookleftarrow", "mhookrightarrow", "mid", "midaligned", "middle", "middlealigned", "middlebox", "midhbox", "midsubsentence", "minimalhbox", "minus", "minuscolon", "mirror", "mixedcaps", "mkvibuffer", "mleftarrow", "mleftharpoondown", "mleftharpoonup", "mleftrightarrow", "mleftrightharpoons", "mmapsto", "models", "moduleparameter", "molecule", "mono", "monobold", "mononormal", "month", "monthlong", "monthshort", "mp", "mprandomnumber", "mrel", "mrightarrow", "mrightharpoondown", "mrightharpoonup", "mrightleftharpoons", "mrightoverleftarrow", "mtext", "mtriplerel", "mtwoheadleftarrow", "mtwoheadrightarrow", "mu", "multimap", "nHdownarrow", "nHuparrow", "nLeftarrow", "nLeftrightarrow", "nRightarrow", "nVDash", "nVdash", "nVleftarrow", "nVleftrightarrow", "nVrightarrow", "nabla", "nacute", "namedheadnumber", "namedstructureheadlocation", "namedstructureuservariable", "namedstructurevariable", "namedtaggedlabeltexts", "napostrophe", "napprox", "napproxEq", "narrownobreakspace", "nasymp", "natural", "naturalhbox", "naturalhpack", "naturalnumbers", "naturaltpack", "naturalvbox", "naturalvcenter", "naturalvpack", "naturalvtop", "naturalwd", "ncaron", "ncommaaccent", "ncong", "ncurl", "ndivides", "ne", "nearrow", "neg", "negatecolorbox", "negated", "negativesign", "negemspace", "negenspace", "negthinspace", "neng", "neq", "nequiv", "neswarrow", "newattribute", "newcatcodetable", "newcounter", "newevery", "newfrenchspacing", "newmode", "newsignal", "newsystemmode", "nexists", "nextbox", "nextboxdp", "nextboxht", "nextboxhtdp", "nextboxwd", "nextcounter", "nextcountervalue", "nextdepth", "nextparagraphs", "nextrealpage", "nextrealpagenumber", "nextsubcountervalue", "nextsubpage", "nextsubpagenumber", "nextuserpage", "nextuserpagenumber", "ngeq", "ngrave", "ngtr", "ngtrless", "ngtrsim", "ni", "nihongo", "nin", "njligature", "nleftarrow", "nleftrightarrow", "nleq", "nless", "nlessgtr", "nlesssim", "nmid", "nni", "nobar", "nobreakspace", "nocap", "nocharacteralign", "nocitation", "nocite", "nodetostring", "noffigurepages", "noflines", "noflocalfloats", "noheaderandfooterlines", "noheightstrut", "noindentation", "noitem", "nonfrenchspacing", "nonmathematics", "normal", "normalboldface", "normalframedwithsettings", "normalitalicface", "normalizebodyfontsize", "normalizedfontsize", "normalizefontdepth", "normalizefontheight", "normalizefontline", "normalizefontwidth", "normalizetextdepth", "normalizetextheight", "normalizetextline", "normalizetextwidth", "normalslantedface", "normaltypeface", "nospace", "not", "note", "notesymbol", "notin", "notopandbottomlines", "notragged", "nowns", "nparallel", "nprec", "npreccurlyeq", "nrightarrow", "nsim", "nsimeq", "nsqsubseteq", "nsqsupseteq", "nsubset", "nsubseteq", "nsucc", "nsucccurlyeq", "nsupset", "nsupseteq", "ntilde", "ntimes", "ntriangleleft", "ntrianglelefteq", "ntriangleright", "ntrianglerighteq", "nu", "numberofpoints", "numbers", "nvDash", "nvdash", "nvleftarrow", "nvleftrightarrow", "nvrightarrow", "nwarrow", "nwsearrow", "oacute", "obeydepth", "objectdepth", "objectheight", "objectmargin", "objectwidth", "obox", "obreve", "ocaron", "ocircumflex", "ocircumflexacute", "ocircumflexdotbelow", "ocircumflexgrave", "ocircumflexhook", "ocircumflextilde", "odiaeresis", "odiaeresismacron", "odot", "odotaccent", "odotaccentmacron", "odotbelow", "odoublegrave", "oeligature", "offset", "offsetbox", "ograve", "ohm", "ohook", "ohorn", "ohornacute", "ohorndotbelow", "ohorngrave", "ohornhook", "ohorntilde", "ohungarumlaut", "oiiint", "oiint", "oint", "ointclockwise", "ointctrclockwise", "oinvertedbreve", "omacron", "omega", "omicron", "ominus", "onedigitrounding", "oneeighth", "onefifth", "onehalf", "onequarter", "onesixth", "onesuperior", "onethird", "oogonek", "oogonekmacron", "operatorlanguage", "operatortext", "oplus", "ordfeminine", "ordinaldaynumber", "ordinalstr", "ordmasculine", "ornamenttext", "oslash", "ostroke", "ostrokeacute", "otilde", "otildemacron", "otimes", "outputfilename", "outputstreambox", "outputstreamcopy", "outputstreamunvbox", "outputstreamunvcopy", "over", "overbar", "overbars", "overbarunderbar", "overbrace", "overbraceunderbrace", "overbracket", "overbracketunderbracket", "overlaybutton", "overlaycolor", "overlaydepth", "overlayfigure", "overlayheight", "overlayimage", "overlaylinecolor", "overlaylinewidth", "overlayoffset", "overlayrollbutton", "overlaywidth", "overleftarrow", "overloaderror", "overparent", "overparentunderparent", "overrightarrow", "overset", "overstrike", "overstrikes", "owns", "page", "pagearea", "pagebreak", "pagefigure", "pageinjection", "pagenumber", "pagereference", "pagestaterealpage", "pagestaterealpageorder", "paletsize", "paragraphmark", "parallel", "part", "partial", "pdfTeX", "pdfactualtext", "pdfbackendactualtext", "pdfbackendcurrentresources", "pdfbackendsetcatalog", "pdfbackendsetcolorspace", "pdfbackendsetextgstate", "pdfbackendsetinfo", "pdfbackendsetname", "pdfbackendsetpageattribute", "pdfbackendsetpageresource", "pdfbackendsetpagesattribute", "pdfbackendsetpattern", "pdfbackendsetshade", "pdfcolor", "pdfeTeX", "percent", "percentdimen", "periodcentered", "periods", "permitcaretescape", "permitcircumflexescape", "permitspacesbetweengroups", "perp", "persiandecimals", "persiandecimalseparator", "persiannumerals", "persianthousandsseparator", "perthousand", "phantom", "phantombox", "phi", "phook", "pi", "pickupgroupedcommand", "pitchfork", "placeattachments", "placebookmarks", "placebtxrendering", "placechemical", "placecitation", "placecombinedlist", "placecomments", "placecontent", "placecurrentformulanumber", "placedbox", "placefigure", "placefloat", "placefloatwithsetups", "placefootnotes", "placeformula", "placeframed", "placegraphic", "placeheadnumber", "placeheadtext", "placehelp", "placeindex", "placeinitial", "placeintermezzo", "placelayer", "placelayeredtext", "placelegend", "placelist", "placelistofabbreviations", "placelistofchemicals", "placelistoffigures", "placelistofgraphics", "placelistofintermezzi", "placelistoflogos", "placelistofpublications", "placelistofsorts", "placelistofsynonyms", "placelistoftables", "placelocalfootnotes", "placelocalnotes", "placement", "placenamedfloat", "placenamedformula", "placenotes", "placeongrid", "placeontopofeachother", "placepagenumber", "placepairedbox", "placeparallel", "placerawheaddata", "placerawheadnumber", "placerawheadtext", "placerawlist", "placeregister", "placerenderingwindow", "placesidebyside", "placesubformula", "placetable", "pm", "popattribute", "popmacro", "popmode", "popsystemmode", "position", "positionoverlay", "positionregionoverlay", "positivesign", "postponenotes", "prec", "precapprox", "preccurlyeq", "preceq", "preceqq", "precnapprox", "precneq", "precneqq", "precnsim", "precsim", "predefinedfont", "predefinefont", "predefinesymbol", "prefixedpagenumber", "prefixlanguage", "prefixtext", "prependetoks", "prependgvalue", "prependtocommalist", "prependtoks", "prependtoksonce", "prependvalue", "prerollblank", "presetbtxlabeltext", "presetdocument", "presetfieldsymbols", "presetheadtext", "presetlabeltext", "presetmathlabeltext", "presetoperatortext", "presetprefixtext", "presetsuffixtext", "presettaglabeltext", "presetunittext", "pretocommalist", "prettyprintbuffer", "prevcounter", "prevcountervalue", "preventmode", "prevrealpage", "prevrealpagenumber", "prevsubcountervalue", "prevsubpage", "prevsubpagenumber", "prevuserpage", "prevuserpagenumber", "prime", "primes", "procent", "processMPbuffer", "processMPfigurefile", "processaction", "processallactionsinset", "processassignlist", "processassignmentcommand", "processassignmentlist", "processbetween", "processblocks", "processbodyfontenvironmentlist", "processcolorcomponents", "processcommacommand", "processcommalist", "processcommalistwithparameters", "processcontent", "processfile", "processfilemany", "processfilenone", "processfileonce", "processfirstactioninset", "processisolatedchars", "processisolatedwords", "processlinetablebuffer", "processlinetablefile", "processlist", "processmonth", "processranges", "processseparatedlist", "processtexbuffer", "processtokens", "processuntil", "processxtablebuffer", "processyear", "prod", "product", "profiledbox", "profilegivenbox", "program", "project", "propto", "pseudoMixedCapped", "pseudoSmallCapped", "pseudoSmallcapped", "pseudosmallcapped", "psi", "punctuationspace", "purenumber", "pushattribute", "pushbutton", "pushmacro", "pushmode", "pushoutputstream", "pushsystemmode", "putboxincache", "putnextboxincache", "qquad", "quad", "quadrupleprime", "quads", "quarterstrut", "questiondown", "questionedeq", "quitcommalist", "quitprevcommalist", "quittypescriptscanning", "quotation", "quote", "quotedbl", "quotedblbase", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "quotesingle", "quotesinglebase", "rVert", "racute", "raggedbottom", "raggedcenter", "raggedleft", "raggedright", "raggedwidecenter", "raisebox", "randomizetext", "randomnumber", "rangle", "rationals", "rawcounter", "rawcountervalue", "rawdate", "rawdoifelseinset", "rawdoifinset", "rawdoifinsetelse", "rawgetparameters", "rawprocessaction", "rawprocesscommacommand", "rawprocesscommalist", "rawstructurelistuservariable", "rawsubcountervalue", "rbox", "rbrace", "rbracket", "rcaron", "rceil", "rcommaaccent", "rdoublegrave", "readfile", "readfixfile", "readjobfile", "readlocfile", "readsetfile", "readsysfile", "readtexfile", "readxmlfile", "realSmallCapped", "realSmallcapped", "realpagenumber", "reals", "realsmallcapped", "recursedepth", "recurselevel", "recursestring", "redoconvertfont", "ref", "reference", "referenceprefix", "referring", "registerattachment", "registerctxluafile", "registered", "registerexternalfigure", "registerfontclass", "registerhyphenationexception", "registerhyphenationpattern", "registermenubuttons", "registersort", "registersynonym", "registerunit", "regular", "relatemarking", "relateparameterhandlers", "relaxvalueifundefined", "relbar", "remainingcharacters", "remark", "removebottomthings", "removedepth", "removefromcommalist", "removelastskip", "removelastspace", "removemarkedcontent", "removepunctuation", "removesubstring", "removetoks", "removeunwantedspaces", "repeathead", "replacefeature", "replaceincommalist", "replaceword", "rescan", "rescanwithsetup", "resetMPdrawing", "resetMPenvironment", "resetMPinstance", "resetallattributes", "resetandaddfeature", "resetbar", "resetboxesincache", "resetbreakpoints", "resetbuffer", "resetcharacteralign", "resetcharacterkerning", "resetcharacterspacing", "resetcharacterstripping", "resetcollector", "resetcounter", "resetdigitsmanipulation", "resetdirection", "resetfeature", "resetflag", "resetfontcolorsheme", "resetfontfallback", "resetfontsolution", "resethyphenationfeatures", "resetinjector", "resetinteractionmenu", "resetitaliccorrection", "resetlayer", "resetlocalfloats", "resetmarker", "resetmarking", "resetmode", "resetpagenumber", "resetparallel", "resetpath", "resetpenalties", "resetperiodkerning", "resetprofile", "resetrecurselevel", "resetreference", "resetreplacement", "resetscript", "resetsetups", "resetshownsynonyms", "resetsubpagenumber", "resetsymbolset", "resetsystemmode", "resettimer", "resettokenlist", "resettrackers", "resettrialtypesetting", "resetusedsortings", "resetusedsynonyms", "resetuserpagenumber", "resetvalue", "resetvisualizers", "reshapebox", "resolvedglyphdirect", "resolvedglyphstyled", "restartcounter", "restorebox", "restorecatcodes", "restorecounter", "restorecurrentattributes", "restoreendofline", "restoreglobalbodyfont", "restriction", "reusableMPgraphic", "reuseMPgraphic", "reuserandomseed", "reverseddoubleprime", "reversedprime", "reversedtripleprime", "reversehbox", "reversehpack", "reversetpack", "reversevbox", "reversevpack", "reversevtop", "revivefeature", "rfence", "rfloor", "rgroup", "rhbox", "rho", "rhooknearrow", "rhookswarrow", "right", "rightaligned", "rightangle", "rightarrow", "rightarrowbar", "rightarrowtail", "rightarrowtriangle", "rightbottombox", "rightbox", "rightdasharrow", "rightguillemot", "rightharpoondown", "rightharpoonup", "righthbox", "rightheadtext", "rightlabeltext", "rightleftarrows", "rightleftharpoons", "rightline", "rightmathlabeltext", "rightorleftpageaction", "rightpageorder", "rightrightarrows", "rightskipadaption", "rightsquigarrow", "rightsubguillemot", "rightthreearrows", "rightthreetimes", "righttoleft", "righttolefthbox", "righttoleftvbox", "righttoleftvtop", "righttopbox", "rightwavearrow", "rightwhitearrow", "ring", "rinterval", "rinvertedbreve", "risingdotseq", "rlap", "rlointerval", "rmoustache", "rneq", "robustaddtocommalist", "robustdoifelseinset", "robustdoifinsetelse", "robustpretocommalist", "rointerval", "rollbutton", "roman", "romanC", "romanD", "romanI", "romanII", "romanIII", "romanIV", "romanIX", "romanL", "romanM", "romanV", "romanVI", "romanVII", "romanVIII", "romanX", "romanXI", "romanXII", "romanc", "romand", "romani", "romanii", "romaniii", "romaniv", "romanix", "romanl", "romanm", "romannumerals", "romanv", "romanvi", "romanvii", "romanviii", "romanx", "romanxi", "romanxii", "rootradical", "rotate", "rparent", "rrangle", "rrbracket", "rrointerval", "rtimes", "rtlhbox", "rtlvbox", "rtlvtop", "rtop", "ruby", "ruledhbox", "ruledhpack", "ruledmbox", "ruledtopv", "ruledtpack", "ruledvbox", "ruledvpack", "ruledvtop", "runMPbuffer", "runninghbox", "rvert", "sacute", "safechar", "samplefile", "sans", "sansbold", "sansnormal", "sansserif", "savebox", "savebtxdataset", "savebuffer", "savecounter", "savecurrentattributes", "savenormalmeaning", "savetaggedtwopassdata", "savetwopassdata", "sbox", "scale", "scaron", "scedilla", "schwa", "schwahook", "scircumflex", "scommaaccent", "screen", "searrow", "secondoffivearguments", "secondoffourarguments", "secondofsixarguments", "secondofthreearguments", "secondofthreeunexpanded", "secondoftwoarguments", "secondoftwounexpanded", "section", "sectionmark", "seeindex", "select", "selectblocks", "serializecommalist", "serializedcommalist", "serif", "serifbold", "serifnormal", "setJSpreamble", "setMPlayer", "setMPpositiongraphic", "setMPpositiongraphicrange", "setMPtext", "setMPvariable", "setMPvariables", "setautopagestaterealpageno", "setbar", "setbigbodyfont", "setboxllx", "setboxlly", "setbreakpoints", "setcapstrut", "setcatcodetable", "setcharacteralign", "setcharacteraligndetail", "setcharactercasing", "setcharactercleaning", "setcharacterkerning", "setcharacterspacing", "setcharacterstripping", "setcharstrut", "setcollector", "setcolormodell", "setcounter", "setcounterown", "setcurrentfontclass", "setdataset", "setdefaultpenalties", "setdigitsmanipulation", "setdirection", "setdocumentargument", "setdocumentargumentdefault", "setdocumentfilename", "setdummyparameter", "setelementexporttag", "setemeasure", "setevalue", "setevariable", "setevariables", "setfirstline", "setfirstpasscharacteralign", "setflag", "setfont", "setfontcolorsheme", "setfontfeature", "setfontsolution", "setfontstrut", "setglobalscript", "setgmeasure", "setgvalue", "setgvariable", "setgvariables", "sethboxregister", "sethyphenatedurlafter", "sethyphenatedurlbefore", "sethyphenatedurlnormal", "sethyphenationfeatures", "setinitial", "setinjector", "setinteraction", "setinterfacecommand", "setinterfaceconstant", "setinterfaceelement", "setinterfacemessage", "setinterfacevariable", "setinternalrendering", "setitaliccorrection", "setlayer", "setlayerframed", "setlayertext", "setlinefiller", "setlocalhsize", "setlocalscript", "setmainbodyfont", "setmainparbuilder", "setmarker", "setmarking", "setmathstyle", "setmeasure", "setmessagetext", "setminus", "setmode", "setnostrut", "setnote", "setnotetext", "setobject", "setoldstyle", "setpagereference", "setpagestate", "setpagestaterealpageno", "setpenalties", "setpercentdimen", "setperiodkerning", "setposition", "setpositionbox", "setpositiondata", "setpositiondataplus", "setpositiononly", "setpositionplus", "setpositionstrut", "setprofile", "setrandomseed", "setreference", "setreferencedobject", "setregisterentry", "setreplacement", "setrigidcolumnbalance", "setrigidcolumnhsize", "setscript", "setsecondpasscharacteralign", "setsectionblock", "setsimplecolumnshsize", "setsmallbodyfont", "setsmallcaps", "setstackbox", "setstructurepageregister", "setstrut", "setsuperiors", "setsystemmode", "settabular", "settaggedmetadata", "settestcrlf", "settextcontent", "settightobject", "settightreferencedobject", "settightstrut", "settightunreferencedobject", "settokenlist", "settrialtypesetting", "setuevalue", "setugvalue", "setunreferencedobject", "setup", "setupMPgraphics", "setupMPinstance", "setupMPpage", "setupMPvariables", "setupTABLE", "setupTEXpage", "setupalign", "setupalternativestyles", "setuparranging", "setupattachment", "setupattachments", "setupbackend", "setupbackground", "setupbackgrounds", "setupbar", "setupbars", "setupblackrules", "setupblank", "setupbleeding", "setupblock", "setupbodyfont", "setupbookmark", "setupbottom", "setupbottomtexts", "setupbtx", "setupbtxdataset", "setupbtxlabeltext", "setupbtxlist", "setupbtxregister", "setupbtxrendering", "setupbuffer", "setupbutton", "setupcapitals", "setupcaption", "setupcaptions", "setupcharacteralign", "setupcharacterkerning", "setupcharacterspacing", "setupchemical", "setupchemicalframed", "setupclipping", "setupcollector", "setupcolor", "setupcolors", "setupcolumns", "setupcolumnset", "setupcolumnsetarea", "setupcolumnsetareatext", "setupcolumnsetlines", "setupcolumnsetspan", "setupcolumnsetstart", "setupcombination", "setupcombinedlist", "setupcomment", "setupcontent", "setupcounter", "setupdataset", "setupdelimitedtext", "setupdescription", "setupdirections", "setupdocument", "setupeffect", "setupenumeration", "setupenumerations", "setupenv", "setupexport", "setupexternalfigure", "setupexternalsoundtracks", "setupfacingfloat", "setupfield", "setupfieldbody", "setupfieldcategory", "setupfieldcontentframed", "setupfieldlabelframed", "setupfields", "setupfieldtotalframed", "setupfiller", "setupfillinlines", "setupfillinrules", "setupfirstline", "setupfittingpage", "setupfloat", "setupfloatframed", "setupfloats", "setupfloatsplitting", "setupfontexpansion", "setupfontprotrusion", "setupfonts", "setupfontsolution", "setupfooter", "setupfootertexts", "setupfootnotes", "setupforms", "setupformula", "setupformulae", "setupformulaframed", "setupframed", "setupframedcontent", "setupframedtable", "setupframedtablecolumn", "setupframedtablerow", "setupframedtext", "setupframedtexts", "setupglobalreferenceprefix", "setuphead", "setupheadalternative", "setupheader", "setupheadertexts", "setupheadnumber", "setupheads", "setupheadtext", "setuphelp", "setuphigh", "setuphighlight", "setuphyphenation", "setuphyphenmark", "setupindentedtext", "setupindenting", "setupindex", "setupinitial", "setupinsertion", "setupinteraction", "setupinteractionbar", "setupinteractionmenu", "setupinteractionscreen", "setupinterlinespace", "setupitaliccorrection", "setupitemgroup", "setupitemizations", "setupitemize", "setupitems", "setuplabel", "setuplabeltext", "setuplanguage", "setuplayer", "setuplayeredtext", "setuplayout", "setuplayouttext", "setuplegend", "setuplinefiller", "setuplinefillers", "setuplinenote", "setuplinenumbering", "setuplines", "setuplinetable", "setuplinewidth", "setuplist", "setuplistalternative", "setuplistextra", "setuplocalfloats", "setuplocalinterlinespace", "setuplow", "setuplowhigh", "setuplowmidhigh", "setupmakeup", "setupmarginblock", "setupmargindata", "setupmarginframed", "setupmarginrule", "setupmarginrules", "setupmarking", "setupmathalignment", "setupmathcases", "setupmathematics", "setupmathfence", "setupmathfraction", "setupmathfractions", "setupmathframed", "setupmathlabeltext", "setupmathmatrix", "setupmathornament", "setupmathradical", "setupmathstackers", "setupmathstyle", "setupmixedcolumns", "setupmodule", "setupnarrower", "setupnotation", "setupnotations", "setupnote", "setupnotes", "setupoffset", "setupoffsetbox", "setupoperatortext", "setupoppositeplacing", "setupoutputroutine", "setuppagechecker", "setuppagecolumns", "setuppagecomment", "setuppageinjection", "setuppageinjectionalternative", "setuppagenumber", "setuppagenumbering", "setuppageshift", "setuppagestate", "setuppagetransitions", "setuppairedbox", "setuppalet", "setuppaper", "setuppapersize", "setupparagraph", "setupparagraphintro", "setupparagraphnumbering", "setupparagraphs", "setupparallel", "setupperiodkerning", "setupperiods", "setupplacement", "setuppositionbar", "setuppositioning", "setupprefixtext", "setupprocessor", "setupprofile", "setupprograms", "setupquotation", "setupquote", "setuprealpagenumber", "setupreferenceformat", "setupreferenceprefix", "setupreferencestructureprefix", "setupreferencing", "setupregister", "setupregisters", "setuprenderingwindow", "setuprotate", "setupruby", "setups", "setupscale", "setupscript", "setupscripts", "setupsectionblock", "setupselector", "setupshift", "setupsidebar", "setupsorting", "setupspacing", "setupspellchecking", "setupstartstop", "setupstretched", "setupstruts", "setupstyle", "setupsubformula", "setupsubformulas", "setupsubpagenumber", "setupsuffixtext", "setupsymbols", "setupsymbolset", "setupsynctex", "setupsynonyms", "setuptables", "setuptabulate", "setuptabulation", "setuptagging", "setuptaglabeltext", "setuptext", "setuptextbackground", "setuptextflow", "setuptextnote", "setuptextrules", "setuptexttexts", "setupthinrules", "setuptolerance", "setuptooltip", "setuptop", "setuptoptexts", "setuptype", "setuptyping", "setupunit", "setupunittext", "setupurl", "setupuserdata", "setupuserdataalternative", "setupuserpagenumber", "setupversion", "setupviewerlayer", "setupvspacing", "setupwhitespace", "setupwithargument", "setupwithargumentswapped", "setupxml", "setupxtable", "setuvalue", "setuxvalue", "setvalue", "setvariable", "setvariables", "setvboxregister", "setvisualizerfont", "setvtopregister", "setwidthof", "setxmeasure", "setxvalue", "setxvariable", "setxvariables", "seveneighths", "sfrac", "shapedhbox", "sharp", "shiftbox", "shiftdown", "shiftup", "showallmakeup", "showattributes", "showbodyfont", "showbodyfontenvironment", "showboxes", "showbtxdatasetauthors", "showbtxdatasetcompleteness", "showbtxdatasetfields", "showbtxfields", "showbtxhashedauthors", "showbtxtables", "showchardata", "showcharratio", "showcolor", "showcolorbar", "showcolorcomponents", "showcolorgroup", "showcolorset", "showcolorstruts", "showcounter", "showdirectives", "showdirsinmargin", "showedebuginfo", "showexperiments", "showfont", "showfontdata", "showfontexpansion", "showfontitalics", "showfontkerns", "showfontparameters", "showfontstrip", "showfontstyle", "showframe", "showglyphdata", "showglyphs", "showgrid", "showgridsnapping", "showhelp", "showhyphenationtrace", "showhyphens", "showinjector", "showjustification", "showkerning", "showlayout", "showlayoutcomponents", "showligature", "showligatures", "showlogcategories", "showmakeup", "showmargins", "showmessage", "showminimalbaseline", "shownextbox", "showotfcomposition", "showpalet", "showparentchain", "showprint", "showsetups", "showsetupsdefinition", "showstruts", "showsymbolset", "showtimer", "showtokens", "showtrackers", "showvalue", "showvariable", "showwarning", "sigma", "signalrightpage", "sim", "simeq", "simplealignedbox", "simplealignedboxplus", "simplealignedspreadbox", "simplegroupedcommand", "simplereversealignedbox", "simplereversealignedboxplus", "singalcharacteralign", "singlebond", "singleverticalbar", "sixperemspace", "sixthofsixarguments", "slanted", "slantedbold", "slantedface", "slash", "slicepages", "slong", "slovenianNumerals", "sloveniannumerals", "small", "smallbodyfont", "smallbold", "smallbolditalic", "smallboldslanted", "smallcappedcharacters", "smallcappedromannumerals", "smallcaps", "smaller", "smallitalicbold", "smallnormal", "smallskip", "smallslanted", "smallslantedbold", "smalltype", "smash", "smashbox", "smashboxed", "smashedhbox", "smashedvbox", "smile", "snaptogrid", "softhyphen", "solidus", "someheadnumber", "somekindoftab", "someline", "somelocalfloat", "somenamedheadnumber", "someplace", "somewhere", "space", "spaceddigits", "spaceddigitsmethod", "spaceddigitsseparator", "spaceddigitssymbol", "spadesuit", "spanishNumerals", "spanishnumerals", "speech", "sphericalangle", "splitatasterisk", "splitatcolon", "splitatcolons", "splitatcomma", "splitatperiod", "splitdfrac", "splitfilename", "splitfloat", "splitfrac", "splitoffbase", "splitofffull", "splitoffkind", "splitoffname", "splitoffpath", "splitoffroot", "splitofftokens", "splitofftype", "splitstring", "spreadhbox", "sqcap", "sqcup", "sqrt", "sqsubset", "sqsubseteq", "sqsubsetneq", "sqsupset", "sqsupseteq", "sqsupsetneq", "square", "squaredots", "ssharp", "stackrel", "stackscripts", "star", "stareq", "startJScode", "startJSpreamble", "startLUA", "startMP", "startMPclip", "startMPcode", "startMPdefinitions", "startMPdrawing", "startMPenvironment", "startMPextensions", "startMPinclusions", "startMPinitializations", "startMPpage", "startMPpositiongraphic", "startMPpositionmethod", "startMPrun", "startPARSEDXML", "startTABLE", "startTABLEbody", "startTABLEfoot", "startTABLEhead", "startTABLEnext", "startTC", "startTD", "startTDs", "startTEX", "startTEXpage", "startTH", "startTN", "startTR", "startTRs", "startTX", "startTY", "startXML", "startalign", "startalignment", "startallmodes", "startappendices", "startarrangedpages", "startaside", "startattachment", "startbackground", "startbackmatter", "startbar", "startbbordermatrix", "startbitmapimage", "startblockquote", "startbodymatter", "startbordermatrix", "startboxedcolumns", "startbtxlabeltext", "startbtxrenderingdefinitions", "startbuffer", "startcases", "startcatcodetable", "startcenteraligned", "startchapter", "startcharacteralign", "startcheckedfences", "startchemical", "startchemicaltext", "startcollect", "startcollecting", "startcolor", "startcolorintent", "startcoloronly", "startcolorset", "startcolumns", "startcolumnset", "startcolumnsetspan", "startcombination", "startcomment", "startcomponent", "startcontextcode", "startcontextdefinitioncode", "startctxfunction", "startctxfunctiondefinition", "startcurrentcolor", "startcurrentlistentrywrapper", "startdelimited", "startdelimitedtext", "startdisplaymath", "startdmath", "startdocument", "starteffect", "startelement", "startembeddedxtable", "startendnote", "startendofline", "startenvironment", "startexceptions", "startexpanded", "startexpandedcollect", "startextendedcatcodetable", "startexternalfigurecollection", "startfacingfloat", "startfact", "startfigure", "startfiguretext", "startfittingpage", "startfixed", "startfloatcombination", "startfont", "startfontclass", "startfontsolution", "startfootnote", "startformula", "startformulas", "startframed", "startframedcell", "startframedcontent", "startframedrow", "startframedtable", "startframedtext", "startfrontmatter", "startgoto", "startgraphictext", "startgridsnapping", "starthanging", "starthbox", "starthboxestohbox", "starthboxregister", "starthead", "startheadtext", "starthelptext", "starthiding", "starthighlight", "starthyphenation", "startimath", "startindentation", "startindentedtext", "startinteraction", "startinteractionmenu", "startinterface", "startintermezzotext", "startintertext", "startitem", "startitemgroup", "startitemgroupcolumns", "startitemize", "startknockout", "startlabeltext", "startlanguage", "startlayout", "startleftaligned", "startlegend", "startline", "startlinealignment", "startlinecorrection", "startlinefiller", "startlinenote", "startlinenumbering", "startlines", "startlinetable", "startlinetablebody", "startlinetablecell", "startlinetablehead", "startlocalfootnotes", "startlocalheadsetup", "startlocallinecorrection", "startlocalnotes", "startlocalsetups", "startlua", "startluacode", "startluaparameterset", "startluasetups", "startmakeup", "startmarginblock", "startmarginrule", "startmarkedcontent", "startmarkpages", "startmathalignment", "startmathcases", "startmathlabeltext", "startmathmatrix", "startmathmode", "startmathstyle", "startmatrices", "startmatrix", "startmaxaligned", "startmdformula", "startmidaligned", "startmiddlealigned", "startmiddlemakeup", "startmixedcolumns", "startmode", "startmodeset", "startmodule", "startmoduletestsection", "startmpformula", "startnamedsection", "startnamedsubformulas", "startnarrow", "startnarrower", "startnegative", "startnicelyfilledbox", "startnointerference", "startnotallmodes", "startnotext", "startnotmode", "startoperatortext", "startopposite", "startoutputstream", "startoverlay", "startoverprint", "startpacked", "startpagecolumns", "startpagecomment", "startpagefigure", "startpagelayout", "startpagemakeup", "startpar", "startparagraph", "startparagraphs", "startparagraphscell", "startparbuilder", "startpart", "startpath", "startplacechemical", "startplacefigure", "startplacefloat", "startplaceformula", "startplacegraphic", "startplaceintermezzo", "startplacelegend", "startplacepairedbox", "startplacetable", "startpositioning", "startpositionoverlay", "startpositive", "startpostponing", "startpostponingnotes", "startprefixtext", "startprocessassignmentcommand", "startprocessassignmentlist", "startprocesscommacommand", "startprocesscommalist", "startproduct", "startproject", "startprotect", "startprotectedcolors", "startpublication", "startpunctuation", "startquotation", "startquote", "startrandomized", "startrandomseed", "startrawsetups", "startreadingfile", "startreferenceprefix", "startregime", "startregister", "startreusableMPgraphic", "startrightaligned", "startruby", "startscript", "startsdformula", "startsection", "startsectionblock", "startsectionblockenvironment", "startsectionlevel", "startsetups", "startshapebox", "startshift", "startsidebar", "startsimplecolumns", "startspecialitem", "startspeech", "startspformula", "startsplitformula", "startsplittext", "startspread", "startstandardmakeup", "startstaticMPfigure", "startstaticMPgraphic", "startstrictinspectnextcharacter", "startstructurepageregister", "startstrut", "startstyle", "startsubformulas", "startsubject", "startsubjectlevel", "startsubsection", "startsubsentence", "startsubstack", "startsubsubject", "startsubsubsection", "startsubsubsubject", "startsubsubsubsection", "startsubsubsubsubject", "startsubsubsubsubsection", "startsubsubsubsubsubject", "startsuffixtext", "startsymbolset", "starttable", "starttablehead", "starttables", "starttabletail", "starttabletext", "starttabulate", "starttabulatehead", "starttabulatetail", "starttagged", "starttaglabeltext", "starttexcode", "starttexdefinition", "starttext", "starttextbackground", "starttextbackgroundmanual", "starttextcolor", "starttextcolorintent", "starttextflow", "starttextmakeup", "starttextrule", "starttitle", "starttokenlist", "starttokens", "starttransparent", "starttypescript", "starttypescriptcollection", "starttyping", "startuniqueMPgraphic", "startuniqueMPpagegraphic", "startunittext", "startunpacked", "startusableMPgraphic", "startuseMPgraphic", "startusemathstyleparameter", "startuserdata", "startusingbtxspecification", "startvbox", "startvboxregister", "startvboxtohbox", "startvboxtohboxseparator", "startviewerlayer", "startvtop", "startvtopregister", "startxcell", "startxcellgroup", "startxcolumn", "startxgroup", "startxmldisplayverbatim", "startxmlinlineverbatim", "startxmlraw", "startxmlsetups", "startxrow", "startxrowgroup", "startxtable", "startxtablebody", "startxtablefoot", "startxtablehead", "startxtablenext", "stligature", "stopJScode", "stopJSpreamble", "stopLUA", "stopMP", "stopMPclip", "stopMPcode", "stopMPdefinitions", "stopMPdrawing", "stopMPenvironment", "stopMPextensions", "stopMPinclusions", "stopMPinitializations", "stopMPpage", "stopMPpositiongraphic", "stopMPpositionmethod", "stopMPrun", "stopPARSEDXML", "stopTABLE", "stopTABLEbody", "stopTABLEfoot", "stopTABLEhead", "stopTABLEnext", "stopTC", "stopTD", "stopTDs", "stopTEX", "stopTEXpage", "stopTH", "stopTN", "stopTR", "stopTRs", "stopTX", "stopTY", "stopXML", "stopalign", "stopalignment", "stopallmodes", "stopappendices", "stoparrangedpages", "stopaside", "stopattachment", "stopbackground", "stopbackmatter", "stopbar", "stopbbordermatrix", "stopbitmapimage", "stopblockquote", "stopbodymatter", "stopbordermatrix", "stopboxedcolumns", "stopbtxlabeltext", "stopbtxrenderingdefinitions", "stopbuffer", "stopcases", "stopcatcodetable", "stopcenteraligned", "stopchapter", "stopcharacteralign", "stopcheckedfences", "stopchemical", "stopchemicaltext", "stopcollect", "stopcollecting", "stopcolor", "stopcolorintent", "stopcoloronly", "stopcolorset", "stopcolumns", "stopcolumnset", "stopcolumnsetspan", "stopcombination", "stopcomment", "stopcomponent", "stopcontextcode", "stopcontextdefinitioncode", "stopctxfunction", "stopctxfunctiondefinition", "stopcurrentcolor", "stopcurrentlistentrywrapper", "stopdelimited", "stopdelimitedtext", "stopdisplaymath", "stopdmath", "stopdocument", "stopeffect", "stopelement", "stopembeddedxtable", "stopendnote", "stopendofline", "stopenvironment", "stopexceptions", "stopexpanded", "stopexpandedcollect", "stopextendedcatcodetable", "stopexternalfigurecollection", "stopfacingfloat", "stopfact", "stopfigure", "stopfiguretext", "stopfittingpage", "stopfixed", "stopfloatcombination", "stopfont", "stopfontclass", "stopfontsolution", "stopfootnote", "stopformula", "stopformulas", "stopframed", "stopframedcell", "stopframedcontent", "stopframedrow", "stopframedtable", "stopframedtext", "stopfrontmatter", "stopgoto", "stopgraphictext", "stopgridsnapping", "stophanging", "stophbox", "stophboxestohbox", "stophboxregister", "stophead", "stopheadtext", "stophelptext", "stophiding", "stophighlight", "stophyphenation", "stopimath", "stopindentation", "stopindentedtext", "stopinteraction", "stopinteractionmenu", "stopinterface", "stopintermezzotext", "stopintertext", "stopitem", "stopitemgroup", "stopitemgroupcolumns", "stopitemize", "stopknockout", "stoplabeltext", "stoplanguage", "stoplayout", "stopleftaligned", "stoplegend", "stopline", "stoplinealignment", "stoplinecorrection", "stoplinefiller", "stoplinenote", "stoplinenumbering", "stoplines", "stoplinetable", "stoplinetablebody", "stoplinetablecell", "stoplinetablehead", "stoplocalfootnotes", "stoplocalheadsetup", "stoplocallinecorrection", "stoplocalnotes", "stoplocalsetups", "stoplua", "stopluacode", "stopluaparameterset", "stopluasetups", "stopmakeup", "stopmarginblock", "stopmarginrule", "stopmarkedcontent", "stopmarkpages", "stopmathalignment", "stopmathcases", "stopmathlabeltext", "stopmathmatrix", "stopmathmode", "stopmathstyle", "stopmatrices", "stopmatrix", "stopmaxaligned", "stopmdformula", "stopmidaligned", "stopmiddlealigned", "stopmiddlemakeup", "stopmixedcolumns", "stopmode", "stopmodeset", "stopmodule", "stopmoduletestsection", "stopmpformula", "stopnamedsection", "stopnamedsubformulas", "stopnarrow", "stopnarrower", "stopnegative", "stopnicelyfilledbox", "stopnointerference", "stopnotallmodes", "stopnotext", "stopnotmode", "stopoperatortext", "stopopposite", "stopoutputstream", "stopoverlay", "stopoverprint", "stoppacked", "stoppagecolumns", "stoppagecomment", "stoppagefigure", "stoppagelayout", "stoppagemakeup", "stoppar", "stopparagraph", "stopparagraphs", "stopparagraphscell", "stopparbuilder", "stoppart", "stoppath", "stopplacechemical", "stopplacefigure", "stopplacefloat", "stopplaceformula", "stopplacegraphic", "stopplaceintermezzo", "stopplacelegend", "stopplacepairedbox", "stopplacetable", "stoppositioning", "stoppositionoverlay", "stoppositive", "stoppostponing", "stoppostponingnotes", "stopprefixtext", "stopprocessassignmentcommand", "stopprocessassignmentlist", "stopprocesscommacommand", "stopprocesscommalist", "stopproduct", "stopproject", "stopprotect", "stopprotectedcolors", "stoppublication", "stoppunctuation", "stopquotation", "stopquote", "stoprandomized", "stoprandomseed", "stoprawsetups", "stopreadingfile", "stopreferenceprefix", "stopregime", "stopreusableMPgraphic", "stoprightaligned", "stopruby", "stopscript", "stopsdformula", "stopsection", "stopsectionblock", "stopsectionblockenvironment", "stopsectionlevel", "stopsetups", "stopshapebox", "stopshift", "stopsidebar", "stopsimplecolumns", "stopspecialitem", "stopspeech", "stopspformula", "stopsplitformula", "stopsplittext", "stopspread", "stopstandardmakeup", "stopstaticMPfigure", "stopstaticMPgraphic", "stopstrictinspectnextcharacter", "stopstrut", "stopstyle", "stopsubformulas", "stopsubject", "stopsubjectlevel", "stopsubsection", "stopsubsentence", "stopsubstack", "stopsubsubject", "stopsubsubsection", "stopsubsubsubject", "stopsubsubsubsection", "stopsubsubsubsubject", "stopsubsubsubsubsection", "stopsubsubsubsubsubject", "stopsuffixtext", "stopsymbolset", "stoptable", "stoptablehead", "stoptables", "stoptabletail", "stoptabletext", "stoptabulate", "stoptabulatehead", "stoptabulatetail", "stoptagged", "stoptaglabeltext", "stoptexcode", "stoptexdefinition", "stoptext", "stoptextbackground", "stoptextbackgroundmanual", "stoptextcolor", "stoptextcolorintent", "stoptextflow", "stoptextmakeup", "stoptextrule", "stoptitle", "stoptokenlist", "stoptokens", "stoptransparent", "stoptypescript", "stoptypescriptcollection", "stoptyping", "stopuniqueMPgraphic", "stopuniqueMPpagegraphic", "stopunittext", "stopunpacked", "stopusableMPgraphic", "stopuseMPgraphic", "stopusemathstyleparameter", "stopuserdata", "stopusingbtxspecification", "stopvbox", "stopvboxregister", "stopvboxtohbox", "stopvboxtohboxseparator", "stopviewerlayer", "stopvtop", "stopvtopregister", "stopxcell", "stopxcellgroup", "stopxcolumn", "stopxgroup", "stopxmldisplayverbatim", "stopxmlinlineverbatim", "stopxmlraw", "stopxmlsetups", "stopxrow", "stopxrowgroup", "stopxtable", "stopxtablebody", "stopxtablefoot", "stopxtablehead", "stopxtablenext", "stretched", "strictdoifelsenextoptional", "strictdoifnextoptionalelse", "stripcharacter", "strippedcsname", "stripspaces", "structurelistuservariable", "structurenumber", "structuretitle", "structureuservariable", "structurevariable", "strut", "strutdp", "strutgap", "strutht", "struthtdp", "struttedbox", "strutwd", "style", "styleinstance", "subject", "subpagenumber", "subsection", "subsentence", "subset", "subseteq", "subseteqq", "subsetneq", "subsetneqq", "substituteincommalist", "subsubject", "subsubsection", "subsubsubject", "subsubsubsection", "subsubsubsubject", "subsubsubsubsection", "subsubsubsubsubject", "subtractfeature", "succ", "succapprox", "succcurlyeq", "succeq", "succeqq", "succnapprox", "succneq", "succneqq", "succnsim", "succsim", "suffixlanguage", "suffixtext", "sum", "supset", "supseteq", "supseteqq", "supsetneq", "supsetneqq", "surd", "surdradical", "swapcounts", "swapdimens", "swapface", "swapmacros", "swaptypeface", "swarrow", "switchstyleonly", "switchtobodyfont", "switchtocolor", "switchtointerlinespace", "symbol", "symbolreference", "synchronizeblank", "synchronizeindenting", "synchronizemarking", "synchronizeoutputstreams", "synchronizestrut", "synchronizewhitespace", "synctexblockfilename", "synctexresetfilename", "synctexsetfilename", "systemlog", "systemlogfirst", "systemloglast", "systemsetups", "tLeftarrow", "tLeftrightarrow", "tRightarrow", "tabulateautoline", "tabulateautorule", "tabulateline", "tabulaterule", "taggedctxcommand", "taggedlabeltexts", "taglabellanguage", "taglabeltext", "tau", "tbinom", "tbox", "tcaron", "tcedilla", "tcommaaccent", "tcurl", "tequal", "test", "testandsplitstring", "testcolumn", "testfeature", "testfeatureonce", "testpage", "testpageonly", "testpagesync", "testtokens", "tex", "texdefinition", "texsetup", "textAngstrom", "textacute", "textampersand", "textasciicircum", "textasciitilde", "textat", "textbackslash", "textbar", "textbottomcomma", "textbottomdot", "textbraceleft", "textbraceright", "textbreve", "textbrokenbar", "textbullet", "textcaron", "textcedilla", "textcelsius", "textcent", "textcircledP", "textcircumflex", "textcitation", "textcite", "textcomma", "textcontrolspace", "textcurrency", "textdag", "textddag", "textdegree", "textdiaeresis", "textdiv", "textdollar", "textdong", "textdotaccent", "textellipsis", "texteuro", "textflowcollector", "textfraction", "textgrave", "texthash", "texthorizontalbar", "texthungarumlaut", "texthyphen", "textkelvin", "textlognot", "textmacron", "textmath", "textmho", "textminus", "textmu", "textmultiply", "textnumero", "textogonek", "textohm", "textormathchar", "textormathchars", "textounce", "textpercent", "textperiod", "textplus", "textpm", "textreference", "textring", "textrule", "textslash", "textsterling", "texttilde", "textunderscore", "textvisiblespace", "textyen", "thai", "thainumerals", "thefirstcharacter", "thenormalizedbodyfontsize", "therefore", "theremainingcharacters", "theta", "thickspace", "thinrule", "thinrules", "thinspace", "thirdoffivearguments", "thirdoffourarguments", "thirdofsixarguments", "thirdofthreearguments", "thirdofthreeunexpanded", "thook", "thookleftarrow", "thookrightarrow", "thorn", "threedigitrounding", "threeeighths", "threefifths", "threeperemspace", "threequarter", "threesuperior", "tibetannumerals", "tightlayer", "tilde", "times", "tinyfont", "title", "tlap", "tleftarrow", "tleftharpoondown", "tleftharpoonup", "tleftrightarrow", "tleftrightharpoons", "tmapsto", "to", "tochar", "tolinenote", "tooltip", "top", "topbox", "topleftbox", "toplinebox", "toprightbox", "topskippedbox", "tracecatcodetables", "tracedfontname", "traceoutputroutines", "tracepositions", "trademark", "translate", "transparencycomponents", "transparent", "trel", "triangle", "triangledown", "triangleleft", "triangleq", "triangleright", "trightarrow", "trightharpoondown", "trightharpoonup", "trightleftharpoons", "trightoverleftarrow", "triplebond", "tripleprime", "tripleverticalbar", "truefilename", "truefontname", "tstroke", "ttraggedright", "ttriplerel", "ttwoheadleftarrow", "ttwoheadrightarrow", "turnediota", "twodigitrounding", "twofifths", "twoheaddownarrow", "twoheadleftarrow", "twoheadrightarrow", "twoheadrightarrowtail", "twoheaduparrow", "twosuperior", "twothirds", "tx", "txx", "typ", "type", "typebuffer", "typedefinedbuffer", "typeface", "typefile", "typeinlinebuffer", "typescriptone", "typescriptprefix", "typescriptthree", "typescripttwo", "typesetbuffer", "typesetfile", "uacute", "ubreve", "ucaron", "ucircumflex", "uconvertnumber", "udiaeresis", "udiaeresisacute", "udiaeresiscaron", "udiaeresisgrave", "udiaeresismacron", "udotbelow", "udots", "udoublegrave", "uedcatcodecommand", "ugrave", "uhook", "uhorn", "uhornacute", "uhorndotbelow", "uhorngrave", "uhornhook", "uhorntilde", "uhungarumlaut", "uinvertedbreve", "ulcorner", "umacron", "undefinevalue", "undepthed", "underbar", "underbars", "underbrace", "underbracket", "underdash", "underdashes", "underdot", "underdots", "underleftarrow", "underparent", "underrandom", "underrandoms", "underrightarrow", "underset", "understrike", "understrikes", "undoassign", "unexpandeddocumentvariable", "unframed", "unhhbox", "unihex", "uniqueMPgraphic", "uniqueMPpagegraphic", "unit", "unitlanguage", "unitshigh", "unitslow", "unittext", "unknown", "unprotected", "unregisterhyphenationpattern", "unspaceafter", "unspaceargument", "unspaced", "unspacestring", "unstackscripts", "untexargument", "untexcommand", "uogonek", "upand", "uparrow", "updasharrow", "updownarrow", "updownarrowbar", "updownarrows", "upharpoonleft", "upharpoonright", "uplus", "uppercased", "uppercasestring", "upperleftdoubleninequote", "upperleftdoublesixquote", "upperleftsingleninequote", "upperleftsinglesixquote", "upperrightdoubleninequote", "upperrightdoublesixquote", "upperrightsingleninequote", "upperrightsinglesixquote", "upsilon", "upuparrows", "upwhitearrow", "urcorner", "uring", "url", "useJSscripts", "useMPenvironmentbuffer", "useMPgraphic", "useMPlibrary", "useMPrun", "useMPvariables", "useURL", "usealignparameter", "useblankparameter", "useblocks", "usebodyfont", "usebodyfontparameter", "usebtxdataset", "usebtxdefinitions", "usecitation", "usecolors", "usecomponent", "usedirectory", "usedummycolorparameter", "usedummystyleandcolor", "usedummystyleparameter", "useenvironment", "useexternaldocument", "useexternalfigure", "useexternalrendering", "useexternalsoundtrack", "usefigurebase", "usefile", "usegridparameter", "useindentingparameter", "useindentnextparameter", "useinterlinespaceparameter", "uselanguageparameter", "useluamodule", "usemathstyleparameter", "usemodule", "useproduct", "useprofileparameter", "useproject", "usereferenceparameter", "userpagenumber", "usesetupsparameter", "usestaticMPfigure", "usesubpath", "usesymbols", "usetexmodule", "usetypescript", "usetypescriptfile", "useurl", "usezipfile", "utfchar", "utflower", "utfupper", "utilde", "utilityregisterlength", "vDash", "varTheta", "varepsilon", "varkappa", "varnothing", "varphi", "varpi", "varrho", "varsigma", "vartheta", "vboxreference", "vdash", "vdots", "vec", "vee", "veebar", "veeeq", "verbatim", "verbatimstring", "verbosenumber", "version", "vert", "verticalgrowingbar", "verticalpositionbar", "veryraggedcenter", "veryraggedleft", "veryraggedright", "vglue", "viewerlayer", "vl", "vpackbox", "vpackedbox", "vphantom", "vpos", "vsmash", "vsmashbox", "vsmashed", "vspace", "vspacing", "wcircumflex", "wdofstring", "wedge", "wedgeeq", "weekday", "whitearrowupfrombar", "widehat", "widetilde", "widthofstring", "widthspanningtext", "withoutpt", "word", "wordright", "words", "wordtonumber", "wp", "wr", "writebetweenlist", "writedatatolist", "writestatus", "writetolist", "xLeftarrow", "xLeftrightarrow", "xRightarrow", "xdefconvertedargument", "xequal", "xfrac", "xhookleftarrow", "xhookrightarrow", "xi", "xleftarrow", "xleftharpoondown", "xleftharpoonup", "xleftrightarrow", "xleftrightharpoons", "xmapsto", "xmladdindex", "xmlafterdocumentsetup", "xmlaftersetup", "xmlall", "xmlappenddocumentsetup", "xmlappendsetup", "xmlapplyselectors", "xmlatt", "xmlattdef", "xmlattribute", "xmlattributedef", "xmlbadinclusions", "xmlbeforedocumentsetup", "xmlbeforesetup", "xmlchainatt", "xmlchainattdef", "xmlchecknamespace", "xmlcommand", "xmlconcat", "xmlconcatrange", "xmlcontext", "xmlcount", "xmldefaulttotext", "xmldirectives", "xmldirectivesafter", "xmldirectivesbefore", "xmldisplayverbatim", "xmldoif", "xmldoifatt", "xmldoifelse", "xmldoifelseatt", "xmldoifelseempty", "xmldoifelseselfempty", "xmldoifelsetext", "xmldoifelsevalue", "xmldoifnot", "xmldoifnotatt", "xmldoifnotselfempty", "xmldoifnottext", "xmldoifselfempty", "xmldoiftext", "xmlelement", "xmlfilter", "xmlfirst", "xmlflush", "xmlflushcontext", "xmlflushdocumentsetups", "xmlflushlinewise", "xmlflushpure", "xmlflushspacewise", "xmlflushtext", "xmlinclude", "xmlinclusion", "xmlinclusions", "xmlinfo", "xmlinjector", "xmlinlineprettyprint", "xmlinlineprettyprinttext", "xmlinlineverbatim", "xmlinstalldirective", "xmllast", "xmllastatt", "xmllastmatch", "xmllastpar", "xmlloadbuffer", "xmlloaddata", "xmlloaddirectives", "xmlloadfile", "xmlloadonly", "xmlmain", "xmlmapvalue", "xmlname", "xmlnamespace", "xmlnonspace", "xmlpar", "xmlparam", "xmlpath", "xmlpos", "xmlposition", "xmlprependdocumentsetup", "xmlprependsetup", "xmlprettyprint", "xmlprettyprinttext", "xmlprocessbuffer", "xmlprocessdata", "xmlprocessfile", "xmlpure", "xmlraw", "xmlrefatt", "xmlregistereddocumentsetups", "xmlregisteredsetups", "xmlregisterns", "xmlremapname", "xmlremapnamespace", "xmlremovedocumentsetup", "xmlremovesetup", "xmlresetdocumentsetups", "xmlresetinjectors", "xmlresetsetups", "xmlsave", "xmlsetatt", "xmlsetattribute", "xmlsetentity", "xmlsetfunction", "xmlsetinjectors", "xmlsetpar", "xmlsetparam", "xmlsetsetup", "xmlsetup", "xmlshow", "xmlsnippet", "xmlstrip", "xmlstripnolines", "xmlstripped", "xmlstrippednolines", "xmltag", "xmltexentity", "xmltext", "xmltobuffer", "xmltobufferverbose", "xmltofile", "xmlvalue", "xmlverbatim", "xrel", "xrightarrow", "xrightharpoondown", "xrightharpoonup", "xrightleftharpoons", "xrightoverleftarrow", "xsplitstring", "xtriplerel", "xtwoheadleftarrow", "xtwoheadrightarrow", "xxfrac", "xypos", "yacute", "ycircumflex", "ydiaeresis", "ydotbelow", "yen", "ygrave", "yhook", "ymacron", "ytilde", "zacute", "zcaron", "zdotaccent", "zeronumberconversion", "zerowidthnobreakspace", "zerowidthspace", "zeta", "zhook", "zstroke", "zwj", "zwnj" },
- ["cs"]={ "Cisla", "Kap", "MESIC", "Rimskecislice", "SLOVA", "SLOVO", "Slova", "Slovo", "VSEDNIDEN", "Znak", "Znaky", "aktualnicislonadpisu", "aktualnidatum", "barevnalista", "barva", "cernalinka", "cernelinky", "cisla", "cislonadpisu", "cislorovnice", "cislostrany", "datum", "definuj", "definujakcent", "definujbarvu", "definujblok", "definujbloksekce", "definujbuffer", "definujfont", "definujformatodkazu", "definujhbox", "definujinterakcnimenu", "definujkombinovanyseznam", "definujkonverzi", "definujnadpis", "definujobrazeksymbol", "definujodkaz", "definujodstavce", "definujopis", "definujoramovani", "definujoramovanytext", "definujpaletu", "definujplvouciobjekt", "definujpodpole", "definujpole", "definujpopis", "definujpopisek", "definujprekryv", "definujprikaz", "definujprofil", "definujprogram", "definujprostredizakladnihofontu", "definujrejstrik", "definujsablonutabulky", "definujsekci", "definujseznam", "definujskupinubarev", "definujstartstop", "definujstyl", "definujstylfontu", "definujsymbol", "definujsynonumumfontu", "definujsynonyma", "definujtabelaci", "definujtext", "definujtrideni", "definujupravu", "definujvelikostpapiru", "definujvycet", "definujzakladnifont", "definujzasobnikpoli", "definujznaceni", "definujznak", "delkaseznamu", "externiobraz", "hlavnijazyk", "hodnotabarvy", "instalacejazyka", "interakcnilista", "interakcnitlacitka", "interaktivnimenu", "jazyk", "jdidolu", "jdina", "jdinabox", "jdinastranu", "klonujpole", "komponenta", "konvertujcislo", "kopirujpole", "korekcebilehomista", "matematika", "meritko", "mesic", "mezera", "mrizka", "nastavbarvu", "nastavbarvy", "nastavbilamista", "nastavblok", "nastavbloksekce", "nastavbuffer", "nastavcernelinky", "nastavcislonadpisu", "nastavcislostrany", "nastavcislovaniodstavcu", "nastavcislovaniradku", "nastavcislovanistran", "nastavcitaci", "nastavdeleniplvoucichobjektu", "nastavdelitko", "nastavdolnitexty", "nastavhorejsek", "nastavhornitexty", "nastavinterakci", "nastavinterakcnilistu", "nastavinterakcnimenu", "nastavinterakcniobrazovku", "nastavjazyk", "nastavkapitalky", "nastavkombinovanyseznam", "nastavkomentar", "nastavkomentarstrany", "nastavmarginalnilinky", "nastavmeziradkovoumezeru", "nastavnadpis", "nastavnadpisy", "nastavodkazovani", "nastavodsazovani", "nastavodstavce", "nastavopis", "nastavoramovanetexty", "nastavoramovani", "nastavorez", "nastavotoceni", "nastavpaletu", "nastavplvouciobjekt", "nastavplvouciobjekty", "nastavpodcislostrany", "nastavpole", "nastavpolozky", "nastavpopisek", "nastavpopisky", "nastavpozadi", "nastavpoznamkypodcarou", "nastavprechodstrany", "nastavpreskok", "nastavprogramy", "nastavradkovani", "nastavradky", "nastavrejstrik", "nastavrovnice", "nastavsadusymbolu", "nastavseznam", "nastavsirkucary", "nastavsloupce", "nastavspodek", "nastavsynonyma", "nastavtabelaci", "nastavtabulky", "nastavtenkelinky", "nastavtext", "nastavtextovelinky", "nastavtexttexty", "nastavtextyupati", "nastavtextyzahlavi", "nastavtoleranci", "nastavtrideni", "nastavtype", "nastavumisteniprotejsku", "nastavumistovani", "nastavupati", "nastavupravu", "nastavurl", "nastavusporadani", "nastavvelikostpapiru", "nastavvsechnapole", "nastavvycty", "nastavvyplnovelinky", "nastavvyplnoveradky", "nastavvzhled", "nastavzahlavi", "nastavzakladnifont", "nastavzarovnani", "nastavznaceni", "nastavzuzeni", "nastrane", "nejakyradek", "nekde", "neznamo", "nivy", "nizky", "nokap", "obrazovka", "odkaz", "odkaznastranu", "odkaznatext", "odkazujici", "opis", "opissoubor", "oramovani", "oref", "orez", "otocit", "oznaceni", "pis", "plnezneni", "pole", "polozka", "polozky", "porovnejpaletu", "porovnejskupinubarev", "pozadi", "pozice", "poznamka", "pref", "prelozit", "prepninazakladnifont", "preskoc", "prizpusobivepole", "prizpusobvzhled", "produkt", "projekt", "prostredi", "resetznaceni", "rimskecislice", "rozdelplvouciobjekt", "roztazene", "schovejbloky", "sedabarva", "sloupec", "slovovpravo", "stanovcharakteristickuseznamu", "stanovcislonadpisu", "startbarva", "startinteraktivnimenu", "startjazyk", "startjdina", "startkomponenta", "startmarginalnilinka", "startnadpis", "startoramovani", "startpolozka", "startpozadi", "startprodukt", "startprojekt", "startprostredi", "startpublikace", "startradek", "starttextovalinka", "startumistirovnici", "startzarovnanonastred", "startzarovnanovlevo", "startzarovnanovpravo", "startzhustene", "stopbarva", "stopinteraktivnimenu", "stopjazyk", "stopjdina", "stopkomponenta", "stopmarginalnilinka", "stopnadpis", "stoporamovani", "stoppolozka", "stoppozadi", "stopprodukt", "stopprojekt", "stopprostredi", "stoppublikace", "stopradek", "stoptextovalinka", "stopumistirovnici", "stopzarovnanonastred", "stopzarovnanovlevo", "stopzarovnanovpravo", "stopzhustene", "strana", "tecky", "tenkalinka", "tenkelinky", "textovalinka", "tlacitko", "tlacitkomenu", "tloustkacary", "tref", "tvrdamezera", "tvrdemezery", "ukazbarvu", "ukazmrizku", "ukaznastaveni", "ukazpaletu", "ukazpodpery", "ukazpostredizakladnihofontu", "ukazramecek", "ukazsadusymbolu", "ukazskupinubarev", "ukazupravu", "ukazvytisk", "ukazvzhled", "ukazzakladnifont", "umistikombinovanyseznam", "umistilokalnipoznamkypodcarou", "umistinadsebe", "umistinamrizku", "umistipodrovnici", "umistipoznamkypodcarou", "umistirejstrik", "umistirovnici", "umistiseznam", "umistivedlesebe", "umistizalozky", "urcicharakteristikurejstriku", "uzijJSscripts", "uzijURL", "uzijadresar", "uzijbloky", "uzijexternidokument", "uzijexterniobraz", "uzijexternizvuk", "uzijmodul", "uzijsymbol", "uzijurl", "verze", "vlasovalinka", "vradku", "vsedniden", "vyberbloky", "vyplnenytext", "vyplnovelinky", "vyplnovyradek", "vysoky", "zachovejbloky", "zadnamezera", "zadnehorniadolniradky", "zadnezahlaviaupati", "zalozka", "zapisdoseznamu", "zapismeziseznam", "zaramovani", "zarovnanonastred", "zarovnanovlevo", "zarovnanovpravo", "zasobnikpoli", "ziskejbuffer", "ziskejznaceni", "znaceni", "znak", "znaky", "zpracujbloky", "zrcadlit", "zref" },
- ["de"]={ "Buchstabe", "Buchstaben", "Kap", "MONAT", "Roemischezahlen", "WOCHENTAG", "WOERTER", "WORT", "Woerter", "Wort", "Ziffern", "amgitterausrichten", "aufseite", "ausfuelltext", "ausschnitt", "bearbeitebloecke", "behaltebloecke", "bei", "bemerkung", "benutzeverzeichnis", "beschriftung", "bestimmekopfnummer", "bestimmelistencharakeristika", "bestimmeregistercharakteristika", "bildschirm", "blanko", "buchstabe", "buchstaben", "datum", "defineschriftsynonym", "definiereabbsymbol", "definiereabsaetze", "definiereabschnitt", "definiereabschnittsblock", "definiereakzent", "definierebefehl", "definierebeschreibung", "definierebeschriftung", "definiereblock", "definierefarbe", "definierefarbengruppe", "definierefeld", "definierefeldstapel", "definierefliesstext", "definierefliesstextumgebung", "definieregleitobjekt", "definierehbox", "definiereinteraktionsmenue", "definierekonversion", "definierelabel", "definiereliste", "definieren", "definierenummerierung", "definiereoverlay", "definierepalette", "definierepapierformat", "definiereprofil", "definiereprogramme", "definierepuffer", "definierereferenz", "definierereferenzformat", "definiereregister", "definiereschrift", "definiereschriftstil", "definieresortieren", "definierestartstop", "definierestil", "definieresubfeld", "definieresymbol", "definieresynonyme", "definieretabellenvorlage", "definieretabulator", "definieretext", "definieretippen", "definiereueberschrift", "definiereumbruch", "definiereumrahmt", "definiereumrahmtertext", "definierezeichen", "definierezusammengestellteliste", "drehen", "duennelinie", "duennerumriss", "einezeile", "externeabbildung", "farbbalken", "farbe", "farbewert", "feld", "feldstapel", "festesspatium", "format", "formelnummer", "gefuelltesrechteck", "gefuelltezeile", "gestreckt", "gitter", "graufarbe", "haarlinie", "hauptsprache", "heutigesdatum", "heutigeskopfnummer", "hintergrund", "hoch", "holebeschriftung", "holepuffer", "imumriss", "installieresprache", "interaktionsbalken", "interaktionsknopfe", "interaktionsmenue", "inzeile", "irgendwo", "keinekopfundfusszeilen", "keinspatium", "keinzeilenobenundunten", "klonierefeld", "knopf", "komponente", "konvertierezahl", "kopfnummer", "kopierefeld", "korrigierezwischenraum", "liniendicke", "linksbuendig", "listenlaenge", "mathematik", "menueknopf", "monat", "nachunten", "nokap", "notiz", "passelayoutan", "passendfeld", "platzierebookmarks", "platziereformel", "platzierefussnoten", "platziereliste", "platzierelokalefussnoten", "platzierenebeneinander", "platziereregister", "platziereuntereinander", "platziereunterformel", "platzierezusammengestellteliste", "pos", "posten", "produkt", "programm", "projekt", "punkt", "rechteck", "rechtecke", "rechtsbuendig", "referenz", "referieren", "roemischezahlen", "ruecksetztenbeschriftung", "schreibezurliste", "schreibezwischenliste", "seite", "seitenreferenz", "seitenummer", "settext", "spalte", "spatium", "spiegeln", "sprache", "startfarbe", "starthintergrund", "startinteraktionsmenue", "startkleinerdurchschuss", "startkomponente", "startkopf", "startlinksbuendig", "startmarginallinie", "startplatziereformel", "startpos", "startprodukt", "startprojekt", "startpublikation", "startrechtsbuendig", "startsprache", "starttextlinie", "startumgebung", "startumrahmt", "startzeile", "startzentriert", "startzu", "stelleabsaetzeein", "stelleabsatznummerierungein", "stelleabschnittsblockein", "stelleanordnenein", "stelleaufzaehlungenein", "stelleausrichtungein", "stelleausschnittein", "stellebeschreibungein", "stellebeschriftungein", "stellebilderunterschriftein", "stellebildunterschriftein", "stellebindestrichein", "stelleblankoein", "stelleblockein", "stelledrehenein", "stelleduennerumrissein", "stelleeinziehenein", "stelleengerein", "stellefarbeein", "stellefarbenein", "stellefeldein", "stellefelderin", "stellefliesstextein", "stelleformelnein", "stellefussnotenein", "stellefusszeileein", "stellefusszeilentextein", "stellegefuelltesrechteckein", "stellegefuelltezeileein", "stellegegenueberplatzierenein", "stellegleitobjekteein", "stellegleitobjektein", "stellehintergruendeein", "stellehintergrundein", "stelleinteraktionein", "stelleinteraktionsbalkenein", "stelleinteraktionsbildschirmein", "stelleinteraktionsmenueein", "stellekommentarein", "stellekopfzahlein", "stellekopfzeileein", "stellekopfzeilentextein", "stellelayoutein", "stellelinienbreiteein", "stellelisteein", "stellemarginallinieein", "stellenobenein", "stellepaletteein", "stellepapierformatein", "stelleplatziegeteiltegleitobjekt", "stellepositionierenein", "stellepostenein", "stelleprogrammein", "stellepufferein", "stellerechteckein", "stellereferenzierenein", "stelleregisterein", "stelleseitenkommentarein", "stelleseitennummerein", "stelleseitennummeriernungein", "stelleseitenuebergangein", "stellesortierenein", "stellespaltenein", "stellespatiumein", "stellespracheein", "stellesymbolsetein", "stellesynonymein", "stelletabellenein", "stelletabulatorein", "stelletextein", "stelletextobenein", "stelletexttexteein", "stelletextumrissein", "stelletextuntenein", "stelletipein", "stelletippenein", "stelletoleranzein", "stelleueberschriftein", "stelleueberschriftenein", "stelleumbruchein", "stelleumrahmtein", "stelleumrahmtetexteein", "stelleuntenein", "stelleunterseitennummerein", "stelleurlein", "stelleversalienein", "stellezeilenabstandein", "stellezeilenein", "stellezeilennumerierungein", "stellezitierenein", "stellezusammengestelltelisteein", "stellezwischenraumein", "stopfarbe", "stophintergrund", "stopinteraktionsmenue", "stopkleinerdurchschuss", "stopkomponente", "stopkopf", "stoplinksbuendig", "stopmarginallinie", "stopplatziereformel", "stoppos", "stopprodukt", "stopprojekt", "stoppublikation", "stoprechtsbuendig", "stopsprache", "stoptextlinie", "stopumgebung", "stopumrahmt", "stopzeile", "stopzentriert", "stopzu", "teilegleitobjekt", "textlinie", "textreferenz", "tief", "tiho", "tip", "tippedatei", "tippen", "tippepuffer", "ueber", "uebersetzten", "umgebung", "umrahmt", "unbekant", "verbergebloecke", "vergleichefarbengruppe", "vergleichepalette", "verwendeJSscript", "verwendeURL", "verwendebloecke", "verwendeexteresdokument", "verwendeexterneabbildung", "verwendeexternestonstueck", "verwendemodul", "verwendesymbole", "verwendeurl", "volleswort", "von", "waehlebloeckeaus", "wechselezumfliesstext", "wochentag", "wortrechts", "zeigedruck", "zeigeeinstellungen", "zeigefarbe", "zeigefarbengruppe", "zeigefliesstext", "zeigefliesstextumgebung", "zeigegitter", "zeigelayout", "zeigepalette", "zeigerahmen", "zeigestruts", "zeigeumbruch", "zentriert", "ziffern", "zu", "zurbox", "zurseite" },
+ ["common"]={ "AEacute", "AEligature", "AEmacron", "AMSTEX", "Aacute", "Abreve", "Abreveacute", "Abrevedotbelow", "Abrevegrave", "Abrevehook", "Abrevetilde", "Acaron", "Acircumflex", "Acircumflexacute", "Acircumflexdotbelow", "Acircumflexgrave", "Acircumflexhook", "Acircumflextilde", "Adiaeresis", "Adiaeresismacron", "Adotaccent", "Adotaccentmacron", "Adotbelow", "Adoublegrave", "AfterPar", "Agrave", "Ahook", "Ainvertedbreve", "Alpha", "Alphabeticnumerals", "AmSTeX", "Amacron", "And", "Angstrom", "Aogonek", "Aring", "Aringacute", "Arrowvert", "Astroke", "Atilde", "BeforePar", "Beta", "Bhook", "Big", "Bigg", "Biggl", "Biggm", "Biggr", "Bigl", "Bigm", "Bigr", "Box", "Bumpeq", "CONTEXT", "Cacute", "Cap", "Caps", "Ccaron", "Ccedilla", "Ccircumflex", "Cdotaccent", "Character", "Characters", "Chi", "Chook", "ConTeXt", "Context", "ConvertConstantAfter", "ConvertToConstant", "Cstroke", "Cup", "DAYLONG", "DAYSHORT", "DZcaronligature", "DZligature", "Dafrican", "Dcaron", "Ddownarrow", "Delta", "Dhook", "Doteq", "Downarrow", "Dstroke", "Dzcaronligature", "Dzligature", "ETEX", "Eacute", "Ebreve", "Ecaron", "Ecedilla", "Ecircumflex", "Ecircumflexacute", "Ecircumflexdotbelow", "Ecircumflexgrave", "Ecircumflexhook", "Ecircumflextilde", "Ediaeresis", "Edotaccent", "Edotbelow", "Edoublegrave", "Egrave", "Ehook", "Einvertedbreve", "Emacron", "Eogonek", "Epsilon", "Eta", "Eth", "Etilde", "Eulerconst", "EveryLine", "EveryPar", "Fhook", "Finv", "Gacute", "Game", "Gamma", "Gbreve", "Gcaron", "Gcircumflex", "Gcommaaccent", "Gdotaccent", "GetPar", "Ghook", "GotoPar", "Greeknumerals", "Gstroke", "Hat", "Hcaron", "Hcircumflex", "Hstroke", "IJligature", "INRSTEX", "Iacute", "Ibreve", "Icaron", "Icircumflex", "Idiaeresis", "Idotaccent", "Idotbelow", "Idoublegrave", "Igrave", "Ihook", "Iinvertedbreve", "Im", "Imacron", "Iogonek", "Iota", "Istroke", "Itilde", "Jcircumflex", "Join", "Kappa", "Kcaron", "Kcommaaccent", "Khook", "LAMSTEX", "LATEX", "LJligature", "LUAJITTEX", "LUAMETATEX", "LUATEX", "LaTeX", "Lacute", "LamSTeX", "Lambda", "Lbar", "Lcaron", "Lcommaaccent", "Ldotmiddle", "Ldsh", "Leftarrow", "Leftrightarrow", "Ljligature", "Lleftarrow", "Longleftarrow", "Longleftrightarrow", "Longmapsfrom", "Longmapsto", "Longrightarrow", "Lsh", "Lstroke", "Lua", "LuaMetaTeX", "LuaTeX", "LuajitTeX", "METAFONT", "METAFUN", "METAPOST", "MKII", "MKIV", "MKIX", "MKLX", "MKVI", "MKXI", "MKXL", "MONTH", "MONTHLONG", "MONTHSHORT", "MPII", "MPIV", "MPLX", "MPVI", "MPXL", "MPanchor", "MPbetex", "MPc", "MPcode", "MPcolor", "MPcoloronly", "MPcolumn", "MPd", "MPdrawing", "MPfontsizehskip", "MPgetmultipars", "MPgetmultishape", "MPgetposboxes", "MPh", "MPinclusions", "MPleftskip", "MPll", "MPlr", "MPls", "MPmenubuttons", "MPn", "MPoptions", "MPoverlayanchor", "MPp", "MPpage", "MPpardata", "MPplus", "MPpos", "MPpositiongraphic", "MPposset", "MPr", "MPrawvar", "MPregion", "MPrest", "MPrightskip", "MPrs", "MPstring", "MPtext", "MPtransparency", "MPul", "MPur", "MPv", "MPvar", "MPvariable", "MPvv", "MPw", "MPwhd", "MPx", "MPxy", "MPxywhd", "MPy", "Mapsfrom", "Mapsto", "MetaFont", "MetaFun", "MetaPost", "Mu", "NJligature", "Nacute", "Ncaron", "Ncommaaccent", "Nearrow", "Neng", "Ngrave", "Njligature", "NormalizeFontHeight", "NormalizeFontWidth", "NormalizeTextHeight", "NormalizeTextWidth", "Ntilde", "Nu", "Numbers", "Nwarrow", "OEligature", "Oacute", "Obreve", "Ocaron", "Ocircumflex", "Ocircumflexacute", "Ocircumflexdotbelow", "Ocircumflexgrave", "Ocircumflexhook", "Ocircumflextilde", "Odiaeresis", "Odiaeresismacron", "Odotaccent", "Odotaccentmacron", "Odotbelow", "Odoublegrave", "Ograve", "Ohook", "Ohorn", "Ohornacute", "Ohorndotbelow", "Ohorngrave", "Ohornhook", "Ohorntilde", "Ohungarumlaut", "Oinvertedbreve", "Omacron", "Omega", "Omicron", "Oogonek", "Oogonekmacron", "Ostroke", "Ostrokeacute", "Otilde", "Otildemacron", "P", "PDFETEX", "PDFTEX", "PDFcolor", "PICTEX", "PPCHTEX", "PPCHTeX", "PRAGMA", "Phi", "Phook", "Pi", "PiCTeX", "Plankconst", "PointsToBigPoints", "PointsToReal", "PointsToWholeBigPoints", "PropertyLine", "Psi", "PtToCm", "Racute", "Rcaron", "Rcommaaccent", "Rdoublegrave", "Rdsh", "Re", "ReadFile", "Relbar", "Rho", "Rightarrow", "Rinvertedbreve", "Romannumerals", "Rrightarrow", "Rsh", "S", "Sacute", "ScaledPointsToBigPoints", "ScaledPointsToWholeBigPoints", "Scaron", "Scedilla", "Schwa", "Scircumflex", "Scommaaccent", "Searrow", "Sigma", "Smallcapped", "Subset", "Supset", "Swarrow", "TABLE", "TEX", "TaBlE", "Tau", "Tcaron", "Tcedilla", "Tcommaaccent", "TeX", "TheNormalizedFontSize", "Theta", "Thook", "Thorn", "TransparencyHack", "Tstroke", "Uacute", "Ubreve", "Ucaron", "Ucircumflex", "Udiaeresis", "Udiaeresisacute", "Udiaeresiscaron", "Udiaeresisgrave", "Udiaeresismacron", "Udotbelow", "Udoublegrave", "Ugrave", "Uhook", "Uhorn", "Uhornacute", "Uhorndotbelow", "Uhorngrave", "Uhornhook", "Uhorntilde", "Uhungarumlaut", "Uinvertedbreve", "Umacron", "Uogonek", "Uparrow", "Updownarrow", "Upsilon", "Uring", "Utilde", "Uuparrow", "VDash", "Vdash", "VerboseNumber", "Vert", "Vhook", "Vvdash", "WEEKDAY", "WORD", "WORDS", "Wcircumflex", "WidthSpanningText", "Word", "Words", "XETEX", "XeTeX", "Xi", "Yacute", "Ycircumflex", "Ydiaeresis", "Ydotbelow", "Ygrave", "Yhook", "Ymacron", "Ytilde", "Zacute", "Zcaron", "Zdotaccent", "Zeta", "Zhook", "Zstroke", "aacute", "abbreviation", "abjadnaivenumerals", "abjadnodotnumerals", "abjadnumerals", "about", "abreve", "abreveacute", "abrevedotbelow", "abrevegrave", "abrevehook", "abrevetilde", "acaron", "acircumflex", "acircumflexacute", "acircumflexdotbelow", "acircumflexgrave", "acircumflexhook", "acircumflextilde", "activatespacehandler", "actualday", "actualmonth", "actualyear", "actuarial", "acute", "acwopencirclearrow", "adaptcollector", "adaptfontfeature", "adaptlayout", "adaptpapersize", "addfeature", "addtoJSpreamble", "addtocommalist", "addvalue", "adiaeresis", "adiaeresismacron", "adotaccent", "adotaccentmacron", "adotbelow", "adoublegrave", "aeacute", "aeligature", "aemacron", "afghanicurrency", "aftersplitstring", "aftertestandsplitstring", "agrave", "ahook", "ainvertedbreve", "aleph", "alignbottom", "aligned", "alignedbox", "alignedline", "alignhere", "alignmentcharacter", "allinputpaths", "alpha", "alphabeticnumerals", "alwayscitation", "alwayscite", "amacron", "amalg", "ampersand", "anchor", "angle", "aogonek", "appendetoks", "appendgvalue", "appendtocommalist", "appendtoks", "appendtoksonce", "appendvalue", "apply", "applyalternativestyle", "applyprocessor", "applytocharacters", "applytofirstcharacter", "applytosplitstringchar", "applytosplitstringcharspaced", "applytosplitstringline", "applytosplitstringlinespaced", "applytosplitstringword", "applytosplitstringwordspaced", "applytowords", "approx", "approxEq", "approxeq", "approxnEq", "arabicakbar", "arabicalayhe", "arabicallah", "arabicallallahou", "arabicasterisk", "arabicbasmalah", "arabiccomma", "arabiccuberoot", "arabicdateseparator", "arabicdecimals", "arabicdisputedendofayah", "arabicendofayah", "arabicexnumerals", "arabicfootnotemarker", "arabicfourthroot", "arabichighain", "arabichighalayheassallam", "arabichigheqala", "arabichighesala", "arabichighfootnotemarker", "arabichighjeem", "arabichighlamalef", "arabichighmadda", "arabichighmeemlong", "arabichighmeemshort", "arabichighnisf", "arabichighnoon", "arabichighnoonkasra", "arabichighqaf", "arabichighqif", "arabichighradiallahouanhu", "arabichighrahmatullahalayhe", "arabichighrubc", "arabichighsad", "arabichighsajda", "arabichighsakta", "arabichighsallallahou", "arabichighseen", "arabichighsmallsafha", "arabichightah", "arabichightakhallus", "arabichighthalatha", "arabichighwaqf", "arabichighyeh", "arabichighzain", "arabicjallajalalouhou", "arabiclettermark", "arabiclowmeemlong", "arabiclownoonkasra", "arabiclowseen", "arabicmisra", "arabicmuhammad", "arabicnumber", "arabicnumberabove", "arabicnumerals", "arabicparenleft", "arabicparenright", "arabicpercent", "arabicperiod", "arabicpermille", "arabicpertenthousand", "arabicpoeticverse", "arabicqala", "arabicquestion", "arabicrasoul", "arabicray", "arabicrialsign", "arabicsafha", "arabicsajdah", "arabicsalla", "arabicsamvat", "arabicsanah", "arabicsemicolon", "arabicshighthreedots", "arabicslcm", "arabicstartofrubc", "arabictripledot", "arabicvowelwaw", "arabicvowelyeh", "arabicwasallam", "arg", "aring", "aringacute", "arrowvert", "asciimode", "asciistr", "aside", "assignalfadimension", "assigndimen", "assigndimension", "assignifempty", "assigntranslation", "assignvalue", "assignwidth", "assumelongusagecs", "ast", "astype", "asymp", "at", "atilde", "atleftmargin", "atpage", "atrightmargin", "attachment", "autocap", "autodirhbox", "autodirvbox", "autodirvtop", "autoinsertnextspace", "autointegral", "automathematics", "autoorientation", "autopagestaterealpage", "autopagestaterealpageorder", "autorule", "autosetups", "availablehsize", "averagecharwidth", "backepsilon", "background", "backgroundimage", "backgroundimagefill", "backgroundline", "backprime", "backsim", "backslash", "bar", "barleftarrow", "barleftarrowrightarrowbar", "barovernorthwestarrow", "barwedge", "basegrid", "baselinebottom", "baselineleftbox", "baselinemiddlebox", "baselinerightbox", "bbordermatrix", "bbox", "because", "beforesplitstring", "beforetestandsplitstring", "beta", "beth", "between", "bhook", "big", "bigbodyfont", "bigcap", "bigcirc", "bigcircle", "bigcup", "bigdiamond", "bigg", "bigger", "biggl", "biggm", "biggr", "bigl", "bigm", "bigodot", "bigoplus", "bigotimes", "bigr", "bigskip", "bigsqcap", "bigsqcup", "bigsquare", "bigstar", "bigtimes", "bigtriangledown", "bigtriangleup", "bigudot", "biguplus", "bigvee", "bigwedge", "binom", "bitmapimage", "blacklozenge", "blackrule", "blackrules", "blacksquare", "blacktriangle", "blacktriangledown", "blacktriangleleft", "blacktriangleright", "blank", "blap", "bleed", "bleedheight", "bleedwidth", "blockligatures", "blockquote", "blocksynctexfile", "blockuservariable", "bodyfontenvironmentlist", "bodyfontsize", "bold", "boldface", "bolditalic", "boldslanted", "bookmark", "booleanmodevalue", "bordermatrix", "bot", "bottombox", "bottomleftbox", "bottomrightbox", "bowtie", "boxcursor", "boxdot", "boxmarker", "boxminus", "boxofsize", "boxplus", "boxreference", "boxtimes", "bpos", "breakablethinspace", "breakhere", "breve", "bstroke", "btxabbreviatedjournal", "btxaddjournal", "btxalwayscitation", "btxauthorfield", "btxdetail", "btxdirect", "btxdoif", "btxdoifcombiinlistelse", "btxdoifelse", "btxdoifelsecombiinlist", "btxdoifelsesameasprevious", "btxdoifelsesameaspreviouschecked", "btxdoifelseuservariable", "btxdoifnot", "btxdoifsameaspreviouscheckedelse", "btxdoifsameaspreviouselse", "btxdoifuservariableelse", "btxexpandedjournal", "btxfield", "btxfieldname", "btxfieldtype", "btxfirstofrange", "btxflush", "btxflushauthor", "btxflushauthorinverted", "btxflushauthorinvertedshort", "btxflushauthorname", "btxflushauthornormal", "btxflushauthornormalshort", "btxflushsuffix", "btxfoundname", "btxfoundtype", "btxhiddencitation", "btxhybridcite", "btxlabellanguage", "btxlabeltext", "btxlistcitation", "btxloadjournalist", "btxoneorrange", "btxremapauthor", "btxsavejournalist", "btxsetup", "btxsingularorplural", "btxsingularplural", "btxtextcitation", "buildmathaccent", "buildtextaccent", "buildtextbottomcomma", "buildtextbottomdot", "buildtextcedilla", "buildtextgrave", "buildtextmacron", "buildtextognek", "bullet", "button", "cacute", "calligraphic", "camel", "cap", "capital", "carriagereturn", "catcodetablename", "cbox", "ccaron", "ccedilla", "ccircumflex", "ccurl", "cdot", "cdotaccent", "cdotp", "cdots", "centeraligned", "centerbox", "centerdot", "centeredbox", "centeredlastline", "centerednextbox", "centerline", "cfrac", "chapter", "character", "characters", "chardescription", "charwidthlanguage", "check", "checkcharacteralign", "checkedblank", "checkedchar", "checkedfiller", "checkedstrippedcsname", "checkinjector", "checkmark", "checknextindentation", "checknextinjector", "checkpage", "checkparameters", "checkpreviousinjector", "checksoundtrack", "checktwopassdata", "checkvariables", "chem", "chemical", "chemicalbottext", "chemicalmidtext", "chemicalsymbol", "chemicaltext", "chemicaltoptext", "chi", "chineseallnumerals", "chinesecapnumerals", "chinesenumerals", "chook", "circ", "circeq", "circlearrowleft", "circlearrowright", "circledR", "circledS", "circledast", "circledcirc", "circleddash", "circledequals", "circleonrightarrow", "citation", "cite", "clap", "classfont", "cldcommand", "cldcontext", "cldloadfile", "cldprocessfile", "cleftarrow", "clip", "clippedoverlayimage", "clonefield", "clubsuit", "collect", "collectedtext", "collectexpanded", "colon", "coloncolonequals", "colonequals", "color", "colorbar", "colorcomponents", "colored", "coloronly", "colorvalue", "column", "columnbreak", "columnsetspanwidth", "combinepages", "commalistelement", "commalistsentence", "commalistsize", "comment", "comparecolorgroup", "comparedimension", "comparedimensioneps", "comparepalet", "complement", "completebtxrendering", "completecontent", "completeindex", "completelist", "completelistofabbreviations", "completelistofchemicals", "completelistoffigures", "completelistofgraphics", "completelistofintermezzi", "completelistoflogos", "completelistofpublications", "completelistofsorts", "completelistofsynonyms", "completelistoftables", "completepagenumber", "completeregister", "complexes", "complexorsimple", "complexorsimpleempty", "component", "composedcollector", "composedlayer", "compounddiscretionary", "compresult", "cong", "constantdimen", "constantdimenargument", "constantemptyargument", "constantnumber", "constantnumberargument", "contentreference", "continuednumber", "continueifinputfile", "convertargument", "convertcommand", "convertedcounter", "converteddimen", "convertedsubcounter", "convertmonth", "convertnumber", "convertvalue", "convertvboxtohbox", "coprod", "copyboxfromcache", "copybtxlabeltext", "copyfield", "copyheadtext", "copylabeltext", "copymathlabeltext", "copyoperatortext", "copypages", "copyparameters", "copyposition", "copyprefixtext", "copyright", "copysetups", "copysuffixtext", "copytaglabeltext", "copyunittext", "correctwhitespace", "countersubs", "counttoken", "counttokens", "cramped", "crampedclap", "crampedllap", "crampedrlap", "crightarrow", "crightoverleftarrow", "crlf", "crlfplaceholder", "cstroke", "ctop", "ctxcommand", "ctxdirectcommand", "ctxdirectlua", "ctxfunction", "ctxlatecommand", "ctxlatelua", "ctxloadluafile", "ctxlua", "ctxluabuffer", "ctxluacode", "ctxreport", "ctxsprint", "cup", "curlyeqprec", "curlyeqsucc", "curlyvee", "curlywedge", "currentassignmentlistkey", "currentassignmentlistvalue", "currentbtxuservariable", "currentcommalistitem", "currentcomponent", "currentdate", "currentenvironment", "currentfeaturetest", "currentheadnumber", "currentinterface", "currentlanguage", "currentlistentrydestinationattribute", "currentlistentrylimitedtext", "currentlistentrynumber", "currentlistentrypagenumber", "currentlistentryreferenceattribute", "currentlistentrytitle", "currentlistentrytitlerendered", "currentlistsymbol", "currentmainlanguage", "currentmessagetext", "currentmoduleparameter", "currentoutputstream", "currentproduct", "currentproject", "currentregime", "currentregisterpageuserdata", "currentresponses", "currenttime", "currentvalue", "currentxtablecolumn", "currentxtablerow", "curvearrowleft", "curvearrowright", "cwopencirclearrow", "cyrillicA", "cyrillicAE", "cyrillicAbreve", "cyrillicAdiaeresis", "cyrillicB", "cyrillicBIGYUS", "cyrillicBIGYUSiotified", "cyrillicC", "cyrillicCH", "cyrillicCHEDC", "cyrillicCHEDCabkhasian", "cyrillicCHEabkhasian", "cyrillicCHEdiaeresis", "cyrillicCHEkhakassian", "cyrillicCHEvertstroke", "cyrillicD", "cyrillicDASIAPNEUMATA", "cyrillicDJE", "cyrillicDZE", "cyrillicDZEabkhasian", "cyrillicDZHE", "cyrillicE", "cyrillicELtail", "cyrillicEMtail", "cyrillicENDC", "cyrillicENGHE", "cyrillicENhook", "cyrillicENtail", "cyrillicEREV", "cyrillicERY", "cyrillicERtick", "cyrillicEbreve", "cyrillicEdiaeresis", "cyrillicEgrave", "cyrillicEiotified", "cyrillicF", "cyrillicFITA", "cyrillicG", "cyrillicGHEmidhook", "cyrillicGHEstroke", "cyrillicGHEupturn", "cyrillicGJE", "cyrillicH", "cyrillicHA", "cyrillicHADC", "cyrillicHRDSN", "cyrillicI", "cyrillicIE", "cyrillicII", "cyrillicISHRT", "cyrillicISHRTtail", "cyrillicIZHITSA", "cyrillicIZHITSAdoublegrave", "cyrillicIdiaeresis", "cyrillicIgrave", "cyrillicImacron", "cyrillicJE", "cyrillicK", "cyrillicKADC", "cyrillicKAbashkir", "cyrillicKAhook", "cyrillicKAstroke", "cyrillicKAvertstroke", "cyrillicKJE", "cyrillicKOPPA", "cyrillicKSI", "cyrillicL", "cyrillicLITTLEYUS", "cyrillicLITTLEYUSiotified", "cyrillicLJE", "cyrillicM", "cyrillicN", "cyrillicNJE", "cyrillicO", "cyrillicOMEGA", "cyrillicOMEGAround", "cyrillicOMEGAtitlo", "cyrillicOT", "cyrillicObarred", "cyrillicObarreddiaeresis", "cyrillicOdiaeresis", "cyrillicP", "cyrillicPALATALIZATION", "cyrillicPALOCHKA", "cyrillicPEmidhook", "cyrillicPSI", "cyrillicPSILIPNEUMATA", "cyrillicR", "cyrillicS", "cyrillicSCHWA", "cyrillicSCHWAdiaeresis", "cyrillicSDSC", "cyrillicSEMISOFT", "cyrillicSFTSN", "cyrillicSH", "cyrillicSHCH", "cyrillicSHHA", "cyrillicT", "cyrillicTEDC", "cyrillicTETSE", "cyrillicTITLO", "cyrillicTSHE", "cyrillicU", "cyrillicUK", "cyrillicUSHRT", "cyrillicUdiaeresis", "cyrillicUdoubleacute", "cyrillicUmacron", "cyrillicV", "cyrillicYA", "cyrillicYAT", "cyrillicYERUdiaeresis", "cyrillicYI", "cyrillicYO", "cyrillicYU", "cyrillicYstr", "cyrillicYstrstroke", "cyrillicZ", "cyrillicZDSC", "cyrillicZEdiaeresis", "cyrillicZH", "cyrillicZHEbreve", "cyrillicZHEdescender", "cyrillicZHEdiaeresis", "cyrillica", "cyrillicabreve", "cyrillicadiaeresis", "cyrillicae", "cyrillicb", "cyrillicbigyus", "cyrillicbigyusiotified", "cyrillicc", "cyrillicch", "cyrilliccheabkhasian", "cyrillicchedc", "cyrillicchedcabkhasian", "cyrillicchediaeresis", "cyrillicchekhakassian", "cyrillicchevertstroke", "cyrillicd", "cyrillicdje", "cyrillicdze", "cyrillicdzeabkhasian", "cyrillicdzhe", "cyrillice", "cyrillicebreve", "cyrillicediaeresis", "cyrillicegrave", "cyrilliceiotified", "cyrilliceltail", "cyrillicemtail", "cyrillicendc", "cyrillicenghe", "cyrillicenhook", "cyrillicentail", "cyrillicerev", "cyrillicertick", "cyrillicery", "cyrillicf", "cyrillicfita", "cyrillicg", "cyrillicghemidhook", "cyrillicghestroke", "cyrillicgheupturn", "cyrillicgje", "cyrillich", "cyrillicha", "cyrillichadc", "cyrillichrdsn", "cyrillici", "cyrillicidiaeresis", "cyrillicie", "cyrillicigrave", "cyrillicii", "cyrillicimacron", "cyrillicishrt", "cyrillicishrttail", "cyrillicizhitsa", "cyrillicizhitsadoublegrave", "cyrillicje", "cyrillick", "cyrillickabashkir", "cyrillickadc", "cyrillickahook", "cyrillickastroke", "cyrillickavertstroke", "cyrillickje", "cyrillickoppa", "cyrillicksi", "cyrillicl", "cyrilliclittleyus", "cyrilliclittleyusiotified", "cyrilliclje", "cyrillicm", "cyrillicn", "cyrillicnje", "cyrillico", "cyrillicobarred", "cyrillicobarreddiaeresis", "cyrillicodiaeresis", "cyrillicomega", "cyrillicomegaround", "cyrillicomegatitlo", "cyrillicot", "cyrillicp", "cyrillicpemidhook", "cyrillicpsi", "cyrillicr", "cyrillics", "cyrillicschwa", "cyrillicschwadiaeresis", "cyrillicsdsc", "cyrillicsemisoft", "cyrillicsftsn", "cyrillicsh", "cyrillicshch", "cyrillicshha", "cyrillict", "cyrillictedc", "cyrillictetse", "cyrillictshe", "cyrillicu", "cyrillicudiaeresis", "cyrillicudoubleacute", "cyrillicuk", "cyrillicumacron", "cyrillicushrt", "cyrillicv", "cyrillicya", "cyrillicyat", "cyrillicyerudiaeresis", "cyrillicyi", "cyrillicyo", "cyrillicystr", "cyrillicystrstroke", "cyrillicyu", "cyrillicz", "cyrilliczdsc", "cyrilliczediaeresis", "cyrilliczh", "cyrilliczhebreve", "cyrilliczhedescender", "cyrilliczhediaeresis", "d", "dag", "dagger", "daleth", "dasharrow", "dashedleftarrow", "dashedrightarrow", "dashv", "datasetvariable", "date", "daylong", "dayoftheweek", "dayshort", "dayspermonth", "dbinom", "dcaron", "dcurl", "ddag", "ddagger", "dddot", "ddot", "ddots", "decrement", "decrementcounter", "decrementedcounter", "decrementpagenumber", "decrementsubpagenumber", "decrementvalue", "defaultinterface", "defaultobjectpage", "defaultobjectreference", "defcatcodecommand", "defconvertedargument", "defconvertedcommand", "defconvertedvalue", "define", "defineMPinstance", "defineTABLEsetup", "defineaccent", "defineactivecharacter", "definealternativestyle", "defineanchor", "defineattachment", "defineattribute", "definebackground", "definebar", "defineblock", "definebodyfont", "definebodyfontenvironment", "definebodyfontswitch", "definebreakpoint", "definebreakpoints", "definebtx", "definebtxdataset", "definebtxregister", "definebtxrendering", "definebuffer", "definebutton", "definecapitals", "definecharacter", "definecharacterkerning", "definecharacterspacing", "definechemical", "definechemicals", "definechemicalsymbol", "definecollector", "definecolor", "definecolorgroup", "definecolumnbreak", "definecolumnset", "definecolumnsetarea", "definecolumnsetspan", "definecombination", "definecombinedlist", "definecommand", "definecomment", "definecomplexorsimple", "definecomplexorsimpleempty", "defineconversion", "defineconversionset", "definecounter", "definedataset", "definedate", "definedelimitedtext", "definedeq", "definedescription", "definedfont", "definedocument", "defineeffect", "defineenumeration", "defineexpandable", "defineexpansion", "defineexternalfigure", "definefacingfloat", "definefallbackfamily", "definefield", "definefieldbody", "definefieldbodyset", "definefieldcategory", "definefieldstack", "definefiguresymbol", "definefileconstant", "definefilefallback", "definefilesynonym", "definefiller", "definefirstline", "definefittingpage", "definefloat", "definefont", "definefontalternative", "definefontfallback", "definefontfamily", "definefontfamilypreset", "definefontfeature", "definefontfile", "definefontsize", "definefontsolution", "definefontstyle", "definefontsynonym", "defineformula", "defineformulaalternative", "defineformulaframed", "defineframed", "defineframedcontent", "defineframedtable", "defineframedtext", "definefrozenfont", "defineglobalcolor", "definegraphictypesynonym", "definegridsnapping", "definehbox", "definehead", "defineheadalternative", "definehelp", "definehigh", "definehighlight", "definehspace", "definehyphenationfeatures", "defineindentedtext", "defineindenting", "defineinitial", "defineinsertion", "defineinteraction", "defineinteractionbar", "defineinteractionmenu", "defineinterfaceconstant", "defineinterfaceelement", "defineinterfacevariable", "defineinterlinespace", "defineintermediatecolor", "defineitemgroup", "defineitems", "definelabel", "definelabelclass", "definelayer", "definelayerpreset", "definelayout", "definelinefiller", "definelinenote", "definelinenumbering", "definelines", "definelist", "definelistalternative", "definelistextra", "definelow", "definelowhigh", "definelowmidhigh", "definemakeup", "definemarginblock", "definemargindata", "definemarker", "definemarking", "definemathaccent", "definemathalignment", "definemathcases", "definemathcommand", "definemathdouble", "definemathdoubleextensible", "definemathematics", "definemathextensible", "definemathfence", "definemathfraction", "definemathframed", "definemathmatrix", "definemathornament", "definemathover", "definemathoverextensible", "definemathovertextextensible", "definemathradical", "definemathstackers", "definemathstyle", "definemathtriplet", "definemathunder", "definemathunderextensible", "definemathundertextextensible", "definemathunstacked", "definemeasure", "definemessageconstant", "definemixedcolumns", "definemode", "definemulticolumns", "definemultitonecolor", "definenamedcolor", "definenamespace", "definenarrower", "definenote", "defineorientation", "defineornament", "defineoutputroutine", "defineoutputroutinecommand", "defineoverlay", "definepage", "definepagebreak", "definepagechecker", "definepagecolumns", "definepageinjection", "definepageinjectionalternative", "definepageshift", "definepagestate", "definepairedbox", "definepalet", "definepapersize", "defineparagraph", "defineparagraphs", "defineparallel", "defineparbuilder", "defineperiodkerning", "defineplaceholder", "defineplacement", "definepositioning", "defineprefixset", "defineprocesscolor", "defineprocessor", "defineprofile", "defineprogram", "definepushbutton", "definepushsymbol", "definereference", "definereferenceformat", "defineregister", "definerenderingwindow", "defineresetset", "defineruby", "definescale", "definescript", "definesection", "definesectionblock", "definesectionlevels", "defineselector", "defineseparatorset", "defineshift", "definesidebar", "definesort", "definesorting", "definespotcolor", "definestartstop", "definestyle", "definestyleinstance", "definesubfield", "definesubformula", "definesymbol", "definesynonym", "definesynonyms", "definesystemattribute", "definesystemconstant", "definesystemvariable", "definetabletemplate", "definetabulate", "definetext", "definetextbackground", "definetextflow", "definetextnote", "definetokenlist", "definetooltip", "definetransparency", "definetwopasslist", "definetype", "definetypeface", "definetypescriptprefix", "definetypescriptsynonym", "definetypesetting", "definetyping", "defineunit", "defineuserdata", "defineuserdataalternative", "defineviewerlayer", "definevspace", "definevspacing", "definevspacingamount", "definextable", "defrostparagraphproperties", "delimited", "delimitedtext", "delta", "depthofstring", "depthonlybox", "depthspanningtext", "depthstrut", "determineheadnumber", "determinelistcharacteristics", "determinenoflines", "determineregistercharacteristics", "devanagarinumerals", "dfrac", "dhook", "diameter", "diamond", "diamondsuit", "differentialD", "differentiald", "digamma", "digits", "dimensiontocount", "directboxfromcache", "directcolor", "directcolored", "directconvertedcounter", "directcopyboxfromcache", "directdummyparameter", "directgetboxllx", "directgetboxlly", "directhighlight", "directlocalframed", "directluacode", "directparwrapper", "directselect", "directsetbar", "directsetup", "directsymbol", "directvspacing", "dis", "disabledirectives", "disableexperiments", "disablemode", "disableoutputstream", "disableparpositions", "disableregime", "disabletrackers", "displaymath", "displaymathematics", "displaymessage", "disposeluatable", "distributedhsize", "div", "dividedsize", "divideontimes", "divides", "doadaptleftskip", "doadaptrightskip", "doaddfeature", "doassign", "doassignempty", "doboundtext", "docheckassignment", "docheckedpair", "documentvariable", "dodoubleargument", "dodoubleargumentwithset", "dodoubleempty", "dodoubleemptywithset", "dodoublegroupempty", "doeassign", "doexpandedrecurse", "dofastloopcs", "dogetattribute", "dogetattributeid", "dogetcommacommandelement", "dogobbledoubleempty", "dogobblesingleempty", "dohyphens", "doif", "doifMPgraphicelse", "doifallcommon", "doifallcommonelse", "doifalldefinedelse", "doifallmodes", "doifallmodeselse", "doifassignmentelse", "doifassignmentelsecs", "doifblackelse", "doifbothsides", "doifbothsidesoverruled", "doifboxelse", "doifbufferelse", "doifcheckedpagestate", "doifcolor", "doifcolorelse", "doifcommandhandler", "doifcommandhandlerelse", "doifcommon", "doifcommonelse", "doifcontent", "doifconversiondefinedelse", "doifconversionnumberelse", "doifcounter", "doifcounterelse", "doifcurrentfonthasfeatureelse", "doifdefined", "doifdefinedcounter", "doifdefinedcounterelse", "doifdefinedelse", "doifdimensionelse", "doifdimenstringelse", "doifdocumentargument", "doifdocumentargumentelse", "doifdocumentfilename", "doifdocumentfilenameelse", "doifdocumentvariable", "doifdocumentvariableelse", "doifdrawingblackelse", "doifelse", "doifelseMPgraphic", "doifelseallcommon", "doifelsealldefined", "doifelseallmodes", "doifelseassignment", "doifelseassignmentcs", "doifelseblack", "doifelsebox", "doifelseboxincache", "doifelsebuffer", "doifelsecolor", "doifelsecommandhandler", "doifelsecommon", "doifelseconversiondefined", "doifelseconversionnumber", "doifelsecounter", "doifelsecurrentfonthasfeature", "doifelsecurrentsortingused", "doifelsecurrentsynonymshown", "doifelsecurrentsynonymused", "doifelsedefined", "doifelsedefinedcounter", "doifelsedimension", "doifelsedimenstring", "doifelsedocumentargument", "doifelsedocumentfilename", "doifelsedocumentvariable", "doifelsedrawingblack", "doifelseempty", "doifelseemptyvalue", "doifelseemptyvariable", "doifelseenv", "doifelsefastoptionalcheck", "doifelsefastoptionalcheckcs", "doifelsefieldbody", "doifelsefieldcategory", "doifelsefigure", "doifelsefile", "doifelsefiledefined", "doifelsefileexists", "doifelsefirstchar", "doifelseflagged", "doifelsefontchar", "doifelsefontfeature", "doifelsefontpresent", "doifelsefontsynonym", "doifelseframed", "doifelsehasspace", "doifelsehelp", "doifelseincsname", "doifelseindented", "doifelseinelement", "doifelseinputfile", "doifelseinsertion", "doifelseinset", "doifelseinstring", "doifelseinsymbolset", "doifelseintoks", "doifelseintwopassdata", "doifelseitalic", "doifelselanguage", "doifelselayerdata", "doifelselayoutdefined", "doifelselayoutsomeline", "doifelselayouttextline", "doifelseleapyear", "doifelselist", "doifelselocation", "doifelselocfile", "doifelsemainfloatbody", "doifelsemarkedcontent", "doifelsemarkedpage", "doifelsemarking", "doifelsemeaning", "doifelsemessage", "doifelsemode", "doifelsenextbgroup", "doifelsenextbgroupcs", "doifelsenextchar", "doifelsenextoptional", "doifelsenextoptionalcs", "doifelsenextparenthesis", "doifelsenonzeropositive", "doifelsenoteonsamepage", "doifelsenothing", "doifelsenumber", "doifelseobjectfound", "doifelseobjectreferencefound", "doifelseoddpage", "doifelseoddpagefloat", "doifelseoldercontext", "doifelseolderversion", "doifelseorientation", "doifelseoverlapping", "doifelseoverlay", "doifelseparallel", "doifelseparentfile", "doifelseparwrapper", "doifelsepath", "doifelsepathexists", "doifelsepatterns", "doifelseposition", "doifelsepositionaction", "doifelsepositiononpage", "doifelsepositionsonsamepage", "doifelsepositionsonthispage", "doifelsepositionsused", "doifelsereferencefound", "doifelserightpage", "doifelserightpagefloat", "doifelserighttoleftinbox", "doifelsesamelinereference", "doifelsesamestring", "doifelsesetups", "doifelsesomebackground", "doifelsesomespace", "doifelsesomething", "doifelsesometoks", "doifelsestringinstring", "doifelsestructurelisthasnumber", "doifelsestructurelisthaspage", "doifelsesymboldefined", "doifelsesymbolset", "doifelsetext", "doifelsetextflow", "doifelsetextflowcollector", "doifelsetopofpage", "doifelsetypingfile", "doifelseundefined", "doifelseurldefined", "doifelsevalue", "doifelsevaluenothing", "doifelsevariable", "doifempty", "doifemptyelse", "doifemptytoks", "doifemptyvalue", "doifemptyvalueelse", "doifemptyvariable", "doifemptyvariableelse", "doifenv", "doifenvelse", "doiffastoptionalcheckcselse", "doiffastoptionalcheckelse", "doiffieldbodyelse", "doiffieldcategoryelse", "doiffigureelse", "doiffile", "doiffiledefinedelse", "doiffileelse", "doiffileexistselse", "doiffirstcharelse", "doifflaggedelse", "doiffontcharelse", "doiffontfeatureelse", "doiffontpresentelse", "doiffontsynonymelse", "doifhasspaceelse", "doifhelpelse", "doifincsnameelse", "doifinelementelse", "doifinputfileelse", "doifinsertionelse", "doifinset", "doifinsetelse", "doifinstring", "doifinstringelse", "doifinsymbolset", "doifinsymbolsetelse", "doifintokselse", "doifintwopassdataelse", "doifitalicelse", "doiflanguageelse", "doiflayerdataelse", "doiflayoutdefinedelse", "doiflayoutsomelineelse", "doiflayouttextlineelse", "doifleapyearelse", "doiflistelse", "doiflocationelse", "doiflocfileelse", "doifmainfloatbodyelse", "doifmarkingelse", "doifmeaningelse", "doifmessageelse", "doifmode", "doifmodeelse", "doifnextbgroupcselse", "doifnextbgroupelse", "doifnextcharelse", "doifnextoptionalcselse", "doifnextoptionalelse", "doifnextparenthesiselse", "doifnonzeropositiveelse", "doifnot", "doifnotallcommon", "doifnotallmodes", "doifnotcommandhandler", "doifnotcommon", "doifnotcounter", "doifnotdocumentargument", "doifnotdocumentfilename", "doifnotdocumentvariable", "doifnotempty", "doifnotemptyvalue", "doifnotemptyvariable", "doifnotenv", "doifnoteonsamepageelse", "doifnotescollected", "doifnotfile", "doifnotflagged", "doifnothing", "doifnothingelse", "doifnotinset", "doifnotinsidesplitfloat", "doifnotinstring", "doifnotmode", "doifnotnumber", "doifnotsamestring", "doifnotsetups", "doifnotvalue", "doifnotvariable", "doifnumber", "doifnumberelse", "doifobjectfoundelse", "doifobjectreferencefoundelse", "doifoddpageelse", "doifoddpagefloatelse", "doifoldercontextelse", "doifolderversionelse", "doifoutervmode", "doifoverlappingelse", "doifoverlayelse", "doifparallelelse", "doifparentfileelse", "doifpathelse", "doifpathexistselse", "doifpatternselse", "doifposition", "doifpositionaction", "doifpositionactionelse", "doifpositionelse", "doifpositiononpageelse", "doifpositionsonsamepageelse", "doifpositionsonthispageelse", "doifpositionsusedelse", "doifreferencefoundelse", "doifrightpageelse", "doifrightpagefloatelse", "doifrighttoleftinboxelse", "doifsamelinereferenceelse", "doifsamestring", "doifsamestringelse", "doifsetups", "doifsetupselse", "doifsomebackground", "doifsomebackgroundelse", "doifsomespaceelse", "doifsomething", "doifsomethingelse", "doifsometoks", "doifsometokselse", "doifstringinstringelse", "doifstructurelisthasnumberelse", "doifstructurelisthaspageelse", "doifsymboldefinedelse", "doifsymbolsetelse", "doiftext", "doiftextelse", "doiftextflowcollectorelse", "doiftextflowelse", "doiftopofpageelse", "doiftypingfileelse", "doifundefined", "doifundefinedcounter", "doifundefinedelse", "doifunknownfontfeature", "doifurldefinedelse", "doifvalue", "doifvalueelse", "doifvaluenothing", "doifvaluenothingelse", "doifvaluesomething", "doifvariable", "doifvariableelse", "doindentation", "dollar", "doloop", "doloopoverlist", "donothing", "dontconvertfont", "dontleavehmode", "dontpermitspacesbetweengroups", "dopositionaction", "doprocesslocalsetups", "doquadrupleargument", "doquadrupleempty", "doquadruplegroupempty", "doquintupleargument", "doquintupleempty", "doquintuplegroupempty", "dorechecknextindentation", "dorecurse", "dorepeatwithcommand", "doreplacefeature", "doresetandafffeature", "doresetattribute", "dorotatebox", "dosetattribute", "dosetleftskipadaption", "dosetrightskipadaption", "dosetupcheckedinterlinespace", "doseventupleargument", "doseventupleempty", "dosingleargument", "dosingleempty", "dosinglegroupempty", "dosixtupleargument", "dosixtupleempty", "dosomebreak", "dostepwiserecurse", "dosubtractfeature", "dot", "doteq", "doteqdot", "dotfill", "dotfskip", "dotlessI", "dotlessJ", "dotlessi", "dotlessj", "dotlessjstroke", "dotminus", "dotoks", "dotplus", "dotripleargument", "dotripleargumentwithset", "dotripleempty", "dotripleemptywithset", "dotriplegroupempty", "dots", "dottedcircle", "dottedrightarrow", "doublebar", "doublebond", "doublebrace", "doublebracket", "doublecap", "doublecup", "doubleparent", "doubleprime", "doubleverticalbar", "dowith", "dowithnextbox", "dowithnextboxcontent", "dowithnextboxcontentcs", "dowithnextboxcs", "dowithpargument", "dowithrange", "dowithwargument", "downarrow", "downdasharrow", "downdownarrows", "downharpoonleft", "downharpoonright", "downuparrows", "downwhitearrow", "downzigzagarrow", "dpofstring", "dstroke", "dtail", "dummydigit", "dummyparameter", "dzcaronligature", "dzligature", "eTeX", "eacute", "ebreve", "ecaron", "ecedilla", "ecircumflex", "ecircumflexacute", "ecircumflexdotbelow", "ecircumflexgrave", "ecircumflexhook", "ecircumflextilde", "edefconvertedargument", "ediaeresis", "edotaccent", "edotbelow", "edoublegrave", "efcmaxheight", "efcmaxwidth", "efcminheight", "efcminwidth", "efcparameter", "effect", "egrave", "ehook", "einvertedbreve", "elapsedseconds", "elapsedsteptime", "elapsedtime", "eleftarrowfill", "eleftharpoondownfill", "eleftharpoonupfill", "eleftrightarrowfill", "ell", "em", "emacron", "emdash", "emphasisboldface", "emphasistypeface", "emptylines", "emptyset", "emquad", "emspace", "enableasciimode", "enabledirectives", "enableexperiments", "enablemode", "enableoutputstream", "enableparpositions", "enableregime", "enabletrackers", "endash", "endnote", "enquad", "enskip", "enspace", "env", "environment", "envvar", "eogonek", "eoverbarfill", "eoverbracefill", "eoverbracketfill", "eoverparentfill", "epos", "epsilon", "eq", "eqcirc", "eqeq", "eqeqeq", "eqgtr", "eqless", "eqsim", "eqslantgtr", "eqslantless", "equaldigits", "equalscolon", "equiv", "erightarrowfill", "erightharpoondownfill", "erightharpoonupfill", "eta", "eth", "ethiopic", "etilde", "etwoheadrightarrowfill", "eunderbarfill", "eunderbracefill", "eunderbracketfill", "eunderparentfill", "exclamdown", "executeifdefined", "exists", "exitloop", "exitloopnow", "expandcheckedcsname", "expanded", "expandeddoif", "expandeddoifelse", "expandeddoifnot", "expandfontsynonym", "expdoif", "expdoifcommonelse", "expdoifelse", "expdoifelsecommon", "expdoifelseinset", "expdoifinsetelse", "expdoifnot", "exponentiale", "externalfigure", "externalfigurecollectionmaxheight", "externalfigurecollectionmaxwidth", "externalfigurecollectionminheight", "externalfigurecollectionminwidth", "externalfigurecollectionparameter", "fakebox", "fallingdotseq", "fastdecrement", "fastincrement", "fastlocalframed", "fastloopfinal", "fastloopindex", "fastscale", "fastsetup", "fastsetupwithargument", "fastsetupwithargumentswapped", "fastswitchtobodyfont", "fastsxsy", "feature", "fence", "fenced", "fetchallmarkings", "fetchallmarks", "fetchmark", "fetchmarking", "fetchonemark", "fetchonemarking", "fetchruntinecommand", "fetchtwomarkings", "fetchtwomarks", "ffiligature", "ffligature", "fflligature", "fhook", "field", "fieldbody", "fieldstack", "fifthoffivearguments", "fifthofsixarguments", "figurefilename", "figurefilepath", "figurefiletype", "figurefullname", "figureheight", "figurenaturalheight", "figurenaturalwidth", "figurespace", "figuresymbol", "figurewidth", "filename", "filigature", "filledhboxb", "filledhboxc", "filledhboxg", "filledhboxk", "filledhboxm", "filledhboxr", "filledhboxy", "filler", "fillinline", "fillinrules", "fillintext", "fillupto", "filterfromnext", "filterfromvalue", "filterpages", "filterreference", "findtwopassdata", "finishregisterentry", "firstcharacter", "firstcounter", "firstcountervalue", "firstinlist", "firstoffivearguments", "firstoffourarguments", "firstofoneargument", "firstofoneunexpanded", "firstofsixarguments", "firstofthreearguments", "firstofthreeunexpanded", "firstoftwoarguments", "firstoftwounexpanded", "firstrealpage", "firstrealpagenumber", "firstsubcountervalue", "firstsubpage", "firstsubpagenumber", "firstuserpage", "firstuserpagenumber", "fitfield", "fitfieldframed", "fittopbaselinegrid", "fiveeighths", "fivesixths", "fixedspace", "fixedspaces", "flag", "flat", "flligature", "floatuserdataparameter", "flushbox", "flushboxregister", "flushcollector", "flushedrightlastline", "flushlayer", "flushlocalfloats", "flushnextbox", "flushnotes", "flushoutputstream", "flushshapebox", "flushtextflow", "flushtokens", "flushtoks", "fontalternative", "fontbody", "fontchar", "fontcharbyindex", "fontclass", "fontclassname", "fontface", "fontfeaturelist", "fontsize", "fontstyle", "footnote", "footnotetext", "forall", "forcecharacterstripping", "forcelocalfloats", "forgeteverypar", "forgetparagraphfreezing", "forgetparameters", "forgetparskip", "forgetparwrapper", "forgetragged", "formula", "formulanumber", "foundbox", "fourfifths", "fourperemspace", "fourthoffivearguments", "fourthoffourarguments", "fourthofsixarguments", "frac", "framed", "frameddimension", "framedparameter", "framedtext", "freezedimenmacro", "freezemeasure", "freezeparagraphproperties", "frenchspacing", "from", "fromlinenote", "frown", "frozenhbox", "frule", "gacute", "gamma", "gbreve", "gcaron", "gcircumflex", "gcommaaccent", "gdefconvertedargument", "gdefconvertedcommand", "gdotaccent", "ge", "geq", "geqq", "geqslant", "getMPdrawing", "getMPlayer", "getboxfromcache", "getboxllx", "getboxlly", "getbuffer", "getbufferdata", "getcommacommandsize", "getcommalistsize", "getdatavalue", "getdayoftheweek", "getdayspermonth", "getdefinedbuffer", "getdocumentargument", "getdocumentargumentdefault", "getdocumentfilename", "getdummyparameters", "getemptyparameters", "geteparameters", "getexpandedparameters", "getfiguredimensions", "getfirstcharacter", "getfirsttwopassdata", "getfromcommacommand", "getfromcommalist", "getfromluatable", "getfromtwopassdata", "getglyphdirect", "getglyphstyled", "getgparameters", "getinlineuserdata", "getlasttwopassdata", "getlocalfloat", "getlocalfloats", "getmarking", "getmessage", "getnamedglyphdirect", "getnamedglyphstyled", "getnamedtwopassdatalist", "getnaturaldimensions", "getnoflines", "getobject", "getobjectdimensions", "getpaletsize", "getparameters", "getparwrapper", "getprivatechar", "getprivateslot", "getrandomcount", "getrandomdimen", "getrandomfloat", "getrandomnumber", "getrandomseed", "getraweparameters", "getrawgparameters", "getrawnoflines", "getrawparameters", "getrawxparameters", "getreference", "getreferenceentry", "getroundednoflines", "gets", "getsubstring", "gettokenlist", "gettwopassdata", "gettwopassdatalist", "getuserdata", "getuvalue", "getvalue", "getvariable", "getvariabledefault", "getxparameters", "gg", "ggg", "gggtr", "gimel", "globaldisablemode", "globalenablemode", "globalletempty", "globalpopbox", "globalpopmacro", "globalpreventmode", "globalprocesscommalist", "globalpushbox", "globalpushmacro", "globalswapcounts", "globalswapdimens", "globalswapmacros", "globalundefine", "glyphfontfile", "gnapprox", "gneqq", "gnsim", "gobbledoubleempty", "gobbleeightarguments", "gobblefivearguments", "gobblefiveoptionals", "gobblefourarguments", "gobblefouroptionals", "gobbleninearguments", "gobbleoneargument", "gobbleoneoptional", "gobblesevenarguments", "gobblesingleempty", "gobblesixarguments", "gobblespacetokens", "gobbletenarguments", "gobblethreearguments", "gobblethreeoptionals", "gobbletwoarguments", "gobbletwooptionals", "gobbleuntil", "gobbleuntilrelax", "godown", "goto", "gotobox", "gotopage", "grabbufferdata", "grabbufferdatadirect", "grabuntil", "grave", "graycolor", "grayvalue", "greedysplitstring", "greekAlpha", "greekAlphadasia", "greekAlphadasiaperispomeni", "greekAlphadasiatonos", "greekAlphadasiavaria", "greekAlphaiotasub", "greekAlphaiotasubdasia", "greekAlphaiotasubdasiaperispomeni", "greekAlphaiotasubdasiatonos", "greekAlphaiotasubdasiavaria", "greekAlphaiotasubpsili", "greekAlphaiotasubpsiliperispomeni", "greekAlphaiotasubpsilitonos", "greekAlphaiotasubpsilivaria", "greekAlphamacron", "greekAlphapsili", "greekAlphapsiliperispomeni", "greekAlphapsilitonos", "greekAlphapsilivaria", "greekAlphatonos", "greekAlphavaria", "greekAlphavrachy", "greekBeta", "greekChi", "greekCoronis", "greekDelta", "greekEpsilon", "greekEpsilondasia", "greekEpsilondasiatonos", "greekEpsilondasiavaria", "greekEpsilonpsili", "greekEpsilonpsilitonos", "greekEpsilonpsilivaria", "greekEpsilontonos", "greekEpsilonvaria", "greekEta", "greekEtadasia", "greekEtadasiaperispomeni", "greekEtadasiatonos", "greekEtadasiavaria", "greekEtaiotasub", "greekEtaiotasubdasia", "greekEtaiotasubdasiaperispomeni", "greekEtaiotasubdasiatonos", "greekEtaiotasubdasiavaria", "greekEtaiotasubpsili", "greekEtaiotasubpsiliperispomeni", "greekEtaiotasubpsilitonos", "greekEtaiotasubpsilivaria", "greekEtapsili", "greekEtapsiliperispomeni", "greekEtapsilitonos", "greekEtapsilivaria", "greekEtatonos", "greekEtavaria", "greekGamma", "greekIota", "greekIotadasia", "greekIotadasiaperispomeni", "greekIotadasiatonos", "greekIotadasiavaria", "greekIotadialytika", "greekIotamacron", "greekIotapsili", "greekIotapsiliperispomeni", "greekIotapsilitonos", "greekIotapsilivaria", "greekIotatonos", "greekIotavaria", "greekIotavrachy", "greekKappa", "greekLambda", "greekMu", "greekNu", "greekOmega", "greekOmegadasia", "greekOmegadasiaperispomeni", "greekOmegadasiatonos", "greekOmegadasiavaria", "greekOmegaiotasub", "greekOmegaiotasubdasia", "greekOmegaiotasubdasiaperispomeni", "greekOmegaiotasubdasiatonos", "greekOmegaiotasubdasiavaria", "greekOmegaiotasubpsili", "greekOmegaiotasubpsiliperispomeni", "greekOmegaiotasubpsilitonos", "greekOmegaiotasubpsilivaria", "greekOmegapsili", "greekOmegapsiliperispomeni", "greekOmegapsilitonos", "greekOmegapsilivaria", "greekOmegatonos", "greekOmegavaria", "greekOmicron", "greekOmicrondasia", "greekOmicrondasiatonos", "greekOmicrondasiavaria", "greekOmicronpsili", "greekOmicronpsilitonos", "greekOmicronpsilivaria", "greekOmicrontonos", "greekOmicronvaria", "greekPhi", "greekPi", "greekPsi", "greekRho", "greekRhodasia", "greekSigma", "greekSigmalunate", "greekTau", "greekTheta", "greekUpsilon", "greekUpsilondasia", "greekUpsilondasiaperispomeni", "greekUpsilondasiatonos", "greekUpsilondasiavaria", "greekUpsilondialytika", "greekUpsilonmacron", "greekUpsilontonos", "greekUpsilonvaria", "greekUpsilonvrachy", "greekXi", "greekZeta", "greekalpha", "greekalphadasia", "greekalphadasiaperispomeni", "greekalphadasiatonos", "greekalphadasiavaria", "greekalphaiotasub", "greekalphaiotasubdasia", "greekalphaiotasubdasiaperispomeni", "greekalphaiotasubdasiatonos", "greekalphaiotasubdasiavaria", "greekalphaiotasubperispomeni", "greekalphaiotasubpsili", "greekalphaiotasubpsiliperispomeni", "greekalphaiotasubpsilitonos", "greekalphaiotasubpsilivaria", "greekalphaiotasubtonos", "greekalphaiotasubvaria", "greekalphamacron", "greekalphaoxia", "greekalphaperispomeni", "greekalphapsili", "greekalphapsiliperispomeni", "greekalphapsilitonos", "greekalphapsilivaria", "greekalphatonos", "greekalphavaria", "greekalphavrachy", "greekbeta", "greekbetaalt", "greekchi", "greekdasia", "greekdasiaperispomeni", "greekdasiavaria", "greekdelta", "greekdialytikaperispomeni", "greekdialytikatonos", "greekdialytikavaria", "greekdigamma", "greekepsilon", "greekepsilonalt", "greekepsilondasia", "greekepsilondasiatonos", "greekepsilondasiavaria", "greekepsilonoxia", "greekepsilonpsili", "greekepsilonpsilitonos", "greekepsilonpsilivaria", "greekepsilontonos", "greekepsilonvaria", "greeketa", "greeketadasia", "greeketadasiaperispomeni", "greeketadasiatonos", "greeketadasiavaria", "greeketaiotasub", "greeketaiotasubdasia", "greeketaiotasubdasiaperispomeni", "greeketaiotasubdasiatonos", "greeketaiotasubdasiavaria", "greeketaiotasubperispomeni", "greeketaiotasubpsili", "greeketaiotasubpsiliperispomeni", "greeketaiotasubpsilitonos", "greeketaiotasubpsilivaria", "greeketaiotasubtonos", "greeketaiotasubvaria", "greeketaoxia", "greeketaperispomeni", "greeketapsili", "greeketapsiliperispomeni", "greeketapsilitonos", "greeketapsilivaria", "greeketatonos", "greeketavaria", "greekfinalsigma", "greekgamma", "greekiota", "greekiotadasia", "greekiotadasiaperispomeni", "greekiotadasiatonos", "greekiotadasiavaria", "greekiotadialytika", "greekiotadialytikaperispomeni", "greekiotadialytikatonos", "greekiotadialytikavaria", "greekiotamacron", "greekiotaoxia", "greekiotaperispomeni", "greekiotapsili", "greekiotapsiliperispomeni", "greekiotapsilitonos", "greekiotapsilivaria", "greekiotatonos", "greekiotavaria", "greekiotavrachy", "greekkappa", "greekkoppa", "greeklambda", "greekmu", "greeknu", "greeknumerals", "greeknumkoppa", "greekomega", "greekomegadasia", "greekomegadasiaperispomeni", "greekomegadasiatonos", "greekomegadasiavaria", "greekomegaiotasub", "greekomegaiotasubdasia", "greekomegaiotasubdasiaperispomeni", "greekomegaiotasubdasiatonos", "greekomegaiotasubdasiavaria", "greekomegaiotasubperispomeni", "greekomegaiotasubpsili", "greekomegaiotasubpsiliperispomeni", "greekomegaiotasubpsilitonos", "greekomegaiotasubpsilivaria", "greekomegaiotasubtonos", "greekomegaiotasubvaria", "greekomegaoxia", "greekomegaperispomeni", "greekomegapsili", "greekomegapsiliperispomeni", "greekomegapsilitonos", "greekomegapsilivaria", "greekomegatonos", "greekomegavaria", "greekomicron", "greekomicrondasia", "greekomicrondasiatonos", "greekomicrondasiavaria", "greekomicronoxia", "greekomicronpsili", "greekomicronpsilitonos", "greekomicronpsilivaria", "greekomicrontonos", "greekomicronvaria", "greekoxia", "greekperispomeni", "greekphi", "greekphialt", "greekpi", "greekpialt", "greekprosgegrammeni", "greekpsi", "greekpsili", "greekpsiliperispomeni", "greekpsilivaria", "greekrho", "greekrhoalt", "greekrhodasia", "greekrhopsili", "greeksampi", "greeksigma", "greeksigmalunate", "greekstigma", "greektau", "greektheta", "greekthetaalt", "greektonos", "greekupsilon", "greekupsilondasia", "greekupsilondasiaperispomeni", "greekupsilondasiatonos", "greekupsilondasiavaria", "greekupsilondiaeresis", "greekupsilondialytikaperispomeni", "greekupsilondialytikatonos", "greekupsilondialytikavaria", "greekupsilonmacron", "greekupsilonoxia", "greekupsilonperispomeni", "greekupsilonpsili", "greekupsilonpsiliperispomeni", "greekupsilonpsilitonos", "greekupsilonpsilivaria", "greekupsilontonos", "greekupsilonvaria", "greekupsilonvrachy", "greekvaria", "greekxi", "greekzeta", "grid", "groupedcommand", "gsetboxllx", "gsetboxlly", "gstroke", "gt", "gtrapprox", "gtrdot", "gtreqless", "gtreqqless", "gtrless", "gtrsim", "guilsingleleft", "guilsingleright", "gujaratinumerals", "gurmurkhinumerals", "hairline", "hairspace", "halflinestrut", "halfstrut", "halfwaybox", "handletokens", "handwritten", "hangul", "hanzi", "hash", "hat", "hbar", "hboxofvbox", "hboxreference", "hcaron", "hcircumflex", "hdofstring", "headhbox", "headlanguage", "headnumber", "headnumbercontent", "headnumberdistance", "headnumberwidth", "headreferenceattributes", "headsetupspacing", "headtext", "headtextcontent", "headtextdistance", "headtexts", "headtextwidth", "headvbox", "headwidth", "heartsuit", "hebrewAlef", "hebrewAyin", "hebrewBet", "hebrewDalet", "hebrewGimel", "hebrewHe", "hebrewHet", "hebrewKaf", "hebrewKaffinal", "hebrewLamed", "hebrewMem", "hebrewMemfinal", "hebrewNun", "hebrewNunfinal", "hebrewPe", "hebrewPefinal", "hebrewQof", "hebrewResh", "hebrewSamekh", "hebrewShin", "hebrewTav", "hebrewTet", "hebrewTsadi", "hebrewTsadifinal", "hebrewVav", "hebrewYod", "hebrewZayin", "hebrewnumerals", "heightanddepthofstring", "heightofstring", "heightspanningtext", "helptext", "hexnumber", "hexstringtonumber", "hglue", "hiddenbar", "hiddencitation", "hiddencite", "hideblocks", "high", "highlight", "highordinalstr", "hilo", "himilo", "hl", "hookleftarrow", "hookrightarrow", "horizontalgrowingbar", "horizontalpositionbar", "hpackbox", "hpackedbox", "hphantom", "hpos", "hsizefraction", "hslash", "hsmash", "hsmashbox", "hsmashed", "hspace", "hstroke", "htdpofstring", "htofstring", "hyphen", "hyphenatedcoloredword", "hyphenatedfile", "hyphenatedfilename", "hyphenatedhbox", "hyphenatedpar", "hyphenatedurl", "hyphenatedword", "iacute", "ibox", "ibreve", "icaron", "icircumflex", "ideographichalffillspace", "ideographicspace", "idiaeresis", "idotaccent", "idotbelow", "idoublegrave", "idxfromluatable", "ifassignment", "iff", "ifinobject", "ifinoutputstream", "ifparameters", "iftrialtypesetting", "ignoreimplicitspaces", "ignoretagsinexport", "ignorevalue", "igrave", "ihook", "iiiint", "iiiintop", "iiint", "iiintop", "iint", "iintop", "iinvertedbreve", "ijligature", "imacron", "imaginaryi", "imaginaryj", "imath", "immediatesavetwopassdata", "impliedby", "implies", "imply", "in", "includemenu", "includesvgbuffer", "includesvgfile", "includeversioninfo", "increment", "incrementcounter", "incrementedcounter", "incrementpagenumber", "incrementsubpagenumber", "incrementvalue", "indentation", "index", "infofont", "infofontbold", "inframed", "infty", "infull", "inheritparameter", "inhibitblank", "ininner", "ininneredge", "ininnermargin", "initializeboxstack", "inleft", "inleftedge", "inleftmargin", "inline", "inlinebuffer", "inlinedbox", "inlinemath", "inlinemathematics", "inlinemessage", "inlineordisplaymath", "inlineprettyprintbuffer", "inlinerange", "inmargin", "inmframed", "innerflushshapebox", "inother", "inouter", "inouteredge", "inoutermargin", "input", "inputfilebarename", "inputfilename", "inputfilerealsuffix", "inputfilesuffix", "inputgivenfile", "inright", "inrightedge", "inrightmargin", "insertpages", "inspectluatable", "installactionhandler", "installactivecharacter", "installanddefineactivecharacter", "installattributestack", "installautocommandhandler", "installautosetuphandler", "installbasicautosetuphandler", "installbasicparameterhandler", "installbottomframerenderer", "installcommandhandler", "installcorenamespace", "installctxfunction", "installctxscanner", "installdefinehandler", "installdefinitionset", "installdefinitionsetmember", "installdirectcommandhandler", "installdirectparameterhandler", "installdirectparametersethandler", "installdirectsetuphandler", "installdirectstyleandcolorhandler", "installframedautocommandhandler", "installframedcommandhandler", "installglobalmacrostack", "installlanguage", "installleftframerenderer", "installmacrostack", "installnamespace", "installoutputroutine", "installpagearrangement", "installparameterhandler", "installparameterhashhandler", "installparametersethandler", "installparentinjector", "installprotectedctxfunction", "installprotectedctxscanner", "installrightframerenderer", "installrootparameterhandler", "installsetuphandler", "installsetuponlycommandhandler", "installshipoutmethod", "installsimplecommandhandler", "installsimpleframedcommandhandler", "installstyleandcolorhandler", "installswitchcommandhandler", "installswitchsetuphandler", "installtexdirective", "installtextracker", "installtopframerenderer", "installunitsseparator", "installunitsspace", "installversioninfo", "int", "intclockwise", "integerrounding", "integers", "interactionbar", "interactionbuttons", "interactionmenu", "intercal", "intertext", "interwordspaceafter", "interwordspacebefore", "interwordspaces", "interwordspacesafter", "interwordspacesbefore", "intop", "invisibletimes", "invokepagehandler", "iogonek", "iota", "italic", "italicbold", "italiccorrection", "italicface", "item", "items", "itemtag", "itilde", "jcaron", "jcircumflex", "jmath", "jobfilename", "jobfilesuffix", "kap", "kappa", "kcaron", "kcommaaccent", "keepblocks", "keeplinestogether", "keepunwantedspaces", "kerncharacters", "khook", "kkra", "koreancirclenumerals", "koreannumerals", "koreannumeralsc", "koreannumeralsp", "koreanparentnumerals", "lVert", "labellanguage", "labeltext", "labeltexts", "lacute", "lambda", "lambdabar", "land", "langle", "language", "languageCharacters", "languagecharacters", "languagecharwidth", "lastcounter", "lastcountervalue", "lastdigit", "lastlinewidth", "lastnaturalboxdp", "lastnaturalboxht", "lastnaturalboxwd", "lastparwrapper", "lastpredefinedsymbol", "lastrealpage", "lastrealpagenumber", "lastsubcountervalue", "lastsubpage", "lastsubpagenumber", "lasttwodigits", "lastuserpage", "lastuserpagenumber", "lateluacode", "latin", "layeredtext", "layerheight", "layerwidth", "lazysavetaggedtwopassdata", "lazysavetwopassdata", "lbar", "lbox", "lbrace", "lbracket", "lcaron", "lceil", "lchexnumber", "lchexnumbers", "lcommaaccent", "lcurl", "ldotmiddle", "ldotp", "ldots", "le", "leadsto", "left", "leftaligned", "leftarrow", "leftarrowtail", "leftarrowtriangle", "leftbottombox", "leftbox", "leftdasharrow", "leftguillemot", "leftharpoondown", "leftharpoonup", "lefthbox", "leftheadtext", "leftlabeltext", "leftleftarrows", "leftline", "leftmathlabeltext", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "leftrightarrow", "leftrightarrows", "leftrightarrowtriangle", "leftrightharpoons", "leftrightsquigarrow", "leftskipadaption", "leftsquigarrow", "leftsubguillemot", "leftthreetimes", "lefttopbox", "lefttoright", "lefttorighthbox", "lefttorightvbox", "lefttorightvtop", "leftwavearrow", "leftwhitearrow", "leq", "leqq", "leqslant", "lessapprox", "lessdot", "lesseqgtr", "lesseqqgtr", "lessgtr", "lesssim", "letbeundefined", "letcatcodecommand", "letcscsname", "letcsnamecs", "letcsnamecsname", "letdummyparameter", "letempty", "letgvalue", "letgvalueempty", "letgvalurelax", "letterampersand", "letterat", "letterbackslash", "letterbar", "letterbgroup", "letterclosebrace", "lettercolon", "letterdollar", "letterdoublequote", "letteregroup", "letterescape", "letterexclamationmark", "letterhash", "letterhat", "letterleftbrace", "letterleftbracket", "letterleftparenthesis", "letterless", "lettermore", "letteropenbrace", "letterpercent", "letterquestionmark", "letterrightbrace", "letterrightbracket", "letterrightparenthesis", "lettersinglequote", "letterslash", "letterspacing", "lettertilde", "letterunderscore", "letvalue", "letvalueempty", "letvaluerelax", "lfence", "lfloor", "lgroup", "lhbox", "lhooknwarrow", "lhooksearrow", "limitatefirstline", "limitatelines", "limitatetext", "line", "linebox", "linefeed", "linefillerhbox", "linefillervbox", "linefillervtop", "linenote", "linespanningtext", "linethickness", "linterval", "listcitation", "listcite", "listlength", "listnamespaces", "literalmode", "ljligature", "ll", "llangle", "llap", "llbracket", "llcorner", "lll", "llless", "llointerval", "lmoustache", "lnapprox", "lneq", "lneqq", "lnot", "lnsim", "loadanyfile", "loadanyfileonce", "loadbtxdefinitionfile", "loadbtxreplacementfile", "loadcldfile", "loadcldfileonce", "loadfontgoodies", "loadluafile", "loadluafileonce", "loadspellchecklist", "loadtexfile", "loadtexfileonce", "loadtypescriptfile", "localframed", "localframedwithsettings", "localhsize", "localpopbox", "localpopmacro", "localpushbox", "localpushmacro", "localundefine", "locatedfilepath", "locatefilepath", "locfilename", "logo", "lohi", "lointerval", "lomihi", "longleftarrow", "longleftrightarrow", "longmapsfrom", "longmapsto", "longrightarrow", "longrightsquigarrow", "looparrowleft", "looparrowright", "lor", "low", "lowerbox", "lowercased", "lowercasestring", "lowercasing", "lowerleftdoubleninequote", "lowerleftsingleninequote", "lowerrightdoubleninequote", "lowerrightsingleninequote", "lozenge", "lparent", "lrcorner", "lrointerval", "lrtbbox", "lstroke", "lt", "ltimes", "ltop", "ltrhbox", "ltrvbox", "ltrvtop", "luaTeX", "luacode", "luaconditional", "luaenvironment", "luaexpanded", "luaexpr", "luafunction", "luajitTeX", "luamajorversion", "luametaTeX", "luaminorversion", "luaparameterset", "luasetup", "luaversion", "lvert", "m", "mLeftarrow", "mLeftrightarrow", "mRightarrow", "mainlanguage", "makecharacteractive", "makerawcommalist", "makestrutofbox", "maltese", "mapfontsize", "mapsdown", "mapsfrom", "mapsto", "mapsup", "margindata", "margintext", "markcontent", "markedpages", "marking", "markinjector", "markpage", "markreferencepage", "mat", "math", "mathampersand", "mathbf", "mathbi", "mathblackboard", "mathbs", "mathdefault", "mathdollar", "mathdouble", "mathematics", "mathfraktur", "mathfunction", "mathhash", "mathhyphen", "mathit", "mathitalic", "mathlabellanguage", "mathlabeltext", "mathlabeltexts", "mathop", "mathover", "mathpercent", "mathrm", "mathscript", "mathsl", "mathss", "mathtext", "mathtextbf", "mathtextbi", "mathtextbs", "mathtextit", "mathtextsl", "mathtexttf", "mathtf", "mathtriplet", "mathtt", "mathunder", "mathupright", "mathword", "mathwordbf", "mathwordbi", "mathwordbs", "mathwordit", "mathwordsl", "mathwordtf", "maxaligned", "mbox", "mcframed", "measure", "measured", "measuredangle", "measuredeq", "medskip", "medspace", "menubutton", "mequal", "message", "mfence", "mframed", "mfunction", "mfunctionlabeltext", "mhbox", "mho", "mhookleftarrow", "mhookrightarrow", "mid", "midaligned", "middle", "middlealigned", "middlebox", "midhbox", "midsubsentence", "minimalhbox", "minus", "minuscolon", "mirror", "mixedcaps", "mkvibuffer", "mleftarrow", "mleftharpoondown", "mleftharpoonup", "mleftrightarrow", "mleftrightharpoons", "mmapsto", "models", "moduleparameter", "molecule", "mono", "monobold", "mononormal", "month", "monthlong", "monthshort", "mp", "mprandomnumber", "mrel", "mrightarrow", "mrightharpoondown", "mrightharpoonup", "mrightleftharpoons", "mrightoverleftarrow", "mtext", "mtriplerel", "mtwoheadleftarrow", "mtwoheadrightarrow", "mu", "multimap", "nHdownarrow", "nHuparrow", "nLeftarrow", "nLeftrightarrow", "nRightarrow", "nVDash", "nVdash", "nVleftarrow", "nVleftrightarrow", "nVrightarrow", "nabla", "nacute", "namedheadnumber", "namedstructureheadlocation", "namedstructureuservariable", "namedstructurevariable", "namedtaggedlabeltexts", "napostrophe", "napprox", "napproxEq", "narrownobreakspace", "nasymp", "natural", "naturalhbox", "naturalhpack", "naturalnumbers", "naturaltpack", "naturalvbox", "naturalvcenter", "naturalvpack", "naturalvtop", "naturalwd", "ncaron", "ncommaaccent", "ncong", "ncurl", "ndivides", "ne", "nearrow", "neg", "negatecolorbox", "negated", "negativesign", "negemspace", "negenspace", "negthinspace", "neng", "neq", "nequiv", "neswarrow", "newattribute", "newcatcodetable", "newcounter", "newevery", "newfrenchspacing", "newluatable", "newmode", "newsignal", "newsystemmode", "nexists", "nextbox", "nextboxdp", "nextboxht", "nextboxhtdp", "nextboxwd", "nextcounter", "nextcountervalue", "nextdepth", "nextparagraphs", "nextrealpage", "nextrealpagenumber", "nextsubcountervalue", "nextsubpage", "nextsubpagenumber", "nextuserpage", "nextuserpagenumber", "ngeq", "ngrave", "ngtr", "ngtrless", "ngtrsim", "ni", "nihongo", "nin", "njligature", "nleftarrow", "nleftrightarrow", "nleq", "nless", "nlessgtr", "nlesssim", "nmid", "nni", "nobar", "nobreakspace", "nocap", "nocharacteralign", "nocitation", "nocite", "nodetostring", "noffigurepages", "noflines", "noflinesinbox", "noflocalfloats", "noheaderandfooterlines", "noheightstrut", "nohyphens", "noindentation", "noitem", "nonfrenchspacing", "nonmathematics", "nonvalidassignment", "normal", "normalboldface", "normalframedwithsettings", "normalitalicface", "normalizebodyfontsize", "normalizedfontsize", "normalizefontdepth", "normalizefontheight", "normalizefontline", "normalizefontwidth", "normalizetextdepth", "normalizetextheight", "normalizetextline", "normalizetextwidth", "normalslantedface", "normaltypeface", "nospace", "not", "note", "notesymbol", "notin", "notopandbottomlines", "notragged", "nowns", "nparallel", "nprec", "npreccurlyeq", "nrightarrow", "nsim", "nsimeq", "nsqsubseteq", "nsqsupseteq", "nsubset", "nsubseteq", "nsucc", "nsucccurlyeq", "nsupset", "nsupseteq", "ntilde", "ntimes", "ntriangleleft", "ntrianglelefteq", "ntriangleright", "ntrianglerighteq", "nu", "numberofpoints", "numbers", "nvDash", "nvdash", "nvleftarrow", "nvleftrightarrow", "nvrightarrow", "nwarrow", "nwsearrow", "oacute", "obeydepth", "objectdepth", "objectheight", "objectmargin", "objectwidth", "obox", "obreve", "ocaron", "ocircumflex", "ocircumflexacute", "ocircumflexdotbelow", "ocircumflexgrave", "ocircumflexhook", "ocircumflextilde", "octnumber", "octstringtonumber", "odiaeresis", "odiaeresismacron", "odot", "odotaccent", "odotaccentmacron", "odotbelow", "odoublegrave", "oeligature", "offset", "offsetbox", "ograve", "ohm", "ohook", "ohorn", "ohornacute", "ohorndotbelow", "ohorngrave", "ohornhook", "ohorntilde", "ohungarumlaut", "oiiint", "oiint", "oint", "ointclockwise", "ointctrclockwise", "oinvertedbreve", "omacron", "omega", "omicron", "ominus", "onedigitrounding", "oneeighth", "onefifth", "onehalf", "onequarter", "onesixth", "onesuperior", "onethird", "oogonek", "oogonekmacron", "operatorlanguage", "operatortext", "oplus", "ordfeminine", "ordinaldaynumber", "ordinalstr", "ordmasculine", "ornamenttext", "oslash", "ostroke", "ostrokeacute", "otilde", "otildemacron", "otimes", "outputfilename", "outputstreambox", "outputstreamcopy", "outputstreamunvbox", "outputstreamunvcopy", "over", "overbar", "overbars", "overbartext", "overbarunderbar", "overbrace", "overbracetext", "overbraceunderbrace", "overbracket", "overbrackettext", "overbracketunderbracket", "overlaybutton", "overlaycolor", "overlaydepth", "overlayfigure", "overlayheight", "overlayimage", "overlaylinecolor", "overlaylinewidth", "overlayoffset", "overlayrollbutton", "overlaywidth", "overleftarrow", "overleftharpoondown", "overleftharpoonup", "overleftrightarrow", "overloaderror", "overparent", "overparenttext", "overparentunderparent", "overrightarrow", "overrightharpoondown", "overrightharpoonup", "overset", "overstrike", "overstrikes", "overtwoheadleftarrow", "overtwoheadrightarrow", "owns", "page", "pagearea", "pagebreak", "pagefigure", "pageinjection", "pagenumber", "pagereference", "pagestaterealpage", "pagestaterealpageorder", "paletsize", "paragraphmark", "parallel", "part", "partial", "pdfTeX", "pdfactualtext", "pdfbackendactualtext", "pdfbackendcurrentresources", "pdfbackendsetcatalog", "pdfbackendsetcolorspace", "pdfbackendsetextgstate", "pdfbackendsetinfo", "pdfbackendsetname", "pdfbackendsetpageattribute", "pdfbackendsetpageresource", "pdfbackendsetpagesattribute", "pdfbackendsetpattern", "pdfbackendsetshade", "pdfcolor", "pdfeTeX", "percent", "percentdimen", "periodcentered", "periods", "permitcaretescape", "permitcircumflexescape", "permitspacesbetweengroups", "perp", "persiandecimals", "persiandecimalseparator", "persiannumerals", "persianthousandsseparator", "perthousand", "phantom", "phantombox", "phi", "phook", "pi", "pickupgroupedcommand", "pitchfork", "placeattachments", "placebookmarks", "placebtxrendering", "placechemical", "placecitation", "placecombinedlist", "placecomments", "placecontent", "placecurrentformulanumber", "placedbox", "placefigure", "placefloat", "placefloatcaption", "placefloatwithsetups", "placefootnotes", "placeformula", "placeframed", "placegraphic", "placeheadnumber", "placeheadtext", "placehelp", "placeholder", "placeindex", "placeinitial", "placeintermezzo", "placelayer", "placelayeredtext", "placelegend", "placelist", "placelistofabbreviations", "placelistofchemicals", "placelistoffigures", "placelistofgraphics", "placelistofintermezzi", "placelistoflogos", "placelistofpublications", "placelistofsorts", "placelistofsynonyms", "placelistoftables", "placelocalfootnotes", "placelocalnotes", "placement", "placenamedfloat", "placenamedformula", "placenotes", "placeongrid", "placeontopofeachother", "placepagenumber", "placepairedbox", "placeparallel", "placerawheaddata", "placerawheadnumber", "placerawheadtext", "placerawlist", "placeregister", "placerenderingwindow", "placesidebyside", "placesubformula", "placetable", "pm", "popattribute", "popmacro", "popmode", "popsystemmode", "position", "positionoverlay", "positionregionoverlay", "positivesign", "postponenotes", "prec", "precapprox", "preccurlyeq", "preceq", "preceqq", "precnapprox", "precneq", "precneqq", "precnsim", "precsim", "predefinedfont", "predefinefont", "predefinesymbol", "prefixedpagenumber", "prefixlanguage", "prefixtext", "prependetoks", "prependgvalue", "prependtocommalist", "prependtoks", "prependtoksonce", "prependvalue", "prerollblank", "presetbtxlabeltext", "presetdocument", "presetfieldsymbols", "presetheadtext", "presetlabeltext", "presetmathlabeltext", "presetoperatortext", "presetprefixtext", "presetsuffixtext", "presettaglabeltext", "presetunittext", "pretocommalist", "prettyprintbuffer", "prevcounter", "prevcountervalue", "preventmode", "prevrealpage", "prevrealpagenumber", "prevsubcountervalue", "prevsubpage", "prevsubpagenumber", "prevuserpage", "prevuserpagenumber", "prime", "primes", "procent", "processMPbuffer", "processMPfigurefile", "processaction", "processallactionsinset", "processassignlist", "processassignmentcommand", "processassignmentlist", "processbetween", "processblocks", "processbodyfontenvironmentlist", "processcolorcomponents", "processcommacommand", "processcommalist", "processcommalistwithparameters", "processcontent", "processfile", "processfilemany", "processfilenone", "processfileonce", "processfirstactioninset", "processisolatedchars", "processisolatedwords", "processlinetablebuffer", "processlinetablefile", "processlist", "processmonth", "processranges", "processseparatedlist", "processtexbuffer", "processtokens", "processuntil", "processxtablebuffer", "processyear", "prod", "product", "profiledbox", "profilegivenbox", "program", "project", "propto", "pseudoMixedCapped", "pseudoSmallCapped", "pseudoSmallcapped", "pseudosmallcapped", "psi", "punctuationspace", "purenumber", "pushattribute", "pushbutton", "pushmacro", "pushmode", "pushoutputstream", "pushsystemmode", "putboxincache", "putnextboxincache", "qquad", "quad", "quadrupleprime", "quads", "quarterstrut", "questiondown", "questionedeq", "quitcommalist", "quitprevcommalist", "quittypescriptscanning", "quotation", "quote", "quotedbl", "quotedblbase", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "quotesingle", "quotesinglebase", "rVert", "racute", "raggedbottom", "raggedcenter", "raggedleft", "raggedright", "raggedwidecenter", "raisebox", "randomizetext", "randomnumber", "rangle", "rationals", "rawcounter", "rawcountervalue", "rawdate", "rawdoifelseinset", "rawdoifinset", "rawdoifinsetelse", "rawgetparameters", "rawprocessaction", "rawprocesscommacommand", "rawprocesscommalist", "rawstructurelistuservariable", "rawsubcountervalue", "rbox", "rbrace", "rbracket", "rcaron", "rceil", "rcommaaccent", "rdoublegrave", "readfile", "readfixfile", "readjobfile", "readlocfile", "readsetfile", "readsysfile", "readtexfile", "readxmlfile", "realSmallCapped", "realSmallcapped", "realpagenumber", "reals", "realsmallcapped", "recursedepth", "recurselevel", "recursestring", "redoconvertfont", "ref", "reference", "referencecolumnnumber", "referencepagedetail", "referencepagestate", "referenceprefix", "referencerealpage", "referencesymbol", "referring", "registerattachment", "registerctxluafile", "registered", "registerexternalfigure", "registerfontclass", "registerhyphenationexception", "registerhyphenationpattern", "registermenubuttons", "registerparwrapper", "registerparwrapperreverse", "registersort", "registersynonym", "registerunit", "regular", "relatemarking", "relateparameterhandlers", "relaxvalueifundefined", "relbar", "remainingcharacters", "remark", "removebottomthings", "removedepth", "removefromcommalist", "removelastskip", "removelastspace", "removemarkedcontent", "removepunctuation", "removesubstring", "removetoks", "removeunwantedspaces", "repeathead", "replacefeature", "replaceincommalist", "replaceword", "rescan", "rescanwithsetup", "resetMPdrawing", "resetMPenvironment", "resetMPinstance", "resetallattributes", "resetandaddfeature", "resetbar", "resetboxesincache", "resetbreakpoints", "resetbuffer", "resetcharacteralign", "resetcharacterkerning", "resetcharacterspacing", "resetcharacterstripping", "resetcollector", "resetcounter", "resetctxscanner", "resetdigitsmanipulation", "resetdirection", "resetfeature", "resetflag", "resetfontcolorsheme", "resetfontfallback", "resetfontsolution", "resethyphenationfeatures", "resetinjector", "resetinteractionmenu", "resetitaliccorrection", "resetlayer", "resetlocalfloats", "resetmarker", "resetmarking", "resetmode", "resetpagenumber", "resetparallel", "resetpath", "resetpenalties", "resetperiodkerning", "resetprofile", "resetrecurselevel", "resetreference", "resetreplacements", "resetscript", "resetsetups", "resetshownsynonyms", "resetsubpagenumber", "resetsymbolset", "resetsystemmode", "resettimer", "resettokenlist", "resettrackers", "resettrialtypesetting", "resetusedsortings", "resetusedsynonyms", "resetuserpagenumber", "resetvalue", "resetvisualizers", "reshapebox", "resolvedglyphdirect", "resolvedglyphstyled", "restartcounter", "restorebox", "restorecatcodes", "restorecounter", "restorecurrentattributes", "restoreendofline", "restoreglobalbodyfont", "restriction", "retestfeature", "reusableMPgraphic", "reuseMPgraphic", "reuserandomseed", "reverseddoubleprime", "reversedprime", "reversedtripleprime", "reversehbox", "reversehpack", "reversetpack", "reversevbox", "reversevboxcontent", "reversevpack", "reversevtop", "revivefeature", "rfence", "rfloor", "rgroup", "rhbox", "rho", "rhooknearrow", "rhookswarrow", "right", "rightaligned", "rightangle", "rightarrow", "rightarrowbar", "rightarrowtail", "rightarrowtriangle", "rightbottombox", "rightbox", "rightdasharrow", "rightguillemot", "rightharpoondown", "rightharpoonup", "righthbox", "rightheadtext", "rightlabeltext", "rightleftarrows", "rightleftharpoons", "rightline", "rightmathlabeltext", "rightorleftpageaction", "rightpageorder", "rightrightarrows", "rightskipadaption", "rightsquigarrow", "rightsubguillemot", "rightthreearrows", "rightthreetimes", "righttoleft", "righttolefthbox", "righttoleftvbox", "righttoleftvtop", "righttopbox", "rightwavearrow", "rightwhitearrow", "ring", "rinterval", "rinvertedbreve", "risingdotseq", "rlap", "rlointerval", "rmoustache", "rneq", "robustaddtocommalist", "robustdoifelseinset", "robustdoifinsetelse", "robustpretocommalist", "rointerval", "rollbutton", "roman", "romanC", "romanD", "romanI", "romanII", "romanIII", "romanIV", "romanIX", "romanL", "romanM", "romanV", "romanVI", "romanVII", "romanVIII", "romanX", "romanXI", "romanXII", "romanc", "romand", "romani", "romanii", "romaniii", "romaniv", "romanix", "romanl", "romanm", "romannumerals", "romanv", "romanvi", "romanvii", "romanviii", "romanx", "romanxi", "romanxii", "rootradical", "rotate", "rparent", "rrangle", "rrbracket", "rrointerval", "rtimes", "rtlhbox", "rtlvbox", "rtlvtop", "rtop", "ruby", "ruledhbox", "ruledhpack", "ruledmbox", "ruledtopv", "ruledtpack", "ruledvbox", "ruledvpack", "ruledvtop", "runMPbuffer", "runninghbox", "russianNumerals", "russiannumerals", "rvert", "sacute", "safechar", "samplefile", "sans", "sansbold", "sansnormal", "sansserif", "savebox", "savebtxdataset", "savebuffer", "savecounter", "savecurrentattributes", "savenormalmeaning", "savetaggedtwopassdata", "savetwopassdata", "sbox", "scale", "scaron", "scedilla", "schwa", "schwahook", "scircumflex", "scommaaccent", "screen", "searrow", "secondoffivearguments", "secondoffourarguments", "secondofsixarguments", "secondofthreearguments", "secondofthreeunexpanded", "secondoftwoarguments", "secondoftwounexpanded", "section", "sectionmark", "seeindex", "select", "selectblocks", "serializecommalist", "serializedcommalist", "serif", "serifbold", "serifnormal", "setJSpreamble", "setMPlayer", "setMPpositiongraphic", "setMPpositiongraphicrange", "setMPtext", "setMPvariable", "setMPvariables", "setautopagestaterealpageno", "setbar", "setbigbodyfont", "setboxllx", "setboxlly", "setbreakpoints", "setcapstrut", "setcatcodetable", "setcharacteralign", "setcharacteraligndetail", "setcharactercasing", "setcharactercleaning", "setcharacterkerning", "setcharacterspacing", "setcharacterstripping", "setcharstrut", "setcollector", "setcolormodell", "setcounter", "setcounterown", "setctxluafunction", "setcurrentfontclass", "setdataset", "setdatavalue", "setdefaultpenalties", "setdigitsmanipulation", "setdirection", "setdocumentargument", "setdocumentargumentdefault", "setdocumentfilename", "setdummyparameter", "setelementexporttag", "setemeasure", "setevalue", "setevariable", "setevariables", "setexpansion", "setfirstline", "setfirstpasscharacteralign", "setflag", "setfont", "setfontcolorsheme", "setfontfeature", "setfontsolution", "setfontstrut", "setfractions", "setglobalscript", "setgmeasure", "setgvalue", "setgvariable", "setgvariables", "sethboxregister", "sethyphenatedurlafter", "sethyphenatedurlbefore", "sethyphenatedurlnormal", "sethyphenationfeatures", "setinitial", "setinjector", "setinteraction", "setinterfacecommand", "setinterfaceconstant", "setinterfaceelement", "setinterfacemessage", "setinterfacevariable", "setinternalrendering", "setitaliccorrection", "setlayer", "setlayerframed", "setlayertext", "setlinefiller", "setlocalhsize", "setlocalscript", "setluatable", "setmainbodyfont", "setmainparbuilder", "setmarker", "setmarking", "setmathstyle", "setmeasure", "setmessagetext", "setminus", "setmode", "setnostrut", "setnote", "setnotetext", "setobject", "setoldstyle", "setpagereference", "setpagestate", "setpagestaterealpageno", "setparagraphfreezing", "setpenalties", "setpercentdimen", "setperiodkerning", "setposition", "setpositionbox", "setpositiondata", "setpositiondataplus", "setpositiononly", "setpositionplus", "setpositionstrut", "setprofile", "setrandomseed", "setreference", "setreferencedobject", "setregisterentry", "setreplacements", "setrigidcolumnbalance", "setrigidcolumnhsize", "setscript", "setsecondpasscharacteralign", "setsectionblock", "setsimplecolumnshsize", "setsmallbodyfont", "setsmallcaps", "setstackbox", "setstructurepageregister", "setstrut", "setsuperiors", "setsystemmode", "settabular", "settaggedmetadata", "settestcrlf", "settextcontent", "settightobject", "settightreferencedobject", "settightstrut", "settightunreferencedobject", "settokenlist", "settrialtypesetting", "setuevalue", "setugvalue", "setunreferencedobject", "setup", "setupMPgraphics", "setupMPinstance", "setupMPpage", "setupMPvariables", "setupTABLE", "setupTEXpage", "setupalign", "setupalternativestyles", "setuparranging", "setupattachment", "setupattachments", "setupbackend", "setupbackground", "setupbackgrounds", "setupbar", "setupbars", "setupblackrules", "setupblank", "setupbleeding", "setupblock", "setupbodyfont", "setupbodyfontenvironment", "setupbookmark", "setupbottom", "setupbottomtexts", "setupbtx", "setupbtxdataset", "setupbtxlabeltext", "setupbtxlist", "setupbtxregister", "setupbtxrendering", "setupbuffer", "setupbutton", "setupcapitals", "setupcaption", "setupcaptions", "setupcharacteralign", "setupcharacterkerning", "setupcharacterspacing", "setupchemical", "setupchemicalframed", "setupclipping", "setupcollector", "setupcolor", "setupcolors", "setupcolumns", "setupcolumnset", "setupcolumnsetarea", "setupcolumnsetareatext", "setupcolumnsetlines", "setupcolumnsetspan", "setupcolumnsetstart", "setupcombination", "setupcombinedlist", "setupcomment", "setupcontent", "setupcounter", "setupdataset", "setupdelimitedtext", "setupdescription", "setupdescriptions", "setupdirections", "setupdocument", "setupeffect", "setupenumeration", "setupenumerations", "setupenv", "setupexpansion", "setupexport", "setupexternalfigure", "setupexternalfigures", "setupexternalsoundtracks", "setupfacingfloat", "setupfield", "setupfieldbody", "setupfieldcategory", "setupfieldcontentframed", "setupfieldlabelframed", "setupfields", "setupfieldtotalframed", "setupfiller", "setupfillinlines", "setupfillinrules", "setupfirstline", "setupfittingpage", "setupfloat", "setupfloatframed", "setupfloats", "setupfloatsplitting", "setupfontexpansion", "setupfontprotrusion", "setupfonts", "setupfontsolution", "setupfooter", "setupfootertexts", "setupfootnotes", "setupforms", "setupformula", "setupformulae", "setupformulaframed", "setupframed", "setupframedcontent", "setupframedtable", "setupframedtablecolumn", "setupframedtablerow", "setupframedtext", "setupframedtexts", "setupglobalreferenceprefix", "setuphead", "setupheadalternative", "setupheader", "setupheadertexts", "setupheadnumber", "setupheads", "setupheadtext", "setuphelp", "setuphigh", "setuphighlight", "setuphyphenation", "setuphyphenmark", "setupindentedtext", "setupindenting", "setupindex", "setupinitial", "setupinsertion", "setupinteraction", "setupinteractionbar", "setupinteractionmenu", "setupinteractionscreen", "setupinterlinespace", "setupitaliccorrection", "setupitemgroup", "setupitemizations", "setupitemize", "setupitems", "setuplabel", "setuplabeltext", "setuplanguage", "setuplayer", "setuplayeredtext", "setuplayout", "setuplayouttext", "setuplegend", "setuplinefiller", "setuplinefillers", "setuplinenote", "setuplinenumbering", "setuplines", "setuplinetable", "setuplinewidth", "setuplist", "setuplistalternative", "setuplistextra", "setuplocalfloats", "setuplocalinterlinespace", "setuplow", "setuplowhigh", "setuplowmidhigh", "setupmakeup", "setupmarginblock", "setupmargindata", "setupmarginframed", "setupmarginrule", "setupmarginrules", "setupmarking", "setupmathalignment", "setupmathcases", "setupmathematics", "setupmathfence", "setupmathfraction", "setupmathfractions", "setupmathframed", "setupmathlabeltext", "setupmathmatrix", "setupmathornament", "setupmathradical", "setupmathstackers", "setupmathstyle", "setupmixedcolumns", "setupmodule", "setupmulticolumns", "setupnarrower", "setupnotation", "setupnotations", "setupnote", "setupnotes", "setupoffset", "setupoffsetbox", "setupoperatortext", "setupoppositeplacing", "setuporientation", "setupoutput", "setupoutputroutine", "setuppagechecker", "setuppagecolumns", "setuppagecomment", "setuppageinjection", "setuppageinjectionalternative", "setuppagenumber", "setuppagenumbering", "setuppageshift", "setuppagestate", "setuppagetransitions", "setuppairedbox", "setuppalet", "setuppaper", "setuppapersize", "setupparagraph", "setupparagraphintro", "setupparagraphnumbering", "setupparagraphs", "setupparallel", "setupperiodkerning", "setupperiods", "setupplaceholder", "setupplacement", "setuppositionbar", "setuppositioning", "setupprefixtext", "setupprocessor", "setupprofile", "setupprograms", "setupquotation", "setupquote", "setuprealpagenumber", "setupreferenceformat", "setupreferenceprefix", "setupreferencestructureprefix", "setupreferencing", "setupregister", "setupregisters", "setuprenderingwindow", "setuprotate", "setupruby", "setups", "setupscale", "setupscript", "setupscripts", "setupsectionblock", "setupselector", "setupshift", "setupsidebar", "setupsorting", "setupspacing", "setupspellchecking", "setupstartstop", "setupstretched", "setupstrut", "setupstyle", "setupsubformula", "setupsubformulas", "setupsubpagenumber", "setupsuffixtext", "setupsymbols", "setupsymbolset", "setupsynctex", "setupsynonyms", "setupsystem", "setuptables", "setuptabulate", "setuptagging", "setuptaglabeltext", "setuptext", "setuptextbackground", "setuptextflow", "setuptextnote", "setuptextrules", "setuptexttexts", "setupthinrules", "setuptolerance", "setuptooltip", "setuptop", "setuptoptexts", "setuptype", "setuptyping", "setupunit", "setupunittext", "setupurl", "setupuserdata", "setupuserdataalternative", "setupuserpagenumber", "setupversion", "setupviewerlayer", "setupvspacing", "setupwhitespace", "setupwithargument", "setupwithargumentswapped", "setupxml", "setupxtable", "setuvalue", "setuxvalue", "setvalue", "setvariable", "setvariables", "setvboxregister", "setvisualizerfont", "setvtopregister", "setwidthof", "setxmeasure", "setxvalue", "setxvariable", "setxvariables", "seveneighths", "sfrac", "shapedhbox", "sharp", "shiftbox", "shiftdown", "shiftup", "showallmakeup", "showattributes", "showbodyfont", "showbodyfontenvironment", "showboxes", "showbtxdatasetauthors", "showbtxdatasetcompleteness", "showbtxdatasetfields", "showbtxfields", "showbtxhashedauthors", "showbtxtables", "showchardata", "showcharratio", "showcolor", "showcolorbar", "showcolorcomponents", "showcolorgroup", "showcolorset", "showcolorstruts", "showcounter", "showdirectives", "showdirsinmargin", "showedebuginfo", "showexperiments", "showfont", "showfontdata", "showfontexpansion", "showfontitalics", "showfontkerns", "showfontparameters", "showfontstrip", "showfontstyle", "showframe", "showglyphdata", "showglyphs", "showgrid", "showgridsnapping", "showhelp", "showhyphenationtrace", "showhyphens", "showinjector", "showjustification", "showkerning", "showlayout", "showlayoutcomponents", "showligature", "showligatures", "showlogcategories", "showluatables", "showmakeup", "showmargins", "showmessage", "showminimalbaseline", "shownextbox", "showotfcomposition", "showpalet", "showparentchain", "showparwrapperstate", "showprint", "showsetups", "showsetupsdefinition", "showstruts", "showsymbolset", "showtimer", "showtokens", "showtrackers", "showvalue", "showvariable", "showwarning", "sigma", "signalrightpage", "sim", "simeq", "simplealignedbox", "simplealignedboxplus", "simplealignedspreadbox", "simplegroupedcommand", "simplereversealignedbox", "simplereversealignedboxplus", "singalcharacteralign", "singlebond", "singleverticalbar", "sixperemspace", "sixthofsixarguments", "slanted", "slantedbold", "slantedface", "slash", "slicepages", "slong", "slovenianNumerals", "sloveniannumerals", "small", "smallbodyfont", "smallbold", "smallbolditalic", "smallboldslanted", "smallcappedcharacters", "smallcappedromannumerals", "smallcaps", "smaller", "smallitalicbold", "smallnormal", "smallskip", "smallslanted", "smallslantedbold", "smalltype", "smash", "smashbox", "smashboxed", "smashedhbox", "smashedvbox", "smile", "snaptogrid", "softhyphen", "solidus", "someheadnumber", "somekindoftab", "someline", "somelocalfloat", "somenamedheadnumber", "someplace", "somewhere", "space", "spaceddigits", "spaceddigitsmethod", "spaceddigitsseparator", "spaceddigitssymbol", "spadesuit", "spanishNumerals", "spanishnumerals", "speech", "sphericalangle", "splitatasterisk", "splitatcolon", "splitatcolons", "splitatcomma", "splitatperiod", "splitdfrac", "splitfilename", "splitfloat", "splitfrac", "splitoffbase", "splitofffull", "splitoffkind", "splitoffname", "splitoffpath", "splitoffroot", "splitofftokens", "splitofftype", "splitstring", "spreadhbox", "sqcap", "sqcup", "sqrt", "sqsubset", "sqsubseteq", "sqsubsetneq", "sqsupset", "sqsupseteq", "sqsupsetneq", "square", "squaredots", "ssharp", "stackrel", "stackscripts", "star", "stareq", "startJScode", "startJSpreamble", "startLUA", "startMP", "startMPclip", "startMPcode", "startMPdefinitions", "startMPdrawing", "startMPenvironment", "startMPextensions", "startMPinclusions", "startMPinitializations", "startMPpage", "startMPpositiongraphic", "startMPpositionmethod", "startMPrun", "startPARSEDXML", "startTABLE", "startTABLEbody", "startTABLEfoot", "startTABLEhead", "startTABLEnested", "startTABLEnext", "startTC", "startTD", "startTDs", "startTEX", "startTEXpage", "startTH", "startTN", "startTR", "startTRs", "startTX", "startTY", "startXML", "startalign", "startalignment", "startallmodes", "startappendices", "startarrangedpages", "startasciimode", "startaside", "startattachment", "startbackground", "startbackmatter", "startbar", "startbbordermatrix", "startbitmapimage", "startblockquote", "startbodymatter", "startbordermatrix", "startboxedcolumns", "startbtxlabeltext", "startbtxrenderingdefinitions", "startbuffer", "startcases", "startcatcodetable", "startcenteraligned", "startchapter", "startcharacteralign", "startcheckedfences", "startchemical", "startchemicaltext", "startcollect", "startcollecting", "startcolor", "startcolorintent", "startcoloronly", "startcolorset", "startcolumns", "startcolumnset", "startcolumnsetspan", "startcombination", "startcomment", "startcomponent", "startcontextcode", "startcontextdefinitioncode", "startctxfunction", "startctxfunctiondefinition", "startcurrentcolor", "startcurrentlistentrywrapper", "startdelimited", "startdelimitedtext", "startdisplaymath", "startdmath", "startdocument", "starteffect", "startelement", "startembeddedxtable", "startendnote", "startendofline", "startenvironment", "startexceptions", "startexpanded", "startexpandedcollect", "startextendedcatcodetable", "startexternalfigurecollection", "startfacingfloat", "startfact", "startfigure", "startfiguretext", "startfittingpage", "startfixed", "startfloatcombination", "startfont", "startfontclass", "startfontsolution", "startfootnote", "startformula", "startformulas", "startframed", "startframedcell", "startframedcontent", "startframedrow", "startframedtable", "startframedtext", "startfrontmatter", "startgoto", "startgraphictext", "startgridsnapping", "starthanging", "starthbox", "starthboxestohbox", "starthboxregister", "starthead", "startheadtext", "starthelptext", "starthiding", "starthighlight", "starthyphenation", "startimath", "startindentation", "startindentedtext", "startinteraction", "startinteractionmenu", "startinterface", "startintermezzotext", "startintertext", "startitem", "startitemgroup", "startitemgroupcolumns", "startitemize", "startknockout", "startlabeltext", "startlanguage", "startlayout", "startleftaligned", "startlegend", "startline", "startlinealignment", "startlinecorrection", "startlinefiller", "startlinenote", "startlinenumbering", "startlines", "startlinetable", "startlinetablebody", "startlinetablecell", "startlinetablehead", "startlocalfootnotes", "startlocalheadsetup", "startlocallinecorrection", "startlocalnotes", "startlocalsetups", "startlua", "startluacode", "startluaparameterset", "startluasetups", "startmakeup", "startmarginblock", "startmarginrule", "startmarkedcontent", "startmarkpages", "startmathalignment", "startmathcases", "startmathlabeltext", "startmathmatrix", "startmathmode", "startmathstyle", "startmatrices", "startmatrix", "startmaxaligned", "startmdformula", "startmidaligned", "startmiddlealigned", "startmiddlemakeup", "startmixedcolumns", "startmode", "startmodeset", "startmodule", "startmoduletestsection", "startmpformula", "startmulticolumns", "startnamedsection", "startnamedsubformulas", "startnarrow", "startnarrower", "startnegative", "startnicelyfilledbox", "startnointerference", "startnotallmodes", "startnotext", "startnotmode", "startoperatortext", "startopposite", "startoutputstream", "startoverlay", "startoverprint", "startpacked", "startpagecolumns", "startpagecomment", "startpagefigure", "startpagelayout", "startpagemakeup", "startpar", "startparagraph", "startparagraphs", "startparagraphscell", "startparbuilder", "startpart", "startpath", "startplacechemical", "startplacefigure", "startplacefloat", "startplaceformula", "startplacegraphic", "startplaceintermezzo", "startplacelegend", "startplacepairedbox", "startplacetable", "startpositioning", "startpositionoverlay", "startpositive", "startpostponing", "startpostponingnotes", "startprefixtext", "startprocessassignmentcommand", "startprocessassignmentlist", "startprocesscommacommand", "startprocesscommalist", "startproduct", "startproject", "startprotect", "startprotectedcolors", "startpublication", "startpunctuation", "startquotation", "startquote", "startrandomized", "startrandomseed", "startrawsetups", "startreadingfile", "startreferenceprefix", "startregime", "startregister", "startreusableMPgraphic", "startrightaligned", "startruby", "startscript", "startsdformula", "startsection", "startsectionblock", "startsectionblockenvironment", "startsectionlevel", "startsetups", "startshapebox", "startshift", "startsidebar", "startsimplecolumns", "startspecialitem", "startspeech", "startspformula", "startsplitformula", "startsplittext", "startspread", "startstandardmakeup", "startstaticMPfigure", "startstaticMPgraphic", "startstrictinspectnextcharacter", "startstructurepageregister", "startstrut", "startstyle", "startsubformulas", "startsubject", "startsubjectlevel", "startsubsection", "startsubsentence", "startsubstack", "startsubsubject", "startsubsubsection", "startsubsubsubject", "startsubsubsubsection", "startsubsubsubsubject", "startsubsubsubsubsection", "startsubsubsubsubsubject", "startsuffixtext", "startsymbolset", "starttable", "starttablehead", "starttables", "starttabletail", "starttabletext", "starttabulate", "starttabulatehead", "starttabulatetail", "starttagged", "starttaglabeltext", "starttexcode", "starttexdefinition", "starttext", "starttextbackground", "starttextbackgroundmanual", "starttextcolor", "starttextcolorintent", "starttextflow", "starttextmakeup", "starttextrule", "startthematrix", "starttitle", "starttokenlist", "starttokens", "starttransparent", "starttypescript", "starttypescriptcollection", "starttyping", "startuniqueMPgraphic", "startuniqueMPpagegraphic", "startunittext", "startunpacked", "startusableMPgraphic", "startuseMPgraphic", "startusemathstyleparameter", "startuserdata", "startusingbtxspecification", "startvbox", "startvboxregister", "startvboxtohbox", "startvboxtohboxseparator", "startviewerlayer", "startvtop", "startvtopregister", "startxcell", "startxcellgroup", "startxcolumn", "startxgroup", "startxmldisplayverbatim", "startxmlinlineverbatim", "startxmlraw", "startxmlsetups", "startxrow", "startxrowgroup", "startxtable", "startxtablebody", "startxtablefoot", "startxtablehead", "startxtablenext", "stligature", "stopJScode", "stopJSpreamble", "stopLUA", "stopMP", "stopMPclip", "stopMPcode", "stopMPdefinitions", "stopMPdrawing", "stopMPenvironment", "stopMPextensions", "stopMPinclusions", "stopMPinitializations", "stopMPpage", "stopMPpositiongraphic", "stopMPpositionmethod", "stopMPrun", "stopPARSEDXML", "stopTABLE", "stopTABLEbody", "stopTABLEfoot", "stopTABLEhead", "stopTABLEnested", "stopTABLEnext", "stopTC", "stopTD", "stopTDs", "stopTEX", "stopTEXpage", "stopTH", "stopTN", "stopTR", "stopTRs", "stopTX", "stopTY", "stopXML", "stopalign", "stopalignment", "stopallmodes", "stopappendices", "stoparrangedpages", "stopasciimode", "stopaside", "stopattachment", "stopbackground", "stopbackmatter", "stopbar", "stopbbordermatrix", "stopbitmapimage", "stopblockquote", "stopbodymatter", "stopbordermatrix", "stopboxedcolumns", "stopbtxlabeltext", "stopbtxrenderingdefinitions", "stopbuffer", "stopcases", "stopcatcodetable", "stopcenteraligned", "stopchapter", "stopcharacteralign", "stopcheckedfences", "stopchemical", "stopchemicaltext", "stopcollect", "stopcollecting", "stopcolor", "stopcolorintent", "stopcoloronly", "stopcolorset", "stopcolumns", "stopcolumnset", "stopcolumnsetspan", "stopcombination", "stopcomment", "stopcomponent", "stopcontextcode", "stopcontextdefinitioncode", "stopctxfunction", "stopctxfunctiondefinition", "stopcurrentcolor", "stopcurrentlistentrywrapper", "stopdelimited", "stopdelimitedtext", "stopdisplaymath", "stopdmath", "stopdocument", "stopeffect", "stopelement", "stopembeddedxtable", "stopendnote", "stopendofline", "stopenvironment", "stopexceptions", "stopexpanded", "stopexpandedcollect", "stopextendedcatcodetable", "stopexternalfigurecollection", "stopfacingfloat", "stopfact", "stopfigure", "stopfiguretext", "stopfittingpage", "stopfixed", "stopfloatcombination", "stopfont", "stopfontclass", "stopfontsolution", "stopfootnote", "stopformula", "stopformulas", "stopframed", "stopframedcell", "stopframedcontent", "stopframedrow", "stopframedtable", "stopframedtext", "stopfrontmatter", "stopgoto", "stopgraphictext", "stopgridsnapping", "stophanging", "stophbox", "stophboxestohbox", "stophboxregister", "stophead", "stopheadtext", "stophelptext", "stophiding", "stophighlight", "stophyphenation", "stopimath", "stopindentation", "stopindentedtext", "stopinteraction", "stopinteractionmenu", "stopinterface", "stopintermezzotext", "stopintertext", "stopitem", "stopitemgroup", "stopitemgroupcolumns", "stopitemize", "stopknockout", "stoplabeltext", "stoplanguage", "stoplayout", "stopleftaligned", "stoplegend", "stopline", "stoplinealignment", "stoplinecorrection", "stoplinefiller", "stoplinenote", "stoplinenumbering", "stoplines", "stoplinetable", "stoplinetablebody", "stoplinetablecell", "stoplinetablehead", "stoplocalfootnotes", "stoplocalheadsetup", "stoplocallinecorrection", "stoplocalnotes", "stoplocalsetups", "stoplua", "stopluacode", "stopluaparameterset", "stopluasetups", "stopmakeup", "stopmarginblock", "stopmarginrule", "stopmarkedcontent", "stopmarkpages", "stopmathalignment", "stopmathcases", "stopmathlabeltext", "stopmathmatrix", "stopmathmode", "stopmathstyle", "stopmatrices", "stopmatrix", "stopmaxaligned", "stopmdformula", "stopmidaligned", "stopmiddlealigned", "stopmiddlemakeup", "stopmixedcolumns", "stopmode", "stopmodeset", "stopmodule", "stopmoduletestsection", "stopmpformula", "stopmulticolumns", "stopnamedsection", "stopnamedsubformulas", "stopnarrow", "stopnarrower", "stopnegative", "stopnicelyfilledbox", "stopnointerference", "stopnotallmodes", "stopnotext", "stopnotmode", "stopoperatortext", "stopopposite", "stopoutputstream", "stopoverlay", "stopoverprint", "stoppacked", "stoppagecolumns", "stoppagecomment", "stoppagefigure", "stoppagelayout", "stoppagemakeup", "stoppar", "stopparagraph", "stopparagraphs", "stopparagraphscell", "stopparbuilder", "stoppart", "stoppath", "stopplacechemical", "stopplacefigure", "stopplacefloat", "stopplaceformula", "stopplacegraphic", "stopplaceintermezzo", "stopplacelegend", "stopplacepairedbox", "stopplacetable", "stoppositioning", "stoppositionoverlay", "stoppositive", "stoppostponing", "stoppostponingnotes", "stopprefixtext", "stopprocessassignmentcommand", "stopprocessassignmentlist", "stopprocesscommacommand", "stopprocesscommalist", "stopproduct", "stopproject", "stopprotect", "stopprotectedcolors", "stoppublication", "stoppunctuation", "stopquotation", "stopquote", "stoprandomized", "stoprandomseed", "stoprawsetups", "stopreadingfile", "stopreferenceprefix", "stopregime", "stopreusableMPgraphic", "stoprightaligned", "stopruby", "stopscript", "stopsdformula", "stopsection", "stopsectionblock", "stopsectionblockenvironment", "stopsectionlevel", "stopsetups", "stopshapebox", "stopshift", "stopsidebar", "stopsimplecolumns", "stopspecialitem", "stopspeech", "stopspformula", "stopsplitformula", "stopsplittext", "stopspread", "stopstandardmakeup", "stopstaticMPfigure", "stopstaticMPgraphic", "stopstrictinspectnextcharacter", "stopstrut", "stopstyle", "stopsubformulas", "stopsubject", "stopsubjectlevel", "stopsubsection", "stopsubsentence", "stopsubstack", "stopsubsubject", "stopsubsubsection", "stopsubsubsubject", "stopsubsubsubsection", "stopsubsubsubsubject", "stopsubsubsubsubsection", "stopsubsubsubsubsubject", "stopsuffixtext", "stopsymbolset", "stoptable", "stoptablehead", "stoptables", "stoptabletail", "stoptabletext", "stoptabulate", "stoptabulatehead", "stoptabulatetail", "stoptagged", "stoptaglabeltext", "stoptexcode", "stoptexdefinition", "stoptext", "stoptextbackground", "stoptextbackgroundmanual", "stoptextcolor", "stoptextcolorintent", "stoptextflow", "stoptextmakeup", "stoptextrule", "stopthematrix", "stoptitle", "stoptokenlist", "stoptokens", "stoptransparent", "stoptypescript", "stoptypescriptcollection", "stoptyping", "stopuniqueMPgraphic", "stopuniqueMPpagegraphic", "stopunittext", "stopunpacked", "stopusableMPgraphic", "stopuseMPgraphic", "stopusemathstyleparameter", "stopuserdata", "stopusingbtxspecification", "stopvbox", "stopvboxregister", "stopvboxtohbox", "stopvboxtohboxseparator", "stopviewerlayer", "stopvtop", "stopvtopregister", "stopxcell", "stopxcellgroup", "stopxcolumn", "stopxgroup", "stopxmldisplayverbatim", "stopxmlinlineverbatim", "stopxmlraw", "stopxmlsetups", "stopxrow", "stopxrowgroup", "stopxtable", "stopxtablebody", "stopxtablefoot", "stopxtablehead", "stopxtablenext", "stretched", "strictdoifelsenextoptional", "strictdoifnextoptionalelse", "stripcharacter", "strippedcsname", "stripspaces", "structurelistuservariable", "structurenumber", "structuretitle", "structureuservariable", "structurevariable", "strut", "strutdp", "strutgap", "strutht", "struthtdp", "struttedbox", "strutwd", "style", "styleinstance", "subject", "subpagenumber", "subsection", "subsentence", "subset", "subseteq", "subseteqq", "subsetneq", "subsetneqq", "substituteincommalist", "subsubject", "subsubsection", "subsubsubject", "subsubsubsection", "subsubsubsubject", "subsubsubsubsection", "subsubsubsubsubject", "subtractfeature", "succ", "succapprox", "succcurlyeq", "succeq", "succeqq", "succnapprox", "succneq", "succneqq", "succnsim", "succsim", "suffixlanguage", "suffixtext", "sum", "supset", "supseteq", "supseteqq", "supsetneq", "supsetneqq", "surd", "surdradical", "swapcounts", "swapdimens", "swapface", "swapmacros", "swaptypeface", "swarrow", "switchstyleonly", "switchtobodyfont", "switchtocolor", "switchtointerlinespace", "symbol", "symbolreference", "synchronizeblank", "synchronizeindenting", "synchronizemarking", "synchronizeoutputstreams", "synchronizestrut", "synchronizewhitespace", "synctexblockfilename", "synctexresetfilename", "synctexsetfilename", "systemlog", "systemlogfirst", "systemloglast", "systemsetups", "tLeftarrow", "tLeftrightarrow", "tRightarrow", "tabulateautoline", "tabulateautorule", "tabulateline", "tabulaterule", "taggedctxcommand", "taggedlabeltexts", "taglabellanguage", "taglabeltext", "tau", "tbinom", "tbox", "tcaron", "tcedilla", "tcommaaccent", "tcurl", "tequal", "test", "testandsplitstring", "testcolumn", "testfeature", "testfeatureonce", "testpage", "testpageonly", "testpagesync", "testtokens", "tex", "texdefinition", "texsetup", "textAngstrom", "textacute", "textampersand", "textasciicircum", "textasciitilde", "textat", "textbackslash", "textbar", "textbottomcomma", "textbottomdot", "textbraceleft", "textbraceright", "textbreve", "textbrokenbar", "textbullet", "textcaron", "textcedilla", "textcelsius", "textcent", "textcircledP", "textcircumflex", "textcitation", "textcite", "textcomma", "textcontrolspace", "textcurrency", "textdag", "textddag", "textdegree", "textdiaeresis", "textdiv", "textdollar", "textdong", "textdotaccent", "textellipsis", "texteuro", "textflowcollector", "textfraction", "textgrave", "texthash", "texthorizontalbar", "texthungarumlaut", "texthyphen", "textkelvin", "textlognot", "textmacron", "textmath", "textmho", "textminus", "textmu", "textmultiply", "textnumero", "textogonek", "textohm", "textormathchar", "textormathchars", "textounce", "textpercent", "textperiod", "textplus", "textpm", "textreference", "textring", "textrule", "textslash", "textsterling", "texttilde", "textunderscore", "textvisiblespace", "textyen", "thai", "thainumerals", "thedatavalue", "thefirstcharacter", "thematrix", "thenormalizedbodyfontsize", "theorientation", "therefore", "theremainingcharacters", "theta", "thickspace", "thinrule", "thinrules", "thinspace", "thirdoffivearguments", "thirdoffourarguments", "thirdofsixarguments", "thirdofthreearguments", "thirdofthreeunexpanded", "thook", "thookleftarrow", "thookrightarrow", "thorn", "threedigitrounding", "threeeighths", "threefifths", "threeperemspace", "threequarter", "threesuperior", "tibetannumerals", "tightlayer", "tilde", "times", "tinyfont", "title", "tlap", "tleftarrow", "tleftharpoondown", "tleftharpoonup", "tleftrightarrow", "tleftrightharpoons", "tmapsto", "to", "tochar", "tolinenote", "tooltip", "top", "topbox", "topleftbox", "toplinebox", "toprightbox", "topskippedbox", "tracecatcodetables", "tracedfontname", "tracedpagestate", "traceoutputroutines", "tracepositions", "trademark", "translate", "transparencycomponents", "transparent", "trel", "triangle", "triangledown", "triangleleft", "triangleq", "triangleright", "trightarrow", "trightharpoondown", "trightharpoonup", "trightleftharpoons", "trightoverleftarrow", "triplebond", "tripleprime", "tripleverticalbar", "truefilename", "truefontname", "tstroke", "ttraggedright", "ttriplerel", "ttwoheadleftarrow", "ttwoheadrightarrow", "turnediota", "twodigitrounding", "twofifths", "twoheaddownarrow", "twoheadleftarrow", "twoheadrightarrow", "twoheadrightarrowtail", "twoheaduparrow", "twosuperior", "twothirds", "tx", "txx", "typ", "type", "typebuffer", "typedefinedbuffer", "typeface", "typefile", "typeinlinebuffer", "typescriptone", "typescriptprefix", "typescriptthree", "typescripttwo", "typesetbuffer", "typesetbufferonly", "typesetfile", "uacute", "ubreve", "ucaron", "uchexnumber", "uchexnumbers", "ucircumflex", "uconvertnumber", "udiaeresis", "udiaeresisacute", "udiaeresiscaron", "udiaeresisgrave", "udiaeresismacron", "udotbelow", "udots", "udoublegrave", "uedcatcodecommand", "ugrave", "uhook", "uhorn", "uhornacute", "uhorndotbelow", "uhorngrave", "uhornhook", "uhorntilde", "uhungarumlaut", "uinvertedbreve", "ulcorner", "umacron", "undefinevalue", "undepthed", "underbar", "underbars", "underbartext", "underbrace", "underbracetext", "underbracket", "underbrackettext", "underdash", "underdashes", "underdot", "underdots", "underleftarrow", "underleftharpoondown", "underleftharpoonup", "underleftrightarrow", "underparent", "underparenttext", "underrandom", "underrandoms", "underrightarrow", "underrightharpoondown", "underrightharpoonup", "underset", "understrike", "understrikes", "undertwoheadleftarrow", "undertwoheadrightarrow", "undoassign", "unexpandeddocumentvariable", "unframed", "unhhbox", "unihex", "uniqueMPgraphic", "uniqueMPpagegraphic", "unit", "unitlanguage", "unitshigh", "unitslow", "unittext", "unknown", "unprotected", "unregisterhyphenationpattern", "unregisterparwrapper", "unspaceafter", "unspaceargument", "unspaced", "unspacestring", "unstackscripts", "untexargument", "untexcommand", "uogonek", "upand", "uparrow", "updasharrow", "updateparagraphdemerits", "updateparagraphpenalties", "updateparagraphproperties", "updateparagraphshapes", "updownarrow", "updownarrowbar", "updownarrows", "upharpoonleft", "upharpoonright", "uplus", "uppercased", "uppercasestring", "uppercasing", "upperleftdoubleninequote", "upperleftdoublesixquote", "upperleftsingleninequote", "upperleftsinglesixquote", "upperrightdoubleninequote", "upperrightdoublesixquote", "upperrightsingleninequote", "upperrightsinglesixquote", "upsilon", "upuparrows", "upwhitearrow", "urcorner", "uring", "url", "useJSscripts", "useMPenvironmentbuffer", "useMPgraphic", "useMPlibrary", "useMPrun", "useMPvariables", "useURL", "usealignparameter", "useblankparameter", "useblocks", "usebodyfont", "usebodyfontparameter", "usebtxdataset", "usebtxdefinitions", "usecitation", "usecolors", "usecomponent", "usedirectory", "usedummycolorparameter", "usedummystyleandcolor", "usedummystyleparameter", "useenvironment", "useexternaldocument", "useexternalfigure", "useexternalrendering", "useexternalsoundtrack", "usefigurebase", "usefile", "usefontpath", "usegridparameter", "usehyphensparameter", "useindentingparameter", "useindentnextparameter", "useinterlinespaceparameter", "uselanguageparameter", "useluamodule", "useluatable", "usemathstyleparameter", "usemodule", "useproduct", "useprofileparameter", "useproject", "usereferenceparameter", "userpagenumber", "usesetupsparameter", "usestaticMPfigure", "usesubpath", "usesymbols", "usetexmodule", "usetypescript", "usetypescriptfile", "useurl", "usezipfile", "utfchar", "utflower", "utfupper", "utilde", "utilityregisterlength", "vDash", "validassignment", "varTheta", "varepsilon", "varkappa", "varnothing", "varphi", "varpi", "varrho", "varsigma", "vartheta", "vboxreference", "vdash", "vdots", "vec", "vee", "veebar", "veeeq", "verbatim", "verbatimstring", "verbosenumber", "version", "vert", "verticalgrowingbar", "verticalpositionbar", "veryraggedcenter", "veryraggedleft", "veryraggedright", "vglue", "viewerlayer", "vl", "vpackbox", "vpackedbox", "vphantom", "vpos", "vsmash", "vsmashbox", "vsmashed", "vspace", "vspacing", "wcircumflex", "wdofstring", "wedge", "wedgeeq", "weekday", "whitearrowupfrombar", "widehat", "widetilde", "widthofstring", "widthspanningtext", "withoutpt", "word", "wordright", "words", "wordtonumber", "wp", "wr", "writebetweenlist", "writedatatolist", "writestatus", "writetolist", "xLeftarrow", "xLeftrightarrow", "xRightarrow", "xdefconvertedargument", "xequal", "xfrac", "xhookleftarrow", "xhookrightarrow", "xi", "xleftarrow", "xleftharpoondown", "xleftharpoonup", "xleftrightarrow", "xleftrightharpoons", "xmapsto", "xmladdindex", "xmlafterdocumentsetup", "xmlaftersetup", "xmlall", "xmlappenddocumentsetup", "xmlappendsetup", "xmlapplyselectors", "xmlatt", "xmlattdef", "xmlattribute", "xmlattributedef", "xmlbadinclusions", "xmlbeforedocumentsetup", "xmlbeforesetup", "xmlchainatt", "xmlchainattdef", "xmlchecknamespace", "xmlcommand", "xmlconcat", "xmlconcatrange", "xmlcontext", "xmlcount", "xmldefaulttotext", "xmldepth", "xmldirectives", "xmldirectivesafter", "xmldirectivesbefore", "xmldisplayverbatim", "xmldoif", "xmldoifatt", "xmldoifelse", "xmldoifelseatt", "xmldoifelseempty", "xmldoifelseselfempty", "xmldoifelsetext", "xmldoifelsevalue", "xmldoifnot", "xmldoifnotatt", "xmldoifnotselfempty", "xmldoifnottext", "xmldoifselfempty", "xmldoiftext", "xmlelement", "xmlfilter", "xmlfirst", "xmlflush", "xmlflushcontext", "xmlflushdocumentsetups", "xmlflushlinewise", "xmlflushpure", "xmlflushspacewise", "xmlflushtext", "xmlinclude", "xmlinclusion", "xmlinclusions", "xmlinfo", "xmlinjector", "xmlinlineprettyprint", "xmlinlineprettyprinttext", "xmlinlineverbatim", "xmlinstalldirective", "xmllast", "xmllastatt", "xmllastmatch", "xmllastpar", "xmlloadbuffer", "xmlloaddata", "xmlloaddirectives", "xmlloadfile", "xmlloadonly", "xmlmain", "xmlmapvalue", "xmlname", "xmlnamespace", "xmlnonspace", "xmlpar", "xmlparam", "xmlpath", "xmlpos", "xmlposition", "xmlprependdocumentsetup", "xmlprependsetup", "xmlprettyprint", "xmlprettyprinttext", "xmlprocessbuffer", "xmlprocessdata", "xmlprocessfile", "xmlpure", "xmlraw", "xmlrefatt", "xmlregistereddocumentsetups", "xmlregisteredsetups", "xmlregisterns", "xmlremapname", "xmlremapnamespace", "xmlremovedocumentsetup", "xmlremovesetup", "xmlresetdocumentsetups", "xmlresetinjectors", "xmlresetsetups", "xmlsave", "xmlsetatt", "xmlsetattribute", "xmlsetentity", "xmlsetfunction", "xmlsetinjectors", "xmlsetpar", "xmlsetparam", "xmlsetsetup", "xmlsetup", "xmlshow", "xmlsnippet", "xmlstrip", "xmlstripnolines", "xmlstripped", "xmlstrippednolines", "xmltag", "xmltexentity", "xmltext", "xmltobuffer", "xmltobufferverbose", "xmltofile", "xmlvalue", "xmlverbatim", "xrel", "xrightarrow", "xrightharpoondown", "xrightharpoonup", "xrightleftharpoons", "xrightoverleftarrow", "xsplitstring", "xtriplerel", "xtwoheadleftarrow", "xtwoheadrightarrow", "xxfrac", "xypos", "yacute", "ycircumflex", "ydiaeresis", "ydotbelow", "yen", "ygrave", "yhook", "yiddishnumerals", "ymacron", "ytilde", "zacute", "zcaron", "zdotaccent", "zeronumberconversion", "zerowidthnobreakspace", "zerowidthspace", "zeta", "zhook", "zstroke", "zwj", "zwnj" },
["en"]={},
- ["fr"]={ "Caractere", "Caracteres", "Chiffresromains", "JOURSEMAINE", "MOIS", "MOT", "MOTS", "Mot", "Mots", "Numeros", "a", "adaptedisposition", "ajustechamp", "alaligne", "alapage", "aligneadroite", "aligneagauche", "aligneaumilieu", "arriereplan", "baha", "barrecouleur", "barreinteraction", "bas", "bouton", "boutonmenu", "boutonsinteraction", "cacheblocs", "caractere", "caracteres", "champ", "changepolicecorps", "chiffresromains", "clonechamp", "colonne", "commentaire", "comparegroupecouleur", "comparepalette", "completenumeropage", "completeregistre", "composant", "concernant", "convertitnumero", "copitchamp", "corrigeespaceblanc", "couleur", "couleurgrise", "dactylographier", "dans", "datecourante", "de", "definicaractere", "definit", "definitaccent", "definitbloc", "definitblocsection", "definitbuffer", "definitcalque", "definitchamp", "definitcommande", "definitconversion", "definitcouleur", "definitdactylo", "definitdemarrestoppe", "definitdescription", "definitdisposition", "definitenumeration", "definitenvironnementpolicecorps", "definitetiquette", "definitflottant", "definitformatreference", "definitgroupecouleur", "definithbox", "definitjeucolonne", "definitliste", "definitlisteimbriquee", "definitmakeup", "definitmarquage", "definitmenuinteraction", "definitpalette", "definitparagraphes", "definitpilechamp", "definitpolice", "definitpolicecorps", "definitprofil", "definitprogramme", "definitreference", "definitregistre", "definitrevetement", "definitsautdecolonne", "definitsautdepage", "definitsection", "definitsouschamp", "definitstyle", "definitstylepolice", "definitsymbole", "definitsymbolefigure", "definitsynonymepolice", "definitsynonymes", "definittabulation", "definittaillepapier", "definittete", "definittexte", "definittrametableau", "definittri", "definittype", "definitvide", "demarreJScode", "demarreJSpreamble", "demarreLUA", "demarreMP", "demarreMPclip", "demarreMPcode", "demarreMPdefinitions", "demarreMPdrawing", "demarreMPenvironment", "demarreMPextensions", "demarreMPinclusions", "demarreMPinitializations", "demarreMPpage", "demarreMPpositiongraphic", "demarreMPpositionmethod", "demarreMPrun", "demarrePARSEDXML", "demarreTABLE", "demarreTABLEbody", "demarreTABLEfoot", "demarreTABLEhead", "demarreTABLEnext", "demarreTC", "demarreTD", "demarreTDs", "demarreTEX", "demarreTEXpage", "demarreTH", "demarreTN", "demarreTR", "demarreTRs", "demarreTX", "demarreTY", "demarreXML", "demarrealign", "demarrealigneadroite", "demarrealigneagauche", "demarrealigneaumilieu", "demarrealignment", "demarreallmodes", "demarreappendices", "demarrearrangedpages", "demarrearriereplan", "demarreaside", "demarreattachment", "demarrebackmatter", "demarrebar", "demarrebbordermatrix", "demarrebitmapimage", "demarreblockquote", "demarrebodymatter", "demarrebordermatrix", "demarreboxedcolumns", "demarrebtxlabeltext", "demarrebtxrenderingdefinitions", "demarrebuffer", "demarrecases", "demarrecatcodetable", "demarrecenteraligned", "demarrechapter", "demarrecharacteralign", "demarrecheckedfences", "demarrechemical", "demarrechemicaltext", "demarreciter", "demarrecollect", "demarrecollecting", "demarrecolorintent", "demarrecoloronly", "demarrecolorset", "demarrecolumns", "demarrecolumnset", "demarrecolumnsetspan", "demarrecombination", "demarrecomment", "demarrecomposant", "demarrecontextcode", "demarrecontextdefinitioncode", "demarrecouleur", "demarrectxfunction", "demarrectxfunctiondefinition", "demarrecurrentcolor", "demarrecurrentlistentrywrapper", "demarredelimited", "demarredelimitedtext", "demarredisplaymath", "demarredmath", "demarredocument", "demarreeffect", "demarreelement", "demarreembeddedxtable", "demarreendnote", "demarreendofline", "demarreenvironement", "demarreexceptions", "demarreexpanded", "demarreexpandedcollect", "demarreextendedcatcodetable", "demarreexternalfigurecollection", "demarrefacingfloat", "demarrefact", "demarrefigure", "demarrefiguretext", "demarrefittingpage", "demarrefixed", "demarrefloatcombination", "demarrefont", "demarrefontclass", "demarrefontsolution", "demarrefootnote", "demarreformula", "demarreformulas", "demarreframed", "demarreframedcell", "demarreframedcontent", "demarreframedrow", "demarreframedtable", "demarreframedtext", "demarrefrontmatter", "demarregraphictext", "demarregridsnapping", "demarregroupe", "demarrehanging", "demarrehbox", "demarrehboxestohbox", "demarrehboxregister", "demarreheadtext", "demarrehelptext", "demarrehiding", "demarrehighlight", "demarrehyphenation", "demarreimath", "demarreindentation", "demarreindentedtext", "demarreinteraction", "demarreinterface", "demarreintermezzotext", "demarreintertext", "demarreitemgroup", "demarreitemgroupcolumns", "demarreitemize", "demarreknockout", "demarrelabeltext", "demarrelangue", "demarrelayout", "demarrelegend", "demarreligne", "demarreligneregleetexte", "demarrelinealignment", "demarrelinecorrection", "demarrelinefiller", "demarrelinenumbering", "demarrelines", "demarrelinetable", "demarrelinetablebody", "demarrelinetablecell", "demarrelinetablehead", "demarrelocalfootnotes", "demarrelocalheadsetup", "demarrelocallinecorrection", "demarrelocalnotes", "demarrelocalsetups", "demarrelua", "demarreluacode", "demarreluaparameterset", "demarreluasetups", "demarremakeup", "demarremargereglee", "demarremarginblock", "demarremarkedcontent", "demarremarkpages", "demarremathalignment", "demarremathcases", "demarremathlabeltext", "demarremathmatrix", "demarremathmode", "demarremathstyle", "demarrematrices", "demarrematrix", "demarremaxaligned", "demarremdformula", "demarremenuinteraction", "demarremiddlealigned", "demarremiddlemakeup", "demarremixedcolumns", "demarremode", "demarremodeset", "demarremodule", "demarremoduletestsection", "demarrempformula", "demarrenamedsection", "demarrenamedsubformulas", "demarrenarrow", "demarrenarrower", "demarrenegative", "demarrenicelyfilledbox", "demarrenointerference", "demarrenotallmodes", "demarrenotext", "demarrenotmode", "demarreoperatortext", "demarreopposite", "demarreoutputstream", "demarreoverlay", "demarreoverprint", "demarrepagecolumns", "demarrepagecomment", "demarrepagefigure", "demarrepagelayout", "demarrepagemakeup", "demarrepar", "demarreparagraph", "demarreparagraphs", "demarreparagraphscell", "demarreparbuilder", "demarrepart", "demarrepath", "demarreplacechemical", "demarreplacefigure", "demarreplaceflottant", "demarreplaceformule", "demarreplacegraphic", "demarreplaceintermezzo", "demarreplacelegend", "demarreplacepairedbox", "demarreplacetable", "demarrepositioning", "demarrepositionoverlay", "demarrepositive", "demarrepostponing", "demarrepostponingnotes", "demarreprefixtext", "demarreprocessassignmentcommand", "demarreprocessassignmentlist", "demarreprocesscommacommand", "demarreprocesscommalist", "demarreproduit", "demarreprojet", "demarreprotect", "demarreprotectedcolors", "demarrepublication", "demarrepunctuation", "demarrequotation", "demarrequote", "demarrerandomized", "demarrerandomseed", "demarrerawsetups", "demarrereadingfile", "demarrereferenceprefix", "demarreregime", "demarrereusableMPgraphic", "demarreruby", "demarrescript", "demarresdformula", "demarresection", "demarresectionblock", "demarresectionblockenvironment", "demarresectionlevel", "demarresetups", "demarreshapebox", "demarreshift", "demarresidebar", "demarresimplecolumns", "demarrespecialitem", "demarrespeech", "demarrespformula", "demarresplitformula", "demarresplittext", "demarrespread", "demarrestandardmakeup", "demarrestaticMPfigure", "demarrestaticMPgraphic", "demarrestrictinspectnextcharacter", "demarrestrut", "demarrestyle", "demarresubformulas", "demarresubject", "demarresubjectlevel", "demarresubsection", "demarresubsentence", "demarresubstack", "demarresubsubject", "demarresubsubsection", "demarresubsubsubject", "demarresubsubsubsection", "demarresubsubsubsubject", "demarresubsubsubsubsection", "demarresubsubsubsubsubject", "demarresuffixtext", "demarresymbolset", "demarretable", "demarretablehead", "demarretables", "demarretabletail", "demarretabletext", "demarretabulate", "demarretabulatehead", "demarretabulatetail", "demarretagged", "demarretaglabeltext", "demarretete", "demarretexcode", "demarretexdefinition", "demarretext", "demarretextbackground", "demarretextbackgroundmanual", "demarretextcolor", "demarretextcolorintent", "demarretextflow", "demarretextmakeup", "demarretitle", "demarretokenlist", "demarretokens", "demarretransparent", "demarretypescript", "demarretypescriptcollection", "demarretyping", "demarreuniqueMPgraphic", "demarreuniqueMPpagegraphic", "demarreunittext", "demarreunpacked", "demarreusableMPgraphic", "demarreuseMPgraphic", "demarreusemathstyleparameter", "demarreuserdata", "demarreusingbtxspecification", "demarreva", "demarrevbox", "demarrevboxregister", "demarrevboxtohbox", "demarrevboxtohboxseparator", "demarreviewerlayer", "demarrevtop", "demarrevtopregister", "demarrexcell", "demarrexcellgroup", "demarrexcolumn", "demarrexgroup", "demarrexmldisplayverbatim", "demarrexmlinlineverbatim", "demarrexmlraw", "demarrexmlsetups", "demarrexrow", "demarrexrowgroup", "demarrextable", "demarrextablebody", "demarrextablefoot", "demarrextablehead", "demarrextablenext", "determinecaracteristiqueliste", "determinecaracteristiquesregistre", "determinenumerotete", "echelle", "ecran", "ecritdansliste", "ecritentreliste", "element", "elements", "environement", "espace", "espacefixe", "espacesfixes", "etire", "faitreference", "fichierdactylo", "figureexterne", "gardeblocs", "grille", "haut", "inconnu", "installelangue", "joursemaine", "langue", "langueprincipale", "largeurligne", "ligneh", "lignenoire", "ligneregleetexte", "lignesnoires", "llongueurliste", "marquage", "marquepage", "mathematique", "menuinteraction", "mois", "montrecadre", "montrecouleur", "montredisposition", "montreedition", "montreenvironnementpolicecorps", "montregrille", "montregroupecouleur", "montrejeusymboles", "montremakeup", "montrepalette", "montrepolicecorps", "montrereglages", "montrestruts", "motdroit", "numeroformule", "numeropage", "numeros", "numerotete", "numerotetecourant", "obtientmarquage", "oriente", "periodes", "pilechamp", "placecoteacote", "placeflottant", "placeformule", "placelesunsaudessusdesautres", "placeliste", "placelisteinmbriquee", "placemarquespages", "placenotespdp", "placenotespdplocales", "placenumeropage", "placenumerotete", "placeregistre", "placesousformule", "placesurgrille", "placetextetete", "prendbuffer", "produit", "programme", "projet", "qqpart", "razmarquage", "referencepage", "referencetexte", "reflete", "reglealignement", "reglearrangement", "reglearriereplan", "reglearriereplans", "reglebarreinteraction", "reglebloc", "regleblocsection", "reglebuffer", "reglecapitales", "reglechamp", "reglechamps", "regleclipping", "reglecolonnes", "reglecommentaire", "reglecommentairepage", "reglecompoetroite", "reglecomposeenalinea", "reglecouleur", "reglecouleurs", "regledactylo", "regledemarrestoppe", "regledisposition", "regleecraninteraction", "regleelements", "regleencadre", "regleentete", "regleenumerations", "regleepaisseurligne", "regleespaceblanc", "regleespacement", "regleespacementinterligne", "regleflottant", "regleflottants", "regleformulaires", "regleformules", "reglegroupeselements", "regleinf", "regleinteraction", "regleintitule", "regleintitules", "reglejeucolonne", "reglejeusymboles", "reglelangue", "reglelignes", "reglelignesnoires", "reglelignesreglestexte", "regleliste", "reglelisteimbriquee", "reglemakeup", "reglemargereglee", "reglemarquage", "reglemarquagehyphenation", "reglemenuinteraction", "reglenotepdp", "reglenumeropage", "reglenumerotationligne", "reglenumerotationpage", "reglenumerotationparagraphe", "reglenumerotete", "regleoriente", "reglepalette", "reglepapier", "regleparagraphes", "reglepdp", "regleplacementopposition", "reglepolicecorps", "reglepositionnement", "regleprogrammes", "reglereferencage", "regleregistre", "regleremplitligne", "regleremplitlignesreglees", "regleseparationflottant", "reglesousnumeropage", "reglesup", "reglesynonymes", "regletableaux", "regletabulation", "regletaillepapier", "regletete", "regletetes", "regletexte", "regletextesentete", "regletextesinf", "regletextespdp", "regletextessup", "regletextestexte", "regletolerance", "regletraitsfins", "regletransitionspage", "regletri", "regletype", "regleurl", "remplitligne", "remplitlignesreglees", "remplittexte", "sansespace", "sanslignesenteteetpdp", "sanslignessupetinf", "selectionneblocs", "separeflottant", "settext", "sousnumeropage", "stoppeJScode", "stoppeJSpreamble", "stoppeLUA", "stoppeMP", "stoppeMPclip", "stoppeMPcode", "stoppeMPdefinitions", "stoppeMPdrawing", "stoppeMPenvironment", "stoppeMPextensions", "stoppeMPinclusions", "stoppeMPinitializations", "stoppeMPpage", "stoppeMPpositiongraphic", "stoppeMPpositionmethod", "stoppeMPrun", "stoppePARSEDXML", "stoppeTABLE", "stoppeTABLEbody", "stoppeTABLEfoot", "stoppeTABLEhead", "stoppeTABLEnext", "stoppeTC", "stoppeTD", "stoppeTDs", "stoppeTEX", "stoppeTEXpage", "stoppeTH", "stoppeTN", "stoppeTR", "stoppeTRs", "stoppeTX", "stoppeTY", "stoppeXML", "stoppealign", "stoppealigneadroite", "stoppealigneagauche", "stoppealigneaumilieu", "stoppealignment", "stoppeallmodes", "stoppeappendices", "stoppearrangedpages", "stoppearriereplan", "stoppeaside", "stoppeattachment", "stoppebackmatter", "stoppebar", "stoppebbordermatrix", "stoppebitmapimage", "stoppeblockquote", "stoppebodymatter", "stoppebordermatrix", "stoppeboxedcolumns", "stoppebtxlabeltext", "stoppebtxrenderingdefinitions", "stoppebuffer", "stoppecases", "stoppecatcodetable", "stoppecenteraligned", "stoppechapter", "stoppecharacteralign", "stoppecheckedfences", "stoppechemical", "stoppechemicaltext", "stoppecollect", "stoppecollecting", "stoppecolorintent", "stoppecoloronly", "stoppecolorset", "stoppecolumns", "stoppecolumnset", "stoppecolumnsetspan", "stoppecombination", "stoppecomment", "stoppecomposant", "stoppecontextcode", "stoppecontextdefinitioncode", "stoppecouleur", "stoppectxfunction", "stoppectxfunctiondefinition", "stoppecurrentcolor", "stoppecurrentlistentrywrapper", "stoppedelimited", "stoppedelimitedtext", "stoppedisplaymath", "stoppedmath", "stoppedocument", "stoppeeffect", "stoppeelement", "stoppeembeddedxtable", "stoppeendnote", "stoppeendofline", "stoppeenvironement", "stoppeexceptions", "stoppeexpanded", "stoppeexpandedcollect", "stoppeextendedcatcodetable", "stoppeexternalfigurecollection", "stoppefacingfloat", "stoppefact", "stoppefigure", "stoppefiguretext", "stoppefittingpage", "stoppefixed", "stoppefloatcombination", "stoppefont", "stoppefontclass", "stoppefontsolution", "stoppefootnote", "stoppeformula", "stoppeformulas", "stoppeframed", "stoppeframedcell", "stoppeframedcontent", "stoppeframedrow", "stoppeframedtable", "stoppeframedtext", "stoppefrontmatter", "stoppegraphictext", "stoppegridsnapping", "stoppegroupe", "stoppehanging", "stoppehbox", "stoppehboxestohbox", "stoppehboxregister", "stoppeheadtext", "stoppehelptext", "stoppehiding", "stoppehighlight", "stoppehyphenation", "stoppeimath", "stoppeindentation", "stoppeindentedtext", "stoppeinteraction", "stoppeinterface", "stoppeintermezzotext", "stoppeintertext", "stoppeitemgroup", "stoppeitemgroupcolumns", "stoppeitemize", "stoppeknockout", "stoppelabeltext", "stoppelangue", "stoppelayout", "stoppelegend", "stoppeligne", "stoppeligneregleetexte", "stoppelinealignment", "stoppelinecorrection", "stoppelinefiller", "stoppelinenumbering", "stoppelines", "stoppelinetable", "stoppelinetablebody", "stoppelinetablecell", "stoppelinetablehead", "stoppelocalfootnotes", "stoppelocalheadsetup", "stoppelocallinecorrection", "stoppelocalnotes", "stoppelocalsetups", "stoppelua", "stoppeluacode", "stoppeluaparameterset", "stoppeluasetups", "stoppemakeup", "stoppemargereglee", "stoppemarginblock", "stoppemarkedcontent", "stoppemarkpages", "stoppemathalignment", "stoppemathcases", "stoppemathlabeltext", "stoppemathmatrix", "stoppemathmode", "stoppemathstyle", "stoppematrices", "stoppematrix", "stoppemaxaligned", "stoppemdformula", "stoppemenuinteraction", "stoppemiddlealigned", "stoppemiddlemakeup", "stoppemixedcolumns", "stoppemode", "stoppemodeset", "stoppemodule", "stoppemoduletestsection", "stoppempformula", "stoppenamedsection", "stoppenamedsubformulas", "stoppenarrow", "stoppenarrower", "stoppenegative", "stoppenicelyfilledbox", "stoppenointerference", "stoppenotallmodes", "stoppenotext", "stoppenotmode", "stoppeoperatortext", "stoppeopposite", "stoppeoutputstream", "stoppeoverlay", "stoppeoverprint", "stoppepagecolumns", "stoppepagecomment", "stoppepagefigure", "stoppepagelayout", "stoppepagemakeup", "stoppepar", "stoppeparagraph", "stoppeparagraphs", "stoppeparagraphscell", "stoppeparbuilder", "stoppepart", "stoppepath", "stoppeplacechemical", "stoppeplacefigure", "stoppeplaceflottant", "stoppeplaceformule", "stoppeplacegraphic", "stoppeplaceintermezzo", "stoppeplacelegend", "stoppeplacepairedbox", "stoppeplacetable", "stoppepositioning", "stoppepositionoverlay", "stoppepositive", "stoppepostponing", "stoppepostponingnotes", "stoppeprefixtext", "stoppeprocessassignmentcommand", "stoppeprocessassignmentlist", "stoppeprocesscommacommand", "stoppeprocesscommalist", "stoppeproduit", "stoppeprojet", "stoppeprotect", "stoppeprotectedcolors", "stoppepublication", "stoppepunctuation", "stoppequotation", "stoppequote", "stopperandomized", "stopperandomseed", "stopperawsetups", "stoppereadingfile", "stoppereferenceprefix", "stopperegime", "stoppereusableMPgraphic", "stopperuby", "stoppescript", "stoppesdformula", "stoppesection", "stoppesectionblock", "stoppesectionblockenvironment", "stoppesectionlevel", "stoppesetups", "stoppeshapebox", "stoppeshift", "stoppesidebar", "stoppesimplecolumns", "stoppespecialitem", "stoppespeech", "stoppespformula", "stoppesplitformula", "stoppesplittext", "stoppespread", "stoppestandardmakeup", "stoppestaticMPfigure", "stoppestaticMPgraphic", "stoppestrictinspectnextcharacter", "stoppestrut", "stoppestyle", "stoppesubformulas", "stoppesubject", "stoppesubjectlevel", "stoppesubsection", "stoppesubsentence", "stoppesubstack", "stoppesubsubject", "stoppesubsubsection", "stoppesubsubsubject", "stoppesubsubsubsection", "stoppesubsubsubsubject", "stoppesubsubsubsubsection", "stoppesubsubsubsubsubject", "stoppesuffixtext", "stoppesymbolset", "stoppetable", "stoppetablehead", "stoppetables", "stoppetabletail", "stoppetabletext", "stoppetabulate", "stoppetabulatehead", "stoppetabulatetail", "stoppetagged", "stoppetaglabeltext", "stoppetete", "stoppetexcode", "stoppetexdefinition", "stoppetext", "stoppetextbackground", "stoppetextbackgroundmanual", "stoppetextcolor", "stoppetextcolorintent", "stoppetextflow", "stoppetextmakeup", "stoppetitle", "stoppetokenlist", "stoppetokens", "stoppetransparent", "stoppetypescript", "stoppetypescriptcollection", "stoppetyping", "stoppeuniqueMPgraphic", "stoppeuniqueMPpagegraphic", "stoppeunittext", "stoppeunpacked", "stoppeusableMPgraphic", "stoppeuseMPgraphic", "stoppeusemathstyleparameter", "stoppeuserdata", "stoppeusingbtxspecification", "stoppeva", "stoppevbox", "stoppevboxregister", "stoppevboxtohbox", "stoppevboxtohboxseparator", "stoppeviewerlayer", "stoppevtop", "stoppevtopregister", "stoppexcell", "stoppexcellgroup", "stoppexcolumn", "stoppexgroup", "stoppexmldisplayverbatim", "stoppexmlinlineverbatim", "stoppexmlraw", "stoppexmlsetups", "stoppexrow", "stoppexrowgroup", "stoppextable", "stoppextablebody", "stoppextablefoot", "stoppextablehead", "stoppextablenext", "symbole", "tapebuffer", "textenotepdp", "traduire", "traiteblocs", "traitfin", "traitsfins", "uneligne", "utiliseJSscripts", "utiliseURL", "utiliseblocs", "utilisechemin", "utilisedocumentexterne", "utilisefigureexterne", "utilisemodule", "utilisepsiteaudioexterne", "utilisesymboles", "utiliseurl", "va", "vaalaboite", "vaalapage", "vaenbas", "valeurcouleur", "vide" },
- ["it"]={ "GIORNOSETTIMANA", "Lettera", "Lettere", "MESE", "Numeri", "Numeriromani", "PAROLA", "PAROLE", "Parola", "Parole", "adattacampo", "adattalayout", "al", "allineacentro", "allineadestra", "allineasinistra", "ambiente", "ap", "apagina", "barracolori", "barrainterazione", "cambiaafontdeltesto", "campi", "capello", "chim", "circondato", "clonacampo", "colonna", "colore", "coloregrigio", "commento", "componenet", "confrontagruppocolori", "confrontatavolozza", "convertinumero", "copiacampo", "correggispaziobianco", "da", "daqualcheparte", "data", "datadioggi", "definisci", "definisciaccento", "definisciambientefontdeltesto", "definisciblocco", "definiscibloccosezione", "definiscibuffer", "definiscicampo", "definiscicapoversi", "definiscicarattere", "definiscicolore", "definiscicomando", "definisciconversione", "definiscidescrizione", "definiscidimensionicarta", "definiscielenco", "definiscielencocombinato", "definiscienumerazione", "definiscietichetta", "definiscifigurasimbolo", "definiscifont", "definiscifontdeltesto", "definisciformatoriferimento", "definiscigruppocolonne", "definiscigruppocolori", "definiscihbox", "definisciincorniciato", "definisciiniziatermina", "definiscilayout", "definiscimakeup", "definiscimarcatura", "definiscimenuinterazione", "definiscimodellotabella", "definiscioggettomobile", "definisciordinamento", "definisciprofilo", "definisciprogramma", "definisciregistro", "definisciriferimento", "definiscisezione", "definiscisimbolo", "definiscisinonimi", "definiscisinonimofont", "definiscisottocampo", "definiscisovrapposizione", "definiscistackcampi", "definiscistile", "definiscistilefont", "definiscitabulato", "definiscitavolozza", "definiscitesta", "definiscitesto", "definiscitestoincorniciato", "definiscitype", "definiscityping", "determinacaratteristicheregistro", "determinacarattersticheelenco", "determinanumerotesta", "elaborablocchi", "elementi", "elemento", "figuraesterna", "giornosettimana", "griglia", "ignoto", "impostaallineamento", "impostaampiezzariga", "impostabarrainterazione", "impostablocco", "impostabloccosezione", "impostabuffer", "impostacampi", "impostacampo", "impostacapoversi", "impostacaption", "impostacaptions", "impostacima", "impostaclippling", "impostacolonne", "impostacolore", "impostacolori", "impostacommento", "impostacommentopagina", "impostadimensionicarta", "impostaelementi", "impostaelencazioni", "impostaelenco", "impostaelencocombinato", "impostaenumerazioni", "impostafondo", "impostafontdeltesto", "impostaforms", "impostaformule", "impostagruppocolonne", "impostaincorniciato", "impostainiziatermina", "impostainstestazione", "impostainterazione", "impostainterlinea", "impostalayout", "impostalineemargine", "impostalineenere", "impostalineeriempimento", "impostalineesottili", "impostalineetesto", "impostalingua", "impostamaiuscole", "impostamakeup", "impostamarcatura", "impostamenuinterazione", "impostamenzione", "impostanotepdp", "impostanumerazionecapoversi", "impostanumerazionepagina", "impostanumerazionerighe", "impostanumeropagina", "impostanumerosottopagina", "impostanumerotesta", "impostaoggettimobili", "impostaoggettomobile", "impostaordinamento", "impostaparranging", "impostapdp", "impostapiustretto", "impostaposizionamento", "impostaposizionamentoopposti", "impostaprogrammi", "impostaregistro", "impostarientro", "impostariferimento", "impostarighe", "impostarigheriempimento", "impostarigovuoto", "impostarotazione", "impostaschermointerazione", "impostasegnosillabazione", "impostasetsimboli", "impostasfondi", "impostasfondo", "impostasinonimi", "impostaspaziatura", "impostaspaziobianco", "impostaspezzamentooggettomobile", "impostatabelle", "impostatabulato", "impostatavolozza", "impostatesta", "impostateste", "impostatesticima", "impostatestifondo", "impostatestiincorniciati", "impostatestiintestazioni", "impostatestipdp", "impostatesto", "impostatestotesti", "impostatolleranza", "impostatransizionepagina", "impostatype", "impostatyping", "impostaurl", "incorniciato", "iniziaJScode", "iniziaJSpreamble", "iniziaLUA", "iniziaMP", "iniziaMPclip", "iniziaMPcode", "iniziaMPdefinitions", "iniziaMPdrawing", "iniziaMPenvironment", "iniziaMPextensions", "iniziaMPinclusions", "iniziaMPinitializations", "iniziaMPpage", "iniziaMPpositiongraphic", "iniziaMPpositionmethod", "iniziaMPrun", "iniziaPARSEDXML", "iniziaTABLE", "iniziaTABLEbody", "iniziaTABLEfoot", "iniziaTABLEhead", "iniziaTABLEnext", "iniziaTC", "iniziaTD", "iniziaTDs", "iniziaTEX", "iniziaTEXpage", "iniziaTH", "iniziaTN", "iniziaTR", "iniziaTRs", "iniziaTX", "iniziaTY", "iniziaXML", "iniziaalign", "iniziaalignment", "iniziaallineacentro", "iniziaallineadestra", "iniziaallineasinistra", "iniziaallmodes", "iniziaambiente", "iniziaappendices", "iniziaarrangedpages", "iniziaaside", "iniziaattachment", "iniziabackmatter", "iniziabar", "iniziabbordermatrix", "iniziabitmapimage", "iniziablockquote", "iniziabodymatter", "iniziabordermatrix", "iniziaboxedcolumns", "iniziabtxlabeltext", "iniziabtxrenderingdefinitions", "iniziabuffer", "iniziacases", "iniziacatcodetable", "iniziacenteraligned", "iniziachapter", "iniziacharacteralign", "iniziacheckedfences", "iniziachemical", "iniziachemicaltext", "iniziacollect", "iniziacollecting", "iniziacolore", "iniziacolorintent", "iniziacoloronly", "iniziacolorset", "iniziacolumns", "iniziacolumnset", "iniziacolumnsetspan", "iniziacombination", "iniziacomment", "iniziacomponenet", "iniziacontextcode", "iniziacontextdefinitioncode", "iniziactxfunction", "iniziactxfunctiondefinition", "iniziacurrentcolor", "iniziacurrentlistentrywrapper", "iniziadelimited", "iniziadelimitedtext", "iniziadisplaymath", "iniziadmath", "iniziadocument", "iniziaeffect", "iniziaelement", "iniziaelemento", "iniziaembeddedxtable", "iniziaendnote", "iniziaendofline", "iniziaexceptions", "iniziaexpanded", "iniziaexpandedcollect", "iniziaextendedcatcodetable", "iniziaexternalfigurecollection", "iniziafacingfloat", "iniziafact", "iniziafigure", "iniziafiguretext", "iniziafittingpage", "iniziafixed", "iniziafloatcombination", "iniziafont", "iniziafontclass", "iniziafontsolution", "iniziafootnote", "iniziaformula", "iniziaformulas", "iniziaframedcell", "iniziaframedcontent", "iniziaframedrow", "iniziaframedtable", "iniziaframedtext", "iniziafrontmatter", "iniziagraphictext", "iniziagridsnapping", "iniziahanging", "iniziahbox", "iniziahboxestohbox", "iniziahboxregister", "iniziaheadtext", "iniziahelptext", "iniziahiding", "iniziahighlight", "iniziahyphenation", "iniziaimath", "iniziaimpaccato", "iniziaincorniciato", "iniziaindentation", "iniziaindentedtext", "iniziainteraction", "iniziainterface", "iniziaintermezzotext", "iniziaintertext", "iniziaitemgroup", "iniziaitemgroupcolumns", "iniziaitemize", "iniziaknockout", "inizialabeltext", "inizialayout", "inizialegend", "inizialinealignment", "inizialineamargine", "inizialineatesto", "inizialinecorrection", "inizialinefiller", "inizialinenumbering", "inizialines", "inizialinetable", "inizialinetablebody", "inizialinetablecell", "inizialinetablehead", "inizialingua", "inizialocalfootnotes", "inizialocalheadsetup", "inizialocallinecorrection", "inizialocalnotes", "inizialocalsetups", "inizialua", "inizialuacode", "inizialuaparameterset", "inizialuasetups", "iniziamakeup", "iniziamarginblock", "iniziamarkedcontent", "iniziamarkpages", "iniziamathalignment", "iniziamathcases", "iniziamathlabeltext", "iniziamathmatrix", "iniziamathmode", "iniziamathstyle", "iniziamatrices", "iniziamatrix", "iniziamaxaligned", "iniziamdformula", "iniziamenuinterattivo", "iniziamettiformula", "iniziamiddlealigned", "iniziamiddlemakeup", "iniziamixedcolumns", "iniziamode", "iniziamodeset", "iniziamodule", "iniziamoduletestsection", "iniziampformula", "inizianamedsection", "inizianamedsubformulas", "inizianarrow", "inizianarrower", "inizianegative", "inizianicelyfilledbox", "inizianointerference", "inizianotallmodes", "inizianotext", "inizianotmode", "iniziaoperatortext", "iniziaopposite", "iniziaoutputstream", "iniziaoverlay", "iniziaoverprint", "iniziapagecolumns", "iniziapagecomment", "iniziapagefigure", "iniziapagelayout", "iniziapagemakeup", "iniziapar", "iniziaparagraph", "iniziaparagraphs", "iniziaparagraphscell", "iniziaparbuilder", "iniziapart", "iniziapath", "iniziaplacechemical", "iniziaplacefigure", "iniziaplacefloat", "iniziaplacegraphic", "iniziaplaceintermezzo", "iniziaplacelegend", "iniziaplacepairedbox", "iniziaplacetable", "iniziapositioning", "iniziapositionoverlay", "iniziapositive", "iniziapostponing", "iniziapostponingnotes", "iniziaprefixtext", "iniziaprocessassignmentcommand", "iniziaprocessassignmentlist", "iniziaprocesscommacommand", "iniziaprocesscommalist", "iniziaprodotto", "iniziaprogetto", "iniziaprotect", "iniziaprotectedcolors", "iniziapubblicazione", "iniziapunctuation", "iniziaquotation", "iniziaquote", "iniziarandomized", "iniziarandomseed", "iniziarawsetups", "iniziareadingfile", "iniziareferenceprefix", "iniziaregime", "iniziareusableMPgraphic", "iniziariga", "iniziaruby", "iniziascript", "iniziasdformula", "iniziasection", "iniziasectionblock", "iniziasectionblockenvironment", "iniziasectionlevel", "iniziasetups", "iniziasfondo", "iniziashapebox", "iniziashift", "iniziasidebar", "iniziasimplecolumns", "iniziaspecialitem", "iniziaspeech", "iniziaspformula", "iniziasplitformula", "iniziasplittext", "iniziaspread", "iniziastandardmakeup", "iniziastaticMPfigure", "iniziastaticMPgraphic", "iniziastrictinspectnextcharacter", "iniziastrut", "iniziastyle", "iniziasubformulas", "iniziasubject", "iniziasubjectlevel", "iniziasubsection", "iniziasubsentence", "iniziasubstack", "iniziasubsubject", "iniziasubsubsection", "iniziasubsubsubject", "iniziasubsubsubsection", "iniziasubsubsubsubject", "iniziasubsubsubsubsection", "iniziasubsubsubsubsubject", "iniziasuffixtext", "iniziasymbolset", "iniziatable", "iniziatablehead", "iniziatables", "iniziatabletail", "iniziatabletext", "iniziatabulate", "iniziatabulatehead", "iniziatabulatetail", "iniziatagged", "iniziataglabeltext", "iniziatesta", "iniziatexcode", "iniziatexdefinition", "iniziatext", "iniziatextbackground", "iniziatextbackgroundmanual", "iniziatextcolor", "iniziatextcolorintent", "iniziatextflow", "iniziatextmakeup", "iniziatitle", "iniziatokenlist", "iniziatokens", "iniziatransparent", "iniziatypescript", "iniziatypescriptcollection", "iniziatyping", "iniziauniqueMPgraphic", "iniziauniqueMPpagegraphic", "iniziaunittext", "iniziaunpacked", "iniziausableMPgraphic", "iniziauseMPgraphic", "iniziausemathstyleparameter", "iniziauserdata", "iniziausingbtxspecification", "iniziavaia", "iniziavbox", "iniziavboxregister", "iniziavboxtohbox", "iniziavboxtohboxseparator", "iniziaviewerlayer", "iniziavtop", "iniziavtopregister", "iniziaxcell", "iniziaxcellgroup", "iniziaxcolumn", "iniziaxgroup", "iniziaxmldisplayverbatim", "iniziaxmlinlineverbatim", "iniziaxmlraw", "iniziaxmlsetups", "iniziaxrow", "iniziaxrowgroup", "iniziaxtable", "iniziaxtablebody", "iniziaxtablefoot", "iniziaxtablehead", "iniziaxtablenext", "inriga", "installalingua", "intorno", "lettera", "lettere", "lineanera", "lineasottile", "lineatesto", "lineenere", "lineeriempimento", "lineesottili", "lingua", "linguaprincipale", "lunghezzaelenco", "marcatura", "matematica", "menuinterattivo", "mese", "mettielenco", "mettielencocombinato", "mettifiancoafianco", "mettiformula", "mettiingriglia", "mettinotepdp", "mettinotepdplocali", "mettinumeropagina", "mettiregistro", "mettisegnalibro", "mettisottoformula", "mettiunosullaltro", "mostraambientefontdeltesto", "mostracolore", "mostracornice", "mostrafontdeltesto", "mostragriglia", "mostragruppocolori", "mostraimpostazioni", "mostralyout", "mostramakeup", "mostrasetsimboli", "mostrastampa", "mostrastruts", "mostratavolozza", "nascondiblocchi", "nientelineecimafondo", "nientelineintestazionepdp", "nientespazio", "nota", "numeri", "numeriromani", "numeroformula", "numeropagina", "numeropaginacompleto", "numerotesta", "numerotestacorrente", "pagina", "paroladestra", "ped", "pedap", "perlungo", "posizionanumerotesta", "posizionatestotesta", "posizione", "prendibuffer", "prendimarcatura", "prodotto", "progetto", "programma", "pulsante", "pulsantemenu", "pulsantinterazione", "punti", "qualcheriga", "reimpostamarcatura", "rif", "riferimento", "riferimentopagina", "riferimentotesto", "riflessione", "rigariempimento", "rigovuoto", "ruota", "scala", "schermo", "scrividentroelenco", "scriviinelenco", "segnalibro", "selezionablocchi", "settext", "sfondo", "simbolo", "spazifissi", "spazio", "spaziofisso", "spessoreriga", "spezzaoggettomobile", "stackcampi", "stirato", "terminaJScode", "terminaJSpreamble", "terminaLUA", "terminaMP", "terminaMPclip", "terminaMPcode", "terminaMPdefinitions", "terminaMPdrawing", "terminaMPenvironment", "terminaMPextensions", "terminaMPinclusions", "terminaMPinitializations", "terminaMPpage", "terminaMPpositiongraphic", "terminaMPpositionmethod", "terminaMPrun", "terminaPARSEDXML", "terminaTABLE", "terminaTABLEbody", "terminaTABLEfoot", "terminaTABLEhead", "terminaTABLEnext", "terminaTC", "terminaTD", "terminaTDs", "terminaTEX", "terminaTEXpage", "terminaTH", "terminaTN", "terminaTR", "terminaTRs", "terminaTX", "terminaTY", "terminaXML", "terminaalign", "terminaalignment", "terminaallineacentro", "terminaallineadestra", "terminaallineasinistra", "terminaallmodes", "terminaambiente", "terminaappendices", "terminaarrangedpages", "terminaaside", "terminaattachment", "terminabackmatter", "terminabar", "terminabbordermatrix", "terminabitmapimage", "terminablockquote", "terminabodymatter", "terminabordermatrix", "terminaboxedcolumns", "terminabtxlabeltext", "terminabtxrenderingdefinitions", "terminabuffer", "terminacases", "terminacatcodetable", "terminacenteraligned", "terminachapter", "terminacharacteralign", "terminacheckedfences", "terminachemical", "terminachemicaltext", "terminacollect", "terminacollecting", "terminacolore", "terminacolorintent", "terminacoloronly", "terminacolorset", "terminacolumns", "terminacolumnset", "terminacolumnsetspan", "terminacombination", "terminacomment", "terminacomponenet", "terminacontextcode", "terminacontextdefinitioncode", "terminactxfunction", "terminactxfunctiondefinition", "terminacurrentcolor", "terminacurrentlistentrywrapper", "terminadelimited", "terminadelimitedtext", "terminadisplaymath", "terminadmath", "terminadocument", "terminaeffect", "terminaelement", "terminaelemento", "terminaembeddedxtable", "terminaendnote", "terminaendofline", "terminaexceptions", "terminaexpanded", "terminaexpandedcollect", "terminaextendedcatcodetable", "terminaexternalfigurecollection", "terminafacingfloat", "terminafact", "terminafigure", "terminafiguretext", "terminafittingpage", "terminafixed", "terminafloatcombination", "terminafont", "terminafontclass", "terminafontsolution", "terminafootnote", "terminaformula", "terminaformulas", "terminaframedcell", "terminaframedcontent", "terminaframedrow", "terminaframedtable", "terminaframedtext", "terminafrontmatter", "terminagraphictext", "terminagridsnapping", "terminahanging", "terminahbox", "terminahboxestohbox", "terminahboxregister", "terminaheadtext", "terminahelptext", "terminahiding", "terminahighlight", "terminahyphenation", "terminaimath", "terminaimpaccato", "terminaincorniciato", "terminaindentation", "terminaindentedtext", "terminainteraction", "terminainterface", "terminaintermezzotext", "terminaintertext", "terminaitemgroup", "terminaitemgroupcolumns", "terminaitemize", "terminaknockout", "terminalabeltext", "terminalayout", "terminalegend", "terminalinealignment", "terminalineamargine", "terminalineatesto", "terminalinecorrection", "terminalinefiller", "terminalinenumbering", "terminalines", "terminalinetable", "terminalinetablebody", "terminalinetablecell", "terminalinetablehead", "terminalingua", "terminalocalfootnotes", "terminalocalheadsetup", "terminalocallinecorrection", "terminalocalnotes", "terminalocalsetups", "terminalua", "terminaluacode", "terminaluaparameterset", "terminaluasetups", "terminamakeup", "terminamarginblock", "terminamarkedcontent", "terminamarkpages", "terminamathalignment", "terminamathcases", "terminamathlabeltext", "terminamathmatrix", "terminamathmode", "terminamathstyle", "terminamatrices", "terminamatrix", "terminamaxaligned", "terminamdformula", "terminamenuinterattivo", "terminamettiformula", "terminamiddlealigned", "terminamiddlemakeup", "terminamixedcolumns", "terminamode", "terminamodeset", "terminamodule", "terminamoduletestsection", "terminampformula", "terminanamedsection", "terminanamedsubformulas", "terminanarrow", "terminanarrower", "terminanegative", "terminanicelyfilledbox", "terminanointerference", "terminanotallmodes", "terminanotext", "terminanotmode", "terminaoperatortext", "terminaopposite", "terminaoutputstream", "terminaoverlay", "terminaoverprint", "terminapagecolumns", "terminapagecomment", "terminapagefigure", "terminapagelayout", "terminapagemakeup", "terminapar", "terminaparagraph", "terminaparagraphs", "terminaparagraphscell", "terminaparbuilder", "terminapart", "terminapath", "terminaplacechemical", "terminaplacefigure", "terminaplacefloat", "terminaplacegraphic", "terminaplaceintermezzo", "terminaplacelegend", "terminaplacepairedbox", "terminaplacetable", "terminapositioning", "terminapositionoverlay", "terminapositive", "terminapostponing", "terminapostponingnotes", "terminaprefixtext", "terminaprocessassignmentcommand", "terminaprocessassignmentlist", "terminaprocesscommacommand", "terminaprocesscommalist", "terminaprodotto", "terminaprogetto", "terminaprotect", "terminaprotectedcolors", "terminapubblicazione", "terminapunctuation", "terminaquotation", "terminaquote", "terminarandomized", "terminarandomseed", "terminarawsetups", "terminareadingfile", "terminareferenceprefix", "terminaregime", "terminareusableMPgraphic", "terminariga", "terminaruby", "terminascript", "terminasdformula", "terminasection", "terminasectionblock", "terminasectionblockenvironment", "terminasectionlevel", "terminasetups", "terminasfondo", "terminashapebox", "terminashift", "terminasidebar", "terminasimplecolumns", "terminaspecialitem", "terminaspeech", "terminaspformula", "terminasplitformula", "terminasplittext", "terminaspread", "terminastandardmakeup", "terminastaticMPfigure", "terminastaticMPgraphic", "terminastrictinspectnextcharacter", "terminastrut", "terminastyle", "terminasubformulas", "terminasubject", "terminasubjectlevel", "terminasubsection", "terminasubsentence", "terminasubstack", "terminasubsubject", "terminasubsubsection", "terminasubsubsubject", "terminasubsubsubsection", "terminasubsubsubsubject", "terminasubsubsubsubsection", "terminasubsubsubsubsubject", "terminasuffixtext", "terminasymbolset", "terminatable", "terminatablehead", "terminatables", "terminatabletail", "terminatabletext", "terminatabulate", "terminatabulatehead", "terminatabulatetail", "terminatagged", "terminataglabeltext", "terminatesta", "terminatexcode", "terminatexdefinition", "terminatext", "terminatextbackground", "terminatextbackgroundmanual", "terminatextcolor", "terminatextcolorintent", "terminatextflow", "terminatextmakeup", "terminatitle", "terminatokenlist", "terminatokens", "terminatransparent", "terminatypescript", "terminatypescriptcollection", "terminatyping", "terminauniqueMPgraphic", "terminauniqueMPpagegraphic", "terminaunittext", "terminaunpacked", "terminausableMPgraphic", "terminauseMPgraphic", "terminausemathstyleparameter", "terminauserdata", "terminausingbtxspecification", "terminavaia", "terminavbox", "terminavboxregister", "terminavboxtohbox", "terminavboxtohboxseparator", "terminaviewerlayer", "terminavtop", "terminavtopregister", "terminaxcell", "terminaxcellgroup", "terminaxcolumn", "terminaxgroup", "terminaxmldisplayverbatim", "terminaxmlinlineverbatim", "terminaxmlraw", "terminaxmlsetups", "terminaxrow", "terminaxrowgroup", "terminaxtable", "terminaxtablebody", "terminaxtablefoot", "terminaxtablehead", "terminaxtablenext", "testonotapdp", "testoriempimento", "tieniblocchi", "traduci", "usaJSscripts", "usaURL", "usablocco", "usacartella", "usacolonnasonoraesterna", "usadocumentoesterno", "usafiguraesterna", "usamodulo", "usasimboli", "usaurl", "vaia", "vaiabox", "vaiapagina", "vaigiu", "valorecolore", "versione" },
- ["nl"]={ "Cijfers", "Kap", "Letter", "Letters", "MAAND", "Romeins", "WEEKDAG", "WOORD", "WOORDEN", "Woord", "Woorden", "achtergrond", "bepaalkopnummer", "bepaallijstkenmerken", "bepaalregisterkenmerken", "bewaarbuffer", "blanko", "blokje", "blokjes", "cijfers", "converteernummer", "copieerveld", "corrigeerwitruimte", "datum", "definieer", "definieeraccent", "definieeralineas", "definieerblok", "definieerbuffer", "definieercombinatie", "definieercommando", "definieerconversie", "definieerfiguursymbool", "definieerfont", "definieerfontstijl", "definieerfontsynoniem", "definieerhbox", "definieeringesprongentext", "definieerinteractiemenu", "definieeritemgroep", "definieerkadertekst", "definieerkarakter", "definieerkleur", "definieerkleurgroep", "definieerkolomgroep", "definieerkolomovergang", "definieerkop", "definieerkorps", "definieerkorpsomgeving", "definieerlayer", "definieerlayout", "definieerletter", "definieerlijst", "definieermarkering", "definieeromlijnd", "definieeropmaak", "definieeroverlay", "definieerpaginaovergang", "definieerpalet", "definieerpapierformaat", "definieerplaats", "definieerplaatsblok", "definieerprofiel", "definieerprogramma", "definieerreferentie", "definieerreferentieformaat", "definieerregister", "definieersamengesteldelijst", "definieersectie", "definieersectieblok", "definieersorteren", "definieerstartstop", "definieersubveld", "definieersymbool", "definieersynoniemen", "definieertabelvorm", "definieertabulatie", "definieertekst", "definieertekstachtergrond", "definieertype", "definieertypen", "definieerveld", "definieerveldstapel", "definieerwiskundeuitlijnen", "doordefinieren", "doorlabelen", "doornummeren", "dunnelijn", "dunnelijnen", "eenregel", "ergens", "externfiguur", "formulenummer", "gebruikJSscripts", "gebruikURL", "gebruikblokken", "gebruikexterndocument", "gebruikexternfiguur", "gebruikexterngeluidsfragment", "gebruikmodule", "gebruikpad", "gebruiksymbolen", "gebruiktypescript", "gebruiktypescriptfile", "gebruikurl", "geenbovenenonderregels", "geenhoofdenvoetregels", "geenspatie", "grijskleur", "haalbuffer", "haalmarkering", "haarlijn", "handhaafblokken", "hoofdtaal", "hoog", "huidigedatum", "huidigekopnummer", "inlijnd", "inregel", "installeertaal", "interactiebalk", "interactiebuttons", "interactiemenu", "invullijnen", "invulregel", "invultekst", "kleur", "kleurenbalk", "kleurwaarde", "kloonveld", "kolom", "kopnummer", "laag", "laho", "legeregels", "letter", "letters", "lijndikte", "lijstlengte", "maand", "markeer", "naar", "naarbox", "naarpagina", "nokap", "noot", "omgeving", "omlaag", "omlijnd", "onbekend", "onderdeel", "op", "oppagina", "pagina", "paginanummer", "paginareferentie", "paslayoutaan", "passendveld", "plaatsbookmarks", "plaatsformule", "plaatskopnummer", "plaatskoptekst", "plaatslijst", "plaatslijstmetsynoniemen", "plaatslokalevoetnoten", "plaatsnaastelkaar", "plaatsonderelkaar", "plaatsopgrid", "plaatspaginanummer", "plaatsplaatsblok", "plaatsregister", "plaatsruwelijst", "plaatssamengesteldelijst", "plaatssubformule", "plaatsvoetnoten", "positioneer", "produkt", "programma", "projekt", "punten", "refereer", "referentie", "regellinks", "regelmidden", "regelrechts", "resetmarkering", "romeins", "rooster", "roteer", "schaal", "scherm", "schrijfnaarlijst", "schrijftussenlijst", "selecteerblokken", "som", "spatie", "spiegel", "splitsplaatsblok", "startachtergrond", "startinteractiemenu", "startkantlijn", "startkleur", "startkop", "startlokalevoetnoten", "startmargeblok", "startnaar", "startomgeving", "startomlijnd", "startonderdeel", "startopelkaar", "startplaatsformule", "startplaatsplaatsblok", "startprodukt", "startprojekt", "startpublicatie", "startregel", "startregelcorrectie", "startregellinks", "startregelmidden", "startregelrechts", "startsom", "starttaal", "starttekstachtergrond", "starttekstlijn", "startuitlijnen", "stelachtergrondenin", "stelachtergrondin", "stelalineasin", "stelarrangerenin", "stelblankoin", "stelblokin", "stelblokjesin", "stelblokkopjein", "stelblokkopjesin", "stelbovenin", "stelboventekstenin", "stelbufferin", "stelciterenin", "stelclipin", "stelcommentaarin", "steldoordefinierenin", "steldoornummerenin", "steldunnelijnenin", "stelformulein", "stelformulesin", "stelformulierenin", "stelhoofdin", "stelhoofdtekstenin", "stelingesprongentextin", "stelinmargein", "stelinspringenin", "stelinteractiebalkin", "stelinteractiein", "stelinteractiemenuin", "stelinteractieschermin", "stelinterliniein", "stelinvullijnenin", "stelinvulregelsin", "stelitemgroepin", "stelitemsin", "stelkadertekstenin", "stelkadertekstin", "stelkantlijnin", "stelkapitalenin", "stelkleurenin", "stelkleurin", "stelkolomgroepin", "stelkolomgroepregelsin", "stelkolomgroepstartin", "stelkolommenin", "stelkopin", "stelkopnummerin", "stelkoppeltekenin", "stelkoppenin", "stelkorpsin", "stellayoutin", "stellijndiktein", "stellijstin", "stelmargeblokkenin", "stelmarkeringin", "stelnaastplaatsenin", "stelomlijndin", "stelonderin", "stelondertekstenin", "stelopmaakin", "stelopsommingenin", "stelpaginacommentaarin", "stelpaginanummerin", "stelpaginanummeringin", "stelpaginaovergangenin", "stelpaletin", "stelpapierformaatin", "stelpapierin", "stelparagraafnummerenin", "stelplaatsblokin", "stelplaatsblokkenin", "stelplaatsbloksplitsenin", "stelplaatsin", "stelpositionerenin", "stelprogrammasin", "stelrefererenin", "stelregelnummerenin", "stelregelsin", "stelregisterin", "stelroterenin", "stelsamengesteldelijstin", "stelsectieblokin", "stelsmallerin", "stelsorterenin", "stelspatieringin", "stelstartstopin", "stelsubpaginanummerin", "stelsymboolsetin", "stelsynoniemenin", "steltaalin", "steltabellenin", "steltabulatiein", "steltekstachtergrondin", "steltekstin", "steltekstinhoudin", "steltekstlijnenin", "stelteksttekstenin", "steltolerantiein", "steltypein", "steltypenin", "steluitlijnenin", "stelurlin", "stelveldenin", "stelveldin", "stelvoetin", "stelvoetnotenin", "stelvoettekstenin", "stelwiskundeuitlijnenin", "stelwitruimtein", "stopachtergrond", "stopinteractiemenu", "stopkantlijn", "stopkleur", "stopkop", "stoplokalevoetnoten", "stopmargeblok", "stopnaar", "stopomgeving", "stopomlijnd", "stoponderdeel", "stopopelkaar", "stopplaatsformule", "stopplaatsplaatsblok", "stopprodukt", "stopprojekt", "stoppublicatie", "stopregel", "stopregelcorrectie", "stopregellinks", "stopregelmidden", "stopregelrechts", "stopsom", "stoptaal", "stoptekstachtergrond", "stoptekstlijn", "stopuitlijnen", "subpaginanummer", "switchnaarkorps", "symbool", "taal", "tekstlijn", "tekstreferentie", "testkolom", "testpagina", "toelichting", "toongrid", "tooninstellingen", "toonkader", "toonkleur", "toonkleurgroep", "toonkorps", "toonkorpsomgeving", "toonlayout", "toonopmaak", "toonpalet", "toonprint", "toonstruts", "toonsymboolset", "uit", "uitgerekt", "vastespatie", "vastespaties", "veld", "veldstapel", "verbergblokken", "vergelijkkleurgroep", "vergelijkpalet", "versie", "vertaal", "verwerkblokken", "voetnoottekst", "volledigepaginanummer", "volledigregister", "voluit", "weekdag", "wiskunde", "woordrechts" },
- ["pe"]={ "آیتم", "آیتمها", "آینه", "از", "استÙاده‌بلوکها", "استÙاده‌دستخط‌تایپ", "استÙاده‌شکل‌خارجی", "استÙاده‌قطعه‌موزیک‌خارجی", "استÙاده‌مدول", "استÙاده‌مسیر", "استÙاده‌نمادها", "استÙاده‌نوشتارخارجی", "استÙاده‌پرونده‌دستخط‌تایپ", "اعدادلاتین", "اÙزودن", "انتخاب‌بلوکها", "بارگذاری‌آرایش", "بارگذاری‌آیتمها", "بارگذاری‌ارجاع", "بارگذاری‌اندازه‌برگ", "بارگذاری‌باریکتر", "بارگذاری‌باÙر", "بارگذاری‌بالا", "بارگذاری‌بردباری", "بارگذاری‌برنامه‌ها", "بارگذاری‌برگ", "بارگذاری‌بلوک", "بارگذاری‌بلوک‌بخش", "بارگذاری‌تایپ", "بارگذاری‌تایپ‌کردن", "بارگذاری‌ترتیب", "بارگذاری‌تنظیم", "بارگذاری‌تنظیم‌ریاضی", "بارگذاری‌ته‌برگ", "بارگذاری‌تورÙتگی", "بارگذاری‌توضیح", "بارگذاری‌توضیح‌صÙحه", "بارگذاری‌ثبت", "بارگذاری‌جانشانی", "بارگذاری‌جدولها", "بارگذاری‌جدول‌بندی", "بارگذاری‌خالی", "بارگذاری‌خطها", "بارگذاری‌خطهای‌حاشیه", "بارگذاری‌خطهای‌سیاه", "بارگذاری‌خطهای‌متن", "بارگذاری‌خطهای‌مجموعه‌ستون", "بارگذاری‌خطها‌ی‌نازک", "بارگذاری‌درج‌درخطها", "بارگذاری‌درج‌مخالÙ", "بارگذاری‌دوران", "بارگذاری‌رنگ", "بارگذاری‌رنگها", "بارگذاری‌زبان", "بارگذاری‌ستونها", "بارگذاری‌سر", "بارگذاری‌سربرگ", "بارگذاری‌سرها", "بارگذاری‌شرح", "بارگذاری‌شرحها", "بارگذاری‌شروع‌مجموعه‌ستون", "بارگذاری‌شروع‌پایان", "بارگذاری‌شماره‌زیرصÙحه", "بارگذاری‌شماره‌سر", "بارگذاری‌شماره‌صÙحه", "بارگذاری‌شماره‌گذاریها", "بارگذاری‌شماره‌گذاری‌صÙحه", "بارگذاری‌شماره‌گذاری‌پاراگراÙ", "بارگذاری‌شماره‌‌گذاری‌خط", "بارگذاری‌شناور", "بارگذاری‌شناورها", "بارگذاری‌شکاÙتن‌شناورها", "بارگذاری‌طرح", "بارگذاری‌طرح‌بندی", "بارگذاری‌عرض‌خط", "بارگذاری‌Ùاصله‌بین‌خط", "بارگذاری‌Ùرمولها", "بارگذاری‌Ùضای‌سÙید", "بارگذاری‌Ùضا‌گذاری", "بارگذاری‌قالبی", "بارگذاری‌قلم‌متن", "بارگذاری‌لوح", "بارگذاری‌لیست", "بارگذاری‌لیست‌ترکیبی", "بارگذاری‌مترادÙها", "بارگذاری‌متن", "بارگذاری‌متنهای‌بالا", "بارگذاری‌متن‌سربرگ", "بارگذاری‌متن‌قالبی", "بارگذاری‌متن‌متنها", "بارگذاری‌متن‌پانوشت", "بارگذاری‌متن‌پایین", "بارگذاری‌مجموعه‌ستون", "بارگذاری‌مجموعه‌نماد", "بارگذاری‌منوی‌پانل", "بارگذاری‌مکان‌گذاری", "بارگذاری‌میدان", "بارگذاری‌میدانها", "بارگذاری‌میله‌پانل", "بارگذاری‌نشانه‌شکستن", "بارگذاری‌نشانه‌گذاری", "بارگذاری‌نقل", "بارگذاری‌پاراگراÙها", "بارگذاری‌پانل", "بارگذاری‌پانوشتها", "بارگذاری‌پایین", "بارگذاری‌پرده‌پانل", "بارگذاری‌پرکردن‌خطها", "بارگذاری‌پس‌زمینه", "بارگذاری‌پس‌زمینه‌ها", "بارگذاری‌چیدن", "بارگذاری‌گذارصÙحه", "بارگذاری‌گروههای‌آیتم", "بارگذاری‌گروه‌آیتم", "بازنشانی‌نشانه‌گذاری", "بدون‌خط‌بالاوپایین", "بدون‌خط‌سروته‌برگ", "بدون‌Ùضا", "برنامه", "بروبه", "بروبه‌جعبه", "بروبه‌صÙحه", "بروپایین", "بلند", "بلوکهای‌پردازش", "بلوکها‌پنهان", "بنویس‌بین‌لیست", "بنویس‌در‌لیست", "تاریخ", "تاریخ‌جاری", "تایپ", "تایپ‌باÙر", "تایپ‌پرونده", "ترجمه", "تعریÙ", "تعریÙ‌آرایش", "تعریÙ‌الگوی‌جدول", "تعریÙ‌اندازه‌برگ", "تعریÙ‌باÙر", "تعریÙ‌بخش", "تعریÙ‌برنامه", "تعریÙ‌برچسب", "تعریÙ‌بلوک", "تعریÙ‌بلوک‌بخش", "تعریÙ‌تایپ", "تعریÙ‌تایپ‌کردن", "تعریÙ‌تبدیل", "تعریÙ‌ترتیب", "تعریÙ‌ترکیب", "تعریÙ‌تنظیم‌ریاضی", "تعریÙ‌توده‌میدان", "تعریÙ‌ثبت", "تعریÙ‌جانشانی", "تعریÙ‌جدول‌بندی", "تعریÙ‌جعبه‌‌اÙÙ‚ÛŒ", "تعریÙ‌حرÙ", "تعریÙ‌رنگ", "تعریÙ‌زیرمیدان", "تعریÙ‌سبک", "تعریÙ‌سبک‌قلم", "تعریÙ‌سر", "تعریÙ‌شرح", "تعریÙ‌شروع‌پایان", "تعریÙ‌شماره‌بندی", "تعریÙ‌شمایل‌مرجع", "تعریÙ‌شناور", "تعریÙ‌شکستن‌ستون", "تعریÙ‌شکست‌صÙحه", "تعریÙ‌طرح‌بندی", "تعریÙ‌Ùرمان", "تعریÙ‌قالبی", "تعریÙ‌قلم", "تعریÙ‌قلم‌متن", "تعریÙ‌لایه", "تعریÙ‌لهجه", "تعریÙ‌لوح", "تعریÙ‌لیست", "تعریÙ‌لیست‌ترکیبی", "تعریÙ‌مترادÙها", "تعریÙ‌مترادÙ‌قلم", "تعریÙ‌متن", "تعریÙ‌متن‌قالبی", "تعریÙ‌مجموعه‌ستون", "تعریÙ‌محیط‌قلم‌بدنه", "تعریÙ‌مرجع", "تعریÙ‌منوی‌پانل", "تعریÙ‌میدان", "تعریÙ‌نشانه‌گذاری", "تعریÙ‌نماد", "تعریÙ‌نمادشکل", "تعریÙ‌پاراگراÙها", "تعریÙ‌پروÙایل", "تعریÙ‌پوشش", "تعریÙ‌گروه‌آیتم", "تعریÙ‌گروه‌رنگ", "تعیین‌شماره‌سر", "تعیین‌محتوای‌متن", "تعیین‌مشخصات‌ثبت", "تعیین‌مشخصات‌لیست", "تغییربه‌قلم‌بدنه", "تنظیم‌راست", "تنظیم‌طرح‌بندی", "تنظیم‌وسط", "توجه", "توری", "تولید", "تک", "ثبت‌کامل", "حرÙ", "حرÙها", "Ø­Ùظ‌بلوکها", "خالی", "خطهای‌سیاه", "خطهای‌نازک", "خطها‌خالی", "خط‌سیاه", "خط‌متن", "خط‌مو", "خط‌نازک", "خ‌ا", "خ‌ع", "در", "درج‌ثبت", "درج‌درخط", "درج‌درخطها", "درج‌درمتن", "درج‌در‌بالای‌یکدیگر", "درج‌در‌توری", "درج‌زیرÙرمول", "درج‌شماره‌سر", "درج‌شماره‌صÙحه", "درج‌شناور", "درج‌Ùرمول", "درج‌لیست", "درج‌لیست‌خام", "درج‌لیست‌مختلط", "درج‌متن‌سر", "درج‌پانوشتها", "درج‌پانوشتهای‌موضعی", "درج‌چوب‌خط", "درج‌کنار‌به‌کنار", "درخط", "درصÙحه", "درقالبی", "درمورد", "درون", "درپر", "دریاÙت‌باÙر", "دریاÙت‌نشانه", "دوران", "دکمه", "دکمه‌منو", "دکمه‌پانل", "رج", "رنگ", "رنگ‌خاکستری", "روزهÙته", "ریاضی", "زبان", "زبان‌اصلی", "ستون", "ستون‌امتحان", "سرپوش‌کوچک‌نه", "شروعJScode", "شروعJSpreamble", "شروعLUA", "شروعMP", "شروعMPclip", "شروعMPcode", "شروعMPdefinitions", "شروعMPdrawing", "شروعMPenvironment", "شروعMPextensions", "شروعMPinclusions", "شروعMPinitializations", "شروعMPpage", "شروعMPpositiongraphic", "شروعMPpositionmethod", "شروعMPrun", "شروعPARSEDXML", "شروعTABLE", "شروعTABLEbody", "شروعTABLEfoot", "شروعTABLEhead", "شروعTABLEnext", "شروعTC", "شروعTD", "شروعTDs", "شروعTEX", "شروعTEXpage", "شروعTH", "شروعTN", "شروعTR", "شروعTRs", "شروعTX", "شروعTY", "شروعXML", "شروعalign", "شروعalignment", "شروعallmodes", "شروعappendices", "شروعarrangedpages", "شروعaside", "شروعattachment", "شروعbackmatter", "شروعbar", "شروعbbordermatrix", "شروعbitmapimage", "شروعblockquote", "شروعbodymatter", "شروعbordermatrix", "شروعboxedcolumns", "شروعbtxlabeltext", "شروعbtxrenderingdefinitions", "شروعbuffer", "شروعcases", "شروعcatcodetable", "شروعcenteraligned", "شروعchapter", "شروعcharacteralign", "شروعcheckedfences", "شروعchemical", "شروعchemicaltext", "شروعcollect", "شروعcollecting", "شروعcolorintent", "شروعcoloronly", "شروعcolorset", "شروعcolumns", "شروعcolumnset", "شروعcolumnsetspan", "شروعcombination", "شروعcomment", "شروعcontextcode", "شروعcontextdefinitioncode", "شروعctxfunction", "شروعctxfunctiondefinition", "شروعcurrentcolor", "شروعcurrentlistentrywrapper", "شروعdelimited", "شروعdelimitedtext", "شروعdisplaymath", "شروعdmath", "شروعdocument", "شروعeffect", "شروعelement", "شروعembeddedxtable", "شروعendnote", "شروعendofline", "شروعexceptions", "شروعexpanded", "شروعexpandedcollect", "شروعextendedcatcodetable", "شروعexternalfigurecollection", "شروعfacingfloat", "شروعfact", "شروعfigure", "شروعfiguretext", "شروعfittingpage", "شروعfixed", "شروعfloatcombination", "شروعfont", "شروعfontclass", "شروعfontsolution", "شروعfootnote", "شروعformula", "شروعformulas", "شروعframedcell", "شروعframedcontent", "شروعframedrow", "شروعframedtable", "شروعframedtext", "شروعfrontmatter", "شروعgraphictext", "شروعgridsnapping", "شروعhanging", "شروعhbox", "شروعhboxestohbox", "شروعhboxregister", "شروعheadtext", "شروعhelptext", "شروعhiding", "شروعhighlight", "شروعhyphenation", "شروعimath", "شروعindentation", "شروعindentedtext", "شروعinteraction", "شروعinterface", "شروعintermezzotext", "شروعintertext", "شروعitemgroup", "شروعitemgroupcolumns", "شروعitemize", "شروعknockout", "شروعlabeltext", "شروعlayout", "شروعlegend", "شروعlinealignment", "شروعlinecorrection", "شروعlinefiller", "شروعlinenumbering", "شروعlines", "شروعlinetable", "شروعlinetablebody", "شروعlinetablecell", "شروعlinetablehead", "شروعlocalfootnotes", "شروعlocalheadsetup", "شروعlocallinecorrection", "شروعlocalnotes", "شروعlocalsetups", "شروعlua", "شروعluacode", "شروعluaparameterset", "شروعluasetups", "شروعmakeup", "شروعmarginblock", "شروعmarkedcontent", "شروعmarkpages", "شروعmathalignment", "شروعmathcases", "شروعmathlabeltext", "شروعmathmatrix", "شروعmathmode", "شروعmathstyle", "شروعmatrices", "شروعmatrix", "شروعmaxaligned", "شروعmdformula", "شروعmiddlealigned", "شروعmiddlemakeup", "شروعmixedcolumns", "شروعmode", "شروعmodeset", "شروعmodule", "شروعmoduletestsection", "شروعmpformula", "شروعnamedsection", "شروعnamedsubformulas", "شروعnarrow", "شروعnarrower", "شروعnegative", "شروعnicelyfilledbox", "شروعnointerference", "شروعnotallmodes", "شروعnotext", "شروعnotmode", "شروعoperatortext", "شروعopposite", "شروعoutputstream", "شروعoverlay", "شروعoverprint", "شروعpagecolumns", "شروعpagecomment", "شروعpagefigure", "شروعpagelayout", "شروعpagemakeup", "شروعpar", "شروعparagraph", "شروعparagraphs", "شروعparagraphscell", "شروعparbuilder", "شروعpart", "شروعpath", "شروعplacechemical", "شروعplacefigure", "شروعplacegraphic", "شروعplaceintermezzo", "شروعplacelegend", "شروعplacepairedbox", "شروعplacetable", "شروعpositioning", "شروعpositionoverlay", "شروعpositive", "شروعpostponing", "شروعpostponingnotes", "شروعprefixtext", "شروعprocessassignmentcommand", "شروعprocessassignmentlist", "شروعprocesscommacommand", "شروعprocesscommalist", "شروعprotect", "شروعprotectedcolors", "شروعpunctuation", "شروعquotation", "شروعquote", "شروعrandomized", "شروعrandomseed", "شروعrawsetups", "شروعreadingfile", "شروعreferenceprefix", "شروعregime", "شروعreusableMPgraphic", "شروعruby", "شروعscript", "شروعsdformula", "شروعsection", "شروعsectionblock", "شروعsectionblockenvironment", "شروعsectionlevel", "شروعsetups", "شروعshapebox", "شروعshift", "شروعsidebar", "شروعsimplecolumns", "شروعspecialitem", "شروعspeech", "شروعspformula", "شروعsplitformula", "شروعsplittext", "شروعspread", "شروعstandardmakeup", "شروعstaticMPfigure", "شروعstaticMPgraphic", "شروعstrictinspectnextcharacter", "شروعstrut", "شروعstyle", "شروعsubformulas", "شروعsubject", "شروعsubjectlevel", "شروعsubsection", "شروعsubsentence", "شروعsubstack", "شروعsubsubject", "شروعsubsubsection", "شروعsubsubsubject", "شروعsubsubsubsection", "شروعsubsubsubsubject", "شروعsubsubsubsubsection", "شروعsubsubsubsubsubject", "شروعsuffixtext", "شروعsymbolset", "شروعtable", "شروعtablehead", "شروعtables", "شروعtabletail", "شروعtabletext", "شروعtabulate", "شروعtabulatehead", "شروعtabulatetail", "شروعtagged", "شروعtaglabeltext", "شروعtexcode", "شروعtexdefinition", "شروعtext", "شروعtextbackground", "شروعtextbackgroundmanual", "شروعtextcolor", "شروعtextcolorintent", "شروعtextflow", "شروعtextmakeup", "شروعtitle", "شروعtokenlist", "شروعtokens", "شروعtransparent", "شروعtypescript", "شروعtypescriptcollection", "شروعtyping", "شروعuniqueMPgraphic", "شروعuniqueMPpagegraphic", "شروعunittext", "شروعunpacked", "شروعusableMPgraphic", "شروعuseMPgraphic", "شروعusemathstyleparameter", "شروعuserdata", "شروعusingbtxspecification", "شروعvbox", "شروعvboxregister", "شروعvboxtohbox", "شروعvboxtohboxseparator", "شروعviewerlayer", "شروعvtop", "شروعvtopregister", "شروعxcell", "شروعxcellgroup", "شروعxcolumn", "شروعxgroup", "شروعxmldisplayverbatim", "شروعxmlinlineverbatim", "شروعxmlraw", "شروعxmlsetups", "شروعxrow", "شروعxrowgroup", "شروعxtable", "شروعxtablebody", "شروعxtablefoot", "شروعxtablehead", "شروعxtablenext", "شروعآیتم", "شروعبروبه", "شروعتنظیم‌راست", "شروعتنظیم‌وسط", "شروعتولید", "شروعخط‌حاشیه", "شروعخط‌متن", "شروعدرج‌شناور", "شروعدرج‌Ùرمول", "شروعرنگ", "شروعزبان", "شروعسر", "شروعÙشرده", "شروعقالبی", "شروعمحیط", "شروعمنوی‌پانل", "شروعمولÙÙ‡", "شروعنشر", "شروعپروژه", "شروعپس‌زمینه", "شروعچپ‌چین", "شروع‌خط", "شماره‌زیرصÙحه", "شماره‌سر", "شماره‌سرجاری", "شماره‌صÙحه", "شماره‌صÙحه‌کامل", "شماره‌Ùرمول", "شماره‌مبدل", "شماره‌ها", "شکاÙتن‌شناور", "شکل‌خارجی", "صÙحه", "صÙحه‌تست", "طول‌لیست", "عرض‌خط", "Ùضا", "Ùضاهای‌ثابت", "Ùضای‌ثابت", "Ùضای‌سÙیدصحیح", "قالبی", "لوح‌مقایسه", "ماه", "متن‌پانوشت", "محیط", "مراجعه", "مرجع", "مرجع‌صÙحه", "مرجع‌متن", "مقایسه‌گروه‌رنگ", "مقداررنگ", "مقیاس", "منوی‌پانل", "مولÙÙ‡", "مکان", "میدان", "میدان‌شبیه‌سازی", "میدان‌پشته", "میدان‌کپی", "میله‌رنگ", "میله‌پانل", "ناشناس", "نسخه", "نشانه‌گذاری", "نصب‌زبان", "نقطه‌ها", "نماد", "نمایش‌آرایش", "نمایش‌بارگذاریها", "نمایش‌بستها", "نمایش‌توری", "نمایش‌رنگ", "نمایش‌طرح‌بندی", "نمایش‌قالب", "نمایش‌قلم‌بدنه", "نمایش‌لوح", "نمایش‌مجموعه‌علامت", "نمایش‌محیط‌قلم‌بدنه", "نمایش‌چاپ", "نمایش‌گروه‌رنگ", "پابا", "پایانJScode", "پایانJSpreamble", "پایانLUA", "پایانMP", "پایانMPclip", "پایانMPcode", "پایانMPdefinitions", "پایانMPdrawing", "پایانMPenvironment", "پایانMPextensions", "پایانMPinclusions", "پایانMPinitializations", "پایانMPpage", "پایانMPpositiongraphic", "پایانMPpositionmethod", "پایانMPrun", "پایانPARSEDXML", "پایانTABLE", "پایانTABLEbody", "پایانTABLEfoot", "پایانTABLEhead", "پایانTABLEnext", "پایانTC", "پایانTD", "پایانTDs", "پایانTEX", "پایانTEXpage", "پایانTH", "پایانTN", "پایانTR", "پایانTRs", "پایانTX", "پایانTY", "پایانXML", "پایانalign", "پایانalignment", "پایانallmodes", "پایانappendices", "پایانarrangedpages", "پایانaside", "پایانattachment", "پایانbackmatter", "پایانbar", "پایانbbordermatrix", "پایانbitmapimage", "پایانblockquote", "پایانbodymatter", "پایانbordermatrix", "پایانboxedcolumns", "پایانbtxlabeltext", "پایانbtxrenderingdefinitions", "پایانbuffer", "پایانcases", "پایانcatcodetable", "پایانcenteraligned", "پایانchapter", "پایانcharacteralign", "پایانcheckedfences", "پایانchemical", "پایانchemicaltext", "پایانcollect", "پایانcollecting", "پایانcolorintent", "پایانcoloronly", "پایانcolorset", "پایانcolumns", "پایانcolumnset", "پایانcolumnsetspan", "پایانcombination", "پایانcomment", "پایانcontextcode", "پایانcontextdefinitioncode", "پایانctxfunction", "پایانctxfunctiondefinition", "پایانcurrentcolor", "پایانcurrentlistentrywrapper", "پایانdelimited", "پایانdelimitedtext", "پایانdisplaymath", "پایانdmath", "پایانdocument", "پایانeffect", "پایانelement", "پایانembeddedxtable", "پایانendnote", "پایانendofline", "پایانexceptions", "پایانexpanded", "پایانexpandedcollect", "پایانextendedcatcodetable", "پایانexternalfigurecollection", "پایانfacingfloat", "پایانfact", "پایانfigure", "پایانfiguretext", "پایانfittingpage", "پایانfixed", "پایانfloatcombination", "پایانfont", "پایانfontclass", "پایانfontsolution", "پایانfootnote", "پایانformula", "پایانformulas", "پایانframedcell", "پایانframedcontent", "پایانframedrow", "پایانframedtable", "پایانframedtext", "پایانfrontmatter", "پایانgraphictext", "پایانgridsnapping", "پایانhanging", "پایانhbox", "پایانhboxestohbox", "پایانhboxregister", "پایانheadtext", "پایانhelptext", "پایانhiding", "پایانhighlight", "پایانhyphenation", "پایانimath", "پایانindentation", "پایانindentedtext", "پایانinteraction", "پایانinterface", "پایانintermezzotext", "پایانintertext", "پایانitemgroup", "پایانitemgroupcolumns", "پایانitemize", "پایانknockout", "پایانlabeltext", "پایانlayout", "پایانlegend", "پایانlinealignment", "پایانlinecorrection", "پایانlinefiller", "پایانlinenumbering", "پایانlines", "پایانlinetable", "پایانlinetablebody", "پایانlinetablecell", "پایانlinetablehead", "پایانlocalfootnotes", "پایانlocalheadsetup", "پایانlocallinecorrection", "پایانlocalnotes", "پایانlocalsetups", "پایانlua", "پایانluacode", "پایانluaparameterset", "پایانluasetups", "پایانmakeup", "پایانmarginblock", "پایانmarkedcontent", "پایانmarkpages", "پایانmathalignment", "پایانmathcases", "پایانmathlabeltext", "پایانmathmatrix", "پایانmathmode", "پایانmathstyle", "پایانmatrices", "پایانmatrix", "پایانmaxaligned", "پایانmdformula", "پایانmiddlealigned", "پایانmiddlemakeup", "پایانmixedcolumns", "پایانmode", "پایانmodeset", "پایانmodule", "پایانmoduletestsection", "پایانmpformula", "پایانnamedsection", "پایانnamedsubformulas", "پایانnarrow", "پایانnarrower", "پایانnegative", "پایانnicelyfilledbox", "پایانnointerference", "پایانnotallmodes", "پایانnotext", "پایانnotmode", "پایانoperatortext", "پایانopposite", "پایانoutputstream", "پایانoverlay", "پایانoverprint", "پایانpagecolumns", "پایانpagecomment", "پایانpagefigure", "پایانpagelayout", "پایانpagemakeup", "پایانpar", "پایانparagraph", "پایانparagraphs", "پایانparagraphscell", "پایانparbuilder", "پایانpart", "پایانpath", "پایانplacechemical", "پایانplacefigure", "پایانplacegraphic", "پایانplaceintermezzo", "پایانplacelegend", "پایانplacepairedbox", "پایانplacetable", "پایانpositioning", "پایانpositionoverlay", "پایانpositive", "پایانpostponing", "پایانpostponingnotes", "پایانprefixtext", "پایانprocessassignmentcommand", "پایانprocessassignmentlist", "پایانprocesscommacommand", "پایانprocesscommalist", "پایانprotect", "پایانprotectedcolors", "پایانpunctuation", "پایانquotation", "پایانquote", "پایانrandomized", "پایانrandomseed", "پایانrawsetups", "پایانreadingfile", "پایانreferenceprefix", "پایانregime", "پایانreusableMPgraphic", "پایانruby", "پایانscript", "پایانsdformula", "پایانsection", "پایانsectionblock", "پایانsectionblockenvironment", "پایانsectionlevel", "پایانsetups", "پایانshapebox", "پایانshift", "پایانsidebar", "پایانsimplecolumns", "پایانspecialitem", "پایانspeech", "پایانspformula", "پایانsplitformula", "پایانsplittext", "پایانspread", "پایانstandardmakeup", "پایانstaticMPfigure", "پایانstaticMPgraphic", "پایانstrictinspectnextcharacter", "پایانstrut", "پایانstyle", "پایانsubformulas", "پایانsubject", "پایانsubjectlevel", "پایانsubsection", "پایانsubsentence", "پایانsubstack", "پایانsubsubject", "پایانsubsubsection", "پایانsubsubsubject", "پایانsubsubsubsection", "پایانsubsubsubsubject", "پایانsubsubsubsubsection", "پایانsubsubsubsubsubject", "پایانsuffixtext", "پایانsymbolset", "پایانtable", "پایانtablehead", "پایانtables", "پایانtabletail", "پایانtabletext", "پایانtabulate", "پایانtabulatehead", "پایانtabulatetail", "پایانtagged", "پایانtaglabeltext", "پایانtexcode", "پایانtexdefinition", "پایانtext", "پایانtextbackground", "پایانtextbackgroundmanual", "پایانtextcolor", "پایانtextcolorintent", "پایانtextflow", "پایانtextmakeup", "پایانtitle", "پایانtokenlist", "پایانtokens", "پایانtransparent", "پایانtypescript", "پایانtypescriptcollection", "پایانtyping", "پایانuniqueMPgraphic", "پایانuniqueMPpagegraphic", "پایانunittext", "پایانunpacked", "پایانusableMPgraphic", "پایانuseMPgraphic", "پایانusemathstyleparameter", "پایانuserdata", "پایانusingbtxspecification", "پایانvbox", "پایانvboxregister", "پایانvboxtohbox", "پایانvboxtohboxseparator", "پایانviewerlayer", "پایانvtop", "پایانvtopregister", "پایانxcell", "پایانxcellgroup", "پایانxcolumn", "پایانxgroup", "پایانxmldisplayverbatim", "پایانxmlinlineverbatim", "پایانxmlraw", "پایانxmlsetups", "پایانxrow", "پایانxrowgroup", "پایانxtable", "پایانxtablebody", "پایانxtablefoot", "پایانxtablehead", "پایانxtablenext", "پایانآیتم", "پایانبروبه", "پایانتنظیم‌راست", "پایانتنظیم‌وسط", "پایانتولید", "پایانخط‌حاشیه", "پایانخط‌متن", "پایاندرج‌شناور", "پایاندرج‌Ùرمول", "پایانرنگ", "پایانزبان", "پایانسر", "پایانÙشرده", "پایانقالبی", "پایانمحیط", "پایانمنوی‌پانل", "پایانمولÙÙ‡", "پایاننشر", "پایانپروژه", "پایانپس‌زمینه", "پایانچپ‌چین", "پایان‌خط", "پایین", "پرده", "پروژه", "پرکردن‌میدان", "پس‌زمینه", "چوبخط", "چپ‌چین", "کشیده", "کلمه‌راست", "گیره", "یادداشت", "یک‌جا", "یک‌خط" },
- ["ro"]={ "CUVANT", "CUVINTE", "Cuvant", "Cuvinte", "Kap", "LUNA", "Litera", "Litere", "Numere", "Numereromane", "ZIDINSAPTAMANA", "adapteazaaspect", "adubuffer", "adumarcaje", "afiseazaaspect", "afiseazaculoare", "afiseazafonttext", "afiseazagrid", "afiseazagrupculoare", "afiseazamakeup", "afiseazamediufonttext", "afiseazapaleta", "afiseazarama", "afiseazasetari", "afiseazasetsimboluri", "afiseazastruts", "afiseazatiparire", "aliniatcentru", "aliniatdreapta", "aliniatstanga", "ascundeblocuri", "baraculoare", "barainteractiune", "blanc", "butoaneinteractiune", "buton", "butonmeniu", "camp", "cloneazacamp", "coloana", "comparagrupculoare", "comparapaleta", "completeazanumarpagina", "componenta", "convertestenumar", "copiazacamp", "corecteazaspatiualb", "culoare", "culoaregri", "cuvantdreapta", "data", "datacurenta", "defineste", "definesteaccent", "definesteantet", "definestebloc", "definesteblocsectiune", "definestebuffer", "definestecamp", "definestecaracter", "definestecomanda", "definesteconversie", "definesteculoare", "definestedescriere", "definestedimensiunehartie", "definesteenumerare", "definesteeticheta", "definestefloat", "definestefont", "definestefonttext", "definesteformatreferinte", "definestegrupculori", "definestehbox", "definesteinconjurare", "definestelista", "definestelistacombinata", "definestemakeup", "definestemarcaje", "definestemediulfonttext", "definestemeniuinteractiune", "definesteoverlay", "definestepaleta", "definesteparagraf", "definesteprofil", "definesteprogram", "definestereferinte", "definesteregistru", "definestesablontabel", "definestesectiune", "definestesimbol", "definestesimbolfigura", "definestesinonim", "definestesinonimfont", "definestesortare", "definestestartstop", "definestestil", "definestestilfont", "definestestivacampuri", "definestesubcamp", "definestetabulatori", "definestetext", "definestetexteinconjurate", "definestetextinconjurat", "definestetyping", "despre", "determinacaracteristicilelistei", "determinacaracteristiciregistru", "determinanumartitlu", "din", "dute", "dutebox", "dutepagina", "ecran", "element", "faraliniiantetsisubsol", "faraliniisussijos", "faraspatiu", "figuraexterna", "firdepar", "folosesteURL", "folosestebloc", "folosestedirector", "folosestedocumentextern", "folosestefiguraexterna", "folosestemodul", "folosestemuzicaexterna", "folosestescriptJS", "folosestesimboluri", "folosesteurl", "fundal", "grosimelinie", "impartefloat", "inalt", "injos", "inlinie", "instalarelimba", "intins", "jos", "jossus", "la", "lapagina", "limba", "limbaprincipala", "linieneagra", "liniesubtire", "linieumplere", "liniinegre", "liniisubtiri", "litera", "litere", "luna", "lungimelista", "marcaje", "matematica", "mediu", "meniuinteractiune", "necunoscut", "nokap", "nota", "numarformula", "numarpagina", "numartitlu", "numartitlucurent", "numere", "numereromane", "olinie", "pagina", "pastreazablocuri", "pelung", "plaseazapegrid", "plaseazasemnecarte", "potrivestecamp", "pozitie", "proceseazabloc", "produs", "proiect", "puncte", "punedeasuprafiecareia", "punefatainfata", "puneformula", "punelista", "punelistacombinata", "punenotesubsol", "punenotesubsollocale", "punenumarpagina", "puneregistru", "punesubformula", "referinta", "referintapagina", "referintatext", "reflexie", "remarca", "reseteazamarcaje", "riglatext", "rigleumplere", "roteste", "scala", "scriebuffer", "scrieinlista", "scrieintreliste", "selecteazablocuri", "semncarte", "setareitemization", "setarelimba", "setarepozitie", "seteazaaliniat", "seteazaalinierea", "seteazaantet", "seteazaaranjareapag", "seteazaaspect", "seteazabarainteractiune", "seteazablanc", "seteazabloc", "seteazablocsectiune", "seteazabuffer", "seteazacamp", "seteazacampuri", "seteazaclipping", "seteazacoloane", "seteazacomentariu", "seteazacomentariupagina", "seteazaculoare", "seteazaculori", "seteazadimensiunihartie", "seteazaecraninteractiune", "seteazaelemente", "seteazaenumerare", "seteazafloat", "seteazafloats", "seteazafonttext", "seteazaformulare", "seteazaformule", "seteazafundal", "seteazafundaluri", "seteazagrosimelinie", "seteazaimpartireafloat", "seteazainconjurat", "seteazaingust", "seteazainteractiunea", "seteazajos", "seteazalegenda", "seteazalegendele", "seteazaliniesilabe", "seteazaliniesubtire", "seteazalinii", "seteazaliniimargine", "seteazaliniinegre", "seteazaliniiumplere", "seteazalista", "seteazalistacombinata", "seteazamajuscule", "seteazamakeup", "seteazamarcaje", "seteazameniuinteractiune", "seteazaminicitat", "seteazanotasubsol", "seteazanumarpagina", "seteazanumarsubpagina", "seteazanumartitlu", "seteazanumerotarelinii", "seteazanumerotarepagina", "seteazanumerotareparagrafe", "seteazapaleta", "seteazaparagrafe", "seteazaplasareaopozita", "seteazaprograme", "seteazareferinte", "seteazaregistru", "seteazarigletext", "seteazarigleumplere", "seteazarotare", "seteazasimbol", "seteazasinonime", "seteazasortare", "seteazaspatiu", "seteazaspatiualb", "seteazaspatiuinterliniar", "seteazasubsol", "seteazasus", "seteazatabele", "seteazatabulatori", "seteazatext", "seteazatexteantet", "seteazatextejos", "seteazatextesubsol", "seteazatextesus", "seteazatextetext", "seteazatitlu", "seteazatitluri", "seteazatoleranta", "seteazatranzitiepagina", "seteazatype", "seteazatyping", "seteazaurl", "simbol", "spatiifixate", "spatiu", "spatiufixat", "startaliniatcentru", "startaliniatdreapta", "startaliniatstanga", "startcomponenta", "startculoare", "startdute", "startfundal", "startimpachetat", "startlimba", "startlinie", "startliniemargine", "startmediu", "startmeniuinteractiune", "startprodus", "startproiect", "startpublicatie", "startpuneformula", "startriglatext", "starttitlu", "stivacampuri", "stopaliniatcentru", "stopaliniatdreapta", "stopaliniatstanga", "stopcomponenta", "stopculoare", "stopdute", "stopfundal", "stopimpachetat", "stoplimba", "stoplinie", "stopliniemargine", "stopmediu", "stopmeniuinteractiune", "stopprodus", "stopproiect", "stoppublicatie", "stoppuneformula", "stopriglatext", "stoptitlu", "textumplere", "traduce", "trecilafonttext", "undeva", "valoareculoare", "versiune", "zidinsaptamana" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metafun.lua b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metafun.lua
index c2d4440f18e..e4bdafaa8ed 100644
--- a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metafun.lua
+++ b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metafun.lua
@@ -1,4 +1,4 @@
return {
- ["commands"]={ "loadfile", "loadimage", "loadmodule", "dispose", "nothing", "transparency", "tolist", "topath", "tocycle", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "tanh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "randomizedcontrols", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "perpendicular", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "drawdoublearrows", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "boundingradius", "boundingcircle", "boundingpoint", "crossingunder", "insideof", "outsideof", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", "withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "filloutlinetext", "drawoutlinetext", "outlinetexttopath", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", "notcached", "keepcached", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "colorlike", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "resetarrows", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "complementary", "complemented", "resolvedcolor", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "pencilled", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright", "sortlist", "copylist", "shapedlist", "listtocurves", "listtolines", "listsize", "listlast", "uniquelist", "circularpath", "squarepath", "linearpath", "theoffset", "texmode", "systemmode", "texvar", "texstr", "isarray", "prefix", "dimension", "getmacro", "getdimen", "getcount", "gettoks", "setmacro", "setdimen", "setcount", "settoks", "positionpath", "positioncurve", "positionxy", "positionpxy", "positionwhd", "positionpage", "positionregion", "positionbox", "positionanchor", "positioninregion", "positionatanchor", "wdpart", "htpart", "dppart", "texvar", "texstr", "inpath", "pointof", "leftof", "rightof", "utflen", "utfsub", "newhash", "disposehash", "inhash", "tohash", "isarray", "prefix", "isobject", "comment", "report", "lua", "mp", "MP", "luacall", "mirrored", "mirroredabout", "scriptindex" },
- ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "textextanchor", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "ahvariant", "ahdimple", "ahfactor", "ahscale", "metapostversion", "maxdimensions", "drawoptionsfactor", "dq", "sq", "crossingscale", "crossingoption", "contextlmtxmode", "getparameters", "presetparameters", "hasparameter", "hasoption", "getparameter", "getparameterdefault", "getparametercount", "getmaxparametercount", "getparameterpath", "getparameterpen", "getparametertext", "applyparameters", "pushparameters", "popparameters", "definecolor" },
+ ["commands"]={ "loadfile", "loadimage", "loadmodule", "dispose", "nothing", "transparency", "tolist", "topath", "tocycle", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "tanh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "randomizedcontrols", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "perpendicular", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "drawdoublearrows", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "boundingradius", "boundingcircle", "boundingpoint", "crossingunder", "insideof", "outsideof", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", "withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin", "shownshadedirection", "shownshadecenter", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "filloutlinetext", "drawoutlinetext", "outlinetexttopath", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", "rawmadetext", "validtexbox", "onetimetextext", "rawfmttext", "thefmttext", "fmttext", "onetimefmttext", "notcached", "keepcached", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "withopacity", "property", "properties", "withproperties", "asgroup", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "colorlike", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "resetarrows", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "complementary", "complemented", "resolvedcolor", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "pencilled", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright", "sortlist", "copylist", "shapedlist", "listtocurves", "listtolines", "listsize", "listlast", "uniquelist", "circularpath", "squarepath", "linearpath", "theoffset", "texmode", "systemmode", "texvar", "texstr", "isarray", "prefix", "dimension", "getmacro", "getdimen", "getcount", "gettoks", "setmacro", "setdimen", "setcount", "settoks", "setglobalmacro", "setglobaldimen", "setglobalcount", "setglobaltoks", "positionpath", "positioncurve", "positionxy", "positionpxy", "positionwhd", "positionpage", "positionregion", "positionbox", "positionanchor", "positioninregion", "positionatanchor", "wdpart", "htpart", "dppart", "texvar", "texstr", "inpath", "pointof", "leftof", "rightof", "utfnum", "utflen", "utfsub", "newhash", "disposehash", "inhash", "tohash", "isarray", "prefix", "isobject", "comment", "report", "lua", "lualist", "mp", "MP", "luacall", "mirrored", "mirroredabout", "scriptindex", "newscriptindex", "newcolor", "newrgbcolor", "newcmykcolor", "newnumeric", "newboolean", "newtransform", "newpath", "newpicture", "newstring", "newpair", "mpvar" },
+ ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "shadeoffset", "textextoffset", "textextanchor", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "ahvariant", "ahdimple", "ahfactor", "ahscale", "metapostversion", "maxdimensions", "drawoptionsfactor", "dq", "sq", "crossingscale", "crossingoption", "contextlmtxmode", "metafunversion", "minifunversion", "getparameters", "presetparameters", "hasparameter", "hasoption", "getparameter", "getparameterdefault", "getparametercount", "getmaxparametercount", "getparameterpath", "getparameterpen", "getparametertext", "applyparameters", "pushparameters", "popparameters", "definecolor" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metapost.lua b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metapost.lua
index 9304b2dd201..1bb01b34724 100644
--- a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metapost.lua
+++ b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-metapost.lua
@@ -1,9 +1,9 @@
return {
- ["commands"]={ "upto", "downto", "beginfig", "endfig", "beginglyph", "endglyph", "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", "center", "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", "triplet", "quadruplet", "totransform", "bymatrix" },
+ ["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", "center", "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", "triplet", "quadruplet", "totransform", "bymatrix", "primitive", "permanent", "immutable", "mutable", "frozen", "showproperty", "showhashentry" },
["disabled"]={ "verbatimtex", "troffmode" },
- ["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "charscale", "ditto", "EOF", "pen_lft", "pen_rt", "pen_top", "pen_bot" },
+ ["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" },
- ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "setgroup", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext", "numbersystem" },
+ ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "setgroup", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext", "numbersystem", "overloadmode", "setproperty" },
["shortcuts"]={ "..", "...", "--", "---", "&", "\\" },
["tex"]={ "btex", "etex", "verbatimtex" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-tex.lua b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-tex.lua
index f7551d2886b..93f696f5f09 100644
--- a/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-tex.lua
+++ b/Master/texmf-dist/context/data/textadept/context/data/scite-context-data-tex.lua
@@ -1,9 +1,9 @@
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", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Umiddle", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uright", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "aftergrouped", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "beginlocalcontrol", "boundary", "boxattr", "boxdirection", "boxorientation", "boxtotal", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "efcode", "endlocalcontrol", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "fixupboxesmode", "fontid", "formatname", "frozen", "futureexpand", "futureexpandis", "futureexpandisap", "gleaders", "glet", "glyphdatafield", "gtoksapp", "gtokspre", "hjcode", "hpack", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifchkdim", "ifchknum", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimval", "iffrozen", "ifincsname", "ifnumval", "ifprotected", "iftok", "ifusercmd", "ignorepars", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "internalcodesmode", "lastnamedcs", "lastnodesubtype", "leftghost", "leftmarginkern", "letcharcode", "letfrozen", "letprotected", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "matholdmode", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "noboundary", "nohrule", "nokerns", "noligs", "nospaces", "novrule", "outputbox", "pardirection", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitvmode", "rightghost", "rightmarginkern", "rpcode", "savecatcodetable", "scantextokens", "setfontid", "shapemode", "textdirection", "toksapp", "tokspre", "tpack", "tracingfonts", "unletfrozen", "unletprotected", "vpack", "wordboundary", "xtoksapp", "xtokspre" },
+ ["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", "lastchkdim", "lastchknum", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numericscale", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingalignments", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "unexpanded", "unless", "widowpenalties" },
+ ["luatex"]={ "UUskewed", "UUskewedwithdelims", "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaccentbaseheight", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclass", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathspacebeforescript", "Umathspacingmode", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uradical", "Uright", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "afterassigned", "aftergrouped", "aliased", "alignmark", "aligntab", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "begincsname", "beginlocalcontrol", "boundary", "boxattribute", "boxdirection", "boxorientation", "boxtotal", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "clearmarks", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "defcsname", "dimensiondef", "directlua", "edefcsname", "efcode", "endlocalcontrol", "enforced", "etoksapp", "etokspre", "everytab", "exceptionpenalty", "expand", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "fontid", "fontspecifiedsize", "formatname", "frozen", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "gluespecdef", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "glyphscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphxscale", "glyphyoffset", "glyphyscale", "gtoksapp", "gtokspre", "hjcode", "hpack", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchknum", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimval", "ifempty", "ifflags", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifmathparameter", "ifmathstyle", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ignorearguments", "ignorepars", "immediate", "immutable", "initcatcodetable", "insertheights", "insertht", "instance", "integerdef", "lastarguments", "lastnamedcs", "lastnodesubtype", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letprotected", "linedirection", "linepar", "listcallbackmode", "localbrokenpenalty", "localcontrol", "localcontrolled", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscale", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "mugluespecdef", "mutable", "noaligned", "noboundary", "nohrule", "norelax", "normalizelinemode", "nospaces", "novrule", "orelse", "orunless", "outputbox", "overloaded", "overloadmode", "parametercount", "parattr", "pardirection", "permanent", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitvmode", "rightmarginkern", "rpcode", "savecatcodetable", "scantextokens", "setfontid", "snapshotpar", "supmarkmode", "swapcsvalues", "textdirection", "thewithoutunit", "tokenized", "toksapp", "tokspre", "tolerant", "tpack", "tracingfonts", "tracingmath", "undent", "unletfrozen", "unletprotected", "vpack", "wordboundary", "wrapuppar", "xdefcsname", "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", "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", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everytab", "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", "hoffset", "holdinginserts", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "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", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "or", "ordlimits", "orelse", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "radical", "raise", "read", "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", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "xdef", "xleaders", "xspaceskip", "year" },
+ ["tex"]={ " ", "-", "/", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "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", "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", "fontspecifiedname", "futurelet", "gdef", "global", "globaldefs", "glyph", "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", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "meaningfull", "meaningless", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "or", "ordlimits", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overshoot", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillleftskip", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "radical", "raise", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scaledfontdimen", "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", "todimension", "tointeger", "toks", "toksdef", "tolerance", "topmark", "topskip", "toscaled", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unhpack", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "unvpack", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "xdef", "xleaders", "xspaceskip", "year" },
["xetex"]={ "XeTeXversion" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/textadept/context/init.lua b/Master/texmf-dist/context/data/textadept/context/init.lua
index 9d89d2c0abe..d5da25fc86f 100644
--- a/Master/texmf-dist/context/data/textadept/context/init.lua
+++ b/Master/texmf-dist/context/data/textadept/context/init.lua
@@ -6,6 +6,10 @@ local info = {
license = "see context related readme files",
}
+-- Note for myself: I need to check the latest greatest textadept and also see if
+-- the lpeg lexer interface has been ported to the latest scite. If not I need to
+-- come up with a backup plan (vscode?).
+
if not textadept then
return
end
diff --git a/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json b/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json
index 1581881ebef..6e414689d60 100644
--- a/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json
+++ b/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json
@@ -60,7 +60,7 @@
"name" : "context.extra"
},
"helper" : {
- "match" : "(zmod|ystretched|ysized|xysized|xyscaled|xstretched|xsized|withtransparency|withshadevector|withshadetransform|withshadestep|withshaderadius|withshadeorigin|withshademethod|withshadefraction|withshadefactor|withshadedomain|withshadedirection|withshadecolors|withshadecenter|withshade|withproperties|withmask|withlinearshade|withgrey|withgray|withcircularshade|whitecolor|wdpart|visualizepaths|visualizedfill|visualizeddraw|verbatim|utfsub|utflen|urtriangle|urmoved|urenlarged|urcircle|uptriangle|unspiked|unitvector|unittriangle|unitdiamond|unitcircle|uniquelist|undrawfill|undecorated|undashed|uncolored|ultriangle|ulmoved|ulenlarged|ulcircle|tripled|triangle|transparent|transparency|tostring|topenlarged|topboundary|topath|topair|tolist|tohash|tocycle|thetextext|thetexbox|theoffset|thelabel|texvar|texvar|textextoffset|textext|texstr|texstr|texmode|texbox|tensecircle|tcircle|tanh|tand|tan|systemmode|superellipsed|strut|stretched|straightpath|straightpairs|straightfunction|stoppassingvariable|startpassingvariable|squeezed|squarepath|sqr|spotcolor|space|sortlist|softened|snapped|smoothed|sized|sinh|sin|simplified|shownshadevector|shownshadeorigin|shortened|shapedlist|shadedup|shadedright|shadedleft|shadedinto|shadeddown|shaded|settoks|setmacro|setdimen|setcount|scriptindex|rule|roundedsquare|righttriangle|rightof|rightenlarged|rightboundary|rightarrow|resolvedcolor|resetdrawoptions|resetarrows|report|register|redecorated|readfile|rcircle|rawtextext|rawtexbox|randomshifted|randomizedcontrols|randomized|radian|quote|quotation|pushcurrentpicture|pushboundingbox|punked|property|properties|prefix|prefix|pow|positionxy|positionwhd|positionregion|positionpxy|positionpath|positionpage|positioninregion|positioncurve|positionbox|positionatanchor|positionanchor|popcurrentpicture|popboundingbox|pointof|pi|perpendicular|percent|penpoint|pencilled|peepholed|pathconnectors|passvariable|passarrayvariable|paralleled|paired|outsideof|outlinetexttopath|outlinetext|outerboundingbox|originpath|onlayer|oddly|nothing|notcached|normalfill|normaldraw|nofill|nodraw|newhash|naturalizepaths|namedcolor|multitonecolor|mp|mirroredabout|mirrored|luacall|lua|lrtriangle|lrmoved|lrenlarged|lrcircle|log|loadmodule|loadimage|loadfile|loadfigure|ln|lltriangle|llmoved|llenlarged|llcircle|listtolines|listtocurves|listsize|listlast|linearpath|lefttriangle|leftof|leftenlarged|leftboundary|leftarrow|lcircle|laddered|label|keepcached|istextext|isobject|isarray|isarray|invtan|invsin|inverted|invcos|inv|intersection_point|intersection_found|interpolated|insideof|inpath|innerboundingbox|inhash|infont|infinite|htpart|greyscale|greyed|grayscale|grayed|graphictext|gettoks|getmacro|getdimen|getcount|function|fulltriangle|fullsquare|fulldiamond|formatted|format|fillup|filloutlinetext|figure|externalfigure|exp|evenly|epsed|eofillup|eofill|eoclip|enlonged|enlarged|drawwholepath|drawpoints|drawpointoptions|drawpointlabels|drawpoint|drawpathoptions|drawpathonly|drawpath|drawoutlinetext|draworiginoptions|draworigin|drawlineoptions|drawlabeloptions|drawfill|drawdoublearrows|drawcontrolpoints|drawcontroloptions|drawcontrollines|drawboundoptions|drawboundingbox|drawboundary|dquote|dppart|downtriangle|dofill|dodraw|disposehash|dispose|dimension|detailpaths|detaileddraw|defineshade|decorated|ddecimal|dddecimal|ddddecimal|cutends|curvedpath|curvedpairs|curvedfunction|curved|crossingunder|crossed|crlf|cotd|cot|cosh|cos|cornered|copylist|constructedpath|constructedpairs|constructedfunction|condition|complemented|complementary|comment|colortype|colorpart|colorlike|colordecimalslist|colordecimals|cmyk|clearxy|circularpath|checkedbounds|checkbounds|centerarrow|center|break|boundingradius|boundingpoint|boundingcircle|boundingbox|bottomenlarged|bottomboundary|blownup|blackcolor|bitmapimage|bcircle|bbwidth|bbheight|basiccolors|autoalign|atan|asinh|asin|asgroup|arrowpath|area|anchored|along|addbackground|acosh|acos|SPACE|PERCENT|MP|DQUOTE|CRLF)(?=[^a-zA-Z\u005C_@!?-ÿ])",
+ "match" : "(zmod|ystretched|ysized|xysized|xyscaled|xstretched|xsized|withtransparency|withshadevector|withshadetransform|withshadestep|withshaderadius|withshadeorigin|withshademethod|withshadefraction|withshadefactor|withshadedomain|withshadedirection|withshadecolors|withshadecenter|withshade|withproperties|withopacity|withmask|withlinearshade|withgrey|withgray|withcircularshade|whitecolor|wdpart|visualizepaths|visualizedfill|visualizeddraw|verbatim|validtexbox|utfsub|utfnum|utflen|urtriangle|urmoved|urenlarged|urcircle|uptriangle|unspiked|unitvector|unittriangle|unitdiamond|unitcircle|uniquelist|undrawfill|undecorated|undashed|uncolored|ultriangle|ulmoved|ulenlarged|ulcircle|tripled|triangle|transparent|transparency|tostring|topenlarged|topboundary|topath|topair|tolist|tohash|tocycle|thetextext|thetexbox|theoffset|thelabel|thefmttext|texvar|texvar|textextoffset|textext|texstr|texstr|texmode|texbox|tensecircle|tcircle|tanh|tand|tan|systemmode|superellipsed|strut|stretched|straightpath|straightpairs|straightfunction|stoppassingvariable|startpassingvariable|squeezed|squarepath|sqr|spotcolor|space|sortlist|softened|snapped|smoothed|sized|sinh|sin|simplified|shownshadevector|shownshadeorigin|shownshadedirection|shownshadecenter|shortened|shapedlist|shadedup|shadedright|shadedleft|shadedinto|shadeddown|shaded|settoks|setmacro|setglobaltoks|setglobalmacro|setglobaldimen|setglobalcount|setdimen|setcount|scriptindex|rule|roundedsquare|righttriangle|rightof|rightenlarged|rightboundary|rightarrow|resolvedcolor|resetdrawoptions|resetarrows|report|register|redecorated|readfile|rcircle|rawtextext|rawtexbox|rawmadetext|rawfmttext|randomshifted|randomizedcontrols|randomized|radian|quote|quotation|pushcurrentpicture|pushboundingbox|punked|property|properties|prefix|prefix|pow|positionxy|positionwhd|positionregion|positionpxy|positionpath|positionpage|positioninregion|positioncurve|positionbox|positionatanchor|positionanchor|popcurrentpicture|popboundingbox|pointof|pi|perpendicular|percent|penpoint|pencilled|peepholed|pathconnectors|passvariable|passarrayvariable|paralleled|paired|outsideof|outlinetexttopath|outlinetext|outerboundingbox|originpath|onlayer|onetimetextext|onetimefmttext|oddly|nothing|notcached|normalfill|normaldraw|nofill|nodraw|newtransform|newstring|newscriptindex|newrgbcolor|newpicture|newpath|newpair|newnumeric|newhash|newcolor|newcmykcolor|newboolean|naturalizepaths|namedcolor|multitonecolor|mpvar|mp|mirroredabout|mirrored|lualist|luacall|lua|lrtriangle|lrmoved|lrenlarged|lrcircle|log|loadmodule|loadimage|loadfile|loadfigure|ln|lltriangle|llmoved|llenlarged|llcircle|listtolines|listtocurves|listsize|listlast|linearpath|lefttriangle|leftof|leftenlarged|leftboundary|leftarrow|lcircle|laddered|label|keepcached|istextext|isobject|isarray|isarray|invtan|invsin|inverted|invcos|inv|intersection_point|intersection_found|interpolated|insideof|inpath|innerboundingbox|inhash|infont|infinite|htpart|greyscale|greyed|grayscale|grayed|graphictext|gettoks|getmacro|getdimen|getcount|function|fulltriangle|fullsquare|fulldiamond|formatted|format|fmttext|fillup|filloutlinetext|figure|externalfigure|exp|evenly|epsed|eofillup|eofill|eoclip|enlonged|enlarged|drawwholepath|drawpoints|drawpointoptions|drawpointlabels|drawpoint|drawpathoptions|drawpathonly|drawpath|drawoutlinetext|draworiginoptions|draworigin|drawlineoptions|drawlabeloptions|drawfill|drawdoublearrows|drawcontrolpoints|drawcontroloptions|drawcontrollines|drawboundoptions|drawboundingbox|drawboundary|dquote|dppart|downtriangle|dofill|dodraw|disposehash|dispose|dimension|detailpaths|detaileddraw|defineshade|decorated|ddecimal|dddecimal|ddddecimal|cutends|curvedpath|curvedpairs|curvedfunction|curved|crossingunder|crossed|crlf|cotd|cot|cosh|cos|cornered|copylist|constructedpath|constructedpairs|constructedfunction|condition|complemented|complementary|comment|colortype|colorpart|colorlike|colordecimalslist|colordecimals|cmyk|clearxy|circularpath|checkedbounds|checkbounds|centerarrow|center|break|boundingradius|boundingpoint|boundingcircle|boundingbox|bottomenlarged|bottomboundary|blownup|blackcolor|bitmapimage|bcircle|bbwidth|bbheight|basiccolors|autoalign|atan|asinh|asin|asgroup|arrowpath|area|anchored|along|addbackground|acosh|acos|SPACE|PERCENT|MP|DQUOTE|CRLF)(?=[^a-zA-Z\u005C_@!?-ÿ])",
"name" : "context.command.metafun.helper.mps"
},
"identifier" : {
@@ -115,11 +115,11 @@
"name" : "context.number.number.mps"
},
"plain" : {
- "match" : "(z|z|yellow|withdots|white|whatever|upto|up|unitvector|unitsquare|unfilldraw|unfill|undraw|triplet|tracingnone|tracingall|totransform|thru|thelabel|tensepath|takepower|superellipse|stop|softjoin|shipit|savepen|round|rotatedaround|rotatedabout|right|relax|reflectedabout|red|range|quartercircle|quadruplet|pt|pickup|pensquare|penspec|penrazor|penpos|penlabels|pc|origin|nullpen|mod|mm|min|max|makelabel|magenta|loggingall|left|laboff|labels|label|inverse|intersectionpoint|interact|incr|in|in|image|identity|hide|halfcircle|green|gobbled|gobble|fullcircle|font_extra_space|font_coding_scheme|flex|filldraw|fill|extra_setup|extra_endfig|extra_endchar|extra_beginfig|extra_beginchar|exitunless|evenly|endglyph|endfig|endchar|drawoptions|drawdot|drawdblarrow|drawarrow|draw|downto|down|dotprod|dotlabels|dotlabel|div|directionpoint|direction|dir|define_whole_vertical_pixels|define_whole_vertical_blacker_pixels|define_whole_pixels|define_whole_blacker_pixels|define_pixels|define_horizontal_corrected_pixels|define_good_y_pixels|define_good_x_pixels|define_corrected_pixels|define_blacker_pixels|defaultfont|decr|dd|dashpattern|cyan|cuttings|cutdraw|cutbefore|cutafter|currentpicture|currentpen|counterclockwise|cm|clearxy|clearpen|clearpen|clearit|change_width|center|ceiling|cc|capsule_end|bymatrix|bye|buildcycle|bp|blue|blankpicture|blacker|black|beginglyph|beginfig|beginchar|bbox|background|arrowhead|abs)(?=[^a-zA-Z\u005C_@!?-ÿ])",
+ "match" : "(z|z|yellow|withdots|white|whatever|upto|up|unitvector|unitsquare|unfilldraw|unfill|undraw|triplet|tracingnone|tracingall|totransform|thru|thelabel|tensepath|takepower|superellipse|stop|softjoin|showproperty|showhashentry|shipit|savepen|round|rotatedaround|rotatedabout|right|relax|reflectedabout|red|range|quartercircle|quadruplet|pt|primitive|pickup|permanent|pensquare|penspec|penrazor|penpos|penlabels|pc|origin|on|off|nullpen|mutable|mod|mm|min|max|makelabel|magenta|loggingall|left|laboff|labels|label|inverse|intersectionpoint|interpath|interact|incr|in|in|immutable|image|identity|hide|halfcircle|green|gobbled|gobble|fullcircle|frozen|font_extra_space|font_coding_scheme|flex|filldraw|fill|extra_setup|extra_endfig|extra_endchar|extra_beginfig|extra_beginchar|exitunless|evenly|endglyph|endfont|endfig|endchar|drawoptions|drawdot|drawdblarrow|drawarrow|draw|downto|down|dotprod|dotlabels|dotlabel|div|directionpoint|direction|dir|define_whole_vertical_pixels|define_whole_vertical_blacker_pixels|define_whole_pixels|define_whole_blacker_pixels|define_pixels|define_horizontal_corrected_pixels|define_good_y_pixels|define_good_x_pixels|define_corrected_pixels|define_blacker_pixels|defaultfont|decr|dd|dashpattern|cyan|cuttings|cutdraw|cutbefore|cutafter|currentpicture|currentpen|counterclockwise|cm|clearxy|clearpen|clearpen|clearit|change_width|center|ceiling|cc|capsule_end|bymatrix|bye|buildcycle|bp|blue|blankpicture|blacker|black|beginglyph|beginfont|beginfig|beginchar|bbox|background|arrowhead|abs)(?=[^a-zA-Z\u005C_@!?-ÿ])",
"name" : "context.plain.plain.mps"
},
"primitive" : {
- "match" : "(zscaled|yypart|yxpart|yscaled|ypart|yoffset|yellowpart|year|xypart|xxpart|xscaled|xpart|xoffset|write|withprescript|withpostscript|withpen|within|withcolor|withcmykcolor|warningcheck|vppp|void|vardef|urt|urcorner|until|unknown|uniformdeviate|ulft|ulcorner|turningnumber|turningcheck|truecorners|true|troffmode|transformed|transform|tracingtitles|tracingstats|tracingspecs|tracingrestores|tracingpens|tracingoutput|tracingonline|tracingmacros|tracinglostchars|tracingequations|tracingedges|tracingcommands|tracingchoices|tracingcapsules|totalweight|top|to|time|textual|text|tertiarydef|tertiary|tension|suffix|substring|subpath|stroked|string|str|step|sqrt|special|smoothing|slanted|sind|showvariable|showtoken|showstopping|showdependencies|show|shipout|shifted|setgroup|setbounds|secondarydef|secondary|screen_rows|screen_cols|scantokens|scaled|save|runscript|rt|rotated|rgbcolor|reverse|restoreclipcolor|redpart|readfrom|randomseed|proofing|prologues|primarydef|primary|prescriptpart|precontrol|postscriptpart|postcontrol|point|pixels_per_inch|picture|penspec|penpart|penoffset|pencircle|pen|pausing|pathpart|path|pair|outputtemplate|outputformat|outer|or|openwindow|openit|on|off|of|odd|oct|numspecial|numeric|numbersystem|nullpicture|notransforms|not|normaldeviate|nodisplays|newinternal|mpxbreak|mpprocset|month|mlog|miterlimit|minute|mexp|message|maketext|makepen|makepath|magentapart|lrt|lrcorner|lowres_fix|llft|llcorner|linejoin|linecap|ligtable|lft|let|length|known|kern|intersectiontimes|interpath|interim|input|inner|infont|imagerules|if|hround|hppp|hour|hex|headerbyte|greypart|greycolor|greenpart|graypart|grayfont|graycolor|granularity|glyph|gfcorners|forsuffixes|forever|for|fontsize|fontsize|fontpart|fontmapline|fontmapfile|fontmaking|fontdimen|floor|fillin|filled|filenametemplate|fi|false|extra_endfig|extra_beginfig|extensible|expr|expandafter|exitif|errmessage|envelope|endinput|endgroup|endfor|enddef|end|elseif|else|doublepath|displaying|display|directiontime|designsize|delimiters|def|decimal|day|dashpart|dashed|cycle|cyanpart|currentwindow|currenttransform|curl|cullit|cull|cosd|controls|contour|colormodel|color|cmykcolor|closefrom|clipped|clip|charwd|charlist|charic|charht|charext|charexists|chardy|chardx|chardp|charcode|char|bounded|boundarychar|bot|bot|boolean|bluepart|blackpart|begingroup|autorounding|arctime|arclength|angle|and|and|also|addto|ASCII)(?=[^a-zA-Z\u005C_@!?-ÿ])",
+ "match" : "(zscaled|yypart|yxpart|yscaled|ypart|yoffset|yellowpart|year|xypart|xxpart|xscaled|xpart|xoffset|write|withprescript|withpostscript|withpen|within|withcolor|withcmykcolor|warningcheck|vppp|void|vardef|urt|urcorner|until|unknown|uniformdeviate|ulft|ulcorner|turningnumber|turningcheck|truecorners|true|troffmode|transformed|transform|tracingtitles|tracingstats|tracingspecs|tracingrestores|tracingpens|tracingoutput|tracingonline|tracingmacros|tracinglostchars|tracingequations|tracingedges|tracingcommands|tracingchoices|tracingcapsules|totalweight|top|to|time|textual|text|tertiarydef|tertiary|tension|suffix|substring|subpath|stroked|string|str|step|sqrt|special|smoothing|slanted|sind|showvariable|showtoken|showstopping|showdependencies|show|shipout|shifted|setproperty|setgroup|setbounds|secondarydef|secondary|screen_rows|screen_cols|scantokens|scaled|save|runscript|rt|rotated|rgbcolor|reverse|restoreclipcolor|redpart|readfrom|randomseed|proofing|prologues|primarydef|primary|prescriptpart|precontrol|postscriptpart|postcontrol|point|pixels_per_inch|picture|penspec|penpart|penoffset|pencircle|pen|pausing|pathpart|path|pair|overloadmode|outputtemplate|outputformat|outer|or|openwindow|openit|of|odd|oct|numspecial|numeric|numbersystem|nullpicture|notransforms|not|normaldeviate|nodisplays|newinternal|mpxbreak|mpprocset|month|mlog|miterlimit|minute|mexp|message|maketext|makepen|makepath|magentapart|lrt|lrcorner|lowres_fix|llft|llcorner|linejoin|linecap|ligtable|lft|let|length|known|kern|intersectiontimes|interim|input|inner|infont|imagerules|if|hround|hppp|hour|hex|headerbyte|greypart|greycolor|greenpart|graypart|grayfont|graycolor|granularity|glyph|gfcorners|forsuffixes|forever|for|fontsize|fontsize|fontpart|fontmapline|fontmapfile|fontmaking|fontdimen|floor|fillin|filled|filenametemplate|fi|false|extra_endfig|extra_beginfig|extensible|expr|expandafter|exitif|errmessage|envelope|endinput|endgroup|endfor|enddef|end|elseif|else|doublepath|displaying|display|directiontime|designsize|delimiters|def|decimal|day|dashpart|dashed|cycle|cyanpart|currentwindow|currenttransform|curl|cullit|cull|cosd|controls|contour|colormodel|color|cmykcolor|closefrom|clipped|clip|charwd|charlist|charic|charht|charext|charexists|chardy|chardx|chardp|charcode|char|bounded|boundarychar|bot|bot|boolean|bluepart|blackpart|begingroup|autorounding|arctime|arclength|angle|and|and|also|addto|ASCII)(?=[^a-zA-Z\u005C_@!?-ÿ])",
"name" : "context.primitive.primitive.mps"
},
"quoted" : {
@@ -138,7 +138,7 @@
"name" : "context.string.string.text.mps"
},
"shortcut" : {
- "match" : "(textextoffset|textextanchor|squared|sq|softlighttransparent|shadefactor|screentransparent|saturationtransparent|rounded|rgbcolormodel|pushparameters|presetparameters|popparameters|pen_top|pen_rt|pen_lft|pen_bot|overlaytransparent|normaltransparent|nocolormodel|multiplytransparent|mitered|metapostversion|maxdimensions|luminositytransparent|lightentransparent|labeloffset|join_radius|infinity|huetransparent|hasparameter|hasoption|hardlighttransparent|greycolormodel|graycolormodel|getparametertext|getparameters|getparameterpen|getparameterpath|getparameterdefault|getparametercount|getparameter|getmaxparametercount|exclusiontransparent|epsilon|eps|drawoptionsfactor|dq|dotlabeldiam|ditto|differencetransparent|definecolor|defaultscale|defaultpen|darkentransparent|crossingscale|crossingoption|contextlmtxmode|colortransparent|colordodgetransparent|colorburntransparent|cmykcolormodel|charscale|butt|beveled|bboxmargin|applyparameters|ahvariant|ahscale|ahlength|ahfactor|ahdimple|ahangle|EOF)(?=[^a-zA-Z\u005C_@!?-ÿ])",
+ "match" : "(vrbcatcoderegime|txtcatcoderegime|textextoffset|textextanchor|texcatcoderegime|squared|sq|softlighttransparent|shadeoffset|shadefactor|screentransparent|saturationtransparent|rounded|rgbcolormodel|pushparameters|prtcatcoderegime|presetparameters|popparameters|pen_top|pen_rt|pen_lft|pen_bot|overlaytransparent|notcatcoderegime|normaltransparent|nocolormodel|multiplytransparent|mitered|minifunversion|metapostversion|metafunversion|maxdimensions|luminositytransparent|luacatcoderegime|lightentransparent|labeloffset|join_radius|inicatcoderegime|infinity|huetransparent|hasparameter|hasoption|hardlighttransparent|greycolormodel|graycolormodel|getparametertext|getparameters|getparameterpen|getparameterpath|getparameterdefault|getparametercount|getparameter|getmaxparametercount|exclusiontransparent|epsilon|eps|drawoptionsfactor|dq|dotlabeldiam|ditto|differencetransparent|definecolor|defaultscale|defaultpen|darkentransparent|ctxcatcoderegime|crossingscale|crossingoption|contextlmtxmode|colortransparent|colordodgetransparent|colorburntransparent|cmykcolormodel|charscale|catcoderegime|butt|beveled|bboxmargin|applyparameters|ahvariant|ahscale|ahlength|ahfactor|ahdimple|ahangle|EOF)(?=[^a-zA-Z\u005C_@!?-ÿ])",
"name" : "context.data.shortcut.mps"
},
"special" : {
diff --git a/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json b/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json
index 480d3af444c..3ce2d8286b3 100644
--- a/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json
+++ b/Master/texmf-dist/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json
@@ -61,14 +61,14 @@
],
"repository" : {
"command" : {
- "match" : "\u005C\u005C(zwnj|zwj|zstroke|zhook|zeta|zerowidthspace|zerowidthnobreakspace|zeronumberconversion|zdotaccent|zcaron|zacute|ytilde|ymacron|yhook|ygrave|yen|ydotbelow|ydiaeresis|ycircumflex|yacute|xypos|xxfrac|xtwoheadrightarrow|xtwoheadleftarrow|xtriplerel|xsplitstring|xrightoverleftarrow|xrightleftharpoons|xrightharpoonup|xrightharpoondown|xrightarrow|xrel|xmlverbatim|xmlvalue|xmltofile|xmltobufferverbose|xmltobuffer|xmltext|xmltexentity|xmltag|xmlstrippednolines|xmlstripped|xmlstripnolines|xmlstrip|xmlsnippet|xmlshow|xmlsetup|xmlsetsetup|xmlsetparam|xmlsetpar|xmlsetinjectors|xmlsetfunction|xmlsetentity|xmlsetattribute|xmlsetatt|xmlsave|xmlresetsetups|xmlresetinjectors|xmlresetdocumentsetups|xmlremovesetup|xmlremovedocumentsetup|xmlremapnamespace|xmlremapname|xmlregisterns|xmlregisteredsetups|xmlregistereddocumentsetups|xmlrefatt|xmlraw|xmlpure|xmlprocessfile|xmlprocessdata|xmlprocessbuffer|xmlprettyprinttext|xmlprettyprint|xmlprependsetup|xmlprependdocumentsetup|xmlposition|xmlpos|xmlpath|xmlparam|xmlpar|xmlnonspace|xmlnamespace|xmlname|xmlmapvalue|xmlmain|xmlloadonly|xmlloadfile|xmlloaddirectives|xmlloaddata|xmlloadbuffer|xmllastpar|xmllastmatch|xmllastatt|xmllast|xmlinstalldirective|xmlinlineverbatim|xmlinlineprettyprinttext|xmlinlineprettyprint|xmlinjector|xmlinfo|xmlinclusions|xmlinclusion|xmlinclude|xmlflushtext|xmlflushspacewise|xmlflushpure|xmlflushlinewise|xmlflushdocumentsetups|xmlflushcontext|xmlflush|xmlfirst|xmlfilter|xmlelement|xmldoiftext|xmldoifselfempty|xmldoifnottext|xmldoifnotselfempty|xmldoifnotatt|xmldoifnot|xmldoifelsevalue|xmldoifelsetext|xmldoifelseselfempty|xmldoifelseempty|xmldoifelseatt|xmldoifelse|xmldoifatt|xmldoif|xmldisplayverbatim|xmldirectivesbefore|xmldirectivesafter|xmldirectives|xmldefaulttotext|xmlcount|xmlcontext|xmlconcatrange|xmlconcat|xmlcommand|xmlchecknamespace|xmlchainattdef|xmlchainatt|xmlbeforesetup|xmlbeforedocumentsetup|xmlbadinclusions|xmlattributedef|xmlattribute|xmlattdef|xmlatt|xmlapplyselectors|xmlappendsetup|xmlappenddocumentsetup|xmlall|xmlaftersetup|xmlafterdocumentsetup|xmladdindex|xmapsto|xleftrightharpoons|xleftrightarrow|xleftharpoonup|xleftharpoondown|xleftarrow|xi|xhookrightarrow|xhookleftarrow|xfrac|xequal|xdefconvertedargument|xRightarrow|xLeftrightarrow|xLeftarrow|writetolist|writestatus|writedatatolist|writebetweenlist|wr|wp|wordtonumber|words|wordright|word|withoutpt|widthspanningtext|widthofstring|widetilde|widehat|whitearrowupfrombar|weekday|wedgeeq|wedge|wdofstring|wcircumflex|vspacing|vspace|vsmashed|vsmashbox|vsmash|vpos|vphantom|vpackedbox|vpackbox|vl|viewerlayer|vglue|veryraggedright|veryraggedleft|veryraggedcenter|verticalpositionbar|verticalgrowingbar|vert|version|verbosenumber|verbatimstring|verbatim|veeeq|veebar|vee|vec|vdots|vdash|vboxreference|vartheta|varsigma|varrho|varpi|varphi|varnothing|varkappa|varepsilon|varTheta|vDash|utilityregisterlength|utilde|utfupper|utflower|utfchar|usezipfile|useurl|usetypescriptfile|usetypescript|usetexmodule|usesymbols|usesubpath|usestaticMPfigure|usesetupsparameter|userpagenumber|usereferenceparameter|useproject|useprofileparameter|useproduct|usemodule|usemathstyleparameter|useluamodule|uselanguageparameter|useinterlinespaceparameter|useindentnextparameter|useindentingparameter|usegridparameter|usefile|usefigurebase|useexternalsoundtrack|useexternalrendering|useexternalfigure|useexternaldocument|useenvironment|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|usedirectory|usecomponent|usecolors|usecitation|usebtxdefinitions|usebtxdataset|usebodyfontparameter|usebodyfont|useblocks|useblankparameter|usealignparameter|useURL|useMPvariables|useMPrun|useMPlibrary|useMPgraphic|useMPenvironmentbuffer|useJSscripts|url|uring|urcorner|upwhitearrow|upuparrows|upsilon|upperrightsinglesixquote|upperrightsingleninequote|upperrightdoublesixquote|upperrightdoubleninequote|upperleftsinglesixquote|upperleftsingleninequote|upperleftdoublesixquote|upperleftdoubleninequote|uppercasestring|uppercased|uplus|upharpoonright|upharpoonleft|updownarrows|updownarrowbar|updownarrow|updasharrow|uparrow|upand|uogonek|untexcommand|untexargument|unstackscripts|unspacestring|unspaced|unspaceargument|unspaceafter|unregisterhyphenationpattern|unprotected|unknown|unittext|unitslow|unitshigh|unitlanguage|unit|uniqueMPpagegraphic|uniqueMPgraphic|unihex|unhhbox|unframed|unexpandeddocumentvariable|undoassign|understrikes|understrike|underset|underrightarrow|underrandoms|underrandom|underparent|underleftarrow|underdots|underdot|underdashes|underdash|underbracket|underbrace|underbars|underbar|undepthed|undefinevalue|umacron|ulcorner|uinvertedbreve|uhungarumlaut|uhorntilde|uhornhook|uhorngrave|uhorndotbelow|uhornacute|uhorn|uhook|ugrave|uedcatcodecommand|udoublegrave|udots|udotbelow|udiaeresismacron|udiaeresisgrave|udiaeresiscaron|udiaeresisacute|udiaeresis|uconvertnumber|ucircumflex|ucaron|ubreve|uacute|typesetfile|typesetbuffer|typescripttwo|typescriptthree|typescriptprefix|typescriptone|typeinlinebuffer|typefile|typeface|typedefinedbuffer|typebuffer|type|typ|txx|tx|twothirds|twosuperior|twoheaduparrow|twoheadrightarrowtail|twoheadrightarrow|twoheadleftarrow|twoheaddownarrow|twofifths|twodigitrounding|turnediota|ttwoheadrightarrow|ttwoheadleftarrow|ttriplerel|ttraggedright|tstroke|truefontname|truefilename|tripleverticalbar|tripleprime|triplebond|trightoverleftarrow|trightleftharpoons|trightharpoonup|trightharpoondown|trightarrow|triangleright|triangleq|triangleleft|triangledown|triangle|trel|transparent|transparencycomponents|translate|trademark|tracepositions|traceoutputroutines|tracedfontname|tracecatcodetables|topskippedbox|toprightbox|toplinebox|topleftbox|topbox|top|tooltip|tolinenote|tochar|to|tmapsto|tleftrightharpoons|tleftrightarrow|tleftharpoonup|tleftharpoondown|tleftarrow|tlap|title|tinyfont|times|tilde|tightlayer|tibetannumerals|threesuperior|threequarter|threeperemspace|threefifths|threeeighths|threedigitrounding|thorn|thookrightarrow|thookleftarrow|thook|thirdofthreeunexpanded|thirdofthreearguments|thirdofsixarguments|thirdoffourarguments|thirdoffivearguments|thinspace|thinrules|thinrule|thickspace|theta|theremainingcharacters|therefore|thenormalizedbodyfontsize|thefirstcharacter|thainumerals|thai|textyen|textvisiblespace|textunderscore|texttilde|textsterling|textslash|textrule|textring|textreference|textpm|textplus|textperiod|textpercent|textounce|textormathchars|textormathchar|textohm|textogonek|textnumero|textmultiply|textmu|textminus|textmho|textmath|textmacron|textlognot|textkelvin|texthyphen|texthungarumlaut|texthorizontalbar|texthash|textgrave|textfraction|textflowcollector|texteuro|textellipsis|textdotaccent|textdong|textdollar|textdiv|textdiaeresis|textdegree|textddag|textdag|textcurrency|textcontrolspace|textcomma|textcite|textcitation|textcircumflex|textcircledP|textcent|textcelsius|textcedilla|textcaron|textbullet|textbrokenbar|textbreve|textbraceright|textbraceleft|textbottomdot|textbottomcomma|textbar|textbackslash|textat|textasciitilde|textasciicircum|textampersand|textacute|textAngstrom|texsetup|texdefinition|tex|testtokens|testpagesync|testpageonly|testpage|testfeatureonce|testfeature|testcolumn|testandsplitstring|test|tequal|tcurl|tcommaaccent|tcedilla|tcaron|tbox|tbinom|tau|taglabeltext|taglabellanguage|taggedlabeltexts|taggedctxcommand|tabulaterule|tabulateline|tabulateautorule|tabulateautoline|tRightarrow|tLeftrightarrow|tLeftarrow|systemsetups|systemloglast|systemlogfirst|systemlog|synctexsetfilename|synctexresetfilename|synctexblockfilename|synchronizewhitespace|synchronizestrut|synchronizeoutputstreams|synchronizemarking|synchronizeindenting|synchronizeblank|symbolreference|symbol|switchtointerlinespace|switchtocolor|switchtobodyfont|switchstyleonly|swarrow|swaptypeface|swapmacros|swapface|swapdimens|swapcounts|surdradical|surd|supsetneqq|supsetneq|supseteqq|supseteq|supset|sum|suffixtext|suffixlanguage|succsim|succnsim|succneqq|succneq|succnapprox|succeqq|succeq|succcurlyeq|succapprox|succ|subtractfeature|subsubsubsubsubject|subsubsubsubsection|subsubsubsubject|subsubsubsection|subsubsubject|subsubsection|subsubject|substituteincommalist|subsetneqq|subsetneq|subseteqq|subseteq|subset|subsentence|subsection|subpagenumber|subject|styleinstance|style|strutwd|struttedbox|struthtdp|strutht|strutgap|strutdp|strut|structurevariable|structureuservariable|structuretitle|structurenumber|structurelistuservariable|stripspaces|strippedcsname|stripcharacter|strictdoifnextoptionalelse|strictdoifelsenextoptional|stretched|stopxtablenext|stopxtablehead|stopxtablefoot|stopxtablebody|stopxtable|stopxrowgroup|stopxrow|stopxmlsetups|stopxmlraw|stopxmlinlineverbatim|stopxmldisplayverbatim|stopxgroup|stopxcolumn|stopxcellgroup|stopxcell|stopvtopregister|stopvtop|stopviewerlayer|stopvboxtohboxseparator|stopvboxtohbox|stopvboxregister|stopvbox|stopusingbtxspecification|stopuserdata|stopusemathstyleparameter|stopuseMPgraphic|stopusableMPgraphic|stopunpacked|stopunittext|stopuniqueMPpagegraphic|stopuniqueMPgraphic|stoptyping|stoptypescriptcollection|stoptypescript|stoptransparent|stoptokens|stoptokenlist|stoptitle|stoptextrule|stoptextmakeup|stoptextflow|stoptextcolorintent|stoptextcolor|stoptextbackgroundmanual|stoptextbackground|stoptext|stoptexdefinition|stoptexcode|stoptaglabeltext|stoptagged|stoptabulatetail|stoptabulatehead|stoptabulate|stoptabletext|stoptabletail|stoptables|stoptablehead|stoptable|stopsymbolset|stopsuffixtext|stopsubsubsubsubsubject|stopsubsubsubsubsection|stopsubsubsubsubject|stopsubsubsubsection|stopsubsubsubject|stopsubsubsection|stopsubsubject|stopsubstack|stopsubsentence|stopsubsection|stopsubjectlevel|stopsubject|stopsubformulas|stopstyle|stopstrut|stopstrictinspectnextcharacter|stopstaticMPgraphic|stopstaticMPfigure|stopstandardmakeup|stopspread|stopsplittext|stopsplitformula|stopspformula|stopspeech|stopspecialitem|stopsimplecolumns|stopsidebar|stopshift|stopshapebox|stopsetups|stopsectionlevel|stopsectionblockenvironment|stopsectionblock|stopsection|stopsdformula|stopscript|stopruby|stoprightaligned|stopreusableMPgraphic|stopregime|stopreferenceprefix|stopreadingfile|stoprawsetups|stoprandomseed|stoprandomized|stopquote|stopquotation|stoppunctuation|stoppublication|stopprotectedcolors|stopprotect|stopproject|stopproduct|stopprocesscommalist|stopprocesscommacommand|stopprocessassignmentlist|stopprocessassignmentcommand|stopprefixtext|stoppostponingnotes|stoppostponing|stoppositive|stoppositionoverlay|stoppositioning|stopplacetable|stopplacepairedbox|stopplacelegend|stopplaceintermezzo|stopplacegraphic|stopplaceformula|stopplacefloat|stopplacefigure|stopplacechemical|stoppath|stoppart|stopparbuilder|stopparagraphscell|stopparagraphs|stopparagraph|stoppar|stoppagemakeup|stoppagelayout|stoppagefigure|stoppagecomment|stoppagecolumns|stoppacked|stopoverprint|stopoverlay|stopoutputstream|stopopposite|stopoperatortext|stopnotmode|stopnotext|stopnotallmodes|stopnointerference|stopnicelyfilledbox|stopnegative|stopnarrower|stopnarrow|stopnamedsubformulas|stopnamedsection|stopmpformula|stopmoduletestsection|stopmodule|stopmodeset|stopmode|stopmixedcolumns|stopmiddlemakeup|stopmiddlealigned|stopmidaligned|stopmdformula|stopmaxaligned|stopmatrix|stopmatrices|stopmathstyle|stopmathmode|stopmathmatrix|stopmathlabeltext|stopmathcases|stopmathalignment|stopmarkpages|stopmarkedcontent|stopmarginrule|stopmarginblock|stopmakeup|stopluasetups|stopluaparameterset|stopluacode|stoplua|stoplocalsetups|stoplocalnotes|stoplocallinecorrection|stoplocalheadsetup|stoplocalfootnotes|stoplinetablehead|stoplinetablecell|stoplinetablebody|stoplinetable|stoplines|stoplinenumbering|stoplinenote|stoplinefiller|stoplinecorrection|stoplinealignment|stopline|stoplegend|stopleftaligned|stoplayout|stoplanguage|stoplabeltext|stopknockout|stopitemize|stopitemgroupcolumns|stopitemgroup|stopitem|stopintertext|stopintermezzotext|stopinterface|stopinteractionmenu|stopinteraction|stopindentedtext|stopindentation|stopimath|stophyphenation|stophighlight|stophiding|stophelptext|stopheadtext|stophead|stophboxregister|stophboxestohbox|stophbox|stophanging|stopgridsnapping|stopgraphictext|stopgoto|stopfrontmatter|stopframedtext|stopframedtable|stopframedrow|stopframedcontent|stopframedcell|stopframed|stopformulas|stopformula|stopfootnote|stopfontsolution|stopfontclass|stopfont|stopfloatcombination|stopfixed|stopfittingpage|stopfiguretext|stopfigure|stopfact|stopfacingfloat|stopexternalfigurecollection|stopextendedcatcodetable|stopexpandedcollect|stopexpanded|stopexceptions|stopenvironment|stopendofline|stopendnote|stopembeddedxtable|stopelement|stopeffect|stopdocument|stopdmath|stopdisplaymath|stopdelimitedtext|stopdelimited|stopcurrentlistentrywrapper|stopcurrentcolor|stopctxfunctiondefinition|stopctxfunction|stopcontextdefinitioncode|stopcontextcode|stopcomponent|stopcomment|stopcombination|stopcolumnsetspan|stopcolumnset|stopcolumns|stopcolorset|stopcoloronly|stopcolorintent|stopcolor|stopcollecting|stopcollect|stopchemicaltext|stopchemical|stopcheckedfences|stopcharacteralign|stopchapter|stopcenteraligned|stopcatcodetable|stopcases|stopbuffer|stopbtxrenderingdefinitions|stopbtxlabeltext|stopboxedcolumns|stopbordermatrix|stopbodymatter|stopblockquote|stopbitmapimage|stopbbordermatrix|stopbar|stopbackmatter|stopbackground|stopattachment|stopaside|stoparrangedpages|stopappendices|stopallmodes|stopalignment|stopalign|stopXML|stopTY|stopTX|stopTRs|stopTR|stopTN|stopTH|stopTEXpage|stopTEX|stopTDs|stopTD|stopTC|stopTABLEnext|stopTABLEhead|stopTABLEfoot|stopTABLEbody|stopTABLE|stopPARSEDXML|stopMPrun|stopMPpositionmethod|stopMPpositiongraphic|stopMPpage|stopMPinitializations|stopMPinclusions|stopMPextensions|stopMPenvironment|stopMPdrawing|stopMPdefinitions|stopMPcode|stopMPclip|stopMP|stopLUA|stopJSpreamble|stopJScode|stligature|startxtablenext|startxtablehead|startxtablefoot|startxtablebody|startxtable|startxrowgroup|startxrow|startxmlsetups|startxmlraw|startxmlinlineverbatim|startxmldisplayverbatim|startxgroup|startxcolumn|startxcellgroup|startxcell|startvtopregister|startvtop|startviewerlayer|startvboxtohboxseparator|startvboxtohbox|startvboxregister|startvbox|startusingbtxspecification|startuserdata|startusemathstyleparameter|startuseMPgraphic|startusableMPgraphic|startunpacked|startunittext|startuniqueMPpagegraphic|startuniqueMPgraphic|starttyping|starttypescriptcollection|starttypescript|starttransparent|starttokens|starttokenlist|starttitle|starttextrule|starttextmakeup|starttextflow|starttextcolorintent|starttextcolor|starttextbackgroundmanual|starttextbackground|starttext|starttexdefinition|starttexcode|starttaglabeltext|starttagged|starttabulatetail|starttabulatehead|starttabulate|starttabletext|starttabletail|starttables|starttablehead|starttable|startsymbolset|startsuffixtext|startsubsubsubsubsubject|startsubsubsubsubsection|startsubsubsubsubject|startsubsubsubsection|startsubsubsubject|startsubsubsection|startsubsubject|startsubstack|startsubsentence|startsubsection|startsubjectlevel|startsubject|startsubformulas|startstyle|startstrut|startstructurepageregister|startstrictinspectnextcharacter|startstaticMPgraphic|startstaticMPfigure|startstandardmakeup|startspread|startsplittext|startsplitformula|startspformula|startspeech|startspecialitem|startsimplecolumns|startsidebar|startshift|startshapebox|startsetups|startsectionlevel|startsectionblockenvironment|startsectionblock|startsection|startsdformula|startscript|startruby|startrightaligned|startreusableMPgraphic|startregister|startregime|startreferenceprefix|startreadingfile|startrawsetups|startrandomseed|startrandomized|startquote|startquotation|startpunctuation|startpublication|startprotectedcolors|startprotect|startproject|startproduct|startprocesscommalist|startprocesscommacommand|startprocessassignmentlist|startprocessassignmentcommand|startprefixtext|startpostponingnotes|startpostponing|startpositive|startpositionoverlay|startpositioning|startplacetable|startplacepairedbox|startplacelegend|startplaceintermezzo|startplacegraphic|startplaceformula|startplacefloat|startplacefigure|startplacechemical|startpath|startpart|startparbuilder|startparagraphscell|startparagraphs|startparagraph|startpar|startpagemakeup|startpagelayout|startpagefigure|startpagecomment|startpagecolumns|startpacked|startoverprint|startoverlay|startoutputstream|startopposite|startoperatortext|startnotmode|startnotext|startnotallmodes|startnointerference|startnicelyfilledbox|startnegative|startnarrower|startnarrow|startnamedsubformulas|startnamedsection|startmpformula|startmoduletestsection|startmodule|startmodeset|startmode|startmixedcolumns|startmiddlemakeup|startmiddlealigned|startmidaligned|startmdformula|startmaxaligned|startmatrix|startmatrices|startmathstyle|startmathmode|startmathmatrix|startmathlabeltext|startmathcases|startmathalignment|startmarkpages|startmarkedcontent|startmarginrule|startmarginblock|startmakeup|startluasetups|startluaparameterset|startluacode|startlua|startlocalsetups|startlocalnotes|startlocallinecorrection|startlocalheadsetup|startlocalfootnotes|startlinetablehead|startlinetablecell|startlinetablebody|startlinetable|startlines|startlinenumbering|startlinenote|startlinefiller|startlinecorrection|startlinealignment|startline|startlegend|startleftaligned|startlayout|startlanguage|startlabeltext|startknockout|startitemize|startitemgroupcolumns|startitemgroup|startitem|startintertext|startintermezzotext|startinterface|startinteractionmenu|startinteraction|startindentedtext|startindentation|startimath|starthyphenation|starthighlight|starthiding|starthelptext|startheadtext|starthead|starthboxregister|starthboxestohbox|starthbox|starthanging|startgridsnapping|startgraphictext|startgoto|startfrontmatter|startframedtext|startframedtable|startframedrow|startframedcontent|startframedcell|startframed|startformulas|startformula|startfootnote|startfontsolution|startfontclass|startfont|startfloatcombination|startfixed|startfittingpage|startfiguretext|startfigure|startfact|startfacingfloat|startexternalfigurecollection|startextendedcatcodetable|startexpandedcollect|startexpanded|startexceptions|startenvironment|startendofline|startendnote|startembeddedxtable|startelement|starteffect|startdocument|startdmath|startdisplaymath|startdelimitedtext|startdelimited|startcurrentlistentrywrapper|startcurrentcolor|startctxfunctiondefinition|startctxfunction|startcontextdefinitioncode|startcontextcode|startcomponent|startcomment|startcombination|startcolumnsetspan|startcolumnset|startcolumns|startcolorset|startcoloronly|startcolorintent|startcolor|startcollecting|startcollect|startchemicaltext|startchemical|startcheckedfences|startcharacteralign|startchapter|startcenteraligned|startcatcodetable|startcases|startbuffer|startbtxrenderingdefinitions|startbtxlabeltext|startboxedcolumns|startbordermatrix|startbodymatter|startblockquote|startbitmapimage|startbbordermatrix|startbar|startbackmatter|startbackground|startattachment|startaside|startarrangedpages|startappendices|startallmodes|startalignment|startalign|startXML|startTY|startTX|startTRs|startTR|startTN|startTH|startTEXpage|startTEX|startTDs|startTD|startTC|startTABLEnext|startTABLEhead|startTABLEfoot|startTABLEbody|startTABLE|startPARSEDXML|startMPrun|startMPpositionmethod|startMPpositiongraphic|startMPpage|startMPinitializations|startMPinclusions|startMPextensions|startMPenvironment|startMPdrawing|startMPdefinitions|startMPcode|startMPclip|startMP|startLUA|startJSpreamble|startJScode|stareq|star|stackscripts|stackrel|ssharp|squaredots|square|sqsupsetneq|sqsupseteq|sqsupset|sqsubsetneq|sqsubseteq|sqsubset|sqrt|sqcup|sqcap|spreadhbox|splitstring|splitofftype|splitofftokens|splitoffroot|splitoffpath|splitoffname|splitoffkind|splitofffull|splitoffbase|splitfrac|splitfloat|splitfilename|splitdfrac|splitatperiod|splitatcomma|splitatcolons|splitatcolon|splitatasterisk|sphericalangle|speech|spanishnumerals|spanishNumerals|spadesuit|spaceddigitssymbol|spaceddigitsseparator|spaceddigitsmethod|spaceddigits|space|somewhere|someplace|somenamedheadnumber|somelocalfloat|someline|somekindoftab|someheadnumber|solidus|softhyphen|snaptogrid|smile|smashedvbox|smashedhbox|smashboxed|smashbox|smash|smalltype|smallslantedbold|smallslanted|smallskip|smallnormal|smallitalicbold|smaller|smallcaps|smallcappedromannumerals|smallcappedcharacters|smallboldslanted|smallbolditalic|smallbold|smallbodyfont|small|sloveniannumerals|slovenianNumerals|slong|slicepages|slash|slantedface|slantedbold|slanted|sixthofsixarguments|sixperemspace|singleverticalbar|singlebond|singalcharacteralign|simplereversealignedboxplus|simplereversealignedbox|simplegroupedcommand|simplealignedspreadbox|simplealignedboxplus|simplealignedbox|simeq|sim|signalrightpage|sigma|showwarning|showvariable|showvalue|showtrackers|showtokens|showtimer|showsymbolset|showstruts|showsetupsdefinition|showsetups|showprint|showparentchain|showpalet|showotfcomposition|shownextbox|showminimalbaseline|showmessage|showmargins|showmakeup|showlogcategories|showligatures|showligature|showlayoutcomponents|showlayout|showkerning|showjustification|showinjector|showhyphens|showhyphenationtrace|showhelp|showgridsnapping|showgrid|showglyphs|showglyphdata|showframe|showfontstyle|showfontstrip|showfontparameters|showfontkerns|showfontitalics|showfontexpansion|showfontdata|showfont|showexperiments|showedebuginfo|showdirsinmargin|showdirectives|showcounter|showcolorstruts|showcolorset|showcolorgroup|showcolorcomponents|showcolorbar|showcolor|showcharratio|showchardata|showbtxtables|showbtxhashedauthors|showbtxfields|showbtxdatasetfields|showbtxdatasetcompleteness|showbtxdatasetauthors|showboxes|showbodyfontenvironment|showbodyfont|showattributes|showallmakeup|shiftup|shiftdown|shiftbox|sharp|shapedhbox|sfrac|seveneighths|setxvariables|setxvariable|setxvalue|setxmeasure|setwidthof|setvtopregister|setvisualizerfont|setvboxregister|setvariables|setvariable|setvalue|setuxvalue|setuvalue|setupxtable|setupxml|setupwithargumentswapped|setupwithargument|setupwhitespace|setupvspacing|setupviewerlayer|setupversion|setupuserpagenumber|setupuserdataalternative|setupuserdata|setupurl|setupunittext|setupunit|setuptyping|setuptype|setuptoptexts|setuptop|setuptooltip|setuptolerance|setupthinrules|setuptexttexts|setuptextrules|setuptextnote|setuptextflow|setuptextbackground|setuptext|setuptaglabeltext|setuptagging|setuptabulation|setuptabulate|setuptables|setupsynonyms|setupsynctex|setupsymbolset|setupsymbols|setupsuffixtext|setupsubpagenumber|setupsubformulas|setupsubformula|setupstyle|setupstruts|setupstretched|setupstartstop|setupspellchecking|setupspacing|setupsorting|setupsidebar|setupshift|setupselector|setupsectionblock|setupscripts|setupscript|setupscale|setups|setupruby|setuprotate|setuprenderingwindow|setupregisters|setupregister|setupreferencing|setupreferencestructureprefix|setupreferenceprefix|setupreferenceformat|setuprealpagenumber|setupquote|setupquotation|setupprograms|setupprofile|setupprocessor|setupprefixtext|setuppositioning|setuppositionbar|setupplacement|setupperiods|setupperiodkerning|setupparallel|setupparagraphs|setupparagraphnumbering|setupparagraphintro|setupparagraph|setuppapersize|setuppaper|setuppalet|setuppairedbox|setuppagetransitions|setuppagestate|setuppageshift|setuppagenumbering|setuppagenumber|setuppageinjectionalternative|setuppageinjection|setuppagecomment|setuppagecolumns|setuppagechecker|setupoutputroutine|setupoppositeplacing|setupoperatortext|setupoffsetbox|setupoffset|setupnotes|setupnote|setupnotations|setupnotation|setupnarrower|setupmodule|setupmixedcolumns|setupmathstyle|setupmathstackers|setupmathradical|setupmathornament|setupmathmatrix|setupmathlabeltext|setupmathframed|setupmathfractions|setupmathfraction|setupmathfence|setupmathematics|setupmathcases|setupmathalignment|setupmarking|setupmarginrules|setupmarginrule|setupmarginframed|setupmargindata|setupmarginblock|setupmakeup|setuplowmidhigh|setuplowhigh|setuplow|setuplocalinterlinespace|setuplocalfloats|setuplistextra|setuplistalternative|setuplist|setuplinewidth|setuplinetable|setuplines|setuplinenumbering|setuplinenote|setuplinefillers|setuplinefiller|setuplegend|setuplayouttext|setuplayout|setuplayeredtext|setuplayer|setuplanguage|setuplabeltext|setuplabel|setupitems|setupitemize|setupitemizations|setupitemgroup|setupitaliccorrection|setupinterlinespace|setupinteractionscreen|setupinteractionmenu|setupinteractionbar|setupinteraction|setupinsertion|setupinitial|setupindex|setupindenting|setupindentedtext|setuphyphenmark|setuphyphenation|setuphighlight|setuphigh|setuphelp|setupheadtext|setupheads|setupheadnumber|setupheadertexts|setupheader|setupheadalternative|setuphead|setupglobalreferenceprefix|setupframedtexts|setupframedtext|setupframedtablerow|setupframedtablecolumn|setupframedtable|setupframedcontent|setupframed|setupformulaframed|setupformulae|setupformula|setupforms|setupfootnotes|setupfootertexts|setupfooter|setupfontsolution|setupfonts|setupfontprotrusion|setupfontexpansion|setupfloatsplitting|setupfloats|setupfloatframed|setupfloat|setupfittingpage|setupfirstline|setupfillinrules|setupfillinlines|setupfiller|setupfieldtotalframed|setupfields|setupfieldlabelframed|setupfieldcontentframed|setupfieldcategory|setupfieldbody|setupfield|setupfacingfloat|setupexternalsoundtracks|setupexternalfigure|setupexport|setupenv|setupenumerations|setupenumeration|setupeffect|setupdocument|setupdirections|setupdescription|setupdelimitedtext|setupdataset|setupcounter|setupcontent|setupcomment|setupcombinedlist|setupcombination|setupcolumnsetstart|setupcolumnsetspan|setupcolumnsetlines|setupcolumnsetareatext|setupcolumnsetarea|setupcolumnset|setupcolumns|setupcolors|setupcolor|setupcollector|setupclipping|setupchemicalframed|setupchemical|setupcharacterspacing|setupcharacterkerning|setupcharacteralign|setupcaptions|setupcaption|setupcapitals|setupbutton|setupbuffer|setupbtxrendering|setupbtxregister|setupbtxlist|setupbtxlabeltext|setupbtxdataset|setupbtx|setupbottomtexts|setupbottom|setupbookmark|setupbodyfont|setupblock|setupbleeding|setupblank|setupblackrules|setupbars|setupbar|setupbackgrounds|setupbackground|setupbackend|setupattachments|setupattachment|setuparranging|setupalternativestyles|setupalign|setupTEXpage|setupTABLE|setupMPvariables|setupMPpage|setupMPinstance|setupMPgraphics|setup|setunreferencedobject|setugvalue|setuevalue|settrialtypesetting|settokenlist|settightunreferencedobject|settightstrut|settightreferencedobject|settightobject|settextcontent|settestcrlf|settaggedmetadata|settabular|setsystemmode|setsuperiors|setstrut|setstructurepageregister|setstackbox|setsmallcaps|setsmallbodyfont|setsimplecolumnshsize|setsectionblock|setsecondpasscharacteralign|setscript|setrigidcolumnhsize|setrigidcolumnbalance|setreplacement|setregisterentry|setreferencedobject|setreference|setrandomseed|setprofile|setpositionstrut|setpositionplus|setpositiononly|setpositiondataplus|setpositiondata|setpositionbox|setposition|setperiodkerning|setpercentdimen|setpenalties|setpagestaterealpageno|setpagestate|setpagereference|setoldstyle|setobject|setnotetext|setnote|setnostrut|setmode|setminus|setmessagetext|setmeasure|setmathstyle|setmarking|setmarker|setmainparbuilder|setmainbodyfont|setlocalscript|setlocalhsize|setlinefiller|setlayertext|setlayerframed|setlayer|setitaliccorrection|setinternalrendering|setinterfacevariable|setinterfacemessage|setinterfaceelement|setinterfaceconstant|setinterfacecommand|setinteraction|setinjector|setinitial|sethyphenationfeatures|sethyphenatedurlnormal|sethyphenatedurlbefore|sethyphenatedurlafter|sethboxregister|setgvariables|setgvariable|setgvalue|setgmeasure|setglobalscript|setfontstrut|setfontsolution|setfontfeature|setfontcolorsheme|setfont|setflag|setfirstpasscharacteralign|setfirstline|setevariables|setevariable|setevalue|setemeasure|setelementexporttag|setdummyparameter|setdocumentfilename|setdocumentargumentdefault|setdocumentargument|setdirection|setdigitsmanipulation|setdefaultpenalties|setdataset|setcurrentfontclass|setcounterown|setcounter|setcolormodell|setcollector|setcharstrut|setcharacterstripping|setcharacterspacing|setcharacterkerning|setcharactercleaning|setcharactercasing|setcharacteraligndetail|setcharacteralign|setcatcodetable|setcapstrut|setbreakpoints|setboxlly|setboxllx|setbigbodyfont|setbar|setautopagestaterealpageno|setMPvariables|setMPvariable|setMPtext|setMPpositiongraphicrange|setMPpositiongraphic|setMPlayer|setJSpreamble|serifnormal|serifbold|serif|serializedcommalist|serializecommalist|selectblocks|select|seeindex|sectionmark|section|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|searrow|screen|scommaaccent|scircumflex|schwahook|schwa|scedilla|scaron|scale|sbox|savetwopassdata|savetaggedtwopassdata|savenormalmeaning|savecurrentattributes|savecounter|savebuffer|savebtxdataset|savebox|sansserif|sansnormal|sansbold|sans|samplefile|safechar|sacute|rvert|runninghbox|runMPbuffer|ruledvtop|ruledvpack|ruledvbox|ruledtpack|ruledtopv|ruledmbox|ruledhpack|ruledhbox|ruby|rtop|rtlvtop|rtlvbox|rtlhbox|rtimes|rrointerval|rrbracket|rrangle|rparent|rotate|rootradical|romanxii|romanxi|romanx|romanviii|romanvii|romanvi|romanv|romannumerals|romanm|romanl|romanix|romaniv|romaniii|romanii|romani|romand|romanc|romanXII|romanXI|romanX|romanVIII|romanVII|romanVI|romanV|romanM|romanL|romanIX|romanIV|romanIII|romanII|romanI|romanD|romanC|roman|rollbutton|rointerval|robustpretocommalist|robustdoifinsetelse|robustdoifelseinset|robustaddtocommalist|rneq|rmoustache|rlointerval|rlap|risingdotseq|rinvertedbreve|rinterval|ring|rightwhitearrow|rightwavearrow|righttopbox|righttoleftvtop|righttoleftvbox|righttolefthbox|righttoleft|rightthreetimes|rightthreearrows|rightsubguillemot|rightsquigarrow|rightskipadaption|rightrightarrows|rightpageorder|rightorleftpageaction|rightmathlabeltext|rightline|rightleftharpoons|rightleftarrows|rightlabeltext|rightheadtext|righthbox|rightharpoonup|rightharpoondown|rightguillemot|rightdasharrow|rightbox|rightbottombox|rightarrowtriangle|rightarrowtail|rightarrowbar|rightarrow|rightangle|rightaligned|right|rhookswarrow|rhooknearrow|rho|rhbox|rgroup|rfloor|rfence|revivefeature|reversevtop|reversevpack|reversevbox|reversetpack|reversehpack|reversehbox|reversedtripleprime|reversedprime|reverseddoubleprime|reuserandomseed|reuseMPgraphic|reusableMPgraphic|restriction|restoreglobalbodyfont|restoreendofline|restorecurrentattributes|restorecounter|restorecatcodes|restorebox|restartcounter|resolvedglyphstyled|resolvedglyphdirect|reshapebox|resetvisualizers|resetvalue|resetuserpagenumber|resetusedsynonyms|resetusedsortings|resettrialtypesetting|resettrackers|resettokenlist|resettimer|resetsystemmode|resetsymbolset|resetsubpagenumber|resetshownsynonyms|resetsetups|resetscript|resetreplacement|resetreference|resetrecurselevel|resetprofile|resetperiodkerning|resetpenalties|resetpath|resetparallel|resetpagenumber|resetmode|resetmarking|resetmarker|resetlocalfloats|resetlayer|resetitaliccorrection|resetinteractionmenu|resetinjector|resethyphenationfeatures|resetfontsolution|resetfontfallback|resetfontcolorsheme|resetflag|resetfeature|resetdirection|resetdigitsmanipulation|resetcounter|resetcollector|resetcharacterstripping|resetcharacterspacing|resetcharacterkerning|resetcharacteralign|resetbuffer|resetbreakpoints|resetboxesincache|resetbar|resetandaddfeature|resetallattributes|resetMPinstance|resetMPenvironment|resetMPdrawing|rescanwithsetup|rescan|replaceword|replaceincommalist|replacefeature|repeathead|removeunwantedspaces|removetoks|removesubstring|removepunctuation|removemarkedcontent|removelastspace|removelastskip|removefromcommalist|removedepth|removebottomthings|remark|remainingcharacters|relbar|relaxvalueifundefined|relateparameterhandlers|relatemarking|regular|registerunit|registersynonym|registersort|registermenubuttons|registerhyphenationpattern|registerhyphenationexception|registerfontclass|registerexternalfigure|registered|registerctxluafile|registerattachment|referring|referenceprefix|reference|ref|redoconvertfont|recursestring|recurselevel|recursedepth|realsmallcapped|reals|realpagenumber|realSmallcapped|realSmallCapped|readxmlfile|readtexfile|readsysfile|readsetfile|readlocfile|readjobfile|readfixfile|readfile|rdoublegrave|rcommaaccent|rceil|rcaron|rbracket|rbrace|rbox|rawsubcountervalue|rawstructurelistuservariable|rawprocesscommalist|rawprocesscommacommand|rawprocessaction|rawgetparameters|rawdoifinsetelse|rawdoifinset|rawdoifelseinset|rawdate|rawcountervalue|rawcounter|rationals|rangle|randomnumber|randomizetext|raisebox|raggedwidecenter|raggedright|raggedleft|raggedcenter|raggedbottom|racute|rVert|quotesinglebase|quotesingle|quoteright|quoteleft|quotedblright|quotedblleft|quotedblbase|quotedbl|quote|quotation|quittypescriptscanning|quitprevcommalist|quitcommalist|questionedeq|questiondown|quarterstrut|quads|quadrupleprime|quad|qquad|putnextboxincache|putboxincache|pushsystemmode|pushoutputstream|pushmode|pushmacro|pushbutton|pushattribute|purenumber|punctuationspace|psi|pseudosmallcapped|pseudoSmallcapped|pseudoSmallCapped|pseudoMixedCapped|propto|project|program|profilegivenbox|profiledbox|product|prod|processyear|processxtablebuffer|processuntil|processtokens|processtexbuffer|processseparatedlist|processranges|processmonth|processlist|processlinetablefile|processlinetablebuffer|processisolatedwords|processisolatedchars|processfirstactioninset|processfileonce|processfilenone|processfilemany|processfile|processcontent|processcommalistwithparameters|processcommalist|processcommacommand|processcolorcomponents|processbodyfontenvironmentlist|processblocks|processbetween|processassignmentlist|processassignmentcommand|processassignlist|processallactionsinset|processaction|processMPfigurefile|processMPbuffer|procent|primes|prime|prevuserpagenumber|prevuserpage|prevsubpagenumber|prevsubpage|prevsubcountervalue|prevrealpagenumber|prevrealpage|preventmode|prevcountervalue|prevcounter|prettyprintbuffer|pretocommalist|presetunittext|presettaglabeltext|presetsuffixtext|presetprefixtext|presetoperatortext|presetmathlabeltext|presetlabeltext|presetheadtext|presetfieldsymbols|presetdocument|presetbtxlabeltext|prerollblank|prependvalue|prependtoksonce|prependtoks|prependtocommalist|prependgvalue|prependetoks|prefixtext|prefixlanguage|prefixedpagenumber|predefinesymbol|predefinefont|predefinedfont|precsim|precnsim|precneqq|precneq|precnapprox|preceqq|preceq|preccurlyeq|precapprox|prec|postponenotes|positivesign|positionregionoverlay|positionoverlay|position|popsystemmode|popmode|popmacro|popattribute|pm|placetable|placesubformula|placesidebyside|placerenderingwindow|placeregister|placerawlist|placerawheadtext|placerawheadnumber|placerawheaddata|placeparallel|placepairedbox|placepagenumber|placeontopofeachother|placeongrid|placenotes|placenamedformula|placenamedfloat|placement|placelocalnotes|placelocalfootnotes|placelistoftables|placelistofsynonyms|placelistofsorts|placelistofpublications|placelistoflogos|placelistofintermezzi|placelistofgraphics|placelistoffigures|placelistofchemicals|placelistofabbreviations|placelist|placelegend|placelayeredtext|placelayer|placeintermezzo|placeinitial|placeindex|placehelp|placeheadtext|placeheadnumber|placegraphic|placeframed|placeformula|placefootnotes|placefloatwithsetups|placefloat|placefigure|placedbox|placecurrentformulanumber|placecontent|placecomments|placecombinedlist|placecitation|placechemical|placebtxrendering|placebookmarks|placeattachments|pitchfork|pickupgroupedcommand|pi|phook|phi|phantombox|phantom|perthousand|persianthousandsseparator|persiannumerals|persiandecimalseparator|persiandecimals|perp|permitspacesbetweengroups|permitcircumflexescape|permitcaretescape|periods|periodcentered|percentdimen|percent|pdfeTeX|pdfcolor|pdfbackendsetshade|pdfbackendsetpattern|pdfbackendsetpagesattribute|pdfbackendsetpageresource|pdfbackendsetpageattribute|pdfbackendsetname|pdfbackendsetinfo|pdfbackendsetextgstate|pdfbackendsetcolorspace|pdfbackendsetcatalog|pdfbackendcurrentresources|pdfbackendactualtext|pdfactualtext|pdfTeX|partial|part|parallel|paragraphmark|paletsize|pagestaterealpageorder|pagestaterealpage|pagereference|pagenumber|pageinjection|pagefigure|pagebreak|pagearea|page|owns|overstrikes|overstrike|overset|overrightarrow|overparentunderparent|overparent|overloaderror|overleftarrow|overlaywidth|overlayrollbutton|overlayoffset|overlaylinewidth|overlaylinecolor|overlayimage|overlayheight|overlayfigure|overlaydepth|overlaycolor|overlaybutton|overbracketunderbracket|overbracket|overbraceunderbrace|overbrace|overbarunderbar|overbars|overbar|over|outputstreamunvcopy|outputstreamunvbox|outputstreamcopy|outputstreambox|outputfilename|otimes|otildemacron|otilde|ostrokeacute|ostroke|oslash|ornamenttext|ordmasculine|ordinalstr|ordinaldaynumber|ordfeminine|oplus|operatortext|operatorlanguage|oogonekmacron|oogonek|onethird|onesuperior|onesixth|onequarter|onehalf|onefifth|oneeighth|onedigitrounding|ominus|omicron|omega|omacron|oinvertedbreve|ointctrclockwise|ointclockwise|oint|oiint|oiiint|ohungarumlaut|ohorntilde|ohornhook|ohorngrave|ohorndotbelow|ohornacute|ohorn|ohook|ohm|ograve|offsetbox|offset|oeligature|odoublegrave|odotbelow|odotaccentmacron|odotaccent|odot|odiaeresismacron|odiaeresis|ocircumflextilde|ocircumflexhook|ocircumflexgrave|ocircumflexdotbelow|ocircumflexacute|ocircumflex|ocaron|obreve|obox|objectwidth|objectmargin|objectheight|objectdepth|obeydepth|oacute|nwsearrow|nwarrow|nvrightarrow|nvleftrightarrow|nvleftarrow|nvdash|nvDash|numbers|numberofpoints|nu|ntrianglerighteq|ntriangleright|ntrianglelefteq|ntriangleleft|ntimes|ntilde|nsupseteq|nsupset|nsucccurlyeq|nsucc|nsubseteq|nsubset|nsqsupseteq|nsqsubseteq|nsimeq|nsim|nrightarrow|npreccurlyeq|nprec|nparallel|nowns|notragged|notopandbottomlines|notin|notesymbol|note|not|nospace|normaltypeface|normalslantedface|normalizetextwidth|normalizetextline|normalizetextheight|normalizetextdepth|normalizefontwidth|normalizefontline|normalizefontheight|normalizefontdepth|normalizedfontsize|normalizebodyfontsize|normalitalicface|normalframedwithsettings|normalboldface|normal|nonmathematics|nonfrenchspacing|noitem|noindentation|noheightstrut|noheaderandfooterlines|noflocalfloats|noflines|noffigurepages|nodetostring|nocite|nocitation|nocharacteralign|nocap|nobreakspace|nobar|nni|nmid|nlesssim|nlessgtr|nless|nleq|nleftrightarrow|nleftarrow|njligature|nin|nihongo|ni|ngtrsim|ngtrless|ngtr|ngrave|ngeq|nextuserpagenumber|nextuserpage|nextsubpagenumber|nextsubpage|nextsubcountervalue|nextrealpagenumber|nextrealpage|nextparagraphs|nextdepth|nextcountervalue|nextcounter|nextboxwd|nextboxhtdp|nextboxht|nextboxdp|nextbox|nexists|newsystemmode|newsignal|newmode|newfrenchspacing|newevery|newcounter|newcatcodetable|newattribute|neswarrow|nequiv|neq|neng|negthinspace|negenspace|negemspace|negativesign|negated|negatecolorbox|neg|nearrow|ne|ndivides|ncurl|ncong|ncommaaccent|ncaron|naturalwd|naturalvtop|naturalvpack|naturalvcenter|naturalvbox|naturaltpack|naturalnumbers|naturalhpack|naturalhbox|natural|nasymp|narrownobreakspace|napproxEq|napprox|napostrophe|namedtaggedlabeltexts|namedstructurevariable|namedstructureuservariable|namedstructureheadlocation|namedheadnumber|nacute|nabla|nVrightarrow|nVleftrightarrow|nVleftarrow|nVdash|nVDash|nRightarrow|nLeftrightarrow|nLeftarrow|nHuparrow|nHdownarrow|multimap|mu|mtwoheadrightarrow|mtwoheadleftarrow|mtriplerel|mtext|mrightoverleftarrow|mrightleftharpoons|mrightharpoonup|mrightharpoondown|mrightarrow|mrel|mprandomnumber|mp|monthshort|monthlong|month|mononormal|monobold|mono|molecule|moduleparameter|models|mmapsto|mleftrightharpoons|mleftrightarrow|mleftharpoonup|mleftharpoondown|mleftarrow|mkvibuffer|mixedcaps|mirror|minuscolon|minus|minimalhbox|midsubsentence|midhbox|middlebox|middlealigned|middle|midaligned|mid|mhookrightarrow|mhookleftarrow|mho|mhbox|mfunctionlabeltext|mfunction|mframed|mfence|message|mequal|menubutton|medspace|medskip|measuredeq|measuredangle|measured|measure|mcframed|mbox|maxaligned|mathwordtf|mathwordsl|mathwordit|mathwordbs|mathwordbi|mathwordbf|mathword|mathupright|mathunder|mathtt|mathtriplet|mathtf|mathtexttf|mathtextsl|mathtextit|mathtextbs|mathtextbi|mathtextbf|mathtext|mathss|mathsl|mathscript|mathrm|mathpercent|mathover|mathop|mathlabeltexts|mathlabeltext|mathlabellanguage|mathitalic|mathit|mathhyphen|mathhash|mathfunction|mathfraktur|mathematics|mathdouble|mathdollar|mathdefault|mathbs|mathblackboard|mathbi|mathbf|mathampersand|math|mat|markpage|markinjector|marking|markedpages|markcontent|margintext|margindata|mapsup|mapsto|mapsfrom|mapsdown|mapfontsize|maltese|makestrutofbox|makerawcommalist|makecharacteractive|mainlanguage|mRightarrow|mLeftrightarrow|mLeftarrow|m|lvert|luaversion|luasetup|luaparameterset|luaminorversion|luametaTeX|luamajorversion|luajitTeX|luafunction|luaexpr|luaexpanded|luaenvironment|luaconditional|luacode|luaTeX|ltrvtop|ltrvbox|ltrhbox|ltop|ltimes|lt|lstroke|lrtbbox|lrointerval|lrcorner|lparent|lozenge|lowerrightsingleninequote|lowerrightdoubleninequote|lowerleftsingleninequote|lowerleftdoubleninequote|lowercasestring|lowercased|lowerbox|low|lor|looparrowright|looparrowleft|longrightsquigarrow|longrightarrow|longmapsto|longmapsfrom|longleftrightarrow|longleftarrow|lomihi|lointerval|lohi|logo|locfilename|locatefilepath|locatedfilepath|localundefine|localpushmacro|localpushbox|localpopmacro|localpopbox|localhsize|localframedwithsettings|localframed|loadtypescriptfile|loadtexfileonce|loadtexfile|loadspellchecklist|loadluafileonce|loadluafile|loadfontgoodies|loadcldfileonce|loadcldfile|loadbtxreplacementfile|loadbtxdefinitionfile|loadanyfileonce|loadanyfile|lnsim|lnot|lneqq|lneq|lnapprox|lmoustache|llless|lll|llcorner|llbracket|llap|llangle|ll|ljligature|listnamespaces|listlength|listcite|listcitation|linterval|linethickness|linespanningtext|linenote|linefeed|linebox|line|limitatetext|limitatelines|limitatefirstline|lhooksearrow|lhooknwarrow|lhbox|lgroup|lfloor|lfence|letvaluerelax|letvalueempty|letvalue|letterunderscore|lettertilde|letterspacing|letterslash|lettersinglequote|letterrightparenthesis|letterrightbracket|letterrightbrace|letterquestionmark|letterpercent|letteropenbrace|lettermore|letterless|letterleftparenthesis|letterleftbracket|letterleftbrace|letterhat|letterhash|letterexclamationmark|letterescape|letteregroup|letterdoublequote|letterdollar|lettercolon|letterclosebrace|letterbgroup|letterbar|letterbackslash|letterat|letterampersand|letgvalurelax|letgvalueempty|letgvalue|letempty|letdummyparameter|letcsnamecsname|letcsnamecs|letcscsname|letcatcodecommand|letbeundefined|lesssim|lessgtr|lesseqqgtr|lesseqgtr|lessdot|lessapprox|leqslant|leqq|leq|leftwhitearrow|leftwavearrow|lefttorightvtop|lefttorightvbox|lefttorighthbox|lefttoright|lefttopbox|leftthreetimes|leftsubguillemot|leftsquigarrow|leftskipadaption|leftrightsquigarrow|leftrightharpoons|leftrightarrowtriangle|leftrightarrows|leftrightarrow|leftorrightvtop|leftorrightvbox|leftorrighthbox|leftmathlabeltext|leftline|leftleftarrows|leftlabeltext|leftheadtext|lefthbox|leftharpoonup|leftharpoondown|leftguillemot|leftdasharrow|leftbox|leftbottombox|leftarrowtriangle|leftarrowtail|leftarrow|leftaligned|left|leadsto|le|ldots|ldotp|ldotmiddle|lcurl|lcommaaccent|lceil|lcaron|lbracket|lbrace|lbox|lbar|lazysavetwopassdata|lazysavetaggedtwopassdata|layerwidth|layerheight|layeredtext|latin|lateluacode|lastuserpagenumber|lastuserpage|lasttwodigits|lastsubpagenumber|lastsubpage|lastsubcountervalue|lastrealpagenumber|lastrealpage|lastpredefinedsymbol|lastnaturalboxwd|lastnaturalboxht|lastnaturalboxdp|lastlinewidth|lastdigit|lastcountervalue|lastcounter|languagecharwidth|languagecharacters|languageCharacters|language|langle|land|lambdabar|lambda|lacute|labeltexts|labeltext|labellanguage|lVert|koreanparentnumerals|koreannumeralsp|koreannumeralsc|koreannumerals|koreancirclenumerals|kkra|khook|kerncharacters|keepunwantedspaces|keeplinestogether|keepblocks|kcommaaccent|kcaron|kappa|kap|jobfilesuffix|jobfilename|jmath|jcircumflex|jcaron|itilde|itemtag|items|item|italicface|italiccorrection|italicbold|italic|iota|iogonek|invokepageheandler|invisibletimes|intop|intertext|intercal|interactionmenu|interactionbuttons|interactionbar|integers|integerrounding|intclockwise|int|installversioninfo|installunitsspace|installunitsseparator|installtopframerenderer|installtextracker|installtexdirective|installswitchsetuphandler|installswitchcommandhandler|installstyleandcolorhandler|installsimpleframedcommandhandler|installsimplecommandhandler|installshipoutmethod|installsetuponlycommandhandler|installsetuphandler|installrootparameterhandler|installrightframerenderer|installparentinjector|installparametersethandler|installparameterhashhandler|installparameterhandler|installpagearrangement|installoutputroutine|installnamespace|installmacrostack|installleftframerenderer|installlanguage|installglobalmacrostack|installframedcommandhandler|installframedautocommandhandler|installdirectstyleandcolorhandler|installdirectsetuphandler|installdirectparametersethandler|installdirectparameterhandler|installdirectcommandhandler|installdefinitionsetmember|installdefinitionset|installdefinehandler|installcorenamespace|installcommandhandler|installbottomframerenderer|installbasicparameterhandler|installbasicautosetuphandler|installautosetuphandler|installautocommandhandler|installattributestack|installanddefineactivecharacter|installactivecharacter|installactionhandler|insertpages|inrightmargin|inrightedge|inright|inputgivenfile|inputfilesuffix|inputfilerealsuffix|inputfilename|inputfilebarename|input|inoutermargin|inouteredge|inouter|inother|innerflushshapebox|inmframed|inmargin|inlinerange|inlineprettyprintbuffer|inlineordisplaymath|inlinemessage|inlinemathematics|inlinemath|inlinedbox|inlinebuffer|inline|inleftmargin|inleftedge|inleft|initializeboxstack|ininnermargin|ininneredge|ininner|inhibitblank|inheritparameter|infull|infty|inframed|infofontbold|infofont|index|indentation|incrementvalue|incrementsubpagenumber|incrementpagenumber|incrementedcounter|incrementcounter|increment|includeversioninfo|includemenu|in|imply|implies|impliedby|immediatesavetwopassdata|imath|imaginaryj|imaginaryi|imacron|ijligature|iinvertedbreve|iintop|iint|iiintop|iiint|iiiintop|iiiint|ihook|igrave|ignorevalue|ignoretagsinexport|ignoreimplicitspaces|iftrialtypesetting|ifparameters|ifinoutputstream|ifinobject|iff|ifassignment|idoublegrave|idotbelow|idotaccent|idiaeresis|ideographicspace|ideographichalffillspace|icircumflex|icaron|ibreve|ibox|iacute|hyphenatedword|hyphenatedurl|hyphenatedpar|hyphenatedhbox|hyphenatedfilename|hyphenatedfile|hyphenatedcoloredword|hyphen|htofstring|htdpofstring|hstroke|hspace|hsmashed|hsmashbox|hsmash|hslash|hsizefraction|hpos|hphantom|hpackedbox|hpackbox|horizontalpositionbar|horizontalgrowingbar|hookrightarrow|hookleftarrow|hl|himilo|hilo|highordinalstr|highlight|high|hideblocks|hiddencite|hiddencitation|hiddenbar|hglue|helptext|heightspanningtext|heightofstring|heightanddepthofstring|hebrewZayin|hebrewYod|hebrewVav|hebrewTsadifinal|hebrewTsadi|hebrewTet|hebrewTav|hebrewShin|hebrewSamekh|hebrewResh|hebrewQof|hebrewPefinal|hebrewPe|hebrewNunfinal|hebrewNun|hebrewMemfinal|hebrewMem|hebrewLamed|hebrewKaffinal|hebrewKaf|hebrewHet|hebrewHe|hebrewGimel|hebrewDalet|hebrewBet|hebrewAyin|hebrewAlef|heartsuit|headwidth|headvbox|headtextwidth|headtexts|headtextdistance|headtextcontent|headtext|headsetupspacing|headreferenceattributes|headnumberwidth|headnumberdistance|headnumbercontent|headnumber|headlanguage|headhbox|hdofstring|hcircumflex|hcaron|hboxreference|hboxofvbox|hbar|hat|hash|hanzi|hangul|handwritten|handletokens|halfwaybox|halfstrut|halflinestrut|hairspace|hairline|gurmurkhinumerals|gujaratinumerals|guilsingleright|guilsingleleft|gtrsim|gtrless|gtreqqless|gtreqless|gtrdot|gtrapprox|gt|gstroke|gsetboxlly|gsetboxllx|groupedcommand|grid|greekzeta|greekxi|greekvaria|greekupsilonvrachy|greekupsilonvaria|greekupsilontonos|greekupsilonpsilivaria|greekupsilonpsilitonos|greekupsilonpsiliperispomeni|greekupsilonpsili|greekupsilonperispomeni|greekupsilonoxia|greekupsilonmacron|greekupsilondialytikavaria|greekupsilondialytikatonos|greekupsilondialytikaperispomeni|greekupsilondiaeresis|greekupsilondasiavaria|greekupsilondasiatonos|greekupsilondasiaperispomeni|greekupsilondasia|greekupsilon|greektonos|greekthetaalt|greektheta|greektau|greekstigma|greeksigmalunate|greeksigma|greeksampi|greekrhopsili|greekrhodasia|greekrhoalt|greekrho|greekpsilivaria|greekpsilitonos|greekpsiliperispomeni|greekpsili|greekpsi|greekprosgegrammeni|greekpialt|greekpi|greekphialt|greekphi|greekperispomeni|greekoxia|greekomicronvaria|greekomicrontonos|greekomicronpsilivaria|greekomicronpsilitonos|greekomicronpsili|greekomicronoxia|greekomicrondasiavaria|greekomicrondasiatonos|greekomicrondasia|greekomicron|greekomegavaria|greekomegatonos|greekomegapsilivaria|greekomegapsilitonos|greekomegapsiliperispomeni|greekomegapsili|greekomegaperispomeni|greekomegaoxia|greekomegaiotasubvaria|greekomegaiotasubtonos|greekomegaiotasubpsilivaria|greekomegaiotasubpsilitonos|greekomegaiotasubpsiliperispomeni|greekomegaiotasubpsili|greekomegaiotasubperispomeni|greekomegaiotasubdasiavaria|greekomegaiotasubdasiatonos|greekomegaiotasubdasiaperispomeni|greekomegaiotasubdasia|greekomegaiotasub|greekomegadasiavaria|greekomegadasiatonos|greekomegadasiaperispomeni|greekomegadasia|greekomega|greeknumkoppa|greeknumerals|greeknu|greekmu|greeklambda|greekkoppa|greekkappa|greekiotavrachy|greekiotavaria|greekiotatonos|greekiotapsilivaria|greekiotapsilitonos|greekiotapsiliperispomeni|greekiotapsili|greekiotaperispomeni|greekiotaoxia|greekiotamacron|greekiotadialytikavaria|greekiotadialytikatonos|greekiotadialytikaperispomeni|greekiotadialytika|greekiotadasiavaria|greekiotadasiatonos|greekiotadasiaperispomeni|greekiotadasia|greekiota|greekgamma|greekfinalsigma|greeketavaria|greeketatonos|greeketapsilivaria|greeketapsilitonos|greeketapsiliperispomeni|greeketapsili|greeketaperispomeni|greeketaoxia|greeketaiotasubvaria|greeketaiotasubtonos|greeketaiotasubpsilivaria|greeketaiotasubpsilitonos|greeketaiotasubpsiliperispomeni|greeketaiotasubpsili|greeketaiotasubperispomeni|greeketaiotasubdasiavaria|greeketaiotasubdasiatonos|greeketaiotasubdasiaperispomeni|greeketaiotasubdasia|greeketaiotasub|greeketadasiavaria|greeketadasiatonos|greeketadasiaperispomeni|greeketadasia|greeketa|greekepsilonvaria|greekepsilontonos|greekepsilonpsilivaria|greekepsilonpsilitonos|greekepsilonpsili|greekepsilonoxia|greekepsilondasiavaria|greekepsilondasiatonos|greekepsilondasia|greekepsilonalt|greekepsilon|greekdigamma|greekdialytikavaria|greekdialytikatonos|greekdialytikaperispomeni|greekdelta|greekdasiavaria|greekdasiatonos|greekdasiaperispomeni|greekdasia|greekchi|greekbetaalt|greekbeta|greekalphavrachy|greekalphavaria|greekalphatonos|greekalphapsilivaria|greekalphapsilitonos|greekalphapsiliperispomeni|greekalphapsili|greekalphaperispomeni|greekalphaoxia|greekalphamacron|greekalphaiotasubvaria|greekalphaiotasubtonos|greekalphaiotasubpsilivaria|greekalphaiotasubpsilitonos|greekalphaiotasubpsiliperispomeni|greekalphaiotasubpsili|greekalphaiotasubperispomeni|greekalphaiotasubdasiavaria|greekalphaiotasubdasiatonos|greekalphaiotasubdasiaperispomeni|greekalphaiotasubdasia|greekalphaiotasub|greekalphadasiavaria|greekalphadasiatonos|greekalphadasiaperispomeni|greekalphadasia|greekalpha|greekZeta|greekXi|greekUpsilonvrachy|greekUpsilonvaria|greekUpsilontonos|greekUpsilonmacron|greekUpsilondialytika|greekUpsilondasiavaria|greekUpsilondasiatonos|greekUpsilondasiaperispomeni|greekUpsilondasia|greekUpsilon|greekTheta|greekTau|greekSigmalunate|greekSigma|greekRhodasia|greekRho|greekPsi|greekPi|greekPhi|greekOmicronvaria|greekOmicrontonos|greekOmicronpsilivaria|greekOmicronpsilitonos|greekOmicronpsili|greekOmicrondasiavaria|greekOmicrondasiatonos|greekOmicrondasia|greekOmicron|greekOmegavaria|greekOmegatonos|greekOmegapsilivaria|greekOmegapsilitonos|greekOmegapsiliperispomeni|greekOmegapsili|greekOmegaiotasubpsilivaria|greekOmegaiotasubpsilitonos|greekOmegaiotasubpsiliperispomeni|greekOmegaiotasubpsili|greekOmegaiotasubdasiavaria|greekOmegaiotasubdasiatonos|greekOmegaiotasubdasiaperispomeni|greekOmegaiotasubdasia|greekOmegaiotasub|greekOmegadasiavaria|greekOmegadasiatonos|greekOmegadasiaperispomeni|greekOmegadasia|greekOmega|greekNu|greekMu|greekLambda|greekKappa|greekIotavrachy|greekIotavaria|greekIotatonos|greekIotapsilivaria|greekIotapsilitonos|greekIotapsiliperispomeni|greekIotapsili|greekIotamacron|greekIotadialytika|greekIotadasiavaria|greekIotadasiatonos|greekIotadasiaperispomeni|greekIotadasia|greekIota|greekGamma|greekEtavaria|greekEtatonos|greekEtapsilivaria|greekEtapsilitonos|greekEtapsiliperispomeni|greekEtapsili|greekEtaiotasubpsilivaria|greekEtaiotasubpsilitonos|greekEtaiotasubpsiliperispomeni|greekEtaiotasubpsili|greekEtaiotasubdasiavaria|greekEtaiotasubdasiatonos|greekEtaiotasubdasiaperispomeni|greekEtaiotasubdasia|greekEtaiotasub|greekEtadasiavaria|greekEtadasiatonos|greekEtadasiaperispomeni|greekEtadasia|greekEta|greekEpsilonvaria|greekEpsilontonos|greekEpsilonpsilivaria|greekEpsilonpsilitonos|greekEpsilonpsili|greekEpsilondasiavaria|greekEpsilondasiatonos|greekEpsilondasia|greekEpsilon|greekDelta|greekCoronis|greekChi|greekBeta|greekAlphavrachy|greekAlphavaria|greekAlphatonos|greekAlphapsilivaria|greekAlphapsilitonos|greekAlphapsiliperispomeni|greekAlphapsili|greekAlphamacron|greekAlphaiotasubpsilivaria|greekAlphaiotasubpsilitonos|greekAlphaiotasubpsiliperispomeni|greekAlphaiotasubpsili|greekAlphaiotasubdasiavaria|greekAlphaiotasubdasiatonos|greekAlphaiotasubdasiaperispomeni|greekAlphaiotasubdasia|greekAlphaiotasub|greekAlphadasiavaria|greekAlphadasiatonos|greekAlphadasiaperispomeni|greekAlphadasia|greekAlpha|greedysplitstring|grayvalue|graycolor|grave|grabuntil|grabbufferdatadirect|grabbufferdata|gotopage|gotobox|goto|godown|gobbleuntilrelax|gobbleuntil|gobbletwooptionals|gobbletwoarguments|gobblethreeoptionals|gobblethreearguments|gobbletenarguments|gobblespacetokens|gobblesixarguments|gobblesingleempty|gobblesevenarguments|gobbleoneoptional|gobbleoneargument|gobbleninearguments|gobblefouroptionals|gobblefourarguments|gobblefiveoptionals|gobblefivearguments|gobbleeightarguments|gobbledoubleempty|gnsim|gneqq|gnapprox|glyphfontfile|globalundefine|globalswapmacros|globalswapdimens|globalswapcounts|globalpushmacro|globalpushbox|globalprocesscommalist|globalpreventmode|globalpopmacro|globalpopbox|globalletempty|globalenablemode|globaldisablemode|gimel|gggtr|ggg|gg|getxparameters|getvariabledefault|getvariable|getvalue|getuvalue|getuserdata|gettwopassdatalist|gettwopassdata|gettokenlist|getsubstring|gets|getroundednoflines|getreferenceentry|getreference|getrawxparameters|getrawparameters|getrawnoflines|getrawgparameters|getraweparameters|getrandomseed|getrandomnumber|getrandomfloat|getrandomdimen|getrandomcount|getprivateslot|getprivatechar|getparameters|getpaletsize|getobjectdimensions|getobject|getnoflines|getnaturaldimensions|getnamedtwopassdatalist|getnamedglyphstyled|getnamedglyphdirect|getmessage|getmarking|getlocalfloats|getlocalfloat|getlasttwopassdata|getinlineuserdata|getgparameters|getglyphstyled|getglyphdirect|getfromtwopassdata|getfromcommalist|getfromcommacommand|getfirsttwopassdata|getfirstcharacter|getfiguredimensions|getexpandedparameters|geteparameters|getemptyparameters|getdummyparameters|getdocumentfilename|getdocumentargumentdefault|getdocumentargument|getdefinedbuffer|getdayspermonth|getdayoftheweek|getcommalistsize|getcommacommandsize|getbufferdata|getbuffer|getboxlly|getboxllx|getboxfromcache|getMPlayer|getMPdrawing|geqslant|geqq|geq|ge|gdotaccent|gdefconvertedcommand|gdefconvertedargument|gcommaaccent|gcircumflex|gcaron|gbreve|gamma|gacute|frule|frozenhbox|frown|fromlinenote|from|frenchspacing|freezemeasure|freezedimenmacro|framedtext|framedparameter|frameddimension|framed|frac|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourperemspace|fourfifths|foundbox|formulanumber|formula|forgetragged|forgetparskip|forgetparameters|forgeteverypar|forcelocalfloats|forcecharacterstripping|forall|footnotetext|footnote|fontstyle|fontsize|fontfeaturelist|fontface|fontclassname|fontclass|fontcharbyindex|fontchar|fontbody|fontalternative|flushtoks|flushtokens|flushtextflow|flushshapebox|flushoutputstream|flushnotes|flushnextbox|flushlocalfloats|flushlayer|flushedrightlastline|flushcollector|flushboxregister|flushbox|floatuserdataparameter|flligature|flat|flag|fixedspaces|fixedspace|fivesixths|fiveeighths|fittopbaselinegrid|fitfieldframed|fitfield|firstuserpagenumber|firstuserpage|firstsubpagenumber|firstsubpage|firstsubcountervalue|firstrealpagenumber|firstrealpage|firstoftwounexpanded|firstoftwoarguments|firstofthreeunexpanded|firstofthreearguments|firstofsixarguments|firstofoneunexpanded|firstofoneargument|firstoffourarguments|firstoffivearguments|firstinlist|firstcountervalue|firstcounter|firstcharacter|finishregisterentry|findtwopassdata|filterreference|filterpages|filterfromvalue|filterfromnext|fillupto|fillintext|fillinrules|fillinline|filler|filledhboxy|filledhboxr|filledhboxm|filledhboxk|filledhboxg|filledhboxc|filledhboxb|filigature|filename|figurewidth|figuresymbol|figurespace|figurenaturalwidth|figurenaturalheight|figureheight|figurefullname|figurefiletype|figurefilepath|figurefilename|fifthofsixarguments|fifthoffivearguments|fieldstack|fieldbody|field|fhook|fflligature|ffligature|ffiligature|fetchtwomarks|fetchtwomarkings|fetchruntinecommand|fetchonemarking|fetchonemark|fetchmarking|fetchmark|fetchallmarks|fetchallmarkings|fenced|fence|feature|fastsxsy|fastswitchtobodyfont|fastsetupwithargumentswapped|fastsetupwithargument|fastsetup|fastscale|fastloopindex|fastloopfinal|fastlocalframed|fastincrement|fastdecrement|fallingdotseq|fakebox|externalfigurecollectionparameter|externalfigurecollectionminwidth|externalfigurecollectionminheight|externalfigurecollectionmaxwidth|externalfigurecollectionmaxheight|externalfigure|exponentiale|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifelse|expdoifcommonelse|expdoif|expandfontsynonym|expandeddoifnot|expandeddoifelse|expandeddoif|expanded|expandcheckedcsname|exitloopnow|exitloop|exists|executeifdefined|exclamdown|eunderparentfill|eunderbracketfill|eunderbracefill|eunderbarfill|etwoheadrightarrowfill|etilde|ethiopic|eth|eta|erightharpoonupfill|erightharpoondownfill|erightarrowfill|equiv|equalscolon|equaldigits|eqslantless|eqslantgtr|eqsim|eqless|eqgtr|eqeqeq|eqeq|eqcirc|eq|epsilon|epos|eoverparentfill|eoverbracketfill|eoverbracefill|eoverbarfill|eogonek|envvar|environment|env|enspace|enskip|enquad|endnote|endash|enabletrackers|enableregime|enableparpositions|enableoutputstream|enablemode|enableexperiments|enabledirectives|emspace|emquad|emptyset|emptylines|emphasistypeface|emphasisboldface|emdash|emacron|em|ell|eleftrightarrowfill|eleftharpoonupfill|eleftharpoondownfill|eleftarrowfill|elapsedtime|elapsedseconds|einvertedbreve|ehook|egrave|effect|efcparameter|efcminwidth|efcminheight|efcmaxwidth|efcmaxheight|edoublegrave|edotbelow|edotaccent|ediaeresis|edefconvertedargument|ecircumflextilde|ecircumflexhook|ecircumflexgrave|ecircumflexdotbelow|ecircumflexacute|ecircumflex|ecedilla|ecaron|ebreve|eacute|eTeX|dzligature|dzcaronligature|dummyparameter|dummydigit|dtail|dstroke|dpofstring|downzigzagarrow|downwhitearrow|downuparrows|downharpoonright|downharpoonleft|downdownarrows|downdasharrow|downarrow|dowithwargument|dowithrange|dowithpargument|dowithnextboxcs|dowithnextboxcontentcs|dowithnextboxcontent|dowithnextbox|dowith|doubleverticalbar|doubleprime|doubleparent|doublecup|doublecap|doublebracket|doublebrace|doublebond|doublebar|dottedrightarrow|dottedcircle|dots|dotriplegroupempty|dotripleemptywithset|dotripleempty|dotripleargumentwithset|dotripleargument|dotplus|dotoks|dotminus|dotlessjstroke|dotlessj|dotlessi|dotlessJ|dotlessI|dotfskip|doteqdot|doteq|dot|dosubtractfeature|dostepwiserecurse|dosixtupleempty|dosixtupleargument|dosinglegroupempty|dosingleempty|dosingleargument|doseventupleempty|doseventupleargument|dosetupcheckedinterlinespace|dosetrightskipadaption|dosetleftskipadaption|dosetattribute|dorotatebox|doresetattribute|doresetandafffeature|doreplacefeature|dorepeatwithcommand|dorecurse|dorechecknextindentation|doquintuplegroupempty|doquintupleempty|doquintupleargument|doquadruplegroupempty|doquadrupleempty|doquadrupleargument|doprocesslocalsetups|dopositionaction|dontpermitspacesbetweengroups|dontleavehmode|dontconvertfont|donothing|doloopoverlist|doloop|dollar|doindentation|doifvariableelse|doifvariable|doifvaluesomething|doifvaluenothingelse|doifvaluenothing|doifvalueelse|doifvalue|doifurldefinedelse|doifunknownfontfeature|doifundefinedelse|doifundefinedcounter|doifundefined|doiftypingfileelse|doiftopofpageelse|doiftextflowelse|doiftextflowcollectorelse|doiftextelse|doiftext|doifsymbolsetelse|doifsymboldefinedelse|doifstructurelisthaspageelse|doifstructurelisthasnumberelse|doifstringinstringelse|doifsometokselse|doifsometoks|doifsomethingelse|doifsomething|doifsomespaceelse|doifsomebackgroundelse|doifsomebackground|doifsetupselse|doifsetups|doifsamestringelse|doifsamestring|doifsamelinereferenceelse|doifrighttoleftinboxelse|doifrightpagefloatelse|doifreferencefoundelse|doifpositionsusedelse|doifpositionsonthispageelse|doifpositionsonsamepageelse|doifpositiononpageelse|doifpositionelse|doifpositionactionelse|doifpositionaction|doifposition|doifpatternselse|doifpathexistselse|doifpathelse|doifparentfileelse|doifparallelelse|doifoverlayelse|doifoverlappingelse|doifolderversionelse|doifoldercontextelse|doifoddpagefloatelse|doifoddpageelse|doifobjectreferencefoundelse|doifobjectfoundelse|doifnumberelse|doifnumber|doifnotvariable|doifnotvalue|doifnotsetups|doifnotsamestring|doifnotnumber|doifnotmode|doifnotinstring|doifnotinsidesplitfloat|doifnotinset|doifnothingelse|doifnothing|doifnotflagged|doifnotfile|doifnotescollected|doifnoteonsamepageelse|doifnotenv|doifnotemptyvariable|doifnotemptyvalue|doifnotempty|doifnotdocumentvariable|doifnotdocumentfilename|doifnotdocumentargument|doifnotcounter|doifnotcommon|doifnotcommandhandler|doifnotallmodes|doifnotallcommon|doifnot|doifnonzeropositiveelse|doifnextparenthesiselse|doifnextoptionalelse|doifnextoptionalcselse|doifnextcharelse|doifnextbgroupelse|doifnextbgroupcselse|doifmodeelse|doifmode|doifmessageelse|doifmeaningelse|doifmarkingelse|doifmainfloatbodyelse|doiflocfileelse|doiflocationelse|doiflistelse|doifleapyearelse|doiflayouttextlineelse|doiflayoutsomelineelse|doiflayoutdefinedelse|doiflayerdataelse|doiflanguageelse|doifitalicelse|doifintwopassdataelse|doifintokselse|doifinsymbolsetelse|doifinsymbolset|doifinstringelse|doifinstring|doifinsetelse|doifinset|doifinsertionelse|doifinputfileelse|doifinelementelse|doifincsnameelse|doifhelpelse|doifhasspaceelse|doiffontsynonymelse|doiffontpresentelse|doiffontfeatureelse|doiffontcharelse|doifflaggedelse|doiffirstcharelse|doiffileexistselse|doiffileelse|doiffiledefinedelse|doiffile|doiffigureelse|doiffieldcategoryelse|doiffieldbodyelse|doiffastoptionalcheckelse|doiffastoptionalcheckcselse|doifenvelse|doifenv|doifemptyvariableelse|doifemptyvariable|doifemptyvalueelse|doifemptyvalue|doifemptytoks|doifemptyelse|doifempty|doifelsevariable|doifelsevaluenothing|doifelsevalue|doifelseurldefined|doifelseundefined|doifelsetypingfile|doifelsetopofpage|doifelsetextflowcollector|doifelsetextflow|doifelsetext|doifelsesymbolset|doifelsesymboldefined|doifelsestructurelisthaspage|doifelsestructurelisthasnumber|doifelsestringinstring|doifelsesometoks|doifelsesomething|doifelsesomespace|doifelsesomebackground|doifelsesetups|doifelsesamestring|doifelsesamelinereference|doifelserighttoleftinbox|doifelserightpagefloat|doifelserightpage|doifelsereferencefound|doifelsepositionsused|doifelsepositionsonthispage|doifelsepositionsonsamepage|doifelsepositiononpage|doifelsepositionaction|doifelseposition|doifelsepatterns|doifelsepathexists|doifelsepath|doifelseparentfile|doifelseparallel|doifelseoverlay|doifelseoverlapping|doifelseolderversion|doifelseoldercontext|doifelseoddpagefloat|doifelseoddpage|doifelseobjectreferencefound|doifelseobjectfound|doifelsenumber|doifelsenothing|doifelsenoteonsamepage|doifelsenonzeropositive|doifelsenextparenthesis|doifelsenextoptionalcs|doifelsenextoptional|doifelsenextchar|doifelsenextbgroupcs|doifelsenextbgroup|doifelsemode|doifelsemessage|doifelsemeaning|doifelsemarking|doifelsemarkedpage|doifelsemainfloatbody|doifelselocfile|doifelselocation|doifelselist|doifelseleapyear|doifelselayouttextline|doifelselayoutsomeline|doifelselayoutdefined|doifelselayerdata|doifelselanguage|doifelseitalic|doifelseintwopassdata|doifelseintoks|doifelseinsymbolset|doifelseinstring|doifelseinset|doifelseinsertion|doifelseinputfile|doifelseinelement|doifelseincsname|doifelsehelp|doifelsehasspace|doifelseframed|doifelsefontsynonym|doifelsefontpresent|doifelsefontfeature|doifelsefontchar|doifelseflagged|doifelsefirstchar|doifelsefileexists|doifelsefiledefined|doifelsefile|doifelsefigure|doifelsefieldcategory|doifelsefieldbody|doifelsefastoptionalcheckcs|doifelsefastoptionalcheck|doifelseenv|doifelseemptyvariable|doifelseemptyvalue|doifelseempty|doifelsedrawingblack|doifelsedocumentvariable|doifelsedocumentfilename|doifelsedocumentargument|doifelsedimenstring|doifelsedimension|doifelsedefinedcounter|doifelsedefined|doifelsecurrentsynonymused|doifelsecurrentsynonymshown|doifelsecurrentsortingused|doifelsecurrentfonthasfeature|doifelsecounter|doifelseconversionnumber|doifelseconversiondefined|doifelsecommon|doifelsecommandhandler|doifelsecolor|doifelsebuffer|doifelseboxincache|doifelsebox|doifelseblack|doifelseassignmentcs|doifelseassignment|doifelseallmodes|doifelsealldefined|doifelseallcommon|doifelseMPgraphic|doifelse|doifdrawingblackelse|doifdocumentvariableelse|doifdocumentvariable|doifdocumentfilenameelse|doifdocumentfilename|doifdocumentargumentelse|doifdocumentargument|doifdimenstringelse|doifdimensionelse|doifdefinedelse|doifdefinedcounterelse|doifdefinedcounter|doifdefined|doifcurrentfonthasfeatureelse|doifcounterelse|doifcounter|doifconversionnumberelse|doifconversiondefinedelse|doifcontent|doifcommonelse|doifcommon|doifcommandhandlerelse|doifcommandhandler|doifcolorelse|doifcolor|doifbufferelse|doifboxelse|doifbothsidesoverruled|doifbothsides|doifblackelse|doifassignmentelsecs|doifassignmentelse|doifallmodeselse|doifallmodes|doifalldefinedelse|doifallcommonelse|doifallcommon|doifMPgraphicelse|doif|dogobblesingleempty|dogobbledoubleempty|dogetcommacommandelement|dogetattributeid|dogetattribute|dofastloopcs|doexpandedrecurse|doeassign|dodoublegroupempty|dodoubleemptywithset|dodoubleempty|dodoubleargumentwithset|dodoubleargument|documentvariable|docheckedpair|docheckedpagestate|docheckassignment|doboundtext|doassignempty|doassign|doaddfeature|doadaptrightskip|doadaptleftskip|divides|divideontimes|dividedsize|div|distributedhsize|displaymessage|displaymathematics|displaymath|disabletrackers|disableregime|disableparpositions|disableoutputstream|disablemode|disableexperiments|disabledirectives|dis|directvspacing|directsymbol|directsetup|directsetbar|directselect|directluacode|directlocalframed|directhighlight|directgetboxlly|directgetboxllx|directdummyparameter|directcopyboxfromcache|directconvertedcounter|directcolored|directcolor|directboxfromcache|dimensiontocount|digits|digamma|differentiald|differentialD|diamondsuit|diamond|diameter|dhook|dfrac|devanagarinumerals|determineregistercharacteristics|determinenoflines|determinelistcharacteristics|determineheadnumber|depthstrut|depthspanningtext|depthonlybox|depthofstring|delta|delimitedtext|delimited|definextable|definevspacingamount|definevspacing|definevspace|defineviewerlayer|defineuserdataalternative|defineuserdata|defineunit|definetyping|definetypesetting|definetypescriptsynonym|definetypescriptprefix|definetypeface|definetype|definetwopasslist|definetransparency|definetooltip|definetokenlist|definetextnote|definetextflow|definetextbackground|definetext|definetabulation|definetabulate|definetabletemplate|definesystemvariable|definesystemconstant|definesystemattribute|definesynonyms|definesynonym|definesymbol|definesubformula|definesubfield|definestyleinstance|definestyle|definestartstop|definespotcolor|definesorting|definesort|definesidebar|defineshift|defineseparatorset|defineselector|definesectionlevels|definesectionblock|definesection|definescript|definescale|defineruby|defineresetset|definerenderingwindow|defineregister|definereferenceformat|definereference|definepushsymbol|definepushbutton|defineprogram|defineprofile|defineprocessor|defineprocesscolor|defineprefixset|definepositioning|defineplacement|defineperiodkerning|defineparbuilder|defineparallel|defineparagraphs|defineparagraph|definepapersize|definepalet|definepairedbox|definepagestate|definepageshift|definepageinjectionalternative|definepageinjection|definepagecolumns|definepagechecker|definepagebreak|definepage|defineoverlay|defineoutputroutinecommand|defineoutputroutine|defineornament|definenote|definenarrower|definenamespace|definenamedcolor|definemultitonecolor|definemode|definemixedcolumns|definemessageconstant|definemeasure|definemathunstacked|definemathundertextextensible|definemathunderextensible|definemathunder|definemathtriplet|definemathstyle|definemathstackers|definemathradical|definemathovertextextensible|definemathoverextensible|definemathover|definemathornament|definemathmatrix|definemathframed|definemathfraction|definemathfence|definemathextensible|definemathematics|definemathdoubleextensible|definemathdouble|definemathcommand|definemathcases|definemathalignment|definemathaccent|definemarking|definemarker|definemargindata|definemarginblock|definemakeup|definelowmidhigh|definelowhigh|definelow|definelistextra|definelistalternative|definelist|definelines|definelinenumbering|definelinenote|definelinefiller|definelayout|definelayerpreset|definelayer|definelabelclass|definelabel|defineitems|defineitemgroup|defineintermediatecolor|defineinterlinespace|defineinterfacevariable|defineinterfaceelement|defineinterfaceconstant|defineinteractionmenu|defineinteractionbar|defineinteraction|defineinsertion|defineinitial|defineindenting|defineindentedtext|definehypenationfeatures|definehspace|definehighlight|definehigh|definehelp|defineheadalternative|definehead|definehbox|definegridsnapping|definegraphictypesynonym|defineglobalcolor|definefrozenfont|defineframedtext|defineframedtable|defineframedcontent|defineframed|defineformulaframed|defineformulaalternative|defineformula|definefontsynonym|definefontstyle|definefontsolution|definefontsize|definefontfile|definefontfeature|definefontfamilypreset|definefontfamily|definefontfallback|definefontalternative|definefont|definefloat|definefittingpage|definefirstline|definefiller|definefilesynonym|definefilefallback|definefileconstant|definefiguresymbol|definefieldstack|definefieldcategory|definefieldbodyset|definefieldbody|definefield|definefallbackfamily|definefacingfloat|defineexternalfigure|defineexpandable|defineenumeration|defineeffect|definedfont|definedescription|definedeq|definedelimitedtext|definedataset|definecounter|defineconversionset|defineconversion|definecomplexorsimpleempty|definecomplexorsimple|definecomment|definecommand|definecombinedlist|definecombination|definecolumnsetspan|definecolumnsetarea|definecolumnset|definecolumnbreak|definecolorgroup|definecolor|definecollector|definechemicalsymbol|definechemicals|definechemical|definecharacterspacing|definecharacterkerning|definecharacter|definecapitals|definebutton|definebuffer|definebtxrendering|definebtxregister|definebtxdataset|definebtx|definebreakpoints|definebreakpoint|definebodyfontswitch|definebodyfontenvironment|definebodyfont|defineblock|definebar|definebackground|defineattribute|defineattachment|defineanchor|definealternativestyle|defineactivecharacter|defineaccent|defineTABLEsetup|defineMPinstance|define|defconvertedvalue|defconvertedcommand|defconvertedargument|defcatcodecommand|defaultobjectreference|defaultobjectpage|defaultinterface|decrementvalue|decrementsubpagenumber|decrementpagenumber|decrementedcounter|decrementcounter|decrement|ddots|ddot|dddot|ddagger|ddag|dcurl|dcaron|dbinom|dayspermonth|dayoftheweek|date|datasetvariable|dashv|dashedrightarrow|dashedleftarrow|dasharrow|daleth|dagger|dag|d|cyrilliczhediaeresis|cyrilliczhedescender|cyrilliczhebreve|cyrilliczh|cyrilliczediaeresis|cyrilliczdsc|cyrillicz|cyrillicyu|cyrillicystrstroke|cyrillicystr|cyrillicyo|cyrillicyi|cyrillicyerudiaeresis|cyrillicyat|cyrillicya|cyrillicv|cyrillicushrt|cyrillicumacron|cyrillicuk|cyrillicudoubleacute|cyrillicudiaeresis|cyrillicu|cyrillictshe|cyrillictetse|cyrillictedc|cyrillict|cyrillicshha|cyrillicshch|cyrillicsh|cyrillicsftsn|cyrillicsemisoft|cyrillicsdsc|cyrillicschwadiaeresis|cyrillicschwa|cyrillics|cyrillicr|cyrillicpsi|cyrillicpemidhook|cyrillicp|cyrillicot|cyrillicomegatitlo|cyrillicomegaround|cyrillicomega|cyrillicodiaeresis|cyrillicobarreddiaeresis|cyrillicobarred|cyrillico|cyrillicnje|cyrillicn|cyrillicm|cyrilliclje|cyrilliclittleyusiotified|cyrilliclittleyus|cyrillicl|cyrillicksi|cyrillickoppa|cyrillickje|cyrillickavertstroke|cyrillickastroke|cyrillickahook|cyrillickadc|cyrillickabashkir|cyrillick|cyrillicje|cyrillicizhitsadoublegrave|cyrillicizhitsa|cyrillicishrttail|cyrillicishrt|cyrillicimacron|cyrillicii|cyrillicigrave|cyrillicie|cyrillicidiaeresis|cyrillici|cyrillichrdsn|cyrillichadc|cyrillicha|cyrillich|cyrillicgje|cyrillicgheupturn|cyrillicghestroke|cyrillicghemidhook|cyrillicg|cyrillicfita|cyrillicf|cyrillicery|cyrillicertick|cyrillicerev|cyrillicentail|cyrillicenhook|cyrillicenghe|cyrillicendc|cyrillicemtail|cyrilliceltail|cyrilliceiotified|cyrillicegrave|cyrillicediaeresis|cyrillicebreve|cyrillice|cyrillicdzhe|cyrillicdzeabkhasian|cyrillicdze|cyrillicdje|cyrillicd|cyrillicchevertstroke|cyrillicchekhakassian|cyrillicchediaeresis|cyrillicchedcabkhasian|cyrillicchedc|cyrilliccheabkhasian|cyrillicch|cyrillicc|cyrillicbigyusiotified|cyrillicbigyus|cyrillicb|cyrillicae|cyrillicadiaeresis|cyrillicabreve|cyrillica|cyrillicZHEdiaeresis|cyrillicZHEdescender|cyrillicZHEbreve|cyrillicZH|cyrillicZEdiaeresis|cyrillicZDSC|cyrillicZ|cyrillicYstrstroke|cyrillicYstr|cyrillicYU|cyrillicYO|cyrillicYI|cyrillicYERUdiaeresis|cyrillicYAT|cyrillicYA|cyrillicV|cyrillicUmacron|cyrillicUdoubleacute|cyrillicUdiaeresis|cyrillicUSHRT|cyrillicUK|cyrillicU|cyrillicTSHE|cyrillicTITLO|cyrillicTETSE|cyrillicTEDC|cyrillicT|cyrillicSHHA|cyrillicSHCH|cyrillicSH|cyrillicSFTSN|cyrillicSEMISOFT|cyrillicSDSC|cyrillicSCHWAdiaeresis|cyrillicSCHWA|cyrillicS|cyrillicR|cyrillicPSILIPNEUMATA|cyrillicPSI|cyrillicPEmidhook|cyrillicPALOCHKA|cyrillicPALATALIZATION|cyrillicP|cyrillicOdiaeresis|cyrillicObarreddiaeresis|cyrillicObarred|cyrillicOT|cyrillicOMEGAtitlo|cyrillicOMEGAround|cyrillicOMEGA|cyrillicO|cyrillicNJE|cyrillicN|cyrillicM|cyrillicLJE|cyrillicLITTLEYUSiotified|cyrillicLITTLEYUS|cyrillicL|cyrillicKSI|cyrillicKOPPA|cyrillicKJE|cyrillicKAvertstroke|cyrillicKAstroke|cyrillicKAhook|cyrillicKAbashkir|cyrillicKADC|cyrillicK|cyrillicJE|cyrillicImacron|cyrillicIgrave|cyrillicIdiaeresis|cyrillicIZHITSAdoublegrave|cyrillicIZHITSA|cyrillicISHRTtail|cyrillicISHRT|cyrillicII|cyrillicIE|cyrillicI|cyrillicHRDSN|cyrillicHADC|cyrillicHA|cyrillicH|cyrillicGJE|cyrillicGHEupturn|cyrillicGHEstroke|cyrillicGHEmidhook|cyrillicG|cyrillicFITA|cyrillicF|cyrillicEiotified|cyrillicEgrave|cyrillicEdiaeresis|cyrillicEbreve|cyrillicERtick|cyrillicERY|cyrillicEREV|cyrillicENtail|cyrillicENhook|cyrillicENGHE|cyrillicENDC|cyrillicEMtail|cyrillicELtail|cyrillicE|cyrillicDZHE|cyrillicDZEabkhasian|cyrillicDZE|cyrillicDJE|cyrillicDASIAPNEUMATA|cyrillicD|cyrillicCHEvertstroke|cyrillicCHEkhakassian|cyrillicCHEdiaeresis|cyrillicCHEabkhasian|cyrillicCHEDCabkhasian|cyrillicCHEDC|cyrillicCH|cyrillicC|cyrillicBIGYUSiotified|cyrillicBIGYUS|cyrillicB|cyrillicAdiaeresis|cyrillicAbreve|cyrillicAE|cyrillicA|cwopencirclearrow|curvearrowright|curvearrowleft|currentxtablerow|currentxtablecolumn|currentvalue|currenttime|currentresponses|currentregisterpageuserdata|currentregime|currentproject|currentproduct|currentoutputstream|currentmoduleparameter|currentmessagetext|currentmainlanguage|currentlistsymbol|currentlistentrytitlerendered|currentlistentrytitle|currentlistentryreferenceattribute|currentlistentrypagenumber|currentlistentrynumber|currentlistentrylimitedtext|currentlistentrydestinationattribute|currentlanguage|currentinterface|currentheadnumber|currentfeaturetest|currentenvironment|currentdate|currentcomponent|currentcommalistitem|currentbtxuservariable|currentassignmentlistvalue|currentassignmentlistkey|curlywedge|curlyvee|curlyeqsucc|curlyeqprec|cup|ctxsprint|ctxreport|ctxluacode|ctxluabuffer|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|ctop|cstroke|crlfplaceholder|crlf|crightoverleftarrow|crightarrow|crampedrlap|crampedllap|crampedclap|cramped|counttokens|counttoken|countersubs|correctwhitespace|copyunittext|copytaglabeltext|copysuffixtext|copysetups|copyright|copyprefixtext|copyposition|copyparameters|copypages|copyoperatortext|copymathlabeltext|copylabeltext|copyheadtext|copyfield|copybtxlabeltext|copyboxfromcache|coprod|convertvboxtohbox|convertvalue|convertnumber|convertmonth|convertedsubcounter|converteddimen|convertedcounter|convertcommand|convertargument|continueifinputfile|continuednumber|contentreference|constantnumberargument|constantnumber|constantemptyargument|constantdimenargument|constantdimen|cong|compresult|composedlayer|composedcollector|component|complexorsimpleempty|complexorsimple|complexes|completeregister|completepagenumber|completelistoftables|completelistofsynonyms|completelistofsorts|completelistofpublications|completelistoflogos|completelistofintermezzi|completelistofgraphics|completelistoffigures|completelistofchemicals|completelistofabbreviations|completelist|completeindex|completecontent|completebtxrendering|complement|comparepalet|comparedimensioneps|comparedimension|comparecolorgroup|comment|commalistsize|commalistsentence|commalistelement|combinepages|columnsetspanwidth|columnbreak|column|colorvalue|coloronly|colored|colorcomponents|colorbar|color|colonequals|coloncolonequals|colon|collectexpanded|collectedtext|collect|clubsuit|clonefield|clippedoverlayimage|clip|cleftarrow|cldprocessfile|cldloadfile|cldcontext|cldcommand|classfont|clap|cite|citation|circleonrightarrow|circledequals|circleddash|circledcirc|circledast|circledS|circledR|circlearrowright|circlearrowleft|circeq|circ|chook|chinesenumerals|chinesecapnumerals|chineseallnumerals|chi|chemicaltoptext|chemicaltext|chemicalsymbol|chemicalmidtext|chemicalbottext|chemical|chem|checkvariables|checktwopassdata|checksoundtrack|checkpreviousinjector|checkparameters|checkpage|checknextinjector|checknextindentation|checkmark|checkinjector|checkedstrippedcsname|checkedfiller|checkedchar|checkedblank|checkcharacteralign|check|charwidthlanguage|chardescription|characters|character|chapter|cfrac|centerline|centerednextbox|centeredlastline|centeredbox|centerdot|centerbox|centeraligned|cdots|cdotp|cdotaccent|cdot|ccurl|ccircumflex|ccedilla|ccaron|cbox|catcodetablename|carriagereturn|capital|cap|camel|calligraphic|cacute|button|bullet|buildtextognek|buildtextmacron|buildtextgrave|buildtextcedilla|buildtextbottomdot|buildtextbottomcomma|buildtextaccent|buildmathaccent|btxtextcitation|btxsingularplural|btxsingularorplural|btxsetup|btxsavejournalist|btxremapauthor|btxoneorrange|btxloadjournalist|btxlistcitation|btxlabeltext|btxlabellanguage|btxhybridcite|btxhiddencitation|btxfoundtype|btxfoundname|btxflushsuffix|btxflushauthornormalshort|btxflushauthornormal|btxflushauthorname|btxflushauthorinvertedshort|btxflushauthorinverted|btxflushauthor|btxflush|btxfirstofrange|btxfieldtype|btxfieldname|btxfield|btxexpandedjournal|btxdoifuservariableelse|btxdoifsameaspreviouselse|btxdoifsameaspreviouscheckedelse|btxdoifnot|btxdoifelseuservariable|btxdoifelsesameaspreviouschecked|btxdoifelsesameasprevious|btxdoifelsecombiinlist|btxdoifelse|btxdoifcombiinlistelse|btxdoif|btxdirect|btxdetail|btxauthorfield|btxalwayscitation|btxaddjournal|btxabbreviatedjournal|bstroke|breve|breakhere|breakablethinspace|bpos|boxtimes|boxreference|boxplus|boxofsize|boxminus|boxmarker|boxdot|boxcursor|bowtie|bottomrightbox|bottomleftbox|bottombox|bot|bordermatrix|booleanmodevalue|bookmark|boldslanted|bolditalic|boldface|bold|bodyfontsize|bodyfontenvironmentlist|blockuservariable|blocksynctexfile|blockquote|blockligatures|bleedwidth|bleedheight|bleed|blap|blank|blacktriangleright|blacktriangleleft|blacktriangledown|blacktriangle|blacksquare|blackrules|blackrule|blacklozenge|bitmapimage|binom|bigwedge|bigvee|biguplus|bigudot|bigtriangleup|bigtriangledown|bigtimes|bigstar|bigsquare|bigsqcup|bigsqcap|bigskip|bigr|bigotimes|bigoplus|bigodot|bigm|bigl|biggr|biggm|biggl|bigger|bigg|bigdiamond|bigcup|bigcircle|bigcirc|bigcap|bigbodyfont|big|bhook|between|beth|beta|beforetestandsplitstring|beforesplitstring|because|bbox|bbordermatrix|baselinerightbox|baselinemiddlebox|baselineleftbox|baselinebottom|basegrid|barwedge|barovernorthwestarrow|barleftarrowrightarrowbar|barleftarrow|bar|backslash|backsim|backprime|backgroundline|backgroundimagefill|backgroundimage|background|backepsilon|averagecharwidth|availablehsize|autosetups|autopagestaterealpageorder|autopagestaterealpage|automathematics|autointegral|autoinsertnextspace|autodirvtop|autodirvbox|autodirhbox|autocap|attachment|atrightmargin|atpage|atleftmargin|atilde|at|asymp|astype|ast|assumelongusagecs|assignwidth|assignvalue|assigntranslation|assignifempty|assigndimension|assigndimen|assignalfadimension|aside|asciistr|arrowvert|aringacute|aring|arg|arabicwasallam|arabicvowelyeh|arabicvowelwaw|arabictripledot|arabicstartofrubc|arabicslcm|arabicshighthreedots|arabicsemicolon|arabicsanah|arabicsamvat|arabicsalla|arabicsajdah|arabicsafha|arabicrialsign|arabicray|arabicrasoul|arabicquestion|arabicqala|arabicpoeticverse|arabicpertenthousand|arabicpermille|arabicperiod|arabicpercent|arabicparenright|arabicparenleft|arabicnumerals|arabicnumberabove|arabicnumber|arabicmuhammad|arabicmisra|arabiclowseen|arabiclownoonkasra|arabiclowmeemlong|arabiclettermark|arabicjallajalalouhou|arabichighzain|arabichighyeh|arabichighwaqf|arabichighthalatha|arabichightakhallus|arabichightah|arabichighsmallsafha|arabichighseen|arabichighsallallahou|arabichighsakta|arabichighsajda|arabichighsad|arabichighrubc|arabichighrahmatullahalayhe|arabichighradiallahouanhu|arabichighqif|arabichighqaf|arabichighnoonkasra|arabichighnoon|arabichighnisf|arabichighmeemshort|arabichighmeemlong|arabichighmadda|arabichighlamalef|arabichighjeem|arabichighfootnotemarker|arabichighesala|arabichigheqala|arabichighalayheassallam|arabichighain|arabicfourthroot|arabicfootnotemarker|arabicexnumerals|arabicendofayah|arabicdisputedendofayah|arabicdecimals|arabicdateseparator|arabiccuberoot|arabiccomma|arabicbasmalah|arabicasterisk|arabicallallahou|arabicallah|arabicalayhe|arabicakbar|approxnEq|approxeq|approxEq|approx|applytowords|applytosplitstringwordspaced|applytosplitstringword|applytosplitstringlinespaced|applytosplitstringline|applytosplitstringcharspaced|applytosplitstringchar|applytofirstcharacter|applytocharacters|applyprocessor|applyalternativestyle|apply|appendvalue|appendtoksonce|appendtoks|appendtocommalist|appendgvalue|appendetoks|aogonek|angle|anchor|ampersand|amalg|amacron|alwayscite|alwayscitation|alphabeticnumerals|alpha|allinputpaths|alignmentcharacter|alignhere|alignedline|alignedbox|aligned|alignbottom|aleph|ainvertedbreve|ahook|agrave|aftertestandsplitstring|aftersplitstring|afghanicurrency|aemacron|aeligature|aeacute|adoublegrave|adotbelow|adotaccentmacron|adotaccent|adiaeresismacron|adiaeresis|addvalue|addtocommalist|addtoJSpreamble|addfontpath|addfeature|adaptpapersize|adaptlayout|adaptfontfeature|adaptcollector|acwopencirclearrow|acute|actuarial|actualyear|actualmonth|actualday|activatespacehandler|acircumflextilde|acircumflexhook|acircumflexgrave|acircumflexdotbelow|acircumflexacute|acircumflex|acaron|abrevetilde|abrevehook|abrevegrave|abrevedotbelow|abreveacute|abreve|about|abjadnumerals|abjadnodotnumerals|abjadnaivenumerals|abbreviation|aacute|Zstroke|Zhook|Zeta|Zdotaccent|Zcaron|Zacute|Ytilde|Ymacron|Yhook|Ygrave|Ydotbelow|Ydiaeresis|Ycircumflex|Yacute|Xi|XeTeX|XETEX|Words|Word|WidthSpanningText|Wcircumflex|WORDS|WORD|WEEKDAY|Vvdash|Vert|VerboseNumber|Vdash|VDash|Uuparrow|Utilde|Uring|Upsilon|Updownarrow|Uparrow|Uogonek|Umacron|Uinvertedbreve|Uhungarumlaut|Uhorntilde|Uhornhook|Uhorngrave|Uhorndotbelow|Uhornacute|Uhorn|Uhook|Ugrave|Udoublegrave|Udotbelow|Udiaeresismacron|Udiaeresisgrave|Udiaeresiscaron|Udiaeresisacute|Udiaeresis|Ucircumflex|Ucaron|Ubreve|Uacute|Tstroke|TransparencyHack|Thorn|Thook|Theta|TheNormalizedFontSize|TeX|Tcommaaccent|Tcedilla|Tcaron|Tau|TaBlE|TEX|TABLE|Swarrow|Supset|Subset|Smallcapped|Sigma|Searrow|Scommaaccent|Scircumflex|Schwa|Scedilla|Scaron|ScaledPointsToWholeBigPoints|ScaledPointsToBigPoints|Sacute|S|Rsh|Rrightarrow|Romannumerals|Rinvertedbreve|Rightarrow|Rho|Relbar|ReadFile|Re|Rdsh|Rdoublegrave|Rcommaaccent|Rcaron|Racute|PtToCm|Psi|PropertyLine|PointsToWholeBigPoints|PointsToReal|PointsToBigPoints|Plankconst|PiCTeX|Pi|Phook|Phi|PRAGMA|PPCHTeX|PPCHTEX|PICTEX|PDFcolor|PDFTEX|PDFETEX|P|Otildemacron|Otilde|Ostrokeacute|Ostroke|Oogonekmacron|Oogonek|Omicron|Omega|Omacron|Oinvertedbreve|Ohungarumlaut|Ohorntilde|Ohornhook|Ohorngrave|Ohorndotbelow|Ohornacute|Ohorn|Ohook|Ograve|Odoublegrave|Odotbelow|Odotaccentmacron|Odotaccent|Odiaeresismacron|Odiaeresis|Ocircumflextilde|Ocircumflexhook|Ocircumflexgrave|Ocircumflexdotbelow|Ocircumflexacute|Ocircumflex|Ocaron|Obreve|Oacute|OEligature|Nwarrow|Numbers|Nu|Ntilde|NormalizeTextWidth|NormalizeTextHeight|NormalizeFontWidth|NormalizeFontHeight|Njligature|Ngrave|Neng|Nearrow|Ncommaaccent|Ncaron|Nacute|NJligature|Mu|MetaPost|MetaFun|MetaFont|Mapsto|Mapsfrom|MPy|MPxywhd|MPxy|MPx|MPwhd|MPw|MPvv|MPvariable|MPvar|MPv|MPur|MPul|MPtransparency|MPtext|MPstring|MPrs|MPrightskip|MPrest|MPregion|MPrawvar|MPr|MPposset|MPpositiongraphic|MPpos|MPplus|MPpardata|MPpage|MPp|MPoverlayanchor|MPoptions|MPn|MPmenubuttons|MPls|MPlr|MPll|MPleftskip|MPinclusions|MPh|MPgetposboxes|MPgetmultishape|MPgetmultipars|MPfontsizehskip|MPdrawing|MPd|MPcolumn|MPcoloronly|MPcolor|MPcode|MPc|MPbetex|MPanchor|MPVI|MPIV|MPII|MONTHSHORT|MONTHLONG|MONTH|MKXI|MKVI|MKIX|MKIV|MKII|METAPOST|METAFUN|METAFONT|LuajitTeX|LuaTeX|LuaMetaTeX|Lua|Lstroke|Lsh|Longrightarrow|Longmapsto|Longmapsfrom|Longleftrightarrow|Longleftarrow|Lleftarrow|Ljligature|Leftrightarrow|Leftarrow|Ldsh|Ldotmiddle|Lcommaaccent|Lcaron|Lbar|Lambda|LamSTeX|Lacute|LaTeX|LUATEX|LUAMETATEX|LUAJITTEX|LJligature|LATEX|LAMSTEX|Khook|Kcommaaccent|Kcaron|Kappa|Join|Jcircumflex|Itilde|Istroke|Iota|Iogonek|Imacron|Im|Iinvertedbreve|Ihook|Igrave|Idoublegrave|Idotbelow|Idotaccent|Idiaeresis|Icircumflex|Icaron|Ibreve|Iacute|INRSTEX|IJligature|Hstroke|Hcircumflex|Hcaron|Hat|Gstroke|Greeknumerals|GotoPar|Ghook|GetPar|Gdotaccent|Gcommaaccent|Gcircumflex|Gcaron|Gbreve|Gamma|Game|Gacute|Finv|Fhook|EveryPar|EveryLine|Eulerconst|Etilde|Eth|Eta|Epsilon|Eogonek|Emacron|Einvertedbreve|Ehook|Egrave|Edoublegrave|Edotbelow|Edotaccent|Ediaeresis|Ecircumflextilde|Ecircumflexhook|Ecircumflexgrave|Ecircumflexdotbelow|Ecircumflexacute|Ecircumflex|Ecedilla|Ecaron|Ebreve|Eacute|ETEX|Dzligature|Dzcaronligature|Dstroke|Downarrow|Doteq|Dhook|Delta|Ddownarrow|Dcaron|Dafrican|DZligature|DZcaronligature|Cup|Cstroke|ConvertToConstant|ConvertConstantAfter|Context|ConTeXt|Chook|Chi|Characters|Character|Cdotaccent|Ccircumflex|Ccedilla|Ccaron|Caps|Cap|Cacute|CONTEXT|Bumpeq|Box|Bigr|Bigm|Bigl|Biggr|Biggm|Biggl|Bigg|Big|Bhook|Beta|BeforePar|Atilde|Astroke|Arrowvert|Aringacute|Aring|Aogonek|Angstrom|And|Amacron|AmSTeX|Alphabeticnumerals|Alpha|Ainvertedbreve|Ahook|Agrave|AfterPar|Adoublegrave|Adotbelow|Adotaccentmacron|Adotaccent|Adiaeresismacron|Adiaeresis|Acircumflextilde|Acircumflexhook|Acircumflexgrave|Acircumflexdotbelow|Acircumflexacute|Acircumflex|Acaron|Abrevetilde|Abrevehook|Abrevegrave|Abrevedotbelow|Abreveacute|Abreve|Aacute|AMSTEX|AEmacron|AEligature|AEacute)(?=[^a-zA-Z])",
+ "match" : "\u005C\u005C(zwnj|zwj|zstroke|zhook|zeta|zerowidthspace|zerowidthnobreakspace|zeronumberconversion|zdotaccent|zcaron|zacute|ytilde|ymacron|yiddishnumerals|yhook|ygrave|yen|ydotbelow|ydiaeresis|ycircumflex|yacute|xypos|xxfrac|xtwoheadrightarrow|xtwoheadleftarrow|xtriplerel|xsplitstring|xrightoverleftarrow|xrightleftharpoons|xrightharpoonup|xrightharpoondown|xrightarrow|xrel|xmlverbatim|xmlvalue|xmltofile|xmltobufferverbose|xmltobuffer|xmltext|xmltexentity|xmltag|xmlstrippednolines|xmlstripped|xmlstripnolines|xmlstrip|xmlsnippet|xmlshow|xmlsetup|xmlsetsetup|xmlsetparam|xmlsetpar|xmlsetinjectors|xmlsetfunction|xmlsetentity|xmlsetattribute|xmlsetatt|xmlsave|xmlresetsetups|xmlresetinjectors|xmlresetdocumentsetups|xmlremovesetup|xmlremovedocumentsetup|xmlremapnamespace|xmlremapname|xmlregisterns|xmlregisteredsetups|xmlregistereddocumentsetups|xmlrefatt|xmlraw|xmlpure|xmlprocessfile|xmlprocessdata|xmlprocessbuffer|xmlprettyprinttext|xmlprettyprint|xmlprependsetup|xmlprependdocumentsetup|xmlposition|xmlpos|xmlpath|xmlparam|xmlpar|xmlnonspace|xmlnamespace|xmlname|xmlmapvalue|xmlmain|xmlloadonly|xmlloadfile|xmlloaddirectives|xmlloaddata|xmlloadbuffer|xmllastpar|xmllastmatch|xmllastatt|xmllast|xmlinstalldirective|xmlinlineverbatim|xmlinlineprettyprinttext|xmlinlineprettyprint|xmlinjector|xmlinfo|xmlinclusions|xmlinclusion|xmlinclude|xmlflushtext|xmlflushspacewise|xmlflushpure|xmlflushlinewise|xmlflushdocumentsetups|xmlflushcontext|xmlflush|xmlfirst|xmlfilter|xmlelement|xmldoiftext|xmldoifselfempty|xmldoifnottext|xmldoifnotselfempty|xmldoifnotatt|xmldoifnot|xmldoifelsevalue|xmldoifelsetext|xmldoifelseselfempty|xmldoifelseempty|xmldoifelseatt|xmldoifelse|xmldoifatt|xmldoif|xmldisplayverbatim|xmldirectivesbefore|xmldirectivesafter|xmldirectives|xmldepth|xmldefaulttotext|xmlcount|xmlcontext|xmlconcatrange|xmlconcat|xmlcommand|xmlchecknamespace|xmlchainattdef|xmlchainatt|xmlbeforesetup|xmlbeforedocumentsetup|xmlbadinclusions|xmlattributedef|xmlattribute|xmlattdef|xmlatt|xmlapplyselectors|xmlappendsetup|xmlappenddocumentsetup|xmlall|xmlaftersetup|xmlafterdocumentsetup|xmladdindex|xmapsto|xleftrightharpoons|xleftrightarrow|xleftharpoonup|xleftharpoondown|xleftarrow|xi|xhookrightarrow|xhookleftarrow|xfrac|xequal|xdefconvertedargument|xRightarrow|xLeftrightarrow|xLeftarrow|writetolist|writestatus|writedatatolist|writebetweenlist|wr|wp|wordtonumber|words|wordright|word|withoutpt|widthspanningtext|widthofstring|widetilde|widehat|whitearrowupfrombar|weekday|wedgeeq|wedge|wdofstring|wcircumflex|vspacing|vspace|vsmashed|vsmashbox|vsmash|vpos|vphantom|vpackedbox|vpackbox|vl|viewerlayer|vglue|veryraggedright|veryraggedleft|veryraggedcenter|verticalpositionbar|verticalgrowingbar|vert|version|verbosenumber|verbatimstring|verbatim|veeeq|veebar|vee|vec|vdots|vdash|vboxreference|vartheta|varsigma|varrho|varpi|varphi|varnothing|varkappa|varepsilon|varTheta|validassignment|vDash|utilityregisterlength|utilde|utfupper|utflower|utfchar|usezipfile|useurl|usetypescriptfile|usetypescript|usetexmodule|usesymbols|usesubpath|usestaticMPfigure|usesetupsparameter|userpagenumber|usereferenceparameter|useproject|useprofileparameter|useproduct|usemodule|usemathstyleparameter|useluatable|useluamodule|uselanguageparameter|useinterlinespaceparameter|useindentnextparameter|useindentingparameter|usehyphensparameter|usegridparameter|usefontpath|usefile|usefigurebase|useexternalsoundtrack|useexternalrendering|useexternalfigure|useexternaldocument|useenvironment|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|usedirectory|usecomponent|usecolors|usecitation|usebtxdefinitions|usebtxdataset|usebodyfontparameter|usebodyfont|useblocks|useblankparameter|usealignparameter|useURL|useMPvariables|useMPrun|useMPlibrary|useMPgraphic|useMPenvironmentbuffer|useJSscripts|url|uring|urcorner|upwhitearrow|upuparrows|upsilon|upperrightsinglesixquote|upperrightsingleninequote|upperrightdoublesixquote|upperrightdoubleninequote|upperleftsinglesixquote|upperleftsingleninequote|upperleftdoublesixquote|upperleftdoubleninequote|uppercasing|uppercasestring|uppercased|uplus|upharpoonright|upharpoonleft|updownarrows|updownarrowbar|updownarrow|updateparagraphshapes|updateparagraphproperties|updateparagraphpenalties|updateparagraphdemerits|updasharrow|uparrow|upand|uogonek|untexcommand|untexargument|unstackscripts|unspacestring|unspaced|unspaceargument|unspaceafter|unregisterparwrapper|unregisterhyphenationpattern|unprotected|unknown|unittext|unitslow|unitshigh|unitlanguage|unit|uniqueMPpagegraphic|uniqueMPgraphic|unihex|unhhbox|unframed|unexpandeddocumentvariable|undoassign|undertwoheadrightarrow|undertwoheadleftarrow|understrikes|understrike|underset|underrightharpoonup|underrightharpoondown|underrightarrow|underrandoms|underrandom|underparenttext|underparent|underleftrightarrow|underleftharpoonup|underleftharpoondown|underleftarrow|underdots|underdot|underdashes|underdash|underbrackettext|underbracket|underbracetext|underbrace|underbartext|underbars|underbar|undepthed|undefinevalue|umacron|ulcorner|uinvertedbreve|uhungarumlaut|uhorntilde|uhornhook|uhorngrave|uhorndotbelow|uhornacute|uhorn|uhook|ugrave|uedcatcodecommand|udoublegrave|udots|udotbelow|udiaeresismacron|udiaeresisgrave|udiaeresiscaron|udiaeresisacute|udiaeresis|uconvertnumber|ucircumflex|uchexnumbers|uchexnumber|ucaron|ubreve|uacute|typesetfile|typesetbufferonly|typesetbuffer|typescripttwo|typescriptthree|typescriptprefix|typescriptone|typeinlinebuffer|typefile|typeface|typedefinedbuffer|typebuffer|type|typ|txx|tx|twothirds|twosuperior|twoheaduparrow|twoheadrightarrowtail|twoheadrightarrow|twoheadleftarrow|twoheaddownarrow|twofifths|twodigitrounding|turnediota|ttwoheadrightarrow|ttwoheadleftarrow|ttriplerel|ttraggedright|tstroke|truefontname|truefilename|tripleverticalbar|tripleprime|triplebond|trightoverleftarrow|trightleftharpoons|trightharpoonup|trightharpoondown|trightarrow|triangleright|triangleq|triangleleft|triangledown|triangle|trel|transparent|transparencycomponents|translate|trademark|tracepositions|traceoutputroutines|tracedpagestate|tracedfontname|tracecatcodetables|topskippedbox|toprightbox|toplinebox|topleftbox|topbox|top|tooltip|tolinenote|tochar|to|tmapsto|tleftrightharpoons|tleftrightarrow|tleftharpoonup|tleftharpoondown|tleftarrow|tlap|title|tinyfont|times|tilde|tightlayer|tibetannumerals|threesuperior|threequarter|threeperemspace|threefifths|threeeighths|threedigitrounding|thorn|thookrightarrow|thookleftarrow|thook|thirdofthreeunexpanded|thirdofthreearguments|thirdofsixarguments|thirdoffourarguments|thirdoffivearguments|thinspace|thinrules|thinrule|thickspace|theta|theremainingcharacters|therefore|theorientation|thenormalizedbodyfontsize|thematrix|thefirstcharacter|thedatavalue|thainumerals|thai|textyen|textvisiblespace|textunderscore|texttilde|textsterling|textslash|textrule|textring|textreference|textpm|textplus|textperiod|textpercent|textounce|textormathchars|textormathchar|textohm|textogonek|textnumero|textmultiply|textmu|textminus|textmho|textmath|textmacron|textlognot|textkelvin|texthyphen|texthungarumlaut|texthorizontalbar|texthash|textgrave|textfraction|textflowcollector|texteuro|textellipsis|textdotaccent|textdong|textdollar|textdiv|textdiaeresis|textdegree|textddag|textdag|textcurrency|textcontrolspace|textcomma|textcite|textcitation|textcircumflex|textcircledP|textcent|textcelsius|textcedilla|textcaron|textbullet|textbrokenbar|textbreve|textbraceright|textbraceleft|textbottomdot|textbottomcomma|textbar|textbackslash|textat|textasciitilde|textasciicircum|textampersand|textacute|textAngstrom|texsetup|texdefinition|tex|testtokens|testpagesync|testpageonly|testpage|testfeatureonce|testfeature|testcolumn|testandsplitstring|test|tequal|tcurl|tcommaaccent|tcedilla|tcaron|tbox|tbinom|tau|taglabeltext|taglabellanguage|taggedlabeltexts|taggedctxcommand|tabulaterule|tabulateline|tabulateautorule|tabulateautoline|tRightarrow|tLeftrightarrow|tLeftarrow|systemsetups|systemloglast|systemlogfirst|systemlog|synctexsetfilename|synctexresetfilename|synctexblockfilename|synchronizewhitespace|synchronizestrut|synchronizeoutputstreams|synchronizemarking|synchronizeindenting|synchronizeblank|symbolreference|symbol|switchtointerlinespace|switchtocolor|switchtobodyfont|switchstyleonly|swarrow|swaptypeface|swapmacros|swapface|swapdimens|swapcounts|surdradical|surd|supsetneqq|supsetneq|supseteqq|supseteq|supset|sum|suffixtext|suffixlanguage|succsim|succnsim|succneqq|succneq|succnapprox|succeqq|succeq|succcurlyeq|succapprox|succ|subtractfeature|subsubsubsubsubject|subsubsubsubsection|subsubsubsubject|subsubsubsection|subsubsubject|subsubsection|subsubject|substituteincommalist|subsetneqq|subsetneq|subseteqq|subseteq|subset|subsentence|subsection|subpagenumber|subject|styleinstance|style|strutwd|struttedbox|struthtdp|strutht|strutgap|strutdp|strut|structurevariable|structureuservariable|structuretitle|structurenumber|structurelistuservariable|stripspaces|strippedcsname|stripcharacter|strictdoifnextoptionalelse|strictdoifelsenextoptional|stretched|stopxtablenext|stopxtablehead|stopxtablefoot|stopxtablebody|stopxtable|stopxrowgroup|stopxrow|stopxmlsetups|stopxmlraw|stopxmlinlineverbatim|stopxmldisplayverbatim|stopxgroup|stopxcolumn|stopxcellgroup|stopxcell|stopvtopregister|stopvtop|stopviewerlayer|stopvboxtohboxseparator|stopvboxtohbox|stopvboxregister|stopvbox|stopusingbtxspecification|stopuserdata|stopusemathstyleparameter|stopuseMPgraphic|stopusableMPgraphic|stopunpacked|stopunittext|stopuniqueMPpagegraphic|stopuniqueMPgraphic|stoptyping|stoptypescriptcollection|stoptypescript|stoptransparent|stoptokens|stoptokenlist|stoptitle|stopthematrix|stoptextrule|stoptextmakeup|stoptextflow|stoptextcolorintent|stoptextcolor|stoptextbackgroundmanual|stoptextbackground|stoptext|stoptexdefinition|stoptexcode|stoptaglabeltext|stoptagged|stoptabulatetail|stoptabulatehead|stoptabulate|stoptabletext|stoptabletail|stoptables|stoptablehead|stoptable|stopsymbolset|stopsuffixtext|stopsubsubsubsubsubject|stopsubsubsubsubsection|stopsubsubsubsubject|stopsubsubsubsection|stopsubsubsubject|stopsubsubsection|stopsubsubject|stopsubstack|stopsubsentence|stopsubsection|stopsubjectlevel|stopsubject|stopsubformulas|stopstyle|stopstrut|stopstrictinspectnextcharacter|stopstaticMPgraphic|stopstaticMPfigure|stopstandardmakeup|stopspread|stopsplittext|stopsplitformula|stopspformula|stopspeech|stopspecialitem|stopsimplecolumns|stopsidebar|stopshift|stopshapebox|stopsetups|stopsectionlevel|stopsectionblockenvironment|stopsectionblock|stopsection|stopsdformula|stopscript|stopruby|stoprightaligned|stopreusableMPgraphic|stopregime|stopreferenceprefix|stopreadingfile|stoprawsetups|stoprandomseed|stoprandomized|stopquote|stopquotation|stoppunctuation|stoppublication|stopprotectedcolors|stopprotect|stopproject|stopproduct|stopprocesscommalist|stopprocesscommacommand|stopprocessassignmentlist|stopprocessassignmentcommand|stopprefixtext|stoppostponingnotes|stoppostponing|stoppositive|stoppositionoverlay|stoppositioning|stopplacetable|stopplacepairedbox|stopplacelegend|stopplaceintermezzo|stopplacegraphic|stopplaceformula|stopplacefloat|stopplacefigure|stopplacechemical|stoppath|stoppart|stopparbuilder|stopparagraphscell|stopparagraphs|stopparagraph|stoppar|stoppagemakeup|stoppagelayout|stoppagefigure|stoppagecomment|stoppagecolumns|stoppacked|stopoverprint|stopoverlay|stopoutputstream|stopopposite|stopoperatortext|stopnotmode|stopnotext|stopnotallmodes|stopnointerference|stopnicelyfilledbox|stopnegative|stopnarrower|stopnarrow|stopnamedsubformulas|stopnamedsection|stopmulticolumns|stopmpformula|stopmoduletestsection|stopmodule|stopmodeset|stopmode|stopmixedcolumns|stopmiddlemakeup|stopmiddlealigned|stopmidaligned|stopmdformula|stopmaxaligned|stopmatrix|stopmatrices|stopmathstyle|stopmathmode|stopmathmatrix|stopmathlabeltext|stopmathcases|stopmathalignment|stopmarkpages|stopmarkedcontent|stopmarginrule|stopmarginblock|stopmakeup|stopluasetups|stopluaparameterset|stopluacode|stoplua|stoplocalsetups|stoplocalnotes|stoplocallinecorrection|stoplocalheadsetup|stoplocalfootnotes|stoplinetablehead|stoplinetablecell|stoplinetablebody|stoplinetable|stoplines|stoplinenumbering|stoplinenote|stoplinefiller|stoplinecorrection|stoplinealignment|stopline|stoplegend|stopleftaligned|stoplayout|stoplanguage|stoplabeltext|stopknockout|stopitemize|stopitemgroupcolumns|stopitemgroup|stopitem|stopintertext|stopintermezzotext|stopinterface|stopinteractionmenu|stopinteraction|stopindentedtext|stopindentation|stopimath|stophyphenation|stophighlight|stophiding|stophelptext|stopheadtext|stophead|stophboxregister|stophboxestohbox|stophbox|stophanging|stopgridsnapping|stopgraphictext|stopgoto|stopfrontmatter|stopframedtext|stopframedtable|stopframedrow|stopframedcontent|stopframedcell|stopframed|stopformulas|stopformula|stopfootnote|stopfontsolution|stopfontclass|stopfont|stopfloatcombination|stopfixed|stopfittingpage|stopfiguretext|stopfigure|stopfact|stopfacingfloat|stopexternalfigurecollection|stopextendedcatcodetable|stopexpandedcollect|stopexpanded|stopexceptions|stopenvironment|stopendofline|stopendnote|stopembeddedxtable|stopelement|stopeffect|stopdocument|stopdmath|stopdisplaymath|stopdelimitedtext|stopdelimited|stopcurrentlistentrywrapper|stopcurrentcolor|stopctxfunctiondefinition|stopctxfunction|stopcontextdefinitioncode|stopcontextcode|stopcomponent|stopcomment|stopcombination|stopcolumnsetspan|stopcolumnset|stopcolumns|stopcolorset|stopcoloronly|stopcolorintent|stopcolor|stopcollecting|stopcollect|stopchemicaltext|stopchemical|stopcheckedfences|stopcharacteralign|stopchapter|stopcenteraligned|stopcatcodetable|stopcases|stopbuffer|stopbtxrenderingdefinitions|stopbtxlabeltext|stopboxedcolumns|stopbordermatrix|stopbodymatter|stopblockquote|stopbitmapimage|stopbbordermatrix|stopbar|stopbackmatter|stopbackground|stopattachment|stopaside|stopasciimode|stoparrangedpages|stopappendices|stopallmodes|stopalignment|stopalign|stopXML|stopTY|stopTX|stopTRs|stopTR|stopTN|stopTH|stopTEXpage|stopTEX|stopTDs|stopTD|stopTC|stopTABLEnext|stopTABLEnested|stopTABLEhead|stopTABLEfoot|stopTABLEbody|stopTABLE|stopPARSEDXML|stopMPrun|stopMPpositionmethod|stopMPpositiongraphic|stopMPpage|stopMPinitializations|stopMPinclusions|stopMPextensions|stopMPenvironment|stopMPdrawing|stopMPdefinitions|stopMPcode|stopMPclip|stopMP|stopLUA|stopJSpreamble|stopJScode|stligature|startxtablenext|startxtablehead|startxtablefoot|startxtablebody|startxtable|startxrowgroup|startxrow|startxmlsetups|startxmlraw|startxmlinlineverbatim|startxmldisplayverbatim|startxgroup|startxcolumn|startxcellgroup|startxcell|startvtopregister|startvtop|startviewerlayer|startvboxtohboxseparator|startvboxtohbox|startvboxregister|startvbox|startusingbtxspecification|startuserdata|startusemathstyleparameter|startuseMPgraphic|startusableMPgraphic|startunpacked|startunittext|startuniqueMPpagegraphic|startuniqueMPgraphic|starttyping|starttypescriptcollection|starttypescript|starttransparent|starttokens|starttokenlist|starttitle|startthematrix|starttextrule|starttextmakeup|starttextflow|starttextcolorintent|starttextcolor|starttextbackgroundmanual|starttextbackground|starttext|starttexdefinition|starttexcode|starttaglabeltext|starttagged|starttabulatetail|starttabulatehead|starttabulate|starttabletext|starttabletail|starttables|starttablehead|starttable|startsymbolset|startsuffixtext|startsubsubsubsubsubject|startsubsubsubsubsection|startsubsubsubsubject|startsubsubsubsection|startsubsubsubject|startsubsubsection|startsubsubject|startsubstack|startsubsentence|startsubsection|startsubjectlevel|startsubject|startsubformulas|startstyle|startstrut|startstructurepageregister|startstrictinspectnextcharacter|startstaticMPgraphic|startstaticMPfigure|startstandardmakeup|startspread|startsplittext|startsplitformula|startspformula|startspeech|startspecialitem|startsimplecolumns|startsidebar|startshift|startshapebox|startsetups|startsectionlevel|startsectionblockenvironment|startsectionblock|startsection|startsdformula|startscript|startruby|startrightaligned|startreusableMPgraphic|startregister|startregime|startreferenceprefix|startreadingfile|startrawsetups|startrandomseed|startrandomized|startquote|startquotation|startpunctuation|startpublication|startprotectedcolors|startprotect|startproject|startproduct|startprocesscommalist|startprocesscommacommand|startprocessassignmentlist|startprocessassignmentcommand|startprefixtext|startpostponingnotes|startpostponing|startpositive|startpositionoverlay|startpositioning|startplacetable|startplacepairedbox|startplacelegend|startplaceintermezzo|startplacegraphic|startplaceformula|startplacefloat|startplacefigure|startplacechemical|startpath|startpart|startparbuilder|startparagraphscell|startparagraphs|startparagraph|startpar|startpagemakeup|startpagelayout|startpagefigure|startpagecomment|startpagecolumns|startpacked|startoverprint|startoverlay|startoutputstream|startopposite|startoperatortext|startnotmode|startnotext|startnotallmodes|startnointerference|startnicelyfilledbox|startnegative|startnarrower|startnarrow|startnamedsubformulas|startnamedsection|startmulticolumns|startmpformula|startmoduletestsection|startmodule|startmodeset|startmode|startmixedcolumns|startmiddlemakeup|startmiddlealigned|startmidaligned|startmdformula|startmaxaligned|startmatrix|startmatrices|startmathstyle|startmathmode|startmathmatrix|startmathlabeltext|startmathcases|startmathalignment|startmarkpages|startmarkedcontent|startmarginrule|startmarginblock|startmakeup|startluasetups|startluaparameterset|startluacode|startlua|startlocalsetups|startlocalnotes|startlocallinecorrection|startlocalheadsetup|startlocalfootnotes|startlinetablehead|startlinetablecell|startlinetablebody|startlinetable|startlines|startlinenumbering|startlinenote|startlinefiller|startlinecorrection|startlinealignment|startline|startlegend|startleftaligned|startlayout|startlanguage|startlabeltext|startknockout|startitemize|startitemgroupcolumns|startitemgroup|startitem|startintertext|startintermezzotext|startinterface|startinteractionmenu|startinteraction|startindentedtext|startindentation|startimath|starthyphenation|starthighlight|starthiding|starthelptext|startheadtext|starthead|starthboxregister|starthboxestohbox|starthbox|starthanging|startgridsnapping|startgraphictext|startgoto|startfrontmatter|startframedtext|startframedtable|startframedrow|startframedcontent|startframedcell|startframed|startformulas|startformula|startfootnote|startfontsolution|startfontclass|startfont|startfloatcombination|startfixed|startfittingpage|startfiguretext|startfigure|startfact|startfacingfloat|startexternalfigurecollection|startextendedcatcodetable|startexpandedcollect|startexpanded|startexceptions|startenvironment|startendofline|startendnote|startembeddedxtable|startelement|starteffect|startdocument|startdmath|startdisplaymath|startdelimitedtext|startdelimited|startcurrentlistentrywrapper|startcurrentcolor|startctxfunctiondefinition|startctxfunction|startcontextdefinitioncode|startcontextcode|startcomponent|startcomment|startcombination|startcolumnsetspan|startcolumnset|startcolumns|startcolorset|startcoloronly|startcolorintent|startcolor|startcollecting|startcollect|startchemicaltext|startchemical|startcheckedfences|startcharacteralign|startchapter|startcenteraligned|startcatcodetable|startcases|startbuffer|startbtxrenderingdefinitions|startbtxlabeltext|startboxedcolumns|startbordermatrix|startbodymatter|startblockquote|startbitmapimage|startbbordermatrix|startbar|startbackmatter|startbackground|startattachment|startaside|startasciimode|startarrangedpages|startappendices|startallmodes|startalignment|startalign|startXML|startTY|startTX|startTRs|startTR|startTN|startTH|startTEXpage|startTEX|startTDs|startTD|startTC|startTABLEnext|startTABLEnested|startTABLEhead|startTABLEfoot|startTABLEbody|startTABLE|startPARSEDXML|startMPrun|startMPpositionmethod|startMPpositiongraphic|startMPpage|startMPinitializations|startMPinclusions|startMPextensions|startMPenvironment|startMPdrawing|startMPdefinitions|startMPcode|startMPclip|startMP|startLUA|startJSpreamble|startJScode|stareq|star|stackscripts|stackrel|ssharp|squaredots|square|sqsupsetneq|sqsupseteq|sqsupset|sqsubsetneq|sqsubseteq|sqsubset|sqrt|sqcup|sqcap|spreadhbox|splitstring|splitofftype|splitofftokens|splitoffroot|splitoffpath|splitoffname|splitoffkind|splitofffull|splitoffbase|splitfrac|splitfloat|splitfilename|splitdfrac|splitatperiod|splitatcomma|splitatcolons|splitatcolon|splitatasterisk|sphericalangle|speech|spanishnumerals|spanishNumerals|spadesuit|spaceddigitssymbol|spaceddigitsseparator|spaceddigitsmethod|spaceddigits|space|somewhere|someplace|somenamedheadnumber|somelocalfloat|someline|somekindoftab|someheadnumber|solidus|softhyphen|snaptogrid|smile|smashedvbox|smashedhbox|smashboxed|smashbox|smash|smalltype|smallslantedbold|smallslanted|smallskip|smallnormal|smallitalicbold|smaller|smallcaps|smallcappedromannumerals|smallcappedcharacters|smallboldslanted|smallbolditalic|smallbold|smallbodyfont|small|sloveniannumerals|slovenianNumerals|slong|slicepages|slash|slantedface|slantedbold|slanted|sixthofsixarguments|sixperemspace|singleverticalbar|singlebond|singalcharacteralign|simplereversealignedboxplus|simplereversealignedbox|simplegroupedcommand|simplealignedspreadbox|simplealignedboxplus|simplealignedbox|simeq|sim|signalrightpage|sigma|showwarning|showvariable|showvalue|showtrackers|showtokens|showtimer|showsymbolset|showstruts|showsetupsdefinition|showsetups|showprint|showparwrapperstate|showparentchain|showpalet|showotfcomposition|shownextbox|showminimalbaseline|showmessage|showmargins|showmakeup|showluatables|showlogcategories|showligatures|showligature|showlayoutcomponents|showlayout|showkerning|showjustification|showinjector|showhyphens|showhyphenationtrace|showhelp|showgridsnapping|showgrid|showglyphs|showglyphdata|showframe|showfontstyle|showfontstrip|showfontparameters|showfontkerns|showfontitalics|showfontexpansion|showfontdata|showfont|showexperiments|showedebuginfo|showdirsinmargin|showdirectives|showcounter|showcolorstruts|showcolorset|showcolorgroup|showcolorcomponents|showcolorbar|showcolor|showcharratio|showchardata|showbtxtables|showbtxhashedauthors|showbtxfields|showbtxdatasetfields|showbtxdatasetcompleteness|showbtxdatasetauthors|showboxes|showbodyfontenvironment|showbodyfont|showattributes|showallmakeup|shiftup|shiftdown|shiftbox|sharp|shapedhbox|sfrac|seveneighths|setxvariables|setxvariable|setxvalue|setxmeasure|setwidthof|setvtopregister|setvisualizerfont|setvboxregister|setvariables|setvariable|setvalue|setuxvalue|setuvalue|setupxtable|setupxml|setupwithargumentswapped|setupwithargument|setupwhitespace|setupvspacing|setupviewerlayer|setupversion|setupuserpagenumber|setupuserdataalternative|setupuserdata|setupurl|setupunittext|setupunit|setuptyping|setuptype|setuptoptexts|setuptop|setuptooltip|setuptolerance|setupthinrules|setuptexttexts|setuptextrules|setuptextnote|setuptextflow|setuptextbackground|setuptext|setuptaglabeltext|setuptagging|setuptabulate|setuptables|setupsystem|setupsynonyms|setupsynctex|setupsymbolset|setupsymbols|setupsuffixtext|setupsubpagenumber|setupsubformulas|setupsubformula|setupstyle|setupstrut|setupstretched|setupstartstop|setupspellchecking|setupspacing|setupsorting|setupsidebar|setupshift|setupselector|setupsectionblock|setupscripts|setupscript|setupscale|setups|setupruby|setuprotate|setuprenderingwindow|setupregisters|setupregister|setupreferencing|setupreferencestructureprefix|setupreferenceprefix|setupreferenceformat|setuprealpagenumber|setupquote|setupquotation|setupprograms|setupprofile|setupprocessor|setupprefixtext|setuppositioning|setuppositionbar|setupplacement|setupplaceholder|setupperiods|setupperiodkerning|setupparallel|setupparagraphs|setupparagraphnumbering|setupparagraphintro|setupparagraph|setuppapersize|setuppaper|setuppalet|setuppairedbox|setuppagetransitions|setuppagestate|setuppageshift|setuppagenumbering|setuppagenumber|setuppageinjectionalternative|setuppageinjection|setuppagecomment|setuppagecolumns|setuppagechecker|setupoutputroutine|setupoutput|setuporientation|setupoppositeplacing|setupoperatortext|setupoffsetbox|setupoffset|setupnotes|setupnote|setupnotations|setupnotation|setupnarrower|setupmulticolumns|setupmodule|setupmixedcolumns|setupmathstyle|setupmathstackers|setupmathradical|setupmathornament|setupmathmatrix|setupmathlabeltext|setupmathframed|setupmathfractions|setupmathfraction|setupmathfence|setupmathematics|setupmathcases|setupmathalignment|setupmarking|setupmarginrules|setupmarginrule|setupmarginframed|setupmargindata|setupmarginblock|setupmakeup|setuplowmidhigh|setuplowhigh|setuplow|setuplocalinterlinespace|setuplocalfloats|setuplistextra|setuplistalternative|setuplist|setuplinewidth|setuplinetable|setuplines|setuplinenumbering|setuplinenote|setuplinefillers|setuplinefiller|setuplegend|setuplayouttext|setuplayout|setuplayeredtext|setuplayer|setuplanguage|setuplabeltext|setuplabel|setupitems|setupitemize|setupitemizations|setupitemgroup|setupitaliccorrection|setupinterlinespace|setupinteractionscreen|setupinteractionmenu|setupinteractionbar|setupinteraction|setupinsertion|setupinitial|setupindex|setupindenting|setupindentedtext|setuphyphenmark|setuphyphenation|setuphighlight|setuphigh|setuphelp|setupheadtext|setupheads|setupheadnumber|setupheadertexts|setupheader|setupheadalternative|setuphead|setupglobalreferenceprefix|setupframedtexts|setupframedtext|setupframedtablerow|setupframedtablecolumn|setupframedtable|setupframedcontent|setupframed|setupformulaframed|setupformulae|setupformula|setupforms|setupfootnotes|setupfootertexts|setupfooter|setupfontsolution|setupfonts|setupfontprotrusion|setupfontexpansion|setupfloatsplitting|setupfloats|setupfloatframed|setupfloat|setupfittingpage|setupfirstline|setupfillinrules|setupfillinlines|setupfiller|setupfieldtotalframed|setupfields|setupfieldlabelframed|setupfieldcontentframed|setupfieldcategory|setupfieldbody|setupfield|setupfacingfloat|setupexternalsoundtracks|setupexternalfigures|setupexternalfigure|setupexport|setupexpansion|setupenv|setupenumerations|setupenumeration|setupeffect|setupdocument|setupdirections|setupdescriptions|setupdescription|setupdelimitedtext|setupdataset|setupcounter|setupcontent|setupcomment|setupcombinedlist|setupcombination|setupcolumnsetstart|setupcolumnsetspan|setupcolumnsetlines|setupcolumnsetareatext|setupcolumnsetarea|setupcolumnset|setupcolumns|setupcolors|setupcolor|setupcollector|setupclipping|setupchemicalframed|setupchemical|setupcharacterspacing|setupcharacterkerning|setupcharacteralign|setupcaptions|setupcaption|setupcapitals|setupbutton|setupbuffer|setupbtxrendering|setupbtxregister|setupbtxlist|setupbtxlabeltext|setupbtxdataset|setupbtx|setupbottomtexts|setupbottom|setupbookmark|setupbodyfontenvironment|setupbodyfont|setupblock|setupbleeding|setupblank|setupblackrules|setupbars|setupbar|setupbackgrounds|setupbackground|setupbackend|setupattachments|setupattachment|setuparranging|setupalternativestyles|setupalign|setupTEXpage|setupTABLE|setupMPvariables|setupMPpage|setupMPinstance|setupMPgraphics|setup|setunreferencedobject|setugvalue|setuevalue|settrialtypesetting|settokenlist|settightunreferencedobject|settightstrut|settightreferencedobject|settightobject|settextcontent|settestcrlf|settaggedmetadata|settabular|setsystemmode|setsuperiors|setstrut|setstructurepageregister|setstackbox|setsmallcaps|setsmallbodyfont|setsimplecolumnshsize|setsectionblock|setsecondpasscharacteralign|setscript|setrigidcolumnhsize|setrigidcolumnbalance|setreplacements|setregisterentry|setreferencedobject|setreference|setrandomseed|setprofile|setpositionstrut|setpositionplus|setpositiononly|setpositiondataplus|setpositiondata|setpositionbox|setposition|setperiodkerning|setpercentdimen|setpenalties|setparagraphfreezing|setpagestaterealpageno|setpagestate|setpagereference|setoldstyle|setobject|setnotetext|setnote|setnostrut|setmode|setminus|setmessagetext|setmeasure|setmathstyle|setmarking|setmarker|setmainparbuilder|setmainbodyfont|setluatable|setlocalscript|setlocalhsize|setlinefiller|setlayertext|setlayerframed|setlayer|setitaliccorrection|setinternalrendering|setinterfacevariable|setinterfacemessage|setinterfaceelement|setinterfaceconstant|setinterfacecommand|setinteraction|setinjector|setinitial|sethyphenationfeatures|sethyphenatedurlnormal|sethyphenatedurlbefore|sethyphenatedurlafter|sethboxregister|setgvariables|setgvariable|setgvalue|setgmeasure|setglobalscript|setfractions|setfontstrut|setfontsolution|setfontfeature|setfontcolorsheme|setfont|setflag|setfirstpasscharacteralign|setfirstline|setexpansion|setevariables|setevariable|setevalue|setemeasure|setelementexporttag|setdummyparameter|setdocumentfilename|setdocumentargumentdefault|setdocumentargument|setdirection|setdigitsmanipulation|setdefaultpenalties|setdatavalue|setdataset|setcurrentfontclass|setctxluafunction|setcounterown|setcounter|setcolormodell|setcollector|setcharstrut|setcharacterstripping|setcharacterspacing|setcharacterkerning|setcharactercleaning|setcharactercasing|setcharacteraligndetail|setcharacteralign|setcatcodetable|setcapstrut|setbreakpoints|setboxlly|setboxllx|setbigbodyfont|setbar|setautopagestaterealpageno|setMPvariables|setMPvariable|setMPtext|setMPpositiongraphicrange|setMPpositiongraphic|setMPlayer|setJSpreamble|serifnormal|serifbold|serif|serializedcommalist|serializecommalist|selectblocks|select|seeindex|sectionmark|section|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|searrow|screen|scommaaccent|scircumflex|schwahook|schwa|scedilla|scaron|scale|sbox|savetwopassdata|savetaggedtwopassdata|savenormalmeaning|savecurrentattributes|savecounter|savebuffer|savebtxdataset|savebox|sansserif|sansnormal|sansbold|sans|samplefile|safechar|sacute|rvert|russiannumerals|russianNumerals|runninghbox|runMPbuffer|ruledvtop|ruledvpack|ruledvbox|ruledtpack|ruledtopv|ruledmbox|ruledhpack|ruledhbox|ruby|rtop|rtlvtop|rtlvbox|rtlhbox|rtimes|rrointerval|rrbracket|rrangle|rparent|rotate|rootradical|romanxii|romanxi|romanx|romanviii|romanvii|romanvi|romanv|romannumerals|romanm|romanl|romanix|romaniv|romaniii|romanii|romani|romand|romanc|romanXII|romanXI|romanX|romanVIII|romanVII|romanVI|romanV|romanM|romanL|romanIX|romanIV|romanIII|romanII|romanI|romanD|romanC|roman|rollbutton|rointerval|robustpretocommalist|robustdoifinsetelse|robustdoifelseinset|robustaddtocommalist|rneq|rmoustache|rlointerval|rlap|risingdotseq|rinvertedbreve|rinterval|ring|rightwhitearrow|rightwavearrow|righttopbox|righttoleftvtop|righttoleftvbox|righttolefthbox|righttoleft|rightthreetimes|rightthreearrows|rightsubguillemot|rightsquigarrow|rightskipadaption|rightrightarrows|rightpageorder|rightorleftpageaction|rightmathlabeltext|rightline|rightleftharpoons|rightleftarrows|rightlabeltext|rightheadtext|righthbox|rightharpoonup|rightharpoondown|rightguillemot|rightdasharrow|rightbox|rightbottombox|rightarrowtriangle|rightarrowtail|rightarrowbar|rightarrow|rightangle|rightaligned|right|rhookswarrow|rhooknearrow|rho|rhbox|rgroup|rfloor|rfence|revivefeature|reversevtop|reversevpack|reversevboxcontent|reversevbox|reversetpack|reversehpack|reversehbox|reversedtripleprime|reversedprime|reverseddoubleprime|reuserandomseed|reuseMPgraphic|reusableMPgraphic|retestfeature|restriction|restoreglobalbodyfont|restoreendofline|restorecurrentattributes|restorecounter|restorecatcodes|restorebox|restartcounter|resolvedglyphstyled|resolvedglyphdirect|reshapebox|resetvisualizers|resetvalue|resetuserpagenumber|resetusedsynonyms|resetusedsortings|resettrialtypesetting|resettrackers|resettokenlist|resettimer|resetsystemmode|resetsymbolset|resetsubpagenumber|resetshownsynonyms|resetsetups|resetscript|resetreplacements|resetreference|resetrecurselevel|resetprofile|resetperiodkerning|resetpenalties|resetpath|resetparallel|resetpagenumber|resetmode|resetmarking|resetmarker|resetlocalfloats|resetlayer|resetitaliccorrection|resetinteractionmenu|resetinjector|resethyphenationfeatures|resetfontsolution|resetfontfallback|resetfontcolorsheme|resetflag|resetfeature|resetdirection|resetdigitsmanipulation|resetctxscanner|resetcounter|resetcollector|resetcharacterstripping|resetcharacterspacing|resetcharacterkerning|resetcharacteralign|resetbuffer|resetbreakpoints|resetboxesincache|resetbar|resetandaddfeature|resetallattributes|resetMPinstance|resetMPenvironment|resetMPdrawing|rescanwithsetup|rescan|replaceword|replaceincommalist|replacefeature|repeathead|removeunwantedspaces|removetoks|removesubstring|removepunctuation|removemarkedcontent|removelastspace|removelastskip|removefromcommalist|removedepth|removebottomthings|remark|remainingcharacters|relbar|relaxvalueifundefined|relateparameterhandlers|relatemarking|regular|registerunit|registersynonym|registersort|registerparwrapperreverse|registerparwrapper|registermenubuttons|registerhyphenationpattern|registerhyphenationexception|registerfontclass|registerexternalfigure|registered|registerctxluafile|registerattachment|referring|referencesymbol|referencerealpage|referenceprefix|referencepagestate|referencepagedetail|referencecolumnnumber|reference|ref|redoconvertfont|recursestring|recurselevel|recursedepth|realsmallcapped|reals|realpagenumber|realSmallcapped|realSmallCapped|readxmlfile|readtexfile|readsysfile|readsetfile|readlocfile|readjobfile|readfixfile|readfile|rdoublegrave|rcommaaccent|rceil|rcaron|rbracket|rbrace|rbox|rawsubcountervalue|rawstructurelistuservariable|rawprocesscommalist|rawprocesscommacommand|rawprocessaction|rawgetparameters|rawdoifinsetelse|rawdoifinset|rawdoifelseinset|rawdate|rawcountervalue|rawcounter|rationals|rangle|randomnumber|randomizetext|raisebox|raggedwidecenter|raggedright|raggedleft|raggedcenter|raggedbottom|racute|rVert|quotesinglebase|quotesingle|quoteright|quoteleft|quotedblright|quotedblleft|quotedblbase|quotedbl|quote|quotation|quittypescriptscanning|quitprevcommalist|quitcommalist|questionedeq|questiondown|quarterstrut|quads|quadrupleprime|quad|qquad|putnextboxincache|putboxincache|pushsystemmode|pushoutputstream|pushmode|pushmacro|pushbutton|pushattribute|purenumber|punctuationspace|psi|pseudosmallcapped|pseudoSmallcapped|pseudoSmallCapped|pseudoMixedCapped|propto|project|program|profilegivenbox|profiledbox|product|prod|processyear|processxtablebuffer|processuntil|processtokens|processtexbuffer|processseparatedlist|processranges|processmonth|processlist|processlinetablefile|processlinetablebuffer|processisolatedwords|processisolatedchars|processfirstactioninset|processfileonce|processfilenone|processfilemany|processfile|processcontent|processcommalistwithparameters|processcommalist|processcommacommand|processcolorcomponents|processbodyfontenvironmentlist|processblocks|processbetween|processassignmentlist|processassignmentcommand|processassignlist|processallactionsinset|processaction|processMPfigurefile|processMPbuffer|procent|primes|prime|prevuserpagenumber|prevuserpage|prevsubpagenumber|prevsubpage|prevsubcountervalue|prevrealpagenumber|prevrealpage|preventmode|prevcountervalue|prevcounter|prettyprintbuffer|pretocommalist|presetunittext|presettaglabeltext|presetsuffixtext|presetprefixtext|presetoperatortext|presetmathlabeltext|presetlabeltext|presetheadtext|presetfieldsymbols|presetdocument|presetbtxlabeltext|prerollblank|prependvalue|prependtoksonce|prependtoks|prependtocommalist|prependgvalue|prependetoks|prefixtext|prefixlanguage|prefixedpagenumber|predefinesymbol|predefinefont|predefinedfont|precsim|precnsim|precneqq|precneq|precnapprox|preceqq|preceq|preccurlyeq|precapprox|prec|postponenotes|positivesign|positionregionoverlay|positionoverlay|position|popsystemmode|popmode|popmacro|popattribute|pm|placetable|placesubformula|placesidebyside|placerenderingwindow|placeregister|placerawlist|placerawheadtext|placerawheadnumber|placerawheaddata|placeparallel|placepairedbox|placepagenumber|placeontopofeachother|placeongrid|placenotes|placenamedformula|placenamedfloat|placement|placelocalnotes|placelocalfootnotes|placelistoftables|placelistofsynonyms|placelistofsorts|placelistofpublications|placelistoflogos|placelistofintermezzi|placelistofgraphics|placelistoffigures|placelistofchemicals|placelistofabbreviations|placelist|placelegend|placelayeredtext|placelayer|placeintermezzo|placeinitial|placeindex|placeholder|placehelp|placeheadtext|placeheadnumber|placegraphic|placeframed|placeformula|placefootnotes|placefloatwithsetups|placefloatcaption|placefloat|placefigure|placedbox|placecurrentformulanumber|placecontent|placecomments|placecombinedlist|placecitation|placechemical|placebtxrendering|placebookmarks|placeattachments|pitchfork|pickupgroupedcommand|pi|phook|phi|phantombox|phantom|perthousand|persianthousandsseparator|persiannumerals|persiandecimalseparator|persiandecimals|perp|permitspacesbetweengroups|permitcircumflexescape|permitcaretescape|periods|periodcentered|percentdimen|percent|pdfeTeX|pdfcolor|pdfbackendsetshade|pdfbackendsetpattern|pdfbackendsetpagesattribute|pdfbackendsetpageresource|pdfbackendsetpageattribute|pdfbackendsetname|pdfbackendsetinfo|pdfbackendsetextgstate|pdfbackendsetcolorspace|pdfbackendsetcatalog|pdfbackendcurrentresources|pdfbackendactualtext|pdfactualtext|pdfTeX|partial|part|parallel|paragraphmark|paletsize|pagestaterealpageorder|pagestaterealpage|pagereference|pagenumber|pageinjection|pagefigure|pagebreak|pagearea|page|owns|overtwoheadrightarrow|overtwoheadleftarrow|overstrikes|overstrike|overset|overrightharpoonup|overrightharpoondown|overrightarrow|overparentunderparent|overparenttext|overparent|overloaderror|overleftrightarrow|overleftharpoonup|overleftharpoondown|overleftarrow|overlaywidth|overlayrollbutton|overlayoffset|overlaylinewidth|overlaylinecolor|overlayimage|overlayheight|overlayfigure|overlaydepth|overlaycolor|overlaybutton|overbracketunderbracket|overbrackettext|overbracket|overbraceunderbrace|overbracetext|overbrace|overbarunderbar|overbartext|overbars|overbar|over|outputstreamunvcopy|outputstreamunvbox|outputstreamcopy|outputstreambox|outputfilename|otimes|otildemacron|otilde|ostrokeacute|ostroke|oslash|ornamenttext|ordmasculine|ordinalstr|ordinaldaynumber|ordfeminine|oplus|operatortext|operatorlanguage|oogonekmacron|oogonek|onethird|onesuperior|onesixth|onequarter|onehalf|onefifth|oneeighth|onedigitrounding|ominus|omicron|omega|omacron|oinvertedbreve|ointctrclockwise|ointclockwise|oint|oiint|oiiint|ohungarumlaut|ohorntilde|ohornhook|ohorngrave|ohorndotbelow|ohornacute|ohorn|ohook|ohm|ograve|offsetbox|offset|oeligature|odoublegrave|odotbelow|odotaccentmacron|odotaccent|odot|odiaeresismacron|odiaeresis|octstringtonumber|octnumber|ocircumflextilde|ocircumflexhook|ocircumflexgrave|ocircumflexdotbelow|ocircumflexacute|ocircumflex|ocaron|obreve|obox|objectwidth|objectmargin|objectheight|objectdepth|obeydepth|oacute|nwsearrow|nwarrow|nvrightarrow|nvleftrightarrow|nvleftarrow|nvdash|nvDash|numbers|numberofpoints|nu|ntrianglerighteq|ntriangleright|ntrianglelefteq|ntriangleleft|ntimes|ntilde|nsupseteq|nsupset|nsucccurlyeq|nsucc|nsubseteq|nsubset|nsqsupseteq|nsqsubseteq|nsimeq|nsim|nrightarrow|npreccurlyeq|nprec|nparallel|nowns|notragged|notopandbottomlines|notin|notesymbol|note|not|nospace|normaltypeface|normalslantedface|normalizetextwidth|normalizetextline|normalizetextheight|normalizetextdepth|normalizefontwidth|normalizefontline|normalizefontheight|normalizefontdepth|normalizedfontsize|normalizebodyfontsize|normalitalicface|normalframedwithsettings|normalboldface|normal|nonvalidassignment|nonmathematics|nonfrenchspacing|noitem|noindentation|nohyphens|noheightstrut|noheaderandfooterlines|noflocalfloats|noflinesinbox|noflines|noffigurepages|nodetostring|nocite|nocitation|nocharacteralign|nocap|nobreakspace|nobar|nni|nmid|nlesssim|nlessgtr|nless|nleq|nleftrightarrow|nleftarrow|njligature|nin|nihongo|ni|ngtrsim|ngtrless|ngtr|ngrave|ngeq|nextuserpagenumber|nextuserpage|nextsubpagenumber|nextsubpage|nextsubcountervalue|nextrealpagenumber|nextrealpage|nextparagraphs|nextdepth|nextcountervalue|nextcounter|nextboxwd|nextboxhtdp|nextboxht|nextboxdp|nextbox|nexists|newsystemmode|newsignal|newmode|newluatable|newfrenchspacing|newevery|newcounter|newcatcodetable|newattribute|neswarrow|nequiv|neq|neng|negthinspace|negenspace|negemspace|negativesign|negated|negatecolorbox|neg|nearrow|ne|ndivides|ncurl|ncong|ncommaaccent|ncaron|naturalwd|naturalvtop|naturalvpack|naturalvcenter|naturalvbox|naturaltpack|naturalnumbers|naturalhpack|naturalhbox|natural|nasymp|narrownobreakspace|napproxEq|napprox|napostrophe|namedtaggedlabeltexts|namedstructurevariable|namedstructureuservariable|namedstructureheadlocation|namedheadnumber|nacute|nabla|nVrightarrow|nVleftrightarrow|nVleftarrow|nVdash|nVDash|nRightarrow|nLeftrightarrow|nLeftarrow|nHuparrow|nHdownarrow|multimap|mu|mtwoheadrightarrow|mtwoheadleftarrow|mtriplerel|mtext|mrightoverleftarrow|mrightleftharpoons|mrightharpoonup|mrightharpoondown|mrightarrow|mrel|mprandomnumber|mp|monthshort|monthlong|month|mononormal|monobold|mono|molecule|moduleparameter|models|mmapsto|mleftrightharpoons|mleftrightarrow|mleftharpoonup|mleftharpoondown|mleftarrow|mkvibuffer|mixedcaps|mirror|minuscolon|minus|minimalhbox|midsubsentence|midhbox|middlebox|middlealigned|middle|midaligned|mid|mhookrightarrow|mhookleftarrow|mho|mhbox|mfunctionlabeltext|mfunction|mframed|mfence|message|mequal|menubutton|medspace|medskip|measuredeq|measuredangle|measured|measure|mcframed|mbox|maxaligned|mathwordtf|mathwordsl|mathwordit|mathwordbs|mathwordbi|mathwordbf|mathword|mathupright|mathunder|mathtt|mathtriplet|mathtf|mathtexttf|mathtextsl|mathtextit|mathtextbs|mathtextbi|mathtextbf|mathtext|mathss|mathsl|mathscript|mathrm|mathpercent|mathover|mathop|mathlabeltexts|mathlabeltext|mathlabellanguage|mathitalic|mathit|mathhyphen|mathhash|mathfunction|mathfraktur|mathematics|mathdouble|mathdollar|mathdefault|mathbs|mathblackboard|mathbi|mathbf|mathampersand|math|mat|markreferencepage|markpage|markinjector|marking|markedpages|markcontent|margintext|margindata|mapsup|mapsto|mapsfrom|mapsdown|mapfontsize|maltese|makestrutofbox|makerawcommalist|makecharacteractive|mainlanguage|mRightarrow|mLeftrightarrow|mLeftarrow|m|lvert|luaversion|luasetup|luaparameterset|luaminorversion|luametaTeX|luamajorversion|luajitTeX|luafunction|luaexpr|luaexpanded|luaenvironment|luaconditional|luacode|luaTeX|ltrvtop|ltrvbox|ltrhbox|ltop|ltimes|lt|lstroke|lrtbbox|lrointerval|lrcorner|lparent|lozenge|lowerrightsingleninequote|lowerrightdoubleninequote|lowerleftsingleninequote|lowerleftdoubleninequote|lowercasing|lowercasestring|lowercased|lowerbox|low|lor|looparrowright|looparrowleft|longrightsquigarrow|longrightarrow|longmapsto|longmapsfrom|longleftrightarrow|longleftarrow|lomihi|lointerval|lohi|logo|locfilename|locatefilepath|locatedfilepath|localundefine|localpushmacro|localpushbox|localpopmacro|localpopbox|localhsize|localframedwithsettings|localframed|loadtypescriptfile|loadtexfileonce|loadtexfile|loadspellchecklist|loadluafileonce|loadluafile|loadfontgoodies|loadcldfileonce|loadcldfile|loadbtxreplacementfile|loadbtxdefinitionfile|loadanyfileonce|loadanyfile|lnsim|lnot|lneqq|lneq|lnapprox|lmoustache|llointerval|llless|lll|llcorner|llbracket|llap|llangle|ll|ljligature|literalmode|listnamespaces|listlength|listcite|listcitation|linterval|linethickness|linespanningtext|linenote|linefillervtop|linefillervbox|linefillerhbox|linefeed|linebox|line|limitatetext|limitatelines|limitatefirstline|lhooksearrow|lhooknwarrow|lhbox|lgroup|lfloor|lfence|letvaluerelax|letvalueempty|letvalue|letterunderscore|lettertilde|letterspacing|letterslash|lettersinglequote|letterrightparenthesis|letterrightbracket|letterrightbrace|letterquestionmark|letterpercent|letteropenbrace|lettermore|letterless|letterleftparenthesis|letterleftbracket|letterleftbrace|letterhat|letterhash|letterexclamationmark|letterescape|letteregroup|letterdoublequote|letterdollar|lettercolon|letterclosebrace|letterbgroup|letterbar|letterbackslash|letterat|letterampersand|letgvalurelax|letgvalueempty|letgvalue|letempty|letdummyparameter|letcsnamecsname|letcsnamecs|letcscsname|letcatcodecommand|letbeundefined|lesssim|lessgtr|lesseqqgtr|lesseqgtr|lessdot|lessapprox|leqslant|leqq|leq|leftwhitearrow|leftwavearrow|lefttorightvtop|lefttorightvbox|lefttorighthbox|lefttoright|lefttopbox|leftthreetimes|leftsubguillemot|leftsquigarrow|leftskipadaption|leftrightsquigarrow|leftrightharpoons|leftrightarrowtriangle|leftrightarrows|leftrightarrow|leftorrightvtop|leftorrightvbox|leftorrighthbox|leftmathlabeltext|leftline|leftleftarrows|leftlabeltext|leftheadtext|lefthbox|leftharpoonup|leftharpoondown|leftguillemot|leftdasharrow|leftbox|leftbottombox|leftarrowtriangle|leftarrowtail|leftarrow|leftaligned|left|leadsto|le|ldots|ldotp|ldotmiddle|lcurl|lcommaaccent|lchexnumbers|lchexnumber|lceil|lcaron|lbracket|lbrace|lbox|lbar|lazysavetwopassdata|lazysavetaggedtwopassdata|layerwidth|layerheight|layeredtext|latin|lateluacode|lastuserpagenumber|lastuserpage|lasttwodigits|lastsubpagenumber|lastsubpage|lastsubcountervalue|lastrealpagenumber|lastrealpage|lastpredefinedsymbol|lastparwrapper|lastnaturalboxwd|lastnaturalboxht|lastnaturalboxdp|lastlinewidth|lastdigit|lastcountervalue|lastcounter|languagecharwidth|languagecharacters|languageCharacters|language|langle|land|lambdabar|lambda|lacute|labeltexts|labeltext|labellanguage|lVert|koreanparentnumerals|koreannumeralsp|koreannumeralsc|koreannumerals|koreancirclenumerals|kkra|khook|kerncharacters|keepunwantedspaces|keeplinestogether|keepblocks|kcommaaccent|kcaron|kappa|kap|jobfilesuffix|jobfilename|jmath|jcircumflex|jcaron|itilde|itemtag|items|item|italicface|italiccorrection|italicbold|italic|iota|iogonek|invokepagehandler|invisibletimes|intop|interwordspacesbefore|interwordspacesafter|interwordspaces|interwordspacebefore|interwordspaceafter|intertext|intercal|interactionmenu|interactionbuttons|interactionbar|integers|integerrounding|intclockwise|int|installversioninfo|installunitsspace|installunitsseparator|installtopframerenderer|installtextracker|installtexdirective|installswitchsetuphandler|installswitchcommandhandler|installstyleandcolorhandler|installsimpleframedcommandhandler|installsimplecommandhandler|installshipoutmethod|installsetuponlycommandhandler|installsetuphandler|installrootparameterhandler|installrightframerenderer|installprotectedctxscanner|installprotectedctxfunction|installparentinjector|installparametersethandler|installparameterhashhandler|installparameterhandler|installpagearrangement|installoutputroutine|installnamespace|installmacrostack|installleftframerenderer|installlanguage|installglobalmacrostack|installframedcommandhandler|installframedautocommandhandler|installdirectstyleandcolorhandler|installdirectsetuphandler|installdirectparametersethandler|installdirectparameterhandler|installdirectcommandhandler|installdefinitionsetmember|installdefinitionset|installdefinehandler|installctxscanner|installctxfunction|installcorenamespace|installcommandhandler|installbottomframerenderer|installbasicparameterhandler|installbasicautosetuphandler|installautosetuphandler|installautocommandhandler|installattributestack|installanddefineactivecharacter|installactivecharacter|installactionhandler|inspectluatable|insertpages|inrightmargin|inrightedge|inright|inputgivenfile|inputfilesuffix|inputfilerealsuffix|inputfilename|inputfilebarename|input|inoutermargin|inouteredge|inouter|inother|innerflushshapebox|inmframed|inmargin|inlinerange|inlineprettyprintbuffer|inlineordisplaymath|inlinemessage|inlinemathematics|inlinemath|inlinedbox|inlinebuffer|inline|inleftmargin|inleftedge|inleft|initializeboxstack|ininnermargin|ininneredge|ininner|inhibitblank|inheritparameter|infull|infty|inframed|infofontbold|infofont|index|indentation|incrementvalue|incrementsubpagenumber|incrementpagenumber|incrementedcounter|incrementcounter|increment|includeversioninfo|includesvgfile|includesvgbuffer|includemenu|in|imply|implies|impliedby|immediatesavetwopassdata|imath|imaginaryj|imaginaryi|imacron|ijligature|iinvertedbreve|iintop|iint|iiintop|iiint|iiiintop|iiiint|ihook|igrave|ignorevalue|ignoretagsinexport|ignoreimplicitspaces|iftrialtypesetting|ifparameters|ifinoutputstream|ifinobject|iff|ifassignment|idxfromluatable|idoublegrave|idotbelow|idotaccent|idiaeresis|ideographicspace|ideographichalffillspace|icircumflex|icaron|ibreve|ibox|iacute|hyphenatedword|hyphenatedurl|hyphenatedpar|hyphenatedhbox|hyphenatedfilename|hyphenatedfile|hyphenatedcoloredword|hyphen|htofstring|htdpofstring|hstroke|hspace|hsmashed|hsmashbox|hsmash|hslash|hsizefraction|hpos|hphantom|hpackedbox|hpackbox|horizontalpositionbar|horizontalgrowingbar|hookrightarrow|hookleftarrow|hl|himilo|hilo|highordinalstr|highlight|high|hideblocks|hiddencite|hiddencitation|hiddenbar|hglue|hexstringtonumber|hexnumber|helptext|heightspanningtext|heightofstring|heightanddepthofstring|hebrewnumerals|hebrewZayin|hebrewYod|hebrewVav|hebrewTsadifinal|hebrewTsadi|hebrewTet|hebrewTav|hebrewShin|hebrewSamekh|hebrewResh|hebrewQof|hebrewPefinal|hebrewPe|hebrewNunfinal|hebrewNun|hebrewMemfinal|hebrewMem|hebrewLamed|hebrewKaffinal|hebrewKaf|hebrewHet|hebrewHe|hebrewGimel|hebrewDalet|hebrewBet|hebrewAyin|hebrewAlef|heartsuit|headwidth|headvbox|headtextwidth|headtexts|headtextdistance|headtextcontent|headtext|headsetupspacing|headreferenceattributes|headnumberwidth|headnumberdistance|headnumbercontent|headnumber|headlanguage|headhbox|hdofstring|hcircumflex|hcaron|hboxreference|hboxofvbox|hbar|hat|hash|hanzi|hangul|handwritten|handletokens|halfwaybox|halfstrut|halflinestrut|hairspace|hairline|gurmurkhinumerals|gujaratinumerals|guilsingleright|guilsingleleft|gtrsim|gtrless|gtreqqless|gtreqless|gtrdot|gtrapprox|gt|gstroke|gsetboxlly|gsetboxllx|groupedcommand|grid|greekzeta|greekxi|greekvaria|greekupsilonvrachy|greekupsilonvaria|greekupsilontonos|greekupsilonpsilivaria|greekupsilonpsilitonos|greekupsilonpsiliperispomeni|greekupsilonpsili|greekupsilonperispomeni|greekupsilonoxia|greekupsilonmacron|greekupsilondialytikavaria|greekupsilondialytikatonos|greekupsilondialytikaperispomeni|greekupsilondiaeresis|greekupsilondasiavaria|greekupsilondasiatonos|greekupsilondasiaperispomeni|greekupsilondasia|greekupsilon|greektonos|greekthetaalt|greektheta|greektau|greekstigma|greeksigmalunate|greeksigma|greeksampi|greekrhopsili|greekrhodasia|greekrhoalt|greekrho|greekpsilivaria|greekpsiliperispomeni|greekpsili|greekpsi|greekprosgegrammeni|greekpialt|greekpi|greekphialt|greekphi|greekperispomeni|greekoxia|greekomicronvaria|greekomicrontonos|greekomicronpsilivaria|greekomicronpsilitonos|greekomicronpsili|greekomicronoxia|greekomicrondasiavaria|greekomicrondasiatonos|greekomicrondasia|greekomicron|greekomegavaria|greekomegatonos|greekomegapsilivaria|greekomegapsilitonos|greekomegapsiliperispomeni|greekomegapsili|greekomegaperispomeni|greekomegaoxia|greekomegaiotasubvaria|greekomegaiotasubtonos|greekomegaiotasubpsilivaria|greekomegaiotasubpsilitonos|greekomegaiotasubpsiliperispomeni|greekomegaiotasubpsili|greekomegaiotasubperispomeni|greekomegaiotasubdasiavaria|greekomegaiotasubdasiatonos|greekomegaiotasubdasiaperispomeni|greekomegaiotasubdasia|greekomegaiotasub|greekomegadasiavaria|greekomegadasiatonos|greekomegadasiaperispomeni|greekomegadasia|greekomega|greeknumkoppa|greeknumerals|greeknu|greekmu|greeklambda|greekkoppa|greekkappa|greekiotavrachy|greekiotavaria|greekiotatonos|greekiotapsilivaria|greekiotapsilitonos|greekiotapsiliperispomeni|greekiotapsili|greekiotaperispomeni|greekiotaoxia|greekiotamacron|greekiotadialytikavaria|greekiotadialytikatonos|greekiotadialytikaperispomeni|greekiotadialytika|greekiotadasiavaria|greekiotadasiatonos|greekiotadasiaperispomeni|greekiotadasia|greekiota|greekgamma|greekfinalsigma|greeketavaria|greeketatonos|greeketapsilivaria|greeketapsilitonos|greeketapsiliperispomeni|greeketapsili|greeketaperispomeni|greeketaoxia|greeketaiotasubvaria|greeketaiotasubtonos|greeketaiotasubpsilivaria|greeketaiotasubpsilitonos|greeketaiotasubpsiliperispomeni|greeketaiotasubpsili|greeketaiotasubperispomeni|greeketaiotasubdasiavaria|greeketaiotasubdasiatonos|greeketaiotasubdasiaperispomeni|greeketaiotasubdasia|greeketaiotasub|greeketadasiavaria|greeketadasiatonos|greeketadasiaperispomeni|greeketadasia|greeketa|greekepsilonvaria|greekepsilontonos|greekepsilonpsilivaria|greekepsilonpsilitonos|greekepsilonpsili|greekepsilonoxia|greekepsilondasiavaria|greekepsilondasiatonos|greekepsilondasia|greekepsilonalt|greekepsilon|greekdigamma|greekdialytikavaria|greekdialytikatonos|greekdialytikaperispomeni|greekdelta|greekdasiavaria|greekdasiaperispomeni|greekdasia|greekchi|greekbetaalt|greekbeta|greekalphavrachy|greekalphavaria|greekalphatonos|greekalphapsilivaria|greekalphapsilitonos|greekalphapsiliperispomeni|greekalphapsili|greekalphaperispomeni|greekalphaoxia|greekalphamacron|greekalphaiotasubvaria|greekalphaiotasubtonos|greekalphaiotasubpsilivaria|greekalphaiotasubpsilitonos|greekalphaiotasubpsiliperispomeni|greekalphaiotasubpsili|greekalphaiotasubperispomeni|greekalphaiotasubdasiavaria|greekalphaiotasubdasiatonos|greekalphaiotasubdasiaperispomeni|greekalphaiotasubdasia|greekalphaiotasub|greekalphadasiavaria|greekalphadasiatonos|greekalphadasiaperispomeni|greekalphadasia|greekalpha|greekZeta|greekXi|greekUpsilonvrachy|greekUpsilonvaria|greekUpsilontonos|greekUpsilonmacron|greekUpsilondialytika|greekUpsilondasiavaria|greekUpsilondasiatonos|greekUpsilondasiaperispomeni|greekUpsilondasia|greekUpsilon|greekTheta|greekTau|greekSigmalunate|greekSigma|greekRhodasia|greekRho|greekPsi|greekPi|greekPhi|greekOmicronvaria|greekOmicrontonos|greekOmicronpsilivaria|greekOmicronpsilitonos|greekOmicronpsili|greekOmicrondasiavaria|greekOmicrondasiatonos|greekOmicrondasia|greekOmicron|greekOmegavaria|greekOmegatonos|greekOmegapsilivaria|greekOmegapsilitonos|greekOmegapsiliperispomeni|greekOmegapsili|greekOmegaiotasubpsilivaria|greekOmegaiotasubpsilitonos|greekOmegaiotasubpsiliperispomeni|greekOmegaiotasubpsili|greekOmegaiotasubdasiavaria|greekOmegaiotasubdasiatonos|greekOmegaiotasubdasiaperispomeni|greekOmegaiotasubdasia|greekOmegaiotasub|greekOmegadasiavaria|greekOmegadasiatonos|greekOmegadasiaperispomeni|greekOmegadasia|greekOmega|greekNu|greekMu|greekLambda|greekKappa|greekIotavrachy|greekIotavaria|greekIotatonos|greekIotapsilivaria|greekIotapsilitonos|greekIotapsiliperispomeni|greekIotapsili|greekIotamacron|greekIotadialytika|greekIotadasiavaria|greekIotadasiatonos|greekIotadasiaperispomeni|greekIotadasia|greekIota|greekGamma|greekEtavaria|greekEtatonos|greekEtapsilivaria|greekEtapsilitonos|greekEtapsiliperispomeni|greekEtapsili|greekEtaiotasubpsilivaria|greekEtaiotasubpsilitonos|greekEtaiotasubpsiliperispomeni|greekEtaiotasubpsili|greekEtaiotasubdasiavaria|greekEtaiotasubdasiatonos|greekEtaiotasubdasiaperispomeni|greekEtaiotasubdasia|greekEtaiotasub|greekEtadasiavaria|greekEtadasiatonos|greekEtadasiaperispomeni|greekEtadasia|greekEta|greekEpsilonvaria|greekEpsilontonos|greekEpsilonpsilivaria|greekEpsilonpsilitonos|greekEpsilonpsili|greekEpsilondasiavaria|greekEpsilondasiatonos|greekEpsilondasia|greekEpsilon|greekDelta|greekCoronis|greekChi|greekBeta|greekAlphavrachy|greekAlphavaria|greekAlphatonos|greekAlphapsilivaria|greekAlphapsilitonos|greekAlphapsiliperispomeni|greekAlphapsili|greekAlphamacron|greekAlphaiotasubpsilivaria|greekAlphaiotasubpsilitonos|greekAlphaiotasubpsiliperispomeni|greekAlphaiotasubpsili|greekAlphaiotasubdasiavaria|greekAlphaiotasubdasiatonos|greekAlphaiotasubdasiaperispomeni|greekAlphaiotasubdasia|greekAlphaiotasub|greekAlphadasiavaria|greekAlphadasiatonos|greekAlphadasiaperispomeni|greekAlphadasia|greekAlpha|greedysplitstring|grayvalue|graycolor|grave|grabuntil|grabbufferdatadirect|grabbufferdata|gotopage|gotobox|goto|godown|gobbleuntilrelax|gobbleuntil|gobbletwooptionals|gobbletwoarguments|gobblethreeoptionals|gobblethreearguments|gobbletenarguments|gobblespacetokens|gobblesixarguments|gobblesingleempty|gobblesevenarguments|gobbleoneoptional|gobbleoneargument|gobbleninearguments|gobblefouroptionals|gobblefourarguments|gobblefiveoptionals|gobblefivearguments|gobbleeightarguments|gobbledoubleempty|gnsim|gneqq|gnapprox|glyphfontfile|globalundefine|globalswapmacros|globalswapdimens|globalswapcounts|globalpushmacro|globalpushbox|globalprocesscommalist|globalpreventmode|globalpopmacro|globalpopbox|globalletempty|globalenablemode|globaldisablemode|gimel|gggtr|ggg|gg|getxparameters|getvariabledefault|getvariable|getvalue|getuvalue|getuserdata|gettwopassdatalist|gettwopassdata|gettokenlist|getsubstring|gets|getroundednoflines|getreferenceentry|getreference|getrawxparameters|getrawparameters|getrawnoflines|getrawgparameters|getraweparameters|getrandomseed|getrandomnumber|getrandomfloat|getrandomdimen|getrandomcount|getprivateslot|getprivatechar|getparwrapper|getparameters|getpaletsize|getobjectdimensions|getobject|getnoflines|getnaturaldimensions|getnamedtwopassdatalist|getnamedglyphstyled|getnamedglyphdirect|getmessage|getmarking|getlocalfloats|getlocalfloat|getlasttwopassdata|getinlineuserdata|getgparameters|getglyphstyled|getglyphdirect|getfromtwopassdata|getfromluatable|getfromcommalist|getfromcommacommand|getfirsttwopassdata|getfirstcharacter|getfiguredimensions|getexpandedparameters|geteparameters|getemptyparameters|getdummyparameters|getdocumentfilename|getdocumentargumentdefault|getdocumentargument|getdefinedbuffer|getdayspermonth|getdayoftheweek|getdatavalue|getcommalistsize|getcommacommandsize|getbufferdata|getbuffer|getboxlly|getboxllx|getboxfromcache|getMPlayer|getMPdrawing|geqslant|geqq|geq|ge|gdotaccent|gdefconvertedcommand|gdefconvertedargument|gcommaaccent|gcircumflex|gcaron|gbreve|gamma|gacute|frule|frozenhbox|frown|fromlinenote|from|frenchspacing|freezeparagraphproperties|freezemeasure|freezedimenmacro|framedtext|framedparameter|frameddimension|framed|frac|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourperemspace|fourfifths|foundbox|formulanumber|formula|forgetragged|forgetparwrapper|forgetparskip|forgetparameters|forgetparagraphfreezing|forgeteverypar|forcelocalfloats|forcecharacterstripping|forall|footnotetext|footnote|fontstyle|fontsize|fontfeaturelist|fontface|fontclassname|fontclass|fontcharbyindex|fontchar|fontbody|fontalternative|flushtoks|flushtokens|flushtextflow|flushshapebox|flushoutputstream|flushnotes|flushnextbox|flushlocalfloats|flushlayer|flushedrightlastline|flushcollector|flushboxregister|flushbox|floatuserdataparameter|flligature|flat|flag|fixedspaces|fixedspace|fivesixths|fiveeighths|fittopbaselinegrid|fitfieldframed|fitfield|firstuserpagenumber|firstuserpage|firstsubpagenumber|firstsubpage|firstsubcountervalue|firstrealpagenumber|firstrealpage|firstoftwounexpanded|firstoftwoarguments|firstofthreeunexpanded|firstofthreearguments|firstofsixarguments|firstofoneunexpanded|firstofoneargument|firstoffourarguments|firstoffivearguments|firstinlist|firstcountervalue|firstcounter|firstcharacter|finishregisterentry|findtwopassdata|filterreference|filterpages|filterfromvalue|filterfromnext|fillupto|fillintext|fillinrules|fillinline|filler|filledhboxy|filledhboxr|filledhboxm|filledhboxk|filledhboxg|filledhboxc|filledhboxb|filigature|filename|figurewidth|figuresymbol|figurespace|figurenaturalwidth|figurenaturalheight|figureheight|figurefullname|figurefiletype|figurefilepath|figurefilename|fifthofsixarguments|fifthoffivearguments|fieldstack|fieldbody|field|fhook|fflligature|ffligature|ffiligature|fetchtwomarks|fetchtwomarkings|fetchruntinecommand|fetchonemarking|fetchonemark|fetchmarking|fetchmark|fetchallmarks|fetchallmarkings|fenced|fence|feature|fastsxsy|fastswitchtobodyfont|fastsetupwithargumentswapped|fastsetupwithargument|fastsetup|fastscale|fastloopindex|fastloopfinal|fastlocalframed|fastincrement|fastdecrement|fallingdotseq|fakebox|externalfigurecollectionparameter|externalfigurecollectionminwidth|externalfigurecollectionminheight|externalfigurecollectionmaxwidth|externalfigurecollectionmaxheight|externalfigure|exponentiale|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifelse|expdoifcommonelse|expdoif|expandfontsynonym|expandeddoifnot|expandeddoifelse|expandeddoif|expanded|expandcheckedcsname|exitloopnow|exitloop|exists|executeifdefined|exclamdown|eunderparentfill|eunderbracketfill|eunderbracefill|eunderbarfill|etwoheadrightarrowfill|etilde|ethiopic|eth|eta|erightharpoonupfill|erightharpoondownfill|erightarrowfill|equiv|equalscolon|equaldigits|eqslantless|eqslantgtr|eqsim|eqless|eqgtr|eqeqeq|eqeq|eqcirc|eq|epsilon|epos|eoverparentfill|eoverbracketfill|eoverbracefill|eoverbarfill|eogonek|envvar|environment|env|enspace|enskip|enquad|endnote|endash|enabletrackers|enableregime|enableparpositions|enableoutputstream|enablemode|enableexperiments|enabledirectives|enableasciimode|emspace|emquad|emptyset|emptylines|emphasistypeface|emphasisboldface|emdash|emacron|em|ell|eleftrightarrowfill|eleftharpoonupfill|eleftharpoondownfill|eleftarrowfill|elapsedtime|elapsedsteptime|elapsedseconds|einvertedbreve|ehook|egrave|effect|efcparameter|efcminwidth|efcminheight|efcmaxwidth|efcmaxheight|edoublegrave|edotbelow|edotaccent|ediaeresis|edefconvertedargument|ecircumflextilde|ecircumflexhook|ecircumflexgrave|ecircumflexdotbelow|ecircumflexacute|ecircumflex|ecedilla|ecaron|ebreve|eacute|eTeX|dzligature|dzcaronligature|dummyparameter|dummydigit|dtail|dstroke|dpofstring|downzigzagarrow|downwhitearrow|downuparrows|downharpoonright|downharpoonleft|downdownarrows|downdasharrow|downarrow|dowithwargument|dowithrange|dowithpargument|dowithnextboxcs|dowithnextboxcontentcs|dowithnextboxcontent|dowithnextbox|dowith|doubleverticalbar|doubleprime|doubleparent|doublecup|doublecap|doublebracket|doublebrace|doublebond|doublebar|dottedrightarrow|dottedcircle|dots|dotriplegroupempty|dotripleemptywithset|dotripleempty|dotripleargumentwithset|dotripleargument|dotplus|dotoks|dotminus|dotlessjstroke|dotlessj|dotlessi|dotlessJ|dotlessI|dotfskip|dotfill|doteqdot|doteq|dot|dosubtractfeature|dostepwiserecurse|dosomebreak|dosixtupleempty|dosixtupleargument|dosinglegroupempty|dosingleempty|dosingleargument|doseventupleempty|doseventupleargument|dosetupcheckedinterlinespace|dosetrightskipadaption|dosetleftskipadaption|dosetattribute|dorotatebox|doresetattribute|doresetandafffeature|doreplacefeature|dorepeatwithcommand|dorecurse|dorechecknextindentation|doquintuplegroupempty|doquintupleempty|doquintupleargument|doquadruplegroupempty|doquadrupleempty|doquadrupleargument|doprocesslocalsetups|dopositionaction|dontpermitspacesbetweengroups|dontleavehmode|dontconvertfont|donothing|doloopoverlist|doloop|dollar|doindentation|doifvariableelse|doifvariable|doifvaluesomething|doifvaluenothingelse|doifvaluenothing|doifvalueelse|doifvalue|doifurldefinedelse|doifunknownfontfeature|doifundefinedelse|doifundefinedcounter|doifundefined|doiftypingfileelse|doiftopofpageelse|doiftextflowelse|doiftextflowcollectorelse|doiftextelse|doiftext|doifsymbolsetelse|doifsymboldefinedelse|doifstructurelisthaspageelse|doifstructurelisthasnumberelse|doifstringinstringelse|doifsometokselse|doifsometoks|doifsomethingelse|doifsomething|doifsomespaceelse|doifsomebackgroundelse|doifsomebackground|doifsetupselse|doifsetups|doifsamestringelse|doifsamestring|doifsamelinereferenceelse|doifrighttoleftinboxelse|doifrightpagefloatelse|doifrightpageelse|doifreferencefoundelse|doifpositionsusedelse|doifpositionsonthispageelse|doifpositionsonsamepageelse|doifpositiononpageelse|doifpositionelse|doifpositionactionelse|doifpositionaction|doifposition|doifpatternselse|doifpathexistselse|doifpathelse|doifparentfileelse|doifparallelelse|doifoverlayelse|doifoverlappingelse|doifoutervmode|doifolderversionelse|doifoldercontextelse|doifoddpagefloatelse|doifoddpageelse|doifobjectreferencefoundelse|doifobjectfoundelse|doifnumberelse|doifnumber|doifnotvariable|doifnotvalue|doifnotsetups|doifnotsamestring|doifnotnumber|doifnotmode|doifnotinstring|doifnotinsidesplitfloat|doifnotinset|doifnothingelse|doifnothing|doifnotflagged|doifnotfile|doifnotescollected|doifnoteonsamepageelse|doifnotenv|doifnotemptyvariable|doifnotemptyvalue|doifnotempty|doifnotdocumentvariable|doifnotdocumentfilename|doifnotdocumentargument|doifnotcounter|doifnotcommon|doifnotcommandhandler|doifnotallmodes|doifnotallcommon|doifnot|doifnonzeropositiveelse|doifnextparenthesiselse|doifnextoptionalelse|doifnextoptionalcselse|doifnextcharelse|doifnextbgroupelse|doifnextbgroupcselse|doifmodeelse|doifmode|doifmessageelse|doifmeaningelse|doifmarkingelse|doifmainfloatbodyelse|doiflocfileelse|doiflocationelse|doiflistelse|doifleapyearelse|doiflayouttextlineelse|doiflayoutsomelineelse|doiflayoutdefinedelse|doiflayerdataelse|doiflanguageelse|doifitalicelse|doifintwopassdataelse|doifintokselse|doifinsymbolsetelse|doifinsymbolset|doifinstringelse|doifinstring|doifinsetelse|doifinset|doifinsertionelse|doifinputfileelse|doifinelementelse|doifincsnameelse|doifhelpelse|doifhasspaceelse|doiffontsynonymelse|doiffontpresentelse|doiffontfeatureelse|doiffontcharelse|doifflaggedelse|doiffirstcharelse|doiffileexistselse|doiffileelse|doiffiledefinedelse|doiffile|doiffigureelse|doiffieldcategoryelse|doiffieldbodyelse|doiffastoptionalcheckelse|doiffastoptionalcheckcselse|doifenvelse|doifenv|doifemptyvariableelse|doifemptyvariable|doifemptyvalueelse|doifemptyvalue|doifemptytoks|doifemptyelse|doifempty|doifelsevariable|doifelsevaluenothing|doifelsevalue|doifelseurldefined|doifelseundefined|doifelsetypingfile|doifelsetopofpage|doifelsetextflowcollector|doifelsetextflow|doifelsetext|doifelsesymbolset|doifelsesymboldefined|doifelsestructurelisthaspage|doifelsestructurelisthasnumber|doifelsestringinstring|doifelsesometoks|doifelsesomething|doifelsesomespace|doifelsesomebackground|doifelsesetups|doifelsesamestring|doifelsesamelinereference|doifelserighttoleftinbox|doifelserightpagefloat|doifelserightpage|doifelsereferencefound|doifelsepositionsused|doifelsepositionsonthispage|doifelsepositionsonsamepage|doifelsepositiononpage|doifelsepositionaction|doifelseposition|doifelsepatterns|doifelsepathexists|doifelsepath|doifelseparwrapper|doifelseparentfile|doifelseparallel|doifelseoverlay|doifelseoverlapping|doifelseorientation|doifelseolderversion|doifelseoldercontext|doifelseoddpagefloat|doifelseoddpage|doifelseobjectreferencefound|doifelseobjectfound|doifelsenumber|doifelsenothing|doifelsenoteonsamepage|doifelsenonzeropositive|doifelsenextparenthesis|doifelsenextoptionalcs|doifelsenextoptional|doifelsenextchar|doifelsenextbgroupcs|doifelsenextbgroup|doifelsemode|doifelsemessage|doifelsemeaning|doifelsemarking|doifelsemarkedpage|doifelsemarkedcontent|doifelsemainfloatbody|doifelselocfile|doifelselocation|doifelselist|doifelseleapyear|doifelselayouttextline|doifelselayoutsomeline|doifelselayoutdefined|doifelselayerdata|doifelselanguage|doifelseitalic|doifelseintwopassdata|doifelseintoks|doifelseinsymbolset|doifelseinstring|doifelseinset|doifelseinsertion|doifelseinputfile|doifelseinelement|doifelseindented|doifelseincsname|doifelsehelp|doifelsehasspace|doifelseframed|doifelsefontsynonym|doifelsefontpresent|doifelsefontfeature|doifelsefontchar|doifelseflagged|doifelsefirstchar|doifelsefileexists|doifelsefiledefined|doifelsefile|doifelsefigure|doifelsefieldcategory|doifelsefieldbody|doifelsefastoptionalcheckcs|doifelsefastoptionalcheck|doifelseenv|doifelseemptyvariable|doifelseemptyvalue|doifelseempty|doifelsedrawingblack|doifelsedocumentvariable|doifelsedocumentfilename|doifelsedocumentargument|doifelsedimenstring|doifelsedimension|doifelsedefinedcounter|doifelsedefined|doifelsecurrentsynonymused|doifelsecurrentsynonymshown|doifelsecurrentsortingused|doifelsecurrentfonthasfeature|doifelsecounter|doifelseconversionnumber|doifelseconversiondefined|doifelsecommon|doifelsecommandhandler|doifelsecolor|doifelsebuffer|doifelseboxincache|doifelsebox|doifelseblack|doifelseassignmentcs|doifelseassignment|doifelseallmodes|doifelsealldefined|doifelseallcommon|doifelseMPgraphic|doifelse|doifdrawingblackelse|doifdocumentvariableelse|doifdocumentvariable|doifdocumentfilenameelse|doifdocumentfilename|doifdocumentargumentelse|doifdocumentargument|doifdimenstringelse|doifdimensionelse|doifdefinedelse|doifdefinedcounterelse|doifdefinedcounter|doifdefined|doifcurrentfonthasfeatureelse|doifcounterelse|doifcounter|doifconversionnumberelse|doifconversiondefinedelse|doifcontent|doifcommonelse|doifcommon|doifcommandhandlerelse|doifcommandhandler|doifcolorelse|doifcolor|doifcheckedpagestate|doifbufferelse|doifboxelse|doifbothsidesoverruled|doifbothsides|doifblackelse|doifassignmentelsecs|doifassignmentelse|doifallmodeselse|doifallmodes|doifalldefinedelse|doifallcommonelse|doifallcommon|doifMPgraphicelse|doif|dohyphens|dogobblesingleempty|dogobbledoubleempty|dogetcommacommandelement|dogetattributeid|dogetattribute|dofastloopcs|doexpandedrecurse|doeassign|dodoublegroupempty|dodoubleemptywithset|dodoubleempty|dodoubleargumentwithset|dodoubleargument|documentvariable|docheckedpair|docheckassignment|doboundtext|doassignempty|doassign|doaddfeature|doadaptrightskip|doadaptleftskip|divides|divideontimes|dividedsize|div|distributedhsize|disposeluatable|displaymessage|displaymathematics|displaymath|disabletrackers|disableregime|disableparpositions|disableoutputstream|disablemode|disableexperiments|disabledirectives|dis|directvspacing|directsymbol|directsetup|directsetbar|directselect|directparwrapper|directluacode|directlocalframed|directhighlight|directgetboxlly|directgetboxllx|directdummyparameter|directcopyboxfromcache|directconvertedcounter|directcolored|directcolor|directboxfromcache|dimensiontocount|digits|digamma|differentiald|differentialD|diamondsuit|diamond|diameter|dhook|dfrac|devanagarinumerals|determineregistercharacteristics|determinenoflines|determinelistcharacteristics|determineheadnumber|depthstrut|depthspanningtext|depthonlybox|depthofstring|delta|delimitedtext|delimited|defrostparagraphproperties|definextable|definevspacingamount|definevspacing|definevspace|defineviewerlayer|defineuserdataalternative|defineuserdata|defineunit|definetyping|definetypesetting|definetypescriptsynonym|definetypescriptprefix|definetypeface|definetype|definetwopasslist|definetransparency|definetooltip|definetokenlist|definetextnote|definetextflow|definetextbackground|definetext|definetabulate|definetabletemplate|definesystemvariable|definesystemconstant|definesystemattribute|definesynonyms|definesynonym|definesymbol|definesubformula|definesubfield|definestyleinstance|definestyle|definestartstop|definespotcolor|definesorting|definesort|definesidebar|defineshift|defineseparatorset|defineselector|definesectionlevels|definesectionblock|definesection|definescript|definescale|defineruby|defineresetset|definerenderingwindow|defineregister|definereferenceformat|definereference|definepushsymbol|definepushbutton|defineprogram|defineprofile|defineprocessor|defineprocesscolor|defineprefixset|definepositioning|defineplacement|defineplaceholder|defineperiodkerning|defineparbuilder|defineparallel|defineparagraphs|defineparagraph|definepapersize|definepalet|definepairedbox|definepagestate|definepageshift|definepageinjectionalternative|definepageinjection|definepagecolumns|definepagechecker|definepagebreak|definepage|defineoverlay|defineoutputroutinecommand|defineoutputroutine|defineornament|defineorientation|definenote|definenarrower|definenamespace|definenamedcolor|definemultitonecolor|definemulticolumns|definemode|definemixedcolumns|definemessageconstant|definemeasure|definemathunstacked|definemathundertextextensible|definemathunderextensible|definemathunder|definemathtriplet|definemathstyle|definemathstackers|definemathradical|definemathovertextextensible|definemathoverextensible|definemathover|definemathornament|definemathmatrix|definemathframed|definemathfraction|definemathfence|definemathextensible|definemathematics|definemathdoubleextensible|definemathdouble|definemathcommand|definemathcases|definemathalignment|definemathaccent|definemarking|definemarker|definemargindata|definemarginblock|definemakeup|definelowmidhigh|definelowhigh|definelow|definelistextra|definelistalternative|definelist|definelines|definelinenumbering|definelinenote|definelinefiller|definelayout|definelayerpreset|definelayer|definelabelclass|definelabel|defineitems|defineitemgroup|defineintermediatecolor|defineinterlinespace|defineinterfacevariable|defineinterfaceelement|defineinterfaceconstant|defineinteractionmenu|defineinteractionbar|defineinteraction|defineinsertion|defineinitial|defineindenting|defineindentedtext|definehyphenationfeatures|definehspace|definehighlight|definehigh|definehelp|defineheadalternative|definehead|definehbox|definegridsnapping|definegraphictypesynonym|defineglobalcolor|definefrozenfont|defineframedtext|defineframedtable|defineframedcontent|defineframed|defineformulaframed|defineformulaalternative|defineformula|definefontsynonym|definefontstyle|definefontsolution|definefontsize|definefontfile|definefontfeature|definefontfamilypreset|definefontfamily|definefontfallback|definefontalternative|definefont|definefloat|definefittingpage|definefirstline|definefiller|definefilesynonym|definefilefallback|definefileconstant|definefiguresymbol|definefieldstack|definefieldcategory|definefieldbodyset|definefieldbody|definefield|definefallbackfamily|definefacingfloat|defineexternalfigure|defineexpansion|defineexpandable|defineenumeration|defineeffect|definedocument|definedfont|definedescription|definedeq|definedelimitedtext|definedate|definedataset|definecounter|defineconversionset|defineconversion|definecomplexorsimpleempty|definecomplexorsimple|definecomment|definecommand|definecombinedlist|definecombination|definecolumnsetspan|definecolumnsetarea|definecolumnset|definecolumnbreak|definecolorgroup|definecolor|definecollector|definechemicalsymbol|definechemicals|definechemical|definecharacterspacing|definecharacterkerning|definecharacter|definecapitals|definebutton|definebuffer|definebtxrendering|definebtxregister|definebtxdataset|definebtx|definebreakpoints|definebreakpoint|definebodyfontswitch|definebodyfontenvironment|definebodyfont|defineblock|definebar|definebackground|defineattribute|defineattachment|defineanchor|definealternativestyle|defineactivecharacter|defineaccent|defineTABLEsetup|defineMPinstance|define|defconvertedvalue|defconvertedcommand|defconvertedargument|defcatcodecommand|defaultobjectreference|defaultobjectpage|defaultinterface|decrementvalue|decrementsubpagenumber|decrementpagenumber|decrementedcounter|decrementcounter|decrement|ddots|ddot|dddot|ddagger|ddag|dcurl|dcaron|dbinom|dayspermonth|dayshort|dayoftheweek|daylong|date|datasetvariable|dashv|dashedrightarrow|dashedleftarrow|dasharrow|daleth|dagger|dag|d|cyrilliczhediaeresis|cyrilliczhedescender|cyrilliczhebreve|cyrilliczh|cyrilliczediaeresis|cyrilliczdsc|cyrillicz|cyrillicyu|cyrillicystrstroke|cyrillicystr|cyrillicyo|cyrillicyi|cyrillicyerudiaeresis|cyrillicyat|cyrillicya|cyrillicv|cyrillicushrt|cyrillicumacron|cyrillicuk|cyrillicudoubleacute|cyrillicudiaeresis|cyrillicu|cyrillictshe|cyrillictetse|cyrillictedc|cyrillict|cyrillicshha|cyrillicshch|cyrillicsh|cyrillicsftsn|cyrillicsemisoft|cyrillicsdsc|cyrillicschwadiaeresis|cyrillicschwa|cyrillics|cyrillicr|cyrillicpsi|cyrillicpemidhook|cyrillicp|cyrillicot|cyrillicomegatitlo|cyrillicomegaround|cyrillicomega|cyrillicodiaeresis|cyrillicobarreddiaeresis|cyrillicobarred|cyrillico|cyrillicnje|cyrillicn|cyrillicm|cyrilliclje|cyrilliclittleyusiotified|cyrilliclittleyus|cyrillicl|cyrillicksi|cyrillickoppa|cyrillickje|cyrillickavertstroke|cyrillickastroke|cyrillickahook|cyrillickadc|cyrillickabashkir|cyrillick|cyrillicje|cyrillicizhitsadoublegrave|cyrillicizhitsa|cyrillicishrttail|cyrillicishrt|cyrillicimacron|cyrillicii|cyrillicigrave|cyrillicie|cyrillicidiaeresis|cyrillici|cyrillichrdsn|cyrillichadc|cyrillicha|cyrillich|cyrillicgje|cyrillicgheupturn|cyrillicghestroke|cyrillicghemidhook|cyrillicg|cyrillicfita|cyrillicf|cyrillicery|cyrillicertick|cyrillicerev|cyrillicentail|cyrillicenhook|cyrillicenghe|cyrillicendc|cyrillicemtail|cyrilliceltail|cyrilliceiotified|cyrillicegrave|cyrillicediaeresis|cyrillicebreve|cyrillice|cyrillicdzhe|cyrillicdzeabkhasian|cyrillicdze|cyrillicdje|cyrillicd|cyrillicchevertstroke|cyrillicchekhakassian|cyrillicchediaeresis|cyrillicchedcabkhasian|cyrillicchedc|cyrilliccheabkhasian|cyrillicch|cyrillicc|cyrillicbigyusiotified|cyrillicbigyus|cyrillicb|cyrillicae|cyrillicadiaeresis|cyrillicabreve|cyrillica|cyrillicZHEdiaeresis|cyrillicZHEdescender|cyrillicZHEbreve|cyrillicZH|cyrillicZEdiaeresis|cyrillicZDSC|cyrillicZ|cyrillicYstrstroke|cyrillicYstr|cyrillicYU|cyrillicYO|cyrillicYI|cyrillicYERUdiaeresis|cyrillicYAT|cyrillicYA|cyrillicV|cyrillicUmacron|cyrillicUdoubleacute|cyrillicUdiaeresis|cyrillicUSHRT|cyrillicUK|cyrillicU|cyrillicTSHE|cyrillicTITLO|cyrillicTETSE|cyrillicTEDC|cyrillicT|cyrillicSHHA|cyrillicSHCH|cyrillicSH|cyrillicSFTSN|cyrillicSEMISOFT|cyrillicSDSC|cyrillicSCHWAdiaeresis|cyrillicSCHWA|cyrillicS|cyrillicR|cyrillicPSILIPNEUMATA|cyrillicPSI|cyrillicPEmidhook|cyrillicPALOCHKA|cyrillicPALATALIZATION|cyrillicP|cyrillicOdiaeresis|cyrillicObarreddiaeresis|cyrillicObarred|cyrillicOT|cyrillicOMEGAtitlo|cyrillicOMEGAround|cyrillicOMEGA|cyrillicO|cyrillicNJE|cyrillicN|cyrillicM|cyrillicLJE|cyrillicLITTLEYUSiotified|cyrillicLITTLEYUS|cyrillicL|cyrillicKSI|cyrillicKOPPA|cyrillicKJE|cyrillicKAvertstroke|cyrillicKAstroke|cyrillicKAhook|cyrillicKAbashkir|cyrillicKADC|cyrillicK|cyrillicJE|cyrillicImacron|cyrillicIgrave|cyrillicIdiaeresis|cyrillicIZHITSAdoublegrave|cyrillicIZHITSA|cyrillicISHRTtail|cyrillicISHRT|cyrillicII|cyrillicIE|cyrillicI|cyrillicHRDSN|cyrillicHADC|cyrillicHA|cyrillicH|cyrillicGJE|cyrillicGHEupturn|cyrillicGHEstroke|cyrillicGHEmidhook|cyrillicG|cyrillicFITA|cyrillicF|cyrillicEiotified|cyrillicEgrave|cyrillicEdiaeresis|cyrillicEbreve|cyrillicERtick|cyrillicERY|cyrillicEREV|cyrillicENtail|cyrillicENhook|cyrillicENGHE|cyrillicENDC|cyrillicEMtail|cyrillicELtail|cyrillicE|cyrillicDZHE|cyrillicDZEabkhasian|cyrillicDZE|cyrillicDJE|cyrillicDASIAPNEUMATA|cyrillicD|cyrillicCHEvertstroke|cyrillicCHEkhakassian|cyrillicCHEdiaeresis|cyrillicCHEabkhasian|cyrillicCHEDCabkhasian|cyrillicCHEDC|cyrillicCH|cyrillicC|cyrillicBIGYUSiotified|cyrillicBIGYUS|cyrillicB|cyrillicAdiaeresis|cyrillicAbreve|cyrillicAE|cyrillicA|cwopencirclearrow|curvearrowright|curvearrowleft|currentxtablerow|currentxtablecolumn|currentvalue|currenttime|currentresponses|currentregisterpageuserdata|currentregime|currentproject|currentproduct|currentoutputstream|currentmoduleparameter|currentmessagetext|currentmainlanguage|currentlistsymbol|currentlistentrytitlerendered|currentlistentrytitle|currentlistentryreferenceattribute|currentlistentrypagenumber|currentlistentrynumber|currentlistentrylimitedtext|currentlistentrydestinationattribute|currentlanguage|currentinterface|currentheadnumber|currentfeaturetest|currentenvironment|currentdate|currentcomponent|currentcommalistitem|currentbtxuservariable|currentassignmentlistvalue|currentassignmentlistkey|curlywedge|curlyvee|curlyeqsucc|curlyeqprec|cup|ctxsprint|ctxreport|ctxluacode|ctxluabuffer|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|ctop|cstroke|crlfplaceholder|crlf|crightoverleftarrow|crightarrow|crampedrlap|crampedllap|crampedclap|cramped|counttokens|counttoken|countersubs|correctwhitespace|copyunittext|copytaglabeltext|copysuffixtext|copysetups|copyright|copyprefixtext|copyposition|copyparameters|copypages|copyoperatortext|copymathlabeltext|copylabeltext|copyheadtext|copyfield|copybtxlabeltext|copyboxfromcache|coprod|convertvboxtohbox|convertvalue|convertnumber|convertmonth|convertedsubcounter|converteddimen|convertedcounter|convertcommand|convertargument|continueifinputfile|continuednumber|contentreference|constantnumberargument|constantnumber|constantemptyargument|constantdimenargument|constantdimen|cong|compresult|compounddiscretionary|composedlayer|composedcollector|component|complexorsimpleempty|complexorsimple|complexes|completeregister|completepagenumber|completelistoftables|completelistofsynonyms|completelistofsorts|completelistofpublications|completelistoflogos|completelistofintermezzi|completelistofgraphics|completelistoffigures|completelistofchemicals|completelistofabbreviations|completelist|completeindex|completecontent|completebtxrendering|complement|comparepalet|comparedimensioneps|comparedimension|comparecolorgroup|comment|commalistsize|commalistsentence|commalistelement|combinepages|columnsetspanwidth|columnbreak|column|colorvalue|coloronly|colored|colorcomponents|colorbar|color|colonequals|coloncolonequals|colon|collectexpanded|collectedtext|collect|clubsuit|clonefield|clippedoverlayimage|clip|cleftarrow|cldprocessfile|cldloadfile|cldcontext|cldcommand|classfont|clap|cite|citation|circleonrightarrow|circledequals|circleddash|circledcirc|circledast|circledS|circledR|circlearrowright|circlearrowleft|circeq|circ|chook|chinesenumerals|chinesecapnumerals|chineseallnumerals|chi|chemicaltoptext|chemicaltext|chemicalsymbol|chemicalmidtext|chemicalbottext|chemical|chem|checkvariables|checktwopassdata|checksoundtrack|checkpreviousinjector|checkparameters|checkpage|checknextinjector|checknextindentation|checkmark|checkinjector|checkedstrippedcsname|checkedfiller|checkedchar|checkedblank|checkcharacteralign|check|charwidthlanguage|chardescription|characters|character|chapter|cfrac|centerline|centerednextbox|centeredlastline|centeredbox|centerdot|centerbox|centeraligned|cdots|cdotp|cdotaccent|cdot|ccurl|ccircumflex|ccedilla|ccaron|cbox|catcodetablename|carriagereturn|capital|cap|camel|calligraphic|cacute|button|bullet|buildtextognek|buildtextmacron|buildtextgrave|buildtextcedilla|buildtextbottomdot|buildtextbottomcomma|buildtextaccent|buildmathaccent|btxtextcitation|btxsingularplural|btxsingularorplural|btxsetup|btxsavejournalist|btxremapauthor|btxoneorrange|btxloadjournalist|btxlistcitation|btxlabeltext|btxlabellanguage|btxhybridcite|btxhiddencitation|btxfoundtype|btxfoundname|btxflushsuffix|btxflushauthornormalshort|btxflushauthornormal|btxflushauthorname|btxflushauthorinvertedshort|btxflushauthorinverted|btxflushauthor|btxflush|btxfirstofrange|btxfieldtype|btxfieldname|btxfield|btxexpandedjournal|btxdoifuservariableelse|btxdoifsameaspreviouselse|btxdoifsameaspreviouscheckedelse|btxdoifnot|btxdoifelseuservariable|btxdoifelsesameaspreviouschecked|btxdoifelsesameasprevious|btxdoifelsecombiinlist|btxdoifelse|btxdoifcombiinlistelse|btxdoif|btxdirect|btxdetail|btxauthorfield|btxalwayscitation|btxaddjournal|btxabbreviatedjournal|bstroke|breve|breakhere|breakablethinspace|bpos|boxtimes|boxreference|boxplus|boxofsize|boxminus|boxmarker|boxdot|boxcursor|bowtie|bottomrightbox|bottomleftbox|bottombox|bot|bordermatrix|booleanmodevalue|bookmark|boldslanted|bolditalic|boldface|bold|bodyfontsize|bodyfontenvironmentlist|blockuservariable|blocksynctexfile|blockquote|blockligatures|bleedwidth|bleedheight|bleed|blap|blank|blacktriangleright|blacktriangleleft|blacktriangledown|blacktriangle|blacksquare|blackrules|blackrule|blacklozenge|bitmapimage|binom|bigwedge|bigvee|biguplus|bigudot|bigtriangleup|bigtriangledown|bigtimes|bigstar|bigsquare|bigsqcup|bigsqcap|bigskip|bigr|bigotimes|bigoplus|bigodot|bigm|bigl|biggr|biggm|biggl|bigger|bigg|bigdiamond|bigcup|bigcircle|bigcirc|bigcap|bigbodyfont|big|bhook|between|beth|beta|beforetestandsplitstring|beforesplitstring|because|bbox|bbordermatrix|baselinerightbox|baselinemiddlebox|baselineleftbox|baselinebottom|basegrid|barwedge|barovernorthwestarrow|barleftarrowrightarrowbar|barleftarrow|bar|backslash|backsim|backprime|backgroundline|backgroundimagefill|backgroundimage|background|backepsilon|averagecharwidth|availablehsize|autosetups|autorule|autopagestaterealpageorder|autopagestaterealpage|autoorientation|automathematics|autointegral|autoinsertnextspace|autodirvtop|autodirvbox|autodirhbox|autocap|attachment|atrightmargin|atpage|atleftmargin|atilde|at|asymp|astype|ast|assumelongusagecs|assignwidth|assignvalue|assigntranslation|assignifempty|assigndimension|assigndimen|assignalfadimension|aside|asciistr|asciimode|arrowvert|aringacute|aring|arg|arabicwasallam|arabicvowelyeh|arabicvowelwaw|arabictripledot|arabicstartofrubc|arabicslcm|arabicshighthreedots|arabicsemicolon|arabicsanah|arabicsamvat|arabicsalla|arabicsajdah|arabicsafha|arabicrialsign|arabicray|arabicrasoul|arabicquestion|arabicqala|arabicpoeticverse|arabicpertenthousand|arabicpermille|arabicperiod|arabicpercent|arabicparenright|arabicparenleft|arabicnumerals|arabicnumberabove|arabicnumber|arabicmuhammad|arabicmisra|arabiclowseen|arabiclownoonkasra|arabiclowmeemlong|arabiclettermark|arabicjallajalalouhou|arabichighzain|arabichighyeh|arabichighwaqf|arabichighthalatha|arabichightakhallus|arabichightah|arabichighsmallsafha|arabichighseen|arabichighsallallahou|arabichighsakta|arabichighsajda|arabichighsad|arabichighrubc|arabichighrahmatullahalayhe|arabichighradiallahouanhu|arabichighqif|arabichighqaf|arabichighnoonkasra|arabichighnoon|arabichighnisf|arabichighmeemshort|arabichighmeemlong|arabichighmadda|arabichighlamalef|arabichighjeem|arabichighfootnotemarker|arabichighesala|arabichigheqala|arabichighalayheassallam|arabichighain|arabicfourthroot|arabicfootnotemarker|arabicexnumerals|arabicendofayah|arabicdisputedendofayah|arabicdecimals|arabicdateseparator|arabiccuberoot|arabiccomma|arabicbasmalah|arabicasterisk|arabicallallahou|arabicallah|arabicalayhe|arabicakbar|approxnEq|approxeq|approxEq|approx|applytowords|applytosplitstringwordspaced|applytosplitstringword|applytosplitstringlinespaced|applytosplitstringline|applytosplitstringcharspaced|applytosplitstringchar|applytofirstcharacter|applytocharacters|applyprocessor|applyalternativestyle|apply|appendvalue|appendtoksonce|appendtoks|appendtocommalist|appendgvalue|appendetoks|aogonek|angle|anchor|ampersand|amalg|amacron|alwayscite|alwayscitation|alphabeticnumerals|alpha|allinputpaths|alignmentcharacter|alignhere|alignedline|alignedbox|aligned|alignbottom|aleph|ainvertedbreve|ahook|agrave|aftertestandsplitstring|aftersplitstring|afghanicurrency|aemacron|aeligature|aeacute|adoublegrave|adotbelow|adotaccentmacron|adotaccent|adiaeresismacron|adiaeresis|addvalue|addtocommalist|addtoJSpreamble|addfeature|adaptpapersize|adaptlayout|adaptfontfeature|adaptcollector|acwopencirclearrow|acute|actuarial|actualyear|actualmonth|actualday|activatespacehandler|acircumflextilde|acircumflexhook|acircumflexgrave|acircumflexdotbelow|acircumflexacute|acircumflex|acaron|abrevetilde|abrevehook|abrevegrave|abrevedotbelow|abreveacute|abreve|about|abjadnumerals|abjadnodotnumerals|abjadnaivenumerals|abbreviation|aacute|Zstroke|Zhook|Zeta|Zdotaccent|Zcaron|Zacute|Ytilde|Ymacron|Yhook|Ygrave|Ydotbelow|Ydiaeresis|Ycircumflex|Yacute|Xi|XeTeX|XETEX|Words|Word|WidthSpanningText|Wcircumflex|WORDS|WORD|WEEKDAY|Vvdash|Vhook|Vert|VerboseNumber|Vdash|VDash|Uuparrow|Utilde|Uring|Upsilon|Updownarrow|Uparrow|Uogonek|Umacron|Uinvertedbreve|Uhungarumlaut|Uhorntilde|Uhornhook|Uhorngrave|Uhorndotbelow|Uhornacute|Uhorn|Uhook|Ugrave|Udoublegrave|Udotbelow|Udiaeresismacron|Udiaeresisgrave|Udiaeresiscaron|Udiaeresisacute|Udiaeresis|Ucircumflex|Ucaron|Ubreve|Uacute|Tstroke|TransparencyHack|Thorn|Thook|Theta|TheNormalizedFontSize|TeX|Tcommaaccent|Tcedilla|Tcaron|Tau|TaBlE|TEX|TABLE|Swarrow|Supset|Subset|Smallcapped|Sigma|Searrow|Scommaaccent|Scircumflex|Schwa|Scedilla|Scaron|ScaledPointsToWholeBigPoints|ScaledPointsToBigPoints|Sacute|S|Rsh|Rrightarrow|Romannumerals|Rinvertedbreve|Rightarrow|Rho|Relbar|ReadFile|Re|Rdsh|Rdoublegrave|Rcommaaccent|Rcaron|Racute|PtToCm|Psi|PropertyLine|PointsToWholeBigPoints|PointsToReal|PointsToBigPoints|Plankconst|PiCTeX|Pi|Phook|Phi|PRAGMA|PPCHTeX|PPCHTEX|PICTEX|PDFcolor|PDFTEX|PDFETEX|P|Otildemacron|Otilde|Ostrokeacute|Ostroke|Oogonekmacron|Oogonek|Omicron|Omega|Omacron|Oinvertedbreve|Ohungarumlaut|Ohorntilde|Ohornhook|Ohorngrave|Ohorndotbelow|Ohornacute|Ohorn|Ohook|Ograve|Odoublegrave|Odotbelow|Odotaccentmacron|Odotaccent|Odiaeresismacron|Odiaeresis|Ocircumflextilde|Ocircumflexhook|Ocircumflexgrave|Ocircumflexdotbelow|Ocircumflexacute|Ocircumflex|Ocaron|Obreve|Oacute|OEligature|Nwarrow|Numbers|Nu|Ntilde|NormalizeTextWidth|NormalizeTextHeight|NormalizeFontWidth|NormalizeFontHeight|Njligature|Ngrave|Neng|Nearrow|Ncommaaccent|Ncaron|Nacute|NJligature|Mu|MetaPost|MetaFun|MetaFont|Mapsto|Mapsfrom|MPy|MPxywhd|MPxy|MPx|MPwhd|MPw|MPvv|MPvariable|MPvar|MPv|MPur|MPul|MPtransparency|MPtext|MPstring|MPrs|MPrightskip|MPrest|MPregion|MPrawvar|MPr|MPposset|MPpositiongraphic|MPpos|MPplus|MPpardata|MPpage|MPp|MPoverlayanchor|MPoptions|MPn|MPmenubuttons|MPls|MPlr|MPll|MPleftskip|MPinclusions|MPh|MPgetposboxes|MPgetmultishape|MPgetmultipars|MPfontsizehskip|MPdrawing|MPd|MPcolumn|MPcoloronly|MPcolor|MPcode|MPc|MPbetex|MPanchor|MPXL|MPVI|MPLX|MPIV|MPII|MONTHSHORT|MONTHLONG|MONTH|MKXL|MKXI|MKVI|MKLX|MKIX|MKIV|MKII|METAPOST|METAFUN|METAFONT|LuajitTeX|LuaTeX|LuaMetaTeX|Lua|Lstroke|Lsh|Longrightarrow|Longmapsto|Longmapsfrom|Longleftrightarrow|Longleftarrow|Lleftarrow|Ljligature|Leftrightarrow|Leftarrow|Ldsh|Ldotmiddle|Lcommaaccent|Lcaron|Lbar|Lambda|LamSTeX|Lacute|LaTeX|LUATEX|LUAMETATEX|LUAJITTEX|LJligature|LATEX|LAMSTEX|Khook|Kcommaaccent|Kcaron|Kappa|Join|Jcircumflex|Itilde|Istroke|Iota|Iogonek|Imacron|Im|Iinvertedbreve|Ihook|Igrave|Idoublegrave|Idotbelow|Idotaccent|Idiaeresis|Icircumflex|Icaron|Ibreve|Iacute|INRSTEX|IJligature|Hstroke|Hcircumflex|Hcaron|Hat|Gstroke|Greeknumerals|GotoPar|Ghook|GetPar|Gdotaccent|Gcommaaccent|Gcircumflex|Gcaron|Gbreve|Gamma|Game|Gacute|Finv|Fhook|EveryPar|EveryLine|Eulerconst|Etilde|Eth|Eta|Epsilon|Eogonek|Emacron|Einvertedbreve|Ehook|Egrave|Edoublegrave|Edotbelow|Edotaccent|Ediaeresis|Ecircumflextilde|Ecircumflexhook|Ecircumflexgrave|Ecircumflexdotbelow|Ecircumflexacute|Ecircumflex|Ecedilla|Ecaron|Ebreve|Eacute|ETEX|Dzligature|Dzcaronligature|Dstroke|Downarrow|Doteq|Dhook|Delta|Ddownarrow|Dcaron|Dafrican|DZligature|DZcaronligature|DAYSHORT|DAYLONG|Cup|Cstroke|ConvertToConstant|ConvertConstantAfter|Context|ConTeXt|Chook|Chi|Characters|Character|Cdotaccent|Ccircumflex|Ccedilla|Ccaron|Caps|Cap|Cacute|CONTEXT|Bumpeq|Box|Bigr|Bigm|Bigl|Biggr|Biggm|Biggl|Bigg|Big|Bhook|Beta|BeforePar|Atilde|Astroke|Arrowvert|Aringacute|Aring|Aogonek|Angstrom|And|Amacron|AmSTeX|Alphabeticnumerals|Alpha|Ainvertedbreve|Ahook|Agrave|AfterPar|Adoublegrave|Adotbelow|Adotaccentmacron|Adotaccent|Adiaeresismacron|Adiaeresis|Acircumflextilde|Acircumflexhook|Acircumflexgrave|Acircumflexdotbelow|Acircumflexacute|Acircumflex|Acaron|Abrevetilde|Abrevehook|Abrevegrave|Abrevedotbelow|Abreveacute|Abreve|Aacute|AMSTEX|AEmacron|AEligature|AEacute)(?=[^a-zA-Z])",
"name" : "context.command.commands.context.tex"
},
"comment" : {
"name" : "context.comment.comment.tex"
},
"constant" : {
- "match" : "\u005C\u005C(zwnj|zwj|zerowidthspace|zerowidthnonjoiner|zerowidthnobreakspace|zerowidthjoiner|zeroskip|zeropoint|zeromuskip|zerocount|xmlcatcodes|xifcode|xetexengine|wildcardsymbol|whatsitnodecode|vtopgroupcode|vrbcatcodes|voidifcode|voidbox|vmodeifcode|vlistnodecode|vcentergroupcode|vboxifcode|vboxgroupcode|vadjustgroupcode|usetexmodule|usemodule|useluamodule|uprotationangle|unsetnodecode|unknownengine|unexpandeddocumentvariable|underscoreasciicode|undefined|typescripttwo|typescriptthree|typescriptone|txtcatcodes|twoperemspace|trueifcode|tpbcatcodes|tpacatcodes|tildeasciicode|threeperemspace|thousandpoint|texengineversion|texenginename|texenginefunctionality|texengine|texcatcodes|tabasciicode|superscriptcatcode|subscriptcatcode|stoptext|stopproject|stopproduct|stopnotmode|stopnotext|stopnotallmodes|stopmodule|stopmodeset|stopmodeset|stopmode|stopmkivmode|stoplmtxmode|stopenvironment|stopdocument|stopcomponent|stopallmodes|stopTEXpage|starttext|startproject|startproduct|startnotmode|startnotext|startnotallmodes|startmodule|startmodeset|startmodeset|startmode|startmkivmode|startlmtxmode|startenvironment|startdocument|startcomponent|startallmodes|startTEXpage|spacecatcode|spaceasciicode|softhyphen|smallskipamount|slantperpoint|sixperemspace|singlequoteasciicode|simplegroupcode|setupmodule|setupdocument|semisimplegroupcode|scrollmodecode|scaledpoint|rulenodecode|rlm|righttoleftmark|rightrotationangle|rightparentasciicode|rightbraceasciicode|questionmarkasciicode|pushmode|punctuationspace|prtcatcodes|project|product|primeasciicode|preventmode|presetdocument|popmode|points|plustwohundred|plustwo|plustwentythousand|plusthree|plusthousand|plustenthousand|plusten|plussixteen|plussix|plusseven|plusonehundred|plusone|plusnine|plushundred|plusfour|plusfivehundred|plusfive|plusfifty|pluseight|pluscxxviii|pluscxxvii|pluscclvi|pluscclv|penaltynodecode|pdftexengine|parfillrightskip|parfillleftskip|parametercatcode|outputnewlinechar|outputgroupcode|othercatcode|optionalspace|onepoint|onemuskip|onebasepoint|oddifcode|numifcode|notcatcodes|normalpagebox|nonstopmodecode|nonbreakablespace|nobreakspace|noaligngroupcode|nilcatcodes|newlineasciicode|narrownobreakspace|muquad|morethanasciicode|moduleparameter|mmodeifcode|mksuffix|minustwo|minusone|medskipamount|medcard|maxdimen|maxcount|maxcardminusone|maxcard|mathsupnormal|mathsupdisplay|mathsupcramped|mathsubnormal|mathsubcombined|mathsnodecode|mathsizesuffix|mathshiftgroupcode|mathshiftcatcode|mathrelcode|mathradicalcode|mathpunctcode|mathordcode|mathopencode|mathopcode|mathnothingcode|mathnolopcode|mathnodecode|mathlimopcode|mathleftgroupcode|mathinnercode|mathgroupcode|mathexheight|mathemwidth|mathclosecode|mathchoicegroupcode|mathchoicecode|mathboxcode|mathbincode|mathaxisheight|mathalphacode|mathaccentcode|marknodecode|luatexengine|luastringsep|luacatcodes|lrm|ligaturenodecode|lettercatcode|lessthanasciicode|lefttorightmark|leftrotationangle|leftparentasciicode|leftbraceasciicode|kernnodecode|invalidcatcode|interwordstretch|interwordspace|interwordshrink|insertnodecode|insertgroupcode|innerifcode|inicatcodes|ignorecatcode|ideographicspace|ideographichalffillspace|hyphenasciicode|hmodeifcode|hlistnodecode|hboxifcode|hboxgroupcode|hashasciicode|halfpoint|halfapoint|hairspace|gluenodecode|globalpreventmode|globalenablemode|globaldisablemode|fourperemspace|forwardslashasciicode|formfeedasciicode|fontslantperpoint|fontinterwordstretch|fontinterwordspace|fontinterwordshrink|fontextraspace|fontexheight|fontemwidth|fontcharifcode|fmtversion|fmtname|fiveperemspace|figurespace|falseifcode|extraspace|exheight|exclamationmarkasciicode|everystoptext|everystarttext|escapecatcode|errorstopmodecode|eofifcode|environment|enquad|endoflinetoken|endoflinecatcode|endoflineasciicode|endoffileasciicode|endline|endgroupcatcode|enablemode|emwidth|emquad|emptyvbox|emptytoks|emptyhbox|emptybox|empty|egroup|eUx|downrotationangle|doublequoteasciicode|doublecommentsignal|dollarasciicode|doifnotmode|doifnotdocumentvariable|doifnotallmodes|doifmodeelse|doifmode|doifelsemode|doifelsedocumentvariable|doifelseallmodes|doifdocumentvariableelse|doifdocumentvariable|doifallmodeselse|doifallmodes|documentvariable|discretionarynodecode|discretionarygroupcode|disablemode|directionrighttoleft|directionlefttoright|dimifcode|delasciicode|definemode|definedifcode|currentmoduleparameter|ctxcatcodes|ctdcatcodes|csnameifcode|continueifinputfile|contextversion|contextmark|contextlmtxmode|contextkind|contextformat|constantnumberargument|constantnumber|constantemptyargument|constantdimenargument|constantdimen|conditionaltrue|conditionalfalse|component|commentcatcode|commentasciicode|colonasciicode|circumflexasciicode|charnodecode|charifcode|catifcode|caseifcode|breakablethinspace|bottomlevelgroupcode|bigskipamount|bidirlo|bidirle|bidipop|bidilro|bidilre|bgroup|begingroupcatcode|batchmodecode|barasciicode|backslashasciicode|attributeunsetvalue|atsignasciicode|asciispacechar|ampersandasciicode|alignmentcatcode|aligngroupcode|adjustnodecode|adjustedhboxgroupcode|activetabtoken|activemathcharcode|activeformfeedtoken|activeendoflinetoken|activecatcode|activecatcode|Ux|Umathaccents|!!es|!!bs)(?=[^a-zA-Z])",
+ "match" : "\u005C\u005C(zwnj|zwj|zerowidthspace|zerowidthnonjoiner|zerowidthnobreakspace|zerowidthjoiner|zeroskip|zeropoint|zeromuskip|zerocount|xmlcatcodes|xifcode|xetexengine|wildcardsymbol|whatsitnodecode|vtopgroupcode|vrbcatcodes|voidifcode|voidbox|vmodeifcode|vlistnodecode|vcentergroupcode|vboxifcode|vboxgroupcode|valueflagcode|vadjustgroupcode|usetexmodule|usemodule|useluamodule|uprotationangle|uppercasehyphenationmodecode|unsetnodecode|unknownengine|unexpandeddocumentvariable|underscoreasciicode|undefined|typescripttwo|typescriptthree|typescriptone|txtcatcodes|twoperemspace|trueifcode|tpbcatcodes|tpacatcodes|tolerantflagcode|tildeasciicode|threeperemspace|thousandpoint|texengineversion|texenginename|texenginefunctionality|texengine|texcatcodes|tabasciicode|syllablehyphenationmodecode|swapparsshapecode|swaphangindentcode|superscriptcatcode|subscriptcatcode|strictstarthyphenationmodecode|strictendhyphenationmodecode|stoptext|stopproject|stopproduct|stopnotmode|stopnotext|stopnotallmodes|stopmodule|stopmodeset|stopmodeset|stopmode|stopmkivmode|stoplmtxmode|stopenvironment|stopdocument|stopcomponent|stopallmodes|stopTEXpage|statuswrite|starttext|startproject|startproduct|startnotmode|startnotext|startnotallmodes|startmodule|startmodeset|startmodeset|startmode|startmkivmode|startlmtxmode|startenvironment|startdocument|startcomponent|startallmodes|startTEXpage|splitoffgroupcode|splitkeepgroupcode|spacecatcode|spaceasciicode|softhyphen|smallskipamount|slantperpoint|sixperemspace|singlequoteasciicode|simplegroupcode|setupmodule|setupdocument|semisimplegroupcode|scrollmodecode|scaledpoint|rulenodecode|rlncatcodes|rlm|righttoleftmark|rightrotationangle|rightparentasciicode|rightbracketasciicode|rightbraceasciicode|removemarginkernscode|questionmarkasciicode|pushmode|punctuationspace|prtcatcodes|protectedflagcode|project|product|primitiveflagcode|primeasciicode|preventmode|presetdocument|preamblegroupcode|popmode|points|plustwohundred|plustwo|plustwentythousand|plustwelve|plusthree|plusthousand|plustenthousand|plusten|plussixteen|plussix|plusseven|plusonehundred|plusone|plusnine|plushundred|plusfour|plusfivehundred|plusfive|plusfifty|pluseleven|pluseight|pluscxxviii|pluscxxvii|pluscclvi|pluscclv|permitmathreplacehyphenationmodecode|permitgluehyphenationmodecode|permitallhyphenationmodecode|permanentflagcode|periodasciicode|percentasciicode|penaltynodecode|pdftexengine|parindentskipcode|parfillrightskip|parfillleftskip|parametercatcode|overloadedflagcode|outputnewlinechar|outputgroupcode|othercatcode|optionalspace|onepoint|onemuskip|onebasepoint|oddifcode|numifcode|notcatcodes|normalpagebox|normalizelinecode|normalhyphenationmodecode|norightligaturecode|norightkerncode|noprotrusioncode|nonstopmodecode|nonbreakablespace|noligaturingcode|noleftligaturecode|noleftkerncode|nokerningcode|noexpansioncode|nobreakspace|noaligngroupcode|noalignedflagcode|nilcatcodes|newlineasciicode|narrownobreakspace|mutableflagcode|muquad|morethanasciicode|moduleparameter|mmodeifcode|mksuffix|minustwo|minusone|medskipamount|medcard|maxdimen|maxcount|maxcardminusone|maxcard|mathsnodecode|mathsizesuffix|mathshiftgroupcode|mathshiftcatcode|mathrelcode|mathradicalcode|mathpunctcode|mathordcode|mathopencode|mathopcode|mathnothingcode|mathnolopcode|mathnodecode|mathlimopcode|mathleftgroupcode|mathinnercode|mathgroupcode|mathexheight|mathemwidth|mathclosecode|mathchoicegroupcode|mathchoicecode|mathboxcode|mathbincode|mathaxisheight|mathalphacode|mathaccentcode|mathabovegroupcode|marknodecode|luatexengine|luastringsep|luacatcodes|lrm|localboxgroupcode|ligaturenodecode|lettercatcode|lessthanasciicode|lefttorightmark|leftrotationangle|leftparentasciicode|leftbracketasciicode|leftbraceasciicode|lazyligatureshyphenationmodecode|kernnodecode|invalidcatcode|interwordstretch|interwordspace|interwordshrink|instanceflagcode|insertnodecode|insertgroupcode|innerifcode|inicatcodes|immutableflagcode|immediateflagcode|ignorecatcode|ideographicspace|ideographichalffillspace|hyphenasciicode|hmodeifcode|hlistnodecode|hboxifcode|hboxgroupcode|hashasciicode|halfpoint|halfapoint|hairspace|gluenodecode|globalpreventmode|globalflagcode|globalenablemode|globaldisablemode|frozenwidowpenaltycode|frozentolerancecode|frozenstretchcode|frozenskipcode|frozenshapecode|frozenprotrudecode|frozenparfillcode|frozenloosenesscode|frozenlinepenaltycode|frozenlinecode|frozenlastlinecode|frozenindentcode|frozenhyphenationcode|frozenhsizecode|frozenhangcode|frozenflagcode|frozendisplaypenaltycode|frozendemeritscode|frozenclubpenaltycode|frozenbrokenpenaltycode|frozenallcode|frozenadjustcode|fourperemspace|forwardslashasciicode|formfeedasciicode|forcecheckhyphenationmodecode|fontslantperpoint|fontinterwordstretch|fontinterwordspace|fontinterwordshrink|fontextraspace|fontexheight|fontemwidth|fontcharifcode|fmtversion|fmtname|fiveperemspace|finrowgroupcode|figurespace|falseifcode|extraspace|explicitpenaltyhyphenationmodecode|explicithyphenationmodecode|exheight|exclamationmarkasciicode|everystoptext|everystarttext|escapecatcode|errorstopmodecode|eofifcode|environment|enquad|endoflinetoken|endoflinecatcode|endoflineasciicode|endoffileasciicode|endline|endgroupcatcode|enablemode|emwidth|emquad|emptyvbox|emptytoks|emptyhbox|emptybox|empty|egroup|eUx|downrotationangle|doublequoteasciicode|doublecommentsignal|dollarasciicode|doifnotmode|doifnotdocumentvariable|doifnotallmodes|doifmodeelse|doifmode|doifelsemode|doifelsedocumentvariable|doifelseallmodes|doifdocumentvariableelse|doifdocumentvariable|doifallmodeselse|doifallmodes|documentvariable|discretionarynodecode|discretionarygroupcode|discretionarygroupcode|disablemode|directionrighttoleft|directionlefttoright|dimifcode|delasciicode|definemode|definedifcode|currentmoduleparameter|ctxcatcodes|ctdcatcodes|csnameifcode|continuewhenlmtxmode|continueifinputfile|contextversion|contextmark|contextlmtxmode|contextformat|constantnumberargument|constantnumber|constantemptyargument|constantdimenargument|constantdimen|conditionaltrue|conditionalflagcode|conditionalfalse|compoundhyphenationmodecode|component|completehyphenationmodecode|commentcatcode|commentasciicode|commaasciicode|colonasciicode|clipwidthcode|circumflexasciicode|charnodecode|charifcode|catifcode|caseifcode|breakafterdircode|breakablethinspace|bottomlevelgroupcode|bigskipamount|bidirlo|bidirle|bidipop|bidilro|bidilre|bgroup|begingroupcatcode|batchmodecode|barasciicode|backslashasciicode|automaticpenaltyhyphenationmodecode|automatichyphenationmodecode|attributeunsetvalue|atsignasciicode|asciispacechar|ampersandasciicode|alignsetgroupcode|alignmentcatcode|aligngroupcode|adjustnodecode|adjustedhboxgroupcode|activetabtoken|activemathcharcode|activeformfeedtoken|activeendoflinetoken|activecatcode|activecatcode|Ux|Umathaccents|!!es|!!bs)(?=[^a-zA-Z])",
"name" : "context.constant.commands.constant.tex"
},
"csname" : {
@@ -88,7 +88,7 @@
"name" : "context.grouping.symbols.groups.tex"
},
"helper" : {
- "match" : "\u005C\u005C(xmlsetup|writestatus|wait|vpackedbox|vpackbox|vkern|vglue|vfillneg|vfilllneg|vfilll|validassignment|uxdef|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|unvoidbox|unsupportedcs|unprotect|unique|unexpanded|undefinevalue|uncramped|ugdef|uedef|uedcatcodecommand|udef|twodigits|truecondition|tripleexpandafter|triggeruncrampedstyle|triggeruncrampedsmallstyle|triggeruncrampedbigstyle|triggertextstyle|triggersmallstyle|triggerscriptstyle|triggerscriptscriptstyle|triggermathstyle|triggergroupedcommandcs|triggergroupedcommand|triggerdisplaystyle|triggercrampedstyle|triggercrampedsmallstyle|triggercrampedbigstyle|triggerbigstyle|tracingnone|tracingall|to|threedigits|thirdofthreeunexpanded|thirdofthreearguments|thirdofsixarguments|thirdoffourarguments|thirdoffivearguments|thirdargumenttrue|thirdargumentfalse|then|texsetup|texdefinition|synchronizelayoutdirection|synchronizeinlinedirection|synchronizedisplaydirection|superscript|subscript|strutwd|struthtdp|strutht|strutgap|strutdp|strutbox|strut|strippedcsname|stopxmlsetups|stoptexsetups|stoptexdefinition|stoptexcode|stopsetups|stoprawsetups|stoppickupmath|stopnointerference|stopluasetups|stopluaparameterset|stopluacode|stoplua|stoplocalsetups|stopimath|stopforceddisplaymath|stopextendcatcodetable|stopexpanded|stopdmath|stopctxfunctiondefinition|stopctxfunction|stopcontextdefinitioncode|stopcontextcode|stopcatcodetable|stop|startxmlsetups|starttexsetups|starttexdefinition|starttexcode|startsetups|startrawsetups|startpickupmath|startnointerference|startluasetups|startluaparameterset|startluacode|startlua|startlocalsetups|startimath|startforceddisplaymath|startextendcatcodetable|startexpanded|startdmath|startctxfunctiondefinition|startctxfunction|startcontextdefinitioncode|startcontextcode|startcatcodetable|start|space|sixthofsixarguments|sixthargumenttrue|sixthargumentfalse|singleexpandafter|simplegroupedcommand|signalcharacter|shiftbox|seventhargumenttrue|seventhargumentfalse|setxvalue|setxquantity|setxmeasure|setvalue|setuxvalue|setuvalue|setups|setup|setugvalue|setuevalue|settruevalue|settrue|setsystemmode|setstrut|setquantity|setnewmacro|setnewconstant|setmode|setmeasure|setmathtextbox|setmathsmalltextbox|setlocalhsize|setgvalue|setgquantity|setgmeasure|setfalsevalue|setfalse|setexpandeddummyparameter|setevalue|setequantity|setemeasure|setdummyparameter|setconstantvalue|setconstant|setcatcodetable|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|secondargumenttrue|secondargumentfalse|scratchyposition|scratchyoffset|scratchxposition|scratchxoffset|scratchwidth|scratchvsize|scratchvoffset|scratchunicode|scratchtotal|scratchtopskip|scratchtopoffset|scratchtokstwo|scratchtoksthree|scratchtokssix|scratchtoksone|scratchtoksfour|scratchtoksfive|scratchtoks|scratchskiptwo|scratchskipthree|scratchskipsix|scratchskipone|scratchskipfour|scratchskipfive|scratchskip|scratchrightskip|scratchrightoffset|scratchoffset|scratchny|scratchnx|scratchmy|scratchmx|scratchmuskiptwo|scratchmuskipthree|scratchmuskipsix|scratchmuskipone|scratchmuskipfour|scratchmuskipfive|scratchmuskip|scratchmin|scratchmax|scratchleftskip|scratchleftoffset|scratchhsize|scratchhoffset|scratchheight|scratchdistance|scratchdimentwo|scratchdimenthree|scratchdimensix|scratchdimenone|scratchdimenfour|scratchdimenfive|scratchdimen|scratchdepth|scratchcountertwo|scratchcounterthree|scratchcountersix|scratchcounterone|scratchcounterfour|scratchcounterfive|scratchcounter|scratchboxtwo|scratchboxthree|scratchboxsix|scratchboxone|scratchboxfour|scratchboxfive|scratchbox|scratchbottomskip|scratchbottomoffset|scangivendimensions|ruledvtop|ruledvss|ruledvskip|ruledvpack|ruledvglue|ruledvfilneg|ruledvfillneg|ruledvfilll|ruledvfill|ruledvfil|ruledvcenter|ruledvbox|ruledtpack|ruledpenalty|ruledmskip|ruledmkern|ruledmbox|ruledkern|ruledhss|ruledhskip|ruledhpack|ruledhglue|ruledhfilneg|ruledhfillneg|ruledhfilll|ruledhfill|ruledhfil|ruledhbox|rtlvtop|rtlvbox|rtlhbox|righttoleftvtop|righttoleftvbox|righttolefthbox|righttoleft|rightboundary|reversevtop|reversevpack|reversevbox|reversetpack|reversehpack|reversehbox|restorecatcodes|resetvalue|resetsystemmode|resetsetups|resetmode|resetglobal|reseteverypar|resetctxscanner|reqno|removeunwantedspaces|removetoks|removepunctuation|removelastspace|relrelspacing|relpunctspacing|relordspacing|relopspacing|relopenspacing|relinnerspacing|relclosespacing|relbinspacing|registerctxluafile|redoglobal|redefine|recurselevel|recursedepth|quitprevcommalist|quitcondition|quitcommalist|quarterstrut|quantity|quantitied|quad|pushsystemmode|pushmathstyle|pushcatcodetable|punctrelspacing|punctpunctspacing|punctordspacing|punctopspacing|punctopenspacing|punctinnerspacing|punctclosespacing|punctbinspacing|protected|protect|processfirstactioninset|processcommalist|processcommacommand|processallactionsinset|processallactions|processaction|privatescratchtoks|privatescratchskip|privatescratchmuskip|privatescratchdimen|privatescratchcounter|privatescratchbox|prependtotoks|prependtoks|popsystemmode|popmathstyle|popcatcodetable|pickupgroupedcommand|permitspacesbetweengroups|ordrelspacing|ordpunctspacing|ordordspacing|ordopspacing|ordopenspacing|ordinnerspacing|ordclosespacing|ordbinspacing|oprelspacing|oppunctspacing|opordspacing|opopspacing|opopenspacing|opinnerspacing|openrelspacing|openpunctspacing|openordspacing|openopspacing|openopenspacing|openinnerspacing|openclosespacing|openbinspacing|opclosespacing|opbinspacing|onlypdfobjectcompression|onlynonbreakablespace|oninterlineskip|offinterlineskip|obeyspaces|obeyluatokens|obeylualines|obeylines|obeyedtab|obeyedspace|obeyedpage|obeyedline|null|novalidassignment|nosuperscript|nosubscript|nospacing|nospace|normalvglue|normalvfillneg|normalvfilllneg|normalsuperscript|normalsubscript|normalstopimath|normalstopdmath|normalstartimath|normalstartdmath|normalspace|normalreqno|normalpdfcompression|normalnosuperscript|normalnosubscript|normallineskiplimit|normallineskip|normalhglue|normalhfillneg|normalhfilllneg|normalbaselineskip|nopdfobjectcompression|nopdfcompression|nointerlineskip|nohyphens|noheightstrut|nobreak|nexttoken|nextbox|next|newwrite|newtoks|newsystemmode|newskip|newsignal|newread|newmuskip|newmode|newmarks|newmacro|newlanguage|newinsert|newif|newhelp|newfraction|newfamily|newfam|newdimen|newcount|newconstant|newconditional|newcatcodetable|newbox|newattribute|nbsp|naturalvtop|naturalvpack|naturalvbox|naturaltpack|naturalhpack|naturalhbox|morehyphens|modulonumber|measured|measure|maximumpdfcompression|mathtext|mathstylevcenteredvbox|mathstylevcenteredhbox|mathstylevcenter|mathstylevbox|mathstylehbox|mathstylefont|mathstyleface|mathstylecommand|mathsmallstylefont|mathsmallstyleface|mathpalette|mathortext|mathnothing|mathnolop|mathlimop|mathbox|mathalpha|luaversion|luasetup|luaparameterset|luaminorversion|luamajorversion|luaexpr|luaexpanded|luaconditional|luacode|ltrvtop|ltrvbox|ltrhbox|loggingall|localhsize|lineheight|letvalue|letgvalue|letdummyparameter|letcatcodecommand|lesshyphens|lefttorightvtop|lefttorightvbox|lefttorighthbox|lefttoright|leftorrightvtop|leftorrightvbox|leftorrighthbox|leftorright|leftboundary|lateluacode|lastlinewidth|keepunwantedspaces|installprotectedctxscanner|installprotectedctxfunction|installctxscanner|installctxfunction|installcorenamespace|innerrelspacing|innerpunctspacing|innerordspacing|inneropspacing|inneropenspacing|innerinnerspacing|innerclosespacing|innerbinspacing|inlineordisplaymath|indisplaymath|ignorevalue|ignoreparskip|htdp|hsizefraction|hpackedbox|hpackbox|hkern|hglue|hfillneg|hfilllneg|hfilll|halfstrut|halflinestrut|groupedcommandcs|groupedcommand|goodbreak|gobbletwooptionals|gobbletwoarguments|gobblethreeoptionals|gobblethreearguments|gobbletenarguments|gobblesixarguments|gobblesevenarguments|gobbleoneoptional|gobbleoneargument|gobbleninearguments|gobblefouroptionals|gobblefourarguments|gobblefiveoptionals|gobblefivearguments|gobbleeightarguments|globalsetsystemmode|globalsetmode|globalscratchtoks|globalscratchskip|globalscratchmuskip|globalscratchdimen|globalscratchcountertwo|globalscratchcounterthree|globalscratchcounterone|globalscratchcounter|globalscratchbox|globalresetsystemmode|globalresetmode|globallet|glet|givenwidth|givenheight|givendepth|getxparameters|getvalue|getuvalue|getparameters|getgparameters|getfirstcharacter|geteparameters|getdummyparameters|frule|freezequantity|freezemeasure|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourthargumenttrue|fourthargumentfalse|foundtrue|foundfalse|forgetparameters|forgetall|forcestrutdepth|forcedisplaymath|flushnextbox|firstoftwounexpanded|firstoftwoarguments|firstofthreeunexpanded|firstofthreearguments|firstofsixarguments|firstofoneunexpanded|firstofoneargument|firstoffourarguments|firstoffivearguments|firstinset|firstargumenttrue|firstargumentfalse|finishpar|filledhboxy|filledhboxr|filledhboxm|filledhboxk|filledhboxg|filledhboxc|filledhboxb|fifthofsixarguments|fifthoffivearguments|fifthargumenttrue|fifthargumentfalse|fastsetup|fastloopindex|fastloopfinal|falsecondition|expelsedoif|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifcommonelse|expdoif|expanded|exitloop|executeifdefined|everyendpar|enspace|endstrut|endpar|endgraf|emspace|empty|dummyparameter|dowithnextboxcs|dowithnextboxcontentcs|dowithnextboxcontent|dowithnextbox|dowith|doubleexpandafter|dotriplegroupempty|dotripleempty|dotripleargument|dostepwiserecurse|dospacing|dosixtupleempty|dosixtupleargument|dosinglegroupempty|dosingleempty|dosingleargument|doseventupleempty|doseventupleargument|dorecurse|doquintuplegroupempty|doquintupleempty|doquintupleargument|doquadruplegroupempty|doquadrupleempty|doquadrupleargument|dontpermitspacesbetweengroups|dontleavehmode|dontcomplain|donothing|donetrue|donefalse|doloop|doifvaluesomething|doifvaluenothingelse|doifvaluenothing|doifvalue|doifundefinedelse|doifundefined|doiftextelse|doiftext|doifsomethingelse|doifsomething|doifsetupselse|doifsetups|doifnumberelse|doifnumber|doifnotvalue|doifnottext|doifnotsetups|doifnotnumber|doifnotinstring|doifnotinset|doifnothingelse|doifnothing|doifnotcommon|doifnotcommandhandler|doifnot|doifnextparenthesiselse|doifnextoptionalelse|doifnextoptionalcselse|doifnextcharelse|doifnextcharcselse|doifnextbgroupelse|doifnextbgroupcselse|doifinstringelse|doifinstring|doifinsetelse|doifinset|doiffirstcharelse|doiffastoptionalcheckelse|doiffastoptionalcheckcselse|doifelsevaluenothing|doifelsevalue|doifelseundefined|doifelsetext|doifelsesomething|doifelsesetups|doifelsenumber|doifelsenothing|doifelsenextparenthesis|doifelsenextoptionalcs|doifelsenextoptional|doifelsenextcharcs|doifelsenextchar|doifelsenextbgroupcs|doifelsenextbgroup|doifelseinstring|doifelseinset|doifelsefirstchar|doifelsefastoptionalcheckcs|doifelsefastoptionalcheck|doifelsedimension|doifelsedefined|doifelsecommon|doifelsecommandhandler|doifelseassignmentcs|doifelseassignment|doifelse|doifdimensionelse|doifdefinedelse|doifdefined|doifcommonelse|doifcommon|doifcommandhandlerelse|doifcommandhandler|doifassignmentelsecs|doifassignmentelse|doif|dohyphens|doglobal|dofastloopcs|dodoublegroupempty|dodoubleempty|dodoubleargument|dodoglobal|docheckassignment|dividenumber|distributedhsize|dirrlo|dirrle|dirlro|dirlre|directsetup|directquantity|directmeasure|directluacode|directdummyparameter|depthstrut|definequantity|definenamedlua|definemeasure|defineexpandable|define|defcatcodecommand|defaultcatcodetable|currentcatcodetable|ctxwrite|ctxsprint|ctxreport|ctxluacode|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|crlf|cramped|copysetups|copyparameters|compoundhyphenpenalty|closerelspacing|closepunctspacing|closeordspacing|closeopspacing|closeopenspacing|closeinnerspacing|closeclosespacing|closebinspacing|cldprocessfile|cldloadviafile|cldloadfile|cldcontext|cldcommand|checkedstrippedcsname|checkedrighttoleft|checkedlefttoright|checked|charspace|catcodetablename|carryoverpar|break|boxisempty|booleanmodevalue|binrelspacing|binpunctspacing|binordspacing|binopspacing|binopenspacing|bininnerspacing|binclosespacing|binbinspacing|begstrut|begcsname|availablehsize|autorule|autodirvtop|autodirvbox|autodirhbox|assumelongusagecs|appendtotoks|appendtoks|allowbreak|Umathbotaccent|Ucheckedstopdisplaymath|Ucheckedstartdisplaymath)(?=[^a-zA-Z])",
+ "match" : "\u005C\u005C(xmlsetup|writestatus|write|wait|vpenalty|vpackedbox|vpackbox|vkern|vglue|vfillneg|vfilllneg|vfilll|vcontainer|validassignment|uxdef|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|usedlineskiplimit|usedlineskip|usedbaselineskip|updateparagraphshapes|updateparagraphproperties|updateparagraphpenalties|updateparagraphlines|updateparagraphdemerits|unvoidbox|unsupportedcs|unprotect|unique|unexpanded|undefinevalue|uncramped|ugdef|uedef|uedcatcodecommand|udef|twodigits|truecondition|tripleexpandafter|triggeruncrampedstyle|triggeruncrampedsmallstyle|triggeruncrampedbigstyle|triggertextstyle|triggersmallstyle|triggerscriptstyle|triggerscriptscriptstyle|triggermathstyle|triggergroupedcommandcs|triggergroupedcommand|triggerdisplaystyle|triggercrampedstyle|triggercrampedsmallstyle|triggercrampedbigstyle|triggerbigstyle|tracingnone|tracingall|to|threedigits|thirdofthreeunexpanded|thirdofthreearguments|thirdofsixarguments|thirdoffourarguments|thirdoffivearguments|thirdargumenttrue|thirdargumentfalse|then|thebox|textdir|texsetup|texdefinition|tempstring|tcontainer|synchronizelayoutdirection|synchronizeinlinedirection|synchronizedisplaydirection|superscript|superprescript|suggestedalias|subscript|subprescript|strutwd|struthtdp|strutht|strutgap|strutdp|strutbox|strut|strippedcsname|stopxmlsetups|stoptexsetups|stoptexdefinition|stoptexcode|stopsetups|stoprawsetups|stoppickupmath|stopnointerference|stopluasetups|stopluaparameterset|stopluacode|stoplua|stoplocalsetups|stopimath|stopforceddisplaymath|stopextendcatcodetable|stopexpanded|stopdmath|stopctxfunctiondefinition|stopctxfunction|stopcontextdefinitioncode|stopcontextcode|stopcatcodetable|stop|startxmlsetups|starttexsetups|starttexdefinition|starttexcode|startsetups|startrawsetups|startpickupmath|startnointerference|startluasetups|startluaparameterset|startluacode|startlua|startlocalsetups|startimath|startforceddisplaymath|startextendcatcodetable|startexpanded|startdmath|startctxfunctiondefinition|startctxfunction|startcontextdefinitioncode|startcontextcode|startcatcodetable|start|space|sixthofsixarguments|sixthargumenttrue|sixthargumentfalse|singleexpandafter|simplegroupedcommand|signalcharacter|showluatokens|shiftbox|seventhargumenttrue|seventhargumentfalse|setxvalue|setxquantity|setxmeasure|setvalue|setuxvalue|setuvalue|setups|setup|setugvalue|setuevalue|settruevalue|settrue|setsystemmode|setstrut|setquantity|setprelistbox|setpostlistbox|setparagraphfreezing|setnewmacro|setnewlocaltoks|setnewlocalskip|setnewlocalmuskip|setnewlocaldimen|setnewlocalcount|setnewlocalbox|setnewconstant|setmode|setmeasure|setmathtextbox|setmathsmalltextbox|setlocalhsize|setgvalue|setgquantity|setgmeasure|setfalsevalue|setfalse|setexpandeddummyparameter|setevalue|setequantity|setemeasure|setdummyparameter|setcontrolspaces|setconstantvalue|setconstant|setconditional|setcatcodetable|setboxline|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|secondargumenttrue|secondargumentfalse|scratchyposition|scratchyoffset|scratchxposition|scratchxoffset|scratchwidth|scratchvsize|scratchvoffset|scratchunicode|scratchtotal|scratchtopskip|scratchtopoffset|scratchtokstwo|scratchtoksthree|scratchtokssix|scratchtoksone|scratchtoksfour|scratchtoksfive|scratchtoks|scratchstringtwo|scratchstringone|scratchstring|scratchskiptwo|scratchskipthree|scratchskipsix|scratchskipone|scratchskipfour|scratchskipfive|scratchskip|scratchrightskip|scratchrightoffset|scratchoffset|scratchny|scratchnx|scratchmy|scratchmx|scratchmuskiptwo|scratchmuskipthree|scratchmuskipsix|scratchmuskipone|scratchmuskipfour|scratchmuskipfive|scratchmuskip|scratchmin|scratchmax|scratchmacrotwo|scratchmacroone|scratchmacro|scratchleftskip|scratchleftoffset|scratchhsize|scratchhoffset|scratchheight|scratchdistance|scratchdimentwo|scratchdimenthree|scratchdimensix|scratchdimenone|scratchdimenfour|scratchdimenfive|scratchdimen|scratchdepth|scratchcountertwo|scratchcounterthree|scratchcountersix|scratchcounterone|scratchcounterfour|scratchcounterfive|scratchcounter|scratchconditiontwotrue|scratchconditiontwofalse|scratchconditiontrue|scratchconditiononetrue|scratchconditiononefalse|scratchconditionfalse|scratchboxtwo|scratchboxthree|scratchboxsix|scratchboxone|scratchboxfour|scratchboxfive|scratchbox|scratchbottomskip|scratchbottomoffset|scangivendimensions|ruledvtop|ruledvss|ruledvskip|ruledvpack|ruledvglue|ruledvfilneg|ruledvfillneg|ruledvfilll|ruledvfill|ruledvfil|ruledvcenter|ruledvbox|ruledtpack|ruledpenalty|ruledmskip|ruledmkern|ruledmbox|ruledkern|ruledhss|ruledhskip|ruledhpack|ruledhglue|ruledhfilneg|ruledhfillneg|ruledhfilll|ruledhfill|ruledhfil|ruledhbox|rtlvtop|rtlvbox|rtlhbox|righttoleftvtop|righttoleftvbox|righttolefthbox|righttoleft|rightboundary|reversevtop|reversevpack|reversevbox|reversetpack|reversehpack|reversehbox|restorecatcodes|resetvalue|resetsystemmode|resetsetups|resetmode|resetglobal|reseteverypar|resetctxscanner|reqno|removeunwantedspaces|removetoks|removepunctuation|removelastspace|relrelspacing|relpunctspacing|relordspacing|relopspacing|relopenspacing|relinnerspacing|relclosespacing|relbinspacing|registerctxluafile|redoglobal|redefine|recurselevel|recursedepth|readline|readfromterminal|read|quitprevcommalist|quitcondition|quitcommalist|quarterstrut|quantity|quantitied|quad|pushsystemmode|pushrunstate|pushoverloadmode|pushmathstyle|pushcatcodetable|punctrelspacing|punctpunctspacing|punctordspacing|punctopspacing|punctopenspacing|punctinnerspacing|punctclosespacing|punctbinspacing|protect|processfirstactioninset|processcommalist|processcommacommand|processallactionsinset|processallactions|processaction|privatescratchtoks|privatescratchskip|privatescratchmuskip|privatescratchdimen|privatescratchcounter|privatescratchbox|prerolltostring|prependtotoks|prependtoks|prelistcopy|prelistbox|postlistcopy|postlistbox|popsystemmode|poprunstate|popoverloadmode|popmathstyle|popcatcodetable|pickupgroupedcommand|permitspacesbetweengroups|pardir|ordrelspacing|ordpunctspacing|ordordspacing|ordopspacing|ordopenspacing|ordinnerspacing|ordclosespacing|ordbinspacing|oprelspacing|oppunctspacing|opordspacing|opopspacing|opopenspacing|opinnerspacing|openrelspacing|openpunctspacing|openout|openordspacing|openopspacing|openopenspacing|openinnerspacing|openin|openclosespacing|openbinspacing|opclosespacing|opbinspacing|onlypdfobjectcompression|onlynonbreakablespace|oninterlineskip|offinterlineskip|obeytabs|obeyspaces|obeypages|obeyluatokens|obeylualines|obeylines|obeyedtab|obeyedspace|obeyedpage|obeyedline|null|novalidassignment|nosuperscript|nosuperprescript|nosubsprecript|nosubscript|nospacing|nospace|normalvglue|normalvfillneg|normalvfilllneg|normalsuperscript|normalsubscript|normalstopimath|normalstopdmath|normalstartimath|normalstartdmath|normalspaces|normalspace|normalreqno|normalpdfcompression|normalnosuperscript|normalnosubscript|normalhglue|normalhfillneg|normalhfilllneg|norightligaturing|norightkerning|noprotrusion|nopdfobjectcompression|nopdfcompression|noligaturing|noleftligaturing|noleftkerning|nokerning|nointerlineskip|nohyphens|noheightstrut|nofarguments|noexpansion|nobreak|nexttoken|nextbox|next|newwrite|newtoks|newsystemmode|newskip|newsignal|newread|newmuskip|newmode|newmarks|newmacro|newlocalwrite|newlocaltoks|newlocalskip|newlocalread|newlocalmuskip|newlocaldimen|newlocalcount|newlocalbox|newlanguage|newinsert|newif|newhelp|newfraction|newfamily|newfam|newdimen|newcount|newconstant|newconditional|newcatcodetable|newbox|newattribute|nbsp|naturalvtop|naturalvpack|naturalvbox|naturaltpack|naturalspace|naturalhpack|naturalhbox|morehyphens|modulonumber|measured|measure|maximumpdfcompression|mathtext|mathstylevcenteredvbox|mathstylevcenteredhbox|mathstylevcenter|mathstylevbox|mathstyletrigger|mathstylehbox|mathstylefont|mathstyleface|mathstylecommand|mathsmallstylefont|mathsmallstyleface|mathpalette|mathortext|mathnothing|mathnolop|mathlimop|mathbox|mathalpha|luaversion|luasetup|luaparameterset|luaminorversion|luamajorversion|luaexpr|luaexpanded|luaconditional|luacode|ltrvtop|ltrvbox|ltrhbox|loggingall|localhsize|lineheight|linedir|letvalue|letgvalue|letdummyparameter|letcatcodecommand|letbackslashbreak|lesshyphens|lefttorightvtop|lefttorightvbox|lefttorighthbox|lefttoright|leftorrightvtop|leftorrightvbox|leftorrighthbox|leftorright|leftboundary|lateluacode|lastlinewidth|keepunwantedspaces|installprotectedctxscanner|installprotectedctxfunction|installctxscanner|installctxfunction|installcorenamespace|innerrelspacing|innerpunctspacing|innerordspacing|inneropspacing|inneropenspacing|innerinnerspacing|innerclosespacing|innerbinspacing|inlineordisplaymath|indisplaymath|ignorevalue|ignoretabs|ignoreparskip|ignorepages|ignorelines|ignoreeofs|ifscratchconditiontwo|ifscratchconditionone|ifscratchcondition|ifbitwiseand|htdp|hsizefraction|hpenalty|hpackedbox|hpackbox|hkern|hglue|hfillneg|hfilllneg|hfilll|hcontainer|halfstrut|halflinestrut|groupedcommandcs|groupedcommand|goodbreak|gobbletwooptionals|gobbletwoarguments|gobblethreeoptionals|gobblethreearguments|gobbletenarguments|gobblesixarguments|gobblesevenarguments|gobbleoneoptional|gobbleoneargument|gobbleninearguments|gobblefouroptionals|gobblefourarguments|gobblefiveoptionals|gobblefivearguments|gobbleeightarguments|globalsetsystemmode|globalsetmode|globalscratchtoks|globalscratchskip|globalscratchmuskip|globalscratchdimen|globalscratchcountertwo|globalscratchcounterthree|globalscratchcounterone|globalscratchcounter|globalscratchbox|globalresetsystemmode|globalresetmode|globallet|givenwidth|givenheight|givendepth|getxparameters|getvalue|getuvalue|getparameters|getgparameters|getfirstcharacter|geteparameters|getdummyparameters|futureletnexttoken|frule|freezequantity|freezeparagraphproperties|freezemeasure|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourthargumenttrue|fourthargumentfalse|foundtrue|foundfalse|forgetparameters|forgetparagraphfreezing|forgetall|forcestrutdepth|forcedisplaymath|flushnextbox|firstoftwounexpanded|firstoftwoarguments|firstofthreeunexpanded|firstofthreearguments|firstofsixarguments|firstofoneunexpanded|firstofoneargument|firstoffourarguments|firstoffivearguments|firstinset|firstargumenttrue|firstargumentfalse|finishpar|filledhboxy|filledhboxr|filledhboxm|filledhboxk|filledhboxg|filledhboxc|filledhboxb|fifthofsixarguments|fifthoffivearguments|fifthargumenttrue|fifthargumentfalse|fastsetup|fastloopindex|fastloopfinal|falsecondition|expelsedoif|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifcommonelse|expdoif|expanded|exitloop|executeifdefined|enspace|endstrut|endpar|endgraf|emspace|empty|dummyparameter|dowithnextboxcs|dowithnextboxcontentcs|dowithnextboxcontent|dowithnextbox|dowith|doubleexpandafter|dotriplegroupempty|dotripleempty|dotripleargument|dostepwiserecurse|dospacing|dosixtupleempty|dosixtupleargument|dosinglegroupempty|dosingleempty|dosingleargument|doseventupleempty|doseventupleargument|dorecurse|doquintuplegroupempty|doquintupleempty|doquintupleargument|doquadruplegroupempty|doquadrupleempty|doquadrupleargument|dontpermitspacesbetweengroups|dontleavehmode|dontcomplain|donothing|donetrue|donefalse|doloopovermatched|doloopovermatch|doloopoverlist|doloop|doifvaluesomething|doifvaluenothingelse|doifvaluenothing|doifvalue|doifundefinedelse|doifundefined|doiftextelse|doiftext|doifsomethingelse|doifsomething|doifsetupselse|doifsetups|doifnumberelse|doifnumber|doifnotvalue|doifnottext|doifnotsetups|doifnotnumber|doifnotinstring|doifnotinset|doifnothingelse|doifnothing|doifnotcommon|doifnotcommandhandler|doifnot|doifnextparenthesiselse|doifnextoptionalelse|doifnextoptionalcselse|doifnextcharelse|doifnextcharcselse|doifnextbgroupelse|doifnextbgroupcselse|doifinstringelse|doifinstring|doifinsetelse|doifinset|doiffirstcharelse|doiffastoptionalcheckelse|doiffastoptionalcheckcselse|doifelsevaluenothing|doifelsevalue|doifelseundefined|doifelsetext|doifelsesomething|doifelsesetups|doifelsenumber|doifelsenothing|doifelsenextparenthesis|doifelsenextoptionalcs|doifelsenextoptional|doifelsenextcharcs|doifelsenextchar|doifelsenextbgroupcs|doifelsenextbgroup|doifelseinstring|doifelseinset|doifelsefirstchar|doifelsefastoptionalcheckcs|doifelsefastoptionalcheck|doifelsedimension|doifelsedefined|doifelsecommon|doifelsecommandhandler|doifelseassignmentcs|doifelseassignment|doifelse|doifdimensionelse|doifdefinedelse|doifdefined|doifcommonelse|doifcommon|doifcommandhandlerelse|doifcommandhandler|doifassignmentelsecs|doifassignmentelse|doif|dohyphens|doglobal|dofastloopcs|dodoublegroupempty|dodoubleempty|dodoubleargument|dodoglobal|docheckassignment|dividenumber|distributedhsize|dirrlo|dirrle|dirlro|dirlre|directsetup|directquantity|directmeasure|directluacode|directdummyparameter|depthstrut|defrostparagraphproperties|definequantity|definenamedlua|definemeasure|defineexpandable|define|defcatcodecommand|defbackslashbreak|defaultcatcodetable|currentcatcodetable|ctxwrite|ctxsprint|ctxreport|ctxluamatch|ctxluacode|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|crlf|cramped|copysetups|copyparameters|copyboxline|controlspace|contentostring|compoundhyphenpenalty|compounddiscretionary|closerelspacing|closepunctspacing|closeout|closeordspacing|closeopspacing|closeopenspacing|closeinnerspacing|closein|closeclosespacing|closebinspacing|cldprocessfile|cldloadviafile|cldloadfile|cldcontext|cldcommand|checkedstrippedcsname|checkedrighttoleft|checkedlefttoright|checked|charspace|catcodetablename|carryoverpar|break|boxtostring|boxrangewd|boxrangeht|boxrangedp|boxlinewd|boxlines|boxliners|boxlinerp|boxlinerh|boxlinenw|boxlinenh|boxlinend|boxlinels|boxlinelp|boxlinelh|boxlinein|boxlineht|boxlinedp|boxline|boxisempty|boxdir|booleanmodevalue|bitwisexor|bitwiseshift|bitwiseset|bitwiseor|bitwisenot|bitwisenil|bitwiseflip|bitwiseand|bitwise|binrelspacing|binpunctspacing|binordspacing|binopspacing|binopenspacing|bininnerspacing|binclosespacing|binbinspacing|begstrut|begcsname|availablehsize|autorule|autodirvtop|autodirvbox|autodirhbox|assumelongusagecs|appendtotoks|appendtoks|allowbreak|aliasmacro|Umathtopaccent|Umathbotaccent|Ucheckedstopdisplaymath|Ucheckedstartdisplaymath)(?=[^a-zA-Z])",
"name" : "context.plain.commands.plain.tex"
},
"ifprimitive" : {
@@ -215,7 +215,7 @@
]
},
"primitive" : {
- "match" : "\u005C\u005C(year|xtokspre|xtoksapp|xspaceskip|xleaders|xdef|wordboundary|widowpenalty|widowpenalties|wd|vtop|vss|vsplit|vskip|vsize|vrule|vpack|voffset|vfuzz|vfilneg|vfill|vfil|vcenter|vbox|vbadness|valign|vadjust|uppercase|unvcopy|unvbox|unskip|unpenalty|unletprotected|unletfrozen|unless|unkern|unhcopy|unhbox|underline|uchyph|uccode|tracingstats|tracingscantokens|tracingrestores|tracingparagraphs|tracingpages|tracingoutput|tracingonline|tracingnesting|tracingmacros|tracinglostchars|tracingifs|tracinggroups|tracingfonts|tracingcommands|tracingassigns|tpack|topskip|topmarks|topmark|tolerance|tokspre|toksdef|toksapp|toks|time|thinmuskip|thickmuskip|the|textstyle|textfont|textdirection|tabskip|string|splittopskip|splitmaxdepth|splitfirstmarks|splitfirstmark|splitdiscards|splitbotmarks|splitbotmark|span|spaceskip|spacefactor|skipdef|skip|skewchar|showtokens|showthe|shownodedetails|showlists|showifs|showgroups|showboxdepth|showboxbreadth|showbox|show|shipout|shapemode|sfcode|setlanguage|setfontid|setbox|scrollmode|scriptstyle|scriptspace|scriptscriptstyle|scriptscriptfont|scriptfont|scantokens|scantextokens|savingvdiscards|savinghyphcodes|savecatcodetable|rpcode|romannumeral|rightskip|rightmarginkern|righthyphenmin|rightghost|right|relpenalty|relax|readline|read|raise|radical|quitvmode|pxdimen|protrusionboundary|protrudechars|prevgraf|prevdepth|pretolerance|prerelpenalty|prehyphenchar|preexhyphenchar|predisplaysize|predisplaypenalty|predisplaygapfactor|predisplaydirection|prebinoppenalty|posthyphenchar|postexhyphenchar|postdisplaypenalty|penalty|pdfximage|pdfxformresources|pdfxformname|pdfxformmargin|pdfxformattr|pdfxform|pdfvorigin|pdfuniqueresname|pdfuniformdeviate|pdftrailerid|pdftrailer|pdftracingfonts|pdfthreadmargin|pdfthread|pdftexversion|pdftexrevision|pdftexbanner|pdfsuppressptexinfo|pdfsuppressoptionalinfo|pdfstartthread|pdfstartlink|pdfsetrandomseed|pdfsetmatrix|pdfsavepos|pdfsave|pdfretval|pdfrestore|pdfreplacefont|pdfrefximage|pdfrefxform|pdfrefobj|pdfrecompress|pdfrandomseed|pdfpxdimen|pdfprotrudechars|pdfprimitive|pdfpkresolution|pdfpkmode|pdfpkfixeddpi|pdfpagewidth|pdfpagesattr|pdfpageresources|pdfpageref|pdfpageheight|pdfpagebox|pdfpageattr|pdfoutput|pdfoutline|pdfomitcidset|pdfomitcharset|pdfobjcompresslevel|pdfobj|pdfnormaldeviate|pdfnoligatures|pdfnames|pdfminorversion|pdfmapline|pdfmapfile|pdfmajorversion|pdfliteral|pdflinkmargin|pdflastypos|pdflastxpos|pdflastximagepages|pdflastximage|pdflastxform|pdflastobj|pdflastlink|pdflastlinedepth|pdflastannot|pdfinsertht|pdfinfoomitdate|pdfinfo|pdfinclusionerrorlevel|pdfinclusioncopyfonts|pdfincludechars|pdfimageresolution|pdfimagehicolor|pdfimagegamma|pdfimageapplygamma|pdfimageaddfilename|pdfignoreunknownimages|pdfignoreddimen|pdfhorigin|pdfglyphtounicode|pdfgentounicode|pdfgamma|pdffontsize|pdffontobjnum|pdffontname|pdffontexpand|pdffontattr|pdffirstlineheight|pdfendthread|pdfendlink|pdfeachlineheight|pdfeachlinedepth|pdfdraftmode|pdfdestmargin|pdfdest|pdfdecimaldigits|pdfcreationdate|pdfcopyfont|pdfcompresslevel|pdfcolorstackinit|pdfcolorstack|pdfcatalog|pdfannot|pdfadjustspacing|pausing|patterns|parskip|parshapelength|parshapeindent|parshapedimen|parshape|parindent|parfillskip|pardirection|par|pagetotal|pagestretch|pageshrink|pagegoal|pagefilstretch|pagefillstretch|pagefilllstretch|pagediscards|pagedepth|overwithdelims|overline|overfullrule|over|outputpenalty|outputbox|output|outer|orelse|ordlimits|or|openin|omit|numexpr|number|nullfont|nulldelimiterspace|novrule|nospaces|normalyear|normalxtokspre|normalxtoksapp|normalxspaceskip|normalxleaders|normalxdef|normalwordboundary|normalwidowpenalty|normalwidowpenalties|normalwd|normalvtop|normalvss|normalvsplit|normalvskip|normalvsize|normalvrule|normalvpack|normalvoffset|normalvfuzz|normalvfilneg|normalvfill|normalvfil|normalvcenter|normalvbox|normalvbadness|normalvalign|normalvadjust|normaluppercase|normalunvcopy|normalunvbox|normalunskip|normalunpenalty|normalunletprotected|normalunletfrozen|normalunless|normalunkern|normalunhcopy|normalunhbox|normalunexpanded|normalunderline|normaluchyph|normaluccode|normaltracingstats|normaltracingscantokens|normaltracingrestores|normaltracingparagraphs|normaltracingpages|normaltracingoutput|normaltracingonline|normaltracingnesting|normaltracingmacros|normaltracinglostchars|normaltracingifs|normaltracinggroups|normaltracingfonts|normaltracingcommands|normaltracingassigns|normaltpack|normaltopskip|normaltopmarks|normaltopmark|normaltolerance|normaltokspre|normaltoksdef|normaltoksapp|normaltoks|normaltime|normalthinmuskip|normalthickmuskip|normalthe|normaltextstyle|normaltextfont|normaltextdirection|normaltabskip|normalstring|normalsplittopskip|normalsplitmaxdepth|normalsplitfirstmarks|normalsplitfirstmark|normalsplitdiscards|normalsplitbotmarks|normalsplitbotmark|normalspan|normalspaceskip|normalspacefactor|normalskipdef|normalskip|normalskewchar|normalshowtokens|normalshowthe|normalshownodedetails|normalshowlists|normalshowifs|normalshowgroups|normalshowboxdepth|normalshowboxbreadth|normalshowbox|normalshow|normalshipout|normalshapemode|normalsfcode|normalsetlanguage|normalsetfontid|normalsetbox|normalscrollmode|normalscriptstyle|normalscriptspace|normalscriptscriptstyle|normalscriptscriptfont|normalscriptfont|normalscantokens|normalscantextokens|normalsavingvdiscards|normalsavinghyphcodes|normalsavecatcodetable|normalrpcode|normalromannumeral|normalrightskip|normalrightmarginkern|normalrighthyphenmin|normalrightghost|normalright|normalrelpenalty|normalrelax|normalreadline|normalread|normalraise|normalradical|normalquitvmode|normalpxdimen|normalprotrusionboundary|normalprotrudechars|normalprotected|normalprevgraf|normalprevdepth|normalpretolerance|normalprerelpenalty|normalprehyphenchar|normalpreexhyphenchar|normalpredisplaysize|normalpredisplaypenalty|normalpredisplaygapfactor|normalpredisplaydirection|normalprebinoppenalty|normalposthyphenchar|normalpostexhyphenchar|normalpostdisplaypenalty|normalpenalty|normalpdfximage|normalpdfxformresources|normalpdfxformname|normalpdfxformmargin|normalpdfxformattr|normalpdfxform|normalpdfvorigin|normalpdfuniqueresname|normalpdfuniformdeviate|normalpdftrailerid|normalpdftrailer|normalpdftracingfonts|normalpdfthreadmargin|normalpdfthread|normalpdftexversion|normalpdftexrevision|normalpdftexbanner|normalpdfsuppressptexinfo|normalpdfsuppressoptionalinfo|normalpdfstartthread|normalpdfstartlink|normalpdfsetrandomseed|normalpdfsetmatrix|normalpdfsavepos|normalpdfsave|normalpdfretval|normalpdfrestore|normalpdfreplacefont|normalpdfrefximage|normalpdfrefxform|normalpdfrefobj|normalpdfrecompress|normalpdfrandomseed|normalpdfpxdimen|normalpdfprotrudechars|normalpdfprimitive|normalpdfpkresolution|normalpdfpkmode|normalpdfpkfixeddpi|normalpdfpagewidth|normalpdfpagesattr|normalpdfpageresources|normalpdfpageref|normalpdfpageheight|normalpdfpagebox|normalpdfpageattr|normalpdfoutput|normalpdfoutline|normalpdfomitcidset|normalpdfomitcharset|normalpdfobjcompresslevel|normalpdfobj|normalpdfnormaldeviate|normalpdfnoligatures|normalpdfnames|normalpdfminorversion|normalpdfmapline|normalpdfmapfile|normalpdfmajorversion|normalpdfliteral|normalpdflinkmargin|normalpdflastypos|normalpdflastxpos|normalpdflastximagepages|normalpdflastximage|normalpdflastxform|normalpdflastobj|normalpdflastlink|normalpdflastlinedepth|normalpdflastannot|normalpdfinsertht|normalpdfinfoomitdate|normalpdfinfo|normalpdfinclusionerrorlevel|normalpdfinclusioncopyfonts|normalpdfincludechars|normalpdfimageresolution|normalpdfimagehicolor|normalpdfimagegamma|normalpdfimageapplygamma|normalpdfimageaddfilename|normalpdfignoreunknownimages|normalpdfignoreddimen|normalpdfhorigin|normalpdfglyphtounicode|normalpdfgentounicode|normalpdfgamma|normalpdffontsize|normalpdffontobjnum|normalpdffontname|normalpdffontexpand|normalpdffontattr|normalpdffirstlineheight|normalpdfendthread|normalpdfendlink|normalpdfeachlineheight|normalpdfeachlinedepth|normalpdfdraftmode|normalpdfdestmargin|normalpdfdest|normalpdfdecimaldigits|normalpdfcreationdate|normalpdfcopyfont|normalpdfcompresslevel|normalpdfcolorstackinit|normalpdfcolorstack|normalpdfcatalog|normalpdfannot|normalpdfadjustspacing|normalpausing|normalpatterns|normalparskip|normalparshapelength|normalparshapeindent|normalparshapedimen|normalparshape|normalparindent|normalparfillskip|normalpardirection|normalpar|normalpagetotal|normalpagestretch|normalpageshrink|normalpagegoal|normalpagefilstretch|normalpagefillstretch|normalpagefilllstretch|normalpagediscards|normalpagedepth|normaloverwithdelims|normaloverline|normaloverfullrule|normalover|normaloutputpenalty|normaloutputbox|normaloutput|normalouter|normalorelse|normalordlimits|normalor|normalopenin|normalomit|normalnumexpr|normalnumber|normalnullfont|normalnulldelimiterspace|normalnovrule|normalnospaces|normalnonstopmode|normalnonscript|normalnolimits|normalnoligs|normalnokerns|normalnoindent|normalnohrule|normalnoexpand|normalnoboundary|normalnoalign|normalnewlinechar|normalmutoglue|normalmuskipdef|normalmuskip|normalmultiply|normalmuexpr|normalmskip|normalmoveright|normalmoveleft|normalmonth|normalmkern|normalmiddle|normalmessage|normalmedmuskip|normalmeaning|normalmaxdepth|normalmaxdeadcycles|normalmathsurroundskip|normalmathsurroundmode|normalmathsurround|normalmathstyle|normalmathscriptsmode|normalmathscriptcharmode|normalmathscriptboxmode|normalmathrulethicknessmode|normalmathrulesmode|normalmathrulesfam|normalmathrel|normalmathpunct|normalmathpenaltiesmode|normalmathord|normalmathopen|normalmathop|normalmatholdmode|normalmathnolimitsmode|normalmathitalicsmode|normalmathinner|normalmathflattenmode|normalmatheqnogapstep|normalmathdisplayskipmode|normalmathdirection|normalmathdelimitersmode|normalmathcode|normalmathclose|normalmathchoice|normalmathchardef|normalmathchar|normalmathbin|normalmathaccent|normalmarks|normalmark|normalmag|normalluatexversion|normalluatexrevision|normalluatexbanner|normalluafunctioncall|normalluafunction|normalluaescapestring|normalluadef|normalluacopyinputnodes|normalluabytecodecall|normalluabytecode|normallpcode|normallowercase|normallower|normallooseness|normallong|normallocalrightbox|normallocalleftbox|normallocalinterlinepenalty|normallocalbrokenpenalty|normallinepenalty|normallinedirection|normallimits|normalletprotected|normalletfrozen|normalletcharcode|normallet|normalleqno|normalleftskip|normalleftmarginkern|normallefthyphenmin|normalleftghost|normalleft|normalleaders|normallccode|normallastskip|normallastpenalty|normallastnodetype|normallastnodesubtype|normallastnamedcs|normallastlinefit|normallastkern|normallastbox|normallanguage|normalkern|normaljobname|normalinternalcodesmode|normalinterlinepenalty|normalinterlinepenalties|normalinteractionmode|normalinsertpenalties|normalinsertht|normalinsert|normalinputlineno|normalinput|normalinitcatcodetable|normalindent|normalimmediateassignment|normalimmediateassigned|normalignorespaces|normalignorepars|normalifx|normalifvoid|normalifvmode|normalifvbox|normalifusercmd|normaliftrue|normaliftok|normalifprotected|normalifpdfprimitive|normalifpdfabsnum|normalifpdfabsdim|normalifodd|normalifnumval|normalifnum|normalifmmode|normalifinner|normalifincsname|normalifhmode|normalifhbox|normaliffrozen|normaliffontchar|normaliffalse|normalifeof|normalifdimval|normalifdim|normalifdefined|normalifcstok|normalifcsname|normalifcondition|normalifcmpnum|normalifcmpdim|normalifchknum|normalifchkdim|normalifcat|normalifcase|normalifabsnum|normalifabsdim|normalif|normalhyphenpenaltymode|normalhyphenpenalty|normalhyphenchar|normalhyphenationmin|normalhyphenationbounds|normalhyphenation|normalht|normalhss|normalhskip|normalhsize|normalhrule|normalhpack|normalholdinginserts|normalhoffset|normalhjcode|normalhfuzz|normalhfilneg|normalhfill|normalhfil|normalhbox|normalhbadness|normalhangindent|normalhangafter|normalhalign|normalgtokspre|normalgtoksapp|normalglyphdatafield|normalgluetomu|normalgluestretchorder|normalgluestretch|normalglueshrinkorder|normalglueshrink|normalglueexpr|normalglobaldefs|normalglobal|normalglet|normalgleaders|normalgdef|normalfuturelet|normalfutureexpandisap|normalfutureexpandis|normalfutureexpand|normalfrozen|normalformatname|normalfontname|normalfontid|normalfontdimen|normalfontcharwd|normalfontcharic|normalfontcharht|normalfontchardp|normalfont|normalfloatingpenalty|normalfixupboxesmode|normalfirstvalidlanguage|normalfirstmarks|normalfirstmark|normalfinalhyphendemerits|normalfi|normalfam|normalexplicithyphenpenalty|normalexplicitdiscretionary|normalexpanded|normalexpandafter|normalexhyphenpenalty|normalexhyphenchar|normalexceptionpenalty|normaleveryvbox|normaleverytab|normaleverypar|normaleverymath|normaleveryjob|normaleveryhbox|normaleveryeof|normaleverydisplay|normaleverycr|normaletokspre|normaletoksapp|normalescapechar|normalerrorstopmode|normalerrorcontextlines|normalerrmessage|normalerrhelp|normaleqno|normalendlocalcontrol|normalendlinechar|normalendinput|normalendgroup|normalendcsname|normalend|normalemergencystretch|normalelse|normalefcode|normaledef|normaldump|normaldp|normaldoublehyphendemerits|normaldivide|normaldisplaywidth|normaldisplaywidowpenalty|normaldisplaywidowpenalties|normaldisplaystyle|normaldisplaylimits|normaldisplayindent|normaldiscretionary|normaldirectlua|normaldimexpr|normaldimendef|normaldimen|normaldetokenize|normaldelimitershortfall|normaldelimiterfactor|normaldelimiter|normaldelcode|normaldefaultskewchar|normaldefaulthyphenchar|normaldef|normaldeadcycles|normalday|normalcurrentiftype|normalcurrentiflevel|normalcurrentifbranch|normalcurrentgrouptype|normalcurrentgrouplevel|normalcsstring|normalcsname|normalcrcr|normalcrampedtextstyle|normalcrampedscriptstyle|normalcrampedscriptscriptstyle|normalcrampeddisplaystyle|normalcr|normalcountdef|normalcount|normalcopy|normalcompoundhyphenmode|normalclubpenalty|normalclubpenalties|normalclosein|normalclearmarks|normalcleaders|normalchardef|normalchar|normalcatcodetable|normalcatcode|normalbrokenpenalty|normalbreakafterdirmode|normalboxyoffset|normalboxymove|normalboxxoffset|normalboxxmove|normalboxtotal|normalboxorientation|normalboxmaxdepth|normalboxdirection|normalboxattr|normalbox|normalboundary|normalbotmarks|normalbotmark|normalbinoppenalty|normalbelowdisplayskip|normalbelowdisplayshortskip|normalbeginlocalcontrol|normalbegingroup|normalbegincsname|normalbatchmode|normalbadness|normalautomatichyphenpenalty|normalautomatichyphenmode|normalautomaticdiscretionary|normalattributedef|normalattribute|normalatopwithdelims|normalatop|normalaligntab|normalalignmark|normalaftergrouped|normalaftergroup|normalafterassignment|normaladvance|normaladjustspacingstretch|normaladjustspacingstep|normaladjustspacingshrink|normaladjustspacing|normaladjdemerits|normalaccent|normalabovewithdelims|normalabovedisplayskip|normalabovedisplayshortskip|normalabove|normalXeTeXversion|normalUvextensible|normalUunderdelimiter|normalUsuperscript|normalUsubscript|normalUstopmath|normalUstopdisplaymath|normalUstartmath|normalUstartdisplaymath|normalUstack|normalUskewedwithdelims|normalUskewed|normalUroot|normalUright|normalUradical|normalUoverdelimiter|normalUnosuperscript|normalUnosubscript|normalUmiddle|normalUmathunderdelimitervgap|normalUmathunderdelimiterbgap|normalUmathunderbarvgap|normalUmathunderbarrule|normalUmathunderbarkern|normalUmathsupsubbottommax|normalUmathsupshiftup|normalUmathsupshiftdrop|normalUmathsupbottommin|normalUmathsubtopmax|normalUmathsubsupvgap|normalUmathsubsupshiftdown|normalUmathsubshiftdrop|normalUmathsubshiftdown|normalUmathstackvgap|normalUmathstacknumup|normalUmathstackdenomdown|normalUmathspaceafterscript|normalUmathskewedfractionvgap|normalUmathskewedfractionhgap|normalUmathrelrelspacing|normalUmathrelpunctspacing|normalUmathrelordspacing|normalUmathrelopspacing|normalUmathrelopenspacing|normalUmathrelinnerspacing|normalUmathrelclosespacing|normalUmathrelbinspacing|normalUmathradicalvgap|normalUmathradicalrule|normalUmathradicalkern|normalUmathradicaldegreeraise|normalUmathradicaldegreebefore|normalUmathradicaldegreeafter|normalUmathquad|normalUmathpunctrelspacing|normalUmathpunctpunctspacing|normalUmathpunctordspacing|normalUmathpunctopspacing|normalUmathpunctopenspacing|normalUmathpunctinnerspacing|normalUmathpunctclosespacing|normalUmathpunctbinspacing|normalUmathoverdelimitervgap|normalUmathoverdelimiterbgap|normalUmathoverbarvgap|normalUmathoverbarrule|normalUmathoverbarkern|normalUmathordrelspacing|normalUmathordpunctspacing|normalUmathordordspacing|normalUmathordopspacing|normalUmathordopenspacing|normalUmathordinnerspacing|normalUmathordclosespacing|normalUmathordbinspacing|normalUmathoprelspacing|normalUmathoppunctspacing|normalUmathopordspacing|normalUmathopopspacing|normalUmathopopenspacing|normalUmathopinnerspacing|normalUmathoperatorsize|normalUmathopenrelspacing|normalUmathopenpunctspacing|normalUmathopenordspacing|normalUmathopenopspacing|normalUmathopenopenspacing|normalUmathopeninnerspacing|normalUmathopenclosespacing|normalUmathopenbinspacing|normalUmathopclosespacing|normalUmathopbinspacing|normalUmathnolimitsupfactor|normalUmathnolimitsubfactor|normalUmathlimitbelowvgap|normalUmathlimitbelowkern|normalUmathlimitbelowbgap|normalUmathlimitabovevgap|normalUmathlimitabovekern|normalUmathlimitabovebgap|normalUmathinnerrelspacing|normalUmathinnerpunctspacing|normalUmathinnerordspacing|normalUmathinneropspacing|normalUmathinneropenspacing|normalUmathinnerinnerspacing|normalUmathinnerclosespacing|normalUmathinnerbinspacing|normalUmathfractionrule|normalUmathfractionnumvgap|normalUmathfractionnumup|normalUmathfractiondenomvgap|normalUmathfractiondenomdown|normalUmathfractiondelsize|normalUmathconnectoroverlapmin|normalUmathcodenum|normalUmathcode|normalUmathcloserelspacing|normalUmathclosepunctspacing|normalUmathcloseordspacing|normalUmathcloseopspacing|normalUmathcloseopenspacing|normalUmathcloseinnerspacing|normalUmathcloseclosespacing|normalUmathclosebinspacing|normalUmathcharslot|normalUmathcharnumdef|normalUmathcharnum|normalUmathcharfam|normalUmathchardef|normalUmathcharclass|normalUmathchar|normalUmathbinrelspacing|normalUmathbinpunctspacing|normalUmathbinordspacing|normalUmathbinopspacing|normalUmathbinopenspacing|normalUmathbininnerspacing|normalUmathbinclosespacing|normalUmathbinbinspacing|normalUmathaxis|normalUmathaccent|normalUleft|normalUhextensible|normalUdelimiterunder|normalUdelimiterover|normalUdelimiter|normalUdelcodenum|normalUdelcode|normalUchar|normalOmegaversion|normalOmegarevision|normalOmegaminorversion|normalAlephversion|normalAlephrevision|normalAlephminorversion|normal |nonstopmode|nonscript|nolimits|noligs|nokerns|noindent|nohrule|noexpand|noboundary|noalign|newlinechar|mutoglue|muskipdef|muskip|multiply|muexpr|mskip|moveright|moveleft|month|mkern|middle|message|medmuskip|meaning|maxdepth|maxdeadcycles|mathsurroundskip|mathsurroundmode|mathsurround|mathstyle|mathscriptsmode|mathscriptcharmode|mathscriptboxmode|mathrulethicknessmode|mathrulesmode|mathrulesfam|mathrel|mathpunct|mathpenaltiesmode|mathord|mathopen|mathop|matholdmode|mathnolimitsmode|mathitalicsmode|mathinner|mathflattenmode|matheqnogapstep|mathdisplayskipmode|mathdirection|mathdelimitersmode|mathcode|mathclose|mathchoice|mathchardef|mathchar|mathbin|mathaccent|marks|mark|mag|luatexversion|luatexrevision|luatexbanner|luafunctioncall|luafunction|luaescapestring|luadef|luacopyinputnodes|luabytecodecall|luabytecode|lpcode|lowercase|lower|looseness|long|localrightbox|localleftbox|localinterlinepenalty|localbrokenpenalty|lineskiplimit|lineskip|linepenalty|linedirection|limits|letprotected|letfrozen|letcharcode|let|leqno|leftskip|leftmarginkern|lefthyphenmin|leftghost|left|leaders|lccode|lastskip|lastpenalty|lastnodetype|lastnodesubtype|lastnamedcs|lastlinefit|lastkern|lastbox|language|kern|jobname|internalcodesmode|interlinepenalty|interlinepenalties|interactionmode|insertpenalties|insertht|insert|inputlineno|input|initcatcodetable|indent|immediateassignment|immediateassigned|ignorespaces|ignorepars|ifx|ifvoid|ifvmode|ifvbox|ifusercmd|iftrue|iftok|ifprotected|ifpdfprimitive|ifpdfabsnum|ifpdfabsdim|ifodd|ifnumval|ifnum|ifmmode|ifinner|ifincsname|ifhmode|ifhbox|iffrozen|iffontchar|iffalse|ifeof|ifdimval|ifdim|ifdefined|ifcstok|ifcsname|ifcondition|ifcmpnum|ifcmpdim|ifchknum|ifchkdim|ifcat|ifcase|ifabsnum|ifabsdim|if|hyphenpenaltymode|hyphenpenalty|hyphenchar|hyphenationmin|hyphenationbounds|hyphenation|ht|hss|hskip|hsize|hrule|hpack|holdinginserts|hoffset|hjcode|hfuzz|hfilneg|hfill|hfil|hbox|hbadness|hangindent|hangafter|halign|gtokspre|gtoksapp|glyphdatafield|gluetomu|gluestretchorder|gluestretch|glueshrinkorder|glueshrink|glueexpr|globaldefs|global|gleaders|gdef|futurelet|futureexpandisap|futureexpandis|futureexpand|frozen|formatname|fontname|fontid|fontdimen|fontcharwd|fontcharic|fontcharht|fontchardp|font|floatingpenalty|fixupboxesmode|firstvalidlanguage|firstmarks|firstmark|finalhyphendemerits|fi|fam|explicithyphenpenalty|explicitdiscretionary|expandafter|exhyphenpenalty|exhyphenchar|exceptionpenalty|everyvbox|everytab|everypar|everymath|everyjob|everyhbox|everyeof|everydisplay|everycr|etokspre|etoksapp|escapechar|errorstopmode|errorcontextlines|errmessage|errhelp|eqno|endlocalcontrol|endlinechar|endinput|endgroup|endcsname|end|emergencystretch|else|efcode|edef|dump|dp|doublehyphendemerits|divide|displaywidth|displaywidowpenalty|displaywidowpenalties|displaystyle|displaylimits|displayindent|discretionary|directlua|dimexpr|dimendef|dimen|detokenize|delimitershortfall|delimiterfactor|delimiter|delcode|defaultskewchar|defaulthyphenchar|def|deadcycles|day|currentiftype|currentiflevel|currentifbranch|currentgrouptype|currentgrouplevel|csstring|csname|crcr|crampedtextstyle|crampedscriptstyle|crampedscriptscriptstyle|crampeddisplaystyle|cr|countdef|count|copy|compoundhyphenmode|clubpenalty|clubpenalties|closein|clearmarks|cleaders|chardef|char|catcodetable|catcode|brokenpenalty|breakafterdirmode|boxyoffset|boxymove|boxxoffset|boxxmove|boxtotal|boxorientation|boxmaxdepth|boxdirection|boxattr|box|boundary|botmarks|botmark|binoppenalty|belowdisplayskip|belowdisplayshortskip|beginlocalcontrol|begingroup|begincsname|batchmode|baselineskip|badness|automatichyphenpenalty|automatichyphenmode|automaticdiscretionary|attributedef|attribute|atopwithdelims|atop|aligntab|alignmark|aftergrouped|aftergroup|afterassignment|advance|adjustspacingstretch|adjustspacingstep|adjustspacingshrink|adjustspacing|adjdemerits|accent|abovewithdelims|abovedisplayskip|abovedisplayshortskip|above|XeTeXversion|Uvextensible|Uunderdelimiter|Usuperscript|Usubscript|Ustopmath|Ustopdisplaymath|Ustartmath|Ustartdisplaymath|Ustack|Uskewedwithdelims|Uskewed|Uroot|Uright|Uradical|Uoverdelimiter|Unosuperscript|Unosubscript|Umiddle|Umathunderdelimitervgap|Umathunderdelimiterbgap|Umathunderbarvgap|Umathunderbarrule|Umathunderbarkern|Umathsupsubbottommax|Umathsupshiftup|Umathsupshiftdrop|Umathsupbottommin|Umathsubtopmax|Umathsubsupvgap|Umathsubsupshiftdown|Umathsubshiftdrop|Umathsubshiftdown|Umathstackvgap|Umathstacknumup|Umathstackdenomdown|Umathspaceafterscript|Umathskewedfractionvgap|Umathskewedfractionhgap|Umathrelrelspacing|Umathrelpunctspacing|Umathrelordspacing|Umathrelopspacing|Umathrelopenspacing|Umathrelinnerspacing|Umathrelclosespacing|Umathrelbinspacing|Umathradicalvgap|Umathradicalrule|Umathradicalkern|Umathradicaldegreeraise|Umathradicaldegreebefore|Umathradicaldegreeafter|Umathquad|Umathpunctrelspacing|Umathpunctpunctspacing|Umathpunctordspacing|Umathpunctopspacing|Umathpunctopenspacing|Umathpunctinnerspacing|Umathpunctclosespacing|Umathpunctbinspacing|Umathoverdelimitervgap|Umathoverdelimiterbgap|Umathoverbarvgap|Umathoverbarrule|Umathoverbarkern|Umathordrelspacing|Umathordpunctspacing|Umathordordspacing|Umathordopspacing|Umathordopenspacing|Umathordinnerspacing|Umathordclosespacing|Umathordbinspacing|Umathoprelspacing|Umathoppunctspacing|Umathopordspacing|Umathopopspacing|Umathopopenspacing|Umathopinnerspacing|Umathoperatorsize|Umathopenrelspacing|Umathopenpunctspacing|Umathopenordspacing|Umathopenopspacing|Umathopenopenspacing|Umathopeninnerspacing|Umathopenclosespacing|Umathopenbinspacing|Umathopclosespacing|Umathopbinspacing|Umathnolimitsupfactor|Umathnolimitsubfactor|Umathlimitbelowvgap|Umathlimitbelowkern|Umathlimitbelowbgap|Umathlimitabovevgap|Umathlimitabovekern|Umathlimitabovebgap|Umathinnerrelspacing|Umathinnerpunctspacing|Umathinnerordspacing|Umathinneropspacing|Umathinneropenspacing|Umathinnerinnerspacing|Umathinnerclosespacing|Umathinnerbinspacing|Umathfractionrule|Umathfractionnumvgap|Umathfractionnumup|Umathfractiondenomvgap|Umathfractiondenomdown|Umathfractiondelsize|Umathconnectoroverlapmin|Umathcodenum|Umathcode|Umathcloserelspacing|Umathclosepunctspacing|Umathcloseordspacing|Umathcloseopspacing|Umathcloseopenspacing|Umathcloseinnerspacing|Umathcloseclosespacing|Umathclosebinspacing|Umathcharslot|Umathcharnumdef|Umathcharnum|Umathcharfam|Umathchardef|Umathcharclass|Umathchar|Umathbinrelspacing|Umathbinpunctspacing|Umathbinordspacing|Umathbinopspacing|Umathbinopenspacing|Umathbininnerspacing|Umathbinclosespacing|Umathbinbinspacing|Umathaxis|Umathaccent|Uleft|Uhextensible|Udelimiterunder|Udelimiterover|Udelimiter|Udelcodenum|Udelcode|Uchar|Omegaversion|Omegarevision|Omegaminorversion|Alephversion|Alephrevision|Alephminorversion| )(?=[^a-zA-Z])",
+ "match" : "\u005C\u005C(year|xtokspre|xtoksapp|xspaceskip|xleaders|xdefcsname|xdef|wrapuppar|wordboundary|widowpenalty|widowpenalties|wd|vtop|vss|vsplit|vskip|vsize|vrule|vpack|vfuzz|vfilneg|vfill|vfil|vcenter|vbox|vbadness|valign|vadjust|uppercase|unvpack|unvcopy|unvbox|unskip|unpenalty|unletprotected|unletfrozen|unless|unkern|unhpack|unhcopy|unhbox|underline|undent|uchyph|uccode|tracingstats|tracingrestores|tracingparagraphs|tracingpages|tracingoutput|tracingonline|tracingnesting|tracingmath|tracingmacros|tracinglostchars|tracingifs|tracinggroups|tracingfonts|tracingcommands|tracingassigns|tracingalignments|tpack|toscaled|topskip|topmarks|topmark|tolerant|tolerance|tokspre|toksdef|toksapp|toks|tokenized|tointeger|todimension|time|thinmuskip|thickmuskip|thewithoutunit|the|textstyle|textfont|textdirection|tabskip|swapcsvalues|supmarkmode|string|splittopskip|splitmaxdepth|splitfirstmarks|splitfirstmark|splitdiscards|splitbotmarks|splitbotmark|span|spaceskip|spacefactor|snapshotpar|skipdef|skip|skewchar|showtokens|showthe|shownodedetails|showlists|showifs|showgroups|showboxdepth|showboxbreadth|showbox|show|shipout|sfcode|setlanguage|setfontid|setbox|scrollmode|scriptstyle|scriptspace|scriptscriptstyle|scriptscriptfont|scriptfont|scantokens|scantextokens|scaledfontdimen|savingvdiscards|savinghyphcodes|savecatcodetable|rpcode|romannumeral|rightskip|rightmarginkern|righthyphenmin|right|relpenalty|relax|raise|radical|quitvmode|pxdimen|protrusionboundary|protrudechars|protected|prevgraf|prevdepth|pretolerance|prerelpenalty|prehyphenchar|preexhyphenchar|predisplaysize|predisplaypenalty|predisplaygapfactor|predisplaydirection|prebinoppenalty|posthyphenchar|postexhyphenchar|postdisplaypenalty|permanent|penalty|pdfximage|pdfxformresources|pdfxformname|pdfxformmargin|pdfxformattr|pdfxform|pdfvorigin|pdfuniqueresname|pdfuniformdeviate|pdftrailerid|pdftrailer|pdftracingfonts|pdfthreadmargin|pdfthread|pdftexversion|pdftexrevision|pdftexbanner|pdfsuppressptexinfo|pdfsuppressoptionalinfo|pdfstartthread|pdfstartlink|pdfsetrandomseed|pdfsetmatrix|pdfsavepos|pdfsave|pdfretval|pdfrestore|pdfreplacefont|pdfrefximage|pdfrefxform|pdfrefobj|pdfrecompress|pdfrandomseed|pdfpxdimen|pdfprotrudechars|pdfprimitive|pdfpkresolution|pdfpkmode|pdfpkfixeddpi|pdfpagewidth|pdfpagesattr|pdfpageresources|pdfpageref|pdfpageheight|pdfpagebox|pdfpageattr|pdfoutput|pdfoutline|pdfomitcidset|pdfomitcharset|pdfobjcompresslevel|pdfobj|pdfnormaldeviate|pdfnoligatures|pdfnames|pdfminorversion|pdfmapline|pdfmapfile|pdfmajorversion|pdfliteral|pdflinkmargin|pdflastypos|pdflastxpos|pdflastximagepages|pdflastximage|pdflastxform|pdflastobj|pdflastlink|pdflastlinedepth|pdflastannot|pdfinsertht|pdfinfoomitdate|pdfinfo|pdfinclusionerrorlevel|pdfinclusioncopyfonts|pdfincludechars|pdfimageresolution|pdfimagehicolor|pdfimagegamma|pdfimageapplygamma|pdfimageaddfilename|pdfignoreunknownimages|pdfignoreddimen|pdfhorigin|pdfglyphtounicode|pdfgentounicode|pdfgamma|pdffontsize|pdffontobjnum|pdffontname|pdffontexpand|pdffontattr|pdffirstlineheight|pdfendthread|pdfendlink|pdfeachlineheight|pdfeachlinedepth|pdfdraftmode|pdfdestmargin|pdfdest|pdfdecimaldigits|pdfcreationdate|pdfcopyfont|pdfcompresslevel|pdfcolorstackinit|pdfcolorstack|pdfcatalog|pdfannot|pdfadjustspacing|pausing|patterns|parskip|parshapelength|parshapeindent|parshapedimen|parshape|parindent|parfillskip|pardirection|parattr|parametercount|par|pagetotal|pagestretch|pageshrink|pagegoal|pagefilstretch|pagefillstretch|pagefilllstretch|pagediscards|pagedepth|overwithdelims|overshoot|overloadmode|overloaded|overline|overfullrule|over|outputpenalty|outputbox|output|outer|orunless|orelse|ordlimits|or|omit|numexpr|numericscale|number|nullfont|nulldelimiterspace|novrule|nospaces|normalyear|normalxtokspre|normalxtoksapp|normalxspaceskip|normalxleaders|normalxdefcsname|normalxdef|normalwrapuppar|normalwordboundary|normalwidowpenalty|normalwidowpenalties|normalwd|normalvtop|normalvss|normalvsplit|normalvskip|normalvsize|normalvrule|normalvpack|normalvfuzz|normalvfilneg|normalvfill|normalvfil|normalvcenter|normalvbox|normalvbadness|normalvalign|normalvadjust|normaluppercase|normalunvpack|normalunvcopy|normalunvbox|normalunskip|normalunpenalty|normalunletprotected|normalunletfrozen|normalunless|normalunkern|normalunhpack|normalunhcopy|normalunhbox|normalunexpanded|normalunderline|normalundent|normaluchyph|normaluccode|normaltracingstats|normaltracingrestores|normaltracingparagraphs|normaltracingpages|normaltracingoutput|normaltracingonline|normaltracingnesting|normaltracingmath|normaltracingmacros|normaltracinglostchars|normaltracingifs|normaltracinggroups|normaltracingfonts|normaltracingcommands|normaltracingassigns|normaltracingalignments|normaltpack|normaltoscaled|normaltopskip|normaltopmarks|normaltopmark|normaltolerant|normaltolerance|normaltokspre|normaltoksdef|normaltoksapp|normaltoks|normaltokenized|normaltointeger|normaltodimension|normaltime|normalthinmuskip|normalthickmuskip|normalthewithoutunit|normalthe|normaltextstyle|normaltextfont|normaltextdirection|normaltabskip|normalswapcsvalues|normalsupmarkmode|normalstring|normalsplittopskip|normalsplitmaxdepth|normalsplitfirstmarks|normalsplitfirstmark|normalsplitdiscards|normalsplitbotmarks|normalsplitbotmark|normalspan|normalspaceskip|normalspacefactor|normalsnapshotpar|normalskipdef|normalskip|normalskewchar|normalshowtokens|normalshowthe|normalshownodedetails|normalshowlists|normalshowifs|normalshowgroups|normalshowboxdepth|normalshowboxbreadth|normalshowbox|normalshow|normalshipout|normalsfcode|normalsetlanguage|normalsetfontid|normalsetbox|normalscrollmode|normalscriptstyle|normalscriptspace|normalscriptscriptstyle|normalscriptscriptfont|normalscriptfont|normalscantokens|normalscantextokens|normalscaledfontdimen|normalsavingvdiscards|normalsavinghyphcodes|normalsavecatcodetable|normalrpcode|normalromannumeral|normalrightskip|normalrightmarginkern|normalrighthyphenmin|normalright|normalrelpenalty|normalrelax|normalraise|normalradical|normalquitvmode|normalpxdimen|normalprotrusionboundary|normalprotrudechars|normalprotected|normalprevgraf|normalprevdepth|normalpretolerance|normalprerelpenalty|normalprehyphenchar|normalpreexhyphenchar|normalpredisplaysize|normalpredisplaypenalty|normalpredisplaygapfactor|normalpredisplaydirection|normalprebinoppenalty|normalposthyphenchar|normalpostexhyphenchar|normalpostdisplaypenalty|normalpermanent|normalpenalty|normalpdfximage|normalpdfxformresources|normalpdfxformname|normalpdfxformmargin|normalpdfxformattr|normalpdfxform|normalpdfvorigin|normalpdfuniqueresname|normalpdfuniformdeviate|normalpdftrailerid|normalpdftrailer|normalpdftracingfonts|normalpdfthreadmargin|normalpdfthread|normalpdftexversion|normalpdftexrevision|normalpdftexbanner|normalpdfsuppressptexinfo|normalpdfsuppressoptionalinfo|normalpdfstartthread|normalpdfstartlink|normalpdfsetrandomseed|normalpdfsetmatrix|normalpdfsavepos|normalpdfsave|normalpdfretval|normalpdfrestore|normalpdfreplacefont|normalpdfrefximage|normalpdfrefxform|normalpdfrefobj|normalpdfrecompress|normalpdfrandomseed|normalpdfpxdimen|normalpdfprotrudechars|normalpdfprimitive|normalpdfpkresolution|normalpdfpkmode|normalpdfpkfixeddpi|normalpdfpagewidth|normalpdfpagesattr|normalpdfpageresources|normalpdfpageref|normalpdfpageheight|normalpdfpagebox|normalpdfpageattr|normalpdfoutput|normalpdfoutline|normalpdfomitcidset|normalpdfomitcharset|normalpdfobjcompresslevel|normalpdfobj|normalpdfnormaldeviate|normalpdfnoligatures|normalpdfnames|normalpdfminorversion|normalpdfmapline|normalpdfmapfile|normalpdfmajorversion|normalpdfliteral|normalpdflinkmargin|normalpdflastypos|normalpdflastxpos|normalpdflastximagepages|normalpdflastximage|normalpdflastxform|normalpdflastobj|normalpdflastlink|normalpdflastlinedepth|normalpdflastannot|normalpdfinsertht|normalpdfinfoomitdate|normalpdfinfo|normalpdfinclusionerrorlevel|normalpdfinclusioncopyfonts|normalpdfincludechars|normalpdfimageresolution|normalpdfimagehicolor|normalpdfimagegamma|normalpdfimageapplygamma|normalpdfimageaddfilename|normalpdfignoreunknownimages|normalpdfignoreddimen|normalpdfhorigin|normalpdfglyphtounicode|normalpdfgentounicode|normalpdfgamma|normalpdffontsize|normalpdffontobjnum|normalpdffontname|normalpdffontexpand|normalpdffontattr|normalpdffirstlineheight|normalpdfendthread|normalpdfendlink|normalpdfeachlineheight|normalpdfeachlinedepth|normalpdfdraftmode|normalpdfdestmargin|normalpdfdest|normalpdfdecimaldigits|normalpdfcreationdate|normalpdfcopyfont|normalpdfcompresslevel|normalpdfcolorstackinit|normalpdfcolorstack|normalpdfcatalog|normalpdfannot|normalpdfadjustspacing|normalpausing|normalpatterns|normalparskip|normalparshapelength|normalparshapeindent|normalparshapedimen|normalparshape|normalparindent|normalparfillskip|normalparfillleftskip|normalpardirection|normalparattr|normalparametercount|normalpar|normalpagetotal|normalpagestretch|normalpageshrink|normalpagegoal|normalpagefilstretch|normalpagefillstretch|normalpagefilllstretch|normalpagediscards|normalpagedepth|normaloverwithdelims|normalovershoot|normaloverloadmode|normaloverloaded|normaloverline|normaloverfullrule|normalover|normaloutputpenalty|normaloutputbox|normaloutput|normalouter|normalorunless|normalorelse|normalordlimits|normalor|normalomit|normalnumexpr|normalnumericscale|normalnumber|normalnullfont|normalnulldelimiterspace|normalnovrule|normalnospaces|normalnormalizelinemode|normalnorelax|normalnonstopmode|normalnonscript|normalnolimits|normalnoindent|normalnohrule|normalnoexpand|normalnoboundary|normalnoaligned|normalnoalign|normalnewlinechar|normalmutoglue|normalmutable|normalmuskipdef|normalmuskip|normalmultiply|normalmugluespecdef|normalmuexpr|normalmskip|normalmoveright|normalmoveleft|normalmonth|normalmkern|normalmiddle|normalmessage|normalmedmuskip|normalmeaningless|normalmeaningfull|normalmeaning|normalmaxdepth|normalmaxdeadcycles|normalmathsurroundskip|normalmathsurroundmode|normalmathsurround|normalmathstyle|normalmathscriptsmode|normalmathscriptcharmode|normalmathscriptboxmode|normalmathscale|normalmathrulethicknessmode|normalmathrulesmode|normalmathrulesfam|normalmathrel|normalmathpunct|normalmathpenaltiesmode|normalmathord|normalmathopen|normalmathop|normalmathnolimitsmode|normalmathitalicsmode|normalmathinner|normalmathflattenmode|normalmatheqnogapstep|normalmathdisplayskipmode|normalmathdirection|normalmathdelimitersmode|normalmathcode|normalmathclose|normalmathchoice|normalmathchardef|normalmathchar|normalmathbin|normalmathaccent|normalmarks|normalmark|normalluatexversion|normalluatexrevision|normalluatexbanner|normalluafunctioncall|normalluafunction|normalluaescapestring|normalluadef|normalluacopyinputnodes|normalluabytecodecall|normalluabytecode|normallpcode|normallowercase|normallower|normallooseness|normallong|normallocalrightbox|normallocalleftbox|normallocalinterlinepenalty|normallocalcontrolled|normallocalcontrol|normallocalbrokenpenalty|normallistcallbackmode|normallineskiplimit|normallineskip|normallinepenalty|normallinepar|normallinedirection|normallimits|normalletprotected|normalletfrozen|normalletcsname|normalletcharcode|normallet|normalleqno|normalleftskip|normalleftmarginkern|normallefthyphenmin|normalleft|normalleaders|normallccode|normallastskip|normallastpenalty|normallastnodetype|normallastnodesubtype|normallastnamedcs|normallastlinefit|normallastkern|normallastchknum|normallastchkdim|normallastbox|normallastarguments|normallanguage|normalkern|normaljobname|normalizelinemode|normalinterlinepenalty|normalinterlinepenalties|normalinteractionmode|normalintegerdef|normalinstance|normalinsertpenalties|normalinsertht|normalinsertheights|normalinsert|normalinputlineno|normalinput|normalinitcatcodetable|normalindent|normalimmutable|normalimmediate|normalignorespaces|normalignorepars|normalignorearguments|normalifx|normalifvoid|normalifvmode|normalifvbox|normaliftrue|normaliftok|normalifrelax|normalifpdfprimitive|normalifpdfabsnum|normalifpdfabsdim|normalifparameters|normalifparameter|normalifodd|normalifnumval|normalifnum|normalifmmode|normalifmathstyle|normalifmathparameter|normalifinner|normalifincsname|normalifhmode|normalifhbox|normalifhasxtoks|normalifhastoks|normalifhastok|normaliffontchar|normalifflags|normaliffalse|normalifempty|normalifdimval|normalifdim|normalifdefined|normalifcstok|normalifcsname|normalifcondition|normalifcmpnum|normalifcmpdim|normalifchknum|normalifchkdim|normalifcat|normalifcase|normalifboolean|normalifarguments|normalifabsnum|normalifabsdim|normalif|normalhyphenpenalty|normalhyphenchar|normalhyphenationmode|normalhyphenationmin|normalhyphenation|normalht|normalhss|normalhskip|normalhsize|normalhrule|normalhpack|normalholdinginserts|normalhjcode|normalhfuzz|normalhfilneg|normalhfill|normalhfil|normalhbox|normalhbadness|normalhangindent|normalhangafter|normalhalign|normalgtokspre|normalgtoksapp|normalglyphyscale|normalglyphyoffset|normalglyphxscale|normalglyphxoffset|normalglyphtextscale|normalglyphstatefield|normalglyphscriptscriptscale|normalglyphscriptscale|normalglyphscriptfield|normalglyphscale|normalglyphoptions|normalglyphdatafield|normalglyph|normalgluetomu|normalgluestretchorder|normalgluestretch|normalgluespecdef|normalglueshrinkorder|normalglueshrink|normalglueexpr|normalglobaldefs|normalglobal|normalgletcsname|normalglet|normalgleaders|normalgdefcsname|normalgdef|normalfuturelet|normalfutureexpandisap|normalfutureexpandis|normalfutureexpand|normalfuturedef|normalfrozen|normalformatname|normalfontspecifiedsize|normalfontspecifiedname|normalfontname|normalfontid|normalfontdimen|normalfontcharwd|normalfontcharic|normalfontcharht|normalfontchardp|normalfont|normalfloatingpenalty|normalfirstvalidlanguage|normalfirstmarks|normalfirstmark|normalfinalhyphendemerits|normalfi|normalfam|normalexplicithyphenpenalty|normalexplicitdiscretionary|normalexpandtoken|normalexpanded|normalexpandcstoken|normalexpandafterspaces|normalexpandafterpars|normalexpandafter|normalexpand|normalexhyphenpenalty|normalexhyphenchar|normalexceptionpenalty|normaleveryvbox|normaleverytab|normaleverypar|normaleverymath|normaleveryjob|normaleveryhbox|normaleveryeof|normaleverydisplay|normaleverycr|normaletokspre|normaletoksapp|normalescapechar|normalerrorstopmode|normalerrorcontextlines|normalerrmessage|normalerrhelp|normaleqno|normalenforced|normalendlocalcontrol|normalendlinechar|normalendinput|normalendgroup|normalendcsname|normalend|normalemergencystretch|normalelse|normalefcode|normaledefcsname|normaledef|normaldump|normaldp|normaldoublehyphendemerits|normaldivide|normaldisplaywidth|normaldisplaywidowpenalty|normaldisplaywidowpenalties|normaldisplaystyle|normaldisplaylimits|normaldisplayindent|normaldiscretionary|normaldirectlua|normaldimexpr|normaldimensiondef|normaldimendef|normaldimen|normaldetokenize|normaldelimitershortfall|normaldelimiterfactor|normaldelimiter|normaldelcode|normaldefcsname|normaldefaultskewchar|normaldefaulthyphenchar|normaldef|normaldeadcycles|normalday|normalcurrentiftype|normalcurrentiflevel|normalcurrentifbranch|normalcurrentgrouptype|normalcurrentgrouplevel|normalcsstring|normalcsname|normalcrcr|normalcrampedtextstyle|normalcrampedscriptstyle|normalcrampedscriptscriptstyle|normalcrampeddisplaystyle|normalcr|normalcountdef|normalcount|normalcopy|normalclubpenalty|normalclubpenalties|normalclearmarks|normalcleaders|normalchardef|normalchar|normalcatcodetable|normalcatcode|normalbrokenpenalty|normalboxyoffset|normalboxymove|normalboxxoffset|normalboxxmove|normalboxtotal|normalboxorientation|normalboxmaxdepth|normalboxdirection|normalboxattribute|normalbox|normalboundary|normalbotmarks|normalbotmark|normalbinoppenalty|normalbelowdisplayskip|normalbelowdisplayshortskip|normalbeginlocalcontrol|normalbegingroup|normalbegincsname|normalbatchmode|normalbaselineskip|normalbadness|normalautomigrationmode|normalautomatichyphenpenalty|normalautomaticdiscretionary|normalattributedef|normalattribute|normalatopwithdelims|normalatop|normalatendofgrouped|normalatendofgroup|normalaligntab|normalalignmark|normalaliased|normalaftergrouped|normalaftergroup|normalafterassignment|normalafterassigned|normaladvance|normaladjustspacingstretch|normaladjustspacingstep|normaladjustspacingshrink|normaladjustspacing|normaladjdemerits|normalaccent|normalabovewithdelims|normalabovedisplayskip|normalabovedisplayshortskip|normalabove|normalXeTeXversion|normalUvextensible|normalUunderdelimiter|normalUsuperscript|normalUsuperprescript|normalUsubscript|normalUsubprescript|normalUstyle|normalUstopmath|normalUstopdisplaymath|normalUstartmath|normalUstartdisplaymath|normalUstack|normalUskewedwithdelims|normalUskewed|normalUroot|normalUright|normalUradical|normalUoverwithdelims|normalUoverdelimiter|normalUover|normalUnosuperscript|normalUnosuperprescript|normalUnosubscript|normalUnosubprescript|normalUmiddle|normalUmathunderdelimitervgap|normalUmathunderdelimiterbgap|normalUmathunderbarvgap|normalUmathunderbarrule|normalUmathunderbarkern|normalUmathsupsubbottommax|normalUmathsupshiftup|normalUmathsupshiftdrop|normalUmathsupbottommin|normalUmathsubtopmax|normalUmathsubsupvgap|normalUmathsubsupshiftdown|normalUmathsubshiftdrop|normalUmathsubshiftdown|normalUmathstackvgap|normalUmathstacknumup|normalUmathstackdenomdown|normalUmathspacingmode|normalUmathspacebeforescript|normalUmathspaceafterscript|normalUmathskewedfractionvgap|normalUmathskewedfractionhgap|normalUmathrelrelspacing|normalUmathrelpunctspacing|normalUmathrelordspacing|normalUmathrelopspacing|normalUmathrelopenspacing|normalUmathrelinnerspacing|normalUmathrelclosespacing|normalUmathrelbinspacing|normalUmathradicalvgap|normalUmathradicalrule|normalUmathradicalkern|normalUmathradicaldegreeraise|normalUmathradicaldegreebefore|normalUmathradicaldegreeafter|normalUmathquad|normalUmathpunctrelspacing|normalUmathpunctpunctspacing|normalUmathpunctordspacing|normalUmathpunctopspacing|normalUmathpunctopenspacing|normalUmathpunctinnerspacing|normalUmathpunctclosespacing|normalUmathpunctbinspacing|normalUmathoverdelimitervgap|normalUmathoverdelimiterbgap|normalUmathoverbarvgap|normalUmathoverbarrule|normalUmathoverbarkern|normalUmathordrelspacing|normalUmathordpunctspacing|normalUmathordordspacing|normalUmathordopspacing|normalUmathordopenspacing|normalUmathordinnerspacing|normalUmathordclosespacing|normalUmathordbinspacing|normalUmathoprelspacing|normalUmathoppunctspacing|normalUmathopordspacing|normalUmathopopspacing|normalUmathopopenspacing|normalUmathopinnerspacing|normalUmathoperatorsize|normalUmathopenrelspacing|normalUmathopenpunctspacing|normalUmathopenordspacing|normalUmathopenopspacing|normalUmathopenopenspacing|normalUmathopeninnerspacing|normalUmathopenclosespacing|normalUmathopenbinspacing|normalUmathopclosespacing|normalUmathopbinspacing|normalUmathnolimitsupfactor|normalUmathnolimitsubfactor|normalUmathlimitbelowvgap|normalUmathlimitbelowkern|normalUmathlimitbelowbgap|normalUmathlimitabovevgap|normalUmathlimitabovekern|normalUmathlimitabovebgap|normalUmathinnerrelspacing|normalUmathinnerpunctspacing|normalUmathinnerordspacing|normalUmathinneropspacing|normalUmathinneropenspacing|normalUmathinnerinnerspacing|normalUmathinnerclosespacing|normalUmathinnerbinspacing|normalUmathfractionrule|normalUmathfractionnumvgap|normalUmathfractionnumup|normalUmathfractiondenomvgap|normalUmathfractiondenomdown|normalUmathfractiondelsize|normalUmathconnectoroverlapmin|normalUmathcodenum|normalUmathcode|normalUmathcloserelspacing|normalUmathclosepunctspacing|normalUmathcloseordspacing|normalUmathcloseopspacing|normalUmathcloseopenspacing|normalUmathcloseinnerspacing|normalUmathcloseclosespacing|normalUmathclosebinspacing|normalUmathclass|normalUmathcharslot|normalUmathcharnumdef|normalUmathcharnum|normalUmathcharfam|normalUmathchardef|normalUmathcharclass|normalUmathchar|normalUmathbinrelspacing|normalUmathbinpunctspacing|normalUmathbinordspacing|normalUmathbinopspacing|normalUmathbinopenspacing|normalUmathbininnerspacing|normalUmathbinclosespacing|normalUmathbinbinspacing|normalUmathaxis|normalUmathaccentbaseheight|normalUmathaccent|normalUleft|normalUhextensible|normalUdelimiterunder|normalUdelimiterover|normalUdelimiter|normalUdelcodenum|normalUdelcode|normalUchar|normalUatopwithdelims|normalUatop|normalUabovewithdelims|normalUabove|normalUUskewedwithdelims|normalUUskewed|normalOmegaversion|normalOmegarevision|normalOmegaminorversion|normalAlephversion|normalAlephrevision|normalAlephminorversion|normal |norelax|nonstopmode|nonscript|nolimits|noindent|nohrule|noexpand|noboundary|noaligned|noalign|newlinechar|mutoglue|mutable|muskipdef|muskip|multiply|mugluespecdef|muexpr|mskip|moveright|moveleft|month|mkern|middle|message|medmuskip|meaningless|meaningfull|meaning|maxdepth|maxdeadcycles|mathsurroundskip|mathsurroundmode|mathsurround|mathstyle|mathscriptsmode|mathscriptcharmode|mathscriptboxmode|mathscale|mathrulethicknessmode|mathrulesmode|mathrulesfam|mathrel|mathpunct|mathpenaltiesmode|mathord|mathopen|mathop|mathnolimitsmode|mathitalicsmode|mathinner|mathflattenmode|matheqnogapstep|mathdisplayskipmode|mathdirection|mathdelimitersmode|mathcode|mathclose|mathchoice|mathchardef|mathchar|mathbin|mathaccent|marks|mark|luatexversion|luatexrevision|luatexbanner|luafunctioncall|luafunction|luaescapestring|luadef|luacopyinputnodes|luabytecodecall|luabytecode|lpcode|lowercase|lower|looseness|long|localrightbox|localleftbox|localinterlinepenalty|localcontrolled|localcontrol|localbrokenpenalty|listcallbackmode|lineskiplimit|lineskip|linepenalty|linepar|linedirection|limits|letprotected|letfrozen|letcsname|letcharcode|let|leqno|leftskip|leftmarginkern|lefthyphenmin|left|leaders|lccode|lastskip|lastpenalty|lastnodetype|lastnodesubtype|lastnamedcs|lastlinefit|lastkern|lastchknum|lastchkdim|lastbox|lastarguments|language|kern|jobname|interlinepenalty|interlinepenalties|interactionmode|integerdef|instance|insertpenalties|insertht|insertheights|insert|inputlineno|input|initcatcodetable|indent|immutable|immediate|ignorespaces|ignorepars|ignorearguments|ifx|ifvoid|ifvmode|ifvbox|iftrue|iftok|ifrelax|ifpdfprimitive|ifpdfabsnum|ifpdfabsdim|ifparameters|ifparameter|ifodd|ifnumval|ifnum|ifmmode|ifmathstyle|ifmathparameter|ifinner|ifincsname|ifhmode|ifhbox|ifhasxtoks|ifhastoks|ifhastok|iffontchar|ifflags|iffalse|ifempty|ifdimval|ifdim|ifdefined|ifcstok|ifcsname|ifcondition|ifcmpnum|ifcmpdim|ifchknum|ifchkdim|ifcat|ifcase|ifboolean|ifarguments|ifabsnum|ifabsdim|if|hyphenpenalty|hyphenchar|hyphenationmode|hyphenationmin|hyphenation|ht|hss|hskip|hsize|hrule|hpack|holdinginserts|hjcode|hfuzz|hfilneg|hfill|hfil|hbox|hbadness|hangindent|hangafter|halign|gtokspre|gtoksapp|glyphyscale|glyphyoffset|glyphxscale|glyphxoffset|glyphtextscale|glyphstatefield|glyphscriptscriptscale|glyphscriptscale|glyphscriptfield|glyphscale|glyphoptions|glyphdatafield|glyph|gluetomu|gluestretchorder|gluestretch|gluespecdef|glueshrinkorder|glueshrink|glueexpr|globaldefs|global|gletcsname|glet|gleaders|gdefcsname|gdef|futurelet|futureexpandisap|futureexpandis|futureexpand|futuredef|frozen|formatname|fontspecifiedsize|fontspecifiedname|fontname|fontid|fontdimen|fontcharwd|fontcharic|fontcharht|fontchardp|font|floatingpenalty|firstvalidlanguage|firstmarks|firstmark|finalhyphendemerits|fi|fam|explicithyphenpenalty|explicitdiscretionary|expandtoken|expandcstoken|expandafterspaces|expandafterpars|expandafter|expand|exhyphenpenalty|exhyphenchar|exceptionpenalty|everyvbox|everytab|everypar|everymath|everyjob|everyhbox|everyeof|everydisplay|everycr|etokspre|etoksapp|escapechar|errorstopmode|errorcontextlines|errmessage|errhelp|eqno|enforced|endlocalcontrol|endlinechar|endinput|endgroup|endcsname|end|emergencystretch|else|efcode|edefcsname|edef|dump|dp|doublehyphendemerits|divide|displaywidth|displaywidowpenalty|displaywidowpenalties|displaystyle|displaylimits|displayindent|discretionary|directlua|dimexpr|dimensiondef|dimendef|dimen|detokenize|delimitershortfall|delimiterfactor|delimiter|delcode|defcsname|defaultskewchar|defaulthyphenchar|def|deadcycles|day|currentiftype|currentiflevel|currentifbranch|currentgrouptype|currentgrouplevel|csstring|csname|crcr|crampedtextstyle|crampedscriptstyle|crampedscriptscriptstyle|crampeddisplaystyle|cr|countdef|count|copy|clubpenalty|clubpenalties|clearmarks|cleaders|chardef|char|catcodetable|catcode|brokenpenalty|boxyoffset|boxymove|boxxoffset|boxxmove|boxtotal|boxorientation|boxmaxdepth|boxdirection|boxattribute|box|boundary|botmarks|botmark|binoppenalty|belowdisplayskip|belowdisplayshortskip|beginlocalcontrol|begingroup|begincsname|batchmode|baselineskip|badness|automigrationmode|automatichyphenpenalty|automaticdiscretionary|attributedef|attribute|atopwithdelims|atop|atendofgrouped|atendofgroup|aligntab|alignmark|aliased|aftergrouped|aftergroup|afterassignment|afterassigned|advance|adjustspacingstretch|adjustspacingstep|adjustspacingshrink|adjustspacing|adjdemerits|accent|abovewithdelims|abovedisplayskip|abovedisplayshortskip|above|XeTeXversion|Uvextensible|Uunderdelimiter|Usuperscript|Usuperprescript|Usubscript|Usubprescript|Ustyle|Ustopmath|Ustopdisplaymath|Ustartmath|Ustartdisplaymath|Ustack|Uskewedwithdelims|Uskewed|Uroot|Uright|Uradical|Uoverwithdelims|Uoverdelimiter|Uover|Unosuperscript|Unosuperprescript|Unosubscript|Unosubprescript|Umiddle|Umathunderdelimitervgap|Umathunderdelimiterbgap|Umathunderbarvgap|Umathunderbarrule|Umathunderbarkern|Umathsupsubbottommax|Umathsupshiftup|Umathsupshiftdrop|Umathsupbottommin|Umathsubtopmax|Umathsubsupvgap|Umathsubsupshiftdown|Umathsubshiftdrop|Umathsubshiftdown|Umathstackvgap|Umathstacknumup|Umathstackdenomdown|Umathspacingmode|Umathspacebeforescript|Umathspaceafterscript|Umathskewedfractionvgap|Umathskewedfractionhgap|Umathrelrelspacing|Umathrelpunctspacing|Umathrelordspacing|Umathrelopspacing|Umathrelopenspacing|Umathrelinnerspacing|Umathrelclosespacing|Umathrelbinspacing|Umathradicalvgap|Umathradicalrule|Umathradicalkern|Umathradicaldegreeraise|Umathradicaldegreebefore|Umathradicaldegreeafter|Umathquad|Umathpunctrelspacing|Umathpunctpunctspacing|Umathpunctordspacing|Umathpunctopspacing|Umathpunctopenspacing|Umathpunctinnerspacing|Umathpunctclosespacing|Umathpunctbinspacing|Umathoverdelimitervgap|Umathoverdelimiterbgap|Umathoverbarvgap|Umathoverbarrule|Umathoverbarkern|Umathordrelspacing|Umathordpunctspacing|Umathordordspacing|Umathordopspacing|Umathordopenspacing|Umathordinnerspacing|Umathordclosespacing|Umathordbinspacing|Umathoprelspacing|Umathoppunctspacing|Umathopordspacing|Umathopopspacing|Umathopopenspacing|Umathopinnerspacing|Umathoperatorsize|Umathopenrelspacing|Umathopenpunctspacing|Umathopenordspacing|Umathopenopspacing|Umathopenopenspacing|Umathopeninnerspacing|Umathopenclosespacing|Umathopenbinspacing|Umathopclosespacing|Umathopbinspacing|Umathnolimitsupfactor|Umathnolimitsubfactor|Umathlimitbelowvgap|Umathlimitbelowkern|Umathlimitbelowbgap|Umathlimitabovevgap|Umathlimitabovekern|Umathlimitabovebgap|Umathinnerrelspacing|Umathinnerpunctspacing|Umathinnerordspacing|Umathinneropspacing|Umathinneropenspacing|Umathinnerinnerspacing|Umathinnerclosespacing|Umathinnerbinspacing|Umathfractionrule|Umathfractionnumvgap|Umathfractionnumup|Umathfractiondenomvgap|Umathfractiondenomdown|Umathfractiondelsize|Umathconnectoroverlapmin|Umathcodenum|Umathcode|Umathcloserelspacing|Umathclosepunctspacing|Umathcloseordspacing|Umathcloseopspacing|Umathcloseopenspacing|Umathcloseinnerspacing|Umathcloseclosespacing|Umathclosebinspacing|Umathclass|Umathcharslot|Umathcharnumdef|Umathcharnum|Umathcharfam|Umathchardef|Umathcharclass|Umathchar|Umathbinrelspacing|Umathbinpunctspacing|Umathbinordspacing|Umathbinopspacing|Umathbinopenspacing|Umathbininnerspacing|Umathbinclosespacing|Umathbinbinspacing|Umathaxis|Umathaccentbaseheight|Umathaccent|Uleft|Uhextensible|Udelimiterunder|Udelimiterover|Udelimiter|Udelcodenum|Udelcode|Uchar|Uatopwithdelims|Uatop|Uabovewithdelims|Uabove|UUskewedwithdelims|UUskewed|Omegaversion|Omegarevision|Omegaminorversion|Alephversion|Alephrevision|Alephminorversion| )(?=[^a-zA-Z])",
"name" : "context.primitive.commands.primitive.tex"
},
"reserved" : {
diff --git a/Master/texmf-dist/doc/context/documents/general/leaflets/leaflet-mixing.pdf b/Master/texmf-dist/doc/context/documents/general/leaflets/leaflet-mixing.pdf
index a023f9e881e..f61de6d3f03 100644
--- a/Master/texmf-dist/doc/context/documents/general/leaflets/leaflet-mixing.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/leaflets/leaflet-mixing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/magazines/mag-1105-mkiv.pdf b/Master/texmf-dist/doc/context/documents/general/magazines/mag-1105-mkiv.pdf
new file mode 100644
index 00000000000..71abf84ec2d
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/magazines/mag-1105-mkiv.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/cld-mkiv.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/cld-mkiv.pdf
index bac02979fe8..f0825379372 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/cld-mkiv.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/cld-mkiv.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/evenmore.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/evenmore.pdf
index 5c40721927c..73fe8115521 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/evenmore.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/evenmore.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf
index 305e6bebab0..0ee0f66a16e 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdf
new file mode 100644
index 00000000000..e3e13063056
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf
index 5e3d82ceef7..6de0090b3d3 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdf
new file mode 100644
index 00000000000..a8d103236c8
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdf
new file mode 100644
index 00000000000..63689f1c82f
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf
new file mode 100644
index 00000000000..bde7fda146e
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdf
new file mode 100644
index 00000000000..0a17a314c1b
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdf
new file mode 100644
index 00000000000..b92f00ce3c0
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/luametafun.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/luametafun.pdf
index fa15b985d87..25c37bdcb30 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/luametafun.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/luametafun.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/luametatex.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/luametatex.pdf
index fd83dfb5aa4..5c2e3aea1f2 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/luametatex.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/luametatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/luatex.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/luatex.pdf
index 553b1613dfc..eed48236a58 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/luatex.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/primitives.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/primitives.pdf
new file mode 100644
index 00000000000..9d6fe7670d3
--- /dev/null
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/primitives.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/manuals/units-mkiv.pdf b/Master/texmf-dist/doc/context/documents/general/manuals/units-mkiv.pdf
index 5631be78e72..d4099121114 100644
--- a/Master/texmf-dist/doc/context/documents/general/manuals/units-mkiv.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/manuals/units-mkiv.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf
index 7c2f664f6ba..d209e6bfd09 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
index 09a121ef8a1..4d97df581d4 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
index a877fa0eafc..552b8f5eb86 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
index c5dfbf669cf..9812f4e2cee 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
index dcafda14a27..b9aafe70eb9 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
index 8e2ac2e8415..a2f4fa91ea3 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-de.pdf
index f37ea8a163e..fafb7c17527 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-de.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-de.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-en.pdf
index 780de383410..505b8fcd26b 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-en.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
index 2cb28142152..b04e5f50f04 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-it.pdf
index 75f5974833b..d383904838f 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-it.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-it.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
index 039c02bd357..c8a6554476b 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
index 4f49185b54f..0d21e5aa297 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
index e103267502f..336a7e35858 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf
index 36f50680a19..bb09d153e7b 100644
--- a/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.pdf
new file mode 100644
index 00000000000..913db5ef32b
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex
new file mode 100644
index 00000000000..a472a33f462
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex
@@ -0,0 +1,694 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={CONCEPTS},
+ banner={experiments turned features},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+% see datatypes, hyphenation etc
+
+\starttitle[title=Experiments]
+
+There have been quite some experiments. Some results were rejected, some kept.
+Here are a few (that come to mind). This talk is a mix of summary, discussion and
+some demos.
+
+\stoptitle
+
+\starttitle[title=Math]
+
+There are a couple of additional features in the math engine. Most concern a bit
+more control over hard coded behavior, but some are sort of new:
+
+\startbuffer
+test $a = b \discretionary class 3 {$<$}{$>$}{$\neq$} c$ test
+\stopbuffer
+
+\typebuffer
+
+When there is enough room this will give
+
+\getbuffer
+
+When \type {\hsize} is limited we get:
+
+{\hsize 4mm \getbuffer}
+
+\page
+
+\enabletrackers[math.toysymbol]
+
+\definemathtoysymbol[Plus] [bin][+]
+\definemathtoysymbol[Minus][bin][-]
+\definemathtoysymbol[Equal][rel][=]
+
+\start
+
+\let\darkblue\darkyellow %\showmakeup[glue]
+
+$\dorecurse{199} {
+ x_{#1} \ifodd#1\relax\Plus\else\Minus\fi
+} x_{200} \Equal n$
+
+\dorecurse{10} {
+ test \discretionary
+ {\darkred hel $\sqrt{y}$ lo}
+ {\darkgreen good $\sqrt{z}$ bye}
+ {\darkblue wel $\sqrt{x}$ come} test
+}
+
+\dorecurse{10} {test #1
+ $x + 2x \discretionary class 2
+ {$+ \, \cdots $}
+ {$ \cdots \, +$}
+ {$+ \, \cdots \, +$} nx$ test
+}
+
+\stop
+
+\stoptitle
+
+\starttitle[title=More math]
+
+In traditional \TEX\ the last setting wins:
+
+\startbuffer
+\def\whatevera
+ {\Umathordrelspacing \textstyle=50mu
+ \Umathopenbinspacing\textstyle=50mu}
+
+\def\whateverb
+ {\Umathordrelspacing \textstyle=25mu
+ \Umathopenbinspacing\textstyle=25mu}
+
+$\whatevera a = (-2)$ \par
+$\whateverb a = (-2)$ \par
+$\whatevera a = (-2) \quad \whateverb a = (-2)$ \par
+\stopbuffer
+
+\typebuffer \startpacked \getbuffer \stoppacked
+
+\page
+
+In \LUAMETATEX\ we can freeze settings on the spot:
+
+\startbuffer
+\def\whatevera
+ {\frozen\Umathordrelspacing \textstyle=50mu
+ \frozen\Umathopenbinspacing\textstyle=50mu}
+
+\def\whateverb
+ {\frozen\Umathordrelspacing \textstyle=25mu
+ \frozen\Umathopenbinspacing\textstyle=25mu}
+
+$\whatevera a = (-2)$ \par
+$\whateverb a = (-2)$ \par
+$\whatevera a = (-2) \quad \whateverb a = (-2)$ \par
+\stopbuffer
+
+\typebuffer \startpacked \getbuffer \stoppacked
+
+\stoptitle
+
+\starttitle[title=Macros]
+
+Not storing arguments:
+
+\starttyping
+\def\foo#1#0#3{....}
+
+\foo{11}{22}{33}
+
+\foo #1#0#3->....
+#1<-11
+#2<-
+#3<-33
+\stoptyping
+
+Ignoring arguments:
+
+\starttyping
+\def\foo#1#-#2{#1#2}
+
+\foo{1}{2}{3}
+
+13
+\stoptyping
+
+\page
+
+Normal behaviour:
+
+\starttyping
+\def\foo#1#2#3{#1#2#3}
+
+\foo{1}{{2}}{3}
+
+\foo #1#2#3->#1#2#3
+#1<-1
+#2<-{2}
+#3<-3
+\stoptyping
+
+Special behaviour:
+
+\starttyping
+\def\foo#1#+#3{#1#2#3}
+
+\foo #1#2#3->#1#2#3
+#1<-1
+#2<-{{2}}
+#3<-3
+\stoptyping
+
+\page
+
+Optional tokens (we also show some \TEX-expansion-horror here):
+
+\starttyping
+\edef\a!space{\expandtoken \ignorecatcode \spaceasciicode}
+
+\normalexpanded {
+
+ \protected \def \noexpand \doifelseinset#1#2%
+ {\noexpand\ifhasxtoks{,\a!space#1,}{,#2,}%
+ \noexpand\expandafter\noexpand\firstoftwoarguments
+ \noexpand\else
+ \noexpand\expandafter\noexpand\secondoftwoarguments
+ \noexpand\fi}
+
+}
+\stoptyping
+
+or as tokens (\type{\showluatokens\doifelseinset}) on the next page:
+
+\page
+
+\starttyping
+591504 13 1 argument
+643771 13 2 argument
+595596 14 0 end match
+633535 120 48 if test ifhasxtoks
+643789 1 123 left brace
+643793 12 44 other char
+643741 9 32 ignore
+185919 5 1 parameter
+633495 12 44 other char
+ 57752 2 125 right brace
+167619 1 123 left brace
+643686 12 44 other char
+228803 5 2 parameter
+643434 12 44 other char
+643792 2 125 right brace
+643788 114 0 expand after expandafter
+643775 125 0 call firstoftwoarguments
+590609 120 3 if test else
+643628 114 0 expand after expandafter
+643754 125 0 call secondoftwoarguments
+643763 120 2 if test fi
+\stoptyping
+
+\page
+
+Cheating with arguments:
+
+\startbuffer
+\def\foo#1=#2,{(#1/#2)}
+
+\foo 1=2,\ignorearguments
+\foo 1=2\ignorearguments
+\foo 1\ignorearguments
+\foo \ignorearguments
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+As in:
+
+\startbuffer
+\def\foo#1=#2,{\ifarguments\or(#1)\or(#1/#2)\fi}
+
+\foo 1=2,\ignorearguments
+\foo 1=2\ignorearguments
+\foo 1\ignorearguments
+\foo \ignorearguments
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\stoptitle
+
+\starttitle[title=Hyphenation]
+
+Hyphenation at work:
+
+\startlinecorrection[line]
+\startcombination[distance=3cm,nx=6]
+ {\vtop{\hsize 2mm \strut NEDERLANDS\vskip.5\lineheight}} {\type{NEDERLANDS}}
+ {\vtop{\hsize 2mm \strut Nederlands\vskip.5\lineheight}} {\type{Nederlands}}
+ {\vtop{\hsize 2mm \strut nederlands\vskip.5\lineheight}} {\type{nederlands}}
+ {\vtop{\hsize 2mm \strut \CONTEXT \vskip.5\lineheight}} {\type{\CONTEXT }}
+ {\vtop{\hsize 2mm \strut text\-test\vskip.5\lineheight}} {\type{text\-test}}
+ {\vtop{\hsize 2mm \strut test-test \vskip.5\lineheight}} {\type{test-test }}
+\stopcombination
+\stoplinecorrection
+
+Controlling hyphenation:
+
+\startbuffer[1]
+\nohyphens NEDERLANDS {\dohyphens Nederlands} nederlands
+\stopbuffer
+
+\startbuffer[2]
+NEDERLANDS {\nohyphens Nederlands} nederlands
+\stopbuffer
+
+\typebuffer[1] and \typebuffer[2]
+
+\startlinecorrection[line]
+\startcombination[distance=4cm,nx=2]
+ {\small \small \vtop{\hsize 2mm \strut \nl \getbuffer[1]}} {}
+ {\small \small \vtop{\hsize 2mm \strut \nl \getbuffer[2]}} {}
+\stopcombination
+\stoplinecorrection
+
+\page
+
+There are several ways to implement this:
+
+\startitemize
+\startitem choose a language with no patterns:
+ \startitemize[packed]
+ \startitem it's quite efficient \stopitem
+ \startitem we loose language specifics \stopitem
+ \stopitemize
+\stopitem
+\startitem set the left and right hyphen min values high:
+ \startitemize[packed]
+ \startitem it works okay \stopitem
+ \startitem it is a hack \stopitem
+ \startitem we still enter the routine \stopitem
+ \stopitemize
+\stopitem
+\startitem block the mechanism:
+ \startitemize[packed]
+ \startitem it provides detailed control \stopitem
+ \startitem it is conceptually clean \stopitem
+ \stopitemize
+\stopitem
+\stopitemize
+
+The last method is what we use in \LMTX:
+
+\type {\dohyphens} : {\tttf \meaning\dohyphens}
+
+\type {\nohyphens} : {\tttf \meaning\nohyphens}
+
+\page
+
+For the moment we have this (it might evolve):
+
+\starttyping[style=\tt\small\small]
+\chardef \completehyphenationmodecode \numexpr
+ \normalhyphenationmodecode % \discretionary
+ + \automatichyphenationmodecode % -
+ + \explicithyphenationmodecode % \-
+ + \syllablehyphenationmodecode % pattern driven
+ + \uppercasehyphenationmodecode % replaces \uchyph
+ + \compoundhyphenationmodecode % replaces \compoundhyphenmode
+ % \strictstarthyphenationmodecode % replaces \hyphenationbounds (strict = original tex)
+ % \strictendhyphenationmodecode % replaces \hyphenationbounds (strict = original tex)
+ + \automaticpenaltyhyphenationmodecode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
+ + \explicitpenaltyhyphenationmodecode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
+ + \permitgluehyphenationmodecode % turn glue into kern in \discretionary
+ + \permitallhyphenationmodecode % okay, let's be even more tolerant
+ + \permitmathreplacehyphenationmodecode % and again we're more permissive
+\relax
+\stoptyping
+
+This replaces some \LUATEX\ mode variables and adds some more which is why we now use
+a bitset instead of multiple parameters.
+
+\page
+
+In addition we have more detailed discretionary control:
+
+\startbuffer
+nederlands\discretionary {!}{!}{!}nederlands
+nederlands\discretionary options 1 {!}{!}{!}nederlands
+nederlands\discretionary options 2 {!}{!}{!}nederlands
+nederlands\discretionary options 3 {!}{!}{!}nederlands
+\stopbuffer
+
+\typebuffer
+
+\startlinecorrection[line]
+\startcombination[distance=4cm,nx=4]
+ {\vtop{\hsize 1mm \strut \nl nederlands\discretionary {!}{!}{!}nederlands}} {}
+ {\vtop{\hsize 1mm \strut \nl nederlands\discretionary options 1 {!}{!}{!}nederlands}} {}
+ {\vtop{\hsize 1mm \strut \nl nederlands\discretionary options 2 {!}{!}{!}nederlands}} {}
+ {\vtop{\hsize 1mm \strut \nl nederlands\discretionary options 3 {!}{!}{!}nederlands}} {}
+\stopcombination
+\stoplinecorrection
+
+At some point it will become \quote {frozen} functionality and that's when it gets
+documented (first we need to integrate and play a bit more with it in \CONTEXT).
+
+\stoptitle
+
+\starttitle[title=Local control]
+
+In \LUATEX\ we have experimental (kind of ugly) immediate assignments that can be
+used in expansions without blocking (resulting in tokens that is).
+
+But now we now have local control:
+
+\startbuffer
+\newcount\foocounter
+
+\def\foo
+ {\advance\foocounter\plusone
+ \the\foocounter}
+
+\edef\oof{(\foo)(\foo)(\foo)(\foo)}
+
+\meaning\oof
+\stopbuffer
+
+\typebuffer
+
+{\tttf \nohyphens \veryraggedright \getbuffer}
+
+\page
+
+Immediate expansion:
+
+\startbuffer
+\def\foo
+ {\beginlocalcontrol
+ \advance\foocounter\plusone
+ \endlocalcontrol
+ \the\foocounter}
+
+\edef\oof{(\foo)(\foo)(\foo)(\foo)}
+
+\meaning\oof
+\stopbuffer
+
+\typebuffer
+
+{\tttf \getbuffer}
+
+Hidden assignments:
+
+\startbuffer
+\scratchcounterone \beginlocalcontrol
+ \scratchcountertwo 100
+ \multiply \scratchcountertwo by 4
+\endlocalcontrol \scratchcountertwo
+\the\scratchcounterone
+\stopbuffer
+
+\typebuffer
+
+{\tttf \getbuffer}
+
+% \the \beginlocalcontrol
+% \scratchcountertwo 100
+% \multiply \scratchcountertwo by 4
+% \endlocalcontrol \scratchcountertwo
+
+\page
+
+Fancy expansion:
+
+\startbuffer
+\protected\def\foo
+ {\beginlocalcontrol
+ \advance\foocounter\plusone
+ \endlocalcontrol
+ \the\foocounter}
+
+\edef\oof{(\foo)(\foo)(\foo)(\foo)}
+\edef\ofo{(\expand\foo)(\expand\foo)(\expand\foo)(\expand\foo)}
+
+\meaning\oof \par \meaning\ofo
+\stopbuffer
+
+\typebuffer
+
+{\tttf \getbuffer}
+
+And a teaser:
+
+\starttyping
+\protected\def\widthofcontent#1{\beginlocalcontrol
+ \setbox\scratchbox\hbox{#1}\endlocalcontrol \wd\scratchbox}
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Conditionals]
+
+We can get nicer code that this:
+
+\starttyping
+\ifdim\scratchdimen=10pt
+ \expandafter\one
+\else\ifnum\scratchcounter=20
+ \expandafter\expandafter\expandafter\two
+\else
+ \expandafter\expandafter\expandafter\three
+\fi\fi
+\stoptyping
+
+This becomes:
+
+\starttyping
+\ifdim\scratchdimen=10pt
+ \expandafter\one
+\orelse\ifnum\scratchcounter=20
+ \expandafter\two
+\else
+ \expandafter\three
+\fi
+\stoptyping
+
+\page
+
+There is a bunch of extra conditions like the generic:
+
+\startnarrower \type {\ifcondition} \stopnarrower
+
+some token testers like:
+
+\startnarrower \type {\iftok} and \type {\ifhas(x)tok(s)} \stopnarrower
+
+some specific for math:
+
+\startnarrower \type {\ifmathstyle} and \type {\ifmathparameter} \stopnarrower
+
+macro helpers:
+
+\startnarrower \type {\ifarguments}, \type {\ifboolean} and \type {\ifempty} \stopnarrower
+
+robust number and dimension interception:
+
+\startnarrower \type {\ifchknum}, \type {\ifchkdim}, \type {\ifcmpnum}, \type {\ifcmpdim)}, \type {\ifnumval} and \type {\ifdimval} \stopnarrower
+
+bonus checks:
+
+\startnarrower \type {\iffrozen}, \type {\ifprotected} and \type {\ifusercmd} \stopnarrower
+
+and the mentioned:
+
+\startnarrower \type {\orelse} and \type {\orunless} \stopnarrower
+
+\stoptitle
+
+\starttitle[title=Migration]
+
+\startbuffer
+h: \setbox0\hbox{box \footnote{h: box}}\setbox2\hbox{\box 0}\box2\par
+h: \setbox0\hbox{copy \footnote{h: copy}}\setbox2\hbox{\copy 0}\box2\par
+h: \setbox0\hbox{unbox \footnote{h: unhbox}}\setbox2\hbox{\unhbox 0}\box2\par
+h: \setbox0\hbox{uncopy \footnote{h: unhcopy}}\setbox2\hbox{\unhcopy0}\box2\par
+
+v: \setbox0\hbox{box \footnote{v: box}}\setbox2\vbox{\box 0}\box2\par
+v: \setbox0\hbox{copy \footnote{v: copy}}\setbox2\vbox{\copy 0}\box2\par
+v: \setbox0\hbox{unbox \footnote{v: unhbox}}\setbox2\vbox{\unhbox 0}\box2\par
+v: \setbox0\hbox{uncopy \footnote{v: unhcopy}}\setbox2\vbox{\unhcopy0}\box2\par
+
+\starttabulate[||]
+\NC tabulate \footnote{tabulate} \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[style={\tt\small}]
+
+\page
+
+\startpacked \getbuffer \stoppacked
+
+% \setbox0\hbox{test \footnote{test}} (\prelistbox0) (\postlistbox0)
+% \setprelistbox0\hbox{BEFORE} \setpostlistbox0\hbox{AFTER}
+% \box0
+
+% \setbox0\hbox{test \footnote{test}} (\prelistcopy0) (\postlistcopy0)
+% \setprelistbox0\hbox{BEFORE} \setpostlistbox0\hbox{AFTER}
+% \box0
+
+\stoptitle
+
+\starttitle[title=Normalizing lines]
+
+We can have predictable lines:
+
+\startbuffer
+ \hangindent3cm \hangafter 2 \leftskip1cm \rightskip1cm \input ward \par
+\stopbuffer
+
+\typebuffer
+
+Standard (but already with left skips):
+
+\start
+ \bitwiseflip \normalizelinemode -\indentskipmodecode
+ \bitwiseflip \normalizelinemode -\normalizelinemodecode
+ \showmakeup \relax \getbuffer
+\stop
+
+Normalized (enhanced, no shifts, indent skip):
+
+\start
+ \bitwiseflip \normalizelinemode \indentskipmodecode
+ \bitwiseflip \normalizelinemode \normalizelinemodecode
+ \showmakeup \relax \getbuffer
+\stop
+
+\page
+
+\startbuffer
+ \parshape 2 1cm 10cm 2cm 15cm \leftskip1cm \rightskip1cm \input ward \par
+\stopbuffer
+
+\typebuffer
+
+Standard:
+
+\start
+ \bitwiseflip \normalizelinemode -\indentskipmodecode
+ \bitwiseflip \normalizelinemode -\normalizelinemodecode
+ \showmakeup \relax \getbuffer
+\stop
+
+Normalized:
+
+\start
+ \bitwiseflip \normalizelinemode \indentskipmodecode
+ \bitwiseflip \normalizelinemode \normalizelinemodecode
+ \showmakeup \relax \getbuffer
+\stop
+
+% {\showmakeup \getbuffer}
+
+\stoptitle
+
+\starttitle[title=Freezing paragraph properties]
+
+\startbuffer
+\forgetparagraphfreezing \placefigure[left]{}{} {\bf Andrew Cuomo:} \input cuomo
+\stopbuffer
+
+\typebuffer[style=\tt\small] \start \switchtobodyfont[8pt] \getbuffer \par \stop
+
+\startbuffer
+\setparagraphfreezing \placefigure[left]{}{} {\bf Andrew Cuomo:} \input cuomo
+\stopbuffer
+
+\typebuffer[style=\tt\small] \start \switchtobodyfont[8pt] \getbuffer \par \stop
+
+\stoptitle
+
+\starttitle[title=Wrapping up paragraphs]
+
+\setparagraphfreezing
+
+We have \type {\wrapuppar} as new hook. An experimental mechanism has been build
+around it so that Wolfgang and I can freak out on this.
+
+\startbuffer
+\def\TestA{\registerparwrapper
+ {A}
+ {[\ignorespaces}
+ {\removeunwantedspaces]\showparwrapperstate{A}}}
+
+\def\TestB#1{\registerparwrapper
+ {B#1}
+ {(\ignorespaces}
+ {\removeunwantedspaces)\showparwrapperstate{B#1}}}
+
+\def\TestC{\registerparwrapper
+ {C}
+ {<\ignorespaces}
+ {\removeunwantedspaces>\showparwrapperstate{C}\forgetparwrapper}}
+
+\def\TestR{\registerparwrapperreverse
+ {R}
+ {<\ignorespaces}
+ {\removeunwantedspaces>\showparwrapperstate{R}}}
+\stopbuffer
+
+\typebuffer[style=\tt\small] \getbuffer
+
+\page
+
+Example 1:
+
+\startbuffer
+\TestA
+\dorecurse{3}
+ {1.#1 before \ruledvbox{\hsize2em\raggedcenter\TestB1 !\par} after\par}
+\dorecurse{3}
+ {2.#1 before \ruledvbox{\hsize3em\raggedcenter !\par} after\par}
+\dorecurse{3}
+ {3.#1 before \ruledvbox{\hsize4em\raggedcenter\TestB2 !} after\par}
+\forgetparwrapper
+\dorecurse{3}
+ {4.#1 before \ruledvbox{\hsize5em\raggedcenter\TestB3 !} after\par}
+\TestC
+\dorecurse{3}
+ {5.#1 before \ruledvbox{\hsize2em\raggedcenter\TestA !} after\par}
+\stopbuffer
+
+\typebuffer[style=\tt\small]
+
+\startcolumns \startpacked \getbuffer \stoppacked \stopcolumns
+
+\page
+
+Example 2:
+
+\startbuffer
+\TestA
+\dorecurse{3}{6.#1 before after\par} \blank
+\TestB4
+\dorecurse{3}{7.#1 before after\par} \blank
+\TestB5
+\TestR
+\dorecurse{3}{8.#1 before after\par} \blank
+\stopbuffer
+
+\typebuffer[style=\tt\small]
+
+\startcolumns \startpacked \getbuffer \stoppacked \stopcolumns
+
+\stoptitle
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.pdf
new file mode 100644
index 00000000000..906b1fe04d2
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.tex
new file mode 100644
index 00000000000..590cdbf93e8
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.tex
@@ -0,0 +1,454 @@
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={DATATYPES},
+ banner={additional datatypes in lmtx},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=Native \TEX\ datatypes: simple registers]
+
+\startbuffer
+integer: \count 123 = 456 \the\count123
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\startbuffer
+dimension: \dimen123 = 456pt \the\dimen123
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\startbuffer
+glue: \skip123 = 6pt plus 5pt minus 4pt\relax \the\skip123
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\startbuffer
+muglue: \muskip123 = 6mu plus 5mu minus 4mu\relax \the\muskip123
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\startbuffer
+attribute: \attribute123 = 456 \the\attribute123
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\blank[2*line]
+
+\starttyping
+\global \the \countdef \dimendef \skipdef \muskipdef \attributedef
+\advance \multiply \divide \numexpr \dimexpr \glueexpr \muexpr
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Native \TEX\ datatypes: tokens]
+
+\startbuffer
+toks: \toks123 = {456} \the\toks123
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\blank[2*line]
+
+\starttyping
+\global \the \toksdef
+\toksapp \etoksapp \xtoksapp \gtoksapp
+\tokspre \etokspre \xtokspre \gtokspre
+\stoptyping
+
+\blank[2*line]
+
+(in retrospect: eetex)
+
+\stoptitle
+
+\starttitle[title=Native \TEX\ datatypes: boxes]
+
+\startbuffer
+box: \box123 = \hbox {456} (\the\wd123,\the\ht123,\the\dp123) \box123
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\blank[2*line]
+
+\starttyping
+\global \box \copy \unhbox \unvbox
+\hbox \vbox \vtop \hpack \vpack \tpack
+\wd \ht \dp \boxtotal
+\boxdirection \boxattr
+\boxorientation \boxxoffset \boxyoffset \boxxmove \boxymove
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Native \TEX\ datatypes: macros]
+
+\startbuffer
+\def\onetwothree{346} \onetwothree
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\blank[2*line]
+
+\starttyping
+\global \protected \frozen
+\def \edef \edef \xdef
+\meaning
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Native \LUA\ datatypes: numbers]
+
+\startbuffer
+\ctxlua{local n = 123 context(n)}\quad
+\ctxlua{local n = 123.456 context(n)}\quad
+\ctxlua{local n = 123.4E56 context(n)}\quad
+\ctxlua{local n = 0x123 context(n)}\quad
+\ctxlua{local n = 0x1.37fe4cd4b70b2p-1 context(n)}
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\blank[2*line]
+
+\starttyping
++ - * / // % ^ | ~ & << >> == ~= < > <= >= ( )
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Native \LUA\ datatypes: strings]
+
+\startbuffer
+\ctxlua{local s = "abc" context(s)}\quad
+\ctxlua{local s = 'abc' context(s)}\quad
+\ctxlua{local s = [[abc]] context(s)}\quad
+\ctxlua{local s = [==[abc]==] context(s)}\quad
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\blank[2*line]
+
+\starttyping
+.. # == ~= < > <= >=
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Native \LUA\ datatypes: booleans and nil]
+
+\startbuffer
+\ctxlua{local b = true context(b)}\quad
+\ctxlua{local b = false context(b)}\quad
+\ctxlua{local n = nil context(n)}\quad
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\blank[2*line]
+
+\starttyping
+== ~= and or not
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Native \LUA\ datatypes: some more]
+
+\starttyping
+functions
+userdata (lpeg is userdata)
+coroutine
+\stoptyping
+
+\LUAMETATEX\ provides tokens and nodes as userdata and some libraries also
+use them (complex, decimal, pdf, etc).
+
+\stoptitle
+
+\starttitle[title=Both worlds combined]
+
+\startitemize[packed]
+\startitem There are only 64K registers (although we can extend that if needed). \stopitem
+\startitem Accessing registers at the \LUA\ end is not that efficient. \stopitem
+\startitem So we have now datatypes at the \LUA\ end with access at the \TEX\ end. \stopitem
+\startitem Their values can go beyond what \TEX\ registers provide. \stopitem
+\stopitemize
+
+\startbuffer
+\luacardinal bar 123
+\luainteger bar -456
+\luafloat bar 123.456E-3
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\the\luacardinal bar \quad
+\the\luainteger bar \quad
+\the\luafloat bar
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\page
+
+The usual \LUA\ semantics apply:
+
+\startbuffer
+\luacardinal bar 0x123
+\luainteger bar -0x456
+\luafloat bar 0x123.456p-3
+\stopbuffer
+
+\typebuffer \getbuffer
+
+So, now we get:
+
+\startbuffer
+\the\luacardinal bar \quad
+\the\luainteger bar \quad
+\the\luafloat bar
+\stopbuffer
+
+\getbuffer
+
+Equal signs are optional:
+
+\startbuffer
+\luainteger gnu= 123456 \luafloat gnu= 123.456e12
+\luainteger gnu = 123456 \luafloat gnu = 123.456e12
+\luainteger gnu =123456 \luafloat gnu =123.456e12
+\stopbuffer
+
+\typebuffer
+
+These commands can be uses for assignments as well as serialization. They use the
+\LUAMETATEX\ value function feature.
+
+\page
+
+Dimensions are serialized differently so that they can be used like this:
+
+\startbuffer
+\luadimen test 100pt \scratchdimen = .25 \luadimen test: \the\scratchdimen
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\page
+
+Assume that we have this:
+
+\startbuffer
+\luacardinal x = -123 \luafloat x = 123.123
+\luacardinal y = 456 \luafloat y = -456.456
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We can then use the macro \type {\luaexpression} that takes an optional keyword:
+
+\startbuffer
+- : \luaexpression {n.x + 2*n.y}
+f : \luaexpression float {n.x + 2*n.y}
+i : \luaexpression integer {n.x + 2*n.y}
+c : \luaexpression cardinal {n.x + 2*n.y}
+b : \luaexpression boolean {n.x + 2*n.y}
+l : \luaexpression lua {n.x + 2*n.y}
+\stopbuffer
+
+\typebuffer
+
+The serialization can be different for these cases:
+
+\startlines
+\tt \getbuffer
+\stoplines
+
+Variables have their own namespace but get resolved across namespaces (f, i, c).
+
+\page
+
+Special tricks:
+
+\startbuffer
+\scratchdimen 123.456pt [\the\scratchdimen] [\the\nodimen\scratchdimen]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Does nothing, nor does:
+
+\startbuffer
+\nodimen\scratchdimen = 654.321pt
+\stopbuffer
+
+\typebuffer \getbuffer
+
+But:
+
+\starttabulate[|T|T|]
+\NC \type {\the\nodimen bp \scratchdimen} \NC \the\nodimen bp \scratchdimen \NC \NR
+\NC \type {\the\nodimen cc \scratchdimen} \NC \the\nodimen cc \scratchdimen \NC \NR
+\NC \type {\the\nodimen cm \scratchdimen} \NC \the\nodimen cm \scratchdimen \NC \NR
+\NC \type {\the\nodimen dd \scratchdimen} \NC \the\nodimen dd \scratchdimen \NC \NR
+\NC \type {\the\nodimen in \scratchdimen} \NC \the\nodimen in \scratchdimen \NC \NR
+\NC \type {\the\nodimen mm \scratchdimen} \NC \the\nodimen mm \scratchdimen \NC \NR
+\NC \type {\the\nodimen pt \scratchdimen} \NC \the\nodimen pt \scratchdimen \NC \NR
+\NC \type {\the\nodimen sp \scratchdimen} \NC \the\nodimen sp \scratchdimen \NC \NR
+\stoptabulate
+
+gives different units! In the coffee break it was decided to drop the \type {nc}
+and \type {nd} units in \LUAMETATEX\ when Arthur indicated that they never became
+a standard. Dropping the \type {true} variants also makes sense but we postponed
+dropping the \type {in} (inch).
+
+\stoptitle
+
+\starttitle[title=Arrays]
+
+Two dimensional arrays have names and a type:
+
+\startbuffer
+\newarray name integers type integer nx 2 ny 2
+\newarray name booleans type boolean nx 2 ny 2
+\newarray name floats type float nx 2 ny 2
+\newarray name dimensions type dimension nx 4
+\stopbuffer
+
+\typebuffer \getbuffer
+
+And a special accessor. Here we set values:
+
+\startbuffer
+\arrayvalue integers 1 2 4 \arrayvalue integers 2 1 8
+\arrayvalue booleans 1 2 true \arrayvalue booleans 2 1 true
+\arrayvalue floats 1 2 12.34 \arrayvalue floats 2 1 34.12
+\arrayvalue dimensions 1 12.34pt \arrayvalue dimensions 3 34.12pt
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\page
+
+Here we get values:
+
+\startbuffer
+[\the\arrayvalue integers 1 2]
+[\the\arrayvalue booleans 1 2]
+[\the\arrayvalue floats 1 2]
+[\the\arrayvalue dimensions 1 ]\crlf
+[\the\arrayvalue integers 2 1]
+[\the\arrayvalue booleans 2 1]
+[\the\arrayvalue floats 2 1]
+[\the\arrayvalue dimensions 3]
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+When a value is expected the integer is serialized:
+
+\startbuffer
+\scratchcounter\arrayvalue integers 1 2\relax \the\scratchcounter
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+You can view an array on the console with:
+
+\starttyping
+\showarray integers
+\stoptyping
+
+\page
+
+Another expression example:
+
+\startbuffer
+\dostepwiserecurse {1} {4} {1} {
+ [\the\arrayvalue dimensions #1 :
+ \luaexpression dimen {math.sind(30) * a.dimensions[#1]}]
+}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\page
+
+We can combine it all with if tests:
+
+\startbuffer
+slot 1 is \ifboolean\arrayequals dimensions 1 0pt zero \else not zero \fi\quad
+slot 2 is \ifboolean\arrayequals dimensions 2 0pt zero \else not zero \fi
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\startbuffer
+slot 1: \ifcase\arraycompare dimensions 1 3pt lt \or eq \else gt \fi zero\quad
+slot 2: \ifcase\arraycompare dimensions 2 3pt lt \or eq \else gt \fi zero\quad
+slot 3: \ifcase\arraycompare dimensions 3 3pt lt \or eq \else gt \fi zero\quad
+slot 4: \ifcase\arraycompare dimensions 4 3pt lt \or eq \else gt \fi zero
+
+slot 1: \ifcmpdim\arrayvalue dimensions 1 3pt lt \or eq \else gt \fi zero\quad
+slot 2: \ifcmpdim\arrayvalue dimensions 2 3pt lt \or eq \else gt \fi zero\quad
+slot 3: \ifcmpdim\arrayvalue dimensions 3 3pt lt \or eq \else gt \fi zero\quad
+slot 4: \ifcmpdim\arrayvalue dimensions 4 3pt lt \or eq \else gt \fi zero
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\stoptitle
+
+\starttitle[title=Complex numbers]
+
+\startbuffer
+\startluacode
+local c1 = xcomplex.new(1,3)
+local c2 = xcomplex.new(2,4)
+context(c1) context.quad() context(c2) context.quad(c1 + c2)
+\stopluacode
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stoptitle
+
+\starttitle[title=Decimal numbers]
+
+\startbuffer
+\startluacode
+local c1 = xdecimal.new("123456789012345678901234567890")
+local c2 = xdecimal.new(1234567890)
+context(c1) context.crlf() context(c2) context.crlf(c1 * c2)
+\stopluacode
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stoptitle
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.pdf
new file mode 100644
index 00000000000..35764258c7b
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.tex
new file mode 100644
index 00000000000..20877d63376
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-ecmascript.tex
@@ -0,0 +1,272 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={ECMASCRIPT},
+ banner={just because it can be done},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=Why oh why]
+
+\startitemize
+
+\startitem
+ We use a \type {mupdf} based \PDF\ viewer: \type {SumatraPDF}.
+\stopitem
+\startitem
+ And occasionally we use the tools that come with \type {mupdf}.
+\stopitem
+\startitem
+ So when checking if that viewer supports \JAVASCRIPT\ in widgets I noticed
+ the stand alone interpreter. \footnote {The official name is \ECMASCRIPT\
+ which is the standardized core language.}
+\stopitem
+\startitem
+ Which made me wonder how easy it would be to interface to it.
+\stopitem
+
+\blank
+
+\startitem
+ It uses the lightweight library subsystem: like \FFI\ the library interface
+ is setup dynamically.
+\stopitem
+\startitem
+ Support is {\em not} integrated in \LUAMETATEX, so there is no overhead and
+ there are no dependencies.
+\stopitem
+\startitem
+ We assume that the library is on the system, and when not, then there is also
+ also no support.
+\stopitem
+\startitem
+ We stick to the absolute minimum of interfacing needed and delegate
+ everything else to \LUA.
+\stopitem
+\startitem
+ We assume a stable \API, and if not, well \unknown\ sorry.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The components]
+
+\startitemize
+
+\startitem
+ The optional, delayed loading, interface, adds only a few KB to \LUAMETATEX.
+\stopitem
+
+\startitem
+ The \LUA\ library interface that is part of the \CONTEXT\ distribution which means
+ that it's officially supported.
+\stopitem
+
+\startitem
+ There is a \TEX\ module that loads the lot and provides the user interface.
+\stopitem
+
+\startitem
+ And of course, somewhere on the system, there should be the \type {mujs}
+ library. \footnote {Taco compiled the library for his system during the talk
+ and confirmed that it also works out of the box on \OSX.}
+\stopitem
+
+\startitem
+ A module like this should conform to the \CONTEXT\ \LMTX\ standards (a
+ minimalistic not bloated \API, interfacing in \LUA\ and \TEX, etc.).
+\stopitem
+
+\stopitemize
+
+\blank[2*line]
+
+In \CONTEXT\ libraries go into the platform tree, like:
+
+\starttyping
+/tex/texmf-win64/bin/lib/luametatex/mujs/libmujs.dll
+/tex/texmf-linux-64/bin/lib/luametatex/mujs/libmujs.so
+/tex/texmf-osx-64/bin/lib/luametatex/mujs/libmujs.so
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=An example]
+
+\startbuffer
+\usemodule[ecmascript]
+
+\ecmacode {
+ console("");
+ console("When you see this, the loading has succeeded!");
+ console("");
+}
+
+\ecmacode {texprint("Just a {\\bf short} sentence.")}
+
+\startecmacode
+ texprint("And this is \\inframed{\\bs a bit longer} sentence.")
+\stopecmacode
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\stoptitle
+
+\starttitle[title=Catcodes]
+
+As with the \LUA\ interface, catcode regimes are supported:
+
+\startbuffer
+\ecmacode {texprint(catcodes.vrb,"Just a {\\bf short} sentence.")}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+Possible values are:
+
+\starttabulate
+\NC \type {tex} \NC regular \TEX\ catcode regime \NC \NR
+\NC \type {ctx} \NC standard \CONTEXT\ catcode regime \NC \NR
+\NC \type {vrb} \NC verbatim catcode regime \NC \NR
+\NC \type {prt} \NC protected \CONTEXT\ catcode regime \NC \NR
+\stoptabulate
+
+\stoptitle
+
+\starttitle[title=Print whatever you want]
+
+\startbuffer
+\startecmacode
+ console("We're doing some MetaPost!");
+ texsprint(
+ "\\startMPcode "
+ + 'fill fullsquare xyscaled (6cm,1cm) withcolor "darkgray";'
+ + 'fill fullsquare xyscaled (4cm,1cm) withcolor "middlegray";'
+ + 'fill fullsquare xyscaled (2cm,1cm) withcolor "lightgray";'
+ + "\\stopMPcode "
+ );
+\stopecmacode
+\stopbuffer
+
+\typebuffer
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+Of course the code doesn't look pretty but it can serve as a step|-|up to the real
+deal: coding in \CONTEXT\ speak (or \LUA).
+
+\stoptitle
+
+\starttitle[title=Files]
+
+Because the interpreter is pretty bare, interfacing to the file system has to be
+provided but we can just use what we already have (controlled by \LUA).
+
+\startbuffer
+\startecmacode
+ var f = File("\jobname","r");
+ var l = f.read("*a");
+ f.close();
+ texprint(
+ "This file has "
+ + l.length // or: l.length.toString()
+ + " bytes!"
+ )
+\stopecmacode
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+We support the usual arguments, like \type {*a}, \type {*l}, a number indicating
+the bytes to read etc. There is no support for writing files (let's use the
+security excuse).
+
+\page
+
+A file with some script:
+
+\startluacode
+io.savedata("context-2020-ecmascript.js",[[
+function filesize(name) {
+ var f = File(name,"r");
+ if (f != undefined) {
+ var l = f.seek("end");
+ f.close();
+ return l;
+ } else {
+ return 0;
+ }
+}
+]])
+\stopluacode
+
+\typefile{context-2020-ecmascript.js}
+
+Loading that file:
+
+\startbuffer
+\ecmafile{context-2020-ecmascript.js}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Using that function:
+
+\startbuffer
+\ecmacode{texsprint("This file has " + filesize("\jobname.tex") + " bytes!")}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stoptitle
+
+\starttitle[title=Ecmascript from \LUA]
+
+\startbuffer
+\startluacode
+ optional.loaded.mujs.execute [[
+ var MyMax = 10; // an example of persistence
+ ]]
+
+ optional.loaded.mujs.execute [[
+ texsprint("\\startpacked");
+ for (var i = 1; i <= MyMax; i++) {
+ texprint(
+ "Here is some rather dumb math test: "
+ + Math.sqrt(i/MyMax)
+ + "!\\par"
+ );
+ }
+ texsprint("\\stoppacked");
+ ]]
+\stopluacode
+\stopbuffer
+
+\typebuffer \page The result: \getbuffer
+
+\stoptitle
+
+\starttitle[title=So what good is it]
+
+\startitemize
+\startitem Not that much value is added compared to what we already have. \stopitem
+\startitem But at least we can say that we can do \ECMASCRIPT\ (aka \JAVASCRIPT). \stopitem
+\startitem And it might convince (new) users to use the \LUA\ interfaces instead. \stopitem
+\startitem So we pay a low price and have no overhead anyway. \stopitem
+\stopitemize
+
+\stoptitle
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.gp b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.gp
new file mode 100644
index 00000000000..1f21ca57cf4
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.gp
@@ -0,0 +1,8 @@
+set format xy "$%g$"
+
+set title 'This is a plot of $y=\sin(x)$'
+set xlabel 'This is the $x$ axis'
+set ylabel 'This is the $y$ axis'
+
+plot [0:6.28] [0:1] sin(x)
+
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.svg b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.svg
new file mode 100644
index 00000000000..eb7d6de3c3a
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-gpdemo.svg
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="windows-1252" standalone="no"?>
+<svg
+ width="600" height="480"
+ viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>Gnuplot</title>
+<desc>Produced by GNUPLOT 5.5 patchlevel 0 </desc>
+
+<g id="gnuplot_canvas">
+
+<rect x="0" y="0" width="600" height="480" fill="none"/>
+<defs>
+
+ <circle id='gpDot' r='0.5' stroke-width='0.5' stroke='currentColor'/>
+ <path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+ <path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+ <path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+ <rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+ <rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+ <circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+ <use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+ <path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+ <use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+ <use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+ <use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+ <use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+ <use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+ <path id='gpPt13' stroke-width='0.222' stroke='currentColor' d='M0,1.330 L1.265,0.411 L0.782,-1.067 L-0.782,-1.076 L-1.265,0.411 z'/>
+ <use xlink:href='#gpPt13' id='gpPt14' fill='currentColor' stroke='none'/>
+ <filter id='textbox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
+ <feFlood flood-color='white' flood-opacity='1' result='bgnd'/>
+ <feComposite in='SourceGraphic' in2='bgnd' operator='atop'/>
+ </filter>
+ <filter id='greybox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
+ <feFlood flood-color='lightgrey' flood-opacity='1' result='grey'/>
+ <feComposite in='SourceGraphic' in2='grey' operator='atop'/>
+ </filter>
+</defs>
+<g fill="none" color="white" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,422.4 L89.2,422.4 M575.0,422.4 L566.0,422.4 '/> <g transform="translate(71.9,426.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >$0$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,348.7 L89.2,348.7 M575.0,348.7 L566.0,348.7 '/> <g transform="translate(71.9,352.6)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >$0.2$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,275.1 L89.2,275.1 M575.0,275.1 L566.0,275.1 '/> <g transform="translate(71.9,279.0)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >$0.4$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,201.4 L89.2,201.4 M575.0,201.4 L566.0,201.4 '/> <g transform="translate(71.9,205.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >$0.6$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,127.8 L89.2,127.8 M575.0,127.8 L566.0,127.8 '/> <g transform="translate(71.9,131.7)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >$0.8$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,54.1 L89.2,54.1 M575.0,54.1 L566.0,54.1 '/> <g transform="translate(71.9,58.0)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >$1$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,422.4 L80.2,413.4 M80.2,54.1 L80.2,63.1 '/> <g transform="translate(80.2,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >$0$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M159.0,422.4 L159.0,413.4 M159.0,54.1 L159.0,63.1 '/> <g transform="translate(159.0,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >$1$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M237.8,422.4 L237.8,413.4 M237.8,54.1 L237.8,63.1 '/> <g transform="translate(237.8,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >$2$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M316.6,422.4 L316.6,413.4 M316.6,54.1 L316.6,63.1 '/> <g transform="translate(316.6,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >$3$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M395.4,422.4 L395.4,413.4 M395.4,54.1 L395.4,63.1 '/> <g transform="translate(395.4,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >$4$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M474.1,422.4 L474.1,413.4 M474.1,54.1 L474.1,63.1 '/> <g transform="translate(474.1,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >$5$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M552.9,422.4 L552.9,413.4 M552.9,54.1 L552.9,63.1 '/> <g transform="translate(552.9,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >$6$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,54.1 L80.2,422.4 L575.0,422.4 L575.0,54.1 L80.2,54.1 Z '/></g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <g transform="translate(19.0,238.3) rotate(270)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >This is the $y$ axis</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <g transform="translate(327.6,471.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >This is the $x$ axis</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <g transform="translate(327.6,31.0)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >This is a plot of $y=sin(x)$</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+ <g id="gnuplot_plot_1" ><title>sin(x)</title>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <g transform="translate(507.9,76.0)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text>sin(x)</text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='rgb(148, 0, 211)' d='M516.2,72.1 L558.4,72.1 M80.2,422.4 L85.2,399.1 L90.2,375.8 L95.2,352.7 L100.2,329.9 L105.2,307.5
+ L110.2,285.6 L115.2,264.2 L120.2,243.4 L125.2,223.4 L130.2,204.1 L135.2,185.8 L140.2,168.3 L145.2,152.0
+ L150.2,136.6 L155.2,122.5 L160.2,109.5 L165.2,97.9 L170.2,87.5 L175.2,78.4 L180.2,70.8 L185.2,64.5
+ L190.2,59.7 L195.2,56.4 L200.2,54.5 L205.1,54.1 L210.1,55.2 L215.1,57.8 L220.1,61.8 L225.1,67.3
+ L230.1,74.2 L235.1,82.6 L240.1,92.2 L245.1,103.2 L250.1,115.5 L255.1,129.1 L260.1,143.8 L265.1,159.6
+ L270.1,176.5 L275.1,194.4 L280.1,213.2 L285.1,232.8 L290.1,253.2 L295.1,274.3 L300.1,295.9 L305.1,318.1
+ L310.1,340.7 L315.1,363.7 L320.1,386.8 L325.1,410.1 L327.7,422.4 '/></g>
+ </g>
+<g fill="none" color="white" stroke="rgb(148, 0, 211)" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="black" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M80.2,54.1 L80.2,422.4 L575.0,422.4 L575.0,54.1 L80.2,54.1 Z '/></g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+</g>
+</svg>
+
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.pdf
new file mode 100644
index 00000000000..94c51513802
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.tex
new file mode 100644
index 00000000000..e1104dabf53
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.tex
@@ -0,0 +1,380 @@
+% language=us
+
+% \enabletrackers[context*]
+
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={IMPLEMENTERS},
+ banner={an old feature still evolving},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=Interfacing with \LUA]
+
+\startitemize
+
+\startitem
+ Quite some activity is delegated to \LUA.
+\stopitem
+\startitem
+ Normally the initiative is at the \TEX\ end.
+\stopitem
+\startitem
+ We can set variables or call functions etc.
+\stopitem
+\startitem
+ We can parameters to function calls.
+\stopitem
+\startitem
+ From the \LUA\ end we can use scanners to pick up data.
+\stopitem
+\startitem
+ We provide some consistent interfaces for doing all that.
+\stopitem
+\startitem
+ From \TEX\ to \LUA\ we use \type {\ctxlua{...}} and friends.
+\stopitem
+\startitem
+ From \LUA\ to \TEX\ we use \type {context(...)} and alike.
+\stopitem
+\startitem
+ For adding functionality we use so called implementers.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Calling \LUA]
+
+\startbuffer
+\ctxlua{context("ok")}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\ctxlua{context(2 * tokens.scanners.integer())} 10
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startluacode
+function document.MyThing() context(2 * tokens.scanners.integer()) end
+\stopluacode
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\ctxlua{document.MyThing()} 20 \quad
+\ctxlua{document.MyThing()} 30 \quad
+\ctxlua{document.MyThing()} 40
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stoptitle
+
+\starttitle[title=Streamlining \LUA]
+
+\startbuffer
+\startluacode
+interfaces.implement {
+ name = "MyThing",
+ public = true,
+ arguments = "integer",
+ actions = function(i) context(i * 2) end,
+ -- actions = { function(i) return i * 2 end, context },
+}
+\stopluacode
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\MyThing 20 \quad \MyThing 30 \quad \MyThing 40
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stoptitle
+
+\starttitle[title=Making commands]
+
+\startbuffer
+\startluacode
+interfaces.implement {
+ name = "MyRoot",
+ public = true,
+ actions = function()
+ local a = tokens.scanners.integer()
+ if not tokens.scanners.keyword("of") then
+ -- tex.error("the keyword 'of' expected")
+ end
+ local b = tokens.scanners.integer()
+ context("%0.6N",math.sqrt(b,a))
+ end,
+}
+\stopluacode
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\MyRoot 2 of 40 \quad \MyRoot 3 60
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stoptitle
+
+\starttitle[title=Scanners]
+
+There are lots of scanners: \blank
+
+\startalign[flushleft,broad] \tttf
+ \cldcontext { table.concat ( table.sortedkeys (tokens.scanners), " " ) }
+\stopalign
+
+\stoptitle
+
+\starttitle[title=A more complex example]
+
+Let's implement a matcher: \blank
+
+\startbuffer
+\doloopovermatch {(.)} {luametatex} { [#1] }
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\doloopovermatch {([\letterpercent w]+)} {\cldloadfile{tufte.tex}} { [#1] }
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stoptitle
+
+\starttitle[title=A more complex example (\TEX)]
+
+Here is the macro definition of this loop: \blank
+
+\starttyping
+\protected\def\doloopovermatch#1#2#3%
+ {\pushmacro\matchloopcommand
+ \def\matchloopcommand##1##2##3##4##5##6##7##8##9{#3}%
+ \ctxluamatch\matchloopcommand{#1}{#2}%
+ \popmacro\matchloopcommand}
+\stoptyping
+
+\startitemize
+
+\startitem The pushing and popping makes it possible to nest this macro. \stopitem
+\startitem The definition of the internal match macro permits argument references. \stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=A more complex example (\LUA)]
+
+At the \LUA\ end we use an implementer: \blank
+
+\starttyping[style=\small\tt]
+local escape = function(s) return "\\" .. string.byte(s) end
+
+interfaces.implement {
+ name = "ctxluamatch",
+ public = true,
+ usage = "value",
+ actions = function()
+ local command = context[tokens.scanners.csname()]
+ local pattern = string.gsub(tokens.scanners.string(),"\\.",escape)
+ local input = string.gsub(tokens.scanners.string(),"\\.",escape)
+ for a, b, c, d, e, f, g, h, i in string.gmatch(input,pattern) do
+ command(a, b or "", c or "", d or "", e or "", f or "", g or "",
+ h or "", i or "")
+ end
+ return tokens.values.none
+ end,
+}
+\stoptyping
+
+So what does the \type {usage} key tells the implementer?
+
+\stoptitle
+
+\starttitle[title=Value functions]
+
+Normally we pipe back verbose strings that are interpreted as if they were
+files. Value functions are different;
+
+\startitemize
+
+\startitem
+ The return value indicates what gets fed back in the input.
+\stopitem
+\startitem
+ This can be: \cldcontext { table.concat(token.getfunctionvalues(), ", ", 0) }.
+\stopitem
+\startitem
+ When possible an efficient token is injected.
+\stopitem
+\startitem
+ Value function can check if they are supposed to feed back a value.
+\stopitem
+\startitem
+ So, they can be used as setters and getters.
+\stopitem
+\startitem
+ A variant is a function that is seen as conditional.
+\stopitem
+\startitem
+ In (simple) tracing they are presented as primitives.
+\stopitem
+\startitem
+ They are protected against user overload (aka: frozen).
+\stopitem
+\startitem
+ All this is experimental and might evolve.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=So, let's step up a level]
+
+Say that we want an expandable command:
+
+\startbuffer
+\edef\foo{\doloopovermatched{.}{123}{(#1)}} \meaning\foo
+\stopbuffer
+
+\typebuffer \blank \getbuffer \blank
+
+Or nested:
+
+\startbuffer
+\edef\foo {%
+ \doloopovermatched {(..)} {123456} {%
+ \doloopovermatched {(.)(.)} {#1} {%
+ [##1][##2]%
+ }%
+ }%
+} \meaning\foo
+\stopbuffer
+
+\typebuffer \blank \getbuffer \blank
+
+\stoptitle
+
+\starttitle[title=So, let's step up a level]
+
+Compare:
+
+\starttyping[style=\small\tt]
+\protected\def\doloopovermatch#1#2#3%
+ {\pushmacro\matchloopcommand
+ \def\matchloopcommand##1##2##3##4##5##6##7##8##9{#3}%
+ \ctxluamatch\matchloopcommand{#1}{#2}%
+ \popmacro\matchloopcommand}
+\stoptyping
+
+With:
+
+\starttyping[style=\small\tt]
+\def\doloopovermatched#1#2#3%
+ {\beginlocalcontrol
+ \pushmacro\matchloopcommand
+ \def\matchloopcommand##1##2##3##4##5##6##7##8##9{#3}%
+ \endlocalcontrol
+ \the\ctxluamatch\matchloopcommand{#1}{#2}%
+ \beginlocalcontrol
+ \popmacro\matchloopcommand
+ \endlocalcontrol}
+\stoptyping
+
+Local control hides the assignments (it basically nests the mail loop).
+
+\stoptitle
+
+\starttitle[title=A few teasers (\TEX)]
+
+\starttyping[style=\small\tt]
+\doloopovermatch {(\letterpercent d+)} {this 1 is 22 a 333 test} { [#1] }
+
+\doloopovermatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd} {
+ [
+ \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#1} {(##1 ##2)}
+ \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#2} {(##1 ##2)}
+ ]
+}
+
+\doloopovermatch
+ {(.-)\letterpercent{\bf (.-)\letterpercent}(.*)}
+ {this is {\bf a} test}
+ {#1{\it not #2}#3}
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=A few teasers (\LUA)]
+
+\starttyping[style=\small\tt]
+interfaces.implement {
+ name = "bitwisexor", public = true, usage = "value", actions =
+ function(what)
+ local a = tokens.scanners.cardinal()
+ scankeyword("with")
+ local b = tokens.scanners.cardinal()
+ if what == "value" then
+ return tokens.values.cardinal, a ~ b
+ else
+ logs.texerrormessage("you can't use \\bitwiseor this way")
+ end
+ end
+}
+interfaces.implement {
+ name = "ifbitwiseand", public = true, usage = "condition", actions =
+ function(what)
+ local a = tokens.scanners.cardinal()
+ local b = tokens.scanners.cardinal()
+ return tokens.values.boolean, (a & b) ~= 0
+ end
+}
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Questions and more examples]
+
+More examples will be given in the editor.
+
+\stoptitle
+
+\stopdocument
+
+% \doloopovermatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd} {
+% [
+% \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#1} {(##1 ##2)}
+% \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#2} {(##1 ##2)}
+% ]
+% }
+
+% \doloopovermatch {(\letterpercent d+)} {this 1 is 22 a 333 test} { [#1] }
+
+% \testfeatureonce{10000}{\doloopovermatch {(\letterpercent d+)} {this 1 is 22 a 333 test} {}} \elapsedtime
+
+% \doloopovermatch
+% {(.-)\letterpercent{\bf (.-)\letterpercent}(.*)}
+% {this is {\bf a} test}
+% {#1{\it not #2}#3}
+
+% \doloopovermatch {([\letterpercent w]+)} {\cldloadfile{tufte.tex}} { [#1] }
+
+% \testfeatureonce{100}{\doloopovermatch {([\letterpercent w]+)}{\cldloadfile{tufte.tex}} {}} \elapsedtime
+
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.pdf
new file mode 100644
index 00000000000..fcb906f8b82
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex
new file mode 100644
index 00000000000..10b57660ea9
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex
@@ -0,0 +1,529 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={LUAMETATEX},
+ banner={where do we stand},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=When it started]
+
+\startitemize
+
+\startitem
+ About three years ago the idea came up to go this route.
+\stopitem
+\startitem
+ At the 2018 meeting it was first mentioned and those present were okay with
+ it.
+\stopitem
+\startitem
+ Early 2019 the first beta release took place.
+\stopitem
+\startitem
+ At the 2019 meeting the first more official version was presented.
+\stopitem
+\startitem
+ Around the 2020 meeting we have more or less arrived at what I had in mind.
+\stopitem
+\startitem
+ At the 2021 meeting I expect the code to be stable and repositories to be set
+ up.
+\stopitem
+\startitem
+ At the 2022 meeting we can make the official transition from \MKIV\ to \LMTX.
+\stopitem
+\startitem
+ Some new options are only enabled in my local \type {cont-exp.tex} file.
+\stopitem
+\startitem
+ Knowing that Wolfgang keeps an eye on all those changes makes me more daring.
+\stopitem
+\startitem
+ We aim to get less (but more efficient) macro code that on the average looks
+ better.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Why it started]
+
+\startitemize
+
+\startitem
+ There was an increasing pressure for a stable \LUATEX.
+\stopitem
+\startitem
+ There should be no more changes to the interfaces, no more extensions.
+\stopitem
+\startitem
+ One can run into interesting comments on the web (as usual), like
+ \startitemize[packed]
+ \startitem The \LUATEX\ program has \quote {many bugs}. \stopitem
+ \startitem The \LUATEX\ manual is bad. \stopitem
+ \startitem The \LUATEX\ program is too slow to be useful. \stopitem
+ \startitem The \LUATEX\ program will never end up in distributions. \stopitem
+ \startitem The \LUATEX\ project is funded and developed in a commercial setting. \stopitem
+ \stopitemize
+\stopitem
+\startitem
+ I won't comment on how I read these (demotivating) comments because \unknown
+\stopitem
+\startitem
+ \unknown\ it anyway often says more about the writer (attitudes) than about
+ \LUATEX.
+\stopitem
+\startitem
+ I also looks like (non \CONTEXT) users are charmed by \LUATEX, and the more
+ they code, the more we need to freeze.
+\stopitem
+\startitem
+ So, hopefully, the \LUAMETATEX\ development does not interfere badly with
+ developments outside the \CONTEXT\ community.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The development]
+
+The summary on the next pages is partial. More can be found in articles and
+documents that come with the distribution.
+
+\startitemize
+
+\startitem
+ \LUATEX\ started out as \CWEB\ code \unknown\ that eventually became just
+ \CCODE\ \unknown\ which in \LUAMETATEX\ has been detached from the (complex)
+ infrastructure.
+\stopitem
+\startitem
+ The basic idea is to only keep the core of \TEX, but for instance font
+ loading, file handling and the backend are gone.
+\stopitem
+\startitem
+ As a consequence the code has been reorganized (shuffled around).
+\stopitem
+\startitem
+ I experimented a lot without bothering about usage elsewhere and I like the
+ result so far.
+\stopitem
+\startitem
+ The \CONTEXT\ distribution will at some point ship with the source.
+\stopitem
+
+\stopitemize
+
+\starttitle[title=File handling]
+
+\startitemize
+
+\startitem
+ All file handling goes via \LUA, also read and write related primitives.
+\stopitem
+\startitem
+ The same is true for terminal (console) handling.
+\stopitem
+\startitem
+ Part of that (the writing) was actually kind of extension code in \TEX\ and
+ partly a system dependency.
+\stopitem
+\startitem
+ The \ETEX\ pseudo file \type {\scantokens} primitive uses the same mechanism
+ as \LUA\ does.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The macro machinery]
+
+\startitemize
+
+\startitem
+ There are extensions to the way macro arguments are handled (less clumsy
+ macros).
+\stopitem
+\startitem
+ There are extra if tests (makes for nicer macros).
+\stopitem
+\startitem
+ Else branches in conditions can be collapsed using \type {\orelse} and \type
+ {\orunless} which gives cleaner low level code.
+\stopitem
+\startitem
+ Tracing gives more detail about node properties and also shows attributes.
+\stopitem
+\startitem
+ Some new data carriers have been added that can be played with from \LUA .
+\stopitem
+\startitem
+ Macros can efficiently be frozen (new) and protected (redone) and the
+ concepts \quote {long} and \type {outer} are gone. \footnote {In \CONTEXT\
+ macros were always \type {\long} and never \type {\outer}. Most commands were
+ unexpandable (also in \MKII, pre \ETEX). So, users won't notice this.}
+\stopitem
+\startitem
+ Saving and restoring is somewhat more efficient (partly a side effect of
+ wider memory).
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Language]
+
+\startitemize
+
+\startitem
+ Language control settings now use less parameters but bit sets instead.
+\stopitem
+\startitem
+ Only basic parameters are stored in the format file now.
+\stopitem
+\startitem
+ There are all kind of small improvements.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Typesetting]
+
+\startitemize
+
+\startitem
+ Attributes (the lists and states) are implemented more efficiently.
+\stopitem
+\startitem
+ The paragraph state is stored with the paragraph.
+\stopitem
+\startitem
+ Paragraphs can be normalized and options are now set with bit sets.
+\stopitem
+\startitem
+ Boxes carry orientation related information (offsets, rotation, etc).
+\stopitem
+\startitem
+ Some nodes carry more information.
+\stopitem
+\startitem
+ Directions are mostly gone (it's up to the backend).
+\stopitem
+\startitem
+ Migrated content is optionally kept with boxes.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Math]
+
+\startitemize
+
+\startitem
+ Some math concepts have been extended (like prescripts and some more
+ control over styles).
+\stopitem
+\startitem
+ There are plenty of new control details.
+\stopitem
+\startitem
+ The math parameter settings obey grouping in a math list.
+\stopitem
+\startitem
+ We can have math in discretionaries in text and more advanced discretionaries
+ in math as well.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Fonts]
+
+\startitemize
+
+\startitem
+ Font specification information no longer uses the string pool (which saves a
+ lot).
+\stopitem
+\startitem
+ Of course we still have the basic font handler.
+\stopitem
+\startitem
+ We only store what is needed for traditional \TEX\ font handling.
+\stopitem
+\startitem
+ Virtual fonts are even more virtual (also a backend thing) so we can have
+ more features.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The code]
+
+\startitemize
+
+\startitem
+ Artifacts from \PASCAL\ and \CWEB\ have been removed.
+\stopitem
+\startitem
+ Languages, fonts, marks etc are no longer \quote {register} based.
+\stopitem
+\startitem
+ The token interface is more abstract and no longer presents strange numbers.
+\stopitem
+\startitem
+ Some internals have been reconstructed because of cleaner \LUA\ interfacing.
+\stopitem
+\startitem
+ A side effect of this is better abstraction of the equivalent ranges.
+\stopitem
+\startitem
+ The code has been made more abstract (and looks easier in e.g. Visual Studio).
+\stopitem
+\startitem
+ The compile farm is used to check if compilation works out of the box.
+\stopitem
+\startitem
+ Compilation is fast and easy, otherwise this project was not possible.
+\stopitem
+\startitem
+ Readability of the code is constantly improved (the usual: has to look okay
+ in my editor).
+\stopitem
+\startitem
+ The code has been made mostly independent of specific operating system needs.
+\stopitem
+\startitem
+ Wide characters are dealt with in Windows interfaces.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Libraries]
+
+\startitemize
+
+\startitem
+ We really want to stay lean and mean: the engine is also a \LUA\ engine.
+\stopitem
+\startitem
+ All code is included, a few libraries are used, but these are small, old and
+ stable.
+\stopitem
+\startitem
+ In addition some helper libraries are made (including pplib by Pawel).
+\stopitem
+\startitem
+ What we ship is what you get: \CONTEXT\ will not depend on more than that.
+\stopitem
+\startitem
+ If something is updated (at all) the differences are checked first.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The \LUA\ engine]
+
+\startitemize
+
+\startitem
+ We use the latest (even alpha) \LUA\ (5.4) because \LUAMETATEX\ is a good
+ test.
+\stopitem
+\startitem
+ There is no support for \LUAJIT\ and the \FFI\ interface is gone.
+\stopitem
+\startitem
+ There is a limited set of libraries that we support but no code is (and will
+ be) included.
+\stopitem
+\startitem
+ There are less callbacks (because we only have a frontend).
+\stopitem
+\startitem
+ There are more token scanners and some options have been added.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Efficiency]
+
+\startitemize
+
+\startitem
+ We benefit some more from the wider memory words (some constructs could go).
+\stopitem
+\startitem
+ The format file is smaller and not longer compressed.
+\stopitem
+\startitem
+ Memory management is now mostly dynamic and usage is much lower.
+\stopitem
+\startitem
+ There are more statistics (also as side effect of memory management).
+\stopitem
+\startitem
+ Dumping the format has been made a bit more robust and is faster.
+\stopitem
+\startitem
+ The core engine performs a bit better (machines don't get that much faster).
+\stopitem
+\startitem
+ We want to be prepared for future architectures.
+\stopitem
+\startitem
+ We manage to keep the binary way below 3 MB.
+\stopitem
+\startitem
+ The lot runs quite well on e.g.\ a Raspberry Pi 4.
+\stopitem
+
+\stopitemize
+
+\starttitle[title=Upgraded \METAPOST]
+
+\startitemize
+
+\startitem
+ All (eight bit) font stuff has been stripped from the \METAPOST\ library.
+\stopitem
+\startitem
+ The library no longer has a \POSTSCRIPT\ backend.
+\stopitem
+\startitem
+ The library provides scanners that make extensions possible.
+\stopitem
+\startitem
+ All file \IO\ goes via \LUA.
+\stopitem
+\startitem
+ There are a few additions like pre|/|postscripts for clip and bounding boxes.
+\stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Praise for the users]
+
+\startitemize
+
+\startitem
+ Much has been done and I probably forget to mention a lot.
+\stopitem
+\startitem
+ The number of bugs is relative small compared to what gets changed and added.
+\stopitem
+\startitem
+ The test suite gets ran very often, also to check if performance is okay.
+\stopitem
+\startitem
+ I could only do this because the \CONTEXT\ users are so tolerant.
+\stopitem
+\startitem
+ Some seem to constantly check for updates so they help with fast testing.
+\stopitem
+\startitem
+ The \CONTEXT\ code base gets stepwise adapted (split files) which again
+ forces users to test.
+\stopitem
+\startitem
+ It takes a lot of time because we take small steps in order not to mess up.
+\stopitem
+\startitem
+ I would not do it without the positive attribute of the \CONTEXT\ users.
+\stopitem
+\startitem
+ It's all about motivation and I thank the \CONTEXT\ users for providing this
+ friendly and non|-|competitive bubble!
+\stopitem
+
+\stopitemize
+
+\starttitle[title=Todo]
+
+\startitemize
+
+\startitem
+ Maybe add some more sanity checks in order to catch errors intruded by
+ callbacks. Maybe add some more tracing too.
+\stopitem
+\startitem
+ Explore variants, like having registers in dedicated eqtb tables so that we
+ can allocate them dynamically (mostly for the fun of doing it).
+\stopitem
+\startitem
+ Add some more documentation (read: addition cq.\ remarks about where the
+ original documentation no longer applies, but we have years for doing that).
+\stopitem
+\startitem
+ Update the manual (which is done occasionally in batch based on print|-|outs;
+ there is no real need to hurry because we still experiment).
+\stopitem
+\startitem
+ Apply some of the new stuff in \LMTX. Take up some challenges.
+\stopitem
+\startitem
+ Wrap up new functionality (once it's stable) in articles and other documents.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=And \LUATEX ?]
+
+\startitemize
+
+\startitem
+ Of course \LUATEX\ will be maintained! After all, \MKIV\ needs it and it
+ serves as reference for the front|-|end rendering and back|-|end generation
+ when we're messing with \LUAMETATEX.
+\stopitem
+\startitem
+ It is used by \LATEX\ and there are now also plain inspired packages. Because
+ there are spin|-|offs (\LATEX\ has settled on a version with built|-|in font
+ processing) we cannot change much.
+\stopitem
+\startitem
+ And \LUATEX\ being nicely integrated into \TEXLIVE\ is another argument for
+ not touching it too much.
+\stopitem
+\startitem
+ I have no clue of \LUATEX\ usage but that fact alone already makes an
+ argument for being even more careful. It's bad advertisement for \TEX\ when
+ users who use the low level interfaces get confronted with conceptual
+ changes.
+\stopitem
+\startitem
+ So in the end not much will be back ported to \LUATEX: at some point the code
+ base became too different and it's the price paid for the stability demand.
+ That way we cannot introduce new bugs either. It also doesn't pay of.
+\stopitem
+\startitem
+ But, a few non|-|intrusive things might actually trickle into it in due time,
+ also out of self interest: it might help to share code between \MKIV\ and
+ \LMTX.
+\stopitem
+
+\stopitemize
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.pdf
new file mode 100644
index 00000000000..1932da3940a
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.tex
new file mode 100644
index 00000000000..a0e119e755d
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mkii-mkiv-mkxl.tex
@@ -0,0 +1,208 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={MKII MKIV LMTX},
+ banner={where does it end},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=Welcome]
+
+This meeting was kind of special because of the Covid situations. It forces us to
+adapt and think about how to deal with this kind of situations. But, we had a
+very nice meeting as usual. The first talk was a summary of where we started and
+where we are now. The other talks are more specialized.
+
+All presentations use the same simple style. No interaction, no fancy \PDF\
+features, also because we had to stream them.
+
+\stoptitle
+
+\starttitle[title=MKII]
+
+\startitemize
+\startitem
+ In the 80's I bought the \TEX book but it all stayed pretty abstract.
+\stopitem
+\startitem
+ In the beginning of the 90's we had to get some math on paper we bought (!) a
+ copy of \LATEX.
+\stopitem
+\startitem
+ Right from the start we had to make in look a bit better than out of the box.
+\stopitem
+\startitem
+ So a shell around if evolved but soon we started from scratch.
+\stopitem
+\startitem
+ We did so first on top \LAMSTEX, then we switched to \INRSTEX.
+\stopitem
+\startitem
+ Soon we only used a few components of that: we learned from trial and error.
+\stopitem
+\startitem
+ We joined the \NTG, met Taco and friends, and slowly got some presence.
+\stopitem
+\startitem
+ And it all went on till we had what we later called \MKII.
+\stopitem
+\startitem
+ But, we always had ideas about what more we wanted.
+\stopitem
+\startitem
+ We went from \TEX\ to \ETEX\ to \PDFTEX\ to \PDFETEX.
+\stopitem
+\startitem
+ We played with the idea of \type {eetex}, different backends etc.\ (show old
+ \MAPS\ article).
+\stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=MK{\thinspace\periods[2]}]
+
+\startitemize
+\startitem
+ \CONTEXT\ has been keyword driven and class based from the start.
+\stopitem
+\startitem
+ This came with a performance hit so the reputation was that it was slow:
+ inheritance, flexibility, user control \unknown\ it all comes at a price.
+\stopitem
+\startitem
+ \CONTEXT\ always had an abstract driver model (\DVIPS, \DVIPSONE, \DVIWINDO,
+ \ACROBAT, \PDFTEX, etc).
+\stopitem
+\startitem
+ It also had an adaptive the front end so we could support successive engines:
+ \TEX, \ETEX, \PDFTEX, \ALEPH, \XETEX.
+\stopitem
+\startitem
+ There had to be color and graphics support from the beginning.
+\stopitem
+\startitem
+ The interfaces permitted extension without breaking compatibility. The user
+ interface was multilingual: we started with Dutch and German (users).
+\stopitem
+\startitem
+ It came with management tools (like \TEXEXEC, \TEXUTIL, \TEXFONT, \TEXMFSTART) etc.\
+ for job control, dealing with (user) fonts, image manipulations etc.
+\stopitem
+\startitem
+ And of course \METAPOST, \XML, combining font setups, mixing encodings, \UTF\
+ patterns evolved with the system.
+\stopitem
+\startitem
+ Educational usage was often the reason for new features.
+\stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=MKIV]
+
+\startitemize
+\startitem
+ At some point we started playing with \LUA\ (in \SCITE).
+\stopitem
+\startitem
+ And then with Hartmut started adding some basic \LUA\ support to a clone of
+ \PDFTEX\ that soon became \LUATEX.
+\stopitem
+\startitem
+ Next the Oriental \TEX\ project provided means for Taco to transition to
+ \CCODE .
+\stopitem
+\startitem
+ And for years we slowly built up the system. A \LUAJITTEX\ version showed up
+ and Luigi took over integration in \TEXLIVE\ (like compilation within the
+ infrastructure and updating libraries).
+\stopitem
+\startitem
+ In parallel we tested features and explored what we needed with \CONTEXT:
+ \MKIV\ evolved.
+\stopitem
+\startitem
+ And \unknown\ soon, all further development happened in \MKIV\ only: \MKII\
+ became frozen.
+\stopitem
+\startitem
+ The interface subsystem was upgraded and Wolfgang checked and completed all
+ setups while we did. Obsolete (font, language, input) mechanisms were
+ removed.
+\stopitem
+\startitem
+ A lot happened: some more \TEX, lots of \LUA, better \METAPOST\ integration,
+ more advanced \XML.
+\stopitem
+\startitem
+ To some extend a project like that became to late because the glory days of
+ \TEX\ were already past (publishing changed) but just as with \PDFTEX\ a
+ conceptual upgrade like was felt needed.
+\stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=MKXL (aka LMTX)]
+
+\startitemize
+\startitem
+ When \LUATEX\ had to be frozen a follow up took place in \LUAMETATEX. The name
+ reflects the importance of each core component.
+\stopitem
+\startitem
+ The idea is to have an lean and mean engine, one that will become very stable
+ and does not depend on the issues of the day.
+\stopitem
+\startitem
+ It's for all those dedicated users who like quality and playing around but
+ also want guarantees that the tools keeps working years from now: it's about
+ independence.
+\stopitem
+\startitem
+ Of course we tested and explored with \CONTEXT\ and this time \LMTX\ evolves.
+ Here the \type {X} reflects that we consider \XML\ to be part of the picture.
+\stopitem
+\startitem
+ Although there will be (and already is) new functionality the change is less
+ dramatic because this we don't have the change in fonts, encoding and regime
+ subsystems (which made some \MKII\ commands go away).
+\stopitem
+\startitem
+ Hopefully some of the more tricky (hard to do in good old \TEX) mechanisms
+ can be improved now.
+\stopitem
+\startitem
+ And at some point we will freeze \MKIV\ and development will happen in \LMTX\
+ only.
+\stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=This meeting]
+
+\startitemize
+\startitem
+ My talks in this meeting are mostly about \LUAMETATEX\ and the \CONTEXT\
+ version \LMTX\ that targets it: how it is done, which concepts show up, where
+ we want to go.
+\stopitem
+\startitem
+ Unless you kept a close eye on last years development, you will encounter of
+ plenty of new features that relate to \LUAMETATEX. So, there is more to tell,
+ but most of that is already known from previous meetings.
+\stopitem
+\startitem
+ And, as usual, a \CONTEXT\ meeting is not only a deadline, but also a
+ starting point. It's you who keep it all going. And, even more than that,
+ it is about us meeting.
+\stopitem
+\stopitemize
+
+\stoptitle
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.pdf
new file mode 100644
index 00000000000..a86dc2d71fa
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.tex
new file mode 100644
index 00000000000..6d2f640fb03
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-mp.tex
@@ -0,0 +1,342 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={METAFUN},
+ banner={simple fonts},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=Metafonts]
+
+\startitemize
+
+\startitem
+ Because \METAPOST\ is based on \METAFONT\ it make sense to use of for making fonts.
+\stopitem
+
+\startitem
+ Making a font is an art in itself, something that is actually proven by many bad
+ looking fonts, but we have plenty of choice nowadays.
+\stopitem
+
+\startitem
+ We tend to use free fonts and often being made by volunteers we can hardly have any
+ demands.
+\stopitem
+
+\startitem
+ So, instead of complaining (which is not nice anyway) we can try to (at least temporary)
+ come up with a solution ourselves.
+\stopitem
+
+\startitem
+ We're actually talking about missing glyphs here and \METAPOST\ can be of help.
+\stopitem
+
+\startitem
+ Also keep in mind that we always had this option or variants of it in \CONTEXT, it's
+ just that we can make nicer interfaces now.
+\stopitem
+
+\startitem
+ So, don't expect something spectacular.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=What is is not]
+
+Years ago mechanisms were added to \MKIV\ to come up with more fancy shapes in
+for instance math. Actually Alan needed it and I wanted a root symbol to look
+like school times.
+
+\startbuffer
+\useMPlibrary[mat]
+
+\setupmathradical[color=darkgray,alternative=mp]
+
+% \definemathradical [sqrt] [mp=minifun::math:radical:default]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+So:
+
+\startbuffer
+\scale[height=2cm]{$ \sqrt {a+b+c+d} $}
+\stopbuffer
+
+\typebuffer
+
+Gives:
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+\page
+
+And with:
+
+\startbuffer
+\startuniqueMPgraphic{minifun::math:radical:default}
+draw
+ math_radical_simple(OverlayWidth,OverlayHeight,OverlayDepth,OverlayOffset)
+ withpen pencircle
+ xscaled (2OverlayLineWidth)
+ yscaled (1OverlayLineWidth/4)
+ rotated 30
+ dashed evenly
+ withcolor OverlayLineColor ;
+\stopuniqueMPgraphic
+\stopbuffer
+
+\typebuffer
+
+We get
+
+\startlinecorrection
+\getbuffer
+\scale[height=2cm]{$ \sqrt {a+b+c+d} $}
+\stoplinecorrection
+
+\page
+
+Also think of stackers:
+
+\startbuffer
+\setupmathstackers [both] [color=darkgray,alternative=mp]
+\setupmathstackers [top] [color=darkgray,alternative=mp]
+\setupmathstackers [bottom] [color=darkgray,alternative=mp]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\blank[2*line]
+
+\startbuffer
+$
+ \overbracket {a+b+c+d} \quad
+ \underbracket {a+b+c+d} \quad
+ \doublebracket {a+b+c+d}
+$
+\blank
+$
+ \overparent {a+b+c+d} \quad
+ \underparent {a+b+c+d} \quad
+ \doubleparent {a+b+c+d}
+$
+\blank
+$
+ \overbrace {a+b+c+d} \quad
+ \underbrace {a+b+c+d} \quad
+ \doublebrace {a+b+c+d}
+$
+\blank
+$
+ \overbar {a+b+c+d} \quad
+ \underbar {a+b+c+d} \quad
+ \doublebar {a+b+c+d}
+$
+\blank
+$
+ \overleftarrow {a+b+c+d} \quad
+ \overrightarrow {a+b+c+d}
+$
+\blank
+$
+ \underleftarrow {a+b+c+d} \quad
+ \underrightarrow {a+b+c+d}
+$
+\stopbuffer
+
+\getbuffer
+
+\blank[2*line]
+
+But, these are just overlays and nothing special: we simply don't use the normal
+font route not fancy \LUA\ tricks either (in principle \MKII\ could do this). I
+might upgrade it some day (no real demand so far, just fun stuff).
+
+\stoptitle
+
+\starttitle[title=Real fonts]
+
+\startitemize
+
+\startitem For text we need an efficient way to define extra shapes. \stopitem
+\startitem We don't really want inline graphics every time we use a glyph. \stopitem
+\startitem We also want to cut and paste properly. \stopitem
+\startitem Basically the fact that we drop in shapes should be hidden. \stopitem
+
+\blank[2*line]
+
+\startitem
+ We use the same (generic) subsystem that is also used for color fonts, bitmap
+ emoji, \SVG\ fonts, etc.
+\stopitem
+\startitem
+ Shapes end up as \TYPETHREE\ fonts. These have some specific properties and
+ limitations, but we can actually make \UNICODE\ fonts.
+\stopitem
+\startitem
+ The system is not burdened by much overhead and most happens at embedding time.
+\stopitem
+
+\stopitemize
+
+\page
+
+\startbuffer[font]
+\definefont[DemoFontA][Serif*default @ 10pt]
+\definefont[DemoFontB][Serif*default @ 12pt]
+\definefont[DemoFontC][Serif*default @ 14pt]
+\definefont[DemoFontD][SerifBold*default @ 14pt]
+\stopbuffer
+
+\typebuffer[font] \getbuffer[font]
+
+\startbuffer[demo]
+\startlines
+\DemoFontA first\endash second\emdash third\char"2015\relax fourth
+\DemoFontB first\endash second\emdash third\char"2015\relax fourth
+\DemoFontC first\endash second\emdash third\char"2015\relax fourth
+\DemoFontD first\endash second\emdash third\char"2015\relax fourth
+\stoplines
+\stopbuffer
+
+\typebuffer[demo] \getbuffer[demo]
+
+\page
+
+\startbuffer[mpone]
+\startMPcalculation{simplefun}
+
+ vardef QuotationDashOne =
+ draw image (
+ interim linecap := squared ;
+ save l ; l := 0.2 ;
+ draw (l/2,3) -- (10-l/2,3) withpen pencircle scaled l ;
+ )
+ enddef ;
+
+ lmt_registerglyphs [
+ name = "symbolsone",
+ units = 10,
+ usecolor = true,
+ width = 10,
+ height = 3.1,
+ depth = 0,
+ ] ;
+
+ lmt_registerglyph [
+ category = "symbolsone",
+ unicode = "0x2015",
+ code = "QuotationDashOne ;"
+ ] ;
+
+\stopMPcalculation
+\stopbuffer
+
+\getbuffer[mpone]
+
+\startbuffer[font]
+\definefontfeature[exampleone][metapost=symbolsone]
+
+\definefont[DemoFontA][Serif*default,exampleone @ 10pt]
+\definefont[DemoFontB][Serif*default,exampleone @ 12pt]
+\definefont[DemoFontC][Serif*default,exampleone @ 14pt]
+\definefont[DemoFontD][SerifBold*default,exampleone @ 14pt]
+\stopbuffer
+
+\typebuffer[font] \getbuffer[font]
+
+\getbuffer[demo]
+
+\page
+
+\typebuffer[mpone][style=\tt\small\small]
+
+\page
+
+\startbuffer[mptwo]
+\startMPcalculation{simplefun}
+
+ vardef QuotationDashTwo =
+ draw image (
+ interim linecap := squared ;
+ save l ; l := 0.4 ;
+ string weight ; weight := getparameter "mpsfont" "parentdata" "shared" "rawdata" "metadata" "weight" ;
+ if weight = "semibold" : l := l * 2;
+ elseif weight = "bold" : l := l * 3; fi
+ draw (l/2,3) -- (10-l/2,3) withpen pencircle scaled l
+ withcolor yellow ;
+ )
+ enddef ;
+
+ lmt_registerglyphs [
+ name = "symbolstwo",
+ units = 10,
+ usecolor = false,
+ width = 10,
+ height = 3.1,
+ depth = 0,
+ ] ;
+
+ lmt_registerglyph [
+ category = "symbolstwo",
+ unicode = "0x2015",
+ code = "QuotationDashTwo ;"
+ ] ;
+
+\stopMPcalculation
+\stopbuffer
+
+\getbuffer[mptwo]
+
+\startbuffer[font]
+\definefontfeature[exampletwo][metapost=symbolstwo]
+
+\definefont[DemoFontA][Serif*default,exampletwo @ 10pt]
+\definefont[DemoFontB][Serif*default,exampletwo @ 12pt]
+\definefont[DemoFontC][Serif*default,exampletwo @ 14pt]
+\definefont[DemoFontD][SerifBold*default,exampletwo @ 14pt]
+\stopbuffer
+
+\typebuffer[font] \getbuffer[font]
+
+\getbuffer[demo]
+
+\page
+
+\typebuffer[mptwo][style=\tt\small\small]
+
+\stoptitle
+
+\starttitle[title=More examples]
+
+We give some examples (these are also in the modules). Overloading math
+symbols:
+
+\starttyping
+meta-imp-kindergarten.mkxl
+\stoptyping
+
+Extending fonts with Don Knuths dices and tiles (symbols, ligatures, proper
+\UNICODE):
+
+\starttyping
+meta-imp-gamesymbols.mkxl
+\stoptyping
+
+An implementation of Don Knuths ThirtySix font in various variants (color,
+random, shapes):
+
+\starttyping
+meta-imp-threesix.mkxl
+\stoptyping
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-sin.svg b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-sin.svg
new file mode 100644
index 00000000000..2d1f844386f
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-sin.svg
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="windows-1252" standalone="no"?>
+<svg
+ width="600" height="480"
+ viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>Gnuplot</title>
+<desc>Produced by GNUPLOT 5.2 patchlevel 8 </desc>
+
+<g id="gnuplot_canvas">
+
+<rect x="0" y="0" width="600" height="480" fill="none"/>
+<defs>
+
+ <circle id='gpDot' r='0.5' stroke-width='0.5' stroke='currentColor'/>
+ <path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+ <path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+ <path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+ <rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+ <rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+ <circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+ <use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+ <path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+ <use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+ <use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+ <use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+ <use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+ <use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+ <path id='gpPt13' stroke-width='0.222' stroke='currentColor' d='M0,1.330 L1.265,0.411 L0.782,-1.067 L-0.782,-1.076 L-1.265,0.411 z'/>
+ <use xlink:href='#gpPt13' id='gpPt14' fill='currentColor' stroke='none'/>
+ <filter id='textbox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
+ <feFlood flood-color='white' flood-opacity='1' result='bgnd'/>
+ <feComposite in='SourceGraphic' in2='bgnd' operator='atop'/>
+ </filter>
+ <filter id='greybox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
+ <feFlood flood-color='lightgrey' flood-opacity='1' result='grey'/>
+ <feComposite in='SourceGraphic' in2='grey' operator='atop'/>
+ </filter>
+</defs>
+<g fill="none" color="white" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,444.0 L62.9,444.0 M575.0,444.0 L566.0,444.0 '/> <g transform="translate(45.6,447.9)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >-1</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,401.4 L62.9,401.4 M575.0,401.4 L566.0,401.4 '/> <g transform="translate(45.6,405.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >-0.8</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,358.8 L62.9,358.8 M575.0,358.8 L566.0,358.8 '/> <g transform="translate(45.6,362.7)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >-0.6</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,316.2 L62.9,316.2 M575.0,316.2 L566.0,316.2 '/> <g transform="translate(45.6,320.1)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >-0.4</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,273.6 L62.9,273.6 M575.0,273.6 L566.0,273.6 '/> <g transform="translate(45.6,277.5)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" >-0.2</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,231.0 L62.9,231.0 M575.0,231.0 L566.0,231.0 '/> <g transform="translate(45.6,234.9)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" > 0</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,188.5 L62.9,188.5 M575.0,188.5 L566.0,188.5 '/> <g transform="translate(45.6,192.4)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" > 0.2</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,145.9 L62.9,145.9 M575.0,145.9 L566.0,145.9 '/> <g transform="translate(45.6,149.8)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" > 0.4</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,103.3 L62.9,103.3 M575.0,103.3 L566.0,103.3 '/> <g transform="translate(45.6,107.2)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" > 0.6</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,60.7 L62.9,60.7 M575.0,60.7 L566.0,60.7 '/> <g transform="translate(45.6,64.6)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" > 0.8</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,18.1 L62.9,18.1 M575.0,18.1 L566.0,18.1 '/> <g transform="translate(45.6,22.0)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text><tspan font-family="Arial" > 1</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,444.0 L53.9,435.0 M53.9,18.1 L53.9,27.1 '/> <g transform="translate(53.9,465.9)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >-10</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M184.2,444.0 L184.2,435.0 M184.2,18.1 L184.2,27.1 '/> <g transform="translate(184.2,465.9)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" >-5</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M314.5,444.0 L314.5,435.0 M314.5,18.1 L314.5,27.1 '/> <g transform="translate(314.5,465.9)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" > 0</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M444.7,444.0 L444.7,435.0 M444.7,18.1 L444.7,27.1 '/> <g transform="translate(444.7,465.9)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" > 5</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M575.0,444.0 L575.0,435.0 M575.0,18.1 L575.0,27.1 '/> <g transform="translate(575.0,465.9)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
+ <text><tspan font-family="Arial" > 10</tspan></text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,18.1 L53.9,444.0 L575.0,444.0 L575.0,18.1 L53.9,18.1 Z '/></g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+ <g id="gnuplot_plot_1" ><title>sin(x)</title>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <g transform="translate(507.9,40.0)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
+ <text>sin(x)</text>
+ </g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='rgb(148, 0, 211)' d='M516.2,36.1 L558.4,36.1 M53.9,115.2 L59.2,153.4 L64.4,194.8 L69.7,237.6 L75.0,280.2 L80.2,320.8
+ L85.5,357.7 L90.7,389.5 L96.0,414.8 L101.3,432.7 L106.5,442.3 L111.8,443.4 L117.1,435.8 L122.3,419.9
+ L127.6,396.3 L132.9,366.0 L138.1,330.2 L143.4,290.4 L148.6,248.2 L153.9,205.2 L159.2,163.3 L164.4,124.2
+ L169.7,89.4 L175.0,60.4 L180.2,38.3 L185.5,24.1 L190.8,18.2 L196.0,21.1 L201.3,32.4 L206.5,51.9
+ L211.8,78.6 L217.1,111.6 L222.3,149.3 L227.6,190.5 L232.9,233.2 L238.1,275.9 L243.4,316.8 L248.7,354.1
+ L253.9,386.5 L259.2,412.5 L264.4,431.2 L269.7,441.7 L275.0,443.7 L280.2,437.0 L285.5,421.9 L290.8,399.1
+ L296.0,369.4 L301.3,334.1 L306.6,294.6 L311.8,252.5 L317.1,209.6 L322.3,167.5 L327.6,128.0 L332.9,92.7
+ L338.1,63.0 L343.4,40.2 L348.7,25.1 L353.9,18.4 L359.2,20.4 L364.5,30.9 L369.7,49.6 L375.0,75.6
+ L380.2,108.0 L385.5,145.3 L390.8,186.2 L396.0,228.9 L401.3,271.6 L406.6,312.8 L411.8,350.5 L417.1,383.5
+ L422.4,410.2 L427.6,429.7 L432.9,441.0 L438.1,443.9 L443.4,438.0 L448.7,423.8 L453.9,401.7 L459.2,372.7
+ L464.5,337.9 L469.7,298.8 L475.0,256.9 L480.3,213.9 L485.5,171.7 L490.8,131.9 L496.0,96.1 L501.3,65.8
+ L506.6,42.2 L511.8,26.3 L517.1,18.7 L522.4,19.8 L527.6,29.4 L532.9,47.3 L538.2,72.6 L543.4,104.4
+ L548.7,141.3 L553.9,181.9 L559.2,224.5 L564.5,267.3 L569.7,308.7 L575.0,346.9 '/></g>
+ </g>
+<g fill="none" color="white" stroke="rgb(148, 0, 211)" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="black" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+ <path stroke='black' d='M53.9,18.1 L53.9,444.0 L575.0,444.0 L575.0,18.1 L53.9,18.1 Z '/></g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+</g>
+</svg>
+
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.pdf
new file mode 100644
index 00000000000..39b0e00cb98
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.tex
new file mode 100644
index 00000000000..3860438e8a6
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-svg.tex
@@ -0,0 +1,123 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\startdocument
+ [title={SVG GRAPHICS},
+ banner={some demos and discussion},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=Wrapup]
+
+\startitemize
+
+\startitem
+ It expands to for Scalable Vector Graphics.
+\stopitem
+\startitem
+ It is an example of application \XML\ turned standard.
+\stopitem
+\startitem
+ It started out simple, kind of expanded \POSTSCRIPT\ in \XML\ format.
+\stopitem
+\startitem
+ It took a while to be picked up as output format.
+\stopitem
+
+\blank[2*line]
+
+\startitem
+ In practice you get the same messy build-up as in other vector formats.
+\stopitem
+
+\startitem
+ This is a side effect of often unstructured editing. \footnote {Afterwards
+ Hraban gave a demonstration of editing in InkScape and there was some
+ discussion about this aspect}.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Properties]
+
+\startitemize
+
+\startitem
+ Properties can be set as attributes to an element (key/values).
+\stopitem
+\startitem
+ Properties can be set in the \type {style} attribute (semicolon separated key/values).
+\stopitem
+\startitem
+ Properties can be set via one or more \type {class} assignments.
+\stopitem
+\startitem
+ Properties can be bound to a specific element
+\stopitem
+\startitem
+ Properties can be inherited from an ancestor (somewhat vague).
+\stopitem
+\startitem
+ Properties can be redundant (nested), overloaded (parent, style), editors can
+ add their own. etc.\ \unknown\ it's kind of a mess.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Side effects]
+
+\startbuffer
+\usemodule[gnuplot]
+
+\externalfigure
+ [context-2020-gpdemo.gp]
+ [conversion=svg,width=4cm,
+ background=color,backgroundcolor=white]
+
+\externalfigure
+ [context-2020-gpdemo.gp]
+ [conversion=svg,width=6cm,
+ background=color,backgroundcolor=white]
+
+\scale
+ [height=4cm]
+ {\framed
+ [background=color,backgroundcolor=white]
+ {\includegnuplotsvgfile[context-2020-sin.svg]}}
+
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\stoptitle
+
+\starttitle[title=Simple examples]
+
+Some examples were shown (they can be found in manuals):
+
+\starttyping
+svg-lmtx-context.lua
+svg-lmtx-microsoft.lua
+svg-lmtx-mozilla.lua
+svg-lmtx-xahlee.lua
+\stoptyping
+
+Also some examples were shown from the Math4All project.
+
+\stoptitle
+
+% \starttitle[title=Complex examples]
+%
+% \starttyping
+% temporary/svg/test*
+% \stoptyping
+%
+% \stoptitle
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.pdf b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.pdf
new file mode 100644
index 00000000000..c508d25ac24
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex
new file mode 100644
index 00000000000..b987e2d107a
--- /dev/null
+++ b/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex
@@ -0,0 +1,287 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos,system-tokens]
+
+\startdocument
+ [title={TOKENS},
+ banner={tokens as I see them},
+ location={context\enspace {\bf 2020}\enspace meeting}]
+
+\starttitle[title=About tokens]
+
+\startitemize
+
+\startitem Like nodes, it's a common term used in programming. \stopitem
+\startitem In \TEX\ The Program tokens and nodes are therefore omni|-|present. \stopitem
+\startitem For most users they are irrelevant concepts. \stopitem
+\startitem But we will explain them anyway. \stopitem
+\startitem Let's try to avoid the snobbish token|-|speak sometimes heard in the community. \stopitem
+\startitem So \unknown\ I won't correct you as long as you don't correct me. \stopitem
+\startitem Let's now enter the world of tokens in the na\"ive way. \stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=What are tokens]
+
+\startitemize
+
+\startitem It is an internal data structure, effectively a (32 bit) integer. \stopitem
+\startitem This integer encodes a command (opcode) and an char code (operand). \stopitem
+\startitem But often it's not a character but more a sub command. \stopitem
+\startitem Input is converted into tokens. \stopitem
+\startitem Tokens are either expanded (interpreted) or stored. \stopitem
+\startitem When they are stored they are part of a larger data structure, a memory word. \stopitem
+\startitem Token memory is an array of such memory words. \stopitem
+\startitem The token memory \quote {word} has two integers: a token value and an index into token memory. \stopitem
+\startitem That way \TEX\ can have forward linked lists of tokens. \stopitem
+\startitem A hash table maps control sequences onto indices into token memory. \stopitem
+
+\stopitemize
+
+\starttitle[title=Some implementation details]
+
+\startitemize
+
+\startitem Sometimes there is special head token at the start. \stopitem
+\startitem A head token makes for easier appending of extra tokens. \stopitem
+\startitem Shared lists use the head node for a reference count. \stopitem
+\startitem Original \TEX\ uses global temporary lists. \stopitem
+\startitem This is needed when we expand (nested) and need to report issues. \stopitem
+\startitem This is not needed when we just serialize (which we do a lot in \LUATEX). \stopitem
+\startitem So, this is all optimized for performance and memory consumption. \stopitem
+\startitem Freed tokens are collected in a cache so tokens can get scattered. \stopitem
+\startitem In \LUAMETATEX\ we stay as close to original \TEX\ as possible. \stopitem
+\startitem But the \LUA\ interfaces force us to occasionally divert. \stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=A schematic view of tokens]
+
+A token value:
+
+\startlinecorrection[blank]
+ \setupTABLE[each][align=middle]
+ \setupTABLE[c][1][width=22mm]
+ \setupTABLE[c][2][width=42mm]
+ \bTABLE
+ \bTR \bTD cmd \eTD \bTD chr \eTD \eTR
+ \eTABLE
+\stoplinecorrection
+
+Token memory:
+
+\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
+
+\stoptitle
+
+\starttitle[title=Looking up control sequences]
+
+\startitemize
+
+\startitem A very visible to-be-token is a \type {\controlsequence}. \stopitem
+\startitem When read, the name will be looked up in the hash table. \stopitem
+\startitem When found its value will point to the table of equivalents. \stopitem
+\startitem That table keeps track of:
+ \startitemize
+ \startitem the type (cmd) \stopitem
+ \startitem the current level (grouping) \stopitem
+ \startitem the current meaning (token list) \stopitem
+ \stopitemize
+\stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The (big) table of equivalents (simplified)]
+
+\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
+
+\stoptable
+
+\starttitle[title=The hash table (simplified)]
+
+The hash table runs parallel to the main hash. On the todo list is is to move the
+registers to its own tables and make them dynamic.
+
+\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
+
+Equivalents (registers direct, macros indirect i.e.\ token lists):
+
+\startlinecorrection[blank]
+ \setupTABLE[each][align=middle]
+ \setupTABLE[c][1][width=8mm]
+ \setupTABLE[c][2][width=32mm]
+ \setupTABLE[c][3][width=32mm]
+ \setupTABLE[c][4][width=64mm]
+ \bTABLE
+ \bTR \bTD 1 \eTD \bTD level \eTD \bTD type \eTD \bTD value \eTD \eTR
+ \bTR \bTD 2 \eTD \bTD level \eTD \bTD type \eTD \bTD value \eTD \eTR
+ \bTR \bTD 3 \eTD \bTD level \eTD \bTD type \eTD \bTD value \eTD \eTR
+ \bTR \bTD n \eTD \bTD level \eTD \bTD type \eTD \bTD value \eTD \eTR
+ \eTABLE
+\stoplinecorrection
+
+\stoptitle
+
+\starttitle[title=Other data management]
+
+\startitemize
+\startitem Grouping is handles by a nesting stack. \stopitem
+\startitem Nested conditionals (\type {\if...}) have their own stack. \stopitem
+\startitem The values before assignments are saved ion 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
+
+\stoptitle
+
+\starttitle[title=Example 1: in the input]
+
+\startbuffer
+\luatokentable{1 \bf{2} 3\what {!}}
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stoptitle
+
+\starttitle[title=Example 1: in the input]
+
+\startbuffer
+\luatokentable{a \the\scratchcounter b \the\parindent \hbox to 10pt{x}}
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stoptitle
+
+\starttitle[title=Example 2: user registers]
+
+\startbuffer
+\scratchtoks{foo \framed{\red 123}456}
+
+\luatokentable\scratchtoks
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stoptitle
+
+\starttitle[title=Example 3: internal variables]
+
+\startbuffer
+\luatokentable\everypar
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stoptitle
+
+\starttitle[title=Example 4: macro definitions]
+
+\startbuffer
+\protected\def\whatever#1[#2](#3)\relax{oeps #1 and #2 & #3 done ## error}
+
+\luatokentable\whatever
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \startcolumns \getbuffer \stopcolumns}
+
+\stoptitle
+
+\starttitle[title=Example 5: commands]
+
+\startbuffer
+\luatokentable\startitemize
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer}
+
+\stoptitle
+
+\starttitle[title=Example 6: commands]
+
+\startbuffer
+\luatokentable\doifelse
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stoptitle
+
+\starttitle[title=Example 7: nothing]
+
+\startbuffer
+\luatokentable\relax
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stoptitle
+
+\starttitle[title=Example 8: Hashes]
+
+\startbuffer
+\edef\foo#1#2{(#1)(\letterhash)(#2)} \luatokentable\foo
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stoptitle
+
+\starttitle[title=Example 9: Nesting]
+
+\startbuffer
+\def\foo#1{\def\foo##1{(#1)(##1)}} \luatokentable\foo
+\stopbuffer
+
+\typebuffer \blank[line] {\switchtobodyfont[8pt] \getbuffer }
+
+\stoptitle
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man b/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man
index b024daf6686..3bb84f99026 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man
@@ -1,4 +1,4 @@
-.TH "ctxtools" "1" "01-01-2020" "version 1.3.5" "CtxTools"
+.TH "ctxtools" "1" "01-01-2021" "version 1.3.5" "CtxTools"
.SH NAME
ctxtools - CtxTools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man b/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man
index 9166bf1146c..8a78ea5aaca 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man
@@ -1,4 +1,4 @@
-.TH "imgtopdf" "1" "01-01-2020" "version 1.1.2" "ImgToPdf"
+.TH "imgtopdf" "1" "01-01-2021" "version 1.1.2" "ImgToPdf"
.SH NAME
imgtopdf - ImgToPdf
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man b/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man
index 2258f7fd6f9..477403320de 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man
@@ -1,4 +1,4 @@
-.TH "pdftools" "1" "01-01-2020" "version 1.2.1" "PDFTools"
+.TH "pdftools" "1" "01-01-2021" "version 1.2.1" "PDFTools"
.SH NAME
pdftools - PDFTools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man b/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man
index 2439d48a5b8..4e83555e5b8 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man
@@ -1,4 +1,4 @@
-.TH "pstopdf" "1" "01-01-2020" "version 2.0.1" "PStoPDF"
+.TH "pstopdf" "1" "01-01-2021" "version 2.0.1" "PStoPDF"
.SH NAME
pstopdf - PStoPDF
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man b/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man
index 4c5a5c172a6..ccbfe325c37 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man
@@ -1,4 +1,4 @@
-.TH "rlxtools" "1" "01-01-2020" "version 1.0.1" "RlxTools"
+.TH "rlxtools" "1" "01-01-2021" "version 1.0.1" "RlxTools"
.SH NAME
rlxtools - RlxTools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/texexec.man b/Master/texmf-dist/doc/context/scripts/mkii/texexec.man
index e783e8d6e47..e2935cc1778 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/texexec.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/texexec.man
@@ -1,4 +1,4 @@
-.TH "texexec" "1" "01-01-2020" "version 6.2.1" "TeXExec"
+.TH "texexec" "1" "01-01-2021" "version 6.2.1" "TeXExec"
.SH NAME
texexec - TeXExec
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man b/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man
index 8118c9c7f7d..6ed2acf8a17 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man
@@ -1,4 +1,4 @@
-.TH "mtxrun" "1" "01-01-2020" "version 1.33" "ConTeXt TDS Runner Tool"
+.TH "mtxrun" "1" "01-01-2021" "version 1.33" "ConTeXt TDS Runner Tool"
.SH NAME
mtxrun - ConTeXt TDS Runner Tool
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/textools.man b/Master/texmf-dist/doc/context/scripts/mkii/textools.man
index 4d5df1fa93c..832dfb21ff9 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/textools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/textools.man
@@ -1,4 +1,4 @@
-.TH "textools" "1" "01-01-2020" "version 1.3.1" "TeXTools"
+.TH "textools" "1" "01-01-2021" "version 1.3.1" "TeXTools"
.SH NAME
textools - TeXTools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/texutil.man b/Master/texmf-dist/doc/context/scripts/mkii/texutil.man
index d30913ad51c..d2f2adb41ab 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/texutil.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/texutil.man
@@ -1,4 +1,4 @@
-.TH "texutil" "1" "01-01-2020" "version 9.1.0" "TeXUtil"
+.TH "texutil" "1" "01-01-2021" "version 9.1.0" "TeXUtil"
.SH NAME
texutil - TeXUtil
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man b/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man
index 731d6ed34ef..d51933e7353 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man
@@ -1,4 +1,4 @@
-.TH "tmftools" "1" "01-01-2020" "version 1.1.0" "TMFTools"
+.TH "tmftools" "1" "01-01-2021" "version 1.1.0" "TMFTools"
.SH NAME
tmftools - TMFTools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man b/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man
index efea6a69bb8..fd6143769a3 100644
--- a/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man
@@ -1,4 +1,4 @@
-.TH "xmltools" "1" "01-01-2020" "version 1.2.2" "XMLTools"
+.TH "xmltools" "1" "01-01-2021" "version 1.2.2" "XMLTools"
.SH NAME
xmltools - XMLTools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/context.html b/Master/texmf-dist/doc/context/scripts/mkiv/context.html
index 3262b91d1aa..682b8621fa6 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/context.html
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/context.html
@@ -14,7 +14,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <title>ConTeXt Process Management 1.03</title>
+ <title>ConTeXt Process Management 1.04</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
body { color: #FFFFFF; background-color: #808080; font-family: optima, verdana, futura, "lucida sans", arial, geneva, helvetica, sans; font-size: 12px; line-height: 18px; } a:link, a:active, a:visited { color: #FFFFFF; } a.dir-view:link, a.dir-view:active, a.dir-view:visited { color: #FFFFFF; text-decoration: underline; } .valid { color: #00FF00; } .invalid { color: #FF0000; } .invisible { visibility: hidden; } button, .commonlink, .smallbutton { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; border-color: #7F7F7F; border-style: solid; border-width: .125ex; background-color: #FFFFFF; padding: .5ex; } .smallbutton { width: 1em; } a.commonlink:link, a.commonlink:active, a.commonlink:visited, a.smalllink:link, a.smalllink:active, a.smalllink:visited { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; } h1, .title { font-style: normal; font-weight: normal; font-size: 18px; line-height: 18px; margin-bottom: 20px; } h2, .subtitle { font-style: normal; font-weight: normal; font-size: 12px; margin-top: 18px; margin-bottom: 18px; } table { line-height: 18px; font-size: 12px; margin: 0; } th { font-weight: bold; text-align: left; padding-bottom: 6px; } .tc { font-weight: bold; text-align: left; } p, li { max-width: 60em; } .empty-line { margin-top: 4px; } .more-room { margin-right: 1.5em; } .much-more-room { margin-right: 3em; } #main { position: absolute; left: 10%; top: 10%; right: 10%; bottom: 10%; z-index: 2; width: 80%; height: 80%; padding: 0%; margin: 0%; overflow: auto; border-style: none; border-width: 0; background-color: #3F3F3F; } #main-settings { margin: 12px; x_max-width: 60em; line-height: 18px; font-size: 12px; } #left { position: absolute; top : 10%; left: 0%; bottom: 0%; right: 90%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; } #right { position: absolute; top : 0%; left: 90%; bottom: 10%; right: 0%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; _margin-left: -15px; } #bottom { position: absolute; left: 10%; right: 0%; top: 90%; bottom: 0%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top { position: absolute; left: 0%; right: 10%; top: 0%; bottom: 90%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #top-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: right; vertical-align: middle; } #bottom-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #bottom-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: left; vertical-align: middle; } #left-one { position: absolute; width: 100%; buggedheight: 100%; } #left-two { position: relative; margin-top: 12px; line-height: 18px; text-align: center; vertical-align: top; } #right-one { display: table; height: 100%; width: 100%; } #right-two { display: table-row; height: 100%; width: 100%; } #right-three { display: table-cell; width: 100%; vertical-align: bottom; _position: absolute; _top: 100%; } #right-four { text-align: center; margin-bottom: 2ex; _position: relative; _top: -100%; } #more-top { position: absolute; top: 0%; left: 90%; bottom: 90%; right: 0%; z-index: 3; width: 10%; height: 10%; padding: 0%; margin: 0%; border-style: none; border-width: 0; } #more-top-settings { text-align: center; } #more-right-settings { margin-right: 12px; margin-left: 12px; line-height: 18px; font-size: 10px; text-align: center; } #right-safari { _display: table; width: 100%; height: 100%; }
@@ -24,7 +24,7 @@
</head>
<body>
<div id="top"> <div id="top-one">
- <div id="top-two">ConTeXt Process Management 1.03 </div>
+ <div id="top-two">ConTeXt Process Management 1.04 </div>
</div>
</div>
<div id="bottom"> <div id="bottom-one">
@@ -65,6 +65,7 @@
<tr><th>--errors</th><td>list</td><td>show errors at the end of a run, quit when in list (also when --silent)</td></tr>
<tr><th>--htmlerrorpage</th><td></td><td>generate html error page instead (optional: =scite)</td></tr>
<tr><th>--noconsole</th><td></td><td>disable logging to the console (logfile only)</td></tr>
+ <tr><th>--nodummy</th><td></td><td>don't create a dummy file (can confuse pdf viewers that keep file in view)</td></tr>
<tr><th>--purgeresult</th><td></td><td>purge result file before run</td></tr>
<tr><th/><td/><td/></tr>
<tr><th>--forcexml</th><td></td><td>force xml stub</td></tr>
@@ -75,6 +76,8 @@
<tr><th>--arrange</th><td></td><td>run extra imposition pass, given that the style sets up imposition</td></tr>
<tr><th>--noarrange</th><td></td><td>ignore imposition specifications in the style</td></tr>
<tr><th/><td/><td/></tr>
+ <tr><th>--pages</th><td></td><td>report pagenumbers of names pages and list references (--page=... or --page=...)</td></tr>
+ <tr><th/><td/><td/></tr>
<tr><th>--jit</th><td></td><td>use luajittex with jit turned off (only use the faster virtual machine)</td></tr>
<tr><th>--jiton</th><td></td><td>use luajittex with jit turned on (in most cases not faster, even slower)</td></tr>
<tr><th/><td/><td/></tr>
@@ -107,6 +110,7 @@
<tr><th>--keeptuc</th><td></td><td>keep previous tuc files (jobname-tuc-[run].tmp)</td></tr>
<tr><th>--keeplog</th><td></td><td>keep previous log files (jobname-log-[run].tmp)</td></tr>
<tr><th>--lmtx</th><td></td><td>force lmtx mode (when available)</td></tr>
+ <tr><th>--overloadmode=error|warning|0--6|255</th><td></td><td>enable csname overload checking</td></tr>
<tr><th/><td/><td/></tr>
<tr><th>--extra=name</th><td></td><td>process extra (mtx-context-... in distribution)</td></tr>
<tr><th>--extras</th><td></td><td>show extras</td></tr>
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/context.man b/Master/texmf-dist/doc/context/scripts/mkiv/context.man
index 9b23bd88b6d..7d9e949bb16 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/context.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/context.man
@@ -1,4 +1,4 @@
-.TH "mtx-context" "1" "01-01-2020" "version 1.03" "ConTeXt Process Management"
+.TH "mtx-context" "1" "01-01-2021" "version 1.04" "ConTeXt Process Management"
.SH NAME
mtx-context - ConTeXt Process Management
.SH SYNOPSIS
@@ -77,6 +77,9 @@ generate html error page instead (optional: =scite)
.B --noconsole
disable logging to the console (logfile only)
.TP
+.B --nodummy
+don't create a dummy file (can confuse pdf viewers that keep file in view)
+.TP
.B --purgeresult
purge result file before run
.TP
@@ -98,6 +101,9 @@ run extra imposition pass, given that the style sets up imposition
.B --noarrange
ignore imposition specifications in the style
.TP
+.B --pages
+report pagenumbers of names pages and list references (--page=... or --page=...)
+.TP
.B --jit
use luajittex with jit turned off (only use the faster virtual machine)
.TP
@@ -171,6 +177,9 @@ keep previous log files (jobname-log-[run].tmp)
.B --lmtx
force lmtx mode (when available)
.TP
+.B --overloadmode=error|warning|0--6|255
+enable csname overload checking
+.TP
.B --extra=name
process extra (mtx-context-... in distribution)
.TP
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/context.xml b/Master/texmf-dist/doc/context/scripts/mkiv/context.xml
index 0c7038d2680..98a75244b12 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/context.xml
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/context.xml
@@ -4,7 +4,7 @@
<metadata>
<entry name="name">mtx-context</entry>
<entry name="detail">ConTeXt Process Management</entry>
- <entry name="version">1.03</entry>
+ <entry name="version">1.04</entry>
<entry name="comment">external helpinfo file</entry>
</metadata>
<flags>
@@ -82,6 +82,9 @@
<flag name="noconsole">
<short>disable logging to the console (logfile only)</short>
</flag>
+ <flag name="nodummy">
+ <short>don't create a dummy file (can confuse pdf viewers that keep file in view)</short>
+ </flag>
<flag name="purgeresult">
<short>purge result file before run</short>
</flag>
@@ -109,6 +112,11 @@
</flag>
</subcategory>
<subcategory>
+ <flag name="pages">
+ <short>report pagenumbers of names pages and list references (<ref name="page"/>=... or <ref name="page"/>=...)</short>
+ </flag>
+ </subcategory>
+ <subcategory>
<flag name="jit">
<short>use luajittex with jit turned off (only use the faster virtual machine)</short>
</flag>
@@ -200,6 +208,9 @@
<flag name="lmtx">
<short>force lmtx mode (when available)</short>
</flag>
+ <flag name="overloadmode=error|warning|0--6|255">
+ <short>enable csname overload checking</short>
+ </flag>
</subcategory>
<subcategory>
<flag name="extra=name">
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man b/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man
index 0d0392f396e..94bbd9fcab9 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man
@@ -1,4 +1,4 @@
-.TH "luatools" "1" "01-01-2020" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
+.TH "luatools" "1" "01-01-2021" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
.SH NAME
luatools - ConTeXt TDS Management Tool (aka luatools)
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man
index 5ac999c664b..621a1a4ab19 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man
@@ -1,4 +1,4 @@
-.TH "mtx-babel" "1" "01-01-2020" "version 1.20" "Babel Input To UTF Conversion"
+.TH "mtx-babel" "1" "01-01-2021" "version 1.20" "Babel Input To UTF Conversion"
.SH NAME
mtx-babel - Babel Input To UTF Conversion
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man
index 76f60696f48..3bfc0878434 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man
@@ -1,4 +1,4 @@
-.TH "mtx-base" "1" "01-01-2020" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
+.TH "mtx-base" "1" "01-01-2021" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
.SH NAME
mtx-base - ConTeXt TDS Management Tool (aka luatools)
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man
index 60bfd7e1d40..c44df3bbf3e 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man
@@ -1,4 +1,4 @@
-.TH "mtx-bibtex" "1" "01-01-2020" "version 1.00" "bibtex helpers"
+.TH "mtx-bibtex" "1" "01-01-2021" "version 1.00" "bibtex helpers"
.SH NAME
mtx-bibtex - bibtex helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man
index e266d8da205..60d9450c194 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man
@@ -1,4 +1,4 @@
-.TH "mtx-cache" "1" "01-01-2020" "version 1.01" "ConTeXt & MetaTeX Cache Management"
+.TH "mtx-cache" "1" "01-01-2021" "version 1.01" "ConTeXt & MetaTeX Cache Management"
.SH NAME
mtx-cache - ConTeXt & MetaTeX Cache Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man
index ad52b5b8909..407b3258d0b 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man
@@ -1,4 +1,4 @@
-.TH "mtx-chars" "1" "01-01-2020" "version 0.10" "MkII Character Table Generators"
+.TH "mtx-chars" "1" "01-01-2021" "version 0.10" "MkII Character Table Generators"
.SH NAME
mtx-chars - MkII Character Table Generators
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man
index 0525aeb69e8..46f1e06f609 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man
@@ -1,4 +1,4 @@
-.TH "mtx-check" "1" "01-01-2020" "version 0.10" "Basic ConTeXt Syntax Checking"
+.TH "mtx-check" "1" "01-01-2021" "version 0.10" "Basic ConTeXt Syntax Checking"
.SH NAME
mtx-check - Basic ConTeXt Syntax Checking
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man
index 883d6957310..601572f9130 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man
@@ -1,4 +1,4 @@
-.TH "mtx-colors" "1" "01-01-2020" "version 0.10" "ConTeXt Color Management"
+.TH "mtx-colors" "1" "01-01-2021" "version 0.10" "ConTeXt Color Management"
.SH NAME
mtx-colors - ConTeXt Color Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html
index 3262b91d1aa..682b8621fa6 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html
@@ -14,7 +14,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <title>ConTeXt Process Management 1.03</title>
+ <title>ConTeXt Process Management 1.04</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
body { color: #FFFFFF; background-color: #808080; font-family: optima, verdana, futura, "lucida sans", arial, geneva, helvetica, sans; font-size: 12px; line-height: 18px; } a:link, a:active, a:visited { color: #FFFFFF; } a.dir-view:link, a.dir-view:active, a.dir-view:visited { color: #FFFFFF; text-decoration: underline; } .valid { color: #00FF00; } .invalid { color: #FF0000; } .invisible { visibility: hidden; } button, .commonlink, .smallbutton { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; border-color: #7F7F7F; border-style: solid; border-width: .125ex; background-color: #FFFFFF; padding: .5ex; } .smallbutton { width: 1em; } a.commonlink:link, a.commonlink:active, a.commonlink:visited, a.smalllink:link, a.smalllink:active, a.smalllink:visited { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; } h1, .title { font-style: normal; font-weight: normal; font-size: 18px; line-height: 18px; margin-bottom: 20px; } h2, .subtitle { font-style: normal; font-weight: normal; font-size: 12px; margin-top: 18px; margin-bottom: 18px; } table { line-height: 18px; font-size: 12px; margin: 0; } th { font-weight: bold; text-align: left; padding-bottom: 6px; } .tc { font-weight: bold; text-align: left; } p, li { max-width: 60em; } .empty-line { margin-top: 4px; } .more-room { margin-right: 1.5em; } .much-more-room { margin-right: 3em; } #main { position: absolute; left: 10%; top: 10%; right: 10%; bottom: 10%; z-index: 2; width: 80%; height: 80%; padding: 0%; margin: 0%; overflow: auto; border-style: none; border-width: 0; background-color: #3F3F3F; } #main-settings { margin: 12px; x_max-width: 60em; line-height: 18px; font-size: 12px; } #left { position: absolute; top : 10%; left: 0%; bottom: 0%; right: 90%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; } #right { position: absolute; top : 0%; left: 90%; bottom: 10%; right: 0%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; _margin-left: -15px; } #bottom { position: absolute; left: 10%; right: 0%; top: 90%; bottom: 0%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top { position: absolute; left: 0%; right: 10%; top: 0%; bottom: 90%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #top-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: right; vertical-align: middle; } #bottom-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #bottom-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: left; vertical-align: middle; } #left-one { position: absolute; width: 100%; buggedheight: 100%; } #left-two { position: relative; margin-top: 12px; line-height: 18px; text-align: center; vertical-align: top; } #right-one { display: table; height: 100%; width: 100%; } #right-two { display: table-row; height: 100%; width: 100%; } #right-three { display: table-cell; width: 100%; vertical-align: bottom; _position: absolute; _top: 100%; } #right-four { text-align: center; margin-bottom: 2ex; _position: relative; _top: -100%; } #more-top { position: absolute; top: 0%; left: 90%; bottom: 90%; right: 0%; z-index: 3; width: 10%; height: 10%; padding: 0%; margin: 0%; border-style: none; border-width: 0; } #more-top-settings { text-align: center; } #more-right-settings { margin-right: 12px; margin-left: 12px; line-height: 18px; font-size: 10px; text-align: center; } #right-safari { _display: table; width: 100%; height: 100%; }
@@ -24,7 +24,7 @@
</head>
<body>
<div id="top"> <div id="top-one">
- <div id="top-two">ConTeXt Process Management 1.03 </div>
+ <div id="top-two">ConTeXt Process Management 1.04 </div>
</div>
</div>
<div id="bottom"> <div id="bottom-one">
@@ -65,6 +65,7 @@
<tr><th>--errors</th><td>list</td><td>show errors at the end of a run, quit when in list (also when --silent)</td></tr>
<tr><th>--htmlerrorpage</th><td></td><td>generate html error page instead (optional: =scite)</td></tr>
<tr><th>--noconsole</th><td></td><td>disable logging to the console (logfile only)</td></tr>
+ <tr><th>--nodummy</th><td></td><td>don't create a dummy file (can confuse pdf viewers that keep file in view)</td></tr>
<tr><th>--purgeresult</th><td></td><td>purge result file before run</td></tr>
<tr><th/><td/><td/></tr>
<tr><th>--forcexml</th><td></td><td>force xml stub</td></tr>
@@ -75,6 +76,8 @@
<tr><th>--arrange</th><td></td><td>run extra imposition pass, given that the style sets up imposition</td></tr>
<tr><th>--noarrange</th><td></td><td>ignore imposition specifications in the style</td></tr>
<tr><th/><td/><td/></tr>
+ <tr><th>--pages</th><td></td><td>report pagenumbers of names pages and list references (--page=... or --page=...)</td></tr>
+ <tr><th/><td/><td/></tr>
<tr><th>--jit</th><td></td><td>use luajittex with jit turned off (only use the faster virtual machine)</td></tr>
<tr><th>--jiton</th><td></td><td>use luajittex with jit turned on (in most cases not faster, even slower)</td></tr>
<tr><th/><td/><td/></tr>
@@ -107,6 +110,7 @@
<tr><th>--keeptuc</th><td></td><td>keep previous tuc files (jobname-tuc-[run].tmp)</td></tr>
<tr><th>--keeplog</th><td></td><td>keep previous log files (jobname-log-[run].tmp)</td></tr>
<tr><th>--lmtx</th><td></td><td>force lmtx mode (when available)</td></tr>
+ <tr><th>--overloadmode=error|warning|0--6|255</th><td></td><td>enable csname overload checking</td></tr>
<tr><th/><td/><td/></tr>
<tr><th>--extra=name</th><td></td><td>process extra (mtx-context-... in distribution)</td></tr>
<tr><th>--extras</th><td></td><td>show extras</td></tr>
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man
index 9b23bd88b6d..7d9e949bb16 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man
@@ -1,4 +1,4 @@
-.TH "mtx-context" "1" "01-01-2020" "version 1.03" "ConTeXt Process Management"
+.TH "mtx-context" "1" "01-01-2021" "version 1.04" "ConTeXt Process Management"
.SH NAME
mtx-context - ConTeXt Process Management
.SH SYNOPSIS
@@ -77,6 +77,9 @@ generate html error page instead (optional: =scite)
.B --noconsole
disable logging to the console (logfile only)
.TP
+.B --nodummy
+don't create a dummy file (can confuse pdf viewers that keep file in view)
+.TP
.B --purgeresult
purge result file before run
.TP
@@ -98,6 +101,9 @@ run extra imposition pass, given that the style sets up imposition
.B --noarrange
ignore imposition specifications in the style
.TP
+.B --pages
+report pagenumbers of names pages and list references (--page=... or --page=...)
+.TP
.B --jit
use luajittex with jit turned off (only use the faster virtual machine)
.TP
@@ -171,6 +177,9 @@ keep previous log files (jobname-log-[run].tmp)
.B --lmtx
force lmtx mode (when available)
.TP
+.B --overloadmode=error|warning|0--6|255
+enable csname overload checking
+.TP
.B --extra=name
process extra (mtx-context-... in distribution)
.TP
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml
index 0c7038d2680..98a75244b12 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml
@@ -4,7 +4,7 @@
<metadata>
<entry name="name">mtx-context</entry>
<entry name="detail">ConTeXt Process Management</entry>
- <entry name="version">1.03</entry>
+ <entry name="version">1.04</entry>
<entry name="comment">external helpinfo file</entry>
</metadata>
<flags>
@@ -82,6 +82,9 @@
<flag name="noconsole">
<short>disable logging to the console (logfile only)</short>
</flag>
+ <flag name="nodummy">
+ <short>don't create a dummy file (can confuse pdf viewers that keep file in view)</short>
+ </flag>
<flag name="purgeresult">
<short>purge result file before run</short>
</flag>
@@ -109,6 +112,11 @@
</flag>
</subcategory>
<subcategory>
+ <flag name="pages">
+ <short>report pagenumbers of names pages and list references (<ref name="page"/>=... or <ref name="page"/>=...)</short>
+ </flag>
+ </subcategory>
+ <subcategory>
<flag name="jit">
<short>use luajittex with jit turned off (only use the faster virtual machine)</short>
</flag>
@@ -200,6 +208,9 @@
<flag name="lmtx">
<short>force lmtx mode (when available)</short>
</flag>
+ <flag name="overloadmode=error|warning|0--6|255">
+ <short>enable csname overload checking</short>
+ </flag>
</subcategory>
<subcategory>
<flag name="extra=name">
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man
index fe42cb23bd3..f5a46acd855 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man
@@ -1,4 +1,4 @@
-.TH "mtx-dvi" "1" "01-01-2020" "version 0.01" "ConTeXt DVI Helpers"
+.TH "mtx-dvi" "1" "01-01-2021" "version 0.01" "ConTeXt DVI Helpers"
.SH NAME
mtx-dvi - ConTeXt DVI Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man
index 0c0e26b4987..8c96f2a908b 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man
@@ -1,4 +1,4 @@
-.TH "mtx-epub" "1" "01-01-2020" "version 1.10" "ConTeXt EPUB Helpers"
+.TH "mtx-epub" "1" "01-01-2021" "version 1.10" "ConTeXt EPUB Helpers"
.SH NAME
mtx-epub - ConTeXt EPUB Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man
index 90de5613cdd..c68a3072a1f 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man
@@ -1,4 +1,4 @@
-.TH "mtx-evohome" "1" "01-01-2020" "version 1.00" "Evohome Fetcher"
+.TH "mtx-evohome" "1" "01-01-2021" "version 1.00" "Evohome Fetcher"
.SH NAME
mtx-evohome - Evohome Fetcher
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man
index 6bff46e0d77..1f0e99a2685 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man
@@ -1,4 +1,4 @@
-.TH "mtx-fcd" "1" "01-01-2020" "version 1.00" "Fast Directory Change"
+.TH "mtx-fcd" "1" "01-01-2021" "version 1.00" "Fast Directory Change"
.SH NAME
mtx-fcd - Fast Directory Change
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man
index b58582f043f..531a76fdb16 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man
@@ -1,4 +1,4 @@
-.TH "mtx-flac" "1" "01-01-2020" "version 0.10" "ConTeXt Flac Helpers"
+.TH "mtx-flac" "1" "01-01-2021" "version 0.10" "ConTeXt Flac Helpers"
.SH NAME
mtx-flac - ConTeXt Flac Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man
index b137418b909..44bdffa6451 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man
@@ -1,4 +1,4 @@
-.TH "mtx-fonts" "1" "01-01-2020" "version 1.00" "ConTeXt Font Database Management"
+.TH "mtx-fonts" "1" "01-01-2021" "version 1.00" "ConTeXt Font Database Management"
.SH NAME
mtx-fonts - ConTeXt Font Database Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man
index 4c9aa39e532..088ae186fe7 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man
@@ -1,4 +1,4 @@
-.TH "mtx-grep" "1" "01-01-2020" "version 0.10" "Simple Grepper"
+.TH "mtx-grep" "1" "01-01-2021" "version 0.10" "Simple Grepper"
.SH NAME
mtx-grep - Simple Grepper
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html
index 4098ccaa2a3..a23a19b7d1b 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html
@@ -51,6 +51,7 @@
<tr><th>--raw</th><td></td><td>report commands to the console</td></tr>
<tr><th>--check</th><td></td><td>generate check file</td></tr>
<tr><th>--meaning</th><td></td><td>report the mening of commands</td></tr>
+ <tr><th>--tokens</th><td></td><td>show the internal representation of commands</td></tr>
<tr><th/><td/><td/></tr>
<tr><th>--toutf</th><td></td><td>replace named characters by utf</td></tr>
<tr><th>--preprocess</th><td></td><td>preprocess mkvi files to tex files [force,suffix]</td></tr>
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man
index d3531d45674..dfe416e78d7 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man
@@ -1,4 +1,4 @@
-.TH "mtx-interface" "1" "01-01-2020" "version 0.13" "ConTeXt Interface Related Goodies"
+.TH "mtx-interface" "1" "01-01-2021" "version 0.13" "ConTeXt Interface Related Goodies"
.SH NAME
mtx-interface - ConTeXt Interface Related Goodies
.SH SYNOPSIS
@@ -41,6 +41,9 @@ generate check file
.B --meaning
report the mening of commands
.TP
+.B --tokens
+show the internal representation of commands
+.TP
.B --toutf
replace named characters by utf
.TP
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml
index 5faff850789..6ffd3af736d 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml
@@ -22,6 +22,7 @@
<flag name="raw"><short>report commands to the console</short></flag>
<flag name="check"><short>generate check file</short></flag>
<flag name="meaning"><short>report the mening of commands</short></flag>
+ <flag name="tokens"><short>show the internal representation of commands</short></flag>
</subcategory>
<subcategory>
<flag name="toutf"><short>replace named characters by utf</short></flag>
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man
index 5b110d06cc5..997f3873334 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man
@@ -1,4 +1,4 @@
-.TH "mtx-metapost" "1" "01-01-2020" "version 0.10" "MetaPost to PDF processor"
+.TH "mtx-metapost" "1" "01-01-2021" "version 0.10" "MetaPost to PDF processor"
.SH NAME
mtx-metapost - MetaPost to PDF processor
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man
index 5eaff034ebf..6f2bfebcd7f 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man
@@ -1,4 +1,4 @@
-.TH "mtx-modules" "1" "01-01-2020" "version 1.00" "ConTeXt Module Documentation Generators"
+.TH "mtx-modules" "1" "01-01-2021" "version 1.00" "ConTeXt Module Documentation Generators"
.SH NAME
mtx-modules - ConTeXt Module Documentation Generators
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man
index 02671fa9563..92c1782635d 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man
@@ -1,4 +1,4 @@
-.TH "mtx-package" "1" "01-01-2020" "version 0.10" "Distribution Related Goodies"
+.TH "mtx-package" "1" "01-01-2021" "version 0.10" "Distribution Related Goodies"
.SH NAME
mtx-package - Distribution Related Goodies
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man
index 320a89e2250..d87f5887fdb 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man
@@ -1,4 +1,4 @@
-.TH "mtx-patterns" "1" "01-01-2020" "version 0.20" "ConTeXt Pattern File Management"
+.TH "mtx-patterns" "1" "01-01-2021" "version 0.20" "ConTeXt Pattern File Management"
.SH NAME
mtx-patterns - ConTeXt Pattern File Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man
index df5501b9534..1535c8af80f 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man
@@ -1,4 +1,4 @@
-.TH "mtx-pdf" "1" "01-01-2020" "version 0.10" "ConTeXt PDF Helpers"
+.TH "mtx-pdf" "1" "01-01-2021" "version 0.10" "ConTeXt PDF Helpers"
.SH NAME
mtx-pdf - ConTeXt PDF Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man
index 431db53a107..9874cf6c63d 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man
@@ -1,4 +1,4 @@
-.TH "mtx-plain" "1" "01-01-2020" "version 1.00" "Plain TeX Runner"
+.TH "mtx-plain" "1" "01-01-2021" "version 1.00" "Plain TeX Runner"
.SH NAME
mtx-plain - Plain TeX Runner
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man
index f520a9e139a..a04a23d6ec0 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man
@@ -1,4 +1,4 @@
-.TH "mtx-profile" "1" "01-01-2020" "version 1.00" "ConTeXt MkIV LuaTeX Profiler"
+.TH "mtx-profile" "1" "01-01-2021" "version 1.00" "ConTeXt MkIV LuaTeX Profiler"
.SH NAME
mtx-profile - ConTeXt MkIV LuaTeX Profiler
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man
index 60b87707303..510775ba6ce 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man
@@ -1,4 +1,4 @@
-.TH "mtx-rsync" "1" "01-01-2020" "version 0.10" "Rsync Helpers"
+.TH "mtx-rsync" "1" "01-01-2021" "version 0.10" "Rsync Helpers"
.SH NAME
mtx-rsync - Rsync Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man
index 2e83387f9df..fbe640f6e10 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man
@@ -1,4 +1,4 @@
-.TH "mtx-scite" "1" "01-01-2020" "version 1.00" "Scite Helper Script"
+.TH "mtx-scite" "1" "01-01-2021" "version 1.00" "Scite Helper Script"
.SH NAME
mtx-scite - Scite Helper Script
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man
index ee565d4164e..ea9e8fee950 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man
@@ -1,4 +1,4 @@
-.TH "mtx-server" "1" "01-01-2020" "version 0.10" "Simple Webserver For Helpers"
+.TH "mtx-server" "1" "01-01-2021" "version 0.10" "Simple Webserver For Helpers"
.SH NAME
mtx-server - Simple Webserver For Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man
index 67e84a4d7ba..64fbece5ab9 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man
@@ -1,4 +1,4 @@
-.TH "mtx-texworks" "1" "01-01-2020" "version 1.00" "TeXworks Startup Script"
+.TH "mtx-texworks" "1" "01-01-2021" "version 1.00" "TeXworks Startup Script"
.SH NAME
mtx-texworks - TeXworks Startup Script
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man
index 582898c1ac0..852fd8ce8e8 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man
@@ -1,4 +1,4 @@
-.TH "mtx-timing" "1" "01-01-2020" "version 0.10" "ConTeXt Timing Tools"
+.TH "mtx-timing" "1" "01-01-2021" "version 0.10" "ConTeXt Timing Tools"
.SH NAME
mtx-timing - ConTeXt Timing Tools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man
index 6626110b711..e2a74d420e2 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man
@@ -1,4 +1,4 @@
-.TH "mtx-tools" "1" "01-01-2020" "version 1.01" "Some File Related Goodies"
+.TH "mtx-tools" "1" "01-01-2021" "version 1.01" "Some File Related Goodies"
.SH NAME
mtx-tools - Some File Related Goodies
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man
index 072ff371fa5..605d634898f 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man
@@ -1,4 +1,4 @@
-.TH "mtx-unicode" "1" "01-01-2020" "version 1.02" "Checker for char-dat.lua"
+.TH "mtx-unicode" "1" "01-01-2021" "version 1.02" "Checker for char-dat.lua"
.SH NAME
mtx-unicode - Checker for char-dat.lua
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man
index d67698c599c..98b17733485 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man
@@ -1,4 +1,4 @@
-.TH "mtx-unzip" "1" "01-01-2020" "version 0.10" "Simple Unzipper"
+.TH "mtx-unzip" "1" "01-01-2021" "version 0.10" "Simple Unzipper"
.SH NAME
mtx-unzip - Simple Unzipper
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man
index 35500fb6daa..ccff02f91f4 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man
@@ -1,4 +1,4 @@
-.TH "mtx-update" "1" "01-01-2020" "version 1.03" "ConTeXt Minimals Updater"
+.TH "mtx-update" "1" "01-01-2021" "version 1.03" "ConTeXt Minimals Updater"
.SH NAME
mtx-update - ConTeXt Minimals Updater
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man
index f1c886fa0f4..7ac13328f9f 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man
@@ -1,4 +1,4 @@
-.TH "mtx-vscode" "1" "01-01-2020" "version 1.00" "vscode extension generator"
+.TH "mtx-vscode" "1" "01-01-2021" "version 1.00" "vscode extension generator"
.SH NAME
mtx-vscode - vscode extension generator
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man
index 185dc64bc71..bfa525b4b86 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man
@@ -1,4 +1,4 @@
-.TH "mtx-watch" "1" "01-01-2020" "version 1.00" "ConTeXt Request Watchdog"
+.TH "mtx-watch" "1" "01-01-2021" "version 1.00" "ConTeXt Request Watchdog"
.SH NAME
mtx-watch - ConTeXt Request Watchdog
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man
index 6d4e8b1df82..e88c2d0e18c 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man
@@ -1,4 +1,4 @@
-.TH "mtx-youless" "1" "01-01-2020" "version 1.100" "youless Fetcher"
+.TH "mtx-youless" "1" "01-01-2021" "version 1.100" "youless Fetcher"
.SH NAME
mtx-youless - youless Fetcher
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man b/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man
index 8118c9c7f7d..6ed2acf8a17 100644
--- a/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man
+++ b/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man
@@ -1,4 +1,4 @@
-.TH "mtxrun" "1" "01-01-2020" "version 1.33" "ConTeXt TDS Runner Tool"
+.TH "mtxrun" "1" "01-01-2021" "version 1.33" "ConTeXt TDS Runner Tool"
.SH NAME
mtxrun - ConTeXt TDS Runner Tool
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/context/sources/general/leaflets/leaflet-mixing.tex b/Master/texmf-dist/doc/context/sources/general/leaflets/leaflet-mixing.tex
index 9f14525b380..8b86988cae2 100644
--- a/Master/texmf-dist/doc/context/sources/general/leaflets/leaflet-mixing.tex
+++ b/Master/texmf-dist/doc/context/sources/general/leaflets/leaflet-mixing.tex
@@ -2,7 +2,7 @@
%D is reserved for our own purpose. Be creative instead.
\setupbodyfont
- [plex,7pt]
+ [plex,4pt]
\setuppapersize
[A3,landscape]
diff --git a/Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex
new file mode 100644
index 00000000000..b068f517b38
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex
@@ -0,0 +1,194 @@
+% author : Hans Hagen
+% copyright : PRAGMA ADE & ConTeXt Development Team
+% license : Creative Commons Attribution ShareAlike 4.0 International
+% reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
+% origin : the ConTeXt distribution
+%
+% comment : Because this manual is distributed with TeX distributions it comes with a rather
+% liberal license. We try to adapt these documents to upgrades in the (sub)systems
+% that they describe. Using parts of the content otherwise can therefore conflict
+% with existing functionality and we cannot be held responsible for that. Many of
+% the manuals contain characteristic graphics and personal notes or examples that
+% make no sense when used out-of-context.
+
+\bitwiseflip \normalizelinemode \plusthree
+
+\usemodule[magazine-basic,abr-02]
+
+\usemodule[scite]
+
+\startbuffer[abstract]
+ Here is yet another short example of a feature introduced in \CONTEXT\ \LMTX.
+ It is mostly meant as teaser: maybe users have additional demands for this
+ low level mechanisn.
+\stopbuffer
+
+\setuplayout
+ [backspace=20mm,
+ topspace=10mm]
+
+\startdocument
+ [title={Playing with boxes, a teaser},
+ author={Hans Hagen},
+ %affiliation=PRAGMA ADE,
+ date=August 2020,
+ number=1105 LMTX]
+
+When a paragraph is typeset in a vertical box, we get a bunch of lines pasted
+together. If you want to change something in the result, you can disassemble that
+box in detailed ways (in \LUA) but maybe it's something simple that you like to
+do. For that we have a an interface to the lines on such a box. We start with a
+few settings:
+
+\starttyping[option=TEX]
+\bitwiseflip \normalizelinemode \plusthree % indent and normalize
+\stoptyping
+
+These two settings will become default in \CONTEXT\ \LMTX, but here we need them in
+order to show some properties of boxes.
+
+\startbuffer[sample]
+\setbox0\ruledvbox \bgroup
+ \leftskip 10pt
+ \rightskip 20pt
+ \hangindent 40pt
+ \hangafter 2
+ \parindent 5pt
+ \parfillleftskip 80pt plus 1 fill
+ \parfillrightskip 40pt plus 1 fill
+ \input tufte
+\egroup
+\stopbuffer
+
+\typebuffer[sample][option=TEX]
+
+This box has a bit weird setup but we want to demonstrate something to it's okay:
+
+\startlinecorrection
+ \getbuffer[sample] \box0
+\stoplinecorrection
+
+
+In case you wonder, the left and right parskips are a \MKIV\ thing and supported
+in \LMTX\ in a more advanced way. The left one can be used to push the last line
+to the right.
+
+\startbuffer[overview]
+\dorecurse {\boxlines 0} {
+ [#1] (%
+ \the\boxlinewd 0 #1, \the\boxlineht 0 #1, \the\boxlinedp 0 #1,
+ \the\boxlinels 0 #1, \the\boxliners 0 #1,
+ \the\boxlinelh 0 #1, \the\boxlinerh 0 #1,
+ \the\boxlinein 0 #1, \the\boxlinelp 0 #1, \the\boxlinerp 0 #1
+ ) \par
+}
+\stopbuffer
+
+\typebuffer[overview][option=TEX]
+
+\getbuffer[sample]
+
+\startpacked \tt \txx
+ \getbuffer[overview]
+\stoppacked
+
+The properties of a line are: width, height and depth, left and right skip,
+applied left and right hang, indentation (of the first line), left and right
+filler of the last line. You can use the commands shown as other dimensions, so
+\type {\the} is only needed when you serialize a property.
+
+Some properties can be changed (others might follow later). Here we change the
+width of line four (the equal sign is optional):
+
+\startbuffer
+\the\boxlinewd 0 4 \space& \boxlinewd 0 4 = 40pt \the\boxlinewd 0 4
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We get: \inlinebuffer . We can detach a line from the box. Here we put two lines
+in another box that gets assigned to a box register, and a third line is assigned
+to a box register as|-|is:
+
+\startbuffer
+\setbox2\ruledhbox{\copyboxline 0 2}
+\setbox4\ruledhbox{\boxline 0 4}
+\setbox6 \boxline 0 6
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+The result is:
+
+\startbuffer
+[2] [\box2] \par
+[4] [\box4] \par
+[6] [\box6] \par
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+ \startpacked
+ \getbuffer
+ \stoppacked
+\stoplinecorrection
+
+You can query the natural width, height and depth too:
+
+\startbuffer
+used width : \the\boxlinewd 0 5, natural width : \the\boxlinenw 0 5
+used heigth : \the\boxlineht 0 5, natural height : \the\boxlinenh 0 5
+used depth : \the\boxlinedp 0 5, natural depth : \the\boxlinend 0 5
+\stopbuffer
+
+\typebuffer[option=TEX] \startlines \getbuffer \stoplines
+
+Next we replace an existing line by a new line:
+
+\startbuffer
+\setboxline 0 3 \hbox {\darkred \bold This is a replacement line!}
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+The original box is now:
+
+\startlinecorrection
+\box0
+\stoplinecorrection
+
+We can repack the box with the usual \TEX\ commands: \type {\vpack {\unvbox0}}
+but here we just did a \type {\box0}.
+
+An example of a more useful application is the following. First we fill a box:
+
+\startbuffer
+\setbox\scratchbox\ruledvbox \bgroup
+ \input ward
+\egroup
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+With little effort we can add line numbers:
+
+\startbuffer
+\ruledvbox \bgroup
+ \dorecurse {\boxlines \scratchbox} {%
+ \dontleavehmode
+ \strut
+ \llap{\hbox to 1.5em{\txx#1\hss}}\boxline \scratchbox #1\par
+ }
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The result is:
+
+\startlinecorrection
+ {\forgetall \getbuffer}
+\stoplinecorrection
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/about/about-titlepage.tex b/Master/texmf-dist/doc/context/sources/general/manuals/about/about-titlepage.tex
index 392fdb1beb0..6ca09955443 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/about/about-titlepage.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/about/about-titlepage.tex
@@ -16,9 +16,9 @@
fill Page enlarged 5mm withcolor \MPcolor{maincolor} ;
- draw anchored.lrt(image(draw textext("\getvariable{document}{title}") xsized(.750PaperWidth) withcolor white),(lrcorner Page) shifted (-PaperWidth/20, PaperWidth/ 5)) ;
- draw anchored.lrt(image(draw textext("\getvariable{document}{subtitle}") xsized(.750PaperWidth) withcolor white),(lrcorner Page) shifted (-PaperWidth/20, PaperWidth/10)) ;
- draw anchored.urt(image(draw textext("\getvariable{document}{author}") xsized(.375PaperWidth) rotated 90 withcolor white),(urcorner Page) shifted (-PaperWidth/20,-PaperWidth/20)) ;
+ draw anchored.lrt(image(draw textext("\documentvariable{title}") xsized(.750PaperWidth) withcolor white),(lrcorner Page) shifted (-PaperWidth/20, PaperWidth/ 5)) ;
+ draw anchored.lrt(image(draw textext("\documentvariable{subtitle}") xsized(.750PaperWidth) withcolor white),(lrcorner Page) shifted (-PaperWidth/20, PaperWidth/10)) ;
+ draw anchored.urt(image(draw textext("\documentvariable{author}") xsized(.375PaperWidth) rotated 90 withcolor white),(urcorner Page) shifted (-PaperWidth/20,-PaperWidth/20)) ;
setbounds currentpicture to Page ;
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex
index 82fcb800707..a1a74cde459 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex
@@ -26,6 +26,67 @@ that is available at the \TEX\ end, or you can use \LUA\ code to do the work, or
you can use a combination. So, from now on, in \CONTEXT\ you can code your style
and document source in (a mixture of) \TEX, \XML, \METAPOST\ and in \LUA.
+% \CONTEXT\ being a \TEX\ macro package quite some action happens at the \TEX\ end;
+% although we do a lot in \LUA, there is no need to abandon the macro language. If
+% I wanted a typesetting system written in procedural language I'd already come up
+% with one but I have no need for it and \TEX\ is more fun anyway. But the fact
+% that we mix these conceptual different languages means that we need ways to
+% communicate between them. The possibilities to communicate and switch between
+% \TEX, \LUA, and of course \METAPOST\ have evolved over time. It started with just
+% \type {\directlua} but we now can use tokens scanners that permit nice
+% interfaces. So, as a consequence the interfaces in \CONTEXT\ also evolved,
+% although mostly deep down out of sight of users: \CONTEXT\ always tries to offer
+% abstract interfaces that as designed in a way that permits upward compatible
+% upgrades.
+
+% Going from \LUA\ to \TEX\ is mostly done with the \type {context} command. The
+% most low level approach would be to use the \type {tex.print} functions but using
+% the \type {context} interface is often better. Going from \TEX\ to \LUA\ is done
+% with \type {\ctxlua} and friends, btu again, you can decide to go low level with
+% \type {\directlua}. Indeed, there is no need to use these interfaces and quite
+% often we see users use low level calls in combination with macros that pass
+% arguments and there's nothing wrong with that. We see no reason to block or
+% overload them.
+
+% In these internet times it is no problem to find comments on code and coding
+% practices (of course not seldom by people who themselves produce code that
+% deserves a lot of comment but get away with it). The same is true for complaints
+% about bugs that not always are put in the perspective of the total amount of well
+% working code or experiments; on the average \TEX\ systems behave quite well and
+% have not that many bugs, but some low level features they can be confusing. We
+% don't impose a coding style in user files but we do so in the core, but that only
+% hampers ourselves.
+
+% Another issue is complaints about manuals or lack of documentation, again, often
+% by people who themselves never produced something that those who they complain
+% about can use, but, that said, lack of documentation has the benefit that one can
+% learn by playing around. There are plenty of examples to learn from, also in the
+% over ten thousand pages of \CONTEXT\ documentation and articles. And of course
+% there is the test suite which has examples. Some users even like to look into the
+% source code to learn some tricks. Now, the internet is not always the friendly
+% and tolerant environment that its marketing suggests and one can run into
+% patronizing comments on how to do thing, but: we don't (and cannot) enforce best
+% practices.
+
+% However, when you define \LUA\ functions you should {\em not} overload existing
+% functions without knowing what you deal with, simply because the whole \CONTEXT\
+% ecosystem could be affected. Don't expect support when you do so. The same is
+% true for \TEX\ macros and even more so for primitives. Although there is some
+% protection going on we think the system should be as open as possible, so little
+% is hidden for the user. \footnote {In the core code and modules that come with
+% \CONTEXT\ we are rather rigourous. There we have patterns that need to be
+% followed. Hacking around and patching at will is not an option there. In the
+% rather open system that a macro package provides it is no problem to quickly mess
+% up the lot with bad code.}
+
+% The reason for mentioning this is that we do see users come up with (often
+% surprising) solutions and we invite them to keep playing around, even with low
+% level code. When writing a document, playing around can be a nice distraction.
+% But, using a high level interface has some benefits too. It gives a bit of
+% protection against bad interactions with other code. It also often involves less
+% coding. Performance might be better although that is not always a real issue as
+% there are plenty of ways to make a \TEX\ system slow anyway.
+
In the following chapters I will introduce typesetting in \LUA, but as we rely on
\CONTEXT\ it is unavoidable that some regular \CONTEXT\ code shows up. The fact
that you can ignore backslashes does not mean that you can do without knowledge
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex
index b2760e05b3d..c48b852fb93 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex
@@ -2306,20 +2306,22 @@ one provided by \LUATEX\ as it is more precise:
os.gettimeofday()
\stoptyping
-There is also a more extensive variant:
-
-\starttyping
-os.times()
-\stoptyping
-
-This one is platform dependent and returns a table with \type {utime} (use time),
-\type {stime} (system time), \type {cutime} (children user time), and \type
-{cstime} (children system time).
+% % This one is gone in luametatex:
+%
+% There is also a more extensive variant:
+%
+% \starttyping
+% os.times()
+% \stoptyping
+%
+% This one is platform dependent and returns a table with \type {utime} (use time),
+% \type {stime} (system time), \type {cutime} (children user time), and \type
+% {cstime} (children system time).
\stopsummary
\ShowLuaExampleThree {os} {gettimeofday} {}
-\ShowLuaExampleTwo {os} {times} {}
+%ShowLuaExampleTwo {os} {times} {}
\startsummary[title={runtime}]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex
index a177db9f87e..7b6f578e754 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex
@@ -128,9 +128,9 @@ local function startmore(opt_1)
context.startnarrower()
end
-local function stopmore(opt_1)
+local function stopmore()
context.stopnarrower()
- context("stop more, options: %s",interfaces.tolist(opt_1))
+ context("stop more")
context.stopnarrower()
end
@@ -175,7 +175,7 @@ If needed you can access the body of a macro. Take for instance:
\typebuffer \getbuffer
-The following example demonsttaies how we can look inside these macros. You need
+The following example demonstrates how we can look inside these macros. You need
to be aware of the fact that the whole blob of \LUA\ codes is finished before we
return to \TEX, so when we pipe the meaning of \type {TestB} back to \TEX\ it
only gets expanded afterwards. We can use a function to get back to \LUA. It's
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex
index 5c35fa4e714..9267732fa3a 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex
@@ -74,6 +74,8 @@
\component cld-logging
\component cld-luafunctions
\component cld-ctxfunctions
+ \component cld-scanners
+ \component cld-variables
\component cld-callbacks
\component cld-backendcode
\component cld-goodies
@@ -84,8 +86,8 @@
\component cld-files
\stopbodymatter
-% \startbackmatter
-% \component cld-index
-% \stopbackmatter
+\startbackmatter
+ \component cld-index
+\stopbackmatter
\stopproduct
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex
new file mode 100644
index 00000000000..3bf5f658d45
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex
@@ -0,0 +1,1048 @@
+% language=uk
+
+\startcomponent cld-ctxscanners
+
+\environment cld-environment
+
+\startchapter[title={Scanners}]
+
+\startsection[title={Introduction}]
+
+\index {implementors}
+\index {scanners}
+
+Here we discuss methods to define macros that directly interface with the \LUA\
+side. It involves all kind of scanners. There are actually more than we discuss
+here but some are meant for low level usage. What is describe here has been used
+for ages and works quite well.
+
+{\em We don't discuss some of the more obscure options here. Some are there just
+because we need them as part of bootstrapping or initializing code and are of no
+real use to users.}
+
+\stopsection
+
+\startsection[title={A teaser first}]
+
+Most of this chapter is examples and you learn \TEX\ (and \LUA) best by just
+playing around. The nice thing about \TEX\ is that it's all about visual output,
+so that's why in the next examples we just typeset some of what we just scanned.
+Of course in practice the \type {actions} will be more complex.
+
+\unexpanded\def\showmeaning#1%
+ {\begingroup
+ \dontleavehmode
+ \ttbf\string #1\space
+ \tttf\meaning#1%
+ \endgroup}
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroA",
+ public = true,
+ arguments = "string",
+ actions = function(s)
+ context("(%s)",s)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\startbuffer[usage]
+\MyMacroA{123}
+\MyMacroA{abc}
+\edef\temp{\MyMacroA{abc}}
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+By default a macro gets defined in the \type {\clf_} namespace but the \type
+{public} option makes it visible. This default indicates that it is actually a
+low level mechanism in origin. More often than not these interfaces are used like
+this:
+
+\starttyping
+\def\MyMacro#1{... \clf_MyMacroA{#1} ...}
+\stoptyping
+
+When we look at the meaning of \type {\MyMacroA} we get:
+
+\blank \showmeaning\MyMacroA \blank
+
+And when we apply this macro as:
+
+\typebuffer[usage]
+
+We get
+
+\blank \getbuffer[usage] \blank
+
+The meaning of \type {\temp} is:
+
+\blank \showmeaning\temp \blank
+
+We can also define the macro to be protected (\type {\unexpanded}) in \CONTEXT\
+speak). We can overload existing scanners but unless we specify the \type
+{overload} option, we get a warning on the console.
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroA",
+ public = true,
+-- overload = true,
+ protected = true,
+ arguments = "string",
+ actions = function(s)
+ context("[%s]",s)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+This time we get:
+
+\getbuffer[usage]
+
+The meaning of \type {\temp} is:
+
+\blank \showmeaning\temp \blank
+
+\stopsection
+
+\startsection[title={Basic data types}]
+
+\index {implementors+arguments}
+
+It is actually possible to write very advanced scanners but unless you're in for
+obscurity the limited subset discussed here is normally enough. The \CONTEXT\
+user interface is rather predictable, unless you want to show off with weird
+additional interfaces, for instance by using delimiters other than curly braces
+and brackets, or by using separators other than commas.
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroB",
+ public = true,
+ arguments = { "string", "integer", "boolean", "dimen" },
+ actions = function(s,i,b,d)
+ context("<%s> <%i> <%l> <%p>",s,i,b,d)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+This time we grab four arguments, each of a different type:
+
+\startbuffer[usage]
+\MyMacroB{foo} 123 true 45.67pt
+
+\def\temp {oof}
+\scratchcounter 321
+\scratchdimen 76.54pt
+
+\MyMacroB\temp \scratchcounter false \scratchdimen
+\stopbuffer
+
+\typebuffer[usage]
+
+The above usage gives:
+
+\getbuffer[usage]
+
+As you can see, registers can be used as well, and the \type {\temp} macro is
+also accepted as argument. The integer and dimen arguments scan standard \TEX\
+values. If you want a \LUA\ number you can specify that as well. As our first
+example showed, when there is one argument you don't need an array to specify
+it.
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroC",
+ public = true,
+ arguments = "number",
+ actions = function(f)
+ context("<%.2f>",f)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroC 1.23
+\MyMacroC 1.23E4
+\MyMacroC -1.23E4
+\MyMacroC 0x1234
+\stopbuffer
+
+As you can see, hexadecimal numbers are also accepted:
+
+\typebuffer[usage]
+
+The above usage gives:
+
+\getbuffer[usage]
+
+\stopsection
+
+\startsection[title={Tables}]
+
+\index {implementors+tables}
+
+A list can be grabbed too. The individual items are separated by spaces and
+items can be bound by braces.
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroD",
+ public = true,
+ arguments = "list",
+ actions = function(t)
+ context("< % + t >",t)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroD { 1 2 3 4 {5 6} }
+\stopbuffer
+
+The macro call:
+
+\typebuffer[usage]
+
+results in:
+
+\getbuffer[usage]
+
+Often in \LUA\ scripts tables are uses all over the place. Picking up a table is
+also supported by the implementer.
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroE",
+ public = true,
+ arguments = {
+ {
+ { "bar", "integer" },
+ { "foo", "dimen" },
+ }
+ },
+ actions = function(t)
+ context("<foo : %p> <bar : %i>",t.foo,t.bar)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroE {
+ foo 12pt
+ bar 34
+}
+\stopbuffer
+
+Watch out, we don't use equal signs and commas here:
+
+\typebuffer[usage]
+
+We get:
+
+\getbuffer[usage]
+
+All the above can be combined:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroF",
+ public = true,
+ arguments = {
+ "string",
+ {
+ { "bar", "integer" },
+ { "foo", "dimen" },
+ },
+ {
+ { "one", "string" },
+ { "two", "string" },
+ },
+ },
+ actions = function(s,t1,t2)
+ context("<%s> <%p> <%i> <%s> <%s>",s,t1.foo,t1.bar,t2.one,t2.two)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroF
+ {oeps}
+ { foo 12pt bar 34 }
+ { one {x} two {y} }
+\stopbuffer
+
+The following call:
+
+\typebuffer[usage]
+
+Results in one string and two table arguments.
+
+\getbuffer[usage]
+
+You can nest tables, as in:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroG",
+ public = true,
+ arguments = {
+ "string",
+ "string",
+ {
+ { "data", "string" },
+ { "tab", "string" },
+ { "method", "string" },
+ { "foo", {
+ { "method", "integer" },
+ { "compact", "number" },
+ { "nature" },
+ { "*" }, -- any key
+ } },
+ { "compact", "string", "tonumber" },
+ { "nature", "boolean" },
+ { "escape" },
+ },
+ "boolean",
+ },
+ actions = function(s1, s2, t, b)
+ context("<%s> <%s>",s1,s2)
+ context("<%s> <%s> <%s>",t.data,t.tab,t.compact)
+ context("<%i> <%s> <%s>",t.foo.method,t.foo.nature,t.foo.whatever)
+ context("<%l>",b)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroG
+ {s1}
+ {s2}
+ {
+ data {d}
+ tab {t}
+ compact {12.34}
+ foo { method 1 nature {n} whatever {w} }
+ }
+ true
+\relax
+\stopbuffer
+
+Although the \type {\relax} is not really needed in the next calls, I often use
+it to indicate that we're done:
+
+\typebuffer[usage]
+
+This typesets:
+
+\getbuffer[usage]
+
+\stopsection
+
+\startsection[title=Expansion]
+
+\index {implementors+expansion}
+
+When working with scanners it is important to realize that we have to do with an
+expansion engine. When \TEX\ picks up a token, it can be done as-is, that is the
+raw token, but it can also expand that token first (which can be recursive) and
+then pick up the first token that results from that. Sometimes you want that
+expansion, for instance when you pick up keywords, sometimes you don't.
+
+Expansion effects are most noticeable when we pickup a \quote {string} kind of
+value. In the implementor we have two methods for that: \type {string} and \type
+{argument}. The argument method has an expandable form (the default) and one
+that doesn't expand. Take this:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroH",
+ public = true,
+ arguments = {
+ "string",
+ "argument",
+ "argumentasis",
+ },
+ actions = function(a,b,c)
+ context.type(a or "-") context.quad()
+ context.type(b or "-") context.quad()
+ context.type(c or "-") context.crlf()
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+Now take this input:
+
+\startbuffer[usage]
+\def\a{A} \def\b{B} \def\c{C}
+\MyMacroH{a}{b}{c}
+\MyMacroH{a\a}{b\b}{c\c}
+\MyMacroH\a\b\c\relax
+\MyMacroH\a xx\relax
+\stopbuffer
+
+\typebuffer[usage]
+
+We we use the string method we need a \type {\relax} (or some spacer) to end
+scanning of the string when we don't use curly braces. The last line is
+actually kind of tricky because the macro expects two arguments after
+scanning the first string.
+
+\blank {\getbuffer[usage]} \blank
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroI",
+ public = true,
+ arguments = {
+ "argument",
+ "argumentasis",
+ },
+ actions = function(a,b,c)
+ context.type(a or "-") context.quad()
+ context.type(b or "-") context.quad()
+ context.type(c or "-") context.crlf()
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+Here is a variant:
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\def\a{A} \def\b{B}
+\MyMacroI{a}{b}
+\MyMacroI{a\a}{b\b}
+\MyMacroI\a\b\relax
+\stopbuffer
+
+With:
+
+\typebuffer[usage]
+
+we get:
+
+\blank {\getbuffer[usage]} \blank
+
+\stopsection
+
+\startsection[title=Boxes]
+
+\index {implementors+boxes}
+
+You can pick up a box too. The value returned is a list node:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroJ",
+ public = true,
+ arguments = "box",
+ actions = function(b)
+ context(b)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+The usual box specifiers are supported:
+
+\startbuffer[usage]
+\MyMacroJ \hbox {\strut Test 1}
+\MyMacroJ \hbox to 4cm {\strut Test 2}
+\stopbuffer
+
+So, with:
+
+\typebuffer[usage]
+
+we get:
+
+\blank {\forgetall\dontcomplain\getbuffer[usage]} \blank
+
+There are three variants that don't need the box operator \type {hbox}, \type
+{vbox} and \type {vtop}:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroL",
+ public = true,
+ arguments = {
+ "hbox",
+ "vbox",
+ },
+ actions = function(h,v)
+ context(h)
+ context(v)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+Again, the usual box specifiers are supported:
+
+\startbuffer[usage]
+\MyMacroL {\strut Test 1h} to 10mm {\vfill Test 1v\vfill}
+\MyMacroL spread 1cm {\strut Test 2h} to 15mm {\vfill Test 2v\vfill}
+\stopbuffer
+
+This:
+
+\typebuffer[usage]
+
+gives:
+
+\blank {\forgetall\dontcomplain\showboxes \getbuffer[usage]} \blank
+
+\stopsection
+
+\startsection[title=Like \CONTEXT]
+
+\index {implementors+hashes}
+\index {implementors+arrays}
+
+The previously discussed scanners don't use equal signs and commas as separators,
+but you can enforce that regime in the following way:
+
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroN",
+ public = true,
+ arguments = {
+ "hash",
+ "array",
+ },
+ actions = function(h, a)
+ context.totable(h)
+ context.quad()
+ context.totable(a)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroN
+ [ a = 1, b = 2 ]
+ [ 3, 4, 5, {6 7} ]
+\stopbuffer
+
+This:
+
+\typebuffer[usage]
+
+gives:
+
+\blank {\getbuffer[usage]} \blank
+
+\stopsection
+
+\startsection[title=Verbatim]
+
+\index {implementors+verbatim}
+
+There are a couple of rarely used scanners (there are more of course but these
+are pretty low level and not really used directly using implementors).
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroO",
+ public = true,
+ arguments = "verbatim",
+ actions = function(v)
+ context.type(v)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroO{this is \something verbatim}
+\stopbuffer
+
+There is no expansion applied in:
+
+\typebuffer[usage]
+
+so we get what we input:
+
+\blank {\getbuffer[usage]} \blank
+
+\stopsection
+
+\startsection[title=Macros]
+
+\index {implementors+macros}
+
+We can pick up a control sequence without bothering what it actually
+represents:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroP",
+ public = true,
+ arguments = "csname",
+ actions = function(c)
+ context("{\\ttbf name:} {\\tttf %s}",c)
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroP\framed
+\stopbuffer
+
+The next control sequence is picked up and its name without the leading
+escape character is returned:
+
+\typebuffer[usage]
+
+So here we get:
+
+\blank {\getbuffer[usage]} \blank
+
+\stopsection
+
+\startsection[title={Token lists}]
+
+\index {implementors+token lists}
+
+If you have no clue what tokens are in the perspective of \TEX, you can skip this
+section. We can grab a token list in two ways. The most \LUA ish way is to grab
+it as a table:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroQ",
+ public = true,
+ arguments = "toks",
+ actions = function(t)
+ context("%S : ",t)
+ context.sprint(t)
+ context.crlf()
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroQ{this is a {\bf token} list}
+\MyMacroQ{this is a \inframed{token} list}
+\stopbuffer
+
+\typebuffer[usage]
+
+The above sample code gives us:
+
+\blank {\getbuffer[usage]} \blank
+
+An alternative is to keep the list a user data object:
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroR",
+ public = true,
+ arguments = "tokenlist",
+ actions = function(t)
+ context("%S : ",t)
+ context.sprint(t)
+ context.crlf()
+ end,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroR{this is a {\bf token} list}
+\MyMacroR{this is a \inframed{token} list}
+\stopbuffer
+
+\typebuffer[usage]
+
+Now we get:
+
+\blank {\getbuffer[usage]} \blank
+
+\stopsection
+
+\startsection[title={Actions}]
+
+\index {implementors+actions}
+
+The plural \type {actions} suggests that there can be more than one and indeed
+that is the case. The next example shows a sequence of actions that are applied.
+The first one gets the arguments passes.
+
+\startbuffer[definition]
+\startluacode
+ interfaces.implement {
+ name = "MyMacroS",
+ public = true,
+ arguments = "string",
+ actions = { characters.upper, context },
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+\startbuffer[usage]
+\MyMacroS{uppercase}
+\stopbuffer
+
+\typebuffer[usage]
+
+Gives: \inlinebuffer[usage]
+
+You can pass default arguments too. That way you can have multiple macros using
+the same action. Here's how to do that:
+
+\startbuffer[definition]
+\startluacode
+ local function MyMacro(a,b,sign)
+ if sign then
+ context("$%i + %i = %i$",a,b,a+b)
+ else
+ context("$%i - %i = %i$",a,b,a-b)
+ end
+ end
+
+ interfaces.implement {
+ name = "MyMacroPlus",
+ public = true,
+ arguments = { "integer", "integer", true },
+ actions = MyMacro,
+ }
+
+ interfaces.implement {
+ name = "MyMacroMinus",
+ public = true,
+ arguments = { "integer", "integer", false },
+ actions = MyMacro,
+ }
+\stopluacode
+\stopbuffer
+
+\typebuffer[definition] \getbuffer[definition]
+
+So,
+
+\startbuffer[usage]
+\MyMacroPlus 654 321 \crlf
+\MyMacroMinus 654 321 \crlf
+\stopbuffer
+
+\typebuffer[usage]
+
+Gives:
+
+\getbuffer[usage]
+
+If you need to pass a string, you pass it as \type {"'preset'"}, so single quotes
+inside the double ones. Otherwise strings are interpreted as scanner types.
+
+\stopsection
+
+\startsection[title={Embedded \LUA\ code}]
+
+When you mix \TEX\ and \LUA, you can put the \LUA\ code in a \TEX\ file, for
+instance a style. In the previous sections we used this approach:
+
+\starttyping
+\startluacode
+ -- lua code
+\stopluacode
+\stoptyping
+
+This method is both reliable and efficient but you need to keep into mind that
+macros get expanded. In the next code, the second line will give an error when
+you have not defined \type {\foo} as expandable macro. When it is unexpandable it
+will get passed as it is and \LUA\ will see a \type {\f} as an escaped character.
+So, when you want a macro be passes as macro, you need to do it as in the third
+line. The fact that there is a comment trigger (\type {--}) doesn't help here.
+
+\starttyping
+\startluacode
+ context("foo")
+ -- context("\foo")
+ context("\\bar")
+\stopluacode
+\stoptyping
+
+When you use \type {\ctxlua} the same is true but there you also need to keep an
+eye on special characters. For instance a percent sign is then interpreted in the
+\TEX\ way and because all becomes one line, a \type {--} somewhere in the middle
+will make the rest of the line comment:
+
+\starttyping
+\ctxlua {
+ context("foo")
+ % context("\foo")
+ -- context("\\bar")
+}
+\stoptyping
+
+Here, the second line goes away (\TEX\ comment) and the third line obscures all
+that follows. You can use \type {\letterpercent} to smuggle a percent sign in a
+\type {\ctxlua} call. Special characters like a hash symbol also need to be
+passed by name. Normally curly braces are no problem because \LUA\ also likes
+them properly nested.
+
+When things become too messy and complex you can always put the code in an
+external file and load that one (e.g. with \type {require}.
+
+In the examples in this chapter we put the function in the table, but for long
+ones you might want to do this:
+
+\starttyping
+\startluacode
+ local function MyMacro(s)
+ -- lots of code
+ end
+
+ interfaces.implement {
+ name = "MyMacro",
+ public = true,
+ arguments = "string",
+ actions = MyMacro,
+ }
+\stopluacode
+\stoptyping
+
+It is a common mistake not to define variables and functions as local. If you
+define them global for sure there will become a time when this bites you.
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
+
+% conditional : true|false|0=true|!0=false : too weird for users
+% bracketed : maybe, but first I need a use case
+% bracketedasis : maybe, but first I need a use case
+% optional : maybe, but first I need a use case
+
+\startluacode
+
+ local function Grabbed(t)
+ context(t)
+ end
+
+ interfaces.implement {
+ name = "GrabC",
+ public = true,
+ actions = Grabbed,
+ arguments = "bracketed",
+ }
+ interfaces.implement {
+ name = "GrabD",
+ public = true,
+ actions = Grabbed,
+ arguments = "bracketedasis",
+ }
+ interfaces.implement {
+ name = "GrabE",
+ public = true,
+ actions = Grabbed,
+ arguments = "optional",
+ }
+\stopluacode
+
+\GrabC [foo {\red okay C} bar] \par
+\GrabC \par
+\GrabD [foo {\red okay D} bar] \par
+\GrabE [foo {\red okay E} bar] \par
+\GrabE \par
+
+% once stable:
+
+\startluacode
+ local random = math.random
+ local randomseed = math.randomseed
+
+ local scan_word = tokens.scanners.word
+ local scan_integer = tokens.scanners.integer
+ local scan_dimen = tokens.scanners.dimen
+ local scan_number = tokens.scanners.float
+
+ local scan_integer = tokens.scanners.luainteger
+ local scan_cardinal = tokens.scanners.luacardinal
+ local scan_number = tokens.scanners.luanumber
+
+ local I = 0
+ local D = 0
+ local F = 0
+
+ interfaces.implement {
+ name = "TestInteger",
+ public = true,
+ actions = function(b) if b then return I else I = scan_integer() end end,
+ valuetype = "count",
+ }
+
+ interfaces.implement {
+ name = "TestDimension",
+ public = true,
+ actions = function(b) if b then return D else D = scan_dimen() end end,
+ valuetype = "dimen",
+ }
+
+ interfaces.implement {
+ name = "TestFloat",
+ public = true,
+ actions = function(b)
+ if b then
+ context("%q",F)
+ else
+ F = scan_number()
+ end
+ end,
+ valuetype = "none",
+ }
+
+ interfaces.implement {
+ name = "TestThis",
+ public = true,
+ actions = function(b)
+ if b then
+ return random(scan_integer(),scan_integer())
+ else
+ randomseed(scan_integer(true))
+ end
+ end,
+ valuetype = "count",
+ }
+
+\stopluacode
+
+{\tttf [set:\TestInteger 808714][get: \the\TestInteger ]}\par % [get: \number\TestInteger ]}\par
+{\tttf [set:\TestDimension 12.34pt][get: \the\TestDimension]}\par % [get: \number\TestDimension]}\par
+{\tttf [set:\TestFloat 12.34567890e99][get: \the\TestFloat ]}\par % [get: \number\TestFloat ]}\par
+
+{\tttf \TestThis 123 \dorecurse{10}{\the \TestThis 1 10 \space}}\par
+{\tttf \TestThis 123 \dorecurse{10}{\the \TestThis 1 10 \space}}\par
+{\tttf \TestThis 456 \dorecurse{10}{\the \TestThis 1 10 \space}}\par
+{\tttf \dorecurse{10}{\the \TestThis 1 10 \space}}\par
+
+\TestFloat .1e20\relax
+\TestFloat -0x1.693d8e8943f17p+332\relax
+\TestFloat 0x1.693d8e8943f17p+332\relax
+
+\TestFloat 123.345E67\relax
+
+{\tttf [\the\TestFloat]}
+
+% maybe some day:
+
+% \startluacode
+% local t1 = token.get_next()
+% local t2 = token.get_next()
+% local t3 = token.get_next()
+% local t4 = token.get_next()
+% -- watch out, we flush in sequence
+% token.put_next { t1, t2 }
+% -- but this one gets pushed in front
+% token.put_next ( t3, t4 )
+% \stopluacode
+% abcd
+
+% \ctxlua{whatever = { } whatever.bf = token.get_next()}\bf
+
+\startluacode
+ local t_bf = whatever and whatever.bf or token.create("bf")
+ local put = token.put_next
+
+ interfaces.implement {
+ name = "whateverbfone",
+ public = true,
+ actions = function()
+ put(t_bf)
+ end
+ }
+
+ local ctx_whateverbfxxx = context.whateverbfxxx
+
+ interfaces.implement {
+ name = "whateverbftwo",
+ public = true,
+ actions = function()
+ ctx_whateverbfxxx(false)
+ end
+ }
+
+ interfaces.implement {
+ name = "whateverbfthree",
+ public = true,
+ actions = context.core.cs.whateverbfxxx
+ }
+
+\stopluacode
+
+\let\whateverbfxxx\bf
+
+\dontleavehmode{xxx: \whateverbfxxx xxx}\quad
+\dontleavehmode{one: \whateverbfone one}\quad
+\dontleavehmode{two: \whateverbftwo two}\quad
+\dontleavehmode{two: \whateverbfthree three}\par
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex
index 37ecf45c684..510c820f9e5 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex
@@ -237,14 +237,14 @@ context.stepwise(function()
end)
\stopluacode
\stoptext
-\starttyping
+\stoptyping
Instead of the \type {testpage} function you can also play directly with
registers, like:
\starttyping
if tex.pagegtotal + tex.count.lineheight > tex.pagetotal then
-\starttyping
+\stoptyping
but often an already defined helper does a better job. Of course you will
probably never need this kind of hacks anyway, if only because much more is going
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex
new file mode 100644
index 00000000000..c9afbd44c0b
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex
@@ -0,0 +1,340 @@
+% language=uk
+
+\startcomponent cld-variables
+
+\environment cld-environment
+
+\startchapter[title={Variables}]
+
+\startsection[title={Introduction}]
+
+\index {variables}
+
+Sometimes a bit of experimenting and exploring the boundaries of the \TEX|-|\LUA\
+interfaces results in new mechanisms. To what extent they are really useful is
+hard to say but we just keep them around. Some are described here. This is, at
+least for the moment, a \LMTX\ specific chapter.
+
+\stopsection
+
+\startsection[title={Simple tables}]
+
+\index {variables+grouped tables}
+
+The basic \TEX\ data types are counters (integers), dimensions (kind of floating
+point variables with typographic dimensions), token lists, node lists (boxes),
+fonts, and so on, but no data organized in tables. The first mechanism that we
+discuss is one that obeys grouping. In that respect is behaves like regular
+registers.
+
+\startbuffer
+\newhashedtable\somehashtable
+
+\somehashtable{ foo = 123, bar = "foo" }
+[123 = \the\somehashtable{foo}]
+[foo = \the\somehashtable{bar}]
+
+\bgroup
+\somehashtable{ foo = 456, bar = "oof" }
+[456 = \the\somehashtable{foo}]
+[oof = \the\somehashtable{bar}]
+\egroup
+
+[123 = \the\somehashtable{foo}]
+[foo = \the\somehashtable{bar}]
+
+\bgroup
+\global\somehashtable{ foo = 456 }
+ \somehashtable{ bar = "oof" }
+[456 = \the\somehashtable{foo}]
+[oof = \the\somehashtable{bar}]
+\egroup
+
+[456 = \the\somehashtable{foo}]
+[foo = \the\somehashtable{bar}]
+\stopbuffer
+
+\typebuffer
+
+We define a hashed table, one with keys and values. The definition is global.
+We can then assign values to this table where the assignments themselves are
+hash tables. The above code generates:
+
+\getbuffer
+
+As you can see, the \type {\global} prefix makes the value persistent outside the
+group. You can mix local and global assignments.
+
+Instead of a hashed table, you can have an indexed table. This time the keys are
+numbers.
+
+\startbuffer
+\newindexedtable\someindextable
+
+\someindextable{ 123, "foo" }
+[123 = \the\someindextable 1]
+[foo = \the\someindextable 2]
+
+\bgroup
+\someindextable{ 456, "oof" }
+[456 = \the\someindextable 1]
+[oof = \the\someindextable 2]
+\egroup
+
+[123 = \the\someindextable 1]
+[foo = \the\someindextable 2]
+
+\bgroup
+\global\someindextable{ [1] = 456 }
+ \someindextable{ [2] = "oof" }
+[456 = \the\someindextable 1]
+[oof = \the\someindextable 2]
+\egroup
+
+[456 = \the\someindextable 1]
+[foo = \the\someindextable 2]
+\stopbuffer
+
+\typebuffer
+
+The outcome is the same as before:
+
+\getbuffer
+
+At the \LUA\ end you can access these tables too:
+
+\startbuffer
+\startluacode
+context("[hashed : bar = %s]",context.hashedtables.somehashtable.bar)
+context("[indexed : 2 = %s]", context.indexedtables.someindextable[2])
+\stopluacode
+\stopbuffer
+
+\typebuffer
+
+Indeed we get:
+
+\getbuffer
+
+\stopsection
+
+\startsection[title={Data tables}]
+
+\index {variables+data tables}
+
+In \LUA, tables can be more complex than in the previous section. When you need
+more complex tables, it is likely that your grouping needs are also different,
+which is why we have another mechanism. This mechanism is build on top of another
+model: data values. There are 64K integer registers in any modern \TEX\ engine
+and normally that is more than enough. However, in addition in \LUAMETATEX\ we
+have a variant integer storage unit, one that is lightweight and where the amount
+is limited by the size of the hash table. It was added as part of the low level
+cleanup up of the \LUA\ token interface (a bit more abstraction). Here is an
+example of its usage:
+
+\startbuffer
+\dorecurse {100} {
+ \setdatavalue{#1}{#1}
+}
+
+\start \tttf \darkred \raggedright \dorecurse {100} {
+ #1=\scratchcounter\getdatavalue{#1}\the\scratchcounter
+} \par \stop \blank
+
+\start \tttf \darkgreen \raggedright \dorecurse {100} {
+ #1=\thedatavalue{#1}%
+} \par \stop \blank
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+We define hundred values which are a simple numeric macros. Here we use two
+auxiliary macros because we prefer to use a dedicated namespace for these
+variables. However, there are also primitives that deal with these data values:
+
+\startbuffer[usage]
+\setdatavalue{my-data}{12345}%
+\letdatacode \MyData 67890
+\thedatavalue{my-data} \the\MyData
+\stopbuffer
+
+\typebuffer[usage]
+
+gives: \inlinebuffer[usage]
+
+But, when more is needed than simple integers, tables come into view. This interface
+is different from the simple one and involves more commands. The next examples show
+about all:
+
+\startbuffer
+\newluatable\testtable
+\setluatable\testtable{ foo = 123, bar = "456", oof = "rab" }
+% \inspectluatable\testtable
+\darkcyan
+foo = \getfromluatable\testtable{foo}\par
+bar = \getfromluatable\testtable{bar}\par
+oof = \getfromluatable\testtable{oof}\par
+\bgroup
+ \useluatable\testtable
+ \setluatable\testtable{ foo = 123123, bar = "456456" }
+ % \inspectluatable\testtable
+ \darkmagenta
+ foo = \getfromluatable\testtable{foo}\par
+ bar = \getfromluatable\testtable{bar}\par
+ oof = \getfromluatable\testtable{oof}\par
+ \startluacode
+ local t = context.luatables.get("testtable")
+ context("<%s %s %s>",t.foo,t.bar,t.oof)
+ \stopluacode \par
+\egroup
+\darkyellow
+foo = \getfromluatable\testtable{foo}\par
+bar = \getfromluatable\testtable{bar}\par
+oof = \getfromluatable\testtable{oof}\par
+\startluacode
+ local t = context.luatables.get("testtable")
+ context("<%s %s %s>",t.foo,t.bar,t.oof)
+\stopluacode \par
+% \inspectluatable\testtable
+\stopbuffer
+
+\typebuffer
+
+The tables are semi|-|local: \type {\newluatable} creates a table and \type
+{\useluatable} will create a local copy that is discarded when the group ends.
+
+\startpacked
+\tttf \getbuffer
+\stoppacked
+
+Hashed and indexed tables can be used mixed, but there are additional accessors
+for indexed tables because there we expect numbers.
+
+\startbuffer
+\newluatable\moretable
+\setluatable\moretable{ 1, "foo" }
+\darkcyan
+[1] = \getfromluatable\moretable{1}\par
+[2] = \idxfromluatable\moretable 2 \par
+\bgroup
+ \useluatable\moretable
+ \setluatable\moretable{ foo = 123123, bar = "456456" }
+ \darkmagenta
+ [1] = \getfromluatable\moretable{1}\par
+ [2] = \idxfromluatable\moretable 2 \par
+ \startluacode
+ local t = context.luatables.get("moretable")
+ context("<%s %s>",t[1],t[2])
+ \stopluacode \par
+\egroup
+\darkyellow
+[1] = \getfromluatable\moretable{1}\par
+[2] = \idxfromluatable\moretable 2 \par
+\startluacode
+ local t = context.luatables.get("moretable")
+ context("<%s %s>",t[1],t[2])
+\stopluacode \par
+\stopbuffer
+
+\typebuffer
+
+\startpacked
+\tttf \getbuffer
+\stoppacked
+
+You can create more complex (nested) tables that you can handle at the \LUA\
+end in the usual way. Basically any \LUA\ that makes a table can go between
+the curly braces.
+
+\stopsection
+
+\startsection[title=Named variables]
+
+\index {variables+named}
+\index {variables+integers}
+\index {variables+cardinals}
+\index {variables+floats}
+\index {integers}
+\index {cardinals}
+\index {floats}
+
+Just because it can be done, and maybe it even has it use, we offer additional
+numbers, stored and accessible by name. The different types all live in their
+own namespace:
+
+\startbuffer[definition]
+\luainteger bar 123456
+\luafloat bar 123.456e12
+\luainteger gnu = 0xFFFF
+\stopbuffer
+
+\startbuffer[usage]
+{\darkcyan \the\luainteger bar}
+{\darkmagenta\the\luafloat bar}
+{\darkyellow \the\luainteger gnu}
+\stopbuffer
+
+\typebuffer[definition,usage] \getbuffer[definition]
+
+These serialize like: \getbuffer[usage]\removeunwantedspaces , and when not set they
+default to zero. There is an extra type, cardinal:
+
+\startbuffer
+\luainteger a 0x7FFFFFFFFFFFFFFF
+\luainteger b -0x7FFFFFFFFFFFFFFF
+\luacardinal c 0xFFFFFFFFFFFFFFFF
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We cheat a bit behind the screens because it is actually a double but we scan
+it as positive integer and serialize it as such.
+
+\startbuffer
+[\the \luainteger a\relax]\par
+[\the \luainteger b\relax]\par
+[\the \luacardinal c\relax]\par
+\stopbuffer
+
+\typebuffer \getbuffer
+
+You have access to the numbers at the \LUA\ end, as in:
+
+\startbuffer
+\luainteger one 123 \luafloat two 456.678
+\luaexpr{interfaces.numbers.one/1000 + interfaces.numbers.two/10000}
+\stopbuffer
+
+\typebuffer
+
+There are \type {integers}, \type {cardinals} and \type {floats} but the \type
+{numbers} one is the most generic as it tries to resolve it from one of these
+namespaces, so we get: [\inlinebuffer\space\space]. There is also a related
+expression command:
+
+\startbuffer
+(?: \luaexpression {n.one/1000 + n.two/10000})
+(f: \luaexpression float {n.one/1000 + n.two/10000})
+(i: \luaexpression integer {n.one/1000 + n.two/10000})
+(c: \luaexpression cardinal {n.one/1000 + n.two/10000})
+(l: \luaexpression lua {n.one/1000 + n.two/10000})
+\stopbuffer
+
+\typebuffer
+
+It typesets this (watch the \type {lua} variant, which is a precise
+roundtrip serialization method):
+
+\startlines
+\tttf \getbuffer
+\stoplines
+
+The \type {n} table is just a shortcut to \type {interfaces.numbers}.
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex
new file mode 100644
index 00000000000..1ffacf0ab51
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex
@@ -0,0 +1,395 @@
+% language=us
+
+% Talking of keywords: Jacob Collier, Count The People is definitely an example
+% of showing keywords and no way that the fonts used there are done by tex:
+%
+% https://www.youtube.com/watch?v=icplHV25fqs
+
+\environment evenmore-style
+
+\startcomponent evenmore-keywords
+
+\startchapter[title=Keywords]
+
+Some primitives in \TEX\ can take one or more optional keywords and|/|or keywords
+followed by one or more values. In traditional \TEX\ it concerns a handful of
+primitives, in \PDFTEX\ there are plenty of backend|-|related primitives,
+\LUATEX\ introduced optional keywords to some math constructs and attributes to
+boxes, and \LUAMETATEX\ adds some more too. The keyword scanner in \TEX\ is
+rather special. Keywords are used in cases like:
+
+\starttyping
+\hbox spread 10cm {...}
+\advance\scratchcounter by 10
+\vrule width 3cm height 1ex
+\stoptyping
+
+Sometimes there are multiple keywords, as with rules, in which case you can
+imagine a case like:
+
+\starttyping
+\vrule width 3cm depth 1ex width 10cm depth 0ex height 1ex\relax
+\stoptyping
+
+Here we add a \type {\relax} to end the scanning. If we don't do that and the
+rule specification is followed by arbitrary (read:\ unpredictable) text, the next
+word might be a valid keyword and when followed by a dimension (unlikely) it will
+happily be read as a directive, or when not followed by a dimension an error
+message will show up. Sometimes the scanning is more restricted, as with glue
+where the optional \type {plus} and \type {minus} are to come in that order, but
+when missing, again a word from the text can be picked up if one doesn't
+explicitly end with a \type {\relax} or some other token.
+
+\starttyping
+\scratchskip = 10pt plus 10pt minus 10pt % okay
+\scratchskip = 10pt plus 10pt % okay
+\scratchskip = 10pt minus 10pt % okay
+\scratchskip = 10pt minus 10pt plus 10pt % typesets "plus 10pt"
+\scratchskip = 10pt plus whatever % an error
+\stoptyping
+
+The scanner is case insensitive, so the following specifications are all valid:
+
+\starttyping
+\hbox To 10cm {To}
+\hbox TO 10cm {TO}
+\hbox tO 10cm {tO}
+\hbox to 10cm {to}
+\stoptyping
+
+It happens that keywords are always simple English words so the engine uses a
+cheap check deep down, just offsetting to uppercase, but of course that will not
+work for arbitrary \UTF-8\ (as used in \LUATEX) and it's also unrelated to the
+upper- and lowercase codes as \TEX\ knows them.
+
+The above lines scan for the keyword \type {to} and after that for a dimension.
+While keyword scanning is case tolerant, dimension scanning is period tolerant:
+
+\starttyping
+\hbox to 10cm {10cm}
+\hbox to 10.0cm {10.0cm}
+\hbox to .0cm {.0cm}
+\hbox to .cm {.cm}
+\hbox to 10.cm {10.cm}
+\stoptyping
+
+These are all valid and according to the specification; even the single period is
+okay, although it looks funny. It would not be hard to intercept that but I guess
+that when \TEX\ was written anything that could harm performance was taken into
+account. One can even argue for cases like:
+
+\starttyping
+\hbox to \first.\second cm {.cm}
+\stoptyping
+
+Here \type {\first} and|/|or \type {\second} can be empty. Most users won't
+notice these side effects of scanning numbers anyway.
+
+The reason for writing up any discussion of keywords is the following. Optional
+keyword scanning is kind of costly, not so much now, but more so decades ago
+(which led to some interesting optimizations, as we'll see). For instance, in the
+first line below, there is no keyword. The scanner sees a \type {1} and it not
+being a keyword, pushes that character back in the input.
+
+\starttyping
+\advance\scratchcounter 10
+\advance\scratchcounter by 10
+\stoptyping
+
+In the case of:
+
+\starttyping
+\scratchskip 10pt plux
+\stoptyping
+
+it has to push back the four scanned tokens \type {plux}. Now, in the engine
+there are lots of cases where lookahead happens and when a condition is not
+satisfied, the just|-|read token is pushed back. Incidentally, when picking up
+the next token triggered some expansion, it's not the original next token that
+gets pushed back, but the first token seen after the expansion. Pushing back
+tokens is not that inefficient, although it involves allocating a token and
+pushing and popping input stacks (we're talking of a mix of reading from file,
+token memory, \LUA\ prints, etc.)\ but it always takes a little time and memory.
+In \LUATEX\ there are more keywords for boxes, and there we have loops too: in a
+box specification one or more optional attributes are scanned before the optional
+\type {to} or \type {spread}, so again there can be push back when no more \type
+{attr} are seen.
+
+\starttyping
+\hbox attr 1 98 attr 2 99 to 1cm{...}
+\stoptyping
+
+In \LUAMETATEX\ there is even more optional keyword scanning, but we leave that
+for now and just show one example:
+
+\starttyping
+\hbox spread 10em {\hss
+ \hbox orientation 0 yoffset 1mm to 2em {up}\hss
+ \hbox to 2em {here}\hss
+ \hbox orientation 0 xoffset -1mm to 2em {down}\hss
+}
+\stoptyping
+
+Although one cannot mess too much with these low|-|level scanners there was room
+for some optimization, so the penalty we pay for more keyword scanning in
+\LUAMETATEX\ is not that high. (I try to compensate when adding features that
+have a possible performance hit with some gain elsewhere.)
+
+It will be no surprise that there can be interesting side effects to keyword
+scanning. For instance, using the two character keyword \type {by} in an \type
+{\advance} can be more efficient because nothing needs to be pushed back. The
+same is true for the sometimes optional equal:
+
+\starttyping
+\scratchskip = 10pt
+\stoptyping
+
+Similar impacts on efficiency can be found in the way the end of a number is
+seen, basically anything not resolving to a number (or digit). (For these, assume
+a following token will terminate the number if needed; we're focusing on the
+spaces here.)
+
+\starttyping
+\scratchcounter 10% space not seen, ends \cs
+\scratchcounter =10% no push back of optional =
+\scratchcounter = 10% extra optional space gobble
+\scratchcounter = 10 % efficient ending of number scanning
+\scratchcounter = 10\relax % depending on engine less efficient
+\stoptyping
+
+In the above examples scanning the number involves: skipping over spaces,
+checking for an optional equal, skipping over spaces, scanning for a sign,
+checking for an optional octal or hexadecimal trigger (single or double quote
+character), scanning the number till a non|-|digit is seen. In the case of
+dimensions there is fraction scanning as well as unit scanning too.
+
+In any case, the equal is optional and kind of a keyword. Having an equal can be
+more efficient then not having one, again due to push back in case of no equal
+being seen, In the process spaces have been skipped, so add to the overhead the
+scanning for optional spaces. In \LUAMETATEX\ all that has been optimized a bit.
+By the way, in dimension scanning \type {pt} is actually a keyword and as there
+are several dimensions possible quite some push back can happen there, but we
+scan for the most likely candidates first.
+
+All that said, we're now ready for a surprise. The keyword scanner gets a string
+that it will test for, say, \type {to} in case of a box specification. It then
+will fetch tokens from whatever provides the input. A token encodes a so|-|called
+command and a character and can be related to a control sequence. For instance,
+the character \type {t} becomes a letter command with related value \number`t.
+So, we have three properties: the command code, the character code and the
+control sequence code. Now, instead of checking if the command code is a letter
+or other character (two checks) a fast check happens for the control sequence
+code being zero. If that is the case, the character code is compared. In practice
+that works out well because the characters that make up a keyword are in the
+range \number"41--\number"5A\ and \number"61--\number"7A, and all other character
+codes are either below that (the ones that relate to primitives where the
+character code is actually a subcommand of a limited range) or much larger
+numbers that, for instance, indicate an entry in some array, where the first
+useful index is above the mentioned ranges.
+
+The surprise is in the fact that there is no checking for letters or other
+characters, so this is why the following code will work too: \footnote {No longer
+in \LUAMETATEX\ where we do a bit more robust check.}
+
+\starttyping
+\catcode `O= 1 \hbox tO 10cm {...} % { begingroup
+\catcode `O= 2 \hbox tO 10cm {...} % } endgroup
+\catcode `O= 3 \hbox tO 10cm {...} % $ mathshift
+\catcode `O= 4 \hbox tO 10cm {...} % & alignment
+\catcode `O= 6 \hbox tO 10cm {...} % # parameter
+\catcode `O= 7 \hbox tO 10cm {...} % ^ superscript
+\catcode `O= 8 \hbox tO 10cm {...} % _ subscript
+\catcode `O=11 \hbox tO 10cm {...} % letter
+\catcode `O=12 \hbox tO 10cm {...} % other
+\stoptyping
+
+In the first line, if we changed the catcode of \type {T} (instead of \type {O}),
+it gives an error because \TEX\ sees a begin group character (category code 1)
+and starts the group, but as a second character in a keyword (\type {O}) it's
+okay because \TEX\ will not look at the category code.
+
+Of course only the cases \type {11} and \type {12} make sense in practice.
+Messing with the category codes of regular letters this way will definitely give
+problems with processing normal text. In a case like:
+
+\starttyping
+{\catcode `o=3 \hbox to 10cm {oeps}} % $ mathshift {oeps}
+{\catcode `O=3 \hbox to 10cm {Oeps}} % $ mathshift {$eps}
+\stoptyping
+
+we have several issues: the primitive control sequence \type {\hbox} has an \type
+{o} so \TEX\ will stop after \type {\hb} which can be undefined or a valid macro
+and what happens next is hard to predict. Using uppercase will work but then the
+content of the box is bad because there the \type {O} enters math. Now consider:
+
+\starttyping
+{\catcode `O=3 \hbox tO 10cm {Oeps Oeps}} % {$eps $eps}
+\stoptyping
+
+This will work because there are now two \type {O}'s in the box, so we have
+balanced inline math triggers. But how does one explain that to a user? (Who
+probably doesn't understand where an error message comes from in the first
+place.) Anyway, this kind of tolerance is still not pretty, so in \LUAMETATEX\ we
+now check for the command code and stick to letters and other characters. On
+today's machines (and even on my by now ancient workhorse) the performance hit
+can be neglected.
+
+In fact, by intercepting the weird cases we also avoid an unnecessary case check
+when we fall through the zero control sequence test. Of course that also means
+that the above mentioned category code trickery doesn't work any more: only
+letters and other characters are now valid in keyword scanning. Now, it can be
+that some macro programmer actually used those side effects but apart from some
+macro hacker being hurt because no longer mastering those details can be showed
+off, it is users that we care more for, don't we?
+
+To be sure, the abovementioned performance of keyword and equal scanning is not
+that relevant in practice. But for the record, here are some timings on a laptop
+with a i7-3849\cap{QM} processor using \MINGW\ binaries on a 64-bit \MSWINDOWS\
+10 system. The times are the averages of five times a million such assignments
+and advancements.
+
+\starttabulate[|l|c|c|c|]
+\FL
+\NC one million times \NC terminal \NC \LUAMETATEX\ \NC \LUATEX \NC \NR
+\ML
+\NC \type {\advance\scratchcounter 1} \NC space \NC 0.068 \NC 0.085 \NC \NR
+\NC \type {\advance\scratchcounter 1} \NC \type {\relax} \NC 0.135 \NC 0.149 \NC \NR
+\NC \type {\advance\scratchcounter by 1} \NC space \NC 0.087 \NC 0.099 \NC \NR
+\NC \type {\advance\scratchcounter by 1} \NC \type {\relax} \NC 0.155 \NC 0.161 \NC \NR
+\NC \type {\scratchcounter 1} \NC space \NC 0.057 \NC 0.096 \NC \NR
+\NC \type {\scratchcounter 1} \NC \type {\relax} \NC 0.125 \NC 0.151 \NC \NR
+\NC \type {\scratchcounter=1} \NC space \NC 0.063 \NC 0.080 \NC \NR
+\NC \type {\scratchcounter=1} \NC \type {\relax} \NC 0.131 \NC 0.138 \NC \NR
+\LL
+\stoptabulate
+
+We differentiate here between using a space as terminal or a \type {\relax}. The
+latter is a bit less efficient because more code is involved in resolving the
+meaning of the control sequence (which eventually boils down to nothing) but
+nevertheless, these are not timings that one can lose sleep over, especially when
+the rest of a decent \TEX\ run is taken into account. And yes, \LUAMETATEX\
+(\LMTX) is a bit faster here than \LUATEX, but I would be disappointed if that
+weren't the case.
+
+% luametatex:
+
+% \luaexpr{(0.068+0.070+0.069+0.067+0.068)/5} 0.068\crlf
+% \luaexpr{(0.137+0.132+0.136+0.137+0.134)/5} 0.135\crlf
+% \luaexpr{(0.085+0.088+0.084+0.089+0.087)/5} 0.087\crlf
+% \luaexpr{(0.145+0.160+0.158+0.156+0.154)/5} 0.155\crlf
+% \luaexpr{(0.060+0.055+0.059+0.055+0.056)/5} 0.057\crlf
+% \luaexpr{(0.118+0.127+0.128+0.122+0.130)/5} 0.125\crlf
+% \luaexpr{(0.063+0.062+0.067+0.061+0.063)/5} 0.063\crlf
+% \luaexpr{(0.127+0.128+0.133+0.128+0.140)/5} 0.131\crlf
+
+% luatex:
+
+% \luaexpr{(0.087+0.090+0.083+0.081+0.086)/5} 0.085\crlf
+% \luaexpr{(0.150+0.151+0.146+0.154+0.145)/5} 0.149\crlf
+% \luaexpr{(0.100+0.092+0.113+0.094+0.098)/5} 0.099\crlf
+% \luaexpr{(0.162+0.165+0.161+0.160+0.157)/5} 0.161\crlf
+% \luaexpr{(0.093+0.101+0.086+0.100+0.098)/5} 0.096\crlf
+% \luaexpr{(0.147+0.151+0.160+0.144+0.151)/5} 0.151\crlf
+% \luaexpr{(0.076+0.085+0.088+0.073+0.078)/5} 0.080\crlf
+% \luaexpr{(0.136+0.138+0.142+0.135+0.140)/5} 0.138\crlf
+
+After the \CONTEXT\ 2020 meeting I entered another round of staring at the code.
+One of the decision made at that meeting was to drop the \type {nd} and \type
+{nc} units as they were never official. That made me (again) wonder of that bit
+of the code could be done nicer as there is a mix of scanning units like \type
+{pt}, \type {bp} and \type {cm}, fillers like \type {fi} and \type {fill}, pseudo
+units like \type {ex} and \type {em}, special interception of \type {mu}, as well
+as the \type {plus} and \type {minus} parsing for glue. That code was already
+redone a bit so that here was less push back of tokens which had the side effect
+of dimension scanning being some 50\% faster than in \LUATEX.
+
+The same is true for scanning rule specs and scanning the box properties. In the
+later case part of the optimization came from not checking properties that
+already had been set, or only scanning them when for instance the \type
+{orientation} flag had been set (a new option in \LUAMETATEX\ with an additional
+four offset and move parameters). Also, some options, like the target dimensions,
+came after scanning the new ones. Again, this was quite a bit faster than in
+\LUATEX, not that it is noticeable on a normal run. All is mixed with skipping
+spacers and relax tokens plus quitting at a brace.
+
+Similar mixed scanning happens in some of the (new) math command, but these are
+less critical. Actually there some new commands had to be used because for
+instance \type {\over} takes any character as valid argument and keywords would
+definitely be incompatible there.
+
+Anyway, I started wondering if some could be done differently and finally decided
+to use a method that I already played with years ago. The main reason for not
+using it was that I wanted to remain compatible with the way traditional \TEX\
+scans. However, as we have many more keyword we already are no longer compatible
+in that department and the alternative implementation makes the code look nicer
+and has the benefit of being (more than) twice as fast. And when I run into
+issues in \CONTEXT\ I should just fix sloppy code.
+
+The compatibility issue is not really a problem when you consider the following
+cases.
+
+\starttyping
+\hbox reverse attr 123 456 orientation 4 xoffset 10pt spread 10cm { }
+\hrule xoffset 10pt width 10cm depth 3mm
+\hskip 3pt plus 2pt minus 1pt
+\stoptyping
+
+In the original approach these three case each have their own special side
+effects. In the case of a \type {\hbox} the scanning stops at a relax or left
+brace. An unknown keyword gives an error. So, there is no real benefit in pushing
+back tokens here. The order matters: the \type {spread} or \type {to} comes last.
+
+In the case of a \type {\hrule} the scanning stops when the keyword is not one of
+the known. This has the side effect that when such a rule definition is hidden in
+a macro and followed by for instance \type {width} without unit one gets an error
+and when a unit is given the rule can come out different than expected and the
+text is gone. For that reason a rule specification like this is often closed by
+\type {\relax} (any command that doesn't expand to a keyword works too). Here
+keywords can occur multiple times. As we have additional keyword a lookahead
+becomes even more an issue (not that \type {xoffset}) is a likely candidate.
+
+The last example is special in a different way: order matters in the sense that a
+\type {minus} specifier can follow a \type {plus} but not the reverse. And only
+one \type {plus} and \type {minus} can be given. Again one can best finish this
+specification by a something that doesn't look like a keyword, so often one will
+see a \type {\relax}.
+
+The advantage of the new method is that the order doesn't matter any more and
+that using a keyword multiple times overloads earlier settings. And this is
+consistent for all commands that used keywords (with a few exceptions in math
+where keywords drive later parsing and for font definitions where we need to be
+compatible. We give a slightly better error message: we mention the expected
+keyword. Another side effect is that any characters that is a legal start of a
+known keyword will trigger further parsing and issue an error message when it
+fails. Indeed, \LUAMETATEX\ has no mercy.
+
+In practice the mentioned special effects mean that a macro package will not run
+into trouble with boxes because unknown keywords make it crash and that rules and
+glue is terminated in a way that prevents lookahead. The new method kind of
+assumes this and one can argue that when something breaks one has to fix the
+macro code. Macro writers know that one cannot predict what users come up with
+and that users also don't look into the macros and therefore they take
+precautions. Also, a more rigorous parsing results in hopefully a better message.
+
+And yes, when I ran the test suite there was indeed a case where I had to add a
+\type {\relax}, but I can live with that. As long as users don't notice it.
+
+Now, one of the interesting properties of the slightly different scanning is
+that we can do this:
+
+\starttyping
+\hbox to 4cm attr 123 456 reverse to 3cm {...}
+\stoptyping
+
+So, we have a less strict order and we can overload arguments too. We'll see how
+this will be applied in \CONTEXT.
+
+\stopchapter
+
+\stopcomponent
+
+% another nice example: \the is expanded so we get the old value
+
+% \scratchskip = 10pt plus 1fill \the\scratchskip % old value
+% \scratchskip = 10pt plus 1fill [\the\scratchskip] % new value
+% \scratchskip = 10pt plus 1fi l l [\the\scratchskip] % also works
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex
index 36d4390aaff..64ceaa353c0 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex
@@ -62,26 +62,49 @@ The decision making is influenced by quite some factors, like:
\stopitem
\stopitemize
-In traditional \TEX\ it doesn't really matter how the resulting boxes look like,
-as long as the following steps can handle them, and those steps don't look into
-those boxes. In fact, unless you unpack a box, only the backend deals with the
-content. But in \LUATEX\ we have callbacks that hook into several stages and {\em
-can} look into the constructed boxes. In \LUATEX\ these boxes also have embedded
-directional information (needed by the backend) and (although that is seldom
-used) left or right boxed material, a features inherited from \ALEPH|/|\OMEGA.
-And when messing around with the content of boxes one has to know what can be
-seen there. In principle the code can be reorganized a it but adding additional
-functionality is not that trivial because we want to stay close to the original
-implementation, even if it has been messed up a bit by successive additions.
-Eventually I might give it a try to integrate all these features a bit better,
-but on the other hand: it works.
+% In traditional \TEX\ it doesn't really matter how the resulting boxes look like,
+% as long as the following steps can handle them, and those steps don't look into
+% those boxes. In fact, unless you unpack a box, only the backend deals with the
+% content. But in \LUATEX\ we have callbacks that hook into several stages and {\em
+% can} look into the constructed boxes. In \LUATEX\ these boxes also have embedded
+% directional information (needed by the backend) and (although that is seldom
+% used) left or right boxed material, a features inherited from \ALEPH|/|\OMEGA.
+% And when messing around with the content of boxes one has to know what can be
+% seen there. In principle the code can be reorganized a it but adding additional
+% functionality is not that trivial because we want to stay close to the original
+% implementation, even if it has been messed up a bit by successive additions.
+% Eventually I might give it a try to integrate all these features a bit better,
+% but on the other hand: it works.
+%
+% \starttexdefinition Sample #1#2
+% \startluacode
+% document.normalizestate = nodes.getnormalizeline()
+% nodes.setnormalizeline(#1)
+% \stopluacode
+% \startsubsubject[title={normalization #1, #2}]
+% \typebuffer[#2]
+% \startlinecorrection
+% \forgetall
+% \start
+% \setupalign[verytolerant,stretch]
+% \showmakeup[line,hbox,vbox,glue]
+% \vbox{\getbuffer[#2]\samplefile{sapolsky}}
+% \stop
+% \par
+% \stoplinecorrection
+% \stopsubject
+% \startluacode
+% nodes.setnormalizeline(document.normalizestate)
+% \stopluacode
+% \stoptexdefinition
+
+\newcount\OldNormalizeLineMode
\starttexdefinition Sample #1#2
- \startluacode
- document.normalizestate = nodes.getnormalizeline()
- nodes.setnormalizeline(#1)
- \stopluacode
- \startsubsubject[title={normalization #1, #2}]
+ \OldNormalizeLineMode\normalizelinemode
+ \bitwiseflip \normalizelinemode \normalizelinemodecode
+ \bitwiseflip \normalizelinemode \indentskipmodecode
+ \startsubsubject[title={#1}]
\typebuffer[#2]
\startlinecorrection
\forgetall
@@ -93,9 +116,7 @@ but on the other hand: it works.
\par
\stoplinecorrection
\stopsubject
- \startluacode
- nodes.setnormalizeline(document.normalizestate)
- \stopluacode
+ \normalizelinemode\OldNormalizeLineMode
\stoptexdefinition
\startbuffer[sample-1]
@@ -130,108 +151,113 @@ but on the other hand: it works.
\hangafter = 3
\stopbuffer
-In the next examples we show how the result of typesetting a paragraph looks
-like. We use the Sapolsky quote from the distribution. The cyan glue nodes are
-the left and right skip nodes, and the gray one at the end of the last line
-represents the parfill skip. The magenta ones at the edge are baseline skips. An
-indentation is shown in gray too. As experiment we have four normalization levels
-but in the end only the highest level makes sense, simply because normalization
-makes no sense unless one consistently normalizes all. We just keep the
-granularity because it makes it possible to explain what gets done.
-
-\texdefinition{Sample}{0}{sample-1}
-\texdefinition{Sample}{0}{sample-2}
-\texdefinition{Sample}{0}{sample-3}
-\texdefinition{Sample}{0}{sample-4}
-
-You might have noticed that the right skip is always there but the left skip is
-absent when it is zero. As said, as long as the result is okay, it does not
-really matter. But \unknown\ in \LUATEX\ (and therefore \CONTEXT) it can have
-consequences because there we can kick in a callback that does something with
-lines. Such a callback often has to deal with these specific glues and them being
-optional makes for more testing. The more predictable the order is, the better.
-Although we can easily normalize lines (in a callback) to always have a left skip
-too it is also an option in the engine.
-
-\texdefinition{Sample}{1}{sample-1}
-\texdefinition{Sample}{1}{sample-2}
-\texdefinition{Sample}{1}{sample-3}
-\texdefinition{Sample}{1}{sample-4}
-
-In the previous examples there are always left skips as well as right skips. It
-makes no sense to have an option to omit both zero left and right skips, because
-that again is unpredictable. But we can go further.
-
-\texdefinition{Sample}{2}{sample-1}
-\texdefinition{Sample}{2}{sample-2}
-\texdefinition{Sample}{2}{sample-3}
-\texdefinition{Sample}{2}{sample-4}
-
-In these examples the indentation has been turned into a glue as well (actually
-it is more a kern but using a glue makes more sense). The hanging indentation
-however is not seen here: it is not represented by glue but instead sort of
-hidden in the width of the box and a shift of its content.
-
-\texdefinition{Sample}{3}{sample-1}
-\texdefinition{Sample}{3}{sample-2}
-\texdefinition{Sample}{3}{sample-3}
-\texdefinition{Sample}{3}{sample-4}
-
-In the previous examples the hanging indentation is turned into left and right
-hang skips. These cannot be set at the \TEX\ end, but are injected when we
-instruct the normalizer to do so.
-
-\texdefinition{Sample}{4}{sample-1}
-\texdefinition{Sample}{4}{sample-2}
-\texdefinition{Sample}{4}{sample-3}
-\texdefinition{Sample}{4}{sample-4}
-
-The previous examples differ from the previous set in that they push these hang
-related glue nodes before the left and after the right skip. As I couldn't make
-up my mind yet, I let \LUAMETATEX\ just provide both variants.
-
-The option to keep hang related information explicitly in the line has some
-consequences. First of all, we now have glue and not some shift|/|width
-combination. Second, we have introduced an incompatibility: the lines now always
-have the proper width. You might have noticed that but we can show it more
-explicitly. We use two parameter sets
-
-\startbuffer[sample-5]
- \hangindent = 20pt
- \hangafter = 0
-\stopbuffer
-
-\startbuffer[sample-6]
- \hangindent =-20pt
- \hangafter = 0
-\stopbuffer
-
-\Sample{0}{sample-5}
-\Sample{4}{sample-5}
-
-\Sample{0}{sample-6}
-\Sample{4}{sample-6}
-
-A not yet mention part of the normalization is that, because they are no longer
-of relevance, the special local par nodes have been removed. The one that starts
-a paragraph is turned into a normal directional node if needed, so that we get
-properly balanced pairs of directional nodes. It must been said that the code
-that does all this is a bit of a mess. We want to stay close to the original
-code, but we also need to deal with all these extensions, like directions,
-protrusion, extra boxes, etc.
-
-Not shown here is that there is a fifth mode of operation. When we enable that
-level an overfull box will get a correction skip so that the right skip etc are
-properly aligned. How useful this is: we'll see.
-
-Now, when I decide to keep this feature, which can be set at the \LUA\ end to do
-the previously mentioned tasks, depending on a feature level ranging from zero to
-four, I also need to check the impact on existing \CONTEXT\ code, which
-(currently) is complicated by the fact that most is shared between \MKIV\ and
-\LMTX, and only \LUAMETATEX\ has this normalization feature. I will probably
-enable it for a while locally in order to see if there are side effects. Then,
-when the code base gets adapted, we have to assume that normalization happens, so
-there is no way back.
+% In the next examples we show how the result of typesetting a paragraph looks
+% like. We use the Sapolsky quote from the distribution. The cyan glue nodes are
+% the left and right skip nodes, and the gray one at the end of the last line
+% represents the parfill skip. The magenta ones at the edge are baseline skips. An
+% indentation is shown in gray too. As experiment we have four normalization levels
+% but in the end only the highest level makes sense, simply because normalization
+% makes no sense unless one consistently normalizes all. We just keep the
+% granularity because it makes it possible to explain what gets done.
+%
+% \texdefinition{Sample}{0}{sample-1}
+% \texdefinition{Sample}{0}{sample-2}
+% \texdefinition{Sample}{0}{sample-3}
+% \texdefinition{Sample}{0}{sample-4}
+%
+% You might have noticed that the right skip is always there but the left skip is
+% absent when it is zero. As said, as long as the result is okay, it does not
+% really matter. But \unknown\ in \LUATEX\ (and therefore \CONTEXT) it can have
+% consequences because there we can kick in a callback that does something with
+% lines. Such a callback often has to deal with these specific glues and them being
+% optional makes for more testing. The more predictable the order is, the better.
+% Although we can easily normalize lines (in a callback) to always have a left skip
+% too it is also an option in the engine.
+%
+% \texdefinition{Sample}{1}{sample-1}
+% \texdefinition{Sample}{1}{sample-2}
+% \texdefinition{Sample}{1}{sample-3}
+% \texdefinition{Sample}{1}{sample-4}
+%
+% In the previous examples there are always left skips as well as right skips. It
+% makes no sense to have an option to omit both zero left and right skips, because
+% that again is unpredictable. But we can go further.
+%
+% \texdefinition{Sample}{2}{sample-1}
+% \texdefinition{Sample}{2}{sample-2}
+% \texdefinition{Sample}{2}{sample-3}
+% \texdefinition{Sample}{2}{sample-4}
+%
+% In these examples the indentation has been turned into a glue as well (actually
+% it is more a kern but using a glue makes more sense). The hanging indentation
+% however is not seen here: it is not represented by glue but instead sort of
+% hidden in the width of the box and a shift of its content.
+%
+% \texdefinition{Sample}{3}{sample-1}
+% \texdefinition{Sample}{3}{sample-2}
+% \texdefinition{Sample}{3}{sample-3}
+% \texdefinition{Sample}{3}{sample-4}
+%
+% In the previous examples the hanging indentation is turned into left and right
+% hang skips. These cannot be set at the \TEX\ end, but are injected when we
+% instruct the normalizer to do so.
+%
+% \texdefinition{Sample}{4}{sample-1}
+% \texdefinition{Sample}{4}{sample-2}
+% \texdefinition{Sample}{4}{sample-3}
+% \texdefinition{Sample}{4}{sample-4}
+%
+% The previous examples differ from the previous set in that they push these hang
+% related glue nodes before the left and after the right skip. As I couldn't make
+% up my mind yet, I let \LUAMETATEX\ just provide both variants.
+%
+% The option to keep hang related information explicitly in the line has some
+% consequences. First of all, we now have glue and not some shift|/|width
+% combination. Second, we have introduced an incompatibility: the lines now always
+% have the proper width. You might have noticed that but we can show it more
+% explicitly. We use two parameter sets
+%
+% \startbuffer[sample-5]
+% \hangindent = 20pt
+% \hangafter = 0
+% \stopbuffer
+%
+% \startbuffer[sample-6]
+% \hangindent =-20pt
+% \hangafter = 0
+% \stopbuffer
+%
+% \Sample{0}{sample-5}
+% \Sample{4}{sample-5}
+%
+% \Sample{0}{sample-6}
+% \Sample{4}{sample-6}
+
+\texdefinition{Sample}{Sample 1}{sample-1}
+\texdefinition{Sample}{Sample 2}{sample-2}
+\texdefinition{Sample}{Sample 3}{sample-3}
+\texdefinition{Sample}{Sample 4}{sample-4}
+
+% A not yet mention part of the normalization is that, because they are no longer
+% of relevance, the special local par nodes have been removed. The one that starts
+% a paragraph is turned into a normal directional node if needed, so that we get
+% properly balanced pairs of directional nodes. It must been said that the code
+% that does all this is a bit of a mess. We want to stay close to the original
+% code, but we also need to deal with all these extensions, like directions,
+% protrusion, extra boxes, etc.
+%
+% Not shown here is that there is a fifth mode of operation. When we enable that
+% level an overfull box will get a correction skip so that the right skip etc are
+% properly aligned. How useful this is: we'll see.
+%
+% Now, when I decide to keep this feature, which can be set at the \LUA\ end to do
+% the previously mentioned tasks, depending on a feature level ranging from zero to
+% four, I also need to check the impact on existing \CONTEXT\ code, which
+% (currently) is complicated by the fact that most is shared between \MKIV\ and
+% \LMTX, and only \LUAMETATEX\ has this normalization feature. I will probably
+% enable it for a while locally in order to see if there are side effects. Then,
+% when the code base gets adapted, we have to assume that normalization happens, so
+% there is no way back.
\stopchapter
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex
new file mode 100644
index 00000000000..9b8e10a5601
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex
@@ -0,0 +1,365 @@
+% language=us
+
+\startcomponent evenmore-numbers
+
+\environment evenmore-style
+
+\startchapter[title={Numbers}]
+
+% \startsection[title={Introduction}]
+
+A few decades of programming in the \TEX\ language can make one wish for certain
+features. It will therefore be no surprise that in \LUATEX\ (and even more in
+\LUAMETATEX) we have some additional functionality. However, I have to admit that
+some of these are not used that much in \CONTEXT\ \MKIV\ and \LMTX. The reason is
+that some wishes date from \MKII\ times and because we now have \LUA\ we actually
+don't need that many new fancy features. Also, it makes no sense to rewrite
+mechanisms that are already working well. However, in order to fully exploit the
+possibilities that \LUA\ gives, there are some additions that relate to the way
+this language can communicate with \TEX. Of course there's also the issue of a
+potentially enhanced performance, but there is not much to gain in that
+department.
+
+A side effect of adding features, of which some are just there to complete the
+picture, or, as mentioned, because they were supposed to make sense, is that I
+make examples. Here I show the result of one of these experiments. I have no clue
+how useful this is, but I've learned not to underestimate users in their demands
+and creativity.
+
+Internally, \TEX\ does all in 32 bit integers. When you say:
+
+\starttyping
+\scratchcounter 123
+\scratchdimen 123pt
+\stoptyping
+
+the \type {123} gets assigned to a count register and the \type {123pt} is
+assigned to a dimen register but actually that is then also an integer: the
+internal unit of a dimen is a scaled point (sp) and only when its value is shown
+to the user, a real number can show up, followed by the \type {pt} unit. The
+precision is limited, so you can expect about four decimal positions precision
+here. There is no concept of a floating point number in \TEX, and the only case
+where a float gets used is in the final calculations of glue and even that only
+comes into play in the backend.
+
+So, although I don't really have an application for it in \CONTEXT\ (otherwise
+I'd already added a float data type to the engine), it sounded like a good idea
+to see if we could emulate float support. In the following examples the numbers
+are managed in \LUA\ and therefore they are global. I could make a local variant
+but why complicate matters. These macros start with \type {\lua} to make clear
+that they are not managed by \TEX.
+
+\startbuffer
+\luacardinal bar 123
+\luainteger bar -456
+\luafloat bar 123.456E-3
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We define \type {bar} three times. Each type gets its own hash, so from the
+perspective of \LUA\ its nature is kept: integer or double.
+
+\startbuffer
+\the\luacardinal bar \quad
+\the\luainteger bar \quad
+\the\luafloat bar
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Instead of decimal values, you can also use hexadecimal values (watch the \type
+{p} for exponents):
+
+\startbuffer
+\luacardinal bar 0x123
+\luainteger bar -0x456
+\luafloat bar 0x123.456p-3
+\stopbuffer
+
+\typebuffer \getbuffer
+
+So, now we get:
+
+\startbuffer
+\the\luacardinal bar \quad
+\the\luainteger bar \quad
+\the\luafloat bar
+\stopbuffer
+
+\getbuffer
+
+From these examples you see two kind of usage: setting a value, and using it. It
+is that property that makes them special. Because the macros are implemented
+using \LUA\ calls it means that at the \LUA\ end we know what usage is expected.
+And it is that dualistic property that I wanted to explore but that in the end
+only makes sense it a very few cases, but sometimes those few are important. We
+could of course two macros, a setter and a getter, but using one kind of its in.
+
+The setters accept an optional equal sign, as in:
+
+\startbuffer
+\luainteger gnu= 123456 \luafloat gnu= 123.456e12
+\luainteger gnu = 123456 \luafloat gnu = 123.456e12
+\luainteger gnu =123456 \luafloat gnu =123.456e12
+\stopbuffer
+
+\typebuffer
+
+Although \LUA\ is involved in picking up the value, storing it someplace, and
+retrieving it on demand, performance is pretty good. You probably won't notice
+the overhead anyway.
+
+The values that \type{\the} returns are serialized numbers. However, sometimes
+you want what \TEX\ sees as a numeric token, For that we have these variants
+
+\startbuffer
+\luadimen test 100pt
+\scratchdimen = .25 \luadimen test
+\the\scratchdimen
+\stopbuffer
+
+\typebuffer
+
+Which produces the expected value: {\tttf \inlinebuffer}, something that depends
+on the fact that the dimension is not a serialized. Talking of serialization,
+there are several ways that \LUA\ can do that so let's give some examples. We
+start with some definitions. Beware, floats and cardinals are stored
+independently!
+
+\startbuffer
+\luacardinal x = -123
+\luacardinal y = 456
+
+\luafloat x = 123.123
+\luafloat y = -456.456
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We have a macro \type {\luaexpression} (not to be confused with \type {\luaexpr}) that
+takes an optional keyword:
+
+\startbuffer
+- : \luaexpression {n.x + 2*n.y}
+f : \luaexpression float {n.x + 2*n.y}
+i : \luaexpression integer {n.x + 2*n.y}
+c : \luaexpression cardinal {n.x + 2*n.y}
+b : \luaexpression boolean {n.x + 2*n.y}
+l : \luaexpression lua {n.x + 2*n.y}
+\stopbuffer
+
+\typebuffer
+
+The serialization can be different for these cases:
+
+\startlines
+\tt \getbuffer
+\stoplines
+
+The \type {numbers} namespace resolves to a float, integer or cardinal (in that
+order) and calculations take place as in \LUA. If you only use integers then
+normally \LUA\ will also serialize them as such.
+
+Here is another teaser. Say that we set the \type {scratchdimen} register to
+a value:
+
+\startbuffer
+\scratchdimen 123.456pt
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We now introduce the \type {\nodimen} macro, that can be used this way:
+
+\startbuffer
+[\the\scratchdimen] [\the\nodimen\scratchdimen]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+which is not that spectacular. Nor is this:
+
+\startbuffer
+\nodimen\scratchdimen = 654.321pt
+\stopbuffer
+
+\typebuffer \getbuffer
+
+But how about this:
+
+\starttabulate[|T|T|]
+\NC \type {\the\nodimen bp \scratchdimen} \NC \the\nodimen bp \scratchdimen \NC \NR
+\NC \type {\the\nodimen cc \scratchdimen} \NC \the\nodimen cc \scratchdimen \NC \NR
+\NC \type {\the\nodimen cm \scratchdimen} \NC \the\nodimen cm \scratchdimen \NC \NR
+\NC \type {\the\nodimen dd \scratchdimen} \NC \the\nodimen dd \scratchdimen \NC \NR
+\NC \type {\the\nodimen in \scratchdimen} \NC \the\nodimen in \scratchdimen \NC \NR
+\NC \type {\the\nodimen mm \scratchdimen} \NC \the\nodimen mm \scratchdimen \NC \NR
+\NC \type {\the\nodimen nc \scratchdimen} \NC \the\nodimen nc \scratchdimen \NC \NR
+\NC \type {\the\nodimen nd \scratchdimen} \NC \the\nodimen nd \scratchdimen \NC \NR
+\NC \type {\the\nodimen pt \scratchdimen} \NC \the\nodimen pt \scratchdimen \NC \NR
+\NC \type {\the\nodimen sp \scratchdimen} \NC \the\nodimen sp \scratchdimen \NC \NR
+\stoptabulate
+
+So here we have a curious mix of setter and getter. The setting part is not that
+interesting but we just provide it as convenience (and demo). Of course we can
+have 10 specific macros instead. Keep in mind that this is a low level macro, so
+it doesn't use the normal \CONTEXT\ user interface.
+
+A bit more complex are one or two dimensional arrays. Again this is an example
+implementation where users can come up with more ideas.
+
+\startbuffer
+\newarray name integers type integer nx 2 ny 2
+\newarray name booleans type boolean nx 2 ny 2
+\newarray name floats type float nx 2 ny 2
+\newarray name dimensions type dimension nx 4
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Here we define three two|-|dimensional assays and one one|-|dimensional
+array. The type determines the initialization as well as the scanner and
+serializer. Values can be set as follows:
+
+\startbuffer
+\arrayvalue integers 1 2 4 \arrayvalue integers 2 1 8
+\arrayvalue booleans 1 2 true \arrayvalue booleans 2 1 true
+\arrayvalue floats 1 2 12.34 \arrayvalue floats 2 1 34.12
+\arrayvalue dimensions 1 12.34pt \arrayvalue dimensions 3 34.12pt
+\stopbuffer
+
+\typebuffer \getbuffer
+
+If you want to check an array on the console, you can say:
+
+\starttyping
+\showarray integers
+\stoptyping
+
+We now access some values. Apart from the float these are (sort of) native data
+types.
+
+\startbuffer
+[\the\arrayvalue integers 1 2]
+[\the\arrayvalue booleans 1 2]
+[\the\arrayvalue floats 1 2]
+[\the\arrayvalue dimensions 1 ]\crlf
+[\the\arrayvalue integers 2 1]
+[\the\arrayvalue booleans 2 1]
+[\the\arrayvalue floats 2 1]
+[\the\arrayvalue dimensions 3]
+\stopbuffer
+
+\typebuffer
+
+This produces:
+
+\getbuffer
+
+You can of course use these values in many ways:
+
+\startbuffer
+\dostepwiserecurse{1}{4}{1}{
+ [\the\arrayvalue dimensions #1 :
+ \luaexpression dimen {math.sind(30) * a.dimensions[#1]}]
+}
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+\getbuffer
+
+In addition to the already seen integer and dimension variables fed back into
+\TEX, we also have booleans. These are just integers with the value zero or one.
+In order to make their use easier there is a new \type {\ifboolean} primitive
+that takes such a bit:
+
+\startbuffer
+slot 1 is \ifboolean\arrayequals dimensions 1 0pt zero \else not zero \fi
+slot 2 is \ifboolean\arrayequals dimensions 2 0pt zero \else not zero \fi
+\stopbuffer
+
+\typebuffer
+
+We get:
+
+\startlines
+\getbuffer
+\stoplines
+
+A variant is a comparison macro. Of course we can use the dimen comparison
+conditional instead:
+
+\startbuffer
+slot 1: \ifcase\arraycompare dimensions 1 3pt lt \or eq \else gt \fi zero
+slot 2: \ifcase\arraycompare dimensions 2 3pt lt \or eq \else gt \fi zero
+slot 3: \ifcase\arraycompare dimensions 3 3pt lt \or eq \else gt \fi zero
+slot 4: \ifcase\arraycompare dimensions 4 3pt lt \or eq \else gt \fi zero
+
+slot 1: \ifcmpdim\arrayvalue dimensions 1 3pt lt \or eq \else gt \fi zero
+slot 2: \ifcmpdim\arrayvalue dimensions 2 3pt lt \or eq \else gt \fi zero
+slot 3: \ifcmpdim\arrayvalue dimensions 3 3pt lt \or eq \else gt \fi zero
+slot 4: \ifcmpdim\arrayvalue dimensions 4 3pt lt \or eq \else gt \fi zero
+\stopbuffer
+
+\typebuffer
+
+We get:
+
+\startlines
+\getbuffer
+\stoplines
+
+Anyway, the question is: do we need this kind of trickery, and if so, what more
+is needed? But beware: we do have \LUA\ anyway, so there is no need for a complex
+user interface at the \TEX\ end just for the sake of it looking more \TEX. The
+above shows a bit what is possible.
+
+It is too soon to discuss the low level interface because it still evolves. After
+some initial experiments, I decided to follow a slightly different route, and
+often the third implementation starts to look what I like more.
+
+% \newarray name whatever type integer nx 100 ny 100
+%
+% \testfeatureonce{1}{
+% \dorecurse {100} {
+% \dorecurse {100} {
+% \scratchcounter \arrayvalue whatever ##1 ####1 \relax
+% }
+% }
+% } \elapsedtime
+
+% \startluacode
+% local whatever = { foo = true, bar = true }
+%
+% interfaces.implement {
+% name = "MyMatch",
+% public = true,
+% value = true,
+% actions = function(b)
+% -- we gobble spaces
+% return
+% tokens.functionvalues.boolean,
+% whatever[tokens.scanners.word(true)] or false
+% end,
+% }
+% \stopluacode
+%
+% [\ifboolean\MyMatch foo YES\else NOP\fi]
+% [\ifboolean\MyMatch rab YES\else NOP\fi]
+% [\ifboolean\MyMatch bar YES\else NOP\fi]
+% [\ifboolean\MyMatch oof YES\else NOP\fi]
+%
+% \def\Matched#1{\ifboolean\MyMatch #1 }
+%
+% [\ifcondition\Matched{oof}YES\else NOP\fi]
+% [\ifcondition\Matched{foo}YES\else NOP\fi]
+
+% \stopsection
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex
new file mode 100644
index 00000000000..b07378fae96
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex
@@ -0,0 +1,449 @@
+% language=us
+
+% This feature was done mid May 2020 with Alien Chatter (I really need to find the
+% original cd's) in the background.
+
+\environment evenmore-style
+
+\startcomponent evenmore-parameters
+
+\startchapter[title=Parameters]
+
+When \TEX\ reads input it either does something directly, like setting a
+register, loading a font, turning a character into a glyph node, packaging a box,
+or it sort of collects tokens and stores them somehow, in a macro (definition),
+in a token register, or someplace temporary to inject them into the input later.
+Here we'll be discussing macros, which have a special token list containing the
+preamble defining the arguments and a body doing the real work. For instance when
+you say:
+
+\starttyping[option=TEX]
+\def\foo#1#2{#1 + #2 + #1 + #2}
+\stoptyping
+
+the macro \type {\foo} is stored in such a way that it knows how to pick up the
+two arguments and when expanding the body, it will inject the collected arguments
+each time a reference like \type {#1} or \type {#2} is seen. In fact, quite
+often, \TEX\ pushes a list of tokens (like an argument) in the input stream and
+then detours in taking tokens from that list. Because \TEX\ does all its memory
+management itself the price of all that copying is not that high, although during
+a long and more complex run the individual tokens that make the forward linked
+list of tokens get scattered in token memory and memory access is still the
+bottleneck in processing.
+
+A somewhat simplified view of how a macro like this gets stored is the following:
+
+\starttyping
+hash entry "foo" with property "macro call" =>
+
+ match (# property stored)
+ match (# property stored)
+ end of match
+
+ match reference 1
+ other character +
+ match reference 2
+ other character +
+ match reference 1
+ other character +
+ match reference 2
+\stoptyping
+
+When a macro gets expanded, the scanner first collects all the passed arguments
+and then pushes those (in this case two) token lists on the parameter stack. Keep
+in mind that due to nesting many kinds of stacks play a role. When the body gets
+expanded and a reference is seen, the argument that it refers to gets injected
+into the input, so imagine that we have this definition:
+
+\starttyping[option=TEX]
+\foo#1#2{\ifdim\dimen0=0pt #1\else #2\fi}
+\stoptyping
+
+and we say:
+
+\starttyping[option=TEX]
+\foo{yes}{no}
+\stoptyping
+
+then it's as if we had typed:
+
+\starttyping[option=TEX]
+\ifdim\dimen0=0pt yes\else no\fi
+\stoptyping
+
+So, you'd better not have something in the arguments that messes up the condition
+parser! From the perspective of an expansion machine it all makes sense. But it
+also means that when arguments are not used, they still get parsed and stored.
+Imagine using this one:
+
+\starttyping[option=TEX]
+\def\foo#1{\iffalse#1\oof#1\oof#1\oof#1\oof#1\fi}
+\stoptyping
+
+When \TEX\ sees that the condition is false it will enter a fast scanning mode
+where it only looks at condition related tokens, so even if \type {\oof} is not
+defined this will work ok:
+
+\starttyping[option=TEX]
+\foo{!}
+\stoptyping
+
+But when we say this:
+
+\starttyping[option=TEX]
+\foo{\else}
+\stoptyping
+
+It will bark! This is because each \type {#1} reference will be resolved, so we
+effectively have
+
+\starttyping[option=TEX]
+\def\foo#1{\iffalse\else\oof\else\oof\else\oof\else\oof\else\fi}
+\stoptyping
+
+which is not good. On the other hand, since expansion takes place in quick
+parsing mode, this will work:
+
+\starttyping[option=TEX]
+\def\oof{\else}
+\foo\oof
+\stoptyping
+
+which actually is:
+
+\starttyping[option=TEX]
+\def\foo#1{\iffalse\oof\oof\oof\oof\oof\oof\oof\oof\oof\fi}
+\stoptyping
+
+So, a reference to an argument effectively is just a replacement. As long as you
+keep that in mind, and realize that while \TEX\ is skipping \quote {if} branches
+nothing gets expanded, you're okay.
+
+Most users will associate the \type {#} character with macro arguments or
+preambles in low level alignments, but since most macro packages provide a higher
+level set of table macros the latter is less well known. But, as often with
+characters in \TEX, you can do magic things:
+
+\starttyping[option=TEX]
+\catcode`?=\catcode`#
+
+\def\foo #1#2?3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\par
+\def\foo ?1#2?3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\par
+\def\foo ?1?2#3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\par
+\stoptyping
+
+Here the question mark also indicates a macro argument. However, when expanded
+we see this as result:
+
+\starttyping
+macro:#1#2?3->?1?2?3 =>123
+macro:?1#2?3->?1?2?3 =>123
+macro:?1?2#3->#1#2#3 =>123
+\stoptyping
+
+The last used argument signal character (officially called a match character,
+here we have two that fit that category, \type {#} and \type {?}) is used in the
+serialization! Now, there is an interesting aspect here. When \TEX\ stores the
+preamble, as in our first example:
+
+\starttyping
+ match (# property stored)
+ match (# property stored)
+ end of match
+\stoptyping
+
+the property is stored, so in the later example we get:
+
+\starttyping
+ match (# property stored)
+ match (# property stored)
+ match (? property stored)
+ end of match
+\stoptyping
+
+But in the macro body the number is stored instead, because we need it as
+reference to the parameter, so when that bit gets serialized \TEX\ (or more
+accurately: \LUATEX, which is what we're using here) doesn't know what specific
+signal was used. When the preamble is serialized it does keep track of the last
+so|-|called match character. This is why we see this inconsistency in rendering.
+
+A simple solution would be to store the used signal for the match argument, which
+probably only takes a few lines of extra code (using a nine integer array instead
+of a single integer), and use that instead. I'm willing to see that as a bug in
+\LUATEX\ but when I ran into it I was playing with something else: adding the
+ability to prevent storing unused arguments. But the resulting confusion can make
+one wonder why we do not always serialize the match character as \type {#}.
+
+It was then that I noticed that the preamble stored the match tokens and not the
+number and that \TEX\ in fact assumes that no mixture is used. And, after
+prototyping that in itself trivial change I decided that in order to properly
+serialize this new feature it also made sense to always serialize the match token
+as \type {#}. I simply prefer consistency over confusion and so I caught two
+flies in one stroke. The new feature is indicated with a \type {#0} parameter:
+
+\startbuffer
+
+\bgroup
+\catcode`?=\catcode`#
+
+\def\foo ?1?0?3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\crlf
+\def\foo ?1#0?3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\crlf
+\def\foo #1#2?3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\crlf
+\def\foo ?1#2?3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\crlf
+\def\foo ?1?2#3{?1?2?3} \meaning\foo\space=>\foo{1}{2}{3}\crlf
+\egroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\start
+\getbuffer
+\stop
+
+So, what is the rationale behind this new \type{#0} variant? Quite often you
+don't want to do something with an argument at all. This happens when a macro
+acts upon for instance a first argument and then expands another macro that
+follows up but only deals with one of many arguments and discards the rest. Then
+it makes no sense to store unused arguments. Keep in mind that in order to use it
+more than once an argument does need to be stored, because the parser only looks
+forward. In principle there could be some optimization in case the tokens come
+from macros but we leave that for now. So, when we don't need an argument, we can
+avoid storing it and just skip over it. Consider the following:
+
+\startbuffer
+\def\foo #1{\ifnum#1=1 \expandafter\fooone\else\expandafter\footwo\fi}
+\def\fooone#1#0{#1}
+\def\footwo#0#2{#2}
+\foo{1}{yes}{no}
+\foo{0}{yes}{no}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We get:
+
+\getbuffer
+
+Just for the record, tracing of a macro shows that indeed there is no argument
+stored:
+
+\starttyping[option=TEX]
+\def\foo#1#0#3{....}
+\foo{11}{22}{33}
+\foo #1#0#3->....
+#1<-11
+#2<-
+#3<-33
+\stoptyping
+
+Now, you can argue, what is the benefit of not storing tokens? As mentioned
+above, the \TEX\ engines do their own memory management. \footnote {An added
+benefit is that dumping and undumping is relatively efficient too.} This has
+large benefits in performance especially when one keeps in mind that tokens get
+allocated and are recycled constantly (take only lookahead and push back).
+
+However, even if this means that storing a couple of unused arguments doesn't put
+much of a dent in performance, it does mean that a token sits somewhere in memory
+and that this bit of memory needs to get accessed. Again, this is no big deal on
+a computer where a \TEX\ job can take one core and basically is the only process
+fighting for \CPU\ cache usage. But less memory access might be more relevant in
+a scenario of multiple virtual machines running on the same hardware or multiple
+\TEX\ processes on one machine. I didn't carefully measure that so I might be
+wrong here. Anyway, it's always good to avoid moving around data when there is no
+need for it.
+
+Just to temper expectations with respect to performance, here are some examples:
+
+\starttyping[option=TEX]
+\catcode`!=9 % ignore this character
+\firstoftwoarguments
+ {!!!!!!!!!!!!!!!!!!!}{!!!!!!!!!!!!!!!!!!!}
+\secondoftwoarguments
+ {!!!!!!!!!!!!!!!!!!!}{!!!!!!!!!!!!!!!!!!!}
+\secondoffourarguments
+ {!!!!!!!!!!!!!!!!!!!}{!!!!!!!!!!!!!!!!!!!}
+ {!!!!!!!!!!!!!!!!!!!}{!!!!!!!!!!!!!!!!!!!}
+\stoptyping
+
+In \CONTEXT\ we define these macros as follows:
+
+\starttyping[option=TEX]
+\def\firstoftwoarguments #1#2{#1}
+\def\secondoftwoarguments #1#2{#2}
+\def\secondoffourarguments#1#2#3#4{#2}
+\stoptyping
+
+The performance of 2 million expansions is the following (probably half or less
+on a more modern machine):
+
+\starttabulate[||||]
+\BC macro \BC total \BC step \NC \NR
+\NC \type {\firstoftwoarguments} \NC 0.245 \NC 0.000000123 \NC \NR
+\NC \type {\secondoftwoarguments} \NC 0.251 \NC 0.000000126 \NC \NR
+\NC \type {\secondoffourarguments} \NC 0.390 \NC 0.000000195 \NC \NR
+\stoptabulate
+
+But we could use this instead:
+
+\starttyping[option=TEX]
+\def\firstoftwoarguments #1#0{#1}
+\def\secondoftwoarguments #0#2{#2}
+\def\secondoffourarguments#0#2#0#0{#2}
+\stoptyping
+
+which gives:
+
+\starttabulate[||||]
+\BC macro \BC total \BC step \NC \NR
+\NC \type {\firstoftwoarguments} \NC 0.229 \NC 0.000000115 \NC \NR
+\NC \type {\secondoftwoarguments} \NC 0.236 \NC 0.000000118 \NC \NR
+\NC \type {\secondoffourarguments} \NC 0.323 \NC 0.000000162 \NC \NR
+\stoptabulate
+
+So, no impressive differences, especially when one considers that when that many
+expansions happen in a run, getting the document itself rendered plus expanding
+real arguments (not something defined to be ignored) will take way more time
+compared to this. I always test an extension like this on the test suite
+\footnote {Currently some 1600 files that take 24 minutes plus or minus 30
+seconds to process on a high end 2013 laptop. The 260 page manual with lots of
+tables, verbatim and \METAPOST\ images takes around 11 seconds. A few
+milliseconds more or less don't really show here. I only time these runs because
+I want to make sure that there are no dramatic consequences.} as well as the
+\LUAMETATEX\ manual (which takes about 11 seconds) and although one can notice a
+little gain, it makes more sense not to play music on the same machine as we run
+the \TEX\ job, if gaining milliseconds is that important. But, as said, it's more
+about unnecessary memory access than about \CPU\ cycles.
+
+This extension is downward compatible and its overhead can be neglected. Okay,
+the serialization now always uses \type {#} but it was inconsistent before, so
+I'm willing to sacrifice that (and I'm pretty sure no \CONTEXT\ user cares or
+will even notice). Also, it's only in \LUAMETATEX\ (for now) so that other macro
+packages don't suffer from this patch. The few cases where \CONTEXT\ can benefit
+from it are easy to isolate for \MKIV\ and \LMTX\ so we can support \LUATEX\ and
+\LUAMETATEX.
+
+I mentioned \LUATEX\ and how it serializes, but for the record, let's see how
+\PDFTEX, which is very close to original \TEX\ in terms of source code, does it.
+If we have this input:
+
+\starttyping[option=TEX]
+\catcode`D=\catcode`#
+\catcode`O=\catcode`#
+\catcode`N=\catcode`#
+\catcode`-=\catcode`#
+\catcode`K=\catcode`#
+\catcode`N=\catcode`#
+\catcode`U=\catcode`#
+\catcode`T=\catcode`#
+\catcode`H=\catcode`#
+
+\def\dek D1O2N3-4K5N6U7T8H9{#1#2#3 #4#6#7#8#9}
+
+{\meaning\dek \tracingall \dek don{}knuth}
+\stoptyping
+
+The meaning gets typeset as:
+
+\starttyping
+macro:D1O2N3-4K5N6U7T8H9->H1H2H3 H4H6H7H8H9don nuth
+\stoptyping
+
+while the tracing reports:
+
+\starttyping
+\dek D1O2N3-4K5N6U7T8H9->H1H2H3 H5H6H7H8H9
+D1<-d
+O2<-o
+N3<-n
+-4<-
+K5<-k
+N6<-n
+U7<-u
+T8<-t
+H9<-h
+\stoptyping
+
+The reason for the difference, as mentioned, is that the tracing uses the
+template and therefore uses the stored match token, while the meaning uses the
+reference match tokens that carry the number and at that time has no access to
+the original match token. Keeping track of that for the sake of tracing would not
+make sense anyway. So, traditional \TEX, which is what \PDFTEX\ is very close to,
+uses the last used match token, the \type {H}. Maybe this example can convince
+you that dropping that bit of log related compatibility is not that much of a
+problem. I just tell myself that I turned an unwanted side effect into a new
+feature.
+
+\subject{A few side notes}
+
+The fact that characters can be given a special meaning is one of the charming
+properties of \TEX. Take these two cases:
+
+\starttyping[option=TEX]
+\bgroup\catcode`\&=5 &\egroup
+\bgroup\catcode`\!=5 !\egroup
+\stoptyping
+
+In both lines there is now an alignment character used outside an alignment. And,
+in both cases the error message is similar:
+
+\starttyping
+! Misplaced alignment tab character &
+! Misplaced alignment tab character !
+\stoptyping
+
+So, indeed the right character is shown in the message. But, as soon as you ask
+for help, there is a difference: in the first case the help is specific for a tab
+character, but in the second case a more generic explanation is given. Just try
+it.
+
+The reason is an explicit check for the ampersand being used as tab character.
+Such is the charm of \TEX. I'll probably opt for a trivial change to be
+consistent here, although in \CONTEXT\ the ampersand is just an ampersand so no
+user will notice.
+
+There are a few more places where, although in principle any character can serve
+any purpose, there are hard coded assumptions, like \type {$} being used for
+math, so a missing dollar is reported, even if math started with another
+character being used to enter math mode. This makes sense because there is no
+urgent need to keep track of what specific character was used for entering math
+mode. An even stronger argument could be that \TEX ies expect dollars to be used
+for that purpose. Of course this works fine:
+
+\starttyping[option=TEX]
+\catcode`€=\catcode`$
+€ \sqrt{x^3} €
+\stoptyping
+
+But when we forget an \type {€} we get messages like:
+
+\starttyping
+! Missing $ inserted
+\stoptyping
+
+or more generic:
+
+\starttyping
+! Extra }, or forgotten $
+\stoptyping
+
+which is definitely a confirmation of \quotation {America first}. Of course we
+can compromise in display math because this is quite okay:
+
+\starttyping[option=TEX]
+\catcode`€=\catcode`$
+$€ \sqrt{x^3} €$
+\stoptyping
+
+unless of course we forget the last dollar in which case we are told that
+
+\starttyping
+! Display math should end with $$
+\stoptyping
+
+so no matter what, the dollar wins. Given how ugly the Euro sign looks I can live
+with this, although I always wonder what character would have been taken if \TEX\
+was developed in another country.
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex
new file mode 100644
index 00000000000..d0cc29db11f
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex
@@ -0,0 +1,425 @@
+% language=us
+
+\environment evenmore-style
+
+\startcomponent evenmore-parsing
+
+\startchapter[title=Parsing]
+
+The macro mechanism is \TEX\ is quite powerful and once you understand the
+concept of mixing parameters and delimiters you can do a lot with it. I assume
+that you know what we're talking about, otherwise quit reading. When grabbing
+arguments, there are a few catches.
+
+\startitemize
+\startitem
+ When they are used, delimiters are mandate: \TEX\ will go on reading an
+ argument till the (current) delimiter condition is met. This means that when
+ you forget one you end up with way more in the argument than expected or even
+ run out of input.
+\stopitem
+\startitem
+ Because specified arguments and delimiters are mandate, when you want to
+ parse input, you often need multi|-|step macros that first pick up the to be
+ parsed input, and then piecewise fetch snippets. Bogus delimiters have to be
+ appended to the original in order to catch a run away argument and checking
+ has to be done to get rid of them when all is ok.
+\stopitem
+\stopitemize
+
+The first item can be illustrated as follows:
+
+\starttyping[option=TEX]
+\def\foo[#1]{...}
+\stoptyping
+
+When \type {\foo} gets expanded \TEX\ first looks for a \type{[} and then starts
+collecting tokens for parameter \type {#1}. It stops doing that when aa \type {]}
+is seen. So,
+
+\starttyping[option=TEX]
+\starttext
+ \foo[whatever
+\stoptext
+\stoptyping
+
+will for sure give an error. When collecting tokens, \TEX\ doesn't expand them so
+the \type {\stoptext} is just turned into a token that gets appended.
+
+The second item is harder to explain (or grasp):
+
+\starttyping[option=TEX]
+\def\foo[#1=#2]{(#1/#2)}
+\stoptyping
+
+Here we expect a key and a value, so these will work:
+
+\starttyping[option=TEX]
+\foo[key=value]
+\foo[key=]
+\stoptyping
+
+while these will fail:
+
+\starttyping[option=TEX]
+\foo[key]
+\foo[]
+\stoptyping
+
+unless we have:
+
+\starttyping[option=TEX]
+\foo[key]=]
+\foo[]=]
+\stoptyping
+
+But, when processing the result, we then need to analyze the found arguments and
+correct for them being wrong. For instance, argument \type {#1} can become \type
+{]} or here \type {key]}. When indeed a valid key|/|value combination is given we
+need to get rid of the two \quote {fixup} tokens \type{=]}. Normally we will have
+multiple key|/|value pairs separated by a comma, and in practice we only need to
+catch the missing equal because we can ignore empty cases. There are plenty of
+examples (rather old old code but also more modern variants) in the \CONTEXT\
+code base.
+
+I will now show some new magic that is available in \LUAMETATEX\ as experimental
+code. It will be tested in \LMTX\ for a while and might evolve in the process.
+
+\startbuffer
+\def\foo#1=#2,{(#1/#2)}
+
+\foo 1=2,\ignorearguments
+\foo 1=2\ignorearguments
+\foo 1\ignorearguments
+\foo \ignorearguments
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Here we pick up a key and value separated by an equal sign. We end the input with
+a special signal command: \type {\ignorearguments}. This tells the parser to quit
+scanning. So, we get this, without any warning with respect to a missing
+delimiter of running away:
+
+\getbuffer
+
+The implementation is actually fairly simple and adds not much overhead.
+Alternatives (and I pondered a few) are just too messy, would remind me too much
+of those awful expression syntaxes, and definitely impact performance of macro
+expansion, therefore: a no|-|go.
+
+Using this new feature, we can implement a key value parser that does a sequence.
+The prototypes used to get here made only use of this one new feature and
+therefore still had to do some testing of the results. But, after looking at the
+code, I decided that a few more helpers could make better looking code. So this
+is what I ended up with:
+
+\startbuffer
+\def\grabparameter#1=#2,%
+ {\ifarguments\or\or
+ % (\whatever/#1/#2)\par%
+ \expandafter\def\csname\namespace#1\endcsname{#2}%
+ \expandafter\grabnextparameter
+ \fi}
+
+\def\grabnextparameter
+ {\expandafterspaces\grabparameter}
+
+\def\grabparameters[#1]#2[#3]%
+ {\def\namespace{#1}%
+ \expandafterspaces\grabparameter#3\ignorearguments\ignorearguments}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Now, this one actually does what the \CONTEXT\ \type {\getparameters} command
+does: setting variables in a namespace. Being a parameter driven macro package
+this kind of macros have been part of \CONTEXT\ since the beginning. There are
+some variants and we also need to deal with the multilingual interface. Actually,
+\MKIV\ (and therefore \LMTX) do things a bit different, but the same principles
+apply.
+
+The \type {\ignorearguments} quits the scanning. Here we need two because we
+actually quit twice. The \type {\expandafterspaces} can be implemented in
+traditional \TEX\ macros but I though it is nice to have it this way; the fact
+that I only now added it has more to do with cosmetics. One could use the already
+somewhat older extension \type {\futureexpandis} (which expands the second or
+third token depending seeing the first, in this variant ignoring spaces) or a
+bunch of good old primitives to do the same. The new conditional \type
+{\ifarguments} can be used to act upon the number of arguments given. It reflects
+the most recently expanded macro. There is also a \type {\lastarguments}
+primitive (that provides the number of arguments.
+
+So, what are the benefits? You might think that it is about performance, but in
+practice there are not that many parameter settings going on. When I process the
+\LUAMETATEX\ manual, only some 5000 times one or more parameters are set. And
+even in a way more complex document that I asked my colleague to run I was a bit
+disappointed that only some 30.000 cases were reported. I know of users who have
+documents with hundreds of thousands of cases, but compared to the rest of
+processing this is not where the performance bottleneck is. \footnote {Think of
+thousands of pages of tables with cell settings applied.} This means that a
+change in implementation like the above is not paying off in significantly better
+runtime: all these low level mechanisms in \CONTEXT\ have been very well
+optimized over the years. And faster machines made old bottlenecks go away
+anyway. Take this use case:
+
+\starttyping[option=TEX]
+\grabparameters
+ [foo]
+ [key0=value0,
+ key1=value1,
+ key2=value2,
+ key3=value3]
+\stoptyping
+
+After this, parameters can be accessed with:
+
+\starttyping[option=TEX]
+\def\getvalue#1#2{\csname#1#2\endcsname}
+\stoptyping
+
+used as:
+
+\starttyping[option=TEX]
+\getvalue{foo}{key2}
+\stoptyping
+
+which takes care of characters normally not permitted in macro names, like the
+digits in this example. Of course some namespace protection can be added, like
+adding a colon between the namespace and the key, but let's take just this one.
+
+Some 10.000 expansions of the grabber take on my machine 0.045 seconds while the
+original \type {\getparameters} takes 0.090 so although for this case we're twice
+as fast, the 0.045 difference will not be noticed on a real run. After all, when
+these parameters are set some action will take place. Also, we don't actually use
+this macro for collecting settings with the \type {\setupsomething} commands, so
+the additional overhead that is involved adds a baseline to performance that can
+turn any gain into noise. But some users might notice some gain. Of course this
+observation might change once we apply this trickery in more places than
+parameter parsing, because I have to admit that there might be other places in
+the support macros where we can benefit: less code, double performance, but these
+are all support macros that made sense in \MKII\ and not that much in \MKIV\ or
+\LMTX\ and are kept just for convenience and backward compatibility. Think of
+some list processing macros. So, as a kind of nostalgic trip I decided to rewrite
+some low level macros anyway, if only to see what is no longer used and|/|or to
+make the code base somewhat (c)leaner.
+
+Elsewhere I introduce the \type {#0} argument indicator. That one will just
+gobbles the argument and does not store a token list on the stack. It saves some
+memory access and token recycling when arguments are not used. Another special
+indicator is \type {#+}. That one will flag an argument to be passed as|-|is. The
+\type {#-} variant will simply discard an argument and move on. The following
+examples demonstrate this:
+
+\startbuffer
+\def\foo [#1]{\detokenize{#1}}
+\def\ofo [#0]{\detokenize{#1}}
+\def\oof [#+]{\detokenize{#1}}
+\def\fof[#1#-#2]{\detokenize{#1#2}}
+\def\fff[#1#0#3]{\detokenize{#1#3}}
+
+\meaning\foo\ : <\foo[{123}]> \crlf
+\meaning\ofo\ : <\ofo[{123}]> \crlf
+\meaning\oof\ : <\oof[{123}]> \crlf
+\meaning\fof\ : <\fof[123]> \crlf
+\meaning\fff\ : <\fof[123]> \crlf
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+This gives:
+
+{\tttf \getbuffer}
+
+% \getcommalistsize[a,b,c] \commalistsize\par
+% \getcommalistsize[{a,b,c}] \commalistsize\par
+
+When playing with new features like the one described here, it makes sense to use
+them in existing macros so that they get well tested. Some of the low level
+system files come in different versions: for \MKII, \MKIV\ and \LMTX. The \MKII\
+files often also have the older implementations, so they are also good for
+looking at the history. The \LMTX\ files can be leaner and meaner than the \MKIV\
+files because they use the latest features. \footnote {Some 70 primitives present
+in \LUATEX\ are not in \LUAMETATEX. On the other hand there are also about 70 new
+primitives. Of those gone, most concerned the backend, fonts or no longer
+relevant features from other engines. Of those new, some are really new
+primitives (conditionals, expansion magic), some control previously hardwired
+behaviour, some give access to properties of for instance boxes, and some are
+just variants of existing ones but with options for control.}
+
+When I was rewriting some of these low level \MKIV\ macros using the newer features,
+at some point I wondered why I still had to jump through some hoops. Why not just
+add some more primitives to deal with that? After all, \LUATEX\ and \LUAMETATEX\
+already have more primitives that are helpful in parsing, so a few dozen more lines
+don't hurt. As long as these primitives are generic and not that specific. In this
+particular case we talk about two new conditionals (in addition to the already
+present comparison primitives):
+
+\starttyping[option=TEX]
+\ifhastok <token> {<token list>}
+\ifhastoks {<token list>} {<token list>}
+\ifhasxtoks {<token list>} {<token list>}
+\stoptyping
+
+You can probably guess what they do from their names. The last one is the
+expandable variant of the second one. The first one is the fast one. When playing
+with these I decided to redo the set checker. In \MKII\ that one is done in good
+old \TEX, in \MKIV\ we use \LUA. So, how about going back to \TEX ?
+
+\starttyping[option=TEX]
+\ifhasxtoks {cd} {abcdef}
+\stoptyping
+
+This check is true. But that doesn't work well with a comma separated list, but
+there is a way out:
+
+\starttyping[option=TEX]
+\ifhasxtoks {,cd,} {,ab,cd,ef,}
+\stoptyping
+
+However, when I applied that a user reported that it didn't handle optional
+spaces before commas. So how do we deal with such optional characters tokens?
+
+\startbuffer
+\def\setcontains#1#2{\ifhasxtoks{,#1,}{,#2,}}
+
+\ifcondition\setcontains{cd}{ab,cd,ef}YES \else NO \fi
+\ifcondition\setcontains{cd}{ab, cd, ef}YES \else NO \fi
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We get:
+
+\getbuffer
+
+The \type {\ifcondition} is an old one. When nested in a condition it will be
+seen as an \type {\if...} by the fast skipping scanner, but when expanded it will
+go on and a following macro has to expand to a proper condition. That said, we
+can take care of the optional space by entering some new territory. Look at this:
+
+\startbuffer
+\def\setcontains#1#2{\ifhasxtoks{,\expandtoken 9 "20 #1,}{,#2,}}
+
+\ifcondition\setcontains{cd}{ab,cd,ef}YES \else NO \fi
+\ifcondition\setcontains{cd}{ab, cd, ef}YES \else NO \fi
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We get:
+
+\getbuffer
+
+So how does that work? The \type {\expandtoken} injects a space token with
+catcode~9 which means that it is in the to be ignored category. When a to be
+ignored token is seen, and the to be checked token is a character (letter, other,
+space or ignored) then the character code will be compared. When they match, we
+move on, otherwise we just skip over the ignored token (here the space).
+
+In the \CONTEXT\ code base there are already files that are specific for \MKIV\
+and \LMTX. The most visible difference is that we use the \type {\orelse}
+primitive to construct nicer test trees, and we also use some of the additional
+\type {\future...} and \type {\expandafter...} features. The extensions discussed
+here make for the most recent differences (we're talking end May 2020).
+
+After implementing this trick I decided to look at the macro definition mechanism
+one more time and see if I could also use this there. Before I demonstrate
+another next feature, I will again show the argument extensions, this time with
+a fourth variant:
+
+\startbuffer[definitions]
+\def\TestA#1#2#3{{(#1)(#2)(#3)}}
+\def\TestB#1#0#3{(#1)(#2)(#3)}
+\def\TestC#1#+#3{(#1)(#2)(#3)}
+\def\TestD#1#-#2{(#1)(#2)}
+\stopbuffer
+
+\typebuffer[definitions][option=TEX] \getbuffer[definitions]
+
+The last one specifies a to be thrashed argument: \type {#-}. It goes further
+than the second one (\type {#0}) which still keeps a reference. This is why in
+this last case the third argument gets number \type {2}. The meanings of these
+four are:
+
+\startlines \tttf
+\meaning\TestA
+\meaning\TestB
+\meaning\TestC
+\meaning\TestD
+\stoplines
+
+There are some subtle differences between these variants, as you can see from
+the following examples:
+
+\startbuffer[usage]
+\TestA1{\red 2}3
+\TestB1{\red 2}3
+\TestC1{\red 2}3
+\TestD1{\red 2}3
+\stopbuffer
+
+\typebuffer[usage][option=TEX]
+
+Here you also see the side effect of keeping the braces. The zero argument (\type
+{#0}) is ignored, and the thrashed argument (\type {#-}) can't even be accessed.
+
+\startlines \tttf \getbuffer[usage] \stoplines
+
+In the next example we see two delimiters being used, a comma and a space, but
+they have catcode~9 which flags them as ignored. This is a signal for the parser
+that both the comma and the space can be skipped. The zero arguments are still on
+the parameter stack, but the thrashed ones result in a smaller stack, not that
+the later matters much on today's machines.
+
+\startbuffer
+\normalexpanded {
+ \def\noexpand\foo
+ \expandtoken 9 "2C % comma
+ \expandtoken 9 "20 % space
+ #1=#2]%
+}{(#1)(#2)}
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+This means that the next tree expansions won't bark:
+
+\startbuffer
+\foo,key=value]
+\foo, key=value]
+\foo key=value]
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+or expanded:
+
+\startlines \tttf \getbuffer \stoplines
+
+Now, why didn't I add these primitives long ago already? After all, I already
+added dozens of new primitives over the years. To quote Andrew Cuomo, what
+follows now are opinions, not facts.
+
+Decades ago, when \TEX\ showed up, there was no Internet. I remember that I got
+my first copy on floppy disks. Computers were slow and memory was limited. The
+\TEX book was the main resource and writing macros was a kind of art. One could
+not look up solutions, so trial and error was a valid way to go. Figuring out
+what was efficient in terms of memory consumption and runtime was often needed
+too. I remember meetings where one was not taken serious when not talking in the
+right \quote {token}, \quote {node}, \quote {stomach} and \quote {mouth} speak.
+Suggesting extensions could end up in being told that there was no need because
+all could be done in macros or even arguments of the \quotation {who needs that}.
+I must admit that nowadays I wonder to what extend that was related to extensions
+taking away some of the craftmanship and showing off. In a way it is no surprise
+that (even trivial to implement) extensions never surfaced. Of course then the
+question is: will extensions that once were considered not of importance be used
+today? We'll see.
+
+Let's end by saying that, as with other experiments, I might port some of the new
+features in \LUAMETATEX\ to \LUATEX, but only after they have become stable and
+have been tested in \LMTX\ for quite a while.
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex
new file mode 100644
index 00000000000..8c1e3ccb047
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex
@@ -0,0 +1,456 @@
+% language=us
+
+% TODO: copy_node_list : return tail
+% TODO: grabnested
+
+\environment evenmore-style
+
+\startcomponent evenmore-tokens
+
+\startchapter[title=Tokens]
+
+{\em This is mostly a wrapup of some developments, and definitely not a tutorial.}
+
+Talking deep down \TEX\ is talking about tokens and nodes. Roughly spoken, from
+the perspective of the user, tokens are what goes in and stays in (as macro,
+token list of whatever) and nodes is what get produced and eventually results in
+output. A character in the input becomes one token (before expansion) and a
+control sequence like \type {\foo} also is turned into a token. Tokens can be
+linked into lists. This actually means that in the engine we can talk of tokens
+in two ways: the single item with properties that trigger actions, or as compound
+item with that item and a pointer to the next token (called link). In \LUA\ speak
+token memory can be seen as:
+
+\starttyping
+fixmem = {
+ { info, link },
+ { info, link },
+ { info, link },
+ { info, link },
+ ....
+}
+\stoptyping
+
+Both are 32 bit integers. The \type {info} is a combination of a command code (an
+operator) and a so called chr code (operand) and these determine its behaviour.
+For instance the command code can indicate an integer register and the chr code
+then indicates the number of that register. So, like:
+
+\starttyping
+fixmem = {
+ { { cmd, chr}, index_into_fixmem },
+ { { cmd, chr}, index_into_fixmem },
+ { { cmd, chr}, index_into_fixmem },
+ { { cmd, chr}, index_into_fixmem },
+ ....
+}
+\stoptyping
+
+
+In the following line the characters that make three words are tokens (letters),
+so are the space (spacer), the curly braces (begin- and endgroup token) and the
+bold face switch (which becomes one token which resolves to a token list of
+tokens that trigger actions (in this case switching to a bolder font).
+
+\starttyping
+foo {\bf bar} foo
+\stoptyping
+
+When \TEX\ reads a line of input tokens are expanded immediately but a sequence
+can also become part fo a macro body or token list. Here we have $3_{\type{foo}}
++ 1 + 1_{\type+{+} + 1_{\type{\bf}} + 3_{\type{bar}} + 1_{\type+}+} + 1 +
+3_{\type{foo}} = 14$ tokens.
+
+A control sequence normally starts with a backslash. Some are built in, these are
+called primitives, and others are defined by the macro package or the user. There
+is a lookup table that relates the tokenized control sequence to some action. For
+instance:
+
+\starttyping
+\def\foo{foo}
+\stoptyping
+
+creates an entry that leads (directly or following a hash chain) to the three
+letter token list. Every time the input sees \type {\foo} it gets resolved to
+that list via a hash lookup. However, once internalized and part of a token list,
+it is a direct reference. On the other hand,
+
+\starttyping
+\the\count0
+\stoptyping
+
+triggers the \type {\the} action that relates to this control sequence, which
+then reads a next token and operates on that. That next token itself expects a
+number as follow up. In the end the value of \type {\count0} is found and that
+one is also in the so called equivalent lookup table, in what \TEX\ calls
+specific regions.
+
+\starttyping
+equivalents = {
+ { level, type, value },
+ { level, type, value },
+ { level, type, value },
+ ...
+}
+\stoptyping
+
+The value is in most cases similar to the info (cmd & chr) field in fixmem, but
+one difference is that counters, dimensions etc directly store their value, which
+is why we sometimes need the type separately, for instance in order to reclaim
+memory for glue or node specifications. It sound complicated and it is, but as
+long as you get a rough idea we can continue. Just keep in mind that tokens
+sometimes get expanded on the fly, and sometimes just get stored.
+
+There are a lot of primitives and each has a unique info. The same is true for
+characters (each category has its own command code, so regular letters can be
+distinguished from other tokens, comment signs, math triggers etc). All important
+basic bits are in table of equivalents: macros as well as registers although the
+meaning of a macro and content of token lists lives in the fixmem table and
+the content of boxes in so called node lists (nodes have their own memory).
+
+In traditional \TEX\ the lookup table for primitives, registers and macros is as
+compact as can be: it is an array of so called 32 bit memory words. These can be
+divided into halfs and quarters, so in the source you find terms like \type
+{halfword} and \type {quarterword}. The lookup table is a hybrid:
+
+\starttyping
+[level 8] [type 8] [value 16] | [equivalent 32]
+[level 8] [type 8] [value 16] | [equivalent 32]
+[level 8] [type 8] [value 16] | [equivalent 32]
+...
+\stoptyping
+
+The mentioned counters and such are directly encoded in an equivalent and the
+rest is a combination of level, type and value. The level is used for the
+grouping, and in for instance \PDFTEX\ there can therefore be at most 255 levels.
+In \LUATEX\ we use a wider model. There we have 64 bit memory words which means
+that we have way more levels and don't need to have this dual nature:
+
+\starttyping
+[level 16] [type 16] [value 32]
+[level 16] [type 16] [value 32]
+[level 16] [type 16] [value 32]
+...
+\stoptyping
+
+We already showed a \LUA\ representation. The type in this table is what a
+command code is in an \quote {info} field. In such a token the integer encodes
+the command as well as a value (called chr). In the lookup table the type is the
+command code. When \TEX\ is dealing with a control sequences it looks at the
+type, otherwise it filters the command from the token integer. This means that a
+token cannot store an integer (or dimension), but the lookup table actually can
+do that. However, commands can limit the range, for instance characters are bound
+by what \UNICODE\ permits.
+
+Internally, \LUATEX\ still uses these ranges of fast accessible registers, like
+counters, dimensions and attributes. However, we saw that in \LUATEX\ they don't
+overlap with the level and type. In \LUATEX, at least till version 1.13 we still
+have the shadow array for levels but in \LUAMETATEX\ we just use those in the
+equivalents lookup table. If you look in the \PASCAL\ source you will notice that
+arrays run from \type {[somemin ... somemax]} which in the \CCODE\ source would
+mean using offsets. Actually, the shadow array starts at zero so we waste the
+part that doesn't need shadowing. It is good to remind ourselves that traditional
+\TEX\ is 8 bit character based.
+
+The equivalents lookup table has all kind of special ranges (combined into
+regions of similar nature, in \TEX\ speak), like those for lowercase mapping,
+specific catcode mappings, etc.\ but we're still talking of $n \times 256$
+entries. In \LUATEX\ all these mappings are in dedicated sparse hash tables
+because we need to support the full \UNICODE\ repertoire. This means that, while
+on the one hand \LUATEX\ uses more memory for the lookup table the number of
+slots can be less. But still there was the waste of the shadow level table: I
+didn't calculate the exact saving of ditching that one, but I bet it came close
+to what was available as total memory for programs and data on the first machines
+that I used for running \TEX. But \unknown\ after more than a decade of \LUATEX\
+we now reclaimed that space in \LUAMETATEX. \footnote {Don't expect a gain in
+performance, although using less memory might pay back on a virtual machine or
+when \TEX\ has to share the \CPU\ cache.}
+
+Now, in case you're interested (and actually I just write it down because I don't
+want to forget it myself) the lookup table in \LUAMETATEX\ is layout as follows
+
+\starttabulate
+\NC the hash table \NC \NC \NR
+\NC some frozen primitives \NC \NC \NR
+\NC current and defined fonts \NC one slot + many pointers \NC \NR
+\NC undefined control sequence \NC one slot \NC \NR
+\NC internal and register glue \NC pointer to node \NC \NR
+\NC internal and register muglue \NC pointer to node \NC \NR
+\NC internal and register toks \NC pointer to token list \NC \NR
+\NC internal and register boxes \NC pointer to node list \NC \NR
+\NC internal and register counts \NC value in token \NC \NR
+\NC internal and register attributes \NC value in token \NC \NR
+\NC internal and register dimens \NC value in token \NC \NR
+\NC some special data structures \NC pointer to node list \NC \NC \NR
+\NC the (runtime) extended hash table \NC \NC \NR
+\stoptabulate
+
+Normally a user doesn't need to know anything about these specific properties of
+the engine and it might comfort you to know that for a long time I could stay
+away from these details. One difference with the other engines is that we have
+internal variables and registers split more explicitly. The special data
+structures have their own slots and are not just put somewhere (semi random). The
+initialization is bit more granular in that we properly set the types (cmd codes)
+for registers which in turn is possible because for instance we're able to
+distinguish glue types. This is all part of coming up with a bit more consistent
+interface to tokens from the \LUA\ end. It also permits diagnostics.
+
+Anyway, we now are ready for some more details about tokens. You don't need to
+understand all of it in order to define decent macros. But when you are using
+\LUATEX\ and do want to mess around here is some insight. Assume we have defined
+these macros:
+
+\startluacode
+ local alsoraw = false
+ function documentdata.StartShowTokens(rawtoo)
+ context.starttabulate { "|T|rT|lT|rT|rT|rT|" .. (rawtoo and "rT|" or "") }
+ context.BC()
+ context.BC() context("cmd")
+ context.BC() context("name")
+ context.BC() context("chr")
+ context.BC() context("cs")
+ if rawtoo then
+ context.BC() context("rawchr")
+ end
+ context.BC() context.NR()
+ context.SL()
+ alsoraw = rawtoo
+ end
+ function documentdata.StopShowTokens()
+ context.stoptabulate()
+ end
+ function documentdata.ShowToken(name)
+ local cmd, chr, cs = token.get_cmdchrcs(name)
+ local _, raw, _ = token.get_cmdchrcs(name,true)
+ context.NC() context("\\string\\"..name)
+ context.NC() context(cmd)
+ context.NC() context(tokens.commands[cmd])
+ context.NC() context(chr)
+ context.NC() context(cs)
+ if alsoraw and chr ~= raw then
+ context.NC() context(raw)
+ end
+ context.NC() context.NR()
+ end
+\stopluacode
+
+\startbuffer
+\def\MacroA{a} \def\MacroB{b}
+\def\macroa{a} \def\macrob{b}
+\def\MACROa{a} \def\MACROb{b}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+How does that end up internally?
+
+\startluacode
+ documentdata.StartShowTokens(true)
+ documentdata.ShowToken("scratchcounterone")
+ documentdata.ShowToken("scratchcountertwo")
+ documentdata.ShowToken("scratchdimen")
+ documentdata.ShowToken("scratchtoks")
+ documentdata.ShowToken("scratchcounter")
+ documentdata.ShowToken("letterpercent")
+ documentdata.ShowToken("everypar")
+ documentdata.ShowToken("%")
+ documentdata.ShowToken("pagegoal")
+ documentdata.ShowToken("pagetotal")
+ documentdata.ShowToken("hangindent")
+ documentdata.ShowToken("hangafter")
+ documentdata.ShowToken("dimdim")
+ documentdata.ShowToken("relax")
+ documentdata.ShowToken("dimen")
+ documentdata.ShowToken("stoptext")
+ documentdata.ShowToken("MacroA")
+ documentdata.ShowToken("MacroB")
+ documentdata.ShowToken("MacroC")
+ documentdata.ShowToken("macroa")
+ documentdata.ShowToken("macrob")
+ documentdata.ShowToken("macroc")
+ documentdata.ShowToken("MACROa")
+ documentdata.ShowToken("MACROb")
+ documentdata.ShowToken("MACROc")
+ documentdata.StopShowTokens()
+\stopluacode
+
+We show the raw chr value but in the \LUA\ interface these are normalized to for
+instance proper register indices. This is because the raw numbers can for
+instance be indices into memory or some \UNICODE\ reference with catcode specific
+bits set. But, while these indices are real and stable, these offsets can
+actually change when the implementation changes. For that reason, in \LUAMETATEX\
+we can better talk of command codes as main indicator and:
+
+\starttabulate
+\NC subcommand \NC for tokens that have variants, like \type {\ifnum} \NC \NR
+\NC register indices \NC for the 64K register banks, like \type {\count0} \NC \NR
+\NC internal indices \NC for internal variables like \type {\parindent} \NC \NR
+\NC characters \NC specific \UNICODE\ slots combined with catcode \NC \NR
+\NC pointers \NC to token lists, macros, \LUA\ functions, nodes \NC \NR
+\stoptabulate
+
+This so called \type {cs} number is a pointer into the table of equivalents. That
+number results comes from the hash table. A macro name, when scanned the first
+time, is still a sequence of bytes. This sequence is used to compute a hash
+number, which is a pointer to a slot in the lower part of the hash (lookup)
+table. That slot points to a string and a next hash entry in the higher end. A
+lookup goes as follows:
+
+\startitemize[n,packed]
+ \startitem
+ compute the index into the hash table from the string
+ \stopitem
+ \startitem
+ goto the slot with that index and compare the \type {string} field
+ \stopitem
+ \startitem
+ when there is no match goto the slot indicated by the \type {next} field
+ \stopitem
+ \startitem
+ compare again and keep following \type {next} fields till there is no
+ follow up
+ \stopitem
+ \startitem
+ optionally create a new entry
+ \stopitem
+ \startitem
+ use the index of that entry as index in the table of equivalents
+ \stopitem
+\stopitemize
+
+So, in \LUA\ speak, we have:
+
+\starttyping
+hashtable = {
+ -- lower part, accessed via the calculated hash number
+ { stringpointer, nextindex },
+ { stringpointer, nextindex },
+ ...
+ -- higher part, accessed by following nextindex
+ { stringpointer, nextindex },
+ { stringpointer, nextindex },
+ ...
+}
+\stoptyping
+
+Eventually, after following a lookup chain in the hash tabl;e, we end up at
+pointer to the equivalents lookup table that we already discussed. From then on
+we're talking tokens. When you're lucky, the list is small and you have a quick
+match. The maximum initial hash index is not that large, around 64K (double that
+in \LUAMETATEX), so in practice there will often be some indirect
+(multi|-|compare) match but increasing the lower end of the hash table might
+result in less string comparisons later on, but also increases the time to
+calculate the initial hash needed for accessing the lower part. Here you can sort
+of see that:
+
+\startbuffer
+\dostepwiserecurse{`a}{`z}{1}{
+ \expandafter\def\csname whatever\Uchar#1\endcsname
+ {}
+}
+\dostepwiserecurse{`a}{`z}{1}{
+ \expandafter\let\csname somemore\Uchar#1\expandafter\endcsname
+ \csname whatever\Uchar#1\endcsname
+}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startluacode
+ documentdata.StartShowTokens(true)
+ for i=utf.byte("a"),utf.byte("z") do
+ documentdata.ShowToken("whatever"..utf.char(i))
+ documentdata.ShowToken("somemore"..utf.char(i))
+ end
+ documentdata.StopShowTokens()
+\stopluacode
+
+The command code indicates a macro and the action related to it is an expandable
+call. We have no sub command \footnote {We cheat a little here because chr
+actually is an index into token memory but we don't show them as such.} so that
+column shows zeros. The fifth column is the hash entry which can bring us back to
+the verbose name as needed in reporting while the last column is the index to
+into token memory (watch the duplicates for \type {\let} macros: a ref count is
+kept in order to be able to manage such shared references). When you look a the
+cs column you will notice that some numbers are close which (I think) in this
+case indicates some closeness in the calculated hash name and followed chain.
+
+It will be clear that it is best to not make any assumptions with respect to the
+numbers which is why, in \LUAMETATEX\ we sort of normalize them when accessing
+properties.
+
+\starttabulate
+\NC field \NC meaning \NC \NR
+\FL
+\NC command \NC operator \NC \NR
+\NC cmdname \NC internal name of operator \NC \NR
+\NC index \NC sanitized operand \NC \NR
+\NC mode \NC original operand \NC \NR
+\NC csname \NC associated name \NC \NR
+\NC id \NC the index in token memory (a virtual address) \NC \NR
+\NC tok \NC the integer representation \NC \NR
+\ML
+\NC active \NC true when an active character \NC \NR
+\NC expandable \NC true when expandable command \NC \NR
+\NC protected \NC true when a protected command \NC \NR
+\NC frozen \NC true when a frozen command \NC \NR
+\NC user \NC true when a user defined command \NC \NR
+\LL
+\stoptabulate
+
+When a control sequence is an alias to an existing primitive, for instance
+made by \type {\let}, the operand (chr) picked up from its meaning. Take this:
+
+\startbuffer
+\newif\ifmyconditionone
+\newif\ifmyconditiontwo
+
+ \meaning\ifmyconditionone \crlf
+ \meaning\ifmyconditiontwo \crlf
+ \meaning\myconditiononetrue \crlf
+ \meaning\myconditiontwofalse \crlf
+\myconditiononetrue \meaning\ifmyconditionone \crlf
+\myconditiontwofalse\meaning\ifmyconditiontwo \crlf
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Internally this is:
+
+\startluacode
+ documentdata.StartShowTokens(false)
+ documentdata.ShowToken("ifmyconditionone")
+ documentdata.ShowToken("ifmyconditiontwo")
+ documentdata.ShowToken("iftrue")
+ documentdata.ShowToken("iffalse")
+ documentdata.StopShowTokens()
+\stopluacode
+
+The whole list of available commands is given below. Once they are stable the \LUAMETATEX\ manual
+will document the accessors. In this chapter we use:
+
+\starttyping
+kind, min, max, fixedvalue token.get_range("primitive")
+cmd, chr, cs = token.get_cmdchrcs("primitive")
+\stoptyping
+
+The kind of command is given in the first column, which can have the following values:
+
+\starttabulate[|l|l|p|]
+\NC 0 \NC no \NC not accessible \NC \NR
+\NC 1 \NC regular \NC possibly with subcommand \NC \NR
+\NC 2 \NC character \NC the \UNICODE\ slot is encodes in the the token \NC \NR
+\NC 3 \NC register \NC this is an indexed register (zero upto 64K) \NC \NR
+\NC 4 \NC internal \NC this is an internal register (range given) \NC \NR
+\NC 5 \NC reference \NC this is a reference to a node, \LUA\ function, etc. \NC \NR
+\NC 6 \NC data \NC a general data entry (kind of private) \NC \NR
+\NC 7 \NC token \NC a token reference (that can have a followup) \NC \NR
+\stoptabulate
+
+\usemodule[system-tokens]
+
+\start \switchtobodyfont[7pt] \showsystemtokens \stop
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex
index 293753a797c..b351e8c681a 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex
@@ -20,6 +20,24 @@
\component evenmore-macros
\component evenmore-libraries
\component evenmore-whattex
+ \component evenmore-numbers
+ \component evenmore-parameters
+ \component evenmore-parsing
+ \component evenmore-tokens
+ \component evenmore-keywords
+
+ \startchapter[title=Paragraphs] {\em This chapter is not yet public.} \stopchapter
+ \startchapter[title=Hyphenation] {\em This chapter is not yet public.} \stopchapter
+ \startchapter[title=Bitwise] {\em This chapter is not yet public.} \stopchapter
+ \startchapter[title=Offloading] {\em This chapter is not yet public.} \stopchapter
+ \startchapter[title=Inserts] {\em This chapter is not yet public.} \stopchapter
+
+ % \component evenmore-paragraphs
+ % \component evenmore-hyphenation
+ % \component evenmore-bitwise
+ % \component evenmore-offloading
+ % \component evenmore-inserts
+
\stopbodymatter
\stopdocument
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex
index a0e67d4bed9..9e4b10662ba 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex
@@ -4,6 +4,12 @@
\environment followingup-style
+\logo[WLS] {WLS}
+\logo[INTEL] {Intel}
+\logo[APPLE] {Apple}
+\logo[UBUNTU] {Ubuntu}
+\logo[RASPBERRY] {RaspberryPi}
+
\startchapter[title={Compilation}]
Compiling \LUATEX\ is possible because after all it's what I do on my machine.
@@ -50,7 +56,7 @@ In retrospect I should have done that sooner because in a day I could get all
relevant platforms working. Flattening the source tree was a next step and so
there is no way back now. What baffled me (and Alan, who at some point joined in
testing \OSX) is the speed of compilation. My pretty old laptop needed about half
-a minute to get the job done and even on a raspberry pi with only a flash card
+a minute to get the job done and even on a \RASPBERRY\ with only a flash card
just a few minutes were needed. At that point, as we could remove more make
related files, the compressed 11 MB archive (\type {tar.xz}) shrunk to just over
2~MB. Interesting is that compiling \MPLIB\ takes most time, and when one compiles
@@ -79,6 +85,69 @@ equivalent for zero was made a bit more distinctive as we now have more subtypes
That is: all the subtypes were collected in enumerations instead of \CCODE\
defines. Back to the basics.
+End of 2020 I noticed that the binary had grown a bit relative to the mid 2020
+versions. This surprised me because some improvements actually made them smaller,
+something you notice when you compile a couple of times when doing these things.
+I also noticed that the platforms on the compile farm had quite a bit of
+variation. In most cases we're still below my 3MB threshold, but when for
+instance cross compiled binaries become a few hundred MB larger one can get
+puzzled. In the \LUAMETAFUN\ manual I have this comment at the top:
+
+\starttyping[style=\ttx]
+------------------------ ------------------------ ------------------------
+2019-12-17 32bit 64bit 2020-01-10 32bit 64bit 2020-11-30 32bit 64bit
+------------------------ ------------------------ ------------------------
+freebsd 2270k 2662k freebsd 2186k 2558k freebsd 2108k 2436k
+openbsd6.6 2569k 2824k openbsd6.6 2472k 2722k openbsd6.8 2411k 2782k
+linux-armhf 2134k linux-armhf 2063k linux-armhf 2138k 2860k
+linux 2927k 2728k linux 2804k 2613k linux (?) 3314k 2762k
+ linux-musl 2532k 2686k
+osx 2821k osx 2732k osx 2711k
+ms mingw 2562k 2555k ms mingw 2481k 2471k ms mingw 2754k 2760k
+ ms intel 2448k
+ ms arm 3894k
+ ms clang 2159k
+------------------------ ------------------------ ------------------------
+\stoptyping
+
+So why the differences? One possible answer is that the cross compiler now uses
+\GCC9 instead of \GCC8. It is quite likely that inlining code is done more
+aggressively (at least one can find remarks of that kind on the Internet). An
+interesting exception in this overview is the \LINUX\ 32 bit version. The native
+\WINDOWS\ binary is smaller than the \MINGW\ binary but the \CLANG\ variant is
+still smaller. For the native compilation we always enabled link time
+optimization, which makes compiling a bit slower but similar to regular
+compilation in \WLS\ but when for the other compilers we turn on link time
+optimization the linker takes quite some time. I just turn it off when testing
+code because it's no fun to wait these additional minutes with \GCC. Given that
+the native windows binary by now runs nearly as fast as the cross compiled ones,
+it is an indication that the native \WINDOWS\ compiler is quite okay. The numbers
+also show (for \WINDOWS) that using \CLANG\ is not yet an option: the binaries
+are smaller but also much slower and compilation (without link time optimization)
+also takes much longer. But we'll see how that evolves: the compile farm
+generates them all.
+
+So, what effects does link time optimization has? The (current) cross compiled
+binary is is some 60KB smaller and performs a little better. Some tests show
+some 3~percent gain but I'm pretty sure users won't notice that on a normal run.
+So, when we forget to enable it when we release new binaries, it's no big deal.
+
+Another end 2020 adventure was generating \ARM\ binaries for \OSX\ and \WINDOWS.
+This seems to work out well. The \OSX\ binaries were tested, but we don't have
+the proper hardware in the compile farm, so for now users have to use \INTEL\
+binaries on that hardware. Compiling the \LUAMETATEX\ manual on a 2020 M1 is a
+little more that twice as fast than on my 2013 i7 laptop running \WINDOWS. A
+native \ARM\ binary is about three times faster, which is what one expects from a
+more modern (also a bit performance hyped) chipset. On a \RASPBERRY\ with 4MB
+ram, an external \SSD\ on \USB3, running \UBUNTU\ 20, the manual compiles three
+times slower than on my laptop. So, when we limit conclusions to \LUAMETATEX\ it
+looks like \ARM\ is catching up: these modern chipsets (from \APPLE\ and
+\MICROSOFT, although the later was not yet tested) with plenty of cache, lots of
+fast memory, fast graphics and speedy disks are six times faster than a cheap
+media oriented \ARM\ chipset. Being a single core consumer, \LUAMETATEX\ benefits
+more from faster cores than from more cores. But, unless I have these machines
+on my desk these rough estimates have to do.
+
\stopchapter
\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex
new file mode 100644
index 00000000000..502370d7db1
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex
@@ -0,0 +1,711 @@
+% language=us
+
+\startcomponent followingup-fonts
+
+\environment followingup-style
+
+\startchapter[title={Scaled fonts}]
+
+\startsection[title={History}]
+
+The infrastructure for fonts makes up a large part of the code of any \TEX\ macro
+package. We have to go back in time to understand why. When \TEX\ showed up,
+fonts were collections of bitmaps and measures. There were at most 256 glyphs in
+a font and in order to do its job, \TEX\ needed to know (and still needs to know)
+the width, height and depth of glyphs. If you want ligatures it also needs to
+know how to construct them from the input and when you want kerning there has to
+be additional information about what neighboring glyphs need a kern in between.
+Math is yet another subtask that demands extra information, like chains of glyphs
+that grow in size and if needed even recipes of how to construct large shapes
+from smaller ones.
+
+Fonts come in sizes. Latin Modern and the original Computer Modern, for instance,
+have quite a few variants where the shapes are adapted to the size. This means
+that when you need a 9pt regular shape alongside a 12pt one, two fonts have to be
+loaded. This is quite visible in math where we have three related sizes: text,
+script and scriptscript, grouped in so called families. When we scale the digit~2
+to the same height you will notice that the text, script and scriptscript sizes
+look different (the last three are unscaled):
+
+\startlinecorrection
+\dontleavehmode\scale[frame=on,height=5ex]{$\textstyle 2$}\quad
+\dontleavehmode\scale[frame=on,height=5ex]{$\scriptstyle 2$}\quad
+\dontleavehmode\scale[frame=on,height=5ex]{$\scriptscriptstyle 2$}\quad\quad
+\dontleavehmode\scale[frame=on,height=2ex]{$\textstyle 2$}\quad
+\dontleavehmode\scale[frame=on,height=2ex]{$\scriptstyle 2$}\quad
+\dontleavehmode\scale[frame=on,height=2ex]{$\scriptscriptstyle 2$}\quad\quad
+\dontleavehmode\scale[frame=on,width=4em]{\colored[r=.6,a=1,t=.5]{$\textstyle 2$}}\hskip-4em
+\dontleavehmode\scale[frame=on,width=4em]{\colored[g=.6,a=1,t=.5]{$\scriptstyle 2$}}\hskip-4em
+\dontleavehmode\scale[frame=on,width=4em]{\colored[b=.6,a=1,t=.5]{$\scriptscriptstyle 2$}}\quad\quad
+\dontleavehmode{$\textstyle 2$}\quad
+\dontleavehmode{$\scriptstyle 2$}\quad
+\dontleavehmode{$\scriptscriptstyle 2$}\quad
+\stoplinecorrection
+
+Plenty has been written (in various documents that come with \CONTEXT) about how
+this all works together and how it impacts the design of the system, so here I
+just give a short summary of what a font system has to deal with.
+
+\startitemize
+\startitem
+ In a bodyfont setup different sizes (9pt, 10pt, 12pt) can have their own
+ specific set of fonts. This can result in quite a number of definitions that
+ relate to the style, like regular, bold, italic, bold italic, slanted, bold
+ slanted, etc. When possible loading the fonts is delayed. In \CONTEXT\ often
+ the number of fonts that are actually loaded is not that large.
+\stopitem
+\startitem
+ Some font designs have different shapes per bodyfont size. A minor
+ complication is that when one is missing some heuristic best|-|match choice
+ might be needed. Okay, in practice only Latin Modern falls into this category
+ for \CONTEXT. Maybe \OPENTYPE\ variable fonts can be seen this way, but,
+ although we supported that right from the start, I haven't noticed much
+ interest in the \TEX\ community.
+\stopitem
+\startitem
+ Within a bodyfont size we distinguish size variants. We can go smaller (x and
+ xx), for instance when we use sub- and superscripts in text, or we can go
+ larger, for instance in titles (a, b, c, d, \unknown). Fortunately most of
+ the loading of these can be delayed too.
+\stopitem
+\startitem
+ When instances are not available, scaling can be used, as happens for
+ instance with 11pt in Computer Modern. Actually, this is why in \CONTEXT\ we
+ default to 12pt, because the scaled versions didn't look as nice as the
+ others (keep in mind that we started in the age of bitmaps).
+\stopitem
+\startitem
+ Special features, such as smallcaps or oldstyle numerals, can demand their own
+ definitions. More loading and automatic definitions can be triggered by sizes
+ needed in, e.g., scripts and titles.
+\stopitem
+\startitem
+ A document can have a mixed setup, that is: using different font
+ designs within one
+ document, so some kind of namespace subsystem is needed.
+\stopitem
+\startitem
+ In an eight|-|bit font world, we not only have text fonts but also collections
+ of symbols, and even in math there are additional symbol collections. In
+ \OPENTYPE\ symbols end up in text fonts, but there we have tons of emojis
+ and color fonts. All has to be dealt with in an integrated way. And we're
+ not even talking of virtual fonts, (runtime) \METAPOST\ generated fonts, and
+ so on.
+\stopitem
+\startitem
+ In traditional eight|-|bit engines, hyphenation depends on a font's encoding,
+ which can require loading a font multiple times in different encodings. This
+ depends on the language mix used. A side point is that defining a European
+ encoding covering most Latin languages was not that hard, especially when one
+ keeps in mind that many eight|-|bit encodings waste slots on seldom used
+ symbols, but by that time \OPENTYPE\ and \UNICODE\ input started to dominate.
+\stopitem
+\startitem
+ In the more modern \OPENTYPE\ fonts combinations of features can demand
+ additional instances: one can think of language|/|script combinations,
+ substitutions in base mode, special effects like emboldening, color fonts,
+ etc.
+\stopitem
+\startitem
+ Math is complicated by the fact that in traditional \TEX, alphabets come from
+ different fonts, which is why we have many so|-|called families; a font can
+ have several alphabets which means that some mapping can be needed. Operating
+ on the size, shape, encoding and style axes puts some demands on the font
+ system. Add to this the (often) partial (due to lack of fonts) bold support
+ and it gets even more complicated. In \OPENTYPE\ all the alphabets come from
+ one font.
+\stopitem
+\startitem
+ There is additional math auto|-|definition and loading code for the sizes
+ used in text scripts and titles.
+\stopitem
+\stopitemize
+
+All this has resulted in a pretty complex subsystem. Although going \OPENTYPE\
+(and emulated \OPENTYPE\ with \TYPEONE\ fonts as we do in \MKIV) removes some
+complications, like encodings, it also adds complexity because of the many
+possible font features, either dependent or not on script and language. Text as
+well as math got simpler in the \TEX\ code, though that was traded for quite a
+bit of \LUA\ code to deal with new features.
+
+So, in order to let the font subsystem not impact performance too much, let alone
+extensive memory usage, the \CONTEXT\ font subsystem is rather optimized. The
+biggest burden comes from fonts that have a dynamic (adaptive) definition because
+then we need to do quite a bit of testing per font switch, but even that has
+always been rather fast.
+
+\stopsection
+
+\startsection[title={Reality}]
+
+In \MKIV\ and therefore also in \LUAMETATEX\ (\LMTX) more font magic happens. The
+initial node lists that make up a box or paragraph can get manipulated in several
+ways and often fonts are involved. The font features (smallcaps, oldstyle,
+alternates, etc.)\ can be defined as static (part of the definition) or as
+dynamic (resolved on the spot at the cost of some overhead). Characters can be
+remapped, fonts can be replaced. The math subsystem in \MKIV\ was different right
+from the start: we use a limited number of families (regular, bold, l2r and r2l),
+and stay abstract till the moment we need to deal with the specific alphabets.
+But still, in \MKIV, we have the families with three fonts.
+
+In the \LUAMETATEX\ manual we show some math magic for different fonts. As a side
+effect, we set up half a dozen bodyfont collections: Lucida, Pagella, Latin
+Modern, Dejavu, the math standard Cambria, etc. Even with delayed and shared font
+loading, we end up with 158 instances but quite a few of them are math fonts, at
+least six per bodyfont size: regular and bold (emboldened) text, script and
+scriptscript. Of course most are just copies with different scaling that reuse
+already loaded resources. In the final \PDF\ we have 21 subsetted fonts.
+
+If we look at the math fonts that we use today, there is however quite some
+overlap. It starts with a text font. From that, script and scriptscript variants
+are derived, but often these variants use many text size related shapes too. Some
+shapes get alternatives (from the \type {ssty} feature), and the whole clone gets
+scaled. But, much of the logic of, for instance, extensibles is the same.
+
+A similar situation happens with large \CJK\ fonts: there are hardly any advanced
+features involved there, so any size is basically a copy with scaled dimensions,
+and these fonts can be truly huge!
+
+When we talk about features, in many cases in \CONTEXT\ you don't define them as
+part of the font. For instance small caps can best be triggered by using a
+dynamic feature: applied to a specific stretch of text. In fact, often features
+like superiors of fractions only work well on characters that fit the bill and
+produce weird side effects otherwise (a matter of design completeness). When the
+font handler does its work there are actually four cases: no features get applied
+(something that happens with, for instance, most monospaced fonts); base mode is
+used (which means that the \TEX\ machinery takes care of constructing ligatures
+and injecting kerns); and node mode (where \LUA\ handles the features). The
+fourth case is a special case of node mode where a different feature set is
+applied. \footnote {We also have so|-|called plug mode where an external renderer
+can do the work but that one is only around due to some experiments during Idris
+Hamid's font development.} At the cost of some extra overhead (for each node mode
+run) dynamic features are quite powerful and save quite a lot of memory and
+definitions. \footnote {The generic font handler that is derived from the
+\CONTEXT\ one doesn't implement this, so it runs a little faster.} The overhead
+comes from much more testing regarding the font we deal with because suddenly the
+same font can demand different treatments, depending on what dynamic features are
+active. \footnote {Originally this model was introduced for a dynamic paragraph
+optimization subsystem for Arabic but in practice no one uses it because there
+are no suitable fonts.}
+
+Although the font handling is responsible for much of the time spent in \LUA, it
+is still reasonable given what has to be done. Because we have an extensible
+system, it's often the extensions that takes additional runtime. Flexibility
+comes at a price.
+
+\stopsection
+
+\startsection[title={Progress}]
+
+At some point I started playing with realtime glyph scaling. Here realtime means
+that it doesn't depend on the font definition. To get an idea, here is an example
+(all examples are additionally scaled for \TUGBOAT):
+
+\startbuffer
+test {\glyphxscale 2500 test} test
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+The glyphs in the current font get scaled horizontally without the need for an
+extra font instance. Now, this kind of trickery puts some constraints on the font
+handling, as is demonstrated in the next example. We use Latin Modern because
+that font has all these ligatures:
+
+\startbuffer
+\definedfont[lmroman10-regular*default]%
+e{\glyphxscale 2500 ff}icient
+ef{\glyphxscale 2500 f}icient
+ef{\glyphxscale 2500 fi}cient
+e{\glyphxscale 2500 ffi}cient
+\stopbuffer
+
+\typebuffer
+
+{\getbuffer}
+
+In order to deal with this kind of scaling, we now operate not only on the font
+(id) and dynamic feature axes, but also on the scales, of which we have three
+variants: glyph scale, glyph xscale and glyph yscale. There is actually also a
+state dimension but we omit that for now (think of flagging glyphs as initial or
+final). This brings the number of axis to six. It is important to stress that in
+these examples the same font instance is used!
+
+Just for the record: several approaches to switching fonts are possible but for
+now we stick to a simple font id switch plus glyph scale settings at the \TEX\
+end. A variant would be to introduce a new mechanism where id's and scales go
+together but for now I see no real gain in that.
+
+\stopsection
+
+\startsection[title={Math}]
+
+Given what has been discussed in the previous sections, a logical question would
+be \quotation {Can we apply scaling to math?} and the answer is \quotation {Yes,
+we can!}. We can even go a bit further and that is partly due to some other
+properties of the engine.
+
+From \PDFTEX\ the \LUATEX\ engines inherited character protrusion and glyph
+expansions, aka hz. However, where in \PDFTEX\ copies of the font are made that
+carry the expanded dimensions, in \LUATEX\ at some point this was replaced by an
+expansion field in the glyph and kern nodes. So, instead of changing the font id
+of expanded glyphs, the same id is used but with the applied expansion factor set
+in the glyph. A side effect was that in places where dimensions are needed, we
+call functions that calculate the expanded widths on request (as these can change
+during linebreak calculations) in combination with accessing font dimensions
+directly. This level of abstraction is even more present in \LUAMETATEX. This
+means that we have an uniform interface to fonts and as a side effect scaling
+need be dealt with in only a few places in the code.
+
+Now, in math we have a few more complications. First of all, we have three sizes
+to consider and we also have lots of parameters that depend on the size. But, as
+I wanted to be able to apply scaling to math, the whole machinery was also
+abstracted in a way that, at the cost of some extra overhead, made it easier to
+work with scaled glyph properties. This means that we can stick to loading only
+one bodyfont size of math (note that each math family has three sizes, where the
+script and script sizes can have different, fine tuned, shapes) and just scale
+that on demand.
+
+Once all that was in place it was a logical next step to see if we could stick to
+just a single instance. Because in \LUAMETATEX\ we try to load fonts efficiently
+we store only the minimally needed information at the \TEX\ end. A font with no
+math therefore has less data per glyph. Again, this brings some abstraction that
+helped to implement the one instance mechanism. A math glyph has optional lists
+of increasing sizes and vertical or horizontal extensibles. So what got added was
+an optional chain of smaller sizes. If a character has three different glyphs for
+the three sizes, the text glyph has a pointer to the script glyph which in turn
+has a pointer to the scriptscript glyph. This means that when the math engine
+needs a specific character at a given size (text, script, scriptscript) we just
+follow that chain.
+
+In an \OPENTYPE\ math font the script and scriptscript sizes are specified as
+percentages of the text size. When the dimensions of a glyph are needed, we just
+scale on the fly. Again this adds some overhead but I'm pretty sure that no user
+will notice.
+
+So, to summarize: if we need a character at scriptscript size, we access the text
+size glyph, check for a pointer to a script size, go there, and again check for a
+smaller size. We use only what fits the bill. And, when we need dimensions we
+just scale. In order to scale we need the relative size, so we need to set that
+up when we load the font. Because in \CONTEXT\ we also can assemble a virtual
+\OPENTYPE\ font from \TYPEONE\ fonts, it was actually that (old) compatibility
+feature, the one that implements \TYPEONE\ based on \OPENTYPE\ math, that took
+the most time to adapt, not so much because it is complicated but because in
+\LMTX\ we have to bypass some advanced loading mechanisms. Because we can scale
+in two dimensions the many (font|-|related) math parameters also need to be dealt
+with accordingly.
+
+The end result is that for math we now only need to define two fonts per bodyfont
+setup: regular and bold at the natural scale (normally 10pt) and we share these
+for all sizes. As a result of this and what we describe in the next section, the
+158 instances for the \LUAMETATEX\ manual can be reduced to~30.
+
+
+\stopsection
+
+\startsection[title={Text}]
+
+Sharing instances in text mode is relatively simple, although we do have to keep
+in mind that scaling is an extra axis when dealing with font features: two
+neighboring glyphs with the same font id and dynamics but with different scales
+are effectively from different fonts.
+
+Another complication is that when we use font fallbacks (read:\ take missing
+glyphs from another font) we no longer have a dedicated instance but use a shared
+one. This in itself is not a problem but we do need to handle specified relative
+scales. This was not that hard to patch in \CONTEXT\ \LMTX.
+
+We can enforce aggressive font sharing with:
+
+\starttyping
+\enableexperiments[fonts.compact]
+\stoptyping
+
+After that we often use fewer instances. Just to give an idea, on the \LUAMETATEX\
+manual we get these stats:
+
+\starttyping
+290 pages, 10.8 sec, 292M lua, 99M tex, 158 instances
+290 pages, 9.5 sec, 149M lua, 35M tex, 30 instances
+\stoptyping
+
+So, we win on all fronts when we use this glyph scaling mechanism. The magic
+primitive that deals with this is named \type {\glyphscale}; it accepts a
+number, where \type {1200} and \type {1.2} both mean scaling to 20\percent\ more
+than normal. But it's best not to use this primitive directly.
+
+A specific scaled font can be defined using the \type {\definefont} command. In
+\LMTX\ a regular scaler can be followed by two scale factors. The next example
+demonstrates this (as can be seen, the \type {yoffset} affects the baseline):
+
+\startbuffer
+\definefont[FooA][Serif*default @ 12pt 1800 500]
+\definefont[FooB][Serif*default @ 12pt 0.85 0.4]
+\definefont[FooC][Serif*default @ 12pt]
+
+\definetweakedfont[runwider] [xscale=1.5]
+\definetweakedfont[runtaller][yscale=2.5,xscale=.8,yoffset=-.2ex]
+
+{\FooA test test \runwider test test \runtaller test test}\par
+{\FooB test test \runwider test test \runtaller test test}\par
+{\FooC test test \runwider test test \runtaller test test}\par
+\stopbuffer
+
+\typebuffer
+
+We also use the new \type {\definetweakedfont} command here. This example not
+only shows the two scales but also introduces the offset.
+
+\getbuffer
+
+In compact mode this is one font. Here is another example:
+
+\startbuffer
+\definetweakedfont[squeezed][xscale=0.9]
+
+\startlines
+$a = b^2 + \sqrt{c}$
+{\squeezed $a = b^2 + \sqrt{c}$}
+\stoplines
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+Watch this:
+
+\startbuffer
+\startcombination[3*1]
+ {\bTABLE
+ \bTR \bTD foo \eTD \bTD[style=\squeezed] $x = 1$ \eTD \eTR
+ \bTR \bTD oof \eTD \bTD[style=\squeezed] $x = 2$ \eTD \eTR
+ \eTABLE}
+ {local}
+ {\bTABLE[style=\squeezed]
+ \bTR \bTD $x = 1$ \eTD \bTD $x = 3$ \eTD \eTR
+ \bTR \bTD $x = 2$ \eTD \bTD $x = 4$ \eTD \eTR
+ \eTABLE}
+ {global}
+ {\bTABLE[style=\squeezed\squeezed]
+ \bTR \bTD $x = 1$ \eTD \bTD $x = 3$ \eTD \eTR
+ \bTR \bTD $x = 2$ \eTD \bTD $x = 4$ \eTD \eTR
+ \eTABLE}
+ {multiple}
+\stopcombination
+\stopbuffer
+
+\typebuffer
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+An additional style parameter is also honored:
+
+\startbuffer
+\definetweakedfont[MyLargerFontA][scale=2000,style=bold]
+test {\MyLargerFontA test} test
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+\getbuffer
+
+Just for the record: the Latin Modern fonts, when set up to use design sizes,
+will still use the specific size|-|related files.
+
+\stopsection
+
+\startsection[title={Hackery}]
+
+You can use negative scale values, as is demonstrated in the following
+code:
+
+\startbuffer
+\bTABLE[align=middle]
+ \bTR
+ \bTD a{\glyphxscale 1000 \glyphyscale 1000 bc}d \eTD
+ \bTD a{\glyphxscale 1000 \glyphyscale -1000 bc}d \eTD
+ \bTD a{\glyphxscale -1000 \glyphyscale -1000 bc}d \eTD
+ \bTD a{\glyphxscale -1000 \glyphyscale 1000 bc}d \eTD
+ \eTR
+ \bTR
+ \bTD \tttf +1000 +1000 \eTD
+ \bTD \tttf +1000 -1000 \eTD
+ \bTD \tttf -1000 -1000 \eTD
+ \bTD \tttf -1000 +1000 \eTD
+ \eTR
+\eTABLE
+\stopbuffer
+
+\typebuffer
+
+gives:
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+Glyphs can have offsets and these are used for implementing \OPENTYPE\ features.
+However, they are also available on the \TEX\ side. Take this example where we
+use the new \type {\glyph} primitive (a variant of \type {\char} that takes
+keywords):
+
+\startbuffer
+\ruledhbox{
+ \ruledhbox{\glyph yoffset 1ex options 0 123} % left curly brace
+ \ruledhbox{\glyph xoffset .5em yoffset 1ex options "C0 123}
+ \ruledhbox{oeps{\glyphyoffset 1ex \glyphxscale 800
+ \glyphyscale\glyphxscale oeps}oeps}
+}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+This example demonstrates that the \type {\glyph} primitive takes quite a few
+keywords: \type {xoffset}, \type {yoffset}, \type {xscale}, \type {yscale}, \type
+{left}, \type {right}, \type {raise}, \type {options}, \type {font} and \type
+{id} where the last two take a font identifier or font id (a positive number).
+For this article it's enough to know that the option indicates that glyph
+dimension should include the offset. In a moment we will see an alternative that
+doesn't need that.
+
+\startbuffer
+\samplefile{jojomayer}
+{\glyphyoffset .8ex
+ \glyphxscale 700 \glyphyscale\glyphxscale
+ \samplefile{jojomayer}}
+{\glyphyscale\numexpr3*\glyphxscale/2\relax
+ \samplefile{jojomayer}}
+{\glyphyoffset -.2ex
+ \glyphxscale 500 \glyphyscale\glyphxscale
+ \samplefile{jojomayer}}
+\samplefile{jojomayer}
+\stopbuffer
+
+\typebuffer
+
+To quote Jojo Mayer:
+
+\startnarrower
+\darkred \getbuffer
+\stopnarrower
+
+Keep in mind that this can interfere badly with font feature processing which also
+used offsets. It might often work out okay vertically, but less well horizontally.
+
+The scales, as mentioned, works with pseudo|-|scales but that is sometimes a bit
+cumbersome. This is why a special \type {\numericscale} primitive has been
+introduced.
+
+\startbuffer
+1200 : \the\numericscale1200
+1.20 : \the\numericscale1.200
+\stopbuffer
+
+\typebuffer
+
+Both these lines produce the same integer:
+
+\startlines\tttf
+\getbuffer
+\stoplines
+
+You can do strange things with these primitives but keep in mind that you can
+also waste the defaults.
+
+\startbuffer[definition]
+\def\UnKernedTeX
+ {T%
+ {\glyph xoffset -.2ex yoffset -.4ex `E}%
+ {\glyph xoffset -.4ex options "60 `X}}
+\stopbuffer
+
+\startbuffer[example]
+We use \UnKernedTeX\ and {\bf \UnKernedTeX} and {\bs \UnKernedTeX}:
+the slanted version could use some more left shifting of the E.
+\stopbuffer
+
+\typebuffer[definition,example]
+
+This gives the \TEX\ logos but of course we normally use the more official
+definitions instead.
+
+\startnarrower
+ \darkred \getbuffer[definition,example]
+\stopnarrower
+
+Because offsets are (also) used for handling font features like mark and cursive
+placement as well as special inter|-|character positioning, the above is
+suboptimal. Here is a better alternative:
+
+\startbuffer[definition]
+\def\UnKernedTeX
+ {T\glyph left .2ex raise -.4ex `E\glyph left .2ex `X\relax}
+\stopbuffer
+
+\typebuffer[definition]
+
+The result is the same:
+
+\startnarrower
+ \darkgreen \getbuffer[definition,example]
+\stopnarrower
+
+But anyway: don't overdo it. We have dealt with such cases for decades without
+these fancy new features. The next example shows margins in action:
+
+\startlinecorrection
+\bTABLE[align=middle,width=.33\textwidth]
+ \bTR
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph `M}>\eTD
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph raise 3pt `M}>\eTD
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph raise -3pt `M}>\eTD
+ \eTR
+ \bTR[frame=off]
+ \bTD \tttf \eTD
+ \bTD \tttf raise 3pt \eTD
+ \bTD \tttf raise -3pt \eTD
+ \eTR
+ \bTR
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph left 3pt `M}>\eTD
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph right 2pt `M}>\eTD
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph left 3pt right 2pt `M}>\eTD
+ \eTR
+ \bTR[frame=off]
+ \bTD \tttf left 3pt \eTD
+ \bTD \tttf right 2pt\eTD
+ \bTD \tttf left 3pt right 2pt\eTD
+ \eTR
+ \bTR
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph left -3pt `M}>\eTD
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph right -2pt `M}>\eTD
+ \bTD \showglyphs \multiply\glyphscale by 2 <{\darkgray \glyph left -3pt right -2pt `M}>\eTD
+ \eTR
+ \bTR[frame=off]
+ \bTD \tttf left -3pt \eTD
+ \bTD \tttf right -2pt \eTD
+ \bTD \tttf left -3pt right -2pt \eTD
+ \eTR
+\eTABLE
+\stoplinecorrection
+
+Here is another way of looking at it:
+
+\startbuffer
+\glyphscale 4000
+\vl\glyph `M\vl\quad
+\vl\glyph raise .2em `M\vl\quad
+\vl\glyph left .3em `M\vl\quad
+\vl\glyph right .2em`M\vl\quad
+\vl\glyph left -.2em right -.2em`M\vl\quad
+\vl\glyph raise -.2em right .4em`M\vl
+\stopbuffer
+
+\typebuffer
+
+The raise as well as left and right margins are taken into account when calculating the
+dimensions of a glyph.
+
+{\getbuffer}
+
+
+\stopsection
+
+\startsection[title={Implementation}]
+
+Discussing the implementation in the engine makes no sense here, also because
+details might change. However, it is good to know that many properties travel
+with the glyph nodes, for instance the scales, margins, offsets, language, script
+and state properties, control over kerning, ligaturing, expansion and protrusion,
+etc. The dimensions (width, height and depth) are not stored in the glyph node
+but calculated from the font, scales and optionally the offsets and expansion
+factor. One problem is that the more clever (and nice) solutions we cook up, the
+more it might impact performance. So, I will delay some experiments till I have a
+more powerful machine.
+
+One reason for {\em not} storing the dimensions in a glyph node is that we often
+copy those nodes or change character fields in the font handler and we definitely
+don't want the wrong dimensions there. At that moment, offsets and margin fields
+don't reflect features yet, so copying them is no big deal because at that moment
+these are still zero. However, dimensions are rather character bound so every
+time a character is set, we also would have to set the dimensions. Even worse,
+when we can set them, the question arises if they were already set explicitly.
+So, this is a can of worms we're not going to open: the basic width, height and
+depth of the glyph as specified in the font is used and combined with actual
+dimensions (likely already scaled according the glyph scales) in offset and
+margin fields.
+
+Now, I have to admit that especially playing with using margins to glyphs instead
+of font kerns is more of an experiment to see what the consequences are than a
+necessity, but what would be the joy of \TEX\ without such experiments? And as
+usual, in \CONTEXT\ these will become options in the font handler that one can
+enable, or not.
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
+
+% sample file
+
+\setuplayout[topspace=1cm,header=1cm] \setuplayout[middle]
+
+\setupbodyfont[pagella,10pt]
+
+\setupalign[verytolerant,stretch]
+
+\setupwhitespace[big]
+
+\starttext
+
+\startbuffer
+\definetweakedfont[bfe][xscale=2000,yscale=6000,style=bf]
+
+\setuphead[chapter][style=\bfe]
+
+\dostepwiserecurse {10} {2020} {10} {
+ \title{Here we go #1!}
+ \start
+ \glyphxscale#1\relax
+ \glyphyscale#1\relax
+ \setupinterlinespace
+ \samplefile{ward}%
+ \start
+ \bf
+ \samplefile{ward}%
+ \glyphxscale\numexpr(#1*2)/3\relax
+ \glyphyscale#1\relax
+ \samplefile{ward}%
+ \par
+ \stop
+ \def\TEST{y = \sqrt{x^2 + 1}^3}%
+ \dontleavehmode
+ \ruledhbox{\glyphxscale #1 \glyphyscale #1 $\left{\TEST\right}$}
+ \ruledhbox{\glyphxscale #1 \glyphyscale \numexpr#1*3\relax $\left{\TEST\right}$}
+ \ruledhbox{\glyphxscale \numexpr#1/2\relax \glyphyscale \numexpr#1*2\relax $\left{\TEST\right}$}
+ \par
+ \stop
+ \page
+}
+\stopbuffer
+
+\getbuffer
+
+% As often there is a musical timestamp to this text: discovering Julia Hofer
+% (bass, came there via checking out (of course) Leland Sklar, and now i have to
+% watch a bunch of Victor Wooten videos too) and Neon Vine's (play and combine
+% anything) on YT. Both examples of where (imo extensive) practicing real
+% instruments can bring you with todays diverse equipment. These are interesting
+% times (it's now last days of 2020).
+%
+% The initial \definescaledfont was replaced by \definetweakedfont in the first
+% week of Januari 2021, when I watched the joyful covers of Peter Gabriels
+% "Steam" by Yoyoka which shows that the future belongs to the real young kids
+% (so much explosive creativity!) and not to the old folks.
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex
index 68b52043c25..51519f1374f 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex
@@ -3,6 +3,8 @@
\startenvironment followingup-style
+\enableexperiments[fonts.compact] % needed for font chapter
+
\usemodule[abbreviations-smallcaps]
\logo [LUAMETATEX] {LuaMeta\TeXsuffix}
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex
index a9aaaf71c55..7d7d17851c2 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex
@@ -28,6 +28,7 @@
\component followingup-mp
\component followingup-tex
\component followingup-retrospect
+ \component followingup-fonts
\stopbodymatter
\stopdocument
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex
index 70350142c03..7a8bcd535a8 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex
@@ -410,9 +410,9 @@ for:
\startsection[title=Colofon]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\stoptabulate
\stopsection
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex
index f1801efc0a0..07caca83c06 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex
@@ -240,17 +240,18 @@ There are some optional libraries present, like:
\starttabulate[|l|l|l|l|l|]
\FL
-\BC module \BC library \BC windows \BC unix \NC \NR
+\BC module \BC library \BC windows \BC unix \NC \NR
\ML
-\NC libs-imp-curl \NC curl \NC libcurl \NC libcurl \NC \NR
-\NC libs-imp-mysql \NC mysql \NC libmysql \NC libmysqlclient \NC \NR
-\NC libs-imp-sqlite \NC sqlite \NC sqlite3 \NC sqlite3 \NC \NR
-%NC libs-imp-postgress \NC libpg \NC libpg \NC libpg \NC \NR % untested
-\NC libs-imp-zint \NC libzint \NC libzint \NC libzint \NC \NR
-\NC libs-imp-mujs \NC libmujs \NC libmujs \NC libmujs \NC \NR
-\NC libs-imp-ghostscript \NC ghostscript \NC gswin64 \NC libgs \NC \NR
-\NC libs-imp-graphicsmagick \NC graphicsmagick \NC several \NC unknown \NC \NR
-%NC font-phb-imp-internal \NC hb \NC libharfbuzz \NC libharfbuzz \NC \NR % maybe, for idris, testing uniscribe
+\NC libs-imp-curl \NC curl \NC libcurl \NC libcurl \NC \NR
+\NC libs-imp-mysql \NC mysql \NC libmysql \NC libmysqlclient \NC \NR
+\NC libs-imp-sqlite \NC sqlite \NC sqlite3 \NC sqlite3 \NC \NR
+%NC libs-imp-postgress \NC libpg \NC libpg \NC libpg \NC \NR % untested
+\NC libs-imp-zint \NC libzint \NC libzint \NC libzint \NC \NR
+\NC libs-imp-mujs \NC libmujs \NC libmujs \NC libmujs \NC \NR
+\NC libs-imp-kpse \NC kpse \NC kpathsea*w64 \NC libkpathsea \NC \NR % left-over for mkii runner
+\NC libs-imp-ghostscript \NC ghostscript \NC gswin64 \NC libgs \NC \NR
+\NC libs-imp-graphicsmagick \NC graphicsmagick \NC several \NC unknown \NC \NR
+%NC font-phb-imp-internal \NC hb \NC libharfbuzz \NC libharfbuzz \NC \NR % maybe, for idris, testing uniscribe
\LL
\stoptabulate
@@ -276,9 +277,9 @@ at some point provide the libraries that we support.
\startsection[title=Colofon]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC comment \NC many thanks to Luigi Scarso for taking care of \FFI\ support in the engines \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex
index 986d07b1b61..9a097b8780c 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex
@@ -9,9 +9,7 @@
[title=boxes,
color=middlered]
-\startsection[title=Preamble]
-
-\startsubsection[title=Introduction]
+\startsection[title=Introduction]
An average \CONTEXT\ user will not use the low level box primitives but a basic
understanding of how \TEX\ works doesn't hurt. In fact, occasionally using a box
@@ -25,9 +23,9 @@ about all kind of glues, kerns and penalties, just boxes it is.
This explanation will be extended when I feel the need (or users have questions
that can be answered here).
-\stopsubsection
+\stopsection
-\startsubsection[title=Boxes]
+\startsection[title=Boxes]
This paragraph of text is made from lines that contain words that themselves
contain symbolic representations of characters. Each line is wrapped in a so
@@ -68,7 +66,7 @@ other hand wraps a linked list of so called nodes: glyphs, kerns, glue,
penalties, rules, boxes, etc. It is a container with properties like width,
height, depth and shift.
-\stopsubsection
+\stopsection
\stopsection
@@ -469,10 +467,10 @@ a private attribute we define one.
\startbuffer
\newattribute\MyAt
\setbox\scratchbox\hbox attr \MyAt 123 {whatever}
-[\the\boxattr\scratchbox\MyAt]
-\boxattr\scratchbox\MyAt 456
-[\the\boxattr\scratchbox\MyAt]
-[\ifnum\boxattr\scratchbox\MyAt>400 okay\fi]
+[\the\boxattribute\scratchbox\MyAt]
+\boxattribute\scratchbox\MyAt 456
+[\the\boxattribute\scratchbox\MyAt]
+[\ifnum\boxattribute\scratchbox\MyAt>400 okay\fi]
\stopbuffer
\typebuffer[option=TEX]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex
new file mode 100644
index 00000000000..ee3ab404442
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex
@@ -0,0 +1,256 @@
+% language=us
+
+\environment lowlevel-style
+
+\startdocument
+ [title=characters,
+ color=middlered]
+
+\startsection[title=Introduction]
+
+This explanation is part of the low level manuals because in practice users will
+not have to deal with these matters in \MKIV\ and even less in \LMTX. You can
+skip to the last section for commands.
+
+\stopsection
+
+\startsection[title=History]
+
+If we travel back in time to when \TEX\ was written we end up in eight bit
+character universe. In fact, the first versions assumed seven bits, but for
+comfortable use with languages other than English that was not sufficient.
+Support for eight bits permits the usage of so called code pages as supported by
+operating systems. Although \ASCII\ input became kind of the standard soon
+afterwards, the engine can be set up for different encodings. This is not only
+true for \TEX, but for many of its companions, like \METAFONT\ and therefore
+\METAPOST. \footnote {This remapping to an internal representation (e.g. ebcdic)
+is not present in \LUATEX\ where we assume \UTF8 to be the input encoding. The
+\METAPOST\ library that comes with \LUATEX\ still has that code but in
+\LUAMETATEX\ it's gone. There one can set up the machinery to be \UTF8 aware
+too.}
+
+Core components of a \TEX\ engine are hyphenation of words, applying
+inter|-|character kerns and build ligatures. In traditional \TEX\ engines those
+processes are interwoven into the par builder but in \LUATEX\ these are separate
+stages. The original approach is the reason that there is a relation between the
+input encoding and the font encoding: the character in the input is the slot used
+in a reference to a glyph. When producing the final result (e.g.\ \PDF) there can
+also be a mapping to an index in a font resource.
+
+\starttyping
+input A [tex ->] font slot A [backend ->] glyph index A
+\stoptyping
+
+The mapping that \TEX\ does is normally one|-|to|-|one but an input character can
+undergo some transformation. For instance a character beyond \ASCII\ 126 can be
+made active and expand to some character number that then becomes the font slot.
+So, it is the expansion (or meaning) of a character that end up as numeric
+reference in the glyph node. Virtual fonts can introduce yet another remapping
+but that's only visible in the backend.
+
+Actually, in \LUATEX\ the same happens but in practice there is no need to go
+active because (at least in \CONTEXT) we assume a \UNICODE\ path so there the
+font slot is the \UNICODE\ got from the \UTF8 input.
+
+In the eight bit universe macro packages (have to) provide all kind of means to
+deal with (in the perspective of English) special characters. For instance, \type
+{\"a} would put a diaeresis on top of the a or even better, refer to a character
+in the encoding that the chosen font provides. Because there are some limitations
+of what can go in an eight bit font, and because in different countries the used
+\TEX\ fonts evolved kind of independent, we ended up with quite some different
+variants of fonts. It was only with the Latin Modern project that this became
+better. Interesting is that when we consider the fact that such a font has often
+also hardly used symbols (like registered or copyright) coming up with an
+encoding vector that covers most (latin based) European languages (scripts) is
+not impossible \footnote {And indeed in the Latin Modern project we came up with
+one but it was already to late for it to become popular.} Special symbols could
+simply go into a dedicated font, also because these are always accessed via a
+macro so who cares about the input. It never happened.
+
+Keep in mind that when \UTF8 is used with eight bit engines, \CONTEXT\ will
+convert sequences of characters into a slot in a font (depending on the font
+encoding used which itself depends on the coverage needed). For this every first
+(possible) byte of a multibyte \UTF\ sequence is an active character, which is no
+big deal because these are outside the \ASCII\ range. Normal \ASCII\ characters
+are single byte \UTF\ sequences and fall through without treatment.
+
+Anyway, in \CONTEXT\ \MKII\ we dealt with this by supporting mixed encodings,
+depending on the (local) language, referencing the relevant font. It permits
+users to enter the text in their preferred input encoding and also get the words
+properly hyphenated. But we can leave these \MKII\ details behind.
+
+\stopsection
+
+\startsection[title=The heritage]
+
+In \MKIV\ we got rid of input and font encodings, although one can still load
+files in a specific code page. \footnote {I'm not sure if users ever depend on an
+input encoding different from \UTF8.} We also kept the means to enter special
+characters, if only because text editors seldom support(ed) a wide range of
+visual editing of those. This is why we still have
+
+\starttyping[option=TEX]
+\"u \^a \v{s} \AE \ij \eacute \oslash
+\stoptyping
+
+and many more. The ones with one character names are rather common in the \TEX\
+community but it is definitely a weird mix of symbols. The next two are kind of
+outdated: in these days you delegate that to the font handler, where turning them
+into \quote {single} character references depends on what the font offers, how it
+is set up with respect to (for instance) ligatures, and even might depend on
+language or script.
+
+The ones with the long names partly are tradition, but as we have a lot of them,
+in \MKII\ they actually serve a purpose. These verbose names are used in the so
+called encoding vectors and are part of the \UTF\ expansion vectors. They are
+also used in labels so that we have a good indication if what goes in there:
+remember that in those times editors often didn't show characters, unless the
+font for display had them, or the operating system somehow provided them from
+another font. These verbose names are used for latin, greek and cyrillic and for
+some other scripts and symbols. They take up quite a bit of hash space and the
+format file. \footnote {In \MKII\ we have an abstract front|-|end with respect to
+encodings and also an abstract backend with respect to supported drivers but both
+approaches no longer make sense today.}
+
+\stopsection
+
+\startsection[title=The \LMTX\ approach]
+
+In the process of tagging all (public) macros in \LMTX\ (which happened in
+2020|-|2021) I wondered if we should keep these one character macros, the
+references to special characters and the verbose ones. When asked on the mailing
+list it became clear that users still expect the short ones to be present, often
+just because old \BIBTEX\ files are used that might need them. However, in \MKIV\
+and \LMTX\ we load \BIBTEX\ files in a way that turn these special character
+references into proper \UTF8 input so it makes a weak argument. Anyway, although
+they could go, for now we keep them because users expect them. However, in \LMTX\
+the implementation is somewhat different now, a bit more efficient in terms of
+hash and memory, potentially a bit less efficient in runtime, but no one will
+notice that.
+
+A new command has been introduced, the very short \type {\chr}.
+
+\startbuffer
+\chr {aÌ€} \chr {aÌ} \chr {ä}
+\chr {`a} \chr {'a} \chr {"a}
+\chr {a acute} \chr {a grave} \chr {a umlaut}
+\chr {aacute} \chr {agrave} \chr {aumlaut}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+In the first line the composed character using two characters, a base and a so
+called mark. Actually, one doesn't have to use \type {\chr} in that case because
+\CONTEXT\ does already collapse characters for you. The second line looks like
+the shortcuts \type {\`}, \type {\'} and \type {\"}. The third and fourth lines
+could eventually replace the more symbolic long names, if we feel the need. Watch
+out: in \UNICODE\ input the marks come {\em after}.
+
+\startlines \getbuffer \stoplines
+
+Currently the repertoire is somewhat limited but it can be easily be extended. It
+all depends on user needs (doing Greek and Cyrillic for instance). The reason why
+we actually save code deep down is that the helpers for this have always been
+there. \footnote {So if needed I can port this approach back to \MKIV, but for
+now we keep it as is because we then have a reference.}
+
+The \type {\"} commands are now just aliases to more verbose and less hackery
+looking macros:
+
+\starttabulate[|||||]
+ \NC \type {\withgrave} \NC \withgrave {a} \NC \type {\`} \NC \`{a} \NC \NR
+ \NC \type {\withacute} \NC \withacute {a} \NC \type {\'} \NC \'{a} \NC \NR
+ \NC \type {\withcircumflex} \NC \withcircumflex {a} \NC \type {\^} \NC \^{a} \NC \NR
+ \NC \type {\withtilde} \NC \withtilde {a} \NC \type {\~} \NC \~{a} \NC \NR
+ \NC \type {\withmacron} \NC \withmacron {a} \NC \type {\=} \NC \={a} \NC \NR
+ \NC \type {\withbreve} \NC \withbreve {e} \NC \type {\u} \NC \u{e} \NC \NR
+ \NC \type {\withdotaccent} \NC \withdot {c} \NC \type {\.} \NC \.{c} \NC \NR
+ \NC \type {\withdiaeresis} \NC \withdieresis {e} \NC \type {\"} \NC \"{e} \NC \NR
+ \NC \type {\withring} \NC \withring {u} \NC \type {\r} \NC \r{u} \NC \NR
+ \NC \type {\withhungarumlaut} \NC \withhungarumlaut{u} \NC \type {\H} \NC \H{u} \NC \NR
+ \NC \type {\withcaron} \NC \withcaron {e} \NC \type {\v} \NC \v{e} \NC \NR
+ \NC \type {\withcedilla} \NC \withcedilla {e} \NC \type {\c} \NC \c{e} \NC \NR
+ \NC \type {\withogonek} \NC \withogonek {e} \NC \type {\k} \NC \k{e} \NC \NR
+\stoptabulate
+
+Not all fonts have these special characters. Most natural is to have them
+available as precomposed single glyphs, but it can be that they are just two
+shapes with the marks anchored to the base. It can even be that the font somehow
+overlays them, assuming (roughly) equal widths. The \type {compose} font feature
+in \CONTEXT\ normally can handle most well.
+
+An occasional ugly rendering doesn't matter that much: better have something than
+nothing. But when it's the main language (script) that needs them you'd better
+look for a font that handles them. When in doubt, in \CONTEXT\ you can enable
+checking:
+
+\starttabulate[|l|l|]
+ \BC command \BC equivalent to \NC \NR
+ \NC \type {\checkmissingcharacters} \NC \type{\enabletrackers[fonts.missing]} \NC \NR
+ \NC \type {\removemissingcharacters} \NC \type{\enabletrackers[fonts.missing=remove]} \NC \NR
+ \NC \type {\replacemissingcharacters} \NC \type{\enabletrackers[fonts.missing=replace]} \NC \NR
+ \NC \type {\handlemissingcharacters} \NC \type{\enabletrackers[fonts.missing={decompose,replace}]} \NC \NR
+\stoptabulate
+
+The decompose variant will try to turn a composed character into its components
+so that at least you get something. If that fails it will inject a replacement
+symbol that stands out so that you can check it. The console also mentions
+missing glyphs. You don't need to enable this by default \footnote {There is some
+overhead involved here.} but you might occasionally do it when you use a font for
+the first time.
+
+In \LMTX\ this mechanism has been upgraded so that replacements follow the shape
+and are actually real characters. The decomposition has not yet been ported back
+to \MKIV.
+
+The full list of commands can be queried when a tracing module is loaded:
+
+\startbuffer
+\usemodule[s][characters-combinations]
+
+\showcharactercombinations
+\stopbuffer
+
+\typebuffer
+
+We get this list:
+
+\getbuffer
+
+Some combinations are special for \CONTEXT\ because \UNICODE\ doesn't specify
+decomposition for all composed characters.
+
+\stopsection
+
+\startsubject[title=Colofon]
+
+\starttabulate
+\NC Author \NC Hans Hagen \NC \NR
+\NC \CONTEXT \NC \contextversion \NC \NR
+\NC \LUAMETATEX \NC \texengineversion \NC \NR
+\NC Support \NC www.pragma-ade.com \NC \NR
+\NC \NC contextgarden.net \NC \NR
+\stoptabulate
+
+\stopsubject
+
+\stopdocument
+
+% on an old machine, so consider them just relative measures
+%
+% mkiv lmtx
+%
+% 0.012 0.009 % faster core code
+% 0.028 0.036 % different io code path
+% 0.055 0.043 % different io code path / faster core code
+% 0.156 0.129 % more efficient resolving
+% 0.153 0.119 % more efficient resolving
+%
+% \ifdefined\withdieresis\else\let\withdieresis\"\fi % for mkiv
+%
+% \setbox0\hpack{\testfeatureonce{100000}{ü}} \par \elapsedtime \par % direct
+% \setbox0\hpack{\testfeatureonce{100000}{ü}} \par \elapsedtime \par % composed (input)
+% \setbox0\hpack{\testfeatureonce{100000}{u{}̈}} \par \elapsedtime \par % overlay
+% \setbox0\hpack{\testfeatureonce{100000}{\withdieresis{u}}} \par \elapsedtime \par % official also \"u
+% \setbox0\hpack{\testfeatureonce{100000}{\" u}} \par \elapsedtime \par % alias of previous
+
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex
index ea3c9e1a244..9be2fb4ec6f 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex
@@ -6,6 +6,8 @@
[title=conditionals,
color=middleblue]
+\pushoverloadmode
+
\startsection[title=Preamble]
\startsubsection[title=Introduction]
@@ -1121,13 +1123,15 @@ This test is like \type {\ifcmpnum} but for dimensions.
\startsubsection[title={\tex{ifchkdim}}]
-This test is like \type {\ifchknum} but for dimensions.
+This test is like \type {\ifchknum} but for dimensions. The last checked value is
+available as \type {\lastchknum}.
\stopsubsection
\startsubsection[title={\tex{ifdimval}}]
-This test is like \type {\ifnumval} but for dimensions.
+This test is like \type {\ifnumval} but for dimensions. The last checked value is
+available as \type {\lastchkdim}
\stopsubsection
@@ -1224,6 +1228,15 @@ defined at the user level or is a build in one. This one might evolve.
\stopsubsection
+\startsubsection[title={\tex{ifarguments}}]
+
+This conditional can be used to check how many arguments were matched. It only
+makes sense when used with macros defined with the \type {\tolerant} prefix
+and|/|or when the sentinel \type {\ignorearguments} after the arguments is used.
+More details can be found in the lowlevel macros manual.
+
+\stopsubsection
+
\startsubsection[title={\tex{orelse}}]
This it not really a test primitive but it does act that way. Say that we have this:
@@ -1254,13 +1267,16 @@ A bit nicer looks this:
\fi
\stoptyping
-We stay at the same level and the only test that cannot be used this way is \type
-{\ifcondition} but that is no real problem. Sometimes a more flat test tree had
-advantages but if you think that it gives better performance then you will be
-disappointed. The fact that we stay at the same level is compensated by a bit
-more parsing, so unless you have millions such cases (or expansions) it might
-make a bit of a difference. As mentioned, I'm a bit sensitive for how code looks so
-that was the main motivation for introducing it.
+% We stay at the same level and the only test that cannot be used this way is \type
+% {\ifcondition} but that is no real problem. Sometimes a more flat test tree had
+
+We stay at the same level. Sometimes a more flat test tree had advantages but if
+you think that it gives better performance then you will be disappointed. The
+fact that we stay at the same level is compensated by a bit more parsing, so
+unless you have millions such cases (or expansions) it might make a bit of a
+difference. As mentioned, I'm a bit sensitive for how code looks so that was the
+main motivation for introducing it. There is a companion \type {\orunless}
+continuation primitive.
A rather neat trick is the definition of \type {\quitcondition}:
@@ -1294,18 +1310,23 @@ reason to go this complex but obscure \TEX\ code attracts some users so \unknown
When you have a macro that has for instance assignments, and when you expand that
macro inside an \type {\edef}, these assignments are not actually expanded but
-tokenized. In \LUATEX\ there is a way to immediately apply these assignments and
-that feature can be used to write a fully expandable user test. For instance:
+tokenized. In \LUAMETATEX\ there is a way to apply these assignments without side
+effects and that feature can be used to write a fully expandable user test. For
+instance:
\startbuffer
\def\truecondition {\iftrue}
\def\falsecondition{\iffalse}
\def\fontwithidhaschar#1#2%
- {\immediateassignment\scratchcounter\numexpr\fontid\font\relax
- \immediateassignment\setfontid\numexpr#1\relax
+ {\beginlocalcontrol
+ \scratchcounter\numexpr\fontid\font\relax
+ \setfontid\numexpr#1\relax
+ \endlocalcontrol
\iffontchar\font\numexpr#2\relax
- \immediateassignment\setfontid\scratchcounter
+ \beginlocalcontrol
+ \setfontid\scratchcounter
+ \endlocalcontrol
\expandafter\truecondition
\else
\expandafter\falsecondition
@@ -1394,6 +1415,125 @@ with \type {\ifcondition} (it has bitten me already a few times).
\stopsection
+\startsection[title=Relaxing]
+
+When \TEX\ scans for a number or dimension it has to check tokens one by one. On
+the case of a number, the scanning stops when there is no digit, in the case of a
+dimension the unit determine the end of scanning. In the case of a number, when a
+token is not a digit that token gets pushed back. When digits are scanned a
+trailing space or \type {\relax} is pushed back. Instead of a number of dimension
+made from digits, periods and units, the scanner also accepts registers, both the
+direct accessors like \type {\count} and \type {\dimen} and those represented by
+one token. Take these definitions:
+
+\startbuffer
+\newdimen\MyDimenA \MyDimenA=1pt \dimen0=\MyDimenA
+\newdimen\MyDimenB \MyDimenB=2pt \dimen2=\MyDimenB
+\stopbuffer
+
+\typebuffer \getbuffer
+
+I will use these to illustrate the side effects of scanning. Watch the spaces
+in the result.
+
+% \startbuffer[a]
+% \testfeatureonce{1000000}{
+% \whatever{1pt}{2pt}%
+% \whatever{1pt}{1pt}%
+% \whatever{\dimen0}{\dimen2}%
+% \whatever{\dimen0}{\dimen0}%
+% \whatever\MyDimenA\MyDimenB
+% \whatever\MyDimenA\MyDimenB
+% } \elapsedtime
+% \stopbuffer
+
+\startbuffer[b]
+\starttabulate[|T|T|]
+\NC \type {\whatever{1pt}{2pt}} \NC \edef\temp{\whatever {1pt}{2pt}}[\meaning\temp] \NC \NR
+\NC \type {\whatever{1pt}{1pt}} \NC \edef\temp{\whatever {1pt}{1pt}}[\meaning\temp] \NC \NR
+\NC \type {\whatever{\dimen0}{\dimen2}} \NC \edef\temp{\whatever{\dimen0}{\dimen2}}[\meaning\temp] \NC \NR
+\NC \type {\whatever{\dimen0}{\dimen0}} \NC \edef\temp{\whatever{\dimen0}{\dimen0}}[\meaning\temp] \NC \NR
+\NC \type {\whatever\MyDimenA\MyDimenB} \NC \edef\temp{\whatever\MyDimenA\MyDimenB}[\meaning\temp] \NC \NR
+\NC \type {\whatever\MyDimenA\MyDimenB} \NC \edef\temp{\whatever\MyDimenA\MyDimenB}[\meaning\temp] \NC \NR
+\stoptabulate
+\stopbuffer
+
+First I show what effect we want to avoid. When second argument contains a number
+(digits) the zero will become part of it so we actually check \type {\dimen00}
+here.
+
+\startbuffer[c]
+\def\whatever#1#2%
+ {\ifdim#1=#20\else1\fi}
+\stopbuffer
+
+\typebuffer[c] \getbuffer[c,b]
+
+The solution is to add a space but watch how that one can end up in the result:
+
+\startbuffer[c]
+\def\whatever#1#2%
+ {\ifdim#1=#2 0\else1\fi}
+\stopbuffer
+
+\typebuffer[c] \getbuffer[c,b]
+
+A variant is using \type {\relax} and this time we get this token retained in
+the output.
+
+\startbuffer[c]
+\def\whatever#1#2%
+ {\ifdim#1=#2\relax0\else1\fi}
+\stopbuffer
+
+\typebuffer[c] \getbuffer[c,b]
+
+A solution that doesn't have side effects of forcing the end of a number (using a
+space or \type {\relax} is one where we use expressions. The added overhead of
+scanning expressions is taken for granted because the effect is what we like:
+
+\startbuffer[c]
+\def\whatever#1#2%
+ {\ifdim\dimexpr#1\relax=\dimexpr#2\relax0\else1\fi}
+\stopbuffer
+
+\typebuffer[c] \getbuffer[c,b]
+
+Just for completeness we show a more obscure trick: this one hides assignments to
+temporary variables. Although performance is okay, it is the least efficient
+one so far.
+
+\ifdefined\beginlocalcontrol
+
+\startbuffer[c]
+\def\whatever#1#2%
+ {\beginlocalcontrol
+ \MyDimenA#1\relax
+ \MyDimenB#2\relax
+ \endlocalcontrol
+ \ifdim\MyDimenA=\MyDimenB0\else1\fi}
+\stopbuffer
+
+\typebuffer[c] \getbuffer[c,b]
+
+\fi
+
+It is kind of a game to come up with alternatives but for sure those involve
+dirty tricks and more tokens (and runtime). The next can be considered a dirty
+trick too: we use a special variant of \type {\relax}. When a number is scanned
+it acts as relax, but otherwise it just is ignored and disappears.
+
+\ifdefined\norelax\else\let\norelax\relax\fi
+
+\startbuffer[c]
+\def\whatever#1#2%
+ {\ifdim#1=#2\norelax0\else1\fi}
+\stopbuffer
+
+\typebuffer[c] \getbuffer[c,b]
+
+\stopsection
+
\startsubject[title=Colofon]
\starttabulate
@@ -1406,4 +1546,18 @@ with \type {\ifcondition} (it has bitten me already a few times).
\stopsubject
+\popoverloadmode
+
\stopdocument
+
+% \def\foo{foo=bar}
+% \def\oof{foo!bar}
+% \scratchtoks{=}
+
+% \ifhasxtoks\scratchtoks{foo!bar} YES\else NOP\fi\par
+% \ifhasxtoks\scratchtoks{foo=bar} YES\else NOP\fi\par
+
+% \showluatokens\foo
+
+% \ifhastoks\scratchtoks\oof YES\else NOP\fi\par
+% \ifhastoks\scratchtoks\foo YES\else NOP\fi\par
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex
index 1e2e00a35ad..15faa802dc4 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex
@@ -315,7 +315,7 @@ Although you can never really get back to the original input, you can come prett
close, with:
\startbuffer
-\normaldetokenize{this can $ be anything \bgroup}
+\detokenize{this can $ be anything \bgroup}
\stopbuffer
\typebuffer[option=TEX]
@@ -432,9 +432,45 @@ These two macros now have the meaning:
\startsection[title={\LUAMETATEX\ primitives}]
-{\em todo}
+To be discussed:
+
+\starttyping
+\expand
+\expandtoken
+\localcontrol
+\localcontrolled
+\beginlocalcontrol ... \endlocalcontrol
+\immediate
+\stoptyping
+
+And maybe also here:
+
+\starttyping
+\tokenized : a bonus
+\scantokens : original etex, now using the lua method
+\stoptyping
% \aftergroups
+% \aftergrouped
+
+And:
+
+\starttyping
+ \def\foo{foo}
+\protected\def\oof{oof}
+
+\csname foo\endcsname
+\csname oof\endcsname
+\csname \foo\endcsname
+% \csname \oof\endcsname % error in luametatex
+
+\ifcsname foo\endcsname yes\else nop\fi
+\ifcsname oof\endcsname yes\else nop\fi
+\ifcsname \foo\endcsname yes\else nop\fi
+\ifcsname \oof\endcsname yes\else nop\fi % nop in luametatex
+\stoptyping
+
+\stoptext
\stopsection
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex
new file mode 100644
index 00000000000..eadcca6a9fd
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex
@@ -0,0 +1,170 @@
+% language=us
+
+\environment lowlevel-style
+
+\startdocument
+ [title=grouping,
+ color=middlecyan]
+
+\startsection[title=Introduction]
+
+This is a rather short explanation. I decided to write it after presenting the
+other topics at the 2019 \CONTEXT\ meeting where there was a question about
+grouping.
+
+\stopsection
+
+\startsection[title=\PASCAL]
+
+In a language like \PASCAL, the language that \TEX\ has been written in, or
+\MODULA, its successor, there is no concept of grouping like in \TEX. But we can
+find keywords that suggests this:
+
+\starttyping
+for i := 1 to 10 do begin ... end
+\stoptyping
+
+This language probably inspired some of the syntax of \TEX\ and \METAPOST. For
+instance an assignment in \METAPOST\ uses \type {:=} too. However, the \type
+{begin} and \type {end} don't really group but define a block of statements. You
+can have local variables in a procedure or function but the block is just a way
+to pack a sequence of statements.
+
+\stopsection
+
+\startsection[title=\TEX]
+
+In \TEX\ macros (or source code) the following can occur:
+
+\starttyping
+\begingroup
+ ...
+\endgroup
+\stoptyping
+
+as well as:
+
+\starttyping
+\bgroup
+ ...
+\egroup
+\stoptyping
+
+Here we really group in the sense that assignments to variables inside a group
+are forgotten afterwards. All assignments are local to the group unless they are
+explicitly done global:
+
+\starttyping
+\scratchcounter=1
+\def\foo{foo}
+\begingroup
+ \scratchcounter=2
+ \global\globalscratchcounter=2
+ \gdef\foo{FOO}
+\endgroup
+\stoptyping
+
+Here \type {\scratchcounter} is still one after the group is left but its global
+counterpart is now two. The \type {\foo} macro is also changed globally.
+
+Although you can use both sets of commands to group, you cannot mix them, so this
+will trigger an error:
+
+\starttyping
+\bgroup
+\endgroup
+\stoptyping
+
+The bottomline is: if you want a value to persist after the group, you need to
+explicitly change its value globally. This makes a lot of sense in the perspective
+of \TEX.
+
+\stopsection
+
+\startsection[title=\METAPOST]
+
+The \METAPOST\ language also has a concept of grouping but in this case it's more like a
+programming language.
+
+\starttyping
+begingroup ;
+ n := 123 ;
+engroup ;
+\stoptyping
+
+In this case the value of \type {n} is 123 after the group is left, unless you do
+this (for numerics there is actually no need to declare them):
+
+\starttyping
+begingroup ;
+ save n ; numeric n ; n := 123 ;
+engroup ;
+\stoptyping
+
+Given the use of \METAPOST\ (read: \METAFONT) this makes a lot of sense: often
+you use macros to simplify code and you do want variables to change. Grouping in
+this language serves other purposes, like hiding what is between these commands
+and let the last expression become the result. In a \type {vardef} grouping is
+implicit.
+
+So, in \METAPOST\ all assignments are global, unless a variable is explicitly
+saved inside a group.
+
+\stopsection
+
+\startsection[title=\LUA]
+
+In \LUA\ all assignments are global unless a variable is defines local:
+
+\starttyping
+local x = 1
+local y = 1
+for i = 1, 10 do
+ local x = 2
+ y = 2
+end
+\stoptyping
+
+Here the value of \type {x} after the loop is still one but \type {y} is now two.
+As in \LUATEX\ we mix \TEX, \METAPOST\ and \LUA\ you can mix up these concepts.
+Another mixup is using \type {:=}, \type {endfor}, \type {fi} in \LUA\ after done
+some \METAPOST\ coding or using \type {end} instead of \type {endfor} in
+\METAPOST\ which can make the library wait for more without triggering an error.
+Proper syntax highlighting in an editor clearly helps.
+
+\stopsection
+
+\startsection[title=\CCODE]
+
+The \LUA\ language is a mix between \PASCAL\ (which is one reason why I like it)
+and \CCODE.
+
+\starttyping
+int x = 1 ;
+int y = 1 ;
+for (i=1; i<=10;i++) {
+ int x = 2 ;
+ y = 2 ;
+}
+\stoptyping
+
+The semicolon is also used in \PASCAL\ but there it is a separator and not a
+statement end, while in \METAPOST\ it does end a statement (expression).
+
+\stopsection
+
+\stopsection
+
+\startsubject[title=Colofon]
+
+\starttabulate
+\NC Author \NC Hans Hagen \NC \NR
+\NC \CONTEXT \NC \contextversion \NC \NR
+\NC \LUAMETATEX \NC \texengineversion \NC \NR
+\NC Support \NC www.pragma-ade.com \NC \NR
+\NC \NC contextgarden.net \NC \NR
+\stoptabulate
+
+\stopsubject
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex
new file mode 100644
index 00000000000..ef527732be3
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex
@@ -0,0 +1,904 @@
+% language=us
+
+% Extending the macro argument parser happened stepwise and at each step a bit of
+% \CONTEXT\ code was adapted for testing. At the beginning of October the 20201010
+% version of \LUAMETATEX\ was more of less complete, and I decided to adapt some
+% more and more intrusive too. Of course that resulted in some more files than I
+% had intended so mid October about 100 files were adapted. When this works out
+% well, I'll do some more. In the process many macros got the frozen property so
+% that was also a test and we'll see how that works out (as it can backfire). As
+% usual, here is a musical timestamp: working on this happened when Pineapple Thief
+% released \quotation {Versions of the Truth} which again a magnificent drumming by
+% Gavin Harrison.
+
+
+% \permanent\tolerant\protected\def\xx[#1]#*#;[#2]#:#3% loops .. todo
+
+
+\usemodule[system-tokens]
+
+\environment lowlevel-style
+
+\startdocument
+ [title=macros,
+ color=middleorange]
+
+\startsection[title=Preamble]
+
+This chapter overlaps with other chapters but brings together some extensions to
+the macro definition and expansion parts. As these mechanisms were stepwise
+extended, the other chapters describe intermediate steps in the development.
+
+Now, in spite of the extensions discussed here the main ides is still that we
+have \TEX\ act like before. We keep the charm of the macro language but these
+additions make for easier definitions, but (at least initially) none that could
+not be done before using more code.
+
+\stopsection
+
+\startsection[title=Definitions]
+
+A macro definition normally looks like like this: \footnote {The \type
+{\dontleavehmode} command make the examples stay on one line.}
+
+\startbuffer[definition]
+\def\macro#1#2%
+ {\dontleavehmode\hbox to 6em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+Such a macro can be used as:
+
+\startbuffer[example]
+\macro {1}{2}
+\macro {1} {2} middle space gobbled
+\macro 1 {2} middle space gobbled
+\macro {1} 2 middle space gobbled
+\macro 1 2 middle space gobbled
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+We show the result with some comments about how spaces are handled:
+
+\startlines \getbuffer[example] \stoplines
+
+A definition with delimited parameters looks like this:
+
+\startbuffer[definition]
+\def\macro[#1]%
+ {\dontleavehmode\hbox to 6em{\vl\type{#1}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+When we use this we get:
+
+\startbuffer[example]
+\macro [1]
+\macro [ 1] leading space kept
+\macro [1 ] trailing space kept
+\macro [ 1 ] both spaces kept
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+Again, watch the handling of spaces:
+
+\startlines \getbuffer[example] \stoplines
+
+Just for the record we show a combination:
+
+\startbuffer[definition]
+\def\macro[#1]#2%
+ {\dontleavehmode\hbox to 6em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+With this:
+
+\startbuffer[example]
+\macro [1]{2}
+\macro [1] {2}
+\macro [1] 2
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+we can again see the spaces go away:
+
+\startlines \getbuffer[example] \stoplines
+
+A definition with two separately delimited parameters is given next:
+
+\startbuffer[definition]
+\def\macro[#1#2]%
+ {\dontleavehmode\hbox to 6em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+When used:
+
+\startbuffer[example]
+\macro [12]
+\macro [ 12] leading space gobbled
+\macro [12 ] trailing space kept
+\macro [ 12 ] leading space gobbled, trailing space kept
+\macro [1 2] middle space kept
+\macro [ 1 2 ] leading space gobbled, middle and trailing space kept
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+We get ourselves:
+
+\startlines \getbuffer[example] \stoplines
+
+These examples demonstrate that the engine does some magic with spaces before
+(and therefore also between multiple) parameters.
+
+We will now go a bit beyond what traditional \TEX\ engines do and enter the
+domain of \LUAMETATEX\ specific parameter specifiers. We start with one that
+deals with this hard coded space behavior:
+
+\startbuffer[definition]
+\def\macro[#^#^]%
+ {\dontleavehmode\hbox to 6em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+The \type {#^} specifier will count the parameter, so here we expect again two
+arguments but the space is kept when parsing for them.
+
+\startbuffer[example]
+\macro [12]
+\macro [ 12]
+\macro [12 ]
+\macro [ 12 ]
+\macro [1 2]
+\macro [ 1 2 ]
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+Now keep in mind that we could deal well with all kind of parameter handling in
+\CONTEXT\ for decades, so this is not really something we missed, but it
+complements the to be discussed other ones and it makes sense to have that level
+of control. Also, availability triggers usage. Nevertheless, some day the \type
+{#^} specifier will come in handy.
+
+\startlines \getbuffer[example] \stoplines
+
+We now come back to an earlier example:
+
+\startbuffer[definition]
+\def\macro[#1]%
+ {\dontleavehmode\hbox spread 1em{\vl\type{#1}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+When we use this we see that the braces in the second call are removed:
+
+\startbuffer[example]
+\macro [1]
+\macro [{1}]
+\stopbuffer
+
+\typebuffer[example][option=TEX] \getbuffer[example]
+
+This can be prohibited by the \type {#+} specifier, as in:
+
+\startbuffer[definition]
+\def\macro[#+]%
+ {\dontleavehmode\hbox spread 1em{\vl\type{#1}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+As we see, the braces are kept:
+
+\startbuffer[example]
+\macro [1]
+\macro [{1}]
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+Again, we could easily get around that (for sure intended) side effect but it just makes nicer
+code when we have a feature like this.
+
+\getbuffer[example]
+
+Sometimes you want to grab an argument but are not interested in the results. For this we have
+two specifiers: one that just ignores the argument, and another one that keeps counting but
+discards it, i.e.\ the related parameter is empty.
+
+\startbuffer[definition]
+\def\macro[#1][#0][#3][#-][#4]%
+ {\dontleavehmode\hbox spread 1em
+ {\vl\type{#1}\vl\type{#2}\vl\type{#3}\vl\type{#4}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+The second argument is empty and the fourth argument is simply ignored which is why we need
+\type {#4} for the fifth entry.
+
+\startbuffer[example]
+\macro [1][2][3][4][5]
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+Here is proof that it works:
+
+\getbuffer[example]
+
+The reasoning behind dropping arguments is that for some cases we get around the
+nine argument limitation, but more important is that we don't construct token
+lists that are not used, which is more memory (and maybe even \CPU\ cache)
+friendly.
+
+Spaces are always kind of special in \TEX, so it will be no surprise that we have
+another specifier that relates to spaces.
+
+\startbuffer[definition]
+\def\macro[#1]#*[#2]%
+ {\dontleavehmode\hbox spread 1em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+This permits usage like the following:
+
+\startbuffer[example]
+\macro [1][2]
+\macro [1] [2]
+\stopbuffer
+
+\typebuffer[example][option=TEX] \getbuffer[example]
+
+Without the optional \quote {grab spaces} specifier the second line would
+possibly throw an error. This because \TEX\ then tries to match \type{][} so the
+\type {] [} in the input is simply added to the first argument and the next
+occurrence of \type {][} will be used. That one can be someplace further in your
+source and if not \TEX\ complains about a premature end of file. But, with the
+\type {#*} option it works out okay (unless of course you don't have that second
+argument \type {[2]}.
+
+Now, you might wonder if there is a way to deal with that second delimited
+argument being optional and of course that can be programmed quite well in
+traditional macro code. In fact, \CONTEXT\ does that a lot because it is set up
+as a parameter driven system with optional arguments. That subsystem has been
+optimized to the max over years and it works quite well and performance wise
+there is very little to gain. However, as soon as you enable tracing you end up
+in an avalanche of expansions and that is no fun.
+
+This time the solution is not in some special specifier but in the way a macro
+gets defined.
+
+\startbuffer[definition]
+\tolerant\def\macro[#1]#*[#2]%
+ {\dontleavehmode\hbox spread 1em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+The magic \type {\tolerant} prefix with delimited arguments and just quits when
+there is no match. So, this is acceptable:
+
+\startbuffer[example]
+\macro [1][2]
+\macro [1] [2]
+\macro [1]
+\macro
+\stopbuffer
+
+\typebuffer[example][option=TEX] \getbuffer[example]
+
+We can check how many arguments have been processed with a dedicated conditional:
+
+\startbuffer[definition]
+\tolerant\def\macro[#1]#*[#2]%
+ {\ifarguments 0\or 1\or 2\or ?\fi: \vl\type{#1}\vl\type{#2}\vl}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+We use this test:
+
+\startbuffer[example]
+\macro [1][2] \macro [1] [2] \macro [1] \macro
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+The result is: \inlinebuffer[example]\ which is what we expect because we flush
+inline and there is no change of mode. When the following definition is used in
+display mode, the leading \type {n=} can for instance start a new paragraph and
+when code in \type {\everypar} you can loose the right number when macros get
+expanded before the \type {n} gets injected.
+
+\starttyping[option=TEX]
+\tolerant\def\macro[#1]#*[#2]%
+ {n=\ifarguments 0\or 1\or 2\or ?\fi: \vl\type{#1}\vl\type{#2}\vl}
+\stoptyping
+
+In addition to the \type {\ifarguments} test primitive there is also a related
+internal counter \type {\lastarguments} set that you can consult, so the \type
+{\ifarguments} is actually just a shortcut for \typ {\ifcase \lastarguments}.
+
+We now continue with the argument specifiers and the next two relate to this optional
+grabbing. Consider the next definition:
+
+\startbuffer[definition]
+\tolerant\def\macro#1#*#2%
+ {\dontleavehmode\hbox spread 1em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+With this test:
+
+\startbuffer[example]
+\macro {1} {2}
+\macro {1}
+\macro
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+We get:
+
+\getbuffer[example]
+
+This is okay because the last \type {\macro} is a valid (single token) argument. But, we
+can make the braces mandate:
+
+\startbuffer[definition]
+\tolerant\def\macro#=#*#=%
+ {\dontleavehmode\hbox spread 1em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+Here the \type {#=} forces a check for braces, so:
+
+\startbuffer[example]
+\macro {1} {2}
+\macro {1}
+\macro
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+gives this:
+
+\getbuffer[example]
+
+However, we do loose these braces and sometimes you don't want that. Of course when you pass the
+results downstream to another macro you can always add them, but it was cheap to add a related
+specifier:
+
+\startbuffer[definition]
+\tolerant\def\macro#_#*#_%
+ {\dontleavehmode\hbox spread 1em{\vl\type{#1}\vl\type{#2}\vl\hss}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+Again, the magic \type {\tolerant} prefix works will quit scanning when there is
+no match. So:
+
+\startbuffer[example]
+\macro {1} {2}
+\macro {1}
+\macro
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+leads to:
+
+\getbuffer[example]
+
+When you're tolerant it can be that you still want to pick up some argument
+later on. This is why we have a continuation option.
+
+\startbuffer[definition]
+\tolerant\def\foo [#1]#*[#2]#:#3{!#1!#2!#3!}
+\tolerant\def\oof[#1]#*[#2]#:(#3)#:#4{!#1!#2!#3!#4!}
+\tolerant\def\ofo [#1]#:(#2)#:#3{!#1!#2!#3!}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+Hopefully the next example demonstrates how it works:
+
+\startbuffer[example]
+\foo{3} \foo[1]{3} \foo[1][2]{3}
+\oof{4} \oof[1]{4} \oof[1][2]{4}
+\oof[1][2](3){4} \oof[1](3){4} \oof(3){4}
+\ofo{3} \ofo[1]{3}
+\ofo[1](2){3} \ofo(2){3}
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+As you can see we can have multiple continuations using the \type {#:} directive:
+
+\startlines \getbuffer[example] \stoplines
+
+The last specifier doesn't work well with the \type {\ifarguments} state because
+we no longer know what arguments were skipped. This is why we have another test
+for arguments. A zero value means that the next token is not a parameter
+reference, a value of one means that a parameter has been set and a value of two
+signals an empty parameter. So, it reports the state of the given parameter as
+a kind if \type {\ifcase}.
+
+\startbuffer[definition]
+\def\foo#1#2{ [\ifparameter#1\or(ONE)\fi\ifparameter#2\or(TWO)\fi] }
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+\startbuffer[example]
+\foo{1}{2} \foo{1}{} \foo{}{2} \foo{}{}
+\stopbuffer
+
+Of course the test has to be followed by a valid parameter specifier:
+
+\typebuffer[example][option=TEX]
+
+The previous code gives this:
+
+\getbuffer[example]
+
+A combination check \type {\ifparameters}, again a case, matches the first
+parameter that has a value set.
+
+We could add plenty of specifiers but we need to keep in ind that we're not
+talking of an expression scanner. We need to keep performance in mind, so nesting
+and backtracking are no option. We also have a limited set of useable single
+characters, but here's one that uses a symbol that we had left:
+
+\startbuffer[definition]
+\def\startfoo[#/]#/\stopfoo{ [#1](#2) }
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+\startbuffer[example]
+\startfoo [x ] x \stopfoo
+\startfoo [ x ] x \stopfoo
+\startfoo [ x] x \stopfoo
+\startfoo [ x] \par x \par \par \stopfoo
+\stopbuffer
+
+The slash directive removes leading and trailing so called spacers as well as tokens
+that represent a paragraph end:
+
+\typebuffer[example][option=TEX]
+
+So we get this:
+
+\getbuffer[example]
+
+The next directive, the quitter \type {#;}, is demonstrated with an example. When
+no match has occurred, scanning picks up after this signal, otherwise we just
+quit.
+
+\startbuffer[example]
+\tolerant\def\foo[#1]#;(#2){/#1/#2/}
+
+\foo[1]\quad\foo[2]\quad\foo[3]\par
+\foo(1)\quad\foo(2)\quad\foo(3)\par
+
+\tolerant\def\foo[#1]#;#={/#1/#2/}
+
+\foo[1]\quad\foo[2]\quad\foo[3]\par
+\foo{1}\quad\foo{2}\quad\foo{3}\par
+
+\tolerant\def\foo[#1]#;#2{/#1/#2/}
+
+\foo[1]\quad\foo[2]\quad\foo[3]\par
+\foo{1}\quad\foo{2}\quad\foo{3}\par
+
+\tolerant\def\foo[#1]#;(#2)#;#={/#1/#2/#3/}
+
+\foo[1]\quad\foo[2]\quad\foo[3]\par
+\foo(1)\quad\foo(2)\quad\foo(3)\par
+\foo{1}\quad\foo{2}\quad\foo{3}\par
+\stopbuffer
+
+\typebuffer[example][option=TEX] \startpacked \getbuffer[example] \stoppacked
+
+I have to admit that I don't really need it but it made some macros that I was
+redefining behave better, so there is some self|-|interest here. Anyway, I
+considered some other features, like picking up a detokenized argument but I
+don't expect that to be of much use. In the meantime we ran out of reasonable
+characters, but some day \type {#?} and \type {#!} might show up, or maybe I find
+a use for \type {#<} and \type {#>}. A summary of all this is given here:
+
+\starttabulate[|T|i2l|]
+\FL
+\NC + \NC keep the braces \NC \NR
+\NC - \NC discard and don't count the argument \NC \NR
+\NC / \NC remove leading an trailing spaces and pars \NC \NR
+\NC = \NC braces are mandate \NC \NR
+\NC _ \NC braces are mandate and kept \NC \NR
+\NC ^ \NC keep leading spaces \NC \NR
+\ML
+\NC 1-9 \NC an argument \NC \NR
+\NC 0 \NC discard but count the argument \NC \NR
+\ML
+\NC * \NC ignore spaces \NC \NR
+\NC : \NC pick up scanning here \NC \NR
+\NC ; \NC quit scanning \NC \NR
+\LL
+\stoptabulate
+
+\stopsection
+
+\startsection[title=Runaway arguments]
+
+There is a particular troublesome case left: a runaway argument. The solution is
+not pretty but it's the only way: we need to tell the parser that it can quit.
+
+\startbuffer[definition]
+\tolerant\def\foo[#1=#2]%
+ {\ifarguments 0\or 1\or 2\or 3\or 4\fi:\vl\type{#1}\vl\type{#2}\vl}
+\stopbuffer
+
+\typebuffer[definition][option=TEX] \getbuffer[definition]
+
+\startbuffer[example]
+\dontleavehmode \foo[a=1]
+\dontleavehmode \foo[b=]
+\dontleavehmode \foo[=]
+\dontleavehmode \foo[x]\ignorearguments
+\stopbuffer
+
+The outcome demonstrates that one still has to do some additional checking for sane
+results and there are alternative way to (ab)use this mechanism. It all boils down
+to a clever combination of delimiters and \type {\ignorearguments}.
+
+\typebuffer[example][option=TEX]
+
+All calls are accepted:
+
+\startlines \getbuffer[example] \stoplines
+
+Just in case you wonder about performance: don't expect miracles here. On the one
+hand there is some extra overhead in the engine (when defining macros as well as
+when collecting arguments during a macro call) and maybe using these new features
+can sort of compensate that. As mentioned: the gain is mostly in cleaner macro
+code and less clutter in tracing. And I just want the \CONTEXT\ code to look
+nice: that way users can look in the source to see what happens and not drown in
+all these show|-|off tricks, special characters like underscores, at signs,
+question marks and exclamation marks.
+
+For the record: I normally run tests to see if there are performance side effects
+and as long as processing the test suite that has thousands of files of all kind
+doesn't take more time it's okay. Actually, there is a little gain in \CONTEXT\
+but that is to be expected, but I bet users won't notice it, because it's easily
+offset by some inefficient styling. Of course another gain of loosing some
+indirectness is that error messages point to the macro that the user called for
+and not to some follow up.
+
+\stopsection
+
+\startsection[title=Introspection]
+
+A macro has a meaning. You can serialize that meaning as follows:
+
+\startbuffer[definition]
+\tolerant\protected\def\foo#1[#2]#*[#3]%
+ {(1=#1) (2=#3) (3=#3)}
+
+\meaning\foo
+\stopbuffer
+
+\typebuffer[definition][option=TEX]
+
+The meaning of \type {\foo} comes out as:
+
+\startnarrower \getbuffer[definition] \stopnarrower
+
+When you load the module \type {system-tokens} you can also say:
+
+\startbuffer[example]
+\luatokentable\foo
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+This produces a table of tokens specifications:
+
+{\getbuffer[definition]\getbuffer[example]}
+
+A token list is a linked list of tokens. The magic numbers in the first column
+are the token memory pointers. and because macros (and token lists) get recycled
+at some point the available tokens get scattered, which is reflected in the order
+of these numbers. Normally macros defined in the macro package are more sequential
+because they stay around from the start. The second and third row show the so
+called command code and the specifier. The command code groups primitives in
+categories, the specifier is an indicator of what specific action will follow, a
+register number a reference, etc. Users don't need to know these details. This
+macro is a special version of the online variant:
+
+\starttyping[option=TEX]
+\showluatokens\foo
+\stoptyping
+
+That one is always available and shows a similar list on the console. Again, users
+normally don't want to know such details.
+
+\startsection[title=nesting]
+
+You can nest macros, as in:
+
+\startbuffer
+\def\foo#1#2{\def\oof##1{<#1>##1<#2>}}
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+At first sight the duplication of \type {#} looks strange but this is what
+happens. When \TEX\ scans the definition of \type {\foo} it sees two arguments.
+Their specification ends up in the preamble that defines the matching. When the
+body is scanned, the \type {#1} and \type {#2} are turned into a parameter
+reference. In order to make nested macros with arguments possible a \type {#}
+followed by another \type {#} becomes just one \type {#}. Keep in mind that the
+definition of \type {\oof} is delayed till the macro \type {\foo} gets expanded.
+That definition is just stored and the only thing that get's replaced are the two
+references to a macro parameter
+
+\luatokentable\foo
+
+Now, when we look at these details, it might become clear why for instance we
+have \quote {variable} names like \type {#4} and not \type {#whatever} (with or
+without hash). Macros are essentially token lists and token lists can be seen as
+a sequence of numbers. This is not that different from other programming
+environments. When you run into buzzwords like \quote {bytecode} and \quote
+{virtual machines} there is actually nothing special about it: some high level
+programming (using whatever concept, and in the case of \TEX\ it's macros)
+eventually ends up as a sequence of instructions, say bytecodes. Then you need
+some machinery to run over that and act upon those numbers. It's something you
+arrive at naturally when you play with interpreting languages. \footnote {I
+actually did when I wrote an interpreter for some computer assisted learning
+system, think of a kind of interpreted \PASCAL, but later realized that it was a a
+bytecode plus virtual machine thing. I'd just applied what I learned when playing
+with eight bit processors that took bytes, and interpreted opcodes and such.
+There's nothing spectacular about all this and I only realized decades later that
+the buzzwords describes old natural concepts.}
+
+So, internally a \type {#4} is just one token, a operator|-|operand combination
+where the operator is \quotation {grab a parameter} and the operand tells
+\quotation {where to store} it. Using names is of course an option but then one
+has to do more parsing and turn the name into a number \footnote {This is kind of
+what \METAPOST\ does with parameters to macros. The side effect is that in
+reporting you get \type {text0}, \type {expr2} and such reported which doesn't
+make things more clear.}, add additional checking in the macro body, figure out
+some way to retain the name for the purpose of reporting (which then uses more
+token memory or strings). It is simply not worth the trouble, let alone the fact
+that we loose performance, and when \TEX\ showed up those things really mattered.
+
+It is also important to realize that a \type {#} becomes either a preamble token
+(grab an argument) or a reference token (inject the passed tokens into a new
+input level). Therefore the duplication of hash tokens \type {##} that you see in
+macro nested bodies also makes sense: it makes it possible for the parser to
+distinguish between levels. Take:
+
+\starttyping[option=TEX]
+\def\foo#1{\def\oof##1{#1##1#1}}
+\stoptyping
+
+Of course one can think of this:
+
+\starttyping[option=TEX]
+\def\foo#fence{\def\oof#text{#fence#text#fence}}
+\stoptyping
+
+But such names really have to be unique then! Actually \CONTEXT\ does have an
+input method that supports such names, but discussing it here is a bit out of
+scope. Now, imagine that in the above case we use this:
+
+\starttyping[option=TEX]
+\def\foo[#1][#2]{\def\oof##1{#1##1#2}}
+\stoptyping
+
+If you're a bit familiar with the fact that \TEX\ has a model of category codes
+you can imagine that a predictable \quotation {hash followed by a number} is way
+more robust than enforcing the user to ensure that catcodes of \quote {names} are
+in the right category (read: is a bracket part of the name or not). So, say that
+we go completely arbitrary names, we then suddenly needs some escaping, like:
+
+\starttyping[option=TEX]
+\def\foo[#{left}][#{right}]{\def\oof#{text}{#{left}#{text}#{right}}}
+\stoptyping
+
+And, if you ever looked into macro packages, you will notice that they differ in
+the way they assign category codes. Asking users to take that into account when
+defining macros makes not that much sense.
+
+So, before one complains about \TEX\ being obscure (the hash thing), think twice.
+Your demand for simplicity for your coding demand will make coding more
+cumbersome for the complex cases that macro packages have to deal with. It's
+comparable using \TEX\ for input or using (say) mark down. For simple documents
+the later is fine, but when things become complex, you end up with similar
+complexity (or even worse because you lost the enforced detailed structure). So,
+just accept the unavoidable: any language has its peculiar properties (and for
+sure I do know why I dislike some languages for it). The \TEX\ system is not the
+only one where dollars, percent signs, ampersands and hashes have special
+meaning.
+
+\stopsection
+
+\startsection[title=Prefixes]
+
+Traditional \TEX\ has three prefixes that can be used with macros: \type {\global},
+\type {\outer} and \type {\long}. The last two are no|-|op's in \LUAMETATEX\ and
+if you want to know what they do (did) you can look it up in the \TEX book. The
+\ETEX\ extension gave us \type {\protected}.
+
+In \LUAMETATEX\ we have \type {\global}, \type {\protected}, \type {\tolerant}
+and overload related prefixes like \type {\frozen}. A protected macro is one that
+doesn't expand in an expandable context, so for instance inside an \type {\edef}.
+You can force expansion by using the \type {\expand} primitive in front which is
+also something \LUAMETATEX.
+
+% A protected macro can be made expandable by \typ {\unletprotected} and can be
+% protected with \typ {\letprotected}.
+%
+% \startbuffer[example]
+% \def\foo{foo} \edef\oof{oof\foo} 1: \meaning\oof
+% \protected\def\foo{foo} \edef\oof{oof\foo} 2: \meaning\oof
+% \unletprotected \foo \edef\oof{oof\foo} 3: \meaning\oof
+% \stopbuffer
+%
+% \typebuffer[example][option=TEX]
+%
+% \startlines \getbuffer[example] \stoplines
+
+Frozen macros cannot be redefined without some effort. This feature can to some
+extent be used to prevent a user from overloading, but it also makes it harder
+for the macro package itself to redefine on the fly. You can remove the lock with
+\typ {\unletfrozen} and add a lock with \typ {\letfrozen} so in the end users
+still have all the freedoms that \TEX\ normally provides.
+
+\startbuffer[example]
+ \def\foo{foo} 1: \meaning\foo
+ \frozen\def\foo{foo} 2: \meaning\foo
+ \unletfrozen \foo 3: \meaning\foo
+\protected\frozen\def\foo{foo} 4: \meaning\foo
+ \unletfrozen \foo 5: \meaning\foo
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+\startlines \overloadmode0 \getbuffer[example] \stoplines
+
+This actually only works when you have set \type {\overloadmode} to a value that
+permits redefining a frozen macro, so for the purpose of this example we set it
+to zero.
+
+A \type {\tolerant} macro is one that will quit scanning arguments when a
+delimiter cannot be matched. We saw examples of that in a previous section.
+
+These prefixes can be chained (in arbitrary order):
+
+\starttyping[option=TEX]
+\frozen\tolerant\protected\global\def\foo[#1]#*[#2]{...}
+\stoptyping
+
+There is actually an additional prefix, \type {\immediate} but that one is there
+as signal for a macro that is defined in and handled by \LUA. This prefix can
+then perform the same function as the one in traditional \TEX, where it is used
+for backend related tasks like \type {\write}.
+
+Now, the question is of course, to what extent will \CONTEXT\ use these new
+features. One important argument in favor of using \type {\tolerant} is that it
+gives (hopefully) better error messages. It also needs less code due to lack of
+indirectness. Using \type {\frozen} adds some safeguards although in some places
+where \CONTEXT\ itself overloads commands, we need to defrost. Adapting the code
+is a tedious process and it can introduce errors due to mistypings, although
+these can easily be fixed. So, it will be used but it will take a while to adapt
+the code base.
+
+One problem with frozen macros is that they don't play nice with for instance
+\type {\futurelet}. Also, there are places in \CONTEXT\ where we actually do
+redefine some core macro that we also want to protect from redefinition by a
+user. One can of course \type {\unletfrozen} such a command first but as a bonus
+we have a prefix \type {\overloaded} that can be used as prefix. So, one can easily
+redefine a frozen macro but it takes a little effort. After all, this feature is
+mainly meant to protect a user for side effects of definitions, and not as final
+blocker. \footnote {As usual adding features like this takes some experimenting
+and we're now at the third variant of the implementation, so we're getting there.
+The fact that we can apply such features in large macro package like \CONTEXT\
+helps figuring out the needs and best approaches.}
+
+A frozen macro can still be overloaded, so what if we want to prevent that? For
+this we have the \type {\permanent} prefix. Internally we also create primitives
+but we don't have a prefix for that. But we do have one for a very special case
+which we demonstrate with an example:
+
+\startbuffer[example]
+\def\FOO % trickery needed to pick up an optional argument
+ {\noalign{\vskip10pt}}
+
+\noaligned\protected\tolerant\def\OOF[#1]%
+ {\noalign{\vskip\iftok{#1}\emptytoks10pt\else#1\fi}}
+
+\starttabulate[|l|l|]
+ \NC test \NC test \NC \NR
+ \NC test \NC test \NC \NR
+ \FOO
+ \NC test \NC test \NC \NR
+ \OOF[30pt]
+ \NC test \NC test \NC \NR
+ \OOF
+ \NC test \NC test \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+When \TEX\ scans input (from a file or token list) and starts an alignment, it
+will pick up rows. When a row is finished it will look ahead for a \type
+{\noalign} and it expands the next token. However, when that token is protected,
+the scanner will not see a \type {\noalign} in that macro so it will likely start
+complaining when that next macro does get expanded and produces a \type
+{\noalign} when a cell is built. The \type {\noaligned} prefix flags a macro as
+being one that will do some \type {\noalign} as part of its expansion. This trick
+permits clean macros that pick up arguments. Of course it can be done with
+traditional means but this whole exercise is about making the code look nice.
+
+The table comes out as:
+
+\getbuffer[example]
+
+One can check the flags with \type {\ifflags} which takes a control sequence and
+a number, where valid numbers are:
+
+\starttabulate[|r|lw(8em)|r|lw(8em)|r|lw(8em)|r|lw(8em)|]
+\NC \the\frozenflagcode \NC frozen
+\NC \the\permanentflagcode \NC permanent
+\NC \the\immutableflagcode \NC immutable
+\NC \the\primitiveflagcode \NC primitive \NC \NR
+\NC \the\mutableflagcode \NC mutable
+\NC \the\noalignedflagcode \NC noaligned
+\NC \the\instanceflagcode \NC instance
+\NC \NC \NC \NR
+\stoptabulate
+
+The level of checking is controlled with the \type {\overloadmode} but I'm still
+not sure about how many levels we need there. A zero value disables checking,
+the values 1 and 3 give warnings and the values 2 and 4 trigger an error.
+
+\stopsection
+
+\stopdocument
+
+freezing pitfalls:
+
+- \futurelet : \overloaded needed
+- \let : \overloaded sometimes needed
+
+primitive protection:
+
+\newif\iffoo \footrue \foofalse : problem when we make iftrue and iffalse
+permanent ... they inherit, so we can't let them, we need a not permanent
+alias which is again tricky ... something native?
+
+immutable : still \count000 but we can consider blocking that, for instance
+by \def\count{some error}
+
+\defcsname
+\edefcsname
+\letcsname
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex
new file mode 100644
index 00000000000..3098333f013
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex
@@ -0,0 +1,948 @@
+% language=us
+
+\environment lowlevel-style
+
+\startdocument
+ [title=paragraphs,
+ color=middlecyan]
+
+\startsection[title=Introduction]
+
+This manual is mostly discussing a few low level wrappers around low level \TEX\
+features. Its writing is triggered by an update to the \METAFUN\ and \LUAMETAFUN\
+manuals where we mess a bit with shapes. It gave a good reason to also cover some
+more paragraph related topics but it might take a while to complete. Remind me if
+you feel that takes too much time.
+
+Because paragraphs and their construction are rather central to \TEX, you can
+imagine that the engine exposes dealing with them. This happens via commands
+(primitives) but only when it's robust. Then there are callbacks, and some
+provide detailed information about what we're dealing with. However, intercepting
+node lists can already be hairy and we do that a lot in \CONTEXT. Intercepting
+and tweaking paragraph properties is even more tricky, which is why we try to
+avoid that in the core. But \unknown\ in the following sections you will see that
+there are actually a couple of mechanism that do so. Often new features like this
+are built in stepwise and enabled locally for a while and when they seem okay
+they get enabled by default. \footnote {For this we have \type
+{\enableexperiments} which one can use in \type {cont-loc.mkxl} or \type
+{cont-exp.mkxl}, files that are loaded runtime when on the system. When you use
+them, make sure they don't interfere; they are not part of the updates, contrary
+to \type {cont-new.mkxl}.}
+
+\stopsection
+
+\startsection[title=Paragraphs]
+
+Before we demonstrate some trickery, let's see what a paragraph is. Normally a
+document source is formatted like this:
+
+\starttyping[option=TEX]
+some text (line 1)
+some text (line 2)
+
+some more test (line 1)
+some more test (line 2)
+\stoptyping
+
+There are two blocks of text here separated by an empty line and they become two
+paragraphs. Unless configured otherwise an empty line is an indication that we
+end a paragraph. You can also explicitly do that:
+
+\starttyping[option=TEX]
+some text (line 1)
+some text (line 2)
+\par
+some more test (line 1)
+some more test (line 2)
+\stoptyping
+
+When \TEX\ starts a paragraph, it actually also does something think of:
+
+\starttyping[option=TEX]
+[\the\everypar]some text (line 1) some text (line 2) \par
+[\the\everypar]some more test (line 1) some more test (line 2) \par
+\stoptyping
+
+or more accurate:
+
+\starttyping[option=TEX]
+[\the\everypar]some text some text \par
+[\the\everypar]some more test some more test \par
+\stoptyping
+
+because the end|-|of|-|line character has become a space. As mentioned,
+an empty line is actually the end of a paragraph. But in \LUAMETATEX\
+we can cheat a bit. If we have this:
+
+\startbuffer
+line 1
+
+line 2
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We can do this (watch how we need to permit overloading a primitive when we have
+enabled \type {\overloadmode}):
+
+\startbuffer
+\pushoverloadmode
+\def\linepar{\removeunwantedspaces !\ignorespaces}
+\popoverloadmode
+line 1
+
+line 2
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+This comes out as:
+
+\start \getbuffer \stop
+
+I admit that since it got added (as part of some cleanup halfway the overhaul of
+the engine) I never saw a reason to use it, but it is a cheap feature. The \type
+{\linepar} primitive is undefined (\type {\undefined}) by default so no user sees
+it anyway. Just don't use it unless maybe for some pseudo database trickery (I
+considered using it for the database module but it is not needed). In a similar
+fashion, just don't redefine \type {\par}: it's asking for troubles and \quote
+{not done} in \CONTEXT\ anyway.
+
+Back to reality. In \LUATEX\ we get a node list that starts with a so called
+\type {localpar} node and ends with a \type {\parfillskip}. The first node is
+prepended automatically. That list travels through the system: hyphenation,
+applying font properties, break the effectively one line into lines, wrap them
+and add them to a vertical list, etc. Each stage can be intercepted via
+callbacks.
+
+When the paragraph is broken into lines hanging indentation or a so called par
+shape can be applied, and we will see more of that later, here we talk \type
+{\par} and show another \LUAMETATEX\ trick:
+
+\startbuffer
+\def\foo{{\bf test:} \ignorepars}
+
+\foo
+
+line
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The macro typesets some text and then skips to the next paragraph:
+
+\start \getbuffer \stop
+
+Think of this primitive as being a more powerful variant of \type
+{\ignorespaces}. This leaves one aspect: how do we start a paragraph. Technically
+we need to force \TEX\ into so called horizontal mode. When you look at plain
+\TEX\ documents you will notice commands like \type {\noindent} and \type
+{\indent}. In \CONTEXT\ we have more high level variants, for instance we have
+\type {\noindentation}.
+
+A robust way to make sure that you get in horizontal mode is using \type
+{\dontleavehmode} which is a wink to \type {\leavevmode}, a command that you
+should never use in \CONTEXT, so when you come from plain or \LATEX, it's one of
+the commands you should wipe from your memory.
+
+When \TEX\ starts with a paragraph the \type {\everypar} token list is expanded
+and again this is a primitive you should not mess with yourself unless in very
+controlled situations. If you change its content, you're on your own with respect
+to interferences and side effects.
+
+One of the things that \TEX\ does in injecting the indentation. Even when there
+is none, it gets added, not as skip but as an empty horizontal box of a certain
+width. This is easier on the engine when it constructs the paragraph from the one
+liner: starting with a skip demands a bit more testing in the process (a nice
+trick so to say). However, in \CONTEXT\ we enable the \LUAMETATEX\ feature that
+does use a skip instead of a box. It's part of the normalization that is
+discussed later. Instead of checking for a box with property indent, we check for
+a skip with such property. This is often easier and cleaner.
+
+A bit off topic is the fact that in traditional \TEX\ empty lines or \type {\par}
+primitives can trigger an error. This has to do with the fact that the program
+evolved in a time where paper terminals were used and runtime could be excessive.
+So, in order to catch a possible missing brace, a concept of \type {\long}
+macros, permitting \type {\par} or equivalents in arguments, was introduced as
+well as not permitting them in for instance display math. In \CONTEXT\ \MKII\
+most macros that could be sensitive for this were defined as \type {\long} so
+that users never had to bother about it and probably were not even aware of it.
+Right from the start in \LUATEX\ these error|-|triggers could be disabled which
+of course we enable in \CONTEXT\ and in \LUAMETATEX\ these features have been
+removed altogether. I don't think users will complain about this.
+
+If you want to enforce a newline but not a new paragraph you can use the \type
+{\crlf} command. When used on its own it will produce an empty line. Don't use
+this to create whitespace between lines.
+
+If you want to do something after so called par tokens are seen you can do this:
+
+\startbuffer
+\def\foo{{\bf >>>> }}
+\expandafterpars\foo
+
+this is a new paragraph ...
+
+\expandafterpars\foo
+\par\par\par\par
+this is a new paragraph ...
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+This not to be confused with \type {\everypar} which is a token list that \TEX\
+itself injects before each paragraph (also nested ones).
+
+\getbuffer
+
+This is typically a primitive that will only be used in macros. You can actually
+program it using macros: pickup a token, check and push it back when it's not a
+par equivalent token. The primitive is is just nicer (and easier on the log when
+tracing is enabled).
+
+\stopsection
+
+\startsection[title=Properties]
+
+A paragraph is just a collection of lines that result from one input line that
+got broken. This process of breaking into lines is influenced by quite some
+parameters. In traditional \TEX\ and also in \LUAMETATEX\ by default the values
+that are in effect when the end of the paragraph is met are used. So, when you
+change them in a group and then ends the paragraph after the group, the values
+you've set in the group are not used.
+
+However, in \LUAMETATEX\ we can optionally store them with the paragraph. When
+that happens the values current at the start are frozen. You can still overload
+them but that has to be done explicitly then. The advantage is that grouping no
+longer interferes with the line break algorithm. The magic primitive is \type
+{\snapshotpar} which takes a number made from categories mentioned below:
+
+\starttabulate[|l|l|r|]
+\BC variable \BC category \BC code \NC \NR
+\NC \type {\hsize} \NC hsize \NC 0x\uchexnumbers\frozenhsizecode \NC \NR
+\NC \type {\leftskip} \NC skip \NC 0x\uchexnumbers\frozenskipcode \NC \NR
+\NC \type {\rightskip} \NC skip \NC 0x\uchexnumbers\frozenskipcode \NC \NR
+\NC \type {\hangindent} \NC hang \NC 0x\uchexnumbers\frozenhangcode \NC \NR
+\NC \type {\hangafter} \NC hang \NC 0x\uchexnumbers\frozenhangcode \NC \NR
+\NC \type {\parindent} \NC indent \NC 0x\uchexnumbers\frozenindentcode \NC \NR
+\NC \type {\parfillleftskip} \NC par fill \NC 0x\uchexnumbers\frozenparfillcode \NC \NR
+\NC \type {\parfillrightskip} \NC par fill \NC 0x\uchexnumbers\frozenparfillcode \NC \NR
+\NC \type {\adjustspacing} \NC adjust \NC 0x\uchexnumbers\frozenadjustcode \NC \NR
+\NC \type {\adjustspacingstep} \NC adjust \NC 0x\uchexnumbers\frozenadjustcode \NC \NR
+\NC \type {\adjustspacingshrink} \NC adjust \NC 0x\uchexnumbers\frozenadjustcode \NC \NR
+\NC \type {\adjustspacingstretch} \NC adjust \NC 0x\uchexnumbers\frozenadjustcode \NC \NR
+\NC \type {\protrudechars} \NC protrude \NC 0x\uchexnumbers\frozenprotrudecode \NC \NR
+\NC \type {\pretolerance} \NC tolerance \NC 0x\uchexnumbers\frozentolerancecode \NC \NR
+\NC \type {\tolerance} \NC tolerance \NC 0x\uchexnumbers\frozentolerancecode \NC \NR
+\NC \type {\emergencystretch} \NC stretch \NC 0x\uchexnumbers\frozenstretchcode \NC \NR
+\NC \type {\looseness} \NC looseness \NC 0x\uchexnumbers\frozenloosenesscode \NC \NR
+\NC \type {\lastlinefit} \NC last line \NC 0x\uchexnumbers\frozenlastlinecode \NC \NR
+\NC \type {\linepenalty} \NC line penalty \NC 0x\uchexnumbers\frozenlinepenaltycode \NC \NR
+\NC \type {\interlinepenalty} \NC line penalty \NC 0x\uchexnumbers\frozenlinepenaltycode \NC \NR
+\NC \type {\interlinepenalties} \NC line penalty \NC 0x\uchexnumbers\frozenlinepenaltycode \NC \NR
+\NC \type {\clubpenalty} \NC club penalty \NC 0x\uchexnumbers\frozenclubpenaltycode \NC \NR
+\NC \type {\clubpenalties} \NC club penalty \NC 0x\uchexnumbers\frozenclubpenaltycode \NC \NR
+\NC \type {\widowpenalty} \NC widow penalty \NC 0x\uchexnumbers\frozenwidowpenaltycode \NC \NR
+\NC \type {\widowpenalties} \NC widow penalty \NC 0x\uchexnumbers\frozenwidowpenaltycode \NC \NR
+\NC \type {\displaywidowpenalty} \NC display penalty \NC 0x\uchexnumbers\frozendisplaypenaltycode \NC \NR
+\NC \type {\displaywidowpenalties} \NC display penalty \NC 0x\uchexnumbers\frozendisplaypenaltycode \NC \NR
+\NC \type {\brokenpenalty} \NC broken penalty \NC 0x\uchexnumbers\frozenbrokenpenaltycode \NC \NR
+\NC \type {\adjdemerits} \NC demerits \NC 0x\uchexnumbers\frozendemeritscode \NC \NR
+\NC \type {\doublehyphendemerits} \NC demerits \NC 0x\uchexnumbers\frozendemeritscode \NC \NR
+\NC \type {\finalhyphendemerits} \NC demerits \NC 0x\uchexnumbers\frozendemeritscode \NC \NR
+\NC \type {\parshape} \NC shape \NC 0x\uchexnumbers\frozenshapecode \NC \NR
+\NC \type {\baselineskip} \NC line \NC 0x\uchexnumbers\frozenlinecode \NC \NR
+\NC \type {\lineskip} \NC line \NC 0x\uchexnumbers\frozenlinecode \NC \NR
+\NC \type {\lineskiplimit} \NC line \NC 0x\uchexnumbers\frozenlinecode \NC \NR
+\NC \type {\hyphenationmode} \NC hyphenation \NC 0x\uchexnumbers\frozenhyphenationcode \NC \NR
+\stoptabulate
+
+
+As you can see here, there are more paragraph related parameters than in for
+instance \PDFTEX\ and \LUATEX\ and these are (to be) explained in the
+\LUAMETATEX\ manual. You can imagine that keeping this around with the paragraph
+adds some extra overhead to the machinery but most users won't notice that
+because is is compensated by gains elsewhere.
+
+This is pretty low level and there are a bunch of helpers that support this but
+these are not really user level macros. As with everything \TEX\ you can mess
+around as much as you like, and the code gives plenty of examples but when you do
+this, you're on your own because it can interfere with \CONTEXT\ core
+functionality.
+
+In \LMTX\ taking these snapshots is turned on by default and because it thereby
+fundamentally influences the par builder, users can run into compatibility issues
+but in practice there has been no complaints (and this feature has been in use
+quite a while before this document was written). One reason for users not
+noticing is that one of the big benefits is probably handled by tricks mentioned
+on the mailing list. Imagine that you have this:
+
+\starttyping[option=TEX]
+{\bf watch out:} here is some text
+\stoptyping
+
+In this small example the result will be as expected. But what if something magic
+with the start of a paragraph is done? Like this:
+
+\starttyping[option=TEX]
+\placefigure[left]{A cow!}{\externalfigure[cow.pdf]}
+
+{\bf watch out:} here is some text ... of course much more is needed to
+ get a flow around the figure!
+\stoptyping
+
+The figure will hang at the left side of the paragraph but it is put there when
+the text starts and that happens inside the bold group. It means that the
+properties we set in order to get the shape around the figure are lost as soon as
+we're at \quote{\type {here is some text}} and definitely is wrong when the
+paragraph ends and the par builder has to use them to get the shape right. We get
+text overlapping the figure. A trick to overcome this is:
+
+\starttyping[option=TEX]
+\dontleavehmode {\bf watch out:} here is some text ... of course much
+ more is needed to get a flow around the figure!
+\stoptyping
+
+where the first macro makes sure we already start a paragraph before the group is
+entered (using a \type {\strut} also works). It's not nice and I bet users have
+been bitten by this and by now know the tricks. But, with snapshots such fuzzy
+hacks are not needed any more! The same is true with this:
+
+\starttyping[option=TEX]
+{\leftskip 1em some text \par}
+\stoptyping
+
+where we had to explicitly end the paragraph inside the group in order to retain
+the skip. I suppose that users normally use the high level environments so they
+never had to worry about this. It's also why users probably won't notice that
+this new mechanism has been active for a while. Actually, when you now change a
+parameter inside the paragraph its new value will not be applied (unless you
+prefix it with \type {\frozen} or snapshot it) but no one did that anyway.
+
+\stopsection
+
+\startsection[title=Wrapping up]
+
+In \CONTEXT\ \LMTX\ we have a mechanism to exercise macros (or content) before a
+paragraph ends. This is implemented using the \type {\wrapuppar} primitive. The
+to be wrapped up material is bound to the current paragraph which in order to
+get this done has to be started when this primitive is used.
+
+Although the high level interface has been around for a while it still needs a
+bit more testing (read: use cases are needed). In the few cases where we already
+use it application can be different because again it relates to snapshots. This
+because in the past we had to use tricks that also influenced the user interface
+of some macros (which made them less natural as one would expect). So the
+question is: where do we apply it in old mechanisms and where not.
+
+{\em todo: accumulation, interference, where applied, limitations}
+
+% \vbox {vbox : \wrapuppar{1}test\par x\wrapuppar{2}test}\blank
+% \vtop {vtop : \wrapuppar{1}test\par x\wrapuppar{2}test}\blank
+% \vcenter{vcenter : \wrapuppar{1}test\par x\wrapuppar{2}test}\blank
+% $$x = \vcenter{vcenter : \wrapuppar{1}test\par x\wrapuppar{2}test}$$\blank
+% x\vadjust{vadjust : \wrapuppar{1}test\par x\wrapuppar{2}test}x\blank
+
+\stopsection
+
+\startsection[title=Hanging]
+
+There are two mechanisms for getting a specific paragraph shape: rectangular
+hanging and arbitrary shapes. Both mechanisms work top|-|down. The first
+mechanism uses a combination of \type {\hangafter} and \type {\hangindent}, and
+the second one depends on \type {\parshape}. In this section we discuss the
+rectangular one.
+
+\startbuffer[demo-5]
+\hangafter 4 \hangindent 4cm \samplefile{tufte} \page
+\hangafter -4 \hangindent 4cm \samplefile{tufte} \page
+\hangafter 4 \hangindent -4cm \samplefile{tufte} \page
+\hangafter -4 \hangindent -4cm \samplefile{tufte} \page
+\stopbuffer
+
+\typebuffer[demo-5][option=TEX]
+
+As you can see in \in {figure} [fig:hang], the four cases are driven by the sign
+of the values. If you want to hang into the margin you need to use different
+tricks, like messing with the \type {\leftskip}, \type {\rightskip} or \type
+{\parindent} parameters (which then of course can interfere with other mechanisms
+uses at the same time).
+
+\startplacefigure[title=Hanging indentation,reference=fig:hang]
+\startcombination[nx=2,ny=2]
+ {\typesetbuffer[demo-5][page=1,width=.4\textwidth,frame=on]} {\type{\hangafter +4 \hangindent +4cm}}
+ {\typesetbuffer[demo-5][page=2,width=.4\textwidth,frame=on]} {\type{\hangafter -4 \hangindent +4cm}}
+ {\typesetbuffer[demo-5][page=3,width=.4\textwidth,frame=on]} {\type{\hangafter +4 \hangindent -4cm}}
+ {\typesetbuffer[demo-5][page=4,width=.4\textwidth,frame=on]} {\type{\hangafter -4 \hangindent -4cm}}
+\stopcombination
+\stopplacefigure
+
+\stopsection
+
+\startsection[title=Shapes]
+
+In \CONTEXT\ we don't use \type {\parshape} a lot. It is used in for instance
+side floats but even there not in all cases. It's more meant for special
+applications. This means that in \MKII\ and \MKIV\ we don't have some high level
+interface. However, when \METAFUN\ got upgraded to \LUAMETAFUN, and the manual
+also needed an update, one of the examples in that manual that used shapes also
+got done differently (read: nicer). And that triggered the arrival of a new low
+level shape mechanism.
+
+One important property of the \type {\parshape} mechanism is that it works per
+paragraph. You define a shape in terms of a left margin and width of a line. The
+shape has a fixed number of such pairs and when there is more content, the last
+one is used for the rest of the lines. When the paragraph is finished, the shape
+is forgotten. \footnote {Not discussed here is a variant that might end up in
+\LUAMETATEX\ that works with the progression, i.e.\ takes the height of the
+content so far into account. This is somewhat tricky because for that to work
+vertical skips need to be frozen, which is no real big deal but has to be done
+careful in the code.}
+
+The high level interface is a follow up on the example in the \METAFUN\ manual and
+uses shapes that carry over to the next paragraph. In addition we can cycle over
+a shape. In this interface shapes are defined using keyword. Here are some
+examples:
+
+\starttyping[option=TEX]
+\startparagraphshape[test]
+ left 1mm right 1mm
+ left 5mm right 5mm
+\stopparagraphshape
+\stoptyping
+
+This shape has only two entries so the first line will have a 1mm margin while
+later lines will get 5mm margins. This translates into a \type {\parshape} like:
+
+\starttyping[option=TEX]
+\parshape 2
+ 1mm \dimexpr\hsize-1mm\relax
+ 5mm \dimexpr\hsize-5mm\relax
+\stoptyping
+
+Watch the number \type {2}: it tells how many specification lines follow. As you
+see, we need to calculate the width.
+
+\starttyping[option=TEX]
+\startparagraphshape[test]
+ left 1mm right 1mm
+ left 5mm right 5mm
+ repeat
+\stopparagraphshape
+\stoptyping
+
+This variant will alternate between 1mm and 5mm margins. The repeating feature is
+translated as follows. Maybe at some point I will introduce a few more options.
+
+\starttyping[option=TEX]
+\parshape 2 options 1
+ 1mm \dimexpr\hsize-1mm\relax
+ 5mm \dimexpr\hsize-5mm\relax
+\stoptyping
+
+A shape can have some repetition, and we can save keystrokes by copying the last
+entry. The resulting \type {\parshape} becomes rather long.
+
+\starttyping[option=TEX]
+\startparagraphshape[test]
+ left 1mm right 1mm
+ left 2mm right 2mm
+ left 3mm right 3mm
+ copy 8
+ left 4mm right 4mm
+ left 5mm right 5mm
+ left 5mm hsize 10cm
+\stopparagraphshape
+\stoptyping
+
+Also watch the \type {hsize} keyword: we don't calculate the hsize from the \type
+{left} and \type {right} values but explicitly set it.
+
+\starttyping[option=TEX]
+\startparagraphshape[test]
+ left 1mm right 1mm
+ right 3mm
+ left 5mm right 5mm
+ repeat
+\stopparagraphshape
+\stoptyping
+
+When a \type {right} keywords comes first the \type {left} is assumed to be zero.
+In the examples that follow we will use a couple of definitions:
+
+\startbuffer[setup-0]
+\startparagraphshape[test]
+ both 1mm both 2mm both 3mm both 4mm both 5mm both 6mm
+ both 7mm both 6mm both 5mm both 4mm both 3mm both 2mm
+\stopparagraphshape
+\stopbuffer
+
+\startbuffer[setup-0-repeat]
+\startparagraphshape[test-repeat]
+ both 1mm both 2mm both 3mm both 4mm both 5mm both 6mm
+ both 7mm both 6mm both 5mm both 4mm both 3mm both 2mm
+ repeat
+\stopparagraphshape
+\stopbuffer
+
+\typebuffer[setup-0,setup-0-repeat][option=TEX]
+
+The last one could also be defines as:
+
+\starttyping[option=TEX]
+\startparagraphshape[test-repeat]
+ \rawparagraphshape{test} repeat
+\stopparagraphshape
+\stoptyping
+
+In the previous code we already introduced the \type {repeat} option. This will
+make the shape repeat at the engine level when the shape runs out of specified
+lines. In the application of a shape definition we can specify a \type {method}
+to be used and that determine if the next paragraph will start where we left off
+and discard afterwards (\type {shift}) or that we move the discarded lines up
+front so that we never run out of lines (\type {cycle}). It sounds complicated
+but just keep in mind that \type {repeat} is part of the \type {\parshape} and
+act within a paragraph while \type {shift} and \type {cycle} are applied when a
+new paragraph is started.
+
+\startbuffer[demo-1]
+\startshapedparagraph[list=test]
+ \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
+\stopshapedparagraph
+\stopbuffer
+
+\startbuffer[demo-1-repeat]
+\startshapedparagraph[list=test-repeat]
+ \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
+\stopshapedparagraph
+\stopbuffer
+
+In \in {figure} [fig:shape:discard] you see the following applied:
+
+\typebuffer[demo-1,demo-1-repeat][option=TEX]
+
+\startplacefigure[title=Discarded shaping,reference=fig:shape:discard]
+\startcombination[nx=2,ny=2]
+ {\typesetbuffer[setup-0,demo-1] [page=1,width=.4\textwidth,frame=on]} {discard, finite shape, page 1}
+ {\typesetbuffer[setup-0,demo-1] [page=2,width=.4\textwidth,frame=on]} {discard, finite shape, page 2}
+ {\typesetbuffer[setup-0,demo-1-repeat][page=1,width=.4\textwidth,frame=on]} {discard, repeat in shape, page 1}
+ {\typesetbuffer[setup-0,demo-1-repeat][page=2,width=.4\textwidth,frame=on]} {discard, repeat in shape, page 2}
+\stopcombination
+\stopplacefigure
+
+In \in {figure} [fig:shape:shift] we use this instead:
+
+\startbuffer[demo-2]
+\startshapedparagraph[list=test,method=shift]
+ \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
+\stopshapedparagraph
+\stopbuffer
+
+\startbuffer[demo-2-shift]
+\startshapedparagraph[list=test-repeat,method=shift]
+ \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
+\stopshapedparagraph
+\stopbuffer
+
+\typebuffer[demo-2,demo-2-repeat][option=TEX]
+
+\startplacefigure[title=Shifted shaping,reference=fig:shape:shift]
+\startcombination[nx=2,ny=2]
+ {\typesetbuffer[setup-0,demo-2][page=1,width=.4\textwidth,frame=on]} {shift, finite shape, page 1}
+ {\typesetbuffer[setup-0,demo-2][page=2,width=.4\textwidth,frame=on]} {shift, finite shape, page 2}
+ {\typesetbuffer[setup-0-repeat,demo-2-shift][page=1,width=.4\textwidth,frame=on]} {shift, repeat in shape, page 1}
+ {\typesetbuffer[setup-0-repeat,demo-2-shift][page=2,width=.4\textwidth,frame=on]} {shift, repeat in shape, page 2}
+\stopcombination
+\stopplacefigure
+
+Finally, in \in {figure} [fig:shape:cycle] we use:
+
+\startbuffer[demo-3]
+\startshapedparagraph[list=test,method=cycle]
+ \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
+\stopshapedparagraph
+\stopbuffer
+
+\startbuffer[demo-3-cycle]
+\startshapedparagraph[list=test-repeat,method=cycle]
+ \dorecurse{8}{\showparagraphshape\samplefile{tufte} \par}
+\stopshapedparagraph
+\stopbuffer
+
+\typebuffer[demo-3,demo-3-repeat][option=TEX]
+
+\startplacefigure[title=Cycled shaping,reference=fig:shape:cycle]
+\startcombination[nx=2,ny=2]
+ {\typesetbuffer[setup-0,demo-3][page=1,width=.4\textwidth,frame=on]} {cycle, finite shape, page 1}
+ {\typesetbuffer[setup-0,demo-3][page=2,width=.4\textwidth,frame=on]} {cycle, finite shape, page 2}
+ {\typesetbuffer[setup-0-repeat,demo-3-cycle][page=1,width=.4\textwidth,frame=on]} {cycle, repeat in shape, page 1}
+ {\typesetbuffer[setup-0-repeat,demo-3-cycle][page=2,width=.4\textwidth,frame=on]} {cycle, repeat in shape, page 2}
+\stopcombination
+\stopplacefigure
+
+These examples are probably too small to see the details but you can run them
+yourself or zoom in on the details. In the margin we show the values used. Here
+is a simple example of (non) poetry. There are other environments that can be
+used instead but this makes a good example anyway.
+
+\startbuffer
+\startparagraphshape[test]
+ left 0em right 0em
+ left 1em right 0em
+ repeat
+\stopparagraphshape
+
+\startshapedparagraph[list=test,method=cycle]
+ verse line 1.1\crlf verse line 2.1\crlf
+ verse line 3.1\crlf verse line 4.1\par
+ verse line 1.2\crlf verse line 2.2\crlf
+ verse line 3.2\crlf verse line 4.2\crlf
+ verse line 5.2\crlf verse line 6.2\par
+\stopshapedparagraph
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\start \getbuffer \stop
+
+Because the idea for this feature originates in \METAFUN, we will now kick in
+some \METAPOST. The following code creates a shape for a circle. We use a
+2mm offset here:
+
+\startbuffer
+\startuseMPgraphic{circle}
+ path p ; p := fullcircle scaled TextWidth ;
+ build_parshape(p,
+ 2mm, 0, 0,
+ LineHeight, StrutHeight, StrutDepth, StrutHeight
+ ) ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\start \getbuffer \stop
+
+We plug this into the already described macros:
+
+\startbuffer
+\startshapedparagraph[mp=circle]%
+ \setupalign[verytolerant,stretch,last]%
+ \samplefile{tufte}
+ \samplefile{tufte}
+\stopshapedparagraph
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+And get ourself a circular shape. Watch out, at this moment the shape environment
+does not add grouping so when as in this case you change the alignment it can
+influence the document.
+
+\start \getbuffer \stop
+
+\startbuffer[framed]
+\framed[align=normal,width=\textwidth,offset=2mm,strut=no]\bgroup
+ \getbuffer
+\egroup
+\stopbuffer
+
+Assuming that the shape definition above is in a buffer we can do this:
+
+\typebuffer[option=TEX]
+
+The result is shown in \in {figure} [fig:shape:circle]. Because all action
+happens in the framed environment, we can also use this definition:
+
+\starttyping[option=TEX]
+\startuseMPgraphic{circle}
+ path p ; p := fullcircle scaled \the\dimexpr\framedwidth+\framedoffset*2\relax ;
+ build_parshape(p,
+ \framedoffset, 0, 0,
+ LineHeight, StrutHeight, StrutDepth, StrutHeight
+ ) ;
+ draw p ;
+\stopuseMPgraphic
+\stoptyping
+
+\startplacefigure[title=A framed circular shape,reference=fig:shape:circle]
+ \getbuffer[framed]
+\stopplacefigure
+
+A mechanism like this is often never completely automatic in the sense that you
+need to keep an eye on the results. Depending on user demands more features can
+be added. With weird shapes you might want to set up the alignment to be \type
+{tolerant} and have some \type {stretch}.
+
+The interface described in the \METAFUN\ manual is pretty old, the time stamp of
+the original code is mid 2000, but the principles didn't change. The examples in
+\type {meta-imp-txt.mkxl} can now be written as:
+
+\startuseMPgraphic{test 1}
+ begingroup ;
+ save p ; path p ; p := fullcircle scaled 6cm ;
+ lmt_parshape [
+ path = p,
+ offset = BodyFontSize/2,
+ dx = 0, % default
+ dy = 0, % default
+ lineheight = LineHeight, % default
+ strutheight = StrutHeight, % default
+ strutdepth = StrutDepth, % default
+ topskip = StrutHeight, % default
+ ] ;
+ draw p withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{test 2}
+ begingroup ;
+ save p ; path p ; p := fullsquare rotated 45 scaled 5cm ;
+ lmt_parshape [
+ path = p,
+ offset = BodyFontSize/2,
+ trace = true,
+ ] ;
+ draw p withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{test 3}
+ begingroup ;
+ save w, h, p ; path p ; w := h := 6cm ;
+ p := (.5w,h) -- ( 0, h) -- (0,0) -- (w,0) &
+ ( w,0) .. (.75w,.5h) .. (w,h) & (w,h) -- cycle ;
+ lmt_parshape [
+ path = p,
+ offset = BodyFontSize/2,
+ ] ;
+ draw p withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{test 4}
+ begingroup ;
+ save d, p, q ; path p, q ; d := BodyFontSize/2;
+ vardef shape(expr w, h, o) =
+ (o,o) -- (w-o,o) & (w-o,o) .. (.75w-o,.5h) ..
+ (w-2o,h-o) & (w-2o,h-o) -- (o,h-o) -- cycle
+ enddef ;
+ p := shape(6cm, 6cm, d) ; q := shape(6cm, 6cm, 0) ;
+ lmt_parshape [
+ path = p,
+ offsetpath = q,
+ dx = d,
+ dy = d,
+ trace = true,
+ ] ;
+ draw q withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+
+\defineoverlay[test 1][\useMPgraphic{test 1}]
+\defineoverlay[test 2][\useMPgraphic{test 2}]
+\defineoverlay[test 3][\useMPgraphic{test 3}]
+\defineoverlay[test 4][\useMPgraphic{test 4}]
+
+\startbuffer
+ \startshapetext[test 1,test 2,test 3,test 4]
+ \setupalign[verytolerant,stretch,normal]%
+ \samplefile{douglas} % Douglas R. Hofstadter
+ \stopshapetext
+ \startcombination[2*2]
+ {\framed[offset=overlay,frame=off,background=test 1]{\getshapetext}}
+ {test 1}
+ {\framed[offset=overlay,frame=off,background=test 2]{\getshapetext}}
+ {test 2}
+ {\framed[offset=overlay,frame=off,background=test 3]{\getshapetext}}
+ {test 3}
+ {\framed[offset=overlay,frame=off,background=test 4]{\getshapetext}}
+ {test 4}
+ \stopcombination
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+In \in {figure} [fig:shapes:chain] we see the result. Watch how for two shapes
+we have enabled tracing. Of course you need to tweak till all fits well but we're
+talking of special situations anyway.
+
+\startplacefigure[Title=Multiple shapes,reference=fig:shapes:chain]
+ \getbuffer
+\stopplacefigure
+
+Here is a bit more extreme example. Again we use a circle:
+
+\startbuffer
+\startuseMPgraphic{circle}
+ lmt_parshape [
+ path = fullcircle scaled 136mm,
+ offset = 2mm,
+ bottomskip = - 1.5LineHeight,
+ ] ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+But we output a longer text:
+
+\startbuffer
+\startshapedparagraph[mp=circle,repeat=yes,method=cycle]%
+ \setupalign[verytolerant,stretch,last]\dontcomplain
+ {\darkred \samplefile{tufte}}\par
+ {\darkgreen \samplefile{tufte}}\par
+ {\darkblue \samplefile{tufte}}\par
+ {\darkcyan \samplefile{tufte}}\par
+ {\darkmagenta \samplefile{tufte}}\par
+\stopshapedparagraph
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We get a multi|-|page shape:
+
+\start \getbuffer \stop
+
+Compare this with:
+
+\startbuffer
+\startshapedparagraph[mp=circle,repeat=yes,method=cycle]%
+ \setupalign[verytolerant,stretch,last]\dontcomplain
+ {\darkred \samplefile{tufte}}
+ {\darkgreen \samplefile{tufte}}
+ {\darkblue \samplefile{tufte}}
+ {\darkcyan \samplefile{tufte}}
+ {\darkmagenta \samplefile{tufte}}
+\stopshapedparagraph
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Which gives:
+
+\start \getbuffer \stop
+
+Here the \type {bottomskip} takes care of subtle rounding issues as well as
+discarding the last line in the shape so that we get nicer continuation. There is
+no full automated solution for all you can come up with.
+
+Mixing a \METAPOST\ specification into a regular one is also possible. The next
+example demonstrates this as well as the option to remove some lines from a
+specification:
+
+\starttyping[option=TEX]
+\startparagraphshape[test]
+ left 0em right 0em
+ left 1em right 0em
+ metapost {circle}
+ delete 3
+ metapost {circle,circle,circle}
+ delete 7
+ metapost {circle}
+ repeat
+\stopparagraphshape
+\stoptyping
+
+You can combine a shape with narrowing a paragraph. Watch the \type {absolute}
+keyword in the next code. The result is shown in \in {figure} [fig:shape:skips].
+
+\startbuffer[demo-4]
+\startuseMPgraphic{circle}
+ lmt_parshape [
+ path = fullcircle scaled TextWidth,
+ bottomskip = - 1.5LineHeight,
+ ] ;
+\stopuseMPgraphic
+
+\startparagraphshape[test-1]
+ metapost {circle} repeat
+\stopparagraphshape
+
+\startparagraphshape[test-2]
+ absolute left metapost {circle} repeat
+\stopparagraphshape
+
+\startparagraphshape[test-3]
+ absolute right metapost {circle} repeat
+\stopparagraphshape
+
+\startparagraphshape[test-4]
+ absolute both metapost {circle} repeat
+\stopparagraphshape
+
+\showframe
+
+\startnarrower[4*left,2*right]
+ \startshapedparagraph[list=test-1,repeat=yes,method=repeat]%
+ \setupalign[verytolerant,stretch,last]\dontcomplain
+ \dorecurse{3}{\samplefile{thuan}}
+ \stopshapedparagraph
+ \page
+ \startshapedparagraph[list=test-2,repeat=yes,method=repeat]%
+ \setupalign[verytolerant,stretch,last]\dontcomplain
+ \dorecurse{3}{\samplefile{thuan}}
+ \stopshapedparagraph
+ \page
+ \startshapedparagraph[list=test-3,repeat=yes,method=repeat]%
+ \setupalign[verytolerant,stretch,last]\dontcomplain
+ \dorecurse{3}{\samplefile{thuan}}
+ \stopshapedparagraph
+ \page
+ \startshapedparagraph[list=test-4,repeat=yes,method=repeat]%
+ \setupalign[verytolerant,stretch,last]\dontcomplain
+ \dorecurse{3}{\samplefile{thuan}}
+ \stopshapedparagraph
+\stopnarrower
+\stopbuffer
+
+\typebuffer[demo-4][option=TEX]
+
+\startplacefigure[title=Skip compensation,reference=fig:shape:skips]
+\startcombination[nx=2,ny=2]
+ {\typesetbuffer[demo-4][page=1,width=.4\textwidth,frame=on]} {test 1}
+ {\typesetbuffer[demo-4][page=2,width=.4\textwidth,frame=on]} {test 2, left}
+ {\typesetbuffer[demo-4][page=3,width=.4\textwidth,frame=on]} {test 3, right}
+ {\typesetbuffer[demo-4][page=4,width=.4\textwidth,frame=on]} {test 4, both}
+\stopcombination
+\stopplacefigure
+
+\stopsection
+
+% \startsection[title=Linebreaks]
+\startsection[title=Modes]
+
+% \ruledvbox{1\ifhmode\writestatus{!}{HMODE 1}\fi} % hsize
+% \ruledvbox{\hbox{\strut 2}\ifhmode\writestatus{!}{HMODE 2}\fi} % fit
+% \ruledvbox{\hbox{\strut 3}\hbox{\strut 3}\ifhmode\writestatus{!}{HMODE 3}\fi} % fit
+% \ruledvbox{\hbox{\strut 4}4\ifhmode\writestatus{!}{HMODE 4}\fi} % hsize
+% \ruledvbox{\hbox{\strut 5}5\hbox{\strut 5}\ifhmode\writestatus{!}{HMODE 5}\fi} % hsize
+% \ruledvbox{6\hbox{\strut 6}\ifhmode\writestatus{!}{HMODE 6}\fi} % hsize
+
+{\em todo: some of the side effects of so called modes}
+
+\stopsection
+
+\startsection[title=Normalization]
+
+{\em todo: users don't need to bother about this but it might be interesting anyway}
+
+\stopsection
+
+\stopdocument
+
+\everyhbox \everyvbox : useless unless one resets
+\parattr
+\snapshotpar
+\wrapuppar
+
+% \parfillleftskip
+
+% I rewarded myself after writing a section by watching the video "Final Thing On
+% My Mind", The Pineapple This, Live, 2020, the usual perfect GH performance,
+% wondering if live would turn to normal so that we could go to such concerts once
+% again given successive covids. Writing manuals can do with a distraction.
+%
+% Gavin Harrison: Soundcheck, Drummerworld Jan 27, 2021 ... I wish I could make
+% something called a check into pefect solo. Okay, another section and I'll check
+% out the latest Simon Phillips and other favourite dummer uploads.
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex
new file mode 100644
index 00000000000..1313de92332
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex
@@ -0,0 +1,341 @@
+% language=us
+
+% \hfil \hss
+% spread
+
+\environment lowlevel-style
+
+\startdocument
+ [title=scope,
+ color=middleblue]
+
+\startsection[title=Introduction]
+
+When I visited the file where register allocations are implemented I wondered to
+what extend it made sense to limit allocation to global instances only. This
+chapter deals with this phenomena.
+
+\stopsection
+
+\startsection[title=Registers]
+
+In \TEX\ definitions can be local or global. Most assignments are local within a
+group. Registers and definitions can be assigned global by using the \type
+{\global} prefix. There are also some properties that are global by design, like
+\type {\prevdepth}. A mixed breed are boxes. When you tweak its dimensions you
+actually tweak the current box, which can be an outer level. Compare:
+
+\starttyping[option=TEX]
+\scratchcounter = 1
+here the counter has value 1
+\begingroup
+ \scratchcounter = 2
+ here the counter has value 2
+\endgroup
+here the counter has value 1
+\stoptyping
+
+with:
+
+\starttyping[option=TEX]
+\setbox\scratchbox=\hbox{}
+here the box has zero width
+\begingroup
+ \wd\scratchbox=10pt
+ here the box is 10pt wide
+\endgroup
+here the box is 10pt wide
+\stoptyping
+
+It all makes sense so a remark like \quotation {Assignments to box dimensions are
+always global} are sort of confusing. Just look at this:
+
+\startbuffer
+\setbox\scratchbox=\hbox to 20pt{}
+here the box is \the\wd\scratchbox\ wide\par
+\begingroup
+ \setbox\scratchbox=\hbox{}
+ here the box is \the\wd\scratchbox\ wide\par
+ \begingroup
+ \wd\scratchbox=15pt
+ here the box is \the\wd\scratchbox\ wide\par
+ \endgroup
+ here the box is \the\wd\scratchbox\ wide\par
+\endgroup
+here the box is \the\wd\scratchbox\ wide\par
+\stopbuffer
+
+\typebuffer[option=TEX] \startlines \getbuffer \stoplines
+
+If you don't think about it, what happens is what you expect. Now watch the next
+variant:
+
+\startbuffer
+\setbox\scratchbox=\hbox to 20pt{}
+here the box is \the\wd\scratchbox\ wide\par
+\begingroup
+ \setbox\scratchbox=\hbox{}
+ here the box is \the\wd\scratchbox\ wide\par
+ \begingroup
+ \global\wd\scratchbox=15pt
+ here the box is \the\wd\scratchbox\ wide\par
+ \endgroup
+ here the box is \the\wd\scratchbox\ wide\par
+\endgroup
+here the box is \the\wd\scratchbox\ wide\par
+\stopbuffer
+
+The \type {\global} is only effective for the current box. It is good to realize
+that when we talk registers, the box register behaves just like any other
+register but the manipulations happen to the current one.
+
+\typebuffer \startlines \getbuffer \stoplines
+
+\startbuffer
+\scratchdimen=20pt
+here the dimension is \the\scratchdimen\par
+\begingroup
+ \scratchdimen=0pt
+ here the dimension is \the\scratchdimen\par
+ \begingroup
+ \global\scratchdimen=15pt
+ here the dimension is \the\scratchdimen\par
+ \endgroup
+ here the dimension is \the\scratchdimen\par
+\endgroup
+here the dimension is \the\scratchdimen\par
+\stopbuffer
+
+\typebuffer[option=TEX] \startlines \getbuffer \stoplines
+
+\stopsection
+
+\startsection[title=Allocation]
+
+The plain \TEX\ format has set some standards and one of them is that registers
+are allocated with \type {\new...} commands. So we can say:
+
+\starttyping[option=TEX]
+\newcount\mycounta
+\newdimen\mydimena
+\stoptyping
+
+These commands take a register from the pool and relate the given name to that
+entry. In \CONTEXT\ we have a bunch of predefined scratch registers for general
+use, like:
+
+\startbuffer
+scratchcounter : \meaningfull\scratchcounter
+scratchcounterone : \meaningfull\scratchcounterone
+scratchcountertwo : \meaningfull\scratchcountertwo
+scratchdimen : \meaningfull\scratchdimen
+scratchdimenone : \meaningfull\scratchdimenone
+scratchdimentwo : \meaningfull\scratchdimentwo
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The meaning reveals what these are:
+
+\startlines \tttf \getbuffer \stoplines
+
+You can use the numbers directly but that is a bad idea because they can clash!
+In the original \TEX\ engine there are only 256 registers and some are used by
+the engine and the core of a macro package itself, so that leaves a little amount
+for users. The \ETEX\ extension lifted that limitation and bumped to 32K and
+\LUATEX\ upped that to 64K. One could go higher but what makes sense? These
+registers are taking part of the fixed memory slots because that makes nested
+(grouped) usage efficient and access fast. The number you see above is deduced
+from the so called command code (here indicated by \type {\count}) and an index
+encoded in the same token. So, \type {\scratchcounter} takes a single token
+contrary to the verbose \type {\count257} that takes four tokens where the number
+gets parsed every time it is needed. But those are details that a user can
+forget.
+
+As mentioned, commands like \type {\newcount \foo} create a global control
+sequence \type {\foo} referencing a counter. You can locally redefine that
+control sequence unless in \LUAMETATEX\ you have so called overload mode enabled.
+You can do local or global assignments to these registers.
+
+\starttyping[option=TEX]
+\scratchcounter = 123
+\begingroup
+ \scratchcounter = 456
+ \begingroup
+ \global\scratchcounter = 789
+ \endgroup
+\endgroup
+\stoptyping
+
+And in both cases count register 257 is set. When an assignment is global,
+all current values to that register get the same value. Normally this is all
+quite transparent: you get what you ask for. However the drawback is that
+as a user you cannot know what variables are already defined, which means
+that this will fail (that is: it will issue a message):
+
+\starttyping[option=TEX]
+\newcount\scratchcounter
+\stoptyping
+
+as will the second line in:
+
+\starttyping[option=TEX]
+\newcount\myscratchcounter
+\newcount\myscratchcounter
+\stoptyping
+
+In \CONTEXT\ the scratch registers are visible but there are lots of internally
+used ones are protected from the user by more obscure names. So what if you want
+to use your own register names without \CONTEXT\ barking to you about not being
+able to define it. This is why in \LMTX\ (and maybe some day in \MKIV) we now
+have local definitions:
+
+\startbuffer
+\begingroup
+ \newlocaldimen\mydimena \mydimena1\onepoint
+ \newlocaldimen\mydimenb \mydimenb2\onepoint
+ (\the\mydimena,\the\mydimenb)
+ \begingroup
+ \newlocaldimen\mydimena \mydimena3\onepoint
+ \newlocaldimen\mydimenb \mydimenb4\onepoint
+ \newlocaldimen\mydimenc \mydimenc5\onepoint
+ (\the\mydimena,\the\mydimenb,\the\mydimenc)
+ \begingroup
+ \newlocaldimen\mydimena \mydimena6\onepoint
+ \newlocaldimen\mydimenb \mydimenb7\onepoint
+ (\the\mydimena,\the\mydimenb)
+ \endgroup
+ \newlocaldimen\mydimend \mydimend8\onepoint
+ (\the\mydimena,\the\mydimenb,\the\mydimenc,\the\mydimend)
+ \endgroup
+ (\the\mydimena,\the\mydimenb)
+\endgroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The allocated registers get zero values but you can of course set them to any
+value that fits their nature:
+
+\startlines \getbuffer \stoplines
+
+\startbuffer
+\begingroup
+ \setnewlocaldimen\mydimena 1\onepoint
+ \setnewlocaldimen\mydimenb 2\onepoint
+ (\the\mydimena,\the\mydimenb)
+ \begingroup
+ \setnewlocaldimen\mydimena 3\onepoint
+ \setnewlocaldimen\mydimenb 4\onepoint
+ \setnewlocaldimen\mydimenc 5\onepoint
+ (\the\mydimena,\the\mydimenb,\the\mydimenc)
+ \begingroup
+ \setnewlocaldimen\mydimena 6\onepoint
+ \setnewlocaldimen\mydimenb 7\onepoint
+ (\the\mydimena,\the\mydimenb)
+ \endgroup
+ \setnewlocaldimen\mydimend 8\onepoint
+ (\the\mydimena,\the\mydimenb,\the\mydimenc,\the\mydimend)
+ \endgroup
+ (\the\mydimena,\the\mydimenb)
+\endgroup
+\stopbuffer
+
+You can also use the next variant where you also pass the initial value:
+
+\typebuffer[option=TEX]
+
+So, again we get:
+
+\startlines \getbuffer \stoplines
+
+When used in the body of the macro there is of course a little overhead
+involved in the repetitive allocation but normally that can be neglected.
+
+\stopsection
+
+\startsection[title=Files]
+
+When adding these new allocators I also wondered about the read and write
+allocators. We don't use them in \CONTEXT\ but maybe users like them, so let's
+give an example and see what more demands they have:
+
+\starttyping[option=TEX]
+\integerdef\StartHere\numexpr\inputlineno+2\relax
+\starthiding
+SOME LINE 1
+SOME LINE 2
+SOME LINE 3
+SOME LINE 4
+\stophiding
+\integerdef\StopHere\numexpr\inputlineno-2\relax
+\stoptyping
+
+% We need to be in the file!
+
+\integerdef\StartHere\numexpr\inputlineno+2\relax
+\starthiding
+SOME LINE 1
+SOME LINE 2
+SOME LINE 3
+SOME LINE 4
+\stophiding
+\integerdef\StopHere\numexpr\inputlineno-2\relax
+
+\startbuffer
+\begingroup
+ \newlocalread\myreada
+ \immediate\openin\myreada {lowlevel-scope.tex}
+ \dostepwiserecurse{\StopHere}{\StartHere}{-1}{
+ \readline\myreada line #1 to \scratchstring #1 : \scratchstring \par
+ }
+ \blank
+ \dostepwiserecurse{\StartHere}{\StopHere}{1}{
+ \read \myreada line #1 to \scratchstring #1 : \scratchstring \par
+ }
+ \immediate\closein\myreada
+\endgroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Here, instead of hard coded line numbers we used the stored values. The
+optional \type {line} keyword is a \LMTX\ speciality.
+
+\startlines \getbuffer \stoplines
+
+Actually an application can be found in a small (demonstration) module:
+
+\startbuffer
+\usemodule[system-readers]
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+This provides the code for doing this:
+
+\starttyping[option=TEX]
+\startmarkedlines[test]
+SOME LINE 1
+SOME LINE 2
+SOME LINE 3
+\stopmarkedlines
+
+\begingroup
+ \newlocalread\myreada
+ \immediate\openin\myreada {\markedfilename{test}}
+ \dostepwiserecurse{\lastmarkedline{test}}{\firstmarkedline{test}}{-1}{
+ \readline\myreada line #1 to \scratchstring #1 : \scratchstring \par
+ }
+ \immediate\closein\myreada
+\endgroup
+\stoptyping
+
+As you see in these examples, we an locally define a read channel without
+getting a message about it already being defined.
+
+\stopsection
+
+\stopdocument
+
+
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex
new file mode 100644
index 00000000000..4f705e37caa
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex
@@ -0,0 +1,254 @@
+% language=us
+
+% It took some time to get the right balance of using the overload related features
+% but at some point it started feeling right. Of course it will never be as
+% perfectly timed and integrated as Gavin Harrison performance on "Threatening War"
+% (youtube movie) but that doesn't mean I should not aim for perfection. But as
+% with drumming, it takes practising and that is what I did on a subset of sources
+% when writing the engine code.
+%
+% It tooks a few weeks but November 21 2020 the last of the core files was turned
+% \LMTX, not that the work was done (checking to be done (thanks Wolfgang!), imp
+% files to be checked, many \LUA\ files to be updated) but it's a start. This time
+% the musical timestamp is listening to Nikola Cvetkovic (piano) and history
+% podcasts.
+
+\usemodule[system-tokens]
+
+\environment lowlevel-style
+
+\startdocument
+ [title=security,
+ color=middleorange]
+
+\startsection[title=Preamble]
+
+Here I will discuss a moderate security subsystem of \LUAMETATEX\ and therefore
+\CONTEXT\ \LMTX. This is not about security in the sense of the typesetting
+machinery doing harm to your environment, but more about making sure that a user
+doesn't change the behavior of the macro package in ways that introduce
+interference and thereby unwanted side effect. It's all about protecting macros.
+
+This is all very experimental and we need to adapt the \CONTEXT\ source code to
+this. Actually that will happen a few times because experiments trigger that. It
+might take a few years before the security model is finalized and all files are
+updated accordingly. There are lots of files and macros involved. In the process
+the underlying features in the engine might evolve.
+
+\stopsection
+
+\startsection[title=Flags]
+
+Before we go into the security levels we see what flags can be set. The \TEX\
+language has a couple of so called prefixes that can be used when setting values
+and defining macros. Any engine that has traditional \TEX\ with \ETEX\ extensions
+can do this:
+
+\starttyping[option=TEX]
+ \def\foo{foo}
+\global \def\foo{foo}
+\global\protected\def\foo{foo}
+\stoptyping
+
+And \LUAMETATEX\ adds another one:
+
+\starttyping[option=TEX]
+ \tolerant \def\foo{foo}
+\global\tolerant \def\foo{foo}
+\global\tolerant\protected\def\foo{foo}
+\stoptyping
+
+What these prefixes do is discussed elsewhere. For now is is enough to know that
+the two optional prefixes \type {\protected} and \type {\tolerant} make for four
+distinctive cases of macro calls.
+
+But there are more prefixes:
+
+\starttabulate
+\HL
+\NC \type {frozen} \NC a macro that has to be redefined in a managed way \NC \NR
+\NC \type {permanent} \NC a macro that had better not be redefined \NC \NR
+\NC \type {primitive} \NC a primitive that normally will not be adapted \NC \NR
+\NC \type {immutable} \NC a macro or quantity that cannot be changed, it is a constant \NC \NR
+\NC \type {mutable} \NC a macro that can be changed no matter how well protected it is \NC \NR
+\HL
+\NC \type {instance} \NC a macro marked as (for instance) be generated by an interface \NC \NR
+\HL
+\NC \type {noaligned} \NC the macro becomes acceptable as \type {\noalign} alias \NC \NR
+\HL
+\NC \type {overloaded} \NC when permitted the flags will be adapted \NC \NR
+\NC \type {enforced} \NC all is permitted (but only in zero mode or ini mode) \NC \NR
+\NC \type {aliased} \NC the macro gets the same flags as the original \NC \NR
+\HL
+\stoptabulate
+
+These prefixed set flags to the command at hand which can be a macro but
+basically any control sequence.
+
+To what extent the engine will complain when a property is changed in a way that
+violates the above depends on the parameter \type {\overloadmode}. When this
+parameter is set to zero no checking takes place. More interesting are values
+larger than zero. If that is the case, when a control sequence is flagged as
+mutable, it is always permitted to change. When it is set to immutable one can
+never change it. The other flags determine the kind of checking done. Currently
+the following overload values are used:
+
+\starttabulate[|l|l|c|c|c|c|c|]
+ \NC \NC \BC immutable \BC permanent \BC primitive \BC frozen \BC instance \NC \NR
+ \NC 1 \NC warning \NC \star \NC \star \NC \star \NC \NC \NC \NR
+ \NC 2 \NC error \NC \star \NC \star \NC \star \NC \NC \NC \NR
+ \NC 3 \NC warning \NC \star \NC \star \NC \star \NC \star \NC \NC \NR
+ \NC 4 \NC error \NC \star \NC \star \NC \star \NC \star \NC \NC \NR
+ \NC 5 \NC warning \NC \star \NC \star \NC \star \NC \star \NC \star \NC \NR
+ \NC 6 \NC error \NC \star \NC \star \NC \star \NC \star \NC \star \NC \NR
+\stoptabulate
+
+The even values (except zero) will abort the run. In \CONTEXT\ we plug in a
+callback that deals with the messages. A value of 255 will freeze this parameter.
+At level five and above the \type {instance} flag is also checked but no drastic
+action takes place. We use this to signal to the user that a specific instance is
+redefined (of course the definition macros can check for that too).
+
+So, how does it work. The following is okay:
+
+\starttyping[option=TEX]
+\def\MacroA{A}
+\def\MacroB{B}
+\let\MyMacro\MacroA
+\let\MyMacro\MacroB
+\stoptyping
+
+The first two macros are ordinary ones, and the last two lines just create an alias. Such
+an alias shares the definition, but when for instance \type {\MacroA} is redefined, its
+new meaning will not be reflected in the alias.
+
+\starttyping[option=TEX]
+\permanent\protected\def\MacroA{A}
+\permanent\protected\def\MacroB{B}
+\let\MyMacro\MacroA
+\let\MyMacro\MacroB
+\stoptyping
+
+This also works, because the \type {\let} will create an alias with the protected
+property but it will not take the \type {permanent} propery along. For that we need
+to say:
+
+\starttyping[option=TEX]
+\permanent\protected\def\MacroA{A}
+\permanent\protected\def\MacroB{B}
+\permanent\let\MyMacro\MacroA
+\permanent\let\MyMacro\MacroB
+\stoptyping
+
+or, when we want to copy all properties:
+
+\starttyping[option=TEX]
+\permanent\protected\def\MacroA{A}
+\permanent\protected\def\MacroB{B}
+\aliased\let\MyMacro\MacroA
+\aliased\let\MyMacro\MacroB
+\stoptyping
+
+However, in \CONTEXT\ we have commands that we like to protect against
+overloading but at the same time have a different meaning depending on the use
+case. An example is the \type {\NC} (next column) command that has a different
+implementation in each of the table mechanisms.
+
+\starttyping[option=TEX]
+\permanent\protected\def\NC_in_table {...}
+\permanent\protected\def\NC_in_tabulate{...}
+\aliased\let\NC\NC_in_table
+\aliased\let\NC\NC_in_tabulate
+\stoptyping
+
+Here the second aliasing of \type {\NC} fails (assuming of course that we enabled
+overload checking). One can argue that grouping can be used but often no grouping
+takes place when we redefine on the fly. Because \type {frozen} is less restrictive
+than \type {primitive} or \type {permanent}, and of course \type {immutable}, the
+next variant works:
+
+\starttyping[option=TEX]
+\frozen\protected\def\NC_in_table {...}
+\frozen\protected\def\NC_in_tabulate{...}
+\overloaded\let\NC\NC_in_table
+\overloaded\let\NC\NC_in_tabulate
+\stoptyping
+
+However, in practice, as we want to keep the overload checking, we have to do:
+
+\starttyping[option=TEX]
+\frozen\protected\def\NC_in_table {...}
+\frozen\protected\def\NC_in_tabulate{...}
+\overloaded\frozen\let\NC\NC_in_table
+\overloaded\frozen\let\NC\NC_in_tabulate
+\stoptyping
+
+or use \type {\aliased}, but there might be conflicting permissions. This is not
+that nice, so there is a kind of dirty trick possible. Consider this:
+
+\starttyping[option=TEX]
+\frozen\protected\def\NC_in_table {...}
+\frozen\protected\def\NC_in_tabulate{...}
+\def\setNCintable {\enforced\let\frozen\let\NC\NC_in_table}
+\def\setNCintabulate{\enforced\let\frozen\let\NC\NC_in_tabulate}
+\stoptyping
+
+When we're in so called \type {initex} mode or when the overload mode is zero,
+the \type {\enforced} prefix is internalized in a way that signals that the
+follow up is not limited by the overload mode and permissions. This definition
+time binding mechanism makes it possible to use \type {permanent} macros that
+users cannot redefine, but existing macros can, unless of course they tweak the
+mode parameter.
+
+Now keep in mind that users can always cheat but that is intentional. If you
+really want to avoid that you can set the overload mode to 255 after which it
+cannot be set any more. However, it can be useful to set the mode to zero (or
+some warning level) when foreign macro packages are used.
+
+\stopsection
+
+\startsection[title=Complications]
+
+One side effect of all this is that all those prefixes can lead to more code. On
+the other hand we save some due to the extended macro argument handling features.
+When you take the size of the format file as reference, in the end we get a
+somewhat smaller file. Every token that you add of remove gives a 8~bytes
+difference. The extra overhead that got added to the engine is compensated by the
+fact that some macro implementations can be more efficient. In the end, in spite
+of these new features and the more extensive testing of flags performance is
+about the same. \footnote {And if you wonder about memory, by compacting the used
+(often scattered) token memory before dumping I manages to save some 512K on the
+format file, so often the loss and gain are somewhere else.}
+
+\stopsection
+
+\startsection[title=Introspection]
+
+In case you want to get some details about the properties of a macro, you can
+check its meaning. The full variant shows all of them.
+
+\startbuffer
+% a macro with two optional arguments with optional spacing in between:
+
+\permanent\tolerant\protected\def\MyFoo[#1]#*[#2]{(#1)(#2)}
+
+\meaningless\MyFoo\par
+\meaning \MyFoo\par
+\meaningfull\MyFoo\par
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startpacked \getbuffer \stoppacked
+
+\stopsection
+
+% In \CONTEXT:
+% c! v! s! ??
+% newif newcount ... newconditional etc
+% userinterface (permanent)
+% primitives
+% noaligned
+% frozen is for users
+
+\stopdocument
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex
index 25a3d178661..61d7dddad3c 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex
@@ -65,8 +65,8 @@
fill Page withcolor \MPcolor{maincolor} ;
- draw textext.urt("\TitlePageFont \getvariable{document}{title}") xsized (0.8w) shifted (.1w,.2h) withcolor .80white ;
- draw textext.top("\TitlePageFont \getvariable{document}{subtitle}") xsized (0.8w) shifted (.5w,.1h) withcolor .60white ;
+ draw textext.urt("\TitlePageFont \documentvariable{title}") xsized (0.8w) shifted (.1w,.2h) withcolor .80white ;
+ draw textext.top("\TitlePageFont \documentvariable{subtitle}") xsized (0.8w) shifted (.5w,.1h) withcolor .60white ;
StopPage ;
@@ -132,9 +132,9 @@ where it can find them.
\startsubject[title={Colofon}]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex
index 72c9528e8b3..a2c4636ed36 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex
@@ -34,10 +34,10 @@ draw lmt_arrow [
\startbuffer[1c]
\startMPcode
draw lmt_arrow [
- path = (fullcircle scaled 3cm rotated 45),
- pen = (pencircle xscaled 2mm yscaled 1mm rotated 45),
+ path = (fullcircle scaled 3cm rotated 145),
+ pen = (pencircle xscaled 4mm yscaled 2mm rotated 45),
]
- withpen pencircle xscaled 2mm yscaled 1mm rotated 45
+ withpen pencircle xscaled 1mm yscaled .5mm rotated 45
withcolor "darkblue" ;
\stopMPcode
\stopbuffer
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex
new file mode 100644
index 00000000000..17f4a449d36
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex
@@ -0,0 +1,138 @@
+% language=us
+
+\environment luametafun-style
+
+\startcomponent luametafun-color
+
+\startchapter[title={Color}]
+
+There are by now plenty of examples made by users that use color and \METAFUN\
+provides all kind of helpers. So do we need more? When I play around with things
+or when users come with questions that then result in a nice looking graphic, the
+result might en dup as example of coding. The following is an example of showing
+of colors. We have a helper that goes from a so called lab specification to rgb
+and it does that via xyz transformations. It makes no real sense to interface
+this beyond this converter. We use this opportunity to demonstrate how to make
+an interface.
+
+\startbuffer
+\startMPdefinitions
+ vardef cielabmatrix(expr l, mina, maxa, minb, maxb, stp) =
+ image (
+ for a = mina step stp until maxa :
+ for b = minb step stp until maxb :
+ draw (a,b) withcolor labtorgb(l,a,b) ;
+ endfor ;
+ endfor ;
+ )
+ enddef ;
+\stopMPdefinitions
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\getbuffer
+
+Here we define a macro that makes a color matrix. It can be used as follows
+
+\startbuffer
+\startcombination[nx=4,ny=1]
+ {\startMPcode draw cielabmatrix(20, -100, 100, -100, 100, 5) ysized 35mm withpen pencircle scaled 2.5 ; \stopMPcode} {\type {l = 20}}
+ {\startMPcode draw cielabmatrix(40, -100, 100, -100, 100, 5) ysized 35mm withpen pencircle scaled 2.5 ; \stopMPcode} {\type {l = 40}}
+ {\startMPcode draw cielabmatrix(60, -100, 100, -100, 100, 5) ysized 35mm withpen pencircle scaled 2.5 ; \stopMPcode} {\type {l = 60}}
+ {\startMPcode draw cielabmatrix(80, -100, 100, -100, 100, 5) ysized 35mm withpen pencircle scaled 2.5 ; \stopMPcode} {\type {l = 80}}
+\stopcombination
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+One can of course mess around a bit:
+
+\startbuffer
+\startcombination[nx=4,ny=1]
+ {\startMPcode draw cielabmatrix(20, -100, 100, -100, 100, 10) ysized 35mm randomized 1 withpen pensquare scaled 4 ; \stopMPcode} {\type {l = 20}}
+ {\startMPcode draw cielabmatrix(40, -100, 100, -100, 100, 10) ysized 35mm randomized 1 withpen pensquare scaled 4 ; \stopMPcode} {\type {l = 40}}
+ {\startMPcode draw cielabmatrix(60, -100, 100, -100, 100, 10) ysized 35mm randomized 1 withpen pensquare scaled 4 ; \stopMPcode} {\type {l = 60}}
+ {\startMPcode draw cielabmatrix(80, -100, 100, -100, 100, 10) ysized 35mm randomized 1 withpen pensquare scaled 4 ; \stopMPcode} {\type {l = 80}}
+\stopcombination
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+Normally, when you don't go beyond this kind of usage, a simple macro like the
+above will do. But when you want to make something that is upward compatible
+(which is one of the principles behind the \CONTEXT\ user interface(s), you can
+do this:
+
+\startbuffer
+\startcombination[nx=4,ny=1]
+ {\startMPcode draw lmt_labtorgb [ l = 20, step = 20 ] ysized 35mm withpen pencircle scaled 8 ; \stopMPcode} {\type {l = 20}}
+ {\startMPcode draw lmt_labtorgb [ l = 40, step = 20 ] ysized 35mm withpen pencircle scaled 8 ; \stopMPcode} {\type {l = 40}}
+ {\startMPcode draw lmt_labtorgb [ l = 60, step = 20 ] ysized 35mm withpen pencircle scaled 8 ; \stopMPcode} {\type {l = 60}}
+ {\startMPcode draw lmt_labtorgb [ l = 80, step = 20 ] ysized 35mm withpen pencircle scaled 8 ; \stopMPcode} {\type {l = 80}}
+\stopcombination
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+This is a predefined macro in the reserved \type {lmt_} namespace (don't use that
+one yourself, create your own). First we preset the possible parameters:
+
+\starttyping[option=MP]
+presetparameters "labtorgb" [
+ mina = -100,
+ maxa = 100,
+ minb = -100,
+ maxb = 100,
+ step = 5,
+ l = 50,
+] ;
+\stoptyping
+
+Next we define the main interface macro:
+
+\starttyping[option=MP]
+def lmt_labtorgb = applyparameters "labtorgb" "lmt_do_labtorgb" enddef ;
+\stoptyping
+
+Last we do the actual implementation, which looks a lot like the one we
+started with:
+
+\starttyping[option=MP]
+vardef lmt_do_labtorgb =
+ image (
+ pushparameters "labtorgb" ;
+ save l ; l := getparameter "l" ;
+ for a = getparameter "mina" step getparameter "step"
+ until getparameter "maxa" :
+ for b = getparameter "minb" step getparameter "step"
+ until getparameter "maxb" :
+ draw (a,b) withcolor labtorgb(l,a,b) ;
+ endfor ;
+ endfor ;
+ popparameters ;
+ )
+enddef ;
+\stoptyping
+
+Of course we can now add all kind of extra features but this is what we currently
+have. Maybe this doesn't belong in the \METAFUN\ core but it's not that much code
+and a nice demo. After all, there is much in there that is seldom used.
+
+\stopchapter
+
+\stopcomponent
+
+
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex
index 6892b21ce84..fa0e28510b1 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex
@@ -76,7 +76,7 @@ have a collection of modules for specific tasks.
\startlines
Hans Hagen
Hasselt NL
-August 2019 (and beyond)
+August 2021 (and beyond)
\stoplines
\stopchapter
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex
new file mode 100644
index 00000000000..cd4b6ddabd8
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex
@@ -0,0 +1,159 @@
+% language=us
+
+\environment luametafun-style
+
+\startcomponent luametafun-poisson
+
+\startchapter[title={Poisson}]
+
+
+When, after a post on the \CONTEXT\ mailing list, Aditya pointed me to an article
+on mazes I ended up at poisson distributions which to me looks nicer than what I
+normally do, fill a grid and then randomize the resulting positions. With some
+hooks this can be used for interesting patterns too. The algorithm is based on
+the discussion at:
+
+\starttyping
+http://devmag.org.za/2009/05/03/poisson-disk-sampling
+\stoptyping
+
+Other websites mention some variants on that but I saw no reason to look into
+those in detail. I can imagine more random related variants in this domain so
+consider this an appetizer. The user is rather simple because some macro is
+assumed to deal with the rendering of the distributed points. We just show some
+examples (because the interface might evolve).
+
+\startbuffer
+\startMPcode
+ draw lmt_poisson [
+ width = 40,
+ height = 40,
+ distance = 1,
+ count = 20,
+ macro = "draw"
+ ] xsized 4cm ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+ \getbuffer
+\stoplinecorrection
+
+\startbuffer
+\startMPcode
+ vardef tst (expr x, y, i, n) =
+ fill fullcircle scaled (10+10*(i/n)) shifted (10x,10y)
+ withcolor "darkblue" withtransparency (1,.5) ;
+ enddef ;
+
+ draw lmt_poisson [
+ width = 50,
+ height = 50,
+ distance = 1,
+ count = 20,
+ macro = "tst",
+ arguments = 4
+ ] xsized 6cm ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+ \getbuffer
+\stoplinecorrection
+
+\startbuffer
+\startMPcode
+ vardef tst (expr x, y, i, n) =
+ fill fulldiamond scaled (5+5*(i/n)) randomized 2 shifted (10x,10y)
+ withcolor "darkgreen" ;
+ enddef ;
+
+ draw lmt_poisson [
+ width = 50,
+ height = 50,
+ distance = 1,
+ count = 20,
+ macro = "tst",
+ initialx = 10,
+ initialy = 10,
+ arguments = 4
+ ] xsized 6cm ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+ \getbuffer
+\stoplinecorrection
+
+\startbuffer
+\startMPcode{doublefun}
+ vardef tst (expr x, y, i, n) =
+ fill fulldiamond randomized (.2*i/n) shifted (x,y);
+ enddef ;
+
+ draw lmt_poisson [
+ width = 150,
+ height = 150,
+ distance = 1,
+ count = 20,
+ macro = "tst",
+ arguments = 4
+ ] xsized 6cm withcolor "darkmagenta" ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+ \getbuffer
+\stoplinecorrection
+
+\startbuffer
+\startMPcode
+ vardef tst (expr x, y, i, n) =
+ draw externalfigure "cow.pdf" ysized (10+5*i/n) shifted (10x,10y);
+ enddef ;
+ draw lmt_poisson [
+ width = 20,
+ height = 20,
+ distance = 1,
+ count = 20,
+ macro = "tst"
+ arguments = 4,
+ ] xsized 6cm ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+ \getbuffer
+\stoplinecorrection
+
+The supported parameters are:
+
+\starttabulate[|T|T|T|p|]
+\FL
+\BC name \BC type \BC default \BC comment \NC \NR
+\ML
+\NC width \NC numeric \NC 50 \NC \NC \NR
+\NC height \NC numeric \NC 50 \NC \NC \NR
+\NC distance \NC numeric \NC 1 \NC \NC \NR
+\NC count \NC numeric \NC 20 \NC \NC \NR
+\NC macro \NC string \NC "draw" \NC \NC \NR
+\NC initialx \NC numeric \NC 10 \NC \NC \NR
+\NC initialy \NC numeric \NC 10 \NC \NC \NR
+\NC arguments \NC numeric \NC 4 \NC \NC \NR
+\LL
+\stoptabulate
+
+\stopchapter
+
+\stopcomponent
+
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex
new file mode 100644
index 00000000000..910a9dd6034
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex
@@ -0,0 +1,89 @@
+% language=us
+
+\environment luametafun-style
+
+\startcomponent luametafun-technology
+
+\startchapter[title={Technology}]
+
+The \METAPOST\ library that we use in \LUAMETATEX\ is a follow up on the library
+used in \LUATEX\ which itself is a follow up on the original \METAPOST\ program
+that again was a follow up on Don Knuths \METAFONT, the natural companion to
+\TEX.
+
+When we start with John Hobbies \METAPOST\ we see a graphical engine that
+provides a simple but powerful programming language meant for making graphics,
+not the freehand kind, but the more systematic ones. The output is \POSTSCRIPT\
+but a simple kind that can easily be converted to \PDF. \footnote {For that
+purpose I wrote a converter in the \TEX\ language for \PDFTEX, and even within
+the limitations of \TEX\ at that time (fonts, number of registers, memory) it
+worked out quite well.} It's output is very accurate and performance is great.
+
+As part of the \LUATEX\ development project Taco Hoekwater turned \METAPOST\ into
+\MPLIB, a downward compatible library where \METAPOST\ became a small program
+using that library. But there is more: there are (when enabled) backends that
+produce \PNG\ or \SVG, but when used these also add dependencies on moving
+targets. The library by default uses the so called scaled numbers: floats that
+internally are long integers. But it can also work in doubles, decimal and binary
+and especially the last two create a dependency on libraries. It is good to
+notice that as in the original \METAPOST\ the \POSTSCRIPT\ output handling is
+visible all over the source. Also, the way \TYPEONE\ fonts are handled has been
+extended, for instance by providing access to shapes.
+
+At some point a \LUA\ interface got added that made it possible to call out to
+the \LUA\ instance used in \LUATEX, so the three concepts: \TEX, \METAPOST\ and
+\LUA\ can combine forces. A snippet of code can be run, and a result can be piped
+back. Although there is some limited access to \METAPOST\ internals, the normal
+way to go is by serializing \METAPOST\ data to the \LUA\ end and let \METAPOST\
+scan the result using \type {scantokens}.
+
+The library in \LUAMETATEX\ is a bit different. Of course it has the same core
+graphic engine, but there is no longer a backend. In \CONTEXT\ \MKIV\ the
+\POSTSCRIPT\ (and other) backends were not used anyway because it operates on the
+exported \LUA\ representation of the result. Combined with the \type {prescript}
+and \type {postscript} features introduced in the library that provides all we
+need to make interesting extensions to the graphical engine (color, shading,
+image inclusion, text, etc). The \METAPOST\ font support features are also not
+used because we need support for \OPENTYPE\ and even in \MKII\ (for \PDFTEX\ and
+\XETEX) we used a different approach to fonts.
+
+It is for that reason that the library we use in \LUAMETATEX\ is a leaner version
+of its ancestor. As mentioned, there is no backend code, only the \LUA\ export,
+which saves a lot, and there are no traces of font support left, which also drops
+many lines of code. We forget about the binary number model because it needs a
+large library that also occasionally changes, but one can add it if needed. This
+means that there are no dependencies except for decimal but that library is
+relatively small and doesn't change at all. It also means that the resulting
+\MPLIB\ library is much smaller, but it's still a substantial component in
+\LUAMETATEX. Internally I use the future version number 3. The original
+\METAPOST\ program is version 1, so the library got version 2, and that one
+basically being frozen (it's in bug|-|fix mode) means that it will stick to that.
+
+Another difference is that from the \LUA\ end one has access to several scanners
+and also has possibilities to efficiently push back results to the engine.
+Running scripts can also be done more efficient. This permits a rather efficient
+(in terms of performance and memory usage) way to extend the language and add for
+instance key|/|value based interfaces. There are some more additions, like for
+instance pre- and postscripts to clip, boundary and group objects. Internals can
+be numeric, string and boolean. One can use \UTF\ input although that has also be
+added to the ancestor. Some redundant internal input|/|output remapping has been
+removed and we are more tolerant to newlines in return values from \LUA. Error
+messages have been normalized, internal documentation cleaned up a bit. A few
+anomalies have been fixed too. All in- and output is now under \LUA\ control.
+Etcetera. The (now very few) source files are still \CWEB\ files but the
+conversion to \CCODE\ is done with a \LUA\ script that uses (surprise) the
+\LUAMETATEX\ engine as \LUA\ processor. This give a bit nicer \CCODE\ output for
+when we view it in e.g.\ Visual Studio too (normally the \CWEB\ output is not
+meant to be seen by humans).
+
+Keep in mind that it's still \METAPOST\ with all it provided, but some has to be
+implemented in macros or in \LUA\ via callbacks. The simple fact that the
+original library is the standard and is also the core of \METAPOST\ most of these
+changes and additions cannot be backported to the original, but that is no big
+deal. The advantage is that we can experiment with new features without
+endangering users outside the \CONTEXT\ bubble. The same is true for the \LUA\
+interface, which already is upgraded in many aspects.
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex
index 2dd917cdfcf..6aaf166a5ed 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex
@@ -1,3 +1,6 @@
+% This file takes a while to process because we render some complex graphics. It
+% can be sped up by enabling caching, but for some images that has been disabled.
+
\setupfootertexts[{\tttf uncorrected draft}]
\environment luametafun-style
@@ -12,6 +15,7 @@
\stopfrontmatter
\startbodymatter
+ \component luametafun-technology
\component luametafun-text
% \component luametafun-grid
\component luametafun-axis
@@ -26,7 +30,9 @@
\component luametafun-function
\component luametafun-chart
\component luametafun-svg
+ \component luametafun-poisson
\component luametafun-fonts
+ \component luametafun-color
\component luametafun-groups
\component luametafun-interface
\stopbodymatter
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex
index 244c06c2a5c..d8e98efa291 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex
@@ -15,6 +15,9 @@
\libindex{find}
\libindex{known}
+{\em The callbacks are a moving target. Don't bother me with questions about
+them.}
+
This library has functions that register, find and list callbacks. Callbacks are
\LUA\ functions that are called in well defined places. There are two kinds of
callbacks: those that mix with existing functionality, and those that (when
@@ -73,147 +76,56 @@ if callback.known("foo") then ... end
\startsection[title={File related callbacks}][library=callback]
-The behaviour documented in this subsection is considered stable in the sense that
-there will not be backward|-|incompatible changes any more.
-
-\subsection{\cbk {find_read_file}}
-
-Your callback function should have the following conventions:
-
-\startfunctioncall
-<string> actual_name =
- function (<number> id_number, <string> asked_name)
-\stopfunctioncall
-
-Arguments:
-
-\startitemize
-
-\sym{id_number}
-
-This number is zero for the log or \prm {input} files. For \TEX's \prm {read}
-or \prm {write} the number is incremented by one, so \type {\read0} becomes~1.
-
-\sym{asked_name}
-
-This is the user|-|supplied filename, as found by \prm {input}, \prm {openin}
-or \prm {openout}.
-
-\stopitemize
-
-Return value:
-
-\startitemize
-
-\sym{actual_name}
-
-This is the filename used. For the very first file that is read in by \TEX, you
-have to make sure you return an \type {actual_name} that has an extension and
-that is suitable for use as \type {jobname}. If you don't, you will have to
-manually fix the name of the log file and output file after \LUATEX\ is finished,
-and an eventual format filename will become mangled. That is because these file
-names depend on the jobname.
-
-You have to return \type {nil} if the file cannot be found.
-
-\stopitemize
-
-\subsection{\cbk {find_data_file}}
-
-\topicindex{callbacks+data files}
-
-Your callback function should have the following conventions:
-
-\startfunctioncall
-<string> actual_name =
- function (<string> asked_name)
-\stopfunctioncall
-
-Return \type {nil} if the file cannot be found.
-
-\subsection{\cbk {find_format_file}}
+\subsection{\cbk {find_format_file} and \cbk {find_log_file}}
\topicindex{callbacks+format file}
+\topicindex{callbacks+log file}
-Your callback function should have the following conventions:
+These callbacks are called as:
\startfunctioncall
-<string> actual_name =
- function (<string> asked_name)
+<string> actualname =
+ function (<string> askedname)
\stopfunctioncall
-The \type {asked_name} is a format file for reading (the format file for writing
-is always opened in the current directory).
+The \type {askedname} is a format file for reading (the format file for writing
+is always opened in the current directory) or a log file for writing.
-\subsection{\cbk {open_read_file}}
+\subsection{\cbk {open_data_file}}
\topicindex{callbacks+opening files}
-Your callback function should have the following conventions:
+This callback function gets a filename passed:
\startfunctioncall
-<table> env =
- function (<string> file_name)
+<table> env = function (<string> filename)
\stopfunctioncall
-Argument:
-
-\startitemize
-
-\sym{file_name}
-
-The filename returned by a previous \cbk {find_read_file} or the return value of
-\type {kpse.find_file()} if there was no such callback defined.
-
-\stopitemize
-
-Return value:
-
-\startitemize
-
-\sym{env}
-
-This is a table containing at least one required and one optional callback
-function for this file. The required field is \type {reader} and the associated
-function will be called once for each new line to be read, the optional one is
-\type {close} that will be called once when \LUATEX\ is done with the file.
+The return value is either the boolean value false or a table with two functions.
+A mandate \type {reader} function fill be called once for each new line to be
+read, the optional \type {close} function will be called once \LUATEX\ is done
+with the file.
\LUATEX\ never looks at the rest of the table, so you can use it to store your
private per|-|file data. Both the callback functions will receive the table as
their only argument.
-\stopitemize
-
-\subsubsection{\type {reader}}
-
-\topicindex{callbacks+reader}
-
-\LUATEX\ will run this function whenever it needs a new input line from the file.
-
-\startfunctioncall
-function(<table> env)
- return <string> line
-end
-\stopfunctioncall
-
-Your function should return either a string or \type {nil}. The value \type {nil}
-signals that the end of file has occurred, and will make \TEX\ call the optional
-\type {close} function next.
-
-\subsubsection{\type {close}}
-
-\topicindex{callbacks+closing files}
-
-\LUATEX\ will run this optional function when it decides to close the file.
-
-\startfunctioncall
-function(<table> env)
-end
-\stopfunctioncall
-
-Your function should not return any value.
-
-\stopsection
+% No longer needed anyway.
+%
+% \subsection{\cbk {if_end_of_file}}
+%
+% \topicindex{callbacks+checking files}
+%
+% This callback has no arguments and your function should return true or false. The
+% callback is triggered by \type {\ifeof}. It's up to the macro package to come up
+% with a reasonable implementation. By default the test is always true.
+%
+% \startfunctioncall
+% <boolean> eof =
+% function ()
+% \stopfunctioncall
+%
+% \stopsection
\startsection[title={Data processing callbacks}][library=callback]
@@ -339,7 +251,7 @@ into a stack of \prm {hbox}es, after the addition of \prm {parfillskip}.
\startfunctioncall
function(<node> head, <string> groupcode)
- return true | false | <node> newhead
+ return <node> newhead
end
\stopfunctioncall
@@ -441,7 +353,7 @@ stack of \prm {hbox}es.
\startfunctioncall
function(<node> head, <string> groupcode)
- return true | false | <node> newhead
+ return <node> newhead
end
\stopfunctioncall
@@ -457,7 +369,7 @@ material. Math items and line boxes are ignored at the moment.
\startfunctioncall
function(<node> head, <string> groupcode, <number> size,
<string> packtype [, <string> direction] [, <node> attributelist])
- return true | false | <node> newhead
+ return <node> newhead
end
\stopfunctioncall
@@ -485,7 +397,7 @@ that it is called at different moments, there is an extra variable that matches
\startfunctioncall
function(<node> head, <string> groupcode, <number> size, <string> packtype,
<number> maxdepth [, <string> direction] [, <node> attributelist]))
- return true | false | <node> newhead
+ return <node> newhead
end
\stopfunctioncall
@@ -550,7 +462,7 @@ This callback is called when \TEX\ is ready to start boxing the box 255 for \prm
\startfunctioncall
function(<node> head, <string> groupcode, <number> size, <string> packtype,
<number> maxdepth [, <string> direction])
- return true | false | <node> newhead
+ return <node> newhead
end
\stopfunctioncall
@@ -619,13 +531,13 @@ pass.
You must not ruin the node list. For instance, the head normally is a local par node,
and the tail a glue. Messing too much can push \LUATEX\ into panic mode.
-\subsection{\type {insert_local_par}}
+\subsection{\type {insert_par}}
Each paragraph starts with a local par node that keeps track of for instance
the direction. You can hook a callback into the creator:
\startfunctioncall
-function(<node> local_par, <string> location)
+function(<node> par, <string> location)
end
\stopfunctioncall
@@ -694,7 +606,7 @@ This callback replaces the code that prints \LUATEX's statistics and \quote
{output written to} messages. The engine can still do housekeeping and therefore
you should not rely on this hook for postprocessing the \PDF\ or log file.
-\subsection{\cbk {show_error_hook}}
+\subsection{\cbk {intercept_tex_error}, \cbk {intercept_lua_error}}
\topicindex{callbacks+errors}
@@ -706,31 +618,22 @@ end
This callback is run from inside the \TEX\ error function, and the idea is to
allow you to do some extra reporting on top of what \TEX\ already does (none of
the normal actions are removed). You may find some of the values in the \type
-{status} table useful. This callback does not replace any internal code.
+{status} table useful. The \TEX\ related callback gets two arguments: the current
+processing mode and a boolean indicating if there was a runaway.
-\subsection{\cbk {show_error_message}}
+\subsection{\cbk {show_error_message} and \cbk {show_warning_message}}
\topicindex{callbacks+errors}
+\topicindex{callbacks+warnings}
\startfunctioncall
function()
end
\stopfunctioncall
-This callback replaces the code that prints the error message. The usual
+These callback replaces the code that prints the error message. The usual
interaction after the message is not affected.
-\subsection{\cbk {show_lua_error_hook}}
-
-\topicindex{callbacks+errors}
-
-\startfunctioncall
-function()
-end
-\stopfunctioncall
-
-This callback replaces the code that prints the extra \LUA\ error message.
-
\subsection{\cbk {start_file}}
\topicindex{callbacks+files}
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex
new file mode 100644
index 00000000000..103bb247310
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex
@@ -0,0 +1,22 @@
+\environment luametatex-style
+
+\startcomponent luametatex-codes
+
+\startchapter[title=Primitive codes]
+
+here follows a list with all primitives and their category is shown. When the
+engine starts up in ini mode all primitives get defined along with some
+properties that makes it possible to do a reverse lookup of a combination of
+command code and char code. But, a primitive, being also a regular command can be
+redefined later on. The table below shows the original pairs but in \CONTEXT\
+some of these primitives are redefined. However, any macro that fits a command
+and char pair is (reported as) a primitive in logs and error messages. In the end
+all tokens are such a combination, The first 16 command codes are reserved for
+characters (the whole \UNICODE\ range can be used as char code) with specific
+catcodes and not mentioned in the list.
+
+\ctxlua{document.allprimitives()}
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
index 35812b13fcf..5be5463e97e 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
@@ -10,7 +10,7 @@ As \LUAMETATEX\ is a leaner and meaner \LUATEX, this chapter will discuss
what is gone. We start with the primitives that were dropped.
\starttabulate[|l|pl|]
-\NC fonts \NC \type {\letterspacefont}
+\BC fonts \NC \type {\letterspacefont}
\type {\copyfont}
\type {\expandglyphsinfont}
\type {\ignoreligaturesinfont}
@@ -18,7 +18,7 @@ what is gone. We start with the primitives that were dropped.
\type {\leftghost}
\type {\rightghost}
\NC \NR
-\NC backend \NC \type {\dviextension}
+\BC backend \NC \type {\dviextension}
\type {\dvivariable }
\type {\dvifeedback}
\type {\pdfextension}
@@ -28,14 +28,14 @@ what is gone. We start with the primitives that were dropped.
\type {\draftmode}
\type {\outputmode}
\NC \NR
-\NC dimensions \NC \type {\pageleftoffset}
+\BC dimensions \NC \type {\pageleftoffset}
\type {\pagerightoffset}
\type {\pagetopoffset}
\type {\pagebottomoffset}
\type {\pageheight}
\type {\pagewidth}
\NC \NR
-\NC resources \NC \type {\saveboxresource}
+\BC resources \NC \type {\saveboxresource}
\type {\useboxresource}
\type {\lastsavedboxresourceindex}
\type {\saveimageresource}
@@ -43,11 +43,11 @@ what is gone. We start with the primitives that were dropped.
\type {\lastsavedimageresourceindex}
\type {\lastsavedimageresourcepages}
\NC \NR
-\NC positioning \NC \type {\savepos}
+\BC positioning \NC \type {\savepos}
\type {\lastxpos}
\type {\lastypos}
\NC \NR
-\NC directions \NC \type {\textdir}
+\BC directions \NC \type {\textdir}
\type {\linedir}
\type {\mathdir}
\type {\pardir}
@@ -56,21 +56,25 @@ what is gone. We start with the primitives that were dropped.
\type {\pagedirection}
\type {\bodydirection}
\NC \NR
-\NC randomizer \NC \type {\randomseed}
+\BC randomizer \NC \type {\randomseed}
\type {\setrandomseed}
\type {\normaldeviate}
\type {\uniformdeviate}
\NC \NR
-\NC utilities \NC \type {\synctex}
+\BC utilities \NC \type {\synctex}
\NC \NR
-\NC extensions \NC \type {\latelua}
+\BC extensions \NC \type {\latelua}
\type {\lateluafunction}
- \type {\immediate}
\type {\openout}
\type {\write}
\type {\closeout}
+ \type {\openin}
+ \type {\read}
+ \type {\readline}
+ \type {\closein}
+ \type {\ifeof}
\NC \NR
-\NC control \NC \type {\suppressfontnotfounderror}
+\BC control \NC \type {\suppressfontnotfounderror}
\type {\suppresslongerror}
\type {\suppressprimitiveerror}
\type {\suppressmathparerror}
@@ -78,10 +82,11 @@ what is gone. We start with the primitives that were dropped.
\type {\suppressoutererror}
\type {\mathoption}
\NC \NR
-\NC whatever \NC \type {\primitive}
+\BC system \NC \type {\primitive}
\type {\ifprimitive}
+ \type {\formatname}
\NC \NR
-\NC ignored \NC \type {\long}
+\BC ignored \NC \type {\long}
\type {\outer}
\type {\mag}
\NC \NR
@@ -96,50 +101,68 @@ and they don't work well in \LUATEX\ anyway. We only have two directions left.
The primitive related extensions were not that useful and reliable so they have
been removed. There are some new variants that will be discussed later. The \type
{\outer} and \type {\long} prefixes are gone as they don't make much sense
-nowadays and them becoming dummies opened the way to something new, again to be
-discussed elsewhere. I don't think that (\CONTEXT) users will notice it. The
-\type {\suppress..} features are now default.
+nowadays and them becoming dummies opened the way to something new: control
+sequence properties that permit protection against as well as controlled
+overloading of definitions. I don't think that (\CONTEXT) users will notice these
+prefixed being gone. The definition and parsing related \type {\suppress..}
+features are now default and can't be changed so related primitives are gone.
The \type {\shipout} primitive does no ship out but just erases the content of
-the box, if that hasn't happened already in another way.
-
-The extension primitives relate to the backend (when not immediate) and can be
-implemented as part of a backend design using generic whatsits. There is only one
-type of whatsit now. In fact we're now closer to original \TEX\ with respect to
-the extensions.
+the box, if that hasn't happened already in another way. A macropackage should
+implement its own backend and related shipout. Talking of backend, the extension
+primitives that relate to backends can be implemented as part of a backend design
+using generic whatsits. There is only one type of whatsit now. In fact we're now
+closer to original \TEX\ with respect to the extensions.
The \type {img} library has been removed as it's rather bound to the backend. The
\type {slunicode} library is also gone. There are some helpers in the string
library that can be used instead and one can write additional \LUA\ code if
-needed. There is no longer a \type {pdf} backend library.
+needed. There is no longer a \type {pdf} backend library but we have an up to
+date \PDF\ parsing library on board.
In the \type {node}, \type {tex} and \type {status} library we no longer have
helpers and variables that relate to the backend. The \LUAMETATEX\ engine is in
-principle \DVI\ and \PDF\ unaware. There are only generic whatsit nodes that can
-be used for some management related tasks. For instance you can use them to
-implement user nodes.
+principle \DVI\ and \PDF\ unaware. There are, as mentioned, only generic whatsit
+nodes that can be used for some management related tasks. For instance you can
+use them to implement user nodes. More extensive status information is provided
+in the overhauled status library.
The margin kern nodes are gone and we now use regular kern nodes for them. As a
consequence there are two extra subtypes indicating the injected left or right
kern. The glyph field served no real purpose so there was no reason for a special
kind of node.
-The \KPSE\ library is no longer built|-|in. Because there is no backend, quite
-some file related callbacks could go away. The following file related callbacks
+The \KPSE\ library is no longer built|-|in, but one can use an external \KPSE\
+library, assuming that it is present on the system, because the engine has a so
+called optional library interface to it. Because there is no backend, quite some
+file related callbacks could go away. The following file related callbacks
remained (till now):
\starttyping
-find_write_file find_data_file find_format_file
-open_data_file read_data_file
+find_write_file find_format_file open_data_file
\stoptyping
-Also callbacks related to errors stay:
+The callbacks related to errors are changed:
\starttyping
-show_error_hook show_lua_error_hook,
+intercept_tex_error intercept_lua_error
show_error_message show_warning_message
\stoptyping
+There is a hook that gets called when one of the fundamental memory structures
+gets reallocated.
+
+\starttyping
+trace_memory
+\stoptyping
+
+When you use the overload protect mechanisms, a callback can be plugged in to handle
+exceptions:
+
+\starttyping
+handle_overload
+\stoptyping
+
The (job) management hooks are kept:
\starttyping
@@ -158,19 +181,9 @@ show_whatsit
Being the core of extensibility, the typesetting callbacks of course stayed. This
is what we ended up with:
-% \ctxlua{inspect(table.sortedkeys(callbacks.list))}
-
-\starttyping
-find_log_file, find_data_file, find_format_file, open_data_file, read_data_file,
-process_jobname, start_run, stop_run, define_font, pre_output_filter,
-buildpage_filter, hpack_filter, vpack_filter, hyphenate, ligaturing, kerning,
-pre_linebreak_filter, linebreak_filter, post_linebreak_filter,
-append_to_vlist_filter, mlist_to_hlist, pre_dump, start_file, stop_file,
-handle_error_hook, show_error_hook, show_lua_error_hook, show_error_message,
-show_warning_message, hpack_quality, vpack_quality, insert_local_par,
-contribute_filter, build_page_insert, wrapup_run, new_graf, make_extensible,
-show_whatsit, terminal_input,
-\stoptyping
+\startalign[flushleft,nothyphenated]
+\tt \cldcontext{table.concat(table.sortedkeys(callbacks.list), ", ")}
+\stopalign
As in \LUATEX\ font loading happens with the following callback. This time it
really needs to be set because there is no built|-|in font loader.
@@ -182,10 +195,10 @@ define_font
There are all kinds of subtle differences in the implementation, for instance we
no longer intercept \type {*} and \type {&} as these were already replaced long
ago in \TEX\ engines by command line options. Talking of options, only a few are
-left.
+left. All input goes via \LUA, even the console.
We took our time for reaching a stable state in \LUATEX. Among the reasons is the
-fact that most was experimented with in \CONTEXT. It took many man|-|years to
+fact that most was experimented with in \CONTEXT. It took many years of work to
decide what to keep and how to do things. Of course there are places when things
can be improved and it might happen in \LUAMETATEX. Contrary to what is sometimes
suggested, the \LUATEX|-|\CONTEXT\ \MKIV\ combination (assuming matched versions)
@@ -207,10 +220,71 @@ might be noticed that it is not possible to backtrack or inject something. Of
course it is no big deal to implement all that in \LUA\ if needed. It removes a
system dependency and makes for a bit cleaner code.
-There are new primitives too as well as some extensions to existing primitive
+There are new primitives as well as some extensions to existing primitive
functionality. These are described in following chapters but there might be
hidden treasures in the binary. If you locate them, don't automatically assume
-them to stay, some might be part of experiments!
+them to stay, some might be part of experiments! There are for instance a few
+csname related definers, we have integer and dimension constants, the macro
+argument parser can be brought in tolerant mode, the repertoire of conditionals
+has been extended, some internals can be controlled (think of normalization of
+lines, hyphenation etc.), and macros can be protected against user overload. Not
+all is discussed in detail in this manual but there are introductions in the
+\CONTEXT\ distribution that explain them. But the \TEX\ kernel is of course
+omnipresent.
+
+\startluacode
+
+local luametatex = tex.primitives()
+local luatex = table.load("luatex-primitives.lua")
+
+if not luatex then
+ local tex = "\\starttext \\ctxlua {table.save(tex.jobname .. '.lua',tex.primitives())} \\stoptext"
+
+ io.savedata("luatex-primitives.tex", tex)
+
+ os.execute("context --luatex --once luatex-primitives")
+
+ luatex = table.load("luatex-primitives.lua")
+end
+
+
+if luatex and luametatex then
+
+ luatex = table.tohash(luatex)
+ luametatex = table.tohash(luametatex)
+
+ -- context.page()
+
+ context("The following primitives are available in \\LUATEX\\ but not in \\LUAMETATEX. ")
+ context("Some of these are emulated in \\CONTEXT.")
+
+ context.startcolumns { n = 2 }
+ for k, v in table.sortedhash(luatex) do
+ if not luametatex[k] then
+ context.type(k)
+ context.crlf()
+ end
+ end
+ context.stopcolumns()
+
+
+ -- context.page()
+
+ context("The following primitives are available in \\LUAMETATEX\\ only. ")
+ context("At some point in time some might be added to \\LUATEX.")
+
+ context.startcolumns { n = 2 }
+ for k, v in table.sortedhash(luametatex) do
+ if not luatex[k] then
+ context.type(k)
+ context.crlf()
+ end
+ end
+ context.stopcolumns()
+
+end
+
+\stopluacode
\stopchapter
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
index f295b34643a..947b2320a13 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
@@ -19,7 +19,7 @@ and there will be no \type {luametatex} variants. This is because we consider
\LUAMETATEX\ to be \LUATEX 2\high{+}.
Contrary to the \LUATEX\ engine \LUAMETATEX\ enables all its primitives. You can
-clone (a selection of) primitives with a different prefix, like:
+clone (a selection of) primitives with a different prefix, like this:
\starttyping
\directlua { tex.enableprimitives('normal',tex.extraprimitives()) }
@@ -27,38 +27,26 @@ clone (a selection of) primitives with a different prefix, like:
The \type {extraprimitives} function returns the whole list or a subset,
specified by one or more keywords \type {core}, \type {tex}, \type {etex} or
-\type {luatex}. \footnote {At some point this function might be changed to return
-the whole list always}.
+\type {luatex}. When you clone all primitives you can also do this:
+
+\starttyping
+\directlua { tex.enableprimitives('normal',true) }
+\stoptyping
But be aware that the curly braces may not have the proper \prm {catcode}
assigned to them at this early time (giving a \quote {Missing number} error), so
it may be needed to put these assignments before the above line:
\starttyping
-\catcode `\{=1
-\catcode `\}=2
+\catcode `\{ = 1
+\catcode `\} = 2
\stoptyping
More fine|-|grained primitives control is possible and you can look up the
details in \in {section} [luaprimitives]. There are only three kinds of
primitives: \type {tex}, \type {etex} and \type {luatex} but a future version
-might drop this and no longer make that distinction as it no longer serves
-a purpose.
-
-\stopsubsection
-
-\startsubsection[title={Experiments}]
-
-There are a few extensions to the engine regarding the macro machinery. Some are
-already well tested but others are (still) experimental. Although they are likely
-to stay, their exact behaviour might evolve. Because \LUAMETATEX\ is also used
-for experiments, this is not a problem. We can always decide to also add some of
-what is discussed here to \LUATEX, but it will happen with a delay.
-
-There are all kinds of small improvements that might find their way into stock
-\LUATEX: a few more helpers, some cleanup of code, etc. We'll see. In any case,
-if you play with these before they are declared stable, unexpected side effects
-are what you have to accept.
+might drop this and no longer make that distinction as it no longer serves a
+purpose apart from the fact that it reveals some history.
\stopsubsection
@@ -83,9 +71,9 @@ There are three primitives to test the version of \LUATEX\ (and \LUAMETATEX):
\BC explanation \NC \NR
\TB
\NC \lpr {luatexbanner} \NC \VersionHack{\luatexbanner}
- \NC the banner reported on the command line \NC \NR
+ \NC the banner reported on the console \NC \NR
\NC \lpr {luatexversion} \NC \the\luatexversion
- \NC a combination of major and minor number \NC \NR
+ \NC major and minor number combined \NC \NR
\NC \lpr {luatexrevision} \NC \the\luatexrevision
\NC the revision number \NC \NR
\LL
@@ -123,17 +111,6 @@ The \LUAMETATEX\ version number starts at~2 in order to prevent a clash with
\LUATEX, and the version commands are the same. This is a way to indicate that
these projects are related.
-\startsubsubsection[title={\lpr {formatname}}]
-
-\topicindex{format}
-
-The \lpr {formatname} syntax is identical to \prm {jobname}. In \INITEX, the
-expansion is empty. Otherwise, the expansion is the value that \prm {jobname} had
-during the \INITEX\ run that dumped the currently loaded format. You can use this
-token list to provide your own version info.
-
-\stopsubsubsection
-
\stopsubsection
\stopsection
@@ -178,7 +155,9 @@ the time comes to print a character $c>=1{,}114{,}112$, \LUATEX\ will actually
print the single byte corresponding to $c$ minus 1{,}114{,}112.
Contrary to other \TEX\ engines, the output to the terminal is as|-|is so there
-is no escaping with \type {^^}. We operate in a \UTF\ universe.
+is no escaping with \type {^^}. We operate in a \UTF\ universe. Because we
+operate in a \CCODE\ universum, zero characters are special but because we also
+live in a \UNICODE\ galaxy that is no real problem.
\stopsubsection
@@ -229,6 +208,34 @@ Fonts are loaded via \LUA\ and a minimal amount of information is kept at the
about what a character (or glyph) number represents (a \UNICODE\ or index) as it
only is interested in dimensions.
+In \TEX\ the number of registers is 256 and \ETEX\ bumped that to 32K. One reason
+for a fixed number is that these registers are fast ways to store data and
+therefore are part of the main lookup table (used for data and pointers to data
+as well as save and restore housekeeping). In \LUATEX\ the number was bumped to
+64K but one can argue that less would also do. In order to keep the default
+memory footprint reasonable, in \LUAMETATEX\ the number of languages, fonts and
+marks is limited. The size of some tables can be limited by configuration
+settings, so they can start out small and grow till configured maximum which is
+smaller than the absolute maximum. The following table shows all kind of defaults
+as reported by \typ {status.getconstants()}.
+
+\startluacode
+ context.starttabulate { "|T|r|" }
+ for k, v in table.sortedhash(status.getconstants()) do
+ context.NC() context(k) context.NC() context(v) context.NC() context.NR()
+ end
+ context.stoptabulate()
+\stopluacode
+
+Because we have additional ways to store integers, dimensions and glue, we might
+actually decide to decrease the maximum of the registers: if 64K is not enough,
+and you work around it, then likely 32K might do as well. Also, we have \LUA\ to
+store massive amounts of data. One can argue that saving some 1.5MB memory (when
+we go halfway) is not worth the effort in a time when you have to close a browser
+in order to free the gigabytes it consumes, but there is no reason not to be lean
+and mean: a more conservative approach to start with creates headroom for going
+wild later.
+
\stopsubsection
\stopsection
@@ -274,6 +281,12 @@ language related information, the expansion factor, etc. Now that we have access
to these nodes from \LUA\ it makes sense to be able to carry more information
with a node and this is where attributes kick in.
+It is important to keep in mind that there are situations where nodes get created
+in the current context. For instance, when \TEX\ builds a paragraph or page or
+constructs math formulas, it does add nodes and giving these the current
+attributes makes no sense and can even give weird side effects. In these cases,
+the attributes are inherited from neighbouring nodes.
+
\stopsubsection
\startsubsection[title={Attribute registers}]
@@ -320,6 +333,7 @@ experimental.
\topicindex {attributes}
\topicindex {boxes}
+\topicindex {vcentering}
Nodes typically receive the list of attributes that is in effect when they are
created. This moment can be quite asynchronous. For example: in paragraph
@@ -343,7 +357,7 @@ already boxed material will have no effect. Keep in mind that this
incompatibility is mostly due to the fact that separate specials and literals are
a more unnatural approach to colors than attributes.
-It is possible to fine-tune the list of attributes that are applied to a \type
+It is possible to fine|-|tune the list of attributes that are applied to a \type
{hbox}, \type {vbox} or \type {vtop} by the use of the keyword \type {attr}. The
\type {attr} keyword(s) should come before a \type {to} or \type {spread}, if
that is also specified. An example is:
@@ -392,6 +406,19 @@ indexing the node (here we do that with \type {[a]}). Running this snippet gives
Because some values are not set we need to apply the \type {tostring} function
here so that we get the word \type {nil}.
+A special kind of box is \prm {vcenter}. This one also can have attributes. When
+one or more are set these plus the currently set attributes are bound to the
+resulting box. In regular \TEX\ these centered boxes are only permitted in math
+mode, but in \LUAMETATEX\ there is no error message and the box the height and
+depth are equally divided. Of course in text mode there is no math axis related
+offset applied.
+
+It is possible to change or add to the attributes assigned to a box:
+
+\starttyping
+\boxattr 0 123 456
+\stoptyping
+
\stopsubsection
\stopsection
@@ -467,20 +494,22 @@ will result in
Note that the expansion of \prm {directlua} is a sequence of characters, not of
tokens, contrary to all \TEX\ commands. So formally speaking its expansion is
-null, but it places material on a pseudo-file to be immediately read by \TEX, as
-\ETEX's \prm {scantokens}. For a description of print functions look at \in
-{section} [sec:luaprint].
+null, but it collects material in a new level on the input stack to be
+immediately read by \TEX\ after the \LUA\ call as finished. It is a bit like
+\ETEX's \prm {scantokens}, which now uses the same mechanism. For a description
+of print functions look at \in {section} [sec:luaprint].
Because the \syntax {<general text>} is a chunk, the normal \LUA\ error handling
is triggered if there is a problem in the included code. The \LUA\ error messages
-should be clear enough, but the contextual information is still pretty bad.
-Often, you will only see the line number of the right brace at the end of the
-code.
+should be clear enough, but the contextual information is often suboptimal
+because it can come from deep down, and \TEX\ has no knowledge about what you do
+in \LUA. Often, you will only see the line number of the right brace at the end
+of the code.
While on the subject of errors: some of the things you can do inside \LUA\ code
can break up \LUAMETATEX\ pretty bad. If you are not careful while working with
-the node list interface, you may even end up with assertion errors from within
-the \TEX\ portion of the executable.
+the node list interface, you may even end up with errors or even crashes from
+within the \TEX\ portion of the executable.
\stopsubsection
@@ -557,6 +586,8 @@ tokens and assume that the function is available when that token expands. On the
other hand, as we have tested this functionality in relative complex situations
normal usage should not give problems.
+{\em It makes sense to delegate the implementation of the primitives to \LUA.}
+
\stopsubsection
\startsubsection[title={\lpr {luabytecode} and \lpr {luabytecodecall}}]
@@ -586,6 +617,8 @@ The variable \type {s} in the code is the number of the byte code register that
can be used for diagnostic purposes. The advantage of bytecode registers over
function calls is that they are stored in the format (but without upvalues).
+{\em It makes sense to delegate the implementation of the primitives to \LUA.}
+
\stopsubsection
\stopsection
@@ -608,14 +641,14 @@ contents is stored and retrieved from the format file.
\startsubsection[title={\lpr {catcodetable}}]
-\startsyntax
-\catcodetable <15-bit number>
-\stopsyntax
-
The primitive \lpr {catcodetable} switches to a different catcode table. Such a
table has to be previously created using one of the two primitives below, or it
has to be zero. Table zero is initialized by \INITEX.
+\startsyntax
+\catcodetable <15-bit number>
+\stopsyntax
+
\stopsubsection
\startsubsection[title={\lpr {initcatcodetable}}]
@@ -655,11 +688,9 @@ initial values are:
\lpr {savecatcodetable} copies the current set of catcodes to a new table with
the requested number. The definitions in this new table are all treated as if
-they were made in the outermost level.
-
-The new table is allocated globally: it will not go away after the current group
-has ended. If the supplied number is the currently active table, an error is
-raised.
+they were made in the outermost level. Again, the new table is allocated globally:
+it will not go away after the current group has ended. If the supplied number is
+the currently active table, an error is raised.
\stopsubsection
@@ -667,7 +698,7 @@ raised.
\startsection[title={Tokens, commands and strings}]
-\startsubsection[title={\lpr {scantextokens}}]
+\startsubsection[title={\lpr {scantextokens} and \lpr {tokenized}}]
\topicindex {tokens+scanning}
@@ -677,8 +708,7 @@ differences are:
\startitemize
\startitem
- The last (and usually only) line does not have a \prm {endlinechar}
- appended.
+ The last (and usually only) line does not have a \prm {endlinechar} appended.
\stopitem
\startitem
\lpr {scantextokens} never raises an EOF error, and it does not execute
@@ -691,6 +721,18 @@ differences are:
\stopitem
\stopitemize
+The implementation in \LUAMETATEX\ is different in the sense that it uses the same
+methods as printing from \LUA\ to \TEX\ does. Therefore, in addition to the two
+commands we also have this expandable command:
+
+\startsyntax
+\tokenized {...}
+\tokenized catcodetable <number> {...}
+\stopsyntax
+
+The \ETEX\ command \type {\tracingscantokens} has been dropped in the process as
+that was interwoven with the old code.
+
\stopsubsection
\startsubsection[title={\lpr {toksapp}, \lpr {tokspre}, \lpr {etoksapp}, \lpr {etokspre},
@@ -750,7 +792,7 @@ that it saves a few tokens and can make code a bit more readable.
This primitive complements the \ETEX\ mark primitives and clears a mark class
completely, resetting all three connected mark texts to empty. It is an
-immediate command.
+immediate command (no synchronization node is used).
\startsyntax
\clearmarks <16-bit number>
@@ -792,103 +834,135 @@ but faster (only measurable with millions of calls) and probably more convenient
\stopsubsection
-\startsubsection[title={\lpr {expanded}, \lpr {immediateassignment} and \lpr {immediateassigned}}]
-
-\topicindex {expansion}
-
-The \lpr {expanded} primitive takes a token list and expands its content which can
-come in handy: it avoids a tricky mix of \prm {expandafter} and \prm {noexpand}.
-You can compare it with what happens inside the body of an \prm {edef}. But this
-kind of expansion still doesn't expand some primitive operations.
-
-\startbuffer
-\newcount\NumberOfCalls
-
-\def\TestMe{\advance\NumberOfCalls1 }
-
-\edef\Tested{\TestMe foo:\the\NumberOfCalls}
-\edef\Tested{\TestMe foo:\the\NumberOfCalls}
-\edef\Tested{\TestMe foo:\the\NumberOfCalls}
-
-\meaning\Tested
-\stopbuffer
-
-\typebuffer
-
-The result is a macro that has the not expanded code in its body:
-
-\getbuffer
-
-Instead we can define \tex {TestMe} in a way that expands the assignment
-immediately. You need of course to be aware of preventing look ahead interference
-by using a space or \tex {relax} (often an expression works better as it doesn't
-leave an \tex {relax}).
-
-\startbuffer
-\def\TestMe{\immediateassignment\advance\NumberOfCalls1 }
+\startsubsection[title={\lpr {defcsname}, \lpr {edefcsname}, \lpr {edefcsname} and \lpr {xdefcsname}}]
-\edef\Tested{\TestMe foo:\the\NumberOfCalls}
-\edef\Tested{\TestMe foo:\the\NumberOfCalls}
-\edef\Tested{\TestMe foo:\the\NumberOfCalls}
+Although we can implement these primitives easily using macros it makes sense,
+given the popularity of \prm {csname} to have these as primitives. It also saves
+some \prm {expandafter} usage and it looks a bit better in the source.
-\meaning\Tested
-\stopbuffer
-
-\typebuffer
-
-This time the counter gets updates and we don't see interference in the
-resulting \tex {Tested} macro:
-
-\getbuffer
-
-Here is a somewhat silly example of expanded comparison:
-
-\startbuffer
-\def\expandeddoifelse#1#2#3#4%
- {\immediateassignment\edef\tempa{#1}%
- \immediateassignment\edef\tempb{#2}%
- \ifx\tempa\tempb
- \immediateassignment\def\next{#3}%
- \else
- \immediateassignment\def\next{#4}%
- \fi
- \next}
-
-\edef\Tested
- {(\expandeddoifelse{abc}{def}{yes}{nop}/%
- \expandeddoifelse{abc}{abc}{yes}{nop})}
-
-\meaning\Tested
-\stopbuffer
+\starttyping
+\def\gdefcsname foo\endcsname{oof}
+\stoptyping
-\typebuffer
+\stopsubsection
-It gives:
+\startsubsection[title={\lpr {expanded}}]
-\getbuffer
+\topicindex {expansion}
-A variant is:
+The \lpr {expanded} primitive takes a token list and expands its content which
+can come in handy: it avoids a tricky mix of \prm {expandafter} and \prm
+{noexpand}. You can compare it with what happens inside the body of an \prm
+{edef}. The \tex {immediateassignment} and \tex {immediateassigned} commands are
+gone because we have the more powerful local control commands. They are a tad
+slower but this mechanism isn't used that much anyway. Inside an \prm {edef} you
+can use the \type {\immediate} prefix anyway, so if you really want these
+primitives back you can say:
\starttyping
-\def\expandeddoifelse#1#2#3#4%
- {\immediateassigned{
- \edef\tempa{#1}%
- \edef\tempb{#2}%
- }%
- \ifx\tempa\tempb
- \immediateassignment\def\next{#3}%
- \else
- \immediateassignment\def\next{#4}%
- \fi
- \next}
+\let\immediateassignment\immediate
+\let\immediateassigned \localcontrolled
\stoptyping
-The possible error messages are the same as using assignments in preambles of
-alignments and after the \prm {accent} command. The supported assignments are the
-so called prefixed commands (except box assignments).
-
\stopsubsection
+% \startsubsection[title={\lpr {expanded}, \lpr {immediateassignment} and \lpr {immediateassigned}}]
+%
+% \topicindex {expansion}
+%
+% The \lpr {expanded} primitive takes a token list and expands its content which can
+% come in handy: it avoids a tricky mix of \prm {expandafter} and \prm {noexpand}.
+% You can compare it with what happens inside the body of an \prm {edef}. But this
+% kind of expansion still doesn't expand some primitive operations.
+%
+% \startbuffer
+% \newcount\NumberOfCalls
+%
+% \def\TestMe{\advance\NumberOfCalls1 }
+%
+% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
+% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
+% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
+%
+% \meaning\Tested
+% \stopbuffer
+%
+% \typebuffer
+%
+% The result is a macro that has the not expanded code in its body:
+%
+% \getbuffer
+%
+% Instead we can define \tex {TestMe} in a way that expands the assignment
+% immediately. You need of course to be aware of preventing look ahead interference
+% by using a space or \tex {relax} (often an expression works better as it doesn't
+% leave an \tex {relax}).
+%
+% \startbuffer
+% \def\TestMe{\immediateassignment\advance\NumberOfCalls1 }
+%
+% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
+% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
+% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
+%
+% \meaning\Tested
+% \stopbuffer
+%
+% \typebuffer
+%
+% This time the counter gets updates and we don't see interference in the
+% resulting \tex {Tested} macro:
+%
+% \getbuffer
+%
+% Here is a somewhat silly example of expanded comparison:
+%
+% \startbuffer
+% \def\expandeddoifelse#1#2#3#4%
+% {\immediateassignment\edef\tempa{#1}%
+% \immediateassignment\edef\tempb{#2}%
+% \ifx\tempa\tempb
+% \immediateassignment\def\next{#3}%
+% \else
+% \immediateassignment\def\next{#4}%
+% \fi
+% \next}
+%
+% \edef\Tested
+% {(\expandeddoifelse{abc}{def}{yes}{nop}/%
+% \expandeddoifelse{abc}{abc}{yes}{nop})}
+%
+% \meaning\Tested
+% \stopbuffer
+%
+% \typebuffer
+%
+% It gives:
+%
+% \getbuffer
+%
+% A variant is:
+%
+% \starttyping
+% \def\expandeddoifelse#1#2#3#4%
+% {\immediateassigned{
+% \edef\tempa{#1}%
+% \edef\tempb{#2}%
+% }%
+% \ifx\tempa\tempb
+% \immediateassignment\def\next{#3}%
+% \else
+% \immediateassignment\def\next{#4}%
+% \fi
+% \next}
+% \stoptyping
+%
+% The possible error messages are the same as using assignments in preambles of
+% alignments and after the \prm {accent} command. The supported assignments are the
+% so called prefixed commands (except box assignments).
+%
+% \stopsubsection
+
\startsubsection[title={\lpr {ignorepars}}]
This primitive is like \prm {ignorespaces} but also skips paragraph ending
@@ -1034,6 +1108,55 @@ or more than zero.
\typebuffer \blank {\tt \getbuffer} \blank
+The last checked values are available in \lpr {lastchknum} and \lpr {lastchkdim}.
+These don't obey grouping.
+
+\stopsubsection
+
+\startsubsection[title={\lpr {ifmathstyle} and \lpr {ifmathparameter}}]
+
+These two are variants on \prm {ifcase} where the first one operates with values
+in ranging from zero (display style) to seven (cramped script script style) and
+the second one can have three values: a parameter is zero, has a value or is
+unset. The \type {\ifmathparameter} primitive takes a proper parameter name and a
+valid style identifier (a primitive identifier or number). The \type
+{\ifmathstyle} primitive is equivalent to \type {\ifcase \mathstyle}.
+
+\stopsubsection
+
+\startsubsection[title={\lpr {ifempty}}]
+
+This primitive tests for the following token (control sequence) having no
+content. Assuming that \type {\empty} is indeed empty, the following two are
+equivalent:
+
+\starttyping
+\ifempty\whatever
+\ifx\whatever\empty
+\stoptyping
+
+There is no real performance gain here, it's more one of these extensions that
+lead to less clutter in tracing.
+
+\stopsubsection
+
+\startsubsection[title={\lpr {ifrelax}}]
+
+This primitive complements \type {\ifdefined}, \type {\ifempty} and \type
+{\ifcsname} so that we have all reasonable tests directly available.
+
+\stopsubsection
+
+\startsubsection[title={\lpr {ifboolean}}]
+
+This primitive tests for non|-|zero, so the next variants are similar
+
+\starttyping
+ \ifcase <integer>.F.\else .T.\fi
+\unless\ifcase <integer>.T.\else .F.\fi
+ \ifboolean<integer>.T.\else .F.\fi
+\stoptyping
+
\stopsubsection
\startsubsection[title={\lpr {iftok} and \lpr {ifcstok}}]
@@ -1058,13 +1181,40 @@ provided in \LUAMETATEX:
\typebuffer \startpacked[blank] {\tt\nospacing\getbuffer} \stoppacked
-You can check if a macro is is defined as protected with \type {\ifprotected}
-while frozen macros can be tested with \type {\iffrozen}. A provisional \type
+You can check if a macro is defined as protected with \type {\ifprotected} while
+frozen macros can be tested with \type {\iffrozen}. A provisional \type
{\ifusercmd} tests will check if a command is defined at the user level (and this
one might evolve).
\stopsubsection
+\startsubsection[title={\lpr {ifarguments}, \lpr {ifparameters} and \lpr {ifparameter}}]
+
+These are part of the extended macro argument parsing features. The \type
+{\ifarguments} condition is like an \type {\ifcase} where the number is the
+picked up number of arguments. The number reflects the {\em last} count, so
+successive macro expansions will adapt the value. The \type {\ifparameters}
+counts till the first empty parameter and the \type {\ifparameter} (singular)
+takes a parameter reference (like \type {#2}) and again is an \type {\ifcase}
+where zero means a bad reference, one a non|-|empty argument and two an empty
+one. A typical usage is:
+
+\starttyping
+\def\foo#1#2%
+ {\ifparameter#1\or one\fi
+ \ifparameter#2\or two\fi}
+\stoptyping
+
+No expansion of arguments takes place here but you can use a test like this:
+
+\starttyping
+\def\foo#1#2%
+ {\iftok{#1}{}\else one\fi
+ \iftok{#2}{}\else two\fi}
+\stoptyping
+
+\stopsubsection
+
\startsubsection[title={\lpr {ifcondition}}]
\topicindex {conditions}
@@ -1123,7 +1273,7 @@ we use \type {\unless} to negate the result.
\stopsubsection
-\startsubsection[title={\lpr {orelse}}]
+\startsubsection[title={\lpr {orelse} and \lpr {orunless}}]
Sometimes you have successive tests that, when laid out in the source lead to
deep trees. The \type {\ifcase} test is an exception. Experiments with \type
@@ -1189,6 +1339,12 @@ Of course it is only useful at the right level, so you might end up with cases l
\fi
\stoptyping
+The \lpr {orunless} variant negates the next test, just like \prm {unless}. In
+some cases these commands look at the next token to see if it is an if|-|test so
+a following negation will not work (read: making that work would complicate the
+code and hurt efficiency too). Side note: interesting is that in \CONTEXT\ we
+hardly use this kind of negation.
+
\stopsubsection
\startsubsection[title={\lpr {ifprotected}, \lpr {frozen}, \lpr {iffrozen} and \lpr {ifusercmd}}]
@@ -1219,10 +1375,18 @@ the acceptable range is from 0 to 65535.
\stopsubsection
-\startsubsection[title={\prm {vpack}, \prm {hpack} and \prm {tpack}}]
+\startsubsection[title={\prm {hrule}, \prm {vrule}, \lpr {nohrule} and \lpr {novrule}}]
+
+\topicindex {rules}
+
+Both rule drawing commands take an optional \type {xoffset} and \type {yoffset}
+parameter. The displacement is virtual and not taken into account when the
+dimensions are calculated.
-These three primitives are like \prm {vbox}, \prm {hbox} and \prm {vtop}
-but don't apply the related callbacks.
+Two new primitives were introduced: \lpr {nohrule} and \lpr {novrule}. These can
+be used to reserve space. This is often more efficient than creating an empty box
+with fake dimensions. Of course this assumes that the backend implements them
+being invisible but still taking space.
\stopsubsection
@@ -1236,7 +1400,7 @@ a split of the given size but result has the natural dimensions then.
\stopsubsection
-\startsubsection[title={Images and reused box objects},reference=sec:imagedandforms]
+\startsubsection[title={Images and reused box objects},reference=sec:imagesandforms]
In original \TEX\ image support is dealt with via specials. It's not a native
feature of the engine. All that \TEX\ cares about is dimensions, so in practice
@@ -1252,12 +1416,12 @@ point this approach was abandoned and a more natural trick was used: images (and
box resources) became a special kind of rules, and as rules already have
dimensions, the code could be simplified.
-When direction nodes and localpar nodes also became first class nodes, whatsits
-again became just that: nodes representing whatever you want, but without
-dimensions, and therefore they could again be ignored when dimensions mattered.
-And, because images were disguised as rules, as mentioned, their dimensions
-automatically were taken into account. This seperation between front and backend
-cleaned up the code base already quite a bit.
+When direction nodes and (formerly local) par nodes also became first class
+nodes, whatsits again became just that: nodes representing whatever you want, but
+without dimensions, and therefore they could again be ignored when dimensions
+mattered. And, because images were disguised as rules, as mentioned, their
+dimensions automatically were taken into account. This separation between front
+and backend cleaned up the code base already quite a bit.
In \LUAMETATEX\ we still have the image specific subtypes for rules, but the
engine never looks at subtypes of rules. That was up to the backend. This means
@@ -1313,21 +1477,12 @@ packages.
\startsubsection[title={\lpr {hpack}, \lpr {vpack} and \lpr {tpack}}]
-These three primitives are the equivalents of \type {\hbox}, \type {\vbox} and
-\type {\vtop} but they don't trigger the packaging related callbacks. Of course
+These three primitives are the equivalents of \prm {hbox}, \prm {vbox} and
+\prm {vtop} but they don't trigger the packaging related callbacks. Of course
one never know if content needs a treatment so using them should be done with
-care.
-
-\stopsubsection
-
-\startsubsection[title={\lpr {nohrule} and \lpr {novrule}}]
-
-\topicindex {rules}
-
-Because introducing a new keyword can cause incompatibilities, two new primitives
-were introduced: \lpr {nohrule} and \lpr {novrule}. These can be used to
-reserve space. This is often more efficient than creating an empty box with fake
-dimensions.
+care. Apart from accepting more keywords (and therefore options) the normal
+box behave the same as before. The \prm {vcenter} builder also works in text
+mode.
\stopsubsection
@@ -1390,14 +1545,29 @@ the node number of the nodes.
\stopsubsection
+% \startsubsection[title={\lpr {lastnodetype}, \lpr {lastnodesubtype}, \lpr
+% {currentiftype} and \lpr {internalcodesmode}.}]
+%
+% The \ETEX\ command \type {\lastnodetype} is limited to some nodes. When the
+% parameter \type {\internalcodesmode} is set to a non|-|zero value the normal
+% (internally used) numbers are reported. The same is true for \type
+% {\currentiftype}, as we have more conditionals and also use a different order.
+% The \type {\lastnodesubtype} is a bonus.
+%
+% \stopsubsection
+
\startsubsection[title={\lpr {lastnodetype}, \lpr {lastnodesubtype}, \lpr
-{currentiftype} and \lpr {internalcodesmode}.}]
+{currentiftype}}]
-The \ETEX\ command \type {\lastnodetype} is limited to some nodes. When the
-parameter \type {\internalcodesmode} is set to a non|-|zero value the normal
-(internally used) numbers are reported. The same is true for \type
+The \ETEX\ command \type {\lastnodetype} returns the node codes as used in the
+engine. You can query the numbers at the \LUA\ end if you need the actual values.
+The parameter \type {\internalcodesmode} is no longer provided as compatibility
+switch because \LUATEX\ has more cq. some different nodes and it makes no sense
+to be incompatible with the \LUA\ end of the engine. The same is true for \type
{\currentiftype}, as we have more conditionals and also use a different order.
-The \type {\lastnodesubtype} is a bonus.
+The \type {\lastnodesubtype} is a bonus and again reports the codes used
+internally. During development these might occasionally change, but eventually
+they will be stable.
\stopsubsection
@@ -1417,7 +1587,10 @@ The \type {\lastnodesubtype} is a bonus.
\stoptyping
This allows for embedded spaces, without the need for double quotes. Macro
-expansion takes place inside the argument.
+expansion takes place inside the argument. Keep in mind that as side effect of
+delegating \IO\ to \LUA\ the \prm {openin} primitive is nor provided by the
+engine and has to be implemented by the macro package. This also means that the
+limit on the number of open files is not enforced by the engine.
The \lpr {tracingfonts} primitive that has been inherited from \PDFTEX\ has
been adapted to support variants in reporting the font. The reason for this
@@ -1442,10 +1615,12 @@ extension is that a csname not always makes sense. The zero case is the default.
\topicindex {files+writing}
-You can now open upto 127 files with \prm {openout}. When no file is open writes
-will go to the console and log. The \type {write} related primitives have to be
-implemented as part of a backend! As a consequence a system command is no longer
-possible but one can use \type {os.execute} to do the same.
+Writing to a file in \TEX\ has two forms: delayed and immediate. Delayed writing
+means that the to be written text is anchored in the node list and flushed by the
+backend. As all \IO\ is delegated to \LUA, this also means that it has to deal
+with distinction. In \LUATEX\ the number of open files was already bumped to 127,
+but in \LUAMETATEX\ it depends on the macro package. The special meaning of
+channel 18 was already dropped in \LUATEX\ because we have \type {os.execute}.
\stopsubsection
@@ -1617,106 +1792,143 @@ convenience extra which could also have been implemented using node list parsing
\stopsubsection
-\startsubsection[title={Controlling glue with \lpr {breakafterdirmode}}]
+\startsubsection[title={Normalizing lines}]
-Glue after a dir node is ignored in the linebreak decision but you can bypass that
-by setting \lpr {breakafterdirmode} to~\type {1}. The following table shows the
-difference. Watch your spaces.
+The original \TEX\ machinery was never meant to be opened up. As a consequence a
+constructed line can have different layouts. There can be left- and/or right
+skips and hanging indentation or parshape can result in a shift and adapted
+width. In \LUATEX\ glue got subtypes so we can recognize the left-, right and
+parfill skips, but still there is no hundred percent certainty about the shape.
-\def\ShowSome#1{%
- \BC \type{#1}
- \NC \breakafterdirmode\zerocount\hsize\zeropoint#1
- \NC
- \NC \breakafterdirmode\plusone\hsize\zeropoint#1
- \NC
- \NC \NR
-}
+In \LUAMETATEX\ lines can be normalized. This is optional because we want to
+preserve the original (for comparison) and is controlled by \lpr
+{normalizelinemode}. That variable actually drives some more. An earlier version
+provided a few more granular options (for instance: does a leftskip comes before
+or after a left hanging indentation) but in the end that was dropped. Because
+this normalization only is seen at the \LUA\ end there is no need to go into much
+detail here.
-\starttabulate[|l|Tp(1pt)|w(5em)|Tp(1pt)|w(5em)|]
- \DB
- \BC \type{0}
- \NC
- \BC \type{1}
- \NC
- \NC \NR
- \TB
- \ShowSome{pre {\textdirection 0 xxx} post}
- \ShowSome{pre {\textdirection 0 xxx }post}
- \ShowSome{pre{ \textdirection 0 xxx} post}
- \ShowSome{pre{ \textdirection 0 xxx }post}
- \ShowSome{pre { \textdirection 0 xxx } post}
- \ShowSome{pre {\textdirection 0\relax\space xxx} post}
- \LL
-\stoptabulate
+At this moment a line has this pattern: left parfill, left hang, left skip,
+indentation, content, right hang, right skip, right parfill. Of course the
+indentation and fill skips are not present in every line.
-\stopsubsection
+Control over normalization happens via the mentioned mode variable and here is
+what the engine provides right now. We use a bitmap:
-\startsubsection[title={Controling parshapes with \lpr {shapemode}}]
-
-Another adaptation to the \ALEPH\ directional model is control over shapes driven
-by \prm {hangindent} and \prm {parshape}. This is controlled by a new parameter
-\lpr {shapemode}:
-
-\starttabulate[|c|l|l|]
-\DB value \BC \prm {hangindent} \BC \prm {parshape} \NC \NR
+\starttabulate[|l|l|]
+\DB value \BC reported \NC \NR
\TB
-\BC \type{0} \NC normal \NC normal \NC \NR
-\BC \type{1} \NC mirrored \NC normal \NC \NR
-\BC \type{2} \NC normal \NC mirrored \NC \NR
-\BC \type{3} \NC mirrored \NC mirrored \NC \NR
+\NC \type{0x0001} \NC normalize line as described above \NC \NR
+\NC \type{0x0002} \NC use a skip for parindent instead of a box \NC \NR
+\NC \type{0x0004} \NC swap hangindent in l2r mode \NC \NR
+\NC \type{0x0008} \NC swap parshape in l2r mode \NC \NR
+\NC \type{0x0010} \NC put breaks after dir in l2r mode \NC \NR
+\NC \type{0x0020} \NC remove margin kerns (\PDFTEX\ left-over) \NC \NR
+\NC \type{0x0040} \NC if needed clip width and use correction kern \NC \NR
\LL
\stoptabulate
-The value is reset to zero (like \prm {hangindent} and \prm {parshape})
-after the paragraph is done with. You can use negative values to prevent
-this. In \in {figure} [fig:shapemode] a few examples are given.
-
-\startplacefigure[reference=fig:shapemode,title={The effect of \type {shapemode}.}]
- \startcombination[2*3]
- {\ruledvbox \bgroup \setuptolerance[verytolerant]
- \hsize .45\textwidth \switchtobodyfont[6pt]
- \pardirection 0 \textdirection 0
- \hangindent 40pt \hangafter -3
- \leftskip10pt \input tufte \par
- \egroup} {TLT: hangindent}
- {\ruledvbox \bgroup \setuptolerance[verytolerant]
- \hsize .45\textwidth \switchtobodyfont[6pt]
- \pardirection 0 \textdirection 0
- \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize
- \input tufte \par
- \egroup} {TLT: parshape}
- {\ruledvbox \bgroup \setuptolerance[verytolerant]
- \hsize .45\textwidth \switchtobodyfont[6pt]
- \pardirection 1 \textdirection 1
- \hangindent 40pt \hangafter -3
- \leftskip10pt \input tufte \par
- \egroup} {TRT: hangindent mode 0}
- {\ruledvbox \bgroup \setuptolerance[verytolerant]
- \hsize .45\textwidth \switchtobodyfont[6pt]
- \pardirection 1 \textdirection 1
- \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize
- \input tufte \par
- \egroup} {TRT: parshape mode 0}
- {\ruledvbox \bgroup \setuptolerance[verytolerant]
- \hsize .45\textwidth \switchtobodyfont[6pt]
- \shapemode=3
- \pardirection 1 \textdirection 1
- \hangindent 40pt \hangafter -3
- \leftskip10pt \input tufte \par
- \egroup} {TRT: hangindent mode 1 & 3}
- {\ruledvbox \bgroup \setuptolerance[verytolerant]
- \hsize .45\textwidth \switchtobodyfont[6pt]
- \shapemode=3
- \pardirection 1 \textdirection 1
- \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize
- \input tufte \par
- \egroup} {TRT: parshape mode 2 & 3}
- \stopcombination
-\stopplacefigure
-
-We have \type {\pardirection}, \type {\textdirection}, \type {\mathdirection} and
-\type {\linedirection} that is like \type {\textdirection} but with some
-additional (inline) glue checking.
+Setting the bit enables the related normalization. More features might be added
+in future releases.
+
+% Swapping shapes
+%
+% Another adaptation to the \ALEPH\ directional model is control over shapes driven
+% by \prm {hangindent} and \prm {parshape}. This is controlled by a new parameter
+% \lpr {shapemode}:
+%
+% \starttabulate[|c|l|l|]
+% \DB value \BC \prm {hangindent} \BC \prm {parshape} \NC \NR
+% \TB
+% \BC \type{0} \NC normal \NC normal \NC \NR
+% \BC \type{1} \NC mirrored \NC normal \NC \NR
+% \BC \type{2} \NC normal \NC mirrored \NC \NR
+% \BC \type{3} \NC mirrored \NC mirrored \NC \NR
+% \LL
+% \stoptabulate
+%
+% The value is reset to zero (like \prm {hangindent} and \prm {parshape})
+% after the paragraph is done with. You can use negative values to prevent
+% this. In \in {figure} [fig:shapemode] a few examples are given.
+%
+% \startplacefigure[reference=fig:shapemode,title={The effect of \type {shapemode}.}]
+% \startcombination[2*3]
+% {\ruledvbox \bgroup \setuptolerance[verytolerant]
+% \hsize .45\textwidth \switchtobodyfont[6pt]
+% \pardirection 0 \textdirection 0
+% \hangindent 40pt \hangafter -3
+% \leftskip10pt \input tufte \par
+% \egroup} {TLT: hangindent}
+% {\ruledvbox \bgroup \setuptolerance[verytolerant]
+% \hsize .45\textwidth \switchtobodyfont[6pt]
+% \pardirection 0 \textdirection 0
+% \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize
+% \input tufte \par
+% \egroup} {TLT: parshape}
+% {\ruledvbox \bgroup \setuptolerance[verytolerant]
+% \hsize .45\textwidth \switchtobodyfont[6pt]
+% \pardirection 1 \textdirection 1
+% \hangindent 40pt \hangafter -3
+% \leftskip10pt \input tufte \par
+% \egroup} {TRT: hangindent mode 0}
+% {\ruledvbox \bgroup \setuptolerance[verytolerant]
+% \hsize .45\textwidth \switchtobodyfont[6pt]
+% \pardirection 1 \textdirection 1
+% \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize
+% \input tufte \par
+% \egroup} {TRT: parshape mode 0}
+% {\ruledvbox \bgroup \setuptolerance[verytolerant]
+% \hsize .45\textwidth \switchtobodyfont[6pt]
+% \shapemode=3
+% \pardirection 1 \textdirection 1
+% \hangindent 40pt \hangafter -3
+% \leftskip10pt \input tufte \par
+% \egroup} {TRT: hangindent mode 1 & 3}
+% {\ruledvbox \bgroup \setuptolerance[verytolerant]
+% \hsize .45\textwidth \switchtobodyfont[6pt]
+% \shapemode=3
+% \pardirection 1 \textdirection 1
+% \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize
+% \input tufte \par
+% \egroup} {TRT: parshape mode 2 & 3}
+% \stopcombination
+% \stopplacefigure
+%
+% We have \type {\pardirection}, \type {\textdirection}, \type {\mathdirection} and
+% \type {\linedirection} that is like \type {\textdirection} but with some
+% additional (inline) glue checking.
+
+% Controlling glue with \lpr {breakafterdirmode}
+%
+% Glue after a dir node is ignored in the linebreak decision but you can bypass that
+% by setting \lpr {breakafterdirmode} to~\type {1}. The following table shows the
+% difference. Watch your spaces.
+%
+% \def\ShowSome#1{%
+% \BC \type{#1}
+% \NC \breakafterdirmode\zerocount\hsize\zeropoint#1
+% \NC
+% \NC \breakafterdirmode\plusone\hsize\zeropoint#1
+% \NC
+% \NC \NR
+% }
+%
+% \starttabulate[|l|Tp(1pt)|w(5em)|Tp(1pt)|w(5em)|]
+% \DB
+% \BC \type{0}
+% \NC
+% \BC \type{1}
+% \NC
+% \NC \NR
+% \TB
+% \ShowSome{pre {\textdirection 0 xxx} post}
+% \ShowSome{pre {\textdirection 0 xxx }post}
+% \ShowSome{pre{ \textdirection 0 xxx} post}
+% \ShowSome{pre{ \textdirection 0 xxx }post}
+% \ShowSome{pre { \textdirection 0 xxx } post}
+% \ShowSome{pre {\textdirection 0\relax\space xxx} post}
+% \LL
+% \stoptabulate
\stopsubsection
@@ -1751,17 +1963,286 @@ shows that is't okay, they will become official, so we just mention them: \type
{\boxdirection}, \type {\boxattr}, \type {\boxorientation}, \type {\boxxoffset},
\type {\boxyoffset}, \type {\boxxmove}, \type {\boxymove} and \type {\boxtotal}.
+{\em This is still somewhat experimental and will be documented in more detail
+when I've used it more in \CONTEXT\ and the specification is frozen. This might
+take some time (and user input).}
+
\stopsubsection
\stopsection
-\startsection[title=Expressions]
+\startsection[title=Keywords]
+
+Some primitives accept one or more keywords and \LUAMETATEX\ adds some more. In
+order to deal with this efficiently the keyword scanner has been optimized, where
+even the context was taken into account. As a result the scanner was quite a bit
+faster. This kind of optimization was a graduate process the eventually ended up
+in what we have now. In traditional \TEX\ (and also \LUATEX) the order of
+keywords is sometimes mixed and sometimes prescribed. In most cases only one
+occurrence is permitted. So, for instance, this is valid in \LUATEX:
+
+\starttyping
+\hbox attr 123 456 attr 123 456 spread 10cm { }
+\hrule width 10cm depth 3mm
+\hskip 3pt plus 2pt minus 1pt
+\stoptyping
+
+The \type {attr} comes before the \type {spread}, rules can have multiple mixed
+dimension specifiers, and in glue the optional \type {minus} part always comes
+last. The last two commands are famous for look ahead side effects which is why
+macro packages will end them with something not keyword, like \type {\relax},
+when needed.
+
+In \LUAMETATEX\ the following is okay. Watch the few more keywords in box and
+rule specifications.
+
+\starttyping
+\hbox reverse to 10cm attr 123 456 orientation 4 xoffset 10pt spread 10cm { }
+\hrule xoffset 10pt width 10cm depth 3mm
+\hskip 3pt minus 1pt plus 2pt
+\stoptyping
+
+Here the order is not prescribed and, as demonstrated with the box specifier, for
+instance dimensions (specified by \type {to} or \type {spread} can be overloaded
+by later settings. In case you wonder if that breaks compatibility: in some way
+it does but bad or sloppy keyword usage breaks a run anyway. For instance \type
+{minuscule} results in \type {minus} with no dimension being seen. So, in the end
+the user should not noticed it and when a user does, the macro package already
+had an issue that had to be fixed.
+
+\stopsection
+
+\startsection[title=Expressions and \lpr {numericscale}]
The \type {*expr} parsers now accept \type {:} as operator for integer division
(the \type {/} operators does rounding. This can be used for division compatible
with \type {\divide}. I'm still wondering if adding a couple of bit operators
makes sense (for integers).
+The \lpr{numericscale} parser is kind of special (and might evolve). For now it
+converts a following number in a scale value as often used in \TEX, where 1000
+means scaling by~1.0. The trick is in the presence of a digit (or comma): 1.234
+becomes 1234 but 1234 stays 1234 and from this you can deduce that 12.34 becomes
+123400. Internally \TEX\ calculates with integers, but this permits the macro
+package to provide an efficient mix.
+
+\stopsection
+
+\startsection[title=Macro arguments]
+
+Again this is experimental and (used and) discussed in document that come with the
+\CONTEXT\ distribution. When defining a macro you can do this:
+
+\starttyping
+\def\foo(#1)#2{...}
+\stoptyping
+
+Here the first argument between parentheses is mandate. But the magic
+prefix \lpr {tolerant} makes that limitation go away:
+
+\starttyping
+\tolerant\def\foo(#1)#2{...}
+\stoptyping
+
+A variant is this:
+
+\starttyping
+\tolerant\def\foo(#1)#*(#2){...}
+\stoptyping
+
+Here we have two optional arguments, possibly be separated by spaces. There are
+more parsing options:
+
+\starttabulate[|T|i2l|]
+\FL
+\NC + \NC keep the braces \NC \NR
+\NC - \NC discard and don't count the argument \NC \NR
+\NC / \NC remove leading an trailing spaces and pars \NC \NR
+\NC = \NC braces are mandate \NC \NR
+\NC _ \NC braces are mandate and kept \NC \NR
+\NC ^ \NC keep leading spaces \NC \NR
+\ML
+\NC 1-9 \NC an argument \NC \NR
+\NC 0 \NC discard but count the argument \NC \NR
+\ML
+\NC * \NC ignore spaces \NC \NR
+\NC : \NC pick up scanning here \NC \NR
+\NC ; \NC quit scanning \NC \NR
+\LL
+\stoptabulate
+
+For the moment we leave it to your fantasy what these options do. Most probably
+only make sense when you write a bit more complex macros. Just try to imagine
+what this does:
+
+\starttyping
+\permanent\tolerant\global\protected\def\foo(#1)#*#;[#2]#:#3{...}
+\stoptyping
+
+Of course complex combinations can be confusing because after all \TEX\ is
+parsing for (multi|-|token) delimiters and will happily gobble the whole file if
+you are not careful. You can quit scanning if you want:
+
+\starttyping
+\mymacro 123\ignorearguments
+\stoptyping
+
+which of course only makes sense when used in a nested call where an already
+picked up arguments is processed further. A not (yet) discussed feature of the
+parser is that it will happily skip tokens that have the (probably seldom used)
+ignored characters property.
+
+When you use tracing or see error messages arguments defined using for instance
+\type {#=} will have their usual number in the macro body, so you need to keep
+track of the numbers.
+
+All this is rather easy on the engine and although it might have a little impact
+on performance this has been compensated by some more efficiency in the macro
+parser and engine in general and of course you can gain back some by using these
+features.
+
+\stopsection
+
+\startsection[title=Overload protection]
+
+There is an experimental overload protection mechanism that we will test for a
+while before declaring it stable. The reason for that is that we need to adapt
+the \CONTEXT\ code base in order to test its usefulness. Protection is achieved
+via prefixes. Depending on the value of the \lpr {overloadmode} variable
+warnings or errors will be triggered. Examples of usage can be found in some
+documents that come with \CONTEXT, so here we just stick to the basics.
+
+\starttyping
+\mutable \def\foo{...}
+\immutable\def\foo{...}
+\permanent\def\foo{...}
+\frozen \def\foo{...}
+\aliased \def\foo{...}
+\stoptyping
+
+A \lpr {mutable} macro can always be changed contrary to an \lpr {immutable} one.
+For instance a macro that acts as a variable is normally \lpr {mutable}, while a
+constant can best be immutable. It makes sense to define a public core macro as
+\lpr {permanent}. Primives start out a \lpr {permanent} ones but with a primitive
+property instead.
+
+\startbuffer
+ \let\relaxone \relax 1: \meaningfull\relaxone
+\aliased \let\relaxtwo \relax 2: \meaningfull\relaxtwo
+\permanent\let\relaxthree\relax 3: \meaningfull\relaxthree
+\stopbuffer
+
+\typebuffer
+
+The \lpr {meaningfull} primitive is like \prm {meaning} but report the
+properties too. The \lpr {meaningless} companion reports the body of a macro.
+Anyway, this typesets:
+
+\startlines \tttf \getbuffer \stoplines
+
+So, the \lpr {aliased} prefix copies the properties. Keep in mind that a macro
+package can redefine primitives, but \prm {relax} is an unlikely candidate.
+
+There is an extra prefix \lpr {noaligned} that flags a macro as being valid
+for \prm {noalign} compatible usage (which means that the body must contain that
+one. The idea is that we then can do this:
+
+\starttyping
+\permanent\protected\noaligned\def\foo{\noalign{...}} % \foo is unexpandable
+\stoptyping
+
+that is: we can have protected macros that don't trigger an error in the parser
+where there is a look ahead for \prm {noalign} which is why normally protection
+doesn't work well. So: we have macro flagged as permanent (overload protection),
+being protected (that is, not expandable by default) and a valid equivalent of
+the noalign primitive. Of course we can also apply the \prm {global} and \lpr
+{tolerant} prefixes here. The complete repertoire of extra prefixes is:
+
+\starttabulate
+\HL
+\NC \type {frozen} \NC a macro that has to be redefined in a managed way \NC \NR
+\NC \type {permanent} \NC a macro that had better not be redefined \NC \NR
+\NC \type {primitive} \NC a primitive that normally will not be adapted \NC \NR
+\NC \type {immutable} \NC a macro or quantity that cannot be changed, it is a constant \NC \NR
+\NC \type {mutable} \NC a macro that can be changed no matter how well protected it is \NC \NR
+\HL
+\NC \type {instance} \NC a macro marked as (for instance) be generated by an interface \NC \NR
+\HL
+\NC \type {noaligned} \NC the macro becomes acceptable as \type {\noalign} alias \NC \NR
+\HL
+\NC \type {overloaded} \NC when permitted the flags will be adapted \NC \NR
+\NC \type {enforced} \NC all is permitted (but only in zero mode or ini mode) \NC \NR
+\NC \type {aliased} \NC the macro gets the same flags as the original \NC \NR
+\HL
+\stoptabulate
+
+The not yet discussed \lpr {instance} is just a flag with no special meaning
+which can be used as classifier. The \lpr {frozen} also protects against overload
+which brings amount of blockers to four.
+
+To what extent the engine will complain when a property is changed in a way that
+violates the flags depends on the parameter \lpr {overloadmode}. When this
+parameter is set to zero no checking takes place. More interesting are values
+larger than zero. If that is the case, when a control sequence is flagged as
+mutable, it is always permitted to change. When it is set to immutable one can
+never change it. The other flags determine the kind of checking done. Currently
+the following overload values are used:
+
+\starttabulate[|l|l|c|c|c|c|c|]
+ \NC \NC \BC immutable \BC permanent \BC primitive \BC frozen \BC instance \NC \NR
+ \NC 1 \NC warning \NC \star \NC \star \NC \star \NC \NC \NC \NR
+ \NC 2 \NC error \NC \star \NC \star \NC \star \NC \NC \NC \NR
+ \NC 3 \NC warning \NC \star \NC \star \NC \star \NC \star \NC \NC \NR
+ \NC 4 \NC error \NC \star \NC \star \NC \star \NC \star \NC \NC \NR
+ \NC 5 \NC warning \NC \star \NC \star \NC \star \NC \star \NC \star \NC \NR
+ \NC 6 \NC error \NC \star \NC \star \NC \star \NC \star \NC \star \NC \NR
+\stoptabulate
+
+The even values (except zero) will abort the run. A value of 255 will freeze this
+parameter. At level five and above the \lpr {instance} flag is also checked but
+no drastic action takes place. We use this to signal to the user that a specific
+instance is redefined (of course the definition macros can check for that too).
+
+The \lpr {overloaded} prefix can be used to overload a frozen macro. The \lpr
+{enforced} is more powerful and forces an overload but that prefix is only
+effective in ini mode or when it's embedded in the body of a macro or token list
+at ini time unless of course at runtime the mode is zero.
+
+So far for a short explanation. More details can be found in the \CONTEXT\
+documentation where we can discuss it in a more relevant perspective. It must be
+noted that this feature only makes sense a controlled situation, that is: user
+modules or macros of unpredictable origin will probably suffer from warnings and
+errors when de mode is set to non zero. In \CONTEXT\ we're okay unless of course
+users redefine instances but there a warning or error is kind of welcome.
+
+\stopsection
+
+\startsection[title=Constants]
+
+It is rather common to store constant values in a register or character
+definition.
+
+\starttyping
+\newcount\MyConstantA \MyConstantA 123
+\newdimen\MyConstantB \MyConstantB 123pt
+\chardef \MyConstantC \MyConstantC 123
+\stoptyping
+
+But in \LUAMETATEX\ we also can do this:
+
+\starttyping
+\integerdef\MyConstantC 456
+\dimendef \MyConstantD 456pt
+\stoptyping
+
+These two are stored as efficient as a register but don't occupy a register slot.
+They can be set as above, need \prm {the} for serializations and are seen as
+valid number or dimension when needed.
+
+Experiments with constant strings made the engine source more complex than I
+wanted so that features was rejected. Of course we can use the prefixes mentioned
+in a previous section.
+
\stopsection
\startsection[title=Nodes]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex
index 917ebfeb86f..9a09f705c10 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex
@@ -140,7 +140,6 @@ For example, here is the character \quote {f} (decimal 102) in the font \type
}
\stoptyping
-
Two very special string indexes can be used also: \type {left_boundary} is a
virtual character whose ligatures and kerns are used to handle word boundary
processing. \type {right_boundary} is similar but not actually used for anything
@@ -269,9 +268,25 @@ third one is a previously defined font that is known to \LUATEX\ as font id~38.
The array index numbers are used by the character command definitions that are
part of each character.
-The \type {commands} array is a hash where each item is another small array,
-with the first entry representing a command and the extra items being the
-parameters to that command. The allowed commands and their arguments are:
+The \type {commands} array is a hash where each item is another small array, with
+the first entry representing a command and the extra items being the parameters
+to that command. The frontend is only interested in the dimensions, ligatures and
+kerns of a font, which is the reason why the \TEX\ engine didn't have to be
+extended when virtual fonts showed up: dealing with it is up to the driver that
+comes after the backend. In \PDFTEX\ and \LUATEX\ that driver is integrated so
+there the backend also deals with virtual fonts. The first block in the next
+table is what the standard mentions. The \type {special} command is indeed
+special because it is an extension container. The mentioned engines only support
+pseudo standards where the content starts with \type {pdf:}. The last block is
+\LUATEX\ specific and will not be found in native fonts. These entries can be
+used in virtual fonts that are constructed in \LUA.
+
+But \unknown\ in \LUAMETATEX\ there is no backend built in but we might assume
+that the one provided deals with these entries. However, a provided backend can
+provide more and that is indeed what happens in \CONTEXT. There, because we no
+longer have compacting (of passed tables) and unpacking (when embedding) of these
+tables going on we stay in the \LUA\ domain. None of the virtual specification is
+ever seen in the engine.
\starttabulate[|l|l|l|p|]
\DB command \BC arguments \BC type \BC description \NC \NR
@@ -279,16 +294,18 @@ parameters to that command. The allowed commands and their arguments are:
\NC \type{font} \NC 1 \NC number \NC select a new font from the local \type {fonts} table \NC \NR
\NC \type{char} \NC 1 \NC number \NC typeset this character number from the current font,
and move right by the character's width \NC \NR
-\NC \type{node} \NC 1 \NC node \NC output this node (list), and move right
- by the width of this list\NC \NR
-\NC \type{slot} \NC 2 \NC 2 numbers \NC a shortcut for the combination of a font and char command\NC \NR
\NC \type{push} \NC 0 \NC \NC save current position\NC \NR
-\NC \type{nop} \NC 0 \NC \NC do nothing \NC \NR
\NC \type{pop} \NC 0 \NC \NC pop position \NC \NR
\NC \type{rule} \NC 2 \NC 2 numbers \NC output a rule $ht*wd$, and move right. \NC \NR
\NC \type{down} \NC 1 \NC number \NC move down on the page \NC \NR
\NC \type{right} \NC 1 \NC number \NC move right on the page \NC \NR
+\HL
\NC \type{special} \NC 1 \NC string \NC output a \prm {special} command \NC \NR
+\HL
+\NC \type{nop} \NC 0 \NC \NC do nothing \NC \NR
+\NC \type{slot} \NC 2 \NC 2 numbers \NC a shortcut for the combination of a font and char command\NC \NR
+\NC \type{node} \NC 1 \NC node \NC output this node (list), and move right
+ by the width of this list\NC \NR
\NC \type{pdf} \NC 2 \NC 2 strings \NC output a \PDF\ literal, the first string is one of \type {origin},
\type {page}, \type {text}, \type {font}, \type {direct} or \type {raw}; if you
have one string only \type {origin} is assumed \NC \NR
@@ -363,10 +380,6 @@ The special can have a \type {pdf:}, \type {pdf:origin:}, \type {pdf:page:},
\type {pdf:direct:} or \type {pdf:raw:} prefix. When you have to concatenate
strings using the \type {pdf} command might be more efficient.
-The fields mentioned above can be found in external fonts. It is good to keep in
-mind that we can extend this model, given that the backend knows what to do with
-it.
-
\stopsection
\startsection[title={Additional \TEX\ commands}]
@@ -392,17 +405,19 @@ expansion takes place inside the argument.
\fontid\font
\stopsyntax
-This primitive expands into a number. It is not a register so there is no need to
-prefix with \prm {number} (and using \prm {the} gives an error). The currently
-used font id is \fontid\font. Here are some more:
+This primitive expands into a number. The currently used font id is
+\number\fontid\font. Here are some more: \footnote {Contrary to \LUATEX\ this is
+now a number so you need to use \type {\number} or \type {\the}. The same is true
+for some other numbers and dimensions that for some reason ended up in the
+serializer that produced a sequence of tokens.}
\starttabulate[|l|c|c|]
\DB style \BC command \BC font id \NC \NR
\TB
-\NC normal \NC \type {\tf} \NC \tf \fontid\font \NC \NR
-\NC bold \NC \type {\bf} \NC \bf \fontid\font \NC \NR
-\NC italic \NC \type {\it} \NC \it \fontid\font \NC \NR
-\NC bold italic \NC \type {\bi} \NC \bi \fontid\font \NC \NR
+\NC normal \NC \type {\tf} \NC \tf \number\fontid\font \NC \NR
+\NC bold \NC \type {\bf} \NC \bf \number\fontid\font \NC \NR
+\NC italic \NC \type {\it} \NC \it \number\fontid\font \NC \NR
+\NC bold italic \NC \type {\bi} \NC \bi \number\fontid\font \NC \NR
\LL
\stoptabulate
@@ -417,29 +432,92 @@ which of course needs to be a valid one.
\stopsubsection
-\startsubsection[title={\lpr {noligs} and \lpr {nokerns}}]
+\startsubsection[title={\lpr {glyphoptions}}]
\topicindex {ligatures+suppress}
\topicindex {kerns+suppress}
+\topicindex {expansion+suppress}
+\topicindex {protrusion+suppress}
-These primitives prohibit ligature and kerning insertion at the time when the
-initial node list is built by \LUATEX's main control loop. You can enable these
-primitives when you want to do node list processing of \quote {characters}, where
-\TEX's normal processing would get in the way.
+In \LUATEX\ the \type {\noligs} and \type {\nokerns} primitives suppress these
+features but in \LUAMETATEX\ these primitives are gone. They are replace by a more
+generic control primitive \lpr {glyphoptions}. This numerical parameter is a
+bitset with the following fields:
-\startsyntax
-\noligs <integer>!crlf
-\nokerns <integer>
-\stopsyntax
+\starttabulate[|l|pl|]
+\DB value \BC effect \NC\NR
+\TB
+\NC \type{0x01} \NC prevent left ligature \NC \NR
+\NC \type{0x02} \NC prevent right ligature \NC \NR
+\NC \type{0x04} \NC block left kern \NC \NR
+\NC \type{0x08} \NC block right kern \NC \NR
+\NC \type{0x10} \NC don't apply expansion \NC \NR
+\NC \type{0x20} \NC don't apply protrusion \NC \NR
+\NC \type{0x40} \NC apply xoffset to width \NC \NR
+\NC \type{0x80} \NC apply yoffset to height and depth \NC \NR
+\LL
+\stoptabulate
-These primitives can also be implemented by overloading the ligature building and
-kerning functions, i.e.\ by assigning dummy functions to their associated
-callbacks. Keep in mind that when you define a font (using \LUA) you can also
-omit the kern and ligature tables, which has the same effect as the above.
+The effects speak for themselves. They provide detailed control over individual
+glyph, this because the current value of this option is stored with glyphs.
\stopsubsection
-\startsubsection[title={\type{\nospaces}}]
+\startsubsection[title={\lpr {glyphxscale}, \lpr {glyphyscale} and \lpr {scaledfontdimen}}]
+
+The two scale parameters control the current scaling. They are traditional \TEX\
+integer parameters that operate independent of each other. The scaling is
+reflected in the dimensions of glyphs as well as in the related font dimensions,
+which means that units like \type {ex} and \type {em} work as expected. If you
+query a font dimensions with \prm {fontdimen} you get the raw value but with \lpr
+{scaledfontdimen} you get the useable value.
+
+\stopsubsection
+
+\startsubsection[title={\lpr {glyphxoffset}, \lpr {glyphyoffset}}]
+
+These two parameters control the horizontal and vertical shift of glyphs with,
+when applied to a stretch of them, the horizontal offset probably being the least
+useful.
+
+\stopsubsection
+
+\startsubsection[title={\lpr {glyph}}]
+
+This command is a variation in \prm {char} that takes keywords:
+
+\starttabulate[|l|p|]
+\DB keyword \BC effect \NC type \NC \NR
+\TB
+\NC \type {xoffset} \NC (virtual) horizontal shift \NC dimension \NC \NR
+\NC \type {yoffset} \NC (virtual) vertical shift \NC dimension \NC \NR
+\NC \type {xscale} \NC horizontal scaling \NC integer \NC \NR
+\NC \type {yscale} \NC vertical scaling \NC integer \NC \NR
+\NC \type {options} \NC glyph options \NC bitset \NC \NR
+\NC \type {font} \NC font \NC identifier \NC \NR
+\NC \type {id} \NC font \NC integer \NC \NR
+\LL
+\stoptabulate
+
+The values default to the currently set values. Here is a \CONTEXT\ example:
+
+\startbuffer
+\ruledhbox{
+ \ruledhbox{\glyph yoffset 1ex options 0 123}
+ \ruledhbox{\glyph xoffset .5em yoffset 1ex options "C0 125}
+ \ruledhbox{baseline\glyphyoffset 1ex \glyphxscale 800 \glyphyscale\glyphxscale raised}
+}
+\stopbuffer
+
+\typebuffer
+
+Visualized:
+
+\getbuffer
+
+\stopsubsection
+
+\startsubsection[title={\lpr{nospaces}}]
\topicindex {spaces+suppress}
@@ -462,7 +540,7 @@ space.
\stopsubsection
-\startsubsection[title={\type{\protrusionboundary}}]
+\startsubsection[title={\lpr{protrusionboundary}}]
\topicindex {protrusion}
\topicindex {boundaries}
@@ -581,13 +659,19 @@ font.current(<number> i)
\stopsubsection
-% \startsubsection[title={Glyph data: \lpr {glyphdata}]
-%
-% This primitive can be used to set an additional glyph property. Of course it's very
-% macro package dependant what is done with that. Consider it an experiment (we had
-% some room left in the glyphs data structure). It's basically an single attribute.
-%
-% \stopsubsection
+\startsubsection[title={Glyph data: \lpr {glyphdata}, \lpr {glyphscript}, \lpr {glyphstate}}]
+
+These primitives can be used to set an additional glyph properties. Of course
+it's very macro package dependant what is done with that. It started with just
+the first one as experiment, simply because we had some room left in the glyph
+data structure. It's basically an single attribute. Then, when we got rid of the
+ligature pointer we could either drop it or use that extra field for some more,
+and because \CONTEXT\ already used the data field, that is what happened. The
+script and state fields are shorts, that is, they run from zero to \type {0xFFFF}
+where we assume that zero means \quote {unset}. Although they can be used for
+whatever purpose their use in \CONTEXT\ is fixed.
+
+\stopsubsection
\stopsection
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex
index 774f3d8d9a1..2339bd34201 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex
@@ -28,42 +28,60 @@ happened in a series of documents, parts of which were published as articles in
user group journals, but all are in the \CONTEXT\ distribution. I did the same
with the development of \LUAMETATEX.
-The \LUAMETATEX\ engine is, as said, a lightweight version of \LUATEX, that for
-now targets \CONTEXT. We will use it for possibly drastic experiments but without
-affecting \LUATEX. As we can easily adapt \CONTEXT\ to support both, no other
-macro package will be harmed when (for instance) interfaces change as part of an
-experiment. Of course, when we consider something to be useful, it can be ported
-back to \LUATEX, but only when there are good reasons for doing so and when no
-compatibility issues are involved. When considering this follow up one
-consideration was that a lean and mean version with an extension mechanism is a
-bit closer to original \TEX. Of course, because we also have new primitives, this
-is not entirely true. The move to \LUA\ already meant that some aspects,
-especially system dependent ones, no longer made sense and therefore had
-consequences for the interface at the system level.
-
-This manual currently has quite a bit of overlap with the \LUATEX\ manual but
-some chapters are removed, others added and the rest has been (and will be
-further) adapted. It also discusses the (main) differences. Some of the new
-primitives or functions that show up in \LUAMETATEX\ might show up in \LUATEX\ at
-some point, others might not, so don't take this manual as reference for \LUATEX
-! For now it is an experimental engine in which we can change things at will but
-with \CONTEXT\ in tandem so that this macro package will keep working.
-
-For \CONTEXT\ users the \LUAMETATEX\ engine will become the default. The
-\CONTEXT\ variant for this engine is tagged \LMTX. The pair can be used in
-production, just as with \LUATEX\ and \MKIV. In fact, most users will probably
-not really notice the difference. In some cases there will be a drop in
+The \LUAMETATEX\ engine is, as said, a follow up on \LUATEX. Just as we have
+\CONTEXT\ \MKII\ for \PDFTEX\ and \XETEX, we have \MKIV\ for \LUATEX. For
+\LUAMETATEX\ we have yet another version of \CONTEXT: \LMTX. By freezing \MKII,
+and at some point freezing \MKIV, we can move on as we like, but we try to remain
+downward compatible where possible, something that the user interface makes
+possible. Although \LUAMETATEX\ can be used for production we can also use it for
+possibly drastic experiments but without affecting \LUATEX. Because we can easily
+adapt \CONTEXT\ to support both, no other macro package will be harmed when (for
+instance) the interface that the engine provides change as part of an experiment
+or cleanup of code. Of course, when we consider something to be useful, it can be
+ported back to \LUATEX, but only when there are good reasons for doing so and
+when no compatibility issues are involved.
+
+By now the code of these two related engines differs a lot so in retrospect it
+makes less sense to waste time on backporting anyway. When considering this
+follow up one consideration was that a lean and mean version with an extension
+mechanism is a bit closer to original \TEX. Of course, because we also have new
+primitives, this is not entirely true. The basic algorithms remain the same but
+code got reshuffled and because we expose internals names of variables and such
+are sometimes changed, something that is noticeable in the token and node
+interfaces. Delegating tasks to \LUA\ already meant that some aspects, especially
+system dependent ones, no longer made sense and therefore had consequences for
+the interface at the system level. In \LUAMETATEX\ more got delegated, like all
+file related operations. The penalty of moving more responsibility to \LUA\ has
+been compensated by (hopefully) harmless optimization of code in the engine and
+some more core functionality.
+
+This manual started as an adaptation of the \LUATEX\ manual and therefore looks
+similar. Some chapters are removed, others were added and the rest has been (and
+will be further) adapted. It also discusses the (main) differences. Some of the
+new primitives or functions that show up in \LUAMETATEX\ might show up in
+\LUATEX\ at some point, but most will be exclusive to \LUAMETATEX, so don't take
+this manual as reference for \LUATEX ! As long as we're experimenting we can
+change things at will but as we keep \CONTEXT\ \LMTX\ synchronized users normally
+won't notice this. Often you can find examples of usage in \CONTEXT\ related
+documents and the source code so that serves a reference too.
+
+For \CONTEXT\ users the \LUAMETATEX\ engine will become the default. As
+mentioned, the \CONTEXT\ variant for this engine is tagged \LMTX. The pair can be
+used in production, just as with \LUATEX\ and \MKIV. In fact, most users will
+probably not really notice the difference. In some cases there will be a drop in
performance, due to more work being delegated to \LUA, but on the average
performance will be better, also due to some changes below the hood of the
-engine.
+engine. Memory consumption is also less. The timeline of development is roughly:
+from 2018 upto 2020 engine development, 2019 upto 2021 the stepwise code split
+between \MKIV\ and \LMTX, while in 2020 we will (mostly) freeze \MKIV\ and \LMTX\
+will be the default.
As this follow up is closely related to \CONTEXT\ development, and because we
expect stock \LUATEX\ to be used outside the \CONTEXT\ proper, there will be no
special mailing list nor coverage (or pollution) on the \LUATEX\ related mailing
lists. We have the \CONTEXT\ mailing lists for that. In due time the source code
-will be part of the regular \CONTEXT\ distribution.
-
-% \testpage[8]
+will be part of the regular \CONTEXT\ distribution so that is then also the
+reference implementation: if needed users can compile the binary themselves.
This manual sometimes refers to \LUATEX, especially when we talk of features
common to both engine, as well as to \LUAMETATEX, when it is more specific to the
@@ -100,43 +118,55 @@ Hans Hagen
\vfilll
-{\bf remark:} \LUAMETATEX\ development is mostly done by Hans Hagen and Alan
-Braslau, who love playing with the three languages involved. And as usual Mojca
-Miklavec make sure all compiles well on the buildbot infrastructure. Testing is
-done by \CONTEXT\ developers and users. Many thanks for their patience!
+{\bf remark:} \LUAMETATEX\ development is mostly done by Hans Hagen and in
+adapting the macros to the new features Wolfgang Schuster, who knows the code
+inside||out is a instrumental. In the initial phase Alan Braslau, who love
+playing with the three languages did extensive testing and compiled for several
+platforms. Later Mojca Miklavec make sure all compiles well on the buildbot
+infrastructure. After the first release more users got involved in testing. Many
+thanks for their patience! The development also triggered upgrading of the wiki
+support infrastructure where Taco Hoekwater and Paul Mazaitis have teamed up. So,
+progress all around.
{\bf remark:} When there are non|-|intrusive features that also make sense in
\LUATEX, these will be applied in the experimental branch first, so that there is
-no interference with the stable release.
+no interference with the stable release. However, given that in the meantime the
+code bases differs a lot, it is unlikely that much will trickle back. This is no
+real problem as there's not much demand for that anyway.
{\bf remark:} Most \CONTEXT\ users seem always willing to keep up with the latest
versions which means that \LMTX\ is tested well. We can therefore safely claim
that end of 2019 the code has become quite stable. There are no complaints about
-performance (on my laptop this manual compiles at 22.5 pps with \LMTX\ versus
-20.7 pps for the \LUATEX\ manual with \MKIV). Probably no one notices it, but
-memory consumption stepwise got reduced too. And \unknown\ the binary is still
-below 3~MegaBytes on all platforms.
+performance (on my 2013 laptop this manual compiles at 24.5 pps with \LMTX\
+versus 20.7 pps for the \LUATEX\ manual with \MKIV). After updating some of the
+\CONTEXT\ code to use recently added features by the end of 2020 I could do more
+than 25.5 pps but don't expect spectacular bumps in performance (I need a new
+machine for that to happen). Probably no one notices it, but memory consumption
+stepwise got reduced too. And \unknown\ the binary is still below 3~MegaBytes on
+all platforms.
\stopchapter
\stopcomponent
-% I'm not that strict with incrementing numbers, but let's occasionally bump
-% the number. Once we're stable it might happen more systematically. For sure
-% I don't want to end up with these redicoulous 0.99999999 kind of numbers.
-%
+% I'm not that strict with incrementing numbers, but let's occasionally bump the
+% number. Once we're stable it might happen more systematically. For sure I don't
+% want to end up with these 0.99999999 kind of numbers.
+
% We started with 2.00.0 and kept that number till November 2019, after Alan
-% Braslau and I did the initial beta release at April 1, 2019. After more than
-% a year working on the code base after the \CONTEXT\ 2019 meeting a state was
-% reached where nothing fundamental got added for a while. When \LUATEX\ needs
-% a patch, I check the \LUAMETATEX\ code base as the same patch might be needed
-% there. On the other hand, we don't need a strict compatibility, so some
-% patched in \LUATEX\ are not applied here.
+% Braslau and I did the initial beta release at April 1, 2019. After more than a
+% year working on the code base after the \CONTEXT\ 2019 meeting a state was
+% reached where nothing fundamental got added for a while. When \LUATEX\ needs a
+% patch, I check the \LUAMETATEX\ code base as the same patch might be needed
+% there. On the other hand, we don't need a strict compatibility, so some patched
+% in \LUATEX\ are not applied here.
+%
+% In November 2019 I started wondering if we should bump the number, just for the
+% sake of showing that there's still some progress. So I decided to bump to 2.01.0
+% then. Just as a reminder for myself: it was the day when I watched Jacob Collier
+% perform \LUA\ (feat. MARO) live on YouTube (of course that is not about the
+% language at all, but still a nice coincidence). Just for the fun of it the number
+% bumped a few more times, just to catch up, so end 2019 we're at 2.03.5.
%
-% In November 2019 I started wondering if we should bump the number, just for
-% the sake of showing that there's still some progress. So I decided to bump to
-% 2.01.0 then. Just as a reminder for myself: it was the day when I watched
-% Jacob Collier perform Lua (feat. MARO) live on YouTube (of course that is not
-% about the language at all, but still a nice coincidence). Just for the fun of
-% it the number bumped a few more times, just to catch up, so end 2019 we're at
-% 2.03.5.
+% Thanks to the patient \CONTEXT\ users we were able to apply the new macro scanner
+% and protection mechanisms that were introduced mid 2020.
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex
index 78d73985174..77c2d93d834 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex
@@ -190,17 +190,17 @@ kerning steps.
The start and end of a sequence of characters is signalled by a \nod {glue}, \nod
{penalty}, \nod {kern} or \nod {boundary} node. But by default also a \nod
-{hlist}, \nod {vlist}, \nod {rule}, \nod {dir}, \nod {whatsit}, \nod {ins}, and
+{hlist}, \nod {vlist}, \nod {rule}, \nod {dir}, \nod {whatsit}, \nod {insert}, and
\nod {adjust} node indicate a start or end. You can omit the last set from the
-test by setting \lpr {hyphenationbounds} to a non|-|zero value:
+test by setting flags in \lpr {hyphenationmode}:
\starttabulate[|c|l|]
-\DB value \BC behaviour \NC \NR
+\DB value \BC behaviour \NC \NR
\TB
-\NC \type{0} \NC not strict \NC \NR
-\NC \type{1} \NC strict start \NC \NR
-\NC \type{2} \NC strict end \NC \NR
-\NC \type{3} \NC strict start and strict end \NC \NR
+\NC \NC not strict \NC \NR
+\NC \type{64} \NC strict start \NC \NR
+\NC \type{128} \NC strict end \NC \NR
+\NC \type{192} \NC strict start and strict end \NC \NR
\LL
\stoptabulate
@@ -210,11 +210,11 @@ The word start is determined as follows:
\DB node \BC behaviour \NC \NR
\TB
\BC boundary \NC yes when wordboundary \NC \NR
-\BC hlist \NC when hyphenationbounds 1 or 3 \NC \NR
-\BC vlist \NC when hyphenationbounds 1 or 3 \NC \NR
-\BC rule \NC when hyphenationbounds 1 or 3 \NC \NR
-\BC dir \NC when hyphenationbounds 1 or 3 \NC \NR
-\BC whatsit \NC when hyphenationbounds 1 or 3 \NC \NR
+\BC hlist \NC when the start bit is set \NC \NR
+\BC vlist \NC when the start bit is set \NC \NR
+\BC rule \NC when the start bit is set \NC \NR
+\BC dir \NC when the start bit is set \NC \NR
+\BC whatsit \NC when the start bit is set \NC \NR
\BC glue \NC yes \NC \NR
\BC math \NC skipped \NC \NR
\BC glyph \NC exhyphenchar (one only) : yes (so no -- ---) \NC \NR
@@ -232,13 +232,13 @@ The word end is determined as follows:
\BC glue \NC yes \NC \NR
\BC penalty \NC yes \NC \NR
\BC kern \NC yes when not italic (for some historic reason) \NC \NR
-\BC hlist \NC when hyphenationbounds 2 or 3 \NC \NR
-\BC vlist \NC when hyphenationbounds 2 or 3 \NC \NR
-\BC rule \NC when hyphenationbounds 2 or 3 \NC \NR
-\BC dir \NC when hyphenationbounds 2 or 3 \NC \NR
-\BC whatsit \NC when hyphenationbounds 2 or 3 \NC \NR
-\BC ins \NC when hyphenationbounds 2 or 3 \NC \NR
-\BC adjust \NC when hyphenationbounds 2 or 3 \NC \NR
+\BC hlist \NC when the end bit is set \NC \NR
+\BC vlist \NC when the end bit is set \NC \NR
+\BC rule \NC when the end bit is set \NC \NR
+\BC dir \NC when the end bit is set \NC \NR
+\BC whatsit \NC when the end bit is set \NC \NR
+\BC ins \NC when the end bit is set \NC \NR
+\BC adjust \NC when the end bit is set \NC \NR
\LL
\stoptabulate
@@ -256,131 +256,80 @@ min values to 1 and make sure that the words hyphenate at each character.
\hbox to 2cm {%
\vtop {%
\hsize 1pt
- \hyphenationbounds#1
+ \advance\hyphenationmode#1\relax
#2
\par}}}
\startplacefigure[reference=hb:1,title={\type{one}}]
\startcombination[4*1]
- {\SomeTest{0}{one}} {\type{0}}
- {\SomeTest{1}{one}} {\type{1}}
- {\SomeTest{2}{one}} {\type{2}}
- {\SomeTest{3}{one}} {\type{3}}
+ {\SomeTest {0}{one}} {\type {0}}
+ {\SomeTest {64}{one}} {\type {64}}
+ {\SomeTest{128}{one}} {\type{128}}
+ {\SomeTest{192}{one}} {\type{192}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:2,title={\type{one\null two}}]
\startcombination[4*1]
- {\SomeTest{0}{one\null two}} {\type{0}}
- {\SomeTest{1}{one\null two}} {\type{1}}
- {\SomeTest{2}{one\null two}} {\type{2}}
- {\SomeTest{3}{one\null two}} {\type{3}}
+ {\SomeTest {0}{one\null two}} {\type {0}}
+ {\SomeTest {64}{one\null two}} {\type {64}}
+ {\SomeTest{128}{one\null two}} {\type{128}}
+ {\SomeTest{192}{one\null two}} {\type{192}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:3,title={\type{\null one\null two}}]
\startcombination[4*1]
- {\SomeTest{0}{\null one\null two}} {\type{0}}
- {\SomeTest{1}{\null one\null two}} {\type{1}}
- {\SomeTest{2}{\null one\null two}} {\type{2}}
- {\SomeTest{3}{\null one\null two}} {\type{3}}
+ {\SomeTest {0}{\null one\null two}} {\type {0}}
+ {\SomeTest {64}{\null one\null two}} {\type {64}}
+ {\SomeTest{128}{\null one\null two}} {\type{128}}
+ {\SomeTest{192}{\null one\null two}} {\type{192}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:4,title={\type{one\null two\null}}]
\startcombination[4*1]
- {\SomeTest{0}{one\null two\null}} {\type{0}}
- {\SomeTest{1}{one\null two\null}} {\type{1}}
- {\SomeTest{2}{one\null two\null}} {\type{2}}
- {\SomeTest{3}{one\null two\null}} {\type{3}}
+ {\SomeTest {0}{one\null two\null}} {\type {0}}
+ {\SomeTest {64}{one\null two\null}} {\type {64}}
+ {\SomeTest{128}{one\null two\null}} {\type{128}}
+ {\SomeTest{192}{one\null two\null}} {\type{192}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:5,title={\type{\null one\null two\null}}]
\startcombination[4*1]
- {\SomeTest{0}{\null one\null two\null}} {\type{0}}
- {\SomeTest{1}{\null one\null two\null}} {\type{1}}
- {\SomeTest{2}{\null one\null two\null}} {\type{2}}
- {\SomeTest{3}{\null one\null two\null}} {\type{3}}
+ {\SomeTest {0}{\null one\null two\null}} {\type {0}}
+ {\SomeTest {64}{\null one\null two\null}} {\type {64}}
+ {\SomeTest{128}{\null one\null two\null}} {\type{128}}
+ {\SomeTest{192}{\null one\null two\null}} {\type{192}}
\stopcombination
\stopplacefigure
-% (Future versions of \LUATEX\ might provide more granularity.)
-
In traditional \TEX\ ligature building and hyphenation are interwoven with the
line break mechanism. In \LUATEX\ these phases are isolated. As a consequence we
deal differently with (a sequence of) explicit hyphens. We already have added
some control over aspects of the hyphenation and yet another one concerns
automatic hyphens (e.g.\ \type {-} characters in the input).
-When \lpr {automatichyphenmode} has a value of 0, a hyphen will be turned into
-an automatic discretionary. The snippets before and after it will not be
-hyphenated. A side effect is that a leading hyphen can lead to a split but one
-will seldom run into that situation. Setting a pre and post character makes this
-more prominent. A value of 1 will prevent this side effect and a value of 2 will
-not turn the hyphen into a discretionary. Experiments with other options, like
-permitting hyphenation of the words on both sides were discarded.
-
-\startbuffer[a]
-before-after \par
-before--after \par
-before---after \par
-\stopbuffer
-
-\startbuffer[b]
--before \par
-after- \par
---before \par
-after-- \par
----before \par
-after--- \par
-\stopbuffer
-
-\startbuffer[c]
-before-after \par
-before--after \par
-before---after \par
-\stopbuffer
-
-\startbuffer[demo]
-\startcombination[nx=4,ny=3,location=top]
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize6em \getbuffer[a]}} {A~0~6em}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize2pt \getbuffer[a]}} {A~0~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plusone \hsize2pt \getbuffer[a]}} {A~1~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plustwo \hsize2pt \getbuffer[a]}} {A~2~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize6em \getbuffer[b]}} {B~0~6em}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize2pt \getbuffer[b]}} {B~0~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plusone \hsize2pt \getbuffer[b]}} {B~1~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plustwo \hsize2pt \getbuffer[b]}} {B~2~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize6em \getbuffer[c]}} {C~0~6em}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize2pt \getbuffer[c]}} {C~0~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plusone \hsize2pt \getbuffer[c]}} {C~1~2pt}
- {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plustwo \hsize2pt \getbuffer[c]}} {C~2~2pt}
-\stopcombination
-\stopbuffer
-
-\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
-
-\startplacefigure[reference=automatichyphenmode:2,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with \lpr {preexhyphenchar} and \lpr {postexhyphenchar} set to characters \type {A} and \type {B}.}]
- \postexhyphenchar`A\relax
- \preexhyphenchar `B\relax
- \dontcomplain \tt \getbuffer[demo]
-\stopplacefigure
-
-In \in {figure} [automatichyphenmode:1] \in {and} [automatichyphenmode:2] we show
-what happens with three samples:
-
-Input A: \typebuffer[a]
-Input B: \typebuffer[b]
-Input C: \typebuffer[c]
-
-As with primitive companions of other single character commands, the \prm {-}
-command has a more verbose primitive version in \lpr {explicitdiscretionary}
-and the normally intercepted in the hyphenator character \type {-} (or whatever
-is configured) is available as \lpr {automaticdiscretionary}.
+Hyphenation and discretionary injection is driven by a mode parameter which is
+a bitset made from the following values, some of which we saw in the previous
+examples.
+
+\starttabulate[|l|p|]
+\NC \number \normalhyphenationmodecode \NC honour (normal) \prm{discretionary}'s \NC \NR
+\NC \number \automatichyphenationmodecode \NC turn \type {-} into (automatic) discretionaries \NC \NR
+\NC \number \explicithyphenationmodecode \NC turn \type {\-} into (explicit) discretionaries \NC \NR
+\NC \number \syllablehyphenationmodecode \NC hyphenate (syllable) according to language \NC \NR
+\NC \number \uppercasehyphenationmodecode \NC hyphenate uppercase characters too (replaces \prm {uchyph} \NC \NR
+\NC \number \compoundhyphenationmodecode \NC permit break at an explicit hyphen (border cases) \NC \NR
+\NC \number \strictstarthyphenationmodecode \NC traditional \TEX\ compatibility wrt the start of a word \NC \NR
+\NC \number \strictendhyphenationmodecode \NC traditional \TEX\ compatibility wrt the end of a word \NC \NR
+\NC \number \automaticpenaltyhyphenationmodecode \NC use \lpr {automatichyphenpenalty} \NC \NR
+\NC \number \explicitpenaltyhyphenationmodecode \NC use \lpr {explicithyphenpenalty} \NC \NR
+\NC \number \permitgluehyphenationmodecode \NC turn glue in discretionaries into kerns \NC \NR
+\NC \number \lazyligatureshyphenationmodecode \NC controls how successive explicit discretionaries are handled in base mode \NC \NR
+\NC \number \forcecheckhyphenationmodecode \NC treat all discretionaries equal when breaking lines (in all three passes) \NC \NR
+\stoptabulate
\stopsection
@@ -493,25 +442,10 @@ have been added:
\explicithyphenpenalty
\stoptyping
-The first parameter has the following consequences for automatic discs (the ones
-resulting from an \prm {exhyphenchar}):
-
-\starttabulate[|c|l|l|]
-\DB mode \BC automatic disc \type {-} \BC explicit disc \prm{-} \NC \NR
-\TB
-\NC \type{0} \NC \prm {exhyphenpenalty} \NC \prm {exhyphenpenalty} \NC \NR
-\NC \type{1} \NC \prm {hyphenpenalty} \NC \prm {hyphenpenalty} \NC \NR
-\NC \type{2} \NC \prm {exhyphenpenalty} \NC \prm {hyphenpenalty} \NC \NR
-\NC \type{3} \NC \prm {hyphenpenalty} \NC \prm {exhyphenpenalty} \NC \NR
-\NC \type{4} \NC \lpr {automatichyphenpenalty} \NC \lpr {explicithyphenpenalty} \NC \NR
-\NC \type{5} \NC \prm {exhyphenpenalty} \NC \lpr {explicithyphenpenalty} \NC \NR
-\NC \type{6} \NC \prm {hyphenpenalty} \NC \lpr {explicithyphenpenalty} \NC \NR
-\NC \type{7} \NC \lpr {automatichyphenpenalty} \NC \prm {exhyphenpenalty} \NC \NR
-\NC \type{8} \NC \lpr {automatichyphenpenalty} \NC \prm {hyphenpenalty} \NC \NR
-\LL
-\stoptabulate
-
-other values do what we always did in \LUATEX: insert \prm {exhyphenpenalty}.
+The usage of these penalties is controlled by the \lpr {hyphenationmode} flags
+\number\automaticpenaltyhyphenationmodecode\space and
+\number\explicitpenaltyhyphenationmodecode\space and when these are not set \prm
+{exhyphenpenalty} is used.
\stopsection
@@ -575,7 +509,7 @@ In the last line of the table, you see there is no \prm {discretionary} command
in the value: the command is optional in the \TEX-based input syntax. The
underlying reason for that is that it is conceivable that a whole dictionary of
words is stored as a plain text file and loaded into \LUATEX\ using one of the
-functions in the \LUA\ \type {lang} library. This loading method is quite a bit
+functions in the \LUA\ \type {language} library. This loading method is quite a bit
faster than going through the \TEX\ language primitives, but some (most?) of that
speed gain would be lost if it had to interpret command sequences while doing so.
@@ -666,7 +600,7 @@ of the implementation:
\startitem
Because there is no \quote {trie preparation} stage, language patterns never
become frozen. This means that the primitive \prm {patterns} (and its \LUA\
- counterpart \type {lang.patterns}) can be used at any time, not only in
+ counterpart \type {language.patterns}) can be used at any time, not only in
ini\TEX.
\stopitem
\startitem
@@ -690,7 +624,7 @@ of the implementation:
permits a local overload for explicit \prm {discretionary} commands. The
value current when the hyphenation pass is applied is used. When no callbacks
are used this is compatible with traditional \TEX. When you apply the \LUA\
- \type {lang.hyphenate} function the current values are used.
+ \type {language.hyphenate} function the current values are used.
\stopitem
\startitem
The hyphenation exception dictionary is maintained as key|-|value hash, and
@@ -736,7 +670,7 @@ eventually either the limitation will be removed or perhaps it will become
possible to silently ignore the excess characters (this is what happens in
\TEX82, but there the behaviour cannot be controlled).
-If you are using the \LUA\ function \type {lang.hyphenate}, you should be aware
+If you are using the \LUA\ function \type {language.hyphenate}, you should be aware
that this function expects to receive a list of \quote {character} nodes. It will
not operate properly in the presence of \quote {glyph}, \quote {ligature}, or
\quote {ghost} nodes, nor does it know how to deal with kerning.
@@ -774,113 +708,15 @@ that we provide (which is part of \CONTEXT) distinguishes between base mode
(which essentially is what we describe here and which delegates the task to \TEX)
and node mode (which deals with more complex fonts.
-Let's look at an example. Take the word \type {office}, hyphenated \type
-{of-fice}, using a \quote {normal} font with all the \type {f}-\type {f} and
-\type {f}-\type {i} type ligatures:
-
-\starttabulate[|l|l|]
-\NC initial \NC \type {{o}{f}{f}{i}{c}{e}} \NC\NR
-\NC after hyphenation \NC \type {{o}{f}{{-},{},{}}{f}{i}{c}{e}} \NC\NR
-\NC first ligature stage \NC \type {{o}{{f-},{f},{<ff>}}{i}{c}{e}} \NC\NR
-\NC final result \NC \type {{o}{{f-},{<fi>},{<ffi>}}{c}{e}} \NC\NR
-\stoptabulate
-
-That's bad enough, but let us assume that there is also a hyphenation point
-between the \type {f} and the \type {i}, to create \type {of-f-ice}. Then the
-final result should be:
-
-\starttyping
-{o}{{f-},
- {{f-},
- {i},
- {<fi>}},
- {{<ff>-},
- {i},
- {<ffi>}}}{c}{e}
-\stoptyping
-
-with discretionaries in the post-break text as well as in the replacement text of
-the top-level discretionary that resulted from the first hyphenation point.
-
-Here is that nested solution again, in a different representation:
-
-\testpage[4]
-
-\starttabulate[|l|c|c|c|c|c|c|]
-\DB \BC pre \BC \BC post \BC \BC replace \BC \NC \NR
-\TB
-\NC topdisc \NC \type {f-} \NC (1) \NC sub 1 \NC \NC sub 2 \NC \NC \NR
-\NC sub 1 \NC \type {f-} \NC (2) \NC \type {i} \NC (3) \NC \type {<fi>} \NC (4) \NC \NR
-\NC sub 2 \NC \type {<ff>-} \NC (5) \NC \type {i} \NC (6) \NC \type {<ffi>} \NC (7) \NC \NR
-\LL
-\stoptabulate
-
-When line breaking is choosing its breakpoints, the following fields will
-eventually be selected:
-
-\starttabulate[|l|c|c|]
-\NC \type {of-f-ice} \NC \type {f-} \NC (1) \NC \NR
-\NC \NC \type {f-} \NC (2) \NC \NR
-\NC \NC \type {i} \NC (3) \NC \NR
-\NC \type {of-fice} \NC \type {f-} \NC (1) \NC \NR
-\NC \NC \type {<fi>} \NC (4) \NC \NR
-\NC \type {off-ice} \NC \type {<ff>-} \NC (5) \NC \NR
-\NC \NC \type {i} \NC (6) \NC \NR
-\NC \type {office} \NC \type {<ffi>} \NC (7) \NC \NR
-\stoptabulate
-
-The current solution in \LUATEX\ is not able to handle nested discretionaries,
-but it is in fact smart enough to handle this fictional \type {of-f-ice} example.
-It does so by combining two sequential discretionary nodes as if they were a
-single object (where the second discretionary node is treated as an extension of
-the first node).
-
-One can observe that the \type {of-f-ice} and \type {off-ice} cases both end with
-the same actual post replacement list (\type {i}), and that this would be the
-case even if \type {i} was the first item of a potential following ligature like
-\type {ic}. This allows \LUATEX\ to do away with one of the fields, and thus make
-the whole stuff fit into just two discretionary nodes.
-
-The mapping of the seven list fields to the six fields in this discretionary node
-pair is as follows:
-
-\starttabulate[|l|c|c|]
-\DB field \BC description \NC \NC \NR
-\TB
-\NC \type {disc1.pre} \NC \type {f-} \NC (1) \NC \NR
-\NC \type {disc1.post} \NC \type {<fi>} \NC (4) \NC \NR
-\NC \type {disc1.replace} \NC \type {<ffi>} \NC (7) \NC \NR
-\NC \type {disc2.pre} \NC \type {f-} \NC (2) \NC \NR
-\NC \type {disc2.post} \NC \type {i} \NC (3,6) \NC \NR
-\NC \type {disc2.replace} \NC \type {<ff>-} \NC (5) \NC \NR
-\LL
-\stoptabulate
-
-What is actually generated after ligaturing has been applied is therefore:
-
-\starttyping
-{o}{{f-},
- {<fi>},
- {<ffi>}}
- {{f-},
- {i},
- {<ff>-}}{c}{e}
-\stoptyping
-
-The two discretionaries have different subtypes from a discretionary appearing on
-its own: the first has subtype 4, and the second has subtype 5. The need for
-these special subtypes stems from the fact that not all of the fields appear in
-their \quote {normal} location. The second discretionary especially looks odd,
-with things like the \type {<ff>-} appearing in \type {disc2.replace}. The fact
-that some of the fields have different meanings (and different processing code
-internally) is what makes it necessary to have different subtypes: this enables
-\LUATEX\ to distinguish this sequence of two joined discretionary nodes from the
-case of two standalone discretionaries appearing in a row.
-
-Of course there is still that relationship with fonts: ligatures can be implemented by
-mapping a sequence of glyphs onto one glyph, but also by selective replacement and
-kerning. This means that the above examples are just representing the traditional
-approach.
+In so called base mode, where \TEX\ does the work, the ligature construction
+(normally) goes in small steps. An \type {f} followed by an \type {f} becomes an
+\type {ff} ligatures and that one followed by an \type {i} can become a \type
+{ffi} ligature. The situation can be complicated by hyphenation points between
+these characters. When there are several in a ligature collapsing happens. Flag
+{\tttf "\uchexnumbers {\lazyligatureshyphenationmodecode}} in the \lpr
+{hyphenationmode} variable determines if this happens lazy or greedy, i.e.\ the
+first hyphen wins or the last one does. In practice a \CONTEXT\ user won't have
+to deal with this because most fonts are processed in node mode.
\stopsection
@@ -912,7 +748,7 @@ ligatures are used. Of course kerning also complicates matters here.
\stopsection
-\startsection[title={The \type {lang} library}][library=lang]
+\startsection[title={The \type {language} library}][library=lang]
\subsection {\type {new} and \type {id}}
@@ -925,34 +761,38 @@ This library provides the interface to \LUATEX's structure representing a
language, and the associated functions.
\startfunctioncall
-<language> l = lang.new()
-<language> l = lang.new(<number> id)
+<language> l = language.new()
+<language> l = language.new(<number> id)
\stopfunctioncall
This function creates a new userdata object. An object of type \type {<language>}
-is the first argument to most of the other functions in the \type {lang} library.
-These functions can also be used as if they were object methods, using the colon
-syntax. Without an argument, the next available internal id number will be
-assigned to this object. With argument, an object will be created that links to
-the internal language with that id number.
+is the first argument to most of the other functions in the \type {language}
+library. These functions can also be used as if they were object methods, using
+the colon syntax. Without an argument, the next available internal id number will
+be assigned to this object. With argument, an object will be created that links
+to the internal language with that id number.
\startfunctioncall
-<number> n = lang.id(<language> l)
+<number> n = language.id(<language> l)
\stopfunctioncall
-The number returned is the internal \prm {language} id number this object refers to.
+The number returned is the internal \prm {language} id number this object refers
+to.
\subsection {\type {hyphenation}}
\libindex {hyphenation}
-You can hyphenate a string directly with:
+You can load exceptions with:
\startfunctioncall
-<string> n = lang.hyphenation(<language> l)
-lang.hyphenation(<language> l, <string> n)
+<string> n = language.hyphenation(<language> l)
+language.hyphenation(<language> l, <string> n)
\stopfunctioncall
+When no string is given (the first example) a string with all exceptions is
+returned.
+
\subsection {\type {clear_hyphenation} and \type {clean}}
\libindex {clear_hyphenation}
@@ -963,14 +803,14 @@ new ones. The syntax of the string is explained in~\in {section}
[patternsexceptions].
\startfunctioncall
-lang.clear_hyphenation(<language> l)
+language.clear_hyphenation(<language> l)
\stopfunctioncall
This call clears the exception dictionary (string) for this language.
\startfunctioncall
-<string> n = lang.clean(<language> l, <string> o)
-<string> n = lang.clean(<string> o)
+<string> n = language.clean(<language> l, <string> o)
+<string> n = language.clean(<string> o)
\stopfunctioncall
This function creates a hyphenation key from the supplied hyphenation value. The
@@ -984,8 +824,8 @@ dictionary file, like spell|-|checking.
\libindex {clear_patterns}
\startfunctioncall
-<string> n = lang.patterns(<language> l)
-lang.patterns(<language> l, <string> n)
+<string> n = language.patterns(<language> l)
+language.patterns(<language> l, <string> n)
\stopfunctioncall
This adds additional patterns for this language object, or returns the current
@@ -993,7 +833,7 @@ set. The syntax of this string is explained in \in {section}
[patternsexceptions].
\startfunctioncall
-lang.clear_patterns(<language> l)
+language.clear_patterns(<language> l)
\stopfunctioncall
This can be used to clear the pattern dictionary for a language.
@@ -1006,8 +846,8 @@ This function sets (or gets) the value of the \TEX\ parameter
\type {\hyphenationmin}.
\startfunctioncall
-n = lang.hyphenationmin(<language> l)
-lang.hyphenationmin(<language> l, <number> n)
+n = language.hyphenationmin(<language> l)
+language.hyphenationmin(<language> l, <number> n)
\stopfunctioncall
\subsection {\type {[pre|post][ex|]hyphenchar}}
@@ -1018,11 +858,11 @@ lang.hyphenationmin(<language> l, <number> n)
\libindex {postexhyphenchar}
\startfunctioncall
-<number> n = lang.prehyphenchar(<language> l)
-lang.prehyphenchar(<language> l, <number> n)
+<number> n = language.prehyphenchar(<language> l)
+language.prehyphenchar(<language> l, <number> n)
-<number> n = lang.posthyphenchar(<language> l)
-lang.posthyphenchar(<language> l, <number> n)
+<number> n = language.posthyphenchar(<language> l)
+language.posthyphenchar(<language> l, <number> n)
\stopfunctioncall
These two are used to get or set the \quote {pre|-|break} and \quote
@@ -1030,11 +870,11 @@ These two are used to get or set the \quote {pre|-|break} and \quote
intial values are decimal 45 (hyphen) and decimal~0 (indicating emptiness).
\startfunctioncall
-<number> n = lang.preexhyphenchar(<language> l)
-lang.preexhyphenchar(<language> l, <number> n)
+<number> n = language.preexhyphenchar(<language> l)
+language.preexhyphenchar(<language> l, <number> n)
-<number> n = lang.postexhyphenchar(<language> l)
-lang.postexhyphenchar(<language> l, <number> n)
+<number> n = language.postexhyphenchar(<language> l)
+language.postexhyphenchar(<language> l, <number> n)
\stopfunctioncall
These gets or set the \quote {pre|-|break} and \quote {post|-|break} hyphen
@@ -1051,8 +891,8 @@ The next call inserts hyphenation points (discretionary nodes) in a node list. I
are proper nodes, regardless of possible other errors.
\startfunctioncall
-<boolean> success = lang.hyphenate(<node> head)
-<boolean> success = lang.hyphenate(<node> head, <node> tail)
+<boolean> success = language.hyphenate(<node> head)
+<boolean> success = language.hyphenate(<node> head, <node> tail)
\stopfunctioncall
Hyphenation works only on \quote {characters}, a special subtype of all the glyph
@@ -1068,8 +908,8 @@ more details.
The following two commands can be used to set or query hj codes:
\startfunctioncall
-lang.sethjcode(<language> l, <number> char, <number> usedchar)
-<number> usedchar = lang.gethjcode(<language> l, <number> char)
+language.sethjcode(<language> l, <number> char, <number> usedchar)
+<number> usedchar = language.gethjcode(<language> l, <number> char)
\stopfunctioncall
When you set a hjcode the current sets get initialized unless the set was already
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex
index a126a95dcea..ed4b269b6fb 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex
@@ -31,9 +31,10 @@ In this mode, it will set \LUA's \type {arg[0]} to the found script name, pushin
preceding options in negative values and the rest of the command line in the
positive values, just like the \LUA\ interpreter does.
-\LUAMETATEX\ will exit immediately after executing the specified \LUA\ script and is,
-in effect, a somewhat bulky stand alone \LUA\ interpreter with a bunch of extra
-preloaded libraries.
+\LUAMETATEX\ will exit immediately after executing the specified \LUA\ script and
+is, in effect, a somewhat bulky stand alone \LUA\ interpreter with a bunch of
+extra preloaded libraries. But we really want to keep the binary small, if
+possible below the 3MB which is okay for a script engine.
When no argument is given, \LUAMETATEX\ will look for a \LUA\ file with the same
name as the binary and run that one when present. This makes it possible to use
@@ -69,6 +70,20 @@ There are less options than with \LUATEX, because one has to deal with them in
\LUA\ anyway. There are no options to enter a safer mode or control executing
programs. This can easily be achieved with a startup \LUA\ script.
+Next the initialization script is loaded and executed. From within the script,
+the entire command line is available in the \LUA\ table \type {arg}, beginning
+with \type {arg[0]}, containing the name of the executable. As consequence
+warnings about unrecognized options are suppressed.
+
+Command line processing happens very early on. So early, in fact, that none of
+\TEX's initializations have taken place yet. The \LUA\ libraries that don't deal
+with \TEX\ are initialized early.
+
+\LUAMETATEX\ allows some of the command line options to be overridden by reading
+values from the \type {texconfig} table at the end of script execution (see the
+description of the \type {texconfig} table later on in this document for more
+details on which ones exactly).
+
The value to use for \prm {jobname} is decided as follows:
\startitemize
@@ -91,21 +106,7 @@ The value to use for \prm {jobname} is decided as follows:
\stopitem
\stopitemize
-Next the initialization script is loaded and executed. From within the script,
-the entire command line is available in the \LUA\ table \type {arg}, beginning
-with \type {arg[0]}, containing the name of the executable. As consequence
-warnings about unrecognized options are suppressed.
-
-Command line processing happens very early on. So early, in fact, that none of
-\TEX's initializations have taken place yet. The \LUA\ libraries that don't deal
-with \TEX\ are initialized early.
-
-\LUAMETATEX\ allows some of the command line options to be overridden by reading
-values from the \type {texconfig} table at the end of script execution (see the
-description of the \type {texconfig} table later on in this document for more
-details on which ones exactly).
-
-So let's summarize this. The handling of when is called jobname is a bit complex.
+So let's summarize this. The handling of what is called jobname is a bit complex.
There can be explicit names set on the command line but when not set they can be
taken from the \type {texconfig} table.
@@ -117,7 +118,9 @@ taken from the \type {texconfig} table.
These names are initialized according to \type {--luaonly} or the first filename
seen in the list of options. Special treatment of \type {&} and \type {*} as well
-as interactive startup is gone.
+as interactive startup is gone but we still enter \TEX\ via an forced \type {\input}
+into the input buffer. \footnote {This might change at some point into an explicit
+loading triggered via \LUA.}
When we are in \TEX\ mode at some point the engine needs a filename, for instance
for opening a log file. At that moment the set jobname becomes the internal one
@@ -133,6 +136,12 @@ access etc.\ internally uses the current code page but to the user is exposed as
% engine_state .startup_jobname : handles by option parser
% environment_state.input_name : temporary interceptor
+There is an extra options \type{--permitloadlib} that needs to be given when you
+load external libraries via \LUA. Although you could manage this via \LUA\ itself
+in a startup script, the reason for having this as option is the wish for
+security (at some point that became a demand for \LUATEX), so this might give an
+extra feeling of protection.
+
\stopsubsection
\stopsection
@@ -199,8 +208,10 @@ some care you can deal with \UNICODE\ just fine.
There are some more libraries present. These are discussed on a later chapter.
For instance we embed \type {luasocket} but contrary to \LUATEX\ don't embed the
related \LUA\ code. An adapted version of \type {luafilesystem} is also included.
-There is a more extensive math library and there are libraries that deal with
-encryption and compression.
+There are more extensive math libraries and there are libraries that deal with
+encryption and compression. At some point some of these might become so called
+optional libraries (read: the handful that we provide interfaces for but that get
+loaded on demand).
\stopsection
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
index 7f77bbd6d39..02f5f8c71da 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
@@ -143,7 +143,8 @@ It is possible to discover the math style that will be used for a formula in an
expandable fashion (while the math list is still being read). To make this
possible, \LUATEX\ adds the new primitive: \lpr {mathstyle}. This is a \quote
{convert command} like e.g. \prm {romannumeral}: its value can only be read,
-not set.
+not set. Beware that contrary to \LUATEX\ this is now a proper number so you need
+to use \type {\number} o r\type {\the} in order to serialize it.
The returned value is between 0 and 7 (in math mode), or $-1$ (all other modes).
For easy testing, the eight math style commands have been altered so that they can
@@ -178,55 +179,55 @@ differ from the used style (second pass). In the case of a math choice used
ungrouped, the chosen style is used after the choice too, unless you group.
\startbuffer[1]
- [a:\mathstyle]\quad
+ [a:\number\mathstyle]\quad
\bgroup
\mathchoice
- {\bf \scriptstyle (x:d :\mathstyle)}
- {\bf \scriptscriptstyle (x:t :\mathstyle)}
- {\bf \scriptscriptstyle (x:s :\mathstyle)}
- {\bf \scriptscriptstyle (x:ss:\mathstyle)}
+ {\bf \scriptstyle (x:d :\number\mathstyle)}
+ {\bf \scriptscriptstyle (x:t :\number\mathstyle)}
+ {\bf \scriptscriptstyle (x:s :\number\mathstyle)}
+ {\bf \scriptscriptstyle (x:ss:\number\mathstyle)}
\egroup
- \quad[b:\mathstyle]\quad
+ \quad[b:\number\mathstyle]\quad
\mathchoice
- {\bf \scriptstyle (y:d :\mathstyle)}
- {\bf \scriptscriptstyle (y:t :\mathstyle)}
- {\bf \scriptscriptstyle (y:s :\mathstyle)}
- {\bf \scriptscriptstyle (y:ss:\mathstyle)}
- \quad[c:\mathstyle]\quad
+ {\bf \scriptstyle (y:d :\number\mathstyle)}
+ {\bf \scriptscriptstyle (y:t :\number\mathstyle)}
+ {\bf \scriptscriptstyle (y:s :\number\mathstyle)}
+ {\bf \scriptscriptstyle (y:ss:\number\mathstyle)}
+ \quad[c:\number\mathstyle]\quad
\bgroup
\mathchoice
- {\bf \scriptstyle (z:d :\mathstyle)}
- {\bf \scriptscriptstyle (z:t :\mathstyle)}
- {\bf \scriptscriptstyle (z:s :\mathstyle)}
- {\bf \scriptscriptstyle (z:ss:\mathstyle)}
+ {\bf \scriptstyle (z:d :\number\mathstyle)}
+ {\bf \scriptscriptstyle (z:t :\number\mathstyle)}
+ {\bf \scriptscriptstyle (z:s :\number\mathstyle)}
+ {\bf \scriptscriptstyle (z:ss:\number\mathstyle)}
\egroup
- \quad[d:\mathstyle]
+ \quad[d:\number\mathstyle]
\stopbuffer
\startbuffer[2]
- [a:\mathstyle]\quad
+ [a:\number\mathstyle]\quad
\begingroup
\mathchoice
- {\bf \scriptstyle (x:d :\mathstyle)}
- {\bf \scriptscriptstyle (x:t :\mathstyle)}
- {\bf \scriptscriptstyle (x:s :\mathstyle)}
- {\bf \scriptscriptstyle (x:ss:\mathstyle)}
+ {\bf \scriptstyle (x:d :\number\mathstyle)}
+ {\bf \scriptscriptstyle (x:t :\number\mathstyle)}
+ {\bf \scriptscriptstyle (x:s :\number\mathstyle)}
+ {\bf \scriptscriptstyle (x:ss:\number\mathstyle)}
\endgroup
- \quad[b:\mathstyle]\quad
+ \quad[b:\number\mathstyle]\quad
\mathchoice
- {\bf \scriptstyle (y:d :\mathstyle)}
- {\bf \scriptscriptstyle (y:t :\mathstyle)}
- {\bf \scriptscriptstyle (y:s :\mathstyle)}
- {\bf \scriptscriptstyle (y:ss:\mathstyle)}
- \quad[c:\mathstyle]\quad
+ {\bf \scriptstyle (y:d :\number\mathstyle)}
+ {\bf \scriptscriptstyle (y:t :\number\mathstyle)}
+ {\bf \scriptscriptstyle (y:s :\number\mathstyle)}
+ {\bf \scriptscriptstyle (y:ss:\number\mathstyle)}
+ \quad[c:\number\mathstyle]\quad
\begingroup
\mathchoice
- {\bf \scriptstyle (z:d :\mathstyle)}
- {\bf \scriptscriptstyle (z:t :\mathstyle)}
- {\bf \scriptscriptstyle (z:s :\mathstyle)}
- {\bf \scriptscriptstyle (z:ss:\mathstyle)}
+ {\bf \scriptstyle (z:d :\number\mathstyle)}
+ {\bf \scriptscriptstyle (z:t :\number\mathstyle)}
+ {\bf \scriptscriptstyle (z:s :\number\mathstyle)}
+ {\bf \scriptscriptstyle (z:ss:\number\mathstyle)}
\endgroup
- \quad[d:\mathstyle]
+ \quad[d:\number\mathstyle]
\stopbuffer
\typebuffer[1]
@@ -423,6 +424,7 @@ has resulted in turning some hard codes properties into parameters.
\NC \lpr {Umathsupsubbottommax} \NC the bottom of the superscript of a combined super- and subscript
be at least as high as this above the baseline \NC \NR
\NC \lpr {Umathsubsupvgap} \NC vertical clearance between super- and subscript \NC \NR
+\NC \lpr {Umathspacebeforescript} \NC additional space added before a super- or subprescript (bonus setting) \NC \NR
\NC \lpr {Umathspaceafterscript} \NC additional space added after a super- or subscript \NC \NR
\NC \lpr {Umathconnectoroverlapmin}\NC minimum overlap between parts in an extensible recipe \NC \NR
\LL
@@ -734,7 +736,7 @@ marked \type {*} in the \TEX book. These will not actually be used as those
combinations of atoms cannot actually happen, but it seemed better not to break
orthogonality. They are initialized to zero.
-\subsection{Local settings}
+\subsection{Local \lpr {frozen} settings with}
Math is processed in two passes. The first pass is needed to intercept for
instance \type {\over}, one of the few \TEX\ commands that actually has a
@@ -750,7 +752,7 @@ front.
\startbuffer
$
- x \Usubscript {-}
+ x \Usubscript {-}
\frozen\Umathsubshiftdown\textstyle 0pt x \Usubscript {0}
{\frozen\Umathsubshiftdown\textstyle 5pt x \Usubscript {5}}
x \Usubscript {0}
@@ -775,7 +777,22 @@ unprocessed math list. The result looks as follows:
\blank \getbuffer \blank
+\subsection{Checking a state with \lpr {ifmathparameter}}
+When you adapt math parameters it might make sense to see if they are set at all.
+When a parameter is unset its value has the maximum dimension value and you might
+for instance mistakenly multiply that value to open up things a bit, which gives
+unexpected side effects. For that reason there is a convenient checker: \lpr
+{ifmathparameter}. This test primitive behaves like an \prm {ifcase}, with:
+
+\starttabulate[|c|l|]
+\DB value \BC meaning \NC \NR
+\TB
+\NC 0 \NC the parameter value is zero \NC \NR
+\NC 1 \NC the parameter is set \NC \NR
+\NC 2 \NC the parameter is unset \NC \NR
+\LL
+\stoptabulate
\subsection{Skips around display math and \lpr {mathdisplayskipmode}}
@@ -788,7 +805,7 @@ to fully control spacing. Therefore \LUATEX\ comes with a new directive: \lpr
{mathdisplayskipmode}. The following values apply:
\starttabulate[|c|l|]
-\DB value \BC meaning \NC \NR
+\DB value \BC meaning \NC \NR
\TB
\NC 0 \NC normal \TEX\ behaviour \NC \NR
\NC 1 \NC always (same as 0) \NC \NR
@@ -1096,7 +1113,34 @@ with in the engine). The full list of flags is given in the next table:
\LL
\stoptabulate
-The effect can depend on the font (and for Cambria one can use for instance \type {"16}).
+The effect can depend on the font (and for Cambria one can use for instance \type
+{"16}).
+
+Sometimes you might want to act upon the size of a delimiter, something that is
+not really possible because of the fact that they are calculated {\em after} most
+has been typeset already. For this we have two keyword: \type {phantom} and
+\type {void}. In both cases the symbol is replaced by an empty rule, in the first
+case all three dimensions are preserved in the last case only the height and depth.
+
+\startbuffer
+\startformula
+ x\mathlimop{\Uvextensible \Udelimiter 5 0 "222B}_1^2 x
+\stopformula
+\vskip-9ex
+\startformula \red
+ x\mathlimop{\Uvextensible phantom \Udelimiter 5 0 "222B}_1^2 x
+\stopformula
+\vskip-9ex
+\startformula \blue
+ x\mathlimop{\Uvextensible void \Udelimiter 5 0 "222B}_1^2 x
+\stopformula
+\stopbuffer
+
+\typebuffer
+
+In typeset form this looks like:
+
+\getbuffer
\subsection[mathacc]{Accent handling with \lpr {Umathaccent}}
@@ -1350,7 +1394,80 @@ For Latin Modern the result looks as follows:
\stoptabulate
\stop
-\subsection {Delimiters: \type{\Uleft}, \prm {Umiddle} and \prm {Uright}}
+The \type {\over} and related primitives have the form:
+
+\starttyping
+{{top}\over{bottom}}
+\stoptyping
+
+For convenience, which also avoids some of the trickery that makes this
+\quote {looking back} possible, the \LUAMETATEX\ also provides this variant:
+
+\starttyping
+\Uover{top}{bottom}
+\stoptyping
+
+The optional arguments are also supported but we have one extra option: \type
+{style}. The style is applied to the numerator and denominator.
+
+\starttyping
+\Uover style \scriptstyle {top} {bottom}
+\stoptyping
+
+The complete list of these commands is: \lpr {Uabove}, \lpr {Uatop}, \lpr
+{Uover}, \lpr {Uabovewithdelims}, \lpr {Uatopwithdelims}, \lpr {Uoverwithdelims},
+\lpr {UUskewed}, \lpr {UUskewedwithdelims}. As with other extensions we use a
+leading \type {U} and because we already had extra skew related primitives we end
+up with a \type {UU} there. This obscurity is not that big an issue because
+normally such primitives are wrapped in a macro. Here are a few examples:
+
+\startbuffer
+$\Uover { 1234} { 5678} $\quad
+$\Uover {\textstyle 1234} {\textstyle 5678} $\quad
+$\Uover {\scriptstyle 1234} {\scriptstyle 5678} $\quad
+$\Uover {\scriptscriptstyle 1234} {\scriptscriptstyle 5678} $\blank
+
+$\Uover {1234} {5678} $\quad
+$\Uover style \textstyle {1234} {5678} $\quad
+$\Uover style \scriptstyle {1234} {5678} $\quad
+$\Uover style \scriptscriptstyle {1234} {5678} $\blank
+\stopbuffer
+
+\typebuffer
+
+These render as: \getbuffer
+
+\subsection {Math styles: \lpr {Ustyle}}
+
+This primitive accepts a style identifier:
+
+\starttyping
+\Ustyle \displaystyle
+\stoptyping
+
+This in itself is not spectacular because it is equivalent to
+
+\starttyping
+\displaystyle
+\stoptyping
+
+Both commands inject a style node and change the current style. However, as in other
+places where \LUAMETATEX\ expects a style you can also pass a number in the range
+zero upto seven (like the ones reported by the primitive \lpr {mathstyle}). So, the
+next few lines give identical results:
+
+\startbuffer
+$\Ustyle0 \number\mathstyle \Ustyle7 \number\mathstyle$
+$\Ustyle\displaystyle \number\mathstyle \Ustyle\crampedscriptscriptstyle \number\mathstyle$
+$ \displaystyle \number\mathstyle \crampedscriptscriptstyle \number\mathstyle$
+\stopbuffer
+
+Like: \inlinebuffer . Values outside the valid range are ignored.
+
+There is an extra option \type {norule} that can be used to suppress the rule while
+keeping the spacing compatible.
+
+\subsection {Delimiters: \type{\Uleft}, \lpr {Umiddle} and \lpr {Uright}}
\topicindex {math+delimiters}
@@ -1430,9 +1547,15 @@ These commands are provided as convenience. Before they come available you could
do the following:
\starttyping
-\def\Umathcharclass{\directlua{tex.print(tex.getmathcode(token.scan_int())[1])}}
-\def\Umathcharfam {\directlua{tex.print(tex.getmathcode(token.scan_int())[2])}}
-\def\Umathcharslot {\directlua{tex.print(tex.getmathcode(token.scan_int())[3])}}
+\def\Umathcharclass{\numexpr
+ \directlua{tex.print(tex.getmathcode(token.scan_int())[1])}
+\relax}
+\def\Umathcharfam{\numexpr
+ \directlua{tex.print(tex.getmathcode(token.scan_int())[2])}
+\relax}
+\def\Umathcharslot{\numexpr
+ \directlua{tex.print(tex.getmathcode(token.scan_int())[3])}
+\relax}
\stoptyping
\subsection {Last lines and \lpr{predisplaygapfactor}}
@@ -1569,6 +1692,7 @@ mode parameter. The default value is~1.
\LL
\stoptabulate
+
\subsection {Less Tracing}
\topicindex {math+tracing}
@@ -1579,6 +1703,79 @@ to limit tracing. Only when \type {tracingassigns} and|/|or \type
\stopsection
+\startsection[title={Experiments}]
+
+There are a couple of experimental features. They will stay but details might
+change, for instance more control over spacing. We just show some examples and
+let your imagination work it out. First we have prescripts:
+
+\subsection {Prescripts with \lpr {Usuperprescript} and {Usubprescript}}
+
+\startbuffer
+\hbox{$
+ {\tf X}^1_2^^3__4 \quad
+ {\tf X}^1 ^^3 \quad
+ {\tf X} _1 __4 \quad
+ {\tf X} ^^3 \quad
+ {\tf X} __4 \quad
+ {\tf X}^^3 __4
+$}
+\stopbuffer
+
+\typebuffer
+
+The question is: are these double super and subscript triggers the way to go?
+Anyway, you need to have them either being active (which in \CONTEXT\ then boils
+down to them being other characters), or say \type {\supmarkmode = 1} to disable
+the normal multiple \type {^} treatment (a value larger than 1 will also disable
+that in text mode).
+
+\blank \getbuffer \blank
+
+The more explicit commands are:
+
+\startbuffer
+\hbox{$
+{\tf X}\Usuperscript{1} \quad
+{\tf X} \Usubscript{2} \quad
+{\tf X}\Usuperscript{1}\Usubscript{2} \quad
+{\tf X}\Usuperscript{1} \Usuperprescript{3} \quad
+{\tf X} \Usubscript{2} \Usubprescript{4}\quad
+{\tf X}\Usuperscript{1}\Usubscript{2}\Usuperprescript{3}\Usubprescript{4}\quad
+{\tf X} \Usuperprescript{3} \quad
+{\tf X} \Usubprescript{4}\quad
+{\tf X} \Usuperprescript{3}\Usubprescript{4}
+$}
+\stopbuffer
+
+\typebuffer
+
+These more verbose triggers can be used to build interfaces:
+
+\blank \getbuffer \blank
+
+\subsection {Prescripts with \lpr {Usuperprescript} and {Usubprescript}}
+
+You can change the class of a math character on the fly:
+
+\startbuffer
+$x\mathopen {!}+123+\mathclose {!}x$
+$x\Umathclass4 ! +123+\Umathclass5 ! x$
+$x ! +123+ ! x$
+$x\mathclose {!}+123+\mathopen {!}x$
+$x\Umathclass5 ! +123+\Umathclass4 ! x$
+\stopbuffer
+
+\typebuffer
+
+Watch how the spacing changes:
+
+\startlines
+\getbuffer
+\stoplines
+
+\stopsection
+
\stopchapter
\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex
index bd918995670..c687a5a46d3 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex
@@ -34,26 +34,28 @@ This creates the \type {mp} instance object. The argument is a hash table that
can have a number of different fields, as follows:
\starttabulate[|l|l|pl|pl|]
-\DB name \BC type \BC description \BC default \NC \NR
+\DB name \BC type \BC description \BC default \NC \NR
\TB
-\NC \type{error_line} \NC number \NC error line width \NC 79 \NC \NR
-\NC \type{print_line} \NC number \NC line length in ps output \NC 100 \NC \NR
-\NC \type{random_seed} \NC number \NC the initial random seed \NC variable \NC \NR
+\NC \type{error_line} \NC number \NC error line width \NC 79 \NC \NR
+\NC \type{print_line} \NC number \NC line length in ps output \NC 100 \NC \NR
+\NC \type{random_seed} \NC number \NC the initial random seed \NC variable \NC \NR
\NC \type{math_mode} \NC string \NC the number system to use:
\type {scaled},
\type {double} or
% \type {binary} or
- \type {decimal} \NC \type {scaled} \NC \NR
+ \type {decimal} \NC \type {scaled} \NC \NR
\NC \type{interaction} \NC string \NC the interaction mode:
\type {batch},
\type {nonstop},
\type {scroll} or
- \type {errorstop} \NC \type {errorstop} \NC \NR
-\NC \type{job_name} \NC string \NC a compatibility value \NC \type {mpout} \NC \NR
-\NC \type{find_file} \NC function \NC a function to find files \NC only local files \NC \NR
-\NC \type{utf8} \NC boolean \NC permit characters in the
+ \type {errorstop} \NC \type {errorstop} \NC \NR
+\NC \type{job_name} \NC string \NC a compatibility value \NC \NC \NR
+\NC \type{find_file} \NC function \NC a function to find files \NC only local files \NC \NR
+\NC \type{utf8_mode} \NC boolean \NC permit characters in the
range 128 upto 255 to be
- part of names \NC \type {false} \NC \NR
+ part of names \NC \type {false} \NC \NR
+\NC \type{text_mode} \NC boolean \NC permit characters 2 and 3
+ as fencing string literals \NC \type {false} \NC \NR
\LL
\stoptabulate
@@ -427,10 +429,6 @@ a bunch of vital characteristics of the used pen (all values are floats):
\LL
\stoptabulate
-\stopsection
-
-\startsection[title=Acessors]
-
\subsection[title={Character size information}]
\libindex{char_width}
@@ -441,13 +439,109 @@ These functions find the size of a glyph in a defined font. The \type {fontname}
is the same name as the argument to \type {infont}; the \type {char} is a glyph
id in the range 0 to 255; the returned \type {w} is in AFM units.
-
\startfunctioncall
<number> w = char_width(mp,<string> fontname, <number> char)
<number> h = char_height(mp,<string> fontname, <number> char)
<number> d = char_depth(mp,<string> fontname, <number> char)
\stopfunctioncall
+\stopsection
+
+\startsection[title=Scanners]
+
+After a relative long period of testing the scanners are now part of the
+interface. That doesn't mean that there will be no changes: depending on the
+needs and experiences details might evolve. The summary below is there
+still preliminary and mostly provided as reminder.
+
+\starttabulate[|l|l|p|]
+\DB scanner \BC argument \BC returns \NC \NR
+\TB
+\NC \type{scan_next} \NC instance, keep \NC token, mode, type \NC \NR
+\NC \type{scan_expression} \NC instance, keep \NC type \NC \NR
+\NC \type{scan_token} \NC instance, keep \NC token, mode, kind \NC \NR
+\NC \type{scan_symbol} \NC instance, keep, expand \NC string \NC \NR
+\NC \type{scan_numeric} \NC instance, type \NC number \NC \NR
+\NC \type{scan_integer} \NC instance, type \NC integer \NC \NR
+\NC \type{scan_boolean} \NC instance, type \NC boolean \NC \NR
+\NC \type{scan_string} \NC instance, type \NC string \NC \NR
+\NC \type{scan_pair} \NC instance, hashed, type \NC table or two numbers \NC \NR
+\NC \type{scan_color} \NC instance, hashed, type \NC table or three numbers \NC \NR
+\NC \type{scan_cmykcolor} \NC instance, hashed, type \NC table or four numbers \NC \NR
+\NC \type{scan_transform} \NC instance, hashed, type \NC table or six numbers \NC \NR
+\NC \type{scan_path} \NC instance, hashed, type \NC table with hashes or arrays \NC \NR
+\NC \type{scan_pen} \NC instance, hashed, type \NC table with hashes or arrays \NC \NR
+\LL
+\stoptabulate
+
+The types and token codes are numbers but they actually depend on the
+implementation (although changes are unlikely). The types of data structures can
+be queried with \type {mplib.gettypes()}:
+
+\dontleavehmode \startluacode
+ local t = mplib.gettypes()
+ for i=0,#t do
+ if i > 0 then
+ context(", ")
+ end
+ context("%i: %s",i,t[i])
+ end
+\stopluacode .
+
+The command codes are available with \type {mplib.getcodes()}:
+
+\dontleavehmode \startluacode
+ local t = mplib.getcodes()
+ for i=0,#t do
+ if i > 0 then
+ context(", ")
+ end
+ context("%i: %s",i,t[i])
+ end
+\stopluacode .
+
+Now, if you really want to use these, keep in mind that the internals of
+\METAPOST\ are not trivial, especially because expression scanning can be
+complex. So you need to experiment a bit. In \CONTEXT\ all is (and will be)
+hidden below an abstraction layer so users are not bothered by all these
+look|-|ahead and push|-|back issues that originate in the way \METAPOST\ scans
+its input.
+
+\stopsection
+
+\startsection[title=Injectors]
+
+It is important to know that piping code into the library is pretty fast and
+efficient. Most processing time relates to memory management, calculations and
+generation of output can not be neglected either. Out of curiousity I added some
+functions that directly push data into the library but the gain is not that
+large. \footnote {The main motivation was checking of huge paths could be
+optimized. The other data structures were then added for completeness.}
+
+\starttabulate[|l|l|]
+\DB scanner \BC argument \NC \NR
+\TB
+\NC \type{inject_numeric} \NC instance, number \NC \NR
+\NC \type{inject_integer} \NC instance, number \NC \NR
+\NC \type{inject_boolean} \NC instance, boolean \NC \NR
+\NC \type{inject_string} \NC instance, string \NC \NR
+\NC \type{inject_pair} \NC instance, (table with) two numbers \NC \NR
+\NC \type{inject_color} \NC instance, (table with) three numbers \NC \NR
+\NC \type{inject_cmykcolor} \NC instance, (table with) four numbers \NC \NR
+\NC \type{inject_transform} \NC instance, (table with) six numbers \NC \NR
+\NC \type{inject_path} \NC instance, table with hashes or arrays, cycle, variant \NC \NR
+\LL
+\stoptabulate
+
+The path injector takes a table with subtables that are either hashed (like the
+path solver) or arrays with two, four or six entries. When the third argument has
+the value \type {true} the path is closed. When the fourth argument is \type
+{true} the path is constructed out of straight lines (as with \type {--}) by
+setting the \type {curl} values to~1 automatically. \footnote {This is all
+experimental so future versions might provide more control.}
+
+\stopsection
+
\stopchapter
\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex
index 6448f2b01c1..ac283bafd76 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex
@@ -16,14 +16,15 @@
The first version of \LUATEX, made by Hartmut after we discussed the possibility
of an extension language, only had a few extra primitives and it was largely the
same as \PDFTEX. It was presented to the public in 2005. As part of the Oriental
-\TEX\ project, Taco merged substantial parts of \ALEPH\ into the code and some
-more primitives were added. Then we started more fundamental experiments. After
-many years, when the engine had become more stable, the decision was made to
-clean up the rather hybrid nature of the program. This means that some primitives
-were promoted to core primitives, often with a different name, and that others
-were removed. This also made it possible to start cleaning up the code base. In
-\in {chapter} [enhancements] we discuss some new primitives, here we will cover
-most of the adapted ones.
+\TEX\ project, Taco merged some parts of \ALEPH\ into the code and some more
+primitives were added. Then we started more fundamental experiments. After many
+years, when the engine had become more stable, the decision was made to clean up
+the rather hybrid nature of the program. This means that some primitives were
+promoted to core primitives, often with a different name, and that others were
+removed. This also made it possible to start cleaning up the code base, which
+showed decades of stepwise additions to original \TEX. In \in {chapter}
+[enhancements] we discuss some new primitives, here we will cover most of the
+adapted ones.
During more than a decade stepwise new functionality was added and after 10 years
the more of less stable version 1.0 was presented. But we continued and after
@@ -38,9 +39,18 @@ not|-|so|-|expected changes. These are sometimes a side|-|effect of a new
(conflicting) feature, or, more often than not, a change necessary to clean up
the internal interfaces. These will also be mentioned.
+Again we stress that {\em this is not a \TEX\ manual, nor a tutorial}. If you are
+unfamiliar with \TEX\ first play a little with a macro package, take a look at
+the \TEX\ book, make yourself familiar with the concepts and macro language. That
+will likely take days and not hours. Also, many of the new concepts introduced in
+\LUATEX\ and \LUAMETATEX\ are explained in documents that come with the \CONTEXT\
+distribution, articles and presentations. It doesn't pay of to repeat that here,
+especially not in a time when users often search instead of read from cover to
+cover.
+
\stopsubsection
-\startsubsection[title=Changes from \TEX\ 3.1415926]
+\startsubsection[title=Changes from \TEX\ 3.1415926...]
\topicindex {\TEX}
@@ -50,19 +60,21 @@ most still comes from original Knuthian \TEX. But we divert a bit.
\startitemize
\startitem
- The current code base is written in \CCODE, not \PASCAL. The original \CWEB\
+ The current code base is written in \CCODE, not \PASCAL. The original \WEB\
documentation is kept when possible and not wrapped in tagged comments. As a
consequence instead of one large file plus change files, we now have multiple
- files organized in categories like \type {tex}, \type {luaf}, \type
+ files organized in categories like \type {tex}, \type {lua}, \type
{languages}, \type {fonts}, \type {libraries}, etc. There are some artifacts
of the conversion to \CCODE, but these got (and get) removed stepwise. The
documentation, which actually comes from the mix of engines (via so called
- change files), is kept as much as possible. Of course we want to stay as
- close as possible to the original so that the documentation of the
+ change files), is a mix of what authors of the engines wove into the source,
+ and most is of course from Don Knuths original. In \LUAMETATEX\ we try to
+ stay as close as possible to the original so that the documentation of the
fundamentals behind \TEX\ by Don Knuth still applies. However, because we use
\CCODE, some documentation is a bit off. Also, most global variables are now
- collected in structures, but the original names were kept. There are lots of
- so called macros too.
+ collected in structures, but the original names and level of abstraction were
+ mostly kept. On the other hand, opening up had its impact on the code, so
+ that makes some documentation a bit off too. Adapting that all will take time.
\stopitem
\startitem
@@ -74,14 +86,21 @@ most still comes from original Knuthian \TEX. But we divert a bit.
wherever we like. There are various options to control discretionary
injection and related penalties are now integrated in these nodes. Language
information is now bound to glyphs. The number of languages in \LUAMETATEX\
- is smaller than in \LUATEX.
+ is smaller than in \LUATEX. Control over discretionaries is more granular and
+ now managed by less variables.
\stopitem
\startitem
There is no pool file, all strings are embedded during compilation. This also
removed some memory constraints. We kept token and node memory management
because it is convenient and efficient but parts were reimplemented in order
- to remove some constraints. Token memory management is largely the same.
+ to remove some constraints. Token memory management is largely the same. All
+ the other large memory structures, like those related to nesting, the save
+ stack, input levels, the hash table and table of equivalents, etc. now all
+ start out small and are enlarged when needed, where maxima are controlled in
+ the usual way. In principle the initial memory footprint is smaller while at
+ the same time we can go real large. Because we have wide memory words some
+ data (arrays) used for housekeeping could be reorganized a bit.
\stopitem
\startitem
@@ -126,11 +145,9 @@ most still comes from original Knuthian \TEX. But we divert a bit.
\stopitem
\startitem
- When detailed logging is enabled more detail is output with respect to what
- nodes are involved. This is a side effect of the core nodes having more
- detailed subtype information. The benefit of more detail wins from any wish
- to be byte compatible in the logging. One can always write additional logging
- in \LUA.
+ The math style related primitives can use numbers as well as symbolic names.
+ There is some more (control over) math anyway, which is a side effect of
+ supporting \OPENTYPE\ math.
\stopitem
\stopitemize
@@ -172,10 +189,29 @@ features, but with a few small adaptations.
\stopitem
\startitem
+ Because we have more nodes, conditionals, etc.\ the \ETEX\ status related
+ variables are adapted to \LUAMETATEX: we use different \quote {constants},
+ but that should be no problem because any sane macro package uses
+ abstraction.
+\stopitem
+
+\startitem
+ The \type {\scantokens} primitive is now using the same mechanism as \LUA\
+ print|-|to|-|\TEX\ uses, which simplifies the code. There is a little
+ performance hit but it will not be noticed in \CONTEXT, because we never use
+ this primitive.
+\stopitem
+
+\startitem
Because we don't use change files on top of original \TEX, the integration of
\ETEX\ functionality is bit more natural, code wise.
\stopitem
+\startitem
+ The \prm {readline} primitive has to be implemented in \LUA. This is a side
+ effect of delegating all file \IO.
+\stopitem
+
\stopitemize
\stopsubsection
@@ -230,12 +266,7 @@ don't expect \LUAMETATEX\ to be compatible.
\startitem
When \lpr {adjustspacing} has value~2, hz optimization will be applied to
glyphs and kerns. When the value is~3, only glyphs will be treated. A value
- smaller than~2 disables this feature. With value of~1, font expansion is
- applied after \TEX's normal paragraph breaking routines have broken the
- paragraph into lines. In this case, line breaks are identical to standard
- \TEX\ behavior (as with \PDFTEX). But \unknown\ this is a left|-|over from
- the early days of \PDFTEX\ when this feature was part of a research topic. At
- some point level~1 might be dropped from \LUAMETATEX.
+ smaller than~2 disables this feature.
\stopitem
\startitem
@@ -292,7 +323,8 @@ Here is a summary of inherited functionality:
\startitem
Glues {\it immediately after} direction change commands are not legal
- breakpoints. There is a bit more sanity testing for the direction state.
+ breakpoints. There is a bit more sanity testing for the direction state. This
+ can be configured.
\stopitem
\startitem
@@ -303,7 +335,7 @@ Here is a summary of inherited functionality:
\startitem
There are no direction related primitives for page and body directions. The
paragraph, text and math directions are specified using primitives that
- take a number.
+ take a number. The three letter codes are dropped.
\stopitem
\stopitemize
@@ -334,7 +366,10 @@ The single internal memory heap that traditional \TEX\ used for tokens and nodes
is split into two separate arrays. Each of these will grow dynamically when
needed. Internally a token or node is an index into these arrays. This permits
for an efficient implementation and is also responsible for the performance of
-the core. The original documentation in \TEX\ The Program mostly applies!
+the core. All other data structures are mostly the same but managed dynamically
+too. Because we operate in a 64 bit world, the parallel table of equivalents
+needed for managing levels, is gone. Anyhow, the original documentation in \TEX\
+The Program mostly applies!
\stopsubsection
@@ -352,10 +387,6 @@ assignments don't show up when using the \ETEX\ tracing routines \prm
{tracingassigns} and \prm {tracingrestores} but we don't see that as a real
limitation. It also saves a lot of clutter.
-A side|-|effect of the current implementation is that \prm {global} is now more
-expensive in terms of processing than non|-|global assignments but not many users
-will notice that.
-
The glyph ids within a font are also managed by means of a sparse array as glyph
ids can go up to index $2^{21}-1$ but these are never accessed directly so again
users will not notice this.
@@ -367,26 +398,33 @@ users will not notice this.
\topicindex {csnames}
Single|-|character commands are no longer treated specially in the internals,
-they are stored in the hash just like the multiletter csnames.
+they are stored in the hash just like the multiletter control sequences. This is
+a side effect of going \UNICODE\ and \UTF. Where using 256 slots in an array add
+no burden supporting the whole \UNICODE\ range is a waste of space. Therefore,
+also active characters are internally implemented as a special type of
+multi|-|letter control sequences that uses a prefix that is otherwise impossible
+to obtain.
The code that displays control sequences explicitly checks if the length is one
when it has to decide whether or not to add a trailing space.
-Active characters are internally implemented as a special type of multi|-|letter
-control sequences that uses a prefix that is otherwise impossible to obtain.
-
\stopsubsection
\startsubsection[title=Binary file reading]
\topicindex {files+binary}
-All of the internal code is changed in such a way that if one of the \type
-{read_xxx_file} callbacks is not set, then the file is read by a \CCODE\ function
-using basically the same convention as the callback: a single read into a buffer
-big enough to hold the entire file contents. While this uses more memory than the
-previous code (that mostly used \type {getc} calls), it can be quite a bit faster
-(depending on your \IO\ subsystem). So far we never had issues with this approach.
+All input now goes via \LUA: files loaded with \type {\input} as well as files
+that are opened with \type {\openin}. Actually the later has to be implemented
+in terms of macros and \LUA\ calls. This also means that compared to \LUATEX\
+the internal handling of input has been changed but users won't notice that.
+
+Setting a callback is expected now. Although reading input natively using \type
+{getc} calls is more efficient, we now fetch lines from \LUA, put them in a
+buffer and then pick successive bytes (keep in mind that we read \UTF) from that.
+The performance is quite ok, also because \LUA\ is fast, todays operating systems
+cache, and storage media have become very fast. Also, \TEX\ is spending more time
+messing around with what it has input than actually reading input.
\stopsubsection
@@ -416,12 +454,17 @@ more details anyway.
\startsubsection[title=Logging]
+When detailed logging is enabled more detail is output with respect to what nodes
+are involved. This is a side effect of the core nodes having more detailed
+subtype information. The benefit of more detail wins from any wish to be byte
+compatible in the logging. One can always write additional logging in \LUA.
+
The information that goes into the log file can be different from \LUATEX, and
might even differ a bit more in the future. The main reason is that inside the
engine we have more granularity, which for instance means that we output subtype
-related information when nodes are printed. Of course we could have offered a
-compatibility mode but it serves no purpose. Over time there have been many
-subtle changes to control logs in the \TEX\ ecosystems so another one is
+and attribute related information when nodes are printed. Of course we could have
+offered a compatibility mode but it serves no purpose. Over time there have been
+many subtle changes to control logs in the \TEX\ ecosystems so another one is
bearable.
In a similar fashion, there is a bit different behaviour when \TEX\ expects
@@ -429,7 +472,38 @@ input, which in turn is a side effect of removing the interception of \type {*}
and \type {&} which made for cleaner code (quite a bit had accumulated as side
effect of continuous adaptations in the \TEX\ ecosystems). There was already code
that was never executed, simply as side effect of the way \LUATEX\ initializes
-itself (one needs to enable classes of primitives for instance).
+itself (one needs to enable classes of primitives for instance). Keep in mind
+that over time system dependencies have been handles with \TEX\ change files, the
+\WEBC\ infrastructure, \KPSE\ features, compilation variables and flags, etc. In
+\LUAMETATEX\ we try to minimize all that.
+
+\stopsubsection
+
+\startsubsection[title=Parsing]
+
+Token parsers have been upgraded for the sake of \LUA, \type {\csname} handling
+has been extended, macro definitions can be more flexible so there code was
+adapted, more conditionals also brought some changes. But we build upon the
+(reorganized) \TEX\ foundation so the basics can definitely be recognized.
+
+Because of interfacing in \LUA\ the internal token and node organization has
+been normalized (read: we cannot cheat because all is kind of visible). On
+the one hand this can come with a performance penalty but that is more than
+compensated by extensions, optimized parsers and such. Still the fact that we
+are \UTF\ based (32 bit) makes the machinery slower than the 8~bit original.
+The reworked \LUAMETATEX\ engine is substantially faster than the \LUATEX\
+predecessor.
+
+The handling of conditionals has been adapted so that we can have flatter
+branches (\type {\orelse} cum suis). This again has some consequences for
+parsing. Because parsing alignments is rather interwoven in general parsing and
+expansion the handling of related primitives has been slightly adapted (also for
+the sake of \LUA\ interfacing) and dealing with \type {\noalign} situations is a
+bit more convenient.
+
+This are just a few of the adaptations and most of this happened stepwise with
+testing in the \CONTEXT\ code base. It will be clear that \LUAMETATEX\ is a quite
+different extension to the original. You're warned.
\stopsubsection
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex
index 50356da4211..6773d346d78 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex
@@ -174,12 +174,12 @@ discussed here (yet).
\stopsubsection
-\startsubsection[title={\nod {ins} nodes}]
+\startsubsection[title={\nod {insert} nodes}]
\topicindex {nodes+insertions}
\topicindex {insertions}
-This node relates to the \prm {insert} primitive and support the fields: \showfields{ins}.
+This node relates to the \prm {insert} primitive and support the fields: \showfields{insert}.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
@@ -455,7 +455,7 @@ fields: \showfields {glyph}.
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{char} \NC number \NC the character index in the font \NC \NR
\NC \type{font} \NC number \NC the font identifier \NC \NR
-\NC \type{lang} \NC number \NC the language identifier \NC \NR
+\NC \type{language} \NC number \NC the language identifier \NC \NR
\NC \type{left} \NC number \NC the frozen \type {\lefthyphenmnin} value \NC \NR
\NC \type{right} \NC number \NC the frozen \type {\righthyphenmnin} value \NC \NR
\NC \type{uchyph} \NC boolean \NC the frozen \prm {uchyph} value \NC \NR
@@ -521,19 +521,19 @@ nodes: \showfields {boundary} are the only fields.
\TB
\NC \type{subtype} \NC number \NC \showsubtypes{boundary} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
-\NC \type{value} \NC number \NC values 0--255 are reserved \NC \NR
+\NC \type{data} \NC number \NC values 0--255 are reserved \NC \NR
\LL
\stoptabulate
\stopsubsection
-\startsubsection[title={\nod {local_par} nodes}]
+\startsubsection[title={\nod {par} nodes}]
\topicindex {nodes+paragraphs}
\topicindex {paragraphs}
This node is inserted at the start of a paragraph. You should not mess
-too much with this one. Valid fields are: \showfields {local_par}.
+too much with this one. Valid fields are: \showfields {par}.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
@@ -613,7 +613,7 @@ into a single node type with separate subtypes for differentiation: \showfields
Many object fields in math mode are either simple characters in a specific family
or math lists or node lists: \type {math_char}, \type {math_text_char}, {sub_box}
-and \type {sub_mlist} and \type {delim}. These are endpoints and therefore the
+and \type {sub_mlist} and \type {delimiter}. These are endpoints and therefore the
\type {next} and \type {prev} fields of these these subnodes are unused.
Some of the more elaborate noads have an option field. The values in this bitset
@@ -681,11 +681,11 @@ its internal link structure is correct, otherwise an error is triggered.
\stopsubsubsection
-\startsubsubsection[title={\nod {delim} subnodes}]
+\startsubsubsection[title={\nod {delimiter} subnodes}]
There is a fifth subnode type that is used exclusively for delimiter fields. As
before, the \type {next} and \type {prev} fields are unused, but we do have:
-\showfields {delim}.
+\showfields {delimiter}.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
@@ -854,14 +854,14 @@ renderer and might get adapted in the process.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
\TB
-\NC \type{subtype} \NC number \NC \showsubtypes{fence} \NC \NR
-\NC \type{attr} \NC node \NC list of attributes \NC \NR
-\NC \type{delim} \NC delimiter node \NC delimiter specification \NC \NR
-\NC \type{italic} \NC number \NC italic correction \NC \NR
-\NC \type{height} \NC number \NC required height \NC \NR
-\NC \type{depth} \NC number \NC required depth \NC \NR
-\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
-\NC \type{class} \NC number \NC spacing related class \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{fence} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{delimiter} \NC delimiter node \NC delimiter specification \NC \NR
+\NC \type{italic} \NC number \NC italic correction \NC \NR
+\NC \type{height} \NC number \NC required height \NC \NR
+\NC \type{depth} \NC number \NC required depth \NC \NR
+\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
+\NC \type{class} \NC number \NC spacing related class \NC \NR
\LL
\stoptabulate
@@ -1182,12 +1182,9 @@ tail node.
<node> tail = node.slide(<node> n)
\stopfunctioncall
-After some callbacks automatic sliding takes place. This feature can be turned
-off with \type {node.fix_node_lists(false)} but you better make sure then that
-you don't mess up lists. In most cases \TEX\ itself only uses \type {next}
-pointers but your other callbacks might expect proper \type {prev} pointers too.
-Future versions of \LUATEX\ can add more checking but this will not influence
-usage.
+In most cases \TEX\ itself only uses \type {next} pointers but your other
+callbacks might expect proper \type {prev} pointers too. So, when you run into
+issues or are in doubt, apply the slide function before you return the list.
\stopsubsubsection
@@ -1386,16 +1383,18 @@ The \type{traverse_char} iterator loops over the \nod {glyph} nodes in a list.
Only nodes with a subtype less than 256 are seen.
\startfunctioncall
-<node> n, font, char = node.traverse_char(<node> n)
+<direct> n, font, char = node.direct.traverse_char(<direct> n)
\stopfunctioncall
The \type{traverse_glyph} iterator loops over a list and returns the list and
filters all glyphs:
\startfunctioncall
-<node> n, font, char = node.traverse_glyph(<node> n)
+<direct> n, font, char = node.traverse_glyph(<direct> n)
\stopfunctioncall
+These functions are only available for direct nodes.
+
\stopsubsubsection
\startsubsubsection[title={\type {traverse_list}}]
@@ -1405,15 +1404,100 @@ filters all glyphs:
This iterator loops over the \nod {hlist} and \nod {vlist} nodes in a list.
\startfunctioncall
-<node> n, id, subtype, list = node.traverse_list(<node> n)
+<direct> n, id, subtype, list = node.traverse_list(<direct> n)
+\stopfunctioncall
+
+The four return values can save some time compared to fetching these fields but
+in practice you seldom need them all. This function is only available for direct
+nodes.
+
+\stopsubsubsection
+
+\startsubsubsection[title={\type {traverse_content}}]
+
+\libindex {traverse_content}
+
+This iterator loops over nodes that have content: \nod {hlist}, \nod {vlist}, \nod {glue}
+with leaders, \nod {glyphs}, \nod {disc} and \nod {rules} nodes.
+
+\startfunctioncall
+<direct> n, id, subtype[, list|leader] = node.traverse_list(<direct> n)
\stopfunctioncall
The four return values can save some time compared to fetching these fields but
-in practice you seldom need them all. So consider it a (side effect of
-experimental) convenience.
+in practice you seldom need them all. This function is only available for direct
+nodes.
\stopsubsubsection
+\startsubsubsection[title={Reverse traversing}]
+
+The traversers also support backward traversal. An optional extra boolean triggers
+this. Yet another optional boolean will automatically start at the end of the
+given list.
+
+\starttyping
+\setbox0\hbox{1 2 3 4 5}
+
+local l = tex.box[0].list
+for n in node.traverse(l) do
+ print("1>",n)
+end
+for n in node.traverse(l,true) do
+ print("2>",n)
+end
+for n in node.traverse(l,true,true) do
+ print("3>",n)
+end
+for n in node.traverse_id(nodes.nodecodes.glyph,l) do
+ print("4>",n)
+end
+for n in node.traverse_id(nodes.nodecodes.glyph,l,true) do
+ print("5>",n)
+end
+for n in node.traverse_id(nodes.nodecodes.glyph,l,true,true) do
+ print("6>",n)
+end
+\stoptyping
+
+This produces something similar to this (the glyph subtype indicates that it has
+been processed by the font handlers):
+
+\starttyping
+1> <node : nil <= 1112 => 590 : glyph 32768>
+1> <node : 1112 <= 590 => 1120 : glue spaceskip>
+1> <node : 590 <= 1120 => 849 : glyph 32768>
+1> <node : 1120 <= 849 => 1128 : glue spaceskip>
+1> <node : 849 <= 1128 => 880 : glyph 32768>
+1> <node : 1128 <= 880 => 1136 : glue spaceskip>
+1> <node : 880 <= 1136 => 1020 : glyph 32768>
+1> <node : 1136 <= 1020 => 1144 : glue spaceskip>
+1> <node : 1020 <= 1144 => nil : glyph 32768>
+2> <node : nil <= 1112 => 590 : glyph 32768>
+3> <node : 1020 <= 1144 => nil : glyph 32768>
+3> <node : 1136 <= 1020 => 1144 : glue spaceskip>
+3> <node : 880 <= 1136 => 1020 : glyph 32768>
+3> <node : 1128 <= 880 => 1136 : glue spaceskip>
+3> <node : 849 <= 1128 => 880 : glyph 32768>
+3> <node : 1120 <= 849 => 1128 : glue spaceskip>
+3> <node : 590 <= 1120 => 849 : glyph 32768>
+3> <node : 1112 <= 590 => 1120 : glue spaceskip>
+3> <node : nil <= 1112 => 590 : glyph 32768>
+4> <node : nil <= 1112 => 590 : glyph 32768>
+4> <node : 590 <= 1120 => 849 : glyph 32768>
+4> <node : 849 <= 1128 => 880 : glyph 32768>
+4> <node : 880 <= 1136 => 1020 : glyph 32768>
+4> <node : 1020 <= 1144 => nil : glyph 32768>
+5> <node : nil <= 1112 => 590 : glyph 32768>
+6> <node : 1020 <= 1144 => nil : glyph 32768>
+6> <node : 880 <= 1136 => 1020 : glyph 32768>
+6> <node : 849 <= 1128 => 880 : glyph 32768>
+6> <node : 590 <= 1120 => 849 : glyph 32768>
+6> <node : nil <= 1112 => 590 : glyph 32768>
+\stoptyping
+
+\stopsubsection
+
\startsubsubsection[title={\type {find_node}}]
\libindex {find_node}
@@ -1436,8 +1520,8 @@ This helper returns the location of the first match at or after node \type {n}:
\libindex {setglue}
-You can set the properties of a glue in one go. If you pass no values, the glue
-will become a zero glue.
+You can set the five properties of a glue in one go. If a non|-|numeric value is
+passed the property becomes zero.
\startfunctioncall
node.setglue(<node> n)
@@ -2095,6 +2179,16 @@ consistency. You can of course always define additional accessors using \type
{getfield} and \type {setfield} with little overhead. When the second argument of
\type {setattributelist} is \type {true} the current attribute list is assumed.
+The \type {reverse} function reverses a given list. The \type {exchange} function
+swaps two nodes; it takes upto three arguments: a head node, and one or two to be
+swapped nodes. When there is no third argument, it will assume that the node
+following node is to be used. So we have:
+
+\starttyping
+head = node.direct.reverse(head)
+head = node.direct.exchange(head,first,[second])
+\stoptyping
+
In \CONTEXT\ some of the not performance|-|critical userdata variants are
emulated in \LUA\ and not in the engine, so we retain downward compatibility.
@@ -2112,22 +2206,23 @@ emulated in \LUA\ and not in the engine, so we retain downward compatibility.
\TB
\supported {check_discretionaries} \nop \yes \yes
\supported {check_discretionary} \nop \yes \yes
-\supported {copy} \yes \yes \relax
\supported {copy_list} \yes \yes \relax
%supported {copy_only} \nop \yes \relax
+\supported {copy} \yes \yes \relax
\supported {count} \nop \yes \yes
-\supported {current_attr} \yes \yes \relax
+\supported {current_attributes} \yes \yes \relax
\supported {dimensions} \nop \yes \yes
\supported {effective_glue} \nop \yes \yes
\supported {end_of_math} \nop \yes \yes
+\supported {find_attribute_range} \nop \yes \relax
\supported {find_attribute} \nop \yes \yes
-%supported {find_attribute_range} \nop \yes \relax
-%supported {find_node} \nop \yes \relax
+\supported {find_node} \nop \yes \relax
\supported {first_glyph} \nop \yes \yes
\supported {flatten_discretionaries} \nop \yes \yes
\supported {flush_list} \yes \yes \relax
\supported {flush_node} \yes \yes \relax
\supported {free} \yes \yes \relax
+\supported {get_attributes} \nop \yes \relax
\supported {get_attribute} \yes \yes \relax
\supported {get_properties_table} \yes \yes \relax
\supported {get_synctex_fields} \nop \yes \relax
@@ -2135,7 +2230,6 @@ emulated in \LUA\ and not in the engine, so we retain downward compatibility.
\supported {getboth} \nop \yes \relax
\supported {getbox} \nop \yes \relax
\supported {getchar} \nop \yes \relax
-\supported {getstate} \nop \yes \relax
\supported {getdata} \nop \yes \relax
\supported {getdepth} \nop \yes \relax
\supported {getdirection} \nop \yes \relax
@@ -2145,42 +2239,65 @@ emulated in \LUA\ and not in the engine, so we retain downward compatibility.
\supported {getfield} \yes \yes \relax
\supported {getfont} \nop \yes \relax
\supported {getglue} \nop \yes \yes
-%supported {getglyphdata} \nop \yes \relax % experiment
+\supported {getglyphdata} \nop \yes \relax % old experiment
+\supported {getglyphdimensions} \nop \yes \yes
+\supported {getglyphscript} \nop \yes \relax % new experiment
+\supported {getglyphstate} \nop \yes \relax % new experiment
\supported {getheight} \nop \yes \relax
\supported {getid} \nop \yes \relax
+\supported {getindex} \nop \yes \relax
+\supported {getkerndimension} \nop \yes \yes
\supported {getkern} \nop \yes \relax
-\supported {getlang} \nop \yes \relax
+\supported {getlanguage} \nop \yes \relax
\supported {getleader} \nop \yes \relax
\supported {getlist} \nop \yes \relax
\supported {getnext} \nop \yes \relax
\supported {getnormalizedline} \nop \yes \relax
\supported {getnucleus} \nop \yes \relax
\supported {getoffsets} \nop \yes \relax
+\supported {getoptions} \nop \yes \relax
\supported {getorientation} \nop \yes \relax
+\supported {getparstate} \nop \yes \relax
\supported {getpenalty} \nop \yes \relax
\supported {getpost} \nop \yes \relax
-\supported {getpre} \nop \yes \relax
\supported {getprev} \nop \yes \relax
+\supported {getpre} \nop \yes \relax
\supported {getproperty} \yes \yes \relax
\supported {getreplace} \nop \yes \relax
+\supported {getscales} \nop \yes \relax
+\supported {getscript} \nop \yes \relax
\supported {getshift} \nop \yes \relax
-\supported {getsub} \nop \yes \relax
+\supported {getstate} \nop \yes \relax
+\supported {getsubpre} \nop \yes \relax
\supported {getsubtype} \nop \yes \relax
+\supported {getsub} \nop \yes \relax
+\supported {getsuppre} \nop \yes \relax
\supported {getsup} \nop \yes \relax
+\supported {gettotal} \yes \yes \relax
+%supported {getwhatever} \nop \yes \relax % experiment for myself
\supported {getwhd} \nop \yes \relax
\supported {getwidth} \nop \yes \relax
+\supported {getxscale} \nop \yes \relax
+\supported {getxyscale} \nop \yes \relax
+\supported {getyscale} \nop \yes \relax
\supported {has_attribute} \yes \yes \relax
\supported {has_dimensions} \nop \yes \relax
\supported {has_field} \yes \yes \relax
+\supported {has_glyph_option} \nop \yes \yes
\supported {has_glyph} \nop \yes \yes
\supported {hpack} \nop \yes \yes
-%supported {ignore_math_skip} \nop \yes \relax
+\supported {hyphenating} \nop \yes \yes
+\supported {ignore_math_skip} \nop \yes \relax
\supported {insert_after} \yes \yes \relax
\supported {insert_before} \yes \yes \relax
\supported {is_char} \nop \yes \relax
\supported {is_direct} \nop \yes \relax
\supported {is_glyph} \nop \yes \relax
+\supported {is_next_char} \nop \yes \relax
+\supported {is_next_glyph} \nop \yes \relax
\supported {is_node} \yes \yes \relax
+\supported {is_prev_char} \nop \yes \relax
+\supported {is_prev_glyph} \nop \yes \relax
\supported {is_valid} \nop \yes \relax
\supported {is_zero_glue} \nop \yes \yes
\supported {kerning} \nop \yes \yes
@@ -2188,22 +2305,23 @@ emulated in \LUA\ and not in the engine, so we retain downward compatibility.
\supported {length} \nop \yes \yes
\supported {ligaturing} \nop \yes \yes
\supported {make_extensible} \nop \yes \yes
+\supported {migrate} \nop \yes \relax
\supported {mlist_to_hlist} \nop \yes \yes
\supported {naturalwidth} \nop \yes \yes
\supported {new} \yes \yes \relax
-\supported {prepend_prevdepth} \nop \yes \yes
+%supported {prepend_prevdepth} \nop \yes \yes
\supported {protect_glyphs} \nop \yes \yes
\supported {protect_glyph} \nop \yes \yes
\supported {protrusion_skippable} \nop \yes \yes
\supported {rangedimensions} \nop \yes \yes
\supported {remove} \yes \yes \relax
+\supported {set_attributes} \nop \yes \relax
\supported {set_attribute} \yes \yes \relax
\supported {set_synctex_fields} \nop \yes \relax
\supported {setattributelist} \nop \yes \relax
\supported {setboth} \nop \yes \relax
\supported {setbox} \nop \yes \relax
\supported {setchar} \nop \yes \relax
-\supported {setstate} \nop \yes \relax
\supported {setdata} \nop \yes \relax
\supported {setdepth} \nop \yes \relax
\supported {setdirection} \nop \yes \relax
@@ -2213,24 +2331,36 @@ emulated in \LUA\ and not in the engine, so we retain downward compatibility.
\supported {setfield} \yes \yes \relax
\supported {setfont} \nop \yes \relax
\supported {setglue} \yes \yes \relax
-%supported {setglyphdata} \nop \yes \relax % experiment
+\supported {setglyphdata} \nop \yes \relax % old experiment
+\supported {setglyphscript} \nop \yes \relax % new experiment
+\supported {setglyphstate} \nop \yes \relax % new experiment
\supported {setheight} \nop \yes \relax
+\supported {setindex} \nop \yes \relax
\supported {setkern} \nop \yes \relax
-\supported {setlang} \nop \yes \relax
+\supported {setlanguage} \nop \yes \relax
\supported {setleader} \nop \yes \relax
\supported {setlink} \nop \yes \relax
\supported {setlist} \nop \yes \relax
\supported {setnext} \nop \yes \relax
\supported {setnucleus} \nop \yes \relax
\supported {setoffsets} \nop \yes \relax
+\supported {setoptions} \nop \yes \relax
\supported {setorientation} \nop \yes \relax
\supported {setpenalty} \nop \yes \relax
+\supported {setpost} \nop \yes \relax
\supported {setprev} \nop \yes \relax
+\supported {setpre} \nop \yes \relax
\supported {setproperty} \yes \yes \relax
+\supported {setreplace} \nop \yes \relax
+\supported {setscales} \nop \yes \relax
+\supported {setscript} \nop \yes \relax
\supported {setshift} \nop \yes \relax
\supported {setsplit} \nop \yes \relax
-\supported {setsub} \nop \yes \relax
+\supported {setstate} \nop \yes \relax
+\supported {setsubpre} \nop \yes \relax
\supported {setsubtype} \nop \yes \relax
+\supported {setsub} \nop \yes \relax
+\supported {setsuppre} \nop \yes \relax
\supported {setsup} \nop \yes \relax
\supported {setwhd} \nop \yes \relax
\supported {setwidth} \nop \yes \relax
@@ -2241,17 +2371,22 @@ emulated in \LUA\ and not in the engine, so we retain downward compatibility.
\supported {todirect} \nop \yes \relax
\supported {tonode} \nop \yes \relax
\supported {tostring} \yes \nop \relax
-\supported {traverse} \yes \yes \relax
+\supported {total} \nop \yes \relax
+\supported {tovaliddirect} \nop \yes \relax
\supported {traverse_char} \yes \yes \relax
+\supported {traverse_content} \yes \yes \relax
\supported {traverse_glyph} \yes \yes \relax
\supported {traverse_id} \yes \yes \relax
\supported {traverse_list} \yes \yes \relax
+\supported {traverse} \yes \yes \relax
\supported {type} \yes \nop \relax
\supported {unprotect_glyphs} \nop \yes \yes
\supported {unprotect_glyph} \nop \yes \yes
+\supported {unset_attributes} \nop \yes \relax
\supported {unset_attribute} \yes \yes \relax
\supported {usedlist} \nop \yes \yes
\supported {uses_font} \nop \yes \yes
+\supported {vertical_break} \nop \yes \relax
\supported {vpack} \nop \yes \yes
\supported {write} \yes \yes \relax
\LL
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex
index 79653fdf8a2..3412d0820fd 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex
@@ -183,6 +183,16 @@ b = getboolean(<pdfe array|dictionary>,index|key)
n = getname (<pdfe array|dictionary>,index|key)
\stoptyping
+The \type {getstring} function has two extra variants:
+
+\starttyping
+s, h = getstring (<pdfe array|dictionary>,index|key,false)
+s = getstring (<pdfe array|dictionary>,index|key,true)
+\stoptyping
+
+The first call returns the original string plus a boolean indicating if the
+string is hex encoded. The second call returns the unencoded string.
+
\stopsubsection
\startsubsection[title={\type {get[dictionary|array|stream]}}]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-preamble.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-preamble.tex
index 8f1400c9f9c..5a2dae818b1 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-preamble.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-preamble.tex
@@ -10,12 +10,12 @@
\topicindex{boxes}
\topicindex{\LUA}
-This is a reference manual, not a tutorial. This means that we discuss changes
-relative to traditional \TEX\ and also present new functionality. As a
-consequence we will refer to concepts that we assume to be known or that might be
-explained later. Because the \LUATEX\ and \LUAMETATEX\ engines open up \TEX\
-there's suddenly quite some more to explain, especially about the way a (to be)
-typeset stream moves through the machinery. However, discussing all that in
+This is a reference manual and not a tutorial. This means that we discuss changes
+relative to traditional \TEX\ and also present new (or extended) functionality.
+As a consequence we will refer to concepts that we assume to be known or that
+might be explained later. Because the \LUATEX\ and \LUAMETATEX\ engines open up
+\TEX\ there's suddenly quite some more to explain, especially about the way a (to
+be) typeset stream moves through the machinery. However, discussing all that in
detail makes not much sense, because deep knowledge is only relevant for those
who write code not possible with regular \TEX\ and who are already familiar with
these internals (or willing to spend time on figuring it out).
@@ -47,19 +47,21 @@ If you still decide to read on, then it's good to know what nodes are, so we do
quick introduction here. If you input this text:
\starttyping
-Hi There
+Hi There ...
\stoptyping
eventually we will get a linked lists of nodes, which in \ASCII\ art looks like:
\starttyping
-H <=> i <=> [glue] <=> T <=> h <=> e <=> r <=> e
+H <=> i <=> [glue] <=> T <=> h <=> e <=> r <=> e ...
\stoptyping
-When we have a paragraph, we actually get something:
+When we have a paragraph, we actually get something like this, where a \type
+{par} node stores some metadata and is followed by a \type {hlist} flagged as
+indent box:
\starttyping
-[localpar] <=> H <=> i <=> [glue] <=> T <=> h <=> e <=> r <=> e <=> [glue]
+[par] <=> [hlist] <=> H <=> i <=> [glue] <=> T <=> h <=> e <=> r <=> e ...
\stoptyping
Each character becomes a so called glyph node, a record with properties like the
@@ -69,16 +71,27 @@ back to a previous node or next node, given that these exist. Sometimes
multiple characters are represented by one glyphs, so one can also get:
\starttyping
-[localpar] <=> H <=> i <=> [glue] <=> Th <=> e <=> r <=> e <=> [glue]
+[par] <=> [hlist] <=> H <=> i <=> [glue] <=> Th <=> e <=> r <=> e ...
\stoptyping
And maybe some characters get positioned relative to each other, so we might
see:
\starttyping
-[localpar] <=> H <=> [kern] <=> i <=> [glue] <=> Th <=> e <=> r <=> e <=> [glue]
+[par] <=> [hlist] <=> H <=> [kern] <=> i <=> [glue] <=> Th <=> e <=> r <=> e ...
\stoptyping
+Actually, the above representation is one view, because in \LUAMETATEX\ we can
+choose for this:
+
+\starttyping
+[par] <=> [glue] <=> H <=> [kern] <=> i <=> [glue] <=> Th <=> e <=> r <=> e ...
+\stoptyping
+
+where glue (currently fixed) is used instead of an empty hlist (think of a \type
+{\hbox}). Options like this are available because want a certain view on these
+lists from the \LUA\ end and the result being predicable is part of that.
+
It's also good to know beforehand that \TEX\ is basically centered around
creating paragraphs and pages. The par builder takes a list and breaks it into
lines. At some point horizontal blobs are wrapped into vertical ones. Lines are
@@ -96,6 +109,10 @@ means these hooks. The \TEX\ engine itself is pretty well optimized but when you
kick in much \LUA\ code, you will notices that performance drops. Don't blame and
bother the authors with performance issues. In \CONTEXT\ over 50\% of the time
can be spent in \LUA, but so far we didn't get many complaints about efficiency.
+Adding more callbacks makes no sense, also because at some point the performance
+hit gets too large. There are plenty ways to achieve one goals. For that reason:
+take remarks about \LUATEX, features, potential, performance etc.\ with a natural
+grain of salt.
Where plain \TEX\ is basically a basic framework for writing a specific style,
macro packages like \CONTEXT\ and \LATEX\ provide the user a whole lot of
@@ -108,7 +125,7 @@ mess around to much, the engine eventually might bark and quit. It can even
crash, because testing everywhere for what users can do wrong is no real option.
When you read about nodes in the following chapters it's good to keep in mind
-their commands that relate to then. Here are a few:
+what commands relate to them. Here are a few:
\starttabulate[|l|l|p|]
\DB command \BC node \BC explanation \NC \NR
@@ -127,6 +144,12 @@ their commands that relate to then. Here are a few:
\LL
\stoptabulate
+Whatever we feed into \TEX\ at some point becomes a token which is either
+interpreted directly or stored in a linked list. A token is just a number that
+encodes a specific command (operator) and some value (operand) that further
+specifies what that command is supposed to do. In addition to an interface to
+nodes, there is an interface to tokens, as later chapters will demonstrate.
+
Text (interspersed with macros) comes from an input medium. This can be a file,
token list, macro body cq.\ arguments, \ some internal quantity (like a number),
\LUA, etc. Macros get expanded. In the process \TEX\ can enter a group. Inside
@@ -137,23 +160,23 @@ all terms used in the next chapters. Don't worry, they loose their magic once yo
use \TEX\ a lot. You have access to most of the internals and when not, at least
it is possible to query some state we're in or level we're at.
-When we talk about packing it can mean two things. When \TEX\ has consumed some
-tokens that represent text the next can happen. When the text is put into a so
-called \type {\hbox} it (normally) first gets hyphenated, next ligatures are
-build, and finally kerns are added. Each of that stages can be overloaded using
-\LUA\ code. When these three stages are finished, the dimension of the content is
-calculated and the box gets its width, height and depth. What happens with the
-box depends on what macros do with it.
+When we talk about pack(ag)ing it can mean two things. When \TEX\ has consumed
+some tokens that represent text. When the text is put into a so called \type
+{\hbox} it (normally) first gets hyphenated (even in an horizontal list), next
+ligatures are build, and finally kerns are added. Each of these stages can be
+overloaded using \LUA\ code. When these three stages are finished, the dimension
+of the content is calculated and the box gets its width, height and depth. What
+happens with the box depends on what macros do with it.
The other thing that can happen is that the text starts a new paragraph. In that
-case some (directional) information is put in front, indentation is prepended and
-some skip appended at the end. Again the three stages are applied but this time,
-afterwards, the long line is broken into lines and the result is either added to
-the content of a box or to the main vertical list (the running text so to say).
-This is called par building. At some point \TEX\ decides that enough is enough
-and it will trigger the page builder. So, building is another concept we will
-encounter. Another example of a builder is the one that turns an intermediate
-math list into something typeset.
+case some information is stored in a leading \type {par} node. Then indentation
+is appended and the paragraph ends with some glue. Again the three stages are
+applied but this time, afterwards, the long line is broken into lines and the
+result is either added to the content of a box or to the main vertical list (the
+running text so to say). This is called par building. At some point \TEX\ decides
+that enough is enough and it will trigger the page builder. So, building is
+another concept we will encounter. Another example of a builder is the one that
+turns an intermediate math list into something typeset.
Wrapping something in a box is called packing. Adding something to a list is
described in terms of contributing. The more complicated processes are wrapped
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex
index 187bbd85acd..edbf7d32c19 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex
@@ -1,395 +1 @@
-% language=uk
-
-\environment luametatex-style
-
-\startcomponent luametatex-primitives
-
-\startchapter[reference=primitives,title={Primitives aka commands}]
-
-\startsection[title=Introduction]
-
-The starting point of \LUATEX\ is \PDFTEX, which itself contains regular \TEX\
-and \ETEX. Because directional support was needed we also took some code from
-\ALEPH\ (\OMEGA). In a later stage the backend specific commands were isolated in
-its own namespace which resulted in a cleaner code base where the backend code no
-longer was interwoven with the normal frontend primitives. We also promoted some
-generic constructs (like box resources and directions) to core functionality.
-
-Some of the \PDFTEX\ support primitives have been around from the start but when
-\LUA\ integration became better and when a token scanner library was added, not
-all of those made sense as primitives. In previous chapters we already mentioned
-what is gone from the core. Deep down some more has changed but not all is
-reflected at the primitive level. Because there is still a considerable amount of
-new primitives, a summary is given below.
-
-\stopsection
-
-\startsection[title=Languages]
-
-\starttabulate[|||p|]
-\NC \type {automatichyphenmode} \NC integer \NC \NC \NR
-\NC \type {automatichyphenpenalty} \NC integer \NC \NC \NR
-\NC \type {hyphenpenaltymode} \NC integer \NC \NC \NR
-\NC \type {compoundhyphenmode} \NC integer \NC \NC \NR
-\NC \type {exceptionpenalty} \NC integer \NC \NC \NR
-\NC \type {explicithyphenpenalty} \NC integer \NC \NC \NR
-\NC \type {hyphenationbounds} \NC integer \NC \NC \NR
-\NC \type {hjcode} \NC charactercode \NC \NC \NR
-\NC \type {hyphenationmin} \NC charactercode \NC \NC \NR
-\NC \type {postexhyphenchar} \NC charactercode \NC \NC \NR
-\NC \type {posthyphenchar} \NC charactercode \NC \NC \NR
-\NC \type {preexhyphenchar} \NC charactercode \NC \NC \NR
-\NC \type {prehyphenchar} \NC charactercode \NC \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=Fonts]
-
-\starttabulate[|||p|]
-\NC \type {tracingfonts} \NC integer \NC \NC \NR
-\NC \type {suppressfontnotfounderror} \NC integer \NC \NC \NR
-\NC \type {setfontid} \NC integer \NC \NC \NR
-\NC \type {fontid} \NC font \NC \NC \NR
-\NC \type {efcode} \NC font charactercode \NC \NC \NR
-\NC \type {lpcode} \NC font charactercode \NC \NC \NR
-\NC \type {rpcode} \NC font charactercode \NC \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=Math]
-
-\starttabulate[|||p|]
-\NC \type {matholdmode} \NC integer \NC \NC \NR
-\NC \type {mathstyle} \NC integer \NC \NC \NR
-\NC \type {matheqnogapstep} \NC integer \NC \NC \NR
-\NC \type {Uskewed} \NC \NC \NC \NR
-\NC \type {Uskewedwithdelims} \NC \NC \NC \NR
-\NC \type {Ustartdisplaymath} \NC \NC \NC \NR
-\NC \type {Ustartmath} \NC \NC \NC \NR
-\NC \type {Ustopdisplaymath} \NC \NC \NC \NR
-\NC \type {Ustopmath} \NC \NC \NC \NR
-\NC \type {crampeddisplaystyle} \NC \NC \NC \NR
-\NC \type {crampedtextstyle} \NC \NC \NC \NR
-\NC \type {crampedscriptstyle} \NC \NC \NC \NR
-\NC \type {crampedscriptscriptstyle} \NC \NC \NC \NR
-\NC \type {Umathchardef} \NC \NC \NC \NR
-\NC \type {Umathcharnumdef} \NC \NC \NC \NR
-\NC \type {mathdisplayskipmode} \NC integer \NC \NC \NR
-\NC \type {mathscriptsmode} \NC integer \NC \NC \NR
-\NC \type {mathnolimitsmode} \NC integer \NC \NC \NR
-\NC \type {mathitalicsmode} \NC integer \NC \NC \NR
-\NC \type {mathrulesmode} \NC integer \NC \NC \NR
-\NC \type {mathrulesfam} \NC integer \NC \NC \NR
-\NC \type {mathdelimitersmode} \NC integer \NC \NC \NR
-\NC \type {mathflattenmode} \NC integer \NC \NC \NR
-\NC \type {mathpenaltiesmode} \NC integer \NC \NC \NR
-\NC \type {mathrulethicknessmode} \NC integer \NC \NC \NR
-\NC \type {mathscriptboxmode} \NC integer \NC \NC \NR
-\NC \type {mathscriptcharmode} \NC integer \NC \NC \NR
-\NC \type {mathsurroundmode} \NC integer \NC \NC \NR
-\NC \type {nokerns} \NC integer \NC \NC \NR
-\NC \type {noligs} \NC integer \NC \NC \NR
-\NC \type {prebinoppenalty} \NC integer \NC \NC \NR
-\NC \type {predisplaygapfactor} \NC integer \NC \NC \NR
-\NC \type {prerelpenalty} \NC integer \NC \NC \NR
-\NC \type {Usuperscript} \NC command \NC \NC \NR
-\NC \type {Usubscript} \NC command \NC \NC \NR
-\NC \type {Unosuperscript} \NC command \NC \NC \NR
-\NC \type {Unosubscript} \NC command \NC \NC \NR
-\NC \type {Umathcode} \NC \NC \NC \NR
-\NC \type {Umathcodenum} \NC \NC \NC \NR
-\NC \type {Udelcode} \NC \NC \NC \NR
-\NC \type {Udelcodenum} \NC \NC \NC \NR
-\NC \type {Umathaxis} \NC family dimension \NC \NC \NR
-\NC \type {Umathbinbinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathbinclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathbininnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathbinopenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathbinopspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathbinordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathbinpunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathbinrelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathclosebinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathcloseclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathcloseinnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathcloseopenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathcloseopspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathcloseordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathclosepunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathcloserelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathconnectoroverlapmin} \NC family dimension \NC \NC \NR
-\NC \type {Umathfractiondelsize} \NC family dimension \NC \NC \NR
-\NC \type {Umathfractiondenomdown} \NC family dimension \NC \NC \NR
-\NC \type {Umathfractiondenomvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathfractionnumup} \NC family dimension \NC \NC \NR
-\NC \type {Umathfractionnumvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathfractionrule} \NC family dimension \NC \NC \NR
-\NC \type {Umathinnerbinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathinnerclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathinnerinnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathinneropenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathinneropspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathinnerordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathinnerpunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathinnerrelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathlimitabovebgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathlimitabovekern} \NC family dimension \NC \NC \NR
-\NC \type {Umathlimitabovevgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathlimitbelowbgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathlimitbelowkern} \NC family dimension \NC \NC \NR
-\NC \type {Umathlimitbelowvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathnolimitsubfactor} \NC family dimension \NC \NC \NR
-\NC \type {Umathnolimitsupfactor} \NC family dimension \NC \NC \NR
-\NC \type {Umathopbinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopenbinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopenclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopeninnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopenopenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopenopspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopenordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopenpunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopenrelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathoperatorsize} \NC family dimension \NC \NC \NR
-\NC \type {Umathopinnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopopenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopopspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathopordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathoppunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathoprelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordbinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordinnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordopenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordopspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordpunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathordrelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathoverbarkern} \NC family dimension \NC \NC \NR
-\NC \type {Umathoverbarrule} \NC family dimension \NC \NC \NR
-\NC \type {Umathoverbarvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathoverdelimiterbgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathoverdelimitervgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctbinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctinnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctopenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctopspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctpunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathpunctrelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathquad} \NC family dimension \NC \NC \NR
-\NC \type {Umathradicaldegreeafter} \NC family dimension \NC \NC \NR
-\NC \type {Umathradicaldegreebefore} \NC family dimension \NC \NC \NR
-\NC \type {Umathradicaldegreeraise} \NC family dimension \NC \NC \NR
-\NC \type {Umathradicalkern} \NC family dimension \NC \NC \NR
-\NC \type {Umathradicalrule} \NC family dimension \NC \NC \NR
-\NC \type {Umathradicalvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelbinspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelclosespacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelinnerspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelopenspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelopspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelordspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelpunctspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathrelrelspacing} \NC family dimension \NC \NC \NR
-\NC \type {Umathskewedfractionhgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathskewedfractionvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathspaceafterscript} \NC family dimension \NC \NC \NR
-\NC \type {Umathstackdenomdown} \NC family dimension \NC \NC \NR
-\NC \type {Umathstacknumup} \NC family dimension \NC \NC \NR
-\NC \type {Umathstackvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathsubshiftdown} \NC family dimension \NC \NC \NR
-\NC \type {Umathsubshiftdrop} \NC family dimension \NC \NC \NR
-\NC \type {Umathsubsupshiftdown} \NC family dimension \NC \NC \NR
-\NC \type {Umathsubsupvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathsubtopmax} \NC family dimension \NC \NC \NR
-\NC \type {Umathsupbottommin} \NC family dimension \NC \NC \NR
-\NC \type {Umathsupshiftdrop} \NC family dimension \NC \NC \NR
-\NC \type {Umathsupshiftup} \NC family dimension \NC \NC \NR
-\NC \type {Umathsupsubbottommax} \NC family dimension \NC \NC \NR
-\NC \type {Umathunderbarkern} \NC family dimension \NC \NC \NR
-\NC \type {Umathunderbarrule} \NC family dimension \NC \NC \NR
-\NC \type {Umathunderbarvgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathunderdelimiterbgap} \NC family dimension \NC \NC \NR
-\NC \type {Umathunderdelimitervgap} \NC family dimension \NC \NC \NR
-\NC \type {Udelimiter} \NC \NC \NC \NR
-\NC \type {Umathaccent} \NC \NC \NC \NR
-\NC \type {Umathchar} \NC \NC \NC \NR
-\NC \type {Umathcharnum} \NC \NC \NC \NR
-\NC \type {Ustack} \NC \NC \NC \NR
-\NC \type {Uradical} \NC \NC \NC \NR
-\NC \type {Uroot} \NC \NC \NC \NR
-\NC \type {Uunderdelimiter} \NC \NC \NC \NR
-\NC \type {Uoverdelimiter} \NC \NC \NC \NR
-\NC \type {Udelimiterunder} \NC \NC \NC \NR
-\NC \type {Udelimiterover} \NC \NC \NC \NR
-\NC \type {Uhextensible} \NC \NC \NC \NR
-\NC \type {Uchar} \NC \NC \NC \NR
-\NC \type {Umathcharclass} \NC \NC \NC \NR
-\NC \type {Umathcharfam} \NC \NC \NC \NR
-\NC \type {Umathcharslot} \NC \NC \NC \NR
-\NC \type {Uleft} \NC \NC \NC \NR
-\NC \type {Umiddle} \NC \NC \NC \NR
-\NC \type {Uright} \NC \NC \NC \NR
-\NC \type {Uvextensible} \NC \NC \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=Boxes and directions]
-
-\starttabulate[|||p|]
-\NC \type {pardirection} \NC direction \NC \NC \NR
-\NC \type {textdirection} \NC direction \NC \NC \NR
-\NC \type {mathdirection} \NC direction \NC \NC \NR
-\NC \type {linedirection} \NC direction \NC \NC \NR
-\NC \type {breakafterdirmode} \NC integer \NC \NC \NR
-\NC \type {shapemode} \NC integer \NC \NC \NR
-\NC \type {fixupboxesmode} \NC integer \NC \NC \NR
-\NC \type {boxdirection} \NC box direction \NC \NC \NR
-\NC \type {boxorientation} \NC box orientation \NC rotation over 90, 180, 270 degrees \NC \NR
-\NC \type {boxxoffset} \NC box xoffset \NC leaves dimensions untounched \NC \NR
-\NC \type {boxyoffset} \NC box yoffset \NC leaves dimensions untounched \NC \NR
-\NC \type {boxxmove} \NC box xmove \NC offsets that reflect on dimensions \NC \NR
-\NC \type {boxymove} \NC box ymove \NC offsets that reflect on dimensions \NC \NR
-\NC \type {boxtotal} \NC box ht+dp \NC height plus depth (and when assigned halfs) \NC \NR
-\NC \type {boxattr} \NC box attr value \NC (sets) a specific attribute to a value \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=Scanning]
-
-\starttabulate[|||p|]
-\NC \type {aftergrouped} \NC text \NC like aftergroup but for given list \NC \NR
-\NC \type {alignmark} \NC \NC equivalent to hash token \NC \NR
-\NC \type {aligntab} \NC \NC equivalent to tab token \NC \NR
-\NC \type {begincsname} \NC command \NC variant of \type {\csname} that ignores undefined commands \NC \NR
-\NC \type {catcodetable} \NC integer \NC switch to catcode table \NC \NR
-\NC \type {csstring} \NC command \NC the command without preceding escape character \NC \NR
-\NC \type {endlocalcontrol} \NC command \NC switches back to the main control loop \NC \NR
-\NC \type {etoksapp} \NC tokenregister text \NC append expanded text to given tokenregister \NC \NR
-\NC \type {etokspre} \NC tokenregister text \NC prepend expanded text to given tokenregister \NC \NR
-\NC \type {expanded} \NC text \NC expands the given text \NC \NR
-\NC \type {frozen} \NN prefix \NC \NC \NR
-\NC \type {futureexpand} \NN token command command \NC expands second ot third token depending on first match \NC \NR
-\NC \type {futureexpandis} \NN token command command \NC as \type {futureexpand} but also skips pars \NC \NR
-\NC \type {futureexpandisap} \NN token command command \NC same as idem but doesn't push back skipped spaces \NC \NR
-\NC \type {gtoksapp} \NC tokenregister text \NC globally append text to given tokenregister \NC \NR
-\NC \type {gtokspre} \NC tokenregister text \NC globally prepend text to given tokenregister \NC \NR
-\NC \type {ifabsdim} \NC dimension <=> dimension \NC test the absolute value of the given dimension \NC \NR
-\NC \type {ifabsnum} \NC integer <=> integer \NC test the absolute value of the given integer \NC \NR
-\NC \type {ifcondition} \NC command \NC assume the next token is a test (so skip as if) \NC \NR
-\NC \type {ifdimen} \NC possibly a dimension \NC acts like an \type {\ifcase} with 1 for valid and 2 for invalid \NC \NR
-\NC \type {ifincsname} \NC command \NC check if we're inside a csname expansion \NC \NR
-\NC \type {ifnumval} \NC \NC \NC \NR
-\NC \type {ifdimval} \NC \NC \NC \NR
-\NC \type {ifchknum} \NC \NC \NC \NR
-\NC \type {ifchkdim} \NC \NC \NC \NR
-\NC \type {ifcmpnum} \NC \NC \NC \NR
-\NC \type {ifcmpdim} \NC \NC \NC \NR
-\NC \type {ifusercmd} \NC command \NC \NC \NR
-\NC \type {ifprotected} \NC command \NC \NC \NR
-\NC \type {iffrozen} \NC command \NC \NC \NR
-\NC \type {iftok} \NC \NC \NC \NR
-\NC \type {ifcstok} \NC \NC \NC \NR
-\NC \type {internalcodesmode} \NC integer \NC \NC \NR
-%NC \type {ifprimitive} \NC command \NC check if the given command is a primitive \NC \NR
-\NC \type {immediateassigned} \NC command \NC (todo) expand the following assignment now\NC \NR
-\NC \type {immediateassignment} \NC command \NC (todo) expand the following assignment now\NC \NR
-\NC \type {initcatcodetable} \NC integer \NC initialize catcode table \NC \NR
-\NC \type {lastnamedcs} \NC command \NC last found command of \type {\ifcsname} construction \NC \NR
-\NC \type {nospaces} \NC integer \NC don't inject spaces \NC \NR
-%NC \type {primitive} \NC command \NC expands the next primitive equivalent \NC \NR
-\NC \type {orelse} \NC condition \NC \NC \NR
-\NC \type {pxdimen} \NC dimension \NC multiplier for the \type {px} unit \NC \NR
-\NC \type {savecatcodetable} \NC integer \NC save catcode table \NC \NR
-\NC \type {scantextokens} \NC text \NC \type {\scantokens} without file side effects \NC \NR
-\NC \type {suppressifcsnameerror} \NC integer \NC recover from issues in csname testing \NC \NR
-\NC \type {suppresslongerror} \NC integer \NC make \type {\long} a nop \NC \NR
-\NC \type {suppressmathparerror} \NC integer \NC accepts \type {\par} and empty lines in math \NC \NR
-\NC \type {suppressoutererror} \NC integer \NC make \type {\outer} a nop \NC \NR
-\NC \type {suppressprimitiveerror} \NC integer \NC don't report an invalid \type {\primitive} \NC \NR
-\NC \type {toksapp} \NC tokenregister text \NC append text to given tokenregister \NC \NR
-\NC \type {tokspre} \NC tokenregister text \NC prepend text to given tokenregister \NC \NR
-\NC \type {xtoksapp} \NC tokenregister text \NC globally append expanded text to given tokenregister \NC \NR
-\NC \type {xtokspre} \NC tokenregister text \NC globally prepend expanded text to given tokenregister \NC \NR
-% new (some end-of-the-year experiment)
-\NC \type {letfrozen} \NC macro \NC sets the frozen property of a macro \NC \NR
-\NC \type {letprotected} \NC macro \NC sets the protected property of a macro \NC \NR
-\NC \type {unletfrozen} \NC macro \NC unsets the frozen property of a macro \NC \NR
-\NC \type {unletprotected} \NC macro \NC unsets the protected property of a macro \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=Typesetting]
-
-\starttabulate[|||p|]
-\NC \type {protrudechars} \NC integer \NC \NC \NR
-\NC \type {localbrokenpenalty} \NC integer \NC \NC \NR
-\NC \type {localinterlinepenalty} \NC integer \NC \NC \NR
-\NC \type {adjustspacing} \NC integer \NC \NC \NR
-\NC \type {boundary} \NC command \NC \NC \NR
-\NC \type {noboundary} \NC command \NC \NC \NR
-\NC \type {protrusionboundary} \NC command \NC \NC \NR
-\NC \type {wordboundary} \NC command \NC \NC \NR
-\NC \type {nohrule} \NC command \NC \NC \NR
-\NC \type {novrule} \NC command \NC \NC \NR
-\NC \type {insertht} \NC number \NC \NC \NR
-\NC \type {quitvmode} \NC command \NC \NC \NR
-\NC \type {leftmarginkern} \NC dimension \NC \NC \NR
-\NC \type {rightmarginkern} \NC dimension \NC \NC \NR
-\NC \type {localleftbox} \NC box \NC \NC \NR
-\NC \type {localrightbox} \NC box \NC \NC \NR
-\NC \type {gleaders} \NC command \NC \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=\LUA]
-
-\starttabulate[|||p|]
-\NC \type {luacopyinputnodes} \NC integer \NC \NC \NR
-\NC \type {luadef} \NC \NC \NC \NR
-\NC \type {luabytecodecall} \NC \NC \NC \NR
-\NC \type {luafunctioncall} \NC \NC \NC \NR
-\NC \type {latelua} \NC \NC \NC \NR
-\NC \type {lateluafunction} \NC \NC \NC \NR
-\NC \type {luabytecode} \NC \NC \NC \NR
-\NC \type {luaescapestring} \NC \NC \NC \NR
-\NC \type {luafunction} \NC \NC \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=Management]
-
-\starttabulate[|||p|]
-\NC \type {outputbox} \NC integer \NC \NC \NR
-\NC \type {clearmarks} \NC \NC \NC \NR
-\NC \type {attribute} \NC \NC \NC \NR
-\NC \type {glet} \NC \NC \NC \NR
-\NC \type {letcharcode} \NC \NC \NC \NR
-\NC \type {attributedef} \NC \NC \NC \NR
-\stoptabulate
-
-\stopsection
-
-\startsection[title=Miscellaneous]
-
-\starttabulate[|||p|]
-\NC \type {luatexversion} \NC \NC \NC \NR
-\NC \type {formatname} \NC \NC \NC \NR
-\NC \type {luatexbanner} \NC \NC \NC \NR
-\NC \type {luatexrevision} \NC \NC \NC \NR
-\stoptabulate
-
-\stopsection
-
-\stopchapter
-
-\stopcomponent
+\starttext \ctxlua {table.save(tex.jobname .. '.lua',tex.primitives())} \stoptext \ No newline at end of file
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex
index 3f4b0ad2183..1b4a8d5a1c7 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex
@@ -115,11 +115,11 @@
\stopluacode
-\unexpanded\def\showfields #1{\ctxlua{document.functions.showfields("#1")}}
-\unexpanded\def\showid #1{\ctxlua{document.functions.showid("#1")}}
-\unexpanded\def\showsubtypes#1{\ctxlua{document.functions.showsubtypes("#1")}}
-\unexpanded\def\showvalues #1{\ctxlua{document.functions.showvalues(node.values("#1"))}}
-\unexpanded\def\showtypes {\ctxlua{document.functions.showvalues(node.types())}}
+\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\showtypes {\ctxlua{document.functions.showvalues(node.types())}}
\definecolor[blue] [b=.5]
@@ -130,11 +130,13 @@
%definecolor[othercolor][r=.5,g=.5]
\definecolor[maincolor] [b=.5]
+\definecolor[mooncolor] [b=.5]
\definecolor[keptcolor] [b=.5]
-\definecolor[othercolor][s=.5]
+%\efinecolor[othercolor][s=.5]
+\definecolor[othercolor][r=.5,g=.5]
\writestatus{luametatex manual}{}
-\writestatus{luametatex manual}{defining lucodaot} \usebodyfont [lucidaot]
+\writestatus{luametatex manual}{defining lucidaot} \usebodyfont [lucidaot]
\writestatus{luametatex manual}{defining pagella} \usebodyfont [pagella]
\writestatus{luametatex manual}{defining cambria} \usebodyfont [cambria]
\writestatus{luametatex manual}{defining modern} \usebodyfont [modern]
@@ -195,10 +197,11 @@
\startMPdefinitions
- color luaplanetcolor ; luaplanetcolor := \MPcolor{maincolor} ;
- color luaholecolor ; luaholecolor := white ;
+ string luaplanetcolor ; luaplanetcolor := "maincolor" ;
+ string luamooncolor ; luaplanetcolor := "mooncolor" ;
+ string luaholecolor ; luaholecolor := "white" ;
+ string luaorbitcolor ; luaorbitcolor := "darkgray" ;
numeric luaextraangle ; luaextraangle := 0 ;
- numeric luaorbitfactor ; luaorbitfactor := .25 ;
vardef lualogo = image (
@@ -213,10 +216,10 @@
draw fullcircle rotated 40.5 scaled (1+r)
dashed evenly scaled p
withpen pencircle scaled (p/2)
- withcolor (luaorbitfactor * luaholecolor) ;
+ withcolor luaorbitcolor ;
fill fullcircle scaled r shifted (d+1/8,d+1/8)
rotated - luaextraangle
- withcolor luaplanetcolor ;
+ withcolor luamooncolor ;
fill fullcircle scaled r shifted (d-1/8,d-1/8)
withcolor luaholecolor ;
luaorbitfactor := .25 ;
@@ -229,7 +232,8 @@
fill Page withcolor \MPcolor{othercolor} ;
- luaorbitfactor := 1 ;
+ luaorbitcolor := "white" ;
+ luamooncolor := "maincolor" ;
picture p ; p := lualogo ysized (5*\measure{paperheight}/10) ;
draw p
@@ -251,9 +255,11 @@
% \stoptexdefinition
\startuseMPgraphic{luanumber}
- % luaextraangle := \luaextraangle;
- luaextraangle := if (LastPageNumber < 10) : 10 else : (RealPageNumber / LastPageNumber) * 360 fi;
- luaorbitfactor := 0.25 ;
+ % luaextraangle := \luaextraangle;
+ luaextraangle := if (LastPageNumber < 10) : 10 else : (RealPageNumber / LastPageNumber) * 360 fi;
+ luaorbitcolor := "darkgray" ;
+ luamooncolor := "othercolor" ;
+ % luamooncolor := "maincolor" ;
picture p ; p := lualogo ;
setbounds p to boundingbox fullcircle ;
draw p ysized 1cm ;
@@ -314,13 +320,13 @@
{\strut\useMPgraphic{luanumber}}
\stopsetups
-\unexpanded\def\nonterminal#1>{\mathematics{\langle\hbox{\rm #1}\rangle}}
+\protected\def\nonterminal#1>{\mathematics{\langle\hbox{\rm #1}\rangle}}
% taco's brainwave -) .. todo: create a typing variant so that we can avoid the !crlf
\newcatcodetable\syntaxcodetable
-\unexpanded\def\makesyntaxcodetable
+\protected\def\makesyntaxcodetable
{\begingroup
\catcode`\<=13 \catcode`\|=12
\catcode`\!= 0 \catcode`\\=12
@@ -329,11 +335,11 @@
\makesyntaxcodetable
-\unexpanded\def\startsyntax {\begingroup\catcodetable\syntaxcodetable \dostartsyntax}
-\unexpanded\def\syntax {\begingroup\catcodetable\syntaxcodetable \dosyntax}
+\protected\def\startsyntax {\begingroup\catcodetable\syntaxcodetable \dostartsyntax}
+\protected\def\syntax {\begingroup\catcodetable\syntaxcodetable \dosyntax}
\let\stopsyntax \relax
-\unexpanded\def\syntaxenvbody#1%
+\protected\def\syntaxenvbody#1%
{\par
\tt
\startnarrower
@@ -342,7 +348,7 @@
\stopnarrower
\par}
-\unexpanded\def\syntaxbody#1%
+\protected\def\syntaxbody#1%
{\begingroup
% \maincolor
\tt #1%
@@ -427,13 +433,13 @@
\defineregister[nodeindex]
\defineregister[libraryindex]
-\unexpanded\def\lpr#1{\doifmode{*bodypart}{\primitiveindex[#1]{\bf\tex {#1}}}\tex {#1}}
-\unexpanded\def\prm#1{\doifmode{*bodypart}{\primitiveindex[#1]{\tex {#1}}}\tex {#1}}
-\unexpanded\def\orm#1{\doifmode{*bodypart}{\primitiveindex[#1]{\tex {#1}}}\tex {#1}}
-\unexpanded\def\cbk#1{\doifmode{*bodypart}{\callbackindex [#1]{\type {#1}}}\type{#1}}
-\unexpanded\def\nod#1{\doifmode{*bodypart}{\nodeindex [#1]{\bf\type{#1}}}\type{#1}}
-\unexpanded\def\whs#1{\doifmode{*bodypart}{\nodeindex [#1]{\type {#1}}}\type{#1}}
-\unexpanded\def\noa#1{\doifmode{*bodypart}{\nodeindex [#1]{\type {#1}}}\type{#1}}
+\protected\def\lpr#1{\doifmode{*bodypart}{\primitiveindex[#1]{\bf\tex {#1}}}\tex {#1}}
+\protected\def\prm#1{\doifmode{*bodypart}{\primitiveindex[#1]{\tex {#1}}}\tex {#1}}
+\protected\def\orm#1{\doifmode{*bodypart}{\primitiveindex[#1]{\tex {#1}}}\tex {#1}}
+\protected\def\cbk#1{\doifmode{*bodypart}{\callbackindex [#1]{\type {#1}}}\type{#1}}
+\protected\def\nod#1{\doifmode{*bodypart}{\nodeindex [#1]{\bf\type{#1}}}\type{#1}}
+\protected\def\whs#1{\doifmode{*bodypart}{\nodeindex [#1]{\type {#1}}}\type{#1}}
+\protected\def\noa#1{\doifmode{*bodypart}{\nodeindex [#1]{\type {#1}}}\type{#1}}
\hyphenation{sub-nodes}
@@ -457,14 +463,14 @@
[2]
[textstyle=\tttf]
-\unexpanded\def\lib #1{\doifmode{*bodypart}{\expanded{\libraryindex{\currentlibraryindex+#1}}}\type{\currentlibraryindex.#1}}
-\unexpanded\def\libindex#1{\doifmode{*bodypart}{\expanded{\libraryindex{\currentlibraryindex+#1}}}}
-\unexpanded\def\libidx#1#2{\doifmode{*bodypart}{\expanded{\libraryindex{#1+#2}}\type{#1.#2}}}
-\unexpanded\def\lix #1#2{\doifmode{*bodypart}{\expanded{\libraryindex{#1+#2}}}}
+\protected\def\lib #1{\doifmode{*bodypart}{\expanded{\libraryindex{\currentlibraryindex+#1}}}\type{\currentlibraryindex.#1}}
+\protected\def\libindex#1{\doifmode{*bodypart}{\expanded{\libraryindex{\currentlibraryindex+#1}}}}
+\protected\def\libidx#1#2{\doifmode{*bodypart}{\expanded{\libraryindex{#1+#2}}\type{#1.#2}}}
+\protected\def\lix #1#2{\doifmode{*bodypart}{\expanded{\libraryindex{#1+#2}}}}
% \setstructurepageregister[][keys:1=,entries:1=]
-\unexpanded\def\inlineluavalue#1%
+\protected\def\inlineluavalue#1%
{{\maincolor \ctxlua {
local t = #1
if type(t) == "table" then
@@ -475,4 +481,74 @@
context.typ(t)
}}}
+% Common:
+
+% Added December 9 2020 after being energized by Becca Stevens's Slow Burn music
+% video: interesting what comes out of top musicians working remote.
+
+\startluacode
+local list = token.getprimitives()
+
+-- redo this:
+
+function document.showprimitives(tag)
+ local t = tex.extraprimitives(tag)
+ table.sort(t)
+ for i=1,#t do
+ local v = t[i]
+ if v ~= ' ' and v ~= "/" and v ~= "-" then
+ context.type(v)
+ context.space()
+ end
+ end
+end
+
+-- inspect(tokens.commands)
+
+function document.filteredprimitives(cmd)
+ local t = { }
+ local c = tokens.commands[cmd]
+ for i=1,#list do
+ local l = list[i]
+ if l[1] == c then
+ t[#t+1] = l[3]
+ end
+ end
+ table.sort(t)
+ for i=1,#t do
+ if i > 1 then
+ context(", ")
+ elseif i == #t then
+ context(" and ")
+ end
+ context.typ(t[i])
+ end
+end
+
+function document.allprimitives()
+ local c = tokens.commands
+ local o = tex.getprimitiveorigins()
+ table.sort(list, function(a,b)
+ return a[3] < b[3]
+ end)
+ context.starttabulate { "|T|T|Tc|T|" }
+ context.DB() context("primitive")
+ context.BC() context("command code")
+ context.BC() context("char code")
+ context.BC() context("origin")
+ context.NC() context.NR()
+ context.TB()
+ for i=1,#list do
+ local l = list[i]
+ context.NC() context.tex(l[3])
+ context.NC() context(c[l[1]])
+ context.NC() context(l[2])
+ context.NC() context(o[l[4]])
+ context.NC() context.NR()
+ end
+ context.LL()
+ context.stoptabulate()
+end
+\stopluacode
+
\stopenvironment
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex
index 737f3b96081..503bbfd8293 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex
@@ -4,6 +4,16 @@
\startcomponent luametatex-tex
+% { "getbytecode", lualib_get_bytecode },
+% { "setbytecode", lualib_set_bytecode },
+% { "callbytecode", lualib_call_bytecode },
+% { "getfunctionstable", lualib_get_functions_table },
+% { "getstartupfile", lualib_get_startupfile },
+% { "getversion", lualib_get_version },
+% { "setexitcode", lualib_set_exitcode },
+% { NULL, NULL },
+
+
\startchapter[reference=tex,title={The \TEX\ related libraries}]
\startsection[title={The \type {lua} library}][library=lua]
@@ -11,21 +21,28 @@
\startsubsection[title={Version information}]
\topicindex{libraries+\type{lua}}
-\topicindex{version}
-\topicindex{startupfile}
+\topicindex{getversion}
+\topicindex{getstartupfile}
+
+\libindex{getversion}
+\libindex{getstartupfile}
+
+This version of the used \LUA\ interpreter (currently {\tttf \cldcontext
+{lua.getversion()}}) can be queried with:
-\libindex{version}
-\libindex{startupfile}
+\starttyping
+<string> v = lua.getversion()
+\stoptyping
-This library contains two read|-|only items:
+The name of used startup file, if at all, is returned by:
\starttyping
-<string> v = lua.version
-<string> s = lua.startupfile
+<string> s = lua.getstartupfile()
\stoptyping
-This returns the \LUA\ version identifier string. The value currently is
-\directlua {tex.print(lua.version)}.
+For this document the reported value is:
+
+\blank {\ttx \cldcontext {lua.getstartupfile()}} \blank
\stopsubsection
@@ -60,6 +77,7 @@ This preallocates 100 hash entries and 5000 index entries. The \type
\libindex{bytecode}
\libindex{setbytecode}
\libindex{getbytecode}
+\libindex{callbytecode}
\LUA\ registers can be used to store \LUA\ code chunks. The accepted values for
assignments are functions and \type {nil}. Likewise, the retrieved value is
@@ -67,7 +85,7 @@ either a function or \type {nil}.
\starttyping
lua.bytecode[<number> n] = <function> f
-lua.bytecode[<number> n]()
+<function> f = lua.bytecode[<number> n] % -- f()
\stoptyping
The contents of the \type {lua.bytecode} array is stored inside the format file
@@ -75,8 +93,8 @@ as actual \LUA\ bytecode, so it can also be used to preload \LUA\ code. The
function must not contain any upvalues. The associated function calls are:
\startfunctioncall
-<function> f = lua.getbytecode(<number> n)
lua.setbytecode(<number> n, <function> f)
+<function> f = lua.getbytecode(<number> n)
\stopfunctioncall
Note: Since a \LUA\ file loaded using \type {loadfile(filename)} is essentially
@@ -84,14 +102,14 @@ an anonymous function, a complete file can be stored in a bytecode register like
this:
\startfunctioncall
-lua.bytecode[n] = loadfile(filename)
+lua.setbytecode(n,loadfile(filename))
\stopfunctioncall
Now all definitions (functions, variables) contained in the file can be
created by executing this bytecode register:
\startfunctioncall
-lua.bytecode[n]()
+lua.callbytecode(n)
\stopfunctioncall
Note that the path of the file is stored in the \LUA\ bytecode to be used in
@@ -102,30 +120,6 @@ mind when preloading files into a bytecode register in \INITEX.
\stopsubsection
-\startsubsection[title={Chunk name registers}]
-
-\libindex{name}
-\libindex{setluaname}
-\libindex{getluaname}
-
-There is an array of 65536 (0--65535) potential chunk names for use with the
-\prm {directlua} and \lpr {latelua} primitives.
-
-\startfunctioncall
-lua.name[<number> n] = <string> s
-<string> s = lua.name[<number> n]
-\stopfunctioncall
-
-If you want to unset a \LUA\ name, you can assign \type {nil} to it. The function
-accessors are:
-
-\startfunctioncall
-lua.setluaname(<string> s,<number> n)
-<string> s = lua.getluaname(<number> n)
-\stopfunctioncall
-
-\stopsubsection
-
\startsubsection[title={Introspection}]
\libindex{getstacktop}
@@ -166,96 +160,100 @@ and values as a table.
<table> info = status.list()
\stopfunctioncall
-The keys in the table are the known items, the value is the current value. Almost
-all of the values in \type {status} are fetched through a metatable at run|-|time
-whenever they are accessed, so you cannot use \type {pairs} on \type {status},
-but you {\it can\/} use \type {pairs} on \type {info}, of course. If you do not
-need the full list, you can also ask for a single item by using its name as an
-index into \type {status}. The current list is:
+The keys in the table are the known items, the value is the current value. There are
+toplevel items and items that are tables with subentries. The current list is:
-\starttabulate[|l|p|]
-\DB key \BC explanation \NC \NR
+\startluacode
+ local list = status.list()
+
+ context.starttabulate { "|Tw(10em)|Tp|" }
+ context.DB()
+ context("toplevel statistics")
+ context.BC()
+ context.NC()
+ context.NR()
+ context.TB()
+ for k, v in table.sortedhash(list) do
+ if type(v) ~= "table" then
+ context.NC()
+ context(k)
+ context.NC()
+ context(tostring(v))
+ context.NC()
+ context.NR()
+ end
+ end
+ context.LL()
+ context.stoptabulate()
+
+ for k, v in table.sortedhash(list) do
+ if type(v) == "table" then
+ context.starttabulate { "|Tw(10em)|Tp|" }
+ context.DB()
+ context(k ..".*")
+ context.BC()
+ context.NC()
+ context.NR()
+ context.TB()
+ for k, v in table.sortedhash(v) do
+ context.NC()
+ context(k)
+ context.NC()
+ context(v == "" and "unset" or tostring(v))
+ context.NC()
+ context.NR()
+ end
+ context.LL()
+ context.stoptabulate()
+ end
+ end
+\stopluacode
+
+There are also getters for the subtables. The whole repertoire of functions in
+the \type {status} table is: {\tttf \cldcontext {table . concat ( table .
+sortedkeys (status), ", ")}}. The error and warning messages can be wiped with
+the \type {resetmessages} function. The states in subtables relate to memory
+management and are mostly there for development purposes.
+
+The \type {getconstants} query gives back a table with all kind of internal
+quantities and again these are only relevant for diagnostic and development
+purposes. Many are good old \TEX\ constants that are describes in the original
+documentation of the source but some are definitely \LUAMETATEX\ specific.
+
+\startluacode
+ context.starttabulate { "|Tw(15em)|Tp|" }
+ context.DB()
+ context("constants.*")
+ context.BC()
+ context.NC()
+ context.NR()
+ context.TB()
+ for k, v in table.sortedhash(status.getconstants()) do
+ if type(v) ~= "table" then
+ context.NC()
+ context(k)
+ context.NC()
+ context(tostring(v))
+ context.NC()
+ context.NR()
+ end
+ end
+ context.LL()
+ context.stoptabulate()
+\stopluacode
+
+Most variables speak for themselves, some are more obscure. For instance the
+\type {run_state} variable indicates what the engine is doing:
+
+\starttabulate[|l|l|p|]
+\DB n \NC meaning \NC explanation \NC \NR
\TB
-\NC \type{banner} \NC terminal display banner \NC \NR
-\NC \type{best_page_break} \NC the current best break (a node) \NC \NR
-\NC \type{buf_size} \NC current allocated size of the line buffer \NC \NR
-\NC \type{callbacks} \NC total number of executed callbacks so far \NC \NR
-\NC \type{cs_count} \NC number of control sequences \NC \NR
-\NC \type{dest_names_size} \NC \PDF\ destination table size \NC \NR
-\NC \type{dvi_gone} \NC written \DVI\ bytes \NC \NR
-\NC \type{dvi_ptr} \NC not yet written \DVI\ bytes \NC \NR
-\NC \type{dyn_used} \NC token (multi|-|word) memory in use \NC \NR
-\NC \type{filename} \NC name of the current input file \NC \NR
-\NC \type{fix_mem_end} \NC maximum number of used tokens \NC \NR
-\NC \type{fix_mem_min} \NC minimum number of allocated words for tokens \NC \NR
-\NC \type{fix_mem_max} \NC maximum number of allocated words for tokens \NC \NR
-\NC \type{font_ptr} \NC number of active fonts \NC \NR
-\NC \type{hash_extra} \NC extra allowed hash \NC \NR
-\NC \type{hash_size} \NC size of hash \NC \NR
-\NC \type{indirect_callbacks} \NC number of those that were themselves a result of other callbacks (e.g. file readers) \NC \NR
-\NC \type{ini_version} \NC \type {true} if this is an \INITEX\ run \NC \NR
-\NC \type{init_pool_ptr} \NC \INITEX\ string pool index \NC \NR
-\NC \type{init_str_ptr} \NC number of \INITEX\ strings \NC \NR
-\NC \type{input_ptr} \NC the level of input we're at \NC \NR
-\NC \type{inputid} \NC numeric id of the current input \NC \NR
-\NC \type{largest_used_mark} \NC max referenced marks class \NC \NR
-\NC \type{lasterrorcontext} \NC last error context string (with newlines) \NC \NR
-\NC \type{lasterrorstring} \NC last \TEX\ error string \NC \NR
-\NC \type{lastluaerrorstring} \NC last \LUA\ error string \NC \NR
-\NC \type{lastwarningstring} \NC last warning tag, normally an indication of in what part\NC \NR
-\NC \type{lastwarningtag} \NC last warning string\NC \NR
-\NC \type{linenumber} \NC location in the current input file \NC \NR
-\NC \type{log_name} \NC name of the log file \NC \NR
-\NC \type{luabytecode_bytes} \NC number of bytes in \LUA\ bytecode registers \NC \NR
-\NC \type{luabytecodes} \NC number of active \LUA\ bytecode registers \NC \NR
-\NC \type{luastate_bytes} \NC number of bytes in use by \LUA\ interpreters \NC \NR
-\NC \type{luatex_engine} \NC the \LUATEX\ engine identifier \NC \NR
-\NC \type{luatex_hashchars} \NC length to which \LUA\ hashes strings ($2^n$) \NC \NR
-\NC \type{luatex_hashtype} \NC the hash method used (in \LUAJITTEX) \NC \NR
-\NC \type{luatex_version} \NC the \LUATEX\ version number \NC \NR
-\NC \type{luatex_revision} \NC the \LUATEX\ revision string \NC \NR
-\NC \type{max_buf_stack} \NC max used buffer position \NC \NR
-\NC \type{max_in_stack} \NC max used input stack entries \NC \NR
-\NC \type{max_nest_stack} \NC max used nesting stack entries \NC \NR
-\NC \type{max_param_stack} \NC max used parameter stack entries \NC \NR
-\NC \type{max_save_stack} \NC max used save stack entries \NC \NR
-\NC \type{max_strings} \NC maximum allowed strings \NC \NR
-\NC \type{nest_size} \NC nesting stack size \NC \NR
-\NC \type{node_mem_usage} \NC a string giving insight into currently used nodes \NC \NR
-\NC \type{obj_ptr} \NC max \PDF\ object pointer \NC \NR
-\NC \type{obj_tab_size} \NC \PDF\ object table size \NC \NR
-\NC \type{output_active} \NC \type {true} if the \prm {output} routine is active \NC \NR
-\NC \type{output_file_name} \NC name of the \PDF\ or \DVI\ file \NC \NR
-\NC \type{param_size} \NC parameter stack size \NC \NR
-\NC \type{pdf_dest_names_ptr} \NC max \PDF\ destination pointer \NC \NR
-\NC \type{pdf_gone} \NC written \PDF\ bytes \NC \NR
-\NC \type{pdf_mem_ptr} \NC max \PDF\ memory used \NC \NR
-\NC \type{pdf_mem_size} \NC \PDF\ memory size \NC \NR
-\NC \type{pdf_os_cntr} \NC max \PDF\ object stream pointer \NC \NR
-\NC \type{pdf_os_objidx} \NC \PDF\ object stream index \NC \NR
-\NC \type{pdf_ptr} \NC not yet written \PDF\ bytes \NC \NR
-\NC \type{pool_ptr} \NC string pool index \NC \NR
-\NC \type{pool_size} \NC current size allocated for string characters \NC \NR
-\NC \type{save_size} \NC save stack size \NC \NR
-\NC \type{shell_escape} \NC \type {0} means disabled, \type {1} means anything is permitted, and \type {2} is restricted \NC \NR
-\NC \type{safer_option} \NC \type {1} means safer is enforced \NC \NR
-\NC \type{kpse_used} \NC \type {1} means that kpse is used \NC \NR
-\NC \type{stack_size} \NC input stack size \NC \NR
-\NC \type{str_ptr} \NC number of strings \NC \NR
-\NC \type{total_pages} \NC number of written pages \NC \NR
-\NC \type{var_mem_max} \NC number of allocated words for nodes \NC \NR
-\NC \type{var_used} \NC variable (one|-|word) memory in use \NC \NR
-\NC \type{lc_collate} \NC the value of \type {LC_COLLATE} at startup time (becomes \type {C} at startup) \NC \NR
-\NC \type{lc_ctype} \NC the value of \type {LC_CTYPE} at startup time (becomes \type {C} at startup) \NC \NR
-%NC \type{lc_monetary} \NC the value of \type {LC_MONETARY} at startup time \NC \NR
-\NC \type{lc_numeric} \NC the value of \type {LC_NUMERIC} at startup time \NC \NR
-%NC \type{lc_time} \NC the value of \type {LC_TIME} at startup time (becomes \type {C} at startup) \NC \NR
+\NC 0 \NC initializing \NC \type {--ini} mnode \NC \NR
+\NC 1 \NC updating \NC relates to \lpr {overloadmode} \NC \NR
+\NC 2 \NC production \NC a regular (format driven) run \NC \NR
\LL
\stoptabulate
-The error and warning messages can be wiped with the \type {resetmessages}
-function. A return value can be set with \type {setexitcode}.
-
\stopsection
\startsection[title={The \type {tex} library}][library=tex]
@@ -284,7 +282,8 @@ readable (like \prm {tracingcommands} and \prm {parindent}).
\topicindex{parameters+internal}
-\libindex{set} \libindex{get}
+\libindex{set}
+\libindex{get}
For all the parameters in this section, it is possible to access them directly
using their names as index in the \type {tex} table, or by using one of the
@@ -307,152 +306,8 @@ get all five values. Otherwise you get a node which is a copy of the internal
value so you are responsible for its freeing at the \LUA\ end. When you set a
glue quantity you can either pass a \nod {glue_spec} or upto five numbers.
-\subsubsection{Integer parameters}
-
-The integer parameters accept and return \LUA\ numbers. These are read|-|write:
-
-\starttwocolumns
-\starttyping
-tex.adjdemerits
-tex.binoppenalty
-tex.brokenpenalty
-tex.catcodetable
-tex.clubpenalty
-tex.day
-tex.defaulthyphenchar
-tex.defaultskewchar
-tex.delimiterfactor
-tex.displaywidowpenalty
-tex.doublehyphendemerits
-tex.endlinechar
-tex.errorcontextlines
-tex.escapechar
-tex.exhyphenpenalty
-tex.fam
-tex.finalhyphendemerits
-tex.floatingpenalty
-tex.globaldefs
-tex.hangafter
-tex.hbadness
-tex.holdinginserts
-tex.hyphenpenalty
-tex.interlinepenalty
-tex.language
-tex.lastlinefit
-tex.lefthyphenmin
-tex.linepenalty
-tex.localbrokenpenalty
-tex.localinterlinepenalty
-tex.looseness
-tex.mag
-tex.maxdeadcycles
-tex.month
-tex.newlinechar
-tex.outputpenalty
-tex.pausing
-tex.postdisplaypenalty
-tex.predisplaydirection
-tex.predisplaypenalty
-tex.pretolerance
-tex.relpenalty
-tex.righthyphenmin
-tex.savinghyphcodes
-tex.savingvdiscards
-tex.showboxbreadth
-tex.showboxdepth
-tex.time
-tex.tolerance
-tex.tracingassigns
-tex.tracingcommands
-tex.tracinggroups
-tex.tracingifs
-tex.tracinglostchars
-tex.tracingmacros
-tex.tracingnesting
-tex.tracingonline
-tex.tracingoutput
-tex.tracingpages
-tex.tracingparagraphs
-tex.tracingrestores
-tex.tracingscantokens
-tex.tracingstats
-tex.uchyph
-tex.vbadness
-tex.widowpenalty
-tex.year
-\stoptyping
-\stoptwocolumns
-
-These are read|-|only:
-
-\startthreecolumns
-\starttyping
-tex.deadcycles
-tex.insertpenalties
-tex.parshape
-tex.prevgraf
-tex.spacefactor
-\stoptyping
-\stopthreecolumns
-
-\subsubsection{Dimension parameters}
-
-The dimension parameters accept \LUA\ numbers (signifying scaled points) or
-strings (with included dimension). The result is always a number in scaled
-points. These are read|-|write:
-
-\startthreecolumns
-\starttyping
-tex.boxmaxdepth
-tex.delimitershortfall
-tex.displayindent
-tex.displaywidth
-tex.emergencystretch
-tex.hangindent
-tex.hfuzz
-tex.hoffset
-tex.hsize
-tex.lineskiplimit
-tex.mathsurround
-tex.maxdepth
-tex.nulldelimiterspace
-tex.overfullrule
-tex.pagebottomoffset
-tex.pageheight
-tex.pageleftoffset
-tex.pagerightoffset
-tex.pagetopoffset
-tex.pagewidth
-tex.parindent
-tex.predisplaysize
-tex.scriptspace
-tex.splitmaxdepth
-tex.vfuzz
-tex.voffset
-tex.vsize
-tex.prevdepth
-tex.prevgraf
-tex.spacefactor
-\stoptyping
-\stopthreecolumns
-
-These are read|-|only:
-
-\startthreecolumns
-\starttyping
-tex.pagedepth
-tex.pagefilllstretch
-tex.pagefillstretch
-tex.pagefilstretch
-tex.pagegoal
-tex.pageshrink
-tex.pagestretch
-tex.pagetotal
-\stoptyping
-\stopthreecolumns
-
-Beware: as with all \LUA\ tables you can add values to them. So, the following is
-valid:
+Beware: as with regular \LUA\ tables you can add values to the \type {tex} table.
+So, the following is valid:
\starttyping
tex.foo = 123
@@ -484,70 +339,52 @@ as there is no way \LUATEX\ can guess your intentions. By using the accessor in
the \type {tex} tables, you get and set the values at the top of the nesting
stack.
-\subsubsection{Direction parameters}
+\subsubsection{Integer parameters}
-The direction states can be queried and set with:
+The integer parameters accept and return \LUA\ integers. In some cases the values
+are checked, trigger other settings or result in some immediate change of
+behaviour: \ctxlua {document.filteredprimitives ("internal_int")}.
-\startthreecolumns
-\starttyping
-tex.gettextdir()
-tex.getlinedir()
-tex.getmathdir()
-tex.getpardir()
-tex.settextdir(<number>)
-tex.setlinedir(<number>)
-tex.setmathdir(<number>)
-tex.setpardir(<number>)
-\stoptyping
-\stopthreecolumns
+Some integer parameters are read only, because they are actually referring not to
+some internal integer register but to an engine property: \typ {deadcycles},
+\typ {insertpenalties}, \typ {parshape}, \typ {interlinepenalties}, \typ
+{clubpenalties}, \typ {widowpenalties}, \typ {displaywidowpenalties}, \typ
+{prevgraf} and \typ {spacefactor}.
-and also with:
+\subsubsection{Dimension parameters}
-\startthreecolumns
-\starttyping
-tex.textdirection
-tex.linedirection
-tex.mathdirection
-tex.pardirection
-\stoptyping
-\stopthreecolumns
+The dimension parameters accept \LUA\ numbers (signifying scaled points) or
+strings (with included dimension). The result is always a number in scaled
+points. These are read|-|write: \ctxlua {document.filteredprimitives
+("internal_dimen")}.
+These are read|-|only: \typ {pagedepth}, \typ {pagefilllstretch}, \typ
+{pagefillstretch}, \typ {pagefilstretch}, \typ {pagegoal}, \typ {pageshrink},
+\typ {pagestretch} and \typ {pagetotal}.
-\subsubsection{Glue parameters}
+\subsubsection{Direction parameters}
-The glue parameters accept and return a userdata object that represents a \nod {glue_spec} node.
+The direction states can be queried with: \typ {gettextdir}, \typ {getlinedir},
+\typ {getmathdir} and \typ {getpardir}. You can set them with \typ
+{settextdir}, \typ {setlinedir}, \typ {setmathdir} and \typ {setpardir},
+commands that accept a number. You can also set these parameters as table
+key|/|values: \typ {textdirection}, \typ {linedirection}, \typ {mathdirection}
+and \typ {pardirection}, so the next code sets the text direction to \typ
+{r2l}:
-\startthreecolumns
\starttyping
-tex.abovedisplayshortskip
-tex.abovedisplayskip
-tex.baselineskip
-tex.belowdisplayshortskip
-tex.belowdisplayskip
-tex.leftskip
-tex.lineskip
-tex.parfillskip
-tex.parskip
-tex.rightskip
-tex.spaceskip
-tex.splittopskip
-tex.tabskip
-tex.topskip
-tex.xspaceskip
+tex.textdirection = 1
\stoptyping
-\stopthreecolumns
-\subsubsection{Muglue parameters}
+\subsubsection{Glue parameters}
-All muglue parameters are to be used read|-|only and return a \LUA\ string.
+The internal glue parameters accept and return a userdata object that represents
+a \nod {glue_spec} node: \ctxlua {document.filteredprimitives ("internal_glue")}.
-\startthreecolumns
-\starttyping
-tex.medmuskip
-tex.thickmuskip
-tex.thinmuskip
-\stoptyping
-\stopthreecolumns
+\subsubsection{Muglue parameters}
+
+All muglue parameters are to be used read|-|only and return a \LUA\ string
+\ctxlua {document.filteredprimitives ("internal_mu_glue")}.
\subsubsection{Tokenlist parameters}
@@ -556,22 +393,8 @@ converted to and from token lists using \prm {the} \prm {toks} style expansion:
all category codes are either space (10) or other (12). It follows that assigning
to some of these, like \quote {tex.output}, is actually useless, but it feels bad
to make exceptions in view of a coming extension that will accept full|-|blown
-token strings.
-
-\startthreecolumns
-\starttyping
-tex.errhelp
-tex.everycr
-tex.everydisplay
-tex.everyeof
-tex.everyhbox
-tex.everyjob
-tex.everymath
-tex.everypar
-tex.everyvbox
-tex.output
-\stoptyping
-\stopthreecolumns
+token strings. Here is the lot: \ctxlua {document.filteredprimitives
+("internal_toks")}.
\stopsubsection
@@ -580,55 +403,23 @@ tex.output
\topicindex{convert commands}
All \quote {convert} commands are read|-|only and return a \LUA\ string. The
-supported commands at this moment are:
-
-\starttwocolumns
-\starttyping
-tex.formatname
-tex.jobname
-tex.luatexbanner
-tex.luatexrevision
-tex.fontname(number)
-tex.uniformdeviate(number)
-tex.number(number)
-tex.romannumeral(number)
-tex.fontidentifier(number)
-\stoptyping
-\stoptwocolumns
-
-If you are wondering why this list looks haphazard; these are all the cases of
-the \quote {convert} internal command that do not require an argument, as well as
-the ones that require only a simple numeric value. The special (\LUA|-|only) case
-of \type {tex.fontidentifier} returns the \type {csname} string that matches a
-font id number (if there is one).
+supported commands at this moment are: \ctxlua {document.filteredprimitives
+("convert")}. You will get an error message if an operation is not (yet)
+permitted. Some take an string or number argument, just like at the \TEX\ end
+some extra input is expected.
\stopsubsection
-\startsubsection[title={Last item commands}]
+\startsubsection[title={Item commands}]
\topicindex{last items}
-All \quote {last item} commands are read|-|only and return a number. The
-supported commands at this moment are:
-
-\startthreecolumns
-\starttyping
-tex.lastpenalty
-tex.lastkern
-tex.lastskip
-tex.lastnodetype
-tex.inputlineno
-tex.lastxpos
-tex.lastypos
-tex.randomseed
-tex.luatexversion
-tex.currentgrouplevel
-tex.currentgrouptype
-tex.currentiflevel
-tex.currentiftype
-tex.currentifbranch
-\stoptyping
-\stopthreecolumns
+All so called \quote {item} commands are read|-|only and return a number. The
+complete list of these commands is: \ctxlua {document.filteredprimitives
+("some_item")}. No all are currently supported but eventually that might be the
+case. Like the lists in previous sections, there are differences between \LUATEX\
+and \LUAMETATEX, where some commands are organized differently in order to
+provide a consistent \LUA\ interface.
\stopsubsection
@@ -649,6 +440,8 @@ tex.currentifbranch
\libindex{scantoks}
+\libindex{getmark}
+
\TEX's attributes (\lpr {attribute}), counters (\prm {count}), dimensions (\prm
{dimen}), skips (\prm {skip}, \prm {muskip}) and token (\prm {toks}) registers
can be accessed and written to using two times five virtual sub|-|tables of the
@@ -734,17 +527,17 @@ We have similar setters for \type {count}, \type {dimen}, \type {muskip}, and
nodes, and toks by strings.
Again the glue variants are not using the \nod {glue-spec} userdata nodes. The
-\type {setglue} function accepts upto 5 arguments: width, stretch, shrink,
-stretch order and shrink order and the \type {getglue} function reports them,
-unless the second argument is \type {false} in which case only the width is
-returned.
+\type {setglue} function accepts upto five arguments: width, stretch, shrink,
+stretch order and shrink order. Non|-|numeric values set the property to zero.
+The \type {getglue} function reports all five properties, unless the second
+argument is \type {false} in which case only the width is returned.
Here is an example using a threesome:
\startfunctioncall
local d = tex.getdimen("foo")
-if tex.isdimen("bar") then
- tex.setdimen("bar",d)
+if tex.isdimen("oof") then
+ tex.setdimen("oof",d)
end
\stopfunctioncall
@@ -784,6 +577,15 @@ tex.scantoks("global",0,3,"$\int\limits^1_2$")
In the function-based interface, it is possible to define values globally by
using the string \type {global} as the first function argument.
+There is a dedicated getter for marks: \type {getmark} that takes two arguments.
+The first argument is one of \type {top}, \type {bottom}, \type {first}, \type
+{splitbottom} or \type {splitfirst}, and the second argument is a marks class
+number. When no arguments are given the current maximum number of classes is
+returned.
+
+When \type {tex.gettoks} gets an extra argument \type {true} it will return a
+table with userdata tokens.
+
\stopsubsection
\startsubsection[title={Character code registers: \type {[get|set]*code[s]}}]
@@ -1061,7 +863,7 @@ keep track of building page lists.
\DB field \BC explanation \NC \NR
\TB
\NC \type{page_ins_head} \NC circular list of pending insertions \NC \NR
-\NC \type{contrib_head} \NC the recent contributions \NC \NR
+\NC \type{contribute_head} \NC the recent contributions \NC \NR
\NC \type{page_head} \NC the current page content \NC \NR
%NC \type{temp_head} \NC \NC \NR
\NC \type{hold_head} \NC used for held-over items for next page \NC \NR
@@ -1120,7 +922,7 @@ The known fields are:
\NC \type{prevgraf} \NC number \NC vmode \NC number of lines in the previous paragraph \NC \NR
\NC \type{prevdepth} \NC number \NC vmode \NC depth of the previous paragraph \NC \NR
\NC \type{spacefactor} \NC number \NC hmode \NC the current space factor \NC \NR
-\NC \type{dirs} \NC node \NC hmode \NC used for temporary storage by the line break algorithm\NC \NR
+\NC \type{direction} \NC node \NC hmode \NC stack used for temporary storage by the line break algorithm \NC \NR
\NC \type{noad} \NC node \NC mmode \NC used for temporary storage of a pending fraction numerator,
for \prm {over} etc. \NC \NR
\NC \type{delimptr} \NC node \NC mmode \NC used for temporary storage of the previous math delimiter,
@@ -1524,14 +1326,15 @@ an error:
This function has two optional arguments in case a token register is passed:
\startfunctioncall
-tex.runtoks(<token register>,force,grouped)
+tex.runtoks(<token register>,force,grouped,obeymode)
\stopfunctioncall
Inside for instance an \type {\edef} the \type {runtoks} function behaves (at
least tries to) like it were an \type {\the}. This prevents unwanted side
effects: normally in such an definition tokens remain tokens and (for instance)
characters don't become nodes. With the second argument you can force the local
-main loop, no matter what. The third argument adds a level of grouping.
+main loop, no matter what. The third argument adds a level of grouping. The last
+argument tells the scanner to stay in the current mode.
You can quit the local loop with \type {\endlocalcontrol} or from the \LUA\ end
with \type {tex.quittoks}. In that case you end one level up! Of course in the
@@ -1657,20 +1460,6 @@ given by the requested string value(s). The possible values and their (current)
return values are given in the following table. In addition the somewhat special
primitives \quote{\tex{ }}, \quote{\tex {/}} and \quote{\type {-}} are defined.
-\startluacode
-function document.showprimitives(tag)
- local t = tex.extraprimitives(tag)
- table.sort(t)
- for i=1,#t do
- local v = t[i]
- if v ~= ' ' and v ~= "/" and v ~= "-" then
- context.type(v)
- context.space()
- end
- end
-end
-\stopluacode
-
\starttabulate[|l|pl|]
\DB name \BC values \NC \NR
\TB
@@ -1750,7 +1539,7 @@ The understood parameters are as follows:
\NC \type{exhyphenpenalty} \NC number \NC \NC \NR
\NC \type{pdfadjustspacing} \NC number \NC \NC \NR
\NC \type{adjdemerits} \NC number \NC \NC \NR
-\NC \type{pdfprotrudechars} \NC number \NC \NC \NR
+\NC \type{protrudechars} \NC number \NC \NC \NR
\NC \type{linepenalty} \NC number \NC \NC \NR
\NC \type{lastlinefit} \NC number \NC \NC \NR
\NC \type{doublehyphendemerits} \NC number \NC \NC \NR
@@ -1781,7 +1570,7 @@ horizontal mode):
\startitemize
\startitem
- add an \quote {indent box} and perhaps a \nod {local_par} node at the start
+ add an \quote {indent box} and perhaps a \nod {par} node at the start
(only if you need them)
\stopitem
\startitem
@@ -1969,8 +1758,8 @@ texio.write(<string> s, ...)
Without the \type {target} argument, writes all given strings to the same
location(s) \TEX\ writes messages to at this moment. If \prm {batchmode} is in
effect, it writes only to the log, otherwise it writes to the log and the
-terminal. The optional \type {target} can be one of three possibilities: \type
-{term}, \type {log} or \type {term and log}.
+terminal. The optional \type {target} can be one of \type {terminal},
+\type {logfile} or \type {terminal_and_logfile}.
Note: If several strings are given, and if the first of these strings is or might
be one of the targets above, the \type {target} must be specified explicitly to
@@ -2071,6 +1860,9 @@ most intriguing.
\LL
\stoptabulate
+The integer, dimension and glue scanners take an extra optional argument that
+signals that en optional equal is permitted.
+
The scanners can be considered stable apart from the one scanning for a token.
The \type {scan_code} function takes an optional number, the \type {scan_keyword}
function a normal \LUA\ string. The \type {infinity} boolean signals that we also
@@ -2080,14 +1872,19 @@ macro, in which case the result will also provide information about what
arguments are expected and in the result this is separated from the meaning by a
separator token. The \type {expand} flag determines if the list will be expanded.
+The \type {scan_argument} function expands the given argument. When a braced
+argument is scanned, expansion can be prohibited by passing \type {false}
+(default is \type {true}). In case of a control sequence passing \type {false}
+will result in a one|-|level expansion (the meaning of the macro).
+
The string scanner scans for something between curly braces and expands on the
way, or when it sees a control sequence it will return its meaning. Otherwise it
will scan characters with catcode \type {letter} or \type {other}. So, given the
following definition:
\startbuffer
-\def\bar{bar}
-\def\foo{foo-\bar}
+\def\oof{oof}
+\def\foo{foo-\oof}
\stopbuffer
\typebuffer \getbuffer
@@ -2108,7 +1905,9 @@ expanded definition (\prm {edef}'d). In the case of the braced variant one can o
course use the \prm {detokenize} and \prm {unexpanded} primitives since there we
do expand.
-The \type {scan_word} scanner can be used to implement for instance a number scanner:
+The \type {scan_word} scanner can be used to implement for instance a number
+scanner. An optional boolean argument can signal that a trailing space or \type
+{\relax} should be gobbled:
\starttyping
function token.scan_number(base)
@@ -2176,22 +1975,43 @@ a bit but for passing strings conversion to and from tokens has to be done anywa
\startsubsection[title={Picking up one token}]
-\libindex {get_next}
+\libindex {scan_next}
+\libindex {scan_next_expanded}
+\libindex {skip_next}
+\libindex {skip_next_expanded}
+\libindex {peek_next}
+\libindex {peek_next_expanded}
\libindex {scan_token}
\libindex {expand}
The scanners look for a sequence. When you want to pick up one token from the
-input you use \type {get_next}. This creates a token with the (low level)
+input you use \type {scan_next}. This creates a token with the (low level)
properties as discussed next. This token is just the next one. If you want to
-enforce expansion first you can use \type {scan_token}. Internally tokens are
-characterized by a number that packs a lot of information. In order to access
-the bits of information a token is wrapped in a userdata object.
+enforce expansion first you can use \type {scan_token} or the \type {_expanded}
+variants. Internally tokens are characterized by a number that packs a lot of
+information. In order to access the bits of information a token is wrapped in a
+userdata object.
The \type {expand} function will trigger expansion of the next token in the
input. This can be quite unpredictable but when you call it you probably know
enough about \TEX\ not to be too worried about that. It basically is a call to
the internal expand related function.
+\starttabulate[|lT|p|]
+\DB name \BC explanation \NC \NR
+\TB
+\NC scan_next \NC get the next token \NC \NR
+\NC scan_next_expanded \NC get the next expanded token \NC \NR
+\NC skip_next \NC skip the next token \NC \NR
+\NC skip_next_expanded \NC skip the next expanded token \NC \NR
+\NC peek_next \NC get the next token and put it back in the input \NC \NR
+\NC peek_next_expanded \NC get the next expanded token and put it back in the input \NC \NR
+\LL
+\stoptabulate
+
+The peek function accept a boolean argument that triggers skipping spaces and
+alike.
+
\stopsubsection
\startsubsection[title={Creating tokens}]
@@ -2216,8 +2036,10 @@ the internal expand related function.
\libindex{get_mode}
\libindex{get_index}
\libindex{get_tok}
+\libindex{get_frozen}
+\libindex{get_user}
-\libindex{get_next}
+\libindex{scan_next}
The creator function can be used as follows:
@@ -2241,8 +2063,9 @@ primitive. The possible properties of tokens are:
\NC \type {active} \NC a boolean indicating the active state of the token \NC \NR
\NC \type {expandable} \NC a boolean indicating if the token (macro) is expandable \NC \NR
\NC \type {protected} \NC a boolean indicating if the token (macro) is protected \NC \NR
-\NC \type {mode} \NC a number either representing a character or another entity \NC \NR
-\NC \type {index} \NC a number running from 0x0000 upto 0xFFFF indicating a \TEX\ register index \NC \NR
+\NC \type {frozen} \NC a boolean indicating if the token is a frozen command \NC \NR
+\NC \type {user} \NC a boolean indicating if the token is a user defined command \NC \NR
+\NC \type {index} \NC a number that indicated the subcommand; differs per command \NC \NR
\LL
\stoptabulate
@@ -2307,6 +2130,8 @@ need to know that boundary condition.
\libindex{set_char}
\libindex{set_lua}
\libindex{get_functions_table}
+\libindex{push_macro}
+\libindex{pop_macro}
The \type {set_macro} function can get upto 4 arguments:
@@ -2356,20 +2181,25 @@ that you can access with \type {lua.get_functions_table}. It is the companion
to \lpr {luadef}. When the first (and only) argument is true the size will preset
to the value of \type {texconfig.function_size}.
+The \type {push_macro} and \type {pop_macro} function are very experimental and
+can be used to get and set an existing macro. The push call returns a user data
+object and the pop takes such a userdata object. These object have no accessors
+and are to be seen as abstractions.
+
\stopsubsection
\startsubsection[title={Pushing back}]
-\libindex{get_next}
+\libindex{scan_next}
\libindex{put_next}
There is a (for now) experimental putter:
\starttyping
-local t1 = token.get_next()
-local t2 = token.get_next()
-local t3 = token.get_next()
-local t4 = token.get_next()
+local t1 = token.scan_next()
+local t2 = token.scan_next()
+local t3 = token.scan_next()
+local t4 = token.scan_next()
-- watch out, we flush in sequence
token.put_next { t1, t2 }
-- but this one gets pushed in front
@@ -2410,28 +2240,28 @@ When scanning for the next token you need to keep in mind that we're not scannin
like \TEX\ does: expanding, changing modes and doing things as it goes. When we
scan with \LUA\ we just pick up tokens. Say that we have:
-\pushmacro\bar \let\bar\undefined
+\pushmacro\oof \let\oof\undefined
\starttyping
-\bar
+\oof
\stoptyping
-but \type {\bar} is undefined. Normally \TEX\ will then issue an error message.
+but \type {\oof} is undefined. Normally \TEX\ will then issue an error message.
However, when we have:
\starttyping
-\def\foo{\bar}
+\def\foo{\oof}
\stoptyping
-We get no error, unless we expand \type {\foo} while \type {\bar} is still
+We get no error, unless we expand \type {\foo} while \type {\oof} is still
undefined. What happens is that as soon as \TEX\ sees an undefined macro it will
create a hash entry and when later it gets defined that entry will be reused. So,
-\type {\bar} really exists but can be in an undefined state.
+\type {\oof} really exists but can be in an undefined state.
\startbuffer[demo]
-bar : \directlua{tex.print(token.scan_csname())}\bar
+oof : \directlua{tex.print(token.scan_csname())}\oof
foo : \directlua{tex.print(token.scan_csname())}\foo
-myfirstbar : \directlua{tex.print(token.scan_csname())}\myfirstbar
+myfirstoof : \directlua{tex.print(token.scan_csname())}\myfirstoof
\stopbuffer
\startlines
@@ -2442,8 +2272,8 @@ This was entered as:
\typebuffer[demo]
-The reason that you see \type {bar} reported and not \type {myfirstbar} is that
-\type {\bar} was already used in a previous paragraph.
+The reason that you see \type {oof} reported and not \type {myfirstoof} is that
+\type {\oof} was already used in a previous paragraph.
If we now say:
@@ -2462,7 +2292,7 @@ we get:
And if we say
\startbuffer
-\def\foo{\bar}
+\def\foo{\oof}
\stopbuffer
\typebuffer \getbuffer
@@ -2477,9 +2307,9 @@ When scanning from \LUA\ we are not in a mode that defines (undefined) macros at
all. There we just get the real primitive undefined macro token.
\startbuffer
-\directlua{local t = token.get_next() tex.print(t.id.." "..t.tok)}\myfirstbar
-\directlua{local t = token.get_next() tex.print(t.id.." "..t.tok)}\mysecondbar
-\directlua{local t = token.get_next() tex.print(t.id.." "..t.tok)}\mythirdbar
+\directlua{local t = token.scan_next() tex.print(t.id.." "..t.tok)}\myfirstoof
+\directlua{local t = token.scan_next() tex.print(t.id.." "..t.tok)}\mysecondoof
+\directlua{local t = token.scan_next() tex.print(t.id.." "..t.tok)}\mythirdoof
\stopbuffer
\startlines
@@ -2494,7 +2324,7 @@ So, we do get a unique token because after all we need some kind of \LUA\ object
that can be used and garbage collected, but it is basically the same one,
representing an undefined control sequence.
-\popmacro\bar
+\popmacro\oof
\stopsubsection
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex
new file mode 100644
index 00000000000..1327ea3a14b
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex
@@ -0,0 +1,132 @@
+% ------------------------ ------------------------ ------------------------
+% 2019-12-17 32bit 64bit 2020-01-10 32bit 64bit 2020-11-30 32bit 64bit
+% ------------------------ ------------------------ ------------------------
+% freebsd 2270k 2662k freebsd 2186k 2558k freebsd 2108k 2436k
+% openbsd6.6 2569k 2824k openbsd6.6 2472k 2722k openbsd6.8 2411k 2782k
+% linux-armhf 2134k linux-armhf 2063k linux-armhf 2138k 2860k
+% linux 2927k 2728k linux 2804k 2613k linux (?) 3314k 2762k
+% linux-musl 2532k 2686k
+% osx 2821k osx 2732k osx 2711k
+% ms mingw 2562k 2555k ms mingw 2481k 2471k ms mingw 2754k 2760k
+% ms intel 2448k
+% ms arm 3894k
+% ms clang 2159k
+% ------------------------ ------------------------ ------------------------
+%
+% performance of mingw and native are getting close (small win for mingw) but
+% clang bins are still slower .. quite inconsistent differences between 32 and
+% 64 bit (not all compilers are the same version)
+
+% \loggingall
+% \tracingonline \zerocount
+% \tracingmacros \plusone
+
+% \enableautoglyphscaling % saves only a few instances ... no gain .. a few pages more
+
+% \enabletexdirective{vspacing.experimental}
+
+% \nopdfcompression
+
+% 20200509 : 258 pages
+%
+% my 2013 i7 laptop with windows : 11.8 sec mingw64
+% raspberry pi 64 bit with ssd : 39.5 sec gcc 9.2
+% idem with native bin : 38.5 sec
+% idem overclocked f=2000/v=6 : 31.5 sec
+%
+% 20200526 : 258 pages
+% mingw all in: 10.9 / rpi 32 bit: 33.1
+
+% 20200610 : 258 pages
+% mingw all in: 10.6
+
+% 20201204 : 260 pages
+% mingw all in: 10.0
+
+% 20201204 : 262 pages
+% mingw all in: 9.9
+
+% 20200720 : 258 pages / all in
+%
+% mingw : 10.6 (sometimes less)
+% rpi 32 : 32.3
+% rpi 64 : 26.0 (overclocked)
+% amd 10 fitlet : 28.2
+
+% But speed can differ a bit per compilation (upto .5 seconds maybe due to how
+% compiled code is organized which might influence caching. Who knows ... (or
+% cares). For instance at 20200407 I measured 10.9 seconds after some new low level
+% metapost magic was added but who knows if that was the reason, because mp
+% processing is already fast. A week later, at 20200415, a by then 254 page file
+% took 10.5 seconds, that is, we were at exactly 24 pages per second but after
+% switching to gcc9 it dropped again. In december 2020, with IPO enabled I crossed
+% the 26 pps barrier and went below 10 seconds but that was also after some further
+% cleanup in \LMTX.
+
+% msvc 1899k (2% slower than mingw)
+% msvc /GL 2297k (similar to mingw)
+% msvc /GL /Ob3 2847k (not faster than /GL)
+% msvc /Ob3 2052k (slower than /Ob2)
+% msvc /Ob1 1763k (slower than /Ob2)
+% clang 2460k (15% slower than mingw)
+
+% Thanks to sebastian.miele@gmail.com for close reading the manual and sending
+% fixes.
+
+% \listcallbackmode0
+
+% 290 pages, 10.8 sec, 292M lua, 99M tex, 158 instances
+% 290 pages, 9.5 sec, 149M lua, 35M tex, 30 instances
+
+\enableexperiments[fonts.compact]
+% \enabledirectives[fonts.injections.method=advance] % tricky ... not all xoffsets are advance robust
+
+\pushoverloadmode \unprotect
+ % test code
+\protect \popoverloadmode
+
+\enabletrackers[system.usage=summary]
+
+\environment luametatex-style
+\environment luametatex-private
+
+\startdocument
+ [manual=LuaMeta\TeX,
+ %status=experimental,
+ version=\cldcontext{status.luatex_verbose}]
+
+\component luametatex-titlepage
+\component luametatex-firstpage
+
+\startfrontmatter
+ \component luametatex-contents
+ \component luametatex-introduction
+\stopfrontmatter
+
+\startbodymatter
+ \component luametatex-preamble
+ \component luametatex-differences
+ \component luametatex-modifications
+ \component luametatex-lua
+ \component luametatex-enhancements
+ \component luametatex-fonts
+ \component luametatex-languages
+ \component luametatex-math
+ \component luametatex-nodes
+ \component luametatex-callbacks
+ \component luametatex-tex
+ \component luametatex-metapost
+ \component luametatex-pdf
+ \component luametatex-libraries
+ \component luametatex-primitives
+\stopbodymatter
+
+\startbackmatter
+ % \component luametatex-rejected % local file
+ \component luametatex-codes
+ \component luametatex-registers
+ \component luametatex-statistics
+\stopbackmatter
+
+\stopdocument
+
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
index b81e1dbdae5..537961661f5 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
@@ -1266,6 +1266,29 @@ related primitives.
\stopsubsection
+\startsubsection[title={\prm {glyphdimensionsmode}}]
+
+Already in the early days of \LUATEX\ the decision was made to calculate the
+effective height and depth of glyphs in a way that reflected the applied vertical
+offset. The height got that offset added, the depth only when the offset was
+larger than zero. We can now control this in more detail with this mode
+parameter. An offset is added to the height and|/|or subtracted from the depth.
+The effective values are never negative. The zero mode is the default.
+
+\starttabulate[|l|pl|]
+\DB value \BC effect \NC\NR
+\TB
+\NC \type {0} \NC the old behaviour: add the offset to the height and only subtract
+ the offset only from the depth when it is positive \NC \NR
+\NC \type {1} \NC add the offset to the height and subtract it from the depth \NC \NR
+\NC \type {2} \NC add the offset to the height and subtract it from the depth but
+ keep the maxima of the current and previous results \NC \NR
+\NC \type {3} \NC use the height and depth of the glyph, so no offset is applied \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
\stopsection
\startsection[title={Control and debugging}]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
index 400550a96dd..e944b2c5b56 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
@@ -861,6 +861,27 @@ value is the index in \type {font.fonts}, the second the font itself, as a \LUA\
table. The indices are listed incrementally, but they do not always form an array
of consecutive numbers: in some cases there can be holes in the sequence.
+\startsubsection[title={\type{\glyphdimensionsmode}}]
+
+Already in the early days of \LUATEX\ the decision was made to calculate the
+effective height and depth of glyphs in a way that reflected the applied vertical
+offset. The height got that offset added, the depth only when the offset was
+larger than zero. We can now control this in more detail with this mode
+parameter. An offset is added to the height and|/|or subtracted from the depth.
+The effective values are never negative. The zero mode is the default.
+
+\starttabulate[|l|pl|]
+\DB value \BC effect \NC\NR
+\TB
+\NC \type {0} \NC the old behavior: add the offset to the height and only subtract
+ the offset only from the depth when it is positive \NC \NR
+\NC \type {1} \NC add the offset to the height and subtract it from the depth \NC \NR
+\NC \type {2} \NC add the offset to the height and subtract it from the depth but
+ keep the maxima of the current and previous results \NC \NR
+\NC \type {3} \NC use the height and depth of the glyph, so no offset is applied \NC \NR
+\LL
+\stoptabulate
+
\stopsection
\stopchapter
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex
index f9107fa1f96..625334c1b8a 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex
@@ -608,6 +608,10 @@ in addition to the regular \type {io} library functions.
\NC \type{readbytetable(f,n)} \NC \type {n} bytes\NC \NR
\stoptabulate
+There are eight additional little endian variants for the \type {cardinal[1-4]}
+and \type {integer[1-4]} readers: \type {cardinal[1-4]le} and \type
+{integer[1-4]le}.
+
\stopsubsection
\startsubsection[title={Binary input from strings with \type {sio}}]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-math.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-math.tex
index 4623ce706d7..89c0836ba76 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-math.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-math.tex
@@ -1242,6 +1242,31 @@ $\Uhextensible width 1pt middle 0 "2194$
font metrics are involved we have a different code path for traditional fonts end
\OPENTYPE\ fonts.
+Sometimes you might want to act upon the size of a delimiter, something that is
+not really possible because of the fact that they are calculated {\em after} most
+has been typeset already. In the following example the all|-|zero specification
+is the trigger to make a fake box with the last delimiter dimensions and shift.
+It's an ugly hack but its relative simple and not intrusive implementation has no
+side effects. Any other heuristic solution would not satisfy possible demands
+anyway. Here is a rather low level example:
+
+\startbuffer
+\startformula
+\Uleft \Udelimiter 5 0 "222B
+\frac{\frac{a}{b}}{\frac{c}{d}}
+\Uright \Udelimiter 5 0 "222B
+\kern-2\fontcharwd\textfont0 "222B
+\mathlimop{\Uvextensible \Udelimiter 0 0 0}_1^2 x
+\stopformula
+\stopbuffer
+
+\typebuffer
+
+The last line, by passing zero values, results in a fake operator that has the
+dimensions of the previous delimiter. We can then backtrack over the (presumed)
+width and the two numbers become limit operators. As said, it's not pretty but it
+works.
+
\subsection{Fractions}
\topicindex {math+fractions}
@@ -1306,6 +1331,9 @@ For Latin Modern the result looks as follows:
\stoptabulate
\stop
+The keyword \type {norule} will hide the rule with the above variants while
+keeping the rule related spacing.
+
\subsection {Delimiters: \type{\Uleft}, \prm {Umiddle} and \prm {Uright}}
\topicindex {math+delimiters}
@@ -1454,7 +1482,7 @@ $
$
\stopbuffer
-\typebuffer
+\typebuffer[script]
results in \inlinebuffer[script].
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
index 747945f55f7..bf4233165b9 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
@@ -615,6 +615,8 @@ primitives (for as far their functionality is still around) you now can do this:
\protected\def\pdfmapline {\pdfextension mapline }
\protected\def\pdftrailer {\pdfextension trailer }
\protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+\protected\def\pdfrunninglinkoff {\pdfextension linkstate 1 }
+\protected\def\pdfrunninglinkon {\pdfextension linkstate 0 }
\stoptyping
The introspective primitives can be defined as:
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index 21e8a2808fe..a379b7b0a4d 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -1935,8 +1935,8 @@ character protrusion is active, this node can be skipped.
\libindex {setglue}
-You can set the properties of a glue in one go. If you pass no values, the glue
-will become a zero glue.
+You can set the five properties of a glue in one go. Non|-|numeric values are
+equivalent to zero and reset a property.
\startfunctioncall
node.setglue(<node> n)
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex
index 5a98f224379..46739513a60 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -1,4 +1,4 @@
-% macros=mkvi
+% macros=mkvi engine=luatex
% \nopdfcompression
@@ -23,6 +23,13 @@
% comment : Some (parts of) chapters might have been published in TugBoat, the NTG Maps, the
% ConTeXt Group journal or otherwise. Thanks to the editors for corrections. Also
% thanks to users for testing, feedback and corrections.
+%
+% comment : Of course specific distribution can add to the manual, but that is of course not
+% our responsibility. The official (latest) version of this manual is part of the
+% ConTeXt distribution, including a pdf file that is produced with the current
+% version of ConTeXt. So, in case of doubt use that one as reference. Some of the
+% improvements in the LuaMetaTeX manual that apply to LuaTeX might get retrofitted
+% in LuaTeX manual in due time.
% \tex vs \type vs \syntax vs. \luatex
% \em \it \/
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/mathml/envexamp.tex b/Master/texmf-dist/doc/context/sources/general/manuals/mathml/envexamp.tex
index 99bc72b8a6e..8a2b4e2df55 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/mathml/envexamp.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/mathml/envexamp.tex
@@ -219,7 +219,7 @@
\startsubsection[reference=#1,title=#1,marking=#1][filename=#1]
\switchtobodyfont
[8pt]
- \startcolumns[balance=no,n=\getvariable{document}{columns}]
+ \startcolumns[balance=no,n=\documentvariable{columns}]
\typefile{#1.xml}
\stopcolumns
\vfill
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/mcommon.tex b/Master/texmf-dist/doc/context/sources/general/manuals/mcommon.tex
index d4c2acb53b8..57ab24a8d97 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/mcommon.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/mcommon.tex
@@ -167,7 +167,7 @@
[rotation=90]
{\color
[lightgray]
- {\getvariable{document}{title}}}
+ {\documentvariable{title}}}
\par
\stopstandardmakeup
\setupbackgrounds
@@ -179,9 +179,9 @@
\blank[2*big]
\testpage[3]
\startpacked
- \getvariable{document}{author}\par
- \getvariable{document}{affiliation}\par
- \getvariable{document}{location}\par
+ \documentvariable{author}\par
+ \documentvariable{affiliation}\par
+ \documentvariable{location}\par
\stoppacked
\stopsetups
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp
new file mode 100644
index 00000000000..5076c729ae1
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/gracht.mp
@@ -0,0 +1,1284 @@
+% 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@uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 1999 Wolfgang Glunz <wglunz@geocities.com>
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+beginfig(1);
+drawoptions (withcolor (0.8,0.9,1));
+linecap := butt;
+linejoin := mitered;
+fill (34.0598,214.47)--(286.57,214.47)--(285.2,72.9199)
+ --(38.1699,83.8599)--(34.0598,214.47)--cycle;
+drawoptions (withcolor (0.95,0.95,0.95));
+fill (62,152.91)..controls (62,152.91) and (74.24,150.18)..(77.6199,152.91)
+ ..controls (81.0798,155.65) and (98.0698,152.91)..(98.0698,152.91)
+ ..controls (98.0698,152.91) and (106.21,148.81)..(111.68,148.81)
+ ..controls (117.15,148.81) and (130.76,147.37)..(130.76,147.37)
+ --(134.86,140.53)..controls (134.86,140.53) and (130.11,139.88)..(123.92,139.88)
+ ..controls (117.8,139.88) and (98.72,139.23)..(98.72,139.23)
+ --(82.3799,139.23)--(72.1499,145.35)--(64.0198,147.37)
+ --(62,152.91)--cycle;
+drawoptions (withcolor (0.9,0.9,0.9));
+fill (202.11,112.52)--(200.82,126.85)--(184.47,117.99)
+ --(170.86,116.62)--(150.42,117.34)--(141.63,114.61)
+ --(104.19,115.26)--(87.1299,115.26)--(69.49,113.17)
+ --(74.96,107.77)--(106.21,108.42)--(140.98,108.42)
+ --(147.03,110.5)--(165.39,110.5)--(164.74,104.38)
+ --(172.88,103.74)--(285.92,79.0398)--(285.2,98.9099)
+ --(271.59,100.93)--(202.11,112.52)--cycle;
+drawoptions (withcolor (1,0.4,0.4));
+fill (285.92,193.23)--(259.78,193.23)--(259.78,188.7)
+ --(277.35,148.88)--(285.92,155.72)--(285.92,193.23)
+ --cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (285.92,193.23)--(259.78,193.23)--(259.78,188.7)
+ --(277.35,148.88)--(285.92,155.72)--(285.92,193.23);
+drawoptions (withcolor (1,0.9,0.9));
+pickup pencircle scaled 0bp;
+fill (231.85,165.66)--(235.95,169.69)--(246.75,170.62)
+ --(273.32,149.82)--(272.89,101)--(235.02,107.34)
+ --(231.85,165.66)--cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 0.86bp;
+draw (231.85,165.66)--(235.95,169.69)--(246.75,170.62)
+ --(273.32,149.82)--(272.89,101)--(235.02,107.34)
+ --(231.85,165.66);
+drawoptions (withcolor (0,0.5,0));
+pickup pencircle scaled 0bp;
+fill (178.28,133.26)..controls (178.28,133.26) and (175.98,132.39)..(175.11,130.09)
+ ..controls (174.25,127.78) and (172.38,125.62)..(172.38,125.62)
+ ..controls (172.38,125.62) and (170.86,124.47)..(170,121.88)
+ ..controls (169.21,119.36) and (168.99,119.14)..(168.99,118.06)
+ ..controls (168.99,116.98) and (169.21,116.19)..(170.43,116.41)
+ ..controls (171.73,116.55) and (172.81,117.63)..(172.81,117.63)
+ --(175.33,116.84)..controls (175.33,116.84) and (175.9,116.62)..(177.42,117.85)
+ ..controls (178.86,119.14) and (179.29,121.52)..(179.72,120.22)
+ ..controls (180.15,118.93) and (179.94,119.58)..(180.73,118.06)
+ ..controls (181.59,116.55) and (183.03,115.98)..(184.11,116.41)
+ ..controls (185.19,116.84) and (184.47,115.69)..(185.55,117.2)
+ ..controls (186.63,118.71) and (185.19,122.74)..(185.19,122.74)
+ --(182.24,132.39)--(178.28,133.26)--cycle;
+drawoptions (withcolor (0,0.6,0));
+fill (203.19,132.82)..controls (207.44,132.82) and (198.58,125.84)..(194.55,123.61)
+ ..controls (190.45,121.3) and (188.65,115.04)..(184.11,120.87)
+ ..controls (179.65,126.7) and (184.54,132.61)..(180.51,133.04)
+ ..controls (176.48,133.54) and (177.85,132.18)..(174.68,133.54)
+ ..controls (171.51,134.84) and (172.45,140.31)..(172.45,140.31)
+ ..controls (172.45,140.31) and (175.98,145.71)..(177.42,148.88)
+ ..controls (178.78,152.05) and (177.42,152.91)..(177.85,155.22)
+ ..controls (178.28,157.52) and (181.02,159.32)..(181.02,159.32)
+ --(190.02,158.82)--(192.25,162.78)..controls (192.25,162.78) and (196.78,162.92)..(199.02,161.12)
+ ..controls (201.25,159.32) and (201.25,156.58)..(201.25,156.58)
+ --(203.98,155.22)--(203.55,147.58)--(201.68,143.12)
+ ..controls (201.68,143.12) and (201.82,139.95)..(203.19,137.72)
+ ..controls (204.56,135.42) and (202.76,132.82)..(203.19,132.82)
+ --cycle;
+drawoptions (withcolor (0.8,0.8,0.8));
+fill (1.37988,135.34)--(63.9399,129.01)--(67.98,114.97)
+ --(73.8799,108.63)--(57.6799,89.26)--(0.869873,46.2798)
+ --(1.37988,135.34)--cycle;
+drawoptions (withcolor (0,0.6,0));
+fill (141.27,120.87)..controls (140.84,121.23) and (143.65,122.46)..(139.62,123.32)
+ ..controls (135.51,124.26) and (134.65,122.67)..(129.25,122.67)
+ ..controls (123.85,122.67) and (124.28,120.87)..(122.05,122.67)
+ ..controls (119.82,124.47) and (119.38,126.27)..(115.28,126.27)
+ ..controls (111.25,126.27) and (109.45,126.7)..(106.78,124.9)
+ ..controls (104.05,123.1) and (102.68,123.1)..(100.45,123.1)
+ ..controls (98.22,123.1) and (96.3398,123.18)..(93.6799,123.61)
+ ..controls (91.0198,124.04) and (88.7798,124.47)..(86.0498,124.9)
+ ..controls (83.3098,125.41) and (80.5798,125.84)..(77.9099,125.41)
+ ..controls (75.25,124.9) and (70.2798,124.47)..(66.6799,124.9)
+ ..controls (63.0798,125.41) and (60.3398,127.21)..(57.1799,125.41)
+ ..controls (54.0798,123.61) and (49.1099,123.61)..(49.1099,123.61)
+ --(44.1399,122.67)--(45.0798,115.9)..controls (45.0798,115.9) and (43.2798,113.6)..(49.5398,113.6)
+ ..controls (55.8799,113.6) and (58.98,113.6)..(64.8799,113.6)
+ ..controls (70.71,113.6) and (69.4199,112.66)..(76.1099,114.03)
+ ..controls (82.8799,115.47) and (86.98,115.47)..(91.8799,115.47)
+ ..controls (96.8499,115.47) and (100.88,114.97)..(105.85,114.97)
+ ..controls (110.82,114.97) and (112.62,114.97)..(118.02,114.97)
+ ..controls (123.42,114.97) and (125.22,114.54)..(136.02,114.54)
+ ..controls (146.74,114.54) and (146.74,115.9)..(146.74,115.9)
+ --(145.88,120.37)--(141.27,120.87)--cycle;
+drawoptions (withcolor (0.5,0.5,0.5));
+fill (5.83984,98.26)--(27.5098,109.14)--(46.3799,113.6)
+ --(70.2798,114.03)--(74.3098,109.57)--(49.5398,105.54)
+ --(0.869873,67.95)--(5.83984,98.26)--cycle;
+drawoptions (withcolor (0.8,0.3,0));
+fill (105.85,108.2)--(106.78,85.23)--(73.8799,84.2998)
+ --(66.25,38.1399)--(36.7998,1.05981)--(0.72998,1.05981)
+ --(0.869873,49.8799)..controls (0.869873,49.8799) and (24.7798,67.0898)..(36.0798,74.7898)
+ ..controls (47.3098,82.5) and (70.2798,104.6)..(72.5098,107.34)
+ ..controls (74.74,110) and (77.48,108.2)..(77.48,108.2)
+ --(105.85,108.2)--cycle;
+drawoptions (withcolor (0.6,0.3,0));
+fill (75.25,107.77)--(105.85,107.77)--(105.85,85.23)
+ --(75.25,85.23)--(75.25,107.77)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (75.25,107.77)--(105.85,107.77)--(105.85,85.23)
+ --(75.25,85.23)--(75.25,107.77);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 2.23bp;
+draw (118.59,71.1899)--(117.22,61.8999);
+drawoptions (withcolor (0.9,0.95,1));
+pickup pencircle scaled 0bp;
+fill (266.48,1.56982)--(267.34,45.9199)--(158.84,82.3499)
+ --(149.26,81.2)--(144.15,86.3098)--(140.84,107.77)
+ --(104.84,107.26)--(105.92,86.3098)--(114.92,40.45)
+ --(55.5898,38.5798)--(37.23,0.849854)--(266.48,1.56982)
+ --cycle;
+drawoptions (withcolor (0,0.2,1));
+fill (55.1599,40.0898)--(113.98,37.21)--(153.94,25.8999)
+ ..controls (153.94,25.8999) and (123.42,17.8398)..(145.88,14.6699)
+ ..controls (168.34,11.4299) and (158.91,11)..(152.65,7.3999)
+ ..controls (146.31,3.7998) and (118.95,1.05981)..(113.48,1.05981)
+ ..controls (108.08,1.05981) and (35.6499,1.05981)..(35.6499,1.05981)
+ --(55.1599,40.0898)--cycle;
+drawoptions (withcolor (1,0.7,0));
+fill (146.96,157.59)--(149.77,157.59)--(149.77,118.06)
+ --(146.96,118.06)--(146.96,157.59)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (146.96,157.59)--(149.77,157.59)--(149.77,118.06)
+ --(146.96,118.06)--(146.96,157.59);
+drawoptions (withcolor (1,0.7,0));
+pickup pencircle scaled 0bp;
+fill (109.16,161.05)--(180.37,158.53)--(176.41,154.86)
+ --(108.66,157.3)--(109.16,161.05)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (109.16,161.05)--(180.37,158.53)--(176.41,154.86)
+ --(108.66,157.3)--(109.16,161.05);
+drawoptions (withcolor (1,0.9,0));
+pickup pencircle scaled 0bp;
+fill (107.65,166.74)--(192.18,162.27)--(189.94,159.54)
+ --(108.15,162.99)--(107.65,166.74)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (107.65,166.74)--(192.18,162.27)--(189.94,159.54)
+ --(108.15,162.99)--(107.65,166.74);
+drawoptions (withcolor (1,0.9,0));
+pickup pencircle scaled 0bp;
+fill (149.77,163.86)--(153.8,163.86)--(153.8,110.07)
+ --(149.77,110.07)--(149.77,163.86)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (149.77,163.86)--(153.8,163.86)--(153.8,110.07)
+ --(149.77,110.07)--(149.77,163.86);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 2.23bp;
+draw (112.26,165.3)--(104.77,109.14);
+draw (109.59,159.82)--(102.75,116.62);
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (153.73,150.61)--(163.38,129.3);
+draw (153.51,140.17)--(163.09,124.33);
+drawoptions (withcolor (0,0.2,1));
+pickup pencircle scaled 0bp;
+fill (162.58,130.74)--(168.99,130.74)--(168.99,114.9)
+ --(162.58,114.9)--(162.58,130.74)--cycle;
+drawoptions (withcolor (0,0.4,1));
+fill (153.22,123.1)--(162.58,123.1)--(162.58,115.9)
+ --(153.22,115.9)--(153.22,123.1)--cycle;
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0.86bp;
+draw (101.89,117.92)--(149.05,117.42);
+pickup pencircle scaled 2.02bp;
+draw (103.98,113.46)--(150.56,113.67);
+pickup pencircle scaled 0bp;
+fill (102.25,109.71)--(146.82,109.71)--(146.82,107.77)
+ --(102.25,107.77)--(102.25,109.71)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (102.25,109.71)--(146.82,109.71)--(146.82,107.77)
+ --(102.25,107.77)--(102.25,109.71);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (90.4399,158.02)--(92.1699,158.02)--(92.1699,117.92)
+ --(90.4399,117.92)--(90.4399,158.02)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (90.4399,158.02)--(92.1699,158.02)--(92.1699,117.92)
+ --(90.4399,117.92)--(90.4399,158.02);
+drawoptions (withcolor (0,0,0));
+draw (161.86,94.8799)--(164.1,94.8799)--(164.1,92.22)
+ --(161.86,92.22)--(161.86,94.8799);
+drawoptions (withcolor (0.8,0.3,0));
+pickup pencircle scaled 0bp;
+fill (147.32,104.1)--(149.05,104.1)--(149.05,87.97)
+ --(147.32,87.97)--(147.32,104.1)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (147.32,104.1)--(149.05,104.1)--(149.05,87.97)
+ --(147.32,87.97)--(147.32,104.1);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (148.54,104.6)--(150.27,104.6)--(150.27,87.6799)
+ --(148.54,87.6799)--(148.54,104.6)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (148.54,104.6)--(150.27,104.6)--(150.27,87.6799)
+ --(148.54,87.6799)--(148.54,104.6);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (141.2,107.55)--(147.1,107.55)--(147.1,87.25)
+ --(141.2,87.25)--(141.2,107.55)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (141.2,107.55)--(147.1,107.55)--(147.1,87.25)
+ --(141.2,87.25)--(141.2,107.55);
+drawoptions (withcolor (0,0.75,1));
+pickup pencircle scaled 0bp;
+fill (141.49,88.1799)--(153.58,88.1799)--(161.22,81.99)
+ --(143.22,81.2)--(141.49,88.1799)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (141.49,88.1799)--(153.58,88.1799)--(161.22,81.99)
+ --(143.22,81.2)--(141.49,88.1799);
+drawoptions (withcolor (1,0.4,0));
+pickup pencircle scaled 0bp;
+fill (146.53,110.22)--(165.1,110.22)--(165.1,103.09)
+ --(162.8,103.09)--(152.94,87.97)--(147.32,87.97)
+ --(146.53,110.22)--cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 0.86bp;
+draw (146.53,110.22)--(165.1,110.22)--(165.1,103.09)
+ --(162.8,103.09)--(152.94,87.97)--(147.32,87.97)
+ --(146.53,110.22);
+drawoptions (withcolor (1,0.5,0));
+pickup pencircle scaled 0bp;
+fill (285.92,78.3899)--(163.09,104.31)--(152.43,88.6899)
+ --(160.57,82.5)..controls (160.57,82.5) and (165.39,79.76)..(175.62,74.2898)
+ ..controls (185.84,68.8198) and (187.86,71.5498)..(192.61,67.45)
+ ..controls (197.36,63.3398) and (215.65,62.0498)..(215.65,62.0498)
+ --(285.63,30.6599)--(285.92,78.3899)--cycle;
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0.86bp;
+draw (285.92,78.3899)--(163.09,104.31)--(152.43,88.6899)
+ --(160.57,82.5)..controls (160.57,82.5) and (165.39,79.76)..(175.62,74.2898)
+ ..controls (185.84,68.8198) and (187.86,71.5498)..(192.61,67.45)
+ ..controls (197.36,63.3398) and (215.65,62.0498)..(215.65,62.0498)
+ --(285.63,30.6599)--(285.92,78.3899);
+drawoptions (withcolor (0.2,0.9,0.2));
+pickup pencircle scaled 0bp;
+fill (40.1799,214.47)..controls (47.6699,214.47) and (37.0198,202.59)..(40.3999,195.82)
+ ..controls (43.7798,188.98) and (41.0498,194.46)..(47.8899,187.62)
+ ..controls (54.6599,180.78) and (59.4099,178.76)..(59.4099,173.29)
+ ..controls (59.4099,167.82) and (59.4099,166.45)..(60.1299,159.61)
+ ..controls (60.7798,152.77) and (64.8098,145.93)..(65.5298,141.82)
+ ..controls (66.25,137.79) and (68.98,134.34)..(66.25,130.95)
+ ..controls (63.5098,127.57) and (62.7898,127.57)..(52.6399,127.57)
+ ..controls (42.49,127.57) and (42.49,130.3)..(33.6299,125.48)
+ ..controls (24.7798,120.73) and (25.5,116.62)..(18.6599,120.73)
+ ..controls (11.8899,124.76) and (1.65991,128.22)..(1.65991,128.22)
+ --(1.37988,214.47)--(40.1799,214.47)--cycle;
+drawoptions (withcolor (0,0.5,1));
+fill (122.41,51.8999)..controls (122.41,51.8999) and (121.76,52.47)..(120.25,49.3799)
+ ..controls (118.66,46.21) and (118.66,44.3398)..(115.86,39.9399)
+ ..controls (113.05,35.48) and (114.27,36.49)..(110.53,32.6699)
+ ..controls (106.71,28.9299) and (109.38,32.3799)..(104.34,28.9299)
+ ..controls (99.2998,25.47) and (94.2598,26.3398)..(89.7898,26.7)
+ ..controls (85.3999,26.98) and (76.6199,25.1799)..(72.8699,27.3398)
+ ..controls (69.1299,29.5798) and (67.8999,30.51)..(65.74,34.26)
+ ..controls (63.5798,38) and (63.5798,38)..(61.71,41.46)
+ ..controls (59.8398,44.9099) and (59.3398,48.5798)..(58.2598,50.3098)
+ --(54.8699,55.6399)--(122.41,51.8999)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 1.44bp;
+draw (122.41,51.8999)..controls (122.41,51.8999) and (121.76,52.47)..(120.25,49.3799)
+ ..controls (118.66,46.21) and (118.66,44.3398)..(115.86,39.9399)
+ ..controls (113.05,35.48) and (114.27,36.49)..(110.53,32.6699)
+ ..controls (106.71,28.9299) and (109.38,32.3799)..(104.34,28.9299)
+ ..controls (99.2998,25.47) and (94.2598,26.3398)..(89.7898,26.7)
+ ..controls (85.3999,26.98) and (76.6199,25.1799)..(72.8699,27.3398)
+ ..controls (69.1299,29.5798) and (67.8999,30.51)..(65.74,34.26)
+ ..controls (63.5798,38) and (63.5798,38)..(61.71,41.46)
+ ..controls (59.8399,44.9099) and (59.3398,48.5798)..(58.2598,50.3098)
+ --(54.8699,55.6399)--(122.41,51.8999);
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (202.04,156.87)--(200.53,112.81)--(234.87,107.26)
+ --(233.29,167.1)--(202.04,156.87);
+drawoptions (withcolor (1,0.25,0.25));
+pickup pencircle scaled 0bp;
+fill (246.9,189.63)--(223.06,177.32)--(202.76,160.26)
+ --(230.55,170.55)--(246.9,189.63)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (246.9,189.63)--(223.06,177.32)--(202.76,160.26)
+ --(230.55,170.55)--(246.9,189.63);
+drawoptions (withcolor (1,0.4,0.4));
+pickup pencircle scaled 0bp;
+fill (246.25,188.98)--(230.98,170.62)--(274.76,169.83)
+ --(246.25,188.98)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (246.25,188.98)--(230.98,170.62)--(274.76,169.83)
+ --(246.25,188.98);
+drawoptions (withcolor (0.3,1,0.3));
+pickup pencircle scaled 0bp;
+fill (255.75,122.1)..controls (252.3,122.1) and (253.02,121.45)..(248.26,125.48)
+ ..controls (243.51,129.58) and (242.79,126.2)..(239.41,135.06)
+ ..controls (236.02,143.91) and (234.01,141.18)..(234.66,148.66)
+ ..controls (235.3,156.22) and (230.62,155.5)..(236.02,163.06)
+ ..controls (241.42,170.55) and (240.13,166.45)..(245.53,174.66)
+ ..controls (251,182.79) and (250.28,185.53)..(255.03,186.9)
+ ..controls (259.78,188.26) and (258.49,194.38)..(264.61,186.9)
+ ..controls (270.66,179.41) and (271.3,174.58)..(276.06,173.94)
+ ..controls (280.88,173.29) and (282.25,175.95)..(282.25,167.82)
+ ..controls (282.25,159.61) and (282.9,154.86)..(277.5,149.38)
+ ..controls (272.02,143.91) and (267.27,145.28)..(266.55,137.07)
+ ..controls (265.9,128.86) and (266.55,124.83)..(263.17,124.11)
+ ..controls (259.78,123.39) and (255.75,122.1)..(255.75,122.1)
+ --cycle;
+drawoptions (withcolor (0.8,0.3,0));
+fill (270.66,52.47)--(276.78,52.47)--(276.78,0.629883)
+ --(270.66,0.629883)--(270.66,52.47)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (270.66,52.47)--(276.78,52.47)--(276.78,0.629898)
+ --(270.66,0.629898)--(270.66,52.47);
+drawoptions (withcolor (0.9,0,0));
+pickup pencircle scaled 0bp;
+fill (90.5798,158.02)--(92.0198,158.02)--(92.0198,152.84)
+ --(90.5798,152.84)--(90.5798,158.02)--cycle;
+fill (90.5798,147.66)--(92.0198,147.66)--(92.0198,142.47)
+ --(90.5798,142.47)--(90.5798,147.66)--cycle;
+fill (90.5798,137.43)--(92.0198,137.43)--(92.0198,132.25)
+ --(90.5798,132.25)--(90.5798,137.43)--cycle;
+fill (90.5798,128.14)--(92.0198,128.14)--(92.0198,122.96)
+ --(90.5798,122.96)--(90.5798,128.14)--cycle;
+drawoptions (withcolor (1,0.9,0));
+fill (203.34,160.98)--(200.53,160.98)--(199.38,155.29)
+ --(233.22,167.17)--(236.02,169.98)--(230.34,169.98)
+ --(203.34,160.98)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (203.34,160.98)--(200.53,160.98)--(199.38,155.29)
+ --(233.22,167.17)--(236.02,169.98)--(230.34,169.98)
+ --(203.34,160.98);
+drawoptions (withcolor (1,1,0.7));
+pickup pencircle scaled 0bp;
+fill (232.14,166.59)--(235.52,107.77)--(202.11,112.52)
+ --(202.83,155.65)--(232.14,166.59)--cycle;
+drawoptions (withcolor (0.8,0.8,0.8));
+pickup pencircle scaled 0.22bp;
+draw (232.14,166.59)--(235.52,107.77)--(202.11,112.52)
+ --(202.83,155.65)--(232.14,166.59);
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (214.42,156.3)--(214.42,145.35)--(217.81,146.07)
+ --(217.16,157.66)--(214.42,156.3);
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 1.44bp;
+draw (219.9,133.04)--(219.75,109.86)--(230.77,108.42)
+ --(230.12,133.04)--(219.9,133.04);
+drawoptions (withcolor (0,0.8,0));
+pickup pencircle scaled 0bp;
+fill (212.34,118.64)..controls (217.16,122.1) and (219.82,117.34)..(221.19,126.2)
+ ..controls (222.56,135.13) and (224.65,137.86)..(221.91,141.25)
+ ..controls (219.18,144.7) and (213.06,146.07)..(213.06,146.07)
+ ..controls (213.06,146.07) and (213.7,152.26)..(208.3,149.46)
+ ..controls (202.83,146.72) and (196.06,153.42)..(196.06,145.93)
+ ..controls (196.06,138.37) and (200.1,135.13)..(203.55,131.67)
+ ..controls (206.94,128.29) and (206.22,127.57)..(207.58,124.18)
+ ..controls (208.95,120.73) and (212.34,118.64)..(212.34,118.64)
+ --cycle;
+drawoptions (withcolor (0.6,0.3,0));
+fill (251.86,122.1)--(257.34,122.1)--(257.34,92.0698)
+ --(251.86,92.0698)--(251.86,122.1)--cycle;
+pickup pencircle scaled 0.86bp;
+draw (251.86,122.1)--(257.34,122.1)--(257.34,92.0698)
+ --(251.86,92.0698)--(251.86,122.1);
+drawoptions (withcolor (0.6,0.85,1));
+pickup pencircle scaled 0bp;
+fill (116.5,62.8398)..controls (116.5,62.8398) and (123.06,57.22)..(123.06,54.99)
+ ..controls (123.06,52.8298) and (122.98,51.25)..(118.66,49.95)
+ ..controls (114.27,48.73) and (104.62,47.7898)..(102.1,47.7898)
+ ..controls (99.5798,47.7898) and (93.3198,46.8599)..(91.45,46.8599)
+ ..controls (89.5798,46.8599) and (77.0498,46.21)..(74.5298,46.8599)
+ ..controls (72.0798,47.4299) and (65.8198,46.21)..(63.5798,47.7898)
+ ..controls (61.4199,49.3799) and (58.3298,49.95)..(56.74,52.47)
+ ..controls (55.1599,54.99) and (55.1599,55.3499)..(55.1599,58.1599)
+ ..controls (55.1599,60.97) and (59.8398,64.4199)..(59.8398,64.4199)
+ --(116.5,62.8398)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 1.44bp;
+draw (116.5,62.8398)..controls (116.5,62.8398) and (123.06,57.22)..(123.06,54.99)
+ ..controls (123.06,52.8298) and (122.98,51.25)..(118.66,49.95)
+ ..controls (114.27,48.73) and (104.62,47.7898)..(102.1,47.7898)
+ ..controls (99.5798,47.7898) and (93.3198,46.8599)..(91.45,46.8599)
+ ..controls (89.5798,46.8599) and (77.0498,46.21)..(74.5298,46.8599)
+ ..controls (72.0798,47.4299) and (65.8198,46.21)..(63.5798,47.7898)
+ ..controls (61.4199,49.3799) and (58.3298,49.95)..(56.74,52.47)
+ ..controls (55.1599,54.99) and (55.1599,55.3498)..(55.1599,58.1599)
+ ..controls (55.1599,60.97) and (59.8399,64.4199)..(59.8399,64.4199)
+ --(116.5,62.8398);
+drawoptions (withcolor (0.8,0.9,1));
+pickup pencircle scaled 0bp;
+fill (63.3699,81.4199)..controls (63.3699,81.4199) and (81.5098,83.5)..(87.8499,83.5)
+ ..controls (94.1799,83.5) and (111.82,82.1399)..(111.82,82.1399)
+ ..controls (111.82,82.1399) and (114.06,71.4099)..(114.06,70.0398)
+ ..controls (114.06,68.74) and (115.64,64.6399)..(115.64,64.6399)
+ --(116.29,54.6299)..controls (116.29,54.6299) and (98.5,52.5398)..(93.25,52.5398)
+ ..controls (87.99,52.5398) and (69.2698,50.5999)..(67.47,51.25)
+ ..controls (65.6699,51.8999) and (65.6699,59.8198)..(65.6699,59.8198)
+ --(63.3699,63.49)--(63.3699,81.4199)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (63.3699,81.4199)..controls (63.3699,81.4199) and (81.5098,83.5)..(87.8499,83.5)
+ ..controls (94.1799,83.5) and (111.82,82.1399)..(111.82,82.1399)
+ ..controls (111.82,82.1399) and (114.06,71.4099)..(114.06,70.0398)
+ ..controls (114.06,68.74) and (115.64,64.6399)..(115.64,64.6399)
+ --(116.29,54.6299)..controls (116.29,54.6299) and (98.5,52.5398)..(93.25,52.5398)
+ ..controls (87.99,52.5398) and (69.2698,50.5999)..(67.47,51.25)
+ ..controls (65.6699,51.8999) and (65.6699,59.8198)..(65.6699,59.8198)
+ --(63.3699,63.49)--(63.3699,81.4199);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (66.6799,78.25)..controls (68.9099,79.26) and (74.24,79.26)..(75.8198,79.26)
+ ..controls (77.3398,79.26) and (84.25,79.5398)..(84.25,79.5398)
+ --(85.1799,77.0198)--(85.1799,72.6299)--(83.5999,70.76)
+ ..controls (83.5999,70.76) and (80.22,70.76)..(77.0498,70.1099)
+ ..controls (73.8799,69.46) and (68.2598,68.5298)..(68.2598,68.5298)
+ ..controls (68.2598,68.5298) and (66.0999,69.46)..(66.0999,71.0498)
+ ..controls (66.0999,72.6299) and (66.6799,78.25)..(66.6799,78.25)
+ --cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 0.86bp;
+draw (66.6799,78.25)..controls (68.9099,79.26) and (74.24,79.26)..(75.8198,79.26)
+ ..controls (77.3398,79.26) and (84.25,79.5398)..(84.25,79.5398)
+ --(85.1799,77.0198)--(85.1799,72.6299)--(83.5999,70.76)
+ ..controls (83.5999,70.76) and (80.22,70.76)..(77.0498,70.1099)
+ ..controls (73.8799,69.46) and (68.2598,68.5298)..(68.2598,68.5298)
+ ..controls (68.2598,68.5298) and (66.0999,69.46)..(66.0999,71.0498)
+ ..controls (66.0999,72.6299) and (66.6799,78.25)..(66.6799,78.25)
+ --cycle;
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (93.0298,79.8298)--(105.85,79.5398)..controls (105.85,79.5398) and (108.37,79.26)..(108.66,77.3098)
+ ..controls (108.94,75.4399) and (109.3,72.9199)..(109.3,72.9199)
+ ..controls (109.3,72.9199) and (108.94,70.76)..(107.43,70.76)
+ ..controls (105.85,70.76) and (93.6099,70.3999)..(93.6099,70.3999)
+ ..controls (93.6099,70.3999) and (91.45,71.3398)..(91.45,72.9199)
+ ..controls (91.45,74.5) and (91.1599,77.3098)..(91.1599,77.3098)
+ --(93.0298,79.8298)--cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 0.86bp;
+draw (93.0298,79.8298)--(105.85,79.5398)..controls (105.85,79.5398) and (108.37,79.26)..(108.66,77.3098)
+ ..controls (108.94,75.4399) and (109.3,72.9199)..(109.3,72.9199)
+ ..controls (109.3,72.9199) and (108.94,70.76)..(107.43,70.76)
+ ..controls (105.85,70.76) and (93.6098,70.3999)..(93.6098,70.3999)
+ ..controls (93.6098,70.3999) and (91.45,71.3399)..(91.45,72.9199)
+ ..controls (91.45,74.5) and (91.1599,77.3098)..(91.1599,77.3098)
+ --(93.0298,79.8298);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (95.48,61.3298)..controls (98.6499,61.3298) and (108.01,61.3298)..(108.01,61.3298)
+ --(110.82,58.8098)--(110.82,56.2898)..controls (108.01,55.3499) and (96.4199,54.99)..(96.4199,54.99)
+ ..controls (96.4199,54.99) and (93.3198,54.7)..(93.3198,56.2898)
+ ..controls (93.3198,57.8699) and (93.0298,59.3799)..(93.0298,59.3799)
+ --(95.48,61.3298)--cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 0.86bp;
+draw (95.48,61.3298)..controls (98.6499,61.3298) and (108.01,61.3298)..(108.01,61.3298)
+ --(110.82,58.8098)--(110.82,56.2898)..controls (108.01,55.3499) and (96.4199,54.99)..(96.4199,54.99)
+ ..controls (96.4199,54.99) and (93.3198,54.7)..(93.3198,56.2898)
+ ..controls (93.3198,57.8699) and (93.0298,59.3799)..(93.0298,59.3799)
+ --(95.48,61.3298);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (84.5398,60.0298)--(88.2798,58.8098)--(88.2798,55.6399)
+ ..controls (88.2798,55.6399) and (88.3499,54.7)..(86.1199,54.7)
+ ..controls (83.96,54.7) and (71.72,53.1199)..(71.72,53.1199)
+ --(69.2,54.7)--(69.2,57.51)--(71.4299,59.74)
+ --(84.5398,60.0298)--cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 0.86bp;
+draw (84.5398,60.0298)--(88.2798,58.8098)--(88.2798,55.6399)
+ ..controls (88.2798,55.6399) and (88.3499,54.7)..(86.1199,54.7)
+ ..controls (83.96,54.7) and (71.72,53.1199)..(71.72,53.1199)
+ --(69.2,54.7)--(69.2,57.51)--(71.4299,59.74)
+ --(84.5398,60.0298);
+drawoptions (withcolor (0,0.7,1));
+pickup pencircle scaled 2.23bp;
+draw (65.3799,59.8198)..controls (70.6399,63.0598) and (81.22,66.6599)..(88.2798,66.4399)
+ ..controls (95.2598,66.22) and (111.97,65.2898)..(115.64,61.47);
+drawoptions (withcolor (0.4,0.8,1));
+pickup pencircle scaled 0bp;
+fill (111.82,82.1399)--(105.92,86.46)..controls (105.92,86.46) and (95.98,87.3899)..(93.8999,87.3899)
+ ..controls (91.8799,87.3899) and (81.9399,87.3899)..(81.9399,87.3899)
+ --(74.24,87.3899)--(68.3398,84.8699)--(63.5798,81.9199)
+ --(64.95,81.2)..controls (64.95,81.2) and (79.4199,83.5)..(87.3398,83.2898)
+ ..controls (95.2598,83.0698) and (111.61,82.1399)..(111.82,82.1399)
+ --cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 1.44bp;
+draw (111.82,82.1399)--(105.92,86.46)..controls (105.92,86.46) and (95.98,87.3899)..(93.8999,87.3899)
+ ..controls (91.8799,87.3899) and (81.9399,87.3899)..(81.9399,87.3899)
+ --(74.24,87.3899)--(68.3398,84.8699)--(63.5798,81.9199)
+ --(64.95,81.2)..controls (64.95,81.2) and (79.4199,83.5)..(87.3398,83.2898)
+ ..controls (95.2598,83.0698) and (111.61,82.1399)..(111.82,82.1399)
+ --cycle;
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 2.81bp;
+draw (113.84,72.8498)..controls (114.92,72.8498) and (116.29,72.8498)..(118.16,71.7)
+ ..controls (119.96,70.5398) and (119.53,70.5398)..(121.11,68.96)
+ ..controls (122.62,67.3799) and (121.98,66.22)..(121.98,66.22)
+ ..controls (121.98,66.22) and (120.82,65.5798)..(119.02,65.5798)
+ ..controls (117.22,65.5798) and (111.82,65.0698)..(109.74,65.0698)
+ ..controls (107.72,65.0698) and (103.4,65.0698)..(99.7998,65.0698)
+ ..controls (96.2,65.0698) and (90.9399,64.8599)..(88.2798,64.8599)
+ ..controls (85.5398,64.8599) and (79.4199,64.1399)..(76.47,63.9199)
+ ..controls (73.5198,63.7) and (69.49,63.7)..(66.0999,63.7)
+ ..controls (62.72,63.7) and (63.7998,62.7698)..(61.3499,64.1399)
+ ..controls (58.8298,65.5798) and (57.97,64.2099)..(57.97,66.6599)
+ ..controls (57.97,69.1799) and (56.8198,69.46)..(59.3398,71.7)
+ ..controls (61.7798,73.9299) and (61.3499,73.0598)..(63.1499,73.0598);
+pickup pencircle scaled 2.23bp;
+draw (57.97,67.0899)--(57.97,59.1699);
+draw (62.9399,62.7698)--(62.9399,51.25);
+draw (90.2998,64.8598)--(91.45,48.9399);
+draw (121.26,66.01)--(120.61,54.6299);
+draw (60.9199,72.8499)--(62,66.01);
+draw (114.7,72.5598)--(114.7,67.3799);
+pickup pencircle scaled 2.81bp;
+draw (84.6099,87.0999)--(84.8999,94.3799);
+draw (96.8498,86.46)--(96.8498,90.7798);
+drawoptions (withcolor (1,0.9,0));
+pickup pencircle scaled 0bp;
+fill (96.6299,96.25)..controls (98,96.25) and (99.1499,95.1699)..(99.1499,93.73)
+ ..controls (99.1499,92.2898) and (98,91.21)..(96.6299,91.21)
+ ..controls (95.2598,91.21) and (94.1099,92.2898)..(94.1099,93.73)
+ ..controls (94.1099,95.1699) and (95.2598,96.25)..(96.6299,96.25)
+ --cycle;
+drawoptions (withcolor (0.9,0,0));
+pickup pencircle scaled 2.23bp;
+draw (96.6299,96.25)..controls (98,96.25) and (99.1499,95.1699)..(99.1499,93.73)
+ ..controls (99.1499,92.2898) and (98,91.21)..(96.6299,91.21)
+ ..controls (95.2598,91.21) and (94.1099,92.2898)..(94.1099,93.73)
+ ..controls (94.1099,95.1699) and (95.2598,96.25)..(96.6299,96.25)
+ --cycle;
+drawoptions (withcolor (1,0.4,0));
+pickup pencircle scaled 0bp;
+fill (277.14,29.4299)--(285.99,29.4299)--(285.99,0.699951)
+ --(277.14,0.699951)--(277.14,29.4299)--cycle;
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0.86bp;
+draw (277.14,29.4299)--(285.99,29.4299)--(285.99,0.699936)
+ --(277.14,0.699936)--(277.14,29.4299);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (271.16,51.75)--(276.49,52.6199)--(276.7,49.95)
+ --(271.16,48.9399)--(271.16,51.75)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (271.16,51.75)--(276.49,52.6199)--(276.7,49.95)
+ --(271.16,48.9399)--(271.16,51.75);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (285.56,29.3599)--(285.27,32.5298)--(276.85,32.5298)
+ --(277.64,29.3599)--(285.56,29.3599)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (285.56,29.3599)--(285.27,32.5298)--(276.85,32.5298)
+ --(277.64,29.3599)--(285.56,29.3599);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (165.82,104.53)--(172.95,104.53)--(172.95,102.08)
+ --(165.82,102.08)--(165.82,104.53)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (165.82,104.53)--(172.95,104.53)--(172.95,102.08)
+ --(165.82,102.08)--(165.82,104.53);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (162.37,92.22)..controls (162.58,92.22) and (162.87,92.22)..(163.16,92.22)
+ ..controls (163.52,92.22) and (163.81,92.22)..(164.1,92.22)
+ ..controls (164.02,89.7698) and (164.02,87.3198)..(164.02,84.8699)
+ ..controls (164.02,82.3499) and (164.02,79.8999)..(164.1,77.3799)
+ ..controls (163.81,77.5298) and (163.52,77.6699)..(163.16,77.74)
+ ..controls (162.94,77.8198) and (162.58,78.0298)..(162.37,78.0298)
+ ..controls (162.3,80.4099) and (162.3,82.7798)..(162.3,85.1599)
+ ..controls (162.3,87.46) and (162.37,89.9099)..(162.37,92.22)
+ --cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (162.37,92.22)..controls (162.58,92.22) and (162.87,92.22)..(163.16,92.22)
+ ..controls (163.52,92.22) and (163.81,92.22)..(164.1,92.22)
+ ..controls (164.02,89.7698) and (164.02,87.3198)..(164.02,84.8699)
+ ..controls (164.02,82.3499) and (164.02,79.8999)..(164.1,77.3799)
+ ..controls (163.81,77.5298) and (163.52,77.6699)..(163.16,77.74)
+ ..controls (162.94,77.8198) and (162.58,78.0298)..(162.37,78.0298)
+ ..controls (162.3,80.4099) and (162.3,82.7798)..(162.3,85.1599)
+ ..controls (162.3,87.46) and (162.37,89.9099)..(162.37,92.22)
+ --cycle;
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (161.94,92.6499)--(164.31,92.6499)--(164.31,93.6599)
+ --(161.94,93.6599)--(161.94,92.6499)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (161.94,92.6499)--(164.31,92.6499)--(164.31,93.6599)
+ --(161.94,93.6599)--(161.94,92.6499);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (147.25,105.9)--(150.34,105.9)--(150.34,104.53)
+ --(147.25,104.53)--(147.25,105.9)--cycle;
+drawoptions (withcolor (0.1,0.1,0.1));
+pickup pencircle scaled 0.86bp;
+draw (147.25,105.9)--(150.34,105.9)--(150.34,104.53)
+ --(147.25,104.53)--(147.25,105.9);
+drawoptions (withcolor (0,0.7,1));
+pickup pencircle scaled 0bp;
+fill (105.85,90.6299)..controls (110.82,92.5) and (110.82,92)..(113.98,92.9399)
+ ..controls (117.08,93.7998) and (117.58,92.5)..(120.25,92.5)
+ ..controls (122.91,92.5) and (128.67,92)..(130.62,92)
+ --(135.58,92)--(141.85,93.3699)--(143.22,82.5)
+ --(154.45,82.5)--(159.78,79.3298)..controls (159.78,79.3298) and (159.34,72.1299)..(155.74,72.1299)
+ ..controls (152.22,72.1299) and (147.61,69.3899)..(144.08,72.1299)
+ ..controls (140.55,74.7898) and (136.88,75.22)..(134.22,74.7898)
+ ..controls (131.55,74.3599) and (126.94,73.9299)..(123.42,73.9299)
+ ..controls (119.82,73.9299) and (113.05,73.9299)..(113.05,73.9299)
+ --(111.25,82.9299)--(105.85,87.46)--(105.85,90.6299)
+ --cycle;
+drawoptions (withcolor (0,0.4,1));
+fill (109.88,100.93)..controls (116.22,103.45) and (119.82,103.23)..(123.85,103.66)
+ ..controls (127.95,104.1) and (132.49,104.89)..(133.35,104.6)
+ --(138.75,102.8)--(136.02,99.6299)..controls (136.02,99.6299) and (138.25,93.2998)..(136.02,95.0999)
+ ..controls (133.78,96.8999) and (130.18,96.8999)..(127.02,97.3298)
+ ..controls (123.85,97.76) and (118.45,95.5298)..(121.18,95.5298)
+ ..controls (123.85,95.5298) and (131.98,95.5298)..(134.65,94.23)
+ --(139.18,91.9299)..controls (139.18,91.9299) and (112.18,91.9299)..(108.51,91.9299)
+ ..controls (104.91,91.9299) and (104.55,96.0298)..(106.78,96.0298)
+ ..controls (109.02,96.0298) and (115.78,98.7)..(115.78,98.7)
+ --(107.65,100.06)--(109.88,100.93)--cycle;
+drawoptions (withcolor (0.6,0.3,0));
+fill (45.9399,128.07)..controls (45.9399,128.07) and (45.0798,122.6)..(45.9399,118.57)
+ ..controls (46.8799,114.54) and (45.9399,113.17)..(47.3098,110.43)
+ ..controls (48.6799,107.77) and (50.48,104.17)..(50.48,104.17)
+ --(54.9399,101.5)--(52.71,99.6299)--(47.74,99.6299)
+ --(43.21,103.3)--(41.9099,114.03)--(41.4099,123.1)
+ --(40.98,127.64)--(45.9399,128.07)--cycle;
+fill (45.0798,95.1699)..controls (45.0798,95.1699) and (42.2698,98.7)..(41.4099,101.94)
+ ..controls (40.5398,105.1) and (38.74,111.37)..(38.74,114.97)
+ ..controls (38.74,118.57) and (38.74,128.07)..(38.74,128.07)
+ --(31.5398,124.04)..controls (31.5398,124.04) and (31.0398,119.5)..(31.5398,116.34)
+ ..controls (31.98,113.17) and (32.8398,108.2)..(33.3398,105.1)
+ ..controls (33.7798,101.94) and (34.21,100.57)..(34.21,97.8298)
+ ..controls (34.21,95.1699) and (39.6799,94.23)..(39.6799,94.23)
+ --(45.0798,95.1699)--cycle;
+fill (27.9399,87.46)..controls (27.9399,87.46) and (27.5098,96.46)..(27.5098,99.2)
+ ..controls (27.5098,101.94) and (27.5098,113.17)..(27.5098,113.17)
+ --(27.0798,120.37)--(22.98,119.07)--(15.3398,123.61)
+ ..controls (15.3398,123.61) and (15.3398,113.6)..(15.3398,110.94)
+ ..controls (15.3398,108.2) and (15.7798,101.5)..(15.3398,96.97)
+ ..controls (14.9099,92.4299) and (15.7798,92)..(14.9099,88.8298)
+ ..controls (13.98,85.6599) and (21.1799,86.5298)..(21.1799,86.5298)
+ --(26.1399,85.23)--(27.9399,87.46)--cycle;
+fill (1.37988,78.3899)--(15.3398,77.5298)..controls (15.3398,77.5298) and (14.8398,80.7)..(13.5398,83.3599)
+ ..controls (12.1799,86.0999) and (7.63989,86.96)..(6.77979,92.8599)
+ ..controls (5.83984,98.7698) and (4.53979,102.8)..(4.53979,107.77)
+ ..controls (4.53979,112.74) and (4.10986,127.21)..(4.10986,127.21)
+ --(1.37988,127.64)--(1.37988,78.3899)--cycle;
+drawoptions (withcolor (0,0.75,1));
+fill (220.62,63.9199)--(217.45,58.5198)--(223.78,51.6799)
+ ..controls (223.78,51.6799) and (230.98,47.22)..(234.15,46.2798)
+ ..controls (237.32,45.3398) and (244.52,43.5398)..(244.52,43.5398)
+ --(257.12,43.5398)--(261.66,44.0498)--(267.42,42.6799)
+ --(266.55,36.3398)--(259.78,32.74)..controls (259.78,32.74) and (254.46,30.9399)..(248.98,32.74)
+ ..controls (243.58,34.5398) and (240.92,34.1099)..(236.38,34.98)
+ ..controls (231.85,35.9099) and (222.42,37.71)..(221.98,40.45)
+ ..controls (221.55,43.1099) and (219.32,49.0198)..(219.32,49.0198)
+ --(217.45,54.4199)--(218.38,62.5498)--(220.62,63.9199)
+ --cycle;
+drawoptions (withcolor (0.6,0.3,0));
+fill (219.75,63.9199)--(235.02,63.9199)..controls (235.02,63.9199) and (238.18,63.9199)..(243.15,62.1199)
+ ..controls (248.12,60.3198) and (257.12,56.22)..(257.12,56.22)
+ --(262.09,51.25)--(266.98,48.5798)--(266.98,42.6799)
+ --(260.72,44.0498)--(246.32,41.74)--(231.42,46.7798)
+ --(222.42,52.1799)--(218.82,57.1499)--(219.75,63.9199)
+ --cycle;
+drawoptions (withcolor (1,0.9,0));
+fill (223.78,55.7798)--(227.38,60.75)--(231.42,61.6899)
+ ..controls (231.42,61.6899) and (235.88,61.6899)..(238.62,61.26)
+ ..controls (241.35,60.75) and (245.38,59.3799)..(248.12,57.5798)
+ ..controls (250.78,55.7798) and (256.18,52.6199)..(256.18,52.6199)
+ --(254.89,48.5798)--(249.42,46.2798)--(243.58,48.0798)
+ --(237.75,53.0498)--(233.65,54.9199)--(223.78,55.7798)
+ --cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+fill (221.34,54.4199)--(224.65,50.3799)..controls (224.65,50.3799) and (229.62,47.6499)..(232.35,46.7798)
+ ..controls (235.02,45.8499) and (240.56,44.6199)..(240.92,44.48)
+ --(246.75,42.25)--(251.29,48.0798)--(243.58,51.25)
+ --(236.02,54.4199)--(229.18,56.22)--(221.34,54.4199)
+ --cycle;
+drawoptions (withcolor (0.8,0.8,0.8));
+fill (219.32,63.0598)--(219.32,58.0198)--(224.22,51.25)
+ ..controls (224.22,51.25) and (231.92,47.22)..(235.02,45.8499)
+ ..controls (238.18,44.48) and (243.15,43.1099)..(245.89,43.1099)
+ ..controls (248.55,43.1099) and (253.09,43.1099)..(255.75,43.1099)
+ ..controls (258.42,43.1099) and (262.02,44.0498)..(264.32,43.1099)
+ ..controls (266.55,42.25) and (267.42,40.45)..(267.42,40.45)
+ --(262.09,38.6499)..controls (262.09,38.6499) and (255.75,38.6499)..(251.65,38.6499)
+ ..controls (247.62,38.6499) and (240.92,39.51)..(237.32,40.45)
+ ..controls (233.65,41.3098) and (226.88,43.98)..(223.78,47.22)
+ ..controls (220.62,50.3799) and (218.38,53.98)..(218.38,53.98)
+ --(219.32,63.0598)--cycle;
+drawoptions (withcolor (0.6,0.3,0));
+fill (271.45,52.8999)--(271.23,1.41992)--(266.34,1.41992)
+ --(266.41,54.2)..controls (266.41,54.2) and (272.17,53.1899)..(271.45,52.8999)
+ --cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (271.45,52.8999)--(271.23,1.41992)--(266.34,1.41992)
+ --(266.41,54.2)..controls (266.41,54.2) and (272.17,53.1899)..(271.45,52.8999)
+ --cycle;
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (271.16,51.75)--(266.26,54.1299)--(266.26,50.8899)
+ --(271.16,48.9399)--(271.16,51.75)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (271.16,51.75)--(266.26,54.1299)--(266.26,50.8899)
+ --(271.16,48.9399)--(271.16,51.75);
+drawoptions (withcolor (0.6,0.85,1));
+pickup pencircle scaled 0bp;
+fill (121.98,48.0798)..controls (129.82,48.51) and (138.9,48.51)..(143.36,48.51)
+ ..controls (147.75,48.51) and (157.69,51.6799)..(163.52,49.0198)
+ ..controls (169.42,46.2798) and (168.99,44.0498)..(174.82,43.5398)
+ ..controls (180.66,43.1099) and (189.66,39.51)..(189.66,39.51)
+ ..controls (189.66,39.51) and (190.52,35.8398)..(193.26,34.0398)
+ ..controls (195.99,32.24) and (185.62,29.5)..(185.62,29.5)
+ --(173.89,35.8398)..controls (173.89,35.8398) and (156.32,40.8799)..(152.72,40.8799)
+ ..controls (149.12,40.8799) and (134.79,39.9399)..(134.79,39.9399)
+ ..controls (134.79,39.9399) and (130.69,34.47)..(140.19,34.0398)
+ ..controls (149.55,33.6099) and (157.69,30.9399)..(157.69,30.9399)
+ ..controls (157.69,30.9399) and (156.32,25.47)..(152.72,25.47)
+ ..controls (149.12,25.47) and (129.82,26.4099)..(125.36,26.4099)
+ ..controls (120.82,26.4099) and (103.62,28.21)..(108.51,30.9399)
+ ..controls (113.48,33.6099) and (116.79,41.3098)..(116.79,41.3098)
+ ..controls (116.79,41.3098) and (118.59,46.71)..(121.98,48.0798)
+ --cycle;
+drawoptions (withcolor (1,1,1));
+fill (266.12,54.1299)--(271.3,51.46)--(276.7,52.6199)
+ --(273.68,54.99)--(266.12,54.1299)--cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (266.12,54.1299)--(271.3,51.46)--(276.7,52.6199)
+ --(273.68,54.99)--(266.12,54.1299);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (189.73,159.75)--(185.05,155.07)--(176.19,155.07)
+ --(181.09,159.75)--(189.73,159.75)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (189.73,159.75)--(185.05,155.07)--(176.19,155.07)
+ --(181.09,159.75)--(189.73,159.75);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (191.24,121.45)..controls (191.24,118.71) and (191.24,115.54)..(191.24,113.89)
+ ..controls (191.24,112.16) and (191.6,109.35)..(191.24,107.91)
+ ..controls (190.81,106.54) and (190.38,105.46)..(190.38,105.46)
+ --(190.59,103.16)--(193.98,104.02)--(194.41,106.54)
+ ..controls (194.41,106.54) and (194.41,111.94)..(194.41,113.02)
+ ..controls (194.41,114.03) and (195.06,123.54)..(195.06,123.54)
+ --(191.24,121.45)--cycle;
+pickup pencircle scaled 0.86bp;
+draw (191.24,121.45)..controls (191.24,118.71) and (191.24,115.54)..(191.24,113.89)
+ ..controls (191.24,112.16) and (191.6,109.35)..(191.24,107.91)
+ ..controls (190.81,106.54) and (190.38,105.46)..(190.38,105.46)
+ --(190.59,103.16)--(193.98,104.02)--(194.41,106.54)
+ ..controls (194.41,106.54) and (194.41,111.94)..(194.41,113.02)
+ ..controls (194.41,114.03) and (195.06,123.54)..(195.06,123.54)
+ --(191.24,121.45);
+pickup pencircle scaled 0bp;
+fill (216.58,98.5498)..controls (216.58,100.21) and (216.15,99.3398)..(216.01,102.73)
+ ..controls (215.79,106.11) and (215.14,107.12)..(215.14,110.22)
+ ..controls (215.14,113.46) and (215.14,116.98)..(215.14,118.06)
+ ..controls (215.14,119.14) and (215.14,120.37)..(215.14,120.37)
+ --(212.19,119.36)..controls (212.19,119.36) and (212.19,118.71)..(212.19,116.98)
+ ..controls (212.19,115.33) and (212.19,113.17)..(212.19,111.3)
+ ..controls (212.19,109.42) and (212.19,109.5)..(212.19,106.98)
+ ..controls (212.19,104.46) and (212.05,101.94)..(212.05,101.94)
+ --(211.4,99.3398)--(213.27,98.7)--(216.58,98.5498)
+ --cycle;
+pickup pencircle scaled 0.86bp;
+draw (216.58,98.5498)..controls (216.58,100.21) and (216.15,99.3399)..(216.01,102.73)
+ ..controls (215.79,106.11) and (215.14,107.12)..(215.14,110.22)
+ ..controls (215.14,113.46) and (215.14,116.98)..(215.14,118.06)
+ ..controls (215.14,119.14) and (215.14,120.37)..(215.14,120.37)
+ --(212.19,119.36)..controls (212.19,119.36) and (212.19,118.71)..(212.19,116.98)
+ ..controls (212.19,115.33) and (212.19,113.17)..(212.19,111.3)
+ ..controls (212.19,109.42) and (212.19,109.5)..(212.19,106.98)
+ ..controls (212.19,104.46) and (212.05,101.94)..(212.05,101.94)
+ --(211.4,99.3399)--(213.27,98.6999)--(216.58,98.5498);
+pickup pencircle scaled 0bp;
+fill (184.54,108.78)--(184.54,114.46)--(183.46,116.19)
+ --(182.67,114.46)..controls (182.67,114.46) and (182.82,113.24)..(182.82,112.16)
+ ..controls (182.82,111.08) and (182.82,109.64)..(182.82,109.64)
+ --(184.54,108.78)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (184.54,108.78)--(184.54,114.46)--(183.46,116.19)
+ --(182.67,114.46)..controls (182.67,114.46) and (182.82,113.24)..(182.82,112.16)
+ ..controls (182.82,111.08) and (182.82,109.64)..(182.82,109.64)
+ --(184.54,108.78);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (178.28,117.85)..controls (178.28,117.85) and (178.42,115.76)..(178.42,114.68)
+ ..controls (178.42,113.6) and (178.42,111.3)..(178.42,111.3)
+ --(176.98,109.64)--(176.98,113.46)--(176.98,116.55)
+ --(178.28,117.85)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (178.28,117.85)..controls (178.28,117.85) and (178.42,115.76)..(178.42,114.68)
+ ..controls (178.42,113.6) and (178.42,111.3)..(178.42,111.3)
+ --(176.98,109.64)--(176.98,113.46)--(176.98,116.55)
+ --(178.28,117.85);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (180.51,109.21)..controls (180.51,109.21) and (180.3,109.5)..(180.51,112.16)
+ ..controls (180.73,114.9) and (180.73,117.85)..(180.73,117.85)
+ --(179.5,118.06)..controls (179.5,118.06) and (179.5,115.9)..(179.5,114.9)
+ ..controls (179.5,113.89) and (179.29,110.86)..(179.29,110.86)
+ --(179.5,108.99)--(180.51,109.21)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (180.51,109.21)..controls (180.51,109.21) and (180.3,109.5)..(180.51,112.16)
+ ..controls (180.73,114.9) and (180.73,117.85)..(180.73,117.85)
+ --(179.5,118.06)..controls (179.5,118.06) and (179.5,115.9)..(179.5,114.9)
+ ..controls (179.5,113.89) and (179.29,110.86)..(179.29,110.86)
+ --(179.5,108.99)--(180.51,109.21);
+drawoptions (withcolor (0,0.5,0));
+pickup pencircle scaled 0bp;
+fill (192.46,150.97)..controls (185.55,150.54) and (182.6,151.98)..(182.38,148.88)
+ ..controls (182.24,145.71) and (184.54,150.97)..(185.34,145.28)
+ ..controls (186.2,139.59) and (186.85,138.51)..(186.85,136.21)
+ ..controls (186.85,133.9) and (188.86,133.9)..(189.3,136.42)
+ ..controls (189.73,138.94) and (190.02,140.89)..(192.1,142.11)
+ ..controls (194.19,143.41) and (195.06,146.94)..(191.46,146.5)
+ ..controls (187.86,146.14) and (190.59,149.89)..(190.59,149.89)
+ --(192.46,150.97)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (221.77,159.61)--(227.17,163.06)--(226.52,146.65)
+ --(222.42,145.93)--(221.77,159.61);
+draw (207.8,155.43)--(205.28,153.92)--(205.28,149.1);
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 1.44bp;
+draw (204.63,125.48)--(204.63,118.28)--(209.24,117.63);
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (224,160.9)--(224.14,148.88);
+draw (222.06,154.78)--(226.88,157.09);
+draw (216.01,151.62)--(215.79,145.71);
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 1.44bp;
+draw (223.5,130.52)--(227.96,130.52)--(228.18,124.4);
+draw (222.7,118.28)--(222.7,115.76)--(228.39,115.11);
+draw (222.27,123.32)--(227.53,123.18);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (240.42,126.27)--(236.82,126.7)--(236.82,113.17)
+ --(241.35,113.17)--(240.42,126.27)--cycle;
+drawoptions (withcolor (0.5,0.5,0.5));
+pickup pencircle scaled 0.22bp;
+draw (240.42,126.27)--(236.82,126.7)--(236.82,113.17)
+ --(241.35,113.17)--(240.42,126.27);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (246.75,126.7)--(242.65,126.7)--(243.58,112.23)
+ --(248.12,111.8)--(248.55,119.07)--(246.75,126.7)
+ --cycle;
+drawoptions (withcolor (0.5,0.5,0.5));
+pickup pencircle scaled 0.22bp;
+draw (246.75,126.7)--(242.65,126.7)--(243.58,112.23)
+ --(248.12,111.8)--(248.55,119.07)--(246.75,126.7);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (258.7,119.79)--(258.7,111.66)--(262.74,111.66)
+ --(263.24,123.82)--(258.27,122.96)--(258.7,119.79)
+ --cycle;
+drawoptions (withcolor (0.5,0.5,0.5));
+pickup pencircle scaled 0.22bp;
+draw (258.7,119.79)--(258.7,111.66)--(262.74,111.66)
+ --(263.24,123.82)--(258.27,122.96)--(258.7,119.79);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (269.36,126.49)--(264.82,126.49)--(265.33,110.22)
+ --(270.73,110.22)--(269.36,126.49)--cycle;
+drawoptions (withcolor (0.5,0.5,0.5));
+pickup pencircle scaled 0.22bp;
+draw (269.36,126.49)--(264.82,126.49)--(265.33,110.22)
+ --(270.73,110.22)--(269.36,126.49);
+drawoptions (withcolor (1,0.8,0.8));
+pickup pencircle scaled 0bp;
+fill (273.32,101.5)--(285.92,98.26)--(285.92,156.58)
+ --(273.32,145.28)--(273.32,101.5)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (273.32,101.5)--(285.92,98.26)--(285.92,156.58)
+ --(273.32,145.28)--(273.32,101.5);
+drawoptions (withcolor (0.95,0.95,0.95));
+pickup pencircle scaled 0bp;
+fill (277.86,125.41)--(276.92,109.57)--(285.92,107.77)
+ --(285.49,123.61)--(277.86,125.41)--cycle;
+drawoptions (withcolor (0.6,0.6,0.6));
+pickup pencircle scaled 1.44bp;
+draw (277.86,125.41)--(276.92,109.57)--(285.92,107.77)
+ --(285.49,123.61)--(277.86,125.41);
+drawoptions (withcolor (0.9,0.9,0.9));
+pickup pencircle scaled 0bp;
+fill (278.29,125.84)--(285.49,123.61)--(285.92,131.24)
+ --(278.29,132.18)--(278.29,125.84)--cycle;
+drawoptions (withcolor (0.6,0.6,0.6));
+pickup pencircle scaled 1.44bp;
+draw (278.29,125.84)--(285.49,123.61)--(285.92,131.24)
+ --(278.29,132.18)--(278.29,125.84);
+pickup pencircle scaled 0.86bp;
+draw (237.32,121.3)--(240.42,121.3);
+drawoptions (withcolor (0.5,0.5,0.5));
+draw (243.15,121.3)--(248.12,120.87);
+draw (259.35,120.37)--(262.52,119.94);
+draw (265.69,121.3)--(269.22,120.87);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (166.04,101.86)..controls (167.12,101.94) and (168.2,101.94)..(169.35,101.94)
+ ..controls (170.43,101.94) and (171.51,101.94)..(172.74,101.86)
+ ..controls (172.66,97.5398) and (172.66,93.1499)..(172.66,88.76)
+ ..controls (172.66,84.3699) and (172.66,79.98)..(172.74,75.5798)
+ ..controls (171.51,76.0898) and (170.43,76.5898)..(169.35,77.0198)
+ ..controls (168.27,77.46) and (167.12,77.96)..(166.04,78.3198)
+ ..controls (166.04,82.2798) and (166.04,86.1699)..(166.04,90.1299)
+ ..controls (166.04,94.0198) and (166.04,97.98)..(166.04,101.86)
+ --cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0.86bp;
+draw (166.04,101.86)..controls (167.12,101.94) and (168.2,101.94)..(169.35,101.94)
+ ..controls (170.43,101.94) and (171.51,101.94)..(172.74,101.86)
+ ..controls (172.66,97.5398) and (172.66,93.1499)..(172.66,88.76)
+ ..controls (172.66,84.3699) and (172.66,79.98)..(172.74,75.5798)
+ ..controls (171.51,76.0899) and (170.43,76.5898)..(169.35,77.0198)
+ ..controls (168.27,77.4599) and (167.12,77.9599)..(166.04,78.3198)
+ ..controls (166.04,82.2798) and (166.04,86.1699)..(166.04,90.1299)
+ ..controls (166.04,94.0198) and (166.04,97.98)..(166.04,101.86)
+ --cycle;
+drawoptions (withcolor (0,0.6,0));
+pickup pencircle scaled 0bp;
+fill (25.21,151.54)..controls (35.4299,157.66) and (33.3398,161.05)..(32.7,169.33)
+ ..controls (32.0498,177.54) and (29.3098,183.01)..(30.6799,189.13)
+ ..controls (32.0498,195.32) and (25.9299,187.04)..(23.8398,181.57)
+ ..controls (21.8198,176.17) and (13.6199,171.34)..(13.6199,171.34)
+ ..controls (13.6199,171.34) and (5.47998,167.89)..(8.85986,179.55)
+ ..controls (12.25,191.22) and (5.47998,189.78)..(5.47998,185.02)
+ ..controls (5.47998,180.27) and (3.38989,170.62)..(5.47998,164.5)
+ ..controls (7.5,158.38) and (12.3198,157.66)..(12.97,161.05)
+ ..controls (13.6199,164.5) and (17.0698,159.68)..(17.0698,152.19)
+ ..controls (17.0698,144.7) and (25.21,151.54)..(25.21,151.54)
+ --cycle;
+fill (38.8198,143.98)..controls (44.2898,150.18) and (44.2898,155)..(44.2898,159.75)
+ ..controls (44.2898,164.5) and (43.5698,178.18)..(46.2998,174.73)
+ ..controls (49.0398,171.34) and (53.7898,163.86)..(53.7898,158.38)
+ ..controls (53.7898,152.91) and (46.3799,148.09)..(51.1299,143.98)
+ ..controls (55.8799,139.88) and (59.2598,136.5)..(50.4099,136.5)
+ ..controls (41.5498,136.5) and (34.0598,134.41)..(34.0598,134.41)
+ --(38.8198,143.98)--cycle;
+drawoptions (withcolor (0,0.8,0));
+fill (254.6,137.86)..controls (254.6,145.42) and (251.14,148.16)..(254.6,155)
+ ..controls (257.98,161.84) and (261.44,170.7)..(261.44,170.7)
+ ..controls (261.44,170.7) and (262.74,170.7)..(262.74,165.94)
+ ..controls (262.74,161.12) and (268.93,156.3)..(268.93,156.3)
+ --(269.58,149.46)--(262.09,141.97)..controls (262.09,141.97) and (262.09,139.23)..(262.09,134.48)
+ ..controls (262.09,129.66) and (254.6,137.86)..(254.6,137.86)
+ --cycle;
+drawoptions (withcolor (0.95,0.95,0.95));
+fill (80.3599,197.34)..controls (117.8,197.34) and (98.0698,202.81)..(123.92,202.81)
+ ..controls (149.77,202.81) and (150.42,203.53)..(162.66,200.79)
+ ..controls (174.97,198.06) and (174.25,195.25)..(185.84,193.23)
+ ..controls (197.43,191.22) and (206.29,189.78)..(204.92,185.02)
+ ..controls (203.55,180.27) and (180.44,174.15)..(174.97,176.82)
+ ..controls (169.5,179.55) and (155.17,184.38)..(150.42,184.38)
+ ..controls (145.66,184.38) and (110.31,192.58)..(110.31,192.58)
+ ..controls (110.31,192.58) and (102.82,188.41)..(115.14,185.74)
+ ..controls (127.38,183.01) and (154.52,178.9)..(142.28,172.71)
+ ..controls (130.04,166.52) and (115.78,176.17)..(106.93,176.17)
+ ..controls (98.0698,176.17) and (85.1799,176.82)..(78.99,179.55)
+ ..controls (72.8699,182.29) and (61.2798,190.5)..(54.5098,193.95)
+ ..controls (47.6699,197.34) and (49.6899,205.54)..(59.2598,204.18)
+ ..controls (68.7698,202.81) and (80.3599,197.34)..(80.3599,197.34)
+ --cycle;
+drawoptions (withcolor (1,0.4,0));
+fill (14.3398,40.8098)..controls (21.8198,45.5598) and (32.7,53.0498)..(34.7798,56.5)
+ ..controls (36.7998,59.8899) and (37.45,49.6599)..(37.45,49.6599)
+ --(45.6599,57.1499)--(45.6599,47.6499)..controls (45.6599,47.6499) and (42.2,42.8198)..(39.5398,38)
+ ..controls (36.7998,33.25) and (22.47,18.2)..(22.47,18.2)
+ --(19.8098,25.0398)--(25.21,34.6199)--(23.8398,41.46)
+ --(12.25,35.26)--(14.3398,40.8098)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+fill (257.98,96.1799)--(278.43,94.8098)--(264.18,92.72)
+ --(255.25,92.72)--(257.98,96.1799)--cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+fill (215.14,102.37)..controls (215.14,102.37) and (217.16,100.28)..(220.54,100.28)
+ ..controls (224,100.28) and (230.77,99.5598)..(230.77,99.5598)
+ --(227.31,98.1899)--(215.79,97.5398)--(215.14,102.37)
+ --cycle;
+fill (193.98,104.38)--(204.92,104.38)--(203.55,100.93)
+ --(193.33,102.37)--(193.98,104.38)--cycle;
+drawoptions (withcolor (0,0.5,1));
+fill (266.12,11.8599)..controls (260.65,15.25) and (251.79,18.7)..(246.32,18.7)
+ ..controls (240.85,18.7) and (239.48,17.3398)..(230.62,17.3398)
+ ..controls (221.7,17.3398) and (212.91,15.97)..(206.07,17.3398)
+ ..controls (199.23,18.7) and (191.74,16.6199)..(186.92,16.6199)
+ ..controls (182.17,16.6199) and (183.54,11.1399)..(178.06,10.5)
+ ..controls (172.59,9.77979) and (171.94,5.66992)..(167.84,5.66992)
+ ..controls (163.74,5.66992) and (159.06,0.849854)..(168.49,0.849854)
+ ..controls (177.92,0.849854) and (266.12,0.699951)..(266.12,1.41992)
+ --(266.12,11.8599)--cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (1.01978,215.34)--(286.28,215.34)--(286.28,0.849854)
+ --(1.01978,0.849854)--(1.01978,215.34);
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (286.28,31.6599)--(280.81,35.8398)--(277.42,35.8398)
+ --(277.42,31.6599)--(286.28,31.6599)--cycle;
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 0.86bp;
+draw (286.28,31.6599)--(280.81,35.8398)--(277.42,35.8398)
+ --(277.42,31.6599)--(286.28,31.6599);
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 2.81bp;
+draw (69.2698,192.73)..controls (74.74,190.71) and (75.46,185.89)..(75.46,185.89)
+ --(81.5798,185.24);
+draw (62.1399,178.62)..controls (67.5398,176.6) and (69.7,176.89)..(69.7,176.89)
+ --(72.4399,180.27);
+draw (52.3499,196.11)..controls (57.8198,194.02) and (58.47,189.27)..(58.47,189.27)
+ --(61.21,192.66);
+drawoptions (withcolor (0,0,0));
+pickup pencircle scaled 2.23bp;
+draw (173.17,30.73)..controls (173.17,29.72) and (173.38,28.5)..(173.38,28.5)
+ --(175.18,29.0698);
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0bp;
+fill (168.99,32.74)..controls (170.5,34.3999) and (171.51,33.1799)..(172.88,32.5298)
+ ..controls (174.25,31.8799) and (175.98,32.3098)..(175.11,31.23)
+ ..controls (174.32,30.22) and (168.56,29.3599)..(168.56,29.6499)
+ --(168.63,30.9399)--(168.13,31.6599)--(168.99,32.74)
+ --cycle;
+pickup pencircle scaled 2.23bp;
+draw (173.24,32.3098)..controls (173.24,33.3198) and (173.46,34.5398)..(173.46,34.5398)
+ --(175.33,33.97);
+drawoptions (withcolor (0,0,0));
+draw (184.33,24.3899)..controls (184.33,23.3799) and (184.54,22.1599)..(184.54,22.1599)
+ --(186.42,22.8098);
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0bp;
+fill (180.22,26.4099)..controls (181.74,28.0598) and (182.67,26.8398)..(184.04,26.1899)
+ ..controls (185.41,25.5398) and (187.14,25.98)..(186.34,24.97)
+ ..controls (185.55,23.8899) and (179.72,23.0198)..(179.72,23.3098)
+ --(179.86,24.6099)--(179.29,25.3999)--(180.22,26.4099)
+ --cycle;
+pickup pencircle scaled 2.23bp;
+draw (184.47,25.98)..controls (184.47,26.98) and (184.69,28.21)..(184.69,28.21)
+ --(186.56,27.6299);
+drawoptions (withcolor (0,0,0));
+draw (195.7,34.8298)..controls (195.7,33.75) and (195.92,32.5298)..(195.92,32.5298)
+ --(197.79,33.1799);
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0bp;
+fill (191.6,36.7798)..controls (193.04,38.5) and (194.05,37.2798)..(195.42,36.6299)
+ ..controls (196.78,35.9099) and (198.51,36.3398)..(197.72,35.3398)
+ ..controls (196.86,34.3298) and (191.1,33.46)..(191.1,33.6799)
+ --(191.24,35.0498)--(190.66,35.7698)--(191.6,36.7798)
+ --cycle;
+pickup pencircle scaled 2.23bp;
+draw (195.85,36.3398)..controls (195.85,37.4199) and (196.06,38.6499)..(196.06,38.6499)
+ --(197.94,38);
+drawoptions (withcolor (0,0,0));
+draw (198.44,26.26)..controls (198.44,25.1799) and (198.66,23.96)..(198.66,23.96)
+ --(200.53,24.6099);
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0bp;
+fill (194.34,28.21)..controls (195.85,29.9399) and (196.78,28.71)..(198.15,28.0598)
+ ..controls (199.52,27.3398) and (201.25,27.7798)..(200.46,26.7698)
+ ..controls (199.66,25.76) and (193.83,24.8999)..(193.83,25.1099)
+ --(193.98,26.48)--(193.4,27.2)--(194.34,28.21)
+ --cycle;
+pickup pencircle scaled 2.23bp;
+draw (198.58,27.7798)..controls (198.58,28.8599) and (198.8,30.0798)..(198.8,30.0798)
+ --(200.67,29.4299);
+drawoptions (withcolor (0,0,0));
+draw (157.47,21.0798)..controls (157.47,20) and (157.76,18.7798)..(157.76,18.7798)
+ --(159.56,19.4199);
+drawoptions (withcolor (0.2,0.2,0.2));
+pickup pencircle scaled 0bp;
+fill (153.37,23.0198)..controls (154.88,24.75) and (155.82,23.5298)..(157.18,22.8799)
+ ..controls (158.62,22.1599) and (160.35,22.5898)..(159.49,21.5798)
+ ..controls (158.7,20.5798) and (152.86,19.71)..(152.86,19.9299)
+ --(153.01,21.2998)--(152.43,22.0198)--(153.37,23.0198)
+ --cycle;
+pickup pencircle scaled 2.23bp;
+draw (157.62,22.5899)..controls (157.62,23.6699) and (157.83,24.8999)..(157.83,24.8999)
+ --(159.7,24.25);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0.86bp;
+draw (114.85,113.6)--(114.85,109.71);
+draw (124.64,113.6)--(124.64,109.28);
+draw (135.01,113.46)--(135.01,109.93);
+draw (144.08,113.46)--(144.08,110.07);
+pickup pencircle scaled 0bp;
+fill (191.38,89.98)--(212.55,83.7898)--(212.55,78.3198)
+ --(219.39,72.1299)--(218.02,67.3799)--(204.34,74.22)
+ --(205.06,80.3398)--(192.1,85.8799)--(191.38,89.98)
+ --cycle;
+fill (275.98,73.5)--(263.02,76.95)--(258.27,71.48)
+ --(250.06,72.8499)--(248.7,67.3799)--(261.01,65.2898)
+ --(267.13,71.48)--(275.98,68.0999)--(275.98,73.5)
+ --cycle;
+drawoptions (withcolor (0.4,0.4,0.4));
+pickup pencircle scaled 0.86bp;
+draw (69.2698,75.5798)--(75.46,76.95);
+drawoptions (withcolor (0.3,0.3,0.3));
+draw (98.8599,77.6699)--(105.92,76.5198);
+drawoptions (withcolor (0.5,0.5,0.5));
+draw (72.9399,74.1399)--(76.3999,74.6499);
+drawoptions (withcolor (0.4,0.4,0.4));
+draw (101.17,75.4399)--(105.63,74.5);
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (15.0598,62.3398)--(16.5698,62.3398)..controls (17.0698,62.3398) and (17.4299,62.7)..(17.4299,63.2)
+ --(17.4299,67.8799)..controls (17.4299,68.3799) and (17.0698,68.74)..(16.5698,68.74)
+ --(15.0598,68.74)..controls (14.5498,68.74) and (14.1899,68.3799)..(14.1899,67.8799)
+ --(14.1899,63.2)..controls (14.1899,62.7) and (14.5498,62.3398)..(15.0598,62.3398)
+ --cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (15.0598,62.3399)--(16.5698,62.3399)..controls (17.0698,62.3399) and (17.4299,62.7)..(17.4299,63.2)
+ --(17.4299,67.8799)..controls (17.4299,68.3799) and (17.0698,68.74)..(16.5698,68.74)
+ --(15.0598,68.74)..controls (14.5498,68.74) and (14.1899,68.3799)..(14.1899,67.8799)
+ --(14.1899,63.2)..controls (14.1899,62.7) and (14.5498,62.3399)..(15.0598,62.3399)
+ --cycle;
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (13.3298,70.1099)--(18.0098,70.1099)..controls (18.5798,70.1099) and (19.0198,69.6799)..(19.0198,69.1799)
+ --(19.0198,67.95)..controls (19.0198,67.45) and (18.5798,67.0198)..(18.0098,67.0198)
+ --(13.3298,67.0198)..controls (12.75,67.0198) and (12.3198,67.45)..(12.3198,67.95)
+ --(12.3198,69.1799)..controls (12.3198,69.6799) and (12.75,70.1099)..(13.3298,70.1099)
+ --cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 1.44bp;
+draw (13.3298,70.1098)--(18.0098,70.1098)..controls (18.5798,70.1098) and (19.0198,69.6799)..(19.0198,69.1799)
+ --(19.0198,67.9499)..controls (19.0198,67.45) and (18.5798,67.0198)..(18.0098,67.0198)
+ --(13.3298,67.0198)..controls (12.75,67.0198) and (12.3198,67.45)..(12.3198,67.9499)
+ --(12.3198,69.1799)..controls (12.3198,69.6799) and (12.75,70.1098)..(13.3298,70.1098)
+ --cycle;
+drawoptions (withcolor (0.9,0.95,1));
+pickup pencircle scaled 0bp;
+fill (62.3599,49.45)--(63.22,49.45)..controls (63.5098,49.45) and (63.73,49.6599)..(63.73,49.95)
+ --(63.73,52.76)..controls (63.73,53.0498) and (63.5098,53.26)..(63.22,53.26)
+ --(62.3599,53.26)..controls (62,53.26) and (61.8599,53.0498)..(61.8599,52.76)
+ --(61.8599,49.95)..controls (61.8599,49.6599) and (62,49.45)..(62.3599,49.45)
+ --cycle;
+drawoptions (withcolor (0,0.2,1));
+pickup pencircle scaled 0.86bp;
+draw (62.3599,49.45)--(63.22,49.45)..controls (63.5098,49.45) and (63.73,49.6599)..(63.73,49.95)
+ --(63.73,52.76)..controls (63.73,53.0498) and (63.5098,53.26)..(63.22,53.26)
+ --(62.3599,53.26)..controls (62,53.26) and (61.8599,53.0498)..(61.8599,52.76)
+ --(61.8599,49.95)..controls (61.8599,49.6599) and (62,49.45)..(62.3599,49.45)
+ --cycle;
+drawoptions (withcolor (0.9,0.95,1));
+pickup pencircle scaled 0bp;
+fill (61.3499,54.0598)--(64.0898,54.0598)..controls (64.3799,54.0598) and (64.6599,53.8398)..(64.6599,53.48)
+ --(64.6599,52.8298)..controls (64.6599,52.47) and (64.3799,52.1799)..(64.0898,52.1799)
+ --(61.3499,52.1799)..controls (60.99,52.1799) and (60.7,52.47)..(60.7,52.8298)
+ --(60.7,53.48)..controls (60.7,53.8398) and (60.99,54.0598)..(61.3499,54.0598)
+ --cycle;
+drawoptions (withcolor (0,0.2,1));
+pickup pencircle scaled 1.44bp;
+draw (61.3499,54.0598)--(64.0899,54.0598)..controls (64.3799,54.0598) and (64.6599,53.8398)..(64.6599,53.48)
+ --(64.6599,52.8298)..controls (64.6599,52.47) and (64.3799,52.1799)..(64.0899,52.1799)
+ --(61.3499,52.1799)..controls (60.99,52.1799) and (60.7,52.47)..(60.7,52.8298)
+ --(60.7,53.48)..controls (60.7,53.8398) and (60.99,54.0598)..(61.3499,54.0598)
+ --cycle;
+drawoptions (withcolor (0.9,0.95,1));
+pickup pencircle scaled 0bp;
+fill (118.74,51.46)--(119.6,51.46)..controls (119.89,51.46) and (120.1,51.6099)..(120.1,51.97)
+ --(120.1,54.7)..controls (120.1,54.99) and (119.89,55.21)..(119.6,55.21)
+ --(118.74,55.21)..controls (118.38,55.21) and (118.23,54.99)..(118.23,54.7)
+ --(118.23,51.97)..controls (118.23,51.6099) and (118.38,51.46)..(118.74,51.46)
+ --cycle;
+drawoptions (withcolor (0,0.2,1));
+pickup pencircle scaled 0.86bp;
+draw (118.74,51.46)--(119.6,51.46)..controls (119.89,51.46) and (120.1,51.6098)..(120.1,51.97)
+ --(120.1,54.7)..controls (120.1,54.99) and (119.89,55.21)..(119.6,55.21)
+ --(118.74,55.21)..controls (118.38,55.21) and (118.23,54.99)..(118.23,54.7)
+ --(118.23,51.97)..controls (118.23,51.6098) and (118.38,51.46)..(118.74,51.46)
+ --cycle;
+drawoptions (withcolor (0.9,0.95,1));
+pickup pencircle scaled 0bp;
+fill (117.73,56)--(120.46,56)..controls (120.75,56) and (120.97,55.7798)..(120.97,55.4199)
+ --(120.97,54.7798)..controls (120.97,54.49) and (120.75,54.2)..(120.46,54.2)
+ --(117.73,54.2)..controls (117.37,54.2) and (117.08,54.49)..(117.08,54.7798)
+ --(117.08,55.4199)..controls (117.08,55.7798) and (117.37,56)..(117.73,56)
+ --cycle;
+drawoptions (withcolor (0,0.2,1));
+pickup pencircle scaled 1.44bp;
+draw (117.73,56)--(120.46,56)..controls (120.75,56) and (120.97,55.7798)..(120.97,55.4199)
+ --(120.97,54.7798)..controls (120.97,54.49) and (120.75,54.2)..(120.46,54.2)
+ --(117.73,54.2)..controls (117.37,54.2) and (117.08,54.49)..(117.08,54.7798)
+ --(117.08,55.4199)..controls (117.08,55.7798) and (117.37,56)..(117.73,56)
+ --cycle;
+drawoptions (withcolor (0.6,0.3,0));
+pickup pencircle scaled 0bp;
+fill (51.7,90.3398)--(52.7798,90.3398)..controls (53.1399,90.3398) and (53.3599,90.6299)..(53.3599,90.99)
+ --(53.3599,94.2998)..controls (53.3599,94.6599) and (53.1399,94.8799)..(52.7798,94.8799)
+ --(51.7,94.8799)..controls (51.3398,94.8799) and (51.1299,94.6599)..(51.1299,94.2998)
+ --(51.1299,90.99)..controls (51.1299,90.6299) and (51.3398,90.3398)..(51.7,90.3398)
+ --cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 0.86bp;
+draw (51.7,90.3399)--(52.7798,90.3399)..controls (53.1399,90.3399) and (53.3599,90.6299)..(53.3599,90.99)
+ --(53.3599,94.2998)..controls (53.3599,94.6599) and (53.1399,94.8799)..(52.7798,94.8799)
+ --(51.7,94.8799)..controls (51.3398,94.8799) and (51.1299,94.6599)..(51.1299,94.2998)
+ --(51.1299,90.99)..controls (51.1299,90.6299) and (51.3398,90.3399)..(51.7,90.3399)
+ --cycle;
+drawoptions (withcolor (1,1,1));
+pickup pencircle scaled 0bp;
+fill (50.48,95.8899)--(53.7898,95.8899)..controls (54.22,95.8899) and (54.5098,95.5999)..(54.5098,95.24)
+ --(54.5098,94.3799)..controls (54.5098,93.9399) and (54.22,93.6599)..(53.7898,93.6599)
+ --(50.48,93.6599)..controls (50.1199,93.6599) and (49.8298,93.9399)..(49.8298,94.3799)
+ --(49.8298,95.24)..controls (49.8298,95.5999) and (50.1199,95.8899)..(50.48,95.8899)
+ --cycle;
+drawoptions (withcolor (0.3,0.3,0.3));
+pickup pencircle scaled 1.44bp;
+draw (50.48,95.8899)--(53.7898,95.8899)..controls (54.22,95.8899) and (54.5098,95.5998)..(54.5098,95.24)
+ --(54.5098,94.3799)..controls (54.5098,93.9399) and (54.22,93.6599)..(53.7898,93.6599)
+ --(50.48,93.6599)..controls (50.1199,93.6599) and (49.8298,93.9399)..(49.8298,94.3799)
+ --(49.8298,95.24)..controls (49.8298,95.5998) and (50.1199,95.8899)..(50.48,95.8899)
+ --cycle;
+drawoptions (withcolor (0.2,0.2,0.2));
+draw (53,92.6499)..controls (53,88.8298) and (55.2998,80.4099)..(57.5398,76.8799)
+ ..controls (59.7698,73.3498) and (63.5798,67.8799)..(63.5798,67.8799);
+pickup pencircle scaled 2.02bp;
+draw (63.1499,52.26)..controls (63.1499,52.26) and (57.0298,49.5198)..(41.98,52.98)
+ ..controls (26.9399,56.3599) and (16.8599,66.01)..(15.8498,66.2998);
+drawoptions (withcolor (0.9,0,0));
+pickup pencircle scaled 0bp;
+fill (87.7,123.46)--(94.5398,123.46)--(94.5398,113.89)
+ --(87.7,113.89)--(87.7,123.46)--cycle;
+endfig;
+end
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-basics.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-basics.tex
index a52c7a35a63..479f396022b 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-basics.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-basics.tex
@@ -51,8 +51,8 @@ wish, your comments, your grocery list, whatever. Comments in \METAPOST, prefixe
by a percent sign, as in \typ {% Let's draw a circle}, are ignored by the
interpreter, but useful reminders for the programmer.
-If the file is saved as \type {yourfile.mp}, then the file is processed by
-\METAPOST\ by issuing the following command:
+Traditionally, if the file is saved as \type {yourfile.mp}, then the file is
+processed by \METAPOST\ by issuing the following command:
\starttyping
mpost yourfile
@@ -88,7 +88,7 @@ If you have installed \CONTEXT, somewhere on your system there resides a file
following line at the top of your file:
\starttyping
-input mp-tool ; % or input metafun ;
+input metafun ;
\stoptyping
By loading this file, the resulting graphic will provide a high resolution
@@ -96,10 +96,44 @@ bounding box, which enables more accurate placement. The file also sets the \typ
{prologues := 1} so that viewers like \GHOSTVIEW\ can refresh the file when it is
changed.
+{\bf However!} When you use \METAPOST\ in \CONTEXT, you will not run the
+mentioned program at all: you embed your graphic in the document and we will
+discuss this later. You can still use separate files but then you process them as
+follows:
+
+\starttyping
+mtxrun --script metapost somefile.mp
+\stoptyping
+
+Alternatively you can wrap the individual pictures in a \TEX\ file, say \type
+{yourfile.tex}:
+
+\starttyping
+\starttext
+ \startMPpage
+ % code
+ \stopMPpage
+ \startMPpage
+ % code
+ \stopMPpage
+\stoptext
+\stoptyping
+
+and then run:
+
+\starttyping
+context somefile.tex
+\stoptyping
+
+after which you can use the resulting \PDF\ file (if it has more pages you just
+filter the page from that file).
+
Next we will introduce some more \METAPOST\ commands. From now on, we will omit
the encapsulating \type {beginfig} and \type {endfig} macros. If you want to
process these examples yourself, you should add those commands yourself, or if
-you use \CONTEXT\ you don't need them at all.
+you use \CONTEXT\ you don't need them at all. You can for instance wrap them in a
+\type {\startMPpage} \unknown\ \type {\stopMPpage} environment if you want to
+play around.
\startbuffer
pickup pencircle scaled .5cm ;
@@ -463,7 +497,7 @@ draw boundingcircle p withpen pencircle scaled 1mm withcolor .625yellow ;
You can consider the \type {boundingcircle} to be a round boundingbox.
-\startlinecorrection
+\startlinecorrection[blank]
\startcombination[nx=3,ny=1,location=middle]
{\processMPbuffer[a]} {square}
{\processMPbuffer[b]} {circle}
@@ -776,9 +810,9 @@ draw
{\def\Xcom{2}\def\Ycom{3}\def\Zcom{\the\textwidth }}
Chapter 3 of the \METAFONT\ book explains the mathematics behind the construction
-of curves. Both \METAFONT\ and \METAPOST\ implement B\'ezier curves. The fact
-that these curves are named after Pierre B\'ezier obscures the fact that the math
-behind them originates with Serge\u{\i} Bernshte\u{\i}n.
+of curves. Both \METAFONT\ and \METAPOST\ implement Bézier curves. The fact that
+these curves are named after Pierre Bézier obscures the fact that the math behind
+them originates with SergeÄ­ BernshteÄ­n.
The points on the curve are determined by the following formula:
@@ -2875,6 +2909,20 @@ The leftmost shape uses \type {eofill} and therefore the odd||even rule gets
applied. This time we follow the line and when it gets crossed en even number of
times the area will not be filled.
+Here is another example:
+
+\startbuffer
+eofill for i=1 upto 12: fullcircle scaled ((i/12)*cm) -- endfor cycle ;
+\stopbuffer
+
+\typebuffer
+
+The successive larger circle are unfilled and basically form one path:
+
+\startlinecorrection[blank]
+\processMPbuffer
+\stoplinecorrection
+
A glyph is often constructed from more than one path and eventually the shape is
filled with an odd||even fill (\type {eofill}) operation. Take the following
sequence:
@@ -3363,7 +3411,43 @@ context("%3!texexp!", 10.4698E30,"@2.3f","@2i")
\typebuffer
-This gives: \inlinebuffer .
+This gives: \inlinebuffer . In \in {figure} [fig:formatters] we see some more
+formatters.
+
+\startbuffer
+for i=1 upto 12 :
+ draw
+ thefmttext("\letterpercent 3!date!","month,space,year",2019,i)
+ shifted (0,i *cm / 2);
+ draw
+ thefmttext("@3!date!","month,space,year",2019,i)
+ shifted (4cm,i *cm / 2);
+endfor ;
+
+for i=1 upto 20 :
+ draw
+ thefmttext(decimal i)
+ shifted (1cm,-i/2*cm);
+ draw
+ thefmttext("@!month!",i)
+ shifted (4cm,-i/2*cm);
+ draw
+ thefmttext("@!weekday!",i)
+ shifted (7cm,-i/2*cm);
+ draw
+ thefmttext("@!monthshort!",i)
+ shifted (10cm,-i/2*cm);
+ draw
+ thefmttext("@3!dayoftheweek!",i,1,2018)
+ shifted (13cm,-i/2*cm);
+endfor ;
+\stopbuffer
+
+\typebuffer
+
+\startplacefigure[title=formatters,reference=fig:formatters]
+ \framed{\scale[width=.8\textwidth]{\processMPbuffer}}
+\stopplacefigure
\stopsection
@@ -3582,6 +3666,213 @@ a default value of 20.
\stopsection
+\startsection[title=Grouping]
+
+The grouping model in \METAPOST\ is kind of special. Basically anything that
+happens in a group is processed in some nested action and doesn't interfere with
+the outside. However, the last value put (back) into the input is picked up after
+the group. A \type {vardef} acts that way:
+
+\startbuffer
+vardef foo (expr i, j) =
+ save ii, jj ; ii := 2*i ; jj :=j/2 ;
+ (i, j) -- (ii,jj)
+enddef ;
+
+draw (foo(1,2) .. foo(5,1) .. foo(12,3))
+ ysized 1cm
+ withpen pencircle scaled 2mm
+ withcolor darkred ;
+
+draw boundingbox currentpicture withcolor darkyellow ;
+\stopbuffer
+
+\typebuffer
+
+This weird shape comes out:
+
+\startlinecorrection[blank]
+ \processMPbuffer
+\stoplinecorrection
+We save two variables, and then give new local numerics with their names some
+values. Then we \quote {return} a path. A \type {vardef} automatically starts
+with a \type {begingroup} and ends with an \type {endgroup}. The next example
+shows how we can use that grouping trick directly. The \type {--} has to come
+before the \type {begingroup}.
+
+\startbuffer
+vardef turtle expr p =
+ save a ; pair a ; a := point 0 of p ; a
+ for i = 1 upto length(p) if cycle p : - 1 fi :
+ -- begingroup a := a shifted point i of p ; a endgroup
+ endfor
+ if cycle p : -- cycle fi
+enddef ;
+
+draw ((0, 0) -- (10, 0) -- (100, 10) -- (-5,20) -- cycle)
+ withpen pencircle scaled 2 withcolor darkred ;
+draw turtle ((0, 0) -- (10, 0) -- (100, 10) -- (-5,20) -- cycle)
+ withpen pencircle scaled 2 withcolor darkyellow ;
+\stopbuffer
+
+\typebuffer
+
+Turtle graphics use relative positions. Actually they use one number and switch
+direction but the above is okay too. Effectively we loop over the path and use
+each point as a relative move, so we recalculate it.
+
+\startlinecorrection[blank]
+ \processMPbuffer
+\stoplinecorrection
+
+We could have said \type {-- hide(a := a shifted point i of p) a} because the
+\type {hide} macro does that the grouping trick.
+
+\stopsection
+
+\startsection[title=External files]
+
+You can put code in an external file and load that one when needed. The low level
+command is \type {input}:
+
+\starttyping
+input myfile ;
+input myfile.mp ;
+input myfile.mpiv ;
+input myfile.mpxl ;
+input "myfile.mpxl" ;
+\stoptyping
+
+In \CONTEXT\ we have modules and their name starts with \type {mp-} and the
+suffix can depend on what version you use (\type {mpii}, \type {mpiv}, \type
+{mpxl}) but that will be dealt with automatically.
+
+\starttyping
+loadmodule("mine") ;
+\stoptyping
+
+This will locate \type {mp-mine} with the proper suffix and often a module will
+be set up to be loaded only once. For loading files \LUAMETAFUN\ provides:
+
+\starttyping
+loadfile("somefile.mp") ;
+\stoptyping
+
+Which is a bit more robust than the \type {input} commands that is kind of fuzzy
+because it takes a sequence of tokens or a string. When you embed code in a
+document source there are some environments that permit loading of definitions
+and extensions.
+
+\starttyping
+\startMPdefinitions
+ % code passed to the library directly
+\stopMPdefinitions
+
+\startMPextensions
+ % code passed to the library but via tex (expansion step)
+\stopMPextensions
+\stoptyping
+
+\stopsection
+
+\startsection[title=Instances]
+
+The library supports several numbering models. The default is \type {scaled} that
+uses integers that represent a (relatively small) float. Although you can go up
+to 32K it's wise to stay below 4096. The \type {double} number model supports 64
+bit floating point and the \type {decimal} model arbitrary precision. In \LUATEX\
+there is also \type {binary} for arbitrary precision but in \LUAMETATEX\ that
+model is not provided.
+
+You can use different models and instances alongside. In \MKIV\ and \LMTX\ we have
+a few predefined. The \type {metafun} instance is the default. Here we show the
+ones that use \METAFUN:
+
+\starttyping[style=\ttx]
+\defineMPinstance[metafun] [format=metafun,extensions=yes,initializations=yes]
+\defineMPinstance[minifun] [format=minifun,extensions=yes,initializations=yes]
+\defineMPinstance[extrafun] [format=metafun,extensions=yes,initializations=yes]
+\defineMPinstance[lessfun] [format=metafun]
+\defineMPinstance[doublefun] [format=metafun,extensions=yes,initializations=yes,method=double]
+\defineMPinstance[decimalfun][format=metafun,extensions=yes,initializations=yes,method=decimal]
+\defineMPinstance[mprun] [format=metafun,extensions=yes,initializations=yes]
+\defineMPinstance[simplefun] [format=metafun,method=double] % for internal usage
+\stoptyping
+
+All instances will load additional definitions btu extensions (expanded
+definitions) and initializations (before each graphic) are optional.
+
+\starttyping
+\startMPdefinitions
+\stopMPdefinitions
+
+\startMPextensions
+\stopMPextensions
+
+\startMPinitializations
+\stopMPinitializations
+\stoptyping
+
+You can search the sources of manuals and test suite for examples of usage, but here are
+some:
+
+\startbuffer
+\defineMPinstance[foo][definitions=yes]
+\defineMPinstance[bar][definitions=yes]
+
+\startMPdefinitions{foo}
+ vardef p = image (
+ draw fullsquare scaled 1cm withcolor "darkgreen" ;
+ draw textext("1") ;
+ )
+ enddef ;
+\stopMPdefinitions
+
+\startMPdefinitions{bar}
+ vardef p = image (
+ draw (fullsquare rotated 45) scaled 1cm withcolor "darkyellow" ;
+ draw textext("2") ;
+ )
+ enddef ;
+\stopMPdefinitions
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We use both as:
+
+\startbuffer[demo-1]
+\startMPcode{foo}
+ draw p ;
+ draw image (
+ draw fullcircle scaled 1cm withcolor "darkblue" ;
+ draw textext("3") withcolor "darkred" ;
+ ) ;
+ draw p ;
+\stopMPcode
+\stopbuffer
+
+\startbuffer[demo-2]
+\startMPcode{bar}
+ draw p ;
+ draw image (
+ draw fullcircle scaled 1cm withcolor "darkblue" ;
+ draw textext("4") withcolor "darkred" ;
+ ) ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[demo-1,demo-2]
+
+\startlinecorrection
+\startcombination[nx=2,ny=1]
+ {\getbuffer[demo-1]} {foo}
+ {\getbuffer[demo-2]} {bar}
+\stopcombination
+\stoplinecorrection
+
+\stopsection
+
\stopchapter
\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-debugging.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-debugging.tex
index 4174d34e10b..f8957b5d834 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-debugging.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-debugging.tex
@@ -56,9 +56,8 @@ parent point with thin lines.
\processMPbuffer
\stoplinecorrection
-You can deduce the direction of a path from the way the
-points are numbered, but using an arrow to indicate the
-direction is more clear.
+You can deduce the direction of a path from the way the points are numbered, but
+using an arrow to indicate the direction is more clear.
\startbuffer
path p ; p := fullcircle xscaled 4cm yscaled 3cm ;
@@ -376,6 +375,238 @@ When we overlay these three we get. The envelope only returns the outer curve.
\stopoverlay
\stoplinecorrection
+We show a few nore examples and let it to the user to come up with applications
+for this feature. We start by defining a scaled pen that we apply to a simple
+path that has three point.
+
+\startbuffer
+pen whateverpen ; whateverpen := makepen(fullcircle xyscaled(1/20,1/40));
+
+path p ; p := (origin .. (1,1/2) .. (1,1/4)) scaled 10 ;
+path q ; q := envelope whateverpen of p ;
+
+draw p withpen pencircle xyscaled(1/2,1/4)
+ withcolor "darkgreen" withtransparency (1,.5) ;
+drawpoints p withpen pencircle scaled 1
+ withcolor "darkgray" withtransparency (1,.5) ;
+drawcontrolpoints p withpen pencircle scaled 1/2
+ withcolor "darkmagenta" withtransparency (1,.5) ;
+
+currentpicture := currentpicture shifted (-20,0) ;
+
+draw p withpen pencircle xyscaled(1/2,1/4)
+ withcolor "darkgreen" withtransparency (1,.5) ;
+draw q withpen pencircle scaled 1/5
+ withcolor "darkblue" withtransparency (1,.5) ;
+drawpoints q withpen pencircle scaled 1
+ withcolor "darkgray" withtransparency (1,.5) ;
+drawcontrolpoints q withpen pencircle scaled 1/2
+ withcolor "darkyellow" withtransparency (1,.5) ;
+draw q withpen pencircle scaled 1/50
+ withcolor "white" ;
+
+currentpicture := currentpicture ysized 2cm ;
+\stopbuffer
+
+\typebuffer
+
+On the left we see the path drawn with a circular pen. The points and control
+points are also shown. The path is repeated on the right but there it gets the
+envelope overlayed. We show the points and control points of the envelope: they
+nearly overlap but that depends of course on the used pen.
+
+\startlinecorrection[blank]
+ \processMPbuffer
+\stoplinecorrection
+
+In order to illustrate that the envelope is an outline we blow up a piece of
+this image:
+
+\startlinecorrection[blank]
+ \scale[height=3cm]{\clip[nx=10,ny=20,x=9,y=7]{\processMPbuffer}}
+\stoplinecorrection
+
+Without further explanation we let you ponder the results of the following code.
+
+\startbuffer
+drawoptions(withcolor "darkred") ;
+draw (envelope pensquare of (up--left)) ;
+draw (up--left) shifted (4,0) withpen pensquare ;
+draw fullcircle shifted (8,0) ;
+draw (envelope pensquare of fullcircle) shifted (12,0) ;
+draw (fullcircle) shifted (16,0) withpen pensquare ;
+draw (fullcircle) shifted (20,0) withpen pencircle ;
+currentpicture := currentpicture xsized TextWidth ;
+\stopbuffer
+
+\typebuffer
+
+The efficiency of the output of each draw differs a lot because circles are made
+from eight points and because a transformed pen results in two paths. Normally
+that is not something you have to loose sleep over.
+
+\startlinecorrection[blank]
+ \processMPbuffer
+\stoplinecorrection
+
+\stopsection
+
+\startsection[title=Performance]
+
+On the average performance of \METAPOST\ is quite okay. The original program uses
+scaled numbers, which are floats packed into an integer. The library also
+supports doubles, decimal and binary number models. In \CONTEXT\ we only support
+scaled, double and decimal. Because the library has to support multiple models
+there is more overhead and therefore it is also slower. There's also more dynamic
+memory allocation going on. In the transition from \MKII\ to \MKIV\ some of the
+critical code (like the code involved in passing \TEX\ states to \METAPOST) had
+to be optimized, although when the \LUA\ interface was added, betters ways became
+possible. We have to accept the penalty in performance and often can gain back a
+lot because we have the \LUA\ interface.
+
+One of the main bottlenecks in storing quantities. \footnote {Recently, Taco
+Hoekwater has done some excellent explanations about the way \METAPOST\ scans the
+input and create variables and you can find his presentations at meetings on the
+\CONTEXT\ garden.} When we see something \type {a[1]} and \type {a[3]} the \type
+{a} is a root variable and the \type {1} and {3} are entries in a linked list
+from that root. It's not an array in the sense that there is some upper bound and
+that there's also a slot \type {2}. There is order but the list is sparse. When
+access is needed, for instance to do some calculations, a linear lookup (from the
+head of the list) takes place. This is quite okay performance wise because
+normally these list are small. The same is true for a path, which is also a
+linked list. If you need point 25, it is looked up by starting at the first knot
+of the path. The longer the path, the more time it takes to reach arbitrary
+points. In the \LUA\ chapter we give an example of how to get around that
+limitation.
+
+Concerning the arrays, here is s trick to get around a performance bottleneck:
+
+\starttyping
+numeric foo[];
+
+def set_foo(expr c, s) =
+ foo[c] := s ;
+enddef ;
+
+def get_foo(expr c) =
+ foo[c]
+enddef ;
+\stoptyping
+
+If you use this as follows:
+
+\starttyping
+numeric n ; n = 123 ;
+
+for i=1 upto 20000 :
+ set_foo(i,n) ;
+endfor ;
+
+for i=1 upto 20000 :
+ n := get_foo(i) ;
+endfor ;
+\stoptyping
+
+the runtime can (for instance) be 3.3 seconds, but when you use the following
+variant, it goes down to 0.13 seconds.
+
+\starttyping
+numeric foo[][][][]; % 12345 : 1 12 123 44 instead of 12344
+
+def set_foo(expr c, s) =
+ foo[c div 10000][c div 1000][c div 100][c] := s ;
+enddef ;
+def get_foo(expr c) =
+ foo[c div 10000][c div 1000][c div 100][c]
+enddef ;
+\stoptyping
+
+This time the lookup is not split into phases each being relatively fast. So, in
+order to reach slot 1234 the engine doesn't have to check and jump over what
+comes before that. You basically create a tree here: 0 (hit), 1000 (hit in one),
+200 (hit in two), 34 (hit in 34). We could go to a single digit but that doesn't
+save much. Before we had ways to store data at the \LUA\ end we used this a few
+times in macros that dealt with data (like Alan Braslau's node and graphics
+modules). This is typically something one can figure out by looking at the (non
+trivial) source code.
+
+Here is another example. In \LUA\ we can easily create a large file, like this:
+
+\starttyping
+\startluacode
+ local t = { }
+ for i=1,10000 do
+ t[i] = string.rep(
+ "here we have number " ..
+ tostring(i) ..
+ " out of the 10000 numbers that we will test"
+ ,100)
+ end
+ t = table.concat(t,"\n")
+ io.savedata("foo1.tmp",t)
+ io.savedata("foo2.tmp",t)
+ io.savedata("foo3.tmp",t)
+\stopluacode
+\stoptyping
+
+We make two copies because we do two experiments and we want to treat them equal with
+respect to caching.
+
+\starttyping
+\startMPcode
+ string f ; f := "foo1.tmp" ;
+ string s[] ;
+ numeric n ; n := 0 ;
+ for i=1 upto 10000 :
+ s[i] := readfrom f ;
+ exitif s[i] = EOF ;
+ n := n + 1 ;
+ endfor ;
+\stopMPcode
+\stoptyping
+
+Say that this runs in 2.2 seconds, how come that the next one runs in 1.7 seconds
+instead?
+
+\starttyping
+\startMPcode
+ string f ; f := "foo2.tmp" ;
+ string s[] ;
+ string ss ;
+ numeric n ; n := 0 ;
+ for i=1 upto 10000 :
+ ss := readfrom f ;
+ exitif ss = EOF ;
+ s[i] := ss ;
+ n := n + 1 ;
+ endfor ;
+\stopMPcode
+\stoptyping
+
+The main reason is that the first case we have two lookups in the linked list
+that determines variable \type {s} and the longer the list, the more time it will
+take. In the second case we use an intermediate variable. Although that means
+extra memory (de)allocation it still pays of. In practice you don't need to worry
+too much about it but of course we can again follow the tree approach:
+
+\startMPcode
+ string f ; f := "foo3.tmp" ;
+ string s[][][] ;
+ string ss ;
+ numeric n ; n := 0 ;
+ for i=1 upto 10000 :
+ ss := readfrom f ;
+ exitif ss = EOF ;
+ s[i div 1000][i div 100][i] := ss ;
+ n := n + 1 ;
+ endfor ;
+\stopMPcode
+
+This time we go down to 1.5 second. Timings could be a bit different in \MKIV\ and
+\LMTX\ because in \LUAMETATEX\ all \METAPOST\ file \IO\ goes through \LUA\ but the
+relative performance gains are the same. With \LUATEX\ and \MKIV\ I measures
+2.9, 2.5 and 2.1 and with \LUAMETATEX\ and \LMTX\ I got 2.3, 1.7 and 1.5.
+
\stopsection
\stopchapter
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-effects.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-effects.tex
index 74e7d487e9e..6c020acda90 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-effects.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-effects.tex
@@ -363,9 +363,9 @@ moment shading is only supported in \PDF. In the following examples, we will use
the next three colors:
\startbuffer
-\definecolor[a][darkyellow]
-\definecolor[b][s=.8]
-\definecolor[c][darkred]
+\definecolor[mycolora][darkyellow]
+\definecolor[mycolorb][s=.8]
+\definecolor[mycolorc][darkred]
\stopbuffer
\typebuffer
@@ -386,13 +386,13 @@ First we discuss the old method which is still valid and also available in
\startuniqueMPgraphic{CircularShade}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
- circular_shade(p,0,\MPcolor{a},\MPcolor{b}) ;
+ circular_shade(p,0,\MPcolor{mycolora},\MPcolor{mycolorb}) ;
\stopuniqueMPgraphic
\startuniqueMPgraphic{LinearShade}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
- linear_shade(p,0,\MPcolor{a},\MPcolor{b});
+ linear_shade(p,0,\MPcolor{mycolora},\MPcolor{mycolorb});
\stopuniqueMPgraphic
\stopbuffer
@@ -458,7 +458,7 @@ stepping through the color values, we can use the more efficient and generalized
width := \overlaywidth ;
height := \overlayheight ;
path p ; p := unitsquare xscaled width yscaled height ;
- #2_shade(p,#3,\MPcolor{a},\MPcolor{b}) ;
+ #2_shade(p,#3,\MPcolor{mycolora},\MPcolor{mycolorb}) ;
\stopuniqueMPgraphic
\defineoverlay[shade-#1][\uniqueMPgraphic{shade-#1}]%
\framed[background=shade-#1,width=2cm,height=2cm,frame=off]{}}
@@ -501,7 +501,7 @@ stepping through the color values, we can use the more efficient and generalized
% \startbuffer
% path p ; p := fullcircle scaled 1cm ;
% for i=0 step 2cm until 8cm :
-% circular_shade(p shifted (i,0),0,\MPcolor{a},\MPcolor{b}) ;
+% circular_shade(p shifted (i,0),0,\MPcolor{mycolora},\MPcolor{mycolorb}) ;
% endfor ;
% \stopbuffer
%
@@ -518,7 +518,7 @@ stepping through the color values, we can use the more efficient and generalized
% the center of the shading stays at the first circle.
%
% \startbuffer
-% circular_shade(fullcircle scaled 1cm,0,\MPcolor{a},\MPcolor{b}) ;
+% circular_shade(fullcircle scaled 1cm,0,\MPcolor{mycolora},\MPcolor{mycolorb}) ;
% picture s ; s := currentpicture ; currentpicture := nullpicture ;
% for i=0 step 2cm until 8cm :
% addto currentpicture also s shifted (i,0) ;
@@ -544,7 +544,7 @@ stepping through the color values, we can use the more efficient and generalized
\startbuffer
sh := define_circular_shade
- (origin,origin,0,8cm,\MPcolor{a},\MPcolor{b}) ;
+ (origin,origin,0,8cm,\MPcolor{mycolora},\MPcolor{mycolorb}) ;
for i=0 step 2cm until 8cm :
fill fullcircle scaled 1cm shifted (i,0) withshade sh ;
endfor ;
@@ -570,9 +570,9 @@ the shade. The next macro demonstrates the principles in a different way.
def test_shade (expr a, b, ra, rb) =
pickup pencircle scaled 1mm ;
- color ca ; ca := \MPcolor{a} ;
- color cb ; cb := \MPcolor{b} ;
- color cc ; cc := \MPcolor{c} ;
+ color ca ; ca := \MPcolor{mycolora} ;
+ color cb ; cb := \MPcolor{mycolorb} ;
+ color cc ; cc := \MPcolor{mycolorc} ;
path pa ; pa := fullcircle scaled 2ra shifted a ;
path pb ; pb := fullcircle scaled 2rb shifted b ;
@@ -640,9 +640,9 @@ test_shade(origin shifted (.25cm,0), origin, .50cm, 1cm) ;
def test_shade (expr a, b) =
pickup pencircle scaled 1mm ;
- color ca ; ca := \MPcolor{a} ;
- color cb ; cb := \MPcolor{b} ;
- color cc ; cc := \MPcolor{c} ;
+ color ca ; ca := \MPcolor{mycolora} ;
+ color cb ; cb := \MPcolor{mycolorb} ;
+ color cc ; cc := \MPcolor{mycolorc} ;
sh := define_linear_shade(a,b,ca,cb) ;
@@ -1472,8 +1472,8 @@ graphics in \PNG, \PDF, and \JPG\ format, or more precise: those formats
supported by \PDFTEX.\pagereference[hacker]
\startbuffer
-draw externalfigure "hacker.png" scaled 5cm shifted (-6cm,0) ;
-draw externalfigure "hacker.png" scaled 5cm slanted .5 ;
+draw externalfigure "hacker.png" xsized 5cm shifted (-6cm,0) ;
+draw externalfigure "hacker.png" xsized 5cm slanted .5 ;
\stopbuffer
\typebuffer
@@ -1497,7 +1497,7 @@ for i := 1 upto 5 :
c := .5(s,s) ; % center of picture
d := (2cm*i,.5cm) randomized .5cm ; % displacement
draw externalfigure "hacker.png"
- scaled s rotatedaround (c,0 randomized 30) shifted d ;
+ ysized s rotatedaround (c,0 randomized 30) shifted d ;
endfor ;
\stopbuffer
@@ -1516,7 +1516,7 @@ figure inclusion and shading.
\startbuffer
picture p ;
-p := externalfigure "hacker.png" scaled 150pt ;
+p := externalfigure "hacker.png" xsized 150pt ;
clip p to unitcircle scaled 150pt ;
circular_shade(boundingbox p enlarged 10pt, 0, .2red, .9red) ;
addto currentpicture also p ;
@@ -2222,10 +2222,10 @@ The \type {simple} option disables all. The simple results are shown in
When you use this feature you need to be aware of the fact that fonts can have
features, for instance ligatures and kerns between characters. In \in {figure}
-[fig:outlines:features] we see a few examples with and without features, one with
-Pagella (the Zapf quote) and one with Optima Nova (the Tufte quote).
+[fig:outlines:features] we see a few examples, one with Pagella (the Zapf quote)
+and one with Dejavu (the Tufte quote).
-\startplacefigure[reference=fig:outlines:features,title={Pagela (\OPENTYPE) and Optima Nova (\TYPEONE)}]
+\startplacefigure[reference=fig:outlines:features,title={Pagela and Dejavu}]
\startcombination[1*4]
\bgroup
\def|#1|{-}%
@@ -2249,24 +2249,24 @@ Pagella (the Zapf quote) and one with Optima Nova (the Tufte quote).
\egroup {pagella / default features}
\bgroup
\def|#1|{-}%
- \definedfont[lt55476.afm*none]% optima nova
+ \definedfont[dejavuserif.ttf*none]%
\startMPcode
draw outlinetext.b
("\framed[align=normal,width=max]{\input{tufte}}")
(withcolor .375white)
(withcolor .625green withpen pencircle scaled 1/10) ;
\stopMPcode
- \egroup {optima nova / no features}
+ \egroup {dejavu serif / no features}
\bgroup
\def|#1|{-}%
- \definedfont[lt55476.afm*default]% optima nova
+ \definedfont[dejavuserif.ttf*default]%
\startMPcode
draw outlinetext.b
("\framed[align=normal,width=max]{\input{tufte}}")
(withcolor .375white)
(withcolor .625yellow withpen pencircle scaled 1/10) ;
\stopMPcode
- \egroup {optima nova / default features}
+ \egroup {dejavu serif / default features}
\stopcombination
\stopplacefigure
@@ -2287,6 +2287,219 @@ like:
\processMPbuffer
\stoplinecorrection
+The next example needs the \type {hanbatang-lvt.ttf} font so when you process this
+you might want to install that first. In \MKIV\ and \LMTX\ you can put that font
+in \typ {<texroot>/texmf-fonts/data/hanbantang} or a similar path.
+
+We start by defining the font:
+
+% \definefontfeature
+% [korean-base]
+% [goodies=hanbatanglvt,
+% colorscheme=default,
+% mode=node,
+% script=hang,
+% language=kor]
+
+\startbuffer
+\definefontfeature
+ [korean-base]
+ [goodies=hanbatanglvt,
+ colorscheme=default,
+ mode=node,
+ script=hang,
+ language=kor]
+
+\definefont[KoreanFont][hanbatanglvt*korean-base]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Next we define a macro that will draw the outline:
+
+\startbuffer
+\startMPdefinitions
+ string KoreanColors[] ;
+
+ KoreanColors[1] := "darkred" ;
+ KoreanColors[2] := "darkgreen" ;
+ KoreanColors[3] := "darkblue" ;
+ KoreanColors[4] := "darkyellow" ;
+ KoreanColors[5] := "darkgray" ;
+
+ newinternal KoreanSplit ; KoreanSplit := -1 ;
+ newinternal KoreanCode ; KoreanCode := -2 ;
+ newinternal KoreanMode ; KoreanMode := KoreanSplit ;
+
+ def KoreanOutline(expr txt) =
+ picture p ; p := outlinetext.p(txt) ;
+ numeric n ; n := 0 ;
+ string old, new ; old := "" ;
+ for i within p :
+ if KoreanMode == KoreanSplit :
+ n := n + 1 ;
+ elseif KoreanMode == KoreanCode :
+ new := prescriptpart i ;
+ if new <> old :
+ old := new ;
+ n := n + 1 ;
+ fi ;
+ else :
+ n := KoreanMode ;
+ fi ;
+ if unknown KoreanColors[n] :
+ n := 1 ;
+ fi ;
+ draw pathpart i
+ withpen pencircle scaled 1/10
+ withcolor KoreanColors[n] ;
+ endfor ;
+ enddef ;
+
+ def KoreanTest(expr txt) =
+ image (
+ KoreanMode := KoreanSplit ; KoreanOutline(txt) ;
+ currentpicture := currentpicture shifted (- xpart urcorner currentpicture, 0);
+ KoreanMode := KoreanCode ; KoreanOutline(txt) ;
+ currentpicture := currentpicture shifted (- xpart urcorner currentpicture, 0);
+ KoreanMode := 3 ; KoreanOutline(txt) ;
+ )
+ enddef ;
+\stopMPdefinitions
+\stopbuffer
+
+Because we want to reuse this definition, we define it for all what comes:
+
+\typebuffer \getbuffer
+
+% entered as three characters: ᄅ ᅡ ᆺ (mail collapses)
+%
+% \startMPcode KoreanTest("\KoreanFont 랏") ; \stopMPcode
+
+\startbuffer
+\startcombination[3*2]
+ {\startMPcode draw KoreanTest("\KoreanFont ëž") ysized 15mm ; \stopMPcode} {}
+ {\startMPcode draw KoreanTest("\KoreanFont ë…¼") ysized 15mm ; \stopMPcode} {}
+ {\startMPcode draw KoreanTest("\KoreanFont 왕") ysized 15mm ; \stopMPcode} {}
+ {\startMPcode draw KoreanTest("\KoreanFont ë‹­") ysized 15mm ; \stopMPcode} {}
+ {\startMPcode draw KoreanTest("\KoreanFont ë°•") ysized 15mm ; \stopMPcode} {}
+ {\startMPcode draw KoreanTest("\KoreanFont 서") ysized 15mm ; \stopMPcode} {}
+\stopcombination
+\stopbuffer
+
+We use this macro in the following example. The results can be seen in \in
+{figure} [koreanoutlines]. There is one drawback of this example: It contributes
+a lot to the runtime: about 2.5~seconds to a 16~second run without this example.
+\footnote {This is partly due to an enforced intermediate garbage collection
+step.} The font itself loads fast but the outlines take their time because a few
+hundred megabytes of \LUA\ tables are involved. Instead you can define the
+feature to use \typ {goodies=hanbatanglvt} and \typ {colorscheme=default} and
+play with that.
+
+\typebuffer
+
+\startplacefigure[title=Some Korean magic,reference=koreanoutlines]
+ \doifelsemode{optional} {
+ \getbuffer
+ } {
+ \framed{A large optional example is not shown here!}
+ }
+\stopplacefigure
+
+On the mailing list occasionally questions pop op with respect to outlines and
+user Garulfo came up with a neat solution for shaded text. First some examples:
+
+\startbuffer
+\startMPcode
+ picture p ; p := lmt_outline [
+ text = "\strut foo f o o",
+ drawcolor = "white",
+ rulethickness = .2
+ ] ysized 3cm ;
+ fill boundingbox p
+ withshademethod "linear"
+ withshadedirection(0,1)
+ withshadecolors ("darkblue", "darkyellow") ;
+ draw p;
+\stopMPcode
+\stopbuffer
+
+\typebuffer
+
+Here the background shines through the text:
+
+\startlinecorrection \getbuffer \stoplinecorrection
+
+You can actually use the effects features which for a larger text is more
+efficient because it just renders the font differently. The result is
+shown in \in {figure} [fig:effects:text].
+
+\startbuffer[effects-text]
+\startuseMPgraphic{MyShade}
+ fill OverlayBox
+ withshademethod "linear"
+ withshadedirection(0,1)
+ withshadecolors (red, blue) ;
+\stopuseMPgraphic
+
+\defineoverlay[MyShade][\useMPgraphic{MyShade}]
+
+\setupbackgrounds[page][background=MyShade]
+
+\startmakeup
+ \definedfont[SerifBold*default @ 50pt] \setupinterlinespace
+
+ \defineeffect[MyOutline][alternative=outer,rulethickness=1pt]
+
+ \startcolor[white]
+ \starteffect[MyOutline]
+ \input jojomayer
+ \stopeffect
+ \stopcolor
+\stopmakeup
+\stopbuffer
+
+\typebuffer[effects-text]
+
+\startplacefigure[title=Regular text effects,reference=fig:effects:text]
+ \typesetbuffer[effects-text][height=.3\textheight]
+\stopplacefigure
+
+We now come to the neat example:
+
+\startbuffer
+\startMPcode
+ picture tt ; tt := lmt_outline [
+ kind = "fillup",
+ text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
+ ] xsized 12cm ;
+
+ path bb ; bb := boundingbox tt ;
+
+ path pp ; pp := bb enlarged 2cm ;
+
+ fill pp
+ withshademethod "linear"
+ withshadedirection down
+ withshadecolors ("darkred", "darkblue") ;
+
+ for i within tt :
+ nofill pathpart i;
+ endfor ;
+
+ eofill bb withcolor "darkgray" ;
+ clip currentpicture to bb ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer
+
+It uses a clever combination of refilling the shape and background:
+
+\startlinecorrection
+ \getbuffer
+\stoplinecorrection
+
\stopsection
\startsection[title=Transparency groups]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-layout.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-layout.tex
index 409839cbafe..8a30aad7c68 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-layout.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-layout.tex
@@ -71,9 +71,11 @@
\setuppagenumbering
[alternative=doublesided]
+\definefontfallback[moremono] [dejavusansmono] [0x0000-0xFFFF] [rscale=0.85]
+
\definetypeface [metafunbodyfont] [rm] [serif] [pagella] [default]
\definetypeface [metafunbodyfont] [ss] [sans] [modern] [default]
-\definetypeface [metafunbodyfont] [tt] [mono] [modern] [default]
+\definetypeface [metafunbodyfont] [tt] [mono] [modern] [default] [fallbacks=moremono]
\definetypeface [metafunbodyfont] [mm] [math] [palatino] [default]
\setupbodyfont [metafunbodyfont,10pt] % 11 pt and 12pt -> errors due to intersection mess
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment.tex
index ca9fc24b3fa..57875008dbe 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment.tex
@@ -182,24 +182,50 @@
\defineoverlay[titled][\uniqueMPgraphic{titled}]
+% \starttexdefinition unexpanded ChapterCommand #1#2
+% \ifconditional\headshownumber
+% \ifdim\leftmarginwidth<\rightmarginwidth
+% \donetrue
+% \else
+% \donefalse
+% \fi
+% \hskip-\ifdone\leftmargintotal\else\rightmargintotal\fi
+% \framed [
+% background=titled,
+% frame=off,
+% offset=0pt
+% ] {
+% \hbox to \ifdone\leftmarginwidth\else\rightmarginwidth\fi {
+% #1
+% \hss
+% }
+% \hskip\ifdone\leftmargindistance\else\rightmargindistance\fi
+% #2
+% }
+% \else
+% \framed [
+% background=titled,
+% frame=off,
+% offset=0pt
+% ] {
+% #2
+% }
+% \fi
+% \stoptexdefinition
+
\starttexdefinition unexpanded ChapterCommand #1#2
\ifconditional\headshownumber
- \ifdim\leftmarginwidth<\rightmarginwidth
- \donetrue
- \else
- \donefalse
- \fi
- \hskip-\ifdone\leftmargintotal\else\rightmargintotal\fi
+ \hskip-\leftmargintotal\relax
\framed [
background=titled,
frame=off,
offset=0pt
] {
- \hbox to \ifdone\leftmarginwidth\else\rightmarginwidth\fi {
+ \hbox to \leftmarginwidth {
#1
\hss
}
- \hskip\ifdone\leftmargindistance\else\rightmargindistance\fi
+ \hskip\leftmargindistance\relax
#2
}
\else
@@ -316,7 +342,7 @@
\startbuffer[shape-a]
\startuniqueMPgraphic{meta:hash}{linewidth,linecolor,angle,gap}
- if unknown context_back : input mp-back ; fi ;
+ loadmodule("back") ;
some_hash ( OverlayWidth, OverlayHeight ,
\MPvar{linewidth}, \MPvar{linecolor} ,
\MPvar{angle}, \MPvar{gap} ) ;
@@ -343,7 +369,7 @@
\startbuffer[symb-a]
\startuniqueMPgraphic{meta:button}{type,size,linecolor,fillcolor}
- if unknown context_butt : input mp-butt ; fi ;
+ loadmodule("butt") ;
some_button ( \MPvar{type},
\MPvar{size},
\MPvar{linecolor},
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-examples.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-examples.tex
index 4e5e0eed310..5549a3bdd85 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-examples.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-examples.tex
@@ -3264,6 +3264,259 @@ We get:
\stopsection
+\startsection[title=Educational]
+
+I made this example long ago, when some family member had to learn tables by
+heart. For some reason, at school, this is made into a complex issue, with tricks
+and such, even it if only involves only a few numbers. My own experience (if I
+remember right) was that some of these numbers are trivial, and that there is
+quite some symmetry, so in practice only a quarter needs to be remembered. And,
+assuming that you can easily deduct the trivial cases, one can just calculate the
+rest if needed.
+
+\startbuffer
+\start \ttbf \startMPcode
+ def MyDraw(expr i, j, c) =
+ fill fullsquare shifted (i,j) withcolor c withtransparency (1,.5) ;
+ enddef ;
+
+ for i = 1 upto 10 :
+ for j = 1 upto 10 : MyDraw( i, -j, "middlered" ) ; endfor ; endfor ;
+
+ for j = 1 upto 10 : MyDraw( 1, -j, "middleblue" ) ; endfor ;
+ for i = 1 upto 10 : MyDraw( i, -10, "middlegreen" ) ; endfor ;
+ for i = 1 upto 10 : MyDraw( i, -1, "middleyellow") ; endfor ;
+ for j = 1 upto 10 : MyDraw(10, -j, "middlecyan" ) ; endfor ;
+ for j = 1 upto 10 : MyDraw( 5, -j, "middlegray" ) ; endfor ;
+ for j = 1 upto 10 : MyDraw( j, -j, "middlegray" ) ; endfor ;
+
+ draw image ( for i = 1 upto 10 : for j = 1 upto 10 :
+ draw textext(decimal (i*j)) ysized .25 shifted (i,-j) ;
+ endfor ; endfor ; ) withcolor white ;
+
+ currentpicture := currentpicture ysized 10cm ;
+\stopMPcode \stop
+\stopbuffer
+
+\typebuffer
+
+\startplacefigure[title=Overlapping glyphs,reference=fig:tentable]
+ \getbuffer
+\stopplacefigure
+
+Here we use both transparency and colors to stress the reduction of cases. The
+named colors resolve to ones defined at the \TEX\ end. We see the redndering
+\in {figure} [fig:tentable].
+
+\startsection[title=Glyph magic]
+
+The next example is the result of a tread on the mailing list. After Henri Menke
+posted a some glyph overlap code, I made a variant that more suited the way we do
+it in \METAFUN. In the meantime Floris van Maanen had found out that some glyphs
+need a more inventive solution so after that the code evolved. By then the \type
+{outlinetext}, \type {drawoutlinetext} and \type {filloutlinetext} helpers had
+been added to the code base.
+
+Because this is complicated stuff, we just show the two solutions. The first one
+is a relative simple one, the second one uses an approach suggested by Alan
+Braslau and therefore uses some of the code that can be found in the \type
+{crossingunder} macro.
+
+\startbuffer
+\startMPdefinitions
+def ShowOverlapInOutlinesA(expr first, second) =
+ path p_i, p_j, s_i, s_j ;
+ numeric n_i, n_j, index ;
+ pair found ;
+ index := 0 ;
+ for i within first :
+ for j within second :
+ p_i := pathpart i ; n_i := length(p_i) ;
+ p_j := pathpart j ; n_j := length(p_j) ;
+ for ii = 0 upto n_i - 1 :
+ s_i := subpath(ii,ii+1) of p_i ;
+ for jj = 0 upto n_j - 1 :
+ s_j := subpath(jj,jj+1) of p_j ;
+ found := s_i intersection_point s_j ;
+ if intersection_found :
+ index := index + 1 ;
+ drawdot found
+ withpen pencircle scaled 4 withcolor white ;
+ draw textext("\strut\ttbf " & decimal index) ysized 3
+ shifted found ;
+ fi ;
+ endfor ;
+ endfor ;
+ endfor ;
+ endfor ;
+enddef ;
+\stopMPdefinitions
+\stopbuffer
+
+\typebuffer \getbuffer
+
+This is the solution based on \type {crossingunder}, a macro that has been
+introduced as part of Alan's neat node module.
+
+\startbuffer
+\startMPdefinitions
+def ShowOverlapInOutlinesB(expr first, second) =
+ begingroup ;
+ save p, q, n, t, a, b, c, bcuttings, hold, found ;
+ path p, q ;
+ numeric n, hold ;
+ path a, b, c, bcuttings ;
+ pair found ;
+ c := makepath(currentpen scaled crossingscale) ;
+ for f within first :
+ numeric t[];
+ path hold[];
+ t[0] := n := hold := 0 ;
+ for s within second :
+ p := pathpart f ;
+ q := pathpart s ;
+ a := p ;
+ for i=1 upto crossingnumbermax : % safeguard
+ clearxy ; z = a intersectiontimes q ;
+ if x < 0 :
+ exitif hold < 1 ;
+ a := hold[hold] ; hold := hold - 1 ;
+ clearxy ; z = a intersectiontimes q ;
+ fi
+ (t[incr n], whatever) = p intersectiontimes point x of a ;
+ if x = 0 :
+ a := a cutbefore c shifted point x of a ;
+ elseif x = length a :
+ a := a cutafter c shifted point x of a ;
+ else : % before or after?
+ b := subpath (0,x) of a cutafter c shifted point x of a ;
+ bcuttings := cuttings ;
+ a := subpath (x,length a) of a cutbefore c shifted point x of a ;
+ clearxy ; z = a intersectiontimes q ;
+ if x < 0 :
+ a := b ;
+ cuttings := bcuttings ;
+ elseif length bcuttings > 0 :
+ clearxy ; z = b intersectiontimes q ;
+ if x >= 0 :
+ hold[incr hold] := b ;
+ fi
+ fi
+ fi
+ if length cuttings = 0 :
+ exitif hold < 1 ;
+ a := hold[hold] ; hold := hold - 1 ;
+ fi
+ endfor ;
+ endfor ;
+ t[incr n] = length p ;
+ for i=1 upto n :
+ found := point t[i] of p ;
+ drawdot found
+ withpen pencircle scaled 4 withcolor white ;
+ draw textext("\strut\ttbf " & decimal i) ysized 3
+ shifted found ;
+ endfor ;
+ endfor ;
+ endgroup ;
+enddef ;
+\stopMPdefinitions
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We demonstrate the differences with an example. The result can be seen in
+\in {figure} [fig:overlapping:a].
+
+\startbuffer
+\startcombination
+ {\startMPcode
+ picture first, second ;
+ first := outlinetext.p("N") ; first := first scaled 10 ;
+ second := outlinetext.p("T") ; second := second scaled 10 ;
+ second := second rotatedaround(center second, 5) shifted (1,-1) ;
+ filloutlinetext(first ) withcolor .5[darkblue,white] ;
+ filloutlinetext(second) withcolor .5[darkred,white] ;
+ drawoutlinetext(first ) ;
+ drawoutlinetext(second) ;
+ ShowOverlapInOutlinesA(first, second) ;
+ addbackground withcolor darkgray ;
+ currentpicture := currentpicture scaled 2.5 ;
+ \stopMPcode} {Method A}
+ {\startMPcode
+ picture first, second ;
+ first := outlinetext.p("N") ; first := first scaled 10 ;
+ second := outlinetext.p("T") ; second := second scaled 10 ;
+ second := second rotatedaround(center second, 5) shifted (1,-1) ;
+ filloutlinetext(first ) withcolor .5[darkgreen,white] ;
+ filloutlinetext(second) withcolor .5[darkyellow,white] ;
+ drawoutlinetext(first ) ;
+ drawoutlinetext(second) ;
+ ShowOverlapInOutlinesB(first, second) ;
+ addbackground withcolor darkgray ;
+ currentpicture := currentpicture scaled 2.5 ;
+ \stopMPcode} {Method B}
+\stopcombination
+\stopbuffer
+
+\typebuffer
+
+\startplacefigure[title=Overlapping glyphs,reference=fig:overlapping:a]
+ \getbuffer
+\stopplacefigure
+
+We duplicate some code because the pictures will change in the process of
+analyzing. Let's make a helper for that:
+
+\startbuffer
+\startMPdefinitions
+def ShowOverlap(expr f, s, m) =
+ picture first, second ;
+ first := outlinetext.p(f) ; first := first scaled 10 ;
+ second := outlinetext.p(s) ; second := second scaled 10 ;
+
+ filloutlinetext(first ) withcolor darkblue ;
+ drawoutlinetext(first ) ;
+
+ filloutlinetext(second) withcolor darkred ;
+ drawoutlinetext(second) ;
+
+ if m == 2 :
+ ShowOverlapInOutlinesB
+ else :
+ ShowOverlapInOutlinesA
+ fi (first, second) ;
+
+ addbackground withcolor darkgray ;
+ currentpicture := currentpicture ysized 4cm ;
+enddef ;
+\stopMPdefinitions
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Again we demonstrate the differences with some examples. The result can be seen in
+\in {figure} [fig:overlapping:b].
+
+\startbuffer
+ \startcombination[nx=3,ny=2]
+ {\startMPcode ShowOverlap("N","T",1) ; \stopMPcode} {Method 1}
+ {\startMPcode ShowOverlap("\$","Q",1) ; \stopMPcode} {Method 1}
+ {\startMPcode ShowOverlap("\tttf ABC","\tttf PQR",1) ; \stopMPcode} {Method 1}
+ {\startMPcode ShowOverlap("N","T",2) ; \stopMPcode} {Method 2}
+ {\startMPcode ShowOverlap("\$","Q",2) ; \stopMPcode} {Method 2}
+ {\startMPcode ShowOverlap("\tttf ABC","\tttf PQR",2) ; \stopMPcode} {Method 2}
+ \stopcombination
+\stopbuffer
+
+\typebuffer
+
+\startplacefigure[title=Overlapping glyphs,reference=fig:overlapping:b]
+ \getbuffer
+\stopplacefigure
+
+\stopsection
+
\stopchapter
\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-gadgets.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-gadgets.tex
index 9010fc403e6..014bd66e81c 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-gadgets.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-gadgets.tex
@@ -361,6 +361,8 @@ second argument in the next line:
\starttyping
\startuniqueMPgraphic{smile}{type,height,color}
+ % the image
+\stopuniqueMPgraphic
\stoptyping
Because unique graphics often are used in backgrounds, its uniqueness is
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-introduction.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-introduction.tex
index b519055c041..e2c33f6f3e8 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-introduction.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-introduction.tex
@@ -88,6 +88,15 @@ they are. Therefore this manual presents different ways to solve problems.
Hopefully this is not too confusing. Numerous examples can be found in the other
manuals and test suite.
+The first version of \METAFUN\ evolved in \CONTEXT\ \MKII, and when we moved to
+\MKIV\ some interfaces (especially the extensions) could be made better. We now
+have \LMTX\ so we can make even those better (and often easier). The downside is
+that some features discussed here won't work in \MKII\ and \MKIV. If you run into
+that, just consider updating to \LMTX. The current version should process okay
+with the latest version; thanks to Otared Kavian for keeping an eye on that and
+posting me possible issues. The real new features are part of what is to become
+\LUAMETAFUN, but for that we have a separate manual.
+
\blank[big,samepage]
\startlines
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-layout.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-layout.tex
index 2be7e19ff3f..e81800bb43a 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-layout.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-layout.tex
@@ -327,9 +327,11 @@ is represented by a lioness. It is still unclear if they have a relationship,
but if so, and if a cub is born, may it enjoy \METAFUN.}
\stopbuffer
+\pushoverloadmode
\startquotation
\def\processwords#1{#1}\getbuffer[lions]
\stopquotation
+\popoverloadmode
The low level \CONTEXT\ macro \type {\processwords} provides a mechanism to treat
the individual words of its argument. The macro is called as follows:
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-lua.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-lua.tex
index 0794fc87919..e445cef53f9 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-lua.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-lua.tex
@@ -24,11 +24,17 @@ of a graphic from data but often it makes more sense to do the reverse. I finall
found time and reason to look into this and in the following sections I will
describe how it's done.
-\stopintro
+\blank
-\startsection[title=Introduction]
+{\bi The \LUA\ interface in \MKIV\ is way more limited than in \LMTX\ and new
+features will only show up in \LMTX, simply because the \METAPOST\ library in
+\LUAMETATEX\ is more powerful.}
-\stopsection
+\stopintro
+
+% \startsection[title=Introduction]
+%
+% \stopsection
\startsection[title=The basics]
@@ -232,7 +238,7 @@ helper is \type {mp.quoted}, as in:
\startbuffer
draw
- textext(lua("mp.quoted('@0.3f'," & decimal n & ")"))
+ textext(lua("mp.quoted('@0.3f'," & decimal 1.234 & ")"))
withcolor darkred ;
\stopbuffer
@@ -416,73 +422,73 @@ So in the end we can simplify the code that we started with to:
\stopsection
-\startsection[title=Access to variables]
-
-The question with such mechanisms is always: how far should we go. Although
-\METAPOST\ is a macro language it has properties of procedural languages. It also
-has more introspective features at the user end. For instance, one can loop over
-the resulting picture and manipulate it. This means that we don't need full
-access to \METAPOST\ internals. However, it makes sense to provide access to
-basic variables: \type {numeric}, \type {string}, and \type {boolean}.
-
-\startbuffer
-draw textext(lua("mp.quoted('@0.15f',mp.get.numeric('pi')-math.pi)"))
- ysized 1cm
- withcolor darkred ;
-\stopbuffer
-
-\typebuffer
-
-In double mode you will get zero printed but in scaled mode we definitely get a
-difference:
-
-\startlinecorrection[blank]
-\processMPbuffer
-\stoplinecorrection
-
-\startbuffer
-boolean b ; b := true ;
-draw textext(lua("mp.quoted(mp.get.boolean('b') and 'yes' or 'no')"))
- ysized 1cm
- withcolor darkred ;
-\stopbuffer
-
-In the next example we use \type {mp.quoted} to make sure that indeed we pass a
-string. The \type {textext} macro can deal with numbers but an unquoted \type
-{yes} or \type {no} is asking for problems.
-
-\typebuffer
-
-Especially when more text is involved it makes sense to predefine a helper in
-the \type {MP} namespace if only because \METAPOST\ (currently) doesn't like
-newlines in the middle of a string, so a \type {lua} call has to be on one line.
-
-\startlinecorrection[blank]
-\processMPbuffer
-\stoplinecorrection
-
-Here is an example where \LUA\ does something that would be close to impossible,
-especially if more complex text is involved.
-
-% \enabletrackers[metapost.lua]
-
-\startbuffer
-string s ; s := "ΤΕΧ" ; % "τεχ"
-draw textext(lua("mp.quoted(characters.lower(mp.get.string('s')))"))
- ysized 1cm
- withcolor darkred ;
-\stopbuffer
-
-\typebuffer
-
-As you can see here, the whole repertoire of helper functions can be used in
-a \METAFUN\ definition.
-
-\startlinecorrection[blank]
-\processMPbuffer
-\stoplinecorrection
-
-\stopsection
+% \startsection[title=Access to variables]
+%
+% The question with such mechanisms is always: how far should we go. Although
+% \METAPOST\ is a macro language it has properties of procedural languages. It also
+% has more introspective features at the user end. For instance, one can loop over
+% the resulting picture and manipulate it. This means that we don't need full
+% access to \METAPOST\ internals. However, it makes sense to provide access to
+% basic variables: \type {numeric}, \type {string}, and \type {boolean}.
+%
+% \startbuffer
+% draw textext(lua("mp.quoted('@0.15f',mp.get.numeric('pi')-math.pi)"))
+% ysized 1cm
+% withcolor darkred ;
+% \stopbuffer
+%
+% \typebuffer
+%
+% In double mode you will get zero printed but in scaled mode we definitely get a
+% difference:
+%
+% \startlinecorrection[blank]
+% \processMPbuffer
+% \stoplinecorrection
+%
+% \startbuffer
+% boolean b ; b := true ;
+% draw textext(lua("mp.quoted(mp.get.boolean('b') and 'yes' or 'no')"))
+% ysized 1cm
+% withcolor darkred ;
+% \stopbuffer
+%
+% In the next example we use \type {mp.quoted} to make sure that indeed we pass a
+% string. The \type {textext} macro can deal with numbers but an unquoted \type
+% {yes} or \type {no} is asking for problems.
+%
+% \typebuffer
+%
+% Especially when more text is involved it makes sense to predefine a helper in
+% the \type {MP} namespace if only because \METAPOST\ (currently) doesn't like
+% newlines in the middle of a string, so a \type {lua} call has to be on one line.
+%
+% \startlinecorrection[blank]
+% \processMPbuffer
+% \stoplinecorrection
+%
+% Here is an example where \LUA\ does something that would be close to impossible,
+% especially if more complex text is involved.
+%
+% % \enabletrackers[metapost.lua]
+%
+% \startbuffer
+% string s ; s := "ΤΕΧ" ; % "τεχ"
+% draw textext(lua("mp.quoted(characters.lower(mp.get.string('s')))"))
+% ysized 1cm
+% withcolor darkred ;
+% \stopbuffer
+%
+% \typebuffer
+%
+% As you can see here, the whole repertoire of helper functions can be used in
+% a \METAFUN\ definition.
+%
+% \startlinecorrection[blank]
+% \processMPbuffer
+% \stoplinecorrection
+%
+% \stopsection
\startsection[title=The library]
@@ -678,53 +684,53 @@ So this gives:
\startlinecorrection[blank] \getbuffer \stoplinecorrection
-A variant call is the following: \footnote {Getting that to work properly in the
-library was non||trivial as the loop variable \type {i} is an abstract nameless
-variable at the \METAPOST\ end. When investigating this Luigi Scarso and I found out
-that the internals of \METAPOST\ are not really geared for interfacing this way
-but in the end it worked out well.}
-
-\startbuffer
-\startMPcode
- for i=1 upto lua("mp.size(MP.myset)") :
- fill area
- lua("mp.path(MP.myset[mp.get.numeric('i')])")
- xysized (HSize,5ExHeight)
- withcolor basiccolors[i]/2
- withtransparency (2,.25) ;
- endfor ;
-\stopMPcode
-\stopbuffer
-
-\typebuffer
-
-The result is the same:
-
-\startlinecorrection[blank] \getbuffer \stoplinecorrection
-
-\startbuffer
-\startluacode
- MP.mypath = function(i)
- return mp.path(MP.myset[mp.get.numeric(i)])
- end
-\stopluacode
-\stopbuffer
-
-\typebuffer \getbuffer
-
-\startbuffer
-\startMPcode
- for i=1 upto lua("mp.size(MP.myset)") :
- fill area
- lua("MP.mypath('i')")
- xysized (HSize,5ExHeight)
- withcolor basiccolors[i]/2
- withtransparency (2,.25) ;
- endfor ;
-\stopMPcode
-\stopbuffer
-
-\typebuffer
+% A variant call is the following: \footnote {Getting that to work properly in the
+% library was non||trivial as the loop variable \type {i} is an abstract nameless
+% variable at the \METAPOST\ end. When investigating this Luigi Scarso and I found out
+% that the internals of \METAPOST\ are not really geared for interfacing this way
+% but in the end it worked out well.}
+%
+% \startbuffer
+% \startMPcode
+% for i=1 upto lua("mp.size(MP.myset)") :
+% fill area
+% lua("mp.path(MP.myset[mp.get.numeric('i')])")
+% xysized (HSize,5ExHeight)
+% withcolor basiccolors[i]/2
+% withtransparency (2,.25) ;
+% endfor ;
+% \stopMPcode
+% \stopbuffer
+%
+% \typebuffer
+%
+% The result is the same:
+%
+% \startlinecorrection[blank] \getbuffer \stoplinecorrection
+%
+% \startbuffer
+% \startluacode
+% MP.mypath = function(i)
+% return mp.path(MP.myset[mp.get.numeric(i)])
+% end
+% \stopluacode
+% \stopbuffer
+%
+% \typebuffer \getbuffer
+%
+% \startbuffer
+% \startMPcode
+% for i=1 upto lua("mp.size(MP.myset)") :
+% fill area
+% lua("MP.mypath('i')")
+% xysized (HSize,5ExHeight)
+% withcolor basiccolors[i]/2
+% withtransparency (2,.25) ;
+% endfor ;
+% \stopMPcode
+% \stopbuffer
+%
+% \typebuffer
This snippet of \METAPOST\ code still looks kind of horrible so how can we make
it look better? Here is an attempt, First we define a bit more \LUA:
@@ -1167,285 +1173,600 @@ the same name defined.
\stopsection
-\startsection[title=Large paths]
+\startsection[title=Accessing paths]
-The plugins (like those dealing with text) also use calls in the \type {mp}
-namespace but they have sort of protected names, starting with \type {mf_}. These
-are visible but not meant to be used by users. Not only can their name change,
-their functionality can as well.
+A path in \METAPOST\ is internally a linked list of knots and each knot has a
+coordinate and two control points. Access to specific points of very large path
+can be somewhat slow. First of all, the lookup start at the beginning and when
+you use fractions (say halfway between point 4 and 5) the engine has to find the
+spot. For this (and other reasons not mentioned here) we have a way to access
+paths different, using \LUA\ behind the scenes.
-The following are actually private as they have related macros but also have a
-public alias:
+\startbuffer
+path p ; p := fullcircle xysized (4cm,2cm) ;
+for i inpath p:
+ drawdot leftof i withpen pencircle scaled 2mm withcolor darkred ;
+ drawdot pointof i withpen pencircle scaled 3mm withcolor darkgreen ;
+ drawdot rightof i withpen pencircle scaled 2mm withcolor darkblue ;
+endfor ;
+draw for i inpath p:
+ pointof i .. controls (leftof i) and (rightof i) ..
+endfor cycle withpen pencircle scaled .5mm withcolor white ;
+
+p := p shifted (5cm,0) ;
+draw for i inpath p:
+ pointof i --
+endfor cycle withpen pencircle scaled .5mm withcolor .5white ;
+for i inpath p:
+ drawdot pointof i withpen pencircle scaled 3mm withcolor darkgreen ;
+endfor ;
+\stopbuffer
-\startlines
-lua.mp.pathlength(name)
-lua.mp.pathpoint(i)
-lua.mp.pathleft(i)
-lua.mp.pathright(i)
-lua.mp.pathreset()
-\stoplines
+\typebuffer
-They are meant for special high|-|performance path access, for example:
+Here we access the main coordinate and the two control points. The last draw is of course
+just mimicking drawing the path.
-\startlinecorrection
-\startMPcode
- save p, q, r;
- path p ; p := for i=1 upto 1000 :
- (i,0) -- (i,4 + uniformdeviate 4) --
- endfor cycle ;
- fill p xysized (TextWidth,20mm) withcolor red ;
-
- path q ; q := for i=1 upto lua.mp.pathlength("p") :
- if (i mod 4) == 0 : lua.mp.pathpoint(i) -- fi
- endfor cycle ;
- fill q xysized (TextWidth,2cm) shifted (0,-45mm) withcolor green ;
-
- path r ; r := for i inpath p :
- if not odd (i) : pointof i -- fi
- endfor cycle ;
- fill r xysized (TextWidth,2cm) shifted (0,-70mm) withcolor blue ;
-\stopMPcode
+\startlinecorrection[blank]
+\processMPbuffer
\stoplinecorrection
-Because a lookup of a point in \METAPOST\ is a linear lookup over a linked list
-for very large paths the gain is significant when using \LUA\ because there the
-points are stored in an indexed table. The left and right points can be used
-vebose like
+\stopsection
-\starttyping
-lua.mp.pathpoint(i) controls lua.mp.pathleft(i) and lua.mp.pathright(i)
-\stoptyping
+\startsection[title=Acessing \TEX]
-or more terse:
+In \MKIV\ and \LMTX\ it is possible to access \TEX\ registers and macros from the
+\METAPOST\ end. Let's first define and set some:
-\starttyping
-pointof i controls leftof i and rightof i
-\stoptyping
+\startbuffer
+\newdimen\MyMetaDimen \MyMetaDimen = 2mm
+\newcount\MyMetaCount \MyMetaCount = 10
+\newtoks \MyMetaToks \MyMetaToks = {\bfd \TeX}
+ \def\MyMetaMacro {not done}
+\stopbuffer
-Beware: this kind of trickery is {\em only} needed when you have very large paths
-that are to be manipulated and the. Otherwise it's overkill.
+\typebuffer \getbuffer
-\stopsection
+\startbuffer
+\startMPcode
+ for i=1 upto getcount("MyMetaCount") :
+ draw fullcircle scaled (i * getdimen("MyMetaDimen")) ;
+ endfor ;
+ draw textext(gettoks("MyMetaToks")) xsized 15mm withcolor darkred ;
+ setglobaldimen("MyMetaDimen", bbwidth(currentpicture)) ;
+ setglobalmacro("MyMetaMacro", "done") ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer
-\startsection[title={Interfacing to \TEX}]
+\startlinecorrection[blank]
+ \getbuffer
+\stoplinecorrection
-The next bunch of calls is for accessing \TEX\ registers. You can set their
-values and get them as well.
+We can now look at the two updated globals where \type {\MyMetaMacro: \the\MyMetaDimen}
+typesets: {\tttf \MyMetaMacro: \the\MyMetaDimen}. As demonstrated you can best define your
+own registers but in principle you can also access system ones, like \type {\scratchdimen}
+and friends.
-\starttyping
-lua.mp.getmacro(k)
-lua.mp.getdimen(k)
-lua.mp.getcount(k)
-lua.mp.gettoks (k)
-
-lua.mp.setmacro(k,v)
-lua.mp.setdimen(k,v)
-lua.mp.setcount(k,v)
-lua.mp.settoks (k,v)
-\stoptyping
+\stopsection
+
+\startsection[title=Abstraction]
-When you mess around with variables and run into issues it might help to
-report values on the console. The \type {report} function does this:
+We will now stepwise implement some simple helpers for accessing data in files.
+The examples are kind of useless but demonstrate how interfaces evolved. The
+basic command to communicate with \LUA\ is \type {runscript}. In this example
+we will load a (huge) file and run over the lines.
\starttyping
-lua.mp.report(a,b)
+\startMPcode{doublefun}
+ save q ; string q ; q := "'\\" & ditto & "'" ;
+ runscript (
+ "GlobalData = string.splitlines(io.loaddata('foo.tmp')) return ''"
+ ) ;
+ numeric l ; l = runscript (
+ "return string.format('\letterpercent q',\letterhash GlobalData)"
+ );
+ for i=1 step 1 until l :
+ l := length ( runscript (
+ "return string.format('\letterpercent q',GlobalData[" & decimal i & "])"
+ ) ) ;
+ endfor ;
+ draw textext(decimal l);
+\stopMPcode
\stoptyping
-\startlinecorrection
-\startMPcode
-lua.mp.report("status","a circle") ;
-fill fullcircle xyscaled (2cm,1cm) withcolor red ;
-lua.mp.report("status","its boundingbox [@N,@N,@N,@N]",
- xpart llcorner currentpicture, ypart llcorner currentpicture,
- xpart urcorner currentpicture, ypart urcorner currentpicture
-) ;
-draw boundingbox currentpicture withcolor blue ;
-report("status","the size: @Nbp x @Nbp",
- bbwidth(currentpicture), bbheight(currentpicture)
-) ;
-message("done") ;
-\stopMPcode
-\stoplinecorrection
+The \type {runscript} primitive takes a string and should return a string (in
+\LUAMETATEX\ you can also return nothing). This low level solution will serve as
+our benchmark: it takes 2.04 seconds on the rather large (64MB) test file with
+10.000 lines.
-The console shows:
+The code looks somewhat clumsy. This is because in \METAPOST\ escaping is not
+built in so one has to append a double quote character using \type {char 34} and
+the \type {ditto} string is defined as such. This mess is why in \CONTEXT\ we
+have an interface:
\starttyping
-metapost > status : a circle
-metapost > status : its boundingbox [-28.34645,-14.17323,28.34645,14.17323]
-metapost > status : the size: 57.1929bp x 28.84647bp
-metapost > message : done
+\startMPcode{doublefun}
+ lua("GlobalData = string.splitlines(io.loaddata('foo.tmp'))") ;
+ numeric l ;
+ for i=1 step 1 until lua("mp.print(\#GlobalData)") :
+ l := length(lua("mp.quoted(GlobalData[" & decimal i & "])")) ;
+ endfor ;
+ draw textext(decimal l);
+\stopMPcode
\stoptyping
-There are two more getters. These can be used to access the specific graphic
-related variables set at the \TEX\ end.
+As expected we pay a price for the additional overhead, so this time we need 2.28
+seconds to process the file. The return value of a run is a string that is fed
+into \type {scantokens}. Here \type {print} function prints the number as string
+and that gets scanned back to a number. The \type {quoted} function returns a
+string in a string so when we're back in \METAPOST\ that gets scanned as string.
+
+When code is used more frequently, we can make a small library, like this:
\starttyping
-mp.texvar(name)
-mp.texstr(name)
+\startluacode
+ local MyData = { }
+ function mp.LoadMyData(filename)
+ MyData = string.splitlines(io.loaddata(filename))
+ end
+ local mpprint = mp.print
+ local mpquoted = mp.quoted
+ function mp.MyDataSize()
+ mpprint(#MyData)
+ end
+ function mp.MyDataString(i)
+ mpquoted(MyData[i] or "")
+ end
+\stopluacode
\stoptyping
-If you have adaptive styles you might want to test for modes.
+It is not that hard to imagine a more advanced mechanisms where data from multiple
+files can be handled at the same time. This code is used as:
\starttyping
-if lua.mp.mode("screen") : % or processingmode
- % some action only needed for screen documents
-fi ;
-if lua.mp.systemmode("first") :
- % some action for the first run
-fi ;
+\startMPcode{doublefun}
+ lua.mp.LoadMyData("foo.tmp") ;
+ numeric l ;
+ for i=1 step 1 until lua.mp.MyDataSize() :
+ l := length(lua.mp.MyDataString(i)) ;
+ endfor ;
+ draw textext(decimal l);
+\stopMPcode
\stoptyping
-For convenience these are wrapped into macros:
+The \type {mp} namespace at the \LUA\ end is a subnamespace at the \METAPOST\
+end. This solution needs 2.20 seconds so we're still slower than the first one,
+but in \LUAMETATEX\ with \LMTX we can do better. First the \LUA\ code:
\starttyping
-if texmode("screen") :
- % some action only needed for screen documents
-fi ;
-if systemmode("first") :
- % some action for the first run
-fi ;
+\startluacode
+ local injectnumeric = mp.inject.numeric
+ local injectstring = mp.inject.string
+ local MyData = { }
+ function mp.LoadMyData(filename)
+ MyData = string.splitlines(io.loaddata(filename))
+ end
+ function mp.MyDataSize()
+ injectnumeric(#MyData)
+ end
+ function mp.MyDataString(i)
+ injectstring(MyData[i] or "")
+ end
+\stopluacode
\stoptyping
-When you implement your own helpers you can fall back on some auxiliary functions
-in the \type {mp} namespace. Actually these are collected in \type {mp.aux} and
-thereby protected from being overwritten by mistake. Here they are:
-
-% mp.flush()
-% mp.size(t)
-
-\stopsection
-
-\startsection[title={Interfacing to \METAPOST}]
-
-There is also experimental access to some of the \METAPOST\ internals. In order
-to deal with (large) paths a few more iterator related helpers are provided too.
-
-% mp.set (numeric string path boolean)
+This time we use injectors. The mentioned \type {print} helpers serialize data so
+numbers, pairs, colors etc are converted to a string that represents them that is
+fed back to \METAPOST\ after the snippet is run. Multiple prints are collected
+into one string. An injecter follows a more direct route: it pushes back a proper
+\METAPOST\ data type.
\starttyping
-n = mp.getnumeric(name)
-s = mp.getstring(name)
-b = mp.getboolean(name)
-p = mp.getpath(name)
+\startMPcode{doublefun}
+ lua.mp.LoadMyData("foo.tmp") ;
+ numeric l ;
+ for i=1 step 1 until lua.mp.MyDataSize() :
+ l := length(lua.mp.MyDataString(i)) ;
+ endfor ;
+ draw textext(decimal l);
+\stopMPcode
\stoptyping
-A is path a table of tables that have six values: the coordinates and the
-pre- and postcontrol. You can manipulate this table and feed it back into
-\METAPOST.
+This usage brings us down to 1.14 seconds, so we're still not good. The next
+variant is performing similar: 1.05 seconds.
-\startlinecorrection
-\startMPcode
-numeric n ; n := lua.mp.newhash() ;
-
-for i=1 upto 3 :
- lua.mp.tohash(n,i) ;
-endfor ;
-
-fill fullcircle scaled 10mm withcolor
- if lua.mp.inhash(n,3) : green else : red fi ;
-
-fill fullcircle scaled 5mm withcolor
- if lua.mp.inhash(n,4) : green else : red fi ;
-
-lua.mp.disposehash(n)
+\starttyping
+\startMPcode{doublefun}
+ runscript("mp.LoadMyData('foo.tmp')") ;
+ numeric l ;
+ for i=1 step 1 until runscript("mp.MyDataSize()") :
+ l := length(runscript("mp.MyDataString(" & decimal i & ")")) ;
+ endfor ;
+ draw textext(decimal l);
\stopMPcode
-\stoplinecorrection
+\stoptyping
-You can also store values with keys and access them later:
+We will now delegate scanning to the \LUA\ end.
-\startlinecorrection
-\startMPcode
-numeric n ; n := lua.mp.newhash() ;
-
-for i=1 upto 3 :
- lua.mp.tohash(n,i,decimal sqrt(i)) ;
-endfor ;
+\starttyping
+\startluacode
+ local injectnumeric = mp.inject.numeric
+ local injectstring = mp.inject.string
+ local scannumeric = mp.scan.numeric
+ local scanstring = mp.scan.string
+ local MyData = { }
+ function mp.LoadMyData()
+ MyData = string.splitlines(io.loaddata(scanstring()))
+ end
+ function mp.MyDataSize()
+ injectnumeric(#MyData)
+ end
+ function mp.MyDataString()
+ injectstring(MyData[scannumeric()] or "")
+ end
+\stopluacode
+\stoptyping
-draw textext(lua.mp.fromhash(n,3))
- ysized 1cm
- withcolor blue ;
+This time we are faster than the clumsy code we started with: 0.87 seconds.
-lua.mp.disposehash(n)
+\starttyping
+\startMPcode{doublefun}
+ runscript("mp.LoadMyData()") "foo.tmp" ;
+ numeric l ;
+ for i=1 step 1 until runscript("mp.MyDataSize()") :
+ l := length(runscript("mp.MyDataString()") i) ;
+ endfor ;
+ draw textext(decimal l);
\stopMPcode
-\stoplinecorrection
-
-You can also name your own hash:
+\stoptyping
-\startlinecorrection
-\startMPcode
-lua.mp.newhash("foo") ;
+In \LMTX\ we can add some more abstraction. Performance is about the same and
+sometimes a bit faster but that depends on extreme usage: you need thousands of
+call to notice.
-for i=1 upto 3 :
- lua.mp.tohash("foo",i,decimal sqrt(i)) ;
-endfor ;
+\starttyping
+\startluacode
+ local injectnumeric = mp.inject.numeric
+ local injectstring = mp.inject.string
+ local scannumeric = mp.scan.numeric
+ local scanstring = mp.scan.string
+ local MyData = { }
+ metapost.registerscript("LoadMyData", function()
+ MyData = string.splitlines(io.loaddata(scanstring()))
+ end)
+ metapost.registerscript("MyDataSize", function()
+ injectnumeric(#MyData)
+ end)
+ metapost.registerscript("MyDataString", function()
+ injectstring(MyData[scannumeric()] or "")
+ end)
+\stopluacode
+\stoptyping
-draw textext(lua.mp.fromhash("foo",2))
- ysized 1cm
- withcolor green ;
+We have the same scripts but we register them. At the \METAPOST\ end we resolve
+the registered scripts and then call \type {runscript} with the (abstract) numeric
+value:
-lua.mp.disposehash("foo")
+\starttyping
+\startMPcode{doublefun}
+ newscriptindex my_script_LoadMyData ;
+ newscriptindex my_script_MyDataSize ;
+ newscriptindex my_script_MyDataString ;
+
+ my_script_LoadMyData := scriptindex "LoadMyData" ;
+ my_script_MyDataSize := scriptindex "MyDataSize" ;
+ my_script_MyDataString := scriptindex "MyDataString" ;
+
+ runscript my_script_LoadMyData "foo.tmp" ;
+ numeric l ;
+ for i=1 step 1 until runscript my_script_MyDataSize :
+ l := length(my_script_MyDataString i) ;
+ endfor ;
+ draw textext(decimal l);
\stopMPcode
-\stoplinecorrection
+\stoptyping
-Although it might look like \METAPOST\ supports arrays the reality is that it
-doesn't really. There is a concept of suffixes but internally these are just a
-way to compose macros. The following test is one that is used in one of the
-\METAFUN\ modules written by Alan Braslau.
+This is of course nicer:
-\startlinecorrection
-\startMPcode
-path p, q[] ;
-
-if lua.mp.isarray(str q[1]) :
- fill fullcircle scaled 1cm withcolor red ;
- draw textext(lua.mp.prefix(str q[1])) withcolor white;
-else :
- fill fullsquare scaled 1cm withcolor blue ;
-fi ;
-
-currentpicture := currentpicture shifted (-2cm,0) ;
-
-if lua.mp.isarray(str p) :
- fill fullcircle scaled 1cm withcolor red ;
-else :
- fill fullsquare scaled 1cm withcolor blue ;
-fi ;
+\starttyping
+\startMPcode{doublefun}
+ def LoadMyData (expr s) = runscript my_script_LoadMyData s enddef ;
+ def MyDataSize = runscript my_script_MyDataSize enddef ;
+ def MyDataString(expr i) = runscript my_script_MyDataString i enddef ;
+
+ LoadMyData("foo.tmp") ;
+ numeric l ;
+ for i=1 step 1 until MyDataSize :
+ l := length(MyDataString(i)) ;
+ endfor ;
+ draw textext(decimal l);
\stopMPcode
-\stoplinecorrection
+\stoptyping
-Another helper relates to extensions that \METAFUN\ adds to \METAPOST. When you
-iterate over a picture you can recognize these as objects. The next code shows
-the \LUA\ call as well as the more convenient macro call. So, \type {textext}
-clearly is a foreign object.
+So, to sumarize, there are many ways to look at this: verbose direct ones
+but also nicely abstract ones.
-\startlinecorrection
-\startMPcode
-picture p ; p := image (
- fill fullcircle scaled 1cm withcolor red ;
- draw textext("ok") withcolor white ;
-) ;
-
-for i within p :
- if not picture i :
- draw i ysized 4cm ;
- elseif isobject i :
- draw i xsized 3cm ;
- else :
- draw i ysized 4cm ;
- fi ;
-endfor ;
+\stopsection
-currentpicture := currentpicture shifted (-6cm,0) ;
+% The plugins (like those dealing with text) also use calls in the \type {mp}
+% namespace but they have sort of protected names, starting with \type {mf_}. These
+% are visible but not meant to be used by users. Not only can their name change,
+% their functionality can as well.
+%
+% The following are actually private as they have related macros but also have a
+% public alias:
+%
+% \startlines
+% lua.mp.pathlength(name)
+% lua.mp.pathpoint(i)
+% lua.mp.pathleft(i)
+% lua.mp.pathright(i)
+% lua.mp.pathreset()
+% \stoplines
+%
+% They are meant for special high|-|performance path access, for example:
+%
+% \startlinecorrection
+% \startMPcode
+% save p, q, r;
+% path p ; p := for i=1 upto 1000 :
+% (i,0) -- (i,4 + uniformdeviate 4) --
+% endfor cycle ;
+% fill p xysized (TextWidth,20mm) withcolor red ;
+%
+% path q ; q := for i=1 upto lua.mp.pathlength("p") :
+% if (i mod 4) == 0 : lua.mp.pathpoint(i) -- fi
+% endfor cycle ;
+% fill q xysized (TextWidth,2cm) shifted (0,-45mm) withcolor green ;
+%
+% path r ; r := for i inpath p :
+% if not odd (i) : pointof i -- fi
+% endfor cycle ;
+% fill r xysized (TextWidth,2cm) shifted (0,-70mm) withcolor blue ;
+% \stopMPcode
+% \stoplinecorrection
+%
+% Because a lookup of a point in \METAPOST\ is a linear lookup over a linked list
+% for very large paths the gain is significant when using \LUA\ because there the
+% points are stored in an indexed table. The left and right points can be used
+% vebose like
+%
+% \starttyping
+% lua.mp.pathpoint(i) controls lua.mp.pathleft(i) and lua.mp.pathright(i)
+% \stoptyping
+%
+% or more terse:
+%
+% \starttyping
+% pointof i controls leftof i and rightof i
+% \stoptyping
+%
+% Beware: this kind of trickery is {\em only} needed when you have very large paths
+% that are to be manipulated and the. Otherwise it's overkill.
+%
+% \stopsection
+%
+% \startsection[title={Interfacing to \TEX}]
+%
+% The next bunch of calls is for accessing \TEX\ registers. You can set their
+% values and get them as well.
+%
+% \starttyping
+% lua.mp.getmacro(k)
+% lua.mp.getdimen(k)
+% lua.mp.getcount(k)
+% lua.mp.gettoks (k)
+%
+% lua.mp.setmacro(k,v)
+% lua.mp.setdimen(k,v)
+% lua.mp.setcount(k,v)
+% lua.mp.settoks (k,v)
+% \stoptyping
+%
+% When you mess around with variables and run into issues it might help to
+% report values on the console. The \type {report} function does this:
+%
+% \starttyping
+% lua.mp.report(a,b)
+% \stoptyping
+%
+% \startlinecorrection
+% \startMPcode
+% lua.mp.report("status","a circle") ;
+% fill fullcircle xyscaled (2cm,1cm) withcolor red ;
+% lua.mp.report("status","its boundingbox [@N,@N,@N,@N]",
+% xpart llcorner currentpicture, ypart llcorner currentpicture,
+% xpart urcorner currentpicture, ypart urcorner currentpicture
+% ) ;
+% draw boundingbox currentpicture withcolor blue ;
+% report("status","the size: @Nbp x @Nbp",
+% bbwidth(currentpicture), bbheight(currentpicture)
+% ) ;
+% message("done") ;
+% \stopMPcode
+% \stoplinecorrection
+%
+% The console shows:
+%
+% \starttyping
+% metapost > status : a circle
+% metapost > status : its boundingbox [-28.34645,-14.17323,28.34645,14.17323]
+% metapost > status : the size: 57.1929bp x 28.84647bp
+% metapost > message : done
+% \stoptyping
+%
+% There are two more getters. These can be used to access the specific graphic
+% related variables set at the \TEX\ end.
+%
+% \starttyping
+% mp.texvar(name)
+% mp.texstr(name)
+% \stoptyping
+%
+% If you have adaptive styles you might want to test for modes.
+%
+% \starttyping
+% if lua.mp.mode("screen") : % or processingmode
+% % some action only needed for screen documents
+% fi ;
+% if lua.mp.systemmode("first") :
+% % some action for the first run
+% fi ;
+% \stoptyping
+%
+% For convenience these are wrapped into macros:
+%
+% \starttyping
+% if texmode("screen") :
+% % some action only needed for screen documents
+% fi ;
+% if systemmode("first") :
+% % some action for the first run
+% fi ;
+% \stoptyping
+%
+% When you implement your own helpers you can fall back on some auxiliary functions
+% in the \type {mp} namespace. Actually these are collected in \type {mp.aux} and
+% thereby protected from being overwritten by mistake. Here they are:
+%
+% % mp.flush()
+% % mp.size(t)
+%
+% \stopsection
-for i within p :
- if isobject(i) :
- draw i xsized 5cm ;
- else :
- draw i ysized 3cm withcolor blue;
- fi ;
-endfor ;
-\stopMPcode
-\stoplinecorrection
+% \startsection[title={Interfacing to \METAPOST}]
+%
+% There is also experimental access to some of the \METAPOST\ internals. In order
+% to deal with (large) paths a few more iterator related helpers are provided too.
+%
+% % mp.set (numeric string path boolean)
+%
+% \starttyping
+% n = mp.getnumeric(name)
+% s = mp.getstring(name)
+% b = mp.getboolean(name)
+% p = mp.getpath(name)
+% \stoptyping
+%
+% A is path a table of tables that have six values: the coordinates and the
+% pre- and postcontrol. You can manipulate this table and feed it back into
+% \METAPOST.
+%
+% \startlinecorrection
+% \startMPcode
+% numeric n ; n := lua.mp.newhash() ;
+%
+% for i=1 upto 3 :
+% lua.mp.tohash(n,i) ;
+% endfor ;
+%
+% fill fullcircle scaled 10mm withcolor
+% if lua.mp.inhash(n,3) : green else : red fi ;
+%
+% fill fullcircle scaled 5mm withcolor
+% if lua.mp.inhash(n,4) : green else : red fi ;
+%
+% lua.mp.disposehash(n)
+% \stopMPcode
+% \stoplinecorrection
+%
+% You can also store values with keys and access them later:
+%
+% \startlinecorrection
+% \startMPcode
+% numeric n ; n := lua.mp.newhash() ;
+%
+% for i=1 upto 3 :
+% lua.mp.tohash(n,i,decimal sqrt(i)) ;
+% endfor ;
+%
+% draw textext(lua.mp.fromhash(n,3))
+% ysized 1cm
+% withcolor blue ;
+%
+% lua.mp.disposehash(n)
+% \stopMPcode
+% \stoplinecorrection
+%
+% You can also name your own hash:
+%
+% \startlinecorrection
+% \startMPcode
+% lua.mp.newhash("foo") ;
+%
+% for i=1 upto 3 :
+% lua.mp.tohash("foo",i,decimal sqrt(i)) ;
+% endfor ;
+%
+% draw textext(lua.mp.fromhash("foo",2))
+% ysized 1cm
+% withcolor green ;
+%
+% lua.mp.disposehash("foo")
+% \stopMPcode
+% \stoplinecorrection
+%
+% Although it might look like \METAPOST\ supports arrays the reality is that it
+% doesn't really. There is a concept of suffixes but internally these are just a
+% way to compose macros. The following test is one that is used in one of the
+% \METAFUN\ modules written by Alan Braslau.
+%
+% \startlinecorrection
+% \startMPcode
+% path p, q[] ;
+%
+% if lua.mp.isarray(str q[1]) :
+% fill fullcircle scaled 1cm withcolor red ;
+% draw textext(lua.mp.prefix(str q[1])) withcolor white;
+% else :
+% fill fullsquare scaled 1cm withcolor blue ;
+% fi ;
+%
+% currentpicture := currentpicture shifted (-2cm,0) ;
+%
+% if lua.mp.isarray(str p) :
+% fill fullcircle scaled 1cm withcolor red ;
+% else :
+% fill fullsquare scaled 1cm withcolor blue ;
+% fi ;
+% \stopMPcode
+% \stoplinecorrection
+%
+% Another helper relates to extensions that \METAFUN\ adds to \METAPOST. When you
+% iterate over a picture you can recognize these as objects. The next code shows
+% the \LUA\ call as well as the more convenient macro call. So, \type {textext}
+% clearly is a foreign object.
+%
+% \startlinecorrection
+% \startMPcode
+% picture p ; p := image (
+% fill fullcircle scaled 1cm withcolor red ;
+% draw textext("ok") withcolor white ;
+% ) ;
+%
+% for i within p :
+% if not picture i :
+% draw i ysized 4cm ;
+% elseif isobject i :
+% draw i xsized 3cm ;
+% else :
+% draw i ysized 4cm ;
+% fi ;
+% endfor ;
+%
+% currentpicture := currentpicture shifted (-6cm,0) ;
+%
+% for i within p :
+% if isobject(i) :
+% draw i xsized 5cm ;
+% else :
+% draw i ysized 3cm withcolor blue;
+% fi ;
+% endfor ;
+% \stopMPcode
+% \stoplinecorrection
% not yet, still experimental:
%
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-macros.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-macros.tex
index e1df13c92ac..969e7d1b169 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-macros.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-macros.tex
@@ -31,12 +31,13 @@ There are several ways to use the power of \METAFUN, either or not using
\stopitem
\startitem
- You can embed the graphic in a \type {\startMPpage} construct and process it
- with \CONTEXT\ \MKIV. In that case you have the full \METAFUN\ functionality
- available. If for some reason you still want to use \MKII, you need to use
- \TEXEXEC\ as before processing the file, it will do a couple of checks on the
- file. It will also make sure that the temporary files (\type {mpt} for \type
- {textext}'s and \type {mpo} for outline fonts) are taken care of too.
+ You can embed the graphic in a \type {\startMPpage} \unknown \type
+ {\stopMPpage} construct and process it with \CONTEXT\ \MKIV. In that case you
+ have the full \METAFUN\ functionality available. If for some reason you still
+ want to use \MKII, you need to use \TEXEXEC\ as before processing the file,
+ it will do a couple of checks on the file. It will also make sure that the
+ temporary files (\type {mpt} for \type {textext}'s and \type {mpo} for
+ outline fonts) are taken care of too.
\stopitem
\startitem
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-reference.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-reference.tex
index 6eb177949be..bc59218b0cc 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-reference.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-reference.tex
@@ -476,7 +476,7 @@ defineshade cshade withshademethod "circular" ;
\ShowSampleJ {mm} {pencircle transform} {pencircle}
\ShowSampleJ {mm} {pensquare transform} {pensquare}
\ShowSampleJ {mm} {penrazor transform} {penrazor}
-\ShowSampleK {mm} {penspeck transform} {penspeck}
+\ShowSampleK {mm} {penspec transform} {penspec}
\ShowSampleL {mm} {draw} {fullcircle}
\ShowSampleL {mm} {fill} {fullcircle}
@@ -610,7 +610,7 @@ defineshade cshade withshademethod "circular" ;
\ShowSampleS {fm}
{externalfigure string ...}
- {draw externalfigure "mycow.pdf" scaled 3cm}
+ {draw externalfigure "mycow.pdf" ysized 3cm}
\ShowSampleT {fm} {addbackground text}
{addbackground withcolor .625 yellow}
@@ -637,11 +637,28 @@ defineshade cshade withshademethod "circular" ;
\ShowSampleT {mm}
{withmask string}
- {draw externalfigure "m-1.png" scaled 2cm withmask "m-2.png"}
+ {draw externalfigure "m-1.png" ysized 2cm withmask "m-2.png"}
{Scale := 1 ;
- draw externalfigure "m-2.png" scaled 2cm shifted (-3cm,0) ;
- draw externalfigure "m-1.png" scaled 2cm shifted (-6cm,0) ;
- draw externalfigure "m-1.png" scaled 2cm withmask "m-2.png"}
+ draw externalfigure "m-2.png" ysized 2cm shifted (-3cm,0) ;
+ draw externalfigure "m-1.png" ysized 2cm shifted (-6cm,0) ;
+ draw externalfigure "m-1.png" ysized 2cm withmask "m-2.png"}
+
+\stopsection
+
+\startsection[title={Access}]
+
+\ShowSampleW
+ {mm} {leftof n}
+ {for i inpath fullcircle : drawdot leftof i ; endfor}
+ {for i inpath fullcircle xsized 3cm: drawdot leftof i withpen pencircle scaled 2mm InRed ; endfor}
+\ShowSampleW
+ {mm} {pointof n}
+ {for i inpath fullcircle : drawdot pointof i ; endfor}
+ {for i inpath fullcircle xsized 3cm: drawdot pointof i withpen pencircle scaled 2mm InYellow ; endfor}
+\ShowSampleW
+ {mm} {rightof n}
+ {for i inpath fullcircle : drawdot rightof i ; endfor}
+ {for i inpath fullcircle xsized 3cm: drawdot rightof i withpen pencircle scaled 2mm InRed ; endfor}
\stopsection
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-sneaky.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-sneaky.tex
index 02c502cf01c..56bf5d4d61e 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-sneaky.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-sneaky.tex
@@ -22,12 +22,12 @@ undefined or special variables. Consider the following:
\starttyping
vardef foo@#(text t) =
- save s ; string s ; s := str @# ;
- if length(s) > 0 :
- textext(s)
- else :
- nullpicture
- fi
+ save s ; string s ; s := str @# ;
+ if length(s) > 0 :
+ textext(s)
+ else :
+ nullpicture
+ fi
enddef ;
\stoptyping
@@ -41,7 +41,7 @@ But if afterwards we say:
\starttyping
vardef bar(expr x) =
- 123
+ 123
enddef ;
\stoptyping
@@ -55,6 +55,141 @@ to store their meanings and allocate new ones after that inside the group.
\stopsection
+\startsection[title=Templates]
+
+This section is a bit off|-|topic and thereby also qualifies as sneaky. At the
+\TEX\ end we have a couple of alternative input methods, like \XML\ and templates.
+Just because we want to be consistent, the \METAPOST\ end also offers this.
+
+The first example resembled the \type{btex ... etex} approach:
+
+\startbuffer
+\startbuffer[test-a]
+ blua for i=0,100,20 do elua
+ draw fullcircle scaled (blua p(i) elua * cm)
+ withcolor "darkgreen" withpen pencircle scaled 1cm ;
+ blua end elua
+
+ blua for i=10,100,20 do elua
+ draw fullcircle scaled (blua p(i) elua * cm)
+ withcolor "darkred" withpen pencircle scaled 1cm ;
+ blua end elua
+\stopbuffer
+
+\startMPcode
+ draw image (
+ loadfile ("mpstemplate://buffer?name=test-a") ;
+ ) ysized 3cm ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[test-1][option=TEX]
+
+The filename is specified as a \URI\ and the \type {mpstemplate} does the magic
+here.
+
+\startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+The second example is like the \type {lmx} files that you can find in the distibution:
+
+\startbuffer
+\startbuffer[test-b]
+ <?lua for i=0,100,20 do ?>
+ draw fullcircle scaled (<?lua p(i) ?> * cm)
+ withcolor "darkblue" withpen pencircle scaled 1cm ;
+ <?lua end ?>
+
+ <?lua for i=10,100,20 do ?>
+ draw fullcircle scaled (<?lua p(i) ?> * cm)
+ withcolor "darkyellow" withpen pencircle scaled 1cm ;
+ <?lua end ?>
+\stopbuffer
+
+\startMPcode
+ draw image (
+ loadfile ("mpstemplate://buffer?name=test-b") ;
+ ) ysized 3cm ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[test-b][option=TEX]
+
+The filename is again specified as a \URI:
+
+\startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+\startbuffer
+\startMPcode
+ picture p[] ; % we can't input nested
+ loadfile("mpstemplate://buffer?name=test-a&method=metapost") ;
+ p[1] := currentpicture ; currentpicture := nullpicture ;
+ loadfile("mpstemplate://buffer?name=test-b&method=xml") ;
+ p[2] := currentpicture ; currentpicture := nullpicture ;
+ draw p[1] ysized 3cm ;
+ draw p[2] ysized 4cm shifted (4cm,0) ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The combination comes out as:
+
+\startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+Another approach is to load as image, which saves some typing:
+
+\startbuffer
+\startMPpage[offset=10pt]
+ draw image (loadfile("mpstemplate://buffer?name=test-a&method=metapost"))
+ xsized 2cm shifted ( 3cm,0) ;
+ draw image (loadfile("mpstemplate://buffer?name=test-b&method=xml"))
+ xsized 2cm shifted ( 6cm,0) ;
+ draw loadimage ("mpstemplate://buffer?name=test-a&method=metapost")
+ xsized 2cm shifted ( 9cm,0) ;
+ draw loadimage ("mpstemplate://buffer?name=test-b&method=xml")
+ xsized 2cm shifted (12cm,0) ;
+\stopMPpage
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The result is predictable:
+
+\startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+Of course there is also a \type {cld} approach possible:
+
+\startbuffer
+\startluacode
+ context.startMPcode() -- context.startMPpage { offset = "10pt" }
+ for i=0,100,20 do
+ context ( [[draw fullcircle scaled (%s * cm)
+ withcolor "darkmagenta" withpen pencircle scaled 1cm ;]], i)
+ end
+ for i=10,100,20 do
+ context ( [[draw fullcircle scaled (%s * cm)
+ withcolor "darkcyan" withpen pencircle scaled 1cm ;]], i)
+ end
+ context.stopMPcode() -- context.stoppage()
+\stopluacode
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The commented commands will create a page. This is a convenient way to make
+graphics that can be used in other documents (programs). For practical reasons the
+example is scaled down:
+
+\startlinecorrection[blank] \scale[height=3cm]{\getbuffer} \stoplinecorrection
+
+All these methods are rather efficient because all happens in memory and without
+intermediate runs. It is this kind of features that the tight integration of \TEX,
+\METAPOST\ and \LUA\ make possible.
+
+\stoptext
+
+\stopsection
+
\stopchapter
\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-styles.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-styles.tex
index f82359117a7..6de9a54daa2 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-styles.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-styles.tex
@@ -189,14 +189,14 @@ what lines we need in order to be calculate the button shapes.
\placefigure
[here][fig:style]
{The lines used to calculate the button shapes.}
- {\externalfigure[mfun-774.pdf][page=1,height=.85\textheight]}
+ {\typesetfile[mfun-774.tex][page=1,height=.85\textheight]}
\stopmode
\startnotmode[screen]
\placefigure
[here][fig:style]
{The auxiliary lines used to calculate the button shapes.}
- {\rotate{\externalfigure[mfun-774.pdf][page=1,height=\textwidth]}}
+ {\rotate{\typesetfile[mfun-774.tex][page=1,height=\textwidth]}}
\stopnotmode
\page
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text-lmtx.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text-lmtx.tex
new file mode 100644
index 00000000000..abdca3c3ad0
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text-lmtx.tex
@@ -0,0 +1,1519 @@
+% language=uk
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\startcomponent metafun-text
+
+\environment metafun-environment
+
+\startchapter[reference=sec:typesetting,title={Typesetting in \METAPOST}]
+
+\startintro
+
+It is said that a picture tells more than a thousand words. So you might expect
+that text in graphics becomes superfluous. Out of experience we can tell you that
+this is not the case. In this chapter we explore the ways to add text to
+\METAPOST\ graphics, and let you choose whether or not to have it typeset by
+\TEX.
+
+\stopintro
+
+\startsection[title={The process}]
+
+\index{text}
+
+The \METAPOST\ program is about graphics, not about text. Its ancestor was made
+for creating fonts and in order to do so, it actually had some limited
+capabilities to add text to a graphic, like coordinates to points. Now, when
+you really want to add typeset text, we need something more. The traditional way
+to add some text to a \METAPOST\ graphic was to use this:
+
+\starttyping
+btex Some text to be typeset by \TEX etex
+\stoptyping
+
+The machinery was set up in such a way that these snippets got delegated to \TEX,
+and the resulting \DVI\ converted back into a a \METAPOST\ picture with objects
+that refer to a font and character. Although the \METAPOST\ program could handle
+that by calling out to \TEX, we never used that method. In \MKII\ we had two
+flows: either direct processing, or collect all texts and process them between
+runs. Because the backend (conversion to \PDF) was under \CONTEXT\ control we
+could do more than usual. You can find some information in the older manuals.
+
+In \CONTEXT\ \MKIV\ we started using the library variant of \METAPOST. Its
+integration in \LUATEX\ made it possible to do all text rendering runtime at high
+speed. This change has an enormous speed gain: when this manual had about 425
+pages, on my laptop with mobile 3840QM processor, one run of this document takes
+18 seconds (14.5 with \LUAJITTEX) and that includes loading a bunch of (outline)
+fonts and processing some 2200 \METAPOST\ images. While writing the first version
+of this manual runtime was upto 50 times slower for half the number of pages so
+compared to \MKII\ we have gained a lot.
+
+In \MKIV\ we still have two internal runs per \METAPOST\ graphic that has text:
+the first time the texts snippets are collected and afterwards handed over to
+\LUA\ that tells the \TEX\ ending to process it. The dimensions are saved and
+used in a second processing of the graphic. Contrary to \MKII\ the user doesn't
+see these two runs: they appear as one. In \in {figure} [fig:text:mkiv] this is
+illustrated.
+
+\startFLOWchart[mkiv]
+ \startFLOWcell
+ \name {metapost 1}
+ \location {1,1}
+ \shape {action}
+ \text {\METAPOST\ \type{textext 1}}
+ \connection [rl] {lua 1}
+ \stopFLOWcell
+ \startFLOWcell
+ \name {lua 1}
+ \location {2,1}
+ \shape {action}
+ \text {\LUA}
+ \connection [rl] {context 1}
+ \connection [bb] {metapost 2}
+ \stopFLOWcell
+ \startFLOWcell
+ \name {context 1}
+ \location {3,1}
+ \shape {action}
+ \text {\CONTEXT}
+ \stopFLOWcell
+ \startFLOWcell
+ \name {metapost 2}
+ \location {4,1}
+ \shape {action}
+ \text {\METAPOST\ \type{textext 2}}
+ \connection [bb] {lua 1}
+ \connection [rl] {backend 1}
+ \stopFLOWcell
+ \startFLOWcell
+ \name {backend 1}
+ \location {5,1}
+ \shape {action}
+ \text {backend}
+ \stopFLOWcell
+\stopFLOWchart
+
+In the later versions of \MKIV\ it was possible to jump out to \TEX\ immediately
+and save the second run, although there were cases where this was not possible
+(reliable). In \LMTX\ we always have one run. This is summarized in \in {figure}
+[fig:text:mkiv]. All this has to do with the fact that \TEX, \METAPOST\ and \LUA\
+are integrated but still kind of independent. When you expand a macro (that
+triggers processing of a graphic) you end up in a call to the \METAPOST\ library
+but \TEX\ is still in that macro. In \LUATEX\ and more advanced in \LUAMETATEX\
+you can sort of spawn a subprocess in \TEX\ (called local control) and indeed
+process the text immediately and use the calculated dimension after that has been
+done. All that \METAPOST\ needs is dimensions as it the backend that eventually
+will include the text.
+
+\startplacefigure[title={How \TEX\ and \METAPOST\ work together (\MKIV).},reference=fig:text:mkiv]
+ \FLOWchart[mkiv]
+\stopplacefigure
+
+\startFLOWchart[lmtx]
+ \startFLOWcell
+ \name {context 1}
+ \location {1,1}
+ \shape {action}
+ \text {\CONTEXT}
+ \connection [rl] {lua 1}
+ \stopFLOWcell
+ \startFLOWcell
+ \name {lua 1}
+ \location {2,1}
+ \shape {action}
+ \text {\LUA}
+ \connection [lr] {context 1}
+ \connection [rl] {metapost 1}
+ \stopFLOWcell
+ \startFLOWcell
+ \name {metapost 1}
+ \location {3,1}
+ \shape {action}
+ \text {\METAPOST\ \type{textext}}
+ \connection [lr] {lua 1}
+ \connection [rl] {backend 1}
+ \stopFLOWcell
+ \startFLOWcell
+ \name {backend 1}
+ \location {5,1}
+ \shape {action}
+ \text {backend}
+ \stopFLOWcell
+\stopFLOWchart
+
+\startplacefigure[title={How \TEX\ and \METAPOST\ work together (\LMTX).},reference=fig:text:lmtx]
+ \FLOWchart[lmtx]
+\stopplacefigure
+
+\stopsection
+
+\startsection[title={Environments}]
+
+\index{environments}
+
+The \type {textext} command is the main text handling command and it is used in many places
+in this manual. It takes a string.
+
+In \MKII\ text was processed between runs or immediately but still by running an
+independent \TEX\ run. That has some consequences when the text was to share its
+properties with the main document. This means that in \MKII\ we pass
+characteristics of the layout, spacing, fonts, color and optionally an
+environment that a user has set up. This is mentioned in the older manual but no
+longer relevant in \MKIV\ and \LMTX. Because we handle the text runtime we
+automatically use the same style and document properties.
+
+This means that in code like the following, a Palatino font will be used because
+that is what we use in this document.
+
+\starttyping
+\startMPcode
+draw btex Meta is a female lion! etex xysized (TextWidth,TextHeight) ;
+\stopMPcode
+\stoptyping
+
+But even when we still support \type {btex} we strongly advise users to use this:
+
+\starttyping
+\startMPcode
+draw textext("Meta is a female lion!") xysized (TextWidth,TextHeight) ;
+\stopMPcode
+\stoptyping
+
+In this example as well in the next one you see that we access \type {TextWidth}
+directly. In older examples in the \CONTEXT\ distribution you will notice that we
+serialize \TEX\ registers like \type {\textwidth}. This is still valid but less
+preferable. Here \type {TextWidth} is actually a macro that calls out to \LUA\
+from where we fetch the value of \type {\textwidth} and pipe it back to
+\METAPOST\ in a way that makes it look like we have a variable.
+
+\startbuffer[lioncode]
+\startMPcode
+numeric w, h ; w := TextWidth ; h := w/2 ;
+
+picture p ; p := textext.urt("Meta is a female lion!") xysized (w,h) ;
+picture q ; q := textext.urt("Meta is a female lion!") xysized (w,h) ;
+
+path b ; b := boundingbox p ; draw p withcolor "darkyellow" ;
+
+draw textextanchor(p) withpen pencircle scaled 5mm withcolor "darkblue" ;
+
+for i = (.28w,.90h), (.85w,.90h), (w,.05h) :
+ picture r ; r := q ;
+ path s ; s := (fullsquare xscaled .05w yscaled .4h) shifted i ;
+ clip r to s ;
+ draw r withcolor "darkred";
+endfor ;
+
+setbounds currentpicture to b ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer[lioncode]
+
+\in {Figure} [lionclip] shows the previous sentence in a slightly different look.
+You may consider coloring the dots to be an exercise in clipping.
+
+\startplacefigure[title={An example of clipping.},reference=lionclip]
+ \getbuffer[lioncode]
+\stopplacefigure
+
+In this example we show that the origin of the text. By default it gets centered
+but the \type {urt} suffix moves it. Here is another example of showing the
+origin:
+
+\startbuffer
+\startMPcode
+picture p ; p := thetextext.top("foo",(10,1));
+picture q ; q := thetextext.lft("foo",(1,10));
+
+draw textextanchor(p) withpen pencircle scaled 2mm withcolor "darkred" ;
+draw textextanchor(q) withpen pencircle scaled 1mm withcolor "white" ;
+
+draw p;
+draw q;
+\stopMPcode
+\stopbuffer
+
+\typebuffer
+
+It gives the following:
+
+\startlinecorrection[blank]
+\getbuffer
+\stoplinecorrection
+
+\stopsection
+
+\startsection[title={Labels}]
+
+\index{labels}
+
+In \METAPOST\ you can use the \type {label} macro to position text at certain
+points.
+
+\starttyping
+label("x", origin) ;
+\stoptyping
+
+The font and scale are determined by two variables, \type {defaultfont} and \type
+{defaultscale}, the former expecting the name of a font in the form of a string,
+the latter expecting a numeric to be used in the scaling of the font. Should you
+choose not to set these yourself, they default to \type {"Mono"} and \type
+{1.0}, respectively. However, you can change the defaults as follows:
+
+\starttyping
+defaultfont := "texgyrepagella-regular*default" ;
+defaultscale := 1.2 ;
+\stoptyping
+
+These settings selects Pagella at about 12pt. You can also set these variables
+to \CONTEXT\ related values. For \CONTEXT\ graphics they are set to:
+
+\starttyping
+defaultfont := "\truefontname{Regular}*default" ;
+defaultscale := \the\bodyfontsize/10 ;
+\stoptyping
+
+This means that they will adapt themselves to the current body font (in this
+document we get \truefontname {Regular}) and the current size of the bodyfont
+(here \the\bodyfontsize/10).
+
+Normally you can stick to the default and forget about these details. More important
+is how you anchor labels. This is best shown with some examples:
+
+\startbuffer
+\startMPcode
+ path p ; p := fullcircle scaled 3cm ;
+
+ drawarrow p ;
+
+ dotlabel ("test",point 0 of p) withcolor red ;
+ dotlabel.rt ("rt", point 1 of p) ;
+ dotlabel.urt ("urt", point 2 of p) ;
+ dotlabel.top ("top", point 3 of p) ;
+ dotlabel.ulft("ulft",point 4 of p) ;
+ dotlabel.lft ("lft", point 5 of p) ;
+ dotlabel.llft("llft",point 6 of p) ;
+ dotlabel.bot ("bot", point 7 of p) ;
+ dotlabel.lrt ("lrt", point 8 of p) ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer \startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+\startbuffer
+\startMPcode
+ path p ; p := fullcircle scaled 3cm ;
+
+ drawarrow p ;
+
+ dotlabel ("test",p) ;
+ dotlabel.rt ("rt", p) ;
+ dotlabel.urt ("urt", p) ;
+ dotlabel.top ("top", p) ;
+ dotlabel.ulft("ulft",p) ;
+ dotlabel.lft ("lft", p) ;
+ dotlabel.llft("llft",p) ;
+ dotlabel.bot ("bot", p) ;
+ dotlabel.lrt ("lrt", p) ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer \startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+\startbuffer
+\startMPcode
+ p := (origin..right..up..left) scaled 3cm ;
+
+ drawarrow p ;
+
+ label ("test",p) ;
+ label.rt ("rt", p) ;
+ label.urt ("urt", p) ;
+ label.top ("top", p) ;
+ label.ulft("ulft",p) ;
+ label.lft ("lft", p) ;
+ label.llft("llft",p) ;
+ label.bot ("bot", p) ;
+ label.lrt ("lrt", p) ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer \startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+\startbuffer
+\startMPcode
+ picture p ; p := image(drawarrow (origin..right..up..left) scaled 3cm ;) ;
+
+ draw p ;
+ draw bbox p dashed evenly ;
+
+ label ("test",p) ;
+ label.rt ("rt", p) ;
+ label.urt ("urt", p) ;
+ label.top ("top", p) ;
+ label.ulft("ulft",p) ;
+ label.lft ("lft", p) ;
+ label.llft("llft",p) ;
+ label.bot ("bot", p) ;
+ label.lrt ("lrt", p) ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer \startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+\startbuffer
+\startMPcode
+ picture p ; p := image(drawarrow (origin..right..up..left) scaled 3cm ;) ;
+
+ draw p ;
+ draw bbox p dashed evenly ;
+
+ draw textext ("test") shifted theoffset (p) ;
+ draw textext.lft ("rt") shifted theoffset.rt (p) ;
+ draw textext.llft("urt") shifted theoffset.urt (p) ;
+ draw textext.bot ("top") shifted theoffset.top (p) ;
+ draw textext.lrt ("ulft") shifted theoffset.ulft(p) ;
+ draw textext.rt ("lft") shifted theoffset.lft (p) ;
+ draw textext.urt ("llft") shifted theoffset.llft(p) ;
+ draw textext.top ("bot") shifted theoffset.bot (p) ;
+ draw textext.ulft("lrt") shifted theoffset.lrt (p) ;
+\stopMPcode
+\stopbuffer
+
+\typebuffer \startlinecorrection[blank] \getbuffer \stoplinecorrection
+
+\stopsection
+
+\startsection[title={Text along a path}]
+
+\index{text}
+
+In the next example we will use a special mechanism for building graphics step by
+step. The advantage of this method is that we can do intermediate calculations in
+\TEX. Our objective is to write a macro that draws text along a circular path.
+While doing so we want to achieve the following:
+
+\startitemize[packed]
+ \startitem
+ the text should be properly kerned, i.e.\ the spacing between characters
+ should be optimal,
+ \stopitem
+ \startitem
+ the position on the circle should vary, and
+ \stopitem
+ \startitem
+ the radius of the circle should vary.
+ \stopitem
+\stopitemize
+
+This code below is a bit rusted but it illustrates the principles. In \MKIV\ and
+\LMTX\ we have typesetting along a curve built in so we no longer show the \TEX\
+code that integrates it. This implementation is not the most straightforward one,
+but by doing it step by step, at least we see what is involved.
+
+We let the bodyfont match the font used in this document, and define \type
+{RotFont} to be the regular typeface, the one you are reading right now, but
+bold.
+
+\startbuffer
+\definefont[RotFont][RegularBold*default]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Since \METAPOST\ is unaware of kerning, we have to use \TEX\ to keep track of the
+positions. We will split the text into tokens (often characters) and store the
+result in an array of pictures (\type {pic}). We will also store the accumulated
+width in an array (\type {len}). The number of characters is stored in~\type {n}.
+In a few paragraphs we will see why the other arrays are needed.
+
+While defining the graphic, we need \TEX\ to do some calculations. Therefore, we
+will use \type {\startMPdrawing} to stepwise construct the definition. The basic
+pattern we will follow is:
+
+\starttyping
+\resetMPdrawing
+\startMPdrawing
+ metapost code
+\stopMPdrawing
+tex code
+\startMPdrawing
+ metapost code
+\stopMPdrawing
+\MPdrawingdonetrue
+\getMPdrawing
+\stoptyping
+
+In the process, we will use a few variables. We will store the individual
+characters of the text in the variable \type {pic}, its width in \type {wid} and
+the length of the string so far in \type {len}. Later we will use the \type {pos}
+array to store the position where a character ends up. The variable \type {n}
+holds the number of tokens.
+
+\startbuffer[init]
+\resetMPdrawing
+\startMPdrawing
+ picture pic[] ;
+ numeric wid[], len[], pos[], n ;
+ wid[0] := len[0] := pos[0] := n := 0 ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[init]
+
+We also started fresh by resetting the drawing. From now on, each start command
+will add some more to this graphic. The next macro is responsible for collecting
+the data. Each element is passed on to \TEX, using the \type {btex} construct.
+So, \METAPOST\ itself will call \TEX !
+
+\startbuffer[toks]
+\def\whatever#1%
+ {\appendtoks#1\to\MPtoks
+ \setbox\MPbox=\hbox{\bfd\the\MPtoks}%
+ \startMPdrawing
+ n := n + 1 ; len[n] := \the\wd\MPbox ;
+ \stopMPdrawing
+ \startMPdrawing[-]
+ pic[n] := textext("\bfd\setstrut\strut#1") ;
+ pic[n] := pic[n] shifted - llcorner pic[n] ;
+ \stopMPdrawing}
+
+\handletokens MetaPost is Fun!\with\whatever
+\stopbuffer
+
+\typebuffer[toks]
+
+We use the low level \CONTEXT\ macro \type {\appendtoks} to extend the token list
+\type {\MPtoks}. The \type {\handletokens} macro passes each token (character) of
+\typ {MetaPost is Fun!} to the macro \type {\whatever}. The tokens are appended
+to the token register \type {\MPtoks} (already defined). Then we typeset the
+content of \type {\MPtoks} in \type {\MPbox} (also already defined). The width of
+the box is passed to \METAPOST\ and stored in \type {len}.
+
+By default the content of the drawing is expanded, which means that the macro is
+replaced by its current meaning, so the current width ends up in the \METAPOST\
+file. The next part of the drawing, starting with \type {btex}, puts the token in
+a picture. This time we don't expand the drawing, since we want to pass font
+information. Here, the \type {[-]} suppresses expansion of \typ {btex \bfd #1
+etex}. The process is iterated by \type {\handletokens} for each character of the
+text \typ {MetaPost is Fun!}.
+
+Before we typeset the text, now available in pieces in \type {pic}, in a circle,
+we will first demonstrate what they look like. You may like to take a look at the
+file \type {mpgraph.mp} to see what is passed to \METAPOST.
+
+\startbuffer[test]
+\startMPdrawing
+ pair len ; len := origin ;
+ for i=1 upto n :
+ draw pic[i] shifted len ;
+ draw boundingbox pic[i] shifted len
+ withpen pencircle scaled .25pt withcolor red ;
+ len := len+(xpart urcorner pic[i]-xpart llcorner pic[i],0) ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[test]
+
+\startbuffer[show]
+\MPdrawingdonetrue\getMPdrawing
+\stopbuffer
+
+We can call up this drawing with \type {\getMPdrawing}, but first we inform the
+compiler that our \METAPOST\ drawing is completed.
+
+\typebuffer[show]
+
+This results in:
+
+\startlinecorrection[blank]
+\getbuffer[init,toks,test,show]
+\stoplinecorrection
+
+Compare this text with the text as typeset by \TEX:
+
+\blank \start \bfd MetaPost is Fun!\par \stop \blank
+
+and you will see that the text produced by \METAPOST\ is not properly kerned.
+When putting characters after each other, \TEX\ uses the information available in
+the font, to optimize the spacing between characters, while \METAPOST\ looks at
+characters as separate entities. But, since we have stored the optimal spacing in
+\type {len}, we can let \METAPOST\ do a better job. Let's first calculate the
+correction needed.
+
+\startbuffer[kern]
+\startMPdrawing
+ for i=1 upto n :
+ wid[i] := abs(xpart urcorner pic[i] - xpart llcorner pic[i]) ;
+ pos[i] := len[i]-wid[i] ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[kern]
+
+This compares well to the text as typeset by \TEX:
+
+\blank \start \bfd MetaPost is Fun!\par \stop \blank
+
+We can now use the values in \type {pos} to position the pictures according to
+what \TEX\ considered to be the best (relative) position.
+
+\startbuffer[test]
+\startMPdrawing
+ for i=1 upto n :
+ draw pic[i] shifted (pos[i],0) ;
+ draw boundingbox pic[i] shifted (pos[i],0)
+ withpen pencircle scaled .25pt withcolor red ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[test]
+
+That this correction is adequate, is demonstrated in the next graphic. If you
+look closely, you will see that for instance the \quote {o} is moved to the left,
+under the capital \quote {P}.
+
+\startlinecorrection[blank]
+\getbuffer[init,toks,kern,test,show]
+\stoplinecorrection
+
+When we want to position the pictures along a circle, we need to apply some
+rotations, especially because we want to go clockwise. Since we don't want to use
+\quote {complicated} math or more advanced \METAPOST\ code yet, we will do it in
+steps.
+
+\startbuffer[swap]
+\startMPdrawing
+ for i=1 upto n:
+ pic[i] := pic[i] rotatedaround(origin,-270) ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[swap]
+
+\startlinecorrection[blank]
+\getbuffer[init,toks,kern,swap,test,show]
+\stoplinecorrection
+
+\startbuffer[cent]
+\startMPdrawing
+ for i=1 upto n :
+ pic[i] := pic[i]
+ shifted (0,ypart -.5[ulcorner pic[i],llcorner pic[i]]) ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+We will now center the pictures around the baseline. Centering comes down to
+shifting over half the height of the picture. This can be expressed by:
+
+\starttyping
+ypart -.5[ulcorner pic[i],llcorner pic[i]]
+\stoptyping
+
+but different ways of calculating the distance are possible
+too.
+
+\typebuffer[cent]
+
+So, now we have:
+
+\startlinecorrection[blank]
+\getbuffer[init,toks,kern,swap,cent,test,show]
+\stoplinecorrection
+
+When we typeset on a (half) circle, we should map the actual length onto a
+partial circle. We denote the radius with an~\type {r} and shift the pictures to
+the left.
+
+\startbuffer[shif]
+\startMPdrawing
+ numeric r ; r := len[n]/pi ;
+ for i=1 upto n :
+ pic[i] := pic[i] shifted (-r,0) ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[shif]
+
+You can now use the following code to test the current state of the pictures. Of
+course this code should not end up in the final definitions.
+
+\startbuffer[test]
+\startMPdrawing
+ draw origin
+ withpen pencircle scaled 5pt withcolor red ;
+ for i=1 upto n :
+ draw pic[i] ;
+ draw boundingbox pic[i]
+ withpen pencircle scaled .25pt withcolor red ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[test]
+
+\startlinecorrection[blank]
+\getbuffer[init,toks,kern,swap,cent,shif,test,show]
+\stoplinecorrection
+
+Later we will write a compact, efficient macro to take care of rotation. However,
+for the moment, so as not to overwhelm you with complicated code, we will rotate
+each individual picture with the following code fragment.
+
+\startbuffer[rots]
+\startMPdrawing
+ numeric delta, extra, radius, rot[] ;
+
+ delta := extra := radius := 0 ;
+
+ for i=1 upto n :
+ rot[i] := extra+delta-((pos[i]+.5wid[i])/len[n])*(180+2delta) ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[rots]
+
+Here we introduce a few variables that we can use later to tune the result a bit.
+With \type {delta}, the space between the characters can be increased, while
+\type {extra} rotates the whole string around the origin. The \type {radius}
+variable can be used to increase the distance to the origin. Without these
+variables, the assignment would have been:
+
+\starttyping
+rot[i] := ((pos[i]+.5wid[i])/len[n])*180 ;
+\stoptyping
+
+Placing the pictures is now rather easy:
+
+\startbuffer[done]
+\startMPdrawing
+ for i=1 upto n :
+ draw pic[i] shifted (-radius,0) rotatedaround(origin,rot[i]) ;
+ endfor ;
+\stopMPdrawing
+\stopbuffer
+
+\typebuffer[done]
+
+The pictures are now positioned on half a circle, properly kerned.
+
+\startlinecorrection[blank]
+\getbuffer[init,toks,kern,swap,cent,shif,rots,done,show]
+\stoplinecorrection
+
+A bit more insight is given in the next picture:
+
+\startbuffer[test]
+\startMPdrawing
+ def moved(expr i) =
+ shifted (-radius,0) rotatedaround(origin,rot[i])
+ enddef ;
+ pickup pencircle scaled .5pt ;
+ for i=1 upto n :
+ draw pic[i] moved(i) ;
+ draw boundingbox pic[i] moved(i) withcolor red ;
+ draw origin -- center pic[i] moved(i) withcolor green ;
+ endfor ;
+ draw tcircle scaled 2r withcolor blue ;
+\stopMPdrawing
+\stopbuffer
+
+\startlinecorrection[blank]
+\getbuffer[init,toks,kern,swap,cent,shif,rots,test,show]
+\stoplinecorrection
+
+This was defined as follows. The path variable \type {tcycle} is predefined to
+the top half of a fullcircle.
+
+\typebuffer[test]
+
+We will now package all of this into a nice, efficient macro, using, of course,
+the predefined scratch registers \type {\MPtoks} and \type {\MPbox}. First we
+define the token processor. Note again the expansion inhibition switch \type
+{[-]}. This code is presented as an example of how these mechanissm evolved in
+\CONTEXT.
+
+\startbuffer
+\def\processrotationtoken#1%
+ {\appendtoks#1\to\MPtoks
+ \setbox\MPbox=\hbox{\RotFont\the\MPtoks}%
+ \startMPdrawing
+ n := n + 1 ; len[n] := \the\wd\MPbox ;
+ \stopMPdrawing
+ \startMPdrawing[-]
+ pic[n] := textext("\RotFont\setstrut\strut#1") ;
+ pic[n] := pic[n] shifted - llcorner pic[n] ;
+ \stopMPdrawing}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+The main macro is a bit more complicated but by using a few scratch numerics, we
+can keep it readable.
+
+\startbuffer
+\def\rotatetokens#1#2#3#4% delta extra radius tokens
+ {\vbox\bgroup
+ \MPtoks\emptytoks
+ \resetMPdrawing
+ \startMPdrawing
+ picture pic[] ;
+ numeric wid, len[], rot ;
+ numeric delta, extra, radius, n, r ;
+ len[0] := n := 0 ;
+ delta := #1 ; extra := #2 ; radius := #3 ;
+ \stopMPdrawing
+ \handletokens#4\with\processrotationtoken
+ \startMPdrawing
+ r := len[n]/pi ;
+ for i=1 upto n :
+ wid := abs(xpart lrcorner pic[i] -
+ xpart llcorner pic[i]) ;
+ rot := extra + delta -
+ ((len[i]-.5wid)/len[n]) * (180+2delta) ;
+ draw pic[i]
+ rotatedaround (origin,-270) shifted (-r-radius,
+ ypart -.5[ulcorner pic[i], llcorner pic[i]])
+ rotatedaround (origin,rot) ;
+ endfor ;
+ \stopMPdrawing
+ \MPdrawingdonetrue
+ \getMPdrawing
+ \resetMPdrawing
+ \egroup}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\startbuffer
+\startcombination[3*1]
+ {\rotatetokens {0} {0}{0}{Does it work ok?}} {A}
+ {\rotatetokens{20} {0}{0}{Does it work ok?}} {B}
+ {\rotatetokens{20}{30}{0}{Does it work ok?}} {C}
+\stopcombination
+\stopbuffer
+
+We can use this macro as follows:
+
+\typebuffer
+
+\startlinecorrection[blank]
+\getbuffer
+\stoplinecorrection
+
+The previous macro is not really an example of generalization, but we used it for
+demonstrating how to build graphics in a stepwise way. If you put the steps in
+buffers, you can even combine steps and replace them at will. This is how we made
+the previous step by step examples: We put each sub||graphic in a buffer and then
+called the ones we wanted.
+
+Next we show how it is done today in \LMTX. Instead of wrapping it in a macro we
+just do all in \METAPOST. Watch how we use the key|/|value interface:
+
+\startbuffer
+\startMPcode
+ draw lmt_followtext [
+ path = halfcircle rotated 45 scaled 4cm,
+ text = "Does it work ok?",
+ spread = true,
+ trace = true,
+ ] ;
+ draw lmt_followtext [
+ path = halfcircle rotated -30 scaled 3cm,
+ text = "Does it work ok?",
+ spread = false,
+ trace = true,
+ ] shifted (4cm,0) ;
+ draw lmt_followtext [
+ path = reverse halfcircle scaled 2cm,
+ text = "Does it work ok?",
+ spread = true,
+ trace = true,
+ ] shifted (8cm,0) ;
+\stopMPcode
+\stopMPcode
+\stopbuffer
+
+\typebuffer
+
+\startlinecorrection[blank]
+\getbuffer
+\stoplinecorrection
+
+\stopsection
+
+\startsection[title={Using shapes}]
+
+Sometimes, others may say oftentimes, we are in need for some fancy typesetting.
+If we want to typeset a paragraph of text in a non standard shape, like a circle,
+we have to fall back on \type {\parshape}. Unfortunately, \TEX\ is not that
+strong in providing the specifications of more complicated shapes, unless you are
+willing to do some complicated arithmetic \TEX. Given that \METAPOST\ knows how
+to deal with shapes, the question is: \quotation {Can \METAPOST\ be of help?}
+
+In the process of finding out how to deal with this, we first define a simple
+path. Because we are going to replace pieces of code, we will compose the graphic
+from components. First, we create the path.
+
+\startbuffer
+\startuseMPgraphic{text path}
+ path p ; p := ((0,1)..(-1,0)..(1,0)--cycle) scaled 65pt ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+This shape is not that beautiful, but it has a few characteristics that will help
+us to identify bordercases.
+
+\startbuffer
+\startuseMPgraphic{text draw}
+ drawarrow p withpen pencircle scaled 1pt withcolor red ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Now we use \CONTEXT's \type {\includeMPgraphic} command to build our graphic from
+the previously defined components.
+
+\startbuffer
+\startuseMPgraphic{text}
+ \includeMPgraphic{text path}
+ \includeMPgraphic{text draw}
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+When called with \type {\useMPgraphic{text}}, we get:
+
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+For the moment we start the path at $(x=0,y>0)$, but later using more complicated
+macros, we will see that we can use arbitrary paths.
+
+We are going to split the path in two, and will use the points that make up the
+bounding box as calcutated by \METAPOST. The next graphic shows one of these
+points, the lower left corner, available as point \typ {llcorner p}.
+
+\startbuffer
+\startuseMPgraphic{text draw}
+ draw p withpen pencircle scaled 3pt withcolor red ;
+ draw boundingbox p withpen pencircle scaled 1pt ;
+ draw llcorner p withpen pencircle scaled 5pt ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+The five points that \METAPOST\ can report for each path or picture are:
+
+\starttabulate[|Tl|l|]
+\NC llcorner \NC lower left corner \NC \NR
+\NC lrcorner \NC lower right corner \NC \NR
+\NC urcorner \NC upper right corner \NC \NR
+\NC ulcorner \NC upper left corner \NC \NR
+\NC center \NC intersection of the diagonals \NC \NR
+\stoptabulate
+
+If we want to typeset text inside this circle, we need to know where a line
+starts and ends. Given that lines are horizontal and straight, we therefore need
+to calculate the intersection points of the lines and the path. As a first step,
+we calculate the top and bottom of the path and after that we split off the left
+and right path.
+
+\startbuffer
+\startuseMPgraphic{text split}
+ pair t, b ; path l, r ;
+
+ t := (ulcorner p -- urcorner p) intersectionpoint p ;
+ b := (llcorner p -- lrcorner p) intersectionpoint p ;
+
+ l := p cutbefore t ; l := l cutafter b ;
+ r := p cutbefore b ; r := r cutafter t ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The \type {intersectionpoint} macro returns the point where two paths cross. If
+the paths don't cross, an error is reported, when the paths cross more times,
+just one point is returned. The \type {cutafter} and \type {cutbefore} commands
+do as their names say and return a path.
+
+In the \type {text split} code fragment, \type {t} and \type {b} are the top
+points of the main path, while \type {l} and \type {r} become the left and right
+half of path \type {p}.
+
+We now draw the original path using a thick pen and both halves with a thinner
+pen on top of the original. The arrows show the direction.
+
+\startbuffer
+\startuseMPgraphic{text draw}
+ draw p withpen pencircle scaled 3pt withcolor red ;
+ drawarrow l withpen pencircle scaled 1pt withcolor green ;
+ drawarrow r withpen pencircle scaled 1pt withcolor blue ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We use \type {\includeMPgraphic} to assemble the components:
+
+\startbuffer
+\startuseMPgraphic{text}
+ \includeMPgraphic{text path}
+ \includeMPgraphic{text split}
+ \includeMPgraphic{text draw}
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+This graphic is typeset with \type {\useMPgraphic{text}}:
+
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+Before we are going to use them, we define some variables that specify the text.
+We use a baseline distance of 8~points. The part of the line above the baseline
+is 7.2~points, while the (maximum) depth is 2.8~points. These ratios are the ones
+we use in \CONTEXT. Because we don't want the text to touch the circle so we
+define an offset too.
+
+\startbuffer
+\startuseMPgraphic{text vars}
+ MyOffset := LineHeight/2 ;
+ MyTopSkip := StrutHeight ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We more or less achieve the offset by scaling the path. In doing so, we use the
+width and height, which we call \type {hsize} and \type {vsize}, thereby
+conforming to the \TEX\ naming scheme.
+
+First we calculate both dimensions from the bounding box of the path. Next we
+down scale the path to compensate for the offset. When done, we recalculate the
+dimensions.
+
+\startbuffer
+\startuseMPgraphic{text move}
+ pair t, b ; path q, l, r ;
+
+ hsize := xpart lrcorner p - xpart llcorner p ;
+ vsize := ypart urcorner p - ypart lrcorner p ;
+
+ q := p xscaled ((hsize-2MyOffset)/hsize)
+ yscaled ((vsize-2MyOffset)/vsize) ;
+
+ hsize := xpart lrcorner q - xpart llcorner q ;
+ vsize := ypart urcorner q - ypart lrcorner q ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startuseMPgraphic{text split}
+ t := (ulcorner q -- urcorner q) intersectionpoint q ;
+ b := (llcorner q -- lrcorner q) intersectionpoint q ;
+
+ l := q cutbefore t ; l := l cutafter b ;
+ r := q cutbefore b ; r := r cutafter t ;
+\stopuseMPgraphic
+\stopbuffer
+
+We adapt the \type {text split} code to use the reduced path
+instead of the original.
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startuseMPgraphic{text draw}
+ drawarrow p withpen pencircle scaled 1pt withcolor red ;
+ draw t withpen pencircle scaled 2pt ;
+ draw b withpen pencircle scaled 2pt ;
+ drawarrow l withpen pencircle scaled 1pt withcolor green ;
+ drawarrow r withpen pencircle scaled 1pt withcolor blue ;
+\stopuseMPgraphic
+\stopbuffer
+
+In order to test what we have reached so far, we draw the original path, the left
+and right part of the reduced path, and both the top and bottom point.
+
+\typebuffer \getbuffer
+
+Again we use \type {\includeMPgraphic} to combine the
+components into a graphic.
+
+\startbuffer
+\startuseMPgraphic{text}
+ \includeMPgraphic{text path} \includeMPgraphic{text vars}
+ \includeMPgraphic{text move} \includeMPgraphic{text split}
+ \includeMPgraphic{text draw}
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Then we use \type {\useMPgraphic{text}} to call up the picture.
+
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+The offset is not optimal. Note the funny gap at the top. We could try to fix
+this, but there is a better way to optimize both paths.
+
+We lower the top edge of \type {q}'s bounding box by \type {MyTopSkip}, then cut
+any part of the left and right pieces of \type {q} that lie above it. Similarly,
+we raise the bottom edge and cut off the pieces that fall below this line.
+
+\startbuffer
+\startuseMPgraphic{text cutoff}
+ path tt, bb ;
+
+ tt := (ulcorner q -- urcorner q) shifted (0,-MyTopSkip) ;
+ bb := (llcorner q -- lrcorner q) shifted (0,StrutDepth) ;
+
+ l := l cutbefore (l intersectionpoint tt) ;
+ l := l cutafter (l intersectionpoint bb) ;
+ r := r cutbefore (r intersectionpoint bb) ;
+ r := r cutafter (r intersectionpoint tt) ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Because we use \type {\includeMPgraphic} to construct the graphic, we can
+redefine \type {text draw} to show the result of this effort.
+
+\startbuffer
+\startuseMPgraphic{text draw}
+ drawarrow p withpen pencircle scaled 1pt withcolor red ;
+ drawarrow l withpen pencircle scaled 1pt withcolor green ;
+ drawarrow r withpen pencircle scaled 1pt withcolor blue ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The \type {text} graphic now becomes:
+
+\startbuffer
+\startuseMPgraphic{text}
+ \includeMPgraphic{text path} \includeMPgraphic{text vars}
+ \includeMPgraphic{text move} \includeMPgraphic{text split}
+ \includeMPgraphic{text cutoff} \includeMPgraphic{text draw}
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Or, as graphic:
+
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+We are now ready for an attempt to calculate the shape of the text. For each
+line, we have to calculate the left and right intersection points, and since a
+line has a height and depth, we have to determine which part touches first.
+
+\startbuffer
+\startuseMPgraphic{text calc}
+ vardef found_point (expr lin, pat, sig) =
+ pair a, b ;
+ a := pat intersection_point (lin shifted (0,StrutHeight)) ;
+ if intersection_found :
+ a := a shifted (0,-StrutHeight) ;
+ else :
+ a := pat intersection_point lin ;
+ fi ;
+ b := pat intersection_point (lin shifted (0,-StrutDepth)) ;
+ if intersection_found :
+ if sig :
+ if xpart b > xpart a : a := b shifted (0,StrutDepth) fi ;
+ else :
+ if xpart b < xpart a : a := b shifted (0,StrutDepth) fi ;
+ fi ;
+ fi ;
+ a
+ enddef ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Instead of using \METAPOST's \type {intersectionpoint} macro, we use one that
+comes with \CONTEXT. That way we don't get an error message when no point is
+found, and can use a boolean flag to take further action. Since we use a \type
+{vardef}, all calculations are hidden and the~\type {a} at the end is returned,
+so that we can use this macro in an assignment. The \type {sig} variable is used
+to distinguish between the beginning and end of a line (the left and right
+subpath).
+
+\startbuffer
+\startuseMPgraphic{text step}
+ path line; pair lll, rrr ;
+
+ for i=MyTopSkip step LineHeight until vsize :
+
+ line := (ulcorner q -- urcorner q) shifted (0,-i) ;
+
+ lll := found_point(line,l,true ) ;
+ rrr := found_point(line,r,false) ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Here we divide the available space in lines. The first line starts at \type
+{StrutHeight} from the top.
+
+We can now finish our graphic by visualizing the lines. Both the height and depth
+of the lines are shown.
+
+\startbuffer
+\startuseMPgraphic{text line}
+ fill (lll--rrr--rrr shifted (0,StrutHeight)--lll
+ shifted (0,StrutHeight)--cycle) withcolor .5white ;
+ fill (lll--rrr--rrr shifted (0,-StrutDepth)--lll
+ shifted (0,-StrutDepth)--cycle) withcolor .7white ;
+ draw lll withpen pencircle scaled 2pt ;
+ draw rrr withpen pencircle scaled 2pt ;
+ draw (lll--rrr) withpen pencircle scaled .5pt ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{text done}
+ endfor ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The result is still a bit disappointing.
+
+\startbuffer
+\startuseMPgraphic{text}
+ \includeMPgraphic{text path} \includeMPgraphic{text vars}
+ \includeMPgraphic{text move} \includeMPgraphic{text split}
+ \includeMPgraphic{text cutoff} \includeMPgraphic{text draw}
+ \includeMPgraphic{text calc} \includeMPgraphic{text step}
+ \includeMPgraphic{text line} \includeMPgraphic{text done}
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+In order to catch the overflow at the bottom, we need to change the \type
+{for}||loop a bit, so that the number of lines does not exceed the available
+space. The test that surrounds the assignment of \type {vvsize} makes sure that
+we get better results when we (on purpose) take a smaller height.
+
+\startbuffer
+\startuseMPgraphic{text step}
+ path line; pair lll, rrr ; numeric vvsize ;
+
+ if (StrutHeight+StrutDepth<LineHeight) :
+ vvsize := vsize ;
+ else :
+ vvsize := (vsize div LineHeight) * LineHeight ;
+ fi ;
+
+ for i=MyTopSkip step LineHeight until vvsize :
+
+ line := (ulcorner q -- urcorner q) shifted (0,-i) ;
+
+ lll := found_point(line,l,true ) ;
+ rrr := found_point(line,r,false) ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+We can manipulate the heigth and depth of the lines to give different (and maybe
+better) results.
+
+\startbuffer
+\startuseMPgraphic{text vars}
+MyOffset := .5LineHeight ;
+MyTopSkip := StrutHeight ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startlinecorrection[blank]
+\useMPgraphic{text}
+\stoplinecorrection
+
+Now that we know a bit how this works we demonstrate the implementation in \LMTX.
+Where in \MKIV\ and \MKII\ we let \METAPOST\ pass the dimensions to \TEX\ via a
+temporary file in \LMTX\ we communicate more directly. You can take a look at the
+source code if you want to know how that works.
+
+We start by defining four shapes. They are not really beautiful, but they
+demonstrate what happens in border cases. For instance, too small first lines are
+ignored. First we define a circle. Watch how the dimensions are set in the
+graphic. The arguments passed to \type {lmt_parshape} are: path, an offset, an
+additional horizontal and vertical displacement, the baseline distance, the
+height and depth of the line, and the height of the first line (aka topskip). The
+height and depth of a line are often called strut height and depth, with a strut
+being an invisible character with maximum dimensions. Variables like \type
+{StrutHeight} refer to values at the \TEX\ end. We play safe and group so that we
+can save variables.
+
+\startbuffer
+\startuseMPgraphic{shapetest-1}
+ begingroup ;
+ save p ; path p ; p := fullcircle scaled 6cm ;
+ lmt_parshape [
+ path = p,
+ offset = BodyFontSize/2,
+ dx = 0, % default
+ dy = 0, % default
+ lineheight = LineHeight, % default
+ strutheight = StrutHeight, % default
+ strutdepth = StrutDepth, % default
+ topskip = StrutHeight, % default
+ ] ;
+ draw p withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The second shape is a diamond. This is a rather useless shape, unless the text
+suits the small lines at the top and bottom.
+
+\startbuffer
+\startuseMPgraphic{shapetest-2}
+ begingroup ;
+ save p ; path p ; p := fullsquare rotated 45 scaled 5cm ;
+ lmt_parshape [
+ path = p,
+ offset = BodyFontSize/2,
+ trace = true,
+ ] ;
+ draw p withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The third and fourth shape demonstrate that providing a suitable offset is not
+always trivial.
+
+\startbuffer
+\startuseMPgraphic{shapetest-3}
+ begingroup ;
+ save w, h, p ; path p ; w := h := 6cm ;
+ p := (.5w,h) -- ( 0, h) -- (0,0) -- (w,0) &
+ ( w,0) .. (.75w,.5h) .. (w,h) & (w,h) -- cycle ;
+ lmt_parshape [
+ path = p,
+ offset = BodyFontSize/2,
+ ] ;
+ draw p withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Contrary to the first three shapes, here we use a different path for the
+calculations and the drawing. Watch carefully! If, instead of an offset, we pass
+a path, \METAPOST\ is able to calculate the right dimensions and offsets. This is
+needed, since we need these later on.
+
+\startbuffer
+\startuseMPgraphic{shapetest-4}
+ begingroup ;
+ save d, p, q, shape ; path p, q ; d := BodyFontSize/2;
+ vardef shape(expr w, h, o) =
+ (o,o) -- (w-o,o) & (w-o,o) .. (.75w-o,.5h) ..
+ (w-2o,h-o) & (w-2o,h-o) -- (o,h-o) -- cycle
+ enddef ;
+ p := shape(6cm, 6cm, d) ;
+ q := shape(6cm, 6cm, 0) ;
+ lmt_parshape [
+ path = p,
+ offsetpath = q,
+ dx = d,
+ dy = d,
+ trace = true,
+ ] ;
+ draw q withpen pencircle scaled 1pt ;
+ endgroup ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Since we also want these graphics as backgrounds, we define them as overlays. If
+you don't want to show the graphic, you may omit this step.
+
+\startbuffer
+\defineoverlay[shapetest-1][\useMPgraphic{shapetest-1}]
+\defineoverlay[shapetest-2][\useMPgraphic{shapetest-2}]
+\defineoverlay[shapetest-3][\useMPgraphic{shapetest-3}]
+\defineoverlay[shapetest-4][\useMPgraphic{shapetest-4}]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+As text, we use a quote from Douglas R.~Hofstadter's book \quotation {Metamagical
+Themas, Questing for the Essence of Mind and Pattern}. Watch how we pass a list
+of shapes.
+
+\startbuffer[text]
+\startshapetext[shapetest-1,shapetest-2,shapetest-3,shapetest-4]
+ \forgetall % as it says
+ \setupalign[verytolerant,stretch,normal]%
+ \samplefile{douglas}% Douglas R. Hofstadter
+\stopshapetext
+\stopbuffer
+
+\typebuffer[text]
+
+Finally we combine text and shapes. Since we also want a background, we use \type
+{\framed}. The normal result is shown in \in {figure} [fig:shapes].
+
+\startbuffer[shapes]
+\startbuffer
+\startcombination[2*2]
+ {\framed[offset=overlay,frame=off,background=shapetest-1]{\getshapetext}} {shapetest-1}
+ {\framed[offset=overlay,frame=off,background=shapetest-2]{\getshapetext}} {shapetest-2}
+ {\framed[offset=overlay,frame=off,background=shapetest-3]{\getshapetext}} {shapetest-3}
+ {\framed[offset=overlay,frame=off,background=shapetest-4]{\getshapetext}} {shapetest-4}
+\stopcombination
+\stopbuffer
+\stopbuffer
+
+\typebuffer[shapes]
+
+\getbuffer[shapes]
+
+By using a buffer we keep \type {\placefigure} readable. You might have noticed
+that for two shapes we turned on tracing.
+
+\startbuffer[a]
+\placefigure
+ [here][fig:shapes]
+ {A continuous text, typeset in a non||standard shape,
+ spread over four areas, and right aligned.}
+ {\getbuffer}
+\stopbuffer
+
+\startbuffer[b]
+\placefigure
+ [here][fig:shapes]
+ {A continuous text, typeset in a non||standard shape,
+ spread over four areas.}
+ {\scale[factor=max,height=.9\textheight]{\getbuffer}}
+\stopbuffer
+
+\typebuffer[a]
+
+\doifmodeelse{screen}{\getbuffer[text,b]}{\getbuffer[text,a]}
+
+\blank
+
+We can combine all those tricks, although the input is somewhat fuzzy. First we
+define a quote typeset in a circular paragraph shape where we use the defaults.
+
+\startbuffer[shape]
+\startuseMPgraphic{center}
+ lmt_parshape [
+ path = fullcircle scaled 8cm,
+ ]
+\stopuseMPgraphic
+
+\startshapetext[center]
+ \samplefile{douglas}%
+\stopshapetext
+
+\defineoverlay[center][\useMPgraphic{center}]
+\stopbuffer
+
+\typebuffer[shape]
+
+We will surround this text with a circular line, that we define as follows. By
+using a buffer we keep things organized.
+
+\startbuffer
+\startuseMPgraphic{circle}
+ save p ; path p ;
+ p := reverse fullcircle rotatedaround(origin,90)
+ xscaled OverlayWidth yscaled OverlayHeight ;
+
+ draw lmt_followtext [
+ path = p,
+ text = "This is just a dummy text, kerned by \TeX\ and typeset
+ in a circle using \MetaPost.\quad",
+ spread = true,
+ trace = true,
+ ] ;
+
+% draw p ;
+\stopuseMPgraphic
+
+\defineoverlay[edge][\useMPgraphic{circle}]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The text and graphics come together in a framed text:
+
+\startbuffer
+\startplacefigure[title={One more time Hofstadter's quotation (normal).}]
+ \getbuffer[shape,quote]%
+ \framed
+ [offset=24pt,
+ background=edge,
+ frame=off,
+ backgroundoffset=-18pt]
+ {\getshapetext}
+\stopplacefigure
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text.tex
index f70f53ac306..8229e35db46 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text.tex
@@ -1,4 +1,4 @@
-% language=uk
+% engine=luatex language=uk
%
% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
@@ -48,7 +48,7 @@ the right auxiliary programs are executed.
In \CONTEXT\ \MKIV\ you won't notice this at all because everything is tightly
integrated with \LUATEX's \MPLIB. This has an enormous speed gain: when this
manual had about 425 pages, on my laptop with mobile 3840QM processor, one run of
-this document takes 18 seconds (14.5 with \LUAJITTEX) and that includes loadint a
+this document takes 18 seconds (14.5 with \LUAJITTEX) and that includes loading a
bunch of (outline) fonts and processing some 2200 \METAPOST\ images. While
writing the first version of this manual runtime was upto 50 times slower for
half the number of pages so compared to \MKII\ we have gained a lot.
@@ -680,7 +680,7 @@ in \MKIV\ we use a different approach. There we use a mix of \TEX, \METAPOST, an
\LUA\ to define that macro. The principles remain the same but the code is more
robust.
-\input meta-imp-txt.mkiv % we need to force a reload \useMPlibrary[txt]
+\useMPlibrary[txt]
So, how does this compare to earlier results? The original, full text as typeset
by \TEX, looks like:
@@ -974,11 +974,8 @@ define an offset too.
\startbuffer
\startuseMPgraphic{text vars}
- baselineskip := 8pt ;
- strutheight := (7.2/10) * baselineskip ;
- strutdepth := (2.8/10) * baselineskip ;
- offset := baselineskip/2 ;
- topskip := strutheight ;
+ MyOffset := LineHeight/2 ;
+ MyTopSkip := StrutHeight ;
\stopuseMPgraphic
\stopbuffer
@@ -999,8 +996,8 @@ dimensions.
hsize := xpart lrcorner p - xpart llcorner p ;
vsize := ypart urcorner p - ypart lrcorner p ;
- q := p xscaled ((hsize-2offset)/hsize)
- yscaled ((vsize-2offset)/vsize) ;
+ q := p xscaled ((hsize-2MyOffset)/hsize)
+ yscaled ((vsize-2MyOffset)/vsize) ;
hsize := xpart lrcorner q - xpart llcorner q ;
vsize := ypart urcorner q - ypart lrcorner q ;
@@ -1061,7 +1058,7 @@ Then we use \type {\useMPgraphic{text}} to call up the picture.
The offset is not optimal. Note the funny gap at the top. We could try to fix
this, but there is a better way to optimize both paths.
-We lower the top edge of \type {q}'s bounding box by \type {topskip}, then cut
+We lower the top edge of \type {q}'s bounding box by \type {MyTopSkip}, then cut
any part of the left and right pieces of \type {q} that lie above it. Similarly,
we raise the bottom edge and cut off the pieces that fall below this line.
@@ -1069,8 +1066,8 @@ we raise the bottom edge and cut off the pieces that fall below this line.
\startuseMPgraphic{text cutoff}
path tt, bb ;
- tt := (ulcorner q -- urcorner q) shifted (0,-topskip) ;
- bb := (llcorner q -- lrcorner q) shifted (0,strutdepth) ;
+ tt := (ulcorner q -- urcorner q) shifted (0,-MyTopSkip) ;
+ bb := (llcorner q -- lrcorner q) shifted (0,StrutDepth) ;
l := l cutbefore (l intersectionpoint tt) ;
l := l cutafter (l intersectionpoint bb) ;
@@ -1120,18 +1117,18 @@ line has a height and depth, we have to determine which part touches first.
\startuseMPgraphic{text calc}
vardef found_point (expr lin, pat, sig) =
pair a, b ;
- a := pat intersection_point (lin shifted (0,strutheight)) ;
+ a := pat intersection_point (lin shifted (0,StrutHeight)) ;
if intersection_found :
- a := a shifted (0,-strutheight) ;
+ a := a shifted (0,-StrutHeight) ;
else :
a := pat intersection_point lin ;
fi ;
- b := pat intersection_point (lin shifted (0,-strutdepth)) ;
+ b := pat intersection_point (lin shifted (0,-StrutDepth)) ;
if intersection_found :
if sig :
- if xpart b > xpart a : a := b shifted (0,strutdepth) fi ;
+ if xpart b > xpart a : a := b shifted (0,StrutDepth) fi ;
else :
- if xpart b < xpart a : a := b shifted (0,strutdepth) fi ;
+ if xpart b < xpart a : a := b shifted (0,StrutDepth) fi ;
fi ;
fi ;
a
@@ -1153,7 +1150,7 @@ subpath).
\startuseMPgraphic{text step}
path line; pair lll, rrr ;
- for i=topskip step baselineskip until vsize :
+ for i=MyTopSkip step LineHeight until vsize :
line := (ulcorner q -- urcorner q) shifted (0,-i) ;
@@ -1165,17 +1162,17 @@ subpath).
\typebuffer \getbuffer
Here we divide the available space in lines. The first line starts at \type
-{strutheight} from the top.
+{StrutHeight} from the top.
We can now finish our graphic by visualizing the lines. Both the height and depth
of the lines are shown.
\startbuffer
\startuseMPgraphic{text line}
- fill (lll--rrr--rrr shifted (0,strutheight)--lll
- shifted (0,strutheight)--cycle) withcolor .5white ;
- fill (lll--rrr--rrr shifted (0,-strutdepth)--lll
- shifted (0,-strutdepth)--cycle) withcolor .7white ;
+ fill (lll--rrr--rrr shifted (0,StrutHeight)--lll
+ shifted (0,StrutHeight)--cycle) withcolor .5white ;
+ fill (lll--rrr--rrr shifted (0,-StrutDepth)--lll
+ shifted (0,-StrutDepth)--cycle) withcolor .7white ;
draw lll withpen pencircle scaled 2pt ;
draw rrr withpen pencircle scaled 2pt ;
draw (lll--rrr) withpen pencircle scaled .5pt ;
@@ -1214,13 +1211,13 @@ we get better results when we (on purpose) take a smaller height.
\startuseMPgraphic{text step}
path line; pair lll, rrr ; numeric vvsize ;
- if (strutheight+strutdepth<baselineskip) :
+ if (StrutHeight+StrutDepth<LineHeight) :
vvsize := vsize ;
else :
- vvsize := (vsize div baselineskip) * baselineskip ;
+ vvsize := (vsize div LineHeight) * LineHeight ;
fi ;
- for i=topskip step baselineskip until vvsize :
+ for i=MyTopSkip step LineHeight until vvsize :
line := (ulcorner q -- urcorner q) shifted (0,-i) ;
@@ -1240,11 +1237,8 @@ better) results.
\startbuffer
\startuseMPgraphic{text vars}
-baselineskip := 8pt ;
-strutheight := 4pt ;
-strutdepth := 2pt ;
-offset := 4pt ;
-topskip := 3pt ;
+MyOffset := .5LineHeight ;
+MyTopSkip := StrutHeight ;
\stopuseMPgraphic
\stopbuffer
@@ -1261,8 +1255,8 @@ this is to let \METAPOST\ write a \type {\parshape} specification.
\startbuffer
\startuseMPgraphic{text macro}
- def provide_parshape (expr p, offset, baselineskip,
- strutheight, strutdepth, topskip) =
+ def provide_parshape (expr p, MyOffset, LineHeight,
+ StrutHeight, StrutDepth, MyTopSkip) =
\includeMPgraphic{text move}
\includeMPgraphic{text split}
@@ -1285,13 +1279,13 @@ the loop we write those values to a file using another loop.
\startuseMPgraphic{text loop}
path line; pair lll, rrr ; numeric vvsize, n ; n := 0 ;
- if (strutheight+strutdepth<baselineskip) :
+ if (StrutHeight+StrutDepth<LineHeight) :
vvsize := vsize ;
else :
- vvsize := (vsize div baselineskip) * baselineskip ;
+ vvsize := (vsize div LineHeight) * LineHeight ;
fi ;
- for i=topskip step baselineskip until vvsize :
+ for i=MyTopSkip step LineHeight until vvsize :
line := (ulcorner q -- urcorner q) shifted (0,-i) ;
@@ -1327,12 +1321,12 @@ We can call this macro using the part we used in the previous examples.
path p ; p := ((0,1)..(-1,0)..(1,0)--cycle) scaled 65pt ;
provide_parshape
- (p, % shape path
- .5*\baselinedistance, % offset
- \baselinedistance, % distance between lines
- \strutheight, % height of a line
- \strutdepth, % depth of a line
- \strutheight) ; % height of first line
+ (p, % shape path
+ .5*LineHeight, % offset
+ LineHeight, % distance between lines
+ StrutHeight, % height of a line
+ StrutDepth, % depth of a line
+ StrutHeight) ; % height of first line
\stopuseMPgraphic
\stopbuffer
@@ -1348,9 +1342,6 @@ macro gets the value of the graphic at hand.
\typefile{mfun-mp-data.txt}
-% \blank{\em todo: mp data file}\blank
-% \writestatus{!!!!}{todo: mp data file}
-
So, reading in this file at the start of a paragraph will setup \TEX\ to follow
this shape.
@@ -1389,23 +1380,22 @@ able to handle multiple shapes at once, like the next example demonstrates.
\index{graphics+libraries}
-The macro discussed in the previous section is included in one of the \METAPOST\
-libraries, so we first have to say:
+In \MKIV\ and \LMTX\ the \METAFUN\ driven text around a curve is a core
+functionality. In \LMTX\ the specific paragraph shape are available in the core
+too. Otherwise you need to load a module:
\startbuffer
\useMPlibrary[txt]
\stopbuffer
-\typebuffer
-
-\getbuffer
+\typebuffer \getbuffer
We define four shapes. They are not really beautiful, but they demonstrate what
happens in border cases. For instance, too small first lines are ignored. First
we define a circle. Watch how the dimensions are set in the graphic. The
arguments passed to \type {build_parshape} are: path, an offset, an additional
horizontal and vertical displacement, the baseline distance, the height and depth
-of the line, and the height of the first line (topskip in \TEX\ terminology). The
+of the line, and the height of the first line (MyTopSkip in \TEX\ terminology). The
height and depth of a line are often called strut height and depth, with a strut
being an invisible character with maximum dimensions.
@@ -1413,8 +1403,8 @@ being an invisible character with maximum dimensions.
\startuseMPgraphic{test 1}
path p ; p := fullcircle scaled 6cm ;
- build_parshape(p,6pt,0,0,\baselinedistance,
- \strutheight,\strutdepth,\strutheight) ;
+ build_parshape(p,6pt,0,0,LineHeight,
+ StrutHeight,StrutDepth,StrutHeight) ;
draw p withpen pencircle scaled 1pt ;
\stopuseMPgraphic
@@ -1429,8 +1419,8 @@ suits the small lines at the top and bottom.
\startuseMPgraphic{test 2}
path p ; p := fullsquare rotated 45 scaled 5cm ;
- build_parshape(p,6pt,0,0,\baselinedistance,
- \strutheight,\strutdepth,\strutheight) ;
+ build_parshape(p,6pt,0,0,LineHeight,
+ StrutHeight,StrutDepth,StrutHeight) ;
draw p withpen pencircle scaled 1pt ;
\stopuseMPgraphic
@@ -1447,8 +1437,8 @@ always trivial.
path p ; p := (.5w,h) -- (0,h) -- (0,0) -- (w,0) &
(w,0) .. (.75w,.5h) .. (w,h) & (w,h) -- cycle ;
- build_parshape(p,6pt,0,0,\baselinedistance,
- \strutheight,\strutdepth,\strutheight) ;
+ build_parshape(p,6pt,0,0,LineHeight,
+ StrutHeight,StrutDepth,StrutHeight) ;
draw p withpen pencircle scaled 1pt ;
\stopuseMPgraphic
@@ -1472,8 +1462,8 @@ needed, since we need these later on.
w := h := 6cm ; o := 6pt ; path p ; p := shape ;
w := h := 6cm ; o := 0pt ; path q ; q := shape ;
- build_parshape(p,q,6pt,6pt,\baselinedistance,
- \strutheight,\strutdepth,\strutheight) ;
+ build_parshape(p,q,6pt,6pt,LineHeight,
+ StrutHeight,StrutDepth,StrutHeight) ;
draw q withpen pencircle scaled 1pt ;
\stopuseMPgraphic
@@ -1514,14 +1504,11 @@ set to the current shape dimensions. The normal result is shown in \in {figure}
\startbuffer[shapes]
\startbuffer
-\setupframed
- [offset=overlay,align=normal,frame=off,
- width=\parwidth,height=\parheight]
\startcombination[2*2]
- {\framed[background=test 1]{\getshapetext}} {test 1}
- {\framed[background=test 2]{\getshapetext}} {test 2}
- {\framed[background=test 3]{\getshapetext}} {test 3}
- {\framed[background=test 4]{\getshapetext}} {test 4}
+ {\framed[offset=overlay,frame=off,background=test 1]{\getshapetext}} {test 1}
+ {\framed[offset=overlay,frame=off,background=test 2]{\getshapetext}} {test 2}
+ {\framed[offset=overlay,frame=off,background=test 3]{\getshapetext}} {test 3}
+ {\framed[offset=overlay,frame=off,background=test 4]{\getshapetext}} {test 4}
\stopcombination
\stopbuffer
\stopbuffer
@@ -1591,8 +1578,8 @@ define a quote typeset in a circular paragraph shape.
\startbuffer[shape]
\startuseMPgraphic{center}
- build_parshape(fullcircle scaled 8cm,0,0,0,\baselinedistance,
- \strutheight,\strutdepth,\strutheight) ;
+ build_parshape(fullcircle scaled 8cm,0,0,0,LineHeight,
+ StrutHeight,StrutDepth,StrutHeight) ;
\stopuseMPgraphic
\startshapetext[center]
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-welcome.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-welcome.tex
index 425d1579611..725d03756c4 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-welcome.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-welcome.tex
@@ -3497,6 +3497,70 @@ line properties.
\stopsection
+\startsection[title={\UTF8}]
+
+The \METAPOST\ library used in \LUATEX\ and \LUAMETATEX\ supports \UTF8\ input.
+Actually there is not much magic needed to do this because all the engine in
+interested in is bytes and some just have a special meaning (like parenthesis,
+symbols that have a meaning in formulas etc).
+
+\startbuffer
+save p ; pen p ; p := currentpen ;
+pickup pencircle scaled .05;
+
+picture â—‹ ; â—‹ := image (draw fullcircle) ;
+picture â—Ž ; â—Ž := image (draw fullcircle ; draw fullcircle scaled .5) ;
+
+draw â—Ž ysized 2cm withcolor darkblue ;
+draw â—‹ xsized 2cm shifted (3cm,0) withcolor darkgreen ;
+draw â—‹ xysized (3cm,2cm) shifted (7cm,0) withcolor darkred ;
+\stopbuffer
+
+\typebuffer
+
+Here we use a \UTF8\ encoded character as macro name and the next image
+demonstrate that it does work indeed:
+
+\startlinecorrection[blank] \processMPbuffer \stoplinecorrection
+
+You can do crazy things like use emoji for special operators
+
+\startbuffer
+def ✠= withpen pencircle enddef ;
+def âœ–ï¸ = scaled enddef ;
+fill fullsquare âœ–ï¸ 1cm âœ âœ–ï¸ 1mm withcolor darkgray ;
+draw fullsquare âœ–ï¸ 1cm âœ âœ–ï¸ 1mm withcolor darkblue ;
+\stopbuffer
+
+\typebuffer
+
+But do we really want to go there?
+
+\startlinecorrection[blank] \processMPbuffer \stoplinecorrection
+
+Normally using \UTF8\ makes more sense in text or regular macro names, so if you
+want to use accented characters it is possible:
+
+\startbuffer
+def rændömîzèd = randomized 1/10 enddef ;
+
+draw textext ("\strut rændömîzèd") ;
+draw boundingbox currentpicture rændömîzèd
+ enlarged 2mm
+ withpen pencircle scaled 1mm
+ withcolor darkgreen ;
+\stopbuffer
+
+\typebuffer
+
+\page[preference]
+
+it really does work:
+
+\startlinecorrection[blank] \processMPbuffer \stoplinecorrection
+
+\stopsection
+
\stopchapter
\stopcomponent
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun.tex b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun.tex
index dc90bb61157..6739b1ed537 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun.tex
@@ -28,19 +28,21 @@
%
% comment : This is one of the manuals that can be ordered at http://www.h2o-books.com and
% it's actually meant to be read on paper.
+%
+% comment : Before I started updating the manual to lmtx (luametafun) I made sure that it
+% processed okay in the february 2021 version of lmtx. The runtime for 448 pages
+% (which is 20 more than the previous test) is some 16.5 seconds (just below 16
+% with compact fonts). So we can safely conclude that we're not worse off with
+% respect to performance. (I use the same machine.)
-\enabledirectives[hyphenator.optimize]
-\enabledirectives[hyphenator.flatten]
-% \setuphyphenation[method=traditional]
+% \enableexperiments[fonts.compact]
-% \enabletrackers[*defin*]
+% \enablemode[optional]
% \enablemode[screen]
\enablemode[print]
% \enablemode[book]
-% \usemodule[luacalls]
-
% todo: check startintro .. stopintro each chapter
% \showframe
@@ -75,7 +77,11 @@
\component metafun-gadgets
\component metafun-effects
\component metafun-functions
+\ifcase\contextlmtxmode
\component metafun-text
+\else
+ \component metafun-text-lmtx
+\fi
\component metafun-debugging
\component metafun-styles
\component metafun-examples
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-environment.tex b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-environment.tex
index 3472f3b047e..bcbfa085123 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-environment.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-environment.tex
@@ -8,6 +8,8 @@
\usemodule[timing]
+\usemodule[obsolete-tokens]
+
\useMPlibrary[dum]
\dontcomplain
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-memory.tex b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-memory.tex
index 4c16e613e59..f8259c7db31 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-memory.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-memory.tex
@@ -131,10 +131,10 @@ If you want to run such tests yourself, you need to load a module at startup:
The graphics can be generated with:
\starttyping
-\def\ShowUsage {optional filename}
-\def\ShowNamedUsage {optional filename}{red graphic}{blue graphic}
-\def\ShowMemoryUsage{optional filename}
-\def\ShowNodeUsage {optional filename}
+\ShowUsage {optional filename}
+\ShowNamedUsage {optional filename}{red graphic}{blue graphic}
+\ShowMemoryUsage{optional filename}
+\ShowNodeUsage {optional filename}
\stoptyping
(This interface may change.)
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-punk.tex b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-punk.tex
index 3502736deec..1220815465d 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-punk.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-punk.tex
@@ -1,5 +1,8 @@
% language=uk
+% This only works in MKIV because in LMTX we don't load the font-vir module
+% any longer. No one used it anyway.
+
\environment mk-environment
\startcomponent mk-punk
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-tokenspeak.tex b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-tokenspeak.tex
index 590dbba433a..8382f5cfcc9 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-tokenspeak.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-tokenspeak.tex
@@ -212,7 +212,7 @@ The result looks like: \ctxlua {
tokens.letters("12345"),
tokens.egroup,
}
- tex.printlist (t)
+ tex.printlist(t)
tokens.collectors.show(t)
}
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-style.tex b/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-style.tex
index 5ed934f2fb2..a85960bdddd 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-style.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-style.tex
@@ -43,12 +43,15 @@
\hss
% title
#2
- \doifmode {*sectionnumber} {
- % distance
- \hskip10mm
- % number
- \struttedbox{\offset[x=-1mm,y=2.5mm]{\scale[height=2cm]{#1}}}
- }
+ % \ifnum\getsomestructurenumber{\currentstructurelevel}{last}>\plusone
+ \ifnum\somenamedheadnumber{chapter}{last}>\plusone
+ \doifmode {*sectionnumber} {
+ % distance
+ \hskip10mm
+ % number
+ \struttedbox{\offset[x=-1mm,y=2.5mm]{\scale[height=2cm]{#1}}}
+ }
+ \fi
}
\stoptexdefinition
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/primitives/primitives.tex b/Master/texmf-dist/doc/context/sources/general/manuals/primitives/primitives.tex
new file mode 100644
index 00000000000..81b42c5b6c2
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/primitives/primitives.tex
@@ -0,0 +1,2378 @@
+% language=us
+
+% The usual time stamp. This written while listening intermized to Fish (just ran
+% into), Lazulli (some yt videos too, looking forward to a next live act) and
+% because this all is boring checking out Sarah Coopers channel for new DT syncs
+% every few hours.
+
+% When you feel unhappy about the lack of detail in this manual, just keep in mind
+% that you cannot really demand anything from volunteers: just hope for more (or
+% pay for it). Friendly comments and corrections are of course always welcome. As
+% we like what we're doing here, it all might eventually evolve to perfection, stay
+% tuned.
+%
+% Hans Hagen | j.hagen @ xs4all . nl | ntg-context @ ntg . nl
+
+\usemodule[article-basic]
+\usemodule[abbreviations-logos]
+\usemodule[scite]
+
+\definecolor[maincolor][darkblue]
+\definecolor[primcolor][darkblue]
+\definecolor[nonecolor][darkgray]
+
+\setuptyping
+ [option=tex]
+
+\setuptype
+ [option=tex]
+
+\setuphead
+ [subject]
+ [color=maincolor]
+
+\definehead
+ [newprimitive]
+ [section]
+ [color=maincolor]
+
+\definehead
+ [oldprimitive]
+ [section]
+ [color=nonecolor]
+
+\setuplist
+ [newprimitive]
+ [textcolor=maincolor]
+
+\setuplist
+ [oldprimitive]
+ [textcolor=nonecolor]
+
+\starttext
+
+\startMPpage
+ fill Page
+ withcolor "darkgray" ;
+ draw textext("\sstf {\white new} primitives")
+ xysized (.9bbwidth(Page),bbheight(Page)-2cm)
+ shifted center Page
+ withcolor "maincolor" ;
+ draw textext.ulft("\sstf in luametatex")
+ xysized (.9bbwidth(Page)/3,(bbheight(Page)-2cm)/6)
+ shifted center lrcorner Page
+ shifted (-.1bbwidth(Page),.05bbwidth(Page))
+ withcolor "white" ;
+ setbounds currentpicture to Page ;
+\stopMPpage
+
+\startsubject[title={Introduction}]
+
+Here I will discuss some of the new primitives in \LUATEX\ and \LUAMETATEX, the
+later being a successor that permits the \CONTEXT\ folks to experiment with new
+features. The order is arbitrary. When you compare \LUATEX\ with \PDFTEX, there
+are actually quite some differences. Some primitives that \PDFTEX\ introduced
+have been dropped in \LUATEX\ because they can be done better in \LUA. Others
+have been promoted to core primitives that no longer have a \type {pdf} prefix.
+Then there are lots of new primitives, some introduce new concepts, some are a
+side effect of for instance new math font technologies, and then there are those
+that are handy extensions to the macro language. The \LUAMETATEX\ engine drops
+quite some primitives, like those related to \PDFTEX\ specific font or backend
+features. It also adds some new primitives, mostly concerning the macro language.
+
+We also discuss the primitives that fit into the macro programming scope that are
+present in traditional \TEX\ and \ETEX\ but there are for sure better of
+descriptions out there already. Primitives that relate to typesetting, like those
+controlling math, fonts, boxes, attributes, directions, catcodes, \LUA\
+(functions) etc are not discussed here.
+
+There are for instance primitives to create aliases to low level registers like
+counters and dimensions, as well as other (semi|-|numeric) quantities like
+characters, but normally these are wrapped into high level macros so that
+definitions can't clash too much. Numbers, dimensions etc can be advanced,
+multiplied and divided and there is a simple expression mechanism to deal with
+them. These are not discussed here.
+
+\startcolumns
+ \placelist
+ [newprimitive,oldprimitive]
+ [alternative=c]
+\stopcolumns
+
+In this document the section titles that discuss the \color [nonecolor] {original
+\TEX\ and \ETEX\ primitives} have a different color those explaining the \color
+[primcolor] {\LUATEX\ and \LUAMETATEX\ primitives}.
+
+\stopsubject
+
+\page
+
+% When writing this manual I also decided to merge some of the condition related
+% code so that it dealt a bit more natural with the newer features. A usual side
+% effects if writing manuals.
+
+% \startoldprimitive[title={\tex {meaning}}]
+% \stopoldprimitive
+%
+% \startoldprimitive[title={\tex {par}}]
+% \stopoldprimitive
+%
+% \startoldprimitive[title={\tex {linepar}}]
+% \stopoldprimitive
+
+\startoldprimitive[title={\tex {afterassignment}}]
+
+The token following \type {\afterassignment}, a traditional \TEX\ primitive, is
+saved and gets injected (and then expanded) after a following assignment took
+place.
+
+\startbuffer
+\afterassignment !\def\MyMacro {}\quad
+\afterassignment !\let\MyMacro ?\quad
+\afterassignment !\scratchcounter 123\quad
+\afterassignment !%
+\afterassignment ?\advance\scratchcounter by 1
+\stopbuffer
+
+\typebuffer
+
+The \type {\afterassignment}s are not accumulated, the last one wins:
+
+{\getbuffer}
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {afterassigned}}]
+
+The \type {\afterassignment} primitive stores a token to be injected (and thereby
+expanded) after an assignment has happened. Unlike \type {\aftergroup}, multiple
+calls are not accumulated, and changing that would be too incompatible. This is
+why we have \type {\afterassigned}, which can be used to inject a bunch of
+tokens. But in order to be consistent this one is also not accumulative.
+
+\startbuffer
+\afterassigned{done}%
+\afterassigned{{\bf done}}%
+\scratchcounter=123
+\stopbuffer
+
+\typebuffer
+
+results in: \inlinebuffer\ being typeset.
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {aftergroup}}]
+
+The traditional \TEX\ \type {\aftergroup} primitive stores the next token and
+expands that after the group has been closed.
+
+\startbuffer
+before{ ! \aftergroup a\aftergroup f\aftergroup t\aftergroup e\aftergroup r}
+\stopbuffer
+
+Multiple \type {\aftergroup}s are combined:
+
+\typebuffer
+
+\getbuffer
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {aftergrouped}}]
+
+The in itself powerful \type {\aftergroup} primitives works quite well, even
+if you need to do more than one thing: you can either use it multiple times, or
+you can define a macro that does multiple things and apply that after the group.
+However, you can avoid that by using this primitive which takes a list of tokens.
+
+\startbuffer
+regular
+\bgroup
+\aftergrouped{regular}%
+\bf bold
+\egroup
+\stopbuffer
+
+\typebuffer
+
+Because it happens after the group, we're no longer typesetting in bold.
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {atendofgroup}}]
+
+The token provided will be injected just before the group ends. Because
+these tokens are collected, you need to be aware of possible interference
+between them. However, normally this is managed by the macro package.
+
+\startbuffer
+\bgroup
+\atendofgroup\unskip
+\atendofgroup )%
+(but it works okay
+\egroup
+\stopbuffer
+
+\typebuffer
+
+Of course these effects can also be achieved by combining (extra) grouping with
+\type {\aftergroup} calls, so this is more a convenience primitives than a real
+necessity: {\inlinebuffer}, as proven here.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {atendofgrouped}}]
+
+This is the multi token variant of \type {\atendofgroup}. Of course the next
+example is somewhat naive when it comes to spacing and so, but it shows the
+purpose.
+
+\startbuffer
+\bgroup
+\atendofgrouped{\bf QED}%
+\atendofgrouped{ (indeed)}%
+This sometimes looks nicer.
+\egroup
+\stopbuffer
+
+\typebuffer
+
+Multiple invocations are accumulated: {\inlinebuffer}.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {toksapp}}]
+
+One way to append something to a token list is the following:
+
+\starttyping
+\scratchtoks\expandafter{\the\scratchtoks more stuff}
+\stoptyping
+
+This works all right, but it involves a copy of what is already in \type
+{\scratchtoks}. This is seldom a real issue unless we have large token lists and
+many appends. This is why \LUATEX\ introduced:
+
+\starttyping
+\toksapp\scratchtoks{more stuff}
+\toksapp\scratchtoksone\scratchtokstwo
+\stoptyping
+
+At some point, when working on \LUAMETATEX, I realized that primitives like this
+one and the next appenders and prependers to be discussed were always on the
+radar of Taco and me. Some were even implemented in what we called \type {eetex}:
+extended \ETEX, and we even found back the prototypes, dating from pre|-|\PDFTEX\
+times.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {etoksapp}}]
+
+A variant of \type {\toksapp} is the following: it expands the to be appended
+content.
+
+\starttyping
+\def\temp{more stuff}
+\etoksapp\scratchtoks{some \temp}
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {tokspre}}]
+
+Where appending something is easy because of the possible \type {\expandafter}
+trickery a prepend would involve more work, either using temporary token
+registers and|/|or using a mixture of the (no)expansion added by \ETEX, but all
+are kind of inefficient and cumbersome.
+
+\starttyping
+\tokspre\scratchtoks{less stuff}
+\tokspre\scratchtoksone\scratchtokstwo
+\stoptyping
+
+This prepends the token list that is provided.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {etokspre}}]
+
+A variant of \type {\tokspre} is the following: it expands the to be prepended
+content.
+
+\starttyping
+\def\temp{less stuff}
+\etokspre\scratchtoks{a bit \temp}
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {gtoksapp}}]
+
+This is the global variant of \type {\toksapp}.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {xtoksapp}}]
+
+This is the global variant of \type {\etoksapp}.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {gtokspre}}]
+
+This is the global variant of \type {\tokspre}.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {xtokspre}}]
+
+This is the global variant of \type {\etokspre}.
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {csname}}]
+
+This original \TEX\ primitive starts the construction of a control sequence
+reference. It does a lookup and when no sequence with than name is found, it will
+create a hash entry and defaults its meaning to \type {\relax}.
+
+\starttyping
+\csname letters and other characters\endcsname
+\stoptyping
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {endcsname}}]
+
+This primitive is used in combination with \type {\csname}, \type {\ifcsname} and
+\type {\begincsname} where its end the scanning for the to be constructed control
+sequence token.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {begincsname}}]
+
+The next code creates a control sequence token from the given serialized tokens:
+
+\starttyping
+\csname mymacro\endcsname
+\stoptyping
+
+When \type {\mymacro} is not defined a control sequence will be created with the
+meaning \type {\relax}. A side effect is that a test for its existence might fail
+because it now exists. The next sequence will {\em not} create an controil
+sequence:
+
+\starttyping
+\begincsname mymacro\endcsname
+\stoptyping
+
+This actually is kind of equivalent to:
+
+\starttyping
+\ifcsname mymacro\endcsname
+ \csname mymacro\endcsname
+\fi
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {lastnamedcs}}]
+
+The example code in the previous section has some redundancy, in the sense that
+there to be looked up control sequence name \type {mymacro} is assembled twice.
+This is no big deal in a traditional eight bit \TEX\ but in a \UNICODE\ engine
+multi|-|byte sequences demand some more processing (although it is unlikely that
+control sequences have many multi|-|byte \UTF8\ characters).
+
+\starttyping
+\ifcsname mymacro\endcsname
+ \csname mymacro\endcsname
+\fi
+\stoptyping
+
+Instead we can say:
+
+\starttyping
+\ifcsname mymacro\endcsname
+ \lastnamedcs
+\fi
+\stoptyping
+
+Although there can be some performance benefits another advantage is that it uses
+less tokens and parsing. It might even look nicer.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {futureexpand}}]
+
+This primitive can be used as an alternative to a \type {\futurelet} approach,
+which is where the name comes from. \footnote {In the engine primitives
+that have similar behavior are grouped in commands that are then dealt with
+together, code wise.}
+
+\startbuffer
+\def\variantone<#1>{(#1)}
+\def\varianttwo#1{[#1]}
+\futureexpand<\variantone\varianttwo<one>
+\futureexpand<\variantone\varianttwo{two}
+\stopbuffer
+
+\typebuffer
+
+So, the next token determines which of the two variants is taken:
+
+{\getbuffer}
+
+Because we look ahead there is some magic involved: spaces are ignored but when
+we have no match they are pushed back into the input. The next variant
+demonstrates this:
+
+\startbuffer
+\def\variantone<#1>{(#1)}
+\def\varianttwo{}
+\def\temp{\futureexpand<\variantone\varianttwo}
+[\temp <one>]
+[\temp {two}]
+[\expandafter\temp\space <one>]
+[\expandafter\temp\space {two}]
+\stopbuffer
+
+\typebuffer
+
+This gives us:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {futureexpandis}}]
+
+We assume that the previous section is read. This variant will not push back
+spaces, which permits a consistent approach i.e.\ the user can assume that macro
+always gobbles the spaces.
+
+\startbuffer
+\def\variantone<#1>{(#1)}
+\def\varianttwo{}
+\def\temp{\futureexpandis<\variantone\varianttwo}
+[\temp <one>]
+[\temp {two}]
+[\expandafter\temp\space <one>]
+[\expandafter\temp\space {two}]
+\stopbuffer
+
+\typebuffer
+
+So, here no spaces are pushed back. This \type {is} in the name of this primitive
+means \quote {ignore spaces}, but having that added to the name would have made
+the primitive even more verbose (after all, we also don't have \type
+{\expandeddef} but \type {\edef} and no \type {\globalexpandeddef} but \type
+{\xdef}.
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {futureexpandisap}}]
+
+This primitive is like the one in the previous section but also ignores par
+tokens, so \type {isap} means \quote {ignore spaces and paragraphs}.
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {expandafter}}]
+
+This original \TEX\ primitive stores the next token, does a one level expansion
+of what follows it, which actually can be an not expandable token, and
+reinjects the stored token in the input. Like:
+
+\starttyping
+\expandafter\let\csname my weird macro name\endcsname{m w m n}
+\stoptyping
+
+Without \type {\expandafter} the \type {\csname} primitive would have been let to
+the left brace (effectively then a begin group). Actually in this particular case
+the control sequence with the weird name is injected and when it didn't yet exist
+it will get the meaning \type {\relax} so we sort of have two assignments in a
+row then.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {expandafterspaces}}]
+
+This is a gobbler: the next token is reinjected after following spaces have been
+read. Here is a simple example:
+
+\startbuffer
+[\expandafterspaces 1 2]
+[\expandafterspaces 3
+4]
+[\expandafterspaces 5
+
+6]
+\stopbuffer
+
+\typebuffer
+
+We get this typeset: \inlinebuffer, because a newline normally is configured to be
+a space (and leading spaces in a line are normally being ingored anyway).
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {expandafterpars}}]
+
+Here is another gobbler: the next token is reinjected after following spaces
+and par tokens have been read. So:
+
+\startbuffer
+[\expandafterpars 1 2]
+[\expandafterpars 3
+4]
+[\expandafterpars 5
+
+6]
+\stopbuffer
+
+\typebuffer
+
+gives us: \inlinebuffer, because empty lines are like \type {\par} and therefore
+ignored.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {expandtoken}}]
+
+This primitive creates a token with a specific combination of catcode and
+character code. Because it assumes some knowledge of \TEX\ we can show it
+using some \type {\expandafter} magic:
+
+\startbuffer
+\expandafter\let\expandafter\temp\expandtoken 11 `X \meaning\temp\crlf
+\expandafter\let\expandafter\temp\expandtoken 12 `X \meaning\temp\crlf
+\stopbuffer
+
+\typebuffer
+
+The meanings are:
+
+{\getbuffer}
+
+Using other catcodes is possible but the results of injecting them into the input
+directly (or here by injecting \type {\temp}) can be unexpected because of what
+\TEX\ expects. You can get messages you normally won't get, for instance about
+unexpected alignment interference, which is a side effect of \TEX\ using some
+catcode|/|character combinations as signals and there is no reason to change
+those internals. That said:
+
+\startbuffer
+\edef\tempA{\expandtoken 9 `X} \meaning\tempA\crlf
+\edef\tempB{\expandtoken 10 `X} \meaning\tempB\crlf
+\edef\tempC{\expandtoken 11 `X} \meaning\tempC\crlf
+\edef\tempD{\expandtoken 12 `X} \meaning\tempD
+\stopbuffer
+
+\typebuffer
+
+are all valid and from the meaning you cannot really deduce what's in there:
+
+{\getbuffer}
+
+But you can be assured that:
+
+\startbuffer
+[AB: \ifx\tempA\tempB Y\else N\fi]
+[AC: \ifx\tempA\tempC Y\else N\fi]
+[AD: \ifx\tempA\tempD Y\else N\fi]
+[BC: \ifx\tempB\tempC Y\else N\fi]
+[BD: \ifx\tempB\tempD Y\else N\fi]
+[CD: \ifx\tempC\tempD Y\else N\fi]
+\stopbuffer
+
+\typebuffer
+
+makes clear that they're different: \inlinebuffer, and in case you wonder, the
+characters with catcode 10 are spaces, while those with code 9 are ignored.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {expandcstoken}}]
+
+The rationale behind this primitive is that when we \type {\let} a single token
+like a character it is hard to compare that with something similar, stored in a
+macro. This primitive pushes back a single token alias created by \type {\let}
+into the input.
+
+\startbuffer
+\let\tempA + \meaning\tempA \crlf
+\let\tempB X \meaning\tempB \crlf
+\let\tempC $ \meaning\tempC \par
+
+\edef\temp {\tempA} \doifelse{\temp}{+}{Y}{N} \meaning\temp \crlf
+\edef\temp {\tempB} \doifelse{\temp}{X}{Y}{N} \meaning\temp \crlf
+\edef\temp {\tempC} \doifelse{\temp}{X}{Y}{N} \meaning\temp \par
+
+\edef\temp{\expandcstoken\tempA} \doifelse{\temp}{+}{Y}{N} \meaning\temp \crlf
+\edef\temp{\expandcstoken\tempB} \doifelse{\temp}{X}{Y}{N} \meaning\temp \crlf
+\edef\temp{\expandcstoken\tempC} \doifelse{\temp}{$}{Y}{N} \meaning\temp \par
+
+\doifelse{\expandcstoken\tempA}{+}{Y}{N}
+\doifelse{\expandcstoken\tempB}{X}{Y}{N}
+\doifelse{\expandcstoken\tempC}{$}{Y}{N} \par
+\stopbuffer
+
+\typebuffer
+
+The meaning of the \type {\let} macros shows that we have a shortcut to a
+character with (in this case) catcode letter, other (here \quote {other
+character} gets abbreviated to \quote {character}), math shift etc.
+
+\start \tttf \getbuffer \stop
+
+Here we use the \CONTEXT\ macro \type {\doifelse} which can be implemented in
+different ways, but the only property relevant to the user is that the expanded
+content of the two arguments is compared.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {expand}}]
+
+Normally a protected macro will not be expanded inside for instance an \type
+{\edef} but there is a way out: \footnote {This primitive is dedicated to Hans vd
+Meer who was playing with the unprotected version of \type {\doifelse} and
+wondered about the reason for it not being expandable in the first place.}
+
+\startbuffer
+\edef\temp {\doifelse{a}{b}{c}{d}} \meaning\temp \crlf
+\edef\temp{\expand\doifelse{a}{b}{c}{d}} \meaning\temp
+\stopbuffer
+
+\typebuffer
+
+In the second case, the \type {\doifelse} command {\em is} expanded, but keep in mind
+that this only makes sense when the body of such a macro is expandable. This is the
+case in \CONTEXT\ \LMTX, but not in \MKIV.
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {ignorespaces}}]
+
+This traditional \TEX\ primitive signals the scanner to ignore the following
+spaces, if any. We mention it because we show a companion in the next section.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {ignorepars}}]
+
+This is a variant of \type {\ignorespaces}: following spaces {\em and} \type
+{\par} equivalent tokens are ignored, so for instance:
+
+\startbuffer
+one + \ignorepars
+
+two = \ignorepars \par
+three
+\stopbuffer
+
+\typebuffer
+
+renders as: \inlinebuffer. Traditionally \TEX\ has been sensitive to \type {\par}
+tokens in some of its building blocks. This has to do with the fact that it could
+indicate a runaway argument which in the times of slower machines and terminals
+was best to catch early. In \LUAMETATEX\ we no longer have long macros and the
+mechanisms that are sensitive can be told to accept \type {\par} tokens (and
+\CONTEXT\ set them such that this is the case).
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ignorearguments}}]
+
+This primitive will quit argument scanning and start expansion of the body of a
+macro. The number of grabbed arguments can be tested as follows:
+
+\startbuffer
+\def\MyMacro[#1][#2][#3]%
+ {\ifarguments zero\or one\or two\or three \else hm\fi}
+
+\MyMacro \ignorearguments \quad
+\MyMacro [1]\ignorearguments \quad
+\MyMacro [1][2]\ignorearguments \quad
+\MyMacro [1][2][3]\ignorearguments \crlf
+\stopbuffer
+
+\typebuffer
+
+{\getbuffer}
+
+{\em Todo: explain optional delimiters.}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {lastarguments}}]
+
+\startbuffer
+\def\MyMacro #1{\the\lastarguments (#1) } \MyMacro{1} \crlf
+\def\MyMacro #1#2{\the\lastarguments (#1) (#2)} \MyMacro{1}{2} \crlf
+\def\MyMacro#1#2#3{\the\lastarguments (#1) (#2) (#3)} \MyMacro{1}{2}{3} \crlf
+
+\def\MyMacro #1{(#1) \the\lastarguments} \MyMacro{1} \crlf
+\def\MyMacro #1#2{(#1) (#2) \the\lastarguments} \MyMacro{1}{2} \crlf
+\def\MyMacro#1#2#3{(#1) (#2) (#3) \the\lastarguments} \MyMacro{1}{2}{3} \crlf
+\stopbuffer
+
+\typebuffer
+
+The value of \type {\lastarguments} can only be trusted in the expansion until
+another macro is seen and expanded. For instance in these examples, as soon as a
+character (like the left parenthesis) is seen, horizontal mode is entered and
+\type {\everypar} is expanded which in turn can involve macros. You can see that
+in the second block (that is: unless we changed \type {\everypar} in the
+meantime).
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {scantokens}}]
+
+Just forget about this \ETEX\ primnitive, just take the one in the next section.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {scantextokens}}]
+
+This primitive scans the input as if it comes from a file. In the next examples
+the \type {\detokenize} primitive turns tokenized code into verbatim code that is
+similar to what is read from a file.
+
+\startbuffer
+\edef\whatever{\detokenize{This is {\bf bold} and this is not.}}
+\detokenize {This is {\bf bold} and this is not.}\crlf
+\scantextokens{This is {\bf bold} and this is not.}\crlf
+\scantextokens{\whatever}\crlf
+\scantextokens\expandafter{\whatever}
+\stopbuffer
+
+\typebuffer
+
+This primitive does not have the end|-|of|-|file side effects of its precursor
+\type {\scantokens}.
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {number}}]
+
+This \TEX\ primitive serializes the next token into a number, assuming that it
+is indeed a number, like
+
+\starttyping
+\number`A
+\number65
+\number\scratchcounter
+\stoptyping
+
+For counters and such the \type {\the} primitive does the same, but when you're
+not sure if what follows is a verbose number or (for instance) a counter the
+\type {\number} primitive is a safer bet, because \type {\the 65} will not work.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {string}}]
+
+We mention this original primitive because of the one in the next section. It
+expands the next token or control sequence as if it was just entered, so normally
+a control sequence becomes a backslash followed by characters and a space.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {csstring}}]
+
+This primitive returns the name of the control sequence given without the leading
+escape character (normally a backslash). Of course you could strip that character
+with a simple helper but this is more natural.
+
+\startbuffer
+\csstring\mymacro
+\stopbuffer
+
+\typebuffer
+
+We get the name, not the meaning: {\tt \inlinebuffer}.
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {unexpanded}}]
+
+This is an \ETEX\ enhancement. The content will not be expanded in a context
+where expansion is happening, like in an \type {\edef}. In \CONTEXT\ you need to
+use \type {\normalunexpanded} because we already had a macro with that name.
+
+\startbuffer
+\def\A{!}
+\def\B{?}
+
+\edef\C{\A\B} \meaning\C \crlf
+\edef\C{\normalunexpanded{\A}\B} \meaning\C \crlf
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {detokenize}}]
+
+This \ETEX\ primitive turns the content of the provides list will become
+characters, kind of verbatim.
+
+\startbuffer
+\expandafter\let\expandafter\temp\detokenize{1} \meaning\temp \crlf
+\expandafter\let\expandafter\temp\detokenize{A} \meaning\temp \crlf
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {tokenized}}]
+
+Just as \type {\expanded} has a counterpart \type {\unexpanded}, it makes sense to give
+\type {\detokenize} a companion:
+
+\startbuffer
+\edef\foo{\detokenize{\inframed{foo}}}
+\edef\oof{\detokenize{\inframed{oof}}}
+
+\meaning\foo \crlf
+\dontleavehmode\foo
+
+\edef\foo{\tokenized{\foo\foo}}
+
+\meaning\foo \crlf
+\dontleavehmode\foo
+
+\dontleavehmode\tokenized{\foo\oof}
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+This primitive is similar to:
+
+\starttyping
+\def\tokenized#1{\scantextokens\expandafter{\normalexpanded{#1}}}
+\stoptyping
+
+and should be more efficient, not that it matters much as we don't use it that
+much (if at all).
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {expanded}}]
+
+This primitive complements the two expansion related primitives mentioned in the
+previous two sections. This time the content will be expanded and then pushed
+back into the input. Protected macros will not be expanded, so you can use this
+primitive to expand the arguments in a call. In \CONTEXT\ you need to use \type
+{\normalexpanded} because we already had a macro with that name. We give some
+examples:
+
+\startbuffer
+\def\A{!}
+ \def\B#1{\string#1} \B{\A} \crlf
+ \def\B#1{\string#1} \normalexpanded{\noexpand\B{\A}} \crlf
+\protected\def\B#1{\string#1} \B{\A} \crlf
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {immediateassignment}}]
+
+Assignments are not expandable which means that you cannot define fully
+expandable macros that have assignments. But, there is a way out of this:
+
+\startbuffer
+\scratchcounter = 10
+\edef\whatever{%
+ (\the\scratchcounter)
+ \immediateassignment\scratchcounter\numexpr\scratchcounter+10\relax
+ \immediateassignment\advance\scratchcounter -5
+ (\the\scratchcounter)
+}
+\meaning\whatever
+\stopbuffer
+
+\typebuffer
+
+Don't expect miracles: you can't mix|-|in content or unexpandable tokens as they
+will either show up or quit the scanning.
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {immediateassigned}}]
+
+This is the multi|-|token variant of the primitive mentioned in the previous
+section.
+
+\startbuffer
+\scratchcounter = 10
+\edef\whatever{%
+ (\the\scratchcounter)
+ \immediateassigned{
+ \scratchcounter\numexpr\scratchcounter+10\relax
+ \advance\scratchcounter -5
+ }%
+ (\the\scratchcounter)
+}
+\meaning\whatever
+\stopbuffer
+
+\typebuffer
+
+The results are the same as in the previous section:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {if}}]
+
+This traditional \TEX\ conditional checks if two character codes are the same. In
+order to understand unexpanded results it is good to know that internally \TEX\
+groups primitives in a way that serves the implementation. Each primitive has a
+command code and a character code, but only for real characters the name
+character code makes sense. This condition only really tests for character codes
+when we have a character, in all other cases, the result is true.
+
+\startbuffer
+\def\A{A}\def\B{B} \chardef\C=`C \chardef\D=`D \def\AA{AA}
+
+[\if AA YES \else NOP \fi] [\if AB YES \else NOP \fi]
+[\if \A\B YES \else NOP \fi] [\if \A\A YES \else NOP \fi]
+[\if \C\D YES \else NOP \fi] [\if \C\C YES \else NOP \fi]
+[\if \count\dimen YES \else NOP \fi] [\if \AA\A YES \else NOP \fi]
+
+\stopbuffer
+
+\typebuffer
+
+The last example demonstrates that the tokens get expanded, which is why
+we get the extra \type {A}:
+
+{\getbuffer}
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifcat}}]
+
+Another traditional \TEX\ primitive: what happens with what gets read in depends
+on the catcode of a character, think of characters marked to start math mode, or
+alphabetic characters (letters) versus other characters (like punctuation).
+
+\startbuffer
+\def\A{A}\def\B{,} \chardef\C=`C \chardef\D=`, \def\AA{AA}
+
+[\ifcat $! YES \else NOP \fi] [\ifcat () YES \else NOP \fi]
+[\ifcat AA YES \else NOP \fi] [\ifcat AB YES \else NOP \fi]
+[\ifcat \A\B YES \else NOP \fi] [\ifcat \A\A YES \else NOP \fi]
+[\ifcat \C\D YES \else NOP \fi] [\ifcat \C\C YES \else NOP \fi]
+[\ifcat \count\dimen YES \else NOP \fi] [\ifcat \AA\A YES \else NOP \fi]
+\stopbuffer
+
+\typebuffer
+
+Close reading is needed here:
+
+{\getbuffer}
+
+This traditional \TEX\ condition as a well as the one in the previous section are
+hardly used in \CONTEXT, if only because they expand what follows and we seldom
+need to compare characters.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifnum}}]
+
+This is a frequently used conditional: it compares two numbers where a number is
+anything that can be seen as such.
+
+\startbuffer
+\scratchcounter=65 \chardef\A=65
+
+\ifnum65=`A YES \else NOP\fi
+\ifnum\scratchcounter=65 YES \else NOP\fi
+\ifnum\scratchcounter=\A YES \else NOP\fi
+\stopbuffer
+
+\typebuffer
+
+Unless a number is an unexpandable token it ends with a space or \type {\relax},
+so when you end up in the true branch, you'd better check if \TEX\ could
+determine where the number ends.
+
+{\getbuffer}
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifdim}}]
+
+Dimensions can be compared with this traditional \TEX\ primitive.
+
+\startbuffer
+\scratchdimen=1pt \scratchcounter=65536
+
+\ifdim\scratchdimen=\scratchcounter sp YES \else NOP\fi
+\ifdim\scratchdimen=1 pt YES \else NOP\fi
+\stopbuffer
+
+\typebuffer
+
+The units are mandate:
+
+{\getbuffer}
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifodd}}]
+
+One reason for this condition to be around is that in a double sided layout we
+need test for being on an odd or even page. It scans for a number the same was
+as other primitives,
+
+\startbuffer
+\ifodd65 YES \else NO\fi &
+\ifodd`B YES \else NO\fi .
+\stopbuffer
+
+\typebuffer
+
+So: {\inlinebuffer}
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifvmode}}]
+
+This traditional conditional checks we are in (internal) vertical mode.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifhmode}}]
+
+This traditional conditional checks we are in (restricted) horizontal mode.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifmmode}}]
+
+This traditional conditional checks we are in (inline or display) math mode mode.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifinner}}]
+
+This traditional one can be confusing. It is true when we are in restricted
+horizontal mode (a box), internal vertical mode (a box), or inline math mode.
+
+\startbuffer
+test \ifhmode \ifinner INNER\fi HMODE\fi\crlf
+\hbox{test \ifhmode \ifinner INNER \fi HMODE\fi} \crlf
+
+\ifvmode \ifinner INNER\fi VMODE \fi\crlf
+\vbox{\ifvmode \ifinner INNER \fi VMODE\fi} \crlf
+\vbox{\ifinner INNER \ifvmode VMODE \fi \fi} \crlf
+\stopbuffer
+
+\typebuffer
+
+Watch the last line: because we typeset \type {INNER} we enter horizontal mode:
+
+{\getbuffer}
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifvoid}}]
+
+This traditional conditional checks if a given box register or internal box
+variable has any content.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifhbox}}]
+
+This traditional conditional checks if a given box register or internal box
+variable represents a horizontal box,
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifvbox}}]
+
+This traditional conditional checks if a given box register or internal box
+variable represents a vertical box,
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifx}}]
+
+We use this traditional \TEX\ conditional a lot in \CONTEXT. Contrary to \type {\if}
+the two tokens that are compared are not expanded. This makes it possible to compare
+the meaning of two macros. Depending on the need, these macros can have their content
+expanded or not. A different number of parameters results in false.
+
+Control sequences are identical when they have the same command code and
+character code. Because a \type {\let} macro is just a reference, both let macros
+are the same and equal to \type {\relax}:
+
+\starttyping
+\let\one\relax \let\two\relax
+\stoptyping
+
+The same is true for other definitions that result in the same (primitive) or
+meaning encoded in the character field (think of \type {\chardef}s and so).
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifeof}}]
+
+This traditional conditional checks if current pointer into the the file bound to
+the given index is past the end of file. The read and write channels are not
+really used in \CONTEXT: in \MKII\ we only had one file for all multi|-|pass
+data, and in \MKIV\ all file related stuff is dealt with in \LUATEX.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {iftrue}}]
+
+Here we have a traditional \TEX\ conditional that is always true (therefore the
+same is true for any macro that is \type {\let} to this primitive).
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {iffalse}}]
+
+Here we have a traditional \TEX\ conditional that is always false (therefore the
+same is true for any macro that is \type {\let} to this primitive).
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifcase}}]
+
+This numeric \TEX\ conditional takes a counter (literal, register, shortcut to a
+character, internal quantity) and goes to the branch that matches.
+
+\startbuffer
+\ifcase 3 zero\or one\or two\or three\or four\else five or more\fi
+\stopbuffer
+
+\typebuffer
+
+Indeed: \inlinebuffer\ equals three. In later sections we will see some
+\LUAMETATEX\ primitives that behave like an \type {\ifcase}.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifdefined}}]
+
+In traditional \TEX\ checking for a macro to exist was a bit tricky and therefore
+\ETEX\ introduced a convenient conditional. We can do this:
+
+\starttyping
+\ifx\MyMacro\undefined ... \else ... \fi
+\stoptyping
+
+but that assumes that \type {\undefined} is indeed undefined. Another test often
+seen was this:
+
+\starttyping
+\expandafter\ifx\csname MyMacro\endcsname\relax ... \else ... \fi
+\stoptyping
+
+Instead of comparing with \type {\undefined} we need to check with \type {\relax}
+because the control sequence is defined when not yet present and defaults to
+\type {\relax}. This is not pretty.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {ifcsname}}]
+
+This is an \ETEX\ conditional that complements the one on the previous section:
+
+\starttyping
+\expandafter\ifx\csname MyMacro\endcsname\relax ... \else ... \fi
+ \ifcsname MyMacro\endcsname ... \else ... \fi
+\stoptyping
+
+Here the first one has the side effect of defining the macro and defaulting it to
+\type {\relax}, while the second one doesn't do that. Juts think of checking a
+few million different names: the first one will deplete the hash table and
+probably string space too.
+
+In \LUAMETATEX\ the construction stops when there is no letter or other character
+seen (\TEX\ expands on the go so expandable macros are dealt with). Instead of an
+error message, the match is simply false and all tokens till the \type
+{\endcsname} are gobbled.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {iffontchar}}]
+
+This is an \ETEX\ conditional. It takes a font identifier and a character number.
+In modern fonts simply checking could not be enough because complex font features
+can swap in other ones and their index can be anything. Also, a font mechanism
+can provide fallback fonts and characters, so don't rely on this one too much. It
+just reports true when the font passed to the frontend has a slot filled.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {ifincsname}}]
+
+This conditional is sort of obsolete and can be used to check if we're inside a
+\type {\csname} or \type {\ifcsname} construction. It's not used in \CONTEXT.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifabsnum}}]
+
+This test will negate negative numbers before comparison, as in:
+
+\startbuffer
+\def\TestA#1{\ifnum #1<100 too small\orelse\ifnum #1>200 too large\else okay\fi}
+\def\TestB#1{\ifabsnum#1<100 too small\orelse\ifabsnum#1>200 too large\else okay\fi}
+
+\TestA {10}\quad\TestA {150}\quad\TestA {210}\crlf
+\TestB {10}\quad\TestB {150}\quad\TestB {210}\crlf
+\TestB{-10}\quad\TestB{-150}\quad\TestB{-210}\crlf
+\stopbuffer
+
+\typebuffer
+
+Here we get the same result each time:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifabsdim}}]
+
+This test will negate negative dimensions before comparison, as in:
+
+\startbuffer
+\def\TestA#1{\ifdim #1<2pt too small\orelse\ifdim #1>4pt too large\else okay\fi}
+\def\TestB#1{\ifabsdim#1<2pt too small\orelse\ifabsdim#1>4pt too large\else okay\fi}
+
+\TestA {1pt}\quad\TestA {3pt}\quad\TestA {5pt}\crlf
+\TestB {1pt}\quad\TestB {3pt}\quad\TestB {5pt}\crlf
+\TestB{-1pt}\quad\TestB{-3pt}\quad\TestB{-5pt}\crlf
+\stopbuffer
+
+\typebuffer
+
+So we get this:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifchknum}}]
+
+In \CONTEXT\ there are quite some cases where a variable can have a number or a
+keyword indicating a symbolic name of a number or maybe even some special
+treatment. Checking if a valid number is given is possible to some extend, but a
+native checker makes much sense too. So here is one:
+
+\startbuffer
+\ifchknum oeps\or okay\else error\fi\quad
+\ifchknum 12 \or okay\else error\fi\quad
+\ifchknum 12pt\or okay\else error\fi
+\stopbuffer
+
+\typebuffer
+
+The result is as expected:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifchkdim}}]
+
+A variant on the checker in the previous section is a dimension checker:
+
+\startbuffer
+\ifchkdim oeps\or okay\else error\fi\quad
+\ifchkdim 12 \or okay\else error\fi\quad
+\ifchkdim 12pt\or okay\else error\fi
+\stopbuffer
+
+\typebuffer
+
+We get:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifcmpnum}}]
+
+This conditional compares two numbers and the resulting \type {\ifcase} reflects
+their relation:
+
+\startbuffer
+[1 2 : \ifcmpnum 1 2 less\or equal\or more\fi]\quad
+[1 1 : \ifcmpnum 1 1 less\or equal\or more\fi]\quad
+[2 1 : \ifcmpnum 2 1 less\or equal\or more\fi]
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifcmpdim}}]
+
+This conditional compares two dimensions and the resulting \type {\ifcase}
+reflects their relation:
+
+\startbuffer
+[1pt 2pt : \ifcmpdim 1pt 2pt less\or equal\or more\fi]\quad
+[1pt 1pt : \ifcmpdim 1pt 1pt less\or equal\or more\fi]\quad
+[2pt 1pt : \ifcmpdim 2pt 1pt less\or equal\or more\fi]
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifnumval}}]
+
+This conditional is a variant on \type {\ifchknum}. This time we get
+some more detail about the value:
+
+\startbuffer
+[-12 : \ifnumval -12\or negative\or zero\or positive\else error\fi]\quad
+[0 : \ifnumval 0\or negative\or zero\or positive\else error\fi]\quad
+[12 : \ifnumval 12\or negative\or zero\or positive\else error\fi]\quad
+[oeps : \ifnumval oeps\or negative\or zero\or positive\else error\fi]
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifdimval}}]
+
+This conditional is a variant on \type {\ifchkdim} and provides some more
+detailed information about the value:
+
+\startbuffer
+[-12pt : \ifdimval-12pt\or negative\or zero\or positive\else error\fi]\quad
+[0pt : \ifdimval 0pt\or negative\or zero\or positive\else error\fi]\quad
+[12pt : \ifdimval 12pt\or negative\or zero\or positive\else error\fi]\quad
+[oeps : \ifdimval oeps\or negative\or zero\or positive\else error\fi]
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {iftok}}]
+
+When you want to compare two arguments, the usual way to do this is the
+following:
+
+\starttyping
+\edef\tempA{#1}
+\edef\tempb{#2}
+\ifx\tempA\tempB
+ the same
+\else
+ different
+\fi
+\stoptyping
+
+This works quite well but the fact that we need to define two macros can be
+considered a bit of a nuisance. It also makes macros that use this method to be
+not so called \quote {fully expandable}. The next one avoids both issues:
+
+\starttyping
+\iftok{#1}{#2}
+ the same
+\else
+ different
+\fi
+\stoptyping
+
+Instead of direct list you can also pass registers, so given:
+
+\startbuffer[a]
+\scratchtoks{a}%
+\toks0{a}%
+\stopbuffer
+
+\typebuffer[a]
+
+This:
+
+\startbuffer[b]
+\iftok 0 \scratchtoks Y\else N\fi\space
+\iftok{a}\scratchtoks Y\else N\fi\space
+\iftok\scratchtoks\scratchtoks Y\else N\fi
+\stopbuffer
+
+\typebuffer[b]
+
+{\getbuffer[a]gives: \inlinebuffer[b].}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifcstok}}]
+
+A variant on the primitive mentioned in the previous section is one that
+operates on lists and macros:
+
+\startbuffer[a]
+\def\a{a} \def\b{b} \def\c{a}
+\stopbuffer
+
+\typebuffer[a]
+
+\startbuffer[b]
+\ifcstok\a\b Y\else N\fi\space
+\ifcstok\a\c Y\else N\fi\space
+\ifcstok{\a}\c Y\else N\fi\space
+\ifcstok{a}\c Y\else N\fi
+\stopbuffer
+
+This:
+
+\typebuffer[b]
+
+{\getbuffer[a]will give us: \inlinebuffer[b].}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifcondition}}]
+
+The conditionals in \TEX\ are hard coded as primitives and although it might
+look like \type {\newif} creates one, it actually just defined three macros.
+
+\startbuffer
+\newif\ifMyTest
+\meaning\MyTesttrue \crlf
+\meaning\MyTestfalse \crlf
+\meaning\ifMyTest \crlf \MyTesttrue
+\meaning\ifMyTest \crlf
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+This means that when you say:
+
+\starttyping
+\ifMytest ... \else ... \fi
+\stoptyping
+
+You actually have one of:
+
+\starttyping
+\iftrue ... \else ... \fi
+\iffalse ... \else ... \fi
+\stoptyping
+
+and because these are proper conditions nesting them like:
+
+\starttyping
+\ifnum\scratchcounter > 0 \ifMyTest A\else B\fi \fi
+\stoptyping
+
+will work out well too. This is not true for macros, so for instance:
+
+\starttyping
+\scratchcounter = 1
+\unexpanded\def\ifMyTest{\iftrue}
+\ifnum\scratchcounter > 0 \ifMyTest A\else B\fi \fi
+\stoptyping
+
+will make a run fail with an error (or simply loop forever, depending on your
+code). This is where \type {\ifcondition} enters the picture:
+
+\starttyping
+\def\MyTest{\iftrue} \scratchcounter0
+\ifnum\scratchcounter > 0
+ \ifcondition\MyTest A\else B\fi
+\else
+ x
+\fi
+\stoptyping
+
+This primitive is seen as a proper condition when \TEX\ is in \quotation {fast
+skipping unused branches} mode but when it is expanding a branch, it checks if
+the next expanded token is a proper tests and if so, it deals with that test,
+otherwise it fails. The main condition here is that the \type {\MyTest} macro
+expands to a proper true or false test, so, a definition like:
+
+\starttyping
+\def\MyTest{\ifnum\scratchcounter<10 }
+\stoptyping
+
+is also okay. Now, is that neat or not?
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {iffrozen}}]
+
+This conditional checks if a control sequence is frozen:
+
+\starttyping
+is \iffrozen\MyMacro \else not \fi frozen
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifprotected}}]
+
+This conditional checks if a control sequence is protected:
+
+\starttyping
+is \ifprotected\MyMacro \else not \fi protected
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifusercmd}}]
+
+This conditional checks if a control sequence is not one of the primitives:
+
+\starttyping
+is \ifusercmd\MyMacro \else not \fi a primitive
+\stoptyping
+
+It is not always possible to determine this but it should work okay for regular
+macros, register allocations and character definitions.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifempty}}]
+
+This conditional checks if a control sequence is empty:
+
+\starttyping
+is \ifempty\MyMacro \else not \fi empty
+\stoptyping
+
+It is basically a shortcut of:
+
+\starttyping
+is \ifx\MyMacro\empty \else not \fi empty
+\stoptyping
+
+with:
+
+\starttyping
+\def\empty{}
+\stoptyping
+
+Of course this is not empty at all:
+
+\starttyping
+\def\notempty#1{}
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifboolean}}]
+
+This tests a number (register or equivalent) and any nonzero value represents
+\type {true}, which is nicer than using an \type {\unless \ifcase}.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifmathparameter}}]
+
+This is an \type {\ifcase} where the value depends on if the given math parameter
+is zero, (\type {0}), set (\type {1}), or unset (\type {2}).
+
+\starttyping
+\ifmathparameter\Umathpunctclosespacing\displaystyle
+ zero \or
+ nonzero \or
+ unset \fi
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifmathstyle}}]
+
+This is a variant of \type {\ifcase} were the number is one of the seven possible
+styles: display, text, cramped text, script, cramped script, script script,
+cramped script script.
+
+\starttyping
+\ifmathstyle
+ display
+\or
+ text
+\or
+ cramped text
+\else
+ normally smaller than text
+\fi
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifarguments}}]
+
+This is a variant of \type {\ifcase} were the selector is the number of arguments
+picked up. For example:
+
+\startbuffer
+\def\MyMacro#1#2#3{\ifarguments\0\or1\or2\or3\else ?\fi} \MyMacro{A}{B}{C}
+\def\MyMacro#1#0#3{\ifarguments\0\or1\or2\or3\else ?\fi} \MyMacro{A}{B}{C}
+\def\MyMacro#1#-#2{\ifarguments\0\or1\or2\or3\else ?\fi} \MyMacro{A}{B}{C}\crlf
+\stopbuffer
+
+\typebuffer
+
+Watch the non counted, ignored, argument in the last case. Normally this test will
+be used in combination with \type {\ignorearguments}.
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifhastok}}]
+
+This conditional looks for occurrences in token lists where each argument has to
+be a proper list.
+
+\startbuffer
+\def\scratchtoks{x}
+
+\ifhastoks{yz} {xyz} Y\else N\fi\quad
+\ifhastoks\scratchtoks {xyz} Y\else N\fi
+\stopbuffer
+
+\typebuffer
+
+We get:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifhastoks}}]
+
+This test compares two token lists. When a macro is passed it's meaning
+gets used.
+
+\startbuffer
+\def\x {x}
+\def\xyz{xyz}
+
+(\ifhastoks {x} {xyz}Y\else N\fi)\quad
+(\ifhastoks {\x} {xyz}Y\else N\fi)\quad
+(\ifhastoks \x {xyz}Y\else N\fi)\quad
+(\ifhastoks {y} {xyz}Y\else N\fi)\quad
+(\ifhastoks {yz} {xyz}Y\else N\fi)\quad
+(\ifhastoks {yz} {\xyz}Y\else N\fi)
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {ifhasxtoks}}]
+
+This primitive is like the one in the previous section but this time the
+given lists are expanded.
+
+\startbuffer
+\def\x {x}
+\def\xyz{\x yz}
+
+(\ifhasxtoks {x} {xyz}Y\else N\fi)\quad
+(\ifhasxtoks {\x} {xyz}Y\else N\fi)\quad
+(\ifhastoks \x {xyz}Y\else N\fi)\quad
+(\ifhasxtoks {y} {xyz}Y\else N\fi)\quad
+(\ifhasxtoks {yz} {xyz}Y\else N\fi)\quad
+(\ifhasxtoks {yz} {\xyz}Y\else N\fi)
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+This primitive has some special properties.
+
+\startbuffer
+\edef\+{\expandtoken 9 `+}
+
+\ifhasxtoks {xy} {xyz}Y\else N\fi\quad
+\ifhasxtoks {x\+y} {xyz}Y\else N\fi
+\stopbuffer
+
+\typebuffer
+
+Here the first argument has a token that has category code \quote {ignore} which
+means that such a character will be skipped when seen. So the result is:
+
+{\getbuffer}
+
+This permits checks like these:
+
+\startbuffer
+\edef\,{\expandtoken 9 `,}
+
+\ifhasxtoks{\,x\,} {,x,y,z,}Y\else N\fi\quad
+\ifhasxtoks{\,y\,} {,x,y,z,}Y\else N\fi\quad
+\ifhasxtoks{\,z\,} {,x,y,z,}Y\else N\fi\quad
+\ifhasxtoks{\,x\,} {,xy,z,}Y\else N\fi
+\stopbuffer
+
+\typebuffer
+
+I admit that it needs a bit of a twisted mind to come up with this, but it works
+ok:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {else}}]
+
+This traditional primitive is part of the condition testing mechanism. When a
+condition matches, \TEX\ will continue till it sees an \type {\else} or \type
+{\or} or \type {\orelse} (to be discussed later). It will then do a fast skipping
+pass till it sees an \type {\fi}.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {or}}]
+
+This traditional primitive is part of the condition testing mechanism and relates
+to an \type {\ifcase} test (or a similar test to be introduced in later
+sections). Depending on the value, \TEX\ will do a fast scanning till the right
+\type {\or} is seen, then it will continue expanding till it sees a \type {\or}
+or \type {\else} or \type {\orelse} (to be discussed later). It will then do a
+fast skipping pass till it sees an \type {\fi}.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {fi}}]
+
+This traditional primitive is part of the condition testing mechanism and ends a
+test. So, we have:
+
+\starttyping
+\ifsomething ... \else ... \fi
+\ifsomething ... \or ... \or ... \else ... \fi
+\ifsomething ... \orelse \ifsometing ... \else ... \fi
+\ifsomething ... \or ... \orelse \ifsometing ... \else ... \fi
+\stoptyping
+
+The \type {\orelse} is new in \LUAMETATEX\ and a continuation like we find in
+other programming languages (see later section).
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {unless}}]
+
+This \ETEX\ prefix will negate the test (when applicable).
+
+\starttyping
+ \ifx\one\two YES\else NO\fi
+\unless\ifx\one\two NO\else YES\fi
+\stoptyping
+
+This primitive is hardly used in \CONTEXT\ and we probably could get rid of these
+few cases.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {orelse}}]
+
+This primitive provides a convenient way to flatten your conditional tests. So
+instead of
+
+\starttyping
+\ifnum\scratchcounter<-10
+ too small
+\else\ifnum\scratchcounter>10
+ too large
+\else
+ just right
+\fi\fi
+\stoptyping
+
+You can say this:
+
+\starttyping
+\ifnum\scratchcounter<-10
+ too small
+\orelse\ifnum\scratchcounter>10
+ too large
+\else
+ just right
+\fi
+\stoptyping
+
+You can mix tests and even the case variants will work in most cases \footnote {I
+just play safe because there are corner cases that might not work yet.}
+
+\starttyping
+\ifcase\scratchcounter zero
+\or one
+\or two
+\orelse\ifnum\scratchcounter<10 less than ten
+\else ten or more
+\fi
+\stoptyping
+
+Performance wise there are no real benefits although in principle there is a bit
+less housekeeping involved than with nested checks. However you might like this:
+
+\starttyping
+\ifnum\scratchcounter<-10
+ \expandafter\toosmall
+\orelse\ifnum\scratchcounter>10
+ \expandafter\toolarge
+\else
+ \expandafter\justright
+\fi
+\stoptyping
+
+over:
+
+\starttyping
+\ifnum\scratchcounter<-10
+ \expandafter\toosmall
+\else\ifnum\scratchcounter>10
+ \expandafter\expandafter\expandafter\toolarge
+\else
+ \expandafter\expandafter\expandafter\justright
+\fi\fi
+\stoptyping
+
+or the more \CONTEXT\ specific:
+
+\starttyping
+\ifnum\scratchcounter<-10
+ \expandafter\toosmall
+\else\ifnum\scratchcounter>10
+ \doubleexpandafter\toolarge
+\else
+ \doubleexpandafter\justright
+\fi\fi
+\stoptyping
+
+But then, some \TEX ies like complex and obscure code and throwing away working
+old code that took ages to perfect and get working and also showed that one
+masters \TEX\ might hurt.
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {futurelet}}]
+
+The original \TEX\ primitive \type {\futurelet} can be used to create an alias to a next token,
+push it back into the input and then expand a given token.
+
+\startbuffer
+\let\MySpecialToken[
+\def\DoWhatever{\ifx\NextToken\MySpecialToken YES\else NOP\fi : }
+\futurelet\NextToken\DoWhatever [A]\crlf
+\futurelet\NextToken\DoWhatever (A)
+\stopbuffer
+
+\typebuffer
+
+This is typically the kind of primitive that most users will never use because it
+expects a sane follow up handler (here \type {\DoWhatever}) and therefore is
+related to user interfacing.
+
+{\getbuffer}
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {futuredef}}]
+
+We elaborate on the example of using \type {\futurelet} in the previous section.
+Compare that one with the next:
+
+\startbuffer
+\def\MySpecialToken{[}
+\def\DoWhatever{\ifx\NextToken\MySpecialToken YES\else NOP\fi : }
+\futurelet\NextToken\DoWhatever [A]\crlf
+\futurelet\NextToken\DoWhatever (A)
+\stopbuffer
+
+\typebuffer
+
+This time we get:
+
+{\getbuffer}
+
+It is for that reason that we now also have \type {\futuredef}:
+
+\startbuffer
+\def\MySpecialToken{[}
+\def\DoWhatever{\ifx\NextToken\MySpecialToken YES\else NOP\fi : }
+\futuredef\NextToken\DoWhatever [A]\crlf
+\futuredef\NextToken\DoWhatever (A)
+\stopbuffer
+
+\typebuffer
+
+So we're back to what we want:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {letcharcode}}]
+
+Assigning a meaning to an active character can sometimes be a bit cumbersome;
+think of using some documented uppercase magic that one tends to forget as it's
+used only a few times and then never looked at again. So we have this:
+
+\startbuffer
+{\letcharcode 65 1 \catcode 65 13 A : \meaning A}\crlf
+{\letcharcode 65 2 \catcode 65 13 A : \meaning A}\crlf
+\stopbuffer
+
+\typebuffer
+
+here we define \type {A} as an active charcter with meaning \type {1} in the
+first line and \type {2} in the second.
+
+{\getbuffer}
+
+Normally one will assign a control sequence:
+
+\startbuffer
+{\letcharcode 66 \bf \catcode 66 13 {B bold}: \meaning B}\crlf
+{\letcharcode 73 \it \catcode 73 13 {I italic}: \meaning I}\crlf
+\stopbuffer
+
+\typebuffer
+
+Of course \type {\bf} and \type {\it} are \CONTEXT\ specific commands:
+
+{\getbuffer}
+
+\stopnewprimitive
+
+\startoldprimitive[title={\tex {global}}]
+
+This is one of the original prefixes that can be used when we define a macro of
+change some register.
+
+\starttyping
+\bgroup
+ \def\MyMacroA{a}
+\global\def\MyMacroB{a}
+ \gdef\MyMacroC{a}
+\egroup
+\stoptyping
+
+The macro defined in the first line is forgotten when the groups is left. The
+second and third definition are both global and these definitions are retained.
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {long}}]
+
+This original prefix gave the macro being defined the property that it could not
+have \type {\par} (or the often equivalent empty lines) in its arguments. It was
+mostly a protection against a forgotten right curly brace, resulting in a so called
+run|-|away argument. That mattered on a paper terminal or slow system where such a
+situation should be catched early. In \LUATEX\ it was already optional, and in
+\LUAMETATEX\ we dropped this feature completely (so that we could introduce others).
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {outer}}]
+
+An outer macro is one that can only be used at the outer level. This property is
+no longer supported. Like \type {\long}, the \type {\outer} prefix is now an
+no|-|op (and we don't expect this to have unfortunate side effects).
+
+\stopoldprimitive
+
+\startoldprimitive[title={\tex {protected}}]
+
+A protected macro is one that doesn't get expanded unless it is time to do so.
+For instance, inside an \type {\edef} it just stays what it is. It often makes
+sense to pass macros as|-|is to (multi|-|pass) file (for tables of contents).
+
+In \CONTEXT\ we use either \type {\protected} or \type {\unexpanded} because the
+later was the command we used to achieve the same results before \ETEX\
+introduced this protection primitive. Originally the \type {\protected} macro was
+also defined but it has been dropped.
+
+\stopoldprimitive
+
+\startnewprimitive[title={\tex {frozen}}]
+
+You can define a macro as being frozen:
+
+\starttyping
+\frozen\def\MyMacro{...}
+\stoptyping
+
+When you redefine this macro you get an error:
+
+\starttyping
+! You can't redefine a frozen macro.
+\stoptyping
+
+This is a prefix like \type {\global} and it can be combined with other prefixes.
+\footnote {The \type {\outer} and \type {\long} prefixes are no|-|ops in
+\LUAMETATEX\ and \LUATEX\ can be configured to ignore them.}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {letfrozen}}]
+
+You can explicitly freeze an unfrozen macro:
+
+\starttyping
+\def\MyMacro{...}
+\letfrozen\MyMacro
+\stoptyping
+
+A redefinition will now give:
+
+\starttyping
+! You can't redefine a frozen macro.
+\stoptyping
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {unletfrozen}}]
+
+A frozen macro cannot be redefined: you get an error. But as nothing in \TEX\ is set
+in stone, you can do this:
+
+\starttyping
+\frozen\def\MyMacro{...}
+\unletfrozen\MyMacro
+\stoptyping
+
+and \type {\MyMacro} is no longer protected from overloading. It is still
+undecided to what extend \CONTEXT\ will use this feature.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {letprotected}}]
+
+Say that you have these definitions:
+
+\startbuffer
+ \def \MyMacroA{alpha}
+\protected \def \MyMacroB{beta}
+ \edef \MyMacroC{\MyMacroA\MyMacroB}
+\letprotected \MyMacroA
+ \edef \MyMacroD{\MyMacroA\MyMacroB}
+\meaning \MyMacroC\crlf
+\meaning \MyMacroD
+\stopbuffer
+
+\typebuffer
+
+The typeset meaning in this example is:
+
+{\tttf \getbuffer}
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {unletprotected}}]
+
+The complementary operation of \type {\letprotected} can be used to unprotect
+a macro, so that it gets expandable.
+
+\startbuffer
+ \def \MyMacroA{alpha}
+\protected \def \MyMacroB{beta}
+ \edef \MyMacroC{\MyMacroA\MyMacroB}
+\unletprotected \MyMacroB
+ \edef \MyMacroD{\MyMacroA\MyMacroB}
+\meaning \MyMacroC\crlf
+\meaning \MyMacroD
+\stopbuffer
+
+\typebuffer
+
+Compare this with the example in the previous section:
+
+{\tttf \getbuffer}
+
+\stopnewprimitive
+
+% \startnewprimitive[title={\tex {letdatacode}}]
+% {\em Todo.}
+% \stopnewprimitive
+
+\startnewprimitive[title={\tex {beginlocalcontrol}}]
+
+Once \TEX\ is initialized it will enter the main loop. In there certain commands
+trigger a function that itself can trigger further scanning and functions. In
+\LUAMETATEX\ we can have local main loops and we can either enter it from the
+\LUA\ end (which we don't discuss here) or at the \TEX\ end using this primitive.
+
+\startbuffer
+\scratchcounter100
+
+\edef\whatever{
+ a
+ \beginlocalcontrol
+ \advance\scratchcounter 10
+ b
+ \endlocalcontrol
+ \beginlocalcontrol
+ c
+ \endlocalcontrol
+ d
+ \advance\scratchcounter 10
+}
+
+\the\scratchcounter
+\whatever
+\the\scratchcounter
+\stopbuffer
+
+\typebuffer
+
+A bit of close reading probably gives an impression of what happens here:
+
+{\getbuffer}
+
+The local loop can actually result in material being injected in the current node
+list. However, where normally assignments are not taking place in an \type
+{\edef}, here they are applied just fine. Basically we have a local \TEX\ job, be
+it that it shares all variables with the parent loop.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {endlocalcontrol}}]
+
+ See previous section.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {alignmark}}]
+
+When you have the \type{#} not set up as macro parameter character cq.\ align
+mark, you can use this primitive instead. The same rules apply with respect to
+multiple such tokens in (nested) macros and alignments.
+
+\stopnewprimitive
+
+\startnewprimitive[title={\tex {aligntab}}]
+
+When you have the \type{&} not set up as align tab, you can use this primitive
+instead. The same rules apply with respect to multiple such tokens in (nested)
+macros and alignments.
+
+\stopnewprimitive
+
+\page
+
+% % It doesn't make sense to typeset this, also because it makes me feel old.
+%
+% \startsubject[title=A few notes on extensions] % ,placeholder=todo]
+%
+% This is a companion to the regular \LUAMETATEX\ reference manual, which is mostly
+% a concise summary of the program and its features. They don't replace each other,
+% and none of them claims completeness. There might be more manuals that discuss
+% specific kind of extensions in the future. First some comments on extensions.
+%
+% The starting point of all \TEX\ engines is \TEX. The first follow up was \TEX\
+% with support for 8 bit and languages. After that it took some time, but then two
+% projects started that extended \TEX: \ETEX\ and \OMEGA. In the end the first
+% brought some extensions to the macro machinery, more registers, a simple right to
+% left typesetting feature, some more tracing, etc. The second was more ambitious
+% and has input translation mechanisms, larger fonts, and multi directional
+% typesetting. By the time \ETEX\ became stable, the \PDFTEX\ engine had showed up
+% and at some point it integrated \ETEX. But \PDFTEX\ itself also extended the
+% several components that make up \TEX. The \NTS\ project was started as follow up
+% on \ETEX\ but although an engine written in \JAVA\ was the result it never was
+% used for extensions; this project was fully funded by the german language user
+% group.
+%
+% The \CONTEXT\ macro package was an early adopter of the \ETEX\ and \PDFTEX\
+% extensions. Probably the most significant effect was that we got more registers
+% (some other features were already kind of present in macro form). In between
+% these engines we played with \type {eetex} (extended \ETEX) because we had some
+% wishes of our own. We also explored extensions to the \DVI\ format but in the end
+% \PDF\ won that race. An example of a new mechanism that we introduced in
+% \CONTEXT\ was position tracking: marking positions that can be saved when the
+% output is created and used in a second run. This started as a \DVI\ postprocessor
+% in \PERL\ written by me, later turned into a \CLANGUAGE\ program by Taco, and
+% eventually integrated in \PDFTEX\ by Thanh (\PDFTEX\ was a phd project). At some
+% point \XETEX\ was developed, funded and driven by an organization that did high
+% end multi lingual typesetting; it was based on \ETEX\ and uses a \DVI\ to \PDF\
+% backend processor. Both \PDFTEX\ and \XETEX\ are supported by \CONTEXT\ \MKII,
+% and both engines are basically stable and frozen.
+%
+% At some point Hartmut and I started playing with \LUA\ in \PDFTEX\ but soon Taco,
+% Hartmut and I decided to start a follow up project. All the work on \LUATEX\ (and
+% later \LUAMETATEX) is done whenever there is time and without financial
+% compensation, so we have a slow but steady development track. Early in the
+% \LUATEX\ development there has been some funding for the initial transition (by
+% Taco) from \PDFTEX\ to what became the early versions of \LUATEX . You can read
+% more about the oriental \TEX\ project in other documents and articles in user
+% group journals. There has been some funded development of a library subsystem
+% (which for some reason never took off) as well as \LUAJIT\ integration (by
+% Luigi). The initial \METAPOST\ library (also done by Taco) was funded by a couple
+% of user groups. Then there are the (ongoing) font projects by GUST that got
+% funded by user groups as these were much needed for the \UNICODE\ engines.
+%
+% After the jump start, most work was and is still done in the usual \TEX\ spirit,
+% on a voluntary basis, by folks from the \CONTEXT\ community, and after a decades
+% we reached the stable version 1.00. It's one of the engines in \TEXLIVE\ and
+% Luigi makes sure it integrates well in there. We did continue and around 1.10 the
+% more of less final version was reached and \LUAMETATEX\ took off. In \LUATEX\
+% only bugs get fixed, occasionally some helpers can get added, and we might port
+% some of \LUAMETATEX\ back to its parent, when it doesn't harm compatibility.
+%
+% Already early in development some primitives were added that enhance the macro
+% language. More were added later. It's these extensions that are discussed in this
+% document. There are several documents in the \CONTEXT\ distribution that discuss
+% the (ongoing) development, right from the start, and these often contain
+% examples. For instance some of the new primitives have been introduced there,
+% complete with a rationale and examples of usage.
+%
+% Just for the record: the \CONTEXT\ group runs the build farm that is used to
+% generate binaries for all sorts of platforms. We make sure that there are always
+% versions that can be used for real production jobs. You can expect regular
+% updates as long as there are developments (of course, eventually we're done).
+%
+% \stopsubject
+
+\startsubject[title=Rationale] % ,placeholder=todo]
+
+Some words about the why and how it came. One of the early adopters of \CONTEXT\
+was Taco Hoekwater and we spent numerous trips to \TEX\ meetings all over the
+globe. He was also the only one I knew who had read the \TEX\ sources. Because
+\CONTEXT\ has always been on the edge of what is possible and at that time we
+both used it for rather advanced rendering, we also ran into the limitations. I'm
+not talking of \TEX\ features here. Naturally old school \TEX\ is not really
+geared for dealing with images of all kind, colors in all kind of color spaces,
+highly interactive documents, input methods like \XML, etc. The nice thing is
+that it offers some escapes, like specials and writes and later execution of
+programs that opened up lots of possibilities, so in practice there were no real
+limitations to what one could do. But coming up with a consistent and extensible
+(multi lingual) user interface was non trivial, because it had an impact in
+memory usage and performance. A lot could be done given some programming, as
+\CONTEXT\ \MKII\ proves, but it was not always pretty under the hood. The move to
+\LUATEX\ and \MKIV\ transferred some action to \LUA, and because \LUATEX\
+effectively was a \CONTEXT\ related project, we could easily keep them in sync.
+
+Our traveling together, meeting several times per year, and eventually email and
+intense \LUATEX\ developments (lots of Skype sessions) for a couple of years,
+gave us enough opportunity to discuss all kind of nice features not present in
+the engine. The previous century we discussed lots of them, rejected some, stayed
+with others, and I admit that forgot about most of the arguments already. Some
+that we did was already explored in \type {eetex}, some of those ended up in
+\LUATEX, and eventually what we have in \LUAMETATEX\ can been seen as the result
+of years of programming in \TEX, improving macros, getting more performance and
+efficiency out of existing \CONTEXT\ code and inspiration that we got out of the
+\CONTEXT\ community, a demanding lot, always willing to experiment with us.
+
+Once I decided to work on \LUAMETATEX\ and bind its source to the \CONTEXT\
+distribution so that we can be sure that it won't get messed up and might
+interfere with the \CONTEXT\ expectations, some more primitives saw their way
+into it. It is very easy to come up with all kind of bells and whistles but it is
+equally easy to hurt performance of an engine and what might go unnoticed in
+simple tests can really affect a macro package that depends on stability. So, what
+I did was mostly looking at the \CONTEXT\ code and wondering how to make some of
+the low level macros look more natural, also because I know that there are users
+who look into these sources. We spend a lot of time making them look consistent
+and nice and the nicer the better. Getting a better performance was seldom an
+argument because much is already as fast as can be so there is not that much to
+gain, but less clutter in tracing was an argument for some new primitives. Also,
+the fact that we soon might need to fall back on our phones to use \TEX\ a
+smaller memory footprint and less byte shuffling also was a consideration. The
+\LUAMETATEX\ memory footprint is somewhat smaller than the \LUATEX\ footprint.
+By binding \LUAMETATEX\ to \CONTEXT\ we can also guarantee that the combinations
+works as expected.
+
+I'm aware of the fact that \CONTEXT\ is in a somewhat unique position. First of
+all it has always been kind of cutting edge so its users are willing to
+experiment. There are users who immediately update and run tests, so bugs can and
+will be fixed fast. Already for a long time the community has an convenient
+infrastructure for updating and the build farm for generating binaries (also for
+other engines) is running smoothly.
+
+Then there is the \CONTEXT\ user interface that is quite consistent and permits
+extensions with staying backward compatible. Sometimes users run into old manuals
+or examples and then complain that \CONTEXT\ is not compatible but that then
+involves obsolete technology: we no longer need font and input encodings and font
+definitions are different for \OPENTYPE\ fonts. We always had an abstract backend
+model, but nowadays \PDF\ is kind of dominant and drives a lot of expectations.
+So, some of the \MKII\ commands are gone and \MKIV\ has some more. Also, as
+\METAPOST\ evolved that department in \CONTEXT\ also evolved. Think of it like
+cars: soon all are electric so one cannot expect a hole to poor in some fluid but
+gets a (often incompatible) plug instead. And buttons became touch panels. There
+is no need to use much force to steer or brake. Navigation is different, as are
+many controls. And do we need to steer ourselves a decade from now?
+
+So, just look at \TEX\ and \CONTEXT\ in the same way. A system from the nineties
+in the previous century differs from one three decades later. Demands differ,
+input differs, resources change, editing and processing moves on, and so on.
+Manuals, although still being written are seldom read from cover to cover because
+online searching replaced them. And who buys books about programming? So
+\LUAMETATEX, while still being \TEX\ also moves on, as do the way we do our low
+level coding. This makes sense because the original \TEX\ ecosystem was not made
+with a huge and complex macro package in mind, that just happened. An author was
+supposed to make a style for each document. An often used argument for using
+another macro package over \CONTEXT\ was that the later evolved and other macro
+packages would work the same forever and not change from the perspective of the
+user. In retrospect those arguments were somewhat strange because the world,
+computers, users etc.\ do change. Standards come and go, as do software politics
+and preferences. In many aspects the \TEX\ community is not different from other
+large software projects, operating system wars, library devotees, programming
+language addicts, paradigm shifts. But, don't worry, if you don't like
+\LUAMETATEX\ and its new primitives, just forget about them. The other engines
+will be there forever and are a safe bet, although \LUATEX\ already stirred up
+the pot I guess. But keep in mind that new features in the latest greatest
+\CONTEXT\ version will more and more rely on \LUAMETATEX\ being used; after all
+that is where it's made for. And this manual might help understand its users why,
+where and how the low level code differs between \MKII, \MKIV\ and \LMTX.
+
+Can we expect more new primitives than the ones introduced here? Given the amount
+of time I spend on experimenting and considering what made sense and what not,
+the answer probably is \quotation {no}, or at least \quotation {not that much}.
+As in the past no user ever requested the kind of primitives that were added, I
+don't expect users to come up with requests in the future either. Of course,
+those more closely related to \CONTEXT\ development look at it from the other
+end. Because it's there where the low level action really is, demands might still
+evolve.
+
+Hans Hagen \crlf Hasselt NL
+
+\stopsubject
+
+\stoptext
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/publications/publications-titlepage.tex b/Master/texmf-dist/doc/context/sources/general/manuals/publications/publications-titlepage.tex
index dfc53419afd..3f887dd7dec 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/publications/publications-titlepage.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/publications/publications-titlepage.tex
@@ -11,9 +11,9 @@
for i=0 upto 9 : draw pth shifted (0,2*i) ; endfor ;
) ;
- picture btx ; btx := textext("\ssbf\WORDS{\getvariable{document}{title}}") ;
- picture ctx ; ctx := textext("\ssbf\WORDS{\getvariable{document}{subtitle}}") ;
- picture dtx ; dtx := textext("\ssbf \getvariable{document}{author}") ;
+ picture btx ; btx := textext("\ssbf\WORDS{\documentvariable{title}}") ;
+ picture ctx ; ctx := textext("\ssbf\WORDS{\documentvariable{subtitle}}") ;
+ picture dtx ; dtx := textext("\ssbf \documentvariable{author}") ;
pic := pic shifted - llcorner pic ;
btx := btx shifted - llcorner btx ;
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/spreadsheets/spreadsheets-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/spreadsheets/spreadsheets-mkiv.tex
index c5c99e97d8a..a95ddfd7994 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/spreadsheets/spreadsheets-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/spreadsheets/spreadsheets-mkiv.tex
@@ -749,9 +749,9 @@ will be added in the future but it all depends on usage.
\startsubject[title={Colofon}]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/sql/sql-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/sql/sql-mkiv.tex
index 835065ba041..27be160f7e7 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/sql/sql-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/sql/sql-mkiv.tex
@@ -580,9 +580,9 @@ In this example we typeset the (small) table):
\startsection[title=Colofon]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/swiglib/swiglib-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/swiglib/swiglib-mkiv.tex
index 7360c73fa6a..6d9d8af9aea 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/swiglib/swiglib-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/swiglib/swiglib-mkiv.tex
@@ -516,9 +516,9 @@ handle it \type {--parallel} can speed up the process.
\startsection[title=Colofon]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC comment \NC the swiglib infrastructure is implemented by Luigi Scarso \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/templates/templates-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/templates/templates-mkiv.tex
index 07dd041c3f8..e46b1de8ab8 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/templates/templates-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/templates/templates-mkiv.tex
@@ -276,9 +276,9 @@ possibility is provided.
\startsubject[title={Colofon}]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/tools/tools-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/tools/tools-mkiv.tex
index cd5214b3fd6..b26145d3724 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/tools/tools-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/tools/tools-mkiv.tex
@@ -116,13 +116,13 @@
draw p shifted (center Page - center p) withpen pencircle scaled 2 withcolor .5white ;
numeric dx ; dx := bbwidth(Page)/21 ;
numeric dy ; dy := bbheight(Page)/30 ;
- p := textext("\tt\bf\white\getvariable{document}{extra-1}") xsized(14*dx) ;
+ p := textext("\tt\bf\white\documentvariable{extra-1}") xsized(14*dx) ;
p := p shifted (-lrcorner p) shifted lrcorner Page shifted (-1dx,8dy) ;
draw p ;
- p := textext("\tt\bf\white\getvariable{document}{extra-2}") xsized(14*dx) ;
+ p := textext("\tt\bf\white\documentvariable{extra-2}") xsized(14*dx) ;
p := p shifted (-lrcorner p) shifted lrcorner Page shifted (-1dx,5dy) ;
draw p ;
- p := textext("\tt\bf\white\getvariable{document}{extra-3}") xsized(14*dx) ;
+ p := textext("\tt\bf\white\documentvariable{extra-3}") xsized(14*dx) ;
p := p shifted (-lrcorner p) shifted lrcorner Page shifted (-1dx,2dy) ;
draw p ;
setbounds currentpicture to Page ;
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/units/units-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/units/units-mkiv.tex
index ba4f1278752..66338497ac6 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/units/units-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/units/units-mkiv.tex
@@ -508,6 +508,40 @@ Which gives:
\stopsection
+\startsection[title={Goodies}]
+
+Here are some goodies:
+
+\startbuffer
+\type{1 } : \unit {30^2 meter per second}
+\type{2a} : \unit {30 ± 10 meter per second}
+\type{2b} : \unit {30 – 10 meter per second}
+\type{3a} : \unit {30^2 ± 10^2 meter per second}
+\type{3b} : \unit {30^2 – 10^2 meter per second}
+\type{4 } : \unit {30 (10) meter per second}
+\type{5a} : \unit {30 (± 10) meter per second}
+\type{5b} : \unit {30^2 (± 10^2) meter per second}
+\type{6a} : \unit {(30 ± 10) meter per second}
+\type{6b} : \unit {(30^2 ± 10^2) meter per second}
+\type{6c} : \unit {(30^2 – 10^2) meter per second}
+\type{7a} : \unit {(30 ± 10)^2 meter per second}
+\type{7b} : \unit {(30 – 10)^2 meter per second}
+\type{7c} : \unit {(30^2 – 10^3)^5 meter per second}
+\stopbuffer
+
+Instead of \type {±} one can use \type {pm} and \type {to} can be used instead of
+\type {–}.
+
+\typebuffer
+
+Their rendering explains their intention:
+
+\startlines
+\getbuffer
+\stoplines
+
+\stopsection
+
\startsection[title={Built in keywords}]
A given sequence of keywords is translated in an list of internal
@@ -541,12 +575,14 @@ These are also special:
\showunits[packaged]
+\stopsection
+
\startsection[title={Colofon}]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex
index a6d29ac429c..dffc7d65cd2 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex
@@ -46,6 +46,7 @@
\component workflows-xml
\component workflows-setups
\component workflows-synctex
+ \component workflows-parallel
\stopbodymatter
\stopdocument
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-parallel.tex b/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-parallel.tex
new file mode 100644
index 00000000000..632d2e3e666
--- /dev/null
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-parallel.tex
@@ -0,0 +1,123 @@
+% language=us
+
+\startcomponent workflows-parallel
+
+\environment workflows-style
+
+\startchapter[title={Parallel processing}]
+
+% \startsection[title={Introduction}]
+
+% \stopsection
+
+This is just a small intermezzo. Mid April 2020 Mojca asked on the mailing list how
+to best compile 5000 files, based on a template. The answer depends on the workflow
+and circumstances but one can easily come up with some factors that play a role.
+
+\startitemize
+ \startitem
+ How complex is the document? How many pages are generated, how many fonts
+ get used? Do we need multiple runs per document? Are images involved and
+ if so, what format are they in? When processing relative small files we
+ normally need seconds, not minutes.
+ \stopitem
+ \startitem
+ What machine is used? How powerful is the \CPU, how many cores are
+ available and how much memory do we have? Is the filesystem on a local
+ \SSD\ or on a remote file system? How well does file caching work? Again,
+ we're talking seconds here.
+ \stopitem
+ \startitem
+ What engine is used? Assuming that \MKIV\ is used, we can choose for
+ \LUATEX\ or \LUAMETATEX. The former has faster backend code, the later a
+ faster frontend. What is more efficient depends on the document. The
+ later has some advantages that we will not mention here.
+ \stopitem
+\stopitemize
+
+The tests mentioned below are run with a simple \LUA\ script that manages the
+parallel runs. More about that later. As sample document we use this:
+
+\starttyping
+\setupbodyfont[dejavu]
+
+\starttext
+ \dorecurse{\getdocumentargument{noffiles}}{\input tufte\par}
+\stoptext
+\stoptyping
+
+We start with 100 runs of 10 inclusions. We permit 8 runs in parallel. A \LUATEX\
+run of 100 takes 32 seconds, a \LUAJITTEX\ run uses 26 seconds, and \LUAMETATEX\
+does it in 25 seconds. \footnote {I used a mingw cross compiled 64 bit binary;
+the GCC9 version seems somewhat slower than the previous compiler version.} An
+interesting observation is memory consumption: \LUAJITTEX, which has a different
+virtual machine and a limited memory model, peaks at 0.8GB for the eight parallel
+runs. The \LUAMETATEX\ engine has the same demands. However, \LUATEX\ needs
+1.2GB. Bumping to 20 inclusions increased the runtime a few seconds for each
+engine.
+
+The differences can be explained by a faster startup time of \LUAMETATEX; for
+instance we don't use a compressed format (dump), but there are some other
+optimizations too, and even when they're close to unmeasurable, they might add
+up. The \LUAJITTEX\ engine speeds up \LUA\ interpretation which is reflected in
+runtime because \CONTEXT\ spends half its time in \LUA.
+
+As a next test I decided to run the test file 5000 times: Mojca's scenario.
+Including 10 sample files (per run) for those 5000 files took 1320 seconds. When
+we cache the included file we gain some 5~percent.
+
+Does it matter how many jobs we run in parallel? The 2013 laptop I used for
+testing has four real cores that hyperthread to eight cores. \footnote {The
+machine has an Intel i7-3840QM \CPU, 16GB of memory and a 512 GB Samsung Pro
+\SSD.} On 1000 jobs we need 320 seconds for 1000 files (10 inclusions) when we
+use four cores. With six cores we need 270 seconds, which is much better. With
+eight cores we go down to 260 seconds and ten cores, which is two more than there
+are, we get about the same runtime. \footnote {On a more modern system, let alone
+a desktop computer, I expect these numbers to be much lower.} A \TEX\ program is
+a single core process and it makes no sense to use more cores than the \CPU\
+provides.
+
+\starttyping
+\setupbodyfont[dejavu]
+
+\starttext
+ \dorecurse{\getdocumentargument{noffiles}}{\samplefile{tufte}\par}
+\stoptext
+\stoptyping
+
+Again, caching the input file as above saves a little bit: 10 seconds, so we get
+250 seconds. When you run these tests on the machine that you normally work on,
+waiting for that many jobs to finish is no fun, so what if we (as I then normally
+do) watch some music video? With a fullscreen high resolution video shown in the
+foreground the runtime didn't change: still 250 seconds for 1000 jobs with eight
+parallel runs. On the other hand, a test with Firefox, which is quite demanding,
+running a video in the background, made the runtime going up by 30 seconds to
+280. So, when doing some networking, decompression, all kinds of unknown tracking
+using \JAVASCRIPT, etc.\ and therefore its own demands on cores and memory you
+might want to limit the number of parallel runs. These tests are probably not
+that meaningful but a good distraction when in lock down.
+
+I'm still not sure if I should come up with a script for managing these parallel
+runs. But one thing I have added to the \type {context} runner is the (for now
+undocumented) option
+
+\starttyping
+--wipebusy
+\stoptyping
+
+which, after a run removes the file
+
+\starttyping
+context-is-busy.tmp
+\stoptyping
+
+This permits a management script to check if a run is done. Before starting a run
+(in a separate process) the script can write that file and by just checking if it
+is still there, the management script can decide when a next run can be started.
+
+\stopchapter
+
+\stopcomponent
+
+% downloaded video : Jojo Mayer's 2019 TED talk: https://www.youtube.com/watch?v=Npq-bhz1ll0}
+% realtime video : Andrew Cuomo's daily press conference on dealing with Covid 19
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-commands.tex b/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-commands.tex
index ab998989542..8d9e9ef47ca 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-commands.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-commands.tex
@@ -309,6 +309,10 @@ You can restrict flushing by using commands that accept a specification.
returns the index (position) in the parent node of \cmdinternal {cd:node}
\stopxmlcmd
+\startxmlcmd {\cmdbasicsetup{xmldepth}}
+ returns the depth in the tree of \cmdinternal {cd:node}
+\stopxmlcmd
+
\startxmlcmd {\cmdbasicsetup{xmlconcat}}
returns the sequence of nodes that match \cmdinternal {cd:lpath} at
\cmdinternal {cd:node} whereby \cmdinternal {cd:text} is put between each
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-expressions.tex b/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-expressions.tex
index 0c126f2f89d..b063cab5408 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-expressions.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-expressions.tex
@@ -460,6 +460,7 @@ but that is hardly noticeable.
\NC \type {last()} \NC content \NC processes the last instance of the found element \NC \NR
\NC \type {concat(...)} \NC content \NC concatinates the match \NC \NC \NR
\NC \type {concatrange(from,to,...)} \NC content \NC concatinates a range of matches \NC \NC \NR
+\NC \type {depth()} \NC number \NC the depth in the tree of the found element \NC \NC \NR
\stoptabulate
The extra arguments of the concatinators are: \type {separator} (string), \type
diff --git a/Master/texmf-dist/doc/context/sources/general/manuals/xtables/xtables-mkiv.tex b/Master/texmf-dist/doc/context/sources/general/manuals/xtables/xtables-mkiv.tex
index 1b878e5cbae..d79c14aceaf 100644
--- a/Master/texmf-dist/doc/context/sources/general/manuals/xtables/xtables-mkiv.tex
+++ b/Master/texmf-dist/doc/context/sources/general/manuals/xtables/xtables-mkiv.tex
@@ -1621,9 +1621,9 @@ in the distribution.
\startsection[title={Colofon}]
\starttabulate[|B|p|]
-\NC author \NC \getvariable{document}{author}, \getvariable{document}{affiliation}, \getvariable{document}{location} \NC \NR
+\NC author \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
\NC version \NC \currentdate \NC \NR
-\NC website \NC \getvariable{document}{website} \endash\ \getvariable{document}{support} \NC \NR
+\NC website \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
\stoptabulate
diff --git a/Master/texmf-dist/doc/man/man1/context.1 b/Master/texmf-dist/doc/man/man1/context.1
index 9b23bd88b6d..7d9e949bb16 100644
--- a/Master/texmf-dist/doc/man/man1/context.1
+++ b/Master/texmf-dist/doc/man/man1/context.1
@@ -1,4 +1,4 @@
-.TH "mtx-context" "1" "01-01-2020" "version 1.03" "ConTeXt Process Management"
+.TH "mtx-context" "1" "01-01-2021" "version 1.04" "ConTeXt Process Management"
.SH NAME
mtx-context - ConTeXt Process Management
.SH SYNOPSIS
@@ -77,6 +77,9 @@ generate html error page instead (optional: =scite)
.B --noconsole
disable logging to the console (logfile only)
.TP
+.B --nodummy
+don't create a dummy file (can confuse pdf viewers that keep file in view)
+.TP
.B --purgeresult
purge result file before run
.TP
@@ -98,6 +101,9 @@ run extra imposition pass, given that the style sets up imposition
.B --noarrange
ignore imposition specifications in the style
.TP
+.B --pages
+report pagenumbers of names pages and list references (--page=... or --page=...)
+.TP
.B --jit
use luajittex with jit turned off (only use the faster virtual machine)
.TP
@@ -171,6 +177,9 @@ keep previous log files (jobname-log-[run].tmp)
.B --lmtx
force lmtx mode (when available)
.TP
+.B --overloadmode=error|warning|0--6|255
+enable csname overload checking
+.TP
.B --extra=name
process extra (mtx-context-... in distribution)
.TP
diff --git a/Master/texmf-dist/doc/man/man1/context.man1.pdf b/Master/texmf-dist/doc/man/man1/context.man1.pdf
index 87a0c2fdcac..70255ba6964 100644
--- a/Master/texmf-dist/doc/man/man1/context.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/context.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/luatools.1 b/Master/texmf-dist/doc/man/man1/luatools.1
index 0d0392f396e..94bbd9fcab9 100644
--- a/Master/texmf-dist/doc/man/man1/luatools.1
+++ b/Master/texmf-dist/doc/man/man1/luatools.1
@@ -1,4 +1,4 @@
-.TH "luatools" "1" "01-01-2020" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
+.TH "luatools" "1" "01-01-2021" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
.SH NAME
luatools - ConTeXt TDS Management Tool (aka luatools)
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/luatools.man1.pdf b/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
index 54aa50418f6..f9a842372cd 100644
--- a/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-babel.1 b/Master/texmf-dist/doc/man/man1/mtx-babel.1
index 5ac999c664b..621a1a4ab19 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-babel.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-babel.1
@@ -1,4 +1,4 @@
-.TH "mtx-babel" "1" "01-01-2020" "version 1.20" "Babel Input To UTF Conversion"
+.TH "mtx-babel" "1" "01-01-2021" "version 1.20" "Babel Input To UTF Conversion"
.SH NAME
mtx-babel - Babel Input To UTF Conversion
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
index 35445f9bffa..a9570d1d71f 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-base.1 b/Master/texmf-dist/doc/man/man1/mtx-base.1
index 76f60696f48..3bfc0878434 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-base.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-base.1
@@ -1,4 +1,4 @@
-.TH "mtx-base" "1" "01-01-2020" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
+.TH "mtx-base" "1" "01-01-2021" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
.SH NAME
mtx-base - ConTeXt TDS Management Tool (aka luatools)
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
index ffe49b5a090..a79eadf67a1 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-bibtex.1 b/Master/texmf-dist/doc/man/man1/mtx-bibtex.1
index 60bfd7e1d40..c44df3bbf3e 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-bibtex.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-bibtex.1
@@ -1,4 +1,4 @@
-.TH "mtx-bibtex" "1" "01-01-2020" "version 1.00" "bibtex helpers"
+.TH "mtx-bibtex" "1" "01-01-2021" "version 1.00" "bibtex helpers"
.SH NAME
mtx-bibtex - bibtex helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
index 2e04d911308..b2daae09286 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-cache.1 b/Master/texmf-dist/doc/man/man1/mtx-cache.1
index e266d8da205..60d9450c194 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-cache.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-cache.1
@@ -1,4 +1,4 @@
-.TH "mtx-cache" "1" "01-01-2020" "version 1.01" "ConTeXt & MetaTeX Cache Management"
+.TH "mtx-cache" "1" "01-01-2021" "version 1.01" "ConTeXt & MetaTeX Cache Management"
.SH NAME
mtx-cache - ConTeXt & MetaTeX Cache Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
index 31a84f4fd26..d1f147b8485 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-chars.1 b/Master/texmf-dist/doc/man/man1/mtx-chars.1
index ad52b5b8909..407b3258d0b 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-chars.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-chars.1
@@ -1,4 +1,4 @@
-.TH "mtx-chars" "1" "01-01-2020" "version 0.10" "MkII Character Table Generators"
+.TH "mtx-chars" "1" "01-01-2021" "version 0.10" "MkII Character Table Generators"
.SH NAME
mtx-chars - MkII Character Table Generators
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
index 3c2100fad29..066462bbb23 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-check.1 b/Master/texmf-dist/doc/man/man1/mtx-check.1
index 0525aeb69e8..46f1e06f609 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-check.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-check.1
@@ -1,4 +1,4 @@
-.TH "mtx-check" "1" "01-01-2020" "version 0.10" "Basic ConTeXt Syntax Checking"
+.TH "mtx-check" "1" "01-01-2021" "version 0.10" "Basic ConTeXt Syntax Checking"
.SH NAME
mtx-check - Basic ConTeXt Syntax Checking
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
index be6e7f7ca46..c26a6342326 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-colors.1 b/Master/texmf-dist/doc/man/man1/mtx-colors.1
index 883d6957310..601572f9130 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-colors.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-colors.1
@@ -1,4 +1,4 @@
-.TH "mtx-colors" "1" "01-01-2020" "version 0.10" "ConTeXt Color Management"
+.TH "mtx-colors" "1" "01-01-2021" "version 0.10" "ConTeXt Color Management"
.SH NAME
mtx-colors - ConTeXt Color Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
index c69d780ad2d..3916154bd90 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-context.1 b/Master/texmf-dist/doc/man/man1/mtx-context.1
index 9b23bd88b6d..7d9e949bb16 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-context.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-context.1
@@ -1,4 +1,4 @@
-.TH "mtx-context" "1" "01-01-2020" "version 1.03" "ConTeXt Process Management"
+.TH "mtx-context" "1" "01-01-2021" "version 1.04" "ConTeXt Process Management"
.SH NAME
mtx-context - ConTeXt Process Management
.SH SYNOPSIS
@@ -77,6 +77,9 @@ generate html error page instead (optional: =scite)
.B --noconsole
disable logging to the console (logfile only)
.TP
+.B --nodummy
+don't create a dummy file (can confuse pdf viewers that keep file in view)
+.TP
.B --purgeresult
purge result file before run
.TP
@@ -98,6 +101,9 @@ run extra imposition pass, given that the style sets up imposition
.B --noarrange
ignore imposition specifications in the style
.TP
+.B --pages
+report pagenumbers of names pages and list references (--page=... or --page=...)
+.TP
.B --jit
use luajittex with jit turned off (only use the faster virtual machine)
.TP
@@ -171,6 +177,9 @@ keep previous log files (jobname-log-[run].tmp)
.B --lmtx
force lmtx mode (when available)
.TP
+.B --overloadmode=error|warning|0--6|255
+enable csname overload checking
+.TP
.B --extra=name
process extra (mtx-context-... in distribution)
.TP
diff --git a/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
index ffe3f8ff032..4d2b1e311bb 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-dvi.1 b/Master/texmf-dist/doc/man/man1/mtx-dvi.1
index fe42cb23bd3..f5a46acd855 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-dvi.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-dvi.1
@@ -1,4 +1,4 @@
-.TH "mtx-dvi" "1" "01-01-2020" "version 0.01" "ConTeXt DVI Helpers"
+.TH "mtx-dvi" "1" "01-01-2021" "version 0.01" "ConTeXt DVI Helpers"
.SH NAME
mtx-dvi - ConTeXt DVI Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf
index 64fad3823d4..c44530f2feb 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-epub.1 b/Master/texmf-dist/doc/man/man1/mtx-epub.1
index 0c0e26b4987..8c96f2a908b 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-epub.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-epub.1
@@ -1,4 +1,4 @@
-.TH "mtx-epub" "1" "01-01-2020" "version 1.10" "ConTeXt EPUB Helpers"
+.TH "mtx-epub" "1" "01-01-2021" "version 1.10" "ConTeXt EPUB Helpers"
.SH NAME
mtx-epub - ConTeXt EPUB Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
index 776cf3f0025..9c66d3543ad 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-evohome.1 b/Master/texmf-dist/doc/man/man1/mtx-evohome.1
index 90de5613cdd..c68a3072a1f 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-evohome.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-evohome.1
@@ -1,4 +1,4 @@
-.TH "mtx-evohome" "1" "01-01-2020" "version 1.00" "Evohome Fetcher"
+.TH "mtx-evohome" "1" "01-01-2021" "version 1.00" "Evohome Fetcher"
.SH NAME
mtx-evohome - Evohome Fetcher
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-evohome.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-evohome.man1.pdf
index e0a8fbf43b4..827f6460249 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-evohome.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-evohome.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-fcd.1 b/Master/texmf-dist/doc/man/man1/mtx-fcd.1
index 6bff46e0d77..1f0e99a2685 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-fcd.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-fcd.1
@@ -1,4 +1,4 @@
-.TH "mtx-fcd" "1" "01-01-2020" "version 1.00" "Fast Directory Change"
+.TH "mtx-fcd" "1" "01-01-2021" "version 1.00" "Fast Directory Change"
.SH NAME
mtx-fcd - Fast Directory Change
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
index 7e63d90279b..ee04f7f0c32 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-flac.1 b/Master/texmf-dist/doc/man/man1/mtx-flac.1
index b58582f043f..531a76fdb16 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-flac.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-flac.1
@@ -1,4 +1,4 @@
-.TH "mtx-flac" "1" "01-01-2020" "version 0.10" "ConTeXt Flac Helpers"
+.TH "mtx-flac" "1" "01-01-2021" "version 0.10" "ConTeXt Flac Helpers"
.SH NAME
mtx-flac - ConTeXt Flac Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
index 5022ad93096..a35fa210629 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-fonts.1 b/Master/texmf-dist/doc/man/man1/mtx-fonts.1
index b137418b909..44bdffa6451 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-fonts.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-fonts.1
@@ -1,4 +1,4 @@
-.TH "mtx-fonts" "1" "01-01-2020" "version 1.00" "ConTeXt Font Database Management"
+.TH "mtx-fonts" "1" "01-01-2021" "version 1.00" "ConTeXt Font Database Management"
.SH NAME
mtx-fonts - ConTeXt Font Database Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
index 6792ca7083b..8e95bf8e8d5 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-grep.1 b/Master/texmf-dist/doc/man/man1/mtx-grep.1
index 4c9aa39e532..088ae186fe7 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-grep.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-grep.1
@@ -1,4 +1,4 @@
-.TH "mtx-grep" "1" "01-01-2020" "version 0.10" "Simple Grepper"
+.TH "mtx-grep" "1" "01-01-2021" "version 0.10" "Simple Grepper"
.SH NAME
mtx-grep - Simple Grepper
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
index 2988c183714..3c97fd85aa1 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-interface.1 b/Master/texmf-dist/doc/man/man1/mtx-interface.1
index d3531d45674..dfe416e78d7 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-interface.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-interface.1
@@ -1,4 +1,4 @@
-.TH "mtx-interface" "1" "01-01-2020" "version 0.13" "ConTeXt Interface Related Goodies"
+.TH "mtx-interface" "1" "01-01-2021" "version 0.13" "ConTeXt Interface Related Goodies"
.SH NAME
mtx-interface - ConTeXt Interface Related Goodies
.SH SYNOPSIS
@@ -41,6 +41,9 @@ generate check file
.B --meaning
report the mening of commands
.TP
+.B --tokens
+show the internal representation of commands
+.TP
.B --toutf
replace named characters by utf
.TP
diff --git a/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
index e4045166708..935054dbb50 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-metapost.1 b/Master/texmf-dist/doc/man/man1/mtx-metapost.1
index 5b110d06cc5..997f3873334 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-metapost.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-metapost.1
@@ -1,4 +1,4 @@
-.TH "mtx-metapost" "1" "01-01-2020" "version 0.10" "MetaPost to PDF processor"
+.TH "mtx-metapost" "1" "01-01-2021" "version 0.10" "MetaPost to PDF processor"
.SH NAME
mtx-metapost - MetaPost to PDF processor
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
index 75828b65d6f..bc670accf10 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-modules.1 b/Master/texmf-dist/doc/man/man1/mtx-modules.1
index 5eaff034ebf..6f2bfebcd7f 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-modules.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-modules.1
@@ -1,4 +1,4 @@
-.TH "mtx-modules" "1" "01-01-2020" "version 1.00" "ConTeXt Module Documentation Generators"
+.TH "mtx-modules" "1" "01-01-2021" "version 1.00" "ConTeXt Module Documentation Generators"
.SH NAME
mtx-modules - ConTeXt Module Documentation Generators
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
index 729b8765300..b5840d1876d 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-package.1 b/Master/texmf-dist/doc/man/man1/mtx-package.1
index 02671fa9563..92c1782635d 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-package.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-package.1
@@ -1,4 +1,4 @@
-.TH "mtx-package" "1" "01-01-2020" "version 0.10" "Distribution Related Goodies"
+.TH "mtx-package" "1" "01-01-2021" "version 0.10" "Distribution Related Goodies"
.SH NAME
mtx-package - Distribution Related Goodies
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
index 71fb7c93664..b80e3a5cd74 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-patterns.1 b/Master/texmf-dist/doc/man/man1/mtx-patterns.1
index 320a89e2250..d87f5887fdb 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-patterns.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-patterns.1
@@ -1,4 +1,4 @@
-.TH "mtx-patterns" "1" "01-01-2020" "version 0.20" "ConTeXt Pattern File Management"
+.TH "mtx-patterns" "1" "01-01-2021" "version 0.20" "ConTeXt Pattern File Management"
.SH NAME
mtx-patterns - ConTeXt Pattern File Management
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
index da3ee289a63..bdd2eb3b567 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-pdf.1 b/Master/texmf-dist/doc/man/man1/mtx-pdf.1
index df5501b9534..1535c8af80f 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-pdf.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-pdf.1
@@ -1,4 +1,4 @@
-.TH "mtx-pdf" "1" "01-01-2020" "version 0.10" "ConTeXt PDF Helpers"
+.TH "mtx-pdf" "1" "01-01-2021" "version 0.10" "ConTeXt PDF Helpers"
.SH NAME
mtx-pdf - ConTeXt PDF Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
index f7567d8951a..9e429e80386 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-plain.1 b/Master/texmf-dist/doc/man/man1/mtx-plain.1
index 431db53a107..9874cf6c63d 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-plain.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-plain.1
@@ -1,4 +1,4 @@
-.TH "mtx-plain" "1" "01-01-2020" "version 1.00" "Plain TeX Runner"
+.TH "mtx-plain" "1" "01-01-2021" "version 1.00" "Plain TeX Runner"
.SH NAME
mtx-plain - Plain TeX Runner
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
index a1c27386c11..5fe7c88c650 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-profile.1 b/Master/texmf-dist/doc/man/man1/mtx-profile.1
index f520a9e139a..a04a23d6ec0 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-profile.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-profile.1
@@ -1,4 +1,4 @@
-.TH "mtx-profile" "1" "01-01-2020" "version 1.00" "ConTeXt MkIV LuaTeX Profiler"
+.TH "mtx-profile" "1" "01-01-2021" "version 1.00" "ConTeXt MkIV LuaTeX Profiler"
.SH NAME
mtx-profile - ConTeXt MkIV LuaTeX Profiler
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
index 450ef4e94ae..ef3faff2a8d 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-rsync.1 b/Master/texmf-dist/doc/man/man1/mtx-rsync.1
index 60b87707303..510775ba6ce 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-rsync.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-rsync.1
@@ -1,4 +1,4 @@
-.TH "mtx-rsync" "1" "01-01-2020" "version 0.10" "Rsync Helpers"
+.TH "mtx-rsync" "1" "01-01-2021" "version 0.10" "Rsync Helpers"
.SH NAME
mtx-rsync - Rsync Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
index 1a8e5635389..6dc7e8de159 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-scite.1 b/Master/texmf-dist/doc/man/man1/mtx-scite.1
index 2e83387f9df..fbe640f6e10 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-scite.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-scite.1
@@ -1,4 +1,4 @@
-.TH "mtx-scite" "1" "01-01-2020" "version 1.00" "Scite Helper Script"
+.TH "mtx-scite" "1" "01-01-2021" "version 1.00" "Scite Helper Script"
.SH NAME
mtx-scite - Scite Helper Script
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
index 38b806dd596..2d1b97a8a0b 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-server.1 b/Master/texmf-dist/doc/man/man1/mtx-server.1
index ee565d4164e..ea9e8fee950 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-server.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-server.1
@@ -1,4 +1,4 @@
-.TH "mtx-server" "1" "01-01-2020" "version 0.10" "Simple Webserver For Helpers"
+.TH "mtx-server" "1" "01-01-2021" "version 0.10" "Simple Webserver For Helpers"
.SH NAME
mtx-server - Simple Webserver For Helpers
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
index 65727682fef..b7761d1a414 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-texworks.1 b/Master/texmf-dist/doc/man/man1/mtx-texworks.1
index 67e84a4d7ba..64fbece5ab9 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-texworks.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-texworks.1
@@ -1,4 +1,4 @@
-.TH "mtx-texworks" "1" "01-01-2020" "version 1.00" "TeXworks Startup Script"
+.TH "mtx-texworks" "1" "01-01-2021" "version 1.00" "TeXworks Startup Script"
.SH NAME
mtx-texworks - TeXworks Startup Script
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
index 981de98fb09..c31f130f69c 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-timing.1 b/Master/texmf-dist/doc/man/man1/mtx-timing.1
index 582898c1ac0..852fd8ce8e8 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-timing.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-timing.1
@@ -1,4 +1,4 @@
-.TH "mtx-timing" "1" "01-01-2020" "version 0.10" "ConTeXt Timing Tools"
+.TH "mtx-timing" "1" "01-01-2021" "version 0.10" "ConTeXt Timing Tools"
.SH NAME
mtx-timing - ConTeXt Timing Tools
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
index c43d88ae331..27ed2829583 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-tools.1 b/Master/texmf-dist/doc/man/man1/mtx-tools.1
index 6626110b711..e2a74d420e2 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-tools.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-tools.1
@@ -1,4 +1,4 @@
-.TH "mtx-tools" "1" "01-01-2020" "version 1.01" "Some File Related Goodies"
+.TH "mtx-tools" "1" "01-01-2021" "version 1.01" "Some File Related Goodies"
.SH NAME
mtx-tools - Some File Related Goodies
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
index c7afaedc8cd..5928547bf86 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-unicode.1 b/Master/texmf-dist/doc/man/man1/mtx-unicode.1
index 072ff371fa5..605d634898f 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-unicode.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-unicode.1
@@ -1,4 +1,4 @@
-.TH "mtx-unicode" "1" "01-01-2020" "version 1.02" "Checker for char-dat.lua"
+.TH "mtx-unicode" "1" "01-01-2021" "version 1.02" "Checker for char-dat.lua"
.SH NAME
mtx-unicode - Checker for char-dat.lua
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf
index 8989c4a6a7e..abf59a8765d 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-unzip.1 b/Master/texmf-dist/doc/man/man1/mtx-unzip.1
index d67698c599c..98b17733485 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-unzip.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-unzip.1
@@ -1,4 +1,4 @@
-.TH "mtx-unzip" "1" "01-01-2020" "version 0.10" "Simple Unzipper"
+.TH "mtx-unzip" "1" "01-01-2021" "version 0.10" "Simple Unzipper"
.SH NAME
mtx-unzip - Simple Unzipper
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
index 3fd901a9183..09422edd636 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-update.1 b/Master/texmf-dist/doc/man/man1/mtx-update.1
index 35500fb6daa..ccff02f91f4 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-update.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-update.1
@@ -1,4 +1,4 @@
-.TH "mtx-update" "1" "01-01-2020" "version 1.03" "ConTeXt Minimals Updater"
+.TH "mtx-update" "1" "01-01-2021" "version 1.03" "ConTeXt Minimals Updater"
.SH NAME
mtx-update - ConTeXt Minimals Updater
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
index 2e07e600c59..78530ab857a 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-vscode.1 b/Master/texmf-dist/doc/man/man1/mtx-vscode.1
index f1c886fa0f4..7ac13328f9f 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-vscode.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-vscode.1
@@ -1,4 +1,4 @@
-.TH "mtx-vscode" "1" "01-01-2020" "version 1.00" "vscode extension generator"
+.TH "mtx-vscode" "1" "01-01-2021" "version 1.00" "vscode extension generator"
.SH NAME
mtx-vscode - vscode extension generator
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-vscode.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-vscode.man1.pdf
index 6f05511bb39..90d2060fe94 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-vscode.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-vscode.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-watch.1 b/Master/texmf-dist/doc/man/man1/mtx-watch.1
index 185dc64bc71..bfa525b4b86 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-watch.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-watch.1
@@ -1,4 +1,4 @@
-.TH "mtx-watch" "1" "01-01-2020" "version 1.00" "ConTeXt Request Watchdog"
+.TH "mtx-watch" "1" "01-01-2021" "version 1.00" "ConTeXt Request Watchdog"
.SH NAME
mtx-watch - ConTeXt Request Watchdog
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
index 7e1e90a7800..d049c0cf46c 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-youless.1 b/Master/texmf-dist/doc/man/man1/mtx-youless.1
index 6d4e8b1df82..e88c2d0e18c 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-youless.1
+++ b/Master/texmf-dist/doc/man/man1/mtx-youless.1
@@ -1,4 +1,4 @@
-.TH "mtx-youless" "1" "01-01-2020" "version 1.100" "youless Fetcher"
+.TH "mtx-youless" "1" "01-01-2021" "version 1.100" "youless Fetcher"
.SH NAME
mtx-youless - youless Fetcher
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
index 2c1310a4711..e33498a54c3 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtxrun.1 b/Master/texmf-dist/doc/man/man1/mtxrun.1
index 8118c9c7f7d..6ed2acf8a17 100644
--- a/Master/texmf-dist/doc/man/man1/mtxrun.1
+++ b/Master/texmf-dist/doc/man/man1/mtxrun.1
@@ -1,4 +1,4 @@
-.TH "mtxrun" "1" "01-01-2020" "version 1.33" "ConTeXt TDS Runner Tool"
+.TH "mtxrun" "1" "01-01-2021" "version 1.33" "ConTeXt TDS Runner Tool"
.SH NAME
mtxrun - ConTeXt TDS Runner Tool
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf b/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
index 5a1c29b8d26..302bb3b7a0a 100644
--- a/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/texexec.1 b/Master/texmf-dist/doc/man/man1/texexec.1
index e783e8d6e47..e2935cc1778 100644
--- a/Master/texmf-dist/doc/man/man1/texexec.1
+++ b/Master/texmf-dist/doc/man/man1/texexec.1
@@ -1,4 +1,4 @@
-.TH "texexec" "1" "01-01-2020" "version 6.2.1" "TeXExec"
+.TH "texexec" "1" "01-01-2021" "version 6.2.1" "TeXExec"
.SH NAME
texexec - TeXExec
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/texexec.man1.pdf b/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
index 4382aea5b59..b16305f336f 100644
--- a/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/texmfstart.1 b/Master/texmf-dist/doc/man/man1/texmfstart.1
index 8118c9c7f7d..6ed2acf8a17 100644
--- a/Master/texmf-dist/doc/man/man1/texmfstart.1
+++ b/Master/texmf-dist/doc/man/man1/texmfstart.1
@@ -1,4 +1,4 @@
-.TH "mtxrun" "1" "01-01-2020" "version 1.33" "ConTeXt TDS Runner Tool"
+.TH "mtxrun" "1" "01-01-2021" "version 1.33" "ConTeXt TDS Runner Tool"
.SH NAME
mtxrun - ConTeXt TDS Runner Tool
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf b/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
index bf09411ea99..ac893b794d7 100644
--- a/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/fonts/map/pdftex/context/mkiv-px.map b/Master/texmf-dist/fonts/map/pdftex/context/mkiv-px.map
index 6a27e357d61..6ed671fb18a 100644
--- a/Master/texmf-dist/fonts/map/pdftex/context/mkiv-px.map
+++ b/Master/texmf-dist/fonts/map/pdftex/context/mkiv-px.map
@@ -5,13 +5,13 @@
% TeX Gyre Pagella (Palatino)
-rpxpplr TeXGyrePagella-Regular "encq8r ReEncodeFont" <q-8r.enc <qplr.pfb
-rpxpplb TeXGyrePagella-Bold "encq8r ReEncodeFont" <q-8r.enc <qplb.pfb
-rpxpplri TeXGyrePagella-Italic "encq8r ReEncodeFont" <q-8r.enc <qplri.pfb
-rpxpplbi TeXGyrePagella-BoldItalic "encq8r ReEncodeFont" <q-8r.enc <qplbi.pfb
-% no idea why these were added
-rpxpplro TeXGyrePagella-Oblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qplr.pfb
-rpxpplbo TeXGyrePagella-BoldOblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qplb.pfb
+% rpxpplr TeXGyrePagella-Regular "encq8r ReEncodeFont" <q-8r.enc <qplr.pfb
+% rpxpplb TeXGyrePagella-Bold "encq8r ReEncodeFont" <q-8r.enc <qplb.pfb
+% rpxpplri TeXGyrePagella-Italic "encq8r ReEncodeFont" <q-8r.enc <qplri.pfb
+% rpxpplbi TeXGyrePagella-BoldItalic "encq8r ReEncodeFont" <q-8r.enc <qplbi.pfb
+% % no idea why these were added
+% rpxpplro TeXGyrePagella-Oblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qplr.pfb
+% rpxpplbo TeXGyrePagella-BoldOblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qplb.pfb
% PX Text
diff --git a/Master/texmf-dist/fonts/map/pdftex/context/mkiv-tx.map b/Master/texmf-dist/fonts/map/pdftex/context/mkiv-tx.map
index d2600fa787d..bd2430da7cd 100644
--- a/Master/texmf-dist/fonts/map/pdftex/context/mkiv-tx.map
+++ b/Master/texmf-dist/fonts/map/pdftex/context/mkiv-tx.map
@@ -5,24 +5,24 @@
% TeX Gyre Termes (Times)
-rtxptmr TeXGyreTermes-Regular "encq8r ReEncodeFont" <q-8r.enc <qtmr.pfb
-rtxptmb TeXGyreTermes-Bold "encq8r ReEncodeFont" <q-8r.enc <qtmb.pfb
-rtxptmri TeXGyreTermes-Italic "encq8r ReEncodeFont" <q-8r.enc <qtmri.pfb
-rtxptmbi TeXGyreTermes-BoldItalic "encq8r ReEncodeFont" <q-8r.enc <qtmbi.pfb
-% no idea why these were added
-rtxptmro TeXGyreTermes-Oblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qtmr.pfb
-rtxptmbo TeXGyreTermes-BoldOblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qtmb.pfb
-
-% TeX Gyre Heros (Helvetica)
-
-rtxphvr TeXGyreHeros-Regular "encqrm ReEncodeFont" <q-rm.enc <qtmr.pfb
-rtxphvb TeXGyreHeros-Bold "encqrm ReEncodeFont" <q-rm.enc <qtmb.pfb
-% probably not used by txfonts
-% rtxphvri TeXGyreHeros-Italic "encqrm ReEncodeFont" <q-rm.enc <qtmri.pfb
-% rtxphvbi TeXGyreHeros-BoldItalic "encqrm ReEncodeFont" <q-rm.enc <qtmbi.pfb
-% followed original definitions; one could also use the italic version
-rtxphvro TeXGyreHeros-Oblique ".167 SlantFont encqrm ReEncodeFont" <q-rm.enc <qtmr.pfb
-rtxphvbo TeXGyreHeros-BoldOblique ".167 SlantFont encqrm ReEncodeFont" <q-rm.enc <qtmb.pfb
+% rtxptmr TeXGyreTermes-Regular "encq8r ReEncodeFont" <q-8r.enc <qtmr.pfb
+% rtxptmb TeXGyreTermes-Bold "encq8r ReEncodeFont" <q-8r.enc <qtmb.pfb
+% rtxptmri TeXGyreTermes-Italic "encq8r ReEncodeFont" <q-8r.enc <qtmri.pfb
+% rtxptmbi TeXGyreTermes-BoldItalic "encq8r ReEncodeFont" <q-8r.enc <qtmbi.pfb
+% % no idea why these were added
+% rtxptmro TeXGyreTermes-Oblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qtmr.pfb
+% rtxptmbo TeXGyreTermes-BoldOblique ".167 SlantFont encq8r ReEncodeFont" <q-8r.enc <qtmb.pfb
+%
+% % TeX Gyre Heros (Helvetica)
+%
+% rtxphvr TeXGyreHeros-Regular "encqrm ReEncodeFont" <q-rm.enc <qtmr.pfb
+% rtxphvb TeXGyreHeros-Bold "encqrm ReEncodeFont" <q-rm.enc <qtmb.pfb
+% % probably not used by txfonts
+% % rtxphvri TeXGyreHeros-Italic "encqrm ReEncodeFont" <q-rm.enc <qtmri.pfb
+% % rtxphvbi TeXGyreHeros-BoldItalic "encqrm ReEncodeFont" <q-rm.enc <qtmbi.pfb
+% % followed original definitions; one could also use the italic version
+% rtxphvro TeXGyreHeros-Oblique ".167 SlantFont encqrm ReEncodeFont" <q-rm.enc <qtmr.pfb
+% rtxphvbo TeXGyreHeros-BoldOblique ".167 SlantFont encqrm ReEncodeFont" <q-rm.enc <qtmb.pfb
% TX Text
diff --git a/Master/texmf-dist/metapost/context/base/mpii/mp-tool.mpii b/Master/texmf-dist/metapost/context/base/mpii/mp-tool.mpii
index de8e1e8e2fd..27c90de389a 100644
--- a/Master/texmf-dist/metapost/context/base/mpii/mp-tool.mpii
+++ b/Master/texmf-dist/metapost/context/base/mpii/mp-tool.mpii
@@ -1841,7 +1841,9 @@ enddef ;
primarydef p enlonged len =
begingroup
- if pair p :
+ if len == 0 :
+ p
+ elseif pair p :
save q ; path q ; q := origin -- p ;
save al ; al := arclength(q) ;
if al > 0 :
@@ -1864,8 +1866,12 @@ enddef ;
% drawarrow p withcolor red ;
% drawarrow p shortened 1cm withcolor green ;
+% primarydef p shortened d =
+% reverse ( ( reverse (p enlonged -d) ) enlonged -d )
+% enddef ;
+
primarydef p shortened d =
- reverse ( ( reverse (p enlonged -d) ) enlonged -d )
+ reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart paired(d) )
enddef ;
% yes or no, untested -)
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/metafun.mpxl b/Master/texmf-dist/metapost/context/base/mpiv/metafun.mpxl
deleted file mode 100644
index a6160ef3e2c..00000000000
--- a/Master/texmf-dist/metapost/context/base/mpiv/metafun.mpxl
+++ /dev/null
@@ -1,46 +0,0 @@
-%D \module
-%D [ file=metafun.mp,
-%D version=2000.07.15,
-%D title=\CONTEXT\ \METAPOST\ graphics,
-%D subtitle=format generation file,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D First we input John Hobby's metapost plain file. However, because we want to
-%D prevent dependency problems and in the end even may use a patched version,
-%D we prefer to use a copy.
-
-boolean contextlmtxmode ; contextlmtxmode := if known fontmaking : false else: true fi;
-
-input "mp-base.mpiv" ;
-input "mp-tool.mpiv" ;
-input "mp-mlib.mpiv" ;
-input "mp-luas.mpxl" ;
-input "mp-math.mpxl" ;
-input "mp-cont.mpxl" ;
-input "mp-page.mpxl" ;
-input "mp-butt.mpiv" ;
-input "mp-shap.mpiv" ;
-input "mp-grph.mpiv" ;
-input "mp-grid.mpiv" ;
-input "mp-form.mpiv" ;
-input "mp-figs.mpiv" ;
-input "mp-func.mpiv" ;
-input "mp-node.mpiv" ;
-input "mp-apos.mpiv" ;
-input "mp-abck.mpiv" ;
-input "mp-blob.mpiv" ;
-
-input "mp-lmtx.mpxl" ; % playground, not official
-
-string metafunversion ; metafunversion = "metafun xl " & mfun_timestamp;
-
-let normalend = end ;
-
-def end = ; message "" ; message metafunversion ; message "" ; endinput ; enddef ;
-def bye = ; message "" ; message metafunversion ; message "" ; endinput ; enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-back.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-back.mpiv
index f588adea9c4..e77b3f0d9c3 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-back.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-back.mpiv
@@ -22,14 +22,15 @@ def some_hash ( expr hash_width ,
hash_angle ,
hash_gap ) =
- stripe_gap := hash_gap ;
- stripe_angle := hash_angle ;
- drawoptions (withpen pencircle scaled hash_linewidth
- withcolor hash_linecolor) ;
- path p ; p := unitsquare xscaled hash_width yscaled hash_height ;
- stripe_path_a () (draw) p ; % next we move it all to quadrant 1
- currentpicture := currentpicture shifted urcorner currentpicture ;
-
+ begingroup ;
+ stripe_gap := hash_gap ;
+ stripe_angle := hash_angle ;
+ drawoptions (withpen pencircle scaled hash_linewidth
+ withcolor hash_linecolor) ;
+ path p ; p := unitsquare xscaled hash_width yscaled hash_height ;
+ stripe_path_a () (draw) p ; % next we move it all to quadrant 1
+ currentpicture := currentpicture shifted urcorner currentpicture ;
+ endgroup ;
enddef ;
def some_double_back (expr back_type ,
@@ -44,162 +45,167 @@ def some_double_back (expr back_type ,
back_leftcolor ,
back_rightcolor ) =
- numeric ww ; ww := back_width ;
- numeric hh ; hh := back_height ;
- numeric dd ; dd := back_delta ;
-
- color back_nillcolor ; back_nillcolor := back_topcolor ;
-
- path p ; p := fullsquare xscaled ww yscaled hh ;
- path q ; q := fullsquare xscaled (ww-2dd) yscaled (hh-2dd) ;
- path r ; r := llcorner p --
- lrcorner p shifted (-3dd,0) .. controls lrcorner p ..
- lrcorner p shifted (0, 3dd) --
- urcorner p shifted (0,-3dd) .. controls urcorner p ..
- urcorner p shifted (-3dd,0) --
- ulcorner p -- cycle ;
- path s ; s := r xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ;
- path t ; t := llcorner p --
- lrcorner p --
- urcorner p shifted (0,-3dd) .. controls urcorner p ..
- urcorner p shifted (-3dd,0) --
- ulcorner p shifted ( 3dd,0) .. controls ulcorner p ..
- ulcorner p shifted (0,-3dd) --
- llcorner p -- cycle ;
- path u ; u := t xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ;
- path v ; v := llcorner p shifted ( 3dd,0) --
- lrcorner p shifted (-3dd,0) .. controls lrcorner p ..
- lrcorner p shifted (0, 3dd) --
- urcorner p shifted (0,-3dd) .. controls urcorner p ..
- urcorner p shifted (-3dd,0) --
- ulcorner p shifted ( 3dd,0) .. controls ulcorner p ..
- ulcorner p shifted (0,-3dd) ..
- llcorner p shifted (0, 3dd) .. controls llcorner p .. cycle ; % {down} .. cycle ;
- path w ; w := t xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ;
- path a ; a := llcorner p -- ulcorner p --
- ulcorner q -- llcorner q -- cycle ;
- path b ; b := llcorner p -- lrcorner p --
- lrcorner q -- llcorner q -- cycle ;
- path c ; c := lrcorner p -- urcorner p --
- urcorner q -- lrcorner q -- cycle ;
- path d ; d := ulcorner p -- urcorner p --
- urcorner q -- ulcorner q -- cycle ;
- path e ; e := llcorner p -- lrcorner p --
- urcorner p -- urcorner q --
- lrcorner q -- llcorner q -- cycle ;
- path f ; f := llcorner p -- ulcorner p --
- urcorner p -- urcorner q --
- ulcorner q -- llcorner q -- cycle ;
-
- linecap := butt ; pickup pencircle scaled back_linewidth ;
-
- if back_type=1 :
-
- fill p withcolor back_fillcolor ;
- fill a withcolor back_leftcolor ;
- fill b withcolor back_bottomcolor ;
- fill c withcolor back_rightcolor ;
- fill d withcolor back_topcolor ;
- draw a withcolor back_linecolor ;
- draw d withcolor back_linecolor ;
- draw b withcolor back_linecolor ;
- draw c withcolor back_linecolor ;
-
- elseif back_type=2 :
-
- fill p withcolor back_fillcolor ;
- fill e withcolor back_bottomcolor ;
- fill f withcolor back_topcolor ;
- draw e withcolor back_linecolor ;
- draw f withcolor back_linecolor ;
-
- elseif back_type=3 :
-
- fill v withcolor back_nillcolor ;
- fill w withcolor back_fillcolor ;
- draw v withcolor back_linecolor ;
- draw w withcolor back_linecolor ;
-
- elseif back_type=4 :
-
- fill t withcolor back_nillcolor ;
- fill u withcolor back_fillcolor ;
- draw t withcolor back_linecolor ;
- draw u withcolor back_linecolor ;
-
- elseif back_type=5 :
-
- t := t rotatedaround(center t,180) ;
- u := u rotatedaround(center u,180) ;
-
- fill t withcolor back_nillcolor ;
- fill u withcolor back_fillcolor ;
- draw t withcolor back_linecolor ;
- draw u withcolor back_linecolor ;
-
- elseif back_type=6 :
-
- r := r rotatedaround(center r,180) ;
- s := s rotatedaround(center s,180) ;
-
- fill r withcolor back_nillcolor ;
- fill s withcolor back_fillcolor ;
- draw r withcolor back_linecolor ;
- draw s withcolor back_linecolor ;
-
- elseif back_type=7 :
-
- fill r withcolor back_nillcolor ;
- fill s withcolor back_fillcolor ;
- draw r withcolor back_linecolor ;
- draw s withcolor back_linecolor ;
-
-fi ;
-
+ begingroup ;
+
+ save ww, hh, dd, p, q, r, s, t, u, v, w, a, c, d, e, f, back_nillcolor ;
+
+ numeric ww ; ww := back_width ;
+ numeric hh ; hh := back_height ;
+ numeric dd ; dd := back_delta ;
+
+ color back_nillcolor ; back_nillcolor := back_topcolor ;
+
+ path p ; p := fullsquare xscaled ww yscaled hh ;
+ path q ; q := fullsquare xscaled (ww-2dd) yscaled (hh-2dd) ;
+ path r ; r := llcorner p --
+ lrcorner p shifted (-3dd,0) .. controls lrcorner p ..
+ lrcorner p shifted (0, 3dd) --
+ urcorner p shifted (0,-3dd) .. controls urcorner p ..
+ urcorner p shifted (-3dd,0) --
+ ulcorner p -- cycle ;
+ path s ; s := r xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ;
+ path t ; t := llcorner p --
+ lrcorner p --
+ urcorner p shifted (0,-3dd) .. controls urcorner p ..
+ urcorner p shifted (-3dd,0) --
+ ulcorner p shifted ( 3dd,0) .. controls ulcorner p ..
+ ulcorner p shifted (0,-3dd) --
+ llcorner p -- cycle ;
+ path u ; u := t xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ;
+ path v ; v := llcorner p shifted ( 3dd,0) --
+ lrcorner p shifted (-3dd,0) .. controls lrcorner p ..
+ lrcorner p shifted (0, 3dd) --
+ urcorner p shifted (0,-3dd) .. controls urcorner p ..
+ urcorner p shifted (-3dd,0) --
+ ulcorner p shifted ( 3dd,0) .. controls ulcorner p ..
+ ulcorner p shifted (0,-3dd) ..
+ llcorner p shifted (0, 3dd) .. controls llcorner p .. cycle ; % {down} .. cycle ;
+ path w ; w := t xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ;
+ path a ; a := llcorner p -- ulcorner p --
+ ulcorner q -- llcorner q -- cycle ;
+ path b ; b := llcorner p -- lrcorner p --
+ lrcorner q -- llcorner q -- cycle ;
+ path c ; c := lrcorner p -- urcorner p --
+ urcorner q -- lrcorner q -- cycle ;
+ path d ; d := ulcorner p -- urcorner p --
+ urcorner q -- ulcorner q -- cycle ;
+ path e ; e := llcorner p -- lrcorner p --
+ urcorner p -- urcorner q --
+ lrcorner q -- llcorner q -- cycle ;
+ path f ; f := llcorner p -- ulcorner p --
+ urcorner p -- urcorner q --
+ ulcorner q -- llcorner q -- cycle ;
+
+ linecap := butt ; pickup pencircle scaled back_linewidth ;
+
+ if back_type = 1 :
+
+ fill p withcolor back_fillcolor ;
+ fill a withcolor back_leftcolor ;
+ fill b withcolor back_bottomcolor ;
+ fill c withcolor back_rightcolor ;
+ fill d withcolor back_topcolor ;
+ draw a withcolor back_linecolor ;
+ draw d withcolor back_linecolor ;
+ draw b withcolor back_linecolor ;
+ draw c withcolor back_linecolor ;
+
+ elseif back_type = 2 :
+
+ fill p withcolor back_fillcolor ;
+ fill e withcolor back_bottomcolor ;
+ fill f withcolor back_topcolor ;
+ draw e withcolor back_linecolor ;
+ draw f withcolor back_linecolor ;
+
+ elseif back_type = 3 :
+
+ fill v withcolor back_nillcolor ;
+ fill w withcolor back_fillcolor ;
+ draw v withcolor back_linecolor ;
+ draw w withcolor back_linecolor ;
+
+ elseif back_type = 4 :
+
+ fill t withcolor back_nillcolor ;
+ fill u withcolor back_fillcolor ;
+ draw t withcolor back_linecolor ;
+ draw u withcolor back_linecolor ;
+
+ elseif back_type = 5 :
+
+ t := t rotatedaround(center t,180) ;
+ u := u rotatedaround(center u,180) ;
+
+ fill t withcolor back_nillcolor ;
+ fill u withcolor back_fillcolor ;
+ draw t withcolor back_linecolor ;
+ draw u withcolor back_linecolor ;
+
+ elseif back_type = 6 :
+
+ r := r rotatedaround(center r,180) ;
+ s := s rotatedaround(center s,180) ;
+
+ fill r withcolor back_nillcolor ;
+ fill s withcolor back_fillcolor ;
+ draw r withcolor back_linecolor ;
+ draw s withcolor back_linecolor ;
+
+ elseif back_type = 7 :
+
+ fill r withcolor back_nillcolor ;
+ fill s withcolor back_fillcolor ;
+ draw r withcolor back_linecolor ;
+ draw s withcolor back_linecolor ;
+
+ fi ;
+
+ endgroup;
enddef ;
-endinput ;
-
-beginfig (1) ;
-
-some_double_back (1, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, .6white, .7white, .6white)
-
-currentpicture := currentpicture shifted (0,-3cm) ;
-
-some_double_back (2, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, .6white, white, white)
-
-currentpicture := currentpicture shifted (0,-3cm) ;
-
-some_double_back (3, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, white, white, white)
-
-currentpicture := currentpicture shifted (0,-3cm) ;
-
-some_double_back (4, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, white, white, white)
-
-currentpicture := currentpicture shifted (0,-3cm) ;
-
-some_double_back (5, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, white, white, white)
-
-currentpicture := currentpicture shifted (0,-3cm) ;
-
-some_double_back (6, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, white, white, white)
-
-currentpicture := currentpicture shifted (0,-3cm) ;
-
-some_double_back (7, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, white, white, white)
-
-currentpicture := currentpicture shifted (0,-3cm) ;
-
-some_double_back (8, 4.5cm, 1.5cm, .25cm, 1mm,
- .5white, .8white, .7white, white, white, white)
-
-endfig ;
-
-end .
+% endinput ;
+%
+% beginfig (1) ;
+%
+% some_double_back (1, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, .6white, .7white, .6white)
+%
+% currentpicture := currentpicture shifted (0,-3cm) ;
+%
+% some_double_back (2, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, .6white, white, white)
+%
+% currentpicture := currentpicture shifted (0,-3cm) ;
+%
+% some_double_back (3, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, white, white, white)
+%
+% currentpicture := currentpicture shifted (0,-3cm) ;
+%
+% some_double_back (4, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, white, white, white)
+%
+% currentpicture := currentpicture shifted (0,-3cm) ;
+%
+% some_double_back (5, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, white, white, white)
+%
+% currentpicture := currentpicture shifted (0,-3cm) ;
+%
+% some_double_back (6, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, white, white, white)
+%
+% currentpicture := currentpicture shifted (0,-3cm) ;
+%
+% some_double_back (7, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, white, white, white)
+%
+% currentpicture := currentpicture shifted (0,-3cm) ;
+%
+% some_double_back (8, 4.5cm, 1.5cm, .25cm, 1mm,
+% .5white, .8white, .7white, white, white, white)
+%
+% endfig ;
+%
+% end .
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-base.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-base.mpiv
index 75dd4b4b00a..08bd42c0526 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-base.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-base.mpiv
@@ -237,11 +237,13 @@ EOF = char 0 ; % end-of-file for readfrom and write..to
% pen constants
-pen pensquare, penrazor, penspeck ;
+pen pensquare, penrazor, penspec ;
pensquare = makepen(unitsquare shifted -(.5,.5)) ;
penrazor = makepen((-.5,0) -- (.5,0) -- cycle) ;
-penspeck = pensquare scaled eps ;
+penspec = pensquare scaled eps ;
+
+def penspeck = penspec enddef ;
% nullary operators
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-blob.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-blob.mpiv
index dd147bedeb2..8808b5df66c 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-blob.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-blob.mpiv
@@ -91,7 +91,10 @@ vardef followtext(expr pth, txt) =
at := arctime pos of pat ;
ap := point at of pat ;
ad := direction at of pat ;
- pic[i] := pic[i] shifted (-wid/2,0) rotated(angle(ad)) shifted ap ;
+ pic[i] := pic[i]
+ shifted (-wid/2,0)
+ if ad <> origin : rotated(angle(ad)) fi
+ shifted ap ;
draw pic[i] ;
if tracingfollowtext = 1 :
draw boundingbox pic[i] withpen pencircle scaled .25pt withcolor red ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpiv
index 083286bee44..13d68684893 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpiv
@@ -155,4 +155,4 @@ vardef OuterMargin = if not OnRightPage : LeftMargin else : RightMargin fi endd
vardef InnerMargin = if not OnRightPage : RightMargin else : LeftMargin fi enddef ;
vardef OuterEdge = if not OnRightPage : LeftEdge else : RightEdge fi enddef ;
-vardef InnerEdge = if not OnRightPage : Rightedge else : LeftEdge fi enddef ;
+vardef InnerEdge = if not OnRightPage : RightEdge else : LeftEdge fi enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpxl b/Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpxl
deleted file mode 100644
index bc318d4b993..00000000000
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-cont.mpxl
+++ /dev/null
@@ -1,158 +0,0 @@
-%D \module
-%D [ file=mp-cont.mpiv,
-%D version=1999.03.10,
-%D title=\CONTEXT\ \METAPOST\ graphics,
-%D subtitle=Interfaces,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This module is rather preliminary and subjected to changes.
-
-if known context_cont : endinput ; fi ;
-
-boolean context_cont ; context_cont := true ;
-
-string CurrentLayout ; CurrentLayout := "default" ;
-
-boolean mfun_swapped ;
-
-def SwapPageState =
- mfun_swapped := true ; % eventually this will go !
-enddef ;
-
-extra_beginfig := extra_beginfig & "mfun_swapped := false ;" ;
-
-newinternal mfid_PaperHeight ; mfid_PaperHeight := scriptindex "PaperHeight" ; vardef PaperHeight = runscript mfid_PaperHeight enddef ;
-newinternal mfid_PaperWidth ; mfid_PaperWidth := scriptindex "PaperWidth" ; vardef PaperWidth = runscript mfid_PaperWidth enddef ;
-newinternal mfid_PrintPaperHeight ; mfid_PrintPaperHeight := scriptindex "PrintPaperHeight" ; vardef PrintPaperHeight = runscript mfid_PrintPaperHeight enddef ;
-newinternal mfid_PrintPaperWidth ; mfid_PrintPaperWidth := scriptindex "PrintPaperWidth" ; vardef PrintPaperWidth = runscript mfid_PrintPaperWidth enddef ;
-newinternal mfid_TopSpace ; mfid_TopSpace := scriptindex "TopSpace" ; vardef TopSpace = runscript mfid_TopSpace enddef ;
-newinternal mfid_BottomSpace ; mfid_BottomSpace := scriptindex "BottomSpace" ; vardef BottomSpace = runscript mfid_BottomSpace enddef ;
-newinternal mfid_BackSpace ; mfid_BackSpace := scriptindex "BackSpace" ; vardef BackSpace = runscript mfid_BackSpace enddef ;
-newinternal mfid_CutSpace ; mfid_CutSpace := scriptindex "CutSpace" ; vardef CutSpace = runscript mfid_CutSpace enddef ;
-newinternal mfid_MakeupHeight ; mfid_MakeupHeight := scriptindex "MakeupHeight" ; vardef MakeupHeight = runscript mfid_MakeupHeight enddef ;
-newinternal mfid_MakeupWidth ; mfid_MakeupWidth := scriptindex "MakeupWidth" ; vardef MakeupWidth = runscript mfid_MakeupWidth enddef ;
-newinternal mfid_TopHeight ; mfid_TopHeight := scriptindex "TopHeight" ; vardef TopHeight = runscript mfid_TopHeight enddef ;
-newinternal mfid_TopDistance ; mfid_TopDistance := scriptindex "TopDistance" ; vardef TopDistance = runscript mfid_TopDistance enddef ;
-newinternal mfid_HeaderHeight ; mfid_HeaderHeight := scriptindex "HeaderHeight" ; vardef HeaderHeight = runscript mfid_HeaderHeight enddef ;
-newinternal mfid_HeaderDistance ; mfid_HeaderDistance := scriptindex "HeaderDistance" ; vardef HeaderDistance = runscript mfid_HeaderDistance enddef ;
-newinternal mfid_TextHeight ; mfid_TextHeight := scriptindex "TextHeight" ; vardef TextHeight = runscript mfid_TextHeight enddef ;
-newinternal mfid_FooterDistance ; mfid_FooterDistance := scriptindex "FooterDistance" ; vardef FooterDistance = runscript mfid_FooterDistance enddef ;
-newinternal mfid_FooterHeight ; mfid_FooterHeight := scriptindex "FooterHeight" ; vardef FooterHeight = runscript mfid_FooterHeight enddef ;
-newinternal mfid_BottomDistance ; mfid_BottomDistance := scriptindex "BottomDistance" ; vardef BottomDistance = runscript mfid_BottomDistance enddef ;
-newinternal mfid_BottomHeight ; mfid_BottomHeight := scriptindex "BottomHeight" ; vardef BottomHeight = runscript mfid_BottomHeight enddef ;
-newinternal mfid_LeftEdgeWidth ; mfid_LeftEdgeWidth := scriptindex "LeftEdgeWidth" ; vardef LeftEdgeWidth = runscript mfid_LeftEdgeWidth enddef ;
-newinternal mfid_LeftEdgeDistance ; mfid_LeftEdgeDistance := scriptindex "LeftEdgeDistance" ; vardef LeftEdgeDistance = runscript mfid_LeftEdgeDistance enddef ;
-newinternal mfid_LeftMarginWidth ; mfid_LeftMarginWidth := scriptindex "LeftMarginWidth" ; vardef LeftMarginWidth = runscript mfid_LeftMarginWidth enddef ;
-newinternal mfid_LeftMarginDistance ; mfid_LeftMarginDistance := scriptindex "LeftMarginDistance" ; vardef LeftMarginDistance = runscript mfid_LeftMarginDistance enddef ;
-newinternal mfid_TextWidth ; mfid_TextWidth := scriptindex "TextWidth" ; vardef TextWidth = runscript mfid_TextWidth enddef ;
-newinternal mfid_RightMarginDistance ; mfid_RightMarginDistance := scriptindex "RightMarginDistance" ; vardef RightMarginDistance = runscript mfid_RightMarginDistance enddef ;
-newinternal mfid_RightMarginWidth ; mfid_RightMarginWidth := scriptindex "RightMarginWidth" ; vardef RightMarginWidth = runscript mfid_RightMarginWidth enddef ;
-newinternal mfid_RightEdgeDistance ; mfid_RightEdgeDistance := scriptindex "RightEdgeDistance" ; vardef RightEdgeDistance = runscript mfid_RightEdgeDistance enddef ;
-newinternal mfid_RightEdgeWidth ; mfid_RightEdgeWidth := scriptindex "RightEdgeWidth" ; vardef RightEdgeWidth = runscript mfid_RightEdgeWidth enddef ;
-newinternal mfid_InnerMarginDistance ; mfid_InnerMarginDistance := scriptindex "InnerMarginDistance" ; vardef InnerMarginDistance = runscript mfid_InnerMarginDistance enddef ;
-newinternal mfid_InnerMarginWidth ; mfid_InnerMarginWidth := scriptindex "InnerMarginWidth" ; vardef InnerMarginWidth = runscript mfid_InnerMarginWidth enddef ;
-newinternal mfid_OuterMarginDistance ; mfid_OuterMarginDistance := scriptindex "OuterMarginDistance" ; vardef OuterMarginDistance = runscript mfid_OuterMarginDistance enddef ;
-newinternal mfid_OuterMarginWidth ; mfid_OuterMarginWidth := scriptindex "OuterMarginWidth" ; vardef OuterMarginWidth = runscript mfid_OuterMarginWidth enddef ;
-newinternal mfid_InnerEdgeDistance ; mfid_InnerEdgeDistance := scriptindex "InnerEdgeDistance" ; vardef InnerEdgeDistance = runscript mfid_InnerEdgeDistance enddef ;
-newinternal mfid_InnerEdgeWidth ; mfid_InnerEdgeWidth := scriptindex "InnerEdgeWidth" ; vardef InnerEdgeWidth = runscript mfid_InnerEdgeWidth enddef ;
-newinternal mfid_OuterEdgeDistance ; mfid_OuterEdgeDistance := scriptindex "OuterEdgeDistance" ; vardef OuterEdgeDistance = runscript mfid_OuterEdgeDistance enddef ;
-newinternal mfid_OuterEdgeWidth ; mfid_OuterEdgeWidth := scriptindex "OuterEdgeWidth" ; vardef OuterEdgeWidth = runscript mfid_OuterEdgeWidth enddef ;
-newinternal mfid_PageOffset ; mfid_PageOffset := scriptindex "PageOffset" ; vardef PageOffset = runscript mfid_PageOffset enddef ;
-newinternal mfid_PageDepth ; mfid_PageDepth := scriptindex "PageDepth" ; vardef PageDepth = runscript mfid_PageDepth enddef ;
-newinternal mfid_LayoutColumns ; mfid_LayoutColumns := scriptindex "LayoutColumns" ; vardef LayoutColumns = runscript mfid_LayoutColumns enddef ;
-newinternal mfid_LayoutColumnDistance ; mfid_LayoutColumnDistance := scriptindex "LayoutColumnDistance" ; vardef LayoutColumnDistance = runscript mfid_LayoutColumnDistance enddef ;
-newinternal mfid_LayoutColumnWidth ; mfid_LayoutColumnWidth := scriptindex "LayoutColumnWidth" ; vardef LayoutColumnWidth = runscript mfid_LayoutColumnWidth enddef ;
-
-newinternal mfid_OnRightPage ; mfid_OnRightPage := scriptindex "OnRightPage" ; vardef OnRightPage = runscript mfid_OnRightPage enddef ;
-newinternal mfid_OnOddPage ; mfid_OnOddPage := scriptindex "OnOddPage" ; vardef OnOddPage = runscript mfid_OnOddPage enddef ;
-newinternal mfid_InPageBody ; mfid_InPageBody := scriptindex "InPageBody" ; vardef InPageBody = runscript mfid_InPageBody enddef ;
-
-newinternal mfid_RealPageNumber ; mfid_RealPageNumber := scriptindex "RealPageNumber" ; vardef RealPageNumber = runscript mfid_RealPageNumber enddef ;
-newinternal mfid_LastPageNumber ; mfid_LastPageNumber := scriptindex "LastPageNumber" ; vardef LastPageNumber = runscript mfid_LastPageNumber enddef ;
-
-newinternal mfid_PageNumber ; mfid_PageNumber := scriptindex "PageNumber" ; vardef PageNumber = runscript mfid_PageNumber enddef ;
-newinternal mfid_NOfPages ; mfid_NOfPages := scriptindex "NOfPages" ; vardef NOfPages = runscript mfid_NOfPages enddef ;
-
-newinternal mfid_SubPageNumber ; mfid_SubPageNumber := scriptindex "SubPageNumber" ; vardef SubPageNumber = runscript mfid_SubPageNumber enddef ;
-newinternal mfid_NOfSubPages ; mfid_NOfSubPages := scriptindex "NOfSubPages" ; vardef NOfSubPages = runscript mfid_NOfSubPages enddef ;
-
-newinternal mfid_CurrentColumn ; mfid_CurrentColumn := scriptindex "CurrentColumn" ; vardef CurrentColumn = runscript mfid_CurrentColumn enddef ;
-newinternal mfid_NOfColumns ; mfid_NOfColumns := scriptindex "NOfColumns" ; vardef NOfColumns = runscript mfid_NOfColumns enddef ;
-
-newinternal mfid_BaseLineSkip ; mfid_BaseLineSkip := scriptindex "BaseLineSkip" ; vardef BaseLineSkip = runscript mfid_BaseLineSkip enddef ;
-newinternal mfid_LineHeight ; mfid_LineHeight := scriptindex "LineHeight" ; vardef LineHeight = runscript mfid_LineHeight enddef ;
-newinternal mfid_BodyFontSize ; mfid_BodyFontSize := scriptindex "BodyFontSize" ; vardef BodyFontSize = runscript mfid_BodyFontSize enddef ;
-
-newinternal mfid_TopSkip ; mfid_TopSkip := scriptindex "TopSkip" ; vardef TopSkip = runscript mfid_TopSkip enddef ;
-newinternal mfid_StrutHeight ; mfid_StrutHeight := scriptindex "StrutHeight" ; vardef StrutHeight = runscript mfid_StrutHeight enddef ;
-newinternal mfid_StrutDepth ; mfid_StrutDepth := scriptindex "StrutDepth" ; vardef StrutDepth = runscript mfid_StrutDepth enddef ;
-
-newinternal mfid_CurrentWidth ; mfid_CurrentWidth := scriptindex "CurrentWidth" ; vardef CurrentWidth = runscript mfid_CurrentWidth enddef ;
-newinternal mfid_CurrentHeight ; mfid_CurrentHeight := scriptindex "CurrentHeight" ; vardef CurrentHeight = runscript mfid_CurrentHeight enddef ;
-
-newinternal mfid_HSize ; mfid_HSize := scriptindex "HSize" ; vardef HSize = runscript mfid_HSize enddef ;
-newinternal mfid_VSize ; mfid_VSize := scriptindex "VSize" ; vardef VSize = runscript mfid_VSize enddef ;
-
-newinternal mfid_EmWidth ; mfid_EmWidth := scriptindex "EmWidth" ; vardef EmWidth = runscript mfid_EmWidth enddef ;
-newinternal mfid_ExHeight ; mfid_ExHeight := scriptindex "ExHeight" ; vardef ExHeight = runscript mfid_ExHeight enddef ;
-
-newinternal mfid_PageFraction ; mfid_PageFraction := scriptindex "PageFraction" ; vardef PageFraction = runscript mfid_PageFraction enddef ;
-
-newinternal mfid_SpineWidth ; mfid_SpineWidth := scriptindex "SpineWidth" ; vardef SpineWidth = runscript mfid_SpineWidth enddef ;
-newinternal mfid_PaperBleed ; mfid_PaperBleed := scriptindex "PaperBleed" ; vardef PaperBleed = runscript mfid_PaperBleed enddef ;
-
-% mfid_CurrentLayout ; mfid_CurrentLayout := scriptindex "CurrentLayout" ; vardef CurrentLayout = runscript mfid_CurrentLayout enddef ;
-newinternal mfid_OverlayWidth ; mfid_OverlayWidth := scriptindex "OverlayWidth" ; vardef OverlayWidth = runscript mfid_OverlayWidth enddef ;
-newinternal mfid_OverlayHeight ; mfid_OverlayHeight := scriptindex "OverlayHeight" ; vardef OverlayHeight = runscript mfid_OverlayHeight enddef ;
-newinternal mfid_OverlayDepth ; mfid_OverlayDepth := scriptindex "OverlayDepth" ; vardef OverlayDepth = runscript mfid_OverlayDepth enddef ;
-newinternal mfid_OverlayLineWidth ; mfid_OverlayLineWidth := scriptindex "OverlayLineWidth" ; vardef OverlayLineWidth = runscript mfid_OverlayLineWidth enddef ;
-newinternal mfid_OverlayOffset ; mfid_OverlayOffset := scriptindex "OverlayOffset" ; vardef OverlayOffset = runscript mfid_OverlayOffset enddef ;
-newinternal mfid_OverlayRegion ; mfid_OverlayRegion := scriptindex "OverlayRegion" ; vardef OverlayRegion = runscript mfid_OverlayRegion enddef ;
-% mfid_OverlayLineColor ; mfid_OverlayLineColor := scriptindex "OverlayLineColor ; vardef OverlayLineColor = runscript mfid_OverlayLineColor enddef ;
-% mfid_OverlayColor ; mfid_OverlayColor := scriptindex "OverlayColor ; vardef OverlayColor = runscript mfid_OverlayColor enddef ;
-
-newinternal mfid_defaultcolormodel ; mfid_defaultcolormodel := scriptindex "defaultcolormodel" ; vardef defaultcolormodel = runscript mfid_defaultcolormodel enddef ;
-
-vardef LeftMarginWidth = if mfun_swapped and not OnRightPage : runscript mfid_RightMarginWidth else : runscript mfid_LeftMarginWidth fi enddef ;
-vardef RightMarginWidth = if mfun_swapped and not OnRightPage : runscript mfid_LeftMarginWidth else : runscript mfid_RightMarginWidth fi enddef ;
-vardef LeftMarginDistance = if mfun_swapped and not OnRightPage : runscript mfid_RightMarginDistance else : runscript mfid_LeftMarginDistance fi enddef ;
-vardef RightMarginDistance = if mfun_swapped and not OnRightPage : runscript mfid_LeftMarginDistance else : runscript mfid_RightMarginDistance fi enddef ;
-
-vardef LeftEdgeWidth = if mfun_swapped and not OnRightPage : runscript mfid_RightEdgeWidth else : runscript mfid_LeftEdgeWidth fi enddef ;
-vardef RightEdgeWidth = if mfun_swapped and not OnRightPage : runscript mfid_LeftEdgeWidth else : runscript mfid_RightEdgeWidth fi enddef ;
-vardef LeftEdgeDistance = if mfun_swapped and not OnRightPage : runscript mfid_RightEdgeDistance else : runscript mfid_LeftEdgeDistance fi enddef ;
-vardef RightEdgeDistance = if mfun_swapped and not OnRightPage : runscript mfid_LeftEdgeDistance else : runscript mfid_RightEdgeDistance fi enddef ;
-
-vardef BackSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript mfid_BackSpace enddef ;
-vardef CutSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript mfid_CutSpace enddef ;
-
-% better use:
-
-vardef OuterMarginWidth = if not OnRightPage : runscript mfid_LeftMarginWidth else : runscript mfid_RightMarginWidth fi enddef ;
-vardef InnerMarginWidth = if not OnRightPage : runscript mfid_RightMarginWidth else : runscript mfid_LeftMarginWidth fi enddef ;
-vardef OuterMarginDistance = if not OnRightPage : runscript mfid_LeftMarginDistance else : runscript mfid_RightMarginDistance fi enddef ;
-vardef InnerMarginDistance = if not OnRightPage : runscript mfid_RightMarginDistance else : runscript mfid_LeftMarginDistance fi enddef ;
-
-vardef OuterEdgeWidth = if not OnRightPage : runscript mfid_LeftEdgeWidth else : runscript mfid_RightEdgeWidth fi enddef ;
-vardef InnerEdgeWidth = if not OnRightPage : runscript mfid_RightEdgeWidth else : runscript mfid_LeftEdgeWidth fi enddef ;
-vardef OuterEdgeDistance = if not OnRightPage : runscript mfid_LeftEdgeDistance else : runscript mfid_RightEdgeDistance fi enddef ;
-vardef InnerEdgeDistance = if not OnRightPage : runscript mfid_RightEdgeDistance else : runscript mfid_LeftEdgeDistance fi enddef ;
-
-vardef OuterSpaceWidth = if not OnRightPage : runscript mfid_BackSpace else : runscript mfid_CutSpace fi enddef ;
-vardef InnerSpaceWidth = if not OnRightPage : runscript mfid_CutSpace else : runscript mfid_BackSpace fi enddef ;
-
-% indices
-
-vardef OuterMargin = if not OnRightPage : LeftMargin else : RightMargin fi enddef ;
-vardef InnerMargin = if not OnRightPage : RightMargin else : LeftMargin fi enddef ;
-
-vardef OuterEdge = if not OnRightPage : LeftEdge else : RightEdge fi enddef ;
-vardef InnerEdge = if not OnRightPage : Rightedge else : LeftEdge fi enddef ;
-
-
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-core.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-core.mpiv
deleted file mode 100644
index 0ef24e57e98..00000000000
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-core.mpiv
+++ /dev/null
@@ -1,1558 +0,0 @@
-%D \module
-%D [ file=mp-core.mpiv,
-%D version=1999.08.01, % anchoring
-%D title=\CONTEXT\ \METAPOST\ graphics,
-%D subtitle=background macros,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-if known context_core : endinput ; fi ;
-
-boolean context_core ; context_core := true ;
-
-%D Copied to here .. not used any more.
-
-if unknown NOfTextColumns : numeric NOfTextColumns ; NOfTextColumns := 1 ; fi ;
-if unknown NOfTextAreas : numeric NOfTextAreas ; NOfTextAreas := 1 ; fi ;
-
-def SaveTextAreas =
- path SavedTextAreas [] ;
- path SavedTextColumns[] ;
- numeric NOfSavedTextAreas ;
- numeric NOfSavedTextColumns ;
- for i=1 upto NOfTextAreas :
- SavedTextAreas[i] := TextAreas[i] ;
- endfor ;
- for i=1 upto NOfTextColumns :
- SavedTextColumns[i] := TextColumns[i] ;
- endfor ;
- NOfSavedTextAreas := NOfTextAreas ;
- NOfSavedTextColumns := NOfTextColumns ;
-enddef ;
-
-def ResetTextAreas =
- path TextAreas[], TextColumns[], PlainTextArea, RegionTextArea ;
- numeric NOfTextAreas ; NOfTextAreas := 0 ;
- numeric NOfTextColumns ; NOfTextColumns := 0 ;
- numeric nofmultipars ; nofmultipars := 0 ;
- TextAreas[0] := TextColumns[0] := origin -- cycle ;
-enddef ;
-
-ResetTextAreas ; SaveTextAreas ; ;
-
-def RegisterTextArea (expr x, y, w, h, d) =
- begingroup ;
- save p ; path p ;
- p := unitsquare xyscaled(w,h+d) shifted (x,y-d) ;
- if NOfTextAreas>0 :
- % if needed, concatenate areas
- if (round(llcorner TextAreas[NOfTextAreas]) = round(ulcorner p)) and
- (round(lrcorner TextAreas[NOfTextAreas]) = round(urcorner p)) :
- p :=
- ulcorner TextAreas[NOfTextAreas] --
- urcorner TextAreas[NOfTextAreas] --
- lrcorner p --
- llcorner p -- cycle ;
- else :
- NOfTextAreas := NOfTextAreas + 1 ;
- fi ;
- else :
- NOfTextAreas := NOfTextAreas + 1 ;
- fi ;
- TextAreas[NOfTextAreas] := p ;
- if NOfTextColumns>0 :
- if (round(xpart llcorner TextColumns[NOfTextColumns]) = round(xpart ulcorner p)) and
- (round(xpart lrcorner TextColumns[NOfTextColumns]) = round(xpart urcorner p)) :
- p :=
- ulcorner TextColumns[NOfTextColumns] --
- urcorner TextColumns[NOfTextColumns] --
- lrcorner p --
- llcorner p -- cycle ;
- else :
- NOfTextColumns := NOfTextColumns + 1 ;
- fi ;
- else :
- NOfTextColumns := NOfTextColumns + 1 ;
- fi ;
- TextColumns[NOfTextColumns] := p ;
- endgroup ;
-enddef ;
-
-%D We store a local area in slot zero.
-
-def RegisterPlainTextArea(expr x,y,w,h,d) =
- PlainTextArea := unitsquare xyscaled(w,h+d) shifted (x,y-d) ;
-enddef ;
-
-def RegisterRegionTextArea(expr x,y,w,h,d) =
- RegionTextArea := unitsquare xyscaled(w,h+d) shifted (x,y-d) ;
- % RegionTextArea := RegionTextArea enlarged 2mm ;
-enddef ;
-
-def RegisterLocalTextArea (expr x, y, w, h, d) =
- TextAreas[0] := TextColumns[0] := unitsquare xyscaled(w,h+d) shifted (x,y-d) ;
-enddef ;
-
-def ResetLocalTextArea =
- TextAreas[0] := TextColumns[0] := origin -- cycle ;
-enddef ;
-
-ResetLocalTextArea ;
-
-vardef InsideTextArea (expr _i_, _xy_) =
- (round(xpart _xy_) >= round(xpart llcorner TextAreas[_i_])) and
- (round(xpart _xy_) <= round(xpart lrcorner TextAreas[_i_])) and
- (round(ypart _xy_) >= round(ypart llcorner TextAreas[_i_])) and
- (round(ypart _xy_) <= round(ypart urcorner TextAreas[_i_]))
-enddef ;
-
-vardef InsideSavedTextArea (expr _i_, _xy_) =
- (round(xpart _xy_) >= round(xpart llcorner SavedTextAreas[_i_])) and
- (round(xpart _xy_) <= round(xpart lrcorner SavedTextAreas[_i_])) and
- (round(ypart _xy_) >= round(ypart llcorner SavedTextAreas[_i_])) and
- (round(ypart _xy_) <= round(ypart urcorner SavedTextAreas[_i_]))
-enddef ;
-
-vardef InsideSomeTextArea (expr _xy_) =
- save ok ; boolean ok ; ok := false ;
- for i := 1 upto NOfTextAreas :
- if InsideTextArea(i,_xy_) :
- ok := true ; % we can move the exit here
- fi ;
- exitif ok ;
- endfor ;
- ok
-enddef ;
-
-vardef InsideSomeSavedTextArea (expr _xy_) =
- save ok ; boolean ok ; ok := false ;
- for i := 1 upto NOfSavedTextAreas :
- if InsideSavedTextArea(i,_xy_) :
- ok := true ;
- fi ;
- exitif ok ;
- endfor ;
- ok
-enddef ;
-
-vardef TextAreaX (expr x) =
- numeric _TextAreaX_ ; _TextAreaX_ := 0 ;
- for i := 1 upto NOfTextAreas :
- if (round(x) >= round(xpart llcorner TextAreas[i])) and
- (round(x) <= round(xpart lrcorner TextAreas[i])) :
- _TextAreaX_ := xpart llcorner TextAreas[i] ;
- fi ;
- endfor ;
- _TextAreaX_
-enddef ;
-
-vardef TextAreaY (expr y) =
- numeric _TextAreaY_ ; _TextAreaY_ := 0 ;
- for i := 1 upto NOfTextAreas :
- if (round(y) >= round(ypart llcorner TextAreas[NOfTextAreas])) and
- (round(y) <= round(ypart ulcorner TextAreas[NOfTextAreas])) :
- _TextAreaY_ := ypart llcorner TextAreas[NOfTextAreas] ;
- fi ;
- endfor ;
- _TextAreaY_
-enddef ;
-
-vardef TextAreaXY (expr x, y) =
- pair _TextAreaXY_ ; _TextAreaXY_ := origin ;
- for i := 1 upto NOfTextAreas :
- if (round(x) >= round(xpart llcorner TextAreas[i])) and
- (round(x) <= round(xpart lrcorner TextAreas[i])) and
- (round(y) >= round(ypart llcorner TextAreas[i])) and
- (round(y) <= round(ypart ulcorner TextAreas[i])) :
- _TextAreaXY_ := llconer TextAreas[i] ;
- fi ;
- endfor ;
- _TextAreaXY_
-enddef ;
-
-vardef TextAreaW (expr x) =
- numeric _TextAreaW_ ; _TextAreaW_ := 0 ;
- for i := 1 upto NOfTextAreas :
- if (round(x) >= round(xpart llcorner TextAreas[i])) and
- (round(x) <= round(xpart lrcorner TextAreas[i])) :
- _TextAreaW_ := bbwidth(TextAreas[i]) ;
- fi ;
- endfor ;
- _TextAreaW_
-enddef ;
-
-vardef TextAreaH (expr y) =
- numeric _TextAreaH_ ; _TextAreaH_ := 0 ;
- for i := 1 upto NOfTextAreas :
- if (round(y) >= round(ypart llcorner TextAreas[i])) and
- (round(y) <= round(ypart ulcorner TextAreas[i])) :
- _TextAreaH_ := bbheight(TextAreas[i]) ;
- fi ;
- endfor ;
- _TextAreaH_
-enddef ;
-
-vardef TextAreaWH (expr x, y) =
- pair _TextAreaWH_ ; _TextAreaWH_ := origin ;
- for i := 1 upto NOfTextAreas :
- if (round(x) >= round(xpart llcorner TextAreas[i])) and
- (round(x) <= round(xpart lrcorner TextAreas[i])) and
- (round(y) >= round(ypart llcorner TextAreas[i])) and
- (round(y) <= round(ypart ulcorner TextAreas[i])) :
- _TextAreaWH_ := (bbwidth(TextAreas[i]),bbheight(TextAreas[i])) ;
- fi ;
- endfor ;
- _TextAreaWH_
-enddef ;
-
-%D Till here.
-
-pair lxy[], rxy[], cxy[], llxy[], lrxy[], ulxy[], urxy[] ;
-path pxy[] ;
-numeric hxy[], wxy[], dxy[], nxy[] ;
-
-def box_found (expr n,x,y,w,h,d) =
- not ((x=0) and (y=0) and (w=0) and (h=0) and (d=0))
-enddef ;
-
-def initialize_box_pos (expr pos,n,x,y,w,h,d) =
- pair lxy, rxy, cxy, llxy, lrxy, ulxy, urxy ;
- path pxy ; numeric hxy, wxy, dxy, nxy;
- lxy := (x,y) ;
- llxy := (x,y-d) ;
- lrxy := (x+w,y-d) ;
- urxy := (x+w,y+h) ;
- ulxy := (x,y+h) ;
- wxy := w ;
- hxy := h ;
- dxy := d ;
- rxy := lxy shifted (wxy,0) ;
- pxy := llxy--lrxy--urxy--ulxy--cycle ;
- cxy := center pxy ;
- nxy := n ;
- freeze_box(pos) ;
-enddef ;
-
-def freeze_box (expr pos) =
- lxy[pos] := lxy ;
- llxy[pos] := llxy ;
- lrxy[pos] := lrxy ;
- urxy[pos] := urxy ;
- ulxy[pos] := ulxy ;
- wxy[pos] := wxy ;
- hxy[pos] := hxy ;
- dxy[pos] := dxy ;
- rxy[pos] := rxy ;
- pxy[pos] := pxy ;
- cxy[pos] := cxy ;
- nxy[pos] := nxy ;
-enddef ;
-
-def initialize_box (expr n,x,y,w,h,d) =
- numeric bpos ; bpos := 0 ; initialize_box_pos(bpos,n,x,y,w,h,d) ;
-enddef ;
-
-def initialize_area (expr fn,fx,fy,fw,fh,fd,
- tn,tx,ty,tw,th,td) =
- numeric fpos ; fpos := 1 ; initialize_box_pos(fpos,fn,fx,fy,fw,fh,fd) ;
- numeric tpos ; tpos := 2 ; initialize_box_pos(tpos,tn,tx,ty,tw,th,td) ;
- do_initialize_area (fpos, tpos) ;
-enddef ;
-
-def do_initialize_area (expr fpos, tpos) =
- lxy := lxy[fpos] ;
- llxy := (xpart llxy[fpos], ypart llxy[tpos]) ;
- lrxy := lrxy[tpos] ;
- urxy := (xpart urxy[tpos], ypart urxy[fpos]) ;
- ulxy := ulxy[fpos] ;
- wxy := xpart lrxy - xpart llxy ;
- hxy := hxy[fpos] ;
- dxy := dxy[tpos] ;
- rxy := lxy shifted (wxy,0) ;
- pxy := llxy--lrxy--urxy--ulxy--cycle ;
- cxy := center pxy ;
-enddef ;
-
-def set_par_line_height (expr ph, pd) =
- par_strut_height := if ph>0 : ph elseif StrutHeight>0 : StrutHeight else : 8pt fi ;
- par_strut_depth := if pd>0 : pd elseif StrutDepth >0 : StrutDepth else : 3pt fi ;
- par_line_height := par_strut_height + par_strut_depth ;
-enddef ;
-
-def initialize_par (expr fn,fx,fy,fw,fh,fd,
- tn,tx,ty,tw,th,td,
- mn,mx,my,mw,mh,md,
- pn,px,py,pw,ph,pd,
- rw,rl,rr,rh,ra,ri) =
-
- numeric fpos ; fpos := 1 ; initialize_box_pos(fpos,fn,fx,fy,fw,fh,fd) ;
- numeric tpos ; tpos := 2 ; initialize_box_pos(tpos,tn,tx,ty,tw,th,td) ;
- numeric mpos ; mpos := 3 ; initialize_box_pos(mpos,mn,mx,my,mw,mh,md) ;
- numeric ppos ; ppos := 4 ; initialize_box_pos(ppos,pn,px,py,pw,ph,pd) ;
-
- numeric par_strut_height, par_strut_depth, par_line_height ;
-
- set_par_line_height (ph, pd) ;
-
- do_initialize_area (fpos, tpos) ;
- do_initialize_par (fpos, tpos, mpos, ppos, rw,rl,rr,rh,ra,ri) ;
-
-enddef ;
-
-def initialize_area_par (expr fn,fx,fy,fw,fh,fd,
- tn,tx,ty,tw,th,td,
- wn,wx,wy,ww,wh,wd) =
-
- numeric fpos ; fpos := 1 ; initialize_box_pos(fpos,fn,fx,fy,fw,fh,fd) ;
- numeric tpos ; tpos := 2 ; initialize_box_pos(tpos,tn,tx,ty,tw,th,td) ;
- numeric wpos ; wpos := 3 ; initialize_box_pos(wpos,wn,wx,wy,ww,wh,wd) ;
-
- numeric par_strut_height, par_strut_depth, par_line_height ;
-
- set_par_line_height (wh, wd) ;
-
- numeric ffpos ; ffpos := 4 ; initialize_box_pos(ffpos,wn,wx,fy,0,wh,wd) ;
- numeric ttpos ; ttpos := 5 ; initialize_box_pos(ttpos,wn,wx+ww,ty,0,wh,wd) ;
-
- do_initialize_area (ffpos, ttpos) ;
-
- numeric mpos ; mpos := 6 ; freeze_box(mpos) ;
-
- do_initialize_par (fpos, tpos, mpos, ffpos, 0,0,0,0,0,0) ;
-
-enddef ;
-
-def do_initialize_par (expr fpos, tpos, mpos, ppos, rw,rl,rr,rh,ra,ri) =
-
- pair lref, rref, pref, lhref, rhref ;
-
- % clip the page area to the left and right skips
-
- llxy[mpos] := llxy[mpos] shifted (+rl,0) ;
- lrxy[mpos] := lrxy[mpos] shifted (-rr,0) ;
- urxy[mpos] := urxy[mpos] shifted (-rr,0) ;
- ulxy[mpos] := ulxy[mpos] shifted (+rl,0) ;
-
- % fixate the leftskip, rightskip and hanging indentation
-
- lref := (xpart llxy[mpos],ypart ulxy[ppos]) ; lhref := lref shifted (rh,0) ;
- rref := (xpart lrxy[mpos],ypart urxy[ppos]) ; rhref := rref shifted (rh,0) ;
-
- pref := lxy[ppos] ;
-
- if nxy[tpos] > nxy[fpos] :
- if nxy[fpos] = nxy[mpos] :
- % first of multiple pages
- llxy[tpos] := llxy[mpos] ;
- lrxy[tpos] := lrxy[mpos] ;
- urxy[tpos] := lrxy[mpos] shifted (0,par_line_height) ;
- ulxy[tpos] := llxy[mpos] shifted (0,par_line_height) ;
- boxgriddirection := down ;
- elseif nxy[tpos] = nxy[mpos] :
- % last of multiple pages
- llxy[fpos] := ulxy[mpos] shifted (0,-par_line_height) ;
- lrxy[fpos] := urxy[mpos] shifted (0,-par_line_height) ;
- urxy[fpos] := urxy[mpos] ;
- ulxy[fpos] := ulxy[mpos] ;
- boxgriddirection := up ;
- else :
- % middle of multiple pages
- llxy[fpos] := ulxy[mpos] shifted (0,-par_line_height) ;
- lrxy[fpos] := urxy[mpos] shifted (0,-par_line_height) ;
- urxy[fpos] := urxy[mpos] ;
- ulxy[fpos] := ulxy[mpos] ;
- llxy[tpos] := llxy[mpos] ;
- lrxy[tpos] := lrxy[mpos] ;
- urxy[tpos] := lrxy[mpos] shifted (0,par_line_height) ;
- ulxy[tpos] := llxy[mpos] shifted (0,par_line_height) ;
- boxgriddirection := up ;
- fi ;
- else :
- % just one page
- boxgriddirection := up ;
- fi ;
-
- path txy, bxy, pxy, mxy ;
-
- txy := originpath ; % top
- bxy := originpath ; % bottom
- pxy := originpath ; % composed
-
- boolean lefthang, righthang, somehang ;
-
- % we only hang on the first of a multiple page background
-
- if nxy[mpos] > nxy[fpos] :
- lefthang := righthang := somehang := false ;
- else :
- lefthang := (rh>0) ; righthang := (rh<0) ; somehang := false ;
- fi ;
-
- if lefthang :
- mxy := boundingbox (lref -- lref shifted (rh,ra*par_line_height)) ;
- elseif righthang :
- mxy := boundingbox (rref -- rref shifted (rh,ra*par_line_height)) ;
- else :
- mxy := originpath ;
- fi ;
-
- if round(ypart llxy[fpos]) = round(ypart llxy[tpos]) :
-
- % We have a one-liner. Watch how er use the bottom pos for
- % determining the height.
-
- llxy[fpos] := (xpart llxy[fpos], ypart llxy[tpos]) ;
- ulxy[fpos] := (xpart ulxy[fpos], ypart ulxy[tpos]) ;
-
- else :
-
- % We have a multi-liner. For convenience we now correct the
- % begin and end points for indentation.
-
- if lefthang and (round(ypart llxy[tpos]) >= round(ypart lrcorner mxy)) :
- llxy[tpos] := (xpart lhref, ypart llxy[tpos]) ;
- ulxy[tpos] := (xpart lhref, ypart ulxy[tpos]) ;
- else :
- llxy[tpos] := (xpart lref, ypart llxy[tpos]) ;
- ulxy[tpos] := (xpart lref, ypart ulxy[tpos]) ;
- fi ;
-
- if righthang and (round(ypart lrxy[fpos]) >= round(ypart llcorner mxy)) :
- lrxy[fpos] := (xpart rhref, ypart lrxy[fpos]) ;
- urxy[fpos] := (xpart rhref, ypart urxy[fpos]) ;
- else :
- lrxy[fpos] := (xpart rref, ypart lrxy[fpos]) ;
- urxy[fpos] := (xpart rref, ypart urxy[fpos]) ;
- fi ;
-
- fi ;
-
- somehang := (ypart ulxy[fpos]>ypart llcorner mxy) and
- (ypart llxy[tpos]<ypart llcorner mxy) ;
-
- if round(ypart llxy[fpos]) = round(ypart llxy[tpos]) :
-
- % A (short) one-liner goes into the top box.
-
- txy := llxy[fpos] -- lrxy[tpos] -- urxy[tpos] -- ulxy[fpos] -- cycle ;
-
- elseif (round(ypart llxy[fpos]) = round(ypart ulxy[tpos])) and
- (round(xpart lrxy[tpos]) < round(xpart llxy[fpos])) :
-
- % We have a sentence that spans two lines but with only end
- % of line and begin of line segments. We need to take care of
- % indentation.
-
- txy := llxy[fpos] -- lrxy[fpos] -- urxy[fpos] -- ulxy[fpos] -- cycle ;
- bxy := llxy[tpos] -- lrxy[tpos] -- urxy[tpos] -- ulxy[tpos] -- cycle ;
-
- elseif (round(ypart llxy[fpos]) = round(ypart ulxy[tpos])) :
-
- % We have a sentence that spans two lines but with overlap.
-
- pxy :=
- llxy[tpos] -- lrxy[tpos] -- urxy[tpos] -- lrxy[fpos] --
- urxy[fpos] -- ulxy[fpos] -- llxy[fpos] -- ulxy[tpos] -- cycle ;
-
- elseif lefthang and somehang :
-
- % We have a sentence that spans more than two lines with
- % left hanging indentation.
-
- pxy :=
- llxy[tpos] -- lrxy[tpos] -- urxy[tpos] --
- (xpart urxy[fpos],ypart urxy[tpos]) --
- urxy[fpos] -- ulxy[fpos] -- llxy[fpos] --
- if round(ypart urxy[tpos]) < round(ypart llcorner mxy) :
- (xpart lrcorner mxy,ypart llxy[fpos]) --
- lrcorner mxy --
- (xpart llxy[tpos],ypart llcorner mxy) --
- else :
- (xpart llxy[tpos],ypart llxy[fpos]) --
- fi
- cycle ;
-
- elseif righthang and somehang :
-
- % We have a sentence that spans more than two lines with
- % right hanging indentation.
-
- pxy :=
- llxy[tpos] -- lrxy[tpos] -- urxy[tpos] --
- if round(ypart urxy[tpos]) < round(ypart llcorner mxy) :
- (xpart lrcorner mxy,ypart urxy[tpos]) --
- lrcorner mxy -- llcorner mxy --
- else :
- (xpart urxy[fpos],ypart urxy[tpos]) --
- fi
- urxy[fpos] -- ulxy[fpos] -- llxy[fpos] --
- (xpart llxy[tpos],ypart llxy[fpos]) --
- cycle ;
-
- else :
-
- % We have a sentence that spans more than two lines with
- % no hanging indentation.
-
- pxy :=
- llxy[tpos] -- lrxy[tpos] -- urxy[tpos] --
- (xpart urxy[fpos],ypart urxy[tpos]) --
- urxy[fpos] -- ulxy[fpos] -- llxy[fpos] --
- (xpart llxy[tpos],ypart llxy[fpos]) --
- cycle ;
-
- fi ;
-
- pxy := simplified pxy ;
- pxy := unspiked pxy ;
-
-enddef ;
-
-pair last_multi_par_shift ; last_multi_par_shift := origin ;
-
-def relocate_multipars (expr xy) =
- last_multi_par_shift := xy ;
- for i=1 upto nofmultipars :
- multipars[i] := multipars[i] shifted last_multi_par_shift ;
- endfor ;
-enddef ;
-
-boolean compensate_multi_par_topskip ;
-boolean span_multi_column_pars ;
-boolean auto_multi_par_hsize ;
-boolean enable_multi_par_fallback ;
-
-compensate_multi_par_topskip := true ;
-span_multi_column_pars := false ;
-auto_multi_par_hsize := false ; % true ;
-enable_multi_par_fallback := true ;
-
-vardef multi_par_at_top (expr i) =
- (round (ypart ulcorner multipars[i]) = round (ypart ulcorner (TextAreas[multirefs[i]] shifted last_multi_par_shift)))
-enddef ;
-
-numeric nofmultipars ; nofmultipars := 0 ;
-
-boolean obey_multi_par_hang ; obey_multi_par_hang := true ;
-boolean obey_multi_par_more ; obey_multi_par_more := true ;
-boolean snap_multi_par_tops ; snap_multi_par_tops := true ;
-boolean local_multi_par_area ; local_multi_par_area := false ;
-boolean use_multi_par_region ; use_multi_par_region := false ;
-boolean ignore_multi_par_page ; ignore_multi_par_page := false ;
-boolean force_multi_par_chain ; force_multi_par_chain := true ;
-boolean one_piece_multi_par ; one_piece_multi_par := false ;
-boolean check_multi_par_chain ; check_multi_par_chain := true ; % extra page check
-
-boolean multi_column_first_page_hack; multi_column_first_page_hack := true ; % seems to work ok
-
-def simplify_multi_pars = % boundingbox ipv shape als optie
- for i := 1 upto nofmultipars :
- multipars[i] := boundingbox multipars[i] ;
- endfor ;
-enddef ;
-
-def save_multipar (expr i, l, p) =
- nofmultipars := nofmultipars + 1 ;
- multirefs[nofmultipars] := i ;
- multilocs[nofmultipars] := l ;
- multipars[nofmultipars] := unspiked (simplified p) ;
-enddef ;
-
-def prepare_multi_pars (expr fn,fx,fy,fw,fh,fd,
- tn,tx,ty,tw,th,td,
- wn,wx,wy,ww,wh,wd,
- pn,px,py,pw,ph,pd,
- rw,rl,rr,rh,ra,ri) =
-
-% fill PlainTextArea withcolor red ;
-% fill RegionTextArea withcolor green;
-
- if span_multi_column_pars :
- begingroup ;
- save TextAreas ; path TextAreas[] ;
- save NOfTextAreas ; numeric NOfTextAreas ;
- for i=1 upto NOfTextColumns :
- TextAreas[i] := TextColumns[i] ;
- endfor ;
- NOfTextAreas := NOfTextColumns ;
- fi ;
-
- last_multi_par_shift := origin ;
-
-% save _tx_, _ty_, _fx_, _fy_ ;
-% if use_multi_par_region :
-% _fx_ := fx ; %min(xpart ulcorner RegionTextArea,fx) ;
-% _fy_ := fy ; %min(xpart ulcorner RegionTextArea,fy) ;
-% _tx_ := min(xpart lrcorner RegionTextArea,tx) ;
-% _ty_ := min(xpart lrcorner RegionTextArea,ty) ;
-% else :
-% _fx_ := fx ;
-% _fy_ := fy ;
-% _tx_ := tx ;
-% _ty_ := ty ;
-% fi ;
-
-% numeric fpos ; fpos := 1 ; initialize_box_pos(fpos,fn,_fx_,_fy_,fw,fh,fd) ;
-% numeric tpos ; tpos := 2 ; initialize_box_pos(tpos,tn,_tx_,_ty_,tw,th,td) ;
- numeric fpos ; fpos := 1 ; initialize_box_pos(fpos,fn,fx,fy,fw,fh,fd) ;
- numeric tpos ; tpos := 2 ; initialize_box_pos(tpos,tn,tx,ty,tw,th,td) ;
- numeric wpos ; wpos := 3 ; initialize_box_pos(wpos,wn,wx,wy,ww,wh,wd) ;
- numeric ppos ; ppos := 4 ; initialize_box_pos(ppos,pn,px,py,pw,ph,pd) ;
-
- if local_multi_par_area :
- RealPageNumber := fn ;
- NOfTextAreas := 1 ;
- NOfSavedTextAreas := 0 ;
- TextAreas[1] := TextAreas[0] ;
- TextColumns[1] := TextColumns[0] ;
- nxy[fpos] := nxy[tpos] := nxy[wpos] := nxy[ppos] := RealPageNumber ;
- elseif use_multi_par_region :
- RealPageNumber := fn ;
- NOfTextAreas := 1 ;
- NOfSavedTextAreas := 0 ;
- TextAreas[1] := RegionTextArea ;
- TextColumns[1] := RegionTextArea ;
- nxy[fpos] := nxy[tpos] := nxy[wpos] := nxy[ppos] := RealPageNumber ;
- elseif ignore_multi_par_page :
- RealPageNumber := fn ;
- nxy[fpos] := nxy[tpos] := nxy[wpos] := nxy[ppos] := RealPageNumber ;
- fi ;
-
- numeric par_strut_height, par_strut_depth, par_line_height ;
-
- set_par_line_height (ph, pd) ;
-
- numeric par_hang_indent, par_hang_after, par_indent, par_left_skip, par_right_skip ;
-
- par_hang_indent := rh ;
- par_hang_after := ra ;
- par_indent := ri ;
- par_left_skip := rl ;
- par_right_skip := rr ;
-
- pair par_start_pos ;
- pair par_stop_pos ;
-
- par_start_pos := llxy[fpos]
- if par_indent <0: shifted (-par_indent, 0) fi
- if par_left_skip<0: shifted (-par_left_skip,0) fi ;
-
- par_stop_pos := lrxy[tpos]
- if par_right_skip<0: shifted (par_right_skip,0) fi ; % nasty as the endpos can be shifted by rightskip
-
- if wxy[wpos]>0 :
- left_skip := rl + xpart llxy[wpos] - xpart llxy[ppos] ;
- right_skip := rw - left_skip - ww ;
- else :
- left_skip := rl ;
- right_skip := rr ;
- fi ;
-
- path multipar, multipars[] ;
- numeric multiref, multirefs[] ;
- numeric multiloc, multilocs[] ; % 1=begin 2=between 3=end
-
- numeric multi_par_pages ; multi_par_pages := nxy[tpos]-nxy[fpos]+1 ;
-
- % locals .. why can't i move these outside?
-
- vardef _pmp_set_multipar_ (expr i) =
- ( (TextAreas[i] leftenlarged -left_skip) rightenlarged (-right_skip
- if auto_multi_par_hsize : + rw - bbwidth(TextAreas[i]) fi) )
- enddef ;
-
- vardef _pmp_snapped_multi_pos_ (expr p) =
- if snap_multi_par_tops :
- if abs(ypart p - ypart ulcorner multipar) < par_line_height :
- (xpart p,ypart ulcorner multipar)
- else :
- p
- fi
- else :
- p
- fi
- enddef ;
-
- vardef _pmp_estimated_par_lines_ (expr h) =
- round(h/par_line_height)
- enddef ;
-
- vardef _pmp_top_multi_par_(expr p) =
- (round(_pmp_estimated_par_lines_(bbheight(p)*par_line_height))=round(bbheight(p)))
- enddef ;
-
- vardef _pmp_multi_par_tsc_(expr p) =
- if _pmp_top_multi_par_(p) : TopSkipCorrection else : 0 fi
- enddef ;
-
- vardef _pmp_estimated_multi_par_height_ (expr n, t) =
- if round(par_line_height)=0 :
- 0
- else :
- save ok, h ; boolean ok ;
- numeric h ; h := 0 ;
- ok := false ;
- if (nxy[fpos]=RealPageNumber-1) :
- for i := 1 upto NOfSavedTextAreas :
- if (InsideSavedTextArea(i,par_start_pos)) :
- ok := true ;
- h := h + _pmp_estimated_par_lines_(ypart ulxy[fpos] - ypart llcorner SavedTextAreas[i]) ;
- elseif ok :
- h := h + _pmp_estimated_par_lines_(bbheight(SavedTextAreas[i])) ;
- fi ;
- endfor ;
- fi ;
- if ok :
- for i := 1 upto n-1 :
- h := h + _pmp_estimated_par_lines_(bbheight(TextAreas[i])) ;
- endfor ;
- else :
- % already: ok := false ;
- for i := 1 upto n-1 :
- if (InsideTextArea(i,par_start_pos)) :
- ok := true ;
- h := h + _pmp_estimated_par_lines_(ypart ulxy[fpos] - ypart llcorner TextAreas[i]) ;
- elseif ok :
- h := h + _pmp_estimated_par_lines_(bbheight(TextAreas[i])) ;
- fi ;
- endfor ;
- fi ;
- h
- fi
- enddef ;
-
- vardef _pmp_left_top_hang_ (expr same_area) =
-
- par_hang_after := ra + _pmp_estimated_par_lines_(py-fy) ;
-
- if (par_hang_indent>0) and (par_hang_after<0) and obey_multi_par_hang :
- pair _ul_ ; _ul_ := (xpart ulcorner multipar, ypart _pmp_snapped_multi_pos_(ulxy[fpos]));
- pair _pa_ ; _pa_ := _ul_ shifted (0,par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_ -TopSkipCorrection,ypart llcorner multipar)) ;
- if same_area :
- _pa_ := (xpart _pa_,max(ypart _pa_ -TopSkipCorrection,ypart llxy[tpos])) ;
- fi ;
- if obey_multi_par_more and (round(par_line_height)>0) :
- par_hang_after := min(0,round(par_hang_after + (ypart urxy[fpos]-ypart _pa_)/par_line_height)) ;
- fi ;
- (xpart _ul_ + par_hang_indent, ypart lrxy[fpos]) --
- (xpart _ul_ + par_hang_indent, ypart _pa_) --
- (xpart ulcorner multipar, ypart _pa_)
- else :
- (xpart ulcorner multipar, ypart lrxy[fpos])
- fi
- enddef ;
-
- vardef _pmp_right_top_hang_ (expr same_area) =
-
- par_hang_after := ra + _pmp_estimated_par_lines_(py-fy) ;
-
- if (par_hang_indent<0) and (par_hang_after<0) and obey_multi_par_hang :
- pair _ur_ ; _ur_ := (xpart urcorner multipar, ypart _pmp_snapped_multi_pos_(urxy[fpos])) ;
- pair _pa_ ; _pa_ := _ur_ shifted (0,par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_ -TopSkipCorrection,ypart llcorner multipar)) ;
- if same_area :
- _pa_ := (xpart _pa_,max(ypart _pa_ -TopSkipCorrection,ypart _pmp_snapped_multi_pos_(ulxy[tpos]))) ;
- fi ;
- if obey_multi_par_more and (round(par_line_height)>0) :
- par_hang_after := min(0,round(par_hang_after + (ypart urxy[fpos]-ypart _pa_)/par_line_height)) ;
- fi ;
- (xpart urcorner multipar, ypart _pa_) --
- (xpart _ur_ + par_hang_indent, ypart _pa_) --
- (xpart _ur_ + par_hang_indent, ypart _pmp_snapped_multi_pos_(urxy[fpos]))
- else :
- (xpart urcorner multipar, ypart _pmp_snapped_multi_pos_(urxy[fpos]))
- fi
- enddef ;
-
- vardef _pmp_x_left_top_hang_ (expr i, t) =
- par_hang_after := min(0,ra + _pmp_estimated_multi_par_height_(i,t)) ;
- if (par_hang_indent>0) and (par_hang_after<0) :
- pair _ul_ ; _ul_ := ulcorner multipar ;
- pair _pa_ ; _pa_ := _ul_ shifted (0,par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart llcorner multipar)) ;
- if t :
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart llxy[tpos]));
- fi ;
- if abs(ypart _pa_-ypart llxy[tpos])<par_line_height :
- _pa_ := (xpart _pa_,ypart llxy[tpos]);
- fi ;
- if abs(ypart _pa_-ypart llcorner multipar)<par_line_height :
- _pa_ := (xpart _pa_,ypart llcorner multipar);
- fi ;
- (xpart _ul_, ypart _pa_) --
- (xpart _ul_ + par_hang_indent, ypart _pa_) --
- (xpart _ul_ + par_hang_indent, ypart _ul_)
- else :
- ulcorner multipar
- fi
- enddef ;
-
- vardef _pmp_x_right_top_hang_ (expr i, t) =
- par_hang_after := min(0,ra + _pmp_estimated_multi_par_height_(i,t)) ;
- if (par_hang_indent<0) and (par_hang_after<0) :
- pair _ur_ ; _ur_ := urcorner multipar ;
- pair _pa_ ; _pa_ := _ur_ shifted (0,par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart lrcorner multipar)) ;
- if t :
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart _pmp_snapped_multi_pos_(urxy[tpos]))) ;
- fi ;
- (xpart _ur_ + par_hang_indent, ypart _ur_) --
- (xpart _ur_ + par_hang_indent, ypart _pa_) --
- (xpart _ur_, ypart _pa_)
- else :
- urcorner multipar
- fi
- enddef ;
-
- vardef _pmp_left_bottom_hang_ (expr same_area) =
- pair _ll_, _sa_, _pa_ ;
- _sa_ := if same_area : llxy[tpos] else : lrcorner multipar fi ;
- if (par_hang_indent>0) and (par_hang_after>0) and obey_multi_par_hang :
- _ll_ := (xpart ulcorner multipar, ypart _pmp_snapped_multi_pos_(ulxy[fpos])) ;
- _pa_ := _ll_ shifted (0,-par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart llcorner multipar)) ;
- if same_area :
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart _sa_)) ;
- fi ;
- if obey_multi_par_more and (round(par_line_height)>0) :
- par_hang_after := max(0,round(par_hang_after - (ypart urxy[fpos]-ypart _pa_)/par_line_height)) ;
- fi ;
- _pa_ --
- (xpart _pa_ + par_hang_indent,ypart _pa_) --
- (xpart _pa_ + par_hang_indent,ypart _sa_)
- else :
- (xpart llcorner multipar, ypart _sa_)
- fi
- enddef ;
-
- vardef _pmp_right_bottom_hang_ (expr same_area) =
- pair _lr_, _sa_, _pa_ ;
- _sa_ := if same_area : _pmp_snapped_multi_pos_(ulxy[tpos]) else : lrcorner multipar fi ;
- if (par_hang_indent<0) and (par_hang_after>0) and obey_multi_par_hang :
- _lr_ := (xpart urcorner multipar, ypart _pmp_snapped_multi_pos_(urxy[fpos])) ;
- _pa_ := _lr_ shifted (0,-par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart lrcorner multipar)) ;
- if same_area :
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart _pmp_snapped_multi_pos_(ulxy[tpos]))) ;
- fi ;
- if obey_multi_par_more and (round(par_line_height)>0) :
- par_hang_after := max(0,round(par_hang_after - (ypart urxy[fpos]-ypart _pa_)/par_line_height)) ;
- fi ;
- (xpart _pa_ + par_hang_indent,ypart _sa_) --
- (xpart _pa_ + par_hang_indent,ypart _pa_) --
- _pa_
- else :
- (xpart lrcorner multipar, ypart _sa_)
- fi
- enddef ;
-
- vardef _pmp_x_left_bottom_hang_ (expr i, t) =
- pair _ll_, _sa_, _pa_ ;
- _sa_ := if t : llxy[tpos] else : llcorner multipar fi ;
- if (par_hang_indent>0) and (ra>0) :
- par_hang_after := max(0,ra - _pmp_estimated_multi_par_height_(i,t)) ;
- _ll_ := ulcorner multipar ;
- _pa_ := _ll_ shifted (0,-par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart llcorner multipar)) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart _sa_)) ;
- % we need to compensate for topskip enlarged areas
- if abs(ypart _pa_ - ypart _sa_) > par_line_height :
- (xpart _pa_ + par_hang_indent,ypart _sa_) --
- (xpart _pa_ + par_hang_indent,ypart _pa_) --
- fi
- _pa_
- else :
- (xpart llcorner multipar, ypart _sa_)
- fi
- enddef ;
-
- vardef _pmp_x_right_bottom_hang_ (expr i, t) =
- pair _lr_, _sa_, _pa_ ;
- _sa_ := if t : _pmp_snapped_multi_pos_(ulxy[tpos]) else : llcorner multipar fi ;
- if (par_hang_indent<0) and (ra>0) :
- par_hang_after := max(0,ra - _pmp_estimated_multi_par_height_(i, t)) ;
- _lr_ := urcorner multipar ;
- _pa_ := _lr_ shifted (0,-par_hang_after*par_line_height) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart lrcorner multipar)) ;
- _pa_ := (xpart _pa_,max(ypart _pa_,ypart _sa_)) ;
- % we need to compensate for topskip enlarged areas
- _pa_
- if abs(ypart _pa_ - ypart _sa_) > par_line_height :
- -- (xpart _pa_ + par_hang_indent,ypart _pa_)
- -- (xpart _pa_ + par_hang_indent,ypart _sa_)
- fi
- else :
- (xpart lrcorner multipar, ypart _sa_)
- fi
- enddef ;
-
- % def _pmp_test_multipar_ =
- % multipar := boundingbox multipar ;
- % enddef ;
-
- % first loop
-
- ii := 0 ; nn := NOfTextAreas+1 ; nofmultipars := 0 ;
-
- if enable_multi_par_fallback and (nxy[fpos]=RealPageNumber)
- and (nxy[tpos]=RealPageNumber) and not (InsideSomeTextArea(lxy[fpos]) and InsideSomeTextArea(rxy[tpos])) :
-
- % fallback
-
- % multipar :=
- % llxy[fpos] --
- % lrxy[tpos] --
- % urxy[tpos] --
- % ulxy[fpos] -- cycle ;
- %
- % save_multipar (1,1,multipar) ;
-
- % we need to take the boundingbox because there can be
- % more lines and we want a proper rectange
-
- multipar :=
- ulxy[fpos] --
- urxy[tpos] --
- lrxy[fpos] --
- llxy[tpos] -- cycle ;
-
- save_multipar (1,1,boundingbox(multipar)) ;
-
- else :
-
- % normal
-
- for i=1 upto NOfTextAreas :
-
- TopSkipCorrection := 0 ;
-
- multipar := _pmp_set_multipar_(i) ;
-
- % watch how we compensate for negative indentation
-
- if (nxy[fpos]=RealPageNumber) and (InsideTextArea(i,par_start_pos)) :
-
- % first one in chain
-
- ii := i ;
-
- if (nxy[tpos]=RealPageNumber) and (InsideTextArea(i,par_stop_pos)) :
-
- % in same area
-
- nn := i ;
-
- if compensate_multi_par_topskip and (round(LineHeight-ph-pd)=0) :
-
- TopSkipCorrection := TopSkip - StrutHeight ;
-
- if round(ypart ulxy[fpos] + TopSkipCorrection) = round(ypart ulcorner TextAreas[i]) :
- ulxy[fpos] := ulxy[fpos] shifted (0,TopSkipCorrection) ;
- urxy[fpos] := urxy[fpos] shifted (0,TopSkipCorrection) ;
- else :
- TopSkipCorrection := 0 ;
- fi ;
-
- fi ;
-
- if ypart llxy[fpos] = ypart llxy[tpos] :
-
- multipar :=
- llxy[fpos] --
- lrxy[tpos] --
- _pmp_snapped_multi_pos_(urxy[tpos]) --
- _pmp_snapped_multi_pos_(ulxy[fpos]) --
- cycle ;
-
- save_multipar (i,1,multipar) ;
-
- elseif (ypart llxy[fpos] = ypart ulxy[tpos]) and (xpart llxy[tpos] < xpart llxy[fpos]) :
-
- % two loners
-
- multipar := if obey_multi_par_hang :
-
- _pmp_right_bottom_hang_(true) --
- _pmp_right_top_hang_(true) --
- _pmp_snapped_multi_pos_(urxy[fpos]) --
- lrxy[fpos] --
-
- else :
-
- llxy[fpos] --
- (xpart urcorner multipar, ypart llxy[fpos]) --
- (xpart urcorner multipar, ypart ulxy[fpos]) --
- _pmp_snapped_multi_pos_(ulxy[fpos]) --
-
- fi cycle ;
-
- save_multipar (i,1,multipar) ;
-
- multipar := _pmp_set_multipar_(i) ;
-
- multipar := if obey_multi_par_hang :
-
- _pmp_left_bottom_hang_(true) --
- llxy[tpos] --
- _pmp_snapped_multi_pos_(ulxy[tpos]) --
- _pmp_left_top_hang_(true) --
-
- else :
-
- (xpart llcorner multipar, ypart llxy[tpos]) --
- llxy[tpos] --
- _pmp_snapped_multi_pos_(ulxy[tpos]) --
- (xpart llcorner multipar, ypart ulxy[tpos]) --
-
- fi cycle ;
-
- save_multipar (i,1,multipar) ;
-
- else :
-
- multipar := if obey_multi_par_hang :
-
- _pmp_left_bottom_hang_(true) --
- llxy[tpos] --
- _pmp_snapped_multi_pos_(ulxy[tpos]) --
- _pmp_right_bottom_hang_(true) --
- _pmp_right_top_hang_(true) --
- _pmp_snapped_multi_pos_(urxy[fpos]) --
- lrxy[fpos] --
- _pmp_left_top_hang_(true) --
-
- else :
-
- (xpart llcorner multipar, ypart llxy[tpos]) --
- llxy[tpos] --
- _pmp_snapped_multi_pos_(ulxy[tpos]) --
- (xpart lrcorner multipar, ypart ulxy[tpos]) --
- (xpart urcorner multipar, ypart urxy[fpos]) --
- _pmp_snapped_multi_pos_(urxy[fpos]) --
- lrxy[fpos] --
- (xpart ulcorner multipar, ypart lrxy[fpos]) --
-
- fi cycle ;
-
- save_multipar (i,1,multipar) ;
-
- fi ;
-
- else :
-
- multipar := if obey_multi_par_hang :
-
- _pmp_left_bottom_hang_(false) --
- _pmp_right_bottom_hang_(false) --
- _pmp_right_top_hang_(false) --
- _pmp_snapped_multi_pos_(urxy[fpos]) --
- lrxy[fpos] --
- _pmp_left_top_hang_(false) --
-
- else :
-
- llcorner multipar --
- lrcorner multipar --
- (xpart urcorner multipar, ypart urxy[fpos]) --
- _pmp_snapped_multi_pos_(urxy[fpos]) --
- lrxy[fpos] --
- (xpart ulcorner multipar, ypart lrxy[fpos]) --
-
- fi cycle ;
-
- save_multipar (i,1,multipar) ;
-
- fi ;
-
- elseif (nxy[tpos]=RealPageNumber) and (InsideTextArea(i,par_stop_pos)) :
-
- % last one in chain
-
- nn := i ;
-
- if obey_multi_par_hang and obey_multi_par_more :
-
- multipar :=
- _pmp_x_left_top_hang_(i,true) --
- _pmp_x_right_top_hang_(i,true) --
- _pmp_x_right_bottom_hang_(i,true) --
- _pmp_snapped_multi_pos_(ulxy[tpos]) --
- llxy[tpos] --
- _pmp_x_left_bottom_hang_(i,true) --
- cycle ;
-
- else :
-
- multipar :=
- ulcorner multipar --
- urcorner multipar --
- (xpart lrcorner multipar, ypart urxy[tpos]) --
- _pmp_snapped_multi_pos_(ulxy[tpos]) --
- llxy[tpos] --
- (xpart llcorner multipar, ypart llxy[tpos]) --
- cycle ;
-
- fi ;
-
- save_multipar (i,3,multipar) ;
-
- elseif multi_column_first_page_hack and ((nxy[fpos]=RealPageNumber) and (nxy[tpos]>=RealPageNumber) and (NOfTextColumns>1)) :
-
- save_multipar (i,2,multipar) ;
-
- else :
- % handled later
- fi ;
-
- endfor ;
-
-
- % second loop
-
- if force_multi_par_chain or (ii > 1) :
-
- for i=ii+1 upto nn-1 :
-
- % rest of chain / todo : hang
-
- % hm, the second+ column in column sets now gets lost in a NOfTextColumns
-
- if (not check_multi_par_chain) or ((nxy[fpos]<RealPageNumber) and (nxy[tpos]>RealPageNumber)) :
-
- multipar := _pmp_set_multipar_(i) ;
-
- if obey_multi_par_hang and obey_multi_par_more :
-
- multipar :=
- _pmp_x_left_top_hang_(i,false) --
- _pmp_x_right_top_hang_(i,false) --
- _pmp_x_right_bottom_hang_(i,false) --
- _pmp_x_left_bottom_hang_(i,false) --
- cycle ;
-
- fi ;
-
- save_multipar(i,2,multipar) ;
-
- fi ;
-
- endfor ;
-
- fi ;
-
- % end of normal/fallback
-
- fi ;
-
- if span_multi_column_pars :
- endgroup ;
- fi ;
-
- % potential safeguard:
-
- % for i=1 upto nofmultipars :
- % if length p <= 4 :
- % multipars[i] := boundingbox(multipars[i]) ;
- % fi ;
- % end ;
-
- % quick hack for gb:
-
- one_piece_multi_par := (nofmultipars=1) and (pn=tn) ;
-
-enddef ;
-
-def boxgridoptions = withcolor .8red enddef ;
-def boxlineoptions = withcolor .8blue enddef ;
-def boxfilloptions = withcolor .8white enddef ;
-
-numeric boxgridtype ; boxgridtype := 0 ;
-numeric boxlinetype ; boxlinetype := 1 ;
-numeric boxfilltype ; boxfilltype := 1 ;
-numeric boxdashtype ; boxdashtype := 0 ;
-pair boxgriddirection ; boxgriddirection := up ;
-numeric boxgridwidth ; boxgridwidth := 1pt ;
-numeric boxlinewidth ; boxlinewidth := 1pt ;
-numeric boxlineradius ; boxlineradius := 0pt ;
-numeric boxfilloffset ; boxfilloffset := 0pt ;
-numeric boxgriddistance ; boxgriddistance := .5cm ;
-numeric boxgridshift ; boxgridshift := 0pt ;
-
-% def draw_box =
-% draw pxy boxlineoptions withpen pencircle scaled boxlinewidth ;
-% draw lxy -- rxy boxlineoptions withpen pencircle scaled boxgridwidth ;
-% enddef ;
-
-def draw_par = % 1 2 3 11 12
- do_draw_par(pxy) ; do_draw_par(txy) ; do_draw_par(bxy) ;
- for i = pxy, txy, bxy :
- if boxgridtype = 1 :
- boxgriddirection := origin ;
- draw baseline_grid (i,boxgriddirection,true ) boxgridoptions ;
- elseif boxgridtype = 2 :
- boxgriddirection := origin ;
- draw baseline_grid (i,boxgriddirection,false) boxgridoptions ;
- elseif boxgridtype = 3 :
- boxgriddirection := origin ;
- draw baseline_grid (i,boxgriddirection,true ) boxgridoptions ;
- draw baseline_grid (i,boxgriddirection,true ) shifted (0,ExHeight) boxgridoptions ;
- elseif boxgridtype = 4 :
- boxgriddirection := origin ;
- draw baseline_grid (i,boxgriddirection,true ) shifted (0,ExHeight/2) boxgridoptions ;
- elseif boxgridtype = 11 :
- draw graphic_grid(i,boxgriddistance,boxgriddistance,boxgriddistance/2,boxgriddistance/2) ;
- elseif boxgridtype = 12 :
- draw graphic_grid(i,boxgriddistance,boxgriddistance,0,0) ;
- fi ;
- endfor ;
-enddef ;
-
-def do_show_par (expr p, r, c) =
- if length(p) > 2 :
- for i=0 upto length(p) :
- draw fullcircle scaled r shifted point i of p withpen pencircle scaled .5pt withcolor c ;
- endfor ;
- fi ;
- draw p withpen pencircle scaled .5pt withcolor c ;
-enddef ;
-
-def show_par =
- if length(mxy) > 2 :
- draw mxy dashed evenly withpen pencircle scaled .5pt withcolor .5white ;
- fi ;
- do_show_par(txy, 4pt, .5green) ;
- do_show_par(bxy, 6pt, .5blue ) ;
- do_show_par(pxy, 8pt, .5red ) ;
- draw pref withpen pencircle scaled 2pt ;
-enddef ;
-
-def sort_multi_pars =
- if nofmultipars>1 :
- begingroup ;
- save _p_, _n_ ; path _p_ ; numeric _n_ ;
- for i := 1 upto nofmultipars :
- if multilocs[i] = 3 :
- _p_ := multipars[nofmultipars] ;
- multipars[nofmultipars] := multipars[i] ;
- multipars[i] := _p_ ;
- _n_ := multirefs[nofmultipars] ;
- multirefs[nofmultipars] := multirefs[i] ;
- multirefs[i] := _n_ ;
- _n_ := multilocs[nofmultipars] ;
- multilocs[nofmultipars] := multilocs[i] ;
- multilocs[i] := _n_ ;
- fi ;
- endfor ;
- endgroup ;
- fi ;
-enddef ;
-
-def collapse_multi_pars =
- if nofmultipars>1 :
- begingroup ;
- save _nofmultipars_ ; numeric _nofmultipars_ ;
- _nofmultipars_ := 1 ;
- sort_multi_pars ; % block not in order: 1, 3, 2....
- for i:=1 upto nofmultipars-1 :
- if (round(xpart(llcorner multipars[i]-llcorner multipars[i+1]))=0) and
- (round(xpart(lrcorner multipars[i]-lrcorner multipars[i+1]))=0) :
- multilocs[_nofmultipars_] := multilocs[i+1] ;
- multirefs[_nofmultipars_] := multirefs[i+1] ;
- multipars[_nofmultipars_] :=
- ulcorner multipars[_nofmultipars_] --
- urcorner multipars[_nofmultipars_] --
- lrcorner multipars[i+1] --
- llcorner multipars[i+1] -- cycle ;
- else :
- _nofmultipars_ := _nofmultipars_ + 1 ;
- multipars[_nofmultipars_] := multipars[i+1] ;
- multilocs[_nofmultipars_] := multilocs[i+1] ;
- multirefs[_nofmultipars_] := multirefs[i+1] ;
- fi ;
- endfor ;
- nofmultipars := _nofmultipars_ ;
- endgroup ;
- fi ;
-enddef ;
-
-def draw_multi_pars =
- for i=1 upto nofmultipars :
- do_draw_par(multipars[i]) ;
- if boxgridtype= 1 :
- draw baseline_grid (multipars[i],if multilocs[i]=1: down else: up fi,true) ;
- elseif boxgridtype= 2 :
- draw baseline_grid (multipars[i],if multilocs[i]=1: down else: up fi,false) ;
- elseif boxgridtype= 3 :
- draw baseline_grid (multipars[i],if multilocs[i]=1: down else: up fi,true) ;
- draw baseline_grid (multipars[i],if multilocs[i]=1: down else: up fi,true) shifted (0,ExHeight) ;
- elseif boxgridtype= 4 :
- draw baseline_grid (multipars[i],if multilocs[i]=1: down else: up fi,true) shifted (0,ExHeight/2) ;
- elseif boxgridtype=11 :
- draw graphic_grid(multipars[i],boxgriddistance,boxgriddistance,boxgriddistance/2,boxgriddistance/2) ;
- elseif boxgridtype=12 :
- draw graphic_grid(multipars[i],boxgriddistance,boxgriddistance,0,0) ;
- fi ;
- endfor ;
-enddef ;
-
-def show_multi_pars =
- for i=1 upto nofmultipars :
- do_show_par(multipars[i], 6pt, .5blue) ;
- endfor ;
-enddef ;
-
-vardef do_draw_par (expr p) =
- if (length p>2) and (bbwidth(p)>1) and (bbheight(p)>1) :
- save pp ; path pp ;
- if (boxlineradius>0) and (boxlinetype=2) :
- pp := p cornered boxlineradius ;
- else :
- pp := p ;
- fi ;
- if boxfilltype>0 :
- if boxfilloffset>0 :
- % temporary hack
- begingroup ;
- interim linejoin := mitered ;
- filldraw pp boxfilloptions withpen pencircle scaled (2*boxfilloffset) ;
- endgroup ;
- else :
- fill pp boxfilloptions ;
- fi ;
- fi ;
- if boxlinetype>0 :
- draw pp boxlineoptions withpen pencircle scaled boxlinewidth ;
- fi ;
- fi ;
-enddef ;
-
-vardef baseline_grid (expr pxy, pdir, at_baseline) =
- save width ; width := bbwidth(pxy) ;
- save height ; height := bbheight(pxy) ;
- if (par_line_height>0) and (height>1) and (width>1) and (boxgridwidth>0) :
- save i, grid, bb ; picture grid ; pair start ; path bb ;
- def _do_ (expr start) =
- % 1 = normal, 2 = with background (i.e. no shine-through)
- if boxdashtype = 2 :
- draw start -- start shifted (width,0)
- withpen pencircle scaled boxgridwidth
- boxfilloptions ;
- fi ;
- draw start -- start shifted (width,0)
- if boxdashtype > 0 :
- dashed evenly
- fi
- withpen pencircle scaled boxgridwidth
- boxgridoptions ;
- enddef ;
- grid := image ( % fails with inlinespace
- if pdir=up :
- for i = if at_baseline : par_strut_depth else : 0 fi step par_line_height until max(height,par_line_height) :
- _do_ (llcorner pxy shifted (0,+i)) ;
- endfor ;
- else :
- for i = if at_baseline : par_strut_height else : 0 fi step par_line_height until height :
- _do_ (ulcorner pxy shifted (0,-i)) ;
- endfor ;
- fi ;
- ) ;
- clip grid to pxy ;
- bb := boundingbox grid ;
- grid := grid shifted (0,boxgridshift) ;
- setbounds grid to bb ;
- grid
- else :
- nullpicture
- fi
-enddef ;
-
-vardef graphic_grid (expr pxy, dx, dy, x, y) =
- if (bbheight(pxy)>dy) and (bbwidth(pxy)>dx) and (boxgridwidth>0) :
- save grid ; picture grid ;
- grid := image (
- for i = xpart llcorner pxy step dx until xpart lrcorner pxy :
- draw (i,ypart llcorner pxy) -- (i,ypart ulcorner pxy) withpen pencircle scaled boxgridwidth ;
- endfor ;
- for i = ypart llcorner pxy step dy until ypart ulcorner pxy :
- draw (xpart llcorner pxy,i) -- (xpart lrcorner pxy,i) withpen pencircle scaled boxgridwidth ;
- endfor
- ) shifted (x,y) ;
- clip grid to pxy ;
- grid
- else :
- nullpicture
- fi
-enddef ;
-
-def anchor_box (expr n,x,y,w,h,d) =
- currentpicture := currentpicture shifted (-x,-y) ;
-enddef ;
-
-let draw_area = draw_box ;
-let anchor_area = anchor_box ;
-let anchor_par = anchor_box ;
-
-numeric sync_n[], sync_p[][], sync_w[][], sync_h[][], sync_d[][], sync_t[][] ;
-pair sync_xy[][] ; color sync_c[][] ;
-
-def ResetSyncTasks =
- path SyncPaths[] ; numeric SyncTasks[], NOfSyncPaths, CurrentSyncClass ;
- NOfSyncPaths := CurrentSyncClass := 0 ;
- if unknown SyncLeftOffset : numeric SyncLeftOffset ; SyncLeftOffset := 0 ; fi ;
- if unknown SyncWidth : numeric SyncWidth ; SyncWidth := 0 ; fi ;
- if unknown SyncThreshold : numeric SyncThreshold ; SyncThreshold := LineHeight ; fi ;
- if unknown SyncColor : color SyncColor ; SyncColor := .5white ; fi ;
- if (SyncLeftOffset = 0) and (SyncWidth = 0) :
- SyncWidth := if known TextWidth : TextWidth else : -1cm fi ;
- fi ;
-enddef ;
-
-ResetSyncTasks ;
-
-vardef SyncBox(expr n, i, leftoffset, width, topoffset, bottomoffset) =
- save o ; pair o ; o := (xpart llcorner PlainTextArea,ypart sync_xy[n][i]) ;
- o shifted (leftoffset,sync_h[n][i]+topoffset) --
- o shifted (width+leftoffset,sync_h[n][i]+topoffset) --
- o shifted (width+leftoffset,bottomoffset) --
- o shifted (leftoffset,bottomoffset) -- cycle
-enddef ;
-
-def SetSyncColor(expr n, i, c) =
- sync_c[n][i] := c ;
-enddef ;
-
-def SetSyncThreshold(expr n, i, th) =
- sync_th[n][i] := th ;
-enddef ;
-
-vardef TheSyncColor(expr n, i) =
- if known sync_c[n][i] : sync_c[n][i] else : SyncColor fi
-enddef ;
-
-vardef TheSyncThreshold(expr n, i) =
- if known sync_th[n][i] : sync_th[n][i] else : SyncThreshold fi
-enddef ;
-
-vardef PrepareSyncTasks(expr n, collapse, extendtop, prestartnext) =
- ResetSyncTasks ;
- if known sync_n[n] :
- CurrentSyncClass := n ;
- save ok, l, d ; boolean ok ; ok := false ; NOfSyncPaths := l := 0 ;
- for i=1 upto sync_n[n] :
- if RealPageNumber > sync_p[n][i] :
- l := i ;
- elseif RealPageNumber = sync_p[n][i] :
- NOfSyncPaths := NOfSyncPaths + 1 ;
- if not ok :
- if i>1 :
- if sync_t[n][i-1] = sync_t[n][i] :
- SyncPaths[NOfSyncPaths] := SyncBox(n, i, SyncLeftOffset, SyncWidth, PaperHeight, -PaperHeight) ;
- SyncTasks[NOfSyncPaths] := i ;
- else :
- SyncPaths[NOfSyncPaths] := SyncBox(n, i-1, SyncLeftOffset, SyncWidth, PaperHeight, -PaperHeight) ;
- SyncTasks[NOfSyncPaths] := i-1 ;
- NOfSyncPaths := NOfSyncPaths + 1 ;
- SyncPaths[NOfSyncPaths] := SyncBox(n, i, SyncLeftOffset, SyncWidth, 0, -PaperHeight) ;
- SyncTasks[NOfSyncPaths] := i ;
- fi ;
- else :
- SyncPaths[NOfSyncPaths] := SyncBox(n, i, SyncLeftOffset, SyncWidth, 0, -PaperHeight) ;
- SyncTasks[NOfSyncPaths] := i ;
- fi ;
- else :
- SyncPaths[NOfSyncPaths] := SyncBox(n, i, SyncLeftOffset, SyncWidth, 0, -PaperHeight) ;
- SyncTasks[NOfSyncPaths] := i ;
- fi ;
- ok := true ;
- fi ;
- endfor ;
- if (NOfSyncPaths = 0) and (l > 0) :
- NOfSyncPaths := 1 ;
- SyncPaths[NOfSyncPaths] := SyncBox(n, l, SyncLeftOffset, SyncWidth, PaperHeight, -PaperHeight) ;
- SyncTasks[NOfSyncPaths] := l ;
- fi ;
- if NOfSyncPaths > 0 :
- for i = 1 upto NOfSyncPaths-1 :
- SyncPaths[i] := topboundary SyncPaths[i] -- reverse topboundary SyncPaths[i+1] -- cycle ;
- endfor ;
- if unknown SyncThresholdMethod :
- numeric SyncThresholdMethod ; SyncThresholdMethod := 2 ;
- fi ;
- if extendtop :
- if SyncThresholdMethod = 1 :
- if NOfSyncPaths>1 :
- d := ypart (ulcorner PlainTextArea - sync_xy[n][SyncTasks[2]]) ;
- if (SyncTasks[2]>1) and (d > 0pt) and (d <= TheSyncThreshold(n,sync_t[n][SyncTasks[2]])) and (sync_p[n][SyncTasks[2]] = RealPageNumber) :
- SyncPaths[2] := SyncPaths[2] topenlarged PaperHeight ;
- fi ;
- fi ;
- else :
- for i = 1 upto NOfSyncPaths :
- d := ypart (ulcorner PlainTextArea - sync_xy[n][SyncTasks[i]]) ;
- if (d > 0) and (d <= TheSyncThreshold(n,sync_t[n][SyncTasks[i]])) and (sync_p[n][SyncTasks[i]] = RealPageNumber) :
- SyncPaths[i] := SyncPaths[i] topenlarged PaperHeight ;
- fi ;
- endfor ;
- fi ;
- fi ;
- if prestartnext :
- if NOfSyncPaths>1 :
- if SyncTasks[NOfSyncPaths] < sync_n[n] : % there is a next one
- d := ypart (ulcorner PlainTextArea - sync_xy[n][SyncTasks[NOfSyncPaths]+1]) ;
- if (d > 0) and (d <= TheSyncThreshold(n, sync_t[n][SyncTasks[i]])) and (sync_p[n][SyncTasks[NOfSyncPaths]+1] = RealPageNumber+1) :
- SyncPaths[NOfSyncPaths+1] :=
- (xpart ulcorner SyncPaths[NOfSyncPaths],ypart llcorner PlainTextArea) --
- (xpart urcorner SyncPaths[NOfSyncPaths],ypart llcorner PlainTextArea) --
- lrcorner SyncPaths[NOfSyncPaths] --
- llcorner SyncPaths[NOfSyncPaths] -- cycle ;
- SyncTasks[NOfSyncPaths+1] := SyncTasks[NOfSyncPaths]+1 ;
- NOfSyncPaths := NOfSyncPaths + 1 ;
- fi ;
- fi ;
- fi ;
- else :
- if NOfSyncPaths>1 :
- d := ypart (sync_xy[n][SyncTasks[NOfSyncPaths]] - llcorner PlainTextArea) ;
- if (d < TheSyncThreshold(n, SyncTasks[NOfSyncPaths])) :
- NOfSyncPaths := NOfSyncPaths - 1 ;
- SyncPaths[NOfSyncPaths] := SyncPaths[NOfSyncPaths] bottomenlarged PaperHeight ;
- fi ;
- fi ;
- fi ;
- if (NOfSyncPaths>1) and collapse :
- save j ; numeric j ; j := 1 ;
- for i = 2 upto NOfSyncPaths :
- if sync_t[n][SyncTasks[i]] = sync_t[n][SyncTasks[j]] :
- SyncPaths[j] := boundingbox image (draw SyncPaths[i] ; draw SyncPaths[j] ; ) ;
- SyncTasks[j] := SyncTasks[i] ;
- else :
- j := j + 1 ;
- SyncPaths[j] := SyncPaths[i] ;
- SyncTasks[j] := SyncTasks[i] ;
- fi ;
- endfor ;
- NOfSyncPaths := j ;
- fi ;
- fi ;
- fi ;
-enddef ;
-
-def SyncTask(expr n) =
- if known SyncTasks[n] : SyncTasks[n] else : 0 fi
-enddef ;
-
-def FlushSyncTasks =
- for i = 1 upto NOfSyncPaths :
- ProcessSyncTask(SyncPaths[i], TheSyncColor(CurrentSyncClass,sync_t[CurrentSyncClass][SyncTasks[i]])) ;
- endfor ;
-enddef ;
-
-def ProcessSyncTask(expr p, c) =
- fill p withcolor c ;
-enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-grap.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-grap.mpiv
index 0299c0587a1..2288307e4e1 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-grap.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-grap.mpiv
@@ -24,6 +24,10 @@ if numbersystem <> "double" :
endinput ;
fi
+if known contextlmtxmode :
+ def _op_ = base_draw_options enddef ;
+fi ;
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% $Id : graph.mp,v 1.2 2004/09/19 21 :47 :10 karl Exp $
@@ -102,17 +106,23 @@ vardef logten primary x =
else: mlog(abs x)/mlog(10) fi
enddef ;
-vardef ln primary x =
- if unknown x: whatever
- elseif x=0: Mzero
- else: mlog(abs x)/256 fi
-enddef ;
+if known contextlmtxmode :
+ % already defined
+else :
-vardef exp primary x =
- if unknown x: whatever
- elseif x<= Mzero: 0
- else: (mexp 256)**x fi
-enddef ;
+ vardef ln primary x =
+ if unknown x: whatever
+ elseif x=0: Mzero
+ else: mlog(abs x)/256 fi
+ enddef ;
+
+ vardef exp primary x =
+ if unknown x: whatever
+ elseif x<= Mzero: 0
+ else: (mexp 256)**x fi
+ enddef ;
+
+fi
vardef powten primary x =
if unknown x: whatever
@@ -1151,7 +1161,9 @@ enddef ;
% We format in luatex (using \mathematics{}) ...
% we could pass via variables and save escaping as that is inefficient
-if unknown context_mlib :
+if known contextlmtxmode :
+% already defined
+elseif unknown context_mlib :
vardef escaped_format(expr s) =
"" for n=0 upto length(s) : &
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpiv
index 57937c0c162..2b1266a6cd6 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpiv
@@ -149,6 +149,11 @@ def setdimen(expr k,v) = lua.mp._set_dimen_(k,v) enddef ;
def setcount(expr k,v) = lua.mp._set_count_(k,v) enddef ;
def settoks (expr k,v) = lua.mp._set_toks_ (k,v) enddef ;
+def setglobalmacro(expr k,v) = lua.mp._set_global_macro_(k,v) enddef ;
+def setglobaldimen(expr k,v) = lua.mp._set_global_dimen_(k,v) enddef ;
+def setglobalcount(expr k,v) = lua.mp._set_global_count_(k,v) enddef ;
+def setglobaltoks (expr k,v) = lua.mp._set_global_toks_ (k,v) enddef ;
+
vardef positionpath (expr name) = lua.mp.positionpath (name) enddef ;
vardef positioncurve (expr name) = lua.mp.positioncurve (name) enddef ;
vardef positionxy (expr name) = lua.mp.positionxy (name) enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpxl b/Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpxl
deleted file mode 100644
index 421e82946d0..00000000000
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-luas.mpxl
+++ /dev/null
@@ -1,250 +0,0 @@
-%D \module
-%D [ file=mp-luas.mpiv,
-%D version=2014.04.14,
-%D title=\CONTEXT\ \METAPOST\ graphics,
-%D subtitle=\LUA,
-%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.
-
-if known context_luas : endinput ; fi ;
-
-% When I prototyped the runscript primitive I was just thinking of a usage like
-% the original \directlua primitive in luatex: genererate something and pipe
-% that back to metapost, and have access to some internals. Instead of compiling
-% the code a the metapost end here we delegate that to the lua end. Only strings
-% get passed. Of course in the end the real usage got a bit beyong the intended
-% usage. So, in addition to some definitions here there are and will be use in
-% other metafun modules too. Of course in retrospect I should have done this five
-% years earlier.
-
-boolean context_luas ; context_luas := true ;
-
-newinternal mfid_scriptindex ;
-mfid_scriptindex := runscript("mp.mf_script_index('scriptindex')") ;
-
-def scriptindex = runscript mfid_scriptindex enddef ;
-
-string mfun_lua_bs ; mfun_lua_bs := "[===[" ;
-string mfun_lua_es ; mfun_lua_es := "]===]" ;
-
-vardef mlib_luas_luacall(text t) =
- runscript("" for s = t :
- if string s :
- & s
- % & mfun_lua_bs & s & mfun_lua_es
- elseif numeric s :
- & decimal s
- elseif boolean s :
- & if s : "true" else : "false" fi
- elseif pair s :
- & mfun_pair_to_table(s)
- elseif path s :
- & mfun_path_to_table(s)
- elseif rgbcolor s :
- & mfun_rgb_to_table(s)
- elseif cmykcolor s :
- & mfun_cmyk_to_table(s)
- else :
- & ditto & tostring(s) & ditto
- fi endfor
- )
-enddef ;
-
-newinternal mfun_luas_b ;
-
-def mlib_luas_luadone =
- exitif numeric begingroup mfun_luas_b := 1 ; endgroup ;
-enddef ;
-
-vardef mlib_luas_lualist(expr c)(text t) = % we could use mlib_luas_s instead of c
- interim mfun_luas_b := 0 ;
- runscript(c & for s = t :
- if mfun_luas_b = 0 :
- "("
- % hide(mfun_luas_b := 1)
- mlib_luas_luadone
- else :
- ","
- fi
- &
- if string s :
- mfun_lua_bs & s & mfun_lua_es
- elseif numeric s :
- decimal s
- elseif boolean s :
- if s : "true" else : "false" fi
- elseif pair s :
- mfun_pair_to_table(s)
- elseif path s :
- mfun_path_to_table(s)
- elseif rgbcolor s :
- mfun_rgb_to_table(s)
- elseif cmykcolor s :
- mfun_cmyk_to_table(s)
- else :
- ditto & tostring(s) & ditto
- fi & endfor if mfun_luas_b = 0 : "()" else : ")" fi
- )
-enddef ;
-
-def luacall = mlib_luas_luacall enddef ; % why no let
-
-vardef lualist@#(text t) = mlib_luas_lualist(str @#)(t) enddef ;
-
-string mlib_luas_s ; % saves save/restore
-
-vardef lua@#(text t) =
- mlib_luas_s := str @# ;
- if length(mlib_luas_s) > 0 :
- mlib_luas_lualist(mlib_luas_s,t)
- else :
- mlib_luas_luacall(t)
- fi
-enddef ;
-
-vardef MP@#(text t) =
- mlib_luas_lualist("MP." & str @#,t)
-enddef ;
-
-def message expr t =
- lua.mp.report(tostring(t)) ;
-enddef ;
-
-% Color:
-
-% We do a low level runscript:
-%
-% lua.mp.namedcolor(s) % conflicts with macro namedcolor
-% lua.mp.mf_named_color(s) % okay but, can also be
-% lua.mp("mf_named_color",s) % which gives expansion mess
-
-newinternal mfid_resolvedcolor ; mfid_resolvedcolor := scriptindex "namedcolor" ;
-
-def resolvedcolor = runscript mfid_resolvedcolor enddef ;
-
-% Modes:
-
-vardef texmode (expr s) = lua.mp("mode", s) enddef ;
-vardef systemmode(expr s) = lua.mp("systemmode",s) enddef ;
-
-% A few helpers
-
-vardef isarray suffix a = lua.mp.isarray (str a) enddef ;
-vardef prefix suffix a = lua.mp.prefix (str a) enddef ;
-vardef dimension suffix a = lua.mp.dimension(str a) enddef ;
-
-% More access
-
-vardef getmacro(expr k) = lua.mp._get_macro_(k) enddef ;
-vardef getdimen(expr k) = lua.mp._get_dimen_(k) enddef ;
-vardef getcount(expr k) = lua.mp._get_count_(k) enddef ;
-vardef gettoks (expr k) = lua.mp._get_toks_ (k) enddef ;
-
-def setmacro(expr k,v) = lua.mp._set_macro_(k,v) enddef ;
-def setdimen(expr k,v) = lua.mp._set_dimen_(k,v) enddef ;
-def setcount(expr k,v) = lua.mp._set_count_(k,v) enddef ;
-def settoks (expr k,v) = lua.mp._set_toks_ (k,v) enddef ;
-
-vardef positionpath (expr name) = lua.mp.positionpath (name) enddef ;
-vardef positioncurve (expr name) = lua.mp.positioncurve (name) enddef ;
-vardef positionxy (expr name) = lua.mp.positionxy (name) enddef ;
-vardef positionpxy (expr name) = lua.mp.positionpxy (name) enddef ;
-vardef positionwhd (expr name) = lua.mp.positionwhd (name) enddef ;
-vardef positionpage (expr name) = lua.mp.positionpage (name) enddef ;
-vardef positionregion(expr name) = lua.mp.positionregion(name) enddef ;
-vardef positionbox (expr name) = lua.mp.positionbox (name) enddef ;
-vardef positionanchor = lua.mp.positionanchor() enddef ;
-
-let wdpart = redpart ;
-let htpart = greenpart ;
-let dppart = bluepart ;
-
-vardef positioninregion =
- currentpicture := currentpicture shifted - positionxy(positionanchor) ;
-enddef ;
-
-vardef positionatanchor(expr name) =
- currentpicture := currentpicture shifted - positionxy(name) ;
-enddef ;
-
-vardef texvar(expr name) = lua.mp.texvar(name) enddef ;
-vardef texstr(expr name) = lua.mp.texstr(name) enddef ;
-
-newinternal mfid_path_lengthof ; mfid_path_lengthof := scriptindex "pathlengthof" ;
-newinternal mfid_path_pointof ; mfid_path_pointof := scriptindex "pathpointof" ;
-newinternal mfid_path_leftof ; mfid_path_leftof := scriptindex "pathleftof" ;
-newinternal mfid_path_rightof ; mfid_path_rightof := scriptindex "pathrightof" ;
-newinternal mfid_path_reset ; mfid_path_reset := scriptindex "pathreset" ;
-
-% 25 pct gain
-
- def inpath = = 1 step 1 until runscript mfid_path_lengthof enddef ;
-vardef pointof primary i = runscript mfid_path_pointof i enddef ;
-vardef leftof primary i = runscript mfid_path_leftof i enddef ;
-vardef rightof primary i = runscript mfid_path_rightof i enddef ;
-
-% another 10 pct gain
-
-% def inpath = = 1 step 1 until runscript mfid_path_lengthof enddef ;
-% def pointof = runscript mfid_path_pointof enddef ;
-% def leftof = runscript mfid_path_leftof enddef ;
-% def rightof = runscript mfid_path_rightof enddef ;
-
-extra_endfig := extra_endfig & " runscript mfid_path_reset ; " ;
-
-vardef utflen(expr s) = lua.mp.utflen(s) enddef ;
-vardef utfsub(expr s,f,t) = lua.mp.utfsub(s,f,t) enddef ;
-
-newinternal mfid_getparameters ; mfid_getparameters := scriptindex "getparameters" ;
-newinternal mfid_presetparameters ; mfid_presetparameters := scriptindex "presetparameters" ;
-newinternal mfid_hasparameter ; mfid_hasparameter := scriptindex "hasparameter" ;
-newinternal mfid_hasoption ; mfid_hasoption := scriptindex "hasoption" ;
-newinternal mfid_getparameter ; mfid_getparameter := scriptindex "getparameter" ;
-newinternal mfid_getparameterdefault ; mfid_getparameterdefault := scriptindex "getparameterdefault" ;
-newinternal mfid_getparametercount ; mfid_getparametercount := scriptindex "getparametercount" ;
-newinternal mfid_getmaxparametercount ; mfid_getmaxparametercount := scriptindex "getmaxparametercount" ;
-newinternal mfid_getparameterpath ; mfid_getparameterpath := scriptindex "getparameterpath" ;
-newinternal mfid_getparameterpen ; mfid_getparameterpen := scriptindex "getparameterpen" ;
-newinternal mfid_getparametertext ; mfid_getparametertext := scriptindex "getparametertext" ;
-%%%%%%%%%%% mfid_getparameteroption ; mfid_getparameteroption := scriptindex "getparameteroption" ;
-newinternal mfid_applyparameters ; mfid_applyparameters := scriptindex "applyparameters" ;
-newinternal mfid_pushparameters ; mfid_pushparameters := scriptindex "pushparameters" ;
-newinternal mfid_popparameters ; mfid_popparameters := scriptindex "popparameters" ;
-
-def getparameters = runscript mfid_getparameters enddef ;
-def presetparameters = runscript mfid_presetparameters enddef ;
-def hasparameter = runscript mfid_hasparameter enddef ;
-def hasoption = runscript mfid_hasoption enddef ;
-def getparameter = runscript mfid_getparameter enddef ;
-def getparameterdefault = runscript mfid_getparameterdefault enddef ;
-def getparametercount = runscript mfid_getparametercount enddef ;
-def getmaxparametercount = runscript mfid_getmaxparametercount enddef ;
-def getparameterpath = runscript mfid_getparameterpath enddef ;
-def getparameterpen = runscript mfid_getparameterpen enddef ;
-def getparametertext = runscript mfid_getparametertext enddef ;
-%%% getparameteroption = runscript mfid_getparameteroption enddef ;
-def applyparameters = runscript mfid_applyparameters enddef ;
-def pushparameters = runscript mfid_pushparameters enddef ;
-def popparameters = runscript mfid_popparameters enddef ;
-
-% This might also be done in stock mkiv:
-
-newinternal mfid_year ; mfid_year := scriptindex "year" ; vardef year = runscript mfid_year enddef ;
-newinternal mfid_month ; mfid_month := scriptindex "month" ; vardef month = runscript mfid_month enddef ;
-newinternal mfid_day ; mfid_day := scriptindex "day" ; vardef day = runscript mfid_day enddef ;
-newinternal mfid_hour ; mfid_hour := scriptindex "hour" ; vardef hour = runscript mfid_hour enddef ;
-newinternal mfid_minute ; mfid_minute := scriptindex "minute" ; vardef minute = runscript mfid_minute enddef ;
-newinternal mfid_second ; mfid_second := scriptindex "second" ; vardef second = runscript mfid_second enddef ;
-
-% You cannot overload a local color bu using a prefix works ok:
-%
-% \definecolor [ name = "mp:myred", r = .9 ] ;
-
-newinternal mfid_definecolor ; mfid_definecolor := scriptindex "definecolor" ;
-
-def definecolor = runscript mfid_definecolor ; enddef ; % the semicolon prevents lookahead
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-math.mpxl b/Master/texmf-dist/metapost/context/base/mpiv/mp-math.mpxl
deleted file mode 100644
index ea8c1cd7c7a..00000000000
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-math.mpxl
+++ /dev/null
@@ -1,161 +0,0 @@
-%D \module
-%D [ file=mp-math.mpiv,
-%D version=2019.07.26, % was mp-core: 1999.08.01, anchoring
-%D title=\CONTEXT\ \METAPOST\ graphics,
-%D subtitle=extra math functions,
-%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.
-
-if known context_math : endinput ; fi ;
-
-boolean context_math ; context_math := true ;
-
-% draw textext(decimal runscript("mp.numeric(xmath.gamma(.12))")) ;
-
-newinternal mfid_m_acos ; mfid_m_acos := scriptindex "m_acos" ; def m_acos = runscript mfid_m_acos enddef ;
-newinternal mfid_m_acosh ; mfid_m_acosh := scriptindex "m_acosh" ; def m_acosh = runscript mfid_m_acosh enddef ;
-newinternal mfid_m_asin ; mfid_m_asin := scriptindex "m_asin" ; def m_asin = runscript mfid_m_asin enddef ;
-newinternal mfid_m_asinh ; mfid_m_asinh := scriptindex "m_asinh" ; def m_asinh = runscript mfid_m_asinh enddef ;
-newinternal mfid_m_atan ; mfid_m_atan := scriptindex "m_atan" ; def m_atan = runscript mfid_m_atan enddef ;
-newinternal mfid_m_atantwo ; mfid_m_atantwo := scriptindex "m_atan2" ; def m_atantwo = runscript mfid_m_atantwo enddef ; % atan2
-newinternal mfid_m_atanh ; mfid_m_atanh := scriptindex "m_atanh" ; def m_atanh = runscript mfid_m_atanh enddef ;
-newinternal mfid_m_cbrt ; mfid_m_cbrt := scriptindex "m_cbrt" ; def m_cbrt = runscript mfid_m_cbrt enddef ;
-newinternal mfid_m_ceil ; mfid_m_ceil := scriptindex "m_ceil" ; def m_ceil = runscript mfid_m_ceil enddef ;
-newinternal mfid_m_copysign ; mfid_m_copysign := scriptindex "m_copysign" ; def m_copysign = runscript mfid_m_copysign enddef ;
-newinternal mfid_m_cos ; mfid_m_cos := scriptindex "m_cos" ; def m_cos = runscript mfid_m_cos enddef ;
-newinternal mfid_m_cosh ; mfid_m_cosh := scriptindex "m_cosh" ; def m_cosh = runscript mfid_m_cosh enddef ;
-newinternal mfid_m_deg ; mfid_m_deg := scriptindex "m_deg" ; def m_deg = runscript mfid_m_deg enddef ;
-newinternal mfid_m_erf ; mfid_m_erf := scriptindex "m_erf" ; def m_erf = runscript mfid_m_erf enddef ;
-newinternal mfid_m_erfc ; mfid_m_erfc := scriptindex "m_erfc" ; def m_erfc = runscript mfid_m_erfc enddef ;
-newinternal mfid_m_exp ; mfid_m_exp := scriptindex "m_exp" ; def m_exp = runscript mfid_m_exp enddef ;
-newinternal mfid_m_exptwo ; mfid_m_exptwo := scriptindex "m_exp2" ; def m_exptwo = runscript mfid_m_exptwo enddef ; % exp2
-newinternal mfid_m_expm ; mfid_m_expm := scriptindex "m_expm1" ; def m_expm = runscript mfid_m_expm enddef ; % expm1
-newinternal mfid_m_fabs ; mfid_m_fabs := scriptindex "m_fabs" ; def m_fabs = runscript mfid_m_fabs enddef ;
-newinternal mfid_m_fdim ; mfid_m_fdim := scriptindex "m_fdim" ; def m_fdim = runscript mfid_m_fdim enddef ;
-newinternal mfid_m_floor ; mfid_m_floor := scriptindex "m_floor" ; def m_floor = runscript mfid_m_floor enddef ;
-newinternal mfid_m_fma ; mfid_m_fma := scriptindex "m_fma" ; def m_fma = runscript mfid_m_fma enddef ;
-newinternal mfid_m_fmax ; mfid_m_fmax := scriptindex "m_fmax" ; def m_fmax = runscript mfid_m_fmax enddef ;
-newinternal mfid_m_fmin ; mfid_m_fmin := scriptindex "m_fmin" ; def m_fmin = runscript mfid_m_fmin enddef ;
-newinternal mfid_m_fmod ; mfid_m_fmod := scriptindex "m_fmod" ; def m_fmod = runscript mfid_m_fmod enddef ;
-newinternal mfid_m_frexp ; mfid_m_frexp := scriptindex "m_frexp" ; def m_frexp = runscript mfid_m_frexp enddef ;
-newinternal mfid_m_gamma ; mfid_m_gamma := scriptindex "m_gamma" ; def m_gamma = runscript mfid_m_gamma enddef ;
-newinternal mfid_m_hypot ; mfid_m_hypot := scriptindex "m_hypot" ; def m_hypot = runscript mfid_m_hypot enddef ;
-newinternal mfid_m_isfinite ; mfid_m_isfinite := scriptindex "m_isfinite" ; def m_isfinite = runscript mfid_m_isfinite enddef ;
-newinternal mfid_m_isinf ; mfid_m_isinf := scriptindex "m_isinf" ; def m_isinf = runscript mfid_m_isinf enddef ;
-newinternal mfid_m_isnan ; mfid_m_isnan := scriptindex "m_isnan" ; def m_isnan = runscript mfid_m_isnan enddef ;
-newinternal mfid_m_isnormal ; mfid_m_isnormal := scriptindex "m_isnormal" ; def m_isnormal = runscript mfid_m_isnormal enddef ;
-newinternal mfid_m_jz ; mfid_m_jz := scriptindex "m_j0" ; def m_jz = runscript mfid_m_jz enddef ; % j0
-newinternal mfid_m_j ; mfid_m_j := scriptindex "m_j1" ; def m_j = runscript mfid_m_j enddef ; % j1
-newinternal mfid_m_jn ; mfid_m_jn := scriptindex "m_jn" ; def m_jn = runscript mfid_m_jn enddef ;
-newinternal mfid_m_ldexp ; mfid_m_ldexp := scriptindex "m_ldexp" ; def m_ldexp = runscript mfid_m_ldexp enddef ;
-newinternal mfid_m_lgamma ; mfid_m_lgamma := scriptindex "m_lgamma" ; def m_lgamma = runscript mfid_m_lgamma enddef ;
-newinternal mfid_m_log ; mfid_m_log := scriptindex "m_log" ; def m_log = runscript mfid_m_log enddef ;
-newinternal mfid_m_logten ; mfid_m_logte := scriptindex "m_log10" ; def m_logten = runscript mfid_m_logten enddef ; % log10
-newinternal mfid_m_logp ; mfid_m_logp := scriptindex "m_log1p" ; def m_logp = runscript mfid_m_logp enddef ; % log1p
-newinternal mfid_m_logtwo ; mfid_m_logtwo := scriptindex "m_log2" ; def m_logtwo = runscript mfid_m_logtwo enddef ; % log2
-newinternal mfid_m_logb ; mfid_m_logb := scriptindex "m_logb" ; def m_logb = runscript mfid_m_logb enddef ;
-newinternal mfid_m_modf ; mfid_m_modf := scriptindex "m_modf" ; def m_modf = runscript mfid_m_modf enddef ;
-newinternal mfid_m_nearbyint ; mfid_m_nearbyint := scriptindex "m_nearbyint" ; def m_nearbyint = runscript mfid_m_nearbyint enddef ;
-newinternal mfid_m_nextafter ; mfid_m_nextafter := scriptindex "m_nextafter" ; def m_nextafter = runscript mfid_m_nextafter enddef ;
-newinternal mfid_m_pow ; mfid_m_pow := scriptindex "m_pow" ; def m_pow = runscript mfid_m_pow enddef ;
-newinternal mfid_m_rad ; mfid_m_rad := scriptindex "m_rad" ; def m_rad = runscript mfid_m_rad enddef ;
-newinternal mfid_m_remainder ; mfid_m_remainder := scriptindex "m_remainder" ; def m_remainder = runscript mfid_m_remainder enddef ;
-newinternal mfid_m_remquo ; mfid_m_remquo := scriptindex "m_remquo" ; def m_remquo = runscript mfid_m_remquo enddef ;
-newinternal mfid_m_round ; mfid_m_round := scriptindex "m_round" ; def m_round = runscript mfid_m_round enddef ;
-newinternal mfid_m_scalbn ; mfid_m_scalbn := scriptindex "m_scalbn" ; def m_scalbn = runscript mfid_m_scalbn enddef ;
-newinternal mfid_m_sin ; mfid_m_sin := scriptindex "m_sin" ; def m_sin = runscript mfid_m_sin enddef ;
-newinternal mfid_m_sinh ; mfid_m_sinh := scriptindex "m_sinh" ; def m_sinh = runscript mfid_m_sinh enddef ;
-newinternal mfid_m_sqrt ; mfid_m_sqrt := scriptindex "m_sqrt" ; def m_sqrt = runscript mfid_m_sqrt enddef ;
-newinternal mfid_m_tan ; mfid_m_tan := scriptindex "m_tan" ; def m_tan = runscript mfid_m_tan enddef ;
-newinternal mfid_m_tanh ; mfid_m_tanh := scriptindex "m_tanh" ; def m_tanh = runscript mfid_m_tanh enddef ;
-newinternal mfid_m_tgamma ; mfid_m_tgamma := scriptindex "m_tgamma" ; def m_tgamma = runscript mfid_m_tgamma enddef ;
-newinternal mfid_m_trunc ; mfid_m_trunc := scriptindex "m_trunc" ; def m_trunc = runscript mfid_m_trunc enddef ;
-newinternal mfid_m_yz ; mfid_m_yz := scriptindex "m_y0" ; def m_yz = runscript mfid_m_yz enddef ; % y0
-newinternal mfid_m_y ; mfid_m_y := scriptindex "m_y1" ; def m_y = runscript mfid_m_y enddef ; % y1
-newinternal mfid_m_yn ; mfid_m_yn := scriptindex "m_yn" ; def m_yn = runscript mfid_m_yn enddef ;
-
-newinternal mfid_c_sin ; mfid_c_asin := scriptindex "c_sin" ; def c_sin = runscript mfid_c_sin enddef ;
-newinternal mfid_c_cos ; mfid_c_acos := scriptindex "c_cos" ; def c_cos = runscript mfid_c_cos enddef ;
-newinternal mfid_c_tan ; mfid_c_acos := scriptindex "c_tan" ; def c_tan = runscript mfid_c_tan enddef ;
-newinternal mfid_c_sinh ; mfid_c_acos := scriptindex "c_sinh" ; def c_sinh = runscript mfid_c_sinh enddef ;
-newinternal mfid_c_cosh ; mfid_c_acos := scriptindex "c_cosh" ; def c_cosh = runscript mfid_c_cosh enddef ;
-newinternal mfid_c_tanh ; mfid_c_acos := scriptindex "c_tanh" ; def c_tanh = runscript mfid_c_tanh enddef ;
-
-newinternal mfid_c_asin ; mfid_c_acos := scriptindex "c_asin" ; def c_asin = runscript mfid_c_asin enddef ;
-newinternal mfid_c_acos ; mfid_c_acos := scriptindex "c_acos" ; def c_acos = runscript mfid_c_acos enddef ;
-newinternal mfid_c_atan ; mfid_c_acos := scriptindex "c_atan" ; def c_atan = runscript mfid_c_atan enddef ;
-newinternal mfid_c_asinh ; mfid_c_acos := scriptindex "c_asinh" ; def c_asinh = runscript mfid_c_asinh enddef ;
-newinternal mfid_c_acosh ; mfid_c_acos := scriptindex "c_acosh" ; def c_acosh = runscript mfid_c_acosh enddef ;
-newinternal mfid_c_atanh ; mfid_c_acos := scriptindex "c_atanh" ; def c_atanh = runscript mfid_c_atanh enddef ;
-
-newinternal mfid_c_sqrt ; mfid_c_acos := scriptindex "c_sqrt" ; def c_sqrt = runscript mfid_c_sqrt enddef ;
-newinternal mfid_c_abs ; mfid_c_acos := scriptindex "c_abs" ; def c_abs = runscript mfid_c_abs enddef ;
-newinternal mfid_c_arg ; mfid_c_acos := scriptindex "c_arg" ; def c_arg = runscript mfid_c_arg enddef ;
-newinternal mfid_c_conj ; mfid_c_acos := scriptindex "c_conj" ; def c_conj = runscript mfid_c_conj enddef ;
-newinternal mfid_c_exp ; mfid_c_acos := scriptindex "c_exp" ; def c_exp = runscript mfid_c_exp enddef ;
-newinternal mfid_c_log ; mfid_c_acos := scriptindex "c_log" ; def c_log = runscript mfid_c_log enddef ;
-newinternal mfid_c_proj ; mfid_c_acos := scriptindex "c_proj" ; def c_proj = runscript mfid_c_proj enddef ;
-
-newinternal mfid_c_erf ; mfid_c_erf := scriptindex "c_erf" ; def c_erf = runscript mfid_c_erf enddef ;
-newinternal mfid_c_erfc ; mfid_c_erfc := scriptindex "c_erfc" ; def c_erfc = runscript mfid_c_erfc enddef ;
-newinternal mfid_c_erfcx ; mfid_c_erfcx := scriptindex "c_erfcx" ; def c_erfcx = runscript mfid_c_erfcx enddef ;
-newinternal mfid_c_erfi ; mfid_c_erfi := scriptindex "c_erfi" ; def c_erfi = runscript mfid_c_erfi enddef ;
-
-% mfid_c_imag ; mfid_c_acos := scriptindex "c_imag" ; def c_imag = runscript mfid_c_imag enddef ;
-% mfid_c_real ; mfid_c_acos := scriptindex "c_real" ; def c_real = runscript mfid_c_real enddef ;
-% mfid_c_neg ; mfid_c_neg := scriptindex "c_neg" ; def c_neg = runscript mfid_c_neg enddef ;
-
-newinternal mfid_c_pow ; mfid_c_pow := scriptindex "c_pow" ; def c_pow (expr a,b) = runscript mfid_c_pow a b enddef ;
-% mfid_c_add ; mfid_c_add := scriptindex "c_add" ; def c_add (expr a,b) = runscript mfid_c_add a b enddef ;
-% mfid_c_sub ; mfid_c_sub := scriptindex "c_sub" ; def c_sub (expr a,b) = runscript mfid_c_sub a b enddef ;
-newinternal mfid_c_mul ; mfid_c_mul := scriptindex "c_mul" ; def c_mul (expr a,b) = runscript mfid_c_mul a b enddef ;
-newinternal mfid_c_div ; mfid_c_div := scriptindex "c_div" ; def c_div (expr a,b) = runscript mfid_c_div a b enddef ;
-
-newinternal mfid_c_voigt ; mfid_c_voigt := scriptindex "c_voigt" ; def c_voigt (expr a,b,c) = runscript mfid_c_voigt a b c enddef ;
-newinternal mfid_c_voigt_hwhm ; mfid_c_voigt_hwhm := scriptindex "c_voigt_hwhm" ; def c_voigt_hwhm(expr a,b) = runscript mfid_c_voigt_hwhm a b enddef ;
-
-vardef c_add (expr a, b) = a + b enddef ;
-vardef c_sub (expr a, b) = a + b enddef ;
-vardef c_imag(expr a) = ypart a enddef ;
-vardef c_real(expr a) = xpart a enddef ;
-vardef c_neg (expr a) = -a enddef ;
-
-if (numbersystem == "scaled") or (numbersystem == "double") :
-
- % vardef sqrt primary x = m_sqrt x enddef ;
-
- % vardef sqr primary x = x*x enddef ;
- % vardef log primary x = if x=0: 0 else: mlog(x)/mlog(10) fi enddef ;
- % vardef ln primary x = if x=0: 0 else: mlog(x)/256 fi enddef ;
- % vardef exp primary x = (mexp 256)**x enddef ;
- % vardef inv primary x = if x=0: 0 else: x**-1 fi enddef ;
-
- vardef sin primary x = m_sin x enddef ; vardef sinh primary x = m_sinh x enddef ;
- vardef cos primary x = m_cos x enddef ; vardef cosh primary x = m_cosh x enddef ;
- vardef tan primary x = m_tan x enddef ; vardef tanh primary x = m_tanh x enddef ;
- vardef asin primary x = m_asin x enddef ; vardef asinh primary x = m_asinh x enddef ;
- vardef acos primary x = m_acos x enddef ; vardef acosh primary x = m_acosh x enddef ;
- vardef atan primary x = m_atan x enddef ; vardef atanh primary x = m_atanh x enddef ;
-
- vardef invsin primary x = (m_asin(x))/radian enddef ;
- vardef invcos primary x = (m_acos(x))/radian enddef ;
- vardef invtan primary x = (m_atan(x))/radian enddef ;
-
-
- % vardef sind primary x = angle(m_sin x) enddef ;
- % vardef cosd primary x = angle(m_cos x) enddef ;
- % vardef tand primary x = angle(m_tan x) enddef ;
-
- vardef asind primary x = angle(m_asin x) enddef ;
- vardef acosd primary x = angle(m_acos x) enddef ;
- vardef atand primary x = angle(m_atan x) enddef ;
-
- % vardef tand primary x = sind(x)/cosd(x) enddef ;
- % vardef cotd primary x = cosd(x)/sind(x) enddef ;
-
-fi ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-mlib.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-mlib.mpiv
index 88bf566749a..fe00b55356d 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-mlib.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-mlib.mpiv
@@ -112,12 +112,14 @@ def transparent(expr a, t)(text c) = % use withtransparency instead
withcolor c
enddef ;
-% def withtransparency(expr a, t) =
-% withprescript "tr_alternative=" & decimal transparency_alternative_to_number(a)
-% withprescript "tr_transparency=" & decimal t
-% enddef ;
+def withtransparency(expr a, t) =
+ withprescript "tr_alternative=" & decimal transparency_alternative_to_number(a)
+ withprescript "tr_transparency=" & decimal t
+enddef ;
-let transparency = pair ;
+% no, not compatible ... maybe only mpiv .. maybe withopacity
+
+% let opacity = pair ;
% def withtransparency expr t =
% withprescript "tr_alternative=" & decimal transparency_alternative_to_number(xpart t)
@@ -126,22 +128,28 @@ let transparency = pair ;
%
% withtransparency (1,.5)
% withtransparency ("normal",.5)
+%
+% withopacity (1,.5)
+% withopacity (normaltransparency,.5)
+% withopacity .5
-def withtransparency (expr t) (text rest) =
+def withopacity expr t =
if pair t :
withprescript "tr_alternative=" & decimal transparency_alternative_to_number(xpart t)
withprescript "tr_transparency=" & decimal ypart t
else :
- mfun_with_transparency (transparency_alternative_to_number(t))
- fi rest
+ mfun_with_opacity (transparency_alternative_to_number(t))
+ fi
enddef ;
-def mfun_with_transparency (expr a) expr t =
+def mfun_with_opacity (expr a) expr t =
withprescript "tr_alternative=" & decimal a
withprescript "tr_transparency=" & decimal t
enddef ;
-def cmyk(expr c, m, y, k) = % provided for downward compability
+% Provided for downward compability:
+
+def cmyk(expr c, m, y, k) =
(c,m,y,k)
enddef ;
@@ -198,6 +206,17 @@ enddef ;
rgbcolor mfun_tt_r ;
+newinternal inicatcoderegime ; inicatcoderegime := runscript("return catcodes.numbers.ctxcatcodes") ;
+newinternal texcatcoderegime ; texcatcoderegime := runscript("return catcodes.numbers.texcatcodes") ;
+newinternal luacatcoderegime ; luacatcoderegime := runscript("return catcodes.numbers.luacatcodes") ;
+newinternal notcatcoderegime ; notcatcoderegime := runscript("return catcodes.numbers.notcatcodes") ;
+newinternal vrbcatcoderegime ; vrbcatcoderegime := runscript("return catcodes.numbers.vrbcatcodes") ;
+newinternal prtcatcoderegime ; prtcatcoderegime := runscript("return catcodes.numbers.prtcatcodes") ;
+newinternal ctxcatcoderegime ; ctxcatcoderegime := runscript("return catcodes.numbers.ctxcatcodes") ;
+newinternal txtcatcoderegime ; txtcatcoderegime := runscript("return catcodes.numbers.txtcatcodes") ;
+
+newinternal catcoderegime ; catcoderegime := ctxcatcoderegime ;
+
vardef rawtextext(expr s) =
if s = "" :
nullpicture
@@ -206,7 +225,7 @@ vardef rawtextext(expr s) =
mfun_tt_c := nullpicture ;
mfun_tt_o := nullpicture ;
addto mfun_tt_o doublepath origin _op_ ; % save drawoptions
- mfun_tt_r := lua.mp.mf_some_text(mfun_tt_n,s) ;
+ mfun_tt_r := lua.mp.mf_some_text(mfun_tt_n,s,catcoderegime) ;
addto mfun_tt_c doublepath unitsquare
xscaled wdpart mfun_tt_r
yscaled (htpart mfun_tt_r + dppart mfun_tt_r)
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-page.mpxl b/Master/texmf-dist/metapost/context/base/mpiv/mp-page.mpxl
deleted file mode 100644
index 8a4b735e016..00000000000
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-page.mpxl
+++ /dev/null
@@ -1,243 +0,0 @@
-%D \module
-%D [ file=mp-page.mpiv,
-%D version=1999.03.10,
-%D title=\CONTEXT\ \METAPOST\ graphics,
-%D subtitle=page enhancements,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D This module is rather preliminary and subjected to changes.In the process of
-%D moving to \METAFUN2\ this might change.
-
-if known context_page : endinput ; fi ;
-
-boolean context_page ; context_page := true ;
-
-def LoadPageState = enddef ; % just in case some old style uses it
-
-% Next we implement the the page area model. First some constants.
-
-LeftEdge := -4 ; Top := -40 ;
-LeftEdgeSeparator := -3 ; TopSeparator := -30 ;
-LeftMargin := -2 ; Header := -20 ;
-LeftMarginSeparator := -1 ; HeaderSeparator := -10 ;
-Text := 0 ; Text := 0 ;
-RightMarginSeparator := +1 ; FooterSeparator := +10 ;
-RightMargin := +2 ; Footer := +20 ;
-RightEdgeSeparator := +3 ; BottomSeparator := +30 ;
-RightEdge := +4 ; Bottom := +40 ;
-
-numeric HorPos ; HorPos := 0 ;
-numeric VerPos ; VerPos := 0 ;
-
-% Because metapost > 1.50 has dynamic memory management and is less efficient than
-% before we now delay calculations ... (on a document with 150 pages the time spent
-% in mp was close to 5 seconds which was only due to initialising the page related
-% areas, something that was hardly noticeable before. At least now we're back to
-% half a second for such a case.
-
-def SetPageVsize =
- numeric Vsize[] ;
- Vsize[Top] = TopHeight ;
- Vsize[TopSeparator] = TopDistance ;
- Vsize[Header] = HeaderHeight ;
- Vsize[HeaderSeparator] = HeaderDistance ;
- Vsize[Text] = TextHeight ;
- Vsize[FooterSeparator] = FooterDistance ;
- Vsize[Footer] = FooterHeight ;
- Vsize[BottomSeparator] = BottomDistance ;
- Vsize[Bottom] = BottomHeight ;
-enddef ;
-
-def SetPageHsize =
- numeric Hsize[] ;
- Hsize[LeftEdge] = LeftEdgeWidth ;
- Hsize[LeftEdgeSeparator] = LeftEdgeDistance ;
- Hsize[LeftMargin] = LeftMarginWidth ;
- Hsize[LeftMarginSeparator] = LeftMarginDistance ;
- Hsize[Text] = MakeupWidth ;
- Hsize[RightMarginSeparator] = RightMarginDistance ;
- Hsize[RightMargin] = RightMarginWidth ;
- Hsize[RightEdgeSeparator] = RightEdgeDistance ;
- Hsize[RightEdge] = RightEdgeWidth ;
-enddef ;
-
-def SetPageVstep =
- numeric Vstep[] ;
- Vstep[Top] = Vstep[TopSeparator] +Vsize[TopSeparator] ;
- Vstep[TopSeparator] = PaperHeight-TopSpace ;
- Vstep[Header] = Vstep[TopSeparator] -Vsize[Header] ;
- Vstep[HeaderSeparator] = Vstep[Header] -Vsize[HeaderSeparator] ;
- Vstep[Text] = Vstep[HeaderSeparator]-Vsize[Text] ;
- Vstep[FooterSeparator] = Vstep[Text] -Vsize[FooterSeparator] ;
- Vstep[Footer] = Vstep[FooterSeparator]-Vsize[Footer] ;
- Vstep[BottomSeparator] = Vstep[Footer] -Vsize[BottomSeparator] ;
- Vstep[Bottom] = Vstep[BottomSeparator]-Vsize[Bottom] ;
-enddef ;
-
-def SetPageHstep =
- numeric Hstep[] ;
- Hstep[LeftEdge] = Hstep[LeftEdgeSeparator] -Hsize[LeftEdge] ;
- Hstep[LeftEdgeSeparator] = Hstep[LeftMargin] -Hsize[LeftEdgeSeparator] ;
- Hstep[LeftMargin] = Hstep[LeftMarginSeparator] -Hsize[LeftMargin] ;
- Hstep[LeftMarginSeparator] = Hstep[Text] -Hsize[LeftMarginSeparator] ;
- Hstep[Text] = BackSpace ;
- Hstep[RightMarginSeparator] = Hstep[Text] +Hsize[Text] ;
- Hstep[RightMargin] = Hstep[RightMarginSeparator]+Hsize[RightMarginSeparator] ;
- Hstep[RightEdgeSeparator] = Hstep[RightMargin] +Hsize[RightMargin] ;
- Hstep[RightEdge] = Hstep[RightEdgeSeparator] +Hsize[RightEdgeSeparator] ;
-enddef ;
-
-def SetPageArea =
- path Area[][] ;
- for VerPos=Top step 10 until Bottom:
- for HorPos=LeftEdge step 1 until RightEdge:
- Area[HorPos][VerPos] := unitsquare xscaled Hsize[HorPos] yscaled Vsize[VerPos] ;
- Area[VerPos][HorPos] := Area[HorPos][VerPos] ;
- endfor ;
- endfor ;
-enddef ;
-
-def SetPageLocation =
- pair Location[][] ;
- for VerPos=Top step 10 until Bottom:
- for HorPos=LeftEdge step 1 until RightEdge:
- Location[HorPos][VerPos] := (Hstep[HorPos],Vstep[VerPos]) ;
- Location[VerPos][HorPos] := Location[HorPos][VerPos] ;
- endfor ;
- endfor ;
-enddef ;
-
-def SetPageField =
- path Field[][] ;
- for VerPos=Top step 10 until Bottom:
- for HorPos=LeftEdge step 1 until RightEdge:
- Field[HorPos][VerPos] := unitsquare xscaled Hsize[HorPos] yscaled Vsize[VerPos] shifted (Hstep[HorPos],Vstep[VerPos]) ;
- Field[VerPos][HorPos] := Field[HorPos][VerPos] ;
- endfor ;
- endfor ;
-enddef ;
-
-def Area = hide(SetPageArea ;) Area enddef ;
-def Location = hide(SetPageLocation ;) Location enddef ;
-def Field = hide(SetPageField ;) Field enddef ;
-def Vsize = hide(SetPageVsize ;) Vsize enddef ;
-def Hsize = hide(SetPageHsize ;) Hsize enddef ;
-def Vstep = hide(SetPageVstep ;) Vstep enddef ;
-def Hstep = hide(SetPageHstep ;) Hstep enddef ;
-
-vardef FrontPageWidth = PaperWidth enddef ;
-vardef BackPageWidth = PaperWidth enddef ;
-vardef CoverWidth = 2 * PaperWidth + SpineWidth enddef ;
-vardef CoverHeight = PaperHeight enddef ;
-
-vardef FrontPageHeight = PaperHeight enddef ;
-vardef BackPageHeight = PaperHeight enddef ;
-vardef SpineHeight = PaperHeight enddef ;
-
-def SetPagePage = path Page ; Page := unitsquare xscaled PaperWidth yscaled PaperHeight ; enddef ;
-def SetPageCoverPage = path CoverPage ; CoverPage := unitsquare xscaled CoverWidth yscaled CoverHeight ; enddef ;
-def SetPageSpine = path Spine ; Spine := unitsquare xscaled SpineWidth yscaled CoverHeight shifted (BackPageWidth,0) ; enddef ;
-def SetPageBackPage = path BackPage ; BackPage := unitsquare xscaled BackPageWidth yscaled CoverHeight ; enddef ;
-def SetPageFrontPage = path FrontPage ; FrontPage := unitsquare xscaled FrontPageWidth yscaled CoverHeight shifted (BackPageWidth+SpineWidth,0) ; enddef ;
-
-def Page = hide(SetPagePage ;) Page enddef ;
-def CoverPage = hide(SetPageCoverPage;) CoverPage enddef ;
-def Spine = hide(SetPageSpine ;) Spine enddef ;
-def BackPage = hide(SetPageBackPage ;) BackPage enddef ;
-def FrontPage = hide(SetPageFrontPage;) FrontPage enddef ;
-
-% pages
-
-def StartPage =
- begingroup ;
- setbounds currentpicture to Page ;
-enddef ;
-
-def StopPage =
- setbounds currentpicture to Page ;
- endgroup ;
-enddef ;
-
-% cover pages
-
-def StartCover =
- begingroup ;
- setbounds currentpicture to CoverPage enlarged PaperBleed ;
-enddef ;
-
-def StopCover =
- setbounds currentpicture to CoverPage enlarged PaperBleed ;
- endgroup ;
-enddef ;
-
-% overlays:
-
-def OverlayBox =
- (unitsquare xyscaled (OverlayWidth,OverlayHeight))
-enddef ;
-
-% handy
-
-def innerenlarged =
- if OnRightPage : leftenlarged else : rightenlarged fi
-enddef ;
-
-def outerenlarged =
- if OnRightPage : rightenlarged else : leftenlarged fi
-enddef ;
-
-% obsolete
-
-% def llEnlarged (expr p,d) = (llcorner p shifted (-d,-d)) enddef ;
-% def lrEnlarged (expr p,d) = (lrcorner p shifted (+d,-d)) enddef ;
-% def urEnlarged (expr p,d) = (urcorner p shifted (+d,+d)) enddef ;
-% def ulEnlarged (expr p,d) = (ulcorner p shifted (-d,+d)) enddef ;
-
-% def Enlarged (expr p, d) =
-% (
-% llEnlarged (p,d) --
-% lrEnlarged (p,d) --
-% urEnlarged (p,d) --
-% ulEnlarged (p,d) --
-% cycle
-% )
-% enddef ;
-
-% for the moment we put these here:
-
-string RuleDirection ; RuleDirection := "" ;
-string RuleOption ; RuleOption := "" ;
-numeric RuleWidth ; RuleWidth := 0 ;
-numeric RuleHeight ; RuleHeight := 0 ;
-numeric RuleDepth ; RuleDepth := 0 ;
-numeric RuleH ; RuleH := 0 ;
-numeric RuleV ; RuleV := 0 ;
-numeric RuleThickness ; RuleThickness := 0 ;
-numeric RuleFactor ; RuleFactor := 0 ;
-numeric RuleOffset ; RuleOffset := 0 ;
- def RuleColor = (.5white) enddef ;
-
-def FakeWord(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
- fill unitsquare
- xscaled RuleWidth
- yscaled (RuleDepth-RuleThickness/2)
- withcolor RuleColor ;
- fill unitsquare
- xscaled RuleWidth
- yscaled (RuleHeight-RuleDepth-RuleThickness/2)
- shifted (0,RuleDepth+RuleThickness)
- withcolor RuleColor ;
-enddef ;
-
-def FakeRule(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
- fill unitsquare
- xscaled RuleWidth
- yscaled RuleHeight
- withcolor RuleColor ;
-enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv
index 3a5dfa81e62..c84d8dfbfbd 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv
@@ -1164,7 +1164,7 @@ primarydef p randomized s = (
elseif pair p :
p randomshifted s
elseif cmykcolor p :
- if color s :
+ if cmykcolor s :
((uniformdeviate cyanpart s) * cyanpart p,
(uniformdeviate magentapart s) * magentapart p,
(uniformdeviate yellowpart s) * yellowpart p,
@@ -1175,7 +1175,7 @@ primarydef p randomized s = (
((uniformdeviate s) * p)
fi
elseif rgbcolor p :
- if color s :
+ if rgbcolor s :
((uniformdeviate redpart s) * redpart p,
(uniformdeviate greenpart s) * greenpart p,
(uniformdeviate bluepart s) * bluepart p)
@@ -2205,7 +2205,9 @@ enddef ;
primarydef p enlonged len =
begingroup
- if pair p :
+ if len == 0 :
+ p
+ elseif pair p :
save q ; path q ; q := origin -- p ;
save al ; al := arclength(q) ;
if al > 0 :
@@ -2228,8 +2230,12 @@ enddef ;
% drawarrow p withcolor red ;
% drawarrow p shortened 1cm withcolor green ;
+% primarydef p shortened d =
+% reverse ( ( reverse (p enlonged -d) ) enlonged -d )
+% enddef ;
+
primarydef p shortened d =
- reverse ( ( reverse (p enlonged -d) ) enlonged -d )
+ reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart paired(d) )
enddef ;
% yes or no, untested -)
@@ -3153,6 +3159,15 @@ def endglyph =
endfig ;
enddef ;
+def beginfont(expr name) =
+ begingroup;
+ passvariable("fontname",name) ;
+enddef ;
+
+def endfont =
+ endgroup;
+enddef ;
+
%D Dimensions have never been an issue as traditional MP can't make that large
%D pictures, but with double mode we need a catch:
@@ -3341,7 +3356,7 @@ let dump = relax ;
def loadmodule expr name = % no vardef
% input can't be used directly in a macro
- if unknown scantokens("context_" & name) :
+ if (unknown scantokens("context_" & name)) and (unknown scantokens("metafun_loaded_" & name)) :
save s ; string s ;
% s := "mp-" & name & ".mpiv" ;
% message("loading module",s) ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/metafun.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/metafun.mpxl
new file mode 100644
index 00000000000..7f953012037
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/metafun.mpxl
@@ -0,0 +1,62 @@
+%D \module
+%D [ file=metafun.mp,
+%D version=2000.07.15,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=format generation file,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D First we input John Hobby's metapost plain file. However, because we want to
+%D prevent dependency problems and in the end even may use a patched version,
+%D we prefer to use a copy.
+
+% We only get a callback when the property > 0
+
+def primitive = setproperty 1 : enddef; % not to be used
+def permanent = setproperty 2 : enddef;
+def immutable = setproperty 3 : enddef;
+def frozen = setproperty 4 : enddef; % not yet used
+def mutable = setproperty -3 : enddef; % not yet used
+
+permanent permanent, immutable, mutable, primitive, frozen ; % we reserve frozen
+
+newinternal boolean contextlmtxmode ; contextlmtxmode := true ; immutable contextlmtxmode ;
+
+% But it will move here:
+
+input "mp-base.mpxl" ;
+input "mp-tool.mpxl" ;
+input "mp-luas.mpxl" ;
+input "mp-mlib.mpxl" ;
+input "mp-math.mpxl" ;
+input "mp-cont.mpxl" ;
+input "mp-page.mpxl" ;
+input "mp-butt.mpxl" ;
+input "mp-shap.mpxl" ;
+input "mp-grph.mpxl" ;
+input "mp-grid.mpxl" ;
+input "mp-form.mpxl" ;
+input "mp-figs.mpxl" ;
+input "mp-func.mpxl" ;
+input "mp-node.mpxl" ;
+input "mp-apos.mpxl" ;
+input "mp-abck.mpxl" ;
+input "mp-blob.mpxl" ;
+input "mp-lmtx.mpxl" ;
+input "mp-text.mpxl" ;
+
+newinternal string metafunversion ; metafunversion := "metafun xl " & mfun_timestamp;
+
+immutable metafunversion ;
+
+let normalend = end ;
+
+def end = ; message "" ; message metafunversion ; message "" ; endinput ; enddef ;
+def bye = ; message "" ; message metafunversion ; message "" ; endinput ; enddef ;
+
+overloadmode := 1 ;
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/minifun.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/minifun.mpxl
index 6769d26e4a9..e1b1cda3650 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/minifun.mpxl
+++ b/Master/texmf-dist/metapost/context/base/mpxl/minifun.mpxl
@@ -14,20 +14,25 @@
%D This is a minimal \METAFUN\ instance which can be handy for isolated
%D subruns.
-boolean contextlmtxmode ; contextlmtxmode := if known fontmaking : false else: true fi;
+def primitive = setproperty 1 : enddef; % not to be used
+def permanent = setproperty 2 : enddef;
+def immutable = setproperty 3 : enddef;
+def frozen = setproperty 4 : enddef; % not yet used
+def mutable = setproperty -3 : enddef; % not yet used
-prologues := 0 ;
-mpprocset := 1 ;
+permanent permanent, immutable, mutable, primitive, frozen ; % we reserve frozen
+
+newinternal boolean contextlmtxmode ; contextlmtxmode := true ; immutable contextlmtxmode ;
input "mp-base.mpiv" ;
-input "mp-tool.mpiv" ;
-input "mp-mlib.mpiv" ;
+input "mp-tool.mpxl" ;
+input "mp-mlib.mpxl" ;
input "mp-luas.mpxl" ;
input "mp-math.mpxl" ;
input "mp-cont.mpxl" ;
-input "mp-page.mpiv" ;
+input "mp-page.mpxl" ;
-string minifunversion ; minifunversion = "minifun xl " & mfun_timestamp;
+newinternal string minifunversion ; minifunversion := "minifun xl " & mfun_timestamp;
let normalend = end ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-abck.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-abck.mpxl
new file mode 100644
index 00000000000..c27758fa941
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-abck.mpxl
@@ -0,0 +1,291 @@
+%D \module
+%D [ file=mp-abck.mpiv,
+%D version=2012.02.19, % was mp-core: 1999.08.01, anchoring
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=anchored background macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+if known metafun_loaded_abck : endinput ; fi ;
+
+newinternal boolean metafun_loaded_abck ; metafun_loaded_abck := true ; immutable metafun_loaded_abck ;
+
+path multiregs[], % region used for multipar (tracing only)
+ multipars[], % effective area (shape)
+ multibox ; % main boundingbox (of main region)
+
+string multikind[] ; % region state: single | first | middle | last (new method)
+
+numeric multilocs[], % 1=begin 2=between 3=end (old method)
+ nofmultipars ; % number of calculated areas
+
+numeric par_strut_height,
+ par_strut_depth,
+ par_line_height ;
+
+nofmultipars := 0 ;
+par_strut_height := 0 ;
+par_strut_depth := 0 ;
+par_line_height := 0 ;
+
+def boxgridoptions = withcolor .8red enddef ;
+def boxlineoptions = withcolor .8blue enddef ;
+def boxfilloptions = withcolor .8white enddef ;
+
+numeric boxgridtype ; boxgridtype := 0 ;
+numeric boxlinetype ; boxlinetype := 1 ;
+numeric boxfilltype ; boxfilltype := 1 ;
+numeric boxdashtype ; boxdashtype := 0 ;
+pair boxgriddirection ; boxgriddirection := up ;
+numeric boxgridwidth ; boxgridwidth := 1pt ;
+numeric boxlinewidth ; boxlinewidth := 1pt ;
+numeric boxlineradius ; boxlineradius := 0 ;
+numeric boxlineoffset ; boxlineoffset := 0 ;
+numeric boxfilloffset ; boxfilloffset := 0 ;
+numeric boxgriddistance ; boxgriddistance := .5cm ;
+numeric boxgridshift ; boxgridshift := 0 ;
+
+permanent multipars, multiregs, multibox, multikind, multilocs, nofmultipars ;
+
+vardef abck_draw_path(expr p) =
+ if (length p > 2) and (bbwidth(p) > 1) and (bbheight(p) > 1) :
+ save pp ; path pp ;
+ pp := p if (boxlineradius>0) and (boxlinetype=2) : cornered boxlineradius fi ;
+ if boxfilltype > 0 :
+ if boxfilloffset > 0 :
+ interim linejoin := mitered ;
+ filldraw pp boxfilloptions withpen pencircle scaled (2*boxfilloffset) ;
+ else :
+ fill pp boxfilloptions ;
+ fi ;
+ fi ;
+ if boxlinetype > 0 :
+ draw pp boxlineoptions withpen pencircle scaled boxlinewidth ;
+ fi ;
+ fi ;
+enddef ;
+
+def abck_grid_line(expr start, width) =
+ % 1 = normal, 2 = with background (i.e. no shine-through)
+ if boxdashtype = 2 :
+ draw start -- start shifted (width,0)
+ withpen pencircle scaled boxgridwidth
+ boxfilloptions ;
+ fi ;
+ draw start -- start shifted (width,0)
+ if boxdashtype > 0 :
+ dashed evenly
+ fi
+ withpen pencircle scaled boxgridwidth
+ boxgridoptions ;
+enddef ;
+
+vardef abck_baseline_grid(expr pxy, pdir, at_baseline) =
+ save width ; width := bbwidth(pxy) ;
+ save height ; height := bbheight(pxy) ;
+ if (par_line_height > 0) and (height > 1) and (width > 1) and (boxgridwidth > 0) :
+ save i, grid, bb ; picture grid ; pair start ; path bb ;
+ grid := image ( % fails with inlinespace
+ if pdir = up :
+ for i = if at_baseline : par_strut_depth else : 0 fi step par_line_height until max(height,par_line_height) :
+ abck_grid_line(llcorner pxy shifted (0,+i),width) ;
+ endfor ;
+ else :
+ for i = if at_baseline : par_strut_height else : 0 fi step par_line_height until height :
+ abck_grid_line(ulcorner pxy shifted (0,-i),width) ;
+ endfor ;
+ fi ;
+ ) ;
+ clip grid to pxy ;
+ bb := boundingbox grid ;
+ grid := grid shifted (0,boxgridshift) ;
+ setbounds grid to bb ;
+ grid
+ else :
+ nullpicture
+ fi
+enddef ;
+
+vardef abck_graphic_grid(expr pxy, dx, dy, x, y) =
+ if (bbheight(pxy) > dy) and (bbwidth(pxy) > dx) and (boxgridwidth > 0) :
+ save grid ; picture grid ;
+ grid := image (
+ for i = xpart llcorner pxy step dx until xpart lrcorner pxy :
+ draw (i,ypart llcorner pxy) -- (i,ypart ulcorner pxy) withpen pencircle scaled boxgridwidth ;
+ endfor ;
+ for i = ypart llcorner pxy step dy until ypart ulcorner pxy :
+ draw (xpart llcorner pxy,i) -- (xpart lrcorner pxy,i) withpen pencircle scaled boxgridwidth ;
+ endfor
+ ) shifted (x,y) ;
+ clip grid to pxy ;
+ grid
+ else :
+ nullpicture
+ fi
+enddef ;
+
+def draw_multi_pars =
+ for i=1 upto nofmultipars :
+ abck_draw_path(multipars[i]) ;
+ if boxgridtype = 1 :
+ draw abck_baseline_grid(multipars[i],if multilocs[i]=1: down else: up fi,true) ;
+ elseif boxgridtype = 2 :
+ draw abck_baseline_grid(multipars[i],if multilocs[i]=1: down else: up fi,false) ;
+ elseif boxgridtype = 3 :
+ draw abck_baseline_grid(multipars[i],if multilocs[i]=1: down else: up fi,true) ;
+ draw abck_baseline_grid(multipars[i],if multilocs[i]=1: down else: up fi,true) shifted (0,ExHeight) ;
+ elseif boxgridtype = 4 :
+ draw abck_baseline_grid(multipars[i],if multilocs[i]=1: down else: up fi,true) shifted (0,ExHeight/2) ;
+ elseif boxgridtype = 11 :
+ draw abck_graphic_grid(multipars[i],boxgriddistance,boxgriddistance,boxgriddistance/2,boxgriddistance/2) ;
+ elseif boxgridtype = 12 :
+ draw abck_graphic_grid(multipars[i],boxgriddistance,boxgriddistance,0,0) ;
+ fi ;
+ endfor ;
+enddef ;
+
+def show_multi_pars =
+ for i=1 upto nofmultipars :
+ drawpathwithpoints multipars[i] withcolor .5blue ;
+ endfor ;
+enddef ;
+
+def show_multi_kind =
+ for i=1 upto nofmultipars :
+ fill multipars[i]
+ withcolor
+ if multikind[i] = "single" : yellow
+ elseif multikind[i] = "first" : red
+ elseif multikind[i] = "middle" : green
+ elseif multikind[i] = "last" : blue
+ fi
+ withtransparency (1,.5)
+ ;
+ endfor ;
+enddef ;
+
+def multi_side_draw_options = enddef ;
+
+def draw_multi_side =
+ begingroup ; save p ; picture p ;
+ for i=1 upto nofmultipars :
+ p := image ( fill leftboundary multipars[i]
+ shifted (-boxlineoffset,0)
+ rightenlarged boxlinewidth boxlineoptions ;
+ ) ;
+ setbounds p to multipars[i] ;
+ draw p ;
+ endfor ;
+ endgroup ;
+enddef ;
+
+def draw_multi_side_path text t =
+ begingroup ; save p ; picture p ;
+ for i=1 upto nofmultipars :
+ p := image ( draw leftboundary multipars[i]
+ shifted (-boxlineoffset,0)
+ withpen pensquare scaled boxlinewidth boxlineoptions t ;
+ ) ;
+ setbounds p to multipars[i] ;
+ draw p ;
+ endfor ;
+ endgroup ;
+enddef ;
+
+% some extras
+
+% For the moment we keep these as they can be in use but they will disappear.
+
+pair lxy[], rxy[], cxy[], llxy[], lrxy[], ulxy[], urxy[] ;
+path pxy[] ;
+numeric hxy[], wxy[], dxy[], nxy[] ;
+
+def box_found (expr n,x,y,w,h,d) =
+ not ((x=0) and (y=0) and (w=0) and (h=0) and (d=0))
+enddef ;
+
+def initialize_box_pos (expr pos,n,x,y,w,h,d) =
+ pair lxy, rxy, cxy, llxy, lrxy, ulxy, urxy ;
+ path pxy ; numeric hxy, wxy, dxy, nxy;
+ lxy := (x,y) ;
+ llxy := (x,y-d) ;
+ lrxy := (x+w,y-d) ;
+ urxy := (x+w,y+h) ;
+ ulxy := (x,y+h) ;
+ wxy := w ;
+ hxy := h ;
+ dxy := d ;
+ rxy := lxy shifted (wxy,0) ;
+ pxy := llxy--lrxy--urxy--ulxy--cycle ;
+ cxy := center pxy ;
+ nxy := n ;
+ freeze_box(pos) ;
+enddef ;
+
+def freeze_box (expr pos) =
+ lxy[pos] := lxy ;
+ llxy[pos] := llxy ;
+ lrxy[pos] := lrxy ;
+ urxy[pos] := urxy ;
+ ulxy[pos] := ulxy ;
+ wxy[pos] := wxy ;
+ hxy[pos] := hxy ;
+ dxy[pos] := dxy ;
+ rxy[pos] := rxy ;
+ pxy[pos] := pxy ;
+ cxy[pos] := cxy ;
+ nxy[pos] := nxy ;
+enddef ;
+
+def initialize_box (expr n,x,y,w,h,d) =
+ numeric bpos ; bpos := 0 ; initialize_box_pos(bpos,n,x,y,w,h,d) ;
+enddef ;
+
+def anchor_box (expr n,x,y,w,h,d) =
+ currentpicture := currentpicture shifted (-x,-y) ;
+enddef ;
+
+def draw_box = % for old times sake
+ draw pxy boxlineoptions withpen pencircle scaled boxlinewidth ;
+ draw lxy -- rxy boxlineoptions withpen pencircle scaled boxgridwidth ;
+enddef ;
+
+def draw_free_region(expr width, height, depth, loffset, roffset, toffset, boffset) =
+
+ begingroup ; save b, o, l ; path b, o, l[] ; save d ;
+
+ b := fullsquare
+ xysized(width,height+depth) ;
+ o := b
+ topenlarged toffset
+ bottomenlarged boffset
+ leftenlarged loffset
+ rightenlarged roffset ;
+ d := max(PaperWidth,PaperHeight) ;
+
+ fill o withcolor .5white ;
+ fill b withcolor .7white ;
+
+ interim linecap := butt ;
+
+ l[1] := topboundary (topboundary o leftenlarged d rightenlarged d) ;
+ l[2] := bottomboundary (bottomboundary o leftenlarged d rightenlarged d) ;
+ l[3] := leftboundary (leftboundary o topenlarged d bottomenlarged d) ;
+ l[4] := rightboundary (rightboundary o topenlarged d bottomenlarged d) ;
+
+ for i=1 upto 4 :
+ draw l[i] withpen pencircle scaled 1bp withcolor white ;
+ draw l[i] withpen pencircle scaled 1bp dashed (evenly scaled 1bp) withcolor black ;
+ endfor ;
+
+ setbounds currentpicture to b ;
+
+ endgroup ;
+
+enddef ;
+
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-apos.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-apos.mpxl
new file mode 100644
index 00000000000..e3746540f59
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-apos.mpxl
@@ -0,0 +1,112 @@
+%D \module
+%D [ file=mp-apos.mpiv,
+%D version=2012.02.19, % was mp-core: 1999.08.01, anchoring
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=anchored background macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+if known metafun_loaded_apos : endinput ; fi ;
+
+newinternal boolean metafun_loaded_apos ; metafun_loaded_apos := true ; immutable metafun_loaded_apos ;
+
+path posboxes[],
+ posregions[] ;
+
+numeric pospages[],
+ nofposboxes ;
+
+nofposboxes := 0 ;
+
+def boxlineoptions = withcolor .8blue enddef ;
+def boxfilloptions = withcolor .8white enddef ;
+
+mutable posboxes, posregions, pospages, nofposboxes ;
+
+def connect_positions =
+ if nofposboxes = 2 :
+ pickup pencircle scaled boxlinewidth ;
+ path pa ; pa := posboxes[1] enlarged boxlineoffset ;
+ path pb ; pb := posboxes[2] enlarged boxlineoffset ;
+ if pospages[1] = pospages[2] :
+ draw posboxes[1] boxlineoptions ;
+ path pc ; pc := center pa {up} .. {down} center pb ;
+ pair cc ; cc := (pc intersection_point pa) ;
+ if intersection_found :
+ pc := pc cutbefore cc ;
+ cc := (pc intersection_point pb) ;
+ if intersection_found :
+ pc := pc cutafter cc ;
+ drawarrow pc boxlineoptions ;
+ drawarrow reverse pc boxlineoptions ;
+ fi ;
+ fi ;
+ elseif pospages[1] == RealPageNumber :
+ draw posboxes[1] boxlineoptions ;
+ path pc ; pc := center pa {up} ... {right} urcorner (posregions[1] enlarged (20pt,20pt)) ;
+ pair cc ; cc := (pc intersection_point pa) ;
+ if intersection_found :
+ pc := pc cutbefore cc ;
+ drawarrow pc boxlineoptions ;
+ fi ;
+ elseif pospages[2] == RealPageNumber :
+ draw posboxes[2] boxlineoptions ;
+ path pc ; pc := ulcorner (posregions[2] enlarged (20pt,20pt)) {right} ... {down} center pb ;
+ pair cc ; cc := (pc intersection_point pb) ;
+ if intersection_found :
+ pc := pc cutafter cc ;
+ drawarrow pc boxlineoptions ;
+ fi ;
+ fi ;
+ fi ;
+enddef ;
+
+% anch-bar:
+
+def anch_sidebars_draw (expr firstpage, lastpage, yfirst, ylast, height, depth,
+ x, y, w, h, alternative, distance, linewidth, linecolor, topoffset, bottomoffset) =
+ % beware, we anchor at (x,y)
+ begingroup ;
+ if alternative = 1 :
+ interim linecap := rounded ;
+ else :
+ interim linecap := butt ;
+ fi ;
+ save a, b ; pair a, b ;
+ if firstpage = lastpage :
+ a := (-distance,yfirst+height-y) ;
+ b := (-distance,ylast-depth-y) ;
+ elseif RealPageNumber = firstpage :
+ a := (-distance,yfirst+height-y) ;
+ b := (-distance,0) ;
+ elseif RealPageNumber = lastpage :
+ a := (-distance,h) ;
+ b := (-distance,ylast-depth-y) ;
+ else :
+ a := (-distance,h) ;
+ b := (-distance,0) ;
+ fi ;
+ a := (xpart a, min(ypart a + topoffset, h)) ;
+ b := (xpart b, max(ypart b - bottomoffset,0)) ;
+ draw
+ a -- b
+ if alternative = 1 :
+ dashed (withdots scaled (linewidth/2))
+ fi
+ withpen pencircle scaled linewidth
+ withcolor linecolor ;
+ endgroup ;
+enddef ;
+
+% new interface
+
+newscriptindex mfid_getposboxes ; mfid_getposboxes := scriptindex "getposboxes" ;
+newscriptindex mfid_getmultipars ; mfid_getmultipars := scriptindex "getmultipars" ;
+
+def getposboxes (expr tags, anchor) = runscript mfid_getposboxes tags anchor ; enddef ;
+def getmultipars(expr tags, anchor) = runscript mfid_getmultipars tags anchor ; enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl
new file mode 100644
index 00000000000..8086ee79974
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-base.mpxl
@@ -0,0 +1,1049 @@
+% This is a reformatted copy of the plain.mp file. We use a copy
+% because (1) we want to make sure that there are no unresolved
+% dependencies, and (2) we may patch this file eventually.
+
+% This file gives the macros for plain MetaPost It contains all the
+% features of plain METAFONT except those specific to font-making.
+% There are also a number of macros for labeling figures, etc.
+
+% For practical reasons I have moved some new code here (and might
+% remove some code as well). After all, there is no development in
+% this format.
+
+message "loading metafun for lmtx, including the plain 1.004 base definitions";
+
+if known metafun_loaded_base : endinput ; fi ;
+
+newinternal boolean metafun_loaded_base ; metafun_loaded_base := true ; immutable metafun_loaded_base ;
+
+delimiters () ; % this makes parentheses behave like parentheses
+
+def upto = step 1 until enddef ;
+def downto = step -1 until enddef ;
+
+def exitunless expr c =
+ exitif not c
+enddef ;
+
+let relax = \ ; % ignore the word relax, as in TeX
+let \\ = \ ; % double relaxation is like single
+
+def [[ = [ [ enddef ;
+def ]] = ] ] enddef ;
+
+def -- = {curl 1} .. {curl 1} enddef ;
+def --- = .. tension infinity .. enddef ;
+def ... = .. tension atleast 1 .. enddef ;
+
+def gobble primary g = enddef ;
+primarydef g gobbled gg = enddef ;
+
+def hide(text t) =
+ exitif numeric begingroup t ; endgroup ;
+enddef ;
+
+def ??? =
+ hide (
+ interim showstopping := 1 ;
+ showdependencies
+ )
+enddef ;
+
+def stop expr s =
+ message s ;
+ gobble readstring
+enddef ;
+
+% \\ and ??? can go
+
+permanent $, $$, (, ), upto, downto, exitunless, relax, \\, [[, ]], --, ---, ..., gobble, gobbled, stop, ??? ;
+mutable ? ;
+
+% These need to be adapted to a library approach:
+
+warningcheck := 1 ;
+
+def interact = % sets up to make "show" commands stop
+ hide (
+ showstopping := 1 ;
+ tracingonline := 1 ;
+ )
+enddef ;
+
+def loggingall = % puts tracing info into the log
+ tracingcommands := 3 ;
+ tracingtitles := 1 ;
+ tracingequations := 1 ;
+ tracingcapsules := 1 ;
+ tracingspecs := 2 ;
+ tracingchoices := 1 ;
+ tracingstats := 1 ;
+ tracingoutput := 1 ;
+ tracingmacros := 1 ;
+ tracingrestores := 1 ;
+enddef ;
+
+def tracingall = % turns on every form of tracing
+ tracingonline := 1 ;
+ showstopping := 1 ;
+ loggingall ;
+enddef ;
+
+def tracingnone = % turns off every form of tracing
+ tracingcommands := 0 ;
+ tracingtitles := 0 ;
+ tracingequations := 0 ;
+ tracingcapsules := 0 ;
+ tracingspecs := 0 ;
+ tracingchoices := 0 ;
+ tracingstats := 0 ;
+ tracingoutput := 0 ;
+ tracingmacros := 0 ;
+ tracingrestores := 0 ;
+enddef ;
+
+permanent interact, loggingall, tracingall, tracingnone ;
+
+%% dash patterns
+
+vardef dashpattern(text t) =
+ save on, off, w ;
+ let on = _on_ ;
+ let off = _off_ ;
+ w = 0 ;
+ nullpicture t
+enddef ;
+
+tertiarydef p _on_ d =
+ begingroup save pic ;
+ picture pic;
+ pic = p ;
+ addto pic doublepath (w,w) .. (w+d,w) ;
+ w := w + d ;
+ pic shifted (0,d)
+ endgroup
+enddef ;
+
+tertiarydef p _off_ d =
+ begingroup w := w + d ;
+ p shifted (0,d)
+ endgroup
+enddef ;
+
+permanent dashpattern, _on_, _off_, on, off ; % on and off are not primitives
+
+%% basic constants and mathematical macros
+
+% numeric constants
+
+newinternal eps, epsilon, infinity, _ ;
+
+eps := .00049 ; % this is a pretty small positive number
+epsilon := 1/256/256 ; % but this is the smallest
+infinity := 4095.99998 ; % and this is the largest
+_ := -1 ; % internal constant to make macros unreadable but shorter
+
+immutable eps, epsilon, infinity, _ ;
+
+% linejoin and linecap types
+
+newinternal mitered, rounded, beveled, butt, squared ;
+
+mitered := 0 ; rounded := 1 ; beveled := 2 ;
+butt := 0 ; rounded := 1 ; squared := 2 ;
+
+immutable mitered, rounded, beveled, butt, squared ;
+
+% pair constants
+
+pair right, left, up, down, origin;
+
+origin = (0,0) ;
+up = -down = (0,1) ;
+right = -left = (1,0) ;
+
+immutable right, left, up, down, origin ;
+
+% path constants
+
+path quartercircle, halfcircle, fullcircle, unitsquare ;
+
+fullcircle = makepath pencircle ;
+halfcircle = subpath (0,4) of fullcircle ;
+quartercircle = subpath (0,2) of fullcircle ;
+unitsquare = (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle ;
+
+immutable quartercircle, halfcircle, fullcircle, unitsquare ;
+
+% transform constants
+
+transform identity ;
+
+for z=origin,right,up :
+ z transformed identity = z ;
+endfor ;
+
+immutable identity ;
+
+% color constants (all in rgb color space)
+
+color black, white, red, green, blue, cyan, magenta, yellow, background;
+
+black := (0,0,0) ;
+white := (1,1,1) ;
+red := (1,0,0) ;
+green := (0,1,0) ;
+blue := (0,0,1) ;
+cyan := (0,1,1) ;
+magenta := (1,0,1) ;
+yellow := (1,1,0) ;
+
+background := white ; % obsolete
+
+% should these be tagged with a property ?
+
+let graypart = greypart ;
+let greycolor = numeric ;
+let graycolor = numeric ;
+
+% color part (will be overloaded)
+
+def colorpart primary t =
+ if colormodel t = 7:
+ (cyanpart t, magentapart t, yellowpart t, blackpart t)
+ elseif colormodel t = 5 :
+ (redpart t, greenpart t, bluepart t)
+ elseif colormodel t = 3 :
+ (greypart t)
+ elseif colormodel t = 1 :
+ false
+ elseif defaultcolormodel = 7 :
+ (0,0,0,1)
+ elseif defaultcolormodel = 5 :
+ black
+ elseif defaultcolormodel = 3 :
+ 0
+ else :
+ false
+ fi
+enddef ;
+
+permanent graypart, greycolor, graycolor ; % colorpart
+
+% picture constants
+
+picture blankpicture, evenly, withdots ;
+
+blankpicture = nullpicture ; % display blankpicture...
+evenly = dashpattern(on 3 off 3) ; % dashed evenly
+withdots = dashpattern(off 2.5 on 0 off 2.5) ; % dashed withdots
+
+immutable blankpicture;
+permanent evenly, withdots ;
+
+% string constants
+
+string ditto, EOF ;
+
+ditto = char 34 ; % ASCII double-quote mark
+EOF = char 0 ; % end-of-file for readfrom and write..to
+
+immutable ditto, EOF ;
+
+% pen constants
+
+pen pensquare, penrazor, penspec ;
+
+pensquare = makepen(unitsquare shifted -(.5,.5)) ;
+penrazor = makepen((-.5,0) -- (.5,0) -- cycle) ;
+penspec = pensquare scaled eps ;
+
+immutable pensquare, penrazor, penspec ;
+
+% nullary operators
+
+vardef whatever =
+ save ? ;
+ ?
+enddef ;
+
+permanent whatever ;
+
+% unary operators (with patched round)
+
+let abs = length ;
+
+vardef round primary u =
+ if numeric u :
+ floor(u+.5)
+ elseif pair u :
+ (floor(xpart u+.5), floor(ypart u+.5))
+ elseif path u :
+ % added by HH
+ for i=0 upto length u-1 :
+ round(point i of u) ..
+ controls round(postcontrol i of u) and round(precontrol i+1 of u) ..
+ endfor
+ if cycle u : cycle else : point infinity of u fi
+ else :
+ u
+ fi
+enddef ;
+
+vardef ceiling primary x =
+ -floor(-x)
+enddef ;
+
+vardef byte primary s =
+ if string s :
+ ASCII
+ fi s
+enddef ;
+
+vardef dir primary d =
+ right rotated d
+enddef ;
+
+vardef unitvector primary z =
+ z/abs z
+enddef ;
+
+vardef inverse primary t =
+ transform temp_transform ;
+ temp_transform transformed t = identity ;
+ temp_transform
+enddef ;
+
+vardef counterclockwise primary c =
+ if turningnumber c <= 0 :
+ reverse
+ fi c
+enddef ;
+
+vardef tensepath expr r =
+ for k=0 upto length r - 1 :
+ point k of r ---
+ endfor
+ if cycle r :
+ cycle
+ else :
+ point infinity of r
+ fi
+enddef ;
+
+vardef center primary p =
+ .5[llcorner p, urcorner p]
+enddef ;
+
+permanent abs, round, ceiling, byte, dir, unitvector, inverse, counterclockwise, tensepath, center ;
+
+% binary operators
+
+primarydef x mod y =
+ (x-y*floor(x/y))
+enddef ;
+
+primarydef x div y =
+ floor(x/y)
+enddef ;
+
+primarydef w dotprod z =
+ (xpart w * xpart z + ypart w * ypart z)
+enddef ;
+
+permanent mod, div, dotprod ;
+
+% primarydef x**y =
+% if y = 2 :
+% x*x
+% else :
+% takepower y of x
+% fi
+% enddef ;
+%
+% def takepower expr y of x =
+% if x>0 :
+% mexp(y*mlog x)
+% elseif (x=0) and (y>0) :
+% 0
+% else :
+% 1
+% if y = floor y :
+% if y >= 0 :
+% for n=1 upto y :
+% *x
+% endfor
+% else :
+% for n=-1 downto y :
+% /x
+% endfor
+% fi
+% else :
+% hide(errmessage "Undefined power: " & decimal x & "**" & decimal y)
+% fi
+% fi
+% enddef ;
+
+% for big number systems:
+
+primarydef x**y =
+ if y = 0 : 1
+ elseif x = 0 : 0
+ elseif y < 0 : 1/(x**-y)
+ elseif y = 1 : x
+ elseif y = 2 : x*x
+ elseif y = 3 : x*x*x
+ else : takepower y of x
+ fi
+enddef ;
+
+def takepower expr y of x =
+ if y=0 : % isn't x**0 = 1 even if x=0 ?
+ 1
+ elseif x=0 :
+ 0
+ else :
+ if y = floor y :
+ 1
+ if y >= 0 :
+ for n=1 upto y :
+ *x
+ endfor
+ else :
+ for n=-1 downto y :
+ /x
+ endfor
+ fi
+ elseif x > 0 :
+ mexp(y*mlog x)
+ else :
+ -mexp(y*mlog -x)
+ fi
+ fi
+enddef ;
+
+permanent **, takepower ;
+
+newinternal temp_internal_a, temp_internal_b ;
+newinternal temp_numeric_x, temp_numeric_y ;
+newinternal temp_internal_tx, temp_internal_ty, temp_internal_fx, temp_internal_fy ;
+newinternal temp_internal_n ;
+path temp_path_a, temp_path_b ;
+pair temp_pair_dz, temp_pair_z[] ;
+
+vardef direction expr t of p =
+ postcontrol t of p - precontrol t of p
+enddef ;
+
+vardef directionpoint expr z of p =
+ temp_internal_a := directiontime z of p ;
+ if temp_internal_a < 0 :
+ errmessage("The direction doesn't occur") ;
+ fi
+ point temp_internal_a of p
+enddef ;
+
+secondarydef p intersectionpoint q =
+ begingroup
+ save temp_numeric_x, temp_numeric_y ;
+ (temp_numeric_x,temp_numeric_y) = p intersectiontimes q ;
+ if temp_numeric_x < 0 :
+ errmessage("The paths don't intersect") ;
+ origin
+ else :
+ .5[point temp_numeric_x of p, point temp_numeric_y of q]
+ fi
+ endgroup
+enddef ;
+
+tertiarydef p softjoin q =
+ begingroup
+ temp_path_a := fullcircle scaled 2join_radius shifted point 0 of q ;
+ temp_internal_a := ypart(temp_path_a intersectiontimes p) ;
+ temp_internal_b := ypart(temp_path_a intersectiontimes q) ;
+ if temp_internal_a < 0 :
+ point 0 of p {direction 0 of p}
+ else :
+ subpath(0,temp_internal_a) of p
+ fi
+ ...
+ if temp_internal_b < 0 :
+ {direction infinity of q} point infinity of q
+ else :
+ subpath(temp_internal_b,infinity) of q
+ fi
+ endgroup
+enddef ;
+
+permanent direction, directionpoint, intersectionpoint, softjoin ;
+
+newinternal join_radius ;
+path cuttings ; % what got cut off
+
+tertiarydef a cutbefore b = % tries to cut as little as possible
+ begingroup
+ save t ;
+ (t, whatever) = a intersectiontimes b ;
+ if t < 0 :
+ cuttings := point 0 of a ;
+ a
+ else :
+ cuttings := subpath (0,t) of a ;
+ subpath (t,length a) of a
+ fi
+ endgroup
+enddef ;
+
+tertiarydef a cutafter b =
+ reverse (reverse a cutbefore b)
+ hide(cuttings := reverse cuttings)
+enddef ;
+
+permanent join_radius, cuttings, cutbefore, cutafter ;
+
+% special operators
+
+vardef incr suffix $ = $ := $ + 1 ; $ enddef ;
+vardef decr suffix $ = $ := $ - 1 ; $ enddef ;
+
+permanent incr, decr ;
+
+def reflectedabout(expr w,z) = % reflects about the line w..z
+ transformed
+ begingroup
+ transform temp_transform ;
+ w transformed temp_transform = w ;
+ z transformed temp_transform = z ;
+ xxpart temp_transform = -yypart temp_transform ;
+ xypart temp_transform = yxpart temp_transform ; % temp_transform is a reflection
+ temp_transform
+ endgroup
+enddef ;
+
+def rotatedaround(expr z, d) = % rotates d degrees around z
+ shifted -z rotated d shifted z
+enddef ;
+
+let rotatedabout = rotatedaround ; % for roundabout people
+
+permanent reflectedabout, rotatedaround, rotatedabout ;
+
+vardef min(expr u)(text t) = % t is a list of numerics, pairs, or strings
+ save temp_any_u ;
+ if pair u :
+ pair temp_any_u
+ elseif string u :
+ string temp_any_u
+ fi ;
+ temp_any_u := u ;
+ for i = t :
+ if i < temp_any_u :
+ temp_any_u := i ;
+ fi
+ endfor
+ temp_any_u
+enddef ;
+
+vardef max(expr u)(text t) = % t is a list of numerics, pairs, or strings
+ save temp_any_u ;
+ if pair u :
+ pair temp_any_u
+ elseif string u :
+ string temp_any_u
+ fi ;
+ temp_any_u := u ;
+ for i = t :
+ if i > temp_any_u :
+ temp_any_u := i ;
+ fi
+ endfor
+ temp_any_u
+enddef ;
+
+def flex(text t) = % t is a list of pairs
+ hide (
+ temp_internal_n := 0 ;
+ for z=t :
+ temp_pair_z[incr temp_internal_n] := z ;
+ endfor
+ temp_pair_dz := temp_pair_z[temp_internal_n]-temp_pair_z[1]
+ )
+ temp_pair_z[1] for k=2 upto temp_internal_n - 1 : ... temp_pair_z[k]{temp_pair_dz} endfor ... temp_pair_z[temp_internal_n]
+enddef ;
+
+permanent min, max, flex ;
+
+def superellipse(expr r, t, l, b, s) =
+ r { up } ... (s[xpart t,xpart r],s[ypart r,ypart t]) { t-r } ...
+ t { left } ... (s[xpart t,xpart l],s[ypart l,ypart t]) { l-t } ...
+ l { down } ... (s[xpart b,xpart l],s[ypart l,ypart b]) { b-l } ...
+ b { right } ... (s[xpart b,xpart r],s[ypart r,ypart b]) { r-b } ... cycle enddef ;
+
+vardef interpath(expr a,p,q) =
+ for t=0 upto length p-1 :
+ a[point t of p, point t of q] .. controls a[postcontrol t of p, postcontrol t of q] and a[precontrol t+1 of p, precontrol t+1 of q] ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ a[point infinity of p, point infinity of q]
+ fi
+enddef ;
+
+permanent superellipse, interpath ;
+
+newinternal tolerance ; tolerance := .01 ;
+
+vardef solve@#(expr t, f)= % @#(t)=true, @#(f)=false
+ temp_internal_tx := t;
+ temp_internal_fx := f;
+ forever :
+ temp_numeric_x := .5[temp_internal_tx,temp_internal_fx] ;
+ exitif abs(temp_internal_tx - temp_internal_fx) <= tolerance ;
+ if @#(temp_numeric_x) :
+ temp_internal_tx
+ else :
+ temp_internal_fx
+ fi := temp_numeric_x ;
+ endfor
+ temp_numeric_x % now temp_numeric_x is near where @# changes from true to false
+enddef ;
+
+vardef buildcycle(text ll) =
+ save temp_a, temp_b, temp_k, temp_i, temp_p ; path temp_p[] ;
+ temp_k = 0 ;
+ for q=ll :
+ temp_p[incr temp_k] = q ;
+ endfor
+ temp_i = temp_k ;
+ for i=1 upto temp_k :
+ (temp_a[i], length temp_p[temp_i]-temp_b[temp_i]) = temp_p[i] intersectiontimes reverse temp_p[temp_i] ;
+ if temp_a[i]<0 :
+ errmessage("Paths "& decimal i &" and "& decimal temp_i &" don't intersect") ;
+ fi
+ temp_i := i;
+ endfor
+ for i=1 upto temp_k :
+ subpath (temp_a[i],temp_b[i]) of temp_p[i] ..
+ endfor
+ cycle
+enddef ;
+
+permanent interpath, solve, buildcycle, tolerance ;
+
+%% units of measure
+
+mm := 2.83464 ;
+pt := 0.99626 ;
+dd := 1.06601 ;
+bp := 1 ;
+cm := 28.34645 ;
+pc := 11.95517 ;
+cc := 12.79213 ;
+in := 72 ;
+
+immutable mm, pt, bp, cm, in ; % we don't protect (yet): dd, pc cc (used as locals)
+
+% vardef magstep primary m = % obsolete
+% mexp(46.67432m)
+% enddef ;
+
+%% macros for drawing and filling
+
+def drawoptions(text t) =
+ def base_draw_options = t enddef
+enddef ;
+
+% parameters that effect drawing
+
+linejoin := rounded ;
+linecap := rounded ;
+miterlimit := 10 ;
+
+drawoptions() ;
+
+pen currentpen ;
+picture currentpicture ;
+
+def fill expr c =
+ addto currentpicture contour c base_draw_options
+enddef ;
+
+def draw expr p =
+ addto currentpicture
+ if picture p :
+ also p
+ else :
+ doublepath p withpen currentpen
+ fi
+ base_draw_options
+enddef ;
+
+def filldraw expr c =
+ addto currentpicture contour c withpen currentpen base_draw_options
+enddef ;
+
+% def drawdot expr z =
+% addto currentpicture contour makepath currentpen shifted z base_draw_options
+% enddef ;
+%
+% testcase DEK:
+%
+% for j=1 upto 9 :
+% pickup pencircle xscaled .4 yscaled .2 ;
+% drawdot (10j,0) withpen pencircle xscaled .5j yscaled .25j rotated 45 ;
+% pickup pencircle xscaled .5j yscaled .25j rotated 45 ;
+% drawdot (10j,10);
+% endfor ;
+%
+% or:
+%
+%\startMPpage
+%
+% def drawdot expr z =
+% addto currentpicture contour (makepath currentpen shifted z) base_draw_options
+% enddef;
+%
+% drawdot origin shifted (0,-3cm) withpen pencircle scaled 2cm ;
+% pickup pencircle scaled 2cm ; drawdot origin withcolor red ;
+
+def drawdot expr p =
+ if pair p :
+ addto currentpicture doublepath p withpen currentpen base_draw_options
+ else :
+ errmessage("drawdot only accepts a pair expression")
+ fi
+enddef ;
+
+permanent drawoptions, currentpen, filldraw, drawdot ; % redefined later: fill, draw
+
+% permanent currentpicture; % not yet
+
+% Kind of obsolete:
+
+def unfill expr c = fill c withcolor background enddef ;
+def undraw expr p = draw p withcolor background enddef ;
+def unfilldraw expr c = filldraw c withcolor background enddef ;
+def undrawdot expr z = drawdot z withcolor background enddef ;
+
+def plain_erase = enddef ;
+
+def erase text t =
+ def plain_erase =
+ withcolor background hide(def plain_erase = enddef ;)
+ enddef ;
+ t plain_erase
+enddef ;
+
+def cutdraw text t =
+ begingroup
+ interim linecap := butt ;
+ draw t plain_erase ;
+ endgroup
+enddef ;
+
+permanent unfill, undraw, unfilldraw, undrawdot, erase, cutdraw ;
+
+% Popular:
+
+vardef image(text t) =
+ save currentpicture ;
+ picture currentpicture ;
+ currentpicture := nullpicture ;
+ t ;
+ currentpicture
+enddef ;
+
+permanent image ;
+
+def pickup secondary q =
+ if numeric q :
+ plain_pickup_numeric
+ else :
+ plain_pickup_path
+ fi q
+enddef ;
+
+% pens
+
+newinternal pen_lft, pen_rt, pen_top, pen_bot ;
+
+newinternal temp_pen_count ;
+path temp_pen_result ;
+path temp_pen_path.l, temp_pen_path.r ;
+numeric temp_pen_l[], temp_pen_r[], temp_pen_t[], temp_pen_b[] ;
+pen temp_pen_stack[] ;
+path temp_pen_p[] ;
+
+pen currentpen ;
+
+temp_pen_count := 0 ;
+
+def plain_pickup_numeric primary q =
+ if unknown temp_pen_stack[q] :
+ errmessage "Unknown pen" ;
+ clearpen
+ else :
+ currentpen := temp_pen_stack[q] ;
+ pen_lft := temp_pen_l[q] ;
+ pen_rt := temp_pen_r[q] ;
+ pen_top := temp_pen_t[q] ;
+ pen_bot := temp_pen_b[q] ;
+ temp_pen_result := temp_pen_p[q]
+ fi ;
+enddef ;
+
+def plain_pickup_path primary q =
+ currentpen := q ;
+ pen_lft := xpart penoffset down of currentpen ;
+ pen_rt := xpart penoffset up of currentpen ;
+ pen_top := ypart penoffset left of currentpen ;
+ pen_bot := ypart penoffset right of currentpen ;
+ path temp_pen_result ;
+enddef ;
+
+vardef savepen =
+ temp_pen_stack[incr temp_pen_count] = currentpen ;
+ temp_pen_l[temp_pen_count] = pen_lft ;
+ temp_pen_r[temp_pen_count] = pen_rt ;
+ temp_pen_t[temp_pen_count] = pen_top ;
+ temp_pen_b[temp_pen_count] = pen_bot ;
+ temp_pen_p[temp_pen_count] = temp_pen_result ;
+ temp_pen_count
+enddef ;
+
+def clearpen =
+ currentpen := nullpen;
+ pen_lft := pen_rt := pen_top := pen_bot := 0 ;
+ path temp_pen_result ;
+enddef ;
+
+vardef lft primary x = x + if pair x: (pen_lft,0) else: pen_lft fi enddef ;
+vardef rt primary x = x + if pair x: (pen_rt, 0) else: pen_rt fi enddef ;
+vardef top primary y = y + if pair y: (0,pen_top) else: pen_top fi enddef ;
+vardef bot primary y = y + if pair y: (0,pen_bot) else: pen_bot fi enddef ;
+
+vardef penpos@#(expr b,d) =
+ (x@#r-x@#l,y@#r-y@#l) = (b,0) rotated d ;
+ x@# = .5(x@#l+x@#r) ;
+ y@# = .5(y@#l+y@#r) ; % ; added HH
+enddef ;
+
+def penstroke text t =
+ forsuffixes e = l, r :
+ temp_pen_path.e := t ;
+ endfor
+ fill temp_pen_path.l -- reverse temp_pen_path.r -- cycle
+enddef ;
+
+permanent
+ pen_lft, pen_rt, pen_top, pen_bot,
+ lft, rt, top, bot,
+ pickup, penpos, clearpen, penstroke, savepen ;
+
+%% High level drawing commands
+
+newinternal ahlength, ahangle ;
+
+ahlength := 4 ; % default arrowhead length 4bp
+ahangle := 45 ; % default head angle 45 degrees
+
+path temp_arrow_path ;
+
+vardef arrowhead expr p =
+ save q, e ; path q ; pair e ;
+ e = point length p of p ;
+ q = gobble(p shifted -e cutafter makepath(pencircle scaled 2ahlength)) cuttings ;
+ (q rotated .5ahangle & reverse q rotated -.5ahangle -- cycle) shifted e
+enddef ;
+
+def drawarrow expr p = temp_arrow_path := p ; plain_arrow_finish enddef ;
+def drawdblarrow expr p = temp_arrow_path := p ; plain_arrow_find enddef ;
+
+def plain_arrow_finish text t =
+ draw temp_arrow_path t ;
+ filldraw arrowhead temp_arrow_path t
+enddef ;
+
+def plain_arrow_find text t = % this had fill in 0.63 (potential incompatibility)
+ draw temp_arrow_path t ;
+ filldraw arrowhead temp_arrow_path withpen currentpen t ;
+ filldraw arrowhead reverse temp_arrow_path withpen currentpen t ; % ; added HH
+enddef ;
+
+permanent ahlength, ahangle, arrowhead, drawarrow, drawdblarrow ;
+
+%% macros for labels
+
+newinternal bboxmargin ;
+
+bboxmargin := 2bp ; % this can bite you, just don't use it in \METAFUN
+
+vardef bbox primary p =
+ llcorner p - ( bboxmargin, bboxmargin) --
+ lrcorner p + ( bboxmargin,-bboxmargin) --
+ urcorner p + ( bboxmargin, bboxmargin) --
+ ulcorner p + (-bboxmargin, bboxmargin) -- cycle
+enddef ;
+
+permanent bboxmargin, bbox ;
+
+string defaultfont ; newinternal defaultscale, labeloffset, dotlabeldiam ;
+
+defaultfont := "cmr10" ;
+defaultscale := 1 ;
+labeloffset := 3bp ;
+dotlabeldiam := 3bp ;
+
+mutable defaultfont, defaultscale, labeloffset, dotlabeldiam ;
+
+vardef thelabel@#(expr s,z) = % Position s near z
+ save p ; picture p ;
+ if picture s :
+ p = s
+ else :
+ p = s infont defaultfont scaled defaultscale
+ fi ;
+ p shifted (z + labeloffset*laboff@# - ( labxf@#*lrcorner p + labyf@#*ulcorner p + (1-labxf@#-labyf@#)*llcorner p) )
+enddef ;
+
+def label =
+ draw thelabel
+enddef ;
+
+vardef dotlabel@#(expr s,z) text t =
+ label@#(s,z) t ;
+ interim linecap := rounded ;
+ draw z withpen pencircle scaled dotlabeldiam t ;
+enddef ;
+
+% def makelabel =
+% dotlabel
+% enddef ;
+
+permanent label, dotlabel ;
+
+% this will be overloaded
+
+pair laboff, laboff.lft, laboff.rt, laboff.top, laboff.bot ;
+pair laboff.ulft, laboff.llft, laboff.urt, laboff.lrt ;
+
+laboff = (0,0) ; labxf = .5 ; labyf = .5 ;
+laboff.lft = (-1,0) ; labxf.lft = 1 ; labyf.lft = .5 ;
+laboff.rt = (1,0) ; labxf.rt = 0 ; labyf.rt = .5 ;
+laboff.bot = (0,-1) ; labxf.bot = .5 ; labyf.bot = 1 ;
+laboff.top = (0,1) ; labxf.top = .5 ; labyf.top = 0 ;
+laboff.ulft = (-.7,.7) ; labxf.ulft = 1 ; labyf.ulft = 0 ;
+laboff.urt = (.7,.7) ; labxf.urt = 0 ; labyf.urt = 0 ;
+laboff.llft = -(.7,.7) ; labxf.llft = 1 ; labyf.llft = 1 ;
+laboff.lrt = (.7,-.7) ; labxf.lrt = 0 ; labyf.lrt = 1 ;
+
+vardef labels@#(text t) =
+ forsuffixes $=t :
+ label@#(str$,z$) ;
+ endfor
+enddef ;
+
+% till lhere
+
+vardef dotlabels@#(text t) =
+ forsuffixes $=t:
+ dotlabel@#(str$,z$) ;
+ endfor
+enddef ;
+
+vardef penlabels@#(text t) =
+ forsuffixes $$=l,,r :
+ forsuffixes $=t :
+ dotlabel@#(str$.$$,z$.$$) ;
+ endfor
+ endfor
+enddef ;
+
+permanent dotlabels, penlabels ;
+
+% range 4 thru 10
+
+def plain_numtok suffix x =
+ x
+enddef ;
+
+def range expr x =
+ plain_numtok[x]
+enddef ;
+
+tertiarydef m thru n =
+ m for x=m+1 step 1 until n :
+ , plain_numtok[x]
+ endfor
+enddef ;
+
+permanent range, thru ;
+
+%% Overall administration
+
+% Todo: make an add to this helper thet temporarily disables warning
+
+string extra_beginfig, extra_endfig ;
+
+extra_beginfig := "" ;
+extra_endfig := "" ;
+
+def beginfig(expr c) =
+ begingroup
+ charcode := c ;
+ clearxy ;
+ clearit ;
+ clearpen ;
+ pickup defaultpen ;
+ drawoptions() ;
+ scantokens extra_beginfig ;
+enddef ;
+
+def endfig =
+ ; % added by HH
+ scantokens extra_endfig ;
+ shipit ;
+ endgroup
+enddef ;
+
+permanent
+ % extra_beginfig, extra_endfig,
+ beginfig, endfig ;
+
+%% last-minute items
+
+vardef z@# =
+ (x@#,y@#)
+enddef ;
+
+def clearxy =
+ save x, y
+enddef ;
+
+def clearit =
+ currentpicture := nullpicture
+enddef ;
+
+clearit ;
+
+permanent z, clearit ; % redefined: clearxy
+
+def shipit =
+ shipout currentpicture
+enddef ;
+
+let bye = end ;
+outer end, bye ;
+
+permanent shipit, bye ;
+
+% set default line width
+
+newinternal defaultpen ;
+
+pickup pencircle scaled .5bp ;
+
+defaultpen := savepen ;
+
+permanent defaultpen ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-blob.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-blob.mpxl
new file mode 100644
index 00000000000..55557811496
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-blob.mpxl
@@ -0,0 +1,120 @@
+%D \module
+%D [ file=mp-blob.mpiv,
+%D version=2018.04.08,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=Blobs,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is a follow up on good old \type {meta-imp-txt}.
+
+if known metafun_loaded_blob : endinput ; fi ;
+
+newinternal boolean metafun_loaded_blob ; metafun_loaded_blob := true ; immutable metafun_loaded_blob ;
+
+numeric mfun_blob_n ; mfun_blob_n := 0 ;
+picture mfun_blob_c ;
+color mfun_blob_b ;
+
+def mfun_reset_tex_blobs =
+ mfun_blob_n := 0 ;
+ mfun_blob_c := nullpicture ;
+enddef ;
+
+extra_endfig := extra_endfig & "mfun_reset_tex_blobs ; " ;
+
+vardef mfun_inject_blob(expr n) =
+ mfun_blob_c := nullpicture ;
+ mfun_blob_b := lua.mp.mf_blob_dimensions(mfun_blob_n,n) ;
+ addto mfun_blob_c doublepath unitsquare
+ xscaled redpart mfun_blob_b
+ yscaled (greenpart mfun_blob_b + bluepart mfun_blob_b)
+ shifted (0,- bluepart mfun_blob_b)
+ withprescript "mf_object=texblob"
+ withprescript "tb_blob=" & decimal lua.mp.mf_blob_index(mfun_blob_n,n) ;
+ mfun_blob_c
+enddef ;
+
+% An example of usage:
+
+newinternal followtextalternative ; followtextalternative := 1 ;
+newinternal tracingfollowtext ; tracingfollowtext := 0 ;
+newinternal autoscaleupfollowtext ; autoscaleupfollowtext := 2 ;
+newinternal autoscaledownfollowtext ; autoscaledownfollowtext := 0 ;
+
+permanent tracingfollowtext ;
+
+vardef followtext(expr pth, txt) =
+ image (
+ mfun_blob_n := mfun_blob_n + 1 ;
+ lua.mp.mf_inject_blob(mfun_blob_n,txt);
+ save pat, al, at, pl, pc, wid, pos, ap, ad, pic, len, n, b, sc, sb ;
+ path pat, b ; pat := pth ;
+ numeric al, at, pl, pc, wid, pos, len[], n, sc, sb ;
+ pair ap, ad ;
+ picture pic[] ;
+ len[0] := 0 ;
+ n := lua.mp.mf_blob_size(mfun_blob_n) ;
+ sc := 0 ;
+ sb := .25pt;
+ for i=1 upto n :
+ pic[i] := mfun_inject_blob(i) ;
+ pic[i] := pic[i] shifted - llcorner pic[i] ;
+ len[i] := len[i-1] + lua.mp.mf_blob_width(mfun_blob_n,i) ;
+ endfor ;
+ al := arclength pth ;
+ if al = 0 :
+ al := len[n] ;
+ pat := origin -- (al,0) ;
+ fi ;
+ if ((al < len[n]) and (autoscaleupfollowtext > 0)) or
+ ((al > len[n]) and (autoscaledownfollowtext > 0)) :
+ sc := len[n] /al ;
+ pat := pat scaled sc ;
+ al := arclength pat ;
+ fi ;
+ if followtextalternative = 1 :
+ pl := (al-len[n])/(if n>1 : (n-1) else : 1 fi) ;
+ pc := 0 ;
+ else : % centered / MP
+ pl := 0 ;
+ pc := arclength pat/2 - len[n]/2 ;
+ fi ;
+ if tracingfollowtext = 1 :
+ draw pat withpen pencircle scaled 1pt withcolor blue ;
+ fi ;
+ for i=1 upto n :
+ wid := lua.mp.mf_blob_width(mfun_blob_n,i) ;
+ pos := len[i]-wid/2 + (i-1)*pl + pc ;
+ at := arctime pos of pat ;
+ ap := point at of pat ;
+ ad := direction at of pat ;
+ pic[i] := pic[i]
+ shifted (-wid/2,0)
+ if ad <> origin : rotated(angle(ad)) fi
+ shifted ap ;
+ draw pic[i] ;
+ if tracingfollowtext = 1 :
+ draw boundingbox pic[i] withpen pencircle scaled .25pt withcolor red ;
+ draw ap withpen pencircle scaled .50pt withcolor green ;
+ fi ;
+ endfor ;
+ if ((autoscaleupfollowtext = 2) or (autoscaledownfollowtext = 2)) and (sc <> 0) and (sc <> 1):
+ currentpicture := currentpicture scaled (1/sc) ;
+ sb := 2 * sb / sc ;
+ fi ;
+ b := boundingbox currentpicture ;
+ if tracingfollowtext = 1 :
+ draw b withpen pencircle scaled sb withcolor blue ;
+ fi ;
+ draw fullcircle scaled 100bp
+ withprescript "mf_object=followtext"
+ withprescript "ft_category=" & decimal mfun_blob_n ;
+ setbounds currentpicture to b ;
+ )
+enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-butt.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-butt.mpxl
new file mode 100644
index 00000000000..4db36c1c9db
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-butt.mpxl
@@ -0,0 +1,77 @@
+%D \module
+%D [ file=mp-butt.mpiv,
+%D version=2000.05.31,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=buttons,
+%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 licen-en.pdf for
+%C details.
+
+if known metafun_loaded_butt : endinput ; fi ;
+
+newinternal boolean metafun_loaded_butt ; metafun_loaded_butt := true ; immutable metafun_loaded_butt ;
+
+def predefinedbutton (expr button_type, button_size, button_linecolor, button_fillcolor) =
+
+ begingroup ;
+
+ save button_linewidth, p, d, l ;
+
+ numeric button_linewidth ; button_linewidth := button_size/10 ;
+
+ drawoptions (withpen pencircle scaled button_linewidth withcolor button_linecolor) ;
+
+ path p ; p := unitsquare scaled button_size ;
+ numeric d ; d := button_size ;
+ numeric l ; l := button_linewidth ;
+
+ fill p withcolor button_fillcolor ;
+ draw p ;
+
+ if button_type = 101 :
+ draw (d-2l,2l)--(2l,.5d)--(d-2l,d-2l)--cycle ;
+ elseif button_type = 102 :
+ draw (2l,2l)--(d-2l,.5d)--(2l,d-2l)--cycle ;
+ elseif button_type = 103 :
+ for i=2l step 2l until d-2l :
+ draw (2l,i)--(2l ,i) ;
+ draw (4l,i)--(d-2l,i) ;
+ endfor ;
+ elseif button_type = 104 :
+ for i=2l step 2l until d-2l :
+ draw (2l ,i)--(d/2-l,i) ;
+ draw (d/2+l,i)--(d-2l ,i) ;
+ endfor ;
+ elseif button_type = 105 :
+ fill fullcircle scaled (.2d) shifted (.5d,.7d) ;
+ fill fullcircle xscaled (.6d) yscaled d shifted (.5d,0) ;
+ clip currentpicture to p ;
+ draw p ;
+ elseif button_type = 106 :
+ draw (2l,2l)--(d-2l,d-2l) ;
+ draw (d-2l,2l)--(2l,d-2l) ;
+ elseif button_type = 107 :
+ p := (3l,d-2l)--(d-3l,d-2l)--(.5d,4l)--cycle ;
+ fill p ; draw p ;
+ draw (.5d,2l) ;
+ elseif button_type = 108 :
+ draw (.5d,2l)--(d-2l,d-2l)--(2l,d-2l)--cycle ;
+ elseif button_type = 109 :
+ draw (.5d,d-2l)--(d-2l,2l)--(2l,2l)--cycle ;
+ elseif button_type = 110 :
+ button_linewidth := button_linewidth/2 ;
+ draw p enlarged (-2l,-l) ;
+ for i=2l step l until d-2l :
+ draw (3l,i)--(d-3l,i) ;
+ endfor ;
+ fi ;
+
+ endgroup ;
+
+enddef ;
+
+let some_button = predefinedbutton
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-cont.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-cont.mpxl
new file mode 100644
index 00000000000..d153a9ccb6f
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-cont.mpxl
@@ -0,0 +1,198 @@
+%D \module
+%D [ file=mp-cont.mpiv,
+%D version=1999.03.10,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=Interfaces,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module is rather preliminary and subjected to changes.
+
+if known metafun_loaded_cont : endinput ; fi ;
+
+newinternal boolean metafun_loaded_cont ; metafun_loaded_cont := true ; immutable metafun_loaded_cont ;
+
+string CurrentLayout ; CurrentLayout := "default" ;
+
+boolean mfun_swapped ;
+
+def SwapPageState =
+ mfun_swapped := true ; % eventually this will go !
+enddef ;
+
+permanent CurrentLayout, SwapPageState ;
+
+extra_beginfig := extra_beginfig & "mfun_swapped := false ;" ;
+
+newscriptindex mfid_PaperHeight ; mfid_PaperHeight := scriptindex "PaperHeight" ; vardef PaperHeight = runscript mfid_PaperHeight enddef ;
+newscriptindex mfid_PaperWidth ; mfid_PaperWidth := scriptindex "PaperWidth" ; vardef PaperWidth = runscript mfid_PaperWidth enddef ;
+newscriptindex mfid_PrintPaperHeight ; mfid_PrintPaperHeight := scriptindex "PrintPaperHeight" ; vardef PrintPaperHeight = runscript mfid_PrintPaperHeight enddef ;
+newscriptindex mfid_PrintPaperWidth ; mfid_PrintPaperWidth := scriptindex "PrintPaperWidth" ; vardef PrintPaperWidth = runscript mfid_PrintPaperWidth enddef ;
+newscriptindex mfid_TopSpace ; mfid_TopSpace := scriptindex "TopSpace" ; vardef TopSpace = runscript mfid_TopSpace enddef ;
+newscriptindex mfid_BottomSpace ; mfid_BottomSpace := scriptindex "BottomSpace" ; vardef BottomSpace = runscript mfid_BottomSpace enddef ;
+newscriptindex mfid_BackSpace ; mfid_BackSpace := scriptindex "BackSpace" ; vardef BackSpace = runscript mfid_BackSpace enddef ;
+newscriptindex mfid_CutSpace ; mfid_CutSpace := scriptindex "CutSpace" ; vardef CutSpace = runscript mfid_CutSpace enddef ;
+newscriptindex mfid_MakeupHeight ; mfid_MakeupHeight := scriptindex "MakeupHeight" ; vardef MakeupHeight = runscript mfid_MakeupHeight enddef ;
+newscriptindex mfid_MakeupWidth ; mfid_MakeupWidth := scriptindex "MakeupWidth" ; vardef MakeupWidth = runscript mfid_MakeupWidth enddef ;
+newscriptindex mfid_TopHeight ; mfid_TopHeight := scriptindex "TopHeight" ; vardef TopHeight = runscript mfid_TopHeight enddef ;
+newscriptindex mfid_TopDistance ; mfid_TopDistance := scriptindex "TopDistance" ; vardef TopDistance = runscript mfid_TopDistance enddef ;
+newscriptindex mfid_HeaderHeight ; mfid_HeaderHeight := scriptindex "HeaderHeight" ; vardef HeaderHeight = runscript mfid_HeaderHeight enddef ;
+newscriptindex mfid_HeaderDistance ; mfid_HeaderDistance := scriptindex "HeaderDistance" ; vardef HeaderDistance = runscript mfid_HeaderDistance enddef ;
+newscriptindex mfid_TextHeight ; mfid_TextHeight := scriptindex "TextHeight" ; vardef TextHeight = runscript mfid_TextHeight enddef ;
+newscriptindex mfid_FooterDistance ; mfid_FooterDistance := scriptindex "FooterDistance" ; vardef FooterDistance = runscript mfid_FooterDistance enddef ;
+newscriptindex mfid_FooterHeight ; mfid_FooterHeight := scriptindex "FooterHeight" ; vardef FooterHeight = runscript mfid_FooterHeight enddef ;
+newscriptindex mfid_BottomDistance ; mfid_BottomDistance := scriptindex "BottomDistance" ; vardef BottomDistance = runscript mfid_BottomDistance enddef ;
+newscriptindex mfid_BottomHeight ; mfid_BottomHeight := scriptindex "BottomHeight" ; vardef BottomHeight = runscript mfid_BottomHeight enddef ;
+newscriptindex mfid_LeftEdgeWidth ; mfid_LeftEdgeWidth := scriptindex "LeftEdgeWidth" ; vardef LeftEdgeWidth = runscript mfid_LeftEdgeWidth enddef ;
+newscriptindex mfid_LeftEdgeDistance ; mfid_LeftEdgeDistance := scriptindex "LeftEdgeDistance" ; vardef LeftEdgeDistance = runscript mfid_LeftEdgeDistance enddef ;
+newscriptindex mfid_LeftMarginWidth ; mfid_LeftMarginWidth := scriptindex "LeftMarginWidth" ; vardef LeftMarginWidth = runscript mfid_LeftMarginWidth enddef ;
+newscriptindex mfid_LeftMarginDistance ; mfid_LeftMarginDistance := scriptindex "LeftMarginDistance" ; vardef LeftMarginDistance = runscript mfid_LeftMarginDistance enddef ;
+newscriptindex mfid_TextWidth ; mfid_TextWidth := scriptindex "TextWidth" ; vardef TextWidth = runscript mfid_TextWidth enddef ;
+newscriptindex mfid_RightMarginDistance ; mfid_RightMarginDistance := scriptindex "RightMarginDistance" ; vardef RightMarginDistance = runscript mfid_RightMarginDistance enddef ;
+newscriptindex mfid_RightMarginWidth ; mfid_RightMarginWidth := scriptindex "RightMarginWidth" ; vardef RightMarginWidth = runscript mfid_RightMarginWidth enddef ;
+newscriptindex mfid_RightEdgeDistance ; mfid_RightEdgeDistance := scriptindex "RightEdgeDistance" ; vardef RightEdgeDistance = runscript mfid_RightEdgeDistance enddef ;
+newscriptindex mfid_RightEdgeWidth ; mfid_RightEdgeWidth := scriptindex "RightEdgeWidth" ; vardef RightEdgeWidth = runscript mfid_RightEdgeWidth enddef ;
+newscriptindex mfid_InnerMarginDistance ; mfid_InnerMarginDistance := scriptindex "InnerMarginDistance" ; vardef InnerMarginDistance = runscript mfid_InnerMarginDistance enddef ;
+newscriptindex mfid_InnerMarginWidth ; mfid_InnerMarginWidth := scriptindex "InnerMarginWidth" ; vardef InnerMarginWidth = runscript mfid_InnerMarginWidth enddef ;
+newscriptindex mfid_OuterMarginDistance ; mfid_OuterMarginDistance := scriptindex "OuterMarginDistance" ; vardef OuterMarginDistance = runscript mfid_OuterMarginDistance enddef ;
+newscriptindex mfid_OuterMarginWidth ; mfid_OuterMarginWidth := scriptindex "OuterMarginWidth" ; vardef OuterMarginWidth = runscript mfid_OuterMarginWidth enddef ;
+newscriptindex mfid_InnerEdgeDistance ; mfid_InnerEdgeDistance := scriptindex "InnerEdgeDistance" ; vardef InnerEdgeDistance = runscript mfid_InnerEdgeDistance enddef ;
+newscriptindex mfid_InnerEdgeWidth ; mfid_InnerEdgeWidth := scriptindex "InnerEdgeWidth" ; vardef InnerEdgeWidth = runscript mfid_InnerEdgeWidth enddef ;
+newscriptindex mfid_OuterEdgeDistance ; mfid_OuterEdgeDistance := scriptindex "OuterEdgeDistance" ; vardef OuterEdgeDistance = runscript mfid_OuterEdgeDistance enddef ;
+newscriptindex mfid_OuterEdgeWidth ; mfid_OuterEdgeWidth := scriptindex "OuterEdgeWidth" ; vardef OuterEdgeWidth = runscript mfid_OuterEdgeWidth enddef ;
+newscriptindex mfid_PageOffset ; mfid_PageOffset := scriptindex "PageOffset" ; vardef PageOffset = runscript mfid_PageOffset enddef ;
+newscriptindex mfid_PageDepth ; mfid_PageDepth := scriptindex "PageDepth" ; vardef PageDepth = runscript mfid_PageDepth enddef ;
+newscriptindex mfid_LayoutColumns ; mfid_LayoutColumns := scriptindex "LayoutColumns" ; vardef LayoutColumns = runscript mfid_LayoutColumns enddef ;
+newscriptindex mfid_LayoutColumnDistance ; mfid_LayoutColumnDistance := scriptindex "LayoutColumnDistance" ; vardef LayoutColumnDistance = runscript mfid_LayoutColumnDistance enddef ;
+newscriptindex mfid_LayoutColumnWidth ; mfid_LayoutColumnWidth := scriptindex "LayoutColumnWidth" ; vardef LayoutColumnWidth = runscript mfid_LayoutColumnWidth enddef ;
+
+immutable % permanent
+ PaperHeight, PaperWidth, PrintPaperHeight, PrintPaperWidth, TopSpace,
+ BottomSpace, BackSpace, CutSpace, MakeupHeight, MakeupWidth, TopHeight,
+ TopDistance, HeaderHeight, HeaderDistance, TextHeight, FooterDistance,
+ FooterHeight, BottomDistance, BottomHeight, LeftEdgeWidth, LeftEdgeDistance,
+ LeftMarginWidth, LeftMarginDistance, TextWidth, RightMarginDistance,
+ RightMarginWidth, RightEdgeDistance, RightEdgeWidth, InnerMarginDistance,
+ InnerMarginWidth, OuterMarginDistance, OuterMarginWidth, InnerEdgeDistance,
+ InnerEdgeWidth, OuterEdgeDistance, OuterEdgeWidth, PageOffset, PageDepth,
+ LayoutColumns, LayoutColumnDistance, LayoutColumnWidth ;
+
+newscriptindex mfid_OnRightPage ; mfid_OnRightPage := scriptindex "OnRightPage" ; vardef OnRightPage = runscript mfid_OnRightPage enddef ;
+newscriptindex mfid_OnOddPage ; mfid_OnOddPage := scriptindex "OnOddPage" ; vardef OnOddPage = runscript mfid_OnOddPage enddef ;
+newscriptindex mfid_InPageBody ; mfid_InPageBody := scriptindex "InPageBody" ; vardef InPageBody = runscript mfid_InPageBody enddef ;
+newscriptindex mfid_LayoutHasChanged ; mfid_LayoutHasChanged := scriptindex "LayoutHasChanged" ; vardef LayoutHasChanged = runscript mfid_LayoutHasChanged enddef ;
+
+immutable % permanent
+ OnRightPage, OnOddPage, InPageBody, LayoutHasChanged ;
+
+newscriptindex mfid_RealPageNumber ; mfid_RealPageNumber := scriptindex "RealPageNumber" ; vardef RealPageNumber= runscript mfid_RealPageNumber enddef ;
+newscriptindex mfid_LastPageNumber ; mfid_LastPageNumber := scriptindex "LastPageNumber" ; vardef LastPageNumber= runscript mfid_LastPageNumber enddef ;
+
+newscriptindex mfid_PageNumber ; mfid_PageNumber := scriptindex "PageNumber" ; vardef PageNumber = runscript mfid_PageNumber enddef ;
+newscriptindex mfid_NOfPages ; mfid_NOfPages := scriptindex "NOfPages" ; vardef NOfPages = runscript mfid_NOfPages enddef ;
+
+newscriptindex mfid_SubPageNumber ; mfid_SubPageNumber := scriptindex "SubPageNumber" ; vardef SubPageNumber = runscript mfid_SubPageNumber enddef ;
+newscriptindex mfid_NOfSubPages ; mfid_NOfSubPages := scriptindex "NOfSubPages" ; vardef NOfSubPages = runscript mfid_NOfSubPages enddef ;
+
+newscriptindex mfid_CurrentColumn ; mfid_CurrentColumn := scriptindex "CurrentColumn" ; vardef CurrentColumn = runscript mfid_CurrentColumn enddef ;
+newscriptindex mfid_NOfColumns ; mfid_NOfColumns := scriptindex "NOfColumns" ; vardef NOfColumns = runscript mfid_NOfColumns enddef ;
+
+immutable % permanent
+ RealPageNumber, LastPageNumber, PageNumber,
+ NOfPages, SubPageNumber, NOfSubPages, CurrentColumn, NOfColumns ;
+
+newscriptindex mfid_BaseLineSkip ; mfid_BaseLineSkip := scriptindex "BaseLineSkip" ; vardef BaseLineSkip = runscript mfid_BaseLineSkip enddef ;
+newscriptindex mfid_LineHeight ; mfid_LineHeight := scriptindex "LineHeight" ; vardef LineHeight = runscript mfid_LineHeight enddef ;
+newscriptindex mfid_BodyFontSize ; mfid_BodyFontSize := scriptindex "BodyFontSize" ; vardef BodyFontSize = runscript mfid_BodyFontSize enddef ;
+
+newscriptindex mfid_TopSkip ; mfid_TopSkip := scriptindex "TopSkip" ; vardef TopSkip = runscript mfid_TopSkip enddef ;
+newscriptindex mfid_StrutHeight ; mfid_StrutHeight := scriptindex "StrutHeight" ; vardef StrutHeight = runscript mfid_StrutHeight enddef ;
+newscriptindex mfid_StrutDepth ; mfid_StrutDepth := scriptindex "StrutDepth" ; vardef StrutDepth = runscript mfid_StrutDepth enddef ;
+
+newscriptindex mfid_CurrentWidth ; mfid_CurrentWidth := scriptindex "CurrentWidth" ; vardef CurrentWidth = runscript mfid_CurrentWidth enddef ;
+newscriptindex mfid_CurrentHeight ; mfid_CurrentHeight := scriptindex "CurrentHeight" ; vardef CurrentHeight = runscript mfid_CurrentHeight enddef ;
+
+newscriptindex mfid_HSize ; mfid_HSize := scriptindex "HSize" ; vardef HSize = runscript mfid_HSize enddef ;
+newscriptindex mfid_VSize ; mfid_VSize := scriptindex "VSize" ; vardef VSize = runscript mfid_VSize enddef ;
+
+newscriptindex mfid_EmWidth ; mfid_EmWidth := scriptindex "EmWidth" ; vardef EmWidth = runscript mfid_EmWidth enddef ;
+newscriptindex mfid_ExHeight ; mfid_ExHeight := scriptindex "ExHeight" ; vardef ExHeight = runscript mfid_ExHeight enddef ;
+
+immutable % permanent
+ BaseLineSkip, LineHeight, BodyFontSize, TopSkip, StrutHeight, StrutDepth,
+ CurrentWidth, CurrentHeight, HSize, VSize, EmWidth, ExHeight ;
+
+newscriptindex mfid_PageFraction ; mfid_PageFraction := scriptindex "PageFraction" ; vardef PageFraction = runscript mfid_PageFraction enddef ;
+newscriptindex mfid_SpineWidth ; mfid_SpineWidth := scriptindex "SpineWidth" ; vardef SpineWidth = runscript mfid_SpineWidth enddef ;
+newscriptindex mfid_PaperBleed ; mfid_PaperBleed := scriptindex "PaperBleed" ; vardef PaperBleed = runscript mfid_PaperBleed enddef ;
+
+immutable % permanent
+ PageFraction, SpineWidth, PaperBleed ;
+
+% mfid_CurrentLayout ; mfid_CurrentLayout := scriptindex "CurrentLayout" ; vardef CurrentLayout = runscript mfid_CurrentLayout enddef ;
+% mfid_OverlayLineColor ; mfid_OverlayLineColor := scriptindex "OverlayLineColor ; vardef OverlayLineColor = runscript mfid_OverlayLineColor enddef ;
+% mfid_OverlayColor ; mfid_OverlayColor := scriptindex "OverlayColor ; vardef OverlayColor = runscript mfid_OverlayColor enddef ;
+newscriptindex mfid_OverlayWidth ; mfid_OverlayWidth := scriptindex "OverlayWidth" ; vardef OverlayWidth = runscript mfid_OverlayWidth enddef ;
+newscriptindex mfid_OverlayHeight ; mfid_OverlayHeight := scriptindex "OverlayHeight" ; vardef OverlayHeight = runscript mfid_OverlayHeight enddef ;
+newscriptindex mfid_OverlayDepth ; mfid_OverlayDepth := scriptindex "OverlayDepth" ; vardef OverlayDepth = runscript mfid_OverlayDepth enddef ;
+newscriptindex mfid_OverlayLineWidth ; mfid_OverlayLineWidth := scriptindex "OverlayLineWidth" ; vardef OverlayLineWidth = runscript mfid_OverlayLineWidth enddef ;
+newscriptindex mfid_OverlayOffset ; mfid_OverlayOffset := scriptindex "OverlayOffset" ; vardef OverlayOffset = runscript mfid_OverlayOffset enddef ;
+newscriptindex mfid_OverlayRegion ; mfid_OverlayRegion := scriptindex "OverlayRegion" ; vardef OverlayRegion = runscript mfid_OverlayRegion enddef ;
+
+immutable % permanent
+ % CurrentLayout, OverlayLineColor, OverlayColor,
+ OverlayWidth, OverlayHeight, OverlayDepth, OverlayLineWidth, OverlayOffset, OverlayRegion ;
+
+newscriptindex mfid_defaultcolormodel ; mfid_defaultcolormodel := scriptindex "defaultcolormodel" ; vardef defaultcolormodel = runscript mfid_defaultcolormodel enddef ;
+
+immutable % permanent
+ defaultcolormodel ;
+
+vardef LeftMarginWidth = if mfun_swapped and not OnRightPage : runscript mfid_RightMarginWidth else : runscript mfid_LeftMarginWidth fi enddef ;
+vardef RightMarginWidth = if mfun_swapped and not OnRightPage : runscript mfid_LeftMarginWidth else : runscript mfid_RightMarginWidth fi enddef ;
+vardef LeftMarginDistance = if mfun_swapped and not OnRightPage : runscript mfid_RightMarginDistance else : runscript mfid_LeftMarginDistance fi enddef ;
+vardef RightMarginDistance = if mfun_swapped and not OnRightPage : runscript mfid_LeftMarginDistance else : runscript mfid_RightMarginDistance fi enddef ;
+
+vardef LeftEdgeWidth = if mfun_swapped and not OnRightPage : runscript mfid_RightEdgeWidth else : runscript mfid_LeftEdgeWidth fi enddef ;
+vardef RightEdgeWidth = if mfun_swapped and not OnRightPage : runscript mfid_LeftEdgeWidth else : runscript mfid_RightEdgeWidth fi enddef ;
+vardef LeftEdgeDistance = if mfun_swapped and not OnRightPage : runscript mfid_RightEdgeDistance else : runscript mfid_LeftEdgeDistance fi enddef ;
+vardef RightEdgeDistance = if mfun_swapped and not OnRightPage : runscript mfid_LeftEdgeDistance else : runscript mfid_RightEdgeDistance fi enddef ;
+
+vardef BackSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript mfid_BackSpace enddef ;
+vardef CutSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript mfid_CutSpace enddef ;
+
+% better use:
+
+vardef OuterMarginWidth = if not OnRightPage : runscript mfid_LeftMarginWidth else : runscript mfid_RightMarginWidth fi enddef ;
+vardef InnerMarginWidth = if not OnRightPage : runscript mfid_RightMarginWidth else : runscript mfid_LeftMarginWidth fi enddef ;
+vardef OuterMarginDistance = if not OnRightPage : runscript mfid_LeftMarginDistance else : runscript mfid_RightMarginDistance fi enddef ;
+vardef InnerMarginDistance = if not OnRightPage : runscript mfid_RightMarginDistance else : runscript mfid_LeftMarginDistance fi enddef ;
+
+vardef OuterEdgeWidth = if not OnRightPage : runscript mfid_LeftEdgeWidth else : runscript mfid_RightEdgeWidth fi enddef ;
+vardef InnerEdgeWidth = if not OnRightPage : runscript mfid_RightEdgeWidth else : runscript mfid_LeftEdgeWidth fi enddef ;
+vardef OuterEdgeDistance = if not OnRightPage : runscript mfid_LeftEdgeDistance else : runscript mfid_RightEdgeDistance fi enddef ;
+vardef InnerEdgeDistance = if not OnRightPage : runscript mfid_RightEdgeDistance else : runscript mfid_LeftEdgeDistance fi enddef ;
+
+vardef OuterSpaceWidth = if not OnRightPage : runscript mfid_BackSpace else : runscript mfid_CutSpace fi enddef ;
+vardef InnerSpaceWidth = if not OnRightPage : runscript mfid_CutSpace else : runscript mfid_BackSpace fi enddef ;
+
+% indices
+
+vardef OuterMargin = if not OnRightPage : LeftMargin else : RightMargin fi enddef ;
+vardef InnerMargin = if not OnRightPage : RightMargin else : LeftMargin fi enddef ;
+
+vardef OuterEdge = if not OnRightPage : LeftEdge else : RightEdge fi enddef ;
+vardef InnerEdge = if not OnRightPage : RightEdge else : LeftEdge fi enddef ;
+
+immutable % permanent
+ LeftMarginWidth, RightMarginWidth, LeftMarginDistance, RightMarginDistance,
+ LeftEdgeWidth, RightEdgeWidth, LeftEdgeDistance, RightEdgeDistance, BackSpace,
+ CutSpace, OuterMarginWidth, InnerMarginWidth, OuterMarginDistance,
+ InnerMarginDistance, OuterEdgeWidth, InnerEdgeWidth, OuterEdgeDistance,
+ InnerEdgeDistance, OuterSpaceWidth, InnerSpaceWidth, OuterMargin, InnerMargin,
+ OuterEdge, InnerEdge ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-figs.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-figs.mpxl
new file mode 100644
index 00000000000..1a99c138a99
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-figs.mpxl
@@ -0,0 +1,47 @@
+%D \module
+%D [ file=mp-figs.mpiv,
+%D version=2003.01.15,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=figures,
+%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 licen-en.pdf for
+%C details.
+
+if known metafun_loaded_figs : endinput ; fi ;
+
+newinternal boolean metafun_loaded_figs ; metafun_loaded_figs := true ; immutable metafun_loaded_figs ;
+
+% todo: check defined
+
+def registerfigure(expr name,width,height) =
+ begingroup ;
+ save s ; string s ; s := cleanstring(name) ;
+ scantokens( s & "_width := " & decimal(width )) ;
+ scantokens( s & "_height := " & decimal(height)) ;
+ endgroup ;
+enddef ;
+
+vardef figuresize(expr name) =
+ save s, p ; string s ; pair p ;
+ s := cleanstring(name) ;
+ scantokens( "p := " & "(" & s & "_width" & "," & s & "_height" & ")" ) ;
+ p
+enddef ;
+
+vardef figurewidth(expr name) =
+ xpart figuresize(name)
+enddef ;
+
+vardef figureheight(expr name) =
+ ypart figuresize(name)
+enddef ;
+
+let figuredimensions = figuresize ; % for old times sake
+
+def naturalfigure(expr name) =
+ externalfigure name xyscaled(figuresize(name))
+enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl
new file mode 100644
index 00000000000..9bc02616d22
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl
@@ -0,0 +1,28 @@
+%D \module
+%D [ file=mp-form.mpiv,
+%D version=2011.10.14,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=form support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+% The graph package will be replaced by our own variant using
+% MetaPost 2 features and textext.
+
+if known metafun_loaded_form : endinput ; fi ;
+
+newinternal boolean metafun_loaded_form ; metafun_loaded_form := true ; immutable metafun_loaded_form ;
+
+% The following function accept a number or string that can be
+% converted to a number by \LUA. The first argument is a format
+% where @ can be used instead of %. The number is typeset in math
+% mode and @3e is converted into @.3e.
+
+vardef mfun_format_number(expr fmt, i) =
+ "\ctxlua{metapost.formatnumber('" & fmt & "'," & if string i : i else : decimal i fi & ")}"
+enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-func.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-func.mpxl
new file mode 100644
index 00000000000..8f3e8ba2039
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-func.mpxl
@@ -0,0 +1,87 @@
+%D \module
+%D [ file=mp-func.mpiv,
+%D version=2001.12.29,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=function hacks,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+%D Under construction.
+
+if known metafun_loaded_func : endinput ; fi ;
+
+newinternal boolean metafun_loaded_func ; metafun_loaded_func := true ; immutable metafun_loaded_func ;
+
+string mfun_pathconnectors[] ;
+
+mfun_pathconnectors[0] := "," ;
+mfun_pathconnectors[1] := "--" ;
+mfun_pathconnectors[2] := ".." ;
+mfun_pathconnectors[3] := "..." ;
+mfun_pathconnectors[4] := "---" ;
+
+def pathconnectors = mfun_pathconnectors enddef ;
+
+vardef mfun_function (expr f) (expr u, t, b, e, s) =
+ save x ; numeric x ;
+ save c ; string c ; c := if string f : f else : mfun_pathconnectors[f] fi ;
+ for xx := b step s until e :
+ hide (x := xx ;)
+ if xx > b :
+ scantokens(c)
+ fi
+ (scantokens(u),scantokens(t))
+ endfor
+enddef ;
+
+def function = mfun_function enddef ; % let doesn't work here
+def constructedfunction = mfun_function enddef ;
+def straightfunction = mfun_function (1) enddef ;
+def curvedfunction = mfun_function (2) enddef ;
+
+% def punkedfunction = mfun_function (1) enddef ; % same as straightfunction
+% def tightfunction = mfun_function (3) enddef ; % same as curvedfunction
+
+vardef mfun_constructedpath (expr f) (text t) =
+ save ok ; boolean ok ; ok := false ;
+ save c ; string c ; c := if string f : f else : mfun_pathconnectors[f] fi ;
+ for i=t :
+ if ok :
+ scantokens(c)
+ else :
+ ok := true ;
+ fi
+ i
+ endfor
+enddef ;
+
+def constructedpath = mfun_constructedpath enddef ; % let doesn't work here
+def straightpath = mfun_constructedpath (1) enddef ;
+def curvedpath = mfun_constructedpath (2) enddef ;
+
+% def punkedpath = mfun_constructedpath (1) enddef ; % same as straightpath
+% def tightpath = mfun_constructedpath (3) enddef ; % same as curvedpath
+
+vardef mfun_constructedpairs (expr f) (text p) =
+ save i ; i := -1 ;
+ save c ; string c ; c := if string f : f else : mfun_pathconnectors[f] fi ;
+ forever :
+ exitif unknown p[incr(i)] ;
+ if i>0 :
+ scantokens(c)
+ fi
+ p[i]
+ endfor
+enddef ;
+
+def constructedpairs = mfun_constructedpairs enddef ; % let doesn't work here
+def straightpairs = mfun_constructedpairs (1) enddef ;
+def curvedpairs = mfun_constructedpairs (2) enddef ;
+
+% def punkedpairs = mfun_constructedpairs (1) enddef ; % same as straightpairs
+% def tightpairs = mfun_constructedpairs (3) enddef ; % same as curvedpairs
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-grid.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-grid.mpxl
new file mode 100644
index 00000000000..95bb0378662
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-grid.mpxl
@@ -0,0 +1,127 @@
+%D \module
+%D [ file=mp-grid.mpiv,
+%D version=2000.07.10,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=grid support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+%D Under construction.
+
+if known metafun_loaded_grid : endinput ; fi ;
+
+newinternal boolean metafun_loaded_grid ; metafun_loaded_grid := true ; immutable metafun_loaded_grid ;
+
+string fmt_separator ; fmt_separator := "@" ;
+numeric fmt_precision ; fmt_precision := 3 ;
+boolean fmt_initialize ; fmt_initialize := false ;
+boolean fmt_zerocheck ; fmt_zerocheck := true ;
+
+if unknown fmt_loaded : input "mp-form.mpxl" ; fi ;
+
+boolean fmt_pictures ; fmt_pictures := true ;
+
+def do_format = if fmt_pictures : format else : formatstr fi enddef ;
+def do_mformat = if fmt_pictures : Mformat else : Mformatstr fi enddef ;
+
+numeric grid_eps ; grid_eps = eps ;
+
+def hlingrid (expr asked_min, asked_max, asked_step, asked_length, asked_width) text t =
+ image (
+ for i=asked_min step asked_step until asked_max+grid_eps :
+ draw (origin--(asked_width,0)) shifted (0,i*(asked_length/asked_max)) t ;
+ endfor ;
+ ) ;
+enddef ;
+
+def vlingrid (expr asked_min, asked_max, asked_step, asked_length, asked_height) text t =
+ image (
+ for i=asked_min step asked_step until asked_max+grid_eps :
+ draw (origin--(0,asked_height)) shifted (i*(asked_length/asked_max),0) t ;
+ endfor ;
+ ) ;
+enddef ;
+
+def hloggrid (expr asked_min, asked_max, asked_step, asked_length, asked_width) text t =
+ image (
+ for i=max(asked_min,1) step asked_step until min(asked_max,10)+grid_eps :
+ draw (origin--(asked_width,0)) shifted (0,asked_length*log(i)) t ;
+ endfor ;
+ ) ;
+enddef ;
+
+def vloggrid (expr asked_min, asked_max, asked_step, asked_length, asked_height) text t =
+ image (
+ for i=max(asked_min,1) step asked_step until min(asked_max,10)+grid_eps :
+ draw (origin--(0,asked_height)) shifted (asked_length*log(i),0) t ;
+ endfor ;
+ ) ;
+enddef ;
+
+vardef hlintext@#(expr asked_min, asked_max, asked_step, asked_length, asked_format) text t =
+ image (
+ for i=asked_min step asked_step until asked_max+grid_eps :
+ draw textext@#(mfun_format_number(asked_format,i)) shifted (0,i*(asked_length/asked_max)) t ;
+ endfor ;
+ )
+enddef ;
+
+vardef vlintext@#(expr asked_min, asked_max, asked_step, asked_length, asked_format) text t =
+ image (
+ for i=asked_min step asked_step until asked_max+grid_eps :
+ draw textext@#(mfun_format_number(asked_format,i)) shifted (i*(asked_length/asked_max),0) t ;
+ endfor ;
+ )
+enddef ;
+
+vardef hlogtext@#(expr asked_min, asked_max, asked_step, asked_length, asked_format) text t =
+ image (
+ for i=max(asked_min,1) step asked_step until min(asked_max,10)+grid_eps :
+ draw textext@#(mfun_format_number(asked_format,i)) shifted (0,asked_length*log(i)) t ;
+ endfor ;
+ )
+enddef ;
+
+vardef vlogtext@#(expr asked_min, asked_max, asked_step, asked_length, asked_format) text t =
+ image (
+ for i=max(asked_min,1) step asked_step until min(asked_max,10)+grid_eps :
+ draw textext@#(mfun_format_number(asked_format,i)) shifted (asked_length*log(i),0) t ;
+ endfor ;
+ )
+enddef ;
+
+vardef hlinlabel@#(expr asked_min, asked_max, asked_step, asked_length) text t =
+ image (
+ for i=asked_min step asked_step until asked_max+grid_eps :
+ draw thelabel@#(decimal i,(0,i*(asked_length/asked_max))) t ;
+ endfor ;
+ )
+enddef ;
+
+vardef vlinlabel@#(expr asked_min, asked_max, asked_step, asked_length) text t =
+ image (
+ for i=asked_min step asked_step until asked_max+grid_eps :
+ draw thelabel@#(decimal i,(i*(asked_length/asked_max),0)) t ;
+ endfor ;
+ )
+enddef ;
+
+% these will be replace by lmt_* variants
+
+vardef linlog(expr xy) = ( xpart xy, log(ypart xy)) enddef ;
+vardef loglin(expr xy) = (log(xpart xy), ypart xy) enddef ;
+vardef loglog(expr xy) = (log(xpart xy), log(ypart xy)) enddef ;
+vardef linlin(expr xy) = ( (xpart xy), (ypart xy)) enddef ;
+
+vardef loglinpath primary p = processpath (p) (loglin) enddef ;
+vardef linlogpath primary p = processpath (p) (linlog) enddef ;
+vardef loglogpath primary p = processpath (p) (loglog) enddef ;
+vardef linlinpath primary p = processpath (p) (linlin) enddef ;
+
+permanent hlingrid, vlingrid, hloggrid, vloggrid, hlintext, vlintext, hlogtext, vlogtext, hlinlabel, vlinlabel ;
+permanent linlog, loglin, loglog, linlin, loglinpath, linlogpath, loglogpath, linlinpath ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-grph.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-grph.mpxl
new file mode 100644
index 00000000000..8517293aa9a
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-grph.mpxl
@@ -0,0 +1,209 @@
+%D \module
+%D [ file=mp-grph.mpiv,
+%D version=2000.12.14,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=graphic text support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+%D Under construction.
+
+if known metafun_loaded_grph : endinput ; fi ;
+
+newinternal boolean metafun_loaded_grph ; metafun_loaded_grph := true ; immutable metafun_loaded_grph ;
+
+numeric mfun_fig_nesting ; mfun_fig_nesting := 0 ;
+
+def beginfig (expr c) =
+ mfun_fig_nesting := mfun_fig_nesting + 1 ;
+ if mfun_fig_nesting = 1 :
+ begingroup
+ charcode := c ;
+ resetfig ;
+ scantokens extra_beginfig ;
+ fi ;
+enddef ;
+
+def endfig =
+ ; % safeguard
+ if mfun_fig_nesting = 1 :
+ scantokens extra_endfig ;
+ shipit ;
+ endgroup ;
+ fi ;
+ mfun_fig_nesting := mfun_fig_nesting - 1 ;
+enddef;
+
+def resetfig =
+ clearxy ;
+ clearit ;
+ clearpen ;
+ pickup defaultpen ;
+ interim linecap := linecap ;
+ interim linejoin := linejoin ;
+ interim miterlimit := miterlimit ;
+ % not really needed:
+ save temp_b ; color temp_b ; temp_b := background ;
+ save background ; color background ; background := temp_b ;
+ %
+ drawoptions () ;
+enddef ;
+
+permanent beginfig, endfig, resetfig ;
+
+def protectgraphicmacros =
+ save showtext ;
+ save beginfig ; let beginfig = begingraphictextfig ;
+ save endfig ; let endfig = endgraphictextfig ;
+ save end ; let end = relax ;
+ resetfig ; % resets currentpicture
+enddef ;
+
+numeric currentgraphictext ; currentgraphictext := 0 ;
+
+def begingraphictextfig (expr n) =
+ foundpicture := n ;
+ scratchpicture := nullpicture ;
+enddef ;
+
+def endgraphictextfig =
+ if foundpicture = currentgraphictext :
+ expandafter endinput
+ else :
+ scratchpicture := nullpicture ;
+ fi ;
+enddef ;
+
+def loadfigure primary filename =
+ mfun_load_figure(filename)
+enddef ;
+
+def mfun_load_figure (expr filename) text figureattributes =
+ mutable beginfig, endfig ;
+ begingroup ;
+ save figurenumber, figurepicture, number, fixedplace ;
+ numeric figurenumber ; figurenumber := 0 ;
+ boolean figureshift ; figureshift := true ;
+ picture figurepicture ; figurepicture := currentpicture ;
+ def number primary n = hide(figurenumber := n) enddef ;
+ def fixedplace = hide(figureshift := false) enddef ;
+ protectgraphicmacros ;
+ % defaults
+ interim linecap := rounded ;
+ interim linejoin := rounded ;
+ interim miterlimit := 10 ;
+ %
+ currentpicture := nullpicture ;
+ draw fullcircle figureattributes ; % expand number
+ currentpicture := nullpicture ;
+ def beginfig (expr n) =
+ currentpicture := nullpicture ;
+ if (figurenumber=n) or (figurenumber=0) :
+ let endfig = endinput ;
+ fi ;
+ enddef ;
+ let endfig = relax ;
+ readfile(filename) ;
+ if figureshift :
+ currentpicture := currentpicture shifted -llcorner currentpicture ;
+ fi ;
+ addto figurepicture also currentpicture figureattributes ;
+ currentpicture := figurepicture ;
+ endgroup ;
+ permanent beginfig, endfig ;
+enddef ;
+
+% We only use the new method now.
+
+boolean mfun_gt_color_fill ;
+boolean mfun_gt_color_draw ;
+boolean mfun_gt_shade_fill ;
+boolean mfun_gt_reverse_fill ;
+boolean mfun_gt_outline_fill ;
+picture mfun_gt_picture ;
+
+def mfun_gt_default = % somewhat compatible
+ scaled 11.5
+ withpen pencircle scaled .1
+enddef ;
+
+def graphictext primary t = % use outlinetext instead
+ begingroup ;
+ mfun_graphic_text_indeed(t)
+enddef ;
+
+def mfun_graphic_text_indeed(expr t) text rest =
+ interim linecap := butt ; % normally rounded
+ interim linejoin := mitered ; % normally rounded
+ % interim miterlimit := 10 ; % todo
+ %
+ let normalwithshade = withshade ;
+ %
+ save reversefill, outlinefill, withshade, withfillcolor, withdrawcolor ;
+ %
+ def mfun_gt_fill = enddef ;
+ def mfun_gt_draw = enddef ;
+ def mfun_gt_shade = enddef ;
+ %
+ mfun_gt_color_fill := false ;
+ mfun_gt_color_draw := false ;
+ mfun_gt_shade_fill := false ;
+ mfun_gt_reverse_fill := false ;
+ %
+ def reversefill = hide(mfun_gt_reverse_fill := true) enddef ;
+ def outlinefill = enddef ;
+ def withshade primary c = hide(mfun_gt_shade_fill := true; def mfun_gt_shade = normalwithshade c enddef ;) enddef ;
+ def withfillcolor primary c = hide(mfun_gt_color_fill := true; def mfun_gt_fill = withcolor c enddef ;) enddef ;
+ def withdrawcolor primary c = hide(mfun_gt_color_draw := true; def mfun_gt_draw = withcolor c enddef ;) enddef ;
+ %
+ mfun_gt_picture := nullpicture ;
+ addto mfun_gt_picture doublepath origin rest ; % preroll
+ mfun_gt_picture := nullpicture ;
+ %
+ def reversefill = enddef ;
+ def outlinefill = enddef ;
+ def withshade primary c = enddef ;
+ def withfillcolor primary c = enddef ;
+ def withdrawcolor primary c = enddef ;
+ %
+ if mfun_gt_shade_fill :
+ draw outlinetext.f(t)(mfun_gt_shade) rest;
+ elseif mfun_gt_color_fill and mfun_gt_color_draw :
+ if mfun_gt_reverse_fill :
+ draw outlinetext.r(t)(mfun_gt_default mfun_gt_fill)(mfun_gt_default mfun_gt_draw) rest;
+ else :
+ draw outlinetext.b(t)(mfun_gt_default mfun_gt_draw)(mfun_gt_default mfun_gt_fill) rest;
+ fi ;
+ elseif mfun_gt_color_fill :
+ draw outlinetext.f(t)(mfun_gt_default mfun_gt_fill) rest;
+ elseif mfun_gt_color_draw :
+ draw outlinetext.d(t)(mfun_gt_default mfun_gt_draw) rest ;
+ else :
+ draw outlinetext.d(t)(mfun_gt_default) rest ;
+ fi ;
+ %
+ endgroup ;
+enddef ;
+
+% example
+%
+% beginfig (1) ;
+% graphictext
+% "\vbox{\hsize10cm \input tufte }"
+% scaled 8
+% withdrawcolor blue
+% withfillcolor red
+% withpen pencircle scaled 2pt ;
+% endfig ;
+%
+% beginfig(1) ;
+% loadfigure "gracht.mp" rotated 20 ;
+% loadfigure "koe.mp" number 1 scaled 2 ;
+% endfig ;
+%
+% end
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-lmtx.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-lmtx.mpxl
index cd4712ea8aa..ec21b150afd 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-lmtx.mpxl
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-lmtx.mpxl
@@ -14,9 +14,9 @@
% This is an experimental module where I test some new interface methods;
% for real advanced graphics use the luapost module.
-if known context_lmtx : endinput ; fi ;
+if known metafun_loaded_lmtx : endinput ; fi ;
-boolean context_lmtx ; context_lmtx := true ;
+newinternal boolean metafun_loaded_lmtx ; metafun_loaded_lmtx := true ; immutable metafun_loaded_lmtx ;
presetparameters "text" [
offset = 0,
@@ -354,12 +354,13 @@ def lmt_followtext = applyparameters "followtext" "lmt_do_followtext" enddef ;
vardef lmt_do_followtext =
image (
pushparameters "followtext" ;
- save s_u ; string s_u ; s_u := getparameter "autoscaleup" ;
- save s_d ; string s_d ; s_d := getparameter "autoscaledown" ;
+ save scale_up ; string scale_up ; scale_up := getparameter "autoscaleup" ;
+ save scale_down ; string scale_down ; scale_down := getparameter "autoscaledown" ;
save followtextalternative ; followtextalternative := if getparameter "spread" : 1 else : 0 fi ;
- save tracingfollowtext ; tracingfollowtext := if getparameter "trace" : 1 else : 0 fi ;
- save autoscaleupfollowtext ; autoscaleupfollowtext := if s_u = "yes" : 1 elseif s_u = "max" : 2 else : 0 fi ;
- save autoscaledownfollowtext ; autoscaledownfollowtext := if s_d = "yes" : 1 elseif s_d = "max" : 2 else : 0 fi ;
+ save autoscaleupfollowtext ; autoscaleupfollowtext := if scale_up = "yes" : 1 elseif scale_up = "max" : 2 else : 0 fi ;
+ save autoscaledownfollowtext ; autoscaledownfollowtext := if scale_down = "yes" : 1 elseif scale_down = "max" : 2 else : 0 fi ;
+ % save tracingfollowtext ; tracingfollowtext := if getparameter "trace" : 1 else : 0 fi ;
+ interim tracingfollowtext := if getparameter "trace" : 1 else : 0 fi ;
draw followtext (
if (getparameter "reverse") : reverse fi (getparameter "path"),
getparameter "text"
@@ -392,11 +393,11 @@ vardef lmt_do_arrow =
save l ; string l ; l := getparameter "location" ;
save k ; string k ; k := getparameter "kind" ;
save p ; path p ; p := getparameter "path" ;
- save ahvariant ; ahvariant := if a = "dimpled" : 1 elseif a = "curved" : 2 else : 0 fi ;
- save ahdimple ; ahdimple := getparameter "dimple" ;
- save ahscale ; ahscale := getparameter "scale" ;
- save ahangle ; ahangle := getparameter "angle" ;
- save ahlength ; ahlength := getparameter "length" ;
+ interim ahvariant := if a = "dimpled" : 1 elseif a = "curved" : 2 else : 0 fi ;
+ interim ahdimple := getparameter "dimple" ;
+ interim ahscale := getparameter "scale" ;
+ interim ahangle := getparameter "angle" ;
+ interim ahlength := getparameter "length" ;
if not getparameter "headonly" :
draw p ;
fi ;
@@ -992,6 +993,8 @@ vardef OverlayMesh(expr p, s) =
lmt_mesh [ paths = { meshed(p,OverlayBox,s) } ]
enddef ;
+permanent meshed, OverlayMesh ;
+
% charts
presetparameters "chart" [
@@ -1391,33 +1394,34 @@ vardef lmt_do_shade =
color_b := getparameter "colors" 2 ;
fi
if hasparameter "direction" :
- save a, b, bb ; path bb ;
+ save a, b, bb, temp_x, temp_y ; path bb ;
+ temp_x := temp_y := 0 ;
bb := boundingbox(mfun_shade_path) ;
a := b := -1 ;
if string getparameter "direction" :
s := getparameter "direction" ;
if s = "up" :
- p_a := xpart shadedup ;
- p_b := ypart shadedup ;
+ temp_x := xpart shadedup ;
+ temp_y := ypart shadedup ;
elseif s = "down" :
- p_a := xpart shadeddown ;
- p_b := ypart shadeddown ;
+ temp_x := xpart shadeddown ;
+ temp_y := ypart shadeddown ;
elseif s = "left" :
- p_a := xpart shadedleft ;
- p_b := ypart shadedleft ;
+ temp_x := xpart shadedleft ;
+ temp_y := ypart shadedleft ;
elseif s = "right" :
- p_a := xpart shadedright ;
- p_b := ypart shadedright ;
+ temp_x := xpart shadedright ;
+ temp_y := ypart shadedright ;
fi
else :
- p_a := getparameter "direction" 1 ;
- p_a := getparameter "direction" 2 ;
+ temp_x := getparameter "direction" 1 ;
+ temp_y := getparameter "direction" 2 ;
fi
- if p_a >= 0 :
- center_a := point p_a of bb ;
+ if temp_x >= 0 :
+ center_a := point temp_x of bb ;
fi
- if p_b >= 0 :
- center_b := point p_b of bb ;
+ if temp_y >= 0 :
+ center_b := point temp_y of bb ;
fi
fi ;
if hasparameter "center" :
@@ -2082,6 +2086,8 @@ vardef svggray(expr s) =
s
enddef ;
+permanent svgforcecmyk, svgcolor, svgcmyk, svggray ;
+
presetparameters "svg" [
filename = "",
fontname = "",
@@ -2212,12 +2218,53 @@ presetparameters "mpsglyph" [
def lmt_registerglyphs = applyparameters "mpsglyphs" "lmt_do_registerglyphs" enddef ;
def lmt_registerglyph = applyparameters "mpsglyph" "lmt_do_registerglyph" enddef ;
-vardef lmt_do_registerglyphs = lua.mp.lmt_register_glyphs() ; enddef ;
-vardef lmt_do_registerglyph = lua.mp.lmt_register_glyph () ; enddef ;
+newscriptindex mfid_registerglyphs ; mfid_registerglyphs := scriptindex "registerglyphs" ; def lmt_do_registerglyphs = runscript mfid_registerglyphs enddef ;
+newscriptindex mfid_registerglyph ; mfid_registerglyph := scriptindex "registerglyph" ; def lmt_do_registerglyph = runscript mfid_registerglyph enddef ;
+
+% An experimental macro:
+
+vardef registercomposedglyph (expr u) (suffix snippets) =
+ save s ; s := getparameterdefault "mpsfont" "scale" 1 ;
+ save llx, lly, urx, ury ;
+ llx := xpart llcorner snippets[u] ;
+ if llx <> 0 :
+ % this should be an option or we need a lsb
+ snippets[u] := snippets[u] shifted (-llx, 0) ;
+ llx := 0;
+ fi ;
+ lly := ypart llcorner snippets[u] / s ;
+ urx := xpart urcorner snippets[u] / s ;
+ ury := ypart urcorner snippets[u] / s ;
+ lmt_registerglyph [
+ category = getparameter "mpsfont" "category",
+ unicode = u,
+ code = "draw " & str snippets & "[" & decimal u & "]",
+ height = ury,
+ depth = - lly,
+ width = urx - llx,
+ boundingbox = { llx, lly, urx, ury }
+ ] ;
+enddef ;
+
+vardef composeglyph (suffix snippets) =
+ save u ; u := getparameter "mpsfont" "unicode" ;
+ save s ; s := getparameterdefault "mpsfont" "scale" 1 ;
+ snippets[u] := image (
+ for i=1 upto getparametercount "mpsfont" "shapes" :
+ draw scantokens ( getparameter "mpsfont" "shapes" i "shape" )
+ if hasparameter "mpsfont" "shapes" i "color" :
+ withcolor getparameter "mpsfont" "shapes" i "color"
+ fi ;
+ endfor ;
+ ) scaled s ;
+ registercomposedglyph(u, snippets) ;
+enddef ;
+
+permanent registercomposeglyph, composeglyph ;
% Again an experiment (todo: the faster method):
-def lmt_remaptext = runscript("mp.lmt_do_remaptext()") enddef ;
+newscriptindex mfid_remaptext ; mfid_remaptext := scriptindex "remaptext" ; def lmt_remaptext = runscript mfid_remaptext enddef ;
triplet mfun_tt_s ;
@@ -2225,9 +2272,9 @@ vardef rawmaptext(expr s) =
mfun_tt_n := mfun_tt_n + 1 ;
mfun_tt_c := nullpicture ;
mfun_tt_o := nullpicture ;
- addto mfun_tt_o doublepath origin _op_ ; % save drawoptions
- mfun_tt_r := lua.mp.mf_map_text(mfun_tt_n,s) ;
- mfun_tt_s := lua.mp.mf_map_move(mfun_tt_n) ;
+ addto mfun_tt_o doublepath origin base_draw_options ;
+ mfun_tt_r := lua.mp.mf_map_text(mfun_tt_n,s,catcoderegime) ; % can become mfid_maptext
+ mfun_tt_s := lua.mp.mf_map_move(mfun_tt_n) ; % can become mfid_mapmove
addto mfun_tt_c doublepath unitsquare
xscaled wdpart mfun_tt_r
yscaled (htpart mfun_tt_r + dppart mfun_tt_r)
@@ -2256,3 +2303,101 @@ vardef svgtext(expr t) =
enddef ;
vardef svg expr c = lmt_svg [ code = c ] enddef ;
+
+% Fun stuff:
+
+presetparameters "poisson" [
+ width = 50,
+ height = 50,
+ initialx = 0,
+ initialy = 0,
+ distance = 1,
+ count = 20,
+ macro = "draw",
+ arguments = 2
+] ;
+
+def lmt_poisson = applyparameters "poisson" "lmt_do_poisson" enddef ;
+
+vardef lmt_do_poisson =
+ image (
+ pushparameters "poisson" ;
+ lua.mp.lmt_poisson_generate();
+ popparameters ;
+ )
+enddef ;
+
+permanent
+ lmt_text, lmt_grid, lmt_axis, lmt_outline, lmt_followtext,
+ lmt_arrow, lmt_placeholder, % lmt_path,
+ lmt_function, lmt_poisson, lmt_mesh,
+ lmt_chart_circle, lmt_chart_histogram, lmt_chart_bar,
+ lmt_shade, lmt_contour, lmt_svg, lmt_surface,
+ lmt_registerglyphs, lmt_registerglyph,
+ lmt_remaptext, rawmaptext, svgtext, svg,
+ OverlayMesh ;
+
+% nice hack
+
+newscriptindex mfid_scrutenized ; mfid_scrutenized := scriptindex "scrutenized" ;
+
+primarydef p scrutenized n =
+ runscript mfid_scrutenized p n
+enddef ;
+
+permanent scrutenized ;
+
+% for now here
+
+% newscriptindex mfid_mpv_numeric ; mfid_mpv_numeric := scriptindex "mpv_numeric" ;
+% newscriptindex mfid_mpv_dimension ; mfid_mpv_dimension := scriptindex "mpv_dimension" ;
+% newscriptindex mfid_mpv_string ; mfid_mpv_string := scriptindex "mpv_string" ;
+%
+% def mpv_numeric = runscript mfid_mpv_numeric enddef ;
+% def mpv_dimension = runscript mfid_mpv_dimension enddef ;
+% def mpv_string = runscript mfid_mpv_string enddef ;
+%
+% permanent mpv_numeric, mpv_dimension, mpv_string ;
+
+newscriptindex mfid_mpvar ; mfid_mpvar := scriptindex "mpvar" ;
+
+def mpvar = runscript mfid_mpvar enddef ;
+
+permanent mpvar ;
+
+% for old times sake (metafun manual)
+
+vardef textual primary p = false enddef ;
+
+% also for the menafun manual:
+
+newscriptindex mfid_labtorgb ; mfid_labtorgb := scriptindex "labtorgb" ;
+
+def labtorgb(expr l, a, b) = runscript mfid_labtorgb l a b enddef ;
+
+permanent labtorgb ;
+
+presetparameters "labtorgb" [
+ mina = -100,
+ maxa = 100,
+ minb = -100,
+ maxb = 100,
+ step = 5,
+ l = 50,
+] ;
+
+def lmt_labtorgb = applyparameters "labtorgb" "lmt_do_labtorgb" enddef ;
+
+vardef lmt_do_labtorgb =
+ image (
+ pushparameters "labtorgb" ;
+ save l ; l := getparameter "l" ;
+ for a = getparameter "mina" step getparameter "step" until getparameter "maxa" :
+ for b = getparameter "minb" step getparameter "step" until getparameter "maxb" :
+ % draw (a,b) withcolor labtorgb(l,a,b) ;
+ draw (a,b) withcolor runscript mfid_labtorgb l a b ;
+ endfor ;
+ endfor ;
+ popparameters ;
+ )
+enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-luas.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-luas.mpxl
new file mode 100644
index 00000000000..b98305bba59
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-luas.mpxl
@@ -0,0 +1,319 @@
+%D \module
+%D [ file=mp-luas.mpiv,
+%D version=2014.04.14,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=\LUA,
+%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.
+
+if known metafun_loaded_luas : endinput ; fi ;
+
+% When I prototyped the runscript primitive I was just thinking of a usage like
+% the original \directlua primitive in luatex: genererate something and pipe
+% that back to metapost, and have access to some internals. Instead of compiling
+% the code a the metapost end here we delegate that to the lua end. Only strings
+% get passed. Of course in the end the real usage got a bit beyong the intended
+% usage. So, in addition to some definitions here there are and will be use in
+% other metafun modules too. Of course in retrospect I should have done this five
+% years earlier.
+
+newinternal boolean metafun_loaded_luas ; metafun_loaded_luas := true ; immutable metafun_loaded_luas ;
+
+def newscriptindex suffix t = newinternal t ; immutable t ; enddef ;
+
+newscriptindex mfid_scriptindex ; mfid_scriptindex := runscript("mp.mf_script_index('scriptindex')") ;
+
+def scriptindex = runscript mfid_scriptindex enddef ;
+
+string mfun_lua_bs ; mfun_lua_bs := "[===[" ;
+string mfun_lua_es ; mfun_lua_es := "]===]" ;
+
+vardef mlib_luas_luacall(text t) =
+ runscript("" for s = t :
+ if string s :
+ & s
+ % & mfun_lua_bs & s & mfun_lua_es
+ elseif numeric s :
+ & decimal s
+ elseif boolean s :
+ & if s : "true" else : "false" fi
+ elseif pair s :
+ & mfun_pair_to_table(s)
+ elseif path s :
+ & mfun_path_to_table(s)
+ elseif rgbcolor s :
+ & mfun_rgb_to_table(s)
+ elseif cmykcolor s :
+ & mfun_cmyk_to_table(s)
+ else :
+ & ditto & tostring(s) & ditto
+ fi endfor
+ )
+enddef ;
+
+newinternal mfun_luas_b ;
+
+def mlib_luas_luadone =
+ exitif numeric begingroup mfun_luas_b := 1 ; endgroup ;
+enddef ;
+
+vardef mlib_luas_lualist(expr c)(text t) = % we could use mlib_luas_s instead of c
+ interim mfun_luas_b := 0 ;
+ runscript(c & for s = t :
+ if mfun_luas_b = 0 :
+ "("
+ % hide(mfun_luas_b := 1)
+ mlib_luas_luadone
+ else :
+ ","
+ fi
+ &
+ if string s :
+ mfun_lua_bs & s & mfun_lua_es
+ elseif numeric s :
+ decimal s
+ elseif boolean s :
+ if s : "true" else : "false" fi
+ elseif pair s :
+ mfun_pair_to_table(s)
+ elseif path s :
+ mfun_path_to_table(s)
+ elseif rgbcolor s :
+ mfun_rgb_to_table(s)
+ elseif cmykcolor s :
+ mfun_cmyk_to_table(s)
+ else :
+ ditto & tostring(s) & ditto
+ fi & endfor if mfun_luas_b = 0 : "()" else : ")" fi
+ )
+enddef ;
+
+def luacall = mlib_luas_luacall enddef ; % why no let
+
+vardef lualist@#(text t) = mlib_luas_lualist(str @#)(t) enddef ;
+
+string mlib_luas_s ; % saves save/restore
+
+vardef lua@#(text t) =
+ mlib_luas_s := str @# ;
+ if length(mlib_luas_s) > 0 :
+ mlib_luas_lualist(mlib_luas_s,t)
+ else :
+ mlib_luas_luacall(t)
+ fi
+enddef ;
+
+vardef MP@#(text t) =
+ mlib_luas_lualist("MP." & str @#,t)
+enddef ;
+
+def message expr t =
+ lua.mp.report(tostring(t)) ;
+enddef ;
+
+permanent newscriptindex, scriptindex, luacall, lua, lualist, mp, MP ;
+
+% Color:
+
+% We do a low level runscript:
+%
+% lua.mp.namedcolor(s) % conflicts with macro namedcolor
+% lua.mp.mf_named_color(s) % okay but, can also be
+% lua.mp("mf_named_color",s) % which gives expansion mess
+
+newscriptindex mfid_resolvedcolor ; mfid_resolvedcolor := scriptindex "namedcolor" ;
+
+def resolvedcolor = runscript mfid_resolvedcolor enddef ;
+
+permanent resolvedcolor ;
+
+% Modes:
+
+vardef texmode (expr s) = lua.mp("mode", s) enddef ;
+vardef systemmode(expr s) = lua.mp("systemmode",s) enddef ;
+
+permanent texmode, systemmode ;
+
+% A few helpers
+
+vardef isarray suffix a = lua.mp.isarray (str a) enddef ;
+vardef prefix suffix a = lua.mp.prefix (str a) enddef ;
+vardef dimension suffix a = lua.mp.dimension(str a) enddef ;
+
+permanent isarray, prefix, dimension ;
+
+% More access
+
+newscriptindex mfid_getmacro ; mfid_getmacro := scriptindex "getmacro" ; def getmacro = runscript mfid_getmacro enddef ;
+newscriptindex mfid_getdimen ; mfid_getdimen := scriptindex "getdimen" ; def getdimen = runscript mfid_getdimen enddef ;
+newscriptindex mfid_getcount ; mfid_getcount := scriptindex "getcount" ; def getcount = runscript mfid_getcount enddef ;
+newscriptindex mfid_gettoks ; mfid_gettoks := scriptindex "gettoks" ; def gettoks = runscript mfid_gettoks enddef ;
+
+% todo: figure out a mixed interface: setdimen "foo" 123pt ; setdimen("foo", 123pt) ;
+
+newscriptindex mfid_setmacro ; mfid_setmacro := scriptindex "setmacro" ; def setmacro(expr k, v) = runscript mfid_setmacro k v ; enddef ;
+newscriptindex mfid_setdimen ; mfid_setdimen := scriptindex "setdimen" ; def setdimen(expr k, v) = runscript mfid_setdimen k v ; enddef ;
+newscriptindex mfid_setcount ; mfid_setcount := scriptindex "setcount" ; def setcount(expr k, v) = runscript mfid_setcount k v ; enddef ;
+newscriptindex mfid_settoks ; mfid_settoks := scriptindex "settoks" ; def settoks (expr k, v) = runscript mfid_settoks k v ; enddef ;
+
+newscriptindex mfid_setglobalmacro ; mfid_setglobalmacro := scriptindex "setglobalmacro" ; def setglobalmacro(expr k, v) = runscript mfid_setglobalmacro k v ; enddef ;
+newscriptindex mfid_setglobaldimen ; mfid_setglobaldimen := scriptindex "setglobaldimen" ; def setglobaldimen(expr k, v) = runscript mfid_setglobaldimen k v ; enddef ;
+newscriptindex mfid_setglobalcount ; mfid_setglobalcount := scriptindex "setglobalcount" ; def setglobalcount(expr k, v) = runscript mfid_setglobalcount k v ; enddef ;
+newscriptindex mfid_setglobaltoks ; mfid_setglobaltoks := scriptindex "setglobaltoks" ; def setglobaltoks (expr k, v) = runscript mfid_setglobaltoks k v ; enddef ;
+
+permanent
+ getmacro, getdimen, getcount, gettoks,
+ setmacro, setdimen, setcount, settoks,
+ setglobalmacro, setglobaldimen, setglobalcount, setglobaltoks ;
+
+vardef positionpath (expr name) = lua.mp.positionpath (name) enddef ;
+vardef positioncurve (expr name) = lua.mp.positioncurve (name) enddef ;
+vardef positionxy (expr name) = lua.mp.positionxy (name) enddef ;
+vardef positionpxy (expr name) = lua.mp.positionpxy (name) enddef ;
+vardef positionwhd (expr name) = lua.mp.positionwhd (name) enddef ;
+vardef positionpage (expr name) = lua.mp.positionpage (name) enddef ;
+vardef positionregion(expr name) = lua.mp.positionregion(name) enddef ;
+vardef positionbox (expr name) = lua.mp.positionbox (name) enddef ;
+vardef positionanchor = lua.mp.positionanchor() enddef ;
+
+vardef positioninregion =
+ currentpicture := currentpicture shifted - positionxy(positionanchor) ;
+enddef ;
+
+vardef positionatanchor(expr name) =
+ currentpicture := currentpicture shifted - positionxy(name) ;
+enddef ;
+
+permanent positionpath, positioncurve, positionxy, positionpxy, positionwhd, positionpage,
+ positionregion, positionbox, positionanchor, positioninregion, positionatanchor ;
+
+let wdpart = redpart ;
+let htpart = greenpart ;
+let dppart = bluepart ;
+
+permanent wdpart, htpart, dppart;
+
+vardef texvar(expr name) = lua.mp.texvar(name) enddef ;
+vardef texstr(expr name) = lua.mp.texstr(name) enddef ;
+
+newscriptindex mfid_path_lengthof ; mfid_path_lengthof := scriptindex "pathlengthof" ;
+newscriptindex mfid_path_pointof ; mfid_path_pointof := scriptindex "pathpointof" ;
+newscriptindex mfid_path_leftof ; mfid_path_leftof := scriptindex "pathleftof" ;
+newscriptindex mfid_path_rightof ; mfid_path_rightof := scriptindex "pathrightof" ;
+newscriptindex mfid_path_reset ; mfid_path_reset := scriptindex "pathreset" ;
+
+% 25 pct gain
+
+ def inpath = = 1 step 1 until runscript mfid_path_lengthof enddef ;
+vardef pointof primary i = runscript mfid_path_pointof i enddef ;
+vardef leftof primary i = runscript mfid_path_leftof i enddef ;
+vardef rightof primary i = runscript mfid_path_rightof i enddef ;
+
+permanent inpath, pointof, leftof, rightof ;
+
+% another 10 pct gain
+
+% def inpath = = 1 step 1 until runscript mfid_path_lengthof enddef ;
+% def pointof = runscript mfid_path_pointof enddef ;
+% def leftof = runscript mfid_path_leftof enddef ;
+% def rightof = runscript mfid_path_rightof enddef ;
+
+extra_endfig := extra_endfig & " runscript mfid_path_reset ; " ;
+
+newscriptindex mfid_utfnum ; mfid_utfnum := scriptindex "utfnum" ;
+newscriptindex mfid_utflen ; mfid_utflen := scriptindex "utflen" ;
+newscriptindex mfid_utfsub ; mfid_utfsub := scriptindex "utfsub" ;
+
+% def utfnum = runscript mfid_utfnum enddef ;
+% def utflen = runscript mfid_utflen enddef ;
+% def utfsub = runscript mfid_utfsub enddef ;
+
+vardef utfnum expr s = runscript mfid_utfnum s enddef ; % str
+vardef utflen expr s = runscript mfid_utflen s enddef ; % str
+vardef utfsub(text t) = runscript mfid_utfsub t enddef ; % str, first, (optional) last
+
+permanent utfnum, utflen, utfsub ;
+
+newscriptindex mfid_getparameters ; mfid_getparameters := scriptindex "getparameters" ;
+newscriptindex mfid_presetparameters ; mfid_presetparameters := scriptindex "presetparameters" ;
+newscriptindex mfid_hasparameter ; mfid_hasparameter := scriptindex "hasparameter" ;
+newscriptindex mfid_hasoption ; mfid_hasoption := scriptindex "hasoption" ;
+newscriptindex mfid_getparameter ; mfid_getparameter := scriptindex "getparameter" ;
+newscriptindex mfid_getparameterdefault ; mfid_getparameterdefault := scriptindex "getparameterdefault" ;
+newscriptindex mfid_getparametercount ; mfid_getparametercount := scriptindex "getparametercount" ;
+newscriptindex mfid_getmaxparametercount ; mfid_getmaxparametercount := scriptindex "getmaxparametercount" ;
+newscriptindex mfid_getparameterpath ; mfid_getparameterpath := scriptindex "getparameterpath" ;
+newscriptindex mfid_getparameterpen ; mfid_getparameterpen := scriptindex "getparameterpen" ;
+newscriptindex mfid_getparametertext ; mfid_getparametertext := scriptindex "getparametertext" ;
+% mfid_getparameteroption ; mfid_getparameteroption := scriptindex "getparameteroption" ;
+newscriptindex mfid_applyparameters ; mfid_applyparameters := scriptindex "applyparameters" ;
+newscriptindex mfid_pushparameters ; mfid_pushparameters := scriptindex "pushparameters" ;
+newscriptindex mfid_popparameters ; mfid_popparameters := scriptindex "popparameters" ;
+
+def getparameters = runscript mfid_getparameters enddef ;
+def presetparameters = runscript mfid_presetparameters enddef ;
+def hasparameter = runscript mfid_hasparameter enddef ;
+def hasoption = runscript mfid_hasoption enddef ;
+def getparameter = runscript mfid_getparameter enddef ;
+def getparameterdefault = runscript mfid_getparameterdefault enddef ;
+def getparametercount = runscript mfid_getparametercount enddef ;
+def getmaxparametercount = runscript mfid_getmaxparametercount enddef ;
+def getparameterpath = runscript mfid_getparameterpath enddef ;
+def getparameterpen = runscript mfid_getparameterpen enddef ;
+def getparametertext = runscript mfid_getparametertext enddef ;
+% getparameteroption = runscript mfid_getparameteroption enddef ;
+def applyparameters = runscript mfid_applyparameters enddef ;
+def pushparameters = runscript mfid_pushparameters enddef ;
+def popparameters = runscript mfid_popparameters enddef ;
+
+permanent getparameters, presetparameters, hasparameter, hasoption, getparameter, getparameterdefault,
+ getparametercount, getmaxparametercount, getparameterpath, getparameterpen, getparametertext, % getparameteroption,
+ applyparameters, pushparameters, popparameters ;
+
+% No vardef's because we need to scan for an assignment too and we'll see
+% an endgroup otherwise.
+
+newscriptindex mfid_year ; mfid_year := scriptindex "year" ; def year = runscript mfid_year enddef ;
+newscriptindex mfid_month ; mfid_month := scriptindex "month" ; def month = runscript mfid_month enddef ;
+newscriptindex mfid_day ; mfid_day := scriptindex "day" ; def day = runscript mfid_day enddef ;
+newscriptindex mfid_hour ; mfid_hour := scriptindex "hour" ; def hour = runscript mfid_hour enddef ;
+newscriptindex mfid_minute ; mfid_minute := scriptindex "minute" ; def minute = runscript mfid_minute enddef ;
+newscriptindex mfid_second ; mfid_second := scriptindex "second" ; def second = runscript mfid_second enddef ;
+
+permanent year, month, day, hour, minute, second ; % overloaded
+
+% You cannot overload a local color bu using a prefix works ok:
+%
+% \definecolor [ name = "mp:myred", r = .9 ] ;
+
+newscriptindex mfid_definecolor ; mfid_definecolor := scriptindex "definecolor" ;
+
+def definecolor = runscript mfid_definecolor ; enddef ; % the semicolon prevents lookahead
+
+permanent definecolor ;
+
+% showproperty fullcircle ;
+% showhashentry "fullcircle" ;
+
+newscriptindex mfid_showproperty ; mfid_showproperty := scriptindex("showproperty") ;
+newscriptindex mfid_showhashentry ; mfid_showhashentry := scriptindex("showhashentry") ;
+
+def showproperty = runscript mfid_showproperty enddef ;
+def showhashentry = runscript mfid_showhashentry enddef ;
+
+permanent showproperty, showhashentry ;
+
+newscriptindex mfid_textextanchor ; mfid_textextanchor := scriptindex("textextanchor") ;
+
+def textextanchor = runscript mfid_textextanchor enddef ;
+
+vardef textextanchor(expr p) =
+ runscript mfid_textextanchor (prescriptpart p)
+enddef ;
+
+permanent textextanchor ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-math.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-math.mpxl
new file mode 100644
index 00000000000..cfe9e55e672
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-math.mpxl
@@ -0,0 +1,183 @@
+%D \module
+%D [ file=mp-math.mpiv,
+%D version=2019.07.26, % was mp-core: 1999.08.01, anchoring
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=extra math functions,
+%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.
+
+if known metafun_loaded_math : endinput ; fi ;
+
+newinternal boolean metafun_loaded_math ; metafun_loaded_math := true ; immutable metafun_loaded_math ;
+
+% draw textext(decimal runscript("mp.numeric(xmath.gamma(.12))")) ;
+
+newscriptindex mfid_m_acos ; mfid_m_acos := scriptindex "m_acos" ; def m_acos = runscript mfid_m_acos enddef ;
+newscriptindex mfid_m_acosh ; mfid_m_acosh := scriptindex "m_acosh" ; def m_acosh = runscript mfid_m_acosh enddef ;
+newscriptindex mfid_m_asin ; mfid_m_asin := scriptindex "m_asin" ; def m_asin = runscript mfid_m_asin enddef ;
+newscriptindex mfid_m_asinh ; mfid_m_asinh := scriptindex "m_asinh" ; def m_asinh = runscript mfid_m_asinh enddef ;
+newscriptindex mfid_m_atan ; mfid_m_atan := scriptindex "m_atan" ; def m_atan = runscript mfid_m_atan enddef ;
+newscriptindex mfid_m_atantwo ; mfid_m_atantwo := scriptindex "m_atan2" ; def m_atantwo = runscript mfid_m_atantwo enddef ; % atan2
+newscriptindex mfid_m_atanh ; mfid_m_atanh := scriptindex "m_atanh" ; def m_atanh = runscript mfid_m_atanh enddef ;
+newscriptindex mfid_m_cbrt ; mfid_m_cbrt := scriptindex "m_cbrt" ; def m_cbrt = runscript mfid_m_cbrt enddef ;
+newscriptindex mfid_m_ceil ; mfid_m_ceil := scriptindex "m_ceil" ; def m_ceil = runscript mfid_m_ceil enddef ;
+newscriptindex mfid_m_copysign ; mfid_m_copysign := scriptindex "m_copysign" ; def m_copysign = runscript mfid_m_copysign enddef ;
+newscriptindex mfid_m_cos ; mfid_m_cos := scriptindex "m_cos" ; def m_cos = runscript mfid_m_cos enddef ;
+newscriptindex mfid_m_cosh ; mfid_m_cosh := scriptindex "m_cosh" ; def m_cosh = runscript mfid_m_cosh enddef ;
+newscriptindex mfid_m_deg ; mfid_m_deg := scriptindex "m_deg" ; def m_deg = runscript mfid_m_deg enddef ;
+newscriptindex mfid_m_erf ; mfid_m_erf := scriptindex "m_erf" ; def m_erf = runscript mfid_m_erf enddef ;
+newscriptindex mfid_m_erfc ; mfid_m_erfc := scriptindex "m_erfc" ; def m_erfc = runscript mfid_m_erfc enddef ;
+newscriptindex mfid_m_exp ; mfid_m_exp := scriptindex "m_exp" ; def m_exp = runscript mfid_m_exp enddef ;
+newscriptindex mfid_m_exptwo ; mfid_m_exptwo := scriptindex "m_exp2" ; def m_exptwo = runscript mfid_m_exptwo enddef ; % exp2
+newscriptindex mfid_m_expm ; mfid_m_expm := scriptindex "m_expm1" ; def m_expm = runscript mfid_m_expm enddef ; % expm1
+newscriptindex mfid_m_fabs ; mfid_m_fabs := scriptindex "m_fabs" ; def m_fabs = runscript mfid_m_fabs enddef ;
+newscriptindex mfid_m_fdim ; mfid_m_fdim := scriptindex "m_fdim" ; def m_fdim = runscript mfid_m_fdim enddef ;
+newscriptindex mfid_m_floor ; mfid_m_floor := scriptindex "m_floor" ; def m_floor = runscript mfid_m_floor enddef ;
+newscriptindex mfid_m_fma ; mfid_m_fma := scriptindex "m_fma" ; def m_fma = runscript mfid_m_fma enddef ;
+newscriptindex mfid_m_fmax ; mfid_m_fmax := scriptindex "m_fmax" ; def m_fmax = runscript mfid_m_fmax enddef ;
+newscriptindex mfid_m_fmin ; mfid_m_fmin := scriptindex "m_fmin" ; def m_fmin = runscript mfid_m_fmin enddef ;
+newscriptindex mfid_m_fmod ; mfid_m_fmod := scriptindex "m_fmod" ; def m_fmod = runscript mfid_m_fmod enddef ;
+newscriptindex mfid_m_frexp ; mfid_m_frexp := scriptindex "m_frexp" ; def m_frexp = runscript mfid_m_frexp enddef ;
+newscriptindex mfid_m_gamma ; mfid_m_gamma := scriptindex "m_gamma" ; def m_gamma = runscript mfid_m_gamma enddef ;
+newscriptindex mfid_m_hypot ; mfid_m_hypot := scriptindex "m_hypot" ; def m_hypot = runscript mfid_m_hypot enddef ;
+newscriptindex mfid_m_isfinite ; mfid_m_isfinite := scriptindex "m_isfinite" ; def m_isfinite = runscript mfid_m_isfinite enddef ;
+newscriptindex mfid_m_isinf ; mfid_m_isinf := scriptindex "m_isinf" ; def m_isinf = runscript mfid_m_isinf enddef ;
+newscriptindex mfid_m_isnan ; mfid_m_isnan := scriptindex "m_isnan" ; def m_isnan = runscript mfid_m_isnan enddef ;
+newscriptindex mfid_m_isnormal ; mfid_m_isnormal := scriptindex "m_isnormal" ; def m_isnormal = runscript mfid_m_isnormal enddef ;
+newscriptindex mfid_m_jz ; mfid_m_jz := scriptindex "m_j0" ; def m_jz = runscript mfid_m_jz enddef ; % j0
+newscriptindex mfid_m_j ; mfid_m_j := scriptindex "m_j1" ; def m_j = runscript mfid_m_j enddef ; % j1
+newscriptindex mfid_m_jn ; mfid_m_jn := scriptindex "m_jn" ; def m_jn = runscript mfid_m_jn enddef ;
+newscriptindex mfid_m_ldexp ; mfid_m_ldexp := scriptindex "m_ldexp" ; def m_ldexp = runscript mfid_m_ldexp enddef ;
+newscriptindex mfid_m_lgamma ; mfid_m_lgamma := scriptindex "m_lgamma" ; def m_lgamma = runscript mfid_m_lgamma enddef ;
+newscriptindex mfid_m_log ; mfid_m_log := scriptindex "m_log" ; def m_log = runscript mfid_m_log enddef ;
+newscriptindex mfid_m_logten ; mfid_m_logten := scriptindex "m_log10" ; def m_logten = runscript mfid_m_logten enddef ; % log10
+newscriptindex mfid_m_logp ; mfid_m_logp := scriptindex "m_log1p" ; def m_logp = runscript mfid_m_logp enddef ; % log1p
+newscriptindex mfid_m_logtwo ; mfid_m_logtwo := scriptindex "m_log2" ; def m_logtwo = runscript mfid_m_logtwo enddef ; % log2
+newscriptindex mfid_m_logb ; mfid_m_logb := scriptindex "m_logb" ; def m_logb = runscript mfid_m_logb enddef ;
+newscriptindex mfid_m_modf ; mfid_m_modf := scriptindex "m_modf" ; def m_modf = runscript mfid_m_modf enddef ;
+newscriptindex mfid_m_nearbyint ; mfid_m_nearbyint := scriptindex "m_nearbyint" ; def m_nearbyint = runscript mfid_m_nearbyint enddef ;
+newscriptindex mfid_m_nextafter ; mfid_m_nextafter := scriptindex "m_nextafter" ; def m_nextafter = runscript mfid_m_nextafter enddef ;
+newscriptindex mfid_m_pow ; mfid_m_pow := scriptindex "m_pow" ; def m_pow = runscript mfid_m_pow enddef ;
+newscriptindex mfid_m_rad ; mfid_m_rad := scriptindex "m_rad" ; def m_rad = runscript mfid_m_rad enddef ;
+newscriptindex mfid_m_remainder ; mfid_m_remainder := scriptindex "m_remainder" ; def m_remainder = runscript mfid_m_remainder enddef ;
+newscriptindex mfid_m_remquo ; mfid_m_remquo := scriptindex "m_remquo" ; def m_remquo = runscript mfid_m_remquo enddef ;
+newscriptindex mfid_m_round ; mfid_m_round := scriptindex "m_round" ; def m_round = runscript mfid_m_round enddef ;
+newscriptindex mfid_m_scalbn ; mfid_m_scalbn := scriptindex "m_scalbn" ; def m_scalbn = runscript mfid_m_scalbn enddef ;
+newscriptindex mfid_m_sin ; mfid_m_sin := scriptindex "m_sin" ; def m_sin = runscript mfid_m_sin enddef ;
+newscriptindex mfid_m_sinh ; mfid_m_sinh := scriptindex "m_sinh" ; def m_sinh = runscript mfid_m_sinh enddef ;
+newscriptindex mfid_m_sqrt ; mfid_m_sqrt := scriptindex "m_sqrt" ; def m_sqrt = runscript mfid_m_sqrt enddef ;
+newscriptindex mfid_m_tan ; mfid_m_tan := scriptindex "m_tan" ; def m_tan = runscript mfid_m_tan enddef ;
+newscriptindex mfid_m_tanh ; mfid_m_tanh := scriptindex "m_tanh" ; def m_tanh = runscript mfid_m_tanh enddef ;
+newscriptindex mfid_m_tgamma ; mfid_m_tgamma := scriptindex "m_tgamma" ; def m_tgamma = runscript mfid_m_tgamma enddef ;
+newscriptindex mfid_m_trunc ; mfid_m_trunc := scriptindex "m_trunc" ; def m_trunc = runscript mfid_m_trunc enddef ;
+newscriptindex mfid_m_yz ; mfid_m_yz := scriptindex "m_y0" ; def m_yz = runscript mfid_m_yz enddef ; % y0
+newscriptindex mfid_m_y ; mfid_m_y := scriptindex "m_y1" ; def m_y = runscript mfid_m_y enddef ; % y1
+newscriptindex mfid_m_yn ; mfid_m_yn := scriptindex "m_yn" ; def m_yn = runscript mfid_m_yn enddef ;
+
+newscriptindex mfid_c_sin ; mfid_c_sin := scriptindex "c_sin" ; def c_sin = runscript mfid_c_sin enddef ;
+newscriptindex mfid_c_cos ; mfid_c_cos := scriptindex "c_cos" ; def c_cos = runscript mfid_c_cos enddef ;
+newscriptindex mfid_c_tan ; mfid_c_tan := scriptindex "c_tan" ; def c_tan = runscript mfid_c_tan enddef ;
+newscriptindex mfid_c_sinh ; mfid_c_sinh := scriptindex "c_sinh" ; def c_sinh = runscript mfid_c_sinh enddef ;
+newscriptindex mfid_c_cosh ; mfid_c_cosh := scriptindex "c_cosh" ; def c_cosh = runscript mfid_c_cosh enddef ;
+newscriptindex mfid_c_tanh ; mfid_c_tanh := scriptindex "c_tanh" ; def c_tanh = runscript mfid_c_tanh enddef ;
+
+newscriptindex mfid_c_asin ; mfid_c_asin := scriptindex "c_asin" ; def c_asin = runscript mfid_c_asin enddef ;
+newscriptindex mfid_c_acos ; mfid_c_acos := scriptindex "c_acos" ; def c_acos = runscript mfid_c_acos enddef ;
+newscriptindex mfid_c_atan ; mfid_c_atan := scriptindex "c_atan" ; def c_atan = runscript mfid_c_atan enddef ;
+newscriptindex mfid_c_asinh ; mfid_c_asinh := scriptindex "c_asinh" ; def c_asinh = runscript mfid_c_asinh enddef ;
+newscriptindex mfid_c_acosh ; mfid_c_acosh := scriptindex "c_acosh" ; def c_acosh = runscript mfid_c_acosh enddef ;
+newscriptindex mfid_c_atanh ; mfid_c_atanh := scriptindex "c_atanh" ; def c_atanh = runscript mfid_c_atanh enddef ;
+
+newscriptindex mfid_c_sqrt ; mfid_c_sqrt := scriptindex "c_sqrt" ; def c_sqrt = runscript mfid_c_sqrt enddef ;
+newscriptindex mfid_c_abs ; mfid_c_abs := scriptindex "c_abs" ; def c_abs = runscript mfid_c_abs enddef ;
+newscriptindex mfid_c_arg ; mfid_c_arg := scriptindex "c_arg" ; def c_arg = runscript mfid_c_arg enddef ;
+newscriptindex mfid_c_conj ; mfid_c_conj := scriptindex "c_conj" ; def c_conj = runscript mfid_c_conj enddef ;
+newscriptindex mfid_c_exp ; mfid_c_exp := scriptindex "c_exp" ; def c_exp = runscript mfid_c_exp enddef ;
+newscriptindex mfid_c_log ; mfid_c_log := scriptindex "c_log" ; def c_log = runscript mfid_c_log enddef ;
+newscriptindex mfid_c_proj ; mfid_c_proj := scriptindex "c_proj" ; def c_proj = runscript mfid_c_proj enddef ;
+
+newscriptindex mfid_c_erf ; mfid_c_erf := scriptindex "c_erf" ; def c_erf = runscript mfid_c_erf enddef ;
+newscriptindex mfid_c_erfc ; mfid_c_erfc := scriptindex "c_erfc" ; def c_erfc = runscript mfid_c_erfc enddef ;
+newscriptindex mfid_c_erfcx ; mfid_c_erfcx := scriptindex "c_erfcx" ; def c_erfcx = runscript mfid_c_erfcx enddef ;
+newscriptindex mfid_c_erfi ; mfid_c_erfi := scriptindex "c_erfi" ; def c_erfi = runscript mfid_c_erfi enddef ;
+
+% mfid_c_imag ; mfid_c_acos := scriptindex "c_imag" ; def c_imag = runscript mfid_c_imag enddef ;
+% mfid_c_real ; mfid_c_acos := scriptindex "c_real" ; def c_real = runscript mfid_c_real enddef ;
+% mfid_c_neg ; mfid_c_neg := scriptindex "c_neg" ; def c_neg = runscript mfid_c_neg enddef ;
+
+newscriptindex mfid_c_pow ; mfid_c_pow := scriptindex "c_pow" ; def c_pow (expr a,b) = runscript mfid_c_pow a b enddef ;
+% mfid_c_add ; mfid_c_add := scriptindex "c_add" ; def c_add (expr a,b) = runscript mfid_c_add a b enddef ;
+% mfid_c_sub ; mfid_c_sub := scriptindex "c_sub" ; def c_sub (expr a,b) = runscript mfid_c_sub a b enddef ;
+newscriptindex mfid_c_mul ; mfid_c_mul := scriptindex "c_mul" ; def c_mul (expr a,b) = runscript mfid_c_mul a b enddef ;
+newscriptindex mfid_c_div ; mfid_c_div := scriptindex "c_div" ; def c_div (expr a,b) = runscript mfid_c_div a b enddef ;
+
+newscriptindex mfid_c_voigt ; mfid_c_voigt := scriptindex "c_voigt" ; def c_voigt (expr a,b,c) = runscript mfid_c_voigt a b c enddef ;
+newscriptindex mfid_c_voigt_hwhm ; mfid_c_voigt_hwhm := scriptindex "c_voigt_hwhm" ; def c_voigt_hwhm(expr a,b) = runscript mfid_c_voigt_hwhm a b enddef ;
+
+vardef c_add (expr a, b) = a + b enddef ;
+vardef c_sub (expr a, b) = a + b enddef ;
+vardef c_imag(expr a) = ypart a enddef ;
+vardef c_real(expr a) = xpart a enddef ;
+vardef c_neg (expr a) = -a enddef ;
+
+if (numbersystem == "scaled") or (numbersystem == "double") :
+
+ % vardef sqrt primary x = m_sqrt x enddef ;
+
+ % vardef sqr primary x = x*x enddef ;
+ % vardef log primary x = if x=0: 0 else: mlog(x)/mlog(10) fi enddef ;
+ % vardef ln primary x = if x=0: 0 else: mlog(x)/256 fi enddef ;
+ % vardef exp primary x = (mexp 256)**x enddef ;
+ % vardef inv primary x = if x=0: 0 else: x**-1 fi enddef ;
+
+ vardef sin primary x = m_sin x enddef ; vardef sinh primary x = m_sinh x enddef ;
+ vardef cos primary x = m_cos x enddef ; vardef cosh primary x = m_cosh x enddef ;
+ vardef tan primary x = m_tan x enddef ; vardef tanh primary x = m_tanh x enddef ;
+ vardef asin primary x = m_asin x enddef ; vardef asinh primary x = m_asinh x enddef ;
+ vardef acos primary x = m_acos x enddef ; vardef acosh primary x = m_acosh x enddef ;
+ vardef atan primary x = m_atan x enddef ; vardef atanh primary x = m_atanh x enddef ;
+
+ vardef invsin primary x = (m_asin(x))/radian enddef ;
+ vardef invcos primary x = (m_acos(x))/radian enddef ;
+ vardef invtan primary x = (m_atan(x))/radian enddef ;
+
+ % vardef sind primary x = angle(m_sin x) enddef ;
+ % vardef cosd primary x = angle(m_cos x) enddef ;
+ % vardef tand primary x = angle(m_tan x) enddef ;
+
+ vardef asind primary x = angle(m_asin x) enddef ;
+ vardef acosd primary x = angle(m_acos x) enddef ;
+ vardef atand primary x = angle(m_atan x) enddef ;
+
+ % vardef tand primary x = sind(x)/cosd(x) enddef ;
+ % vardef cotd primary x = cosd(x)/sind(x) enddef ;
+
+ permanent sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh, invsin, invcos, invtan, asind, acosd, atand ;
+
+fi ;
+
+permanent
+ m_acos, m_acosh, m_asin, m_asinh, m_atan, m_atantwo, m_atanh, m_cbrt, m_ceil,
+ m_copysign, m_cos, m_cosh, m_deg, m_erf, m_erfc, m_exp, m_exptwo, m_expm, m_fabs,
+ m_fdim, m_floor, m_fma, m_fmax, m_fmin, m_fmod, m_frexp, m_gamma, m_hypot,
+ m_isfinite, m_isinf, m_isnan, m_isnormal, m_jz, m_j, m_jn, m_ldexp, m_lgamma,
+ m_log, m_logten, m_logp, m_logtwo, m_logb, m_modf, m_nearbyint, m_nextafter,
+ m_pow, m_rad, m_remainder, m_remquo, m_round, m_scalbn, m_sin, m_sinh, m_sqrt,
+ m_tan, m_tanh, m_tgamma, m_trunc, m_yz, m_y, m_yn,
+
+ c_sin, c_cos, c_tan, c_sinh, c_cosh, c_tanh, c_asin, c_acos, c_atan, c_asinh,
+ c_acosh, c_atanh, c_sqrt, c_abs, c_arg, c_conj, c_exp, c_log, c_proj, c_erf,
+ c_erfc, c_erfcx, c_erfi, c_imag, c_real, c_neg, c_pow, c_add, c_sub, c_mul,
+ c_div, c_voigt, c_voigt_hwhm, c_add, c_sub, c_imag, c_real, c_neg,
+
+ % sqrt, sind, cosd, % these are primitives
+
+ sqr, log, ln, exp, inv, sin, cos, tan, asin, acos, atan, invsin, invcos, invtan,
+ tand, asind, acosd, atand, tand, cotd
+;
+
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-miss.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-miss.mpxl
new file mode 100644
index 00000000000..0788fece4ca
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-miss.mpxl
@@ -0,0 +1,68 @@
+%D \module
+%D [ file=mp-miss.mpiv,
+%D version=2021.02.01,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=missing glyphs,
+%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.
+
+if known metafun_loaded_miss : endinput ; fi ;
+
+newinternal boolean metafun_loaded_miss ; metafun_loaded_miss := true ; immutable metafun_loaded_miss ;
+
+picture MissingSnippets[][];
+
+vardef MissingGlyphSymbol(expr w, h, d) =
+ image (
+ draw (0,-d)--(w,-d)--(w,h)--(0,h)--cycle ;
+ if d <> 0 : draw (0,0)--(w,0) ;
+ )
+enddef ;
+
+vardef MissingLowercase = image ( draw MissingGlyphSymbol(.45, .55, .20) scaled 1000 ; ) enddef ;
+vardef MissingUppercase = image ( draw MissingGlyphSymbol(.65, .70, .25) scaled 1000 ; ) enddef ;
+vardef MissingMark = image ( draw MissingGlyphSymbol(.15, .70, -.50) scaled 1000 ; ) enddef ;
+vardef MissingPunctuation = image ( draw MissingGlyphSymbol(.15, .55, .20) scaled 1000 ; ) enddef ;
+vardef MissingUnknown = image ( draw MissingGlyphSymbol(.45, .20, 0) scaled 1000 ; ) enddef ;
+
+% vardef MissingGlyph =
+% pickup pencircle scaled 0.05 ;
+% composeglyph(MissingSnippets[getparameterdefault "mpsfont" "namespace" 1]) ;
+% enddef ;
+
+vardef MissingGlyph =
+ save u ; u := getparameterdefault "mpsfont" "unicode" 1;
+ save s ; s := getparameterdefault "mpsfont" "scale" 1 ;
+ save n ; n := getparameterdefault "mpsfont" "namespace" 1 ;
+ save i ; i := getparameterdefault "mpsfont" "slant" 0 ;
+ save w ; w := getparameterdefault "mpsfont" "weight" 1 ;
+ pickup pencircle scaled (0.05 * w) ;
+ MissingSnippets[n][u] := image (
+ draw scantokens ( getparameter "mpsfont" "shapes" (1) "shape" )
+ withcolor getparameter "mpsfont" "shapes" (1) "color"
+ ) scaled s slanted i ;
+ registercomposedglyph(u, MissingSnippets[n]) ;
+enddef ;
+
+lmt_registerglyphs [
+ name = "missing",
+ units = 1000,
+ width = 100,
+ height = 100,
+ depth = 0,
+] ;
+
+% we need to set up some basics (signals to the backend and such) at definition
+% time so we just force a bogus shape (zero)
+
+lmt_registerglyph [
+ category = "missing",
+] ;
+
+permanent MissingSnippets, MissingGlyphSymbol, MissingLowercase, MissingUppercase,
+ MissingMark, MissingPunctuation, MissingUnknown, MissingGlyph ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-mlib.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-mlib.mpxl
new file mode 100644
index 00000000000..ce0d14b411e
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-mlib.mpxl
@@ -0,0 +1,1830 @@
+%D \module
+%D [ file=mp-mlib.mpiv,
+%D version=2008.03.21,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=plugins,
+%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 licen-en.pdf for
+%C details.
+
+if known metafun_loaded_mlib : endinput ; fi ;
+
+newinternal boolean metafun_loaded_mlib ; metafun_loaded_mlib := true ; immutable metafun_loaded_mlib ;
+
+% numeric LUATEXFUNCTIONALITY ; LUATEXFUNCTIONALITY := runscript("mp.print(LUATEXFUNCTIONALITY or (status and status.development_id) or 6346)") ;
+
+%D Objects:
+
+vardef isobject expr p =
+ if picture p :
+ % lua.mp.isobject(prescriptpart p)
+ runscript("mp.isobject(" & prescriptpart p & ")")
+ else :
+ false
+ fi
+enddef ;
+
+permanent isobject ;
+
+%D Color and transparency
+%D
+%D Separable:
+
+newinternal normaltransparent ; normaltransparent := 1 ;
+newinternal multiplytransparent ; multiplytransparent := 2 ;
+newinternal screentransparent ; screentransparent := 3 ;
+newinternal overlaytransparent ; overlaytransparent := 4 ;
+newinternal softlighttransparent ; softlighttransparent := 5 ;
+newinternal hardlighttransparent ; hardlighttransparent := 6 ;
+newinternal colordodgetransparent ; colordodgetransparent := 7 ;
+newinternal colorburntransparent ; colorburntransparent := 8 ;
+newinternal darkentransparent ; darkentransparent := 9 ;
+newinternal lightentransparent ; lightentransparent := 10 ;
+newinternal differencetransparent ; differencetransparent := 11 ;
+newinternal exclusiontransparent ; exclusiontransparent := 12 ;
+
+%D Nonseparable:
+
+newinternal huetransparent ; huetransparent := 13 ;
+newinternal saturationtransparent ; saturationtransparent := 14 ;
+newinternal colortransparent ; colortransparent := 15 ;
+newinternal luminositytransparent ; luminositytransparent := 16 ;
+
+permanent normaltransparent, multiplytransparent, screentransparent, overlaytransparent,
+ softlighttransparent, hardlighttransparent, colordodgetransparent, colorburntransparent,
+ darkentransparent, lightentransparent, differencetransparent, exclusiontransparent,
+ huetransparent, saturationtransparent, colortransparent, luminositytransparent ;
+
+vardef transparency_alternative_to_number(expr name) =
+ if string name :
+ if expandafter known scantokens(name & "transparent") :
+ scantokens(name & "transparent")
+ else :
+ 0
+ fi
+ elseif name < 17 :
+ name
+ else :
+ 0
+ fi
+enddef ;
+
+def namedcolor expr n =
+ (1)
+ withprescript "sp_type=named"
+ withprescript "sp_name=" & n
+enddef ;
+
+% def mfun_spotcolor(expr n, v) =
+% 1
+% withprescript "sp_type=xspot"
+% withprescript "sp_name=" & n
+% withprescript "sp_value=" & (if numeric v : decimal v else : v fi)
+% enddef ;
+
+% def mfun_multispotcolor(expr name, fractions, components, value) =
+% 1
+% withprescript "sp_type=multispot"
+% withprescript "sp_name=" & name
+% withprescript "sp_fractions=" & decimal fractions
+% withprescript "sp_components=" & components
+% withprescript "sp_value=" & value
+% enddef ;
+
+def spotcolor(expr name, v) =
+ (1)
+ withprescript "sp_type=spot"
+ withprescript "sp_name=" & name
+ withprescript "sp_value=" & colordecimals v
+enddef ;
+
+% In this case a mixed color will be calculated:
+
+def multitonecolor(expr name)(text t) =
+ (1)
+ withprescript "sp_type=multitone"
+ withprescript "sp_name=" & name
+ withprescript "sp_value=" & colordecimalslist(t)
+enddef ;
+
+def transparent(expr a, t)(text c) = % use withtransparency instead
+ (1) % this permits withcolor x intoshade y
+ withprescript "tr_alternative=" & decimal transparency_alternative_to_number(a)
+ withprescript "tr_transparency=" & decimal t
+ withcolor c
+enddef ;
+
+def withtransparency(expr a, t) =
+ withprescript "tr_alternative=" & decimal transparency_alternative_to_number(a)
+ withprescript "tr_transparency=" & decimal t
+enddef ;
+
+% no, not compatible ... maybe only mpiv .. maybe withopacity
+
+% let opacity = pair ;
+
+% def withtransparency expr t =
+% withprescript "tr_alternative=" & decimal transparency_alternative_to_number(xpart t)
+% withprescript "tr_transparency=" & decimal ypart t
+% enddef ;
+%
+% withtransparency (1,.5)
+% withtransparency ("normal",.5)
+%
+% withopacity (1,.5)
+% withopacity (normaltransparency,.5)
+% withopacity .5
+
+def withopacity expr t =
+ if pair t :
+ withprescript "tr_alternative=" & decimal transparency_alternative_to_number(xpart t)
+ withprescript "tr_transparency=" & decimal ypart t
+ else :
+ mfun_with_opacity (transparency_alternative_to_number(t))
+ fi
+enddef ;
+
+def mfun_with_opacity (expr a) expr t =
+ withprescript "tr_alternative=" & decimal a
+ withprescript "tr_transparency=" & decimal t
+enddef ;
+
+% Provided for downward compability:
+
+def cmyk(expr c, m, y, k) =
+ (c,m,y,k)
+enddef ;
+
+permanent spotcolor, multitonecolor, transparent, withtransparency, namedcolor, withopacity, cmyk ;
+
+% Texts (todo: better strut ratio, now .7 hardcoded, should be passed)
+
+newinternal textextoffset ; textextoffset := 0 ;
+
+permanent textextoffset ;
+
+%%%%%%% mfun_tt_w[], mfun_tt_h[], mfun_tt_d[] ; % we can consider using colors (less hash space)
+color mfun_tt_b ;
+numeric mfun_tt_n ; mfun_tt_n := 0 ;
+picture mfun_tt_p ; mfun_tt_p := nullpicture ;
+picture mfun_tt_o ; mfun_tt_o := nullpicture ;
+picture mfun_tt_c ; mfun_tt_c := nullpicture ;
+
+if unknown mfun_trial_run :
+ boolean mfun_trial_run ;
+ mfun_trial_run := false ;
+else :
+ % already defined before the format is loaded
+fi ;
+
+def mfun_reset_tex_texts =
+ mfun_tt_n := 0 ;
+ mfun_tt_p := nullpicture ;
+ mfun_tt_o := nullpicture ; % redundant
+ mfun_tt_c := nullpicture ; % redundant
+enddef ;
+
+def mfun_flush_tex_texts =
+ addto currentpicture also mfun_tt_p
+enddef ;
+
+extra_endfig := "mfun_flush_tex_texts ;" & extra_endfig ;
+extra_beginfig := extra_beginfig & "mfun_reset_tex_texts ;" ;
+
+% We collect and flush them all, as we can also have temporary textexts
+% that gets never really flushed but are used for calculations. So, we
+% flush twice: once in location in order to pick up e.g. color properties,
+% and once at the end because we need to flush missing ones.
+
+boolean mfun_onetime_textext ; mfun_onetime_textext := false ;
+numeric mfun_global_textext ; mfun_global_textext := 0 ;
+
+def keepcached =
+ hide(mfun_global_textext := mfun_global_textext + 1;)
+ withprescript ("tx_cache=" & decimal mfun_global_textext)
+enddef ;
+
+def notcached =
+ withprescript "tx_cache=no"
+enddef ;
+
+permanent keepcached, notcached ;
+
+% todo: onetime
+
+rgbcolor mfun_tt_r ;
+
+newinternal inicatcoderegime ; inicatcoderegime := runscript("return catcodes.numbers.ctxcatcodes") ;
+newinternal texcatcoderegime ; texcatcoderegime := runscript("return catcodes.numbers.texcatcodes") ;
+newinternal luacatcoderegime ; luacatcoderegime := runscript("return catcodes.numbers.luacatcodes") ;
+newinternal notcatcoderegime ; notcatcoderegime := runscript("return catcodes.numbers.notcatcodes") ;
+newinternal vrbcatcoderegime ; vrbcatcoderegime := runscript("return catcodes.numbers.vrbcatcodes") ;
+newinternal prtcatcoderegime ; prtcatcoderegime := runscript("return catcodes.numbers.prtcatcodes") ;
+newinternal ctxcatcoderegime ; ctxcatcoderegime := runscript("return catcodes.numbers.ctxcatcodes") ;
+newinternal txtcatcoderegime ; txtcatcoderegime := runscript("return catcodes.numbers.txtcatcodes") ;
+
+newinternal catcoderegime ; catcoderegime := ctxcatcoderegime ;
+
+immutable inicatcoderegime, texcatcoderegime, luacatcoderegime, notcatcoderegime,
+ vrbcatcoderegime, prtcatcoderegime, ctxcatcoderegime, txtcatcoderegime ;
+
+permanent catcoderegime ;
+
+newscriptindex mfid_sometextext ; mfid_sometextext := scriptindex "sometextext" ;
+newscriptindex mfid_madetextext ; mfid_madetextext := scriptindex "madetextext" ;
+
+vardef rawtextext(expr s) =
+ if s = "" :
+ nullpicture
+ else :
+ mfun_tt_n := mfun_tt_n + 1 ;
+ mfun_tt_c := nullpicture ;
+ mfun_tt_o := nullpicture ;
+ addto mfun_tt_o doublepath origin base_draw_options ;
+ mfun_tt_r := runscript mfid_sometextext mfun_tt_n s catcoderegime ;
+ addto mfun_tt_c doublepath unitsquare
+ xscaled wdpart mfun_tt_r
+ yscaled (htpart mfun_tt_r + dppart mfun_tt_r)
+ shifted (0,-dppart mfun_tt_r)
+ withprescript "mf_object=text"
+ withprescript "tx_index=" & decimal mfun_tt_n
+ withprescript "tx_color=" & colordecimals colorpart mfun_tt_o
+ ;
+ mfun_tt_c
+ fi
+enddef ;
+
+vardef rawmadetext =
+ mfun_tt_n := mfun_tt_n + 1 ;
+ mfun_tt_c := nullpicture ;
+ mfun_tt_o := nullpicture ;
+ addto mfun_tt_o doublepath origin base_draw_options ;
+ mfun_tt_r := runscript mfid_madetextext mfun_tt_n ;
+ addto mfun_tt_c doublepath unitsquare
+ xscaled wdpart mfun_tt_r
+ yscaled (htpart mfun_tt_r + dppart mfun_tt_r)
+ shifted (0,-dppart mfun_tt_r)
+ withprescript "mf_object=text"
+ withprescript "tx_index=" & decimal mfun_tt_n
+ withprescript "tx_color=" & colordecimals colorpart mfun_tt_o
+ ;
+ mfun_tt_c
+enddef ;
+
+vardef validtexbox(expr category, name) =
+ if category == "" :
+ false
+ elseif string name :
+ name <> ""
+ elseif numeric name :
+ name > 0
+ else :
+ true
+ fi
+enddef ;
+
+vardef rawtexbox(expr category, name) =
+ mfun_tt_c := nullpicture ;
+ if validtexbox(category,name) :
+ mfun_tt_b := lua.mp.mf_tb_dimensions(category, name) ;
+ addto mfun_tt_c doublepath unitsquare
+ xscaled wdpart mfun_tt_b
+ yscaled (htpart mfun_tt_b + dppart mfun_tt_b)
+ shifted (0,- dppart mfun_tt_b)
+ withprescript "mf_object=box"
+ withprescript "bx_category=" & if numeric category : decimal fi category
+ withprescript "bx_name=" & if numeric name : decimal fi name ;
+ fi
+ mfun_tt_c
+enddef ;
+
+% More text
+
+defaultfont := "Mono" ;
+defaultscale := 1 ;
+
+extra_beginfig := extra_beginfig & "defaultscale:=1;" ;
+
+vardef fontsize expr name =
+ save size ; numeric size ;
+ size := bbwidth(textext("\MPfontsizehskip{" & name & "}")) ;
+ if size = 0 :
+ 12pt
+ else :
+ size
+ fi
+enddef ;
+
+permanent fontsize ;
+
+pair mfun_laboff ; mfun_laboff := origin ;
+pair mfun_laboff.lft ; mfun_laboff.lft := (-1,0) ;
+pair mfun_laboff.rt ; mfun_laboff.rt := (1,0) ;
+pair mfun_laboff.bot ; mfun_laboff.bot := (0,-1) ;
+pair mfun_laboff.top ; mfun_laboff.top := (0,1) ;
+pair mfun_laboff.ulft ; mfun_laboff.ulft := (-.7,.7) ;
+pair mfun_laboff.urt ; mfun_laboff.urt := (.7,.7) ;
+pair mfun_laboff.llft ; mfun_laboff.llft := -(.7,.7) ;
+pair mfun_laboff.lrt ; mfun_laboff.lrt := (.7,-.7) ;
+
+pair mfun_laboff.d ; mfun_laboff.d := mfun_laboff ;
+pair mfun_laboff.dflt ; mfun_laboff.dflt := mfun_laboff.lft ;
+pair mfun_laboff.drt ; mfun_laboff.drt := mfun_laboff.rt ;
+pair mfun_laboff.origin ; mfun_laboff.origin := mfun_laboff ;
+pair mfun_laboff.raw ; mfun_laboff.raw := mfun_laboff ;
+
+pair mfun_laboff.l ; mfun_laboff.l := mfun_laboff.lft ;
+pair mfun_laboff.r ; mfun_laboff.r := mfun_laboff.rt ;
+pair mfun_laboff.b ; mfun_laboff.b := mfun_laboff.bot ;
+pair mfun_laboff.t ; mfun_laboff.t := mfun_laboff.top ;
+pair mfun_laboff.l_t ; mfun_laboff.l_t := mfun_laboff.ulft ;
+pair mfun_laboff.r_t ; mfun_laboff.r_t := mfun_laboff.urt ;
+pair mfun_laboff.l_b ; mfun_laboff.l_b := mfun_laboff.llft ;
+pair mfun_laboff.r_b ; mfun_laboff.r_b := mfun_laboff.lrt ;
+pair mfun_laboff.t_l ; mfun_laboff.t_l := mfun_laboff.ulft ;
+pair mfun_laboff.t_r ; mfun_laboff.t_r := mfun_laboff.urt ;
+pair mfun_laboff.b_l ; mfun_laboff.b_l := mfun_laboff.llft ;
+pair mfun_laboff.b_r ; mfun_laboff.b_r := mfun_laboff.lrt ;
+
+mfun_labxf := 0.5 ;
+mfun_labxf.lft := mfun_labxf.l := 1 ;
+mfun_labxf.rt := mfun_labxf.r := 0 ;
+mfun_labxf.bot := mfun_labxf.b := 0.5 ;
+mfun_labxf.top := mfun_labxf.t := 0.5 ;
+mfun_labxf.ulft := mfun_labxf.l_t := mfun_labxf.t_l := 1 ;
+mfun_labxf.urt := mfun_labxf.r_t := mfun_labxf.t_r := 0 ;
+mfun_labxf.llft := mfun_labxf.l_b := mfun_labxf.b_l := 1 ;
+mfun_labxf.lrt := mfun_labxf.r_b := mfun_labxf.b_r := 0 ;
+
+mfun_labxf.d := mfun_labxf ;
+mfun_labxf.dflt := mfun_labxf.lft ;
+mfun_labxf.drt := mfun_labxf.rt ;
+mfun_labxf.origin := 0 ;
+mfun_labxf.raw := 0 ;
+
+mfun_labyf := 0.5 ;
+mfun_labyf.lft := mfun_labyf.l := 0.5 ;
+mfun_labyf.rt := mfun_labyf.r := 0.5 ;
+mfun_labyf.bot := mfun_labyf.b := 1 ;
+mfun_labyf.top := mfun_labyf.t := 0 ;
+mfun_labyf.ulft := mfun_labyf.l_t := mfun_labyf.t_l := 0 ;
+mfun_labyf.urt := mfun_labyf.r_t := mfun_labyf.t_r := 0 ;
+mfun_labyf.llft := mfun_labyf.l_b := mfun_labyf.b_l := 1 ;
+mfun_labyf.lrt := mfun_labyf.r_b := mfun_labyf.b_r := 1 ;
+
+mfun_labyf.d := mfun_labyf ;
+mfun_labyf.dflt := mfun_labyf.lft ;
+mfun_labyf.drt := mfun_labyf.rt ;
+mfun_labyf.origin := 0 ;
+mfun_labyf.raw := 0 ;
+
+mfun_labtype := 0 ;
+mfun_labtype.lft := mfun_labtype.l := 1 ;
+mfun_labtype.rt := mfun_labtype.r := 2 ;
+mfun_labtype.bot := mfun_labtype.b := 3 ;
+mfun_labtype.top := mfun_labtype.t := 4 ;
+mfun_labtype.ulft := mfun_labtype.l_t := mfun_labtype.t_l := 5 ;
+mfun_labtype.urt := mfun_labtype.r_t := mfun_labtype.t_r := 6 ;
+mfun_labtype.llft := mfun_labtype.l_b := mfun_labtype.b_l := 7 ;
+mfun_labtype.lrt := mfun_labtype.r_b := mfun_labtype.b_r := 8 ;
+mfun_labtype.d := 10 ;
+mfun_labtype.dflt := 11 ;
+mfun_labtype.drt := 12 ;
+mfun_labtype.origin := 0 ;
+mfun_labtype.raw := 0 ;
+
+vardef installlabel@# (expr type, x, y, offset) =
+ numeric mfun_labtype@# ; mfun_labtype@# := type ;
+ pair mfun_laboff @# ; mfun_laboff @# := offset ;
+ numeric mfun_labxf @# ; mfun_labxf @# := x ;
+ numeric mfun_labyf @# ; mfun_labyf @# := y ;
+enddef ;
+
+permanent installlabel ;
+
+installlabel.center (0, 0.5, 0.5, (0,0)) ;
+installlabel.c (0, 0.5, 0.5, (0,0)) ;
+
+installlabel.hcenter(0, 0.5, 0.5, (1,0)) ;
+installlabel.h (0, 0.5, 0.5, (1,0)) ;
+
+installlabel.vcenter(0, 0.5, 0.5, (0,1)) ;
+installlabel.v (0, 0.5, 0.5, (0,1)) ;
+
+vardef mfun_labshift@#(expr p) =
+ (mfun_labxf@#*lrcorner p +
+ mfun_labyf@#*ulcorner p +
+ (1-mfun_labxf@#-mfun_labyf@#)*llcorner p)
+enddef ;
+
+vardef mfun_picshift@#(expr p) =
+ (mfun_labxf@#*ulcorner p +
+ mfun_labyf@#*lrcorner p +
+ (1-mfun_labxf@#-mfun_labyf@#)*urcorner p)
+enddef ;
+
+% we save the plain variant
+
+% vardef plain_thelabel@#(expr p,z) =
+% if string p :
+% plain_thelabel@#(rawtextext("\definedfont[" & defaultfont & "]" & p) scaled defaultscale,z)
+% else :
+% p shifted (z + labeloffset*laboff@# - mfun_labshift@#(p))
+% fi
+% enddef;
+%
+% def plain_label = % takes two arguments, contrary to textext that takes one
+% normaldraw plain_thelabel
+% enddef ;
+%
+% let mfun_label = label ;
+% let mfun_thelabel = thelabel ;
+%
+% def useplainlabels = % somehow let doesn't work for all code
+% def label = plain_label enddef ;
+% def thelabel = plain_thelabel enddef ;
+% enddef ;
+%
+% def usemetafunlabels =
+% let label = mfun_label ;
+% let thelabel = mfun_thelabel ;
+% enddef ;
+%
+% plain_compatibility_data := plain_compatibility_data & "save label, thelabel ;" & "useplainlabels ;" ;
+
+newinternal anchortextexts ; anchortextexts := 0 ; % disabled by default
+
+vardef thetextext@#(expr p,z) =
+ % interim labeloffset := textextoffset ;
+ if string p :
+ thetextext@#(rawtextext(p),z)
+ elseif numeric p :
+ thetextext@#(rawtextext(decimal p),z)
+ elseif pair p :
+ thetextext@#(rawtextext(ddecimal p),z)
+ else :
+ if anchortextexts > 0 :
+ image(draw p withprescript "tx_anchor=" & ddecimal z)
+ else :
+ p
+ fi
+ if (mfun_labtype@# >= 10) :
+ shifted (0,ypart center p)
+ fi
+ shifted (z + textextoffset*mfun_laboff@# - mfun_labshift@#(p))
+ fi
+enddef ;
+
+vardef textext@#(expr p) = % no draw here
+ thetextext@#(p,origin)
+enddef ;
+
+vardef onetimetextext@#(expr p) = % no draw here
+ mfun_onetime_textext := true ;
+ thetextext@#(p,origin)
+enddef ;
+
+permanent rawtextext, rawmadetext, validtexbox, rawtexbox, thetextext, textext, onetimetextext ;
+
+% formatted text
+
+pair mfun_tt_z ;
+
+vardef rawfmttext(text t) =
+ mfun_tt_n := mfun_tt_n + 1 ;
+ mfun_tt_c := nullpicture ;
+ mfun_tt_o := nullpicture ;
+ addto mfun_tt_o doublepath origin base_draw_options ;
+ mfun_tt_r := lua.mp.mf_formatted_text(mfun_tt_n,t) ;
+ addto mfun_tt_c doublepath unitsquare
+ xscaled wdpart mfun_tt_r
+ yscaled (htpart mfun_tt_r + dppart mfun_tt_r)
+ shifted (0,-dppart mfun_tt_r)
+ withprescript "mf_object=text"
+ withprescript "tx_index=" & decimal mfun_tt_n
+ withprescript "tx_color=" & colordecimals colorpart mfun_tt_o
+ ;
+ for s = t :
+ if pair s : mfun_tt_z := s ; fi
+ endfor ;
+ mfun_tt_c
+enddef ;
+
+vardef thefmttext@#(text t) =
+ mfun_tt_z := origin ; % initialization
+ save p ; picture p ; p := rawfmttext(t) ;
+ if anchortextexts > 0 :
+ image(draw p withprescript "tx_anchor=" & ddecimal mfun_tt_z)
+ else :
+ p
+ fi
+ if (mfun_labtype@# >= 10) :
+ shifted (0,ypart center p)
+ fi
+ shifted (mfun_tt_z + textextoffset*mfun_laboff@# - mfun_labshift@#(p))
+enddef ;
+
+vardef fmttext@#(text t) = % no draw here
+ thefmttext@#(t,origin)
+enddef ;
+
+% or just: def fmttext = thefmttext enddef ;
+
+vardef onetimefmttext@#(text t) = % no draw here
+ mfun_onetime_textext := true ;
+ thefmttext@#(t,origin)
+enddef ;
+
+% so much for formatted text
+
+vardef thetexbox@#(expr category, name, z) =
+ save p ; picture p ; p := rawtexbox(category,name) ;
+ p
+ if (mfun_labtype@# >= 10) :
+ shifted (0,ypart center p)
+ fi
+ shifted (z + textextoffset*mfun_laboff@# - mfun_labshift@#(p))
+enddef ;
+
+vardef texbox@#(expr category, name) = % no draw here
+ thetexbox@#(category,name,origin)
+enddef ;
+
+permanent rawfmttext, thefmttext, fmttext, onetimefmttext, thetexbox, texbox ;
+
+% vardef thelabel@#(expr p,z) =
+% if string p :
+% thelabel@#(rawtextext("\definedfont[" & defaultfont & "]" & p) scaled defaultscale,z)
+% else :
+% p shifted (z + labeloffset*mfun_laboff@# - (mfun_labxf@#*lrcorner p + mfun_labyf@#*ulcorner p + (1-mfun_labxf@#-mfun_labyf@#)*llcorner p))
+% fi
+% enddef;
+
+vardef theoffset@#(expr z) =
+ if pair z :
+ z
+ elseif path z :
+ if mfun_laboff@# = origin :
+ center z
+ else :
+ ((center z)-- mfun_picshift@#(z)) intersectionpoint (z if not cycle z: --cycle fi)
+ fi
+ else : % picture
+ mfun_picshift@#(z)
+ fi
+enddef;
+
+vardef thelabel@#(expr p,z) =
+ if string p :
+ thelabel@#(rawtextext("\definedfont[" & defaultfont & "]" & p) scaled defaultscale,z)
+ elseif numeric p :
+ thelabel@#(decimal p,z)
+ elseif pair p :
+ thelabel@#("(" & decimal(xpart p) & "," & decimal(ypart p) & ")",z)
+ else :
+ p shifted (theoffset@#(z) + labeloffset*mfun_laboff@# - mfun_labshift@#(p))
+ fi
+enddef;
+
+def label = % takes two arguments, contrary to textext that takes one
+ normaldraw thelabel
+enddef ;
+
+vardef anchored@#(expr p, z) = % beware: no "+ mfun_laboff@#" here (never!)
+ p
+ if (mfun_labtype@# >= 10) :
+ shifted (0,ypart center p)
+ fi
+ shifted (z + mfun_labshift@#(p))
+enddef ;
+
+let normalinfont = infont ;
+
+primarydef s infont name = % nasty hack
+ if name = "" :
+ textext(s)
+ else :
+ textext("\definedfont[" & name & "]" & s)
+ fi
+enddef ;
+
+permanent theoffset, thelabel, anchored ;
+primitive infont ; % fake primitive
+
+% Helper
+
+string mfun_prescript_separator ; mfun_prescript_separator := char(13) ;
+
+% Shades
+
+% for while we had this:
+
+newinternal shadefactor ; shadefactor := 1 ; % currently obsolete
+pair shadeoffset ; shadeoffset := origin ; % currently obsolete
+boolean trace_shades ; trace_shades := false ; % still there
+
+permanent shadefactor, shadeoffset ;
+
+% def withlinearshading (expr a, b) =
+% withprescript "sh_type=linear"
+% withprescript "sh_domain=0 1"
+% withprescript "sh_factor=" & decimal shadefactor
+% withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset)
+% withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset)
+% enddef ;
+%
+% def withcircularshading (expr a, b, ra, rb) =
+% withprescript "sh_type=circular"
+% withprescript "sh_domain=0 1"
+% withprescript "sh_factor=" & decimal shadefactor
+% withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset)
+% withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset)
+% withprescript "sh_radius_a=" & decimal ra
+% withprescript "sh_radius_b=" & decimal rb
+% enddef ;
+%
+% def withshading (expr how)(text rest) =
+% if how = "linear" :
+% withlinearshading(rest)
+% elseif how = "circular" :
+% withcircularshading(rest)
+% else :
+% % nothing
+% fi
+% enddef ;
+%
+% def withfromshadecolor expr t =
+% withprescript "sh_color=into"
+% withprescript "sh_color_a=" & colordecimals t
+% enddef ;
+
+% def withtoshadecolor expr t =
+% withprescript "sh_color=into"
+% withprescript "sh_color_b=" & colordecimals t
+% enddef ;
+
+% but this is nicer
+
+% fill fullcircle scaled 10cm
+% withshademethod "circular"
+% withshadevector (5cm,1cm)
+% withshadecenter (.1,.5)
+% withshadedomain (.2,.6)
+% withshadefactor 1.2
+% withshadecolors (red,green)
+% ;
+
+path mfun_shade_path ;
+numeric mfun_shade_step ; mfun_shade_step := 0 ;
+
+def withshadestep =
+ hide(mfun_shade_step := mfun_shade_step + 1 ;)
+ mfun_withshadestep
+enddef ;
+
+def mfun_withshadestep (text t) =
+ withprescript "sh_step=" & decimal mfun_shade_step
+ t
+enddef ;
+
+numeric mfun_shade_fx, mfun_shade_fy ;
+numeric mfun_shade_lx, mfun_shade_ly ;
+numeric mfun_shade_nx, mfun_shade_ny ;
+numeric mfun_shade_dx, mfun_shade_dy ;
+numeric mfun_shade_tx, mfun_shade_ty ;
+
+% first
+
+def mfun_with_shade_method_analyze(expr p) =
+ mfun_shade_path := p ;
+ mfun_shade_step := 1 ;
+ mfun_shade_fx := xpart point 0 of p ;
+ mfun_shade_fy := ypart point 0 of p ;
+ mfun_shade_lx := mfun_shade_fx ;
+ mfun_shade_ly := mfun_shade_fy ;
+ mfun_shade_nx := 0 ;
+ mfun_shade_ny := 0 ;
+ mfun_shade_dx := abs(mfun_shade_fx - mfun_shade_lx) ;
+ mfun_shade_dy := abs(mfun_shade_fy - mfun_shade_ly) ;
+ for i=1 upto length(p) :
+ mfun_shade_tx := abs(mfun_shade_fx - xpart point i of p) ;
+ mfun_shade_ty := abs(mfun_shade_fy - ypart point i of p) ;
+ if mfun_shade_tx > mfun_shade_dx :
+ mfun_shade_nx := i + 1 ;
+ mfun_shade_lx := xpart point i of p ;
+ mfun_shade_dx := mfun_shade_tx ;
+ fi ;
+ if mfun_shade_ty > mfun_shade_dy :
+ mfun_shade_ny := i + 1 ;
+ mfun_shade_ly := ypart point i of p ;
+ mfun_shade_dy := mfun_shade_ty ;
+ fi ;
+ endfor ;
+enddef ;
+
+vardef mfun_max_radius(expr p) =
+ max (
+ (xpart center p - xpart llcorner p) ++ (ypart center p - ypart llcorner p),
+ (xpart center p - xpart ulcorner p) ++ (ypart ulcorner p - ypart center p),
+ (xpart lrcorner p - xpart center p) ++ (ypart center p - ypart lrcorner p),
+ (xpart urcorner p - xpart center p) ++ (ypart urcorner p - ypart center p)
+ )
+enddef ;
+
+vardef mfun_min_radius(expr p) =
+ min (
+ (xpart center p - xpart llcorner p) ++ (ypart center p - ypart llcorner p),
+ (xpart center p - xpart ulcorner p) ++ (ypart ulcorner p - ypart center p),
+ (xpart lrcorner p - xpart center p) ++ (ypart center p - ypart lrcorner p),
+ (xpart urcorner p - xpart center p) ++ (ypart urcorner p - ypart center p)
+ )
+enddef ;
+
+primarydef p withshademethod m =
+ hide(mfun_with_shade_method_analyze(p))
+ p
+ withprescript "sh_domain=0 1"
+ withprescript "sh_transform=yes"
+ withprescript "sh_color=into"
+ withprescript "sh_color_a=" & colordecimals white
+ withprescript "sh_color_b=" & colordecimals black
+ withprescript "sh_first=" & ddecimal point 0 of p % used for support scaling
+ withprescript "sh_set_x=" & ddecimal (mfun_shade_nx,mfun_shade_lx) %
+ withprescript "sh_set_y=" & ddecimal (mfun_shade_ny,mfun_shade_ly) %
+ if m = "linear" :
+ withprescript "sh_type=linear"
+ withprescript "sh_factor=1"
+ withprescript "sh_center_a=" & ddecimal llcorner p
+ withprescript "sh_center_b=" & ddecimal urcorner p
+ else :
+ withprescript "sh_type=circular"
+ withprescript "sh_factor=1.2"
+ withprescript "sh_center_a=" & ddecimal center p
+ withprescript "sh_center_b=" & ddecimal center p
+ withprescript "sh_radius_a=" & decimal 0
+ withprescript "sh_radius_b=" & decimal mfun_max_radius(p)
+ fi
+enddef ;
+
+def withshaderadius expr a =
+ withprescript "sh_radius_a=" & decimal (xpart a)
+ withprescript "sh_radius_b=" & decimal (ypart a)
+enddef ;
+
+def withshadeorigin expr a =
+ withprescript "sh_center_a=" & ddecimal a
+ withprescript "sh_center_b=" & ddecimal a
+enddef ;
+
+def withshadevector expr a =
+ withprescript "sh_center_a=" & ddecimal (point xpart a of mfun_shade_path)
+ withprescript "sh_center_b=" & ddecimal (point ypart a of mfun_shade_path)
+enddef ;
+
+def withshadedirection expr a =
+ withprescript "sh_center_a=" & ddecimal (point xpart a of boundingbox(mfun_shade_path))
+ withprescript "sh_center_b=" & ddecimal (point ypart a of boundingbox(mfun_shade_path))
+enddef ;
+
+def withshadetransform expr a = % yes | no
+ withprescript "sh_transform=" & a
+enddef ;
+
+pair shadedup ; shadedup := (0.5,2.5) ;
+pair shadeddown ; shadeddown := (2.5,0.5) ;
+pair shadedleft ; shadedleft := (1.5,3.5) ;
+pair shadedright ; shadedright := (3.5,1.5) ;
+
+def withshadecenter expr a =
+ withprescript "sh_center_a=" & ddecimal (
+ center mfun_shade_path shifted (
+ xpart a * bbwidth (mfun_shade_path)/2,
+ ypart a * bbheight(mfun_shade_path)/2
+ )
+ )
+enddef ;
+
+def withshadedomain expr d =
+ withprescript "sh_domain=" & ddecimal d
+enddef ;
+
+def withshadefactor expr f =
+ withprescript "sh_factor=" & decimal f
+enddef ;
+
+% def withshadebound (expr a) =
+% if mfun_shade_step > 0 :
+% withprescript "sh_bound_" & decimal mfun_shade_step & "=" & decimal a
+% fi
+% enddef ;
+
+def withshadefraction expr a =
+ if mfun_shade_step > 0 :
+ withprescript "sh_fraction_" & decimal mfun_shade_step & "=" & decimal a
+ fi
+enddef ;
+
+def withshadecolors (expr a, b) =
+ if mfun_shade_step > 0 :
+ withprescript "sh_color=into"
+ withprescript "sh_color_a_" & decimal mfun_shade_step & "=" & colordecimals a
+ withprescript "sh_color_b_" & decimal mfun_shade_step & "=" & colordecimals b
+ else :
+ withprescript "sh_color=into"
+ withprescript "sh_color_a=" & colordecimals a
+ withprescript "sh_color_b=" & colordecimals b
+ fi
+enddef ;
+
+primarydef a shadedinto b = % withcolor red shadedinto green
+ 1 % does not work with transparency
+ withprescript "sh_color=into"
+ withprescript "sh_color_a=" & colordecimals a
+ withprescript "sh_color_b=" & colordecimals b
+enddef ;
+
+primarydef p withshade sc =
+ p withprescript mfun_defined_cs_pre[sc]
+enddef ;
+
+def defineshade suffix s =
+ mfun_defineshade(str s)
+enddef ;
+
+def mfun_defineshade (expr s) text t =
+ expandafter def scantokens s = t enddef ;
+enddef ;
+
+def shaded text s =
+ s
+enddef ;
+
+
+% For me.
+
+primarydef p shownshadevector v =
+ image (
+ drawarrow (point xpart v of p) -- (point ypart v of p) ;
+ fill fullcircle scaled 2 shifted point xpart v of p ;
+ setbounds currentpicture to center currentpicture -- cycle ;
+ )
+enddef ;
+
+primarydef p shownshadedirection v =
+ image (
+ drawarrow (point xpart v of boundingbox p) -- (point ypart v of boundingbox p) ;
+ fill fullcircle scaled 2 shifted (point xpart v of boundingbox p) ;
+ setbounds currentpicture to center currentpicture -- cycle ;
+ )
+enddef ;
+
+primarydef p shownshadecenter v =
+ image (
+ fill fullcircle scaled 2
+ shifted center p shifted (
+ xpart v * bbwidth (p)/2,
+ ypart v * bbheight(p)/2
+ ) ;
+ setbounds currentpicture to center currentpicture -- cycle ;
+ )
+enddef ;
+
+primarydef p shownshadeorigin v =
+ image (
+ fill fullcircle scaled 2 shifted v ;
+ setbounds currentpicture to center currentpicture -- cycle ;
+ )
+enddef ;
+
+permanent withshademethod, withshaderadius, withshadeorigin, withshadevector, withshadedirection,
+ withshadetransform, withshadedomain, withshadefactor, withshadecenter, withshadefraction, withshadestep,
+ withshadecolors, shadedinto, withshade, shaded, shadedup, shadeddown, shadedleft, shadedright,
+ shownshadevector, shownshadedirection, shownshadecenter, shownshadeorigin ;
+
+% Old macros:
+
+def withcircularshade (expr a, b, ra, rb, ca, cb) =
+ withprescript "sh_type=circular"
+ withprescript "sh_transform=yes"
+ withprescript "sh_domain=0 1"
+ withprescript "sh_factor=1"
+ withprescript "sh_color_a=" & colordecimals ca
+ withprescript "sh_color_b=" & colordecimals cb
+ withprescript "sh_center_a=" & ddecimal a % (a shifted shadeoffset)
+ withprescript "sh_center_b=" & ddecimal b % (b shifted shadeoffset)
+ withprescript "sh_radius_a=" & decimal ra
+ withprescript "sh_radius_b=" & decimal rb
+enddef ;
+
+def withlinearshade (expr a, b, ca, cb) =
+ withprescript "sh_type=linear"
+ withprescript "sh_transform=yes"
+ withprescript "sh_domain=0 1"
+ withprescript "sh_factor=1"
+ withprescript "sh_color_a=" & colordecimals ca
+ withprescript "sh_color_b=" & colordecimals cb
+ withprescript "sh_center_a=" & ddecimal a % (a shifted shadeoffset)
+ withprescript "sh_center_b=" & ddecimal b % (b shifted shadeoffset)
+enddef ;
+
+permanent withcircularshade, withlinearshade ;
+
+% replaced (obsolete):
+
+def set_linear_vector (suffix a,b)(expr p,n) =
+ if (n=1) : a := llcorner p ; b := urcorner p ;
+ elseif (n=2) : a := lrcorner p ; b := ulcorner p ;
+ elseif (n=3) : a := urcorner p ; b := llcorner p ;
+ elseif (n=4) : a := ulcorner p ; b := lrcorner p ;
+ elseif (n=5) : a := .5[ulcorner p,llcorner p] ; b := .5[urcorner p,lrcorner p] ;
+ elseif (n=6) : a := .5[llcorner p,lrcorner p] ; b := .5[ulcorner p,urcorner p] ;
+ elseif (n=7) : a := .5[lrcorner p,urcorner p] ; b := .5[llcorner p,ulcorner p] ;
+ elseif (n=8) : a := .5[urcorner p,ulcorner p] ; b := .5[lrcorner p,llcorner p] ;
+ else : a := .5[ulcorner p,llcorner p] ; b := .5[urcorner p,lrcorner p] ;
+ fi ;
+enddef ;
+
+def set_circular_vector (suffix ab,r)(expr p,n) =
+ if (n=1) : ab := llcorner p ;
+ elseif (n=2) : ab := lrcorner p ;
+ elseif (n=3) : ab := urcorner p ;
+ elseif (n=4) : ab := ulcorner p ;
+ else : ab := center p ; r := .5r ;
+ fi ;
+enddef ;
+
+def circular_shade (expr p, n, ca, cb) =
+ begingroup ;
+ save ab, r ; pair ab ; numeric r ;
+ r := (xpart lrcorner p - xpart llcorner p) ++ (ypart urcorner p - ypart lrcorner p) ;
+ set_circular_vector(ab,r)(p,n) ;
+ fill p withcircularshade(ab,ab,0,r,ca,cb) ;
+ if trace_shades :
+ drawarrow ab -- ab shifted (0,r) withpen pencircle scaled 1pt withcolor .5white ;
+ fi ;
+ endgroup ;
+enddef ;
+
+def linear_shade (expr p, n, ca, cb) =
+ begingroup ;
+ save a, b ; pair a, b ;
+ set_linear_vector(a,b)(p,n) ;
+ fill p withlinearshade(a,b,ca,cb) ;
+ if trace_shades :
+ drawarrow a -- b withpen pencircle scaled 1pt withcolor .5white ;
+ fi ;
+ endgroup ;
+enddef ;
+
+string mfun_defined_cs_pre[] ; numeric mfun_defined_cs ; mfun_defined_cs := 0 ;
+
+vardef define_circular_shade (expr a, b, ra, rb, ca, cb) =
+ mfun_defined_cs := mfun_defined_cs + 1 ;
+ mfun_defined_cs_pre[mfun_defined_cs] := "sh_type=circular"
+ & mfun_prescript_separator & "sh_domain=0 1"
+ & mfun_prescript_separator & "sh_factor=1"
+ & mfun_prescript_separator & "sh_color_a=" & colordecimals ca
+ & mfun_prescript_separator & "sh_color_b=" & colordecimals cb
+ & mfun_prescript_separator & "sh_center_a=" & ddecimal a % (a shifted shadeoffset)
+ & mfun_prescript_separator & "sh_center_b=" & ddecimal b % (b shifted shadeoffset)
+ & mfun_prescript_separator & "sh_radius_a=" & decimal ra
+ & mfun_prescript_separator & "sh_radius_b=" & decimal rb
+ ;
+ mfun_defined_cs
+enddef ;
+
+vardef define_linear_shade (expr a, b, ca, cb) =
+ mfun_defined_cs := mfun_defined_cs + 1 ;
+ mfun_defined_cs_pre[mfun_defined_cs] := "sh_type=linear"
+ & mfun_prescript_separator & "sh_domain=0 1"
+ & mfun_prescript_separator & "sh_factor=1"
+ & mfun_prescript_separator & "sh_color_a=" & colordecimals ca
+ & mfun_prescript_separator & "sh_color_b=" & colordecimals cb
+ & mfun_prescript_separator & "sh_center_a=" & ddecimal a % (a shifted shadeoffset)
+ & mfun_prescript_separator & "sh_center_b=" & ddecimal b % (b shifted shadeoffset)
+ ;
+ mfun_defined_cs
+enddef ;
+
+% I lost the example code that uses this:
+%
+% vardef define_sampled_linear_shade(expr a,b,n)(text t) =
+% mfun_defined_cs := mfun_defined_cs + 1 ;
+% mfun_defined_cs_pre[mfun_defined_cs] := "ssh_type=linear"
+% & mfun_prescript_separator & "ssh_center_a=" & ddecimal (a shifted shadeoffset)
+% & mfun_prescript_separator & "ssh_center_b=" & ddecimal (b shifted shadeoffset)
+% & mfun_prescript_separator & "ssh_nofcolors=" & decimal n
+% & mfun_prescript_separator & "ssh_domain=" & domstr
+% & mfun_prescript_separator & "ssh_extend=" & extstr
+% & mfun_prescript_separator & "ssh_colors=" & colstr
+% & mfun_prescript_separator & "ssh_bounds=" & bndstr
+% & mfun_prescript_separator & "ssh_ranges=" & ranstr
+% ;
+% mfun_defined_cs
+% enddef ;
+%
+% vardef define_sampled_circular_shade(expr a,b,ra,rb,n)(text t) =
+% mfun_defined_cs := mfun_defined_cs + 1 ;
+% mfun_defined_cs_pre[mfun_defined_cs] := "ssh_type=circular"
+% & mfun_prescript_separator & "ssh_center_a=" & ddecimal (a shifted shadeoffset)
+% & mfun_prescript_separator & "ssh_radius_a=" & decimal ra
+% & mfun_prescript_separator & "ssh_center_b=" & ddecimal (b shifted shadeoffset)
+% & mfun_prescript_separator & "ssh_radius_b=" & decimal rb
+% & mfun_prescript_separator & "ssh_nofcolors=" & decimal n
+% & mfun_prescript_separator & "ssh_domain=" & domstr
+% & mfun_prescript_separator & "ssh_extend=" & extstr
+% & mfun_prescript_separator & "ssh_colors=" & colstr
+% & mfun_prescript_separator & "ssh_bounds=" & bndstr
+% & mfun_prescript_separator & "ssh_ranges=" & ranstr
+% ;
+% mfun_defined_cs
+% enddef ;
+
+% vardef predefined_linear_shade (expr p, n, ca, cb) =
+% save a, b, sh ; pair a, b ;
+% set_linear_vector(a,b)(p,n) ;
+% define_linear_shade (a,b,ca,cb)
+% enddef ;
+%
+% vardef predefined_circular_shade (expr p, n, ca, cb) =
+% save ab, r ; pair ab ; numeric r ;
+% r := (xpart lrcorner p - xpart llcorner p) ++ (ypart urcorner p - ypart lrcorner p) ;
+% set_circular_vector(ab,r)(p,n) ;
+% define_circular_shade(ab,ab,0,r,ca,cb)
+% enddef ;
+
+% Layers
+
+def onlayer primary name =
+ withprescript "la_name=" & name
+enddef ;
+
+permanent onlayer ;
+
+% Figures
+
+% def externalfigure primary filename =
+% doexternalfigure (filename)
+% enddef ;
+%
+% def doexternalfigure (expr filename) text transformation =
+% if true : % a bit incompatible esp scaled 1cm now scaled the natural size
+% draw rawtextext("\externalfigure[" & filename & "]") transformation ;
+% else :
+% draw unitsquare transformation withprescript "fg_name=" & filename ;
+% fi ;
+% enddef ;
+
+def withmask primary filename =
+ withprescript "fg_mask=" & filename
+enddef ;
+
+vardef externalfigure primary filename =
+ mfun_tt_c := nullpicture ;
+ mfun_tt_r := lua.mp.mf_external_figure(filename) ;
+ addto mfun_tt_c doublepath unitsquare
+ xscaled wdpart mfun_tt_r
+ yscaled htpart mfun_tt_r
+ withprescript "mf_object=figure"
+ withprescript "fg_name=" & filename ;
+ ;
+ mfun_tt_c
+enddef ;
+
+def figure primary filename =
+ rawtextext("\externalfigure[" & filename & "]")
+enddef ;
+
+permanent withmask, externalfigure, figure ;
+
+% Positions
+
+def register (expr tag, width, height, offset) =
+% draw image (
+ addto currentpicture doublepath unitsquare xscaled width yscaled height shifted offset
+ withprescript "ps_label=" & tag ;
+% ) ; % no transformations
+enddef ;
+
+permanent register ;
+
+% outlines (todo: pass around less arguments)
+
+numeric currentoutlinetext ; currentoutlinetext := 0 ;
+
+vardef mfun_do_outline_text_flush (expr kind, n, x, y, c) (text t) =
+ if kind = "f" :
+ mfun_do_outline_text_f (n, x, y, c) (t)
+ elseif kind = "d" :
+ mfun_do_outline_text_d (n, x, y, c) (t)
+ elseif kind = "b" :
+ mfun_do_outline_text_b (n, x, y, c) (t)
+ elseif kind = "r" :
+ mfun_do_outline_text_r (n, x, y, c) (t)
+ elseif kind = "p" :
+ mfun_do_outline_text_p (n, x, y, c) (t)
+ elseif kind = "u" :
+ mfun_do_outline_text_u (n, x, y, c) (t)
+ else :
+ mfun_do_outline_text_n (n, x, y, c) (t)
+ fi ;
+enddef ;
+
+vardef mfun_do_outline_rule_flush (expr kind, x, y, w, h) =
+ % mfun_do_outline_text_flush (kind, 1, x, y, "") (fullsquare xyscaled(w,h))
+ mfun_do_outline_text_flush (kind, 1, x, y, "") (unitsquare xyscaled(w,h))
+enddef ;
+
+numeric mfun_do_outline_n ; mfun_do_outline_n := 0 ;
+
+vardef mfun_do_outline_text_f (expr n, x, y, c) (text t) =
+ mfun_do_outline_n := 0 ;
+ for i=t :
+ mfun_do_outline_n := mfun_do_outline_n + 1 ;
+ if mfun_do_outline_n = n : fill else : nofill fi (i shifted(x,y)) mfun_do_outline_options_f withpen pencircle scaled 0 withprescript c ;
+ endfor ;
+enddef ;
+
+vardef mfun_do_outline_text_u (expr n, x, y, c) (text t) =
+ mfun_do_outline_n := 0 ;
+ for i=t :
+ mfun_do_outline_n := mfun_do_outline_n + 1 ;
+ if mfun_do_outline_n = n : fillup else : nofill fi (i shifted(x,y)) mfun_do_outline_options_f withprescript c ;
+ endfor ;
+enddef ;
+
+vardef mfun_do_outline_text_d (expr n, x, y, c) (text t) =
+ for i=t :
+ draw i shifted(x,y) mfun_do_outline_options_d ;
+ endfor ;
+enddef ;
+
+vardef mfun_do_outline_text_p (expr n, x, y, c) (text t) =
+ for i=t :
+ draw i shifted(x,y) withprescript c ;
+ endfor ;
+enddef ;
+
+vardef mfun_do_outline_text_b (expr n, x, y, c) (text t) =
+ mfun_do_outline_n := 0 ;
+ for i=t :
+ mfun_do_outline_n := mfun_do_outline_n + 1 ;
+ if mfun_do_outline_n = n : fill else : nofill fi (i shifted(x,y)) mfun_do_outline_options_f ;
+ endfor ;
+ for i=t :
+ draw i shifted(x,y) mfun_do_outline_options_d ;
+ endfor ;
+enddef ;
+
+vardef mfun_do_outline_text_r (expr n, x, y, c) (text t) =
+ mfun_do_outline_n := 0 ;
+ for i=t :
+ draw i shifted(x,y) mfun_do_outline_options_d ;
+ endfor ;
+ for i=t :
+ mfun_do_outline_n := mfun_do_outline_n + 1 ;
+ if mfun_do_outline_n = n : fill else : nofill fi (i shifted(x,y)) mfun_do_outline_options_f;
+ endfor ;
+enddef ;
+
+vardef mfun_do_outline_text_n (expr n, x, y, c) (text t) =
+ mfun_do_outline_n := 0 ;
+ for i=t :
+ mfun_do_outline_n := mfun_do_outline_n + 1 ;
+ if mfun_do_outline_n = n : fill else : nofill fi (i shifted(x,y)) ;
+ endfor ;
+enddef ;
+
+vardef mfun_do_outline_text_set_f (text f) text r =
+ def mfun_do_outline_options_f = f enddef ;
+ def mfun_do_outline_options_r = r enddef ;
+enddef ;
+
+vardef mfun_do_outline_text_set_u (text f) text r =
+ def mfun_do_outline_options_f = f enddef ;
+enddef ;
+
+vardef mfun_do_outline_text_set_d (text d) text r =
+ def mfun_do_outline_options_d = d enddef ;
+ def mfun_do_outline_options_r = r enddef ;
+enddef ;
+
+vardef mfun_do_outline_text_set_b (text f) (text d) text r =
+ def mfun_do_outline_options_f = f enddef ;
+ def mfun_do_outline_options_d = d enddef ;
+ def mfun_do_outline_options_r = r enddef ;
+enddef ;
+
+vardef mfun_do_outline_text_set_r (text d) (text f) text r =
+ def mfun_do_outline_options_d = d enddef ;
+ def mfun_do_outline_options_f = f enddef ;
+ def mfun_do_outline_options_r = r enddef ;
+enddef ;
+
+vardef mfun_do_outline_text_set_n text r =
+ def mfun_do_outline_options_r = r enddef ;
+enddef ;
+
+vardef mfun_do_outline_text_set_p =
+enddef ;
+
+def mfun_do_outline_options_d = enddef ;
+def mfun_do_outline_options_f = enddef ;
+def mfun_do_outline_options_r = enddef ;
+
+def outlinetexttopath (text o, p, n) =
+ scantokens("numeric " & str n & ";") ;
+ scantokens("path " & str p & "[];") ;
+ n := 0 ;
+ for i within o : p[incr(n)] := pathpart i ; endfor ;
+enddef ;
+
+def filloutlinetext (expr o) =
+ draw image (
+ save n, m ; numeric n, m ; n := m := 0 ;
+ for i within o :
+ n := n + 1 ;
+ endfor ;
+ for i within o :
+ m := m + 1 ;
+ if n = m :
+ eofill
+ else :
+ nofill
+ fi pathpart i ;
+ endfor ;
+ )
+enddef ;
+
+def drawoutlinetext (expr o) =
+ draw image (
+ % nicer for properties
+ for i within o :
+ draw pathpart i ;
+ endfor ;
+ )
+enddef ;
+
+vardef outlinetext@# (expr t) text rest =
+ save kind ; string kind ; kind := str @# ;
+ currentoutlinetext := currentoutlinetext + 1 ;
+ def mfun_do_outline_options_d = enddef ;
+ def mfun_do_outline_options_f = enddef ;
+ def mfun_do_outline_options_r = enddef ;
+ image ( normaldraw image (
+ % lua.mp.report("set outline text",currentoutlinetext);
+ lua.mp.mf_outline_text(currentoutlinetext,t,kind) ;
+ % lua.mp.report("get outline text",currentoutlinetext);
+ if kind = "f" :
+ mfun_do_outline_text_set_f rest ;
+ elseif kind = "d" :
+ mfun_do_outline_text_set_d rest ;
+ elseif kind = "b" :
+ mfun_do_outline_text_set_b rest ;
+ elseif kind = "u" :
+ mfun_do_outline_text_set_f rest ;
+ elseif kind = "r" :
+ mfun_do_outline_text_set_r rest ;
+ elseif kind = "p" :
+ mfun_do_outline_text_set_p ;
+ else :
+ mfun_do_outline_text_set_n rest ;
+ fi ;
+ lua.mp.mf_get_outline_text(currentoutlinetext) ;
+ ) mfun_do_outline_options_r ; )
+enddef ;
+
+
+permanent outlinetexttopath, filloutlinetext, drawoutlinetext, outlinetext ;
+
+% A few helpers:
+
+numeric mfun_c_b_llx, mfun_c_b_h, mfun_c_b_w, mfun_c_b_l ;
+
+vardef checkedbounds(expr llx,lly,urx,ury) =
+ mfun_c_b_llx := min(xpart llcorner currentpicture,llx) ;
+ mfun_c_b_urx := max(xpart urcorner currentpicture,urx) ;
+ mfun_c_b_lly := min(ypart llcorner currentpicture,lly) ;
+ mfun_c_b_ury := max(ypart urcorner currentpicture,ury) ;
+ (mfun_c_b_llx,mfun_c_b_lly) --
+ (mfun_c_b_urx,mfun_c_b_lly) --
+ (mfun_c_b_urx,mfun_c_b_ury) --
+ (mfun_c_b_llx,mfun_c_b_ury) -- cycle
+enddef ;
+
+vardef checkbounds(expr llx,lly,urx,ury) =
+ setbounds currentpicture to checkedbounds(llx,lly,urx,ury) ;
+enddef ;
+
+vardef strut(expr ht,dp) =
+ setbounds currentpicture to checkedbounds(0,0,ht,dp) ;
+enddef ;
+
+vardef rule(expr wd,ht,dp) =
+ image (fill (0,-dp)--(wd,-dp)--(wd,ht)--(0,ht)--cycle)
+enddef ;
+
+permanent checkedbounds, checkbounds, strut, rule ;
+
+% Housekeeping
+
+extra_beginfig := extra_beginfig & "currentgraphictext := 0 ; " ;
+extra_beginfig := extra_beginfig & "currentoutlinetext := 0 ; " ;
+extra_endfig := extra_endfig & "finishsavingdata ; " ;
+extra_endfig := extra_endfig & "mfun_reset_tex_texts ; " ;
+
+% Bonus
+
+vardef verbatim(expr s) =
+ ditto & "\detokenize{" & s & "}" & ditto
+enddef ;
+
+permanent verbatim ;
+
+% New
+
+def bitmapimage(expr xresolution, yresolution, data) =
+ image (
+ addto currentpicture doublepath unitsquare
+ withprescript "bm_xresolution=" & decimal xresolution
+ withprescript "bm_yresolution=" & decimal yresolution
+ withpostscript data ;
+ )
+enddef ;
+
+permanent bitmapimage ;
+
+% Experimental:
+%
+% property p ; p = properties(withcolor (1,1,0,0)) ;
+% fill fullcircle scaled 20cm withproperties p ;
+
+let property = picture ; permanent property ;
+
+vardef properties(text t) =
+ image(draw unitcircle t)
+enddef ;
+
+def withproperties expr p =
+ if colormodel p = 3 :
+ withcolor greypart p
+ elseif colormodel p = 5 :
+ withcolor (redpart p,greenpart p,bluepart p)
+ elseif colormodel p = 7 :
+ withcolor (cyanpart p,magentapart p,yellowpart p,blackpart p)
+ fi
+ withpen penpart p
+ if length (dashpart p) > 0 :
+ dashed dashpart p
+ fi
+ withprescript prescriptpart p
+ withpostscript postscriptpart p
+enddef ;
+
+permanent properties, withproperties ;
+
+% Experimental:
+
+primarydef t asgroup s = % s = isolated|knockout
+ begingroup
+ save temp_p, temp_q, temp_r ;
+ picture temp_p, temp_q ; path temp_r ;
+ temp_p := if picture t : t else : image(draw t) fi ;
+ temp_r := boundingbox temp_p ;
+ temp_q:= nullpicture ;
+ addto temp_q contour temp_r
+ withprescript "gr_state=start"
+ withprescript "gr_type=" & s ;
+ addto temp_q also temp_p ;
+ addto temp_q contour temp_r
+ withprescript "gr_state=stop" ;
+ temp_q
+ endgroup
+enddef ;
+
+permanent asgroup ;
+
+% Also experimental ... needs to be made better ... so it can change!
+
+string mfun_auto_align[] ;
+
+mfun_auto_align[0] := "rt" ;
+mfun_auto_align[1] := "urt" ;
+mfun_auto_align[2] := "top" ;
+mfun_auto_align[3] := "ulft" ;
+mfun_auto_align[4] := "lft" ;
+mfun_auto_align[5] := "llft" ;
+mfun_auto_align[6] := "bot" ;
+mfun_auto_align[7] := "lrt" ;
+mfun_auto_align[8] := "rt" ;
+
+def autoalign(expr n) =
+ scantokens mfun_auto_align[round((n mod 360)/45)]
+enddef ;
+
+% draw textext.autoalign(60) ("\strut oeps 1") ;
+% draw textext.autoalign(160)("\strut oeps 2") ;
+% draw textext.autoalign(260)("\strut oeps 3") ;
+% draw textext.autoalign(360)("\strut oeps 4") ;
+
+% new
+%
+% passvariable("version","1.0") ;
+% passvariable("number",123) ;
+% passvariable("string","whatever") ;
+% passvariable("point",(1,2)) ;
+% passvariable("triplet",(1,2,3)) ;
+% passvariable("quad",(1,2,3,4)) ;
+% passvariable("boolean",false) ;
+% passvariable("path",fullcircle scaled 1cm) ;
+
+% we could use the new lua interface but there is not that much gain i.e.
+% we still need to serialize
+
+vardef mfun_point_to_string(expr p,i) =
+ decimal xpart (point i of p) & " " &
+ decimal ypart (point i of p) & " " &
+ decimal xpart (precontrol i of p) & " " &
+ decimal ypart (precontrol i of p) & " " &
+ decimal xpart (postcontrol i of p) & " " &
+ decimal ypart (postcontrol i of p)
+enddef ;
+
+vardef mfun_transform_to_string(expr t) =
+ decimal xxpart t & " " & % rx
+ decimal xypart t & " " & % sx
+ decimal yxpart t & " " & % sy
+ decimal yypart t & " " & % ry
+ decimal xpart t & " " & % tx
+ decimal ypart t % ty
+enddef ;
+
+vardef mfun_numeric_to_string(expr n) =
+ decimal n
+enddef ;
+
+vardef mfun_pair_to_string(expr p) =
+ decimal xpart p & " " &
+ decimal ypart p
+enddef ;
+
+vardef mfun_rgbcolor_to_string(expr c) =
+ decimal redpart c & " " &
+ decimal greenpart c & " " &
+ decimal bluepart c
+enddef ;
+
+vardef mfun_cmykcolor_to_string(expr c) =
+ decimal cyanpart c & " " &
+ decimal magentapart c & " " &
+ decimal yellowpart c & " " &
+ decimal blackpart c
+enddef ;
+
+vardef mfun_pair_to_table(expr p) =
+ "{" & decimal xpart p &
+ "," & decimal ypart p &
+ "}"
+enddef ;
+
+vardef mfun_point_to_table(expr p,i) =
+ "{" & decimal xpart (point i of p) &
+ "," & decimal ypart (point i of p) &
+ "," & decimal xpart (precontrol i of p) &
+ "," & decimal ypart (precontrol i of p) &
+ "," & decimal xpart (postcontrol i of p) &
+ "," & decimal ypart (postcontrol i of p) &
+ "}"
+enddef ;
+
+vardef mfun_path_to_table(expr p) =
+ "{" & mfun_point_to_table(p,0) for i=1 upto length(p) : & "," & mfun_point_to_table(p,i) endfor & "}"
+enddef ;
+
+vardef mfun_rgb_to_table(expr c) =
+ "{" & decimal redpart c &
+ "," & decimal greenpart c &
+ "," & decimal bluepart c &
+ "}"
+enddef ;
+
+vardef mfun_cmyk_to_table(expr c) =
+ "{" & decimal cyanpart c &
+ "," & decimal magentapart c &
+ "," & decimal yellowpart c &
+ "," & decimal blackpart c &
+ "}"
+enddef ;
+
+vardef mfun_grey_to_string(expr n) =
+ decimal n
+enddef ;
+
+vardef mfun_path_to_string(expr p) =
+ mfun_point_to_string(p,0) for i=1 upto length(p) : & " " & mfun_point_to_string(p,i) endfor
+enddef ;
+
+vardef mfun_boolean_to_string(expr b) =
+ if b : "true" else : "false" fi
+enddef ;
+
+vardef tostring primary v =
+ if numeric v : mfun_numeric_to_string(v)
+ elseif pair v : mfun_pair_to_string(v)
+ elseif rgbcolor v : mfun_rgbcolor_to_string(v)
+ elseif cmykcolor v : mfun_cmykcolor_to_string(v)
+ elseif greycolor v : mfun_greycolor_to_string(v)
+ elseif boolean v : mfun_boolean_to_string(v)
+ elseif path v : mfun_path_to_string(v)
+ elseif transform v : mfun_transform_to_string(v)
+ else : v
+ fi
+enddef ;
+
+vardef topair primary p =
+ if pair p : "(" & decimal xpart p & "," & decimal ypart p & ")"
+ elseif numeric p : "(" & decimal p & "," & decimal p & ")"
+ else : "" fi
+enddef ;
+
+string dq ; dq := char 92 & char 34 ;
+string sq ; sq := char 92 & char 39 ;
+
+permanent dq, sq ;
+
+vardef quote primary s = sq & tostring(s) & sq enddef;
+vardef quotation primary s = dq & tostring(s) & dq enddef;
+
+vardef mfun_tagged_string(expr value) =
+ if numeric value : "1:" & mfun_numeric_to_string(value)
+ elseif pair value : "4:" & mfun_pair_to_string(value)
+ elseif rgbcolor value : "5:" & mfun_rgbcolor_to_string(value)
+ elseif cmykcolor value : "6:" & mfun_cmykcolor_to_string(value)
+ elseif boolean value : "3:" & mfun_boolean_to_string(value)
+ elseif path value : "7:" & mfun_path_to_string(value)
+ elseif transform value : "8:" & mfun_transform_to_string(value)
+ else : "2:" & value
+ fi
+enddef ;
+
+permanent tostring, topair, quote, quotation ;
+
+% A more flexible variant for passing data to context. We used to construct strings
+% but running lua is fast enough so we can gain on string construction in metapost
+% which is also not that efficient.
+
+vardef mfun_key_to_lua(expr k) =
+ if numeric k : decimal k else : "'" & k & "'" fi
+enddef ;
+
+vardef mfun_point_to_lua(expr k,p,i) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & ",{" &
+ decimal xpart (point i of p) & "," &
+ decimal ypart (point i of p) & "," &
+ decimal xpart (precontrol i of p) & "," &
+ decimal ypart (precontrol i of p) & "," &
+ decimal xpart (postcontrol i of p) & "," &
+ decimal ypart (postcontrol i of p)
+ & "})" ) ;
+enddef ;
+
+vardef mfun_transform_to_lua(expr k,t) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & ",{" &
+ decimal xxpart t & "," & % rx
+ decimal xypart t & "," & % sx
+ decimal yxpart t & "," & % sy
+ decimal yypart t & "," & % ry
+ decimal xpart t & "," & % tx
+ decimal ypart t % ty
+ & "})" ) ;
+enddef ;
+
+vardef mfun_numeric_to_lua(expr k,n) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & "," & decimal n & ")" ) ;
+enddef ;
+
+vardef mfun_pair_to_lua(expr k,p) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & ",{" &
+ decimal xpart p & "," &
+ decimal ypart p
+ & "})" ) ;
+enddef ;
+
+vardef mfun_rgbcolor_to_lua(expr k,c) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & ",{" &
+ decimal redpart c & "," &
+ decimal greenpart c & "," &
+ decimal bluepart c
+ & "})" ) ;
+enddef ;
+
+vardef mfun_cmykcolor_to_lua(expr k,c) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & ",{" &
+ decimal cyanpart c & "," &
+ decimal magentapart c & "," &
+ decimal yellowpart c & "," &
+ decimal blackpart c
+ & "})" ) ;
+enddef ;
+
+vardef mfun_path_to_lua(expr k,p) =
+ runscript("metapost.pushvariable(" & mfun_key_to_lua(k) & ")") ;
+ for i=0 upto length(p) :
+ mfun_point_to_lua(i+1,p,i) ;
+ endfor ;
+ runscript("metapost.popvariable()") ;
+enddef ;
+
+vardef mfun_boolean_to_lua(expr k,b) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & if b : ",true)" else : ",false)" fi ) ;
+enddef ;
+
+vardef mfun_string_to_lua(expr k,s) =
+ runscript( "metapost.setvariable(" & mfun_key_to_lua(k) & ",[==[" & s & "]==])" ) ;
+enddef ;
+
+def passvariable(expr key, value) =
+ if numeric value : mfun_numeric_to_lua (key,value) ;
+ elseif pair value : mfun_pair_to_lua (key,value) ;
+ elseif string value : mfun_string_to_lua (key,value) ;
+ elseif boolean value : mfun_boolean_to_lua (key,value) ;
+ elseif path value : mfun_path_to_lua (key,value) ;
+ elseif rgbcolor value : mfun_rgbcolor_to_lua (key,value) ;
+ elseif cmykcolor value : mfun_cmykcolor_to_lua(key,value) ;
+ elseif transform value : mfun_transform_to_lua(key,value) ;
+ fi ;
+enddef ;
+
+def passarrayvariable(expr key)(suffix values)(expr first, last, stp) =
+ runscript("metapost.pushvariable(" & mfun_key_to_lua(key) & ")") ;
+ for i=first step stp until last :
+ passvariable(i, values[i]) ;
+ endfor
+ runscript("metapost.popvariable()") ;
+enddef ;
+
+def startpassingvariable(expr k) =
+ runscript("metapost.pushvariable(" & mfun_key_to_lua(k) & ")") ;
+enddef ;
+
+def stoppassingvariable =
+ runscript("metapost.popvariable()") ;
+enddef ;
+
+permanent passvariable, passarrayvariable, startpassingvariable, stoppassingvariable ;
+
+% moved here from mp-grap.mpiv
+
+% vardef escaped_format(expr s) =
+% "" for n=0 upto length(s) : &
+% if ASCII substring (n,n+1) of s = 37 :
+% "@"
+% else :
+% substring (n,n+1) of s
+% fi
+% endfor
+% enddef ;
+
+numeric mfun_esc_b ; % begin
+numeric mfun_esc_l ; % length
+string mfun_esc_s ; % character
+
+mfun_esc_s := "%" ; % or: char(37)
+
+% this one is the fastest when we have a match
+
+% vardef escaped_format(expr s) =
+% "" for n=0 upto length(s)-1 : &
+% % if ASCII substring (n,n+1) of s = 37 :
+% if substring (n,n+1) of s = mfun_esc_s :
+% "@"
+% else :
+% substring (n,n+1) of s
+% fi
+% endfor
+% enddef ;
+
+% this one wins when we have no match
+
+vardef escaped_format(expr s) =
+ mfun_esc_b := 0 ;
+ mfun_esc_l := length(s) ;
+ for n=0 upto mfun_esc_l-1 :
+ % if ASCII substring (n,n+1) of s = 37 :
+ if substring (n,n+1) of s = mfun_esc_s :
+ if mfun_esc_b = 0 :
+ ""
+ fi
+ if n >= mfun_esc_b :
+ & (substring (mfun_esc_b,n) of s)
+ exitif numeric begingroup mfun_esc_b := n+1 endgroup ; % hide
+ fi
+ & "@"
+ fi
+ endfor
+ if mfun_esc_b = 0 :
+ s
+ % elseif mfun_esc_b > 0 :
+ elseif mfun_esc_b < mfun_esc_l :
+ & (substring (mfun_esc_b,mfun_esc_l) of s)
+ fi
+enddef ;
+
+vardef strfmt(expr f, x) = "\MPgraphformat{" & escaped_format(f) & "}{" & mfun_tagged_string(x) & "}" enddef ;
+vardef varfmt(expr f, x) = "\MPformatted{" & escaped_format(f) & "}{" & mfun_tagged_string(x) & "}" enddef ;
+
+vardef format@# (expr f, x) = textext@#(strfmt(f, x)) enddef ;
+vardef formatted@#(expr f, x) = textext@#(varfmt(f, x)) enddef ;
+
+permanent format, formatted ;
+
+% could be this (something to discuss with alan as it involves graph):
+%
+% vardef format (expr f,x) = lua.mp.graphformat(f,mfun_tagged_string(x) enddef ;
+% vardef formatted(expr f,x) = lua.mp.format (f, x) enddef ;
+%
+% def strfmt = format enddef ; % old
+% def varfmt = formatted enddef ; % old
+
+
+% def fmttext = lua.mp.formatted enddef ;
+
+% new
+
+def fillup text t = draw t withpostscript "both" enddef ; % we use draw because we need the proper boundingbox
+def eofillup text t = draw t withpostscript "eoboth" enddef ; % we use draw because we need the proper boundingbox
+def eofill text t = fill t withpostscript "evenodd" enddef ;
+def nofill text t = fill t withpostscript "collect" enddef ;
+def nodraw text t = draw t withpostscript "collect" enddef ;
+def dodraw text t = draw t withpostscript "flush" enddef ;
+% eodraw text t = draw t withpostscript "evenodd" enddef ;
+def dofill text t = fill t withpostscript "flush" enddef ;
+def eoclip text t = clip t withpostscript "evenodd" enddef ;
+
+permanent fillup, eofillup, eofill, nofill, nodraw, dodraw, dofill, eoclip ;
+
+% maybe (saves a bogus path but the problem is that it can influence the dimensions):
+
+% def dodraw text t = draw center currentpicture withpostscript "flush" enddef ;
+% def dofill text t = fill center currentpicture --cycle withpostscript "flush" enddef ;
+
+% def withrule expr r =
+% if (t = "even-odd") or (t = "evenodd") : withpostscript "evenodd" fi
+% enddef ;
+
+% A comment will end up on top of the graphic in the output. This can be handy for
+% locating a graphic: comment("test graphic").
+
+% This can be a prescript to currentpicture ... we can actually make
+%
+% setprescript str to picture/path ;
+% setpostscript str to picture/path ;
+
+def special text t = enddef ;
+
+def comment expr str =
+ special "metapost.comment[[" & str & "]]" ;
+enddef ;
+
+vardef report(text t) =
+ lua.mp.report(t)
+enddef ;
+
+permanent comment, report ;
+
+% This overloads a dummy:
+
+% todo: use mfid_* cum suis
+
+vardef uniquelist(suffix list) =
+ % this can be optimized by passing all values at once and returning
+ % a result but for now this is ok .. we need an undef foo
+ save i, j, h ;
+ if known lis[0] :
+ i := 0 ;
+ j := -1 ;
+ else :
+ i := 1 ;
+ j := 0 ;
+ fi ;
+ h := lua.mp.newhash() ;
+ forever :
+ exitif unknown list[i] ;
+ if not lua.mp.inhash(h,list[i]) :
+ j := j + 1 ;
+ list[j] := list[i] ;
+ lua.mp.tohash(h,list[i]) ;
+ fi ;
+ i := i + 1 ;
+ endfor ;
+ for n = j+1 step 1 until i-1 :
+ dispose(list[n])
+ endfor ;
+ lua.mp.disposehash(h) ;
+enddef ;
+
+permanent uniquelist ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-node.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-node.mpxl
new file mode 100644
index 00000000000..7d6b9dd055b
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-node.mpxl
@@ -0,0 +1,275 @@
+%D \module
+%D [ file=mp-node.mpiv,
+%D version=1998.02.15,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=Node Based Graphics,
+%D author=Alan Braslau,
+%D date=\currentdate,
+%D copyright={Alan Braslau & \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The crossing macros were written as part of this module but as they
+%D can be of use elsewhere they are defined in mp-tool.
+
+if known metafun_loaded_node : endinput ; fi ;
+
+newinternal boolean metafun_loaded_node ; metafun_loaded_node := true ; immutable metafun_loaded_node ;
+
+% Build a path from the node positions.
+% Must be integer and continuous in index starting at 0.
+
+vardef makenodepath(suffix p) =
+ if unknown p :
+ if not path p :
+ d := dimension p ;
+ if d>0 :
+ scantokens("path " & prefix p & for i=1 upto d : "[]" & endfor " ;") ;
+ else :
+ path p ;
+ fi
+ fi
+ save i ; i = -1 ;
+ p = forever : exitif unknown p.pos[incr i] ;
+ p.pos[i] --
+ endfor cycle ;
+ fi
+enddef ;
+
+% can take a list:
+
+def clearpath text t =
+ save t ; path t ;
+enddef ;
+
+def clearnodepath = clearpath nodepath enddef ;
+
+clearnodepath ;
+
+% the trailing "," below handles when number of t<3
+
+vardef makenode@#(text t) =
+ for a = t :
+ if (path a) or (unknown a) :
+ mfun_makenode@#(t,)
+ elseif (string a) and (length(a) = 0) :
+ mfun_makenode@#(t,)
+ else :
+ mfun_makenode@#(nodepath, t,)
+ fi
+ exitif true ;
+ endfor
+enddef ;
+
+vardef node@#(text t) =
+ for a = t :
+ if (path a) or (unknown a) :
+ mfun_node@#(t,)
+ elseif (string a) and (length(a) = 0) :
+ mfun_node@#(t,)
+ else :
+ mfun_node@#(nodepath, t,)
+ fi
+ exitif true ;
+ endfor
+enddef ;
+
+vardef nodeboundingpoint@#(text t) =
+ for a = t :
+ if (path a) or (unknown a) :
+ mfun_nodeboundingpoint@#(t)
+ elseif (string a) and (length(a) = 0) :
+ mfun_nodeboundingpoint@#(t)
+ else :
+ mfun_nodeboundingpoint@#(nodepath,a)
+ fi
+ exitif true ;
+ endfor
+enddef ;
+
+vardef fromto@#(expr d, f)(text t) =
+ fromtopaths@#(d,nodepath,f,nodepath,t)
+enddef ;
+
+% returns a pair suffix if the path is unknown
+
+vardef mfun_makenode@#(suffix p)(expr i)(text t) =
+ save d, b ; string b ;
+ d = dimension p ;
+ if d > 0 :
+ b := prefix p ;
+ if not picture p.pic[i] : scantokens("picture " & b &
+ for j=1 upto d : "[]" & endfor
+ "pic[] ;") ; fi
+ if not pair p.pos[i] : scantokens("pair " & b &
+ for j=1 upto d : "[]" & endfor
+ "pos[] ;") ; fi
+ else :
+ if not picture p.pic[i] : picture p.pic[] ; fi
+ if not pair p.pos[i] : pair p.pos[] ; fi
+ fi
+ for a = t :
+ if known p.pic[i] :
+ addto p.pic[i] also
+ else :
+ p.pic[i] =
+ fi
+ if picture a : a
+ elseif string a : if (length(a) > 0) : textext@#(a) else : nullpicture fi
+ elseif numeric a : textext@#(decimal a)
+ elseif ((boolean a) and a) : image(draw origin withpen currentpen scaled 4)
+ else : nullpicture
+ fi ;
+ endfor
+ p.pos[i] if known p : := point i of p ; fi
+enddef ;
+
+% returns a picture
+
+vardef mfun_node@#(suffix p)(expr i)(text t) =
+ if pair mfun_makenode@#(p,i,t) :
+ % nop: enclose in "if ... fi" to gobble the function return.
+ fi
+ if (unknown p) and (known p.pos[i]) :
+ makenodepath(p) ;
+ fi
+ if known p.pic[i] :
+ p.pic[i] if known p : shifted point i of p fi
+ else :
+ nullpicture
+ fi
+enddef ;
+
+newinternal node_loopback_yscale ; node_loopback_yscale := 1 ;
+
+% returns a path
+
+vardef fromtopaths@#(expr d)(suffix p)(expr f)(suffix q)(text s) =
+ save r, t, l ;
+ path r[] ; picture l ;
+ for a = s :
+ if unknown t :
+ t = a ;
+ if (unknown p) and (known p.pos[f]) :
+ makenodepath(p) ;
+ fi
+ if (unknown q) and (known q.pos[t]) :
+ makenodepath(q) ;
+ fi
+ r0 = if ((not numeric d) and
+ (point f of p = point f of q) and
+ (point t of p = point t of q)) :
+ subpath (f,t) of p
+ else :
+ point f of p -- point t of q
+ fi ;
+ save deviation ;
+ deviation := if numeric d: d else: 0 fi ;
+ r1 = if (point 0 of r0) = (point length r0 of r0) :
+ (fullcircle yscaled node_loopback_yscale rotated 180
+ if mfun_laboff@# <> origin :
+ rotated angle mfun_laboff@#
+ shifted .5mfun_laboff@#
+ fi)
+ scaled deviation
+ shifted point 0 of r0
+ elseif deviation=0 :
+ r0
+ else :
+ point 0 of r0 ..
+ unitvector direction .5length r0 of r0 rotated 90
+ scaled deviation * arclength r0
+ shifted point .5length r0 of r0 ..
+ point length r0 of r0
+ fi ;
+ else :
+ if known l :
+ addto l also
+ else :
+ l :=
+ fi
+ if picture a : a
+ elseif string a : if (length(a) > 0) : textext@#(a) else : nullpicture fi
+ elseif numeric a : textext@#(decimal a)
+ elseif ((boolean a) and a) : image(draw origin withpen currentpen scaled 4)
+ else : nullpicture
+ fi ;
+ fi
+ endfor
+ r2 = r1
+ if known p.pic[f if cycle p: mod length p fi] :
+ cutbefore boundingbox (p.pic[f if cycle p: mod length p fi] shifted point f of p)
+ fi
+ if known q.pic[t if cycle q: mod length q fi] :
+ cutafter boundingbox (q.pic[t if cycle q: mod length q fi] shifted point t of q)
+ fi
+ ;
+ if known l :
+ l := l shifted point .5length r2 of r2 ;
+ draw l ;
+ (r2 if str @# = "" : crossingunder l fi)
+ else :
+ r2
+ fi
+enddef ;
+
+% returns pair: bounding point of the node picture
+
+vardef mfun_nodeboundingpoint@#(suffix p)(expr i) =
+ if known p.pic[i] :
+ boundingpoint@#(p.pic[i])
+ else :
+ origin
+ fi
+enddef ;
+
+% returns pair: scaled laboff direction
+
+vardef relative@#(expr s) =
+ (mfun_laboff@# scaled s)
+enddef ;
+
+% returns pair: vector between nodes (+ optional scale)
+
+vardef betweennodes@#(suffix p)(expr f)(suffix q)(text s) =
+ save t ;
+ for a = s :
+ if unknown t :
+ t = a ;
+ mfun_nodeboundingpoint@#(q,t) + mfun_nodeboundingpoint@#(p,f)
+ else :
+ + relative@#(a)
+ fi
+ endfor
+enddef ;
+
+% helpers that save passing tokens
+
+def mfun_node_init(expr dx, dy, da) =
+ save nodelattice ; pair nodelattice[] ;
+ nodelattice0 = (dx,0) ;
+ nodelattice1 = dy * dir(da) ;
+ clearnodepath ;
+ save nodecount ; nodecount = -1;
+enddef ;
+
+def mfun_node_make(expr x, y, s) =
+ nodecount := nodecount + 1 ;
+ makenode(nodecount,s) = x * nodelattice0 + y * nodelattice1 ;
+enddef ;
+
+def mfun_node_flush =
+ for i=0 upto nodecount:
+ draw node(i) ;
+ endfor
+enddef ;
+
+vardef mfun_nodes_fromto@#(expr d, f)(text t) =
+ fromtopaths@#(d,nodepath,f,nodepath,t)
+enddef ;
+
+permanent makenodepath, clearpath, clearnodepath, makenode, node, nodeboundingpoint, fromto, fromtopaths, relative, betweennodes ;
+permanent node_loopback_yscale ;
+
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-page.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-page.mpxl
new file mode 100644
index 00000000000..72831e92708
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-page.mpxl
@@ -0,0 +1,296 @@
+%D \module
+%D [ file=mp-page.mpiv,
+%D version=1999.03.10,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=page enhancements,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module is rather preliminary and subjected to changes.In the process of
+%D moving to \METAFUN2\ this might change.
+
+if known metafun_loaded_page : endinput ; fi ;
+
+newinternal boolean metafun_loaded_page ; metafun_loaded_page := true ; immutable metafun_loaded_page ;
+
+def LoadPageState = enddef ; % just in case some old style uses it
+
+% Next we implement the the page area model. First some constants. We use a
+% matrix approach as we do at the TeX end but we could have gone for a period
+% separated variant. Too late.
+
+LeftEdge := -4 ; Top := -40 ;
+LeftEdgeSeparator := -3 ; TopSeparator := -30 ;
+LeftMargin := -2 ; Header := -20 ;
+LeftMarginSeparator := -1 ; HeaderSeparator := -10 ;
+Text := 0 ; Text := 0 ;
+RightMarginSeparator := +1 ; FooterSeparator := +10 ;
+RightMargin := +2 ; Footer := +20 ;
+RightEdgeSeparator := +3 ; BottomSeparator := +30 ;
+RightEdge := +4 ; Bottom := +40 ;
+
+numeric HorPos ; HorPos := 0 ;
+numeric VerPos ; VerPos := 0 ;
+
+immutable % permanent
+ Text, HorPos, VerPos,
+ LeftEdge, LeftEdgeSeparator, LeftMargin, LeftMarginSeparator,
+ RightMarginSeparator, RightMargin, RightEdgeSeparator, RightEdge,
+ Top, TopSeparator, Header, HeaderSeparator,
+ FooterSeparator, Footer, BottomSeparator, Bottom ;
+
+% Because metapost > 1.50 has dynamic memory management and is less efficient than
+% before we now delay calculations ... (on a document with 150 pages the time spent
+% in mp was close to 5 seconds which was only due to initialising the page related
+% areas, something that was hardly noticeable before. At least now we're back to
+% half a second for such a case.
+
+% We could go for just setting them (:=):
+
+path mfun_page_area[][] ;
+pair mfun_page_location[][] ;
+path mfun_page_field[][] ;
+numeric mfun_page_vsize[] ;
+numeric mfun_page_hsize[] ;
+numeric mfun_page_vstep[] ;
+numeric mfun_page_hstep[] ;
+
+newinternal mfun_page_done ; mfun_page_done := 0 ;
+
+def mfun_page_check_vsize =
+ mfun_page_vsize[Top] := TopHeight ;
+ mfun_page_vsize[TopSeparator] := TopDistance ;
+ mfun_page_vsize[Header] := HeaderHeight ;
+ mfun_page_vsize[HeaderSeparator] := HeaderDistance ;
+ mfun_page_vsize[Text] := TextHeight ;
+ mfun_page_vsize[FooterSeparator] := FooterDistance ;
+ mfun_page_vsize[Footer] := FooterHeight ;
+ mfun_page_vsize[BottomSeparator] := BottomDistance ;
+ mfun_page_vsize[Bottom] := BottomHeight ;
+enddef ;
+
+def mfun_page_check_hsize =
+ mfun_page_hsize[LeftEdge] := LeftEdgeWidth ;
+ mfun_page_hsize[LeftEdgeSeparator] := LeftEdgeDistance ;
+ mfun_page_hsize[LeftMargin] := LeftMarginWidth ;
+ mfun_page_hsize[LeftMarginSeparator] := LeftMarginDistance ;
+ mfun_page_hsize[Text] := MakeupWidth ;
+ mfun_page_hsize[RightMarginSeparator] := RightMarginDistance ;
+ mfun_page_hsize[RightMargin] := RightMarginWidth ;
+ mfun_page_hsize[RightEdgeSeparator] := RightEdgeDistance ;
+ mfun_page_hsize[RightEdge] := RightEdgeWidth ;
+enddef ;
+
+def mfun_page_check_vstep =
+ mfun_page_vstep[TopSeparator] := PaperHeight-TopSpace ;
+ mfun_page_vstep[Top] := mfun_page_vstep[TopSeparator] +mfun_page_vsize[TopSeparator] ;
+ mfun_page_vstep[Header] := mfun_page_vstep[TopSeparator] -mfun_page_vsize[Header] ;
+ mfun_page_vstep[HeaderSeparator] := mfun_page_vstep[Header] -mfun_page_vsize[HeaderSeparator] ;
+ mfun_page_vstep[Text] := mfun_page_vstep[HeaderSeparator]-mfun_page_vsize[Text] ;
+ mfun_page_vstep[FooterSeparator] := mfun_page_vstep[Text] -mfun_page_vsize[FooterSeparator] ;
+ mfun_page_vstep[Footer] := mfun_page_vstep[FooterSeparator]-mfun_page_vsize[Footer] ;
+ mfun_page_vstep[BottomSeparator] := mfun_page_vstep[Footer] -mfun_page_vsize[BottomSeparator] ;
+ mfun_page_vstep[Bottom] := mfun_page_vstep[BottomSeparator]-mfun_page_vsize[Bottom] ;
+enddef ;
+
+def mfun_page_check_hstep =
+ mfun_page_hstep[Text] := BackSpace ;
+ mfun_page_hstep[LeftMarginSeparator] := mfun_page_hstep[Text] -mfun_page_hsize[LeftMarginSeparator] ;
+ mfun_page_hstep[RightMarginSeparator] := mfun_page_hstep[Text] +mfun_page_hsize[Text] ;
+ mfun_page_hstep[LeftMargin] := mfun_page_hstep[LeftMarginSeparator] -mfun_page_hsize[LeftMargin] ;
+ mfun_page_hstep[RightMargin] := mfun_page_hstep[RightMarginSeparator]+mfun_page_hsize[RightMarginSeparator] ;
+ mfun_page_hstep[LeftEdgeSeparator] := mfun_page_hstep[LeftMargin] -mfun_page_hsize[LeftEdgeSeparator] ;
+ mfun_page_hstep[LeftEdge] := mfun_page_hstep[LeftEdgeSeparator] -mfun_page_hsize[LeftEdge] ;
+ mfun_page_hstep[RightEdgeSeparator] := mfun_page_hstep[RightMargin] +mfun_page_hsize[RightMargin] ;
+ mfun_page_hstep[RightEdge] := mfun_page_hstep[RightEdgeSeparator] +mfun_page_hsize[RightEdgeSeparator] ;
+enddef ;
+
+def mfun_check_page_dimensions =
+ if mfun_page_done <> RealPageNumber :
+ if LayoutHasChanged :
+ mfun_page_check_vsize ;
+ mfun_page_check_hsize ;
+ mfun_page_check_vstep ;
+ mfun_page_check_hstep ;
+ fi ;
+ mfun_page_done := RealPageNumber ;
+ fi ;
+enddef;
+
+
+def mfun_check_page_area =
+ mfun_check_page_dimensions ;
+ for VerPos=Top step 10 until Bottom:
+ for HorPos=LeftEdge step 1 until RightEdge:
+ mfun_page_area[HorPos][VerPos] := unitsquare xscaled mfun_page_hsize[HorPos] yscaled mfun_page_vsize[VerPos] ;
+ mfun_page_area[VerPos][HorPos] := mfun_page_area[HorPos][VerPos] ;
+ endfor ;
+ endfor ;
+enddef ;
+
+def mfun_check_page_location =
+ mfun_check_page_dimensions ;
+ for VerPos=Top step 10 until Bottom:
+ for HorPos=LeftEdge step 1 until RightEdge:
+ mfun_page_location[HorPos][VerPos] := (mfun_page_hstep[HorPos],mfun_page_vstep[VerPos]) ;
+ mfun_page_location[VerPos][HorPos] := mfun_page_location[HorPos][VerPos] ;
+ endfor ;
+ endfor ;
+enddef ;
+
+def mfun_check_page_field =
+ mfun_check_page_dimensions ;
+ for VerPos=Top step 10 until Bottom:
+ for HorPos=LeftEdge step 1 until RightEdge:
+ mfun_page_field[HorPos][VerPos] := unitsquare xscaled mfun_page_hsize[HorPos] yscaled mfun_page_vsize[VerPos] shifted (mfun_page_hstep[HorPos],mfun_page_vstep[VerPos]) ;
+ mfun_page_field[VerPos][HorPos] := mfun_page_field[HorPos][VerPos] ;
+ endfor ;
+ endfor ;
+enddef ;
+
+def Area = hide(mfun_check_page_area ;) mfun_page_area enddef ;
+def Location = hide(mfun_check_page_location ;) mfun_page_location enddef ;
+def Field = hide(mfun_check_page_field ;) mfun_page_field enddef ;
+def Vsize = hide(mfun_check_page_dimensions ;) mfun_page_vsize enddef ;
+def Hsize = hide(mfun_check_page_dimensions ;) mfun_page_hsize enddef ;
+def Vstep = hide(mfun_check_page_dimensions ;) mfun_page_vstep enddef ;
+def Hstep = hide(mfun_check_page_dimensions ;) mfun_page_hstep enddef ;
+
+immutable % permanent
+ Area, Location, Field, Vsize, Hsize, Vstep, Hstep ;
+
+vardef FrontPageWidth = PaperWidth enddef ;
+vardef BackPageWidth = PaperWidth enddef ;
+vardef CoverWidth = 2 * PaperWidth + SpineWidth enddef ;
+vardef CoverHeight = PaperHeight enddef ;
+
+vardef FrontPageHeight = PaperHeight enddef ;
+vardef BackPageHeight = PaperHeight enddef ;
+vardef SpineHeight = PaperHeight enddef ;
+
+path mfun_page_page, mfun_page_cover, mfun_page_spine, mfun_page_back, mfun_page_front ;
+
+def mfun_check_page = mfun_page_page := unitsquare xscaled PaperWidth yscaled PaperHeight ; enddef ;
+def mfun_check_cover = mfun_page_cover := unitsquare xscaled CoverWidth yscaled CoverHeight ; enddef ;
+def mfun_check_spine = mfun_page_spine := unitsquare xscaled SpineWidth yscaled CoverHeight shifted (BackPageWidth,0) ; enddef ;
+def mfun_check_back = mfun_page_back := unitsquare xscaled BackPageWidth yscaled CoverHeight ; enddef ;
+def mfun_check_front = mfun_page_front := unitsquare xscaled FrontPageWidth yscaled CoverHeight shifted (BackPageWidth+SpineWidth,0) ; enddef ;
+
+def Page = hide(mfun_check_page ;) mfun_page_page enddef ;
+def CoverPage = hide(mfun_check_cover ;) mfun_page_cover enddef ;
+def Spine = hide(mfun_check_spine ;) mfun_page_spine enddef ;
+def BackPage = hide(mfun_check_back ;) mfun_page_back enddef ;
+def FrontPage = hide(mfun_check_front ;) mfun_page_front enddef ;
+
+% pages
+
+def StartPage =
+ begingroup ;
+ setbounds currentpicture to Page ;
+enddef ;
+
+def StopPage =
+ setbounds currentpicture to Page ;
+ endgroup ;
+enddef ;
+
+% cover pages
+
+def StartCover =
+ begingroup ;
+ setbounds currentpicture to CoverPage enlarged PaperBleed ;
+enddef ;
+
+def StopCover =
+ setbounds currentpicture to CoverPage enlarged PaperBleed ;
+ endgroup ;
+enddef ;
+
+immutable % permanent
+ FrontPageWidth, BackPageWidth, CoverWidth, FrontPageHeight, BackPageHeight, CoverHeight,
+ SpineHeight, Page, CoverPage, Spine, BackPage, FrontPage,
+ StartPage, StopPage, StartCover, StopCover ;
+
+% overlays:
+
+def OverlayBox =
+ (unitsquare xyscaled (OverlayWidth,OverlayHeight))
+enddef ;
+
+immutable % permanent
+ OverlayBox ;
+
+% handy
+
+def innerenlarged =
+ if OnRightPage : leftenlarged else : rightenlarged fi
+enddef ;
+
+def outerenlarged =
+ if OnRightPage : rightenlarged else : leftenlarged fi
+enddef ;
+
+permanent
+ innerenlarged, outerenlarged ;
+
+% obsolete
+
+% def llEnlarged (expr p,d) = (llcorner p shifted (-d,-d)) enddef ;
+% def lrEnlarged (expr p,d) = (lrcorner p shifted (+d,-d)) enddef ;
+% def urEnlarged (expr p,d) = (urcorner p shifted (+d,+d)) enddef ;
+% def ulEnlarged (expr p,d) = (ulcorner p shifted (-d,+d)) enddef ;
+
+% def Enlarged (expr p, d) =
+% (
+% llEnlarged (p,d) --
+% lrEnlarged (p,d) --
+% urEnlarged (p,d) --
+% ulEnlarged (p,d) --
+% cycle
+% )
+% enddef ;
+
+% for the moment we put these here:
+
+string RuleDirection ; RuleDirection := "" ;
+string RuleOption ; RuleOption := "" ;
+numeric RuleWidth ; RuleWidth := 0 ;
+numeric RuleHeight ; RuleHeight := 0 ;
+numeric RuleDepth ; RuleDepth := 0 ;
+numeric RuleH ; RuleH := 0 ;
+numeric RuleV ; RuleV := 0 ;
+numeric RuleThickness ; RuleThickness := 0 ;
+numeric RuleFactor ; RuleFactor := 0 ;
+numeric RuleOffset ; RuleOffset := 0 ;
+ def RuleColor = (.5white) enddef ; % yet undecided, might become a string
+
+def FakeWord(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled (RuleDepth-RuleThickness/2)
+ withcolor RuleColor ;
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled (RuleHeight-RuleDepth-RuleThickness/2)
+ shifted (0,RuleDepth+RuleThickness)
+ withcolor RuleColor ;
+enddef ;
+
+def FakeRule(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled RuleHeight
+ withcolor RuleColor ;
+enddef ;
+
+mutable
+ RuleDirection, RuleOption, RuleWidth, RuleHeight, RuleDepth, RuleH, RuleV, RuleThickness,
+ RuleFactor, RuleOffset, RuleColor;
+
+permanent
+ FakeWord, FakeRule ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-shap.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-shap.mpxl
new file mode 100644
index 00000000000..e43b8128021
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-shap.mpxl
@@ -0,0 +1,228 @@
+%D \module
+%D [ file=mp-shap.mpiv,
+%D version=2000.05.31,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=shapes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+if known metafun_loaded_shap : endinput ; fi ;
+
+newinternal boolean metafun_loaded_shap ; metafun_loaded_shap := true ; immutable metafun_loaded_shap ;
+
+path predefined_shapes[] ;
+
+def start_predefined_shape_definition =
+
+ begingroup ;
+
+ save xradius, yradius, xxradius, yyradius ;
+ save ll, lr, ur, ul, llx, lly, lrx, lry, urx, ury, ulx, uly, llxx, llyy, lrxx, lryy, urxx, uryy, ulxx, ulyy, lc, rc, tc, bc ;
+
+ numeric xradius, yradius, xxradius, yyradius ;
+ pair ll, lr, ur, ul, llx, lly, lrx, lry, urx, ury, ulx, uly, llxx, llyy, lrxx, lryy, urxx, uryy, ulxx, ulyy, lc, rc, tc, bc ;
+
+ xradius := .15 ;
+ yradius := .15 ;
+ xxradius := .10 ;
+ yyradius := .10 ;
+
+ ll := llcorner (unitsquare shifted (-.5,-.5)) ;
+ lr := lrcorner (unitsquare shifted (-.5,-.5)) ;
+ ur := urcorner (unitsquare shifted (-.5,-.5)) ;
+ ul := ulcorner (unitsquare shifted (-.5,-.5)) ;
+
+ llx := ll shifted (xradius,0) ;
+ lly := ll shifted (0,yradius) ;
+
+ lrx := lr shifted (-xradius,0) ;
+ lry := lr shifted (0,yradius) ;
+
+ urx := ur shifted (-xradius,0) ;
+ ury := ur shifted (0,-yradius) ;
+
+ ulx := ul shifted (xradius,0) ;
+ uly := ul shifted (0,-yradius) ;
+
+ llxx := ll shifted (xxradius,0) ;
+ llyy := ll shifted (0,yyradius) ;
+
+ lrxx := lr shifted (-xxradius,0) ;
+ lryy := lr shifted (0,yyradius) ;
+
+ urxx := ur shifted (-xxradius,0) ;
+ uryy := ur shifted (0,-yyradius) ;
+
+ ulxx := ul shifted (xxradius,0) ;
+ ulyy := ul shifted (0,-yyradius) ;
+
+ lc := ll shifted (0,.5) ;
+ rc := lr shifted (0,.5) ;
+ tc := ul shifted (.5,0) ;
+ bc := ll shifted (.5,0) ;
+
+enddef ;
+
+def stop_predefined_shape_definition =
+
+ endgroup ;
+
+enddef ;
+
+% this can be delayed
+
+start_predefined_shape_definition ;
+
+ predefined_shapes[ 0] := (origin--cycle) ;
+ predefined_shapes[ 5] := (llx--lrx{right}...rc...{left}urx--ulx{left}...lc...{right}cycle) ;
+ predefined_shapes[ 6] := (ll--lrx{right}...rc...{left}urx--ul--cycle) ;
+ predefined_shapes[ 7] := (ll--lrx{right}...rc...{left}urx--ul--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[ 8] := (lr--ury{up}...tc...{down}uly--ll--cycle) ;
+ predefined_shapes[ 9] := (lr--ury{up}...tc...{down}uly--ll--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[10] := (ll--lr--ur--ul--ll--ur--ul--ll--cycle) ;
+ predefined_shapes[11] := (ll--lr--ur--ul--ll--lr--ul--ll--cycle) ;
+ predefined_shapes[12] := (ll--lrx--ur--ulx--cycle) ;
+ predefined_shapes[13] := (llx--lr--urx--ul--cycle) ;
+ predefined_shapes[14] := (lly--bc--lry--ury--tc--uly--cycle) ;
+ predefined_shapes[15] := (llx--lrx--rc--urx--ulx--lc--cycle) ;
+ predefined_shapes[16] := (ll--lrx--rc--urx--ul--cycle) ;
+ predefined_shapes[17] := (ll--lrx--rc--urx--ul--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[18] := (lr--ury--tc--uly--ll--cycle) ;
+ predefined_shapes[19] := (lr--ury--tc--uly--ll--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[20] := (ll--lr--ur--ul--ll--llxx--ulxx--ul--ll--lr--ur--urxx--lrxx--cycle) ;
+ predefined_shapes[21] := (ul--ll--lr--ur--ul--ulyy--uryy--ur--ul--ll--lr--lryy--llyy--cycle) ;
+ predefined_shapes[22] := (ll--lrx--lry--ur--ulx--uly--cycle) ;
+ predefined_shapes[23] := (llx--lr--ury--urx--ul--lly--cycle) ;
+ predefined_shapes[24] := (ll--lr--ur--ul--cycle) ;
+ predefined_shapes[25] := (llx--lrx--lry--ury--urx--ulx--uly--lly--cycle) ;
+ predefined_shapes[26] := (ll--lrx--lry--ur--ul--cycle) ;
+ predefined_shapes[27] := (ll--lr--ury--urx--ul--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[28] := (ll--lr--ury--urx--ul--cycle) ;
+ predefined_shapes[29] := (ll--lrx--lry--ur--ul--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[30] := (bc{right}...{up}rc...tc{left}...{down}lc...{right}bc & bc--tc & tc{left}..{down}lc & lc--rc & rc{up}..tc{left}...{down}lc...{right}bc & cycle) rotated 45;
+ predefined_shapes[31] := (bc{right}...{up}rc...tc{left}...{down}lc...{right}bc & bc--tc & tc{left}..{down}lc & lc--rc & rc{up}..tc{left}...{down}lc...{right}bc & cycle) ;
+ predefined_shapes[32] := (ll{right}...{right}lry--ur--ul--ll--cycle) ;
+ predefined_shapes[33] := (ll{right}...{right}lry--ur--ul--ll--cycle--ul--ulx--ulx shifted(0,yyradius)--ur shifted(yyradius,yyradius)--lry shifted(yyradius,yyradius)--lry shifted(0,yyradius)--ur--ul--cycle ) ;
+ predefined_shapes[34] := (uly..tc..ury & ury..tc shifted (0,-2yradius)..uly & uly--lly & lly..bc..lry & lry--ury & ury..tc shifted (0,-2yradius)..uly & cycle ) ;
+ predefined_shapes[35] := (bc{right}...rc{up}...tc{left}...lc{down}...cycle) ;
+ predefined_shapes[36] := (ul--tc{right}..rc{down}..{left}bc--ll & ll..(xpart llx, ypart lc)..ul & cycle) ;
+ predefined_shapes[37] := (ul--tc{right}..rc{down}..{left}bc--ll & ll..(xpart llx, ypart lc)..ul & cycle) rotatedaround(origin,180) ;
+ predefined_shapes[38] := (ll--lc{up}..tc{right}..{down}rc--lr & lr..(xpart bc, ypart lly)..ll & cycle) ;
+ predefined_shapes[39] := (ll--lc{up}..tc{right}..{down}rc--lr & lr..(xpart bc, ypart lly)..ll & cycle) rotatedaround(origin,180) ;
+ predefined_shapes[40] := (ll--lr--ur--ul--ll--ur--ul--ll--lr--ul--ll--cycle) ;
+ predefined_shapes[41] := (ll--lr--ur--ul--ll--lr--rc--lc--ll--bc--tc--ul--ll & cycle) ;
+ predefined_shapes[42] := (ll--lr--origin shifted (+epsilon,0)--ur--ul--origin shifted (-epsilon,0)--cycle) ;
+ predefined_shapes[43] := (ll--ul--origin shifted (0,+epsilon)--ur--lr--origin shifted (0,-epsilon)--cycle) ;
+ predefined_shapes[45] := (bc--rc--tc--lc--cycle) ;
+ predefined_shapes[46] := (ll--ul--rc--cycle) ;
+ predefined_shapes[47] := (ll--ul--rc--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[48] := (ul--ur--bc--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[49] := (ul--ur--bc--cycle) ;
+ predefined_shapes[56] := (ll--lry--ury--ul--cycle) ;
+ predefined_shapes[57] := (ll--lry--ury--ul--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[58] := (ll--ulx--urx--lr--cycle) ;
+ predefined_shapes[59] := (ll--ulx--urx--lr--cycle) rotatedaround(origin,180);
+ predefined_shapes[66] := (rc--origin shifted ( epsilon,0) --cycle & rc--origin--cycle ) ;
+ predefined_shapes[67] := (lc--origin shifted (-epsilon,0) --cycle & lc--origin--cycle ) ;
+ predefined_shapes[68] := (tc--origin shifted (0, epsilon) --cycle & tc--origin--cycle ) ;
+ predefined_shapes[69] := (bc--origin shifted (0,-epsilon) --cycle & bc--origin--cycle ) ;
+ predefined_shapes[75] := (lly--lry--ury--uly--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[76] := (ll--lr--ur--uly--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[77] := (ll--lr--ury--ul--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[78] := (lly--lr--ur--ul--cycle) rotatedaround(origin,180) ;
+ predefined_shapes[79] := (ll--lry--ur--ul--cycle) rotatedaround(origin,180) ;
+
+ numeric predefined_shapes_xradius ; predefined_shapes_xradius := xradius ;
+ numeric predefined_shapes_yradius ; predefined_shapes_yradius := yradius ;
+ numeric predefined_shapes_xxradius ; predefined_shapes_xxradius := xxradius ;
+ numeric predefined_shapes_yyradius ; predefined_shapes_yyradius := yyradius ;
+
+stop_predefined_shape_definition ;
+
+vardef some_shape_path (expr type) =
+ if known predefined_shapes[type] : predefined_shapes[type] else : predefined_shapes[24] fi
+enddef ;
+
+def some_shape (expr shape_type, shape_width, shape_height, shape_linewidth, shape_linecolor, shape_fillcolor) =
+ begingroup ;
+ save p ; path p ;
+ p := some_shape_path (shape_type) xscaled shape_width yscaled shape_height ;
+ pickup pencircle scaled shape_linewidth ;
+ fill p withcolor shape_fillcolor ;
+ draw p withcolor shape_linecolor ;
+ endgroup ;
+enddef ;
+
+% maybe:
+%
+% if t>1 : % normal shape
+% path pp ; pp := some_shape_path(t) xyscaled(bbwidth(p), bbheight(p)) ;
+% pp := pp shifted - center pp shifted center p ;
+% fill pp withcolor fc ;
+% draw pp withpen pencircle scaled lw withcolor lc ;
+
+vardef drawpredefinedshape (expr t, p, lw, lc, fc) =
+ save pp ;
+ if t > 1 : % normal shape
+ path pp ;
+ pp := some_shape_path(t) xyscaled(bbwidth(p), bbheight(p)) shifted center p ;
+ fill pp withcolor fc ;
+ draw pp withpen pencircle scaled lw withcolor lc ;
+ elseif t = 1 : % background only
+ path pp ;
+ pp := fullsquare xyscaled(bbwidth(p), bbheight(p)) shifted center p ;
+ fill pp withcolor fc ;
+ else : % dimensions only
+ picture pp ; pp := nullpicture ;
+ setbounds pp to fullsquare xyscaled(bbwidth(p), bbheight(p)) shifted center p ;
+ draw pp ;
+ fi ;
+enddef ;
+
+vardef drawpredefinedline (expr t, p, lw, lc) =
+ if (t>0) and (length(p)>1) :
+ saveoptions ;
+ drawoptions(withpen pencircle scaled lw withcolor lc) ;
+ draw p ;
+ if t = 1 :
+ draw arrowheadonpath(p,1) ;
+ elseif t = 2 :
+ draw arrowheadonpath(reverse p,1) ;
+ elseif t = 3 :
+ for $ = p,reverse p :
+ draw arrowheadonpath($,1) ;
+ endfor ;
+ elseif t = 11 :
+ draw arrowheadonpath(p,1/2) ;
+ elseif t = 12 :
+ draw arrowheadonpath(reverse p,1/2) ;
+ elseif t = 13 :
+ for $=p,reverse p :
+ draw arrowheadonpath($,1) ;
+ endfor ;
+ for $=p,reverse p :
+ draw arrowheadonpath($,3/4) ;
+ endfor ;
+ elseif t = 21 :
+ for $=1/5,1/2,4/5 :
+ draw arrowheadonpath(p,$) ;
+ endfor ;
+ elseif t = 22 :
+ for $=1/5,1/2,4/5 :
+ draw arrowheadonpath(reverse p,$) ;
+ endfor ;
+ elseif t = 23 :
+ for $=p,reverse p :
+ draw arrowheadonpath($,1/4) ;
+ endfor ;
+ fi ;
+ fi ;
+enddef ;
+
+let drawshape = drawpredefinedshape ;
+let drawline = drawpredefinedline ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-text.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-text.mpxl
new file mode 100644
index 00000000000..c18647baf32
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-text.mpxl
@@ -0,0 +1,217 @@
+%D \module
+%D [ file=mp-text.mpiv,
+%D version=2000.07.10,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=text support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+%D This one is only used in metafun so it will become a module.
+
+if known metafun_loaded_text : endinput ; fi ;
+
+newinternal boolean metafun_loaded_text ; metafun_loaded_text := true ; immutable metafun_loaded_text ;
+
+% This is still mostly the same as the one discussed in the good old \METAFUN\
+% example code but modernized abit to suit \LMTX.
+
+newscriptindex mfid_setparshapeproperty ; mfid_setparshapeproperty := scriptindex "setparshapeproperty" ;
+
+% this is the old name
+
+presetparameters "parshape" [
+ % offset = 0,
+ % path = fullsquare,
+ % dx = 0,
+ % dy = 0,
+ % strutheight = StrutHeight,
+ % strutdepth = StutDepth,
+ % lineheight = LineHeight,
+ % topskip = StrutHeight,
+ % trace = false,
+] ;
+
+def lmt_parshape = applyparameters "parshape" "lmt_do_parshape" enddef ;
+
+def lmt_do_parshape = % todo: check and improve this rather oldie
+
+ begingroup ; pushparameters "parshape" ;
+
+ save
+ p, q, l, r, line, tt, bb,
+ dx, dy, baselineskip, strutheight, strutdepth, topskip, bottomskip, offset, trace,
+ n, hsize, vsize, vvsize, voffset, hoffset, width, indent,
+ ll, lll, rr, rrr, cp, cq, t, b,
+ found_point ;
+
+ path
+ p, q, l, r, line, tt, bb ;
+ numeric
+ dx, dy, baselineskip, strutheight, strutdepth, topskip, offset,
+ n, hsize, vsize, vvsize, voffset, hoffset, width[], indent[] ;
+ pair
+ ll, lll, rr, rrr, cp, cq, t, b ;
+ boolean
+ trace ;
+
+ % specification:
+
+ p := getparameterdefault "path" fullsquare ;
+ dx := getparameterdefault "dx" 0 ;
+ dy := getparameterdefault "dy" 0 ;
+ baselineskip := getparameterdefault "baselineskip" LineHeight ;
+ strutheight := getparameterdefault "strutheight" StrutHeight ;
+ strutdepth := getparameterdefault "strutdepth" StrutDepth ;
+ topskip := getparameterdefault "topskip" StrutHeight ;
+ bottomskip := getparameterdefault "bottomskip" 0 ;
+ offset := getparameterdefault "offset" 0 ;
+ trace := getparameterdefault "trace" false ;
+
+ %
+
+ n := 0 ;
+ cp := center p ;
+
+ if hasparameter "offsetpath" :
+ q := getparameter "offsetpath" ;
+ voffset := dy ;
+ hoffset := dx ;
+ else :
+ q := p ;
+ hoffset := offset + dx ;
+ voffset := offset + dy ;
+ fi ;
+
+ cq := center q ;
+
+ hsize := xpart lrcorner q - xpart llcorner q ;
+ vsize := ypart urcorner q - ypart lrcorner q ;
+
+ q := p shifted - cp ;
+
+ runscript mfid_setparshapeproperty "voffset" voffset ;
+ runscript mfid_setparshapeproperty "hoffset" hoffset ;
+ runscript mfid_setparshapeproperty "width" hsize ;
+ runscript mfid_setparshapeproperty "height" vsize ;
+
+ if hasparameter "offsetpath" :
+ q := q xscaled ((hsize-2hoffset)/hsize) yscaled ((vsize-2voffset)/vsize) ;
+ fi ;
+
+ hsize := xpart lrcorner q - xpart llcorner q ;
+ vsize := ypart urcorner q - ypart lrcorner q ;
+
+ t := (ulcorner q -- urcorner q) intersection_point q ;
+ b := (llcorner q -- lrcorner q) intersection_point q ;
+
+ if xpart directionpoint t of q < 0 :
+ q := reverse q ;
+ fi ;
+
+ l := q cutbefore t ;
+ l := l if xpart point 0 of q < 0 : & q fi cutafter b ;
+
+ r := q cutbefore b ;
+ r := r if xpart point 0 of q > 0 : & q fi cutafter t ;
+
+ vardef found_point (expr lin, pat, sig) =
+ save a, b; pair a, b ;
+ a := pat intersection_point (lin shifted (0,strutheight)) ;
+ if intersection_found :
+ a := a shifted (0,-strutheight) ;
+ else :
+ a := pat intersection_point lin ;
+ fi ;
+ b := pat intersection_point (lin shifted (0,-strutdepth)) ;
+ if intersection_found :
+ if sig :
+ if xpart b > xpart a : a := b shifted (0,strutdepth) fi ;
+ else :
+ if xpart b < xpart a : a := b shifted (0,strutdepth) fi ;
+ fi ;
+ fi ;
+ a
+ enddef ;
+
+ if (strutheight + strutdepth < baselineskip) :
+ vvsize := vsize ;
+ else :
+ vvsize := (vsize div baselineskip) * baselineskip ;
+ fi ;
+
+ runscript mfid_setparshapeproperty "first" false ;
+
+ for i = topskip step baselineskip until (vvsize + bottomskip) :
+
+ line := (ulcorner q -- urcorner q) shifted (0,-i-eps) ;
+
+ ll := found_point(line,l,true ) ;
+ rr := found_point(line,r,false) ;
+
+ if trace :
+ fill (ll -- rr -- rr shifted (0,strutheight) -- ll shifted (0,strutheight) -- cycle) shifted cp withcolor .6white ;
+ fill (ll -- rr -- rr shifted (0,-strutdepth) -- ll shifted (0,-strutdepth) -- cycle) shifted cp withcolor .8white ;
+ draw ll shifted cp withpen pencircle scaled 2pt ;
+ draw rr shifted cp withpen pencircle scaled 2pt ;
+ draw (ll -- rr) shifted cp withpen pencircle scaled .5pt ;
+ fi ;
+
+ n := n + 1 ;
+ indent[n] := abs(xpart ll - xpart llcorner q) ;
+ width[n] := abs(xpart rr - xpart ll) ;
+
+ if (i = strutheight) and (width[n] < baselineskip) :
+ n := n - 1 ;
+ runscript mfid_setparshapeproperty "first" true ;
+ fi ;
+
+ endfor ;
+
+ if trace :
+ drawarrow p withpen pencircle scaled 2pt withcolor red ;
+ drawarrow l shifted cp withpen pencircle scaled 1pt withcolor green ;
+ drawarrow r shifted cp withpen pencircle scaled 1pt withcolor blue ;
+ fi ;
+
+ runscript mfid_setparshapeproperty "lines" n ;
+
+ for i=1 upto n:
+ runscript mfid_setparshapeproperty "line" i (indent[i]) (width[i]) ;
+ endfor ;
+
+ popparameters ; endgroup ;
+
+enddef ;
+
+def build_parshape (expr p, offset_or_path, dx, dy, baselineskip, strutheight, strutdepth, topskip) =
+ if path offset_or_path :
+ lmt_parshape [
+ path = p,
+ offsetpath = offset_or_path,
+ dx = dx,
+ dy = dy,
+ strutheight = strutheight,
+ strutdepth = strutdepth,
+ lineheight = lineheight,
+ topskip = topskip,
+ trace = (if unknown trace_parshape : false else : trace_parshape fi),
+ ]
+ else :
+ lmt_parshape [
+ path = p,
+ offset = offset_or_path,
+ dx = dx,
+ dy = dy,
+ strutheight = strutheight,
+ strutdepth = strutdepth,
+ lineheight = lineheight,
+ topskip = topskip,
+ trace = (if unknown trace_parshape : false else : trace_parshape fi),
+ ]
+ fi ;
+enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-tool.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-tool.mpxl
new file mode 100644
index 00000000000..7ea222fb002
--- /dev/null
+++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-tool.mpxl
@@ -0,0 +1,3831 @@
+%D \module
+%D [ file=mp-tool.mpiv,
+%D version=1998.02.15,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=auxiliary macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+if known metafun_loaded_tool : endinput ; fi ;
+
+newinternal boolean metafun_loaded_tool ; metafun_loaded_tool := true ; immutable metafun_loaded_tool ;
+
+let @## = @# ;
+
+let noexpand = quote ;
+
+permanent @##, noexpand ;
+
+%D New, version number testing:
+%D
+%D \starttyping
+%D fill fullcircle scaled 2cm withcolor if mpversiongt("0.6") : red else : green fi ;
+%D fill fullcircle scaled 1cm withcolor if mpversionlt(0.6) : blue else : white fi ;
+%D \stoptyping
+
+if not known mpversion : string mpversion ; mpversion := "0.641" ; fi ;
+
+% newinternal metapostversion ; metapostversion := scantokens(mpversion) ;
+
+newinternal metapostversion ; metapostversion := 2.0 ; permanent metapostversion ;
+
+%D We always want \EPS\ conforming output, so we say:
+
+warningcheck := 0 ;
+
+%D Handy:
+
+def nothing = enddef ;
+
+%D Namespace handling:
+
+% let exclamationmark = ! ;
+% let questionmark = ? ;
+%
+% def unprotect =
+% let ! = relax ;
+% let ? = relax ;
+% enddef ;
+%
+% def protect =
+% let ! = exclamationmark ;
+% let ? = questionmark ;
+% enddef ;
+%
+% unprotect ;
+%
+% mp!some!module = 10 ; show mp!some!module ; show somemodule ;
+%
+% protect ;
+
+string space ; space := char 32 ;
+string percent ; percent := char 37 ;
+string crlf ; crlf := char 10 & char 13 ;
+string dquote ; dquote := char 34 ;
+
+% let SPACE = space ;
+% let CRLF = crlf ;
+% let DQUOTE = dquote ;
+% let PERCENT = percent ;
+
+permanent space, percent, crlf, dquote ;
+
+% %D Plain compatibility:
+%
+% string plain_compatibility_data ; plain_compatibility_data := "" ;
+%
+% def startplaincompatibility =
+% begingroup ;
+% scantokens plain_compatibility_data ;
+% enddef ;
+%
+% def stopplaincompatibility =
+% endgroup ;
+% enddef ;
+
+%D More neutral:
+
+let triplet = rgbcolor ;
+let quadruplet = cmykcolor ;
+
+permanent triplet, quadruplet ;
+
+%D Image redefined, for Alan:
+
+vardef image@#(text t) =
+ save currentpicture ;
+ picture currentpicture ;
+ currentpicture := nullpicture ;
+ t ;
+ currentpicture
+ if str @# <> "" :
+ shifted (
+ mfun_labxf@# * lrcorner p
+ + mfun_labyf@# * ulcorner p
+ + (1-mfun_labxf@#-mfun_labyf@#) * llcorner p
+ )
+ fi
+enddef ;
+
+permanent image ;
+
+%D Variables
+
+def dispose suffix s =
+ if known s :
+ begingroup ;
+ save ss ;
+ if numeric s : numeric ss
+ elseif boolean s : boolean ss
+ elseif pair s : pair ss
+ elseif path s : path ss
+ elseif picture s : picture ss
+ elseif string s : string ss
+ elseif transform s : transform ss
+ elseif color s : color ss
+ elseif rgbcolor s : rgbcolor ss
+ elseif cmykcolor s : cmykcolor ss
+ elseif pen s : pen ss
+ else s : numeric ss
+ fi ;
+ s := ss ;
+ endgroup ;
+ fi ;
+enddef ;
+
+permanent dispose ;
+
+%D Colors:
+
+newinternal nocolormodel ; nocolormodel := 1 ;
+newinternal greycolormodel ; greycolormodel := 3 ;
+newinternal graycolormodel ; graycolormodel := 3 ;
+newinternal rgbcolormodel ; rgbcolormodel := 5 ;
+newinternal cmykcolormodel ; cmykcolormodel := 7 ;
+
+let grayscale = graycolor ;
+let greyscale = greycolor ;
+
+vardef colorpart expr c =
+ if not picture c :
+ 0
+ elseif colormodel c = greycolormodel :
+ greypart c
+ elseif colormodel c = rgbcolormodel :
+ (redpart c,greenpart c,bluepart c)
+ elseif colormodel c = cmykcolormodel :
+ (cyanpart c,magentapart c,yellowpart c,blackpart c)
+ else :
+ 0 % black
+ fi
+enddef ;
+
+vardef colorlike(text c) text v = % colorlike(a) b, c, d ;
+ save temp_p ; picture temp_p ;
+ forsuffixes i=v :
+ temp_p := image(draw origin withcolor c ;) ; % intercept pre and postscripts
+ if (colormodel temp_p = cmykcolormodel) :
+ cmykcolor i ;
+ elseif (colormodel temp_p = rgbcolormodel) :
+ rgbcolor i ;
+ else :
+ greycolor i ;
+ fi ;
+ endfor ;
+enddef ;
+
+permanent nocolormodel, greycolormodel, graycolormodel, rgbcolormodel, cmykcolormodel,
+ greyscale, grayscale, colorpart, colorlike ;
+
+%D Also multiple d's: handy (when we flush colors):
+
+vardef ddecimal primary p =
+ decimal xpart p & " " & decimal ypart p
+enddef ;
+
+vardef dddecimal primary c =
+ decimal redpart c & " " & decimal greenpart c & " " & decimal bluepart c
+enddef ;
+
+vardef ddddecimal primary c =
+ decimal cyanpart c & " " & decimal magentapart c & " " & decimal yellowpart c & " " & decimal blackpart c
+enddef ;
+
+vardef colordecimals primary c =
+ if cmykcolor c :
+ decimal cyanpart c & ":" & decimal magentapart c & ":" & decimal yellowpart c & ":" & decimal blackpart c
+ elseif rgbcolor c :
+ decimal redpart c & ":" & decimal greenpart c & ":" & decimal bluepart c
+ elseif string c:
+ colordecimals resolvedcolor(c)
+ else :
+ decimal c
+ fi
+enddef ;
+
+vardef colordecimalslist(text t) =
+ save b ; boolean b ; b := false ;
+ for s=t :
+ if b : & " " & fi
+ colordecimals(s)
+ hide(b := true ;)
+ endfor
+enddef ;
+
+permanent decimal, ddecimal, dddecimal, ddddecimal, colordecimals, colordecimalslist ;
+
+% vardef _ctx_color_spec_ primary c =
+% if cmykcolor c :
+% "c=" & decimal cyanpart c &
+% ",m=" & decimal magentapart c &
+% ",y=" & decimal yellowpart c &
+% ",k=" & decimal blackpart c
+% elseif rgbcolor c :
+% "r=" & decimal redpart c &
+% ",g=" & decimal greenpart c &
+% ",b=" & decimal bluepart c
+% else :
+% "s=" & decimal c
+% fi
+% enddef ;
+%
+% vardef _ctx_color_spec_list_(text t) =
+% save b ; boolean b ; b := false ;
+% for s=t :
+% if b : & " " & fi
+% _ctx_color_spec_(s)
+% hide(b := true ;)
+% endfor
+% enddef ;
+
+%D Because \METAPOST\ has a hard coded limit of 4~datafiles, we need some trickery
+%D when we have multiple files. This will be redone (via \LUA).
+
+boolean savingdata ; savingdata := false ;
+boolean savingdatadone ; savingdatadone := false ;
+
+def savedata expr txt =
+ lua.mp.mf_save_data(txt);
+enddef ;
+
+def startsavingdata =
+ lua.mp.mf_start_saving_data();
+enddef ;
+
+def stopsavingdata =
+ lua.mp.mf_stop_saving_data() ;
+enddef ;
+
+def finishsavingdata =
+ lua.mp.mf_finish_saving_data() ;
+enddef ;
+
+%D Instead of a keystroke eating save and allocation sequence, you can use the \quote
+%D {new} alternatives to save and allocate in one command.
+
+%D Are these used?
+
+def newcolor text v = forsuffixes i=v : save i ; color i ; endfor ; enddef ;
+def newrgbcolor text v = forsuffixes i=v : save i ; rgbcolor i ; endfor ; enddef ;
+def newcmykcolor text v = forsuffixes i=v : save i ; cmykcolor i ; endfor ; enddef ;
+def newnumeric text v = forsuffixes i=v : save i ; numeric i ; endfor ; enddef ;
+def newboolean text v = forsuffixes i=v : save i ; boolean i ; endfor ; enddef ;
+def newtransform text v = forsuffixes i=v : save i ; transform i ; endfor ; enddef ;
+def newpath text v = forsuffixes i=v : save i ; path i ; endfor ; enddef ;
+def newpicture text v = forsuffixes i=v : save i ; picture i ; endfor ; enddef ;
+def newstring text v = forsuffixes i=v : save i ; string i ; endfor ; enddef ;
+def newpair text v = forsuffixes i=v : save i ; pair i ; endfor ; enddef ;
+
+permanent newcolor, newrgbcolor, newcmykcolor, newnumeric, newboolean, newtransform, newpath, newpicture, newstring, newpair ;
+
+%D Sometimes we don't want parts of the graphics add to the bounding box. One way of
+%D doing this is to save the bounding box, draw the graphics that may not count, and
+%D restore the bounding box.
+%D
+%D \starttyping
+%D push_boundingbox currentpicture;
+%D pop_boundingbox currentpicture;
+%D \stoptyping
+%D
+%D The bounding box can be called with:
+%D
+%D \starttyping
+%D boundingbox currentpicture
+%D inner_boundingbox currentpicture
+%D outer_boundingbox currentpicture
+%D \stoptyping
+%D
+%D Especially the latter one can be of use when we include the graphic in a document
+%D that is clipped to the bounding box. In such occasions one can use:
+%D
+%D \starttyping
+%D set_outer_boundingbox currentpicture;
+%D \stoptyping
+%D
+%D Its counterpart is:
+%D
+%D \starttyping
+%D set_inner_boundingbox p
+%D \stoptyping
+
+path mfun_boundingbox_stack[] ;
+numeric mfun_boundingbox_stack_depth ;
+
+mfun_boundingbox_stack_depth := 0 ;
+
+def pushboundingbox text p =
+ mfun_boundingbox_stack_depth := mfun_boundingbox_stack_depth + 1 ;
+ mfun_boundingbox_stack[mfun_boundingbox_stack_depth] := boundingbox p ;
+enddef ;
+
+def popboundingbox text p =
+ setbounds p to mfun_boundingbox_stack[mfun_boundingbox_stack_depth] ;
+ mfun_boundingbox_stack[mfun_boundingbox_stack_depth] := origin -- cycle ;
+ mfun_boundingbox_stack_depth := mfun_boundingbox_stack_depth - 1 ;
+enddef ;
+
+% let push_boundingbox = pushboundingbox ; % downward compatible
+% let pop_boundingbox = popboundingbox ; % downward compatible
+
+vardef boundingbox primary p =
+ if (path p) or (picture p) :
+ llcorner p -- lrcorner p -- urcorner p -- ulcorner p
+ else :
+ origin
+ fi -- cycle
+enddef;
+
+vardef innerboundingbox primary p =
+ top rt llcorner p --
+ top lft lrcorner p --
+ bot lft urcorner p --
+ bot rt ulcorner p -- cycle
+enddef;
+
+vardef outerboundingbox primary p =
+ bot lft llcorner p --
+ bot rt lrcorner p --
+ top rt urcorner p --
+ top lft ulcorner p -- cycle
+enddef;
+
+% def inner_boundingbox = innerboundingbox enddef ;
+% def outer_boundingbox = outerboundingbox enddef ;
+%
+% vardef set_inner_boundingbox text q = % obsolete
+% setbounds q to innerboundingbox q;
+% enddef;
+%
+% vardef set_outer_boundingbox text q = % obsolete
+% setbounds q to outerboundingbox q;
+% enddef;
+
+% secondarydef a boundedto b = % will this cleanup ?
+% hide(picture mfun_a_b ; mfun_a_b := a ; setbounds mfun_a_b to b;)
+% mfun_a_b
+% enddef ;
+
+%D Here are some special ones, cooked up in the process of Alan's mp-node
+%D module:
+
+vardef boundingradius primary p =
+ if picture p :
+ max(
+ abs((llcorner p) shifted -center p),
+ abs((lrcorner p) shifted -center p),
+ abs((urcorner p) shifted -center p),
+ abs((ulcorner p) shifted -center p)
+ )
+ elseif pen p :
+ boundingradius image(draw makepath p ;)
+ elseif path p :
+ boundingradius image(draw p ;)
+ fi
+enddef ;
+
+vardef boundingcircle primary p =
+ fullcircle scaled 2boundingradius p shifted center p
+enddef ;
+
+vardef boundingpoint@#(expr p) =
+ if picture p : % pen?
+ ( mfun_labxf@# *ulcorner p
+ + mfun_labyf@# *lrcorner p
+ +(1-mfun_labxf@#-mfun_labyf@#)*urcorner p)
+ elseif path p :
+ boundingpoint@#(image(draw p ;))
+ %elseif pair p :
+ % p
+ %else :
+ % origin
+ fi
+enddef ;
+
+permanent pushboundingbox, popboundingbox, boundingbox, innerboundingbox, outerboundingbox,
+ boundingradius, boundingcircle, boundingpoint ;
+
+%D Whatever:
+
+def mirrored primary a =
+ a scaled -1
+enddef ;
+
+primarydef a mirroredabout b =
+ (a shifted -b) scaled -1 shifted b
+enddef ;
+
+permanent mirrored, mirroredabout ;
+
+%D Some missing functions can be implemented rather straightforward (thanks to Taco
+%D and others):
+
+% oldpi := 3.14159265358979323846 ; % from <math.h>
+pi := 3.14159265358979323846264338327950288419716939937510 ; % 50 digits
+radian := 180/pi ; % 2pi*radian = 360 ;
+
+permanent pi, radian ;
+
+% let +++ = ++ ;
+
+vardef sqr primary x = x*x enddef ;
+vardef log primary x = if x=0: 0 else: mlog(x)/mlog(10) fi enddef ;
+vardef ln primary x = if x=0: 0 else: mlog(x)/256 fi enddef ;
+vardef exp primary x = (mexp 256)**x enddef ;
+vardef inv primary x = if x=0: 0 else: x**-1 fi enddef ;
+
+vardef pow (expr x,p) = x**p enddef ;
+
+vardef tand primary x = sind(x)/cosd(x) enddef ;
+vardef cotd primary x = cosd(x)/sind(x) enddef ;
+
+% sin primary x = sind(x*radian) enddef ;
+% cos primary x = cosd(x*radian) enddef ;
+% tan primary x = sin(x)/cos(x) enddef ;
+vardef cot primary x = cos(x)/sin(x) enddef ;
+
+% asin primary x = angle((1+-+x,x)) enddef ;
+% acos primary x = angle((x,1+-+x)) enddef ;
+% atan primary x = angle(1,x) enddef ;
+
+% invsin primary x = (asin(x))/radian enddef ;
+% invcos primary x = (acos(x))/radian enddef ;
+% invtan primary x = (atan(x))/radian enddef ;
+
+% acosh primary x = ln(x+(x+-+1)) enddef ;
+% asinh primary x = ln(x+(x++1)) enddef ;
+
+% sinh primary x = save xx ; xx = exp x ; (xx-1/xx)/2 enddef ;
+% cosh primary x = save xx ; xx = exp x ; (xx+1/xx)/2 enddef ;
+% tanh primary x = save xx ; xx = exp x ; (xx-1/xx)/(xx+1/xx) enddef ;
+
+%D Like mod, but useful for angles, it returns (-.5d,+.5d] and is used
+%D in for instance mp-chem.
+
+primarydef a zmod b = (-((b/2 - a) mod b) + b/2) enddef ;
+
+permanent sqr, log, ln, exp, inv, pow, tand, cotd, cot, zmod ;
+
+%D Sometimes this is handy:
+
+def undashed =
+ dashed nullpicture
+enddef ;
+
+permanent undashed ;
+
+%D We provide two macros for drawing stripes across a shape. The first method (with the
+%D n suffix) uses another method, slower in calculation, but more efficient when drawn.
+%D The first macro divides the sides into n equal parts. The first argument specifies the
+%D way the lines are drawn, while the second argument identifier the way the shape is to
+%D be drawn.
+%D
+%D \starttyping
+%D stripe_path_n
+%D (dashed evenly withcolor blue)
+%D (filldraw)
+%D fullcircle xscaled 100 yscaled 40 shifted (50,50) withpen pencircle scaled 4;
+%D \stoptyping
+%D
+%D The a (or angle) alternative supports arbitrary angles and is therefore more versatile.
+%D
+%D \starttyping
+%D stripe_path_a
+%D (withpen pencircle scaled 2 withcolor red)
+%D (draw)
+%D fullcircle xscaled 100 yscaled 40 withcolor blue;
+%D \stoptyping
+%D
+%D We have two alternatives, controlled by arguments or defaults (when arguments are zero).
+%D
+%D The newer and nicer interface is used as follows (triggered by a question by Mari):
+%D
+%D \starttyping
+%D draw image (draw fullcircle scaled 3cm shifted (0cm,0cm) withcolor green) numberstriped (1,10,3) withcolor red ;
+%D draw image (draw fullcircle scaled 3cm shifted (3cm,0cm) withcolor green) numberstriped (2,20,3) withcolor green ;
+%D draw image (draw fullcircle scaled 3cm shifted (3cm,3cm) withcolor green) numberstriped (3,10,5) withcolor blue ;
+%D draw image (draw fullcircle scaled 3cm shifted (0cm,3cm) withcolor green) numberstriped (4,20,5) withcolor yellow ;
+%D
+%D draw image (draw fullcircle scaled 3cm shifted (6cm,0cm) withcolor green) anglestriped (1,20,2) withcolor red ;
+%D draw image (draw fullcircle scaled 3cm shifted (9cm,0cm) withcolor green) anglestriped (2,40,2) withcolor green ;
+%D draw image (draw fullcircle scaled 3cm shifted (9cm,3cm) withcolor green) anglestriped (3,60,2) withcolor blue ;
+%D draw image (draw fullcircle scaled 3cm shifted (6cm,3cm) withcolor green) anglestriped (4,80,2) withcolor yellow ;
+%D
+%D draw image (
+%D draw fullcircle scaled 3cm shifted (0cm,0cm) withcolor green withpen pencircle scaled 2mm ;
+%D draw fullcircle scaled 2cm shifted (0cm,1cm) withcolor blue withpen pencircle scaled 3mm ;
+%D ) shifted (9cm,0cm) numberstriped (1,10,3) withcolor red ;
+%D
+%D draw image (
+%D draw fullcircle scaled 3cm shifted (0cm,0cm) withcolor green withpen pencircle scaled 2mm ;
+%D draw fullcircle scaled 2cm shifted (0cm,1cm) withcolor blue withpen pencircle scaled 3mm ;
+%D ) shifted (12cm,0cm) numberstriped (2,10,3) withcolor red ;
+%D
+%D draw image (
+%D draw fullcircle scaled 3cm shifted (0cm,0cm) withcolor green withpen pencircle scaled 2mm ;
+%D draw fullcircle scaled 2cm shifted (0cm,1cm) withcolor blue withpen pencircle scaled 3mm ;
+%D ) shifted (9cm,5cm) numberstriped (3,10,3) withcolor red ;
+%D
+%D draw image (
+%D draw fullcircle scaled 3cm shifted (0cm,0cm) withcolor green withpen pencircle scaled 2mm ;
+%D draw fullcircle scaled 2cm shifted (0cm,1cm) withcolor blue withpen pencircle scaled 3mm ;
+%D ) shifted (12cm,5cm) numberstriped (4,10,3) withcolor red ;
+%D \stoptyping
+
+stripe_n := 10;
+stripe_slot := 3;
+stripe_gap := 5;
+stripe_angle := 45;
+
+def mfun_tool_striped_number_action text extra =
+ for i = 1/used_n step 1/used_n until 1 :
+ draw point (1+i) of bounds -- point (3-i) of bounds withpen pencircle scaled penwidth extra ;
+ endfor ;
+ for i = 0 step 1/used_n until 1 :
+ draw point (3+i) of bounds -- point (1-i) of bounds withpen pencircle scaled penwidth extra ;
+ endfor ;
+enddef ;
+
+def mfun_tool_striped_set_options(expr option) =
+ save isinner, swapped ;
+ boolean isinner, swapped ;
+ if option = 1 :
+ isinner := false ;
+ swapped := false ;
+ elseif option = 2 :
+ isinner := true ;
+ swapped := false ;
+ elseif option = 3 :
+ isinner := false ;
+ swapped := true ;
+ elseif option = 4 :
+ isinner := true ;
+ swapped := true ;
+ else :
+ isinner := false ;
+ swapped := false ;
+ fi ;
+enddef ;
+
+vardef mfun_tool_striped_number(expr option, p, asked_n, asked_slot) text extra =
+ image (
+ begingroup ;
+ save pattern, shape, bounds, penwidth, used_n, used_slot ;
+ picture pattern, shape ; path bounds ; numeric used_s, used_slot ;
+ mfun_tool_striped_set_options(option) ;
+ used_slot := if asked_slot = 0 : stripe_slot else : asked_slot fi ;
+ used_n := if asked_n = 0 : stripe_n else : asked_n fi ;
+ shape := image(draw p) ;
+ bounds := boundingbox shape ;
+ penwidth := min(ypart urcorner shape - ypart llcorner shape, xpart urcorner shape - xpart llcorner shape) / (used_slot * used_n) ;
+ pattern := image (
+ if isinner :
+ mfun_tool_striped_number_action extra ;
+ for s within shape :
+ if stroked s or filled s :
+ clip currentpicture to pathpart s ;
+ fi
+ endfor ;
+ else :
+ for s within shape :
+ if stroked s or filled s :
+ draw image (
+ mfun_tool_striped_number_action extra ;
+ clip currentpicture to pathpart s ;
+ ) ;
+ fi ;
+ endfor ;
+ fi ;
+ ) ;
+ if swapped :
+ addto currentpicture also shape ;
+ addto currentpicture also pattern ;
+ else :
+ addto currentpicture also pattern ;
+ addto currentpicture also shape ;
+ fi ;
+ endgroup ;
+ )
+enddef ;
+
+def mfun_tool_striped_angle_action text extra =
+ for i = minimum -.5used_gap step used_gap until maximum :
+ draw (minimum,i) -- (maximum,i) extra ;
+ endfor ;
+ currentpicture := currentpicture rotated used_angle ;
+enddef ;
+
+vardef mfun_tool_striped_angle(expr option, p, asked_angle, asked_gap) text extra =
+ image (
+ begingroup ;
+ save pattern, shape, mask, maximum, minimum, centrum, used_angle, used_gap ;
+ picture pattern, shape, mask ; numeric maximum, minimum ; pair centrum ; numeric used_angle, used_gap ;
+ mfun_tool_striped_set_options(option) ;
+ used_angle := if asked_angle = 0 : stripe_angle else : asked_angle fi ;
+ used_gap := if asked_gap = 0 : stripe_gap else : asked_gap fi ;
+ shape := image(draw p) ;
+ centrum := center shape ;
+ shape := shape shifted - centrum ;
+ mask := shape rotated used_angle ;
+ maximum := max (xpart llcorner mask, xpart urcorner mask, ypart llcorner mask, ypart urcorner mask) ;
+ minimum := min (xpart llcorner mask, xpart urcorner mask, ypart llcorner mask, ypart urcorner mask) ;
+ pattern := image (
+ if isinner :
+ mfun_tool_striped_angle_action extra ;
+ for s within shape :
+ if stroked s or filled s :
+ clip currentpicture to pathpart s ;
+ fi
+ endfor ;
+ else :
+ for s within shape :
+ if stroked s or filled s :
+ draw image (
+ mfun_tool_striped_angle_action extra ;
+ clip currentpicture to pathpart s ;
+ ) ;
+ fi ;
+ endfor ;
+ fi ;
+ ) ;
+ if swapped :
+ addto currentpicture also shape ;
+ addto currentpicture also pattern ;
+ else :
+ addto currentpicture also pattern ;
+ addto currentpicture also shape ;
+ fi ;
+ currentpicture := currentpicture shifted centrum ;
+ endgroup ;
+ )
+enddef;
+
+newinternal striped_normal_inner ; striped_normal_inner := 1 ;
+newinternal striped_reverse_inner ; striped_reverse_inner := 2 ;
+newinternal striped_normal_outer ; striped_normal_outer := 3 ;
+newinternal striped_reverse_outer ; striped_reverse_outer := 4 ;
+
+secondarydef p anglestriped s =
+ mfun_tool_striped_angle(redpart s,p,greenpart s,bluepart s)
+enddef ;
+
+secondarydef p numberstriped s =
+ mfun_tool_striped_number(redpart s,p,greenpart s,bluepart s)
+enddef ;
+
+% for old times sake:
+
+def stripe_path_n (text asked_spec) (text asked_draw) expr asked_path =
+ do_stripe_path_n (asked_spec) (asked_draw) (asked_path)
+enddef;
+
+def do_stripe_path_n (text asked_spec) (text asked_draw) (expr asked_path) text asked_text =
+ draw image(asked_draw asked_path asked_text) numberstriped(3,0,0) asked_spec ;
+enddef ;
+
+def stripe_path_a (text asked_spec) (text asked_draw) expr asked_path =
+ do_stripe_path_a (asked_spec) (asked_draw) (asked_path)
+enddef;
+
+def do_stripe_path_a (text asked_spec) (text asked_draw) (expr asked_path) text asked_text =
+ draw image(asked_draw asked_path asked_text) anglestriped(3,0,0) asked_spec ;
+enddef ;
+
+%D A few normalizing macros:
+
+primarydef p xsized w =
+ (p if (bbwidth (p) > 0) and (w > 0) : scaled (w/bbwidth (p)) fi)
+enddef ;
+
+primarydef p ysized h =
+ (p if (bbheight(p) > 0) and (h > 0) : scaled (h/bbheight(p)) fi)
+enddef ;
+
+primarydef p xysized s =
+ begingroup
+ save wh, w, h ; pair wh ; numeric w, h ;
+ wh := paired (s) ; w := bbwidth(p) ; h := bbheight(p) ;
+ p
+ if (w>0) and (h>0) :
+ if xpart wh > 0 : xscaled (xpart wh/w) fi
+ if ypart wh > 0 : yscaled (ypart wh/h) fi
+ fi
+ endgroup
+enddef ;
+
+let sized = xysized ;
+
+permanent xsized, ysized, xysized, sized ;
+
+% def xscale_currentpicture(expr w) = % obsolete
+% currentpicture := currentpicture xsized w ;
+% enddef;
+%
+% def yscale_currentpicture(expr h) = % obsolete
+% currentpicture := currentpicture ysized h ;
+% enddef;
+%
+% def xyscale_currentpicture(expr w, h) = % obsolete
+% currentpicture := currentpicture xysized (w,h) ;
+% enddef;
+%
+% def scale_currentpicture(expr w, h) = % obsolete
+% currentpicture := currentpicture xsized w ;
+% currentpicture := currentpicture ysized h ;
+% enddef;
+
+%D A full circle is centered at the origin, while a unitsquare is located in the first
+%D quadrant. Now guess what kind of path fullsquare and unitcircle do return.
+
+path fullsquare, unitcircle ;
+
+fullsquare := unitsquare shifted - center unitsquare ;
+unitcircle := fullcircle shifted urcorner fullcircle ;
+
+%D Some more paths:
+
+path urcircle, ulcircle, llcircle, lrcircle ;
+
+urcircle := origin -- (+.5,0) & (+.5,0){up} .. (0,+.5) & (0,+.5) -- cycle ;
+ulcircle := origin -- (0,+.5) & (0,+.5){left} .. (-.5,0) & (-.5,0) -- cycle ;
+llcircle := origin -- (-.5,0) & (-.5,0){down} .. (0,-.5) & (0,-.5) -- cycle ;
+lrcircle := origin -- (0,-.5) & (0,-.5){right} .. (+.5,0) & (+.5,0) -- cycle ;
+
+path tcircle, bcircle, lcircle, rcircle ;
+
+tcircle = origin -- (+.5,0) & (+.5,0) {up} .. (0,+.5) .. {down} (-.5,0) -- cycle ;
+bcircle = origin -- (-.5,0) & (-.5,0) {down} .. (0,-.5) .. {up} (+.5,0) -- cycle ;
+lcircle = origin -- (0,+.5) & (0,+.5) {left} .. (-.5,0) .. {right} (0,-.5) -- cycle ;
+rcircle = origin -- (0,-.5) & (0,-.5) {right} .. (+.5,0) .. {left} (0,+.5) -- cycle ;
+
+path urtriangle, ultriangle, lltriangle, lrtriangle ; % watch out: it's contrary to what you expect and starts in the origin
+
+urtriangle := origin -- (+.5,0) -- (0,+.5) -- cycle ;
+ultriangle := origin -- (0,+.5) -- (-.5,0) -- cycle ;
+lltriangle := origin -- (-.5,0) -- (0,-.5) -- cycle ;
+lrtriangle := origin -- (0,-.5) -- (+.5,0) -- cycle ;
+
+path triangle, uptriangle, downtriangle, lefttriangle, righttriangle ;
+
+triangle := (1,0) -- (1,0) rotated 120 -- (1,0) rotated -120 -- cycle ;
+
+uptriangle := triangle rotated 90 ;
+downtriangle := triangle rotated -90 ;
+lefttriangle := triangle rotated 180 ;
+righttriangle := triangle ;
+
+path unitdiamond, fulldiamond ;
+
+unitdiamond := (.5,0) -- (1,.5) -- (.5,1) -- (0,.5) -- cycle ;
+fulldiamond := unitdiamond shifted - center unitdiamond ;
+
+permanent
+ fullsquare, unitcircle,
+ urcircle, ulcircle, llcircle, lrcircle,
+ tcircle, bcircle, lcircle, rcircle,
+ urtriangle, ultriangle, lltriangle, lrtriangle,
+ triangle, uptriangle, downtriangle, lefttriangle, righttriangle,
+ unitdiamond, fulldiamond ;
+
+%D More robust:
+
+% let normalscaled = scaled ;
+% let normalxscaled = xscaled ;
+% let normalyscaled = yscaled ;
+%
+% def scaled expr s = normalscaled (s) enddef ;
+% def xscaled expr s = normalxscaled (s) enddef ;
+% def yscaled expr s = normalyscaled (s) enddef ;
+
+%D Shorter
+
+primarydef p xyscaled q = % secundarydef does not work out well
+ begingroup
+ save qq ; pair qq ;
+ qq = paired(q) ;
+ p
+ if xpart qq <> 0 : xscaled (xpart qq) fi
+ if ypart qq <> 0 : yscaled (ypart qq) fi
+ endgroup
+enddef ;
+
+permanent xyscaled ;
+
+%D Some personal code that might move to another module (todo: save).
+
+def set_grid(expr w, h, nx, ny) =
+ boolean grid[][] ; boolean grid_full ;
+ numeric grid_w, grid_h, grid_nx, grid_ny, grid_x, grid_y, grid_left ;
+ grid_w := w ;
+ grid_h := h ;
+ grid_nx := nx ;
+ grid_ny := ny ;
+ grid_x := round(w/grid_nx) ; % +.5) ;
+ grid_y := round(h/grid_ny) ; % +.5) ;
+ grid_left := (1+grid_x)*(1+grid_y) ;
+ grid_full := false ;
+ for i=0 upto grid_x :
+ for j=0 upto grid_y :
+ grid[i][j] := false ;
+ endfor ;
+ endfor ;
+enddef ;
+
+vardef new_on_grid(expr grid_dx, grid_dy) =
+ dx := grid_dx ;
+ dy := grid_dy ;
+ ddx := min(round(dx/grid_nx),grid_x) ; % +.5),grid_x) ;
+ ddy := min(round(dy/grid_ny),grid_y) ; % +.5),grid_y) ;
+ if not grid_full and not grid[ddx][ddy] :
+ grid[ddx][ddy] := true ;
+ grid_left := grid_left-1 ;
+ grid_full := (grid_left=0) ;
+ true
+ else :
+ false
+ fi
+enddef ;
+
+%D usage: \type{innerpath peepholed outerpath}.
+%D
+%D beginfig(1);
+%D def fullsquare = (unitsquare shifted -center unitsquare) enddef ;
+%D fill (fullsquare scaled 200) withcolor red ;
+%D path p ; p := (fullcircle scaled 100) ; bboxmargin := 0 ;
+%D fill p peepholed bbox p ;
+%D endfig;
+
+secondarydef p peepholed q =
+ begingroup
+ save start ; pair start ;
+ start := point 0 of p ;
+ if xpart start >= xpart center p :
+ if ypart start >= ypart center p :
+ urcorner q -- ulcorner q -- llcorner q -- lrcorner q --
+ reverse p -- lrcorner q -- cycle
+ else :
+ lrcorner q -- urcorner q -- ulcorner q -- llcorner q --
+ reverse p -- llcorner q -- cycle
+ fi
+ else :
+ if ypart start > ypart center p :
+ ulcorner q -- llcorner q -- lrcorner q -- urcorner q --
+ reverse p -- urcorner q -- cycle
+ else :
+ llcorner q -- lrcorner q -- urcorner q -- ulcorner q --
+ reverse p -- ulcorner q -- cycle
+ fi
+ fi
+ endgroup
+enddef ;
+
+newinternal boolean intersection_found ;
+
+secondarydef p intersection_point q =
+ begingroup
+ save temp_x, temp_y ;
+ (temp_x,temp_y) = p intersectiontimes q ;
+ if temp_x < 0 :
+ intersection_found := false ;
+ center p % origin
+ else :
+ intersection_found := true ;
+ .5[point temp_x of p, point temp_y of q]
+ fi
+ endgroup
+enddef ;
+
+permanent intersection_found, intersection_point ;
+
+%D New, undocumented, experimental:
+
+vardef tensecircle (expr width, height, offset) =
+ (-width/2,-height/2) ... (0,-height/2-offset) ...
+ (+width/2,-height/2) ... (+width/2+offset,0) ...
+ (+width/2,+height/2) ... (0,+height/2+offset) ...
+ (-width/2,+height/2) ... (-width/2-offset,0) ... cycle
+enddef ;
+
+vardef roundedsquare (expr width, height, offset) =
+ (offset,0) -- (width-offset,0) {right} ..
+ (width,offset) -- (width,height-offset) {up} ..
+ (width-offset,height) -- (offset,height) {left} ..
+ (0,height-offset) -- (0,offset) {down} .. cycle
+enddef ;
+
+vardef roundedsquarexy (expr width, height, dx, dy) =
+ (dx,0) -- (width-dx,0) {right} ..
+ (width,dy) -- (width,height-dy) {up} ..
+ (width-dx,height) -- (dx,height) {left} ..
+ (0,height-dy) -- (0,dy) {down} .. cycle
+enddef ;
+
+permanent tensecircle, roundedsquare, roundedsquarexy ;
+
+%D Some colors.
+
+def resolvedcolor(expr s) =
+ .5white
+enddef ;
+
+let normalwithcolor = withcolor ;
+
+def withcolor expr c =
+ normalwithcolor if string c : resolvedcolor(c) else : c fi
+enddef ;
+
+permanent resolvedcolor, normalwithcolor, withcolor ;
+
+% I don't want a "withcolor black" in case of an empty string ... who knows how that can
+% interfere with outer colors. Somehow the next one doesn't always work out ok, but why
+% ... must be some parsing issue. Anyway, when we cannot do that, we need to fix some
+% chem macros instead as empty strings now lead to black while everywhere else in context
+% empty means: leave color untouched.
+
+% def withcolor expr c =
+% if not string c :
+% normalwithcolor c
+% elseif c <> "" :
+% normalwithcolor resolvedcolor(c)
+% fi
+% enddef ;
+
+% So why does this work better than the above:
+%
+% def withcolor expr c =
+% if string c :
+% if c <> "" :
+% normalwithcolor resolvedcolor(c)
+% fi
+% else :
+% normalwithcolor c
+% fi
+% enddef ;
+
+vardef colortype expr c =
+ if cmykcolor c : cmykcolor
+ elseif rgbcolor c : rgbcolor
+ elseif numeric c : grayscale
+ fi
+enddef ;
+
+vardef whitecolor expr c =
+ if cmykcolor c : (0,0,0,0)
+ elseif rgbcolor c : (1,1,1)
+ elseif numeric c : 1
+ elseif string c : whitecolor resolvedcolor(c)
+ fi
+enddef ;
+
+vardef blackcolor expr c =
+ if cmykcolor c : (0,0,0,1)
+ elseif rgbcolor c : (0,0,0)
+ elseif numeric c : 0
+ elseif string c : blackcolor resolvedcolor(c)
+ fi
+enddef ;
+
+vardef complementary expr c =
+ if cmykcolor c : (1,1,1,1) - c
+ elseif rgbcolor c : (1,1,1) - c
+ elseif pair c : (1,1) - c
+ elseif numeric c : 1 - c
+ elseif string c : complementary resolvedcolor(c)
+ fi
+enddef ;
+
+vardef complemented expr c =
+ save m ;
+ if cmykcolor c : m := max(cyanpart c, magentapart c, yellowpart c, blackpart c) ;
+ (m,m,m,m) - c
+ elseif rgbcolor c : m := max(redpart c, greenpart c, bluepart c) ;
+ (m,m,m) - c
+ elseif pair c : m := max(xpart c, ypart c) ;
+ (m,m) - c
+ elseif numeric c : m - c
+ elseif string c : complemented resolvedcolor(c)
+ fi
+enddef ;
+
+permanent colortype, whitecolor, blackcolor, complementary, complemented ;
+
+%D Well, this is the dangerous and naive version:
+
+% def drawfill text t =
+% fill t ;
+% draw t ;
+% enddef;
+
+%D This two step approach saves the path first, since it can be a function. Attributes
+%D must not be randomized.
+
+def drawfill expr c =
+ path temp_c ; temp_c := c ;
+ mfun_do_drawfill
+enddef ;
+
+def mfun_do_drawfill text t =
+ draw temp_c t ;
+ fill temp_c t ;
+enddef;
+
+def undrawfill expr c =
+ drawfill c withcolor background % rather useless
+enddef ;
+
+permanent drawfill, undrawfill ;
+
+%D Moved from mp-char.mp
+
+vardef paired primary d =
+ if pair d : d else : (d,d) fi
+enddef ;
+
+vardef tripled primary d =
+ if color d : d else : (d,d,d) fi
+enddef ;
+
+permanent paired, tripled ;
+
+% maybe secondaries:
+
+primarydef p enlarged d = ( p llmoved d -- p lrmoved d -- p urmoved d -- p ulmoved d -- cycle ) enddef ;
+primarydef p llenlarged d = ( p llmoved d -- lrcorner p -- urcorner p -- ulcorner p -- cycle ) enddef ;
+primarydef p lrenlarged d = ( llcorner p -- p lrmoved d -- urcorner p -- ulcorner p -- cycle ) enddef ;
+primarydef p urenlarged d = ( llcorner p -- lrcorner p -- p urmoved d -- ulcorner p -- cycle ) enddef ;
+primarydef p ulenlarged d = ( llcorner p -- lrcorner p -- urcorner p -- p ulmoved d -- cycle ) enddef ;
+
+primarydef p llmoved d = ( (llcorner p) shifted (-xpart paired(d),-ypart paired(d)) ) enddef ;
+primarydef p lrmoved d = ( (lrcorner p) shifted (+xpart paired(d),-ypart paired(d)) ) enddef ;
+primarydef p urmoved d = ( (urcorner p) shifted (+xpart paired(d),+ypart paired(d)) ) enddef ;
+primarydef p ulmoved d = ( (ulcorner p) shifted (-xpart paired(d),+ypart paired(d)) ) enddef ;
+
+primarydef p leftenlarged d = ( (llcorner p) shifted (-d,0) -- lrcorner p -- urcorner p -- (ulcorner p) shifted (-d,0) -- cycle ) enddef ;
+primarydef p rightenlarged d = ( llcorner p -- (lrcorner p) shifted (d,0) -- (urcorner p) shifted (d,0) -- ulcorner p -- cycle ) enddef ;
+primarydef p topenlarged d = ( llcorner p -- lrcorner p -- (urcorner p) shifted (0,d) -- (ulcorner p) shifted (0,d) -- cycle ) enddef ;
+primarydef p bottomenlarged d = ( llcorner p shifted (0,-d) -- lrcorner p shifted (0,-d) -- urcorner p -- ulcorner p -- cycle ) enddef ;
+
+
+permanent
+ enlarged, llenlarged, lrenlarged, urenlarged, ulenlarged,
+ llmoved, lrmoved, urmoved, ulmoved,
+ leftenlarged, rightenlarged, topenlarged, bottomenlarged ;
+
+%D Handy as stepper:
+
+vardef rotation(expr i, n) =
+ if (n == 0) : 0 else : i * 360 / n fi
+enddef ;
+
+
+permanent rotation ;
+
+%D Handy for testing/debugging; the ladders are for math:
+
+primarydef p crossed d = (
+ if pair p :
+ p shifted (-d, 0) -- p --
+ p shifted ( 0,-d) -- p --
+ p shifted (+d, 0) -- p --
+ p shifted ( 0,+d) -- p -- cycle
+ else :
+ center p shifted (-d, 0) -- llcorner p --
+ center p shifted ( 0,-d) -- lrcorner p --
+ center p shifted (+d, 0) -- urcorner p --
+ center p shifted ( 0,+d) -- ulcorner p -- cycle
+ fi
+) enddef ;
+
+vardef laddered primary p = % was expr
+ point 0 of p
+ for i=1 upto length(p) :
+ -- (xpart (point i of p), ypart (point (i-1) of p)) -- (point i of p)
+ endfor
+enddef ;
+
+permanent crossed, laddered ;
+
+%D Saves typing:
+
+% vardef bottomboundary primary p = (llcorner p -- lrcorner p) enddef ;
+% vardef rightboundary primary p = (lrcorner p -- urcorner p) enddef ;
+% vardef topboundary primary p = (urcorner p -- ulcorner p) enddef ;
+% vardef leftboundary primary p = (ulcorner p -- llcorner p) enddef ;
+
+vardef bottomboundary primary p = if pair p : p else : (llcorner p -- lrcorner p) fi enddef ;
+vardef rightboundary primary p = if pair p : p else : (lrcorner p -- urcorner p) fi enddef ;
+vardef topboundary primary p = if pair p : p else : (urcorner p -- ulcorner p) fi enddef ;
+vardef leftboundary primary p = if pair p : p else : (ulcorner p -- llcorner p) fi enddef ;
+
+permanent bottomboundary, rightboundary, topboundary, leftboundary ;
+
+%D Nice too:
+
+primarydef p superellipsed s =
+ superellipse (
+ .5[lrcorner p,urcorner p],
+ .5[urcorner p,ulcorner p],
+ .5[ulcorner p,llcorner p],
+ .5[llcorner p,lrcorner p],
+ s
+ )
+enddef ;
+
+primarydef p squeezed s = (
+ (llcorner p .. .5[llcorner p,lrcorner p] shifted ( 0, ypart paired(s)) .. lrcorner p) &
+ (lrcorner p .. .5[lrcorner p,urcorner p] shifted (-xpart paired(s), 0) .. urcorner p) &
+ (urcorner p .. .5[urcorner p,ulcorner p] shifted ( 0,-ypart paired(s)) .. ulcorner p) &
+ (ulcorner p .. .5[ulcorner p,llcorner p] shifted ( xpart paired(s), 0) .. llcorner p) & cycle
+) enddef ;
+
+primarydef p randomshifted s =
+ begingroup ;
+ save ss ; pair ss ;
+ ss := paired(s) ;
+ p shifted (-.5xpart ss + uniformdeviate xpart ss,-.5ypart ss + uniformdeviate ypart ss)
+ endgroup
+enddef ;
+
+vardef mfun_randomized_path(expr p,s) =
+ for i=0 upto length(p)-1 :
+ (point i of p) .. controls
+ ((postcontrol i of p) randomshifted s) and
+ ((precontrol (i+1) of p) randomshifted s) ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ (point length(p) of p)
+ fi
+enddef;
+
+vardef mfun_randomized_picture(expr p,s)(text rnd) =
+ save currentpicture ;
+ picture currentpicture ;
+ currentpicture := nullpicture ;
+ for i within p :
+ addto currentpicture
+ if stroked i :
+ doublepath pathpart i rnd s
+ dashed dashpart i
+ withpen penpart i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+ elseif filled i :
+ contour pathpart i rnd s
+ withpen penpart i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+ else :
+ also i
+ fi
+ ;
+ endfor ;
+ currentpicture
+enddef ;
+
+primarydef p randomizedcontrols s = (
+ if path p :
+ mfun_randomized_path(p,s)
+ elseif picture p :
+ mfun_randomized_picture(p,s)(randomizedcontrols)
+ else :
+ p randomized s
+ fi
+) enddef ;
+
+primarydef p randomized s = (
+ if path p :
+ for i=0 upto length(p)-1 :
+ ((point i of p) randomshifted s) .. controls
+ ((postcontrol i of p) randomshifted s) and
+ ((precontrol (i+1) of p) randomshifted s) ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ ((point length(p) of p) randomshifted s)
+ fi
+ elseif pair p :
+ p randomshifted s
+ elseif cmykcolor p :
+ if cmykcolor s :
+ ((uniformdeviate cyanpart s) * cyanpart p,
+ (uniformdeviate magentapart s) * magentapart p,
+ (uniformdeviate yellowpart s) * yellowpart p,
+ (uniformdeviate blackpart s) * blackpart p)
+ elseif pair s :
+ ((xpart s + (uniformdeviate (ypart s - xpart s))) * p)
+ else :
+ ((uniformdeviate s) * p)
+ fi
+ elseif rgbcolor p :
+ if rgbcolor s :
+ ((uniformdeviate redpart s) * redpart p,
+ (uniformdeviate greenpart s) * greenpart p,
+ (uniformdeviate bluepart s) * bluepart p)
+ elseif pair s :
+ ((xpart s + (uniformdeviate (ypart s - xpart s))) * p)
+ else :
+ ((uniformdeviate s) * p)
+ fi
+ elseif color p :
+ if color s :
+ ((uniformdeviate greypart s) * greypart p)
+ elseif pair s :
+ ((xpart s + (uniformdeviate (ypart s - xpart s))) * p)
+ else :
+ ((uniformdeviate s) * p)
+ fi
+ elseif string p :
+ (resolvedcolor(p)) randomized s
+ elseif picture p :
+ mfun_randomized_picture(p,s)(randomized)
+ else :
+ % p - s/2 + uniformdeviate s % would have been better but we want to be positive
+ p + uniformdeviate s
+ fi
+) enddef ;
+
+permanent superellipsed, squeezed, randomshifted, randomized, randomizedcontrols ;
+
+%D Not perfect (alternative for interpath)
+
+vardef interpolated(expr s, p, q) =
+ save m ; numeric m ;
+ m := max(length(p),length(q)) ;
+ if path p :
+ for i=0 upto m-1 :
+ s[point (i /m) along p,point (i /m) along q] .. controls
+ s[postcontrol (i /m) along p,postcontrol (i /m) along q] and
+ s[precontrol ((i+1)/m) along p,precontrol ((i+1)/m) along q] ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ s[point infinity of p,point infinity of q]
+ fi
+ else :
+ a[p,q]
+ fi
+enddef ;
+
+permanent interpolated ;
+
+%D Interesting too:
+
+% primarydef p paralleled d = (
+% p shifted if d < 0 : - fi ((point abs(d) on (p rotatedaround(point 0 of p,90))) - point 0 of p)
+% ) enddef ;
+%
+% primarydef p paralleled d = (
+% p shifted ((d*unitvector(direction 0 of p) - point 0 of p) rotated 90)
+% ) enddef ;
+
+%D Alan came up with an improved version and stepwise we ended up with (or might up
+%D with a variant of):
+
+def istextext(expr p) =
+ (picture p and ((substring(0,3) of prescriptpart p) = "tx_"))
+enddef ;
+
+vardef perpendicular expr t of p =
+ unitvector((direction t of p) rotated 90)
+enddef ;
+
+primarydef p paralleled d = (
+ if path p :
+ begingroup ;
+ save dp ; pair dp ;
+ for i=0 upto length p if cycle p : -1 fi :
+ hide(dp := d * perpendicular i of p)
+ if i > 0 : .. fi
+ (point i of p + dp)
+ if i < length p :
+ .. controls (postcontrol i of p + dp) and
+ (precontrol (i+1) of p + dp)
+ fi
+ endfor
+ if cycle p : .. cycle fi
+ endgroup
+ elseif picture p :
+ image(
+ for i within p :
+ draw (pathpart i)
+ if not istextext(i) : % dirty trick
+ paralleled d
+ fi
+ mfun_decoration_i i ;
+ endfor ;
+ )
+ elseif pair p :
+ p
+ fi
+) enddef ;
+
+vardef punked primary p =
+ point 0 of p for i=1 upto length(p)-1 : -- point i of p endfor
+ if cycle p : -- cycle else : -- point length(p) of p fi
+enddef ;
+
+vardef curved primary p =
+ point 0 of p for i=1 upto length(p)-1 : .. point i of p endfor
+ if cycle p : .. cycle else : .. point length(p) of p fi
+enddef ;
+
+primarydef p blownup s =
+ begingroup
+ save temp_p ; path temp_p ;
+ temp_p := p xysized (bbwidth(p)+2(xpart paired(s)),bbheight(p)+2(ypart paired(s))) ;
+ (temp_p shifted (center p - center temp_p))
+ endgroup
+enddef ;
+
+permanent perpendicular, istextext, paralleled, punked, curved, blownup ;
+
+%D Rather fundamental.
+
+% not yet ok
+
+vardef mfun_left_right_path(expr p, l) = % used in s-pre-19
+ save q, r, t, b ; path q, r ; pair t, b ;
+ t := (ulcorner p -- urcorner p) intersection_point p ;
+ b := (llcorner p -- lrcorner p) intersection_point p ;
+ r := if xpart directionpoint t of p < 0 : reverse p else : p fi ; % r is needed, else problems when reverse is fed
+ q := r cutbefore if l: t else: b fi ;
+ q := q if xpart point 0 of r > 0 : & r fi cutafter if l: b else: t fi ;
+ q
+enddef ;
+
+vardef leftpath expr p = mfun_left_right_path(p,true ) enddef ;
+vardef rightpath expr p = mfun_left_right_path(p,false) enddef ;
+
+permanent leftpath, rightpath ;
+
+%D Drawoptions
+
+def saveoptions =
+ save base_draw_options ; def base_draw_options = enddef ;
+enddef ;
+
+permanent saveoptions ;
+
+%D Tracing. (not yet in lexer)
+
+let normaldraw = draw ;
+let normalfill = fill ;
+
+% bugged in mplib so ...
+
+def normalfill expr c = addto currentpicture contour c base_draw_options enddef ;
+def normaldraw expr p = addto currentpicture if picture p: also p else: doublepath p withpen currentpen fi base_draw_options enddef ;
+
+def drawlineoptions (text t) = def mfun_opt_lin = t enddef ; enddef ;
+def drawpointoptions (text t) = def mfun_opt_pnt = t enddef ; enddef ;
+def drawcontroloptions(text t) = def mfun_opt_ctr = t enddef ; enddef ;
+def drawlabeloptions (text t) = def mfun_opt_lab = t enddef ; enddef ;
+def draworiginoptions (text t) = def mfun_opt_ori = t enddef ; enddef ;
+def drawboundoptions (text t) = def mfun_opt_bnd = t enddef ; enddef ;
+def drawpathoptions (text t) = def mfun_opt_pth = t enddef ; enddef ;
+
+numeric drawoptionsfactor ; drawoptionsfactor := pt ;
+
+def resetdrawoptions =
+ drawlineoptions (withpen pencircle scaled 1.0 drawoptionsfactor withcolor .5white) ;
+ drawpointoptions (withpen pencircle scaled 4.0 drawoptionsfactor withcolor black) ;
+ drawcontroloptions(withpen pencircle scaled 2.5 drawoptionsfactor withcolor black) ;
+ drawlabeloptions () ;
+ draworiginoptions (withpen pencircle scaled 1.0 drawoptionsfactor withcolor .5white) ;
+ drawboundoptions (dashed evenly mfun_opt_ori) ;
+ drawpathoptions (withpen pencircle scaled 5.0 drawoptionsfactor withcolor .8white) ;
+enddef ;
+
+resetdrawoptions ;
+
+%D Path.
+
+def drawpath expr p =
+ normaldraw p mfun_opt_pth
+enddef ;
+
+permanent
+ drawlineoptions, drawpointoptions, drawcontroloptions, drawlabeloptions, draworiginoptions,
+ drawboundoptions, drawpathoptions, drawpath, normaldraw ;
+
+%D Arrow.
+
+newinternal ahvariant ; ahvariant := 0 ;
+newinternal ahdimple ; ahdimple := 1/5 ;
+newinternal ahscale ; ahscale := 3/4 ;
+
+permanent ahvariant, ahdimple, ahscale ;
+
+vardef arrowhead expr p =
+ save q, e, r ;
+ pair e ; e = point length p of p ;
+ path q ; q = gobble(p shifted -e cutafter makepath(pencircle scaled (2ahlength))) cuttings ;
+ if ahvariant > 0:
+ path r ; r = gobble(p shifted -e cutafter makepath(pencircle scaled ((1-ahdimple)*2ahlength))) cuttings ;
+ fi
+ (q rotated (ahangle/2) & reverse q rotated -(ahangle/2)
+ if ahvariant = 1 :
+ -- point 0 of r --
+ elseif ahvariant = 2 :
+ ... point 0 of r ...
+ else :
+ --
+ fi
+ cycle
+ ) shifted e
+enddef ;
+
+vardef drawarrowpath expr p =
+% save autoarrows ; boolean autoarrows ; autoarrows := true ;
+ interim autoarrows := true ;
+ drawarrow p mfun_opt_pth
+enddef ;
+
+def midarrowhead expr p =
+ arrowhead p cutafter (point length(p cutafter point .5 along p) + ahlength on p)
+enddef ;
+
+vardef arrowheadonpath (expr p, s) =
+% save autoarrows ; boolean autoarrows ;
+ interim autoarrows := true ;
+ set_ahlength(scaled ahfactor) ; % added
+ arrowhead p if s < 1 : cutafter (point (s*arclength(p) + (ahlength/2)) on p) fi
+enddef ;
+
+def resetarrows =
+ hide (
+ ahlength := 4 ;
+ ahangle := 45 ;
+ ahvariant := 0 ;
+ ahdimple := 1/5 ;
+ ahscale := 3/4 ;
+)
+enddef ;
+
+permanent arrowhead, drawarrowpath, midarrowhead, arrowheadonpath ;
+
+%D Points.
+
+vardef dotlabel@#(expr s,z) text t =
+ label@#(s,z) t ;
+ interim linecap := rounded ;
+ normaldraw z withpen pencircle scaled dotlabeldiam t ;
+enddef ;
+
+def drawpoint expr c =
+ if string c :
+ string temp_c ;
+ temp_c := "(" & c & ")" ;
+ dotlabel.urt(temp_c, scantokens temp_c) ;
+ drawdot scantokens temp_c
+ else :
+ dotlabel.urt("(" & decimal xpart c & "," & decimal ypart c & ")", c) ;
+ drawdot c
+ fi mfun_opt_pnt
+enddef ;
+
+%D PathPoints.
+
+def drawpoints expr c = path temp_c ; temp_c := c ; mfun_draw_points enddef ;
+def drawcontrolpoints expr c = path temp_c ; temp_c := c ; mfun_draw_controlpoints enddef ;
+def drawcontrollines expr c = path temp_c ; temp_c := c ; mfun_draw_controllines enddef ;
+def drawpointlabels expr c = path temp_c ; temp_c := c ; mfun_draw_pointlabels enddef ;
+
+def mfun_draw_points text t =
+ for i=0 upto length(temp_c) if cycle temp_c : -1 fi :
+ normaldraw point i of temp_c mfun_opt_pnt t ;
+ endfor ;
+enddef;
+
+def mfun_draw_controlpoints text t =
+ for i=0 upto length(temp_c) :
+ normaldraw precontrol i of temp_c mfun_opt_ctr t ;
+ normaldraw postcontrol i of temp_c mfun_opt_ctr t ;
+ endfor ;
+enddef;
+
+def mfun_draw_controllines text t =
+ for i=0 upto length(temp_c) :
+ normaldraw point i of temp_c -- precontrol i of temp_c mfun_opt_lin t ;
+ normaldraw point i of temp_c -- postcontrol i of temp_c mfun_opt_lin t ;
+ endfor ;
+enddef;
+
+boolean swappointlabels ; swappointlabels := false ;
+numeric pointlabelscale ; pointlabelscale := 0 ;
+string pointlabelfont ; pointlabelfont := "" ;
+
+def mfun_draw_pointlabels text asked_options =
+ for i=0 upto length(temp_c) if cycle temp_c : -1 fi :
+ pair temp_u ; temp_u := unitvector(direction i of temp_c) rotated if swappointlabels : - fi 90 ;
+ pair temp_p ; temp_p := (point i of temp_c) ;
+ begingroup ;
+ if pointlabelscale > 0 :
+ save defaultscale ; numeric defaultscale ;
+ defaultscale := pointlabelscale ;
+ fi ;
+ if pointlabelfont <> "" :
+ save defaultfont ; string defaultfont ;
+ defaultfont := pointlabelfont ;
+ fi ;
+ temp_u := 10 * drawoptionsfactor * defaultscale * temp_u ;
+ normaldraw thelabel ( decimal i, temp_p shifted if cycle temp_c and (i=0) : - fi temp_u ) mfun_opt_lab asked_options ;
+ endgroup ;
+ endfor ;
+enddef;
+
+%D Bounding box.
+
+def drawboundingbox expr p =
+ normaldraw boundingbox p mfun_opt_bnd
+enddef ;
+
+%D Origin.
+
+numeric originlength ; originlength := .5cm ;
+
+def draworigin text t =
+ normaldraw (origin shifted (0, originlength) -- origin shifted (0,-originlength)) mfun_opt_ori t ;
+ normaldraw (origin shifted ( originlength,0) -- origin shifted (-originlength,0)) mfun_opt_ori t ;
+enddef;
+
+permanent dotlabel, swappointlabels, pointlabelscale, pointlabelfont ;
+permanent drawboundingbox, drawpoints, drawcontrolpoints, drawcontrollines, drawpointlabels, draworigin ;
+
+%D Axis.
+
+numeric tickstep ; tickstep := 5mm ;
+numeric ticklength ; ticklength := 2mm ;
+
+def drawxticks expr c = path temp_c ; temp_c := c ; mfun_draw_xticks enddef ;
+def drawyticks expr c = path temp_c ; temp_c := c ; mfun_draw_yticks enddef ;
+def drawticks expr c = path temp_c ; temp_c := c ; mfun_draw_ticks enddef ;
+
+% Adding eps prevents disappearance due to rounding errors.
+
+def mfun_draw_xticks text t =
+ for i=0 step -tickstep until xpart llcorner temp_c - eps :
+ if (i<=xpart lrcorner temp_c) :
+ normaldraw (i,-ticklength)--(i,ticklength) mfun_opt_ori t ;
+ fi ;
+ endfor ;
+ for i=0 step tickstep until xpart lrcorner temp_c + eps :
+ if (i>=xpart llcorner temp_c) :
+ normaldraw (i,-ticklength)--(i,ticklength) mfun_opt_ori t ;
+ fi ;
+ endfor ;
+ normaldraw (llcorner temp_c -- ulcorner temp_c) shifted (-xpart llcorner temp_c,0) mfun_opt_ori t ;
+enddef ;
+
+def mfun_draw_yticks text t =
+ for i=0 step -tickstep until ypart llcorner temp_c - eps :
+ if (i<=ypart ulcorner temp_c) :
+ normaldraw (-ticklength,i)--(ticklength,i) mfun_opt_ori t ;
+ fi ;
+ endfor ;
+ for i=0 step tickstep until ypart ulcorner temp_c + eps :
+ if (i>=ypart llcorner temp_c) :
+ normaldraw (-ticklength,i)--(ticklength,i) mfun_opt_ori t ;
+ fi ;
+ endfor ;
+ normaldraw (llcorner temp_c -- lrcorner temp_c) shifted (0,-ypart llcorner temp_c) mfun_opt_ori t ;
+enddef ;
+
+def mfun_draw_ticks text t =
+ drawxticks temp_c t ;
+ drawyticks temp_c t ;
+enddef ;
+
+%D All of it except axis.
+
+def drawwholepath expr p =
+ draworigin ;
+ drawpath p ;
+ drawcontrollines p ;
+ drawcontrolpoints p ;
+ drawpoints p ;
+ drawboundingbox p ;
+ drawpointlabels p ;
+enddef ;
+
+def drawpathonly expr p =
+ drawpath p ;
+ drawcontrollines p ;
+ drawcontrolpoints p ;
+ drawpoints p ;
+ drawpointlabels p ;
+enddef ;
+
+%D Tracing.
+
+def visualizeddraw expr c =
+ if picture c : normaldraw c else : path temp_c ; temp_c := c ; do_visualizeddraw fi
+enddef ;
+
+def visualizedfill expr c =
+ if picture c : normalfill c else : path temp_c ; temp_c := c ; do_visualizedfill fi
+enddef ;
+
+def do_visualizeddraw text t =
+ draworigin ;
+ drawpath temp_c t ;
+ drawcontrollines temp_c ;
+ drawcontrolpoints temp_c ;
+ drawpoints temp_c ;
+ drawboundingbox temp_c ;
+ drawpointlabels temp_c ;
+enddef ;
+
+def do_visualizedfill text t =
+ if cycle temp_c : normalfill temp_c t fi ;
+ draworigin ;
+ drawcontrollines temp_c ;
+ drawcontrolpoints temp_c ;
+ drawpoints temp_c ;
+ drawboundingbox temp_c ;
+ drawpointlabels temp_c ;
+enddef ;
+
+def detaileddraw expr c =
+ if picture c : normaldraw c else : path temp_c ; temp_c := c ; do_detaileddraw fi
+enddef ;
+
+def do_detaileddraw text t =
+ drawpath temp_c t ;
+ drawcontrollines temp_c ;
+ drawcontrolpoints temp_c ;
+ drawpoints temp_c ;
+ % % for labels we need an third run (as the second will mark the numbers); i could preroll them
+ % % but then the hash needs to handle that as well (as now we keep numbering)
+ % drawpointlabels temp_c ;
+enddef ;
+
+def visualizepaths =
+ let fill = visualizedfill ;
+ let draw = visualizeddraw ;
+enddef ;
+
+def detailpaths =
+ let draw = detaileddraw ;
+enddef ;
+
+def naturalizepaths =
+ let fill = normalfill ;
+ let draw = normaldraw ;
+enddef ;
+
+extra_endfig := extra_endfig & " naturalizepaths ; " ;
+
+permanent
+ visualizeddraw, detaileddraw, visualizedfill,
+ visualizepaths, detailpaths, naturalizepaths ;
+
+%D Nice tracer:
+
+def drawboundary primary p =
+ draw p dashed evenly withcolor white ;
+ draw p dashed oddly withcolor black ;
+ draw (- llcorner p) withpen pencircle scaled 3 withcolor white ;
+ draw (- llcorner p) withpen pencircle scaled 1.5 withcolor black ;
+enddef ;
+
+permanent drawboundary ;
+
+%D Also handy:
+
+extra_beginfig := extra_beginfig & " truecorners := 0 ; " ; % restores
+extra_beginfig := extra_beginfig & " miterlimit := 10 ; " ; % restores
+extra_beginfig := extra_beginfig & " linejoin := rounded ; " ; % restores
+extra_beginfig := extra_beginfig & " linecap := rounded ; " ; % restores
+
+%D Normally, arrowheads don't scale well. So we provide a hack.
+
+% boolean autoarrows ; autoarrows := false ; % todo: newinternal boolean autoarrows ;
+numeric ahfactor ; ahfactor := 2.5 ; % todo: newinternal ahfactor ;
+
+newinternal boolean autoarrows ;
+
+permanent ahfactor, ahlength, autoarrows ;
+
+def set_ahlength (text t) = % called to often
+ % ahlength := (ahfactor*pen_size(base_draw_options t)) ; % base_draw_options added
+ % problem: base_draw_options can contain color so a no-go, we could apply the transform
+ % but i need to figure out the best way (fakepicture and take components).
+ ahlength := (ahfactor*pen_size(t)) ;
+enddef ;
+
+vardef pen_size (text t) =
+ save p ; picture p ; p := nullpicture ;
+ addto p doublepath (top origin -- bot origin) t ;
+ (ypart urcorner p - ypart lrcorner p)
+enddef ;
+
+%D The next two macros are adapted versions of plain
+%D \METAPOST\ definitions.
+
+vardef arrowpath expr p = % patch by Peter Rolf: supports squared pen and shifting (hh: maybe just use center of head as first)
+ (p cutafter makepath(pencircle
+ scaled (if ahvariant > 0 : (1-ahdimple)* fi 2ahlength*cosd(ahangle/2))
+ shifted point length p of p
+ ))
+enddef;
+
+permanent arrowpath ;
+
+% New experimental extension: also handling pictures:
+%
+% drawarrow fullsquare scaled 2cm withcolor green ;
+% drawarrow fullcircle scaled 3cm withcolor green ;
+% drawarrow image (
+% draw fullsquare scaled 4cm withcolor red ;
+% draw fullcircle scaled 5cm withcolor blue ;
+% ) ;
+% currentpicture := currentpicture shifted (-bbwidth(currentpicture)-1cm,0) ;
+% drawdblarrow fullsquare scaled 2cm withcolor green ;
+% drawdblarrow fullcircle scaled 3cm withcolor green ;
+% drawdblarrow image (
+% draw fullsquare scaled 4cm withcolor red ;
+% draw fullcircle scaled 5cm withcolor blue ;
+% ) ;
+
+vardef stroked_paths(expr p) =
+ save n ; numeric n ; n := 0 ;
+ for i within p :
+ if stroked i :
+ n := n + 1 ;
+ fi
+ endfor ;
+ n
+enddef ;
+
+def mfun_decoration_i expr i =
+ withpen penpart i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+enddef ;
+
+%D We could collapse all in one helper but in context we nowaways don't want the added
+%D obscurity. Tokens come cheap.
+
+numeric mfun_arrow_snippets ;
+numeric mfun_arrow_count ;
+
+def drawarrow expr p =
+ begingroup ;
+ save mfun_arrow_path ;
+ path mfun_arrow_path ;
+ if path p :
+ mfun_arrow_path := p ;
+ expandafter mfun_draw_arrow_path
+ elseif picture p :
+ save mfun_arrow_picture ;
+ picture mfun_arrow_picture ;
+ mfun_arrow_picture := p ;
+ expandafter mfun_draw_arrow_picture
+ else :
+ expandafter mfun_draw_arrow_nothing
+ fi
+enddef ;
+
+def drawdblarrow expr p =
+ begingroup ;
+ save mfun_arrow_path ;
+ path mfun_arrow_path ;
+ if path p :
+ mfun_arrow_path := p ;
+ expandafter mfun_draw_arrow_path_double
+ elseif picture p :
+ save mfun_arrow_picture ;
+ picture mfun_arrow_picture ;
+ mfun_arrow_picture := p ;
+ expandafter mfun_draw_arrow_picture_double
+ else :
+ expandafter mfun_draw_arrow_nothing
+ fi
+enddef ;
+
+def mfun_draw_arrow_nothing text t =
+enddef ;
+
+%D The path is shortened so that the arrow head extends it to the original length. In
+%D case of a double arrow the path gets shortened twice.
+
+def mfun_draw_arrow_path text t =
+ if autoarrows :
+ set_ahlength(t) ;
+ fi
+ draw arrowpath mfun_arrow_path t ;
+ fillup arrowhead mfun_arrow_path t ;
+ endgroup ;
+enddef ;
+
+def mfun_draw_arrow_path_double text t =
+ if autoarrows :
+ set_ahlength(t) ;
+ fi
+ draw arrowpath (reverse arrowpath mfun_arrow_path) t ;
+ fillup arrowhead mfun_arrow_path t ;
+ fillup arrowhead reverse mfun_arrow_path t ;
+ endgroup ;
+enddef ;
+
+%D The picture variant is not treating each path but only the first and last path. This
+%D can be somewhat counterintuitive but is needed for Alan's macros. So here the last
+%D and in case of a double path first paths in a icture get the shortening.
+
+def mfun_with_arrow_picture (text t) =
+ mfun_arrow_count := 0 ;
+ mfun_arrow_snippets := stroked_paths(mfun_arrow_picture) ;
+ for i within mfun_arrow_picture :
+ if istextext(i) :
+ draw i
+ else :
+ mfun_arrow_count := mfun_arrow_count + 1 ;
+ mfun_arrow_path := pathpart i ;
+ t
+ fi ;
+ endfor ;
+enddef ;
+
+def mfun_draw_arrow_picture text t =
+ if autoarrows :
+ set_ahlength(t) ;
+ fi
+ mfun_with_arrow_picture (
+ if mfun_arrow_count = mfun_arrow_snippets :
+ draw arrowpath mfun_arrow_path mfun_decoration_i i t ;
+ fillup arrowhead mfun_arrow_path mfun_decoration_i i t ;
+ else :
+ draw mfun_arrow_path mfun_decoration_i i t ;
+ fi ;
+ )
+ endgroup ;
+enddef ;
+
+def mfun_draw_arrow_picture_double text t =
+ if autoarrows :
+ set_ahlength(t) ;
+ fi
+ mfun_with_arrow_picture (
+ draw
+ if mfun_arrow_count = 1 :
+ arrowpath reverse
+ elseif mfun_arrow_count = mfun_arrow_snippets :
+ arrowpath
+ fi
+ mfun_arrow_path mfun_decoration_i i t ;
+ if mfun_arrow_count = 1 :
+ fillup arrowhead reverse mfun_arrow_path mfun_decoration_i i t ;
+ fi
+ if mfun_arrow_count = mfun_arrow_snippets :
+ fillup arrowhead mfun_arrow_path mfun_decoration_i i t ;
+ fi
+ )
+ endgroup ;
+enddef ;
+
+%D Some more arrow magic, by Alan:
+
+let drawdoublearrow = drawdblarrow ;
+
+def drawdoublearrows expr p =
+ begingroup ;
+ save mfun_arrow_path ;
+ path mfun_arrow_path ;
+ save mfun_arrow_path_parallel ;
+ path mfun_arrow_path_parallel ;
+ if path p :
+ mfun_arrow_path := p ;
+ expandafter mfun_draw_arrow_paths
+ elseif picture p :
+ save mfun_arrow_picture ;
+ picture mfun_arrow_picture ;
+ mfun_arrow_picture := p ;
+ expandafter mfun_draw_arrow_pictures
+ else :
+ expandafter mfun_draw_arrow_nothing
+ fi
+enddef ;
+
+def mfun_draw_arrow_paths text t =
+ if autoarrows :
+ set_ahlength(t) ;
+ fi
+ save d ; d := ahscale*ahlength*sind(ahangle/2) ;
+ mfun_arrow_path_parallel := mfun_arrow_path paralleled d ;
+ draw arrowpath mfun_arrow_path_parallel t ;
+ fillup arrowhead mfun_arrow_path_parallel t ;
+ mfun_arrow_path_parallel := (reverse mfun_arrow_path) paralleled d ;
+ draw arrowpath mfun_arrow_path_parallel t ;
+ fillup arrowhead mfun_arrow_path_parallel t ;
+ endgroup ;
+enddef ;
+
+def mfun_draw_arrow_pictures text t =
+ if autoarrows :
+ set_ahlength(t) ;
+ fi
+ save d ; d := ahscale*ahlength*sind(ahangle/2) ;
+ mfun_with_arrow_picture(
+ if mfun_arrow_count = 1 :
+ draw (mfun_arrow_path paralleled d) mfun_decoration_i i t ;
+ mfun_arrow_path_parallel := (reverse mfun_arrow_path) paralleled d ;
+ draw arrowpath mfun_arrow_path_parallel mfun_decoration_i i t ;
+ fillup arrowhead mfun_arrow_path_parallel mfun_decoration_i i t ;
+ elseif mfun_arrow_count = mfun_arrow_snippets :
+ draw ((reverse mfun_arrow_path) paralleled d) mfun_decoration_i i t ;
+ mfun_arrow_path_parallel := mfun_arrow_path paralleled d ;
+ draw arrowpath mfun_arrow_path_parallel mfun_decoration_i i t ;
+ fillup arrowhead mfun_arrow_path_parallel mfun_decoration_i i t ;
+ else :
+ draw ( mfun_arrow_path paralleled d) mfun_decoration_i i t ;
+ draw ((reverse mfun_arrow_path) paralleled d) mfun_decoration_i i t ;
+ fi
+ )
+ endgroup ;
+enddef ;
+
+%D Handy too ......
+
+vardef pointarrow (expr pat, loc, len, off) =
+ save l, r, s, t ; path l, r ; numeric s ; pair t ;
+ t := if pair loc : loc else : point loc along pat fi ;
+ s := len/2 - off ; if s<=0 : s := 0 elseif s>len : s := len fi ;
+ r := pat cutbefore t ;
+ r := (r cutafter point (arctime s of r) of r) ;
+ s := len/2 + off ; if s<=0 : s := 0 elseif s>len : s := len fi ;
+ l := reverse (pat cutafter t) ;
+ l := (reverse (l cutafter point (arctime s of l) of l)) ;
+ (l..r)
+enddef ;
+
+def rightarrow (expr pat,tim,len) = pointarrow(pat,tim,len,-len) enddef ;
+def leftarrow (expr pat,tim,len) = pointarrow(pat,tim,len,+len) enddef ;
+def centerarrow (expr pat,tim,len) = pointarrow(pat,tim,len, 0) enddef ;
+
+permanent drawarrow, drawdblarrow, drawdoublearrows, drawdoublearrow, pointarrow, rightarrow, leftarrow, centerarrow ;
+
+%D The \type {along} and \type {on} operators can be used as follows:
+%D
+%D \starttyping
+%D drawdot point .5 along somepath ;
+%D drawdot point 3cm on somepath ;
+%D \stoptyping
+%D
+%D The number denotes a percentage (fraction).
+
+primarydef pct along pat = % also negative
+ (arctime (pct * (arclength pat)) of pat) of pat
+enddef ;
+
+primarydef len on pat = % no outer ( ) .. somehow fails
+ (arctime if len>=0 : len else : (arclength(pat)+len) fi of pat) of pat
+enddef ;
+
+% this cuts of a piece from both ends
+
+tertiarydef pat cutends len =
+ begingroup
+ save tap ; path tap ;
+ tap := pat cutbefore (point (xpart paired(len)) on pat) ;
+ (tap cutafter (point -(ypart paired(len)) on tap))
+ endgroup
+enddef ;
+
+permanent along, on, cutends ;
+
+%D To be documented.
+
+path freesquare ; freesquare := (
+ (-1,0) -- (-1,-1) -- (0,-1) -- (+1,-1) --
+ (+1,0) -- (+1,+1) -- (0,+1) -- (-1,+1) -- cycle
+) scaled .5 ;
+
+numeric freelabeloffset ; freelabeloffset := 3pt ;
+numeric freedotlabelsize ; freedotlabelsize := 3pt ;
+
+vardef thefreelabel (expr asked_text, asked_location, asked_origin) =
+ save s, p, q, l ; picture s ; path p, q ; pair l ;
+ interim labeloffset := freelabeloffset ;
+ s := if string asked_text : thelabel(asked_text,asked_location) else : asked_text shifted -center asked_text shifted asked_location fi ;
+ setbounds s to boundingbox s enlarged freelabeloffset ;
+ p := fullcircle scaled (2*length(asked_location-asked_origin)) shifted asked_origin ;
+ q := freesquare xyscaled (urcorner s - llcorner s) ;
+ l := point xpart (p intersectiontimes (asked_origin--asked_location shifted (asked_location-asked_origin))) of q ;
+ setbounds s to boundingbox s enlarged -freelabeloffset ; % new
+ % draw boundingbox s shifted -l withpen pencircle scaled .5pt withcolor red ;
+ (s shifted -l)
+enddef ;
+
+vardef freelabel (expr asked_text, asked_location, asked_origin) =
+ draw thefreelabel(asked_text,asked_location,asked_origin) ;
+enddef ;
+
+vardef freedotlabel (expr asked_text, asked_location, asked_origin) =
+ interim linecap := rounded ;
+ draw asked_location withpen pencircle scaled freedotlabelsize ;
+ draw thefreelabel(asked_text,asked_location,asked_origin) ;
+enddef ;
+
+immutable freesquare ;
+permanent freelabeloffset, freedotlabelsize, thefreelabel, freelabel, freedotlabel ;
+
+%D \starttyping
+%D drawarrow anglebetween(line_a,line_b,somelabel) ;
+%D \stoptyping
+
+newinternal angleoffset ; angleoffset := 0pt ;
+newinternal anglelength ; anglelength := 20pt ;
+newinternal anglemethod ; anglemethod := 1 ;
+
+vardef anglebetween (expr a, b, s) = % path path string
+ save pointa, pointb, common, middle, offset ;
+ pair pointa, pointb, common, middle, offset ;
+ save curve ; path curve ;
+ save where ; numeric where ;
+ if round point 0 of a = round point 0 of b :
+ common := point 0 of a ;
+ else :
+ common := a intersectionpoint b ;
+ fi ;
+ pointa := point anglelength on a ;
+ pointb := point anglelength on b ;
+ where := turningnumber (common--pointa--pointb--cycle) ;
+ middle := (reverse(common--pointa) rotatedaround (pointa,-where*90))
+ intersection_point
+ (reverse(common--pointb) rotatedaround (pointb, where*90)) ;
+ if not intersection_found :
+ middle := point .5 along
+ ((reverse(common--pointa) rotatedaround (pointa,-where*90)) --
+ ( (common--pointb) rotatedaround (pointb, where*90))) ;
+ fi ;
+ if anglemethod = 0 :
+ curve := pointa{unitvector(middle-pointa)}.. pointb;
+ middle := point .5 along curve ;
+ curve := common ;
+ elseif anglemethod = 1 :
+ curve := pointa{unitvector(middle-pointa)}.. pointb;
+ middle := point .5 along curve ;
+ elseif anglemethod = 2 :
+ middle := common rotatedaround(.5[pointa,pointb],180) ;
+ curve := pointa--middle--pointb ;
+ elseif anglemethod = 3 :
+ curve := pointa--middle--pointb ;
+ elseif anglemethod = 4 :
+ curve := pointa..controls middle..pointb ;
+ middle := point .5 along curve ;
+ fi ;
+ draw thefreelabel(s, middle, common) ; % withcolor black ;
+ curve
+enddef ;
+
+permanent anglebetween, angleoffset, anglelength, anglemethod ;
+
+% Stack
+
+picture mfun_current_picture_stack[] ;
+numeric mfun_current_picture_depth ;
+
+mfun_current_picture_depth := 0 ;
+
+def pushcurrentpicture =
+ mfun_current_picture_depth := mfun_current_picture_depth + 1 ;
+ mfun_current_picture_stack[mfun_current_picture_depth] := currentpicture ;
+ currentpicture := nullpicture ;
+enddef ;
+
+def popcurrentpicture text t = % optional text
+ if mfun_current_picture_depth > 0 :
+ addto mfun_current_picture_stack[mfun_current_picture_depth] also currentpicture t ;
+ currentpicture := mfun_current_picture_stack[mfun_current_picture_depth] ;
+ mfun_current_picture_stack[mfun_current_picture_depth] := nullpicture ;
+ mfun_current_picture_depth := mfun_current_picture_depth - 1 ;
+ fi ;
+enddef ;
+
+permanent pushcurrentpicture, popcurrentpicture ;
+
+% penpoint (i,2) of somepath -> inner / outer point
+
+vardef penpoint expr pnt of p =
+ save n, d ; numeric n, d ;
+ (n,d) = if pair pnt : pnt else : (pnt,1) fi ;
+ (point n of p shifted ((penoffset direction n of p of currentpen) scaled d))
+enddef ;
+
+permanent penpoint ;
+
+%D colorcircle(size, red, green, blue) ;
+
+vardef colorcircle (expr size, red, green, blue) = % might move
+ save r, g, b, c, m, y, w ; save radius ;
+ path r, g, b, c, m, y, w ; numeric radius ;
+
+ radius := 5cm ; pickup pencircle scaled (radius/25) ;
+
+ transform t ; t := identity rotatedaround(origin,120) ;
+
+ r := fullcircle rotated 90 scaled radius shifted (0,radius/4) rotatedaround(origin,135) ;
+
+ b := r transformed t ; g := b transformed t ;
+
+ c := buildcycle(subpath(1,7) of g,subpath(1,7) of b) ;
+ y := c transformed t ; m := y transformed t ;
+
+ w := buildcycle(subpath(3,5) of r, subpath(3,5) of g,subpath(3,5) of b) ;
+
+ pushcurrentpicture ;
+
+ fill r withcolor red ;
+ fill g withcolor green ;
+ fill b withcolor blue ;
+ fill c withcolor white - red ;
+ fill m withcolor white - green ;
+ fill y withcolor white - blue ;
+ fill w withcolor white ;
+
+ for i = r,g,b,c,m,y : draw i withcolor .5white ; endfor ;
+
+ currentpicture := currentpicture xsized size ;
+
+ popcurrentpicture ;
+enddef ;
+
+% nice: currentpicture := inverted currentpicture ;
+
+primarydef p uncolored c = % not complete ... needs text and scripts and ...
+ if color p :
+ c - p
+ else :
+ image (
+ for i within p :
+ addto currentpicture
+ if stroked i or filled i :
+ if filled i :
+ contour
+ else :
+ doublepath
+ fi
+ pathpart i
+ dashed dashpart i withpen penpart i
+ else :
+ also i
+ fi
+ withcolor c-(redpart i, greenpart i, bluepart i) ;
+ endfor ;
+ )
+ fi
+enddef ;
+
+vardef inverted primary p =
+ p uncolored white
+enddef ;
+
+primarydef p softened c =
+ begingroup
+ save cc ; color cc ; cc := tripled(c) ;
+ if color p :
+ (redpart cc * redpart p,greenpart cc * greenpart p, bluepart cc * bluepart p)
+ else :
+ image (
+ for i within p :
+ addto currentpicture
+ if stroked i or filled i :
+ if filled i :
+ contour
+ else :
+ doublepath
+ fi
+ pathpart i
+ dashed dashpart i withpen penpart i
+ else :
+ also i
+ fi
+ withcolor (redpart cc * redpart i, greenpart cc * greenpart i, bluepart cc * bluepart i) ;
+ endfor ;
+ )
+ fi
+ endgroup
+enddef ;
+
+vardef grayed primary p =
+ if rgbcolor p :
+ tripled(.30redpart p+.59greenpart p+.11bluepart p)
+ elseif cmykcolor p :
+ tripled(.30*(1-cyanpart i)+.59*(1-magentapart i)+.11*(1-yellowpart i)+blackpart i)
+ elseif greycolor p :
+ p
+ elseif string p :
+ grayed resolvedcolor(p)
+ elseif picture p :
+ image (
+ for i within p :
+ addto currentpicture
+ if stroked i or filled i :
+ if filled i :
+ contour
+ else :
+ doublepath
+ fi
+ pathpart i
+ dashed dashpart i
+ withpen penpart i
+ else :
+ also i
+ fi
+ if unknown colorpart i :
+ % nothing
+ elseif rgbcolor colorpart i :
+ withcolor tripled(.30redpart i+.59greenpart i+.11bluepart i) ;
+ elseif cmykcolor colorpart i :
+ withcolor tripled(.30*(1-cyanpart i)+.59*(1-magentapart i)+.11*(1-yellowpart i)+blackpart i) ;
+ else :
+ withcolor colorpart i ;
+ fi
+ endfor ;
+ )
+ else :
+ p
+ fi
+enddef ;
+
+let greyed = grayed ;
+
+vardef hsvtorgb(expr h,s,v) =
+ save H, S, V, x ;
+ H = h mod 360 ;
+ S = if s < 0 : 0 elseif s > 1 : 1 else: s fi ;
+ V = if v < 0 : 0 elseif v > 1 : 1 else: v fi ;
+ x = 1 - abs(H mod 120 - 60)/60 ;
+ V * ( (1-S) * (1,1,1) + S *
+ if H < 60 : (1,x,0)
+ elseif H < 120 : (x,1,0)
+ elseif H < 180 : (0,1,x)
+ elseif H < 240 : (0,x,1)
+ elseif H < 300 : (x,0,1)
+ else : (1,0,x)
+ fi )
+enddef ;
+
+permanent colorcircle, uncolored, inverted, grayed, greyed, hsvtorgb ;
+
+% yes or no: "text" infont "cmr12" at 24pt ;
+
+% let normalinfont = infont ;
+%
+% numeric lastfontsize ; lastfontsize = fontsize defaultfont ;
+%
+% def infont primary name = % no vardef, no expr
+% hide(lastfontsize := fontsize name) % no ;
+% normalinfont name
+% enddef ;
+%
+% def scaledat expr size =
+% scaled (size/lastfontsize)
+% enddef ;
+%
+% let at = scaledat ;
+
+% like decimal
+
+def condition primary b = if b : "true" else : "false" fi enddef ;
+
+permanent condition ;
+
+% undocumented
+
+primarydef p stretched s =
+ begingroup
+ save pp ; path pp ; pp := p xyscaled s ;
+ (pp shifted ((point 0 of p) - (point 0 of pp)))
+ endgroup
+enddef ;
+
+primarydef p enlonged len =
+ begingroup
+ if len == 0 :
+ p
+ elseif pair p :
+ save q ; path q ; q := origin -- p ;
+ save al ; al := arclength(q) ;
+ if al > 0 :
+ point 1 of (q stretched ((al+len)/al))
+ else :
+ p
+ fi
+ else :
+ save al ; al := arclength(p) ;
+ if al > 0 :
+ p stretched ((al+len)/al)
+ else :
+ p
+ fi
+ fi
+ endgroup
+enddef ;
+
+% path p ; p := (0,0) -- (10cm,5cm) ;
+% drawarrow p withcolor red ;
+% drawarrow p shortened 1cm withcolor green ;
+
+% primarydef p shortened d =
+% reverse ( ( reverse (p enlonged -d) ) enlonged -d )
+% enddef ;
+
+primarydef p shortened d =
+ reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart paired(d) )
+enddef ;
+
+% yes or no, untested -)
+
+def xshifted expr dx = shifted(dx,0) enddef ;
+def yshifted expr dy = shifted(0,dy) enddef ;
+
+
+permanent stretched, enlonged, shortened, xshifted, yshifted ;
+
+% also handy
+
+% right: str = readfrom ("abc" & ".def" ) ;
+% wrong: str = readfrom "abc" & ".def" ;
+
+% Every 62th read fails so we need to try again!
+
+% def readfile (expr name) =
+% if (readfrom (name) <> EOF) :
+% scantokens("input " & name & ";") ;
+% elseif (readfrom (name) <> EOF) :
+% scantokens("input " & name & ";") ;
+% fi ;
+% closefrom (name) ;
+% enddef ;
+%
+% this sometimes fails on the elseif, so :
+%
+
+def readfile (expr name) =
+ begingroup ; save ok ; boolean ok ;
+ if (readfrom (name) <> EOF) :
+ ok := false ;
+ elseif (readfrom (name) <> EOF) :
+ ok := false ;
+ else :
+ ok := true ;
+ fi ;
+ if not ok :
+ scantokens("input " & name & " ") ;
+ fi ;
+ closefrom (name) ;
+ endgroup ;
+enddef ;
+
+permanent readfile ; % todo: lmtx
+
+% permits redefinition of end in macro
+
+inner end ;
+
+% this will be redone (when needed) using scripts and backend handling
+
+let mfun_remap_colors_normalwithcolor = normalwithcolor ;
+
+def remapcolors =
+ def normalwithcolor primary c =
+ mfun_remap_colors_normalwithcolor remappedcolor(c)
+ enddef ;
+enddef ;
+
+def normalcolors =
+ let normalwithcolor = mfun_remap_colors_normalwithcolor ;
+enddef ;
+
+def resetcolormap =
+ color color_map[][][] ;
+ normalcolors ;
+enddef ;
+
+resetcolormap ;
+
+def r_color primary c = redpart c enddef ; % still neeeded?
+def g_color primary c = greenpart c enddef ; % still neeeded?
+def b_color primary c = bluepart c enddef ; % still neeeded?
+
+def remapcolor(expr old, new) =
+ color_map[redpart old][greenpart old][bluepart old] := new ;
+enddef ;
+
+def remappedcolor(expr c) =
+ if known color_map[redpart c][greenpart c][bluepart c] :
+ color_map[redpart c][greenpart c][bluepart c]
+ else :
+ c
+ fi
+enddef ;
+
+% Thanks to Jens-Uwe Morawski for pointing out that we need
+% to treat bounded and clipped components as local pictures.
+
+def recolor suffix p = p := mfun_repathed (0,p) enddef ;
+def refill suffix p = p := mfun_repathed (1,p) enddef ;
+def redraw suffix p = p := mfun_repathed (2,p) enddef ;
+def retext suffix p = p := mfun_repathed (3,p) enddef ;
+def untext suffix p = p := mfun_repathed (4,p) enddef ;
+
+% primarydef p recolored t = mfun_repathed(0,p) t enddef ;
+% primarydef p refilled t = mfun_repathed(1,p) t enddef ;
+% primarydef p redrawn t = mfun_repathed(2,p) t enddef ;
+% primarydef p retexted t = mfun_repathed(3,p) t enddef ;
+% primarydef p untexted t = mfun_repathed(4,p) t enddef ;
+
+color refillbackground ; refillbackground := (1,1,1) ;
+
+def restroke suffix p = p := mfun_repathed (21,p) enddef ; % keep attributes
+def reprocess suffix p = p := mfun_repathed (22,p) enddef ; % no attributes
+
+permanent recolor, refill, redraw, retext, untext, restroke, reprocess, refillbackground ;
+
+% also 11 and 12
+
+vardef mfun_repathed (expr mode, p) text t =
+ begingroup ;
+ if mode = 0 :
+ save normalwithcolor ;
+ remapcolors ;
+ fi ;
+ save temp_p, temp_q, temp_r, temp_f, temp_b ;
+ picture temp_p, temp_q, temp_r ; color temp_f ; path temp_b ;
+ temp_b := boundingbox p ;
+ temp_p := nullpicture ;
+ for i within p :
+ temp_f := (redpart i, greenpart i, bluepart i) ;
+ if bounded i :
+ temp_q := mfun_repathed(mode,i) t ;
+ setbounds temp_q to pathpart i ;
+ addto temp_p also temp_q ;
+ elseif clipped i :
+ temp_q := mfun_repathed(mode,i) t ;
+ clip temp_q to pathpart i ;
+ addto temp_p also temp_q ;
+ elseif stroked i :
+ if mode=21 :
+ temp_r := i ; % indirectness is needed
+ addto temp_p also image(scantokens(t & " pathpart temp_r")
+ dashed dashpart i withpen penpart i
+ withcolor temp_f ; ) ;
+ elseif mode=22 :
+ temp_r := i ; % indirectness is needed
+ addto temp_p also image(scantokens(t & " pathpart temp_r")) ;
+ else :
+ addto temp_p doublepath pathpart i
+ dashed dashpart i withpen penpart i
+ withcolor temp_f % (redpart i, greenpart i, bluepart i)
+ if mode = 2 :
+ t
+ fi ;
+ fi ;
+ elseif filled i :
+ if mode=11 :
+ temp_r := i ; % indirectness is needed
+ addto temp_p also image(scantokens(t & " pathpart temp_r")
+ withcolor temp_f ; ) ;
+ elseif mode=12 :
+ temp_r := i ; % indirectness is needed
+ addto temp_p also image(scantokens(t & " pathpart temp_r")) ;
+ else :
+ addto temp_p contour pathpart i
+ withcolor temp_f
+ if (mode=1) and (temp_f<>refillbackground) :
+ t
+ fi ;
+ fi ;
+ else :
+ addto temp_p also i ;
+ fi ;
+ endfor ;
+ setbounds temp_p to temp_b ;
+ temp_p
+ endgroup
+enddef ;
+
+%D After a question of Denis on how to erase a z variable, Jacko suggested to assign
+%D whatever to x and y. So a clearz variable can be defined as:
+%
+% vardef clearz@# =
+% x@# := whatever ;
+% y@# := whatever ;
+% enddef ;
+%
+% but Jacko suggested a redefinition of clearxy:
+%
+% def clearxy text s =
+% clearxy_index_:=0;
+% for $:=s:
+% clearxy_index_:=clearxy_index_+1; endfor;
+% if clearxy_index_=0:
+% save x,y;
+% else:
+% forsuffixes $:=s: x$:=whatever; y$:=whatever; endfor;
+% fi
+% enddef;
+%
+% which i decided to simplify to:
+
+def clearxy text s =
+ if false for $ := s : or true endfor :
+ forsuffixes $ := s : x$ := whatever ; y$ := whatever ; endfor ;
+ else :
+ save x, y ;
+ fi
+enddef ;
+
+permanent clearxy ;
+
+% so now we can say: clearxy ; as well as clearxy 1, 2, 3 ;
+
+% show x0 ; z0 = (10,10) ;
+% show x0 ; x0 := whatever ; y0 := whatever ;
+% show x0 ; z0 = (20,20) ;
+% show x0 ; clearxy 0 ;
+% show x0 ; z0 = (30,30) ;
+
+primarydef p smoothed d =
+ (p llmoved (-xpart paired(d),0) -- p lrmoved (-xpart paired(d),0) {right} ..
+ p lrmoved (0,-ypart paired(d)) -- p urmoved (0,-ypart paired(d)) {up} ..
+ p urmoved (-xpart paired(d),0) -- p ulmoved (-xpart paired(d),0) {left} ..
+ p ulmoved (0,-ypart paired(d)) -- p llmoved (0,-ypart paired(d)) {down} .. cycle)
+enddef ;
+
+primarydef p cornered c =
+ ((point 0 of p) shifted (c*(unitvector(point 1 of p - point 0 of p))) --
+ for i=1 upto length(p) :
+ (point i-1 of p) shifted (c*(unitvector(point i of p - point i-1 of p))) --
+ (point i of p) shifted (c*(unitvector(point i-1 of p - point i of p))) ..
+ controls point i of p ..
+ endfor cycle)
+enddef ;
+
+permanent smoothed, cornered ;
+
+% cmyk color support
+
+% vardef cmyk(expr c,m,y,k) = % elsewhere
+% (1-c-k,1-m-k,1-y-k)
+% enddef ;
+
+% handy
+
+% vardef bbwidth (expr p) = % vardef width_of primary p =
+% if known p :
+% if path p or picture p :
+% xpart (lrcorner p - llcorner p)
+% else :
+% 0
+% fi
+% else :
+% 0
+% fi
+% enddef ;
+
+vardef bbwidth primary p =
+ if unknown p :
+ 0
+ elseif path p or picture p :
+ xpart (lrcorner p - llcorner p)
+ else :
+ 0
+ fi
+enddef ;
+
+% vardef bbheight (expr p) = % vardef heigth_of primary p =
+% if known p :
+% if path p or picture p :
+% ypart (urcorner p - lrcorner p)
+% else :
+% 0
+% fi
+% else :
+% 0
+% fi
+% enddef ;
+
+vardef bbheight primary p =
+ if unknown p :
+ 0
+ elseif path p or picture p :
+ ypart (urcorner p - lrcorner p)
+ else :
+ 0
+ fi
+enddef ;
+
+permanent bbwidth, bbheight ;
+
+color nocolor ; numeric noline ; % both unknown signals
+
+def dowithpath (expr p, lw, lc, bc) =
+ if known p :
+ if known bc :
+ fill p withcolor bc ;
+ fi ;
+ if known lw and known lc :
+ draw p withpen pencircle scaled lw withcolor lc ;
+ elseif known lw :
+ draw p withpen pencircle scaled lw ;
+ elseif known lc :
+ draw p withcolor lc ;
+ fi ;
+ fi ;
+enddef ;
+
+% result from metafont discussion list (denisr/boguslawj)
+
+def [[[ = [ [ [ enddef ; % already: def [[ = [ [ enddef ;
+def ]]] = ] ] ] enddef ; % already: def ]] = ] ] enddef ;
+
+let == = = ; % magic
+
+permanent [[[, ]]], ==;
+
+% added
+
+picture oddly ; % evenly already defined
+
+evenly := dashpattern(on 3 off 3) ;
+oddly := dashpattern(off 3 on 3) ;
+
+% not perfect, but useful since it removes redundant points.
+
+vardef mfun_straightened(expr sign, p) =
+ save temp_p, temp_q ; path temp_p, temp_q ;
+ temp_p := p ;
+ forever :
+ temp_q := mfun_do_straightened(sign, temp_p) ;
+ exitif length(temp_p) = length(temp_q) ;
+ temp_p := temp_q ;
+ endfor ;
+ temp_q
+enddef ;
+
+% vardef mfun_straightened(expr sign, p) =
+% save lp, lq, q ; path q ; q := p ;
+% lp := length(p) ;
+% forever :
+% q := mfun_do_straightened(sign,q) ;
+% lq := length(q) ;
+% exitif lp = lq ;
+% lp := lq ;
+% endfor ;
+% q
+% enddef ;
+
+% can be optimized:
+
+vardef mfun_do_straightened(expr sign, p) =
+ if length(p) > 2 : % was 1, but straight lines are ok
+ save pp ; path pp ;
+ pp := point 0 of p ;
+ for i=1 upto length(p)-1 :
+ if round(point i of p) <> round(point length(pp) of pp) :
+ pp := pp -- point i of p ;
+ fi ;
+ endfor ;
+ save n, ok ; numeric n ; boolean ok ;
+ n := length(pp) ; ok := false ;
+ if n > 2 :
+ for i=0 upto n :
+ if unitvector(round(point i of pp - point if i=0 : n else : i-1 fi of pp)) <>
+ sign * unitvector(round(point if i=n : 0 else : i+1 fi of pp - point i of pp)) :
+ if ok :
+ --
+ else :
+ ok := true ;
+ fi point i of pp
+ fi
+ endfor
+ if ok and (cycle p) :
+ -- cycle
+ fi
+ else :
+ pp
+ fi
+ else :
+ p
+ fi
+enddef ;
+
+vardef simplified expr p = (
+ reverse mfun_straightened(+1,mfun_straightened(+1,reverse p))
+) enddef ;
+
+vardef unspiked expr p = (
+ reverse mfun_straightened(-1,mfun_straightened(-1,reverse p))
+) enddef ;
+
+permanent simplified, unspiked ;
+
+% path p ;
+% p := (2cm,1cm) -- (2cm,1cm) -- (2cm,1cm) -- (3cm,1cm) --
+% (4cm,1cm) -- (4cm,2cm) -- (4cm,2.5cm) -- (4cm,3cm) --
+% (3cm,3cm) -- (2cm,3cm) -- (1cm,3cm) -- (-1cm,3cm) --
+% .5[(-1cm,3cm),(1cm,1cm)] -- (1cm,1cm) -- cycle ;
+%
+% p := unitcircle scaled 4cm ;
+%
+% drawpath p ; drawpoints p ; drawpointlabels p ;
+% p := p shifted (4cm,0) ; p := straightened p ;
+% drawpath p ; drawpoints p ; drawpointlabels p ;
+% p := p shifted (4cm,0) ; p := straightened p ;
+% drawpath p ; drawpoints p ; drawpointlabels p ;
+
+% new
+
+path originpath ; originpath := origin -- cycle ;
+
+vardef unitvector primary z =
+ if abs z = abs origin : z else : z/abs z fi % hm, abs origin is just origin
+enddef;
+
+vardef epsed (expr e) = % epsed(1.2345)
+ e if e>0 : + eps elseif e < 0 : - eps fi
+enddef ;
+
+immutable originpath ;
+permanent unitvector, epsed ;
+
+% handy
+
+def withgray primary g =
+ withcolor g
+enddef ;
+
+if unknown darkred : color darkred ; darkred := .625(1,0,0) fi ;
+if unknown darkgreen : color darkgreen ; darkgreen := .625(0,1,0) fi ;
+if unknown darkblue : color darkblue ; darkblue := .625(0,0,1) fi ;
+if unknown darkcyan : color darkcyan ; darkcyan := .625(0,1,1) fi ;
+if unknown darkmagenta : color darkmagenta ; darkmagenta := .625(1,0,1) fi ;
+if unknown darkyellow : color darkyellow ; darkyellow := .625(1,1,0) fi ;
+if unknown darkgray : color darkgray ; darkgray := .625(1,1,1) fi ;
+if unknown lightgray : color lightgray ; lightgray := .850(1,1,1) fi ;
+
+permanent withgray ;
+
+% an improved plain mp macro
+
+vardef center primary p =
+ if pair p :
+ p
+ else :
+ .5[llcorner p, urcorner p]
+ fi
+enddef;
+
+permanent center ;
+
+% new, yet undocumented
+
+vardef rangepath (expr p, d, a) =
+ if length p>0 :
+ (d*unitvector(direction 0 of p) rotated a) shifted point 0 of p
+ -- p --
+ (d*unitvector(direction length(p) of p) rotated a) shifted point length(p) of p
+ else :
+ p
+ fi
+enddef ;
+
+% under construction
+
+vardef straightpath (expr a, b, method) =
+ if (method<1) or (method>6) :
+ (a--b)
+ elseif method = 1 :
+ (a --
+ if xpart a > xpart b :
+ if ypart a > ypart b :
+ (xpart b,ypart a) --
+ elseif ypart a < ypart b :
+ (xpart a,ypart b) --
+ fi
+ elseif xpart a < xpart b :
+ if ypart a > ypart b :
+ (xpart a,ypart b) --
+ elseif ypart a < ypart b :
+ (xpart b,ypart a) --
+ fi
+ fi
+ b)
+ elseif method = 3 :
+ (a --
+ if xpart a > xpart b :
+ (xpart b,ypart a) --
+ elseif xpart a < xpart b :
+ (xpart a,ypart b) --
+ fi
+ b)
+ elseif method = 5 :
+ (a --
+ if ypart a > ypart b :
+ (xpart b,ypart a) --
+ elseif ypart a < ypart b :
+ (xpart a,ypart b) --
+ fi
+ b)
+ else :
+ (reverse straightpath(b,a,method-1))
+ fi
+enddef ;
+
+permanent straightpath ;
+
+% handy for myself
+
+def addbackground text t =
+ begingroup ;
+ save p, b ; picture p ; path b ;
+ b := boundingbox currentpicture ;
+ p := currentpicture ; currentpicture := nullpicture ;
+ fill b t ;
+ setbounds currentpicture to b ;
+ addto currentpicture also p ;
+ endgroup ;
+enddef ;
+
+permanent addbackground ;
+
+% makes a (line) into an infinite one (handy for calculating
+% intersection points
+
+vardef infinite expr p =
+ (-infinity*unitvector(direction 0 of p)
+ shifted point 0 of p
+ -- p --
+ +infinity*unitvector(direction length(p) of p)
+ shifted point length(p) of p)
+enddef ;
+
+permanent infinite ;
+
+% obscure macros: create var from string and replace - and :
+% (needed for process color id's) .. will go away
+
+% this will become a lua helper
+
+% string mfun_clean_ascii[] ;
+%
+% def register_dirty_chars(expr str) =
+% for i = 0 upto length(str)-1 :
+% mfun_clean_ascii[ASCII substring(i,i+1) of str] := "_" ;
+% endfor ;
+% enddef ;
+%
+% register_dirty_chars("+-*/:;., ") ;
+%
+% vardef cleanstring (expr s) =
+% save ss ; string ss, si ; ss = "" ; save i ;
+% for i=0 upto length(s) :
+% si := substring(i,i+1) of s ;
+% ss := ss & if known mfun_clean_ascii[ASCII si] : mfun_clean_ascii[ASCII si] else : si fi ;
+% endfor ;
+% ss
+% enddef ;
+%
+% vardef asciistring (expr s) =
+% save ss ; string ss, si ; ss = "" ; save i ;
+% for i=0 upto length(s) :
+% si := substring(i,i+1) of s ;
+% if (ASCII si >= ASCII "0") and (ASCII si <= ASCII "9") :
+% ss := ss & char(scantokens(si) + ASCII "A") ;
+% else :
+% ss := ss & si ;
+% fi ;
+% endfor ;
+% ss
+% enddef ;
+%
+% vardef setunstringed (expr s, v) =
+% scantokens(cleanstring(s)) := v ;
+% enddef ;
+%
+% vardef getunstringed (expr s) =
+% scantokens(cleanstring(s))
+% enddef ;
+%
+% vardef unstringed (expr s) =
+% expandafter known scantokens(cleanstring(s))
+% enddef ;
+
+% for david arnold: showgrid(-5,10,1cm,-10,10,1cm);
+
+def showgrid (expr minx, maxx, deltax, miny, maxy, deltay) = % will move
+ begingroup
+ save size ; numeric size ; size := 2pt ;
+ for x=minx upto maxx :
+ for y=miny upto maxy :
+ draw (x*deltax, y*deltay) withpen pencircle scaled
+ if (x mod 5 = 0) and (y mod 5 = 0) :
+ 1.5size withcolor .50white
+ else :
+ size withcolor .75white
+ fi ;
+ endfor ;
+ endfor ;
+ for x=minx upto maxx:
+ label.bot(textext("\infofont " & decimal x), (x*deltax,-size)) ;
+ endfor ;
+ for y=miny upto maxy:
+ label.lft(textext("\infofont " & decimal y), (-size,y*deltay)) ;
+ endfor ;
+ endgroup
+enddef;
+
+% new, handy for:
+%
+% \startuseMPgraphic{map}{n}
+% \includeMPgraphic{map:germany} ;
+% c_phantom (\MPvar{n}<1) (
+% fill map_germany withcolor \MPcolor{lightgray} ;
+% draw map_germany withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% \includeMPgraphic{map:austria} ;
+% c_phantom (\MPvar{n}<2) (
+% fill map_austria withcolor \MPcolor{lightgray} ;
+% draw map_austria withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% c_phantom (\MPvar{n}<3) (
+% \includeMPgraphic{map:swiss} ;
+% fill map_swiss withcolor \MPcolor{lightgray} ;
+% draw map_swiss withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% c_phantom (\MPvar{n}<4) (
+% \includeMPgraphic{map:luxembourg} ;
+% fill map_luxembourg withcolor \MPcolor{lightgray} ;
+% draw map_luxembourg withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% \stopuseMPgraphic
+%
+% \useMPgraphic{map}{n=3}
+
+vardef phantom (text t) = % to be checked
+ picture temp_p ;
+ temp_p := image(t) ;
+ addto temp_p also currentpicture ;
+ setbounds currentpicture to boundingbox temp_p ;
+enddef ;
+
+vardef c_phantom (expr b) (text t) =
+ if b :
+ save temp_p; picture temp_p ;
+ temp_p := image(t) ;
+ addto temp_p also currentpicture ;
+ setbounds currentpicture to boundingbox temp_p ;
+ else :
+ t ;
+ fi ;
+enddef ;
+
+permanent phantom ;
+
+%D Handy:
+
+def break =
+ exitif true ; % fi
+enddef ;
+
+permanent break ;
+
+%D New too:
+
+primarydef p xstretched w = (
+ p if (bbwidth (p)>0) and (w>0) : xscaled (w/bbwidth (p)) fi
+) enddef ;
+
+primarydef p ystretched h = (
+ p if (bbheight(p)>0) and (h>0) : yscaled (h/bbheight(p)) fi
+) enddef ;
+
+permanent xstretched, ystretched ;
+
+%D Newer:
+
+vardef area expr p =
+ % we could calculate the boundingbox once
+ (xpart llcorner boundingbox p,0) -- p --
+ (xpart lrcorner boundingbox p,0) -- cycle
+enddef ;
+
+vardef basiccolors[] =
+ if @ = 0 :
+ white
+ else :
+ save n ; n := @ mod 7 ;
+ if n = 1 : red
+ elseif n = 2 : green
+ elseif n = 3 : blue
+ elseif n = 4 : cyan
+ elseif n = 5 : magenta
+ elseif n = 6 : yellow
+ else : black
+ fi
+ fi
+enddef ;
+
+% vardef somecolor = (1,1,0,0) enddef ;
+
+% fill OverlayBox withcolor (rcomponent somecolor,gcomponent somecolor,bcomponent somecolor) ;
+% fill OverlayBox withcolor (ccomponent somecolor,mcomponent somecolor,ycomponent somecolor,bcomponent somecolor) ;
+
+% This could be standard mplib 2 behaviour:
+
+% vardef rcomponent expr p = if rgbcolor p : redpart elseif cmykcolor p : 1 - cyanpart fi p enddef ;
+
+vardef rcomponent expr p = if rgbcolor p : redpart p elseif cmykcolor p : 1 - cyanpart p else : p fi enddef ;
+vardef gcomponent expr p = if rgbcolor p : greenpart p elseif cmykcolor p : 1 - magentapart p else : p fi enddef ;
+vardef bcomponent expr p = if rgbcolor p : bluepart p elseif cmykcolor p : 1 - yellowpart p else : p fi enddef ;
+vardef ccomponent expr p = if cmykcolor p : cyanpart p elseif rgbcolor p : 1 - redpart p else : p fi enddef ;
+vardef mcomponent expr p = if cmykcolor p : magentapart p elseif rgbcolor p : 1 - greenpart p else : p fi enddef ;
+vardef ycomponent expr p = if cmykcolor p : yellowpart p elseif rgbcolor p : 1 - bluepart p else : p fi enddef ;
+vardef kcomponent expr p = if cmykcolor p : blackpart p elseif rgbcolor p : 0 else : p fi enddef ;
+
+permanent rcomponent, gcomponent, bcomponent, ccomponent, mcomponent, ycomponent, kcomponent ;
+
+% draw image (...) ... ; % prescripts prepended to first, postscripts appended to last
+% draw decorated (...) ... ; % prescripts prepended to each, postscripts appended to each
+% draw redecorated (...) ... ; % prescripts assigned to each, postscripts assigned to each
+% draw undecorated (...) ... ; % following properties are ignored, existing properties are kept
+%
+% draw decorated (
+% draw fullcircle scaled 20cm withpen pencircle scaled 20mm withcolor red withtransparency (1,.40) ;
+% draw fullcircle scaled 15cm withpen pencircle scaled 15mm withcolor green withtransparency (1,.30) ;
+% draw fullcircle scaled 10cm withpen pencircle scaled 10mm withcolor blue withtransparency (1,.20) ;
+% )
+% withcolor blue
+% withtransparency (1,.125) % selectively applied
+% withpen pencircle scaled 10mm
+% ;
+
+% vardef image (text imagedata) = % already defined
+% save currentpicture ;
+% picture currentpicture ;
+% currentpicture := nullpicture ;
+% imagedata ;
+% currentpicture
+% enddef ;
+
+vardef undecorated (text t) text decoration =
+ save currentpicture ;
+ picture currentpicture ;
+ currentpicture := nullpicture ;
+ t ;
+ currentpicture
+enddef ;
+
+vardef decorated (text imagedata) text decoration =
+ save mfun_decorated_path, currentpicture ;
+ picture mfun_decorated_path, currentpicture ;
+ currentpicture := nullpicture ;
+ imagedata ;
+ mfun_decorated_path := currentpicture ;
+ currentpicture := nullpicture ;
+ for i within mfun_decorated_path :
+ addto currentpicture
+ if stroked i :
+ doublepath pathpart i
+ dashed dashpart i
+ withpen penpart i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+ decoration
+ elseif filled i :
+ contour pathpart i
+ withpen penpart i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+ decoration
+ elseif textual i :
+ also i
+ withcolor colorpart i
+ withprescript prescriptpart i
+ withpostscript postscriptpart i
+ decoration
+ else :
+ also i
+ fi
+ ;
+ endfor ;
+ currentpicture
+enddef ;
+
+vardef redecorated (text imagedata) text decoration =
+ save mfun_decorated_path, currentpicture ;
+ picture mfun_decorated_path, currentpicture ;
+ currentpicture := nullpicture ;
+ imagedata ;
+ mfun_decorated_path := currentpicture ;
+ currentpicture := nullpicture ;
+ for i within mfun_decorated_path :
+ addto currentpicture
+ if stroked i :
+ doublepath pathpart i
+ dashed dashpart i
+ withpen penpart i
+ decoration
+ elseif filled i :
+ contour pathpart i
+ withpen penpart i
+ decoration
+ elseif textual i :
+ also i
+ decoration
+ else :
+ also i
+ fi
+ ;
+ endfor ;
+ currentpicture
+enddef ;
+
+permanent decorated, undecorated, redecorated ;
+
+% path mfun_bleed_box ;
+
+% primarydef p bleeded d =
+% image (
+% mfun_bleed_box := boundingbox p ;
+% if pair d :
+% draw p xysized (bbwidth(p)+2*xpart d,bbheight(p)+2*ypart d) shifted -d ;
+% else :
+% draw p xysized (bbwidth(p)+2d,bbheight(p)+2d) shifted (-d,-d) ;
+% fi ;
+% setbounds currentpicture to mfun_bleed_box ;
+% )
+% enddef ;
+
+vardef mfun_snapped(expr p, s) =
+ if p < 0 : - ( - else : ( fi p div s) * s % the less tokens the better
+enddef ;
+
+vardef mfun_applied(expr p, s)(suffix a) =
+ if path p :
+ if pair s :
+ for i=0 upto length(p)-1 :
+ (a(xpart point i of p,xpart s),a(ypart point i of p,ypart s)) --
+ endfor
+ if cycle p :
+ cycle
+ else :
+ (a(xpart point length(p) of p,xpart s),a(ypart point length(p) of p,ypart s))
+ fi
+ else :
+ for i=0 upto length(p)-1 :
+ (a(xpart point i of p,s),a(ypart point i of p,s)) --
+ endfor
+ if cycle p :
+ cycle
+ else :
+ (a(xpart point length(p) of p,s),a(ypart point length(p) of p,s))
+ fi
+ fi
+ elseif pair p :
+ if pair s :
+ (a(xpart p,xpart s),a(ypart p,ypart s))
+ else :
+ (a(xpart p,s),a(ypart p,s))
+ fi
+ elseif cmykcolor p :
+ (a(cyanpart p,s),a(magentapart p,s),a(yellowpart p,s),a(blackpart p,s))
+ elseif rgbcolor p :
+ (a(redpart p,s),a(greenpart p,s),a(bluepart p,s))
+ elseif graycolor p :
+ a(p,s)
+ elseif numeric p :
+ a(p,s)
+ else
+ p
+ fi
+enddef ;
+
+primarydef p snapped s =
+ mfun_applied(p,s)(mfun_snapped) % so we can play with variants
+enddef ;
+
+permanent snapped ;
+
+%D Take a look at mp-tool.mpiv for the old implementation if the next code. We only provide
+%D this for old times sake. We assume that the lmt_ commands are defined by the time this
+%D is used:
+
+% beginfont("demo-symbols");
+% beginglyph(9754,2,4,0) ; % high voltage
+% interim ahlength := 1 ;
+% drawarrow (1,4) -- (0,2) -- (2,3) -- (1,0) withcolor darkred ;
+% endglyph ;
+% endfont;
+
+picture font_glyph[][] ;
+numeric font_count ; font_count := 0;
+
+def beginfont(expr n) =
+ begingroup ;
+ save name ; string name; name := n;
+ font_count := font_count + 1 ;
+ lmt_registerglyphs [
+ name = name,
+ units = 10,
+ width = 10,
+ height = 8,
+ depth = 2,
+ ] ;
+enddef ;
+
+def endfont =
+ endgroup;
+enddef ;
+
+def beginglyph(expr u, w, h, d) =
+ save unicode ; unicode := u;
+ lmt_registerglyph [
+ category = name,
+ unicode = u,
+ code = "draw font_glyph[" & decimal font_count & "][" & decimal u & "];"
+ width = w,
+ height = h,
+ depth = d,
+ ] ;
+ currentpicture := nullpicture ;
+enddef ;
+
+def endglyph =
+ font_glyph[font_count][unicode] := currentpicture ;
+enddef ;
+
+permanent beginfont, endfont, beginglyph, endglyph ;
+
+%D Dimensions have never been an issue as traditional MP can't make that large pictures,
+%D but with double mode we need a catch:
+
+newinternal maxdimensions ; maxdimensions := 14000 ;
+
+def mfun_apply_max_dimensions = % not a generic helper, we want to protect this one
+ if bbwidth currentpicture > maxdimensions :
+ currentpicture := currentpicture if bbheight currentpicture > bbwidth currentpicture : ysized else : xsized fi maxdimensions ;
+ elseif bbheight currentpicture > maxdimensions :
+ currentpicture := currentpicture ysized maxdimensions ;
+ fi ;
+enddef;
+
+extra_endfig := extra_endfig & "mfun_apply_max_dimensions ;" ;
+
+%D Bonus shapes (need along):
+
+path unittriangle, fulltriangle ; % not really units but circle based
+
+unittriangle := point 0 along unitcircle
+ -- point 1/3 along unitcircle
+ -- point 2/3 along unitcircle
+ -- cycle ;
+fulltriangle := point 0 along fullcircle
+ -- point 1/3 along fullcircle
+ -- point 2/3 along fullcircle
+ -- cycle ;
+
+immutable unittriangle, fulltriangle ;
+
+%D Kind of special and undocumented. On Wikipedia one can find examples of quick sort
+%D routines. Here we have a variant that permits a method.
+
+% vardef listsize(suffix list) =
+% numeric len ; len := 0 ;
+% forever :
+% exitif unknown list[len+1] ;
+% len := len + 1 ;
+% endfor ;
+% len
+% enddef ;
+
+vardef listsize(suffix list) =
+ numeric len ; len := 1 ;
+ forever :
+ exitif unknown list[len] ;
+ len := len + 1 ;
+ endfor ;
+ len if unknown list[0] : - 1 fi
+enddef ;
+
+vardef listlast(suffix list) =
+ numeric len ; len := if known list[0] : 0 else : 1 fi ;
+ forever :
+ len := len + 1 ;
+ exitif unknown list[len] ;
+ endfor ;
+ len - 1
+enddef ;
+
+vardef mfun_quick_sort(suffix list)(expr asked_min, asked_max)(text what) =
+ save l, r, m ;
+ numeric l ; l := asked_min ;
+ numeric r ; r := asked_max ;
+ numeric m ; m := floor(.5[asked_min,asked_max]) ;
+ asked_mid := what list[m] ;
+ forever :
+ exitif l >= r ;
+ forever :
+ exitif l > asked_max ;
+ % exitif (what list[l]) >= (what list[m]) ;
+ exitif (what list[l]) >= asked_mid ;
+ l := l + 1 ;
+ endfor ;
+ forever :
+ exitif r < asked_min ;
+ % exitif (what list[m]) >= (what list[r]) ;
+ exitif asked_mid >= (what list[r]) ;
+ r := r - 1 ;
+ endfor ;
+ if l <= r :
+ temp := list[l] ;
+ list[l] := list[r] ;
+ list[r] := temp ;
+ l := l + 1 ;
+ r := r - 1 ;
+ fi ;
+ endfor ;
+ if asked_min < r :
+ mfun_quick_sort(list)(asked_min,r)(what) ;
+ fi ;
+ if l < asked_max :
+ mfun_quick_sort(list)(l,asked_max)(what) ;
+ fi ;
+enddef ;
+
+vardef sortlist(suffix list)(text what) =
+ save asked_max ; numeric asked_max ;
+ save asked_mid ; numeric asked_mid ;
+ save temp ;
+ % asked_max := listsize(list) ;
+ asked_max := listlast(list) ;
+ if pair list[asked_max] :
+ pair temp ;
+ else :
+ numeric temp ;
+ fi ;
+ if pair what list[asked_max] :
+ pair asked_mid ;
+ else :
+ numeric asked_mid ;
+ fi ;
+ if asked_max > 1 :
+ % mfun_quick_sort(list)(1,asked_max)(what) ;
+ mfun_quick_sort(list)(if known list[0] : 0 else : 1 fi,asked_max)(what) ;
+ fi ;
+enddef ;
+
+vardef uniquelist(suffix list) =
+ % this one will be defined later
+enddef ;
+
+vardef copylist(suffix list, target) =
+ save i ; i := 1 ;
+ forever :
+ exitif unknown list[i] ;
+ target[i] := list[i] ;
+ i := i + 1 ;
+ endfor ;
+enddef ;
+
+vardef listtolines(suffix list) =
+ list[1] for i=2 upto listsize(list) : -- list[i] endfor
+enddef ;
+
+vardef listtocurves(suffix list) =
+ list[1] for i=2 upto listsize(list) : .. list[i] endfor
+enddef ;
+
+%D The sorter is used in:
+
+% not yet ok
+
+vardef shapedlist(suffix p) = % takes a list of paths
+ save l ; pair l[] ;
+ save r ; pair r[] ;
+ save i ; i := 1 ;
+ save n ; n := 0 ;
+ forever :
+ exitif unknown p[i] ;
+ n := n + 1 ;
+ l[n] := ulcorner p[i] ;
+ r[n] := urcorner p[i] ;
+ n := n + 1 ;
+ l[n] := llcorner p[i] ;
+ r[n] := lrcorner p[i] ;
+ i := i + 1 ;
+ endfor ;
+ for i = 3 upto n :
+ if xpart r[i] < xpart r[i-1] :
+ r[i] := (xpart r[i],ypart r[i-1]) ;
+ elseif xpart r[i] > xpart r[i-1] :
+ r[i-1] := (xpart r[i-1],ypart r[i]) ;
+ fi ;
+ if xpart l[i] < xpart l[i-1] :
+ l[i-1] := (xpart l[i-1],ypart l[i]) ;
+ elseif xpart l[i] > xpart l[i-1] :
+ l[i] := (xpart l[i],ypart l[i-1]) ;
+ fi ;
+ endfor ;
+ if n > 0 :
+ simplified (
+ for i = 1 upto n : r[i] -- endfor
+ for i = n downto 1 : l[i] -- endfor
+ cycle
+ )
+ else :
+ origin -- cycle
+ fi
+enddef ;
+
+permanent listsize, listlast, sortlist, uniquelist, copylist, listtolines, listtocurves, shapedlist ;
+
+%D Dumping is fake anyway but let's keep this:
+
+let dump = relax ;
+
+%D Loading modules can be done with:
+
+def loadmodule expr name = % no vardef
+ % input can't be used directly in a macro
+ if (unknown scantokens("context_" & name)) and (unknown scantokens("metafun_loaded_" & name)) :
+ save s ; string s ; s := "input " & ditto & "mp-" & name & ditto & ";" ;
+ expandafter scantokens expandafter s
+ fi ;
+enddef ;
+
+def loadfile (expr filename) = scantokens("input " & filename) enddef ;
+def loadimage (expr filename) = image(scantokens("input " & filename);) enddef ;
+
+permanent loadmodule, loadfile, loadimage ;
+
+%D Handy for backgrounds:
+
+def drawpathwithpoints expr p =
+ do_drawpathwithpoints(p)
+enddef ;
+
+def do_drawpathwithpoints(expr p) text t =
+ draw p t ;
+ if length(p) > 2 :
+ begingroup ;
+ save temp_c ; path temp_c ;
+ save temp_p; picture temp_p ;
+ temp_p := image (
+ temp_c := if cycle p : fullsquare else : fullcircle fi scaled 6pt ;
+ for i=0 upto length(p) if cycle p : -1 fi :
+ fill temp_c shifted point i of p withcolor white ;
+ draw temp_c shifted point i of p withcolor white/2 withpen pencircle scaled .5pt ;
+ if (i = 0) and cycle p :
+ temp_c := fullcircle scaled 6pt ;
+ fi ;
+ endfor ;
+ for i=0 upto length(p) if cycle p : -1 fi :
+ draw textext("\infofont " & decimal i) ysized 2pt shifted point i of p ;
+ endfor ;
+ ) ;
+ setbounds temp_p to boundingbox p ;
+ draw temp_p ;
+ fi ;
+enddef ;
+
+%D These new helpers are by Alan and are used in for instance the mp-node module.
+
+newinternal crossingdebug ; crossingdebug := 0 ;
+newinternal crossingscale ; crossingscale := 10 ;
+newinternal crossingnumbermax ; crossingnumbermax := 1000 ;
+
+% primary, secondary or tertiary? always hard to decide but primary makes sense
+
+vardef infotext@#(expr txt, ysize) =
+ textext@#("\infofont " & if numeric txt : decimal fi txt) ysized ysize
+enddef ;
+
+primarydef p crossingunder q =
+ begingroup
+ save pic ; picture pic ; pic := nullpicture ;
+ if picture p :
+ for i within p :
+ if stroked i :
+ addto pic also image(draw pathpart i crossingunder q) ;
+ fi
+ endfor
+ elseif path p :
+ save n, t, a, b, c, r, bcuttings, hold ;
+ numeric n, t[], hold ;
+ path a, b, c, r, bcuttings, hold[] ;
+ c := makepath(currentpen scaled crossingscale) ;
+ r := if picture q : boundingbox fi q ;
+ t[0] := n := hold := 0 ;
+ a := p ;
+ % The cutbefore/cutafter using c below prevents endless loops!
+ %forever : % find all intersections
+ for i=1 upto crossingnumbermax : % safeguard
+ clearxy ; z = a intersectiontimes r ;
+ if x < 0 :
+ exitif hold < 1 ;
+ a := hold[hold] ; hold := hold - 1 ;
+ clearxy ; z = a intersectiontimes r ;
+ fi
+ (t[incr n], whatever) = p intersectiontimes point x of a ;
+ if x = 0 :
+ a := a cutbefore c shifted point x of a ;
+ elseif x = length a :
+ a := a cutafter c shifted point x of a ;
+ else : % before or after?
+ b := subpath (0,x) of a cutafter c shifted point x of a ;
+ bcuttings := cuttings ;
+ a := subpath (x,length a) of a cutbefore c shifted point x of a ;
+ clearxy ; z = a intersectiontimes r ;
+ if x < 0 :
+ a := b ;
+ cuttings := bcuttings ;
+ else :
+ if length bcuttings > 0 :
+ clearxy ; z = b intersectiontimes r ;
+ if x >= 0 :
+ hold[incr hold] := b ;
+ fi
+ fi
+ fi
+ fi
+ if length cuttings = 0 : % a single point: nothing cut
+ exitif hold < 1 ;
+ a := hold[hold] ; hold := hold - 1 ;
+ fi
+ if i = crossingnumbermax :
+ message("crossingunder reached maximum " & decimal i & " intersections.");
+ fi
+ endfor
+
+ if n = 0 : % No crossings, we return the PATH
+ save pic ; path pic ; pic := p ;
+ else : % n>0
+ sortlist(t,) ;
+ % we add too much, maybe a test is needed
+ t[incr n] = length p if cycle p : + t[1] fi ;
+% save tt[] ; numeric tt[] ; uniquelist(t,tt) ; t := tt ;
+ % Now, n>1 !
+ % t[0] is the first point of the path and t[n] is the last point
+ % (or the first intersection beyond the length if cyclic)
+ save m ; m := 0 ;
+ for i=if cycle p: 2 else: 1 fi upto n :
+ % skip the first segment if cyclic
+ % as it gets repeated (fully) at the end.
+ if crossingdebug > 0 :
+ if crossingdebug = 1 :
+ addto pic doublepath c shifted point t[i] of p
+ withpen currentpen withtransparency(1,.5) ;
+ elseif crossingdebug = 2 :
+ addto pic also
+ infotext (incr m,crossingscale/5)
+ shifted point t[i] of p ;
+ fi
+ fi
+ a := subpath (t[i-1],t[i]) of p
+ if i > 1 :
+ cutbefore (c shifted point t[i-1] of p)
+ fi
+ if (i < n) or (cycle p) :
+ cutafter (c shifted point t[i] of p)
+ fi ;
+ if (not picture q) or (a outsideof q) :
+ addto pic doublepath a withpen currentpen ;
+ fi
+ endfor
+ fi
+ fi
+ pic
+ endgroup
+enddef ;
+
+primarydef p insideof q =
+ begingroup
+ save pth, pic, t ;
+ path pth ; picture pic ;
+ pic := if path q : image(draw q;) else : q fi ;
+ pth := p -- center pic ;
+ (t, whatever) = pth intersectiontimes boundingbox pic ;
+ t < 0
+ endgroup
+enddef ;
+
+% primarydef p insideof q =
+% if (path q or picture q) :
+% if (path p or picture p) :
+% (xpart llcorner p > xpart llcorner q) and
+% (xpart urcorner p < xpart urcorner q) and
+% (ypart llcorner p > ypart llcorner q) and
+% (ypart urcorner p < ypart urcorner q)
+% elseif pair p :
+% (xpart p > xpart llcorner q) and
+% (xpart p < xpart urcorner q) and
+% (ypart p > ypart llcorner q) and
+% (ypart p < ypart urcorner q)
+% fi
+% elseif (numeric p and pair q) :
+% % range check
+% (p >= xpart q) and (p <= ypart q)
+% else : % maybe triplets and such
+% false
+% fi
+% enddef ;
+
+primarydef p outsideof q =
+ not (p insideof q)
+enddef ;
+
+permanent crossingdebug, crossingscale, crossingnumberm, infotext, crossingunder, insideof, outsideof ;
+
+%D Also handy:
+
+vardef circularpath primary n =
+ reverse (for i=0 step 2/n until 8-2/n+2eps: point i of fullcircle .. endfor cycle) rotated 90
+enddef ;
+
+vardef squarepath primary n =
+ for i=0 step 1/n until 4-1/n + 2eps: point i of fullsquare -- endfor cycle
+enddef ;
+
+vardef linearpath primary n =
+ origin for i=1/n step 1/n until 1-1/n + 2eps: -- point i of (origin--(1,0)) endfor
+enddef ;
+
+permanent circularpath, squarepath, linearpath ;
+
+%D A nice tracing helper:
+
+color pensilcolor ; pensilcolor := .5red ;
+newinternal pensilstep ; pensilstep := 1/25 ;
+
+vardef pensilled(expr p, q) =
+ image (
+ draw p withcolor pensilcolor withpen q ;
+ for i = 0 step pensilstep until length(p) + eps:
+ draw point i of p withcolor white withtransparency (1,.5) withpen q ;
+ endfor ;
+ )
+enddef ;
+
+permanent pensilled, pensilcolor, pensilstep ;
+
+%D Easy to forget but handy for manuals:
+
+vardef tolist(suffix l)(text t) =
+ save n ; n := 1 ;
+ for p = t :
+ if numeric p :
+ n := p ;
+ dispose(l[n])
+ elseif pair p :
+ l[n] := p ;
+ n := n + 1 ;
+ elseif path p :
+ for i=0 step 1 until length(p) :
+ l[n] := point i of p ;
+ n := n + 1 ;
+ endfor ;
+ else :
+ % ignore
+ fi ;
+ endfor ;
+ forever :
+ exitif unknown l[n] ;
+ dispose(l[n])
+ n := n + 1 ;
+ endfor ;
+enddef ;
+
+vardef topath(suffix p)(text t) =
+ save i ; i := if known p[1] : 2 ; p[1] elseif known p[0] : 1 ; p[0] else : 0 ; origin fi
+ forever :
+ exitif unknown p[i] ;
+ t p[i]
+ hide(i := i + 1)
+ endfor
+enddef ;
+
+vardef tocycle(suffix p)(text t) =
+ topath(p,t) t cycle
+enddef ;
+
+permanent tolist, topath, tocycle ;
+
+% reimplemented to support paths and pictures
+
+def drawdot expr p =
+ if pair p :
+ addto currentpicture doublepath p
+ withpen currentpen base_draw_options
+ elseif path p :
+ draw image (
+ for i=0 upto length p :
+ addto currentpicture doublepath point i of p
+ withpen currentpen base_draw_options ;
+ endfor ;
+ )
+ elseif picture p :
+ draw image (
+ save pp ; path pp ;
+ for i within p :
+ if stroked i or filled i :
+ pp := pathpart i ;
+ for j=0 upto length pp :
+ addto currentpicture doublepath point j of pp
+ withpen currentpen base_draw_options ;
+ endfor ;
+ fi ;
+ endfor ;
+ )
+ fi
+enddef ;
+
+permanent drawdot ;
+
+% vardef textlength(text t) =
+% save n ; n := 0 ;
+% for i = t :
+% n := n + 1 ;
+% endfor;
+% n
+% enddef;
+
+vardef mfun_timestamp =
+ decimal year & "-" &
+ decimal month & "-" &
+ decimal day & " " &
+ if ((time div 60) < 10) : "0" & fi
+ decimal (time div 60) & ":" &
+ if ((time-(time div 60)*60) < 10) : "0" & fi
+ decimal (time-(time div 60)*60)
+enddef ;
+
+vardef totransform(expr x, y, xx, xy, yx, yy) =
+ save t ; transform t ;
+ xxpart t = xx ; yypart t = yy ;
+ xypart t = xy ; yxpart t = yx ;
+ xpart t = x ; ypart t = y ;
+ t
+enddef ;
+
+vardef bymatrix(expr rx, sx, sy, ry, tx, ty) =
+ save t ; transform t ;
+ xxpart t = rx ; yypart t = ry ;
+ xypart t = sx ; yxpart t = sy ;
+ xpart t = tx ; ypart t = ty ;
+ t
+enddef ;
+
+permanent totransform, bymatrix ;
+
+let xslanted = slanted ;
+
+def yslanted primary s =
+ transformed
+ begingroup
+ save t ; transform t ;
+ xxpart t = 1 ; yypart t = 1 ;
+ xypart t = 0 ; yxpart t = s ;
+ xpart t = 0 ; ypart t = 0 ;
+ t
+ endgroup
+enddef ;
+
+permanent xslanted, yslanted ;
+
+vardef processpath (expr p) (text pp) =
+ if path p :
+ for i=0 upto length(p)-1 :
+ pp(point i of p) .. controls
+ pp(postcontrol i of p) and
+ pp(precontrol (i+1) of p) ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ pp(point length(p) of p)
+ fi
+ elseif pair p :
+ pp(p)
+ else :
+ p
+ fi
+enddef ;
+
+permanent processpath ;
diff --git a/Master/texmf-dist/metapost/context/fonts/mpiv/bidi-symbols.mp b/Master/texmf-dist/metapost/context/fonts/mpiv/bidi-symbols.mp
index abe48b95116..926e1c5fd40 100644
--- a/Master/texmf-dist/metapost/context/fonts/mpiv/bidi-symbols.mp
+++ b/Master/texmf-dist/metapost/context/fonts/mpiv/bidi-symbols.mp
@@ -52,6 +52,8 @@ numeric font_bidi_wd ; font_bidi_wd := -12 ;
% setbounds currentpicture to boundingbox nullpicture ;
% endfig ;
+beginfont("bidi-symbols") ;
+
beginglyph(8234,0,0,0) ; % lre
drawarrow (0,0) -- (0,font_bidi_dp) -- (font_bidi_wd,font_bidi_dp) withcolor red ;
endglyph ;
@@ -71,3 +73,5 @@ endglyph ;
beginglyph(8238,0,0,0) ; % rlo
drawarrow reverse ((0,0) -- (0,font_bidi_dp) -- (-font_bidi_wd,font_bidi_dp)) withcolor green ;
endglyph ;
+
+endfont ;
diff --git a/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.mp b/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.mp
index 822854c9419..f74189a1be0 100644
--- a/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.mp
+++ b/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.mp
@@ -14,8 +14,11 @@
passvariable("fontname","demo-symbols") ;
passvariable("fontversion","1.005") ;
+beginfont("demo-symbols") ;
+
beginglyph(9754,2,4,0) ; % high voltage
interim ahlength := 1 ;
drawarrow (1,4) -- (0,2) -- (2,3) -- (1,0) withcolor darkred ;
endglyph ;
+endfont ;
diff --git a/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.tex b/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.tex
index e9af4a027ed..b85803b24bc 100644
--- a/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.tex
+++ b/Master/texmf-dist/metapost/context/fonts/mpiv/demo-symbols.tex
@@ -1,21 +1,36 @@
+%\setupbodyfont[dejavu]
+
\starttext
- \definemetafont[demo-symbols][demo-symbols.mp]
+ \ifcase\contextlmtxmode
+
+ \definemetafont[demo-symbols][demo-symbols.mp]
+
+ \startbuffer
+ watch this: {\demo\char"261A} \quad \ruledhbox{\demo\char"261A}
+ \stopbuffer
+
+ \definefont[demo][demo@demo-symbols]
+
+ \getbuffer \blank
+
+ \definefont[demo][demo@demo-symbols at \the\dimexpr3\exheight]
- \startbuffer
- watch this: {\demo\char"261A} \quad \ruledhbox{\demo\char"261A}
- \stopbuffer
+ \getbuffer \blank
- \definefont[demo][demo@demo-symbols]
+ \definefont[demo][demo@demo-symbols at \the\dimexpr4\exheight]
- \getbuffer \blank
+ \getbuffer \blank
- \definefont[demo][demo@demo-symbols at \the\dimexpr3\exheight]
+ \else
- \getbuffer \blank
+ \showglyphs
- \definefont[demo][demo@demo-symbols at \the\dimexpr4\exheight]
+ \startTEXpage[offset=10pt]
+ \definemetafont[MyDemoA][demo-symbols][at 10pt]\MyDemoA\char9754
+ \definemetafont[MyDemoB][demo-symbols][at 30pt]\MyDemoB\char9754
+ \stopTEXpage
- \getbuffer \blank
+ \fi
\stoptext
diff --git a/Master/texmf-dist/metapost/context/fonts/mpiv/punkfont-characters.mp b/Master/texmf-dist/metapost/context/fonts/mpiv/punkfont-characters.mp
index da0015b02b4..5ba7a8a2182 100644
--- a/Master/texmf-dist/metapost/context/fonts/mpiv/punkfont-characters.mp
+++ b/Master/texmf-dist/metapost/context/fonts/mpiv/punkfont-characters.mp
@@ -592,9 +592,19 @@ pd z1; pd z2; pd z3; pd z4; draw z1--z2; draw flex(z3,z6,z4); % stems
pd z5; draw z5--z6; % crossbar
endchar;
-beginpunkchar("i",5,1,2);
-z1=pp(.5w,0); z2=(.5w,1/3h); z3=(.5w,2/3h); z4=(.5w,h);
-pd z1; pd z4; draw flex(z1,z2,z3,z4); % stem
+% beginpunkchar("i",5,1,2);
+% z1=pp(.5w,0); z2=(.5w,1/3h); z3=(.5w,2/3h); z4=(.5w,h);
+% pd z1; pd z4; draw flex(z1,z2,z3,z4); % stem
+% endchar;
+
+% beginpunkchar("i",9,1,2);
+% z1=pp(.5w,0); z2=(.5w,.1h); z3=(.5w,2/3h); z4=(.5w,h);
+% pd z1; pd z4; draw flex(z1,z2,z3,z4) withcolor red; % stem
+% endchar;
+
+beginpunkchar("i",9,1,2);
+z1=pp(.5w,0); z4=(.5w,h);
+pd z1; pd z4; draw z1--z4; % stem
endchar;
beginpunkchar("j",9,1,2);
@@ -642,7 +652,8 @@ z5=pp(.4w,.2h); z6=pp(w-u,-.1h); z7=pp(.5[x5,x6],-.2h);
pd z5; pd z6; draw z5--z7--z6; % tail
endchar;
-beginpunkchar("r",16,1,2);
+% beginpunkchar("r",16,1,2);
+beginpunkchar("r",13,1,2);
z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-u,.6[y2,y4]); z4=pp(2u,.5h); z5=pp(w-1.5u,0);
pd z1; pd z2; pd z5; draw z1--flex(z2,z3,z4)--z5; % stem, bowl, and diagonal
endchar;
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-context.lua b/Master/texmf-dist/scripts/context/lua/mtx-context.lua
index 4e8c364d57f..7ae350111be 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-context.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-context.lua
@@ -11,7 +11,7 @@ if not modules then modules = { } end modules['mtx-context'] = {
local type, next, tostring, tonumber = type, next, tostring, tonumber
local format, gmatch, match, gsub, find = string.format, string.gmatch, string.match, string.gsub, string.find
-local quote, validstring = string.quote, string.valid
+local quote, validstring, splitstring = string.quote, string.valid, string.split
local sort, concat, insert, sortedhash, tohash = table.sort, table.concat, table.insert, table.sortedhash, table.tohash
local settings_to_array = utilities.parsers.settings_to_array
local appendtable = table.append
@@ -34,7 +34,7 @@ local formatters = string.formatters
local application = logs.application {
name = "mtx-context",
- banner = "ConTeXt Process Management 1.03",
+ banner = "ConTeXt Process Management 1.04",
-- helpinfo = helpinfo, -- table with { category_a = text_1, category_b = text_2 } or helpstring or xml_blob
helpinfo = "mtx-context.xml",
}
@@ -95,7 +95,9 @@ scripts.context = scripts.context or { }
if jit then -- already luajittex
setargument("engine","luajittex")
setargument("jit",nil)
-elseif getargument("jit") then -- relaunch luajittex
+elseif getargument("luatex") then -- relaunch luajittex
+ setargument("engine","luatex")
+elseif getargument("jit") or getargument("luajittex") then -- relaunch luajittex
-- bonus shortcut, we assume that --jit also indicates the engine
-- although --jit and --engine=luajittex are independent
setargument("engine","luajittex")
@@ -105,10 +107,11 @@ end
-- -- the platforms to use a similar approach to this.
local engine_new = file.nameonly(getargument("engine") or directives.value("system.engine"))
-local engine_old = file.nameonly(environment.ownbin)
+local engine_old = file.nameonly(environment.ownmain) or file.nameonly(environment.ownbin)
local function restart(engine_old,engine_new)
- local command = format("%s --luaonly %q %s --redirected",engine_new,environment.ownname,environment.reconstructcommandline())
+ local ownname = file.join(file.dirname(environment.ownname),"mtxrun.lua")
+ local command = format("%s --luaonly %q %s --redirected",engine_new,ownname,environment.reconstructcommandline())
report(format("redirect %s -> %s: %s",engine_old,engine_new,command))
local result = os.execute(command)
os.exit(result == 0 and 0 or 1)
@@ -124,6 +127,10 @@ end
-- setargument("engine",engine_new) -- later on we need this
-- end
+if environment.validengines[engine_new] and engine_new ~= environment.basicengines[engine_old] then
+ restart(engine_old,engine_new)
+end
+
-- so far
-- constants
@@ -213,6 +220,7 @@ local special_runfiles = {
}
local extra_runfiles = {
+ "^m_k_i_v_.-%.pdf$",
"^l_m_t_x_.-%.pdf$",
}
@@ -620,7 +628,7 @@ function scripts.context.run(ctxdata,filename)
-- files = { }
elseif #files > 0 then
-- the list of given files is processed using the stub file
- mainfile = usedfiles.yes
+ mainfile = usedfiles.yes -- this can become "" for luametatex/lmtx
filelist = files
files = { }
else
@@ -661,6 +669,7 @@ function scripts.context.run(ctxdata,filename)
local a_arrange = getargument("arrange")
local a_noarrange = getargument("noarrange")
local a_jithash = getargument("jithash")
+ local a_permitloadlib = getargument("permitloadlib")
local a_texformat = getargument("texformat")
local a_keeptuc = getargument("keeptuc")
local a_keeplog = getargument("keeplog")
@@ -706,7 +715,8 @@ function scripts.context.run(ctxdata,filename)
formatfile, scriptfile = resolvers.locateformat(formatname)
end
--
- a_jithash = validstring(a_jithash or analysis.jithash) or nil
+ a_jithash = validstring(a_jithash or analysis.jithash) or nil
+ a_permitloadlib = a_permitloadlib or analysis.permitloadlib or nil
--
if not formatfile or not scriptfile then
report("warning: no format found, forcing remake (source driven)")
@@ -732,6 +742,9 @@ function scripts.context.run(ctxdata,filename)
if formatfile and scriptfile then
local suffix = validstring(getargument("suffix"))
local resultname = validstring(getargument("result"))
+ if not resultname or resultname == "" then
+ resultname = validstring(analysis.result)
+ end
local resultpath = file.pathpart(resultname)
if resultpath ~= "" then
resultname = nil
@@ -810,24 +823,17 @@ function scripts.context.run(ctxdata,filename)
-- ["safer"] = a_safer, -- better use --sandbox
-- ["no-mktex"] = true,
-- ["file-line-error-style"] = true,
--- ["fmt"] = formatfile,
--- ["lua"] = scriptfile,
+-- ["fmt"] = formatfile,
+-- ["lua"] = scriptfile,
["jobname"] = jobname,
["jithash"] = a_jithash,
+ ["permitloadlib"] = a_permitloadlib,
}
--
- if not a_timing then
- -- okay
- elseif c_flags.usemodule then
- c_flags.usemodule = format("timing,%s",c_flags.usemodule)
- else
- c_flags.usemodule = "timing"
- end
- --
local directives = { }
--
if a_nodates then
- directives[#directives+1] = format("backend.date=%s",type(a_nodates) == "string" and a_nodates or " no")
+ directives[#directives+1] = format("backend.date=%s",type(a_nodates) == "string" and a_nodates or "no")
end
--
if type(a_trailerid) == "string" then
@@ -848,6 +854,11 @@ function scripts.context.run(ctxdata,filename)
--
-- kindofrun: 1:first run, 2:successive run, 3:once, 4:last of maxruns
--
+ local engine = analysis.engine or "luametatex"
+ if engine == "luametatex" and (mainfile == usedfiles.yes or mainfile == usedfiles.nop) then
+ mainfile = "" -- we don't need that
+ end
+ --
for currentrun=1,maxnofruns do
--
c_flags.final = false
@@ -859,6 +870,7 @@ function scripts.context.run(ctxdata,filename)
c_flags.profile = a_profile and (tonumber(a_profile) or 0) or nil
--
print("") -- cleaner, else continuation on same line
+ --
local returncode = environment.run_format(
formatfile,
scriptfile,
@@ -1001,7 +1013,7 @@ function scripts.context.run(ctxdata,filename)
report("you can process (timing) statistics with:",jobname)
report()
report("context --extra=timing '%s'",jobname)
- report("mtxrun --script timing --xhtml [--launch --remove] '%s'",jobname)
+ -- report("mtxrun --script timing --xhtml [--launch --remove] '%s'",jobname)
report()
end
else
@@ -1348,6 +1360,8 @@ end
-- touching files (signals regeneration of formats)
+local newversion = false
+
local function touch(path,name,versionpattern,kind,kindpattern)
if path and path ~= "" then
name = filejoinname(path,name)
@@ -1356,9 +1370,11 @@ local function touch(path,name,versionpattern,kind,kindpattern)
end
local olddata = io.loaddata(name)
if olddata then
- local oldkind, newkind = "", kind or ""
- local oldversion, newversion = "", os.date("%Y.%m.%d %H:%M")
+ local oldkind = ""
+ local newkind = kind or ""
+ local oldversion = ""
local newdata
+ newversion = newversion or os.date("%Y.%m.%d %H:%M")
if versionpattern then
newdata = gsub(olddata,versionpattern,function(pre,mid,post)
oldversion = mid
@@ -1419,6 +1435,79 @@ function scripts.context.touch()
end
end
+function scripts.context.pages()
+ local filename = environment.files[1]
+ if filename then
+ local u = table.load(file.addsuffix(filename,"tuc"))
+ if u then
+ local p = u.structures.pages.collected
+ local l = u.structures.lists.collected
+ local page = environment.arguments.page
+ local list = environment.arguments.list
+ if type(page) == "string" then
+ page = settings_to_array(page)
+ end
+ if type(list) == "string" then
+ list = settings_to_array(list)
+ end
+ if page or list then
+ if page then
+ for i=1,#page do
+ page[i] = string.topattern(page[i])
+ end
+ for i=1,#p do
+ local pi = p[i]
+ local m = pi.marked
+ if m then
+ local ml = #m
+ for j=1,#page do
+ local n = page[j]
+ for k=1,ml do
+ if find(m[k],n) then
+ report("page : %04i %s",i,m[k])
+ end
+ end
+ end
+ end
+ end
+ end
+ if list then
+ for i=1,#list do
+ list[i] = string.topattern(list[i])
+ end
+ for i=1,#l do
+ local li = l[i]
+ local r = li.references
+ if r then
+ local rr = r.reference
+ if rr then
+ rr = splitstring(rr,",")
+ local rrl = #rr
+ for j=1,#list do
+ local n = list[j]
+ for k=1,rrl do
+ if find(rr[k],n) then
+ report("list : %04i %s",r.realpage,rr[k])
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ else
+ for i=1,#p do
+ local pi = p[i]
+ local m = pi.marked
+ if m then
+ report("page : %04i % t",i,m)
+ end
+ end
+ end
+ end
+ end
+end
+
-- modules
local labels = { "title", "comment", "status" }
@@ -1645,6 +1734,8 @@ elseif getargument("version") then
scripts.context.version()
elseif getargument("touch") then
scripts.context.touch()
+elseif getargument("pages") then
+ scripts.context.pages()
elseif getargument("expert") then
application.help("expert", "special")
elseif getargument("showmodules") or getargument("modules") then
@@ -1678,6 +1769,19 @@ elseif getargument("purge") then
elseif getargument("purgeall") then
-- only when no filename given, supports --pattern
scripts.context.purge(true,nil,true)
+elseif getargument("pattern") then
+ environment.filenames = dir.glob(getargument("pattern"))
+ scripts.context.timed(scripts.context.autoctx)
else
application.help("basic")
end
+
+-- we can wipe a signal file when done
+
+do
+
+ if getargument("wipebusy") then
+ os.remove("context-is-busy.tmp")
+ end
+
+end
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-context.xml b/Master/texmf-dist/scripts/context/lua/mtx-context.xml
index 0c7038d2680..98a75244b12 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-context.xml
+++ b/Master/texmf-dist/scripts/context/lua/mtx-context.xml
@@ -4,7 +4,7 @@
<metadata>
<entry name="name">mtx-context</entry>
<entry name="detail">ConTeXt Process Management</entry>
- <entry name="version">1.03</entry>
+ <entry name="version">1.04</entry>
<entry name="comment">external helpinfo file</entry>
</metadata>
<flags>
@@ -82,6 +82,9 @@
<flag name="noconsole">
<short>disable logging to the console (logfile only)</short>
</flag>
+ <flag name="nodummy">
+ <short>don't create a dummy file (can confuse pdf viewers that keep file in view)</short>
+ </flag>
<flag name="purgeresult">
<short>purge result file before run</short>
</flag>
@@ -109,6 +112,11 @@
</flag>
</subcategory>
<subcategory>
+ <flag name="pages">
+ <short>report pagenumbers of names pages and list references (<ref name="page"/>=... or <ref name="page"/>=...)</short>
+ </flag>
+ </subcategory>
+ <subcategory>
<flag name="jit">
<short>use luajittex with jit turned off (only use the faster virtual machine)</short>
</flag>
@@ -200,6 +208,9 @@
<flag name="lmtx">
<short>force lmtx mode (when available)</short>
</flag>
+ <flag name="overloadmode=error|warning|0--6|255">
+ <short>enable csname overload checking</short>
+ </flag>
</subcategory>
<subcategory>
<flag name="extra=name">
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-epub.lua b/Master/texmf-dist/scripts/context/lua/mtx-epub.lua
index 956ce4931a9..0109b15c4d2 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-epub.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-epub.lua
@@ -497,7 +497,7 @@ function scripts.epub.make(purge,rename,svgmath,svgstyle)
-- end of todo
- local pdftosvg = os.which("mudraw") and formatters[ [[mudraw -o "%s" "%s" %s]] ]
+ local pdftosvg = os.which("mutool") and formatters[ [[mutool draw -o "%s" "%s" %s]] ]
local f_svgpage = formatters["%s-page-%s.svg"]
local f_svgname = formatters["%s.svg"]
@@ -509,7 +509,7 @@ function scripts.epub.make(purge,rename,svgmath,svgstyle)
local newfiles = { }
if not pdftosvg then
- report("the %a binary is not present","mudraw")
+ report("the %a binary is not present","mutool")
end
-- a coverpage file has to be in the root of the export tree
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua b/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua
index fcba696c43c..65a661ac40b 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-fonts.lua
@@ -16,7 +16,7 @@ local lower = string.lower
local concat = table.concat
local write_nl = (logs and logs.writer) or (texio and texio.write_nl) or print
-local otlversion = 3.111
+local otlversion = 3.113
local helpinfo = [[
<?xml version="1.0"?>
@@ -486,11 +486,16 @@ function scripts.fonts.convert() -- new save
if suffix == 'ttf' or suffix == 'otf' or suffix == 'ttc' then
local data = fonts.handlers.otf.readers.loadfont(filename,sub)
if data then
+ local nofsubfonts = data and data.properties and data.properties.nofsubfonts or 0
fonts.handlers.otf.readers.compact(data)
fonts.handlers.otf.readers.rehash(data,getargument("names") and "names" or "unicodes")
local savename = replacesuffix(lower(data.metadata.fullname or filename),"lua")
table.save(savename,data)
- report("font: %a saved as %a",filename,savename)
+ if nofsubfonts == 0 then
+ report("font: %a saved as %a",filename,savename)
+ else
+ report("font: %a saved as %a, %i subfonts found, provide number if wanted",filename,savename,nofsubfonts)
+ end
else
report("font: %a not loaded",filename)
end
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-install.lua b/Master/texmf-dist/scripts/context/lua/mtx-install.lua
index b9b4103531d..614d20e9294 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-install.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-install.lua
@@ -19,7 +19,7 @@ local helpinfo = [[
<flags>
<category name="basic">
<subcategory>
- <flag name="platform" value="string"><short>platform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc)</short></flag>
+ <flag name="platform" value="string"><short>platform</short></flag>
<flag name="server" value="string"><short>repository url (rsync://contextgarden.net)</short></flag>
<flag name="modules" value="string"><short>extra modules (can be list or 'all')</short></flag>
<flag name="fonts" value="string"><short>additional fonts (can be list or 'all')</short></flag>
@@ -79,6 +79,7 @@ local platforms = {
["mswin-64"] = "win64",
["windows-64"] = "win64",
["win64"] = "win64",
+ ["arm64"] = "windows-arm64",
--
["linux"] = "linux",
["linux-32"] = "linux",
@@ -87,13 +88,14 @@ local platforms = {
["linux-64"] = "linux-64",
["linux64"] = "linux-64",
--
- ["linuxmusl-64"] = "linuxmusl-64",
+ ["linuxmusl-64"] = "linuxmusl",
+ ["linuxmusl"] = "linuxmusl",
--
["linux-armhf"] = "linux-armhf",
--
- ["openbsd"] = "openbsd6.6",
- ["openbsd-i386"] = "openbsd6.6",
- ["openbsd-amd64"] = "openbsd6.6-amd64",
+ ["openbsd"] = "openbsd6.8",
+ ["openbsd-i386"] = "openbsd6.8",
+ ["openbsd-amd64"] = "openbsd6.8-amd64",
--
["freebsd"] = "freebsd",
["freebsd-i386"] = "freebsd",
@@ -119,6 +121,10 @@ local platforms = {
["macosx"] = "osx-64",
["osx"] = "osx-64",
["osx-64"] = "osx-64",
+-- ["osx-arm"] = "osx-arm64",
+-- ["osx-arm64"] = "osx-arm64",
+ ["osx-arm"] = "osx-64",
+ ["osx-arm64"] = "osx-64",
--
-- ["solaris-intel"] = "solaris-intel",
--
@@ -152,11 +158,16 @@ function install.identify()
local name = files[i]
local size = filesize(name)
local base = gsub(name,pattern,"")
- local stamp = hashdata(io.loaddata(name))
- details[i] = { base, size, stamp }
- total = total + size
+ local data = io.loaddata(name)
+ if data and #data > 0 then
+ local stamp = hashdata(data)
+ details[i] = { base, size, stamp }
+ total = total + size
+ else
+ report("%-24s : bad file %a",tree,name)
+ end
end
- report("%-20s : %4i files, %3.0f MB",tree,#files,total/(1000*1000))
+ report("%-24s : %4i files, %3.0f MB",tree,#files,total/(1000*1000))
savetable(path .. ".tma",details)
@@ -498,16 +509,19 @@ function install.update()
local binpath = joinfile(targetroot,"tex",texmfplatform,"bin")
local luametatex = "luametatex"
+ local luatex = "luatex"
local mtxrun = "mtxrun"
local context = "context"
if ostype == "windows" then
luametatex = addsuffix(luametatex,"exe")
+ luatex = addsuffix(luatex,"exe")
mtxrun = addsuffix(mtxrun,"exe")
context = addsuffix(context,"exe")
end
local luametatexbin = joinfile(binpath,luametatex)
+ local luatexbin = joinfile(binpath,luatex)
local mtxrunbin = joinfile(binpath,mtxrun)
local contextbin = joinfile(binpath,context)
@@ -552,6 +566,11 @@ function install.update()
else
-- report("xbit bad : %s",luametatexbin)
end
+ if lfs.setexecutable(luatexbin) then
+ report("xbit set : %s",luatexbin)
+ else
+ -- report("xbit bad : %s",luatexbin)
+ end
if lfs.setexecutable(mtxrunbin) then
report("xbit set : %s",mtxrunbin)
else
@@ -570,7 +589,6 @@ function install.update()
end
run("%s --make en", contextbin)
-
-- in calling script: update mtxrun.exe and mtxrun.lua
report("")
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-interface.lua b/Master/texmf-dist/scripts/context/lua/mtx-interface.lua
index 85ccb3ca0ad..a335560fa56 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-interface.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-interface.lua
@@ -36,6 +36,7 @@ local helpinfo = [[
<flag name="raw"><short>report commands to the console</short></flag>
<flag name="check"><short>generate check file</short></flag>
<flag name="meaning"><short>report the mening of commands</short></flag>
+ <flag name="tokens"><short>show the internal representation of commands</short></flag>
</subcategory>
<subcategory>
<flag name="toutf"><short>replace named characters by utf</short></flag>
@@ -168,6 +169,10 @@ function flushers.raw(collected)
end
end
+function flushers.data(collected)
+ return collected -- table.save("cont-en-filenames.lua",collected.filenames)
+end
+
local textpadcreator = "mtx-interface-textpad.lua"
function flushers.text(collected)
@@ -256,9 +261,10 @@ end
function scripts.interface.editor(editor,split,forcedinterfaces)
require("char-def")
- local interfaces = forcedinterfaces or environment.files
- if #interfaces == 0 then
- interfaces= userinterfaces
+ local interfaces = forcedinterfaces or environment.files or userinterfaces
+ if not interfaces.en then
+ -- loaded as script so we have "cont-yes.*" as name
+ interfaces = { "en" }
end
--
-- local filename = "i-context.xml"
@@ -376,13 +382,13 @@ function scripts.interface.editor(editor,split,forcedinterfaces)
end
-- skip (for now)
elseif type ~= "environment" then
- i_commands[n] = true
+ i_commands[n] = at.file or true
elseif split then
- i_environments[n] = true
+ i_environments[n] = at.file or true
else
-- variables ?
- i_commands[start..n] = true
- i_commands[stop ..n] = true
+ i_commands[start..n] = at.file or true
+ i_commands[stop ..n] = at.file or true
end
end
end
@@ -419,6 +425,19 @@ function scripts.interface.editor(editor,split,forcedinterfaces)
end
end
end
+ local filenames = { }
+ if collected.en then
+ for k, v in next, collected.en.commands do
+ if v ~= true then
+ filenames[k] = v
+ end
+ end
+ for k, v in next, collected.en.environments do
+ if v ~= true then
+ filenames[k] = v
+ end
+ end
+ end
for k, v in next, collected do
local c = v.commands
local e = v.environments
@@ -460,9 +479,13 @@ function scripts.interface.editor(editor,split,forcedinterfaces)
mathnames = sortedkeys(mathnames),
commands = sortedkeys(commoncommands),
environments = sortedkeys(commonenvironments),
+ filenames = filenames,
}
--
- flushers[editor](collected)
+ local flusher = flushers[editor]
+ if flusher then
+ return flusher(collected)
+ end
end
function scripts.interface.check()
@@ -690,6 +713,26 @@ function scripts.interface.meaning()
end
end
+function scripts.interface.tokens()
+ local runner = "mtxrun --silent --script context --extra=meaning --tokens --once --noconsole --nostatistics"
+ local pattern = environment.arguments.pattern
+ local files = environment.files
+ if type(pattern) == "string" then
+ runner = runner .. ' --pattern="' .. pattern .. '"'
+ elseif files and #files > 0 then
+ for i=1,#files do
+ runner = runner .. ' "' .. files[i] .. '"'
+ end
+ else
+ return
+ end
+ local r = os.resultof(runner)
+ if type(r) == "string" then
+ r = gsub(r,"^.-(tokens%s+>)","\n%1")
+ print(r)
+ end
+end
+
local ea = environment.argument
if ea("mkii") then
@@ -698,6 +741,8 @@ elseif ea("preprocess") then
scripts.interface.preprocess()
elseif ea("meaning") then
scripts.interface.meaning()
+elseif ea("tokens") then
+ scripts.interface.tokens()
elseif ea("toutf") then
scripts.interface.toutf()
elseif ea("bidi") then
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-kpse.lua b/Master/texmf-dist/scripts/context/lua/mtx-kpse.lua
new file mode 100644
index 00000000000..7542751ac5f
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/lua/mtx-kpse.lua
@@ -0,0 +1,124 @@
+if not modules then modules = { } end modules ['mtx-kpse'] = {
+ version = 1.001,
+ comment = "companion to mtxrun.lua",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- I decided to make this module after a report on the mailing list about
+-- a clash with texmf-var on a system that had texlive installed. One way
+-- to figure that out is to use kpse. We had the code anyway so next time
+-- there is some issue ...
+
+trackers.enable("resolvers.lib.silent")
+
+local kpse = LUATEXENGINE == "luametatex" and require("libs-imp-kpse.lmt")
+
+if type(kpse) ~= "table" then
+ return
+end
+
+local helpinfo = [[
+<?xml version="1.0"?>
+<application>
+ <metadata>
+ <entry name="name">mtx-kpse</entry>
+ <entry name="detail">ConTeXt KPSE checking utility</entry>
+ <entry name="version">1.00</entry>
+ </metadata>
+ <flags>
+ <category name="basic">
+ <subcategory>
+ <flag name="progname"><short>mandate, set the program name (e.g. pdftex)</short></flag>
+ <flag name="findfile"><short>report the fully qualified path of the given file</short></flag>
+ <flag name="findfiles"><short>report a list of all full names of the given file</short></flag>
+ <flag name="expandpath"><short>expand the given path variable</short></flag>
+ <flag name="expandvar"><short>expand a variable</short></flag>
+ <flag name="expandbraces"><short>expand a complex variable specification</short></flag>
+ <flag name="varvalue"><short>show the value of a variable</short></flag>
+ <flag name="readablefile"><short>report if a file is readable</short></flag>
+ <flag name="filetypes"><short>list all supported formats</short></flag>
+ </subcategory>
+ </category>
+ <category name="additional">
+ <subcategory>
+ <flag name="format"><short>format type</short></flag>
+ <flag name="path"><short>path variable</short></flag>
+ <flag name="split"><short>split result in lines</short></flag>
+ </subcategory>
+ </category>
+ </flags>
+ <examples>
+ <category>
+ <title>Examples</title>
+ <subcategory>
+ <example><command>mtxrun --script kpse --progname=pdftex --findfile context.mkii</command></example>
+ <example><command>mtxrun --script kpse --progname=pdftex --findfile context.mkii --format=tex</command></example>
+ <example><command>mtxrun --script kpse --progname=pdftex --findfiles context.mkii --path=$TEXINPUTS</command></example>
+ </subcategory>
+ <subcategory>
+ <example><command>mtxrun --script kpse --progname=pdftex --expandpath $TEXMFVAR</command></example>
+ <example><command>mtxrun --script kpse --progname=pdftex --expandpath $TEXINPUTS -- split</command></example>
+ </subcategory>
+ </category>
+ </examples>
+</application>
+]]
+
+local application = logs.application {
+ name = "mtx-kpse",
+ banner = "ConTeXt KPSE checking utility",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+local argument = environment.argument
+local files = environment.files
+local target = files[1]
+
+if argument("progname") or argument("programname") then
+ kpse.set_program_name(argument("progname"))
+else
+ application.help()
+ return
+end
+
+local function printtable(result)
+ if type(result) == "table" then
+ for i=1,#result do
+ print(result[i])
+ end
+ end
+end
+
+if argument("exporthelp") then
+ application.export(environment.argument("exporthelp"),target)
+elseif argument("filetypes") or argument("formats") then
+ print(table.concat(kpse.get_file_types()," "))
+elseif type(target) == "string" and target ~= "" then
+ if argument("findfiles") or argument("find-files") then
+ printtable(kpse.find_files(argument("path"),target))
+ elseif argument("findfile") or argument("find-file") then
+ print(kpse.find_file(target,argument("format")))
+ elseif argument("expandpath") or argument("expand-path") then
+ local result = kpse.expand_path(target)
+ if result and argument("split") then
+ printtable(string.split(result,";"))
+ else
+ print(result)
+ end
+ elseif argument("expandvar") or argument("expand-var") then
+ print(kpse.expand_var(target))
+ elseif argument("expandbraces") or argument("expand-braces") then
+ print(kpse.expand_braces(target))
+ elseif argument("varvalue") or argument("var-value") then
+ print(kpse.var_value(target))
+ elseif argument("readablefile") or argument("readable-file") then
+ print(kpse.readable_file(target))
+ else
+ application.help()
+ end
+else
+ application.help()
+end
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-patterns.lua b/Master/texmf-dist/scripts/context/lua/mtx-patterns.lua
index 37843a6b604..36b60192d28 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-patterns.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-patterns.lua
@@ -107,7 +107,7 @@ scripts.patterns.list = {
{ "agr", "hyph-grc", "ancient greek", ignored_ancient_greek },
{ "gb", "hyph-en-gb", "british english" },
{ "us", "hyph-en-us", "american english" },
- -- { "eo", "hyph-eo", "esperanto" },
+ { "eo", "hyph-eo", "esperanto" },
{ "es", "hyph-es", "spanish" },
{ "et", "hyph-et", "estonian" },
{ "eu", "hyph-eu", "basque" },
@@ -150,7 +150,8 @@ scripts.patterns.list = {
-- { "sa", "hyph-sa", "sanskrit" },
{ "sk", "hyph-sk", "slovak" },
{ "sl", "hyph-sl", "slovenian" },
- { "sr", "hyph-sr-cyrl", "serbian" },
+ { "sr", "hyph-sr", "serbian", false, { "hyph-sr-cyrl", "hyph-sr-latn" }, },
+ -- { "sr", "hyph-sr-cyrl", "serbian", false },
-- { "sr", "hyph-sr-latn", "serbian" },
{ "sv", "hyph-sv", "swedish" },
-- { "ta", "hyph-ta", "tamil" },
@@ -171,23 +172,32 @@ end
-- *.tex
-- *.hyp.txt *.pat.txt *.lic.txt *.chr.txt
-function scripts.patterns.load(path,name,mnemonic,ignored)
- local basename = name
+function scripts.patterns.load(path,name,mnemonic,ignored, merged)
local fullname = file.join(path,name)
- local texfile = addsuffix(fullname,"tex")
- local hypfile = addsuffix(fullname,"hyp.txt")
- local patfile = addsuffix(fullname,"pat.txt")
- local licfile = addsuffix(fullname,"lic.txt")
- -- local chrfile = addsuffix(fullname,"chr.txt")
+ local basename = name
+ local texfile = addsuffix(fullname,"tex")
+ local hypfile = addsuffix(fullname,"hyp.txt")
+ local patfile = addsuffix(fullname,"pat.txt")
+ local licfile = addsuffix(fullname,"lic.txt")
+ -- local chrfile = addsuffix(fullname,"chr.txt")
local okay = true
local hyphenations, patterns, comment, stripset = "", "", "", ""
local splitpatternsnew, splithyphenationsnew = { }, { }
local splitpatternsold, splithyphenationsold = { }, { }
local usedpatterncharactersnew, usedhyphenationcharactersnew = { }, { }
- if lfs.isfile(patfile) then
+ if merged then
+ report("using merged txt files %s.[hyp|pat|lic].txt",name)
+ for i=1,#merged do
+ local fullname = file.join(path,merged[i])
+ comment = comment .. (io.loaddata(addsuffix(fullname,"lic.txt")) or "") .. "\n\n"
+ patterns = patterns .. (io.loaddata(addsuffix(fullname,"pat.txt")) or "") .. "\n\n"
+ hyphenations = hyphenations .. (io.loaddata(addsuffix(fullname,"hyp.txt")) or "") .. "\n\n"
+ end
+ elseif lfs.isfile(patfile) then
report("using txt files %s.[hyp|pat|lic].txt",name)
- comment, patterns, hyphenations = io.loaddata(licfile) or "", io.loaddata(patfile) or "", io.loaddata(hypfile) or ""
- hypfile, patfile, licfile = hypfile, patfile, licfile
+ comment = io.loaddata(licfile) or ""
+ patterns = io.loaddata(patfile) or ""
+ hyphenations = io.loaddata(hypfile) or ""
elseif lfs.isfile(texfile) then
report("using tex file %s.txt",name)
local data = io.loaddata(texfile) or ""
@@ -203,9 +213,9 @@ function scripts.patterns.load(path,name,mnemonic,ignored)
end)
data = gsub(data,"%%.-[\n\r]","")
data = gsub(data," *[\n\r]+","\n")
- patterns = match(data,"\\patterns[%s]*{[%s]*(.-)[%s]*}") or ""
+ patterns = match(data,"\\patterns[%s]*{[%s]*(.-)[%s]*}") or ""
hyphenations = match(data,"\\hyphenation[%s]*{[%s]*(.-)[%s]*}") or ""
- comment = match(data,"^(.-)[\n\r]\\patterns") or ""
+ comment = match(data,"^(.-)[\n\r]\\patterns") or ""
else
okay = false
end
@@ -514,10 +524,10 @@ function scripts.patterns.check()
only = table.tohash(files)
end
for k, v in next, scripts.patterns.list do
- local mnemonic, name, ignored = v[1], v[2], v[4]
+ local mnemonic, name, ignored, merged = v[1], v[2], v[4], v[5]
if not only or only[mnemonic] then
report("checking language %s, file %s", mnemonic, name)
- local okay = scripts.patterns.load(path,name,mnemonic,ignored)
+ local okay = scripts.patterns.load(path,name,mnemonic,ignored, merged)
if not okay then
report("there are errors that need to be fixed")
end
@@ -541,11 +551,11 @@ function scripts.patterns.convert()
only = table.tohash(files)
end
for k, v in next, scripts.patterns.list do
- local mnemonic, name, ignored = v[1], v[2], v[4]
+ local mnemonic, name, ignored, merged = v[1], v[2], v[4], v[5]
if not only or only[mnemonic] then
report("converting language %s, file %s", mnemonic, name)
local okay, patternsnew, hyphenationsnew, patternsold, hyphenationsold, comment, stripped,
- pusednew, husednew, pusedold, husedold = scripts.patterns.load(path,name,mnemonic,ignored)
+ pusednew, husednew, pusedold, husedold = scripts.patterns.load(path,name,mnemonic,ignored,merged)
if okay then
scripts.patterns.save(destination,mnemonic,name,patternsnew,hyphenationsnew,patternsold,hyphenationsold,comment,stripped,
pusednew,husednew,pusedold,husedold,ignored)
@@ -689,8 +699,8 @@ end
-- mtxrun --script pattern --check hyph-*.tex
-- mtxrun --script pattern --check --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns
--- mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/tex --destination=e:/tmp/patterns
--- mtxrun --script pattern --convert --path=c:/data/repositories/tex-hyphen/hyph-utf8/tex/generic/hyph-utf8/patterns/tex --destination=e:/tmp/patterns
+-- mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/txt --destination=e:/tmp/patterns
+-- mtxrun --script pattern --convert --path=c:/data/repositories/tex-hyphen/hyph-utf8/tex/generic/hyph-utf8/patterns/txt --destination=e:/tmp/patterns
--
-- use this call:
--
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-scite.lua b/Master/texmf-dist/scripts/context/lua/mtx-scite.lua
index 96020de3dba..b5360770e41 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-scite.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-scite.lua
@@ -251,11 +251,11 @@ function scripts.scite.tree()
local source = environment.argument("source")
local target = environment.argument("target")
local numbers = environment.argument("numbers")
- if not lfs.isdir(source) then
+ if not source or not lfs.isdir(source) then
report("you need to pass a valid source path with --source")
return
end
- if not lfs.isdir(target) then
+ if not target or not lfs.isdir(target) then
report("you need to pass a valid target path with --target")
return
end
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-timing.lua b/Master/texmf-dist/scripts/context/lua/mtx-timing.lua
deleted file mode 100644
index 5ba361e5f1a..00000000000
--- a/Master/texmf-dist/scripts/context/lua/mtx-timing.lua
+++ /dev/null
@@ -1,218 +0,0 @@
-if not modules then modules = { } end modules ['mtx-timing'] = {
- version = 1.002,
- comment = "companion to mtxrun.lua",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local format, gsub, concat = string.format, string.gsub, table.concat
-
-local helpinfo = [[
-<?xml version="1.0"?>
-<application>
- <metadata>
- <entry name="name">mtx-timing</entry>
- <entry name="detail">ConTeXt Timing Tools</entry>
- <entry name="version">0.10</entry>
- </metadata>
- <flags>
- <category name="basic">
- <subcategory>
- <flag name="xhtml"><short>make xhtml file</short></flag>
- <flag name="launch"><short>launch after conversion</short></flag>
- <flag name="remove"><short>remove after launching</short></flag>
- </subcategory>
- </category>
- </flags>
-</application>
-]]
-
-local application = logs.application {
- name = "mtx-timing",
- banner = "ConTeXt Timing Tools 0.10",
- helpinfo = helpinfo,
-}
-
-local report = application.report
-
-dofile(resolvers.findfile("node-snp.lua","tex"))
-dofile(resolvers.findfile("trac-tim.lua","tex"))
-dofile(resolvers.findfile("trac-lmx.lua","tex"))
-
-local meta = [[
- beginfig(%s) ;
- begingroup ;
- save p, q, b, h, w ;
- path p, q, b ; numeric h, w ;
- linecap := butt ;
- h := 100 ;
- w := 800pt ;
- p := %s ;
- q := %s ;
- p := p shifted -llcorner p ;
- q := q shifted -llcorner q ;
- q := q xstretched w ;
- p := p xstretched w ;
- b := boundingbox (llcorner p -- llcorner p shifted (w,h)) ;
- draw b withcolor white withpen pencircle scaled 4pt ;
- draw p withcolor red withpen pencircle scaled 4pt ;
- draw q withcolor blue withpen pencircle scaled 2pt ;
- endgroup ;
- endfig ;
-]]
-
-local html_graphic = [[
- <h1><a name='graphic-%s'>%s (red) %s (blue)</a></h1>
- <table>
- <tr>
- <td>%s</td>
- <td valign='top'>
- &nbsp;&nbsp;min: %s<br/>
- &nbsp;&nbsp;max: %s<br/>
- &nbsp;&nbsp;pages: %s<br/>
- &nbsp;&nbsp;average: %s<br/>
- </td>
- </tr>
- </table>
- <br/>
-]]
-
-local html_menu = [[
- <a href='#graphic-%s'>%s</a>
-]]
-
-local directrun = true
-
-local what = { "parameters", "nodes" }
-
-plugins = plugins or { progress = { } } -- brrr, will become moduledata as well
-
-function plugins.progress.make_svg(filename,other)
- local metadata, menudata, c = { }, { }, 0
- metadata[#metadata+1] = 'outputformat := "svg" ;'
- for i=1,#what do
- local kind, mdk = what[i], { }
- menudata[kind] = mdk
- for n, name in next, plugins.progress[kind](filename) do
- local first = plugins.progress.path(filename,name)
- local second = plugins.progress.path(filename,other)
- c = c + 1
- metadata[#metadata+1] = format(meta,c,first,second)
- mdk[#mdk+1] = { name, c }
- end
- end
- metadata[#metadata+1] = "end ."
- metadata = concat(metadata,"\n\n")
- if directrun then
- dofile(resolvers.findfile("mlib-run.lua","tex"))
- commands = commands or { }
- commands.writestatus = report
- local result = metapost.directrun("metafun","timing data","svg",true,metadata)
- return menudata, result
- else
- local mpname = file.replacesuffix(filename,"mp")
- io.savedata(mpname,metadata)
- os.execute(format("mpost --progname=context --mem=metafun.mem %s",mpname))
- os.remove(mpname)
- os.remove(file.removesuffix(filename).."-mpgraph.mpo") -- brr
- os.remove(file.removesuffix(filename)..".log") -- brr
- return menudata
- end
-end
-
-function plugins.progress.makehtml(filename,other,menudata,metadata)
- local graphics = { }
- local result = { graphics = graphics }
- for i=1,#what do
- local kind, menu = what[i], { }
- local md = menudata[kind]
- result[kind] = menu
- for k=1,#md do
- local v = md[k]
- local name, number = v[1], v[2]
- local min = plugins.progress.bot(filename,name)
- local max = plugins.progress.top(filename,name)
- local pages = plugins.progress.pages(filename)
- local average = math.round(max/pages)
- if directrun then
- local data = metadata[number]
- menu[#menu+1] = format(html_menu,name,name)
- graphics[#graphics+1] = format(html_graphic,name,name,other,data,min,max,pages,average)
- else
- local mpname = file.replacesuffix(filename,number)
- local data = io.loaddata(mpname) or ""
- -- data = gsub(data,"<!%-%-(.-)%-%->[\n\r]*","")
- data = gsub(data,"<%?xml.->","")
- menu[#menu+1] = format(html_menu,name,name)
- graphics[#graphics+1] = format(html_graphic,name,name,other,data,min,max,pages,average)
- os.remove(mpname)
- end
- end
- end
- return result
-end
-
-function plugins.progress.valid_file(name)
- return name and name ~= "" and lfs.isfile(name .. "-luatex-progress.lut")
-end
-
-function plugins.progress.make_lmx_page(name,launch,remove)
-
- local filename = name .. "-luatex-progress"
- local other = "elapsed_time"
- local template = 'context-timing.lmx'
-
- plugins.progress.convert(filename)
-
- local menudata, metadata = plugins.progress.make_svg(filename,other)
- local htmldata = plugins.progress.makehtml(filename,other,menudata,metadata)
-
- lmx.htmfile = function(name) return name .. "-timing.xhtml" end
- lmx.lmxfile = function(name) return resolvers.findfile(name,'tex') end
-
- local variables = {
- ['title-default'] = 'ConTeXt Timing Information',
- ['title'] = format('ConTeXt Timing Information: %s',file.basename(name)),
- ['parametersmenu'] = concat(htmldata.parameters, "&nbsp;&nbsp;"),
- ['nodesmenu'] = concat(htmldata.nodes, "&nbsp;&nbsp;"),
- ['graphics'] = concat(htmldata.graphics, "\n\n"),
- ['color-background-one'] = lmx.get('color-background-green'),
- ['color-background-two'] = lmx.get('color-background-blue'),
- }
-
- if launch then
- local htmfile = lmx.show(template,variables)
- if remove then
- os.sleep(1) -- give time to launch
- os.remove(htmfile)
- end
- else
- lmx.make(template,variables)
- end
-
-end
-
-scripts = scripts or { }
-scripts.timings = scripts.timings or { }
-
-function scripts.timings.xhtml(filename)
- if filename == "" then
- report("provide filename")
- elseif not plugins.progress.valid_file(filename) then
- report("first run context again with the --timing option")
- else
- local basename = file.removesuffix(filename)
- local launch = environment.argument("launch")
- local remove = environment.argument("remove")
- plugins.progress.make_lmx_page(basename,launch,remove)
- end
-end
-
-if environment.argument("xhtml") then
- scripts.timings.xhtml(environment.files[1] or "")
-elseif environment.argument("exporthelp") then
- application.export(environment.argument("exporthelp"),environment.files[1])
-else
- application.help()
-end
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua b/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua
index 297807889e4..060e563c642 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-unicode.lua
@@ -146,6 +146,8 @@ function scripts.unicode.update()
local index = texttables.index
local characterdata = characters.data
--
+ local descriptions = { }
+ --
for unicode, ud in table.sortedpairs(unicodedata) do
if not skipped[unicode] then
local char = rawget(characterdata,unicode)
@@ -162,6 +164,7 @@ function scripts.unicode.update()
local cjkwd = ed and lower(ed[2] or "n")
local mirror = bd and tonumber(bd[2],16)
local arabic = nil
+ descriptions[description] = unicode
if sparse and direction == "l" then
direction = nil
end
@@ -382,6 +385,26 @@ function scripts.unicode.update()
end
end
end
+ -- we need the hash .. add missing specials
+ for unicode, data in table.sortedhash(characterdata) do
+ if not data.specials or data.comment and find(data.comment,"check special") then
+ local description = data.description
+ local b, m = match(description,"^(.+) WITH (.+)$")
+ if b and m and (find(b,"^LATIN") or find (b,"^CYRILLIC")) then
+ local base = descriptions[b]
+ local mark = descriptions[m]
+ if not mark and m == "STROKE" then
+ mark = descriptions["SOLIDUS"] -- SLASH
+ end
+ if base and mark then
+ report("adding extra char special for %a",description)
+ data.specials = { "with", base, mark }
+ data.comment = nil
+ end
+ end
+ end
+ end
+ --
for i=1,#standardizedvariants do
local si = standardizedvariants[i]
local pair, addendum = si[1], strip(si[2])
@@ -519,6 +542,10 @@ function scripts.unicode.load()
arabicshaping = splitdefinition(textdata.arabicshaping,true),
index = splitindex(textdata.index),
}
+ --
+ for k, v in table.sortedhash(textfiles) do
+ report("using: %s",v)
+ end
return true
else
preamble = nil
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-update.lua b/Master/texmf-dist/scripts/context/lua/mtx-update.lua
index e03012901da..b0ed9aac7e2 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-update.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-update.lua
@@ -238,9 +238,9 @@ update.platforms = {
--
["linux-armhf"] = "linux-armhf",
--
- ["openbsd"] = "openbsd6.5",
- ["openbsd-i386"] = "openbsd6.5",
- ["openbsd-amd64"] = "openbsd6.5-amd64",
+ ["openbsd"] = "openbsd6.8",
+ ["openbsd-i386"] = "openbsd6.8",
+ ["openbsd-amd64"] = "openbsd6.8-amd64",
--
["freebsd"] = "freebsd",
["freebsd-i386"] = "freebsd",
@@ -266,6 +266,7 @@ update.platforms = {
["macosx"] = "osx-64",
["osx"] = "osx-64",
["osx-64"] = "osx-64",
+ ["osx-arm64"] = "osx-64",
--
-- ["solaris-intel"] = "solaris-intel",
--
diff --git a/Master/texmf-dist/scripts/context/lua/mtxrun.lua b/Master/texmf-dist/scripts/context/lua/mtxrun.lua
index 6eaf5ff449f..6fc17adb022 100755
--- a/Master/texmf-dist/scripts/context/lua/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtxrun.lua
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -852,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11605, stripped down to: 8299
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -861,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -891,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -907,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1040,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1082,11 +1087,18 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
methods["preload table"]=function(name)
- return builtin["preload table"](name)
+ local f=builtin["preload table"]
+ if f then
+ return f(name)
+ end
end
methods["qualified path"]=function(name)
return loadedbyname(addsuffix(lualibfile(name),"lua"),name)
@@ -1098,19 +1110,31 @@ methods["lib extra list"]=function(name)
return loadedbypath(addsuffix(lualibfile(name),os.libsuffix),name,getextralibpaths(),true,"lib")
end
methods["path specification"]=function(name)
- getluapaths()
- return builtin["path specification"](name)
+ local f=builtin["path specification"]
+ if f then
+ getluapaths()
+ return f(name)
+ end
end
methods["cpath specification"]=function(name)
- getlibpaths()
- return builtin["cpath specification"](name)
+ local f=builtin["cpath specification"]
+ if f then
+ getlibpaths()
+ return f(name)
+ end
end
methods["all in one fallback"]=function(name)
- return builtin["all in one fallback"](name)
+ local f=builtin["all in one fallback"]
+ if f then
+ return f(name)
+ end
end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -1122,19 +1146,22 @@ function helpers.loaded(name)
level=level+1
for i=1,#sequence do
local method=sequence[i]
- if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
- end
- local result,rest=methods[method](name)
- if type(result)=="function" then
+ local lookup=method and methods[method]
+ if type(lookup)=="function" then
if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
end
- if helpers.traceused then
- used[#used+1]={ level=level,name=name }
+ local result,rest=lookup(name)
+ if type(result)=="function" then
+ if helpers.trace then
+ helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
+ level=level-1
+ return result,rest
end
- level=level-1
- return result,rest
end
end
level=level-1
@@ -1174,7 +1201,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 38440, stripped down to: 19316
+-- original size: 38703, stripped down to: 19489
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1272,11 +1299,13 @@ local fullstripper=whitespace^0*C((whitespace^0*nonwhitespace^1)^0)
local collapser=Cs(spacer^0/""*nonspacer^0*((spacer^0/" "*nonspacer^1)^0))
local nospacer=Cs((whitespace^1/""+nonwhitespace^1)^0)
local b_collapser=Cs(whitespace^0/""*(nonwhitespace^1+whitespace^1/" ")^0)
-local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
local m_collapser=Cs((nonwhitespace^1+whitespace^1/" ")^0)
+local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
+local x_collapser=Cs((nonwhitespace^1+whitespace^1/"" )^0)
local b_stripper=Cs(spacer^0/""*(nonspacer^1+spacer^1/" ")^0)
-local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
local m_stripper=Cs((nonspacer^1+spacer^1/" ")^0)
+local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
+local x_stripper=Cs((nonspacer^1+spacer^1/"" )^0)
patterns.stripper=stripper
patterns.fullstripper=fullstripper
patterns.collapser=collapser
@@ -1284,9 +1313,11 @@ patterns.nospacer=nospacer
patterns.b_collapser=b_collapser
patterns.m_collapser=m_collapser
patterns.e_collapser=e_collapser
+patterns.x_collapser=x_collapser
patterns.b_stripper=b_stripper
patterns.m_stripper=m_stripper
patterns.e_stripper=e_stripper
+patterns.x_stripper=x_stripper
patterns.lowercase=lowercase
patterns.uppercase=uppercase
patterns.letter=patterns.lowercase+patterns.uppercase
@@ -3806,7 +3837,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 19120, stripped down to: 10208
+-- original size: 19409, stripped down to: 10419
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4029,6 +4060,8 @@ elseif name=="macosx" then
platform="osx-intel"
elseif find(architecture,"x86_64",1,true) then
platform="osx-64"
+ elseif find(architecture,"arm64",1,true) then
+ platform="osx-64"
else
platform="osx-ppc"
end
@@ -4200,11 +4233,19 @@ local function isleapyear(year)
end
os.isleapyear=isleapyear
local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
-local function nofdays(year,month)
+local function nofdays(year,month,day)
if not month then
return isleapyear(year) and 365 or 364
- else
+ elseif not day then
return month==2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day=day+days[i]
+ end
+ if month>2 and isleapyear(year) then
+ day=day+1
+ end
+ return day
end
end
os.nofdays=nofdays
@@ -5729,10 +5770,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-unicode"] = package.loaded["l-unicode"] or true
--- original size: 41281, stripped down to: 17261
+-- original size: 41303, stripped down to: 17277
if not modules then modules={} end modules ['l-unicode']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -6563,7 +6605,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 45153, stripped down to: 22734
+-- original size: 45129, stripped down to: 23525
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -6615,25 +6657,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -6911,7 +6987,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -7106,10 +7184,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -7219,33 +7305,36 @@ local format_extension=function(extensions,f,name)
local extension=extensions[name] or "tostring(%s)"
local f=tonumber(f) or 1
local w=find(extension,"%.%.%.")
- if w then
- if f==0 then
+ if f==0 then
+ if w then
extension=gsub(extension,"%.%.%.","")
- return extension
- elseif f==1 then
+ end
+ return extension
+ elseif f==1 then
+ if w then
extension=gsub(extension,"%.%.%.","%%s")
- n=n+1
- local a="a"..n
- return format(extension,a,a)
- elseif f<0 then
+ end
+ n=n+1
+ local a="a"..n
+ return format(extension,a,a)
+ elseif f<0 then
+ if w then
+ extension=gsub(extension,"%.%.%.","")
+ return extension
+ else
local a="a"..(n+f+1)
return format(extension,a,a)
- else
- extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- local t={}
- for i=1,f do
- n=n+1
- t[i]="a"..n
- end
- return format(extension,unpack(t))
end
else
- extension=gsub(extension,"%%s",function()
+ if w then
+ extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ local t={}
+ for i=1,f do
n=n+1
- return "a"..n
- end)
- return extension
+ t[i]="a"..n
+ end
+ return format(extension,unpack(t))
end
end
local builder=Cs { "start",
@@ -7259,7 +7348,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -7297,7 +7386,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -7448,7 +7539,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 32649, stripped down to: 18257
+-- original size: 32815, stripped down to: 18257
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8194,10 +8285,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 11530, stripped down to: 9007
+-- original size: 11552, stripped down to: 9023
if not modules then modules={} end modules ['util-fil']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -8562,10 +8654,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 12946, stripped down to: 9507
+-- original size: 12968, stripped down to: 9523
if not modules then modules={} end modules ['util-sac']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -9215,7 +9308,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 24132, stripped down to: 16210
+-- original size: 24683, stripped down to: 16431
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9228,7 +9321,7 @@ local lpeg,table,string=lpeg,table,string
local P,R,V,S,C,Ct,Cs,Carg,Cc,Cg,Cf,Cp=lpeg.P,lpeg.R,lpeg.V,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.Carg,lpeg.Cc,lpeg.Cg,lpeg.Cf,lpeg.Cp
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local concat,gmatch,find=table.concat,string.gmatch,string.find
-local tostring,type,next,rawset=tostring,type,next,rawset
+local tonumber,tostring,type,next,rawset=tonumber,tostring,type,next,rawset
local mod,div=math.mod,math.div
utilities=utilities or {}
local parsers=utilities.parsers or {}
@@ -9620,13 +9713,15 @@ function parsers.csvsplitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
local separator=specification.separator
local quotechar=specification.quote
+ local numbers=specification.numbers
local separator=S(separator~="" and separator or ",")
local whatever=C((1-separator-newline)^0)
if quotechar and quotechar~="" then
local quotedata=nil
for chr in gmatch(quotechar,".") do
local quotechar=P(chr)
- local quoteword=quotechar*C((1-quotechar)^0)*quotechar
+ local quoteitem=(1-quotechar)^0
+ local quoteword=quotechar*(numbers and (quoteitem/tonumber) or C(quoteitem))*quotechar
if quotedata then
quotedata=quotedata+quoteword
else
@@ -9642,12 +9737,14 @@ function parsers.csvsplitter(specification)
end
function parsers.rfc4180splitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
+ local numbers=specification.numbers
local separator=specification.separator
local quotechar=P(specification.quote)
local dquotechar=quotechar*quotechar
/specification.quote
local separator=S(separator~="" and separator or ",")
- local escaped=quotechar*Cs((dquotechar+(1-quotechar))^0)*quotechar
+ local whatever=(dquotechar+(1-quotechar))^0
+ local escaped=quotechar*(numbers and (whatever/tonumber) or Cs(whatever))*quotechar
local non_escaped=C((1-quotechar-newline-separator)^1)
local field=escaped+non_escaped+Cc("")
local record=Ct(field*(separator*field)^1)
@@ -11718,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11763,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11773,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11799,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11810,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -12712,7 +12809,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-set"] = package.loaded["trac-set"] or true
--- original size: 13394, stripped down to: 8882
+-- original size: 13901, stripped down to: 9175
if not modules then modules={} end modules ['trac-set']={
version=1.001,
@@ -12735,7 +12832,7 @@ utilities.setters=setters
local data={}
local trace_initialize=false
local frozen=true
-function setters.initialize(filename,name,values)
+local function initialize_setter(filename,name,values)
local setter=data[name]
if setter then
local data=setter.data
@@ -12776,8 +12873,8 @@ function setters.initialize(filename,name,values)
end
end
local function set(t,what,newvalue)
- local data=t.data
- if not data.frozen then
+ local data=t.data
+ if data and not data.frozen then
local done=t.done
if type(what)=="string" then
what=settings_to_hash(what)
@@ -12813,7 +12910,7 @@ local function set(t,what,newvalue)
end
local function reset(t)
local data=t.data
- if not data.frozen then
+ if data and not data.frozen then
for name,functions in sortedthash(data) do
for i=1,#functions do
functions[i](false)
@@ -12834,7 +12931,7 @@ local function disable(t,what)
set(t,what,false)
end
end
-function setters.register(t,what,...)
+local function register_setter(t,what,...)
local data=t.data
what=lower(what)
local functions=data[what]
@@ -12869,23 +12966,24 @@ function setters.register(t,what,...)
end
return false
end
-function setters.enable(t,what)
+local function enable_setter(t,what)
local e=t.enable
t.enable,t.done=enable,{}
+ set(t,what,true)
enable(t,what)
t.enable,t.done=e,{}
end
-function setters.disable(t,what)
+local function disable_setter(t,what)
local e=t.disable
t.disable,t.done=disable,{}
disable(t,what)
t.disable,t.done=e,{}
end
-function setters.reset(t)
+local function reset_setter(t)
t.done={}
reset(t)
end
-function setters.list(t)
+local function list_setter(t)
local list=table.sortedkeys(t.data)
local user,system={},{}
for l=1,#list do
@@ -12898,8 +12996,8 @@ function setters.list(t)
end
return user,system
end
-function setters.show(t)
- local list=setters.list(t)
+local function show_setter(t)
+ local list=list_setter(t)
t.report()
for k=1,#list do
local name=list[k]
@@ -12930,39 +13028,50 @@ function setters.show(t)
end
end
end
-local enable,disable,register,list,show=setters.enable,setters.disable,setters.register,setters.list,setters.show
function setters.report(setter,fmt,...)
- print(formatters["%-15s : %s\n"](setter.name,formatters[fmt](...)))
+ if fmt then
+ print(formatters["%-15s : %s"](setter.name,formatters[fmt](...)))
+ else
+ print("")
+ end
end
-local function default(setter,name)
+local function setter_default(setter,name)
local d=setter.data[name]
return d and d.default
end
-local function value(setter,name)
+local function setter_value(setter,name)
local d=setter.data[name]
return d and (d.value or d.default)
end
-function setters.new(name)
+local function new_setter(name)
local setter
setter={
data=allocate(),
name=name,
- report=function(...) setters.report (setter,...) end,
- enable=function(...) enable (setter,...) end,
- disable=function(...) disable (setter,...) end,
- reset=function(...) reset (setter,...) end,
- register=function(...) register(setter,...) end,
- list=function(...) return list (setter,...) end,
- show=function(...) show (setter,...) end,
- default=function(...) return default (setter,...) end,
- value=function(...) return value (setter,...) end,
+ report=function(...) setters.report (setter,...) end,
+ enable=function(...) enable_setter (setter,...) end,
+ disable=function(...) disable_setter (setter,...) end,
+ reset=function(...) reset_setter (setter,...) end,
+ register=function(...) register_setter(setter,...) end,
+ list=function(...) return list_setter (setter,...) end,
+ show=function(...) show_setter (setter,...) end,
+ default=function(...) return setter_default (setter,...) end,
+ value=function(...) return setter_value (setter,...) end,
}
data[name]=setter
return setter
end
-trackers=setters.new("trackers")
-directives=setters.new("directives")
-experiments=setters.new("experiments")
+setters.enable=enable_setter
+setters.disable=disable_setter
+setters.register=register_setter
+setters.list=list_setter
+setters.show=show_setter
+setters.reset=reset_setter
+setters.new=new_setter
+setters.initialize=initialize_setter
+trackers=new_setter("trackers")
+directives=new_setter("directives")
+experiments=new_setter("experiments")
local t_enable,t_disable=trackers .enable,trackers .disable
local d_enable,d_disable=directives .enable,directives .disable
local e_enable,e_disable=experiments.enable,experiments.disable
@@ -13009,11 +13118,11 @@ if environment then
if engineflags then
local list=engineflags["c:trackers"] or engineflags["trackers"]
if type(list)=="string" then
- setters.initialize("commandline flags","trackers",settings_to_hash(list))
+ initialize_setter("commandline flags","trackers",settings_to_hash(list))
end
local list=engineflags["c:directives"] or engineflags["directives"]
if type(list)=="string" then
- setters.initialize("commandline flags","directives",settings_to_hash(list))
+ initialize_setter("commandline flags","directives",settings_to_hash(list))
end
end
end
@@ -13055,7 +13164,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 33003, stripped down to: 21667
+-- original size: 16017, stripped down to: 11045
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13071,9 +13180,8 @@ local topattern=string.topattern
local utfchar=utf.char
local datetime=os.date
local openfile=io.open
-local runningtex=tex and (tex.jobname or tex.formatname)
-local write_nl=runningtex and texio and texio.write_nl or print
-local write=runningtex and texio and texio.write or io.write
+local write_nl=print
+local write=io.write
local setmetatableindex=table.setmetatableindex
local formatters=string.formatters
local settings_to_hash=utilities.parsers.settings_to_hash
@@ -13109,273 +13217,7 @@ local function ansisupported(specification)
return false
end
end
-if runningtex and texio then
- if texio.setescape then
- texio.setescape(0)
- end
- if arg and ansisupported then
- for k,v in next,arg do
- if v=="--ansi" or v=="--c:ansi" then
- if ansisupported("ansi") then
- variant="ansi"
- end
- break
- elseif v=="--ansilog" or v=="--c:ansilog" then
- if ansisupported("ansilog") then
- variant="ansilog"
- end
- break
- end
- end
- end
- local function useluawrites()
- local texio_write_nl=texio.write_nl
- local texio_write=texio.write
- local io_write=io.write
- write_nl=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write_nl("log",...)
- texio_write_nl("term","")
- io_write(...)
- elseif target=="log" then
- texio_write_nl("log",...)
- elseif target=="term" then
- texio_write_nl("term","")
- io_write(...)
- elseif type(target)=="number" then
- texio_write_nl(target,...)
- elseif target~="none" then
- texio_write_nl("log",target,...)
- texio_write_nl("term","")
- io_write(target,...)
- end
- end
- write=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write("log",...)
- io_write(...)
- elseif target=="log" then
- texio_write("log",...)
- elseif target=="term" then
- io_write(...)
- elseif type(target)=="number" then
- texio_write(target,...)
- elseif target~="none" then
- texio_write("log",target,...)
- io_write(target,...)
- end
- end
- texio.write=write
- texio.write_nl=write_nl
- useluawrites=ignore
- end
- local whereto="both"
- local target=nil
- local targets=nil
- local formats=table.setmetatableindex("self")
- local translations=table.setmetatableindex("self")
- local report_yes,subreport_yes,direct_yes,subdirect_yes,status_yes
- local report_nop,subreport_nop,direct_nop,subdirect_nop,status_nop
- local variants={
- default={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="log",
- log="log",
- file="log",
- console="term",
- terminal="term",
- both="term and log",
- },
- },
- ansi={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="none",
- log="none",
- file="none",
- console="term",
- terminal="term",
- both="term",
- },
- }
- }
- variants.ansilog={
- formats=variants.ansi.formats,
- targets=variants.default.targets,
- }
- logs.flush=io.flush
- writer=function(...)
- write_nl(target,...)
- end
- newline=function()
- write_nl(target,"\n")
- end
- report=function(a,b,c,...)
- if c~=nil then
- write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,report_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,report_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- direct=function(a,b,c,...)
- if c~=nil then
- return direct_yes(translations[a],formatters[formats[b]](c,...))
- elseif b then
- return direct_yes(translations[a],formats[b])
- elseif a then
- return direct_nop(translations[a])
- else
- return ""
- end
- end
- subreport=function(a,s,b,c,...)
- if c~=nil then
- write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
- elseif a then
- write_nl(target,subreport_nop(translations[a],translations[s]))
- else
- write_nl(target,"\n")
- end
- end
- subdirect=function(a,s,b,c,...)
- if c~=nil then
- return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
- elseif b then
- return subdirect_yes(translations[a],translations[s],formats[b])
- elseif a then
- return subdirect_nop(translations[a],translations[s])
- else
- return ""
- end
- end
- status=function(a,b,c,...)
- if c~=nil then
- write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,status_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,status_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- settarget=function(askedwhereto)
- whereto=askedwhereto or whereto or "both"
- target=targets[whereto]
- if not target then
- whereto="both"
- target=targets[whereto]
- end
- if target=="term" or target=="term and log" then
- logs.flush=io.flush
- else
- logs.flush=ignore
- end
- end
- local stack={}
- pushtarget=function(newtarget)
- insert(stack,target)
- settarget(newtarget)
- end
- poptarget=function()
- if #stack>0 then
- settarget(remove(stack))
- end
- end
- setformats=function(f)
- formats=f
- end
- settranslations=function(t)
- translations=t
- end
- setprocessor=function(f)
- local writeline=write_nl
- write_nl=function(target,...)
- writeline(target,f(...))
- end
- end
- setformatters=function(specification)
- local t=nil
- local f=nil
- local d=variants.default
- if not specification then
- elseif type(specification)=="table" then
- t=specification.targets
- f=specification.formats or specification
- else
- if not ansisupported(specification) then
- specification="default"
- end
- local v=variants[specification]
- if v then
- t=v.targets
- f=v.formats
- variant=specification
- end
- end
- targets=t or d.targets
- target=targets[whereto] or target
- if f then
- d=d.formats
- else
- f=d.formats
- d=f
- end
- setmetatableindex(f,d)
- report_yes=f.report_yes
- report_nop=f.report_nop
- subreport_yes=f.subreport_yes
- subreport_nop=f.subreport_nop
- direct_yes=f.direct_yes
- direct_nop=f.direct_nop
- subdirect_yes=f.subdirect_yes
- subdirect_nop=f.subdirect_nop
- status_yes=f.status_yes
- status_nop=f.status_nop
- if variant=="ansi" or variant=="ansilog" then
- useluawrites()
- end
- settarget(whereto)
- end
- setformatters(variant)
- setlogfile=ignore
- settimedlog=ignore
-else
+do
local report_yes,subreport_yes,status_yes
local report_nop,subreport_nop,status_nop
local variants={
@@ -13675,46 +13517,6 @@ end)
directives.register("logs.target",function(v)
settarget(v)
end)
-if tex then
- local report=logs.reporter("pages")
- local texgetcount=tex and tex.getcount
- local real,user,sub=0,0,0
- function logs.start_page_number()
- real=texgetcount("realpageno")
- user=texgetcount("userpageno")
- sub=texgetcount("subpageno")
- end
- local timing=false
- local lasttime=nil
- trackers.register("pages.timing",function(v)
- timing=""
- end)
- function logs.stop_page_number()
- if timing then
- local elapsed=statistics.currenttime(statistics)
- local average,page
- if not lasttime or real<2 then
- average=elapsed
- page=elapsed
- else
- average=elapsed/(real-1)
- page=elapsed-lasttime
- end
- lasttime=elapsed
- timing=formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
- end
- if real<=0 then
- report("flushing page%s",timing)
- elseif user<=0 then
- report("flushing realpage %s%s",real,timing)
- elseif sub<=0 then
- report("flushing realpage %s, userpage %s%s",real,user,timing)
- else
- report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
- end
- logs.flush()
- end
-end
local nesting=0
local verbose=false
local hasscheme=url.hasscheme
@@ -13826,133 +13628,12 @@ function logs.system(whereto,process,jobname,category,fmt,arg,...)
end
end
local report_system=logs.reporter("system","logs")
-function logs.obsolete(old,new)
- local o=loadstring("return "..new)()
- if type(o)=="function" then
- return function(...)
- report_system("function %a is obsolete, use %a",old,new)
- loadstring(old.."="..new.." return "..old)()(...)
- end
- elseif type(o)=="table" then
- local t,m={},{}
- m.__index=function(t,k)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- return o[k]
- end
- m.__newindex=function(t,k,v)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- o[k]=v
- end
- if libraries then
- libraries.obsolete[old]=t
- end
- setmetatable(t,m)
- return t
- end
-end
if utilities then
utilities.report=report_system
end
-if tex and tex.error then
- function logs.texerrormessage(...)
- tex.error(format(...))
- end
-else
- function logs.texerrormessage(...)
- print(format(...))
- end
-end
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
-if tex then
- local finalactions={}
- local fatalerrors={}
- local possiblefatal={}
- local loggingerrors=false
- function logs.loggingerrors()
- return loggingerrors
- end
- directives.register("logs.errors",function(v)
- loggingerrors=v
- if type(v)=="string" then
- fatalerrors=settings_to_hash(v)
- else
- fatalerrors={}
- end
- end)
- function logs.registerfinalactions(...)
- insert(finalactions,...)
- end
- local what=nil
- local report=nil
- local state=nil
- local target=nil
- local function startlogging(t,r,w,s)
- target=t
- state=force
- force=true
- report=type(r)=="function" and r or logs.reporter(r)
- what=w
- pushtarget(target)
- newline()
- if s then
- report("start %s: %s",what,s)
- else
- report("start %s",what)
- end
- if target=="logfile" then
- newline()
- end
- return report
- end
- local function stoplogging()
- if target=="logfile" then
- newline()
- end
- report("stop %s",what)
- if target=="logfile" then
- newline()
- end
- poptarget()
- state=oldstate
- end
- function logs.startfilelogging(...)
- return startlogging("logfile",...)
- end
- logs.stopfilelogging=stoplogging
- local done=false
- function logs.starterrorlogging(r,w,...)
- if not done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","start possible issues")
- poptarget()
- done=true
- end
- if fatalerrors[w] then
- possiblefatal[w]=true
- end
- return startlogging("terminal",r,w,...)
- end
- logs.stoperrorlogging=stoplogging
- function logs.finalactions()
- if #finalactions>0 then
- for i=1,#finalactions do
- finalactions[i]()
- end
- if done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","stop possible issues")
- poptarget()
- end
- return next(possiblefatal) and sortedkeys(possiblefatal) or false
- end
- end
-end
end -- of closure
@@ -13961,7 +13642,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10184, stripped down to: 7500
+-- original size: 9740, stripped down to: 7296
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14055,10 +13736,8 @@ local function stoptiming(instance)
timer.loadtime=timer.loadtime+loadtime
timer.timing=0
timer.starttime=0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
local timer=timers[instance or "notimer"]
@@ -14135,18 +13814,11 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
- register("control sequences",function()
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
+ register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
register("callbacks",statistics.callbacks)
@@ -14160,15 +13832,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14224,6 +13891,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -15920,7 +15594,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-env"] = package.loaded["luat-env"] or true
--- original size: 6551, stripped down to: 4315
+-- original size: 6267, stripped down to: 4115
if not modules then modules={} end modules ['luat-env']={
version=1.001,
@@ -15948,14 +15622,6 @@ local mt={
else
return "unknown"
end
- elseif k=="kind" then
- local kind=texgettoks and texgettoks("contextkindtoks")
- if kind and kind~="" then
- rawset(environment,"kind",kind)
- return kind
- else
- return "unknown"
- end
elseif k=="jobname" or k=="formatname" then
local name=tex and tex[k]
if name or name=="" then
@@ -16530,7 +16196,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 61191, stripped down to: 35864
+-- original size: 61808, stripped down to: 36227
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17523,12 +17189,25 @@ local function xmlconvert(data,settings)
end
end
xml.convert=xmlconvert
-function xml.inheritedconvert(data,xmldata)
+function xml.inheritedconvert(data,xmldata,cleanup)
local settings=xmldata.settings
if settings then
settings.parent_root=xmldata
end
- local xc=xmlconvert(data,settings)
+ local xc=xmlconvert(data,settings)
+ if cleanup then
+ local x=xc.dt
+ if x then
+ x=x[1]
+ if x and x.tg=="@pi@" then
+ local dt=x.dt
+ local pi=dt and dt[1]
+ if type(pi)=="string" and find(pi,"^xml") then
+ remove(dt,1)
+ end
+ end
+ end
+ end
return xc
end
function xml.is_valid(root)
@@ -17586,9 +17265,17 @@ local function copy(old,p)
new[k]=t
elseif k=="dt" then
v.__p__=nil
- v=copy(v,new)
- new[k]=v
- v.__p__=p
+ local t={}
+ for i=1,#v do
+ local vi=v[i]
+ if type(vi)=="table" then
+ t[i]=copy(vi,new)
+ else
+ t[i]=vi
+ end
+ end
+ new[k]=t
+ t.__p__=p
else
new[k]=v
end
@@ -17992,7 +17679,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54626, stripped down to: 31255
+-- original size: 54667, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -18487,7 +18174,7 @@ local builtin={
local lp_builtin=lpeg.utfchartabletopattern(builtin)/builtin*((spaces*P("(")*spaces*P(")"))/"")
local lp_attribute=(P("@")+P("attribute::"))/""*Cc("(ll.at and ll.at['")*((R("az","AZ")+S("-_:"))^1)*Cc("'])")
local lp_fastpos_p=P("+")^0*R("09")^1*P(-1)/"l==%0"
-local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0==l))"
+local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0+1==l))"
local lp_fastpos=lp_fastpos_n+lp_fastpos_p
local lp_reserved=C("and")+C("or")+C("not")+C("div")+C("mod")+C("true")+C("false")
local lp_lua_function=Cs((R("az","AZ","__")^1*(P(".")*R("az","AZ","__")^1)^1)*("("))/"%0"
@@ -19312,7 +18999,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 30771, stripped down to: 19680
+-- original size: 33708, stripped down to: 20953
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -19330,7 +19017,7 @@ local xmlinheritedconvert=xml.inheritedconvert
local xmlapplylpath=xml.applylpath
local type,next,setmetatable,getmetatable=type,next,setmetatable,getmetatable
local insert,remove,fastcopy,concat=table.insert,table.remove,table.fastcopy,table.concat
-local gmatch,gsub,format,find,strip=string.gmatch,string.gsub,string.format,string.find,string.strip
+local gmatch,gsub,format,find,strip,match=string.gmatch,string.gsub,string.format,string.find,string.strip,string.match
local utfbyte=utf.byte
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local striplinepatterns=utilities.strings.striplinepatterns
@@ -19461,7 +19148,7 @@ local function xmltoelement(whatever,root)
end
local element
if type(whatever)=="string" then
- element=xmlinheritedconvert(whatever,root)
+ element=xmlinheritedconvert(whatever,root,true)
else
element=whatever
end
@@ -19474,15 +19161,18 @@ local function xmltoelement(whatever,root)
end
xml.toelement=xmltoelement
local function copiedelement(element,newparent)
- if type(element)=="string" then
- return element
- else
+ if type(element)~="string" then
element=xmlcopy(element).dt
if newparent and type(element)=="table" then
- element.__p__=newparent
+ for i=1,#element do
+ local e=element[i]
+ if type(e)=="table" then
+ e.__p__=newparent
+ end
+ end
end
- return element
end
+ return element
end
function xml.delete(root,pattern)
if not pattern or pattern=="" then
@@ -19521,6 +19211,32 @@ function xml.delete(root,pattern)
end
end
end
+function xml.wipe(root,pattern)
+ local collected=xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e=collected[c]
+ local p=e.__p__
+ if p then
+ local d=p.dt
+ local ni=e.ni
+ if ni<=#d then
+ local dt=e.dt
+ if #dt==1 then
+ local d1=dt[1]
+ if type(d1)=="string" and match(d1,"^%s*$") then
+ if trace_manipulations then
+ report('wiping',pattern,c,e)
+ end
+ remove(d,ni)
+ redo_ni(d)
+ end
+ end
+ end
+ end
+ end
+ end
+end
function xml.replace(root,pattern,whatever)
local element=root and xmltoelement(whatever,root)
local collected=element and xmlapplylpath(root,pattern)
@@ -19690,10 +19406,10 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
elseif ekat["parse"]=="text" then
epdt[ek.ni]=xml.escaped(data)
else
-local settings=xmldata.settings
-local savedresource=settings.currentresource
-settings.currentresource=name
- local xi=xmlinheritedconvert(data,xmldata)
+ local settings=xmldata.settings
+ local savedresource=settings.currentresource
+ settings.currentresource=name
+ local xi=xmlinheritedconvert(data,xmldata,true)
if not xi then
epdt[ek.ni]=""
else
@@ -19703,7 +19419,7 @@ settings.currentresource=name
local child=xml.body(xi)
child.__p__=ekrt
child.__f__=name
-child.cf=name
+ child.cf=name
epdt[ek.ni]=child
local settings=xmldata.settings
local inclusions=settings and settings.inclusions
@@ -19771,28 +19487,47 @@ end
local b_collapser=lpegpatterns.b_collapser
local m_collapser=lpegpatterns.m_collapser
local e_collapser=lpegpatterns.e_collapser
+local x_collapser=lpegpatterns.x_collapser
local b_stripper=lpegpatterns.b_stripper
local m_stripper=lpegpatterns.m_stripper
local e_stripper=lpegpatterns.e_stripper
-local function stripelement(e,nolines,anywhere)
+local x_stripper=lpegpatterns.x_stripper
+local function stripelement(e,nolines,anywhere,everything)
local edt=e.dt
if edt then
local n=#edt
if n==0 then
return e
+ elseif everything then
+ local t={}
+ local m=0
+ for i=1,n do
+ local str=edt[i]
+ if type(str)~="string" then
+ m=m+1
+ t[m]=str
+ elseif str~="" then
+ str=lpegmatch(x_collapser,str)
+ if str~="" then
+ m=m+1
+ t[m]=str
+ end
+ end
+ end
+ e.dt=t
elseif anywhere then
local t={}
local m=0
- for e=1,n do
- local str=edt[e]
+ for i=1,n do
+ local str=edt[i]
if type(str)~="string" then
m=m+1
t[m]=str
elseif str~="" then
if nolines then
- str=lpegmatch((n==1 and b_collapser) or (n==m and e_collapser) or m_collapser,str)
+ str=lpegmatch((i==1 and b_collapser) or (i==m and e_collapser) or m_collapser,str)
else
- str=lpegmatch((n==1 and b_stripper) or (n==m and e_stripper) or m_stripper,str)
+ str=lpegmatch((i==1 and b_stripper) or (i==m and e_stripper) or m_stripper,str)
end
if str~="" then
m=m+1
@@ -19834,14 +19569,27 @@ local function stripelement(e,nolines,anywhere)
return e
end
xml.stripelement=stripelement
-function xml.strip(root,pattern,nolines,anywhere)
+function xml.strip(root,pattern,nolines,anywhere,everything)
local collected=xmlapplylpath(root,pattern)
if collected then
for i=1,#collected do
- stripelement(collected[i],nolines,anywhere)
+ stripelement(collected[i],nolines,anywhere,everything)
+ end
+ end
+end
+local function compactelement(e)
+ local edt=e.dt
+ if edt then
+ for e=1,#edt do
+ local str=edt[e]
+ if type(str)=="string" and not find(str,"%S") then
+ edt[e]=""
+ end
end
end
+ return e
end
+xml.compactelement=compactelement
local function renamespace(root,oldspace,newspace)
local ndt=#root.dt
for i=1,ndt or 0 do
@@ -20790,7 +20538,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-ini"] = package.loaded["data-ini"] or true
--- original size: 10847, stripped down to: 7086
+-- original size: 10947, stripped down to: 7176
if not modules then modules={} end modules ['data-ini']={
version=1.001,
@@ -20836,7 +20584,8 @@ do
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//")
end
end
-do
+if not environment.homedir then
+ local oldhome=osgetenv('HOME')
local homedir=osgetenv(ostype=="windows" and 'USERPROFILE' or 'HOME') or ''
if not homedir or homedir=="" then
homedir=char(127)
@@ -20844,6 +20593,7 @@ do
homedir=file.collapsepath(homedir)
ossetenv("HOME",homedir)
ossetenv("USERPROFILE",homedir)
+ environment.oldhome=oldhome
environment.homedir=homedir
end
do
@@ -21449,7 +21199,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-env"] = package.loaded["data-env"] or true
--- original size: 9400, stripped down to: 6347
+-- original size: 9501, stripped down to: 6411
if not modules then modules={} end modules ['data-env']={
version=1.001,
@@ -21540,7 +21290,9 @@ local relations=allocate {
mp={
names={ "mp" },
variable='MPINPUTS',
- suffixes={ 'mp','mpvi','mpiv','mpxl','mpii' },
+ suffixes=CONTEXTLMTXMODE>0
+ and { 'mp','mpxl','mpvi','mpiv','mpii' }
+ or { 'mp','mpvi','mpiv','mpii' },
usertype=true,
},
tex={
@@ -21734,7 +21486,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16099, stripped down to: 11379
+-- original size: 16409, stripped down to: 11591
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -21984,7 +21736,10 @@ caches.getwritablepath=getwritablepath
caches.setfirstwritablefile=setfirstwritablefile
caches.getfirstreadablefile=getfirstreadablefile
caches.setluanames=setluanames
+local checkmemory=utilities and utilities.lua and utilities.lua.checkmemory
+local threshold=100
function caches.loaddata(readables,name,writable)
+ local used=checkmemory and checkmemory()
if type(readables)=="string" then
readables={ readables }
end
@@ -22011,7 +21766,11 @@ function caches.loaddata(readables,name,writable)
end
if loader then
loader=loader()
- collectgarbage("step")
+ if checkmemory then
+ checkmemory(used,threshold)
+ else
+ collectgarbage("step")
+ end
return loader
end
end
@@ -24110,7 +23869,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-fil"] = package.loaded["data-fil"] or true
--- original size: 4365, stripped down to: 3588
+-- original size: 4365, stripped down to: 3452
if not modules then modules={} end modules ['data-fil']={
version=1.001,
@@ -24130,7 +23889,6 @@ local scanfiles=resolvers.scanfiles
local registerfilehash=resolvers.registerfilehash
local appendhash=resolvers.appendhash
local loadcachecontent=caches.loadcontent
-local checkgarbage=utilities.garbagecollector and utilities.garbagecollector.check
function resolvers.locators.file(specification)
local filename=specification.filename
local realname=resolveprefix(filename)
@@ -24220,10 +23978,7 @@ function loaders.file(specification,filetype)
if trace_locating then
report_files("file loader: %a loaded",filename)
end
- local s=f:read("*a")
- if checkgarbage then
- checkgarbage(#s)
- end
+ local s=f:read("*a")
f:close()
if s then
return true,s,#s
@@ -24371,7 +24126,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-use"] = package.loaded["data-use"] or true
--- original size: 5790, stripped down to: 2910
+-- original size: 5785, stripped down to: 2905
if not modules then modules={} end modules ['data-use']={
version=1.001,
@@ -24387,7 +24142,7 @@ local resolvers=resolvers
local findfile=resolvers.findfile
statistics.register("used config file",function() return caches.configfiles() end)
statistics.register("used cache path",function() return caches.usedpaths() end)
-function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner)
+function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner)
local enginebanner=status.banner
if formatbanner and enginebanner and sourcefile then
local luvname=file.replacesuffix(texname,"luv")
@@ -25532,7 +25287,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["libs-ini"] = package.loaded["libs-ini"] or true
--- original size: 5822, stripped down to: 3629
+-- original size: 6459, stripped down to: 4006
if not modules then modules={} end modules ['libs-ini']={
version=1.001,
@@ -25542,7 +25297,7 @@ if not modules then modules={} end modules ['libs-ini']={
license="see context related readme files"
}
local type,unpack=type,unpack
-local type=type
+local find=string.find
local nameonly=file.nameonly
local joinfile=file.join
local addsuffix=file.addsuffix
@@ -25552,7 +25307,9 @@ local findfile=resolvers.findfile
local expandpaths=resolvers.expandedpathlistfromvariable
local report=logs.reporter("resolvers","libraries")
local trace=false
+local silent=false
trackers.register("resolvers.lib",function(v) trace=v end)
+trackers.register("resolvers.lib.silent",function(v) silent=v end)
local function findlib(required)
local suffix=os.libsuffix or "so"
if not qualifiedpath(required) then
@@ -25653,10 +25410,10 @@ function libraries.optionalloaded(name,libnames)
end
end
local initialized=thelib_initialize(unpack(libnames))
- if initialized then
- report("using library '% + t'",libnames)
- else
+ if not initialized then
report("unable to initialize library '% + t'",libnames)
+ elseif not silent then
+ report("using library '% + t'",libnames)
end
return initialized
end
@@ -25674,6 +25431,19 @@ if FFISUPPORTED and ffi and ffi.load then
end
end
end
+local dofile=dofile
+local savedrequire=require
+function require(name,version)
+ if find(name,"%.lua$") or find(name,"%.lmt$") then
+ local m=dofile(findfile(name))
+ if m then
+ package.loaded[name]=m
+ return m
+ end
+ else
+ return savedrequire(name)
+ end
+end
end -- of closure
@@ -25785,7 +25555,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 13843, stripped down to: 9991
+-- original size: 11691, stripped down to: 8350
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25836,27 +25606,26 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
- luatex=sandbox.registerrunner {
- name="make luatex format",
- program="luatex",
+ luametatex=sandbox.registerrunner {
+ name="make luametatex format",
+ program="luametatex",
template=template,
checkers=checkers,
reporter=report_format,
},
- luametatex=sandbox.registerrunner {
- name="make luametatex format",
- program="luametatex",
+ luatex=sandbox.registerrunner {
+ name="make luatex format",
+ program="luatex",
template=template,
checkers=checkers,
reporter=report_format,
@@ -25869,6 +25638,16 @@ local runners={
reporter=report_format,
},
}
+local stubfiles={
+ luametatex="luat-cod.lmt",
+ luatex="luat-cod.lua",
+ luajittex="luat-cod.lua",
+}
+local suffixes={
+ luametatex="mkxl",
+ luatex="mkiv",
+ luajittex="mkiv",
+}
local function validbinarypath()
if not environment.arguments.nobinarypath then
local path=environment.ownpath or file.dirname(environment.ownname)
@@ -25880,101 +25659,50 @@ local function validbinarypath()
end
end
end
+local function fatalerror(startupdir,...)
+ report_format(...)
+ lfs.chdir(startupdir)
+end
function environment.make_format(formatname)
local arguments=environment.arguments
local engine=environment.ownmain or "luatex"
local silent=arguments.silent
local errors=arguments.errors
- local texsourcename=""
- local texsourcepath=""
- local fulltexsourcename=""
- if engine=="luametatex" then
- texsourcename=file.addsuffix(formatname,"mkxl")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local runner=runners[engine]
+ local startupdir=dir.current()
+ if not runner then
+ return fatalerror(startupdir,"the format %a cannot be generated, no runner available for engine %a",name,engine)
end
- if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"mkiv")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local luasourcename=stubfiles[engine]
+ if not luasourcename then
+ return fatalerror(startupdir,"no lua stub file specified for %a",engine)
end
+ local texsourcename=file.addsuffix(formatname,suffixes[engine])
+ local fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"tex")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ return fatalerror(startupdir,"no tex source file with name %a (mkiv or tex)",formatname)
end
- if fulltexsourcename=="" then
- report_format("no tex source file with name %a (mkiv or tex)",formatname)
- return
- end
- report_format("using tex source file %a",fulltexsourcename)
- fulltexsourcename=dir.expandname(fulltexsourcename)
- texsourcepath=file.dirname(fulltexsourcename)
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
- end
- local specificationname="context.lus"
- local specificationpath=""
- local fullspecificationname=resolvers.findfile(specificationname) or ""
- if fullspecificationname=="" then
- report_format("unable to locate specification file %a",specificationname)
- return
- end
- report_format("using specification file %a",fullspecificationname)
- fullspecificationname=dir.expandname(fullspecificationname)
- specificationpath=file.dirname(fullspecificationname)
- if texsourcepath~=specificationpath then
- report_format("tex source file and specification file are on different paths")
- return
- end
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
+ local fulltexsourcename=dir.expandname(fulltexsourcename)
+ local texsourcepath=file.dirname(fulltexsourcename)
+ if lfs.isfile(fulltexsourcename) then
+ report_format("using tex source file %a",fulltexsourcename)
+ else
+ return fatalerror(startupdir,"no accessible tex source file with name %a",fulltexsourcename)
end
- if not lfs.isfile(fullspecificationname) then
- report_format("no accessible specification file with name %a",fulltexsourcename)
- return
+ local fullluasourcename=dir.expandname(file.join(texsourcepath,luasourcename) or "")
+ if lfs.isfile(fullluasourcename) then
+ report_format("using lua stub file %a",fullluasourcename)
+ else
+ return fatalerror(startupdir,"no accessible lua stub file with name %a",fulltexsourcename)
end
- report_format("using tex source path %a",texsourcepath)
local validformatpath=caches.getwritablepath("formats",engine) or ""
- local startupdir=dir.current()
if validformatpath=="" then
- report_format("invalid format path, insufficient write access")
- return
+ return fatalerror(startupdir,"invalid format path, insufficient write access")
end
local binarypath=validbinarypath()
report_format("changing to format path %a",validformatpath)
- lfs.chdir(validformatpath)
- if dir.current()~=validformatpath then
- report_format("unable to change to format path %a",validformatpath)
- return
- end
- local usedluastub=nil
- local usedlualibs=dofile(fullspecificationname)
- if type(usedlualibs)=="string" then
- usedluastub=file.join(specificationpath,usedlualibs)
- elseif type(usedlualibs)=="table" then
- report_format("using stub specification %a",fullspecificationname)
- local texbasename=file.basename(name)
- local luastubname=file.addsuffix(texbasename,luasuffixes.lua)
- local lucstubname=file.addsuffix(texbasename,luasuffixes.luc)
- report_format("creating initialization file %a",luastubname)
- utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
- if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- report_format("using compiled initialization file %a",lucstubname)
- usedluastub=lucstubname
- else
- report_format("using uncompiled initialization file %a",luastubname)
- usedluastub=luastubname
- end
- else
- report_format("invalid stub specification %a",fullspecificationname)
- lfs.chdir(startupdir)
- return
- end
- local runner=runners[engine]
- if not runner then
- report_format("the format %a cannot be generated, no runner available for engine %a",name,engine)
- lfs.chdir(startupdir)
- return
+ if not lfs.chdir(validformatpath) then
+ return fatalerror(startupdir,"unable to change to format path %a",validformatpath)
end
local primaryflags=primaryflags(arguments)
local secondaryflags=secondaryflags(arguments)
@@ -25982,9 +25710,8 @@ function environment.make_format(formatname)
binarypath=binarypath,
primaryflags=primaryflags,
secondaryflags=secondaryflags,
- luafile=quoted(usedluastub),
+ luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26001,7 +25728,7 @@ function environment.make_format(formatname)
end
report_format("format path : %s",validformatpath)
report_format("luatex engine : %s",engine)
- report_format("lua startup file : %s",usedluastub)
+ report_format("lua startup file : %s",fullluasourcename)
if primaryflags~="" then
report_format("primary flags : %s",primaryflags)
end
@@ -26083,9 +25810,9 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
luafile=quoted(scriptname),
texfile=filename~="" and quoted(filename) or "",
}
- statistics.starttiming()
+ statistics.starttiming("make format")
local result=runner(specification)
- local runtime=statistics.stoptiming()
+ statistics.stoptiming("make format")
if verbose then
report_format()
if binarypath and binarypath~="" then
@@ -26103,7 +25830,7 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
if secondaryflags~="" then
report_format("secondary flags : %s",secondaryflags)
end
- report_format("run time : %.3f seconds",runtime)
+ report_format("run time : %0.3f seconds",statistics.elapsed("make format"))
report_format("return value : %s",result==0 and "okay" or "error")
report_format()
end
@@ -26115,8 +25842,8 @@ end -- of closure
-- 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 : 1038373
--- stripped bytes : 409980
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
@@ -26771,12 +26498,14 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
end
function runners.save_script_session(filename, list)
- local t = { }
- for i=1,#list do
- local key = list[i]
- t[key] = environment.arguments[key]
+ if type(list) == "table" then
+ local t = { }
+ for i=1,#list do
+ local key = list[i]
+ t[key] = environment.arguments[key]
+ end
+ io.savedata(filename,table.serialize(t,true))
end
- io.savedata(filename,table.serialize(t,true))
end
function runners.load_script_session(filename)
diff --git a/Master/texmf-dist/scripts/context/ruby/graphics/inkscape.rb b/Master/texmf-dist/scripts/context/ruby/graphics/inkscape.rb
index 8d3b2646826..8f22d9b7954 100644
--- a/Master/texmf-dist/scripts/context/ruby/graphics/inkscape.rb
+++ b/Master/texmf-dist/scripts/context/ruby/graphics/inkscape.rb
@@ -70,7 +70,8 @@ class InkScape
if directpdf then
report("converting #{inpfilename} to #{outfilename}")
- resultpipe = "--without-gui --export-pdf=\"#{outfilename}\" 2>#{logfile}"
+ # resultpipe = "--without-gui --export-pdf=\"#{outfilename}\" 2>#{logfile}"
+ resultpipe = "--without-gui --export-filename=\"#{outfilename}\" 2>#{logfile}"
else
report("converting #{inpfilename} to #{tmpfilename}")
resultpipe = "--without-gui --print=\">#{tmpfilename}\" 2>#{logfile}"
diff --git a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
index 6eaf5ff449f..6fc17adb022 100644
--- a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -852,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11605, stripped down to: 8299
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -861,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -891,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -907,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1040,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1082,11 +1087,18 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
methods["preload table"]=function(name)
- return builtin["preload table"](name)
+ local f=builtin["preload table"]
+ if f then
+ return f(name)
+ end
end
methods["qualified path"]=function(name)
return loadedbyname(addsuffix(lualibfile(name),"lua"),name)
@@ -1098,19 +1110,31 @@ methods["lib extra list"]=function(name)
return loadedbypath(addsuffix(lualibfile(name),os.libsuffix),name,getextralibpaths(),true,"lib")
end
methods["path specification"]=function(name)
- getluapaths()
- return builtin["path specification"](name)
+ local f=builtin["path specification"]
+ if f then
+ getluapaths()
+ return f(name)
+ end
end
methods["cpath specification"]=function(name)
- getlibpaths()
- return builtin["cpath specification"](name)
+ local f=builtin["cpath specification"]
+ if f then
+ getlibpaths()
+ return f(name)
+ end
end
methods["all in one fallback"]=function(name)
- return builtin["all in one fallback"](name)
+ local f=builtin["all in one fallback"]
+ if f then
+ return f(name)
+ end
end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -1122,19 +1146,22 @@ function helpers.loaded(name)
level=level+1
for i=1,#sequence do
local method=sequence[i]
- if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
- end
- local result,rest=methods[method](name)
- if type(result)=="function" then
+ local lookup=method and methods[method]
+ if type(lookup)=="function" then
if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
end
- if helpers.traceused then
- used[#used+1]={ level=level,name=name }
+ local result,rest=lookup(name)
+ if type(result)=="function" then
+ if helpers.trace then
+ helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
+ level=level-1
+ return result,rest
end
- level=level-1
- return result,rest
end
end
level=level-1
@@ -1174,7 +1201,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 38440, stripped down to: 19316
+-- original size: 38703, stripped down to: 19489
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1272,11 +1299,13 @@ local fullstripper=whitespace^0*C((whitespace^0*nonwhitespace^1)^0)
local collapser=Cs(spacer^0/""*nonspacer^0*((spacer^0/" "*nonspacer^1)^0))
local nospacer=Cs((whitespace^1/""+nonwhitespace^1)^0)
local b_collapser=Cs(whitespace^0/""*(nonwhitespace^1+whitespace^1/" ")^0)
-local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
local m_collapser=Cs((nonwhitespace^1+whitespace^1/" ")^0)
+local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
+local x_collapser=Cs((nonwhitespace^1+whitespace^1/"" )^0)
local b_stripper=Cs(spacer^0/""*(nonspacer^1+spacer^1/" ")^0)
-local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
local m_stripper=Cs((nonspacer^1+spacer^1/" ")^0)
+local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
+local x_stripper=Cs((nonspacer^1+spacer^1/"" )^0)
patterns.stripper=stripper
patterns.fullstripper=fullstripper
patterns.collapser=collapser
@@ -1284,9 +1313,11 @@ patterns.nospacer=nospacer
patterns.b_collapser=b_collapser
patterns.m_collapser=m_collapser
patterns.e_collapser=e_collapser
+patterns.x_collapser=x_collapser
patterns.b_stripper=b_stripper
patterns.m_stripper=m_stripper
patterns.e_stripper=e_stripper
+patterns.x_stripper=x_stripper
patterns.lowercase=lowercase
patterns.uppercase=uppercase
patterns.letter=patterns.lowercase+patterns.uppercase
@@ -3806,7 +3837,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 19120, stripped down to: 10208
+-- original size: 19409, stripped down to: 10419
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4029,6 +4060,8 @@ elseif name=="macosx" then
platform="osx-intel"
elseif find(architecture,"x86_64",1,true) then
platform="osx-64"
+ elseif find(architecture,"arm64",1,true) then
+ platform="osx-64"
else
platform="osx-ppc"
end
@@ -4200,11 +4233,19 @@ local function isleapyear(year)
end
os.isleapyear=isleapyear
local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
-local function nofdays(year,month)
+local function nofdays(year,month,day)
if not month then
return isleapyear(year) and 365 or 364
- else
+ elseif not day then
return month==2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day=day+days[i]
+ end
+ if month>2 and isleapyear(year) then
+ day=day+1
+ end
+ return day
end
end
os.nofdays=nofdays
@@ -5729,10 +5770,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-unicode"] = package.loaded["l-unicode"] or true
--- original size: 41281, stripped down to: 17261
+-- original size: 41303, stripped down to: 17277
if not modules then modules={} end modules ['l-unicode']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -6563,7 +6605,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 45153, stripped down to: 22734
+-- original size: 45129, stripped down to: 23525
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -6615,25 +6657,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -6911,7 +6987,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -7106,10 +7184,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -7219,33 +7305,36 @@ local format_extension=function(extensions,f,name)
local extension=extensions[name] or "tostring(%s)"
local f=tonumber(f) or 1
local w=find(extension,"%.%.%.")
- if w then
- if f==0 then
+ if f==0 then
+ if w then
extension=gsub(extension,"%.%.%.","")
- return extension
- elseif f==1 then
+ end
+ return extension
+ elseif f==1 then
+ if w then
extension=gsub(extension,"%.%.%.","%%s")
- n=n+1
- local a="a"..n
- return format(extension,a,a)
- elseif f<0 then
+ end
+ n=n+1
+ local a="a"..n
+ return format(extension,a,a)
+ elseif f<0 then
+ if w then
+ extension=gsub(extension,"%.%.%.","")
+ return extension
+ else
local a="a"..(n+f+1)
return format(extension,a,a)
- else
- extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- local t={}
- for i=1,f do
- n=n+1
- t[i]="a"..n
- end
- return format(extension,unpack(t))
end
else
- extension=gsub(extension,"%%s",function()
+ if w then
+ extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ local t={}
+ for i=1,f do
n=n+1
- return "a"..n
- end)
- return extension
+ t[i]="a"..n
+ end
+ return format(extension,unpack(t))
end
end
local builder=Cs { "start",
@@ -7259,7 +7348,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -7297,7 +7386,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -7448,7 +7539,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 32649, stripped down to: 18257
+-- original size: 32815, stripped down to: 18257
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8194,10 +8285,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 11530, stripped down to: 9007
+-- original size: 11552, stripped down to: 9023
if not modules then modules={} end modules ['util-fil']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -8562,10 +8654,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 12946, stripped down to: 9507
+-- original size: 12968, stripped down to: 9523
if not modules then modules={} end modules ['util-sac']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -9215,7 +9308,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 24132, stripped down to: 16210
+-- original size: 24683, stripped down to: 16431
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9228,7 +9321,7 @@ local lpeg,table,string=lpeg,table,string
local P,R,V,S,C,Ct,Cs,Carg,Cc,Cg,Cf,Cp=lpeg.P,lpeg.R,lpeg.V,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.Carg,lpeg.Cc,lpeg.Cg,lpeg.Cf,lpeg.Cp
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local concat,gmatch,find=table.concat,string.gmatch,string.find
-local tostring,type,next,rawset=tostring,type,next,rawset
+local tonumber,tostring,type,next,rawset=tonumber,tostring,type,next,rawset
local mod,div=math.mod,math.div
utilities=utilities or {}
local parsers=utilities.parsers or {}
@@ -9620,13 +9713,15 @@ function parsers.csvsplitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
local separator=specification.separator
local quotechar=specification.quote
+ local numbers=specification.numbers
local separator=S(separator~="" and separator or ",")
local whatever=C((1-separator-newline)^0)
if quotechar and quotechar~="" then
local quotedata=nil
for chr in gmatch(quotechar,".") do
local quotechar=P(chr)
- local quoteword=quotechar*C((1-quotechar)^0)*quotechar
+ local quoteitem=(1-quotechar)^0
+ local quoteword=quotechar*(numbers and (quoteitem/tonumber) or C(quoteitem))*quotechar
if quotedata then
quotedata=quotedata+quoteword
else
@@ -9642,12 +9737,14 @@ function parsers.csvsplitter(specification)
end
function parsers.rfc4180splitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
+ local numbers=specification.numbers
local separator=specification.separator
local quotechar=P(specification.quote)
local dquotechar=quotechar*quotechar
/specification.quote
local separator=S(separator~="" and separator or ",")
- local escaped=quotechar*Cs((dquotechar+(1-quotechar))^0)*quotechar
+ local whatever=(dquotechar+(1-quotechar))^0
+ local escaped=quotechar*(numbers and (whatever/tonumber) or Cs(whatever))*quotechar
local non_escaped=C((1-quotechar-newline-separator)^1)
local field=escaped+non_escaped+Cc("")
local record=Ct(field*(separator*field)^1)
@@ -11718,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11763,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11773,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11799,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11810,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -12712,7 +12809,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-set"] = package.loaded["trac-set"] or true
--- original size: 13394, stripped down to: 8882
+-- original size: 13901, stripped down to: 9175
if not modules then modules={} end modules ['trac-set']={
version=1.001,
@@ -12735,7 +12832,7 @@ utilities.setters=setters
local data={}
local trace_initialize=false
local frozen=true
-function setters.initialize(filename,name,values)
+local function initialize_setter(filename,name,values)
local setter=data[name]
if setter then
local data=setter.data
@@ -12776,8 +12873,8 @@ function setters.initialize(filename,name,values)
end
end
local function set(t,what,newvalue)
- local data=t.data
- if not data.frozen then
+ local data=t.data
+ if data and not data.frozen then
local done=t.done
if type(what)=="string" then
what=settings_to_hash(what)
@@ -12813,7 +12910,7 @@ local function set(t,what,newvalue)
end
local function reset(t)
local data=t.data
- if not data.frozen then
+ if data and not data.frozen then
for name,functions in sortedthash(data) do
for i=1,#functions do
functions[i](false)
@@ -12834,7 +12931,7 @@ local function disable(t,what)
set(t,what,false)
end
end
-function setters.register(t,what,...)
+local function register_setter(t,what,...)
local data=t.data
what=lower(what)
local functions=data[what]
@@ -12869,23 +12966,24 @@ function setters.register(t,what,...)
end
return false
end
-function setters.enable(t,what)
+local function enable_setter(t,what)
local e=t.enable
t.enable,t.done=enable,{}
+ set(t,what,true)
enable(t,what)
t.enable,t.done=e,{}
end
-function setters.disable(t,what)
+local function disable_setter(t,what)
local e=t.disable
t.disable,t.done=disable,{}
disable(t,what)
t.disable,t.done=e,{}
end
-function setters.reset(t)
+local function reset_setter(t)
t.done={}
reset(t)
end
-function setters.list(t)
+local function list_setter(t)
local list=table.sortedkeys(t.data)
local user,system={},{}
for l=1,#list do
@@ -12898,8 +12996,8 @@ function setters.list(t)
end
return user,system
end
-function setters.show(t)
- local list=setters.list(t)
+local function show_setter(t)
+ local list=list_setter(t)
t.report()
for k=1,#list do
local name=list[k]
@@ -12930,39 +13028,50 @@ function setters.show(t)
end
end
end
-local enable,disable,register,list,show=setters.enable,setters.disable,setters.register,setters.list,setters.show
function setters.report(setter,fmt,...)
- print(formatters["%-15s : %s\n"](setter.name,formatters[fmt](...)))
+ if fmt then
+ print(formatters["%-15s : %s"](setter.name,formatters[fmt](...)))
+ else
+ print("")
+ end
end
-local function default(setter,name)
+local function setter_default(setter,name)
local d=setter.data[name]
return d and d.default
end
-local function value(setter,name)
+local function setter_value(setter,name)
local d=setter.data[name]
return d and (d.value or d.default)
end
-function setters.new(name)
+local function new_setter(name)
local setter
setter={
data=allocate(),
name=name,
- report=function(...) setters.report (setter,...) end,
- enable=function(...) enable (setter,...) end,
- disable=function(...) disable (setter,...) end,
- reset=function(...) reset (setter,...) end,
- register=function(...) register(setter,...) end,
- list=function(...) return list (setter,...) end,
- show=function(...) show (setter,...) end,
- default=function(...) return default (setter,...) end,
- value=function(...) return value (setter,...) end,
+ report=function(...) setters.report (setter,...) end,
+ enable=function(...) enable_setter (setter,...) end,
+ disable=function(...) disable_setter (setter,...) end,
+ reset=function(...) reset_setter (setter,...) end,
+ register=function(...) register_setter(setter,...) end,
+ list=function(...) return list_setter (setter,...) end,
+ show=function(...) show_setter (setter,...) end,
+ default=function(...) return setter_default (setter,...) end,
+ value=function(...) return setter_value (setter,...) end,
}
data[name]=setter
return setter
end
-trackers=setters.new("trackers")
-directives=setters.new("directives")
-experiments=setters.new("experiments")
+setters.enable=enable_setter
+setters.disable=disable_setter
+setters.register=register_setter
+setters.list=list_setter
+setters.show=show_setter
+setters.reset=reset_setter
+setters.new=new_setter
+setters.initialize=initialize_setter
+trackers=new_setter("trackers")
+directives=new_setter("directives")
+experiments=new_setter("experiments")
local t_enable,t_disable=trackers .enable,trackers .disable
local d_enable,d_disable=directives .enable,directives .disable
local e_enable,e_disable=experiments.enable,experiments.disable
@@ -13009,11 +13118,11 @@ if environment then
if engineflags then
local list=engineflags["c:trackers"] or engineflags["trackers"]
if type(list)=="string" then
- setters.initialize("commandline flags","trackers",settings_to_hash(list))
+ initialize_setter("commandline flags","trackers",settings_to_hash(list))
end
local list=engineflags["c:directives"] or engineflags["directives"]
if type(list)=="string" then
- setters.initialize("commandline flags","directives",settings_to_hash(list))
+ initialize_setter("commandline flags","directives",settings_to_hash(list))
end
end
end
@@ -13055,7 +13164,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 33003, stripped down to: 21667
+-- original size: 16017, stripped down to: 11045
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13071,9 +13180,8 @@ local topattern=string.topattern
local utfchar=utf.char
local datetime=os.date
local openfile=io.open
-local runningtex=tex and (tex.jobname or tex.formatname)
-local write_nl=runningtex and texio and texio.write_nl or print
-local write=runningtex and texio and texio.write or io.write
+local write_nl=print
+local write=io.write
local setmetatableindex=table.setmetatableindex
local formatters=string.formatters
local settings_to_hash=utilities.parsers.settings_to_hash
@@ -13109,273 +13217,7 @@ local function ansisupported(specification)
return false
end
end
-if runningtex and texio then
- if texio.setescape then
- texio.setescape(0)
- end
- if arg and ansisupported then
- for k,v in next,arg do
- if v=="--ansi" or v=="--c:ansi" then
- if ansisupported("ansi") then
- variant="ansi"
- end
- break
- elseif v=="--ansilog" or v=="--c:ansilog" then
- if ansisupported("ansilog") then
- variant="ansilog"
- end
- break
- end
- end
- end
- local function useluawrites()
- local texio_write_nl=texio.write_nl
- local texio_write=texio.write
- local io_write=io.write
- write_nl=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write_nl("log",...)
- texio_write_nl("term","")
- io_write(...)
- elseif target=="log" then
- texio_write_nl("log",...)
- elseif target=="term" then
- texio_write_nl("term","")
- io_write(...)
- elseif type(target)=="number" then
- texio_write_nl(target,...)
- elseif target~="none" then
- texio_write_nl("log",target,...)
- texio_write_nl("term","")
- io_write(target,...)
- end
- end
- write=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write("log",...)
- io_write(...)
- elseif target=="log" then
- texio_write("log",...)
- elseif target=="term" then
- io_write(...)
- elseif type(target)=="number" then
- texio_write(target,...)
- elseif target~="none" then
- texio_write("log",target,...)
- io_write(target,...)
- end
- end
- texio.write=write
- texio.write_nl=write_nl
- useluawrites=ignore
- end
- local whereto="both"
- local target=nil
- local targets=nil
- local formats=table.setmetatableindex("self")
- local translations=table.setmetatableindex("self")
- local report_yes,subreport_yes,direct_yes,subdirect_yes,status_yes
- local report_nop,subreport_nop,direct_nop,subdirect_nop,status_nop
- local variants={
- default={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="log",
- log="log",
- file="log",
- console="term",
- terminal="term",
- both="term and log",
- },
- },
- ansi={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="none",
- log="none",
- file="none",
- console="term",
- terminal="term",
- both="term",
- },
- }
- }
- variants.ansilog={
- formats=variants.ansi.formats,
- targets=variants.default.targets,
- }
- logs.flush=io.flush
- writer=function(...)
- write_nl(target,...)
- end
- newline=function()
- write_nl(target,"\n")
- end
- report=function(a,b,c,...)
- if c~=nil then
- write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,report_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,report_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- direct=function(a,b,c,...)
- if c~=nil then
- return direct_yes(translations[a],formatters[formats[b]](c,...))
- elseif b then
- return direct_yes(translations[a],formats[b])
- elseif a then
- return direct_nop(translations[a])
- else
- return ""
- end
- end
- subreport=function(a,s,b,c,...)
- if c~=nil then
- write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
- elseif a then
- write_nl(target,subreport_nop(translations[a],translations[s]))
- else
- write_nl(target,"\n")
- end
- end
- subdirect=function(a,s,b,c,...)
- if c~=nil then
- return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
- elseif b then
- return subdirect_yes(translations[a],translations[s],formats[b])
- elseif a then
- return subdirect_nop(translations[a],translations[s])
- else
- return ""
- end
- end
- status=function(a,b,c,...)
- if c~=nil then
- write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,status_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,status_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- settarget=function(askedwhereto)
- whereto=askedwhereto or whereto or "both"
- target=targets[whereto]
- if not target then
- whereto="both"
- target=targets[whereto]
- end
- if target=="term" or target=="term and log" then
- logs.flush=io.flush
- else
- logs.flush=ignore
- end
- end
- local stack={}
- pushtarget=function(newtarget)
- insert(stack,target)
- settarget(newtarget)
- end
- poptarget=function()
- if #stack>0 then
- settarget(remove(stack))
- end
- end
- setformats=function(f)
- formats=f
- end
- settranslations=function(t)
- translations=t
- end
- setprocessor=function(f)
- local writeline=write_nl
- write_nl=function(target,...)
- writeline(target,f(...))
- end
- end
- setformatters=function(specification)
- local t=nil
- local f=nil
- local d=variants.default
- if not specification then
- elseif type(specification)=="table" then
- t=specification.targets
- f=specification.formats or specification
- else
- if not ansisupported(specification) then
- specification="default"
- end
- local v=variants[specification]
- if v then
- t=v.targets
- f=v.formats
- variant=specification
- end
- end
- targets=t or d.targets
- target=targets[whereto] or target
- if f then
- d=d.formats
- else
- f=d.formats
- d=f
- end
- setmetatableindex(f,d)
- report_yes=f.report_yes
- report_nop=f.report_nop
- subreport_yes=f.subreport_yes
- subreport_nop=f.subreport_nop
- direct_yes=f.direct_yes
- direct_nop=f.direct_nop
- subdirect_yes=f.subdirect_yes
- subdirect_nop=f.subdirect_nop
- status_yes=f.status_yes
- status_nop=f.status_nop
- if variant=="ansi" or variant=="ansilog" then
- useluawrites()
- end
- settarget(whereto)
- end
- setformatters(variant)
- setlogfile=ignore
- settimedlog=ignore
-else
+do
local report_yes,subreport_yes,status_yes
local report_nop,subreport_nop,status_nop
local variants={
@@ -13675,46 +13517,6 @@ end)
directives.register("logs.target",function(v)
settarget(v)
end)
-if tex then
- local report=logs.reporter("pages")
- local texgetcount=tex and tex.getcount
- local real,user,sub=0,0,0
- function logs.start_page_number()
- real=texgetcount("realpageno")
- user=texgetcount("userpageno")
- sub=texgetcount("subpageno")
- end
- local timing=false
- local lasttime=nil
- trackers.register("pages.timing",function(v)
- timing=""
- end)
- function logs.stop_page_number()
- if timing then
- local elapsed=statistics.currenttime(statistics)
- local average,page
- if not lasttime or real<2 then
- average=elapsed
- page=elapsed
- else
- average=elapsed/(real-1)
- page=elapsed-lasttime
- end
- lasttime=elapsed
- timing=formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
- end
- if real<=0 then
- report("flushing page%s",timing)
- elseif user<=0 then
- report("flushing realpage %s%s",real,timing)
- elseif sub<=0 then
- report("flushing realpage %s, userpage %s%s",real,user,timing)
- else
- report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
- end
- logs.flush()
- end
-end
local nesting=0
local verbose=false
local hasscheme=url.hasscheme
@@ -13826,133 +13628,12 @@ function logs.system(whereto,process,jobname,category,fmt,arg,...)
end
end
local report_system=logs.reporter("system","logs")
-function logs.obsolete(old,new)
- local o=loadstring("return "..new)()
- if type(o)=="function" then
- return function(...)
- report_system("function %a is obsolete, use %a",old,new)
- loadstring(old.."="..new.." return "..old)()(...)
- end
- elseif type(o)=="table" then
- local t,m={},{}
- m.__index=function(t,k)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- return o[k]
- end
- m.__newindex=function(t,k,v)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- o[k]=v
- end
- if libraries then
- libraries.obsolete[old]=t
- end
- setmetatable(t,m)
- return t
- end
-end
if utilities then
utilities.report=report_system
end
-if tex and tex.error then
- function logs.texerrormessage(...)
- tex.error(format(...))
- end
-else
- function logs.texerrormessage(...)
- print(format(...))
- end
-end
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
-if tex then
- local finalactions={}
- local fatalerrors={}
- local possiblefatal={}
- local loggingerrors=false
- function logs.loggingerrors()
- return loggingerrors
- end
- directives.register("logs.errors",function(v)
- loggingerrors=v
- if type(v)=="string" then
- fatalerrors=settings_to_hash(v)
- else
- fatalerrors={}
- end
- end)
- function logs.registerfinalactions(...)
- insert(finalactions,...)
- end
- local what=nil
- local report=nil
- local state=nil
- local target=nil
- local function startlogging(t,r,w,s)
- target=t
- state=force
- force=true
- report=type(r)=="function" and r or logs.reporter(r)
- what=w
- pushtarget(target)
- newline()
- if s then
- report("start %s: %s",what,s)
- else
- report("start %s",what)
- end
- if target=="logfile" then
- newline()
- end
- return report
- end
- local function stoplogging()
- if target=="logfile" then
- newline()
- end
- report("stop %s",what)
- if target=="logfile" then
- newline()
- end
- poptarget()
- state=oldstate
- end
- function logs.startfilelogging(...)
- return startlogging("logfile",...)
- end
- logs.stopfilelogging=stoplogging
- local done=false
- function logs.starterrorlogging(r,w,...)
- if not done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","start possible issues")
- poptarget()
- done=true
- end
- if fatalerrors[w] then
- possiblefatal[w]=true
- end
- return startlogging("terminal",r,w,...)
- end
- logs.stoperrorlogging=stoplogging
- function logs.finalactions()
- if #finalactions>0 then
- for i=1,#finalactions do
- finalactions[i]()
- end
- if done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","stop possible issues")
- poptarget()
- end
- return next(possiblefatal) and sortedkeys(possiblefatal) or false
- end
- end
-end
end -- of closure
@@ -13961,7 +13642,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10184, stripped down to: 7500
+-- original size: 9740, stripped down to: 7296
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14055,10 +13736,8 @@ local function stoptiming(instance)
timer.loadtime=timer.loadtime+loadtime
timer.timing=0
timer.starttime=0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
local timer=timers[instance or "notimer"]
@@ -14135,18 +13814,11 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
- register("control sequences",function()
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
+ register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
register("callbacks",statistics.callbacks)
@@ -14160,15 +13832,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14224,6 +13891,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -15920,7 +15594,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-env"] = package.loaded["luat-env"] or true
--- original size: 6551, stripped down to: 4315
+-- original size: 6267, stripped down to: 4115
if not modules then modules={} end modules ['luat-env']={
version=1.001,
@@ -15948,14 +15622,6 @@ local mt={
else
return "unknown"
end
- elseif k=="kind" then
- local kind=texgettoks and texgettoks("contextkindtoks")
- if kind and kind~="" then
- rawset(environment,"kind",kind)
- return kind
- else
- return "unknown"
- end
elseif k=="jobname" or k=="formatname" then
local name=tex and tex[k]
if name or name=="" then
@@ -16530,7 +16196,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 61191, stripped down to: 35864
+-- original size: 61808, stripped down to: 36227
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17523,12 +17189,25 @@ local function xmlconvert(data,settings)
end
end
xml.convert=xmlconvert
-function xml.inheritedconvert(data,xmldata)
+function xml.inheritedconvert(data,xmldata,cleanup)
local settings=xmldata.settings
if settings then
settings.parent_root=xmldata
end
- local xc=xmlconvert(data,settings)
+ local xc=xmlconvert(data,settings)
+ if cleanup then
+ local x=xc.dt
+ if x then
+ x=x[1]
+ if x and x.tg=="@pi@" then
+ local dt=x.dt
+ local pi=dt and dt[1]
+ if type(pi)=="string" and find(pi,"^xml") then
+ remove(dt,1)
+ end
+ end
+ end
+ end
return xc
end
function xml.is_valid(root)
@@ -17586,9 +17265,17 @@ local function copy(old,p)
new[k]=t
elseif k=="dt" then
v.__p__=nil
- v=copy(v,new)
- new[k]=v
- v.__p__=p
+ local t={}
+ for i=1,#v do
+ local vi=v[i]
+ if type(vi)=="table" then
+ t[i]=copy(vi,new)
+ else
+ t[i]=vi
+ end
+ end
+ new[k]=t
+ t.__p__=p
else
new[k]=v
end
@@ -17992,7 +17679,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54626, stripped down to: 31255
+-- original size: 54667, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -18487,7 +18174,7 @@ local builtin={
local lp_builtin=lpeg.utfchartabletopattern(builtin)/builtin*((spaces*P("(")*spaces*P(")"))/"")
local lp_attribute=(P("@")+P("attribute::"))/""*Cc("(ll.at and ll.at['")*((R("az","AZ")+S("-_:"))^1)*Cc("'])")
local lp_fastpos_p=P("+")^0*R("09")^1*P(-1)/"l==%0"
-local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0==l))"
+local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0+1==l))"
local lp_fastpos=lp_fastpos_n+lp_fastpos_p
local lp_reserved=C("and")+C("or")+C("not")+C("div")+C("mod")+C("true")+C("false")
local lp_lua_function=Cs((R("az","AZ","__")^1*(P(".")*R("az","AZ","__")^1)^1)*("("))/"%0"
@@ -19312,7 +18999,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 30771, stripped down to: 19680
+-- original size: 33708, stripped down to: 20953
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -19330,7 +19017,7 @@ local xmlinheritedconvert=xml.inheritedconvert
local xmlapplylpath=xml.applylpath
local type,next,setmetatable,getmetatable=type,next,setmetatable,getmetatable
local insert,remove,fastcopy,concat=table.insert,table.remove,table.fastcopy,table.concat
-local gmatch,gsub,format,find,strip=string.gmatch,string.gsub,string.format,string.find,string.strip
+local gmatch,gsub,format,find,strip,match=string.gmatch,string.gsub,string.format,string.find,string.strip,string.match
local utfbyte=utf.byte
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local striplinepatterns=utilities.strings.striplinepatterns
@@ -19461,7 +19148,7 @@ local function xmltoelement(whatever,root)
end
local element
if type(whatever)=="string" then
- element=xmlinheritedconvert(whatever,root)
+ element=xmlinheritedconvert(whatever,root,true)
else
element=whatever
end
@@ -19474,15 +19161,18 @@ local function xmltoelement(whatever,root)
end
xml.toelement=xmltoelement
local function copiedelement(element,newparent)
- if type(element)=="string" then
- return element
- else
+ if type(element)~="string" then
element=xmlcopy(element).dt
if newparent and type(element)=="table" then
- element.__p__=newparent
+ for i=1,#element do
+ local e=element[i]
+ if type(e)=="table" then
+ e.__p__=newparent
+ end
+ end
end
- return element
end
+ return element
end
function xml.delete(root,pattern)
if not pattern or pattern=="" then
@@ -19521,6 +19211,32 @@ function xml.delete(root,pattern)
end
end
end
+function xml.wipe(root,pattern)
+ local collected=xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e=collected[c]
+ local p=e.__p__
+ if p then
+ local d=p.dt
+ local ni=e.ni
+ if ni<=#d then
+ local dt=e.dt
+ if #dt==1 then
+ local d1=dt[1]
+ if type(d1)=="string" and match(d1,"^%s*$") then
+ if trace_manipulations then
+ report('wiping',pattern,c,e)
+ end
+ remove(d,ni)
+ redo_ni(d)
+ end
+ end
+ end
+ end
+ end
+ end
+end
function xml.replace(root,pattern,whatever)
local element=root and xmltoelement(whatever,root)
local collected=element and xmlapplylpath(root,pattern)
@@ -19690,10 +19406,10 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
elseif ekat["parse"]=="text" then
epdt[ek.ni]=xml.escaped(data)
else
-local settings=xmldata.settings
-local savedresource=settings.currentresource
-settings.currentresource=name
- local xi=xmlinheritedconvert(data,xmldata)
+ local settings=xmldata.settings
+ local savedresource=settings.currentresource
+ settings.currentresource=name
+ local xi=xmlinheritedconvert(data,xmldata,true)
if not xi then
epdt[ek.ni]=""
else
@@ -19703,7 +19419,7 @@ settings.currentresource=name
local child=xml.body(xi)
child.__p__=ekrt
child.__f__=name
-child.cf=name
+ child.cf=name
epdt[ek.ni]=child
local settings=xmldata.settings
local inclusions=settings and settings.inclusions
@@ -19771,28 +19487,47 @@ end
local b_collapser=lpegpatterns.b_collapser
local m_collapser=lpegpatterns.m_collapser
local e_collapser=lpegpatterns.e_collapser
+local x_collapser=lpegpatterns.x_collapser
local b_stripper=lpegpatterns.b_stripper
local m_stripper=lpegpatterns.m_stripper
local e_stripper=lpegpatterns.e_stripper
-local function stripelement(e,nolines,anywhere)
+local x_stripper=lpegpatterns.x_stripper
+local function stripelement(e,nolines,anywhere,everything)
local edt=e.dt
if edt then
local n=#edt
if n==0 then
return e
+ elseif everything then
+ local t={}
+ local m=0
+ for i=1,n do
+ local str=edt[i]
+ if type(str)~="string" then
+ m=m+1
+ t[m]=str
+ elseif str~="" then
+ str=lpegmatch(x_collapser,str)
+ if str~="" then
+ m=m+1
+ t[m]=str
+ end
+ end
+ end
+ e.dt=t
elseif anywhere then
local t={}
local m=0
- for e=1,n do
- local str=edt[e]
+ for i=1,n do
+ local str=edt[i]
if type(str)~="string" then
m=m+1
t[m]=str
elseif str~="" then
if nolines then
- str=lpegmatch((n==1 and b_collapser) or (n==m and e_collapser) or m_collapser,str)
+ str=lpegmatch((i==1 and b_collapser) or (i==m and e_collapser) or m_collapser,str)
else
- str=lpegmatch((n==1 and b_stripper) or (n==m and e_stripper) or m_stripper,str)
+ str=lpegmatch((i==1 and b_stripper) or (i==m and e_stripper) or m_stripper,str)
end
if str~="" then
m=m+1
@@ -19834,14 +19569,27 @@ local function stripelement(e,nolines,anywhere)
return e
end
xml.stripelement=stripelement
-function xml.strip(root,pattern,nolines,anywhere)
+function xml.strip(root,pattern,nolines,anywhere,everything)
local collected=xmlapplylpath(root,pattern)
if collected then
for i=1,#collected do
- stripelement(collected[i],nolines,anywhere)
+ stripelement(collected[i],nolines,anywhere,everything)
+ end
+ end
+end
+local function compactelement(e)
+ local edt=e.dt
+ if edt then
+ for e=1,#edt do
+ local str=edt[e]
+ if type(str)=="string" and not find(str,"%S") then
+ edt[e]=""
+ end
end
end
+ return e
end
+xml.compactelement=compactelement
local function renamespace(root,oldspace,newspace)
local ndt=#root.dt
for i=1,ndt or 0 do
@@ -20790,7 +20538,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-ini"] = package.loaded["data-ini"] or true
--- original size: 10847, stripped down to: 7086
+-- original size: 10947, stripped down to: 7176
if not modules then modules={} end modules ['data-ini']={
version=1.001,
@@ -20836,7 +20584,8 @@ do
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//")
end
end
-do
+if not environment.homedir then
+ local oldhome=osgetenv('HOME')
local homedir=osgetenv(ostype=="windows" and 'USERPROFILE' or 'HOME') or ''
if not homedir or homedir=="" then
homedir=char(127)
@@ -20844,6 +20593,7 @@ do
homedir=file.collapsepath(homedir)
ossetenv("HOME",homedir)
ossetenv("USERPROFILE",homedir)
+ environment.oldhome=oldhome
environment.homedir=homedir
end
do
@@ -21449,7 +21199,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-env"] = package.loaded["data-env"] or true
--- original size: 9400, stripped down to: 6347
+-- original size: 9501, stripped down to: 6411
if not modules then modules={} end modules ['data-env']={
version=1.001,
@@ -21540,7 +21290,9 @@ local relations=allocate {
mp={
names={ "mp" },
variable='MPINPUTS',
- suffixes={ 'mp','mpvi','mpiv','mpxl','mpii' },
+ suffixes=CONTEXTLMTXMODE>0
+ and { 'mp','mpxl','mpvi','mpiv','mpii' }
+ or { 'mp','mpvi','mpiv','mpii' },
usertype=true,
},
tex={
@@ -21734,7 +21486,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16099, stripped down to: 11379
+-- original size: 16409, stripped down to: 11591
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -21984,7 +21736,10 @@ caches.getwritablepath=getwritablepath
caches.setfirstwritablefile=setfirstwritablefile
caches.getfirstreadablefile=getfirstreadablefile
caches.setluanames=setluanames
+local checkmemory=utilities and utilities.lua and utilities.lua.checkmemory
+local threshold=100
function caches.loaddata(readables,name,writable)
+ local used=checkmemory and checkmemory()
if type(readables)=="string" then
readables={ readables }
end
@@ -22011,7 +21766,11 @@ function caches.loaddata(readables,name,writable)
end
if loader then
loader=loader()
- collectgarbage("step")
+ if checkmemory then
+ checkmemory(used,threshold)
+ else
+ collectgarbage("step")
+ end
return loader
end
end
@@ -24110,7 +23869,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-fil"] = package.loaded["data-fil"] or true
--- original size: 4365, stripped down to: 3588
+-- original size: 4365, stripped down to: 3452
if not modules then modules={} end modules ['data-fil']={
version=1.001,
@@ -24130,7 +23889,6 @@ local scanfiles=resolvers.scanfiles
local registerfilehash=resolvers.registerfilehash
local appendhash=resolvers.appendhash
local loadcachecontent=caches.loadcontent
-local checkgarbage=utilities.garbagecollector and utilities.garbagecollector.check
function resolvers.locators.file(specification)
local filename=specification.filename
local realname=resolveprefix(filename)
@@ -24220,10 +23978,7 @@ function loaders.file(specification,filetype)
if trace_locating then
report_files("file loader: %a loaded",filename)
end
- local s=f:read("*a")
- if checkgarbage then
- checkgarbage(#s)
- end
+ local s=f:read("*a")
f:close()
if s then
return true,s,#s
@@ -24371,7 +24126,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-use"] = package.loaded["data-use"] or true
--- original size: 5790, stripped down to: 2910
+-- original size: 5785, stripped down to: 2905
if not modules then modules={} end modules ['data-use']={
version=1.001,
@@ -24387,7 +24142,7 @@ local resolvers=resolvers
local findfile=resolvers.findfile
statistics.register("used config file",function() return caches.configfiles() end)
statistics.register("used cache path",function() return caches.usedpaths() end)
-function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner)
+function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner)
local enginebanner=status.banner
if formatbanner and enginebanner and sourcefile then
local luvname=file.replacesuffix(texname,"luv")
@@ -25532,7 +25287,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["libs-ini"] = package.loaded["libs-ini"] or true
--- original size: 5822, stripped down to: 3629
+-- original size: 6459, stripped down to: 4006
if not modules then modules={} end modules ['libs-ini']={
version=1.001,
@@ -25542,7 +25297,7 @@ if not modules then modules={} end modules ['libs-ini']={
license="see context related readme files"
}
local type,unpack=type,unpack
-local type=type
+local find=string.find
local nameonly=file.nameonly
local joinfile=file.join
local addsuffix=file.addsuffix
@@ -25552,7 +25307,9 @@ local findfile=resolvers.findfile
local expandpaths=resolvers.expandedpathlistfromvariable
local report=logs.reporter("resolvers","libraries")
local trace=false
+local silent=false
trackers.register("resolvers.lib",function(v) trace=v end)
+trackers.register("resolvers.lib.silent",function(v) silent=v end)
local function findlib(required)
local suffix=os.libsuffix or "so"
if not qualifiedpath(required) then
@@ -25653,10 +25410,10 @@ function libraries.optionalloaded(name,libnames)
end
end
local initialized=thelib_initialize(unpack(libnames))
- if initialized then
- report("using library '% + t'",libnames)
- else
+ if not initialized then
report("unable to initialize library '% + t'",libnames)
+ elseif not silent then
+ report("using library '% + t'",libnames)
end
return initialized
end
@@ -25674,6 +25431,19 @@ if FFISUPPORTED and ffi and ffi.load then
end
end
end
+local dofile=dofile
+local savedrequire=require
+function require(name,version)
+ if find(name,"%.lua$") or find(name,"%.lmt$") then
+ local m=dofile(findfile(name))
+ if m then
+ package.loaded[name]=m
+ return m
+ end
+ else
+ return savedrequire(name)
+ end
+end
end -- of closure
@@ -25785,7 +25555,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 13843, stripped down to: 9991
+-- original size: 11691, stripped down to: 8350
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25836,27 +25606,26 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
- luatex=sandbox.registerrunner {
- name="make luatex format",
- program="luatex",
+ luametatex=sandbox.registerrunner {
+ name="make luametatex format",
+ program="luametatex",
template=template,
checkers=checkers,
reporter=report_format,
},
- luametatex=sandbox.registerrunner {
- name="make luametatex format",
- program="luametatex",
+ luatex=sandbox.registerrunner {
+ name="make luatex format",
+ program="luatex",
template=template,
checkers=checkers,
reporter=report_format,
@@ -25869,6 +25638,16 @@ local runners={
reporter=report_format,
},
}
+local stubfiles={
+ luametatex="luat-cod.lmt",
+ luatex="luat-cod.lua",
+ luajittex="luat-cod.lua",
+}
+local suffixes={
+ luametatex="mkxl",
+ luatex="mkiv",
+ luajittex="mkiv",
+}
local function validbinarypath()
if not environment.arguments.nobinarypath then
local path=environment.ownpath or file.dirname(environment.ownname)
@@ -25880,101 +25659,50 @@ local function validbinarypath()
end
end
end
+local function fatalerror(startupdir,...)
+ report_format(...)
+ lfs.chdir(startupdir)
+end
function environment.make_format(formatname)
local arguments=environment.arguments
local engine=environment.ownmain or "luatex"
local silent=arguments.silent
local errors=arguments.errors
- local texsourcename=""
- local texsourcepath=""
- local fulltexsourcename=""
- if engine=="luametatex" then
- texsourcename=file.addsuffix(formatname,"mkxl")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local runner=runners[engine]
+ local startupdir=dir.current()
+ if not runner then
+ return fatalerror(startupdir,"the format %a cannot be generated, no runner available for engine %a",name,engine)
end
- if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"mkiv")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local luasourcename=stubfiles[engine]
+ if not luasourcename then
+ return fatalerror(startupdir,"no lua stub file specified for %a",engine)
end
+ local texsourcename=file.addsuffix(formatname,suffixes[engine])
+ local fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"tex")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ return fatalerror(startupdir,"no tex source file with name %a (mkiv or tex)",formatname)
end
- if fulltexsourcename=="" then
- report_format("no tex source file with name %a (mkiv or tex)",formatname)
- return
- end
- report_format("using tex source file %a",fulltexsourcename)
- fulltexsourcename=dir.expandname(fulltexsourcename)
- texsourcepath=file.dirname(fulltexsourcename)
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
- end
- local specificationname="context.lus"
- local specificationpath=""
- local fullspecificationname=resolvers.findfile(specificationname) or ""
- if fullspecificationname=="" then
- report_format("unable to locate specification file %a",specificationname)
- return
- end
- report_format("using specification file %a",fullspecificationname)
- fullspecificationname=dir.expandname(fullspecificationname)
- specificationpath=file.dirname(fullspecificationname)
- if texsourcepath~=specificationpath then
- report_format("tex source file and specification file are on different paths")
- return
- end
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
+ local fulltexsourcename=dir.expandname(fulltexsourcename)
+ local texsourcepath=file.dirname(fulltexsourcename)
+ if lfs.isfile(fulltexsourcename) then
+ report_format("using tex source file %a",fulltexsourcename)
+ else
+ return fatalerror(startupdir,"no accessible tex source file with name %a",fulltexsourcename)
end
- if not lfs.isfile(fullspecificationname) then
- report_format("no accessible specification file with name %a",fulltexsourcename)
- return
+ local fullluasourcename=dir.expandname(file.join(texsourcepath,luasourcename) or "")
+ if lfs.isfile(fullluasourcename) then
+ report_format("using lua stub file %a",fullluasourcename)
+ else
+ return fatalerror(startupdir,"no accessible lua stub file with name %a",fulltexsourcename)
end
- report_format("using tex source path %a",texsourcepath)
local validformatpath=caches.getwritablepath("formats",engine) or ""
- local startupdir=dir.current()
if validformatpath=="" then
- report_format("invalid format path, insufficient write access")
- return
+ return fatalerror(startupdir,"invalid format path, insufficient write access")
end
local binarypath=validbinarypath()
report_format("changing to format path %a",validformatpath)
- lfs.chdir(validformatpath)
- if dir.current()~=validformatpath then
- report_format("unable to change to format path %a",validformatpath)
- return
- end
- local usedluastub=nil
- local usedlualibs=dofile(fullspecificationname)
- if type(usedlualibs)=="string" then
- usedluastub=file.join(specificationpath,usedlualibs)
- elseif type(usedlualibs)=="table" then
- report_format("using stub specification %a",fullspecificationname)
- local texbasename=file.basename(name)
- local luastubname=file.addsuffix(texbasename,luasuffixes.lua)
- local lucstubname=file.addsuffix(texbasename,luasuffixes.luc)
- report_format("creating initialization file %a",luastubname)
- utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
- if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- report_format("using compiled initialization file %a",lucstubname)
- usedluastub=lucstubname
- else
- report_format("using uncompiled initialization file %a",luastubname)
- usedluastub=luastubname
- end
- else
- report_format("invalid stub specification %a",fullspecificationname)
- lfs.chdir(startupdir)
- return
- end
- local runner=runners[engine]
- if not runner then
- report_format("the format %a cannot be generated, no runner available for engine %a",name,engine)
- lfs.chdir(startupdir)
- return
+ if not lfs.chdir(validformatpath) then
+ return fatalerror(startupdir,"unable to change to format path %a",validformatpath)
end
local primaryflags=primaryflags(arguments)
local secondaryflags=secondaryflags(arguments)
@@ -25982,9 +25710,8 @@ function environment.make_format(formatname)
binarypath=binarypath,
primaryflags=primaryflags,
secondaryflags=secondaryflags,
- luafile=quoted(usedluastub),
+ luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26001,7 +25728,7 @@ function environment.make_format(formatname)
end
report_format("format path : %s",validformatpath)
report_format("luatex engine : %s",engine)
- report_format("lua startup file : %s",usedluastub)
+ report_format("lua startup file : %s",fullluasourcename)
if primaryflags~="" then
report_format("primary flags : %s",primaryflags)
end
@@ -26083,9 +25810,9 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
luafile=quoted(scriptname),
texfile=filename~="" and quoted(filename) or "",
}
- statistics.starttiming()
+ statistics.starttiming("make format")
local result=runner(specification)
- local runtime=statistics.stoptiming()
+ statistics.stoptiming("make format")
if verbose then
report_format()
if binarypath and binarypath~="" then
@@ -26103,7 +25830,7 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
if secondaryflags~="" then
report_format("secondary flags : %s",secondaryflags)
end
- report_format("run time : %.3f seconds",runtime)
+ report_format("run time : %0.3f seconds",statistics.elapsed("make format"))
report_format("return value : %s",result==0 and "okay" or "error")
report_format()
end
@@ -26115,8 +25842,8 @@ end -- of closure
-- 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 : 1038373
--- stripped bytes : 409980
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
@@ -26771,12 +26498,14 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
end
function runners.save_script_session(filename, list)
- local t = { }
- for i=1,#list do
- local key = list[i]
- t[key] = environment.arguments[key]
+ if type(list) == "table" then
+ local t = { }
+ for i=1,#list do
+ local key = list[i]
+ t[key] = environment.arguments[key]
+ end
+ io.savedata(filename,table.serialize(t,true))
end
- io.savedata(filename,table.serialize(t,true))
end
function runners.load_script_session(filename)
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
index 6eaf5ff449f..6fc17adb022 100755
--- a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
+++ b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -852,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11605, stripped down to: 8299
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -861,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -891,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -907,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1040,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1082,11 +1087,18 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
methods["preload table"]=function(name)
- return builtin["preload table"](name)
+ local f=builtin["preload table"]
+ if f then
+ return f(name)
+ end
end
methods["qualified path"]=function(name)
return loadedbyname(addsuffix(lualibfile(name),"lua"),name)
@@ -1098,19 +1110,31 @@ methods["lib extra list"]=function(name)
return loadedbypath(addsuffix(lualibfile(name),os.libsuffix),name,getextralibpaths(),true,"lib")
end
methods["path specification"]=function(name)
- getluapaths()
- return builtin["path specification"](name)
+ local f=builtin["path specification"]
+ if f then
+ getluapaths()
+ return f(name)
+ end
end
methods["cpath specification"]=function(name)
- getlibpaths()
- return builtin["cpath specification"](name)
+ local f=builtin["cpath specification"]
+ if f then
+ getlibpaths()
+ return f(name)
+ end
end
methods["all in one fallback"]=function(name)
- return builtin["all in one fallback"](name)
+ local f=builtin["all in one fallback"]
+ if f then
+ return f(name)
+ end
end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -1122,19 +1146,22 @@ function helpers.loaded(name)
level=level+1
for i=1,#sequence do
local method=sequence[i]
- if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
- end
- local result,rest=methods[method](name)
- if type(result)=="function" then
+ local lookup=method and methods[method]
+ if type(lookup)=="function" then
if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
end
- if helpers.traceused then
- used[#used+1]={ level=level,name=name }
+ local result,rest=lookup(name)
+ if type(result)=="function" then
+ if helpers.trace then
+ helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
+ level=level-1
+ return result,rest
end
- level=level-1
- return result,rest
end
end
level=level-1
@@ -1174,7 +1201,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 38440, stripped down to: 19316
+-- original size: 38703, stripped down to: 19489
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1272,11 +1299,13 @@ local fullstripper=whitespace^0*C((whitespace^0*nonwhitespace^1)^0)
local collapser=Cs(spacer^0/""*nonspacer^0*((spacer^0/" "*nonspacer^1)^0))
local nospacer=Cs((whitespace^1/""+nonwhitespace^1)^0)
local b_collapser=Cs(whitespace^0/""*(nonwhitespace^1+whitespace^1/" ")^0)
-local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
local m_collapser=Cs((nonwhitespace^1+whitespace^1/" ")^0)
+local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
+local x_collapser=Cs((nonwhitespace^1+whitespace^1/"" )^0)
local b_stripper=Cs(spacer^0/""*(nonspacer^1+spacer^1/" ")^0)
-local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
local m_stripper=Cs((nonspacer^1+spacer^1/" ")^0)
+local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
+local x_stripper=Cs((nonspacer^1+spacer^1/"" )^0)
patterns.stripper=stripper
patterns.fullstripper=fullstripper
patterns.collapser=collapser
@@ -1284,9 +1313,11 @@ patterns.nospacer=nospacer
patterns.b_collapser=b_collapser
patterns.m_collapser=m_collapser
patterns.e_collapser=e_collapser
+patterns.x_collapser=x_collapser
patterns.b_stripper=b_stripper
patterns.m_stripper=m_stripper
patterns.e_stripper=e_stripper
+patterns.x_stripper=x_stripper
patterns.lowercase=lowercase
patterns.uppercase=uppercase
patterns.letter=patterns.lowercase+patterns.uppercase
@@ -3806,7 +3837,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 19120, stripped down to: 10208
+-- original size: 19409, stripped down to: 10419
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4029,6 +4060,8 @@ elseif name=="macosx" then
platform="osx-intel"
elseif find(architecture,"x86_64",1,true) then
platform="osx-64"
+ elseif find(architecture,"arm64",1,true) then
+ platform="osx-64"
else
platform="osx-ppc"
end
@@ -4200,11 +4233,19 @@ local function isleapyear(year)
end
os.isleapyear=isleapyear
local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
-local function nofdays(year,month)
+local function nofdays(year,month,day)
if not month then
return isleapyear(year) and 365 or 364
- else
+ elseif not day then
return month==2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day=day+days[i]
+ end
+ if month>2 and isleapyear(year) then
+ day=day+1
+ end
+ return day
end
end
os.nofdays=nofdays
@@ -5729,10 +5770,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-unicode"] = package.loaded["l-unicode"] or true
--- original size: 41281, stripped down to: 17261
+-- original size: 41303, stripped down to: 17277
if not modules then modules={} end modules ['l-unicode']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -6563,7 +6605,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 45153, stripped down to: 22734
+-- original size: 45129, stripped down to: 23525
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -6615,25 +6657,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -6911,7 +6987,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -7106,10 +7184,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -7219,33 +7305,36 @@ local format_extension=function(extensions,f,name)
local extension=extensions[name] or "tostring(%s)"
local f=tonumber(f) or 1
local w=find(extension,"%.%.%.")
- if w then
- if f==0 then
+ if f==0 then
+ if w then
extension=gsub(extension,"%.%.%.","")
- return extension
- elseif f==1 then
+ end
+ return extension
+ elseif f==1 then
+ if w then
extension=gsub(extension,"%.%.%.","%%s")
- n=n+1
- local a="a"..n
- return format(extension,a,a)
- elseif f<0 then
+ end
+ n=n+1
+ local a="a"..n
+ return format(extension,a,a)
+ elseif f<0 then
+ if w then
+ extension=gsub(extension,"%.%.%.","")
+ return extension
+ else
local a="a"..(n+f+1)
return format(extension,a,a)
- else
- extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- local t={}
- for i=1,f do
- n=n+1
- t[i]="a"..n
- end
- return format(extension,unpack(t))
end
else
- extension=gsub(extension,"%%s",function()
+ if w then
+ extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ local t={}
+ for i=1,f do
n=n+1
- return "a"..n
- end)
- return extension
+ t[i]="a"..n
+ end
+ return format(extension,unpack(t))
end
end
local builder=Cs { "start",
@@ -7259,7 +7348,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -7297,7 +7386,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -7448,7 +7539,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 32649, stripped down to: 18257
+-- original size: 32815, stripped down to: 18257
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8194,10 +8285,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 11530, stripped down to: 9007
+-- original size: 11552, stripped down to: 9023
if not modules then modules={} end modules ['util-fil']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -8562,10 +8654,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 12946, stripped down to: 9507
+-- original size: 12968, stripped down to: 9523
if not modules then modules={} end modules ['util-sac']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -9215,7 +9308,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 24132, stripped down to: 16210
+-- original size: 24683, stripped down to: 16431
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9228,7 +9321,7 @@ local lpeg,table,string=lpeg,table,string
local P,R,V,S,C,Ct,Cs,Carg,Cc,Cg,Cf,Cp=lpeg.P,lpeg.R,lpeg.V,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.Carg,lpeg.Cc,lpeg.Cg,lpeg.Cf,lpeg.Cp
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local concat,gmatch,find=table.concat,string.gmatch,string.find
-local tostring,type,next,rawset=tostring,type,next,rawset
+local tonumber,tostring,type,next,rawset=tonumber,tostring,type,next,rawset
local mod,div=math.mod,math.div
utilities=utilities or {}
local parsers=utilities.parsers or {}
@@ -9620,13 +9713,15 @@ function parsers.csvsplitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
local separator=specification.separator
local quotechar=specification.quote
+ local numbers=specification.numbers
local separator=S(separator~="" and separator or ",")
local whatever=C((1-separator-newline)^0)
if quotechar and quotechar~="" then
local quotedata=nil
for chr in gmatch(quotechar,".") do
local quotechar=P(chr)
- local quoteword=quotechar*C((1-quotechar)^0)*quotechar
+ local quoteitem=(1-quotechar)^0
+ local quoteword=quotechar*(numbers and (quoteitem/tonumber) or C(quoteitem))*quotechar
if quotedata then
quotedata=quotedata+quoteword
else
@@ -9642,12 +9737,14 @@ function parsers.csvsplitter(specification)
end
function parsers.rfc4180splitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
+ local numbers=specification.numbers
local separator=specification.separator
local quotechar=P(specification.quote)
local dquotechar=quotechar*quotechar
/specification.quote
local separator=S(separator~="" and separator or ",")
- local escaped=quotechar*Cs((dquotechar+(1-quotechar))^0)*quotechar
+ local whatever=(dquotechar+(1-quotechar))^0
+ local escaped=quotechar*(numbers and (whatever/tonumber) or Cs(whatever))*quotechar
local non_escaped=C((1-quotechar-newline-separator)^1)
local field=escaped+non_escaped+Cc("")
local record=Ct(field*(separator*field)^1)
@@ -11718,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11763,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11773,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11799,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11810,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -12712,7 +12809,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-set"] = package.loaded["trac-set"] or true
--- original size: 13394, stripped down to: 8882
+-- original size: 13901, stripped down to: 9175
if not modules then modules={} end modules ['trac-set']={
version=1.001,
@@ -12735,7 +12832,7 @@ utilities.setters=setters
local data={}
local trace_initialize=false
local frozen=true
-function setters.initialize(filename,name,values)
+local function initialize_setter(filename,name,values)
local setter=data[name]
if setter then
local data=setter.data
@@ -12776,8 +12873,8 @@ function setters.initialize(filename,name,values)
end
end
local function set(t,what,newvalue)
- local data=t.data
- if not data.frozen then
+ local data=t.data
+ if data and not data.frozen then
local done=t.done
if type(what)=="string" then
what=settings_to_hash(what)
@@ -12813,7 +12910,7 @@ local function set(t,what,newvalue)
end
local function reset(t)
local data=t.data
- if not data.frozen then
+ if data and not data.frozen then
for name,functions in sortedthash(data) do
for i=1,#functions do
functions[i](false)
@@ -12834,7 +12931,7 @@ local function disable(t,what)
set(t,what,false)
end
end
-function setters.register(t,what,...)
+local function register_setter(t,what,...)
local data=t.data
what=lower(what)
local functions=data[what]
@@ -12869,23 +12966,24 @@ function setters.register(t,what,...)
end
return false
end
-function setters.enable(t,what)
+local function enable_setter(t,what)
local e=t.enable
t.enable,t.done=enable,{}
+ set(t,what,true)
enable(t,what)
t.enable,t.done=e,{}
end
-function setters.disable(t,what)
+local function disable_setter(t,what)
local e=t.disable
t.disable,t.done=disable,{}
disable(t,what)
t.disable,t.done=e,{}
end
-function setters.reset(t)
+local function reset_setter(t)
t.done={}
reset(t)
end
-function setters.list(t)
+local function list_setter(t)
local list=table.sortedkeys(t.data)
local user,system={},{}
for l=1,#list do
@@ -12898,8 +12996,8 @@ function setters.list(t)
end
return user,system
end
-function setters.show(t)
- local list=setters.list(t)
+local function show_setter(t)
+ local list=list_setter(t)
t.report()
for k=1,#list do
local name=list[k]
@@ -12930,39 +13028,50 @@ function setters.show(t)
end
end
end
-local enable,disable,register,list,show=setters.enable,setters.disable,setters.register,setters.list,setters.show
function setters.report(setter,fmt,...)
- print(formatters["%-15s : %s\n"](setter.name,formatters[fmt](...)))
+ if fmt then
+ print(formatters["%-15s : %s"](setter.name,formatters[fmt](...)))
+ else
+ print("")
+ end
end
-local function default(setter,name)
+local function setter_default(setter,name)
local d=setter.data[name]
return d and d.default
end
-local function value(setter,name)
+local function setter_value(setter,name)
local d=setter.data[name]
return d and (d.value or d.default)
end
-function setters.new(name)
+local function new_setter(name)
local setter
setter={
data=allocate(),
name=name,
- report=function(...) setters.report (setter,...) end,
- enable=function(...) enable (setter,...) end,
- disable=function(...) disable (setter,...) end,
- reset=function(...) reset (setter,...) end,
- register=function(...) register(setter,...) end,
- list=function(...) return list (setter,...) end,
- show=function(...) show (setter,...) end,
- default=function(...) return default (setter,...) end,
- value=function(...) return value (setter,...) end,
+ report=function(...) setters.report (setter,...) end,
+ enable=function(...) enable_setter (setter,...) end,
+ disable=function(...) disable_setter (setter,...) end,
+ reset=function(...) reset_setter (setter,...) end,
+ register=function(...) register_setter(setter,...) end,
+ list=function(...) return list_setter (setter,...) end,
+ show=function(...) show_setter (setter,...) end,
+ default=function(...) return setter_default (setter,...) end,
+ value=function(...) return setter_value (setter,...) end,
}
data[name]=setter
return setter
end
-trackers=setters.new("trackers")
-directives=setters.new("directives")
-experiments=setters.new("experiments")
+setters.enable=enable_setter
+setters.disable=disable_setter
+setters.register=register_setter
+setters.list=list_setter
+setters.show=show_setter
+setters.reset=reset_setter
+setters.new=new_setter
+setters.initialize=initialize_setter
+trackers=new_setter("trackers")
+directives=new_setter("directives")
+experiments=new_setter("experiments")
local t_enable,t_disable=trackers .enable,trackers .disable
local d_enable,d_disable=directives .enable,directives .disable
local e_enable,e_disable=experiments.enable,experiments.disable
@@ -13009,11 +13118,11 @@ if environment then
if engineflags then
local list=engineflags["c:trackers"] or engineflags["trackers"]
if type(list)=="string" then
- setters.initialize("commandline flags","trackers",settings_to_hash(list))
+ initialize_setter("commandline flags","trackers",settings_to_hash(list))
end
local list=engineflags["c:directives"] or engineflags["directives"]
if type(list)=="string" then
- setters.initialize("commandline flags","directives",settings_to_hash(list))
+ initialize_setter("commandline flags","directives",settings_to_hash(list))
end
end
end
@@ -13055,7 +13164,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 33003, stripped down to: 21667
+-- original size: 16017, stripped down to: 11045
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13071,9 +13180,8 @@ local topattern=string.topattern
local utfchar=utf.char
local datetime=os.date
local openfile=io.open
-local runningtex=tex and (tex.jobname or tex.formatname)
-local write_nl=runningtex and texio and texio.write_nl or print
-local write=runningtex and texio and texio.write or io.write
+local write_nl=print
+local write=io.write
local setmetatableindex=table.setmetatableindex
local formatters=string.formatters
local settings_to_hash=utilities.parsers.settings_to_hash
@@ -13109,273 +13217,7 @@ local function ansisupported(specification)
return false
end
end
-if runningtex and texio then
- if texio.setescape then
- texio.setescape(0)
- end
- if arg and ansisupported then
- for k,v in next,arg do
- if v=="--ansi" or v=="--c:ansi" then
- if ansisupported("ansi") then
- variant="ansi"
- end
- break
- elseif v=="--ansilog" or v=="--c:ansilog" then
- if ansisupported("ansilog") then
- variant="ansilog"
- end
- break
- end
- end
- end
- local function useluawrites()
- local texio_write_nl=texio.write_nl
- local texio_write=texio.write
- local io_write=io.write
- write_nl=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write_nl("log",...)
- texio_write_nl("term","")
- io_write(...)
- elseif target=="log" then
- texio_write_nl("log",...)
- elseif target=="term" then
- texio_write_nl("term","")
- io_write(...)
- elseif type(target)=="number" then
- texio_write_nl(target,...)
- elseif target~="none" then
- texio_write_nl("log",target,...)
- texio_write_nl("term","")
- io_write(target,...)
- end
- end
- write=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write("log",...)
- io_write(...)
- elseif target=="log" then
- texio_write("log",...)
- elseif target=="term" then
- io_write(...)
- elseif type(target)=="number" then
- texio_write(target,...)
- elseif target~="none" then
- texio_write("log",target,...)
- io_write(target,...)
- end
- end
- texio.write=write
- texio.write_nl=write_nl
- useluawrites=ignore
- end
- local whereto="both"
- local target=nil
- local targets=nil
- local formats=table.setmetatableindex("self")
- local translations=table.setmetatableindex("self")
- local report_yes,subreport_yes,direct_yes,subdirect_yes,status_yes
- local report_nop,subreport_nop,direct_nop,subdirect_nop,status_nop
- local variants={
- default={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="log",
- log="log",
- file="log",
- console="term",
- terminal="term",
- both="term and log",
- },
- },
- ansi={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="none",
- log="none",
- file="none",
- console="term",
- terminal="term",
- both="term",
- },
- }
- }
- variants.ansilog={
- formats=variants.ansi.formats,
- targets=variants.default.targets,
- }
- logs.flush=io.flush
- writer=function(...)
- write_nl(target,...)
- end
- newline=function()
- write_nl(target,"\n")
- end
- report=function(a,b,c,...)
- if c~=nil then
- write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,report_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,report_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- direct=function(a,b,c,...)
- if c~=nil then
- return direct_yes(translations[a],formatters[formats[b]](c,...))
- elseif b then
- return direct_yes(translations[a],formats[b])
- elseif a then
- return direct_nop(translations[a])
- else
- return ""
- end
- end
- subreport=function(a,s,b,c,...)
- if c~=nil then
- write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
- elseif a then
- write_nl(target,subreport_nop(translations[a],translations[s]))
- else
- write_nl(target,"\n")
- end
- end
- subdirect=function(a,s,b,c,...)
- if c~=nil then
- return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
- elseif b then
- return subdirect_yes(translations[a],translations[s],formats[b])
- elseif a then
- return subdirect_nop(translations[a],translations[s])
- else
- return ""
- end
- end
- status=function(a,b,c,...)
- if c~=nil then
- write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,status_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,status_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- settarget=function(askedwhereto)
- whereto=askedwhereto or whereto or "both"
- target=targets[whereto]
- if not target then
- whereto="both"
- target=targets[whereto]
- end
- if target=="term" or target=="term and log" then
- logs.flush=io.flush
- else
- logs.flush=ignore
- end
- end
- local stack={}
- pushtarget=function(newtarget)
- insert(stack,target)
- settarget(newtarget)
- end
- poptarget=function()
- if #stack>0 then
- settarget(remove(stack))
- end
- end
- setformats=function(f)
- formats=f
- end
- settranslations=function(t)
- translations=t
- end
- setprocessor=function(f)
- local writeline=write_nl
- write_nl=function(target,...)
- writeline(target,f(...))
- end
- end
- setformatters=function(specification)
- local t=nil
- local f=nil
- local d=variants.default
- if not specification then
- elseif type(specification)=="table" then
- t=specification.targets
- f=specification.formats or specification
- else
- if not ansisupported(specification) then
- specification="default"
- end
- local v=variants[specification]
- if v then
- t=v.targets
- f=v.formats
- variant=specification
- end
- end
- targets=t or d.targets
- target=targets[whereto] or target
- if f then
- d=d.formats
- else
- f=d.formats
- d=f
- end
- setmetatableindex(f,d)
- report_yes=f.report_yes
- report_nop=f.report_nop
- subreport_yes=f.subreport_yes
- subreport_nop=f.subreport_nop
- direct_yes=f.direct_yes
- direct_nop=f.direct_nop
- subdirect_yes=f.subdirect_yes
- subdirect_nop=f.subdirect_nop
- status_yes=f.status_yes
- status_nop=f.status_nop
- if variant=="ansi" or variant=="ansilog" then
- useluawrites()
- end
- settarget(whereto)
- end
- setformatters(variant)
- setlogfile=ignore
- settimedlog=ignore
-else
+do
local report_yes,subreport_yes,status_yes
local report_nop,subreport_nop,status_nop
local variants={
@@ -13675,46 +13517,6 @@ end)
directives.register("logs.target",function(v)
settarget(v)
end)
-if tex then
- local report=logs.reporter("pages")
- local texgetcount=tex and tex.getcount
- local real,user,sub=0,0,0
- function logs.start_page_number()
- real=texgetcount("realpageno")
- user=texgetcount("userpageno")
- sub=texgetcount("subpageno")
- end
- local timing=false
- local lasttime=nil
- trackers.register("pages.timing",function(v)
- timing=""
- end)
- function logs.stop_page_number()
- if timing then
- local elapsed=statistics.currenttime(statistics)
- local average,page
- if not lasttime or real<2 then
- average=elapsed
- page=elapsed
- else
- average=elapsed/(real-1)
- page=elapsed-lasttime
- end
- lasttime=elapsed
- timing=formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
- end
- if real<=0 then
- report("flushing page%s",timing)
- elseif user<=0 then
- report("flushing realpage %s%s",real,timing)
- elseif sub<=0 then
- report("flushing realpage %s, userpage %s%s",real,user,timing)
- else
- report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
- end
- logs.flush()
- end
-end
local nesting=0
local verbose=false
local hasscheme=url.hasscheme
@@ -13826,133 +13628,12 @@ function logs.system(whereto,process,jobname,category,fmt,arg,...)
end
end
local report_system=logs.reporter("system","logs")
-function logs.obsolete(old,new)
- local o=loadstring("return "..new)()
- if type(o)=="function" then
- return function(...)
- report_system("function %a is obsolete, use %a",old,new)
- loadstring(old.."="..new.." return "..old)()(...)
- end
- elseif type(o)=="table" then
- local t,m={},{}
- m.__index=function(t,k)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- return o[k]
- end
- m.__newindex=function(t,k,v)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- o[k]=v
- end
- if libraries then
- libraries.obsolete[old]=t
- end
- setmetatable(t,m)
- return t
- end
-end
if utilities then
utilities.report=report_system
end
-if tex and tex.error then
- function logs.texerrormessage(...)
- tex.error(format(...))
- end
-else
- function logs.texerrormessage(...)
- print(format(...))
- end
-end
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
-if tex then
- local finalactions={}
- local fatalerrors={}
- local possiblefatal={}
- local loggingerrors=false
- function logs.loggingerrors()
- return loggingerrors
- end
- directives.register("logs.errors",function(v)
- loggingerrors=v
- if type(v)=="string" then
- fatalerrors=settings_to_hash(v)
- else
- fatalerrors={}
- end
- end)
- function logs.registerfinalactions(...)
- insert(finalactions,...)
- end
- local what=nil
- local report=nil
- local state=nil
- local target=nil
- local function startlogging(t,r,w,s)
- target=t
- state=force
- force=true
- report=type(r)=="function" and r or logs.reporter(r)
- what=w
- pushtarget(target)
- newline()
- if s then
- report("start %s: %s",what,s)
- else
- report("start %s",what)
- end
- if target=="logfile" then
- newline()
- end
- return report
- end
- local function stoplogging()
- if target=="logfile" then
- newline()
- end
- report("stop %s",what)
- if target=="logfile" then
- newline()
- end
- poptarget()
- state=oldstate
- end
- function logs.startfilelogging(...)
- return startlogging("logfile",...)
- end
- logs.stopfilelogging=stoplogging
- local done=false
- function logs.starterrorlogging(r,w,...)
- if not done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","start possible issues")
- poptarget()
- done=true
- end
- if fatalerrors[w] then
- possiblefatal[w]=true
- end
- return startlogging("terminal",r,w,...)
- end
- logs.stoperrorlogging=stoplogging
- function logs.finalactions()
- if #finalactions>0 then
- for i=1,#finalactions do
- finalactions[i]()
- end
- if done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","stop possible issues")
- poptarget()
- end
- return next(possiblefatal) and sortedkeys(possiblefatal) or false
- end
- end
-end
end -- of closure
@@ -13961,7 +13642,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10184, stripped down to: 7500
+-- original size: 9740, stripped down to: 7296
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14055,10 +13736,8 @@ local function stoptiming(instance)
timer.loadtime=timer.loadtime+loadtime
timer.timing=0
timer.starttime=0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
local timer=timers[instance or "notimer"]
@@ -14135,18 +13814,11 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
- register("control sequences",function()
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
+ register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
register("callbacks",statistics.callbacks)
@@ -14160,15 +13832,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14224,6 +13891,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -15920,7 +15594,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-env"] = package.loaded["luat-env"] or true
--- original size: 6551, stripped down to: 4315
+-- original size: 6267, stripped down to: 4115
if not modules then modules={} end modules ['luat-env']={
version=1.001,
@@ -15948,14 +15622,6 @@ local mt={
else
return "unknown"
end
- elseif k=="kind" then
- local kind=texgettoks and texgettoks("contextkindtoks")
- if kind and kind~="" then
- rawset(environment,"kind",kind)
- return kind
- else
- return "unknown"
- end
elseif k=="jobname" or k=="formatname" then
local name=tex and tex[k]
if name or name=="" then
@@ -16530,7 +16196,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 61191, stripped down to: 35864
+-- original size: 61808, stripped down to: 36227
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17523,12 +17189,25 @@ local function xmlconvert(data,settings)
end
end
xml.convert=xmlconvert
-function xml.inheritedconvert(data,xmldata)
+function xml.inheritedconvert(data,xmldata,cleanup)
local settings=xmldata.settings
if settings then
settings.parent_root=xmldata
end
- local xc=xmlconvert(data,settings)
+ local xc=xmlconvert(data,settings)
+ if cleanup then
+ local x=xc.dt
+ if x then
+ x=x[1]
+ if x and x.tg=="@pi@" then
+ local dt=x.dt
+ local pi=dt and dt[1]
+ if type(pi)=="string" and find(pi,"^xml") then
+ remove(dt,1)
+ end
+ end
+ end
+ end
return xc
end
function xml.is_valid(root)
@@ -17586,9 +17265,17 @@ local function copy(old,p)
new[k]=t
elseif k=="dt" then
v.__p__=nil
- v=copy(v,new)
- new[k]=v
- v.__p__=p
+ local t={}
+ for i=1,#v do
+ local vi=v[i]
+ if type(vi)=="table" then
+ t[i]=copy(vi,new)
+ else
+ t[i]=vi
+ end
+ end
+ new[k]=t
+ t.__p__=p
else
new[k]=v
end
@@ -17992,7 +17679,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54626, stripped down to: 31255
+-- original size: 54667, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -18487,7 +18174,7 @@ local builtin={
local lp_builtin=lpeg.utfchartabletopattern(builtin)/builtin*((spaces*P("(")*spaces*P(")"))/"")
local lp_attribute=(P("@")+P("attribute::"))/""*Cc("(ll.at and ll.at['")*((R("az","AZ")+S("-_:"))^1)*Cc("'])")
local lp_fastpos_p=P("+")^0*R("09")^1*P(-1)/"l==%0"
-local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0==l))"
+local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0+1==l))"
local lp_fastpos=lp_fastpos_n+lp_fastpos_p
local lp_reserved=C("and")+C("or")+C("not")+C("div")+C("mod")+C("true")+C("false")
local lp_lua_function=Cs((R("az","AZ","__")^1*(P(".")*R("az","AZ","__")^1)^1)*("("))/"%0"
@@ -19312,7 +18999,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 30771, stripped down to: 19680
+-- original size: 33708, stripped down to: 20953
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -19330,7 +19017,7 @@ local xmlinheritedconvert=xml.inheritedconvert
local xmlapplylpath=xml.applylpath
local type,next,setmetatable,getmetatable=type,next,setmetatable,getmetatable
local insert,remove,fastcopy,concat=table.insert,table.remove,table.fastcopy,table.concat
-local gmatch,gsub,format,find,strip=string.gmatch,string.gsub,string.format,string.find,string.strip
+local gmatch,gsub,format,find,strip,match=string.gmatch,string.gsub,string.format,string.find,string.strip,string.match
local utfbyte=utf.byte
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local striplinepatterns=utilities.strings.striplinepatterns
@@ -19461,7 +19148,7 @@ local function xmltoelement(whatever,root)
end
local element
if type(whatever)=="string" then
- element=xmlinheritedconvert(whatever,root)
+ element=xmlinheritedconvert(whatever,root,true)
else
element=whatever
end
@@ -19474,15 +19161,18 @@ local function xmltoelement(whatever,root)
end
xml.toelement=xmltoelement
local function copiedelement(element,newparent)
- if type(element)=="string" then
- return element
- else
+ if type(element)~="string" then
element=xmlcopy(element).dt
if newparent and type(element)=="table" then
- element.__p__=newparent
+ for i=1,#element do
+ local e=element[i]
+ if type(e)=="table" then
+ e.__p__=newparent
+ end
+ end
end
- return element
end
+ return element
end
function xml.delete(root,pattern)
if not pattern or pattern=="" then
@@ -19521,6 +19211,32 @@ function xml.delete(root,pattern)
end
end
end
+function xml.wipe(root,pattern)
+ local collected=xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e=collected[c]
+ local p=e.__p__
+ if p then
+ local d=p.dt
+ local ni=e.ni
+ if ni<=#d then
+ local dt=e.dt
+ if #dt==1 then
+ local d1=dt[1]
+ if type(d1)=="string" and match(d1,"^%s*$") then
+ if trace_manipulations then
+ report('wiping',pattern,c,e)
+ end
+ remove(d,ni)
+ redo_ni(d)
+ end
+ end
+ end
+ end
+ end
+ end
+end
function xml.replace(root,pattern,whatever)
local element=root and xmltoelement(whatever,root)
local collected=element and xmlapplylpath(root,pattern)
@@ -19690,10 +19406,10 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
elseif ekat["parse"]=="text" then
epdt[ek.ni]=xml.escaped(data)
else
-local settings=xmldata.settings
-local savedresource=settings.currentresource
-settings.currentresource=name
- local xi=xmlinheritedconvert(data,xmldata)
+ local settings=xmldata.settings
+ local savedresource=settings.currentresource
+ settings.currentresource=name
+ local xi=xmlinheritedconvert(data,xmldata,true)
if not xi then
epdt[ek.ni]=""
else
@@ -19703,7 +19419,7 @@ settings.currentresource=name
local child=xml.body(xi)
child.__p__=ekrt
child.__f__=name
-child.cf=name
+ child.cf=name
epdt[ek.ni]=child
local settings=xmldata.settings
local inclusions=settings and settings.inclusions
@@ -19771,28 +19487,47 @@ end
local b_collapser=lpegpatterns.b_collapser
local m_collapser=lpegpatterns.m_collapser
local e_collapser=lpegpatterns.e_collapser
+local x_collapser=lpegpatterns.x_collapser
local b_stripper=lpegpatterns.b_stripper
local m_stripper=lpegpatterns.m_stripper
local e_stripper=lpegpatterns.e_stripper
-local function stripelement(e,nolines,anywhere)
+local x_stripper=lpegpatterns.x_stripper
+local function stripelement(e,nolines,anywhere,everything)
local edt=e.dt
if edt then
local n=#edt
if n==0 then
return e
+ elseif everything then
+ local t={}
+ local m=0
+ for i=1,n do
+ local str=edt[i]
+ if type(str)~="string" then
+ m=m+1
+ t[m]=str
+ elseif str~="" then
+ str=lpegmatch(x_collapser,str)
+ if str~="" then
+ m=m+1
+ t[m]=str
+ end
+ end
+ end
+ e.dt=t
elseif anywhere then
local t={}
local m=0
- for e=1,n do
- local str=edt[e]
+ for i=1,n do
+ local str=edt[i]
if type(str)~="string" then
m=m+1
t[m]=str
elseif str~="" then
if nolines then
- str=lpegmatch((n==1 and b_collapser) or (n==m and e_collapser) or m_collapser,str)
+ str=lpegmatch((i==1 and b_collapser) or (i==m and e_collapser) or m_collapser,str)
else
- str=lpegmatch((n==1 and b_stripper) or (n==m and e_stripper) or m_stripper,str)
+ str=lpegmatch((i==1 and b_stripper) or (i==m and e_stripper) or m_stripper,str)
end
if str~="" then
m=m+1
@@ -19834,14 +19569,27 @@ local function stripelement(e,nolines,anywhere)
return e
end
xml.stripelement=stripelement
-function xml.strip(root,pattern,nolines,anywhere)
+function xml.strip(root,pattern,nolines,anywhere,everything)
local collected=xmlapplylpath(root,pattern)
if collected then
for i=1,#collected do
- stripelement(collected[i],nolines,anywhere)
+ stripelement(collected[i],nolines,anywhere,everything)
+ end
+ end
+end
+local function compactelement(e)
+ local edt=e.dt
+ if edt then
+ for e=1,#edt do
+ local str=edt[e]
+ if type(str)=="string" and not find(str,"%S") then
+ edt[e]=""
+ end
end
end
+ return e
end
+xml.compactelement=compactelement
local function renamespace(root,oldspace,newspace)
local ndt=#root.dt
for i=1,ndt or 0 do
@@ -20790,7 +20538,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-ini"] = package.loaded["data-ini"] or true
--- original size: 10847, stripped down to: 7086
+-- original size: 10947, stripped down to: 7176
if not modules then modules={} end modules ['data-ini']={
version=1.001,
@@ -20836,7 +20584,8 @@ do
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//")
end
end
-do
+if not environment.homedir then
+ local oldhome=osgetenv('HOME')
local homedir=osgetenv(ostype=="windows" and 'USERPROFILE' or 'HOME') or ''
if not homedir or homedir=="" then
homedir=char(127)
@@ -20844,6 +20593,7 @@ do
homedir=file.collapsepath(homedir)
ossetenv("HOME",homedir)
ossetenv("USERPROFILE",homedir)
+ environment.oldhome=oldhome
environment.homedir=homedir
end
do
@@ -21449,7 +21199,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-env"] = package.loaded["data-env"] or true
--- original size: 9400, stripped down to: 6347
+-- original size: 9501, stripped down to: 6411
if not modules then modules={} end modules ['data-env']={
version=1.001,
@@ -21540,7 +21290,9 @@ local relations=allocate {
mp={
names={ "mp" },
variable='MPINPUTS',
- suffixes={ 'mp','mpvi','mpiv','mpxl','mpii' },
+ suffixes=CONTEXTLMTXMODE>0
+ and { 'mp','mpxl','mpvi','mpiv','mpii' }
+ or { 'mp','mpvi','mpiv','mpii' },
usertype=true,
},
tex={
@@ -21734,7 +21486,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16099, stripped down to: 11379
+-- original size: 16409, stripped down to: 11591
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -21984,7 +21736,10 @@ caches.getwritablepath=getwritablepath
caches.setfirstwritablefile=setfirstwritablefile
caches.getfirstreadablefile=getfirstreadablefile
caches.setluanames=setluanames
+local checkmemory=utilities and utilities.lua and utilities.lua.checkmemory
+local threshold=100
function caches.loaddata(readables,name,writable)
+ local used=checkmemory and checkmemory()
if type(readables)=="string" then
readables={ readables }
end
@@ -22011,7 +21766,11 @@ function caches.loaddata(readables,name,writable)
end
if loader then
loader=loader()
- collectgarbage("step")
+ if checkmemory then
+ checkmemory(used,threshold)
+ else
+ collectgarbage("step")
+ end
return loader
end
end
@@ -24110,7 +23869,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-fil"] = package.loaded["data-fil"] or true
--- original size: 4365, stripped down to: 3588
+-- original size: 4365, stripped down to: 3452
if not modules then modules={} end modules ['data-fil']={
version=1.001,
@@ -24130,7 +23889,6 @@ local scanfiles=resolvers.scanfiles
local registerfilehash=resolvers.registerfilehash
local appendhash=resolvers.appendhash
local loadcachecontent=caches.loadcontent
-local checkgarbage=utilities.garbagecollector and utilities.garbagecollector.check
function resolvers.locators.file(specification)
local filename=specification.filename
local realname=resolveprefix(filename)
@@ -24220,10 +23978,7 @@ function loaders.file(specification,filetype)
if trace_locating then
report_files("file loader: %a loaded",filename)
end
- local s=f:read("*a")
- if checkgarbage then
- checkgarbage(#s)
- end
+ local s=f:read("*a")
f:close()
if s then
return true,s,#s
@@ -24371,7 +24126,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-use"] = package.loaded["data-use"] or true
--- original size: 5790, stripped down to: 2910
+-- original size: 5785, stripped down to: 2905
if not modules then modules={} end modules ['data-use']={
version=1.001,
@@ -24387,7 +24142,7 @@ local resolvers=resolvers
local findfile=resolvers.findfile
statistics.register("used config file",function() return caches.configfiles() end)
statistics.register("used cache path",function() return caches.usedpaths() end)
-function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner)
+function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner)
local enginebanner=status.banner
if formatbanner and enginebanner and sourcefile then
local luvname=file.replacesuffix(texname,"luv")
@@ -25532,7 +25287,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["libs-ini"] = package.loaded["libs-ini"] or true
--- original size: 5822, stripped down to: 3629
+-- original size: 6459, stripped down to: 4006
if not modules then modules={} end modules ['libs-ini']={
version=1.001,
@@ -25542,7 +25297,7 @@ if not modules then modules={} end modules ['libs-ini']={
license="see context related readme files"
}
local type,unpack=type,unpack
-local type=type
+local find=string.find
local nameonly=file.nameonly
local joinfile=file.join
local addsuffix=file.addsuffix
@@ -25552,7 +25307,9 @@ local findfile=resolvers.findfile
local expandpaths=resolvers.expandedpathlistfromvariable
local report=logs.reporter("resolvers","libraries")
local trace=false
+local silent=false
trackers.register("resolvers.lib",function(v) trace=v end)
+trackers.register("resolvers.lib.silent",function(v) silent=v end)
local function findlib(required)
local suffix=os.libsuffix or "so"
if not qualifiedpath(required) then
@@ -25653,10 +25410,10 @@ function libraries.optionalloaded(name,libnames)
end
end
local initialized=thelib_initialize(unpack(libnames))
- if initialized then
- report("using library '% + t'",libnames)
- else
+ if not initialized then
report("unable to initialize library '% + t'",libnames)
+ elseif not silent then
+ report("using library '% + t'",libnames)
end
return initialized
end
@@ -25674,6 +25431,19 @@ if FFISUPPORTED and ffi and ffi.load then
end
end
end
+local dofile=dofile
+local savedrequire=require
+function require(name,version)
+ if find(name,"%.lua$") or find(name,"%.lmt$") then
+ local m=dofile(findfile(name))
+ if m then
+ package.loaded[name]=m
+ return m
+ end
+ else
+ return savedrequire(name)
+ end
+end
end -- of closure
@@ -25785,7 +25555,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 13843, stripped down to: 9991
+-- original size: 11691, stripped down to: 8350
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25836,27 +25606,26 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
- luatex=sandbox.registerrunner {
- name="make luatex format",
- program="luatex",
+ luametatex=sandbox.registerrunner {
+ name="make luametatex format",
+ program="luametatex",
template=template,
checkers=checkers,
reporter=report_format,
},
- luametatex=sandbox.registerrunner {
- name="make luametatex format",
- program="luametatex",
+ luatex=sandbox.registerrunner {
+ name="make luatex format",
+ program="luatex",
template=template,
checkers=checkers,
reporter=report_format,
@@ -25869,6 +25638,16 @@ local runners={
reporter=report_format,
},
}
+local stubfiles={
+ luametatex="luat-cod.lmt",
+ luatex="luat-cod.lua",
+ luajittex="luat-cod.lua",
+}
+local suffixes={
+ luametatex="mkxl",
+ luatex="mkiv",
+ luajittex="mkiv",
+}
local function validbinarypath()
if not environment.arguments.nobinarypath then
local path=environment.ownpath or file.dirname(environment.ownname)
@@ -25880,101 +25659,50 @@ local function validbinarypath()
end
end
end
+local function fatalerror(startupdir,...)
+ report_format(...)
+ lfs.chdir(startupdir)
+end
function environment.make_format(formatname)
local arguments=environment.arguments
local engine=environment.ownmain or "luatex"
local silent=arguments.silent
local errors=arguments.errors
- local texsourcename=""
- local texsourcepath=""
- local fulltexsourcename=""
- if engine=="luametatex" then
- texsourcename=file.addsuffix(formatname,"mkxl")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local runner=runners[engine]
+ local startupdir=dir.current()
+ if not runner then
+ return fatalerror(startupdir,"the format %a cannot be generated, no runner available for engine %a",name,engine)
end
- if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"mkiv")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local luasourcename=stubfiles[engine]
+ if not luasourcename then
+ return fatalerror(startupdir,"no lua stub file specified for %a",engine)
end
+ local texsourcename=file.addsuffix(formatname,suffixes[engine])
+ local fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"tex")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ return fatalerror(startupdir,"no tex source file with name %a (mkiv or tex)",formatname)
end
- if fulltexsourcename=="" then
- report_format("no tex source file with name %a (mkiv or tex)",formatname)
- return
- end
- report_format("using tex source file %a",fulltexsourcename)
- fulltexsourcename=dir.expandname(fulltexsourcename)
- texsourcepath=file.dirname(fulltexsourcename)
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
- end
- local specificationname="context.lus"
- local specificationpath=""
- local fullspecificationname=resolvers.findfile(specificationname) or ""
- if fullspecificationname=="" then
- report_format("unable to locate specification file %a",specificationname)
- return
- end
- report_format("using specification file %a",fullspecificationname)
- fullspecificationname=dir.expandname(fullspecificationname)
- specificationpath=file.dirname(fullspecificationname)
- if texsourcepath~=specificationpath then
- report_format("tex source file and specification file are on different paths")
- return
- end
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
+ local fulltexsourcename=dir.expandname(fulltexsourcename)
+ local texsourcepath=file.dirname(fulltexsourcename)
+ if lfs.isfile(fulltexsourcename) then
+ report_format("using tex source file %a",fulltexsourcename)
+ else
+ return fatalerror(startupdir,"no accessible tex source file with name %a",fulltexsourcename)
end
- if not lfs.isfile(fullspecificationname) then
- report_format("no accessible specification file with name %a",fulltexsourcename)
- return
+ local fullluasourcename=dir.expandname(file.join(texsourcepath,luasourcename) or "")
+ if lfs.isfile(fullluasourcename) then
+ report_format("using lua stub file %a",fullluasourcename)
+ else
+ return fatalerror(startupdir,"no accessible lua stub file with name %a",fulltexsourcename)
end
- report_format("using tex source path %a",texsourcepath)
local validformatpath=caches.getwritablepath("formats",engine) or ""
- local startupdir=dir.current()
if validformatpath=="" then
- report_format("invalid format path, insufficient write access")
- return
+ return fatalerror(startupdir,"invalid format path, insufficient write access")
end
local binarypath=validbinarypath()
report_format("changing to format path %a",validformatpath)
- lfs.chdir(validformatpath)
- if dir.current()~=validformatpath then
- report_format("unable to change to format path %a",validformatpath)
- return
- end
- local usedluastub=nil
- local usedlualibs=dofile(fullspecificationname)
- if type(usedlualibs)=="string" then
- usedluastub=file.join(specificationpath,usedlualibs)
- elseif type(usedlualibs)=="table" then
- report_format("using stub specification %a",fullspecificationname)
- local texbasename=file.basename(name)
- local luastubname=file.addsuffix(texbasename,luasuffixes.lua)
- local lucstubname=file.addsuffix(texbasename,luasuffixes.luc)
- report_format("creating initialization file %a",luastubname)
- utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
- if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- report_format("using compiled initialization file %a",lucstubname)
- usedluastub=lucstubname
- else
- report_format("using uncompiled initialization file %a",luastubname)
- usedluastub=luastubname
- end
- else
- report_format("invalid stub specification %a",fullspecificationname)
- lfs.chdir(startupdir)
- return
- end
- local runner=runners[engine]
- if not runner then
- report_format("the format %a cannot be generated, no runner available for engine %a",name,engine)
- lfs.chdir(startupdir)
- return
+ if not lfs.chdir(validformatpath) then
+ return fatalerror(startupdir,"unable to change to format path %a",validformatpath)
end
local primaryflags=primaryflags(arguments)
local secondaryflags=secondaryflags(arguments)
@@ -25982,9 +25710,8 @@ function environment.make_format(formatname)
binarypath=binarypath,
primaryflags=primaryflags,
secondaryflags=secondaryflags,
- luafile=quoted(usedluastub),
+ luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26001,7 +25728,7 @@ function environment.make_format(formatname)
end
report_format("format path : %s",validformatpath)
report_format("luatex engine : %s",engine)
- report_format("lua startup file : %s",usedluastub)
+ report_format("lua startup file : %s",fullluasourcename)
if primaryflags~="" then
report_format("primary flags : %s",primaryflags)
end
@@ -26083,9 +25810,9 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
luafile=quoted(scriptname),
texfile=filename~="" and quoted(filename) or "",
}
- statistics.starttiming()
+ statistics.starttiming("make format")
local result=runner(specification)
- local runtime=statistics.stoptiming()
+ statistics.stoptiming("make format")
if verbose then
report_format()
if binarypath and binarypath~="" then
@@ -26103,7 +25830,7 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
if secondaryflags~="" then
report_format("secondary flags : %s",secondaryflags)
end
- report_format("run time : %.3f seconds",runtime)
+ report_format("run time : %0.3f seconds",statistics.elapsed("make format"))
report_format("return value : %s",result==0 and "okay" or "error")
report_format()
end
@@ -26115,8 +25842,8 @@ end -- of closure
-- 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 : 1038373
--- stripped bytes : 409980
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
@@ -26771,12 +26498,14 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
end
function runners.save_script_session(filename, list)
- local t = { }
- for i=1,#list do
- local key = list[i]
- t[key] = environment.arguments[key]
+ if type(list) == "table" then
+ local t = { }
+ for i=1,#list do
+ local key = list[i]
+ t[key] = environment.arguments[key]
+ end
+ io.savedata(filename,table.serialize(t,true))
end
- io.savedata(filename,table.serialize(t,true))
end
function runners.load_script_session(filename)
diff --git a/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua b/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua
index 6eaf5ff449f..6fc17adb022 100644
--- a/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -852,7 +849,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 11605, stripped down to: 8299
+-- original size: 12566, stripped down to: 8937
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -861,7 +858,7 @@ if not modules then modules={} end modules ['l-package']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local type=type
+local type,unpack=type,unpack
local gsub,format,find=string.gsub,string.format,string.find
local insert,remove=table.insert,table.remove
local P,S,Cs,lpegmatch=lpeg.P,lpeg.S,lpeg.Cs,lpeg.match
@@ -891,6 +888,7 @@ local helpers=package.helpers or {
},
methods={},
sequence={
+ "reset loaded",
"already loaded",
"preload table",
"qualified path",
@@ -907,6 +905,7 @@ local methods=helpers.methods
local builtin=helpers.builtin
local extraluapaths={}
local extralibpaths={}
+local checkedfiles={}
local luapaths=nil
local libpaths=nil
local oldluapath=nil
@@ -1040,10 +1039,16 @@ end
local function loadedaslib(resolved,rawname)
local base=gsub(rawname,"%.","_")
local init="luaopen_"..gsub(base,"%.","_")
+ local data={ resolved,init,"" }
+ checkedfiles[#checkedfiles+1]=data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a,b,c=package.loadlib(resolved,init)
+ if not a and type(b)=="string" then
+ data[3]=string.fullstrip(b or "unknown error")
+ end
+ return a,b,c
end
helpers.loadedaslib=loadedaslib
local function loadedbypath(name,rawname,paths,islib,what)
@@ -1082,11 +1087,18 @@ local function loadedbyname(name,rawname)
end
end
helpers.loadedbyname=loadedbyname
+methods["reset loaded"]=function(name)
+ checkedfiles={}
+ return false
+end
methods["already loaded"]=function(name)
return package.loaded[name]
end
methods["preload table"]=function(name)
- return builtin["preload table"](name)
+ local f=builtin["preload table"]
+ if f then
+ return f(name)
+ end
end
methods["qualified path"]=function(name)
return loadedbyname(addsuffix(lualibfile(name),"lua"),name)
@@ -1098,19 +1110,31 @@ methods["lib extra list"]=function(name)
return loadedbypath(addsuffix(lualibfile(name),os.libsuffix),name,getextralibpaths(),true,"lib")
end
methods["path specification"]=function(name)
- getluapaths()
- return builtin["path specification"](name)
+ local f=builtin["path specification"]
+ if f then
+ getluapaths()
+ return f(name)
+ end
end
methods["cpath specification"]=function(name)
- getlibpaths()
- return builtin["cpath specification"](name)
+ local f=builtin["cpath specification"]
+ if f then
+ getlibpaths()
+ return f(name)
+ end
end
methods["all in one fallback"]=function(name)
- return builtin["all in one fallback"](name)
+ local f=builtin["all in one fallback"]
+ if f then
+ return f(name)
+ end
end
methods["not loaded"]=function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -1122,19 +1146,22 @@ function helpers.loaded(name)
level=level+1
for i=1,#sequence do
local method=sequence[i]
- if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
- end
- local result,rest=methods[method](name)
- if type(result)=="function" then
+ local lookup=method and methods[method]
+ if type(lookup)=="function" then
if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
end
- if helpers.traceused then
- used[#used+1]={ level=level,name=name }
+ local result,rest=lookup(name)
+ if type(result)=="function" then
+ if helpers.trace then
+ helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
+ level=level-1
+ return result,rest
end
- level=level-1
- return result,rest
end
end
level=level-1
@@ -1174,7 +1201,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 38440, stripped down to: 19316
+-- original size: 38703, stripped down to: 19489
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1272,11 +1299,13 @@ local fullstripper=whitespace^0*C((whitespace^0*nonwhitespace^1)^0)
local collapser=Cs(spacer^0/""*nonspacer^0*((spacer^0/" "*nonspacer^1)^0))
local nospacer=Cs((whitespace^1/""+nonwhitespace^1)^0)
local b_collapser=Cs(whitespace^0/""*(nonwhitespace^1+whitespace^1/" ")^0)
-local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
local m_collapser=Cs((nonwhitespace^1+whitespace^1/" ")^0)
+local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
+local x_collapser=Cs((nonwhitespace^1+whitespace^1/"" )^0)
local b_stripper=Cs(spacer^0/""*(nonspacer^1+spacer^1/" ")^0)
-local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
local m_stripper=Cs((nonspacer^1+spacer^1/" ")^0)
+local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
+local x_stripper=Cs((nonspacer^1+spacer^1/"" )^0)
patterns.stripper=stripper
patterns.fullstripper=fullstripper
patterns.collapser=collapser
@@ -1284,9 +1313,11 @@ patterns.nospacer=nospacer
patterns.b_collapser=b_collapser
patterns.m_collapser=m_collapser
patterns.e_collapser=e_collapser
+patterns.x_collapser=x_collapser
patterns.b_stripper=b_stripper
patterns.m_stripper=m_stripper
patterns.e_stripper=e_stripper
+patterns.x_stripper=x_stripper
patterns.lowercase=lowercase
patterns.uppercase=uppercase
patterns.letter=patterns.lowercase+patterns.uppercase
@@ -3806,7 +3837,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 19120, stripped down to: 10208
+-- original size: 19409, stripped down to: 10419
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4029,6 +4060,8 @@ elseif name=="macosx" then
platform="osx-intel"
elseif find(architecture,"x86_64",1,true) then
platform="osx-64"
+ elseif find(architecture,"arm64",1,true) then
+ platform="osx-64"
else
platform="osx-ppc"
end
@@ -4200,11 +4233,19 @@ local function isleapyear(year)
end
os.isleapyear=isleapyear
local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
-local function nofdays(year,month)
+local function nofdays(year,month,day)
if not month then
return isleapyear(year) and 365 or 364
- else
+ elseif not day then
return month==2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day=day+days[i]
+ end
+ if month>2 and isleapyear(year) then
+ day=day+1
+ end
+ return day
end
end
os.nofdays=nofdays
@@ -5729,10 +5770,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-unicode"] = package.loaded["l-unicode"] or true
--- original size: 41281, stripped down to: 17261
+-- original size: 41303, stripped down to: 17277
if not modules then modules={} end modules ['l-unicode']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -6563,7 +6605,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 45153, stripped down to: 22734
+-- original size: 45129, stripped down to: 23525
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -6615,25 +6657,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -6911,7 +6987,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -7106,10 +7184,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -7219,33 +7305,36 @@ local format_extension=function(extensions,f,name)
local extension=extensions[name] or "tostring(%s)"
local f=tonumber(f) or 1
local w=find(extension,"%.%.%.")
- if w then
- if f==0 then
+ if f==0 then
+ if w then
extension=gsub(extension,"%.%.%.","")
- return extension
- elseif f==1 then
+ end
+ return extension
+ elseif f==1 then
+ if w then
extension=gsub(extension,"%.%.%.","%%s")
- n=n+1
- local a="a"..n
- return format(extension,a,a)
- elseif f<0 then
+ end
+ n=n+1
+ local a="a"..n
+ return format(extension,a,a)
+ elseif f<0 then
+ if w then
+ extension=gsub(extension,"%.%.%.","")
+ return extension
+ else
local a="a"..(n+f+1)
return format(extension,a,a)
- else
- extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- local t={}
- for i=1,f do
- n=n+1
- t[i]="a"..n
- end
- return format(extension,unpack(t))
end
else
- extension=gsub(extension,"%%s",function()
+ if w then
+ extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ local t={}
+ for i=1,f do
n=n+1
- return "a"..n
- end)
- return extension
+ t[i]="a"..n
+ end
+ return format(extension,unpack(t))
end
end
local builder=Cs { "start",
@@ -7259,7 +7348,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -7297,7 +7386,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -7448,7 +7539,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 32649, stripped down to: 18257
+-- original size: 32815, stripped down to: 18257
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8194,10 +8285,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 11530, stripped down to: 9007
+-- original size: 11552, stripped down to: 9023
if not modules then modules={} end modules ['util-fil']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -8562,10 +8654,11 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 12946, stripped down to: 9507
+-- original size: 12968, stripped down to: 9523
if not modules then modules={} end modules ['util-sac']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -9215,7 +9308,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 24132, stripped down to: 16210
+-- original size: 24683, stripped down to: 16431
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9228,7 +9321,7 @@ local lpeg,table,string=lpeg,table,string
local P,R,V,S,C,Ct,Cs,Carg,Cc,Cg,Cf,Cp=lpeg.P,lpeg.R,lpeg.V,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.Carg,lpeg.Cc,lpeg.Cg,lpeg.Cf,lpeg.Cp
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local concat,gmatch,find=table.concat,string.gmatch,string.find
-local tostring,type,next,rawset=tostring,type,next,rawset
+local tonumber,tostring,type,next,rawset=tonumber,tostring,type,next,rawset
local mod,div=math.mod,math.div
utilities=utilities or {}
local parsers=utilities.parsers or {}
@@ -9620,13 +9713,15 @@ function parsers.csvsplitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
local separator=specification.separator
local quotechar=specification.quote
+ local numbers=specification.numbers
local separator=S(separator~="" and separator or ",")
local whatever=C((1-separator-newline)^0)
if quotechar and quotechar~="" then
local quotedata=nil
for chr in gmatch(quotechar,".") do
local quotechar=P(chr)
- local quoteword=quotechar*C((1-quotechar)^0)*quotechar
+ local quoteitem=(1-quotechar)^0
+ local quoteword=quotechar*(numbers and (quoteitem/tonumber) or C(quoteitem))*quotechar
if quotedata then
quotedata=quotedata+quoteword
else
@@ -9642,12 +9737,14 @@ function parsers.csvsplitter(specification)
end
function parsers.rfc4180splitter(specification)
specification=specification and setmetatableindex(specification,defaultspecification) or defaultspecification
+ local numbers=specification.numbers
local separator=specification.separator
local quotechar=P(specification.quote)
local dquotechar=quotechar*quotechar
/specification.quote
local separator=S(separator~="" and separator or ",")
- local escaped=quotechar*Cs((dquotechar+(1-quotechar))^0)*quotechar
+ local whatever=(dquotechar+(1-quotechar))^0
+ local escaped=quotechar*(numbers and (whatever/tonumber) or Cs(whatever))*quotechar
local non_escaped=C((1-quotechar-newline-separator)^1)
local field=escaped+non_escaped+Cc("")
local record=Ct(field*(separator*field)^1)
@@ -11718,7 +11815,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12577, stripped down to: 9577
+-- original size: 12624, stripped down to: 9598
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11763,7 +11860,7 @@ local function receiveheaders(sock,headers)
if not headers then
headers={}
end
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11773,13 +11870,13 @@ local function receiveheaders(sock,headers)
return nil,"malformed reponse headers"
end
name=lower(name)
- line,err=sock:receive()
+ line,err=sock:receive("*l")
if err then
return nil,err
end
while find(line,"^%s") do
value=value..line
- line=sock:receive()
+ line=sock:receive("*l")
if err then
return nil,err
end
@@ -11799,7 +11896,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
dirty=function() return sock:dirty() end,
},{
__call=function()
- local line,err=sock:receive()
+ local line,err=sock:receive("*l")
if err then
return nil,err
end
@@ -11810,7 +11907,7 @@ socket.sourcet["http-chunked"]=function(sock,headers)
if size>0 then
local chunk,err,part=sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk,err
else
@@ -12712,7 +12809,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-set"] = package.loaded["trac-set"] or true
--- original size: 13394, stripped down to: 8882
+-- original size: 13901, stripped down to: 9175
if not modules then modules={} end modules ['trac-set']={
version=1.001,
@@ -12735,7 +12832,7 @@ utilities.setters=setters
local data={}
local trace_initialize=false
local frozen=true
-function setters.initialize(filename,name,values)
+local function initialize_setter(filename,name,values)
local setter=data[name]
if setter then
local data=setter.data
@@ -12776,8 +12873,8 @@ function setters.initialize(filename,name,values)
end
end
local function set(t,what,newvalue)
- local data=t.data
- if not data.frozen then
+ local data=t.data
+ if data and not data.frozen then
local done=t.done
if type(what)=="string" then
what=settings_to_hash(what)
@@ -12813,7 +12910,7 @@ local function set(t,what,newvalue)
end
local function reset(t)
local data=t.data
- if not data.frozen then
+ if data and not data.frozen then
for name,functions in sortedthash(data) do
for i=1,#functions do
functions[i](false)
@@ -12834,7 +12931,7 @@ local function disable(t,what)
set(t,what,false)
end
end
-function setters.register(t,what,...)
+local function register_setter(t,what,...)
local data=t.data
what=lower(what)
local functions=data[what]
@@ -12869,23 +12966,24 @@ function setters.register(t,what,...)
end
return false
end
-function setters.enable(t,what)
+local function enable_setter(t,what)
local e=t.enable
t.enable,t.done=enable,{}
+ set(t,what,true)
enable(t,what)
t.enable,t.done=e,{}
end
-function setters.disable(t,what)
+local function disable_setter(t,what)
local e=t.disable
t.disable,t.done=disable,{}
disable(t,what)
t.disable,t.done=e,{}
end
-function setters.reset(t)
+local function reset_setter(t)
t.done={}
reset(t)
end
-function setters.list(t)
+local function list_setter(t)
local list=table.sortedkeys(t.data)
local user,system={},{}
for l=1,#list do
@@ -12898,8 +12996,8 @@ function setters.list(t)
end
return user,system
end
-function setters.show(t)
- local list=setters.list(t)
+local function show_setter(t)
+ local list=list_setter(t)
t.report()
for k=1,#list do
local name=list[k]
@@ -12930,39 +13028,50 @@ function setters.show(t)
end
end
end
-local enable,disable,register,list,show=setters.enable,setters.disable,setters.register,setters.list,setters.show
function setters.report(setter,fmt,...)
- print(formatters["%-15s : %s\n"](setter.name,formatters[fmt](...)))
+ if fmt then
+ print(formatters["%-15s : %s"](setter.name,formatters[fmt](...)))
+ else
+ print("")
+ end
end
-local function default(setter,name)
+local function setter_default(setter,name)
local d=setter.data[name]
return d and d.default
end
-local function value(setter,name)
+local function setter_value(setter,name)
local d=setter.data[name]
return d and (d.value or d.default)
end
-function setters.new(name)
+local function new_setter(name)
local setter
setter={
data=allocate(),
name=name,
- report=function(...) setters.report (setter,...) end,
- enable=function(...) enable (setter,...) end,
- disable=function(...) disable (setter,...) end,
- reset=function(...) reset (setter,...) end,
- register=function(...) register(setter,...) end,
- list=function(...) return list (setter,...) end,
- show=function(...) show (setter,...) end,
- default=function(...) return default (setter,...) end,
- value=function(...) return value (setter,...) end,
+ report=function(...) setters.report (setter,...) end,
+ enable=function(...) enable_setter (setter,...) end,
+ disable=function(...) disable_setter (setter,...) end,
+ reset=function(...) reset_setter (setter,...) end,
+ register=function(...) register_setter(setter,...) end,
+ list=function(...) return list_setter (setter,...) end,
+ show=function(...) show_setter (setter,...) end,
+ default=function(...) return setter_default (setter,...) end,
+ value=function(...) return setter_value (setter,...) end,
}
data[name]=setter
return setter
end
-trackers=setters.new("trackers")
-directives=setters.new("directives")
-experiments=setters.new("experiments")
+setters.enable=enable_setter
+setters.disable=disable_setter
+setters.register=register_setter
+setters.list=list_setter
+setters.show=show_setter
+setters.reset=reset_setter
+setters.new=new_setter
+setters.initialize=initialize_setter
+trackers=new_setter("trackers")
+directives=new_setter("directives")
+experiments=new_setter("experiments")
local t_enable,t_disable=trackers .enable,trackers .disable
local d_enable,d_disable=directives .enable,directives .disable
local e_enable,e_disable=experiments.enable,experiments.disable
@@ -13009,11 +13118,11 @@ if environment then
if engineflags then
local list=engineflags["c:trackers"] or engineflags["trackers"]
if type(list)=="string" then
- setters.initialize("commandline flags","trackers",settings_to_hash(list))
+ initialize_setter("commandline flags","trackers",settings_to_hash(list))
end
local list=engineflags["c:directives"] or engineflags["directives"]
if type(list)=="string" then
- setters.initialize("commandline flags","directives",settings_to_hash(list))
+ initialize_setter("commandline flags","directives",settings_to_hash(list))
end
end
end
@@ -13055,7 +13164,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 33003, stripped down to: 21667
+-- original size: 16017, stripped down to: 11045
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13071,9 +13180,8 @@ local topattern=string.topattern
local utfchar=utf.char
local datetime=os.date
local openfile=io.open
-local runningtex=tex and (tex.jobname or tex.formatname)
-local write_nl=runningtex and texio and texio.write_nl or print
-local write=runningtex and texio and texio.write or io.write
+local write_nl=print
+local write=io.write
local setmetatableindex=table.setmetatableindex
local formatters=string.formatters
local settings_to_hash=utilities.parsers.settings_to_hash
@@ -13109,273 +13217,7 @@ local function ansisupported(specification)
return false
end
end
-if runningtex and texio then
- if texio.setescape then
- texio.setescape(0)
- end
- if arg and ansisupported then
- for k,v in next,arg do
- if v=="--ansi" or v=="--c:ansi" then
- if ansisupported("ansi") then
- variant="ansi"
- end
- break
- elseif v=="--ansilog" or v=="--c:ansilog" then
- if ansisupported("ansilog") then
- variant="ansilog"
- end
- break
- end
- end
- end
- local function useluawrites()
- local texio_write_nl=texio.write_nl
- local texio_write=texio.write
- local io_write=io.write
- write_nl=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write_nl("log",...)
- texio_write_nl("term","")
- io_write(...)
- elseif target=="log" then
- texio_write_nl("log",...)
- elseif target=="term" then
- texio_write_nl("term","")
- io_write(...)
- elseif type(target)=="number" then
- texio_write_nl(target,...)
- elseif target~="none" then
- texio_write_nl("log",target,...)
- texio_write_nl("term","")
- io_write(target,...)
- end
- end
- write=function(target,...)
- if not io_write then
- io_write=io.write
- end
- if target=="term and log" then
- texio_write("log",...)
- io_write(...)
- elseif target=="log" then
- texio_write("log",...)
- elseif target=="term" then
- io_write(...)
- elseif type(target)=="number" then
- texio_write(target,...)
- elseif target~="none" then
- texio_write("log",target,...)
- io_write(target,...)
- end
- end
- texio.write=write
- texio.write_nl=write_nl
- useluawrites=ignore
- end
- local whereto="both"
- local target=nil
- local targets=nil
- local formats=table.setmetatableindex("self")
- local translations=table.setmetatableindex("self")
- local report_yes,subreport_yes,direct_yes,subdirect_yes,status_yes
- local report_nop,subreport_nop,direct_nop,subdirect_nop,status_nop
- local variants={
- default={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="log",
- log="log",
- file="log",
- console="term",
- terminal="term",
- both="term and log",
- },
- },
- ansi={
- formats={
- report_yes=formatters["%-15s > %s\n"],
- report_nop=formatters["%-15s >\n"],
- direct_yes=formatters["%-15s > %s"],
- direct_nop=formatters["%-15s >"],
- subreport_yes=formatters["%-15s > %s > %s\n"],
- subreport_nop=formatters["%-15s > %s >\n"],
- subdirect_yes=formatters["%-15s > %s > %s"],
- subdirect_nop=formatters["%-15s > %s >"],
- status_yes=formatters["%-15s : %s\n"],
- status_nop=formatters["%-15s :\n"],
- },
- targets={
- logfile="none",
- log="none",
- file="none",
- console="term",
- terminal="term",
- both="term",
- },
- }
- }
- variants.ansilog={
- formats=variants.ansi.formats,
- targets=variants.default.targets,
- }
- logs.flush=io.flush
- writer=function(...)
- write_nl(target,...)
- end
- newline=function()
- write_nl(target,"\n")
- end
- report=function(a,b,c,...)
- if c~=nil then
- write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,report_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,report_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- direct=function(a,b,c,...)
- if c~=nil then
- return direct_yes(translations[a],formatters[formats[b]](c,...))
- elseif b then
- return direct_yes(translations[a],formats[b])
- elseif a then
- return direct_nop(translations[a])
- else
- return ""
- end
- end
- subreport=function(a,s,b,c,...)
- if c~=nil then
- write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
- elseif a then
- write_nl(target,subreport_nop(translations[a],translations[s]))
- else
- write_nl(target,"\n")
- end
- end
- subdirect=function(a,s,b,c,...)
- if c~=nil then
- return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
- elseif b then
- return subdirect_yes(translations[a],translations[s],formats[b])
- elseif a then
- return subdirect_nop(translations[a],translations[s])
- else
- return ""
- end
- end
- status=function(a,b,c,...)
- if c~=nil then
- write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,status_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,status_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
- settarget=function(askedwhereto)
- whereto=askedwhereto or whereto or "both"
- target=targets[whereto]
- if not target then
- whereto="both"
- target=targets[whereto]
- end
- if target=="term" or target=="term and log" then
- logs.flush=io.flush
- else
- logs.flush=ignore
- end
- end
- local stack={}
- pushtarget=function(newtarget)
- insert(stack,target)
- settarget(newtarget)
- end
- poptarget=function()
- if #stack>0 then
- settarget(remove(stack))
- end
- end
- setformats=function(f)
- formats=f
- end
- settranslations=function(t)
- translations=t
- end
- setprocessor=function(f)
- local writeline=write_nl
- write_nl=function(target,...)
- writeline(target,f(...))
- end
- end
- setformatters=function(specification)
- local t=nil
- local f=nil
- local d=variants.default
- if not specification then
- elseif type(specification)=="table" then
- t=specification.targets
- f=specification.formats or specification
- else
- if not ansisupported(specification) then
- specification="default"
- end
- local v=variants[specification]
- if v then
- t=v.targets
- f=v.formats
- variant=specification
- end
- end
- targets=t or d.targets
- target=targets[whereto] or target
- if f then
- d=d.formats
- else
- f=d.formats
- d=f
- end
- setmetatableindex(f,d)
- report_yes=f.report_yes
- report_nop=f.report_nop
- subreport_yes=f.subreport_yes
- subreport_nop=f.subreport_nop
- direct_yes=f.direct_yes
- direct_nop=f.direct_nop
- subdirect_yes=f.subdirect_yes
- subdirect_nop=f.subdirect_nop
- status_yes=f.status_yes
- status_nop=f.status_nop
- if variant=="ansi" or variant=="ansilog" then
- useluawrites()
- end
- settarget(whereto)
- end
- setformatters(variant)
- setlogfile=ignore
- settimedlog=ignore
-else
+do
local report_yes,subreport_yes,status_yes
local report_nop,subreport_nop,status_nop
local variants={
@@ -13675,46 +13517,6 @@ end)
directives.register("logs.target",function(v)
settarget(v)
end)
-if tex then
- local report=logs.reporter("pages")
- local texgetcount=tex and tex.getcount
- local real,user,sub=0,0,0
- function logs.start_page_number()
- real=texgetcount("realpageno")
- user=texgetcount("userpageno")
- sub=texgetcount("subpageno")
- end
- local timing=false
- local lasttime=nil
- trackers.register("pages.timing",function(v)
- timing=""
- end)
- function logs.stop_page_number()
- if timing then
- local elapsed=statistics.currenttime(statistics)
- local average,page
- if not lasttime or real<2 then
- average=elapsed
- page=elapsed
- else
- average=elapsed/(real-1)
- page=elapsed-lasttime
- end
- lasttime=elapsed
- timing=formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
- end
- if real<=0 then
- report("flushing page%s",timing)
- elseif user<=0 then
- report("flushing realpage %s%s",real,timing)
- elseif sub<=0 then
- report("flushing realpage %s, userpage %s%s",real,user,timing)
- else
- report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
- end
- logs.flush()
- end
-end
local nesting=0
local verbose=false
local hasscheme=url.hasscheme
@@ -13826,133 +13628,12 @@ function logs.system(whereto,process,jobname,category,fmt,arg,...)
end
end
local report_system=logs.reporter("system","logs")
-function logs.obsolete(old,new)
- local o=loadstring("return "..new)()
- if type(o)=="function" then
- return function(...)
- report_system("function %a is obsolete, use %a",old,new)
- loadstring(old.."="..new.." return "..old)()(...)
- end
- elseif type(o)=="table" then
- local t,m={},{}
- m.__index=function(t,k)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- return o[k]
- end
- m.__newindex=function(t,k,v)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index,m.__newindex=o,o
- o[k]=v
- end
- if libraries then
- libraries.obsolete[old]=t
- end
- setmetatable(t,m)
- return t
- end
-end
if utilities then
utilities.report=report_system
end
-if tex and tex.error then
- function logs.texerrormessage(...)
- tex.error(format(...))
- end
-else
- function logs.texerrormessage(...)
- print(format(...))
- end
-end
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
-if tex then
- local finalactions={}
- local fatalerrors={}
- local possiblefatal={}
- local loggingerrors=false
- function logs.loggingerrors()
- return loggingerrors
- end
- directives.register("logs.errors",function(v)
- loggingerrors=v
- if type(v)=="string" then
- fatalerrors=settings_to_hash(v)
- else
- fatalerrors={}
- end
- end)
- function logs.registerfinalactions(...)
- insert(finalactions,...)
- end
- local what=nil
- local report=nil
- local state=nil
- local target=nil
- local function startlogging(t,r,w,s)
- target=t
- state=force
- force=true
- report=type(r)=="function" and r or logs.reporter(r)
- what=w
- pushtarget(target)
- newline()
- if s then
- report("start %s: %s",what,s)
- else
- report("start %s",what)
- end
- if target=="logfile" then
- newline()
- end
- return report
- end
- local function stoplogging()
- if target=="logfile" then
- newline()
- end
- report("stop %s",what)
- if target=="logfile" then
- newline()
- end
- poptarget()
- state=oldstate
- end
- function logs.startfilelogging(...)
- return startlogging("logfile",...)
- end
- logs.stopfilelogging=stoplogging
- local done=false
- function logs.starterrorlogging(r,w,...)
- if not done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","start possible issues")
- poptarget()
- done=true
- end
- if fatalerrors[w] then
- possiblefatal[w]=true
- end
- return startlogging("terminal",r,w,...)
- end
- logs.stoperrorlogging=stoplogging
- function logs.finalactions()
- if #finalactions>0 then
- for i=1,#finalactions do
- finalactions[i]()
- end
- if done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","stop possible issues")
- poptarget()
- end
- return next(possiblefatal) and sortedkeys(possiblefatal) or false
- end
- end
-end
end -- of closure
@@ -13961,7 +13642,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10184, stripped down to: 7500
+-- original size: 9740, stripped down to: 7296
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14055,10 +13736,8 @@ local function stoptiming(instance)
timer.loadtime=timer.loadtime+loadtime
timer.timing=0
timer.starttime=0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
local timer=timers[instance or "notimer"]
@@ -14135,18 +13814,11 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
- register("control sequences",function()
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
+ register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
register("callbacks",statistics.callbacks)
@@ -14160,15 +13832,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14224,6 +13891,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -15920,7 +15594,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-env"] = package.loaded["luat-env"] or true
--- original size: 6551, stripped down to: 4315
+-- original size: 6267, stripped down to: 4115
if not modules then modules={} end modules ['luat-env']={
version=1.001,
@@ -15948,14 +15622,6 @@ local mt={
else
return "unknown"
end
- elseif k=="kind" then
- local kind=texgettoks and texgettoks("contextkindtoks")
- if kind and kind~="" then
- rawset(environment,"kind",kind)
- return kind
- else
- return "unknown"
- end
elseif k=="jobname" or k=="formatname" then
local name=tex and tex[k]
if name or name=="" then
@@ -16530,7 +16196,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true
--- original size: 61191, stripped down to: 35864
+-- original size: 61808, stripped down to: 36227
if not modules then modules={} end modules ['lxml-tab']={
version=1.001,
@@ -17523,12 +17189,25 @@ local function xmlconvert(data,settings)
end
end
xml.convert=xmlconvert
-function xml.inheritedconvert(data,xmldata)
+function xml.inheritedconvert(data,xmldata,cleanup)
local settings=xmldata.settings
if settings then
settings.parent_root=xmldata
end
- local xc=xmlconvert(data,settings)
+ local xc=xmlconvert(data,settings)
+ if cleanup then
+ local x=xc.dt
+ if x then
+ x=x[1]
+ if x and x.tg=="@pi@" then
+ local dt=x.dt
+ local pi=dt and dt[1]
+ if type(pi)=="string" and find(pi,"^xml") then
+ remove(dt,1)
+ end
+ end
+ end
+ end
return xc
end
function xml.is_valid(root)
@@ -17586,9 +17265,17 @@ local function copy(old,p)
new[k]=t
elseif k=="dt" then
v.__p__=nil
- v=copy(v,new)
- new[k]=v
- v.__p__=p
+ local t={}
+ for i=1,#v do
+ local vi=v[i]
+ if type(vi)=="table" then
+ t[i]=copy(vi,new)
+ else
+ t[i]=vi
+ end
+ end
+ new[k]=t
+ t.__p__=p
else
new[k]=v
end
@@ -17992,7 +17679,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 54626, stripped down to: 31255
+-- original size: 54667, stripped down to: 31258
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -18487,7 +18174,7 @@ local builtin={
local lp_builtin=lpeg.utfchartabletopattern(builtin)/builtin*((spaces*P("(")*spaces*P(")"))/"")
local lp_attribute=(P("@")+P("attribute::"))/""*Cc("(ll.at and ll.at['")*((R("az","AZ")+S("-_:"))^1)*Cc("'])")
local lp_fastpos_p=P("+")^0*R("09")^1*P(-1)/"l==%0"
-local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0==l))"
+local lp_fastpos_n=P("-")*R("09")^1*P(-1)/"(%0<0 and (#list+%0+1==l))"
local lp_fastpos=lp_fastpos_n+lp_fastpos_p
local lp_reserved=C("and")+C("or")+C("not")+C("div")+C("mod")+C("true")+C("false")
local lp_lua_function=Cs((R("az","AZ","__")^1*(P(".")*R("az","AZ","__")^1)^1)*("("))/"%0"
@@ -19312,7 +18999,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 30771, stripped down to: 19680
+-- original size: 33708, stripped down to: 20953
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -19330,7 +19017,7 @@ local xmlinheritedconvert=xml.inheritedconvert
local xmlapplylpath=xml.applylpath
local type,next,setmetatable,getmetatable=type,next,setmetatable,getmetatable
local insert,remove,fastcopy,concat=table.insert,table.remove,table.fastcopy,table.concat
-local gmatch,gsub,format,find,strip=string.gmatch,string.gsub,string.format,string.find,string.strip
+local gmatch,gsub,format,find,strip,match=string.gmatch,string.gsub,string.format,string.find,string.strip,string.match
local utfbyte=utf.byte
local lpegmatch,lpegpatterns=lpeg.match,lpeg.patterns
local striplinepatterns=utilities.strings.striplinepatterns
@@ -19461,7 +19148,7 @@ local function xmltoelement(whatever,root)
end
local element
if type(whatever)=="string" then
- element=xmlinheritedconvert(whatever,root)
+ element=xmlinheritedconvert(whatever,root,true)
else
element=whatever
end
@@ -19474,15 +19161,18 @@ local function xmltoelement(whatever,root)
end
xml.toelement=xmltoelement
local function copiedelement(element,newparent)
- if type(element)=="string" then
- return element
- else
+ if type(element)~="string" then
element=xmlcopy(element).dt
if newparent and type(element)=="table" then
- element.__p__=newparent
+ for i=1,#element do
+ local e=element[i]
+ if type(e)=="table" then
+ e.__p__=newparent
+ end
+ end
end
- return element
end
+ return element
end
function xml.delete(root,pattern)
if not pattern or pattern=="" then
@@ -19521,6 +19211,32 @@ function xml.delete(root,pattern)
end
end
end
+function xml.wipe(root,pattern)
+ local collected=xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e=collected[c]
+ local p=e.__p__
+ if p then
+ local d=p.dt
+ local ni=e.ni
+ if ni<=#d then
+ local dt=e.dt
+ if #dt==1 then
+ local d1=dt[1]
+ if type(d1)=="string" and match(d1,"^%s*$") then
+ if trace_manipulations then
+ report('wiping',pattern,c,e)
+ end
+ remove(d,ni)
+ redo_ni(d)
+ end
+ end
+ end
+ end
+ end
+ end
+end
function xml.replace(root,pattern,whatever)
local element=root and xmltoelement(whatever,root)
local collected=element and xmlapplylpath(root,pattern)
@@ -19690,10 +19406,10 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
elseif ekat["parse"]=="text" then
epdt[ek.ni]=xml.escaped(data)
else
-local settings=xmldata.settings
-local savedresource=settings.currentresource
-settings.currentresource=name
- local xi=xmlinheritedconvert(data,xmldata)
+ local settings=xmldata.settings
+ local savedresource=settings.currentresource
+ settings.currentresource=name
+ local xi=xmlinheritedconvert(data,xmldata,true)
if not xi then
epdt[ek.ni]=""
else
@@ -19703,7 +19419,7 @@ settings.currentresource=name
local child=xml.body(xi)
child.__p__=ekrt
child.__f__=name
-child.cf=name
+ child.cf=name
epdt[ek.ni]=child
local settings=xmldata.settings
local inclusions=settings and settings.inclusions
@@ -19771,28 +19487,47 @@ end
local b_collapser=lpegpatterns.b_collapser
local m_collapser=lpegpatterns.m_collapser
local e_collapser=lpegpatterns.e_collapser
+local x_collapser=lpegpatterns.x_collapser
local b_stripper=lpegpatterns.b_stripper
local m_stripper=lpegpatterns.m_stripper
local e_stripper=lpegpatterns.e_stripper
-local function stripelement(e,nolines,anywhere)
+local x_stripper=lpegpatterns.x_stripper
+local function stripelement(e,nolines,anywhere,everything)
local edt=e.dt
if edt then
local n=#edt
if n==0 then
return e
+ elseif everything then
+ local t={}
+ local m=0
+ for i=1,n do
+ local str=edt[i]
+ if type(str)~="string" then
+ m=m+1
+ t[m]=str
+ elseif str~="" then
+ str=lpegmatch(x_collapser,str)
+ if str~="" then
+ m=m+1
+ t[m]=str
+ end
+ end
+ end
+ e.dt=t
elseif anywhere then
local t={}
local m=0
- for e=1,n do
- local str=edt[e]
+ for i=1,n do
+ local str=edt[i]
if type(str)~="string" then
m=m+1
t[m]=str
elseif str~="" then
if nolines then
- str=lpegmatch((n==1 and b_collapser) or (n==m and e_collapser) or m_collapser,str)
+ str=lpegmatch((i==1 and b_collapser) or (i==m and e_collapser) or m_collapser,str)
else
- str=lpegmatch((n==1 and b_stripper) or (n==m and e_stripper) or m_stripper,str)
+ str=lpegmatch((i==1 and b_stripper) or (i==m and e_stripper) or m_stripper,str)
end
if str~="" then
m=m+1
@@ -19834,14 +19569,27 @@ local function stripelement(e,nolines,anywhere)
return e
end
xml.stripelement=stripelement
-function xml.strip(root,pattern,nolines,anywhere)
+function xml.strip(root,pattern,nolines,anywhere,everything)
local collected=xmlapplylpath(root,pattern)
if collected then
for i=1,#collected do
- stripelement(collected[i],nolines,anywhere)
+ stripelement(collected[i],nolines,anywhere,everything)
+ end
+ end
+end
+local function compactelement(e)
+ local edt=e.dt
+ if edt then
+ for e=1,#edt do
+ local str=edt[e]
+ if type(str)=="string" and not find(str,"%S") then
+ edt[e]=""
+ end
end
end
+ return e
end
+xml.compactelement=compactelement
local function renamespace(root,oldspace,newspace)
local ndt=#root.dt
for i=1,ndt or 0 do
@@ -20790,7 +20538,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-ini"] = package.loaded["data-ini"] or true
--- original size: 10847, stripped down to: 7086
+-- original size: 10947, stripped down to: 7176
if not modules then modules={} end modules ['data-ini']={
version=1.001,
@@ -20836,7 +20584,8 @@ do
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//")
end
end
-do
+if not environment.homedir then
+ local oldhome=osgetenv('HOME')
local homedir=osgetenv(ostype=="windows" and 'USERPROFILE' or 'HOME') or ''
if not homedir or homedir=="" then
homedir=char(127)
@@ -20844,6 +20593,7 @@ do
homedir=file.collapsepath(homedir)
ossetenv("HOME",homedir)
ossetenv("USERPROFILE",homedir)
+ environment.oldhome=oldhome
environment.homedir=homedir
end
do
@@ -21449,7 +21199,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-env"] = package.loaded["data-env"] or true
--- original size: 9400, stripped down to: 6347
+-- original size: 9501, stripped down to: 6411
if not modules then modules={} end modules ['data-env']={
version=1.001,
@@ -21540,7 +21290,9 @@ local relations=allocate {
mp={
names={ "mp" },
variable='MPINPUTS',
- suffixes={ 'mp','mpvi','mpiv','mpxl','mpii' },
+ suffixes=CONTEXTLMTXMODE>0
+ and { 'mp','mpxl','mpvi','mpiv','mpii' }
+ or { 'mp','mpvi','mpiv','mpii' },
usertype=true,
},
tex={
@@ -21734,7 +21486,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-tmp"] = package.loaded["data-tmp"] or true
--- original size: 16099, stripped down to: 11379
+-- original size: 16409, stripped down to: 11591
if not modules then modules={} end modules ['data-tmp']={
version=1.100,
@@ -21984,7 +21736,10 @@ caches.getwritablepath=getwritablepath
caches.setfirstwritablefile=setfirstwritablefile
caches.getfirstreadablefile=getfirstreadablefile
caches.setluanames=setluanames
+local checkmemory=utilities and utilities.lua and utilities.lua.checkmemory
+local threshold=100
function caches.loaddata(readables,name,writable)
+ local used=checkmemory and checkmemory()
if type(readables)=="string" then
readables={ readables }
end
@@ -22011,7 +21766,11 @@ function caches.loaddata(readables,name,writable)
end
if loader then
loader=loader()
- collectgarbage("step")
+ if checkmemory then
+ checkmemory(used,threshold)
+ else
+ collectgarbage("step")
+ end
return loader
end
end
@@ -24110,7 +23869,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-fil"] = package.loaded["data-fil"] or true
--- original size: 4365, stripped down to: 3588
+-- original size: 4365, stripped down to: 3452
if not modules then modules={} end modules ['data-fil']={
version=1.001,
@@ -24130,7 +23889,6 @@ local scanfiles=resolvers.scanfiles
local registerfilehash=resolvers.registerfilehash
local appendhash=resolvers.appendhash
local loadcachecontent=caches.loadcontent
-local checkgarbage=utilities.garbagecollector and utilities.garbagecollector.check
function resolvers.locators.file(specification)
local filename=specification.filename
local realname=resolveprefix(filename)
@@ -24220,10 +23978,7 @@ function loaders.file(specification,filetype)
if trace_locating then
report_files("file loader: %a loaded",filename)
end
- local s=f:read("*a")
- if checkgarbage then
- checkgarbage(#s)
- end
+ local s=f:read("*a")
f:close()
if s then
return true,s,#s
@@ -24371,7 +24126,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-use"] = package.loaded["data-use"] or true
--- original size: 5790, stripped down to: 2910
+-- original size: 5785, stripped down to: 2905
if not modules then modules={} end modules ['data-use']={
version=1.001,
@@ -24387,7 +24142,7 @@ local resolvers=resolvers
local findfile=resolvers.findfile
statistics.register("used config file",function() return caches.configfiles() end)
statistics.register("used cache path",function() return caches.usedpaths() end)
-function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner)
+function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner)
local enginebanner=status.banner
if formatbanner and enginebanner and sourcefile then
local luvname=file.replacesuffix(texname,"luv")
@@ -25532,7 +25287,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["libs-ini"] = package.loaded["libs-ini"] or true
--- original size: 5822, stripped down to: 3629
+-- original size: 6459, stripped down to: 4006
if not modules then modules={} end modules ['libs-ini']={
version=1.001,
@@ -25542,7 +25297,7 @@ if not modules then modules={} end modules ['libs-ini']={
license="see context related readme files"
}
local type,unpack=type,unpack
-local type=type
+local find=string.find
local nameonly=file.nameonly
local joinfile=file.join
local addsuffix=file.addsuffix
@@ -25552,7 +25307,9 @@ local findfile=resolvers.findfile
local expandpaths=resolvers.expandedpathlistfromvariable
local report=logs.reporter("resolvers","libraries")
local trace=false
+local silent=false
trackers.register("resolvers.lib",function(v) trace=v end)
+trackers.register("resolvers.lib.silent",function(v) silent=v end)
local function findlib(required)
local suffix=os.libsuffix or "so"
if not qualifiedpath(required) then
@@ -25653,10 +25410,10 @@ function libraries.optionalloaded(name,libnames)
end
end
local initialized=thelib_initialize(unpack(libnames))
- if initialized then
- report("using library '% + t'",libnames)
- else
+ if not initialized then
report("unable to initialize library '% + t'",libnames)
+ elseif not silent then
+ report("using library '% + t'",libnames)
end
return initialized
end
@@ -25674,6 +25431,19 @@ if FFISUPPORTED and ffi and ffi.load then
end
end
end
+local dofile=dofile
+local savedrequire=require
+function require(name,version)
+ if find(name,"%.lua$") or find(name,"%.lmt$") then
+ local m=dofile(findfile(name))
+ if m then
+ package.loaded[name]=m
+ return m
+ end
+ else
+ return savedrequire(name)
+ end
+end
end -- of closure
@@ -25785,7 +25555,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 13843, stripped down to: 9991
+-- original size: 11691, stripped down to: 8350
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25836,27 +25606,26 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
- luatex=sandbox.registerrunner {
- name="make luatex format",
- program="luatex",
+ luametatex=sandbox.registerrunner {
+ name="make luametatex format",
+ program="luametatex",
template=template,
checkers=checkers,
reporter=report_format,
},
- luametatex=sandbox.registerrunner {
- name="make luametatex format",
- program="luametatex",
+ luatex=sandbox.registerrunner {
+ name="make luatex format",
+ program="luatex",
template=template,
checkers=checkers,
reporter=report_format,
@@ -25869,6 +25638,16 @@ local runners={
reporter=report_format,
},
}
+local stubfiles={
+ luametatex="luat-cod.lmt",
+ luatex="luat-cod.lua",
+ luajittex="luat-cod.lua",
+}
+local suffixes={
+ luametatex="mkxl",
+ luatex="mkiv",
+ luajittex="mkiv",
+}
local function validbinarypath()
if not environment.arguments.nobinarypath then
local path=environment.ownpath or file.dirname(environment.ownname)
@@ -25880,101 +25659,50 @@ local function validbinarypath()
end
end
end
+local function fatalerror(startupdir,...)
+ report_format(...)
+ lfs.chdir(startupdir)
+end
function environment.make_format(formatname)
local arguments=environment.arguments
local engine=environment.ownmain or "luatex"
local silent=arguments.silent
local errors=arguments.errors
- local texsourcename=""
- local texsourcepath=""
- local fulltexsourcename=""
- if engine=="luametatex" then
- texsourcename=file.addsuffix(formatname,"mkxl")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local runner=runners[engine]
+ local startupdir=dir.current()
+ if not runner then
+ return fatalerror(startupdir,"the format %a cannot be generated, no runner available for engine %a",name,engine)
end
- if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"mkiv")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ local luasourcename=stubfiles[engine]
+ if not luasourcename then
+ return fatalerror(startupdir,"no lua stub file specified for %a",engine)
end
+ local texsourcename=file.addsuffix(formatname,suffixes[engine])
+ local fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
if fulltexsourcename=="" then
- texsourcename=file.addsuffix(formatname,"tex")
- fulltexsourcename=resolvers.findfile(texsourcename,"tex") or ""
+ return fatalerror(startupdir,"no tex source file with name %a (mkiv or tex)",formatname)
end
- if fulltexsourcename=="" then
- report_format("no tex source file with name %a (mkiv or tex)",formatname)
- return
- end
- report_format("using tex source file %a",fulltexsourcename)
- fulltexsourcename=dir.expandname(fulltexsourcename)
- texsourcepath=file.dirname(fulltexsourcename)
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
- end
- local specificationname="context.lus"
- local specificationpath=""
- local fullspecificationname=resolvers.findfile(specificationname) or ""
- if fullspecificationname=="" then
- report_format("unable to locate specification file %a",specificationname)
- return
- end
- report_format("using specification file %a",fullspecificationname)
- fullspecificationname=dir.expandname(fullspecificationname)
- specificationpath=file.dirname(fullspecificationname)
- if texsourcepath~=specificationpath then
- report_format("tex source file and specification file are on different paths")
- return
- end
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
+ local fulltexsourcename=dir.expandname(fulltexsourcename)
+ local texsourcepath=file.dirname(fulltexsourcename)
+ if lfs.isfile(fulltexsourcename) then
+ report_format("using tex source file %a",fulltexsourcename)
+ else
+ return fatalerror(startupdir,"no accessible tex source file with name %a",fulltexsourcename)
end
- if not lfs.isfile(fullspecificationname) then
- report_format("no accessible specification file with name %a",fulltexsourcename)
- return
+ local fullluasourcename=dir.expandname(file.join(texsourcepath,luasourcename) or "")
+ if lfs.isfile(fullluasourcename) then
+ report_format("using lua stub file %a",fullluasourcename)
+ else
+ return fatalerror(startupdir,"no accessible lua stub file with name %a",fulltexsourcename)
end
- report_format("using tex source path %a",texsourcepath)
local validformatpath=caches.getwritablepath("formats",engine) or ""
- local startupdir=dir.current()
if validformatpath=="" then
- report_format("invalid format path, insufficient write access")
- return
+ return fatalerror(startupdir,"invalid format path, insufficient write access")
end
local binarypath=validbinarypath()
report_format("changing to format path %a",validformatpath)
- lfs.chdir(validformatpath)
- if dir.current()~=validformatpath then
- report_format("unable to change to format path %a",validformatpath)
- return
- end
- local usedluastub=nil
- local usedlualibs=dofile(fullspecificationname)
- if type(usedlualibs)=="string" then
- usedluastub=file.join(specificationpath,usedlualibs)
- elseif type(usedlualibs)=="table" then
- report_format("using stub specification %a",fullspecificationname)
- local texbasename=file.basename(name)
- local luastubname=file.addsuffix(texbasename,luasuffixes.lua)
- local lucstubname=file.addsuffix(texbasename,luasuffixes.luc)
- report_format("creating initialization file %a",luastubname)
- utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
- if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- report_format("using compiled initialization file %a",lucstubname)
- usedluastub=lucstubname
- else
- report_format("using uncompiled initialization file %a",luastubname)
- usedluastub=luastubname
- end
- else
- report_format("invalid stub specification %a",fullspecificationname)
- lfs.chdir(startupdir)
- return
- end
- local runner=runners[engine]
- if not runner then
- report_format("the format %a cannot be generated, no runner available for engine %a",name,engine)
- lfs.chdir(startupdir)
- return
+ if not lfs.chdir(validformatpath) then
+ return fatalerror(startupdir,"unable to change to format path %a",validformatpath)
end
local primaryflags=primaryflags(arguments)
local secondaryflags=secondaryflags(arguments)
@@ -25982,9 +25710,8 @@ function environment.make_format(formatname)
binarypath=binarypath,
primaryflags=primaryflags,
secondaryflags=secondaryflags,
- luafile=quoted(usedluastub),
+ luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26001,7 +25728,7 @@ function environment.make_format(formatname)
end
report_format("format path : %s",validformatpath)
report_format("luatex engine : %s",engine)
- report_format("lua startup file : %s",usedluastub)
+ report_format("lua startup file : %s",fullluasourcename)
if primaryflags~="" then
report_format("primary flags : %s",primaryflags)
end
@@ -26083,9 +25810,9 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
luafile=quoted(scriptname),
texfile=filename~="" and quoted(filename) or "",
}
- statistics.starttiming()
+ statistics.starttiming("make format")
local result=runner(specification)
- local runtime=statistics.stoptiming()
+ statistics.stoptiming("make format")
if verbose then
report_format()
if binarypath and binarypath~="" then
@@ -26103,7 +25830,7 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
if secondaryflags~="" then
report_format("secondary flags : %s",secondaryflags)
end
- report_format("run time : %.3f seconds",runtime)
+ report_format("run time : %0.3f seconds",statistics.elapsed("make format"))
report_format("return value : %s",result==0 and "okay" or "error")
report_format()
end
@@ -26115,8 +25842,8 @@ end -- of closure
-- 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 : 1038373
--- stripped bytes : 409980
+-- original bytes : 1025947
+-- stripped bytes : 405652
-- end library merge
@@ -26771,12 +26498,14 @@ function runners.edit_script(filename) -- we assume that gvim is present on most
end
function runners.save_script_session(filename, list)
- local t = { }
- for i=1,#list do
- local key = list[i]
- t[key] = environment.arguments[key]
+ if type(list) == "table" then
+ local t = { }
+ for i=1,#list do
+ local key = list[i]
+ t[key] = environment.arguments[key]
+ end
+ io.savedata(filename,table.serialize(t,true))
end
- io.savedata(filename,table.serialize(t,true))
end
function runners.load_script_session(filename)
diff --git a/Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii b/Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii
index 868ca0fc681..a6388465f80 100644
--- a/Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/bibl-tra.mkii
@@ -173,6 +173,8 @@
\def\biblistname{pubs} % for compatibility
+% \newif\ifeditedbook
+
%D how to load the references. There is some new stuff here
%D to support Idris' (incorrect :-)) use of projects
diff --git a/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii b/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
index 5c13c209d07..ca8b992be29 100644
--- a/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2020.03.10 14:44}
+\newcontextversion{2021.03.05 19:11}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/Master/texmf-dist/tex/context/base/mkii/context.mkii b/Master/texmf-dist/tex/context/base/mkii/context.mkii
index db1940639f3..33f8c3aba5a 100644
--- a/Master/texmf-dist/tex/context/base/mkii/context.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.03.10 14:44}
+\edef\contextversion{2021.03.05 19:11}
%D For those who want to use this:
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-cs.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-cs.mkii
index 687c2bd4ccb..0f2336d65ea 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-cs.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-cs.mkii
@@ -128,6 +128,9 @@
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{kap}
\setinterfacevariable{capital}{kapitalky}
+\setinterfacevariable{category}{category}
+\setinterfacevariable{cd:character}{cd:character}
+\setinterfacevariable{cd:font}{cd:font}
\setinterfacevariable{center}{center}
\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{kapitola}
@@ -186,6 +189,7 @@
\setinterfacevariable{external}{externi}
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fakt}
+\setinterfacevariable{fallback}{fallback}
\setinterfacevariable{february}{unor}
\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{obrazek}
@@ -207,6 +211,7 @@
\setinterfacevariable{flushouter}{flushouter}
\setinterfacevariable{flushright}{flushright}
\setinterfacevariable{followingpage}{followingpage}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{upati}
\setinterfacevariable{footnote}{poznamkapodcarou}
\setinterfacevariable{force}{sila}
@@ -278,6 +283,7 @@
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{dotextu}
\setinterfacevariable{intro}{uvod}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{kurziva}
\setinterfacevariable{italicbold}{kurzivnitucne}
\setinterfacevariable{item}{polozka}
@@ -381,6 +387,7 @@
\setinterfacevariable{nonumber}{nonumber}
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normalni}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{nostopper}{nostopper}
\setinterfacevariable{not}{ne}
@@ -448,6 +455,7 @@
\setinterfacevariable{rectangular}{pravouhly}
\setinterfacevariable{reference}{odkaz}
\setinterfacevariable{referral}{znacka}
+\setinterfacevariable{region}{region}
\setinterfacevariable{register}{rejstrik}
\setinterfacevariable{regular}{pravidelne}
\setinterfacevariable{relative}{relativni}
@@ -629,6 +637,7 @@
\setinterfaceconstant{afterkey}{klavesapo}
\setinterfaceconstant{aftersection}{aftersection}
\setinterfaceconstant{align}{zarovnani}
+\setinterfaceconstant{alignbottom}{alignbottom}
\setinterfaceconstant{aligncharacter}{aligncharacter}
\setinterfaceconstant{alignmentcharacter}{alignmentcharacter}
\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
@@ -765,6 +774,9 @@
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
\setinterfaceconstant{default}{implicitni}
+\setinterfaceconstant{defaultheight}{defaultheight}
+\setinterfaceconstant{defaultwidth}{defaultwidth}
+\setinterfaceconstant{define}{define}
\setinterfaceconstant{delay}{prodleva}
\setinterfaceconstant{depth}{hloubka}
\setinterfaceconstant{depthcorrection}{korekcehloubky}
@@ -804,8 +816,10 @@
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{faktor}
\setinterfaceconstant{fallback}{fallback}
+\setinterfaceconstant{fallbacks}{fallbacks}
\setinterfaceconstant{family}{rodina}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{featureset}{featureset}
\setinterfaceconstant{fences}{fences}
\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{barvapozadipole}
@@ -826,6 +840,7 @@
\setinterfaceconstant{focusin}{focusin}
\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{upati}
\setinterfaceconstant{footerdistance}{vzdalenostupati}
\setinterfaceconstant{footerstate}{statusupati}
@@ -880,6 +895,7 @@
\setinterfaceconstant{increment}{zvysit}
\setinterfaceconstant{incrementnumber}{zvysujicicislo}
\setinterfaceconstant{indenting}{odsazovani}
+\setinterfaceconstant{indentlist}{indentlist}
\setinterfaceconstant{indentnext}{odsadpristi}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indikator}
@@ -907,7 +923,10 @@
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{keyword}
\setinterfaceconstant{label}{popisek}
+\setinterfaceconstant{labelalternative}{labelalternative}
+\setinterfaceconstant{labelcolor}{labelcolor}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{labelstyle}{labelstyle}
\setinterfaceconstant{language}{language}
\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
@@ -941,6 +960,7 @@
\setinterfaceconstant{limittext}{limittext}
\setinterfaceconstant{line}{radek}
\setinterfaceconstant{linecorrection}{korekceradku}
+\setinterfaceconstant{linedirection}{linedirection}
\setinterfaceconstant{lines}{radky}
\setinterfaceconstant{list}{seznam}
\setinterfaceconstant{listtext}{listtext}
@@ -1081,6 +1101,7 @@
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{umistit}
\setinterfaceconstant{placehead}{umistihlavicku}
+\setinterfaceconstant{placeholder}{placeholder}
\setinterfaceconstant{placestopper}{predelmista}
\setinterfaceconstant{position}{position}
\setinterfaceconstant{prefix}{prefix}
@@ -1099,6 +1120,7 @@
\setinterfaceconstant{print}{print}
\setinterfaceconstant{printable}{tisknutelne}
\setinterfaceconstant{process}{process}
+\setinterfaceconstant{processors}{processors}
\setinterfaceconstant{profile}{profile}
\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
@@ -1112,6 +1134,7 @@
\setinterfaceconstant{reference}{odkaz}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{odkazujici}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{oblastuvnitr}
@@ -1350,7 +1373,6 @@
\setinterfaceelement{type}{opis}
% definitions for interface commands for language cs
%
-\setinterfacecommand{CAPPED}{KAP}
\setinterfacecommand{Character}{Znak}
\setinterfacecommand{Characters}{Znaky}
\setinterfacecommand{MONTH}{MESIC}
@@ -1364,8 +1386,18 @@
\setinterfacecommand{Word}{Slovo}
\setinterfacecommand{Words}{Slova}
\setinterfacecommand{about}{oref}
+\setinterfacecommand{adaptfontfeature}{adaptfontfeature}
\setinterfacecommand{adaptlayout}{prizpusobvzhled}
+\setinterfacecommand{addfeature}{addfeature}
+\setinterfacecommand{alignbottom}{alignbottom}
+\setinterfacecommand{aligned}{aligned}
+\setinterfacecommand{alignedbox}{alignedbox}
+\setinterfacecommand{alignedline}{alignedline}
+\setinterfacecommand{alignhere}{alignhere}
\setinterfacecommand{alignment}{alignment}
+\setinterfacecommand{alignmentcharacter}{alignmentcharacter}
+\setinterfacecommand{applytocharacters}{applytocharacters}
+\setinterfacecommand{applytofirstcharacter}{applytofirstcharacter}
\setinterfacecommand{arg}{arg}
\setinterfacecommand{at}{pref}
\setinterfacecommand{atleftmargin}{atleftmargin}
@@ -1377,9 +1409,13 @@
\setinterfacecommand{blackrules}{cernelinky}
\setinterfacecommand{blank}{preskoc}
\setinterfacecommand{bookmark}{zalozka}
+\setinterfacecommand{bottombox}{bottombox}
\setinterfacecommand{bottomdistance}{vzdalenostspodku}
\setinterfacecommand{bottomheight}{vyskaspodku}
+\setinterfacecommand{bottomleftbox}{bottomleftbox}
+\setinterfacecommand{bottomrightbox}{bottomrightbox}
\setinterfacecommand{bottomspace}{bottomspace}
+\setinterfacecommand{buildtextbottomdot}{buildtextbottomdot}
\setinterfacecommand{but}{spodek}
\setinterfacecommand{button}{tlacitko}
\setinterfacecommand{bypassblocks}{bypassblocks}
@@ -1418,8 +1454,11 @@
\setinterfacecommand{defineblock}{definujblok}
\setinterfacecommand{definebodyfont}{definujzakladnifont}
\setinterfacecommand{definebodyfontenvironment}{definujprostredizakladnihofontu}
+\setinterfacecommand{definebodyfontswitch}{definebodyfontswitch}
\setinterfacecommand{definebuffer}{definujbuffer}
\setinterfacecommand{definecharacter}{definujznak}
+\setinterfacecommand{definecharacterkerning}{definecharacterkerning}
+\setinterfacecommand{definecharacterspacing}{definecharacterspacing}
\setinterfacecommand{definecolor}{definujbarvu}
\setinterfacecommand{definecolorgroup}{definujskupinubarev}
\setinterfacecommand{definecolumnbreak}{definecolumnbreak}
@@ -1429,37 +1468,57 @@
\setinterfacecommand{definecommand}{definujprikaz}
\setinterfacecommand{defineconversion}{definujkonverzi}
\setinterfacecommand{definedescription}{definujpopis}
+\setinterfacecommand{definedfont}{definedfont}
\setinterfacecommand{defineenumeration}{definujvycet}
+\setinterfacecommand{definefallbackfamily}{definefallbackfamily}
\setinterfacecommand{definefield}{definujpole}
\setinterfacecommand{definefieldstack}{definujzasobnikpoli}
\setinterfacecommand{definefiguresymbol}{definujobrazeksymbol}
+\setinterfacecommand{definefilefallback}{definefilefallback}
+\setinterfacecommand{definefirstline}{definefirstline}
\setinterfacecommand{definefloat}{definujplvouciobjekt}
\setinterfacecommand{definefont}{definujfont}
+\setinterfacecommand{definefontalternative}{definefontalternative}
+\setinterfacecommand{definefontfallback}{definefontfallback}
+\setinterfacecommand{definefontfamily}{definefontfamily}
+\setinterfacecommand{definefontfamilypreset}{definefontfamilypreset}
+\setinterfacecommand{definefontfeature}{definefontfeature}
+\setinterfacecommand{definefontfile}{definefontfile}
+\setinterfacecommand{definefontsize}{definefontsize}
+\setinterfacecommand{definefontsolution}{definefontsolution}
\setinterfacecommand{definefontstyle}{definujstylfontu}
\setinterfacecommand{definefontsynonym}{definujsynonumumfontu}
\setinterfacecommand{defineframed}{definujoramovani}
\setinterfacecommand{defineframedtext}{definujoramovanytext}
+\setinterfacecommand{definefrozenfont}{definefrozenfont}
\setinterfacecommand{definehbox}{definujhbox}
\setinterfacecommand{definehead}{definujnadpis}
+\setinterfacecommand{definehyphenationfeatures}{definehyphenationfeatures}
\setinterfacecommand{defineindentedtext}{defineindentedtext}
\setinterfacecommand{defineinmargin}{defineinmargin}
\setinterfacecommand{defineinteractionmenu}{definujinterakcnimenu}
\setinterfacecommand{defineitemgroup}{defineitemgroup}
+\setinterfacecommand{defineitems}{defineitems}
\setinterfacecommand{definelabel}{definujpopisek}
\setinterfacecommand{definelayer}{definelayer}
\setinterfacecommand{definelayout}{definelayout}
+\setinterfacecommand{definelinenote}{definelinenote}
\setinterfacecommand{definelist}{definujseznam}
\setinterfacecommand{definelogo}{definujlogo}
\setinterfacecommand{definemainfield}{definujhlavnipole}
\setinterfacecommand{definemakeup}{definujupravu}
\setinterfacecommand{definemarking}{definujznaceni}
\setinterfacecommand{definemathalignment}{definemathalignment}
+\setinterfacecommand{definemode}{definemode}
+\setinterfacecommand{definenamedcolor}{definenamedcolor}
+\setinterfacecommand{definenote}{definenote}
\setinterfacecommand{defineoutput}{definujvystup}
\setinterfacecommand{defineoverlay}{definujprekryv}
\setinterfacecommand{definepagebreak}{definepagebreak}
\setinterfacecommand{definepalet}{definujpaletu}
\setinterfacecommand{definepapersize}{definujvelikostpapiru}
\setinterfacecommand{defineparagraphs}{definujodstavce}
+\setinterfacecommand{defineperiodkerning}{defineperiodkerning}
\setinterfacecommand{defineplacement}{defineplacement}
\setinterfacecommand{defineprofile}{definujprofil}
\setinterfacecommand{defineprogram}{definujprogram}
@@ -1481,33 +1540,45 @@
\setinterfacecommand{definetabulate}{definujtabelaci}
\setinterfacecommand{definetext}{definujtext}
\setinterfacecommand{definetextbackground}{definetextbackground}
+\setinterfacecommand{definetextnote}{definetextnote}
\setinterfacecommand{definetextposition}{definetextposition}
\setinterfacecommand{definetextvariable}{definetextvariable}
\setinterfacecommand{definetype}{definetype}
\setinterfacecommand{definetyping}{definujopis}
\setinterfacecommand{defineversion}{definujverzi}
+\setinterfacecommand{depthspanningtext}{depthspanningtext}
\setinterfacecommand{determineheadnumber}{stanovcislonadpisu}
\setinterfacecommand{determinelistcharacteristics}{stanovcharakteristickuseznamu}
\setinterfacecommand{determineregistercharacteristics}{urcicharakteristikurejstriku}
\setinterfacecommand{dimension}{rozmer}
\setinterfacecommand{disableinteractionmenu}{zablokujinterakcnimenu}
+\setinterfacecommand{disablemode}{disablemode}
+\setinterfacecommand{doaddfeature}{doaddfeature}
\setinterfacecommand{domicile}{bydliste}
+\setinterfacecommand{dontconvertfont}{dontconvertfont}
\setinterfacecommand{donttest}{zadnytest}
\setinterfacecommand{edgedistance}{vzdalenostokraje}
\setinterfacecommand{edgewidth}{sirkaokraje}
+\setinterfacecommand{emphasisboldface}{emphasisboldface}
\setinterfacecommand{emptylines}{emptylines}
+\setinterfacecommand{enablemode}{enablemode}
\setinterfacecommand{environment}{prostredi}
\setinterfacecommand{externalfigure}{externiobraz}
\setinterfacecommand{fact}{fakt}
+\setinterfacecommand{fastswitchtobodyfont}{fastswitchtobodyfont}
+\setinterfacecommand{feature}{feature}
\setinterfacecommand{field}{pole}
\setinterfacecommand{fieldstack}{zasobnikpoli}
\setinterfacecommand{fillinfield}{vyplnovepole}
\setinterfacecommand{fillinline}{vyplnovyradek}
\setinterfacecommand{fillinrules}{vyplnovelinky}
\setinterfacecommand{fillintext}{vyplnenytext}
+\setinterfacecommand{firstcharacter}{firstcharacter}
\setinterfacecommand{fitfield}{prizpusobivepole}
+\setinterfacecommand{fittopbaselinegrid}{fittopbaselinegrid}
\setinterfacecommand{fixedspace}{tvrdamezera}
\setinterfacecommand{fixedspaces}{tvrdemezery}
+\setinterfacecommand{flushnotes}{flushnotes}
\setinterfacecommand{followprofile}{dodrzujprofil}
\setinterfacecommand{followprofileversion}{dodrzujverziprofilu}
\setinterfacecommand{followversion}{dodrzujverzi}
@@ -1516,13 +1587,19 @@
\setinterfacecommand{footnote}{poznamkapodcarou}
\setinterfacecommand{footnotetext}{footnotetext}
\setinterfacecommand{forceblocks}{forceblocks}
+\setinterfacecommand{forcecharacterstripping}{forcecharacterstripping}
\setinterfacecommand{formulanumber}{cislorovnice}
\setinterfacecommand{fraction}{zlomek}
\setinterfacecommand{framed}{oramovani}
\setinterfacecommand{from}{zref}
+\setinterfacecommand{fromlinenote}{fromlinenote}
\setinterfacecommand{getbuffer}{ziskejbuffer}
+\setinterfacecommand{getfirstcharacter}{getfirstcharacter}
\setinterfacecommand{getmarking}{ziskejznaceni}
\setinterfacecommand{getnumber}{getnumber}
+\setinterfacecommand{globaldisablemode}{globaldisablemode}
+\setinterfacecommand{globalenablemode}{globalenablemode}
+\setinterfacecommand{globalpreventmode}{globalpreventmode}
\setinterfacecommand{godown}{jdidolu}
\setinterfacecommand{goto}{jdina}
\setinterfacecommand{gotobox}{jdinabox}
@@ -1538,6 +1615,7 @@
\setinterfacecommand{headnumber}{cislonadpisu}
\setinterfacecommand{headsym}{headsym}
\setinterfacecommand{headtext}{texthlavicky}
+\setinterfacecommand{heightspanningtext}{heightspanningtext}
\setinterfacecommand{hideblocks}{schovejbloky}
\setinterfacecommand{high}{vysoky}
\setinterfacecommand{hl}{hl}
@@ -1569,26 +1647,37 @@
\setinterfacecommand{interactionbuttons}{interakcnitlacitka}
\setinterfacecommand{interactionmenu}{interaktivnimenu}
\setinterfacecommand{item}{polozka}
+\setinterfacecommand{itemgroup}{itemgroup}
\setinterfacecommand{items}{polozky}
+\setinterfacecommand{itemtag}{itemtag}
\setinterfacecommand{its}{pol}
\setinterfacecommand{keepblocks}{zachovejbloky}
+\setinterfacecommand{kerncharacters}{kerncharacters}
\setinterfacecommand{label}{poppisek}
\setinterfacecommand{labels}{popisky}
\setinterfacecommand{labeltext}{textpopisku}
\setinterfacecommand{language}{jazyk}
+\setinterfacecommand{languageCharacters}{languageCharacters}
+\setinterfacecommand{languagecharacters}{languagecharacters}
\setinterfacecommand{leftaligned}{zarovnanovlevo}
+\setinterfacecommand{leftbottombox}{leftbottombox}
\setinterfacecommand{leftedgedistance}{vzdalenostlevehookraje}
\setinterfacecommand{leftedgewidth}{sirkalevehookraje}
+\setinterfacecommand{leftline}{leftline}
\setinterfacecommand{leftmargindistance}{vzdalenostlevemarginalie}
\setinterfacecommand{leftmarginwidth}{sirkalevemarginalie}
\setinterfacecommand{leg}{leg}
\setinterfacecommand{linecorrection}{linecorrection}
+\setinterfacecommand{linenote}{linenote}
+\setinterfacecommand{linespanningtext}{linespanningtext}
\setinterfacecommand{linewidth}{tloustkacary}
\setinterfacecommand{listheight}{vyskaseznamu}
\setinterfacecommand{listlength}{delkaseznamu}
\setinterfacecommand{listsymbol}{listsymbol}
\setinterfacecommand{listwidth}{sirkaseznamu}
+\setinterfacecommand{loadfontgoodies}{loadfontgoodies}
\setinterfacecommand{localfootnotes}{localfootnotes}
+\setinterfacecommand{localnotes}{localnotes}
\setinterfacecommand{logfields}{zaznamovepole}
\setinterfacecommand{lohi}{nivy}
\setinterfacecommand{low}{nizky}
@@ -1619,6 +1708,7 @@
\setinterfacecommand{nodimension}{zadnyrozmer}
\setinterfacecommand{noheaderandfooterlines}{zadnezahlaviaupati}
\setinterfacecommand{noindenting}{zadneodsazovani}
+\setinterfacecommand{noitem}{noitem}
\setinterfacecommand{nolist}{zadnyseznam}
\setinterfacecommand{nomarking}{zadneznaceni}
\setinterfacecommand{nomoreblocks}{zadnedalsibloky}
@@ -1626,6 +1716,7 @@
\setinterfacecommand{nop}{nop}
\setinterfacecommand{nospace}{zadnamezera}
\setinterfacecommand{note}{poznamka}
+\setinterfacecommand{notesymbol}{notesymbol}
\setinterfacecommand{notopandbottomlines}{zadnehorniadolniradky}
\setinterfacecommand{notsmallcapped}{nokap}
\setinterfacecommand{nowhitespace}{zadnebilemisto}
@@ -1637,6 +1728,7 @@
\setinterfacecommand{outermarginwidth}{outermarginwidth}
\setinterfacecommand{packed}{zhustene}
\setinterfacecommand{page}{strana}
+\setinterfacecommand{pagebreak}{pagebreak}
\setinterfacecommand{pagedepth}{pagedepth}
\setinterfacecommand{pagenumber}{cislostrany}
\setinterfacecommand{pageoffset}{pageoffset}
@@ -1655,7 +1747,10 @@
\setinterfacecommand{placelist}{umistiseznam}
\setinterfacecommand{placelistofsynonyms}{placelistofsynonyms}
\setinterfacecommand{placelocalfootnotes}{umistilokalnipoznamkypodcarou}
+\setinterfacecommand{placelocalnotes}{placelocalnotes}
\setinterfacecommand{placelogos}{umistiloga}
+\setinterfacecommand{placenamedfloat}{placenamedfloat}
+\setinterfacecommand{placenotes}{placenotes}
\setinterfacecommand{placeongrid}{umistinamrizku}
\setinterfacecommand{placeontopofeachother}{umistinadsebe}
\setinterfacecommand{placepagenumber}{placepagenumber}
@@ -1668,9 +1763,17 @@
\setinterfacecommand{placetextvariable}{placetextvariable}
\setinterfacecommand{position}{pozice}
\setinterfacecommand{positiontext}{positiontext}
+\setinterfacecommand{postponenotes}{postponenotes}
+\setinterfacecommand{postponingnotes}{postponingnotes}
+\setinterfacecommand{predefinedfont}{predefinedfont}
+\setinterfacecommand{predefinefont}{predefinefont}
+\setinterfacecommand{presetdocument}{presetdocument}
+\setinterfacecommand{prettyprintbuffer}{prettyprintbuffer}
+\setinterfacecommand{preventmode}{preventmode}
\setinterfacecommand{printpaperheight}{vyskatiskpapiru}
\setinterfacecommand{printpaperwidth}{sirkatiskpapiru}
\setinterfacecommand{processblocks}{zpracujbloky}
+\setinterfacecommand{processbodyfontenvironmentlist}{processbodyfontenvironmentlist}
\setinterfacecommand{processpage}{zpracujstranu}
\setinterfacecommand{product}{produkt}
\setinterfacecommand{program}{program}
@@ -1680,19 +1783,45 @@
\setinterfacecommand{quote}{citovat}
\setinterfacecommand{ran}{ran}
\setinterfacecommand{redo}{opakovat}
+\setinterfacecommand{redoconvertfont}{redoconvertfont}
\setinterfacecommand{ref}{ref}
\setinterfacecommand{reference}{odkaz}
\setinterfacecommand{referral}{odkaz}
\setinterfacecommand{referraldate}{odkaznadatum}
\setinterfacecommand{referring}{odkazujici}
+\setinterfacecommand{registerfontclass}{registerfontclass}
+\setinterfacecommand{registerhyphenationexception}{registerhyphenationexception}
+\setinterfacecommand{registerhyphenationpattern}{registerhyphenationpattern}
\setinterfacecommand{remark}{oznaceni}
+\setinterfacecommand{replacefeature}{replacefeature}
\setinterfacecommand{reset}{reset}
+\setinterfacecommand{resetandaddfeature}{resetandaddfeature}
+\setinterfacecommand{resetcharacteralign}{resetcharacteralign}
+\setinterfacecommand{resetcharacterkerning}{resetcharacterkerning}
+\setinterfacecommand{resetcharacterspacing}{resetcharacterspacing}
+\setinterfacecommand{resetcharacterstripping}{resetcharacterstripping}
+\setinterfacecommand{resetfeature}{resetfeature}
+\setinterfacecommand{resetfontcolorsheme}{resetfontcolorsheme}
+\setinterfacecommand{resetfontfallback}{resetfontfallback}
+\setinterfacecommand{resetfontsolution}{resetfontsolution}
+\setinterfacecommand{resethyphenationfeatures}{resethyphenationfeatures}
+\setinterfacecommand{resetlocalfloats}{resetlocalfloats}
\setinterfacecommand{resetmarking}{resetznaceni}
+\setinterfacecommand{resetmode}{resetmode}
\setinterfacecommand{resetnumber}{resetnumber}
-\setinterfacecommand{resettext}{resettextcontent}
+\setinterfacecommand{resetpath}{resetpath}
+\setinterfacecommand{resetperiodkerning}{resetperiodkerning}
+\setinterfacecommand{resetsystemmode}{resetsystemmode}
+\setinterfacecommand{resettextcontent}{resettextcontent}
+\setinterfacecommand{resetvisualizers}{resetvisualizers}
+\setinterfacecommand{restoreglobalbodyfont}{restoreglobalbodyfont}
+\setinterfacecommand{retestfeature}{retestfeature}
+\setinterfacecommand{revivefeature}{revivefeature}
\setinterfacecommand{rightaligned}{zarovnanovpravo}
+\setinterfacecommand{rightbottombox}{rightbottombox}
\setinterfacecommand{rightedgedistance}{vzdalenostpravehookraje}
\setinterfacecommand{rightedgewidth}{sirkapravehookraje}
+\setinterfacecommand{rightline}{rightline}
\setinterfacecommand{rightmargindistance}{vzdalenostpravemarginalie}
\setinterfacecommand{rightmarginwidth}{sirkapravemarginalie}
\setinterfacecommand{romannumerals}{rimskecislice}
@@ -1703,12 +1832,38 @@
\setinterfacecommand{selectblocks}{vyberbloky}
\setinterfacecommand{selectpaper}{vyberpapir}
\setinterfacecommand{selectversion}{vyberverzi}
+\setinterfacecommand{setbigbodyfont}{setbigbodyfont}
+\setinterfacecommand{setcharacteralign}{setcharacteralign}
+\setinterfacecommand{setcharacteraligndetail}{setcharacteraligndetail}
+\setinterfacecommand{setcharactercasing}{setcharactercasing}
+\setinterfacecommand{setcharactercleaning}{setcharactercleaning}
+\setinterfacecommand{setcharacterkerning}{setcharacterkerning}
+\setinterfacecommand{setcharacterspacing}{setcharacterspacing}
+\setinterfacecommand{setcharacterstripping}{setcharacterstripping}
+\setinterfacecommand{setcurrentfontclass}{setcurrentfontclass}
+\setinterfacecommand{setfirstline}{setfirstline}
+\setinterfacecommand{setfirstpasscharacteralign}{setfirstpasscharacteralign}
+\setinterfacecommand{setfont}{setfont}
+\setinterfacecommand{setfontcolorsheme}{setfontcolorsheme}
+\setinterfacecommand{setfontfeature}{setfontfeature}
+\setinterfacecommand{setfontsolution}{setfontsolution}
+\setinterfacecommand{setfontstrut}{setfontstrut}
+\setinterfacecommand{sethyphenationfeatures}{sethyphenationfeatures}
+\setinterfacecommand{setmainbodyfont}{setmainbodyfont}
+\setinterfacecommand{setmode}{setmode}
+\setinterfacecommand{setnote}{setnote}
+\setinterfacecommand{setnotetext}{setnotetext}
\setinterfacecommand{setnumber}{setnumber}
+\setinterfacecommand{setperiodkerning}{setperiodkerning}
+\setinterfacecommand{setsecondpasscharacteralign}{setsecondpasscharacteralign}
+\setinterfacecommand{setsmallbodyfont}{setsmallbodyfont}
+\setinterfacecommand{setsystemmode}{setsystemmode}
\setinterfacecommand{settextcontent}{settextcontent}
\setinterfacecommand{settextvariable}{settextvariable}
\setinterfacecommand{setupalign}{nastavzarovnani}
\setinterfacecommand{setupanswerarea}{setupanswerarea}
\setinterfacecommand{setuparranging}{nastavusporadani}
+\setinterfacecommand{setupattachment}{setupattachment}
\setinterfacecommand{setupbackground}{nastavpozadi}
\setinterfacecommand{setupbackgrounds}{nastavpozadi}
\setinterfacecommand{setupblackrules}{nastavcernelinky}
@@ -1723,6 +1878,9 @@
\setinterfacecommand{setupcapitals}{nastavkapitalky}
\setinterfacecommand{setupcaption}{nastavpopisek}
\setinterfacecommand{setupcaptions}{nastavpopisky}
+\setinterfacecommand{setupcharacteralign}{setupcharacteralign}
+\setinterfacecommand{setupcharacterkerning}{setupcharacterkerning}
+\setinterfacecommand{setupcharacterspacing}{setupcharacterspacing}
\setinterfacecommand{setupclipping}{nastavorez}
\setinterfacecommand{setupcolor}{nastavbarvu}
\setinterfacecommand{setupcolors}{nastavbarvy}
@@ -1733,6 +1891,7 @@
\setinterfacecommand{setupcombinations}{nastavspojeni}
\setinterfacecommand{setupcombinedlist}{nastavkombinovanyseznam}
\setinterfacecommand{setupcomment}{nastavkomentar}
+\setinterfacecommand{setupcounter}{setupcounter}
\setinterfacecommand{setupdescription}{setupdescription}
\setinterfacecommand{setupdescriptions}{nastavpopisy}
\setinterfacecommand{setupenumeration}{setupenumeration}
@@ -1742,9 +1901,14 @@
\setinterfacecommand{setupfields}{nastavvsechnapole}
\setinterfacecommand{setupfillinlines}{nastavvyplnoveradky}
\setinterfacecommand{setupfillinrules}{nastavvyplnovelinky}
+\setinterfacecommand{setupfirstline}{setupfirstline}
\setinterfacecommand{setupfloat}{nastavplvouciobjekt}
\setinterfacecommand{setupfloats}{nastavplvouciobjekty}
\setinterfacecommand{setupfloatsplitting}{nastavdeleniplvoucichobjektu}
+\setinterfacecommand{setupfontexpansion}{setupfontexpansion}
+\setinterfacecommand{setupfontprotrusion}{setupfontprotrusion}
+\setinterfacecommand{setupfonts}{setupfonts}
+\setinterfacecommand{setupfontsolution}{setupfontsolution}
\setinterfacecommand{setupfooter}{nastavupati}
\setinterfacecommand{setupfootertexts}{nastavtextyupati}
\setinterfacecommand{setupfootnotedefinition}{nastavdefinicipoznamekpodcarou}
@@ -1761,6 +1925,7 @@
\setinterfacecommand{setupheadnumber}{nastavcislonadpisu}
\setinterfacecommand{setupheads}{nastavnadpisy}
\setinterfacecommand{setupheadtext}{nastavtexthlavicky}
+\setinterfacecommand{setuphyphenation}{setuphyphenation}
\setinterfacecommand{setuphyphenmark}{nastavdelitko}
\setinterfacecommand{setupindentedtext}{setupindentedtext}
\setinterfacecommand{setupindenting}{nastavodsazovani}
@@ -1777,6 +1942,7 @@
\setinterfacecommand{setuplanguage}{nastavjazyk}
\setinterfacecommand{setuplayout}{nastavvzhled}
\setinterfacecommand{setuplegend}{nastavlegendu}
+\setinterfacecommand{setuplinenote}{setuplinenote}
\setinterfacecommand{setuplinenumbering}{nastavcislovaniradku}
\setinterfacecommand{setuplines}{nastavradky}
\setinterfacecommand{setuplinewidth}{nastavsirkucary}
@@ -1789,6 +1955,10 @@
\setinterfacecommand{setupmarking}{nastavznaceni}
\setinterfacecommand{setupmathalignment}{setupmathalignment}
\setinterfacecommand{setupnarrower}{nastavzuzeni}
+\setinterfacecommand{setupnotation}{setupnotation}
+\setinterfacecommand{setupnotations}{setupnotations}
+\setinterfacecommand{setupnote}{setupnote}
+\setinterfacecommand{setupnotes}{setupnotes}
\setinterfacecommand{setupnumber}{setupnumber}
\setinterfacecommand{setupnumbering}{nastavcislovani}
\setinterfacecommand{setupoppositeplacing}{nastavumisteniprotejsku}
@@ -1802,6 +1972,7 @@
\setinterfacecommand{setuppapersize}{nastavvelikostpapiru}
\setinterfacecommand{setupparagraphnumbering}{nastavcislovaniodstavcu}
\setinterfacecommand{setupparagraphs}{nastavodstavce}
+\setinterfacecommand{setupperiodkerning}{setupperiodkerning}
\setinterfacecommand{setupplacement}{setupplacement}
\setinterfacecommand{setuppositioning}{nastavumistovani}
\setinterfacecommand{setupprofiles}{nastavprofily}
@@ -1831,6 +2002,7 @@
\setinterfacecommand{setuptabulate}{nastavtabelaci}
\setinterfacecommand{setuptext}{nastavtext}
\setinterfacecommand{setuptextbackground}{setuptextbackground}
+\setinterfacecommand{setuptextnote}{setuptextnote}
\setinterfacecommand{setuptextposition}{setuptextposition}
\setinterfacecommand{setuptextrules}{nastavtextovelinky}
\setinterfacecommand{setuptexttexts}{nastavtexttexty}
@@ -1845,16 +2017,29 @@
\setinterfacecommand{setupurl}{nastavurl}
\setinterfacecommand{setupversions}{nastavverze}
\setinterfacecommand{setupwhitespace}{nastavbilamista}
+\setinterfacecommand{setvisualizerfont}{setvisualizerfont}
\setinterfacecommand{showbodyfont}{ukazzakladnifont}
\setinterfacecommand{showbodyfontenvironment}{ukazpostredizakladnihofontu}
\setinterfacecommand{showcolor}{ukazbarvu}
\setinterfacecommand{showcolorgroup}{ukazskupinubarev}
+\setinterfacecommand{showcounter}{showcounter}
\setinterfacecommand{showexternalfigures}{ukazexterniobrazy}
\setinterfacecommand{showfields}{ukazpole}
+\setinterfacecommand{showfont}{showfont}
+\setinterfacecommand{showfontdata}{showfontdata}
+\setinterfacecommand{showfontexpansion}{showfontexpansion}
+\setinterfacecommand{showfontitalics}{showfontitalics}
+\setinterfacecommand{showfontkerns}{showfontkerns}
+\setinterfacecommand{showfontparameters}{showfontparameters}
+\setinterfacecommand{showfontstrip}{showfontstrip}
+\setinterfacecommand{showfontstyle}{showfontstyle}
\setinterfacecommand{showframe}{ukazramecek}
\setinterfacecommand{showgrid}{ukazmrizku}
+\setinterfacecommand{showhyphenationtrace}{showhyphenationtrace}
+\setinterfacecommand{showkerning}{showkerning}
\setinterfacecommand{showlayout}{ukazvzhled}
\setinterfacecommand{showmakeup}{ukazupravu}
+\setinterfacecommand{showminimalbaseline}{showminimalbaseline}
\setinterfacecommand{showpalet}{ukazpaletu}
\setinterfacecommand{showprint}{ukazvytisk}
\setinterfacecommand{showsetups}{ukaznastaveni}
@@ -1864,6 +2049,7 @@
\setinterfacecommand{someline}{nejakyradek}
\setinterfacecommand{somewhere}{nekde}
\setinterfacecommand{space}{mezera}
+\setinterfacecommand{specialitem}{specialitem}
\setinterfacecommand{splitfloat}{rozdelplvouciobjekt}
\setinterfacecommand{startalignment}{startzarovnavani}
\setinterfacecommand{startbackground}{startpozadi}
@@ -1881,6 +2067,7 @@
\setinterfacecommand{startglobal}{startglobalni}
\setinterfacecommand{startline}{startradek}
\setinterfacecommand{startlinecorrection}{startkorekceradku}
+\setinterfacecommand{startlinenote}{startlinenote}
\setinterfacecommand{startlinenumbering}{startcislovaniradku}
\setinterfacecommand{startlines}{startradky}
\setinterfacecommand{startlocal}{startlokalni}
@@ -1891,7 +2078,7 @@
\setinterfacecommand{startnarrower}{startzuzeni}
\setinterfacecommand{startopposite}{startprotejsek}
\setinterfacecommand{startoverlay}{startprekryv}
-\setinterfacecommand{startoverzicht}{startprehled}
+\setinterfacecommand{startoverview}{startprehled}
\setinterfacecommand{startpacked}{startzhustene}
\setinterfacecommand{startpositioning}{startumistovani}
\setinterfacecommand{startproduct}{startprodukt}
@@ -1923,6 +2110,7 @@
\setinterfacecommand{stopglobal}{stopglobalni}
\setinterfacecommand{stopline}{stopradek}
\setinterfacecommand{stoplinecorrection}{stopkorekceradku}
+\setinterfacecommand{stoplinenote}{stoplinenote}
\setinterfacecommand{stoplinenumbering}{stopcislovaniradku}
\setinterfacecommand{stoplines}{stopradky}
\setinterfacecommand{stoplocal}{stoplokalni}
@@ -1933,7 +2121,7 @@
\setinterfacecommand{stopnarrower}{stopzuzeni}
\setinterfacecommand{stopopposite}{stopprotejsek}
\setinterfacecommand{stopoverlay}{stopprekryv}
-\setinterfacecommand{stopoverzicht}{stopprehled}
+\setinterfacecommand{stopoverview}{stopprehled}
\setinterfacecommand{stoppacked}{stopzhustene}
\setinterfacecommand{stoppositioning}{stopumistovani}
\setinterfacecommand{stopproduct}{stopprodukt}
@@ -1950,8 +2138,11 @@
\setinterfacecommand{stopunpacked}{stopnezhustene}
\setinterfacecommand{stopversion}{stopverze}
\setinterfacecommand{stretched}{roztazene}
+\setinterfacecommand{strictinspectnextcharacter}{strictinspectnextcharacter}
+\setinterfacecommand{stripcharacter}{stripcharacter}
\setinterfacecommand{subformulanumber}{cislopodrovnice}
\setinterfacecommand{subpagenumber}{subpagenumber}
+\setinterfacecommand{subtractfeature}{subtractfeature}
\setinterfacecommand{switchtobodyfont}{prepninazakladnifont}
\setinterfacecommand{switchtorawfont}{switchtorawfont}
\setinterfacecommand{sym}{sym}
@@ -1961,16 +2152,24 @@
\setinterfacecommand{synchronize}{synchronizovat}
\setinterfacecommand{tab}{tab}
\setinterfacecommand{testcolumn}{testcolumn}
+\setinterfacecommand{testfeature}{testfeature}
+\setinterfacecommand{testfeatureonce}{testfeatureonce}
\setinterfacecommand{testpage}{testpage}
\setinterfacecommand{tex}{tex}
\setinterfacecommand{textbackground}{textbackground}
+\setinterfacecommand{textcolor}{textcolor}
\setinterfacecommand{textheight}{vyskatextu}
+\setinterfacecommand{textnote}{textnote}
\setinterfacecommand{textreference}{odkaznatext}
\setinterfacecommand{textrule}{textovalinka}
\setinterfacecommand{textvariable}{textvariable}
\setinterfacecommand{textwidth}{sirkatextu}
+\setinterfacecommand{thefirstcharacter}{thefirstcharacter}
+\setinterfacecommand{thenormalizedbodyfontsize}{thenormalizedbodyfontsize}
+\setinterfacecommand{theremainingcharacters}{theremainingcharacters}
\setinterfacecommand{thinrule}{tenkalinka}
\setinterfacecommand{thinrules}{tenkelinky}
+\setinterfacecommand{tolinenote}{tolinenote}
\setinterfacecommand{tooltip}{bublinkovanapoveda}
\setinterfacecommand{topdistance}{vzdalenosthorejsku}
\setinterfacecommand{topheight}{vyskahorejsku}
@@ -1981,13 +2180,19 @@
\setinterfacecommand{typ}{pis}
\setinterfacecommand{type}{opis}
\setinterfacecommand{typebuffer}{typebuffer}
+\setinterfacecommand{typedefinedbuffer}{typedefinedbuffer}
\setinterfacecommand{typefile}{opissoubor}
+\setinterfacecommand{typeinlinebuffer}{typeinlinebuffer}
+\setinterfacecommand{typing}{typing}
\setinterfacecommand{unitmeaning}{vyznam}
\setinterfacecommand{unknown}{neznamo}
+\setinterfacecommand{unregisterhyphenationpattern}{unregisterhyphenationpattern}
\setinterfacecommand{useJSscripts}{uzijJSscripts}
\setinterfacecommand{useURL}{uzijURL}
\setinterfacecommand{useXMLfilter}{useXMLfilter}
\setinterfacecommand{useblocks}{uzijbloky}
+\setinterfacecommand{usebodyfont}{usebodyfont}
+\setinterfacecommand{usebodyfontparameter}{usebodyfontparameter}
\setinterfacecommand{usecommands}{uzijprikazy}
\setinterfacecommand{useencoding}{uzijkodovani}
\setinterfacecommand{useexternaldocument}{uzijexternidokument}
@@ -2004,10 +2209,12 @@
\setinterfacecommand{usetypescript}{usetypescript}
\setinterfacecommand{usetypescriptfile}{usetypescriptfile}
\setinterfacecommand{useurl}{uzijurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{verze}
\setinterfacecommand{vl}{vl}
\setinterfacecommand{weekday}{vsedniden}
\setinterfacecommand{whitespace}{bilemisto}
+\setinterfacecommand{widthspanningtext}{widthspanningtext}
\setinterfacecommand{wordright}{slovovpravo}
\setinterfacecommand{writebetweenlist}{zapismeziseznam}
\setinterfacecommand{writetolist}{zapisdoseznamu}
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-de.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-de.mkii
index 1690133a5e2..06a4fb16236 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-de.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-de.mkii
@@ -128,6 +128,9 @@
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{kap}
\setinterfacevariable{capital}{versalien}
+\setinterfacevariable{category}{category}
+\setinterfacevariable{cd:character}{cd:character}
+\setinterfacevariable{cd:font}{cd:font}
\setinterfacevariable{center}{center}
\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{kapitel}
@@ -186,6 +189,7 @@
\setinterfacevariable{external}{extern}
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{gegeben}
+\setinterfacevariable{fallback}{fallback}
\setinterfacevariable{february}{februar}
\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{abbildung}
@@ -207,6 +211,7 @@
\setinterfacevariable{flushouter}{flushouter}
\setinterfacevariable{flushright}{flushright}
\setinterfacevariable{followingpage}{followingpage}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{fusszeile}
\setinterfacevariable{footnote}{fussnote}
\setinterfacevariable{force}{zwinge}
@@ -278,6 +283,7 @@
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{imtext}
\setinterfacevariable{intro}{intro}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{italic}
\setinterfacevariable{italicbold}{italicfett}
\setinterfacevariable{item}{pos}
@@ -381,6 +387,7 @@
\setinterfacevariable{nonumber}{nonumber}
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normal}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{nostopper}{nostopper}
\setinterfacevariable{not}{nicht}
@@ -448,6 +455,7 @@
\setinterfacevariable{rectangular}{rechteckig}
\setinterfacevariable{reference}{referenz}
\setinterfacevariable{referral}{merkmal}
+\setinterfacevariable{region}{region}
\setinterfacevariable{register}{register}
\setinterfacevariable{regular}{regular}
\setinterfacevariable{relative}{relativ}
@@ -629,6 +637,7 @@
\setinterfaceconstant{afterkey}{nachtaste}
\setinterfaceconstant{aftersection}{aftersection}
\setinterfaceconstant{align}{ausrichtung}
+\setinterfaceconstant{alignbottom}{alignbottom}
\setinterfaceconstant{aligncharacter}{aligncharacter}
\setinterfaceconstant{alignmentcharacter}{alignmentcharacter}
\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
@@ -765,6 +774,9 @@
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
\setinterfaceconstant{default}{default}
+\setinterfaceconstant{defaultheight}{defaultheight}
+\setinterfaceconstant{defaultwidth}{defaultwidth}
+\setinterfaceconstant{define}{define}
\setinterfaceconstant{delay}{wartezeit}
\setinterfaceconstant{depth}{tiefe}
\setinterfaceconstant{depthcorrection}{tiefekorrektur}
@@ -804,8 +816,10 @@
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{faktor}
\setinterfaceconstant{fallback}{fallback}
+\setinterfaceconstant{fallbacks}{fallbacks}
\setinterfaceconstant{family}{familie}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{featureset}{featureset}
\setinterfaceconstant{fences}{fences}
\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{feldhintergrundfarbe}
@@ -826,6 +840,7 @@
\setinterfaceconstant{focusin}{focusin}
\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{fusszeile}
\setinterfaceconstant{footerdistance}{fusszeilenabstand}
\setinterfaceconstant{footerstate}{fusszeilenstatus}
@@ -880,6 +895,7 @@
\setinterfaceconstant{increment}{erhoehen}
\setinterfaceconstant{incrementnumber}{nummererhoehen}
\setinterfaceconstant{indenting}{einziehen}
+\setinterfaceconstant{indentlist}{indentlist}
\setinterfaceconstant{indentnext}{ziehefolgendeein}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indikator}
@@ -907,7 +923,10 @@
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{keyword}
\setinterfaceconstant{label}{label}
+\setinterfaceconstant{labelalternative}{labelalternative}
+\setinterfaceconstant{labelcolor}{labelcolor}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{labelstyle}{labelstyle}
\setinterfaceconstant{language}{language}
\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
@@ -941,6 +960,7 @@
\setinterfaceconstant{limittext}{limittext}
\setinterfaceconstant{line}{zeile}
\setinterfaceconstant{linecorrection}{zeilekorrektur}
+\setinterfaceconstant{linedirection}{linedirection}
\setinterfaceconstant{lines}{zeilen}
\setinterfaceconstant{list}{liste}
\setinterfaceconstant{listtext}{listtext}
@@ -1081,6 +1101,7 @@
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{platziere}
\setinterfaceconstant{placehead}{setzekopf}
+\setinterfaceconstant{placeholder}{placeholder}
\setinterfaceconstant{placestopper}{setzetrenner}
\setinterfaceconstant{position}{position}
\setinterfaceconstant{prefix}{prefix}
@@ -1099,6 +1120,7 @@
\setinterfaceconstant{print}{print}
\setinterfaceconstant{printable}{druckbar}
\setinterfaceconstant{process}{process}
+\setinterfaceconstant{processors}{processors}
\setinterfaceconstant{profile}{profile}
\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
@@ -1112,6 +1134,7 @@
\setinterfaceconstant{reference}{referenz}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{referieren}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{regionin}
@@ -1350,7 +1373,6 @@
\setinterfaceelement{type}{type}
% definitions for interface commands for language de
%
-\setinterfacecommand{CAPPED}{KAP}
\setinterfacecommand{Character}{Buchstabe}
\setinterfacecommand{Characters}{Buchstaben}
\setinterfacecommand{MONTH}{MONAT}
@@ -1364,8 +1386,18 @@
\setinterfacecommand{Word}{Wort}
\setinterfacecommand{Words}{Woerter}
\setinterfacecommand{about}{ueber}
+\setinterfacecommand{adaptfontfeature}{adaptfontfeature}
\setinterfacecommand{adaptlayout}{passelayoutan}
+\setinterfacecommand{addfeature}{addfeature}
+\setinterfacecommand{alignbottom}{alignbottom}
+\setinterfacecommand{aligned}{aligned}
+\setinterfacecommand{alignedbox}{alignedbox}
+\setinterfacecommand{alignedline}{alignedline}
+\setinterfacecommand{alignhere}{alignhere}
\setinterfacecommand{alignment}{alignment}
+\setinterfacecommand{alignmentcharacter}{alignmentcharacter}
+\setinterfacecommand{applytocharacters}{applytocharacters}
+\setinterfacecommand{applytofirstcharacter}{applytofirstcharacter}
\setinterfacecommand{arg}{arg}
\setinterfacecommand{at}{bei}
\setinterfacecommand{atleftmargin}{atleftmargin}
@@ -1377,9 +1409,13 @@
\setinterfacecommand{blackrules}{rechtecke}
\setinterfacecommand{blank}{blanko}
\setinterfacecommand{bookmark}{bookmark}
+\setinterfacecommand{bottombox}{bottombox}
\setinterfacecommand{bottomdistance}{abstandunten}
\setinterfacecommand{bottomheight}{hoeheunten}
+\setinterfacecommand{bottomleftbox}{bottomleftbox}
+\setinterfacecommand{bottomrightbox}{bottomrightbox}
\setinterfacecommand{bottomspace}{bottomspace}
+\setinterfacecommand{buildtextbottomdot}{buildtextbottomdot}
\setinterfacecommand{but}{but}
\setinterfacecommand{button}{knopf}
\setinterfacecommand{bypassblocks}{bypassblocks}
@@ -1418,8 +1454,11 @@
\setinterfacecommand{defineblock}{definiereblock}
\setinterfacecommand{definebodyfont}{definierefliesstext}
\setinterfacecommand{definebodyfontenvironment}{definierefliesstextumgebung}
+\setinterfacecommand{definebodyfontswitch}{definebodyfontswitch}
\setinterfacecommand{definebuffer}{definierepuffer}
\setinterfacecommand{definecharacter}{definierezeichen}
+\setinterfacecommand{definecharacterkerning}{definecharacterkerning}
+\setinterfacecommand{definecharacterspacing}{definecharacterspacing}
\setinterfacecommand{definecolor}{definierefarbe}
\setinterfacecommand{definecolorgroup}{definierefarbengruppe}
\setinterfacecommand{definecolumnbreak}{definecolumnbreak}
@@ -1429,37 +1468,57 @@
\setinterfacecommand{definecommand}{definierebefehl}
\setinterfacecommand{defineconversion}{definierekonversion}
\setinterfacecommand{definedescription}{definierebeschreibung}
+\setinterfacecommand{definedfont}{definedfont}
\setinterfacecommand{defineenumeration}{definierenummerierung}
+\setinterfacecommand{definefallbackfamily}{definefallbackfamily}
\setinterfacecommand{definefield}{definierefeld}
\setinterfacecommand{definefieldstack}{definierefeldstapel}
\setinterfacecommand{definefiguresymbol}{definiereabbsymbol}
+\setinterfacecommand{definefilefallback}{definefilefallback}
+\setinterfacecommand{definefirstline}{definefirstline}
\setinterfacecommand{definefloat}{definieregleitobjekt}
\setinterfacecommand{definefont}{definiereschrift}
+\setinterfacecommand{definefontalternative}{definefontalternative}
+\setinterfacecommand{definefontfallback}{definefontfallback}
+\setinterfacecommand{definefontfamily}{definefontfamily}
+\setinterfacecommand{definefontfamilypreset}{definefontfamilypreset}
+\setinterfacecommand{definefontfeature}{definefontfeature}
+\setinterfacecommand{definefontfile}{definefontfile}
+\setinterfacecommand{definefontsize}{definefontsize}
+\setinterfacecommand{definefontsolution}{definefontsolution}
\setinterfacecommand{definefontstyle}{definiereschriftstil}
\setinterfacecommand{definefontsynonym}{defineschriftsynonym}
\setinterfacecommand{defineframed}{definiereumrahmt}
\setinterfacecommand{defineframedtext}{definiereumrahmtertext}
+\setinterfacecommand{definefrozenfont}{definefrozenfont}
\setinterfacecommand{definehbox}{definierehbox}
\setinterfacecommand{definehead}{definiereueberschrift}
+\setinterfacecommand{definehyphenationfeatures}{definehyphenationfeatures}
\setinterfacecommand{defineindentedtext}{defineindentedtext}
\setinterfacecommand{defineinmargin}{defineinmargin}
\setinterfacecommand{defineinteractionmenu}{definiereinteraktionsmenue}
\setinterfacecommand{defineitemgroup}{defineitemgroup}
+\setinterfacecommand{defineitems}{defineitems}
\setinterfacecommand{definelabel}{definierelabel}
\setinterfacecommand{definelayer}{definelayer}
\setinterfacecommand{definelayout}{definelayout}
+\setinterfacecommand{definelinenote}{definelinenote}
\setinterfacecommand{definelist}{definiereliste}
\setinterfacecommand{definelogo}{definierelogo}
\setinterfacecommand{definemainfield}{definierehauptfeld}
\setinterfacecommand{definemakeup}{definiereumbruch}
\setinterfacecommand{definemarking}{definierebeschriftung}
\setinterfacecommand{definemathalignment}{definemathalignment}
+\setinterfacecommand{definemode}{definemode}
+\setinterfacecommand{definenamedcolor}{definenamedcolor}
+\setinterfacecommand{definenote}{definenote}
\setinterfacecommand{defineoutput}{defineoutput}
\setinterfacecommand{defineoverlay}{definiereoverlay}
\setinterfacecommand{definepagebreak}{definepagebreak}
\setinterfacecommand{definepalet}{definierepalette}
\setinterfacecommand{definepapersize}{definierepapierformat}
\setinterfacecommand{defineparagraphs}{definiereabsaetze}
+\setinterfacecommand{defineperiodkerning}{defineperiodkerning}
\setinterfacecommand{defineplacement}{defineplacement}
\setinterfacecommand{defineprofile}{definiereprofil}
\setinterfacecommand{defineprogram}{definiereprogramme}
@@ -1481,33 +1540,45 @@
\setinterfacecommand{definetabulate}{definieretabulator}
\setinterfacecommand{definetext}{definieretext}
\setinterfacecommand{definetextbackground}{definetextbackground}
+\setinterfacecommand{definetextnote}{definetextnote}
\setinterfacecommand{definetextposition}{definetextposition}
\setinterfacecommand{definetextvariable}{definetextvariable}
\setinterfacecommand{definetype}{definetype}
\setinterfacecommand{definetyping}{definieretippen}
\setinterfacecommand{defineversion}{definiereversion}
+\setinterfacecommand{depthspanningtext}{depthspanningtext}
\setinterfacecommand{determineheadnumber}{bestimmekopfnummer}
\setinterfacecommand{determinelistcharacteristics}{bestimmelistencharakeristika}
\setinterfacecommand{determineregistercharacteristics}{bestimmeregistercharakteristika}
\setinterfacecommand{dimension}{dimension}
\setinterfacecommand{disableinteractionmenu}{inaktiviereinteraktionsmenue}
+\setinterfacecommand{disablemode}{disablemode}
+\setinterfacecommand{doaddfeature}{doaddfeature}
\setinterfacecommand{domicile}{wohnort}
+\setinterfacecommand{dontconvertfont}{dontconvertfont}
\setinterfacecommand{donttest}{keintest}
\setinterfacecommand{edgedistance}{randabstand}
\setinterfacecommand{edgewidth}{randbreite}
+\setinterfacecommand{emphasisboldface}{emphasisboldface}
\setinterfacecommand{emptylines}{emptylines}
+\setinterfacecommand{enablemode}{enablemode}
\setinterfacecommand{environment}{umgebung}
\setinterfacecommand{externalfigure}{externeabbildung}
\setinterfacecommand{fact}{geg}
+\setinterfacecommand{fastswitchtobodyfont}{fastswitchtobodyfont}
+\setinterfacecommand{feature}{feature}
\setinterfacecommand{field}{feld}
\setinterfacecommand{fieldstack}{feldstapel}
\setinterfacecommand{fillinfield}{ausfuellfeld}
\setinterfacecommand{fillinline}{gefuelltezeile}
\setinterfacecommand{fillinrules}{gefuelltesrechteck}
\setinterfacecommand{fillintext}{ausfuelltext}
+\setinterfacecommand{firstcharacter}{firstcharacter}
\setinterfacecommand{fitfield}{passendfeld}
+\setinterfacecommand{fittopbaselinegrid}{fittopbaselinegrid}
\setinterfacecommand{fixedspace}{festesspatium}
\setinterfacecommand{fixedspaces}{festesspatium}
+\setinterfacecommand{flushnotes}{flushnotes}
\setinterfacecommand{followprofile}{folgeprofil}
\setinterfacecommand{followprofileversion}{folgeprofilversion}
\setinterfacecommand{followversion}{folgeversion}
@@ -1516,13 +1587,19 @@
\setinterfacecommand{footnote}{fussnote}
\setinterfacecommand{footnotetext}{footnotetext}
\setinterfacecommand{forceblocks}{forceblocks}
+\setinterfacecommand{forcecharacterstripping}{forcecharacterstripping}
\setinterfacecommand{formulanumber}{formelnummer}
\setinterfacecommand{fraction}{bruch}
\setinterfacecommand{framed}{umrahmt}
\setinterfacecommand{from}{von}
+\setinterfacecommand{fromlinenote}{fromlinenote}
\setinterfacecommand{getbuffer}{holepuffer}
+\setinterfacecommand{getfirstcharacter}{getfirstcharacter}
\setinterfacecommand{getmarking}{holebeschriftung}
\setinterfacecommand{getnumber}{getnumber}
+\setinterfacecommand{globaldisablemode}{globaldisablemode}
+\setinterfacecommand{globalenablemode}{globalenablemode}
+\setinterfacecommand{globalpreventmode}{globalpreventmode}
\setinterfacecommand{godown}{nachunten}
\setinterfacecommand{goto}{zu}
\setinterfacecommand{gotobox}{zurbox}
@@ -1538,6 +1615,7 @@
\setinterfacecommand{headnumber}{kopfnummer}
\setinterfacecommand{headsym}{headsym}
\setinterfacecommand{headtext}{ueberschrifttext}
+\setinterfacecommand{heightspanningtext}{heightspanningtext}
\setinterfacecommand{hideblocks}{verbergebloecke}
\setinterfacecommand{high}{hoch}
\setinterfacecommand{hl}{hl}
@@ -1569,26 +1647,37 @@
\setinterfacecommand{interactionbuttons}{interaktionsknopfe}
\setinterfacecommand{interactionmenu}{interaktionsmenue}
\setinterfacecommand{item}{pos}
+\setinterfacecommand{itemgroup}{itemgroup}
\setinterfacecommand{items}{posten}
+\setinterfacecommand{itemtag}{itemtag}
\setinterfacecommand{its}{its}
\setinterfacecommand{keepblocks}{behaltebloecke}
+\setinterfacecommand{kerncharacters}{kerncharacters}
\setinterfacecommand{label}{label}
\setinterfacecommand{labels}{labels}
\setinterfacecommand{labeltext}{labeltext}
\setinterfacecommand{language}{sprache}
+\setinterfacecommand{languageCharacters}{languageCharacters}
+\setinterfacecommand{languagecharacters}{languagecharacters}
\setinterfacecommand{leftaligned}{linksbuendig}
+\setinterfacecommand{leftbottombox}{leftbottombox}
\setinterfacecommand{leftedgedistance}{abstandlinkerrand}
\setinterfacecommand{leftedgewidth}{breitelinkerrand}
+\setinterfacecommand{leftline}{leftline}
\setinterfacecommand{leftmargindistance}{linkemarginalafstand}
\setinterfacecommand{leftmarginwidth}{linkemarginalbreite}
\setinterfacecommand{leg}{leg}
\setinterfacecommand{linecorrection}{linecorrection}
+\setinterfacecommand{linenote}{linenote}
+\setinterfacecommand{linespanningtext}{linespanningtext}
\setinterfacecommand{linewidth}{liniendicke}
\setinterfacecommand{listheight}{listenhoehe}
\setinterfacecommand{listlength}{listenlaenge}
\setinterfacecommand{listsymbol}{listsymbol}
\setinterfacecommand{listwidth}{listenbreite}
+\setinterfacecommand{loadfontgoodies}{loadfontgoodies}
\setinterfacecommand{localfootnotes}{localfootnotes}
+\setinterfacecommand{localnotes}{localnotes}
\setinterfacecommand{logfields}{registrierefelder}
\setinterfacecommand{lohi}{tiho}
\setinterfacecommand{low}{tief}
@@ -1619,6 +1708,7 @@
\setinterfacecommand{nodimension}{keindimension}
\setinterfacecommand{noheaderandfooterlines}{keinekopfundfusszeilen}
\setinterfacecommand{noindenting}{nichteinziehen}
+\setinterfacecommand{noitem}{noitem}
\setinterfacecommand{nolist}{keineliste}
\setinterfacecommand{nomarking}{keinebeschriftung}
\setinterfacecommand{nomoreblocks}{keinebloeckemehr}
@@ -1626,6 +1716,7 @@
\setinterfacecommand{nop}{nop}
\setinterfacecommand{nospace}{keinspatium}
\setinterfacecommand{note}{notiz}
+\setinterfacecommand{notesymbol}{notesymbol}
\setinterfacecommand{notopandbottomlines}{keinzeilenobenundunten}
\setinterfacecommand{notsmallcapped}{nokap}
\setinterfacecommand{nowhitespace}{keinzwischenraum}
@@ -1637,6 +1728,7 @@
\setinterfacecommand{outermarginwidth}{outermarginwidth}
\setinterfacecommand{packed}{kleinerdurchschuss}
\setinterfacecommand{page}{seite}
+\setinterfacecommand{pagebreak}{pagebreak}
\setinterfacecommand{pagedepth}{pagedepth}
\setinterfacecommand{pagenumber}{seitenummer}
\setinterfacecommand{pageoffset}{pageoffset}
@@ -1655,7 +1747,10 @@
\setinterfacecommand{placelist}{platziereliste}
\setinterfacecommand{placelistofsynonyms}{placelistofsynonyms}
\setinterfacecommand{placelocalfootnotes}{platzierelokalefussnoten}
+\setinterfacecommand{placelocalnotes}{placelocalnotes}
\setinterfacecommand{placelogos}{platzierelogo}
+\setinterfacecommand{placenamedfloat}{placenamedfloat}
+\setinterfacecommand{placenotes}{placenotes}
\setinterfacecommand{placeongrid}{amgitterausrichten}
\setinterfacecommand{placeontopofeachother}{platziereuntereinander}
\setinterfacecommand{placepagenumber}{placepagenumber}
@@ -1668,9 +1763,17 @@
\setinterfacecommand{placetextvariable}{placetextvariable}
\setinterfacecommand{position}{position}
\setinterfacecommand{positiontext}{positiontext}
+\setinterfacecommand{postponenotes}{postponenotes}
+\setinterfacecommand{postponingnotes}{postponingnotes}
+\setinterfacecommand{predefinedfont}{predefinedfont}
+\setinterfacecommand{predefinefont}{predefinefont}
+\setinterfacecommand{presetdocument}{presetdocument}
+\setinterfacecommand{prettyprintbuffer}{prettyprintbuffer}
+\setinterfacecommand{preventmode}{preventmode}
\setinterfacecommand{printpaperheight}{printpapierhoehe}
\setinterfacecommand{printpaperwidth}{printpapierbreite}
\setinterfacecommand{processblocks}{bearbeitebloecke}
+\setinterfacecommand{processbodyfontenvironmentlist}{processbodyfontenvironmentlist}
\setinterfacecommand{processpage}{bearbeiteseite}
\setinterfacecommand{product}{produkt}
\setinterfacecommand{program}{programm}
@@ -1680,19 +1783,45 @@
\setinterfacecommand{quote}{zitieren}
\setinterfacecommand{ran}{ran}
\setinterfacecommand{redo}{wiederholen}
+\setinterfacecommand{redoconvertfont}{redoconvertfont}
\setinterfacecommand{ref}{ref}
\setinterfacecommand{reference}{referenz}
\setinterfacecommand{referral}{verweis}
\setinterfacecommand{referraldate}{verweisdatum}
\setinterfacecommand{referring}{referieren}
+\setinterfacecommand{registerfontclass}{registerfontclass}
+\setinterfacecommand{registerhyphenationexception}{registerhyphenationexception}
+\setinterfacecommand{registerhyphenationpattern}{registerhyphenationpattern}
\setinterfacecommand{remark}{bemerkung}
+\setinterfacecommand{replacefeature}{replacefeature}
\setinterfacecommand{reset}{ruecksetzten}
+\setinterfacecommand{resetandaddfeature}{resetandaddfeature}
+\setinterfacecommand{resetcharacteralign}{resetcharacteralign}
+\setinterfacecommand{resetcharacterkerning}{resetcharacterkerning}
+\setinterfacecommand{resetcharacterspacing}{resetcharacterspacing}
+\setinterfacecommand{resetcharacterstripping}{resetcharacterstripping}
+\setinterfacecommand{resetfeature}{resetfeature}
+\setinterfacecommand{resetfontcolorsheme}{resetfontcolorsheme}
+\setinterfacecommand{resetfontfallback}{resetfontfallback}
+\setinterfacecommand{resetfontsolution}{resetfontsolution}
+\setinterfacecommand{resethyphenationfeatures}{resethyphenationfeatures}
+\setinterfacecommand{resetlocalfloats}{resetlocalfloats}
\setinterfacecommand{resetmarking}{ruecksetztenbeschriftung}
+\setinterfacecommand{resetmode}{resetmode}
\setinterfacecommand{resetnumber}{resetnumber}
-\setinterfacecommand{resettext}{resettextcontent}
+\setinterfacecommand{resetpath}{resetpath}
+\setinterfacecommand{resetperiodkerning}{resetperiodkerning}
+\setinterfacecommand{resetsystemmode}{resetsystemmode}
+\setinterfacecommand{resettextcontent}{resettextcontent}
+\setinterfacecommand{resetvisualizers}{resetvisualizers}
+\setinterfacecommand{restoreglobalbodyfont}{restoreglobalbodyfont}
+\setinterfacecommand{retestfeature}{retestfeature}
+\setinterfacecommand{revivefeature}{revivefeature}
\setinterfacecommand{rightaligned}{rechtsbuendig}
+\setinterfacecommand{rightbottombox}{rightbottombox}
\setinterfacecommand{rightedgedistance}{abstandrechterrand}
\setinterfacecommand{rightedgewidth}{breiterechterrand}
+\setinterfacecommand{rightline}{rightline}
\setinterfacecommand{rightmargindistance}{rechtemarginalafstand}
\setinterfacecommand{rightmarginwidth}{rechtemarginalbreite}
\setinterfacecommand{romannumerals}{roemischezahlen}
@@ -1703,12 +1832,38 @@
\setinterfacecommand{selectblocks}{waehlebloeckeaus}
\setinterfacecommand{selectpaper}{waehlepapieraus}
\setinterfacecommand{selectversion}{waehleversionaus}
+\setinterfacecommand{setbigbodyfont}{setbigbodyfont}
+\setinterfacecommand{setcharacteralign}{setcharacteralign}
+\setinterfacecommand{setcharacteraligndetail}{setcharacteraligndetail}
+\setinterfacecommand{setcharactercasing}{setcharactercasing}
+\setinterfacecommand{setcharactercleaning}{setcharactercleaning}
+\setinterfacecommand{setcharacterkerning}{setcharacterkerning}
+\setinterfacecommand{setcharacterspacing}{setcharacterspacing}
+\setinterfacecommand{setcharacterstripping}{setcharacterstripping}
+\setinterfacecommand{setcurrentfontclass}{setcurrentfontclass}
+\setinterfacecommand{setfirstline}{setfirstline}
+\setinterfacecommand{setfirstpasscharacteralign}{setfirstpasscharacteralign}
+\setinterfacecommand{setfont}{setfont}
+\setinterfacecommand{setfontcolorsheme}{setfontcolorsheme}
+\setinterfacecommand{setfontfeature}{setfontfeature}
+\setinterfacecommand{setfontsolution}{setfontsolution}
+\setinterfacecommand{setfontstrut}{setfontstrut}
+\setinterfacecommand{sethyphenationfeatures}{sethyphenationfeatures}
+\setinterfacecommand{setmainbodyfont}{setmainbodyfont}
+\setinterfacecommand{setmode}{setmode}
+\setinterfacecommand{setnote}{setnote}
+\setinterfacecommand{setnotetext}{setnotetext}
\setinterfacecommand{setnumber}{setnumber}
+\setinterfacecommand{setperiodkerning}{setperiodkerning}
+\setinterfacecommand{setsecondpasscharacteralign}{setsecondpasscharacteralign}
+\setinterfacecommand{setsmallbodyfont}{setsmallbodyfont}
+\setinterfacecommand{setsystemmode}{setsystemmode}
\setinterfacecommand{settextcontent}{settext}
\setinterfacecommand{settextvariable}{settextvariable}
\setinterfacecommand{setupalign}{stelleausrichtungein}
\setinterfacecommand{setupanswerarea}{setupanswerarea}
\setinterfacecommand{setuparranging}{stelleanordnenein}
+\setinterfacecommand{setupattachment}{setupattachment}
\setinterfacecommand{setupbackground}{stellehintergrundein}
\setinterfacecommand{setupbackgrounds}{stellehintergruendeein}
\setinterfacecommand{setupblackrules}{stellerechteckein}
@@ -1723,6 +1878,9 @@
\setinterfacecommand{setupcapitals}{stelleversalienein}
\setinterfacecommand{setupcaption}{stellebildunterschriftein}
\setinterfacecommand{setupcaptions}{stellebilderunterschriftein}
+\setinterfacecommand{setupcharacteralign}{setupcharacteralign}
+\setinterfacecommand{setupcharacterkerning}{setupcharacterkerning}
+\setinterfacecommand{setupcharacterspacing}{setupcharacterspacing}
\setinterfacecommand{setupclipping}{stelleausschnittein}
\setinterfacecommand{setupcolor}{stellefarbeein}
\setinterfacecommand{setupcolors}{stellefarbenein}
@@ -1733,6 +1891,7 @@
\setinterfacecommand{setupcombinations}{stellekombinationein}
\setinterfacecommand{setupcombinedlist}{stellezusammengestelltelisteein}
\setinterfacecommand{setupcomment}{stellekommentarein}
+\setinterfacecommand{setupcounter}{setupcounter}
\setinterfacecommand{setupdescription}{setupdescription}
\setinterfacecommand{setupdescriptions}{definierebeschreibungen}
\setinterfacecommand{setupenumeration}{setupenumeration}
@@ -1742,9 +1901,14 @@
\setinterfacecommand{setupfields}{stellefelderin}
\setinterfacecommand{setupfillinlines}{stellegefuelltezeileein}
\setinterfacecommand{setupfillinrules}{stellegefuelltesrechteckein}
+\setinterfacecommand{setupfirstline}{setupfirstline}
\setinterfacecommand{setupfloat}{stellegleitobjektein}
\setinterfacecommand{setupfloats}{stellegleitobjekteein}
\setinterfacecommand{setupfloatsplitting}{stelleplatziegeteiltegleitobjekt}
+\setinterfacecommand{setupfontexpansion}{setupfontexpansion}
+\setinterfacecommand{setupfontprotrusion}{setupfontprotrusion}
+\setinterfacecommand{setupfonts}{setupfonts}
+\setinterfacecommand{setupfontsolution}{setupfontsolution}
\setinterfacecommand{setupfooter}{stellefusszeileein}
\setinterfacecommand{setupfootertexts}{stellefusszeilentextein}
\setinterfacecommand{setupfootnotedefinition}{stellefussnotendefinitionein}
@@ -1761,6 +1925,7 @@
\setinterfacecommand{setupheadnumber}{stellekopfzahlein}
\setinterfacecommand{setupheads}{stelleueberschriftenein}
\setinterfacecommand{setupheadtext}{stelleueberschrifttextein}
+\setinterfacecommand{setuphyphenation}{setuphyphenation}
\setinterfacecommand{setuphyphenmark}{stellebindestrichein}
\setinterfacecommand{setupindentedtext}{setupindentedtext}
\setinterfacecommand{setupindenting}{stelleeinziehenein}
@@ -1777,6 +1942,7 @@
\setinterfacecommand{setuplanguage}{stellespracheein}
\setinterfacecommand{setuplayout}{stellelayoutein}
\setinterfacecommand{setuplegend}{stellelegendeein}
+\setinterfacecommand{setuplinenote}{setuplinenote}
\setinterfacecommand{setuplinenumbering}{stellezeilennumerierungein}
\setinterfacecommand{setuplines}{stellezeilenein}
\setinterfacecommand{setuplinewidth}{stellelinienbreiteein}
@@ -1789,6 +1955,10 @@
\setinterfacecommand{setupmarking}{stellebeschriftungein}
\setinterfacecommand{setupmathalignment}{setupmathalignment}
\setinterfacecommand{setupnarrower}{stelleengerein}
+\setinterfacecommand{setupnotation}{setupnotation}
+\setinterfacecommand{setupnotations}{setupnotations}
+\setinterfacecommand{setupnote}{setupnote}
+\setinterfacecommand{setupnotes}{setupnotes}
\setinterfacecommand{setupnumber}{setupnumber}
\setinterfacecommand{setupnumbering}{stellenummerierungein}
\setinterfacecommand{setupoppositeplacing}{stellegegenueberplatzierenein}
@@ -1802,6 +1972,7 @@
\setinterfacecommand{setuppapersize}{stellepapierformatein}
\setinterfacecommand{setupparagraphnumbering}{stelleabsatznummerierungein}
\setinterfacecommand{setupparagraphs}{stelleabsaetzeein}
+\setinterfacecommand{setupperiodkerning}{setupperiodkerning}
\setinterfacecommand{setupplacement}{setupplacement}
\setinterfacecommand{setuppositioning}{stellepositionierenein}
\setinterfacecommand{setupprofiles}{stelleprofilein}
@@ -1831,6 +2002,7 @@
\setinterfacecommand{setuptabulate}{stelletabulatorein}
\setinterfacecommand{setuptext}{stelletextein}
\setinterfacecommand{setuptextbackground}{setuptextbackground}
+\setinterfacecommand{setuptextnote}{setuptextnote}
\setinterfacecommand{setuptextposition}{setuptextposition}
\setinterfacecommand{setuptextrules}{stelletextumrissein}
\setinterfacecommand{setuptexttexts}{stelletexttexteein}
@@ -1845,16 +2017,29 @@
\setinterfacecommand{setupurl}{stelleurlein}
\setinterfacecommand{setupversions}{stelleversionein}
\setinterfacecommand{setupwhitespace}{stellezwischenraumein}
+\setinterfacecommand{setvisualizerfont}{setvisualizerfont}
\setinterfacecommand{showbodyfont}{zeigefliesstext}
\setinterfacecommand{showbodyfontenvironment}{zeigefliesstextumgebung}
\setinterfacecommand{showcolor}{zeigefarbe}
\setinterfacecommand{showcolorgroup}{zeigefarbengruppe}
+\setinterfacecommand{showcounter}{showcounter}
\setinterfacecommand{showexternalfigures}{zeigeexterneabbildungen}
\setinterfacecommand{showfields}{zeigefelder}
+\setinterfacecommand{showfont}{showfont}
+\setinterfacecommand{showfontdata}{showfontdata}
+\setinterfacecommand{showfontexpansion}{showfontexpansion}
+\setinterfacecommand{showfontitalics}{showfontitalics}
+\setinterfacecommand{showfontkerns}{showfontkerns}
+\setinterfacecommand{showfontparameters}{showfontparameters}
+\setinterfacecommand{showfontstrip}{showfontstrip}
+\setinterfacecommand{showfontstyle}{showfontstyle}
\setinterfacecommand{showframe}{zeigerahmen}
\setinterfacecommand{showgrid}{zeigegitter}
+\setinterfacecommand{showhyphenationtrace}{showhyphenationtrace}
+\setinterfacecommand{showkerning}{showkerning}
\setinterfacecommand{showlayout}{zeigelayout}
\setinterfacecommand{showmakeup}{zeigeumbruch}
+\setinterfacecommand{showminimalbaseline}{showminimalbaseline}
\setinterfacecommand{showpalet}{zeigepalette}
\setinterfacecommand{showprint}{zeigedruck}
\setinterfacecommand{showsetups}{zeigeeinstellungen}
@@ -1864,6 +2049,7 @@
\setinterfacecommand{someline}{einezeile}
\setinterfacecommand{somewhere}{irgendwo}
\setinterfacecommand{space}{spatium}
+\setinterfacecommand{specialitem}{specialitem}
\setinterfacecommand{splitfloat}{teilegleitobjekt}
\setinterfacecommand{startalignment}{startausrichtung}
\setinterfacecommand{startbackground}{starthintergrund}
@@ -1881,6 +2067,7 @@
\setinterfacecommand{startglobal}{startglobal}
\setinterfacecommand{startline}{startzeile}
\setinterfacecommand{startlinecorrection}{startzeilenkorrektur}
+\setinterfacecommand{startlinenote}{startlinenote}
\setinterfacecommand{startlinenumbering}{startzeilennumerierung}
\setinterfacecommand{startlines}{startzeilen}
\setinterfacecommand{startlocal}{startlokal}
@@ -1891,7 +2078,7 @@
\setinterfacecommand{startnarrower}{startenger}
\setinterfacecommand{startopposite}{startgegenueber}
\setinterfacecommand{startoverlay}{startoverlay}
-\setinterfacecommand{startoverzicht}{startueberblick}
+\setinterfacecommand{startoverview}{startueberblick}
\setinterfacecommand{startpacked}{startkleinerdurchschuss}
\setinterfacecommand{startpositioning}{startpositionieren}
\setinterfacecommand{startproduct}{startprodukt}
@@ -1923,6 +2110,7 @@
\setinterfacecommand{stopglobal}{stopglobal}
\setinterfacecommand{stopline}{stopzeile}
\setinterfacecommand{stoplinecorrection}{stopzeilenkorrektur}
+\setinterfacecommand{stoplinenote}{stoplinenote}
\setinterfacecommand{stoplinenumbering}{stopzeilennumerierung}
\setinterfacecommand{stoplines}{stopzeilen}
\setinterfacecommand{stoplocal}{stoplokal}
@@ -1933,7 +2121,7 @@
\setinterfacecommand{stopnarrower}{stopenger}
\setinterfacecommand{stopopposite}{stopgegenueber}
\setinterfacecommand{stopoverlay}{stopoverlay}
-\setinterfacecommand{stopoverzicht}{stopueberblick}
+\setinterfacecommand{stopoverview}{stopueberblick}
\setinterfacecommand{stoppacked}{stopkleinerdurchschuss}
\setinterfacecommand{stoppositioning}{stoppositionieren}
\setinterfacecommand{stopproduct}{stopprodukt}
@@ -1950,8 +2138,11 @@
\setinterfacecommand{stopunpacked}{stopgrosserdurchschuss}
\setinterfacecommand{stopversion}{stopversion}
\setinterfacecommand{stretched}{gestreckt}
+\setinterfacecommand{strictinspectnextcharacter}{strictinspectnextcharacter}
+\setinterfacecommand{stripcharacter}{stripcharacter}
\setinterfacecommand{subformulanumber}{unterformelnummer}
\setinterfacecommand{subpagenumber}{subpagenumber}
+\setinterfacecommand{subtractfeature}{subtractfeature}
\setinterfacecommand{switchtobodyfont}{wechselezumfliesstext}
\setinterfacecommand{switchtorawfont}{switchtorawfont}
\setinterfacecommand{sym}{sym}
@@ -1961,16 +2152,24 @@
\setinterfacecommand{synchronize}{synchronisieren}
\setinterfacecommand{tab}{tab}
\setinterfacecommand{testcolumn}{testcolumn}
+\setinterfacecommand{testfeature}{testfeature}
+\setinterfacecommand{testfeatureonce}{testfeatureonce}
\setinterfacecommand{testpage}{testpage}
\setinterfacecommand{tex}{tex}
\setinterfacecommand{textbackground}{textbackground}
+\setinterfacecommand{textcolor}{textcolor}
\setinterfacecommand{textheight}{texthoehe}
+\setinterfacecommand{textnote}{textnote}
\setinterfacecommand{textreference}{textreferenz}
\setinterfacecommand{textrule}{textlinie}
\setinterfacecommand{textvariable}{textvariable}
\setinterfacecommand{textwidth}{textbreite}
+\setinterfacecommand{thefirstcharacter}{thefirstcharacter}
+\setinterfacecommand{thenormalizedbodyfontsize}{thenormalizedbodyfontsize}
+\setinterfacecommand{theremainingcharacters}{theremainingcharacters}
\setinterfacecommand{thinrule}{duennelinie}
\setinterfacecommand{thinrules}{duennerumriss}
+\setinterfacecommand{tolinenote}{tolinenote}
\setinterfacecommand{tooltip}{tooltip}
\setinterfacecommand{topdistance}{abstandoben}
\setinterfacecommand{topheight}{hoeheoben}
@@ -1981,13 +2180,19 @@
\setinterfacecommand{typ}{tip}
\setinterfacecommand{type}{tippen}
\setinterfacecommand{typebuffer}{tippepuffer}
+\setinterfacecommand{typedefinedbuffer}{typedefinedbuffer}
\setinterfacecommand{typefile}{tippedatei}
+\setinterfacecommand{typeinlinebuffer}{typeinlinebuffer}
+\setinterfacecommand{typing}{typing}
\setinterfacecommand{unitmeaning}{bedeutung}
\setinterfacecommand{unknown}{unbekant}
+\setinterfacecommand{unregisterhyphenationpattern}{unregisterhyphenationpattern}
\setinterfacecommand{useJSscripts}{verwendeJSscript}
\setinterfacecommand{useURL}{verwendeURL}
\setinterfacecommand{useXMLfilter}{useXMLfilter}
\setinterfacecommand{useblocks}{verwendebloecke}
+\setinterfacecommand{usebodyfont}{usebodyfont}
+\setinterfacecommand{usebodyfontparameter}{usebodyfontparameter}
\setinterfacecommand{usecommands}{verwendebefehl}
\setinterfacecommand{useencoding}{benutzekodierung}
\setinterfacecommand{useexternaldocument}{verwendeexteresdokument}
@@ -2004,10 +2209,12 @@
\setinterfacecommand{usetypescript}{usetypescript}
\setinterfacecommand{usetypescriptfile}{usetypescriptfile}
\setinterfacecommand{useurl}{verwendeurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{version}
\setinterfacecommand{vl}{vl}
\setinterfacecommand{weekday}{wochentag}
\setinterfacecommand{whitespace}{zwischenraum}
+\setinterfacecommand{widthspanningtext}{widthspanningtext}
\setinterfacecommand{wordright}{wortrechts}
\setinterfacecommand{writebetweenlist}{schreibezwischenliste}
\setinterfacecommand{writetolist}{schreibezurliste}
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-en.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-en.mkii
index 3d7935db7c0..d3a073db356 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-en.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-en.mkii
@@ -128,6 +128,9 @@
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{capital}
+\setinterfacevariable{category}{category}
+\setinterfacevariable{cd:character}{cd:character}
+\setinterfacevariable{cd:font}{cd:font}
\setinterfacevariable{center}{center}
\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{chapter}
@@ -186,6 +189,7 @@
\setinterfacevariable{external}{external}
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fact}
+\setinterfacevariable{fallback}{fallback}
\setinterfacevariable{february}{february}
\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{figure}
@@ -207,6 +211,7 @@
\setinterfacevariable{flushouter}{flushouter}
\setinterfacevariable{flushright}{flushright}
\setinterfacevariable{followingpage}{followingpage}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{footer}
\setinterfacevariable{footnote}{footnote}
\setinterfacevariable{force}{force}
@@ -278,6 +283,7 @@
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intext}
\setinterfacevariable{intro}{intro}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{italic}
\setinterfacevariable{italicbold}{italicbold}
\setinterfacevariable{item}{item}
@@ -381,6 +387,7 @@
\setinterfacevariable{nonumber}{nonumber}
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normal}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{nostopper}{nostopper}
\setinterfacevariable{not}{not}
@@ -448,6 +455,7 @@
\setinterfacevariable{rectangular}{rectangular}
\setinterfacevariable{reference}{reference}
\setinterfacevariable{referral}{referral}
+\setinterfacevariable{region}{region}
\setinterfacevariable{register}{register}
\setinterfacevariable{regular}{regular}
\setinterfacevariable{relative}{relative}
@@ -629,6 +637,7 @@
\setinterfaceconstant{afterkey}{afterkey}
\setinterfaceconstant{aftersection}{aftersection}
\setinterfaceconstant{align}{align}
+\setinterfaceconstant{alignbottom}{alignbottom}
\setinterfaceconstant{aligncharacter}{aligncharacter}
\setinterfaceconstant{alignmentcharacter}{alignmentcharacter}
\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
@@ -765,6 +774,7 @@
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
\setinterfaceconstant{default}{default}
+\setinterfaceconstant{define}{define}
\setinterfaceconstant{delay}{delay}
\setinterfaceconstant{depth}{depth}
\setinterfaceconstant{depthcorrection}{depthcorrection}
@@ -804,8 +814,10 @@
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{factor}
\setinterfaceconstant{fallback}{fallback}
+\setinterfaceconstant{fallbacks}{fallbacks}
\setinterfaceconstant{family}{family}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{featureset}{featureset}
\setinterfaceconstant{fences}{fences}
\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{fieldbackgroundcolor}
@@ -826,6 +838,7 @@
\setinterfaceconstant{focusin}{focusin}
\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{footer}
\setinterfaceconstant{footerdistance}{footerdistance}
\setinterfaceconstant{footerstate}{footerstate}
@@ -880,6 +893,7 @@
\setinterfaceconstant{increment}{increment}
\setinterfaceconstant{incrementnumber}{incrementnumber}
\setinterfaceconstant{indenting}{indenting}
+\setinterfaceconstant{indentlist}{indentlist}
\setinterfaceconstant{indentnext}{indentnext}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicator}
@@ -907,7 +921,10 @@
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{keyword}
\setinterfaceconstant{label}{label}
+\setinterfaceconstant{labelalternative}{labelalternative}
+\setinterfaceconstant{labelcolor}{labelcolor}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{labelstyle}{labelstyle}
\setinterfaceconstant{language}{language}
\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
@@ -941,6 +958,7 @@
\setinterfaceconstant{limittext}{limittext}
\setinterfaceconstant{line}{line}
\setinterfaceconstant{linecorrection}{linecorrection}
+\setinterfaceconstant{linedirection}{linedirection}
\setinterfaceconstant{lines}{lines}
\setinterfaceconstant{list}{list}
\setinterfaceconstant{listtext}{listtext}
@@ -1081,6 +1099,7 @@
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{place}
\setinterfaceconstant{placehead}{placehead}
+\setinterfaceconstant{placeholder}{placeholder}
\setinterfaceconstant{placestopper}{placestopper}
\setinterfaceconstant{position}{position}
\setinterfaceconstant{prefix}{prefix}
@@ -1112,6 +1131,7 @@
\setinterfaceconstant{reference}{reference}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{referencing}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{regionin}
@@ -1350,7 +1370,6 @@
\setinterfaceelement{type}{type}
% definitions for interface commands for language en
%
-\setinterfacecommand{CAPPED}{CAP}
\setinterfacecommand{Character}{Character}
\setinterfacecommand{Characters}{Characters}
\setinterfacecommand{MONTH}{MONTH}
@@ -1364,8 +1383,18 @@
\setinterfacecommand{Word}{Word}
\setinterfacecommand{Words}{Words}
\setinterfacecommand{about}{about}
+\setinterfacecommand{adaptfontfeature}{adaptfontfeature}
\setinterfacecommand{adaptlayout}{adaptlayout}
+\setinterfacecommand{addfeature}{addfeature}
+\setinterfacecommand{alignbottom}{alignbottom}
+\setinterfacecommand{aligned}{aligned}
+\setinterfacecommand{alignedbox}{alignedbox}
+\setinterfacecommand{alignedline}{alignedline}
+\setinterfacecommand{alignhere}{alignhere}
\setinterfacecommand{alignment}{alignment}
+\setinterfacecommand{alignmentcharacter}{alignmentcharacter}
+\setinterfacecommand{applytocharacters}{applytocharacters}
+\setinterfacecommand{applytofirstcharacter}{applytofirstcharacter}
\setinterfacecommand{arg}{arg}
\setinterfacecommand{at}{at}
\setinterfacecommand{atleftmargin}{atleftmargin}
@@ -1377,9 +1406,13 @@
\setinterfacecommand{blackrules}{blackrules}
\setinterfacecommand{blank}{blank}
\setinterfacecommand{bookmark}{bookmark}
+\setinterfacecommand{bottombox}{bottombox}
\setinterfacecommand{bottomdistance}{bottomdistance}
\setinterfacecommand{bottomheight}{bottomheight}
+\setinterfacecommand{bottomleftbox}{bottomleftbox}
+\setinterfacecommand{bottomrightbox}{bottomrightbox}
\setinterfacecommand{bottomspace}{bottomspace}
+\setinterfacecommand{buildtextbottomdot}{buildtextbottomdot}
\setinterfacecommand{but}{but}
\setinterfacecommand{button}{button}
\setinterfacecommand{bypassblocks}{bypassblocks}
@@ -1418,8 +1451,11 @@
\setinterfacecommand{defineblock}{defineblock}
\setinterfacecommand{definebodyfont}{definebodyfont}
\setinterfacecommand{definebodyfontenvironment}{definebodyfontenvironment}
+\setinterfacecommand{definebodyfontswitch}{definebodyfontswitch}
\setinterfacecommand{definebuffer}{definebuffer}
\setinterfacecommand{definecharacter}{definecharacter}
+\setinterfacecommand{definecharacterkerning}{definecharacterkerning}
+\setinterfacecommand{definecharacterspacing}{definecharacterspacing}
\setinterfacecommand{definecolor}{definecolor}
\setinterfacecommand{definecolorgroup}{definecolorgroup}
\setinterfacecommand{definecolumnbreak}{definecolumnbreak}
@@ -1429,37 +1465,57 @@
\setinterfacecommand{definecommand}{definecommand}
\setinterfacecommand{defineconversion}{defineconversion}
\setinterfacecommand{definedescription}{definedescription}
+\setinterfacecommand{definedfont}{definedfont}
\setinterfacecommand{defineenumeration}{defineenumeration}
+\setinterfacecommand{definefallbackfamily}{definefallbackfamily}
\setinterfacecommand{definefield}{definefield}
\setinterfacecommand{definefieldstack}{definefieldstack}
\setinterfacecommand{definefiguresymbol}{definefiguresymbol}
+\setinterfacecommand{definefilefallback}{definefilefallback}
+\setinterfacecommand{definefirstline}{definefirstline}
\setinterfacecommand{definefloat}{definefloat}
\setinterfacecommand{definefont}{definefont}
+\setinterfacecommand{definefontalternative}{definefontalternative}
+\setinterfacecommand{definefontfallback}{definefontfallback}
+\setinterfacecommand{definefontfamily}{definefontfamily}
+\setinterfacecommand{definefontfamilypreset}{definefontfamilypreset}
+\setinterfacecommand{definefontfeature}{definefontfeature}
+\setinterfacecommand{definefontfile}{definefontfile}
+\setinterfacecommand{definefontsize}{definefontsize}
+\setinterfacecommand{definefontsolution}{definefontsolution}
\setinterfacecommand{definefontstyle}{definefontstyle}
\setinterfacecommand{definefontsynonym}{definefontsynonym}
\setinterfacecommand{defineframed}{defineframed}
\setinterfacecommand{defineframedtext}{defineframedtext}
+\setinterfacecommand{definefrozenfont}{definefrozenfont}
\setinterfacecommand{definehbox}{definehbox}
\setinterfacecommand{definehead}{definehead}
+\setinterfacecommand{definehyphenationfeatures}{definehyphenationfeatures}
\setinterfacecommand{defineindentedtext}{defineindentedtext}
\setinterfacecommand{defineinmargin}{defineinmargin}
\setinterfacecommand{defineinteractionmenu}{defineinteractionmenu}
\setinterfacecommand{defineitemgroup}{defineitemgroup}
+\setinterfacecommand{defineitems}{defineitems}
\setinterfacecommand{definelabel}{definelabel}
\setinterfacecommand{definelayer}{definelayer}
\setinterfacecommand{definelayout}{definelayout}
+\setinterfacecommand{definelinenote}{definelinenote}
\setinterfacecommand{definelist}{definelist}
\setinterfacecommand{definelogo}{definelogo}
\setinterfacecommand{definemainfield}{definemainfield}
\setinterfacecommand{definemakeup}{definemakeup}
\setinterfacecommand{definemarking}{definemarking}
\setinterfacecommand{definemathalignment}{definemathalignment}
+\setinterfacecommand{definemode}{definemode}
+\setinterfacecommand{definenamedcolor}{definenamedcolor}
+\setinterfacecommand{definenote}{definenote}
\setinterfacecommand{defineoutput}{defineoutput}
\setinterfacecommand{defineoverlay}{defineoverlay}
\setinterfacecommand{definepagebreak}{definepagebreak}
\setinterfacecommand{definepalet}{definepalet}
\setinterfacecommand{definepapersize}{definepapersize}
\setinterfacecommand{defineparagraphs}{defineparagraphs}
+\setinterfacecommand{defineperiodkerning}{defineperiodkerning}
\setinterfacecommand{defineplacement}{defineplacement}
\setinterfacecommand{defineprofile}{defineprofile}
\setinterfacecommand{defineprogram}{defineprogram}
@@ -1481,33 +1537,45 @@
\setinterfacecommand{definetabulate}{definetabulate}
\setinterfacecommand{definetext}{definetext}
\setinterfacecommand{definetextbackground}{definetextbackground}
+\setinterfacecommand{definetextnote}{definetextnote}
\setinterfacecommand{definetextposition}{definetextposition}
\setinterfacecommand{definetextvariable}{definetextvariable}
\setinterfacecommand{definetype}{definetype}
\setinterfacecommand{definetyping}{definetyping}
\setinterfacecommand{defineversion}{defineversion}
+\setinterfacecommand{depthspanningtext}{depthspanningtext}
\setinterfacecommand{determineheadnumber}{determineheadnumber}
\setinterfacecommand{determinelistcharacteristics}{determinelistcharacteristics}
\setinterfacecommand{determineregistercharacteristics}{determineregistercharacteristics}
\setinterfacecommand{dimension}{dimension}
\setinterfacecommand{disableinteractionmenu}{disableinteractionmenu}
+\setinterfacecommand{disablemode}{disablemode}
+\setinterfacecommand{doaddfeature}{doaddfeature}
\setinterfacecommand{domicile}{domicile}
+\setinterfacecommand{dontconvertfont}{dontconvertfont}
\setinterfacecommand{donttest}{donttest}
\setinterfacecommand{edgedistance}{edgedistance}
\setinterfacecommand{edgewidth}{edgewidth}
+\setinterfacecommand{emphasisboldface}{emphasisboldface}
\setinterfacecommand{emptylines}{emptylines}
+\setinterfacecommand{enablemode}{enablemode}
\setinterfacecommand{environment}{environment}
\setinterfacecommand{externalfigure}{externalfigure}
\setinterfacecommand{fact}{fact}
+\setinterfacecommand{fastswitchtobodyfont}{fastswitchtobodyfont}
+\setinterfacecommand{feature}{feature}
\setinterfacecommand{field}{field}
\setinterfacecommand{fieldstack}{fieldstack}
\setinterfacecommand{fillinfield}{fillinfield}
\setinterfacecommand{fillinline}{fillinline}
\setinterfacecommand{fillinrules}{fillinrules}
\setinterfacecommand{fillintext}{fillintext}
+\setinterfacecommand{firstcharacter}{firstcharacter}
\setinterfacecommand{fitfield}{fitfield}
+\setinterfacecommand{fittopbaselinegrid}{fittopbaselinegrid}
\setinterfacecommand{fixedspace}{fixedspace}
\setinterfacecommand{fixedspaces}{fixedspaces}
+\setinterfacecommand{flushnotes}{flushnotes}
\setinterfacecommand{followprofile}{followprofile}
\setinterfacecommand{followprofileversion}{followprofileversion}
\setinterfacecommand{followversion}{followversion}
@@ -1516,13 +1584,19 @@
\setinterfacecommand{footnote}{footnote}
\setinterfacecommand{footnotetext}{footnotetext}
\setinterfacecommand{forceblocks}{forceblocks}
+\setinterfacecommand{forcecharacterstripping}{forcecharacterstripping}
\setinterfacecommand{formulanumber}{formulanumber}
\setinterfacecommand{fraction}{fraction}
\setinterfacecommand{framed}{framed}
\setinterfacecommand{from}{from}
+\setinterfacecommand{fromlinenote}{fromlinenote}
\setinterfacecommand{getbuffer}{getbuffer}
+\setinterfacecommand{getfirstcharacter}{getfirstcharacter}
\setinterfacecommand{getmarking}{getmarking}
\setinterfacecommand{getnumber}{getnumber}
+\setinterfacecommand{globaldisablemode}{globaldisablemode}
+\setinterfacecommand{globalenablemode}{globalenablemode}
+\setinterfacecommand{globalpreventmode}{globalpreventmode}
\setinterfacecommand{godown}{godown}
\setinterfacecommand{goto}{goto}
\setinterfacecommand{gotobox}{gotobox}
@@ -1538,6 +1612,7 @@
\setinterfacecommand{headnumber}{headnumber}
\setinterfacecommand{headsym}{headsym}
\setinterfacecommand{headtext}{headtext}
+\setinterfacecommand{heightspanningtext}{heightspanningtext}
\setinterfacecommand{hideblocks}{hideblocks}
\setinterfacecommand{high}{high}
\setinterfacecommand{hl}{hl}
@@ -1569,26 +1644,37 @@
\setinterfacecommand{interactionbuttons}{interactionbuttons}
\setinterfacecommand{interactionmenu}{interactionmenu}
\setinterfacecommand{item}{item}
+\setinterfacecommand{itemgroup}{itemgroup}
\setinterfacecommand{items}{items}
+\setinterfacecommand{itemtag}{itemtag}
\setinterfacecommand{its}{its}
\setinterfacecommand{keepblocks}{keepblocks}
+\setinterfacecommand{kerncharacters}{kerncharacters}
\setinterfacecommand{label}{label}
\setinterfacecommand{labels}{labels}
\setinterfacecommand{labeltext}{labeltext}
\setinterfacecommand{language}{language}
+\setinterfacecommand{languageCharacters}{languageCharacters}
+\setinterfacecommand{languagecharacters}{languagecharacters}
\setinterfacecommand{leftaligned}{leftaligned}
+\setinterfacecommand{leftbottombox}{leftbottombox}
\setinterfacecommand{leftedgedistance}{leftedgedistance}
\setinterfacecommand{leftedgewidth}{leftedgewidth}
+\setinterfacecommand{leftline}{leftline}
\setinterfacecommand{leftmargindistance}{leftmargindistance}
\setinterfacecommand{leftmarginwidth}{leftmarginwidth}
\setinterfacecommand{leg}{leg}
\setinterfacecommand{linecorrection}{linecorrection}
+\setinterfacecommand{linenote}{linenote}
+\setinterfacecommand{linespanningtext}{linespanningtext}
\setinterfacecommand{linewidth}{linethickness}
\setinterfacecommand{listheight}{listheight}
\setinterfacecommand{listlength}{listlength}
\setinterfacecommand{listsymbol}{listsymbol}
\setinterfacecommand{listwidth}{listwidth}
+\setinterfacecommand{loadfontgoodies}{loadfontgoodies}
\setinterfacecommand{localfootnotes}{localfootnotes}
+\setinterfacecommand{localnotes}{localnotes}
\setinterfacecommand{logfields}{logfields}
\setinterfacecommand{lohi}{lohi}
\setinterfacecommand{low}{low}
@@ -1619,6 +1705,7 @@
\setinterfacecommand{nodimension}{nodimension}
\setinterfacecommand{noheaderandfooterlines}{noheaderandfooterlines}
\setinterfacecommand{noindenting}{noindenting}
+\setinterfacecommand{noitem}{noitem}
\setinterfacecommand{nolist}{nolist}
\setinterfacecommand{nomarking}{nomarking}
\setinterfacecommand{nomoreblocks}{nomoreblocks}
@@ -1626,6 +1713,7 @@
\setinterfacecommand{nop}{nop}
\setinterfacecommand{nospace}{nospace}
\setinterfacecommand{note}{note}
+\setinterfacecommand{notesymbol}{notesymbol}
\setinterfacecommand{notopandbottomlines}{notopandbottomlines}
\setinterfacecommand{notsmallcapped}{nocap}
\setinterfacecommand{nowhitespace}{nowhitespace}
@@ -1637,6 +1725,7 @@
\setinterfacecommand{outermarginwidth}{outermarginwidth}
\setinterfacecommand{packed}{packed}
\setinterfacecommand{page}{page}
+\setinterfacecommand{pagebreak}{pagebreak}
\setinterfacecommand{pagedepth}{pagedepth}
\setinterfacecommand{pagenumber}{pagenumber}
\setinterfacecommand{pageoffset}{pageoffset}
@@ -1655,7 +1744,10 @@
\setinterfacecommand{placelist}{placelist}
\setinterfacecommand{placelistofsynonyms}{placelistofsynonyms}
\setinterfacecommand{placelocalfootnotes}{placelocalfootnotes}
+\setinterfacecommand{placelocalnotes}{placelocalnotes}
\setinterfacecommand{placelogos}{placelogos}
+\setinterfacecommand{placenamedfloat}{placenamedfloat}
+\setinterfacecommand{placenotes}{placenotes}
\setinterfacecommand{placeongrid}{placeongrid}
\setinterfacecommand{placeontopofeachother}{placeontopofeachother}
\setinterfacecommand{placepagenumber}{placepagenumber}
@@ -1668,9 +1760,17 @@
\setinterfacecommand{placetextvariable}{placetextvariable}
\setinterfacecommand{position}{position}
\setinterfacecommand{positiontext}{positiontext}
+\setinterfacecommand{postponenotes}{postponenotes}
+\setinterfacecommand{postponingnotes}{postponingnotes}
+\setinterfacecommand{predefinedfont}{predefinedfont}
+\setinterfacecommand{predefinefont}{predefinefont}
+\setinterfacecommand{presetdocument}{presetdocument}
+\setinterfacecommand{prettyprintbuffer}{prettyprintbuffer}
+\setinterfacecommand{preventmode}{preventmode}
\setinterfacecommand{printpaperheight}{printpaperheight}
\setinterfacecommand{printpaperwidth}{printpaperwidth}
\setinterfacecommand{processblocks}{processblocks}
+\setinterfacecommand{processbodyfontenvironmentlist}{processbodyfontenvironmentlist}
\setinterfacecommand{processpage}{processpage}
\setinterfacecommand{product}{product}
\setinterfacecommand{program}{program}
@@ -1680,19 +1780,45 @@
\setinterfacecommand{quote}{quote}
\setinterfacecommand{ran}{ran}
\setinterfacecommand{redo}{redo}
+\setinterfacecommand{redoconvertfont}{redoconvertfont}
\setinterfacecommand{ref}{ref}
\setinterfacecommand{reference}{reference}
\setinterfacecommand{referral}{referral}
\setinterfacecommand{referraldate}{referraldate}
\setinterfacecommand{referring}{referring}
+\setinterfacecommand{registerfontclass}{registerfontclass}
+\setinterfacecommand{registerhyphenationexception}{registerhyphenationexception}
+\setinterfacecommand{registerhyphenationpattern}{registerhyphenationpattern}
\setinterfacecommand{remark}{remark}
+\setinterfacecommand{replacefeature}{replacefeature}
\setinterfacecommand{reset}{reset}
+\setinterfacecommand{resetandaddfeature}{resetandaddfeature}
+\setinterfacecommand{resetcharacteralign}{resetcharacteralign}
+\setinterfacecommand{resetcharacterkerning}{resetcharacterkerning}
+\setinterfacecommand{resetcharacterspacing}{resetcharacterspacing}
+\setinterfacecommand{resetcharacterstripping}{resetcharacterstripping}
+\setinterfacecommand{resetfeature}{resetfeature}
+\setinterfacecommand{resetfontcolorsheme}{resetfontcolorsheme}
+\setinterfacecommand{resetfontfallback}{resetfontfallback}
+\setinterfacecommand{resetfontsolution}{resetfontsolution}
+\setinterfacecommand{resethyphenationfeatures}{resethyphenationfeatures}
+\setinterfacecommand{resetlocalfloats}{resetlocalfloats}
\setinterfacecommand{resetmarking}{resetmarking}
+\setinterfacecommand{resetmode}{resetmode}
\setinterfacecommand{resetnumber}{resetnumber}
-\setinterfacecommand{resettext}{resettextcontent}
+\setinterfacecommand{resetpath}{resetpath}
+\setinterfacecommand{resetperiodkerning}{resetperiodkerning}
+\setinterfacecommand{resetsystemmode}{resetsystemmode}
+\setinterfacecommand{resettextcontent}{resettextcontent}
+\setinterfacecommand{resetvisualizers}{resetvisualizers}
+\setinterfacecommand{restoreglobalbodyfont}{restoreglobalbodyfont}
+\setinterfacecommand{retestfeature}{retestfeature}
+\setinterfacecommand{revivefeature}{revivefeature}
\setinterfacecommand{rightaligned}{rightaligned}
+\setinterfacecommand{rightbottombox}{rightbottombox}
\setinterfacecommand{rightedgedistance}{rightedgedistance}
\setinterfacecommand{rightedgewidth}{rightedgewidth}
+\setinterfacecommand{rightline}{rightline}
\setinterfacecommand{rightmargindistance}{rightmargindistance}
\setinterfacecommand{rightmarginwidth}{rightmarginwidth}
\setinterfacecommand{romannumerals}{romannumerals}
@@ -1703,12 +1829,38 @@
\setinterfacecommand{selectblocks}{selectblocks}
\setinterfacecommand{selectpaper}{selectpaper}
\setinterfacecommand{selectversion}{selectversion}
+\setinterfacecommand{setbigbodyfont}{setbigbodyfont}
+\setinterfacecommand{setcharacteralign}{setcharacteralign}
+\setinterfacecommand{setcharacteraligndetail}{setcharacteraligndetail}
+\setinterfacecommand{setcharactercasing}{setcharactercasing}
+\setinterfacecommand{setcharactercleaning}{setcharactercleaning}
+\setinterfacecommand{setcharacterkerning}{setcharacterkerning}
+\setinterfacecommand{setcharacterspacing}{setcharacterspacing}
+\setinterfacecommand{setcharacterstripping}{setcharacterstripping}
+\setinterfacecommand{setcurrentfontclass}{setcurrentfontclass}
+\setinterfacecommand{setfirstline}{setfirstline}
+\setinterfacecommand{setfirstpasscharacteralign}{setfirstpasscharacteralign}
+\setinterfacecommand{setfont}{setfont}
+\setinterfacecommand{setfontcolorsheme}{setfontcolorsheme}
+\setinterfacecommand{setfontfeature}{setfontfeature}
+\setinterfacecommand{setfontsolution}{setfontsolution}
+\setinterfacecommand{setfontstrut}{setfontstrut}
+\setinterfacecommand{sethyphenationfeatures}{sethyphenationfeatures}
+\setinterfacecommand{setmainbodyfont}{setmainbodyfont}
+\setinterfacecommand{setmode}{setmode}
+\setinterfacecommand{setnote}{setnote}
+\setinterfacecommand{setnotetext}{setnotetext}
\setinterfacecommand{setnumber}{setnumber}
+\setinterfacecommand{setperiodkerning}{setperiodkerning}
+\setinterfacecommand{setsecondpasscharacteralign}{setsecondpasscharacteralign}
+\setinterfacecommand{setsmallbodyfont}{setsmallbodyfont}
+\setinterfacecommand{setsystemmode}{setsystemmode}
\setinterfacecommand{settextcontent}{settextcontent}
\setinterfacecommand{settextvariable}{settextvariable}
\setinterfacecommand{setupalign}{setupalign}
\setinterfacecommand{setupanswerarea}{setupanswerarea}
\setinterfacecommand{setuparranging}{setuparranging}
+\setinterfacecommand{setupattachment}{setupattachment}
\setinterfacecommand{setupbackground}{setupbackground}
\setinterfacecommand{setupbackgrounds}{setupbackgrounds}
\setinterfacecommand{setupblackrules}{setupblackrules}
@@ -1723,6 +1875,9 @@
\setinterfacecommand{setupcapitals}{setupcapitals}
\setinterfacecommand{setupcaption}{setupcaption}
\setinterfacecommand{setupcaptions}{setupcaptions}
+\setinterfacecommand{setupcharacteralign}{setupcharacteralign}
+\setinterfacecommand{setupcharacterkerning}{setupcharacterkerning}
+\setinterfacecommand{setupcharacterspacing}{setupcharacterspacing}
\setinterfacecommand{setupclipping}{setupclipping}
\setinterfacecommand{setupcolor}{setupcolor}
\setinterfacecommand{setupcolors}{setupcolors}
@@ -1733,6 +1888,7 @@
\setinterfacecommand{setupcombinations}{setupcombinations}
\setinterfacecommand{setupcombinedlist}{setupcombinedlist}
\setinterfacecommand{setupcomment}{setupcomment}
+\setinterfacecommand{setupcounter}{setupcounter}
\setinterfacecommand{setupdescription}{setupdescription}
\setinterfacecommand{setupdescriptions}{setupdescriptions}
\setinterfacecommand{setupenumeration}{setupenumeration}
@@ -1742,9 +1898,14 @@
\setinterfacecommand{setupfields}{setupfields}
\setinterfacecommand{setupfillinlines}{setupfillinlines}
\setinterfacecommand{setupfillinrules}{setupfillinrules}
+\setinterfacecommand{setupfirstline}{setupfirstline}
\setinterfacecommand{setupfloat}{setupfloat}
\setinterfacecommand{setupfloats}{setupfloats}
\setinterfacecommand{setupfloatsplitting}{setupfloatsplitting}
+\setinterfacecommand{setupfontexpansion}{setupfontexpansion}
+\setinterfacecommand{setupfontprotrusion}{setupfontprotrusion}
+\setinterfacecommand{setupfonts}{setupfonts}
+\setinterfacecommand{setupfontsolution}{setupfontsolution}
\setinterfacecommand{setupfooter}{setupfooter}
\setinterfacecommand{setupfootertexts}{setupfootertexts}
\setinterfacecommand{setupfootnotedefinition}{setupfootnotedefinition}
@@ -1761,6 +1922,7 @@
\setinterfacecommand{setupheadnumber}{setupheadnumber}
\setinterfacecommand{setupheads}{setupheads}
\setinterfacecommand{setupheadtext}{setupheadtext}
+\setinterfacecommand{setuphyphenation}{setuphyphenation}
\setinterfacecommand{setuphyphenmark}{setuphyphenmark}
\setinterfacecommand{setupindentedtext}{setupindentedtext}
\setinterfacecommand{setupindenting}{setupindenting}
@@ -1777,6 +1939,7 @@
\setinterfacecommand{setuplanguage}{setuplanguage}
\setinterfacecommand{setuplayout}{setuplayout}
\setinterfacecommand{setuplegend}{setuplegend}
+\setinterfacecommand{setuplinenote}{setuplinenote}
\setinterfacecommand{setuplinenumbering}{setuplinenumbering}
\setinterfacecommand{setuplines}{setuplines}
\setinterfacecommand{setuplinewidth}{setuplinewidth}
@@ -1789,6 +1952,10 @@
\setinterfacecommand{setupmarking}{setupmarking}
\setinterfacecommand{setupmathalignment}{setupmathalignment}
\setinterfacecommand{setupnarrower}{setupnarrower}
+\setinterfacecommand{setupnotation}{setupnotation}
+\setinterfacecommand{setupnotations}{setupnotations}
+\setinterfacecommand{setupnote}{setupnote}
+\setinterfacecommand{setupnotes}{setupnotes}
\setinterfacecommand{setupnumber}{setupnumber}
\setinterfacecommand{setupnumbering}{setupnumbering}
\setinterfacecommand{setupoppositeplacing}{setupoppositeplacing}
@@ -1802,6 +1969,7 @@
\setinterfacecommand{setuppapersize}{setuppapersize}
\setinterfacecommand{setupparagraphnumbering}{setupparagraphnumbering}
\setinterfacecommand{setupparagraphs}{setupparagraphs}
+\setinterfacecommand{setupperiodkerning}{setupperiodkerning}
\setinterfacecommand{setupplacement}{setupplacement}
\setinterfacecommand{setuppositioning}{setuppositioning}
\setinterfacecommand{setupprofiles}{setupprofiles}
@@ -1831,6 +1999,7 @@
\setinterfacecommand{setuptabulate}{setuptabulate}
\setinterfacecommand{setuptext}{setuptext}
\setinterfacecommand{setuptextbackground}{setuptextbackground}
+\setinterfacecommand{setuptextnote}{setuptextnote}
\setinterfacecommand{setuptextposition}{setuptextposition}
\setinterfacecommand{setuptextrules}{setuptextrules}
\setinterfacecommand{setuptexttexts}{setuptexttexts}
@@ -1845,16 +2014,29 @@
\setinterfacecommand{setupurl}{setupurl}
\setinterfacecommand{setupversions}{setupversions}
\setinterfacecommand{setupwhitespace}{setupwhitespace}
+\setinterfacecommand{setvisualizerfont}{setvisualizerfont}
\setinterfacecommand{showbodyfont}{showbodyfont}
\setinterfacecommand{showbodyfontenvironment}{showbodyfontenvironment}
\setinterfacecommand{showcolor}{showcolor}
\setinterfacecommand{showcolorgroup}{showcolorgroup}
+\setinterfacecommand{showcounter}{showcounter}
\setinterfacecommand{showexternalfigures}{showexternalfigures}
\setinterfacecommand{showfields}{showfields}
+\setinterfacecommand{showfont}{showfont}
+\setinterfacecommand{showfontdata}{showfontdata}
+\setinterfacecommand{showfontexpansion}{showfontexpansion}
+\setinterfacecommand{showfontitalics}{showfontitalics}
+\setinterfacecommand{showfontkerns}{showfontkerns}
+\setinterfacecommand{showfontparameters}{showfontparameters}
+\setinterfacecommand{showfontstrip}{showfontstrip}
+\setinterfacecommand{showfontstyle}{showfontstyle}
\setinterfacecommand{showframe}{showframe}
\setinterfacecommand{showgrid}{showgrid}
+\setinterfacecommand{showhyphenationtrace}{showhyphenationtrace}
+\setinterfacecommand{showkerning}{showkerning}
\setinterfacecommand{showlayout}{showlayout}
\setinterfacecommand{showmakeup}{showmakeup}
+\setinterfacecommand{showminimalbaseline}{showminimalbaseline}
\setinterfacecommand{showpalet}{showpalet}
\setinterfacecommand{showprint}{showprint}
\setinterfacecommand{showsetups}{showsetups}
@@ -1864,6 +2046,7 @@
\setinterfacecommand{someline}{someline}
\setinterfacecommand{somewhere}{somewhere}
\setinterfacecommand{space}{space}
+\setinterfacecommand{specialitem}{specialitem}
\setinterfacecommand{splitfloat}{splitfloat}
\setinterfacecommand{startalignment}{startalignment}
\setinterfacecommand{startbackground}{startbackground}
@@ -1881,6 +2064,7 @@
\setinterfacecommand{startglobal}{startglobal}
\setinterfacecommand{startline}{startline}
\setinterfacecommand{startlinecorrection}{startlinecorrection}
+\setinterfacecommand{startlinenote}{startlinenote}
\setinterfacecommand{startlinenumbering}{startlinenumbering}
\setinterfacecommand{startlines}{startlines}
\setinterfacecommand{startlocal}{startlocal}
@@ -1891,7 +2075,7 @@
\setinterfacecommand{startnarrower}{startnarrower}
\setinterfacecommand{startopposite}{startopposite}
\setinterfacecommand{startoverlay}{startoverlay}
-\setinterfacecommand{startoverzicht}{startoverview}
+\setinterfacecommand{startoverview}{startoverview}
\setinterfacecommand{startpacked}{startpacked}
\setinterfacecommand{startpositioning}{startpositioning}
\setinterfacecommand{startproduct}{startproduct}
@@ -1923,6 +2107,7 @@
\setinterfacecommand{stopglobal}{stopglobal}
\setinterfacecommand{stopline}{stopline}
\setinterfacecommand{stoplinecorrection}{stoplinecorrection}
+\setinterfacecommand{stoplinenote}{stoplinenote}
\setinterfacecommand{stoplinenumbering}{stoplinenumbering}
\setinterfacecommand{stoplines}{stoplines}
\setinterfacecommand{stoplocal}{stoplocal}
@@ -1933,7 +2118,7 @@
\setinterfacecommand{stopnarrower}{stopnarrower}
\setinterfacecommand{stopopposite}{stopopposite}
\setinterfacecommand{stopoverlay}{stopoverlay}
-\setinterfacecommand{stopoverzicht}{stopoverview}
+\setinterfacecommand{stopoverview}{stopoverview}
\setinterfacecommand{stoppacked}{stoppacked}
\setinterfacecommand{stoppositioning}{stoppositioning}
\setinterfacecommand{stopproduct}{stopproduct}
@@ -1950,8 +2135,11 @@
\setinterfacecommand{stopunpacked}{stopunpacked}
\setinterfacecommand{stopversion}{stopversion}
\setinterfacecommand{stretched}{stretched}
+\setinterfacecommand{strictinspectnextcharacter}{strictinspectnextcharacter}
+\setinterfacecommand{stripcharacter}{stripcharacter}
\setinterfacecommand{subformulanumber}{subformulanumber}
\setinterfacecommand{subpagenumber}{subpagenumber}
+\setinterfacecommand{subtractfeature}{subtractfeature}
\setinterfacecommand{switchtobodyfont}{switchtobodyfont}
\setinterfacecommand{switchtorawfont}{switchtorawfont}
\setinterfacecommand{sym}{sym}
@@ -1961,16 +2149,24 @@
\setinterfacecommand{synchronize}{synchronize}
\setinterfacecommand{tab}{tab}
\setinterfacecommand{testcolumn}{testcolumn}
+\setinterfacecommand{testfeature}{testfeature}
+\setinterfacecommand{testfeatureonce}{testfeatureonce}
\setinterfacecommand{testpage}{testpage}
\setinterfacecommand{tex}{tex}
\setinterfacecommand{textbackground}{textbackground}
+\setinterfacecommand{textcolor}{textcolor}
\setinterfacecommand{textheight}{textheight}
+\setinterfacecommand{textnote}{textnote}
\setinterfacecommand{textreference}{textreference}
\setinterfacecommand{textrule}{textrule}
\setinterfacecommand{textvariable}{textvariable}
\setinterfacecommand{textwidth}{textwidth}
+\setinterfacecommand{thefirstcharacter}{thefirstcharacter}
+\setinterfacecommand{thenormalizedbodyfontsize}{thenormalizedbodyfontsize}
+\setinterfacecommand{theremainingcharacters}{theremainingcharacters}
\setinterfacecommand{thinrule}{thinrule}
\setinterfacecommand{thinrules}{thinrules}
+\setinterfacecommand{tolinenote}{tolinenote}
\setinterfacecommand{tooltip}{tooltip}
\setinterfacecommand{topdistance}{topdistance}
\setinterfacecommand{topheight}{topheight}
@@ -1981,13 +2177,19 @@
\setinterfacecommand{typ}{typ}
\setinterfacecommand{type}{type}
\setinterfacecommand{typebuffer}{typebuffer}
+\setinterfacecommand{typedefinedbuffer}{typedefinedbuffer}
\setinterfacecommand{typefile}{typefile}
+\setinterfacecommand{typeinlinebuffer}{typeinlinebuffer}
+\setinterfacecommand{typing}{typing}
\setinterfacecommand{unitmeaning}{unitmeaning}
\setinterfacecommand{unknown}{unknown}
+\setinterfacecommand{unregisterhyphenationpattern}{unregisterhyphenationpattern}
\setinterfacecommand{useJSscripts}{useJSscripts}
\setinterfacecommand{useURL}{useURL}
\setinterfacecommand{useXMLfilter}{useXMLfilter}
\setinterfacecommand{useblocks}{useblocks}
+\setinterfacecommand{usebodyfont}{usebodyfont}
+\setinterfacecommand{usebodyfontparameter}{usebodyfontparameter}
\setinterfacecommand{usecommands}{usecommands}
\setinterfacecommand{useencoding}{useencoding}
\setinterfacecommand{useexternaldocument}{useexternaldocument}
@@ -2004,10 +2206,12 @@
\setinterfacecommand{usetypescript}{usetypescript}
\setinterfacecommand{usetypescriptfile}{usetypescriptfile}
\setinterfacecommand{useurl}{useurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{version}
\setinterfacecommand{vl}{vl}
\setinterfacecommand{weekday}{weekday}
\setinterfacecommand{whitespace}{whitespace}
+\setinterfacecommand{widthspanningtext}{widthspanningtext}
\setinterfacecommand{wordright}{wordright}
\setinterfacecommand{writebetweenlist}{writebetweenlist}
\setinterfacecommand{writetolist}{writetolist}
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii
index de8778e451d..ef2da9e493f 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-fr.mkii
@@ -3,65 +3,65 @@
% definitions for interface variables for language fr
%
\setinterfacevariable{Addition}{Ajout}
-\setinterfacevariable{Alphabetic}{Alphabetic}
+\setinterfacevariable{Alphabetic}{Alphabetique}
\setinterfacevariable{Balloon}{Ballon}
\setinterfacevariable{Cap}{Cap}
-\setinterfacevariable{Capital}{Capitale}
-\setinterfacevariable{Character}{Caratere}
+\setinterfacevariable{Capital}{Capitales}
+\setinterfacevariable{Character}{Caractere}
\setinterfacevariable{Characters}{Caracteres}
-\setinterfacevariable{CloseDocument}{FermeDocument}
-\setinterfacevariable{ExitViewer}{SortVisualisateur}
+\setinterfacevariable{CloseDocument}{FermerDocument}
+\setinterfacevariable{ExitViewer}{SortirVisualisateur}
\setinterfacevariable{FirstPage}{PremierePage}
-\setinterfacevariable{FitHeight}{AjusteHauteur}
-\setinterfacevariable{FitWidth}{AjusteLargeur}
-\setinterfacevariable{GotoPage}{VaalaPage}
+\setinterfacevariable{FitHeight}{AdapterHauteur}
+\setinterfacevariable{FitWidth}{AdapterLargeur}
+\setinterfacevariable{GotoPage}{AlleraPage}
\setinterfacevariable{Greek}{Grec}
\setinterfacevariable{Help}{Aide}
-\setinterfacevariable{HideField}{CacheChamp}
-\setinterfacevariable{HideLayer}{CacheCalque}
+\setinterfacevariable{HideField}{CacherChamps}
+\setinterfacevariable{HideLayer}{CacherCalque}
\setinterfacevariable{Key}{Cle}
\setinterfacevariable{LastPage}{DernierePage}
-\setinterfacevariable{LoadForm}{ChargeForm}
+\setinterfacevariable{LoadForm}{ChargerFormulaire}
\setinterfacevariable{MONTH}{MOIS}
\setinterfacevariable{New}{Nouveau}
\setinterfacevariable{NextJump}{SautSuivant}
\setinterfacevariable{NextPage}{PageSuivante}
\setinterfacevariable{Numbers}{Numeros}
-\setinterfacevariable{OpenNamedDocument}{OuvreDocumentNomme}
+\setinterfacevariable{OpenNamedDocument}{OuvrirDocumentNomme}
\setinterfacevariable{Ordinal}{Ordinal}
\setinterfacevariable{Paragraph}{Paragraphe}
\setinterfacevariable{PauseMovie}{PauseFilm}
-\setinterfacevariable{PauseRendering}{PauseRendering}
+\setinterfacevariable{PauseRendering}{PauseRendu}
\setinterfacevariable{PauseSound}{PauseSon}
\setinterfacevariable{PreviousJump}{SautPrecedent}
\setinterfacevariable{PreviousPage}{PagePrecedente}
-\setinterfacevariable{PrintDocument}{ImprimeDocument}
-\setinterfacevariable{Query}{Query}
-\setinterfacevariable{QueryAgain}{QueryAgain}
-\setinterfacevariable{ResetForm}{RazForm}
-\setinterfacevariable{ResumeMovie}{ReprendFilm}
-\setinterfacevariable{ResumeRendering}{ResumeRendering}
-\setinterfacevariable{ResumeSound}{ReprendSon}
+\setinterfacevariable{PrintDocument}{ImprimerDocument}
+\setinterfacevariable{Query}{Interroger}
+\setinterfacevariable{QueryAgain}{InterrogerSuivant}
+\setinterfacevariable{ResetForm}{RazFormulaire}
+\setinterfacevariable{ResumeMovie}{RepriseFilm}
+\setinterfacevariable{ResumeRendering}{RepriseRendu}
+\setinterfacevariable{ResumeSound}{RepriseSon}
\setinterfacevariable{Romannumerals}{Chiffresromains}
-\setinterfacevariable{SaveDocument}{SauvegardeDocument}
-\setinterfacevariable{SaveForm}{SauvegardeForm}
-\setinterfacevariable{SaveNamedDocument}{SauvegardeDocumentNomme}
-\setinterfacevariable{SearchAgain}{RechercheSuivant}
-\setinterfacevariable{SearchDocument}{RechercheDocument}
-\setinterfacevariable{ShowBookmarks}{ShowBookmarks}
-\setinterfacevariable{ShowField}{MontreChamp}
-\setinterfacevariable{ShowThumbs}{ShowThumbs}
-\setinterfacevariable{StartMovie}{DemarreFilm}
-\setinterfacevariable{StartRendering}{StartRendering}
-\setinterfacevariable{StartSound}{DemarreSon}
-\setinterfacevariable{StopMovie}{StoppeFilm}
-\setinterfacevariable{StopRendering}{StopRendering}
-\setinterfacevariable{StopSound}{StoppeSon}
-\setinterfacevariable{SubmitForm}{SoumettreForm}
-\setinterfacevariable{ToggleLayer}{ToggleLayer}
-\setinterfacevariable{ToggleViewer}{ChangeVisualisateur}
+\setinterfacevariable{SaveDocument}{EnregistrerDocument}
+\setinterfacevariable{SaveForm}{EnregistrerFormulaire}
+\setinterfacevariable{SaveNamedDocument}{EnregistrerDocumentNomme}
+\setinterfacevariable{SearchAgain}{ChercherSuivant}
+\setinterfacevariable{SearchDocument}{ChercherDocument}
+\setinterfacevariable{ShowBookmarks}{MontrerMarquepages}
+\setinterfacevariable{ShowField}{MontrerChamp}
+\setinterfacevariable{ShowThumbs}{MontrerVignettes}
+\setinterfacevariable{StartMovie}{débutFilm}
+\setinterfacevariable{StartRendering}{débutRendu}
+\setinterfacevariable{StartSound}{débutSon}
+\setinterfacevariable{StopMovie}{FinFilm}
+\setinterfacevariable{StopRendering}{FinRendu}
+\setinterfacevariable{StopSound}{FinSon}
+\setinterfacevariable{SubmitForm}{SoumettreFormulaire}
+\setinterfacevariable{ToggleLayer}{BasculerCalque}
+\setinterfacevariable{ToggleViewer}{BasculerVisualisateur}
\setinterfacevariable{URL}{URL}
-\setinterfacevariable{VideLayer}{VideLayer}
+\setinterfacevariable{VideLayer}{VideCalque}
\setinterfacevariable{ViewerHelp}{AideVisualisateur}
\setinterfacevariable{WEEKDAY}{JOURSEMAINE}
\setinterfacevariable{WORD}{MOT}
@@ -70,95 +70,98 @@
\setinterfacevariable{Words}{Mots}
\setinterfacevariable{abbreviation}{abreviation}
\setinterfacevariable{abbreviations}{abreviations}
-\setinterfacevariable{absolute}{absolute}
+\setinterfacevariable{absolute}{absolu}
\setinterfacevariable{action}{action}
-\setinterfacevariable{after}{apres}
+\setinterfacevariable{after}{après}
\setinterfacevariable{all}{tout}
-\setinterfacevariable{alphabetic}{alphabetic}
+\setinterfacevariable{alphabetic}{Alphabetique}
\setinterfacevariable{always}{toujours}
-\setinterfacevariable{anchor}{anchor}
-\setinterfacevariable{and}{and}
-\setinterfacevariable{answerarea}{answerarea}
+\setinterfacevariable{anchor}{ancre}
+\setinterfacevariable{and}{et}
+\setinterfacevariable{answerarea}{zonereponse}
\setinterfacevariable{appendices}{annexes}
\setinterfacevariable{appendix}{annexe}
\setinterfacevariable{april}{avril}
-\setinterfacevariable{aside}{aside}
-\setinterfacevariable{atleftmargin}{atleftmargin}
-\setinterfacevariable{atmargin}{alamarge}
-\setinterfacevariable{atpage}{alapage}
-\setinterfacevariable{atrightmargin}{atrightmargin}
-\setinterfacevariable{attachment}{attachment}
-\setinterfacevariable{august}{août}
+\setinterfacevariable{aside}{apart}
+\setinterfacevariable{atleftmargin}{enmargegauche}
+\setinterfacevariable{atmargin}{enmarge}
+\setinterfacevariable{atpage}{enpage}
+\setinterfacevariable{atrightmargin}{enmargedroite}
+\setinterfacevariable{attachment}{piecejointe}
+\setinterfacevariable{august}{aout}
\setinterfacevariable{author}{auteur}
\setinterfacevariable{auto}{auto}
\setinterfacevariable{autointro}{autointro}
-\setinterfacevariable{autopunctuation}{autopunctuation}
+\setinterfacevariable{autopunctuation}{autoponctuation}
\setinterfacevariable{back}{retour}
\setinterfacevariable{background}{arriereplan}
-\setinterfacevariable{backmatter}{epilogue}
+\setinterfacevariable{backmatter}{pagesdefin}
\setinterfacevariable{backpart}{postface}
-\setinterfacevariable{backspace}{retourarriere}
-\setinterfacevariable{backward}{retourarriere}
+\setinterfacevariable{backspace}{retourarrière}
+\setinterfacevariable{backward}{enarriere}
\setinterfacevariable{bbl}{bbl}
\setinterfacevariable{before}{avant}
-\setinterfacevariable{begin}{begin}
+\setinterfacevariable{begin}{commencer}
\setinterfacevariable{bib}{bib}
-\setinterfacevariable{big}{grand}
-\setinterfacevariable{bigbodyfont}{grandepolicecorp}
-\setinterfacevariable{bigger}{bigger}
-\setinterfacevariable{bigpreference}{grandepreference}
-\setinterfacevariable{blank}{vide}
-\setinterfacevariable{block}{block}
-\setinterfacevariable{blockquote}{blockquote}
-\setinterfacevariable{bodymatter}{texteprincipal}
+\setinterfacevariable{big}{important}
+\setinterfacevariable{bigbodyfont}{policedecorpsimportante}
+\setinterfacevariable{bigger}{plusimportant}
+\setinterfacevariable{bigpreference}{preferenceimportante}
+\setinterfacevariable{blank}{vierge}
+\setinterfacevariable{block}{bloc}
+\setinterfacevariable{blockquote}{citerbloc}
+\setinterfacevariable{bodymatter}{pagescorpsdetexte}
\setinterfacevariable{bodypart}{corpsdetexte}
\setinterfacevariable{bold}{gras}
-\setinterfacevariable{bolditalic}{italiquegras}
-\setinterfacevariable{boldslanted}{inclinegras}
+\setinterfacevariable{bolditalic}{grasitalique}
+\setinterfacevariable{boldslanted}{grasincline}
\setinterfacevariable{bookmark}{marquepage}
-\setinterfacevariable{both}{lesdeux}
-\setinterfacevariable{bothtext}{bothtext}
-\setinterfacevariable{bottom}{inf}
-\setinterfacevariable{box}{box}
+\setinterfacevariable{both}{chacun}
+\setinterfacevariable{bothtext}{textechacun}
+\setinterfacevariable{bottom}{bas}
+\setinterfacevariable{box}{boite}
\setinterfacevariable{brief}{brief}
\setinterfacevariable{broad}{large}
-\setinterfacevariable{buffer}{buffer}
+\setinterfacevariable{buffer}{tampon}
\setinterfacevariable{by}{par}
\setinterfacevariable{calligraphic}{calligraphique}
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
-\setinterfacevariable{capital}{capitale}
-\setinterfacevariable{center}{center}
-\setinterfacevariable{centerlast}{centerlast}
+\setinterfacevariable{capital}{capitales}
+\setinterfacevariable{category}{categorie}
+\setinterfacevariable{cd:character}{caracteres}
+\setinterfacevariable{cd:font}{police}
+\setinterfacevariable{center}{centrer}
+\setinterfacevariable{centerlast}{centrerdernier}
\setinterfacevariable{chapter}{chapitre}
\setinterfacevariable{character}{caractere}
\setinterfacevariable{characters}{caracteres}
-\setinterfacevariable{chemical}{chemical}
-\setinterfacevariable{chemicals}{chemicals}
-\setinterfacevariable{chemistry}{chemistry}
+\setinterfacevariable{chemical}{chimique}
+\setinterfacevariable{chemicals}{chimiques}
+\setinterfacevariable{chemistry}{chimie}
\setinterfacevariable{cite}{cite}
-\setinterfacevariable{closed}{closed}
+\setinterfacevariable{closed}{ferme}
\setinterfacevariable{color}{couleur}
\setinterfacevariable{column}{colonne}
\setinterfacevariable{columns}{colonnes}
-\setinterfacevariable{combination}{combination}
+\setinterfacevariable{combination}{combinaison}
\setinterfacevariable{command}{commande}
\setinterfacevariable{commands}{commandes}
\setinterfacevariable{comment}{commentaire}
\setinterfacevariable{component}{composant}
-\setinterfacevariable{compressseparator}{compressseparator}
-\setinterfacevariable{compressstopper}{compressstopper}
+\setinterfacevariable{compressseparator}{separateurreduction}
+\setinterfacevariable{compressstopper}{stoppeurreduction}
\setinterfacevariable{concept}{concept}
\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{contenu}
\setinterfacevariable{contents}{contenus}
-\setinterfacevariable{continue}{continue}
-\setinterfacevariable{continued}{continued}
+\setinterfacevariable{continue}{continuer}
+\setinterfacevariable{continued}{continue}
\setinterfacevariable{controls}{controles}
\setinterfacevariable{conversion}{conversion}
\setinterfacevariable{current}{courant}
-\setinterfacevariable{cutspace}{cutspace}
-\setinterfacevariable{dataset}{dataset}
+\setinterfacevariable{cutspace}{espacecoupe}
+\setinterfacevariable{dataset}{jeudedonnees}
\setinterfacevariable{date}{date}
\setinterfacevariable{day}{jour}
\setinterfacevariable{december}{decembre}
@@ -169,25 +172,26 @@
\setinterfacevariable{display}{affichage}
\setinterfacevariable{dot}{point}
\setinterfacevariable{doublesided}{rectoverso}
-\setinterfacevariable{down}{down}
+\setinterfacevariable{down}{enbas}
\setinterfacevariable{each}{chaque}
\setinterfacevariable{edge}{bord}
-\setinterfacevariable{effective}{effective}
-\setinterfacevariable{eight}{eight}
-\setinterfacevariable{embed}{embed}
+\setinterfacevariable{effective}{effectif}
+\setinterfacevariable{eight}{huit}
+\setinterfacevariable{embed}{integrer}
\setinterfacevariable{empty}{vide}
-\setinterfacevariable{enable}{enable}
-\setinterfacevariable{end}{end}
-\setinterfacevariable{endnote}{notefin}
-\setinterfacevariable{enumeration}{enumeration}
-\setinterfacevariable{environment}{environement}
+\setinterfacevariable{enable}{activer}
+\setinterfacevariable{end}{terminer}
+\setinterfacevariable{endnote}{noteseule}
+\setinterfacevariable{enumeration}{énumération}
+\setinterfacevariable{environment}{environnement}
\setinterfacevariable{even}{paire}
-\setinterfacevariable{export}{export}
-\setinterfacevariable{external}{external}
-\setinterfacevariable{extremestretch}{extremestretch}
+\setinterfacevariable{export}{exporter}
+\setinterfacevariable{external}{externe}
+\setinterfacevariable{extremestretch}{etirementextreme}
\setinterfacevariable{fact}{fait}
+\setinterfacevariable{fallback}{repli}
\setinterfacevariable{february}{fevrier}
-\setinterfacevariable{field}{field}
+\setinterfacevariable{field}{champ}
\setinterfacevariable{figure}{figure}
\setinterfacevariable{figures}{figures}
\setinterfacevariable{file}{fichier}
@@ -196,32 +200,33 @@
\setinterfacevariable{firstcolumn}{premierecolonne}
\setinterfacevariable{firstpage}{premierepage}
\setinterfacevariable{firstsubpage}{premieresouspage}
-\setinterfacevariable{fit}{adapte}
+\setinterfacevariable{fit}{adapter}
\setinterfacevariable{five}{cinq}
-\setinterfacevariable{fix}{fixe}
+\setinterfacevariable{fix}{fix}
\setinterfacevariable{fixed}{fixe}
\setinterfacevariable{flexible}{flexible}
\setinterfacevariable{float}{flottant}
-\setinterfacevariable{flushinner}{flushinner}
-\setinterfacevariable{flushleft}{flushleft}
-\setinterfacevariable{flushouter}{flushouter}
-\setinterfacevariable{flushright}{flushright}
-\setinterfacevariable{followingpage}{followingpage}
+\setinterfacevariable{flushinner}{alignerinterieur}
+\setinterfacevariable{flushleft}{alignergauche}
+\setinterfacevariable{flushouter}{alignerexterieur}
+\setinterfacevariable{flushright}{alignerdroite}
+\setinterfacevariable{followingpage}{pagesuccesseur}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{pdp}
-\setinterfacevariable{footnote}{notepdp}
-\setinterfacevariable{force}{force}
+\setinterfacevariable{footnote}{notebdp}
+\setinterfacevariable{force}{forcer}
\setinterfacevariable{foreground}{premierplan}
\setinterfacevariable{formula}{formule}
\setinterfacevariable{formulas}{formules}
-\setinterfacevariable{forward}{avance}
+\setinterfacevariable{forward}{enavant}
\setinterfacevariable{four}{quatre}
\setinterfacevariable{fractions}{fractions}
\setinterfacevariable{frame}{cadre}
\setinterfacevariable{framedtext}{texteencadre}
\setinterfacevariable{friday}{vendredi}
-\setinterfacevariable{frontmatter}{preambule}
+\setinterfacevariable{frontmatter}{pagesliminaires}
\setinterfacevariable{frontpart}{preface}
-\setinterfacevariable{fullhz}{fullhz}
+\setinterfacevariable{fullhz}{hzcomplet}
\setinterfacevariable{global}{global}
\setinterfacevariable{graphic}{graphique}
\setinterfacevariable{graphics}{graphiques}
@@ -230,190 +235,192 @@
\setinterfacevariable{grid}{grille}
\setinterfacevariable{halfline}{demiligne}
\setinterfacevariable{handwritten}{manuscript}
-\setinterfacevariable{hang}{suspend}
-\setinterfacevariable{hanging}{suspend}
-\setinterfacevariable{hangingboth}{hangingboth}
+\setinterfacevariable{hang}{suspendre}
+\setinterfacevariable{hanging}{suspension}
+\setinterfacevariable{hangingboth}{suspensionchacun}
\setinterfacevariable{head}{tete}
-\setinterfacevariable{header}{entete}
-\setinterfacevariable{headintext}{headintext}
+\setinterfacevariable{header}{entête}
+\setinterfacevariable{headintext}{tetedanstexte}
\setinterfacevariable{height}{hauteur}
\setinterfacevariable{helptext}{texteaide}
-\setinterfacevariable{hencefore}{precedent}
+\setinterfacevariable{hencefore}{precedemment}
\setinterfacevariable{here}{ici}
-\setinterfacevariable{hereafter}{suivant}
+\setinterfacevariable{hereafter}{ciapres}
\setinterfacevariable{hidden}{cache}
-\setinterfacevariable{hiddenbar}{hiddenbar}
-\setinterfacevariable{hiding}{cache}
-\setinterfacevariable{high}{haut}
-\setinterfacevariable{horizontal}{horizontale}
-\setinterfacevariable{hyphenated}{hyphenated}
+\setinterfacevariable{hiddenbar}{barrecachee}
+\setinterfacevariable{hiding}{encachant}
+\setinterfacevariable{high}{exp}
+\setinterfacevariable{horizontal}{horizontal}
+\setinterfacevariable{hyphenated}{aveccesure}
\setinterfacevariable{hz}{hz}
\setinterfacevariable{inbetween}{entre}
\setinterfacevariable{index}{index}
\setinterfacevariable{indices}{indices}
-\setinterfacevariable{inherit}{herite}
-\setinterfacevariable{ininner}{ininner}
-\setinterfacevariable{ininneredge}{ininneredge}
-\setinterfacevariable{ininnermargin}{ininnermargin}
+\setinterfacevariable{inherit}{heriter}
+\setinterfacevariable{ininner}{dansinterieur}
+\setinterfacevariable{ininneredge}{dansbordinterieur}
+\setinterfacevariable{ininnermargin}{dansmargeinterieure}
\setinterfacevariable{inleft}{dansgauche}
\setinterfacevariable{inleftedge}{dansbordgauche}
\setinterfacevariable{inleftmargin}{dansmargegauche}
-\setinterfacevariable{inline}{inline}
+\setinterfacevariable{inline}{enligne}
\setinterfacevariable{inmargin}{dansmarge}
\setinterfacevariable{inner}{interieur}
\setinterfacevariable{inneredge}{bordinterieur}
\setinterfacevariable{innermargin}{margeinterieure}
-\setinterfacevariable{inother}{inother}
-\setinterfacevariable{inouter}{inouter}
-\setinterfacevariable{inouteredge}{inouteredge}
-\setinterfacevariable{inoutermargin}{inoutermargin}
-\setinterfacevariable{inright}{dansdroit}
+\setinterfacevariable{inother}{dansautre}
+\setinterfacevariable{inouter}{dansexterieur}
+\setinterfacevariable{inouteredge}{dansbordexterieur}
+\setinterfacevariable{inoutermargin}{dansmargeexterieure}
+\setinterfacevariable{inright}{dansdroite}
\setinterfacevariable{inrightedge}{dansborddroit}
\setinterfacevariable{inrightmargin}{dansmargedroite}
-\setinterfacevariable{integral}{integral}
+\setinterfacevariable{integral}{integrale}
\setinterfacevariable{interaction}{interaction}
\setinterfacevariable{interactionmenu}{menuinteraction}
-\setinterfacevariable{interactive}{interactive}
-\setinterfacevariable{intermezzi}{intermezzi}
-\setinterfacevariable{intermezzo}{intermezzo}
+\setinterfacevariable{interactive}{interactif}
+\setinterfacevariable{intermezzi}{interludes}
+\setinterfacevariable{intermezzo}{interlude}
\setinterfacevariable{intext}{danstexte}
\setinterfacevariable{intro}{intro}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{italique}
-\setinterfacevariable{italicbold}{grasitalique}
-\setinterfacevariable{item}{element}
-\setinterfacevariable{itemize}{lister}
-\setinterfacevariable{its}{its}
+\setinterfacevariable{italicbold}{italiquegras}
+\setinterfacevariable{item}{élément}
+\setinterfacevariable{itemize}{détailler}
+\setinterfacevariable{its}{els}
\setinterfacevariable{january}{janvier}
-\setinterfacevariable{joinedup}{joinedup}
+\setinterfacevariable{joinedup}{sansespaceentre}
\setinterfacevariable{july}{juillet}
\setinterfacevariable{june}{juin}
-\setinterfacevariable{keep}{maintient}
-\setinterfacevariable{kerncharacters}{kerncharacters}
+\setinterfacevariable{keep}{conserver}
+\setinterfacevariable{kerncharacters}{approchercaracteres}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{etiquette}
\setinterfacevariable{landscape}{paysage}
\setinterfacevariable{last}{dernier}
\setinterfacevariable{lastcolumn}{dernierecolonne}
\setinterfacevariable{lastpage}{dernierepage}
-\setinterfacevariable{lastpagenumber}{derniernumeropage}
+\setinterfacevariable{lastpagenumber}{numerodenierepage}
\setinterfacevariable{lastsubpage}{dernieresouspage}
-\setinterfacevariable{layer}{layer}
+\setinterfacevariable{layer}{calque}
\setinterfacevariable{left}{gauche}
\setinterfacevariable{leftedge}{bordgauche}
-\setinterfacevariable{lefthanging}{lefthanging}
+\setinterfacevariable{lefthanging}{suspensiongauche}
\setinterfacevariable{leftmargin}{margegauche}
-\setinterfacevariable{leftpage}{pagegauche}
-\setinterfacevariable{lefttoright}{lefttoright}
+\setinterfacevariable{leftpage}{surpagegauche}
+\setinterfacevariable{lefttoright}{gaucheadroite}
\setinterfacevariable{legend}{legende}
-\setinterfacevariable{less}{less}
-\setinterfacevariable{lesshyphenation}{lesshyphenation}
-\setinterfacevariable{letterspacing}{letterspacing}
+\setinterfacevariable{less}{moins}
+\setinterfacevariable{lesshyphenation}{moinsdecesure}
+\setinterfacevariable{letterspacing}{espacementlettre}
\setinterfacevariable{line}{ligne}
\setinterfacevariable{linenote}{noteligne}
\setinterfacevariable{lines}{lignes}
-\setinterfacevariable{linked}{linked}
+\setinterfacevariable{linked}{lie}
\setinterfacevariable{list}{liste}
\setinterfacevariable{local}{local}
-\setinterfacevariable{localenvironment}{environementlocal}
+\setinterfacevariable{localenvironment}{environnementlocal}
\setinterfacevariable{logo}{logo}
\setinterfacevariable{logos}{logos}
-\setinterfacevariable{lohi}{baha}
+\setinterfacevariable{lohi}{inex}
\setinterfacevariable{long}{long}
-\setinterfacevariable{loose}{perte}
-\setinterfacevariable{low}{bas}
+\setinterfacevariable{loose}{envrac}
+\setinterfacevariable{low}{ind}
\setinterfacevariable{ls}{ls}
-\setinterfacevariable{makeup}{makeup}
-\setinterfacevariable{mar}{mar}
+\setinterfacevariable{makeup}{composition}
+\setinterfacevariable{mar}{rem}
\setinterfacevariable{march}{mars}
\setinterfacevariable{margin}{marge}
-\setinterfacevariable{marginedge}{bordmarge}
+\setinterfacevariable{marginedge}{margebord}
\setinterfacevariable{margintext}{textemarge}
\setinterfacevariable{margintitle}{titremarge}
\setinterfacevariable{marking}{marquage}
\setinterfacevariable{math}{math}
-\setinterfacevariable{mathalignment}{mathalignment}
-\setinterfacevariable{mathcases}{mathcases}
-\setinterfacevariable{mathematics}{mathematique}
-\setinterfacevariable{mathmatrix}{mathmatrix}
+\setinterfacevariable{mathalignment}{alignementmath}
+\setinterfacevariable{mathcases}{casmath}
+\setinterfacevariable{mathematics}{mathematics}
+\setinterfacevariable{mathmatrix}{matricemath}
\setinterfacevariable{max}{max}
-\setinterfacevariable{maxdepth}{maxdepth}
-\setinterfacevariable{maxheight}{maxheight}
-\setinterfacevariable{maxwidth}{maxwidth}
+\setinterfacevariable{maxdepth}{profondeurmax}
+\setinterfacevariable{maxheight}{hauteurmax}
+\setinterfacevariable{maxwidth}{largeurmax}
\setinterfacevariable{may}{mai}
\setinterfacevariable{mediaeval}{medieval}
\setinterfacevariable{medium}{moyen}
\setinterfacevariable{middle}{milieu}
\setinterfacevariable{min}{min}
-\setinterfacevariable{mindepth}{mindepth}
+\setinterfacevariable{mindepth}{profondeurmin}
\setinterfacevariable{minheight}{hauteurmin}
\setinterfacevariable{minwidth}{largeurmin}
\setinterfacevariable{mirrored}{reflete}
-\setinterfacevariable{mixed}{mixed}
+\setinterfacevariable{mixed}{mixte}
\setinterfacevariable{monday}{lundi}
\setinterfacevariable{mono}{mono}
\setinterfacevariable{monobold}{monogras}
-\setinterfacevariable{mononormal}{mononormal}
+\setinterfacevariable{mononormal}{normalmono}
\setinterfacevariable{month}{mois}
-\setinterfacevariable{more}{more}
-\setinterfacevariable{morehyphenation}{morehyphenation}
+\setinterfacevariable{more}{plus}
+\setinterfacevariable{morehyphenation}{plusdecesure}
\setinterfacevariable{name}{nom}
\setinterfacevariable{narrow}{etroit}
\setinterfacevariable{negative}{negatif}
\setinterfacevariable{never}{jamais}
\setinterfacevariable{new}{nouveau}
-\setinterfacevariable{next}{prochain}
+\setinterfacevariable{next}{suivant}
\setinterfacevariable{nextevenpage}{pagepairesuivante}
\setinterfacevariable{nextoddpage}{pageimpairesuivante}
\setinterfacevariable{nextpage}{pagesuivante}
\setinterfacevariable{nextsubpage}{souspagesuivante}
-\setinterfacevariable{nine}{nine}
+\setinterfacevariable{nine}{neuf}
\setinterfacevariable{no}{non}
-\setinterfacevariable{nocheck}{nonverifie}
-\setinterfacevariable{nodepth}{nodepth}
-\setinterfacevariable{nofit}{nofit}
-\setinterfacevariable{nogrid}{nogrid}
-\setinterfacevariable{noheight}{noheight}
-\setinterfacevariable{nohz}{nohz}
-\setinterfacevariable{noline}{noline}
+\setinterfacevariable{nocheck}{sansverifier}
+\setinterfacevariable{nodepth}{sansprodondeur}
+\setinterfacevariable{nofit}{sansadapter}
+\setinterfacevariable{nogrid}{sansgrille}
+\setinterfacevariable{noheight}{sanshauteur}
+\setinterfacevariable{nohz}{sanshz}
+\setinterfacevariable{noline}{sansligne}
\setinterfacevariable{nomarking}{sansmarquage}
-\setinterfacevariable{nomenubar}{nomenubar}
-\setinterfacevariable{none}{rien}
+\setinterfacevariable{nomenubar}{sansbarremenu}
+\setinterfacevariable{none}{aucun}
\setinterfacevariable{nonumber}{sansnumero}
-\setinterfacevariable{norepeat}{norepeat}
+\setinterfacevariable{norepeat}{sansrepetition}
\setinterfacevariable{normal}{normal}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{sansespacement}
-\setinterfacevariable{nostopper}{nostopper}
+\setinterfacevariable{nostopper}{sansstoppeur}
\setinterfacevariable{not}{pas}
\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
-\setinterfacevariable{nothanging}{nonsuspendu}
-\setinterfacevariable{nothyphenated}{nothyphenated}
-\setinterfacevariable{notjoinedup}{notjoinedup}
+\setinterfacevariable{nothanging}{sanssuspension}
+\setinterfacevariable{nothyphenated}{sanscesure}
+\setinterfacevariable{notjoinedup}{passansespaceentre}
\setinterfacevariable{november}{novembre}
-\setinterfacevariable{nowhere}{nulpart}
+\setinterfacevariable{nowhere}{nullepart}
\setinterfacevariable{nowhite}{sansblanc}
\setinterfacevariable{number}{numero}
\setinterfacevariable{numbers}{numeros}
\setinterfacevariable{october}{octobre}
\setinterfacevariable{odd}{impair}
-\setinterfacevariable{off}{desactive}
-\setinterfacevariable{offset}{offset}
-\setinterfacevariable{old}{old}
-\setinterfacevariable{oldstyle}{oldstyle}
-\setinterfacevariable{on}{actif}
+\setinterfacevariable{off}{arret}
+\setinterfacevariable{offset}{decalage}
+\setinterfacevariable{old}{ancien}
+\setinterfacevariable{oldstyle}{styleancien}
+\setinterfacevariable{on}{marche}
\setinterfacevariable{one}{un}
-\setinterfacevariable{opposite}{opposition}
+\setinterfacevariable{opposite}{enface}
\setinterfacevariable{ordinal}{ordinal}
\setinterfacevariable{outer}{exterieur}
\setinterfacevariable{outeredge}{bordexterieur}
\setinterfacevariable{outermargin}{margeexterieure}
-\setinterfacevariable{overbar}{overbar}
-\setinterfacevariable{overbars}{overbars}
-\setinterfacevariable{overlay}{revetement}
-\setinterfacevariable{overprint}{overprint}
-\setinterfacevariable{overstrike}{surlignetout}
-\setinterfacevariable{overstrikes}{surligne}
-\setinterfacevariable{packed}{groupe}
+\setinterfacevariable{overbar}{surligner}
+\setinterfacevariable{overbars}{surlignermots}
+\setinterfacevariable{overlay}{superposition}
+\setinterfacevariable{overprint}{surimpression}
+\setinterfacevariable{overstrike}{barrer}
+\setinterfacevariable{overstrikes}{barrermots}
+\setinterfacevariable{packed}{sansespaceentreitem}
\setinterfacevariable{page}{page}
\setinterfacevariable{pagecomment}{commentairepage}
\setinterfacevariable{pagenumber}{numeropage}
@@ -421,119 +428,120 @@
\setinterfacevariable{paragraph}{paragraphe}
\setinterfacevariable{part}{partie}
\setinterfacevariable{positive}{positif}
-\setinterfacevariable{postponing}{postponing}
+\setinterfacevariable{postponing}{report}
\setinterfacevariable{postscript}{postscript}
-\setinterfacevariable{precedingpage}{precedingpage}
+\setinterfacevariable{precedingpage}{pageantecedent}
\setinterfacevariable{preference}{preference}
-\setinterfacevariable{preview}{previsualisation}
+\setinterfacevariable{preview}{apercu}
\setinterfacevariable{previous}{precedent}
\setinterfacevariable{previousevenpage}{pagepaireprecedente}
\setinterfacevariable{previousoddpage}{pageimpaireprecedente}
\setinterfacevariable{previouspage}{pageprecedente}
\setinterfacevariable{previoussubpage}{souspageprecedente}
-\setinterfacevariable{print}{print}
-\setinterfacevariable{printable}{editable}
-\setinterfacevariable{process}{process}
+\setinterfacevariable{print}{imprimer}
+\setinterfacevariable{printable}{imprimable}
+\setinterfacevariable{process}{traiter}
\setinterfacevariable{product}{produit}
\setinterfacevariable{program}{programme}
\setinterfacevariable{project}{projet}
\setinterfacevariable{protected}{protege}
\setinterfacevariable{quadruple}{quadruple}
-\setinterfacevariable{quarterline}{quarterline}
+\setinterfacevariable{quarterline}{quartdeligne}
\setinterfacevariable{quotation}{citation}
\setinterfacevariable{quote}{citer}
-\setinterfacevariable{ran}{cours}
+\setinterfacevariable{ran}{gam}
\setinterfacevariable{random}{aleatoire}
\setinterfacevariable{readonly}{lectureseule}
\setinterfacevariable{rectangular}{rectangulaire}
\setinterfacevariable{reference}{reference}
-\setinterfacevariable{referral}{referral}
+\setinterfacevariable{referral}{redirection}
+\setinterfacevariable{region}{region}
\setinterfacevariable{register}{registre}
-\setinterfacevariable{regular}{regulier}
+\setinterfacevariable{regular}{ordinaire}
\setinterfacevariable{relative}{relatif}
-\setinterfacevariable{repeat}{repete}
-\setinterfacevariable{required}{recquis}
+\setinterfacevariable{repeat}{repeter}
+\setinterfacevariable{required}{requis}
\setinterfacevariable{reset}{raz}
-\setinterfacevariable{reverse}{inverse}
+\setinterfacevariable{reverse}{inverser}
\setinterfacevariable{right}{droite}
\setinterfacevariable{rightedge}{borddroit}
-\setinterfacevariable{righthanging}{righthanging}
+\setinterfacevariable{righthanging}{suspensiondroite}
\setinterfacevariable{rightmargin}{margedroite}
-\setinterfacevariable{rightpage}{pagedroite}
-\setinterfacevariable{righttoleft}{righttoleft}
-\setinterfacevariable{roman}{roman}
+\setinterfacevariable{rightpage}{surpagedroite}
+\setinterfacevariable{righttoleft}{droiteagauche}
+\setinterfacevariable{roman}{romain}
\setinterfacevariable{romannumerals}{chiffresromains}
-\setinterfacevariable{rotate}{oriente}
+\setinterfacevariable{rotate}{tourner}
\setinterfacevariable{rotated}{tourne}
\setinterfacevariable{round}{rond}
\setinterfacevariable{row}{rang}
-\setinterfacevariable{rule}{regle}
+\setinterfacevariable{rule}{trait}
\setinterfacevariable{samepage}{memepage}
\setinterfacevariable{sans}{sans}
-\setinterfacevariable{sansbold}{sansgras}
-\setinterfacevariable{sansnormal}{sansnormal}
+\setinterfacevariable{sansbold}{sansserifbold}
+\setinterfacevariable{sansnormal}{normalsans}
\setinterfacevariable{sansserif}{sansserif}
\setinterfacevariable{saturday}{samedi}
\setinterfacevariable{screen}{ecran}
\setinterfacevariable{section}{section}
-\setinterfacevariable{sectionblockenvironment}{environementblocsection}
+\setinterfacevariable{sectionblockenvironment}{environnementblocsection}
\setinterfacevariable{sectionnumber}{numerosection}
-\setinterfacevariable{see}{voit}
-\setinterfacevariable{selectfont}{selectfont}
-\setinterfacevariable{separator}{separator}
+\setinterfacevariable{see}{voir}
+\setinterfacevariable{selectfont}{selectionnerpolice}
+\setinterfacevariable{separator}{separateur}
\setinterfacevariable{september}{septembre}
\setinterfacevariable{serif}{serif}
-\setinterfacevariable{serifbold}{serifbold}
+\setinterfacevariable{serifbold}{serifgras}
\setinterfacevariable{serifnormal}{serifnormal}
-\setinterfacevariable{serried}{serried}
+\setinterfacevariable{serried}{serre}
\setinterfacevariable{setups}{setups}
-\setinterfacevariable{seven}{seven}
-\setinterfacevariable{sheet}{sheet}
-\setinterfacevariable{shiftdown}{shiftdown}
-\setinterfacevariable{shiftup}{shiftup}
-\setinterfacevariable{short}{short}
-\setinterfacevariable{simplefonts}{simplefonts}
-\setinterfacevariable{simplelist}{simplelist}
+\setinterfacevariable{seven}{sept}
+\setinterfacevariable{sheet}{feuille}
+\setinterfacevariable{shiftdown}{decalerenbas}
+\setinterfacevariable{shiftup}{decalerenhaut}
+\setinterfacevariable{short}{court}
+\setinterfacevariable{simplefonts}{policessimple}
+\setinterfacevariable{simplelist}{listesimple}
\setinterfacevariable{singlesided}{recto}
\setinterfacevariable{six}{six}
\setinterfacevariable{slanted}{incline}
-\setinterfacevariable{slantedbold}{grasincline}
+\setinterfacevariable{slantedbold}{inclinegras}
\setinterfacevariable{small}{petit}
-\setinterfacevariable{smallbodyfont}{petitepolicecorps}
-\setinterfacevariable{smallbold}{graspetit}
-\setinterfacevariable{smallbolditalic}{italiquegraspetit}
-\setinterfacevariable{smallboldslanted}{inclinegraspetit}
-\setinterfacevariable{smallcaps}{petitescapitales}
-\setinterfacevariable{smaller}{smaller}
-\setinterfacevariable{smallitalic}{italiquepetit}
-\setinterfacevariable{smallitalicbold}{grasitaliquepetit}
-\setinterfacevariable{smallnormal}{normalpetit}
-\setinterfacevariable{smallslanted}{inclinepetit}
-\setinterfacevariable{smallslantedbold}{grasinclinepetit}
-\setinterfacevariable{smalltype}{petittype}
+\setinterfacevariable{smallbodyfont}{policedecorpspetite}
+\setinterfacevariable{smallbold}{petitgras}
+\setinterfacevariable{smallbolditalic}{petitgrasitalique}
+\setinterfacevariable{smallboldslanted}{petitgrasincline}
+\setinterfacevariable{smallcaps}{petitescaps}
+\setinterfacevariable{smaller}{pluspetit}
+\setinterfacevariable{smallitalic}{petititalique}
+\setinterfacevariable{smallitalicbold}{petititaliquegras}
+\setinterfacevariable{smallnormal}{petitnormal}
+\setinterfacevariable{smallslanted}{petitincline}
+\setinterfacevariable{smallslantedbold}{petitinclinegras}
+\setinterfacevariable{smalltype}{petitcaractere}
\setinterfacevariable{somewhere}{qqpart}
\setinterfacevariable{sorted}{trie}
-\setinterfacevariable{sorting}{sorting}
+\setinterfacevariable{sorting}{tri}
\setinterfacevariable{space}{espace}
\setinterfacevariable{spacing}{espacement}
\setinterfacevariable{speech}{discours}
-\setinterfacevariable{split}{split}
-\setinterfacevariable{spot}{spot}
+\setinterfacevariable{split}{partager}
+\setinterfacevariable{spot}{tondirect}
\setinterfacevariable{standard}{standard}
-\setinterfacevariable{start}{demarre}
-\setinterfacevariable{starter}{starter}
-\setinterfacevariable{sticker}{sticker}
-\setinterfacevariable{stop}{stoppe}
-\setinterfacevariable{stopper}{stopper}
-\setinterfacevariable{stretch}{etire}
-\setinterfacevariable{stretched}{stretched}
+\setinterfacevariable{start}{activé}
+\setinterfacevariable{starter}{demarreur}
+\setinterfacevariable{sticker}{autocollant}
+\setinterfacevariable{stop}{fin}
+\setinterfacevariable{stopper}{stoppeur}
+\setinterfacevariable{stretch}{etirer}
+\setinterfacevariable{stretched}{etire}
\setinterfacevariable{strict}{strict}
-\setinterfacevariable{strong}{strong}
-\setinterfacevariable{strut}{strut}
+\setinterfacevariable{strong}{fort}
+\setinterfacevariable{strut}{entretoise}
\setinterfacevariable{sub}{sous}
-\setinterfacevariable{subbackward}{sousretourarriere}
-\setinterfacevariable{subformula}{subformule}
-\setinterfacevariable{subforward}{sousavance}
+\setinterfacevariable{subbackward}{petitenarriere}
+\setinterfacevariable{subformula}{sousformule}
+\setinterfacevariable{subforward}{petitenavant}
\setinterfacevariable{subject}{sujet}
\setinterfacevariable{subpage}{souspage}
\setinterfacevariable{subs}{subs}
@@ -559,56 +567,56 @@
\setinterfacevariable{support}{support}
\setinterfacevariable{sym}{sym}
\setinterfacevariable{symbol}{symbole}
-\setinterfacevariable{synchronize}{synchronize}
-\setinterfacevariable{synonym}{synonym}
+\setinterfacevariable{synchronize}{synchroniser}
+\setinterfacevariable{synonym}{synonyme}
\setinterfacevariable{system}{systeme}
-\setinterfacevariable{table}{tableau}
+\setinterfacevariable{table}{table}
\setinterfacevariable{tablehead}{tetetableau}
\setinterfacevariable{tables}{tables}
-\setinterfacevariable{tabletail}{queuetableau}
-\setinterfacevariable{tabulate}{tabule}
-\setinterfacevariable{tabulatehead}{tetetabule}
-\setinterfacevariable{tabulatetail}{queuetabule}
-\setinterfacevariable{tall}{long}
-\setinterfacevariable{teletype}{teletype}
+\setinterfacevariable{tabletail}{queuetable}
+\setinterfacevariable{tabulate}{tabulation}
+\setinterfacevariable{tabulatehead}{tetetabulation}
+\setinterfacevariable{tabulatetail}{queuetabulation}
+\setinterfacevariable{tall}{grand}
+\setinterfacevariable{teletype}{caractereterminal}
\setinterfacevariable{temporary}{temporaire}
\setinterfacevariable{test}{test}
\setinterfacevariable{text}{texte}
-\setinterfacevariable{textnote}{textnote}
+\setinterfacevariable{textnote}{notetexte}
\setinterfacevariable{three}{trois}
\setinterfacevariable{thursday}{jeudi}
-\setinterfacevariable{tight}{tight}
+\setinterfacevariable{tight}{resserre}
\setinterfacevariable{title}{titre}
-\setinterfacevariable{toggle}{toggle}
+\setinterfacevariable{toggle}{basculer}
\setinterfacevariable{tolerant}{tolerant}
-\setinterfacevariable{top}{sup}
+\setinterfacevariable{top}{haut}
\setinterfacevariable{tuesday}{mardi}
\setinterfacevariable{two}{deux}
\setinterfacevariable{txt}{txt}
-\setinterfacevariable{type}{type}
-\setinterfacevariable{typing}{typing}
+\setinterfacevariable{type}{transcrire}
+\setinterfacevariable{typing}{transcription}
\setinterfacevariable{unavailable}{indisponible}
-\setinterfacevariable{underbar}{souslignetout}
-\setinterfacevariable{underbars}{sousligne}
-\setinterfacevariable{understrike}{understrike}
-\setinterfacevariable{understrikes}{understrikes}
-\setinterfacevariable{unframed}{unframed}
+\setinterfacevariable{underbar}{souligner}
+\setinterfacevariable{underbars}{soulignermots}
+\setinterfacevariable{understrike}{soubarrer}
+\setinterfacevariable{understrikes}{soubarrermots}
+\setinterfacevariable{unframed}{desencadre}
\setinterfacevariable{unicode}{unicode}
\setinterfacevariable{unit}{unite}
\setinterfacevariable{units}{unites}
\setinterfacevariable{unknown}{inconnu}
-\setinterfacevariable{unpacked}{degroupe}
-\setinterfacevariable{up}{up}
+\setinterfacevariable{unpacked}{avecespaceentreitem}
+\setinterfacevariable{up}{enhaut}
\setinterfacevariable{url}{url}
-\setinterfacevariable{used}{used}
+\setinterfacevariable{used}{utilise}
\setinterfacevariable{value}{valeur}
-\setinterfacevariable{vertical}{verticale}
+\setinterfacevariable{vertical}{vertical}
\setinterfacevariable{very}{tres}
\setinterfacevariable{verystrict}{tresstrict}
\setinterfacevariable{verytolerant}{trestolerant}
-\setinterfacevariable{vfenced}{vfenced}
+\setinterfacevariable{vfenced}{cloturev}
\setinterfacevariable{vulgarfraction}{vulgarfraction}
-\setinterfacevariable{weak}{weak}
+\setinterfacevariable{weak}{faible}
\setinterfacevariable{wednesday}{mercredi}
\setinterfacevariable{week}{semaine}
\setinterfacevariable{weekday}{joursemaine}
@@ -616,7 +624,7 @@
\setinterfacevariable{wide}{ample}
\setinterfacevariable{width}{largeur}
\setinterfacevariable{word}{mot}
-\setinterfacevariable{words}{words}
+\setinterfacevariable{words}{mots}
\setinterfacevariable{xml}{xml}
\setinterfacevariable{year}{annee}
\setinterfacevariable{yes}{oui}
@@ -624,46 +632,47 @@
%
\setinterfaceconstant{action}{action}
\setinterfaceconstant{address}{adresse}
-\setinterfaceconstant{after}{apres}
-\setinterfaceconstant{afterhead}{aprestete}
-\setinterfaceconstant{afterkey}{aprescle}
-\setinterfaceconstant{aftersection}{aftersection}
-\setinterfaceconstant{align}{alignement}
-\setinterfaceconstant{aligncharacter}{caracterealigne}
-\setinterfaceconstant{alignmentcharacter}{alignementcaractere}
-\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
-\setinterfaceconstant{alignmentleftwidth}{alignmentleftwidth}
-\setinterfaceconstant{alignmentrightsample}{alignmentrightsample}
-\setinterfaceconstant{alignmentrightwidth}{alignmentrightwidth}
-\setinterfaceconstant{alignsymbol}{alignsymbol}
-\setinterfaceconstant{aligntitle}{alignementtitre}
-\setinterfaceconstant{alternative}{alternative}
-\setinterfaceconstant{anchor}{anchor}
-\setinterfaceconstant{anchoring}{anchoring}
-\setinterfaceconstant{andtext}{andtext}
+\setinterfaceconstant{after}{après}
+\setinterfaceconstant{afterhead}{aprèstête}
+\setinterfaceconstant{afterkey}{aprèsclé}
+\setinterfaceconstant{aftersection}{aprèssection}
+\setinterfaceconstant{align}{aligner}
+\setinterfaceconstant{alignbottom}{alignerbas}
+\setinterfaceconstant{aligncharacter}{alignersurcaractere}
+\setinterfaceconstant{alignmentcharacter}{caracterealignement}
+\setinterfaceconstant{alignmentleftsample}{echantillongauchealignement}
+\setinterfaceconstant{alignmentleftwidth}{largeurgauchealignement}
+\setinterfaceconstant{alignmentrightsample}{echantillondroitealignement}
+\setinterfaceconstant{alignmentrightwidth}{largeurdroitealignement}
+\setinterfaceconstant{alignsymbol}{alignersursymbol}
+\setinterfaceconstant{aligntitle}{alignersurtitre}
+\setinterfaceconstant{alternative}{variante}
+\setinterfaceconstant{anchor}{ancre}
+\setinterfaceconstant{anchoring}{ancrage}
+\setinterfaceconstant{andtext}{ettexte}
\setinterfaceconstant{apa}{apa}
\setinterfaceconstant{arguments}{arguments}
\setinterfaceconstant{arrow}{fleche}
-\setinterfaceconstant{artauthor}{artauthor}
-\setinterfaceconstant{artauthoretaldisplay}{artauthoretaldisplay}
-\setinterfaceconstant{artauthoretallimit}{artauthoretallimit}
-\setinterfaceconstant{artauthoretaltext}{artauthoretaltext}
-\setinterfaceconstant{artoffset}{artoffset}
-\setinterfaceconstant{at}{a}
+\setinterfaceconstant{artauthor}{artauteur}
+\setinterfaceconstant{artauthoretaldisplay}{artauteuretalaffichage}
+\setinterfaceconstant{artauthoretallimit}{artauteuretallimite}
+\setinterfaceconstant{artauthoretaltext}{artauteuretaltexte}
+\setinterfaceconstant{artoffset}{artdecalage}
+\setinterfaceconstant{at}{en}
\setinterfaceconstant{author}{auteur}
-\setinterfaceconstant{authorconversion}{authorconversion}
-\setinterfaceconstant{authoretaldisplay}{authoretaldisplay}
-\setinterfaceconstant{authoretallimit}{authoretallimit}
-\setinterfaceconstant{authoretaltext}{authoretaltext}
+\setinterfaceconstant{authorconversion}{auteurconversion}
+\setinterfaceconstant{authoretaldisplay}{auteuretalaffichage}
+\setinterfaceconstant{authoretallimit}{auteuretallimite}
+\setinterfaceconstant{authoretaltext}{auteuretaltexte}
\setinterfaceconstant{auto}{auto}
\setinterfaceconstant{autocase}{autocase}
-\setinterfaceconstant{autofile}{autofile}
+\setinterfaceconstant{autofile}{autofichier}
\setinterfaceconstant{autofocus}{autofocus}
-\setinterfaceconstant{autohang}{autohang}
-\setinterfaceconstant{autostrut}{autostrut}
+\setinterfaceconstant{autohang}{autosuspendre}
+\setinterfaceconstant{autostrut}{autoentretoise}
\setinterfaceconstant{autowidth}{autolargeur}
-\setinterfaceconstant{availableheight}{availableheight}
-\setinterfaceconstant{availablewidth}{availablewidth}
+\setinterfaceconstant{availableheight}{hauteurdisponible}
+\setinterfaceconstant{availablewidth}{largeurdisponible}
\setinterfaceconstant{axis}{axe}
\setinterfaceconstant{background}{arriereplan}
\setinterfaceconstant{backgroundcolor}{couleurarriereplan}
@@ -672,164 +681,170 @@
\setinterfaceconstant{backgroundoffset}{decalagearriereplan}
\setinterfaceconstant{backgroundradius}{rayonarriereplan}
\setinterfaceconstant{backgroundscreen}{ecranarriereplan}
-\setinterfaceconstant{backreference}{backreference}
-\setinterfaceconstant{backspace}{retour}
-\setinterfaceconstant{balance}{equilibre}
+\setinterfaceconstant{backreference}{retroreference}
+\setinterfaceconstant{backspace}{espacearrière}
+\setinterfaceconstant{balance}{equilibrer}
\setinterfaceconstant{before}{avant}
\setinterfaceconstant{beforehead}{avanttete}
-\setinterfaceconstant{beforesection}{beforesection}
-\setinterfaceconstant{bet}{bet}
+\setinterfaceconstant{beforesection}{avantsection}
+\setinterfaceconstant{bet}{suj}
\setinterfaceconstant{bidi}{bidi}
-\setinterfaceconstant{big}{grand}
-\setinterfaceconstant{blank}{vide}
-\setinterfaceconstant{bleedoffset}{bleedoffset}
-\setinterfaceconstant{blockway}{blockway}
-\setinterfaceconstant{bodyfont}{policecorps}
-\setinterfaceconstant{boffset}{boffset}
-\setinterfaceconstant{boldfeatures}{boldfeatures}
-\setinterfaceconstant{boldfont}{boldfont}
-\setinterfaceconstant{bolditalicfeatures}{bolditalicfeatures}
-\setinterfaceconstant{bolditalicfont}{bolditalicfont}
-\setinterfaceconstant{boldslantedfeatures}{boldslantedfeatures}
-\setinterfaceconstant{boldslantedfont}{boldslantedfont}
+\setinterfaceconstant{big}{important}
+\setinterfaceconstant{blank}{vierge}
+\setinterfaceconstant{bleedoffset}{decalagefuite}
+\setinterfaceconstant{blockway}{faconbloc}
+\setinterfaceconstant{bodyfont}{policedecorps}
+\setinterfaceconstant{boffset}{decalageb}
+\setinterfaceconstant{boldfeatures}{fonctionnalitesgras}
+\setinterfaceconstant{boldfont}{policegras}
+\setinterfaceconstant{bolditalicfeatures}{fonctionnalitesgrasitalique}
+\setinterfaceconstant{bolditalicfont}{policegrasitalique}
+\setinterfaceconstant{boldslantedfeatures}{fonctionnalitesgrasincline}
+\setinterfaceconstant{boldslantedfont}{policegrasincline}
\setinterfaceconstant{bookmark}{marquepage}
-\setinterfaceconstant{bottom}{inf}
-\setinterfaceconstant{bottomafter}{bottomafter}
-\setinterfaceconstant{bottombefore}{bottombefore}
-\setinterfaceconstant{bottomcommand}{bottomcommand}
-\setinterfaceconstant{bottomdistance}{distanceinf}
-\setinterfaceconstant{bottomframe}{cadreinf}
-\setinterfaceconstant{bottomoffset}{decalageinf}
-\setinterfaceconstant{bottomspace}{espaceinf}
-\setinterfaceconstant{bottomstate}{etatinf}
-\setinterfaceconstant{break}{break}
-\setinterfaceconstant{buffer}{buffer}
-\setinterfaceconstant{cache}{cache}
+\setinterfaceconstant{bottom}{bas}
+\setinterfaceconstant{bottomafter}{basaprès}
+\setinterfaceconstant{bottombefore}{basavant}
+\setinterfaceconstant{bottomcommand}{commandebas}
+\setinterfaceconstant{bottomdistance}{distancebas}
+\setinterfaceconstant{bottomframe}{cadrebas}
+\setinterfaceconstant{bottomoffset}{decalagebas}
+\setinterfaceconstant{bottomspace}{espacebas}
+\setinterfaceconstant{bottomstate}{etatbas}
+\setinterfaceconstant{break}{saut}
+\setinterfaceconstant{buffer}{tampon}
+\setinterfaceconstant{cache}{memoirecache}
\setinterfaceconstant{calculate}{calculer}
-\setinterfaceconstant{category}{category}
-\setinterfaceconstant{ccommand}{ccommande}
-\setinterfaceconstant{character}{character}
-\setinterfaceconstant{characters}{characters}
-\setinterfaceconstant{check}{check}
+\setinterfaceconstant{category}{categorie}
+\setinterfaceconstant{ccommand}{commandec}
+\setinterfaceconstant{character}{caractere}
+\setinterfaceconstant{characters}{caracteres}
+\setinterfaceconstant{check}{verifier}
\setinterfaceconstant{click}{clic}
\setinterfaceconstant{clickin}{clicinterieur}
\setinterfaceconstant{clickout}{clicexterieur}
-\setinterfaceconstant{clipoffset}{clipoffset}
-\setinterfaceconstant{closeaction}{actionfermeture}
-\setinterfaceconstant{closecommand}{closecommand}
-\setinterfaceconstant{closepage}{closepage}
-\setinterfaceconstant{closepageaction}{actionfermeturepage}
-\setinterfaceconstant{closesymbol}{closesymbol}
+\setinterfaceconstant{clipoffset}{decalagedecoupe}
+\setinterfaceconstant{closeaction}{fermeraction}
+\setinterfaceconstant{closecommand}{fermercommande}
+\setinterfaceconstant{closepage}{fermerpage}
+\setinterfaceconstant{closepageaction}{fermeractionpage}
+\setinterfaceconstant{closesymbol}{fermersymbol}
\setinterfaceconstant{color}{couleur}
\setinterfaceconstant{column}{colonne}
\setinterfaceconstant{columndistance}{distancecolonne}
\setinterfaceconstant{columns}{colonnes}
-\setinterfaceconstant{comma}{comma}
+\setinterfaceconstant{comma}{virgule}
\setinterfaceconstant{command}{commande}
-\setinterfaceconstant{commandafter}{commandeapres}
+\setinterfaceconstant{commandafter}{commandeaprès}
\setinterfaceconstant{commandbefore}{commandeavant}
\setinterfaceconstant{commands}{commandes}
-\setinterfaceconstant{comment}{comment}
-\setinterfaceconstant{commentchar}{commentchar}
-\setinterfaceconstant{commentoffset}{commentoffset}
+\setinterfaceconstant{comment}{commentaire}
+\setinterfaceconstant{commentchar}{caracommentaire}
+\setinterfaceconstant{commentoffset}{decalagecommentaire}
\setinterfaceconstant{compact}{compact}
\setinterfaceconstant{component}{composant}
-\setinterfaceconstant{compoundhyphen}{compoundhyphen}
-\setinterfaceconstant{compress}{compress}
-\setinterfaceconstant{compressdistance}{compressdistance}
-\setinterfaceconstant{compressmethod}{compressmethod}
-\setinterfaceconstant{compressseparator}{compressseparator}
-\setinterfaceconstant{compressstopper}{compressstopper}
-\setinterfaceconstant{concerns}{concerns}
-\setinterfaceconstant{connector}{connector}
-\setinterfaceconstant{continue}{continue}
-\setinterfaceconstant{contrastcolor}{coleurcontraste}
+\setinterfaceconstant{compoundhyphen}{traitdunioncompose}
+\setinterfaceconstant{compress}{reduire}
+\setinterfaceconstant{compressdistance}{distancereduction}
+\setinterfaceconstant{compressmethod}{methodereduction}
+\setinterfaceconstant{compressseparator}{separateurreduction}
+\setinterfaceconstant{compressstopper}{stoppeurreduction}
+\setinterfaceconstant{concerns}{concerne}
+\setinterfaceconstant{connector}{connecteur}
+\setinterfaceconstant{continue}{continuer}
+\setinterfaceconstant{contrastcolor}{couleurconstrast}
\setinterfaceconstant{controls}{controles}
\setinterfaceconstant{conversion}{conversion}
-\setinterfaceconstant{convertfile}{conversionfichier}
+\setinterfaceconstant{convertfile}{convertirfichier}
\setinterfaceconstant{copies}{copies}
\setinterfaceconstant{corner}{coin}
\setinterfaceconstant{coupling}{couplage}
-\setinterfaceconstant{couplingway}{modecouplage}
+\setinterfaceconstant{couplingway}{faconcouplage}
\setinterfaceconstant{criterium}{critere}
-\setinterfaceconstant{cropoffset}{cropoffset}
-\setinterfaceconstant{crossreference}{crossreference}
-\setinterfaceconstant{cssfile}{cssfile}
+\setinterfaceconstant{cropoffset}{decalagerecadre}
+\setinterfaceconstant{crossreference}{renvoi}
+\setinterfaceconstant{cssfile}{fichiercss}
\setinterfaceconstant{current}{courant}
-\setinterfaceconstant{cutspace}{cutspace}
+\setinterfaceconstant{cutspace}{espacecoupe}
\setinterfaceconstant{dash}{pointille}
\setinterfaceconstant{dat}{dat}
-\setinterfaceconstant{database}{database}
-\setinterfaceconstant{dataset}{dataset}
+\setinterfaceconstant{database}{basededonnees}
+\setinterfaceconstant{dataset}{jeudedonnees}
\setinterfaceconstant{date}{date}
-\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
-\setinterfaceconstant{deeptextcommand}{deeptextcommand}
+\setinterfaceconstant{deepnumbercommand}{commandeprofondenumero}
+\setinterfaceconstant{deeptextcommand}{commandeprofondetexte}
\setinterfaceconstant{default}{defaut}
-\setinterfaceconstant{delay}{delai}
+\setinterfaceconstant{defaultheight}{defaultheight}
+\setinterfaceconstant{defaultwidth}{defaultwidth}
+\setinterfaceconstant{define}{define}
+\setinterfaceconstant{delay}{retard}
\setinterfaceconstant{depth}{profondeur}
\setinterfaceconstant{depthcorrection}{correctionprofondeur}
\setinterfaceconstant{direction}{direction}
\setinterfaceconstant{directory}{repertoire}
\setinterfaceconstant{display}{affichage}
-\setinterfaceconstant{displaythreshold}{displaythreshold}
+\setinterfaceconstant{displaythreshold}{seuilaffichage}
\setinterfaceconstant{distance}{distance}
-\setinterfaceconstant{domain}{domain}
+\setinterfaceconstant{domain}{domaine}
\setinterfaceconstant{dot}{point}
\setinterfaceconstant{doublesided}{rectoverso}
-\setinterfaceconstant{down}{down}
-\setinterfaceconstant{dummy}{dummy}
+\setinterfaceconstant{down}{enbas}
+\setinterfaceconstant{dummy}{factice}
\setinterfaceconstant{dx}{dx}
\setinterfaceconstant{dy}{dy}
\setinterfaceconstant{edge}{bord}
\setinterfaceconstant{edgedistance}{distancebord}
-\setinterfaceconstant{editor}{editor}
-\setinterfaceconstant{editoretaldisplay}{editoretaldisplay}
-\setinterfaceconstant{editoretallimit}{editoretallimit}
-\setinterfaceconstant{editoretaltext}{editoretaltext}
+\setinterfaceconstant{editor}{editeur}
+\setinterfaceconstant{editoretaldisplay}{editeurealaffichage}
+\setinterfaceconstant{editoretallimit}{editeureallimite}
+\setinterfaceconstant{editoretaltext}{editeurealtexte}
\setinterfaceconstant{empty}{vide}
-\setinterfaceconstant{entities}{entities}
-\setinterfaceconstant{entries}{entries}
-\setinterfaceconstant{equalheight}{equalheight}
-\setinterfaceconstant{equalwidth}{equalwidth}
-\setinterfaceconstant{escape}{escape}
-\setinterfaceconstant{etaldisplay}{etaldisplay}
-\setinterfaceconstant{etallimit}{etallimit}
+\setinterfaceconstant{entities}{entitees}
+\setinterfaceconstant{entries}{entrees}
+\setinterfaceconstant{equalheight}{hauteuregale}
+\setinterfaceconstant{equalwidth}{margeuregale}
+\setinterfaceconstant{escape}{echappatoire}
+\setinterfaceconstant{etaldisplay}{etalaffichage}
+\setinterfaceconstant{etallimit}{etallimite}
\setinterfaceconstant{etaloption}{etaloption}
-\setinterfaceconstant{etaltext}{etaltext}
+\setinterfaceconstant{etaltext}{etalttexte}
\setinterfaceconstant{evenmargin}{margepaire}
\setinterfaceconstant{exact}{exact}
-\setinterfaceconstant{exitoffset}{exitoffset}
+\setinterfaceconstant{exitoffset}{decalagesortie}
\setinterfaceconstant{expansion}{expansion}
-\setinterfaceconstant{export}{export}
+\setinterfaceconstant{export}{exporter}
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{facteur}
-\setinterfaceconstant{fallback}{fallback}
+\setinterfaceconstant{fallback}{repli}
+\setinterfaceconstant{fallbacks}{replis}
\setinterfaceconstant{family}{famille}
-\setinterfaceconstant{features}{features}
-\setinterfaceconstant{fences}{fences}
-\setinterfaceconstant{field}{field}
+\setinterfaceconstant{features}{fonctionnalites}
+\setinterfaceconstant{featureset}{jeufonctionnalite}
+\setinterfaceconstant{fences}{barrieres}
+\setinterfaceconstant{field}{champ}
\setinterfaceconstant{fieldbackgroundcolor}{couleurarrierreplanchamp}
\setinterfaceconstant{fieldframecolor}{couleurcadrechamp}
\setinterfaceconstant{fieldlayer}{calquechamp}
-\setinterfaceconstant{fieldoffset}{offsetchamp}
+\setinterfaceconstant{fieldoffset}{decalagechamp}
\setinterfaceconstant{file}{fichier}
-\setinterfaceconstant{filler}{filler}
-\setinterfaceconstant{filter}{filter}
-\setinterfaceconstant{filtercommand}{filtercommand}
-\setinterfaceconstant{finalnamesep}{finalnamesep}
-\setinterfaceconstant{finalpagesep}{finalpagesep}
-\setinterfaceconstant{finalpubsep}{finalpubsep}
+\setinterfaceconstant{filler}{remplisseur}
+\setinterfaceconstant{filter}{filtre}
+\setinterfaceconstant{filtercommand}{commandefiltre}
+\setinterfaceconstant{finalnamesep}{sepnomfinal}
+\setinterfaceconstant{finalpagesep}{seppagefinale}
+\setinterfaceconstant{finalpubsep}{seppubfinale}
\setinterfaceconstant{first}{premier}
-\setinterfaceconstant{firstnamesep}{firstnamesep}
+\setinterfaceconstant{firstnamesep}{seppremiernom}
\setinterfaceconstant{firstpage}{premierepage}
\setinterfaceconstant{focus}{focus}
\setinterfaceconstant{focusin}{focusin}
-\setinterfaceconstant{focusoffset}{focusoffset}
+\setinterfaceconstant{focusoffset}{decalagefocus}
\setinterfaceconstant{focusout}{focusout}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{pdp}
-\setinterfaceconstant{footerdistance}{dsitancepdp}
+\setinterfaceconstant{footerdistance}{distancepdp}
\setinterfaceconstant{footerstate}{etatpdp}
-\setinterfaceconstant{force}{force}
+\setinterfaceconstant{force}{forcer}
\setinterfaceconstant{foregroundcolor}{couleurpremierplan}
\setinterfaceconstant{foregroundstyle}{stylepremierplan}
\setinterfaceconstant{format}{formatter}
@@ -841,163 +856,168 @@
\setinterfaceconstant{frameoffset}{decalagecadre}
\setinterfaceconstant{frameradius}{rayoncadre}
\setinterfaceconstant{frames}{cadres}
-\setinterfaceconstant{freeregion}{freeregion}
+\setinterfaceconstant{freeregion}{regionlibre}
\setinterfaceconstant{from}{de}
-\setinterfaceconstant{functioncolor}{functioncolor}
-\setinterfaceconstant{functionstyle}{functionstyle}
-\setinterfaceconstant{get}{obtient}
+\setinterfaceconstant{functioncolor}{couleurfonction}
+\setinterfaceconstant{functionstyle}{stylefonction}
+\setinterfaceconstant{get}{obtenir}
\setinterfaceconstant{global}{global}
-\setinterfaceconstant{goodies}{goodies}
+\setinterfaceconstant{goodies}{friandises}
\setinterfaceconstant{grid}{grille}
-\setinterfaceconstant{group}{group}
-\setinterfaceconstant{groupsuffix}{groupsuffix}
-\setinterfaceconstant{hang}{suspend}
-\setinterfaceconstant{hcompact}{hcompact}
-\setinterfaceconstant{headalign}{headalign}
+\setinterfaceconstant{group}{groupe}
+\setinterfaceconstant{groupsuffix}{suffixegroupe}
+\setinterfaceconstant{hang}{suspendre}
+\setinterfaceconstant{hcompact}{compacth}
+\setinterfaceconstant{headalign}{alignertete}
\setinterfaceconstant{headcolor}{couleurtete}
\setinterfaceconstant{headcommand}{commandetete}
\setinterfaceconstant{headconversion}{conversiontete}
-\setinterfaceconstant{header}{entete}
-\setinterfaceconstant{headerdistance}{distanceentete}
-\setinterfaceconstant{headerstate}{etatentete}
+\setinterfaceconstant{header}{entête}
+\setinterfaceconstant{headerdistance}{distanceentête}
+\setinterfaceconstant{headerstate}{etatentête}
\setinterfaceconstant{headlabel}{etiquettetete}
\setinterfaceconstant{headnumber}{numerotete}
-\setinterfaceconstant{headseparator}{headseparator}
+\setinterfaceconstant{headseparator}{separateurtete}
\setinterfaceconstant{headstyle}{styletete}
\setinterfaceconstant{height}{hauteur}
-\setinterfaceconstant{hfactor}{facteurhauteur}
-\setinterfaceconstant{hfil}{hfil}
-\setinterfaceconstant{hidenumber}{hidenumber}
-\setinterfaceconstant{hoffset}{decalagehauteur}
-\setinterfaceconstant{horizontal}{horizontale}
-\setinterfaceconstant{horoffset}{horoffset}
-\setinterfaceconstant{hyphen}{hyphen}
-\setinterfaceconstant{hyphens}{hyphens}
-\setinterfaceconstant{icommand}{icommande}
-\setinterfaceconstant{ignore}{ignore}
-\setinterfaceconstant{in}{in}
+\setinterfaceconstant{hfactor}{facteurh}
+\setinterfaceconstant{hfil}{remplissageh}
+\setinterfaceconstant{hidenumber}{cachernumero}
+\setinterfaceconstant{hoffset}{decalageh}
+\setinterfaceconstant{horizontal}{horizontal}
+\setinterfaceconstant{horoffset}{decalagehor}
+\setinterfaceconstant{hyphen}{traitdunion}
+\setinterfaceconstant{hyphens}{traitsdunion}
+\setinterfaceconstant{icommand}{commandei}
+\setinterfaceconstant{ignore}{ignorer}
+\setinterfaceconstant{in}{dans}
\setinterfaceconstant{inbetween}{entre}
-\setinterfaceconstant{increment}{incremente}
-\setinterfaceconstant{incrementnumber}{incrementenumero}
-\setinterfaceconstant{indenting}{composeenalinea}
-\setinterfaceconstant{indentnext}{indentesuivant}
+\setinterfaceconstant{increment}{incrementer}
+\setinterfaceconstant{incrementnumber}{incrementernumero}
+\setinterfaceconstant{indenting}{indentation}
+\setinterfaceconstant{indentlist}{indentlist}
+\setinterfaceconstant{indentnext}{indenterauuivant}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicateur}
-\setinterfaceconstant{initialsep}{initialsep}
-\setinterfaceconstant{inlinethreshold}{inlinethreshold}
+\setinterfaceconstant{initialsep}{sepinitial}
+\setinterfaceconstant{inlinethreshold}{seuilenligne}
\setinterfaceconstant{inner}{interieur}
\setinterfaceconstant{innermargin}{margeinterieure}
\setinterfaceconstant{inputfile}{fichierentree}
-\setinterfaceconstant{insidesection}{insidesection}
+\setinterfaceconstant{insidesection}{auseinsection}
\setinterfaceconstant{instance}{instance}
-\setinterfaceconstant{intent}{intent}
+\setinterfaceconstant{intent}{intention}
\setinterfaceconstant{interaction}{interaction}
\setinterfaceconstant{interlinespace}{espaceinterligne}
-\setinterfaceconstant{internalgrid}{internalgrid}
-\setinterfaceconstant{italicfeatures}{italicfeatures}
-\setinterfaceconstant{italicfont}{italicfont}
-\setinterfaceconstant{itemalign}{itemalign}
-\setinterfaceconstant{items}{elements}
-\setinterfaceconstant{joiners}{joiners}
-\setinterfaceconstant{journalconversion}{journalconversion}
-\setinterfaceconstant{juniorsep}{juniorsep}
-\setinterfaceconstant{keeptogether}{keeptogether}
-\setinterfaceconstant{ken}{ken}
-\setinterfaceconstant{keyexpansion}{keyexpansion}
-\setinterfaceconstant{keys}{keys}
-\setinterfaceconstant{keyword}{motcle}
+\setinterfaceconstant{internalgrid}{grilleinterieure}
+\setinterfaceconstant{italicfeatures}{fonctionnalitesitalique}
+\setinterfaceconstant{italicfont}{policeitalique}
+\setinterfaceconstant{itemalign}{alignerelem}
+\setinterfaceconstant{items}{élément}
+\setinterfaceconstant{joiners}{joins}
+\setinterfaceconstant{journalconversion}{conversionjournal}
+\setinterfaceconstant{juniorsep}{sepjunior}
+\setinterfaceconstant{keeptogether}{conserverensemble}
+\setinterfaceconstant{ken}{rep}
+\setinterfaceconstant{keyexpansion}{expansioncle}
+\setinterfaceconstant{keys}{cles}
+\setinterfaceconstant{keyword}{motclé}
\setinterfaceconstant{label}{etiquette}
-\setinterfaceconstant{labeloffset}{labeloffset}
-\setinterfaceconstant{language}{language}
-\setinterfaceconstant{last}{last}
-\setinterfaceconstant{lastnamesep}{lastnamesep}
+\setinterfaceconstant{labelalternative}{varianteetiquette}
+\setinterfaceconstant{labelcolor}{couleuretiquette}
+\setinterfaceconstant{labeloffset}{decalageetiquette}
+\setinterfaceconstant{labelstyle}{styleetiquette}
+\setinterfaceconstant{language}{langue}
+\setinterfaceconstant{last}{dernier}
+\setinterfaceconstant{lastnamesep}{sepderniernom}
\setinterfaceconstant{lastpage}{dernierepage}
-\setinterfaceconstant{lastpagesep}{lastpagesep}
-\setinterfaceconstant{lastpubsep}{lastpubsep}
-\setinterfaceconstant{layout}{layout}
+\setinterfaceconstant{lastpagesep}{sepdernierepage}
+\setinterfaceconstant{lastpubsep}{sepdernierepub}
+\setinterfaceconstant{layout}{miseenpage}
\setinterfaceconstant{left}{gauche}
\setinterfaceconstant{leftcolor}{couleurgauche}
-\setinterfaceconstant{leftcompoundhyphen}{leftcompoundhyphen}
+\setinterfaceconstant{leftcompoundhyphen}{traitdunioncomposegauche}
\setinterfaceconstant{leftedge}{bordgauche}
\setinterfaceconstant{leftedgedistance}{distancebordgauche}
\setinterfaceconstant{leftframe}{cadregauche}
-\setinterfaceconstant{lefthyphen}{lefthyphen}
+\setinterfaceconstant{lefthyphen}{traitduniongauche}
\setinterfaceconstant{leftmargin}{margegauche}
\setinterfaceconstant{leftmargindistance}{distancemargegauche}
\setinterfaceconstant{leftoffset}{decalagegauche}
\setinterfaceconstant{leftquotation}{citationgauche}
\setinterfaceconstant{leftquote}{citergauche}
-\setinterfaceconstant{leftsample}{leftsample}
+\setinterfaceconstant{leftsample}{echantillongauche}
\setinterfaceconstant{leftsentence}{phrasegauche}
-\setinterfaceconstant{leftspeech}{leftspeech}
-\setinterfaceconstant{leftstyle}{leftstyle}
+\setinterfaceconstant{leftspeech}{discoursgauche}
+\setinterfaceconstant{leftstyle}{stylegauche}
\setinterfaceconstant{leftsubsentence}{sousphrasegauche}
\setinterfaceconstant{lefttext}{textegauche}
\setinterfaceconstant{leftwidth}{largeurgauche}
-\setinterfaceconstant{leftwords}{leftwords}
-\setinterfaceconstant{less}{less}
+\setinterfaceconstant{leftwords}{motsgauche}
+\setinterfaceconstant{less}{moins}
\setinterfaceconstant{level}{niveau}
\setinterfaceconstant{levels}{niveaux}
-\setinterfaceconstant{limittext}{limittext}
+\setinterfaceconstant{limittext}{textelimite}
\setinterfaceconstant{line}{ligne}
\setinterfaceconstant{linecorrection}{correctionligne}
+\setinterfaceconstant{linedirection}{linedirection}
\setinterfaceconstant{lines}{lignes}
\setinterfaceconstant{list}{liste}
\setinterfaceconstant{listtext}{texteliste}
\setinterfaceconstant{local}{local}
\setinterfaceconstant{location}{emplacement}
-\setinterfaceconstant{loffset}{loffset}
+\setinterfaceconstant{loffset}{decalagel}
\setinterfaceconstant{logo}{logo}
\setinterfaceconstant{logos}{logos}
-\setinterfaceconstant{marcolor}{couleurmarquage}
+\setinterfaceconstant{marcolor}{couleurrem}
\setinterfaceconstant{margin}{marge}
\setinterfaceconstant{margindistance}{distancemarge}
-\setinterfaceconstant{marginedge}{bordmarge}
-\setinterfaceconstant{marginedgetext}{textebordmarge}
+\setinterfaceconstant{marginedge}{margebord}
+\setinterfaceconstant{marginedgetext}{textemargebord}
\setinterfaceconstant{margintext}{textemarge}
-\setinterfaceconstant{mark}{mark}
+\setinterfaceconstant{mark}{marque}
\setinterfaceconstant{marking}{marquage}
-\setinterfaceconstant{marstyle}{stylemarquage}
-\setinterfaceconstant{mask}{mask}
-\setinterfaceconstant{mathclass}{mathclass}
-\setinterfaceconstant{mathlimits}{mathlimits}
-\setinterfaceconstant{mathstyle}{mathstyle}
+\setinterfaceconstant{marstyle}{stylerem}
+\setinterfaceconstant{mask}{masque}
+\setinterfaceconstant{mathclass}{classemath}
+\setinterfaceconstant{mathlimits}{limitesmath}
+\setinterfaceconstant{mathstyle}{stylemath}
\setinterfaceconstant{max}{max}
-\setinterfaceconstant{maxdepth}{maxdepth}
+\setinterfaceconstant{maxdepth}{profondeurmax}
\setinterfaceconstant{maxheight}{hauteurmax}
\setinterfaceconstant{maxwidth}{largeurmax}
-\setinterfaceconstant{maybeyear}{maybeyear}
+\setinterfaceconstant{maybeyear}{anneepeutetre}
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{methode}
\setinterfaceconstant{middle}{milieu}
-\setinterfaceconstant{middlecolor}{middlecolor}
-\setinterfaceconstant{middlecommand}{middlecommand}
-\setinterfaceconstant{middlespeech}{middlespeech}
-\setinterfaceconstant{middlestyle}{middlestyle}
-\setinterfaceconstant{middletext}{textecentre}
-\setinterfaceconstant{middlewidth}{middlewidth}
-\setinterfaceconstant{midsentence}{midsentence}
+\setinterfaceconstant{middlecolor}{couleurmilieu}
+\setinterfaceconstant{middlecommand}{commandemilieu}
+\setinterfaceconstant{middlespeech}{discoursmilieu}
+\setinterfaceconstant{middlestyle}{stylemilieu}
+\setinterfaceconstant{middletext}{textemilieu}
+\setinterfaceconstant{middlewidth}{largeurmilieu}
+\setinterfaceconstant{midsentence}{milieuphrase}
\setinterfaceconstant{min}{min}
\setinterfaceconstant{mindepth}{profondeurmin}
\setinterfaceconstant{minheight}{hauteurmin}
\setinterfaceconstant{minwidth}{largeurmin}
-\setinterfaceconstant{moffset}{moffset}
-\setinterfaceconstant{monthconversion}{monthconversion}
-\setinterfaceconstant{more}{more}
-\setinterfaceconstant{mpdepth}{mpdepth}
-\setinterfaceconstant{mpheight}{mpheight}
-\setinterfaceconstant{mpoffset}{mpoffset}
-\setinterfaceconstant{mpwidth}{mpwidth}
+\setinterfaceconstant{moffset}{decalagem}
+\setinterfaceconstant{monthconversion}{conversionmois}
+\setinterfaceconstant{more}{plus}
+\setinterfaceconstant{mpdepth}{profondeurmp}
+\setinterfaceconstant{mpheight}{hauteurmp}
+\setinterfaceconstant{mpoffset}{decalagemp}
+\setinterfaceconstant{mpwidth}{largeurmp}
\setinterfaceconstant{n}{n}
\setinterfaceconstant{name}{nom}
-\setinterfaceconstant{namesep}{namesep}
-\setinterfaceconstant{nbottom}{ninf}
+\setinterfaceconstant{namesep}{sepnom}
+\setinterfaceconstant{nbottom}{nbas}
\setinterfaceconstant{nc}{nc}
\setinterfaceconstant{next}{suivant}
-\setinterfaceconstant{nextleft}{nextleft}
-\setinterfaceconstant{nextleftquotation}{nextleftquotation}
-\setinterfaceconstant{nextright}{nextright}
-\setinterfaceconstant{nextrightquotation}{nextrightquotation}
+\setinterfaceconstant{nextleft}{suivantgauche}
+\setinterfaceconstant{nextleftquotation}{citationgauchesuivante}
+\setinterfaceconstant{nextright}{suivantdroite}
+\setinterfaceconstant{nextrightquotation}{citationdroitesuivante}
\setinterfaceconstant{nl}{nl}
\setinterfaceconstant{nleft}{ngauche}
\setinterfaceconstant{nlines}{nlignes}
@@ -1006,672 +1026,755 @@
\setinterfaceconstant{notes}{notes}
\setinterfaceconstant{nr}{nr}
\setinterfaceconstant{nright}{ndroite}
-\setinterfaceconstant{ntop}{nsup}
+\setinterfaceconstant{ntop}{nhaut}
\setinterfaceconstant{number}{numero}
-\setinterfaceconstant{numberalign}{numberalign}
+\setinterfaceconstant{numberalign}{alignernumero}
\setinterfaceconstant{numbercolor}{couleurnumero}
\setinterfaceconstant{numbercommand}{commandenumero}
-\setinterfaceconstant{numberconversion}{numberconversion}
-\setinterfaceconstant{numberconversionset}{numberconversionset}
-\setinterfaceconstant{numberdistance}{numberdistance}
-\setinterfaceconstant{numbering}{numerotation}
-\setinterfaceconstant{numberorder}{numberorder}
-\setinterfaceconstant{numberprefix}{numberprefix}
-\setinterfaceconstant{numbersegments}{numbersegments}
-\setinterfaceconstant{numberseparator}{separateurnumbero}
-\setinterfaceconstant{numberseparatorset}{numberseparatorset}
-\setinterfaceconstant{numberset}{numberset}
-\setinterfaceconstant{numberstarter}{numberstarter}
-\setinterfaceconstant{numberstopper}{numberstopper}
-\setinterfaceconstant{numberstrut}{numberstrut}
+\setinterfaceconstant{numberconversion}{conversionnumero}
+\setinterfaceconstant{numberconversionset}{jeuconversionnumero}
+\setinterfaceconstant{numberdistance}{distancenumero}
+\setinterfaceconstant{numbering}{numérotation}
+\setinterfaceconstant{numberorder}{ordrenumero}
+\setinterfaceconstant{numberprefix}{prefixenumero}
+\setinterfaceconstant{numbersegments}{segmentsnumero}
+\setinterfaceconstant{numberseparator}{separateurnumero}
+\setinterfaceconstant{numberseparatorset}{jeuseparateurnumero}
+\setinterfaceconstant{numberset}{jeunumero}
+\setinterfaceconstant{numberstarter}{demarreurnumero}
+\setinterfaceconstant{numberstopper}{stoppeurnumero}
+\setinterfaceconstant{numberstrut}{entretoisenumero}
\setinterfaceconstant{numberstyle}{stylenumero}
-\setinterfaceconstant{numberwidth}{numberwidth}
+\setinterfaceconstant{numberwidth}{largeurnumero}
\setinterfaceconstant{nx}{nx}
\setinterfaceconstant{ny}{ny}
\setinterfaceconstant{object}{objet}
\setinterfaceconstant{obstruction}{obstruction}
-\setinterfaceconstant{oddmargin}{margepaire}
-\setinterfaceconstant{offset}{offset}
-\setinterfaceconstant{openaction}{actionouverture}
-\setinterfaceconstant{openpage}{openpage}
-\setinterfaceconstant{openpageaction}{actionouverturepage}
-\setinterfaceconstant{openup}{openup}
-\setinterfaceconstant{opticalsize}{opticalsize}
+\setinterfaceconstant{oddmargin}{margeimpaire}
+\setinterfaceconstant{offset}{decalage}
+\setinterfaceconstant{openaction}{actionouvrir}
+\setinterfaceconstant{openpage}{ouvrirpage}
+\setinterfaceconstant{openpageaction}{actionouvrirpage}
+\setinterfaceconstant{openup}{ouverture}
+\setinterfaceconstant{opticalsize}{tailleoptique}
\setinterfaceconstant{option}{option}
-\setinterfaceconstant{order}{order}
+\setinterfaceconstant{order}{ordre}
\setinterfaceconstant{orientation}{orientation}
-\setinterfaceconstant{otherstext}{otherstext}
+\setinterfaceconstant{otherstext}{texteautres}
\setinterfaceconstant{outermargin}{margeexterieure}
-\setinterfaceconstant{overprint}{overprint}
-\setinterfaceconstant{ownerpassword}{ownerpassword}
-\setinterfaceconstant{ownnumber}{numeroproprio}
-\setinterfaceconstant{packcriterium}{packcriterium}
+\setinterfaceconstant{overprint}{surimpression}
+\setinterfaceconstant{ownerpassword}{motdepasseproprietaire}
+\setinterfaceconstant{ownnumber}{numeropropre}
+\setinterfaceconstant{packcriterium}{criterepack}
\setinterfaceconstant{page}{page}
-\setinterfaceconstant{pageboundaries}{limitespage}
+\setinterfaceconstant{pageboundaries}{frontierespage}
\setinterfaceconstant{pagecolor}{couleurpage}
-\setinterfaceconstant{pagecolormodel}{pagecolormodel}
+\setinterfaceconstant{pagecolormodel}{modelecouleurpage}
\setinterfaceconstant{pagecommand}{commandepage}
-\setinterfaceconstant{pageconnector}{pageconnector}
-\setinterfaceconstant{pageconversion}{pageconversion}
-\setinterfaceconstant{pageconversionset}{pageconversionset}
-\setinterfaceconstant{pageleft}{pageleft}
-\setinterfaceconstant{pagemethod}{pagemethod}
+\setinterfaceconstant{pageconnector}{connecteurpage}
+\setinterfaceconstant{pageconversion}{conversionpage}
+\setinterfaceconstant{pageconversionset}{jeuconversionpage}
+\setinterfaceconstant{pageleft}{pagegauche}
+\setinterfaceconstant{pagemethod}{methodepage}
\setinterfaceconstant{pagenumber}{numeropage}
-\setinterfaceconstant{pageprefix}{pageprefix}
-\setinterfaceconstant{pageprefixconnector}{pageprefixconnector}
-\setinterfaceconstant{pageprefixconversion}{pageprefixconversion}
-\setinterfaceconstant{pageprefixconversionset}{pageprefixconversionset}
-\setinterfaceconstant{pageprefixsegments}{pageprefixsegments}
-\setinterfaceconstant{pageprefixseparatorset}{pageprefixseparatorset}
-\setinterfaceconstant{pageprefixset}{pageprefixset}
-\setinterfaceconstant{pageprefixstarter}{pageprefixstarter}
-\setinterfaceconstant{pageprefixstopper}{pageprefixstopper}
-\setinterfaceconstant{pageright}{pageright}
-\setinterfaceconstant{pagesegments}{pagesegments}
-\setinterfaceconstant{pagesep}{pagesep}
-\setinterfaceconstant{pageseparatorset}{pageseparatorset}
-\setinterfaceconstant{pageset}{pageset}
-\setinterfaceconstant{pagestarter}{pagestarter}
+\setinterfaceconstant{pageprefix}{prefixepage}
+\setinterfaceconstant{pageprefixconnector}{connecteurprefixepage}
+\setinterfaceconstant{pageprefixconversion}{conversionprefixepage}
+\setinterfaceconstant{pageprefixconversionset}{jeuconversionprefixepage}
+\setinterfaceconstant{pageprefixsegments}{segmentsprefixepage}
+\setinterfaceconstant{pageprefixseparatorset}{jeuseparateurprefixepage}
+\setinterfaceconstant{pageprefixset}{jeuprefixepage}
+\setinterfaceconstant{pageprefixstarter}{demarreurprefixepage}
+\setinterfaceconstant{pageprefixstopper}{stoppeurprefixpage}
+\setinterfaceconstant{pageright}{pagedroite}
+\setinterfaceconstant{pagesegments}{segmentspage}
+\setinterfaceconstant{pagesep}{seppage}
+\setinterfaceconstant{pageseparatorset}{jeuseparateurpage}
+\setinterfaceconstant{pageset}{jeupage}
+\setinterfaceconstant{pagestarter}{demarreurpage}
\setinterfaceconstant{pagestate}{etatpage}
-\setinterfaceconstant{pagestopper}{pagestopper}
+\setinterfaceconstant{pagestopper}{stoppeurpage}
\setinterfaceconstant{pagestyle}{stylepage}
\setinterfaceconstant{palet}{palette}
\setinterfaceconstant{paper}{papier}
\setinterfaceconstant{paragraph}{paragraphe}
-\setinterfaceconstant{period}{period}
-\setinterfaceconstant{place}{place}
-\setinterfaceconstant{placehead}{placetete}
-\setinterfaceconstant{placestopper}{emplacementstopper}
+\setinterfaceconstant{period}{periode}
+\setinterfaceconstant{place}{placer}
+\setinterfaceconstant{placehead}{placertete}
+\setinterfaceconstant{placeholder}{placeholder}
+\setinterfaceconstant{placestopper}{placerstoppeur}
\setinterfaceconstant{position}{position}
\setinterfaceconstant{prefix}{prefixe}
-\setinterfaceconstant{prefixconnector}{prefixconnector}
-\setinterfaceconstant{prefixconversion}{prefixconversion}
-\setinterfaceconstant{prefixconversionset}{prefixconversionset}
-\setinterfaceconstant{prefixsegments}{prefixsegments}
-\setinterfaceconstant{prefixseparatorset}{prefixseparatorset}
-\setinterfaceconstant{prefixset}{prefixset}
-\setinterfaceconstant{prefixstarter}{prefixstarter}
-\setinterfaceconstant{prefixstopper}{prefixstopper}
-\setinterfaceconstant{preset}{prereglage}
-\setinterfaceconstant{preview}{previsualisation}
+\setinterfaceconstant{prefixconnector}{connecteurprefixe}
+\setinterfaceconstant{prefixconversion}{conversionprefixe}
+\setinterfaceconstant{prefixconversionset}{jeuconversionprefixe}
+\setinterfaceconstant{prefixsegments}{segmentsprefixe}
+\setinterfaceconstant{prefixseparatorset}{jeuseparateurprefixe}
+\setinterfaceconstant{prefixset}{jeuprefixe}
+\setinterfaceconstant{prefixstarter}{demarreurprefixe}
+\setinterfaceconstant{prefixstopper}{stoppeurprefixe}
+\setinterfaceconstant{preset}{preregler}
+\setinterfaceconstant{preview}{apercu}
\setinterfaceconstant{previous}{precedent}
\setinterfaceconstant{previousnumber}{numeroprecedent}
-\setinterfaceconstant{print}{print}
-\setinterfaceconstant{printable}{editable}
-\setinterfaceconstant{process}{process}
-\setinterfaceconstant{profile}{profile}
-\setinterfaceconstant{properties}{properties}
-\setinterfaceconstant{pubsep}{pubsep}
-\setinterfaceconstant{quotechar}{quotechar}
+\setinterfaceconstant{print}{imprimer}
+\setinterfaceconstant{printable}{imprimable}
+\setinterfaceconstant{process}{traiter}
+\setinterfaceconstant{processors}{processors}
+\setinterfaceconstant{profile}{profil}
+\setinterfaceconstant{properties}{proprietes}
+\setinterfaceconstant{pubsep}{seppub}
+\setinterfaceconstant{quotechar}{caracitation}
\setinterfaceconstant{radius}{rayon}
\setinterfaceconstant{random}{aleatoire}
-\setinterfaceconstant{range}{range}
+\setinterfaceconstant{range}{gamme}
\setinterfaceconstant{reduction}{reduction}
\setinterfaceconstant{ref}{ref}
-\setinterfaceconstant{refcommand}{refcommand}
+\setinterfaceconstant{refcommand}{commanderef}
\setinterfaceconstant{reference}{reference}
-\setinterfaceconstant{referencemethod}{referencemethod}
-\setinterfaceconstant{referenceprefix}{referenceprefix}
-\setinterfaceconstant{referencing}{referencing}
+\setinterfaceconstant{referencemethod}{methodereference}
+\setinterfaceconstant{referenceprefix}{prefixereference}
+\setinterfaceconstant{referencetext}{referencetext}
+\setinterfaceconstant{referencing}{referencement}
\setinterfaceconstant{region}{region}
-\setinterfaceconstant{regionin}{entreregion}
-\setinterfaceconstant{regionout}{regionexterieure}
-\setinterfaceconstant{register}{register}
-\setinterfaceconstant{regularfeatures}{regularfeatures}
-\setinterfaceconstant{regularfont}{regularfont}
-\setinterfaceconstant{renderingsetup}{renderingsetup}
-\setinterfaceconstant{repeat}{repete}
-\setinterfaceconstant{reset}{reset}
+\setinterfaceconstant{regionin}{regiondedans}
+\setinterfaceconstant{regionout}{regiondehors}
+\setinterfaceconstant{register}{registre}
+\setinterfaceconstant{regularfeatures}{fonctionnalitesordinaires}
+\setinterfaceconstant{regularfont}{policereordinaire}
+\setinterfaceconstant{renderingsetup}{configurationrendu}
+\setinterfaceconstant{repeat}{repeter}
+\setinterfaceconstant{reset}{raz}
\setinterfaceconstant{resetnumber}{raznumero}
\setinterfaceconstant{resolution}{resolution}
-\setinterfaceconstant{resources}{resources}
-\setinterfaceconstant{reverse}{inverse}
+\setinterfaceconstant{resources}{ressources}
+\setinterfaceconstant{reverse}{inverser}
\setinterfaceconstant{right}{droite}
-\setinterfaceconstant{rightchars}{rightchars}
+\setinterfaceconstant{rightchars}{caracteresdroite}
\setinterfaceconstant{rightcolor}{couleurdroite}
-\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
+\setinterfaceconstant{rightcompoundhyphen}{traitdunioncomposedroite}
\setinterfaceconstant{rightedge}{borddroit}
\setinterfaceconstant{rightedgedistance}{distanceborddroit}
-\setinterfaceconstant{rightframe}{cadredroit}
-\setinterfaceconstant{righthyphen}{righthyphen}
+\setinterfaceconstant{rightframe}{cadredroite}
+\setinterfaceconstant{righthyphen}{traitduniondroite}
\setinterfaceconstant{rightmargin}{margedroite}
\setinterfaceconstant{rightmargindistance}{distancemargedroite}
-\setinterfaceconstant{rightoffset}{rightoffset}
+\setinterfaceconstant{rightoffset}{decalagedroite}
\setinterfaceconstant{rightquotation}{citationdroite}
\setinterfaceconstant{rightquote}{citerdroite}
-\setinterfaceconstant{rightsample}{rightsample}
+\setinterfaceconstant{rightsample}{echantillondroite}
\setinterfaceconstant{rightsentence}{phrasedroite}
-\setinterfaceconstant{rightspeech}{rightspeech}
+\setinterfaceconstant{rightspeech}{discoursdroite}
\setinterfaceconstant{rightstyle}{styledroit}
\setinterfaceconstant{rightsubsentence}{sousphrasedroite}
-\setinterfaceconstant{righttext}{textedroit}
+\setinterfaceconstant{righttext}{textedroite}
\setinterfaceconstant{rightwidth}{largeurdroite}
-\setinterfaceconstant{rightwords}{rightwords}
-\setinterfaceconstant{roffset}{roffset}
+\setinterfaceconstant{rightwords}{motsdroite}
+\setinterfaceconstant{roffset}{decalager}
\setinterfaceconstant{rotation}{rotation}
-\setinterfaceconstant{rule}{ligne}
-\setinterfaceconstant{rulecolor}{couleurligne}
-\setinterfaceconstant{rulecommand}{rulecommand}
-\setinterfaceconstant{rulethickness}{epaisseurligne}
+\setinterfaceconstant{rule}{trait}
+\setinterfaceconstant{rulecolor}{couleurtrait}
+\setinterfaceconstant{rulecommand}{commandetrait}
+\setinterfaceconstant{rulethickness}{epaisseurtrait}
\setinterfaceconstant{samepage}{memepage}
\setinterfaceconstant{sample}{echantillon}
-\setinterfaceconstant{samplesize}{samplesize}
-\setinterfaceconstant{saveinlist}{saveinlist}
+\setinterfaceconstant{samplesize}{tailleechantillon}
+\setinterfaceconstant{saveinlist}{enregistrerdansliste}
\setinterfaceconstant{scale}{echelle}
-\setinterfaceconstant{scope}{scope}
+\setinterfaceconstant{scope}{perimetre}
\setinterfaceconstant{screen}{ecran}
\setinterfaceconstant{section}{section}
-\setinterfaceconstant{sectionblock}{sectionblock}
-\setinterfaceconstant{sectionconversion}{sectionconversion}
-\setinterfaceconstant{sectionconversionset}{sectionconversionset}
+\setinterfaceconstant{sectionblock}{blocsection}
+\setinterfaceconstant{sectionconversion}{conversionsection}
+\setinterfaceconstant{sectionconversionset}{jeuconversionsection}
\setinterfaceconstant{sectionnumber}{numerosection}
-\setinterfaceconstant{sectionresetset}{sectionresetset}
-\setinterfaceconstant{sectionsegments}{sectionsegments}
-\setinterfaceconstant{sectionseparatorset}{sectionseparatorset}
-\setinterfaceconstant{sectionset}{sectionset}
-\setinterfaceconstant{sectionstarter}{sectionstarter}
-\setinterfaceconstant{sectionstopper}{sectionstopper}
+\setinterfaceconstant{sectionresetset}{jeurazsection}
+\setinterfaceconstant{sectionsegments}{segmentssection}
+\setinterfaceconstant{sectionseparatorset}{jeuseparateursection}
+\setinterfaceconstant{sectionset}{jeusection}
+\setinterfaceconstant{sectionstarter}{demarreursection}
+\setinterfaceconstant{sectionstopper}{stoppeursection}
\setinterfaceconstant{separator}{separateur}
-\setinterfaceconstant{separatorcolor}{separatorcolor}
-\setinterfaceconstant{separatorstyle}{separatorstyle}
-\setinterfaceconstant{set}{set}
+\setinterfaceconstant{separatorcolor}{couleurseparateur}
+\setinterfaceconstant{separatorstyle}{styleseparateur}
+\setinterfaceconstant{set}{regler}
\setinterfaceconstant{setups}{setups}
-\setinterfaceconstant{shrink}{shrink}
+\setinterfaceconstant{shrink}{retrecir}
\setinterfaceconstant{side}{cote}
-\setinterfaceconstant{sidealign}{sidealign}
-\setinterfaceconstant{sidemethod}{sidemethod}
-\setinterfaceconstant{sidespaceafter}{espacelateralapres}
+\setinterfaceconstant{sidealign}{alignercote}
+\setinterfaceconstant{sidemethod}{methodecote}
+\setinterfaceconstant{sidespaceafter}{espacelatéralaprès}
\setinterfaceconstant{sidespacebefore}{espacelateralavant}
-\setinterfaceconstant{sidespaceinbetween}{sidespaceinbetween}
-\setinterfaceconstant{sidethreshold}{sidethreshold}
+\setinterfaceconstant{sidespaceinbetween}{espacelateralentre}
+\setinterfaceconstant{sidethreshold}{seuilcote}
\setinterfaceconstant{sign}{signe}
-\setinterfaceconstant{simplecommand}{simplecommand}
-\setinterfaceconstant{size}{dimension}
-\setinterfaceconstant{slantedfeatures}{slantedfeatures}
-\setinterfaceconstant{slantedfont}{slantedfont}
+\setinterfaceconstant{simplecommand}{commandesimple}
+\setinterfaceconstant{size}{taille}
+\setinterfaceconstant{slantedfeatures}{fonctionnalitesincline}
+\setinterfaceconstant{slantedfont}{policeinclinee}
\setinterfaceconstant{small}{petit}
-\setinterfaceconstant{smallcapsfeatures}{smallcapsfeatures}
-\setinterfaceconstant{smallcapsfont}{smallcapsfont}
+\setinterfaceconstant{smallcapsfeatures}{fonctionnalitespetitescaps}
+\setinterfaceconstant{smallcapsfont}{policepetitescaps}
\setinterfaceconstant{solution}{solution}
-\setinterfaceconstant{sort}{sort}
-\setinterfaceconstant{sorttype}{sorttype}
-\setinterfaceconstant{source}{origine}
+\setinterfaceconstant{sort}{trier}
+\setinterfaceconstant{sorttype}{modetri}
+\setinterfaceconstant{source}{source}
\setinterfaceconstant{space}{espace}
-\setinterfaceconstant{spaceafter}{espaceapres}
-\setinterfaceconstant{spaceafterside}{spaceafterside}
+\setinterfaceconstant{spaceafter}{espaceaprès}
+\setinterfaceconstant{spaceafterside}{espaceaprèscoté}
\setinterfaceconstant{spacebefore}{espaceavant}
-\setinterfaceconstant{spacebeforeside}{spacebeforeside}
-\setinterfaceconstant{spaceinbetween}{spaceinbetween}
+\setinterfaceconstant{spacebeforeside}{espaceavantcote}
+\setinterfaceconstant{spaceinbetween}{espaceentre}
\setinterfaceconstant{spacing}{espacement}
\setinterfaceconstant{specification}{specification}
-\setinterfaceconstant{split}{split}
-\setinterfaceconstant{splitcolor}{splitcolor}
-\setinterfaceconstant{splitmethod}{splitmethod}
-\setinterfaceconstant{splitoffset}{splitoffset}
-\setinterfaceconstant{spot}{spot}
-\setinterfaceconstant{stack}{stack}
-\setinterfaceconstant{stackname}{stackname}
-\setinterfaceconstant{start}{demarre}
-\setinterfaceconstant{starter}{starter}
-\setinterfaceconstant{state}{etat}
-\setinterfaceconstant{step}{pas}
-\setinterfaceconstant{stop}{stoppe}
-\setinterfaceconstant{stopper}{taquet}
-\setinterfaceconstant{stretch}{etire}
-\setinterfaceconstant{strip}{strip}
-\setinterfaceconstant{strut}{strut}
+\setinterfaceconstant{split}{partager}
+\setinterfaceconstant{splitcolor}{couleurpartage}
+\setinterfaceconstant{splitmethod}{methodepartage}
+\setinterfaceconstant{splitoffset}{decalagepartage}
+\setinterfaceconstant{spot}{tondirect}
+\setinterfaceconstant{stack}{pile}
+\setinterfaceconstant{stackname}{nompile}
+\setinterfaceconstant{start}{début}
+\setinterfaceconstant{starter}{demarreur}
+\setinterfaceconstant{state}{état}
+\setinterfaceconstant{step}{etape}
+\setinterfaceconstant{stop}{fin}
+\setinterfaceconstant{stopper}{stoppeur}
+\setinterfaceconstant{stretch}{etirer}
+\setinterfaceconstant{strip}{bande}
+\setinterfaceconstant{strut}{entretoise}
\setinterfaceconstant{style}{style}
-\setinterfaceconstant{stylealternative}{stylealternative}
+\setinterfaceconstant{stylealternative}{variantestyle}
\setinterfaceconstant{sub}{sous}
\setinterfaceconstant{subtitle}{soustitre}
-\setinterfaceconstant{suffix}{suffix}
-\setinterfaceconstant{suffixseparator}{suffixseparator}
-\setinterfaceconstant{suffixstopper}{suffixstopper}
-\setinterfaceconstant{surnamefirstnamesep}{surnamefirstnamesep}
-\setinterfaceconstant{surnameinitialsep}{surnameinitialsep}
-\setinterfaceconstant{surnamesep}{surnamesep}
-\setinterfaceconstant{svgstyle}{svgstyle}
+\setinterfaceconstant{suffix}{suffixe}
+\setinterfaceconstant{suffixseparator}{separateursuffixe}
+\setinterfaceconstant{suffixstopper}{stoppeursuffixe}
+\setinterfaceconstant{surnamefirstnamesep}{sepnomfamilleprenom}
+\setinterfaceconstant{surnameinitialsep}{sepnomfamilleinitial}
+\setinterfaceconstant{surnamesep}{seprenom}
+\setinterfaceconstant{svgstyle}{stylesvg}
\setinterfaceconstant{sx}{sx}
\setinterfaceconstant{sy}{sy}
-\setinterfaceconstant{symalign}{symalignement}
+\setinterfaceconstant{symalign}{alignersym}
\setinterfaceconstant{symbol}{symbole}
-\setinterfaceconstant{symbolcommand}{symbolcommand}
+\setinterfaceconstant{symbolcommand}{commandesymbole}
\setinterfaceconstant{symbolset}{jeusymbole}
\setinterfaceconstant{symcolor}{couleursym}
\setinterfaceconstant{symstyle}{stylesym}
\setinterfaceconstant{synonym}{synonyme}
\setinterfaceconstant{synonymcolor}{couleursynonyme}
-\setinterfaceconstant{synonymcommand}{synonymcommand}
+\setinterfaceconstant{synonymcommand}{commandesynonyme}
\setinterfaceconstant{synonymstyle}{stylesynonyme}
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{texte}
-\setinterfaceconstant{textalign}{textalign}
+\setinterfaceconstant{textalign}{alignertexte}
\setinterfaceconstant{textcolor}{couleurtexte}
\setinterfaceconstant{textcommand}{commandetexte}
\setinterfaceconstant{textdistance}{distancetexte}
\setinterfaceconstant{textheight}{hauteurtexte}
\setinterfaceconstant{textlayer}{calquetexte}
\setinterfaceconstant{textmargin}{margetexte}
-\setinterfaceconstant{textmethod}{textmethod}
+\setinterfaceconstant{textmethod}{methodetexte}
\setinterfaceconstant{textseparator}{separateurtexte}
\setinterfaceconstant{textsize}{tailletexte}
\setinterfaceconstant{textstate}{etattexte}
\setinterfaceconstant{textstyle}{styletexte}
\setinterfaceconstant{textwidth}{largeurtexte}
-\setinterfaceconstant{threshold}{threshold}
-\setinterfaceconstant{time}{time}
+\setinterfaceconstant{threshold}{seuil}
+\setinterfaceconstant{time}{temps}
\setinterfaceconstant{title}{titre}
\setinterfaceconstant{titlecolor}{couleurtitre}
-\setinterfaceconstant{titlecommand}{titlecommand}
+\setinterfaceconstant{titlecommand}{commandetitre}
\setinterfaceconstant{titledistance}{distancetitre}
-\setinterfaceconstant{titleleft}{titleleft}
-\setinterfaceconstant{titleright}{titleright}
-\setinterfaceconstant{titlestrut}{titlestrut}
+\setinterfaceconstant{titleleft}{gauchetitre}
+\setinterfaceconstant{titleright}{droitetitre}
+\setinterfaceconstant{titlestrut}{entretoisetitre}
\setinterfaceconstant{titlestyle}{styletitre}
\setinterfaceconstant{to}{vers}
-\setinterfaceconstant{toffset}{toffset}
+\setinterfaceconstant{toffset}{decalaget}
\setinterfaceconstant{tolerance}{tolerance}
-\setinterfaceconstant{top}{sup}
-\setinterfaceconstant{topcommand}{topcommand}
-\setinterfaceconstant{topdistance}{distancesup}
-\setinterfaceconstant{topframe}{cadresup}
-\setinterfaceconstant{topoffset}{decalagesup}
-\setinterfaceconstant{topspace}{espacesup}
-\setinterfaceconstant{topstate}{etatsup}
-\setinterfaceconstant{totalnumber}{totalnumber}
-\setinterfaceconstant{transform}{transform}
-\setinterfaceconstant{translate}{translate}
-\setinterfaceconstant{trimoffset}{trimoffset}
-\setinterfaceconstant{type}{type}
+\setinterfaceconstant{top}{haut}
+\setinterfaceconstant{topcommand}{commandehaut}
+\setinterfaceconstant{topdistance}{distancehaut}
+\setinterfaceconstant{topframe}{cadrehaut}
+\setinterfaceconstant{topoffset}{decalagehaut}
+\setinterfaceconstant{topspace}{espacehaut}
+\setinterfaceconstant{topstate}{etathaut}
+\setinterfaceconstant{totalnumber}{nombretotal}
+\setinterfaceconstant{transform}{transformer}
+\setinterfaceconstant{translate}{traduire}
+\setinterfaceconstant{trimoffset}{decalagecoupe}
+\setinterfaceconstant{type}{transcrire}
\setinterfaceconstant{unit}{unite}
\setinterfaceconstant{unknownreference}{referenceinconnue}
-\setinterfaceconstant{up}{up}
-\setinterfaceconstant{urlalternative}{alternativeurl}
+\setinterfaceconstant{up}{enhaut}
+\setinterfaceconstant{urlalternative}{varianteurl}
\setinterfaceconstant{urlspace}{espaceurl}
-\setinterfaceconstant{userpassword}{userpassword}
+\setinterfaceconstant{userpassword}{motdepasseutilisateur}
\setinterfaceconstant{validate}{valider}
-\setinterfaceconstant{values}{values}
-\setinterfaceconstant{vcommand}{vcommande}
-\setinterfaceconstant{vcompact}{vcompact}
-\setinterfaceconstant{vector}{vector}
-\setinterfaceconstant{veroffset}{veroffset}
-\setinterfaceconstant{vertical}{verticale}
-\setinterfaceconstant{vfactor}{vfactor}
-\setinterfaceconstant{vfil}{vfil}
-\setinterfaceconstant{viewerprefix}{viewerprefix}
-\setinterfaceconstant{voffset}{voffset}
-\setinterfaceconstant{vonsep}{vonsep}
-\setinterfaceconstant{way}{mode}
-\setinterfaceconstant{wfactor}{facteurlargeur}
+\setinterfaceconstant{values}{valeurs}
+\setinterfaceconstant{vcommand}{commandev}
+\setinterfaceconstant{vcompact}{compactv}
+\setinterfaceconstant{vector}{vecteur}
+\setinterfaceconstant{veroffset}{decalagever}
+\setinterfaceconstant{vertical}{vertical}
+\setinterfaceconstant{vfactor}{facteurv}
+\setinterfaceconstant{vfil}{remplissagev}
+\setinterfaceconstant{viewerprefix}{prefixevisualisateur}
+\setinterfaceconstant{voffset}{decalagev}
+\setinterfaceconstant{vonsep}{sepvon}
+\setinterfaceconstant{way}{maniere}
+\setinterfaceconstant{wfactor}{facteurw}
\setinterfaceconstant{white}{blanc}
\setinterfaceconstant{width}{largeur}
-\setinterfaceconstant{words}{words}
-\setinterfaceconstant{xanchor}{xanchor}
-\setinterfaceconstant{xfactor}{xfactor}
+\setinterfaceconstant{words}{mots}
+\setinterfaceconstant{xanchor}{ancrex}
+\setinterfaceconstant{xfactor}{facteurx}
\setinterfaceconstant{xhtml}{xhtml}
\setinterfaceconstant{xmax}{xmax}
-\setinterfaceconstant{xmlsetup}{xmlsetup}
-\setinterfaceconstant{xoffset}{xoffset}
-\setinterfaceconstant{xscale}{xscale}
-\setinterfaceconstant{xstep}{xstep}
-\setinterfaceconstant{yanchor}{yanchor}
-\setinterfaceconstant{yfactor}{yfactor}
+\setinterfaceconstant{xmlsetup}{configurationxml}
+\setinterfaceconstant{xoffset}{decalagex}
+\setinterfaceconstant{xscale}{echellex}
+\setinterfaceconstant{xstep}{etapex}
+\setinterfaceconstant{yanchor}{ancrey}
+\setinterfaceconstant{yfactor}{facteury}
\setinterfaceconstant{ymax}{ymax}
-\setinterfaceconstant{yoffset}{yoffset}
-\setinterfaceconstant{yscale}{yscale}
-\setinterfaceconstant{ystep}{ystep}
+\setinterfaceconstant{yoffset}{decalagey}
+\setinterfaceconstant{yscale}{echelley}
+\setinterfaceconstant{ystep}{etapey}
% definitions for interface elements for language fr
%
-\setinterfaceelement{answerlines}{answerlines}
-\setinterfaceelement{answerspace}{answerspace}
-\setinterfaceelement{begin}{debut}
-\setinterfaceelement{complete}{complete}
+\setinterfaceelement{answerlines}{lignesreponse}
+\setinterfaceelement{answerspace}{espacereponse}
+\setinterfaceelement{begin}{commencer}
+\setinterfaceelement{complete}{complet}
\setinterfaceelement{coupled}{couple}
\setinterfaceelement{currentlocal}{localcourant}
-\setinterfaceelement{end}{fin}
+\setinterfaceelement{end}{terminer}
\setinterfaceelement{endsetup}{}
-\setinterfaceelement{get}{obtient}
-\setinterfaceelement{increment}{incremente}
+\setinterfaceelement{get}{obtenir}
+\setinterfaceelement{increment}{incrementer}
\setinterfaceelement{list}{liste}
\setinterfaceelement{listof}{listede}
-\setinterfaceelement{load}{charge}
+\setinterfaceelement{load}{charger}
\setinterfaceelement{local}{local}
-\setinterfaceelement{makeup}{makeup}
+\setinterfaceelement{makeup}{composition}
\setinterfaceelement{next}{suivant}
-\setinterfaceelement{place}{place}
+\setinterfaceelement{place}{placer}
\setinterfaceelement{previous}{precedent}
\setinterfaceelement{previouslocal}{localprecedent}
\setinterfaceelement{reserve}{reserver}
-\setinterfaceelement{see}{voit}
-\setinterfaceelement{setup}{regle}
-\setinterfaceelement{start}{demarre}
-\setinterfaceelement{stop}{stoppe}
+\setinterfaceelement{see}{voir}
+\setinterfaceelement{setup}{configurer}
+\setinterfaceelement{start}{début}
+\setinterfaceelement{stop}{fin}
\setinterfaceelement{text}{texte}
-\setinterfaceelement{type}{type}
+\setinterfaceelement{type}{transcrire}
% definitions for interface commands for language fr
%
-\setinterfacecommand{CAPPED}{CAP}
\setinterfacecommand{Character}{Caractere}
\setinterfacecommand{Characters}{Caracteres}
\setinterfacecommand{MONTH}{MOIS}
\setinterfacecommand{Numbers}{Numeros}
\setinterfacecommand{Romannumerals}{Chiffresromains}
-\setinterfacecommand{SmallCapped}{Cap}
-\setinterfacecommand{SmallCaps}{Caps}
+\setinterfacecommand{SmallCapped}{PetitesCap}
+\setinterfacecommand{SmallCaps}{PetitesCaps}
\setinterfacecommand{WEEKDAY}{JOURSEMAINE}
\setinterfacecommand{WORD}{MOT}
\setinterfacecommand{WORDS}{MOTS}
\setinterfacecommand{Word}{Mot}
\setinterfacecommand{Words}{Mots}
-\setinterfacecommand{about}{concernant}
-\setinterfacecommand{adaptlayout}{adaptedisposition}
-\setinterfacecommand{alignment}{alignment}
+\setinterfacecommand{about}{apropos}
+\setinterfacecommand{adaptfontfeature}{adapterfonctionnalitepolice}
+\setinterfacecommand{adaptlayout}{adaptermiseenpage}
+\setinterfacecommand{addfeature}{ajouterfonctionnalite}
+\setinterfacecommand{alignbottom}{alignerbas}
+\setinterfacecommand{aligned}{aligne}
+\setinterfacecommand{alignedbox}{boitealignee}
+\setinterfacecommand{alignedline}{lignealignee}
+\setinterfacecommand{alignhere}{alignerici}
+\setinterfacecommand{alignment}{alignement}
+\setinterfacecommand{alignmentcharacter}{caracterealignement}
+\setinterfacecommand{applytocharacters}{appliquerauxcaracteres}
+\setinterfacecommand{applytofirstcharacter}{appliqueraupremiercaractere}
\setinterfacecommand{arg}{arg}
-\setinterfacecommand{at}{a}
-\setinterfacecommand{atleftmargin}{atleftmargin}
-\setinterfacecommand{atpage}{alapage}
-\setinterfacecommand{atrightmargin}{atrightmargin}
+\setinterfacecommand{at}{en}
+\setinterfacecommand{atleftmargin}{enmargegauche}
+\setinterfacecommand{atpage}{enpage}
+\setinterfacecommand{atrightmargin}{enmargedroite}
\setinterfacecommand{background}{arriereplan}
-\setinterfacecommand{backspace}{retourarriere}
-\setinterfacecommand{blackrule}{lignenoire}
-\setinterfacecommand{blackrules}{lignesnoires}
-\setinterfacecommand{blank}{vide}
+\setinterfacecommand{backspace}{retourarrière}
+\setinterfacecommand{blackrule}{traitepais}
+\setinterfacecommand{blackrules}{traitsepais}
+\setinterfacecommand{blank}{vierge}
\setinterfacecommand{bookmark}{marquepage}
-\setinterfacecommand{bottomdistance}{distanceinf}
-\setinterfacecommand{bottomheight}{hauteurinf}
-\setinterfacecommand{bottomspace}{espaceinf}
-\setinterfacecommand{but}{but}
+\setinterfacecommand{bottombox}{boitebas}
+\setinterfacecommand{bottomdistance}{distancebas}
+\setinterfacecommand{bottomheight}{hauteurbas}
+\setinterfacecommand{bottomleftbox}{basgaucheboite}
+\setinterfacecommand{bottomrightbox}{boitebasdroite}
+\setinterfacecommand{bottomspace}{espacebas}
+\setinterfacecommand{buildtextbottomdot}{construirepointtextebas}
+\setinterfacecommand{but}{mais}
\setinterfacecommand{button}{bouton}
-\setinterfacecommand{bypassblocks}{sauteblocs}
+\setinterfacecommand{bypassblocks}{eviteblocs}
\setinterfacecommand{character}{caractere}
\setinterfacecommand{characters}{caracteres}
\setinterfacecommand{chem}{chem}
-\setinterfacecommand{clip}{clip}
-\setinterfacecommand{clonefield}{clonechamp}
+\setinterfacecommand{clip}{decouper}
+\setinterfacecommand{clonefield}{clonerchamp}
\setinterfacecommand{color}{couleur}
\setinterfacecommand{colorbar}{barrecouleur}
\setinterfacecommand{colorvalue}{valeurcouleur}
\setinterfacecommand{column}{colonne}
-\setinterfacecommand{comparecolorgroup}{comparegroupecouleur}
-\setinterfacecommand{comparepalet}{comparepalette}
-\setinterfacecommand{completepagenumber}{completenumeropage}
-\setinterfacecommand{completeregister}{completeregistre}
+\setinterfacecommand{comparecolorgroup}{comparergroupecouleur}
+\setinterfacecommand{comparepalet}{comparerpalette}
+\setinterfacecommand{completepagenumber}{numeropagecomplet}
+\setinterfacecommand{completeregister}{registrecomplet}
\setinterfacecommand{component}{composant}
-\setinterfacecommand{convertnumber}{convertitnumero}
-\setinterfacecommand{copyfield}{copitchamp}
-\setinterfacecommand{correctwhitespace}{corrigeespaceblanc}
+\setinterfacecommand{convertnumber}{convertirnumero}
+\setinterfacecommand{copyfield}{copierchamp}
+\setinterfacecommand{correctwhitespace}{corrigerespaceblanc}
\setinterfacecommand{coupledocument}{coupledocument}
\setinterfacecommand{couplemarking}{couplemarquage}
-\setinterfacecommand{couplepage}{pagedouble}
+\setinterfacecommand{couplepage}{couplepage}
\setinterfacecommand{couplepaper}{couplepapier}
\setinterfacecommand{coupleregister}{coupleregistre}
\setinterfacecommand{crlf}{crlf}
\setinterfacecommand{currentdate}{datecourante}
-\setinterfacecommand{currentheadnumber}{numerotetecourant}
-\setinterfacecommand{cutspace}{cutspace}
+\setinterfacecommand{currentheadnumber}{numerotetecourante}
+\setinterfacecommand{cutspace}{espacecoupe}
\setinterfacecommand{date}{date}
\setinterfacecommand{decouplemarking}{decouplemarquage}
\setinterfacecommand{decrementnumber}{decrementenumero}
-\setinterfacecommand{define}{definit}
-\setinterfacecommand{defineaccent}{definitaccent}
-\setinterfacecommand{defineblank}{definitvide}
-\setinterfacecommand{defineblock}{definitbloc}
-\setinterfacecommand{definebodyfont}{definitpolicecorps}
-\setinterfacecommand{definebodyfontenvironment}{definitenvironnementpolicecorps}
-\setinterfacecommand{definebuffer}{definitbuffer}
-\setinterfacecommand{definecharacter}{definicaractere}
-\setinterfacecommand{definecolor}{definitcouleur}
-\setinterfacecommand{definecolorgroup}{definitgroupecouleur}
-\setinterfacecommand{definecolumnbreak}{definitsautdecolonne}
-\setinterfacecommand{definecolumnset}{definitjeucolonne}
-\setinterfacecommand{definecombination}{definecombination}
-\setinterfacecommand{definecombinedlist}{definitlisteimbriquee}
-\setinterfacecommand{definecommand}{definitcommande}
-\setinterfacecommand{defineconversion}{definitconversion}
-\setinterfacecommand{definedescription}{definitdescription}
-\setinterfacecommand{defineenumeration}{definitenumeration}
-\setinterfacecommand{definefield}{definitchamp}
-\setinterfacecommand{definefieldstack}{definitpilechamp}
-\setinterfacecommand{definefiguresymbol}{definitsymbolefigure}
-\setinterfacecommand{definefloat}{definitflottant}
-\setinterfacecommand{definefont}{definitpolice}
-\setinterfacecommand{definefontstyle}{definitstylepolice}
-\setinterfacecommand{definefontsynonym}{definitsynonymepolice}
-\setinterfacecommand{defineframed}{defineframed}
-\setinterfacecommand{defineframedtext}{defineframedtext}
-\setinterfacecommand{definehbox}{definithbox}
-\setinterfacecommand{definehead}{definittete}
-\setinterfacecommand{defineindentedtext}{defineindentedtext}
-\setinterfacecommand{defineinmargin}{definitdansmarge}
-\setinterfacecommand{defineinteractionmenu}{definitmenuinteraction}
-\setinterfacecommand{defineitemgroup}{defineitemgroup}
-\setinterfacecommand{definelabel}{definitetiquette}
-\setinterfacecommand{definelayer}{definitcalque}
-\setinterfacecommand{definelayout}{definitdisposition}
-\setinterfacecommand{definelist}{definitliste}
-\setinterfacecommand{definelogo}{definitlogo}
-\setinterfacecommand{definemainfield}{definitchampprincipal}
-\setinterfacecommand{definemakeup}{definitmakeup}
-\setinterfacecommand{definemarking}{definitmarquage}
-\setinterfacecommand{definemathalignment}{definemathalignment}
-\setinterfacecommand{defineoutput}{definitsortie}
-\setinterfacecommand{defineoverlay}{definitrevetement}
-\setinterfacecommand{definepagebreak}{definitsautdepage}
-\setinterfacecommand{definepalet}{definitpalette}
-\setinterfacecommand{definepapersize}{definittaillepapier}
-\setinterfacecommand{defineparagraphs}{definitparagraphes}
-\setinterfacecommand{defineplacement}{defineplacement}
-\setinterfacecommand{defineprofile}{definitprofil}
-\setinterfacecommand{defineprogram}{definitprogramme}
-\setinterfacecommand{definerawfont}{definitpolicebrute}
-\setinterfacecommand{definereference}{definitreference}
-\setinterfacecommand{definereferenceformat}{definitformatreference}
-\setinterfacecommand{definereferencelist}{definitlistereference}
-\setinterfacecommand{defineregister}{definitregistre}
-\setinterfacecommand{definerule}{definitregle}
-\setinterfacecommand{definesection}{definitsection}
-\setinterfacecommand{definesectionblock}{definitblocsection}
-\setinterfacecommand{definesorting}{definittri}
-\setinterfacecommand{definestartstop}{definitdemarrestoppe}
-\setinterfacecommand{definestyle}{definitstyle}
-\setinterfacecommand{definesubfield}{definitsouschamp}
-\setinterfacecommand{definesymbol}{definitsymbole}
-\setinterfacecommand{definesynonyms}{definitsynonymes}
-\setinterfacecommand{definetabletemplate}{definittrametableau}
-\setinterfacecommand{definetabulate}{definittabulation}
-\setinterfacecommand{definetext}{definittexte}
-\setinterfacecommand{definetextbackground}{definetextbackground}
-\setinterfacecommand{definetextposition}{definitpositiontexte}
-\setinterfacecommand{definetextvariable}{definitvariabletexte}
-\setinterfacecommand{definetype}{definittype}
-\setinterfacecommand{definetyping}{definitdactylo}
-\setinterfacecommand{defineversion}{definitversion}
-\setinterfacecommand{determineheadnumber}{determinenumerotete}
-\setinterfacecommand{determinelistcharacteristics}{determinecaracteristiqueliste}
-\setinterfacecommand{determineregistercharacteristics}{determinecaracteristiquesregistre}
+\setinterfacecommand{define}{définir}
+\setinterfacecommand{defineaccent}{définiraccent}
+\setinterfacecommand{defineblank}{définirvierge}
+\setinterfacecommand{defineblock}{définirbloc}
+\setinterfacecommand{definebodyfont}{définirpolicedecorps}
+\setinterfacecommand{definebodyfontenvironment}{définirenvironnementpolicedecorps}
+\setinterfacecommand{definebodyfontswitch}{définircommutateurpolicedecorps}
+\setinterfacecommand{definebuffer}{définirtampon}
+\setinterfacecommand{definecharacter}{définircaractere}
+\setinterfacecommand{definecharacterkerning}{définirapprochecaracteres}
+\setinterfacecommand{definecharacterspacing}{définirespacementcaracteres}
+\setinterfacecommand{definecolor}{définircouleur}
+\setinterfacecommand{definecolorgroup}{définirgroupecouleur}
+\setinterfacecommand{definecolumnbreak}{définirsautdecolonne}
+\setinterfacecommand{definecolumnset}{définirjeucolonnes}
+\setinterfacecommand{definecombination}{définircombinaison}
+\setinterfacecommand{definecombinedlist}{définirlistecombinee}
+\setinterfacecommand{definecommand}{définircommande}
+\setinterfacecommand{defineconversion}{définirconversion}
+\setinterfacecommand{definedescription}{définirdescription}
+\setinterfacecommand{definedfont}{policedefinie}
+\setinterfacecommand{defineenumeration}{définirénumération}
+\setinterfacecommand{definefallbackfamily}{définirfamillederepli}
+\setinterfacecommand{definefield}{définirchamp}
+\setinterfacecommand{definefieldstack}{définirpilechamp}
+\setinterfacecommand{definefiguresymbol}{définirfiguresymbole}
+\setinterfacecommand{definefilefallback}{définirfichierderepli}
+\setinterfacecommand{definefirstline}{définirpremiereligne}
+\setinterfacecommand{definefloat}{définirflottant}
+\setinterfacecommand{definefont}{définirpolice}
+\setinterfacecommand{definefontalternative}{définirvariantepolice}
+\setinterfacecommand{definefontfallback}{définirpolicederepli}
+\setinterfacecommand{definefontfamily}{définirfamillepolice}
+\setinterfacecommand{definefontfamilypreset}{définirprereglagefamillepolice}
+\setinterfacecommand{definefontfeature}{définirfonctionnalitepolice}
+\setinterfacecommand{definefontfile}{définirfichierpolice}
+\setinterfacecommand{definefontsize}{définirtaillepolice}
+\setinterfacecommand{definefontsolution}{définirsolutionpolice}
+\setinterfacecommand{definefontstyle}{définirstylepolice}
+\setinterfacecommand{definefontsynonym}{définirsynonymepolice}
+\setinterfacecommand{defineframed}{définirencadre}
+\setinterfacecommand{defineframedtext}{définirtexteencadre}
+\setinterfacecommand{definefrozenfont}{définirpolicegelee}
+\setinterfacecommand{definehbox}{définirhbox}
+\setinterfacecommand{definehead}{définirtete}
+\setinterfacecommand{definehyphenationfeatures}{définirfonctionnalitescesure}
+\setinterfacecommand{defineindentedtext}{définirtexteindente}
+\setinterfacecommand{defineinmargin}{définirdansmarge}
+\setinterfacecommand{defineinteractionmenu}{définirmenuinteraction}
+\setinterfacecommand{defineitemgroup}{définirgroupedéléments}
+\setinterfacecommand{defineitems}{définiréléments}
+\setinterfacecommand{definelabel}{définiretiquette}
+\setinterfacecommand{definelayer}{définircalque}
+\setinterfacecommand{definelayout}{définirmiseenpage}
+\setinterfacecommand{definelinenote}{définirnotedeligne}
+\setinterfacecommand{definelist}{définirliste}
+\setinterfacecommand{definelogo}{définirlogo}
+\setinterfacecommand{definemainfield}{définirchampprincipal}
+\setinterfacecommand{definemakeup}{définircomposition}
+\setinterfacecommand{definemarking}{définirmarquage}
+\setinterfacecommand{definemathalignment}{définiralignementmath}
+\setinterfacecommand{definemode}{définirmode}
+\setinterfacecommand{definenamedcolor}{définircouleurnommee}
+\setinterfacecommand{definenote}{définirnote}
+\setinterfacecommand{defineoutput}{définirsortie}
+\setinterfacecommand{defineoverlay}{définirsuperposition}
+\setinterfacecommand{definepagebreak}{définirsautdepage}
+\setinterfacecommand{definepalet}{définirpalette}
+\setinterfacecommand{definepapersize}{définirtaillepapier}
+\setinterfacecommand{defineparagraphs}{définirparagraphes}
+\setinterfacecommand{defineperiodkerning}{reglerapprochepoint}
+\setinterfacecommand{defineplacement}{définirplacement}
+\setinterfacecommand{defineprofile}{définirprofil}
+\setinterfacecommand{defineprogram}{définirprogramme}
+\setinterfacecommand{definerawfont}{définirpolicebrute}
+\setinterfacecommand{definereference}{définirreference}
+\setinterfacecommand{definereferenceformat}{définirformatrereference}
+\setinterfacecommand{definereferencelist}{définirlistereference}
+\setinterfacecommand{defineregister}{définirregistre}
+\setinterfacecommand{definerule}{définirtrait}
+\setinterfacecommand{definesection}{définirsection}
+\setinterfacecommand{definesectionblock}{définirblocsection}
+\setinterfacecommand{definesorting}{définirtri}
+\setinterfacecommand{definestartstop}{définirdébutfin}
+\setinterfacecommand{definestyle}{définirstyle}
+\setinterfacecommand{definesubfield}{définirsouschamp}
+\setinterfacecommand{definesymbol}{définirsymbole}
+\setinterfacecommand{definesynonyms}{définirsynonymes}
+\setinterfacecommand{definetabletemplate}{définirgabarittable}
+\setinterfacecommand{definetabulate}{définirtabulation}
+\setinterfacecommand{definetext}{définirtexte}
+\setinterfacecommand{definetextbackground}{définirtextearriereplan}
+\setinterfacecommand{definetextnote}{définirnotetexte}
+\setinterfacecommand{definetextposition}{définirpositiontexte}
+\setinterfacecommand{definetextvariable}{définirvariabletexte}
+\setinterfacecommand{definetype}{définirtranscrire}
+\setinterfacecommand{definetyping}{définirtranscription}
+\setinterfacecommand{defineversion}{définirversion}
+\setinterfacecommand{depthspanningtext}{jambagetextecouvrant}
+\setinterfacecommand{determineheadnumber}{determinernumerotete}
+\setinterfacecommand{determinelistcharacteristics}{determinercaracteristiquesliste}
+\setinterfacecommand{determineregistercharacteristics}{determinercaracteristiquesregistre}
\setinterfacecommand{dimension}{dimension}
-\setinterfacecommand{disableinteractionmenu}{inhibemenuinteraction}
+\setinterfacecommand{disableinteractionmenu}{desactivermenuinteraction}
+\setinterfacecommand{disablemode}{desactivermode}
+\setinterfacecommand{doaddfeature}{faireajouterfonctionnalite}
\setinterfacecommand{domicile}{domicile}
-\setinterfacecommand{donttest}{sanstest}
+\setinterfacecommand{dontconvertfont}{nepasconvertirpolice}
+\setinterfacecommand{donttest}{sanstester}
\setinterfacecommand{edgedistance}{distancebord}
\setinterfacecommand{edgewidth}{largeurbord}
-\setinterfacecommand{emptylines}{emptylines}
-\setinterfacecommand{environment}{environement}
+\setinterfacecommand{emphasisboldface}{policegrasaccentue}
+\setinterfacecommand{emptylines}{lignesvide}
+\setinterfacecommand{enablemode}{activermode}
+\setinterfacecommand{environment}{environnement}
\setinterfacecommand{externalfigure}{figureexterne}
\setinterfacecommand{fact}{fait}
+\setinterfacecommand{fastswitchtobodyfont}{passerrapideapolicedecorps}
+\setinterfacecommand{feature}{fonctionnalite}
\setinterfacecommand{field}{champ}
\setinterfacecommand{fieldstack}{pilechamp}
-\setinterfacecommand{fillinfield}{remplitchamp}
-\setinterfacecommand{fillinline}{remplitligne}
-\setinterfacecommand{fillinrules}{remplitlignesreglees}
-\setinterfacecommand{fillintext}{remplittexte}
-\setinterfacecommand{fitfield}{ajustechamp}
+\setinterfacecommand{fillinfield}{champarenseigner}
+\setinterfacecommand{fillinline}{lignearenseigner}
+\setinterfacecommand{fillinrules}{traitsarenseigner}
+\setinterfacecommand{fillintext}{textearenseigner}
+\setinterfacecommand{firstcharacter}{premiercaractere}
+\setinterfacecommand{fitfield}{adapterchamp}
+\setinterfacecommand{fittopbaselinegrid}{adaptergrillehautlignedebase}
\setinterfacecommand{fixedspace}{espacefixe}
\setinterfacecommand{fixedspaces}{espacesfixes}
-\setinterfacecommand{followprofile}{suivantprofil}
-\setinterfacecommand{followprofileversion}{suivantversionprofil}
-\setinterfacecommand{followversion}{suivantversion}
+\setinterfacecommand{flushnotes}{vidernotes}
+\setinterfacecommand{followprofile}{suivreprofile}
+\setinterfacecommand{followprofileversion}{suivreversionprofil}
+\setinterfacecommand{followversion}{suivreversion}
\setinterfacecommand{footerdistance}{distancepdp}
\setinterfacecommand{footerheight}{hauteurpdp}
-\setinterfacecommand{footnote}{notepdp}
-\setinterfacecommand{footnotetext}{textenotepdp}
-\setinterfacecommand{forceblocks}{forceblocs}
+\setinterfacecommand{footnote}{notebdp}
+\setinterfacecommand{footnotetext}{textenotebdp}
+\setinterfacecommand{forceblocks}{forcerblocs}
+\setinterfacecommand{forcecharacterstripping}{forcerdemontagecaracteres}
\setinterfacecommand{formulanumber}{numeroformule}
\setinterfacecommand{fraction}{fraction}
-\setinterfacecommand{framed}{framed}
+\setinterfacecommand{framed}{encadre}
\setinterfacecommand{from}{de}
-\setinterfacecommand{getbuffer}{prendbuffer}
-\setinterfacecommand{getmarking}{obtientmarquage}
-\setinterfacecommand{getnumber}{getnumber}
-\setinterfacecommand{godown}{vaenbas}
-\setinterfacecommand{goto}{va}
-\setinterfacecommand{gotobox}{vaalaboite}
-\setinterfacecommand{gotopage}{vaalapage}
+\setinterfacecommand{fromlinenote}{denotedeligne}
+\setinterfacecommand{getbuffer}{obtenirtampon}
+\setinterfacecommand{getfirstcharacter}{obtenirpremiercaractere}
+\setinterfacecommand{getmarking}{obtenirmarquage}
+\setinterfacecommand{getnumber}{obtenirnumero}
+\setinterfacecommand{globaldisablemode}{desactivermodeglobal}
+\setinterfacecommand{globalenablemode}{activermodeglobal}
+\setinterfacecommand{globalpreventmode}{empechermodeglobal}
+\setinterfacecommand{godown}{allerenbas}
+\setinterfacecommand{goto}{allera}
+\setinterfacecommand{gotobox}{alleraboite}
+\setinterfacecommand{gotopage}{allerapage}
\setinterfacecommand{graycolor}{couleurgrise}
\setinterfacecommand{greyvalue}{valeurgris}
\setinterfacecommand{grid}{grille}
-\setinterfacecommand{hairline}{ligneh}
-\setinterfacecommand{head}{tete}
-\setinterfacecommand{headerdistance}{distanceentete}
-\setinterfacecommand{headerheight}{hauteurentete}
+\setinterfacecommand{hairline}{ligneavectrait}
+\setinterfacecommand{head}{tête}
+\setinterfacecommand{headerdistance}{distanceentête}
+\setinterfacecommand{headerheight}{hauteurentête}
\setinterfacecommand{headlevel}{niveautete}
\setinterfacecommand{headnumber}{numerotete}
-\setinterfacecommand{headsym}{headsym}
+\setinterfacecommand{headsym}{symtete}
\setinterfacecommand{headtext}{textetete}
-\setinterfacecommand{hideblocks}{cacheblocs}
-\setinterfacecommand{high}{haut}
-\setinterfacecommand{hl}{hl}
-\setinterfacecommand{immediatebetweenlist}{immediatebetweenlist}
-\setinterfacecommand{immediatetolist}{immediatetolist}
+\setinterfacecommand{heightspanningtext}{hauteurtextecouvrant}
+\setinterfacecommand{hideblocks}{cacherblocs}
+\setinterfacecommand{high}{exposant}
+\setinterfacecommand{hl}{lh}
+\setinterfacecommand{immediatebetweenlist}{immediatemententreliste}
+\setinterfacecommand{immediatetolist}{immediatementalister}
\setinterfacecommand{in}{dans}
-\setinterfacecommand{incrementnumber}{incrementenumero}
-\setinterfacecommand{indenting}{composeenalinea}
-\setinterfacecommand{inframed}{inframed}
-\setinterfacecommand{infull}{infull}
-\setinterfacecommand{ininner}{ininner}
+\setinterfacecommand{incrementnumber}{incrementernumero}
+\setinterfacecommand{indenting}{indentation}
+\setinterfacecommand{inframed}{dansencadre}
+\setinterfacecommand{infull}{encomplet}
+\setinterfacecommand{ininner}{dansinterieur}
\setinterfacecommand{inleft}{dansgauche}
\setinterfacecommand{inleftedge}{dansbordgauche}
\setinterfacecommand{inleftmargin}{dansmargegauche}
-\setinterfacecommand{inline}{alaligne}
+\setinterfacecommand{inline}{enligne}
\setinterfacecommand{inmargin}{dansmarge}
-\setinterfacecommand{inmframed}{inmframed}
-\setinterfacecommand{inneredgedistance}{inneredgedistance}
-\setinterfacecommand{inneredgewidth}{inneredgewidth}
-\setinterfacecommand{innermargindistance}{innermargindistance}
-\setinterfacecommand{innermarginwidth}{innermarginwidth}
+\setinterfacecommand{inmframed}{dansencadremath}
+\setinterfacecommand{inneredgedistance}{distancebordinterieur}
+\setinterfacecommand{inneredgewidth}{largeurbordinterieur}
+\setinterfacecommand{innermargindistance}{distancemargeinterieure}
+\setinterfacecommand{innermarginwidth}{largeurmargeinterieure}
\setinterfacecommand{inothermargin}{dansautremarge}
-\setinterfacecommand{inouter}{inouter}
+\setinterfacecommand{inouter}{dansexterieur}
\setinterfacecommand{inright}{dansdroite}
\setinterfacecommand{inrightedge}{dansborddroit}
\setinterfacecommand{inrightmargin}{dansmargedroite}
-\setinterfacecommand{installlanguage}{installelangue}
+\setinterfacecommand{installlanguage}{installerlangue}
\setinterfacecommand{interactionbar}{barreinteraction}
\setinterfacecommand{interactionbuttons}{boutonsinteraction}
\setinterfacecommand{interactionmenu}{menuinteraction}
-\setinterfacecommand{item}{element}
-\setinterfacecommand{items}{elements}
-\setinterfacecommand{its}{el}
-\setinterfacecommand{keepblocks}{gardeblocs}
+\setinterfacecommand{item}{élément}
+\setinterfacecommand{itemgroup}{groupedéléments}
+\setinterfacecommand{items}{éléments}
+\setinterfacecommand{itemtag}{étiquettedélément}
+\setinterfacecommand{its}{els}
+\setinterfacecommand{keepblocks}{conserverblocs}
+\setinterfacecommand{kerncharacters}{approchercaracteres}
\setinterfacecommand{label}{etiquette}
\setinterfacecommand{labels}{etiquettes}
-\setinterfacecommand{labeltext}{labeltexte}
+\setinterfacecommand{labeltext}{texteetiquette}
\setinterfacecommand{language}{langue}
+\setinterfacecommand{languageCharacters}{Caractereslangue}
+\setinterfacecommand{languagecharacters}{caractereslangue}
\setinterfacecommand{leftaligned}{aligneagauche}
+\setinterfacecommand{leftbottombox}{boitebasgauche}
\setinterfacecommand{leftedgedistance}{distancebordgauche}
\setinterfacecommand{leftedgewidth}{largeurbordgauche}
+\setinterfacecommand{leftline}{lignegauche}
\setinterfacecommand{leftmargindistance}{distancemargegauche}
\setinterfacecommand{leftmarginwidth}{largeurmargegauche}
\setinterfacecommand{leg}{leg}
-\setinterfacecommand{linecorrection}{linecorrection}
+\setinterfacecommand{linecorrection}{correctionligne}
+\setinterfacecommand{linenote}{notedeligne}
+\setinterfacecommand{linespanningtext}{largeurtextecouvrant}
\setinterfacecommand{linewidth}{largeurligne}
\setinterfacecommand{listheight}{hauteurliste}
-\setinterfacecommand{listlength}{llongueurliste}
-\setinterfacecommand{listsymbol}{listesymbole}
+\setinterfacecommand{listlength}{longueurtexte}
+\setinterfacecommand{listsymbol}{symboleliste}
\setinterfacecommand{listwidth}{largeurliste}
-\setinterfacecommand{localfootnotes}{localfootnotes}
-\setinterfacecommand{logfields}{logchamp}
-\setinterfacecommand{lohi}{baha}
-\setinterfacecommand{low}{bas}
+\setinterfacecommand{loadfontgoodies}{charerfriandisespolice}
+\setinterfacecommand{localfootnotes}{notesbdplocales}
+\setinterfacecommand{localnotes}{noteslocales}
+\setinterfacecommand{logfields}{logchamps}
+\setinterfacecommand{lohi}{inex}
+\setinterfacecommand{low}{indice}
\setinterfacecommand{macroname}{nommacro}
\setinterfacecommand{mainlanguage}{langueprincipale}
-\setinterfacecommand{makeupheight}{hauteurmakeup}
-\setinterfacecommand{makeupwidth}{largeurmakeup}
-\setinterfacecommand{mar}{mar}
-\setinterfacecommand{marginblock}{marginblock}
+\setinterfacecommand{makeupheight}{hauteurcomposition}
+\setinterfacecommand{makeupwidth}{largeurcomposition}
+\setinterfacecommand{mar}{rem}
+\setinterfacecommand{marginblock}{blocmarginal}
\setinterfacecommand{margindistance}{distancemarge}
-\setinterfacecommand{marginrule}{margereglee}
+\setinterfacecommand{marginrule}{traitmarge}
\setinterfacecommand{margintext}{textemarge}
\setinterfacecommand{margintitle}{titremarge}
\setinterfacecommand{marginwidth}{largeurmarge}
\setinterfacecommand{marginword}{motmarge}
\setinterfacecommand{marking}{marquage}
-\setinterfacecommand{markversion}{marquageversion}
-\setinterfacecommand{mathematics}{mathematique}
+\setinterfacecommand{markversion}{marquerversion}
+\setinterfacecommand{mathematics}{mathematics}
\setinterfacecommand{menubutton}{boutonmenu}
-\setinterfacecommand{mframed}{mframed}
+\setinterfacecommand{mframed}{encadremath}
\setinterfacecommand{midaligned}{aligneaumilieu}
-\setinterfacecommand{mirror}{reflete}
+\setinterfacecommand{mirror}{refleter}
\setinterfacecommand{month}{mois}
-\setinterfacecommand{moveformula}{deplaceformule}
-\setinterfacecommand{moveongrid}{deplacesurgrille}
-\setinterfacecommand{movesidefloat}{movesidefloat}
-\setinterfacecommand{navigating}{navigating}
+\setinterfacecommand{moveformula}{deplacerformule}
+\setinterfacecommand{moveongrid}{deplacersurgrille}
+\setinterfacecommand{movesidefloat}{deplacerflottantcote}
+\setinterfacecommand{navigating}{navigation}
\setinterfacecommand{nodimension}{sansdimension}
-\setinterfacecommand{noheaderandfooterlines}{sanslignesenteteetpdp}
-\setinterfacecommand{noindenting}{sansalinea}
+\setinterfacecommand{noheaderandfooterlines}{sansentêtenipdp}
+\setinterfacecommand{noindenting}{sansindentation}
+\setinterfacecommand{noitem}{sansélément}
\setinterfacecommand{nolist}{sansliste}
\setinterfacecommand{nomarking}{sansmarquage}
-\setinterfacecommand{nomoreblocks}{pasplusdeblocs}
-\setinterfacecommand{nomorefiles}{pasplusdefichiers}
-\setinterfacecommand{nop}{nop}
+\setinterfacecommand{nomoreblocks}{sansplusdeblocs}
+\setinterfacecommand{nomorefiles}{sansplusdefichiers}
+\setinterfacecommand{nop}{san}
\setinterfacecommand{nospace}{sansespace}
\setinterfacecommand{note}{note}
-\setinterfacecommand{notopandbottomlines}{sanslignessupetinf}
-\setinterfacecommand{notsmallcapped}{nocap}
+\setinterfacecommand{notesymbol}{symbolenote}
+\setinterfacecommand{notopandbottomlines}{sansligneshautetbas}
+\setinterfacecommand{notsmallcapped}{paspetitescaps}
\setinterfacecommand{nowhitespace}{sansespaceblanc}
\setinterfacecommand{numberofsubpages}{nombredesouspages}
\setinterfacecommand{numbers}{numeros}
-\setinterfacecommand{outeredgedistance}{outeredgedistance}
-\setinterfacecommand{outeredgewidth}{outeredgewidth}
-\setinterfacecommand{outermargindistance}{outermargindistance}
-\setinterfacecommand{outermarginwidth}{outermarginwidth}
-\setinterfacecommand{packed}{groupe}
+\setinterfacecommand{outeredgedistance}{distancebordexterieur}
+\setinterfacecommand{outeredgewidth}{largeurbordexterieur}
+\setinterfacecommand{outermargindistance}{distancemargeexterieure}
+\setinterfacecommand{outermarginwidth}{largeurmargeexterieure}
+\setinterfacecommand{packed}{sansespaceentreitem}
\setinterfacecommand{page}{page}
-\setinterfacecommand{pagedepth}{pagedepth}
+\setinterfacecommand{pagebreak}{sautdepage}
+\setinterfacecommand{pagedepth}{profondeurpage}
\setinterfacecommand{pagenumber}{numeropage}
-\setinterfacecommand{pageoffset}{pageoffset}
+\setinterfacecommand{pageoffset}{decalagepage}
\setinterfacecommand{pagereference}{referencepage}
\setinterfacecommand{paperheight}{hauteurpapier}
\setinterfacecommand{paperwidth}{largeurpapier}
\setinterfacecommand{periods}{periodes}
-\setinterfacecommand{placebookmarks}{placemarquespages}
-\setinterfacecommand{placecombinedlist}{placelisteinmbriquee}
-\setinterfacecommand{placefloat}{placeflottant}
-\setinterfacecommand{placefootnotes}{placenotespdp}
-\setinterfacecommand{placeformula}{placeformule}
-\setinterfacecommand{placeheadnumber}{placenumerotete}
-\setinterfacecommand{placeheadtext}{placetextetete}
-\setinterfacecommand{placelegend}{placelegende}
-\setinterfacecommand{placelist}{placeliste}
-\setinterfacecommand{placelistofsynonyms}{placelistofsynonyms}
-\setinterfacecommand{placelocalfootnotes}{placenotespdplocales}
-\setinterfacecommand{placelogos}{placelogos}
-\setinterfacecommand{placeongrid}{placesurgrille}
-\setinterfacecommand{placeontopofeachother}{placelesunsaudessusdesautres}
-\setinterfacecommand{placepagenumber}{placenumeropage}
-\setinterfacecommand{placerawlist}{placerawlist}
-\setinterfacecommand{placereferencelist}{placelistereference}
-\setinterfacecommand{placeregister}{placeregistre}
-\setinterfacecommand{placerule}{placeregle}
-\setinterfacecommand{placesidebyside}{placecoteacote}
-\setinterfacecommand{placesubformula}{placesousformule}
-\setinterfacecommand{placetextvariable}{placevariabletexte}
+\setinterfacecommand{placebookmarks}{placermarquepages}
+\setinterfacecommand{placecombinedlist}{placerlistecombinee}
+\setinterfacecommand{placefloat}{placerflottant}
+\setinterfacecommand{placefootnotes}{placernotesbdp}
+\setinterfacecommand{placeformula}{placerformule}
+\setinterfacecommand{placeheadnumber}{placernumerotete}
+\setinterfacecommand{placeheadtext}{placertextetete}
+\setinterfacecommand{placelegend}{placerlegende}
+\setinterfacecommand{placelist}{placerliste}
+\setinterfacecommand{placelistofsynonyms}{placerlistedesynonymes}
+\setinterfacecommand{placelocalfootnotes}{placernotesbdplocales}
+\setinterfacecommand{placelocalnotes}{placernoteslocales}
+\setinterfacecommand{placelogos}{placerlogo}
+\setinterfacecommand{placenamedfloat}{placerflottantnomme}
+\setinterfacecommand{placenotes}{placernotes}
+\setinterfacecommand{placeongrid}{placersurgrille}
+\setinterfacecommand{placeontopofeachother}{placerlunaudessusdelautre}
+\setinterfacecommand{placepagenumber}{placernumeropage}
+\setinterfacecommand{placerawlist}{placerlistebrute}
+\setinterfacecommand{placereferencelist}{placerlistereference}
+\setinterfacecommand{placeregister}{placerregistre}
+\setinterfacecommand{placerule}{placertrait}
+\setinterfacecommand{placesidebyside}{placercoteacote}
+\setinterfacecommand{placesubformula}{placersousformule}
+\setinterfacecommand{placetextvariable}{placervariabletexte}
\setinterfacecommand{position}{position}
-\setinterfacecommand{positiontext}{positionnetexte}
-\setinterfacecommand{printpaperheight}{hauteureditionpapier}
-\setinterfacecommand{printpaperwidth}{largeureditionpapier}
-\setinterfacecommand{processblocks}{traiteblocs}
-\setinterfacecommand{processpage}{traitepage}
+\setinterfacecommand{positiontext}{texteposition}
+\setinterfacecommand{postponenotes}{reporternotes}
+\setinterfacecommand{postponingnotes}{reportnotes}
+\setinterfacecommand{predefinedfont}{policepredefinie}
+\setinterfacecommand{predefinefont}{predéfinirpolice}
+\setinterfacecommand{presetdocument}{prereglerdocument}
+\setinterfacecommand{prettyprintbuffer}{imprimerjolimenttampon}
+\setinterfacecommand{preventmode}{empechermode}
+\setinterfacecommand{printpaperheight}{hauteurpapierimpression}
+\setinterfacecommand{printpaperwidth}{largeurpapierimpression}
+\setinterfacecommand{processblocks}{traiterblocs}
+\setinterfacecommand{processbodyfontenvironmentlist}{traiterlisteenvironnementpolicedecorps}
+\setinterfacecommand{processpage}{traiterpage}
\setinterfacecommand{product}{produit}
\setinterfacecommand{program}{programme}
\setinterfacecommand{project}{projet}
@@ -1679,339 +1782,443 @@
\setinterfacecommand{quotation}{citation}
\setinterfacecommand{quote}{citer}
\setinterfacecommand{ran}{ran}
-\setinterfacecommand{redo}{refait}
+\setinterfacecommand{redo}{refaire}
+\setinterfacecommand{redoconvertfont}{refaireconvertirpolice}
\setinterfacecommand{ref}{ref}
\setinterfacecommand{reference}{reference}
-\setinterfacecommand{referral}{recommandation}
-\setinterfacecommand{referraldate}{daterecommandation}
-\setinterfacecommand{referring}{faitreference}
-\setinterfacecommand{remark}{commentaire}
+\setinterfacecommand{referral}{redirection}
+\setinterfacecommand{referraldate}{dateredirection}
+\setinterfacecommand{referring}{fairereference}
+\setinterfacecommand{registerfontclass}{enregistrerclassepolice}
+\setinterfacecommand{registerhyphenationexception}{enregistrerexceptioncesure}
+\setinterfacecommand{registerhyphenationpattern}{enregistrermotifcesure}
+\setinterfacecommand{remark}{remarque}
+\setinterfacecommand{replacefeature}{remplacerfonctionnalite}
\setinterfacecommand{reset}{raz}
+\setinterfacecommand{resetandaddfeature}{razetajouterfonctionnalite}
+\setinterfacecommand{resetcharacteralign}{razalignercaractere}
+\setinterfacecommand{resetcharacterkerning}{razapprochecaracteres}
+\setinterfacecommand{resetcharacterspacing}{razespacementcaracteres}
+\setinterfacecommand{resetcharacterstripping}{razdemontagecaracteres}
+\setinterfacecommand{resetfeature}{razfonctionnalite}
+\setinterfacecommand{resetfontcolorsheme}{razthemecouleurpolice}
+\setinterfacecommand{resetfontfallback}{razpolicederepli}
+\setinterfacecommand{resetfontsolution}{zarsolutionpolice}
+\setinterfacecommand{resethyphenationfeatures}{razfonctionnalitescesure}
+\setinterfacecommand{resetlocalfloats}{razflottantslocaux}
\setinterfacecommand{resetmarking}{razmarquage}
+\setinterfacecommand{resetmode}{razmode}
\setinterfacecommand{resetnumber}{raznumero}
-\setinterfacecommand{resettext}{resettextcontent}
+\setinterfacecommand{resetpath}{razchemin}
+\setinterfacecommand{resetperiodkerning}{razapprochepoint}
+\setinterfacecommand{resetsystemmode}{razmodesysteme}
+\setinterfacecommand{resettextcontent}{raztexte}
+\setinterfacecommand{resetvisualizers}{razvisualisateurs}
+\setinterfacecommand{restoreglobalbodyfont}{restaurerpolicedecorpsglobale}
+\setinterfacecommand{retestfeature}{retesterfonctionnalite}
+\setinterfacecommand{revivefeature}{relancerfonctionnalite}
\setinterfacecommand{rightaligned}{aligneadroite}
+\setinterfacecommand{rightbottombox}{boitebasdroite}
\setinterfacecommand{rightedgedistance}{distanceborddroit}
\setinterfacecommand{rightedgewidth}{largeurborddroit}
+\setinterfacecommand{rightline}{lignedroite}
\setinterfacecommand{rightmargindistance}{distancemargedroite}
\setinterfacecommand{rightmarginwidth}{largeurmargedroite}
\setinterfacecommand{romannumerals}{chiffresromains}
-\setinterfacecommand{rotate}{oriente}
-\setinterfacecommand{savebuffer}{savebuffer}
-\setinterfacecommand{scale}{echelle}
+\setinterfacecommand{rotate}{tourner}
+\setinterfacecommand{savebuffer}{enregistrertampon}
+\setinterfacecommand{scale}{mettrealechelle}
\setinterfacecommand{screen}{ecran}
-\setinterfacecommand{selectblocks}{selectionneblocs}
-\setinterfacecommand{selectpaper}{selectionnepapier}
-\setinterfacecommand{selectversion}{selectionneversion}
-\setinterfacecommand{setnumber}{affectenumero}
-\setinterfacecommand{settextcontent}{settext}
-\setinterfacecommand{settextvariable}{affectevariabletexte}
-\setinterfacecommand{setupalign}{reglealignement}
-\setinterfacecommand{setupanswerarea}{setupanswerarea}
-\setinterfacecommand{setuparranging}{reglearrangement}
-\setinterfacecommand{setupbackground}{reglearriereplan}
-\setinterfacecommand{setupbackgrounds}{reglearriereplans}
-\setinterfacecommand{setupblackrules}{reglelignesnoires}
-\setinterfacecommand{setupblank}{definitvide}
-\setinterfacecommand{setupblock}{reglebloc}
-\setinterfacecommand{setupbodyfont}{reglepolicecorps}
-\setinterfacecommand{setupbodyfontenvironment}{regleenvironnementpolicecorps}
-\setinterfacecommand{setupbottom}{regleinf}
-\setinterfacecommand{setupbottomtexts}{regletextesinf}
-\setinterfacecommand{setupbuffer}{reglebuffer}
-\setinterfacecommand{setupbuttons}{regleboutons}
-\setinterfacecommand{setupcapitals}{reglecapitales}
-\setinterfacecommand{setupcaption}{regleintitule}
-\setinterfacecommand{setupcaptions}{regleintitules}
-\setinterfacecommand{setupclipping}{regleclipping}
-\setinterfacecommand{setupcolor}{reglecouleur}
-\setinterfacecommand{setupcolors}{reglecouleurs}
-\setinterfacecommand{setupcolumns}{reglecolonnes}
-\setinterfacecommand{setupcolumnset}{reglejeucolonne}
-\setinterfacecommand{setupcolumnsetlines}{setupcolumnsetlines}
-\setinterfacecommand{setupcolumnsetstart}{setupcolumnsetstart}
-\setinterfacecommand{setupcombinations}{reglecombinaisons}
-\setinterfacecommand{setupcombinedlist}{reglelisteimbriquee}
-\setinterfacecommand{setupcomment}{reglecommentaire}
-\setinterfacecommand{setupdescription}{setupdescription}
-\setinterfacecommand{setupdescriptions}{regledescriptions}
-\setinterfacecommand{setupenumeration}{setupenumeration}
-\setinterfacecommand{setupenumerations}{regleenumerations}
-\setinterfacecommand{setupexternalfigures}{reglefiguresexternes}
-\setinterfacecommand{setupfield}{reglechamp}
-\setinterfacecommand{setupfields}{reglechamps}
-\setinterfacecommand{setupfillinlines}{regleremplitligne}
-\setinterfacecommand{setupfillinrules}{regleremplitlignesreglees}
-\setinterfacecommand{setupfloat}{regleflottant}
-\setinterfacecommand{setupfloats}{regleflottants}
-\setinterfacecommand{setupfloatsplitting}{regleseparationflottant}
-\setinterfacecommand{setupfooter}{reglepdp}
-\setinterfacecommand{setupfootertexts}{regletextespdp}
-\setinterfacecommand{setupfootnotedefinition}{definitnotepdp}
-\setinterfacecommand{setupfootnotes}{reglenotepdp}
-\setinterfacecommand{setupforms}{regleformulaires}
-\setinterfacecommand{setupformula}{setupformula}
-\setinterfacecommand{setupformulas}{regleformules}
-\setinterfacecommand{setupframed}{regleencadre}
-\setinterfacecommand{setupframedtext}{setupframedtext}
-\setinterfacecommand{setupframedtexts}{setupframedtexts}
-\setinterfacecommand{setuphead}{regletete}
-\setinterfacecommand{setupheader}{regleentete}
-\setinterfacecommand{setupheadertexts}{regletextesentete}
-\setinterfacecommand{setupheadnumber}{reglenumerotete}
-\setinterfacecommand{setupheads}{regletetes}
-\setinterfacecommand{setupheadtext}{regletextetete}
-\setinterfacecommand{setuphyphenmark}{reglemarquagehyphenation}
-\setinterfacecommand{setupindentedtext}{setupindentedtext}
-\setinterfacecommand{setupindenting}{reglecomposeenalinea}
-\setinterfacecommand{setupinmargin}{regledansmarge}
-\setinterfacecommand{setupinteraction}{regleinteraction}
-\setinterfacecommand{setupinteractionbar}{reglebarreinteraction}
-\setinterfacecommand{setupinteractionmenu}{reglemenuinteraction}
-\setinterfacecommand{setupinteractionscreen}{regleecraninteraction}
-\setinterfacecommand{setupinterlinespace}{regleespacementinterligne}
-\setinterfacecommand{setupitemgroup}{setupitemgroup}
-\setinterfacecommand{setupitemgroups}{reglegroupeselements}
-\setinterfacecommand{setupitems}{regleelements}
-\setinterfacecommand{setuplabeltext}{reglelabeltexte}
-\setinterfacecommand{setuplanguage}{reglelangue}
-\setinterfacecommand{setuplayout}{regledisposition}
-\setinterfacecommand{setuplegend}{reglelegende}
-\setinterfacecommand{setuplinenumbering}{reglenumerotationligne}
-\setinterfacecommand{setuplines}{reglelignes}
-\setinterfacecommand{setuplinewidth}{regleepaisseurligne}
-\setinterfacecommand{setuplist}{regleliste}
-\setinterfacecommand{setupmakeup}{reglemakeup}
-\setinterfacecommand{setupmarginblock}{setupmarginblock}
-\setinterfacecommand{setupmarginblocks}{regleblocmarge}
-\setinterfacecommand{setupmargindata}{setupmargindata}
-\setinterfacecommand{setupmarginrules}{reglemargereglee}
-\setinterfacecommand{setupmarking}{reglemarquage}
-\setinterfacecommand{setupmathalignment}{setupmathalignment}
-\setinterfacecommand{setupnarrower}{reglecompoetroite}
-\setinterfacecommand{setupnumber}{reglenumero}
-\setinterfacecommand{setupnumbering}{reglenumerotation}
-\setinterfacecommand{setupoppositeplacing}{regleplacementopposition}
-\setinterfacecommand{setupoutput}{reglesortie}
-\setinterfacecommand{setuppagecomment}{reglecommentairepage}
-\setinterfacecommand{setuppagenumber}{reglenumeropage}
-\setinterfacecommand{setuppagenumbering}{reglenumerotationpage}
-\setinterfacecommand{setuppagetransitions}{regletransitionspage}
-\setinterfacecommand{setuppalet}{reglepalette}
-\setinterfacecommand{setuppaper}{reglepapier}
-\setinterfacecommand{setuppapersize}{regletaillepapier}
-\setinterfacecommand{setupparagraphnumbering}{reglenumerotationparagraphe}
-\setinterfacecommand{setupparagraphs}{regleparagraphes}
-\setinterfacecommand{setupplacement}{setupplacement}
-\setinterfacecommand{setuppositioning}{reglepositionnement}
-\setinterfacecommand{setupprofiles}{regleprofils}
-\setinterfacecommand{setupprograms}{regleprogrammes}
-\setinterfacecommand{setuppublications}{reglepublications}
-\setinterfacecommand{setupquote}{demarreciter}
-\setinterfacecommand{setupreferencelist}{reglelistereference}
-\setinterfacecommand{setupreferencing}{reglereferencage}
-\setinterfacecommand{setupregister}{regleregistre}
-\setinterfacecommand{setuprotate}{regleoriente}
-\setinterfacecommand{setuprule}{regleregle}
-\setinterfacecommand{setupscreens}{regleecrans}
-\setinterfacecommand{setupsection}{reglesection}
-\setinterfacecommand{setupsectionblock}{regleblocsection}
-\setinterfacecommand{setupsorting}{regletri}
-\setinterfacecommand{setupspacing}{regleespacement}
-\setinterfacecommand{setupstartstop}{regledemarrestoppe}
-\setinterfacecommand{setupstrut}{reglestrut}
-\setinterfacecommand{setupsubpagenumber}{reglesousnumeropage}
-\setinterfacecommand{setupsymbolset}{reglejeusymboles}
-\setinterfacecommand{setupsynchronization}{reglesynchronisation}
-\setinterfacecommand{setupsynchronizationbar}{reglebarresynchronisation}
-\setinterfacecommand{setupsynonyms}{reglesynonymes}
-\setinterfacecommand{setupsystem}{reglesysteme}
-\setinterfacecommand{setuptab}{regletab}
-\setinterfacecommand{setuptables}{regletableaux}
-\setinterfacecommand{setuptabulate}{regletabulation}
-\setinterfacecommand{setuptext}{regletexte}
-\setinterfacecommand{setuptextbackground}{setuptextbackground}
-\setinterfacecommand{setuptextposition}{reglepositiontexte}
-\setinterfacecommand{setuptextrules}{reglelignesreglestexte}
-\setinterfacecommand{setuptexttexts}{regletextestexte}
-\setinterfacecommand{setuptextvariable}{reglevariabletexte}
-\setinterfacecommand{setupthinrules}{regletraitsfins}
-\setinterfacecommand{setuptolerance}{regletolerance}
-\setinterfacecommand{setuptop}{reglesup}
-\setinterfacecommand{setuptoptexts}{regletextessup}
-\setinterfacecommand{setuptype}{regletype}
-\setinterfacecommand{setuptyping}{regledactylo}
-\setinterfacecommand{setupunderbar}{reglesouslignage}
-\setinterfacecommand{setupurl}{regleurl}
-\setinterfacecommand{setupversions}{regleversions}
-\setinterfacecommand{setupwhitespace}{regleespaceblanc}
-\setinterfacecommand{showbodyfont}{montrepolicecorps}
-\setinterfacecommand{showbodyfontenvironment}{montreenvironnementpolicecorps}
-\setinterfacecommand{showcolor}{montrecouleur}
-\setinterfacecommand{showcolorgroup}{montregroupecouleur}
-\setinterfacecommand{showexternalfigures}{montrefiguresexternes}
-\setinterfacecommand{showfields}{montrechamps}
-\setinterfacecommand{showframe}{montrecadre}
-\setinterfacecommand{showgrid}{montregrille}
-\setinterfacecommand{showlayout}{montredisposition}
-\setinterfacecommand{showmakeup}{montremakeup}
-\setinterfacecommand{showpalet}{montrepalette}
-\setinterfacecommand{showprint}{montreedition}
-\setinterfacecommand{showsetups}{montrereglages}
-\setinterfacecommand{showstruts}{montrestruts}
-\setinterfacecommand{showsymbolset}{montrejeusymboles}
-\setinterfacecommand{smallcapped}{cap}
+\setinterfacecommand{selectblocks}{selectionnerblocs}
+\setinterfacecommand{selectpaper}{selectionnerpapier}
+\setinterfacecommand{selectversion}{selectionnerversion}
+\setinterfacecommand{setbigbodyfont}{reglerpolicedecorpsimportante}
+\setinterfacecommand{setcharacteralign}{regleralignercaractere}
+\setinterfacecommand{setcharacteraligndetail}{reglerdetailalignercaractere}
+\setinterfacecommand{setcharactercasing}{reglercassecaracteres}
+\setinterfacecommand{setcharactercleaning}{reglernettoyagecaracteres}
+\setinterfacecommand{setcharacterkerning}{reglerapprochecaracteres}
+\setinterfacecommand{setcharacterspacing}{reglerespacementcaracteres}
+\setinterfacecommand{setcharacterstripping}{reglerdemontagecaracteres}
+\setinterfacecommand{setcurrentfontclass}{reglerclassepolicecourante}
+\setinterfacecommand{setfirstline}{reglerpremiereligne}
+\setinterfacecommand{setfirstpasscharacteralign}{regleralignercaracterepremierepasse}
+\setinterfacecommand{setfont}{reglerpolice}
+\setinterfacecommand{setfontcolorsheme}{reglerthemecouleurpolice}
+\setinterfacecommand{setfontfeature}{reglerfonctionnalitepolice}
+\setinterfacecommand{setfontsolution}{reglersolutionpolice}
+\setinterfacecommand{setfontstrut}{reglerentretoisepolice}
+\setinterfacecommand{sethyphenationfeatures}{reglerfonctionnalitescesure}
+\setinterfacecommand{setmainbodyfont}{reglerpolicedecorpsprincipale}
+\setinterfacecommand{setmode}{reglermode}
+\setinterfacecommand{setnote}{reglernote}
+\setinterfacecommand{setnotetext}{reglertextenote}
+\setinterfacecommand{setnumber}{reglernumero}
+\setinterfacecommand{setperiodkerning}{reglerapprochepoint}
+\setinterfacecommand{setsecondpasscharacteralign}{regleralignercaracteresecondepasse}
+\setinterfacecommand{setsmallbodyfont}{reglerpolicedecorpspetite}
+\setinterfacecommand{setsystemmode}{reglermodesysteme}
+\setinterfacecommand{settextcontent}{reglercontenutexte}
+\setinterfacecommand{settextvariable}{reglervariabletexte}
+\setinterfacecommand{setupalign}{configureraligner}
+\setinterfacecommand{setupanswerarea}{configurerzonereponse}
+\setinterfacecommand{setuparranging}{configurerarrangement}
+\setinterfacecommand{setupattachment}{configurepiecejointe}
+\setinterfacecommand{setupbackground}{configurerarriereplan}
+\setinterfacecommand{setupbackgrounds}{configurerarriereplans}
+\setinterfacecommand{setupblackrules}{configurertraitsepais}
+\setinterfacecommand{setupblank}{configurervierge}
+\setinterfacecommand{setupblock}{configurerbloc}
+\setinterfacecommand{setupbodyfont}{configurerpolicedecorps}
+\setinterfacecommand{setupbodyfontenvironment}{configurerenvironnementpolicedecorps}
+\setinterfacecommand{setupbottom}{configurerbas}
+\setinterfacecommand{setupbottomtexts}{configurertextesbas}
+\setinterfacecommand{setupbuffer}{configurertampon}
+\setinterfacecommand{setupbuttons}{configurerboutons}
+\setinterfacecommand{setupcapitals}{configurercapitales}
+\setinterfacecommand{setupcaption}{configurerintitule}
+\setinterfacecommand{setupcaptions}{configurerintitules}
+\setinterfacecommand{setupcharacteralign}{configureralignercaractere}
+\setinterfacecommand{setupcharacterkerning}{configurerapprochecaracteres}
+\setinterfacecommand{setupcharacterspacing}{configurerespacementcaracteres}
+\setinterfacecommand{setupclipping}{configurerdecoupage}
+\setinterfacecommand{setupcolor}{configurercouleur}
+\setinterfacecommand{setupcolors}{configurercouleurs}
+\setinterfacecommand{setupcolumns}{configurercolonnes}
+\setinterfacecommand{setupcolumnset}{configurerjeucolonnes}
+\setinterfacecommand{setupcolumnsetlines}{configurerlignesjeucolonnes}
+\setinterfacecommand{setupcolumnsetstart}{configurerfinjeucolonnes}
+\setinterfacecommand{setupcombinations}{configurercombinaisons}
+\setinterfacecommand{setupcombinedlist}{configurerlistecombinee}
+\setinterfacecommand{setupcomment}{configurercommentaire}
+\setinterfacecommand{setupcounter}{configurercompteur}
+\setinterfacecommand{setupdescription}{configurerdescription}
+\setinterfacecommand{setupdescriptions}{configurerdescriptions}
+\setinterfacecommand{setupenumeration}{configurerénumération}
+\setinterfacecommand{setupenumerations}{configurerénumérations}
+\setinterfacecommand{setupexternalfigures}{configurerfiguresexterne}
+\setinterfacecommand{setupfield}{configurerchamp}
+\setinterfacecommand{setupfields}{configurerchamps}
+\setinterfacecommand{setupfillinlines}{configurerlignesarenseigner}
+\setinterfacecommand{setupfillinrules}{configurertraitsarenseigner}
+\setinterfacecommand{setupfirstline}{configurerpremiereligne}
+\setinterfacecommand{setupfloat}{configurerflottant}
+\setinterfacecommand{setupfloats}{configurerflottants}
+\setinterfacecommand{setupfloatsplitting}{configurerpartageflottants}
+\setinterfacecommand{setupfontexpansion}{configurerexpansionpolice}
+\setinterfacecommand{setupfontprotrusion}{configurerprotrusionpolice}
+\setinterfacecommand{setupfonts}{configurerpolices}
+\setinterfacecommand{setupfontsolution}{configuresolutionpolice}
+\setinterfacecommand{setupfooter}{configurerpdp}
+\setinterfacecommand{setupfootertexts}{configurertextespdp}
+\setinterfacecommand{setupfootnotedefinition}{configurerdefinitionnotebdp}
+\setinterfacecommand{setupfootnotes}{configurernotesbdp}
+\setinterfacecommand{setupforms}{configurerformulaires}
+\setinterfacecommand{setupformula}{configurerformule}
+\setinterfacecommand{setupformulas}{configurerformules}
+\setinterfacecommand{setupframed}{configurerencadre}
+\setinterfacecommand{setupframedtext}{configurertexteencadre}
+\setinterfacecommand{setupframedtexts}{configurertextesencadres}
+\setinterfacecommand{setuphead}{configurertête}
+\setinterfacecommand{setupheader}{configurerentête}
+\setinterfacecommand{setupheadertexts}{configurertextesentête}
+\setinterfacecommand{setupheadnumber}{configurernumerotête}
+\setinterfacecommand{setupheads}{configurertêtes}
+\setinterfacecommand{setupheadtext}{configurertextêtete}
+\setinterfacecommand{setuphyphenation}{configurercesure}
+\setinterfacecommand{setuphyphenmark}{configurermarquecesure}
+\setinterfacecommand{setupindentedtext}{configurertexteindente}
+\setinterfacecommand{setupindenting}{configurerindentation}
+\setinterfacecommand{setupinmargin}{configurerdansmarge}
+\setinterfacecommand{setupinteraction}{configurerinteraction}
+\setinterfacecommand{setupinteractionbar}{configurerbarreinteraction}
+\setinterfacecommand{setupinteractionmenu}{configurermenuinteraction}
+\setinterfacecommand{setupinteractionscreen}{configurerecraninteraction}
+\setinterfacecommand{setupinterlinespace}{configurerespaceinterligne}
+\setinterfacecommand{setupitemgroup}{configurergroupedéléments}
+\setinterfacecommand{setupitemgroups}{configurergroupesdéléments}
+\setinterfacecommand{setupitems}{configureréléments}
+\setinterfacecommand{setuplabeltext}{configureretiquettetexte}
+\setinterfacecommand{setuplanguage}{configurerlangue}
+\setinterfacecommand{setuplayout}{configurermiseenpage}
+\setinterfacecommand{setuplegend}{configurerlegende}
+\setinterfacecommand{setuplinenote}{configurernotedeligne}
+\setinterfacecommand{setuplinenumbering}{configurernumérotationligne}
+\setinterfacecommand{setuplines}{configurerlignes}
+\setinterfacecommand{setuplinewidth}{configurerepaisseurtrait}
+\setinterfacecommand{setuplist}{configurerliste}
+\setinterfacecommand{setupmakeup}{configurercomposition}
+\setinterfacecommand{setupmarginblock}{configurerblocmarginal}
+\setinterfacecommand{setupmarginblocks}{configurerblocmarge}
+\setinterfacecommand{setupmargindata}{configurerdonneesmarginales}
+\setinterfacecommand{setupmarginrules}{configurertraitsmarge}
+\setinterfacecommand{setupmarking}{configurermarquage}
+\setinterfacecommand{setupmathalignment}{configureralignementmath}
+\setinterfacecommand{setupnarrower}{configurerplusetroit}
+\setinterfacecommand{setupnotation}{configurernotation}
+\setinterfacecommand{setupnotations}{configurernotations}
+\setinterfacecommand{setupnote}{configurenote}
+\setinterfacecommand{setupnotes}{configurenotes}
+\setinterfacecommand{setupnumber}{configurernumero}
+\setinterfacecommand{setupnumbering}{configurernumérotation}
+\setinterfacecommand{setupoppositeplacing}{configurerplacementopposition}
+\setinterfacecommand{setupoutput}{configurersortie}
+\setinterfacecommand{setuppagecomment}{configurercommentairepage}
+\setinterfacecommand{setuppagenumber}{configurernumeropage}
+\setinterfacecommand{setuppagenumbering}{configurernumérotationpage}
+\setinterfacecommand{setuppagetransitions}{configurertransitionpage}
+\setinterfacecommand{setuppalet}{configurerpalette}
+\setinterfacecommand{setuppaper}{configurerpapier}
+\setinterfacecommand{setuppapersize}{configurertaillepapier}
+\setinterfacecommand{setupparagraphnumbering}{configurernumérotationparagraphe}
+\setinterfacecommand{setupparagraphs}{configurerparagraphe}
+\setinterfacecommand{setupperiodkerning}{configurerapprochepoint}
+\setinterfacecommand{setupplacement}{configurerplacement}
+\setinterfacecommand{setuppositioning}{configurerpositionnement}
+\setinterfacecommand{setupprofiles}{configurerprofils}
+\setinterfacecommand{setupprograms}{configurerprogrammes}
+\setinterfacecommand{setuppublications}{configurerpublications}
+\setinterfacecommand{setupquote}{configurerciter}
+\setinterfacecommand{setupreferencelist}{configurerlistereference}
+\setinterfacecommand{setupreferencing}{configurerreferencement}
+\setinterfacecommand{setupregister}{configurerregistre}
+\setinterfacecommand{setuprotate}{configurerrotation}
+\setinterfacecommand{setuprule}{configurertrait}
+\setinterfacecommand{setupscreens}{configurerecran}
+\setinterfacecommand{setupsection}{configurersection}
+\setinterfacecommand{setupsectionblock}{configurerblocsection}
+\setinterfacecommand{setupsorting}{configurertri}
+\setinterfacecommand{setupspacing}{configurerespacement}
+\setinterfacecommand{setupstartstop}{configurerdébutfin}
+\setinterfacecommand{setupstrut}{configurerentretoise}
+\setinterfacecommand{setupsubpagenumber}{configurernumerosouspage}
+\setinterfacecommand{setupsymbolset}{configurerjeusymboles}
+\setinterfacecommand{setupsynchronization}{configurersynchronisation}
+\setinterfacecommand{setupsynchronizationbar}{configurerbarresynchronisation}
+\setinterfacecommand{setupsynonyms}{configurersynonymes}
+\setinterfacecommand{setupsystem}{configurersysteme}
+\setinterfacecommand{setuptab}{configurertab}
+\setinterfacecommand{setuptables}{configurertables}
+\setinterfacecommand{setuptabulate}{configurertabulation}
+\setinterfacecommand{setuptext}{configurertexte}
+\setinterfacecommand{setuptextbackground}{configurertextearriereplan}
+\setinterfacecommand{setuptextnote}{configurernotetexte}
+\setinterfacecommand{setuptextposition}{configurerpositiontexte}
+\setinterfacecommand{setuptextrules}{configurertextetraits}
+\setinterfacecommand{setuptexttexts}{configurertextestexte}
+\setinterfacecommand{setuptextvariable}{configurervariabletexte}
+\setinterfacecommand{setupthinrules}{configurertraitsfins}
+\setinterfacecommand{setuptolerance}{configurertolerance}
+\setinterfacecommand{setuptop}{configurerhaut}
+\setinterfacecommand{setuptoptexts}{configurertexteshaut}
+\setinterfacecommand{setuptype}{configurertranscrire}
+\setinterfacecommand{setuptyping}{configurertranscription}
+\setinterfacecommand{setupunderbar}{configurersouligner}
+\setinterfacecommand{setupurl}{configurerurl}
+\setinterfacecommand{setupversions}{configurerversions}
+\setinterfacecommand{setupwhitespace}{configurerespaceblanc}
+\setinterfacecommand{setvisualizerfont}{reglervisualisateurpolice}
+\setinterfacecommand{showbodyfont}{montrerpolicedecorps}
+\setinterfacecommand{showbodyfontenvironment}{montrerenvironnementpolicedecorps}
+\setinterfacecommand{showcolor}{montrercouleur}
+\setinterfacecommand{showcolorgroup}{montrergroupecouleur}
+\setinterfacecommand{showcounter}{montrercompteur}
+\setinterfacecommand{showexternalfigures}{montrerfiguresexternes}
+\setinterfacecommand{showfields}{montrerchamps}
+\setinterfacecommand{showfont}{montrerpolice}
+\setinterfacecommand{showfontdata}{montrerdonneespolice}
+\setinterfacecommand{showfontexpansion}{montrerexpansionpolice}
+\setinterfacecommand{showfontitalics}{montreritaliquespolice}
+\setinterfacecommand{showfontkerns}{montrerlesapproches}
+\setinterfacecommand{showfontparameters}{montrerparametrespolice}
+\setinterfacecommand{showfontstrip}{montrervisuellementpolice}
+\setinterfacecommand{showfontstyle}{montrerstylepolice}
+\setinterfacecommand{showframe}{montrermiseenpage}
+\setinterfacecommand{showgrid}{montrergrille}
+\setinterfacecommand{showhyphenationtrace}{montrertracecesure}
+\setinterfacecommand{showkerning}{montrerapproche}
+\setinterfacecommand{showlayout}{montrermiseenpage}
+\setinterfacecommand{showmakeup}{montrercomposition}
+\setinterfacecommand{showminimalbaseline}{montrerlignedebase}
+\setinterfacecommand{showpalet}{montrerpalette}
+\setinterfacecommand{showprint}{montrerimpression}
+\setinterfacecommand{showsetups}{montrerconfigurations}
+\setinterfacecommand{showstruts}{montrerentretoises}
+\setinterfacecommand{showsymbolset}{montrerjeusymboles}
+\setinterfacecommand{smallcapped}{petitescap}
\setinterfacecommand{someline}{uneligne}
\setinterfacecommand{somewhere}{qqpart}
\setinterfacecommand{space}{espace}
-\setinterfacecommand{splitfloat}{separeflottant}
-\setinterfacecommand{startalignment}{demarrealignement}
-\setinterfacecommand{startbackground}{demarrearriereplan}
-\setinterfacecommand{startcoding}{demarrecodage}
-\setinterfacecommand{startcolor}{demarrecouleur}
-\setinterfacecommand{startcolumnmakeup}{startcolumnmakeup}
-\setinterfacecommand{startcolumns}{demarrecolonnes}
-\setinterfacecommand{startcolumnset}{demarrejeucolonne}
-\setinterfacecommand{startcombination}{demarrecombinaison}
-\setinterfacecommand{startcomponent}{demarrecomposant}
-\setinterfacecommand{startdocument}{demarredocument}
-\setinterfacecommand{startenvironment}{demarreenvironement}
-\setinterfacecommand{startfigure}{demarrefigure}
-\setinterfacecommand{startframed}{startframed}
-\setinterfacecommand{startglobal}{demarreglobal}
-\setinterfacecommand{startline}{demarreligne}
-\setinterfacecommand{startlinecorrection}{demarrecorrectionligne}
-\setinterfacecommand{startlinenumbering}{demarrenumerotationligne}
-\setinterfacecommand{startlines}{demarrelignes}
-\setinterfacecommand{startlocal}{demarrelocal}
-\setinterfacecommand{startlocalfootnotes}{demarrenotespdplocales}
-\setinterfacecommand{startmakeup}{demarremakeup}
-\setinterfacecommand{startmarginblock}{demarreblocmarge}
-\setinterfacecommand{startmarginrule}{demarremargereglee}
-\setinterfacecommand{startnarrower}{demarrecompoetroite}
-\setinterfacecommand{startopposite}{demarreopposition}
-\setinterfacecommand{startoverlay}{demarrerevetement}
-\setinterfacecommand{startoverzicht}{demarrevuedensemble}
-\setinterfacecommand{startpacked}{demarregroupe}
-\setinterfacecommand{startpositioning}{demarrepositionnement}
-\setinterfacecommand{startproduct}{demarreproduit}
-\setinterfacecommand{startprofile}{demarreprofil}
-\setinterfacecommand{startproject}{demarreprojet}
-\setinterfacecommand{startquotation}{demarrecitation}
-\setinterfacecommand{startraster}{demarreraster}
-\setinterfacecommand{startsymbolset}{demarrejeusymboles}
-\setinterfacecommand{startsynchronization}{demarresynchronisation}
-\setinterfacecommand{starttable}{demarretableau}
-\setinterfacecommand{starttables}{demarretableaux}
-\setinterfacecommand{starttext}{demarretexte}
-\setinterfacecommand{starttextbackground}{starttextbackground}
-\setinterfacecommand{starttextrule}{demarreligneregleetexte}
-\setinterfacecommand{startunpacked}{demarredegroupe}
-\setinterfacecommand{startversion}{demarreversion}
-\setinterfacecommand{stopalignment}{stoppealignement}
-\setinterfacecommand{stopbackground}{stoppearriereplan}
-\setinterfacecommand{stopcoding}{stoppecodage}
-\setinterfacecommand{stopcolor}{stoppecouleur}
-\setinterfacecommand{stopcolumnmakeup}{stopcolumnmakeup}
-\setinterfacecommand{stopcolumns}{stoppecolonnes}
-\setinterfacecommand{stopcolumnset}{stoppejeucolonne}
-\setinterfacecommand{stopcombination}{stoppecombinaison}
-\setinterfacecommand{stopcomponent}{stoppecomposant}
-\setinterfacecommand{stopdocument}{stoppedocument}
-\setinterfacecommand{stopenvironment}{stoppeenvironement}
-\setinterfacecommand{stopframed}{stopframed}
-\setinterfacecommand{stopglobal}{stoppeglobal}
-\setinterfacecommand{stopline}{stoppeligne}
-\setinterfacecommand{stoplinecorrection}{stoppecorrectionligne}
-\setinterfacecommand{stoplinenumbering}{stoppenumerotationligne}
-\setinterfacecommand{stoplines}{stoppelignes}
-\setinterfacecommand{stoplocal}{stoppelocal}
-\setinterfacecommand{stoplocalfootnotes}{stoppenotespdplocales}
-\setinterfacecommand{stopmakeup}{stoppemakeup}
-\setinterfacecommand{stopmarginblock}{stoppeblocmarge}
-\setinterfacecommand{stopmarginrule}{stoppemargereglee}
-\setinterfacecommand{stopnarrower}{stopcompoetroite}
-\setinterfacecommand{stopopposite}{stoppeopposition}
-\setinterfacecommand{stopoverlay}{stopperevetement}
-\setinterfacecommand{stopoverzicht}{stoppevuedensemble}
-\setinterfacecommand{stoppacked}{stoppegroupe}
-\setinterfacecommand{stoppositioning}{stoppepositionnement}
-\setinterfacecommand{stopproduct}{stoppeproduit}
-\setinterfacecommand{stopprofile}{stoppeprofil}
-\setinterfacecommand{stopproject}{stoppeprojet}
-\setinterfacecommand{stopquotation}{stoppecitation}
-\setinterfacecommand{stopraster}{stopperaster}
-\setinterfacecommand{stopsynchronization}{stoppesynchronisation}
-\setinterfacecommand{stoptable}{stoppetableau}
-\setinterfacecommand{stoptables}{stoppetableaux}
-\setinterfacecommand{stoptext}{stoppetexte}
-\setinterfacecommand{stoptextbackground}{stoptextbackground}
-\setinterfacecommand{stoptextrule}{stoppeligneregleetexte}
-\setinterfacecommand{stopunpacked}{stoppedegroupe}
-\setinterfacecommand{stopversion}{stoppeversion}
+\setinterfacecommand{specialitem}{élémentspécial}
+\setinterfacecommand{splitfloat}{flottantpartage}
+\setinterfacecommand{startalignment}{débutalignement}
+\setinterfacecommand{startbackground}{débutarriereplan}
+\setinterfacecommand{startcoding}{débutcodage}
+\setinterfacecommand{startcolor}{débutcouleur}
+\setinterfacecommand{startcolumnmakeup}{débutcompositioncolonne}
+\setinterfacecommand{startcolumns}{débutcolonnes}
+\setinterfacecommand{startcolumnset}{débutjeucolonnes}
+\setinterfacecommand{startcombination}{débutcombinaison}
+\setinterfacecommand{startcomponent}{débutcomposant}
+\setinterfacecommand{startdocument}{débutdocument}
+\setinterfacecommand{startenvironment}{débutenvironnement}
+\setinterfacecommand{startfigure}{débutfigure}
+\setinterfacecommand{startframed}{débutencadre}
+\setinterfacecommand{startglobal}{débutglobal}
+\setinterfacecommand{startline}{débutligneref}
+\setinterfacecommand{startlinecorrection}{débutcorrectionligne}
+\setinterfacecommand{startlinenote}{débutnotedeligne}
+\setinterfacecommand{startlinenumbering}{débutnumérotationligne}
+\setinterfacecommand{startlines}{débutlignes}
+\setinterfacecommand{startlocal}{débutlocal}
+\setinterfacecommand{startlocalfootnotes}{débutnotesbdplocal}
+\setinterfacecommand{startmakeup}{débutcomposition}
+\setinterfacecommand{startmarginblock}{débutblocmarge}
+\setinterfacecommand{startmarginrule}{débuttraitmarge}
+\setinterfacecommand{startnarrower}{débutplusetroit}
+\setinterfacecommand{startopposite}{débutopposition}
+\setinterfacecommand{startoverlay}{débutsuperposition}
+\setinterfacecommand{startoverview}{débutvuedensemble}
+\setinterfacecommand{startpacked}{débutemballage}
+\setinterfacecommand{startpositioning}{débutpositionnement}
+\setinterfacecommand{startproduct}{débutproduit}
+\setinterfacecommand{startprofile}{débutprofil}
+\setinterfacecommand{startproject}{débutprojet}
+\setinterfacecommand{startquotation}{débutcitation}
+\setinterfacecommand{startraster}{débutraster}
+\setinterfacecommand{startsymbolset}{débutjeusymboles}
+\setinterfacecommand{startsynchronization}{débutsynchronisation}
+\setinterfacecommand{starttable}{débuttable}
+\setinterfacecommand{starttables}{débuttables}
+\setinterfacecommand{starttext}{débuttexte}
+\setinterfacecommand{starttextbackground}{débuttextearriereplan}
+\setinterfacecommand{starttextrule}{débuttextetrait}
+\setinterfacecommand{startunpacked}{débutdesemballage}
+\setinterfacecommand{startversion}{débutversion}
+\setinterfacecommand{stopalignment}{finalignement}
+\setinterfacecommand{stopbackground}{finarriereplan}
+\setinterfacecommand{stopcoding}{fincodage}
+\setinterfacecommand{stopcolor}{fincouleur}
+\setinterfacecommand{stopcolumnmakeup}{fincompositioncolonne}
+\setinterfacecommand{stopcolumns}{fincolonnes}
+\setinterfacecommand{stopcolumnset}{finjeucolonnes}
+\setinterfacecommand{stopcombination}{fincombinaison}
+\setinterfacecommand{stopcomponent}{fincomposant}
+\setinterfacecommand{stopdocument}{findocument}
+\setinterfacecommand{stopenvironment}{finenvironnement}
+\setinterfacecommand{stopframed}{finencadre}
+\setinterfacecommand{stopglobal}{finglobal}
+\setinterfacecommand{stopline}{finligneref}
+\setinterfacecommand{stoplinecorrection}{fincorrectionligne}
+\setinterfacecommand{stoplinenote}{finnotedeligne}
+\setinterfacecommand{stoplinenumbering}{finnumérotationligne}
+\setinterfacecommand{stoplines}{finlignes}
+\setinterfacecommand{stoplocal}{finlocal}
+\setinterfacecommand{stoplocalfootnotes}{finnotesbdplocal}
+\setinterfacecommand{stopmakeup}{fincomposition}
+\setinterfacecommand{stopmarginblock}{finblocmarge}
+\setinterfacecommand{stopmarginrule}{fintraitmarge}
+\setinterfacecommand{stopnarrower}{finplusetroit}
+\setinterfacecommand{stopopposite}{finopposition}
+\setinterfacecommand{stopoverlay}{finsuperposition}
+\setinterfacecommand{stopoverview}{finvuedensemble}
+\setinterfacecommand{stoppacked}{finemballage}
+\setinterfacecommand{stoppositioning}{finpositionnement}
+\setinterfacecommand{stopproduct}{finproduit}
+\setinterfacecommand{stopprofile}{finprofil}
+\setinterfacecommand{stopproject}{finprojet}
+\setinterfacecommand{stopquotation}{fincitation}
+\setinterfacecommand{stopraster}{finraster}
+\setinterfacecommand{stopsynchronization}{finsynchronisation}
+\setinterfacecommand{stoptable}{fintable}
+\setinterfacecommand{stoptables}{fintables}
+\setinterfacecommand{stoptext}{fintexte}
+\setinterfacecommand{stoptextbackground}{fintextearriereplan}
+\setinterfacecommand{stoptextrule}{fintextetrait}
+\setinterfacecommand{stopunpacked}{findesemballage}
+\setinterfacecommand{stopversion}{finversion}
\setinterfacecommand{stretched}{etire}
+\setinterfacecommand{strictinspectnextcharacter}{inspecterstrictementcaracteresuivant}
+\setinterfacecommand{stripcharacter}{demontercaractere}
\setinterfacecommand{subformulanumber}{numerosousformule}
-\setinterfacecommand{subpagenumber}{sousnumeropage}
-\setinterfacecommand{switchtobodyfont}{changepolicecorps}
-\setinterfacecommand{switchtorawfont}{changepolicebrute}
+\setinterfacecommand{subpagenumber}{numerosouspage}
+\setinterfacecommand{subtractfeature}{enleverfonctionnalite}
+\setinterfacecommand{switchtobodyfont}{passerapolicedecorps}
+\setinterfacecommand{switchtorawfont}{passerapolicebrute}
\setinterfacecommand{sym}{sym}
\setinterfacecommand{symbol}{symbole}
-\setinterfacecommand{symoffset}{symoffset}
+\setinterfacecommand{symoffset}{decalagesym}
\setinterfacecommand{synchronizationbar}{barresynchronisation}
-\setinterfacecommand{synchronize}{synchronise}
+\setinterfacecommand{synchronize}{synchroniser}
\setinterfacecommand{tab}{tab}
-\setinterfacecommand{testcolumn}{testcolumn}
+\setinterfacecommand{testcolumn}{testcolonne}
+\setinterfacecommand{testfeature}{testerfonctionnalite}
+\setinterfacecommand{testfeatureonce}{testerfonctionnaliteunfois}
\setinterfacecommand{testpage}{testpage}
\setinterfacecommand{tex}{tex}
-\setinterfacecommand{textbackground}{textbackground}
+\setinterfacecommand{textbackground}{textearriereplan}
+\setinterfacecommand{textcolor}{textecouleura}
\setinterfacecommand{textheight}{hauteurtexte}
+\setinterfacecommand{textnote}{notetexte}
\setinterfacecommand{textreference}{referencetexte}
-\setinterfacecommand{textrule}{ligneregleetexte}
+\setinterfacecommand{textrule}{traittexte}
\setinterfacecommand{textvariable}{variabletexte}
\setinterfacecommand{textwidth}{largeurtexte}
+\setinterfacecommand{thefirstcharacter}{lepremiercaractere}
+\setinterfacecommand{thenormalizedbodyfontsize}{lataillenormaliseepolicedecorps}
+\setinterfacecommand{theremainingcharacters}{lescaracteresrestants}
\setinterfacecommand{thinrule}{traitfin}
\setinterfacecommand{thinrules}{traitsfins}
-\setinterfacecommand{tooltip}{suggestion}
-\setinterfacecommand{topdistance}{distancesup}
-\setinterfacecommand{topheight}{hauteursup}
-\setinterfacecommand{topspace}{espacesup}
+\setinterfacecommand{tolinenote}{alanotedeligne}
+\setinterfacecommand{tooltip}{infobulle}
+\setinterfacecommand{topdistance}{distancehaut}
+\setinterfacecommand{topheight}{hauteurhaut}
+\setinterfacecommand{topspace}{espacehaut}
\setinterfacecommand{totalnumberofpages}{nombretotaldepages}
\setinterfacecommand{translate}{traduire}
\setinterfacecommand{txt}{txt}
-\setinterfacecommand{typ}{typ}
-\setinterfacecommand{type}{dactylographier}
-\setinterfacecommand{typebuffer}{tapebuffer}
-\setinterfacecommand{typefile}{fichierdactylo}
-\setinterfacecommand{unitmeaning}{sensunite}
+\setinterfacecommand{typ}{transcrireaveccesure}
+\setinterfacecommand{type}{transcrire}
+\setinterfacecommand{typebuffer}{transcriretampon}
+\setinterfacecommand{typedefinedbuffer}{transcriretampondefini}
+\setinterfacecommand{typefile}{transcrirefichier}
+\setinterfacecommand{typeinlinebuffer}{transcriretamponenligne}
+\setinterfacecommand{typing}{transcription}
+\setinterfacecommand{unitmeaning}{significationunite}
\setinterfacecommand{unknown}{inconnu}
-\setinterfacecommand{useJSscripts}{utiliseJSscripts}
-\setinterfacecommand{useURL}{utiliseURL}
-\setinterfacecommand{useXMLfilter}{useXMLfilter}
-\setinterfacecommand{useblocks}{utiliseblocs}
-\setinterfacecommand{usecommands}{utilisecommandes}
-\setinterfacecommand{useencoding}{utiliseencodage}
-\setinterfacecommand{useexternaldocument}{utilisedocumentexterne}
-\setinterfacecommand{useexternalfigure}{utilisefigureexterne}
-\setinterfacecommand{useexternalfile}{utilisefichierexterne}
-\setinterfacecommand{useexternalfiles}{utilisefichiersexternes}
-\setinterfacecommand{useexternalsoundtrack}{utilisepsiteaudioexterne}
-\setinterfacecommand{usemodule}{utilisemodule}
-\setinterfacecommand{usemodules}{utilisemodules}
-\setinterfacecommand{usepath}{utilisechemin}
-\setinterfacecommand{usereferences}{utilisereferences}
-\setinterfacecommand{usespecials}{utilisespecialites}
-\setinterfacecommand{usesymbols}{utilisesymboles}
-\setinterfacecommand{usetypescript}{usetypescript}
-\setinterfacecommand{usetypescriptfile}{usetypescriptfile}
-\setinterfacecommand{useurl}{utiliseurl}
+\setinterfacecommand{unregisterhyphenationpattern}{desenregistrermotifcesure}
+\setinterfacecommand{useJSscripts}{utiliserJSscript}
+\setinterfacecommand{useURL}{utiliserURL}
+\setinterfacecommand{useXMLfilter}{utiliserfiltreXML}
+\setinterfacecommand{useblocks}{utiliserblocs}
+\setinterfacecommand{usebodyfont}{utiliserpolicedecorps}
+\setinterfacecommand{usebodyfontparameter}{utiliserparametrepolicedecorps}
+\setinterfacecommand{usecommands}{utilisercommandes}
+\setinterfacecommand{useencoding}{utilisercodage}
+\setinterfacecommand{useexternaldocument}{utiliserdocumentexterne}
+\setinterfacecommand{useexternalfigure}{utiliserfigureexterne}
+\setinterfacecommand{useexternalfile}{utiliserfichierexterne}
+\setinterfacecommand{useexternalfiles}{utiliserfichiersexternes}
+\setinterfacecommand{useexternalsoundtrack}{utilisersonexterne}
+\setinterfacecommand{usemodule}{utilisermodule}
+\setinterfacecommand{usemodules}{utilisermodules}
+\setinterfacecommand{usepath}{utiliserchemin}
+\setinterfacecommand{usereferences}{utiliserreferences}
+\setinterfacecommand{usespecials}{utiliserspeciaux}
+\setinterfacecommand{usesymbols}{utilisersymboles}
+\setinterfacecommand{usetypescript}{utiliserscriptdepolices}
+\setinterfacecommand{usetypescriptfile}{utiliserfichierscriptdepolices}
+\setinterfacecommand{useurl}{utiliserurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{version}
-\setinterfacecommand{vl}{vl}
+\setinterfacecommand{vl}{lv}
\setinterfacecommand{weekday}{joursemaine}
\setinterfacecommand{whitespace}{espaceblanc}
-\setinterfacecommand{wordright}{motdroit}
-\setinterfacecommand{writebetweenlist}{ecritentreliste}
-\setinterfacecommand{writetolist}{ecritdansliste}
-\setinterfacecommand{writetoreferencelist}{ecritdanslistereference}
-\setinterfacecommand{writetoregister}{ecritregistre}
+\setinterfacecommand{widthspanningtext}{largeurtextecouvrant}
+\setinterfacecommand{wordright}{ecrireadroite}
+\setinterfacecommand{writebetweenlist}{ecrireentreliste}
+\setinterfacecommand{writetolist}{ecriredansliste}
+\setinterfacecommand{writetoreferencelist}{ecriredanslistereference}
+\setinterfacecommand{writetoregister}{ecriredansregistre}
%
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-it.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-it.mkii
index 1d2425c9a6a..4a4676f6892 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-it.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-it.mkii
@@ -128,6 +128,9 @@
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{maiuscolo}
+\setinterfacevariable{category}{category}
+\setinterfacevariable{cd:character}{cd:character}
+\setinterfacevariable{cd:font}{cd:font}
\setinterfacevariable{center}{center}
\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{capitolo}
@@ -186,6 +189,7 @@
\setinterfacevariable{external}{esterno}
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fatto}
+\setinterfacevariable{fallback}{fallback}
\setinterfacevariable{february}{febbraio}
\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{figura}
@@ -207,6 +211,7 @@
\setinterfacevariable{flushouter}{flushouter}
\setinterfacevariable{flushright}{flushright}
\setinterfacevariable{followingpage}{followingpage}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{piedipagina}
\setinterfacevariable{footnote}{notapdp}
\setinterfacevariable{force}{forza}
@@ -278,6 +283,7 @@
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intesto}
\setinterfacevariable{intro}{intro}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{corsivo}
\setinterfacevariable{italicbold}{corsivograssetto}
\setinterfacevariable{item}{elemento}
@@ -381,6 +387,7 @@
\setinterfacevariable{nonumber}{nonumber}
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normale}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{nostopper}{nostopper}
\setinterfacevariable{not}{non}
@@ -448,6 +455,7 @@
\setinterfacevariable{rectangular}{rettangolare}
\setinterfacevariable{reference}{riferimento}
\setinterfacevariable{referral}{referral}
+\setinterfacevariable{region}{region}
\setinterfacevariable{register}{registro}
\setinterfacevariable{regular}{regolare}
\setinterfacevariable{relative}{relativo}
@@ -629,6 +637,7 @@
\setinterfaceconstant{afterkey}{dopotasto}
\setinterfaceconstant{aftersection}{aftersection}
\setinterfaceconstant{align}{allinea}
+\setinterfaceconstant{alignbottom}{alignbottom}
\setinterfaceconstant{aligncharacter}{allineacarattere}
\setinterfaceconstant{alignmentcharacter}{carattereallineamento}
\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
@@ -765,6 +774,9 @@
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
\setinterfaceconstant{default}{implicito}
+\setinterfaceconstant{defaultheight}{defaultheight}
+\setinterfaceconstant{defaultwidth}{defaultwidth}
+\setinterfaceconstant{define}{define}
\setinterfaceconstant{delay}{attesa}
\setinterfaceconstant{depth}{profondita}
\setinterfaceconstant{depthcorrection}{correzioneprofondita}
@@ -804,8 +816,10 @@
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{fattore}
\setinterfaceconstant{fallback}{fallback}
+\setinterfaceconstant{fallbacks}{fallbacks}
\setinterfaceconstant{family}{famiglia}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{featureset}{featureset}
\setinterfaceconstant{fences}{fences}
\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{coloresfondocampo}
@@ -826,6 +840,7 @@
\setinterfaceconstant{focusin}{focusin}
\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{piedipagina}
\setinterfaceconstant{footerdistance}{distanzapdp}
\setinterfaceconstant{footerstate}{statopdp}
@@ -880,6 +895,7 @@
\setinterfaceconstant{increment}{incremento}
\setinterfaceconstant{incrementnumber}{incrementanumero}
\setinterfaceconstant{indenting}{rientro}
+\setinterfaceconstant{indentlist}{indentlist}
\setinterfaceconstant{indentnext}{rientrasuccessivo}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicatore}
@@ -907,7 +923,10 @@
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{parolachiave}
\setinterfaceconstant{label}{etichetta}
+\setinterfaceconstant{labelalternative}{labelalternative}
+\setinterfaceconstant{labelcolor}{labelcolor}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{labelstyle}{labelstyle}
\setinterfaceconstant{language}{language}
\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
@@ -941,6 +960,7 @@
\setinterfaceconstant{limittext}{limittext}
\setinterfaceconstant{line}{riga}
\setinterfaceconstant{linecorrection}{correzioneriga}
+\setinterfaceconstant{linedirection}{linedirection}
\setinterfaceconstant{lines}{righe}
\setinterfaceconstant{list}{elenco}
\setinterfaceconstant{listtext}{listtext}
@@ -1081,6 +1101,7 @@
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{metti}
\setinterfaceconstant{placehead}{mettitesta}
+\setinterfaceconstant{placeholder}{placeholder}
\setinterfaceconstant{placestopper}{mettistopper}
\setinterfaceconstant{position}{posizione}
\setinterfaceconstant{prefix}{prefisso}
@@ -1099,6 +1120,7 @@
\setinterfaceconstant{print}{print}
\setinterfaceconstant{printable}{stampabile}
\setinterfaceconstant{process}{process}
+\setinterfaceconstant{processors}{processors}
\setinterfaceconstant{profile}{profile}
\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
@@ -1112,6 +1134,7 @@
\setinterfaceconstant{reference}{riferimento}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{referencing}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{entraregione}
@@ -1350,7 +1373,6 @@
\setinterfaceelement{type}{type}
% definitions for interface commands for language it
%
-\setinterfacecommand{CAPPED}{CAP}
\setinterfacecommand{Character}{Lettera}
\setinterfacecommand{Characters}{Lettere}
\setinterfacecommand{MONTH}{MESE}
@@ -1364,8 +1386,18 @@
\setinterfacecommand{Word}{Parola}
\setinterfacecommand{Words}{Parole}
\setinterfacecommand{about}{intorno}
+\setinterfacecommand{adaptfontfeature}{adaptfontfeature}
\setinterfacecommand{adaptlayout}{adattalayout}
+\setinterfacecommand{addfeature}{addfeature}
+\setinterfacecommand{alignbottom}{alignbottom}
+\setinterfacecommand{aligned}{aligned}
+\setinterfacecommand{alignedbox}{alignedbox}
+\setinterfacecommand{alignedline}{alignedline}
+\setinterfacecommand{alignhere}{alignhere}
\setinterfacecommand{alignment}{alignment}
+\setinterfacecommand{alignmentcharacter}{alignmentcharacter}
+\setinterfacecommand{applytocharacters}{applytocharacters}
+\setinterfacecommand{applytofirstcharacter}{applytofirstcharacter}
\setinterfacecommand{arg}{arg}
\setinterfacecommand{at}{al}
\setinterfacecommand{atleftmargin}{atleftmargin}
@@ -1377,9 +1409,13 @@
\setinterfacecommand{blackrules}{lineenere}
\setinterfacecommand{blank}{rigovuoto}
\setinterfacecommand{bookmark}{segnalibro}
+\setinterfacecommand{bottombox}{bottombox}
\setinterfacecommand{bottomdistance}{distanzafondo}
\setinterfacecommand{bottomheight}{altezzafondo}
+\setinterfacecommand{bottomleftbox}{bottomleftbox}
+\setinterfacecommand{bottomrightbox}{bottomrightbox}
\setinterfacecommand{bottomspace}{spaziofondo}
+\setinterfacecommand{buildtextbottomdot}{buildtextbottomdot}
\setinterfacecommand{but}{fondo}
\setinterfacecommand{button}{pulsante}
\setinterfacecommand{bypassblocks}{saltablocchi}
@@ -1418,8 +1454,11 @@
\setinterfacecommand{defineblock}{definisciblocco}
\setinterfacecommand{definebodyfont}{definiscifontdeltesto}
\setinterfacecommand{definebodyfontenvironment}{definisciambientefontdeltesto}
+\setinterfacecommand{definebodyfontswitch}{definebodyfontswitch}
\setinterfacecommand{definebuffer}{definiscibuffer}
\setinterfacecommand{definecharacter}{definiscicarattere}
+\setinterfacecommand{definecharacterkerning}{definecharacterkerning}
+\setinterfacecommand{definecharacterspacing}{definecharacterspacing}
\setinterfacecommand{definecolor}{definiscicolore}
\setinterfacecommand{definecolorgroup}{definiscigruppocolori}
\setinterfacecommand{definecolumnbreak}{definecolumnbreak}
@@ -1429,37 +1468,57 @@
\setinterfacecommand{definecommand}{definiscicomando}
\setinterfacecommand{defineconversion}{definisciconversione}
\setinterfacecommand{definedescription}{definiscidescrizione}
+\setinterfacecommand{definedfont}{definedfont}
\setinterfacecommand{defineenumeration}{definiscienumerazione}
+\setinterfacecommand{definefallbackfamily}{definefallbackfamily}
\setinterfacecommand{definefield}{definiscicampo}
\setinterfacecommand{definefieldstack}{definiscistackcampi}
\setinterfacecommand{definefiguresymbol}{definiscifigurasimbolo}
+\setinterfacecommand{definefilefallback}{definefilefallback}
+\setinterfacecommand{definefirstline}{definefirstline}
\setinterfacecommand{definefloat}{definiscioggettomobile}
\setinterfacecommand{definefont}{definiscifont}
+\setinterfacecommand{definefontalternative}{definefontalternative}
+\setinterfacecommand{definefontfallback}{definefontfallback}
+\setinterfacecommand{definefontfamily}{definefontfamily}
+\setinterfacecommand{definefontfamilypreset}{definefontfamilypreset}
+\setinterfacecommand{definefontfeature}{definefontfeature}
+\setinterfacecommand{definefontfile}{definefontfile}
+\setinterfacecommand{definefontsize}{definefontsize}
+\setinterfacecommand{definefontsolution}{definefontsolution}
\setinterfacecommand{definefontstyle}{definiscistilefont}
\setinterfacecommand{definefontsynonym}{definiscisinonimofont}
\setinterfacecommand{defineframed}{definisciincorniciato}
\setinterfacecommand{defineframedtext}{definiscitestoincorniciato}
+\setinterfacecommand{definefrozenfont}{definefrozenfont}
\setinterfacecommand{definehbox}{definiscihbox}
\setinterfacecommand{definehead}{definiscitesta}
+\setinterfacecommand{definehyphenationfeatures}{definehyphenationfeatures}
\setinterfacecommand{defineindentedtext}{defineindentedtext}
\setinterfacecommand{defineinmargin}{defineinmargin}
\setinterfacecommand{defineinteractionmenu}{definiscimenuinterazione}
\setinterfacecommand{defineitemgroup}{defineitemgroup}
+\setinterfacecommand{defineitems}{defineitems}
\setinterfacecommand{definelabel}{definiscietichetta}
\setinterfacecommand{definelayer}{definelayer}
\setinterfacecommand{definelayout}{definiscilayout}
+\setinterfacecommand{definelinenote}{definelinenote}
\setinterfacecommand{definelist}{definiscielenco}
\setinterfacecommand{definelogo}{definiscilogo}
\setinterfacecommand{definemainfield}{definiscicampoprincipale}
\setinterfacecommand{definemakeup}{definiscimakeup}
\setinterfacecommand{definemarking}{definiscimarcatura}
\setinterfacecommand{definemathalignment}{definemathalignment}
+\setinterfacecommand{definemode}{definemode}
+\setinterfacecommand{definenamedcolor}{definenamedcolor}
+\setinterfacecommand{definenote}{definenote}
\setinterfacecommand{defineoutput}{definiscioutput}
\setinterfacecommand{defineoverlay}{definiscisovrapposizione}
\setinterfacecommand{definepagebreak}{definepagebreak}
\setinterfacecommand{definepalet}{definiscitavolozza}
\setinterfacecommand{definepapersize}{definiscidimensionicarta}
\setinterfacecommand{defineparagraphs}{definiscicapoversi}
+\setinterfacecommand{defineperiodkerning}{defineperiodkerning}
\setinterfacecommand{defineplacement}{defineplacement}
\setinterfacecommand{defineprofile}{definisciprofilo}
\setinterfacecommand{defineprogram}{definisciprogramma}
@@ -1481,33 +1540,45 @@
\setinterfacecommand{definetabulate}{definiscitabulato}
\setinterfacecommand{definetext}{definiscitesto}
\setinterfacecommand{definetextbackground}{definetextbackground}
+\setinterfacecommand{definetextnote}{definetextnote}
\setinterfacecommand{definetextposition}{definisciposizionetesto}
\setinterfacecommand{definetextvariable}{definiscivariabiletesto}
\setinterfacecommand{definetype}{definiscitype}
\setinterfacecommand{definetyping}{definiscityping}
\setinterfacecommand{defineversion}{definisciversion}
+\setinterfacecommand{depthspanningtext}{depthspanningtext}
\setinterfacecommand{determineheadnumber}{determinanumerotesta}
\setinterfacecommand{determinelistcharacteristics}{determinacarattersticheelenco}
\setinterfacecommand{determineregistercharacteristics}{determinacaratteristicheregistro}
\setinterfacecommand{dimension}{dimensione}
\setinterfacecommand{disableinteractionmenu}{disabilitamenuinterazione}
+\setinterfacecommand{disablemode}{disablemode}
+\setinterfacecommand{doaddfeature}{doaddfeature}
\setinterfacecommand{domicile}{domicilio}
+\setinterfacecommand{dontconvertfont}{dontconvertfont}
\setinterfacecommand{donttest}{notest}
\setinterfacecommand{edgedistance}{distanzabordo}
\setinterfacecommand{edgewidth}{ampiezzabordo}
+\setinterfacecommand{emphasisboldface}{emphasisboldface}
\setinterfacecommand{emptylines}{emptylines}
+\setinterfacecommand{enablemode}{enablemode}
\setinterfacecommand{environment}{ambiente}
\setinterfacecommand{externalfigure}{figuraesterna}
\setinterfacecommand{fact}{fatto}
+\setinterfacecommand{fastswitchtobodyfont}{fastswitchtobodyfont}
+\setinterfacecommand{feature}{feature}
\setinterfacecommand{field}{campi}
\setinterfacecommand{fieldstack}{stackcampi}
\setinterfacecommand{fillinfield}{camporiempimento}
\setinterfacecommand{fillinline}{rigariempimento}
\setinterfacecommand{fillinrules}{lineeriempimento}
\setinterfacecommand{fillintext}{testoriempimento}
+\setinterfacecommand{firstcharacter}{firstcharacter}
\setinterfacecommand{fitfield}{adattacampo}
+\setinterfacecommand{fittopbaselinegrid}{fittopbaselinegrid}
\setinterfacecommand{fixedspace}{spaziofisso}
\setinterfacecommand{fixedspaces}{spazifissi}
+\setinterfacecommand{flushnotes}{flushnotes}
\setinterfacecommand{followprofile}{seguiprofilo}
\setinterfacecommand{followprofileversion}{seguiversioneprofilo}
\setinterfacecommand{followversion}{seguiversione}
@@ -1516,13 +1587,19 @@
\setinterfacecommand{footnote}{notapdp}
\setinterfacecommand{footnotetext}{testonotapdp}
\setinterfacecommand{forceblocks}{forzablocchi}
+\setinterfacecommand{forcecharacterstripping}{forcecharacterstripping}
\setinterfacecommand{formulanumber}{numeroformula}
\setinterfacecommand{fraction}{frazione}
\setinterfacecommand{framed}{incorniciato}
\setinterfacecommand{from}{da}
+\setinterfacecommand{fromlinenote}{fromlinenote}
\setinterfacecommand{getbuffer}{prendibuffer}
+\setinterfacecommand{getfirstcharacter}{getfirstcharacter}
\setinterfacecommand{getmarking}{prendimarcatura}
\setinterfacecommand{getnumber}{getnumber}
+\setinterfacecommand{globaldisablemode}{globaldisablemode}
+\setinterfacecommand{globalenablemode}{globalenablemode}
+\setinterfacecommand{globalpreventmode}{globalpreventmode}
\setinterfacecommand{godown}{vaigiu}
\setinterfacecommand{goto}{vaia}
\setinterfacecommand{gotobox}{vaiabox}
@@ -1538,6 +1615,7 @@
\setinterfacecommand{headnumber}{numerotesta}
\setinterfacecommand{headsym}{headsym}
\setinterfacecommand{headtext}{testoinstestazioni}
+\setinterfacecommand{heightspanningtext}{heightspanningtext}
\setinterfacecommand{hideblocks}{nascondiblocchi}
\setinterfacecommand{high}{ap}
\setinterfacecommand{hl}{hl}
@@ -1569,26 +1647,37 @@
\setinterfacecommand{interactionbuttons}{pulsantinterazione}
\setinterfacecommand{interactionmenu}{menuinterattivo}
\setinterfacecommand{item}{elemento}
+\setinterfacecommand{itemgroup}{itemgroup}
\setinterfacecommand{items}{elementi}
+\setinterfacecommand{itemtag}{itemtag}
\setinterfacecommand{its}{el}
\setinterfacecommand{keepblocks}{tieniblocchi}
+\setinterfacecommand{kerncharacters}{kerncharacters}
\setinterfacecommand{label}{etichetta}
\setinterfacecommand{labels}{etichette}
\setinterfacecommand{labeltext}{testoetichetta}
\setinterfacecommand{language}{lingua}
+\setinterfacecommand{languageCharacters}{languageCharacters}
+\setinterfacecommand{languagecharacters}{languagecharacters}
\setinterfacecommand{leftaligned}{allineasinistra}
+\setinterfacecommand{leftbottombox}{leftbottombox}
\setinterfacecommand{leftedgedistance}{distanzabordosinistro}
\setinterfacecommand{leftedgewidth}{ampiezzabordosinistro}
+\setinterfacecommand{leftline}{leftline}
\setinterfacecommand{leftmargindistance}{distanzamarginesinistro}
\setinterfacecommand{leftmarginwidth}{ampiezzamarginesinistro}
\setinterfacecommand{leg}{leg}
\setinterfacecommand{linecorrection}{linecorrection}
+\setinterfacecommand{linenote}{linenote}
+\setinterfacecommand{linespanningtext}{linespanningtext}
\setinterfacecommand{linewidth}{spessoreriga}
\setinterfacecommand{listheight}{altezzaelenco}
\setinterfacecommand{listlength}{lunghezzaelenco}
\setinterfacecommand{listsymbol}{listsymbol}
\setinterfacecommand{listwidth}{ampiezzaelenco}
+\setinterfacecommand{loadfontgoodies}{loadfontgoodies}
\setinterfacecommand{localfootnotes}{localfootnotes}
+\setinterfacecommand{localnotes}{localnotes}
\setinterfacecommand{logfields}{logcampi}
\setinterfacecommand{lohi}{pedap}
\setinterfacecommand{low}{ped}
@@ -1619,6 +1708,7 @@
\setinterfacecommand{nodimension}{nientedimensioni}
\setinterfacecommand{noheaderandfooterlines}{nientelineintestazionepdp}
\setinterfacecommand{noindenting}{nienterientro}
+\setinterfacecommand{noitem}{noitem}
\setinterfacecommand{nolist}{nienteelenco}
\setinterfacecommand{nomarking}{nientemarcatura}
\setinterfacecommand{nomoreblocks}{bastablocchi}
@@ -1626,6 +1716,7 @@
\setinterfacecommand{nop}{nop}
\setinterfacecommand{nospace}{nientespazio}
\setinterfacecommand{note}{nota}
+\setinterfacecommand{notesymbol}{notesymbol}
\setinterfacecommand{notopandbottomlines}{nientelineecimafondo}
\setinterfacecommand{notsmallcapped}{nocap}
\setinterfacecommand{nowhitespace}{nientespaziobianco}
@@ -1637,6 +1728,7 @@
\setinterfacecommand{outermarginwidth}{outermarginwidth}
\setinterfacecommand{packed}{impaccato}
\setinterfacecommand{page}{pagina}
+\setinterfacecommand{pagebreak}{pagebreak}
\setinterfacecommand{pagedepth}{pagedepth}
\setinterfacecommand{pagenumber}{numeropagina}
\setinterfacecommand{pageoffset}{pageoffset}
@@ -1655,7 +1747,10 @@
\setinterfacecommand{placelist}{mettielenco}
\setinterfacecommand{placelistofsynonyms}{placelistofsynonyms}
\setinterfacecommand{placelocalfootnotes}{mettinotepdplocali}
+\setinterfacecommand{placelocalnotes}{placelocalnotes}
\setinterfacecommand{placelogos}{mettiloghi}
+\setinterfacecommand{placenamedfloat}{placenamedfloat}
+\setinterfacecommand{placenotes}{placenotes}
\setinterfacecommand{placeongrid}{mettiingriglia}
\setinterfacecommand{placeontopofeachother}{mettiunosullaltro}
\setinterfacecommand{placepagenumber}{mettinumeropagina}
@@ -1668,9 +1763,17 @@
\setinterfacecommand{placetextvariable}{mettivariabiletesto}
\setinterfacecommand{position}{posizione}
\setinterfacecommand{positiontext}{posizionatesto}
+\setinterfacecommand{postponenotes}{postponenotes}
+\setinterfacecommand{postponingnotes}{postponingnotes}
+\setinterfacecommand{predefinedfont}{predefinedfont}
+\setinterfacecommand{predefinefont}{predefinefont}
+\setinterfacecommand{presetdocument}{presetdocument}
+\setinterfacecommand{prettyprintbuffer}{prettyprintbuffer}
+\setinterfacecommand{preventmode}{preventmode}
\setinterfacecommand{printpaperheight}{altezzacartastampa}
\setinterfacecommand{printpaperwidth}{ampiezzacartastampa}
\setinterfacecommand{processblocks}{elaborablocchi}
+\setinterfacecommand{processbodyfontenvironmentlist}{processbodyfontenvironmentlist}
\setinterfacecommand{processpage}{elaborapagina}
\setinterfacecommand{product}{prodotto}
\setinterfacecommand{program}{programma}
@@ -1680,19 +1783,45 @@
\setinterfacecommand{quote}{menzione}
\setinterfacecommand{ran}{ran}
\setinterfacecommand{redo}{rifai}
+\setinterfacecommand{redoconvertfont}{redoconvertfont}
\setinterfacecommand{ref}{rif}
\setinterfacecommand{reference}{riferimento}
\setinterfacecommand{referral}{referral}
\setinterfacecommand{referraldate}{datareferral}
\setinterfacecommand{referring}{referring}
+\setinterfacecommand{registerfontclass}{registerfontclass}
+\setinterfacecommand{registerhyphenationexception}{registerhyphenationexception}
+\setinterfacecommand{registerhyphenationpattern}{registerhyphenationpattern}
\setinterfacecommand{remark}{commento}
+\setinterfacecommand{replacefeature}{replacefeature}
\setinterfacecommand{reset}{reimposta}
+\setinterfacecommand{resetandaddfeature}{resetandaddfeature}
+\setinterfacecommand{resetcharacteralign}{resetcharacteralign}
+\setinterfacecommand{resetcharacterkerning}{resetcharacterkerning}
+\setinterfacecommand{resetcharacterspacing}{resetcharacterspacing}
+\setinterfacecommand{resetcharacterstripping}{resetcharacterstripping}
+\setinterfacecommand{resetfeature}{resetfeature}
+\setinterfacecommand{resetfontcolorsheme}{resetfontcolorsheme}
+\setinterfacecommand{resetfontfallback}{resetfontfallback}
+\setinterfacecommand{resetfontsolution}{resetfontsolution}
+\setinterfacecommand{resethyphenationfeatures}{resethyphenationfeatures}
+\setinterfacecommand{resetlocalfloats}{resetlocalfloats}
\setinterfacecommand{resetmarking}{reimpostamarcatura}
+\setinterfacecommand{resetmode}{resetmode}
\setinterfacecommand{resetnumber}{resetnumber}
-\setinterfacecommand{resettext}{resettextcontent}
+\setinterfacecommand{resetpath}{resetpath}
+\setinterfacecommand{resetperiodkerning}{resetperiodkerning}
+\setinterfacecommand{resetsystemmode}{resetsystemmode}
+\setinterfacecommand{resettextcontent}{resettextcontent}
+\setinterfacecommand{resetvisualizers}{resetvisualizers}
+\setinterfacecommand{restoreglobalbodyfont}{restoreglobalbodyfont}
+\setinterfacecommand{retestfeature}{retestfeature}
+\setinterfacecommand{revivefeature}{revivefeature}
\setinterfacecommand{rightaligned}{allineadestra}
+\setinterfacecommand{rightbottombox}{rightbottombox}
\setinterfacecommand{rightedgedistance}{distanzabordodestro}
\setinterfacecommand{rightedgewidth}{ampiezzabordodestro}
+\setinterfacecommand{rightline}{rightline}
\setinterfacecommand{rightmargindistance}{distanzamarginedestro}
\setinterfacecommand{rightmarginwidth}{ampiezzamarginedestro}
\setinterfacecommand{romannumerals}{numeriromani}
@@ -1703,12 +1832,38 @@
\setinterfacecommand{selectblocks}{selezionablocchi}
\setinterfacecommand{selectpaper}{selezionacarta}
\setinterfacecommand{selectversion}{selezionaversione}
+\setinterfacecommand{setbigbodyfont}{setbigbodyfont}
+\setinterfacecommand{setcharacteralign}{setcharacteralign}
+\setinterfacecommand{setcharacteraligndetail}{setcharacteraligndetail}
+\setinterfacecommand{setcharactercasing}{setcharactercasing}
+\setinterfacecommand{setcharactercleaning}{setcharactercleaning}
+\setinterfacecommand{setcharacterkerning}{setcharacterkerning}
+\setinterfacecommand{setcharacterspacing}{setcharacterspacing}
+\setinterfacecommand{setcharacterstripping}{setcharacterstripping}
+\setinterfacecommand{setcurrentfontclass}{setcurrentfontclass}
+\setinterfacecommand{setfirstline}{setfirstline}
+\setinterfacecommand{setfirstpasscharacteralign}{setfirstpasscharacteralign}
+\setinterfacecommand{setfont}{setfont}
+\setinterfacecommand{setfontcolorsheme}{setfontcolorsheme}
+\setinterfacecommand{setfontfeature}{setfontfeature}
+\setinterfacecommand{setfontsolution}{setfontsolution}
+\setinterfacecommand{setfontstrut}{setfontstrut}
+\setinterfacecommand{sethyphenationfeatures}{sethyphenationfeatures}
+\setinterfacecommand{setmainbodyfont}{setmainbodyfont}
+\setinterfacecommand{setmode}{setmode}
+\setinterfacecommand{setnote}{setnote}
+\setinterfacecommand{setnotetext}{setnotetext}
\setinterfacecommand{setnumber}{setnumber}
+\setinterfacecommand{setperiodkerning}{setperiodkerning}
+\setinterfacecommand{setsecondpasscharacteralign}{setsecondpasscharacteralign}
+\setinterfacecommand{setsmallbodyfont}{setsmallbodyfont}
+\setinterfacecommand{setsystemmode}{setsystemmode}
\setinterfacecommand{settextcontent}{settext}
\setinterfacecommand{settextvariable}{setvariabiletesto}
\setinterfacecommand{setupalign}{impostaallineamento}
\setinterfacecommand{setupanswerarea}{setupanswerarea}
\setinterfacecommand{setuparranging}{impostaparranging}
+\setinterfacecommand{setupattachment}{setupattachment}
\setinterfacecommand{setupbackground}{impostasfondo}
\setinterfacecommand{setupbackgrounds}{impostasfondi}
\setinterfacecommand{setupblackrules}{impostalineenere}
@@ -1723,6 +1878,9 @@
\setinterfacecommand{setupcapitals}{impostamaiuscole}
\setinterfacecommand{setupcaption}{impostacaption}
\setinterfacecommand{setupcaptions}{impostacaptions}
+\setinterfacecommand{setupcharacteralign}{setupcharacteralign}
+\setinterfacecommand{setupcharacterkerning}{setupcharacterkerning}
+\setinterfacecommand{setupcharacterspacing}{setupcharacterspacing}
\setinterfacecommand{setupclipping}{impostaclippling}
\setinterfacecommand{setupcolor}{impostacolore}
\setinterfacecommand{setupcolors}{impostacolori}
@@ -1733,6 +1891,7 @@
\setinterfacecommand{setupcombinations}{impostacombinazioni}
\setinterfacecommand{setupcombinedlist}{impostaelencocombinato}
\setinterfacecommand{setupcomment}{impostacommento}
+\setinterfacecommand{setupcounter}{setupcounter}
\setinterfacecommand{setupdescription}{setupdescription}
\setinterfacecommand{setupdescriptions}{impostadescrizioni}
\setinterfacecommand{setupenumeration}{setupenumeration}
@@ -1742,9 +1901,14 @@
\setinterfacecommand{setupfields}{impostacampi}
\setinterfacecommand{setupfillinlines}{impostarigheriempimento}
\setinterfacecommand{setupfillinrules}{impostalineeriempimento}
+\setinterfacecommand{setupfirstline}{setupfirstline}
\setinterfacecommand{setupfloat}{impostaoggettomobile}
\setinterfacecommand{setupfloats}{impostaoggettimobili}
\setinterfacecommand{setupfloatsplitting}{impostaspezzamentooggettomobile}
+\setinterfacecommand{setupfontexpansion}{setupfontexpansion}
+\setinterfacecommand{setupfontprotrusion}{setupfontprotrusion}
+\setinterfacecommand{setupfonts}{setupfonts}
+\setinterfacecommand{setupfontsolution}{setupfontsolution}
\setinterfacecommand{setupfooter}{impostapdp}
\setinterfacecommand{setupfootertexts}{impostatestipdp}
\setinterfacecommand{setupfootnotedefinition}{impostadefinizionenotepdp}
@@ -1761,6 +1925,7 @@
\setinterfacecommand{setupheadnumber}{impostanumerotesta}
\setinterfacecommand{setupheads}{impostateste}
\setinterfacecommand{setupheadtext}{impostatestointestazioni}
+\setinterfacecommand{setuphyphenation}{setuphyphenation}
\setinterfacecommand{setuphyphenmark}{impostasegnosillabazione}
\setinterfacecommand{setupindentedtext}{setupindentedtext}
\setinterfacecommand{setupindenting}{impostarientro}
@@ -1777,6 +1942,7 @@
\setinterfacecommand{setuplanguage}{impostalingua}
\setinterfacecommand{setuplayout}{impostalayout}
\setinterfacecommand{setuplegend}{impostalegenda}
+\setinterfacecommand{setuplinenote}{setuplinenote}
\setinterfacecommand{setuplinenumbering}{impostanumerazionerighe}
\setinterfacecommand{setuplines}{impostarighe}
\setinterfacecommand{setuplinewidth}{impostaampiezzariga}
@@ -1789,6 +1955,10 @@
\setinterfacecommand{setupmarking}{impostamarcatura}
\setinterfacecommand{setupmathalignment}{setupmathalignment}
\setinterfacecommand{setupnarrower}{impostapiustretto}
+\setinterfacecommand{setupnotation}{setupnotation}
+\setinterfacecommand{setupnotations}{setupnotations}
+\setinterfacecommand{setupnote}{setupnote}
+\setinterfacecommand{setupnotes}{setupnotes}
\setinterfacecommand{setupnumber}{impostanumerazione}
\setinterfacecommand{setupnumbering}{impostanumerazione}
\setinterfacecommand{setupoppositeplacing}{impostaposizionamentoopposti}
@@ -1802,6 +1972,7 @@
\setinterfacecommand{setuppapersize}{impostadimensionicarta}
\setinterfacecommand{setupparagraphnumbering}{impostanumerazionecapoversi}
\setinterfacecommand{setupparagraphs}{impostacapoversi}
+\setinterfacecommand{setupperiodkerning}{setupperiodkerning}
\setinterfacecommand{setupplacement}{setupplacement}
\setinterfacecommand{setuppositioning}{impostaposizionamento}
\setinterfacecommand{setupprofiles}{impostaprofili}
@@ -1831,6 +2002,7 @@
\setinterfacecommand{setuptabulate}{impostatabulato}
\setinterfacecommand{setuptext}{impostatesto}
\setinterfacecommand{setuptextbackground}{setuptextbackground}
+\setinterfacecommand{setuptextnote}{setuptextnote}
\setinterfacecommand{setuptextposition}{impostaposizionetesto}
\setinterfacecommand{setuptextrules}{impostalineetesto}
\setinterfacecommand{setuptexttexts}{impostatestotesti}
@@ -1845,16 +2017,29 @@
\setinterfacecommand{setupurl}{impostaurl}
\setinterfacecommand{setupversions}{impostaversioni}
\setinterfacecommand{setupwhitespace}{impostaspaziobianco}
+\setinterfacecommand{setvisualizerfont}{setvisualizerfont}
\setinterfacecommand{showbodyfont}{mostrafontdeltesto}
\setinterfacecommand{showbodyfontenvironment}{mostraambientefontdeltesto}
\setinterfacecommand{showcolor}{mostracolore}
\setinterfacecommand{showcolorgroup}{mostragruppocolori}
+\setinterfacecommand{showcounter}{showcounter}
\setinterfacecommand{showexternalfigures}{mostrafiguresterne}
\setinterfacecommand{showfields}{mostracampi}
+\setinterfacecommand{showfont}{showfont}
+\setinterfacecommand{showfontdata}{showfontdata}
+\setinterfacecommand{showfontexpansion}{showfontexpansion}
+\setinterfacecommand{showfontitalics}{showfontitalics}
+\setinterfacecommand{showfontkerns}{showfontkerns}
+\setinterfacecommand{showfontparameters}{showfontparameters}
+\setinterfacecommand{showfontstrip}{showfontstrip}
+\setinterfacecommand{showfontstyle}{showfontstyle}
\setinterfacecommand{showframe}{mostracornice}
\setinterfacecommand{showgrid}{mostragriglia}
+\setinterfacecommand{showhyphenationtrace}{showhyphenationtrace}
+\setinterfacecommand{showkerning}{showkerning}
\setinterfacecommand{showlayout}{mostralyout}
\setinterfacecommand{showmakeup}{mostramakeup}
+\setinterfacecommand{showminimalbaseline}{showminimalbaseline}
\setinterfacecommand{showpalet}{mostratavolozza}
\setinterfacecommand{showprint}{mostrastampa}
\setinterfacecommand{showsetups}{mostraimpostazioni}
@@ -1864,6 +2049,7 @@
\setinterfacecommand{someline}{qualcheriga}
\setinterfacecommand{somewhere}{daqualcheparte}
\setinterfacecommand{space}{spazio}
+\setinterfacecommand{specialitem}{specialitem}
\setinterfacecommand{splitfloat}{spezzaoggettomobile}
\setinterfacecommand{startalignment}{iniziaallineamento}
\setinterfacecommand{startbackground}{iniziasfondo}
@@ -1881,6 +2067,7 @@
\setinterfacecommand{startglobal}{iniziaglobale}
\setinterfacecommand{startline}{iniziariga}
\setinterfacecommand{startlinecorrection}{iniziacorrezioneriga}
+\setinterfacecommand{startlinenote}{startlinenote}
\setinterfacecommand{startlinenumbering}{inizianumerazionerighe}
\setinterfacecommand{startlines}{iniziarighe}
\setinterfacecommand{startlocal}{inizialocale}
@@ -1891,7 +2078,7 @@
\setinterfacecommand{startnarrower}{iniziapiustretto}
\setinterfacecommand{startopposite}{iniziaopposto}
\setinterfacecommand{startoverlay}{iniziasovrapposizione}
-\setinterfacecommand{startoverzicht}{iniziaoverview}
+\setinterfacecommand{startoverview}{iniziaoverview}
\setinterfacecommand{startpacked}{iniziaimpaccato}
\setinterfacecommand{startpositioning}{iniziaposizionamento}
\setinterfacecommand{startproduct}{iniziaprodotto}
@@ -1923,6 +2110,7 @@
\setinterfacecommand{stopglobal}{terminaglobale}
\setinterfacecommand{stopline}{terminariga}
\setinterfacecommand{stoplinecorrection}{terminacorrezioneriga}
+\setinterfacecommand{stoplinenote}{stoplinenote}
\setinterfacecommand{stoplinenumbering}{terminanumerazionerighe}
\setinterfacecommand{stoplines}{terminarighe}
\setinterfacecommand{stoplocal}{terminalocale}
@@ -1933,7 +2121,7 @@
\setinterfacecommand{stopnarrower}{terminapiustretto}
\setinterfacecommand{stopopposite}{terminaopposto}
\setinterfacecommand{stopoverlay}{terminasovrapposizione}
-\setinterfacecommand{stopoverzicht}{terminaoverview}
+\setinterfacecommand{stopoverview}{terminaoverview}
\setinterfacecommand{stoppacked}{terminaimpaccato}
\setinterfacecommand{stoppositioning}{terminaposizionamento}
\setinterfacecommand{stopproduct}{terminaprodotto}
@@ -1950,8 +2138,11 @@
\setinterfacecommand{stopunpacked}{terminaunpacked}
\setinterfacecommand{stopversion}{terminaversioni}
\setinterfacecommand{stretched}{stirato}
+\setinterfacecommand{strictinspectnextcharacter}{strictinspectnextcharacter}
+\setinterfacecommand{stripcharacter}{stripcharacter}
\setinterfacecommand{subformulanumber}{numerosottoformula}
\setinterfacecommand{subpagenumber}{subpagenumber}
+\setinterfacecommand{subtractfeature}{subtractfeature}
\setinterfacecommand{switchtobodyfont}{cambiaafontdeltesto}
\setinterfacecommand{switchtorawfont}{passaafontgrezzo}
\setinterfacecommand{sym}{sim}
@@ -1961,16 +2152,24 @@
\setinterfacecommand{synchronize}{sincronizza}
\setinterfacecommand{tab}{tab}
\setinterfacecommand{testcolumn}{testcolumn}
+\setinterfacecommand{testfeature}{testfeature}
+\setinterfacecommand{testfeatureonce}{testfeatureonce}
\setinterfacecommand{testpage}{testpage}
\setinterfacecommand{tex}{tex}
\setinterfacecommand{textbackground}{textbackground}
+\setinterfacecommand{textcolor}{textcolor}
\setinterfacecommand{textheight}{altezzatesto}
+\setinterfacecommand{textnote}{textnote}
\setinterfacecommand{textreference}{riferimentotesto}
\setinterfacecommand{textrule}{lineatesto}
\setinterfacecommand{textvariable}{variabiletesto}
\setinterfacecommand{textwidth}{ampiezzatesto}
+\setinterfacecommand{thefirstcharacter}{thefirstcharacter}
+\setinterfacecommand{thenormalizedbodyfontsize}{thenormalizedbodyfontsize}
+\setinterfacecommand{theremainingcharacters}{theremainingcharacters}
\setinterfacecommand{thinrule}{lineasottile}
\setinterfacecommand{thinrules}{lineesottili}
+\setinterfacecommand{tolinenote}{tolinenote}
\setinterfacecommand{tooltip}{tooltip}
\setinterfacecommand{topdistance}{distanzacima}
\setinterfacecommand{topheight}{altezzacima}
@@ -1981,13 +2180,19 @@
\setinterfacecommand{typ}{typ}
\setinterfacecommand{type}{type}
\setinterfacecommand{typebuffer}{typebuffer}
+\setinterfacecommand{typedefinedbuffer}{typedefinedbuffer}
\setinterfacecommand{typefile}{typefile}
+\setinterfacecommand{typeinlinebuffer}{typeinlinebuffer}
+\setinterfacecommand{typing}{typing}
\setinterfacecommand{unitmeaning}{nomeunita}
\setinterfacecommand{unknown}{ignoto}
+\setinterfacecommand{unregisterhyphenationpattern}{unregisterhyphenationpattern}
\setinterfacecommand{useJSscripts}{usaJSscripts}
\setinterfacecommand{useURL}{usaURL}
\setinterfacecommand{useXMLfilter}{useXMLfilter}
\setinterfacecommand{useblocks}{usablocco}
+\setinterfacecommand{usebodyfont}{usebodyfont}
+\setinterfacecommand{usebodyfontparameter}{usebodyfontparameter}
\setinterfacecommand{usecommands}{usacomandi}
\setinterfacecommand{useencoding}{usacodifica}
\setinterfacecommand{useexternaldocument}{usadocumentoesterno}
@@ -2004,10 +2209,12 @@
\setinterfacecommand{usetypescript}{usetypescript}
\setinterfacecommand{usetypescriptfile}{usetypescriptfile}
\setinterfacecommand{useurl}{usaurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{versione}
\setinterfacecommand{vl}{vl}
\setinterfacecommand{weekday}{giornosettimana}
\setinterfacecommand{whitespace}{spaziobianco}
+\setinterfacecommand{widthspanningtext}{widthspanningtext}
\setinterfacecommand{wordright}{paroladestra}
\setinterfacecommand{writebetweenlist}{scrividentroelenco}
\setinterfacecommand{writetolist}{scriviinelenco}
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii
index 8b7e22f857f..7bf09dd57b8 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-nl.mkii
@@ -128,6 +128,9 @@
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{kap}
\setinterfacevariable{capital}{kapitaal}
+\setinterfacevariable{category}{category}
+\setinterfacevariable{cd:character}{cd:character}
+\setinterfacevariable{cd:font}{cd:font}
\setinterfacevariable{center}{centreer}
\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{hoofdstuk}
@@ -186,6 +189,7 @@
\setinterfacevariable{external}{extern}
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{gegeven}
+\setinterfacevariable{fallback}{fallback}
\setinterfacevariable{february}{februari}
\setinterfacevariable{field}{veld}
\setinterfacevariable{figure}{figuur}
@@ -207,6 +211,7 @@
\setinterfacevariable{flushouter}{lijnbuiten}
\setinterfacevariable{flushright}{lijnrechts}
\setinterfacevariable{followingpage}{opvolgendepagina}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{voet}
\setinterfacevariable{footnote}{voetnoot}
\setinterfacevariable{force}{forceer}
@@ -278,6 +283,7 @@
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intekst}
\setinterfacevariable{intro}{intro}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{italic}
\setinterfacevariable{italicbold}{italicvet}
\setinterfacevariable{item}{som}
@@ -381,6 +387,7 @@
\setinterfacevariable{nonumber}{geennummer}
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normaal}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{geenspatiering}
\setinterfacevariable{nostopper}{geenafsluiter}
\setinterfacevariable{not}{niet}
@@ -448,6 +455,7 @@
\setinterfacevariable{rectangular}{recht}
\setinterfacevariable{reference}{referentie}
\setinterfacevariable{referral}{kenmerk}
+\setinterfacevariable{region}{gebied}
\setinterfacevariable{register}{register}
\setinterfacevariable{regular}{regular}
\setinterfacevariable{relative}{relatief}
@@ -629,6 +637,7 @@
\setinterfaceconstant{afterkey}{natoets}
\setinterfaceconstant{aftersection}{nasectie}
\setinterfaceconstant{align}{uitlijnen}
+\setinterfaceconstant{alignbottom}{alignbottom}
\setinterfaceconstant{aligncharacter}{karakteruitlijnen}
\setinterfaceconstant{alignmentcharacter}{uitlijnkarakter}
\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
@@ -765,6 +774,7 @@
\setinterfaceconstant{deepnumbercommand}{diepnummercommando}
\setinterfaceconstant{deeptextcommand}{dieptekstcommando}
\setinterfaceconstant{default}{default}
+\setinterfaceconstant{define}{definieer}
\setinterfaceconstant{delay}{wachttijd}
\setinterfaceconstant{depth}{diepte}
\setinterfaceconstant{depthcorrection}{dieptecorrectie}
@@ -804,8 +814,10 @@
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{factor}
\setinterfaceconstant{fallback}{terugval}
+\setinterfaceconstant{fallbacks}{fallbacks}
\setinterfaceconstant{family}{soort}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{featureset}{featureset}
\setinterfaceconstant{fences}{fences}
\setinterfaceconstant{field}{veld}
\setinterfaceconstant{fieldbackgroundcolor}{veldachtergrondkleur}
@@ -826,6 +838,7 @@
\setinterfaceconstant{focusin}{focusin}
\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusuit}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{voet}
\setinterfaceconstant{footerdistance}{voetafstand}
\setinterfaceconstant{footerstate}{voetstatus}
@@ -880,6 +893,7 @@
\setinterfaceconstant{increment}{verhoog}
\setinterfaceconstant{incrementnumber}{verhoognummer}
\setinterfaceconstant{indenting}{inspringen}
+\setinterfaceconstant{indentlist}{indentlist}
\setinterfaceconstant{indentnext}{springvolgendein}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{aanduiding}
@@ -907,7 +921,10 @@
\setinterfaceconstant{keys}{sleutels}
\setinterfaceconstant{keyword}{trefwoord}
\setinterfaceconstant{label}{label}
+\setinterfaceconstant{labelalternative}{labelvariant}
+\setinterfaceconstant{labelcolor}{labelkleur}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{labelstyle}{labelletter}
\setinterfaceconstant{language}{language}
\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
@@ -941,6 +958,7 @@
\setinterfaceconstant{limittext}{limiettekst}
\setinterfaceconstant{line}{regel}
\setinterfaceconstant{linecorrection}{regelcorrectie}
+\setinterfaceconstant{linedirection}{regelrichting}
\setinterfaceconstant{lines}{regels}
\setinterfaceconstant{list}{lijst}
\setinterfaceconstant{listtext}{lijsttekst}
@@ -1081,6 +1099,7 @@
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{plaatsen}
\setinterfaceconstant{placehead}{plaatskop}
+\setinterfaceconstant{placeholder}{placeholder}
\setinterfaceconstant{placestopper}{plaatsafsluiter}
\setinterfaceconstant{position}{positie}
\setinterfaceconstant{prefix}{prefix}
@@ -1112,6 +1131,7 @@
\setinterfaceconstant{reference}{referentie}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{refereren}
\setinterfaceconstant{region}{gebied}
\setinterfaceconstant{regionin}{gebiedin}
@@ -1350,7 +1370,6 @@
\setinterfaceelement{type}{type}
% definitions for interface commands for language nl
%
-\setinterfacecommand{CAPPED}{KAP}
\setinterfacecommand{Character}{Letter}
\setinterfacecommand{Characters}{Letters}
\setinterfacecommand{MONTH}{MAAND}
@@ -1364,8 +1383,18 @@
\setinterfacecommand{Word}{Woord}
\setinterfacecommand{Words}{Woorden}
\setinterfacecommand{about}{about}
+\setinterfacecommand{adaptfontfeature}{adaptfontfeature}
\setinterfacecommand{adaptlayout}{paslayoutaan}
+\setinterfacecommand{addfeature}{addfeature}
+\setinterfacecommand{alignbottom}{alignbottom}
+\setinterfacecommand{aligned}{aligned}
+\setinterfacecommand{alignedbox}{alignedbox}
+\setinterfacecommand{alignedline}{alignedline}
+\setinterfacecommand{alignhere}{alignhere}
\setinterfacecommand{alignment}{uitlijnen}
+\setinterfacecommand{alignmentcharacter}{alignmentcharacter}
+\setinterfacecommand{applytocharacters}{applytocharacters}
+\setinterfacecommand{applytofirstcharacter}{applytofirstcharacter}
\setinterfacecommand{arg}{arg}
\setinterfacecommand{at}{op}
\setinterfacecommand{atleftmargin}{oplinkermarge}
@@ -1377,9 +1406,13 @@
\setinterfacecommand{blackrules}{blokjes}
\setinterfacecommand{blank}{blanko}
\setinterfacecommand{bookmark}{bookmark}
+\setinterfacecommand{bottombox}{bottombox}
\setinterfacecommand{bottomdistance}{onderafstand}
\setinterfacecommand{bottomheight}{onderhoogte}
+\setinterfacecommand{bottomleftbox}{bottomleftbox}
+\setinterfacecommand{bottomrightbox}{bottomrightbox}
\setinterfacecommand{bottomspace}{bodemwit}
+\setinterfacecommand{buildtextbottomdot}{buildtextbottomdot}
\setinterfacecommand{but}{but}
\setinterfacecommand{button}{button}
\setinterfacecommand{bypassblocks}{passeerblokken}
@@ -1418,8 +1451,11 @@
\setinterfacecommand{defineblock}{definieerblok}
\setinterfacecommand{definebodyfont}{definieerkorps}
\setinterfacecommand{definebodyfontenvironment}{definieerkorpsomgeving}
+\setinterfacecommand{definebodyfontswitch}{definebodyfontswitch}
\setinterfacecommand{definebuffer}{definieerbuffer}
\setinterfacecommand{definecharacter}{definieerkarakter}
+\setinterfacecommand{definecharacterkerning}{definecharacterkerning}
+\setinterfacecommand{definecharacterspacing}{definecharacterspacing}
\setinterfacecommand{definecolor}{definieerkleur}
\setinterfacecommand{definecolorgroup}{definieerkleurgroep}
\setinterfacecommand{definecolumnbreak}{definieerkolomovergang}
@@ -1429,37 +1465,57 @@
\setinterfacecommand{definecommand}{definieercommando}
\setinterfacecommand{defineconversion}{definieerconversie}
\setinterfacecommand{definedescription}{doordefinieren}
+\setinterfacecommand{definedfont}{definedfont}
\setinterfacecommand{defineenumeration}{doornummeren}
+\setinterfacecommand{definefallbackfamily}{definefallbackfamily}
\setinterfacecommand{definefield}{definieerveld}
\setinterfacecommand{definefieldstack}{definieerveldstapel}
\setinterfacecommand{definefiguresymbol}{definieerfiguursymbool}
+\setinterfacecommand{definefilefallback}{definefilefallback}
+\setinterfacecommand{definefirstline}{definefirstline}
\setinterfacecommand{definefloat}{definieerplaatsblok}
\setinterfacecommand{definefont}{definieerfont}
+\setinterfacecommand{definefontalternative}{definefontalternative}
+\setinterfacecommand{definefontfallback}{definefontfallback}
+\setinterfacecommand{definefontfamily}{definefontfamily}
+\setinterfacecommand{definefontfamilypreset}{definefontfamilypreset}
+\setinterfacecommand{definefontfeature}{definefontfeature}
+\setinterfacecommand{definefontfile}{definefontfile}
+\setinterfacecommand{definefontsize}{definefontsize}
+\setinterfacecommand{definefontsolution}{definefontsolution}
\setinterfacecommand{definefontstyle}{definieerfontstijl}
\setinterfacecommand{definefontsynonym}{definieerfontsynoniem}
\setinterfacecommand{defineframed}{definieeromlijnd}
\setinterfacecommand{defineframedtext}{definieerkadertekst}
+\setinterfacecommand{definefrozenfont}{definefrozenfont}
\setinterfacecommand{definehbox}{definieerhbox}
\setinterfacecommand{definehead}{definieerkop}
+\setinterfacecommand{definehyphenationfeatures}{definehyphenationfeatures}
\setinterfacecommand{defineindentedtext}{definieeringesprongentext}
\setinterfacecommand{defineinmargin}{definieerinmarge}
\setinterfacecommand{defineinteractionmenu}{definieerinteractiemenu}
\setinterfacecommand{defineitemgroup}{definieeritemgroep}
+\setinterfacecommand{defineitems}{defineitems}
\setinterfacecommand{definelabel}{doorlabelen}
\setinterfacecommand{definelayer}{definieerlayer}
\setinterfacecommand{definelayout}{definieerlayout}
+\setinterfacecommand{definelinenote}{definelinenote}
\setinterfacecommand{definelist}{definieerlijst}
\setinterfacecommand{definelogo}{definieerbeeldmerk}
\setinterfacecommand{definemainfield}{definieerhoofdveld}
\setinterfacecommand{definemakeup}{definieeropmaak}
\setinterfacecommand{definemarking}{definieermarkering}
\setinterfacecommand{definemathalignment}{definieerwiskundeuitlijnen}
+\setinterfacecommand{definemode}{definemode}
+\setinterfacecommand{definenamedcolor}{definenamedcolor}
+\setinterfacecommand{definenote}{definenote}
\setinterfacecommand{defineoutput}{definieeruitvoer}
\setinterfacecommand{defineoverlay}{definieeroverlay}
\setinterfacecommand{definepagebreak}{definieerpaginaovergang}
\setinterfacecommand{definepalet}{definieerpalet}
\setinterfacecommand{definepapersize}{definieerpapierformaat}
\setinterfacecommand{defineparagraphs}{definieeralineas}
+\setinterfacecommand{defineperiodkerning}{defineperiodkerning}
\setinterfacecommand{defineplacement}{definieerplaats}
\setinterfacecommand{defineprofile}{definieerprofiel}
\setinterfacecommand{defineprogram}{definieerprogramma}
@@ -1481,33 +1537,45 @@
\setinterfacecommand{definetabulate}{definieertabulatie}
\setinterfacecommand{definetext}{definieertekst}
\setinterfacecommand{definetextbackground}{definieertekstachtergrond}
+\setinterfacecommand{definetextnote}{definetextnote}
\setinterfacecommand{definetextposition}{definieertekstpositie}
\setinterfacecommand{definetextvariable}{definieertekstvariabele}
\setinterfacecommand{definetype}{definieertype}
\setinterfacecommand{definetyping}{definieertypen}
\setinterfacecommand{defineversion}{definieerversie}
+\setinterfacecommand{depthspanningtext}{depthspanningtext}
\setinterfacecommand{determineheadnumber}{bepaalkopnummer}
\setinterfacecommand{determinelistcharacteristics}{bepaallijstkenmerken}
\setinterfacecommand{determineregistercharacteristics}{bepaalregisterkenmerken}
\setinterfacecommand{dimension}{dimensie}
\setinterfacecommand{disableinteractionmenu}{blokkeerinteractiemenu}
+\setinterfacecommand{disablemode}{disablemode}
+\setinterfacecommand{doaddfeature}{doaddfeature}
\setinterfacecommand{domicile}{woonplaats}
+\setinterfacecommand{dontconvertfont}{dontconvertfont}
\setinterfacecommand{donttest}{geentest}
\setinterfacecommand{edgedistance}{randafstand}
\setinterfacecommand{edgewidth}{randbreedte}
+\setinterfacecommand{emphasisboldface}{emphasisboldface}
\setinterfacecommand{emptylines}{legeregels}
+\setinterfacecommand{enablemode}{enablemode}
\setinterfacecommand{environment}{omgeving}
\setinterfacecommand{externalfigure}{externfiguur}
\setinterfacecommand{fact}{geg}
+\setinterfacecommand{fastswitchtobodyfont}{fastswitchtobodyfont}
+\setinterfacecommand{feature}{feature}
\setinterfacecommand{field}{veld}
\setinterfacecommand{fieldstack}{veldstapel}
\setinterfacecommand{fillinfield}{invulveld}
\setinterfacecommand{fillinline}{invulregel}
\setinterfacecommand{fillinrules}{invullijnen}
\setinterfacecommand{fillintext}{invultekst}
+\setinterfacecommand{firstcharacter}{firstcharacter}
\setinterfacecommand{fitfield}{passendveld}
+\setinterfacecommand{fittopbaselinegrid}{fittopbaselinegrid}
\setinterfacecommand{fixedspace}{vastespatie}
\setinterfacecommand{fixedspaces}{vastespaties}
+\setinterfacecommand{flushnotes}{flushnotes}
\setinterfacecommand{followprofile}{volgprofiel}
\setinterfacecommand{followprofileversion}{volgprofielversie}
\setinterfacecommand{followversion}{volgversie}
@@ -1516,13 +1584,19 @@
\setinterfacecommand{footnote}{voetnoot}
\setinterfacecommand{footnotetext}{voetnoottekst}
\setinterfacecommand{forceblocks}{forceerblokken}
+\setinterfacecommand{forcecharacterstripping}{forcecharacterstripping}
\setinterfacecommand{formulanumber}{formulenummer}
\setinterfacecommand{fraction}{breuk}
\setinterfacecommand{framed}{omlijnd}
\setinterfacecommand{from}{uit}
+\setinterfacecommand{fromlinenote}{fromlinenote}
\setinterfacecommand{getbuffer}{haalbuffer}
+\setinterfacecommand{getfirstcharacter}{getfirstcharacter}
\setinterfacecommand{getmarking}{haalmarkering}
\setinterfacecommand{getnumber}{haalnummer}
+\setinterfacecommand{globaldisablemode}{globaldisablemode}
+\setinterfacecommand{globalenablemode}{globalenablemode}
+\setinterfacecommand{globalpreventmode}{globalpreventmode}
\setinterfacecommand{godown}{omlaag}
\setinterfacecommand{goto}{naar}
\setinterfacecommand{gotobox}{naarbox}
@@ -1538,6 +1612,7 @@
\setinterfacecommand{headnumber}{kopnummer}
\setinterfacecommand{headsym}{kopsym}
\setinterfacecommand{headtext}{koptekst}
+\setinterfacecommand{heightspanningtext}{heightspanningtext}
\setinterfacecommand{hideblocks}{verbergblokken}
\setinterfacecommand{high}{hoog}
\setinterfacecommand{hl}{hl}
@@ -1569,26 +1644,37 @@
\setinterfacecommand{interactionbuttons}{interactiebuttons}
\setinterfacecommand{interactionmenu}{interactiemenu}
\setinterfacecommand{item}{som}
+\setinterfacecommand{itemgroup}{itemgroup}
\setinterfacecommand{items}{items}
+\setinterfacecommand{itemtag}{itemtag}
\setinterfacecommand{its}{its}
\setinterfacecommand{keepblocks}{handhaafblokken}
+\setinterfacecommand{kerncharacters}{kerncharacters}
\setinterfacecommand{label}{label}
\setinterfacecommand{labels}{labels}
\setinterfacecommand{labeltext}{labeltekst}
\setinterfacecommand{language}{taal}
+\setinterfacecommand{languageCharacters}{languageCharacters}
+\setinterfacecommand{languagecharacters}{languagecharacters}
\setinterfacecommand{leftaligned}{regellinks}
+\setinterfacecommand{leftbottombox}{leftbottombox}
\setinterfacecommand{leftedgedistance}{linkerrandafstand}
\setinterfacecommand{leftedgewidth}{linkerrandbreedte}
+\setinterfacecommand{leftline}{leftline}
\setinterfacecommand{leftmargindistance}{linkermargeafstand}
\setinterfacecommand{leftmarginwidth}{linkermargebreedte}
\setinterfacecommand{leg}{leg}
\setinterfacecommand{linecorrection}{regelcorrectie}
+\setinterfacecommand{linenote}{linenote}
+\setinterfacecommand{linespanningtext}{linespanningtext}
\setinterfacecommand{linewidth}{lijndikte}
\setinterfacecommand{listheight}{lijsthoogte}
\setinterfacecommand{listlength}{lijstlengte}
\setinterfacecommand{listsymbol}{lijstsymbool}
\setinterfacecommand{listwidth}{lijstbreedte}
+\setinterfacecommand{loadfontgoodies}{loadfontgoodies}
\setinterfacecommand{localfootnotes}{lokalevoetnoten}
+\setinterfacecommand{localnotes}{localnotes}
\setinterfacecommand{logfields}{registreervelden}
\setinterfacecommand{lohi}{laho}
\setinterfacecommand{low}{laag}
@@ -1619,6 +1705,7 @@
\setinterfacecommand{nodimension}{geendimensie}
\setinterfacecommand{noheaderandfooterlines}{geenhoofdenvoetregels}
\setinterfacecommand{noindenting}{nietinspringen}
+\setinterfacecommand{noitem}{noitem}
\setinterfacecommand{nolist}{geenlijst}
\setinterfacecommand{nomarking}{geenmarkering}
\setinterfacecommand{nomoreblocks}{geenblokkenmeer}
@@ -1626,6 +1713,7 @@
\setinterfacecommand{nop}{nop}
\setinterfacecommand{nospace}{geenspatie}
\setinterfacecommand{note}{noot}
+\setinterfacecommand{notesymbol}{notesymbol}
\setinterfacecommand{notopandbottomlines}{geenbovenenonderregels}
\setinterfacecommand{notsmallcapped}{nokap}
\setinterfacecommand{nowhitespace}{geenwitruimte}
@@ -1637,6 +1725,7 @@
\setinterfacecommand{outermarginwidth}{buitenmargebreedte}
\setinterfacecommand{packed}{opelkaar}
\setinterfacecommand{page}{pagina}
+\setinterfacecommand{pagebreak}{pagebreak}
\setinterfacecommand{pagedepth}{paginadiepte}
\setinterfacecommand{pagenumber}{paginanummer}
\setinterfacecommand{pageoffset}{paginaoffset}
@@ -1655,7 +1744,10 @@
\setinterfacecommand{placelist}{plaatslijst}
\setinterfacecommand{placelistofsynonyms}{plaatslijstmetsynoniemen}
\setinterfacecommand{placelocalfootnotes}{plaatslokalevoetnoten}
+\setinterfacecommand{placelocalnotes}{placelocalnotes}
\setinterfacecommand{placelogos}{plaatsbeeldmerken}
+\setinterfacecommand{placenamedfloat}{placenamedfloat}
+\setinterfacecommand{placenotes}{placenotes}
\setinterfacecommand{placeongrid}{plaatsopgrid}
\setinterfacecommand{placeontopofeachother}{plaatsonderelkaar}
\setinterfacecommand{placepagenumber}{plaatspaginanummer}
@@ -1668,9 +1760,17 @@
\setinterfacecommand{placetextvariable}{plaatstekstvariabele}
\setinterfacecommand{position}{positioneer}
\setinterfacecommand{positiontext}{positioneertekst}
+\setinterfacecommand{postponenotes}{postponenotes}
+\setinterfacecommand{postponingnotes}{postponingnotes}
+\setinterfacecommand{predefinedfont}{predefinedfont}
+\setinterfacecommand{predefinefont}{predefinefont}
+\setinterfacecommand{presetdocument}{presetdocument}
+\setinterfacecommand{prettyprintbuffer}{prettyprintbuffer}
+\setinterfacecommand{preventmode}{preventmode}
\setinterfacecommand{printpaperheight}{printpapierhoogte}
\setinterfacecommand{printpaperwidth}{printpapierbreedte}
\setinterfacecommand{processblocks}{verwerkblokken}
+\setinterfacecommand{processbodyfontenvironmentlist}{processbodyfontenvironmentlist}
\setinterfacecommand{processpage}{verwerkpagina}
\setinterfacecommand{product}{produkt}
\setinterfacecommand{program}{programma}
@@ -1680,19 +1780,45 @@
\setinterfacecommand{quote}{citeer}
\setinterfacecommand{ran}{ran}
\setinterfacecommand{redo}{herhaal}
+\setinterfacecommand{redoconvertfont}{redoconvertfont}
\setinterfacecommand{ref}{ref}
\setinterfacecommand{reference}{referentie}
\setinterfacecommand{referral}{kenmerk}
\setinterfacecommand{referraldate}{kenmerkdatum}
\setinterfacecommand{referring}{refereer}
+\setinterfacecommand{registerfontclass}{registerfontclass}
+\setinterfacecommand{registerhyphenationexception}{registerhyphenationexception}
+\setinterfacecommand{registerhyphenationpattern}{registerhyphenationpattern}
\setinterfacecommand{remark}{toelichting}
+\setinterfacecommand{replacefeature}{replacefeature}
\setinterfacecommand{reset}{reset}
+\setinterfacecommand{resetandaddfeature}{resetandaddfeature}
+\setinterfacecommand{resetcharacteralign}{resetcharacteralign}
+\setinterfacecommand{resetcharacterkerning}{resetcharacterkerning}
+\setinterfacecommand{resetcharacterspacing}{resetcharacterspacing}
+\setinterfacecommand{resetcharacterstripping}{resetcharacterstripping}
+\setinterfacecommand{resetfeature}{resetfeature}
+\setinterfacecommand{resetfontcolorsheme}{resetfontcolorsheme}
+\setinterfacecommand{resetfontfallback}{resetfontfallback}
+\setinterfacecommand{resetfontsolution}{resetfontsolution}
+\setinterfacecommand{resethyphenationfeatures}{resethyphenationfeatures}
+\setinterfacecommand{resetlocalfloats}{resetlocalfloats}
\setinterfacecommand{resetmarking}{resetmarkering}
+\setinterfacecommand{resetmode}{resetmode}
\setinterfacecommand{resetnumber}{resetnummer}
-\setinterfacecommand{resettext}{resettekstinhoud}
+\setinterfacecommand{resetpath}{resetpath}
+\setinterfacecommand{resetperiodkerning}{resetperiodkerning}
+\setinterfacecommand{resetsystemmode}{resetsystemmode}
+\setinterfacecommand{resettextcontent}{resettekstinhoud}
+\setinterfacecommand{resetvisualizers}{resetvisualizers}
+\setinterfacecommand{restoreglobalbodyfont}{restoreglobalbodyfont}
+\setinterfacecommand{retestfeature}{retestfeature}
+\setinterfacecommand{revivefeature}{revivefeature}
\setinterfacecommand{rightaligned}{regelrechts}
+\setinterfacecommand{rightbottombox}{rightbottombox}
\setinterfacecommand{rightedgedistance}{rechterrandafstand}
\setinterfacecommand{rightedgewidth}{rechterrandbreedte}
+\setinterfacecommand{rightline}{rightline}
\setinterfacecommand{rightmargindistance}{rechtermargeafstand}
\setinterfacecommand{rightmarginwidth}{rechtermargebreedte}
\setinterfacecommand{romannumerals}{romeins}
@@ -1703,12 +1829,38 @@
\setinterfacecommand{selectblocks}{selecteerblokken}
\setinterfacecommand{selectpaper}{selecteerpapier}
\setinterfacecommand{selectversion}{selecteerversie}
+\setinterfacecommand{setbigbodyfont}{setbigbodyfont}
+\setinterfacecommand{setcharacteralign}{setcharacteralign}
+\setinterfacecommand{setcharacteraligndetail}{setcharacteraligndetail}
+\setinterfacecommand{setcharactercasing}{setcharactercasing}
+\setinterfacecommand{setcharactercleaning}{setcharactercleaning}
+\setinterfacecommand{setcharacterkerning}{setcharacterkerning}
+\setinterfacecommand{setcharacterspacing}{setcharacterspacing}
+\setinterfacecommand{setcharacterstripping}{setcharacterstripping}
+\setinterfacecommand{setcurrentfontclass}{setcurrentfontclass}
+\setinterfacecommand{setfirstline}{setfirstline}
+\setinterfacecommand{setfirstpasscharacteralign}{setfirstpasscharacteralign}
+\setinterfacecommand{setfont}{setfont}
+\setinterfacecommand{setfontcolorsheme}{setfontcolorsheme}
+\setinterfacecommand{setfontfeature}{setfontfeature}
+\setinterfacecommand{setfontsolution}{setfontsolution}
+\setinterfacecommand{setfontstrut}{setfontstrut}
+\setinterfacecommand{sethyphenationfeatures}{sethyphenationfeatures}
+\setinterfacecommand{setmainbodyfont}{setmainbodyfont}
+\setinterfacecommand{setmode}{setmode}
+\setinterfacecommand{setnote}{setnote}
+\setinterfacecommand{setnotetext}{setnotetext}
\setinterfacecommand{setnumber}{setnummer}
+\setinterfacecommand{setperiodkerning}{setperiodkerning}
+\setinterfacecommand{setsecondpasscharacteralign}{setsecondpasscharacteralign}
+\setinterfacecommand{setsmallbodyfont}{setsmallbodyfont}
+\setinterfacecommand{setsystemmode}{setsystemmode}
\setinterfacecommand{settextcontent}{steltekstinhoudin}
\setinterfacecommand{settextvariable}{kentekstvariabeletoe}
\setinterfacecommand{setupalign}{steluitlijnenin}
\setinterfacecommand{setupanswerarea}{stelantwoordgebiedin}
\setinterfacecommand{setuparranging}{stelarrangerenin}
+\setinterfacecommand{setupattachment}{setupattachment}
\setinterfacecommand{setupbackground}{stelachtergrondin}
\setinterfacecommand{setupbackgrounds}{stelachtergrondenin}
\setinterfacecommand{setupblackrules}{stelblokjesin}
@@ -1723,6 +1875,9 @@
\setinterfacecommand{setupcapitals}{stelkapitalenin}
\setinterfacecommand{setupcaption}{stelblokkopjein}
\setinterfacecommand{setupcaptions}{stelblokkopjesin}
+\setinterfacecommand{setupcharacteralign}{setupcharacteralign}
+\setinterfacecommand{setupcharacterkerning}{setupcharacterkerning}
+\setinterfacecommand{setupcharacterspacing}{setupcharacterspacing}
\setinterfacecommand{setupclipping}{stelclipin}
\setinterfacecommand{setupcolor}{stelkleurin}
\setinterfacecommand{setupcolors}{stelkleurenin}
@@ -1733,6 +1888,7 @@
\setinterfacecommand{setupcombinations}{stelcombinatiesin}
\setinterfacecommand{setupcombinedlist}{stelsamengesteldelijstin}
\setinterfacecommand{setupcomment}{stelcommentaarin}
+\setinterfacecommand{setupcounter}{setupcounter}
\setinterfacecommand{setupdescription}{steldoordefinierenin}
\setinterfacecommand{setupdescriptions}{steldoordefinierenin}
\setinterfacecommand{setupenumeration}{steldoornummerenin}
@@ -1742,9 +1898,14 @@
\setinterfacecommand{setupfields}{stelveldenin}
\setinterfacecommand{setupfillinlines}{stelinvulregelsin}
\setinterfacecommand{setupfillinrules}{stelinvullijnenin}
+\setinterfacecommand{setupfirstline}{setupfirstline}
\setinterfacecommand{setupfloat}{stelplaatsblokin}
\setinterfacecommand{setupfloats}{stelplaatsblokkenin}
\setinterfacecommand{setupfloatsplitting}{stelplaatsbloksplitsenin}
+\setinterfacecommand{setupfontexpansion}{setupfontexpansion}
+\setinterfacecommand{setupfontprotrusion}{setupfontprotrusion}
+\setinterfacecommand{setupfonts}{setupfonts}
+\setinterfacecommand{setupfontsolution}{setupfontsolution}
\setinterfacecommand{setupfooter}{stelvoetin}
\setinterfacecommand{setupfootertexts}{stelvoettekstenin}
\setinterfacecommand{setupfootnotedefinition}{stelvoetnootdefinitiein}
@@ -1761,6 +1922,7 @@
\setinterfacecommand{setupheadnumber}{stelkopnummerin}
\setinterfacecommand{setupheads}{stelkoppenin}
\setinterfacecommand{setupheadtext}{stelkoptekstin}
+\setinterfacecommand{setuphyphenation}{setuphyphenation}
\setinterfacecommand{setuphyphenmark}{stelkoppeltekenin}
\setinterfacecommand{setupindentedtext}{stelingesprongentextin}
\setinterfacecommand{setupindenting}{stelinspringenin}
@@ -1777,6 +1939,7 @@
\setinterfacecommand{setuplanguage}{steltaalin}
\setinterfacecommand{setuplayout}{stellayoutin}
\setinterfacecommand{setuplegend}{stellegendain}
+\setinterfacecommand{setuplinenote}{setuplinenote}
\setinterfacecommand{setuplinenumbering}{stelregelnummerenin}
\setinterfacecommand{setuplines}{stelregelsin}
\setinterfacecommand{setuplinewidth}{stellijndiktein}
@@ -1789,6 +1952,10 @@
\setinterfacecommand{setupmarking}{stelmarkeringin}
\setinterfacecommand{setupmathalignment}{stelwiskundeuitlijnenin}
\setinterfacecommand{setupnarrower}{stelsmallerin}
+\setinterfacecommand{setupnotation}{setupnotation}
+\setinterfacecommand{setupnotations}{setupnotations}
+\setinterfacecommand{setupnote}{setupnote}
+\setinterfacecommand{setupnotes}{setupnotes}
\setinterfacecommand{setupnumber}{stelnummerin}
\setinterfacecommand{setupnumbering}{stelnummerenin}
\setinterfacecommand{setupoppositeplacing}{stelnaastplaatsenin}
@@ -1802,6 +1969,7 @@
\setinterfacecommand{setuppapersize}{stelpapierformaatin}
\setinterfacecommand{setupparagraphnumbering}{stelparagraafnummerenin}
\setinterfacecommand{setupparagraphs}{stelalineasin}
+\setinterfacecommand{setupperiodkerning}{setupperiodkerning}
\setinterfacecommand{setupplacement}{stelplaatsin}
\setinterfacecommand{setuppositioning}{stelpositionerenin}
\setinterfacecommand{setupprofiles}{stelprofielenin}
@@ -1831,6 +1999,7 @@
\setinterfacecommand{setuptabulate}{steltabulatiein}
\setinterfacecommand{setuptext}{steltekstin}
\setinterfacecommand{setuptextbackground}{steltekstachtergrondin}
+\setinterfacecommand{setuptextnote}{setuptextnote}
\setinterfacecommand{setuptextposition}{steltekstpositiein}
\setinterfacecommand{setuptextrules}{steltekstlijnenin}
\setinterfacecommand{setuptexttexts}{stelteksttekstenin}
@@ -1845,16 +2014,29 @@
\setinterfacecommand{setupurl}{stelurlin}
\setinterfacecommand{setupversions}{stelversiesin}
\setinterfacecommand{setupwhitespace}{stelwitruimtein}
+\setinterfacecommand{setvisualizerfont}{setvisualizerfont}
\setinterfacecommand{showbodyfont}{toonkorps}
\setinterfacecommand{showbodyfontenvironment}{toonkorpsomgeving}
\setinterfacecommand{showcolor}{toonkleur}
\setinterfacecommand{showcolorgroup}{toonkleurgroep}
+\setinterfacecommand{showcounter}{showcounter}
\setinterfacecommand{showexternalfigures}{toonexternefiguren}
\setinterfacecommand{showfields}{toonvelden}
+\setinterfacecommand{showfont}{showfont}
+\setinterfacecommand{showfontdata}{showfontdata}
+\setinterfacecommand{showfontexpansion}{showfontexpansion}
+\setinterfacecommand{showfontitalics}{showfontitalics}
+\setinterfacecommand{showfontkerns}{showfontkerns}
+\setinterfacecommand{showfontparameters}{showfontparameters}
+\setinterfacecommand{showfontstrip}{showfontstrip}
+\setinterfacecommand{showfontstyle}{showfontstyle}
\setinterfacecommand{showframe}{toonkader}
\setinterfacecommand{showgrid}{toongrid}
+\setinterfacecommand{showhyphenationtrace}{showhyphenationtrace}
+\setinterfacecommand{showkerning}{showkerning}
\setinterfacecommand{showlayout}{toonlayout}
\setinterfacecommand{showmakeup}{toonopmaak}
+\setinterfacecommand{showminimalbaseline}{showminimalbaseline}
\setinterfacecommand{showpalet}{toonpalet}
\setinterfacecommand{showprint}{toonprint}
\setinterfacecommand{showsetups}{tooninstellingen}
@@ -1864,6 +2046,7 @@
\setinterfacecommand{someline}{eenregel}
\setinterfacecommand{somewhere}{ergens}
\setinterfacecommand{space}{spatie}
+\setinterfacecommand{specialitem}{specialitem}
\setinterfacecommand{splitfloat}{splitsplaatsblok}
\setinterfacecommand{startalignment}{startuitlijnen}
\setinterfacecommand{startbackground}{startachtergrond}
@@ -1881,6 +2064,7 @@
\setinterfacecommand{startglobal}{startglobaal}
\setinterfacecommand{startline}{startregel}
\setinterfacecommand{startlinecorrection}{startregelcorrectie}
+\setinterfacecommand{startlinenote}{startlinenote}
\setinterfacecommand{startlinenumbering}{startregelnummeren}
\setinterfacecommand{startlines}{startregels}
\setinterfacecommand{startlocal}{startlokaal}
@@ -1891,7 +2075,7 @@
\setinterfacecommand{startnarrower}{startsmaller}
\setinterfacecommand{startopposite}{startnaast}
\setinterfacecommand{startoverlay}{startoverlay}
-\setinterfacecommand{startoverzicht}{startoverzicht}
+\setinterfacecommand{startoverview}{startoverzicht}
\setinterfacecommand{startpacked}{startopelkaar}
\setinterfacecommand{startpositioning}{startpositioneren}
\setinterfacecommand{startproduct}{startprodukt}
@@ -1923,6 +2107,7 @@
\setinterfacecommand{stopglobal}{stopglobaal}
\setinterfacecommand{stopline}{stopregel}
\setinterfacecommand{stoplinecorrection}{stopregelcorrectie}
+\setinterfacecommand{stoplinenote}{stoplinenote}
\setinterfacecommand{stoplinenumbering}{stopregelnummeren}
\setinterfacecommand{stoplines}{stopregels}
\setinterfacecommand{stoplocal}{stoplokaal}
@@ -1933,7 +2118,7 @@
\setinterfacecommand{stopnarrower}{stopsmaller}
\setinterfacecommand{stopopposite}{stopnaast}
\setinterfacecommand{stopoverlay}{stopoverlay}
-\setinterfacecommand{stopoverzicht}{stopoverzicht}
+\setinterfacecommand{stopoverview}{stopoverzicht}
\setinterfacecommand{stoppacked}{stopopelkaar}
\setinterfacecommand{stoppositioning}{stoppositioneren}
\setinterfacecommand{stopproduct}{stopprodukt}
@@ -1950,8 +2135,11 @@
\setinterfacecommand{stopunpacked}{stopvanelkaar}
\setinterfacecommand{stopversion}{stopversie}
\setinterfacecommand{stretched}{uitgerekt}
+\setinterfacecommand{strictinspectnextcharacter}{strictinspectnextcharacter}
+\setinterfacecommand{stripcharacter}{stripcharacter}
\setinterfacecommand{subformulanumber}{subformulenummer}
\setinterfacecommand{subpagenumber}{subpaginanummer}
+\setinterfacecommand{subtractfeature}{subtractfeature}
\setinterfacecommand{switchtobodyfont}{switchnaarkorps}
\setinterfacecommand{switchtorawfont}{switchtorawfont}
\setinterfacecommand{sym}{sym}
@@ -1961,16 +2149,24 @@
\setinterfacecommand{synchronize}{synchroniseer}
\setinterfacecommand{tab}{tab}
\setinterfacecommand{testcolumn}{testkolom}
+\setinterfacecommand{testfeature}{testfeature}
+\setinterfacecommand{testfeatureonce}{testfeatureonce}
\setinterfacecommand{testpage}{testpagina}
\setinterfacecommand{tex}{tex}
\setinterfacecommand{textbackground}{tekstachtergrond}
+\setinterfacecommand{textcolor}{textcolor}
\setinterfacecommand{textheight}{teksthoogte}
+\setinterfacecommand{textnote}{textnote}
\setinterfacecommand{textreference}{tekstreferentie}
\setinterfacecommand{textrule}{tekstlijn}
\setinterfacecommand{textvariable}{tekstvariabele}
\setinterfacecommand{textwidth}{tekstbreedte}
+\setinterfacecommand{thefirstcharacter}{thefirstcharacter}
+\setinterfacecommand{thenormalizedbodyfontsize}{thenormalizedbodyfontsize}
+\setinterfacecommand{theremainingcharacters}{theremainingcharacters}
\setinterfacecommand{thinrule}{dunnelijn}
\setinterfacecommand{thinrules}{dunnelijnen}
+\setinterfacecommand{tolinenote}{tolinenote}
\setinterfacecommand{tooltip}{suggestie}
\setinterfacecommand{topdistance}{bovenafstand}
\setinterfacecommand{topheight}{bovenhoogte}
@@ -1981,13 +2177,19 @@
\setinterfacecommand{typ}{typ}
\setinterfacecommand{type}{type}
\setinterfacecommand{typebuffer}{typebuffer}
+\setinterfacecommand{typedefinedbuffer}{typedefinedbuffer}
\setinterfacecommand{typefile}{typefile}
+\setinterfacecommand{typeinlinebuffer}{typeinlinebuffer}
+\setinterfacecommand{typing}{typing}
\setinterfacecommand{unitmeaning}{betekenis}
\setinterfacecommand{unknown}{onbekend}
+\setinterfacecommand{unregisterhyphenationpattern}{unregisterhyphenationpattern}
\setinterfacecommand{useJSscripts}{gebruikJSscripts}
\setinterfacecommand{useURL}{gebruikURL}
\setinterfacecommand{useXMLfilter}{gebruikXMLfilter}
\setinterfacecommand{useblocks}{gebruikblokken}
+\setinterfacecommand{usebodyfont}{usebodyfont}
+\setinterfacecommand{usebodyfontparameter}{usebodyfontparameter}
\setinterfacecommand{usecommands}{gebruikcommandos}
\setinterfacecommand{useencoding}{usecodering}
\setinterfacecommand{useexternaldocument}{gebruikexterndocument}
@@ -2004,10 +2206,12 @@
\setinterfacecommand{usetypescript}{gebruiktypescript}
\setinterfacecommand{usetypescriptfile}{gebruiktypescriptfile}
\setinterfacecommand{useurl}{gebruikurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{versie}
\setinterfacecommand{vl}{vl}
\setinterfacecommand{weekday}{weekdag}
\setinterfacecommand{whitespace}{witruimte}
+\setinterfacecommand{widthspanningtext}{widthspanningtext}
\setinterfacecommand{wordright}{woordrechts}
\setinterfacecommand{writebetweenlist}{schrijftussenlijst}
\setinterfacecommand{writetolist}{schrijfnaarlijst}
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii
index b9d71fe33a6..bbfae955629 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-pe.mkii
@@ -128,6 +128,9 @@
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{capital}
+\setinterfacevariable{category}{category}
+\setinterfacevariable{cd:character}{cd:character}
+\setinterfacevariable{cd:font}{cd:font}
\setinterfacevariable{center}{مرکز}
\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{Ùصل}
@@ -186,6 +189,7 @@
\setinterfacevariable{external}{خارجی}
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fact}
+\setinterfacevariable{fallback}{fallback}
\setinterfacevariable{february}{Ùوریه}
\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{Ø´Ú©Ù„}
@@ -207,6 +211,7 @@
\setinterfacevariable{flushouter}{پمپ‌خارجی}
\setinterfacevariable{flushright}{پمپ‌راست}
\setinterfacevariable{followingpage}{followingpage}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{ته‌برگ}
\setinterfacevariable{footnote}{پانوشت}
\setinterfacevariable{force}{اجبار}
@@ -278,6 +283,7 @@
\setinterfacevariable{intermezzo}{میان‌پرده}
\setinterfacevariable{intext}{درون‌متن}
\setinterfacevariable{intro}{پیشگÙتار}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{ایتالیک}
\setinterfacevariable{italicbold}{مشکی‌ایتالیک}
\setinterfacevariable{item}{آیتم}
@@ -381,6 +387,7 @@
\setinterfacevariable{nonumber}{بدون‌شماره}
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{نرمال}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{بدون‌Ùضاگذاری}
\setinterfacevariable{nostopper}{nostopper}
\setinterfacevariable{not}{بدون}
@@ -448,6 +455,7 @@
\setinterfacevariable{rectangular}{چهارگوشه}
\setinterfacevariable{reference}{مرجع}
\setinterfacevariable{referral}{مراجعه}
+\setinterfacevariable{region}{region}
\setinterfacevariable{register}{ثبت}
\setinterfacevariable{regular}{منظم}
\setinterfacevariable{relative}{نسبی}
@@ -629,6 +637,7 @@
\setinterfaceconstant{afterkey}{بعدازکلید}
\setinterfaceconstant{aftersection}{aftersection}
\setinterfaceconstant{align}{تنظیم}
+\setinterfaceconstant{alignbottom}{alignbottom}
\setinterfaceconstant{aligncharacter}{حرÙ‌تنظیم}
\setinterfaceconstant{alignmentcharacter}{حرÙ‌تنظیم‌کردن}
\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
@@ -765,6 +774,9 @@
\setinterfaceconstant{deepnumbercommand}{Ùرمان‌شماره‌عمیق}
\setinterfaceconstant{deeptextcommand}{Ùرمان‌متن‌عمیق}
\setinterfaceconstant{default}{پیش‌Ùرض}
+\setinterfaceconstant{defaultheight}{defaultheight}
+\setinterfaceconstant{defaultwidth}{defaultwidth}
+\setinterfaceconstant{define}{define}
\setinterfaceconstant{delay}{تاخیر}
\setinterfaceconstant{depth}{عمق}
\setinterfaceconstant{depthcorrection}{تصحیح‌عمق}
@@ -804,8 +816,10 @@
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{عامل}
\setinterfaceconstant{fallback}{عقب‌ریختن}
+\setinterfaceconstant{fallbacks}{fallbacks}
\setinterfaceconstant{family}{خانواده}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{featureset}{featureset}
\setinterfaceconstant{fences}{fences}
\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{رنگ‌پس‌زمینه‌میدان}
@@ -826,6 +840,7 @@
\setinterfaceconstant{focusin}{تمرکزدرون}
\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{تمرکزبیرون}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{ته‌برگ}
\setinterfaceconstant{footerdistance}{Ùاصله‌ته‌برگ}
\setinterfaceconstant{footerstate}{وضعیت‌ته‌برگ}
@@ -880,6 +895,7 @@
\setinterfaceconstant{increment}{اÙزایش}
\setinterfaceconstant{incrementnumber}{شماره‌اÙزایش}
\setinterfaceconstant{indenting}{تورÙتگی}
+\setinterfaceconstant{indentlist}{indentlist}
\setinterfaceconstant{indentnext}{متن‌تورÙته}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{اندیکاتور}
@@ -907,7 +923,10 @@
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{کلید‌واژه}
\setinterfaceconstant{label}{برچسب}
+\setinterfaceconstant{labelalternative}{labelalternative}
+\setinterfaceconstant{labelcolor}{labelcolor}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{labelstyle}{labelstyle}
\setinterfaceconstant{language}{language}
\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
@@ -941,6 +960,7 @@
\setinterfaceconstant{limittext}{مرزمتن}
\setinterfaceconstant{line}{خط}
\setinterfaceconstant{linecorrection}{تصحیح‌خط}
+\setinterfaceconstant{linedirection}{linedirection}
\setinterfaceconstant{lines}{خطها}
\setinterfaceconstant{list}{لیست}
\setinterfaceconstant{listtext}{متن‌لیست}
@@ -1081,6 +1101,7 @@
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{بگذار}
\setinterfaceconstant{placehead}{بگذارسر}
+\setinterfaceconstant{placeholder}{placeholder}
\setinterfaceconstant{placestopper}{بگذارایست}
\setinterfaceconstant{position}{موقعیت}
\setinterfaceconstant{prefix}{پیشوند}
@@ -1099,6 +1120,7 @@
\setinterfaceconstant{print}{print}
\setinterfaceconstant{printable}{قابل‌چاپ}
\setinterfaceconstant{process}{پردازش}
+\setinterfaceconstant{processors}{processors}
\setinterfaceconstant{profile}{profile}
\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
@@ -1112,6 +1134,7 @@
\setinterfaceconstant{reference}{مرجع}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{مراجعه}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{ناحیه‌درون}
@@ -1350,7 +1373,6 @@
\setinterfaceelement{type}{تایپ}
% definitions for interface commands for language pe
%
-\setinterfacecommand{CAPPED}{CAP}
\setinterfacecommand{Character}{Character}
\setinterfacecommand{Characters}{Characters}
\setinterfacecommand{MONTH}{MONTH}
@@ -1364,8 +1386,18 @@
\setinterfacecommand{Word}{Word}
\setinterfacecommand{Words}{Words}
\setinterfacecommand{about}{درمورد}
+\setinterfacecommand{adaptfontfeature}{adaptfontfeature}
\setinterfacecommand{adaptlayout}{تنظیم‌طرح‌بندی}
+\setinterfacecommand{addfeature}{addfeature}
+\setinterfacecommand{alignbottom}{alignbottom}
+\setinterfacecommand{aligned}{aligned}
+\setinterfacecommand{alignedbox}{alignedbox}
+\setinterfacecommand{alignedline}{alignedline}
+\setinterfacecommand{alignhere}{alignhere}
\setinterfacecommand{alignment}{alignment}
+\setinterfacecommand{alignmentcharacter}{alignmentcharacter}
+\setinterfacecommand{applytocharacters}{applytocharacters}
+\setinterfacecommand{applytofirstcharacter}{applytofirstcharacter}
\setinterfacecommand{arg}{اÙزودن}
\setinterfacecommand{at}{در}
\setinterfacecommand{atleftmargin}{درحاشیه‌چپ}
@@ -1377,9 +1409,13 @@
\setinterfacecommand{blackrules}{خطهای‌سیاه}
\setinterfacecommand{blank}{خالی}
\setinterfacecommand{bookmark}{چوبخط}
+\setinterfacecommand{bottombox}{bottombox}
\setinterfacecommand{bottomdistance}{Ùاصله‌پایین}
\setinterfacecommand{bottomheight}{ارتÙاع‌پایین}
+\setinterfacecommand{bottomleftbox}{bottomleftbox}
+\setinterfacecommand{bottomrightbox}{bottomrightbox}
\setinterfacecommand{bottomspace}{Ùضای‌پایین}
+\setinterfacecommand{buildtextbottomdot}{buildtextbottomdot}
\setinterfacecommand{but}{اما}
\setinterfacecommand{button}{دکمه}
\setinterfacecommand{bypassblocks}{عبوربلوکها}
@@ -1418,8 +1454,11 @@
\setinterfacecommand{defineblock}{تعریÙ‌بلوک}
\setinterfacecommand{definebodyfont}{تعریÙ‌قلم‌متن}
\setinterfacecommand{definebodyfontenvironment}{تعریÙ‌محیط‌قلم‌بدنه}
+\setinterfacecommand{definebodyfontswitch}{definebodyfontswitch}
\setinterfacecommand{definebuffer}{تعریÙ‌باÙر}
\setinterfacecommand{definecharacter}{تعریÙ‌حرÙ}
+\setinterfacecommand{definecharacterkerning}{definecharacterkerning}
+\setinterfacecommand{definecharacterspacing}{definecharacterspacing}
\setinterfacecommand{definecolor}{تعریÙ‌رنگ}
\setinterfacecommand{definecolorgroup}{تعریÙ‌گروه‌رنگ}
\setinterfacecommand{definecolumnbreak}{تعریÙ‌شکستن‌ستون}
@@ -1429,37 +1468,57 @@
\setinterfacecommand{definecommand}{تعریÙ‌Ùرمان}
\setinterfacecommand{defineconversion}{تعریÙ‌تبدیل}
\setinterfacecommand{definedescription}{تعریÙ‌شرح}
+\setinterfacecommand{definedfont}{definedfont}
\setinterfacecommand{defineenumeration}{تعریÙ‌شماره‌بندی}
+\setinterfacecommand{definefallbackfamily}{definefallbackfamily}
\setinterfacecommand{definefield}{تعریÙ‌میدان}
\setinterfacecommand{definefieldstack}{تعریÙ‌توده‌میدان}
\setinterfacecommand{definefiguresymbol}{تعریÙ‌نمادشکل}
+\setinterfacecommand{definefilefallback}{definefilefallback}
+\setinterfacecommand{definefirstline}{definefirstline}
\setinterfacecommand{definefloat}{تعریÙ‌شناور}
\setinterfacecommand{definefont}{تعریÙ‌قلم}
+\setinterfacecommand{definefontalternative}{definefontalternative}
+\setinterfacecommand{definefontfallback}{definefontfallback}
+\setinterfacecommand{definefontfamily}{definefontfamily}
+\setinterfacecommand{definefontfamilypreset}{definefontfamilypreset}
+\setinterfacecommand{definefontfeature}{definefontfeature}
+\setinterfacecommand{definefontfile}{definefontfile}
+\setinterfacecommand{definefontsize}{definefontsize}
+\setinterfacecommand{definefontsolution}{definefontsolution}
\setinterfacecommand{definefontstyle}{تعریÙ‌سبک‌قلم}
\setinterfacecommand{definefontsynonym}{تعریÙ‌مترادÙ‌قلم}
\setinterfacecommand{defineframed}{تعریÙ‌قالبی}
\setinterfacecommand{defineframedtext}{تعریÙ‌متن‌قالبی}
+\setinterfacecommand{definefrozenfont}{definefrozenfont}
\setinterfacecommand{definehbox}{تعریÙ‌جعبه‌‌اÙÙ‚ÛŒ}
\setinterfacecommand{definehead}{تعریÙ‌سر}
+\setinterfacecommand{definehyphenationfeatures}{definehyphenationfeatures}
\setinterfacecommand{defineindentedtext}{defineindentedtext}
\setinterfacecommand{defineinmargin}{تعریÙ‌درون‌حاشیه}
\setinterfacecommand{defineinteractionmenu}{تعریÙ‌منوی‌پانل}
\setinterfacecommand{defineitemgroup}{تعریÙ‌گروه‌آیتم}
+\setinterfacecommand{defineitems}{defineitems}
\setinterfacecommand{definelabel}{تعریÙ‌برچسب}
\setinterfacecommand{definelayer}{تعریÙ‌لایه}
\setinterfacecommand{definelayout}{تعریÙ‌طرح‌بندی}
+\setinterfacecommand{definelinenote}{definelinenote}
\setinterfacecommand{definelist}{تعریÙ‌لیست}
\setinterfacecommand{definelogo}{تعریÙ‌آرم}
\setinterfacecommand{definemainfield}{تعریÙ‌میدان‌اصلی}
\setinterfacecommand{definemakeup}{تعریÙ‌آرایش}
\setinterfacecommand{definemarking}{تعریÙ‌نشانه‌گذاری}
\setinterfacecommand{definemathalignment}{تعریÙ‌تنظیم‌ریاضی}
+\setinterfacecommand{definemode}{definemode}
+\setinterfacecommand{definenamedcolor}{definenamedcolor}
+\setinterfacecommand{definenote}{definenote}
\setinterfacecommand{defineoutput}{تعریÙ‌خروجی}
\setinterfacecommand{defineoverlay}{تعریÙ‌پوشش}
\setinterfacecommand{definepagebreak}{تعریÙ‌شکست‌صÙحه}
\setinterfacecommand{definepalet}{تعریÙ‌لوح}
\setinterfacecommand{definepapersize}{تعریÙ‌اندازه‌برگ}
\setinterfacecommand{defineparagraphs}{تعریÙ‌پاراگراÙها}
+\setinterfacecommand{defineperiodkerning}{defineperiodkerning}
\setinterfacecommand{defineplacement}{تعریÙ‌جانشانی}
\setinterfacecommand{defineprofile}{تعریÙ‌پروÙایل}
\setinterfacecommand{defineprogram}{تعریÙ‌برنامه}
@@ -1481,33 +1540,45 @@
\setinterfacecommand{definetabulate}{تعریÙ‌جدول‌بندی}
\setinterfacecommand{definetext}{تعریÙ‌متن}
\setinterfacecommand{definetextbackground}{definetextbackground}
+\setinterfacecommand{definetextnote}{definetextnote}
\setinterfacecommand{definetextposition}{تعریÙ‌مکان‌متن}
\setinterfacecommand{definetextvariable}{تعریÙ‌متغیرمتن}
\setinterfacecommand{definetype}{تعریÙ‌تایپ}
\setinterfacecommand{definetyping}{تعریÙ‌تایپ‌کردن}
\setinterfacecommand{defineversion}{تعریÙ‌نسخه}
+\setinterfacecommand{depthspanningtext}{depthspanningtext}
\setinterfacecommand{determineheadnumber}{تعیین‌شماره‌سر}
\setinterfacecommand{determinelistcharacteristics}{تعیین‌مشخصات‌لیست}
\setinterfacecommand{determineregistercharacteristics}{تعیین‌مشخصات‌ثبت}
\setinterfacecommand{dimension}{بعد}
\setinterfacecommand{disableinteractionmenu}{ازکارانداختن‌منوی‌پانل}
+\setinterfacecommand{disablemode}{disablemode}
+\setinterfacecommand{doaddfeature}{doaddfeature}
\setinterfacecommand{domicile}{مسکن}
+\setinterfacecommand{dontconvertfont}{dontconvertfont}
\setinterfacecommand{donttest}{امتحان‌نکن}
\setinterfacecommand{edgedistance}{Ùاصله‌لبه}
\setinterfacecommand{edgewidth}{عرض‌لبه}
+\setinterfacecommand{emphasisboldface}{emphasisboldface}
\setinterfacecommand{emptylines}{خطها‌خالی}
+\setinterfacecommand{enablemode}{enablemode}
\setinterfacecommand{environment}{محیط}
\setinterfacecommand{externalfigure}{شکل‌خارجی}
\setinterfacecommand{fact}{حقیقت}
+\setinterfacecommand{fastswitchtobodyfont}{fastswitchtobodyfont}
+\setinterfacecommand{feature}{feature}
\setinterfacecommand{field}{میدان}
\setinterfacecommand{fieldstack}{میدان‌پشته}
\setinterfacecommand{fillinfield}{درج‌درمیدان}
\setinterfacecommand{fillinline}{درج‌درخط}
\setinterfacecommand{fillinrules}{درج‌درخطها}
\setinterfacecommand{fillintext}{درج‌درمتن}
+\setinterfacecommand{firstcharacter}{firstcharacter}
\setinterfacecommand{fitfield}{پرکردن‌میدان}
+\setinterfacecommand{fittopbaselinegrid}{fittopbaselinegrid}
\setinterfacecommand{fixedspace}{Ùضای‌ثابت}
\setinterfacecommand{fixedspaces}{Ùضاهای‌ثابت}
+\setinterfacecommand{flushnotes}{flushnotes}
\setinterfacecommand{followprofile}{پیروی‌پروÙایل}
\setinterfacecommand{followprofileversion}{پیروی‌نسخه‌پروÙایل}
\setinterfacecommand{followversion}{پیروی‌نسخه}
@@ -1516,13 +1587,19 @@
\setinterfacecommand{footnote}{پانوشت}
\setinterfacecommand{footnotetext}{متن‌پانوشت}
\setinterfacecommand{forceblocks}{اجباربلوکها}
+\setinterfacecommand{forcecharacterstripping}{forcecharacterstripping}
\setinterfacecommand{formulanumber}{شماره‌Ùرمول}
\setinterfacecommand{fraction}{کسر}
\setinterfacecommand{framed}{قالبی}
\setinterfacecommand{from}{از}
+\setinterfacecommand{fromlinenote}{fromlinenote}
\setinterfacecommand{getbuffer}{دریاÙت‌باÙر}
+\setinterfacecommand{getfirstcharacter}{getfirstcharacter}
\setinterfacecommand{getmarking}{دریاÙت‌نشانه}
\setinterfacecommand{getnumber}{دریاÙت‌شماره}
+\setinterfacecommand{globaldisablemode}{globaldisablemode}
+\setinterfacecommand{globalenablemode}{globalenablemode}
+\setinterfacecommand{globalpreventmode}{globalpreventmode}
\setinterfacecommand{godown}{بروپایین}
\setinterfacecommand{goto}{بروبه}
\setinterfacecommand{gotobox}{بروبه‌جعبه}
@@ -1538,6 +1615,7 @@
\setinterfacecommand{headnumber}{شماره‌سر}
\setinterfacecommand{headsym}{نمادسر}
\setinterfacecommand{headtext}{متن‌سر}
+\setinterfacecommand{heightspanningtext}{heightspanningtext}
\setinterfacecommand{hideblocks}{بلوکها‌پنهان}
\setinterfacecommand{high}{بلند}
\setinterfacecommand{hl}{خ‌ا}
@@ -1569,26 +1647,37 @@
\setinterfacecommand{interactionbuttons}{دکمه‌پانل}
\setinterfacecommand{interactionmenu}{منوی‌پانل}
\setinterfacecommand{item}{آیتم}
+\setinterfacecommand{itemgroup}{itemgroup}
\setinterfacecommand{items}{آیتمها}
+\setinterfacecommand{itemtag}{itemtag}
\setinterfacecommand{its}{its}
\setinterfacecommand{keepblocks}{Ø­Ùظ‌بلوکها}
+\setinterfacecommand{kerncharacters}{kerncharacters}
\setinterfacecommand{label}{برچسب}
\setinterfacecommand{labels}{برچسبها}
\setinterfacecommand{labeltext}{متن‌برچسب}
\setinterfacecommand{language}{زبان}
+\setinterfacecommand{languageCharacters}{languageCharacters}
+\setinterfacecommand{languagecharacters}{languagecharacters}
\setinterfacecommand{leftaligned}{چپ‌چین}
+\setinterfacecommand{leftbottombox}{leftbottombox}
\setinterfacecommand{leftedgedistance}{Ùاصله‌لبه‌چپ}
\setinterfacecommand{leftedgewidth}{عرض‌لبه‌چپ}
+\setinterfacecommand{leftline}{leftline}
\setinterfacecommand{leftmargindistance}{Ùاصله‌حاشیه‌چپ}
\setinterfacecommand{leftmarginwidth}{عرض‌حاشیه‌چپ}
\setinterfacecommand{leg}{پا}
\setinterfacecommand{linecorrection}{linecorrection}
+\setinterfacecommand{linenote}{linenote}
+\setinterfacecommand{linespanningtext}{linespanningtext}
\setinterfacecommand{linewidth}{عرض‌خط}
\setinterfacecommand{listheight}{ارتÙاع‌خط}
\setinterfacecommand{listlength}{طول‌لیست}
\setinterfacecommand{listsymbol}{نمادلیست}
\setinterfacecommand{listwidth}{عرض‌لیست}
+\setinterfacecommand{loadfontgoodies}{loadfontgoodies}
\setinterfacecommand{localfootnotes}{localfootnotes}
+\setinterfacecommand{localnotes}{localnotes}
\setinterfacecommand{logfields}{میدانهای‌گزارش}
\setinterfacecommand{lohi}{پابا}
\setinterfacecommand{low}{پایین}
@@ -1619,6 +1708,7 @@
\setinterfacecommand{nodimension}{بدون‌بعد}
\setinterfacecommand{noheaderandfooterlines}{بدون‌خط‌سروته‌برگ}
\setinterfacecommand{noindenting}{بدون‌تورÙتگی}
+\setinterfacecommand{noitem}{noitem}
\setinterfacecommand{nolist}{بدون‌لیست}
\setinterfacecommand{nomarking}{بدون‌نشانه‌گذاری}
\setinterfacecommand{nomoreblocks}{بدون‌بلوکهای‌بیشتر}
@@ -1626,6 +1716,7 @@
\setinterfacecommand{nop}{منÙÛŒ}
\setinterfacecommand{nospace}{بدون‌Ùضا}
\setinterfacecommand{note}{یادداشت}
+\setinterfacecommand{notesymbol}{notesymbol}
\setinterfacecommand{notopandbottomlines}{بدون‌خط‌بالاوپایین}
\setinterfacecommand{notsmallcapped}{سرپوش‌کوچک‌نه}
\setinterfacecommand{nowhitespace}{بدون‌Ùضای‌سÙید}
@@ -1637,6 +1728,7 @@
\setinterfacecommand{outermarginwidth}{عرض‌حاشیه‌خارجی}
\setinterfacecommand{packed}{Ùشرده}
\setinterfacecommand{page}{صÙحه}
+\setinterfacecommand{pagebreak}{pagebreak}
\setinterfacecommand{pagedepth}{عمق‌صÙحه}
\setinterfacecommand{pagenumber}{شماره‌صÙحه}
\setinterfacecommand{pageoffset}{Ø¢Ùست‌صÙحه}
@@ -1655,7 +1747,10 @@
\setinterfacecommand{placelist}{درج‌لیست}
\setinterfacecommand{placelistofsynonyms}{placelistofsynonyms}
\setinterfacecommand{placelocalfootnotes}{درج‌پانوشتهای‌موضعی}
+\setinterfacecommand{placelocalnotes}{placelocalnotes}
\setinterfacecommand{placelogos}{درج‌آرمها}
+\setinterfacecommand{placenamedfloat}{placenamedfloat}
+\setinterfacecommand{placenotes}{placenotes}
\setinterfacecommand{placeongrid}{درج‌در‌توری}
\setinterfacecommand{placeontopofeachother}{درج‌در‌بالای‌یکدیگر}
\setinterfacecommand{placepagenumber}{درج‌شماره‌صÙحه}
@@ -1668,9 +1763,17 @@
\setinterfacecommand{placetextvariable}{درج‌متغیرمتن}
\setinterfacecommand{position}{مکان}
\setinterfacecommand{positiontext}{مکان‌متن}
+\setinterfacecommand{postponenotes}{postponenotes}
+\setinterfacecommand{postponingnotes}{postponingnotes}
+\setinterfacecommand{predefinedfont}{predefinedfont}
+\setinterfacecommand{predefinefont}{predefinefont}
+\setinterfacecommand{presetdocument}{presetdocument}
+\setinterfacecommand{prettyprintbuffer}{prettyprintbuffer}
+\setinterfacecommand{preventmode}{preventmode}
\setinterfacecommand{printpaperheight}{چاپ‌ارتÙاع‌برگ}
\setinterfacecommand{printpaperwidth}{چاپ‌عرض‌برگ}
\setinterfacecommand{processblocks}{بلوکهای‌پردازش}
+\setinterfacecommand{processbodyfontenvironmentlist}{processbodyfontenvironmentlist}
\setinterfacecommand{processpage}{صÙحه‌پردازش}
\setinterfacecommand{product}{تولید}
\setinterfacecommand{program}{برنامه}
@@ -1680,19 +1783,45 @@
\setinterfacecommand{quote}{نقل}
\setinterfacecommand{ran}{ran}
\setinterfacecommand{redo}{انجام‌دوباره}
+\setinterfacecommand{redoconvertfont}{redoconvertfont}
\setinterfacecommand{ref}{رج}
\setinterfacecommand{reference}{مرجع}
\setinterfacecommand{referral}{رجوع}
\setinterfacecommand{referraldate}{تاریخ‌رجوع}
\setinterfacecommand{referring}{مراجعه}
+\setinterfacecommand{registerfontclass}{registerfontclass}
+\setinterfacecommand{registerhyphenationexception}{registerhyphenationexception}
+\setinterfacecommand{registerhyphenationpattern}{registerhyphenationpattern}
\setinterfacecommand{remark}{توجه}
+\setinterfacecommand{replacefeature}{replacefeature}
\setinterfacecommand{reset}{بازنشانی}
+\setinterfacecommand{resetandaddfeature}{resetandaddfeature}
+\setinterfacecommand{resetcharacteralign}{resetcharacteralign}
+\setinterfacecommand{resetcharacterkerning}{resetcharacterkerning}
+\setinterfacecommand{resetcharacterspacing}{resetcharacterspacing}
+\setinterfacecommand{resetcharacterstripping}{resetcharacterstripping}
+\setinterfacecommand{resetfeature}{resetfeature}
+\setinterfacecommand{resetfontcolorsheme}{resetfontcolorsheme}
+\setinterfacecommand{resetfontfallback}{resetfontfallback}
+\setinterfacecommand{resetfontsolution}{resetfontsolution}
+\setinterfacecommand{resethyphenationfeatures}{resethyphenationfeatures}
+\setinterfacecommand{resetlocalfloats}{resetlocalfloats}
\setinterfacecommand{resetmarking}{بازنشانی‌نشانه‌گذاری}
+\setinterfacecommand{resetmode}{resetmode}
\setinterfacecommand{resetnumber}{بازنشانی‌شماره}
-\setinterfacecommand{resettext}{بازنشانی‌متن}
+\setinterfacecommand{resetpath}{resetpath}
+\setinterfacecommand{resetperiodkerning}{resetperiodkerning}
+\setinterfacecommand{resetsystemmode}{resetsystemmode}
+\setinterfacecommand{resettextcontent}{بازنشانی‌متن}
+\setinterfacecommand{resetvisualizers}{resetvisualizers}
+\setinterfacecommand{restoreglobalbodyfont}{restoreglobalbodyfont}
+\setinterfacecommand{retestfeature}{retestfeature}
+\setinterfacecommand{revivefeature}{revivefeature}
\setinterfacecommand{rightaligned}{تنظیم‌راست}
+\setinterfacecommand{rightbottombox}{rightbottombox}
\setinterfacecommand{rightedgedistance}{Ùاصله‌لبه‌راست}
\setinterfacecommand{rightedgewidth}{عرض‌لبه‌راست}
+\setinterfacecommand{rightline}{rightline}
\setinterfacecommand{rightmargindistance}{Ùاصله‌حاشیه‌راست}
\setinterfacecommand{rightmarginwidth}{عرض‌حاشیه‌راست}
\setinterfacecommand{romannumerals}{اعدادلاتین}
@@ -1703,12 +1832,38 @@
\setinterfacecommand{selectblocks}{انتخاب‌بلوکها}
\setinterfacecommand{selectpaper}{انتخاب‌برگ}
\setinterfacecommand{selectversion}{انتخاب‌نسخه}
+\setinterfacecommand{setbigbodyfont}{setbigbodyfont}
+\setinterfacecommand{setcharacteralign}{setcharacteralign}
+\setinterfacecommand{setcharacteraligndetail}{setcharacteraligndetail}
+\setinterfacecommand{setcharactercasing}{setcharactercasing}
+\setinterfacecommand{setcharactercleaning}{setcharactercleaning}
+\setinterfacecommand{setcharacterkerning}{setcharacterkerning}
+\setinterfacecommand{setcharacterspacing}{setcharacterspacing}
+\setinterfacecommand{setcharacterstripping}{setcharacterstripping}
+\setinterfacecommand{setcurrentfontclass}{setcurrentfontclass}
+\setinterfacecommand{setfirstline}{setfirstline}
+\setinterfacecommand{setfirstpasscharacteralign}{setfirstpasscharacteralign}
+\setinterfacecommand{setfont}{setfont}
+\setinterfacecommand{setfontcolorsheme}{setfontcolorsheme}
+\setinterfacecommand{setfontfeature}{setfontfeature}
+\setinterfacecommand{setfontsolution}{setfontsolution}
+\setinterfacecommand{setfontstrut}{setfontstrut}
+\setinterfacecommand{sethyphenationfeatures}{sethyphenationfeatures}
+\setinterfacecommand{setmainbodyfont}{setmainbodyfont}
+\setinterfacecommand{setmode}{setmode}
+\setinterfacecommand{setnote}{setnote}
+\setinterfacecommand{setnotetext}{setnotetext}
\setinterfacecommand{setnumber}{تعیین‌شماره}
+\setinterfacecommand{setperiodkerning}{setperiodkerning}
+\setinterfacecommand{setsecondpasscharacteralign}{setsecondpasscharacteralign}
+\setinterfacecommand{setsmallbodyfont}{setsmallbodyfont}
+\setinterfacecommand{setsystemmode}{setsystemmode}
\setinterfacecommand{settextcontent}{تعیین‌محتوای‌متن}
\setinterfacecommand{settextvariable}{تعیین‌متغیر‌متن}
\setinterfacecommand{setupalign}{بارگذاری‌تنظیم}
\setinterfacecommand{setupanswerarea}{setupanswerarea}
\setinterfacecommand{setuparranging}{بارگذاری‌ترتیب}
+\setinterfacecommand{setupattachment}{setupattachment}
\setinterfacecommand{setupbackground}{بارگذاری‌پس‌زمینه}
\setinterfacecommand{setupbackgrounds}{بارگذاری‌پس‌زمینه‌ها}
\setinterfacecommand{setupblackrules}{بارگذاری‌خطهای‌سیاه}
@@ -1723,6 +1878,9 @@
\setinterfacecommand{setupcapitals}{setupcapitals}
\setinterfacecommand{setupcaption}{بارگذاری‌شرح}
\setinterfacecommand{setupcaptions}{بارگذاری‌شرحها}
+\setinterfacecommand{setupcharacteralign}{setupcharacteralign}
+\setinterfacecommand{setupcharacterkerning}{setupcharacterkerning}
+\setinterfacecommand{setupcharacterspacing}{setupcharacterspacing}
\setinterfacecommand{setupclipping}{بارگذاری‌چیدن}
\setinterfacecommand{setupcolor}{بارگذاری‌رنگ}
\setinterfacecommand{setupcolors}{بارگذاری‌رنگها}
@@ -1733,6 +1891,7 @@
\setinterfacecommand{setupcombinations}{بارگذاری‌ترکیب‌ها}
\setinterfacecommand{setupcombinedlist}{بارگذاری‌لیست‌ترکیبی}
\setinterfacecommand{setupcomment}{بارگذاری‌توضیح}
+\setinterfacecommand{setupcounter}{setupcounter}
\setinterfacecommand{setupdescription}{setupdescription}
\setinterfacecommand{setupdescriptions}{بارگذاری‌شرح}
\setinterfacecommand{setupenumeration}{setupenumeration}
@@ -1742,9 +1901,14 @@
\setinterfacecommand{setupfields}{بارگذاری‌میدانها}
\setinterfacecommand{setupfillinlines}{بارگذاری‌پرکردن‌خطها}
\setinterfacecommand{setupfillinrules}{بارگذاری‌درج‌درخطها}
+\setinterfacecommand{setupfirstline}{setupfirstline}
\setinterfacecommand{setupfloat}{بارگذاری‌شناور}
\setinterfacecommand{setupfloats}{بارگذاری‌شناورها}
\setinterfacecommand{setupfloatsplitting}{بارگذاری‌شکاÙتن‌شناورها}
+\setinterfacecommand{setupfontexpansion}{setupfontexpansion}
+\setinterfacecommand{setupfontprotrusion}{setupfontprotrusion}
+\setinterfacecommand{setupfonts}{setupfonts}
+\setinterfacecommand{setupfontsolution}{setupfontsolution}
\setinterfacecommand{setupfooter}{بارگذاری‌ته‌برگ}
\setinterfacecommand{setupfootertexts}{بارگذاری‌متن‌پانوشت}
\setinterfacecommand{setupfootnotedefinition}{بارگذاری‌تعریÙ‌پانوشت}
@@ -1761,6 +1925,7 @@
\setinterfacecommand{setupheadnumber}{بارگذاری‌شماره‌سر}
\setinterfacecommand{setupheads}{بارگذاری‌سرها}
\setinterfacecommand{setupheadtext}{بارگذاری‌متن‌سر}
+\setinterfacecommand{setuphyphenation}{setuphyphenation}
\setinterfacecommand{setuphyphenmark}{بارگذاری‌نشانه‌شکستن}
\setinterfacecommand{setupindentedtext}{setupindentedtext}
\setinterfacecommand{setupindenting}{بارگذاری‌تورÙتگی}
@@ -1777,6 +1942,7 @@
\setinterfacecommand{setuplanguage}{بارگذاری‌زبان}
\setinterfacecommand{setuplayout}{بارگذاری‌طرح‌بندی}
\setinterfacecommand{setuplegend}{بارگذاری‌راهنما}
+\setinterfacecommand{setuplinenote}{setuplinenote}
\setinterfacecommand{setuplinenumbering}{بارگذاری‌شماره‌‌گذاری‌خط}
\setinterfacecommand{setuplines}{بارگذاری‌خطها}
\setinterfacecommand{setuplinewidth}{بارگذاری‌عرض‌خط}
@@ -1789,6 +1955,10 @@
\setinterfacecommand{setupmarking}{بارگذاری‌نشانه‌گذاری}
\setinterfacecommand{setupmathalignment}{بارگذاری‌تنظیم‌ریاضی}
\setinterfacecommand{setupnarrower}{بارگذاری‌باریکتر}
+\setinterfacecommand{setupnotation}{setupnotation}
+\setinterfacecommand{setupnotations}{setupnotations}
+\setinterfacecommand{setupnote}{setupnote}
+\setinterfacecommand{setupnotes}{setupnotes}
\setinterfacecommand{setupnumber}{بارگذاری‌شماره}
\setinterfacecommand{setupnumbering}{بارگذاری‌شماره‌گذاری}
\setinterfacecommand{setupoppositeplacing}{بارگذاری‌درج‌مخالÙ}
@@ -1802,6 +1972,7 @@
\setinterfacecommand{setuppapersize}{بارگذاری‌اندازه‌برگ}
\setinterfacecommand{setupparagraphnumbering}{بارگذاری‌شماره‌گذاری‌پاراگراÙ}
\setinterfacecommand{setupparagraphs}{بارگذاری‌پاراگراÙها}
+\setinterfacecommand{setupperiodkerning}{setupperiodkerning}
\setinterfacecommand{setupplacement}{بارگذاری‌جانشانی}
\setinterfacecommand{setuppositioning}{بارگذاری‌مکان‌گذاری}
\setinterfacecommand{setupprofiles}{بارگذاری‌پروÙایلها}
@@ -1831,6 +2002,7 @@
\setinterfacecommand{setuptabulate}{بارگذاری‌جدول‌بندی}
\setinterfacecommand{setuptext}{بارگذاری‌متن}
\setinterfacecommand{setuptextbackground}{setuptextbackground}
+\setinterfacecommand{setuptextnote}{setuptextnote}
\setinterfacecommand{setuptextposition}{بارگذاری‌مکان‌متن}
\setinterfacecommand{setuptextrules}{بارگذاری‌خطهای‌متن}
\setinterfacecommand{setuptexttexts}{بارگذاری‌متن‌متنها}
@@ -1845,16 +2017,29 @@
\setinterfacecommand{setupurl}{setupurl}
\setinterfacecommand{setupversions}{بارگذاری‌نسخه‌ها}
\setinterfacecommand{setupwhitespace}{بارگذاری‌Ùضای‌سÙید}
+\setinterfacecommand{setvisualizerfont}{setvisualizerfont}
\setinterfacecommand{showbodyfont}{نمایش‌قلم‌بدنه}
\setinterfacecommand{showbodyfontenvironment}{نمایش‌محیط‌قلم‌بدنه}
\setinterfacecommand{showcolor}{نمایش‌رنگ}
\setinterfacecommand{showcolorgroup}{نمایش‌گروه‌رنگ}
+\setinterfacecommand{showcounter}{showcounter}
\setinterfacecommand{showexternalfigures}{نمایش‌شکلهای‌خارجی}
\setinterfacecommand{showfields}{نمایش‌میدانها}
+\setinterfacecommand{showfont}{showfont}
+\setinterfacecommand{showfontdata}{showfontdata}
+\setinterfacecommand{showfontexpansion}{showfontexpansion}
+\setinterfacecommand{showfontitalics}{showfontitalics}
+\setinterfacecommand{showfontkerns}{showfontkerns}
+\setinterfacecommand{showfontparameters}{showfontparameters}
+\setinterfacecommand{showfontstrip}{showfontstrip}
+\setinterfacecommand{showfontstyle}{showfontstyle}
\setinterfacecommand{showframe}{نمایش‌قالب}
\setinterfacecommand{showgrid}{نمایش‌توری}
+\setinterfacecommand{showhyphenationtrace}{showhyphenationtrace}
+\setinterfacecommand{showkerning}{showkerning}
\setinterfacecommand{showlayout}{نمایش‌طرح‌بندی}
\setinterfacecommand{showmakeup}{نمایش‌آرایش}
+\setinterfacecommand{showminimalbaseline}{showminimalbaseline}
\setinterfacecommand{showpalet}{نمایش‌لوح}
\setinterfacecommand{showprint}{نمایش‌چاپ}
\setinterfacecommand{showsetups}{نمایش‌بارگذاریها}
@@ -1864,6 +2049,7 @@
\setinterfacecommand{someline}{یک‌خط}
\setinterfacecommand{somewhere}{یک‌جا}
\setinterfacecommand{space}{Ùضا}
+\setinterfacecommand{specialitem}{specialitem}
\setinterfacecommand{splitfloat}{شکاÙتن‌شناور}
\setinterfacecommand{startalignment}{شروع‌تنظیم}
\setinterfacecommand{startbackground}{شروع‌پس‌زمینه}
@@ -1881,6 +2067,7 @@
\setinterfacecommand{startglobal}{شروع‌سراسری}
\setinterfacecommand{startline}{شروع‌خط}
\setinterfacecommand{startlinecorrection}{شروع‌تصحیح‌خط}
+\setinterfacecommand{startlinenote}{startlinenote}
\setinterfacecommand{startlinenumbering}{شروع‌شماره‌گذاری‌خط}
\setinterfacecommand{startlines}{شروع‌خطها}
\setinterfacecommand{startlocal}{شروع‌موضعی}
@@ -1891,7 +2078,7 @@
\setinterfacecommand{startnarrower}{شروع‌باریکتر}
\setinterfacecommand{startopposite}{شروع‌مخالÙ}
\setinterfacecommand{startoverlay}{شروع‌پوشش}
-\setinterfacecommand{startoverzicht}{شروع‌بازبینی}
+\setinterfacecommand{startoverview}{شروع‌بازبینی}
\setinterfacecommand{startpacked}{شروع‌Ùشرده}
\setinterfacecommand{startpositioning}{شروع‌مکان‌گذاری}
\setinterfacecommand{startproduct}{شروع‌تولید}
@@ -1923,6 +2110,7 @@
\setinterfacecommand{stopglobal}{پایان‌سراسری}
\setinterfacecommand{stopline}{پایان‌خط}
\setinterfacecommand{stoplinecorrection}{پایان‌تصحیح‌خط}
+\setinterfacecommand{stoplinenote}{stoplinenote}
\setinterfacecommand{stoplinenumbering}{پایان‌شماره‌گذاری‌خط}
\setinterfacecommand{stoplines}{پایان‌خطها}
\setinterfacecommand{stoplocal}{پایان‌موضعی}
@@ -1933,7 +2121,7 @@
\setinterfacecommand{stopnarrower}{پایان‌نازکتر}
\setinterfacecommand{stopopposite}{پایان‌مخالÙ}
\setinterfacecommand{stopoverlay}{پایان‌پوشش}
-\setinterfacecommand{stopoverzicht}{پایان‌بازبینی}
+\setinterfacecommand{stopoverview}{پایان‌بازبینی}
\setinterfacecommand{stoppacked}{پایان‌Ùشرده}
\setinterfacecommand{stoppositioning}{پایان‌مکان‌گذاری}
\setinterfacecommand{stopproduct}{پایان‌تولید}
@@ -1950,8 +2138,11 @@
\setinterfacecommand{stopunpacked}{پایان‌غیرÙشرده}
\setinterfacecommand{stopversion}{پایان‌نسخه}
\setinterfacecommand{stretched}{کشیده}
+\setinterfacecommand{strictinspectnextcharacter}{strictinspectnextcharacter}
+\setinterfacecommand{stripcharacter}{stripcharacter}
\setinterfacecommand{subformulanumber}{شماره‌زیرÙرمول}
\setinterfacecommand{subpagenumber}{شماره‌زیرصÙحه}
+\setinterfacecommand{subtractfeature}{subtractfeature}
\setinterfacecommand{switchtobodyfont}{تغییربه‌قلم‌بدنه}
\setinterfacecommand{switchtorawfont}{تغییربه‌قلم‌خام}
\setinterfacecommand{sym}{نم}
@@ -1961,16 +2152,24 @@
\setinterfacecommand{synchronize}{تطابق}
\setinterfacecommand{tab}{تب}
\setinterfacecommand{testcolumn}{ستون‌امتحان}
+\setinterfacecommand{testfeature}{testfeature}
+\setinterfacecommand{testfeatureonce}{testfeatureonce}
\setinterfacecommand{testpage}{صÙحه‌تست}
\setinterfacecommand{tex}{تک}
\setinterfacecommand{textbackground}{textbackground}
+\setinterfacecommand{textcolor}{textcolor}
\setinterfacecommand{textheight}{ارتÙاع‌متن}
+\setinterfacecommand{textnote}{textnote}
\setinterfacecommand{textreference}{مرجع‌متن}
\setinterfacecommand{textrule}{خط‌متن}
\setinterfacecommand{textvariable}{متغیر متن}
\setinterfacecommand{textwidth}{عرض‌متن}
+\setinterfacecommand{thefirstcharacter}{thefirstcharacter}
+\setinterfacecommand{thenormalizedbodyfontsize}{thenormalizedbodyfontsize}
+\setinterfacecommand{theremainingcharacters}{theremainingcharacters}
\setinterfacecommand{thinrule}{خط‌نازک}
\setinterfacecommand{thinrules}{خطهای‌نازک}
+\setinterfacecommand{tolinenote}{tolinenote}
\setinterfacecommand{tooltip}{tooltip}
\setinterfacecommand{topdistance}{Ùاصله‌بالا}
\setinterfacecommand{topheight}{ارتÙاع‌بالا}
@@ -1981,13 +2180,19 @@
\setinterfacecommand{typ}{typ}
\setinterfacecommand{type}{تایپ}
\setinterfacecommand{typebuffer}{تایپ‌باÙر}
+\setinterfacecommand{typedefinedbuffer}{typedefinedbuffer}
\setinterfacecommand{typefile}{تایپ‌پرونده}
+\setinterfacecommand{typeinlinebuffer}{typeinlinebuffer}
+\setinterfacecommand{typing}{typing}
\setinterfacecommand{unitmeaning}{معنی‌واحد}
\setinterfacecommand{unknown}{ناشناس}
+\setinterfacecommand{unregisterhyphenationpattern}{unregisterhyphenationpattern}
\setinterfacecommand{useJSscripts}{useJSscripts}
\setinterfacecommand{useURL}{useURL}
\setinterfacecommand{useXMLfilter}{useXMLfilter}
\setinterfacecommand{useblocks}{استÙاده‌بلوکها}
+\setinterfacecommand{usebodyfont}{usebodyfont}
+\setinterfacecommand{usebodyfontparameter}{usebodyfontparameter}
\setinterfacecommand{usecommands}{استÙاده‌Ùرمانها}
\setinterfacecommand{useencoding}{استÙاده‌رمزینه}
\setinterfacecommand{useexternaldocument}{استÙاده‌نوشتارخارجی}
@@ -2004,10 +2209,12 @@
\setinterfacecommand{usetypescript}{استÙاده‌دستخط‌تایپ}
\setinterfacecommand{usetypescriptfile}{استÙاده‌پرونده‌دستخط‌تایپ}
\setinterfacecommand{useurl}{useurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{نسخه}
\setinterfacecommand{vl}{خ‌ع}
\setinterfacecommand{weekday}{روزهÙته}
\setinterfacecommand{whitespace}{Ùضای‌سÙید}
+\setinterfacecommand{widthspanningtext}{widthspanningtext}
\setinterfacecommand{wordright}{کلمه‌راست}
\setinterfacecommand{writebetweenlist}{بنویس‌بین‌لیست}
\setinterfacecommand{writetolist}{بنویس‌در‌لیست}
diff --git a/Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii b/Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii
index 219e59dd892..e497b8d6b79 100644
--- a/Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/mult-ro.mkii
@@ -128,6 +128,9 @@
\setinterfacevariable{camel}{camel}
\setinterfacevariable{cap}{cap}
\setinterfacevariable{capital}{majuscula}
+\setinterfacevariable{category}{category}
+\setinterfacevariable{cd:character}{cd:character}
+\setinterfacevariable{cd:font}{cd:font}
\setinterfacevariable{center}{center}
\setinterfacevariable{centerlast}{centerlast}
\setinterfacevariable{chapter}{capitol}
@@ -186,6 +189,7 @@
\setinterfacevariable{external}{extern}
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fapt}
+\setinterfacevariable{fallback}{fallback}
\setinterfacevariable{february}{februarie}
\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{figura}
@@ -207,6 +211,7 @@
\setinterfacevariable{flushouter}{flushouter}
\setinterfacevariable{flushright}{flushright}
\setinterfacevariable{followingpage}{followingpage}
+\setinterfacevariable{font}{font}
\setinterfacevariable{footer}{subsol}
\setinterfacevariable{footnote}{notasubsol}
\setinterfacevariable{force}{fortat}
@@ -278,6 +283,7 @@
\setinterfacevariable{intermezzo}{intermezzo}
\setinterfacevariable{intext}{intext}
\setinterfacevariable{intro}{intro}
+\setinterfacevariable{invertedshort}{invertedshort}
\setinterfacevariable{italic}{italic}
\setinterfacevariable{italicbold}{italicaldin}
\setinterfacevariable{item}{element}
@@ -381,6 +387,7 @@
\setinterfacevariable{nonumber}{nonumber}
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{normal}
+\setinterfacevariable{normalshort}{normalshort}
\setinterfacevariable{nospacing}{nospacing}
\setinterfacevariable{nostopper}{nostopper}
\setinterfacevariable{not}{nu}
@@ -448,6 +455,7 @@
\setinterfacevariable{rectangular}{rectangular}
\setinterfacevariable{reference}{referinta}
\setinterfacevariable{referral}{referinta}
+\setinterfacevariable{region}{region}
\setinterfacevariable{register}{registru}
\setinterfacevariable{regular}{regular}
\setinterfacevariable{relative}{relativ}
@@ -629,6 +637,7 @@
\setinterfaceconstant{afterkey}{dupatasta}
\setinterfaceconstant{aftersection}{aftersection}
\setinterfaceconstant{align}{aliniere}
+\setinterfaceconstant{alignbottom}{alignbottom}
\setinterfaceconstant{aligncharacter}{aliniazacaracter}
\setinterfaceconstant{alignmentcharacter}{alierecaracter}
\setinterfaceconstant{alignmentleftsample}{alignmentleftsample}
@@ -765,6 +774,9 @@
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
\setinterfaceconstant{default}{implicit}
+\setinterfaceconstant{defaultheight}{defaultheight}
+\setinterfaceconstant{defaultwidth}{defaultwidth}
+\setinterfaceconstant{define}{define}
\setinterfaceconstant{delay}{intarziere}
\setinterfaceconstant{depth}{inaltime}
\setinterfaceconstant{depthcorrection}{corectieadancime}
@@ -804,8 +816,10 @@
\setinterfaceconstant{extras}{extras}
\setinterfaceconstant{factor}{factor}
\setinterfaceconstant{fallback}{fallback}
+\setinterfaceconstant{fallbacks}{fallbacks}
\setinterfaceconstant{family}{familie}
\setinterfaceconstant{features}{features}
+\setinterfaceconstant{featureset}{featureset}
\setinterfaceconstant{fences}{fences}
\setinterfaceconstant{field}{field}
\setinterfaceconstant{fieldbackgroundcolor}{culoarefundalcamp}
@@ -826,6 +840,7 @@
\setinterfaceconstant{focusin}{focusin}
\setinterfaceconstant{focusoffset}{focusoffset}
\setinterfaceconstant{focusout}{focusout}
+\setinterfaceconstant{font}{font}
\setinterfaceconstant{footer}{subsol}
\setinterfaceconstant{footerdistance}{distantasubsol}
\setinterfaceconstant{footerstate}{staresubsol}
@@ -880,6 +895,7 @@
\setinterfaceconstant{increment}{increment}
\setinterfaceconstant{incrementnumber}{numarincrement}
\setinterfaceconstant{indenting}{aliniat}
+\setinterfaceconstant{indentlist}{indentlist}
\setinterfaceconstant{indentnext}{aliniaturmator}
\setinterfaceconstant{index}{index}
\setinterfaceconstant{indicator}{indicator}
@@ -907,7 +923,10 @@
\setinterfaceconstant{keys}{keys}
\setinterfaceconstant{keyword}{keyword}
\setinterfaceconstant{label}{eticheta}
+\setinterfaceconstant{labelalternative}{labelalternative}
+\setinterfaceconstant{labelcolor}{labelcolor}
\setinterfaceconstant{labeloffset}{labeloffset}
+\setinterfaceconstant{labelstyle}{labelstyle}
\setinterfaceconstant{language}{language}
\setinterfaceconstant{last}{last}
\setinterfaceconstant{lastnamesep}{lastnamesep}
@@ -941,6 +960,7 @@
\setinterfaceconstant{limittext}{limittext}
\setinterfaceconstant{line}{linie}
\setinterfaceconstant{linecorrection}{corectielinie}
+\setinterfaceconstant{linedirection}{linedirection}
\setinterfaceconstant{lines}{linii}
\setinterfaceconstant{list}{lista}
\setinterfaceconstant{listtext}{listtext}
@@ -1081,6 +1101,7 @@
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{pune}
\setinterfaceconstant{placehead}{punetitlu}
+\setinterfaceconstant{placeholder}{placeholder}
\setinterfaceconstant{placestopper}{punestopper}
\setinterfaceconstant{position}{pozitie}
\setinterfaceconstant{prefix}{prefix}
@@ -1099,6 +1120,7 @@
\setinterfaceconstant{print}{print}
\setinterfaceconstant{printable}{tiparibil}
\setinterfaceconstant{process}{process}
+\setinterfaceconstant{processors}{processors}
\setinterfaceconstant{profile}{profile}
\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
@@ -1112,6 +1134,7 @@
\setinterfaceconstant{reference}{referinta}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{referinta}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{regiuneintrare}
@@ -1350,7 +1373,6 @@
\setinterfaceelement{type}{type}
% definitions for interface commands for language ro
%
-\setinterfacecommand{CAPPED}{KAP}
\setinterfacecommand{Character}{Litera}
\setinterfacecommand{Characters}{Litere}
\setinterfacecommand{MONTH}{LUNA}
@@ -1364,8 +1386,18 @@
\setinterfacecommand{Word}{Cuvant}
\setinterfacecommand{Words}{Cuvinte}
\setinterfacecommand{about}{despre}
+\setinterfacecommand{adaptfontfeature}{adaptfontfeature}
\setinterfacecommand{adaptlayout}{adapteazaaspect}
+\setinterfacecommand{addfeature}{addfeature}
+\setinterfacecommand{alignbottom}{alignbottom}
+\setinterfacecommand{aligned}{aligned}
+\setinterfacecommand{alignedbox}{alignedbox}
+\setinterfacecommand{alignedline}{alignedline}
+\setinterfacecommand{alignhere}{alignhere}
\setinterfacecommand{alignment}{alignment}
+\setinterfacecommand{alignmentcharacter}{alignmentcharacter}
+\setinterfacecommand{applytocharacters}{applytocharacters}
+\setinterfacecommand{applytofirstcharacter}{applytofirstcharacter}
\setinterfacecommand{arg}{arg}
\setinterfacecommand{at}{la}
\setinterfacecommand{atleftmargin}{atleftmargin}
@@ -1377,9 +1409,13 @@
\setinterfacecommand{blackrules}{liniinegre}
\setinterfacecommand{blank}{blanc}
\setinterfacecommand{bookmark}{semncarte}
+\setinterfacecommand{bottombox}{bottombox}
\setinterfacecommand{bottomdistance}{distantajos}
\setinterfacecommand{bottomheight}{inaltimejos}
+\setinterfacecommand{bottomleftbox}{bottomleftbox}
+\setinterfacecommand{bottomrightbox}{bottomrightbox}
\setinterfacecommand{bottomspace}{spatiujos}
+\setinterfacecommand{buildtextbottomdot}{buildtextbottomdot}
\setinterfacecommand{but}{but}
\setinterfacecommand{button}{buton}
\setinterfacecommand{bypassblocks}{saripesteblocuri}
@@ -1418,8 +1454,11 @@
\setinterfacecommand{defineblock}{definestebloc}
\setinterfacecommand{definebodyfont}{definestefonttext}
\setinterfacecommand{definebodyfontenvironment}{definestemediulfonttext}
+\setinterfacecommand{definebodyfontswitch}{definebodyfontswitch}
\setinterfacecommand{definebuffer}{definestebuffer}
\setinterfacecommand{definecharacter}{definestecaracter}
+\setinterfacecommand{definecharacterkerning}{definecharacterkerning}
+\setinterfacecommand{definecharacterspacing}{definecharacterspacing}
\setinterfacecommand{definecolor}{definesteculoare}
\setinterfacecommand{definecolorgroup}{definestegrupculori}
\setinterfacecommand{definecolumnbreak}{definecolumnbreak}
@@ -1429,37 +1468,57 @@
\setinterfacecommand{definecommand}{definestecomanda}
\setinterfacecommand{defineconversion}{definesteconversie}
\setinterfacecommand{definedescription}{definestedescriere}
+\setinterfacecommand{definedfont}{definedfont}
\setinterfacecommand{defineenumeration}{definesteenumerare}
+\setinterfacecommand{definefallbackfamily}{definefallbackfamily}
\setinterfacecommand{definefield}{definestecamp}
\setinterfacecommand{definefieldstack}{definestestivacampuri}
\setinterfacecommand{definefiguresymbol}{definestesimbolfigura}
+\setinterfacecommand{definefilefallback}{definefilefallback}
+\setinterfacecommand{definefirstline}{definefirstline}
\setinterfacecommand{definefloat}{definestefloat}
\setinterfacecommand{definefont}{definestefont}
+\setinterfacecommand{definefontalternative}{definefontalternative}
+\setinterfacecommand{definefontfallback}{definefontfallback}
+\setinterfacecommand{definefontfamily}{definefontfamily}
+\setinterfacecommand{definefontfamilypreset}{definefontfamilypreset}
+\setinterfacecommand{definefontfeature}{definefontfeature}
+\setinterfacecommand{definefontfile}{definefontfile}
+\setinterfacecommand{definefontsize}{definefontsize}
+\setinterfacecommand{definefontsolution}{definefontsolution}
\setinterfacecommand{definefontstyle}{definestestilfont}
\setinterfacecommand{definefontsynonym}{definestesinonimfont}
\setinterfacecommand{defineframed}{definesteinconjurare}
\setinterfacecommand{defineframedtext}{definestetextinconjurat}
+\setinterfacecommand{definefrozenfont}{definefrozenfont}
\setinterfacecommand{definehbox}{definestehbox}
\setinterfacecommand{definehead}{definesteantet}
+\setinterfacecommand{definehyphenationfeatures}{definehyphenationfeatures}
\setinterfacecommand{defineindentedtext}{defineindentedtext}
\setinterfacecommand{defineinmargin}{defineinmargin}
\setinterfacecommand{defineinteractionmenu}{definestemeniuinteractiune}
\setinterfacecommand{defineitemgroup}{defineitemgroup}
+\setinterfacecommand{defineitems}{defineitems}
\setinterfacecommand{definelabel}{definesteeticheta}
\setinterfacecommand{definelayer}{definelayer}
\setinterfacecommand{definelayout}{definelayout}
+\setinterfacecommand{definelinenote}{definelinenote}
\setinterfacecommand{definelist}{definestelista}
\setinterfacecommand{definelogo}{definestelogo}
\setinterfacecommand{definemainfield}{definestecampprincipal}
\setinterfacecommand{definemakeup}{definestemakeup}
\setinterfacecommand{definemarking}{definestemarcaje}
\setinterfacecommand{definemathalignment}{definemathalignment}
+\setinterfacecommand{definemode}{definemode}
+\setinterfacecommand{definenamedcolor}{definenamedcolor}
+\setinterfacecommand{definenote}{definenote}
\setinterfacecommand{defineoutput}{definesteoutput}
\setinterfacecommand{defineoverlay}{definesteoverlay}
\setinterfacecommand{definepagebreak}{definepagebreak}
\setinterfacecommand{definepalet}{definestepaleta}
\setinterfacecommand{definepapersize}{definestedimensiunehartie}
\setinterfacecommand{defineparagraphs}{definesteparagraf}
+\setinterfacecommand{defineperiodkerning}{defineperiodkerning}
\setinterfacecommand{defineplacement}{defineplacement}
\setinterfacecommand{defineprofile}{definesteprofil}
\setinterfacecommand{defineprogram}{definesteprogram}
@@ -1481,33 +1540,45 @@
\setinterfacecommand{definetabulate}{definestetabulatori}
\setinterfacecommand{definetext}{definestetext}
\setinterfacecommand{definetextbackground}{definetextbackground}
+\setinterfacecommand{definetextnote}{definetextnote}
\setinterfacecommand{definetextposition}{definestepozitietext}
\setinterfacecommand{definetextvariable}{definestevariabilatext}
\setinterfacecommand{definetype}{definetype}
\setinterfacecommand{definetyping}{definestetyping}
\setinterfacecommand{defineversion}{definesteversiune}
+\setinterfacecommand{depthspanningtext}{depthspanningtext}
\setinterfacecommand{determineheadnumber}{determinanumartitlu}
\setinterfacecommand{determinelistcharacteristics}{determinacaracteristicilelistei}
\setinterfacecommand{determineregistercharacteristics}{determinacaracteristiciregistru}
\setinterfacecommand{dimension}{dimensiune}
\setinterfacecommand{disableinteractionmenu}{dezactiveazameniuinteractiune}
+\setinterfacecommand{disablemode}{disablemode}
+\setinterfacecommand{doaddfeature}{doaddfeature}
\setinterfacecommand{domicile}{domiciliu}
+\setinterfacecommand{dontconvertfont}{dontconvertfont}
\setinterfacecommand{donttest}{nutesta}
\setinterfacecommand{edgedistance}{distantacolt}
\setinterfacecommand{edgewidth}{latimecolturi}
+\setinterfacecommand{emphasisboldface}{emphasisboldface}
\setinterfacecommand{emptylines}{emptylines}
+\setinterfacecommand{enablemode}{enablemode}
\setinterfacecommand{environment}{mediu}
\setinterfacecommand{externalfigure}{figuraexterna}
\setinterfacecommand{fact}{fact}
+\setinterfacecommand{fastswitchtobodyfont}{fastswitchtobodyfont}
+\setinterfacecommand{feature}{feature}
\setinterfacecommand{field}{camp}
\setinterfacecommand{fieldstack}{stivacampuri}
\setinterfacecommand{fillinfield}{campumplere}
\setinterfacecommand{fillinline}{linieumplere}
\setinterfacecommand{fillinrules}{rigleumplere}
\setinterfacecommand{fillintext}{textumplere}
+\setinterfacecommand{firstcharacter}{firstcharacter}
\setinterfacecommand{fitfield}{potrivestecamp}
+\setinterfacecommand{fittopbaselinegrid}{fittopbaselinegrid}
\setinterfacecommand{fixedspace}{spatiufixat}
\setinterfacecommand{fixedspaces}{spatiifixate}
+\setinterfacecommand{flushnotes}{flushnotes}
\setinterfacecommand{followprofile}{urmeazaprofil}
\setinterfacecommand{followprofileversion}{urmeazaversiuneprofil}
\setinterfacecommand{followversion}{urmeazaversiune}
@@ -1516,13 +1587,19 @@
\setinterfacecommand{footnote}{notasubsol}
\setinterfacecommand{footnotetext}{footnotetext}
\setinterfacecommand{forceblocks}{forteazablocuri}
+\setinterfacecommand{forcecharacterstripping}{forcecharacterstripping}
\setinterfacecommand{formulanumber}{numarformula}
\setinterfacecommand{fraction}{fractie}
\setinterfacecommand{framed}{framed}
\setinterfacecommand{from}{din}
+\setinterfacecommand{fromlinenote}{fromlinenote}
\setinterfacecommand{getbuffer}{adubuffer}
+\setinterfacecommand{getfirstcharacter}{getfirstcharacter}
\setinterfacecommand{getmarking}{adumarcaje}
\setinterfacecommand{getnumber}{getnumber}
+\setinterfacecommand{globaldisablemode}{globaldisablemode}
+\setinterfacecommand{globalenablemode}{globalenablemode}
+\setinterfacecommand{globalpreventmode}{globalpreventmode}
\setinterfacecommand{godown}{injos}
\setinterfacecommand{goto}{dute}
\setinterfacecommand{gotobox}{dutebox}
@@ -1538,6 +1615,7 @@
\setinterfacecommand{headnumber}{numartitlu}
\setinterfacecommand{headsym}{headsym}
\setinterfacecommand{headtext}{texttitlu}
+\setinterfacecommand{heightspanningtext}{heightspanningtext}
\setinterfacecommand{hideblocks}{ascundeblocuri}
\setinterfacecommand{high}{inalt}
\setinterfacecommand{hl}{hl}
@@ -1569,26 +1647,37 @@
\setinterfacecommand{interactionbuttons}{butoaneinteractiune}
\setinterfacecommand{interactionmenu}{meniuinteractiune}
\setinterfacecommand{item}{element}
+\setinterfacecommand{itemgroup}{itemgroup}
\setinterfacecommand{items}{element}
+\setinterfacecommand{itemtag}{itemtag}
\setinterfacecommand{its}{el}
\setinterfacecommand{keepblocks}{pastreazablocuri}
+\setinterfacecommand{kerncharacters}{kerncharacters}
\setinterfacecommand{label}{eticheta}
\setinterfacecommand{labels}{etichete}
\setinterfacecommand{labeltext}{texteticheta}
\setinterfacecommand{language}{limba}
+\setinterfacecommand{languageCharacters}{languageCharacters}
+\setinterfacecommand{languagecharacters}{languagecharacters}
\setinterfacecommand{leftaligned}{aliniatstanga}
+\setinterfacecommand{leftbottombox}{leftbottombox}
\setinterfacecommand{leftedgedistance}{distantacoltstanga}
\setinterfacecommand{leftedgewidth}{latimecoltstanga}
+\setinterfacecommand{leftline}{leftline}
\setinterfacecommand{leftmargindistance}{distantamarginestanga}
\setinterfacecommand{leftmarginwidth}{latimemarginestanga}
\setinterfacecommand{leg}{leg}
\setinterfacecommand{linecorrection}{linecorrection}
+\setinterfacecommand{linenote}{linenote}
+\setinterfacecommand{linespanningtext}{linespanningtext}
\setinterfacecommand{linewidth}{grosimelinie}
\setinterfacecommand{listheight}{inaltimelista}
\setinterfacecommand{listlength}{lungimelista}
\setinterfacecommand{listsymbol}{listsymbol}
\setinterfacecommand{listwidth}{latimelista}
+\setinterfacecommand{loadfontgoodies}{loadfontgoodies}
\setinterfacecommand{localfootnotes}{localfootnotes}
+\setinterfacecommand{localnotes}{localnotes}
\setinterfacecommand{logfields}{logcampuri}
\setinterfacecommand{lohi}{jossus}
\setinterfacecommand{low}{jos}
@@ -1619,6 +1708,7 @@
\setinterfacecommand{nodimension}{faradimensiune}
\setinterfacecommand{noheaderandfooterlines}{faraliniiantetsisubsol}
\setinterfacecommand{noindenting}{faraaliniat}
+\setinterfacecommand{noitem}{noitem}
\setinterfacecommand{nolist}{faralista}
\setinterfacecommand{nomarking}{faramarcaje}
\setinterfacecommand{nomoreblocks}{gatablocuri}
@@ -1626,6 +1716,7 @@
\setinterfacecommand{nop}{nop}
\setinterfacecommand{nospace}{faraspatiu}
\setinterfacecommand{note}{nota}
+\setinterfacecommand{notesymbol}{notesymbol}
\setinterfacecommand{notopandbottomlines}{faraliniisussijos}
\setinterfacecommand{notsmallcapped}{nokap}
\setinterfacecommand{nowhitespace}{faraspatiualb}
@@ -1637,6 +1728,7 @@
\setinterfacecommand{outermarginwidth}{outermarginwidth}
\setinterfacecommand{packed}{impachetat}
\setinterfacecommand{page}{pagina}
+\setinterfacecommand{pagebreak}{pagebreak}
\setinterfacecommand{pagedepth}{pagedepth}
\setinterfacecommand{pagenumber}{numarpagina}
\setinterfacecommand{pageoffset}{pageoffset}
@@ -1655,7 +1747,10 @@
\setinterfacecommand{placelist}{punelista}
\setinterfacecommand{placelistofsynonyms}{placelistofsynonyms}
\setinterfacecommand{placelocalfootnotes}{punenotesubsollocale}
+\setinterfacecommand{placelocalnotes}{placelocalnotes}
\setinterfacecommand{placelogos}{punelogouri}
+\setinterfacecommand{placenamedfloat}{placenamedfloat}
+\setinterfacecommand{placenotes}{placenotes}
\setinterfacecommand{placeongrid}{plaseazapegrid}
\setinterfacecommand{placeontopofeachother}{punedeasuprafiecareia}
\setinterfacecommand{placepagenumber}{punenumarpagina}
@@ -1668,9 +1763,17 @@
\setinterfacecommand{placetextvariable}{punevariabilatext}
\setinterfacecommand{position}{pozitie}
\setinterfacecommand{positiontext}{pozitietext}
+\setinterfacecommand{postponenotes}{postponenotes}
+\setinterfacecommand{postponingnotes}{postponingnotes}
+\setinterfacecommand{predefinedfont}{predefinedfont}
+\setinterfacecommand{predefinefont}{predefinefont}
+\setinterfacecommand{presetdocument}{presetdocument}
+\setinterfacecommand{prettyprintbuffer}{prettyprintbuffer}
+\setinterfacecommand{preventmode}{preventmode}
\setinterfacecommand{printpaperheight}{inaltimehartieimprimanta}
\setinterfacecommand{printpaperwidth}{latimehartieimprimanta}
\setinterfacecommand{processblocks}{proceseazabloc}
+\setinterfacecommand{processbodyfontenvironmentlist}{processbodyfontenvironmentlist}
\setinterfacecommand{processpage}{proceseazapagina}
\setinterfacecommand{product}{produs}
\setinterfacecommand{program}{program}
@@ -1680,19 +1783,45 @@
\setinterfacecommand{quote}{minicitat}
\setinterfacecommand{ran}{ran}
\setinterfacecommand{redo}{refa}
+\setinterfacecommand{redoconvertfont}{redoconvertfont}
\setinterfacecommand{ref}{ref}
\setinterfacecommand{reference}{referinta}
\setinterfacecommand{referral}{referit}
\setinterfacecommand{referraldate}{datareferit}
\setinterfacecommand{referring}{referring}
+\setinterfacecommand{registerfontclass}{registerfontclass}
+\setinterfacecommand{registerhyphenationexception}{registerhyphenationexception}
+\setinterfacecommand{registerhyphenationpattern}{registerhyphenationpattern}
\setinterfacecommand{remark}{remarca}
+\setinterfacecommand{replacefeature}{replacefeature}
\setinterfacecommand{reset}{reset}
+\setinterfacecommand{resetandaddfeature}{resetandaddfeature}
+\setinterfacecommand{resetcharacteralign}{resetcharacteralign}
+\setinterfacecommand{resetcharacterkerning}{resetcharacterkerning}
+\setinterfacecommand{resetcharacterspacing}{resetcharacterspacing}
+\setinterfacecommand{resetcharacterstripping}{resetcharacterstripping}
+\setinterfacecommand{resetfeature}{resetfeature}
+\setinterfacecommand{resetfontcolorsheme}{resetfontcolorsheme}
+\setinterfacecommand{resetfontfallback}{resetfontfallback}
+\setinterfacecommand{resetfontsolution}{resetfontsolution}
+\setinterfacecommand{resethyphenationfeatures}{resethyphenationfeatures}
+\setinterfacecommand{resetlocalfloats}{resetlocalfloats}
\setinterfacecommand{resetmarking}{reseteazamarcaje}
+\setinterfacecommand{resetmode}{resetmode}
\setinterfacecommand{resetnumber}{resetnumber}
-\setinterfacecommand{resettext}{resettextcontent}
+\setinterfacecommand{resetpath}{resetpath}
+\setinterfacecommand{resetperiodkerning}{resetperiodkerning}
+\setinterfacecommand{resetsystemmode}{resetsystemmode}
+\setinterfacecommand{resettextcontent}{resettextcontent}
+\setinterfacecommand{resetvisualizers}{resetvisualizers}
+\setinterfacecommand{restoreglobalbodyfont}{restoreglobalbodyfont}
+\setinterfacecommand{retestfeature}{retestfeature}
+\setinterfacecommand{revivefeature}{revivefeature}
\setinterfacecommand{rightaligned}{aliniatdreapta}
+\setinterfacecommand{rightbottombox}{rightbottombox}
\setinterfacecommand{rightedgedistance}{distantacoltdreapta}
\setinterfacecommand{rightedgewidth}{latimecoltdreapta}
+\setinterfacecommand{rightline}{rightline}
\setinterfacecommand{rightmargindistance}{distantamarginedreapta}
\setinterfacecommand{rightmarginwidth}{latimemarginedreapta}
\setinterfacecommand{romannumerals}{numereromane}
@@ -1703,12 +1832,38 @@
\setinterfacecommand{selectblocks}{selecteazablocuri}
\setinterfacecommand{selectpaper}{selecteazahartie}
\setinterfacecommand{selectversion}{selecteazaversiune}
+\setinterfacecommand{setbigbodyfont}{setbigbodyfont}
+\setinterfacecommand{setcharacteralign}{setcharacteralign}
+\setinterfacecommand{setcharacteraligndetail}{setcharacteraligndetail}
+\setinterfacecommand{setcharactercasing}{setcharactercasing}
+\setinterfacecommand{setcharactercleaning}{setcharactercleaning}
+\setinterfacecommand{setcharacterkerning}{setcharacterkerning}
+\setinterfacecommand{setcharacterspacing}{setcharacterspacing}
+\setinterfacecommand{setcharacterstripping}{setcharacterstripping}
+\setinterfacecommand{setcurrentfontclass}{setcurrentfontclass}
+\setinterfacecommand{setfirstline}{setfirstline}
+\setinterfacecommand{setfirstpasscharacteralign}{setfirstpasscharacteralign}
+\setinterfacecommand{setfont}{setfont}
+\setinterfacecommand{setfontcolorsheme}{setfontcolorsheme}
+\setinterfacecommand{setfontfeature}{setfontfeature}
+\setinterfacecommand{setfontsolution}{setfontsolution}
+\setinterfacecommand{setfontstrut}{setfontstrut}
+\setinterfacecommand{sethyphenationfeatures}{sethyphenationfeatures}
+\setinterfacecommand{setmainbodyfont}{setmainbodyfont}
+\setinterfacecommand{setmode}{setmode}
+\setinterfacecommand{setnote}{setnote}
+\setinterfacecommand{setnotetext}{setnotetext}
\setinterfacecommand{setnumber}{setnumber}
+\setinterfacecommand{setperiodkerning}{setperiodkerning}
+\setinterfacecommand{setsecondpasscharacteralign}{setsecondpasscharacteralign}
+\setinterfacecommand{setsmallbodyfont}{setsmallbodyfont}
+\setinterfacecommand{setsystemmode}{setsystemmode}
\setinterfacecommand{settextcontent}{settextcontent}
\setinterfacecommand{settextvariable}{setvariabilatext}
\setinterfacecommand{setupalign}{seteazaalinierea}
\setinterfacecommand{setupanswerarea}{setupanswerarea}
\setinterfacecommand{setuparranging}{seteazaaranjareapag}
+\setinterfacecommand{setupattachment}{setupattachment}
\setinterfacecommand{setupbackground}{seteazafundal}
\setinterfacecommand{setupbackgrounds}{seteazafundaluri}
\setinterfacecommand{setupblackrules}{seteazaliniinegre}
@@ -1723,6 +1878,9 @@
\setinterfacecommand{setupcapitals}{seteazamajuscule}
\setinterfacecommand{setupcaption}{seteazalegenda}
\setinterfacecommand{setupcaptions}{seteazalegendele}
+\setinterfacecommand{setupcharacteralign}{setupcharacteralign}
+\setinterfacecommand{setupcharacterkerning}{setupcharacterkerning}
+\setinterfacecommand{setupcharacterspacing}{setupcharacterspacing}
\setinterfacecommand{setupclipping}{seteazaclipping}
\setinterfacecommand{setupcolor}{seteazaculoare}
\setinterfacecommand{setupcolors}{seteazaculori}
@@ -1733,6 +1891,7 @@
\setinterfacecommand{setupcombinations}{seteazacombinari}
\setinterfacecommand{setupcombinedlist}{seteazalistacombinata}
\setinterfacecommand{setupcomment}{seteazacomentariu}
+\setinterfacecommand{setupcounter}{setupcounter}
\setinterfacecommand{setupdescription}{setupdescription}
\setinterfacecommand{setupdescriptions}{seteazadescriere}
\setinterfacecommand{setupenumeration}{setupenumeration}
@@ -1742,9 +1901,14 @@
\setinterfacecommand{setupfields}{seteazacampuri}
\setinterfacecommand{setupfillinlines}{seteazaliniiumplere}
\setinterfacecommand{setupfillinrules}{seteazarigleumplere}
+\setinterfacecommand{setupfirstline}{setupfirstline}
\setinterfacecommand{setupfloat}{seteazafloat}
\setinterfacecommand{setupfloats}{seteazafloats}
\setinterfacecommand{setupfloatsplitting}{seteazaimpartireafloat}
+\setinterfacecommand{setupfontexpansion}{setupfontexpansion}
+\setinterfacecommand{setupfontprotrusion}{setupfontprotrusion}
+\setinterfacecommand{setupfonts}{setupfonts}
+\setinterfacecommand{setupfontsolution}{setupfontsolution}
\setinterfacecommand{setupfooter}{seteazasubsol}
\setinterfacecommand{setupfootertexts}{seteazatextesubsol}
\setinterfacecommand{setupfootnotedefinition}{seteazadefinireanotasubsol}
@@ -1761,6 +1925,7 @@
\setinterfacecommand{setupheadnumber}{seteazanumartitlu}
\setinterfacecommand{setupheads}{seteazatitluri}
\setinterfacecommand{setupheadtext}{seteazatexttitlu}
+\setinterfacecommand{setuphyphenation}{setuphyphenation}
\setinterfacecommand{setuphyphenmark}{seteazaliniesilabe}
\setinterfacecommand{setupindentedtext}{setupindentedtext}
\setinterfacecommand{setupindenting}{seteazaaliniat}
@@ -1777,6 +1942,7 @@
\setinterfacecommand{setuplanguage}{setarelimba}
\setinterfacecommand{setuplayout}{seteazaaspect}
\setinterfacecommand{setuplegend}{seteazalegenda}
+\setinterfacecommand{setuplinenote}{setuplinenote}
\setinterfacecommand{setuplinenumbering}{seteazanumerotarelinii}
\setinterfacecommand{setuplines}{seteazalinii}
\setinterfacecommand{setuplinewidth}{seteazagrosimelinie}
@@ -1789,6 +1955,10 @@
\setinterfacecommand{setupmarking}{seteazamarcaje}
\setinterfacecommand{setupmathalignment}{setupmathalignment}
\setinterfacecommand{setupnarrower}{seteazaingust}
+\setinterfacecommand{setupnotation}{setupnotation}
+\setinterfacecommand{setupnotations}{setupnotations}
+\setinterfacecommand{setupnote}{setupnote}
+\setinterfacecommand{setupnotes}{setupnotes}
\setinterfacecommand{setupnumber}{setupnumber}
\setinterfacecommand{setupnumbering}{seteazanumerotare}
\setinterfacecommand{setupoppositeplacing}{seteazaplasareaopozita}
@@ -1802,6 +1972,7 @@
\setinterfacecommand{setuppapersize}{seteazadimensiunihartie}
\setinterfacecommand{setupparagraphnumbering}{seteazanumerotareparagrafe}
\setinterfacecommand{setupparagraphs}{seteazaparagrafe}
+\setinterfacecommand{setupperiodkerning}{setupperiodkerning}
\setinterfacecommand{setupplacement}{setupplacement}
\setinterfacecommand{setuppositioning}{setarepozitie}
\setinterfacecommand{setupprofiles}{seteazaprofile}
@@ -1831,6 +2002,7 @@
\setinterfacecommand{setuptabulate}{seteazatabulatori}
\setinterfacecommand{setuptext}{seteazatext}
\setinterfacecommand{setuptextbackground}{setuptextbackground}
+\setinterfacecommand{setuptextnote}{setuptextnote}
\setinterfacecommand{setuptextposition}{seteazapozitietext}
\setinterfacecommand{setuptextrules}{seteazarigletext}
\setinterfacecommand{setuptexttexts}{seteazatextetext}
@@ -1845,16 +2017,29 @@
\setinterfacecommand{setupurl}{seteazaurl}
\setinterfacecommand{setupversions}{seteazaversiuni}
\setinterfacecommand{setupwhitespace}{seteazaspatiualb}
+\setinterfacecommand{setvisualizerfont}{setvisualizerfont}
\setinterfacecommand{showbodyfont}{afiseazafonttext}
\setinterfacecommand{showbodyfontenvironment}{afiseazamediufonttext}
\setinterfacecommand{showcolor}{afiseazaculoare}
\setinterfacecommand{showcolorgroup}{afiseazagrupculoare}
+\setinterfacecommand{showcounter}{showcounter}
\setinterfacecommand{showexternalfigures}{afiseazafiguriexterne}
\setinterfacecommand{showfields}{afiseazacampuri}
+\setinterfacecommand{showfont}{showfont}
+\setinterfacecommand{showfontdata}{showfontdata}
+\setinterfacecommand{showfontexpansion}{showfontexpansion}
+\setinterfacecommand{showfontitalics}{showfontitalics}
+\setinterfacecommand{showfontkerns}{showfontkerns}
+\setinterfacecommand{showfontparameters}{showfontparameters}
+\setinterfacecommand{showfontstrip}{showfontstrip}
+\setinterfacecommand{showfontstyle}{showfontstyle}
\setinterfacecommand{showframe}{afiseazarama}
\setinterfacecommand{showgrid}{afiseazagrid}
+\setinterfacecommand{showhyphenationtrace}{showhyphenationtrace}
+\setinterfacecommand{showkerning}{showkerning}
\setinterfacecommand{showlayout}{afiseazaaspect}
\setinterfacecommand{showmakeup}{afiseazamakeup}
+\setinterfacecommand{showminimalbaseline}{showminimalbaseline}
\setinterfacecommand{showpalet}{afiseazapaleta}
\setinterfacecommand{showprint}{afiseazatiparire}
\setinterfacecommand{showsetups}{afiseazasetari}
@@ -1864,6 +2049,7 @@
\setinterfacecommand{someline}{olinie}
\setinterfacecommand{somewhere}{undeva}
\setinterfacecommand{space}{spatiu}
+\setinterfacecommand{specialitem}{specialitem}
\setinterfacecommand{splitfloat}{impartefloat}
\setinterfacecommand{startalignment}{startaliniere}
\setinterfacecommand{startbackground}{startfundal}
@@ -1881,6 +2067,7 @@
\setinterfacecommand{startglobal}{startglobal}
\setinterfacecommand{startline}{startlinie}
\setinterfacecommand{startlinecorrection}{startcorectielinie}
+\setinterfacecommand{startlinenote}{startlinenote}
\setinterfacecommand{startlinenumbering}{startnumerotarelinii}
\setinterfacecommand{startlines}{startlinii}
\setinterfacecommand{startlocal}{startlocal}
@@ -1891,7 +2078,7 @@
\setinterfacecommand{startnarrower}{startingust}
\setinterfacecommand{startopposite}{startopozit}
\setinterfacecommand{startoverlay}{startoverlay}
-\setinterfacecommand{startoverzicht}{startoverview}
+\setinterfacecommand{startoverview}{startoverview}
\setinterfacecommand{startpacked}{startimpachetat}
\setinterfacecommand{startpositioning}{startpozitionare}
\setinterfacecommand{startproduct}{startprodus}
@@ -1923,6 +2110,7 @@
\setinterfacecommand{stopglobal}{stopblobal}
\setinterfacecommand{stopline}{stoplinie}
\setinterfacecommand{stoplinecorrection}{stopcorectielinie}
+\setinterfacecommand{stoplinenote}{stoplinenote}
\setinterfacecommand{stoplinenumbering}{stopnumerotarelinii}
\setinterfacecommand{stoplines}{stoplinii}
\setinterfacecommand{stoplocal}{stoplocal}
@@ -1933,7 +2121,7 @@
\setinterfacecommand{stopnarrower}{stopingust}
\setinterfacecommand{stopopposite}{stopopozit}
\setinterfacecommand{stopoverlay}{stopoverlay}
-\setinterfacecommand{stopoverzicht}{stopoverview}
+\setinterfacecommand{stopoverview}{stopoverview}
\setinterfacecommand{stoppacked}{stopimpachetat}
\setinterfacecommand{stoppositioning}{stoppozitionare}
\setinterfacecommand{stopproduct}{stopprodus}
@@ -1950,8 +2138,11 @@
\setinterfacecommand{stopunpacked}{stopneimpachetat}
\setinterfacecommand{stopversion}{stopversiune}
\setinterfacecommand{stretched}{intins}
+\setinterfacecommand{strictinspectnextcharacter}{strictinspectnextcharacter}
+\setinterfacecommand{stripcharacter}{stripcharacter}
\setinterfacecommand{subformulanumber}{numarsubformula}
\setinterfacecommand{subpagenumber}{subpagenumber}
+\setinterfacecommand{subtractfeature}{subtractfeature}
\setinterfacecommand{switchtobodyfont}{trecilafonttext}
\setinterfacecommand{switchtorawfont}{trecilafontraw}
\setinterfacecommand{sym}{sim}
@@ -1961,16 +2152,24 @@
\setinterfacecommand{synchronize}{sincronizeaza}
\setinterfacecommand{tab}{tab}
\setinterfacecommand{testcolumn}{testcolumn}
+\setinterfacecommand{testfeature}{testfeature}
+\setinterfacecommand{testfeatureonce}{testfeatureonce}
\setinterfacecommand{testpage}{testpage}
\setinterfacecommand{tex}{tex}
\setinterfacecommand{textbackground}{textbackground}
+\setinterfacecommand{textcolor}{textcolor}
\setinterfacecommand{textheight}{inaltimetext}
+\setinterfacecommand{textnote}{textnote}
\setinterfacecommand{textreference}{referintatext}
\setinterfacecommand{textrule}{riglatext}
\setinterfacecommand{textvariable}{variabilatext}
\setinterfacecommand{textwidth}{latimetext}
+\setinterfacecommand{thefirstcharacter}{thefirstcharacter}
+\setinterfacecommand{thenormalizedbodyfontsize}{thenormalizedbodyfontsize}
+\setinterfacecommand{theremainingcharacters}{theremainingcharacters}
\setinterfacecommand{thinrule}{liniesubtire}
\setinterfacecommand{thinrules}{liniisubtiri}
+\setinterfacecommand{tolinenote}{tolinenote}
\setinterfacecommand{tooltip}{tooltip}
\setinterfacecommand{topdistance}{distantasus}
\setinterfacecommand{topheight}{inaltimesus}
@@ -1981,13 +2180,19 @@
\setinterfacecommand{typ}{typ}
\setinterfacecommand{type}{type}
\setinterfacecommand{typebuffer}{scriebuffer}
+\setinterfacecommand{typedefinedbuffer}{typedefinedbuffer}
\setinterfacecommand{typefile}{typefile}
+\setinterfacecommand{typeinlinebuffer}{typeinlinebuffer}
+\setinterfacecommand{typing}{typing}
\setinterfacecommand{unitmeaning}{numeunitate}
\setinterfacecommand{unknown}{necunoscut}
+\setinterfacecommand{unregisterhyphenationpattern}{unregisterhyphenationpattern}
\setinterfacecommand{useJSscripts}{folosestescriptJS}
\setinterfacecommand{useURL}{folosesteURL}
\setinterfacecommand{useXMLfilter}{useXMLfilter}
\setinterfacecommand{useblocks}{folosestebloc}
+\setinterfacecommand{usebodyfont}{usebodyfont}
+\setinterfacecommand{usebodyfontparameter}{usebodyfontparameter}
\setinterfacecommand{usecommands}{folosestecomenzi}
\setinterfacecommand{useencoding}{folosestecodificarea}
\setinterfacecommand{useexternaldocument}{folosestedocumentextern}
@@ -2004,10 +2209,12 @@
\setinterfacecommand{usetypescript}{usetypescript}
\setinterfacecommand{usetypescriptfile}{usetypescriptfile}
\setinterfacecommand{useurl}{folosesteurl}
+\setinterfacecommand{verbatim}{verbatim}
\setinterfacecommand{version}{versiune}
\setinterfacecommand{vl}{vl}
\setinterfacecommand{weekday}{zidinsaptamana}
\setinterfacecommand{whitespace}{spatiualb}
+\setinterfacecommand{widthspanningtext}{widthspanningtext}
\setinterfacecommand{wordright}{cuvantdreapta}
\setinterfacecommand{writebetweenlist}{scrieintreliste}
\setinterfacecommand{writetolist}{scrieinlista}
diff --git a/Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii b/Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii
index 7ae5f6c814f..f3c357941bb 100644
--- a/Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii
+++ b/Master/texmf-dist/tex/context/base/mkii/syst-ini.mkii
@@ -971,7 +971,11 @@
\bindprimitive ifabsdim ifpdfabsdim
\bindprimitive ifabsnum ifpdfabsnum
-\ifnum\texengine=\xetexengine \else % this test might disappear some day
+\ifnum\texengine=\xetexengine
+
+ \let\normalsetrandomseed \setrandomseed
+ \let\normaluniformdeviate\uniformdeviate
+\else
\pdfminorversion \plusfive
diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi b/Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi
index 96dd0cdf54a..32e45a642b1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-bck.mkvi
@@ -265,9 +265,9 @@
% maybe we should have a resetter for such compensation struts
\def\anch_backgrounds_reset_attributes
- {\scratchcounter\attribute\snapmethodattribute
- \resetallattributes % \attribute\linenumberattribute \attributeunsetvalue
- \attribute\snapmethodattribute\scratchcounter}
+ {\scratchcounter\c_attr_snapmethod
+ \resetallattributes % \c_attr_linenumber\attributeunsetvalue
+ \c_attr_snapmethod\scratchcounter}
\def\anch_backgrounds_text_start_par % beware .. background shapes
{\endgraf % new
@@ -364,14 +364,14 @@
\def\anch_backgrounds_bpos
{\ifconditional\c_anch_backgrounds_pos_no_shape
- \attribute\textbackgroundattribute\attributeunsetvalue
+ \c_attr_textbackground\attributeunsetvalue
\bposkind\v_anch_backgrounds_text_current\plusthree
\else\ifnum\c_anch_backgrounds_pos_state=\plusone
\bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state
\clf_registerbackground{\v_anch_backgrounds_text_current}%
\else
\bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state
- \attribute\textbackgroundattribute\attributeunsetvalue
+ \c_attr_textbackground\attributeunsetvalue
\fi\fi}
% plugs into other code
diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua
index be9e28c08dc..8e400cd123f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pgr.lua
@@ -76,7 +76,7 @@ local getheight = nuts.getheight
local getdepth = nuts.getdepth
local nodecodes = nodes.nodecodes
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local start_of_par = nuts.start_of_par
local insert_before = nuts.insert_before
@@ -165,7 +165,7 @@ local function flush(head,f,l,a,parent,depth)
ln = new_hlist(setlink(new_rule(65536,65536*4,0),new_kern(-65536),ln))
rn = new_hlist(setlink(new_rule(65536,0,65536*4),new_kern(-65536),rn))
end
- if getid(f) == localpar_code and start_of_par(f) then -- we need to clean this mess
+ if getid(f) == par_code and start_of_par(f) then -- we need to clean this mess
insert_after(head,f,ln)
else
head, f = insert_before(head,f,ln)
@@ -1210,7 +1210,7 @@ posregions[%s] := (%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle ;
implement {
name = "fetchposboxes",
arguments = { "string", "string", "integer" },
- actions = function(tags,anchor,page) -- no caching (yet) / todo: anchor, page
+ actions = function(tags,anchor,page) -- no caching (yet) / page
local collected = jobpositions.collected
if type(tags) == "string" then
tags = utilities.parsers.settings_to_array(tags)
@@ -1222,6 +1222,9 @@ implement {
local c = collected[tag]
if c then
local r = c.r
+ if anchor ~= r then
+ r = anchor
+ end
if r then
r = collected[r]
if r then
@@ -1231,7 +1234,7 @@ implement {
local rh = r.h
local rd = r.d
local cx = c.x - rx
- local cy = c.y
+ local cy = c.y - ry
local cw = cx + c.w
local ch = cy + c.h
local cd = cy - c.d
diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua
index 2788c9d1a55..77bf09e3923 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.lua
@@ -13,16 +13,19 @@ more efficient.</p>
--ldx]]--
-- plus (extra) is obsolete but we will keep it for a while
-
+--
-- maybe replace texsp by our own converter (stay at the lua end)
-- eventually mp will have large numbers so we can use sp there too
-
--- this is one of the first modules using scanners and we need to replace
--- it by implement and friends
-
+--
+-- this is one of the first modules using scanners and we need to replace it by
+-- implement and friends
+--
-- we could have namespaces, like p, page, region, columnarea, textarea but then
-- we need virtual table accessors as well as have tag/id accessors ... we don't
-- save much here (at least not now)
+--
+-- This was the last module that got rid of directly setting scanners, with a little
+-- performance degradation but not that noticeable.
local tostring, next, setmetatable, tonumber = tostring, next, setmetatable, tonumber
local sort = table.sort
@@ -38,8 +41,7 @@ local scanstring = scanners.string
local scaninteger = scanners.integer
local scandimen = scanners.dimen
-local compilescanner = tokens.compile
-local scanners = interfaces.scanners
+local implement = interfaces.implement
local commands = commands
local context = context
@@ -48,6 +50,7 @@ local ctx_latelua = context.latelua
local tex = tex
local texgetcount = tex.getcount
+local texgetinteger = tex.getintegervalue or tex.getcount
local texsetcount = tex.setcount
local texget = tex.get
local texsp = tex.sp
@@ -124,9 +127,9 @@ local nofregular = 0
local nofspecial = 0
local splitter = lpeg.splitat(":",true)
-local pagedata = { }
-local columndata = setmetatableindex("table") -- per page
-local freedata = setmetatableindex("table") -- per page
+local pagedata = { }
+local columndata = setmetatableindex("table") -- per page
+local freedata = setmetatableindex("table") -- per page
local function initializer()
tobesaved = jobpositions.tobesaved
@@ -251,7 +254,7 @@ local nofpages = nil
-- beware ... we're not sparse here as lua will reserve slots for the nilled
-local getpos, gethpos, getvpos
+local getpos, gethpos, getvpos, getrpos
function jobpositions.registerhandlers(t)
getpos = t and t.getpos or function() return 0, 0 end
@@ -280,7 +283,7 @@ local function setall(name,p,x,y,w,h,d,extra)
e = extra ~= "" and extra or nil,
r = region,
c = column,
- r2l = texgetcount("inlinelefttoright") == 1 and true or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 and true or nil,
}
end
@@ -376,19 +379,22 @@ jobpositions.set = set
jobpositions.setspec = setspec
jobpositions.get = get
-scanners.dosaveposition = compilescanner {
+implement {
+ name = "dosaveposition",
+ arguments = { "string", "integer", "dimen", "dimen" },
actions = setall, -- name p x y
- arguments = { "string", "integer", "dimen", "dimen" }
}
-scanners.dosavepositionwhd = compilescanner { -- somehow fails
+implement {
+ name = "dosavepositionwhd",
+ arguments = { "string", "integer", "dimen", "dimen", "dimen", "dimen", "dimen" },
actions = setall, -- name p x y w h d
- arguments = { "string", "integer", "dimen", "dimen", "dimen", "dimen", "dimen" }
}
-scanners.dosavepositionplus = compilescanner {
+implement {
+ name = "dosavepositionplus",
+ arguments = { "string", "integer", "dimen", "dimen", "dimen", "dimen", "dimen", "string" },
actions = setall, -- name p x y w h d extra
- arguments = { "string", "integer", "dimen", "dimen", "dimen", "dimen", "dimen", "string" }
}
-- will become private table (could also become attribute driven but too nasty
@@ -424,29 +430,41 @@ end
jobpositions.b_column = b_column
jobpositions.e_column = e_column
-scanners.bposcolumn = function() -- tag
- local tag = scanstring()
- insert(columns,tag)
- column = tag
-end
+implement {
+ name = "bposcolumn",
+ arguments = "string",
+ actions = function(tag)
+ insert(columns,tag)
+ column = tag
+ end
+}
-scanners.bposcolumnregistered = function() -- tag
- local tag = scanstring()
- insert(columns,tag)
- column = tag
- ctx_latelua { action = b_column, tag = tag }
-end
+implement {
+ name = "bposcolumnregistered",
+ arguments = "string",
+ actions = function(tag)
+ insert(columns,tag)
+ column = tag
+ ctx_latelua { action = b_column, tag = tag }
+ end
+}
-scanners.eposcolumn = function()
- remove(columns)
- column = columns[#columns]
-end
+implement {
+ name = "eposcolumn",
+ actions = function()
+ remove(columns)
+ column = columns[#columns]
+ end
+}
-scanners.eposcolumnregistered = function()
- ctx_latelua { action = e_column }
- remove(columns)
- column = columns[#columns]
-end
+implement {
+ name = "eposcolumnregistered",
+ actions = function()
+ ctx_latelua { action = e_column }
+ remove(columns)
+ column = columns[#columns]
+ end
+}
-- regions
@@ -551,167 +569,181 @@ end
local nofparagraphs = 0
-scanners.parpos = function()
- nofparagraphs = nofparagraphs + 1
- texsetcount("global","c_anch_positions_paragraph",nofparagraphs)
- local box = getbox("strutbox")
- local w, h, d = getwhd(box)
- local t = {
- p = true,
- c = true,
- r = true,
- x = true,
- y = true,
- h = h,
- d = d,
- hs = texget("hsize"), -- never 0
- }
- local leftskip = texget("leftskip",false)
- local rightskip = texget("rightskip",false)
- local hangindent = texget("hangindent")
- local hangafter = texget("hangafter")
- local parindent = texget("parindent")
- local parshape = texget("parshape")
- if leftskip ~= 0 then
- t.ls = leftskip
- end
- if rightskip ~= 0 then
- t.rs = rightskip
- end
- if hangindent ~= 0 then
- t.hi = hangindent
- end
- if hangafter ~= 1 and hangafter ~= 0 then -- can not be zero .. so it needs to be 1 if zero
- t.ha = hangafter
- end
- if parindent ~= 0 then
- t.pi = parindent
- end
- if parshape and #parshape > 0 then
- t.ps = parshape
+implement {
+ name = "parpos",
+ actions = function()
+ nofparagraphs = nofparagraphs + 1
+ texsetcount("global","c_anch_positions_paragraph",nofparagraphs)
+ local box = getbox("strutbox")
+ local w, h, d = getwhd(box)
+ local t = {
+ p = true,
+ c = true,
+ r = true,
+ x = true,
+ y = true,
+ h = h,
+ d = d,
+ hs = texget("hsize"), -- never 0
+ }
+ local leftskip = texget("leftskip",false)
+ local rightskip = texget("rightskip",false)
+ local hangindent = texget("hangindent")
+ local hangafter = texget("hangafter")
+ local parindent = texget("parindent")
+ local parshape = texget("parshape")
+ if leftskip ~= 0 then
+ t.ls = leftskip
+ end
+ if rightskip ~= 0 then
+ t.rs = rightskip
+ end
+ if hangindent ~= 0 then
+ t.hi = hangindent
+ end
+ if hangafter ~= 1 and hangafter ~= 0 then -- can not be zero .. so it needs to be 1 if zero
+ t.ha = hangafter
+ end
+ if parindent ~= 0 then
+ t.pi = parindent
+ end
+ if parshape and #parshape > 0 then
+ t.ps = parshape
+ end
+ local name = f_p_tag(nofparagraphs)
+ tobesaved[name] = t
+ ctx_latelua { action = enhance, specification = t }
end
- local name = f_p_tag(nofparagraphs)
- tobesaved[name] = t
- ctx_latelua { action = enhance, specification = t }
-end
+}
-scanners.dosetposition = function() -- name
- local name = scanstring()
- local spec = {
- p = true,
- c = column,
- r = true,
- x = true,
- y = true,
- n = nofparagraphs > 0 and nofparagraphs or nil,
- r2l = texgetcount("inlinelefttoright") == 1 or nil,
- }
- tobesaved[name] = spec
- ctx_latelua { action = enhance, specification = spec }
-end
+implement {
+ name = "dosetposition",
+ arguments = "string",
+ actions = function(name)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
-scanners.dosetpositionwhd = function() -- name w h d extra
- local name = scanstring()
- local w = scandimen()
- local h = scandimen()
- local d = scandimen()
- local spec = {
- p = true,
- c = column,
- r = true,
- x = true,
- y = true,
- w = w ~= 0 and w or nil,
- h = h ~= 0 and h or nil,
- d = d ~= 0 and d or nil,
- n = nofparagraphs > 0 and nofparagraphs or nil,
- r2l = texgetcount("inlinelefttoright") == 1 or nil,
- }
- tobesaved[name] = spec
- ctx_latelua { action = enhance, specification = spec }
-end
+implement {
+ name = "dosetpositionwhd",
+ arguments = { "string", "dimen", "dimen", "dimen" },
+ actions = function(name,w,h,d)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
-scanners.dosetpositionbox = function() -- name box
- local name = scanstring()
- local box = getbox(scaninteger())
- local w, h, d = getwhd(box)
- local spec = {
- p = true,
- c = column,
- r = true,
- x = true,
- y = true,
- w = w ~= 0 and w or nil,
- h = h ~= 0 and h or nil,
- d = d ~= 0 and d or nil,
- n = nofparagraphs > 0 and nofparagraphs or nil,
- r2l = texgetcount("inlinelefttoright") == 1 or nil,
- }
- tobesaved[name] = spec
- ctx_latelua { action = enhance, specification = spec }
-end
+implement {
+ name = "dosetpositionbox",
+ arguments = { "string", "integer" },
+ actions = function(name,n)
+ local box = getbox(n)
+ local w, h, d = getwhd(box)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
-scanners.dosetpositionplus = function() -- name w h d extra
- local name = scanstring()
- local w = scandimen()
- local h = scandimen()
- local d = scandimen()
- local spec = {
- p = true,
- c = column,
- r = true,
- x = true,
- y = true,
- w = w ~= 0 and w or nil,
- h = h ~= 0 and h or nil,
- d = d ~= 0 and d or nil,
- n = nofparagraphs > 0 and nofparagraphs or nil,
- e = scanstring(),
- r2l = texgetcount("inlinelefttoright") == 1 or nil,
- }
- tobesaved[name] = spec
- ctx_latelua { action = enhance, specification = spec }
-end
+implement {
+ name = "dosetpositionplus",
+ arguments = { "string", "dimen", "dimen", "dimen" },
+ actions = function(name,w,h,d)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ e = scanstring(),
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
-scanners.dosetpositionstrut = function() -- name
- local name = scanstring()
- local box = getbox("strutbox")
- local w, h, d = getwhd(box)
- local spec = {
- p = true,
- c = column,
- r = true,
- x = true,
- y = true,
- h = h ~= 0 and h or nil,
- d = d ~= 0 and d or nil,
- n = nofparagraphs > 0 and nofparagraphs or nil,
- r2l = texgetcount("inlinelefttoright") == 1 or nil,
- }
- tobesaved[name] = spec
- ctx_latelua { action = enhance, specification = spec }
-end
+implement {
+ name = "dosetpositionstrut",
+ arguments = "string",
+ actions = function(name)
+ local box = getbox("strutbox")
+ local w, h, d = getwhd(box)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
-scanners.dosetpositionstrutkind = function() -- name
- local name = scanstring()
- local kind = scaninteger()
- local box = getbox("strutbox")
- local w, h, d = getwhd(box)
- local spec = {
- k = kind,
- p = true,
- c = column,
- r = true,
- x = true,
- y = true,
- h = h ~= 0 and h or nil,
- d = d ~= 0 and d or nil,
- n = nofparagraphs > 0 and nofparagraphs or nil,
- r2l = texgetcount("inlinelefttoright") == 1 or nil,
- }
- tobesaved[name] = spec
- ctx_latelua { action = enhance, specification = spec }
-end
+implement {
+ name = "dosetpositionstrutkind",
+ arguments = { "string", "integer" },
+ actions = function(name,kind)
+ local box = getbox("strutbox")
+ local w, h, d = getwhd(box)
+ local spec = {
+ k = kind,
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
function jobpositions.getreserved(tag,n)
if tag == v_column then
@@ -990,166 +1022,222 @@ jobpositions.columnofpos = columnofpos
-- interface
-scanners.replacepospxywhd = function() -- name page x y w h d
- collected[scanstring()] = {
- p = scaninteger(),
- x = scandimen(),
- y = scandimen(),
- w = scandimen(),
- h = scandimen(),
- d = scandimen(),
- }
-end
+implement {
+ name = "replacepospxywhd",
+ arguments = { "string", "integer", "dimen", "dimen", "dimen", "dimen", "dimen" },
+ actions = function(name,page,x,y,w,h,d)
+ collected[name] = {
+ p = page,
+ x = x,
+ y = y,
+ w = w,
+ h = h,
+ d = d,
+ }
+ end
+}
-scanners.copyposition = function() -- target source
- collected[scanstring()] = collected[scanstring()]
-end
+implement {
+ name = "copyposition",
+ arguments = "2 strings",
+ actions = function(target,source)
+ collected[target] = collected[source]
+ end
+}
-scanners.MPp = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local p = jpi.p
- if p and p ~= true then
- context(p)
- return
+implement {
+ name = "MPp",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local p = jpi.p
+ if p and p ~= true then
+ context(p)
+ return
+ end
end
+ context('0')
end
- context('0')
-end
+}
-scanners.MPx = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local x = jpi.x
- if x and x ~= true and x ~= 0 then
- context("%.5Fpt",x*pt)
- return
+implement {
+ name = "MPx",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local x = jpi.x
+ if x and x ~= true and x ~= 0 then
+ context("%.5Fpt",x*pt)
+ return
+ end
end
+ context('0pt')
end
- context('0pt')
-end
+}
-scanners.MPy = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local y = jpi.y
- if y and y ~= true and y ~= 0 then
- context("%.5Fpt",y*pt)
- return
+implement {
+ name = "MPy",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local y = jpi.y
+ if y and y ~= true and y ~= 0 then
+ context("%.5Fpt",y*pt)
+ return
+ end
end
+ context('0pt')
end
- context('0pt')
-end
+}
-scanners.MPw = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local w = jpi.w
- if w and w ~= 0 then
- context("%.5Fpt",w*pt)
- return
+implement {
+ name = "MPw",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local w = jpi.w
+ if w and w ~= 0 then
+ context("%.5Fpt",w*pt)
+ return
+ end
end
+ context('0pt')
end
- context('0pt')
-end
+}
-scanners.MPh = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local h = jpi.h
- if h and h ~= 0 then
- context("%.5Fpt",h*pt)
- return
+implement {
+ name = "MPh",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local h = jpi.h
+ if h and h ~= 0 then
+ context("%.5Fpt",h*pt)
+ return
+ end
end
+ context('0pt')
end
- context('0pt')
-end
+}
-scanners.MPd = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local d = jpi.d
- if d and d ~= 0 then
- context("%.5Fpt",d*pt)
- return
+implement {
+ name = "MPd",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local d = jpi.d
+ if d and d ~= 0 then
+ context("%.5Fpt",d*pt)
+ return
+ end
end
+ context('0pt')
end
- context('0pt')
-end
+}
-scanners.MPxy = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context('(%.5Fpt,%.5Fpt)',
- jpi.x*pt,
- jpi.y*pt
- )
- else
- context('(0,0)')
+implement {
+ name = "MPxy",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ jpi.x*pt,
+ jpi.y*pt
+ )
+ else
+ context('(0,0)')
+ end
end
-end
+}
-scanners.MPwhd = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local w = jpi.w or 0
- local h = jpi.h or 0
- local d = jpi.d or 0
- if w ~= 0 or h ~= 0 or d ~= 0 then
- context("%.5Fpt,%.5Fpt,%.5Fpt",w*pt,h*pt,d*pt)
- return
+implement {
+ name = "MPwhd",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local w = jpi.w or 0
+ local h = jpi.h or 0
+ local d = jpi.d or 0
+ if w ~= 0 or h ~= 0 or d ~= 0 then
+ context("%.5Fpt,%.5Fpt,%.5Fpt",w*pt,h*pt,d*pt)
+ return
+ end
end
+ context('0pt,0pt,0pt')
end
- context('0pt,0pt,0pt')
-end
+}
-scanners.MPll = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context('(%.5Fpt,%.5Fpt)',
- jpi.x *pt,
- (jpi.y-jpi.d)*pt
- )
- else
- context('(0,0)') -- for mp only
+implement {
+ name = "MPll",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ jpi.x *pt,
+ (jpi.y-jpi.d)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
end
-end
+}
-scanners.MPlr = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context('(%.5Fpt,%.5Fpt)',
- (jpi.x + jpi.w)*pt,
- (jpi.y - jpi.d)*pt
- )
- else
- context('(0,0)') -- for mp only
+implement {
+ name = "MPlr",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ (jpi.x + jpi.w)*pt,
+ (jpi.y - jpi.d)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
end
-end
+}
-scanners.MPur = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context('(%.5Fpt,%.5Fpt)',
- (jpi.x + jpi.w)*pt,
- (jpi.y + jpi.h)*pt
- )
- else
- context('(0,0)') -- for mp only
+implement {
+ name = "MPur",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ (jpi.x + jpi.w)*pt,
+ (jpi.y + jpi.h)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
end
-end
+}
-scanners.MPul = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context('(%.5Fpt,%.5Fpt)',
- jpi.x *pt,
- (jpi.y + jpi.h)*pt
- )
- else
- context('(0,0)') -- for mp only
+implement {
+ name = "MPul",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ jpi.x *pt,
+ (jpi.y + jpi.h)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
end
-end
+}
local function MPpos(id)
local jpi = collected[id]
@@ -1170,53 +1258,67 @@ local function MPpos(id)
context('0,0,0,0,0,0') -- for mp only
end
-scanners.MPpos = function() -- name
- MPpos(scanstring())
-end
+implement {
+ name = "MPpos",
+ arguments = "string",
+ actions = MPpos
+}
-scanners.MPn = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local n = jpi.n
- if n then
- context(n)
- return
+implement {
+ name = "MPn",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local n = jpi.n
+ if n then
+ context(n)
+ return
+ end
end
+ context(0)
end
- context(0)
-end
+}
-scanners.MPc = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local c = jpi.c
- if c and c ~= true then
- context(c)
- return
+implement {
+ name = "MPc",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local c = jpi.c
+ if c and c ~= true then
+ context(c)
+ return
+ end
end
+ context('0') -- okay ?
end
- context('0') -- okay ?
-end
+}
-scanners.MPr = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- local r = jpi.r
- if r and r ~= true then
- context(r)
- return
- end
- local p = jpi.p
- if p then
- context("page:" .. p)
+implement {
+ name = "MPr",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local r = jpi.r
+ if r and r ~= true then
+ context(r)
+ return
+ end
+ local p = jpi.p
+ if p and p ~= true then
+ context("page:" .. p)
+ end
end
end
-end
+}
-local function MPpardata(n)
- local t = collected[n]
+local function MPpardata(id)
+ local t = collected[id]
if not t then
- local tag = f_p_tag(n)
+ local tag = f_p_tag(id)
t = collected[tag]
end
if t then
@@ -1233,157 +1335,213 @@ local function MPpardata(n)
end
end
-scanners.MPpardata = function() -- name
- MPpardata(scanstring())
-end
+implement {
+ name = "MPpardata",
+ arguments = "string",
+ actions = MPpardata
+}
-scanners.MPposset = function() -- name (special helper, used in backgrounds)
- local name = scanstring()
- local b = f_b_tag(name)
- local e = f_e_tag(name)
- local w = f_w_tag(name)
- local p = f_p_tag(getparagraph(b))
- MPpos(b) context(",") MPpos(e) context(",") MPpos(w) context(",") MPpos(p) context(",") MPpardata(p)
-end
+implement {
+ name = "MPposset",
+ arguments = "string",
+ actions = function(name)
+ local b = f_b_tag(name)
+ local e = f_e_tag(name)
+ local w = f_w_tag(name)
+ local p = f_p_tag(getparagraph(b))
+ MPpos(b) context(",") MPpos(e) context(",") MPpos(w) context(",") MPpos(p) context(",") MPpardata(p)
+ end
+}
-scanners.MPls = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context("%.5Fpt",jpi.ls*pt)
- else
- context("0pt")
+implement {
+ name = "MPls",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context("%.5Fpt",jpi.ls*pt)
+ else
+ context("0pt")
+ end
end
-end
+}
-scanners.MPrs = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context("%.5Fpt",jpi.rs*pt)
- else
- context("0pt")
+implement {
+ name = "MPrs",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context("%.5Fpt",jpi.rs*pt)
+ else
+ context("0pt")
+ end
end
-end
+}
local splitter = lpeg.tsplitat(",")
-scanners.MPplus = function() -- name n default
- local jpi = collected[scanstring()]
- local n = scaninteger()
- local default = scanstring()
- if jpi then
- local e = jpi.e
- if e then
- local split = jpi.split
- if not split then
- split = lpegmatch(splitter,jpi.e)
- jpi.split = split
+implement {
+ name = "MPplus",
+ arguments = { "string", "integer", "string" },
+ actions = function(name,n,default)
+ local jpi = collected[name]
+ if jpi then
+ local e = jpi.e
+ if e then
+ local split = jpi.split
+ if not split then
+ split = lpegmatch(splitter,jpi.e)
+ jpi.split = split
+ end
+ context(split[n] or default)
+ return
end
- context(split[n] or default)
- return
end
+ context(default)
end
- context(default)
-end
+}
-scanners.MPrest = function() -- name default
- local jpi = collected[scanstring()]
- local default = scanstring()
- context(jpi and jpi.e or default)
-end
+implement {
+ name = "MPrest",
+ arguments = { "string", "string" },
+ actions = function(name,default)
+ local jpi = collected[name]
+ context(jpi and jpi.e or default)
+ end
+}
-scanners.MPxywhd = function() -- name
- local jpi = collected[scanstring()]
- if jpi then
- context("%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt",
- jpi.x*pt,
- jpi.y*pt,
- jpi.w*pt,
- jpi.h*pt,
- jpi.d*pt
- )
- else
- context("0,0,0,0,0") -- for mp only
+implement {
+ name = "MPxywhd",
+ arguments = "string",
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context("%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt",
+ jpi.x*pt,
+ jpi.y*pt,
+ jpi.w*pt,
+ jpi.h*pt,
+ jpi.d*pt
+ )
+ else
+ context("0,0,0,0,0") -- for mp only
+ end
end
-end
+}
local doif = commands.doif
local doifelse = commands.doifelse
-scanners.doifelseposition = function() -- name
- doifelse(collected[scanstring()])
-end
-
-scanners.doifposition = function() -- name
- doif(collected[scanstring()])
-end
+implement {
+ name = "doifelseposition",
+ arguments = "string",
+ actions = function(name)
+ doifelse(collected[name])
+ end
+}
--- local ctx_iftrue = context.protected.cs.iftrue
--- local ctx_iffalse = context.protected.cs.iffalse
---
--- scanners.ifknownposition = function() -- name
--- (collected[scanstring()] and ctx_iftrue or ctx_iffalse)()
--- end
-
-scanners.doifelsepositiononpage = function() -- name page -- probably always realpageno
- local c = collected[scanstring()]
- local p = scaninteger()
- doifelse(c and c.p == p)
-end
+implement {
+ name = "doifposition",
+ arguments = "string",
+ actions = function(name)
+ doif(collected[name])
+ end
+}
-scanners.doifelseoverlapping = function() -- one two
- doifelse(overlapping(scanstring(),scanstring()))
-end
+implement {
+ name = "doifelsepositiononpage",
+ arguments = { "string", "integer" },
+ actions = function(name,p)
+ local c = collected[name]
+ doifelse(c and c.p == p)
+ end
+}
-scanners.doifelsepositionsonsamepage = function() -- list
- doifelse(onsamepage(scanstring()))
-end
+implement {
+ name = "doifelseoverlapping",
+ arguments = { "string", "string" },
+ actions = function(one,two)
+ doifelse(overlapping(one,two))
+ end
+}
-scanners.doifelsepositionsonthispage = function() -- list
- doifelse(onsamepage(scanstring(),tostring(texgetcount("realpageno"))))
-end
+implement {
+ name = "doifelsepositionsonsamepage",
+ arguments = "string",
+ actions = function(list)
+ doifelse(onsamepage(list))
+ end
+}
--- scanners.columnofpos = function()
--- context(columnofpos(scaninteger(),scandimen())
--- end
+implement {
+ name = "doifelsepositionsonthispage",
+ arguments = "string",
+ actions = function(list)
+ doifelse(onsamepage(list,tostring(texgetcount("realpageno"))))
+ end
+}
-scanners.doifelsepositionsused = function()
- doifelse(next(collected))
-end
+implement {
+ name = "doifelsepositionsused",
+ actions = function()
+ doifelse(next(collected))
+ end
+}
-scanners.markregionbox = function() -- box
- markregionbox(scaninteger())
-end
+implement {
+ name = "markregionbox",
+ arguments = "integer",
+ actions = markregionbox
+}
-scanners.setregionbox = function() -- box
- setregionbox(scaninteger())
-end
+implement {
+ name = "setregionbox",
+ arguments = "integer",
+ actions = setregionbox
+}
-scanners.markregionboxtagged = function() -- box tag
- markregionbox(scaninteger(),scanstring())
-end
+implement {
+ name = "markregionboxtagged",
+ arguments = { "integer", "string" },
+ actions = markregionbox
+}
-scanners.markregionboxtaggedn = function() -- box tag n
- markregionbox(scaninteger(),scanstring(),nil,
- nil,nil,nil,nil,nil,scaninteger())
-end
+implement {
+ name = "markregionboxtaggedn",
+ arguments = { "integer", "string", "integer" },
+ actions = function(box,tag,n)
+ markregionbox(box,tag,nil,nil,nil,nil,nil,nil,n)
+ end
+}
-scanners.setregionboxtagged = function() -- box tag
- setregionbox(scaninteger(),scanstring())
-end
+implement {
+ name = "setregionboxtagged",
+ arguments = { "integer", "string" },
+ actions = setregionbox
+}
-scanners.markregionboxcorrected = function() -- box tag
- markregionbox(scaninteger(),scanstring(),true)
-end
+implement {
+ name = "markregionboxcorrected",
+ arguments = { "integer", "string", true },
+ actions = markregionbox
+}
-scanners.markregionboxtaggedkind = function() -- box tag kind
- markregionbox(scaninteger(),scanstring(),nil,
- scaninteger(),scandimen(),scandimen(),scandimen(),scandimen())
-end
+implement {
+ name = "markregionboxtaggedkind",
+ arguments = { "integer", "string", "integer", "dimen", "dimen", "dimen", "dimen" },
+ actions = function(box,tag,n,d1,d2,d3,d4)
+ markregionbox(box,tag,nil,n,d1,d2,d3,d4)
+ end
+}
-scanners.reservedautoregiontag = function()
- nofregions = nofregions + 1
- context(f_region(nofregions))
-end
+implement {
+ name = "reservedautoregiontag",
+ actions = function()
+ nofregions = nofregions + 1
+ context(f_region(nofregions))
+ end
+}
-- statistics (at least for the moment, when testing)
@@ -1409,7 +1567,6 @@ end)
-- We support the low level positional commands too:
local newsavepos = nodes.pool.savepos
-local implement = interfaces.implement
implement { name = "savepos", actions = function() context(newsavepos()) end }
implement { name = "lastxpos", actions = function() context(gethpos()) end }
diff --git a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv
index 2762a53c65c..772c89504d9 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/anch-pos.mkiv
@@ -296,7 +296,7 @@
{\clf_markregionbox#1\relax}
\unexpanded\def\anch_mark_flow_box#1% will be extended / renamed
- {\hpack\bgroup % \hpack
+ {\hpack\bgroup
\global\advance\c_anch_text\plusone
\clf_markregionboxtagged#1{textarea:\the\c_anch_text}%
\box#1%
diff --git a/Master/texmf-dist/tex/context/base/mkiv/attr-col.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-col.lua
index 88358aeb767..9c542a94293 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/attr-col.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-col.lua
@@ -445,7 +445,6 @@ function colors.setmodel(name,weightgray)
else
-- stil the same
end
-
return default
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv
index db4eea9e90a..c75f448e9d4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-col.mkiv
@@ -17,6 +17,6 @@
\unprotect
-% We implement this elsewhere but some coce might end up here.
+% We implement this elsewhere but some code might end up here.
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua
index 6145fa08d08..5507f2a70b8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.lua
@@ -14,32 +14,33 @@ local osexit = os.exit
symbolic names later on.</p>
--ldx]]--
-local nodes = nodes
-local context = context
-local storage = storage
-local commands = commands
+local nodes = nodes
+local context = context
+local storage = storage
+local commands = commands
-local implement = interfaces.implement
+local implement = interfaces.implement
-attributes = attributes or { }
-local attributes = attributes
+attributes = attributes or { }
+local attributes = attributes
-local sharedstorage = storage.shared
+local sharedstorage = storage.shared
-local texsetattribute = tex.setattribute
+local texsetattribute = tex.setattribute
-attributes.names = attributes.names or { }
-attributes.numbers = attributes.numbers or { }
-attributes.list = attributes.list or { }
-attributes.states = attributes.states or { }
-attributes.handlers = attributes.handlers or { }
-attributes.unsetvalue = -0x7FFFFFFF
+attributes.names = attributes.names or { }
+attributes.numbers = attributes.numbers or { }
+attributes.list = attributes.list or { }
+attributes.states = attributes.states or { }
+attributes.handlers = attributes.handlers or { }
+attributes.unsetvalue = -0x7FFFFFFF
-local currentfont = font.current
+local currentfont = font.current -- mabe nicer is attributes.current
+local currentattributes = node.current_attributes -- mabe nicer is fonts .current
-local names = attributes.names
-local numbers = attributes.numbers
-local list = attributes.list
+local names = attributes.names
+local numbers = attributes.numbers
+local list = attributes.list
storage.register("attributes/names", names, "attributes.names")
storage.register("attributes/numbers", numbers, "attributes.numbers")
@@ -127,7 +128,7 @@ local function showlist(what,list)
end
function attributes.showcurrent()
- showlist("current",node.current_attr())
+ showlist("current",currentattributes())
end
function attributes.ofnode(n)
@@ -140,7 +141,7 @@ local store = { }
function attributes.save(name)
name = name or ""
- local n = node.current_attr()
+ local n = currentattributes()
n = n and n.next
local t = { }
while n do
diff --git a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
index 6889f9e63ff..71c6478f8c3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
@@ -61,55 +61,31 @@
% here public means 'visible' so it's not to be confused with 'public' at the lua end
-% \def\attr_basics_define_indeed#1[#2][#3]%
-% {\ifcsname\??attributecount#2\endcsname\else
-% \scratchcounter\clf_defineattribute{#2}{#1}\relax
-% %\writestatus\m!system{defining #1 attribute #2 with number \number\scratchcounter}%
-% \expandafter\attributedef\csname\??attributecount#2\endcsname\scratchcounter
-% \expandafter\newconstant \csname\??attributeid#2\endcsname
-% \csname\??attributeid#2\endcsname\scratchcounter
-% % some attributes are always global
-% \doifelseinset\s!global{#3}%
-% {\etoksapp\t_attr_list_global{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
-% {\etoksapp\t_attr_list_local {\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
-% \doifinset\s!nomath{#3}%
-% {\etoksapp\t_attr_list_nomath{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
-% \doifinset\s!public{#3}%
-% {\expandafter\let\csname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}%
-% \doifinset\s!pickup{#3}%
-% {\expandafter\newconstant\csname\??attributepickup#2\endcsname
-% \csname\??attributepickup#2\endcsname\attributeunsetvalue
-% \etoksapp\t_attr_list_pickup{\csname\??attributecount#2\endcsname\csname\??attributepickup#2\endcsname}%
-% \ifcsname#2\s!attribute\endcsname
-% \expandafter\edef\csname\s!pickup#2\s!attribute\endcsname
-% {\csname\??attributepickup#2\endcsname\csname\??attributecount#2\endcsname}%
-% \expandafter\edef\csname\s!forget#2\s!attribute\endcsname
-% {\csname\??attributepickup#2\endcsname\attributeunsetvalue}%
-% \fi}%
-% \fi}
+% \let\attr_prefix\??attributecount
+\def\attr_prefix{c_attr_}
\def\attr_basics_define_indeed#1[#2][#3]%
- {\ifcsname\??attributecount#2\endcsname\else
+ {\ifcsname\attr_prefix#2\endcsname\else
\scratchcounter\clf_defineattribute{#2}{#1}\relax
%\writestatus\m!system{defining #1 attribute #2 with number \number\scratchcounter}%
- \global\expandafter\attributedef\csname\??attributecount#2\endcsname\scratchcounter
+ \global\expandafter\attributedef\csname\attr_prefix#2\endcsname\scratchcounter
\global\expandafter\newconstant \csname\??attributeid#2\endcsname
\global\csname\??attributeid#2\endcsname\scratchcounter
% some attributes are always global
\doifelseinset\s!global{#3}%
- {\xtoksapp\t_attr_list_global{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
- {\xtoksapp\t_attr_list_local {\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
+ {\xtoksapp\t_attr_list_global{\csname\attr_prefix#2\endcsname\attributeunsetvalue}}%
+ {\xtoksapp\t_attr_list_local {\csname\attr_prefix#2\endcsname\attributeunsetvalue}}%
\doifinset\s!nomath{#3}%
- {\xtoksapp\t_attr_list_nomath{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
+ {\xtoksapp\t_attr_list_nomath{\csname\attr_prefix#2\endcsname\attributeunsetvalue}}%
\doifinset\s!public{#3}%
{\expandafter\glet\csname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}%
\doifinset\s!pickup{#3}%
{\global\expandafter\newconstant\csname\??attributepickup#2\endcsname
\global\csname\??attributepickup#2\endcsname\attributeunsetvalue
- \xtoksapp\t_attr_list_pickup{\csname\??attributecount#2\endcsname\csname\??attributepickup#2\endcsname}%
+ \xtoksapp\t_attr_list_pickup{\csname\attr_prefix#2\endcsname\csname\??attributepickup#2\endcsname}%
\ifcsname#2\s!attribute\endcsname
\expandafter\xdef\csname\s!pickup#2\s!attribute\endcsname
- {\csname\??attributepickup#2\endcsname\csname\??attributecount#2\endcsname}%
+ {\csname\??attributepickup#2\endcsname\csname\attr_prefix#2\endcsname}%
\expandafter\xdef\csname\s!forget#2\s!attribute\endcsname
{\csname\??attributepickup#2\endcsname\attributeunsetvalue}%
\fi}%
@@ -119,10 +95,10 @@
{\the\t_attr_list_pickup\relax}
% \unexpanded\def\pickupattribute#1%
-% {\csname\??attributecount#1\endcsname\csname\??attributepickup#1\endcsname}
+% {\csname\attr_prefix#1\endcsname\csname\??attributepickup#1\endcsname}
% \unexpanded\def\pickupattributelater#1%
-% {\csname\??attributepickup#1\endcsname\csname\??attributecount#1\endcsname}
+% {\csname\??attributepickup#1\endcsname\csname\attr_prefix#1\endcsname}
% \unexpanded\def\newattribute#1%
% {\attr_basics_define_indeed\s!public[\csstring#1][]%
@@ -134,9 +110,9 @@
% expandable so we can \edef them for speed
-\def\dosetattribute#1#2{\csname\??attributecount#1\endcsname#2\relax}
-\def\doresetattribute#1{\csname\??attributecount#1\endcsname\attributeunsetvalue}
-\def\dogetattribute #1{\number\csname\??attributecount#1\endcsname}
+\def\dosetattribute#1#2{\csname\attr_prefix#1\endcsname#2\relax}
+\def\doresetattribute#1{\csname\attr_prefix#1\endcsname\attributeunsetvalue}
+\def\dogetattribute #1{\number\csname\attr_prefix#1\endcsname}
\def\dogetattributeid#1{\number\csname\??attributeid#1\endcsname}
\let\dompattribute\gobbletwoarguments
@@ -145,8 +121,8 @@
\unexpanded\def\resetglobalattributes{\the\t_attr_list_global\attribute\zerocount\zerocount}
\unexpanded\def\resetlocalattributes {\the\t_attr_list_local \attribute\zerocount\zerocount}
\else
- \unexpanded\def\resetglobalattributes{\the\t_attr_list_global\glyphdatafield \zerocount}
- \unexpanded\def\resetlocalattributes {\the\t_attr_list_local \glyphdatafield \zerocount}
+ \unexpanded\def\resetglobalattributes{\the\t_attr_list_global\glyphdatafield\zerocount\glyphscriptfield\zerocount}
+ \unexpanded\def\resetlocalattributes {\the\t_attr_list_local \glyphdatafield\zerocount\glyphscriptfield\zerocount}
\fi
\let\resetallattributes\resetlocalattributes
@@ -163,8 +139,8 @@
%definesystemattribute [state] % nomath
\definesystemattribute [color] [public] % global
\definesystemattribute [colormodel] [public,global]
-% \definesystemattribute [skip]
-% \definesystemattribute [penalty]
+%definesystemattribute [skip]
+%definesystemattribute [penalty]
\definesystemattribute [transparency] [public]
\definesystemattribute [reference] [public]
\definesystemattribute [destination] [public]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua b/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua
index 22822d7dde2..7a37cc94887 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-exp.lua
@@ -44,6 +44,8 @@ local formatters = string.formatters
local todimen = number.todimen
local replacetemplate = utilities.templates.replace
+local addsuffix, joinfile, nameonly, basename, filesuffix = file.addsuffix, file.join, file.nameonly, file.basename, file.suffix
+
local trace_export = false trackers.register ("export.trace", function(v) trace_export = v end)
local trace_spacing = false trackers.register ("export.trace.spacing", function(v) trace_spacing = v end)
local trace_details = false trackers.register ("export.trace.details", function(v) trace_details = v end)
@@ -144,6 +146,7 @@ local treeroot = tree
local treehash = { }
local extras = { }
local checks = { }
+local fixes = { }
local finalizers = { }
local nofbreaks = 0
local used = { }
@@ -327,10 +330,10 @@ local styletemplate = [[
[3] = "left", ["3"] = "left", [variables.flushleft ] = "left",
}
- function wrapups.allusedstyles(basename)
+ function wrapups.allusedstyles(filename)
local result = { replacetemplate(namespacetemplate, {
what = "styles",
- filename = basename,
+ filename = filename,
namespace = contextns,
-- cssnamespaceurl = usecssnamespace and cssnamespaceurl or cssnamespacenop,
cssnamespaceurl = cssnamespaceurl,
@@ -414,27 +417,27 @@ local imagetemplate = [[
local collected = { }
local function usedname(name,page)
- if file.suffix(name) == "pdf" then
+ if filesuffix(name) == "pdf" then
-- temp hack .. we will have a remapper
if page and page > 1 then
- name = f_svgpage(file.nameonly(name),page)
+ name = f_svgpage(nameonly(name),page)
else
- name = f_svgname(file.nameonly(name))
+ name = f_svgname(nameonly(name))
end
end
local scheme = url.hasscheme(name)
if not scheme or scheme == "file" then
-- or can we just use the name ?
- return file.join("../images",file.basename(url.filename(name)))
+ return joinfile("../images",basename(url.filename(name)))
else
return name
end
end
- function wrapups.allusedimages(basename)
+ function wrapups.allusedimages(filename)
local result = { replacetemplate(namespacetemplate, {
what = "images",
- filename = basename,
+ filename = filename,
namespace = contextns,
-- cssnamespaceurl = usecssnamespace and cssnamespaceurl or "",
cssnamespaceurl = cssnamespaceurl,
@@ -551,7 +554,7 @@ do
if not less_state then
setattribute(di,"file",tex.jobname)
if included.date then
- setattribute(di,"date",backends.timestamp())
+ setattribute(di,"date",os.fulltime())
end
setattribute(di,"context",environment.version)
setattribute(di,"version",exportversion)
@@ -707,6 +710,37 @@ end
do
+ function fixes.linenumber(di,data,i)
+ local ni = data[i+1]
+ if ni then
+ if ni.data then
+ while true do
+ local d = ni.data[1]
+ if d then
+ local e = d.element
+ if e then
+ if e == "line" or e == "verbatimline" then
+ insert(d.data,1,di)
+ data[i] = false
+ return
+ else
+ ni = d
+ end
+ else
+ return
+ end
+ else
+ return
+ end
+ end
+ end
+ end
+ end
+
+end
+
+do
+
local synonyms = { }
local sortings = { }
@@ -2111,9 +2145,7 @@ do
function structurestags.setparagraph(align)
if align ~= "" then
usedparagraphs[locatedtag("paragraph")] = {
- dataset = dataset,
- tag = tag,
- align = align,
+ align = align,
}
end
end
@@ -2305,8 +2337,10 @@ do
if not p then
-- skip
elseif exportproperties == v_yes then
+ n = n + 1
r[n] = attributes(p)
else
+ n = n + 1
r[n] = properties(p)
end
end
@@ -2491,6 +2525,8 @@ do
-- skip
elseif di.skip == "ignore" then
-- skip (new)
+elseif di.tg == "ignore" then
+ -- skip (new)
elseif di.content then
if di.samepar then
prevparnumber = false
@@ -2574,9 +2610,12 @@ do
-- also tabulaterow reconstruction .. maybe better as a checker
-- i.e cell attribute
- local function collapsetree()
+ local function collapsetree(tree)
+-- for tag, trees in sortedhash(treehash) do
for tag, trees in next, treehash do
local d = trees[1].data
+-- print("!!!!!!!!",tag)
+-- inspect(trees)
if d then
local nd = #d
if nd > 0 then
@@ -2630,10 +2669,22 @@ do
end
end
+ -- local function showtree(data,when,where)
+ -- if data then
+ -- for i=1,#data do
+ -- local d = data[i]
+ -- if type(d) == "table" and d.element then
+ -- print(when,where,i,d.element,d.parnumber or 0)
+ -- end
+ -- end
+ -- end
+ -- end
+
local function indextree(tree)
local data = tree.data
if data then
local n, new = 0, { }
+ -- showtree(data,"before","index")
for i=1,#data do
local d = data[i]
if not d then
@@ -2650,22 +2701,43 @@ do
end
end
tree.data = new
+ -- showtree(new,"after","index")
end
end
local function checktree(tree)
local data = tree.data
if data then
+ -- showtree(data,"before","check")
for i=1,#data do
local d = data[i]
if type(d) == "table" then
local check = checks[d.tg]
if check then
- check(d)
+ check(d,data,i)
end
checktree(d) -- so parts can pass twice
end
end
+ -- showtree(data,"after","check")
+ end
+ end
+
+ local function fixtree(tree)
+ local data = tree.data
+ if data then
+ -- showtree(data,"before","fix")
+ for i=1,#data do
+ local d = data[i]
+ if type(d) == "table" then
+ local fix = fixes[d.tg]
+ if fix then
+ fix(d,data,i)
+ end
+ fixtree(d) -- so parts can pass twice
+ end
+ end
+ -- showtree(data,"after","fix")
end
end
@@ -2675,6 +2747,7 @@ do
wrapups.finalizetree = finalizetree
wrapups.indextree = indextree
wrapups.checktree = checktree
+ wrapups.fixtree = fixtree
end
@@ -2911,7 +2984,7 @@ local collectresults do -- too many locals otherwise
local kern_code = nodecodes.kern
local disc_code = nodecodes.disc
local whatsit_code = nodecodes.whatsit
- local localpar_code = nodecodes.localpar
+ local par_code = nodecodes.par
local userskip_code = gluecodes.userskip
local rightskip_code = gluecodes.rightskip
@@ -2986,7 +3059,7 @@ local collectresults do -- too many locals otherwise
local function collectresults(head,list,pat,pap) -- is last used (we also have currentattribute)
local p
- local localparagraph
+ local paragraph
local maybewrong
local pid
for n, id, subtype in nextnode, head do
@@ -3004,7 +3077,7 @@ local collectresults do -- too many locals otherwise
if last ~= at then
local tl = taglist[at]
local ap = getattr(n,a_taggedpar) or pap
- if localparagraph and (not ap or ap < localparagraph) then
+ if paragraph and (not ap or ap < paragraph) then
maybewrong = addtomaybe(maybewrong,c,1)
end
pushcontent()
@@ -3040,7 +3113,7 @@ local collectresults do -- too many locals otherwise
currentattribute = last
currentparagraph = ap
end
- if localparagraph and (not ap or ap < localparagraph) then
+ if paragraph and (not ap or ap < paragraph) then
maybewrong = addtomaybe(maybewrong,c,2)
end
if trace_export then
@@ -3102,17 +3175,6 @@ local collectresults do -- too many locals otherwise
end
end
end
- elseif id == disc_code then -- probably too late
- local pre, post, replace = getdisc(n)
- if keephyphens then
- if pre and not getnext(pre) and isglyph(pre) == 0xAD then -- hyphencode then
- nofcurrentcontent = nofcurrentcontent + 1
- currentcontent[nofcurrentcontent] = hyphen
- end
- end
- if replace then
- collectresults(replace,nil)
- end
elseif id == glue_code then
-- we need to distinguish between hskips and vskips
local ca = getattr(n,a_characters)
@@ -3271,6 +3333,9 @@ local collectresults do -- too many locals otherwise
elseif id == kern_code then
local kern = getkern(n)
if kern > 0 then
+local a = getattr(n,a_tagged) or pat
+local t = taglist[a]
+if not t or t.tagname ~= "ignore" then -- maybe earlier on top)
local limit = threshold
if p then
local c, f = isglyph(p)
@@ -3280,7 +3345,7 @@ local collectresults do -- too many locals otherwise
end
if kern > limit then
if last and not somespace[currentcontent[nofcurrentcontent]] then
- local a = getattr(n,a_tagged) or pat
+-- local a = getattr(n,a_tagged) or pat
if a == last then
if not somespace[currentcontent[nofcurrentcontent]] then
if trace_export then
@@ -3301,12 +3366,14 @@ local collectresults do -- too many locals otherwise
end
nofcurrentcontent = nofcurrentcontent + 1
currentcontent[nofcurrentcontent] = " "
- currentnesting = taglist[last]
+-- currentnesting = taglist[last]
+currentnesting = t
pushentry(currentnesting)
currentattribute = last
end
end
end
+end
end
elseif id == whatsit_code then
if subtype == userdefinedwhatsit_code then
@@ -3323,8 +3390,20 @@ local collectresults do -- too many locals otherwise
last = nil
currentparagraph = nil
end
- elseif not localparagraph and id == localpar_code and start_of_par(n) then
- localparagraph = getattr(n,a_taggedpar)
+ elseif not paragraph and id == par_code and start_of_par(n) then
+ paragraph = getattr(n,a_taggedpar)
+ elseif id == disc_code then
+ -- very unlikely because we stripped them
+ local pre, post, replace = getdisc(n)
+ if keephyphens then
+ if pre and not getnext(pre) and isglyph(pre) == 0xAD then -- hyphencode then
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = hyphen
+ end
+ end
+ if replace then
+ collectresults(replace,nil)
+ end
end
p = n
pid = id
@@ -3393,7 +3472,7 @@ local xmlpreamble = [[
return replacetemplate(xmlpreamble, {
standalone = standalone and "yes" or "no",
filename = tex.jobname,
- date = included.date and backends.timestamp(),
+ date = included.date and os.fulltime(),
contextversion = environment.version,
exportversion = exportversion,
})
@@ -3419,7 +3498,7 @@ local cssheadlink = [[
elseif cssfile == "export-example.css" then
-- ignore
elseif not done[cssfile] then
- cssfile = file.join(path,cssfile)
+ cssfile = joinfile(path,basename(cssfile))
report_export("adding css reference '%s'",cssfile)
files[#files+1] = cssfile
result[#result+1] = replacetemplate(csspreamble, { filename = cssfile })
@@ -3480,10 +3559,10 @@ local htmltemplate = [[
mixed = "inline",
}
- local function allusedelements(basename)
+ local function allusedelements(filename)
local result = { replacetemplate(namespacetemplate, {
what = "template",
- filename = basename,
+ filename = filename,
namespace = contextns,
-- cssnamespaceurl = usecssnamespace and cssnamespaceurl or "",
cssnamespaceurl = cssnamespaceurl,
@@ -3691,6 +3770,31 @@ local htmltemplate = [[
end
end
+ -- Some elements are not supported (well) in css so we need to retain them. For
+ -- instance, tablecells have no colspan so basically that renders css table div
+ -- elements quite useless. A side effect is that we nwo can have conflicts when
+ -- we mix in with other html (as there is no reset). Of course, when it eventually
+ -- gets added, there is a change then that those not using the div abstraction
+ -- will be rediculed.
+ --
+ -- a table tr td th thead tbody tfoot
+ --
+
+ local crappycss = {
+ table = "table", tabulate = "table",
+ tablehead = "thead", tabulatehead = "thead",
+ tablebody = "tbody", tabulatebody = "tbody",
+ tablefoot = "tfoot", tabulatefoot = "tfoot",
+ tablerow = "tr", tabulaterow = "tr",
+ tablecell = "td", tabulatecell = "td",
+ }
+
+ local cssmapping = false
+
+ directives.register("export.nativetags", function(v)
+ cssmapping = v and crappycss or false
+ end)
+
local function remap(specification,source,target)
local comment = nil -- share comments
for c in xmlcollected(source,"*") do
@@ -3762,11 +3866,11 @@ local htmltemplate = [[
}
end
end
- c.tg = "div"
c.at = attr
if label then
attr.label = label
end
+ c.tg = cssmapping and cssmapping[tg] or "div"
end
end
end
@@ -3774,11 +3878,6 @@ local htmltemplate = [[
-- local cssfile = nil directives.register("backend.export.css", function(v) cssfile = v end)
- local addsuffix = file.addsuffix
- local joinfile = file.join
- local nameonly = file.nameonly
- local basename = file.basename
-
local embedfile = false directives.register("export.embed",function(v) embedfile = v end)
function structurestags.finishexport()
@@ -3803,6 +3902,7 @@ local htmltemplate = [[
end
report_export("")
--
+ wrapups.fixtree(tree)
wrapups.collapsetree(tree)
wrapups.indextree(tree)
wrapups.checktree(tree)
@@ -4054,28 +4154,30 @@ local htmltemplate = [[
local metadata = structures.tags.getmetadata()
local specification = {
- name = usedname,
- identifier = os.uuid(),
- images = wrapups.uniqueusedimages(),
- imagefile = joinfile("styles",imagefilebase),
- imagepath = "images",
- stylepath = "styles",
- xmlfiles = { xmlfilebase },
- xhtmlfiles = { xhtmlfilebase },
- htmlfiles = { htmlfilebase },
- styles = cssfiles,
- htmlroot = htmlfilebase,
- language = languagenames[texgetcount("mainlanguagenumber")],
- title = validstring(finetuning.title) or validstring(identity.title),
- subtitle = validstring(finetuning.subtitle) or validstring(identity.subtitle),
- author = validstring(finetuning.author) or validstring(identity.author),
- firstpage = validstring(finetuning.firstpage),
- lastpage = validstring(finetuning.lastpage),
- metadata = metadata,
+ name = usedname,
+ identifier = os.uuid(),
+ images = wrapups.uniqueusedimages(),
+ imagefile = joinfile("styles",imagefilebase),
+ imagepath = "images",
+ stylepath = "styles",
+ xmlfiles = { xmlfilebase },
+ xhtmlfiles = { xhtmlfilebase },
+ htmlfiles = { htmlfilebase },
+ styles = cssfiles,
+ htmlroot = htmlfilebase,
+ language = languagenames[texgetcount("mainlanguagenumber")],
+ title = validstring(finetuning.title) or validstring(identity.title),
+ subtitle = validstring(finetuning.subtitle) or validstring(identity.subtitle),
+ author = validstring(finetuning.author) or validstring(identity.author),
+ firstpage = validstring(finetuning.firstpage),
+ lastpage = validstring(finetuning.lastpage),
+ metadata = metadata,
}
report_export("saving specification in %a",specificationfilename,specificationfilename)
+ xml.wipe(xmltree,"metadata") -- maybe optional
+
io.savedata(specificationfilename,table.serialize(specification,true))
-- the html export for epub is different in the sense that it uses div's instead of
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv
index 3e8469b145e..05e40469774 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-exp.mkiv
@@ -117,7 +117,7 @@
\clf_settagconstruct
{\currentstartstop}%
{\startstopparameter\c!style}%
- \attribute\colorattribute
+ \c_attr_color
\ifvmode\plusone\else\zerocount\fi
\relax
\fi}%
@@ -129,7 +129,7 @@
\clf_settaghighlight
{\currenthighlight}%
{\highlightparameter\c!style}
- \attribute\colorattribute
+ \c_attr_color
\ifvmode\plusone\else\zerocount\fi
\relax
\fi}%
@@ -159,9 +159,9 @@
\appendtoks
\unexpanded\def\dotagsetparcounter
- {\global\advance\tagparcounter\plusone\attribute\taggedparattribute\tagparcounter}%
+ {\global\advance\tagparcounter\plusone\c_attr_taggedpar\tagparcounter}%
\unexpanded\def\doresetparcounter
- {\attribute\taggedparattribute\attributeunsetvalue}%
+ {\c_attr_taggedpar\attributeunsetvalue}%
\to \everyenableelements
\appendtoks
@@ -357,6 +357,6 @@
\ifexporting
\dostartexport % in case it is done inside \starttext
\fi
-\to \everysetupdocument
+\to \everystartdocument
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua
index b0af61edcd8..d01be4a73f5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-ini.lua
@@ -62,17 +62,6 @@ backends.tables = { } setmetatableindex(backends.tables, tables
backends.current = "unknown"
-local lmtx_mode = nil
-
-local function lmtxmode()
- if lmtx_mode == nil then
- lmtx_mode = CONTEXTLMTXMODE > 0 and drivers and drivers.lmtxversion
- end
- return lmtx_mode
-end
-
-codeinjections.lmtxmode = lmtxmode
-
function backends.install(what)
if type(what) == "string" then
local backend = backends[what]
@@ -100,13 +89,7 @@ end
statistics.register("used backend", function()
local bc = backends.current
if bc ~= "unknown" then
- local lmtx = lmtxmode()
- local cmnt = backends[bc].comment or "no comment"
- if lmtx then
- return format("lmtx version %0.2f, %s (%s)",lmtx,bc,cmnt)
- else
- return format("%s (%s)",bc,cmnt)
- end
+ return format("%s (%s)",bc,backends[bc].comment or "no comment")
else
return nil
end
@@ -164,10 +147,8 @@ function codeinjections.setpagedimensions(paperwidth,paperheight)
if paperheight then
paper_height = paperheight
end
- if not lmtxmode() then
- texset("global","pageheight",paper_height)
- texset("global","pagewidth", paper_width)
- end
+ texset("global","pageheight",paper_height)
+ texset("global","pagewidth", paper_width)
return paper_width, paper_height
end
@@ -178,11 +159,10 @@ end
implement {
name = "shipoutoffset",
actions = function()
- context(lmtxmode() and "0pt" or "-1in") -- the old tex offset
+ context("-1in") -- the old tex offset
end
}
-
local page_x_origin = 0
local page_y_origin = 0
@@ -207,6 +187,6 @@ implement {
-- could also be codeinjections
-function backends.noflatelua()
- return status.late_callbacks or 0
+function backends.getcallbackstate()
+ return { count = status.late_callbacks or 0 }
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-out.lua b/Master/texmf-dist/tex/context/base/mkiv/back-out.lua
deleted file mode 100644
index 5ea5aa048ac..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/back-out.lua
+++ /dev/null
@@ -1,259 +0,0 @@
-if not modules then modules = { } end modules ['back-out'] = {
- version = 1.001,
- comment = "companion to back-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local type = type
-local loadstring = loadstring
-
-local context = context
-
--- tokens.scanners.....
-
-local get = token.get_index
-local scaninteger = token.scan_int
-local scanstring = token.scan_string
-local scankeyword = token.scan_keyword
-local scantokenlist = token.scan_tokenlist
------ scancode = token.scan_code
-
-local tokentostring = token.to_string
-
-local logwriter = logs.writer
-local openfile = io.open
-local flushio = io.flush
-
-local nuts = nodes.nuts
-local tonode = nuts.tonode
-local copynode = nuts.copy
-local nodepool = nuts.pool
-
-local getdata = nuts.getdata
-
-local whatsit_code = nodes.nodecodes.whatsit
-
-local whatsitcodes = nodes.whatsitcodes
-
-local literalvalues = nodes.literalvalues
-local originliteral_code = literalvalues.origin
-local pageliteral_code = literalvalues.page
-local directliteral_code = literalvalues.direct
-local rawliteral_code = literalvalues.raw
-
-local nodeproperties = nodes.properties.data
-
-local channels = { }
-
-local register = nodepool.register
-local newnut = nuts.new
-
-local opennode = register(newnut(whatsit_code,whatsitcodes.open))
-local writenode = register(newnut(whatsit_code,whatsitcodes.write))
-local closenode = register(newnut(whatsit_code,whatsitcodes.close))
-local lateluanode = register(newnut(whatsit_code,whatsitcodes.latelua))
-local literalnode = register(newnut(whatsit_code,whatsitcodes.literal))
-local savenode = register(newnut(whatsit_code,whatsitcodes.save))
-local restorenode = register(newnut(whatsit_code,whatsitcodes.restore))
-local setmatrixnode = register(newnut(whatsit_code,whatsitcodes.setmatrix))
-
-local tomatrix = drivers.helpers.tomatrix
-
-local immediately = false -- not watertight
-
-local open_command, write_command, close_command
-
-backends = backends or { }
-
-local function openout()
- local channel = scaninteger()
- scankeyword("=") -- hack
- local filename = scanstring()
- if not immediately then
- local n = copynode(opennode)
- nodeproperties[n] = { channel = channel, filename = filename } -- action = "open"
- return context(tonode(n))
- elseif not channels[channel] then
- local handle = openfile(filename,"wb") or false
- if handle then
- channels[channel] = handle
- else
- -- error
- end
- end
- immediately = false
-end
-
-function backends.openout(n)
- local p = nodeproperties[n]
- if p then
- local handle = openfile(p.filename,"wb") or false
- if handle then
- channels[p.channel] = handle
- else
- -- error
- end
- end
-end
-
-local function write()
- local channel = scaninteger()
- if not immediately then
- local t = scantokenlist()
- local n = copynode(writenode)
- nodeproperties[n] = { channel = channel, data = t } -- action = "write"
- return context(tonode(n))
- else
- local content = scanstring()
- local handle = channels[channel]
- if handle then
- handle:write(content,"\n")
- else
- logwriter(content,"\n")
- end
- end
- immediately = false
-end
-
-function backends.writeout(n)
- local p = nodeproperties[n]
- if p then
- local handle = channels[p.channel]
- local content = tokentostring(p.data)
- if handle then
- handle:write(content,"\n")
- else
- logwriter(content,"\n")
- end
- end
-end
-
-local function closeout()
- local channel = scaninteger()
- if not immediately then
- local n = copynode(closenode)
- nodeproperties[n] = { channel = channel } -- action = "close"
- return context(tonode(n))
- else
- local handle = channels[channel]
- if handle then
- handle:close()
- channels[channel] = false
- flushio()
- else
- -- error
- end
- end
- immediately = false
-end
-
-function backends.closeout(n)
- local p = nodeproperties[n]
- if p then
- local channel = p.channel
- local handle = channels[channel]
- if handle then
- handle:close()
- channels[channel] = false
- flushio()
- else
- -- error
- end
- end
-end
-
-local function immediate()
- immediately = true
-end
-
-local noflatelua = 0
-
-local function latelua()
- local node = copynode(lateluanode)
- local name = "latelua"
- if scankeyword("name") then
- name = scanstring()
- end
- local data = scantokenlist()
- nodeproperties[node] = { name = name, data = data }
- return context(tonode(node))
-end
-
-function backends.latelua(current,pos_h,pos_v) -- todo: pass pos_h and pos_v (more efficient in lmtx)
- local p = nodeproperties[current]
- if p then
- data = p.data
- else
- data = getdata(current)
- end
- noflatelua = noflatelua + 1
- local kind = type(data)
- if kind == "table" then
- data.action(data.specification or data)
- elseif kind == "function" then
- data()
- else
- if kind ~= "string" then
- data = tokentostring(data)
- end
- if #data ~= "" then
- local code = loadstring(data)
- if code then
- code()
- end
- end
- end
-end
-
-function backends.noflatelua()
- return noflatelua
-end
-
-function nodepool.originliteral(str) local t = copynode(literalnode) nodeproperties[t] = { data = str, mode = originliteral_code } return t end
-function nodepool.pageliteral (str) local t = copynode(literalnode) nodeproperties[t] = { data = str, mode = pageliteral_code } return t end
-function nodepool.directliteral(str) local t = copynode(literalnode) nodeproperties[t] = { data = str, mode = directliteral_code } return t end
-function nodepool.rawliteral (str) local t = copynode(literalnode) nodeproperties[t] = { data = str, mode = rawliteral_code } return t end
-
-local pdfliterals = {
- [originliteral_code] = originliteral_code, [literalvalues[originliteral_code]] = originliteral_code,
- [pageliteral_code] = pageliteral_code, [literalvalues[pageliteral_code]] = pageliteral_code,
- [directliteral_code] = directliteral_code, [literalvalues[directliteral_code]] = directliteral_code,
- [rawliteral_code] = rawliteral_code, [literalvalues[rawliteral_code]] = rawliteral_code,
-}
-
-function nodepool.literal(mode,str)
- local t = copynode(literalnode)
- if str then
- nodeproperties[t] = { data = str, mode = pdfliterals[mode] or pageliteral_code }
- else
- nodeproperties[t] = { data = mode, mode = pageliteral_code }
- end
- return t
-end
-
-function nodepool.save()
- return copynode(savenode)
-end
-
-function nodepool.restore()
- return copynode(restorenode)
-end
-
-function nodepool.setmatrix(rx,sx,sy,ry,tx,ty)
- local t = copynode(setmatrixnode)
- nodeproperties[t] = { matrix = tomatrix(rx,sx,sy,ry,tx,ty) }
- return t
-end
-
-interfaces.implement { name = "immediate", actions = immediate, public = true, protected = true }
-interfaces.implement { name = "openout", actions = openout, public = true, protected = true }
-interfaces.implement { name = "write", actions = write, public = true, protected = true }
-interfaces.implement { name = "closeout", actions = closeout, public = true, protected = true }
-interfaces.implement { name = "latelua", actions = latelua, public = true, protected = true }
-interfaces.implement { name = "special", actions = scanstring, public = true, protected = true }
-
-open_command = get(token.create("openout"))
-write_command = get(token.create("write"))
-close_command = get(token.create("closeout"))
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-out.mkxl b/Master/texmf-dist/tex/context/base/mkiv/back-out.mkxl
deleted file mode 100644
index 26548a0a496..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/back-out.mkxl
+++ /dev/null
@@ -1,23 +0,0 @@
-%D \module
-%D [ file=back-out,
-%D version=2019.02.08,
-%D title=\CONTEXT\ Backend Macros,
-%D subtitle=Output,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\registerctxluafile{back-out}{}
-
-\let\normalimmediate\immediate
-\let\normalopenout \openout
-\let\normalwrite \write
-\let\normalcloseout \closeout
-\let\normallatelua \latelua
-\let\normalspecial \special
-
-\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv
index ec1c641e690..a8b157019b3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkiv
@@ -21,6 +21,7 @@
\registerctxluafile{lpdf-nod}{}
\registerctxluafile{lpdf-eng}{optimize}
\registerctxluafile{lpdf-col}{}
+\registerctxluafile{lpdf-vfc}{}
\registerctxluafile{lpdf-xmp}{}
\registerctxluafile{lpdf-ano}{}
\registerctxluafile{lpdf-res}{}
@@ -65,9 +66,9 @@
\unexpanded\def\pdflastobj {\numexpr\clf_pdflastobj\relax}
\unexpanded\def\pdfrefobj {\clf_pdfrefobj }
-\unexpanded\def\pdfrestore {\clf_restore}
-\unexpanded\def\pdfsave {\clf_save}
-\unexpanded\def\pdfsetmatrix{\clf_setmatrix}
+\unexpanded\def\pdfrestore {\pdfextension restore}
+\unexpanded\def\pdfsave {\pdfextension save}
+\unexpanded\def\pdfsetmatrix{\pdfextension setmatrix}
\let\pdfxform \saveboxresource
\let\pdflastxform \lastsavedboxresourceindex
@@ -88,7 +89,7 @@
\appendtoks
\edef\p_file{\backendparameter{xmpfile}}%
- \ifx\p_file\empty\else
+ \ifx\empty\p_file\else
\clf_setxmpfile{\p_file}%
\fi
\to \everysetupbackend
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkxl b/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkxl
deleted file mode 100644
index ab65458c576..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/back-pdf.mkxl
+++ /dev/null
@@ -1,156 +0,0 @@
-%D \module
-%D [ file=back-pdf,
-%D version=2009.04.15,
-%D title=\CONTEXT\ Backend Macros,
-%D subtitle=\PDF,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D The less there is here, the better. After a decade it is time to remove the \type
-%D {\pdf*} ones completely. For the moment I keep them commented but even that will
-%D go away.
-
-\writestatus{loading}{ConTeXt Backend Macros / PDF}
-
-\registerctxluafile{lpdf-ini}{optimize}
-\registerctxluafile{lpdf-lmt}{optimize}
-
-\registerctxluafile{lpdf-col}{}
-\registerctxluafile{lpdf-xmp}{}
-\registerctxluafile{lpdf-ano}{}
-\registerctxluafile{lpdf-res}{}
-\registerctxluafile{lpdf-mis}{}
-\registerctxluafile{lpdf-ren}{}
-\registerctxluafile{lpdf-grp}{}
-\registerctxluafile{lpdf-wid}{}
-\registerctxluafile{lpdf-fld}{}
-\registerctxluafile{lpdf-mov}{}
-\registerctxluafile{lpdf-u3d}{} % this will become a module
-\registerctxluafile{lpdf-swf}{} % this will become a module
-\registerctxluafile{lpdf-tag}{}
-\registerctxluafile{lpdf-fmt}{}
-\registerctxluafile{lpdf-pde}{}
-\registerctxluafile{lpdf-img}{optimize}
-\registerctxluafile{lpdf-epa}{}
-\registerctxluafile{lpdf-emb}{optimize}
-\registerctxluafile{lpdf-fnt}{}
-
-\registerctxluafile{back-pdp}{}
-\registerctxluafile{back-pdf}{} % some code will move to lpdf-*
-
-\loadmarkfile{back-u3d} % this will become a module
-\loadmarkfile{back-swf} % this will become a module
-
-\unprotect
-
-%D We will minimize the number of calls to \PDF\ specific primitives and delegate
-%D all management and injection of code to the backend.
-%D
-%D Because we do a lot in \LUA\ and don't want interferences, we nil most of the
-%D \PDFTEX\ primitives. Of course one can always use the \type {\pdfvariable},
-%D \type {\pdfextension} and \type {\pdffeedback} primitives but it will probably
-%D have bad side effects.
-
-\unexpanded\def\pdfextension{\clf_pdfextension}
- \def\pdffeedback {\clf_pdffeedback}
-
-%D For the moment we keep this for tikz but hopefully it will at some point use
-%D the proper ones. Consider them obsolete:
-
-\unexpanded\def\pdfliteral {\clf_pdfliteral}
-\unexpanded\def\pdfobj {\clf_pdfobj}%
-\unexpanded\def\pdflastobj {\numexpr\clf_pdflastobj\relax}
-\unexpanded\def\pdfrefobj {\clf_pdfrefobj }
-
-\unexpanded\def\pdfrestore {\clf_restore}
-\unexpanded\def\pdfsave {\clf_save}
-\unexpanded\def\pdfsetmatrix{\clf_setmatrix}
-
- \let\pdfxform \saveboxresource
- \let\pdflastxform \lastsavedboxresourceindex
- \let\pdfrefxform \useboxresource
-
-%D Here are quick and dirty compression flippers, mostly used when testing something
-%D as one can best stick to the defaults that also adapt to specific standards.
-
-\unexpanded\def\nopdfcompression {\clf_setpdfcompression\zerocount\zerocount}
-\unexpanded\def\onlypdfobjectcompression{\clf_setpdfcompression\zerocount\plusthree}
-\unexpanded\def\maximumpdfcompression {\clf_setpdfcompression\plusnine \plusnine }
-\unexpanded\def\normalpdfcompression {\clf_setpdfcompression\plusthree\plusthree}
-
-%D PDF/X (maybe combine the two lua calls)
-
-\setupbackend
- [xmpfile=]
-
-\appendtoks
- \edef\p_file{\backendparameter{xmpfile}}%
- \ifx\p_file\empty\else
- \clf_setxmpfile{\p_file}%
- \fi
-\to \everysetupbackend
-
-%D This will change:
-
-\appendtoks
- \clf_setformat
- format {\backendparameter\c!format}%
- level {\backendparameter\c!level}%
- option {\backendparameter\c!option}%
- profile {\backendparameter\c!profile}%
- intent {\backendparameter\c!intent}%
- file {\backendparameter\c!file}%
- \relax
-\to \everysetupbackend
-
-%D These are the only official methods to add stuff to the resources. If more is
-%D needed for third party low level code, it can be added.
-
-\unexpanded\def\pdfbackendsetcatalog #1#2{\clf_lpdf_addtocatalog{#1}{#2}}
-\unexpanded\def\pdfbackendsetinfo #1#2{\clf_lpdf_addtoinfo{#1}{#2}}
-\unexpanded\def\pdfbackendsetname #1#2{\clf_lpdf_addtonames{#1}{#2}}
-
-\unexpanded\def\pdfbackendsetpageattribute #1#2{\clf_lpdf_addtopageattributes{#1}{#2}}
-\unexpanded\def\pdfbackendsetpagesattribute#1#2{\clf_lpdf_addtopagesattributes{#1}{#2}}
-\unexpanded\def\pdfbackendsetpageresource #1#2{\clf_lpdf_addtopageresources{#1}{#2}}
-
-\unexpanded\def\pdfbackendsetextgstate #1#2{\clf_lpdf_adddocumentextgstate{#1}{#2}}
-\unexpanded\def\pdfbackendsetcolorspace #1#2{\clf_lpdf_adddocumentcolorspace{#1}{#2}}
-\unexpanded\def\pdfbackendsetpattern #1#2{\clf_lpdf_adddocumentpattern{#1}{#2}}
-\unexpanded\def\pdfbackendsetshade #1#2{\clf_lpdf_adddocumentshade{#1}{#2}}
-
- \def\pdfbackendcurrentresources {\clf_lpdf_collectedresources}
- \def\pdfcolor #1{\clf_lpdf_color\numexpr\thecolorattribute{#1}\relax}
-
-%D This is a temporary hack mthat will be removed, improved or somehow can become
-%D default.
-
-\def\TransparencyHack{\setupcolors[\c!pagecolormodel=\v!auto]}
-
-%D Just in case one needs this \unknown:
-%D
-%D \starttyping
-%D text \pdfbackendactualtext{Meier}{Müller} text
-%D \stoptyping
-
-\unexpanded\def\pdfbackendactualtext#1#2% not interfaced
- {\clf_startactualtext{#2}%
- #1%
- \clf_stopactualtext}
-
-\let\pdfactualtext\pdfbackendactualtext
-
-%D Bah, this is also needed for tikz:
-
-\ifdefined\pdfsavepos\else
- \let\pdfsavepos \savepos
- \let\pdflastxpos\lastxpos
- \let\pdflastypos\lastypos
-\fi
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua b/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua
index 6111cf469b2..857f13ef239 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-pdp.lua
@@ -74,7 +74,8 @@ local function pdfobj()
immediate = immediate,
}
if fileobject then
- object.filename = content
+ object.file = content
+ -- object.filename = content
else
object.string = content
end
@@ -214,7 +215,7 @@ local function pdfextension()
if e then
e()
else
- report("\\pdfextension: unknown %a",w)
+ report("\\pdfextension: unsupported %a",w)
end
end
end
@@ -235,7 +236,7 @@ local function pdffeedback()
if f then
f()
else
- report("\\pdffeedback: unknown %a",w)
+ report("\\pdffeedback: unsupported %a",w)
end
end
end
@@ -248,34 +249,39 @@ end
-- linkmargin threadmargin vorigin xformmargin (tokenlists:) pageattr pageresources
-- pagesattr pkmode trailerid xformattr xformresources
--- local variables = {
--- }
---
--- local function pdfvariable()
--- local w = scanword()
--- if w then
--- local f = variables[w]
--- if f then
--- f()
--- else
--- print("invalid variable",w)
--- end
--- else
--- print("missing variable")
--- end
--- end
+local variables = {
+ minorversion = function() context(lpdf.minorversion()) end,
+ majorversion = function() context(lpdf.majorversion()) end,
+}
+
+local function pdfvariable()
+ local w = scanword()
+ if w then
+ local f = variables[w]
+ if f then
+ f()
+ else
+ report("\\pdfvariable: unsupported %a",w)
+ end
+ else
+ print("missing variable")
+ end
+end
-- kept:
implement { name = "pdfextension", actions = pdfextension }
implement { name = "pdffeedback", actions = pdffeedback }
---------- { name = "pdfvariable", actions = pdfvariable }
+implement { name = "pdfvariable", actions = pdfvariable }
-- for the moment (tikz)
-implement { name = "pdfliteral", actions = pdfliteral }
-implement { name = "pdfobj", actions = pdfobj }
-implement { name = "pdflastobj", actions = pdflastobj }
-implement { name = "pdfrefobj", actions = pdfrefobj }
---------- { name = "pdfannot", actions = pdfannot }
---------- { name = "pdfdest", actions = pdfdest }
+implement { name = "pdfliteral", actions = pdfliteral }
+implement { name = "pdfobj", actions = pdfobj }
+implement { name = "pdflastobj", actions = pdflastobj }
+implement { name = "pdfrefobj", actions = pdfrefobj }
+--------- { name = "pdfannot", actions = pdfannot }
+--------- { name = "pdfdest", actions = pdfdest }
+--------- { name = "pdfsave", actions = pdfsave }
+--------- { name = "pdfrestore", actions = pdfrestore }
+--------- { name = "pdfsetmatrix", actions = pdfsetmatrix }
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-res.lua b/Master/texmf-dist/tex/context/base/mkiv/back-res.lua
index 2ca4a5ac8b0..4ee6d15d35c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-res.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/back-res.lua
@@ -19,7 +19,6 @@ local scandimension = scanners.dimension
local scanword = scanners.word
local scanwhd = scanners.whd
-local scanners = interfaces.scanners
local implement = interfaces.implement
local constants = interfaces.constants
local variables = interfaces.variables
diff --git a/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv
index 5389400f31b..a80a229337f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/bibl-tra.mkiv
@@ -815,9 +815,6 @@
\doifelse{\publicationlistparameter\c!maybeyear}{\v!off}{\def\maybeyear##1{}}{\def\maybeyear##1{##1}}%
\forgetall}
-\unexpanded\def\outdented#1% move to supp-box ?
- {\hskip-\hangindent#1\relax}
-
%D The full list of publications
\unexpanded\def\completepublications
@@ -1155,9 +1152,13 @@
%D edef, and the \type{\robustdoifinsetelse} doesn't listen to
%D \type{\doglobal }
-\unexpanded\def\robustaddtocommalist#1#2% {item} \cs
- {\robustdoifelseinset{#1}#2\resetglobal
- {\dodoglobal\xdef#2{\ifx#2\empty\else#2,\fi#1}}}
+\pushoverloadmode
+
+ \unexpanded\def\robustaddtocommalist#1#2% {item} \cs
+ {\robustdoifelseinset{#1}#2\resetglobal
+ {\dodoglobal\xdef#2{\ifx#2\empty\else#2,\fi#1}}}
+
+\popoverloadmode
%D \macros{donormalbibauthoryear}
%D
diff --git a/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua
index f825b7aa382..0b35c3b65aa 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.lua
@@ -188,7 +188,11 @@ blobs.strht = strht
blobs.strdp = strdp
blobs.strhd = strhd
-implement { name = "strwd", arguments = "string", actions = { strwd, context } }
-implement { name = "strht", arguments = "string", actions = { strht, context } }
-implement { name = "strdp", arguments = "string", actions = { strdp, context } }
-implement { name = "strhd", arguments = "string", actions = { strhd, context } }
+-- upgraded
+
+local scan_hbox = tokens.scanners.hbox
+
+implement { name = "strwd", actions = function() local l = scan_hbox() context(l.width) flush_node_list(l) end }
+implement { name = "strht", actions = function() local l = scan_hbox() context(l.height) flush_node_list(l) end }
+implement { name = "strdp", actions = function() local l = scan_hbox() context(l.depth) flush_node_list(l) end }
+implement { name = "strhd", actions = function() local l = scan_hbox() context(l.height + l.depth) flush_node_list(l) end }
diff --git a/Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv
index 3cee3ff2f53..dd33087f280 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/blob-ini.mkiv
@@ -32,12 +32,13 @@
\def\dpofstring#1{\dimexpr\clf_strdp{#1}\scaledpoint\relax}
\def\hdofstring#1{\dimexpr\clf_strhd{#1}\scaledpoint\relax}
-\def\widthofstring {\the\wdofstring}
-\def\heightofstring {\the\htofstring}
-\def\depthofstring {\the\dpofstring}
-\def\heightanddepthofstring{\the\hdofstring}
+\def\widthofstring {\the\wdofstring}
+\def\heightofstring {\the\htofstring}
+\def\depthofstring {\the\dpofstring}
+\def\totalofstring {\the\hdofstring}
-\let\htdpofstring \hdofstring
+\let\heightanddepthofstring\totalofstring
+\let\htdpofstring \hdofstring
\let\hd\htdp % if yes then move this
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv
index f6a25b5f804..9a6a884f00a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-imp-nested.mkiv
@@ -15,7 +15,7 @@
\unprotect
-\unexpanded\def\donestedtypingstart{\bgroup\swaptypeface{}}
-\unexpanded\def\donestedtypingstop {\egroup{}}
+\permanent\protected\def\donestedtypingstart{\bgroup\swaptypeface{}}
+\permanent\protected\def\donestedtypingstop {\egroup{}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua
index 5b5c4786756..4589e5498c5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.lua
@@ -42,7 +42,9 @@ local scantokencode = scanners.tokencode
local getters = tokens.getters
local gettoken = getters.token
-local scanners = interfaces.scanners
+local getcommand = token.get_command
+local getcsname = token.get_csname
+local getnextchar = token.scan_next_char or token.get_next_char
local variables = interfaces.variables
local settings_to_array = utilities.parsers.settings_to_array
@@ -375,7 +377,7 @@ local tochar = {
local experiment = false
local experiment = scantokencode and true
-function tokens.pickup(start,stop)
+local function pickup(start,stop)
local stoplist = split[stop] -- totable(stop)
local stoplength = #stoplist
local stoplast = stoplist[stoplength]
@@ -439,11 +441,11 @@ function tokens.pickup(start,stop)
-- we're skipping leading stuff, like obeyedlines and relaxes
if experiment and size > 0 then
-- we're probably in a macro
- local char = tochar[token.get_command(t)] -- could also be char(token.get_mode(t))
+ local char = tochar[getcommand(t)]
if char then
size = size + 1 ; list[size] = char
else
- local csname = token.get_csname(t)
+ local csname = getcsname(t)
if csname == stop then
stoplength = 0
break
@@ -494,6 +496,118 @@ function tokens.pickup(start,stop)
end
end
+-- -- lmtx:
+--
+-- local function pickup(start,stop)
+-- local stoplist = split[stop] -- totable(stop)
+-- local stoplength = #stoplist
+-- local stoplast = stoplist[stoplength]
+-- local startlist = split[start] -- totable(start)
+-- local startlength = #startlist
+-- local startlast = startlist[startlength]
+-- local list = { }
+-- local size = 0
+-- local depth = 0
+-- getnextchar() -- we start with a \relax
+-- while true do -- or use depth
+-- local char = getnextchar()
+-- if char then
+-- size = size + 1
+-- list[size] = char
+-- if char == stoplast and size >= stoplength then
+-- local done = true
+-- local last = size
+-- for i=stoplength,1,-1 do
+-- if stoplist[i] ~= list[last] then
+-- done = false
+-- break
+-- end
+-- last = last - 1
+-- end
+-- if done then
+-- if depth > 0 then
+-- depth = depth - 1
+-- else
+-- break
+-- end
+-- char = false -- trick: let's skip the next (start) test
+-- end
+-- end
+-- if char == startlast and size >= startlength then
+-- local done = true
+-- local last = size
+-- for i=startlength,1,-1 do
+-- if startlist[i] ~= list[last] then
+-- done = false
+-- break
+-- end
+-- last = last - 1
+-- end
+-- if done then
+-- depth = depth + 1
+-- end
+-- end
+-- else
+-- local t = gettoken()
+-- if t then
+-- -- we're skipping leading stuff, like obeyedlines and relaxes
+-- if experiment and size > 0 then
+-- -- we're probably in a macro
+-- local char = tochar[getcommand(t)]
+-- if char then
+-- size = size + 1 ; list[size] = char
+-- else
+-- local csname = getcsname(t)
+-- if csname == stop then
+-- stoplength = 0
+-- break
+-- else
+-- size = size + 1 ; list[size] = "\\"
+-- size = size + 1 ; list[size] = csname
+-- size = size + 1 ; list[size] = " "
+-- end
+-- end
+-- else
+-- -- ignore and hope for the best
+-- end
+-- else
+-- break
+-- end
+-- end
+-- end
+-- local start = 1
+-- local stop = size - stoplength - 1
+-- -- not good enough: only empty lines, but even then we miss the leading
+-- -- for verbatim
+-- --
+-- -- the next is not yet adapted to the new scanner ... we don't need lpeg here
+-- --
+-- for i=start,stop do
+-- local li = list[i]
+-- if lpegmatch(blackspace,li) then
+-- -- keep going
+-- elseif lpegmatch(eol,li) then
+-- -- okay
+-- start = i + 1
+-- else
+-- break
+-- end
+-- end
+-- for i=stop,start,-1 do
+-- if lpegmatch(whitespace,list[i]) then
+-- stop = i - 1
+-- else
+-- break
+-- end
+-- end
+-- --
+-- if start <= stop then
+-- return concat(list,"",start,stop)
+-- else
+-- return ""
+-- end
+-- end
+
-- function buffers.pickup(name,start,stop,finish,catcodes,doundent)
-- local data = tokens.pickup(start,stop)
-- if doundent or (autoundent and doundent == nil) then
@@ -505,21 +619,28 @@ end
-- commands.pickupbuffer = buffers.pickup
-scanners.pickupbuffer = function()
- local name = scanstring()
- local start = scanstring()
- local stop = scanstring()
- local finish = scanstring()
- local catcodes = scaninteger()
- local doundent = scanboolean()
- local data = tokens.pickup(start,stop)
- if doundent or (autoundent and doundent == nil) then
- data = undent(data)
- end
- buffers.assign(name,data,catcodes)
- -- context[finish]()
- context(finish)
-end
+tokens.pickup = pickup
+
+implement {
+ name = "pickupbuffer",
+ actions = function()
+ -- let's pickup all here (no arguments)
+ local name = scanstring()
+ local start = scanstring()
+ local stop = scanstring()
+ local finish = scanstring()
+ local catcodes = scaninteger()
+ local doundent = scanboolean()
+ -- could be a scanner:
+ local data = pickup(start,stop)
+ if doundent or (autoundent and doundent == nil) then
+ data = undent(data)
+ end
+ buffers.assign(name,data,catcodes)
+ -- context[finish]()
+ context(finish)
+ end
+}
local function savebuffer(list,name,prefix) -- name is optional
if not list or list == "" then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv
index 8e71c9865ad..a8a120d903c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ini.mkiv
@@ -116,7 +116,7 @@
{\endgroup % (1)
\endgroup % (2)
#5}%
- % todo: we need to skip the first lineending which is na active character
+ % todo: we need to skip the first lineending which is an active character
% but sometimes we have something different ... this is a side effect of
% checking for optional arguments i.e. the next token is already tokenized
% and for that reason we have the \relax as well as the \string
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi b/Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi
index 0ee66dd0141..a2d32c6be15 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-par.mkvi
@@ -65,8 +65,8 @@
\let\buff_parallel_define_saved\defineparallel
\let\buff_parallel_setup_saved \setupparallel
-\unexpanded\def\defineparallel{\dodoubleargument\buff_parallel_define}
-\unexpanded\def\setupparallel {\dotripleargument\buff_parallel_setup}
+\unexpanded\overloaded\def\defineparallel{\dodoubleargument\buff_parallel_define}
+\unexpanded\overloaded\def\setupparallel {\dotripleargument\buff_parallel_setup}
\def\buff_parallel_define[#name][#instances]%
{\buff_parallel_define_saved[#name][\c!list={#instances}]% list is internal
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua
index ad06dceeca3..ccb8ab0df8e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua
@@ -588,7 +588,7 @@ end
local function realign(lines,strip) -- "yes", <number>
local n
if strip == v_yes then
- n = math.huge
+ n = 0xFFFF
for i=1, #lines do
local spaces = find(lines[i],"%S") -- can be lpeg
if not spaces then
@@ -800,7 +800,7 @@ end
-- needed in e.g. tabulate (manuals)
local fences = S([[[{]])
-local symbols = S([[!#"$%&'*()+,-./:;<=>?@[]^_`{|}~]])
+local symbols = S([[!#"$%&'*()+,-./:;<=>?@[]^_`{|}~0123456789]]) -- digits added but maybe split it
local space = S([[ ]])
local backslash = S([[\]])
local nospace = space^1/""
@@ -808,7 +808,7 @@ local endstring = P(-1)
local compactors = {
[v_all] = Cs((backslash * (1-backslash-space)^1 * nospace * (endstring+fences) + 1)^0),
- [v_absolute] = Cs((backslash * (1-symbols -space)^1 * nospace * (symbols +backslash) + 1) ^0),
+ [v_absolute] = Cs((backslash * (1-symbols -space)^1 * nospace * (symbols+backslash) + 1)^0),
[v_last] = Cs((space^1 * endstring/"" + 1)^0),
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv
index 75ee992e41b..3cd2c91bc21 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkiv
@@ -24,7 +24,7 @@
\definesystemattribute[verbatimline][public]
\appendtoksonce
- \attribute\verbatimlineattribute\attributeunsetvalue
+ \c_attr_verbatimline\attributeunsetvalue
\to \everyforgetall
%D Initializations.
@@ -39,6 +39,7 @@
\the\everyresettypesetting
\resetfontfeature
\resetcharacterspacing
+ \resetbreakpoints
\to \everyinitializeverbatim
\unexpanded\def\setverbatimspaceskip % to be checked: must happen after font switch
@@ -178,9 +179,9 @@
\setuevalue{\e!start\currenttyping}{\buff_verbatim_typing_start{\currenttyping}}%
\setuevalue{\e!stop \currenttyping}{\buff_verbatim_typing_stop {\currenttyping}}%
\ifx\currenttypingparent\empty
- \normalexpanded{\definelinenumbering[\currenttyping]}%
+ \normalexpanded{\definelinenumbering[\currenttyping]}%
\else
- \normalexpanded{\definelinenumbering[\currenttyping][\currenttypingparent]}%
+ \normalexpanded{\definelinenumbering[\currenttyping][\currenttypingparent]}%
\fi
\to \everydefinetyping
@@ -286,10 +287,10 @@
\def\buff_verbatim_type_nop
{\buff_verbatim_left_of_type
- \futurelet\next\buff_verbatim_type_one}
+ \futurelet\nexttoken\buff_verbatim_type_one}
\def\buff_verbatim_type_one
- {\ifx\next\bgroup
+ {\ifx\nexttoken\bgroup
\expandafter\buff_verbatim_type_a
\else
\expandafter\buff_verbatim_type_two
@@ -298,10 +299,10 @@
\def\buff_verbatim_type_two
{\catcode`<=\othercatcode % old precaution
\catcode`>=\othercatcode % old precaution
- \futurelet\next\buff_verbatim_type_three}
+ \futurelet\nexttoken\buff_verbatim_type_three}
\def\buff_verbatim_type_three
- {\if\next<%
+ {\if\nexttoken<%
\expandafter\buff_verbatim_type_b
\else
\expandafter\buff_verbatim_type_c
@@ -386,7 +387,7 @@
\unexpanded\def\explicitcontrolspace {\optionalcontrolspace\allowbreak} % uses asciispace
\appendtoks
- \unexpanded\def\obeyedspace{\hskip\zeropoint\asciispacechar\hskip\zeropoint}%
+ \unexpanded\def\obeyedspace{\hskip\zeropoint\relax\asciispacechar\hskip\zeropoint\relax}%
\to \everyenableelements
\unexpanded\def\obeyhyphens
@@ -489,17 +490,6 @@
\buff_verbatim_setup_keep_together
\normalexpanded{\buff_verbatim_type_block{\e!start\currenttyping}{\e!stop\currenttyping}}}
-% \def\buff_verbatim_typing_start_yes[#1]%
-% {\typingparameter\c!before
-% \startpacked[\v!blank]%
-% \doifelseassignment{#1}
-% {\setupcurrenttyping[#1]}
-% {\doif\v!continue{#1}{\lettypingparameter\c!continue\v!yes}}%
-% \buff_verbatim_setup_line_numbering
-% \buff_verbatim_initialize_typing_one
-% \buff_verbatim_setup_keep_together
-% \normalexpanded{\buff_verbatim_type_block{\e!start\currenttyping}{\e!stop\currenttyping}}}
-
\def\buff_verbatim_typing_start_yes[#1]%
{\typingparameter\c!before
\startpacked[\v!blank]%
@@ -609,21 +599,6 @@
\setuevalue{\e!type\currenttyping\v!file}{\typefile[\currenttyping]}%
\to \everydefinetyping
-% \def\buff_verbatim_type_file[#1][#2]#3%
-% {\begingroup
-% \ifsecondargument
-% \setuptyping[#1][#2]%
-% \buff_verbatim_type_file_checked{#1}{#3}%
-% \else\iffirstargument
-% \doifelseassignment{#1}
-% {\setuptyping[\v!file][#1]%
-% \buff_verbatim_type_file_checked\v!file{#3}}
-% {\buff_verbatim_type_file_checked{#1}{#3}}%
-% \else
-% \buff_verbatim_type_file_checked\v!file{#3}%
-% \fi\fi
-% \endgroup}
-
\def\buff_verbatim_type_file[#1][#2]#3%
{\begingroup
\ifsecondargument
@@ -823,20 +798,6 @@
\setuevalue{\e!type\currenttyping\v!buffer}{\buff_verbatim_type_buffer_class{\currenttyping}}%
\to \everydefinetyping
-% \unexpanded\def\buff_verbatim_type_buffer[#1][#2]%
-% {\ifsecondargument
-% \setupcurrenttyping[#2]%
-% \processcommalist[#1]{\buff_verbatim_type_buffer_indeed\currenttyping}% [name] [settings]
-% \else\iffirstargument
-% \doifelseassignment{#1}
-% {\setupcurrenttyping[#1]%
-% \buff_verbatim_type_buffer_indeed\currenttyping\empty}% [settings]
-% {\processcommalist[#1]{\buff_verbatim_type_buffer_indeed\currenttyping}}% [name]
-% \else
-% \buff_verbatim_type_buffer_indeed\currenttyping\empty% []
-% \fi\fi
-% \endgroup}
-
\unexpanded\def\buff_verbatim_type_buffer[#1][#2]%
{\ifsecondargument
\setupcurrenttyping[#2]%
@@ -851,6 +812,7 @@
\else
\buff_verbatim_type_buffer_indeed\currenttyping\empty% []
\fi\fi
+ \useindentnextparameter\typingparameter
\endgroup
\dorechecknextindentation}
@@ -865,7 +827,9 @@
\setuptyping[#1][#3]%
\fi
\buff_verbatim_type_buffer_indeed{#1}{#2}%
- \endgroup}
+ \useindentnextparameter\typingparameter
+ \endgroup
+ \dorechecknextindentation}
\unexpanded\def\buff_verbatim_type_buffer_indeed#1#2% category name
{\edef\currenttyping{#1}%
@@ -891,8 +855,7 @@
\endofverbatimlines
\dostoptagged
\stoppacked
- \typingparameter\c!after
- \dorechecknextindentation}
+ \typingparameter\c!after}
\unexpanded\def\typeinlinebuffer
{\dontleavehmode
@@ -926,21 +889,6 @@
{\writestatus{nota bene}{\string\processbuffer\space is obsolete}%
\dodoubleempty\buff_verbatim_process}
-% \def\buff_verbatim_process[#1][#2]%
-% {\begingroup
-% \ifsecondargument
-% \setuptyping[\v!buffer][#2]%
-% \processcommalist[#1]{\buff_verbatim_process_indeed\v!buffer}% [name] [settings]
-% \else\iffirstargument
-% \doifelseassignment{#1}
-% {\setuptyping[\v!buffer][#1]%
-% \buff_verbatim_process_indeed\v!buffer\empty}% [settings]
-% {\processcommalist[#1]{\buff_verbatim_process_indeed\v!buffer}}% [name]
-% \else
-% \buff_verbatim_process_indeed\v!buffer\empty% []
-% \fi\fi
-% \endgroup}
-
\def\buff_verbatim_process[#1][#2]%
{\begingroup
\ifsecondargument
@@ -977,7 +925,7 @@
\unexpanded\def\buff_verbatim_begin_of_line
{\ifconditional\verbatimnumberinglines
\global\advance\nofverbatimlines\plusone
- \attribute\verbatimlineattribute\nofverbatimlines
+ \c_attr_verbatimline\nofverbatimlines
\fi
\noindent
\buff_verbatim_set_line_margin
@@ -991,7 +939,7 @@
\obeyedline % still needed?
\par
\ifconditional\verbatimnumberinglines
- \attribute\verbatimlineattribute\attributeunsetvalue
+ \c_attr_verbatimline\attributeunsetvalue
\fi}
\unexpanded\def\buff_verbatim_empty_line
@@ -1071,4 +1019,8 @@
\stopcontextdefinitioncode
+%D This is \type {\asciimode} without the double comment hackery:
+
+\unexpanded\def\literalmode{\setcatcodetable\txtcatcodes}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv
index bd1ffd38d7d..f53a14aca4a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-act.mkiv
@@ -23,7 +23,7 @@
\let\m_syst_catcodes_temp\empty
-\normalprotected\def\installactivecharacter#1 %
+\protected\def\installactivecharacter#1 %
{\edef\m_syst_catcodes_temp{\detokenize{#1}}%
\c_syst_catcodes_c\expandafter`\m_syst_catcodes_temp\relax % relax needed
\expandafter\startextendcatcodetable
@@ -41,7 +41,7 @@
\setnewconstant\c_syst_catcodes_hack\tildeasciicode % also defined in catc-ini.mkiv
-\normalprotected\def\defineactivecharacter #1#2 #3% uses \doifelsenumber which is not yet defined
+\protected\def\defineactivecharacter #1#2 #3% uses \doifelsenumber which is not yet defined
{\c_syst_catcodes_c\uccode\c_syst_catcodes_hack
\if#1"\uccode\c_syst_catcodes_hack\expandafter\doifelsenumber\expandafter{\string#1#2}\empty #1#2\else
\uccode\c_syst_catcodes_hack\expandafter\doifelsenumber\expandafter{\string#1#2}\empty`#1#2\fi
@@ -64,10 +64,10 @@
\def\syst_catcodes_handle_yes#1#2{#2}
\def\syst_catcodes_handle_nop#1#2{\noexpand#1}
-\normalprotected\def\makecharacteractive #1 %
+\protected\def\makecharacteractive #1 %
{\catcode`#1\activecatcode}
-\normalprotected\def\installanddefineactivecharacter #1 % #2%
+\protected\def\installanddefineactivecharacter #1 % #2%
{\normalexpanded{\noexpand\installactivecharacter \utfchar{#1} }%
\defineactivecharacter #1 }% {#2}}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv
index 5af8a50356f..c86201a780b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-ctx.mkiv
@@ -125,21 +125,22 @@
\catcodetable \ctxcatcodes
\let \defaultcatcodetable \ctxcatcodes
+% \defaultcatcodetable \ctxcatcodes % also an option
% for the moment here:
-\normalprotected\def\starttexcode
+\protected\def\starttexcode
{\pushcatcodetable
\catcodetable\prtcatcodes}
-\normalprotected\def\stoptexcode
+\protected\def\stoptexcode
{\popcatcodetable}
-\normalprotected\def\startcontextcode
+\protected\def\startcontextcode
{\pushcatcodetable
\catcodetable\ctxcatcodes}
-\normalprotected\def\stopcontextcode
+\protected\def\stopcontextcode
{\popcatcodetable}
% not visible, only for special cases
@@ -169,11 +170,11 @@
\catcode\barasciicode \activecatcode
\stopcatcodetable
-\normalprotected\def\startcontextdefinitioncode
+\protected\def\startcontextdefinitioncode
{\pushcatcodetable
\catcodetable\ctdcatcodes}
-\normalprotected\def\stopcontextdefinitioncode
+\protected\def\stopcontextdefinitioncode
{\popcatcodetable}
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv
index bf794f045dc..103d58194f6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-def.mkiv
@@ -139,8 +139,8 @@
%D From now on we can use the protection mechanisms.
-\normalprotected\def\unprotect{\pushcatcodetable\setcatcodetable\prtcatcodes}
-\normalprotected\def\protect {\popcatcodetable}
+\protected\def\unprotect{\pushcatcodetable\setcatcodetable\prtcatcodes}
+\protected\def\protect {\popcatcodetable}
% \prependtoks \catcodetable\ctxcatcodes \to \everyjob
diff --git a/Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua
index 9241f5a1b16..4da00436b88 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.lua
@@ -31,15 +31,11 @@ end
-- this only happens at runtime
-for k, v in next, numbers do
- tex[k] = v -- downward compatible
+for name, number in next, numbers do
+ tex[name] = number -- downward compatible
end
-- nasty
table.setmetatableindex(numbers,function(t,k) if type(k) == "number" then t[k] = k return k end end)
table.setmetatableindex(names, function(t,k) if type(k) == "string" then t[k] = k return k end end)
-
-commands.registercatcodetable = catcodes.register
---------.definecatcodetable = characters.define -- not yet defined
---------.setcharactercodes = characters.setcodes -- not yet defined
diff --git a/Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv
index 215ec14e16c..d0b2c3e16e2 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-ini.mkiv
@@ -23,12 +23,12 @@
%D \MKII\ file. There is some overlap in code with \MKII\ but we take that
%D for granted. Also, in \MKIV\ less active characters are used.
-% \normalprotected\def\setnewconstantfromchar#1%
+% \protected\def\setnewconstantfromchar#1%
% {\expandafter\ifdefined\expandafter#1\expandafter
% \let\expandafter#1\expandafter\undefined\expandafter\fi\expandafter
% \newcount\expandafter#1\expandafter#1\the#1\relax}
%
-% \normalprotected\def\setnewconstantfromchar#1%
+% \protected\def\setnewconstantfromchar#1%
% {\begingroup
% \scratchcounter#1%
% \edef\!!stringa{\meaning#1}%
@@ -41,7 +41,7 @@
% \fi
% #1\the\scratchcounter\relax}}
%
-% \normalprotected\def\setnewconstantfromchar#1%
+% \protected\def\setnewconstantfromchar#1%
% {\begingroup
% \edef\!!stringa{\meaning#1}%
% \expandafter\chardef\expandafter#1\the#1%
@@ -53,7 +53,7 @@
% \fi
% #1\the#1\relax}}
%
-% \normalprotected\def\setnewconstantfromchar#1%
+% \protected\def\setnewconstantfromchar#1%
% {\scratchcounter#1\let#1\undefined\newcount#1#1\scratchcounter}
\def\promote#1{\scratchcounter#1\let#1\undefined\newcount#1#1\scratchcounter}
@@ -134,13 +134,13 @@
% rather special and used in writing to file: \let\par\outputnewlinechar
-% \normalprotected\def\initializenewlinechar % operating system dependent
+% \protected\def\initializenewlinechar % operating system dependent
% {\begingroup
% \newlinechar\newlineasciicode
% \xdef\outputnewlinechar{^^J}%
% \endgroup}
-\normalprotected\def\initializenewlinechar % operating system dependent
+\protected\def\initializenewlinechar % operating system dependent
{\begingroup
\letcharcode\newlineasciicode\relax
\newlinechar\newlineasciicode
@@ -153,7 +153,7 @@
%
% \def\??catcodelet {1>>} % let : \let
% \def\??catcodedef {2>>} % def : \def
-% \def\??catcodeued {3>>} % ued : \unexpanded\def
+% \def\??catcodeued {3>>} % ued : \protected\def
% \def\??catcodeget {4>>} % \meaning
%
% \def\??catcodetablet{5>>}
@@ -161,7 +161,7 @@
\installsystemnamespace {catcodelet} % let : \let
\installsystemnamespace {catcodedef} % def : \def
-\installsystemnamespace {catcodeued} % ued : \unexpanded\def
+\installsystemnamespace {catcodeued} % ued : \protected\def
\installsystemnamespace {catcodeget} % \meaning
\installsystemnamespace {catcodetablet}
@@ -172,12 +172,12 @@
\newcount\c_syst_catcodes_b
\newcount\c_syst_catcodes_c
-\normalprotected\def\newcatcodetable#1% we could move the cctdefcounter to lua
+\protected\def\newcatcodetable#1% we could move the cctdefcounter to lua
{\global\advance\c_syst_catcodes_n\plusone
\expandafter\xdef\csname\??catcodetablen\number\c_syst_catcodes_n\endcsname{\string#1}% logging
\newconstant#1%
#1\c_syst_catcodes_n
- \ctxcommand{registercatcodetable("\expandafter\gobbleoneargument\string#1",\number#1)}}
+ \ctxlua{catcodes.register("\expandafter\gobbleoneargument\string#1",\number#1)}}
\newtoks \everysetdefaultcatcodes
@@ -188,7 +188,7 @@
\catcode\commentasciicode \othercatcode
\catcode\delasciicode \othercatcode}
-\normalprotected\def\startcatcodetable#1#2\stopcatcodetable
+\protected\def\startcatcodetable#1#2\stopcatcodetable
{\begingroup
\catcodetable\inicatcodes
\the\everysetdefaultcatcodes
@@ -198,7 +198,7 @@
\let\stopcatcodetable\relax
-\normalprotected\def\startextendcatcodetable#1#2\stopextendcatcodetable
+\protected\def\startextendcatcodetable#1#2\stopextendcatcodetable
{\begingroup
\catcodetable#1\relax
\globaldefs\plusone
@@ -208,14 +208,14 @@
\let\stopextendcatcodetable\relax
-\normalprotected\def\permitcircumflexescape % to be used grouped
+\protected\def\permitcircumflexescape % to be used grouped
{\catcode\circumflexasciicode\superscriptcatcode}
\let\permitcaretescape\permitcircumflexescape
% ==
%
-% \normalprotected\def\startextendcatcodetable#1#2\stopextendcatcodetable
+% \protected\def\startextendcatcodetable#1#2\stopextendcatcodetable
% {\bgroup
% \scratchcounter\the\catcodetable
% \catcodetable #1 #2
@@ -277,7 +277,7 @@
\def\syst_catcodes_ued_c % only first time
{\expandafter\gdef\csname\??catcodeued\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
\expandafter##\expandafter1\expandafter
- {\expandafter\normalprotected\expandafter\def\csname\??catcodeget\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname{##1}}%
+ {\expandafter\protected\expandafter\def\csname\??catcodeget\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname{##1}}%
\syst_catcodes_reinstate_unexpanded
\csname\??catcodeued\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
@@ -294,7 +294,7 @@
{\begingroup % and the selector has been lost
\uccode\c_syst_catcodes_hack\c_syst_catcodes_b
\catcode\uccode\c_syst_catcodes_hack\activecatcode
- \uppercase{\normalprotected\xdef~{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}}%
+ \uppercase{\protected\xdef~{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}}%
\endgroup}
%D This can be used when a direct definition has been done and the selector has been
@@ -310,7 +310,7 @@
%
% \def\syst_catcodes_reinstate_unexpanded
% {\begingroup
-% \normalprotected\edef\next{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}%
+% \protected\edef\next{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}%
% \global\letcharcode\c_syst_catcodes_b\next
% \endgroup}
@@ -337,12 +337,12 @@
\newcount\c_syst_catcodes_level
-\normalprotected\def\pushcatcodetable
+\protected\def\pushcatcodetable
{\advance\c_syst_catcodes_level\plusone
\syst_catcodes_trace_push
\expandafter\chardef\csname\??catcodetablet\number\c_syst_catcodes_level\endcsname\currentcatcodetable}
-\normalprotected\def\popcatcodetable
+\protected\def\popcatcodetable
{\ifcase\c_syst_catcodes_level
\syst_catcodes_trace_nesting_error
\else
@@ -351,19 +351,19 @@
\advance\c_syst_catcodes_level\minusone
\fi}
-\normalprotected\def\syst_catcodes_trace_nesting_error
+\protected\def\syst_catcodes_trace_nesting_error
{\immediate\write\statuswrite{}%
\immediate\write\statuswrite{Fatal error: catcode push/pop mismatch. Fix this! (restore level: \number\c_syst_catcodes_level)}\wait\end
\immediate\write\statuswrite{}}
-\normalprotected\def\restorecatcodes % takes previous level
+\protected\def\restorecatcodes % takes previous level
{\ifnum\c_syst_catcodes_level>\plusone
\expandafter\catcodetable\csname\??catcodetablet\number\numexpr\c_syst_catcodes_level-1\relax\endcsname
\fi}
% \newtoks\everycatcodetable
-\normalprotected\def\setcatcodetable#1%
+\protected\def\setcatcodetable#1%
{\catcodetable#1%
% \the\everycatcodetable
\syst_catcodes_trace_set}
@@ -374,7 +374,7 @@
%D \tracecatcodetables
%D \stoptyping
-\normalprotected\def\tracecatcodetables
+\protected\def\tracecatcodetables
{\def\syst_catcodes_trace_set {\syst_catcodes_trace{set \catcodetablename\space at \number\c_syst_catcodes_level}}%
\def\syst_catcodes_trace_push{\syst_catcodes_trace{push \catcodetablename\space from \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}%
\def\syst_catcodes_trace_pop {\syst_catcodes_trace{pop \catcodetablename\space to \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv b/Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv
index 5cda010fe38..abe9191d990 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/catc-sym.mkiv
@@ -79,13 +79,13 @@
%D them for convenience and compatibility. Some old engine code
%D has been removed.
-\normalprotected\def\uncatcodespecials {\setcatcodetable\nilcatcodes \uncatcodespacetokens}
-\normalprotected\def\setnaturalcatcodes {\setcatcodetable\nilcatcodes}
-\normalprotected\def\setnormalcatcodes {\setcatcodetable\ctxcatcodes} % maybe \texcatcodes
-\normalprotected\def\uncatcodecharacters {\setcatcodetable\nilcatcodes} % was fast version, gone now
-\normalprotected\def\uncatcodeallcharacters{\setcatcodetable\nilcatcodes} % was slow one, with restore
+\protected\def\uncatcodespecials {\setcatcodetable\nilcatcodes \uncatcodespacetokens}
+\protected\def\setnaturalcatcodes {\setcatcodetable\nilcatcodes}
+\protected\def\setnormalcatcodes {\setcatcodetable\ctxcatcodes} % maybe \texcatcodes
+\protected\def\uncatcodecharacters {\setcatcodetable\nilcatcodes} % was fast version, gone now
+\protected\def\uncatcodeallcharacters{\setcatcodetable\nilcatcodes} % was slow one, with restore
-\normalprotected\def\uncatcodespacetokens
+\protected\def\uncatcodespacetokens
{\catcode\spaceasciicode \spacecatcode
\catcode\tabasciicode \spacecatcode
\catcode\formfeedasciicode \endoflinecatcode
@@ -101,10 +101,10 @@
\newtoks\everyverbosechacters
-\normalprotected\def\setverbosecscharacter#1%
+\protected\def\setverbosecscharacter#1%
{\edef#1{\string#1}}
-\normalprotected\def\setverbosecscharacters
+\protected\def\setverbosecscharacters
{\the\everyverbosechacters}
\bgroup
diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-def.lua b/Master/texmf-dist/tex/context/base/mkiv/char-def.lua
index 953d33f4a0e..7a04e869d19 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/char-def.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-def.lua
@@ -429,7 +429,6 @@ characters.data={
direction="on",
linebreak="al",
mathclass="binary",
- mathname="ast",
mathsymbol=0x2217,
synonyms={ "star" },
unicodeslot=0x2A,
@@ -1676,6 +1675,7 @@ characters.data={
description="NO-BREAK SPACE",
direction="cs",
linebreak="gl",
+ mongolian="nj",
specials={ "nobreak", 0x20 },
synonyms={ "nbsp", "non-breaking space" },
unicodeslot=0xA0,
@@ -2351,6 +2351,7 @@ characters.data={
lccode=0xF8,
linebreak="al",
shcode=0x4F,
+ specials={ "with", 0x4F, 0x2F },
synonyms={ "latin capital letter o slash" },
unicodeslot=0xD8,
},
@@ -2748,6 +2749,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6F,
+ specials={ "with", 0x6F, 0x2F },
synonyms={ "latin small letter o slash" },
uccode=0xD8,
unicodeslot=0xF8,
@@ -3040,6 +3042,7 @@ characters.data={
lccode=0x111,
linebreak="al",
shcode=0x44,
+ specials={ "with", 0x44, 0x2F },
unicodeslot=0x110,
},
{
@@ -3051,6 +3054,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x64,
+ specials={ "with", 0x64, 0x2F },
uccode=0x110,
unicodeslot=0x111,
},
@@ -3306,6 +3310,7 @@ characters.data={
lccode=0x127,
linebreak="al",
shcode=0x48,
+ specials={ "with", 0x48, 0x2F },
unicodeslot=0x126,
},
{
@@ -3317,6 +3322,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x68,
+ specials={ "with", 0x68, 0x2F },
uccode=0x126,
unicodeslot=0x127,
},
@@ -3633,6 +3639,7 @@ characters.data={
lccode=0x142,
linebreak="al",
shcode=0x4C,
+ specials={ "with", 0x4C, 0x2F },
unicodeslot=0x141,
},
{
@@ -3644,6 +3651,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6C,
+ specials={ "with", 0x6C, 0x2F },
uccode=0x141,
unicodeslot=0x142,
},
@@ -4078,6 +4086,7 @@ characters.data={
lccode=0x167,
linebreak="al",
shcode=0x54,
+ specials={ "with", 0x54, 0x2F },
unicodeslot=0x166,
},
{
@@ -4089,6 +4098,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x74,
+ specials={ "with", 0x74, 0x2F },
uccode=0x166,
unicodeslot=0x167,
},
@@ -4388,6 +4398,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x62,
+ specials={ "with", 0x62, 0x2F },
uccode=0x243,
unicodeslot=0x180,
},
@@ -4400,6 +4411,7 @@ characters.data={
lccode=0x253,
linebreak="al",
shcode=0x42,
+ specials={ "with", 0x42, 0x1FA9D },
unicodeslot=0x181,
},
{
@@ -4458,6 +4470,7 @@ characters.data={
lccode=0x188,
linebreak="al",
shcode=0x43,
+ specials={ "with", 0x43, 0x1FA9D },
unicodeslot=0x187,
},
{
@@ -4468,6 +4481,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x63,
+ specials={ "with", 0x63, 0x1FA9D },
uccode=0x187,
unicodeslot=0x188,
},
@@ -4490,6 +4504,7 @@ characters.data={
lccode=0x257,
linebreak="al",
shcode=0x44,
+ specials={ "with", 0x44, 0x1FA9D },
unicodeslot=0x18A,
},
{
@@ -4559,6 +4574,7 @@ characters.data={
lccode=0x192,
linebreak="al",
shcode=0x46,
+ specials={ "with", 0x46, 0x1FA9D },
unicodeslot=0x191,
},
{
@@ -4569,6 +4585,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x66,
+ specials={ "with", 0x66, 0x1FA9D },
synonyms={ "florin currency symbol", "folder", "function symbol", "latin small letter script f" },
uccode=0x191,
unicodeslot=0x192,
@@ -4582,6 +4599,7 @@ characters.data={
lccode=0x260,
linebreak="al",
shcode=0x47,
+ specials={ "with", 0x47, 0x1FA9D },
unicodeslot=0x193,
},
{
@@ -4620,6 +4638,7 @@ characters.data={
lccode=0x268,
linebreak="al",
shcode=0x49,
+ specials={ "with", 0x49, 0x2F },
synonyms={ "latin capital letter i bar" },
unicodeslot=0x197,
},
@@ -4632,6 +4651,7 @@ characters.data={
lccode=0x199,
linebreak="al",
shcode=0x4B,
+ specials={ "with", 0x4B, 0x1FA9D },
unicodeslot=0x198,
},
{
@@ -4642,6 +4662,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6B,
+ specials={ "with", 0x6B, 0x1FA9D },
uccode=0x198,
unicodeslot=0x199,
},
@@ -4758,6 +4779,7 @@ characters.data={
lccode=0x1A5,
linebreak="al",
shcode=0x50,
+ specials={ "with", 0x50, 0x1FA9D },
unicodeslot=0x1A4,
},
{
@@ -4768,6 +4790,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x70,
+ specials={ "with", 0x70, 0x1FA9D },
uccode=0x1A4,
unicodeslot=0x1A5,
},
@@ -4833,6 +4856,7 @@ characters.data={
lccode=0x1AD,
linebreak="al",
shcode=0x54,
+ specials={ "with", 0x54, 0x1FA9D },
unicodeslot=0x1AC,
},
{
@@ -4843,6 +4867,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x74,
+ specials={ "with", 0x74, 0x1FA9D },
uccode=0x1AC,
unicodeslot=0x1AD,
},
@@ -4892,12 +4917,13 @@ characters.data={
{
adobename="Vhook",
category="lu",
- contextname="Uhook",
+ contextname="Vhook",
description="LATIN CAPITAL LETTER V WITH HOOK",
direction="l",
lccode=0x28B,
linebreak="al",
shcode=0x56,
+ specials={ "with", 0x56, 0x1FA9D },
synonyms={ "latin capital letter script v" },
unicodeslot=0x1B2,
},
@@ -4910,6 +4936,7 @@ characters.data={
lccode=0x1B4,
linebreak="al",
shcode=0x59,
+ specials={ "with", 0x59, 0x1FA9D },
unicodeslot=0x1B3,
},
{
@@ -4920,6 +4947,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x79,
+ specials={ "with", 0x79, 0x1FA9D },
uccode=0x1B3,
unicodeslot=0x1B4,
},
@@ -4932,6 +4960,7 @@ characters.data={
lccode=0x1B6,
linebreak="al",
shcode=0x5A,
+ specials={ "with", 0x5A, 0x2F },
unicodeslot=0x1B5,
},
{
@@ -4942,6 +4971,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x7A,
+ specials={ "with", 0x7A, 0x2F },
synonyms={ "latin small letter z bar" },
uccode=0x1B5,
unicodeslot=0x1B6,
@@ -5014,6 +5044,7 @@ characters.data={
description="LATIN LETTER INVERTED GLOTTAL STOP WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x296, 0x2F },
unicodeslot=0x1BE,
},
{
@@ -5465,6 +5496,7 @@ characters.data={
lccode=0x1E5,
linebreak="al",
shcode=0x47,
+ specials={ "with", 0x47, 0x2F },
unicodeslot=0x1E4,
},
{
@@ -5475,6 +5507,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x67,
+ specials={ "with", 0x67, 0x2F },
uccode=0x1E4,
unicodeslot=0x1E5,
},
@@ -6191,6 +6224,7 @@ characters.data={
lccode=0x225,
linebreak="al",
shcode=0x5A,
+ specials={ "with", 0x5A, 0x1FA9D },
unicodeslot=0x224,
},
{
@@ -6200,6 +6234,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x7A,
+ specials={ "with", 0x7A, 0x1FA9D },
uccode=0x224,
unicodeslot=0x225,
},
@@ -6414,6 +6449,7 @@ characters.data={
lccode=0x2C65,
linebreak="al",
shcode=0x41,
+ specials={ "with", 0x41, 0x2F },
unicodeslot=0x23A,
},
{
@@ -6424,6 +6460,7 @@ characters.data={
lccode=0x23C,
linebreak="al",
shcode=0x43,
+ specials={ "with", 0x43, 0x2F },
unicodeslot=0x23B,
},
{
@@ -6433,6 +6470,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x63,
+ specials={ "with", 0x63, 0x2F },
uccode=0x23B,
unicodeslot=0x23C,
},
@@ -6494,6 +6532,7 @@ characters.data={
lccode=0x180,
linebreak="al",
shcode=0x42,
+ specials={ "with", 0x42, 0x2F },
unicodeslot=0x243,
},
{
@@ -6519,6 +6558,7 @@ characters.data={
lccode=0x247,
linebreak="al",
shcode=0x45,
+ specials={ "with", 0x45, 0x2F },
unicodeslot=0x246,
},
{
@@ -6527,6 +6567,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x65,
+ specials={ "with", 0x65, 0x2F },
uccode=0x246,
unicodeslot=0x247,
},
@@ -6537,6 +6578,7 @@ characters.data={
lccode=0x249,
linebreak="al",
shcode=0x4A,
+ specials={ "with", 0x4A, 0x2F },
unicodeslot=0x248,
},
{
@@ -6545,6 +6587,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6A,
+ specials={ "with", 0x6A, 0x2F },
uccode=0x248,
unicodeslot=0x249,
},
@@ -6572,6 +6615,7 @@ characters.data={
lccode=0x24D,
linebreak="al",
shcode=0x52,
+ specials={ "with", 0x52, 0x2F },
unicodeslot=0x24C,
},
{
@@ -6580,6 +6624,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x72,
+ specials={ "with", 0x72, 0x2F },
uccode=0x24C,
unicodeslot=0x24D,
},
@@ -6590,6 +6635,7 @@ characters.data={
lccode=0x24F,
linebreak="al",
shcode=0x59,
+ specials={ "with", 0x59, 0x2F },
unicodeslot=0x24E,
},
{
@@ -6598,6 +6644,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x79,
+ specials={ "with", 0x79, 0x2F },
uccode=0x24E,
unicodeslot=0x24F,
},
@@ -6635,6 +6682,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x62,
+ specials={ "with", 0x62, 0x1FA9D },
uccode=0x181,
unicodeslot=0x253,
},
@@ -6677,6 +6725,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x64,
+ specials={ "with", 0x64, 0x1FA9D },
uccode=0x18A,
unicodeslot=0x257,
},
@@ -6706,6 +6755,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x259,
+ specials={ "with", 0x259, 0x1FA9D },
unicodeslot=0x25A,
},
{
@@ -6732,6 +6782,7 @@ characters.data={
description="LATIN SMALL LETTER REVERSED OPEN E WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x25C, 0x1FA9D },
unicodeslot=0x25D,
},
{
@@ -6750,6 +6801,7 @@ characters.data={
description="LATIN SMALL LETTER DOTLESS J WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x237, 0x2F },
unicodeslot=0x25F,
},
{
@@ -6759,6 +6811,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x67,
+ specials={ "with", 0x67, 0x1FA9D },
uccode=0x193,
unicodeslot=0x260,
},
@@ -6811,6 +6864,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x68,
+ specials={ "with", 0x68, 0x1FA9D },
unicodeslot=0x266,
},
{
@@ -6819,6 +6873,7 @@ characters.data={
description="LATIN SMALL LETTER HENG WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0xA727, 0x1FA9D },
unicodeslot=0x267,
},
{
@@ -6828,6 +6883,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x69,
+ specials={ "with", 0x69, 0x2F },
uccode=0x197,
unicodeslot=0x268,
},
@@ -6907,6 +6963,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6D,
+ specials={ "with", 0x6D, 0x1FA9D },
unicodeslot=0x271,
},
{
@@ -6990,6 +7047,7 @@ characters.data={
description="LATIN SMALL LETTER TURNED R WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x279, 0x1FA9D },
unicodeslot=0x27B,
},
{
@@ -7051,6 +7109,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x73,
+ specials={ "with", 0x73, 0x1FA9D },
unicodeslot=0x282,
},
{
@@ -7130,6 +7189,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x76,
+ specials={ "with", 0x76, 0x1FA9D },
synonyms={ "latin small letter script v" },
uccode=0x1B2,
unicodeslot=0x28B,
@@ -7268,6 +7328,7 @@ characters.data={
description="LATIN LETTER SMALL CAPITAL G WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x262, 0x1FA9D },
unicodeslot=0x29B,
},
{
@@ -7308,6 +7369,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x71,
+ specials={ "with", 0x71, 0x1FA9D },
unicodeslot=0x2A0,
},
{
@@ -7316,6 +7378,7 @@ characters.data={
description="LATIN LETTER GLOTTAL STOP WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x294, 0x2F },
unicodeslot=0x2A1,
},
{
@@ -10545,7 +10608,6 @@ characters.data={
direction="l",
linebreak="al",
mathclass="ordinary",
- mathname="varkappa",
specials={ "compat", 0x3BA },
uccode=0x39A,
unicodeslot=0x3F0,
@@ -12231,6 +12293,7 @@ characters.data={
lccode=0x493,
linebreak="al",
shcode=0x413,
+ specials={ "with", 0x413, 0x2F },
unicodeslot=0x492,
},
[0x493]={
@@ -12241,6 +12304,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x433,
+ specials={ "with", 0x433, 0x2F },
uccode=0x492,
unicodeslot=0x493,
},
@@ -12363,6 +12427,7 @@ characters.data={
lccode=0x49F,
linebreak="al",
shcode=0x41A,
+ specials={ "with", 0x41A, 0x2F },
unicodeslot=0x49E,
},
[0x49F]={
@@ -12373,6 +12438,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43A,
+ specials={ "with", 0x43A, 0x2F },
uccode=0x49E,
unicodeslot=0x49F,
},
@@ -12552,6 +12618,7 @@ characters.data={
direction="l",
lccode=0x4B1,
linebreak="al",
+ specials={ "with", 0x4AE, 0x2F },
unicodeslot=0x4B0,
},
[0x4B1]={
@@ -12561,6 +12628,7 @@ characters.data={
description="CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x4AF, 0x2F },
uccode=0x4B0,
unicodeslot=0x4B1,
},
@@ -12753,6 +12821,7 @@ characters.data={
lccode=0x4C4,
linebreak="al",
shcode=0x41A,
+ specials={ "with", 0x41A, 0x1FA9D },
unicodeslot=0x4C3,
},
[0x4C4]={
@@ -12763,6 +12832,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43A,
+ specials={ "with", 0x43A, 0x1FA9D },
uccode=0x4C3,
unicodeslot=0x4C4,
},
@@ -12795,6 +12865,7 @@ characters.data={
lccode=0x4C8,
linebreak="al",
shcode=0x41D,
+ specials={ "with", 0x41D, 0x1FA9D },
unicodeslot=0x4C7,
},
[0x4C8]={
@@ -12805,6 +12876,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43D,
+ specials={ "with", 0x43D, 0x1FA9D },
uccode=0x4C7,
unicodeslot=0x4C8,
},
@@ -13379,6 +13451,7 @@ characters.data={
lccode=0x4FD,
linebreak="al",
shcode=0x425,
+ specials={ "with", 0x425, 0x1FA9D },
unicodeslot=0x4FC,
},
[0x4FD]={
@@ -13387,6 +13460,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x445,
+ specials={ "with", 0x445, 0x1FA9D },
uccode=0x4FC,
unicodeslot=0x4FD,
},
@@ -13397,6 +13471,7 @@ characters.data={
lccode=0x4FF,
linebreak="al",
shcode=0x425,
+ specials={ "with", 0x425, 0x2F },
unicodeslot=0x4FE,
},
[0x4FF]={
@@ -13405,6 +13480,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x445,
+ specials={ "with", 0x445, 0x2F },
uccode=0x4FE,
unicodeslot=0x4FF,
},
@@ -13559,6 +13635,7 @@ characters.data={
lccode=0x513,
linebreak="al",
shcode=0x41B,
+ specials={ "with", 0x41B, 0x1FA9D },
unicodeslot=0x512,
},
[0x513]={
@@ -13567,6 +13644,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43B,
+ specials={ "with", 0x43B, 0x1FA9D },
uccode=0x512,
unicodeslot=0x513,
},
@@ -20037,7 +20115,7 @@ characters.data={
unicodeslot=0x855,
},
[0x856]={
- arabic="u",
+ arabic="r",
category="lo",
description="MANDAIC LETTER DUSHENNA",
direction="r",
@@ -20045,7 +20123,7 @@ characters.data={
unicodeslot=0x856,
},
[0x857]={
- arabic="u",
+ arabic="r",
category="lo",
description="MANDAIC LETTER KAD",
direction="r",
@@ -20053,7 +20131,7 @@ characters.data={
unicodeslot=0x857,
},
[0x858]={
- arabic="u",
+ arabic="r",
category="lo",
description="MANDAIC LETTER AIN",
direction="r",
@@ -20411,6 +20489,86 @@ characters.data={
linebreak="al",
unicodeslot=0x8BD,
},
+ [0x8BE]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER PEH WITH SMALL V",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8BE,
+ },
+ [0x8BF]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER TEH WITH SMALL V",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8BF,
+ },
+ [0x8C0]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER TTEH WITH SMALL V",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C0,
+ },
+ [0x8C1]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER TCHEH WITH SMALL V",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C1,
+ },
+ [0x8C2]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER KEHEH WITH SMALL V",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C2,
+ },
+ [0x8C3]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER GHAIN WITH THREE DOTS ABOVE",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C3,
+ },
+ [0x8C4]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER AFRICAN QAF WITH THREE DOTS ABOVE",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C4,
+ },
+ [0x8C5]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER JEEM WITH THREE DOTS ABOVE",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C5,
+ },
+ [0x8C6]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER JEEM WITH THREE DOTS BELOW",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C6,
+ },
+ [0x8C7]={
+ arabic="d",
+ category="lo",
+ description="ARABIC LETTER LAM WITH SMALL ARABIC LETTER TAH ABOVE",
+ direction="al",
+ linebreak="al",
+ unicodeslot=0x8C7,
+ },
[0x8D3]={
category="mn",
combining=0xDC,
@@ -25018,6 +25176,14 @@ characters.data={
linebreak="cm",
unicodeslot=0xB4D,
},
+ [0xB55]={
+ category="mn",
+ comment="todo: indic check",
+ description="ORIYA SIGN OVERLINE",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0xB55,
+ },
[0xB56]={
category="mn",
description="ORIYA AI LENGTH MARK",
@@ -27458,6 +27624,14 @@ characters.data={
linebreak="cm",
unicodeslot=0xD03,
},
+ [0xD04]={
+ category="lo",
+ comment="todo: indic check",
+ description="MALAYALAM LETTER VEDIC ANUSVARA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xD04,
+ },
[0xD05]={
category="lo",
description="MALAYALAM LETTER A",
@@ -28399,6 +28573,13 @@ characters.data={
linebreak="al",
unicodeslot=0xD7F,
},
+ [0xD81]={
+ category="mn",
+ description="SINHALA SIGN CANDRABINDU",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0xD81,
+ },
[0xD82]={
category="mc",
description="SINHALA SIGN ANUSVARAYA",
@@ -45799,6 +45980,7 @@ characters.data={
description="MONGOLIAN BIRGA",
direction="on",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1800,
},
[0x1801]={
@@ -45806,6 +45988,7 @@ characters.data={
description="MONGOLIAN ELLIPSIS",
direction="on",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1801,
},
[0x1802]={
@@ -45813,6 +45996,7 @@ characters.data={
description="MONGOLIAN COMMA",
direction="on",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1802,
},
[0x1803]={
@@ -45820,6 +46004,7 @@ characters.data={
description="MONGOLIAN FULL STOP",
direction="on",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1803,
},
[0x1804]={
@@ -45827,6 +46012,7 @@ characters.data={
description="MONGOLIAN COLON",
direction="on",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x1804,
},
[0x1805]={
@@ -45834,6 +46020,7 @@ characters.data={
description="MONGOLIAN FOUR DOTS",
direction="on",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x1805,
},
[0x1806]={
@@ -45842,6 +46029,7 @@ characters.data={
description="MONGOLIAN TODO SOFT HYPHEN",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1806,
},
[0x1807]={
@@ -45850,6 +46038,7 @@ characters.data={
description="MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER",
direction="on",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1807,
},
[0x1808]={
@@ -45857,6 +46046,7 @@ characters.data={
description="MONGOLIAN MANCHU COMMA",
direction="on",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1808,
},
[0x1809]={
@@ -45864,6 +46054,7 @@ characters.data={
description="MONGOLIAN MANCHU FULL STOP",
direction="on",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1809,
},
[0x180A]={
@@ -45872,6 +46063,7 @@ characters.data={
description="MONGOLIAN NIRUGU",
direction="on",
linebreak="al",
+ mongolian="jc",
unicodeslot=0x180A,
},
[0x180B]={
@@ -45879,6 +46071,7 @@ characters.data={
description="MONGOLIAN FREE VARIATION SELECTOR ONE",
direction="nsm",
linebreak="cm",
+ mongolian="t",
synonyms={ "fvs1" },
unicodeslot=0x180B,
},
@@ -45887,6 +46080,7 @@ characters.data={
description="MONGOLIAN FREE VARIATION SELECTOR TWO",
direction="nsm",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x180C,
},
[0x180D]={
@@ -45894,6 +46088,7 @@ characters.data={
description="MONGOLIAN FREE VARIATION SELECTOR THREE",
direction="nsm",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x180D,
},
[0x180E]={
@@ -45902,6 +46097,7 @@ characters.data={
description="MONGOLIAN VOWEL SEPARATOR",
direction="bn",
linebreak="gl",
+ mongolian="nj",
unicodeslot=0x180E,
},
[0x1810]={
@@ -45909,6 +46105,7 @@ characters.data={
description="MONGOLIAN DIGIT ZERO",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1810,
},
[0x1811]={
@@ -45916,6 +46113,7 @@ characters.data={
description="MONGOLIAN DIGIT ONE",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1811,
},
[0x1812]={
@@ -45923,6 +46121,7 @@ characters.data={
description="MONGOLIAN DIGIT TWO",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1812,
},
[0x1813]={
@@ -45930,6 +46129,7 @@ characters.data={
description="MONGOLIAN DIGIT THREE",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1813,
},
[0x1814]={
@@ -45937,6 +46137,7 @@ characters.data={
description="MONGOLIAN DIGIT FOUR",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1814,
},
[0x1815]={
@@ -45944,6 +46145,7 @@ characters.data={
description="MONGOLIAN DIGIT FIVE",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1815,
},
[0x1816]={
@@ -45951,6 +46153,7 @@ characters.data={
description="MONGOLIAN DIGIT SIX",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1816,
},
[0x1817]={
@@ -45958,6 +46161,7 @@ characters.data={
description="MONGOLIAN DIGIT SEVEN",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1817,
},
[0x1818]={
@@ -45965,6 +46169,7 @@ characters.data={
description="MONGOLIAN DIGIT EIGHT",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1818,
},
[0x1819]={
@@ -45972,6 +46177,7 @@ characters.data={
description="MONGOLIAN DIGIT NINE",
direction="l",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1819,
},
[0x1820]={
@@ -45980,6 +46186,7 @@ characters.data={
description="MONGOLIAN LETTER A",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1820,
variants={
[0x180B]="second form",
@@ -45992,6 +46199,7 @@ characters.data={
description="MONGOLIAN LETTER E",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1821,
variants={
[0x180B]="second form",
@@ -46003,6 +46211,7 @@ characters.data={
description="MONGOLIAN LETTER I",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1822,
variants={
[0x180B]="second form",
@@ -46014,6 +46223,7 @@ characters.data={
description="MONGOLIAN LETTER O",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1823,
variants={
[0x180B]="second form",
@@ -46025,6 +46235,7 @@ characters.data={
description="MONGOLIAN LETTER U",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1824,
variants={
[0x180B]="second form",
@@ -46036,6 +46247,7 @@ characters.data={
description="MONGOLIAN LETTER OE",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1825,
variants={
[0x180B]="second form",
@@ -46048,6 +46260,7 @@ characters.data={
description="MONGOLIAN LETTER UE",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1826,
variants={
[0x180B]="second form",
@@ -46060,6 +46273,7 @@ characters.data={
description="MONGOLIAN LETTER EE",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1827,
},
[0x1828]={
@@ -46068,6 +46282,7 @@ characters.data={
description="MONGOLIAN LETTER NA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1828,
variants={
[0x180B]="second form",
@@ -46081,6 +46296,7 @@ characters.data={
description="MONGOLIAN LETTER ANG",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1829,
},
[0x182A]={
@@ -46089,6 +46305,7 @@ characters.data={
description="MONGOLIAN LETTER BA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182A,
variants={
[0x180B]="alternative form",
@@ -46100,6 +46317,7 @@ characters.data={
description="MONGOLIAN LETTER PA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182B,
},
[0x182C]={
@@ -46108,6 +46326,7 @@ characters.data={
description="MONGOLIAN LETTER QA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182C,
variants={
[0x180B]="second form",
@@ -46121,6 +46340,7 @@ characters.data={
description="MONGOLIAN LETTER GA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182D,
variants={
[0x180B]="second form",
@@ -46134,6 +46354,7 @@ characters.data={
description="MONGOLIAN LETTER MA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182E,
},
[0x182F]={
@@ -46142,6 +46363,7 @@ characters.data={
description="MONGOLIAN LETTER LA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182F,
},
[0x1830]={
@@ -46150,6 +46372,7 @@ characters.data={
description="MONGOLIAN LETTER SA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1830,
variants={
[0x180B]="second form",
@@ -46162,6 +46385,7 @@ characters.data={
description="MONGOLIAN LETTER SHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1831,
},
[0x1832]={
@@ -46170,6 +46394,7 @@ characters.data={
description="MONGOLIAN LETTER TA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1832,
variants={
[0x180B]="second form",
@@ -46181,6 +46406,7 @@ characters.data={
description="MONGOLIAN LETTER DA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1833,
variants={
[0x180B]="second form",
@@ -46192,6 +46418,7 @@ characters.data={
description="MONGOLIAN LETTER CHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1834,
},
[0x1835]={
@@ -46200,6 +46427,7 @@ characters.data={
description="MONGOLIAN LETTER JA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1835,
variants={
[0x180B]="second form",
@@ -46211,6 +46439,7 @@ characters.data={
description="MONGOLIAN LETTER YA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1836,
variants={
[0x180B]="second form",
@@ -46223,6 +46452,7 @@ characters.data={
description="MONGOLIAN LETTER RA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1837,
},
[0x1838]={
@@ -46231,6 +46461,7 @@ characters.data={
description="MONGOLIAN LETTER WA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1838,
variants={
[0x180B]="second form",
@@ -46242,6 +46473,7 @@ characters.data={
description="MONGOLIAN LETTER FA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1839,
},
[0x183A]={
@@ -46250,6 +46482,7 @@ characters.data={
description="MONGOLIAN LETTER KA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183A,
},
[0x183B]={
@@ -46258,6 +46491,7 @@ characters.data={
description="MONGOLIAN LETTER KHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183B,
},
[0x183C]={
@@ -46266,6 +46500,7 @@ characters.data={
description="MONGOLIAN LETTER TSA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183C,
},
[0x183D]={
@@ -46274,6 +46509,7 @@ characters.data={
description="MONGOLIAN LETTER ZA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183D,
},
[0x183E]={
@@ -46282,6 +46518,7 @@ characters.data={
description="MONGOLIAN LETTER HAA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183E,
},
[0x183F]={
@@ -46290,6 +46527,7 @@ characters.data={
description="MONGOLIAN LETTER ZRA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183F,
},
[0x1840]={
@@ -46298,6 +46536,7 @@ characters.data={
description="MONGOLIAN LETTER LHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1840,
},
[0x1841]={
@@ -46306,6 +46545,7 @@ characters.data={
description="MONGOLIAN LETTER ZHI",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1841,
},
[0x1842]={
@@ -46314,6 +46554,7 @@ characters.data={
description="MONGOLIAN LETTER CHI",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1842,
},
[0x1843]={
@@ -46322,6 +46563,7 @@ characters.data={
description="MONGOLIAN LETTER TODO LONG VOWEL SIGN",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1843,
},
[0x1844]={
@@ -46330,6 +46572,7 @@ characters.data={
description="MONGOLIAN LETTER TODO E",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1844,
variants={
[0x180B]="second form",
@@ -46341,6 +46584,7 @@ characters.data={
description="MONGOLIAN LETTER TODO I",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1845,
variants={
[0x180B]="second form",
@@ -46352,6 +46596,7 @@ characters.data={
description="MONGOLIAN LETTER TODO O",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1846,
variants={
[0x180B]="second form",
@@ -46363,6 +46608,7 @@ characters.data={
description="MONGOLIAN LETTER TODO U",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1847,
variants={
[0x180B]="second form",
@@ -46375,6 +46621,7 @@ characters.data={
description="MONGOLIAN LETTER TODO OE",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1848,
variants={
[0x180B]="second form",
@@ -46386,6 +46633,7 @@ characters.data={
description="MONGOLIAN LETTER TODO UE",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1849,
variants={
[0x180B]="second form",
@@ -46397,6 +46645,7 @@ characters.data={
description="MONGOLIAN LETTER TODO ANG",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184A,
},
[0x184B]={
@@ -46405,6 +46654,7 @@ characters.data={
description="MONGOLIAN LETTER TODO BA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184B,
},
[0x184C]={
@@ -46413,6 +46663,7 @@ characters.data={
description="MONGOLIAN LETTER TODO PA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184C,
},
[0x184D]={
@@ -46421,6 +46672,7 @@ characters.data={
description="MONGOLIAN LETTER TODO QA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184D,
variants={
[0x180B]="feminine form",
@@ -46432,6 +46684,7 @@ characters.data={
description="MONGOLIAN LETTER TODO GA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184E,
variants={
[0x180B]="second form",
@@ -46443,6 +46696,7 @@ characters.data={
description="MONGOLIAN LETTER TODO MA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184F,
},
[0x1850]={
@@ -46451,6 +46705,7 @@ characters.data={
description="MONGOLIAN LETTER TODO TA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1850,
},
[0x1851]={
@@ -46459,6 +46714,7 @@ characters.data={
description="MONGOLIAN LETTER TODO DA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1851,
},
[0x1852]={
@@ -46467,6 +46723,7 @@ characters.data={
description="MONGOLIAN LETTER TODO CHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1852,
},
[0x1853]={
@@ -46475,6 +46732,7 @@ characters.data={
description="MONGOLIAN LETTER TODO JA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1853,
},
[0x1854]={
@@ -46483,6 +46741,7 @@ characters.data={
description="MONGOLIAN LETTER TODO TSA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1854,
},
[0x1855]={
@@ -46491,6 +46750,7 @@ characters.data={
description="MONGOLIAN LETTER TODO YA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1855,
},
[0x1856]={
@@ -46499,6 +46759,7 @@ characters.data={
description="MONGOLIAN LETTER TODO WA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1856,
},
[0x1857]={
@@ -46507,6 +46768,7 @@ characters.data={
description="MONGOLIAN LETTER TODO KA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1857,
},
[0x1858]={
@@ -46515,6 +46777,7 @@ characters.data={
description="MONGOLIAN LETTER TODO GAA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1858,
},
[0x1859]={
@@ -46523,6 +46786,7 @@ characters.data={
description="MONGOLIAN LETTER TODO HAA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1859,
},
[0x185A]={
@@ -46531,6 +46795,7 @@ characters.data={
description="MONGOLIAN LETTER TODO JIA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185A,
},
[0x185B]={
@@ -46539,6 +46804,7 @@ characters.data={
description="MONGOLIAN LETTER TODO NIA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185B,
},
[0x185C]={
@@ -46547,6 +46813,7 @@ characters.data={
description="MONGOLIAN LETTER TODO DZA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185C,
},
[0x185D]={
@@ -46555,6 +46822,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE E",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185D,
variants={
[0x180B]="second form",
@@ -46566,6 +46834,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE I",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185E,
variants={
[0x180B]="second form",
@@ -46578,6 +46847,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE IY",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185F,
},
[0x1860]={
@@ -46586,6 +46856,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE UE",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1860,
variants={
[0x180B]="second form",
@@ -46597,6 +46868,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE U",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1861,
},
[0x1862]={
@@ -46605,6 +46877,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE ANG",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1862,
},
[0x1863]={
@@ -46613,6 +46886,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE KA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1863,
variants={
[0x180B]="second form",
@@ -46624,6 +46898,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE GA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1864,
},
[0x1865]={
@@ -46632,6 +46907,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE HA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1865,
},
[0x1866]={
@@ -46640,6 +46916,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE PA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1866,
},
[0x1867]={
@@ -46648,6 +46925,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE SHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1867,
},
[0x1868]={
@@ -46656,6 +46934,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE TA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1868,
variants={
[0x180B]="second form",
@@ -46668,6 +46947,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE DA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1869,
variants={
[0x180B]="second form",
@@ -46679,6 +46959,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE JA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186A,
},
[0x186B]={
@@ -46687,6 +46968,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE FA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186B,
},
[0x186C]={
@@ -46695,6 +46977,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE GAA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186C,
},
[0x186D]={
@@ -46703,6 +46986,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE HAA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186D,
},
[0x186E]={
@@ -46711,6 +46995,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE TSA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186E,
},
[0x186F]={
@@ -46719,6 +47004,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE ZA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186F,
variants={
[0x180B]="second form",
@@ -46730,6 +47016,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE RAA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1870,
},
[0x1871]={
@@ -46738,6 +47025,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE CHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1871,
},
[0x1872]={
@@ -46746,6 +47034,7 @@ characters.data={
description="MONGOLIAN LETTER SIBE ZHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1872,
},
[0x1873]={
@@ -46754,6 +47043,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU I",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1873,
variants={
[0x180B]="second form",
@@ -46767,6 +47057,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU KA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1874,
variants={
[0x180B]="second form",
@@ -46780,6 +47071,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU RA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1875,
},
[0x1876]={
@@ -46788,6 +47080,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU FA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1876,
variants={
[0x180B]="second form",
@@ -46799,6 +47092,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ZHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1877,
},
[0x1878]={
@@ -46807,6 +47101,7 @@ characters.data={
description="MONGOLIAN LETTER CHA WITH TWO DOTS",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1878,
},
[0x1880]={
@@ -46815,6 +47110,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI ANUSVARA ONE",
direction="l",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1880,
variants={
[0x180B]="second form",
@@ -46826,6 +47122,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI VISARGA ONE",
direction="l",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1881,
variants={
[0x180B]="second form",
@@ -46837,6 +47134,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI DAMARU",
direction="l",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1882,
},
[0x1883]={
@@ -46845,6 +47143,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI UBADAMA",
direction="l",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1883,
},
[0x1884]={
@@ -46853,6 +47152,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI INVERTED UBADAMA",
direction="l",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1884,
},
[0x1885]={
@@ -46861,6 +47161,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI BALUDA",
direction="nsm",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x1885,
},
[0x1886]={
@@ -46869,6 +47170,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI THREE BALUDA",
direction="nsm",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x1886,
},
[0x1887]={
@@ -46877,6 +47179,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI A",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1887,
variants={
[0x180B]="second form",
@@ -46890,6 +47193,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI I",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1888,
variants={
[0x180B]="second form",
@@ -46901,6 +47205,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI KA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1889,
},
[0x188A]={
@@ -46909,6 +47214,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI NGA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188A,
variants={
[0x180B]="second form",
@@ -46920,6 +47226,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI CA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188B,
},
[0x188C]={
@@ -46928,6 +47235,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI TTA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188C,
},
[0x188D]={
@@ -46936,6 +47244,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI TTHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188D,
},
[0x188E]={
@@ -46944,6 +47253,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI DDA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188E,
},
[0x188F]={
@@ -46952,6 +47262,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI NNA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188F,
},
[0x1890]={
@@ -46960,6 +47271,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI TA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1890,
},
[0x1891]={
@@ -46968,6 +47280,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI DA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1891,
},
[0x1892]={
@@ -46976,6 +47289,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI PA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1892,
},
[0x1893]={
@@ -46984,6 +47298,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI PHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1893,
},
[0x1894]={
@@ -46992,6 +47307,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI SSA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1894,
},
[0x1895]={
@@ -47000,6 +47316,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI ZHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1895,
},
[0x1896]={
@@ -47008,6 +47325,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI ZA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1896,
},
[0x1897]={
@@ -47016,6 +47334,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI AH",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1897,
},
[0x1898]={
@@ -47024,6 +47343,7 @@ characters.data={
description="MONGOLIAN LETTER TODO ALI GALI TA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1898,
},
[0x1899]={
@@ -47032,6 +47352,7 @@ characters.data={
description="MONGOLIAN LETTER TODO ALI GALI ZHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1899,
},
[0x189A]={
@@ -47040,6 +47361,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI GHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189A,
},
[0x189B]={
@@ -47048,6 +47370,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI NGA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189B,
},
[0x189C]={
@@ -47056,6 +47379,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI CA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189C,
},
[0x189D]={
@@ -47064,6 +47388,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI JHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189D,
},
[0x189E]={
@@ -47072,6 +47397,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI TTA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189E,
},
[0x189F]={
@@ -47080,6 +47406,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI DDHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189F,
},
[0x18A0]={
@@ -47088,6 +47415,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI TA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A0,
},
[0x18A1]={
@@ -47096,6 +47424,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI DHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A1,
},
[0x18A2]={
@@ -47104,6 +47433,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI SSA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A2,
},
[0x18A3]={
@@ -47112,6 +47442,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI CYA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A3,
},
[0x18A4]={
@@ -47120,6 +47451,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI ZHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A4,
},
[0x18A5]={
@@ -47128,6 +47460,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI ZA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A5,
},
[0x18A6]={
@@ -47136,6 +47469,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI HALF U",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A6,
},
[0x18A7]={
@@ -47144,6 +47478,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI HALF YA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A7,
},
[0x18A8]={
@@ -47152,6 +47487,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI BHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A8,
},
[0x18A9]={
@@ -47160,6 +47496,7 @@ characters.data={
description="MONGOLIAN LETTER ALI GALI DAGALGA",
direction="nsm",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x18A9,
},
[0x18AA]={
@@ -47168,6 +47505,7 @@ characters.data={
description="MONGOLIAN LETTER MANCHU ALI GALI LHA",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18AA,
},
[0x18B0]={
@@ -50419,6 +50757,22 @@ characters.data={
linebreak="cm",
unicodeslot=0x1ABE,
},
+ [0x1ABF]={
+ category="mn",
+ combining=0xDC,
+ description="COMBINING LATIN SMALL LETTER W BELOW",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1ABF,
+ },
+ [0x1AC0]={
+ category="mn",
+ combining=0xDC,
+ description="COMBINING LATIN SMALL LETTER TURNED W BELOW",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1AC0,
+ },
[0x1B00]={
category="mn",
description="BALINESE SIGN ULU RICEM",
@@ -53846,6 +54200,7 @@ characters.data={
description="LATIN LETTER SMALL CAPITAL L WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x29F, 0x2F },
unicodeslot=0x1D0C,
},
[0x1D0D]={
@@ -53895,6 +54250,7 @@ characters.data={
description="LATIN SMALL LETTER SIDEWAYS O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x1D11, 0x2F },
unicodeslot=0x1D13,
},
[0x1D14]={
@@ -54703,6 +55059,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x269,
+ specials={ "with", 0x269, 0x2F },
unicodeslot=0x1D7C,
},
[0x1D7D]={
@@ -54711,6 +55068,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x70,
+ specials={ "with", 0x70, 0x2F },
uccode=0x2C63,
unicodeslot=0x1D7D,
},
@@ -54727,6 +55085,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x28A,
+ specials={ "with", 0x28A, 0x2F },
unicodeslot=0x1D7F,
},
[0x1D80]={
@@ -58517,7 +58876,6 @@ characters.data={
[0x1EF6]={
adobename="Yhookabove",
category="lu",
- contextname="Yhook",
description="LATIN CAPITAL LETTER Y WITH HOOK ABOVE",
direction="l",
lccode=0x1EF7,
@@ -58529,7 +58887,6 @@ characters.data={
[0x1EF7]={
adobename="yhookabove",
category="ll",
- contextname="yhook",
description="LATIN SMALL LETTER Y WITH HOOK ABOVE",
direction="l",
linebreak="al",
@@ -60490,7 +60847,7 @@ characters.data={
},
[0x1FBB]={
category="lu",
- contextname="greekAlphatonos",
+ comment="conflict: greekAlphatonos",
description="GREEK CAPITAL LETTER ALPHA WITH OXIA",
direction="l",
lccode=0x1F71,
@@ -60620,7 +60977,7 @@ characters.data={
},
[0x1FC9]={
category="lu",
- contextname="greekEpsilontonos",
+ comment="conflict: greekEpsilontonos",
description="GREEK CAPITAL LETTER EPSILON WITH OXIA",
direction="l",
lccode=0x1F73,
@@ -60642,7 +60999,7 @@ characters.data={
},
[0x1FCB]={
category="lu",
- contextname="greekEtatonos",
+ comment="conflict: greekEtatonos",
description="GREEK CAPITAL LETTER ETA WITH OXIA",
direction="l",
lccode=0x1F75,
@@ -60673,7 +61030,7 @@ characters.data={
},
[0x1FCE]={
category="sk",
- contextname="greekpsilitonos",
+ comment="conflict: greekpsilitonos",
description="GREEK PSILI AND OXIA",
direction="on",
linebreak="al",
@@ -60723,7 +61080,7 @@ characters.data={
},
[0x1FD3]={
category="ll",
- contextname="greekiotadialytikatonos",
+ comment="conflict: greekiotadialytikatonos",
description="GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA",
direction="l",
linebreak="al",
@@ -60786,7 +61143,7 @@ characters.data={
},
[0x1FDB]={
category="lu",
- contextname="greekIotatonos",
+ comment="conflict: greekIotatonos",
description="GREEK CAPITAL LETTER IOTA WITH OXIA",
direction="l",
lccode=0x1F77,
@@ -60806,7 +61163,7 @@ characters.data={
},
[0x1FDE]={
category="sk",
- contextname="greekdasiatonos",
+ comment="conflict: greekdasiatonos",
description="GREEK DASIA AND OXIA",
direction="on",
linebreak="al",
@@ -60856,7 +61213,7 @@ characters.data={
},
[0x1FE3]={
category="ll",
- contextname="greekupsilondialytikatonos",
+ comment="conflict: greekupsilondialytikatonos",
description="GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA",
direction="l",
linebreak="al",
@@ -60940,7 +61297,7 @@ characters.data={
},
[0x1FEB]={
category="lu",
- contextname="greekUpsilontonos",
+ comment="conflict: greekUpsilontonos",
description="GREEK CAPITAL LETTER UPSILON WITH OXIA",
direction="l",
lccode=0x1F7B,
@@ -60971,7 +61328,7 @@ characters.data={
},
[0x1FEE]={
category="sk",
- contextname="greekdialytikatonos",
+ comment="conflict: greekdialytikatonos",
description="GREEK DIALYTIKA AND OXIA",
direction="on",
linebreak="al",
@@ -61051,7 +61408,7 @@ characters.data={
},
[0x1FF9]={
category="lu",
- contextname="greekOmicrontonos",
+ comment="conflict: greekOmicrontonos",
description="GREEK CAPITAL LETTER OMICRON WITH OXIA",
direction="l",
lccode=0x1F79,
@@ -61073,7 +61430,7 @@ characters.data={
},
[0x1FFB]={
category="lu",
- contextname="greekOmegatonos",
+ comment="conflict: greekOmegatonos",
description="GREEK CAPITAL LETTER OMEGA WITH OXIA",
direction="l",
lccode=0x1F7D,
@@ -61234,6 +61591,7 @@ characters.data={
description="ZERO WIDTH NON-JOINER",
direction="bn",
linebreak="cm",
+ mongolian="nj",
synonyms={ "zwnj" },
unicodeslot=0x200C,
},
@@ -61245,6 +61603,7 @@ characters.data={
description="ZERO WIDTH JOINER",
direction="bn",
linebreak="zwj",
+ mongolian="nj",
synonyms={ "zwj" },
unicodeslot=0x200D,
},
@@ -61273,6 +61632,7 @@ characters.data={
description="HYPHEN",
direction="on",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x2010,
},
[0x2011]={
@@ -61280,6 +61640,7 @@ characters.data={
description="NON-BREAKING HYPHEN",
direction="on",
linebreak="gl",
+ mongolian="nj",
specials={ "nobreak", 0x2010 },
unicodeslot=0x2011,
},
@@ -61290,6 +61651,7 @@ characters.data={
description="FIGURE DASH",
direction="on",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x2012,
},
[0x2013]={
@@ -61300,6 +61662,7 @@ characters.data={
description="EN DASH",
direction="on",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x2013,
},
[0x2014]={
@@ -61310,6 +61673,7 @@ characters.data={
description="EM DASH",
direction="on",
linebreak="b2",
+ mongolian="nj",
unicodeslot=0x2014,
},
[0x2015]={
@@ -61622,6 +61986,7 @@ characters.data={
description="NARROW NO-BREAK SPACE",
direction="cs",
linebreak="gl",
+ mongolian="nj",
specials={ "nobreak", 0x20 },
synonyms={ "nnbsp" },
unicodeslot=0x202F,
@@ -62928,10 +63293,6 @@ characters.data={
linebreak="cm",
mathspec={
{
- class="default",
- name="bigcircle",
- },
- {
class="binary",
name="bigcircle",
},
@@ -64936,7 +65297,7 @@ characters.data={
[0x21B5]={
adobename="carriagereturn",
category="so",
- contextname="carriagereturn",
+ comment="conflict: carriagereturn",
description="DOWNWARDS ARROW WITH CORNER LEFTWARDS",
direction="on",
linebreak="al",
@@ -70777,6 +71138,7 @@ characters.data={
[0x2423]={
adobename="blank",
category="so",
+ contextname="textcontrolspace",
description="OPEN BOX",
direction="on",
linebreak="al",
@@ -74224,6 +74586,7 @@ characters.data={
description="DOTTED CIRCLE",
direction="on",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x25CC,
},
[0x25CD]={
@@ -81657,7 +82020,7 @@ characters.data={
},
{
class="open",
- name="rlointerval",
+ name="llointerval",
},
{
class="close",
@@ -85575,6 +85938,13 @@ characters.data={
linebreak="al",
unicodeslot=0x2B95,
},
+ [0x2B97]={
+ category="so",
+ description="SYMBOL FOR TYPE A ELECTRONICS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2B97,
+ },
[0x2B98]={
category="so",
description="THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD",
@@ -87091,6 +87461,7 @@ characters.data={
lccode=0x1D7D,
linebreak="al",
shcode=0x50,
+ specials={ "with", 0x50, 0x2F },
unicodeslot=0x2C63,
},
[0x2C64]={
@@ -87108,6 +87479,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x61,
+ specials={ "with", 0x61, 0x2F },
uccode=0x23A,
unicodeslot=0x2C65,
},
@@ -87186,6 +87558,7 @@ characters.data={
description="LATIN CAPITAL LETTER M WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x4D, 0x1FA9D },
unicodeslot=0x2C6E,
},
[0x2C6F]={
@@ -87214,6 +87587,7 @@ characters.data={
description="LATIN CAPITAL LETTER W WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x57, 0x1FA9D },
unicodeslot=0x2C72,
},
[0x2C73]={
@@ -87221,6 +87595,7 @@ characters.data={
description="LATIN SMALL LETTER W WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x77, 0x1FA9D },
unicodeslot=0x2C73,
},
[0x2C74]={
@@ -90400,6 +90775,27 @@ characters.data={
linebreak="ba",
unicodeslot=0x2E4F,
},
+ [0x2E50]={
+ category="so",
+ description="CROSS PATTY WITH RIGHT CROSSBAR",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2E50,
+ },
+ [0x2E51]={
+ category="so",
+ description="CROSS PATTY WITH LEFT CROSSBAR",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2E51,
+ },
+ [0x2E52]={
+ category="po",
+ description="TIRONIAN SIGN CAPITAL ET",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x2E52,
+ },
[0x2E80]={
category="so",
cjkwd="w",
@@ -97916,6 +98312,46 @@ characters.data={
linebreak="id",
unicodeslot=0x31BA,
},
+ [0x31BB]={
+ category="lo",
+ cjkwd="w",
+ description="BOPOMOFO FINAL LETTER G",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x31BB,
+ },
+ [0x31BC]={
+ category="lo",
+ cjkwd="w",
+ description="BOPOMOFO LETTER GW",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x31BC,
+ },
+ [0x31BD]={
+ category="lo",
+ cjkwd="w",
+ description="BOPOMOFO LETTER KW",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x31BD,
+ },
+ [0x31BE]={
+ category="lo",
+ cjkwd="w",
+ description="BOPOMOFO LETTER OE",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x31BE,
+ },
+ [0x31BF]={
+ category="lo",
+ cjkwd="w",
+ description="BOPOMOFO LETTER AH",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x31BF,
+ },
[0x31C0]={
category="so",
cjkwd="w",
@@ -117468,6 +117904,7 @@ characters.data={
description="LATIN CAPITAL LETTER CUATRILLO WITH COMMA",
direction="l",
linebreak="al",
+ specials={ "with", 0xA72C, 0x2C },
unicodeslot=0xA72E,
},
[0xA72F]={
@@ -117475,6 +117912,7 @@ characters.data={
description="LATIN SMALL LETTER CUATRILLO WITH COMMA",
direction="l",
linebreak="al",
+ specials={ "with", 0xA72D, 0x2C },
unicodeslot=0xA72F,
},
[0xA730]={
@@ -117552,6 +117990,7 @@ characters.data={
description="LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR",
direction="l",
linebreak="al",
+ specials={ "with", 0xA738, 0x2015 },
unicodeslot=0xA73A,
},
[0xA73B]={
@@ -117559,6 +117998,7 @@ characters.data={
description="LATIN SMALL LETTER AV WITH HORIZONTAL BAR",
direction="l",
linebreak="al",
+ specials={ "with", 0xA739, 0x2015 },
unicodeslot=0xA73B,
},
[0xA73C]={
@@ -117594,6 +118034,7 @@ characters.data={
description="LATIN CAPITAL LETTER K WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x4B, 0x2F },
unicodeslot=0xA740,
},
[0xA741]={
@@ -117601,6 +118042,7 @@ characters.data={
description="LATIN SMALL LETTER K WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x6B, 0x2F },
unicodeslot=0xA741,
},
[0xA742]={
@@ -117846,6 +118288,7 @@ characters.data={
description="LATIN CAPITAL LETTER THORN WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xDE, 0x2F },
unicodeslot=0xA764,
},
[0xA765]={
@@ -117853,6 +118296,7 @@ characters.data={
description="LATIN SMALL LETTER THORN WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xFE, 0x2F },
unicodeslot=0xA765,
},
[0xA766]={
@@ -118211,6 +118655,7 @@ characters.data={
description="LATIN CAPITAL LETTER F WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x46, 0x2F },
unicodeslot=0xA798,
},
[0xA799]={
@@ -118218,6 +118663,7 @@ characters.data={
description="LATIN SMALL LETTER F WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x66, 0x2F },
unicodeslot=0xA799,
},
[0xA79A]={
@@ -118337,6 +118783,7 @@ characters.data={
description="LATIN CAPITAL LETTER H WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x48, 0x1FA9D },
unicodeslot=0xA7AA,
},
[0xA7AB]={
@@ -118435,6 +118882,7 @@ characters.data={
description="LATIN CAPITAL LETTER U WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x55, 0x2F },
unicodeslot=0xA7B8,
},
[0xA7B9]={
@@ -118442,6 +118890,7 @@ characters.data={
description="LATIN SMALL LETTER U WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x75, 0x2F },
unicodeslot=0xA7B9,
},
[0xA7BA]={
@@ -118512,6 +118961,7 @@ characters.data={
description="LATIN CAPITAL LETTER S WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x53, 0x1FA9D },
unicodeslot=0xA7C5,
},
[0xA7C6]={
@@ -118521,6 +118971,48 @@ characters.data={
linebreak="al",
unicodeslot=0xA7C6,
},
+ [0xA7C7]={
+ category="lu",
+ description="LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7C7,
+ },
+ [0xA7C8]={
+ category="ll",
+ description="LATIN SMALL LETTER D WITH SHORT STROKE OVERLAY",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7C8,
+ },
+ [0xA7C9]={
+ category="lu",
+ description="LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7C9,
+ },
+ [0xA7CA]={
+ category="ll",
+ description="LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7CA,
+ },
+ [0xA7F5]={
+ category="lu",
+ description="LATIN CAPITAL LETTER REVERSED HALF H",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7F5,
+ },
+ [0xA7F6]={
+ category="ll",
+ description="LATIN SMALL LETTER REVERSED HALF H",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xA7F6,
+ },
[0xA7F7]={
category="lo",
description="LATIN EPIGRAPHIC LETTER SIDEWAYS I",
@@ -118895,6 +119387,14 @@ characters.data={
linebreak="al",
unicodeslot=0xA82B,
},
+ [0xA82C]={
+ category="mn",
+ combining=0x9,
+ description="SYLOTI NAGRI SIGN ALTERNATE HASANTA",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0xA82C,
+ },
[0xA830]={
category="no",
description="NORTH INDIC FRACTION ONE QUARTER",
@@ -123824,6 +124324,7 @@ characters.data={
description="LATIN SMALL LETTER L WITH INVERTED LAZY S",
direction="l",
linebreak="al",
+ specials={ "with", 0x6C, 0x223E },
unicodeslot=0xAB37,
},
[0xAB38]={
@@ -123873,6 +124374,7 @@ characters.data={
description="LATIN SMALL LETTER BLACKLETTER O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xAB3D, 0x2F },
unicodeslot=0xAB3E,
},
[0xAB3F]={
@@ -123880,6 +124382,7 @@ characters.data={
description="LATIN SMALL LETTER OPEN O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x254, 0x2F },
unicodeslot=0xAB3F,
},
[0xAB40]={
@@ -123894,6 +124397,7 @@ characters.data={
description="LATIN SMALL LETTER TURNED OE WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x1D14, 0x2F },
unicodeslot=0xAB41,
},
[0xAB42]={
@@ -123915,6 +124419,7 @@ characters.data={
description="LATIN SMALL LETTER TURNED O OPEN-O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xAB43, 0x2F },
unicodeslot=0xAB44,
},
[0xAB45]={
@@ -123971,6 +124476,7 @@ characters.data={
description="LATIN SMALL LETTER SCRIPT R WITH RING",
direction="l",
linebreak="al",
+ specials={ "with", 0xAB4B, 0x1F48D },
unicodeslot=0xAB4C,
},
[0xAB4D]={
@@ -124166,6 +124672,35 @@ characters.data={
linebreak="al",
unicodeslot=0xAB67,
},
+ [0xAB68]={
+ category="ll",
+ description="LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0xAB68,
+ },
+ [0xAB69]={
+ category="lm",
+ description="MODIFIER LETTER SMALL TURNED W",
+ direction="l",
+ linebreak="al",
+ specials={ "super", 0x28D },
+ unicodeslot=0xAB69,
+ },
+ [0xAB6A]={
+ category="sk",
+ description="MODIFIER LETTER LEFT TACK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0xAB6A,
+ },
+ [0xAB6B]={
+ category="sk",
+ description="MODIFIER LETTER RIGHT TACK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0xAB6B,
+ },
[0xAB70]={
category="ll",
description="CHEROKEE SMALL LETTER A",
@@ -135366,7 +135901,7 @@ characters.data={
},
[0xFDF9]={
category="lo",
- contextname="arabicsalla",
+ comment="conflict: arabicsalla",
description="ARABIC LIGATURE SALLA ISOLATED FORM",
direction="al",
linebreak="al",
@@ -142326,6 +142861,13 @@ characters.data={
linebreak="al",
unicodeslot=0x1019B,
},
+ [0x1019C]={
+ category="so",
+ description="ASCIA SYMBOL",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1019C,
+ },
[0x101A0]={
category="so",
description="GREEK SYMBOL TAU RHO",
@@ -156340,6 +156882,337 @@ characters.data={
linebreak="al",
unicodeslot=0x10E7E,
},
+ [0x10E80]={
+ category="lo",
+ description="YEZIDI LETTER ELIF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E80,
+ },
+ [0x10E81]={
+ category="lo",
+ description="YEZIDI LETTER BE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E81,
+ },
+ [0x10E82]={
+ category="lo",
+ description="YEZIDI LETTER PE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E82,
+ },
+ [0x10E83]={
+ category="lo",
+ description="YEZIDI LETTER PHE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E83,
+ },
+ [0x10E84]={
+ category="lo",
+ description="YEZIDI LETTER THE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E84,
+ },
+ [0x10E85]={
+ category="lo",
+ description="YEZIDI LETTER SE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E85,
+ },
+ [0x10E86]={
+ category="lo",
+ description="YEZIDI LETTER CIM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E86,
+ },
+ [0x10E87]={
+ category="lo",
+ description="YEZIDI LETTER CHIM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E87,
+ },
+ [0x10E88]={
+ category="lo",
+ description="YEZIDI LETTER CHHIM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E88,
+ },
+ [0x10E89]={
+ category="lo",
+ description="YEZIDI LETTER HHA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E89,
+ },
+ [0x10E8A]={
+ category="lo",
+ description="YEZIDI LETTER XA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E8A,
+ },
+ [0x10E8B]={
+ category="lo",
+ description="YEZIDI LETTER DAL",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E8B,
+ },
+ [0x10E8C]={
+ category="lo",
+ description="YEZIDI LETTER ZAL",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E8C,
+ },
+ [0x10E8D]={
+ category="lo",
+ description="YEZIDI LETTER RA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E8D,
+ },
+ [0x10E8E]={
+ category="lo",
+ description="YEZIDI LETTER RHA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E8E,
+ },
+ [0x10E8F]={
+ category="lo",
+ description="YEZIDI LETTER ZA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E8F,
+ },
+ [0x10E90]={
+ category="lo",
+ description="YEZIDI LETTER JA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E90,
+ },
+ [0x10E91]={
+ category="lo",
+ description="YEZIDI LETTER SIN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E91,
+ },
+ [0x10E92]={
+ category="lo",
+ description="YEZIDI LETTER SHIN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E92,
+ },
+ [0x10E93]={
+ category="lo",
+ description="YEZIDI LETTER SAD",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E93,
+ },
+ [0x10E94]={
+ category="lo",
+ description="YEZIDI LETTER DAD",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E94,
+ },
+ [0x10E95]={
+ category="lo",
+ description="YEZIDI LETTER TA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E95,
+ },
+ [0x10E96]={
+ category="lo",
+ description="YEZIDI LETTER ZE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E96,
+ },
+ [0x10E97]={
+ category="lo",
+ description="YEZIDI LETTER EYN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E97,
+ },
+ [0x10E98]={
+ category="lo",
+ description="YEZIDI LETTER XHEYN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E98,
+ },
+ [0x10E99]={
+ category="lo",
+ description="YEZIDI LETTER FA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E99,
+ },
+ [0x10E9A]={
+ category="lo",
+ description="YEZIDI LETTER VA",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E9A,
+ },
+ [0x10E9B]={
+ category="lo",
+ description="YEZIDI LETTER VA ALTERNATE FORM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E9B,
+ },
+ [0x10E9C]={
+ category="lo",
+ description="YEZIDI LETTER QAF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E9C,
+ },
+ [0x10E9D]={
+ category="lo",
+ description="YEZIDI LETTER KAF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E9D,
+ },
+ [0x10E9E]={
+ category="lo",
+ description="YEZIDI LETTER KHAF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E9E,
+ },
+ [0x10E9F]={
+ category="lo",
+ description="YEZIDI LETTER GAF",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10E9F,
+ },
+ [0x10EA0]={
+ category="lo",
+ description="YEZIDI LETTER LAM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA0,
+ },
+ [0x10EA1]={
+ category="lo",
+ description="YEZIDI LETTER MIM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA1,
+ },
+ [0x10EA2]={
+ category="lo",
+ description="YEZIDI LETTER NUN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA2,
+ },
+ [0x10EA3]={
+ category="lo",
+ description="YEZIDI LETTER UM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA3,
+ },
+ [0x10EA4]={
+ category="lo",
+ description="YEZIDI LETTER WAW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA4,
+ },
+ [0x10EA5]={
+ category="lo",
+ description="YEZIDI LETTER OW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA5,
+ },
+ [0x10EA6]={
+ category="lo",
+ description="YEZIDI LETTER EW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA6,
+ },
+ [0x10EA7]={
+ category="lo",
+ description="YEZIDI LETTER HAY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA7,
+ },
+ [0x10EA8]={
+ category="lo",
+ description="YEZIDI LETTER YOT",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA8,
+ },
+ [0x10EA9]={
+ category="lo",
+ description="YEZIDI LETTER ET",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EA9,
+ },
+ [0x10EAB]={
+ category="mn",
+ combining=0xE6,
+ description="YEZIDI COMBINING HAMZA MARK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x10EAB,
+ },
+ [0x10EAC]={
+ category="mn",
+ combining=0xE6,
+ description="YEZIDI COMBINING MADDA MARK",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x10EAC,
+ },
+ [0x10EAD]={
+ category="pd",
+ description="YEZIDI HYPHENATION MARK",
+ direction="r",
+ linebreak="ba",
+ unicodeslot=0x10EAD,
+ },
+ [0x10EB0]={
+ category="lo",
+ description="YEZIDI LETTER LAM WITH DOT ABOVE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EB0,
+ },
+ [0x10EB1]={
+ category="lo",
+ description="YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10EB1,
+ },
[0x10F00]={
category="lo",
description="OLD SOGDIAN LETTER ALEPH",
@@ -156951,6 +157824,230 @@ characters.data={
linebreak="al",
unicodeslot=0x10F59,
},
+ [0x10FB0]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER ALEPH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB0,
+ },
+ [0x10FB1]={
+ arabic="u",
+ category="lo",
+ description="CHORASMIAN LETTER SMALL ALEPH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB1,
+ },
+ [0x10FB2]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER BETH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB2,
+ },
+ [0x10FB3]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER GIMEL",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB3,
+ },
+ [0x10FB4]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER DALETH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB4,
+ },
+ [0x10FB5]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER HE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB5,
+ },
+ [0x10FB6]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER WAW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB6,
+ },
+ [0x10FB7]={
+ arabic="u",
+ category="lo",
+ description="CHORASMIAN LETTER CURLED WAW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB7,
+ },
+ [0x10FB8]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER ZAYIN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB8,
+ },
+ [0x10FB9]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER HETH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FB9,
+ },
+ [0x10FBA]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER YODH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FBA,
+ },
+ [0x10FBB]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER KAPH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FBB,
+ },
+ [0x10FBC]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER LAMEDH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FBC,
+ },
+ [0x10FBD]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER MEM",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FBD,
+ },
+ [0x10FBE]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER NUN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FBE,
+ },
+ [0x10FBF]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER SAMEKH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FBF,
+ },
+ [0x10FC0]={
+ arabic="u",
+ category="lo",
+ description="CHORASMIAN LETTER AYIN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC0,
+ },
+ [0x10FC1]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER PE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC1,
+ },
+ [0x10FC2]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER RESH",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC2,
+ },
+ [0x10FC3]={
+ arabic="r",
+ category="lo",
+ description="CHORASMIAN LETTER SHIN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC3,
+ },
+ [0x10FC4]={
+ arabic="d",
+ category="lo",
+ description="CHORASMIAN LETTER TAW",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC4,
+ },
+ [0x10FC5]={
+ arabic="u",
+ category="no",
+ description="CHORASMIAN NUMBER ONE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC5,
+ },
+ [0x10FC6]={
+ arabic="u",
+ category="no",
+ description="CHORASMIAN NUMBER TWO",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC6,
+ },
+ [0x10FC7]={
+ arabic="u",
+ category="no",
+ description="CHORASMIAN NUMBER THREE",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC7,
+ },
+ [0x10FC8]={
+ arabic="u",
+ category="no",
+ description="CHORASMIAN NUMBER FOUR",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC8,
+ },
+ [0x10FC9]={
+ arabic="r",
+ category="no",
+ description="CHORASMIAN NUMBER TEN",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FC9,
+ },
+ [0x10FCA]={
+ arabic="d",
+ category="no",
+ description="CHORASMIAN NUMBER TWENTY",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FCA,
+ },
+ [0x10FCB]={
+ arabic="l",
+ category="no",
+ description="CHORASMIAN NUMBER ONE HUNDRED",
+ direction="r",
+ linebreak="al",
+ unicodeslot=0x10FCB,
+ },
[0x10FE0]={
category="lo",
description="ELYMAIC LETTER ALEPH",
@@ -159095,6 +160192,13 @@ characters.data={
linebreak="cm",
unicodeslot=0x11146,
},
+ [0x11147]={
+ category="lo",
+ description="CHAKMA LETTER VAA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11147,
+ },
[0x11150]={
category="lo",
description="MAHAJANI LETTER A",
@@ -159917,6 +161021,20 @@ characters.data={
linebreak="al",
unicodeslot=0x111CD,
},
+ [0x111CE]={
+ category="mc",
+ description="SHARADA VOWEL SIGN PRISHTHAMATRA E",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x111CE,
+ },
+ [0x111CF]={
+ category="mn",
+ description="SHARADA SIGN INVERTED CANDRABINDU",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x111CF,
+ },
[0x111D0]={
category="nd",
description="SHARADA DIGIT ZERO",
@@ -162607,6 +163725,13 @@ characters.data={
linebreak="nu",
unicodeslot=0x11459,
},
+ [0x1145A]={
+ category="po",
+ description="NEWA DOUBLE COMMA",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x1145A,
+ },
[0x1145B]={
category="po",
description="NEWA PLACEHOLDER MARK",
@@ -162636,6 +163761,20 @@ characters.data={
linebreak="al",
unicodeslot=0x1145F,
},
+ [0x11460]={
+ category="lo",
+ description="NEWA SIGN JIHVAMULIYA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11460,
+ },
+ [0x11461]={
+ category="lo",
+ description="NEWA SIGN UPADHMANIYA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11461,
+ },
[0x11480]={
category="lo",
description="TIRHUTA ANJI",
@@ -164422,6 +165561,7 @@ characters.data={
description="MONGOLIAN BIRGA WITH ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11660,
},
[0x11661]={
@@ -164429,6 +165569,7 @@ characters.data={
description="MONGOLIAN ROTATED BIRGA",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11661,
},
[0x11662]={
@@ -164436,6 +165577,7 @@ characters.data={
description="MONGOLIAN DOUBLE BIRGA WITH ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11662,
},
[0x11663]={
@@ -164443,6 +165585,7 @@ characters.data={
description="MONGOLIAN TRIPLE BIRGA WITH ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11663,
},
[0x11664]={
@@ -164450,6 +165593,7 @@ characters.data={
description="MONGOLIAN BIRGA WITH DOUBLE ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11664,
},
[0x11665]={
@@ -164457,6 +165601,7 @@ characters.data={
description="MONGOLIAN ROTATED BIRGA WITH ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11665,
},
[0x11666]={
@@ -164464,6 +165609,7 @@ characters.data={
description="MONGOLIAN ROTATED BIRGA WITH DOUBLE ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11666,
},
[0x11667]={
@@ -164471,6 +165617,7 @@ characters.data={
description="MONGOLIAN INVERTED BIRGA",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11667,
},
[0x11668]={
@@ -164478,6 +165625,7 @@ characters.data={
description="MONGOLIAN INVERTED BIRGA WITH DOUBLE ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11668,
},
[0x11669]={
@@ -164485,6 +165633,7 @@ characters.data={
description="MONGOLIAN SWIRL BIRGA",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11669,
},
[0x1166A]={
@@ -164492,6 +165641,7 @@ characters.data={
description="MONGOLIAN SWIRL BIRGA WITH ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1166A,
},
[0x1166B]={
@@ -164499,6 +165649,7 @@ characters.data={
description="MONGOLIAN SWIRL BIRGA WITH DOUBLE ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1166B,
},
[0x1166C]={
@@ -164506,6 +165657,7 @@ characters.data={
description="MONGOLIAN TURNED SWIRL BIRGA WITH DOUBLE ORNAMENT",
direction="on",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1166C,
},
[0x11680]={
@@ -166396,6 +167548,514 @@ characters.data={
linebreak="al",
unicodeslot=0x118FF,
},
+ [0x11900]={
+ category="lo",
+ description="DIVES AKURU LETTER A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11900,
+ },
+ [0x11901]={
+ category="lo",
+ description="DIVES AKURU LETTER AA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11901,
+ },
+ [0x11902]={
+ category="lo",
+ description="DIVES AKURU LETTER I",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11902,
+ },
+ [0x11903]={
+ category="lo",
+ description="DIVES AKURU LETTER II",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11903,
+ },
+ [0x11904]={
+ category="lo",
+ description="DIVES AKURU LETTER U",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11904,
+ },
+ [0x11905]={
+ category="lo",
+ description="DIVES AKURU LETTER UU",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11905,
+ },
+ [0x11906]={
+ category="lo",
+ description="DIVES AKURU LETTER E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11906,
+ },
+ [0x11909]={
+ category="lo",
+ description="DIVES AKURU LETTER O",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11909,
+ },
+ [0x1190C]={
+ category="lo",
+ description="DIVES AKURU LETTER KA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1190C,
+ },
+ [0x1190D]={
+ category="lo",
+ description="DIVES AKURU LETTER KHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1190D,
+ },
+ [0x1190E]={
+ category="lo",
+ description="DIVES AKURU LETTER GA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1190E,
+ },
+ [0x1190F]={
+ category="lo",
+ description="DIVES AKURU LETTER GHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1190F,
+ },
+ [0x11910]={
+ category="lo",
+ description="DIVES AKURU LETTER NGA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11910,
+ },
+ [0x11911]={
+ category="lo",
+ description="DIVES AKURU LETTER CA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11911,
+ },
+ [0x11912]={
+ category="lo",
+ description="DIVES AKURU LETTER CHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11912,
+ },
+ [0x11913]={
+ category="lo",
+ description="DIVES AKURU LETTER JA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11913,
+ },
+ [0x11915]={
+ category="lo",
+ description="DIVES AKURU LETTER NYA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11915,
+ },
+ [0x11916]={
+ category="lo",
+ description="DIVES AKURU LETTER TTA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11916,
+ },
+ [0x11918]={
+ category="lo",
+ description="DIVES AKURU LETTER DDA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11918,
+ },
+ [0x11919]={
+ category="lo",
+ description="DIVES AKURU LETTER DDHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11919,
+ },
+ [0x1191A]={
+ category="lo",
+ description="DIVES AKURU LETTER NNA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1191A,
+ },
+ [0x1191B]={
+ category="lo",
+ description="DIVES AKURU LETTER TA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1191B,
+ },
+ [0x1191C]={
+ category="lo",
+ description="DIVES AKURU LETTER THA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1191C,
+ },
+ [0x1191D]={
+ category="lo",
+ description="DIVES AKURU LETTER DA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1191D,
+ },
+ [0x1191E]={
+ category="lo",
+ description="DIVES AKURU LETTER DHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1191E,
+ },
+ [0x1191F]={
+ category="lo",
+ description="DIVES AKURU LETTER NA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1191F,
+ },
+ [0x11920]={
+ category="lo",
+ description="DIVES AKURU LETTER PA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11920,
+ },
+ [0x11921]={
+ category="lo",
+ description="DIVES AKURU LETTER PHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11921,
+ },
+ [0x11922]={
+ category="lo",
+ description="DIVES AKURU LETTER BA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11922,
+ },
+ [0x11923]={
+ category="lo",
+ description="DIVES AKURU LETTER BHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11923,
+ },
+ [0x11924]={
+ category="lo",
+ description="DIVES AKURU LETTER MA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11924,
+ },
+ [0x11925]={
+ category="lo",
+ description="DIVES AKURU LETTER YA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11925,
+ },
+ [0x11926]={
+ category="lo",
+ description="DIVES AKURU LETTER YYA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11926,
+ },
+ [0x11927]={
+ category="lo",
+ description="DIVES AKURU LETTER RA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11927,
+ },
+ [0x11928]={
+ category="lo",
+ description="DIVES AKURU LETTER LA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11928,
+ },
+ [0x11929]={
+ category="lo",
+ description="DIVES AKURU LETTER VA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11929,
+ },
+ [0x1192A]={
+ category="lo",
+ description="DIVES AKURU LETTER SHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1192A,
+ },
+ [0x1192B]={
+ category="lo",
+ description="DIVES AKURU LETTER SSA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1192B,
+ },
+ [0x1192C]={
+ category="lo",
+ description="DIVES AKURU LETTER SA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1192C,
+ },
+ [0x1192D]={
+ category="lo",
+ description="DIVES AKURU LETTER HA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1192D,
+ },
+ [0x1192E]={
+ category="lo",
+ description="DIVES AKURU LETTER LLA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1192E,
+ },
+ [0x1192F]={
+ category="lo",
+ description="DIVES AKURU LETTER ZA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1192F,
+ },
+ [0x11930]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN AA",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11930,
+ },
+ [0x11931]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN I",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11931,
+ },
+ [0x11932]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN II",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11932,
+ },
+ [0x11933]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN U",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11933,
+ },
+ [0x11934]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN UU",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11934,
+ },
+ [0x11935]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN E",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11935,
+ },
+ [0x11937]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN AI",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11937,
+ },
+ [0x11938]={
+ category="mc",
+ description="DIVES AKURU VOWEL SIGN O",
+ direction="l",
+ linebreak="cm",
+ specials={ "char", 0x11935, 0x11930 },
+ unicodeslot=0x11938,
+ },
+ [0x1193B]={
+ category="mn",
+ description="DIVES AKURU SIGN ANUSVARA",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1193B,
+ },
+ [0x1193C]={
+ category="mn",
+ description="DIVES AKURU SIGN CANDRABINDU",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1193C,
+ },
+ [0x1193D]={
+ category="mc",
+ combining=0x9,
+ description="DIVES AKURU SIGN HALANTA",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x1193D,
+ },
+ [0x1193E]={
+ category="mn",
+ combining=0x9,
+ description="DIVES AKURU VIRAMA",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x1193E,
+ },
+ [0x1193F]={
+ category="lo",
+ description="DIVES AKURU PREFIXED NASAL SIGN",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x1193F,
+ },
+ [0x11940]={
+ category="mc",
+ description="DIVES AKURU MEDIAL YA",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11940,
+ },
+ [0x11941]={
+ category="lo",
+ description="DIVES AKURU INITIAL RA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11941,
+ },
+ [0x11942]={
+ category="mc",
+ description="DIVES AKURU MEDIAL RA",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x11942,
+ },
+ [0x11943]={
+ category="mn",
+ combining=0x7,
+ description="DIVES AKURU SIGN NUKTA",
+ direction="nsm",
+ linebreak="cm",
+ unicodeslot=0x11943,
+ },
+ [0x11944]={
+ category="po",
+ description="DIVES AKURU DOUBLE DANDA",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x11944,
+ },
+ [0x11945]={
+ category="po",
+ description="DIVES AKURU GAP FILLER",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x11945,
+ },
+ [0x11946]={
+ category="po",
+ description="DIVES AKURU END OF TEXT MARK",
+ direction="l",
+ linebreak="ba",
+ unicodeslot=0x11946,
+ },
+ [0x11950]={
+ category="nd",
+ description="DIVES AKURU DIGIT ZERO",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11950,
+ },
+ [0x11951]={
+ category="nd",
+ description="DIVES AKURU DIGIT ONE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11951,
+ },
+ [0x11952]={
+ category="nd",
+ description="DIVES AKURU DIGIT TWO",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11952,
+ },
+ [0x11953]={
+ category="nd",
+ description="DIVES AKURU DIGIT THREE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11953,
+ },
+ [0x11954]={
+ category="nd",
+ description="DIVES AKURU DIGIT FOUR",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11954,
+ },
+ [0x11955]={
+ category="nd",
+ description="DIVES AKURU DIGIT FIVE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11955,
+ },
+ [0x11956]={
+ category="nd",
+ description="DIVES AKURU DIGIT SIX",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11956,
+ },
+ [0x11957]={
+ category="nd",
+ description="DIVES AKURU DIGIT SEVEN",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11957,
+ },
+ [0x11958]={
+ category="nd",
+ description="DIVES AKURU DIGIT EIGHT",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11958,
+ },
+ [0x11959]={
+ category="nd",
+ description="DIVES AKURU DIGIT NINE",
+ direction="l",
+ linebreak="nu",
+ unicodeslot=0x11959,
+ },
[0x119A0]={
category="lo",
description="NANDINAGARI LETTER A",
@@ -170640,6 +172300,13 @@ characters.data={
linebreak="al",
unicodeslot=0x11EF8,
},
+ [0x11FB0]={
+ category="lo",
+ description="LISU LETTER YHA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x11FB0,
+ },
[0x11FC0]={
category="no",
description="TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH",
@@ -198427,6 +200094,32 @@ characters.data={
linebreak="ns",
unicodeslot=0x16FE3,
},
+ [0x16FE4]={
+ category="mn",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT FILLER",
+ direction="nsm",
+ linebreak="gl",
+ unicodeslot=0x16FE4,
+ },
+ [0x16FF0]={
+ category="mc",
+ cjkwd="w",
+ combining=0x6,
+ description="VIETNAMESE ALTERNATE READING MARK CA",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x16FF0,
+ },
+ [0x16FF1]={
+ category="mc",
+ cjkwd="w",
+ combining=0x6,
+ description="VIETNAMESE ALTERNATE READING MARK NHAY",
+ direction="l",
+ linebreak="cm",
+ unicodeslot=0x16FF1,
+ },
[0x18800]={
category="lo",
cjkwd="w",
@@ -204467,6 +206160,3870 @@ characters.data={
linebreak="id",
unicodeslot=0x18AF2,
},
+ [0x18AF3]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-756",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AF3,
+ },
+ [0x18AF4]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-757",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AF4,
+ },
+ [0x18AF5]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-758",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AF5,
+ },
+ [0x18AF6]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-759",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AF6,
+ },
+ [0x18AF7]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-760",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AF7,
+ },
+ [0x18AF8]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-761",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AF8,
+ },
+ [0x18AF9]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-762",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AF9,
+ },
+ [0x18AFA]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-763",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AFA,
+ },
+ [0x18AFB]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-764",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AFB,
+ },
+ [0x18AFC]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-765",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AFC,
+ },
+ [0x18AFD]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-766",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AFD,
+ },
+ [0x18AFE]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-767",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AFE,
+ },
+ [0x18AFF]={
+ category="lo",
+ cjkwd="w",
+ description="TANGUT COMPONENT-768",
+ direction="l",
+ linebreak="id",
+ unicodeslot=0x18AFF,
+ },
+ [0x18B00]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B00",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B00,
+ },
+ [0x18B01]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B01",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B01,
+ },
+ [0x18B02]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B02",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B02,
+ },
+ [0x18B03]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B03",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B03,
+ },
+ [0x18B04]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B04",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B04,
+ },
+ [0x18B05]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B05",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B05,
+ },
+ [0x18B06]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B06",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B06,
+ },
+ [0x18B07]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B07",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B07,
+ },
+ [0x18B08]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B08",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B08,
+ },
+ [0x18B09]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B09",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B09,
+ },
+ [0x18B0A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B0A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B0A,
+ },
+ [0x18B0B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B0B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B0B,
+ },
+ [0x18B0C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B0C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B0C,
+ },
+ [0x18B0D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B0D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B0D,
+ },
+ [0x18B0E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B0E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B0E,
+ },
+ [0x18B0F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B0F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B0F,
+ },
+ [0x18B10]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B10",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B10,
+ },
+ [0x18B11]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B11",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B11,
+ },
+ [0x18B12]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B12",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B12,
+ },
+ [0x18B13]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B13",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B13,
+ },
+ [0x18B14]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B14",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B14,
+ },
+ [0x18B15]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B15",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B15,
+ },
+ [0x18B16]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B16",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B16,
+ },
+ [0x18B17]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B17",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B17,
+ },
+ [0x18B18]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B18",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B18,
+ },
+ [0x18B19]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B19",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B19,
+ },
+ [0x18B1A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B1A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B1A,
+ },
+ [0x18B1B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B1B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B1B,
+ },
+ [0x18B1C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B1C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B1C,
+ },
+ [0x18B1D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B1D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B1D,
+ },
+ [0x18B1E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B1E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B1E,
+ },
+ [0x18B1F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B1F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B1F,
+ },
+ [0x18B20]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B20",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B20,
+ },
+ [0x18B21]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B21",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B21,
+ },
+ [0x18B22]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B22",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B22,
+ },
+ [0x18B23]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B23",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B23,
+ },
+ [0x18B24]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B24",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B24,
+ },
+ [0x18B25]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B25",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B25,
+ },
+ [0x18B26]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B26",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B26,
+ },
+ [0x18B27]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B27",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B27,
+ },
+ [0x18B28]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B28",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B28,
+ },
+ [0x18B29]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B29",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B29,
+ },
+ [0x18B2A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B2A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B2A,
+ },
+ [0x18B2B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B2B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B2B,
+ },
+ [0x18B2C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B2C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B2C,
+ },
+ [0x18B2D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B2D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B2D,
+ },
+ [0x18B2E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B2E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B2E,
+ },
+ [0x18B2F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B2F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B2F,
+ },
+ [0x18B30]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B30",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B30,
+ },
+ [0x18B31]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B31",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B31,
+ },
+ [0x18B32]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B32",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B32,
+ },
+ [0x18B33]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B33",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B33,
+ },
+ [0x18B34]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B34",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B34,
+ },
+ [0x18B35]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B35",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B35,
+ },
+ [0x18B36]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B36",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B36,
+ },
+ [0x18B37]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B37",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B37,
+ },
+ [0x18B38]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B38",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B38,
+ },
+ [0x18B39]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B39",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B39,
+ },
+ [0x18B3A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B3A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B3A,
+ },
+ [0x18B3B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B3B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B3B,
+ },
+ [0x18B3C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B3C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B3C,
+ },
+ [0x18B3D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B3D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B3D,
+ },
+ [0x18B3E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B3E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B3E,
+ },
+ [0x18B3F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B3F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B3F,
+ },
+ [0x18B40]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B40",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B40,
+ },
+ [0x18B41]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B41",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B41,
+ },
+ [0x18B42]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B42",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B42,
+ },
+ [0x18B43]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B43",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B43,
+ },
+ [0x18B44]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B44",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B44,
+ },
+ [0x18B45]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B45",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B45,
+ },
+ [0x18B46]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B46",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B46,
+ },
+ [0x18B47]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B47",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B47,
+ },
+ [0x18B48]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B48",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B48,
+ },
+ [0x18B49]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B49",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B49,
+ },
+ [0x18B4A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B4A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B4A,
+ },
+ [0x18B4B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B4B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B4B,
+ },
+ [0x18B4C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B4C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B4C,
+ },
+ [0x18B4D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B4D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B4D,
+ },
+ [0x18B4E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B4E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B4E,
+ },
+ [0x18B4F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B4F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B4F,
+ },
+ [0x18B50]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B50",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B50,
+ },
+ [0x18B51]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B51",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B51,
+ },
+ [0x18B52]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B52",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B52,
+ },
+ [0x18B53]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B53",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B53,
+ },
+ [0x18B54]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B54",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B54,
+ },
+ [0x18B55]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B55",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B55,
+ },
+ [0x18B56]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B56",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B56,
+ },
+ [0x18B57]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B57",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B57,
+ },
+ [0x18B58]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B58",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B58,
+ },
+ [0x18B59]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B59",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B59,
+ },
+ [0x18B5A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B5A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B5A,
+ },
+ [0x18B5B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B5B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B5B,
+ },
+ [0x18B5C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B5C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B5C,
+ },
+ [0x18B5D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B5D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B5D,
+ },
+ [0x18B5E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B5E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B5E,
+ },
+ [0x18B5F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B5F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B5F,
+ },
+ [0x18B60]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B60",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B60,
+ },
+ [0x18B61]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B61",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B61,
+ },
+ [0x18B62]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B62",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B62,
+ },
+ [0x18B63]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B63",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B63,
+ },
+ [0x18B64]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B64",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B64,
+ },
+ [0x18B65]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B65",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B65,
+ },
+ [0x18B66]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B66",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B66,
+ },
+ [0x18B67]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B67",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B67,
+ },
+ [0x18B68]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B68",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B68,
+ },
+ [0x18B69]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B69",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B69,
+ },
+ [0x18B6A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B6A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B6A,
+ },
+ [0x18B6B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B6B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B6B,
+ },
+ [0x18B6C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B6C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B6C,
+ },
+ [0x18B6D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B6D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B6D,
+ },
+ [0x18B6E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B6E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B6E,
+ },
+ [0x18B6F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B6F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B6F,
+ },
+ [0x18B70]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B70",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B70,
+ },
+ [0x18B71]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B71",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B71,
+ },
+ [0x18B72]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B72",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B72,
+ },
+ [0x18B73]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B73",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B73,
+ },
+ [0x18B74]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B74",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B74,
+ },
+ [0x18B75]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B75",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B75,
+ },
+ [0x18B76]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B76",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B76,
+ },
+ [0x18B77]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B77",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B77,
+ },
+ [0x18B78]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B78",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B78,
+ },
+ [0x18B79]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B79",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B79,
+ },
+ [0x18B7A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B7A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B7A,
+ },
+ [0x18B7B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B7B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B7B,
+ },
+ [0x18B7C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B7C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B7C,
+ },
+ [0x18B7D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B7D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B7D,
+ },
+ [0x18B7E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B7E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B7E,
+ },
+ [0x18B7F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B7F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B7F,
+ },
+ [0x18B80]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B80",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B80,
+ },
+ [0x18B81]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B81",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B81,
+ },
+ [0x18B82]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B82",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B82,
+ },
+ [0x18B83]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B83",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B83,
+ },
+ [0x18B84]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B84",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B84,
+ },
+ [0x18B85]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B85",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B85,
+ },
+ [0x18B86]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B86",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B86,
+ },
+ [0x18B87]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B87",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B87,
+ },
+ [0x18B88]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B88",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B88,
+ },
+ [0x18B89]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B89",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B89,
+ },
+ [0x18B8A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B8A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B8A,
+ },
+ [0x18B8B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B8B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B8B,
+ },
+ [0x18B8C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B8C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B8C,
+ },
+ [0x18B8D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B8D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B8D,
+ },
+ [0x18B8E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B8E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B8E,
+ },
+ [0x18B8F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B8F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B8F,
+ },
+ [0x18B90]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B90",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B90,
+ },
+ [0x18B91]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B91",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B91,
+ },
+ [0x18B92]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B92",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B92,
+ },
+ [0x18B93]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B93",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B93,
+ },
+ [0x18B94]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B94",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B94,
+ },
+ [0x18B95]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B95",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B95,
+ },
+ [0x18B96]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B96",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B96,
+ },
+ [0x18B97]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B97",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B97,
+ },
+ [0x18B98]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B98",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B98,
+ },
+ [0x18B99]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B99",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B99,
+ },
+ [0x18B9A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B9A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B9A,
+ },
+ [0x18B9B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B9B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B9B,
+ },
+ [0x18B9C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B9C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B9C,
+ },
+ [0x18B9D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B9D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B9D,
+ },
+ [0x18B9E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B9E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B9E,
+ },
+ [0x18B9F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18B9F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18B9F,
+ },
+ [0x18BA0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA0,
+ },
+ [0x18BA1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA1,
+ },
+ [0x18BA2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA2,
+ },
+ [0x18BA3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA3,
+ },
+ [0x18BA4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA4,
+ },
+ [0x18BA5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA5,
+ },
+ [0x18BA6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA6,
+ },
+ [0x18BA7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA7,
+ },
+ [0x18BA8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA8,
+ },
+ [0x18BA9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BA9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BA9,
+ },
+ [0x18BAA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BAA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BAA,
+ },
+ [0x18BAB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BAB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BAB,
+ },
+ [0x18BAC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BAC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BAC,
+ },
+ [0x18BAD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BAD,
+ },
+ [0x18BAE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BAE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BAE,
+ },
+ [0x18BAF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BAF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BAF,
+ },
+ [0x18BB0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB0,
+ },
+ [0x18BB1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB1,
+ },
+ [0x18BB2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB2,
+ },
+ [0x18BB3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB3,
+ },
+ [0x18BB4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB4,
+ },
+ [0x18BB5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB5,
+ },
+ [0x18BB6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB6,
+ },
+ [0x18BB7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB7,
+ },
+ [0x18BB8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB8,
+ },
+ [0x18BB9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BB9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BB9,
+ },
+ [0x18BBA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BBA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BBA,
+ },
+ [0x18BBB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BBB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BBB,
+ },
+ [0x18BBC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BBC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BBC,
+ },
+ [0x18BBD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BBD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BBD,
+ },
+ [0x18BBE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BBE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BBE,
+ },
+ [0x18BBF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BBF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BBF,
+ },
+ [0x18BC0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC0,
+ },
+ [0x18BC1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC1,
+ },
+ [0x18BC2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC2,
+ },
+ [0x18BC3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC3,
+ },
+ [0x18BC4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC4,
+ },
+ [0x18BC5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC5,
+ },
+ [0x18BC6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC6,
+ },
+ [0x18BC7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC7,
+ },
+ [0x18BC8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC8,
+ },
+ [0x18BC9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BC9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BC9,
+ },
+ [0x18BCA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BCA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BCA,
+ },
+ [0x18BCB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BCB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BCB,
+ },
+ [0x18BCC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BCC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BCC,
+ },
+ [0x18BCD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BCD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BCD,
+ },
+ [0x18BCE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BCE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BCE,
+ },
+ [0x18BCF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BCF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BCF,
+ },
+ [0x18BD0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD0,
+ },
+ [0x18BD1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD1,
+ },
+ [0x18BD2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD2,
+ },
+ [0x18BD3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD3,
+ },
+ [0x18BD4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD4,
+ },
+ [0x18BD5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD5,
+ },
+ [0x18BD6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD6,
+ },
+ [0x18BD7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD7,
+ },
+ [0x18BD8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD8,
+ },
+ [0x18BD9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BD9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BD9,
+ },
+ [0x18BDA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BDA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BDA,
+ },
+ [0x18BDB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BDB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BDB,
+ },
+ [0x18BDC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BDC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BDC,
+ },
+ [0x18BDD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BDD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BDD,
+ },
+ [0x18BDE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BDE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BDE,
+ },
+ [0x18BDF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BDF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BDF,
+ },
+ [0x18BE0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE0,
+ },
+ [0x18BE1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE1,
+ },
+ [0x18BE2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE2,
+ },
+ [0x18BE3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE3,
+ },
+ [0x18BE4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE4,
+ },
+ [0x18BE5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE5,
+ },
+ [0x18BE6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE6,
+ },
+ [0x18BE7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE7,
+ },
+ [0x18BE8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE8,
+ },
+ [0x18BE9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BE9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BE9,
+ },
+ [0x18BEA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BEA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BEA,
+ },
+ [0x18BEB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BEB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BEB,
+ },
+ [0x18BEC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BEC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BEC,
+ },
+ [0x18BED]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BED",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BED,
+ },
+ [0x18BEE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BEE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BEE,
+ },
+ [0x18BEF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BEF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BEF,
+ },
+ [0x18BF0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF0,
+ },
+ [0x18BF1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF1,
+ },
+ [0x18BF2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF2,
+ },
+ [0x18BF3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF3,
+ },
+ [0x18BF4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF4,
+ },
+ [0x18BF5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF5,
+ },
+ [0x18BF6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF6,
+ },
+ [0x18BF7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF7,
+ },
+ [0x18BF8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF8,
+ },
+ [0x18BF9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BF9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BF9,
+ },
+ [0x18BFA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BFA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BFA,
+ },
+ [0x18BFB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BFB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BFB,
+ },
+ [0x18BFC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BFC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BFC,
+ },
+ [0x18BFD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BFD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BFD,
+ },
+ [0x18BFE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BFE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BFE,
+ },
+ [0x18BFF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18BFF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18BFF,
+ },
+ [0x18C00]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C00",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C00,
+ },
+ [0x18C01]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C01",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C01,
+ },
+ [0x18C02]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C02",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C02,
+ },
+ [0x18C03]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C03",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C03,
+ },
+ [0x18C04]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C04",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C04,
+ },
+ [0x18C05]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C05",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C05,
+ },
+ [0x18C06]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C06",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C06,
+ },
+ [0x18C07]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C07",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C07,
+ },
+ [0x18C08]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C08",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C08,
+ },
+ [0x18C09]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C09",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C09,
+ },
+ [0x18C0A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C0A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C0A,
+ },
+ [0x18C0B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C0B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C0B,
+ },
+ [0x18C0C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C0C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C0C,
+ },
+ [0x18C0D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C0D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C0D,
+ },
+ [0x18C0E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C0E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C0E,
+ },
+ [0x18C0F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C0F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C0F,
+ },
+ [0x18C10]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C10",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C10,
+ },
+ [0x18C11]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C11",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C11,
+ },
+ [0x18C12]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C12",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C12,
+ },
+ [0x18C13]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C13",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C13,
+ },
+ [0x18C14]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C14",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C14,
+ },
+ [0x18C15]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C15",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C15,
+ },
+ [0x18C16]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C16",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C16,
+ },
+ [0x18C17]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C17",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C17,
+ },
+ [0x18C18]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C18",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C18,
+ },
+ [0x18C19]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C19",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C19,
+ },
+ [0x18C1A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C1A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C1A,
+ },
+ [0x18C1B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C1B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C1B,
+ },
+ [0x18C1C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C1C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C1C,
+ },
+ [0x18C1D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C1D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C1D,
+ },
+ [0x18C1E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C1E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C1E,
+ },
+ [0x18C1F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C1F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C1F,
+ },
+ [0x18C20]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C20",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C20,
+ },
+ [0x18C21]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C21",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C21,
+ },
+ [0x18C22]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C22",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C22,
+ },
+ [0x18C23]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C23",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C23,
+ },
+ [0x18C24]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C24",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C24,
+ },
+ [0x18C25]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C25",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C25,
+ },
+ [0x18C26]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C26",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C26,
+ },
+ [0x18C27]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C27",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C27,
+ },
+ [0x18C28]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C28",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C28,
+ },
+ [0x18C29]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C29",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C29,
+ },
+ [0x18C2A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C2A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C2A,
+ },
+ [0x18C2B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C2B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C2B,
+ },
+ [0x18C2C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C2C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C2C,
+ },
+ [0x18C2D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C2D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C2D,
+ },
+ [0x18C2E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C2E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C2E,
+ },
+ [0x18C2F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C2F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C2F,
+ },
+ [0x18C30]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C30",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C30,
+ },
+ [0x18C31]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C31",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C31,
+ },
+ [0x18C32]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C32",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C32,
+ },
+ [0x18C33]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C33",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C33,
+ },
+ [0x18C34]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C34",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C34,
+ },
+ [0x18C35]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C35",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C35,
+ },
+ [0x18C36]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C36",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C36,
+ },
+ [0x18C37]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C37",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C37,
+ },
+ [0x18C38]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C38",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C38,
+ },
+ [0x18C39]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C39",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C39,
+ },
+ [0x18C3A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C3A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C3A,
+ },
+ [0x18C3B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C3B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C3B,
+ },
+ [0x18C3C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C3C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C3C,
+ },
+ [0x18C3D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C3D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C3D,
+ },
+ [0x18C3E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C3E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C3E,
+ },
+ [0x18C3F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C3F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C3F,
+ },
+ [0x18C40]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C40",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C40,
+ },
+ [0x18C41]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C41",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C41,
+ },
+ [0x18C42]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C42",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C42,
+ },
+ [0x18C43]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C43",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C43,
+ },
+ [0x18C44]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C44",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C44,
+ },
+ [0x18C45]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C45",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C45,
+ },
+ [0x18C46]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C46",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C46,
+ },
+ [0x18C47]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C47",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C47,
+ },
+ [0x18C48]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C48",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C48,
+ },
+ [0x18C49]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C49",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C49,
+ },
+ [0x18C4A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C4A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C4A,
+ },
+ [0x18C4B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C4B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C4B,
+ },
+ [0x18C4C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C4C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C4C,
+ },
+ [0x18C4D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C4D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C4D,
+ },
+ [0x18C4E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C4E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C4E,
+ },
+ [0x18C4F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C4F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C4F,
+ },
+ [0x18C50]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C50",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C50,
+ },
+ [0x18C51]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C51",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C51,
+ },
+ [0x18C52]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C52",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C52,
+ },
+ [0x18C53]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C53",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C53,
+ },
+ [0x18C54]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C54",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C54,
+ },
+ [0x18C55]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C55",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C55,
+ },
+ [0x18C56]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C56",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C56,
+ },
+ [0x18C57]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C57",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C57,
+ },
+ [0x18C58]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C58",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C58,
+ },
+ [0x18C59]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C59",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C59,
+ },
+ [0x18C5A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C5A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C5A,
+ },
+ [0x18C5B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C5B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C5B,
+ },
+ [0x18C5C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C5C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C5C,
+ },
+ [0x18C5D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C5D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C5D,
+ },
+ [0x18C5E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C5E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C5E,
+ },
+ [0x18C5F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C5F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C5F,
+ },
+ [0x18C60]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C60",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C60,
+ },
+ [0x18C61]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C61",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C61,
+ },
+ [0x18C62]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C62",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C62,
+ },
+ [0x18C63]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C63",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C63,
+ },
+ [0x18C64]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C64",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C64,
+ },
+ [0x18C65]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C65",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C65,
+ },
+ [0x18C66]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C66",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C66,
+ },
+ [0x18C67]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C67",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C67,
+ },
+ [0x18C68]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C68",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C68,
+ },
+ [0x18C69]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C69",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C69,
+ },
+ [0x18C6A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C6A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C6A,
+ },
+ [0x18C6B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C6B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C6B,
+ },
+ [0x18C6C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C6C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C6C,
+ },
+ [0x18C6D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C6D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C6D,
+ },
+ [0x18C6E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C6E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C6E,
+ },
+ [0x18C6F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C6F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C6F,
+ },
+ [0x18C70]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C70",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C70,
+ },
+ [0x18C71]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C71",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C71,
+ },
+ [0x18C72]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C72",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C72,
+ },
+ [0x18C73]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C73",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C73,
+ },
+ [0x18C74]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C74",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C74,
+ },
+ [0x18C75]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C75",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C75,
+ },
+ [0x18C76]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C76",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C76,
+ },
+ [0x18C77]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C77",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C77,
+ },
+ [0x18C78]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C78",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C78,
+ },
+ [0x18C79]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C79",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C79,
+ },
+ [0x18C7A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C7A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C7A,
+ },
+ [0x18C7B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C7B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C7B,
+ },
+ [0x18C7C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C7C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C7C,
+ },
+ [0x18C7D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C7D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C7D,
+ },
+ [0x18C7E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C7E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C7E,
+ },
+ [0x18C7F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C7F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C7F,
+ },
+ [0x18C80]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C80",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C80,
+ },
+ [0x18C81]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C81",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C81,
+ },
+ [0x18C82]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C82",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C82,
+ },
+ [0x18C83]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C83",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C83,
+ },
+ [0x18C84]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C84",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C84,
+ },
+ [0x18C85]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C85",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C85,
+ },
+ [0x18C86]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C86",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C86,
+ },
+ [0x18C87]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C87",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C87,
+ },
+ [0x18C88]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C88",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C88,
+ },
+ [0x18C89]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C89",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C89,
+ },
+ [0x18C8A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C8A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C8A,
+ },
+ [0x18C8B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C8B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C8B,
+ },
+ [0x18C8C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C8C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C8C,
+ },
+ [0x18C8D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C8D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C8D,
+ },
+ [0x18C8E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C8E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C8E,
+ },
+ [0x18C8F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C8F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C8F,
+ },
+ [0x18C90]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C90",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C90,
+ },
+ [0x18C91]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C91",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C91,
+ },
+ [0x18C92]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C92",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C92,
+ },
+ [0x18C93]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C93",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C93,
+ },
+ [0x18C94]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C94",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C94,
+ },
+ [0x18C95]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C95",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C95,
+ },
+ [0x18C96]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C96",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C96,
+ },
+ [0x18C97]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C97",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C97,
+ },
+ [0x18C98]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C98",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C98,
+ },
+ [0x18C99]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C99",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C99,
+ },
+ [0x18C9A]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C9A",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C9A,
+ },
+ [0x18C9B]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C9B",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C9B,
+ },
+ [0x18C9C]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C9C",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C9C,
+ },
+ [0x18C9D]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C9D",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C9D,
+ },
+ [0x18C9E]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C9E",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C9E,
+ },
+ [0x18C9F]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18C9F",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18C9F,
+ },
+ [0x18CA0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA0,
+ },
+ [0x18CA1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA1,
+ },
+ [0x18CA2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA2,
+ },
+ [0x18CA3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA3,
+ },
+ [0x18CA4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA4,
+ },
+ [0x18CA5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA5,
+ },
+ [0x18CA6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA6,
+ },
+ [0x18CA7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA7,
+ },
+ [0x18CA8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA8,
+ },
+ [0x18CA9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CA9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CA9,
+ },
+ [0x18CAA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CAA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CAA,
+ },
+ [0x18CAB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CAB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CAB,
+ },
+ [0x18CAC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CAC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CAC,
+ },
+ [0x18CAD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CAD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CAD,
+ },
+ [0x18CAE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CAE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CAE,
+ },
+ [0x18CAF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CAF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CAF,
+ },
+ [0x18CB0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB0,
+ },
+ [0x18CB1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB1,
+ },
+ [0x18CB2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB2,
+ },
+ [0x18CB3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB3,
+ },
+ [0x18CB4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB4,
+ },
+ [0x18CB5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB5,
+ },
+ [0x18CB6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB6,
+ },
+ [0x18CB7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB7,
+ },
+ [0x18CB8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB8,
+ },
+ [0x18CB9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CB9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CB9,
+ },
+ [0x18CBA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CBA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CBA,
+ },
+ [0x18CBB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CBB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CBB,
+ },
+ [0x18CBC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CBC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CBC,
+ },
+ [0x18CBD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CBD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CBD,
+ },
+ [0x18CBE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CBE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CBE,
+ },
+ [0x18CBF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CBF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CBF,
+ },
+ [0x18CC0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC0,
+ },
+ [0x18CC1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC1,
+ },
+ [0x18CC2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC2,
+ },
+ [0x18CC3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC3,
+ },
+ [0x18CC4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC4,
+ },
+ [0x18CC5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC5,
+ },
+ [0x18CC6]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC6",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC6,
+ },
+ [0x18CC7]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC7",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC7,
+ },
+ [0x18CC8]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC8",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC8,
+ },
+ [0x18CC9]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CC9",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CC9,
+ },
+ [0x18CCA]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CCA",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CCA,
+ },
+ [0x18CCB]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CCB",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CCB,
+ },
+ [0x18CCC]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CCC",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CCC,
+ },
+ [0x18CCD]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CCD",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CCD,
+ },
+ [0x18CCE]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CCE",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CCE,
+ },
+ [0x18CCF]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CCF",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CCF,
+ },
+ [0x18CD0]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CD0",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CD0,
+ },
+ [0x18CD1]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CD1",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CD1,
+ },
+ [0x18CD2]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CD2",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CD2,
+ },
+ [0x18CD3]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CD3",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CD3,
+ },
+ [0x18CD4]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CD4",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CD4,
+ },
+ [0x18CD5]={
+ category="lo",
+ cjkwd="w",
+ description="KHITAN SMALL SCRIPT CHARACTER-18CD5",
+ direction="l",
+ linebreak="al",
+ unicodeslot=0x18CD5,
+ },
[0x1B000]={
category="lo",
cjkwd="w",
@@ -236575,6 +242132,27 @@ characters.data={
linebreak="ai",
unicodeslot=0x1F10C,
},
+ [0x1F10D]={
+ category="so",
+ description="CIRCLED ZERO WITH SLASH",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F10D,
+ },
+ [0x1F10E]={
+ category="so",
+ description="CIRCLED ANTICLOCKWISE ARROW",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F10E,
+ },
+ [0x1F10F]={
+ category="so",
+ description="CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F10F,
+ },
[0x1F110]={
category="so",
cjkwd="a",
@@ -237382,6 +242960,27 @@ characters.data={
specials={ "super", 0x4D, 0x52 },
unicodeslot=0x1F16C,
},
+ [0x1F16D]={
+ category="so",
+ description="CIRCLED CC",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F16D,
+ },
+ [0x1F16E]={
+ category="so",
+ description="CIRCLED C WITH OVERLAID BACKSLASH",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F16E,
+ },
+ [0x1F16F]={
+ category="so",
+ description="CIRCLED HUMAN FIGURE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F16F,
+ },
[0x1F170]={
category="so",
cjkwd="a",
@@ -237875,6 +243474,13 @@ characters.data={
linebreak="ai",
unicodeslot=0x1F1AC,
},
+ [0x1F1AD]={
+ category="so",
+ description="MASK WORK SYMBOL",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F1AD,
+ },
[0x1F1E6]={
category="so",
description="REGIONAL INDICATOR SYMBOL LETTER A",
@@ -246328,6 +251934,22 @@ characters.data={
linebreak="id",
unicodeslot=0x1F6D5,
},
+ [0x1F6D6]={
+ category="so",
+ cjkwd="w",
+ description="HUT",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F6D6,
+ },
+ [0x1F6D7]={
+ category="so",
+ cjkwd="w",
+ description="ELEVATOR",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F6D7,
+ },
[0x1F6E0]={
category="so",
description="HAMMER AND WRENCH",
@@ -246514,6 +252136,22 @@ characters.data={
linebreak="id",
unicodeslot=0x1F6FA,
},
+ [0x1F6FB]={
+ category="so",
+ cjkwd="w",
+ description="PICKUP TRUCK",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F6FB,
+ },
+ [0x1F6FC]={
+ category="so",
+ cjkwd="w",
+ description="ROLLER SKATE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F6FC,
+ },
[0x1F700]={
category="so",
description="ALCHEMICAL SYMBOL FOR QUINTESSENCE",
@@ -249082,6 +254720,20 @@ characters.data={
linebreak="al",
unicodeslot=0x1F8AD,
},
+ [0x1F8B0]={
+ category="so",
+ description="ARROW POINTING UPWARDS THEN NORTH WEST",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F8B0,
+ },
+ [0x1F8B1]={
+ category="so",
+ description="ARROW POINTING RIGHTWARDS THEN CURVING SOUTH WEST",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F8B1,
+ },
[0x1F900]={
category="so",
description="CIRCLED CROSS FORMEE WITH FOUR DOTS",
@@ -249166,6 +254818,14 @@ characters.data={
linebreak="al",
unicodeslot=0x1F90B,
},
+ [0x1F90C]={
+ category="so",
+ cjkwd="w",
+ description="PINCHED FINGERS",
+ direction="on",
+ linebreak="eb",
+ unicodeslot=0x1F90C,
+ },
[0x1F90D]={
category="so",
cjkwd="w",
@@ -249539,7 +255199,6 @@ characters.data={
},
[0x1F93B]={
category="so",
- cjkwd="w",
description="MODERN PENTATHLON",
direction="on",
linebreak="id",
@@ -249627,7 +255286,6 @@ characters.data={
},
[0x1F946]={
category="so",
- cjkwd="w",
description="RIFLE",
direction="on",
linebreak="id",
@@ -249981,6 +255639,14 @@ characters.data={
linebreak="id",
unicodeslot=0x1F971,
},
+ [0x1F972]={
+ category="so",
+ cjkwd="w",
+ description="SMILING FACE WITH TEAR",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F972,
+ },
[0x1F973]={
category="so",
cjkwd="w",
@@ -250013,6 +255679,23 @@ characters.data={
linebreak="id",
unicodeslot=0x1F976,
},
+ [0x1F977]={
+ category="so",
+ cjkwd="w",
+ description="NINJA",
+ direction="on",
+ linebreak="eb",
+ unicodeslot=0x1F977,
+ },
+ [0x1F978]={
+ category="so",
+ cjkwd="w",
+ description="DISGUISED FACE",
+ direction="on",
+ linebreak="id",
+ synonyms={ "face with groucho glasses" },
+ unicodeslot=0x1F978,
+ },
[0x1F97A]={
category="so",
cjkwd="w",
@@ -250342,6 +256025,22 @@ characters.data={
linebreak="id",
unicodeslot=0x1F9A2,
},
+ [0x1F9A3]={
+ category="so",
+ cjkwd="w",
+ description="MAMMOTH",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F9A3,
+ },
+ [0x1F9A4]={
+ category="so",
+ cjkwd="w",
+ description="DODO",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F9A4,
+ },
[0x1F9A5]={
category="so",
cjkwd="w",
@@ -250390,6 +256089,30 @@ characters.data={
linebreak="id",
unicodeslot=0x1F9AA,
},
+ [0x1F9AB]={
+ category="so",
+ cjkwd="w",
+ description="BEAVER",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F9AB,
+ },
+ [0x1F9AC]={
+ category="so",
+ cjkwd="w",
+ description="BISON",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F9AC,
+ },
+ [0x1F9AD]={
+ category="so",
+ cjkwd="w",
+ description="SEAL",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F9AD,
+ },
[0x1F9AE]={
category="so",
cjkwd="w",
@@ -250622,6 +256345,14 @@ characters.data={
linebreak="id",
unicodeslot=0x1F9CA,
},
+ [0x1F9CB]={
+ category="so",
+ cjkwd="w",
+ description="BUBBLE TEA",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1F9CB,
+ },
[0x1F9CD]={
category="so",
cjkwd="w",
@@ -251748,6 +257479,14 @@ characters.data={
linebreak="id",
unicodeslot=0x1FA73,
},
+ [0x1FA74]={
+ category="so",
+ cjkwd="w",
+ description="THONG SANDAL",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA74,
+ },
[0x1FA78]={
category="so",
cjkwd="w",
@@ -251796,6 +257535,38 @@ characters.data={
linebreak="id",
unicodeslot=0x1FA82,
},
+ [0x1FA83]={
+ category="so",
+ cjkwd="w",
+ description="BOOMERANG",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA83,
+ },
+ [0x1FA84]={
+ category="so",
+ cjkwd="w",
+ description="MAGIC WAND",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA84,
+ },
+ [0x1FA85]={
+ category="so",
+ cjkwd="w",
+ description="PINATA",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA85,
+ },
+ [0x1FA86]={
+ category="so",
+ cjkwd="w",
+ description="NESTING DOLLS",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA86,
+ },
[0x1FA90]={
category="so",
cjkwd="w",
@@ -251844,6 +257615,1788 @@ characters.data={
linebreak="id",
unicodeslot=0x1FA95,
},
+ [0x1FA96]={
+ category="so",
+ cjkwd="w",
+ description="MILITARY HELMET",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA96,
+ },
+ [0x1FA97]={
+ category="so",
+ cjkwd="w",
+ description="ACCORDION",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA97,
+ },
+ [0x1FA98]={
+ category="so",
+ cjkwd="w",
+ description="LONG DRUM",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA98,
+ },
+ [0x1FA99]={
+ category="so",
+ cjkwd="w",
+ description="COIN",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA99,
+ },
+ [0x1FA9A]={
+ category="so",
+ cjkwd="w",
+ description="CARPENTRY SAW",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA9A,
+ },
+ [0x1FA9B]={
+ category="so",
+ cjkwd="w",
+ description="SCREWDRIVER",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA9B,
+ },
+ [0x1FA9C]={
+ category="so",
+ cjkwd="w",
+ description="LADDER",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA9C,
+ },
+ [0x1FA9D]={
+ category="so",
+ cjkwd="w",
+ description="HOOK",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA9D,
+ },
+ [0x1FA9E]={
+ category="so",
+ cjkwd="w",
+ description="MIRROR",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA9E,
+ },
+ [0x1FA9F]={
+ category="so",
+ cjkwd="w",
+ description="WINDOW",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FA9F,
+ },
+ [0x1FAA0]={
+ category="so",
+ cjkwd="w",
+ description="PLUNGER",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA0,
+ },
+ [0x1FAA1]={
+ category="so",
+ cjkwd="w",
+ description="SEWING NEEDLE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA1,
+ },
+ [0x1FAA2]={
+ category="so",
+ cjkwd="w",
+ description="KNOT",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA2,
+ },
+ [0x1FAA3]={
+ category="so",
+ cjkwd="w",
+ description="BUCKET",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA3,
+ },
+ [0x1FAA4]={
+ category="so",
+ cjkwd="w",
+ description="MOUSE TRAP",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA4,
+ },
+ [0x1FAA5]={
+ category="so",
+ cjkwd="w",
+ description="TOOTHBRUSH",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA5,
+ },
+ [0x1FAA6]={
+ category="so",
+ cjkwd="w",
+ description="HEADSTONE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA6,
+ },
+ [0x1FAA7]={
+ category="so",
+ cjkwd="w",
+ description="PLACARD",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA7,
+ },
+ [0x1FAA8]={
+ category="so",
+ cjkwd="w",
+ description="ROCK",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAA8,
+ },
+ [0x1FAB0]={
+ category="so",
+ cjkwd="w",
+ description="FLY",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAB0,
+ },
+ [0x1FAB1]={
+ category="so",
+ cjkwd="w",
+ description="WORM",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAB1,
+ },
+ [0x1FAB2]={
+ category="so",
+ cjkwd="w",
+ description="BEETLE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAB2,
+ },
+ [0x1FAB3]={
+ category="so",
+ cjkwd="w",
+ description="COCKROACH",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAB3,
+ },
+ [0x1FAB4]={
+ category="so",
+ cjkwd="w",
+ description="POTTED PLANT",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAB4,
+ },
+ [0x1FAB5]={
+ category="so",
+ cjkwd="w",
+ description="WOOD",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAB5,
+ },
+ [0x1FAB6]={
+ category="so",
+ cjkwd="w",
+ description="FEATHER",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAB6,
+ },
+ [0x1FAC0]={
+ category="so",
+ cjkwd="w",
+ description="ANATOMICAL HEART",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAC0,
+ },
+ [0x1FAC1]={
+ category="so",
+ cjkwd="w",
+ description="LUNGS",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAC1,
+ },
+ [0x1FAC2]={
+ category="so",
+ cjkwd="w",
+ description="PEOPLE HUGGING",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAC2,
+ },
+ [0x1FAD0]={
+ category="so",
+ cjkwd="w",
+ description="BLUEBERRIES",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAD0,
+ },
+ [0x1FAD1]={
+ category="so",
+ cjkwd="w",
+ description="BELL PEPPER",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAD1,
+ },
+ [0x1FAD2]={
+ category="so",
+ cjkwd="w",
+ description="OLIVE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAD2,
+ },
+ [0x1FAD3]={
+ category="so",
+ cjkwd="w",
+ description="FLATBREAD",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAD3,
+ },
+ [0x1FAD4]={
+ category="so",
+ cjkwd="w",
+ description="TAMALE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAD4,
+ },
+ [0x1FAD5]={
+ category="so",
+ cjkwd="w",
+ description="FONDUE",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAD5,
+ },
+ [0x1FAD6]={
+ category="so",
+ cjkwd="w",
+ description="TEAPOT",
+ direction="on",
+ linebreak="id",
+ unicodeslot=0x1FAD6,
+ },
+ [0x1FB00]={
+ category="so",
+ description="BLOCK SEXTANT-1",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB00,
+ },
+ [0x1FB01]={
+ category="so",
+ description="BLOCK SEXTANT-2",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB01,
+ },
+ [0x1FB02]={
+ category="so",
+ description="BLOCK SEXTANT-12",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB02,
+ },
+ [0x1FB03]={
+ category="so",
+ description="BLOCK SEXTANT-3",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB03,
+ },
+ [0x1FB04]={
+ category="so",
+ description="BLOCK SEXTANT-13",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB04,
+ },
+ [0x1FB05]={
+ category="so",
+ description="BLOCK SEXTANT-23",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB05,
+ },
+ [0x1FB06]={
+ category="so",
+ description="BLOCK SEXTANT-123",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB06,
+ },
+ [0x1FB07]={
+ category="so",
+ description="BLOCK SEXTANT-4",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB07,
+ },
+ [0x1FB08]={
+ category="so",
+ description="BLOCK SEXTANT-14",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB08,
+ },
+ [0x1FB09]={
+ category="so",
+ description="BLOCK SEXTANT-24",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB09,
+ },
+ [0x1FB0A]={
+ category="so",
+ description="BLOCK SEXTANT-124",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB0A,
+ },
+ [0x1FB0B]={
+ category="so",
+ description="BLOCK SEXTANT-34",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB0B,
+ },
+ [0x1FB0C]={
+ category="so",
+ description="BLOCK SEXTANT-134",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB0C,
+ },
+ [0x1FB0D]={
+ category="so",
+ description="BLOCK SEXTANT-234",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB0D,
+ },
+ [0x1FB0E]={
+ category="so",
+ description="BLOCK SEXTANT-1234",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB0E,
+ },
+ [0x1FB0F]={
+ category="so",
+ description="BLOCK SEXTANT-5",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB0F,
+ },
+ [0x1FB10]={
+ category="so",
+ description="BLOCK SEXTANT-15",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB10,
+ },
+ [0x1FB11]={
+ category="so",
+ description="BLOCK SEXTANT-25",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB11,
+ },
+ [0x1FB12]={
+ category="so",
+ description="BLOCK SEXTANT-125",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB12,
+ },
+ [0x1FB13]={
+ category="so",
+ description="BLOCK SEXTANT-35",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB13,
+ },
+ [0x1FB14]={
+ category="so",
+ description="BLOCK SEXTANT-235",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB14,
+ },
+ [0x1FB15]={
+ category="so",
+ description="BLOCK SEXTANT-1235",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB15,
+ },
+ [0x1FB16]={
+ category="so",
+ description="BLOCK SEXTANT-45",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB16,
+ },
+ [0x1FB17]={
+ category="so",
+ description="BLOCK SEXTANT-145",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB17,
+ },
+ [0x1FB18]={
+ category="so",
+ description="BLOCK SEXTANT-245",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB18,
+ },
+ [0x1FB19]={
+ category="so",
+ description="BLOCK SEXTANT-1245",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB19,
+ },
+ [0x1FB1A]={
+ category="so",
+ description="BLOCK SEXTANT-345",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB1A,
+ },
+ [0x1FB1B]={
+ category="so",
+ description="BLOCK SEXTANT-1345",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB1B,
+ },
+ [0x1FB1C]={
+ category="so",
+ description="BLOCK SEXTANT-2345",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB1C,
+ },
+ [0x1FB1D]={
+ category="so",
+ description="BLOCK SEXTANT-12345",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB1D,
+ },
+ [0x1FB1E]={
+ category="so",
+ description="BLOCK SEXTANT-6",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB1E,
+ },
+ [0x1FB1F]={
+ category="so",
+ description="BLOCK SEXTANT-16",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB1F,
+ },
+ [0x1FB20]={
+ category="so",
+ description="BLOCK SEXTANT-26",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB20,
+ },
+ [0x1FB21]={
+ category="so",
+ description="BLOCK SEXTANT-126",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB21,
+ },
+ [0x1FB22]={
+ category="so",
+ description="BLOCK SEXTANT-36",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB22,
+ },
+ [0x1FB23]={
+ category="so",
+ description="BLOCK SEXTANT-136",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB23,
+ },
+ [0x1FB24]={
+ category="so",
+ description="BLOCK SEXTANT-236",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB24,
+ },
+ [0x1FB25]={
+ category="so",
+ description="BLOCK SEXTANT-1236",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB25,
+ },
+ [0x1FB26]={
+ category="so",
+ description="BLOCK SEXTANT-46",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB26,
+ },
+ [0x1FB27]={
+ category="so",
+ description="BLOCK SEXTANT-146",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB27,
+ },
+ [0x1FB28]={
+ category="so",
+ description="BLOCK SEXTANT-1246",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB28,
+ },
+ [0x1FB29]={
+ category="so",
+ description="BLOCK SEXTANT-346",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB29,
+ },
+ [0x1FB2A]={
+ category="so",
+ description="BLOCK SEXTANT-1346",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB2A,
+ },
+ [0x1FB2B]={
+ category="so",
+ description="BLOCK SEXTANT-2346",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB2B,
+ },
+ [0x1FB2C]={
+ category="so",
+ description="BLOCK SEXTANT-12346",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB2C,
+ },
+ [0x1FB2D]={
+ category="so",
+ description="BLOCK SEXTANT-56",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB2D,
+ },
+ [0x1FB2E]={
+ category="so",
+ description="BLOCK SEXTANT-156",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB2E,
+ },
+ [0x1FB2F]={
+ category="so",
+ description="BLOCK SEXTANT-256",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB2F,
+ },
+ [0x1FB30]={
+ category="so",
+ description="BLOCK SEXTANT-1256",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB30,
+ },
+ [0x1FB31]={
+ category="so",
+ description="BLOCK SEXTANT-356",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB31,
+ },
+ [0x1FB32]={
+ category="so",
+ description="BLOCK SEXTANT-1356",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB32,
+ },
+ [0x1FB33]={
+ category="so",
+ description="BLOCK SEXTANT-2356",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB33,
+ },
+ [0x1FB34]={
+ category="so",
+ description="BLOCK SEXTANT-12356",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB34,
+ },
+ [0x1FB35]={
+ category="so",
+ description="BLOCK SEXTANT-456",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB35,
+ },
+ [0x1FB36]={
+ category="so",
+ description="BLOCK SEXTANT-1456",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB36,
+ },
+ [0x1FB37]={
+ category="so",
+ description="BLOCK SEXTANT-2456",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB37,
+ },
+ [0x1FB38]={
+ category="so",
+ description="BLOCK SEXTANT-12456",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB38,
+ },
+ [0x1FB39]={
+ category="so",
+ description="BLOCK SEXTANT-3456",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB39,
+ },
+ [0x1FB3A]={
+ category="so",
+ description="BLOCK SEXTANT-13456",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB3A,
+ },
+ [0x1FB3B]={
+ category="so",
+ description="BLOCK SEXTANT-23456",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB3B,
+ },
+ [0x1FB3C]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB3C,
+ },
+ [0x1FB3D]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB3D,
+ },
+ [0x1FB3E]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB3E,
+ },
+ [0x1FB3F]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB3F,
+ },
+ [0x1FB40]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB40,
+ },
+ [0x1FB41]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB41,
+ },
+ [0x1FB42]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB42,
+ },
+ [0x1FB43]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB43,
+ },
+ [0x1FB44]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB44,
+ },
+ [0x1FB45]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO UPPER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB45,
+ },
+ [0x1FB46]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB46,
+ },
+ [0x1FB47]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB47,
+ },
+ [0x1FB48]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB48,
+ },
+ [0x1FB49]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB49,
+ },
+ [0x1FB4A]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER LEFT TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB4A,
+ },
+ [0x1FB4B]={
+ category="so",
+ description="LOWER RIGHT BLOCK DIAGONAL LOWER CENTRE TO UPPER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB4B,
+ },
+ [0x1FB4C]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB4C,
+ },
+ [0x1FB4D]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB4D,
+ },
+ [0x1FB4E]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB4E,
+ },
+ [0x1FB4F]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER LEFT TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB4F,
+ },
+ [0x1FB50]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER CENTRE TO LOWER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB50,
+ },
+ [0x1FB51]={
+ category="so",
+ description="LOWER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB51,
+ },
+ [0x1FB52]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB52,
+ },
+ [0x1FB53]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL LOWER MIDDLE LEFT TO LOWER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB53,
+ },
+ [0x1FB54]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB54,
+ },
+ [0x1FB55]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB55,
+ },
+ [0x1FB56]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB56,
+ },
+ [0x1FB57]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB57,
+ },
+ [0x1FB58]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL UPPER MIDDLE LEFT TO UPPER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB58,
+ },
+ [0x1FB59]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB59,
+ },
+ [0x1FB5A]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB5A,
+ },
+ [0x1FB5B]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO UPPER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB5B,
+ },
+ [0x1FB5C]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER MIDDLE LEFT TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB5C,
+ },
+ [0x1FB5D]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB5D,
+ },
+ [0x1FB5E]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB5E,
+ },
+ [0x1FB5F]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB5F,
+ },
+ [0x1FB60]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER LEFT TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB60,
+ },
+ [0x1FB61]={
+ category="so",
+ description="UPPER LEFT BLOCK DIAGONAL LOWER CENTRE TO UPPER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB61,
+ },
+ [0x1FB62]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB62,
+ },
+ [0x1FB63]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO UPPER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB63,
+ },
+ [0x1FB64]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB64,
+ },
+ [0x1FB65]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER LEFT TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB65,
+ },
+ [0x1FB66]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER CENTRE TO LOWER RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB66,
+ },
+ [0x1FB67]={
+ category="so",
+ description="UPPER RIGHT BLOCK DIAGONAL UPPER MIDDLE LEFT TO LOWER MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB67,
+ },
+ [0x1FB68]={
+ category="so",
+ description="UPPER AND RIGHT AND LOWER TRIANGULAR THREE QUARTERS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB68,
+ },
+ [0x1FB69]={
+ category="so",
+ description="LEFT AND LOWER AND RIGHT TRIANGULAR THREE QUARTERS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB69,
+ },
+ [0x1FB6A]={
+ category="so",
+ description="UPPER AND LEFT AND LOWER TRIANGULAR THREE QUARTERS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB6A,
+ },
+ [0x1FB6B]={
+ category="so",
+ description="LEFT AND UPPER AND RIGHT TRIANGULAR THREE QUARTERS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB6B,
+ },
+ [0x1FB6C]={
+ category="so",
+ description="LEFT TRIANGULAR ONE QUARTER BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB6C,
+ },
+ [0x1FB6D]={
+ category="so",
+ description="UPPER TRIANGULAR ONE QUARTER BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB6D,
+ },
+ [0x1FB6E]={
+ category="so",
+ description="RIGHT TRIANGULAR ONE QUARTER BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB6E,
+ },
+ [0x1FB6F]={
+ category="so",
+ description="LOWER TRIANGULAR ONE QUARTER BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB6F,
+ },
+ [0x1FB70]={
+ category="so",
+ description="VERTICAL ONE EIGHTH BLOCK-2",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB70,
+ },
+ [0x1FB71]={
+ category="so",
+ description="VERTICAL ONE EIGHTH BLOCK-3",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB71,
+ },
+ [0x1FB72]={
+ category="so",
+ description="VERTICAL ONE EIGHTH BLOCK-4",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB72,
+ },
+ [0x1FB73]={
+ category="so",
+ description="VERTICAL ONE EIGHTH BLOCK-5",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB73,
+ },
+ [0x1FB74]={
+ category="so",
+ description="VERTICAL ONE EIGHTH BLOCK-6",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB74,
+ },
+ [0x1FB75]={
+ category="so",
+ description="VERTICAL ONE EIGHTH BLOCK-7",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB75,
+ },
+ [0x1FB76]={
+ category="so",
+ description="HORIZONTAL ONE EIGHTH BLOCK-2",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB76,
+ },
+ [0x1FB77]={
+ category="so",
+ description="HORIZONTAL ONE EIGHTH BLOCK-3",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB77,
+ },
+ [0x1FB78]={
+ category="so",
+ description="HORIZONTAL ONE EIGHTH BLOCK-4",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB78,
+ },
+ [0x1FB79]={
+ category="so",
+ description="HORIZONTAL ONE EIGHTH BLOCK-5",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB79,
+ },
+ [0x1FB7A]={
+ category="so",
+ description="HORIZONTAL ONE EIGHTH BLOCK-6",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB7A,
+ },
+ [0x1FB7B]={
+ category="so",
+ description="HORIZONTAL ONE EIGHTH BLOCK-7",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB7B,
+ },
+ [0x1FB7C]={
+ category="so",
+ description="LEFT AND LOWER ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB7C,
+ },
+ [0x1FB7D]={
+ category="so",
+ description="LEFT AND UPPER ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB7D,
+ },
+ [0x1FB7E]={
+ category="so",
+ description="RIGHT AND UPPER ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB7E,
+ },
+ [0x1FB7F]={
+ category="so",
+ description="RIGHT AND LOWER ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB7F,
+ },
+ [0x1FB80]={
+ category="so",
+ description="UPPER AND LOWER ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB80,
+ },
+ [0x1FB81]={
+ category="so",
+ description="HORIZONTAL ONE EIGHTH BLOCK-1358",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB81,
+ },
+ [0x1FB82]={
+ category="so",
+ description="UPPER ONE QUARTER BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB82,
+ },
+ [0x1FB83]={
+ category="so",
+ description="UPPER THREE EIGHTHS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB83,
+ },
+ [0x1FB84]={
+ category="so",
+ description="UPPER FIVE EIGHTHS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB84,
+ },
+ [0x1FB85]={
+ category="so",
+ description="UPPER THREE QUARTERS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB85,
+ },
+ [0x1FB86]={
+ category="so",
+ description="UPPER SEVEN EIGHTHS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB86,
+ },
+ [0x1FB87]={
+ category="so",
+ description="RIGHT ONE QUARTER BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB87,
+ },
+ [0x1FB88]={
+ category="so",
+ description="RIGHT THREE EIGHTHS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB88,
+ },
+ [0x1FB89]={
+ category="so",
+ description="RIGHT FIVE EIGHTHS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB89,
+ },
+ [0x1FB8A]={
+ category="so",
+ description="RIGHT THREE QUARTERS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB8A,
+ },
+ [0x1FB8B]={
+ category="so",
+ description="RIGHT SEVEN EIGHTHS BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB8B,
+ },
+ [0x1FB8C]={
+ category="so",
+ description="LEFT HALF MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB8C,
+ },
+ [0x1FB8D]={
+ category="so",
+ description="RIGHT HALF MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB8D,
+ },
+ [0x1FB8E]={
+ category="so",
+ description="UPPER HALF MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB8E,
+ },
+ [0x1FB8F]={
+ category="so",
+ description="LOWER HALF MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB8F,
+ },
+ [0x1FB90]={
+ category="so",
+ description="INVERSE MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB90,
+ },
+ [0x1FB91]={
+ category="so",
+ description="UPPER HALF BLOCK AND LOWER HALF INVERSE MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB91,
+ },
+ [0x1FB92]={
+ category="so",
+ description="UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB92,
+ },
+ [0x1FB94]={
+ category="so",
+ description="LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB94,
+ },
+ [0x1FB95]={
+ category="so",
+ description="CHECKER BOARD FILL",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB95,
+ },
+ [0x1FB96]={
+ category="so",
+ description="INVERSE CHECKER BOARD FILL",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB96,
+ },
+ [0x1FB97]={
+ category="so",
+ description="HEAVY HORIZONTAL FILL",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB97,
+ },
+ [0x1FB98]={
+ category="so",
+ description="UPPER LEFT TO LOWER RIGHT FILL",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB98,
+ },
+ [0x1FB99]={
+ category="so",
+ description="UPPER RIGHT TO LOWER LEFT FILL",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB99,
+ },
+ [0x1FB9A]={
+ category="so",
+ description="UPPER AND LOWER TRIANGULAR HALF BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB9A,
+ },
+ [0x1FB9B]={
+ category="so",
+ description="LEFT AND RIGHT TRIANGULAR HALF BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB9B,
+ },
+ [0x1FB9C]={
+ category="so",
+ description="UPPER LEFT TRIANGULAR MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB9C,
+ },
+ [0x1FB9D]={
+ category="so",
+ description="UPPER RIGHT TRIANGULAR MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB9D,
+ },
+ [0x1FB9E]={
+ category="so",
+ description="LOWER RIGHT TRIANGULAR MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB9E,
+ },
+ [0x1FB9F]={
+ category="so",
+ description="LOWER LEFT TRIANGULAR MEDIUM SHADE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FB9F,
+ },
+ [0x1FBA0]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA0,
+ },
+ [0x1FBA1]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA1,
+ },
+ [0x1FBA2]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA2,
+ },
+ [0x1FBA3]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA3,
+ },
+ [0x1FBA4]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA4,
+ },
+ [0x1FBA5]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA5,
+ },
+ [0x1FBA6]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA6,
+ },
+ [0x1FBA7]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA7,
+ },
+ [0x1FBA8]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT AND MIDDLE RIGHT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA8,
+ },
+ [0x1FBA9]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT AND MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBA9,
+ },
+ [0x1FBAA]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE TO MIDDLE LEFT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBAA,
+ },
+ [0x1FBAB]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBAB,
+ },
+ [0x1FBAC]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBAC,
+ },
+ [0x1FBAD]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBAD,
+ },
+ [0x1FBAE]={
+ category="so",
+ description="BOX DRAWINGS LIGHT DIAGONAL DIAMOND",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBAE,
+ },
+ [0x1FBAF]={
+ category="so",
+ description="BOX DRAWINGS LIGHT HORIZONTAL WITH VERTICAL STROKE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBAF,
+ },
+ [0x1FBB0]={
+ category="so",
+ description="ARROWHEAD-SHAPED POINTER",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB0,
+ },
+ [0x1FBB1]={
+ category="so",
+ description="INVERSE CHECK MARK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB1,
+ },
+ [0x1FBB2]={
+ category="so",
+ description="LEFT HALF RUNNING MAN",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB2,
+ },
+ [0x1FBB3]={
+ category="so",
+ description="RIGHT HALF RUNNING MAN",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB3,
+ },
+ [0x1FBB4]={
+ category="so",
+ description="INVERSE DOWNWARDS ARROW WITH TIP LEFTWARDS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB4,
+ },
+ [0x1FBB5]={
+ category="so",
+ description="LEFTWARDS ARROW AND UPPER AND LOWER ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB5,
+ },
+ [0x1FBB6]={
+ category="so",
+ description="RIGHTWARDS ARROW AND UPPER AND LOWER ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB6,
+ },
+ [0x1FBB7]={
+ category="so",
+ description="DOWNWARDS ARROW AND RIGHT ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB7,
+ },
+ [0x1FBB8]={
+ category="so",
+ description="UPWARDS ARROW AND RIGHT ONE EIGHTH BLOCK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB8,
+ },
+ [0x1FBB9]={
+ category="so",
+ description="LEFT HALF FOLDER",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBB9,
+ },
+ [0x1FBBA]={
+ category="so",
+ description="RIGHT HALF FOLDER",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBBA,
+ },
+ [0x1FBBB]={
+ category="so",
+ description="VOIDED GREEK CROSS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBBB,
+ },
+ [0x1FBBC]={
+ category="so",
+ description="RIGHT OPEN SQUARED DOT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBBC,
+ },
+ [0x1FBBD]={
+ category="so",
+ description="NEGATIVE DIAGONAL CROSS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBBD,
+ },
+ [0x1FBBE]={
+ category="so",
+ description="NEGATIVE DIAGONAL MIDDLE RIGHT TO LOWER CENTRE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBBE,
+ },
+ [0x1FBBF]={
+ category="so",
+ description="NEGATIVE DIAGONAL DIAMOND",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBBF,
+ },
+ [0x1FBC0]={
+ category="so",
+ description="WHITE HEAVY SALTIRE WITH ROUNDED CORNERS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC0,
+ },
+ [0x1FBC1]={
+ category="so",
+ description="LEFT THIRD WHITE RIGHT POINTING INDEX",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC1,
+ },
+ [0x1FBC2]={
+ category="so",
+ description="MIDDLE THIRD WHITE RIGHT POINTING INDEX",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC2,
+ },
+ [0x1FBC3]={
+ category="so",
+ description="RIGHT THIRD WHITE RIGHT POINTING INDEX",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC3,
+ },
+ [0x1FBC4]={
+ category="so",
+ description="NEGATIVE SQUARED QUESTION MARK",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC4,
+ },
+ [0x1FBC5]={
+ category="so",
+ description="STICK FIGURE",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC5,
+ },
+ [0x1FBC6]={
+ category="so",
+ description="STICK FIGURE WITH ARMS RAISED",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC6,
+ },
+ [0x1FBC7]={
+ category="so",
+ description="STICK FIGURE LEANING LEFT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC7,
+ },
+ [0x1FBC8]={
+ category="so",
+ description="STICK FIGURE LEANING RIGHT",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC8,
+ },
+ [0x1FBC9]={
+ category="so",
+ description="STICK FIGURE WITH DRESS",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBC9,
+ },
+ [0x1FBCA]={
+ category="so",
+ description="WHITE UP-POINTING CHEVRON",
+ direction="on",
+ linebreak="al",
+ unicodeslot=0x1FBCA,
+ },
+ [0x1FBF0]={
+ category="nd",
+ description="SEGMENTED DIGIT ZERO",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x30 },
+ unicodeslot=0x1FBF0,
+ },
+ [0x1FBF1]={
+ category="nd",
+ description="SEGMENTED DIGIT ONE",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x31 },
+ unicodeslot=0x1FBF1,
+ },
+ [0x1FBF2]={
+ category="nd",
+ description="SEGMENTED DIGIT TWO",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x32 },
+ unicodeslot=0x1FBF2,
+ },
+ [0x1FBF3]={
+ category="nd",
+ description="SEGMENTED DIGIT THREE",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x33 },
+ unicodeslot=0x1FBF3,
+ },
+ [0x1FBF4]={
+ category="nd",
+ description="SEGMENTED DIGIT FOUR",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x34 },
+ unicodeslot=0x1FBF4,
+ },
+ [0x1FBF5]={
+ category="nd",
+ description="SEGMENTED DIGIT FIVE",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x35 },
+ unicodeslot=0x1FBF5,
+ },
+ [0x1FBF6]={
+ category="nd",
+ description="SEGMENTED DIGIT SIX",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x36 },
+ unicodeslot=0x1FBF6,
+ },
+ [0x1FBF7]={
+ category="nd",
+ description="SEGMENTED DIGIT SEVEN",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x37 },
+ unicodeslot=0x1FBF7,
+ },
+ [0x1FBF8]={
+ category="nd",
+ description="SEGMENTED DIGIT EIGHT",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x38 },
+ unicodeslot=0x1FBF8,
+ },
+ [0x1FBF9]={
+ category="nd",
+ description="SEGMENTED DIGIT NINE",
+ direction="en",
+ linebreak="nu",
+ specials={ "font", 0x39 },
+ unicodeslot=0x1FBF9,
+ },
[0x2F800]={
category="lo",
cjkwd="w",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
index 1d202c8d42d..ac31dbfc60c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
@@ -192,7 +192,6 @@ insert(characters.ranges,{
end,
})
-
local blocks = allocate {
["adlam"] = { first = 0x1E900, last = 0x1E95F, description = "Adlam" },
["aegeannumbers"] = { first = 0x10100, last = 0x1013F, description = "Aegean Numbers" },
@@ -236,6 +235,7 @@ local blocks = allocate {
["cherokee"] = { first = 0x013A0, last = 0x013FF, otf="cher", description = "Cherokee" },
["cherokeesupplement"] = { first = 0x0AB70, last = 0x0ABBF, description = "Cherokee Supplement" },
["chesssymbols"] = { first = 0x1FA00, last = 0x1FA6F, description = "Chess Symbols" },
+ ["chorasmian"] = { first = 0x10FB0, last = 0x10FDF, description = "Chorasmian" },
["cjkcompatibility"] = { first = 0x03300, last = 0x033FF, otf="hang", description = "CJK Compatibility" },
["cjkcompatibilityforms"] = { first = 0x0FE30, last = 0x0FE4F, otf="hang", description = "CJK Compatibility Forms" },
["cjkcompatibilityideographs"] = { first = 0x0F900, last = 0x0FAFF, otf="hang", description = "CJK Compatibility Ideographs" },
@@ -250,6 +250,7 @@ local blocks = allocate {
["cjkunifiedideographsextensiond"] = { first = 0x2B740, last = 0x2B81F, description = "CJK Unified Ideographs Extension D" },
["cjkunifiedideographsextensione"] = { first = 0x2B820, last = 0x2CEAF, description = "CJK Unified Ideographs Extension E" },
["cjkunifiedideographsextensionf"] = { first = 0x2CEB0, last = 0x2EBEF, description = "CJK Unified Ideographs Extension F" },
+ ["cjkunifiedideographsextensiong"] = { first = 0x30000, last = 0x3134F, description = "CJK Unified Ideographs Extension G" },
["combiningdiacriticalmarks"] = { first = 0x00300, last = 0x0036F, description = "Combining Diacritical Marks" },
["combiningdiacriticalmarksextended"] = { first = 0x01AB0, last = 0x01AFF, description = "Combining Diacritical Marks Extended" },
["combiningdiacriticalmarksforsymbols"] = { first = 0x020D0, last = 0x020FF, description = "Combining Diacritical Marks for Symbols" },
@@ -298,6 +299,7 @@ local blocks = allocate {
-- ["digitsthai"] = { first = 0x00E50, last = 0x00E59, math = true },
-- ["digitstibetan"] = { first = 0x00F20, last = 0x00F29, math = true },
["dingbats"] = { first = 0x02700, last = 0x027BF, description = "Dingbats" },
+ ["divesakuru"] = { first = 0x11900, last = 0x1195F, description = "Dives Akuru" },
["dogra"] = { first = 0x11800, last = 0x1184F, description = "Dogra" },
["dominotiles"] = { first = 0x1F030, last = 0x1F09F, description = "Domino Tiles" },
["duployan"] = { first = 0x1BC00, last = 0x1BC9F, description = "Duployan" },
@@ -361,6 +363,7 @@ local blocks = allocate {
["katakanaphoneticextensions"] = { first = 0x031F0, last = 0x031FF, otf="kana", description = "Katakana Phonetic Extensions" },
["kayahli"] = { first = 0x0A900, last = 0x0A92F, description = "Kayah Li" },
["kharoshthi"] = { first = 0x10A00, last = 0x10A5F, otf="khar", description = "Kharoshthi" },
+ ["khitansmallscript"] = { first = 0x18B00, last = 0x18CFF, description = "Khitan Small Script" },
["khmer"] = { first = 0x01780, last = 0x017FF, otf="khmr", description = "Khmer" },
["khmersymbols"] = { first = 0x019E0, last = 0x019FF, otf="khmr", description = "Khmer Symbols" },
["khojki"] = { first = 0x11200, last = 0x1124F, description = "Khojki" },
@@ -380,6 +383,7 @@ local blocks = allocate {
["linearbideograms"] = { first = 0x10080, last = 0x100FF, otf="linb", description = "Linear B Ideograms" },
["linearbsyllabary"] = { first = 0x10000, last = 0x1007F, otf="linb", description = "Linear B Syllabary" },
["lisu"] = { first = 0x0A4D0, last = 0x0A4FF, description = "Lisu" },
+ ["lisusupplement"] = { first = 0x11FB0, last = 0x11FBF, description = "Lisu Supplement" },
["lowercasebold"] = { first = 0x1D41A, last = 0x1D433, math = true },
["lowercaseboldfraktur"] = { first = 0x1D586, last = 0x1D59F, math = true },
["lowercasebolditalic"] = { first = 0x1D482, last = 0x1D49B, math = true },
@@ -504,6 +508,7 @@ local blocks = allocate {
["suttonsignwriting"] = { first = 0x1D800, last = 0x1DAAF, description = "Sutton SignWriting" },
["sylotinagri"] = { first = 0x0A800, last = 0x0A82F, otf="sylo", description = "Syloti Nagri" },
["symbolsandpictographsextendeda"] = { first = 0x1FA70, last = 0x1FAFF, description = "Symbols and Pictographs Extended-A" },
+ ["symbolsforlegacycomputing"] = { first = 0x1FB00, last = 0x1FBFF, description = "Symbols for Legacy Computing" },
["syriac"] = { first = 0x00700, last = 0x0074F, otf="syrc", description = "Syriac" },
["syriacsupplement"] = { first = 0x00860, last = 0x0086F, description = "Syriac Supplement" },
["tagalog"] = { first = 0x01700, last = 0x0171F, otf="tglg", description = "Tagalog" },
@@ -517,6 +522,7 @@ local blocks = allocate {
["tamil"] = { first = 0x00B80, last = 0x00BFF, otf="taml", description = "Tamil" },
["tamilsupplement"] = { first = 0x11FC0, last = 0x11FFF, description = "Tamil Supplement" },
["tangut"] = { first = 0x17000, last = 0x187FF, description = "Tangut" },
+ ["tangutsupplement"] = { first = 0x18D00, last = 0x18D8F, description = "Tangut Supplement" },
["tangutcomponents"] = { first = 0x18800, last = 0x18AFF, description = "Tangut Components" },
["telugu"] = { first = 0x00C00, last = 0x00C7F, otf="telu", description = "Telugu" },
["thaana"] = { first = 0x00780, last = 0x007BF, otf="thaa", description = "Thaana" },
@@ -555,6 +561,7 @@ local blocks = allocate {
["verticalforms"] = { first = 0x0FE10, last = 0x0FE1F, description = "Vertical Forms" },
["wancho"] = { first = 0x1E2C0, last = 0x1E2FF, description = "Wancho" },
["warangciti"] = { first = 0x118A0, last = 0x118FF, description = "Warang Citi" },
+ ["yezidi"] = { first = 0x10E80, last = 0x10EBF, description = "Yezidi" },
["yijinghexagramsymbols"] = { first = 0x04DC0, last = 0x04DFF, otf="yi", description = "Yijing Hexagram Symbols" },
["yiradicals"] = { first = 0x0A490, last = 0x0A4CF, otf="yi", description = "Yi Radicals" },
["yisyllables"] = { first = 0x0A000, last = 0x0A48F, otf="yi", description = "Yi Syllables" },
@@ -755,11 +762,11 @@ local is_spacing = allocate ( tohash {
} )
local is_mark = allocate ( tohash {
- "mn", "ms",
+ "mn", "ms", -- "mn", "mc",
} )
local is_punctuation = allocate ( tohash {
- "pc","pd","ps","pe","pi","pf","po",
+ "pc", "pd", "ps", "pe", "pi", "pf", "po",
} )
local is_symbol = allocate ( tohash {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv
index 5979b86854d..aa3d31ba831 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-ini.mkiv
@@ -125,6 +125,8 @@
\clf_setactivecatcodes\notcatcodes
\clf_setactivecatcodes\prtcatcodes
+\clf_setcharacternames\ctxcatcodes
+
\def\chardescription#1{\clf_chardescription#1\relax}
% experiment (watch out: this is global and very font dependent when used with
diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua
index b361a9a0776..7f544b14784 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-tex.lua
@@ -573,88 +573,68 @@ if not csletters then
local traditional = sfstate == "traditional"
for u, chr in next, data do -- will move up
- local fallback = chr.fallback
- if fallback then
- contextsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\checkedchar{",u,"}{",fallback,"}}}")
- activated[#activated+1] = u
- else
- local contextname = chr.contextname
- local category = chr.category
- local isletter = is_letter[category]
- if contextname then
- if is_character[category] then
- if chr.unicodeslot < 128 then
- if isletter then
- local c = utfchar(u)
- texsetmacro(contextname,c)
- csletters[c] = u
- else
- texsetchar(contextname,u)
- end
- else
- local c = utfchar(u)
- texsetmacro(contextname,c)
- if isletter and u >= 32 and u <= 65536 then
- csletters[c] = u
- end
- end
- --
+ local contextname = chr.contextname
+ local category = chr.category
+ local isletter = is_letter[category]
+ if contextname then
+ if is_character[category] then
+ if chr.unicodeslot < 128 then
if isletter then
- local lc = chr.lccode
- local uc = chr.uccode
- if not lc then
- chr.lccode = u
- lc = u
- elseif type(lc) == "table" then
- lc = u
- end
- if not uc then
- chr.uccode = u
- uc = u
- elseif type(uc) == "table" then
- uc = u
- end
- texsetlccode(u,lc,uc)
- if traditional and category == "lu" then
- texsetsfcode(code,999)
- end
+ local c = utfchar(u)
+ csletters[c] = u
end
- --
- elseif is_command[category] and not forbidden[u] then
- -- contextsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\",contextname,"}}")
- -- activated[#activated+1] = u
+ else
local c = utfchar(u)
- texsetmacro(contextname,c)
- elseif is_mark[category] then
- texsetlccode(u,u,u) -- for hyphenation
- end
- -- elseif isletter and u >= 32 and u <= 65536 then
- elseif isletter then
- csletters[utfchar(u)] = u
- --
- local lc, uc = chr.lccode, chr.uccode
- if not lc then
- chr.lccode = u
- lc = u
- elseif type(lc) == "table" then
- lc = u
- end
- if not uc then
- chr.uccode = u
- uc = u
- elseif type(uc) == "table" then
- uc = u
+ if isletter and u >= 32 and u <= 65536 then
+ csletters[c] = u
+ end
end
- texsetlccode(u,lc,uc)
- if traditional and category == "lu" then
- texsetsfcode(code,999)
+ if isletter then
+ local lc = chr.lccode
+ local uc = chr.uccode
+ if not lc then
+ chr.lccode = u
+ lc = u
+ elseif type(lc) == "table" then
+ lc = u
+ end
+ if not uc then
+ chr.uccode = u
+ uc = u
+ elseif type(uc) == "table" then
+ uc = u
+ end
+ texsetlccode(u,lc,uc)
+ if traditional and category == "lu" then
+ texsetsfcode(code,999)
+ end
end
- --
+ elseif is_command[category] and not forbidden[u] then
+ -- skip
elseif is_mark[category] then
- --
texsetlccode(u,u,u) -- for hyphenation
- --
end
+ elseif isletter then
+ csletters[utfchar(u)] = u
+ local lc, uc = chr.lccode, chr.uccode
+ if not lc then
+ chr.lccode = u
+ lc = u
+ elseif type(lc) == "table" then
+ lc = u
+ end
+ if not uc then
+ chr.uccode = u
+ uc = u
+ elseif type(uc) == "table" then
+ uc = u
+ end
+ texsetlccode(u,lc,uc)
+ if traditional and category == "lu" then
+ texsetsfcode(code,999)
+ end
+ elseif is_mark[category] then
+ texsetlccode(u,u,u) -- for hyphenation
end
end
@@ -690,6 +670,29 @@ if not csletters then
storage.register("characters/csletters", csletters, "characters.csletters")
end
+ function characters.setcharacternames(ctt)
+ for u, chr in next, data do -- will move up
+ local contextname = chr.contextname
+ local category = chr.category
+ local isletter = is_letter[category]
+ if contextname then
+ if is_character[category] then
+ if chr.unicodeslot < 128 then
+ if isletter then
+ texsetmacro(contextname,utfchar(u),"immutable")
+ else
+ texsetchar(contextname,u,"immutable")
+ end
+ else
+ texsetmacro(contextname,utfchar(u),"immutable")
+ end
+ elseif is_command[category] and not forbidden[u] then
+ texsetmacro(contextname,utfchar(u),"immutable")
+ end
+ end
+ end
+ end
+
else
mark(csletters)
end
@@ -826,9 +829,13 @@ end
-- entities.gt = utfchar(characters.activeoffset + utfbyte(">"))
-- end
-implement { name = "setlettercatcodes", scope = "private", actions = characters.setlettercatcodes, arguments = "integer" }
-implement { name = "setactivecatcodes", scope = "private", actions = characters.setactivecatcodes, arguments = "integer" }
---------- { name = "setcharactercodes", scope = "private", actions = characters.setcodes }
+if characters.setcharacternames then -- only in ini mode
+
+ implement { name = "setlettercatcodes", scope = "private", actions = characters.setlettercatcodes, arguments = "integer" }
+ implement { name = "setactivecatcodes", scope = "private", actions = characters.setactivecatcodes, arguments = "integer" }
+ implement { name = "setcharacternames", scope = "private", actions = characters.setcharacternames, arguments = "integer" }
+
+end
-- experiment (some can move to char-ini.lua)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua b/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua
index fb47b5208ce..7d8ca219b63 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/char-utf.lua
@@ -86,33 +86,40 @@ characters.decomposed = decomposed
local graphemes = characters.graphemes
local collapsed = characters.collapsed
+local combined = characters.combined
local mathlists = characters.mathlists
if graphemes then
mark(graphemes)
mark(collapsed)
+ mark(combined)
mark(mathlists)
else
graphemes = allocate()
collapsed = allocate()
+ combined = allocate()
mathlists = allocate()
characters.graphemes = graphemes
characters.collapsed = collapsed
+ characters.combined = combined
characters.mathlists = mathlists
local function backtrack(v,last,target)
local vs = v.specials
- if vs and #vs == 3 and vs[1] == "char" then
- local one = vs[2]
- local two = vs[3]
- local first = utfchar(one)
- local second = utfchar(two) .. last
- collapsed[first..second] = target
- backtrack(data[one],second,target)
+ if vs and #vs == 3 then
+ local kind = vs[1]
+ if kind == "char" or kind == "with" then
+ local one = vs[2]
+ local two = vs[3]
+ local first = utfchar(one)
+ local second = utfchar(two) .. last
+ collapsed[first..second] = target
+ backtrack(data[one],second,target)
+ end
end
end
@@ -141,28 +148,39 @@ else
if vs then
local kind = vs[1]
local size = #vs
- if kind == "char" and size == 3 then -- what if more than 3
- --
- local one = vs[2]
- local two = vs[3]
- local first = utfchar(one)
- local second = utfchar(two)
- local combination = utfchar(unicode)
- --
- collapsed[first..second] = combination
- backtrack(data[one],second,combination)
- -- sort of obsolete:
- local cgf = graphemes[first]
- if not cgf then
- cgf = { [second] = combination }
- graphemes[first] = cgf
- else
- cgf[second] = combination
+ if kind == "char" then
+ if size == 3 then
+ local one = vs[2]
+ local two = vs[3]
+ local first = utfchar(one)
+ local second = utfchar(two)
+ local combination = utfchar(unicode)
+ --
+ collapsed[first..second] = combination
+ backtrack(data[one],second,combination)
+ -- sort of obsolete:
+ local cgf = graphemes[first]
+ if not cgf then
+ cgf = { [second] = combination }
+ graphemes[first] = cgf
+ else
+ cgf[second] = combination
+ end
+ end
+ if size > 2 and (v.mathclass or v.mathspec) then
+ setlist(unicode,vs,2,"specials")
+ end
+ elseif kind == "with" then
+ if size == 3 then
+ combined[utfchar(vs[2])..utfchar(vs[3])] = utfchar(unicode)
+ end
+ elseif kind == "compat" then
+ if size == 3 then
+ combined[utfchar(vs[2])..utfchar(vs[3])] = utfchar(unicode)
+ end
+ if size > 2 and (v.mathclass or v.mathspec) then
+ setlist(unicode,vs,2,"specials")
end
- --
- end
- if (kind == "char" or kind == "compat") and (size > 2) and (v.mathclass or v.mathspec) then
- setlist(unicode,vs,2,"specials")
end
end
local ml = v.mathlist
@@ -182,6 +200,7 @@ else
if storage then
storage.register("characters/graphemes", graphemes, "characters.graphemes")
storage.register("characters/collapsed", collapsed, "characters.collapsed")
+ storage.register("characters/combined", combined, "characters.combined")
storage.register("characters/mathlists", mathlists, "characters.mathlists")
end
@@ -226,6 +245,25 @@ function utffilters.collapse(str,filename)
end
end
+local p_combine = nil -- only for tex
+
+local function prepare()
+ local tree = utfchartabletopattern(combined)
+ p_combine = Cs((tree/combined + p_utf8character)^0)
+end
+
+function utffilters.combine(str) -- not in files
+ -- we could merge collapse into combine ... maybe
+ if not p_combine then
+ prepare()
+ end
+ if not str or str == "" or #str == 1 then
+ return str
+ else
+ return lpegmatch(p_combine,str) or str
+ end
+end
+
local p_decompose = nil
local function prepare()
diff --git a/Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv b/Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv
index 71b104e4791..17c80472e5b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/chem-str.mkiv
@@ -449,7 +449,7 @@
\egroup}
\appendtoks
- \let|\chemicalbar % \SR{N|NH}
+ \let |\chemicalbar % \SR{N|NH}
\let \+\chemicaloxidationplus
\let \-\chemicaloxidationminus
\let \[\chemicalforeveropen
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv
index a1e4428724c..7a8f7bf5c0d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-com.mkiv
@@ -14,6 +14,6 @@
\writestatus{loading}{ConTeXt Lua Documents / Functions}
\registerctxluafile{cldf-com}{}
-\registerctxluafile{cldf-ver}{}
+%registerctxluafile{cldf-ver}{}
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua
index e22de5a5b80..bb5a058a530 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.lua
@@ -26,7 +26,7 @@ if not modules then modules = { } end modules ['cldf-ini'] = {
-- 0.651 local foo = getcount("ctxcatcodes")
-- 0.408 local foo = getcount(ctxcatcodes) -- local ctxcatcodes = tex.iscount("ctxcatcodes")
--- maybe:  (escape) or 0x2061 (apply function) or 0x2394 (software function ⎔)
+-- maybe:  (escape) or 0x2061 (apply function) or 0x2394 (software function ⎔) (old)
-- note : tex.print == line with endlinechar appended
-- todo : context("%bold{total: }%s",total)
-- todo : context.documentvariable("title")
@@ -58,6 +58,20 @@ if not modules then modules = { } end modules ['cldf-ini'] = {
-- time (for the better or worse). There have been no fundamental changes for many years
-- and performance has not changed much either.
+-- The code here has evolved over time, and was already present in the early versions of
+-- mkiv. However, it got adapted when feature were added to luatex, like the ability to
+-- "print" nodes and later tokens. We use to have control over the method used (if only
+-- for testing) but the older code has been removed now. The history is in the archives.
+-- These were the controls:
+
+-- local tokenflushmode = true
+-- local nodeflushmode = true
+-- local scannerdefmode = true
+-- local maxflushnodeindex = 0x10FFFF - 1
+
+-- In earlier experiments a function tables was referred to as lua.calls and the primitive
+-- \luafunctions was \luacall and we used our own implementation of a function table (more
+-- indirectness).
local format, stripstring = string.format, string.strip
local next, type, tostring, tonumber, unpack, select, rawset = next, type, tostring, tonumber, unpack, select, rawset
@@ -83,10 +97,6 @@ local tex = tex
local texsprint = tex.sprint -- just appended (no space,eol treatment)
local texprint = tex.print -- each arg a separate line (not last in directlua)
----- texwrite = tex.write -- all 'space' and 'character'
-local texgetcount = tex.getcount
-
--- local function texsprint(...) print("sprint",...) tex.sprint(...) end
--- local function texprint (...) print("print", ...) tex.print (...) end
local isnode = node.is_node
local writenode = node.write
@@ -99,6 +109,19 @@ local newtoken = token.new
local createtoken = token.create
local setluatoken = token.set_lua
+local isprintable = tex.isprintable or function(n)
+ return n and (type(n) == "string" or isnode(n) or istoken(n))
+end
+
+if tex.runlocal then
+ -- obselete names
+ tex.runtoks = tex.runlocal
+ tex.quittoks = tex.quitlocal
+else
+ tex.runlocal = tex.runtoks
+ tex.quitlocal = tex.quittoks
+end
+
local catcodenumbers = catcodes.numbers
local ctxcatcodes = catcodenumbers.ctxcatcodes
@@ -118,45 +141,35 @@ local report_cld = logs.reporter("cld","stack")
local processlines = true -- experiments.register("context.processlines", function(v) processlines = v end)
-local tokenflushmode = true
-local nodeflushmode = true
-local scannerdefmode = true
-local maxflushnodeindex = 0x10FFFF - 1
-
--- tokenflushmode = false
--- nodeflushmode = false
--- scannerdefmode = false
+local trialtypesetting = function() return false end
--- In earlier experiments a function tables was referred to as lua.calls and the
--- primitive \luafunctions was \luacall and we used our own implementation of
--- a function table (more indirectness).
-
-local trialtypesettingstate = createtoken("trialtypesettingstate").index
-
-function context.trialtypesetting()
- return texgetcount(trialtypesettingstate) ~= 0
+function context.settrialtypesettingmethod(f)
+ trialtypesetting = f
+ context.trialtypesetting = f
end
+context.trialtypesetting = function() return trialtypesetting() end -- can be aliased !
+
local knownfunctions = (lua.getfunctionstable or lua.get_functions_table)(true)
local showstackusage = false
trackers.register("context.stack",function(v) showstackusage = v end)
-local freed, nofused, noffreed = { }, 0, 0
+local freed = { }
+local nofused = 0
+local noffreed = 0
local usedstack = function()
return nofused, noffreed
end
local flushfunction = function(slot,arg)
- if arg() then
+ if arg() or trialtypesetting() then
-- keep
- elseif texgetcount(trialtypesettingstate) == 0 then
+ else
noffreed = noffreed + 1
freed[noffreed] = slot
knownfunctions[slot] = false
- else
- -- keep
end
end
@@ -176,13 +189,13 @@ local storefunction = function(arg)
end
local flushnode = function(slot,arg)
- if texgetcount(trialtypesettingstate) == 0 then
+ if trialtypesetting() then
+ writenode(copynodelist(arg))
+ else
writenode(arg)
noffreed = noffreed + 1
freed[noffreed] = slot
knownfunctions[slot] = false
- else
- writenode(copynodelist(arg))
end
end
@@ -208,11 +221,11 @@ local initex = environment.initex
storage.register("storage/storedfunctions", storedfunctions, "storage.storedfunctions")
local f_resolve = nil
-local p_resolve = ((1-lpegP("."))^1 / function(s) f_resolve = f_resolve[s] end * lpegP(".")^0)^1
+local p_resolve = ((1-lpegP("."))^1 / function(s) f_resolve = f_resolve[s] end * lpegP(".")^0)^1
local function resolvestoredfunction(str)
if type(str) == "string" then
- f_resolve = global
+ f_resolve = global -- namespace
lpegmatch(p_resolve,str)
return f_resolve
else
@@ -257,9 +270,11 @@ else
end
end
-local registerfunction = function(f,direct) -- either f=code or f=namespace,direct=name
- local slot, func
- if noffreed > 0 then
+local registerfunction = function(f,direct,slot) -- either f=code or f=namespace,direct=name
+ local func
+ if slot then
+ -- already used
+ elseif noffreed > 0 then
slot = freed[noffreed]
freed[noffreed] = nil
noffreed = noffreed - 1
@@ -269,12 +284,8 @@ local registerfunction = function(f,direct) -- either f=code or f=namespace,dire
end
if direct then
if initex then
- func = function(...)
- expose(slot,f,...)
- end
- if initex then
- storedfunctions[slot] = f
- end
+ func = function(...) expose(slot,f,...) end
+ storedfunctions[slot] = f
else
func = resolvestoredfunction(f)
end
@@ -357,73 +368,109 @@ do
end
--- so far
-
--- The next hack is a convenient way to define scanners at the Lua end and
--- get them available at the TeX end. There is some dirty magic needed to
--- prevent overload during format loading.
+-- The next hack is a convenient way to define scanners at the Lua end and get them
+-- available at the TeX end. There is some dirty magic needed to prevent overload
+-- during format loading. Nowadays we prefer to use the slightly less efficient way
+-- of defining interfaces using the implementer. There is a little more overhead in
+-- defining as well as runtime overhead, but we accept that.
-- interfaces.scanners.foo = function() context("[%s]",tokens.scanners.string()) end : \scan_foo
-interfaces.storedscanners = interfaces.storedscanners or { }
-local storedscanners = interfaces.storedscanners
+local storedscanners = interfaces.storedscanners or { }
+local namesofscanners = interfaces.namesofscanners or { }
+local interfacescanners = { }
+local privatenamespace = "clf_"
+
+interfaces.storedscanners = storedscanners
+interfaces.namesofscanners = namesofscanners
storage.register("interfaces/storedscanners", storedscanners, "interfaces.storedscanners")
-local interfacescanners = setmetatablenewindex(function(t,k,v)
- rawset(t,k,v)
- if storedscanners[k] then
- -- report_cld("warning: scanner %a is already set (mode 1a)",k)
- -- os.exit()
- -- \scan_<k> is already in the format
- -- report_cld("using interface scanner: %s",k)
- elseif scannerdefmode then
- -- report_cld("installing interface scanner: %s (mode 1b)",k)
- -- local n = registerfunction(interfaces.scanners[k],true)
- local n = registerfunction("interfaces.scanners."..k,true)
- storedscanners[k] = n
- local name = "clf_" .. k
- setluatoken(name,n,"global") -- todo : protected and "protected" or ""
- else
- -- report_cld("installing interface scanner: %s (mode 1c)",k)
- storedscanners[k] = true
- context("\\installctxscanner{clf_%s}{interfaces.scanners.%s}",k,k)
+-- local function registerscanner(name,action,protected,public,usage) -- todo: combine value and condition
+-- rawset(interfacescanners,name,action)
+-- local n = storedscanners[name]
+-- n = registerfunction("interfaces.scanners."..name,true,n)
+-- storedscanners[name] = n
+-- namesofscanners[n] = name
+-- name = public and name or (privatenamespace .. name)
+-- -- print(">>",name,protected and "protected" or "",usage or "macro")
+-- setluatoken(name,n,"global",protected and "protected" or "",usage or "macro")
+-- end
+
+-- todo: bitmap
+
+local registerscanner if CONTEXTLMTXMODE > 0 then
+
+ -- always permanent but we can consider to obey permanent==false
+
+ local function toflags(specification)
+ local protected = specification.protected and "protected" -- or ""
+ local usage = specification.usage
+ if usage == "value" then
+ return "global", "value", "permanent", protected
+ elseif usage == "condition" then
+ return "global", "conditional", "permanent", protected
+ elseif specification.frozen then
+ return "global", "frozen", protected
+ elseif specification.permanent == false or specification.onlyonce then -- for now onlyonce here
+ return "global", protected
+ else
+ return "global", "permanent", protected
+ end
end
- -- rawset(t,k,v)
-end)
-function interfaces.registerscanner(name,action,protected,public,call)
- rawset(interfacescanners,name,action)
- if storedscanners[name] then
- -- report_cld("warning: scanner %a is already set (mode 2a)",name)
- -- os.exit()
- -- \scan_<k> is already in the format
- -- report_cld("using interface scanner: %s",k)
- elseif scannerdefmode then
- -- report_cld("installing interface scanner: %s (mode 2b)",name)
- -- local n = registerfunction(action,true) -- todo
- local n = registerfunction("interfaces.scanners."..name,true)
+ registerscanner = function(name,action,specification)
+ rawset(interfacescanners,name,action)
+ local n = registerfunction("interfaces.scanners."..name,true,storedscanners[name])
storedscanners[name] = n
- local name = public and name or ("clf_" .. name)
- setluatoken(name,n,"global",protected and "protected" or "")
- else
- storedscanners[name] = true
- -- report_cld("installing interface scanner: %s (mode 2c)",name)
- context("\\install%sctxscanner{%s%s}{interfaces.scanners.%s}",
- protected and "protected" or "",
- public and "" or "clf_",
- name,
- name
- )
- end
- -- rawset(interfacescanners,name,action)
+ namesofscanners[n] = name
+ name = specification.public and name or (privatenamespace .. name)
+ setluatoken(name,n,toflags(specification))
+ end
+
+else
+
+ registerscanner = function(name,action,specification)
+ rawset(interfacescanners,name,action)
+ local n = storedscanners[name]
+ n = registerfunction("interfaces.scanners."..name,true,n)
+ storedscanners[name] = n
+ namesofscanners[n] = name
+ name = specification.public and name or (privatenamespace .. name)
+ setluatoken(name,n,"global",specification.protected and "protected" or "")
+ end
+
+end
+
+interfaces.registerscanner = registerscanner
+
+function interfaces.knownscanner(name)
+ return interfacescanners[name]
+end
+
+function interfaces.nameofscanner(slot)
+ return namesofscanners[slot] or slot
+end
+
+if CONTEXTLMTXMODE > 0 then
+
+ callback.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
+setmetatablenewindex(interfacescanners, function(t,k,v)
+ report_cld("don't register scanner %a directly",k)
+ -- registerscanner(k,v)
+end)
+
interfaces.scanners = storage.mark(interfacescanners)
-interfaces._ = interfaces.scanners
context.functions = {
- register = registerfunction,
+ register = function(qualifiedname) return registerfunction(qualifiedname) end, -- only one argument
unregister = unregisterfunction,
reserve = reservefunction,
known = knownfunctions,
@@ -448,7 +495,7 @@ function commands.ctxresetter(name) -- to be checked
return function()
if storedscanners[name] then
rawset(interfacescanners,name,dummy)
- context.resetctxscanner("clf_" .. name)
+ context.resetctxscanner(privatenamespace .. name)
end
end
end
@@ -540,25 +587,11 @@ local endstripper = beginstripper * lpegP(-1)
local justaspace = space * lpegCc("")
local justanewline = newline * lpegCc("")
-local function n_content(s)
- flush(contentcatcodes,s)
-end
-
-local function n_verbose(s)
- flush(vrbcatcodes,s)
-end
-
-local function n_endofline()
- flush(currentcatcodes," \r")
-end
-
-local function n_emptyline()
- flushdirect(currentcatcodes,"\r")
-end
-
-local function n_simpleline()
- flush(currentcatcodes," \r")
-end
+local function n_content (s) flush (contentcatcodes,s ) end
+local function n_verbose (s) flush (vrbcatcodes, s ) end
+local function n_endofline () flush (currentcatcodes," \r") end
+local function n_emptyline () flushdirect(currentcatcodes,"\r" ) end
+local function n_simpleline() flush (currentcatcodes," \r") end
local n_exception = ""
@@ -646,7 +679,7 @@ function context.newverbosehandler(specification) -- a special variant for e.g.
specification = specification or { }
--
local f_line = specification.line or function() flushdirect("\r") end
- local f_space = specification.space or function() flush(" ") end
+ local f_space = specification.space or function() flush (" ") end
local f_content = specification.content or n_verbose
local f_before = specification.before
local f_after = specification.after
@@ -700,20 +733,6 @@ function context.printlines(str,raw) -- todo: see if via file is useable
end
end
--- function context.printtable(t,separator) -- todo: see if via file is useable
--- if separator == nil or separator == true then
--- separator = "\r"
--- elseif separator == "" then
--- separator = false
--- end
--- for i=1,#t do
--- context(t[i]) -- we need to go through catcode handling
--- if separator then
--- context(separator)
--- end
--- end
--- end
-
function context.printtable(t,separator) -- todo: see if via file is useable
if separator == nil or separator == true then
separator = "\r"
@@ -730,24 +749,7 @@ end
local containseol = patterns.containseol
-local s_cldl_option_b = "[\\cldl"
-local s_cldl_option_f = "[\\cldl" -- add space (not needed)
-local s_cldl_option_e = "]"
-local s_cldl_option_s = "\\cldl"
------ s_cldl_option_d = "\\cldd"
-local s_cldl_option_d = s_cldl_option_s
-local s_cldl_argument_b = "{\\cldl"
-local s_cldl_argument_f = "{\\cldl "
-local s_cldl_argument_e = "}"
-
--- local s_cldl_option_b = "["
--- local s_cldl_option_f = "" -- add space (not needed)
--- local s_cldl_option_s = ""
--- local s_cldl_argument_b = "{"
--- local s_cldl_argument_f = "{ "
-
-local t_cldl_luafunction = newtoken("luafunctioncall",0)
-local lua_expandable_call_token_code = token.command_id and token.command_id("lua_expandable_call")
+local lua_call_code = tokens.commands.lua_expandable_call or tokens.commands.lua_call
local sortedhashindeed = false
@@ -756,17 +758,12 @@ directives.register("context.sorthash",function(v)
end)
local function writer(parent,command,...) -- already optimized before call
-
if type(command) == "string" then -- for now
flush(currentcatcodes,command) -- todo: ctx|prt|texcatcodes
else
flush(command) -- todo: ctx|prt|texcatcodes
end
-
local direct = false
- -- local t = { ... }
- -- for i=1,#t do
- -- local ti = t[i]
for i=1,select("#",...) do
local ti = select(i,...)
if direct then
@@ -849,15 +846,7 @@ local function writer(parent,command,...) -- already optimized before call
local tj = ti[1]
if type(tj) == "function" then
tj = storefunction(tj)
- if tokenflushmode then
- -- if newtoken then
- flush(currentcatcodes,"[",newtoken(tj,lua_expandable_call_token_code),"]")
- -- else
- -- flush(currentcatcodes,"[",t_cldl_luafunction,tj,"]")
- -- end
- else
- flush(currentcatcodes,s_cldl_option_b,tj,s_cldl_option_e)
- end
+ flush(currentcatcodes,"[",newtoken(tj,lua_call_code),"]")
else
flush(currentcatcodes,"[",tj,"]")
end
@@ -867,15 +856,7 @@ local function writer(parent,command,...) -- already optimized before call
local tj = ti[j]
if type(tj) == "function" then
tj = storefunction(tj)
- if tokenflushmode then
- -- if newtoken then
- flush(currentcatcodes,"[",newtoken(tj,lua_expandable_call_token_code),j == tn and "]" or ",")
- -- else
- -- flush(currentcatcodes,"[",t_cldl_luafunction,tj,j == tn and "]" or ",")
- -- end
- else
- flush(currentcatcodes,s_cldl_option_s,tj,j == tn and "]" or ",")
- end
+ flush(currentcatcodes,"[",newtoken(tj,lua_call_code),j == tn and "]" or ",")
else
if j == tn then
flush(currentcatcodes,tj,"]")
@@ -888,15 +869,7 @@ local function writer(parent,command,...) -- already optimized before call
elseif typ == "function" then
-- todo: ctx|prt|texcatcodes
ti = storefunction(ti)
- if tokenflushmode then
- -- if newtoken then
- flush(currentcatcodes,"{",newtoken(ti,lua_expandable_call_token_code),"}")
- -- else
- -- flush(currentcatcodes,"{",t_cldl_luafunction,ti,"}")
- -- end
- else
- flush(currentcatcodes,s_cldl_argument_f,ti,s_cldl_argument_e)
- end
+ flush(currentcatcodes,"{",newtoken(ti,lua_call_code),"}")
elseif typ == "boolean" then
if ti then
flushdirect(currentcatcodes,"\r")
@@ -905,123 +878,58 @@ local function writer(parent,command,...) -- already optimized before call
end
elseif typ == "thread" then
report_context("coroutines not supported as we cannot yield across boundaries")
- elseif isnode(ti) then -- slow | why {} here ?
- if nodeflushmode then
- local n = tonut(ti)
- if n <= maxflushnodeindex then
- flush(currentcatcodes,"{",ti,"}")
- else
- flush(currentcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
- end
+ -- elseif isnode(ti) or istoken(ti) then
+ elseif isprintable(ti) then
+ flush(currentcatcodes,"{",ti,"}")
+ else
+ local s = tostring(ti)
+ if s then
+ flushdirect(currentcatcodes,s)
else
- flush(currentcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
+ report_context("error: %a gets a weird argument %a",command,ti)
end
- else
- report_context("error: %a gets a weird argument %a",command,ti)
end
--- else
--- local n = isnode(ti)
--- if n then
--- if nodeflushmode and n <= maxflushnodeindex then
--- flush(ti)
--- else
--- flush(currentcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
--- end
--- else
--- report_context("error: %a gets a weird argument %a",command,ti)
--- end
--- end
+ -- else
+ -- local n = isnode(ti)
+ -- if n then
+ -- flush(ti)
+ -- else
+ -- report_context("error: %a gets a weird argument %a",command,ti)
+ -- end
end
end
end
-local core
-
-if tokenflushmode then -- combine them
+local toks = tokens.cache
+context.tokenizedcs = toks
- local toks = tokens.cache
-
- context.tokenizedcs = toks
-
- core = setmetatableindex(function(parent,k)
- local t
- local f = function(first,...)
- if not t then
- t = toks[k]
- end
- if first == nil then
- flush(t)
- else
- return writer(context,t,first,...)
- end
+local core = setmetatableindex(function(parent,k)
+ local t
+ local f = function(first,...)
+ if not t then
+ t = toks[k]
end
- parent[k] = f
- return f
- end)
-
--- core = setmetatableindex(function(parent,k)
--- local t
--- local f = function(first,...)
--- if not t then
--- t = toks[k]
--- end
--- local f = function(first,...)
--- if first == nil then
--- flush(t)
--- else
--- return writer(context,t,first,...)
--- end
--- end
--- parent[k] = f
--- if first == nil then
--- flush(t)
--- else
--- return writer(context,t,first,...)
--- end
--- end
--- parent[k] = f
--- return f
--- end)
-
- core.cs = setmetatableindex(function(parent,k)
- local t
- local f = function()
- if not t then
- t = toks[k]
- end
+ if first == nil then
flush(t)
+ else
+ return writer(context,t,first,...)
end
- parent[k] = f
- return f
- end)
-
-else
-
- context.tokenizedcs = false
-
- core = setmetatableindex(function(parent,k)
- local c = "\\" .. k
- local f = function(first,...)
- if first == nil then
- flush(currentcatcodes,c)
- else
- return writer(context,c,first,...)
- end
- end
- parent[k] = f
- return f
- end)
+ end
+ parent[k] = f
+ return f
+end)
- core.cs = setmetatableindex(function(parent,k)
- local c = "\\" .. k -- tostring(k)
- local f = function()
- flush(currentcatcodes,c)
+core.cs = setmetatableindex(function(parent,k)
+ local t
+ local f = function()
+ if not t then
+ t = toks[k]
end
- parent[k] = f
- return f
- end)
-
-end
+ flush(t)
+ end
+ parent[k] = f
+ return f
+end)
local indexer = function(parent,k)
if type(k) == "string" then
@@ -1117,15 +1025,7 @@ local caller = function(parent,f,a,...)
elseif typ == "function" then
-- ignored: a ...
f = storefunction(f)
- if tokenflushmode then
- -- if newtoken then
- flush(currentcatcodes,"{",newtoken(f,lua_expandable_call_token_code),"}")
- -- else
- -- flush(currentcatcodes,"{",t_cldl_luafunction,f,"}")
- -- end
- else
- flush(currentcatcodes,s_cldl_argument_b,f,s_cldl_argument_e) -- todo: ctx|prt|texcatcodes
- end
+ flush(currentcatcodes,"{",newtoken(f,lua_call_code),"}")
elseif typ == "boolean" then
if f then
if a ~= nil then
@@ -1143,43 +1043,31 @@ local caller = function(parent,f,a,...)
end
elseif typ == "thread" then
report_context("coroutines not supported as we cannot yield across boundaries")
- elseif isnode(f) then -- slow
- if nodeflushmode then
- local n = tonut(f)
- if n <= maxflushnodeindex then
- flush(f)
- else
- flush(currentcatcodes,s_cldl_option_s,storenode(f)," ")
- end
+ -- elseif isnode(f) or istoken(f) then
+ elseif isprintable(f) then
+ flush(f)
+ else
+ local s = tostring(f)
+ if s then
+ flushdirect(currentcatcodes,s)
else
- flush(currentcatcodes,s_cldl_option_s,storenode(f)," ")
+ report_context("error: %a gets a weird argument %a","context",f)
end
- else
- report_context("error: %a gets a weird argument %a","context",f)
end
--- else
--- local n = isnode(f)
--- if n then
--- if nodeflushmode and n <= maxflushnodeindex then
--- flush(f)
--- else
--- flush(currentcatcodes,s_cldl_option_s,storenode(f)," ")
--- end
--- else
--- report_context("error: %a gets a weird argument %a","context",f)
--- end
--- end
+ -- else
+ -- local n = isnode(f)
+ -- if n then
+ -- flush(f)
+ -- else
+ -- report_context("error: %a gets a weird argument %a","context",f)
+ -- end
end
end
context.nodes = { -- todo
store = storenode,
flush = function(n)
- if nodeflushmode and tonut(n) <= maxflushnodeindex then
- flush(n)
- else
- flush(currentcatcodes,d and s_cldl_option_d or s_cldl_option_s,storenode(n)," ")
- end
+ flush(n)
end,
}
@@ -1188,11 +1076,7 @@ context.nuts = { -- todo
return storenode(tonut(n))
end,
flush = function(n,d)
- if nodeflushmode and n <= maxflushnodeindex then
- flush(tonode(n))
- else
- flush(currentcatcodes,d and s_cldl_option_d or s_cldl_option_s,storenode(tonode(n))," ")
- end
+ flush(tonode(n))
end,
}
@@ -1252,23 +1136,30 @@ statistics.register("traced context", function()
end
end)
+-- The cmd names were synchronized with the normal call cmd names.
+
+local luacalls = { -- luatex luametatex
+ lua_expandable_call = true, -- normal
+ lua_call = true, -- protected normal
+ lua_protected_call = true, -- protected
+}
+
local function userdata(argument)
if isnode(argument) then
return formatters["<< %s node %i>>"](nodes.nodecodes[argument.id],tonut(argument))
- end
- if istoken(argument) then
+ elseif istoken(argument) then
local csname = argument.csname
if csname then
-- return formatters["<<\\%s>>"](csname)
return formatters["\\%s"](csname)
end
- local cmdname = argument.cmdname
- if cmdname == "lua_expandable_call" or cmdname == "lua_call" then
+ if luacall[argument.cmdname] then
return "<<function>>" -- argument.mode
end
return "<<token>>"
+ else
+ return "<<userdata>>"
end
- return "<<userdata>>"
end
@@ -1630,22 +1521,7 @@ function context.newindexer(catcodes,cmdcodes)
contentcatcodes = savedcatcodes
end
- if tokenflushmode then
-
- handler.cs = core.cs
-
- else
-
- handler.cs = setmetatableindex(function(parent,k)
- local c = "\\" .. k -- tostring(k)
- local f = function()
- flush(cmdcodes,c)
- end
- parent[k] = f
- return f
- end)
-
- end
+ handler.cs = core.cs
setmetatableindex(handler,indexer)
setmetatablecall (handler,caller)
@@ -1665,23 +1541,6 @@ do
-- formatted.command([catcodes,]format[,...])
--- local function formattedflush(parent,c,catcodes,fmt,...)
--- if type(catcodes) == "number" then
--- if fmt then
--- local result
--- pushcatcodes(catcodes)
--- result = writer(parent,c,formatters[fmt](...))
--- popcatcodes()
--- return result
--- else
--- -- no need to change content catcodes
--- return writer(parent,c)
--- end
--- else
--- return writer(parent,c,formatters[catcodes](fmt,...))
--- end
--- end
-
local function formattedflush(parent,c,catcodes,fmt,...)
if not catcodes then
return writer(parent,c)
@@ -1698,51 +1557,26 @@ do
end
end
- local indexer
-
- if tokenflushmode then -- combine them
-
- local toks = tokens.cache
+ local toks = tokens.cache
- indexer = function(parent,k)
- if type(k) == "string" then
- local t
- local f = function(first,...)
- if not t then
- t = toks[k]
- end
- if first == nil then
- flush(t)
- else
- return formattedflush(parent,t,first,...)
- end
+ local indexer = function(parent,k)
+ if type(k) == "string" then
+ local t
+ local f = function(first,...)
+ if not t then
+ t = toks[k]
end
- parent[k] = f
- return f
- else
- return context -- catch
- end
- end
-
- else
-
- indexer = function(parent,k)
- if type(k) == "string" then
- local c = "\\" .. k
- local f = function(first,...)
- if first == nil then
- flush(currentcatcodes,c)
- else
- return formattedflush(parent,c,first,...)
- end
+ if first == nil then
+ flush(t)
+ else
+ return formattedflush(parent,t,first,...)
end
- parent[k] = f
- return f
- else
- return context -- catch
end
+ parent[k] = f
+ return f
+ else
+ return context -- catch
end
-
end
-- formatted([catcodes,]format[,...])
@@ -1947,3 +1781,25 @@ end
-- function context.template(template,variables)
-- context(replace(template,variables))
-- end
+
+do
+
+ -- not the best namespace -- some day maybe texs a la nodes and tokens .. also,
+ -- we already have tex.modes so we need a different name
+
+ local modelevels = tex.getmodevalues()
+ local t = table.keys(modelevels)
+ tex.modelevels = table.swapped(modelevels,modelevels) -- utilities.storage.allocate()
+
+ for i=1,#t do local k = t[i] modelevels[-k] = modelevels[k] end
+
+ if CONTEXTLMTXMODE > 0 then
+
+ -- also elsewhere
+
+ local flagcodes = tex.getflagvalues()
+ tex.flagcodes = table.swapped(flagcodes,flagcodes) -- utilities.storage.allocate()
+
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv
index 29fb15d6883..70c9c12e34c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-ini.mkiv
@@ -1,8 +1,8 @@
%D \module
-%D [ file=cldf-ini,
-%D version=2010.10.19,,
-%D title=\CONTEXT\ \LUA\ Document Functions,
-%D subtitle=Initialization,
+%D [ file=cldf-int,
+%D version=2019.01.01,
+%D title=\CONTEXT\ Data Macros,
+%D subtitle=Integer,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
@@ -15,10 +15,9 @@
\newcount\trialtypesettingstate % gets aliased at the Lua end
-\registerctxluafile{cldf-ini}{}
+\registerctxluafile{cldf-ini}{autosuffix}
-%D With each new update of \MKIV\ we can join Within Temptation in
-%D singing:
+%D With each new update of \MKIV\ we can join Within Temptation in singing:
%D
%D \startbuffer
%D \startluacode
@@ -50,11 +49,11 @@
% \catcodetable\ctxcatcodes \catcode`^=\superscriptcatcode\catcode1=\activecatcode \glet^^A=\cldf
% \catcodetable\ctxcatcodes \catcode`^=\superscriptcatcode\catcode2=\activecatcode \glet^^B=\cldn
-\normalprotected\def\cldprocessfile#1{\directlua{context.runfile("#1")}}
- \def\cldloadfile #1{\directlua{context.loadfile("#1")}}
- \def\cldloadviafile#1{\directlua{context.loadviafile("#1")}}
- \def\cldcontext #1{\directlua{context(#1)}}
- \def\cldcommand #1{\directlua{context.#1}}
- % \def\cldverbatim #1{\directlua{context.verbatim.#1}} % maybe make verbatim global
+\protected\def\cldprocessfile#1{\directlua{context.runfile("#1")}}
+ \def\cldloadfile #1{\directlua{context.loadfile("#1")}}
+ \def\cldloadviafile#1{\directlua{context.loadviafile("#1")}}
+ \def\cldcontext #1{\directlua{context(#1)}}
+ \def\cldcommand #1{\directlua{context.#1}}
+ % \def\cldverbatim #1{\directlua{context.verbatim.#1}} % maybe make verbatim global
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua
index 86420f422b1..39a4eb335ef 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-int.lua
@@ -1,330 +1,173 @@
if not modules then modules = { } end modules ['cldf-int'] = {
version = 1.001,
- comment = "companion to mult-clm.mkiv",
+ comment = "companion to cldf-int.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
--- another experiment
--- needs upgrading
--- needs checking
--- todo: multilingual
+-- another experiment, won't change etc ... mkiv stuff .. used?
-local format, byte = string.format, string.byte
local insert, remove, concat = table.insert, table.remove, table.concat
local unpack, type = unpack or table.unpack, type
-local catcodenumbers = catcodes.numbers
-
-local ctxcatcodes = catcodenumbers.ctxcatcodes
-local vrbcatcodes = catcodenumbers.vrbcatcodes
-
+local ctxcatcodes = catcodes.numbers.ctxcatcodes
local context = context
local contextsprint = context.sprint
local trace_define = false trackers.register("context.define", function(v) trace_define = v end)
interfaces = interfaces or { }
-local implement = interfaces.implement
local estart = interfaces.elements.start
local estop = interfaces.elements.stop
-if CONTEXTLMTXMODE > 0 then
+_clmh_ = utilities.parsers.settings_to_hash
+_clma_ = utilities.parsers.settings_to_array
+_clmn_ = tonumber
- local scanners = tokens.scanners
- local shortcuts = tokens.shortcuts
+local starters, stoppers, macros, stack = { }, { }, { }, { }
- local scanpeek = scanners.peek
- local scankey = scanners.key
- local scanvalue = scanners.value
- local scanskip = scanners.skip
+local checkers = {
+ [0] = "",
+ "\\dosingleempty",
+ "\\dodoubleempty",
+ "\\dotripleempty",
+ "\\doquadrupleempty",
+ "\\doquintupleempty",
+ "\\dosixtupleempty",
+}
- local open = byte('[')
- local close = byte(']')
- local equal = byte('=')
- local comma = byte(',')
+function _clmm_(name,...)
+ macros[name](...)
+end
- function scanhash(scanners)
- if scanpeek() == open then
- local data = { }
- scanskip()
- while true do
- local c = scanpeek()
- if c == comma then
- scanskip()
- elseif c == close then
- scanskip()
- break
- else
- local key = scankey(equal)
- if key then
- if scanpeek() == equal then
- scanskip()
- if scanners then
- local scanner = scanners[key]
- if scanner then
- data[key] = scanner()
- else
- data[key] = scanvalue(comma,close) or ""
- end
- else
- data[key] = scanvalue(comma,close) or ""
- end
- else
- break
- end
- else
- break
- end
- end
- end
- return data
- end
- end
+function _clmb_(name,...)
+ local sn = stack[name]
+ insert(sn,{...})
+ starters[name](...)
+end
- function scanarray()
- if scanpeek() == open then
- local data = { }
- local d = 0
- scanskip()
- while true do
- local c = scanpeek()
- if c == comma then
- scanskip()
- elseif c == close then
- scanskip()
- break
- else
- local v = scanvalue(comma,close) or ""
- d = d + 1
- data[d] = v
- end
- end
- return data
- end
+function _clme_(name)
+ local sn = stack[name]
+ local sv = remove(sn)
+ if sv then
+ stoppers[name](unpack(sv))
+ else
+ -- nesting error
end
+end
- shortcuts.scanhash = scanhash
- shortcuts.scanarray = scanarray
-
- scanners.hash = scanhash
- scanners.array = scanarray
+-- this is a bit old definition ... needs to be modernized
- local function remap(arguments)
- -- backward compatibility
- if type(arguments) == "table" then
- for i=1,#arguments do
- local a = arguments[i]
- if type(a) == "table" then
- local t = a[2]
- arguments[i] = t == "list" and "array" or t
- end
- end
- return arguments
- end
+function interfaces.definecommand(name,specification) -- name is optional
+ if type(name) == "table" then
+ specification = name
+ name = specification.name
end
-
- function interfaces.definecommand(name,specification) -- name is optional
- if type(name) == "table" then
- specification = name
- name = specification.name
- end
- if name and specification then
- local environment = specification.environment
- local arguments = remap(specification.arguments)
+ if name and specification then
+ local arguments = specification.arguments
+ local na = (arguments and #arguments) or 0
+ local environment = specification.environment
+ if na == 0 then
if environment then
- local starter = specification.starter
- local stopper = specification.stopper
- if starter and stopper then
- implement {
- name = estart .. name,
- arguments = arguments,
- public = true,
- protected = true,
- actions = starter,
- }
- implement {
- name = estop .. name,
- public = true,
- protected = true,
- actions = stopper,
- }
- else
- -- message
- end
+ contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{\\ctxlua{_clmb_('",name,"')}}")
+ contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}")
end
if not environment or environment == "both" then
- local macro = specification.macro
- if macro then
- implement {
- name = name,
- arguments = arguments,
- public = true,
- protected = true,
- actions = macro,
- }
- else
- -- message
- end
+ contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{\\ctxlua{_clmm_('",name,"')}}")
end
else
- -- message
- end
- end
-
-
-else
-
- _clmh_ = utilities.parsers.settings_to_hash
- _clma_ = utilities.parsers.settings_to_array
-
- local starters, stoppers, macros, stack = { }, { }, { }, { }
-
- local checkers = {
- [0] = "",
- "\\dosingleempty",
- "\\dodoubleempty",
- "\\dotripleempty",
- "\\doquadrupleempty",
- "\\doquintupleempty",
- "\\dosixtupleempty",
- }
-
- function _clmm_(name,...)
- macros[name](...)
- end
-
- function _clmb_(name,...)
- local sn = stack[name]
- insert(sn,{...})
- starters[name](...)
- end
-
- function _clme_(name)
- local sn = stack[name]
- local sv = remove(sn)
- if sv then
- stoppers[name](unpack(sv))
- else
- -- nesting error
- end
- end
-
- _clmn_ = tonumber
-
- local estart = interfaces.elements.start
- local estop = interfaces.elements.stop
-
- -- this is a bit old definition ... needs to be modernized
-
- function interfaces.definecommand(name,specification) -- name is optional
- if type(name) == "table" then
- specification = name
- name = specification.name
- end
- if name and specification then
- local arguments = specification.arguments
- local na = (arguments and #arguments) or 0
- local environment = specification.environment
- if na == 0 then
- if environment then
- contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{\\ctxlua{_clmb_('",name,"')}}")
- contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}")
- end
- if not environment or environment == "both" then
- contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{\\ctxlua{_clmm_('",name,"')}}")
- end
- else
- -- we could flush immediate but tracing is bad then
- stack[name] = { }
- local opt = 0
- local done = false
- local snippets = { } -- we can reuse it
- local mkivdo = "\\mkivdo" .. name -- maybe clddo
- snippets[#snippets+1] = "\\def"
- snippets[#snippets+1] = mkivdo
- for i=1,na do
- local a = arguments[i]
- local variant = a[1]
- if variant == "option" then
- snippets[#snippets+1] = "[#"
- snippets[#snippets+1] = i
- snippets[#snippets+1] = "]"
- if not done then
- opt = opt + 1
- end
- else
- done = true -- no more optional checking after this
- snippets[#snippets+1] = "#"
- snippets[#snippets+1] = i
+ -- we could flush immediate but tracing is bad then
+ stack[name] = { }
+ local opt = 0
+ local done = false
+ local snippets = { } -- we can reuse it
+ local mkivdo = "\\mkivdo" .. name -- maybe clddo
+ snippets[#snippets+1] = "\\def"
+ snippets[#snippets+1] = mkivdo
+ for i=1,na do
+ local a = arguments[i]
+ local variant = a[1]
+ if variant == "option" then
+ snippets[#snippets+1] = "[#"
+ snippets[#snippets+1] = i
+ snippets[#snippets+1] = "]"
+ if not done then
+ opt = opt + 1
end
- end
- if environment then
- snippets[#snippets+1] = "{\\ctxlua{_clmb_('"
- snippets[#snippets+1] = name
- snippets[#snippets+1] = "'"
else
- snippets[#snippets+1] = "{\\ctxlua{_clmm_('"
- snippets[#snippets+1] = name
- snippets[#snippets+1] = "'"
- end
- for i=1,na do
- local a = arguments[i]
- local variant = a[2]
- if variant == "list" then
- snippets[#snippets+1] = ",_clma_([==[#"
- snippets[#snippets+1] = i
- snippets[#snippets+1] = "]==])"
- elseif variant == "hash" then
- snippets[#snippets+1] = ",_clmh_([==[#"
- snippets[#snippets+1] = i
- snippets[#snippets+1] = "]==])"
- elseif variant == "number" then
- snippets[#snippets+1] = ",_clmn_([==[#"
- snippets[#snippets+1] = i
- snippets[#snippets+1] = "]==])"
- else
- snippets[#snippets+1] = ",[==[#"
- snippets[#snippets+1] = i
- snippets[#snippets+1] = "]==]"
- end
- end
- snippets[#snippets+1] = ")}}"
- contextsprint(ctxcatcodes,unpack(snippets))
- if environment then
- -- needs checking
- contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{",checkers[opt],mkivdo,"}")
- contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}")
- end
- if not environment or environment == "both" then
- contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{",checkers[opt],mkivdo,"}")
+ done = true -- no more optional checking after this
+ snippets[#snippets+1] = "#"
+ snippets[#snippets+1] = i
end
end
if environment then
- starters[name] = specification.starter
- stoppers[name] = specification.stopper
+ snippets[#snippets+1] = "{\\ctxlua{_clmb_('"
+ snippets[#snippets+1] = name
+ snippets[#snippets+1] = "'"
else
- macros[name] = specification.macro
+ snippets[#snippets+1] = "{\\ctxlua{_clmm_('"
+ snippets[#snippets+1] = name
+ snippets[#snippets+1] = "'"
+ end
+ for i=1,na do
+ local a = arguments[i]
+ local variant = a[2]
+ if variant == "list" then
+ snippets[#snippets+1] = ",_clma_([==[#"
+ snippets[#snippets+1] = i
+ snippets[#snippets+1] = "]==])"
+ elseif variant == "hash" then
+ snippets[#snippets+1] = ",_clmh_([==[#"
+ snippets[#snippets+1] = i
+ snippets[#snippets+1] = "]==])"
+ elseif variant == "number" then
+ snippets[#snippets+1] = ",_clmn_([==[#"
+ snippets[#snippets+1] = i
+ snippets[#snippets+1] = "]==])"
+ else
+ snippets[#snippets+1] = ",[==[#"
+ snippets[#snippets+1] = i
+ snippets[#snippets+1] = "]==]"
+ end
+ end
+ snippets[#snippets+1] = ")}}"
+ contextsprint(ctxcatcodes,unpack(snippets))
+ if environment then
+ -- needs checking
+ contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{",checkers[opt],mkivdo,"}")
+ contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}")
end
+ if not environment or environment == "both" then
+ contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{",checkers[opt],mkivdo,"}")
+ end
+ end
+ if environment then
+ starters[name] = specification.starter
+ stoppers[name] = specification.stopper
+ else
+ macros[name] = specification.macro
end
end
-
end
function interfaces.tolist(t)
- local r = { }
- for i=1,#t do
- r[i] = t[i]
- end
- local n = #r
- for k,v in table.sortedhash(t) do
- if type(k) ~= "number" then
- n = n + 1
- r[n] = k .. "=" .. v
+ if t then
+ local r = { }
+ for i=1,#t do
+ r[i] = t[i]
+ end
+ local n = #r
+ for k,v in table.sortedhash(t) do
+ if type(k) ~= "number" then
+ n = n + 1
+ r[n] = k .. "=" .. v
+ end
end
+ return concat(r,", ")
+ else
+ return ""
end
- return concat(r,", ")
end
-- \startluacode
@@ -358,9 +201,9 @@ end
-- context.startnarrower()
-- end
--
--- local function stopmore(opt_1)
+-- local function stopmore()
-- context.stopnarrower()
--- context("stop more, options: %s",interfaces.tolist(opt_1))
+-- context("stop more")
-- context.stopnarrower()
-- end
--
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua
index d0b16e034fa..84b2957ab0b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-scn.lua
@@ -8,32 +8,35 @@ if not modules then modules = { } end modules ['cldf-scn'] = {
local load, type, tostring = load, type, tostring
-local formatters = string.formatters
-local char = string.char
-local concat = table.concat
+local formatters = string.formatters
+local char = string.char
+local concat = table.concat
-local lpegmatch = lpeg.match
-local p_unquoted = lpeg.Cs(lpeg.patterns.unquoted)
+local lpegmatch = lpeg.match
+local p_unquoted = lpeg.Cs(lpeg.patterns.unquoted)
-local f_action_f = formatters["action%s(%s)"]
-local f_action_s = formatters["local action%s = action[%s]"]
-local f_command = formatters["local action = tokens._action\n%\nt\nreturn function(%s) return %s end"]
+local f_action_f = formatters["action%s(%s)"]
+local f_action_s = formatters["local action%s = action[%s]"]
+local f_command = formatters["local action = tokens._action\n%\nt\nreturn function(%s) return %s end"]
-local interfaces = interfaces
-local commands = commands
-local scanners = interfaces.scanners
-local register = interfaces.registerscanner
+local interfaces = interfaces
+local commands = commands
+local register = interfaces.registerscanner
+local knownscanner = interfaces.knownscanner
-local compile = tokens.compile or function() end
-local presets = tokens.presets
+local compile = tokens.compile or function() end
+local presets = tokens.presets
-local dummy = function() end
+local dummy = function() end
-local report = logs.reporter("interfaces","implementor")
+local report = logs.reporter("interfaces","implementor")
function interfaces.implement(specification)
+ local name = specification.name
+ if name == "" then
+ name = nil
+ end
local actions = specification.actions
- local name = specification.name
local arguments = specification.arguments
local private = specification.scope == "private"
local onlyonce = specification.onlyonce
@@ -45,9 +48,6 @@ function interfaces.implement(specification)
end
return
end
- if name == "" then
- name = nil
- end
local p = arguments and presets[arguments]
if p then
arguments = p
@@ -74,11 +74,11 @@ function interfaces.implement(specification)
if not name then
return scanner
end
- if scanners[name] and not specification.overload then
- report("warning: 'scanners.%s' is redefined",name)
+ if knownscanner(name) and not specification.overload then
+ report("warning: interface scanner %a is overloaded",name)
end
- -- scanners[name] = scanner -- we now use:
- register(name,scanner,specification.protected,specification.public,specification.call)
+ -- register(name,scanner,specification.protected,specification.public,specification.usage)
+ register(name,scanner,specification)
if private then
return
end
@@ -161,12 +161,3 @@ interfaces.defined = tokens.defined
interfaces.setmacro = tokens.setters.macro
interfaces.setcount = tokens.setters.count
interfaces.setdimen = tokens.setters.dimen
-
-interfaces.strings = table.setmetatableindex(function(t,k)
- local v = { }
- for i=1,k do
- v[i] = "string"
- end
- t[k] = v
- return v
-end)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv
index 98aaaa8aa04..90ee1174259 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-ext.mkiv
@@ -47,7 +47,7 @@
\installcorenamespace{colorintent}
\unexpanded\def\registercolorintent#1#2% \relax is needed !
- {\setevalue{\??colorintent#1}{\attribute\colorintentattribute\clf_registercolorintent{#2}\relax}}
+ {\setevalue{\??colorintent#1}{\c_attr_colorintent\clf_registercolorintent{#2}\relax}}
\unexpanded\def\colo_intents_set
{\clf_enablecolorintents
@@ -59,7 +59,7 @@
\installattributestack\colorintentattribute
-\setevalue{\??colorintent\v!none}{\attribute\colorintentattribute\attributeunsetvalue} % or reset? used at all?
+\setevalue{\??colorintent\v!none}{\c_attr_colorintent\attributeunsetvalue} % or reset? used at all?
\unexpanded\def\startcolorintent[#1]%
{\pushattribute\colorintentattribute
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv
index fddf65c79fe..a1b3333cc02 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-grp.mkiv
@@ -68,8 +68,8 @@
{\doifelseinstring{:}{#2}
{\colo_groups_define_normal[#1][\v!rgb][#2]}
{\doloop % inherited
- {\ifcsname\??colorgroup#2:\recurselevel\endcsname
- \setevalue{\??colorgroup#1:\recurselevel}{\csname\??colorgroup#2:\recurselevel\endcsname}%
+ {\ifcsname#2:##1\endcsname
+ \definecolor[#1:##1][#2:##1]%
\else
\exitloop
\fi}}}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua b/Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua
index 06a913e1728..f523e870e91 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-icc.lua
@@ -119,3 +119,110 @@ function colors.iccprofile(filename,verbose)
report_colors("profile %a loaded",fullname)
return profile, true
end
+
+-- This is just some fun stuff I decided to check out when I was making sure that
+-- the 2020 metafun manual could be processed with lmtx 2021. Color conversion has
+-- been part of ConTeXt from the start but it has been extended to the less commonly
+-- used color spaces. We already do some CIE but didn't have lab converters to play
+-- with (although I had some MetaPost done for a friend long ago). So, when we moved
+-- to lmtx it made sense to also move some into the core. When searching for info
+-- I ran into some formulas for lab/xyz: http://www.easyrgb.com/en/math.php and
+-- http://www.brucelindbloom.com/ are useful resources. I didn't touch existing
+-- code (as it works ok).
+--
+-- local illuminants = { -- 2=CIE 1931 10=CIE 1964
+-- A = { [2] = { 109.850, 100, 35.585 }, [10] = { 111.144, 100, 35.200 } }, -- incandescent/tungsten
+-- B = { [2] = { 99.093, 100, 85.313 }, [10] = { 99.178, 100, 84.349 } }, -- old direct sunlight at noon
+-- C = { [2] = { 98.074, 100, 118.232 }, [10] = { 97.285, 100, 116.145 } }, -- old daylight
+-- D50 = { [2] = { 96.422, 100, 82.521 }, [10] = { 96.720, 100, 81.427 } }, -- icc profile pcs
+-- D55 = { [2] = { 95.682, 100, 92.149 }, [10] = { 95.799, 100, 90.926 } }, -- mid-morning daylight
+-- D65 = { [2] = { 95.047, 100, 108.883 }, [10] = { 94.811, 100, 107.304 } }, -- daylight, srgb, adobe-rgb
+-- D75 = { [2] = { 94.972, 100, 122.638 }, [10] = { 94.416, 100, 120.641 } }, -- north sky daylight
+-- E = { [2] = { 100.000, 100, 100.000 }, [10] = { 100.000, 100, 100.000 } }, -- equal energy
+-- F1 = { [2] = { 92.834, 100, 103.665 }, [10] = { 94.791, 100, 103.191 } }, -- daylight fluorescent
+-- F2 = { [2] = { 99.187, 100, 67.395 }, [10] = { 103.280, 100, 69.026 } }, -- cool fluorescent
+-- F3 = { [2] = { 103.754, 100, 49.861 }, [10] = { 108.968, 100, 51.965 } }, -- white fluorescent
+-- F4 = { [2] = { 109.147, 100, 38.813 }, [10] = { 114.961, 100, 40.963 } }, -- warm white fluorescent
+-- F5 = { [2] = { 90.872, 100, 98.723 }, [10] = { 93.369, 100, 98.636 } }, -- daylight fluorescent
+-- F6 = { [2] = { 97.309, 100, 60.191 }, [10] = { 102.148, 100, 62.074 } }, -- lite white fluorescent
+-- F7 = { [2] = { 95.044, 100, 108.755 }, [10] = { 95.792, 100, 107.687 } }, -- daylight fluorescent, d65 simulator
+-- F8 = { [2] = { 96.413, 100, 82.333 }, [10] = { 97.115, 100, 81.135 } }, -- sylvania f40, d50 simulator
+-- F9 = { [2] = { 100.365, 100, 67.868 }, [10] = { 102.116, 100, 67.826 } }, -- cool white fluorescent
+-- F10 = { [2] = { 96.174, 100, 81.712 }, [10] = { 99.001, 100, 83.134 } }, -- ultralume 50, philips tl85
+-- F11 = { [2] = { 100.966, 100, 64.370 }, [10] = { 103.866, 100, 65.627 } }, -- ultralume 40, philips tl84
+-- F12 = { [2] = { 108.046, 100, 39.228 }, [10] = { 111.428, 100, 40.353 } }, -- ultralume 30, philips tl83
+-- }
+--
+-- local D65 = illuminants.D65
+-- local D652 = { 95.047, 100, 108.883 }
+--
+-- local function labref(illuminate,observer)
+-- local r = illuminants[illuminant or "D65"] or D65
+-- return r[observer or 2] or r[2] or D652
+-- end
+--
+-- This is hardly useful but nice for metafun demos:
+
+local D652 = { 95.047, 100, 108.883 }
+
+local function xyztolab(x,y,z,mapping)
+ if not mapping then
+ mapping = D652
+ end
+ x = x / mapping[1]
+ y = y / mapping[2]
+ z = z / mapping[3]
+ x = (x > 0.008856) and x^(1/3) or (7.787 * x) + (16/116)
+ y = (y > 0.008856) and y^(1/3) or (7.787 * y) + (16/116)
+ z = (z > 0.008856) and z^(1/3) or (7.787 * z) + (16/116)
+ return
+ 116 * y - 16,
+ 500 * (x - y),
+ 200 * (y - z)
+end
+
+local function labtoxyz(l,a,b,mapping)
+ if not mapping then
+ mapping = D652
+ end
+ local y = (l + 16) / 116
+ local x = a / 500 + y
+ local z = y - b / 200
+ return
+ mapping[1] * ((x^3 > 0.008856) and x^3 or (x - 16/116) / 7.787),
+ mapping[2] * ((y^3 > 0.008856) and y^3 or (y - 16/116) / 7.787),
+ mapping[3] * ((z^3 > 0.008856) and z^3 or (z - 16/116) / 7.787)
+end
+
+local function xyztorgb(x,y,z) -- D65/2°
+ local r = (x * 3.2404542 + y * -1.5371385 + z * -0.4985314) / 100
+ local g = (x * -0.9692660 + y * 1.8760108 + z * 0.0415560) / 100
+ local b = (x * 0.0556434 + y * -0.2040259 + z * 1.0572252) / 100
+ r = (r > 0.0031308) and (1.055 * r^(1/2.4) - 0.055) or (12.92 * r)
+ g = (g > 0.0031308) and (1.055 * g^(1/2.4) - 0.055) or (12.92 * g)
+ b = (b > 0.0031308) and (1.055 * b^(1/2.4) - 0.055) or (12.92 * b)
+ if r < 0 then r = 0 elseif r > 1 then r = 1 end
+ if g < 0 then g = 0 elseif g > 1 then g = 1 end
+ if b < 0 then b = 0 elseif b > 1 then b = 1 end
+ return r, g, b
+end
+
+local function rgbtoxyz(r,g,b)
+ r = 100 * ((r > 0.04045) and ((r + 0.055)/1.055)^2.4 or (r / 12.92))
+ g = 100 * ((g > 0.04045) and ((g + 0.055)/1.055)^2.4 or (g / 12.92))
+ b = 100 * ((b > 0.04045) and ((b + 0.055)/1.055)^2.4 or (b / 12.92))
+ return
+ r * 0.4124 + g * 0.3576 + b * 0.1805,
+ r * 0.2126 + g * 0.7152 + b * 0.0722,
+ r * 0.0193 + g * 0.1192 + b * 0.9505
+end
+
+local function labtorgb(l,a,b,mapping)
+ return xyztorgb(labtoxyz(l,a,b,mapping))
+end
+
+colors.xyztolab = xyztolab
+colors.labtoxyz = labtoxyz
+colors.xyztorgb = xyztorgb
+colors.rgbtoxyz = rgbtoxyz
+colors.labtorgb = labtorgb
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv
index 85122cb4448..ab11ae99637 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-imp-rgb.mkiv
@@ -35,12 +35,19 @@
% adapted per 2011.10.28
-\definecolor [lightred] [r=1, g=0, b=0]
-\definecolor [lightgreen] [r=0, g=1, b=0]
-\definecolor [lightblue] [r=0, g=0, b=1]
-\definecolor [lightcyan] [r=0, g=1, b=1]
-\definecolor [lightmagenta] [r=1, g=0, b=1]
-\definecolor [lightyellow] [r=1, g=1, b=0]
+% \definecolor [lightred] [r=1, g=0, b=0]
+% \definecolor [lightgreen] [r=0, g=1, b=0]
+% \definecolor [lightblue] [r=0, g=0, b=1]
+% \definecolor [lightcyan] [r=0, g=1, b=1]
+% \definecolor [lightmagenta] [r=1, g=0, b=1]
+% \definecolor [lightyellow] [r=1, g=1, b=0]
+
+\definecolor [lightred] [r=1, g=0.5, b=0.5] % [.5(red,white)]
+\definecolor [lightgreen] [r=0.5, g=1, b=0.5] % [.5(green,white)]
+\definecolor [lightblue] [r=0.5, g=0.5, b=1] % [.5(blue,white)]
+\definecolor [lightcyan] [r=0.5, g=1, b=1] % [.5(cyan,white)]
+\definecolor [lightmagenta] [r=1, g=0.5, b=1] % [.5(magenta,white)]
+\definecolor [lightyellow] [r=1, g=1, b=0.5] % [.5(yellow,white)]
\definecolor [middlered] [r=.8, g=0, b=0]
\definecolor [middlegreen] [r=0, g=.8, b=0]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv
index c489635deca..d031c4bfe44 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkiv
@@ -144,7 +144,7 @@
\edef\currenttransparencyname{#1}%
% the \relax catches a non existent csname
\ifx\currenttransparencyname\v!reset
- \attribute\transparencyattribute\attributeunsetvalue
+ \c_attr_transparency\attributeunsetvalue
\else
\begincsname\??transparencysetter\currenttransparencyname\endcsname\relax
\fi
@@ -154,7 +154,7 @@
{\begingroup
\edef\currenttransparencyname{#1}%
\ifx\currenttransparencyname\v!reset
- \attribute\transparencyattribute\attributeunsetvalue
+ \c_attr_transparency\attributeunsetvalue
\else
\begincsname\??transparencysetter\currenttransparencyname\endcsname\relax
\fi}
@@ -257,7 +257,7 @@
{\begingroup
\colo_helpers_activate{#1}%
\normalexpanded{\endgroup\edef\noexpand#2%
- {\ifnum\attribute\colorattribute=\attributeunsetvalue\else\number\attribute\colorattribute\fi}}}
+ {\ifnum\c_attr_color=\attributeunsetvalue\else\number\c_attr_color\fi}}}
\let\grey\graycolor % these macros are only used in tracing
@@ -354,9 +354,9 @@
\unexpanded\def\pushcolor[#1]%
{\global\advance\c_colo_nesting\plusone
\expandafter\edef\csname\??colorstack\number\c_colo_nesting\endcsname
- {\attribute\colormodelattribute \the\attribute\colormodelattribute
- \attribute\colorattribute \the\attribute\colorattribute
- \attribute\transparencyattribute\the\attribute\transparencyattribute
+ {\c_attr_colormodel \the\c_attr_colormodel
+ \c_attr_color \the\c_attr_color
+ \c_attr_transparency\the\c_attr_transparency
\relax}% stack
\colo_helpers_activate{#1}}
@@ -370,12 +370,12 @@
\newcount\c_colo_saved_attribute_transparency
\unexpanded\def\savecolor
- {\c_colo_saved_attribute_color \attribute\colorattribute
- \c_colo_saved_attribute_transparency\attribute\transparencyattribute}
+ {\c_colo_saved_attribute_color \c_attr_color
+ \c_colo_saved_attribute_transparency\c_attr_transparency}
\unexpanded\def\restorecolor
- {\attribute\colorattribute \c_colo_saved_attribute_color
- \attribute\transparencyattribute\c_colo_saved_attribute_transparency}
+ {\c_attr_color \c_colo_saved_attribute_color
+ \c_attr_transparency\c_colo_saved_attribute_transparency}
%D In this documentation we will not go into too much details on palets. Curious
%D users can find more information on this topic in \from[use of color].
@@ -491,15 +491,6 @@
\expandafter\colo_palets_define_a
\fi}
-% \unexpanded\def\colo_palets_define_a[#1][#2][#3]%
-% {\colo_palet_prepare{#1}%
-% \doifelseassignment{#2}
-% {\setevalue{\??colorpaletspecification#1}{#2}%
-% \processcommalist[#2]{\colo_palets_define_one{#1}}}
-% {\ifcsname\??colorpaletspecification#2\endcsname
-% \normalexpanded{\colo_palets_define[#1][\lastnamedcs]}%
-% \fi}}
-
\unexpanded\def\colo_palets_define_a[#1][#2][#3]%
{\colo_palet_prepare{#1}%
\ifcondition\validassignment{#2}%
@@ -517,11 +508,6 @@
\colo_palet_extend{#2}%
\colo_palets_define_assign{#1}{#2}{#3}}
-% \def\colo_palets_define_one#1#2% get rid of { }
-% {\doifelseassignment{#2} % catch empty entries
-% {\colo_palets_define_two{#1}[#2]}
-% {\colo_palets_define_three{#1}{#2}}}
-
\def\colo_palets_define_one#1#2% get rid of { }
{\ifcondition\validassignment{#2}% catch empty entries
\colo_palets_define_two{#1}[#2]%
@@ -558,21 +544,6 @@
\unexpanded\def\setuppalet
{\dosingleempty\colo_palets_setup}
-% \def\colo_palets_setup[#1]%
-% {\edef\currentcolorpalet{#1}%
-% \ifx\currentcolorpalet\empty
-% % seems to be a reset
-% \let\currentcolorprefix\empty
-% \else\ifcsname\??paletlist\currentcolorpalet\endcsname
-% \edef\currentcolorprefix{#1:}%
-% \else
-% \colo_helpers_show_message\m!colors7\currentcolorpalet
-% \let\currentcolorpalet\empty
-% \let\currentcolorprefix\empty
-% \fi\fi
-% \the\everysetuppalet
-% \colo_helpers_initialize_maintextcolor}
-
% \newtoks\t_colo_prefix % used in mp interface
\def\colo_palets_setup[#1]%
@@ -678,10 +649,10 @@
% {\edef#1{\negatedcolorcomponent{#1}}}
\unexpanded\def\negatecolorcomponent#1% #1 = \macro
- {\edef#1{\clf_negatecolorcomponent{#1}}}
+ {\edef#1{\clf_negatedcolorcomponent{#1}}}
\def\negatedcolorcomponent#1%
- {\clf_negatecolorcomponent{#1}}
+ {\clf_negatedcolorcomponent{#1}}
%D \macros
%D {MPcolor}
@@ -859,15 +830,15 @@
\unexpanded\def\deactivatecolor % sort of public but a bad name
{\let\currentcolorname\s!black
- \attribute\colorattribute\attributeunsetvalue
- \attribute\transparencyattribute\attributeunsetvalue}
+ \c_attr_color \attributeunsetvalue
+ \c_attr_transparency\attributeunsetvalue}
% todo: check if color is overloading a non-color command
% \let\colo_basics_synchronize\gobbleoneargument % used in mp interface
% \let\colo_basics_inherit \gobbletwoarguments % used in mp interface
-\def\colo_basics_allocate#1% todo: use a chardef instead
+\def\colo_basics_allocate#1%
{\expandafter\newcount\csname\??colornumber#1\endcsname
\clf_synccolorcount{#1}\c_syst_last_allocated_count}
@@ -1136,9 +1107,8 @@
%D \stopregistercolor
%D \stoptyping
-\let\maintextcolor \empty
-\def\defaulttextcolor {black}
-\def\s!themaintextcolor{themaintextcolor}
+\let\maintextcolor \empty
+\def\defaulttextcolor{black}
\unexpanded\def\inheritmaintextcolor
{\ifx\maintextcolor\empty\else\colo_helpers_activate\maintextcolor\fi}
@@ -1208,18 +1178,6 @@
\fi
\to \everysetupcolors
-% \def\colo_palets_define_set#1#2#3%
-% {\doifelseassignment{#3}% \definepalet[test][xx={y=.4}]
-% {\colo_palets_define_assign}%
-% {\ifcsname\??colorsetter#3\endcsname
-% % \definepalet[test][xx=green]
-% \expandafter\colo_palets_define_inherit
-% \else
-% % not entered when making format
-% \expandafter\colo_palets_define_undefine
-% \fi}%
-% {#1}{#2}{#3}}
-
\def\colo_palets_define_set#1#2#3%
{\ifcondition\validassignment{#3}% \definepalet[test][xx={y=.4}]
\expandafter\colo_palets_define_assign
@@ -1252,8 +1210,8 @@
\colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{\??colorpalet#1:#2}}%
\colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{\??colorpalet#1:#2}}}
-\setvalue{\??colorattribute currentcolor}{\the\attribute\colorattribute} % for mpcolor
-\setvalue{\??transparencyattribute currentcolor}{\the\attribute\transparencyattribute} % for mpcolor
+\setvalue{\??colorattribute currentcolor}{\the\c_attr_color} % for mpcolor
+\setvalue{\??transparencyattribute currentcolor}{\the\c_attr_transparency} % for mpcolor
%def\colo_helpers_inherited_current_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
%def\colo_helpers_inherited_current_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname}
@@ -1267,10 +1225,10 @@
%D Low level defs:
-\unexpanded\def\colordefalc#1#2{\setevalue{\??colorattribute #1}{#2}\setvalue {\??colorsetter #1}{\attribute\colorattribute #2 }}
-\unexpanded\def\colordefagc#1#2{\setxvalue{\??colorattribute #1}{#2}\setgvalue{\??colorsetter #1}{\attribute\colorattribute #2 }} % was not g
-\unexpanded\def\colordefalt#1#2{\setevalue{\??transparencyattribute#1}{#2}\setvalue {\??transparencysetter#1}{\attribute\transparencyattribute#2 }}
-\unexpanded\def\colordefagt#1#2{\setxvalue{\??transparencyattribute#1}{#2}\setgvalue{\??transparencysetter#1}{\attribute\transparencyattribute#2 }}
+\unexpanded\def\colordefalc#1#2{\setevalue{\??colorattribute #1}{#2}\setvalue {\??colorsetter #1}{\c_attr_color #2 }}
+\unexpanded\def\colordefagc#1#2{\setxvalue{\??colorattribute #1}{#2}\setgvalue{\??colorsetter #1}{\c_attr_color #2 }} % was not g
+\unexpanded\def\colordefalt#1#2{\setevalue{\??transparencyattribute#1}{#2}\setvalue {\??transparencysetter#1}{\c_attr_transparency#2 }}
+\unexpanded\def\colordefagt#1#2{\setxvalue{\??transparencyattribute#1}{#2}\setgvalue{\??transparencysetter#1}{\c_attr_transparency#2 }}
\unexpanded\def\colordefflc#1#2{\setvalue {\??colorattribute #1}{\colo_helpers_inherited_current_ca{#2}}\setvalue {\??colorsetter #1}{\colo_helpers_inherited_current_cs{#2}}}
\unexpanded\def\colordeffgc#1#2{\setgvalue{\??colorattribute #1}{\colo_helpers_inherited_current_ca{#2}}\setvalue {\??colorsetter #1}{\colo_helpers_inherited_current_cs{#2}}}
@@ -1308,13 +1266,13 @@
\def\MPcolor#1%
{\clf_mpcolor
- \attribute\colormodelattribute
+ \c_attr_colormodel
\colo_helpers_inherited_current_ca{#1} %
\colo_helpers_inherited_current_ta{#1} }
\def\MPcoloronly#1%
{\clf_mpcolor
- \attribute\colormodelattribute
+ \c_attr_colormodel
\colo_helpers_inherited_current_ca{#1} %
\zerocount}
@@ -1326,11 +1284,11 @@
\def\MPoptions#1%
{\clf_mpoptions
- \attribute\colormodelattribute
+ \c_attr_colormodel
\colo_helpers_inherited_current_ca{#1} %
\colo_helpers_inherited_current_ta{#1} }
-\def\thecolormodelattribute {\the\attribute\colormodelattribute}
+\def\thecolormodelattribute {\the\c_attr_colormodel}
%def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
%def\thetransparencyattribute#1{\number\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
@@ -1380,7 +1338,11 @@
% \normal added else fails in metafun manual (leaders do a hard scan)
-\unexpanded\def\forcecolorhack{\leaders\hrule\hskip\zeropoint\relax} % relax is needed !
+% \unexpanded\def\forcecolorhack{\leaders\hrule\hskip\zeropoint\relax} % relax is needed !
+%
+% I really need to sort this out!
+
+\unexpanded\def\forcecolorhack{\leaders\hrule height\zeropoint depth\zeropoint\hskip\zeropoint\relax} % relax is needed !
%D We default to the colors defined in \type {colo-imp-rgb} and
%D support both \RGB\ and \CMYK\ output. Transparencies are defined
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv
index aa7d9ddb314..edef8dbc82f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-fil.mkiv
@@ -149,9 +149,4 @@
%definefilesynonym [set-13] [setups-proofing]
%definefilesynonym [set-15] [setups-generate]
-\ifcase\contextlmtxmode \else
- \definefilesynonym [ecmascript] [libs-imp-mujs]
- \definefilesynonym [zint] [libs-imp-zint]
-\fi
-
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv
index 75d87eb81d9..a6cd1cc2fed 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-log.mkiv
@@ -149,25 +149,29 @@
\def\syst_logos_meta_hyphen % there is no hyphenchar in this font
{\discretionary{\vrule\s!height.33\emwidth\s!depth-.27\emwidth\s!width.33\emwidth}{}{}}
-\unexpanded\def\MetaFont
+\unexpanded\def\MetaFontLogo
{\dontleavehmode
\begingroup
\setMFPfont META\syst_logos_meta_hyphen FONT%
\endgroup}
-% \unexpanded\def\MetaPost
+\unexpanded\def\MetaPostLogo
+ {\dontleavehmode
+ \begingroup
+ \setMFPfont META\syst_logos_meta_hyphen POST%
+ \endgroup}
+
+% \protected\def\MetaFunLogo
% {\dontleavehmode
% \begingroup
-% \setMFPfont META\syst_logos_meta_hyphen POST%
+% \setMFPfont META\syst_logos_meta_hyphen FUN%
% \endgroup}
-%
-% As decided on the ConText Meeting 2013 the logo has been simplified:
-\unexpanded\def\MetaPost
- {MetaPost}
+% As decided on the ConText Meeting 2013 the logo has been simplified:
-\unexpanded\def\MetaFun
- {MetaFun}
+\unexpanded\def\MetaFont{MetaFont}
+\unexpanded\def\MetaPost{MetaPost}
+\unexpanded\def\MetaFun {MetaFun}
%D \macros
%D {TEX, METAFONT, METAPOST, METAFUN,
@@ -289,7 +293,7 @@
\unexpanded\def\MPXL{MpXL} % MarkFourty : LuaMetaFun
\unexpanded\def\MPLX{MpLX} % MarkSixty : LuaMetaFun
-\unexpanded\def\LMTX{lmtx} % for LuaMetaTeX
+\unexpanded\def\LMTX{LMTX} % for LuaMetaTeX
\appendtoks
\def\ConTeXt {ConTeXt}%
@@ -302,7 +306,7 @@
\def\LuaTeX {LuaTeX}%
\def\LuajitTeX {LuajitTeX}%
\def\LuaMetaTeX{LuaMetaTeX}%
- \let\wordboundary\empty
+ %\let\wordboundary\empty % primitive so we need to promote it to frozen (orjust preroll)
\to \everysimplifycommands
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
index 7d76e05de80..89ef1e6c3bd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
@@ -13,16 +13,23 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2020.03.10 14:44}
+\newcontextversion{2021.03.05 19:11}
-%D This file is loaded at runtime, thereby providing an excellent place for
-%D hacks, patches, extensions and new features.
+%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
+%D (which has always been the case) and experimental code in cont-exp (which is also
+%D so old that I need to remind myself to check it occasionally, so here is the
+%D reminder).
+
+% \enabletrackers[pages.timing]
+% \enabletrackers[system.usage=summary]
\unprotect
\writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
-% math-ini.mkiv
+%D I need to verify if this indeed will make it into \type {math-ini.mkiv}, that is:
+%D does Alan use it?
\ifdefined\t \else \unexpanded\def\t{\mathortext\text\mathtext} \fi
\ifdefined\w \else \unexpanded\def\w{\mathortext\word\mathword} \fi
@@ -32,8 +39,6 @@
\let\w\mathword
\to \everymathematics
-% \let\assumelongusagecs\relax % todo: fails on legends-001.tex
-
-% done
+%D We're done.
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua b/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua
index 9a2b3db965c..0d8d7969145 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua
@@ -9,27 +9,27 @@ if not modules then modules = { } end modules ['cont-run'] = {
-- When a style is loaded there is a good change that we never enter
-- this code.
-local report = logs.reporter("system")
local type, tostring = type, tostring
-local report = logs.reporter("sandbox","call")
-local fastserialize = table.fastserialize
-local quoted = string.quoted
-local possiblepath = sandbox.possiblepath
-
-local context = context
-local implement = interfaces.implement
-
-local qualified = { }
-local writeable = { }
-local readable = { }
-local blocked = { }
-local trace_files = false
-local trace_calls = false
-local nofcalls = 0
-local nofrejected = 0
-local logfilename = "sandbox.log"
+local report_sandbox = logs.reporter("sandbox","call")
+local report_system = logs.reporter("system")
+local fastserialize = table.fastserialize
+local quoted = string.quoted
+local possiblepath = sandbox.possiblepath
+
+local context = context
+local implement = interfaces.implement
+
+local qualified = { }
+local writeable = { }
+local readable = { }
+local blocked = { }
+local trace_files = false
+local trace_calls = false
+local nofcalls = 0
+local nofrejected = 0
+local logfilename = "sandbox.log"
local function registerstats()
statistics.register("sandboxing", function()
@@ -82,7 +82,7 @@ local function logsandbox(details)
end
end
if trace_calls then
- report("%s(%,t) => %l",details.comment,arguments,result)
+ report_sandbox("%s(%,t) => %l",details.comment,arguments,result)
end
nofcalls = nofcalls + 1
if not result then
@@ -146,7 +146,7 @@ local debugging = environment.arguments.debug
if sandboxing then
- report("enabling sandbox")
+ report_system("enabling sandbox")
sandbox.enable()
@@ -169,7 +169,7 @@ if sandboxing then
context [[\let\primitive\relax\let\normalprimitive\relax]]
debug = {
- traceback = traceback,
+ traceback = debug.traceback,
}
package.loaded.debug = debug
@@ -181,20 +181,26 @@ elseif debugging then
else
debug = {
- traceback = traceback,
- getinfo = getinfo,
- sethook = sethook,
+ traceback = debug.traceback,
+ getinfo = debug.getinfo,
+ sethook = debug.sethook,
}
package.loaded.debug = debug
end
-local preparejob preparejob = function() -- tricky: we need a hook for this
+local function processjob()
+
+ tokens.setters.macro("processjob","") -- make a
+
+ environment.initializefilenames() -- todo: check if we really need to pre-prep the filename
local arguments = environment.arguments
+ local suffix = environment.suffix
+ local filename = environment.filename -- hm, not inputfilename !
- environment.lmtxmode = CONTEXTLMTXMODE
+ environment.lmtxmode = false
if arguments.nosynctex then
luatex.synctex.setup {
@@ -207,55 +213,6 @@ local preparejob preparejob = function() -- tricky: we need a hook for this
}
end
- -- -- todo: move from mtx-context to here:
- --
- -- local timing = arguments.timing
- -- if type(timing) == "string" then
- -- context.usemodule { timing }
- -- end
- -- local nodates = arguments.nodates
- -- if nodates then
- -- context.enabledirectives { "backend.date=" .. (type(nodates) == "string" and nodates or "no") }
- -- end
- -- local trailerid = arguments.trailerid
- -- if type(trailerid) == "string" then
- -- context.enabledirectives { "backend.trailerid=" .. trailerid }
- -- end
- -- local profile = arguments.profile
- -- if profile then
- -- context.enabledirectives { "system.profile=" .. tonumber(profile) or 0 }
- -- end
-
- -- -- already done in mtxrun / mtx-context, has to happen very early
- --
- -- if arguments.silent then
- -- directives.enable("logs.blocked",arguments.silent)
- -- end
- --
- -- -- already done in mtxrun / mtx-context, can as well happen here
- --
- -- if arguments.errors then
- -- directives.enable("logs.errors",arguments.errors)
- -- end
-
- preparejob = function() end
-
- job.prepare = preparejob
-
-end
-
-job.prepare = preparejob
-
-local function processjob()
-
- environment.initializefilenames() -- todo: check if we really need to pre-prep the filename
-
- local arguments = environment.arguments
- local suffix = environment.suffix
- local filename = environment.filename -- hm, not inputfilename !
-
- preparejob()
-
if not filename or filename == "" then
-- skip
elseif suffix == "xml" or arguments.forcexml then
@@ -264,7 +221,7 @@ local function processjob()
-- can be part of (any) loaded (sub) file. The \starttext
-- wrapping might go away.
- report("processing as xml: %s",filename)
+ report_system("processing as xml: %s",filename)
context.starttext()
context.xmlprocess("main",filename,"")
@@ -272,7 +229,7 @@ local function processjob()
elseif suffix == "cld" or arguments.forcecld then
- report("processing as cld: %s",filename)
+ report_system("processing as cld: %s",filename)
context.runfile(filename)
@@ -281,7 +238,7 @@ local function processjob()
-- The wrapping might go away. Why is is it there in the
-- first place.
- report("processing as lua: %s",filename)
+ report_system("processing as lua: %s",filename)
context.starttext()
context.ctxlua(string.format('dofile("%s")',filename))
@@ -289,7 +246,7 @@ local function processjob()
elseif suffix == "mp" or arguments.forcemp then
- report("processing as metapost: %s",filename)
+ report_system("processing as metapost: %s",filename)
context.starttext()
context.processMPfigurefile(filename)
@@ -306,7 +263,7 @@ local function processjob()
elseif suffix == "mps" or arguments.forcemps then
- report("processing metapost output: %s",filename)
+ report_system("processing metapost output: %s",filename)
context.starttext()
context.startTEXpage()
@@ -331,6 +288,7 @@ end
implement {
name = "processjob",
+ public = true,
onlyonce = true,
actions = processjob,
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv
index f841ce53033..12c12e0d93a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-run.mkiv
@@ -53,4 +53,12 @@
\unexpanded\def\blocksynctexfile[#1]%
{\processcommacommand{#1}\synctexblockfilename}
+\def\continuewhenlmtxmode
+ {\starttext
+ \startTEXpage[\c!offset=2ex,\c!foregroundstyle=\tttf]%
+ This file needs \LuaMetaTeX\ and \ConTeXt\ \LMTX.%
+ \stopTEXpage
+ \stoptext
+ \endinput}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv b/Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv
index 0b7f3231baf..d17c4878cae 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv
@@ -11,89 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% At some point I will reconsider the \starttext .. \stoptext
-% wraping as we can assume proper styling. It's a left-over from
-% mkii that we need to get rid of.
-
-% now moved to cont-run.lua
-%
-% \startluacode
-%
-% -- When a style is loaded there is a good change that we never enter
-% -- this code.
-%
-% local report = logs.reporter("system")
-%
-% environment.initializefilenames() -- todo: check if we really need to pre-prep the filename
-%
-% local arguments = environment.arguments
-% local suffix = environment.suffix
-% local filename = environment.filename -- hm, not inputfilename !
-%
-% if suffix == "xml" or arguments.forcexml then
-%
-% -- Maybe we should move the preamble parsing here as it
-% -- can be part of (any) loaded (sub) file. The \starttext
-% -- wrapping might go away.
-%
-% report("processing as xml: %s",filename)
-%
-% context.starttext()
-% context.xmlprocess("main",filename,"")
-% context.stoptext()
-%
-% elseif suffix == "cld" or arguments.forcecld then
-%
-% report("processing as cld: %s",filename)
-%
-% context.runfile(filename)
-%
-% elseif suffix == "lua" or arguments.forcelua then
-%
-% -- The wrapping might go away. Why is is it there in the
-% -- first place.
-%
-% report("processing as lua: %s",filename)
-%
-% context.starttext()
-% context.ctxlua(string.format('dofile("%s")',filename))
-% context.stoptext()
-%
-% elseif suffix == "mp" or arguments.forcemp then
-%
-% report("processing as metapost: %s",filename)
-%
-% context.starttext()
-% context.processMPfigurefile(filename)
-% context.stoptext()
-%
-% -- elseif suffix == "prep" then
-% --
-% -- -- Why do we wrap here. Because it can be xml? Let's get rid
-% -- -- of prepping in general.
-% --
-% -- context.starttext()
-% -- context.input(filename)
-% -- context.stoptext()
-%
-% else
-%
-% -- \writestatus{system}{processing as tex}
-% -- We have a regular tex file so no \starttext yet as we can
-% -- load fonts.
-%
-% -- context.enabletrackers { "resolvers.*" }
-% context.input(filename)
-% -- context.disabletrackers { "resolvers.*" }
-%
-% end
-%
-% context.finishjob()
-%
-% \stopluacode
-
-% We don't want to be in protected mode!
-
-\getvalue{clf_processjob} % from cont-run.lua
+\processjob
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context-characters.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-characters.lmx
deleted file mode 100644
index f018e412ba9..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/context-characters.lmx
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<!--
- filename : context-characters.lmx
- comment : companion to context.tex
- author : Hans Hagen, PRAGMA-ADE, Hasselt NL
- copyright: PRAGMA ADE / ConTeXt Development Team
- license : see context related readme files
--->
-
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <script type='text/javascript'>
- <!--
- window.focus();
- -->
- </script>
- <title><?lua pv('title') ?></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <style type="text/css">
- <!--
- <?lmx-include context.css ?>
- #type {
- text-align: center ;
- }
- #variable {
- width: 10em ;
- text-align: right ;
- margin-right: 1em ;
- }
- #value {
- text-align: left ;
- }
- -->
- </style>
- </head>
- <body> <!-- onclick="location.reload()" -->
- <div id="top"><div id="top-one"><div id="top-two">
- <?lua pv('title') ?>
- </div></div></div>
- <div id="left"><div id="left-one"><div id="left-two">
- <!-- empty -->
- </div></div></div>
- <div id="right"><div id="right-safari"><div id="right-one"><div id="right-two"><div id="right-three"><div id="right-four"><div id="right-five">
- <!-- empty -->
- </div></div></div></div></div></div></div>
- <div id="right"><div id="right-safari"><div id="right-one"><div id="right-two"><div id="right-three"><div id="right-four"><div id="right-five"></div></div></div></div></div></div></div>
- <div id="main"><div id='main-settings'>
- <?lmx-define-begin chr-head ?>
- <tr>
- <th><div id="value">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th colspan='2'><div id="value">characters&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th colspan='2'><div id="value">unicodes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th colspan='2'><div id="value">indices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th colspan='1'><div id="value">fonts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- </tr>
- <tr>
- <th><div id="value">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th><div id="value">before utf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th><div id="value">after utf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th><div id="value">before hex&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th><div id="value">after hex&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th><div id="value">after hex&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th><div id="value">after dec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- <th><div id="value">filename&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th>
- </tr>
- <?lmx-define-end ?>
- <?lmx-define-begin chr-body ?>
- <tr>
- <td valign="top"><div id="value"><?lua t((nodes.tracers.characters.equal(v.before,v.after) and "=") or "!") ?></div></td>
- <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.string(v.before)) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
- <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.string(v.after)) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
- <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.unicodes(v.before)) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
- <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.unicodes(v.after)) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
- <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.indices(v.after)) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
- <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.indices(v.after,true)) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
- <td valign="top"><div id="value"><?lua t(nodes.tracers.characters.fonts(v.after)) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
- </tr>
- <?lmx-define-end ?>
- <?lmx-define-begin chr-none ?>
- <tr>
- <td><br/></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <?lmx-define-end ?>
- <?lua if tracers.knownlist('characters') then ?>
- <h1>Processed Words</h1>
- <table>
- <?lmx-resolve chr-head ?>
- <?lua for k,v in pairs(tracers.list['characters']) do if v.before and v.after then ?>
- <?lmx-resolve chr-body ?>
- <?lua else ?>
- <?lmx-resolve chr-none ?>
- <?lua end end ?>
- </table>
- <br/>
- <?lua end ?>
- </div></div>
- <div id="bottom"><div id="bottom-one"><div id="bottom-two">
- Job Name: <?lua p(environment.jobname) ?> &nbsp;&nbsp;&nbsp;
- ConTeXt Version: <?lua p(environment.version) ?> &nbsp;&nbsp;&nbsp;
- </div></div></div>
- </body>
-</html>
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context-debug.lmx b/Master/texmf-dist/tex/context/base/mkiv/context-debug.lmx
deleted file mode 100644
index 51b18c83729..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/context-debug.lmx
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<!--
- filename : context-debug.lmx
- comment : companion to context.tex
- author : Hans Hagen, PRAGMA-ADE, Hasselt NL
- copyright: PRAGMA ADE / ConTeXt Development Team
- license : see context related readme files
--->
-
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <script type='text/javascript'>
- <!--
- window.focus();
- -->
- </script>
- <title><?lua pv('title') ?></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <style type="text/css">
- <!--
- <?lmx-include context.css ?>
- #type {
- text-align: center ;
- }
- #variable {
- width: 10em ;
- text-align: right ;
- margin-right: 1em ;
- }
- #value {
- text-align: left ;
- }
- -->
- </style>
- </head>
- <body>
- <div id="top"><div id="top-one"><div id="top-two">
- <?lua pv('title') ?>
- </div></div></div>
- <div id="left"><div id="left-one"><div id="left-two">
- <!-- empty -->
- </div></div></div>
- <div id="right"><div id="right-safari"><div id="right-one"><div id="right-two"><div id="right-three"><div id="right-four"><div id="right-five">
- <!-- empty -->
- </div></div></div></div></div></div></div>
- <div id="main"><div id='main-settings'>
- <?lua if tracers.knownlist('scratch') then ?>
- <h1>Scratch Variables</h1>
- <table>
- <tr>
- <th align='middle'>index</th>
- <th align='middle'>&nbsp;&nbsp;&nbsp;dimen</th>
- <th align='middle'>&nbsp;&nbsp;&nbsp;count</th>
- <th align='left' >&nbsp;&nbsp;&nbsp;toks</th>
- </tr>
- <?lua for k,v in pairs(tracers.list['scratch']) do ?>
- <tr>
- <th align='middle'><?lua t(v) ?></th>
- <th align='middle'>&nbsp;&nbsp;&nbsp;<?lua t(tracers.dimen(v)) ?></th>
- <th align='middle'>&nbsp;&nbsp;&nbsp;<?lua t(tracers.count(v)) ?></th>
- <th align='left' >&nbsp;&nbsp;&nbsp;<?lua t(tracers.toks (v)) ?></th>
- </tr>
- <?lua end ?>
- </table>
- <br/>
- <?lua end ?>
- <?lmx-define-begin tvv-head ?>
- <tr>
- <th><div id="type" >type </div></th>
- <th><div id="variable">variable</div></th>
- <th><div id="value" >value </div></th>
- </tr>
- <?lmx-define-end ?>
- <?lmx-define-begin tvv-body ?>
- <tr>
- <th><div id="type" ><?lua t(tracers.type(v)) ?></div></th>
- <th><div id="variable"><?lua t(tracers.name(v)) ?></div></th>
- <th><div id="value" ><?lua t(tracers.cs(v)) ?></div></th>
- </tr>
- <?lmx-define-end ?>
- <?lua if tracers.knownlist('internals') then ?>
- <h1>Internal Variables</h1>
- <table>
- <?lmx-resolve tvv-head ?>
- <?lua for k,v in pairs(tracers.list['internals']) do ?>
- <?lmx-resolve tvv-body ?>
- <?lua end ?>
- </table>
- <br/>
- <?lua end ?>
- <?lua if tracers.knownlist('context') then ?>
- <h1>ConTeXt Variables</h1>
- <table>
- <?lmx-resolve tvv-head ?>
- <?lua for k,v in pairs(tracers.list['context']) do ?>
- <?lmx-resolve tvv-body ?>
- <?lua end ?>
- </table>
- <br/>
- <?lua end ?>
- </div></div>
- <div id="bottom"><div id="bottom-one"><div id="bottom-two">
- Job Name: <?lua p(environment.jobname) ?> &nbsp;&nbsp;&nbsp;
- ConTeXt Version: <?lua p(environment.version) ?> &nbsp;&nbsp;&nbsp;
- Real Page: <?lua p(tracers.cs('c:realpageno')) ?> &nbsp;&nbsp;&nbsp;
- Page: <?lua p(tracers.cs('c:pageno')) ?> &nbsp;&nbsp;&nbsp;
- </div></div></div>
- </body>
-</html>
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context-performance.tex b/Master/texmf-dist/tex/context/base/mkiv/context-performance.tex
index dd376866496..8b6ef11b2f6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/context-performance.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/context-performance.tex
@@ -1,5 +1,3 @@
-% language=uk
-
\usemodule[art-01,abr-01]
\starttext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context.lus b/Master/texmf-dist/tex/context/base/mkiv/context.lus
deleted file mode 100644
index 960e96adf7c..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/context.lus
+++ /dev/null
@@ -1,71 +0,0 @@
-if not modules then modules = { } end modules ['context'] = {
- version = 1.001,
- comment = "companion to context.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
---[[<p>This table specifies what stub files are needed in order to create
-the format. These files are loaded before the format is made so that we
-bypass kpse. When the format itself is used, another stub is used (with
-suffix lui). The current format builder is to a large part determined by
-the way luatex evolved and the process will probaby change.</p>]]--
-
-local method = 3
-
-local stubfiles = {
-
- 'luat-cod.lua',
-
- -- Here follows a list of trac, luat and data files, but we don't
- -- it this way any more so there is no need to keep this updated.
-
-}
-
--- This method will trigger the creation of a stub file with all neccessary
--- libraries merged. This is how we originally did it.
-
-if method == 1 then
-
- return stubfiles
-
-end
-
--- This method will use this file as stub file so no merge is needed.
-
-if method == 2 then
-
- if resolvers then
- -- we're loading this file in mtxrun
- else
-
- local sourcepath = string.gsub(arg and arg[1] or "","/[^/]+$","")
- local targetpath = "."
-
- if sourcepath == "" then sourcepath = targetpath end
-
- for i=1,#stubfiles do
- local filename = sourcepath .. "/" .. stubfiles[i]
- texio.write_nl("preloading " .. filename)
- dofile(filename)
- end
- texio.write_nl("\n")
-
- end
-
- return "context.lus"
-
-end
-
--- Only a simple stub:
-
-if method == 3 then
-
- return "luat-cod.lua"
-
-end
-
--- The last resort.
-
-return stubfiles
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context.mkiv b/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
index ff4c7f6c6b7..49eb150497e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
@@ -45,8 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.03.10 14:44}
-\edef\contextkind {beta}
+\edef\contextversion{2021.03.05 19:11}
%D Kind of special:
@@ -92,7 +91,6 @@
%D now put it into the environment.
\newtoks\contextversiontoks \contextversiontoks\expandafter{\contextversion}
-\newtoks\contextkindtoks \contextkindtoks \expandafter{\contextkind}
% \normaleverypar{\wait} % uncomment for test of funny injections
@@ -135,7 +133,7 @@
\loadmkvifile{file-ini}
\loadmkvifile{file-res}
-\loadmkvifile{file-lib}
+\loadmkivfile{file-lib}
%D This needs more checking for clashes:
%D
@@ -162,7 +160,7 @@
% \loadmarkfile{luat-ini}
-\loadmarkfile{toks-tra}
+%loadmarkfile{toks-tra}
\loadmarkfile{toks-aux}
%loadmarkfile{toks-map} % obsolete, never used
@@ -196,8 +194,6 @@
\loadmarkfile{trac-tex}
\loadmarkfile{trac-deb} % will move up
-%loadmarkfile{blob-ini} % not to be used, we only use a helper
-
\loadmarkfile{supp-box}
\loadmarkfile{supp-ran}
@@ -264,6 +260,7 @@
\loadmarkfile{lxml-sor}
\loadmkvifile{typo-prc}
+\loadmkivfile{typo-plc}
% \loadmarkfile{anch-pos}
@@ -429,7 +426,7 @@
\loadmarkfile{spac-chr} % depends on fonts
-\loadmarkfile{blob-ini} % not to be used, we only use a helper
+\loadmarkfile{blob-ini}
\loadmarkfile{trac-vis}
\loadmarkfile{trac-jus}
@@ -461,11 +458,10 @@
\loadmarkfile{symb-emj}
+\loadmarkfile{lang-tra}
\loadmarkfile{lang-wrd} % can be optional (discussion with mm sideeffect)
\loadmarkfile{lang-rep} % can be optional (bt 2013 side effect)
-\loadmarkfile{prop-ini} % only for downward compatibility
-
\loadmarkfile{mlib-ctx} % messy order
\loadmarkfile{meta-ini}
@@ -618,7 +614,7 @@
% \to \everyjob
\appendtoks
- \ctxlua{statistics.savefmtstatus("\jobname","\contextversion","context.mkiv","\contextkind","\contextbanner")}% can become automatic
+ \ctxlua{statistics.savefmtstatus("\jobname","\contextversion","context.mkiv","\contextbanner")}% can become automatic
\to \everydump
\errorstopmode \dump \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/context.mkxl b/Master/texmf-dist/tex/context/base/mkiv/context.mkxl
deleted file mode 100644
index 13e6a100b07..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/context.mkxl
+++ /dev/null
@@ -1,619 +0,0 @@
-%D \module
-%D [ file=context,
-%D version=2019.07.24, % 2008.28.10, % 1995.10.10,
-%D title=\CONTEXT,
-%D subtitle=\CONTEXT\ Format Generation,
-%D author=Hans Hagen, % ɦɑns ɦɑˈχən
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% http://build.contextgarden.net/waterfall?tag=c/lua(meta)tex
-
-%D Welcome to context, pronounced as kontekst (rather dutch) and not as conτεχt.
-
-\catcode`\{=1 \catcode`\}=2 \catcode`\#=6
-
-%D From the next string (which is set by the script that assembles the distribution)
-%D later on we will calculate a number that can be used by use modules to identify
-%D the feature level. Starting with version 2004.8.30 the low level interface is
-%D english. Watch out and adapt your styles an modules.
-
-% \everypar{\writestatus{!!!!}{some spurious input in line \the\inputlineno}\wait}
-
-%D The order of loading will change when all modules have been cleaned up and the
-%D dependencies are more consistent. Beware, the version number has to match \type
-%D {YYYY.MM.DD HH:MM} format.
-
-\edef\contextformat {\jobname}
-\edef\contextversion{2020.03.10 14:44}
-\edef\contextkind {beta}
-
-%D Kind of special:
-
-\chardef\contextlmtxmode\directlua{tex.print(CONTEXTLMTXMODE or 0)}\relax
-
-%D For those who want to use this:
-
-\let\fmtname \contextformat
-\let\fmtversion\contextversion
-
-%D Loading:
-
-\edef\mksuffix {mkiv}
-\edef\contextmark{MKIV}
-
-\ifx\normalinput\undefined \let\normalinput\input \fi
-
-\def\loadmarkfile#1{\normalinput{#1.\mksuffix}}
-\def\loadmkivfile#1{\normalinput{#1.mkiv}}
-\def\loadmkvifile#1{\normalinput{#1.mkvi}}
-\def\loadmkxlfile#1{\normalinput{#1.mkxl}}
-\def\loadmklxfile#1{\normalinput{#1.mklx}}
-
-%D First we load the system modules. These implement a lot of manipulation macros.
-%D We start with setting up some basic \TEX\ machinery.
-
-\loadmkxlfile{syst-ini} % LMTX
-
-%D We just quit if new functionality is expected.
-
-\ifnum\luatexversion<200 % also change message
- \writestatus{!!!!}{Your luametatex binary is too old, you need at least version 2.00!}
- \expandafter\end
-\fi
-
-%D Some checking (more primitives are now defined):
-
-\ifdefined\defaultinterface \else \def\defaultinterface {english} \fi
-%ifdefined\messageinterface \else \let\messageinterface \defaultinterface \fi
-\ifdefined\defaultlanguagetag \else \def\defaultlanguagetag{en} \fi
-
-%D There is only this way to pass the version info to \LUA\ (currently). Hm, we could
-%D now put it into the environment.
-
-\newtoks\contextversiontoks \contextversiontoks\expandafter{\contextversion}
-\newtoks\contextkindtoks \contextkindtoks \expandafter{\contextkind}
-
-% \normaleverypar{\wait} % uncomment for test of funny injections
-
-%D Now the more fundamental code gets defined.
-
-\loadmarkfile{norm-ctx}
-\loadmarkfile{syst-pln}
-\loadmarkfile{syst-mes}
-
-\loadmarkfile{luat-cod}
-\loadmarkfile{luat-bas}
-\loadmarkfile{luat-lib}
-\loadmarkfile{luat-soc}
-
-\loadmarkfile{catc-ini}
-\loadmarkfile{catc-act}
-\loadmarkfile{catc-def}
-\loadmarkfile{catc-ctx}
-\loadmarkfile{catc-sym}
-
-\loadmarkfile{toks-ini}
-\loadmarkfile{cldf-ini}
-
-% \tracecatcodetables
-
-%D From here on we have \unexpanded being \normalprotected, as we already had
-%D \type {\unexpanded} long before etex came around.
-
-\loadmarkfile{luat-ini}
-\loadmarkfile{toks-scn}
-
-\loadmkxlfile{syst-aux} % LMTX
-\loadmkxlfile{syst-lua} % LMTX
-\loadmkxlfile{syst-con} % LMTX
-
-\loadmarkfile{syst-fnt}
-\loadmarkfile{syst-rtp}
-
-\loadmarkfile{luat-usr}
-
-\loadmkvifile{file-ini}
-\loadmkvifile{file-res}
-\loadmkvifile{file-lib}
-
-\loadmkxlfile{core-lmt} % LMTX
-
-%D This needs more checking for clashes:
-%D
-%D \starttyping
-%D \doifelsefileexists{l-macro-imp-codes-luametatex.lua}{\registerctxluafile{l-macro-imp-codes-luametatex}{}}{}
-%D \stoptyping
-
-\loadmarkfile{supp-dir}
-
-\loadmarkfile{char-utf} % generic code (i.e. not much tex) ... could become unic-ini
-\loadmarkfile{char-ini} % tex / context specific
-\loadmarkfile{char-act} % even more specific
-
-\loadmarkfile{mult-ini}
-\loadmarkfile{mult-sys}
-\loadmkxlfile{mult-aux} % LMTX
-\loadmarkfile{mult-def}
-\loadmarkfile{mult-chk}
-\loadmkvifile{mult-dim}
-
-\loadmarkfile{cldf-int} % interface
-
-\loadmarkfile{trac-ctx} % maybe move up
-
-% \loadmarkfile{luat-ini}
-
-\loadmarkfile{toks-tra}
-\loadmarkfile{toks-aux}
-%loadmarkfile{toks-map} % obsolete, never used
-
-\loadmarkfile{attr-ini}
-
-\loadmarkfile{core-ini}
-\loadmarkfile{core-env}
-
-\loadmarkfile{layo-ini}
-
-\loadmarkfile{node-ini}
-
-\loadmarkfile{cldf-bas} % basics / depends on nodes
-
-\loadmkivfile{node-fin}
-\loadmarkfile{node-mig}
-%loadmarkfile{node-pag}
-
-\loadmkxlfile{driv-ini} % LMTX
-
-\loadmkxlfile{back-ini} % LMTX
-\loadmarkfile{back-res}
-\loadmarkfile{back-trf}
-\loadmkxlfile{back-out} % LMTX
-
-\loadmarkfile{attr-col}
-\loadmarkfile{attr-lay}
-\loadmarkfile{attr-neg}
-\loadmarkfile{attr-eff}
-\loadmarkfile{attr-mkr}
-
-\loadmarkfile{trac-tex}
-\loadmarkfile{trac-deb} % will move up
-
-%loadmarkfile{blob-ini} % not to be used, we only use a helper
-
-\loadmkxlfile{supp-box} % LMTX
-
-\loadmarkfile{supp-ran}
-\loadmarkfile{supp-mat}
-
-\loadmarkfile{core-uti}
-\loadmkvifile{file-job}
-
-\loadmarkfile{anch-pos}
-
-\loadmarkfile{typo-ini}
-\loadmarkfile{typo-lin}
-\loadmarkfile{typo-bld} % par builders
-
-\loadmarkfile{typo-inj}
-
-\loadmkvifile{file-syn}
-\loadmkvifile{file-mod}
-
-\loadmarkfile{core-sys}
-\loadmarkfile{core-con}
-
-\loadmarkfile{cont-fil}
-
-\loadmarkfile{regi-ini}
-\loadmarkfile{enco-ini}
-\loadmkxlfile{hand-ini}
-
-\loadmkxlfile{lang-ini} % LMTX
-\loadmarkfile{lang-hyp} % also loads dis
-\loadmkxlfile{lang-lab} % LMTX
-
-\loadmarkfile{unic-ini}
-
-% \loadmarkfile{core-uti}
-\loadmarkfile{core-two}
-\loadmarkfile{core-dat}
-
-\loadmkxlfile{colo-ini} % LMTX
-\loadmarkfile{colo-grp} % optional
-\loadmarkfile{colo-ext}
-
-\loadmarkfile{node-bck} % overloads anch-pgr (experimental and undocumented)
-
-\loadmarkfile{pack-cut}
-
-\loadmarkfile{lang-mis}
-\loadmarkfile{lang-url}
-\loadmarkfile{lang-def}
-
-% \loadmkvifile{file-job} % why so late?
-
-\loadmarkfile{symb-ini} % brrr depends on fonts
-
-\loadmarkfile{sort-ini}
-
-\loadmkvifile{pack-mis}
-\loadmkxlfile{pack-ori} % LMTX
-\loadmkxlfile{pack-rul} % LMTX
-\loadmarkfile{pack-mrl}
-\loadmkvifile{pack-bck}
-\loadmarkfile{pack-fen}
-
-\loadmarkfile{lxml-ini}
-\loadmarkfile{lxml-sor}
-
-\loadmkvifile{typo-prc}
-
-% \loadmarkfile{anch-pos}
-
-\loadmkvifile{strc-ini}
-\loadmarkfile{strc-tag}
-\loadmarkfile{strc-doc}
-\loadmarkfile{strc-num}
-\loadmarkfile{strc-mar}
-\loadmarkfile{strc-sbe}
-\loadmkvifile{strc-lst}
-\loadmarkfile{strc-sec}
-\loadmarkfile{strc-pag} % hm, depends on core-num
-\loadmarkfile{strc-ren}
-\loadmarkfile{strc-xml}
-\loadmarkfile{strc-def} % might happen later
-\loadmkvifile{strc-ref}
-%loadmarkfile{strc-reg}
-\loadmkvifile{strc-lev} % experiment
-
-\loadmarkfile{spac-hor}
-\loadmarkfile{spac-ali}
-\loadmarkfile{spac-flr}
-\loadmkxlfile{spac-ver} % LMTX beware, hooks into strc-sec
-\loadmarkfile{spac-lin}
-\loadmarkfile{spac-pag}
-\loadmarkfile{spac-par}
-\loadmarkfile{spac-def}
-\loadmkvifile{spac-prf}
-\loadmarkfile{spac-grd}
-
-%loadmarkfile{anch-pos}
-
-\loadmkvifile{scrn-ini}
-\loadmkvifile{scrn-ref}
-
-\loadmarkfile{pack-obj}
-
-\loadmklxfile{strc-itm} % LMTX
-
-\loadmkvifile{strc-con}
-\loadmkvifile{strc-des}
-\loadmkvifile{strc-enu}
-
-\loadmarkfile{strc-ind}
-\loadmarkfile{strc-lab}
-\loadmarkfile{strc-syn}
-
-% \loadmarkfile{core-sys}
-
-\loadmarkfile{page-var}
-\loadmkvifile{page-otr}
-\loadmarkfile{page-ini}
-\loadmarkfile{page-ins}
-\loadmarkfile{page-fac}
-\loadmarkfile{page-brk}
-\loadmarkfile{page-col}
-\loadmarkfile{page-inf}
-\loadmarkfile{page-flt}
-\loadmarkfile{page-bck}
-\loadmarkfile{page-not}
-\loadmarkfile{page-one}
-\loadmarkfile{page-lay}
-\loadmkvifile{page-box}
-\loadmklxfile{page-txt} % LMTX
-\loadmarkfile{page-sid} % when
-
-\loadmkvifile{strc-flt}
-
-\loadmarkfile{page-pst}
-\loadmkvifile{page-mbk}
-%loadmarkfile{page-mul} % \usecolumns[old-multicolumns]
-\loadmarkfile{page-mix}
-\loadmarkfile{page-smp}
-%loadmarkfile{page-set} % \usecolumns[old-columnsets]
-\loadmarkfile{page-cst}
-\loadmarkfile{page-pcl} % new
-\loadmkxlfile{pack-lyr} % LMTX
-\loadmarkfile{pack-pos}
-\loadmkvifile{page-mak}
-
-\loadmarkfile{strc-reg} % uses mixed columns
-
-\loadmkvifile{page-lin}
-\loadmarkfile{page-par}
-\loadmarkfile{typo-pag}
-\loadmarkfile{typo-mar}
-\loadmarkfile{typo-itm}
-
-\loadmarkfile{buff-ini}
-\loadmkxlfile{buff-ver} % LMTX
-\loadmkvifile{buff-par}
-
-\loadmarkfile{buff-imp-tex} % optional as also runtime if not loaded
-\loadmarkfile{buff-imp-mp} % optional as also runtime if not loaded
-\loadmarkfile{buff-imp-lua} % optional as also runtime if not loaded
-\loadmarkfile{buff-imp-xml} % optional as also runtime if not loaded
-
-\loadmarkfile{buff-imp-parsed-xml} % optional
-%loadmarkfile{buff-imp-parsed-lua} % optional
-
-\loadmarkfile{strc-blk}
-
-\loadmarkfile{page-imp}
-\loadmkvifile{page-sel} % optional
-\loadmkvifile{page-inj} % optional
-
-\loadmkvifile{scrn-pag}
-\loadmkvifile{scrn-wid}
-\loadmkvifile{scrn-but}
-\loadmkvifile{scrn-bar}
-
-\loadmarkfile{page-com} % optional (after scrn-pag)
-
-\loadmarkfile{strc-bkm} % bookmarks
-
-\loadmarkfile{java-ini}
-
-\loadmkvifile{scrn-fld}
-\loadmkvifile{scrn-hlp}
-
-\loadmarkfile{char-enc} % will move up
-
-\loadmkvifile{font-lib} % way too late but after language
-\loadmklxfile{font-fil} % LMTX
-\loadmkvifile{font-var}
-\loadmkvifile{font-fea}
-\loadmklxfile{font-mat} % LMTX
-\loadmklxfile{font-ini} % LMTX
-\loadmklxfile{font-sym} % LMTX
-\loadmklxfile{font-sty} % LMTX
-\loadmkvifile{font-set}
-\loadmklxfile{font-emp} % LMTX
-\loadmarkfile{font-pre}
-\loadmarkfile{font-unk}
-\loadmarkfile{font-tra}
-\loadmarkfile{font-chk}
-\loadmarkfile{font-uni}
-\loadmkvifile{font-col}
-\loadmkvifile{font-gds}
-\loadmkvifile{font-aux}
-\loadmkvifile{font-sel}
-
-\loadmarkfile{typo-tal}
-\loadmarkfile{typo-par} % par builders (uses fonts)
-
-\loadmarkfile{tabl-com}
-\loadmarkfile{tabl-pln}
-
-\loadmarkfile{tabl-tab} % thrd-tab stripped and merged
-
-\loadmkxlfile{tabl-tbl} % LMTX
-\loadmkxlfile{tabl-ntb} % LMTX
-\loadmarkfile{tabl-nte}
-\loadmarkfile{tabl-ltb}
-\loadmarkfile{tabl-frm}
-\loadmarkfile{tabl-tsp}
-\loadmkvifile{tabl-xtb}
-\loadmarkfile{tabl-mis}
-
-\loadmarkfile{typo-lan}
-
-\loadmarkfile{lxml-css}
-
-\loadmarkfile{spac-chr} % depends on fonts
-
-\loadmarkfile{blob-ini} % not to be used, we only use a helper
-
-\loadmarkfile{trac-vis}
-\loadmarkfile{trac-jus}
-
-\loadmarkfile{typo-cln}
-\loadmarkfile{typo-wrp}
-\loadmarkfile{typo-spa}
-\loadmarkfile{typo-krn}
-\loadmkvifile{typo-itc}
-\loadmarkfile{typo-dir}
-\loadmarkfile{typo-brk}
-\loadmarkfile{typo-cap}
-\loadmarkfile{typo-dig}
-\loadmarkfile{typo-rep}
-\loadmkvifile{typo-txt}
-\loadmarkfile{typo-drp}
-\loadmarkfile{typo-fln}
-\loadmarkfile{typo-sus}
-\loadmarkfile{typo-lig}
-\loadmarkfile{typo-chr}
-\loadmarkfile{typo-rub}
-\loadmkivfile{typo-fkr}
-\loadmkivfile{typo-pnc}
-
-\loadmklxfile{type-ini} % LMTX
-\loadmarkfile{type-set}
-
-\loadmarkfile{scrp-ini}
-
-\loadmarkfile{symb-emj}
-
-\loadmarkfile{lang-wrd} % can be optional (discussion with mm sideeffect)
-\loadmarkfile{lang-rep} % can be optional (bt 2013 side effect)
-
-\loadmarkfile{prop-ini} % only for downward compatibility
-
-\loadmkxlfile{mlib-ctx} % LMTX % messy order
-
-\loadmkxlfile{meta-ini} % LMTX
-\loadmarkfile{meta-tex}
-\loadmarkfile{meta-fun}
-\loadmkxlfile{meta-pag}
-\loadmarkfile{meta-grd}
-\loadmarkfile{meta-fnt}
-\loadmarkfile{meta-nod}
-\loadmarkfile{meta-lua}
-\loadmkxlfile{meta-mac} % LMTX
-
-\loadmarkfile{page-mrk} % depends on mp
-
-\loadmarkfile{page-flw}
-\loadmarkfile{page-spr}
-\loadmarkfile{page-plg}
-\loadmarkfile{page-str}
-
-\loadmarkfile{anch-pgr} % can be moved up (nicer for dependencies)
-\loadmkvifile{anch-bck}
-\loadmarkfile{anch-tab} % overloads tabl-tbl
-\loadmarkfile{anch-bar}
-%loadmarkfile{anch-snc} % when needed this one will be redone
-
-\loadmarkfile{math-ini} % way after font-pre !
-\loadmarkfile{math-pln}
-\loadmarkfile{math-for}
-\loadmarkfile{math-def} % also saves some meanings
-\loadmarkfile{math-ali}
-%loadmarkfile{math-arr}
-\loadmkvifile{math-stc}
-\loadmarkfile{math-frc}
-\loadmarkfile{math-mis}
-\loadmarkfile{math-scr}
-\loadmarkfile{math-int}
-\loadmarkfile{math-del}
-\loadmarkfile{math-fen}
-\loadmkvifile{math-acc}
-\loadmkvifile{math-rad}
-\loadmarkfile{math-inl}
-\loadmarkfile{math-dis}
-%loadmarkfile{math-lan}
-
-%loadmarkfile{phys-dim} % moved to after typo-scr
-
-\loadmarkfile{strc-mat}
-
-\loadmarkfile{chem-ini}
-\loadmarkfile{chem-str}
-
-\loadmarkfile{typo-scr}
-\loadmarkfile{phys-dim}
-
-\loadmarkfile{node-rul} % beware, defined \underbar so after math
-\loadmkvifile{font-sol} % font solutions
-
-\loadmkvifile{strc-not}
-\loadmkvifile{strc-lnt}
-\loadmkivfile{strc-tnt}
-\loadmkivfile{strc-usr}
-
-\loadmarkfile{pack-com}
-\loadmarkfile{typo-del}
-
-\loadmarkfile{grph-trf}
-\loadmarkfile{grph-inc}
-\loadmarkfile{grph-fig}
-\loadmarkfile{grph-raw}
-\loadmarkfile{grph-rul}
-\loadmarkfile{grph-pat}
-
-\loadmarkfile{pack-box}
-\loadmarkfile{pack-bar}
-\loadmarkfile{page-app}
-\loadmarkfile{meta-fig}
-
-\loadmarkfile{page-ffl}
-
-\loadmarkfile{lang-spa} % will become obsolete
-
-\loadmarkfile{typo-ovl} % fuzzy project (tracing) code
-
-% old bibtex support: (will be m-oldbibtex.mkiv)
-
-% \loadmarkfile{bibl-bib}
-% \loadmarkfile{bibl-tra}
-
-% new bibtex support:
-
-\loadmarkfile{publ-ini}
-\loadmarkfile{publ-tra}
-\loadmarkfile{publ-xml}
-\loadmarkfile{publ-old}
-
-%loadmarkfile{x-xtag} % no longer preloaded
-
-\loadmarkfile{meta-xml}
-
-\loadmarkfile{cont-log}
-
-% \loadmarkfile{task-ini}
-
-\loadmarkfile{cldf-ver} % verbatim, this can come late
-\loadmarkfile{cldf-com} % commands, this can come late
-
-\loadmarkfile{core-ctx} % this order might change but we need to check depedencies / move to another namespace
-
-\loadmarkfile{core-def}
-
-%usemodule[x][res-04] % xml resource libraries
-%usemodule[x][res-08] % rlx runtime conversion
-%usemodule[x][res-12] % rli external indentification
-
-% now we hook in backend code (needs checking)
-
-\loadmkxlfile{driv-shp} % LMTX
-
-\loadmarkfile{back-exp}
-\loadmkxlfile{back-pdf} % LMTX
-\loadmkxlfile{back-mps} % LMTX
-\loadmkxlfile{back-lua} % LMTX
-
-\loadmkxlfile{mlib-pdf} % LMTX
-\loadmarkfile{mlib-pps}
-\loadmarkfile{meta-pdf}
-\loadmarkfile{meta-blb}
-\loadmarkfile{grph-epd}
-
-\loadmarkfile{math-inc} % an experiment
-\loadmarkfile{publ-inc} % an experiment
-
-\loadmarkfile{task-ini}
-
-\loadmarkfile{syst-cmp} % compatibility stuff moved here
-
-\loadmkxlfile{libs-ini}
-
-\loadmarkfile{cont-run} % the main runner (used in cont-yes.mkiv)
-
-\setupcurrentlanguage[\defaultlanguagetag]
-
-\prependtoks
- \ctxlua{statistics.starttiming(statistics)}%
-\to \everyjob
-
-\appendtoks
- \ctxlua{statistics.stoptiming(statistics)}%
-\to \everyjob
-
-% \appendtoks
-% \ctxlua{job.prepare()}%
-% \to \everyjob
-
-% \appendtoks
-% \enabletrackers[*]%
-% \to \everyjob
-
-\appendtoks
- \ctxlua{statistics.savefmtstatus("\jobname","\contextversion","context.mkxl","\contextkind","\contextbanner")}% can become automatic
-\to \everydump
-
-\errorstopmode \dump \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-con.lua b/Master/texmf-dist/tex/context/base/mkiv/core-con.lua
index 4f6090ef5b5..4bf1424bc02 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-con.lua
@@ -16,12 +16,15 @@ slower but look nicer this way.</p>
<p>Some code may move to a module in the language namespace.</p>
--ldx]]--
-local floor, osdate, ostime, concat = math.floor, os.date, os.time, table.concat
+local floor = math.floor
+local osdate, ostime = os.date, os.time
+local concat, insert, reverse = table.concat, table.insert, table.reverse
local lower, upper, rep, match, gsub = string.lower, string.upper, string.rep, string.match, string.gsub
local utfchar, utfbyte = utf.char, utf.byte
local tonumber, tostring, type, rawset = tonumber, tostring, type, rawset
local P, S, R, Cc, Cf, Cg, Ct, Cs, C, V, Carg = lpeg.P, lpeg.S, lpeg.R, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Ct, lpeg.Cs, lpeg.C, lpeg.V, lpeg.Carg
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
+local div, mod = math.div, math.mod
local context = context
local commands = commands
@@ -328,7 +331,7 @@ converters.nofdays = nofdays
converters.textime = textime
implement { name = "weekday", actions = { weekday, context }, arguments = { "integer", "integer", "integer" } }
-implement { name = "leapyear", actions = { leapyear, context }, arguments = { "integer" } }
+implement { name = "leapyear", actions = { leapyear, context }, arguments = "integer" }
implement { name = "nofdays", actions = { nofdays, context }, arguments = { "integer", "integer" } }
implement { name = "year", actions = { osdate, context }, arguments = "'%Y'" }
@@ -445,6 +448,94 @@ implement {
arguments = { "integer", true }
}
+-- -- - hebrew and jiddish -- -- --
+
+local trace_hebrew trackers.register("converters.hebrew", function(v)
+ trace_hebrew = v
+end)
+
+local list = {
+ { 400, "ת" }, { 300, "ש" }, { 200, "ר" }, { 100, "ק" },
+ { 90, "צ" }, { 80, "פ" }, { 70, "ע" }, { 60, "ס "}, { 50, "נ" }, { 40, "מ" }, { 30, "ל" }, { 20, "כ" }, { 10, "י" },
+ { 9, "ט" }, { 8, "×—" }, { 7, "×–", }, { 6, "ו", }, { 5, "×”" }, { 4, "ד" }, { 3, "×’" }, { 2, "ב" }, { 1, "×" },
+}
+
+local special = {
+ [15] = "ט״ו", -- exception: avoid mixup with God יה
+ [16] = "ט״ז", -- exception: avoid mixup with God יו
+}
+
+local function tohebrew(n,gershayim,geresh)
+ local split = { }
+ local size = 0
+ while n > 1000 do
+ size = size + 1
+ split[size] = n % 1000
+ n = floor(n/1000)
+ end
+ size = size + 1
+ split[size] = n
+ for i=1,size do
+ local t = { }
+ local n = 0
+ local s = split[i]
+ while s > 0 do
+ for i=1,#list do
+ ::again::
+ local li = list[i]
+ local l1 = li[1]
+ local s1 = special[l1]
+ if s1 then
+ s = s - l1
+ n = n + 1
+ t[n] = s1
+ goto again
+ elseif s >= l1 then
+ s = s - l1
+ n = n + 1
+ t[n] = li[2]
+ goto again
+ end
+ end
+ end
+ ::done::
+ split[i] = t
+ end
+ if gershayim then
+ for i=1,size do
+ local si = split[i]
+ local ni = #si
+ if ni >= 2 then
+ local s = "×´"
+ insert(split[i],ni,trace_hebrew and ("{\\red "..s.."}") or s)
+ end
+ end
+ end
+ if geresh then
+ for i=2,#split do
+ local s = rep("׳",i-1)
+ insert(split[i],trace_hebrew and ("{\\blue "..s.."}") or s)
+ end
+ end
+ for i=1,size do
+ split[i] = concat(split[i])
+ end
+ return concat(reverse(split))
+end
+
+converters.tohebrew = tohebrew
+converters.hebrewnumerals = converters.tohebrew
+
+-- converters['alphabetic:hb'] = converters.hebrewnumerals
+
+interfaces.implement {
+ name = "hebrewnumerals",
+ actions = { tohebrew, context },
+ arguments = { "integer", true, true }
+}
+
+-- -- --
+
local vector = {
normal = {
[0] = "〇",
@@ -703,115 +794,303 @@ implement {
arguments = { "string", "integer" }
}
--- Well, since the one asking for this didn't test it the following code is not
--- enabled.
---
--- -- This Lua version is based on a Javascript by Behdad Esfahbod which in turn
--- -- is based on GPL'd code by Roozbeh Pournader of the The FarsiWeb Project
--- -- Group: http://www.farsiweb.info/jalali/jalali.js.
--- --
--- -- We start tables at one, I kept it zero based in order to stay close to
--- -- the original.
--- --
--- -- Conversion by Hans Hagen
-
-local g_days_in_month = { [0] = 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-local j_days_in_month = { [0] = 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29 }
-
-local div = math.div
-local mod = math.mod
-
-function gregorian_to_jalali(gy,gm,gd)
- local jy, jm, jd, g_day_no, j_day_no, j_np, i
- gy, gm, gd = gy - 1600, gm - 1, gd - 1
- g_day_no = 365*gy + div((gy+3),4) - div((gy+99),100) + div((gy+399),400)
- i = 0
- while i < gm do
- g_day_no = g_day_no + g_days_in_month[i]
- i = i + 1
+-- hebrew data conversion
+
+local gregorian_to_hebrew do
+
+ -- The next code is based on the c code at https://github.com/hebcal/hebcal
+ --
+ -- Hebcal : A Jewish Calendar Generator
+ -- Copyright : 1994 - 2004 Danny Sadinoff, 2002 Michael J. Radwin
+ -- License : GPL
+ --
+ -- Because we only need simple dates, we use part of the code. There is more
+ -- at that github place.
+ --
+ -- The number of days elapsed between the Gregorian date 12/31/1 BC and DATE.
+ -- The Gregorian date Sunday, December 31, 1 BC is imaginary.
+ --
+ -- The code is luafied and a little different because we have no assignments
+ -- in loops and such. We could speed up the code but then we divert from the
+ -- original. This is not that critical anyway.
+
+ local NISAN = 1
+ local IYYAR = 2
+ local SIVAN = 3
+ local TAMUZ = 4
+ local AV = 5
+ local ELUL = 6
+ local TISHREI = 7
+ local CHESHVAN = 8
+ local KISLEV = 9
+ local TEVET = 10
+ local SHVAT = 11
+ local ADAR_I = 12
+ local ADAR_II = 13
+
+ local mmap = {
+ KISLEV,
+ TEVET,
+ SHVAT,
+ ADAR_I,
+ NISAN,
+ IYYAR,
+ SIVAN,
+ TAMUZ,
+ TISHREI,
+ TISHREI,
+ TISHREI,
+ CHESHVAN
+ }
+
+ local function greg2abs(year,month,day)
+ local y = year - 1
+ return y * 365 + div(y,4)- div(y,100) + div(y,400) + os.nofdays(year,month,day)
+ end
+
+ local function abs2greg(abs)
+
+ local d0 = abs - 1
+
+ local n400 = div(d0, 146097)
+ local d1 = mod(d0, 146097)
+ local n100 = div(d1, 36524)
+ local d2 = mod(d1, 36524)
+ local n4 = div(d2, 1461)
+ local d3 = mod(d2, 1461)
+ local n1 = div(d3, 365)
+
+ local day = mod(d3, 365) + 1
+ local year = 400 * n400 + 100 * n100 + 4 * n4 + n1
+
+ if n100 == 4 or n1 == 4 then
+ return year, 12, 31
+ else
+ year = year + 1
+ month = 1
+ while true do
+ local mlen = os.nofdays(year,month)
+ if mlen < day then
+ day = day - mlen
+ month = month + 1
+ else
+ break
+ end
+ end
+ return year, month, day
+ end
end
- if (gm>1 and ((gy%4==0 and gy%100~=0) or (gy%400==0))) then
- g_day_no = g_day_no + 1
+
+ local function hebrew_leapyear(year)
+ return mod(1 + year * 7, 19) < 7
end
- g_day_no = g_day_no + gd
- j_day_no = g_day_no - 79
- j_np = div(j_day_no,12053)
- j_day_no = mod(j_day_no,12053)
- jy = 979 + 33*j_np + 4*div(j_day_no,1461)
- j_day_no = mod(j_day_no,1461)
- if j_day_no >= 366 then
- jy = jy + div((j_day_no-1),365)
- j_day_no = mod((j_day_no-1),365)
+
+ local function hebrew_months_in_year(year)
+ return hebrew_leapyear(year) and 13 or 12
end
- i = 0
- while i < 11 and j_day_no >= j_days_in_month[i] do
- j_day_no = j_day_no - j_days_in_month[i]
- i = i + 1
+
+ local function hebrew_elapsed_days(year)
+ local y = year - 1
+ local m_elapsed = 235 * div(y,19) + 12 * mod(y,19) + div(((mod(y,19) * 7) + 1),19)
+ local p_elapsed = 204 + 793 * mod(m_elapsed,1080)
+ local h_elapsed = 5 + 12 * m_elapsed + 793 * div(m_elapsed,1080) + div(p_elapsed,1080)
+ local parts = mod(p_elapsed,1080) + 1080 * mod(h_elapsed,24)
+ local day = 1 + 29 * m_elapsed + div(h_elapsed,24)
+ local d = mod(day,7)
+ local alt_day = day
+ if parts >= 19440
+ or (parts >= 9924 and d == 2 and not (hebrew_leapyear(year)))
+ or (parts >= 16789 and d == 1 and hebrew_leapyear(y )) then
+ alt_day = alt_day + 1
+ end
+ d = mod(alt_day,7)
+ if d == 0 or d == 3 or d == 5 then
+ alt_day = alt_day + 1
+ end
+ return alt_day
end
- jm = i + 1
- jd = j_day_no + 1
- return jy, jm, jd
-end
-function jalali_to_gregorian(jy,jm,jd)
- local gy, gm, gd, g_day_no, j_day_no, leap, i
- jy, jm, jd = jy - 979, jm - 1, jd - 1
- j_day_no = 365*jy + div(jy,33)*8 + div((mod(jy,33)+3),4)
- for i=0,jm-1,1 do
- j_day_no = j_day_no + j_days_in_month[i]
+ local function days_in_hebrew_year(year)
+ return hebrew_elapsed_days(year + 1) - hebrew_elapsed_days(year)
end
- j_day_no = j_day_no + jd
- g_day_no = j_day_no + 79
- gy = 1600 + 400*div(g_day_no,146097)
- g_day_no = mod(g_day_no, 146097)
- leap = 1
- if g_day_no >= 36525 then
- g_day_no = g_day_no - 1
- gy = gy + 100*div(g_day_no,36524)
- g_day_no = mod(g_day_no, 36524)
- if g_day_no >= 365 then
- g_day_no = g_day_no + 1
+
+ local function long_cheshvan(year)
+ return mod(days_in_hebrew_year(year),10) == 5
+ end
+
+ local function short_kislev(year)
+ return mod(days_in_hebrew_year(year),10) == 3
+ end
+
+ local function max_days_in_heb_month(month,year)
+ if month == IYYAR or month == TAMUZ or month == ELUL or month == TEVET or month == ADAR_II or
+ (month == ADAR_I and not hebrew_leapyear(year)) or
+ (month == CHESHVAN and not long_cheshvan(year)) or
+ (month == KISLEV and short_kislev (year)) then
+ return 29
else
- leap = 0
+ return 30
end
end
- gy = gy + 4*div(g_day_no,1461)
- g_day_no = mod(g_day_no, 1461)
- if g_day_no >= 366 then
- leap = 0
- g_day_no = g_day_no - 1
- gy = gy + div(g_day_no, 365)
- g_day_no = mod(g_day_no, 365)
- end
- i = 0
- while true do
- local d = g_days_in_month[i] + ((i == 1 and leap) or 0)
- if g_day_no >= d then
- g_day_no = g_day_no - d
- i = i + 1
+
+ local function hebrew2abs(year,month,day)
+ if month < TISHREI then
+ for m=TISHREI, hebrew_months_in_year(year), 1 do
+ day = day + max_days_in_heb_month(m,year)
+ end
+ for m=NISAN, month - 1, 1 do
+ day = day + max_days_in_heb_month(m,year)
+ end
else
- break
+ for m=TISHREI, month - 1, 1 do
+ day = day + max_days_in_heb_month(m,year)
+ end
end
+ return hebrew_elapsed_days(year) - 1373429 + day
end
- gm = i + 1
- gd = g_day_no + 1
- return gy, gm, gd
+
+ local function abs2hebrew(abs)
+ local yy, mm, dd = abs2greg(abs)
+ local day = 1
+ local month = TISHREI
+ local year = 3760 + yy
+ while abs >= hebrew2abs(year+1,month,day) do
+ year = year + 1
+ end
+ if year >= 4635 and year < 10666 then
+ month = mmap[mm]
+ end
+ while abs > hebrew2abs(year,month,max_days_in_heb_month(month,year)) do
+ month = mod(month,hebrew_months_in_year(year)) + 1
+ end
+ day = abs - hebrew2abs(year,month,1) + 1
+ return year, month, day
+ end
+
+ -- months = { "ניסן" "×ייר" "סיון" "תמוז" "×ב" "×לול" "תשרי" "חשון" "כסלו" "טבת" "שבט" }
+
+ gregorian_to_hebrew = function(y,m,d)
+ return abs2hebrew(greg2abs(y,m,d))
+ end
+
+ converters.gregorian_to_hebrew = gregorian_to_hebrew
+
end
--- local function test(yg,mg,dg,yj,mj,dj)
--- local y1, m1, d1 = jalali_to_gregorian(yj,mj,dj)
--- local y2, m2, d2 = gregorian_to_jalali(yg,mg,dg)
--- print(y1 == yg and m1 == mg and d1 == dg, yg,mg,dg, y1,m1,d1)
--- print(y2 == yj and m2 == mj and d2 == dj, yj,mj,dj, y2,m2,d2)
--- end
+local gregorian_to_jalali, jalali_to_gregorian do
+
+ -- Well, since the one asking for this didn't test it the following code is not
+ -- enabled.
+ --
+ -- -- This Lua version is based on a Javascript by Behdad Esfahbod which in turn
+ -- -- is based on GPL'd code by Roozbeh Pournader of the The FarsiWeb Project
+ -- -- Group: http://www.farsiweb.info/jalali/jalali.js.
+ -- --
+ -- -- We start tables at one, I kept it zero based in order to stay close to
+ -- -- the original.
+ -- --
+ -- -- Conversion by Hans Hagen
+
+ local g_days_in_month = { [0] = 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
+ local j_days_in_month = { [0] = 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29 }
+
+
+ gregorian_to_jalali = function(gy,gm,gd)
+ local jy, jm, jd, g_day_no, j_day_no, j_np, i
+ gy, gm, gd = gy - 1600, gm - 1, gd - 1
+ g_day_no = 365*gy + div((gy+3),4) - div((gy+99),100) + div((gy+399),400)
+ i = 0
+ while i < gm do
+ g_day_no = g_day_no + g_days_in_month[i]
+ i = i + 1
+ end
+ if (gm>1 and ((gy%4==0 and gy%100~=0) or (gy%400==0))) then
+ g_day_no = g_day_no + 1
+ end
+ g_day_no = g_day_no + gd
+ j_day_no = g_day_no - 79
+ j_np = div(j_day_no,12053)
+ j_day_no = mod(j_day_no,12053)
+ jy = 979 + 33*j_np + 4*div(j_day_no,1461)
+ j_day_no = mod(j_day_no,1461)
+ if j_day_no >= 366 then
+ jy = jy + div((j_day_no-1),365)
+ j_day_no = mod((j_day_no-1),365)
+ end
+ i = 0
+ while i < 11 and j_day_no >= j_days_in_month[i] do
+ j_day_no = j_day_no - j_days_in_month[i]
+ i = i + 1
+ end
+ jm = i + 1
+ jd = j_day_no + 1
+ return jy, jm, jd
+ end
+
+ jalali_to_gregorian = function(jy,jm,jd)
+ local gy, gm, gd, g_day_no, j_day_no, leap, i
+ jy, jm, jd = jy - 979, jm - 1, jd - 1
+ j_day_no = 365*jy + div(jy,33)*8 + div((mod(jy,33)+3),4)
+ for i=0,jm-1,1 do
+ j_day_no = j_day_no + j_days_in_month[i]
+ end
+ j_day_no = j_day_no + jd
+ g_day_no = j_day_no + 79
+ gy = 1600 + 400*div(g_day_no,146097)
+ g_day_no = mod(g_day_no, 146097)
+ leap = 1
+ if g_day_no >= 36525 then
+ g_day_no = g_day_no - 1
+ gy = gy + 100*div(g_day_no,36524)
+ g_day_no = mod(g_day_no, 36524)
+ if g_day_no >= 365 then
+ g_day_no = g_day_no + 1
+ else
+ leap = 0
+ end
+ end
+ gy = gy + 4*div(g_day_no,1461)
+ g_day_no = mod(g_day_no, 1461)
+ if g_day_no >= 366 then
+ leap = 0
+ g_day_no = g_day_no - 1
+ gy = gy + div(g_day_no, 365)
+ g_day_no = mod(g_day_no, 365)
+ end
+ i = 0
+ while true do
+ local d = g_days_in_month[i] + ((i == 1 and leap) or 0)
+ if g_day_no >= d then
+ g_day_no = g_day_no - d
+ i = i + 1
+ else
+ break
+ end
+ end
+ gm = i + 1
+ gd = g_day_no + 1
+ return gy, gm, gd
+ end
+
+ -- local function test(yg,mg,dg,yj,mj,dj)
+ -- local y1, m1, d1 = jalali_to_gregorian(yj,mj,dj)
+ -- local y2, m2, d2 = gregorian_to_jalali(yg,mg,dg)
+ -- print(y1 == yg and m1 == mg and d1 == dg, yg,mg,dg, y1,m1,d1)
+ -- print(y2 == yj and m2 == mj and d2 == dj, yj,mj,dj, y2,m2,d2)
+ -- end
+
+ -- test(1953,08,19, 1332,05,28)
+ -- test(1979,02,11, 1357,11,22)
+ -- test(2000,02,28, 1378,12,09)
+ -- test(2000,03,01, 1378,12,11)
+ -- test(2009,02,24, 1387,12,06)
+ -- test(2015,03,21, 1394,01,01)
+ -- test(2016,03,20, 1395,01,01)
--- test(1953,08,19, 1332,05,28)
--- test(1979,02,11, 1357,11,22)
--- test(2000,02,28, 1378,12,09)
--- test(2000,03,01, 1378,12,11)
--- test(2009,02,24, 1387,12,06)
--- test(2015,03,21, 1394,01,01)
--- test(2016,03,20, 1395,01,01)
+ converters.gregorian_to_jalali = gregorian_to_jalali
+ converters.jalali_to_gregorian = jalali_to_gregorian
+
+end
-- -- more efficient but needs testing
@@ -945,7 +1224,7 @@ local words = {
[1000000000000] = "trillion",
}
-local function translate(n)
+local function translate(n,connector)
local w = words[n]
if w then
return w
@@ -995,7 +1274,7 @@ local function translate(n)
if n > 0 then
compose_one(n)
end
- return #t > 0 and concat(t," ") or tostring(n)
+ return #t > 0 and concat(t,connector or " ") or tostring(n)
end
data.english = {
@@ -1067,7 +1346,7 @@ local words = {
[1000000000000] = "billón",
}
-local function translate(n)
+local function translate(n,connector)
local w = words[n]
if w then
return w
@@ -1122,7 +1401,7 @@ local function translate(n)
if n > 0 then
compose_one(n)
end
- return #t > 0 and concat(t," ") or tostring(n)
+ return #t > 0 and concat(t,connector or " ") or tostring(n)
end
data.spanish = {
@@ -1138,20 +1417,20 @@ data.es = data.spanish
-- verbose handler:
-function converters.verbose.translate(n,language)
+function converters.verbose.translate(n,language,connector)
local t = language and data[language]
- return t and t.translate(n) or n
+ return t and t.translate(n,connector) or n
end
-local function verbose(n,language)
+local function verbose(n,language,connector)
local t = language and data[language]
- context(t and t.translate(n) or n)
+ context(t and t.translate(n,connector) or n)
end
implement {
name = "verbose",
actions = verbose,
- arguments = { "integer", "string" }
+ arguments = { "integer", "string", "string" }
}
-- These are just helpers but not really for the tex end. Do we have to
@@ -1227,8 +1506,13 @@ local monthmnems = { -- not variables
-- virtual table
}
-setmetatableindex(months, function(t,k) return "unknown" end)
+local daymnems = { -- not variables
+ -- virtual table
+}
+
setmetatableindex(days, function(t,k) return "unknown" end)
+setmetatableindex(daymnems, function(t,k) return days[k] .. ":mnem" end)
+setmetatableindex(months, function(t,k) return "unknown" end)
setmetatableindex(monthmnems, function(t,k) return months[k] .. ":mnem" end)
do
@@ -1237,6 +1521,10 @@ do
ctx_labeltext(days[n])
end
+ local function daymnem(n)
+ ctx_labeltext(daymnems[n])
+ end
+
local function weekdayname(day,month,year)
ctx_labeltext(days[weekday(day,month,year)])
end
@@ -1256,6 +1544,12 @@ do
}
implement {
+ name = "daymnem",
+ actions = daymnem,
+ arguments = "integer",
+ }
+
+ implement {
name = "weekdayname",
actions = weekdayname,
arguments = { "integer", "integer", "integer" }
@@ -1264,22 +1558,28 @@ do
implement {
name = "monthname",
actions = monthname,
- arguments = { "integer" }
+ arguments = "integer",
}
implement {
name = "monthmnem",
actions = monthmnem,
- arguments = { "integer" }
+ arguments = "integer",
}
+ -- todo : short week days
+
local f_monthlong = formatters["\\monthlong{%s}"]
local f_monthshort = formatters["\\monthshort{%s}"]
+ local f_daylong = formatters["\\daylong{%s}"]
+ local f_dayshort = formatters["\\dayshort{%s}"]
local f_weekday = formatters["\\weekday{%s}"]
local f_dayoftheweek = formatters["\\dayoftheweek{%s}{%s}{%s}"]
local function tomonthlong (m) return f_monthlong (tonumber(m) or 1) end
local function tomonthshort(m) return f_monthshort(tonumber(m) or 1) end
+ local function todaylong (d) return f_daylong (tonumber(d) or 1) end
+ local function todayshort (d) return f_dayshort (tonumber(d) or 1) end
local function toweekday (d) return f_weekday (tonumber(d) or 1) end
local function todayoftheweek(d,m,y)
@@ -1288,6 +1588,8 @@ do
addformatter(formatters,"monthlong", [[tomonthlong(%s)]], { tomonthlong = tomonthlong })
addformatter(formatters,"monthshort", [[tomonthshort(%s)]], { tomonthshort = tomonthshort })
+ addformatter(formatters,"daylong", [[todaylong(%s)]], { todaylong = todaylong })
+ addformatter(formatters,"dayshort", [[todayshort(%s)]], { todayshort = todayshort })
addformatter(formatters,"weekday", [[toweekday(%s)]], { toweekday = toweekday })
addformatter(formatters,"dayoftheweek",[[todayoftheweek(%s,%s,%s)]],{ todayoftheweek = todayoftheweek })
@@ -1307,6 +1609,14 @@ do
return f_monthshort(tonumber(osdate("%m",tonumber(e))))
end
+ local function toedaylong(e)
+ return f_datlong(tonumber(osdate("%w",tonumber(e))))
+ end
+
+ local function toedayshort(e)
+ return f_dayshort(tonumber(osdate("%w",tonumber(e))))
+ end
+
local function toeweek(e) -- we run from 1-7 not 0-6
return tostring(tonumber(osdate("%w",tonumber(e)))+1)
end
@@ -1319,18 +1629,20 @@ do
return osdate(format,tonumber(e))
end
- addformatter(formatters,"eyear", [[toeyear(%s)]], { toeyear = toeyear })
- addformatter(formatters,"emonth", [[toemonth(%s)]], { toemonth = toemonth })
- addformatter(formatters,"eday", [[toeday(%s)]], { toeday = toeday })
- addformatter(formatters,"eweek", [[toeweek(%s)]], { toeweek = toeweek })
- addformatter(formatters,"eminute", [[toeminute(%s)]], { toeminute = toeminute })
- addformatter(formatters,"esecond", [[toesecond(%s)]], { toesecond = toesecond })
+ addformatter(formatters,"eyear", [[toeyear(%s)]], { toeyear = toeyear })
+ addformatter(formatters,"emonth", [[toemonth(%s)]], { toemonth = toemonth })
+ addformatter(formatters,"eday", [[toeday(%s)]], { toeday = toeday })
+ addformatter(formatters,"eweek", [[toeweek(%s)]], { toeweek = toeweek })
+ addformatter(formatters,"eminute", [[toeminute(%s)]], { toeminute = toeminute })
+ addformatter(formatters,"esecond", [[toesecond(%s)]], { toesecond = toesecond })
- addformatter(formatters,"emonthlong", [[toemonthlong(%s)]], { toemonthlong = toemonthlong })
- addformatter(formatters,"emonthshort", [[toemonthshort(%s)]], { toemonthshort = toemonthshort })
- addformatter(formatters,"eweekday", [[toeweekday(%s)]], { toeweekday = toeweekday })
+ addformatter(formatters,"emonthlong", [[toemonthlong(%s)]], { toemonthlong = toemonthlong })
+ addformatter(formatters,"emonthshort", [[toemonthshort(%s)]], { toemonthshort = toemonthshort })
+ addformatter(formatters,"edaylong", [[toedaylong(%s)]], { toedaylong = toedaylong })
+ addformatter(formatters,"edayshort", [[toedayshort(%s)]], { toedayshort = toedayshort })
+ addformatter(formatters,"eweekday", [[toeweekday(%s)]], { toeweekday = toeweekday })
- addformatter(formatters,"edate", [[toedate(%s,%s)]], { toedate = toedate })
+ addformatter(formatters,"edate", [[toedate(%s,%s)]], { toedate = toedate })
end
@@ -1346,17 +1658,27 @@ local spaced = {
[v_day] = true,
[v_weekday] = true,
[v_WEEKDAY] = true,
- [v_day] = true,
}
local dateconverters = {
+ ["hebrew:to"] = gregorian_to_hebrew,
["jalali:to"] = gregorian_to_jalali,
["jalali:from"] = jalali_to_gregorian,
}
local variants = {
- mnem = monthmnems,
- jalali = setmetatableindex(function(t,k) return months[k] .. ":jalali" end),
+ mnem = {
+ month = monthmnems,
+ day = daymnems,
+ },
+ hebrew = {
+ month = setmetatableindex(function(t,k) return months[k] .. ":hebrew" end),
+ day = setmetatableindex(function(t,k) return days [k] .. ":hebrew" end),
+ },
+ jalali = {
+ month = setmetatableindex(function(t,k) return months[k] .. ":jalali" end),
+ day = setmetatableindex(function(t,k) return days [k] .. ":jalali" end),
+ },
}
do
@@ -1386,9 +1708,7 @@ do
elseif plus == "++" or plus == "highord" then
ordinal = true
highordinal = true
- -- elseif plus == "mnem" then
- -- mnemonic = true
- elseif plus then -- elseif plus == "mnem" then
+ elseif plus then -- mnem MNEM etc
mnemonic = variants[plus]
end
if not auto and spaced[tag] then
@@ -1396,34 +1716,58 @@ do
end
auto = false
if tag == v_year or tag == "y" or tag == "Y" then
- context(year)
+ if plus then
+ plus = converters[plus]
+ end
+ if plus then
+ context(plus(year))
+ elseif currentlanguage == false then
+ context(year)
+ else
+ ctx_convertnumber(v_year,year)
+ end
elseif tag == "yy" or tag == "YY" then
context("%02i",year % 100)
elseif tag == v_month or tag == "m" then
if currentlanguage == false then
context(Word(months[month]))
- elseif mnemonic then
- ctx_labeltext(variables[mnemonic[month]])
else
- ctx_labeltext(variables[months[month]])
+ if type(mnemonic) == "table" then
+ mnemonic = mnemonic.month
+ end
+ if mnemonic then
+ ctx_labeltext(variables[mnemonic[month]])
+ else
+ ctx_labeltext(variables[months[month]])
+ end
end
elseif tag == v_MONTH then
if currentlanguage == false then
context(Word(variables[months[month]]))
- elseif mnemonic then
- ctx_LABELTEXT(variables[mnemonic[month]])
else
- ctx_LABELTEXT(variables[months[month]])
+ if type(mnemonic) == "table" then
+ mnemonic = mnemonic.month
+ end
+ if mnemonic then
+ ctx_LABELTEXT(variables[mnemonic[month]])
+ else
+ ctx_LABELTEXT(variables[months[month]])
+ end
end
elseif tag == "mm" then
context("%02i",month)
elseif tag == "M" then
context(month)
elseif tag == v_day or tag == "d" then
- if currentlanguage == false then
+ if plus then
+ plus = converters[plus]
+ end
+ if plus then
+ context(plus(day))
+ elseif currentlanguage == false then
context(day)
else
- ctx_convertnumber(v_day,day) -- why not direct
+ ctx_convertnumber(v_day,day)
end
whatordinal = day
elseif tag == "dd" then
@@ -1437,14 +1781,28 @@ do
if currentlanguage == false then
context(Word(days[wd]))
else
- ctx_labeltext(variables[days[wd]])
+ if type(mnemonic) == "table" then
+ mnemonic = mnemonic.day
+ end
+ if mnemonic then
+ ctx_labeltext(variables[mnemonic[wd]])
+ else
+ ctx_labeltext(variables[days[wd]])
+ end
end
elseif tag == v_WEEKDAY then
local wd = weekday(day,month,year)
if currentlanguage == false then
context(Word(days[wd]))
else
- ctx_LABELTEXT(variables[days[wd]])
+ if type(mnemonic) == "table" then
+ mnemonic = mnemonic.day
+ end
+ if mnemonic then
+ ctx_LABELTEXT(variables[mnemonic[wd]])
+ else
+ ctx_LABELTEXT(variables[days[wd]])
+ end
end
elseif tag == "W" then
context(weekday(day,month,year))
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv
index b73280d00f1..616ed199640 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-con.mkiv
@@ -76,6 +76,9 @@
\def\abjadnodotnumerals#1{\clf_abjadnodotnumerals\numexpr#1\relax}
\def\abjadnaivenumerals#1{\clf_alphabetic \numexpr#1\relax{arabic}} % okay?
+\def\hebrewnumerals #1{\clf_hebrewnumerals\numexpr#1\relax}
+\let\yiddishnumerals \hebrewnumerals
+
\def\languagecharacters#1{\clf_alphabetic\numexpr#1\relax{\currentlanguage}} % new
\def\languageCharacters#1{\clf_Alphabetic\numexpr#1\relax{\currentlanguage}} % new
@@ -210,6 +213,8 @@
\unexpanded\def\monthlong #1{\clf_monthname\numexpr#1\relax}
\unexpanded\def\monthshort#1{\clf_monthmnem\numexpr#1\relax}
+\unexpanded\def\daylong #1{\clf_dayname\numexpr#1\relax}
+\unexpanded\def\dayshort #1{\clf_daymnem\numexpr#1\relax}
\let\convertmonth\monthlong % for old times sake
@@ -218,11 +223,15 @@
%D \showsetup{month}
%D \showsetup{MONTH}
+\pushoverloadmode
+
\let\month\monthlong
-\unexpanded\def\MONTH #1{\WORD{\month {#1}}}
-\unexpanded\def\MONTHLONG #1{\WORD{\monthlong {#1}}}
-\unexpanded\def\MONTHSHORT#1{\WORD{\monthshort{#1}}}
+\popoverloadmode
+
+\unexpanded\def\MONTH #1{\WORD{\clf_monthname\numexpr#1\relax}}
+\unexpanded\def\MONTHLONG #1{\WORD{\clf_monthname\numexpr#1\relax}}
+\unexpanded\def\MONTHSHORT#1{\WORD{\clf_monthmnem\numexpr#1\relax}}
%D We never explicitly needed this, but Tobias Burnus pointed out that it would be
%D handy to convert to the day of the week. In doing so, we have to calculate the
@@ -242,8 +251,10 @@
%D \showsetup{weekday}
%D \showsetup{WEEKDAY}
-\unexpanded\def\weekday#1{\clf_dayname\numexpr#1\relax}
-\unexpanded\def\WEEKDAY#1{\WORD{\clf_dayname\numexpr#1\relax}}
+\unexpanded\def\weekday #1{\clf_dayname\numexpr#1\relax}
+\unexpanded\def\WEEKDAY #1{\WORD{\clf_dayname\numexpr#1\relax}}
+\unexpanded\def\DAYLONG #1{\WORD{\clf_dayname\numexpr#1\relax}}
+\unexpanded\def\DAYSHORT#1{\WORD{\clf_daymnem\numexpr#1\relax}}
%D \macros
%D {getdayoftheweek, dayoftheweek}
@@ -407,8 +418,28 @@
%D \stopbuffer
%D
%D \typebuffer \getbuffer
+%D
+%D Some indirectness and abstraction:
+%D
+%D \starttyping
+%D \definedate[crap][year]
+%D \currentdate[crap]
+%D \stoptyping
+
+\installcorenamespace{date}
-\newtoks \everycurrentdate
+\unexpanded\def\definedate
+ {\dodoubleargument\syst_converters_define_date}
+
+\def\syst_converters_define_date[#1][#2]%
+ {\setvalue{\??date#1}{#2}}
+
+\def\syst_converters_check_date_specification#1%
+ {\ifcsname\??date#1\endcsname
+ \edef#1{\lastnamedcs}%
+ \fi}
+
+\newtoks\everycurrentdate
\unexpanded\def\currentdate
{\dosingleempty\syst_converters_current_date}
@@ -417,8 +448,11 @@
{\dontleavehmode
\begingroup
\the\everycurrentdate
+ \edef\forceddatespecification{#1}%
+ \syst_converters_check_date_specification\forceddatespecification
+ \syst_converters_check_date_specification\currentdatespecification
\clf_currentdate
- {#1}{\currentdatespecification}{\labellanguage}%
+ {\forceddatespecification}{\currentdatespecification}{\labellanguage}%
\normalyear\normalmonth\normalday
\endgroup}
@@ -433,16 +467,22 @@
\letdummyparameter\c!m\normalmonth
\letdummyparameter\c!y\normalyear
\getdummyparameters[#1]%
+ \edef\p_d{\directdummyparameter\c!d}%
+ \edef\p_m{\directdummyparameter\c!m}%
+ \edef\p_y{\directdummyparameter\c!y}%
\normalexpanded
{\endgroup
- \normalday \number\directdummyparameter\c!d\relax
- \normalmonth\number\directdummyparameter\c!m\relax
- \normalyear \number\directdummyparameter\c!y\relax}%
+ \ifx\p_d\empty\else\normalday \number\directdummyparameter\c!d\relax\fi
+ \ifx\p_m\empty\else\normalmonth\number\directdummyparameter\c!m\relax\fi
+ \ifx\p_y\empty\else\normalyear \number\directdummyparameter\c!y\relax\fi}%
\fi
\begingroup
\the\everycurrentdate
+ \edef\forceddatespecification{#2}%
+ \syst_converters_check_date_specification\forceddatespecification
+ \syst_converters_check_date_specification\currentdatespecification
\clf_currentdate
- {#2}{\currentdatespecification}{\labellanguage}%
+ {\forceddatespecification}{\currentdatespecification}{\labellanguage}%
\normalyear\normalmonth\normalday
\endgroup}
@@ -627,8 +667,10 @@
\def\ordinalnumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
\def\Ordinalnumber #1{\Words{\clf_ordinal\numexpr#1\relax{\currentlanguage}}}
-\def\verbosenumber #1{\clf_verbose\numexpr#1\relax{\currentlanguage}}
-\def\VerboseNumber #1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}}}
+\let\verbosenumberconnector\space
+
+\def\verbosenumber #1{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}
+\def\VerboseNumber #1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}}
%D As longs as symbols are linked to levels or numbers, we can also use the
%D conversion mechanism, but in for instance the itemization macros, we prefer
@@ -705,6 +747,12 @@
\defineconversion [abjadnodotnumerals] [\abjadnodotnumerals]
\defineconversion [abjadnaivenumerals] [\abjadnaivenumerals]
+\defineconversion [hebrewnumerals] [\hebrewnumerals]
+\defineconversion [yiddishnumerals] [\yiddishnumerals]
+
+% users can do: \defineconversion [he] [\hebrewnumerals]
+% users can do: \defineconversion [yi] [\hebrewnumerals]
+
\defineconversion [thainumerals] [\thainumerals]
\defineconversion [devanagarinumerals] [\devanagarinumerals]
\defineconversion [gurmurkhinumerals] [\gurmurkhinumerals]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv
index 9f4344b99d4..41a84c3e61a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-dat.mkiv
@@ -77,9 +77,12 @@
\installcommandhandler \??pagestate {pagestate} \??pagestate
+% \def\syst_pagestates_allocate
+% {\expandafter\newcount\csname\??pagestatecounter\currentpagestate\endcsname
+% \expandafter\let\expandafter\c_syst_pagestate\csname\??pagestatecounter\currentpagestate\endcsname}
+
\def\syst_pagestates_allocate
- {\expandafter\newcount\csname\??pagestatecounter\currentpagestate\endcsname
- \expandafter\let\expandafter\c_syst_pagestate\csname\??pagestatecounter\currentpagestate\endcsname}
+ {\expandafter\newcount\csname\??pagestatecounter\currentpagestate\endcsname}
\appendtoks
\syst_pagestates_allocate
@@ -91,19 +94,37 @@
\unexpanded\def\setpagestate
{\dodoubleempty\syst_pagestates_set}
+% \def\syst_pagestates_set[#1][#2]%
+% {\begingroup
+% \edef\currentpagestate{#1}%
+% \ifcsname\??pagestatecounter\currentpagestate\endcsname
+% \let\c_syst_pagestate\lastnamedcs
+% \else
+% \syst_pagestates_allocate
+% \fi
+% \global\advance\c_syst_pagestate\plusone
+% \scratchcounter\lastnamedcs
+% \clf_setpagestate
+% name {\currentpagestate}%
+% tag {\ifsecondargument#2\else\number\c_syst_pagestate\fi}%
+% delay {\pagestateparameter\c!delay}%
+% \relax
+% \endgroup}
+
\def\syst_pagestates_set[#1][#2]%
{\begingroup
\edef\currentpagestate{#1}%
\ifcsname\??pagestatecounter\currentpagestate\endcsname
- \let\c_syst_pagestate\lastnamedcs
+ \scratchcounter\lastnamedcs
+ \advance\scratchcounter\plusone
\else
+ \scratchcounter\plusone
\syst_pagestates_allocate
\fi
- \global\advance\c_syst_pagestate\plusone
- \scratchcounter\lastnamedcs
+ \global\csname\??pagestatecounter\currentpagestate\endcsname\scratchcounter
\clf_setpagestate
name {\currentpagestate}%
- tag {\ifsecondargument#2\else\number\c_syst_pagestate\fi}%
+ tag {\ifsecondargument#2\else\number\scratchcounter\fi}%
delay {\pagestateparameter\c!delay}%
\relax
\endgroup}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv
index d10527d7bc7..b09d5b28f30 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-def.mkiv
@@ -145,7 +145,9 @@
% temporary here:
-\unexpanded\def\arg{\mathortext\normalmatharg\normaltextarg}
+\pushoverloadmode
+ \frozen\unexpanded\def\arg{\mathortext\normalmatharg\normaltextarg}
+\popoverloadmode
% might move to \everydump or even disappear:
@@ -172,6 +174,6 @@
%D Till we fixed all styles:
-\let\\=\crlf
+\enforced\let\\\crlf % frozen or permanent?
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-env.lua b/Master/texmf-dist/tex/context/base/mkiv/core-env.lua
index 50759dd1941..1c5165ac891 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-env.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-env.lua
@@ -47,12 +47,12 @@ local cache = tokens.cache
local iftrue = cache["iftrue"].mode
-local dimencode = cache["scratchdimen"] .command
-local countcode = cache["scratchcounter"] .command
-local tokencode = cache["scratchtoken"] .command
-local skipcode = cache["scratchskip"] .command
-local muskipcode = cache["scratchmuskip"] .command
------ attributecode = cache["scratchattribute"].command
+local dimencode = cache["scratchdimen"] .command -- tokens.commands.register_dimen
+local countcode = cache["scratchcounter"].command -- tokens.commands.register_int
+local tokencode = cache["scratchtoks"] .command -- tokens.commands.register_toks
+local skipcode = cache["scratchskip"] .command -- tokens.commands.register_glue
+local muskipcode = cache["scratchmuskip"] .command -- tokens.commands.register_mu_glue
+local conditioncode = cache["iftrue"] .command -- tokens.commands.if_test
local types = {
[dimencode] = "dimen",
@@ -61,6 +61,7 @@ local types = {
[skipcode] = "skip",
[muskipcode] = "muskip",
-- [attributecode] = "attribute",
+ [conditioncode] = "condition"
}
setmetatableindex(texmodes, function(t,k)
@@ -80,10 +81,6 @@ setmetatableindex(texmodes, function(t,k)
end
end)
-setmetatablenewindex(texmodes, function(t,k)
- report_mode("you cannot set the %s named %a this way","mode",k)
-end)
-
setmetatableindex(texsystemmodes, function(t,k)
local m = systemmodes[k]
if m then
@@ -98,30 +95,39 @@ setmetatableindex(texsystemmodes, function(t,k)
end
end
end)
-setmetatablenewindex(texsystemmodes, function(t,k)
- report_mode("you cannot set the %s named %a this way","systemmode",k)
+
+do -- we could do the same as in lmtx (use the mode)
+
+ local trialtypesettingstate = createtoken("trialtypesettingstate").index
+ local texgetcount = tex.getcount
+
+ context.settrialtypesettingmethod(function()
+ return texgetcount(trialtypesettingstate) ~= 0
+ end)
+
+end
+
+setmetatablenewindex(texmodes, function(t,k) report_mode("you cannot set the %s named %a this way","mode", k) end)
+setmetatablenewindex(texsystemmodes, function(t,k) report_mode("you cannot set the %s named %a this way","systemmode", k) end)
+setmetatablenewindex(texconstants, function(t,k) report_mode("you cannot set the %s named %a this way","constant", k) end)
+setmetatablenewindex(texconditionals, function(t,k) report_mode("you cannot set the %s named %a this way","conditional",k) end)
+setmetatablenewindex(texifs, function(t,k) end)
+
+setmetatablenewindex(texifs, function(t,k)
+ -- just ignore
end)
setmetatableindex(texconstants, function(t,k)
return cache[k].mode ~= 0 and texgetcount(k) or 0
end)
-setmetatablenewindex(texconstants, function(t,k)
- report_mode("you cannot set the %s named %a this way","constant",k)
-end)
setmetatableindex(texconditionals, function(t,k) -- 0 == true
return cache[k].mode ~= 0 and texgetcount(k) == 0
end)
-setmetatablenewindex(texconditionals, function(t,k)
- report_mode("you cannot set the %s named %a this way","conditional",k)
-end)
-table.setmetatableindex(texifs, function(t,k)
+setmetatableindex(texifs, function(t,k)
return cache[k].mode == iftrue
end)
-setmetatablenewindex(texifs, function(t,k)
- -- just ignore
-end)
tex.isdefined = isdefined
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv
index 09de435e7c0..0f042f81512 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-env.mkiv
@@ -17,7 +17,7 @@
\unprotect
-\def\wildcardsymbol{*}
+\ifdefined\wildcardsymbol \else \def\wildcardsymbol{*} \fi
%D Modes:
%D
@@ -104,10 +104,14 @@
% demo: trialtypesetting is a systemmode as well as an if
+\pushoverloadmode
+
\newsystemmode{trialtypesetting}
\expandafter\let\csname\??mode\systemmodeprefix trialtypesetting\endcsname\trialtypesettingstate
+\popoverloadmode
+
\appendtoks
\trialtypesettingstate\enabledmode
\luacopyinputnodes\plusone
@@ -588,13 +592,15 @@
\def\syst_setups_start_loc{\ifsecondargument\expandafter\syst_setups_start_loc_c\else\expandafter\syst_setups_start_loc_d\fi}
\def\syst_setups_start_tex{\ifsecondargument\expandafter\syst_setups_start_tex_c\else\expandafter\syst_setups_start_tex_d\fi}
+% no need for \the\t_syst_setups_lua in the next, now too often
+
\def\syst_setups_start_lua_a{\the\t_syst_setups_lua\dodoubleempty\syst_setups_start_lua} % [ ] delimited
\def\syst_setups_start_xml_a{\the\t_syst_setups_xml\dodoubleempty\syst_setups_start_xml} % [ ] delimited
\def\syst_setups_start_raw_a{\the\t_syst_setups_raw\dodoubleempty\syst_setups_start_raw} % [ ] delimited
\def\syst_setups_start_loc_a{\the\t_syst_setups_loc\dodoubleempty\syst_setups_start_loc} % [ ] delimited
\def\syst_setups_start_tex_a{\the\t_syst_setups_tex\dodoubleempty\syst_setups_start_tex} % [ ] delimited
-% empty preserves inner {} (is removed by the \expandafter{#3})
+% empty preserves inner {} (is removed by the \expandafter{#3}) .. hm, looks old
\def\syst_setups_start_lua_b#1 {\the\t_syst_setups_lua\syst_setups_start_lua_indeed\empty{#1}\empty} % space delimited
\def\syst_setups_start_xml_b#1 {\the\t_syst_setups_xml\syst_setups_start_xml_indeed\empty{#1}\empty} % space delimited
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv
index cb8881c223d..9352c9487e6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-ini.mkiv
@@ -47,12 +47,14 @@
%D Document:
-\newtoks \everysetupdocument
\newtoks \everyendoftextbody
\newtoks \everystarttext
\newtoks \everystoptext
+\newtoks \everystartdocument
+\newtoks \everystopdocument
+
%D Purity:
\newtoks \everyforgetall
@@ -89,7 +91,7 @@
%D Exporting:
-\newtoks\everyinitializeexport
+\newtoks \everyinitializeexport
%D Sectioning:
@@ -170,8 +172,9 @@
\newif \ifinpagebody
\newif \ifinsidecolumns
-\newif \ifdoublesided \doublesidedfalse
-\newif \ifsinglesided \singlesidedtrue
+\newif \ifinsidemulticolumns % simple mixed-in-text columns
+\newif \ifdoublesided \doublesidedfalse
+\newif \ifsinglesided \singlesidedtrue
\newif \ifinsidefloat
\newif \ifdoingblocks
\newif \ifgridsnapping
@@ -180,12 +183,15 @@
\newconstant\pageduplexmode % 0 single 1 double 2 mix
\newconstant\pagebodymode % 0 not 1 normal pagebody 2 spread
+\newcount\nofcolumns \nofcolumns \plusone
+\newcount\nofmulticolumns \nofmulticolumns\plusone
+
%D \macros
%D {ifproductionrun}
%D
%D This boolean can be used to bypass certain initializations.
-\newif\ifproductionrun
+% \newif\ifproductionrun % already defined
\appendtoks
\productionruntrue
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-lmt.lua b/Master/texmf-dist/tex/context/base/mkiv/core-lmt.lua
deleted file mode 100644
index 700ce47211e..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/core-lmt.lua
+++ /dev/null
@@ -1,34 +0,0 @@
-if not modules then modules = { } end modules ['core-lmt'] = {
- version = 1.001,
- comment = "companion to core-lmt.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local implement = interfaces.implement
-local scankeyword = tokens.scanners.keyword
-
-local settextdir = tex.settextdir
-local setlinedir = tex.setlinedir
-local setpardir = tex.setpardir
-local setboxdir = tex.setboxdir
-
-local function scandir(what)
- if scankeyword("tlt") then
- what(0)
- elseif scankeyword("trt") then
- what(1)
- -- elseif scankeyword("rtt") then
- -- what(2)
- -- elseif scankeyword("ltl") then
- -- what(3)
- else
- what(0)
- end
-end
-
-implement { name = "textdir", public = true, protected = true, actions = function() scandir(settextdir) end }
-implement { name = "linedir", public = true, protected = true, actions = function() scandir(setlinedir) end }
-implement { name = "pardir", public = true, protected = true, actions = function() scandir(setpardir) end }
-implement { name = "boxdir", public = true, protected = true, actions = function() scandir(setboxdir) end }
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-sys.lua b/Master/texmf-dist/tex/context/base/mkiv/core-sys.lua
index 7e9648fb845..3ab597849d3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-sys.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-sys.lua
@@ -77,13 +77,9 @@ implement { name = "outputfilename", actions = function() context(environme
statistics.register("result saved in file", function()
-- suffix will be fetched from backend
local outputfilename = environment.outputfilename or environment.jobname or tex.jobname or "<unset>"
- -- if (tex.pdfoutput or tex.outputmode) > 0 then
- return format("%s.%s, compresslevel %s, objectcompresslevel %s",outputfilename,"pdf",
- lpdf.getcompression()
- )
- -- else
- -- return format("%s.%s",outputfilename,"dvi") -- hard to imagine
- -- end
+ return lpdf and format("%s.%s, compresslevel %s, objectcompresslevel %s",outputfilename,"pdf",
+ lpdf.getcompression()
+ ) or "error"
end)
implement {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv b/Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv
index 7a04df8408f..728d37908df 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-sys.mkiv
@@ -132,10 +132,10 @@
[ \v!small=>\divide\scratchcounter 15, % 900,
\v!medium=>\divide\scratchcounter 30, % 1800,
\v!big=>\divide\scratchcounter 60, % 3600,
- \v!normal=>\getnewrandomseed\scratchcounter,
- \s!default=>\getnewrandomseed\scratchcounter,
+ \v!normal=>\scratchcounter\newrandomseed,
+ \s!default=>\scratchcounter\newrandomseed,
\s!unknown=>\scratchcounter#1]%
- \expanded{\setrandomseed{\the\scratchcounter}}%
+ \setrandomseed\scratchcounter
% \writestatus\m!system{randomseed: \the\scratchcounter}%
\endgroup}}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua b/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua
index 50c7bc9dc6a..887ef9a7536 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/core-uti.lua
@@ -43,7 +43,7 @@ local report_passes = logs.reporter("job","passes")
job = job or { }
local job = job
-job.version = 1.31
+job.version = 1.32
job.packversion = 1.02
-- some day we will implement loading of other jobs and then we need
@@ -73,10 +73,9 @@ local enabled = true
local initialized = false
directives.register("job.save",function(v) enabled = v end)
-----------.register("job.keep",function(v) kept = v end)
-function job.disablesave() -- can be command
- enabled = false
+function job.disablesave()
+ enabled = false -- for instance called when an error
end
function job.initialize(loadname,savename)
@@ -89,10 +88,7 @@ function job.initialize(loadname,savename)
end
job.load(loadname) -- has to come after structure is defined !
luatex.registerstopactions(function()
- if enabled and not status.lasterrorstring or status.lasterrorstring == "" then
- -- if kept then
- -- job.keep(loadname) -- could move to mtx-context instead
- -- end
+ if enabled then
job.save(savename)
end
end)
@@ -396,37 +392,24 @@ statistics.register("jobdata time",function()
end
end)
--- statistics.register("callbacks", function()
--- local total, indirect = status.callbacks or 0, status.indirect_callbacks or 0
--- local pages = texgetcount('realpageno') - 1
--- if pages > 1 then
--- return format("direct: %s, indirect: %s, total: %s (%i per page)", total-indirect, indirect, total, total/pages)
--- else
--- return format("direct: %s, indirect: %s, total: %s", total-indirect, indirect, total)
--- end
--- end)
-
-function statistics.callbacks()
+statistics.register("callbacks", function()
local c_internal = status.callbacks or 0
local c_file = status.indirect_callbacks or 0
local c_direct = status.direct_callbacks or 0
- local c_late = backends.noflatelua() or 0
+ local c_late = backends.getcallbackstate().count
local c_function = status.function_callbacks or 0
local c_total = c_internal + c_file + c_direct + c_late + c_function
- local n_pages = texgetcount('realpageno') - 1
+ local n_pages = structures.pages.nofpages or 0
local c_average = n_pages > 0 and math.round(c_total/n_pages) or 0
- local s_result = format (
- c_average > 0 and "internal: %s, file: %s, direct: %s, late: %s, function %s, total: %s (%s per page)"
- or "internal: %s, file: %s, direct: %s, late: %s, function %s, total: %s",
+ local result = format (
+ "internal: %s, file: %s, direct: %s, late: %s, function %s, total: %s (%s per page)",
c_internal, c_file, c_direct, c_late, c_function, c_total, c_average
)
statistics.callbacks = function()
- return s_result
+ return result
end
- return s_result
-end
-
-statistics.register("callbacks", statistics.callbacks)
+ return result
+end)
statistics.register("randomizer", function()
if rmethod and rvalue then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-env.lua b/Master/texmf-dist/tex/context/base/mkiv/data-env.lua
index 53f0c27cc27..3b10d89b8b4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/data-env.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-env.lua
@@ -94,7 +94,9 @@ local relations = allocate { -- todo: handlers also here
mp = {
names = { "mp" },
variable = 'MPINPUTS',
- suffixes = { 'mp', 'mpvi', 'mpiv', 'mpxl', 'mpii' },
+ suffixes = CONTEXTLMTXMODE > 0
+ and { 'mp', 'mpxl', 'mpvi', 'mpiv', 'mpii' }
+ or { 'mp', 'mpvi', 'mpiv', 'mpii' },
usertype = true,
},
tex = {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/data-fil.lua
index bbcc954b2ea..8dbc8a0d2cc 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/data-fil.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-fil.lua
@@ -22,7 +22,7 @@ local appendhash = resolvers.appendhash
local loadcachecontent = caches.loadcontent
-local checkgarbage = utilities.garbagecollector and utilities.garbagecollector.check
+----- checkgarbage = utilities.garbagecollector and utilities.garbagecollector.check
function resolvers.locators.file(specification)
local filename = specification.filename
@@ -128,9 +128,9 @@ function loaders.file(specification,filetype)
report_files("file loader: %a loaded",filename)
end
local s = f:read("*a") -- io.readall(f) is faster but we never have large files here
- if checkgarbage then
- checkgarbage(#s)
- end
+ -- if checkgarbage then
+ -- checkgarbage(#s)
+ -- end
f:close()
if s then
return true, s, #s
diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/data-ini.lua
index 2e9010085ba..6cf5669b3e7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/data-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-ini.lua
@@ -73,8 +73,9 @@ end
-- Next comes the user's home path. We need this as later on we have
-- to replace ~ with its value.
-do
+if not environment.homedir then
+ local oldhome = osgetenv('HOME')
local homedir = osgetenv(ostype == "windows" and 'USERPROFILE' or 'HOME') or ''
if not homedir or homedir == "" then
@@ -86,6 +87,7 @@ do
ossetenv("HOME", homedir) -- can be used in unix cnf files
ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files
+ environment.oldhome = oldhome
environment.homedir = homedir
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua
index e4795d09d18..2c1a7dbd5d1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-tex.lua
@@ -143,20 +143,31 @@ local function textopener(tag,filename,filehandle,coding)
lines[noflines] = nil
end
pushinputname(filename)
- local currentline, noflines = 0, noflines
- local t = {
+ local currentline = 0
+ local noflines = noflines
+ local handler = {
filename = filename,
noflines = noflines,
-- currentline = 0,
+ gotoline = function(self,n)
+ currentline = n - 1
+ if currentline <= 0 then
+ currentline = 0
+ end
+ end,
+ endoffile = function()
+ return not lines or currentline >= noflines
+ end,
close = function()
local usedname = popinputname() -- should match filename
if trace_locating then
report_tex("%a closer: %a closed",tag,filename)
end
- t = nil
+ handler = nil
+ lines = nil
end,
reader = function(self)
- self = self or t
+ self = self or handler
-- local currentline, noflines = self.currentline, self.noflines
if currentline >= noflines then
return nil
@@ -164,6 +175,7 @@ local function textopener(tag,filename,filehandle,coding)
currentline = currentline + 1
-- self.currentline = currentline
local content = lines[currentline]
+-- lines[currentline] = nil
if content == "" then
return ""
-- elseif content == ctrl_d or ctrl_z then
@@ -181,14 +193,14 @@ local function textopener(tag,filename,filehandle,coding)
end
end
}
- setmetatableindex(t,function(t,k)
+ setmetatableindex(handler,function(t,k)
if k == "currentline" then
return currentline
else
-- no such key
end
end)
- return t
+ return handler
end
helpers.settextopener(textopener) -- can only be done once
diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua b/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua
index 9b0117c1562..9a8a586cda4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-tmp.lua
@@ -324,7 +324,11 @@ caches.setluanames = setluanames
--
-- runtime files like fonts are written to the writable cache anyway
+local checkmemory = utilities and utilities.lua and utilities.lua.checkmemory
+local threshold = 100 -- MB
+
function caches.loaddata(readables,name,writable)
+ local used = checkmemory and checkmemory()
if type(readables) == "string" then
readables = { readables }
end
@@ -352,7 +356,11 @@ function caches.loaddata(readables,name,writable)
end
if loader then
loader = loader()
- collectgarbage("step")
+ if checkmemory then
+ checkmemory(used,threshold)
+ else -- generic
+ collectgarbage("step") -- option, really slows down!
+ end
return loader
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/data-use.lua b/Master/texmf-dist/tex/context/base/mkiv/data-use.lua
index 7df416b65c9..a7ca2389e99 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/data-use.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/data-use.lua
@@ -68,7 +68,7 @@ statistics.register("used cache path", function() return caches.usedpaths() end
-- experiment (code will move)
-function statistics.savefmtstatus(texname,formatbanner,sourcefile,kind,banner) -- texname == formatname
+function statistics.savefmtstatus(texname,formatbanner,sourcefile,banner) -- texname == formatname
local enginebanner = status.banner
if formatbanner and enginebanner and sourcefile then
local luvname = file.replacesuffix(texname,"luv") -- utilities.lua.suffixes.luv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/driv-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/driv-ini.lua
index 316613b2167..1e19fd5f887 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/driv-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/driv-ini.lua
@@ -6,6 +6,10 @@ if not modules then modules = { } end modules ['driv-ini'] = {
license = "see context related readme files"
}
+-- This file is a bit overkill because it was meant for both luatex and luametatex
+-- but after the splti I decided not to simplify this one. It can only introduce
+-- issues.
+
local type = type
local addsuffix = file.addsuffix
diff --git a/Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv
index f78643975e5..26f218b035b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/enco-ini.mkiv
@@ -314,7 +314,7 @@
% left-overs (some day in private unicode space, so that we can roundtrip)
\unexpanded\def\textblacksquare {\dontleavehmode\hbox{\vrule\s!width.3\s!em\s!height.4\s!em\s!depth-.1\s!em}}
-\unexpanded\def\schwa {\hbox{\rotate[\c!rotation=180,\c!location=\v!high]{\hbox{e}}}}
+%unexpanded\def\schwa {\hbox{\rotate[\c!rotation=180,\c!location=\v!high]{\hbox{e}}}}
\unexpanded\def\schwagrave {\buildtextgrave\schwa}
\chardef\textcontrolspace"2423
@@ -427,7 +427,7 @@
{\char \iffontchar\font"2012 "2012 % figuredash
\else\iffontchar\font"2013 "2013 % endash
\else\iffontchar\font"2212 "2212 % math minus
- "002D % hyphen
+ \else "002D % hyphen
\fi\fi\fi}
\unexpanded\def\textplus
diff --git a/Master/texmf-dist/tex/context/base/mkiv/export-example.css b/Master/texmf-dist/tex/context/base/mkiv/export-example.css
index 19a2a071e88..7cfd7f291fc 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/export-example.css
+++ b/Master/texmf-dist/tex/context/base/mkiv/export-example.css
@@ -405,7 +405,7 @@ context|div.item {
}
itemtag,
-context|div.item {
+context|div.itemtag {
display: none ;
}
@@ -479,8 +479,9 @@ context|div.verbatim {
font-family : "DejaVu Sans Mono", "Lucida Console", monospace ;
}
-/* lines : display */
-/* line : mixed */
+/* lines : display */
+/* line : mixed */
+/* linenumber : inline */
lines,
context|div.lines {
@@ -501,6 +502,15 @@ context|div.line {
white-space : pre-wrap ;
}
+linenumber,
+context|div.linenumber {
+ display : inline-block ;
+ margin-right : 1em ;
+ width : 3em ;
+ text-align : left ;
+ font-family : "DejaVu Sans Mono", "Lucida Console", monospace ;
+}
+
/* synonym : inline */
/* sorting : inline */
@@ -546,44 +556,61 @@ context|div.registerlocation:after {
/* tablerow : display */
/* tablecell : mixed */
+/* we have a few bonus mappings here */
+
table,
context|div.table {
display : table ;
}
-tablerow,
-context|div.tablerow {
+tablerow, tr
+context|div.tablerow, context|div.tr {
display : table-row ;
}
-tablecell[align="middle"],
+tablecell[align="middle"], td[align="middle"],
context|div.tablecell.align-middle {
display : table-cell ;
text-align : center ;
padding : .1em ;
}
-tablecell[align="flushleft"],
+tablecell[align="flushleft"], td[align="flushleft"],
context|div.tablecell.align-flushleft {
display : table-cell ;
text-align : left ;
padding : .1em ;
}
-tablecell[align="flushright"],
+tablecell[align="flushright"], td[align="flushright"],
context|div.tablecell.align-flushright {
display : table-cell ;
text-align : right ;
padding : .1em ;
}
-tablecell,
-context|div.tablecell {
+tablecell, td
+context|div.tablecell, context|div.td {
display : table-cell ;
text-align : left ;
padding : .1em ;
}
+tablehead,
+div.thead, div.tableheader {
+ display : table-header-group ;
+}
+
+tablefoot,
+div.tfoot, div.tablefooter {
+ display : table-footer-group ;
+}
+
+tablebody,
+div.tbody, div.tablebody {
+ display : table-body-group ;
+}
+
/* tabulate : display */
/* tabulaterow : display */
/* tabulatecell : mixed */
@@ -648,6 +675,13 @@ context|div.tabulatecell.kind-equals:before {
content : ":" ;
}
+/*
+
+ A combination needs some processing because it is not a table yet. So, the next
+ mapping is just one row! The tags are a bit confusing now.
+
+*/
+
/* combination : display */
/* combinationpair : display */
/* combinationcontent : mixed */
@@ -660,8 +694,8 @@ context|div.combination {
margin-bottom : 0em ;
}
-combinationpair,
-context|div.combinationpair {
+combinationpair, combinationtext,
+context|div.combinationpair, context|div.combinationtext {
display : table-cell ;
padding-right : 1em ;
}
@@ -727,7 +761,7 @@ context|div.listitem.subsection context|div.listtag {
*/
listitem[detail="chapter"]>listtag,
-context|div.listitem.chapter context|div.listtag {
+context|div.listitem.chapter > context|div.listtag {
display : inline-block ;
margin-left : -5em ;
float : left ;
@@ -735,7 +769,7 @@ context|div.listitem.chapter context|div.listtag {
}
listitem[detail="section"]>listtag,
-context|div.listitem.section context|div.listtag {
+context|div.listitem.section > context|div.listtag {
display : inline-block ;
margin-left : -5em ;
float : left ;
@@ -743,7 +777,7 @@ context|div.listitem.section context|div.listtag {
}
listitem[detail="subsection"]>listtag,
-context|div.listitem.subsection context|div.listtag {
+context|div.listitem.subsection > context|div.listtag {
display : inline-block ;
margin-left : -5em ;
float : left ;
diff --git a/Master/texmf-dist/tex/context/base/mkiv/export-example.tex b/Master/texmf-dist/tex/context/base/mkiv/export-example.tex
index 32cb79c5ea2..9ef414422ee 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/export-example.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/export-example.tex
@@ -1,5 +1,3 @@
-% language=uk
-
\usemodule[abr-01]
\setupexport
diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi
index 225b6b40deb..5fa5aa560a1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-ini.mkvi
@@ -10,9 +10,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D \TEX\ operates on files, so one wouldn't wonder that there
-%D is a separate module for file commands. In \CONTEXT\ files
-%D are used for several purposes:
+%D \TEX\ operates on files, so one wouldn't wonder that there is a separate module
+%D for file commands. In \CONTEXT\ files are used for several purposes:
%D
%D \startitemize[packed]
%D \item general textual input
@@ -21,10 +20,9 @@
%D \item buffering defered textual input
%D \stopitemize
%D
-%D When dealing with files we can load them as a whole, using
-%D the \type{\input} primitive or load them on a line||by||line
-%D basis, using \type{\read}. Writing is always done line by
-%D line, using \type{\write}.
+%D When dealing with files we can load them as a whole, using the \type {\input}
+%D primitive or load them on a line||by||line basis, using \type {\read}. Writing is
+%D always done line by line, using \type {\write}.
\writestatus{loading}{ConTeXt File Macros / Helpers}
@@ -35,9 +33,9 @@
%D \macros
%D {scratchread, scratchwrite}
%D
-%D We define a scratch file for reading. Keep in mind that
-%D the number of files is limited to~16, so use this one when
-%D possible. We also define a scratch output file.
+%D We define a scratch file for reading. Keep in mind that the number of files is
+%D limited to~16, so use this one when possible. We also define a scratch output
+%D file. In \MKIV\ and \LMTX\ we never use these file handles.
\ifdefined\scratchread \else \newread \scratchread \fi
\ifdefined\scratchwrite \else \newwrite\scratchwrite \fi
@@ -60,12 +58,10 @@
%D \macros
%D {pushendofline,popendofline}
%D
-%D When we are loading files in the middle of the typesetting
-%D process, for instance when we load references, we have to be
-%D sure that the reading process does not generate so called
-%D 'spurious spaces'. This can be prevented by assigning the
-%D line ending character the \CATCODE\ comment. This is
-%D accomplished by
+%D When we are loading files in the middle of the typesetting process, for instance
+%D when we load references, we have to be sure that the reading process does not
+%D generate so called 'spurious spaces'. This can be prevented by assigning the line
+%D ending character the \CATCODE\ comment. This is accomplished by
%D
%D \starttyping
%D \pushendofline
@@ -114,21 +110,20 @@
%D \macros
%D {input, normalinput}
%D
-%D Sometimes we run into troubles when \type {\input} wants to get
-%D expanded, e.g. in a \type {\write} (which happens in the metafun
-%D manual when we permit long MP lines). So, instead of fixing that,
-%D we go for a redefinition of \type {\input}. Of course it's better
-%D to use \type {\readfile} or \type {\processfile}.
+%D Sometimes we run into troubles when \type {\input} wants to get expanded, e.g. in
+%D a \type {\write} (which happens in the metafun manual when we permit long MP
+%D lines). So, instead of fixing that, we go for a redefinition of \type {\input}.
+%D Of course it's better to use \type {\readfile} or \type {\processfile}.
-\unexpanded\def\input{\normalinput}
+% \unexpanded\def\input{\normalinput}
\def\inputgivenfile#name{\normalinput{#name}}
%D \macros
%D {doifelsefile}
%D
-%D The next alternative only looks if a file is present. No
-%D loading is done. This one obeys the standard \TEX\ lookup.
+%D The next alternative only looks if a file is present. No loading is done. This
+%D one obeys the standard \TEX\ lookup.
%D
%D \starttyping
%D \doiffileelse {filename} {found} {not found}
@@ -155,7 +150,7 @@
%D \doifparentfileelse{filename}{yes}{no}
%D \stoptyping
-\ifx\outputfilename\undefined \def\outputfilename{\jobname} \fi
+\ifdefined\outputfilename \else \def\outputfilename{\jobname} \fi
\unexpanded\def\doifelseparentfile{\clf_doifelseparentfile}
@@ -200,10 +195,9 @@
%D \macros
%D {doonlyonce, doinputonce, doendinputonce}
%D
-%D Especially macropackages need only be loaded once.
-%D Repetitive loading not only costs time, relocating registers
-%D often leads to abortion of the processing because \TEX's
-%D capacity is limited. One can prevent multiple execution and
+%D Especially macropackages need only be loaded once. Repetitive loading not only
+%D costs time, relocating registers often leads to abortion of the processing
+%D because \TEX's capacity is limited. One can prevent multiple execution and
%D loading by using one of both:
%D
%D \starttyping
@@ -212,8 +206,8 @@
%D \doendinputonce{filename}
%D \stoptyping
%D
-%D This command obeys the standard method for locating files. We could
-%D move this function to the \LUA\ end.
+%D This command obeys the standard method for locating files. We could move this
+%D function to the \LUA\ end.
\installsystemnamespace {fileonce}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-job.lua b/Master/texmf-dist/tex/context/base/mkiv/file-job.lua
index 407c3c15da1..97e223387dc 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/file-job.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-job.lua
@@ -27,8 +27,8 @@ local implement = interfaces.implement
local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end)
local report = logs.reporter("system")
-local report_jobfiles = logs.reporter("system","jobfiles")
-local report_functions = logs.reporter("system","functions")
+local report_jobfiles = logs.reporter("system", "jobfiles")
+local report_functions = logs.reporter("system", "functions")
local texsetcount = tex.setcount
local elements = interfaces.elements
@@ -968,7 +968,11 @@ function document.setcommandline() -- has to happen at the tex end in order to e
-- to trick the files table which actually only has one entry in a tex job
if arguments.timing then
- context.usemodule("timing")
+ context.usemodule { "timing" }
+ end
+
+ if arguments.usage then
+ trackers.enable("system.usage")
end
if arguments.batchmode then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi
index a46e519c061..1f8da6b0cd8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-job.mkvi
@@ -133,10 +133,15 @@
\unexpanded\def\starttext {\clf_starttext}
\unexpanded\def\stoptext {\clf_stoptext}
\unexpanded\def\forcequitjob {\clf_forcequitjob}
-\unexpanded\def\end {\clf_forceendjob}
\unexpanded\def\autostarttext{\clf_autostarttext}
\unexpanded\def\autostoptext {\clf_autostoptext}
+\pushoverloadmode
+
+\unexpanded\def\end {\clf_forceendjob}
+
+\popoverloadmode
+
\unexpanded\def\finishjob{\stoptext} % nicer in luatex call commandline
\newtoks\everystartnotext
@@ -295,22 +300,81 @@
{\popsystemmode\v!environment
\signalendofinput\v!environment}
-%D Relatively new (might move as it depends on setups):
+%D Upgraded after the ctx 2020 meeting:
+%D
+%D \starttyping
+%D \definedocument[thesis]
+%D
+%D \setupdocument[a=b,e=f]
+%D \setupdocument[thesis][a=x,c=d]
+%D
+%D % \startsetups[thesis:start]
+%D \startsetups[document:start]
+%D START
+%D \stopsetups
+%D
+%D \startsetups[thesis:stop]
+%D % \startsetups[document:stop]
+%D STOP
+%D \stopsetups
+%D
+%D % \startdocument[thesis]
+%D \startthesis
+%D (\currentdocument/a): \documentvariable{a}\par
+%D (\currentdocument/c): \documentvariable{c}\par
+%D (\currentdocument/e): \documentvariable{e}\par
+%D \stopthesis
+%D % \stopdocument
+%D \stoptyping
+
+\installcorenamespace {document}
-%newtoks\everysetupdocument
+\installcommandhandler \??document \s!document \??document
-\unexpanded\def\startdocument % todo: dostarttagged\t!document
- {\dosingleargument\syst_structure_document_start}
+\setupdocument
+ [\c!before=\directsetup{\s!document:\v!start},
+ \c!after =\directsetup{\s!document:\v!stop}]
-\unexpanded\def\syst_structure_document_start[#settings]%
- {\setvariables[\s!document][#settings]%
- \the\everysetupdocument\relax
+\def\syst_document_setup#1%
+ {\directsetup{\doifelsesetups{\currentdocument:\v!start}\currentdocument\s!document:\v!start}}
+
+\appendtoks
+ \normalexpanded {%
+ \startsetups[\currentdocument:\v!start]\noexpand\directsetup{\ifx\empty\currentdocumentparent\s!document\else\currentdocumentparent\fi:\v!start}\stopsetups
+ \startsetups[\currentdocument:\v!stop ]\noexpand\directsetup{\ifx\empty\currentdocumentparent\s!document\else\currentdocumentparent\fi:\v!stop }\stopsetups
+ \setvalue{\e!start\currentdocument}{\dodoubleargument\syst_document_start[\currentdocument]}%
+ \letvalue{\e!stop \currentdocument}\stopdocument
+ }%
+\to \everydefinedocument
+
+\unexpanded\def\startdocument % todo: dostarttagged\t!document
+ {\dodoubleargument\syst_document_start}
+
+\unexpanded\def\syst_document_start[#namespace][#settings]%
+ {\pushmacro\currentdocument
+ \ifsecondargument
+ \edef\currentdocument{#namespace}%
+ \setupcurrentdocument[#settings]%
+ \else\iffirstargument
+ \doifelseassignment{#namespace}%
+ {\let\currentdocument\empty
+ \setupcurrentdocument[#namespace]}%
+ {\edef\currentdocument{#namespace}}%
+ \fi\fi
+ \ifx\empty\currentdocument\else\setmode\currentdocument\fi
\starttext
+ \the\everystartdocument
\documentvariable\c!before}
\unexpanded\def\stopdocument % todo: dostoptagged\t!document
{\documentvariable\c!after
- \stoptext}
+ \the\everystopdocument
+ \stoptext
+ \ifx\empty\currentdocument\else\resetmode\currentdocument\fi
+ \popmacro\currentdocument}
+
+ \let\documentvariable \documentparameter
+\unexpanded\def\unexpandeddocumentvariable{\documentparameter}
\unexpanded\def\doifelsedocumentvariable#name{\doifelsesomething{\documentvariable{#name}}}
\unexpanded\def\doifdocumentvariable #name{\doifsomething {\documentvariable{#name}}}
@@ -318,38 +382,21 @@
\let\doifdocumentvariableelse\doifelsedocumentvariable
-\def\documentvariable#name%
- {\getvariable\s!document{#name}}
-
-\unexpanded\def\unexpandeddocumentvariable#name%
- {\getvariable\s!document{#name}}
-
-\unexpanded\def\setupdocument[#settings]%
- {\setvariables[\s!document][#settings]%
- \the\everysetupdocument\relax}
-
-\unexpanded\def\presetdocument[#settings]%
- {\checkvariables[\s!document][#settings]}
-
-% We silently ignore missing documents. Beware: there are no begin/end setups
-% invoked as we expect the loaded document to be wrapped in \startdocument ...
-% \stopdocument. This is just a convenient variant of input.
-%
-% \unexpanded\def\document
-% {\dosingleempty\syst_document}
-%
-% \def\syst_document[#1]#2%
-% \startdocument[#1]
-% \readfile{#2}{}{}}
-
-% metadata:author metadata:title metadata:subject
-
-\setvariables
- [document]
- [\c!before=\directsetup{\s!document:start},
- \c!after=\directsetup{\s!document:stop}]
-
-%S The document: namespace will be used elsewhere too.
+\unexpanded\def\presetdocument
+ {\dodoubleargument\syst_document_preset}
+
+\unexpanded\def\syst_document_preset[#namespace][#settings]%
+ {\pushmacro\currentdocument
+ \ifsecondargument
+ \edef\currentdocument{#namespace}%
+ \setupcurrentdocument[#settings]%
+ \else\iffirstargument
+ \doifelseassignment{#namespace}%
+ {\let\currentdocument\empty
+ \setupcurrentdocument[#namespace]}%
+ {}%
+ \fi\fi
+ \popmacro\currentdocument}
% Bonus:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-lib.mkvi b/Master/texmf-dist/tex/context/base/mkiv/file-lib.mkiv
index c2ec555cf2f..c2ec555cf2f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/file-lib.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-lib.mkiv
diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua b/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua
index 10a18717865..d392887ec18 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/file-mod.lua
@@ -111,64 +111,66 @@ local function usemodule(name,hasscheme)
end
function environment.usemodules(prefix,askedname,truename)
- local truename = truename or environment.truefilename(askedname)
- local hasprefix = prefix and prefix ~= ""
- local hashname = ((hasprefix and prefix) or "*") .. "-" .. truename
- local status = modstatus[hashname] or false -- yet unset
- if status == 0 then
- -- not found
- elseif status == 1 then
- status = status + 1
- else
- if trace_modules then
- report("locating, prefix %a, askedname %a, truename %a",prefix,askedname,truename)
- end
- local hasscheme = url.hasscheme(truename)
- if hasscheme then
- -- no prefix and suffix done
- if usemodule(truename,true) then
- status = 1
- else
- status = 0
- end
- elseif hasprefix then
- if usemodule(prefix .. "-" .. truename) then
- status = 1
- else
- status = 0
- end
+ local truename = truename or environment.truefilename(askedname) or askedname
+ if truename and truename ~= "" then
+ local hasprefix = prefix and prefix ~= ""
+ local hashname = ((hasprefix and prefix) or "*") .. "-" .. truename
+ local status = modstatus[hashname] or false -- yet unset
+ if status == 0 then
+ -- not found
+ elseif status == 1 then
+ status = status + 1
else
- for i=1,#prefixes do
- -- todo: reconstruct name i.e. basename
- local thename = prefixes[i] .. "-" .. truename
- if usemodule(thename) then
+ if trace_modules then
+ report("locating, prefix %a, askedname %a, truename %a",prefix,askedname,truename)
+ end
+ local hasscheme = url.hasscheme(truename)
+ if hasscheme then
+ -- no prefix and suffix done
+ if usemodule(truename,true) then
status = 1
- break
+ else
+ status = 0
+ end
+ elseif hasprefix then
+ if usemodule(prefix .. "-" .. truename) then
+ status = 1
+ else
+ status = 0
end
- end
- if status then
- -- ok, don't change
- elseif find(truename,"-",1,true) and usemodule(truename) then
- -- assume a user namespace
- report("using user prefixed file %a",truename)
- status = 1
- elseif permit_unprefixed and usemodule(truename) then
- report("using unprefixed file %a",truename)
- status = 1
else
- status = 0
+ for i=1,#prefixes do
+ -- todo: reconstruct name i.e. basename
+ local thename = prefixes[i] .. "-" .. truename
+ if usemodule(thename) then
+ status = 1
+ break
+ end
+ end
+ if status then
+ -- ok, don't change
+ elseif find(truename,"-",1,true) and usemodule(truename) then
+ -- assume a user namespace
+ report("using user prefixed file %a",truename)
+ status = 1
+ elseif permit_unprefixed and usemodule(truename) then
+ report("using unprefixed file %a",truename)
+ status = 1
+ else
+ status = 0
+ end
end
end
+ if status == 0 then
+ missing = true
+ report("%a is not found",askedname)
+ elseif status == 1 then
+ report("%a is loaded",trace_modules and truename or askedname)
+ else
+ report("%a is already loaded",trace_modules and truename or askedname)
+ end
+ modstatus[hashname] = status
end
- if status == 0 then
- missing = true
- report("%a is not found",askedname)
- elseif status == 1 then
- report("%a is loaded",trace_modules and truename or askedname)
- else
- report("%a is already loaded",trace_modules and truename or askedname)
- end
- modstatus[hashname] = status
end
statistics.register("loaded tex modules", function()
@@ -246,18 +248,16 @@ function environment.useluamodule(list)
end
end
-local strings = interfaces.strings
-
implement {
name = "usemodules",
actions = environment.usemodules,
- arguments = strings[2]
+ arguments = "2 strings",
}
implement {
name = "doifelseolderversion",
actions = function(one,two) commands.doifelse(comparedversion(one,two) >= 0) end,
- arguments = strings[2]
+ arguments = "2 strings"
}
implement {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua b/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua
index 72b0a038f17..4e2981011ac 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-cff.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-cff'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -609,12 +610,15 @@ do
+ p_unsupported
)^1
- parsedictionaries = function(data,dictionaries,what)
+ parsedictionaries = function(data,dictionaries,version)
stack = { }
strings = data.strings
+ if trace_charstrings then
+ report("charstring format %a",version)
+ end
for i=1,#dictionaries do
top = 0
- result = what == "cff" and {
+ result = version == "cff" and {
monospaced = false,
italicangle = 0,
underlineposition = -100,
@@ -1421,13 +1425,15 @@ do
-- to wrap my head around the rather complex variable font specification
-- with regions and axis, the following approach kind of works but is more
-- some trial and error trick. It's still not clear how much of the complex
- -- truetype description applies to cff.
+ -- truetype description applies to cff. Once there are fonts out there we'll
+ -- get there. (Marcel and friends did some tests with recent cff2 fonts so
+ -- the code has been adapted accordingly.)
local reginit = false
local function updateregions(n) -- n + 1
if regions then
- local current = regions[n] or regions[1]
+ local current = regions[n+1] or regions[1]
nofregions = #current
if axis and n ~= reginit then
factors = { }
@@ -1517,7 +1523,7 @@ do
end
end
else
- -- error
+ top = top - nofregions * n
end
end
@@ -2151,7 +2157,14 @@ do
popped = 3
seacs = { }
if regions then
- regions = { regions } -- needs checking
+ -- this was:
+ -- regions = { regions } -- needs checking
+ -- and is now (MFC):
+ regions = { }
+ local deltas = data.deltas
+ for i = 1, #deltas do
+ regions[i] = deltas[i].regions
+ end
axis = data.factors or false
end
end
@@ -2261,8 +2274,8 @@ do
end
-local function readglobals(f,data)
- local routines = readlengths(f)
+local function readglobals(f,data,version)
+ local routines = readlengths(f,version == "cff2")
for i=1,#routines do
routines[i] = readbytetable(f,routines[i])
end
@@ -2320,14 +2333,14 @@ local function readprivates(f,data)
end
end
-local function readlocals(f,data,dictionary)
+local function readlocals(f,data,dictionary,version)
local header = data.header
local private = dictionary.private
if private then
local subroutineoffset = private.data.subroutines
if subroutineoffset ~= 0 then
setposition(f,header.offset+private.offset+subroutineoffset)
- local subroutines = readlengths(f)
+ local subroutines = readlengths(f,version == "cff2")
for i=1,#subroutines do
subroutines[i] = readbytetable(f,subroutines[i])
end
@@ -2344,7 +2357,7 @@ end
-- These charstrings are little programs and described in: Technical Note #5177. A truetype
-- font has only one dictionary.
-local function readcharstrings(f,data,what)
+local function readcharstrings(f,data,version)
local header = data.header
local dictionaries = data.dictionaries
local dictionary = dictionaries[1]
@@ -2355,7 +2368,7 @@ local function readcharstrings(f,data,what)
elseif stringtype == 2 then
setposition(f,header.offset+offset)
-- could be a metatable .. delayed loading
- local charstrings = readlengths(f,what=="cff2")
+ local charstrings = readlengths(f,version=="cff2")
local nofglyphs = #charstrings
for i=1,nofglyphs do
charstrings[i] = readstring(f,charstrings[i])
@@ -2390,7 +2403,8 @@ readers.parsecharstrings = parsecharstrings -- used in font-onr.lua (type 1)
local function readnoselect(f,fontdata,data,glyphs,doshapes,version,streams)
local dictionaries = data.dictionaries
local dictionary = dictionaries[1]
- readglobals(f,data)
+ local cid = not dictionary.private and dictionary.cid
+ readglobals(f,data,version)
readcharstrings(f,data,version)
if version == "cff2" then
dictionary.charset = nil
@@ -2398,9 +2412,27 @@ local function readnoselect(f,fontdata,data,glyphs,doshapes,version,streams)
readencodings(f,data)
readcharsets(f,data,dictionary)
end
+ if cid then
+ local fdarray = cid.fdarray
+ if fdarray then
+ setposition(f,data.header.offset + fdarray)
+ local dictionaries = readlengths(f,version=="cff2")
+ local nofdictionaries = #dictionaries
+ if nofdictionaries > 0 then
+ for i=1,nofdictionaries do
+ dictionaries[i] = readstring(f,dictionaries[i])
+ end
+ parsedictionaries(data,dictionaries)
+ dictionary.private = dictionaries[1].private
+ if nofdictionaries > 1 then
+ report("ignoring dictionaries > 1 in cid font")
+ end
+ end
+ end
+ end
readprivates(f,data)
parseprivates(data,data.dictionaries)
- readlocals(f,data,dictionary)
+ readlocals(f,data,dictionary,version)
startparsing(fontdata,data,streams)
parsecharstrings(fontdata,data,glyphs,doshapes,version,streams)
stopparsing(fontdata,data)
@@ -2412,7 +2444,7 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams)
local dictionary = dictionaries[1]
local cid = dictionary.cid
local cidselect = cid and cid.fdselect
- readglobals(f,data)
+ readglobals(f,data,version)
readcharstrings(f,data,version)
if version ~= "cff2" then
readencodings(f,data)
@@ -2458,7 +2490,7 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams)
local cidarray = cid.fdarray
if cidarray then
setposition(f,header.offset+cidarray)
- local dictionaries = readlengths(f)
+ local dictionaries = readlengths(f,version == "cff2")
for i=1,#dictionaries do
dictionaries[i] = readstring(f,dictionaries[i])
end
@@ -2466,7 +2498,7 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams)
cid.dictionaries = dictionaries
readcidprivates(f,data)
for i=1,#dictionaries do
- readlocals(f,data,dictionaries[i])
+ readlocals(f,data,dictionaries[i],version)
end
startparsing(fontdata,data,streams)
for i=1,#charstrings do
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua b/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua
index ee9ffa6a77a..cf6c232a606 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-cft.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['font-cft'] = {
license = "see context related readme files"
}
--- context font tables
+-- context font tables (needs updating)
--
-- todo: extra:
--
@@ -229,7 +229,7 @@ do
data.scaled = {
properties = {
- encodingbytes = t_cardinal,
+ encodingbytes = t_cardinal, -- not in lmtx
embedding = t_cardinal, -- ?
cidinfo = t_hash,
format = t_string,
@@ -238,7 +238,7 @@ do
filename = t_string,
psname = t_string,
name = t_string,
- virtualized = t_boolean,
+ virtualized = t_boolean, -- not in lmtx
hasitalics = t_boolean,
autoitalicamount = t_float,
nostackmath = t_boolean,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua
index ab145ce4d8f..e18e4b8048a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua
@@ -9,6 +9,8 @@ if not modules then modules = { } end modules ['font-chk'] = {
-- possible optimization: delayed initialization of vectors
-- move to the nodes namespace
+-- This is old code and I'll make a nicer one for lmtx some day.
+
local next = next
local floor = math.floor
@@ -248,11 +250,14 @@ local function addmissingsymbols(tfmdata) -- we can have an alternative with rul
end
end
end
- if #collected > 0 then
- addcharacters(properties.id, {
- type = "real",
- characters = collected,
- })
+ if next(collected) then
+ local id = properties.id
+ if id then
+ addcharacters(properties.id, {
+ type = "real",
+ characters = collected,
+ })
+ end
end
end
@@ -268,12 +273,6 @@ registerotffeature {
fonts.loggers.add_placeholders = function(id) addmissingsymbols(fontdata[id or true]) end
fonts.loggers.category_to_placeholder = mapping
-function commands.getplaceholderchar(name)
- local id = currentfont()
- addmissingsymbols(fontdata[id])
- context(getprivatenode(fontdata[id],name))
-end
-
-- todo in luatex: option to add characters (just slots, no kerns etc)
-- we can do that now so ...
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-col.lua b/Master/texmf-dist/tex/context/base/mkiv/font-col.lua
index d197c7c8583..c47a299060b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-col.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-col.lua
@@ -478,5 +478,5 @@ implement {
implement {
name = "doifelsecharinfont",
actions = { collections.found, commands.doifelse },
- arguments = { "integer" }
+ arguments = "integer"
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-con.lua b/Master/texmf-dist/tex/context/base/mkiv/font-con.lua
index 1bb63aa5192..f650e5b03d6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-con.lua
@@ -191,6 +191,9 @@ function constructors.assignmathparameters(target,original) -- simple variant, n
if not mathparameters.FractionDelimiterDisplayStyleSize then
targetmathparameters.FractionDelimiterDisplayStyleSize = 2.40 * targetparameters.size
end
+ if not targetmathparameters.SpaceBeforeScript then
+ targetmathparameters.SpaceBeforeScript = targetmathparameters.SpaceAfterScript
+ end
target.mathparameters = targetmathparameters
end
end
@@ -210,60 +213,45 @@ end
-- we default to false, so a macro package has to enable it explicitly. In
-- LuaTeX the fullname is used to identify a font as being unique.
-constructors.sharefonts = false
-constructors.nofsharedfonts = 0
-local sharednames = { }
+local nofinstances = 0
+local instances = setmetatableindex(function(t,k)
+ nofinstances = nofinstances + 1
+ t[k] = nofinstances
+ return nofinstances
+end)
function constructors.trytosharefont(target,tfmdata)
- if constructors.sharefonts then -- not robust !
- local characters = target.characters
- local n = 1
- local t = { target.psname }
- local u = sortedkeys(characters)
- for i=1,#u do
- local k = u[i]
- n = n + 1 ; t[n] = k
- n = n + 1 ; t[n] = characters[k].index or k
+ local properties = target.properties
+ local instance = properties.instance
+ if instance then
+ local fullname = target.fullname
+ local fontname = target.fontname
+ local psname = target.psname
+ local format = tfmdata.properties.format
+ if format == "opentype" then
+ target.streamprovider = 1
+ elseif format == "truetype" then
+ target.streamprovider = 2
+ else
+ target.streamprovider = 0
end
- local h = md5.HEX(concat(t," "))
- local s = sharednames[h]
- if s then
- if trace_defining then
- report_defining("font %a uses backend resources of font %a",target.fullname,s)
+ if target.streamprovider > 0 then
+ if fullname then
+ fullname = fullname .. ":" .. instances[instance]
+ target.fullname = fullname
+ end
+ if fontname then
+ fontname = fontname .. ":" .. instances[instance]
+ target.fontname = fontname
+ end
+ if psname then
+ psname = psname .. ":" .. instances[instance]
+ target.psname = psname
end
- target.fullname = s
- constructors.nofsharedfonts = constructors.nofsharedfonts + 1
- target.properties.sharedwith = s
- else
- sharednames[h] = target.fullname
end
end
end
--- function constructors.enhanceparameters(parameters)
--- local xheight = parameters.x_height
--- local quad = parameters.quad
--- local space = parameters.space
--- local stretch = parameters.space_stretch
--- local shrink = parameters.space_shrink
--- local extra = parameters.extra_space
--- local slant = parameters.slant
--- -- synonyms
--- parameters.xheight = xheight
--- parameters.spacestretch = stretch
--- parameters.spaceshrink = shrink
--- parameters.extraspace = extra
--- parameters.em = quad
--- parameters.ex = xheight
--- parameters.slantperpoint = slant
--- parameters.spacing = {
--- width = space,
--- stretch = stretch,
--- shrink = shrink,
--- extra = extra,
--- }
--- end
-
local synonyms = {
exheight = "x_height",
xheight = "x_height",
@@ -463,6 +451,7 @@ function constructors.scale(tfmdata,specification)
target.format = properties.format
target.cache = constructors.cacheintex and "yes" or "renew"
--
+ local original = properties.original or tfmdata.original
local fontname = properties.fontname or tfmdata.fontname
local fullname = properties.fullname or tfmdata.fullname
local filename = properties.filename or tfmdata.filename
@@ -474,6 +463,7 @@ function constructors.scale(tfmdata,specification)
--
local psname, psfixed = fixedpsname(psname,fontname or fullname or file.nameonly(filename))
--
+ target.original = original
target.fontname = fontname
target.fullname = fullname
target.filename = filename
@@ -578,6 +568,15 @@ function constructors.scale(tfmdata,specification)
targetparameters.quad = targetquad
targetparameters.extra_space = targetextra_space
--
+ local hshift = parameters.hshift
+ if hshift then
+ targetparameters.hshift = delta * hshift
+ end
+ local vshift = parameters.vshift
+ if vshift then
+ targetparameters.vshift = delta * vshift
+ end
+ --
local ascender = parameters.ascender
if ascender then
targetparameters.ascender = delta * ascender
@@ -601,13 +600,17 @@ function constructors.scale(tfmdata,specification)
--
if hasmath then
constructors.assignmathparameters(target,tfmdata) -- does scaling and whatever is needed
- properties.hasmath = true
- target.nomath = false
- target.MathConstants = target.mathparameters
+ properties.hasmath = true
+ target.nomath = false
+ target.MathConstants = target.mathparameters
+ --
+ local oldmath = properties.oldmath
+ targetproperties.oldmath = oldmath
+ target.oldmath = oldmath
else
- properties.hasmath = false
- target.nomath = true
- target.mathparameters = nil -- nop
+ properties.hasmath = false
+ target.nomath = true
+ target.mathparameters = nil -- nop
end
--
-- Here we support some context specific trickery (this might move to a plugin). During the
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua
index 6f8354de853..eead8abff67 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ctx.lua
@@ -167,12 +167,8 @@ addformatter(formatters,"font:features",[["'"..sequenced(%s," ",true).."'"]],{ s
-- ... like font-sfm or so
constructors.resolvevirtualtoo = true -- context specific (due to resolver)
-
-if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then
- constructors.fixprotrusion = false
-end
-
constructors.sharefonts = true -- experimental
+constructors.nofsharedfonts = 0
constructors.nofsharedhashes = 0
constructors.nofsharedvectors = 0
constructors.noffontsloaded = 0
@@ -202,6 +198,7 @@ do
local shares = { }
local hashes = { }
+
local nofinstances = 0
local instances = setmetatableindex(function(t,k)
nofinstances = nofinstances + 1
@@ -240,7 +237,7 @@ do
end
if psname then
-- this one is used for the funny prefix in font names in pdf
- -- so it has ot be kind of unique in order to avoid subset prefix
+ -- so it has to be kind of unique in order to avoid subset prefix
-- clashes being reported
psname = psname .. ":" .. instances[instance]
target.psname = psname
@@ -327,12 +324,16 @@ function definers.resetnullfont()
definers.resetnullfont = function() end
end
+-- This is some initialization code and we don't want (tracing) clutter in lmtx
+-- which is why we follow a different route there. I admit that is sounds freaky.
+-- Watch out: in lmtx the font dimen array is no longer resized automatically.
+
implement {
- name = "resetnullfont",
- onlyonce = true,
- actions = function()
+ name = "resetnullfont",
+ onlyonce = true,
+ permanent = false,
+ actions = function()
for i=1,7 do
- -- we have no direct method yet
context([[\fontdimen%s\nullfont\zeropoint]],i)
end
definers.resetnullfont()
@@ -1010,7 +1011,8 @@ end
local function splitcontext(features) -- presetcontext creates dummy here
local n, sf
- if find(features,",") then
+ -- We can have: "a=yes,b=yes" "a,b" "a" "a=yes" etc.
+ if find(features,"[,=]") then
--
-- from elsewhere (!)
--
@@ -1166,69 +1168,57 @@ local specifiers = { }
do -- else too many locals
- ----- ctx_setdefaultfontname = context.fntsetdefname
- ----- ctx_setsomefontname = context.fntsetsomename
- ----- ctx_setemptyfontsize = context.fntsetnopsize
- ----- ctx_setsomefontsize = context.fntsetsomesize
- ----- ctx_letvaluerelax = context.letvaluerelax
-
- local starttiming = statistics.starttiming
- local stoptiming = statistics.stoptiming
-
- local scanners = tokens.scanners
- local scanstring = scanners.string
- local scaninteger = scanners.integer
- local scannumber = scanners.number
- local scanboolean = scanners.boolean
-
- local setmacro = tokens.setters.macro
- local scanners = interfaces.scanners
-
- -- function commands.definefont_one(str)
+ local starttiming = statistics.starttiming
+ local stoptiming = statistics.stoptiming
- scanners.definefont_one = function()
- local str = scanstring()
+ local setmacro = tokens.setters.macro
- starttiming(fonts)
- if trace_defining then
- report_defining("memory usage before: %s",statistics.memused())
- report_defining("start stage one: %s",str)
- end
- local fullname, size = lpegmatch(splitpattern,str)
- local lookup, name, sub, method, detail = getspecification(fullname)
- if not name then
- report_defining("strange definition %a",str)
- -- ctx_setdefaultfontname()
- elseif name == "unknown" then
- -- ctx_setdefaultfontname()
- else
- -- ctx_setsomefontname(name)
- setmacro("somefontname",name,"global")
- end
- -- we can also use a count for the size
- if size and size ~= "" then
- local mode, size = lpegmatch(sizepattern,size)
- if size and mode then
- texsetcount("scaledfontmode",mode)
- -- ctx_setsomefontsize(size)
- setmacro("somefontsize",size)
+ implement {
+ name = "definefont_one",
+ arguments = "string",
+ actions = function(str)
+ starttiming(fonts)
+ if trace_defining then
+ report_defining("memory usage before: %s",statistics.memused())
+ report_defining("start stage one: %s",str)
+ end
+ local fullname, size = lpegmatch(splitpattern,str)
+ local lookup, name, sub, method, detail = getspecification(fullname)
+ if not name then
+ report_defining("strange definition %a",str)
+ -- ctx_setdefaultfontname()
+ elseif name == "unknown" then
+ -- ctx_setdefaultfontname()
+ else
+ -- ctx_setsomefontname(name)
+ setmacro("somefontname",name,"global")
+ end
+ -- we can also use a count for the size
+ if size and size ~= "" then
+ local mode, size = lpegmatch(sizepattern,size)
+ if size and mode then
+ texsetcount("scaledfontmode",mode)
+ -- ctx_setsomefontsize(size)
+ setmacro("somefontsize",size)
+ else
+ texsetcount("scaledfontmode",0)
+ -- ctx_setemptyfontsize()
+ end
+ elseif true then
+ -- so we don't need to check in tex
+ texsetcount("scaledfontmode",2)
+ -- ctx_setemptyfontsize()
else
texsetcount("scaledfontmode",0)
-- ctx_setemptyfontsize()
end
- elseif true then
- -- so we don't need to check in tex
- texsetcount("scaledfontmode",2)
- -- ctx_setemptyfontsize()
- else
- texsetcount("scaledfontmode",0)
- -- ctx_setemptyfontsize()
- end
- specification = definers.makespecification(str,lookup,name,sub,method,detail,size)
- if trace_defining then
- report_defining("stop stage one")
+ specification = definers.makespecification(str,lookup,name,sub,method,detail,size)
+-- specification.original = str
+ if trace_defining then
+ report_defining("stop stage one")
+ end
end
- end
+ }
local function nice_cs(cs)
return (gsub(cs,".->", ""))
@@ -1242,179 +1232,224 @@ do -- else too many locals
combinefeatures = v
end)
- scanners.definefont_two = function()
- local global = scanboolean() -- \ifx\fontclass\empty\s!false\else\s!true\fi
- local cs = scanstring () -- {#csname}%
- local str = scanstring () -- \somefontfile
- local size = scaninteger() -- \d_font_scaled_font_size
- local inheritancemode = scaninteger() -- \c_font_feature_inheritance_mode
- local classfeatures = scanstring () -- \m_font_class_features
- local fontfeatures = scanstring () -- \m_font_features
- local classfallbacks = scanstring () -- \m_font_class_fallbacks
- local fontfallbacks = scanstring () -- \m_font_fallbacks
- local mathsize = scaninteger() -- \fontface
- local textsize = scaninteger() -- \d_font_scaled_text_face
- local relativeid = scaninteger() -- \relativefontid
- local classgoodies = scanstring () -- \m_font_class_goodies
- local goodies = scanstring () -- \m_font_goodies
- local classdesignsize = scanstring () -- \m_font_class_designsize
- local fontdesignsize = scanstring () -- \m_font_designsize
- local scaledfontmode = scaninteger() -- \scaledfontmode
-
- if trace_defining then
- report_defining("start stage two: %s, size %s, features %a & %a, mode %a",str,size,classfeatures,fontfeatures,inheritancemode)
- end
- -- name is now resolved and size is scaled cf sa/mo
- local lookup, name, sub, method, detail = getspecification(str or "")
- -- new (todo: inheritancemode)
- local designsize = fontdesignsize ~= "" and fontdesignsize or classdesignsize or ""
- local designname = designsizefilename(name,designsize,size)
- if designname and designname ~= "" then
- if trace_defining or trace_designsize then
- report_defining("remapping name %a, specification %a, size %a, designsize %a",name,designsize,size,designname)
- end
- -- we don't catch detail here
- local o_lookup, o_name, o_sub, o_method, o_detail = getspecification(designname)
- if o_lookup and o_lookup ~= "" then lookup = o_lookup end
- if o_method and o_method ~= "" then method = o_method end
- if o_detail and o_detail ~= "" then detail = o_detail end
- name = o_name
- sub = o_sub
- end
- -- so far
- -- some settings can have been overloaded
- if lookup and lookup ~= "" then
- specification.lookup = lookup
- end
- if relativeid and relativeid ~= "" then -- experimental hook
- local id = tonumber(relativeid) or 0
- specification.relativeid = id > 0 and id
- end
- --
- specification.name = name
- specification.size = size
- specification.sub = (sub and sub ~= "" and sub) or specification.sub
- specification.mathsize = mathsize
- specification.textsize = textsize
- specification.goodies = goodies
- specification.cs = cs
- specification.global = global
- specification.scalemode = scaledfontmode -- context specific
- if detail and detail ~= "" then
- specification.method = method or "*"
- specification.detail = detail
- elseif specification.detail and specification.detail ~= "" then
- -- already set
- elseif inheritancemode == 0 then
- -- nothing
- elseif inheritancemode == 1 then
- -- fontonly
- if fontfeatures and fontfeatures ~= "" then
- specification.method = "*"
- specification.detail = fontfeatures
- end
- if fontfallbacks and fontfallbacks ~= "" then
- specification.fallbacks = fontfallbacks
- end
- elseif inheritancemode == 2 then
- -- classonly
- if classfeatures and classfeatures ~= "" then
- specification.method = "*"
- specification.detail = classfeatures
- end
- if classfallbacks and classfallbacks ~= "" then
- specification.fallbacks = classfallbacks
- end
- elseif inheritancemode == 3 then
- -- fontfirst
- if combinefeatures then
- if classfeatures and classfeatures ~= "" then
- specification.method = "*"
- if fontfeatures and fontfeatures ~= "" and fontfeatures ~= classfeatures then
- specification.detail = classfeatures .. "," .. fontfeatures
- else
- specification.detail = classfeatures
- end
- elseif fontfeatures and fontfeatures ~= "" then
- specification.method = "*"
- specification.detail = fontfeatures
+ implement {
+ name = "definefont_two",
+ arguments = {
+ "boolean", "string", "string", "integer", "integer", "string", "string", "string", "string",
+ "integer", "integer", "integer", "string", "string", "string", "string", "integer",
+ },
+ actions = function (
+ global, -- \ifx\fontclass\empty\s!false\else\s!true\fi
+ cs, -- {#csname}%
+ str, -- \somefontfile
+ size, -- \d_font_scaled_font_size
+ inheritancemode, -- \c_font_feature_inheritance_mode
+ classfeatures, -- \m_font_class_features
+ fontfeatures, -- \m_font_features
+ classfallbacks, -- \m_font_class_fallbacks
+ fontfallbacks, -- \m_font_fallbacks
+ mathsize, -- \fontface
+ textsize, -- \d_font_scaled_text_face
+ relativeid, -- \relativefontid
+ classgoodies, -- \m_font_class_goodies
+ goodies, -- \m_font_goodies
+ classdesignsize, -- \m_font_class_designsize
+ fontdesignsize, -- \m_font_designsize
+ scaledfontmode -- \scaledfontmode
+ )
+ if trace_defining then
+ report_defining("start stage two: %s, size %s, features %a & %a, mode %a",str,size,classfeatures,fontfeatures,inheritancemode)
+ end
+ -- name is now resolved and size is scaled cf sa/mo
+ local lookup, name, sub, method, detail = getspecification(str or "")
+ -- new (todo: inheritancemode)
+ local designsize = fontdesignsize ~= "" and fontdesignsize or classdesignsize or ""
+ local designname = designsizefilename(name,designsize,size)
+ if designname and designname ~= "" then
+ if trace_defining or trace_designsize then
+ report_defining("remapping name %a, specification %a, size %a, designsize %a",name,designsize,size,designname)
end
- else
+ -- we don't catch detail here
+ local o_lookup, o_name, o_sub, o_method, o_detail = getspecification(designname)
+ if o_lookup and o_lookup ~= "" then lookup = o_lookup end
+ if o_method and o_method ~= "" then method = o_method end
+ if o_detail and o_detail ~= "" then detail = o_detail end
+ name = o_name
+ sub = o_sub
+ end
+ -- so far
+ -- some settings can have been overloaded
+ if lookup and lookup ~= "" then
+ specification.lookup = lookup
+ end
+ if relativeid and relativeid ~= "" then -- experimental hook
+ local id = tonumber(relativeid) or 0
+ specification.relativeid = id > 0 and id
+ end
+ --
+ specification.name = name
+ specification.size = size
+ specification.sub = (sub and sub ~= "" and sub) or specification.sub
+ specification.mathsize = mathsize
+ specification.textsize = textsize
+ specification.goodies = goodies
+ specification.cs = cs
+ specification.global = global
+ specification.scalemode = scaledfontmode -- context specific
+ if detail and detail ~= "" then
+ specification.method = method or "*"
+ specification.detail = detail
+ elseif specification.detail and specification.detail ~= "" then
+ -- already set
+ elseif inheritancemode == 0 then
+ -- nothing
+ elseif inheritancemode == 1 then
+ -- fontonly
if fontfeatures and fontfeatures ~= "" then
specification.method = "*"
specification.detail = fontfeatures
- elseif classfeatures and classfeatures ~= "" then
+ end
+ if fontfallbacks and fontfallbacks ~= "" then
+ specification.fallbacks = fontfallbacks
+ end
+ elseif inheritancemode == 2 then
+ -- classonly
+ if classfeatures and classfeatures ~= "" then
specification.method = "*"
specification.detail = classfeatures
end
- end
- if fontfallbacks and fontfallbacks ~= "" then
- specification.fallbacks = fontfallbacks
- elseif classfallbacks and classfallbacks ~= "" then
- specification.fallbacks = classfallbacks
- end
- elseif inheritancemode == 4 then
- -- classfirst
- if combinefeatures then
- if fontfeatures and fontfeatures ~= "" then
- specification.method = "*"
- if classfeatures and classfeatures ~= "" and classfeatures ~= fontfeatures then
- specification.detail = fontfeatures .. "," .. classfeatures
- else
+ if classfallbacks and classfallbacks ~= "" then
+ specification.fallbacks = classfallbacks
+ end
+ elseif inheritancemode == 3 then
+ -- fontfirst
+ if combinefeatures then
+ if classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ if fontfeatures and fontfeatures ~= "" and fontfeatures ~= classfeatures then
+ specification.detail = classfeatures .. "," .. fontfeatures
+ else
+ specification.detail = classfeatures
+ end
+ elseif fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
specification.detail = fontfeatures
end
- elseif classfeatures and classfeatures ~= "" then
- specification.method = "*"
- specification.detail = classfeatures
+ else
+ if fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = fontfeatures
+ elseif classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = classfeatures
+ end
end
- else
- if classfeatures and classfeatures ~= "" then
- specification.method = "*"
- specification.detail = classfeatures
- elseif fontfeatures and fontfeatures ~= "" then
- specification.method = "*"
- specification.detail = fontfeatures
+ if fontfallbacks and fontfallbacks ~= "" then
+ specification.fallbacks = fontfallbacks
+ elseif classfallbacks and classfallbacks ~= "" then
+ specification.fallbacks = classfallbacks
+ end
+ elseif inheritancemode == 4 then
+ -- classfirst
+ if combinefeatures then
+ if fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ if classfeatures and classfeatures ~= "" and classfeatures ~= fontfeatures then
+ specification.detail = fontfeatures .. "," .. classfeatures
+ else
+ specification.detail = fontfeatures
+ end
+ elseif classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = classfeatures
+ end
+ else
+ if classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = classfeatures
+ elseif fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = fontfeatures
+ end
+ end
+ if classfallbacks and classfallbacks ~= "" then
+ specification.fallbacks = classfallbacks
+ elseif fontfallbacks and fontfallbacks ~= "" then
+ specification.fallbacks = fontfallbacks
end
end
- if classfallbacks and classfallbacks ~= "" then
- specification.fallbacks = classfallbacks
- elseif fontfallbacks and fontfallbacks ~= "" then
- specification.fallbacks = fontfallbacks
- end
- end
- --
- local tfmdata = definers.read(specification,size) -- id not yet known (size in spec?)
- --
- local lastfontid = 0
- local tfmtype = type(tfmdata)
- if tfmtype == "table" then
- -- setting the extra characters will move elsewhere
- 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
- -- characters[0x00A0] = { width = parameters.space }
- -- characters[0x2007] = { width = characters[0x0030] and characters[0x0030].width or parameters.space } -- figure
- -- characters[0x2008] = { width = characters[0x002E] and characters[0x002E].width or parameters.space } -- period
--
- local fallbacks = specification.fallbacks or ""
- local mathsize = (mathsize == 1 or mathsize == 2 or mathsize == 3) and mathsize or nil -- can be unset so we test 1 2 3
- if fallbacks ~= "" and mathsize and not busy then
- busy = true
- -- We need this ugly hack in order to resolve fontnames (at the \TEX end). Originally
- -- math was done in Lua after loading (plugged into aftercopying).
+ local tfmdata = definers.read(specification,size) -- id not yet known (size in spec?)
+ --
+ local lastfontid = 0
+ local tfmtype = type(tfmdata)
+ if tfmtype == "table" then
+ -- setting the extra characters will move elsewhere
+ 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
+ -- characters[0x00A0] = { width = parameters.space }
+ -- characters[0x2007] = { width = characters[0x0030] and characters[0x0030].width or parameters.space } -- figure
+ -- characters[0x2008] = { width = characters[0x002E] and characters[0x002E].width or parameters.space } -- period
--
- -- After tl 2017 I'll also do text fallbacks this way (although backups there are done
- -- in a completely different way.)
- 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,1)
- end
- mathematics.resolvefallbacks(tfmdata,specification,fallbacks)
- context(function()
- busy = false
- mathematics.finishfallbacks(tfmdata,specification,fallbacks)
+ local fallbacks = specification.fallbacks or ""
+ local mathsize = (mathsize == 1 or mathsize == 2 or mathsize == 3) and mathsize or nil -- can be unset so we test 1 2 3
+ if fallbacks ~= "" and mathsize and not busy then
+ busy = true
+ -- We need this ugly hack in order to resolve fontnames (at the \TEX end). Originally
+ -- math was done in Lua after loading (plugged into aftercopying).
+ --
+ -- After tl 2017 I'll also do text fallbacks this way (although backups there are done
+ -- in a completely different way.)
+ 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,1)
+ end
+ mathematics.resolvefallbacks(tfmdata,specification,fallbacks)
+ context(function()
+ busy = false
+ mathematics.finishfallbacks(tfmdata,specification,fallbacks)
+tfmdata.original = specification.specification
+ local id = definefont(tfmdata)
+ csnames[id] = specification.cs
+ properties.id = id
+ definers.register(tfmdata,id) -- to be sure, normally already done
+ texdefinefont(global,cs,id)
+ constructors.cleanuptable(tfmdata)
+ 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,2)
+ end
+ -- resolved (when designsize is used):
+ local size = round(tfmdata.parameters.size or 655360)
+ setmacro("somefontsize",size.."sp")
+ -- ctx_setsomefontsize(size .. "sp")
+ texsetcount("scaledfontsize",size)
+ lastfontid = id
+ --
+ if trace_defining then
+ report_defining("memory usage after: %s",statistics.memused())
+ report_defining("stop stage two")
+ end
+ --
+ texsetcount("global","lastfontid",lastfontid)
+ specifiers[lastfontid] = { str, size }
+ if not mathsize then
+ -- forget about it (can't happen here)
+ elseif mathsize == 0 then
+ -- can't happen (here)
+ else
+ -- maybe only 1 2 3 (we already test for this)
+ lastmathids[mathsize] = lastfontid
+ end
+ stoptiming(fonts)
+ end)
+ return
+ else
+tfmdata.original = specification.specification
local id = definefont(tfmdata)
csnames[id] = specification.cs
properties.id = id
@@ -1424,7 +1459,7 @@ do -- else too many locals
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,2)
+ name,id,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,"-")
end
-- resolved (when designsize is used):
local size = round(tfmdata.parameters.size or 655360)
@@ -1432,102 +1467,78 @@ do -- else too many locals
-- ctx_setsomefontsize(size .. "sp")
texsetcount("scaledfontsize",size)
lastfontid = id
- --
- if trace_defining then
- report_defining("memory usage after: %s",statistics.memused())
- report_defining("stop stage two")
- end
- --
- texsetcount("global","lastfontid",lastfontid)
- specifiers[lastfontid] = { str, size }
- if not mathsize then
- -- forget about it (can't happen here)
- elseif mathsize == 0 then
- -- can't happen (here)
- else
- -- maybe only 1 2 3 (we already test for this)
- lastmathids[mathsize] = lastfontid
- end
- stoptiming(fonts)
- end)
- return
- else
- local id = definefont(tfmdata)
- csnames[id] = specification.cs
- properties.id = id
- definers.register(tfmdata,id) -- to be sure, normally already done
- texdefinefont(global,cs,id)
- constructors.cleanuptable(tfmdata)
- constructors.finalize(tfmdata)
+ end
+ elseif tfmtype == "number" then
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,"-")
+ report_defining("reusing %s, id %a, target %a, features %a / %a, fallbacks %a / %a, goodies %a / %a, designsize %a / %a",
+ name,tfmdata,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,classgoodies,goodies,classdesignsize,fontdesignsize)
end
+ csnames[tfmdata] = specification.cs
+ texdefinefont(global,cs,tfmdata)
-- resolved (when designsize is used):
- local size = round(tfmdata.parameters.size or 655360)
- setmacro("somefontsize",size.."sp")
+ local size = round(fontdata[tfmdata].parameters.size or 0)
-- ctx_setsomefontsize(size .. "sp")
+ setmacro("somefontsize",size.."sp")
texsetcount("scaledfontsize",size)
- lastfontid = id
+ lastfontid = tfmdata
+ else
+ report_defining("unable to define %a as %a",name,nice_cs(cs))
+ lastfontid = -1
+ texsetcount("scaledfontsize",0)
+ -- ctx_letvaluerelax(cs) -- otherwise the current definition takes the previous one
end
- 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",
- name,tfmdata,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,classgoodies,goodies,classdesignsize,fontdesignsize)
- end
- csnames[tfmdata] = specification.cs
- texdefinefont(global,cs,tfmdata)
- -- resolved (when designsize is used):
- local size = round(fontdata[tfmdata].parameters.size or 0)
- -- ctx_setsomefontsize(size .. "sp")
- setmacro("somefontsize",size.."sp")
- texsetcount("scaledfontsize",size)
- lastfontid = tfmdata
- else
- report_defining("unable to define %a as %a",name,nice_cs(cs))
- lastfontid = -1
- texsetcount("scaledfontsize",0)
- -- ctx_letvaluerelax(cs) -- otherwise the current definition takes the previous one
- end
- if trace_defining then
- report_defining("memory usage after: %s",statistics.memused())
- report_defining("stop stage two")
- end
- --
- texsetcount("global","lastfontid",lastfontid)
- specifiers[lastfontid] = { str, size }
- if not mathsize then
- -- forget about it
- elseif mathsize == 0 then
- -- can't happen (here)
- else
- -- maybe only 1 2 3
- lastmathids[mathsize] = lastfontid
+ report_defining("memory usage after: %s",statistics.memused())
+ report_defining("stop stage two")
+ end
+ --
+ texsetcount("global","lastfontid",lastfontid)
+ specifiers[lastfontid] = { str, size }
+ if not mathsize then
+ -- forget about it
+ elseif mathsize == 0 then
+ -- can't happen (here)
+ else
+ -- maybe only 1 2 3
+ lastmathids[mathsize] = lastfontid
+ end
+ --
+ stoptiming(fonts)
end
- --
- stoptiming(fonts)
- end
+ }
- function scanners.specifiedfontspec()
- local f = specifiers[scaninteger()]
- if f then
- context(f[1])
- end
- end
- function scanners.specifiedfontsize()
- local f = specifiers[scaninteger()]
- if f then
- context(f[2])
+ implement {
+ name = "specifiedfontspec",
+ arguments = "integer",
+ actions = function(id)
+ local f = specifiers[id]
+ if f then
+ context(f[1])
+ end
end
- end
- function scanners.specifiedfont()
- local f = specifiers[scaninteger()]
- local s = scannumber()
- if f and s then
- context("%s at %0.2p",f[1],s * f[2]) -- we round to 2 decimals (as at the tex end)
+ }
+
+ implement {
+ name = "specifiedfontsize",
+ arguments = "integer",
+ actions = function(id)
+ local f = specifiers[id]
+ if f then
+ context(f[2])
+ end
end
- end
+ }
+ implement {
+ name = "specifiedfont",
+ arguments = { "integer", "number" },
+ actions = function(id,size)
+ local f = specifiers[id]
+ if f and size then
+ context("%s at %0.2p",f[1],size * f[2]) -- we round to 2 decimals (as at the tex end)
+ end
+ end
+ }
--
local function define(specification)
@@ -1636,17 +1647,7 @@ do -- else too many locals
return id, csnames[id]
end
- local read
-
- if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then -- maybe always
- read = function(name,size)
- return (define { name = name, size = size } or 0)
- end
- else
- read = definers.read
- end
-
- callbacks.register('define_font', read, "definition of fonts (tfmdata preparation)")
+ callbacks.register('define_font', definers.read, "definition of fonts (tfmdata preparation)")
-- here
@@ -1812,7 +1813,7 @@ function mappings.loadfile(name)
if trace_mapfiles then
report_mapfiles("loading map file %a",name)
end
- lpdf.setmapfile(name)
+ lpdf.setmapfile(name) -- bah. will go in lmtx
loaded[name] = true
end
end
@@ -1830,7 +1831,7 @@ function mappings.loadline(how,line)
if trace_mapfiles then
report_mapfiles("processing map line %a",line)
end
- lpdf.setmapline(how)
+ lpdf.setmapline(how) -- bah. will go in lmtx
loaded[how] = true
end
end
@@ -3369,8 +3370,3 @@ function fonts.helpers.collectanchors(tfmdata)
return anchors
end
-
-if CONTEXTLMTXMODE > 0 then
- fonts.constructors.addtounicode = false
- fonts.constructors.autocleanup = false
-end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-def.lua b/Master/texmf-dist/tex/context/base/mkiv/font-def.lua
index e287bf79ce5..b752b3258c4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-def.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-def.lua
@@ -207,9 +207,6 @@ function resolvers.name(specification)
features.normal = normal
end
normal.instance = instance
- -- if not callbacks.supported.glyph_stream_provider then
- -- normal.variableshapes = true -- for the moment
- -- end
end
--
local suffix = lower(suffixonly(resolved))
@@ -492,7 +489,9 @@ function definers.read(specification,size,id) -- id can be optional, name can al
end
else
tfmdata = definers.loadfont(specification) -- can be overloaded
+-- put in properties instead
if tfmdata then
+ tfmdata.original = specification.specification
if trace_defining then
report_defining("loaded and hashed: %s",hash)
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua b/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua
index 3058be37b9a..8d7c3d359d9 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-dsp.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-dsp'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -302,7 +303,7 @@ end)
-- values can be anything the min/max permits so we can either think of
-- real values of a fraction along the axis (probably easier)
--- wght:400,wdth:100,ital:1
+-- wght=400,wdth=100,ital=1
local function axistofactors(str)
local t = settings_to_hash(str)
@@ -502,7 +503,7 @@ local function readvariationdata(f,storeoffset,factors) -- store
regions[i] = t
end
-- deltas
- if factors then
+ -- if factors then
for i=1,nofdeltadata do
setposition(f,storeoffset+deltadata[i])
local nofdeltasets = readushort(f)
@@ -527,7 +528,7 @@ local function readvariationdata(f,storeoffset,factors) -- store
scales = factors and getscales(usedregions,factors) or nil,
}
end
- end
+ -- end
setposition(f,position)
return regions, deltadata
end
@@ -822,7 +823,7 @@ end
-- quite often 0, 1, 2
-function readarray(f,offset)
+local function readarray(f,offset)
if offset then
setposition(f,offset)
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi
index 8622e733f3d..f70be13eeb2 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-fil.mkvi
@@ -103,7 +103,7 @@
\unexpanded\def\font_basics_define_font_synonym_nop_expanded#crap[#spec]%
{\expandafter\let\csname\??fontfile\m_font_name\endcsname\m_font_file
- \normalexpanded{\font_basics_define_font_synonym_nop_opt[#1]}}
+ \normalexpanded{\font_basics_define_font_synonym_nop_opt[#spec]}}
\unexpanded\def\font_basics_define_font_synonym_yes_expanded#crap[#spec]%
{\expandafter\let\csname\??fontfile\fontclass\m_font_name\endcsname\m_font_file
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi
index 05cf087903c..405419416a0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-gds.mkvi
@@ -43,6 +43,13 @@
\definecolor[colorscheme:3:6][r=.75,g=.75]
\definecolor[colorscheme:3:7][g=.75]
+\definecolor[colorscheme:4:1] [r=.6] % a
+\definecolor[colorscheme:4:5] [g=.6] % e
+\definecolor[colorscheme:4:9] [b=.6] % i
+\definecolor[colorscheme:4:15][g=.6,b=.6] % o
+\definecolor[colorscheme:4:21][r=.6,b=.6] % u
+\definecolor[colorscheme:4:25][r=.6,b=.6] % y
+
\definesystemattribute[colorscheme][public]
\unexpanded\def\loadfontgoodies[#filename]%
@@ -50,11 +57,11 @@
\unexpanded\def\setfontcolorscheme % will move to the lua end
{\clf_enablefontcolorschemes
- \unexpanded\xdef\setfontcolorscheme[##1]{\attribute\colorschemeattribute##1\relax}%
+ \unexpanded\xdef\setfontcolorscheme[##1]{\c_attr_colorscheme##1\relax}%
\setfontcolorscheme}
\unexpanded\def\resetfontcolorscheme
- {\attribute\colorschemeattribute\attributeunsetvalue}
+ {\c_attr_colorscheme\attributeunsetvalue}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-combining.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-combining.lua
new file mode 100644
index 00000000000..7db3b905aca
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-combining.lua
@@ -0,0 +1,170 @@
+if not modules then modules = { } end modules ['font-imp-combining'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA ADE",
+ copyright = "ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+if not context then return end
+
+local next, unpack = next, unpack
+local sort, copy, insert = table.sort, table.copy, table.insert
+local setmetatableindex = table.setmetatableindex
+
+local fontdata = fonts.hashes.identifiers
+local otf = fonts.handlers.otf
+
+local nuts = nodes.nuts
+
+local nextnode = nuts.traversers.node
+local ischar = nuts.ischar
+local getprev = nuts.getprev
+local getnext = nuts.getnext
+local setprev = nuts.setprev
+local setnext = nuts.setnext
+local setboth = nuts.setboth
+local setlink = nuts.setlink
+local exchange = nuts.exchange
+
+local class = { } -- reused
+local point = { } -- reused
+local classes = { }
+local sorters = { }
+local slide = { }
+local count = 0
+
+-- List provided by Joey McCollum (Hebrew Layout Intelligence):
+--
+-- 1. The consonants (Unicode points 05D0-05EA) have no combining class and are never reordered; this is typographically correct.
+-- 2. Shin dot and sin dot (05C1-05C2) should be next, but Unicode places them in combining classes 24 and 25, after the characters in recommended classes 3-5 and many of the characters in recommended class 6.
+-- 3. Dagesh / mapiq (05BC) should be next, but Unicode assigns it a combining class of 21. This means that it will be incorrectly ordered before characters in recommended class 2 and after characters in recommended classes 4-6 after Unicode normalization.
+-- 4. Rafe (05BF) should be next, but Unicode assigns it a combining class of 23. Thus, it will be correctly placed after characters in recommended class 3, but incorrectly placed before characters in recommended class 2 after Unicode normalization.
+-- 5. The holam and holam haser vowel points (05B9-05BA) should be next, but Unicode places them in combining class 19. This means that it will be placed incorrectly before characters in recommended classes 2-4 and after all characters in recommended class 6 except 05BB after Unicode normalization.
+-- 6. The characters in 0591, 0596, 059B, 05A2-05A7, 05AA, 05B0-05B8, 05BB, 05BD, 05C5, 05C7 should be treated as being in the same class, but Unicode places them in combining classes 10-18, 20, 22, and 220.
+-- 7. The prepositive marks yetiv and dehi (059A, 05AD) should be next; Unicode places them in combining class 222, so they should correctly come after all characters in recommended classes 1-6.
+-- 8. The characters 0307, 0593-0595, 0597-0598, 059C-05A1, 05A8, 05AB-05AC, 05AF, 05C4 should be treated as being in the same class; Unicode places them in combining class 230, so they should correctly come after all characters in recommended classes 1-7.
+-- 9. The postpositive marks segolta, pashta, telisha qetana, and zinor (0592, 0599, 05A9, 05AE) should be next; Unicode places them in combining class 230, so they will need to be reordered after the characters in recommended class 8.
+--
+-- Some tests by Joey:
+--
+-- Arial, Calibri, and Times New Roman will correctly typeset most combinations of points even in Unicode's canonical order, but they typeset the normalized sequences (hiriq, shin dot, tipeha) and (qamatz, dagesh, shin dot) incorrectly and their typographically recommended reorderings correctly.
+-- Cardo will correctly typeset most combinations of points even in Unicode's canonical order, but it typesets the normalized sequences (hiriq, shin dot, tipeha) incorrectly and its typographically recommended reorderings correctly.
+-- Frank Ruehl CLM typesets most combinations of points even in Unicode's canonical order, but it consistently does a poor job positioning cantillation marks even when they are placed in the typographically recommended position. Taamey Frank CLM is another version of the same font that handles this correctly, so it is possible that Frank Ruehl CLM is just an obsolete font that did not have well-implemented Hebrew font features for cantillation marks to begin with.
+-- For Linux Libertine, the text samples with both the normalized mark ordering and the typographically recommended mark ordering were typeset poorly. I think that this is just because that font does not have full support for the Hebrew glyph set (it lacks cantillation marks) or Hebrew font features (it does not place Hebrew diacritical marks intelligently), so no mark reordering would fix its problems.
+-- Taamey David CLM and Taamey Frank CLM exhibits the same typographical mistakes as SBL Hebrew when the input is in Unicode canonical order, and these mistakes go away if the marks are ordered in the typographically recommended way.
+--
+-- SBL Hebrew is used as reference font.
+
+classes.hebr = {
+ [0x05C1] = 1, [0x05C2] = 1,
+ [0x05BC] = 2,
+ [0x05BF] = 3,
+ [0x05B9] = 4, [0x05BA] = 4,
+ [0x0591] = 5, [0x0596] = 5, [0x059B] = 5, [0x05A2] = 5, [0x05A3] = 5, [0x05A4] = 5,
+ [0x05A5] = 5, [0x05A6] = 5, [0x05A7] = 5, [0x05AA] = 5, [0x05B0] = 5, [0x05B1] = 5,
+ [0x05B2] = 5, [0x05B3] = 5, [0x05B4] = 5, [0x05B5] = 5, [0x05B6] = 5, [0x05B7] = 5,
+ [0x05B8] = 5, [0x05BB] = 5, [0x05BD] = 5, [0x05C5] = 5, [0x05C7] = 5,
+ [0x059A] = 6, [0x05AD] = 6,
+ [0x0307] = 7, [0x0593] = 7, [0x0594] = 7, [0x0595] = 7, [0x0597] = 7, [0x0598] = 7,
+ [0x059C] = 7, [0x059D] = 7, [0x059E] = 7, [0x059F] = 7, [0x05A0] = 7, [0x05A1] = 7,
+ [0x05A8] = 7, [0x05AB] = 7, [0x05AC] = 7, [0x05AF] = 7, [0x05C4] = 7,
+ [0x0592] = 8, [0x0599] = 8, [0x05A9] = 8, [0x05AE] = 8,
+}
+
+sorters.hebr = function(a,b)
+ return class[a] < class[b]
+end
+
+-- local dflt = setmetatableindex(function(t,k,v)
+-- for k, v in next, characters.data do
+-- local c = v.combining
+-- if c then
+-- t[k] = c
+-- end
+-- end
+-- setmetatableindex(t,nil)
+-- return t[k]
+-- end)
+--
+-- classes.dflt = dflt
+-- sorters.dflt = function(a,b) return class[b] < class[a] end
+
+-- see analyzeprocessor in case we want scripts
+
+local function reorder(head)
+ if count == 2 then
+ local first = slide[1]
+ local last = slide[2]
+ if sorter(last,first) then
+ head = exchange(head,first,last)
+ end
+ elseif count > 1 then
+ local first = slide[1]
+ local last = slide[count]
+ local before = getprev(first)
+ local after = getnext(last)
+ setprev(first)
+ setnext(last)
+ sort(slide,sorter)
+ setlink(unpack(slide))
+ local first = slide[1]
+ local last = slide[count]
+ if before then
+ setlink(before,first)
+ end
+ setlink(last,after)
+ if first == head then
+ head = first
+ end
+ end
+ count = 0
+ return head
+end
+
+local function reorderprocessor(head,font,attr)
+ local tfmdata = fontdata[font]
+ local script = otf.scriptandlanguage(tfmdata,attr)
+ sorter = sorters[script]
+ if sorter then
+ local classes = classes[script]
+ for n in nextnode, head do
+ local char, id = ischar(n,font)
+ if char then
+ local c = classes[char]
+ if c then
+ if count == 0 then
+ count = 1
+ slide = { n }
+ else
+ count = count + 1
+ slide[count] = n
+ end
+ class[n] = c
+ point[n] = char
+ elseif count > 0 then
+ head = reorder(head)
+ end
+ elseif count > 0 then
+ head = reorder(head)
+ end
+ end
+ if count > 0 then
+ head = reorder(head)
+ end
+ end
+ return head
+end
+
+fonts.constructors.features.otf.register {
+ name = "reordercombining",
+ description = "reorder combining characters",
+-- default = true,
+-- initializers = {
+-- node = reorderinitializer,
+-- },
+ processors = {
+ position = 1,
+ node = reorderprocessor,
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua
index 24891a2cdf3..760ce37193a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-dimensions.lua
@@ -47,6 +47,8 @@ local function initialize(tfmdata,key,value)
newdepth = gettexdimen("strutdp")
elseif value == "mono" then
newwidth = emwidth
+ elseif value == "halfmono" then
+ newwidth = emwidth / 2
else
-- there are fonts out there with no x_height ...
local spec = settings_to_array(value)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua
index cc6e4c0bf88..43ce82b71a6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-effects.lua
@@ -215,62 +215,88 @@ local rules = {
-- end
-- end
-local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze)
- if delta ~= 0 then
- for i=1,#rules do
- local name = rules[i]
- local value = mathparameters[name]
- if value then
- mathparameters[name] = (squeeze or 1) * (value + dx)
+-- radicals are not yet ok
+
+local setmathparameters
+local setmathcharacters
+
+if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then
+
+ setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta ~= 0 then
+ for i=1,#rules do
+ local name = rules[i]
+ local value = mathparameters[name]
+ if value then
+ mathparameters[name] = (squeeze or 1) * (value + dy)
+ end
end
end
end
-end
-local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+ setmathcharacters = function()
+ end
+
+else
- local function wdpatch(char)
- if wsnap ~= 0 then
- char.width = char.width + wdelta/2
+ setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta ~= 0 then
+ for i=1,#rules do
+ local name = rules[i]
+ local value = mathparameters[name]
+ if value then
+ mathparameters[name] = (squeeze or 1) * (value + dy)
+ end
+ end
end
end
- local function htpatch(char)
- if hsnap ~= 0 then
- local height = char.height
- if height then
- char.height = char.height + 2 * dy
+ setmathcharacters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+
+ -- still not the perfect rule
+
+ local function wdpatch(char)
+ if wsnap ~= 0 then
+ char.width = char.width + wdelta/2
end
end
- end
- local character = characters[0x221A]
+ local function htpatch(char)
+ if hsnap ~= 0 then
+ local height = char.height
+ if height then
+ char.height = char.height + 2 * dy
+ end
+ end
+ end
- if character and character.next then
--- print("base char",0x221A,table.sequenced(character))
- local char = character
- local next = character.next
- wdpatch(char)
- htpatch(char)
- while next do
- char = characters[next]
+ local character = characters[0x221A]
+
+ if character and character.next then
+ local char = character
+ local next = character.next
wdpatch(char)
htpatch(char)
--- print("next char",next,table.sequenced(char))
- next = char.next
- end
- if char then
- local v = char.vert_variants
- if v then
- local top = v[#v]
- if top then
- local char = characters[top.glyph]
--- print("top char",top.glyph,table.sequenced(char))
- htpatch(char)
+ while next do
+ char = characters[next]
+ wdpatch(char)
+ htpatch(char)
+ next = char.next
+ end
+ if char then
+ local v = char.vert_variants
+ if v then
+ local top = v[#v]
+ if top then
+ local char = characters[top.glyph]
+ htpatch(char)
+ end
end
end
end
+
end
+
end
-- local show_effect = { "lua", function(f,c)
@@ -278,7 +304,7 @@ end
-- inspect(fonts.hashes.characters[f][c])
-- end }
--- local show_effect = { "lua", "print('!')" }
+local shiftmode = CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0
local function manipulateeffect(tfmdata)
local effect = tfmdata.properties.effect
@@ -301,42 +327,49 @@ local function manipulateeffect(tfmdata)
local factor = (1 + effect.factor) * factor
local hfactor = (1 + effect.hfactor) * hfactor
local vfactor = (1 + effect.vfactor) * vfactor
- local vshift = vshift ~= 0 and upcommand[vshift] or false
+ if shiftmode then
+ parameters.hshift = hshift
+ parameters.vshift = vshift
+ else
+ vshift = vshift ~= 0 and upcommand[vshift] or false
+ hshift = rightcommand[hshift]
+ end
for unicode, character in next, characters do
local oldwidth = character.width
local oldheight = character.height
local olddepth = character.depth
if oldwidth and oldwidth > 0 then
character.width = oldwidth + wdelta
- local commands = character.commands
- local hshift = rightcommand[hshift]
- if vshift then
- if commands then
- prependcommands ( commands,
--- show_effect,
- hshift,
- vshift
- )
- else
- character.commands = {
--- show_effect,
- hshift,
- vshift,
- charcommand[unicode]
- }
- end
- else
- if commands then
- prependcommands ( commands,
--- show_effect,
- hshift
- )
+ if not shiftmode then
+ local commands = character.commands
+ if vshift then
+ if commands then
+ prependcommands ( commands,
+ -- show_effect,
+ hshift,
+ vshift
+ )
+ else
+ character.commands = {
+ -- show_effect,
+ hshift,
+ vshift,
+ charcommand[unicode]
+ }
+ end
else
- character.commands = {
--- show_effect,
- hshift,
- charcommand[unicode]
- }
+ if commands then
+ prependcommands ( commands,
+ -- show_effect,
+ hshift
+ )
+ else
+ character.commands = {
+ -- show_effect,
+ hshift,
+ charcommand[unicode]
+ }
+ end
end
end
end
@@ -348,7 +381,7 @@ local function manipulateeffect(tfmdata)
end
end
if mathparameters then
- setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze)
+ setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
end
parameters.factor = factor
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua
index 83c785d3876..6c432d7cf4a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-italics.lua
@@ -79,33 +79,7 @@ if context then
registerotffeature(specification)
registerafmfeature(specification)
-end
-
--- no longer used
-
--- if context then
---
--- -- local function initializemathitalics(tfmdata,value) -- yes no delay
--- -- tfmdata.properties.mathitalics = toboolean(value)
--- -- end
--- --
--- -- local specification = {
--- -- name = "mathitalics",
--- -- description = "use alternative math italic correction",
--- -- initializers = {
--- -- base = initializemathitalics,
--- -- node = initializemathitalics,
--- -- }
--- -- }
--- --
--- -- registerotffeature(specification)
--- -- registerafmfeature(specification)
---
--- end
-
--- -- also not used, only when testing
-
-if context then
+ -- only used when testing
local letter = characters.is_letter
local always = true
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua
index d93ece4059b..d2294e93c6f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-math.lua
@@ -79,3 +79,53 @@ registerotffeature {
node = initialize,
}
}
+
+function fonts.helpers.mathscriptslots(tfmdata,textcode)
+ local rawdata = tfmdata.shared.rawdata
+ local rawresources = rawdata and rawdata.resources
+ local rawfeatures = rawresources and rawresources.features
+ local basesubstitutions = rawfeatures and rawfeatures.gsub
+ local sequences = basesubstitutions and tfmdata.resources.sequences
+ if sequences then
+ local characters = tfmdata.characters
+ if characters[textcode] then
+ for s=1,#sequences do
+ local sequence = sequences[s]
+ local sfeatures = sequence.features
+ if sfeatures and sfeatures.ssty then
+ local steps = sequence.steps
+ for i=1,#steps do
+ local coverage = steps[i].coverage
+ if coverage then
+ local okay = coverage[textcode]
+ if okay then
+ return okay
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+local function initialize(tfmdata,key,value)
+ if value then
+ local rawdata = tfmdata.shared.rawdata
+ local rawresources = rawdata and rawdata.resources
+ local mathconstants = rawresources.mathconstants
+ if mathconstants then
+ tfmdata.properties.oldmath = true
+ end
+ end
+end
+
+local specification = {
+ name = "oldmath",
+ description = "deal with fake opentype fonts",
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+registerotffeature(specification)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-imp-tracing.lua b/Master/texmf-dist/tex/context/base/mkiv/font-imp-tracing.lua
index 6ce44514372..255b4cdf068 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-imp-tracing.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-imp-tracing.lua
@@ -47,58 +47,22 @@ local v_none = variables.none
-- boundingbox={yes|background|frame|empty|<color>}
-local bp = number.dimenfactors.bp
-local r = 16384 * bp -- 65536 // 4
-local f_1 = formatters["%.6F w 0 %.6F %.6F %.6F re f"]
-local f_2 = formatters["[] 0 d 0 J %.6F w %.6F %.6F %.6F %.6F re S"]
-
--- change this into w h d instead of h d w
-
-local backcache = setmetatableindex(function(t,h)
- local h = h * bp
- local v = setmetatableindex(function(t,d)
- local d = d * bp
- local v = setmetatableindex(function(t,w)
- local v = { "pdf", "origin", f_1(r,-d,w*bp,h+d) }
- t[w] = v
- return v
- end)
- t[d] = v
- return v
- end)
- t[h] = v
- return v
-end)
-
-local forecache = setmetatableindex(function(t,h)
- local h = h * bp
- local v = setmetatableindex(function(t,d)
- local d = d * bp
- local v = setmetatableindex(function(t,w)
- -- the frame goes through the boundingbox
- local v = { "pdf", "origin", f_2(r,r/2,-d+r/2,w*bp-r,h+d-r) }
- t[w] = v
- return v
- end)
- t[d] = v
- return v
- end)
- t[h] = v
- return v
-end)
-
-local startcolor = nil
-local stopcolor = nil
+local backgrounds = nil
+local outlines = nil
+local startcolor = nil
+local stopcolor = nil
local function initialize(tfmdata,key,value)
if value then
- if not backcolors then
+ if not backgrounds then
local vfspecials = backends.pdf.tables.vfspecials
- startcolor = vfspecials.startcolor
- stopcolor = vfspecials.stopcolor
+ startcolor = vfspecials.startcolor
+ stopcolor = vfspecials.stopcolor
+ backgrounds = vfspecials.backgrounds
+ outlines = vfspecials.outlines
end
local characters = tfmdata.characters
- local rulecache = backcache
+ local rulecache = backgrounds
local showchar = true
local color = "palegray"
if type(value) == "string" then
@@ -106,9 +70,9 @@ local function initialize(tfmdata,key,value)
for i=1,#value do
local v = value[i]
if v == v_frame then
- rulecache = forecache
+ rulecache = outlines
elseif v == v_background then
- rulecache = backcache
+ rulecache = backgrounds
elseif v == v_empty then
showchar = false
elseif v == v_none then
@@ -175,107 +139,3 @@ local specification = {
registerotffeature(specification)
registerafmfeature(specification)
-
-local f_m = formatters["%F %F m"]
-local f_l = formatters["%F %F l"]
-local f_b = formatters["[] 0 d 0 J %.6F w"]
-local f_e = formatters["s"]
-
-local function ladder(list,docolor,nocolor,lst,offset,sign,default)
- local l = lst[1]
- local x1 = bp * (offset + l.kern) * sign
- local y1 = bp * l.height
- local t = { f_b(r,r/2), f_m(x1,y1) }
- local n = 2
- local m = #lst
- if default > 0 then
- default = default * bp + r
- else
- default = default * bp - r
- end
- if m == 1 then
- n = n + 1 t[n] = f_l(x1,default)
- else
- for i=1,m do
- local l = lst[i]
- local x2 = bp * (offset + l.kern) * sign
- local y2 = bp * l.height
- if i > 1 and y2 == 0 then
- y2 = default
- end
- n = n + 1 t[n] = f_l(x2,y1)
- n = n + 1 t[n] = f_l(x2,y2)
- x1, y1 = x2, y2
- end
- end
- n = n + 1 t[n] = f_e()
- list[#list+1] = docolor
- list[#list+1] = { "pdf", "origin", concat(t," ") }
- list[#list+1] = nocolor
-end
-
-local function initialize(tfmdata,key,value)
- if value then
- if not backcolors then
- local vfspecials = backends.pdf.tables.vfspecials
- startcolor = vfspecials.startcolor
- stopcolor = vfspecials.stopcolor
- end
- local characters = tfmdata.characters
- local brcolor = startcolor("darkred")
- local trcolor = startcolor("darkgreen")
- local blcolor = startcolor("darkblue")
- local tlcolor = startcolor("darkyellow")
- local black = stopcolor
- for unicode, character in next, characters do
- local mathkern = character.mathkern
- if mathkern then
- -- more efficient would be co collect more in one pdf
- -- directive but this is hardly used so not worth the
- -- effort
- local width = character.width or 0
- local height = character.height or 0
- local depth = character.depth or 0
- local list = { }
- local br = mathkern.bottom_right
- local tr = mathkern.top_right
- local bl = mathkern.bottom_left
- local tl = mathkern.top_left
- if br then
- ladder(list,brcolor,black,br,width,1,height)
- end
- if tr then
- ladder(list,trcolor,black,tr,width,1,-depth)
- end
- if bl then
- ladder(list,blcolor,black,bl,0,-1,height)
- end
- if tl then
- ladder(list,tlcolor,black,tl,0,-1,-depth)
- end
- if #list > 0 then
- local commands = character.commands
- if commands then
- character.commands = appendcommandtable(commands,list)
- else
- list[#list+1] = charcommand[unicode]
- character.commands = list
- end
- end
- end
- end
- end
-end
-
-local specification = {
- name = "staircase",
- description = "show staircase kerns",
- position=1,
- manipulators = {
- base = initialize,
- node = initialize,
- }
-}
-
-registerotffeature(specification)
-registerafmfeature(specification)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi
index 99e7117a38e..271a81c2aa4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ini.mkvi
@@ -2712,10 +2712,10 @@
\unexpanded\def\saverunningstyleandcolor
{\unexpanded\edef\restorerunningstyleandcolor
- {\setfontid \number\fontid\font
- \attribute\colormodelattribute \the\attribute\colormodelattribute
- \attribute\colorattribute \the\attribute\colorattribute
- \attribute\transparencyattribute\the\attribute\transparencyattribute
+ {\setfontid \number\fontid\font
+ \c_attr_colormodel \the\c_attr_colormodel
+ \c_attr_color \the\c_attr_color
+ \c_attr_transparency\the\c_attr_transparency
\relax}}
\let\restorerunningstyleandcolor\relax
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi
index b3cade5ff07..db9df49cd6f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi
@@ -49,17 +49,13 @@
\registerctxluafile{font-osd}{}
%registerctxluafile{font-osm}{}
-\ifcase\contextlmtxmode
- \ifnum\luatexversion>111
- \doifelsefileexists{font-ocm.lua}
- {\registerctxluafile{font-ocm}{}} % mkiv new
- {\registerctxluafile{font-ocl}{}}
- \else
- \registerctxluafile{font-ocl}{} % generic (will become luatex-fonts-ocl)
- \fi
-\else
- \registerctxluafile{font-ogr}{} % lmtx
-\fi
+% \ifcase\directlua{tex.print(callback.list()["provide_charproc_data"] == false and 1 or 0)}\relax
+% % this is the generic variant that will become luatex-fonts-ocl once we have
+% % more recent versions of luatex 1.13/1.14 on the garden
+ \registerctxluafile{font-ocl}{}
+% \else
+% \registerctxluafile{font-ocm}{}
+% \fi
% we use otf code for type one
@@ -117,6 +113,7 @@
\registerctxluafile{font-imp-dimensions}{}
\registerctxluafile{font-imp-spacekerns}{}
\registerctxluafile{font-imp-tweaks}{}
+\registerctxluafile{font-imp-combining}{}
\doifelsefileexists{font-imp-scripts.lua} {
\registerctxluafile{font-imp-scripts}{}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-map.lua b/Master/texmf-dist/tex/context/base/mkiv/font-map.lua
index 84a28a8b7ed..c983ea96343 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-map.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-map.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-map'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -103,6 +104,7 @@ local hash = { }
local conc = { }
table.setmetatableindex(hash,function(t,k)
+ local v
if k < 0xD7FF or (k > 0xDFFF and k <= 0xFFFF) then
v = f_single(k)
else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi
index 64810d3272a..594475808b7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-mat.mkvi
@@ -344,7 +344,7 @@
\to \everymathematics
\unexpanded\def\font_helpers_synchronize_math_family_mr
- {\attribute\mathfamilyattribute\ifconditional\c_font_bidirectional_mathstrategy
+ {\c_attr_mathfamily\ifconditional\c_font_bidirectional_mathstrategy
\ifconditional\c_math_right_to_left
\plustwo
\else
@@ -355,7 +355,7 @@
\fi}
\unexpanded\def\font_helpers_synchronize_math_family_mb
- {\attribute\mathfamilyattribute\ifconditional\c_font_bidirectional_mathstrategy
+ {\c_attr_mathfamily\ifconditional\c_font_bidirectional_mathstrategy
\ifconditional\c_math_right_to_left
\ifconditional\c_font_pseudo_bold_math_state\pluseight\else\plusfive\fi
\else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua b/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua
index fe972114f47..18120f524a0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-mis.lua
@@ -21,7 +21,7 @@ local readers = otf.readers
if readers then
- otf.version = otf.version or 3.111
+ otf.version = otf.version or 3.113
otf.cache = otf.cache or containers.define("fonts", "otl", otf.version, true)
function fonts.helpers.getfeatures(name,save)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua b/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua
index 8c0f6e441a7..ed307e7c531 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-nod.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-nod'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -18,7 +19,6 @@ local match, rep = string.match, string.rep
fonts = fonts or { }
nodes = nodes or { }
-
local fonts = fonts
local nodes = nodes
local context = context
@@ -39,9 +39,6 @@ local tonode = nuts.tonode
local injections = nodes.injections or { }
nodes.injections = injections
-local char_tracers = tracers.characters or { }
-tracers.characters = char_tracers
-
local step_tracers = tracers.steppers or { }
tracers.steppers = step_tracers
@@ -54,7 +51,7 @@ local disc_code = nodecodes.disc
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local getnext = nuts.getnext
local getprev = nuts.getprev
@@ -111,135 +108,9 @@ local function freeze(h,where)
end
end
-function char_tracers.collect(head,list,tag,n)
- n = n or 0
- local ok = false
- local fn = nil
- while head do
- local char, id = isglyph(head)
- if char then
- local font = id
- if font ~= fn then
- ok, fn = false, font
- end
- if not ok then
- ok = true
- n = n + 1
- list[n] = list[n] or { }
- list[n][tag] = { }
- end
- local l = list[n][tag]
- -- l[#l+1] = { char, font, i }
- l[#l+1] = { char, font }
- elseif id == disc_code then
- -- skip
- -- local pre, post, replace = getdisc(head)
- -- if replace then
- -- for n in nextglyph, replace do
- -- l[#l+1] = { c, f }
- -- end
- -- end
- -- if pre then
- -- for n in nextglyph, pre do
- -- l[#l+1] = { c, f }
- -- end
- -- end
- -- if post then
- -- for n in nextglyph, post do
- -- l[#l+1] = { c, f }
- -- end
- -- end
- else
- ok = false
- end
- head = getnext(head)
- end
-end
-
-function char_tracers.equal(ta, tb)
- if #ta ~= #tb then
- return false
- else
- for i=1,#ta do
- local a = ta[i]
- local b = tb[i]
- -- if a[1] ~= b[1] or a[2] ~= b[2] or a[3] ~= b[3] then
- if a[1] ~= b[1] or a[2] ~= b[2] then
- return false
- end
- end
- end
- return true
-end
-
-function char_tracers.string(t)
- local tt = { }
- for i=1,#t do
- tt[i] = utfchar(t[i][1])
- end
- return concat(tt,"")
-end
-
local f_unicode = formatters["%U"]
local f_badcode = formatters["{%i}"]
-function char_tracers.unicodes(t,decimal)
- local tt = { }
- for i=1,#t do
- local n = t[i][1]
- if n == 0 then
- tt[i] = "-"
- elseif decimal then
- tt[i] = n
- else
- tt[i] = f_unicode(n)
- end
- end
- return concat(tt," ")
-end
-
--- function char_tracers.indices(t,decimal)
--- local tt = { }
--- for i=1,#t do
--- local n = t[i][3]
--- if n == 0 then
--- tt[i] = "-"
--- elseif decimal then
--- tt[i] = n
--- else
--- tt[i] = f_unicode(n)
--- end
--- end
--- return concat(tt," ")
--- end
-
-function char_tracers.start()
- local npc = handlers.characters -- should accept nuts too
- local list = { }
- function handlers.characters(head)
- local n = #list
- char_tracers.collect(head,list,'before',n)
- head = npc(head) -- for the moment tonode
- char_tracers.collect(head,list,'after',n)
- if #list > n then
- list[#list+1] = { }
- end
- return head
- end
- function char_tracers.stop()
- tracers.list['characters'] = list
- local variables = {
- ['title'] = 'ConTeXt Character Processing Information',
- ['color-background-one'] = lmx.get('color-background-yellow'),
- ['color-background-two'] = lmx.get('color-background-purple'),
- }
- lmx.show('context-characters.lmx',variables)
- handlers.characters = npc
- tasks.restart("processors", "characters")
- end
- tasks.restart("processors", "characters")
-end
-
local stack = { }
function tracers.start(tag)
@@ -293,7 +164,6 @@ function step_tracers.glyphs(n,i)
end
function step_tracers.features()
- -- we cannot use first_glyph here as it only finds characters with subtype < 256
local f = collection[1]
for n, char, font in nextglyph, f do
local tfmdata = fontidentifiers[font]
@@ -396,7 +266,7 @@ function step_tracers.codes(i,command,space)
local char, id = isglyph(c)
if char then
showchar(char,id)
- elseif id == dir_code or (id == localpar_code and start_of_par(c)) then
+ elseif id == dir_code or (id == par_code and start_of_par(c)) then
context("[%s]",getdirection(c) or "?")
elseif id == disc_code then
local pre, post, replace = getdisc(c)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua
index 1890e5ec54e..e6a38af5c3e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua
@@ -8,10 +8,6 @@ if not modules then modules = { } end modules ['font-ocl'] = {
-- todo : user list of colors
-if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then
- return
-end
-
local tostring, tonumber, next = tostring, tonumber, next
local round, max = math.round, math.round
local gsub, find = string.gsub, string.find
@@ -151,85 +147,17 @@ local function convert(t,k)
return v
end
-local start = { "pdf", "mode", "font" } -- force text mode (so get q Q right)
------ stop = { "pdf", "mode", "page" } -- force page mode (else overlap)
-local push = { "pdf", "page", "q" }
-local pop = { "pdf", "page", "Q" }
-
--- -- This one results in color directives inside BT ET but has less q Q pairs. It
--- -- only shows the first glyph in acrobat and nothing more. No problem with other
--- -- renderers.
---
--- local function initializeoverlay(tfmdata,kind,value) -- hm, always value
--- if value then
--- local resources = tfmdata.resources
--- local palettes = resources.colorpalettes
--- if palettes then
--- --
--- local converted = resources.converted
--- if not converted then
--- converted = setmetatableindex(convert)
--- resources.converted = converted
--- end
--- local colorvalues = sharedpalettes[value] or converted[palettes[tonumber(value) or 1] or palettes[1]] or { }
--- local classes = #colorvalues
--- if classes == 0 then
--- return
--- end
--- --
--- local characters = tfmdata.characters
--- local descriptions = tfmdata.descriptions
--- local properties = tfmdata.properties
--- --
--- properties.virtualized = true
--- tfmdata.fonts = {
--- { id = 0 }
--- }
--- --
--- local getactualtext = otf.getactualtext
--- local default = colorvalues[#colorvalues]
--- local b, e = getactualtext(tounicode(0xFFFD))
--- local actualb = { "pdf", "page", b } -- saves tables
--- local actuale = { "pdf", "page", e } -- saves tables
--- --
--- for unicode, character in next, characters do
--- local description = descriptions[unicode]
--- if description then
--- local colorlist = description.colors
--- if colorlist then
--- local u = description.unicode or characters[unicode].unicode
--- local w = character.width or 0
--- local s = #colorlist
--- local goback = w ~= 0 and leftcommand[w] or nil -- needs checking: are widths the same
--- local t = {
--- start,
--- not u and actualb or { "pdf", "page", (getactualtext(tounicode(u))) },
--- push,
--- }
--- local n = 3
--- local l = nil
--- for i=1,s do
--- local entry = colorlist[i]
--- local v = colorvalues[entry.class] or default
--- if v and l ~= v then
--- n = n + 1 t[n] = v
--- l = v
--- end
--- n = n + 1 t[n] = charcommand[entry.slot]
--- if s > 1 and i < s and goback then
--- n = n + 1 t[n] = goback
--- end
--- end
--- n = n + 1 t[n] = pop
--- n = n + 1 t[n] = actuale
--- n = n + 1 t[n] = stop
--- character.commands = t
--- end
--- end
--- end
--- end
--- end
--- end
+-- At some point 'font' mode was added to the engine and we can assume that most distributions
+-- ship a luatex that has it; ancient versions are no longer supported anyway. Begin 2020 there
+-- was an actualtext related mail exchange with RM etc. that might result in similar mode keys
+-- in other tex->pdf programs because there is a bit of inconsistency in the way this is dealt
+-- with. Best is not to touch this code too much.
+
+local mode = { "pdf", "mode", "font" }
+local push = { "pdf", "page", "q" }
+local pop = { "pdf", "page", "Q" }
+
+-- see context git repository for older variant (pre 20200501 cleanup)
local function initializeoverlay(tfmdata,kind,value)
if value then
@@ -278,10 +206,11 @@ local function initializeoverlay(tfmdata,kind,value)
local s = #colorlist
local goback = w ~= 0 and leftcommand[w] or nil -- needs checking: are widths the same
local t = {
+ mode,
not u and actualb or { "pdf", "page", (getactualtext(tounicode(u))) },
push,
}
- local n = 2
+ local n = 3
local l = nil
for i=1,s do
local entry = colorlist[i]
@@ -436,7 +365,7 @@ do
local savedata = io.savedata
local remove = os.remove
- if context and xml.convert then
+if context then
local xmlconvert = xml.convert
local xmlfirst = xml.first
@@ -451,13 +380,13 @@ do
return data
end
- else
+else
function otfsvg.filterglyph(entry,index) -- can be overloaded
return entry.data
end
- end
+end
local runner = sandbox and sandbox.registerrunner {
name = "otfsvg",
@@ -484,6 +413,16 @@ do
-- Because a generic setup can be flawed we need to catch bad inkscape runs which add a bit of
-- ugly overhead. Bah.
+ local new = nil
+
+ local function inkscapeformat(suffix)
+ if new == nil then
+ new = os.resultof("inkscape --version") or ""
+ new = new == "" or not find(new,"Inkscape%s*0")
+ end
+ return new and "filename" or suffix
+ end
+
function otfsvg.topdf(svgshapes,tfmdata)
local pdfshapes = { }
local inkscape = runner()
@@ -493,7 +432,7 @@ do
local nofshapes = #svgshapes
local f_svgfile = formatters["temp-otf-svg-shape-%i.svg"]
local f_pdffile = formatters["temp-otf-svg-shape-%i.pdf"]
- local f_convert = formatters["%s --export-pdf=%s\n"]
+ local f_convert = formatters["%s --export-%s=%s\n"]
local filterglyph = otfsvg.filterglyph
local nofdone = 0
local processed = { }
@@ -507,7 +446,7 @@ do
local svgfile = f_svgfile(index)
local pdffile = f_pdffile(index)
savedata(svgfile,data)
- inkscape:write(f_convert(svgfile,pdffile))
+ inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile))
processed[index] = true
nofdone = nofdone + 1
if nofdone % 25 == 0 then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua
new file mode 100644
index 00000000000..2f6c29e65d8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ocm.lua
@@ -0,0 +1,874 @@
+if not modules then modules = { } end modules ['font-ocm'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+if not context then
+ return
+elseif CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then
+ return
+else
+ -- Maybe I'll also make a generic variant but for now I just test this in
+ -- MkIV. After all, color fonts are not that much used (and generic is for
+ -- serious looking articles and books and not for fancy documents using
+ -- emoji.) Below is a quick and dirty implementation. Also, it looks like
+ -- these features were never used outside context anyway (in spite of being
+ -- in generic).
+end
+
+local tostring, tonumber, next = tostring, tonumber, next
+local round, max = math.round, math.round
+local sortedkeys, sortedhash, concat = table.sortedkeys, table.sortedhash, table.concat
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local otf = fonts.handlers.otf
+local otfregister = otf.features.register
+local bpfactor = number.dimenfactors.bp
+local typethree = { }
+
+callback.register("provide_charproc_data",function(action,f,...)
+ local registered = typethree[f]
+ if registered then
+ return registered(action,f,...)
+ else
+ return 0, 0 -- this will also disable further calls
+ end
+end)
+
+local defaults = {
+ [1] = function() return 0, 0 end,
+ [2] = function() return 0, 0 end,
+ [3] = function() return 0.001, "" end,
+}
+
+local function registeractions(t)
+ return {
+ [1] = t.preroll or defaults[1],
+ [2] = t.collect or defaults[2],
+ [3] = t.wrapup or defaults[3],
+ }
+end
+
+local function registertypethreeresource(specification,n,o)
+ specification.usedobjects["X"..n] = lpdf.reference(o)
+end
+
+local function registertypethreefont(specification,n,o)
+ specification.usedfonts["F"..n] = lpdf.reference(o)
+end
+
+local function typethreeresources(specification)
+ local usedobjects = specification.usedobjects
+ local usedfonts = specification.usedfonts
+ local resources = { }
+ if next(usedobjects) then
+ resources[#resources+1] = "/XObject << " .. usedobjects() .. " >>"
+ end
+ if next(usedfonts) then
+ resources[#resources+1] = "/Font << " .. usedfonts() .. " >>"
+ end
+ -- resources[#resources+1] = lpdf.collectedresources()
+ specification.usedfonts = nil
+ specification.usedobjects = nil
+ return concat(resources, " ")
+end
+
+local function registerfont(specification,actions)
+ specification.usedfonts = lpdf.dictionary()
+ specification.usedobjects = lpdf.dictionary()
+ typethree[specification.id] = function(action,f,c)
+ return actions[action](specification,f,c)
+ end
+end
+
+fonts.handlers.typethree = {
+ register = function(id,handler)
+ -- needed for manual
+ if not typethree[id] then
+ logs.report("fonts","low level Type3 handler registered for font with id %i",id)
+ typethree[id] = handler
+ end
+ end
+}
+
+local initializeoverlay do
+
+ local f_color = formatters["%.3f %.3f %.3f rg"]
+ local f_gray = formatters["%.3f g"]
+ local sharedpalettes = { }
+ local colors = attributes.list[attributes.private('color')] or { }
+ local transparencies = attributes.list[attributes.private('transparency')] or { }
+
+ function otf.registerpalette(name,values)
+ sharedpalettes[name] = values
+ local color = lpdf.color
+ local transparency = lpdf.transparency
+ local register = colors.register
+ for i=1,#values do
+ local v = values[i]
+ if v == "textcolor" then
+ values[i] = false
+ else
+ local c = nil
+ local t = nil
+ if type(v) == "table" then
+ c = register(name,"rgb",
+ max(round((v.r or 0)*255),255)/255,
+ max(round((v.g or 0)*255),255)/255,
+ max(round((v.b or 0)*255),255)/255
+ )
+ else
+ c = colors[v]
+ t = transparencies[v]
+ end
+ if c and t then
+ values[i] = color(1,c) .. " " .. transparency(t)
+ elseif c then
+ values[i] = color(1,c)
+ elseif t then
+ values[i] = color(1,t)
+ end
+ end
+ end
+ end
+
+ local function convert(t,k)
+ local v = { }
+ for i=1,#k do
+ local p = k[i]
+ local r, g, b = p[1], p[2], p[3]
+ if r == g and g == b then
+ v[i] = f_gray(r/255)
+ else
+ v[i] = f_color(r/255,g/255,b/255)
+ end
+ end
+ t[k] = v
+ return v
+ end
+
+ -- This is by no means watertight (the id mess) especially because we
+ -- don't know it yet. Instead we can just assemble here and avoid the
+ -- box approach. I might do that (so then we need to pass fonts and
+ -- extra resource entries.
+
+ local f_stream = formatters["%s 0 d0 %s 0 0 %s 0 %s cm /X%i Do"]
+ local fontorder = 0
+ local actions = registeractions {
+
+ preroll = function(specification,f,c)
+ local data = specification.delegated[c]
+ local colorlist = data.colorlist
+ local colorvalues = specification.colorvalues
+ local default = specification.default
+ local mainid = specification.mainid
+ local t = { "\\typethreefont{", mainid, "}" }
+ local n = 3
+ local l = nil
+ local m = #colorlist
+ for i=1,m do
+ local entry = colorlist[i]
+ local v = colorvalues[entry.class] or default
+ if v and l ~= v then
+ n = n + 1 ; t[n] = "\\typethreecode{"
+ n = n + 1 ; t[n] = v
+ n = n + 1 ; t[n] = "}"
+ l = v
+ end
+ if i < m then
+ n = n + 1 ; t[n] = "\\typethreechar{"
+ else
+ n = n + 1 ; t[n] = "\\typethreelast{"
+ end
+ n = n + 1 ; t[n] = entry.slot
+ n = n + 1 ; t[n] = "}"
+ end
+ token.set_macro("typethreemacro",concat(t))
+ tex.runlocal("typethreetoks")
+ registertypethreeresource(specification,c,tex.saveboxresource(0,nil,lpdf.collectedresources(),true))
+ -- registertypethreefont(specification,mainid,lpdf.reference(lpdf.getfontobjnumber(mainid)))
+ return 0, 0
+ end,
+
+ collect = function(specification,f,c)
+ local parameters = specification.parameters
+ local data = specification.delegated[c]
+ local factor = parameters.hfactor
+ local units = parameters.units
+ local width = (data.width or 0) / factor
+ local scale = 100
+ local factor = units * bpfactor -- / scale
+ local depth = (data.depth or 0)*factor
+ local shift = - depth / (10*units/1000)
+ local object = pdf.immediateobj("stream",f_stream(width,scale,scale,shift,c))
+ return object, width
+ end,
+
+ wrapup = function(specification,f)
+ return 0.001, typethreeresources(specification)
+ end,
+
+ }
+
+ local function register(specification)
+ registerfont(specification,actions)
+ end
+
+ initializeoverlay = function(tfmdata,kind,value)
+ if value then
+ local resources = tfmdata.resources
+ local palettes = resources.colorpalettes
+ if palettes then
+ local converted = resources.converted
+ if not converted then
+ converted = setmetatableindex(convert)
+ resources.converted = converted
+ end
+ local colorvalues = sharedpalettes[value]
+ local default = false -- so the text color (bad for icon overloads)
+ if colorvalues then
+ default = colorvalues[#colorvalues]
+ else
+ colorvalues = converted[palettes[tonumber(value) or 1] or palettes[1]] or { }
+ end
+ local classes = #colorvalues
+ if classes == 0 then
+ return
+ end
+ --
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local properties = tfmdata.properties
+ local parameters = tfmdata.parameters
+ --
+ properties.virtualized = true
+ --
+ local delegated = { }
+ local index = 0
+ local fonts = tfmdata.fonts or { }
+ local fontindex = #fonts + 1
+ tfmdata.fonts = fonts
+
+ local function flush()
+ if index > 0 then
+ fontorder = fontorder + 1
+ local f = {
+ characters = delegated,
+ parameters = parameters,
+ tounicode = true,
+ format = "type3",
+ name = "InternalTypeThreeFont" , -- .. fontorder,
+ psname = "none",
+ }
+ fonts[fontindex] = {
+ id = font.define(f),
+ delegated = delegated,
+ parameters = parameters,
+ colorvalues = colorvalues,
+ default = default,
+ }
+ end
+ fontindex = fontindex + 1
+ index = 0
+ delegated = { }
+ end
+
+ for unicode, character in sortedhash(characters) do
+ local description = descriptions[unicode]
+ if description then
+ local colorlist = description.colors
+ if colorlist then
+ if index == 255 then
+ flush()
+ end
+ index = index + 1
+ delegated[index] = {
+ width = character.width,
+ height = character.height,
+ depth = character.depth,
+ tounicode = character.tounicode,
+ colorlist = colorlist,
+ }
+ character.commands = {
+ { "slot", fontindex, index },
+ }
+ end
+ end
+ end
+
+ flush()
+ local mainid = font.nextid()
+ for i=1,#fonts do
+ local f = fonts[i]
+ if f.delegated then
+ f.mainid = mainid
+ register(f)
+ end
+ end
+
+ return true
+ end
+ end
+ end
+
+ otfregister {
+ name = "colr",
+ description = "color glyphs",
+ manipulators = {
+ base = initializeoverlay,
+ node = initializeoverlay,
+ }
+ }
+
+end
+
+do
+
+ local nofstreams = 0
+ local f_name = formatters[ [[pdf-glyph-%05i]] ]
+ local f_used = context and formatters[ [[original:///%s]] ] or formatters[ [[%s]] ]
+ local hashed = { }
+ local cache = { }
+
+ local openpdf = pdfe.new
+
+ function otf.storepdfdata(pdf)
+ if pdf then
+ local done = hashed[pdf]
+ if not done then
+ nofstreams = nofstreams + 1
+ local f = f_name(nofstreams)
+ local n = openpdf(pdf,#pdf,f)
+ done = f_used(n)
+ hashed[pdf] = done
+ end
+ return done
+ end
+ end
+
+end
+
+local pdftovirtual do
+
+ local f_stream = formatters["%s 0 d0 %s 0 0 %s %s %s cm /X%i Do"]
+ local fontorder = 0
+ local shared = { }
+ local actions = registeractions {
+
+ preroll = function(specification,f,c)
+ return 0, 0
+ end,
+
+ collect = function(specification,f,c)
+ local parameters = specification.parameters
+ local data = specification.delegated[c]
+ local desdata = data.desdata
+ local pdfdata = data.pdfdata
+ local width = desdata.width or 0
+ local height = desdata.height or 0
+ local depth = desdata.depth or 0
+ local factor = parameters.hfactor
+ local units = parameters.units
+ local typ = type(pdfdata)
+
+ local dx = 0
+ local dy = 0
+ local scale = 1
+
+ if typ == "table" then
+ data = pdfdata.data
+ dx = pdfdata.x or pdfdata.dx or 0
+ dy = pdfdata.y or pdfdata.dy or 0
+ scale = pdfdata.scale or 1
+ elseif typ == "string" then
+ data = pdfdata
+ dx = 0
+ dy = 0
+ else
+ return 0, 0
+ end
+
+ if not data then
+ return 0, 0
+ end
+
+ local name = otf.storepdfdata(data)
+ local xform = shared[name]
+
+ if not xform then
+ xform = images.embed(images.create { filename = name })
+ shared[name] = xform
+ end
+
+ registertypethreeresource(specification,c,xform.objnum)
+
+ scale = scale * (width / (xform.width * bpfactor))
+ dy = - depth + dy
+-- dx = 0
+-- dy = 0
+ local object = pdf.immediateobj("stream",f_stream(width,scale,scale,dx,dy,c)), width
+
+ return object, width
+ end,
+
+ wrapup = function(specification,f)
+ return 1/specification.parameters.units, typethreeresources(specification)
+ end,
+
+ }
+
+ local function register(specification)
+ registerfont(specification,actions)
+ end
+
+ pdftovirtual = function(tfmdata,pdfshapes,kind) -- kind = png|svg
+ if not tfmdata or not pdfshapes or not kind then
+ return
+ end
+ --
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local properties = tfmdata.properties
+ local parameters = tfmdata.parameters
+ local hfactor = parameters.hfactor
+ --
+ properties.virtualized = true
+ --
+ local storepdfdata = otf.storepdfdata
+ --
+ local delegated = { }
+ local index = 0
+ local fonts = tfmdata.fonts or { }
+ local fontindex = #fonts + 1
+ tfmdata.fonts = fonts
+
+ local function flush()
+ if index > 0 then
+ fontorder = fontorder + 1
+ local f = {
+ characters = delegated,
+ parameters = parameters,
+ tounicode = true,
+ format = "type3",
+ name = "InternalTypeThreeFont" .. fontorder,
+ psname = "none",
+ size = parameters.size,
+ }
+ fonts[fontindex] = {
+ id = font.define(f),
+ delegated = delegated,
+ parameters = parameters,
+ }
+ end
+ fontindex = fontindex + 1
+ index = 0
+ delegated = { }
+ end
+
+ for unicode, character in sortedhash(characters) do
+ local idx = character.index
+ if idx then
+ local pdfdata = pdfshapes[idx]
+ local description = descriptions[unicode]
+ if pdfdata and description then
+ if index == 255 then
+ flush()
+ end
+ index = index + 1
+ delegated[index] = {
+ desdata = description,
+ width = character.width,
+ height = character.width,
+ depth = character.width,
+ tounicode = character.tounicode,
+ pdfdata = pdfdata,
+ }
+ character.commands = {
+ { "slot", fontindex, index },
+ }
+ end
+ end
+ end
+ --
+ flush()
+ local mainid = font.nextid()
+ for i=1,#fonts do
+ local f = fonts[i]
+ if f.delegated then
+ f.mainid = mainid
+ register(f)
+ end
+ end
+ --
+ end
+
+end
+
+local initializesvg do
+
+ local otfsvg = otf.svg or { }
+ otf.svg = otfsvg
+ otf.svgenabled = true
+
+ local report_svg = logs.reporter("fonts","svg conversion")
+
+ local loaddata = io.loaddata
+ local savedata = io.savedata
+ local remove = os.remove
+
+ local xmlconvert = xml.convert
+ local xmlfirst = xml.first
+
+ function otfsvg.filterglyph(entry,index)
+ local d = entry.data
+ if gzip.compressed(d) then
+ d = gzip.decompress(d) or d
+ end
+ local svg = xmlconvert(d)
+ local root = svg and xmlfirst(svg,"/svg[@id='glyph"..index.."']")
+ local data = root and tostring(root)
+ return data
+ end
+
+ local runner = sandbox and sandbox.registerrunner {
+ name = "otfsvg",
+ program = "inkscape",
+ method = "pipeto",
+ template = "--export-area-drawing --shell > temp-otf-svg-shape.log",
+ reporter = report_svg,
+ }
+
+ if not runner then
+ --
+ -- poor mans variant for generic:
+ --
+ runner = function()
+ return io.popen("inkscape --export-area-drawing --shell > temp-otf-svg-shape.log","w")
+ end
+ end
+
+ -- There are svg out there with bad viewBox specifications where shapes lay outside that area,
+ -- but trying to correct that didn't work out well enough so I discarded that code. BTW, we
+ -- decouple the inskape run and the loading run because inkscape is working in the background
+ -- in the files so we need to have unique files.
+ --
+ -- Because a generic setup can be flawed we need to catch bad inkscape runs which add a bit of
+ -- ugly overhead. Bah.
+
+ local new = nil
+
+ local function inkscapeformat(suffix)
+ if new == nil then
+ new = os.resultof("inkscape --version") or ""
+ new = new == "" or not find(new,"Inkscape%s*0")
+ end
+ return new and "filename" or suffix
+ end
+
+ function otfsvg.topdf(svgshapes,tfmdata)
+ local pdfshapes = { }
+ local inkscape = runner()
+ if inkscape then
+ -- local indices = fonts.getindices(tfmdata)
+ local descriptions = tfmdata.descriptions
+ local nofshapes = #svgshapes
+ local f_svgfile = formatters["temp-otf-svg-shape-%i.svg"]
+ local f_pdffile = formatters["temp-otf-svg-shape-%i.pdf"]
+ local f_convert = formatters["%s --export-%s=%s\n"]
+ local filterglyph = otfsvg.filterglyph
+ local nofdone = 0
+ local processed = { }
+ report_svg("processing %i svg containers",nofshapes)
+ statistics.starttiming()
+ for i=1,nofshapes do
+ local entry = svgshapes[i]
+ for index=entry.first,entry.last do
+ local data = filterglyph(entry,index)
+ if data and data ~= "" then
+ local svgfile = f_svgfile(index)
+ local pdffile = f_pdffile(index)
+ savedata(svgfile,data)
+ inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile))
+ processed[index] = true
+ nofdone = nofdone + 1
+ if nofdone % 25 == 0 then
+ report_svg("%i shapes submitted",nofdone)
+ end
+ end
+ end
+ end
+ if nofdone % 25 ~= 0 then
+ report_svg("%i shapes submitted",nofdone)
+ end
+ report_svg("processing can be going on for a while")
+ inkscape:write("quit\n")
+ inkscape:close()
+ report_svg("processing %i pdf results",nofshapes)
+ for index in next, processed do
+ local svgfile = f_svgfile(index)
+ local pdffile = f_pdffile(index)
+ -- local fntdata = descriptions[indices[index]]
+ -- local bounds = fntdata and fntdata.boundingbox
+ local pdfdata = loaddata(pdffile)
+ if pdfdata and pdfdata ~= "" then
+ pdfshapes[index] = {
+ data = pdfdata,
+ -- x = bounds and bounds[1] or 0,
+ -- y = bounds and bounds[2] or 0,
+ }
+ end
+ remove(svgfile)
+ remove(pdffile)
+ end
+ local characters = tfmdata.characters
+ for k, v in next, characters do
+ local d = descriptions[k]
+ local i = d.index
+ if i then
+ local p = pdfshapes[i]
+ if p then
+ local w = d.width
+ local l = d.boundingbox[1]
+ local r = d.boundingbox[3]
+ p.scale = (r - l) / w
+ p.x = l
+ end
+ end
+ end
+ if not next(pdfshapes) then
+ report_svg("there are no converted shapes, fix your setup")
+ end
+ statistics.stoptiming()
+ if statistics.elapsedseconds then
+ report_svg("svg conversion time %s",statistics.elapsedseconds() or "-")
+ end
+ end
+ return pdfshapes
+ end
+
+ initializesvg = function(tfmdata,kind,value) -- hm, always value
+ if value and otf.svgenabled then
+ local svg = tfmdata.properties.svg
+ local hash = svg and svg.hash
+ local timestamp = svg and svg.timestamp
+ if not hash then
+ return
+ end
+ local pdffile = containers.read(otf.pdfcache,hash)
+ local pdfshapes = pdffile and pdffile.pdfshapes
+ if not pdfshapes or pdffile.timestamp ~= timestamp or not next(pdfshapes) then
+ -- the next test tries to catch errors in generic usage but of course can result
+ -- in running again and again
+ local svgfile = containers.read(otf.svgcache,hash)
+ local svgshapes = svgfile and svgfile.svgshapes
+ pdfshapes = svgshapes and otfsvg.topdf(svgshapes,tfmdata,otf.pdfcache.writable,hash) or { }
+ containers.write(otf.pdfcache, hash, {
+ pdfshapes = pdfshapes,
+ timestamp = timestamp,
+ })
+ end
+ pdftovirtual(tfmdata,pdfshapes,"svg")
+ return true
+ end
+ end
+
+ otfregister {
+ name = "svg",
+ description = "svg glyphs",
+ manipulators = {
+ base = initializesvg,
+ node = initializesvg,
+ }
+ }
+
+end
+
+-- This can be done differently e.g. with ffi and gm and we can share code anway. Using
+-- batchmode in gm is not faster and as it accumulates we would need to flush all
+-- individual shapes. But ... in context lmtx (and maybe the backport) we will use
+-- a different and more efficient method anyway. I'm still wondering if I should
+-- keep color code in generic. Maybe it should be optional.
+
+local initializepng do
+
+ local otfpng = otf.png or { }
+ otf.png = otfpng
+ otf.pngenabled = true
+
+ local report_png = logs.reporter("fonts","png conversion")
+
+ local loaddata = io.loaddata
+ local savedata = io.savedata
+ local remove = os.remove
+
+ local runner = sandbox and sandbox.registerrunner {
+ name = "otfpng",
+ program = "gm",
+ template = "convert -quality 100 temp-otf-png-shape.png temp-otf-png-shape.pdf > temp-otf-svg-shape.log",
+ -- reporter = report_png,
+ }
+
+ if not runner then
+ --
+ -- poor mans variant for generic:
+ --
+ runner = function()
+ return os.execute("gm convert -quality 100 temp-otf-png-shape.png temp-otf-png-shape.pdf > temp-otf-svg-shape.log")
+ end
+ end
+
+ -- Alternatively we can create a single pdf file with -adjoin and then pick up pages from
+ -- that file but creating thousands of small files is no fun either.
+
+ local files = utilities.files
+ local openfile = files.open
+ local closefile = files.close
+ local setposition = files.setposition
+ local readstring = files.readstring
+
+ function otfpng.topdf(pngshapes,filename)
+ if pngshapes and filename then
+ local pdfshapes = { }
+ local pngfile = "temp-otf-png-shape.png"
+ local pdffile = "temp-otf-png-shape.pdf"
+ local nofdone = 0
+ local indices = sortedkeys(pngshapes) -- can be sparse
+ local nofindices = #indices
+ report_png("processing %i png containers",nofindices)
+ statistics.starttiming()
+ local filehandle = openfile(filename)
+ for i=1,nofindices do
+ local index = indices[i]
+ local entry = pngshapes[index]
+ -- local data = entry.data -- or placeholder
+ local offset = entry.o
+ local size = entry.s
+ local x = entry.x
+ local y = entry.y
+ local data = nil
+ if offset and size then
+ setposition(filehandle,offset)
+ data = readstring(filehandle,size)
+ savedata(pngfile,data)
+ runner()
+ data = loaddata(pdffile)
+ end
+ pdfshapes[index] = {
+-- x = x ~= 0 and x or nil,
+-- y = y ~= 0 and y or nil,
+ data = data,
+ }
+ nofdone = nofdone + 1
+ if nofdone % 100 == 0 then
+ report_png("%i shapes processed",nofdone)
+ end
+ end
+ closefile(filehandle)
+ report_png("processing %i pdf results",nofindices)
+ remove(pngfile)
+ remove(pdffile)
+ statistics.stoptiming()
+ if statistics.elapsedseconds then
+ report_png("png conversion time %s",statistics.elapsedseconds() or "-")
+ end
+ return pdfshapes
+ end
+ end
+
+ initializepng = function(tfmdata,kind,value) -- hm, always value
+ if value and otf.pngenabled then
+ local png = tfmdata.properties.png
+ local hash = png and png.hash
+ local timestamp = png and png.timestamp
+ if not hash then
+ return
+ end
+ local pdffile = containers.read(otf.pdfcache,hash)
+ local pdfshapes = pdffile and pdffile.pdfshapes
+ if not pdfshapes or pdffile.timestamp ~= timestamp then
+ local pngfile = containers.read(otf.pngcache,hash)
+ local filename = tfmdata.resources.filename
+ local pngshapes = pngfile and pngfile.pngshapes
+ pdfshapes = pngshapes and otfpng.topdf(pngshapes,filename) or { }
+ containers.write(otf.pdfcache, hash, {
+ pdfshapes = pdfshapes,
+ timestamp = timestamp,
+ })
+ end
+ --
+ pdftovirtual(tfmdata,pdfshapes,"png")
+ return true
+ end
+ end
+
+ otfregister {
+ name = "sbix",
+ description = "sbix glyphs",
+ manipulators = {
+ base = initializepng,
+ node = initializepng,
+ }
+ }
+
+ otfregister {
+ name = "cblc",
+ description = "cblc glyphs",
+ manipulators = {
+ base = initializepng,
+ node = initializepng,
+ }
+ }
+
+end
+
+do
+
+ local function initializecolor(tfmdata,kind,value)
+ if value == "auto" then
+ return
+ initializeoverlay(tfmdata,kind,value) or
+ initializesvg (tfmdata,kind,value) or
+ initializepng (tfmdata,kind,value)
+ elseif value == "overlay" then
+ return initializeoverlay(tfmdata,kind,value)
+ elseif value == "svg" then
+ return initializesvg(tfmdata,kind,value)
+ elseif value == "png" or value == "bitmap" then
+ return initializepng(tfmdata,kind,value)
+ else
+ -- forget about it
+ end
+ end
+
+ otfregister {
+ name = "color",
+ description = "color glyphs",
+ manipulators = {
+ base = initializecolor,
+ node = initializecolor,
+ }
+ }
+
+end
+
+-- Old stuff:
+
+do
+
+ local startactualtext = nil
+ local stopactualtext = nil
+
+ function otf.getactualtext(s)
+ if not startactualtext then
+ startactualtext = backends.codeinjections.startunicodetoactualtextdirect
+ stopactualtext = backends.codeinjections.stopunicodetoactualtextdirect
+ end
+ return startactualtext(s), stopactualtext()
+ end
+
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-one.lua b/Master/texmf-dist/tex/context/base/mkiv/font-one.lua
index 5387516b4d5..829f52ea043 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-one.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-one.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-one'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -591,15 +592,18 @@ local function copytotfm(data)
parameters.descender = abs(metadata.descender or 0)
parameters.units = 1000
--
- properties.spacer = spacer
+ properties.spacer = spacer
+ properties.format = fonts.formats[filename] or "type1"
+ properties.filename = filename
+ properties.fontname = fontname
+ properties.fullname = fullname
+ properties.psname = fullname
+ properties.name = filename or fullname or fontname
+ properties.private = properties.private or data.private or privateoffset
+ --
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
properties.encodingbytes = 2
- properties.format = fonts.formats[filename] or "type1"
- properties.filename = filename
- properties.fontname = fontname
- properties.fullname = fullname
- properties.psname = fullname
- properties.name = filename or fullname or fontname
- properties.private = properties.private or data.private or privateoffset
+end
--
if next(characters) then
return {
@@ -723,6 +727,7 @@ local function read_from_afm(specification)
local tfmdata = afmtotfm(specification)
if tfmdata then
tfmdata.properties.name = specification.name
+ tfmdata.properties.id = specification.id
tfmdata = constructors.scale(tfmdata, specification)
local allfeatures = tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("afm",tfmdata,allfeatures,trace_features,report_afm)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua b/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua
index fc6bead5889..c33b09f9e2a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-onr.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-onr'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua
index 6cbf4bb86fe..ce1b22b50d7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ota.lua
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['font-ota'] = {
-- context only
local type = type
+local setmetatableindex = table.setmetatableindex
if not trackers then trackers = { register = function() end } end
@@ -285,7 +286,7 @@ if not classifiers then
local f_nko, l_nko = characters.blockrange("nko")
local f_ext_a, l_ext_a = characters.blockrange("arabicextendeda")
- classifiers = table.setmetatableindex(function(t,k)
+ classifiers = setmetatableindex(function(t,k)
if type(k) == "number" then
local c = chardata[k]
local v = false
@@ -461,6 +462,119 @@ methods.syrc = methods.arab
methods.mand = methods.arab
methods.nko = methods.arab
+-- a quick first attemp .. more later
+
+do
+
+ -- https://github.com/n8willis/opentype-shaping-documents/blob/master/opentype-shaping-mongolian.md#joining-properties
+ -- todo syrc
+
+ local joining = setmetatableindex(function(t,k)
+ if type(k) == "number" then
+ local c = chardata[k]
+ local v = false
+ if c then
+ local mongolian = c.mongolian
+ --
+ v = mongolian
+ end
+ t[k] = v
+ return v
+ end
+ end)
+
+ function methods.mong(head,font,attr)
+ local first, last
+ local current = head
+ local done = false
+ local prevjoin = nil
+ local prestate = nil
+ current = tonut(current)
+
+ local function wrapup()
+ if last then
+ if last ~= first then
+ local s = getstate(last)
+ if s == s_medi then
+ setstate(last,s_fina)
+ elseif s == s_init then
+ setstate(last,s_isol)
+ end
+ end
+ last = nil
+ first = nil
+ prevjoin = nil
+ prestate = nil
+ end
+ end
+
+ while current do
+ local char, id = ischar(current,font)
+ if char and not getstate(current) then
+ local currjoin = joining[char]
+ done = true
+ if not last then
+ setstate(current,s_isol)
+ prevjoin = currjoin
+ first = current
+ last = current
+ prevstate = s_isol
+ elseif currjoin == "t" then -- transparent
+ -- keep state
+ last = current
+ elseif prevjoin == "d" or prevjoin == "jc" or prevjoin == "l" then
+ if currjoin == "d" or prevjoin == "jc" or prevjoin == "r" then
+ local s = getstate(last)
+ if s == s_isol then
+ setstate(last,s_init)
+ elseif s == s_fina then
+ setstate(last,s_medi)
+ end
+ setstate(current,s_fina)
+ prevstate = s_fina
+ elseif prevjoin == "nj" or prevjoin == "l" then
+ local s = getstate(last)
+ if s == s_medi then
+ setstate(last,s_fina)
+ elseif s == s_init then
+ setstate(last,s_isol)
+ end
+ setstate(current,s_isol)
+ prevstate = s_isol
+ end
+ prevjoin = currjoin
+ last = current
+ elseif prevjoin == "nj" or prevjoin == "r" then
+ if s == s_medi then
+ setstate(last,s_fina)
+ elseif s == s_init then
+ setstate(last,s_isol)
+ end
+ setstate(current,s_isol)
+ prevjoin = currjoin
+ prevstate = s_isol
+ last = current
+ elseif last then
+ wrapup()
+ end
+ else
+ if last then
+ wrapup()
+ end
+ if id == math_code then -- a bit duplicate as we test for glyphs twice
+ current = end_of_math(current)
+ end
+ end
+ current = getnext(current)
+ end
+ if last then
+ wrapup()
+ end
+ return head, done
+ end
+
+end
+
directives.register("otf.analyze.useunicodemarks",function(v)
analyzers.useunicodemarks = v
end)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otd.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otd.lua
index 2633c6caec5..3f1b212dbb3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-otd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otd.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-otd'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua
index 2e7878d3dfd..bb02044dca6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otj.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-otj'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-lib.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -110,7 +111,7 @@ local properties = nodes.properties.data
local fontkern = nuts.pool and nuts.pool.fontkern -- context
local italickern = nuts.pool and nuts.pool.italickern -- context
-local useitalickerns = false
+local useitalickerns = false -- context only
directives.register("fonts.injections.useitalics", function(v)
if v then
@@ -119,7 +120,7 @@ directives.register("fonts.injections.useitalics", function(v)
useitalickerns = v
end)
-do if not fontkern then -- generic
+if not fontkern then -- generic
local thekern = nuts.new("kern",0) -- fontkern
local setkern = nuts.setkern
@@ -131,9 +132,9 @@ do if not fontkern then -- generic
return n
end
-end end
+end
-do if not italickern then -- generic
+if not italickern then -- generic
local thekern = nuts.new("kern",3) -- italiccorrection
local setkern = nuts.setkern
@@ -145,7 +146,7 @@ do if not italickern then -- generic
return n
end
-end end
+end
function injections.installnewkern() end -- obsolete
@@ -664,7 +665,15 @@ local function inject_kerns_only(head,where)
-- left|glyph|right
local leftkern = i.leftkern
if leftkern and leftkern ~= 0 then
- head = insert_node_before(head,current,fontkern(leftkern))
+ if prev and getid(prev) == glue_code then
+ if useitalickerns then
+ head = insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev, getwidth(prev) + leftkern)
+ end
+ else
+ head = insert_node_before(head,current,fontkern(leftkern))
+ end
end
end
if prevdisc then
@@ -819,12 +828,26 @@ local function inject_positions_only(head,where)
if rightkern and leftkern == -rightkern then
setoffsets(current,leftkern,false)
rightkern = 0
+ elseif prev and getid(prev) == glue_code then
+ if useitalickerns then
+ head = insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev, getwidth(prev) + leftkern)
+ end
else
head = insert_node_before(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern ~= 0 then
- insert_node_after(head,current,fontkern(rightkern))
+ if next and getid(next) == glue_code then
+ if useitalickerns then
+ insert_node_after(head,current,italickern(rightkern))
+ else
+ setwidth(next, getwidth(next) + rightkern)
+ end
+ else
+ insert_node_after(head,current,fontkern(rightkern))
+ end
end
else
local i = p.emptyinjections
@@ -1270,12 +1293,26 @@ local function inject_everything(head,where)
if rightkern and leftkern == -rightkern then
setoffsets(current,leftkern,false)
rightkern = 0
+ elseif prev and getid(prev) == glue_code then
+ if useitalickerns then
+ head = insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev, getwidth(prev) + leftkern)
+ end
else
head = insert_node_before(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern ~= 0 then
- insert_node_after(head,current,fontkern(rightkern))
+ if next and getid(next) == glue_code then
+ if useitalickerns then
+ insert_node_after(head,current,italickern(rightkern))
+ else
+ setwidth(next, getwidth(next) + rightkern)
+ end
+ else
+ insert_node_after(head,current,fontkern(rightkern))
+ end
end
end
else
@@ -1518,7 +1555,7 @@ local function inject_everything(head,where)
end
--
if keepregisteredcounts then
- keepregisteredcounts = false
+ keepregisteredcounts = false
else
nofregisteredkerns = 0
nofregisteredpositions = 0
@@ -1707,16 +1744,18 @@ local function injectspaces(head)
if useitalickerns then
local new = rightkern * factor
if trace_spaces then
- report_spaces("%C [%p + %p]",nextchar,old,new)
+ report_spaces("[%p + %p] %C",old,new,nextchar)
end
insert_node_after(head,n,italickern(new))
else
local new = old + rightkern * factor
if trace_spaces then
- report_spaces("[%p -> %p] %C",nextchar,old,new)
+ report_spaces("[%p -> %p] %C",old,new,nextchar)
end
setwidth(n,new)
end
+ else
+ -- message
end
rightkern = false
end
@@ -1753,3 +1792,4 @@ function injections.handler(head,where)
return head
end
end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua
index aff4cc8c8d9..8159db180d6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua
@@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.111 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.113 -- 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)
@@ -486,23 +486,26 @@ local function copytotfm(data,cache_id)
end
end
--
- parameters.designsize = (designsize/10)*65536
- parameters.minsize = (minsize /10)*65536
- parameters.maxsize = (maxsize /10)*65536
- parameters.ascender = abs(metadata.ascender or 0)
- parameters.descender = abs(metadata.descender or 0)
- parameters.units = units
- parameters.vheight = metadata.defaultvheight
+ parameters.designsize = (designsize/10)*65536
+ parameters.minsize = (minsize /10)*65536
+ parameters.maxsize = (maxsize /10)*65536
+ parameters.ascender = abs(metadata.ascender or 0)
+ parameters.descender = abs(metadata.descender or 0)
+ parameters.units = units
+ parameters.vheight = metadata.defaultvheight
--
- properties.space = spacer
+ properties.space = spacer
+ properties.format = data.format or formats.otf
+ properties.filename = filename
+ properties.fontname = fontname
+ properties.fullname = fullname
+ properties.psname = psname
+ properties.name = filename or fullname
+ properties.subfont = subfont
+ --
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
properties.encodingbytes = 2
- properties.format = data.format or formats.otf
- properties.filename = filename
- properties.fontname = fontname
- properties.fullname = fullname
- properties.psname = psname
- properties.name = filename or fullname
- properties.subfont = subfont
+end
--
-- properties.name = specification.name
-- properties.sub = specification.sub
@@ -605,6 +608,7 @@ local function read_from_otf(specification)
-- this late ? .. needs checking
tfmdata.properties.name = specification.name
tfmdata.properties.sub = specification.sub
+ tfmdata.properties.id = specification.id
--
tfmdata = constructors.scale(tfmdata,specification)
local allfeatures = tfmdata.shared.features or specification.features.normal
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua
index e726053202f..531f665de72 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-otr'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -2084,8 +2085,6 @@ local function readtable(tag,f,fontdata,specification,...)
end
end
-local variablefonts_supported = (context and true) or (logs and logs.application and true) or false
-
local function readdata(f,offset,specification)
local fontdata, tables = loadtables(f,specification,offset)
@@ -2094,12 +2093,6 @@ local function readdata(f,offset,specification)
prepareglyps(fontdata)
end
- if not variablefonts_supported then
- specification.instance = nil
- specification.variable = nil
- specification.factors = nil
- end
-
fontdata.temporary = { }
readtable("name",f,fontdata,specification)
@@ -2118,71 +2111,66 @@ local function readdata(f,offset,specification)
readtable("avar",f,fontdata,specification)
readtable("fvar",f,fontdata,specification)
- if variablefonts_supported then
-
- local variabledata = fontdata.variabledata
-
- if variabledata then
- local instances = variabledata.instances
- local axis = variabledata.axis
- if axis and (not instances or #instances == 0) then
- instances = { }
- variabledata.instances = instances
- local function add(n,subfamily,value)
- local values = { }
- for i=1,#axis do
- local a = axis[i]
- values[i] = {
- axis = a.tag,
- value = i == n and value or a.default,
- }
- end
- instances[#instances+1] = {
- subfamily = subfamily,
- values = values,
- }
- end
+ local variabledata = fontdata.variabledata
+
+ if variabledata then
+ local instances = variabledata.instances
+ local axis = variabledata.axis
+ if axis and (not instances or #instances == 0) then
+ instances = { }
+ variabledata.instances = instances
+ local function add(n,subfamily,value)
+ local values = { }
for i=1,#axis do
- local a = axis[i]
- local tag = a.tag
- add(i,"default"..tag,a.default)
- add(i,"minimum"..tag,a.minimum)
- add(i,"maximum"..tag,a.maximum)
+ local a = axis[i]
+ values[i] = {
+ axis = a.tag,
+ value = i == n and value or a.default,
+ }
end
- -- report("%i fake instances added",#instances)
+ instances[#instances+1] = {
+ subfamily = subfamily,
+ values = values,
+ }
end
- end
-
- if not specification.factors then
- local instance = specification.instance
- if type(instance) == "string" then
- local factors = helpers.getfactors(fontdata,instance)
- if factors then
- specification.factors = factors
- fontdata.factors = factors
- fontdata.instance = instance
- report("user instance: %s, factors: % t",instance,factors)
- else
- report("user instance: %s, bad factors",instance)
- end
+ for i=1,#axis do
+ local a = axis[i]
+ local tag = a.tag
+ add(i,"default"..tag,a.default)
+ add(i,"minimum"..tag,a.minimum)
+ add(i,"maximum"..tag,a.maximum)
end
+ -- report("%i fake instances added",#instances)
end
-
- if not fontdata.factors then
- if fontdata.variabledata then
- local factors = helpers.getfactors(fontdata,true)
- if factors then
- specification.factors = factors
- fontdata.factors = factors
- -- report("factors: % t",factors)
- -- else
- -- report("bad factors")
- end
+ end
+ if not specification.factors then
+ local instance = specification.instance
+ if type(instance) == "string" then
+ local factors = helpers.getfactors(fontdata,instance)
+ if factors then
+ specification.factors = factors
+ fontdata.factors = factors
+ fontdata.instance = instance
+ report("user instance: %s, factors: % t",instance,factors)
else
- -- report("unknown instance")
+ report("user instance: %s, bad factors",instance)
end
end
+ end
+ if not fontdata.factors then
+ if fontdata.variabledata then
+ local factors = helpers.getfactors(fontdata,true)
+ if factors then
+ specification.factors = factors
+ fontdata.factors = factors
+ -- report("factors: % t",factors)
+ -- else
+ -- report("bad factors")
+ end
+ else
+ -- report("unknown instance")
+ end
end
readtable("os/2",f,fontdata,specification)
@@ -2433,6 +2421,7 @@ function readers.loadfont(filename,n,instance)
hascolor = fontdata.hascolor or false,
instance = fontdata.instance,
factors = fontdata.factors,
+ nofsubfonts = fontdata.subfonts and #fontdata.subfonts or nil,
},
resources = {
-- filename = fontdata.filename,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua
index f20a349eeb2..880bcb6d50a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ots.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-ots'] = { -- sequences
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -12,7 +13,7 @@ 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 a decade ago was) kind of vague.
+<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
@@ -25,7 +26,7 @@ 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
-becaus quite useful. When it did most of what we wanted, a more optimized version
+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
@@ -217,6 +218,7 @@ local copy_only_glyphs = nuts.copy_only_glyphs
local count_components = nuts.count_components
local set_components = nuts.set_components
local get_components = nuts.get_components
+local flush_components = nuts.flush_components
---------------------------------------------------------------------------------------
@@ -250,7 +252,10 @@ local glue_code = nodecodes.glue
local disc_code = nodecodes.disc
local math_code = nodecodes.math
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
+
+local lefttoright_code = nodes.dirvalues.lefttoright
+local righttoleft_code = nodes.dirvalues.righttoleft
local discretionarydisc_code = disccodes.discretionary
local ligatureglyph_code = glyphcodes.ligature
@@ -484,6 +489,7 @@ local function markstoligature(head,start,stop,char)
setsubtype(base,ligatureglyph_code)
set_components(base,start)
setlink(prev,base,next)
+ flush_components(start)
return head, base
end
end
@@ -496,9 +502,25 @@ end
-- in the not discfound branch then. We now have skiphash too so we can be more
-- selective if needed (todo).
+-- we can have more granularity here but for now we only do a simple check
+
+local no_left_ligature_code = 1
+local no_right_ligature_code = 2
+local no_left_kern_code = 4
+local no_right_kern_code = 8
+
+local has_glyph_option = node.direct.has_glyph_option or function(n,c)
+ if c == no_left_ligature_code or c == no_right_ligature_code then
+ return getattr(n,a_noligature) == 1
+ else
+ return false
+ end
+end
+
+-- in lmtx we need to check the components and can be slightly more clever
+
local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfound,hasmarks) -- brr head
- if getattr(start,a_noligature) == 1 then
- -- so we can do: e\noligature{ff}e e\noligature{f}fie (we only look at the first)
+ if has_glyph_option(start,no_right_ligature_code) then
return head, start
end
if start == stop and getchar(start) == char then
@@ -533,19 +555,19 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
if not marks[char] then
baseindex = baseindex + componentindex
componentindex = count_components(start,marks)
- -- we can be more clever here: "not deletemarks or (skiphash and not skiphash[char])"
- -- and such:
+ -- we can be more clever here: "not deletemarks or (skiphash and not skiphash[char])"
+ -- and such:
elseif not deletemarks then
-- we can get a loop when the font expects otherwise (i.e. unexpected deletemarks)
setligaindex(start,baseindex + getligaindex(start,componentindex))
if trace_marks then
- logwarning("%s: keep mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ logwarning("%s: keep ligature mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
end
local n = copy_node(start)
copyinjection(n,start) -- is this ok ? we position later anyway
head, current = insert_node_after(head,current,n) -- unlikely that mark has components
elseif trace_marks then
- logwarning("%s: delete mark %s",pref(dataset,sequence),gref(char))
+ logwarning("%s: delete ligature mark %s",pref(dataset,sequence),gref(char))
end
start = getnext(start)
end
@@ -558,7 +580,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
if marks[char] then
setligaindex(start,baseindex + getligaindex(start,componentindex))
if trace_marks then
- logwarning("%s: set mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ logwarning("%s: set ligature mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
end
start = getnext(start)
else
@@ -568,6 +590,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
break
end
end
+ flush_components(components)
else
-- discfound ... forget about marks .. probably no scripts that hyphenate and have marks
local discprev, discnext = getboth(discfound)
@@ -806,6 +829,9 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip
-- of{f-}{}{f}e o{f-}{}{f}fe o{-}{}{ff}e (oe and ff ligature)
-- we can end up here when we have a start run .. testruns start at a disc but
-- so here we have the other case: char + disc
+ --
+ -- Challenge for Kai (latinmodern): \hyphenation{fii-f-f-iif} fiiffiif
+ --
if discfound then
-- don't assume marks in a disc and we don't run over a disc (for now)
local pre, post, replace = getdisc(discfound)
@@ -898,81 +924,89 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip
end
function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- local startchar = getchar(start)
- local format = step.format
- if format == "single" or type(kerns) == "table" then -- the table check can go
- local dx, dy, w, h = setposition(0,start,factor,rlmode,kerns,injection)
- if trace_kerns then
- logprocess("%s: shifting single %s by %s xy (%p,%p) and wh (%p,%p)",pref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
- end
+ if has_glyph_option(start,no_right_kern_code) then
+ return head, start, false
else
- local k = (format == "move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
- if trace_kerns then
- logprocess("%s: shifting single %s by %s %p",pref(dataset,sequence),gref(startchar),format,k)
+ local startchar = getchar(start)
+ local format = step.format
+ if format == "single" or type(kerns) == "table" then -- the table check can go
+ local dx, dy, w, h = setposition(0,start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s xy (%p,%p) and wh (%p,%p)",pref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
+ end
+ else
+ local k = (format == "move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s %p",pref(dataset,sequence),gref(startchar),format,k)
+ end
end
+ return head, start, true
end
- return head, start, true
end
function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- local snext = getnext(start)
- if not snext then
+ if has_glyph_option(start,no_right_kern_code) then
return head, start, false
else
- local prev = start
- while snext do
- local nextchar = ischar(snext,currentfont)
- if nextchar then
- if skiphash and skiphash[nextchar] then -- includes marks too when flag
- prev = snext
- snext = getnext(snext)
- else
- local krn = kerns[nextchar]
- if not krn then
- break
- end
- local format = step.format
- if format == "pair" then
- local a = krn[1]
- local b = krn[2]
- if a == true then
- -- zero
- elseif a then -- #a > 0
- local x, y, w, h = setposition(1,start,factor,rlmode,a,injection)
- if trace_kerns then
- local startchar = getchar(start)
- logprocess("%s: shifting first of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
- end
+ local snext = getnext(start)
+ if not snext then
+ return head, start, false
+ else
+ local prev = start
+ while snext do
+ local nextchar = ischar(snext,currentfont)
+ if nextchar then
+ if skiphash and skiphash[nextchar] then -- includes marks too when flag
+ prev = snext
+ snext = getnext(snext)
+ else
+ local krn = kerns[nextchar]
+ if not krn then
+ break
end
- if b == true then
- -- zero
- start = snext -- cf spec
- elseif b then -- #b > 0
- local x, y, w, h = setposition(2,snext,factor,rlmode,b,injection)
+ local format = step.format
+ if format == "pair" then
+ local a = krn[1]
+ local b = krn[2]
+ if a == true then
+ -- zero
+ elseif a then -- #a > 0
+ local x, y, w, h = setposition(1,start,factor,rlmode,a,injection)
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ end
+ if b == true then
+ -- zero
+ start = snext -- cf spec
+ elseif b then -- #b > 0
+ local x, y, w, h = setposition(2,snext,factor,rlmode,b,injection)
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting second of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ start = snext -- cf spec
+ elseif forcepairadvance then
+ start = snext -- for testing, not cf spec
+ end
+ return head, start, true
+ elseif krn ~= 0 then
+ local k = (format == "move" and setmove or setkern)(snext,factor,rlmode,krn,injection)
if trace_kerns then
- local startchar = getchar(start)
- logprocess("%s: shifting second of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ logprocess("%s: inserting %s %p between %s and %s as %s",pref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar),injection or "injections")
end
- start = snext -- cf spec
- elseif forcepairadvance then
- start = snext -- for testing, not cf spec
- end
- return head, start, true
- elseif krn ~= 0 then
- local k = (format == "move" and setmove or setkern)(snext,factor,rlmode,krn,injection)
- if trace_kerns then
- logprocess("%s: inserting %s %p between %s and %s as %s",pref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar),injection or "injections")
+ return head, start, true
+ else -- can't happen
+ break
end
- return head, start, true
- else -- can't happen
- break
end
+ else
+ break
end
- else
- break
end
+ return head, start, false
end
- return head, start, false
end
end
@@ -1501,92 +1535,98 @@ function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup
end
function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
- local mapping = currentlookup.mapping
- if mapping == nil then
- mapping = getmapping(dataset,sequence,currentlookup)
- end
- if mapping then
- local startchar = getchar(start)
- local kerns = mapping[startchar]
- if kerns then
- local format = currentlookup.format
- if format == "single" then
- local dx, dy, w, h = setposition(0,start,factor,rlmode,kerns) -- currentlookup.flags ?
- if trace_kerns then
- logprocess("%s: shifting single %s by %s (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
- end
- else -- needs checking .. maybe no kerns format for single
- local k = (format == "move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
- if trace_kerns then
- logprocess("%s: shifting single %s by %s %p",cref(dataset,sequence),gref(startchar),format,k)
+ -- we actually should check no_left_kern_code with next
+ if not has_glyph_option(start,no_right_kern_code) then
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local startchar = getchar(start)
+ local kerns = mapping[startchar]
+ if kerns then
+ local format = currentlookup.format
+ if format == "single" then
+ local dx, dy, w, h = setposition(0,start,factor,rlmode,kerns) -- currentlookup.flags ?
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
+ end
+ else -- needs checking .. maybe no kerns format for single
+ local k = (format == "move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s %p",cref(dataset,sequence),gref(startchar),format,k)
+ end
end
+ return head, start, true
end
- return head, start, true
end
end
return head, start, false
end
function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex) -- todo: injections ?
- local mapping = currentlookup.mapping
- if mapping == nil then
- mapping = getmapping(dataset,sequence,currentlookup)
- end
- if mapping then
- local snext = getnext(start)
- if snext then
- local startchar = getchar(start)
- local kerns = mapping[startchar] -- always 1 step
- if kerns then
- local prev = start
- while snext do
- local nextchar = ischar(snext,currentfont)
- if not nextchar then
- break
- end
- if skiphash and skiphash[nextchar] then
- prev = snext
- snext = getnext(snext)
- else
- local krn = kerns[nextchar]
- if not krn then
+ -- we actually should check no_left_kern_code with next
+ if not has_glyph_option(start,no_right_kern_code) then
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local snext = getnext(start)
+ if snext then
+ local startchar = getchar(start)
+ local kerns = mapping[startchar] -- always 1 step
+ if kerns then
+ local prev = start
+ while snext do
+ local nextchar = ischar(snext,currentfont)
+ if not nextchar then
break
end
- local format = currentlookup.format
- if format == "pair" then
- local a = krn[1]
- local b = krn[2]
- if a == true then
- -- zero
- elseif a then
- local x, y, w, h = setposition(1,start,factor,rlmode,a,"injections") -- currentlookups flags?
- if trace_kerns then
- local startchar = getchar(start)
- logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
- end
+ if skiphash and skiphash[nextchar] then
+ prev = snext
+ snext = getnext(snext)
+ else
+ local krn = kerns[nextchar]
+ if not krn then
+ break
end
- if b == true then
- -- zero
- start = snext -- cf spec
- elseif b then -- #b > 0
- local x, y, w, h = setposition(2,snext,factor,rlmode,b,"injections")
+ local format = currentlookup.format
+ if format == "pair" then
+ local a = krn[1]
+ local b = krn[2]
+ if a == true then
+ -- zero
+ elseif a then
+ local x, y, w, h = setposition(1,start,factor,rlmode,a,"injections") -- currentlookups flags?
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ if b == true then
+ -- zero
+ start = snext -- cf spec
+ elseif b then -- #b > 0
+ local x, y, w, h = setposition(2,snext,factor,rlmode,b,"injections")
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ start = snext -- cf spec
+ elseif forcepairadvance then
+ start = snext -- for testing, not cf spec
+ end
+ return head, start, true
+ elseif krn ~= 0 then
+ local k = (format == "move" and setmove or setkern)(snext,factor,rlmode,krn)
if trace_kerns then
- local startchar = getchar(start)
- logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ logprocess("%s: inserting %s %p between %s and %s",cref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar))
end
- start = snext -- cf spec
- elseif forcepairadvance then
- start = snext -- for testing, not cf spec
- end
- return head, start, true
- elseif krn ~= 0 then
- local k = (format == "move" and setmove or setkern)(snext,factor,rlmode,krn)
- if trace_kerns then
- logprocess("%s: inserting %s %p between %s and %s",cref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar))
+ return head, start, true
+ else
+ break
end
- return head, start, true
- else
- break
end
end
end
@@ -2056,6 +2096,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
local sweepnode = sweepnode
local sweeptype = sweeptype
local sweepoverflow = false
+ local checkdisc = getprev(head)
local keepdisc = not sweepnode
local lookaheaddisc = nil
local backtrackdisc = nil
@@ -2089,6 +2130,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
sweepnode = current
current = getnext(current)
else
+ -- we can use an iterator
while replace and i <= l do
if getid(replace) == glyph_code then
i = i + 1
@@ -2189,7 +2231,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
local current = prev
local i = f
local t = sweeptype == "pre" or sweeptype == "replace"
- if not current and t and current == checkdisk then
+ if not current and t and current == checkdisc then
current = getprev(sweepnode)
end
while current and i > 1 do -- missing getprev added / moved outside
@@ -2218,7 +2260,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
end
end
current = getprev(current)
- if t and current == checkdisk then
+ if t and current == checkdisc then
current = getprev(sweepnode)
end
end
@@ -2443,6 +2485,10 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
local current = start
local last = start
+ if s == 1 then
+ goto next
+ end
+
-- current match
if l > f then
@@ -2512,10 +2558,9 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
break
end
end
- -- commented, for Kai to check
- -- if n <= l then
- -- notmatchpre[last] = true
- -- end
+ if n <= l then
+ notmatchpre[last] = true
+ end
else
notmatchpre[last] = true
end
@@ -3287,6 +3332,7 @@ local nesting = 0
local function c_run_single(head,font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
local done = false
local sweep = sweephead[head]
+ local start
if sweep then
start = sweep
-- sweephead[head] = nil
@@ -3448,6 +3494,7 @@ end
local function c_run_multiple(head,font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
local done = false
local sweep = sweephead[head]
+ local start
if sweep then
start = sweep
-- sweephead[head] = nil
@@ -3618,8 +3665,6 @@ end
local txtdirstate, pardirstate do -- this might change (no need for nxt in pardirstate)
local getdirection = nuts.getdirection
- local lefttoright = 0
- local righttoleft = 1
txtdirstate = function(start,stack,top,rlparmode)
local dir, pop = getdirection(start)
@@ -3628,19 +3673,19 @@ local txtdirstate, pardirstate do -- this might change (no need for nxt in pard
return 0, rlparmode
else
top = top - 1
- if stack[top] == righttoleft then
+ if stack[top] == righttoleft_code then
return top, -1
else
return top, 1
end
end
- elseif dir == lefttoright then
+ elseif dir == lefttoright_code then
top = top + 1
- stack[top] = lefttoright
+ stack[top] = lefttoright_code
return top, 1
- elseif dir == righttoleft then
+ elseif dir == righttoleft_code then
top = top + 1
- stack[top] = righttoleft
+ stack[top] = righttoleft_code
return top, -1
else
return top, rlparmode
@@ -3649,14 +3694,9 @@ local txtdirstate, pardirstate do -- this might change (no need for nxt in pard
pardirstate = function(start)
local dir = getdirection(start)
- if dir == lefttoright then
- return 1, 1
- elseif dir == righttoleft then
- return -1, -1
- -- for old times sake we we handle strings too
- elseif dir == "TLT" then
+ if dir == lefttoright_code then
return 1, 1
- elseif dir == "TRT" then
+ elseif dir == righttoleft_code then
return -1, -1
else
return 0, 0
@@ -3755,9 +3795,9 @@ do
local initialrl = 0
- if getid(head) == localpar_code and start_of_par(head) then
+ if getid(head) == par_code and start_of_par(head) then
initialrl = pardirstate(head)
- elseif direction == 1 or direction == "TRT" then
+ elseif direction == righttoleft_code then
initialrl = -1
end
@@ -3909,7 +3949,7 @@ do
elseif id == dir_code then
topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
start = getnext(start)
- -- elseif id == localpar_code and start_of_par(start) then
+ -- elseif id == par_code and start_of_par(start) then
-- rlparmode, rlmode = pardirstate(start)
-- start = getnext(start)
else
@@ -3993,7 +4033,7 @@ do
elseif id == dir_code then
topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
start = getnext(start)
- -- elseif id == localpar_code and start_of_par(start) then
+ -- elseif id == par_code and start_of_par(start) then
-- rlparmode, rlmode = pardirstate(start)
-- start = getnext(start)
else
@@ -4052,7 +4092,7 @@ do
local done = false
local dirstack = { nil } -- could move outside function but we can have local runs (maybe a few more nils)
local start = head
- local initialrl = (direction == 1 or direction == "TRT") and -1 or 0
+ local initialrl = (direction == righttoleft_code) and -1 or 0
local rlmode = initialrl
local rlparmode = initialrl
local topstack = 0
@@ -4104,7 +4144,7 @@ do
elseif id == dir_code then
topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
start = getnext(start)
- -- elseif id == localpar_code and start_of_par(start) then
+ -- elseif id == par_code and start_of_par(start) then
-- rlparmode, rlmode = pardirstate(start)
-- start = getnext(start)
else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua
index c9e467f2253..f4d7e05a137 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ott.lua
@@ -1117,41 +1117,6 @@ local checkers = {
end
}
--- Keep this:
---
--- function otf.features.normalize(features)
--- if features then
--- local h = { }
--- for k, v in next, features do
--- k = lower(k)
--- if k == "language" then
--- v = gsub(lower(v),"[^a-z0-9]","")
--- h.language = rawget(verboselanguages,v) or (languages[v] and v) or "dflt" -- auto adds
--- elseif k == "script" then
--- v = gsub(lower(v),"[^a-z0-9]","")
--- h.script = rawget(verbosescripts,v) or (scripts[v] and v) or "dflt" -- auto adds
--- else
--- if type(v) == "string" then
--- local b = is_boolean(v)
--- if type(b) == "nil" then
--- v = tonumber(v) or lower(v)
--- else
--- v = b
--- end
--- end
--- if not rawget(features,k) then
--- k = rawget(verbosefeatures,k) or k
--- end
--- local c = checkers[k]
--- h[k] = c and c(v) or v
--- end
--- end
--- return h
--- end
--- end
-
--- inspect(fonts.handlers.otf.statistics.usedfeatures)
-
if not storage then
return
end
@@ -1178,9 +1143,6 @@ function otffeatures.normalize(features,wrap) -- wrap is for context
h.script = rawget(verbosescripts,v) or (scripts[v] and v) or "dflt" -- auto adds
elseif k == "axis" then
h[k] = normalizedaxis(value)
- if not callbacks.supported.glyph_stream_provider then
- h.variableshapes = true -- for the moment
- end
else
local uk = usedfeatures[key]
local uv = uk[value]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv
index 8e2e0a7a9f3..445dedd2543 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-pre.mkiv
@@ -174,9 +174,14 @@
[fin2=yes,fin3=yes,med2=yes]
\definefontfeature
+ [reordercombining]
+ [reordercombining=yes]
+
+\definefontfeature
[hebrew]
[semitic-complete]
- [script=hebr]
+ [script=hebr,
+ reordercombining=yes] % seems to work best with reasonable fonts
\definefontfeature
[simplearabic]
@@ -320,6 +325,17 @@
\definefontfeature [tamil-two] [tamil-one] [script=tml2]
\definefontfeature [telugu-two] [telugu-one] [script=tel2]
+% mongolian
+
+\definefontfeature
+ [mongolian]
+ [default]
+ [script=mong,
+ init=yes,medi=yes,fina=yes,isol=yes,
+ rlig=yes,rclt=yes,calt=yes,
+ %dlig=yes,cswh=yes, % optional
+ mset]
+
% tibetan
\definefontfeature
@@ -389,10 +405,17 @@
mathalternates=yes,
mathitalics=yes, % we pass them
mathdimensions=all,
+ % mathkerns=yes,
% mathgaps=yes,
language=dflt,
script=math]
+% Users can define this:
+%
+% \definefontfeature
+% [oldmath]
+% [oldmath=yes]
+
\ifdefined\mathnolimitsmode
\mathnolimitsmode\plusone % font driven (only opentype)
\fi
@@ -915,10 +938,14 @@
\unexpanded\def\normalss{\font_helpers_set_current_font_style{\s!ss}}
\unexpanded\def\normaltt{\font_helpers_set_current_font_style{\s!tt}}
+\pushoverloadmode
+
\let\rm\normalrm
\let\ss\normalss
\let\tt\normaltt
+\popoverloadmode
+
\protect \endinput
% LM math vs CM math (analysis by Taco):
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua b/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua
index c3323ca743e..15057e2554e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-prv.lua
@@ -80,3 +80,36 @@ end
function helpers.newprivateslot(name)
return sharedprivates[name]
end
+
+do
+
+ local context = context
+ local utfchar = utf.char
+
+ interfaces.implement {
+ name = "privatecharacter",
+ public = true,
+ -- protected = true,
+ arguments = "string",
+ actions = function(name)
+ local c = sharedprivates[name]
+ if c then
+ context(utfchar(c))
+ end
+ end
+ }
+
+ interfaces.implement {
+ name = "privatecharactercode",
+ public = true,
+ -- protected = true,
+ arguments = "string",
+ actions = function(name)
+ local c = sharedprivates[name]
+ if c then
+ context(c) -- serialized, not a number
+ end
+ end
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv
index 2f6cd32df9f..6bfa7ee7267 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-run.mkiv
@@ -350,7 +350,7 @@
\ifdefined\databox \else \newbox\databox \fi
-\unexpanded\gdef\testminimalbaseline#1% to be used in a 10 column tabulate
+\unexpanded\gdef\font_show_minimal_baseline#1% to be used in a 10 column tabulate
{\setbox\databox\ruledhbox{#1}%
\scratchdimen\htdp\databox
\normalexpanded {
@@ -374,18 +374,14 @@
\font_show_only_english\showminimalbaseline
\else
\starttabulate[|l|T|T|T|T|T|T|T|T|T|]
- \testminimalbaseline{\hbox to \emwidth{\hss\showstruts\strut\hss}}%
- \testminimalbaseline{(/)}%
- \testminimalbaseline{\normalstartimath\frac{1}{2}x\normalsuperscript2\normalsubscript3\normalstopimath}
+ \font_show_minimal_baseline{\hbox to \emwidth{\hss\showstruts\strut\hss}}%
+ \font_show_minimal_baseline{(/)}%
+ \font_show_minimal_baseline{\normalstartimath\frac{1}{2}x\normalsuperscript2\normalsubscript3\normalstopimath}
\stoptabulate
\fi}
-\unexpanded\gdef\showkerning#1%
- {\bgroup
- \let\MPfshowcommand\ruledhbox
- \setMPtext\s!dummy{#1}%
- \startMPcode draw textext(\MPstring\s!dummy);\stopMPcode
- \egroup}
+\unexpanded\gdef\showkerning
+ {\groupedcommandcs\showfontkerns\relax}
\unexpanded\gdef\showcharratio
{\dowithnextboxcontent
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua b/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua
index 15d3838f6d0..9a611f9faa3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sel.lua
@@ -96,7 +96,7 @@ extras["features"] = function(data,alternative,features)
local e = gsub(gsub(features,"*",d),"{(.*)}","%1")
local f = data.features
if trace_features then
- report_features("Alternative '%s': Saving features '%s'",alternative,e)
+ report_features("alternative '%s': saving features '%s'",alternative,e)
end
if not f then
f = { }
@@ -109,7 +109,7 @@ extras["goodies"] = function(data,alternative,goodies)
local e = gsub(goodies,"{(.*)}","%1")
local g = data.goodies
if trace_goodies then
- report_goodies("Alternative '%s': Saving goodies '%s'",alternative,e)
+ report_goodies("alternative '%s': saving goodies '%s'",alternative,e)
end
if not g then
g = { }
@@ -137,7 +137,7 @@ local function selectfont_savefile(data,alternative,bodyfontsize,size,file)
end
a[bodyfontsize] = { size, n }
if trace_files then
- report_files("Alternative '%s': Saving file '%s' for size '%s'",alternative,n,size)
+ report_files("alternative '%s': saving file '%s' for size '%s'",alternative,n,size)
end
end
@@ -145,7 +145,7 @@ methods["name"] = function(data,alternative,name)
local family = data.metadata.family
local filename = cleanname(gsub(name,"*",family))
if trace_alternatives then
- report_selectfont("Alternative '%s': Using method 'name' with argument '%s'",alternative,filename)
+ report_selectfont("alternative '%s': using method 'name' with argument '%s'",alternative,filename)
end
local fontname = getlookups{ fontname = filename }
local fullname = getlookups{ fullname = filename }
@@ -155,7 +155,7 @@ methods["name"] = function(data,alternative,name)
selectfont_savefile(data,alternative,0,"default",fullname[1])
else
if trace_alternatives then
- report_selectfont("Alternative '%s': No font was found for the requested name '%s'",alternative,filename)
+ report_selectfont("alternative '%s': no font was found for the requested name '%s'",alternative,filename)
end
end
end
@@ -164,14 +164,14 @@ methods["file"] = function(data,alternative,file)
local family = data.metadata.family
local filename = cleanname(gsub(removesuffix(file),"*",family))
if trace_alternatives then
- report_selectfont("Alternative '%s': Using method 'file' with argument '%s'",alternative,filename)
+ report_selectfont("alternative '%s': using method 'file' with argument '%s'",alternative,filename)
end
local filename = getlookups{ cleanfilename = cleanname(filename) }
if #filename > 0 then
selectfont_savefile(data,alternative,0,"default",filename[1])
else
if trace_alternatives then
- report_selectfont("Alternative '%s': No font was found for the requested file '%s'",alternative,cleanname(gsub(removesuffix(file),"*",family)))
+ report_selectfont("alternative '%s': no font was found for the requested file '%s'",alternative,cleanname(gsub(removesuffix(file),"*",family)))
end
end
end
@@ -243,7 +243,7 @@ local function m_style_family(family)
return family
elseif #fontname > 0 then
local fontfamily = fontname[1]["familyname"]
- report_selectfont("The name '%s' is not a proper family name, use '%s' instead.",askedname,fontfamily)
+ report_selectfont("the name '%s' is not a proper family name, use '%s' instead.",askedname,fontfamily)
return nil
else
return nil
@@ -353,7 +353,7 @@ local function m_style_size(data,alternative,entries)
end
else
if trace_alternatives then
- report_selectfont("Alternative '%s': Multiple files are available for the requested style '%s' from '%s'",alternative,style,family)
+ report_selectfont("alternative '%s': multiple files are available for the requested style '%s' from '%s'",alternative,style,family)
end
end
end
@@ -386,7 +386,7 @@ methods["style"] = function(data,alternative,style)
m_style_size(data,alternative,entries)
else
if trace_alternatives then
- report_selectfont("Alternative '%s': No font was found for the requested style '%s' from '%s'",alternative,style,family)
+ report_selectfont("alternative '%s': no font was found for the requested style '%s' from '%s'",alternative,style,family)
end
end
end
@@ -394,21 +394,21 @@ end
methods[v_default] = function(data,alternative)
local family = data.metadata.family
if trace_alternatives then
- report_selectfont("Alternative '%s': Using method 'default'",alternative)
+ report_selectfont("alternative '%s': using method 'default'",alternative)
end
local result = getlookups{ familyname = cleanname(family) }
if #result == 1 and alternative == "tf" then
if trace_alternatives then
- report_selectfont("Alternative '%s': The family '%s' contains only one font",alternative,family)
+ report_selectfont("alternative '%s': the family '%s' contains only one font",alternative,family)
end
selectfont_savefile(data,alternative,0,"default",result[1])
-- if trace_alternatives then
- -- report_selectfont("Alternative '%s': Changing method 'default' to method 'style'",alternative)
+ -- report_selectfont("alternative '%s': changing method 'default' to method 'style'",alternative)
-- end
-- methods["file"](data,alternative,result[1]["filename"])
else
if trace_alternatives then
- report_selectfont("Alternative '%s': Changing method 'default' to method 'style'",alternative)
+ report_selectfont("alternative '%s': changing method 'default' to method 'style'",alternative)
end
methods["style"](data,alternative,alternative)
end
@@ -478,7 +478,7 @@ function selectfont.registerfontalternative(alternative)
local a = alternatives[alternative]
if not a then
if trace_register then
- report_selectfont("Register alternative '%s'",alternative)
+ report_selectfont("register alternative '%s'",alternative)
end
a = true
alternatives[alternative] = a
@@ -598,23 +598,23 @@ function selectfont.fontsynonym(data,class,style,alternative,index)
local fontfallback = formatters["fallback-%s-%s-%s"](fontclass,style,alternative)
for _, fontsize in next, fontsizes do
-- if trace_typescript then
- -- report_typescript("Synonym: '%s', Size: '%s', File: '%s'",fontfile,fontfiles[fontsize][1],fontfiles[fontsize][2])
+ -- report_typescript("synonym: '%s', size: '%s', file: '%s'",fontfile,fontfiles[fontsize][1],fontfiles[fontsize][2])
-- end
registerdesignsizes(fontfile,fontfiles[fontsize][1],fontfiles[fontsize][2])
end
if fallback then
-- if trace_typescript then
- -- report_typescript("Synonym: '%s', File: '%s', Features: '%s'",fontsynonym,fontfile,fontfeature)
+ -- report_typescript("synonym: '%s', file: '%s', features: '%s'",fontsynonym,fontfile,fontfeature)
-- end
ctx_definefontsynonym( { fontsynonym }, { fontfile }, { features = fontfeature } )
else
-- if trace_typescript then
- -- report_typescript("Synonym: '%s', File: '%s', Features: '%s', Goodies: '%s', Fallbacks: '%s'",fontsynonym,fontfile,fontfeature,fontgoodie,fontfallback)
+ -- report_typescript("synonym: '%s', file: '%s', features: '%s', goodies: '%s', fallbacks: '%s'",fontsynonym,fontfile,fontfeature,fontgoodie,fontfallback)
-- end
ctx_definefontsynonym( { fontsynonym }, { fontfile }, { features = fontfeature, goodies = fontgoodie, fallbacks = fontfallback } )
if synonym then
-- if trace_typescript then
- -- report_typescript("Synonym: '%s', File: '%s'",synonym,fontsynonym)
+ -- report_typescript("synonym: '%s', file: '%s'",synonym,fontsynonym)
-- end
ctx_definefontsynonym( { synonym }, { fontsynonym } )
end
@@ -628,13 +628,13 @@ function selectfont.fontfallback(data,class,style,alternative,index)
local force = data.options.force ~= "" and data.options.force or ""
local fontfeature = data.features and data.features[alternative] or data.options.features
local fontclass = lower(class)
- local fontsynonym = formatters ["synonym-%s-%s-%s-%s"](fontclass,style,alternative,index)
- local fontfallback = formatters["fallback-%s-%s-%s"] (fontclass,style,alternative)
+ local fontsynonym = formatters["synonym-%s-%s-%s-%s"](fontclass,style,alternative,index)
+ local fontfallback = formatters["fallback-%s-%s-%s"] (fontclass,style,alternative)
if index == 1 then
ctx_resetfontfallback( { fontfallback } )
end
-- if trace_typescript then
- -- report_typescript("Fallback: '%s', Synonym: '%s', Range: '%s', Scale: '%s', Check: '%s', Force: '%s'",fontfallback,fontsynonym,range,scale,check,force)
+ -- report_typescript("fallback: '%s', synonym: '%s', range: '%s', scale: '%s', check: '%s', force: '%s'",fontfallback,fontsynonym,range,scale,check,force)
-- end
ctx_definefontfallback( { fontfallback }, { fontsynonym }, { range }, { rscale = scale, check = check, force = force } )
end
@@ -653,7 +653,7 @@ function selectfont.filefallback(data,class,style,alternative,index)
ctx_resetfontfallback( { fontfallback } )
end
-- if trace_typescript then
- -- report_typescript("Fallback: '%s', File: '%s', Features: '%s', Range: '%s', Scale: '%s', Check: '%s', Force: '%s', Offset: '%s'",fontfallback,fontfile[2],fontfeature,range,scale,check,force,offset)
+ -- report_typescript("fallback: '%s', file: '%s', features: '%s', range: '%s', scale: '%s', check: '%s', force: '%s', offset: '%s'",fontfallback,fontfile[2],fontfeature,range,scale,check,force,offset)
-- end
ctx_definefontfallback( { fontfallback }, { formatters["file:%s*%s"](fontfile[2],fontfeature) }, { range }, { rscale = scale, check = check, force = force, offset = offset } )
end
@@ -737,7 +737,7 @@ function selectfont.bodyfont(data)
fontsynonym = formatters["synonym-%s-%s-%s"](fontclass,fontstyle,alternative)
fontlist[#fontlist+1] = formatters["%s=%s sa 1"] (alternative,fontsynonym)
-- if trace_typescript then
- -- report_typescript("Alternative '%s': Synonym '%s'",alternative,fontsynonym)
+ -- report_typescript("alternative '%s': synonym '%s'",alternative,fontsynonym)
-- end
end
fontlist = concat(fontlist,",")
@@ -760,7 +760,7 @@ function selectfont.typeface(data)
local size = data.options.designsize ~= "" and data.options.designsize or "default"
local scale = data.options.rscale ~= "" and data.options.rscale or 1
-- if trace_typescript then
- -- report_typescript("Class: '%s', Style: '%s', Size: '%s', Scale: '%s'",fontclass,fontstyle,size,scale)
+ -- report_typescript("class: '%s', style: '%s', size: '%s', scale: '%s'",fontclass,fontstyle,size,scale)
-- end
ctx_definetypeface( { fontclass }, { fontstyle }, { style }, { "" }, { "default" }, { designsize = size, rscale = scale } )
end
@@ -770,7 +770,7 @@ function selectfont.default(data)
local fontclass = data.metadata.typeface
local fontstyle = data.metadata.style
local style = m_style[fontstyle]
- report_selectfont("The requested font '%s' has no files for the 'tf' alternative, Latin Modern is used instead.",family)
+ report_selectfont("the requested font '%s' has no files for the 'tf' alternative, Latin Modern is used instead.",family)
ctx_definetypeface( { fontclass }, { fontstyle }, { style }, { "modern" }, { "default" } )
end
@@ -799,7 +799,7 @@ function selectfont.definefallbackfamily(index)
if fontfiles then
selectfont.registerfallback(index)
else
- report_selectfont("The requested fallback font '%s' for typeface '%s' style '%s' was ignored because no files where found.",family,fontclass,fontstyle)
+ report_selectfont("the requested fallback font '%s' for typeface '%s' style '%s' was ignored because no files where found.",family,fontclass,fontstyle)
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua b/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua
index 3d2e5b7c902..78e8597b937 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-shp.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-shp'] = {
local tonumber, next = tonumber, next
local concat = table.concat
-local formatters = string.formatters
+local formatters, lower = string.formatters, string.lower
local otf = fonts.handlers.otf
local afm = fonts.handlers.afm
@@ -221,7 +221,7 @@ end
local function loadstreams(cache,filename,sub,instance)
local base = file.basename(filename)
local name = file.removesuffix(base)
- local kind = file.suffix(filename)
+ local kind = lower(file.suffix(filename))
local attr = lfs.attributes(filename)
local size = attr and attr.size or 0
local time = attr and attr.modification or 0
@@ -346,7 +346,7 @@ local function getstreamhash(fontid)
local fontdata = identifiers[fontid]
if fontdata then
local properties = fontdata.properties
- return makehash(properties.filename,fontdata.subindex,properties.instance)
+ return makehash(properties.filename,properties.subfont,properties.instance)
end
end
@@ -379,124 +379,17 @@ otf.loadstreamdata = loadstreamdata -- not public
otf.loadshapes = loadshapes
otf.getstreamhash = getstreamhash -- not public, might move to other namespace
-local f_c = formatters["%.6N %.6N %.6N %.6N %.6N %.6N c"]
-local f_l = formatters["%.6N %.6N l"]
-local f_m = formatters["%.6N %.6N m"]
-
-local function segmentstopdf(segments,factor,bt,et)
- local t = { }
- local m = 0
- local n = #segments
- local d = false
- for i=1,n do
- local s = segments[i]
- local w = s[#s]
- if w == "c" then
- m = m + 1
- t[m] = f_c(s[1]*factor,s[2]*factor,s[3]*factor,s[4]*factor,s[5]*factor,s[6]*factor)
- elseif w == "l" then
- m = m + 1
- t[m] = f_l(s[1]*factor,s[2]*factor)
- elseif w == "m" then
- m = m + 1
- t[m] = f_m(s[1]*factor,s[2]*factor)
- elseif w == "q" then
- local p = segments[i-1]
- local n = #p
- local l_x = factor*p[n-2]
- local l_y = factor*p[n-1]
- local m_x = factor*s[1]
- local m_y = factor*s[2]
- local r_x = factor*s[3]
- local r_y = factor*s[4]
- m = m + 1
- t[m] = f_c (
- l_x + 2/3 * (m_x-l_x), l_y + 2/3 * (m_y-l_y),
- r_x + 2/3 * (m_x-r_x), r_y + 2/3 * (m_y-r_y),
- r_x, r_y
- )
- end
- end
- m = m + 1
- t[m] = "h f" -- B*
- if bt and et then
- t[0] = bt
- t[m+1] = et
- return concat(t,"\n",0,m+1)
- else
- return concat(t,"\n")
- end
-end
-
-local function initialize(tfmdata,key,value)
- if value then
- local shapes = otf.loadoutlinedata(tfmdata)
- if not shapes then
- return
- end
- local glyphs = shapes.glyphs
- if not glyphs then
- return
- end
- local characters = tfmdata.characters
- local parameters = tfmdata.parameters
- local hfactor = parameters.hfactor * (7200/7227)
- local factor = hfactor / 65536
- local getactualtext = otf.getactualtext
- for unicode, char in next, characters do
- if char.commands then
- -- can't happen as we're doing this before other messing around
- else
- local shape = glyphs[char.index]
- if shape then
- local segments = shape.segments
- if segments then
- -- we need inline in order to support color
- local bt, et = getactualtext(char.tounicode or char.unicode or unicode)
- char.commands = {
- { "pdf", "origin", segmentstopdf(segments,factor,bt,et) }
- }
- end
- end
- end
- end
- end
-end
-
-otf.features.register {
- name = "variableshapes", -- enforced for now
- description = "variable shapes",
- manipulators = {
- base = initialize,
- node = initialize,
- }
-}
-
--- In the end it is easier to just provide the new charstring (cff) and points (ttf). First
--- of all we already have the right information so there is no need to patch the already complex
--- backend code (we only need to make sure the cff is valid). Also, I prototyped support for
--- these fonts using (converted to) normal postscript shapes, a functionality that was already
--- present for a while for metafun. This solution even permits us to come up with usage of such
--- fonts in unexpected ways. It also opens the road to shapes generated with metafun includes
--- as real cff (or ttf) shapes instead of virtual in-line shapes.
---
--- This is probably a prelude to writing a complete backend font inclusion plugin in lua. After
--- all I already have most info. For this we just need to pass a list of used glyphs (or analyze
--- them ourselves).
-
local streams = fonts.hashes.streams
-if callbacks.supported.glyph_stream_provider then
+-- we can now assume that luatex has this one
- callback.register("glyph_stream_provider",function(id,index,mode)
- if id > 0 then
- local streams = streams[id].streams
- -- print(id,index,streams[index])
- if streams then
- return streams[index] or ""
- end
+callback.register("glyph_stream_provider",function(id,index,mode)
+ if id > 0 then
+ local streams = streams[id].streams
+ -- print(id,index,streams[index])
+ if streams then
+ return streams[index] or ""
end
- return ""
- end)
-
-end
+ end
+ return ""
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua b/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua
index 2017afcb225..c618739959f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sol.lua
@@ -105,12 +105,14 @@ local disc_code = nodecodes.disc
local kern_code = nodecodes.kern
local hlist_code = nodecodes.hlist
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local whatsit_code = nodecodes.whatsit
local fontkern_code = kerncodes.fontkern
+local righttoleft_code = nodes.dirvalues.righttoleft
+
local userdefinedwhatsit_code = whatsitcodes.userdefined
local nodeproperties = nodes.properties.data
@@ -379,7 +381,7 @@ function splitters.split(head) -- best also pass the direction
end
end
if r2l then
- local dirnode = new_direction(righttoleft) -- brrr, we don't pop ... to be done (when used at all)
+ local dirnode = new_direction(righttoleft_code) -- brrr, we don't pop ... to be done (when used at all)
setlink(dirnode,list)
list = dirnode
end
@@ -434,13 +436,13 @@ function splitters.split(head) -- best also pass the direction
flush()
end
local direction, pop = getdirection(current)
- r2l = not pop and direction == righttoleft
- elseif id == localpar_code and start_of_par(current) then
+ r2l = not pop and direction == righttoleft_code
+ elseif id == par_code and start_of_par(current) then
if start then
flush() -- very unlikely as this starts a paragraph
end
local direction = getdirection(current)
- r2l = direction == righttoleft or direction == "TRT" -- for old times sake
+ r2l = direction == righttoleft_code
else
if start then
flush()
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi b/Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi
index a24194355e2..519381a2e1a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-sty.mkvi
@@ -181,6 +181,9 @@
\setfalse\fontattributeisset
+\let\currentstyleparameter \empty % these might become private
+\let\currentdetokenizedstyleparameter\empty % these might become private
+
\unexpanded\def\dousestyleparameter#value%
{\edef\currentstyleparameter{#value}%
\ifx\currentstyleparameter\empty\else
@@ -193,11 +196,11 @@
\fi}
\unexpanded\def\dousecurrentstyleparameter % empty check outside here
- {\edef\detokenizedstyleparameter{\detokenize\expandafter{\currentstyleparameter}}%
+ {\edef\currentdetokenizedstyleparameter{\detokenize\expandafter{\currentstyleparameter}}%
\settrue\fontattributeisset % reset is done elsewhere
- \ifcsname\??alternativestyle\detokenizedstyleparameter\endcsname
+ \ifcsname\??alternativestyle\currentdetokenizedstyleparameter\endcsname
\lastnamedcs
- \else\ifcsname\detokenizedstyleparameter\endcsname
+ \else\ifcsname\currentdetokenizedstyleparameter\endcsname
\lastnamedcs
\else
\currentstyleparameter
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua b/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua
index e2f0d22f2a8..945421a4219 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-tfm.lua
@@ -139,16 +139,17 @@ local function read_from_tfm(specification)
-- If reencode returns a new table, we assume that we're doing something
-- special. An 'auto' reencode picks up its vector from the pfb file.
- if lpdf and lpdf.getmapentry and not features.reencode then
+ local getmapentry = fonts.mappings.getentry
+
+ if getmapentry and not features.reencode then
-- This can happen multiple times but not that often so we don't
-- optimize this.
- local encoding, pfbfile, encfile = lpdf.getmapentry(filename)
+ local encoding, pfbfile, encfile = getmapentry(filename)
if encoding and pfbfile then
features.reencode = encfile
features.pfbfile = pfbfile
end
end
-
local newtfmdata = (depth[filename] == 1) and tfm.reencode(tfmdata,specification)
if newtfmdata then
tfmdata = newtfmdata
@@ -162,6 +163,7 @@ local function read_from_tfm(specification)
shared.features = features
shared.resources = resources
--
+ properties.id = specification.id
properties.name = tfmdata.name -- todo: fallback
properties.fontname = tfmdata.fontname -- todo: fallback
properties.psname = tfmdata.psname -- todo: fallback
@@ -170,9 +172,9 @@ local function read_from_tfm(specification)
properties.format = tfmdata.format or fonts.formats.tfm -- better than nothing
properties.usedbitmap = tfmdata.usedbitmap
--
-if lpdf and lpdf.getmapentry and newtfmdata then
- properties.filename = features.pfbfile
-end
+ if getmapentry and newtfmdata then
+ properties.filename = features.pfbfile
+ end
--
tfmdata.properties = properties
tfmdata.resources = resources
@@ -234,8 +236,10 @@ end
--
-- The tounicode data is passed to the backend that constructs the vectors for us.
--
- tfmdata.tounicode = 1
- local tounicode = fonts.mappings.tounicode
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
+ tfmdata.tounicode = 1
+end
+ local tounicode = fonts.mappings.tounicode
for unicode, v in next, tfmdata.characters do
local u = v.unicode
if u then
@@ -439,7 +443,7 @@ do
local characters = { }
local originals = tfmdata.characters
local indices = { }
- local parentfont = { "font", 1 }
+ local parentfont = { "font", 1 } -- can be zero (self referencing)
local private = tfmdata.privateoffset or constructors.privateoffset
local reported = encdone[tfmfile][encfile] -- bah, encdone for tfm or pfb ?
-- create characters table
@@ -447,6 +451,14 @@ do
-- vector : pfbindex -> name
-- encoding : tfmindex -> name
+ -- we store the order also because some tex encodings (see math-vfu) needs
+ -- that for remapping with non standard glyphs names cq. lack of unicode
+ -- slot information
+
+ for k, v in next, originals do
+ v.order = k
+ end
+
local backmap = vector and table.swapped(vector)
local done = { } -- prevent duplicate
for tfmindex, name in sortedhash(encoding) do -- predictable order
@@ -458,7 +470,7 @@ do
else
unicode = private
private = private + 1
- if not reported then
+ if trace_defining and not reported then
report_tfm("glyph %a in font %a with encoding %a gets unicode %U",name,tfmfile,encfile,unicode)
end
end
@@ -514,11 +526,13 @@ do
tfmdata.fullname = tfmdata.fullname or tfmdata.name
tfmdata.psname = file.nameonly(pfbfile or tfmdata.name)
tfmdata.filename = pfbfile
- tfmdata.encodingbytes = 2
-- tfmdata.format = bitmap and "type3" or "type1"
tfmdata.format = "type1"
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
+ tfmdata.encodingbytes = 2
tfmdata.tounicode = 1
tfmdata.embedding = "subset"
+end
tfmdata.usedbitmap = bitmap and virtualid
tfmdata.private = private
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-tpk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-tpk.lua
index 05ecdd45ce1..16b89c3932c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-tpk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-tpk.lua
@@ -1,5 +1,6 @@
- if not modules then modules = { } end modules ['font-tpk'] = {
+if not modules then modules = { } end modules ['font-tpk'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-lib.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -847,7 +848,6 @@ do
direction = direction,
-- checksum = checksum,
-- embedding = "unknown",
- -- encodingbytes = 0,
-- extend = 1000,
-- slant = 0,
-- squeeze = 0,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv
index 89a50c5aeb2..99c7ab3c822 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-tra.mkiv
@@ -20,8 +20,8 @@
%D \macros
%D {showbodyfont}
%D
-%D One can call for a rather simple overview of a bodyfont and the
-%D relations between its alternative fonts.
+%D One can call for a rather simple overview of a bodyfont and the relations between
+%D its alternative fonts.
%D
%D \showsetup{showbodyfont}
%D
@@ -37,9 +37,8 @@
%D \macros
%D {showfontstrip, testminimalbaseline, showminimalbaseline}
%D
-%D The next command can come in handy when combining
-%D different fonts into a collection (typeface) and
-%D determining optimal baseline distances.
+%D The next command can come in handy when combining different fonts into a
+%D collection (typeface) and determining optimal baseline distances.
%D
%D \showfontstrip \blank \showminimalbaseline
@@ -109,10 +108,8 @@
\unexpanded\def\stopotfcollecting {\ctxlua{nodes.tracers.steppers.stop()}}
\unexpanded\def\resetotfcollecting{\ctxlua{nodes.tracers.steppers.reset()}}
-% Rather experimental:
-%
% \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{الضَّرَّ} \page
-% \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{Ù„ÙلّٰهÙ} \page
+% \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{Ù„ÙلّٰهÙ} \page
\unexpanded\def\showotfstepglyphs#1%
{\ctxlua{nodes.tracers.steppers.glyphs(\number\otfcollector,#1)}%
@@ -360,7 +357,7 @@
% new
-\unexpanded\def\savefont[#1]% not yet in i-*.xml
+\unexpanded\def\savefontdata[#1]% not yet in i-*.xml
{\begingroup
\getdummyparameters[#1]%
\clf_savefont {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua b/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua
index 651ede17e21..a2732aa5f2e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['font-ttf'] = {
version = 1.001,
+ optimize = true,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -162,8 +163,7 @@ local function mergecomposites(glyphs,shapes)
return contours, points
end
--- for index=1,#glyphs do
- for index=0,#glyphs-1 do
+ for index=0,#glyphs do
local shape = shapes[index]
if shape then
local components = shape.components
@@ -658,7 +658,7 @@ local function repackpoints(glyphs,shapes)
local result = { } -- reused
local xpoints = { } -- reused
local ypoints = { } -- reused
- for index=0,#glyphs-1 do
+ for index=0,#glyphs do
local shape = shapes[index]
if shape then
local r = 0
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-vfc.lua b/Master/texmf-dist/tex/context/base/mkiv/font-vfc.lua
index dfe6b3afc46..eff0aa6c636 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-vfc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-vfc.lua
@@ -13,7 +13,7 @@ local fonts = fonts
local helpers = fonts.helpers
local setmetatableindex = table.setmetatableindex
-local makeweak = table.makeweak
+----- makeweak = table.makeweak
-- Helpers dealing with virtual fonts: beware, these are final values so
-- don't change the content of tables gotten this way!
diff --git a/Master/texmf-dist/tex/context/base/mkiv/good-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/good-ctx.lua
index 82ef25e29de..80672676c7b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/good-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/good-ctx.lua
@@ -32,6 +32,7 @@ local fontgoodies = fonts.goodies or { }
local nuts = nodes.nuts
local tonut = nuts.tonut
local getattr = nuts.getattr
+local getprop = nuts.getprop
local nextglyph = nuts.traversers.glyph
-- colorschemes
@@ -61,8 +62,10 @@ local function setcolorscheme(tfmdata,scheme)
local characters = tfmdata.characters
for i=1,#what do
local w = what[i]
- for j=1,#w do
- local name = w[j]
+ local force = w.force
+ local list = w.list or w
+ for j=1,#list do
+ local name = list[j]
local kind = type(name)
if name == "*" then
-- inefficient but only used for tracing anyway
@@ -81,10 +84,16 @@ local function setcolorscheme(tfmdata,scheme)
-- limited usage: we only deal with non reassigned
-- maybe some day I'll also support the ones with a
-- tounicode in this range
- for unicode=start,stop do
- if characters[unicode] then
+ if force then
+ for unicode=start,stop do
reverse[unicode] = i
end
+ else
+ for unicode=start,stop do
+ if characters[unicode] then
+ reverse[unicode] = i
+ end
+ end
end
end
else
@@ -150,6 +159,13 @@ function colorschemes.coloring(head)
if f ~= lastfont then
lastfont = f
lastscheme = fontproperties[f].colorscheme
+ if not lastscheme then
+ local p = getprop(n, "original")
+ if p then
+ lastfont = p.font
+ lastscheme = fontproperties[lastfont].colorscheme
+ end
+ end
end
if a ~= lastattr then
lastattr = a
@@ -158,6 +174,7 @@ function colorschemes.coloring(head)
if lastscheme then
local sc = lastscheme[char]
if sc then
+ -- todo: use new lmtx mechanism instead
setnodecolor(n,lastcache[sc]) -- we could inline this one
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua b/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua
index 18a97976fd3..3473cc205c4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/good-mth.lua
@@ -6,8 +6,9 @@ if not modules then modules = { } end modules ['good-mth'] = {
license = "see context related readme files"
}
-local type, next = type, next
+local type, next, tonumber, unpack = type, next, tonumber, unpack
local ceil = math.ceil
+local match = string.match
local fonts = fonts
@@ -20,6 +21,10 @@ local fontgoodies = fonts.goodies or { }
local fontcharacters = fonts.hashes.characters
+local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end)
+
+local report_math = logs.reporter("mathematics","initializing")
+
local nuts = nodes.nuts
local setlink = nuts.setlink
@@ -33,11 +38,149 @@ local new_vlist = nodepool.vlist
local insert_node_after = nuts.insert_after
+local helpers = fonts.helpers
+local upcommand = helpers.commands.up
+local rightcommand = helpers.commands.right
+local charcommand = helpers.commands.char
+local prependcommands = helpers.prependcommands
+
-- experiment, we have to load the definitions immediately as they precede
-- the definition so they need to be initialized in the typescript
+local function withscriptcode(tfmdata,unicode,data,action)
+ if type(unicode) == "string" then
+ local p, u = match(unicode,"^(.-):(.-)$")
+ if u then
+ u = tonumber(u)
+ if u then
+ local slots = fonts.helpers.mathscriptslots(tfmdata,u)
+ if slots then
+ if p == "*" then
+ action(u,data)
+ for i=1,#slots do
+ action(slots[i],data)
+ end
+ else
+ p = tonumber(p)
+ if p then
+ action(slots[p],data)
+ end
+ end
+ end
+ end
+ end
+ else
+ action(unicode,data)
+ end
+end
+
local function finalize(tfmdata,feature,value)
- mathematics.overloaddimensions(tfmdata,tfmdata,value)
+-- if tfmdata.mathparameters then -- funny, cambria text has this
+ local goodies = tfmdata.goodies
+ if goodies then
+ local virtualized = mathematics.virtualized
+ for i=1,#goodies do
+ local goodie = goodies[i]
+ local mathematics = goodie.mathematics
+ local dimensions = mathematics and mathematics.dimensions
+ if dimensions then
+ if trace_defining then
+ report_math("overloading dimensions in %a @ %p",tfmdata.properties.fullname,tfmdata.parameters.size)
+ end
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local parameters = tfmdata.parameters
+ local factor = parameters.factor
+ local hfactor = parameters.hfactor
+ local vfactor = parameters.vfactor
+ local function overloadone(unicode,data)
+ local character = characters[unicode]
+ if not character then
+ local c = virtualized[unicode]
+ if c then
+ character = characters[c]
+ end
+ end
+ if character then
+ local width = data.width
+ local height = data.height
+ local depth = data.depth
+ if trace_defining and (width or height or depth) then
+ report_math("overloading dimensions of %C, width %p, height %p, depth %p",
+ unicode,width or 0,height or 0,depth or 0)
+ end
+ if width then character.width = width * hfactor end
+ if height then character.height = height * vfactor end
+ if depth then character.depth = depth * vfactor end
+ --
+ local xoffset = data.xoffset
+ local yoffset = data.yoffset
+ if xoffset == "llx" then
+ local d = descriptions[unicode]
+ if d then
+ xoffset = - d.boundingbox[1] * hfactor
+ character.width = character.width + xoffset
+ xoffset = rightcommand[xoffset]
+ else
+ xoffset = nil
+ end
+ elseif xoffset and xoffset ~= 0 then
+ xoffset = rightcommand[xoffset * hfactor]
+ else
+ xoffset = nil
+ end
+ if yoffset and yoffset ~= 0 then
+ yoffset = upcommand[yoffset * vfactor]
+ else
+ yoffset = nil
+ end
+ if xoffset or yoffset then
+ local commands = characters.commands
+ if commands then
+ prependcommands(commands,yoffset,xoffset)
+ else
+ local slot = charcommand[unicode]
+ if xoffset and yoffset then
+ character.commands = { xoffset, yoffset, slot }
+ elseif xoffset then
+ character.commands = { xoffset, slot }
+ else
+ character.commands = { yoffset, slot }
+ end
+ end
+ end
+ elseif trace_defining then
+ report_math("no overloading dimensions of %C, not in font",unicode)
+ end
+ end
+ local function overload(dimensions)
+ for unicode, data in next, dimensions do
+ withscriptcode(tfmdata,unicode,data,overloadone)
+ end
+ end
+ if value == nil then
+ value = { "default" }
+ end
+ if value == "all" or value == true then
+ for name, value in next, dimensions do
+ overload(value)
+ end
+ else
+ if type(value) == "string" then
+ value = utilities.parsers.settings_to_array(value)
+ end
+ if type(value) == "table" then
+ for i=1,#value do
+ local d = dimensions[value[i]]
+ if d then
+ overload(d)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
end
registerotffeature {
@@ -58,7 +201,7 @@ local function initialize(goodies)
local maplines = mathgoodies.maplines
if virtuals then
for name, specification in next, virtuals do
- -- beware, they are all constructed
+ -- beware, they are all constructed ... we should be more selective
mathematics.makefont(name,specification,goodies)
end
end
@@ -77,10 +220,11 @@ end
fontgoodies.register("mathematics", initialize)
-local enabled = false directives.register("fontgoodies.mathkerning",function(v) enabled = v end)
+-- local enabled = false directives.register("fontgoodies.mathkerning",function(v) enabled = v end)
local function initialize(tfmdata)
- if enabled and tfmdata.mathparameters then -- funny, cambria text has this
+-- if enabled and tfmdata.mathparameters then -- funny, cambria text has this
+ if tfmdata.mathparameters then -- funny, cambria text has this
local goodies = tfmdata.goodies
if goodies then
local characters = tfmdata.characters
@@ -91,12 +235,15 @@ local function initialize(tfmdata)
if mathgoodies then
local kerns = mathgoodies.kerns
if kerns then
- for unicode, specification in next, kerns do
+ local function kernone(unicode,data)
local chardata = characters[unicode]
- if chardata and (not chardata.mathkerns or specification.force) then
- chardata.mathkerns = specification
+ if chardata and (not chardata.mathkerns or data.force) then
+ chardata.mathkerns = data
end
end
+ for unicode, data in next, kerns do
+ withscriptcode(tfmdata,unicode,data,kernone)
+ end
return
end
end
@@ -109,9 +256,9 @@ local function initialize(tfmdata)
end
registerotffeature {
- name = "mathkerns",
- description = "math kerns",
- default = true,
+ name = "mathkerns",
+ description = "math kerns",
+ -- default = true,
initializers = {
base = initialize,
node = initialize,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-bmp.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-bmp.lua
index e10b01aa4b6..6669b5db1d4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-bmp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-bmp.lua
@@ -39,10 +39,6 @@ function bitmaps.new(xsize,ysize,colorspace,colordepth,mask,index)
}
end
--- function backends.codeinjections.bitmap(bitmap)
--- return lpdf.injectors.bitmap(bitmap)
--- end
-
local function flush(bitmap)
local specification = backends.codeinjections.bitmap(bitmap)
if specification then
@@ -89,7 +85,7 @@ local function placeholder(nx,ny)
end
end
- return lpdf.injectors.bitmap(bitmap)
+ return backends.codeinjections.bitmap(bitmap)
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-chk.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-chk.lua
index ed78b856c60..0cfc9ba085b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-chk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-chk.lua
@@ -35,7 +35,7 @@ function checkers.pdf(data)
local request = data.request
local used = data.used
if request and used and not request.scanimage then
- local image = lpdf.epdf.image
+ local image = lpdf.epdf.image -- ok, this is a pdf specific main function
local openpdf = image.open
local closepdf = image.close
local querypdf = image.query
@@ -127,9 +127,9 @@ function checkers.pdf(data)
return genericchecker(data)
end
-local function wrappedidentify(identify,filename)
+local function wrappedidentify(identify,filename,filetype)
local wrapup = function() report_inclusion("fatal error reading %a",filename) end
- local _, result = xpcall(identify,wrapup,filename)
+ local _, result = xpcall(identify,wrapup,filename,filetype)
if result then
local xsize = result.xsize or 0
local ysize = result.ysize or 0
@@ -163,10 +163,9 @@ function checkers.jpg(data)
local used = data.used
if request and used and not request.scanimage then
local identify = graphics.identify
- local inject = lpdf.injectors.jpg
local found = false
request.scanimage = function(t)
- local result = wrappedidentify(identify,t.filename)
+ local result = wrappedidentify(identify,t.filename,"jpg")
found = not result.error
return {
filename = result.filename,
@@ -187,7 +186,7 @@ function checkers.jpg(data)
request.copyimage = function(t)
if found then
found = false
- return inject(t)
+ return backends.codeinjections.jpg(t)
end
end
end
@@ -199,10 +198,9 @@ function checkers.jp2(data) -- idem as jpg
local used = data.used
if request and used and not request.scanimage then
local identify = graphics.identify
- local inject = lpdf.injectors.jp2
local found = false
request.scanimage = function(t)
- local result = wrappedidentify(identify,t.filename)
+ local result = wrappedidentify(identify,t.filename,"jp2")
found = not result.error
return {
filename = result.filename,
@@ -223,7 +221,7 @@ function checkers.jp2(data) -- idem as jpg
request.copyimage = function(t)
if found then
found = false
- return inject(t)
+ return backends.codeinjections.jp2(t)
end
end
end
@@ -235,10 +233,9 @@ function checkers.png(data) -- same as jpg (for now)
local used = data.used
if request and used and not request.scanimage then
local identify = graphics.identify
- local inject = lpdf.injectors.png -- currently pdf specific
local found = false
request.scanimage = function(t)
- local result = wrappedidentify(identify,t.filename)
+ local result = wrappedidentify(identify,t.filename,"png")
found = not result.error
return {
filename = result.filename,
@@ -263,7 +260,7 @@ function checkers.png(data) -- same as jpg (for now)
t.colorref = used.colorref -- this is a bit of a hack
if found then
found = false
- local ok, result = pcall(inject,t)
+ local ok, result = pcall(backends.codeinjections.png,t)
if ok then
return result
else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua
index c3c711b0c72..b3d39f0bd93 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-con.lua
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['grph-con'] = {
local P, R, S, Cc, C, Cs, Ct, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.Cc, lpeg.C, lpeg.Cs, lpeg.Ct, lpeg.match
local tonumber = tonumber
+local find = string.find
local longtostring = string.longtostring
local formatters = string.formatters
local expandfilename = dir.expandname
@@ -194,6 +195,22 @@ do -- svg
-- arguments change again? Ok, it's weirder, with -A then it's a name only when
-- not . (current)
+ -- Beware: the order of printed output lines is a bit random depending on the
+ -- method of calling (bin or pipe) because part of the message prints to stdout
+ -- and part to stderr. Also, on Windows, a second call to the old binaries
+ -- doesn't return anything at all, so that is also a signal of it being old.
+ -- This test will be dropped in 2021 anyway.
+
+ local new = nil
+
+ local function inkscapeformat(suffix)
+ if new == nil then
+ new = os.resultof("inkscape --version") or ""
+ new = new == "" or not find(new,"Inkscape%s*0")
+ end
+ return new and "filename" or suffix
+ end
+
local runner = sandbox.registerrunner {
name = "svg to something",
program = "inkscape",
@@ -209,7 +226,7 @@ do -- svg
resolution = "string",
},
defaults = {
- format = "pdf",
+ format = format,
resolution = "600",
}
}
@@ -220,7 +237,7 @@ do -- svg
function svgconverter.pdf(oldname,newname)
runner {
- format = "pdf",
+ format = inkscapeformat("pdf"),
resolution = "600",
newname = expandfilename(newname),
oldname = expandfilename(oldname),
@@ -229,7 +246,7 @@ do -- svg
function svgconverter.png(oldname,newname)
runner {
- format = "png",
+ format = inkscapeformat("png"),
resolution = "600",
newname = expandfilename(newname),
oldname = expandfilename(oldname),
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua
index f8fa62953dc..0993270f14a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-epd.lua
@@ -40,7 +40,7 @@ local function mergegoodies(optionlist)
end
function figures.mergegoodies(optionlist)
- -- todo: we can use runtoks instead
+ -- todo: we can use runlocal instead
context.stepwise(function()
-- we use stepwise because we might need to define symbols
-- for stamps that have no default appearance
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv
index 3bf3248a6b4..9d34a841794 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-fig.mkiv
@@ -256,6 +256,9 @@
\tpack{\vskip12\points\box2\vskip6\points}}%
\endgroup}
+\definesystemconstant {vwa}
+\definesystemconstant {vwb}
+
\unexpanded\def\grph_steps_three_referring(#1,#2)#3(#4,#5)#6[#7]%
{\advance\c_grph_steps_reference\plusone
\position(#1,#2)
@@ -324,7 +327,7 @@
\thisissomeinternal\s!vwb
{#8}%
\gotosomeinternal\s!vwa{#8}\realfolio
- {\hbox to 1.5em{\the\c_grph_steps_reference\presetgoto\hfill}}%
+ {\hbox to 1.5em{\the\c_grph_steps_reference\hfill}}%
\quad#1 (#2,#3) (#5,#6) [#8]\hfill}%
\endgraf}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua
index 4b4bee1fc08..0dc5efa7038 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-img.lua
@@ -97,6 +97,13 @@ do
[0x01] = { name = "TEM", zerolength = true }, -- temporary use
}
+ setmetatableindex(tags, function(t,k)
+ -- we can add some tracing if needed (global) to get an idea
+ local v = "tag " .. k
+ t[k] = v
+ return v
+ end)
+
-- More can be found in http://www.exif.org/Exif2-2.PDF but basically we have
-- good old tiff tags here.
@@ -254,7 +261,7 @@ do
local length = 0
local tagdata = tags[category]
if not tagdata then
- specification.error = "invalid tag"
+ specification.error = "invalid tag " .. (category or "?")
break
elseif tagdata.supported == false then
specification.error = "unsupported " .. tagdata.comment
@@ -602,8 +609,11 @@ do
local y = f:readcardinal4()
local u = f:readcardinal()
if u == 1 then -- meters
- -- x = round(0.0254 * x)
- -- y = round(0.0254 * y)
+ -- there was a reason why this was commented
+ x = round(0.0254 * x)
+ y = round(0.0254 * y)
+ if x == 0 then x = 1 end
+ if y == 0 then y = 1 end
end
specification.xres = x
specification.yres = y
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua
index 8032f3c240f..6fdf74c08da 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.lua
@@ -703,11 +703,11 @@ implement { name = "figurestatus", actions = { get, context }, arguments = { "
implement { name = "figurerequest", actions = { get, context }, arguments = { "'request'", "string", "string" } }
implement { name = "figureused", actions = { get, context }, arguments = { "'used'", "string", "string" } }
-implement { name = "figurefilepath", actions = { get, file.dirname, context }, arguments = { "'used'", "'fullname'" } }
-implement { name = "figurefilename", actions = { get, file.nameonly, context }, arguments = { "'used'", "'fullname'" } }
-implement { name = "figurefiletype", actions = { get, file.extname, context }, arguments = { "'used'", "'fullname'" } }
+implement { name = "figurefilepath", public = true, actions = { get, file.dirname, context }, arguments = { "'used'", "'fullname'" } }
+implement { name = "figurefilename", public = true, actions = { get, file.nameonly, context }, arguments = { "'used'", "'fullname'" } }
+implement { name = "figurefiletype", public = true, actions = { get, file.extname, context }, arguments = { "'used'", "'fullname'" } }
-implement { name = "figuresetdimensions", actions = setdimensions, arguments = { "integer" } }
+implement { name = "figuresetdimensions", actions = setdimensions, arguments = "integer" }
-- todo: local path or cache path
@@ -1377,7 +1377,6 @@ function figures.dummy(data)
du.width = du.width or figures.defaultwidth
du.height = du.height or figures.defaultheight
du.depth = du.depth or figures.defaultdepth
- -- box.dir = "TLT"
box.width = du.width
box.height = du.height
box.depth = du.depth
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv
index 578bad1d067..0b8065989fc 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-inc.mkiv
@@ -23,11 +23,6 @@
\registerctxluafile{grph-img}{}
\registerctxluafile{grph-inc}{}
-\ifcase\contextlmtxmode \else
- \registerctxluafile{grph-bmp}{}
- \registerctxluafile{grph-chk}{}
-\fi
-
\registerctxluafile{grph-con}{}
\registerctxluafile{grph-fil}{}
\registerctxluafile{grph-mem}{}
@@ -416,7 +411,7 @@
\else\ifx\p_crossreference\v!no
% nothing
\else\ifx\p_crossreference\v!yes
- \ifassignment
+ \ifcondition\validassignment{#2}%
\scratchcounter\clf_figure_register_page{#1}{}{#2}\relax
\else
\scratchcounter\clf_figure_register_page{#1}{#2}{#3}\relax
@@ -568,9 +563,9 @@
\def\figurefullname {\clf_figureused{fullname}{}}
\def\noffigurepages {\clf_figureused{pages}{0}}
-\def\figurefilepath {\clf_figurefilepath}
-\def\figurefilename {\clf_figurefilename}
-\def\figurefiletype {\clf_figurefiletype}
+% \def\figurefilepath {\clf_figurefilepath} % public in lua
+% \def\figurefilename {\clf_figurefilename} % public in lua
+% \def\figurefiletype {\clf_figurefiletype} % public in lua
\let\naturalfigurewidth \figurenaturalwidth
\let\naturalfigureheight \figurenaturalheight
@@ -687,7 +682,6 @@
% \vss
\vkern\ht\foundexternalfigure
%
- % \parfillskip\zeropoint
\ht\foundexternalfigure\zeropoint
\dp\foundexternalfigure\zeropoint
\hpack to \wd\foundexternalfigure\bgroup
@@ -904,25 +898,6 @@
\unexpanded\def\overlayfigure#1%
{\externalfigure[#1][\c!width=\d_overlay_width,\c!height=\d_overlay_height]}
-% Experimental (will become cleaner):
-
-\ifcase\contextlmtxmode \else
-
- \unexpanded\def\includesvgfile {\dontleavehmode\begingroup\dodoubleempty\grph_include_svg_file}
- \unexpanded\def\includesvgbuffer{\dontleavehmode\begingroup\dodoubleempty\grph_include_svg_buffer}
-
- \def\grph_include_svg_file[#1][#2]%
- {\getdummyparameters[\c!offset=\zeropoint,#2]%
- \clf_includesvgfile{#1}\dimexpr\dummyparameter\c!offset\relax
- \endgroup}
-
- \def\grph_include_svg_buffer[#1][#2]%
- {\getdummyparameters[\c!offset=\zeropoint,#2]%
- \clf_includesvgbuffer{#1}\dimexpr\dummyparameter\c!offset\relax
- \endgroup}
-
-\fi
-
% Bonus:
\useexternalfigure
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua
index e38a9a674d6..4310af672b7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-pat.lua
@@ -38,7 +38,7 @@ interfaces.implement {
return
end
nodes.handlers.finalizebox(number)
- names[name] = lpdf.registerpattern {
+ names[name] = backends.codeinjections.registerpattern {
number = number,
width = specification.width or box.width,
height = specification.height or (box.height + box.depth) ,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua
index 5067b0165ee..0582a0ad0c8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-rul.lua
@@ -87,6 +87,8 @@ do
local replacer = utilities.templates.replacer
+ -- todo: RuleColor -> just string ?
+
local predefined = {
["fake:word"] = replacer [[
FakeWord(%width%,%height%,%depth%,%line%,%color%);
@@ -133,7 +135,9 @@ def RuleColor = %color% enddef ;
initialized = true
simplemetapost("rulefun",formatters["randomseed := %s;"](getrandom("rulefun",0,4095)))
end
- local pdf = caching and cache[code] or simplemetapost("rulefun",code) -- w, h, d
+ -- we enable extensions but we could also consider to delegate colors
+ -- to the node finalizer
+ local pdf = caching and cache[code] or simplemetapost("rulefun",code,true)
if trace_mp then
report_mp("code: %s",code)
report_mp("pdf : %s",pdf)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-trf.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-trf.lua
new file mode 100644
index 00000000000..b152a54dba0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-trf.lua
@@ -0,0 +1,126 @@
+if not modules then modules = { } end modules ['grph-trf'] = {
+ version = 1.001,
+ comment = "companion to grph-trf.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- see grph-trf-todo.lua for older preliminary code for the rest
+
+local sind, cosd, tand, abs = math.sind, math.cosd, math.tand, math.abs
+
+local texsetdimen = tex.setdimen
+
+local function analyzerotate(rotation,width,height,depth,total,notfit,obeydepth)
+ --
+ -- print(rotation,width,height,depth,notfit,obeydepth)
+ --
+ local sin = sind(rotation)
+ local cos = cosd(rotation)
+ local abssin = abs(sin)
+ local abscos = abs(cos)
+ local xsize = 0
+ local ysize = 0
+ local xposition = 0
+ local yposition = 0
+ local xoffset = 0
+ local yoffset = 0
+ local newwidth = width
+ local newheight = height
+ local newdepth = depth
+ -- print(sin,cos)
+ if sin > 0 then
+ if cos > 0 then
+ xsize = cos * width + sin * total
+ ysize = sin * width + cos * total
+ yposition = cos * total
+ if notfit then
+ xoffset = - sin * height
+ newwidth = sin * depth + cos * width
+ else
+ newwidth = xsize + xposition - xoffset
+ end
+ if obeydepth then
+ yoffset = cos * depth
+ end
+ newheight = ysize - yoffset
+ newdepth = yoffset
+ -- print("case 1, done")
+ else
+ xsize = abscos * width + sin * total
+ ysize = sin * width + abscos * total
+ xposition = abscos * width
+ if notfit then
+ xoffset = - xsize + sin * depth
+ end
+ if obeydepth then
+ yoffset = abscos * height
+ newwidth = abssin * total + abscos * width + xoffset
+ else
+ newwidth = xsize
+ end
+ newheight = ysize - yoffset
+ newdepth = yoffset
+ -- print("case 2, done")
+ end
+ else
+ if cos < 0 then
+ xsize = abscos * width + abssin * total
+ ysize = abssin * width + abscos * total
+ xposition = xsize
+ yposition = abssin * width
+ if notfit then
+ xoffset = - xsize + abssin * height
+ end
+ if obeydepth then
+ yoffset = ysize + cos * depth
+ end
+ newwidth = notfit and (abssin * height) or xsize
+ newheight = ysize - yoffset
+ newdepth = yoffset
+ -- print("case 3, done")
+ else
+ xsize = cos * width + abssin * total
+ ysize = abssin * width + cos * total
+ xposition = abssin * total
+ yposition = cos * total
+ if notfit then
+ xoffset = - abssin * depth
+ newwidth = xsize + xoffset
+ else
+ newwidth = xsize
+ end
+ if obeydepth then
+ yoffset = cos * depth
+ end
+ newheight = ysize - yoffset + sin * width
+ newdepth = yoffset - sin * width
+ -- print("case 4, done")
+ end
+ end
+ texsetdimen("d_grph_rotate_x_size", xsize)
+ texsetdimen("d_grph_rotate_y_size", ysize)
+ texsetdimen("d_grph_rotate_x_position", xposition)
+ texsetdimen("d_grph_rotate_y_position", yposition)
+ texsetdimen("d_grph_rotate_x_offset", xoffset)
+ texsetdimen("d_grph_rotate_y_offset", yoffset)
+ texsetdimen("d_grph_rotate_new_width", newwidth)
+ texsetdimen("d_grph_rotate_new_height", newheight)
+ texsetdimen("d_grph_rotate_new_depth", newdepth)
+end
+
+interfaces.implement {
+ name = "analyzerotate",
+ actions = analyzerotate,
+ arguments = {
+-- "integer",
+ "number",
+ "dimension",
+ "dimension",
+ "dimension",
+ "dimension",
+ "conditional",
+ "conditional",
+ },
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv
index f9218036c33..d6a6acd78ca 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/grph-trf.mkiv
@@ -24,6 +24,8 @@
%D We could move the calculations to \LUA\ and clean up this lot anyway. On the
%D other hand, there is some danger of messing up so it has a real low priority.
+\registerctxluafile{grph-trf}{}
+
% local:
\newdimen\d_grph_scale_x_size
@@ -794,6 +796,8 @@
\installcorenamespace {rotatelocation}
\installcorenamespace {rotatepreset}
+% todo: scratchcounters
+
\newdimen\d_grph_rotate_x_size
\newdimen\d_grph_rotate_y_size
\newdimen\d_grph_rotate_x_offset
@@ -811,6 +815,10 @@
\let\d_grph_rotate_saved_height\!!heightb
\let\d_grph_rotate_saved_depth \!!depthb
+\let\d_grph_rotate_new_width \!!widthc
+\let\d_grph_rotate_new_height\!!heightc
+\let\d_grph_rotate_new_depth \!!depthc
+
\newconditional\c_grph_rotate_obey_depth
\newconditional\c_grph_rotate_not_fit
\newconditional\c_grph_rotate_center
@@ -948,111 +956,30 @@
\d_grph_rotate_saved_width \wd\nextbox
\d_grph_rotate_saved_height\ht\nextbox
\d_grph_rotate_saved_depth \dp\nextbox
- \setbox\nextbox\naturalvpack{\vskip.5\ht\nextbox\hskip-.5\wd\nextbox\box\nextbox}%
+ \setbox\nextbox\naturalhpack{\hskip-.5\wd\nextbox\lower.5\ht\nextbox\box\nextbox}%
\smashbox\nextbox
\fi
+ %
\d_grph_rotate_width \wd\nextbox
\d_grph_rotate_height\ht\nextbox
\d_grph_rotate_depth \dp\nextbox
- \setbox\nextbox\naturalvpack{\naturalhpack{\raise\dp\nextbox\box\nextbox}}%
- \d_grph_rotate_used_height \ht\nextbox
- % much of the next happens in lua (all the sin and cos) so we can do that in
- % one go if needed
- \setcalculatedcos\cos\p_rotation_rotation
- \setcalculatedsin\sin\p_rotation_rotation
- \ifdim\sin\points>\zeropoint
- \ifdim\cos\points>\zeropoint
- \grph_rotate_calculate_a
- \grph_rotate_apply
- \else
- \grph_rotate_calculate_b
- \grph_rotate_apply
- \wd\nextbox\ifconditional\c_grph_rotate_not_fit\sin\d_grph_rotate_depth\else\d_grph_rotate_x_size\fi
- \fi
- \else
- \ifdim\cos\points<\zeropoint
- \grph_rotate_calculate_c
- \grph_rotate_apply
- \wd\nextbox\ifconditional\c_grph_rotate_not_fit\negated\sin\d_grph_rotate_height\else\d_grph_rotate_x_size\fi
- \else\ifdim\sin\points=\zeropoint
- \grph_rotate_calculate_d
- \grph_rotate_apply
- % no wd ?
- \else
- \grph_rotate_calculate_e
- \grph_rotate_apply
- \wd\nextbox\ifconditional\c_grph_rotate_not_fit\negated\sin\d_grph_rotate_height\else\d_grph_rotate_x_size\fi
- \fi\fi
- \fi
- \ifconditional\c_grph_rotate_center
- \setbox\nextbox\naturalvpack{\vskip-.5\d_grph_rotate_saved_height\hskip.5\d_grph_rotate_saved_height\box\nextbox}%
- \wd\nextbox\d_grph_rotate_saved_width
- \ht\nextbox\d_grph_rotate_saved_height
- \dp\nextbox\d_grph_rotate_saved_depth
- \fi
- \boxcursor\box\nextbox}
-
-\def\grph_rotate_calculate_a
- {\d_grph_rotate_x_size\dimexpr\cos\d_grph_rotate_width+\sin\d_grph_rotate_used_height\relax
- \d_grph_rotate_y_size\dimexpr\sin\d_grph_rotate_width+\cos\d_grph_rotate_used_height\relax
- \d_grph_rotate_x_position\zeropoint
- \d_grph_rotate_y_position\cos\d_grph_rotate_used_height
- \ifconditional\c_grph_rotate_not_fit
- \d_grph_rotate_x_offset\dimexpr\negated\sin\d_grph_rotate_used_height+\sin\d_grph_rotate_depth\relax
- \fi
- \ifconditional\c_grph_rotate_obey_depth
- \d_grph_rotate_y_offset\cos\d_grph_rotate_depth
- \fi}
-
-\def\grph_rotate_calculate_b
- {\d_grph_rotate_x_size\dimexpr\negated\cos\d_grph_rotate_width+\sin\d_grph_rotate_used_height\relax
- \d_grph_rotate_y_size\dimexpr\sin\d_grph_rotate_width+\negated\cos\d_grph_rotate_used_height\relax
- \d_grph_rotate_x_position\negated\cos\d_grph_rotate_width
- \d_grph_rotate_y_position\zeropoint
- \ifconditional\c_grph_rotate_not_fit
- \d_grph_rotate_x_offset\dimexpr-\d_grph_rotate_x_size+\sin\d_grph_rotate_depth\relax
- \fi
- \ifconditional\c_grph_rotate_obey_depth
- \d_grph_rotate_y_offset\negated\cos\d_grph_rotate_height
- \fi}
-
-\def\grph_rotate_calculate_c
- {\d_grph_rotate_x_size\dimexpr\negated\cos\d_grph_rotate_width+\negated\sin\d_grph_rotate_used_height\relax
- \d_grph_rotate_y_size\dimexpr\negated\sin\d_grph_rotate_width+\negated\cos\d_grph_rotate_used_height\relax
- \d_grph_rotate_x_position\d_grph_rotate_x_size
- \d_grph_rotate_y_position\negated\sin\d_grph_rotate_width
- \ifconditional\c_grph_rotate_not_fit
- \d_grph_rotate_x_offset\dimexpr-\d_grph_rotate_x_size+\negated\sin\d_grph_rotate_height\relax
- \fi
- \ifconditional\c_grph_rotate_obey_depth
- \d_grph_rotate_y_offset\dimexpr\d_grph_rotate_y_size+\cos\d_grph_rotate_depth\relax
- \fi}
-
-\def\grph_rotate_calculate_d
- {\d_grph_rotate_x_size\dimexpr\cos\d_grph_rotate_width+\negated\sin\d_grph_rotate_used_height\relax
- \d_grph_rotate_y_size\dimexpr\negated\sin\d_grph_rotate_width+\cos\d_grph_rotate_used_height\relax
- \d_grph_rotate_x_position\zeropoint
- \d_grph_rotate_y_position\d_grph_rotate_y_size
- \d_grph_rotate_x_offset\zeropoint
- \ifconditional\c_grph_rotate_obey_depth
- \d_grph_rotate_y_offset\d_grph_rotate_depth
- \fi}
-
-\def\grph_rotate_calculate_e
- {\d_grph_rotate_x_size\dimexpr\cos\d_grph_rotate_width+\negated\sin\d_grph_rotate_used_height\relax
- \d_grph_rotate_y_size\dimexpr\negated\sin\d_grph_rotate_width+\cos\d_grph_rotate_used_height\relax
- \d_grph_rotate_x_position\negated\sin\d_grph_rotate_used_height
- \d_grph_rotate_y_position\d_grph_rotate_y_size
- \ifconditional\c_grph_rotate_not_fit
- \d_grph_rotate_x_offset\dimexpr-\d_grph_rotate_x_size+\negated\sin\d_grph_rotate_height\relax
- \fi
- \ifconditional\c_grph_rotate_obey_depth
- \d_grph_rotate_y_offset\negated\sin\d_grph_rotate_depth
- \fi}
-
-\def\grph_rotate_apply
- {\setbox\nextbox\naturalvpack to \d_grph_rotate_y_size
- {\vfill
+ %
+ \setbox\nextbox\naturalvpack{\naturalhpack{\raise\dp\nextbox\box\nextbox}}% can we do without
+ %
+ \d_grph_rotate_used_height\ht\nextbox
+ %
+ \clf_analyzerotate % rather accurate
+ \p_rotation_rotation\space
+ \d_grph_rotate_width
+ \d_grph_rotate_height
+ \d_grph_rotate_depth
+ \d_grph_rotate_used_height
+ \c_grph_rotate_not_fit
+ \c_grph_rotate_obey_depth
+ \relax
+ %
+ \setbox\nextbox\naturalvpack to \d_grph_rotate_y_size
+ {\vfilll
\naturalhpack to \d_grph_rotate_x_size
{\dostartrotation\p_rotation_rotation
\wd\nextbox\zeropoint
@@ -1061,9 +988,24 @@
\dostoprotation
\hfill}%
\kern\d_grph_rotate_y_position}%
+ %
\setbox\nextbox\naturalhpack
{\kern\dimexpr\d_grph_rotate_x_position+\d_grph_rotate_x_offset\relax
- \lower\d_grph_rotate_y_offset\box\nextbox}}
+ \lower\d_grph_rotate_y_offset
+ \box\nextbox}%
+ %
+ \ifconditional\c_grph_rotate_center
+ \setbox\nextbox\naturalhpack{\hskip.5\d_grph_rotate_saved_width\lower-.5\d_grph_rotate_saved_height\box\nextbox}%
+ \wd\nextbox\d_grph_rotate_saved_width
+ \ht\nextbox\d_grph_rotate_saved_height
+ \dp\nextbox\d_grph_rotate_saved_depth
+ \else
+ \wd\nextbox\d_grph_rotate_new_width
+ \ht\nextbox\d_grph_rotate_new_height
+ \dp\nextbox\d_grph_rotate_new_depth
+ \fi
+ %
+ \boxcursor\box\nextbox}
% \dostepwiserecurse{0}{360}{10}
% {\startlinecorrection[blank]
@@ -1077,4 +1019,23 @@
% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high] {\ruledhbox{\bfb (high)}}}}}
% \stoplinecorrection}
+% \def\Test{\ruledhbox{%
+% \def\DemoX{\vl\kern.5\emwidth\vl}%
+% \kern\emwidth\ruledhpack{\green\rotate[rotation=20] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\blue \rotate[rotation=0] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\red \rotate[rotation=-20] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\green\rotate[rotation=200] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\blue \rotate[rotation=180] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\red \rotate[rotation=-200]{\ruledhpack{\DemoX}}}%
+% \kern\emwidth}}
+
+% \startTEXpage[offset=10pt,align=middle]
+% \setuprotate[location=fit] \Test \par {\infofont\setstrut\strut fit} \par
+% \setuprotate[location=depth] \Test \par {\infofont\setstrut\strut depth} \par
+% \setuprotate[location=broad] \Test \par {\infofont\setstrut\strut broad} \par
+% \setuprotate[location=high] \Test \par {\infofont\setstrut\strut high} \par
+% \setuprotate[location=middle] \Test \par {\infofont\setstrut\strut middle} \par
+% \setuprotate[location=default] \Test \par {\infofont\setstrut\strut default} \par
+% \stopTEXpage
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua b/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua
index 7979a40fb94..b0868ba4886 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-lpeg.lua
@@ -203,12 +203,14 @@ local collapser = Cs(spacer^0/"" * nonspacer^0 * ((spacer^0/" " * nonspac
local nospacer = Cs((whitespace^1/"" + nonwhitespace^1)^0)
local b_collapser = Cs( whitespace^0 /"" * (nonwhitespace^1 + whitespace^1/" ")^0)
-local e_collapser = Cs((whitespace^1 * endofstring/"" + nonwhitespace^1 + whitespace^1/" ")^0)
local m_collapser = Cs( (nonwhitespace^1 + whitespace^1/" ")^0)
+local e_collapser = Cs((whitespace^1 * endofstring/"" + nonwhitespace^1 + whitespace^1/" ")^0)
+local x_collapser = Cs( (nonwhitespace^1 + whitespace^1/"" )^0)
local b_stripper = Cs( spacer^0 /"" * (nonspacer^1 + spacer^1/" ")^0)
-local e_stripper = Cs((spacer^1 * endofstring/"" + nonspacer^1 + spacer^1/" ")^0)
local m_stripper = Cs( (nonspacer^1 + spacer^1/" ")^0)
+local e_stripper = Cs((spacer^1 * endofstring/"" + nonspacer^1 + spacer^1/" ")^0)
+local x_stripper = Cs( (nonspacer^1 + spacer^1/"" )^0)
patterns.stripper = stripper
patterns.fullstripper = fullstripper
@@ -218,10 +220,12 @@ patterns.nospacer = nospacer
patterns.b_collapser = b_collapser
patterns.m_collapser = m_collapser
patterns.e_collapser = e_collapser
+patterns.x_collapser = x_collapser
patterns.b_stripper = b_stripper
patterns.m_stripper = m_stripper
patterns.e_stripper = e_stripper
+patterns.x_stripper = x_stripper
patterns.lowercase = lowercase
patterns.uppercase = uppercase
diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/l-lua.lua
index f411230d4aa..00989c5cea7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/l-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-lua.lua
@@ -195,12 +195,6 @@ function optionalrequire(...)
end
end
--- nice for non ascii scripts (this might move):
-
-if lua then
- lua.mask = load([[τεχ = 1]]) and "utf" or "ascii"
-end
-
local flush = io.flush
if flush then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-os.lua b/Master/texmf-dist/tex/context/base/mkiv/l-os.lua
index 9aa8b8aa78c..73841074c46 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/l-os.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-os.lua
@@ -358,6 +358,8 @@ elseif name == "macosx" then
platform = "osx-intel"
elseif find(architecture,"x86_64",1,true) then
platform = "osx-64"
+ elseif find(architecture,"arm64",1,true) then
+ platform = "osx-64"
else
platform = "osx-ppc"
end
@@ -604,11 +606,19 @@ os.isleapyear = isleapyear
local days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-local function nofdays(year,month)
+local function nofdays(year,month,day)
if not month then
return isleapyear(year) and 365 or 364
- else
+ elseif not day then
return month == 2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day = day + days[i]
+ end
+ if month > 2 and isleapyear(year) then
+ day = day + 1
+ end
+ return day
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-package.lua b/Master/texmf-dist/tex/context/base/mkiv/l-package.lua
index 0dd71e5eca8..ef37aebe74e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/l-package.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-package.lua
@@ -16,7 +16,7 @@ if not modules then modules = { } end modules ['l-package'] = {
-- -- local mylib = require("libtest")
-- -- local mysql = require("luasql.mysql")
-local type = type
+local type, unpack = type, unpack
local gsub, format, find = string.gsub, string.format, string.find
local insert, remove = table.insert, table.remove
@@ -54,7 +54,7 @@ local function lualibfile(name)
return lpegmatch(pattern,name) or name
end
-local offset = luarocks and 1 or 0 -- todo: also check other extras
+local offset = luarocks and 1 or 0 -- todo: also check other extras ... we'll drop this luarocks anyway
local helpers = package.helpers or {
cleanpath = cleanpath,
@@ -70,6 +70,7 @@ local helpers = package.helpers or {
methods = {
},
sequence = {
+ "reset loaded",
"already loaded",
"preload table",
"qualified path", -- beware, lua itself doesn't handle qualified paths (prepends ./)
@@ -91,6 +92,7 @@ local builtin = helpers.builtin
local extraluapaths = { }
local extralibpaths = { }
+local checkedfiles = { }
local luapaths = nil -- delayed
local libpaths = nil -- delayed
local oldluapath = nil
@@ -245,10 +247,17 @@ local function loadedaslib(resolved,rawname) -- todo: strip all before first -
-- so, we can do a require("foo/bar") and initialize bar
-- local base = gsub(file.basename(rawname),"%.","_")
local init = "luaopen_" .. gsub(base,"%.","_")
+ local data = { resolved, init, "" }
+ checkedfiles[#checkedfiles+1] = data
if helpers.trace then
helpers.report("calling loadlib with '%s' with init '%s'",resolved,init)
end
- return package.loadlib(resolved,init)
+ local a, b, c = package.loadlib(resolved,init)
+ if not a and type(b) == "string" then
+-- data[3] = gsub(b or "unknown error","[\n\r]","")
+ data[3] = string.fullstrip(b or "unknown error")
+ end
+ return a, b, c -- c can be 'init'
end
helpers.loadedaslib = loadedaslib
@@ -295,12 +304,21 @@ end
helpers.loadedbyname = loadedbyname
+methods["reset loaded"] = function(name)
+ checkedfiles = { }
+ return false
+end
+
+
methods["already loaded"] = function(name)
return package.loaded[name]
end
methods["preload table"] = function(name)
- return builtin["preload table"](name)
+ local f = builtin["preload table"]
+ if f then
+ return f(name)
+ end
end
methods["qualified path"]=function(name)
@@ -316,22 +334,34 @@ methods["lib extra list"] = function(name)
end
methods["path specification"] = function(name)
- getluapaths() -- triggers list building and tracing
- return builtin["path specification"](name)
+ local f = builtin["path specification"]
+ if f then
+ getluapaths() -- triggers list building and tracing
+ return f(name)
+ end
end
methods["cpath specification"] = function(name)
- getlibpaths() -- triggers list building and tracing
- return builtin["cpath specification"](name)
+ local f = builtin["cpath specification"]
+ if f then
+ getlibpaths() -- triggers list building and tracing
+ return f(name)
+ end
end
methods["all in one fallback"] = function(name)
- return builtin["all in one fallback"](name)
+ local f = builtin["all in one fallback"]
+ if f then
+ return f(name)
+ end
end
methods["not loaded"] = function(name)
if helpers.trace then
helpers.report("unable to locate '%s'",name or "?")
+ for i=1,#checkedfiles do
+ helpers.report("checked file '%s', initializer '%s', message '%s'",unpack(checkedfiles[i]))
+ end
end
return nil
end
@@ -346,19 +376,22 @@ function helpers.loaded(name)
level = level + 1
for i=1,#sequence do
local method = sequence[i]
- if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
- end
- local result, rest = methods[method](name)
- if type(result) == "function" then
+ local lookup = method and methods[method]
+ if type(lookup) == "function" then
if helpers.trace then
- helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name)
end
- if helpers.traceused then
- used[#used+1] = { level = level, name = name }
+ local result, rest = lookup(name)
+ if type(result) == "function" then
+ if helpers.trace then
+ helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
+ end
+ if helpers.traceused then
+ used[#used+1] = { level = level, name = name }
+ end
+ level = level - 1
+ return result, rest
end
- level = level - 1
- return result, rest
end
end
-- safeguard, we never come here
diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua b/Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua
index c57aaf33ebc..03016ed9010 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/l-unicode.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['l-unicode'] = {
version = 1.001,
+ optimize = true,
comment = "companion to luat-lib.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv
index 7f3e85f0812..85c1f3ac775 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-def.mkiv
@@ -256,17 +256,18 @@
\c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
\installlanguage
- [\s!sl]
- [\c!spacing=\v!packed,
- \c!leftsentence=\hbox{\endash\space},
- \c!rightsentence=\hbox{\space\endash},
- \c!leftsubsentence=\endash,
- \c!rightsubsentence=\endash,
- \c!leftquote=\guilsingleright,
- \c!rightquote=\guilsingleleft,
- \c!leftquotation=\rightguillemot,
- \c!rightquotation=\leftguillemot,
- \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
+ [\s!sl]
+ [\c!command=\v!no,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\hbox{\endash\space},
+ \c!rightsentence=\hbox{\space\endash},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\guilsingleright,
+ \c!rightquote=\guilsingleleft,
+ \c!leftquotation=\rightguillemot,
+ \c!rightquotation=\leftguillemot,
+ \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
\installlanguage [\s!polish] [\s!pl]
\installlanguage [\s!czech] [\s!cs]
@@ -308,8 +309,55 @@
\c!date={\v!day,\space,\v!month,\space,\v!year},
\s!patterns=\s!uk]
-\installlanguage [\s!russian] [\s!ru]
-\installlanguage [\s!ukrainian] [\s!ua]
+\installlanguage
+ [\s!be]
+ [\s!lefthyphenmin=2,
+ \s!righthyphenmin=2,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\leftguillemot,
+ \c!rightsentence=\rightguillemot,
+ \c!leftsubsentence=\lowerleftdoubleninequote,
+ \c!rightsubsentence=\upperrightdoublesixquote,
+ \c!leftquote=\lowerleftdoubleninequote,
+ \c!rightquote=\upperrightdoublesixquote,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+ \installlanguage
+ [\s!sr]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\hbox{\endash\space},
+ \c!rightsentence=\hbox{\space\endash},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\upperrightsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperleftdoubleninequote,
+ \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!mk]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\endash,
+ \c!rightsentence=\endash,
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\upperleftsingleninequote,
+ \c!rightquote=\upperrightsinglesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage [\s!russian] [\s!ru]
+\installlanguage [\s!ukrainian] [\s!ua]
+\installlanguage [\s!belarussian][\s!be]
+\installlanguage [\s!serbian] [\s!sr]
+\installlanguage [\s!sr-latn] [\s!sr]
+\installlanguage [\s!sr-cyrl] [\s!sr]
+\installlanguage [\s!macedonian] [\s!mk]
+
% Uralic Languages: Cheremiss, Estonian, Finnish, Karelian, Laap,
% Mordvinian, Permian tongues, Hungarian, Ostyak, Vogul, Samoyed
@@ -413,7 +461,12 @@
\c!rightquotation=\upperrightdoubleninequote,
\c!date={\v!day,\space,\v!month,{،\space},\v!year}]
-\installlanguage [\s!hebrew] [\s!he]
+\installlanguage % same as arabic now .. someone needs to fix this
+ [\s!yi]
+ [\s!he]
+
+\installlanguage [\s!hebrew] [\s!he]
+\installlanguage [\s!yiddish] [\s!yi]
% Arabic Languages
@@ -484,11 +537,28 @@
% Artificial Languages: Esperanto
+\installlanguage
+ [\s!esperanto]
+ [%\c!spacing=\v!packed,
+ %\c!leftsentence=\emdash,
+ %\c!rightsentence=\emdash,
+ %\c!leftsubsentence=\emdash,
+ %\c!rightsubsentence=\emdash,
+ %\c!leftquote=\lowerleftdoubleninequote,
+ %\c!rightquote=\upperrightdoublesixquote,
+ %\c!leftquotation=\lowerleftdoubleninequote,
+ %\c!rightquotation=\upperrightdoublesixquote,
+ %\c!date={\v!year,~m.,\space,\v!month,\space,\v!day,~d.},
+ \s!patterns=eo,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=2]
+
% Baltic Languages: Lettish/Latvian, Lietuvių/Lithuanian
\installlanguage
[\s!lt]
- [\c!spacing=\v!packed,
+ [\c!command=\v!no,
+ \c!spacing=\v!packed,
\c!leftsentence=\emdash,
\c!rightsentence=\emdash,
\c!leftsubsentence=\emdash,
@@ -583,9 +653,6 @@
% Sardian, Catalan, French, Ladino, Portuguese, Proven\c{c}al,
% Spanish
-\ifdefined\guillemotspace \else \let\guillemotspace\empty \fi
-\ifdefined\sentencespace \else \let\sentencespace \empty \fi
-
\installlanguage
[\s!fr]
[\c!spacing=\v!packed,
@@ -632,7 +699,8 @@
\installlanguage
[\s!it]
- [\c!spacing=\v!packed,
+ [\c!command=\v!no,
+ \c!spacing=\v!packed,
\c!leftsentence=\emdash,
\c!rightsentence=\emdash,
\c!leftsubsentence=\endash,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua
index 90e84f65d42..3e4678801f5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-dis.lua
@@ -28,7 +28,7 @@ local getchar = nuts.getchar
local setchar = nuts.setchar
local getdisc = nuts.getdisc
local setdisc = nuts.setdisc
-local getlang = nuts.setlang
+local getlanguage = nuts.getlanguage
local getboth = nuts.getboth
local setlist = nuts.setlist
local setlink = nuts.setlink
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua
index 254961ee6f9..c2eb46990aa 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-exp.lua
@@ -116,7 +116,7 @@ if LUATEXVERSION < 1.005 then -- not loaded any more
end
end
if template then
- local language = template and getlang(template)
+ local language = template and getlanguage(template)
local data = getlanguagedata(language)
local prechar = data.prehyphenchar
local postchar = data.posthyphenchar
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua
index 93457c7a22c..ca9f519cee4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.lua
@@ -644,7 +644,7 @@ if context then
local getprev = nuts.getprev
local getsubtype = nuts.getsubtype
local getlist = nuts.getlist
- local getlang = nuts.getlang
+ local getlanguage = nuts.getlanguage
local getattrlist = nuts.getattrlist
local setattrlist = nuts.setattrlist
local isglyph = nuts.isglyph
@@ -1410,7 +1410,7 @@ featureset.hyphenonly = hyphenonly == v_yes
if skipping then
current = getnext(current)
else
- local lang = getlang(current)
+ local lang = getlanguage(current)
local font = getfont(current)
if lang ~= language or font ~= lastfont then
if dictionary and size > charmin and leftmin + rightmin <= size then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv
index 9301fd1d873..d8fbb0b229a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-hyp.mkiv
@@ -30,8 +30,8 @@
\writestatus{loading}{ConTeXt Language Macros / Initialization}
-\registerctxluafile{lang-dis}{}
-\registerctxluafile{lang-hyp}{}
+\registerctxluafile{lang-dis}{autosuffix}
+\registerctxluafile{lang-hyp}{autosuffix}
\unprotect
@@ -45,8 +45,10 @@
\newcount\compoundhyphenpenalty
-\automatichyphenmode \plusone
-\hyphenpenaltymode \plusfour
+\ifcase\contextlmtxmode
+ \hyphenpenaltymode\plusfour
+ \automatichyphenmode\plusone
+\fi
\hyphenpenalty 50 % hyphenator
\automatichyphenpenalty 50 % -
@@ -150,7 +152,7 @@ rightedge {\dummyparameter\c!rightedge}%
{\clf_sethyphenationfeatures{#1}}
\unexpanded\def\resethyphenationfeatures
- {\hyphenationattribute\attributeunsetvalue}
+ {\attribute\hyphenationattribute\attributeunsetvalue}
\resethyphenationfeatures
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua
new file mode 100644
index 00000000000..377d6dfde1d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-imp-serbian.lua
@@ -0,0 +1,38 @@
+return {
+ transliterations = {
+ ["serbian to latin"] = {
+ mapping = {
+ ["Ð"] = "A", ["а"] = "a",
+ ["Б"] = "B", ["б"] = "b",
+ ["В"] = "V", ["в"] = "v",
+ ["Г"] = "G", ["г"] = "g",
+ ["Д"] = "D", ["д"] = "d",
+ ["Е"] = "E", ["е"] = "e",
+ ["Ж"] = "Ž", ["ж"] = "ž",
+ ["З"] = "Z", ["з"] = "z",
+ ["И"] = "I", ["и"] = "i",
+ ["Й"] = "J", ["й"] = "j",
+ ["К"] = "K", ["к"] = "k",
+ ["Л"] = "L", ["л"] = "l",
+ ["М"] = "M", ["м"] = "m",
+ ["Ð"] = "N", ["н"] = "n",
+ ["О"] = "O", ["о"] = "o",
+ ["П"] = "P", ["п"] = "p",
+ ["Р"] = "R", ["р"] = "r",
+ ["С"] = "S", ["Ñ"] = "s",
+ ["Т"] = "T", ["т"] = "t",
+ ["У"] = "U", ["у"] = "u",
+ ["Ф"] = "F", ["ф"] = "f",
+ ["Ð¥"] = "Ch", ["Ñ…"] = "ch",
+ ["Ц"] = "C", ["ц"] = "c",
+ ["Ч"] = "ÄŒ", ["ч"] = "Ä",
+ ["Ш"] = "Š", ["ш"] = "š",
+ ["Щ"] = "Št", ["щ"] = "št",
+ ["Ъ"] = "Ă", ["ъ"] = "ă",
+ ["Ь"] = "′", ["ь"] = "′",
+ ["Ю"] = "Ju", ["ю"] = "ju",
+ ["Я"] = "Ja", ["Ñ"] = "ja",
+ }
+ }
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua
index ce2b89f3c97..7a8aab8183f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.lua
@@ -48,8 +48,7 @@ local sethjcode = lang.sethjcode
local uccodes = characters.uccodes
local lccodes = characters.lccodes
-lang.exceptions = lang.hyphenation
-local new_langage = lang.new
+local new_language = lang.new
languages = languages or {}
local languages = languages
@@ -85,7 +84,7 @@ local function resolve(tag)
if data then
instance = data.instance
if not instance then
- instance = new_langage(data.number)
+ instance = new_language(data.number)
data.instance = instance
end
end
@@ -101,7 +100,7 @@ local function tolang(what) -- returns lang object
if data then
local instance = data.lang
if not instance then
- instance = new_langage(data.number)
+ instance = new_language(data.number)
data.instance = instance
end
return instance
@@ -502,6 +501,14 @@ else
end
end
+ if CONTEXTLMTXMODE > 0 then
+ numbers[0] = "null"
+ registered.null = {
+ number = 0,
+ instance = new_language(0),
+ }
+ end
+
end
-- not that usefull, global values
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv
index f9d7e0f510f..ffa280b053d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkiv
@@ -311,7 +311,7 @@
\c!time={h,:,m},
\c!date={\v!year,\ ,\v!month,\ ,\v!day},
\c!text=Ag,
- \s!font=] % \v!auto : experimental !
+ \c!font=] % \v!auto : experimental !
% to be tested:
%
@@ -430,6 +430,12 @@
\let\dohyphens\relax
+\unexpanded\def\usehyphensparameter#1%
+ {\edef\p_hyphens{#1\c!hyphens}%
+ \ifx\p_hyhens\v!no
+ \nohyphens
+ \fi}
+
\unexpanded\def\lang_basics_synchronize_min_max % maybe store this at the lua end
{% these values are stored along with glyph nodes
\lefthyphenmin \numexpr0\languageparameter\s!lefthyphenmin +\hyphenminoffset\relax
@@ -486,12 +492,12 @@
\unexpanded\def\setuplanguages
{\setuplanguage[\s!default]}
-% \setuplanguages[\s!font=\v!auto]
-% \setuplanguage[\s!default][\s!font=\v!auto]
-% \setuplanguage[nl][\s!font=\v!auto]
+% \setuplanguages[\c!font=\v!auto]
+% \setuplanguage[\s!default][\c!font=\v!auto]
+% \setuplanguage[nl][\c!font=\v!auto]
\appendtoks
- \edef\p_language_font{\languageparameter\s!font}%
+ \edef\p_language_font{\languageparameter\c!font}%
\ifx\p_language_font\empty\else
\ifx\p_language_font\v!auto
\doaddfeature\currentlanguage
@@ -717,9 +723,16 @@
%D New:
-\unexpanded\def\traceddiscretionary#1#2#3%
- {\dontleavehmode
- \discretionary{\darkred#1}{\darkgreen#2}{\darkblue#3}}
+\unexpanded\def\traceddiscretionary#1#%
+ {\dontleavehmode\lang_basics_traced_discretionary{#1}}
+
+\unexpanded\def\lang_basics_traced_discretionary#1#2#3#4%
+ {\normaldiscretionary#1{\darkred#2}{\darkgreen#3}{\darkblue#4}}
+
+\installtextracker
+ {discretionaries}
+ {\let\discretionary\traceddiscretionary}
+ {\let\discretionary\normaldiscretionary}
\unexpanded\def\samplediscretionary
{\traceddiscretionary
@@ -727,6 +740,4 @@
{\clf_currentposthyphenchar post}%
{replace}}
-% todo: make this configurable
-
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv
index 3ec29a782f8..4d81c01faa6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv
@@ -254,12 +254,12 @@
\def\lang_discretionaries_check_after
{\setfalse\punctafterdiscretionary
\setfalse\spaceafterdiscretionary
- \ifx\blankspace\nextnext \settrue \spaceafterdiscretionary \else
- \ifx\space \nextnext \settrue \spaceafterdiscretionary \else
- \ifx .\nextnext \settrue \punctafterdiscretionary \else
- \ifx ,\nextnext \settrue \punctafterdiscretionary \else
- \ifx :\nextnext \settrue \punctafterdiscretionary \else
- \ifx ;\nextnext \settrue \punctafterdiscretionary \fi\fi\fi\fi\fi\fi}
+ \ifx\blankspace\nexttoken \settrue \spaceafterdiscretionary \else
+ \ifx\space \nexttoken \settrue \spaceafterdiscretionary \else
+ \ifx .\nexttoken \settrue \punctafterdiscretionary \else
+ \ifx ,\nexttoken \settrue \punctafterdiscretionary \else
+ \ifx :\nexttoken \settrue \punctafterdiscretionary \else
+ \ifx ;\nexttoken \settrue \punctafterdiscretionary \fi\fi\fi\fi\fi\fi}
\letvalue{\??discretionarymode m}\handlemathmodediscretionary
@@ -268,7 +268,7 @@
\let\nextnextnext\egroup
\def\next##1#1%
{\def\next{\activedododotextmodediscretionary#1{##1}}%
- \futurelet\nextnext\next}%
+ \futurelet\nexttoken\next}%
\next}
\let\discretionarytoken \relax
@@ -279,7 +279,7 @@
\def\textmodediscretionary{\handletextmodediscretionary{#1}}%
\lang_discretionaries_check_after
\ifx\discretionarytoken\empty
- \ifx#1\nextnext % takes care of ||| and +++ and ......
+ \ifx#1\nexttoken % takes care of ||| and +++ and ......
\ifcsname\??discretionaryaction\string#1\endcsname
\lastnamedcs
\else\ifconditional\spaceafterdiscretionary
@@ -296,7 +296,7 @@
\else
\lang_discretionaries_check_before
% the next line has been changed (20050203)
- % \prewordbreak\hbox{\textmodediscretionary\nextnext}\postwordbreak
+ % \prewordbreak\hbox{\textmodediscretionary\nexttoken}\postwordbreak
% but an hbox blocks a possible \discretionary
\ifcsname\??discretionaryaction\endcsname
\lastnamedcs
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua
index d0f6f6d5f24..9f89fa24848 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.lua
@@ -40,6 +40,10 @@ local trace_details = false trackers.register("languages.replacements.deta
local report_replacement = logs.reporter("languages","replacements")
local glyph_code = nodes.nodecodes.glyph
+local glue_code = nodes.nodecodes.glue
+
+local spaceskip_code = nodes.gluecodes.spaceskip
+local xspaceskip_code = nodes.gluecodes.xspaceskip
local nuts = nodes.nuts
@@ -47,6 +51,7 @@ local getnext = nuts.getnext
local getprev = nuts.getprev
local getattr = nuts.getattr
local getid = nuts.getid
+local getsubtype = nuts.getsubtype
local getchar = nuts.getchar
local isglyph = nuts.isglyph
@@ -82,7 +87,7 @@ local replacements = languages.replacements or { }
languages.replacements = replacements
local a_replacements = attributes.private("replacements")
-local a_noligature = attributes.private("noligature")
+local a_noligature = attributes.private("noligature") -- to be adapted to lmtx !
local lists = { }
local last = 0
@@ -105,7 +110,7 @@ lists[v_reset].attribute = unsetvalue -- so we discard 0
local function add(root,word,replacement)
local processor, replacement = splitprocessor(replacement,true) -- no check
replacement = lpegmatch(stripper,replacement) or replacement
- local list = utfsplit(word,true)
+ local list = utfsplit(word) -- ,true)
local size = #list
for i=1,size do
local l = utfbyte(list[i])
@@ -159,47 +164,6 @@ function languages.replacements.addlist(category,list)
end
end
-local function hit(a,head)
- local tree = trees[a]
- if tree then
- local root = tree[getchar(head)]
- if root then
- local current = getnext(head)
- local lastrun = false
- local lastfinal = false
- while current do
- local char, id = isglyph(current)
- -- if not char and id == glue_code then
- -- char = " " -- if needed we can also deal with spaces and special nbsp and such
- -- end
- if char then
- local newroot = root[char]
- if not newroot then
- return lastrun, lastfinal
- else
- local final = newroot.final
- if final then
- if trace_details then
- report_replacement("hitting word %a, replacement %a",final.word,final.replacement)
- end
- lastrun = current
- lastfinal = final
- else
- root = newroot
- end
- end
- current = getnext(current)
- else
- break
- end
- end
- if lastrun then
- return lastrun, lastfinal
- end
- end
- end
-end
-
local function tonodes(list,template)
local head, current
for i=1,#list do
@@ -214,120 +178,241 @@ local function tonodes(list,template)
return head
end
+local is_punctuation = characters.is_punctuation
+
+-- We can try to be clever and use the fact that there is no match to skip
+-- over to the next word but it is gives fuzzy code so for now I removed
+-- that optimization (when I really need a high performance version myself
+-- I will look into it (but so far I never used this mechanism myself).
+--
+-- We used to have the hit checker as function but is got messy when checks
+-- for punctuation was added.
+
+local function replace(head,first,last,final,hasspace,overload)
+ local current = first
+ local prefirst = getprev(first) or head
+ local postlast = getnext(last)
+ local oldlength = final.oldlength
+ local newcodes = final.newcodes
+ local newlength = newcodes and #newcodes or 0
+ if trace_replacements then
+ report_replacement("replacing word %a by %a",final.word,final.replacement)
+ end
+ if hasspace or final.special then
+ -- It's easier to delete and insert so we do just that. On the todo list is
+ -- turn injected spaces into glue but easier might be to let the char break
+ -- handler do that ...
+ local prev = getprev(current)
+ local next = getnext(last)
+ local list = current
+ setnext(last)
+ setlink(prev,next)
+ current = prev
+ if not current then
+ head = nil
+ end
+ local i = 1
+ while i <= newlength do
+ local codes = newcodes[i]
+ if type(codes) == "table" then
+ local method = codes[1]
+ if method == "discretionary" then
+ local pre, post, replace = codes[2], codes[3], codes[4]
+ if pre then
+ pre = tonodes(pre,first)
+ end
+ if post then
+ post = tonodes(post,first)
+ end
+ if replace then
+ replace = tonodes(replace,first)
+ end
+ -- todo: also set attr
+ local new = new_disc(pre,post,replace)
+ setattrlist(new,first)
+ head, current = insert_after(head,current,new)
+ elseif method == "noligature" then
+ -- not that efficient to copy but ok for testing
+ local list = codes[2]
+ if list then
+ for i=1,#list do
+ local new = copy_node(first)
+ setchar(new,list[i])
+ setattr(new,a_noligature,1)
+ head, current = insert_after(head,current,new)
+ end
+ else
+ local new = copy_node(first)
+ setchar(new,zwnj)
+ head, current = insert_after(head,current,new)
+ end
+ else
+ report_replacement("unknown method %a",method or "?")
+ end
+ else
+ local new = copy_node(first)
+ setchar(new,codes)
+ head, current = insert_after(head,current,new)
+ end
+ i = i + 1
+ end
+ flush_list(list)
+ elseif newlength == 0 then
+ -- we overload
+ elseif oldlength == newlength then
+ if final.word ~= final.replacement then
+ for i=1,newlength do
+ setchar(current,newcodes[i])
+ current = getnext(current)
+ end
+ end
+ current = getnext(final)
+ elseif oldlength < newlength then
+ for i=1,newlength-oldlength do
+ local n = copy_node(current)
+ setchar(n,newcodes[i])
+ head, current = insert_node_before(head,current,n)
+ current = getnext(current)
+ end
+ for i=newlength-oldlength+1,newlength do
+ setchar(current,newcodes[i])
+ current = getnext(current)
+ end
+ else
+ for i=1,oldlength-newlength do
+ head, current = remove_node(head,current,true)
+ end
+ for i=1,newlength do
+ setchar(current,newcodes[i])
+ current = getnext(current)
+ end
+ end
+ if overload then
+ overload(final,getnext(prefirst),getprev(postlast))
+ end
+ return head, postlast
+end
+
+-- we handle just one space
+
function replacements.handler(head)
- local current = head
- local overload = attributes.applyoverloads
+ local current = head
+ local overload = attributes.applyoverloads
+ local mode = false -- we're in word or punctuation mode
+ local wordstart = false
+ local wordend = false
+ local prevend = false
+ local prevfinal = false
+ local tree = false
+ local root = false
+ local hasspace = false
while current do
- if getid(current) == glyph_code then
+ local id = getid(current) -- or use the char getter
+ if id == glyph_code then
local a = getattr(current,a_replacements)
if a then
- local last, final = hit(a,current)
- if last then
- local precurrent = getprev(current) or head
- local oldlength = final.oldlength
- local newcodes = final.newcodes
- local newlength = newcodes and #newcodes or 0
- if trace_replacement then
- report_replacement("replacing word %a by %a",final.word,final.replacement)
- end
- if final.special then
- -- easier is to delete and insert (a simple callout to tex would be more efficient)
- -- maybe just walk over a replacement string instead
- local prev = getprev(current)
- local next = getnext(last)
- local list = current
- setnext(last)
- setlink(prev,next)
- current = prev
- if not current then
- head = nil
- end
- local i = 1
- while i <= newlength do
- local codes = newcodes[i]
- if type(codes) == "table" then
- local method = codes[1]
- if method == "discretionary" then
- local pre, post, replace = codes[2], codes[3], codes[4]
- if pre then
- pre = tonodes(pre,last)
- end
- if post then
- post = tonodes(post,last)
- end
- if replace then
- replace = tonodes(replace,last)
- end
- -- todo: also set attr
- local new = new_disc(pre,post,replace)
- setattrlist(new,last)
- head, current = insert_after(head,current,new)
- elseif method == "noligature" then
- -- not that efficient to copy but ok for testing
- local list = codes[2]
- if list then
- for i=1,#list do
- local new = copy_node(last)
- setchar(new,list[i])
- setattr(new,a_noligature,1)
- head, current = insert_after(head,current,new)
- end
- else
- local new = copy_node(last)
- setchar(new,zwnj)
- head, current = insert_after(head,current,new)
- end
- else
- -- todo
+ -- we have a run
+ tree = trees[a]
+ if tree then
+ local char = getchar(current)
+ local punc = is_punctuation[char]
+ if mode == "punc" then
+ if not punc then
+ if root then
+ local final = root.final
+ if final then
+ head = replace(head,wordstart,wordend,final,hasspace,overload)
+ elseif prevfinal then
+ head = replace(head,wordstart,prevend,prevfinal,hasspace,overload)
end
- else
- local new = copy_node(last)
- setchar(new,codes)
- head, current = insert_after(head,current,new)
+ prevfinal = false
+ root = false
end
- i = i + 1
+ mode = "word"
end
- flush_list(list)
- elseif newlength == 0 then
- -- nothing gets replaced
- current = getnext(last)
- elseif oldlength == newlength then -- #old == #new
- if final.word == final.replacement then
- -- nothing to do but skip
- else
- for i=1,newlength do
- setchar(current,newcodes[i])
- current = getnext(current)
+ elseif mode == "word" then
+ if punc then
+ if root then
+ local final = root.final
+ if final then
+ head = replace(head,wordstart,wordend,final,hasspace,overload)
+ elseif prevfinal then
+ head = replace(head,wordstart,prevend,prevfinal,hasspace,overload)
+ end
+ prevfinal = false
+ root = false
end
+ mode = "punc"
end
- elseif oldlength < newlength then -- #old < #new
- for i=1,newlength-oldlength do
- local n = copy_node(current)
- setchar(n,newcodes[i])
- head, current = insert_node_before(head,current,n)
- current = getnext(current)
- end
- for i=newlength-oldlength+1,newlength do
- setchar(current,newcodes[i])
- current = getnext(current)
+ else
+ mode = punc and "punc" or "word"
+ end
+ if root then
+ root = root[char]
+ if root then
+ wordend = current
end
- else -- #old > #new
- for i=1,oldlength-newlength do
- head, current = remove_node(head,current,true)
+ else
+ if prevfinal then
+ head = replace(head,wordstart,prevend,prevfinal,hasspace,overload)
+ prevfinal = false
end
- for i=1,newlength do
- setchar(current,newcodes[i])
- current = getnext(current)
+ root = tree[char]
+ if root then
+ wordstart = current
+ wordend = current
+ prevend = false
+ hasspace = false
end
end
- if overload then
- overload(final,getnext(precurrent),getprev(current))
+ else
+ root= false
+ end
+ else
+ tree = false
+ end
+ current = getnext(current)
+ elseif root then
+ local final = root.final
+ if mode == "word" and id == glue_code then
+ local s = getsubtype(current)
+ if s == spaceskip_code or s == xspaceskip_code then
+ local r = root[32] -- maybe more types
+ if r then
+ if not prevend then
+ local f = root.final
+ if f then
+ prevend = wordend
+ prevfinal = f
+ end
+ end
+ wordend = current
+ root = r
+ hasspace = true
+ goto moveon
end
end
end
+ if final then
+ head, current = replace(head,wordstart,wordend,final,hasspace,overload)
+ elseif prevfinal then
+ head, current = replace(head,wordstart,prevend,prevfinal,hasspace,overload)
+ end
+ prevfinal = false
+ root = false
+ ::moveon::
+ current = getnext(current)
+ else
+ current = getnext(current)
+ end
+ end
+ if root then
+ local final = root.final
+ if final then
+ head = replace(head,wordstart,wordend,final,hasspace,overload)
+ elseif prevfinal then
+ head = replace(head,wordstart,prevend,prevfinal,hasspace,overload)
end
- -- we're one ahead now but we need to because we handle words
- current = getnext(current)
end
return head
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv
index 7864b029a7b..a3aaec8e95d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-rep.mkiv
@@ -54,7 +54,7 @@
{\clf_setreplacements{#1}}
\unexpanded\def\resetreplacements
- {\attribute\replacementsattribute\attributeunsetvalue}
+ {\c_attr_replacements\attributeunsetvalue}
\unexpanded\def\replaceword
{\dotripleempty\languages_replacements_replace}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua
new file mode 100644
index 00000000000..5fd123349a3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-tra.lua
@@ -0,0 +1,123 @@
+if not modules then modules = { } end modules ['lang-tra'] = {
+ version = 1.001,
+ comment = "companion to lang-tra.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local utfbyte, utfsplit = utf.byte, utf.split
+
+local nuts = nodes.nuts
+
+local nextchar = nuts.traversers.char
+
+local getattr = nuts.getattr
+local setchar = nuts.setchar
+
+local insert_before = nuts.insert_before
+local copy_node = nuts.copy
+
+local texsetattribute = tex.setattribute
+
+local transliteration = { }
+languages.transliteration = transliteration
+
+local a_transliteration = attributes.private("transliteration")
+local unsetvalue = attributes.unsetvalue
+
+local lastmapping = 0
+local loadedmappings = { }
+
+function transliteration.define(name,vector)
+ local m = loadedmappings[vector]
+ if m == nil then
+ lastmapping = lastmapping + 1
+ local data = require("lang-imp-" .. name)
+ if data then
+ local transliterations = data.transliterations
+ if transliterations then
+ for name, d in next, transliterations do
+ local vector = d.vector
+ if not vector then
+ local mapping = d.mapping
+ if mapping then
+ vector = { }
+ for k, v in next, mapping do
+ local vv = utfsplit(v)
+ for i=1,#vv do
+ vv[i] = utfbyte(vv[i])
+ end
+ vector[utfbyte(k)] = vv
+ end
+ d.vector = vector
+ end
+ end
+ d.attribute = lastmapping
+ loadedmappings[name] = d
+ loadedmappings[lastmapping] = d
+ end
+ end
+ end
+ m = loadedmappings[vector] or false
+ end
+end
+
+local enabled = false
+
+function transliteration.set(vector)
+ if not enabled then
+ nodes.tasks.enableaction("processors", "languages.transliteration.handler")
+ enabled = true
+ end
+ local m = loadedmappings[vector]
+ texsetattribute(a_transliteration,m and m.attribute or unsetvalue)
+end
+
+function transliteration.handler(head)
+ local aprev = nil
+ local vector = nil
+ for current, char in nextchar, head do
+ local a = getattr(current,a_transliteration)
+ if a then
+ if a ~= aprev then
+ aprev = a
+ vector = loadedmappings[a]
+ if vector then
+ vector = vector.vector
+ end
+ end
+ if vector then
+ local t = vector[char]
+ if t then
+ local n = #t
+ setchar(current,t[n])
+ local p = current
+ if n > 1 then
+ for i = n-1,1,-1 do
+ local g = copy_node(current)
+ setchar(g,t[i])
+ head, p = insert_before(head, p, g)
+ end
+ end
+ end
+ end
+ end
+ end
+ return head
+end
+
+interfaces.implement {
+ name = "settransliteration",
+ arguments = "string",
+ actions = transliteration.set,
+}
+
+interfaces.implement {
+ name = "definedtransliteration",
+ arguments = "2 strings",
+ actions = transliteration.define,
+}
+
+nodes.tasks.prependaction("processors", "normalizers", "languages.transliteration.handler", nil, "nut", "disabled" )
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-tra.mkiv
new file mode 100644
index 00000000000..b8e64066166
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-tra.mkiv
@@ -0,0 +1,98 @@
+%D \module
+%D [ file=lang-tra,
+%D version=2020.10.31,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Transliteration,
+%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 Language Macros / Transliteration}
+
+\registerctxluafile{lang-tra}{}
+
+\unprotect
+
+\definesystemattribute[transliteration][public,global]
+
+\installcorenamespace {transliteration}
+
+\unexpanded\def\definetransliteration
+ {\dodoubleempty\lang_transliteration_define}
+
+\unexpanded\def\lang_transliteration_define[#1][#2]%
+ {\clf_definedtransliteration{#1}{#2}}
+
+\unexpanded\def\settransliteration[#1]%
+ {\clf_settransliteration{#1}}
+
+\unexpanded\def\starttransliteration[#1]%
+ {\begingroup
+ \clf_settransliteration{#1}}
+
+\unexpanded\def\stoptransliteration
+ {\endgroup}
+
+\unexpanded\def\resettransliteration
+ {\c_attr_transliteration\attributeunsetvalue}
+
+\appendtoks
+ \resettransliteration
+\to \everyinitializeverbatim
+
+\protect \endinput
+
+% \setupbodyfont[dejavu]
+%
+% \input lang-tra.mkiv
+%
+% \definetransliteration[serbian][serbian to latin]
+%
+% \starttext
+%
+% \settransliteration[serbian to latin]
+%
+% \startchapter[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \start
+% \settransliteration[serbian to latin]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stop
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stopchapter
+%
+% \resettransliteration
+%
+% \startchapter[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \start
+% \settransliteration[serbian to latin]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stop
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stopchapter
+%
+% \definehead[ChapterA][chapter]
+% \definehead[ChapterB][chapter]
+%
+% \startsetups s-to-l
+% \settransliteration[serbian to latin]
+% \red
+% \stopsetups
+%
+% % maybe we need a setups key for this
+% % hm, \definesetups [xxx] [aa,bb,cc]
+%
+% \setuphead[ChapterB][commandbefore=\setups{s-to-l}]
+%
+% \startChapterA[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% \stopChapterA
+%
+% \startChapterB[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% \stopChapterB
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua
index f89795e3972..026abbd0ed4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-txt.lua
@@ -18,6 +18,8 @@ if not modules then modules = { } end modules ['lang-txt'] = {
--
-- af Afrikaans ...
-- ar Arabic Idris Samawi Hamid, Khaled Hosny
+-- be Belarussian Darya Hryshkavets (2019)
+-- bg Bulgarian Vladislav Hinkin, AleÅ¡ ÄŽurÄanský (2019)
-- ca Catalan ...
-- cn Chinese Wang Lei, ...
-- cs Czech Tom Hudec, Petr Sojka, Richard Gabriel
@@ -25,7 +27,7 @@ if not modules then modules = { } end modules ['lang-txt'] = {
-- de German Tobias Burnus, ...
-- en English Hans Hagen, ...
-- es Spanish Andrés Montoya, ...
--- et Estonian Clyde Johnston
+-- et Estonian Clyde Johnston (2018)
-- fi Finish ...
-- fr French Daniel Flipo, Arthur Reutenauer
-- gr Greek Apostolos Syropoulos, Thomas Schmitz
@@ -36,17 +38,19 @@ if not modules then modules = { } end modules ['lang-txt'] = {
-- kr Korean Jeong Dalyoung
-- la Latin ...
-- lt Lithuanian Marius AlekneviÄius
--- mk Macedonian Jakub Loula, Tomáš Hála (2019), Stojan Trajanovski
+-- mk Macedonian Jakub Loula, Tomáš Hála (2019), Stojan Trajanovski (2019)
-- nb Norwegian Hans Fredrik Nordhaug, ...
-- nn Norwegian Hans Fredrik Nordhaug, ...
-- nl Dutch Hans Hagen
--- pe Persian Mohammad Hossein Bateni
--- pl Polish Grzegorz Sapijaszko
+-- pe Persian Mohammad Hossein Bateni (2016)
+-- pl Polish Grzegorz Sapijaszko (2011)
-- pt Portuguese Pedro F. M. Mendonça
-- ro Romanian Dan Seracu, ...
-- ru Russian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ...
-- sk Slovak Tomáš Hála (2012)
-- sl Slovenian Mojca Miklavec
+-- sr Serbian Ivan Pešić (2020)
+-- sr-latn Serbian Ivan Pešić (2020)
-- sv Swedish ...
-- tk Turkish Tobias Burnus
-- tr Turkmen Nazar Annagurban
@@ -71,35 +75,49 @@ data.labels={
["btx"]={
["In"]={
["labels"]={
+ ["be"]="У",
+ ["bg"]="в",
["en"]="In",
["es"]="En",
["fr"]="Dans",
["mk"]="во",
["pe"]="در",
+ ["sr"]="У",
+ ["sr-latn"]="U",
},
},
["Number"]={
["labels"]={
+ ["be"]="Ðумар",
+ ["bg"]="номер",
["de"]="Numer",
["en"]="Number",
["fr"]="Numéro",
["mk"]="Број",
["nl"]="Nummer",
["pe"]="شماره",
+ ["sr"]="Број",
+ ["sr-latn"]="Broj",
},
},
["Volume"]={
["labels"]={
+ ["be"]="Гук",
+ ["bg"]="обем",
["de"]="Band",
["en"]="Volume",
["et"]="Köide",
["mk"]="Том",
["nl"]="Deel",
["pe"]="جلد",
+ ["sr"]="Том",
+ ["sr-latn"]="Tom",
},
},
["and"]={
["labels"]={
+ ["be"]="i",
+ ["bg"]="a",
["de"]="und",
["en"]="and",
["es"]="y",
@@ -109,10 +127,14 @@ data.labels={
["mk"]="и",
["nl"]="en",
["pe"]="Ùˆ",
+ ["sr"]="и",
+ ["sr-latn"]="i",
},
},
["edition"]={
["labels"]={
+ ["be"]="Выданне",
+ ["bg"]="издание",
["de"]="Auflage",
["en"]="edition",
["es"]="edición",
@@ -122,10 +144,14 @@ data.labels={
["mk"]="издание",
["nl"]="editie",
["pe"]="ویرایش",
+ ["sr"]="издање",
+ ["sr-latn"]="izdanje",
},
},
["editor"]={
["labels"]={
+ ["be"]="РÑдактар",
+ ["bg"]="редактор",
["de"]="Herausgeber",
["en"]="editor",
["et"]="toimetaja",
@@ -133,10 +159,14 @@ data.labels={
["it"]="a cura di",
["mk"]="уредник",
["pe"]="ویراستار",
+ ["sr"]="уредник",
+ ["sr-latn"]="urednik",
},
},
["editors"]={
["labels"]={
+ ["be"]="РÑдактары",
+ ["bg"]="редактори",
["de"]="Herausgeber",
["en"]="editors",
["es"]="editores",
@@ -144,20 +174,27 @@ data.labels={
["fr"]="éditeurs",
["it"]="a cura di",
["mk"]="уредници",
-
+ ["sr"]="уредници",
+ ["sr-latn"]="urednici",
},
},
["in"]={
["labels"]={
+ ["be"]="у",
+ ["bg"]="в",
["en"]="in",
["es"]="en",
["fr"]="dans",
["mk"]="во",
["pe"]="در",
+ ["sr"]="у",
+ ["sr-latn"]="u",
},
},
["mastersthesis"]={
["labels"]={
+ ["be"]="Ð”Ñ‹Ð¿Ð»Ð¾Ð¼Ð½Ð°Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ð°",
+ ["bg"]="дипломна работа",
["de"]="Masterarbeit",
["en"]="Master's thesis",
["es"]="Tesis de maestría",
@@ -167,55 +204,76 @@ data.labels={
["mk"]="МагиÑтерÑка диÑертација",
["nl"]="Masterproef",
["pe"]="پایان‌نامه کارشناسی ارشد",
+ ["sr"]="МаÑтер диÑертација",
+ ["sr-latn"]="Master disertacija",
},
},
["number"]={
["labels"]={
+ ["be"]="нумар",
+ ["bg"]="номер",
["de"]="Numer",
["en"]="number",
["fr"]="numéro",
["mk"]="број",
["nl"]="nummer",
["pe"]="شماره",
+ ["sr"]="број",
+ ["sr-latn"]="broj",
},
},
["of"]={
["labels"]={
+ ["be"]="з",
+ ["bg"]="на",
["de"]="von",
["en"]="of",
["fr"]="de",
["mk"]="од",
["nl"]="van",
+ ["sr"]="од",
+ ["sr-latn"]="od",
},
},
["others"]={
["labels"]={
["en"]="et al.",
["et"]="jt",
- ["mk"]="и др.",
+ ["mk"]="и др.",
+ ["sr"]="и др.",
+ ["sr-latn"]="i dr.",
},
},
["p"]={
["labels"]={
+ ["be"]="Ñтар.",
["de"]="S.",
["en"]="p.",
- ["mk"]="ÑÑ‚Ñ€.",
["et"]="lk",
+ ["mk"]="ÑÑ‚Ñ€.",
["pe"]="ص",
+ ["sr"]="ÑÑ‚Ñ€.",
+ ["sr-latn"]="str.",
},
},
["pages"]={
["labels"]={
+ ["be"]="Ñтаронка",
+ ["bg"]="Ñтрани",
["de"]="Seiten",
["en"]="pages",
["et"]="leheküljed",
["mk"]="Ñтраници",
["nl"]="paginas",
["pe"]="صÙحات",
+ ["sr"]="Ñтраницa",
+ ["sr-latn"]="stranica",
},
},
["patent"]={
["labels"]={
+ ["be"]="патÑнт",
+ ["bg"]="патент",
["de"]="Patent",
["en"]="Patent",
["es"]="Patente",
@@ -224,10 +282,14 @@ data.labels={
["it"]="Brevetto",
["mk"]="Патент",
["nl"]="Octrooi",
+ ["sr"]="Патент",
+ ["sr-latn"]="Patent",
},
},
["phdthesis"]={
["labels"]={
+ ["be"]="ДоктарÑÐºÐ°Ñ Ð´Ñ‹ÑертацыÑ",
+ ["bg"]="диÑертачна работа",
["de"]="Dissertation",
["en"]="PhD thesis",
["es"]="Tesis doctoral",
@@ -237,6 +299,8 @@ data.labels={
["mk"]="ДокторÑка диÑертација",
["nl"]="Proefschrift",
["pe"]="رساله دکتری",
+ ["sr"]="ДокторÑка диÑертација",
+ ["sr-latn"]="Doktorska disertacija",
},
},
["pp"]={
@@ -246,10 +310,14 @@ data.labels={
["et"]="lk-d",
["mk"]="ÑÑ‚Ñ€.",
["pe"]="صص",
+ ["sr"]="ÑÑ‚Ñ€.",
+ ["sr-latn"]="str.",
},
},
["technicalreport"]={
["labels"]={
+ ["be"]="ТÑхнічны даклад",
+ ["bg"]="техничеÑки доклад",
["de"]="Technischer Bericht",
["en"]="Technical report",
["es"]="Informe técnico",
@@ -259,20 +327,28 @@ data.labels={
["mk"]="Технички извештај",
["nl"]="Technisch rapport",
["pe"]="گزارش ÙÙ†ÛŒ",
+ ["sr"]="Технички извештај",
+ ["sr-latn"]="TehniÄki izveÅ¡taj",
},
},
["volume"]={
["labels"]={
+ ["be"]="гучнаÑць",
+ ["bg"]="обем",
["de"]="Band",
["en"]="volume",
["et"]="köide",
["mk"]="том",
["nl"]="deel",
["pe"]="جلد",
+ ["sr"]="том",
+ ["sr-latn"]="tom",
},
},
["with"]={
["labels"]={
+ ["be"]="з",
+ ["bg"]="ÑÑŠÑ",
["de"]="mit",
["en"]="with",
["es"]="con",
@@ -281,177 +357,213 @@ data.labels={
["it"]="con",
["mk"]="Ñо",
["nl"]="met",
+ ["sr"]="Ñа",
+ ["sr-latn"]="sa",
},
},
},
["functions"]={
["Pr"]={
["labels"]={
- ["cz"]="P",
+ ["cs"]="P",
["en"]="Pr",
- ["mk"]="P",
+ ["mk"]="P",
["sk"]="P",
+ ["sr"]="P",
+ ["sr-latn"]="P",
},
},
["arccos"]={
["labels"]={
- ["cz"]="arccos",
+ ["cs"]="arccos",
["en"]="arccos",
["es"]="arc\\sixperemspace cos",
["hr"]="arc\\sixperemspace cos",
- ["mk"]="arccos",
+ ["mk"]="arccos",
["pl"]="arc\\sixperemspace cos",
["sk"]="arccos",
+ ["sr"]="arccos",
+ ["sr-latn"]="arccos",
},
},
["arccosh"]={
["labels"]={
- ["cz"]="arccosh",
+ ["cs"]="arccosh",
["en"]="arccosh",
["es"]="arc\\sixperemspace cosh",
["hr"]="arc\\sixperemspace cosh",
- ["mk"]="arccosh",
+ ["mk"]="arccosh",
["pl"]="arc\\sixperemspace cosh",
["sk"]="arccosh",
+ ["sr"]="arccosh",
+ ["sr-latn"]="arccosh",
},
},
["arcctg"]={
["labels"]={
- ["cz"]="arccotg",
+ ["cs"]="arccotg",
["en"]="arccot",
["es"]="arc\\sixperemspace cot",
["hr"]="arc\\sixperemspace ctg",
- ["mk"]="arccotg",
+ ["mk"]="arccotg",
["pl"]="arc\\sixperemspace ctg",
["sk"]="arccotg",
+ ["sr"]="arcctg",
+ ["sr-latn"]="arcctg",
},
},
["arcsin"]={
["labels"]={
- ["cz"]="arcsin",
+ ["cs"]="arcsin",
["en"]="arcsin",
["es"]="arc\\sixperemspace sen",
["hr"]="arc\\sixperemspace sin",
- ["mk"]="arcsin",
+ ["mk"]="arcsin",
["pl"]="arc\\sixperemspace sin",
["sk"]="arcsin",
+ ["sr"]="arcsin",
+ ["sr-latn"]="arcsin",
},
},
["arcsinh"]={
["labels"]={
- ["cz"]="arcsinh",
+ ["cs"]="arcsinh",
["en"]="arcsinh",
["es"]="arc\\sixperemspace senh",
["hr"]="arc\\sixperemspace sinh",
- ["mk"]="arcsinh",
+ ["mk"]="arcsinh",
["pl"]="arc\\sixperemspace sinh",
["sk"]="arcsinh",
+ ["sr"]="arcsinh",
+ ["sr-latn"]="arcsinh",
},
},
["arctan"]={
["labels"]={
- ["cz"]="arctg",
+ ["cs"]="arctg",
["en"]="arctan",
["es"]="arc\\sixperemspace tan",
["hr"]="arc\\sixperemspace tg",
- ["mk"]="arctg",
+ ["mk"]="arctg",
["pl"]="arc\\sixperemspace tg",
["sk"]="arctg",
+ ["sr"]="arctg",
+ ["sr-latn"]="arctg",
},
},
["arctanh"]={
["labels"]={
- ["cz"]="arctgh",
+ ["cs"]="arctgh",
["en"]="arctanh",
["es"]="arc\\sixperemspace tanh",
["hr"]="arc\\sixperemspace tgh",
- ["mk"]="arctgh",
+ ["mk"]="arctgh",
["pl"]="arc\\sixperemspace tgh",
["sk"]="arctgh",
+ ["sr"]="arctgh",
+ ["sr-latn"]="arctgh",
},
},
["arg"]={
["labels"]={
- ["cz"]="arg",
+ ["cs"]="arg",
["en"]="arg",
["es"]="arg",
- ["mk"]="arg",
+ ["mk"]="arg",
["sk"]="arg",
+ ["sr"]="arg",
+ ["sr-latn"]="arg",
},
},
["cos"]={
["labels"]={
- ["cz"]="cos",
+ ["cs"]="cos",
["en"]="cos",
["es"]="cos",
- ["mk"]="cos",
+ ["mk"]="cos",
["sk"]="cos",
+ ["sr"]="cos",
+ ["sr-latn"]="cos",
},
},
["cosh"]={
["labels"]={
- ["cz"]="cosh",
+ ["cs"]="cosh",
["en"]="cosh",
["es"]="cosh",
- ["mk"]="cosh",
+ ["mk"]="cosh",
["sk"]="cosh",
+ ["sr"]="cosh",
+ ["sr-latn"]="cosh",
},
},
["cot"]={
["labels"]={
- ["cz"]="cotg",
+ ["cs"]="cotg",
["en"]="cot",
["es"]="cot",
["hr"]="ctg",
- ["mk"]="ctg",
+ ["mk"]="ctg",
["pl"]="ctg",
["sk"]="cotg",
+ ["sr"]="ctg",
+ ["sr-latn"]="ctg",
},
},
["coth"]={
["labels"]={
- ["cz"]="cotgh",
+ ["cs"]="cotgh",
["en"]="coth",
["es"]="coth",
- ["mk"]="ctgh",
+ ["mk"]="ctgh",
["sk"]="cotgh",
+ ["sr"]="ctgh",
+ ["sr-latn"]="ctgh",
},
},
["csc"]={
["labels"]={
- ["cz"]="cosec",
+ ["cs"]="cosec",
["en"]="csc",
["es"]="csc",
- ["mk"]="cosec",
+ ["mk"]="cosec",
["sk"]="cosec",
+ ["sr"]="cosec",
+ ["sr-latn"]="cosec",
},
},
["ctg"]={
["labels"]={
- ["cz"]="cotg",
+ ["cs"]="cotg",
["en"]="cot",
["es"]="cot",
["hr"]="ctg",
- ["mk"]="ctg",
+ ["mk"]="ctg",
["pl"]="ctg",
["sk"]="cotg",
+ ["sr"]="ctg",
+ ["sr-latn"]="ctg",
},
},
["deg"]={
["labels"]={
- ["cz"]="deg",
+ ["cs"]="deg",
["en"]="deg",
["es"]="gr",
- ["mk"]="deg",
+ ["mk"]="deg",
["sk"]="deg",
+ ["sr"]="deg",
+ ["sr-latn"]="deg",
},
},
["det"]={
["labels"]={
- ["cz"]="det",
+ ["cs"]="det",
["en"]="det",
["es"]="det",
["sk"]="det",
+ ["sr"]="det",
+ ["sr-latn"]="det",
},
},
["diff"]={
@@ -461,35 +573,41 @@ data.labels={
},
["dim"]={
["labels"]={
- ["cz"]="dim",
+ ["cs"]="dim",
["en"]="dim",
["es"]="dim",
- ["mk"]="dim",
+ ["mk"]="dim",
["sk"]="dim",
+ ["sr"]="dim",
+ ["sr-latn"]="dim",
},
},
["exp"]={
["labels"]={
- ["cz"]="exp",
+ ["cs"]="exp",
["en"]="exp",
["es"]="exp",
["sk"]="exp",
+ ["sr"]="exp",
+ ["sr-latn"]="exp",
},
},
["gcd"]={
["labels"]={
- ["cz"]="NSD",
+ ["cs"]="NSD",
["en"]="gcd",
["es"]="mcd",
["hr"]="nzd",
- ["mk"]="ÐЗД",
+ ["mk"]="ÐЗД",
["nl"]="ggd",
["sk"]="NSD",
+ ["sr"]="ÐЗД",
+ ["sr-latn"]="NZD",
},
},
["hom"]={
["labels"]={
- ["cz"]="Hom",
+ ["cs"]="Hom",
["en"]="hom",
["es"]="hom",
["sk"]="Hom",
@@ -497,207 +615,237 @@ data.labels={
},
["inf"]={
["labels"]={
- ["cz"]="inf",
+ ["cs"]="inf",
["en"]="inf",
["es"]="inf",
- ["mk"]="inf",
+ ["mk"]="inf",
["sk"]="inf",
+ ["sr"]="inf",
+ ["sr-latn"]="inf",
},
},
["injlim"]={
["labels"]={
- ["cz"]="inj\\sixperemspace lim",
+ ["cs"]="inj\\sixperemspace lim",
["en"]="inj\\sixperemspace lim",
["es"]="lím\\sixperemspace iny",
["sk"]="inj\\sixperemspace lim",
+ ["sr"]="inj\\sixperemspace lim",
+ ["sr-latn"]="inj\\sixperemspace lim",
},
},
["ker"]={
["labels"]={
- ["cz"]="ker",
+ ["cs"]="ker",
["en"]="ker",
["es"]="Ker",
["sk"]="ker",
+ ["sr"]="ker",
+ ["sr-latn"]="ker",
},
},
["lcm"]={
["labels"]={
- ["cz"]="NSN",
+ ["cs"]="NSN",
["en"]="lcm",
["es"]="MCM",
["hr"]="nzv",
- ["mk"]="ÐЗС",
+ ["mk"]="ÐЗС",
["nl"]="kgv",
["sk"]="NSN",
+ ["sr"]="ÐЗС",
+ ["sr-latn"]="NZS",
},
},
["lg"]={
["labels"]={
- ["cz"]="log",
+ ["cs"]="log",
["en"]="lg",
["es"]="log",
- ["mk"]="lg",
+ ["mk"]="lg",
["sk"]="log",
+ ["sr"]="lg",
+ ["sr-latn"]="lg",
},
},
["lim"]={
["labels"]={
- ["cz"]="lim",
+ ["cs"]="lim",
["en"]="lim",
["es"]="lím",
- ["mk"]="lim",
+ ["mk"]="lim",
["sk"]="lim",
+ ["sr"]="lim",
+ ["sr-latn"]="lim",
},
},
["liminf"]={
["labels"]={
- ["cz"]="lim\\sixperemspace inf",
+ ["cs"]="lim\\sixperemspace inf",
["en"]="lim\\sixperemspace inf",
["es"]="lím\\sixperemspace inf",
- ["mk"]="lim\\sixperemspace inf",
+ ["mk"]="lim\\sixperemspace inf",
["sk"]="lim\\sixperemspace inf",
+ ["sr"]="lim\\sixperemspace inf",
+ ["sr-latn"]="lim\\sixperemspace inf",
},
},
["limsup"]={
["labels"]={
- ["cz"]="lim\\sixperemspace sup",
+ ["cs"]="lim\\sixperemspace sup",
["en"]="lim\\sixperemspace sup",
["es"]="lím\\sixperemspace sup",
- ["mk"]="lim\\sixperemspace sup",
+ ["mk"]="lim\\sixperemspace sup",
["sk"]="lim\\sixperemspace sup",
+ ["sr"]="lim\\sixperemspace sup",
+ ["sr-latn"]="lim\\sixperemspace sup",
},
},
["ln"]={
["labels"]={
- ["cz"]="ln",
+ ["cs"]="ln",
["en"]="ln",
["es"]="ln",
- ["mk"]="ln",
+ ["mk"]="ln",
["sk"]="ln",
+ ["sr"]="ln",
+ ["sr-latn"]="ln",
},
},
["log"]={
["labels"]={
- ["cz"]="log",
+ ["cs"]="log",
["en"]="log",
["es"]="log",
- ["mk"]="log",
+ ["mk"]="log",
["sk"]="log",
+ ["sr"]="log",
+ ["sr-latn"]="log",
},
},
["max"]={
["labels"]={
- ["cz"]="max",
+ ["cs"]="max",
["en"]="max",
["es"]="máx",
- ["mk"]="max",
+ ["mk"]="max",
["sk"]="max",
+ ["sr"]="max",
+ ["sr-latn"]="max",
},
},
["median"]={
["labels"]={
- ["cz"]="\\tilde",
+ ["cs"]="\\tilde",
["en"]="median",
["es"]="Mediana",
["sk"]="\\tilde",
+ ["sr"]="median",
+ ["sr-latn"]="median",
},
},
["min"]={
["labels"]={
- ["cz"]="min",
+ ["cs"]="min",
["en"]="min",
["es"]="mín",
- ["mk"]="min",
+ ["mk"]="min",
["sk"]="min",
+ ["sr"]="min",
+ ["sr-latn"]="min",
},
},
["mod"]={
["labels"]={
- ["cz"]="mod",
+ ["cs"]="mod",
["en"]="mod",
["es"]="mod",
- ["mk"]="mod",
+ ["mk"]="mod",
["sk"]="mod",
+ ["sr"]="mod",
+ ["sr-latn"]="mod",
},
},
["projlim"]={
["labels"]={
- ["cz"]="proj\\sixperemspace lim",
+ ["cs"]="proj\\sixperemspace lim",
["en"]="proj\\sixperemspace lim",
["es"]="lím\\sixperemspace proy",
["sk"]="proj\\sixperemspace lim",
+ ["sr"]="proj\\sixperemspace lim",
+ ["sr-latn"]="proj\\sixperemspace lim",
},
},
["sec"]={
["labels"]={
- ["cz"]="sec",
+ ["cs"]="sec",
["en"]="sec",
["es"]="sec",
- ["mk"]="sec",
+ ["mk"]="sec",
["sk"]="sec",
+ ["sr"]="sec",
+ ["sr-latn"]="sec",
},
},
["sin"]={
["labels"]={
- ["cz"]="sin",
+ ["cs"]="sin",
["en"]="sin",
["es"]="sen",
- ["mk"]="sin",
+ ["mk"]="sin",
["sk"]="sin",
+ ["sr"]="sin",
+ ["sr-latn"]="sin",
},
},
["sinh"]={
["labels"]={
- ["cz"]="sinh",
+ ["cs"]="sinh",
["en"]="sinh",
["es"]="senh",
- ["mk"]="sinh",
+ ["mk"]="sinh",
["sk"]="sinh",
+ ["sr"]="sinh",
+ ["sr-latn"]="sinh",
},
},
["sup"]={
["labels"]={
- ["cz"]="sup",
+ ["cs"]="sup",
["en"]="sup",
["es"]="sup",
- ["mk"]="sup",
+ ["mk"]="sup",
["sk"]="sup",
+ ["sr"]="sup",
+ ["sr-latn"]="sup",
},
},
["tan"]={
["labels"]={
- ["cz"]="tg",
+ ["cs"]="tg",
["en"]="tan",
["es"]="tan",
["hr"]="tg",
["mk"]="tg",
["pl"]="tg",
["sk"]="tg",
+ ["sr"]="tg",
+ ["sr-latn"]="tg",
},
},
["tanh"]={
["labels"]={
- ["cz"]="tgh",
+ ["cs"]="tgh",
["en"]="tanh",
["es"]="tanh",
- ["mk"]="tgh",
+ ["mk"]="tgh",
["sk"]="tgh",
+ ["sr"]="tgh",
+ ["sr-latn"]="tgh",
},
},
},
["texts"]={
- ["following:singular"]={
- ["labels"]={
- ["en"]="f.",
- ["fr"]=hairspace .. "sq",
- },
- },
- ["following:plural"]={
- ["labels"]={
- ["en"]="ff.",
- ["fr"]=hairspace .. "sqq",
- },
- },
["and"]={
["labels"]={
["af"]="",
@@ -727,6 +875,7 @@ data.labels={
["ru"]="",
["sk"]=" a ",
["sl"]="",
+ ["sr"]=" и ",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -739,6 +888,7 @@ data.labels={
["labels"]={
["af"]="Bylae ",
["ar"]="ملحق ",
+ ["be"]="Ðпендыцыт",
["ca"]="Apèndix ",
["cn"]="附录",
["cs"]="Příloha ",
@@ -768,6 +918,8 @@ data.labels={
["ru"]="",
["sk"]="Príloha ",
["sl"]="Dodatek ",
+ ["sr"]="Додатак ",
+ ["sr-latn"]="Dodatak ",
["sv"]="",
["tk"]="Goşmaça",
["tr"]="",
@@ -781,6 +933,8 @@ data.labels={
["ar"]="أبريل",
["ar-dz"]="Ø£Ùريل",
["ar-sy"]="نيسان",
+ ["be"]="краÑавіка",
+ ["bg"]="април",
["ca"]="abril",
["cn"]="四月",
["cs"]="dubna",
@@ -799,8 +953,8 @@ data.labels={
["kr"]="4",
["la"]="Aprilis",
["lt"]="balandžio",
- ["nb"]="april",
["mk"]="април",
+ ["nb"]="april",
["nl"]="april",
["nn"]="april",
["pe"]="آوریل",
@@ -810,6 +964,8 @@ data.labels={
["ru"]="апрелÑ",
["sk"]="apríla",
["sl"]="april",
+ ["sr"]="aприл",
+ ["sr-latn"]="april",
["sv"]="april",
["tk"]="aprel",
["tr"]="nisan",
@@ -829,7 +985,7 @@ data.labels={
["ca"]="",
["cs"]="dub.",
["da"]="",
- ["de"]="",
+ ["de"]="Apr.",
["en"]="apr",
["es"]="abr.",
["et"]="apr",
@@ -851,6 +1007,8 @@ data.labels={
["ru"]="",
["sk"]="apr.",
["sl"]="",
+ ["sr"]="апр.",
+ ["sr-latn"]="apr.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -888,6 +1046,8 @@ data.labels={
["ru"]="на Ñтранице ",
["sk"]="na strane ",
["sl"]="na strani ",
+ ["sr"]="на Ñтраници ",
+ ["sr-latn"]="na stranici ",
["sv"]="på sida ",
["tk"]="",
["tr"]="",
@@ -902,6 +1062,8 @@ data.labels={
["ar-dz"]="أوت",
["ar-ma"]="غشت",
["ar-sy"]="آب",
+ ["be"]="жнівнÑ",
+ ["bg"]="авгуÑÑ‚",
["ca"]="agost",
["cn"]="八月",
["cs"]="srpna",
@@ -931,6 +1093,8 @@ data.labels={
["ru"]="авгуÑта",
["sk"]="augusta",
["sl"]="avgust",
+ ["sr"]="авгуÑÑ‚",
+ ["sr-latn"]="avgust",
["sv"]="augusti",
["tk"]="awgust",
["tr"]="aÄŸustos",
@@ -950,7 +1114,7 @@ data.labels={
["ca"]="",
["cs"]="srp.",
["da"]="",
- ["de"]="",
+ ["de"]="Aug.",
["en"]="aug",
["es"]="ago.",
["et"]="aug",
@@ -972,6 +1136,8 @@ data.labels={
["ru"]="",
["sk"]="aug.",
["sl"]="",
+ ["sr"]="авг.",
+ ["sr-latn"]="avg.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -984,6 +1150,8 @@ data.labels={
["labels"]={
["af"]="Hoofstuk ",
["ar"]="باب ",
+ ["be"]="Глава ",
+ ["bg"]="Eпизод ",
["ca"]="Capítol ",
["cn"]={ "第", "章" },
["cs"]="Kapitola ",
@@ -1013,6 +1181,9 @@ data.labels={
["ru"]="",
["sk"]="Kapitola ",
["sl"]="Poglavje ",
+ ["sr"]="Поглавље ",
+ ["sr"]="Глава ",
+ ["sr-latn"]="Glava ",
["sv"]="",
["tk"]="Bap",
["tr"]="",
@@ -1023,6 +1194,8 @@ data.labels={
["continued"]={
["labels"]={
["af"]="",
+ ["be"]=" (працÑг)",
+ ["bg"]=" (продължение)",
["ca"]="",
["cs"]=" (pokraÄování)",
["da"]="",
@@ -1049,6 +1222,9 @@ data.labels={
["ru"]="",
["sk"]=" (pokraÄovanie)",
["sl"]="",
+ ["sr"]=" (наÑтавио)",
+ ["sr"]=" (наÑтавак)",
+ ["sr-latn"]=" (nastavak)",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1058,12 +1234,15 @@ data.labels={
},
["day"]={
["labels"]={
+ ["bg"]="ден",
["en"]="day",
["et"]="päev",
["kr"]="ì¼",
["mk"]="ден",
["nl"]="dag",
["pe"]="روز",
+ ["sr"]="дан",
+ ["sr-latn"]="dan",
},
},
["december"]={
@@ -1072,6 +1251,8 @@ data.labels={
["ar"]="ديسمبر",
["ar-ma"]="دجنبر",
["ar-sy"]="كانون الأول",
+ ["be"]="ÑнежнÑ",
+ ["bg"]="декември",
["ca"]="desembre",
["cn"]="å二月",
["cs"]="prosince",
@@ -1090,8 +1271,8 @@ data.labels={
["kr"]="12",
["la"]="December",
["lt"]="gruodžio",
- ["nb"]="desember",
["mk"]="декември",
+ ["nb"]="desember",
["nl"]="december",
["nn"]="desember",
["pe"]="دسامبر",
@@ -1101,6 +1282,8 @@ data.labels={
["ru"]="декабрÑ",
["sk"]="decembra",
["sl"]="december",
+ ["sr"]="децембар",
+ ["sr-latn"]="decembar",
["sv"]="december",
["tk"]="dekabr",
["tr"]="aralık",
@@ -1120,7 +1303,7 @@ data.labels={
["ca"]="",
["cs"]="pros.",
["da"]="",
- ["de"]="",
+ ["de"]="Dez.",
["en"]="dec",
["es"]="dic.",
["et"]="dets",
@@ -1142,6 +1325,8 @@ data.labels={
["ru"]="",
["sk"]="dec.",
["sl"]="",
+ ["sr"]="дец.",
+ ["sr-latn"]="dec.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1155,6 +1340,8 @@ data.labels={
["ar"]="Ùبراير",
["ar-dz"]="ÙÙŠÙري",
["ar-sy"]="شباط",
+ ["be"]="лютага",
+ ["bg"]="февруари",
["ca"]="febrer",
["cn"]="二月",
["cs"]="února",
@@ -1184,6 +1371,8 @@ data.labels={
["ru"]="февралÑ",
["sk"]="februára",
["sl"]="februar",
+ ["sr"]="фебруар",
+ ["sr-latn"]="februar",
["sv"]="februari",
["tk"]="fewral",
["tr"]="Åžubat",
@@ -1203,7 +1392,7 @@ data.labels={
["ca"]="",
["cs"]="ún.",
["da"]="",
- ["de"]="",
+ ["de"]="Feb.",
["en"]="feb",
["es"]="feb.",
["et"]="veebr",
@@ -1225,6 +1414,8 @@ data.labels={
["ru"]="",
["sk"]="feb.",
["sl"]="",
+ ["sr"]="феб.",
+ ["sr-latn"]="feb.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1236,6 +1427,8 @@ data.labels={
["labels"]={
["af"]="Figuur ",
["ar"]="شكل ",
+ ["be"]="Малюнак",
+ ["bg"]="Фигура",
["ca"]="Figura ",
["cn"]="图",
["cs"]="Obrázek ",
@@ -1265,6 +1458,8 @@ data.labels={
["ru"]="РиÑунок ",
["sk"]="Obrázok ",
["sl"]="Slika ",
+ ["sr"]="Слика ",
+ ["sr-latn"]="Slika ",
["sv"]="Figur ",
["tk"]="Surat",
["tr"]="Åžekil ",
@@ -1272,6 +1467,18 @@ data.labels={
["vi"]="Hình ",
},
},
+ ["following:plural"]={
+ ["labels"]={
+ ["en"]="ff.",
+ ["fr"]=hairspace .. "sqq",
+ },
+ },
+ ["following:singular"]={
+ ["labels"]={
+ ["en"]="f.",
+ ["fr"]=hairspace .. "sq",
+ },
+ },
["followingpage"]={
["labels"]={
["en"]="on a following page",
@@ -1279,12 +1486,16 @@ data.labels={
["mk"]="на Ñледната Ñтраница",
["nl"]="op een volgende bladzijde",
["pe"]="در صÙحات آینده",
+ ["sr"]="на Ñледећој Ñтраници",
+ ["sr-latn"]="na sledećoj stranici",
},
},
["friday"]={
["labels"]={
["af"]="vrydag",
["ar"]="الجمعة",
+ ["be"]="пÑтніца",
+ ["bg"]="петък",
["ca"]="divendres",
["cn"]="星期五",
["cs"]="pátek",
@@ -1314,6 +1525,8 @@ data.labels={
["ru"]="пÑтница",
["sk"]="piatok",
["sl"]="petek",
+ ["sr"]="петак",
+ ["sr-latn"]="petak",
["sv"]="fredag",
["tk"]="bäşinji gün",
["tr"]="cuma",
@@ -1321,10 +1534,20 @@ data.labels={
["vi"]="thứ sáu",
},
},
+ ["friday:mnem"]={
+ ["labels"]={
+ ["de"]="Fr.",
+ ["en"]="fri",
+ ["sr"]="пет.",
+ ["sr-latn"]="pet.",
+ },
+ },
["graphic"]={
["labels"]={
["af"]="Grafiek ",
["ar"]="رسم ",
+ ["be"]="Графіка ",
+ ["bg"]="Графичен ",
["ca"]="Gràfica ",
["cn"]="æ’图",
["cs"]="Graf ",
@@ -1353,6 +1576,8 @@ data.labels={
["ru"]="График ",
["sk"]="Graf ",
["sl"]="Slika ",
+ ["sr"]="График ",
+ ["sr-latn"]="Grafik ",
["sv"]="Grafik ",
["tk"]="Grafik",
["tr"]="Grafik",
@@ -1364,6 +1589,7 @@ data.labels={
["labels"]={
["af"]="",
["ar"]="كما وضحنا سابقا",
+ ["be"]="Графіка",
["ca"]="",
["cs"]="viz výše",
["da"]="se foroven",
@@ -1391,6 +1617,9 @@ data.labels={
["ru"]="Ñм. выше",
["sk"]="pozri hore",
["sl"]="glej zgoraj",
+ ["sr"]="види горе",
+ ["sr"]="као што је показано изнад",
+ ["sr-latn"]="kao Å¡to je pokazano iznad",
["sv"]="se ovan",
["tk"]="",
["tr"]="",
@@ -1402,6 +1631,8 @@ data.labels={
["labels"]={
["af"]="",
["ar"]="كما نوضح لاحقا",
+ ["be"]="гл. вышÑй",
+ ["bg"]="ў далейшым",
["ca"]="",
["cs"]="viz níže",
["da"]="se forneden",
@@ -1429,6 +1660,9 @@ data.labels={
["ru"]="Ñм. ниже",
["sk"]="pozri Äalej",
["sl"]="glej spodaj",
+ ["sr"]="види доле",
+ ["sr"]="као што је показано ниже",
+ ["sr-latn"]="kao što je pokazano niže",
["sv"]="se nedan",
["tk"]="",
["tr"]="",
@@ -1440,6 +1674,8 @@ data.labels={
["labels"]={
["af"]="Intermezzo ",
["ar"]="Ùسحة ",
+ ["be"]="УÑтаўка",
+ ["bg"]="Aнтракт ",
["ca"]="Intermedi ",
["cn"]="퉣",
["cs"]="Intermezzo ",
@@ -1468,6 +1704,9 @@ data.labels={
["ru"]="Ð’Ñтавка ",
["sk"]="Intermezzo ",
["sl"]="Intermezzo ",
+ ["sr"]="Интермеззо ",
+ ["sr"]="ДигреÑија ",
+ ["sr-latn"]="Digresija ",
["sv"]="Intermezzo ",
["tk"]="Arakesme",
["tr"]="",
@@ -1481,6 +1720,8 @@ data.labels={
["ar"]="يناير",
["ar-dz"]="جانÙÙŠ",
["ar-sy"]="كانون الثاني",
+ ["be"]="ÑтудзенÑ",
+ ["bg"]="Ñнуари",
["ca"]="gener",
["cn"]="一月",
["cs"]="ledna",
@@ -1510,6 +1751,8 @@ data.labels={
["ru"]="ÑнварÑ",
["sk"]="januára",
["sl"]="januar",
+ ["sr"]="јануар",
+ ["sr-latn"]="januar",
["sv"]="januari",
["tk"]="ýanwar",
["tr"]="ocak",
@@ -1529,7 +1772,7 @@ data.labels={
["ca"]="",
["cs"]="led.",
["da"]="",
- ["de"]="",
+ ["de"]="Jan.",
["en"]="jan",
["es"]="ene.",
["et"]="jaan",
@@ -1551,6 +1794,8 @@ data.labels={
["ru"]="",
["sk"]="jan.",
["sl"]="",
+ ["sr"]="јан.",
+ ["sr-latn"]="jan.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1565,6 +1810,8 @@ data.labels={
["ar-dz"]="جويلة",
["ar-ma"]="يوليوز",
["ar-sy"]="تموز",
+ ["be"]="ліпнÑ",
+ ["bg"]="юли",
["ca"]="juliol",
["cn"]="七月",
["cs"]="Äervence",
@@ -1594,6 +1841,8 @@ data.labels={
["ru"]="июлÑ",
["sk"]="júla",
["sl"]="julij",
+ ["sr"]="jул",
+ ["sr-latn"]="jul",
["sv"]="juli",
["tk"]="iýul",
["tr"]="temmuz",
@@ -1613,7 +1862,7 @@ data.labels={
["ca"]="",
["cs"]="Äce",
["da"]="",
- ["de"]="",
+ ["de"]="Jul.",
["en"]="jul",
["es"]="jul.",
["et"]="juuli",
@@ -1635,6 +1884,8 @@ data.labels={
["ru"]="",
["sk"]="júla",
["sl"]="",
+ ["sr"]="јул.",
+ ["sr-latn"]="jul.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1648,6 +1899,8 @@ data.labels={
["ar"]="يونيو",
["ar-dz"]="جوان",
["ar-sy"]="حزيران",
+ ["be"]="чÑрвнÑ",
+ ["bg"]="юни",
["ca"]="juny",
["cn"]="六月",
["cs"]="Äervna",
@@ -1677,6 +1930,8 @@ data.labels={
["ru"]="июнÑ",
["sk"]="júna",
["sl"]="junij",
+ ["sr"]="јун",
+ ["sr-latn"]="jun",
["sv"]="juni",
["tk"]="iýun",
["tr"]="haziran",
@@ -1696,7 +1951,7 @@ data.labels={
["ca"]="",
["cs"]="Äer.",
["da"]="",
- ["de"]="",
+ ["de"]="Jun.",
["en"]="jun",
["es"]="jun.",
["et"]="juuni",
@@ -1718,6 +1973,8 @@ data.labels={
["ru"]="",
["sk"]="júna",
["sl"]="",
+ ["sr"]="јун",
+ ["sr-latn"]="jun",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1729,6 +1986,8 @@ data.labels={
["labels"]={
["af"]="reël ",
["ar"]="سطر ",
+ ["be"]="радок ",
+ ["bg"]="ред ",
["ca"]="línia ",
["cn"]="行",
["cs"]="řádek ",
@@ -1758,6 +2017,8 @@ data.labels={
["ru"]="Ñтрока ",
["sk"]="riadok ",
["sl"]="vrstica ",
+ ["sr"]="линија ",
+ ["sr-latn"]="linija ",
["sv"]="rad ",
["tk"]="setir",
["tr"]="satır ",
@@ -1769,6 +2030,8 @@ data.labels={
["labels"]={
["af"]="reëls ",
["ar"]="السطور ",
+ ["be"]="радкi ",
+ ["bg"]="редове ",
["ca"]="línies ",
["cn"]="行",
["cs"]="řádky ",
@@ -1798,6 +2061,8 @@ data.labels={
["ru"]="Ñтроки ",
["sk"]="riadky ",
["sl"]="vrstice ",
+ ["sr"]="линије ",
+ ["sr-latn"]="linije ",
["sv"]="rader ",
["tk"]="setirler",
["tr"]="satırlar ",
@@ -1810,6 +2075,8 @@ data.labels={
["af"]="maart",
["ar"]="مارس",
["ar-sy"]="آذار",
+ ["be"]="Ñакавіка",
+ ["bg"]="март",
["ca"]="març",
["cn"]="三月",
["cs"]="března",
@@ -1839,6 +2106,8 @@ data.labels={
["ru"]="марта",
["sk"]="marca",
["sl"]="marec",
+ ["sr"]="март",
+ ["sr-latn"]="mart",
["sv"]="mars",
["tk"]="mart",
["tr"]="mart",
@@ -1858,7 +2127,7 @@ data.labels={
["ca"]="",
["cs"]="břez.",
["da"]="",
- ["de"]="",
+ ["de"]="Mrz.",
["en"]="mar",
["es"]="mar.",
["et"]="märts",
@@ -1880,6 +2149,8 @@ data.labels={
["ru"]="",
["sk"]="mar.",
["sl"]="",
+ ["sr"]="мар.",
+ ["sr-latn"]="mar.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1894,6 +2165,8 @@ data.labels={
["ar-dz"]="ماي",
["ar-ma"]="ماي",
["ar-sy"]="أيار",
+ ["be"]="маÑ",
+ ["bg"]="маӣ",
["ca"]="maig",
["cn"]="五月",
["cs"]="května",
@@ -1923,6 +2196,8 @@ data.labels={
["ru"]="маÑ",
["sk"]="mája",
["sl"]="maj",
+ ["sr"]="мај",
+ ["sr-latn"]="maj",
["sv"]="maj",
["tk"]="maý",
["tr"]="mayıs",
@@ -1942,7 +2217,7 @@ data.labels={
["ca"]="",
["cs"]="květ.",
["da"]="",
- ["de"]="",
+ ["de"]="Mai",
["en"]="may",
["es"]="may.",
["et"]="mai",
@@ -1964,6 +2239,8 @@ data.labels={
["ru"]="",
["sk"]="mája",
["sl"]="",
+ ["sr"]="мај",
+ ["sr-latn"]="maj",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -1975,6 +2252,8 @@ data.labels={
["labels"]={
["af"]="maandag",
["ar"]="الاثنين",
+ ["be"]="панÑдзелак",
+ ["bg"]="понеделник",
["ca"]="dilluns",
["cn"]="星期一",
["cs"]="pondělí",
@@ -2004,6 +2283,8 @@ data.labels={
["ru"]="понедельник",
["sk"]="pondelok",
["sl"]="ponedeljek",
+ ["sr"]="понедељак",
+ ["sr-latn"]="ponedeljak",
["sv"]="måndag",
["tk"]="birinji gün",
["tr"]="pazartesi",
@@ -2011,14 +2292,26 @@ data.labels={
["vi"]="thứ hai",
},
},
+ ["monday:mnem"]={
+ ["labels"]={
+ ["de"]="Mo.",
+ ["en"]="mon",
+ ["sr"]="пон.",
+ ["sr-latn"]="pon.",
+ },
+ },
["month"]={
["labels"]={
+ ["be"]="меÑÑц",
+ ["bg"]="меÑец",
["en"]="month",
["et"]="kuu",
["kr"]="ì›”",
["mk"]="меÑец",
["nl"]="maand",
["pe"]="ماه",
+ ["sr"]="меÑец",
+ ["sr-latn"]="mesec",
},
},
["november"]={
@@ -2027,6 +2320,8 @@ data.labels={
["ar"]="نوÙمبر",
["ar-ma"]="نونبر",
["ar-sy"]="تشرين الثاني",
+ ["be"]="ліÑтапада",
+ ["bg"]="ноември",
["ca"]="novembre",
["cn"]="å一月",
["cs"]="listopadu",
@@ -2056,6 +2351,8 @@ data.labels={
["ru"]="ноÑбрÑ",
["sk"]="novembra",
["sl"]="november",
+ ["sr"]="новембар",
+ ["sr-latn"]="novembar",
["sv"]="november",
["tk"]="noýabr",
["tr"]="kasım",
@@ -2075,7 +2372,7 @@ data.labels={
["ca"]="",
["cs"]="list.",
["da"]="",
- ["de"]="",
+ ["de"]="Nov.",
["en"]="nov",
["es"]="nov.",
["et"]="nov",
@@ -2097,6 +2394,8 @@ data.labels={
["ru"]="",
["sk"]="nov.",
["sl"]="",
+ ["sr"]="нов.",
+ ["sr-latn"]="nov.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -2109,6 +2408,8 @@ data.labels={
["af"]="oktober",
["ar"]="أكتوبر",
["ar-sy"]="تشرين الأول",
+ ["be"]="каÑтрычніка",
+ ["bg"]="октомври",
["ca"]="octubre",
["cn"]="å月",
["cs"]="října",
@@ -2138,6 +2439,8 @@ data.labels={
["ru"]="октÑбрÑ",
["sk"]="októbra",
["sl"]="oktober",
+ ["sr"]="октобар",
+ ["sr-latn"]="oktobar",
["sv"]="oktober",
["tk"]="oktýabr",
["tr"]="ekim",
@@ -2157,7 +2460,7 @@ data.labels={
["ca"]="",
["cs"]="říj.",
["da"]="",
- ["de"]="",
+ ["de"]="Okt.",
["en"]="oct",
["es"]="oct.",
["et"]="okt",
@@ -2179,6 +2482,8 @@ data.labels={
["ru"]="",
["sk"]="okt.",
["sl"]="",
+ ["sr"]="окт.",
+ ["sr-latn"]="okt.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -2190,6 +2495,8 @@ data.labels={
["labels"]={
["af"]="",
["ar"]="صÙحة ",
+ ["be"]="Ñтаронка ",
+ ["bg"]="Ñтрана",
["ca"]="",
["cs"]="strana ",
["da"]="Side ",
@@ -2217,6 +2524,8 @@ data.labels={
["ru"]="Ñтраница ",
["sk"]="strana ",
["sl"]="stran ",
+ ["sr"]="Ñтраница ",
+ ["sr-latn"]="stranica ",
["sv"]="Sida ",
["tk"]="",
["tr"]="",
@@ -2228,6 +2537,8 @@ data.labels={
["labels"]={
["af"]="Deel ",
["ar"]="جزء ",
+ ["be"]="ЧаÑтка ",
+ ["bg"]="ЧаÑтка ",
["ca"]="Part ",
["cn"]={ "第", "部分" },
["cs"]="Část ",
@@ -2257,6 +2568,8 @@ data.labels={
["ru"]="ЧаÑÑ‚ÑŒ ",
["sk"]="Časť ",
["sl"]="Del ",
+ ["sr"]="Део ",
+ ["sr-latn"]="Deo ",
["sv"]="Del ",
["tk"]="Bölüm",
["tr"]="Cilt ",
@@ -2271,12 +2584,16 @@ data.labels={
["mk"]="на претходната Ñтраница",
["nl"]="op een voorgaande bladzijde",
["pe"]="در صÙحات گذشته",
+ ["sr"]="на претходној Ñтраници",
+ ["sr-latn"]="na prethodnoj stranici",
},
},
["saturday"]={
["labels"]={
["af"]="saterdag",
["ar"]="السبت",
+ ["be"]="Ñубота",
+ ["bg"]="ÑÑ€Ñда",
["ca"]="dissabte",
["cn"]="星期六",
["cs"]="sobota",
@@ -2306,6 +2623,8 @@ data.labels={
["ru"]="Ñуббота",
["sk"]="sobota",
["sl"]="sobota",
+ ["sr"]="Ñубота",
+ ["sr-latn"]="subota",
["sv"]="lördag",
["tk"]="altynjy gün",
["tr"]="cumartesi",
@@ -2313,11 +2632,20 @@ data.labels={
["vi"]="thứ bảy",
},
},
+ ["saturday:mnem"]={
+ ["labels"]={
+ ["de"]="Sa.",
+ ["en"]="sat",
+ ["sr"]="Ñуб.",
+ ["sr-latn"]="sub.",
+ },
+ },
["section"]={
["hidden"]=true,
["labels"]={
["af"]="Paragraaf ",
["ar"]="Ùصل ",
+ ["bg"]="CÐµÐºÑ†Ð¸Ñ ",
["ca"]="Secció ",
["cn"]={ "第", "节" },
["cs"]="Sekce ",
@@ -2336,8 +2664,8 @@ data.labels={
["kr"]={ "제", "절" },
["la"]="",
["lt"]="",
- ["nb"]="",
["mk"]="Поглавје ",
+ ["nb"]="",
["nl"]="",
["nn"]="",
["pe"]="بخش ",
@@ -2347,6 +2675,8 @@ data.labels={
["ru"]="",
["sk"]="Sekcia ",
["sl"]="",
+ ["sr"]="Одељак ",
+ ["sr-latn"]="Odeljak ",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -2358,6 +2688,8 @@ data.labels={
["labels"]={
["af"]="",
["ar"]="انظر ",
+ ["be"]="гл. ",
+ ["bg"]="погледни",
["ca"]="",
["cs"]="viz ",
["da"]="se ",
@@ -2385,6 +2717,8 @@ data.labels={
["ru"]="Ñм. ",
["sk"]="pozri ",
["sl"]="glej ",
+ ["sr"]="види ",
+ ["sr-latn"]="vidi ",
["sv"]="se ",
["tk"]="",
["tr"]="",
@@ -2398,6 +2732,8 @@ data.labels={
["ar"]="سبتمبر",
["ar-ma"]="شتنبر",
["ar-sy"]="أيلول",
+ ["be"]="вераÑнÑ",
+ ["bg"]="Ñептември",
["ca"]="setembre",
["cn"]="ä¹æœˆ",
["cs"]="září",
@@ -2427,6 +2763,8 @@ data.labels={
["ru"]="ÑентÑбрÑ",
["sk"]="septembra",
["sl"]="september",
+ ["sr"]="Ñептембар",
+ ["sr-latn"]="septembar",
["sv"]="september",
["tk"]="sentýabr",
["tr"]="eylül",
@@ -2446,7 +2784,7 @@ data.labels={
["ca"]="",
["cs"]="září",
["da"]="",
- ["de"]="",
+ ["de"]="Sep.",
["en"]="sep",
["es"]="sep.",
["et"]="sept",
@@ -2468,6 +2806,8 @@ data.labels={
["ru"]="",
["sk"]="sept.",
["sl"]="",
+ ["sr"]="Ñеп.",
+ ["sr-latn"]="sep.",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -2480,6 +2820,7 @@ data.labels={
["labels"]={
["af"]="",
["ar"]="Ùصل أدنى ",
+ ["bg"]="ПодÑÐµÐºÑ†Ð¸Ñ ",
["ca"]="Subsecció ",
["cn"]="",
["cs"]="Podsekce ",
@@ -2508,6 +2849,8 @@ data.labels={
["ru"]="",
["sk"]="Podsekcia ",
["sl"]="",
+ ["sr"]="Пододељак ",
+ ["sr-latn"]="Pododeljak ",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -2520,6 +2863,7 @@ data.labels={
["labels"]={
["af"]="",
["ar"]="Ùصل أدنى أدنى ",
+ ["bg"]="ПодподÑÐµÐºÑ†Ð¸Ñ ",
["ca"]="Subsubsecció ",
["cn"]="",
["cs"]="Podpodsekce ",
@@ -2548,6 +2892,8 @@ data.labels={
["ru"]="",
["sk"]="Podpodsekcia ",
["sl"]="",
+ ["sr"]="Подпододељак ",
+ ["sr-latn"]="Podpododeljak ",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -2560,6 +2906,7 @@ data.labels={
["labels"]={
["af"]="",
["ar"]="Ùصل أدنى أدنى أدنى ",
+ ["bg"]="ПодподподÑÐµÐºÑ†Ð¸Ñ ",
["ca"]="Subsubsubsecció ",
["cn"]="",
["cs"]="Podpodpodsekce ",
@@ -2588,6 +2935,8 @@ data.labels={
["ru"]="",
["sk"]="Podpodpodsekcia ",
["sl"]="",
+ ["sr"]="Подподпододељак ",
+ ["sr-latn"]="Podpodpododeljak ",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -2599,6 +2948,8 @@ data.labels={
["labels"]={
["af"]="sondag",
["ar"]="الأحد",
+ ["be"]="нÑдзелÑ",
+ ["bg"]="неделÑ",
["ca"]="diumenge",
["cn"]="星期日",
["cs"]="neděle",
@@ -2628,6 +2979,8 @@ data.labels={
["ru"]="воÑкреÑенье",
["sk"]="nedeľa",
["sl"]="nedelja",
+ ["sr"]="недеља",
+ ["sr-latn"]="nedelja",
["sv"]="söndag",
["tk"]="dynç gün",
["tr"]="pazar",
@@ -2635,10 +2988,20 @@ data.labels={
["vi"]="chủ nhật",
},
},
+ ["sunday:mnem"]={
+ ["labels"]={
+ ["de"]="So.",
+ ["en"]="sun",
+ ["sr"]="нед.",
+ ["sr-latn"]="ned.",
+ },
+ },
["table"]={
["labels"]={
["af"]="Tabel",
["ar"]="جدول ",
+ ["be"]="Табліца ",
+ ["bg"]="Таблица ",
["ca"]="Taula ",
["cn"]="表",
["cs"]="Tabulka ",
@@ -2668,6 +3031,8 @@ data.labels={
["ru"]="Таблица ",
["sk"]="Tabuľka ",
["sl"]="Tabela ",
+ ["sr"]="Табела ",
+ ["sr-latn"]="Tabela ",
["sv"]="Tabell ",
["tk"]="Tablisa",
["tr"]="Tablo ",
@@ -2679,6 +3044,8 @@ data.labels={
["labels"]={
["af"]="donderdag",
["ar"]="الخميس",
+ ["be"]="чацвер",
+ ["bg"]="четвъртък",
["ca"]="dijous",
["cn"]="星期四",
["cs"]="Ätvrtek",
@@ -2708,6 +3075,8 @@ data.labels={
["ru"]="четверг",
["sk"]="Å¡tvrtok",
["sl"]="Äetrtek",
+ ["sr"]="четвртак",
+ ["sr-latn"]="Äetvrtak",
["sv"]="torsdag",
["tk"]="dördünji gün",
["tr"]="perÅŸembe",
@@ -2715,10 +3084,20 @@ data.labels={
["vi"]="thứ năm",
},
},
+ ["thursday:mnem"]={
+ ["labels"]={
+ ["de"]="Do.",
+ ["en"]="thu",
+ ["sr"]="чет.",
+ ["sr-latn"]="Äet.",
+ },
+ },
["tuesday"]={
["labels"]={
["af"]="dinsdag",
["ar"]="الثلاثاء",
+ ["be"]="аўторак",
+ ["bg"]="вторник",
["ca"]="dimarts",
["cn"]="星期二",
["cs"]="úterý",
@@ -2748,6 +3127,8 @@ data.labels={
["ru"]="вторник",
["sk"]="utorok",
["sl"]="torek",
+ ["sr"]="уторак",
+ ["sr-latn"]="utorak",
["sv"]="tisdag",
["tk"]="ikinji gün",
["tr"]="salı",
@@ -2755,10 +3136,20 @@ data.labels={
["vi"]="thứ ba",
},
},
+ ["tuesday:mnem"]={
+ ["labels"]={
+ ["de"]="Di.",
+ ["en"]="tue",
+ ["sr"]="уто.",
+ ["sr-latn"]="uto.",
+ },
+ },
["wednesday"]={
["labels"]={
["af"]="woensdag",
["ar"]="الأربعاء",
+ ["be"]="Ñерада",
+ ["bg"]="ÑÑ€Ñда",
["ca"]="dimecres",
["cn"]="星期三",
["cs"]="středa",
@@ -2788,6 +3179,8 @@ data.labels={
["ru"]="Ñреда",
["sk"]="streda",
["sl"]="sreda",
+ ["sr"]="Ñреда",
+ ["sr-latn"]="sreda",
["sv"]="onsdag",
["tk"]="üçünji",
["tr"]="çarşamba",
@@ -2795,14 +3188,25 @@ data.labels={
["vi"]="thứ tư",
},
},
+ ["wednesday:mnem"]={
+ ["labels"]={
+ ["de"]="Mi.",
+ ["en"]="wed",
+ ["sr"]="Ñре.",
+ ["sr-latn"]="sre.",
+ },
+ },
["year"]={
["labels"]={
+ ["bg"]="година",
["en"]="year",
["et"]="aasta",
["kr"]="ë…„",
["mk"]="година",
["nl"]="jaar",
["pe"]="سال",
+ ["sr"]="година",
+ ["sr-latn"]="godina",
},
},
},
@@ -2811,6 +3215,8 @@ data.labels={
["labels"]={
["af"]="Afkortings",
["ar"]="الاختصارات",
+ ["be"]="Ð¡Ð¿Ñ–Ñ ÑкарачÑннÑÑž",
+ ["bg"]="СъкращениÑ",
["ca"]="Abreviacions",
["cn"]="缩略语",
["cs"]="Zkratky",
@@ -2840,6 +3246,8 @@ data.labels={
["ru"]="СпиÑок Ñокращений",
["sk"]="Skratky",
["sl"]="Kratice",
+ ["sr"]="Скраћенице",
+ ["sr-latn"]="Skraćenice",
["sv"]="Förkortningar",
["tk"]="Gysgaltmalar",
["tr"]="Kısaltmalar",
@@ -2851,6 +3259,8 @@ data.labels={
["labels"]={
["af"]="Inhoud",
["ar"]="المحتويات",
+ ["be"]="ЗмеÑÑ‚",
+ ["bg"]="Съдържание",
["ca"]="Ãndex de continguts",
["cn"]="目录",
["cs"]="Obsah",
@@ -2880,6 +3290,8 @@ data.labels={
["ru"]="Содержание",
["sk"]="Obsah",
["sl"]="Kazalo",
+ ["sr"]="Садржај",
+ ["sr-latn"]="Sadržaj",
["sv"]="Innehåll",
["tk"]="Mazmuny",
["tr"]="Fihrist",
@@ -2891,6 +3303,7 @@ data.labels={
["labels"]={
["af"]="Figure",
["ar"]="الأشكال",
+ ["be"]="Ð¡Ð¿Ñ–Ñ Ñ–Ð»ÑŽÑтрацый",
["ca"]="Figures",
["cn"]="图形",
["cs"]="Seznam obrázků",
@@ -2920,6 +3333,8 @@ data.labels={
["ru"]="СпиÑок иллюÑтраций",
["sk"]="Zoznam obrázkov",
["sl"]="Slike",
+ ["sr"]="Слике",
+ ["sr-latn"]="Slike",
["sv"]="Figurer",
["tk"]="Suratlar",
["tr"]="Åžekiller",
@@ -2931,6 +3346,7 @@ data.labels={
["labels"]={
["af"]="Grafieke",
["ar"]="الرسوم",
+ ["be"]="Графiка",
["ca"]="Gràfiques",
["cn"]="图",
["cs"]="Seznam grafů",
@@ -2960,6 +3376,8 @@ data.labels={
["ru"]="СпиÑок графиков",
["sk"]="Zoznam grafov",
["sl"]="Slike",
+ ["sr"]="Графици",
+ ["sr-latn"]="Grafici",
["sv"]="Grafik",
["tk"]="Grafikler",
["tr"]="Grafikler",
@@ -2971,6 +3389,8 @@ data.labels={
["labels"]={
["af"]="Indeks",
["ar"]="الÙهرس",
+ ["be"]="Ðлфавітны паказальнік",
+ ["bg"]="ИндÑкÑ",
["ca"]="Ãndex alfabètic",
["cn"]="索引",
["cs"]="Rejstřík",
@@ -3000,6 +3420,9 @@ data.labels={
["ru"]="Ðлфавитный указатель",
["sk"]="Zoznam",
["sl"]="Stvarno kazalo",
+ ["sr"]="ИндекÑ",
+ ["sr"]="Ð˜Ð½Ð´ÐµÐºÑ Ð¿Ð¾Ñ˜Ð¼Ð¾Ð²Ð°",
+ ["sr-latn"]="Indeks pojmova",
["sv"]="Sakregister",
["tk"]="Indeks",
["tr"]="Ä°ndex",
@@ -3011,6 +3434,7 @@ data.labels={
["labels"]={
["af"]="Intermezzos",
["ar"]="Ùسح",
+ ["be"]="Ð¡Ð¿Ñ–Ñ ÑƒÑтавак",
["ca"]="Intermedis",
["cn"]="퉣",
["cs"]="Intermezza",
@@ -3039,6 +3463,9 @@ data.labels={
["ru"]="СпиÑок вÑтавок",
["sk"]="Intermezzá",
["sl"]="Intermezzi",
+ ["sr"]="Интермеззи",
+ ["sr"]="СпиÑак дигреÑија",
+ ["sr-latn"]="Spisak digresija",
["sv"]="Intermezzon",
["tk"]="Arakesmeler",
["tr"]="",
@@ -3050,6 +3477,8 @@ data.labels={
["labels"]={
["af"]="Logos",
["ar"]="الشعارات",
+ ["be"]="Лагатыпы",
+ ["bg"]="Логотипи",
["ca"]="Logotips",
["cn"]="徽贬",
["cs"]="Loga",
@@ -3079,6 +3508,8 @@ data.labels={
["ru"]="Логотипы",
["sk"]="Logá",
["sl"]="Logotipi",
+ ["sr"]="Логотипи",
+ ["sr-latn"]="Logotipi",
["sv"]="Loggor",
["tk"]="Logolar",
["tr"]="Logolar",
@@ -3116,6 +3547,8 @@ data.labels={
["ru"]="",
["sk"]="Literatúra",
["sl"]="Literatura",
+ ["sr"]="Литература",
+ ["sr-latn"]="Literatura",
["sv"]="",
["tk"]="",
["tr"]="",
@@ -3127,6 +3560,7 @@ data.labels={
["labels"]={
["af"]="Tabelle",
["ar"]="الجداول",
+ ["be"]="Ð¡Ð¿Ñ–Ñ Ñ‚Ð°Ð±Ð»Ñ–Ñ†",
["ca"]="Taules",
["cn"]="表格",
["cs"]="Seznam tabulek",
@@ -3156,6 +3590,8 @@ data.labels={
["ru"]="СпиÑок таблиц",
["sk"]="Zoznam tabuliek",
["sl"]="Tabele",
+ ["sr"]="Табеле",
+ ["sr-latn"]="Tabele",
["sv"]="Tabeller",
["tk"]="Tablisalar",
["tr"]="Tablolar",
@@ -3167,6 +3603,8 @@ data.labels={
["labels"]={
["af"]="Eenhede",
["ar"]="الوحدات",
+ ["be"]="Ðдзінкі вымÑÑ€ÑннÑ",
+ ["bg"]="Ðдзінкі",
["ca"]="Unitats",
["cn"]="计é‡å•ä½",
["cs"]="Jednotky",
@@ -3196,6 +3634,8 @@ data.labels={
["ru"]="Единицы измерениÑ",
["sk"]="Jednotky",
["sl"]="Enote",
+ ["sr"]="Јединице",
+ ["sr-latn"]="Jedinice",
["sv"]="Enheter",
["tk"]="Birlikler",
["tr"]="Birimler",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua
index 7428d64ab24..7a8b7ca86c3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-url.lua
@@ -9,7 +9,9 @@ if not modules then modules = { } end modules ['lang-url'] = {
local utfcharacters, utfbyte, utfchar = utf.characters, utf.byte, utf.char
local min, max = math.min, math.max
-local context = context
+local context = context
+local ctx_pushcatcodes = context.pushcatcodes
+local ctx_popcatcodes = context.popcatcodes
local implement = interfaces.implement
local variables = interfaces.variables
@@ -190,9 +192,9 @@ local function action(hyphenatedurl,str,left,right,disc)
end
end
if dodi then
- list[i] = "\\d"
+ list[i] = "\\lang_url_d "
else
- list[i] = "\\" .. what .. "{" .. utfbyte(char) .. "}"
+ list[i] = "\\lang_url_" .. what .. "{" .. utfbyte(char) .. "}"
end
prev = char
end
@@ -200,7 +202,9 @@ local function action(hyphenatedurl,str,left,right,disc)
report("old : %s",str)
report("new : %t",list)
end
+ ctx_pushcatcodes("prtcatcodes")
context("%t",list)
+ ctx_popcatcodes()
end
-- urls.action = function(_,...) action(...) end -- sort of obsolete
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv
index 6afef63cee2..8f1a979dc56 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-url.mkiv
@@ -100,22 +100,17 @@
{\dontleavehmode
\begingroup
\the\everyhyphenatedurl
- \normallanguage\zerocount
- \let\a\lang_url_a % after
- \let\b\lang_url_b % before
- \let\d\lang_url_d % disc
- \let\l\lang_url_l % letter
- \let\c\lang_url_c % character
- \let\L\lang_url_L % letter_nobreak
- \let\C\lang_url_C % character_nobreak
+ \normallanguage\zerocount % \nohyphens in mkiv
\scratchskipone\zeropoint\s!plus\dimexpr\emwidth/12\s!minus\dimexpr\emwidth/24\relax % 1.00pt @ 12pt
\scratchskiptwo\zeropoint\s!plus\dimexpr\emwidth/48\s!minus\dimexpr\emwidth/96\relax % 0.25pt @ 12pt
+ \unprotect
\normalexpanded{\noexpand\clf_hyphenatedurl
{\noexpand\detokenize{#1}}%
\hyphenatedurllefthyphenmin
\hyphenatedurlrighthyphenmin
{\hyphenatedurldiscretionary}%
}%
+ \protect
\endgroup}
%D \macros
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua b/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua
index 9fbced2ce95..1c440bd7f2a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lang-wrd.lua
@@ -39,7 +39,7 @@ local getid = nuts.getid
local getchar = nuts.getchar
local setattr = nuts.setattr
----- getattr = nuts.getattr
-local getlang = nuts.getlang
+local getlanguage = nuts.getlanguage
local ischar = nuts.ischar
local nextnode = nuts.traversers.node
@@ -163,7 +163,7 @@ local function mark_words(head,whenfound) -- can be optimized and shared
while current do
local code, id = ischar(current) -- not isglyph because otherwise we can run into
if code then -- processed streams (\about[foo] does that)
- local a = getlang(current)
+ local a = getlanguage(current)
if a then
if a ~= language then
if s > 0 then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua
index 2bac3201d28..5b8390df2a1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/libs-ini.lua
@@ -13,10 +13,10 @@ if not modules then modules = { } end modules ['libs-ini'] = {
-- is doing.
local type, unpack = type, unpack
+local find = string.find
-- here we implement the resolver
-local type = type
local nameonly = file.nameonly
local joinfile = file.join
@@ -30,8 +30,10 @@ local expandpaths = resolvers.expandedpathlistfromvariable
local report = logs.reporter("resolvers","libraries")
local trace = false
+local silent = false
-trackers.register("resolvers.lib", function(v) trace = v end)
+trackers.register("resolvers.lib", function(v) trace = v end)
+trackers.register("resolvers.lib.silent", function(v) silent = v end)
local function findlib(required) -- todo: cache
local suffix = os.libsuffix or "so"
@@ -143,10 +145,10 @@ function libraries.optionalloaded(name,libnames)
end
end
local initialized = thelib_initialize(unpack(libnames))
- if initialized then
- report("using library '% + t'",libnames)
- else
+ if not initialized then
report("unable to initialize library '% + t'",libnames)
+ elseif not silent then
+ report("using library '% + t'",libnames)
end
return initialized
end
@@ -154,6 +156,9 @@ function libraries.optionalloaded(name,libnames)
end
end
+-- For the moment the next blob is needed when we run \MTXRUN\ on top of \LUATEX\ and
+-- \LUAJITTEX\ but at some point we will {\em always} assume \LUAMETATEX\ as runner.
+
if FFISUPPORTED and ffi and ffi.load then
local ffiload = ffi.load
@@ -194,3 +199,19 @@ end
-- }
-- end
-- }
+
+local dofile = dofile
+local savedrequire = require
+
+function require(name,version)
+ if find(name,"%.lua$") or find(name,"%.lmt$") then
+ local m = dofile(findfile(name))
+ if m then
+ package.loaded[name] = m
+ return m
+ end
+ else
+ return savedrequire(name)
+ end
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua
index c04ada15156..a120ff2f4ee 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ano.lua
@@ -712,7 +712,8 @@ function codeinjections.prerollreference(actions) -- share can become option
local bs, bc = pdfborder()
main = pdfdictionary {
Subtype = pdf_link,
- Border = bs,
+ -- Border = bs,
+ Border = pdfshareobjectreference(bs),
C = bc,
H = (not actions.highlight and pdf_n) or nil,
A = pdfshareobjectreference(main),
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua
index 0d7cecbb853..91636ad04e0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua
@@ -22,7 +22,8 @@ local cache = table.setmetatableindex(function(t,k) -- can be made weak
if v < 0x10000 then
v = format("%04x",v)
else
- v = format("%04x%04x",rshift(v,10),v%1024+0xDC00)
+ v = v - 0x10000
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
end
t[k] = v
return v
@@ -71,7 +72,7 @@ local more = 0
local pattern = C(4) / function(s) -- needs checking !
local now = tonumber(s,16)
if more > 0 then
- now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 -- the 0x10000 smells wrong
+ now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000
more = 0
return utfchar(now)
elseif now >= 0xD800 and now <= 0xDBFF then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua
index c586300e55b..d3b612593d5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-col.lua
@@ -818,14 +818,20 @@ do
end
end
+ -- A problem is that we need to transfer back and this is kind of
+ -- messy so we force text mode .. i'll do a better job on that but
+ -- will experiment first (both engines). Virtual fonts will change
+ -- anyway.
+
backends.pdf.tables.vfspecials = allocate { -- todo: distinguish between glyph and rule color
startcolor = startcolor,
-- stopcolor = { "pdf", "page", "0 g 0 G Q" },
- stopcolor = { "pdf", "page", "Q" },
+ stopcolor = { "pdf", "text", "Q" },
startslant = startslant,
- stopslant = { "pdf", "origin", "Q" },
+ -- stopslant = { "pdf", "origin", "Q" },
+ stopslant = { "pdf", "text", "Q" },
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-eng.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-eng.lua
index 21c7e66e999..26a63e9a0ef 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-eng.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-eng.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['lpdf-eng'] = {
version = 1.001,
+ optimize = true,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
index 45000aebc75..0ff764e1d72 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
@@ -510,7 +510,7 @@ local validstamps = {
ForPublicRelease = true,
}
--- todo: we can use runtoks instead of steps
+-- todo: we can use runlocal instead of steps
local function validStamp(v)
local name = "Stamped" -- fallback
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua
index e5a95fdab7c..e14968eb8ad 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fld.lua
@@ -1003,17 +1003,17 @@ function nodeinjections.typesetfield(name,specification)
end
end
-local function save_parent(field,specification,d,hasopt)
+local function save_parent(field,specification,d)
local kidsnum = pdfreserveobject()
d.Kids = pdfreference(kidsnum)
field.kidsnum = kidsnum
field.kids = pdfarray()
- if hasopt then
- local optnum = pdfreserveobject()
- d.Opt = pdfreference(optnum)
- field.optnum = optnum
- field.opt = pdfarray()
- end
+-- if d.Opt then
+-- local optnum = pdfreserveobject()
+-- d.Opt = pdfreference(optnum)
+-- field.optnum = optnum
+-- field.opt = pdfarray()
+-- end
local pnum = pdfflushobject(d)
field.pobj = pnum
collected[#collected+1] = pdfreference(pnum)
@@ -1022,12 +1022,12 @@ end
local function save_kid(field,specification,d,optname)
local kn = pdfreserveobject()
field.kids[#field.kids+1] = pdfreference(kn)
- if optname then
- local opt = field.opt
- if opt then
- opt[#opt+1] = optname
- end
- end
+-- if optname then
+-- local opt = field.opt
+-- if opt then
+-- opt[#opt+1] = optname
+-- end
+-- end
local width = specification.width or 0
local height = specification.height or 0
local depth = specification.depth or 0
@@ -1243,7 +1243,7 @@ local function makecheckparent(field,specification)
FT = pdf_btn,
V = fielddefault(field,default),
}
- save_parent(field,specification,d,true)
+ save_parent(field,specification,d)
end
local function makecheckchild(name,specification)
@@ -1371,7 +1371,7 @@ local function makeradioparent(field,specification)
-- H = pdf_n,
V = fielddefault(field),
}
- save_parent(field,specification,d,true)
+ save_parent(field,specification,d)
end
-- local function makeradiochild(name,specification)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua
index 388db0be3d9..c6a3f25ff5e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-fmt.lua
@@ -885,8 +885,8 @@ function codeinjections.setformat(s)
end
local pdf_version = spec.pdf_version * 10
local inject_metadata = spec.inject_metadata
- local majorversion = math.div(pdf_version,10)
- local minorversion = math.mod(pdf_version,10)
+ local majorversion = math.floor(math.div(pdf_version,10))
+ local minorversion = math.floor(math.mod(pdf_version,10))
local objectcompression = spec.object_compression and pdf_version >= 15
local compresslevel = level or lpdf.compresslevel() -- keep default
local objectcompresslevel = (objectcompression and (level or lpdf.objectcompresslevel())) or 0
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua
index e827419a6ce..963b1dde319 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-grp.lua
@@ -293,3 +293,5 @@ end
function lpdf.patternstream(n,width,height)
return f_pattern("Pt" .. n,width*basepoints,height*basepoints)
end
+
+backends.pdf.codeinjections.registerpattern = lpdf.registerpattern
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua
index 2163e874852..1098ef8fa38 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-ini.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['lpdf-ini'] = {
version = 1.001,
+ optimize = true,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -7,6 +8,9 @@ if not modules then modules = { } end modules ['lpdf-ini'] = {
}
-- beware of "too many locals" here
+--
+-- The lua files are still hybrid ones but we keep that as a reference for the
+-- lmt variants that started out as copies.
local setmetatable, getmetatable, type, next, tostring, tonumber, rawset = setmetatable, getmetatable, type, next, tostring, tonumber, rawset
local char, byte, format, gsub, concat, match, sub, gmatch = string.char, string.byte, string.format, string.gsub, table.concat, string.match, string.sub, string.gmatch
@@ -25,7 +29,6 @@ local report_finalizing = logs.reporter("backend","finalizing")
local report_blocked = logs.reporter("backend","blocked")
local implement = interfaces.implement
-local two_strings = interfaces.strings[2]
local context = context
@@ -295,7 +298,9 @@ do
if v < 0x10000 then
v = format("%04x",v)
else
- v = format("%04x%04x",rshift(v,10),v%1024+0xDC00)
+ v = v - 0x10000
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
+ -- v = format("%04x%04x",rshift(v-0x10000,10)+0xD800,v%1024+0xDC00)
end
t[k] = v
return v
@@ -316,7 +321,7 @@ do
local pattern = C(4) / function(s) -- needs checking !
local now = tonumber(s,16)
if more > 0 then
- now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 -- the 0x10000 smells wrong
+ now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000
more = 0
return utfchar(now)
elseif now >= 0xD800 and now <= 0xDBFF then
@@ -445,10 +450,14 @@ do
local f_key_null = formatters["/%s null"]
local f_key_value = formatters["/%s %s"]
- local f_key_dictionary = formatters["/%s << % t >>"]
- local f_dictionary = formatters["<< % t >>"]
- local f_key_array = formatters["/%s [ % t ]"]
- local f_array = formatters["[ % t ]"]
+ -- local f_key_dictionary = formatters["/%s << % t >>"]
+ -- local f_dictionary = formatters["<< % t >>"]
+ local f_key_dictionary = formatters["/%s << %s >>"]
+ local f_dictionary = formatters["<< %s >>"]
+ -- local f_key_array = formatters["/%s [ % t ]"]
+ -- local f_array = formatters["[ % t ]"]
+ local f_key_array = formatters["/%s [ %s ]"]
+ local f_array = formatters["[ %s ]"]
local f_key_number = formatters["/%s %N"] -- always with max 9 digits and integer is possible
local f_tonumber = formatters["%N"] -- always with max 9 digits and integer is possible
@@ -501,8 +510,9 @@ do
if e then
r[n+1] = e
end
+ r = concat(r," ")
if contentonly then
- return concat(r," ")
+ return r
elseif key then
return f_key_dictionary(key,r)
else
@@ -550,8 +560,9 @@ do
if e then
r[tn+1] = e
end
+ r = concat(r," ")
if contentonly then
- return concat(r, " ")
+ return r
elseif key then
return f_key_array(key,r)
else
@@ -1553,16 +1564,16 @@ end
-- interface
implement { name = "lpdf_collectedresources", actions = { lpdf.collectedresources, context } }
-implement { name = "lpdf_addtocatalog", arguments = two_strings, actions = lpdf.addtocatalog }
-implement { name = "lpdf_addtoinfo", arguments = two_strings, actions = function(a,b,c) lpdf.addtoinfo(a,b,c) end } -- gets adapted
-implement { name = "lpdf_addtonames", arguments = two_strings, actions = lpdf.addtonames }
-implement { name = "lpdf_addtopageattributes", arguments = two_strings, actions = lpdf.addtopageattributes }
-implement { name = "lpdf_addtopagesattributes", arguments = two_strings, actions = lpdf.addtopagesattributes }
-implement { name = "lpdf_addtopageresources", arguments = two_strings, actions = lpdf.addtopageresources }
-implement { name = "lpdf_adddocumentextgstate", arguments = two_strings, actions = function(a,b) lpdf.adddocumentextgstate (a,pdfverbose(b)) end }
-implement { name = "lpdf_adddocumentcolorspace", arguments = two_strings, actions = function(a,b) lpdf.adddocumentcolorspace(a,pdfverbose(b)) end }
-implement { name = "lpdf_adddocumentpattern", arguments = two_strings, actions = function(a,b) lpdf.adddocumentpattern (a,pdfverbose(b)) end }
-implement { name = "lpdf_adddocumentshade", arguments = two_strings, actions = function(a,b) lpdf.adddocumentshade (a,pdfverbose(b)) end }
+implement { name = "lpdf_addtocatalog", arguments = "2 strings", actions = lpdf.addtocatalog }
+implement { name = "lpdf_addtoinfo", arguments = "2 strings", actions = function(a,b,c) lpdf.addtoinfo(a,b,c) end } -- gets adapted
+implement { name = "lpdf_addtonames", arguments = "2 strings", actions = lpdf.addtonames }
+implement { name = "lpdf_addtopageattributes", arguments = "2 strings", actions = lpdf.addtopageattributes }
+implement { name = "lpdf_addtopagesattributes", arguments = "2 strings", actions = lpdf.addtopagesattributes }
+implement { name = "lpdf_addtopageresources", arguments = "2 strings", actions = lpdf.addtopageresources }
+implement { name = "lpdf_adddocumentextgstate", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentextgstate (a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentcolorspace", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentcolorspace(a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentpattern", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentpattern (a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentshade", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentshade (a,pdfverbose(b)) end }
-- more helpers: copy from lepd to lpdf
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua
index 7227f9dba8a..94e9fc2714f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-mis.lua
@@ -17,7 +17,8 @@ if not modules then modules = { } end modules ['lpdf-mis'] = {
local next, tostring, type = next, tostring, type
local format, gsub, formatters = string.format, string.gsub, string.formatters
-local flattened = table.flattened
+local concat, flattened = table.concat, table.flattened
+local settings_to_array = utilities.parsers.settings_to_array
local backends, lpdf, nodes = backends, lpdf, nodes
@@ -236,19 +237,13 @@ local function setupidentity()
end
local keywords = identity.keywords or ""
if keywords ~= "" then
- keywords = gsub(keywords, "[%s,]+", " ")
- addtoinfo("Keywords",pdfunicode(keywords), keywords)
+ keywords = concat(settings_to_array(keywords), " ")
+ addtoinfo("Keywords", pdfunicode(keywords), keywords)
end
local id = lpdf.id()
addtoinfo("ID", pdfstring(id), id) -- needed for pdf/x
--
addtoinfo("ConTeXt.Version",version)
- --
- local lmtx = codeinjections.lmtxmode()
- if lmtx then
- addtoinfo("ConTeXt.LMTX",formatters["%0.2f"](lmtx))
- end
- --
addtoinfo("ConTeXt.Time",os.date("%Y-%m-%d %H:%M"))
addtoinfo("ConTeXt.Jobname",jobname)
addtoinfo("ConTeXt.Url","www.pragma-ade.com")
@@ -451,7 +446,7 @@ local function documentspecification()
if not pagespec or pagespec == "" then
pagespec = v_default
end
- local settings = utilities.parsers.settings_to_array(pagespec)
+ local settings = settings_to_array(pagespec)
-- so the first one detemines the defaults
local first = settings[1]
local defaults = pagespecs[first]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pde.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pde.lua
index ec1064a0dfd..1c80eb5b274 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-pde.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-pde.lua
@@ -48,6 +48,7 @@ local abs = math.abs
local concat, swapped, sortedhash, sortedkeys = table.concat, table.swapped, table.sortedhash, table.sortedkeys
local utfchar = string.char
local setmetatableindex = table.setmetatableindex
+local ioopen = io.open
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local P, C, S, R, Ct, Cc, V, Carg, Cs, Cf, Cg = lpeg.P, lpeg.C, lpeg.S, lpeg.R, lpeg.Ct, lpeg.Cc, lpeg.V, lpeg.Carg, lpeg.Cs, lpeg.Cf, lpeg.Cg
@@ -67,6 +68,7 @@ local lpdf_epdf = { }
lpdf.epdf = lpdf_epdf
local pdfopen = pdfe.open
+local pdfopenfile = pdfe.openfile
local pdfnew = pdfe.new
local pdfclose = pdfe.close
@@ -440,8 +442,11 @@ function lpdf_epdf.load(filename,userpassword,ownerpassword,fromstring)
if not document then
statistics.starttiming(lpdf_epdf)
local __data__
+ local __file__
if fromstring then
__data__ = pdfnew(filename,#filename)
+ elseif pdfopenfile then
+ __data__ = pdfopenfile(ioopen(filename,"rb"))
else
__data__ = pdfopen(filename)
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-vfc.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-vfc.lua
new file mode 100644
index 00000000000..5c1937ab9a6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-vfc.lua
@@ -0,0 +1,50 @@
+if not modules then modules = { } end modules ['lpdf-vfc'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local bp = number.dimenfactors.bp
+local r = 16384 * bp
+local f_1 = formatters["%.6F w 0 %.6F %.6F %.6F re f"]
+local f_2 = formatters["[] 0 d 0 J %.6F w %.6F %.6F %.6F %.6F re S"]
+
+local vfspecials = backends.pdf.tables.vfspecials
+
+vfspecials.backgrounds = setmetatableindex(function(t,h)
+ local h = h * bp
+ local v = setmetatableindex(function(t,d)
+ local d = d * bp
+ local v = setmetatableindex(function(t,w)
+ local v = { "pdf", "origin", f_1(r,-d,w*bp,h+d) }
+ t[w] = v
+ return v
+ end)
+ t[d] = v
+ return v
+ end)
+ t[h] = v
+ return v
+end)
+
+vfspecials.outlines = setmetatableindex(function(t,h)
+ local h = h * bp
+ local v = setmetatableindex(function(t,d)
+ local d = d * bp
+ local v = setmetatableindex(function(t,w)
+ -- the frame goes through the boundingbox
+ local v = { "pdf", "origin", f_2(r,r/2,-d+r/2,w*bp-r,h+d-r) }
+ t[w] = v
+ return v
+ end)
+ t[d] = v
+ return v
+ end)
+ t[h] = v
+ return v
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua
index d3184e1af77..9fd55f3ecc0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cbk.lua
@@ -333,7 +333,7 @@ nodes (in this case 121049).</p>
<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 thta it sometimes helps to
+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]]--
@@ -347,6 +347,8 @@ local garbagecollector = utilities.garbagecollector
garbagecollector.enabled = false -- could become a directive
garbagecollector.criterium = 4*1024*1024
+-- garbagecollector.enabled = true
+
-- Lua allocates up to 12 times the amount of memory needed for
-- handling a string, and for large binary chunks (like chinese otf
-- files) we get a prominent memory consumption. Even when a variable
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua
index 4939b05c39c..f1690832125 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cnf.lua
@@ -19,20 +19,79 @@ texconfig.shell_escape = 't'
luatex = luatex or { }
local luatex = luatex
-texconfig.error_line = 79 -- frozen / large values can crash
-texconfig.expand_depth = 10000
-texconfig.half_error_line = 50 -- frozen
-texconfig.hash_extra = 100000
-texconfig.max_in_open = 1000 -- frozen
-texconfig.max_print_line = 100000 -- frozen
-texconfig.max_strings = 500000
-texconfig.nest_size = 1000
-texconfig.param_size = 25000
-texconfig.save_size = 100000
-texconfig.stack_size = 10000
-texconfig.function_size = 32768
-texconfig.properties_size = 10000
-texconfig.fix_mem_init = 750000
+texconfig.error_line = 250
+texconfig.expand_depth = 10000
+texconfig.half_error_line = 125
+texconfig.max_print_line = 100000
+texconfig.max_strings = 500000
+texconfig.hash_extra = 200000
+texconfig.function_size = 32768
+texconfig.properties_size = 10000
+texconfig.level_max = 500
+texconfig.level_chr = 46 -- period
+
+if CONTEXTLMTXMODE > 0 then
+
+texconfig.max_in_open = 2000
+texconfig.nest_size = 10000
+texconfig.param_size = 100000
+texconfig.save_size = 500000
+texconfig.stack_size = 100000
+texconfig.buffer_size = 10000000
+texconfig.token_size = 10000000
+texconfig.node_size = 50000000
+texconfig.max_pool = 10000000
+
+else
+
+texconfig.max_in_open = 1000
+texconfig.nest_size = 1000
+texconfig.param_size = 25000
+texconfig.save_size = 100000
+texconfig.stack_size = 10000
+texconfig.buf_size = 10000000
+texconfig.fix_mem_init = 1000000
+
+end
+
+local variablenames = CONTEXTLMTXMODE > 0 and {
+ error_line = false,
+ half_error_line = false,
+ max_print_line = false,
+ max_in_open = false,
+ expand_depth = true,
+ hash_extra = true,
+ nest_size = true,
+ max_strings = true,
+ max_pool = true,
+ param_size = true,
+ save_size = true,
+ stack_size = true,
+ function_size = true,
+ properties_size = true,
+ token_size = true,
+ node_size = true,
+ buffer_size = true,
+ level_max = true,
+ level_chr = true,
+} or {
+ error_line = false,
+ half_error_line = false,
+ max_print_line = false,
+ max_in_open = false,
+ expand_depth = true,
+ hash_extra = true,
+ nest_size = true,
+ max_strings = true,
+ param_size = true,
+ save_size = true,
+ stack_size = true,
+ function_size = true,
+ properties_size = true,
+ fix_mem_init = true,
+ level_max = true,
+ level_chr = true,
+}
local stub = [[
@@ -68,15 +127,17 @@ function texconfig.init()
},
basictex = {
-- always
- "callback", "font", "lang", "lua", "node", "status", "tex", "texconfig", "texio", "token",
- -- not in luametatex
- "img", "pdf",
+ "callback", "font", "lua", "node", "status", "tex", "texconfig", "texio", "token",
+ -- not in luametatex
+ "img", "pdf", "lang",
+ -- in luametatex
+ "language",
},
extralua = {
-- not in luametatex
"unicode", "utf", "gzip", "zip", "zlib",
-- in luametatex
- "xzip", "xmath", "xcomplex", "basexx",
+ "xzip", "xmath", "xcomplex", "xdecimal", "basexx",
-- maybe some day in luametatex
"lz4", "lzo",
-- always (mime can go)
@@ -201,22 +262,6 @@ end)
-- done, from now on input and callbacks are internal
]]
-local variablenames = {
- error_line = false,
- half_error_line = false,
- max_print_line = false,
- max_in_open = false,
- expand_depth = true,
- hash_extra = true,
- nest_size = true,
- max_strings = true,
- param_size = true,
- save_size = true,
- stack_size = true,
- function_size = true,
- properties_size = true,
-}
-
local function makestub()
name = name or (environment.jobname .. ".lui")
report("creating stub file %a using directives:",name)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
index 8d5d65a452a..b3abecbbab4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
@@ -20,19 +20,21 @@ local texconfig, lua = texconfig, lua
texconfig.kpse_init = false
texconfig.shell_escape = 't'
-texconfig.error_line = 79 -- frozen / large values can crash
-texconfig.expand_depth = 10000
-texconfig.half_error_line = 50 -- frozen
-texconfig.max_in_open = 1000
-texconfig.max_print_line = 100000
-texconfig.max_strings = 500000
-texconfig.nest_size = 1000
-texconfig.param_size = 25000
-texconfig.save_size = 100000
-texconfig.stack_size = 10000
-texconfig.function_size = 32768
-texconfig.properties_size = 10000
-texconfig.fix_mem_init = 750000
+texconfig.error_line = 250
+texconfig.expand_depth = 10000
+texconfig.half_error_line = 125
+texconfig.max_in_open = 1000
+texconfig.max_print_line = 100000
+texconfig.max_strings = 500000
+texconfig.nest_size = 1000
+texconfig.param_size = 25000
+texconfig.save_size = 100000
+texconfig.stack_size = 10000
+texconfig.function_size = 32768
+texconfig.properties_size = 10000
+texconfig.fix_mem_init = 1000000
+texconfig.level_max = 500
+texconfig.level_chr = 46 -- period
-- registering bytecode chunks
@@ -59,9 +61,6 @@ local strip = false if arg then for i=-1,#arg do if arg[i] == "--c:strip" then s
function lua.registercode(filename,options)
local barename = gsub(filename,"%.[%a%d]+$","")
- if barename == filename then
- filename = filename .. ".lua"
- end
local basename = match(barename,"^.+[/\\](.-)$") or barename
if not bytedone[basename] then
local opts = { }
@@ -70,10 +69,13 @@ function lua.registercode(filename,options)
opts[s] = true
end
end
+ if barename == filename then
+ filename = filename .. ".lua"
+ end
local code = environment.luafilechunk(filename,false,opts.optimize)
if code then
bytedone[basename] = true
- if environment.initex then
+ if environment.initex and not opts.initexonly then
local n = lua.lastbytecode + 1
bytedata[n] = { name = barename, options = opts }
if strip or opts.strip then
@@ -142,7 +144,7 @@ if LUATEXVERSION == nil then
end
if CONTEXTLMTXMODE == nil then
- CONTEXTLMTXMODE = LUATEXENGINE == "luametatex" and 1 or 0
+ CONTEXTLMTXMODE = 0
end
if LUATEXFUNCTIONALITY == nil then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv
index 823b918c3bd..e7d58e8abe7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.mkiv
@@ -15,8 +15,8 @@
\unprotect
-%D We cannot use the following due to the fact that existing usage
-%D demanded duplicating hashes.
+%D We cannot use the following due to the fact that existing usage demanded
+%D duplicating hashes.
%D
%D \starttyping
%D \def\expanded#1{\normalexpanded{\noexpand#1}} % ## mess
@@ -24,10 +24,9 @@
\newif\ifproductionrun
-%D Originally we compiled the \LUA\ files externally and loaded
-%D then at runtime, but when the amount grew, we realized that
-%D we needed away to store them in the format, which is what
-%D bytecode arrays do. And so the following is obsolete:
+%D Originally we compiled the \LUA\ files externally and loaded then at runtime, but
+%D when the amount grew, we realized that we needed away to store them in the
+%D format, which is what bytecode arrays do. And so the following is obsolete:
%D
%D \starttyping
%D \setnewconstant\ctxluaembeddingmode \plusone
@@ -36,16 +35,15 @@
%D 1 = runtime compilation and embedding
%D \stoptyping
%D
-%D Allocation of \LUA\ engines has changed too. The original idea
-%D was to have multiple \LUA\ instances and it worked that way for
-%D several years. Hoewver in practice we used only one engine because
-%D scripts need to share data anyway. So eventually \LUATEX\ got only
-%D one instance. Because each call is reentrant there is not much
-%D danger for crashes.
+%D Allocation of \LUA\ engines has changed too. The original idea was to have
+%D multiple \LUA\ instances and it worked that way for several years. Hoewver in
+%D practice we used only one engine because scripts need to share data anyway. So
+%D eventually \LUATEX\ got only one instance. Because each call is reentrant there
+%D is not much danger for crashes.
%D
-%D Most code here has changed after version 0.60 as part of adaption to
-%D new functionality. We no longer support the hooks for initializing
-%D code as this can be done at the \LUA\ end.
+%D Most code here has changed after version 0.60 as part of adaption to new
+%D functionality. We no longer support the hooks for initializing code as this can
+%D be done at the \LUA\ end.
% we can drop the \zerocount as it's default
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-env.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-env.lua
index 1620a26e521..edf127765a8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-env.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-env.lua
@@ -38,14 +38,6 @@ local mt = {
else
return "unknown"
end
- elseif k == "kind" then
- local kind = texgettoks and texgettoks("contextkindtoks")
- if kind and kind ~= "" then
- rawset(environment,"kind",kind)
- return kind
- else
- return "unknown"
- end
elseif k == "jobname" or k == "formatname" then
local name = tex and tex[k]
if name or name== "" then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua
index 26db46a88ab..2418eec1b59 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-fio.lua
@@ -8,7 +8,6 @@ if not modules then modules = { } end modules ['luat-fio'] = {
local format = string.format
local concat = table.concat
-local sequenced = table.sequenced
texconfig.kpse_init = false
texconfig.shell_escape = 't'
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua
index 538556ed282..fe97cf604b9 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-fmt.lua
@@ -6,6 +6,15 @@ if not modules then modules = { } end modules ['luat-fmt'] = {
license = "see context related readme files"
}
+-- The original idea was to have a generic format builder and as a result the code
+-- here (and some elsewhere) is bit more extensive that we really need for context.
+-- For instance, in the real beginning we had runtime loading because we had no
+-- bytecode registers yet. We also had multiple files as stubs and the context.lus
+-- file specified these. More than a decade only the third method was used, just
+-- loading luat-cod, so in the end we could get rid of the lus file. In due time
+-- I'll strip the code here because something generic will never take of and we
+-- moved on to luametatex anyway.
+
local format = string.format
local concat = table.concat
local quoted = string.quoted
@@ -13,9 +22,6 @@ local luasuffixes = utilities.lua.suffixes
local report_format = logs.reporter("resolvers","formats")
--- this is a bit messy: we also handle flags in mtx-context so best we
--- can combine this some day (all here)
-
local function primaryflags(arguments)
local flags = { }
if arguments.silent then
@@ -58,7 +64,7 @@ end
-- 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% %dump% %redirect%]]
+local template = [[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers = {
primaryflags = "verbose", -- "flags"
@@ -66,21 +72,20 @@ local checkers = {
luafile = "readable", -- "cache"
texfile = "readable", -- "cache"
redirect = "string",
- dump = "string",
binarypath = "string",
}
local runners = {
- luatex = sandbox.registerrunner {
- name = "make luatex format",
- program = "luatex",
+ luametatex = sandbox.registerrunner {
+ name = "make luametatex format",
+ program = "luametatex",
template = template,
checkers = checkers,
reporter = report_format,
},
- luametatex = sandbox.registerrunner {
- name = "make luametatex format",
- program = "luametatex",
+ luatex = sandbox.registerrunner {
+ name = "make luatex format",
+ program = "luatex",
template = template,
checkers = checkers,
reporter = report_format,
@@ -94,6 +99,18 @@ local runners = {
},
}
+local stubfiles = {
+ luametatex = "luat-cod.lmt",
+ luatex = "luat-cod.lua",
+ luajittex = "luat-cod.lua",
+}
+
+local suffixes = {
+ luametatex = "mkxl",
+ luatex = "mkiv",
+ luajittex = "mkiv",
+}
+
local function validbinarypath()
-- if environment.arguments.addbinarypath then
if not environment.arguments.nobinarypath then
@@ -107,137 +124,75 @@ local function validbinarypath()
end
end
+local function fatalerror(startupdir,...)
+ report_format(...)
+ lfs.chdir(startupdir)
+end
+
function environment.make_format(formatname)
- -- first we set up the engine and normally that information is provided
- -- by the engine ... when we move to luametatex we could decide to simplfy
- -- all the following
- local arguments = environment.arguments
- local engine = environment.ownmain or "luatex"
- local silent = arguments.silent
- local errors = arguments.errors
+ local arguments = environment.arguments
+ local engine = environment.ownmain or "luatex"
+ local silent = arguments.silent
+ local errors = arguments.errors
+ local runner = runners[engine]
+ local startupdir = dir.current()
+ if not runner then
+ return fatalerror(startupdir,"the format %a cannot be generated, no runner available for engine %a",name,engine)
+ end
-- now we locate the to be used source files ... there are some variants that we
-- need to take care
- local texsourcename = ""
- local texsourcepath = ""
- local fulltexsourcename = ""
- if engine == "luametatex" then
- texsourcename = file.addsuffix(formatname,"mkxl")
- fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
- end
- if fulltexsourcename == "" then
- texsourcename = file.addsuffix(formatname,"mkiv")
- fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
+ local luasourcename = stubfiles[engine]
+ if not luasourcename then
+ return fatalerror(startupdir,"no lua stub file specified for %a",engine)
end
+ local texsourcename = file.addsuffix(formatname,suffixes[engine])
+ local fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
if fulltexsourcename == "" then
- texsourcename = file.addsuffix(formatname,"tex")
- fulltexsourcename = resolvers.findfile(texsourcename,"tex") or ""
+ return fatalerror(startupdir,"no tex source file with name %a (mkiv or tex)",formatname)
end
- if fulltexsourcename == "" then
- report_format("no tex source file with name %a (mkiv or tex)",formatname)
- return
- end
- report_format("using tex source file %a",fulltexsourcename)
-- this is tricky: we normally have an expanded path but when we don't have one,
-- the current path gets appended
- fulltexsourcename = dir.expandname(fulltexsourcename)
- texsourcepath = file.dirname(fulltexsourcename)
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
+ local fulltexsourcename = dir.expandname(fulltexsourcename)
+ local texsourcepath = file.dirname(fulltexsourcename)
+ if lfs.isfile(fulltexsourcename) then
+ report_format("using tex source file %a",fulltexsourcename)
+ else
+ return fatalerror(startupdir,"no accessible tex source file with name %a",fulltexsourcename)
end
-- we're getting there, that is: we have a file that specifies the context format;
-- in addition to that file we need a stub for setting up lua as we start rather
- -- minimalistic
- local specificationname = "context.lus"
- local specificationpath = ""
- local fullspecificationname = resolvers.findfile(specificationname) or ""
- if fullspecificationname == "" then
- report_format("unable to locate specification file %a",specificationname)
- return
- end
- report_format("using specification file %a",fullspecificationname)
- -- let's expand the found name and so an extra check
- fullspecificationname = dir.expandname(fullspecificationname)
- specificationpath = file.dirname(fullspecificationname)
- if texsourcepath ~= specificationpath then
- report_format("tex source file and specification file are on different paths")
- return
- end
- -- let's do an additional check here, if only because we then have a bit better
- -- feedback on what goes wrong
- if not lfs.isfile(fulltexsourcename) then
- report_format("no accessible tex source file with name %a",fulltexsourcename)
- return
- end
- if not lfs.isfile(fullspecificationname) then
- report_format("no accessible specification file with name %a",fulltexsourcename)
- return
+ -- minimalistic ..
+ local fullluasourcename = dir.expandname(file.join(texsourcepath,luasourcename) or "")
+ if lfs.isfile(fullluasourcename) then
+ report_format("using lua stub file %a",fullluasourcename)
+ else
+ return fatalerror(startupdir,"no accessible lua stub file with name %a",fulltexsourcename)
end
- -- we're still going strong
- report_format("using tex source path %a",texsourcepath)
-- we will change tot the format path because some local files will be created
-- in the process and we don't want clutter
local validformatpath = caches.getwritablepath("formats",engine) or ""
- local startupdir = dir.current()
if validformatpath == "" then
- report_format("invalid format path, insufficient write access")
- return
+ return fatalerror(startupdir,"invalid format path, insufficient write access")
end
-- in case we have a qualified path, we need to do this before we change
-- because we can have half qualified paths (in lxc)
local binarypath = validbinarypath()
report_format("changing to format path %a",validformatpath)
- lfs.chdir(validformatpath)
- if dir.current() ~= validformatpath then
- report_format("unable to change to format path %a",validformatpath)
- return
- end
- -- we're now ready for making the format which we do on the first found
- -- writable path
- local usedluastub = nil
- local usedlualibs = dofile(fullspecificationname)
- if type(usedlualibs) == "string" then
- usedluastub = file.join(specificationpath,usedlualibs)
- elseif type(usedlualibs) == "table" then
- report_format("using stub specification %a",fullspecificationname)
- local texbasename = file.basename(name)
- local luastubname = file.addsuffix(texbasename,luasuffixes.lua)
- local lucstubname = file.addsuffix(texbasename,luasuffixes.luc)
- -- pack libraries in stub
- report_format("creating initialization file %a",luastubname)
- utilities.merger.selfcreate(usedlualibs,specificationpath,luastubname)
- -- compile stub file (does not save that much as we don't use this stub at startup any more)
- if utilities.lua.compile(luastubname,lucstubname) and lfs.isfile(lucstubname) then
- report_format("using compiled initialization file %a",lucstubname)
- usedluastub = lucstubname
- else
- report_format("using uncompiled initialization file %a",luastubname)
- usedluastub = luastubname
- end
- else
- report_format("invalid stub specification %a",fullspecificationname)
- lfs.chdir(startupdir)
- return
- end
- -- we're ready to go now but first we check if we actually do have a runner
- -- for this engine ... we'd better have one
- local runner = runners[engine]
- if not runner then
- report_format("the format %a cannot be generated, no runner available for engine %a",name,engine)
- lfs.chdir(startupdir)
- return
+ -- lfs.chdir(validformatpath)
+ -- if dir.current() ~= validformatpath then
+ if not lfs.chdir(validformatpath) then
+ return fatalerror(startupdir,"unable to change to format path %a",validformatpath)
end
-- now we can generate the format, where we use a couple of flags,
-- split into two categories
local primaryflags = primaryflags(arguments)
local secondaryflags = secondaryflags(arguments)
- local specification = {
+ local specification = {
binarypath = binarypath,
primaryflags = primaryflags,
secondaryflags = secondaryflags,
- luafile = quoted(usedluastub),
+ luafile = quoted(fullluasourcename),
texfile = quoted(fulltexsourcename),
- dump = os.platform == "unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect = "> temp.log"
@@ -255,7 +210,7 @@ function environment.make_format(formatname)
end
report_format("format path : %s",validformatpath)
report_format("luatex engine : %s",engine)
- report_format("lua startup file : %s",usedluastub)
+ report_format("lua startup file : %s",fullluasourcename)
if primaryflags ~= "" then
report_format("primary flags : %s",primaryflags)
end
@@ -342,9 +297,9 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
luafile = quoted(scriptname),
texfile = filename ~= "" and quoted(filename) or "",
}
- statistics.starttiming()
+ statistics.starttiming("make format")
local result = runner(specification)
- local runtime = statistics.stoptiming()
+ statistics.stoptiming("make format")
if verbose then
report_format()
if binarypath and binarypath ~= "" then
@@ -362,7 +317,7 @@ function environment.run_format(formatname,scriptname,filename,primaryflags,seco
if secondaryflags ~= "" then
report_format("secondary flags : %s",secondaryflags)
end
- report_format("run time : %.3f seconds",runtime)
+ report_format("run time : %0.3f seconds",statistics.elapsed("make format"))
report_format("return value : %s",result == 0 and "okay" or "error")
report_format()
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua
index cec0161e7b0..dcca8cec7a8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.lua
@@ -25,21 +25,15 @@ if not global then
global = _G
end
-LUATEXVERSION = status.luatex_version/100
- + tonumber(status.luatex_revision)/10000
-
-LUATEXENGINE = status.luatex_engine and string.lower(status.luatex_engine)
- or (string.find(status.banner,"LuajitTeX",1,true) and "luajittex" or "luatex")
-
+LUATEXVERSION = status.luatex_version/100 + tonumber(status.luatex_revision)/10000
+LUATEXENGINE = status.luatex_engine and string.lower(status.luatex_engine) or "luametatex"
LUATEXFUNCTIONALITY = status.development_id or 6346
-
LUATEXFORMATID = status.format_id or 0
+JITSUPPORTED = false
+INITEXMODE = status.run_state == 0 -- initializing updating production
+CONTEXTLMTXMODE = 0
-JITSUPPORTED = LUATEXENGINE == "luajittex" or jit
-
-INITEXMODE = status.ini_version
-
-CONTEXTLMTXMODE = CONTEXTLMTXMODE or (LUATEXENGINE == "luametatex" and 1) or 0
+status.ini_version = INITEXMODE -- for a while
function os.setlocale()
-- no need for a message
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv
index d1d829be978..09014ad86cd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv
@@ -34,7 +34,7 @@
% the \type {\normalexpanded} around \type {\directlua}. Something to discuss
% in the team.
-\normalprotected\def\startlua % \stoplua
+\protected\def\startlua % \stoplua
{\begingroup
\obeylualines
\luat_start_lua_indeed}
@@ -42,7 +42,7 @@
\def\luat_start_lua_indeed#1\stoplua
{\normalexpanded{\endgroup\noexpand\directlua{#1}}} % \zerocount is default
-\normalprotected\def\startluacode % \stopluacode
+\protected\def\startluacode % \stopluacode
{\begingroup
\obeylualines
\obeyluatokens
@@ -77,24 +77,28 @@
\edef\lua_letter_seven {\string\7} \edef\lua_letter_eight {\string\8}
\edef\lua_letter_nine {\string\9} \edef\lua_letter_zero {\string\0}
+\pushoverloadmode
+ \let\-\explicitdiscretionary
+\popoverloadmode
+
\everyluacode {% \appendtoks
- \let\\\lua_letter_backslash
- \let\|\lua_letter_bar \let\-\lua_letter_dash
- \let\(\lua_letter_lparent \let\)\lua_letter_rparent
- \let\{\lua_letter_lbrace \let\}\lua_letter_rbrace
- \let\'\lua_letter_squote \let\"\lua_letter_dquote
- \let\n\lua_letter_n \let\r\lua_letter_r
- \let\f\lua_letter_f \let\t\lua_letter_t
- \let\a\lua_letter_a \let\b\lua_letter_b
- \let\v\lua_letter_v \let\s\lua_letter_s
- \let\1\lua_letter_one \let\2\lua_letter_two
- \let\3\lua_letter_three \let\4\lua_letter_four
- \let\5\lua_letter_five \let\6\lua_letter_six
- \let\7\lua_letter_seven \let\8\lua_letter_eight
- \let\9\lua_letter_nine \let\0\lua_letter_zero
+ \enforced\let\\\lua_letter_backslash
+ \enforced\let\|\lua_letter_bar \enforced\let\-\lua_letter_dash
+ \enforced\let\(\lua_letter_lparent \enforced\let\)\lua_letter_rparent
+ \enforced\let\{\lua_letter_lbrace \enforced\let\}\lua_letter_rbrace
+ \enforced\let\'\lua_letter_squote \enforced\let\"\lua_letter_dquote
+ \enforced\let\n\lua_letter_n \enforced\let\r\lua_letter_r
+ \enforced\let\f\lua_letter_f \enforced\let\t\lua_letter_t
+ \enforced\let\a\lua_letter_a \enforced\let\b\lua_letter_b
+ \enforced\let\v\lua_letter_v \enforced\let\s\lua_letter_s
+ \enforced\let\1\lua_letter_one \enforced\let\2\lua_letter_two
+ \enforced\let\3\lua_letter_three \enforced\let\4\lua_letter_four
+ \enforced\let\5\lua_letter_five \enforced\let\6\lua_letter_six
+ \enforced\let\7\lua_letter_seven \enforced\let\8\lua_letter_eight
+ \enforced\let\9\lua_letter_nine \enforced\let\0\lua_letter_zero
} % \to \everyluacode
-\normalprotected\def\obeyluatokens
+\protected\def\obeyluatokens
{\setcatcodetable\luacatcodes
\the\everyluacode}
@@ -121,13 +125,12 @@
%D \edef\luaescapestring#1{\!!bs#1\!!es}
%D \stoptyping
-\def\setdocumentfilename #1#2{\clf_setdocumentfilename\numexpr#1\relax{#2}}
-\def\setdocumentargument #1#2{\clf_setdocumentargument{#1}{#2}}
-\def\setdocumentargumentdefault#1#2{\clf_setdocumentdefaultargument{#1}{#2}}
-\def\getdocumentfilename #1{\clf_getdocumentfilename\numexpr#1\relax}
-\def\getdocumentargument #1{\clf_getdocumentargument{#1}{}}
-\def\setdocumentargument #1#2{\clf_setdocumentargument{#1}{#2}}
-\def\getdocumentargumentdefault#1#2{\clf_getdocumentargument{#1}{#2}}
+\protected\def\setdocumentfilename #1#2{\clf_setdocumentfilename\numexpr#1\relax{#2}}
+\protected\def\setdocumentargument #1#2{\clf_setdocumentargument{#1}{#2}}
+\protected\def\setdocumentargumentdefault#1#2{\clf_setdocumentdefaultargument{#1}{#2}}
+ \def\getdocumentfilename #1{\clf_getdocumentfilename\numexpr#1\relax}
+ \def\getdocumentargument #1{\clf_getdocumentargument{#1}{}}
+ \def\getdocumentargumentdefault#1#2{\clf_getdocumentargument{#1}{#2}}
% seldom used so no need for speedy variants:
@@ -147,7 +150,7 @@
%D Experimental:
-\normalprotected\def\startluaparameterset[#1]%
+\protected\def\startluaparameterset[#1]%
{\begingroup
\obeylualines
\obeyluatokens
@@ -186,7 +189,7 @@
%D \ctxluacode{context("%0.5f",1/3)}
%D \stoptyping
-\normalprotected\def\ctxluacode
+\protected\def\ctxluacode
{\begingroup
\obeylualines
\obeyluatokens
@@ -217,7 +220,7 @@
\installsystemnamespace{ctxfunction}
-\normalprotected\def\startctxfunctiondefinition #1 %
+\protected\def\startctxfunctiondefinition #1 %
{\begingroup \obeylualines \obeyluatokens \luat_start_lua_function_definition_indeed{#1}}
\installsystemnamespace{luafunction}
@@ -227,13 +230,13 @@
\expandafter\chardef\csname\??luafunction#1\endcsname\ctxcommand{ctxfunction(\!!bs#2\!!es)}\relax
\expandafter\edef\csname#1\endcsname{\noexpand\luafunction\csname\??luafunction#1\endcsname}}
-\normalprotected\def\setctxluafunction#1#2% experiment
+\protected\def\setctxluafunction#1#2% experiment
{\expandafter\chardef\csname\??luafunction#1\endcsname#2\relax
\expandafter\edef\csname#1\endcsname{\noexpand\luafunction\csname\??luafunction#1\endcsname}}
\let\stopctxfunctiondefinition\relax
-\normalprotected\def\startctxfunction #1 %
+\protected\def\startctxfunction #1 %
{\begingroup \obeylualines \obeyluatokens \luat_start_lua_function_indeed{#1}}
\def\luat_start_lua_function_indeed#1#2\stopctxfunction
@@ -267,23 +270,23 @@
% \ifdefined\normalluadef
- \normalprotected\def\installctxfunction#1#2% expandable
+ \protected\def\installctxfunction#1#2% expandable
{\edef\m_syst_name{\csstring#1}%
\global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction(\!!bs#2\!!es,true)}\relax}
- \normalprotected\def\installctxscanner#1#2% expandable
+ \protected\def\installctxscanner#1#2% expandable
{\edef\m_syst_name{\csstring#1}%
\global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name",\!!bs#2\!!es,true)}\relax}
- \normalprotected\def\installprotectedctxfunction#1#2% protected
+ \protected\def\installprotectedctxfunction#1#2% protected
{\edef\m_syst_name{\csstring#1}%
- \global\normalprotected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction(\!!bs#2\!!es,true)}\relax}
+ \global\protected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction(\!!bs#2\!!es,true)}\relax}
- \normalprotected\def\installprotectedctxscanner#1#2% protected
+ \protected\def\installprotectedctxscanner#1#2% protected
{\edef\m_syst_name{\csstring#1}%
- \global\normalprotected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name",\!!bs#2\!!es,true)}\relax}
+ \global\protected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name",\!!bs#2\!!es,true)}\relax}
- \normalprotected\def\resetctxscanner#1%
+ \protected\def\resetctxscanner#1%
{\edef\m_syst_name{\csstring#1}%
\expandafter\glet\csname\m_syst_name\endcsname\relax}
@@ -295,53 +298,53 @@
% \else
%
% \ifdefined\luafunctioncall \else
-% \normalprotected\def\luafunctioncall{\luafunction}
+% \protected\def\luafunctioncall{\luafunction}
% \fi
%
-% \normalprotected\def\installctxfunction#1#2% expandable
+% \protected\def\installctxfunction#1#2% expandable
% {\edef\m_syst_name{\csstring#1}%
% \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
% \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
%
-% \normalprotected\def\installctxscanner#1#2% expandable
+% \protected\def\installctxscanner#1#2% expandable
% {\edef\m_syst_name{\csstring#1}%
% \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
% \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
%
-% \normalprotected\def\installprotectedctxfunction#1#2% protected
+% \protected\def\installprotectedctxfunction#1#2% protected
% {\edef\m_syst_name{\csstring#1}%
% \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
% \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
%
-% \normalprotected\def\installprotectedctxscanner#1#2% protected
+% \protected\def\installprotectedctxscanner#1#2% protected
% {\edef\m_syst_name{\csstring#1}%
% \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
% \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
%
-% \normalprotected\def\resetctxscanner#1%
+% \protected\def\resetctxscanner#1%
% {\edef\m_syst_name{\csstring#1}%
% \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\zerocount
% \expandafter\glet\csname\m_syst_name\endcsname\relax}
%
-% % \normalprotected\def\installctxfunctioncall#1#2%
+% % \protected\def\installctxfunctioncall#1#2%
% % {\edef\m_syst_name{\csstring#1}%
% % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
% % \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
% %
-% % \normalprotected\def\installctxscannercall#1#2%
+% % \protected\def\installctxscannercall#1#2%
% % {\edef\m_syst_name{\csstring#1}%
% % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
% % \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
% %
-% % \normalprotected\def\installprotectedctxfunctioncall#1#2%
+% % \protected\def\installprotectedctxfunctioncall#1#2%
% % {\edef\m_syst_name{\csstring#1}%
% % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
-% % \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
+% % \protected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
% %
-% % \normalprotected\def\installprotectedctxscannercall#1#2%
+% % \protected\def\installprotectedctxscannercall#1#2%
% % {\edef\m_syst_name{\csstring#1}%
% % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
-% % \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
+% % \protected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
%
% \fi
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv
index 0ffd1dd4076..6dbcdaf54a3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-lib.mkiv
@@ -24,8 +24,8 @@
\registerctxluafile{util-dim}{}
\registerctxluafile{trac-set}{}
-\registerctxluafile{trac-log}{}
-\registerctxluafile{trac-inf}{}
+\registerctxluafile{luat-log}{autosuffix}
+\registerctxluafile{trac-inf}{autosuffix}
\registerctxluafile{util-lua}{}
\registerctxluafile{util-deb}{} % could also be done in trac-deb.mkiv
@@ -45,10 +45,6 @@
\registerctxluafile{util-soc-imp-http} {}
\registerctxluafile{util-soc-imp-tp} {}
-\ifcase\contextlmtxmode\else
- \registerctxluafile{util-zip}{}
-\fi
-
\registerctxluafile{data-ini}{}
\registerctxluafile{data-exp}{}
\registerctxluafile{data-env}{}
@@ -73,13 +69,9 @@
\registerctxluafile{data-use}{}
\registerctxluafile{data-aux}{}
-% \ifcase\contextlmtxmode
-% \registerctxluafile{util-lib}{}
-% \fi
-
\registerctxluafile{luat-cbk}{}
\registerctxluafile{luat-run}{}
-\registerctxluafile{luat-fio}{}
+\registerctxluafile{luat-fio}{autosuffix}
\registerctxluafile{luat-cnf}{}
\registerctxluafile{luat-lua}{}
\registerctxluafile{luat-sto}{}
@@ -99,8 +91,8 @@
\registerctxluafile{lxml-aux}{}
\registerctxluafile{lxml-mis}{}
-\normalprotected\def\writestatus#1#2{\ctxlua{logs.status([==[#1]==],[==[#2]==])}}
-\normalprotected\def\writestring #1{\ctxlua{logs.writer([==[#1]==],"\string\n")}}
-\normalprotected\def\writeline {\ctxlua{logs.newline()}}
+\protected\def\writestatus#1#2{\ctxlua{logs.status([==[#1]==],[==[#2]==])}}
+\protected\def\writestring #1{\ctxlua{logs.writer([==[#1]==],"\string\n")}}
+\protected\def\writeline {\ctxlua{logs.newline()}}
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-log.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-log.lua
new file mode 100644
index 00000000000..8bfec8d218e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-log.lua
@@ -0,0 +1,795 @@
+if not modules then modules = { } end modules ['luat-log'] = {
+ version = 1.001,
+ comment = "companion to trac-log.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- In fact all writes could go through lua and we could write the console and
+-- terminal handler in lua then. Ok, maybe it's slower then, so a no-go.
+
+-- This used to be combined in trac-log but as we also split between mkiv and lmtx
+-- we now have dedicated files. A side effect is a smaller format and a smaller
+-- mtxrun.
+
+local next, type, select, print = next, type, select, print
+local format, gmatch, find = string.format, string.gmatch, string.find
+local concat, insert, remove = table.concat, table.insert, table.remove
+local topattern = string.topattern
+local utfchar = utf.char
+local datetime = os.date
+local openfile = io.open
+
+local write_nl = texio and texio.write_nl
+local write = texio and texio.write
+
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+local settings_to_hash = utilities.parsers.settings_to_hash
+local sortedkeys = table.sortedkeys
+
+-- variant is set now
+
+local variant = "default"
+----- variant = "ansi"
+
+logs = logs or { }
+local logs = logs
+
+-- we extend the formatters:
+
+formatters.add (
+ formatters, "unichr",
+ [["U+" .. format("%%05X",%s) .. " (" .. utfchar(%s) .. ")"]]
+)
+
+formatters.add (
+ formatters, "chruni",
+ [[utfchar(%s) .. " (U+" .. format("%%05X",%s) .. ")"]]
+)
+
+-- basic loggers
+
+local function ignore() end
+
+setmetatableindex(logs, function(t,k) t[k] = ignore ; return ignore end)
+
+local report, subreport, status, settarget, setformats, settranslations
+
+local direct, subdirect, writer, pushtarget, poptarget, setlogfile, settimedlog, setprocessor, setformatters, newline
+
+-- we use formatters but best check for % then because for simple messages but
+-- we don't want this overhead for single messages (not that there are that
+-- many; we could have a special weak table)
+
+local function ansisupported(specification)
+ if specification ~= "ansi" and specification ~= "ansilog" then
+ return false
+ elseif os and os.enableansi then
+ return os.enableansi()
+ else
+ return false
+ end
+end
+
+do
+
+ if texio.setescape then
+ texio.setescape(0) -- or (false)
+ end
+
+ if arg and ansisupported then
+ -- we're don't have environment.arguments yet
+ for k, v in next, arg do -- k can be negative !
+ if v == "--ansi" or v == "--c:ansi" then
+ if ansisupported("ansi") then
+ variant = "ansi"
+ end
+ break
+ elseif v == "--ansilog" or v == "--c:ansilog" then
+ if ansisupported("ansilog") then
+ variant = "ansilog"
+ end
+ break
+ end
+ end
+ end
+
+ local function useluawrites()
+
+ -- quick hack, awaiting speedup in engine (8 -> 6.4 sec for --make with console2)
+ -- still needed for luajittex .. luatex should not have that ^^ mess
+
+ local texio_write_nl = texio.write_nl
+ local texio_write = texio.write
+ local io_write = io.write
+
+ write_nl = function(target,...)
+ if not io_write then
+ io_write = io.write
+ end
+ if target == "term and log" then
+ texio_write_nl("log",...)
+ texio_write_nl("term","")
+ io_write(...)
+ elseif target == "log" then
+ texio_write_nl("log",...)
+ elseif target == "term" then
+ texio_write_nl("term","")
+ io_write(...)
+ elseif type(target) == "number" then
+ texio_write_nl(target,...) -- a tex output channel
+ elseif target ~= "none" then
+ texio_write_nl("log",target,...)
+ texio_write_nl("term","")
+ io_write(target,...)
+ end
+ end
+
+ write = function(target,...)
+ if not io_write then
+ io_write = io.write
+ end
+ if target == "term and log" then
+ texio_write("log",...)
+ io_write(...)
+ elseif target == "log" then
+ texio_write("log",...)
+ elseif target == "term" then
+ io_write(...)
+ elseif type(target) == "number" then
+ texio_write(target,...) -- a tex output channel
+ elseif target ~= "none" then
+ texio_write("log",target,...)
+ io_write(target,...)
+ end
+ end
+
+ texio.write = write
+ texio.write_nl = write_nl
+
+ useluawrites = ignore
+
+ end
+
+ -- local format = string.formatter
+
+ local whereto = "both"
+ local target = nil
+ local targets = nil
+
+ local formats = table.setmetatableindex("self")
+ local translations = table.setmetatableindex("self")
+
+ local report_yes, subreport_yes, direct_yes, subdirect_yes, status_yes
+ local report_nop, subreport_nop, direct_nop, subdirect_nop, status_nop
+
+ local variants = {
+ default = {
+ formats = {
+ report_yes = formatters["%-15s > %s\n"],
+ report_nop = formatters["%-15s >\n"],
+ direct_yes = formatters["%-15s > %s"],
+ direct_nop = formatters["%-15s >"],
+ subreport_yes = formatters["%-15s > %s > %s\n"],
+ subreport_nop = formatters["%-15s > %s >\n"],
+ subdirect_yes = formatters["%-15s > %s > %s"],
+ subdirect_nop = formatters["%-15s > %s >"],
+ status_yes = formatters["%-15s : %s\n"],
+ status_nop = formatters["%-15s :\n"],
+ },
+ targets = {
+ logfile = "log",
+ log = "log",
+ file = "log",
+ console = "term",
+ terminal = "term",
+ both = "term and log",
+ },
+ },
+ ansi = {
+ formats = {
+ report_yes = formatters["%-15s > %s\n"],
+ report_nop = formatters["%-15s >\n"],
+ direct_yes = formatters["%-15s > %s"],
+ direct_nop = formatters["%-15s >"],
+ subreport_yes = formatters["%-15s > %s > %s\n"],
+ subreport_nop = formatters["%-15s > %s >\n"],
+ subdirect_yes = formatters["%-15s > %s > %s"],
+ subdirect_nop = formatters["%-15s > %s >"],
+ status_yes = formatters["%-15s : %s\n"],
+ status_nop = formatters["%-15s :\n"],
+ },
+ targets = {
+ logfile = "none",
+ log = "none",
+ file = "none",
+ console = "term",
+ terminal = "term",
+ both = "term",
+ },
+ }
+ }
+
+ variants.ansilog = {
+ formats = variants.ansi.formats,
+ targets = variants.default.targets,
+ }
+
+ logs.flush = io.flush
+
+ writer = function(...)
+ write_nl(target,...)
+ end
+
+ newline = function()
+ write_nl(target,"\n")
+ end
+
+ report = function(a,b,c,...)
+ if c ~= nil then
+ write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
+ elseif b then
+ write_nl(target,report_yes(translations[a],formats[b]))
+ elseif a then
+ write_nl(target,report_nop(translations[a]))
+ else
+ write_nl(target,"\n")
+ end
+ end
+
+ direct = function(a,b,c,...)
+ if c ~= nil then
+ return direct_yes(translations[a],formatters[formats[b]](c,...))
+ elseif b then
+ return direct_yes(translations[a],formats[b])
+ elseif a then
+ return direct_nop(translations[a])
+ else
+ return ""
+ end
+ end
+
+ subreport = function(a,s,b,c,...)
+ if c ~= nil then
+ write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
+ elseif b then
+ write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
+ elseif a then
+ write_nl(target,subreport_nop(translations[a],translations[s]))
+ else
+ write_nl(target,"\n")
+ end
+ end
+
+ subdirect = function(a,s,b,c,...)
+ if c ~= nil then
+ return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
+ elseif b then
+ return subdirect_yes(translations[a],translations[s],formats[b])
+ elseif a then
+ return subdirect_nop(translations[a],translations[s])
+ else
+ return ""
+ end
+ end
+
+ status = function(a,b,c,...)
+ if c ~= nil then
+ write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
+ elseif b then
+ write_nl(target,status_yes(translations[a],formats[b]))
+ elseif a then
+ write_nl(target,status_nop(translations[a]))
+ else
+ write_nl(target,"\n")
+ end
+ end
+
+ settarget = function(askedwhereto)
+ whereto = askedwhereto or whereto or "both"
+ target = targets[whereto]
+ if not target then
+ whereto = "both"
+ target = targets[whereto]
+ end
+ if target == "term" or target == "term and log" then
+ logs.flush = io.flush
+ else
+ logs.flush = ignore
+ end
+ end
+
+ local stack = { }
+
+ pushtarget = function(newtarget)
+ insert(stack,target)
+ settarget(newtarget)
+ end
+
+ poptarget = function()
+ if #stack > 0 then
+ settarget(remove(stack))
+ end
+ end
+
+ setformats = function(f)
+ formats = f
+ end
+
+ settranslations = function(t)
+ translations = t
+ end
+
+ setprocessor = function(f)
+ local writeline = write_nl
+ write_nl = function(target,...)
+ writeline(target,f(...))
+ end
+ end
+
+ setformatters = function(specification)
+ local t = nil
+ local f = nil
+ local d = variants.default
+ if not specification then
+ --
+ elseif type(specification) == "table" then
+ t = specification.targets
+ f = specification.formats or specification
+ else
+ if not ansisupported(specification) then
+ specification = "default"
+ end
+ local v = variants[specification]
+ if v then
+ t = v.targets
+ f = v.formats
+ variant = specification
+ end
+ end
+ targets = t or d.targets
+ target = targets[whereto] or target
+ if f then
+ d = d.formats
+ else
+ f = d.formats
+ d = f
+ end
+ setmetatableindex(f,d)
+ report_yes = f.report_yes
+ report_nop = f.report_nop
+ subreport_yes = f.subreport_yes
+ subreport_nop = f.subreport_nop
+ direct_yes = f.direct_yes
+ direct_nop = f.direct_nop
+ subdirect_yes = f.subdirect_yes
+ subdirect_nop = f.subdirect_nop
+ status_yes = f.status_yes
+ status_nop = f.status_nop
+ if variant == "ansi" or variant == "ansilog" then
+ useluawrites() -- because tex escapes ^^, not needed in lmtx
+ end
+ settarget(whereto)
+ end
+
+ setformatters(variant)
+
+ setlogfile = ignore
+ settimedlog = ignore
+
+ -- settimedlog = function()
+ -- local localtime = os.localtime
+ -- local writeline = write_nl
+ -- write_nl = function(f,...)
+ -- writeline(f,localtime() .. " | " .. concat { ... })
+ -- end
+ -- settimedlog = ignore
+ -- end
+
+end
+
+logs.report = report
+logs.subreport = subreport
+logs.status = status
+logs.settarget = settarget
+logs.pushtarget = pushtarget
+logs.poptarget = poptarget
+logs.setformats = setformats
+logs.settranslations = settranslations
+
+logs.setlogfile = setlogfile
+logs.settimedlog = settimedlog
+logs.setprocessor = setprocessor
+logs.setformatters = setformatters
+
+logs.direct = direct
+logs.subdirect = subdirect
+logs.writer = writer
+logs.newline = newline
+
+local data = { }
+local states = nil
+local force = false
+
+function logs.reporter(category,subcategory)
+ local logger = data[category]
+ if not logger then
+ local state = states == true
+ if not state and type(states) == "table" then
+ for c, _ in next, states do
+ if find(category,c) then
+ state = true
+ break
+ end
+ end
+ end
+ logger = {
+ reporters = { },
+ state = state,
+ }
+ data[category] = logger
+ end
+ local reporter = logger.reporters[subcategory or "default"]
+ if not reporter then
+ if subcategory then
+ reporter = function(...)
+ if force or not logger.state then
+ subreport(category,subcategory,...)
+ end
+ end
+ logger.reporters[subcategory] = reporter
+ else
+ local tag = category
+ reporter = function(...)
+ if force or not logger.state then
+ report(category,...)
+ end
+ end
+ logger.reporters.default = reporter
+ end
+ end
+ return reporter
+end
+
+logs.new = logs.reporter -- for old times sake
+
+-- context specicific: this ends up in the macro stream
+
+local ctxreport = logs.writer
+
+function logs.setmessenger(m)
+ ctxreport = m
+end
+
+function logs.messenger(category,subcategory)
+ -- we need to avoid catcode mess (todo: fast context)
+ if subcategory then
+ return function(...)
+ ctxreport(subdirect(category,subcategory,...))
+ end
+ else
+ return function(...)
+ ctxreport(direct(category,...))
+ end
+ end
+end
+
+-- so far
+
+local function setblocked(category,value) -- v.state == value == true : disable
+ if category == true or category == "all" then
+ -- lock all
+ category, value = "*", true
+ elseif category == false then
+ -- unlock all
+ category, value = "*", false
+ elseif value == nil then
+ -- lock selective
+ value = true
+ end
+ if category == "*" then
+ states = value
+ for k, v in next, data do
+ v.state = value
+ end
+ else
+ alllocked = false
+ states = settings_to_hash(category,type(states)=="table" and states or nil)
+ for c in next, states do
+ local v = data[c]
+ if v then
+ v.state = value
+ else
+ c = topattern(c,true,true)
+ for k, v in next, data do
+ if find(k,c) then
+ v.state = value
+ end
+ end
+ end
+ end
+ end
+end
+
+function logs.disable(category,value)
+ setblocked(category,value == nil and true or value)
+end
+
+function logs.enable(category)
+ setblocked(category,false)
+end
+
+function logs.categories()
+ return sortedkeys(data)
+end
+
+function logs.show()
+ local n, c, s, max = 0, 0, 0, 0
+ for category, v in table.sortedpairs(data) do
+ n = n + 1
+ local state = v.state
+ local reporters = v.reporters
+ local nc = #category
+ if nc > c then
+ c = nc
+ end
+ for subcategory, _ in next, reporters do
+ local ns = #subcategory
+ if ns > c then
+ s = ns
+ end
+ local m = nc + ns
+ if m > max then
+ max = m
+ end
+ end
+ local subcategories = concat(sortedkeys(reporters),", ")
+ if state == true then
+ state = "disabled"
+ elseif state == false then
+ state = "enabled"
+ else
+ state = "unknown"
+ end
+ -- no new here
+ report("logging","category %a, subcategories %a, state %a",category,subcategories,state)
+ end
+ report("logging","categories: %s, max category: %s, max subcategory: %s, max combined: %s",n,c,s,max)
+end
+
+local delayed_reporters = { }
+
+setmetatableindex(delayed_reporters,function(t,k)
+ local v = logs.reporter(k.name)
+ t[k] = v
+ return v
+end)
+
+function utilities.setters.report(setter,...)
+ delayed_reporters[setter](...)
+end
+
+directives.register("logs.blocked", function(v)
+ setblocked(v,true)
+end)
+
+directives.register("logs.target", function(v)
+ settarget(v)
+end)
+
+do
+
+ local report = logs.reporter("pages") -- not needed but saves checking when we grep for it
+ local texgetcount = tex and tex.getcount
+
+ local real, user, sub = 0, 0, 0
+
+ function logs.start_page_number()
+ real = texgetcount("realpageno")
+ user = texgetcount("userpageno")
+ sub = texgetcount("subpageno")
+ end
+
+ local timing = false
+ local usage = false
+ local lasttime = nil
+
+ logs.private = {
+ enablepagetiming = function()
+ usage = true
+ end,
+ getpagetiming = function()
+ return type(usage) == "table" and usage
+ end,
+ }
+
+ trackers.register("pages.timing", function() timing = "" end)
+
+ function logs.stop_page_number() -- the first page can includes the initialization so we omit this in average
+ if timing or usage then
+ local elapsed = statistics.currenttime(statistics)
+ local average, page
+ if not lasttime or real < 2 then
+ average = elapsed
+ page = elapsed
+ else
+ average = elapsed / (real - 1)
+ page = elapsed - lasttime
+ end
+ lasttime = elapsed
+ if timing then
+ timing = formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
+ end
+ if usage then
+ usage = {
+ page = {
+ real = real,
+ user = user,
+ sub = sub,
+ },
+ time = {
+ elapsed = elapsed,
+ page = page,
+ average = average,
+ }
+ }
+ end
+ end
+ if real <= 0 then
+ report("flushing page%s",timing)
+ elseif user <= 0 then
+ report("flushing realpage %s%s",real,timing)
+ elseif sub <= 0 then
+ report("flushing realpage %s, userpage %s%s",real,user,timing)
+ else
+ report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
+ end
+ logs.flush()
+ end
+
+end
+
+-- we don't have show_open and show_close callbacks yet
+
+do
+ local texerror = tex and tex.error or print
+ local formatters = string.formatters
+
+ function logs.texerrormessage(fmt,first,...) -- for the moment we put this function here
+ texerror(first and formatters[fmt](first,...) or fmt)
+ end
+
+end
+
+-- this is somewhat slower but prevents out-of-order messages when print is mixed
+-- with texio.write
+
+-- io.stdout:setvbuf('no')
+-- io.stderr:setvbuf('no')
+
+-- windows: > nul 2>&1
+-- unix : > null 2>&1
+
+if package.helpers.report then
+ package.helpers.report = logs.reporter("package loader") -- when used outside mtxrun
+end
+
+do
+
+ local finalactions = { }
+ local fatalerrors = { }
+ local possiblefatal = { }
+ local loggingerrors = false
+
+ function logs.loggingerrors()
+ return loggingerrors
+ end
+
+ directives.register("logs.errors",function(v)
+ loggingerrors = v
+ if type(v) == "string" then
+ fatalerrors = settings_to_hash(v)
+ else
+ fatalerrors = { }
+ end
+ end)
+
+ function logs.registerfinalactions(...)
+ insert(finalactions,...) -- so we can force an order if needed
+ end
+
+ local what = nil
+ local report = nil
+ local state = nil
+ local target = nil
+
+ local function startlogging(t,r,w,s)
+ target = t
+ state = force
+ force = true
+ report = type(r) == "function" and r or logs.reporter(r)
+ what = w
+ pushtarget(target)
+ newline()
+ if s then
+ report("start %s: %s",what,s)
+ else
+ report("start %s",what or "")
+ end
+ if target == "logfile" then
+ newline()
+ end
+ return report
+ end
+
+ local function stoplogging()
+ if target == "logfile" then
+ newline()
+ end
+ report("stop %s",what or "")
+ if target == "logfile" then
+ newline()
+ end
+ poptarget()
+ state = oldstate
+ end
+
+ function logs.startfilelogging(...)
+ return startlogging("logfile", ...)
+ end
+
+ logs.stopfilelogging = stoplogging
+
+ local done = false
+
+ function logs.starterrorlogging(r,w,...)
+ if not done then
+ pushtarget("terminal")
+ newline()
+ logs.report("error logging","start possible issues")
+ poptarget()
+ done = true
+ end
+ if fatalerrors[w] then
+ possiblefatal[w] = true
+ end
+ return startlogging("terminal",r,w,...)
+ end
+
+ logs.stoperrorlogging = stoplogging
+
+ function logs.finalactions()
+ if #finalactions > 0 then
+ for i=1,#finalactions do
+ finalactions[i]()
+ end
+ if done then
+ pushtarget("terminal")
+ newline()
+ logs.report("error logging","stop possible issues")
+ poptarget()
+ end
+ return next(possiblefatal) and sortedkeys(possiblefatal) or false
+ end
+ end
+
+end
+
+-- just in case we load from context
+
+local dummy = function() end
+
+function logs.application(t)
+ return {
+ name = t.name or tex.jobname,
+ banner = t.banner,
+ report = logs.reporter(t.name),
+ moreinfo = dummy,
+ export = dummy,
+ help = dummy,
+ identify = dummy,
+ version = dummy,
+ }
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua
index e6789a2338a..3c50a41f89c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-mac.lua
@@ -30,36 +30,125 @@ local report_macros = logs.reporter("interface","macros")
local stack, top, n, hashes = { }, nil, 0, { }
-local function set(s)
- if top then
- n = n + 1
- if n > 9 then
- report_macros("number of arguments > 9, ignoring %s",s)
- else
+-- local function set(s)
+-- if top then
+-- n = n + 1
+-- if n > 9 then
+-- report_macros("number of arguments > 9, ignoring %s",s)
+-- else
+-- local ns = #stack
+-- local h = hashes[ns]
+-- if not h then
+-- h = rep("#",2^(ns-1))
+-- hashes[ns] = h
+-- end
+-- if s == "ignore" then
+-- top[s] = ""
+-- return h .. "0"
+-- else
+-- local m = h .. n
+-- top[s] = m
+-- return m
+-- end
+-- end
+-- end
+-- end
+
+-- local function get(s)
+-- if s == "ignore" then
+-- return ""
+-- else
+-- if not top then
+-- report_macros("keeping #%s, no stack",s)
+-- return "#" .. s -- can be lua
+-- end
+-- local m = top[s]
+-- if m then
+-- return m
+-- else
+-- report_macros("keeping #%s, not on stack",s)
+-- return "#" .. s -- quite likely an error
+-- end
+-- end
+-- end
+
+local set = CONTEXTLMTXMODE > 0 and
+ function(s)
+ if top then
local ns = #stack
local h = hashes[ns]
if not h then
h = rep("#",2^(ns-1))
hashes[ns] = h
end
- local m = h .. n
- top[s] = m
- return m
+ if s == "ignore" then
+ return h .. "-"
+ elseif s == "spacer" then
+ return h .. "*"
+ elseif s == "pickup" then
+ return h .. ":"
+ else
+ n = n + 1
+ if n > 9 then
+ report_macros("number of arguments > 9, ignoring %s",s)
+ elseif s == "discard" then
+ top[s] = ""
+ return h .. "0"
+ elseif s == "keepbraces" then
+ top[s] = ""
+ return h .. "+"
+ elseif s == "mandate" then
+ top[s] = ""
+ return h .. "="
+ elseif s == "keepmandate" then
+ top[s] = ""
+ return h .. "_"
+ elseif s == "prunespacing" then
+ top[s] = ""
+ return h .. "/"
+ else
+ local m = h .. n
+ top[s] = m
+ return m
+ end
+ end
+ end
+ end
+or
+ function(s)
+ if top then
+ local ns = #stack
+ local h = hashes[ns]
+ if not h then
+ h = rep("#",2^(ns-1))
+ hashes[ns] = h
+ end
+ n = n + 1
+ if n > 9 then
+ report_macros("number of arguments > 9, ignoring %s",s)
+ else
+ local m = h .. n
+ top[s] = m
+ return m
+ end
end
end
-end
local function get(s)
- if not top then
- report_macros("keeping #%s, no stack",s)
- return "#" .. s -- can be lua
- end
- local m = top[s]
- if m then
- return m
+ if s == "ignore" or s == "discard" then
+ return ""
else
- report_macros("keeping #%s, not on stack",s)
- return "#" .. s -- quite likely an error
+ if not top then
+ report_macros("keeping #%s, no stack",s)
+ return "#" .. s -- can be lua
+ end
+ local m = top[s]
+ if m then
+ return m
+ else
+ report_macros("keeping #%s, not on stack",s)
+ return "#" .. s -- quite likely an error
+ end
end
end
@@ -209,7 +298,7 @@ end
function macros.convertfile(oldname,newname) -- beware, no testing on oldname == newname
local data = loadtexfile(oldname)
- data = interfaces.preprocessed(data) or "" -- interfaces not yet defined
+ data = macros.preprocessed(data) or "" -- interfaces not yet defined
savedata(newname,data)
end
@@ -336,6 +425,8 @@ end
-- ]]))
-- print(macros.preprocessed([[\checked \def \bla #bla{bla#{bla}}]]))
+-- print(macros.preprocessed([[\checked \def \bla #bla#discard#foo{bla#{bla}+#ignore+bla#foo}]]))
+-- print(macros.preprocessed([[\checked \def \bla #bla#ignore#foo{bla#{bla}+#ignore+bla#foo}]]))
-- print(macros.preprocessed([[\def\bla#bla{#{bla}bla}]]))
-- print(macros.preprocessed([[\def\blä#{blá}{blà:#{blá}}]]))
-- print(macros.preprocessed([[\def\blä#bla{blà:#bla}]]))
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua
index d29a463b88c..874287ee1a0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-run.lua
@@ -45,6 +45,7 @@ local function start_run()
if logs.start_run then
logs.start_run()
end
+ -- logs.report("engine","%s version %s, format id %s",LUATEXENGINE,LUATEXVERSION,LUATEXFORMATID)
for i=1,#startactions do
startactions[i]()
end
@@ -61,7 +62,9 @@ local function stop_run()
if trace_tex_status then
logs.newline()
for k, v in table.sortedhash(status.list()) do
- report_tex("%S=%S",k,v)
+ if type(v) ~= "table" then
+ report_tex("%S=%S",k,v)
+ end
end
end
if quit then
@@ -99,18 +102,11 @@ end
local function report_output_log()
end
--- local function show_open()
--- end
-
--- local function show_close()
--- end
-
local function pre_dump_actions()
for i=1,#dumpactions do
dumpactions[i]()
end
lua.finalize(trace_lua_dump and report_lua or nil)
- -- statistics.savefmtstatus("\jobname","\contextversion","context.tex")
end
local function wrapup_synctex()
@@ -131,10 +127,10 @@ appendgroup(wrapupactions,"user")
appendgroup(cleanupactions,"system")
appendgroup(cleanupactions,"user")
-local function wrapup_run()
+local function wrapup_run(someerror)
local runner = wrapupactions.runner
if runner then
- runner()
+ runner(someerror) -- we could use the error flag in lmtx
end
end
@@ -297,3 +293,36 @@ end)
-- end
-- end)
+local report = logs.reporter("csname overload")
+local reported = { }
+
+callback.register("handle_overload", function(fatal,overload,csname,flags)
+ if not reported[csname] then
+ logs.newline()
+ local readstate = status.readstate
+ local filename = readstate.filename
+ local linenumber = readstate.linenumber
+ local flags = tokens.flags and tokens.flags(csname) or { }
+ if filename and linenumber then
+ report("%s, protection level %i, control sequence %a, properties '% t', file %a, line %i",
+ fatal and "fatal error" or "warning",overload,csname,flags,filename,linenumber)
+ else
+ report("%s, protection level %i, control sequence %a, properties '% t'",
+ fatal and "fatal error" or "warning",overload,csname,flags)
+ end
+ reported[csname] = true
+ logs.newline()
+ if fatal then
+ cleanup_run()
+ osexit(1)
+ end
+ end
+end)
+
+-- bonus
+
+if environment.initex then
+
+ luatex.registerdumpactions(statistics.showmemory)
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua
index 620de9a15b4..feb5464009b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua
@@ -94,27 +94,12 @@ if environment.initex then
end
--- to be tested with otf caching:
-
-function lua.collectgarbage(threshold)
- local current = collectgarbage("count")
- local threshold = threshold or 256 * 1024
- while true do
- collectgarbage("collect")
- local previous = collectgarbage("count")
- if current - previous < threshold then
- break
- else
- current = previous
- end
- end
-end
-
statistics.register("stored bytecode data", function()
- local nofmodules = (storage.nofmodules > 0 and storage.nofmodules) or (status.luabytecodes - lua.firstbytecode - 1)
- local nofdumps = (storage.noftables > 0 and storage.noftables ) or storage.max-storage.min + 1
- local tofmodules = storage.tofmodules or 0
- local tofdumps = storage.toftables or 0
+ local nofbytecodes = CONTEXTLMTXMODE > 0 and status.luastate.bytecodes or status.luabytecodes
+ local nofmodules = (storage.nofmodules > 0 and storage.nofmodules) or (nofbytecodes - lua.firstbytecode - 1)
+ local nofdumps = (storage.noftables > 0 and storage.noftables ) or storage.max-storage.min + 1
+ local tofmodules = storage.tofmodules or 0
+ local tofdumps = storage.toftables or 0
if environment.initex then
local luautilities = utilities.lua
return format("%s modules, %s tables, %s chunks, %s chunks stripped (%s bytes)",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua
index b49379bbf05..1756bb19842 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.lua
@@ -102,23 +102,6 @@ interfaces.implement {
arguments = "2 strings",
}
--- local scanners = interfaces.scanners
---
--- local function ctxscanner(name)
--- local scanner = scanners[name]
--- if scanner then
--- scanner()
--- else
--- report("unknown scanner: %s",name)
--- end
--- end
---
--- interfaces.implement {
--- name = "clfscanner",
--- actions = ctxscanner,
--- arguments = "string",
--- }
-
local function registername(name,message)
if not name or name == "" then
report_instance("no valid name given")
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv
index f3868ccf4bc..ebd96e031c4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-usr.mkiv
@@ -38,13 +38,14 @@
%D \macros
%D {definenamedlua}
%D
-%D We provide an interface for defining instances:
+%D We provide an interface for defining instances. We don't have the definers yet
+%D so we do itlow level:
\def\s!lua {lua}
\def\s!code {code}
\def\s!data {data}
-%def\s!start{start}
-%def\s!stop {stop}
+\def\s!start{start}
+\def\s!stop {stop}
%D Beware: because \type {\expanded} is een convert command, the error
%D message will show \type{<inserted text>} as part of the message.
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua
index ed0f03fd8c7..126df4d82de 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-aux.lua
@@ -22,7 +22,7 @@ local xmlapplylpath = xml.applylpath
local type, next, setmetatable, getmetatable = type, next, setmetatable, getmetatable
local insert, remove, fastcopy, concat = table.insert, table.remove, table.fastcopy, table.concat
-local gmatch, gsub, format, find, strip = string.gmatch, string.gsub, string.format, string.find, string.strip
+local gmatch, gsub, format, find, strip, match = string.gmatch, string.gsub, string.format, string.find, string.strip, string.match
local utfbyte = utf.byte
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local striplinepatterns = utilities.strings.striplinepatterns
@@ -176,7 +176,7 @@ local function xmltoelement(whatever,root)
end
local element
if type(whatever) == "string" then
- element = xmlinheritedconvert(whatever,root) -- beware, not really a root
+ element = xmlinheritedconvert(whatever,root,true) -- beware, not really a root
else
element = whatever -- we assume a table
end
@@ -195,16 +195,29 @@ end
xml.toelement = xmltoelement
+-- local function copiedelement(element,newparent)
+-- if type(element) ~= "string" then
+-- element = xmlcopy(element).dt
+-- if newparent and type(element) == "table" then
+-- element.__p__ = newparent
+-- end
+-- end
+-- return element
+-- end
+
local function copiedelement(element,newparent)
- if type(element) == "string" then
- return element
- else
+ if type(element) ~= "string" then
element = xmlcopy(element).dt
if newparent and type(element) == "table" then
- element.__p__ = newparent
+ for i=1,#element do
+ local e = element[i]
+ if type(e) == "table" then
+ e.__p__ = newparent
+ end
+ end
end
- return element
end
+ return element
end
function xml.delete(root,pattern)
@@ -247,6 +260,33 @@ function xml.delete(root,pattern)
end
end
+function xml.wipe(root,pattern) -- not yet in manual
+ local collected = xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e = collected[c]
+ local p = e.__p__
+ if p then
+ local d = p.dt
+ local ni = e.ni
+ if ni <= #d then
+ local dt = e.dt
+ if #dt == 1 then
+ local d1 = dt[1]
+ if type(d1) == "string" and match(d1,"^%s*$") then
+ if trace_manipulations then
+ report('wiping',pattern,c,e)
+ end
+ remove(d,ni)
+ redo_ni(d) -- can be made faster and inlined
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
function xml.replace(root,pattern,whatever)
local element = root and xmltoelement(whatever,root)
local collected = element and xmlapplylpath(root,pattern)
@@ -430,10 +470,10 @@ local function include(xmldata,pattern,attribute,recursive,loaddata,level)
-- for the moment hard coded
epdt[ek.ni] = xml.escaped(data) -- d[k] = xml.escaped(data)
else
-local settings = xmldata.settings
-local savedresource = settings.currentresource
-settings.currentresource = name
- local xi = xmlinheritedconvert(data,xmldata)
+ local settings = xmldata.settings
+ local savedresource = settings.currentresource
+ settings.currentresource = name
+ local xi = xmlinheritedconvert(data,xmldata,true)
if not xi then
epdt[ek.ni] = "" -- xml.empty(d,k)
else
@@ -443,7 +483,7 @@ settings.currentresource = name
local child = xml.body(xi) -- xml.assign(d,k,xi)
child.__p__ = ekrt
child.__f__ = name -- handy for tracing
-child.cf = name
+ child.cf = name
epdt[ek.ni] = child
local settings = xmldata.settings
local inclusions = settings and settings.inclusions
@@ -517,30 +557,49 @@ end
local b_collapser = lpegpatterns.b_collapser
local m_collapser = lpegpatterns.m_collapser
local e_collapser = lpegpatterns.e_collapser
+local x_collapser = lpegpatterns.x_collapser
local b_stripper = lpegpatterns.b_stripper
local m_stripper = lpegpatterns.m_stripper
local e_stripper = lpegpatterns.e_stripper
+local x_stripper = lpegpatterns.x_stripper
-local function stripelement(e,nolines,anywhere)
+local function stripelement(e,nolines,anywhere,everything)
local edt = e.dt
if edt then
local n = #edt
if n == 0 then
return e -- convenient
+ elseif everything then
+ local t = { }
+ local m = 0
+ for i=1,n do
+ local str = edt[i]
+ if type(str) ~= "string" then
+ m = m + 1
+ t[m] = str
+ elseif str ~= "" then
+ str = lpegmatch(x_collapser,str)
+ if str ~= "" then
+ m = m + 1
+ t[m] = str
+ end
+ end
+ end
+ e.dt = t
elseif anywhere then
local t = { }
local m = 0
- for e=1,n do
- local str = edt[e]
+ for i=1,n do
+ local str = edt[i]
if type(str) ~= "string" then
m = m + 1
t[m] = str
elseif str ~= "" then
if nolines then
- str = lpegmatch((n == 1 and b_collapser) or (n == m and e_collapser) or m_collapser,str)
+ str = lpegmatch((i == 1 and b_collapser) or (i == m and e_collapser) or m_collapser,str)
else
- str = lpegmatch((n == 1 and b_stripper) or (n == m and e_stripper) or m_stripper,str)
+ str = lpegmatch((i == 1 and b_stripper) or (i == m and e_stripper) or m_stripper,str)
end
if str ~= "" then
m = m + 1
@@ -584,15 +643,51 @@ end
xml.stripelement = stripelement
-function xml.strip(root,pattern,nolines,anywhere) -- strips all leading and trailing spacing
+function xml.strip(root,pattern,nolines,anywhere,everything) -- strips all leading and trailing spacing
local collected = xmlapplylpath(root,pattern) -- beware, indices no longer are valid now
if collected then
for i=1,#collected do
- stripelement(collected[i],nolines,anywhere)
+ stripelement(collected[i],nolines,anywhere,everything)
end
end
+-- return root
end
+-- local function compactelement(e)
+-- local edt = e.dt
+-- if edt then
+-- local t = { }
+-- local m = 0
+-- for e=1,#edt do
+-- local str = edt[e]
+-- if type(str) ~= "string" then
+-- m = m + 1
+-- t[m] = str
+-- elseif str ~= "" and find(str,"%S") then
+-- m = m + 1
+-- t[m] = str
+-- end
+-- end
+-- e.dt = t
+-- end
+-- return e -- convenient
+-- end
+
+local function compactelement(e)
+ local edt = e.dt
+ if edt then
+ for e=1,#edt do
+ local str = edt[e]
+ if type(str) == "string" and not find(str,"%S") then
+ edt[e] = ""
+ end
+ end
+ end
+ return e -- convenient
+end
+
+xml.compactelement = compactelement
+
local function renamespace(root, oldspace, newspace) -- fast variant
local ndt = #root.dt
for i=1,ndt or 0 do
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua
index 96dc626f7db..76cc4891e1d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.lua
@@ -17,6 +17,8 @@ local setmetatableindex = table.setmetatableindex
xml.css = xml.css or { }
local css = xml.css
+local report_css = logs and logs.reporter("xml","css") or function(...) print(string.format(...)) end
+
local getid = lxml.getid
if not number.dimenfactors then
@@ -787,7 +789,7 @@ local p_not = P(":not") * Cc(true) * skipspace * P("(") * skipspace
local p_yes = Cc(false) * skipspace * p_step
local p_stepper = Ct((skipspace * (p_not+p_yes))^1)
-local p_steps = Ct((p_stepper * p_separator^0)^1) * skipspace * (P(-1) + function() print("error") end)
+local p_steps = Ct((p_stepper * p_separator^0)^1) * skipspace * (P(-1) + function() report_css("recovering from error") end)
local cache = setmetatableindex(function(t,k)
local v = lpegmatch(p_steps,k) or false
@@ -1063,13 +1065,15 @@ end
-- -- faster interface (1.02):
interfaces.implement {
- name = "xmlstylevalue",
+ name = "xmlcssstylevalue",
+ public = true,
actions = css.stylevalue,
arguments = "2 strings",
}
interfaces.implement {
- name = "xmlmappedstylevalue",
+ name = "xmlcssmappedstylevalue",
+ public = true,
actions = css.mappedstylevalue,
arguments = "3 strings",
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv
index 04000a6caba..271afdb7dc7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-css.mkiv
@@ -69,8 +69,8 @@
% \xmlregistersetup{html:settings}
% \xmlprocessbuffer{main}{temp}{}
-\let\xmlcssstylevalue \clf_xmlstylevalue
-\let\xmlcssmappedstylevalue\clf_xmlmappedstylevalue
+% \xmlcssstylevalue % defined at lua end
+% \xmlcssmappedstylevalue % defined at lua end
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv
index e0beb22bf68..7d44d61bea1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ctx.mkiv
@@ -11,8 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D Experimental. This might change! Also, it might become a module
-%D instead if core code.
+%D Experimental. This might change! Also, it might become a module instead if
+%D core code.
\writestatus{loading}{ConTeXt XML Support / Goodies}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua
index 348ecbbe45c..43643f71a18 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.lua
@@ -21,120 +21,124 @@ local implement = interfaces.implement
-- lxml.id
-implement { name = "lxmlid", actions = lxml.getid, arguments = "string" }
-
-implement { name = "xmldoif", actions = lxml.doif, arguments = "2 strings" }
-implement { name = "xmldoifnot", actions = lxml.doifnot, arguments = "2 strings" }
-implement { name = "xmldoifelse", actions = lxml.doifelse, arguments = "2 strings" }
-implement { name = "xmldoiftext", actions = lxml.doiftext, arguments = "2 strings" }
-implement { name = "xmldoifnottext", actions = lxml.doifnottext, arguments = "2 strings" }
-implement { name = "xmldoifelsetext", actions = lxml.doifelsetext, arguments = "2 strings" }
-
-implement { name = "xmldoifempty", actions = lxml.doifempty, arguments = "2 strings" }
-implement { name = "xmldoifnotempty", actions = lxml.doifnotempty, arguments = "2 strings" }
-implement { name = "xmldoifelseempty", actions = lxml.doifelseempty, arguments = "2 strings" }
-implement { name = "xmldoifselfempty", actions = lxml.doifempty, arguments = "string" } -- second arg is not passed (used)
-implement { name = "xmldoifnotselfempty", actions = lxml.doifnotempty, arguments = "string" } -- second arg is not passed (used)
-implement { name = "xmldoifelseselfempty", actions = lxml.doifelseempty, arguments = "string" } -- second arg is not passed (used)
-
---------- { name = "xmlcontent", actions = lxml.content, arguments = "string" }
---------- { name = "xmlflushstripped", actions = lxml.strip, arguments = { "string", true } }
-
-implement { name = "xmlall", actions = lxml.all, arguments = "2 strings" }
-implement { name = "xmlatt", actions = lxml.att, arguments = "2 strings" }
-implement { name = "xmlattdef", actions = lxml.att, arguments = "3 strings" }
-implement { name = "xmlattribute", actions = lxml.attribute, arguments = "3 strings" }
-implement { name = "xmlattributedef", actions = lxml.attribute, arguments = "4 strings" }
-implement { name = "xmlbadinclusions", actions = lxml.badinclusions, arguments = "string" }
-implement { name = "xmlchainatt", actions = lxml.chainattribute, arguments = { "string", "'/'", "string" } }
-implement { name = "xmlchainattdef", actions = lxml.chainattribute, arguments = { "string", "'/'", "string", "string" } }
-implement { name = "xmlchecknamespace", actions = xml.checknamespace, arguments = { "lxmlid", "string", "string" } }
-implement { name = "xmlcommand", actions = lxml.command, arguments = "3 strings" }
-implement { name = "xmlconcat", actions = lxml.concat, arguments = "3 strings" } -- \detokenize{#3}
-implement { name = "xmlconcatrange", actions = lxml.concatrange, arguments = { "string", "string", "string", "string", "string" } } -- \detokenize{#5}
-implement { name = "xmlcontext", actions = lxml.context, arguments = "2 strings" }
-implement { name = "xmlcount", actions = lxml.count, arguments = "2 strings" }
-implement { name = "xmldelete", actions = lxml.delete, arguments = "2 strings" }
-implement { name = "xmldirect", actions = lxml.direct, arguments = "string" }
-implement { name = "xmldirectives", actions = lxml.directives.setup, arguments = "string" }
-implement { name = "xmldirectivesafter", actions = lxml.directives.after, arguments = "string" }
-implement { name = "xmldirectivesbefore", actions = lxml.directives.before, arguments = "string" }
-implement { name = "xmldisplayverbatim", actions = lxml.displayverbatim, arguments = "string" }
-implement { name = "xmlelement", actions = lxml.element, arguments = "2 strings" } -- could be integer but now we can alias
-implement { name = "xmlfilter", actions = lxml.filter, arguments = "2 strings" }
-implement { name = "xmlfilterlist", actions = lxml.filterlist, arguments = "2 strings" }
-implement { name = "xmlfirst", actions = lxml.first, arguments = "2 strings" }
-implement { name = "xmlflush", actions = lxml.flush, arguments = "string" }
-implement { name = "xmlflushcontext", actions = lxml.context, arguments = "string" }
-implement { name = "xmlflushlinewise", actions = lxml.flushlinewise, arguments = "string" }
-implement { name = "xmlflushpure", actions = lxml.pure, arguments = "string" }
-implement { name = "xmlflushspacewise", actions = lxml.flushspacewise, arguments = "string" }
-implement { name = "xmlflushtext", actions = lxml.text, arguments = "string" }
-implement { name = "xmlfunction", actions = lxml.applyfunction, arguments = "2 strings" }
-implement { name = "xmlinclude", actions = lxml.include, arguments = { "string", "string", "string", true } }
-implement { name = "xmlincludeoptions", actions = lxml.include, arguments = "4 strings" }
-implement { name = "xmlinclusion", actions = lxml.inclusion, arguments = "string" }
-implement { name = "xmlinclusionbase", actions = lxml.inclusion, arguments = { "string", false, true } }
-implement { name = "xmlinclusions", actions = lxml.inclusions, arguments = "string" }
-implement { name = "xmlindex", actions = lxml.index, arguments = "3 strings" } -- can be integer but now we can alias
-implement { name = "xmlinlineverbatim", actions = lxml.inlineverbatim, arguments = "string" }
-implement { name = "xmllast", actions = lxml.last, arguments = "2 strings" }
-implement { name = "xmllastatt", actions = lxml.lastatt }
-implement { name = "xmllastmatch", actions = lxml.lastmatch }
-implement { name = "xmllastpar", actions = lxml.lastpar }
-implement { name = "xmlloadfile", actions = lxml.load, arguments = "3 strings" }
-implement { name = "xmlloadbuffer", actions = lxml.loadbuffer, arguments = "3 strings" }
-implement { name = "xmlloaddata", actions = lxml.loaddata, arguments = "3 strings" }
-implement { name = "xmlloaddirectives", actions = lxml.directives.load, arguments = "string" }
-implement { name = "xmlmain", actions = lxml.main, arguments = "string" }
-implement { name = "xmlmatch", actions = lxml.match, arguments = "string" }
-implement { name = "xmlname", actions = lxml.name, arguments = "string" }
-implement { name = "xmlnamespace", actions = lxml.namespace, arguments = "string" }
-implement { name = "xmlnonspace", actions = lxml.nonspace, arguments = "2 strings" }
-implement { name = "xmlpar", actions = lxml.par, arguments = "2 strings" }
-implement { name = "xmlparam", actions = lxml.param, arguments = "3 strings" }
-implement { name = "xmlpath", actions = lxml.path, arguments = { "string", "'/'" } }
-implement { name = "xmlpopmatch", actions = lxml.popmatch }
-implement { name = "xmlpos", actions = lxml.pos, arguments = "string" }
-implement { name = "xmlpure", actions = lxml.pure, arguments = "2 strings" }
-implement { name = "xmlpushmatch", actions = lxml.pushmatch }
-implement { name = "xmlraw", actions = lxml.raw, arguments = "2 strings" }
-implement { name = "xmlrawtex", actions = lxml.rawtex, arguments = "2 strings" }
-implement { name = "xmlrefatt", actions = lxml.refatt, arguments = "2 strings" }
-implement { name = "xmlregisterns", actions = xml.registerns, arguments = "2 strings" }
-implement { name = "xmlremapname", actions = xml.remapname, arguments = { "lxmlid", "string","string","string" } }
-implement { name = "xmlremapnamespace", actions = xml.renamespace, arguments = { "lxmlid", "string", "string" } }
-implement { name = "xmlsave", actions = lxml.save, arguments = "2 strings" }
-implement { name = "xmlsetatt", actions = lxml.setatt, arguments = "3 strings" }
-implement { name = "xmlsetattribute", actions = lxml.setattribute, arguments = "4 strings" }
-implement { name = "xmlsetpar", actions = lxml.setpar, arguments = "3 strings" }
-implement { name = "xmlsetparam", actions = lxml.setparam, arguments = "4 strings" }
-implement { name = "xmlsetsetup", actions = lxml.setsetup, arguments = "3 strings" }
-implement { name = "xmlsnippet", actions = lxml.snippet, arguments = "2 strings" }
-implement { name = "xmlstrip", actions = lxml.strip, arguments = "2 strings" }
-implement { name = "xmlstripanywhere", actions = lxml.strip, arguments = { "string", "string", true, true } }
-implement { name = "xmlstripnolines", actions = lxml.strip, arguments = { "string", "string", true } }
-implement { name = "xmlstripped", actions = lxml.stripped, arguments = "2 strings" }
-implement { name = "xmlstrippednolines", actions = lxml.stripped, arguments = { "string", "string", true } }
-implement { name = "xmltag", actions = lxml.tag, arguments = "string" }
-implement { name = "xmltext", actions = lxml.text, arguments = "2 strings" }
-implement { name = "xmltobuffer", actions = lxml.tobuffer, arguments = "3 strings" }
-implement { name = "xmltobuffertextonly", actions = lxml.tobuffer, arguments = { "string", "string", "string", false } }
-implement { name = "xmltobufferverbose", actions = lxml.tobuffer, arguments = { "string", "string", "string", true, true } }
-implement { name = "xmltofile", actions = lxml.tofile, arguments = "3 strings" }
-implement { name = "xmltoparameters", actions = lxml.toparameters, arguments = "string" }
-implement { name = "xmlverbatim", actions = lxml.verbatim, arguments = "string" }
-
-implement { name = "xmlstartraw", actions = lxml.startraw }
-implement { name = "xmlstopraw", actions = lxml.stopraw }
-
-implement { name = "xmlprependsetup", actions = lxml.installsetup, arguments = { 1, "string", "string" } } -- 2:*
-implement { name = "xmlappendsetup", actions = lxml.installsetup, arguments = { 2, "string", "string" } } -- 2:*
-implement { name = "xmlbeforesetup", actions = lxml.installsetup, arguments = { 3, "string", "string", "string" } } -- 2:*
-implement { name = "xmlaftersetup", actions = lxml.installsetup, arguments = { 4, "string", "string", "string" } } -- 2:*
-implement { name = "xmlremovesetup", actions = lxml.removesetup, arguments = "2 strings" } -- 1:*
-implement { name = "xmlflushsetups", actions = lxml.flushsetups, arguments = "3 strings" } -- 2:*
-implement { name = "xmlresetsetups", actions = lxml.resetsetups, arguments = "string" }
+implement { name = "lxmlid", public = true, actions = lxml.getid, arguments = "string" }
+
+implement { name = "xmldoif", public = true, actions = lxml.doif, arguments = "2 strings" }
+implement { name = "xmldoifnot", public = true, actions = lxml.doifnot, arguments = "2 strings" }
+implement { name = "xmldoifelse", public = true, actions = lxml.doifelse, arguments = "2 strings" }
+implement { name = "xmldoiftext", public = true, actions = lxml.doiftext, arguments = "2 strings" }
+implement { name = "xmldoifnottext", public = true, actions = lxml.doifnottext, arguments = "2 strings" }
+implement { name = "xmldoifelsetext", public = true, actions = lxml.doifelsetext, arguments = "2 strings" }
+
+implement { name = "xmldoifempty", public = true, actions = lxml.doifempty, arguments = "2 strings" }
+implement { name = "xmldoifnotempty", public = true, actions = lxml.doifnotempty, arguments = "2 strings" }
+implement { name = "xmldoifelseempty", public = true, actions = lxml.doifelseempty, arguments = "2 strings" }
+implement { name = "xmldoifselfempty", public = true, actions = lxml.doifempty, arguments = "string" } -- second arg is not passed (used)
+implement { name = "xmldoifnotselfempty", public = true, actions = lxml.doifnotempty, arguments = "string" } -- second arg is not passed (used)
+implement { name = "xmldoifelseselfempty", public = true, actions = lxml.doifelseempty, arguments = "string" } -- second arg is not passed (used)
+
+--------- { name = "xmlcontent", actions = lxml.content, arguments = "string" }
+--------- { name = "xmlflushstripped", actions = lxml.strip, arguments = { "string", true } }
+
+implement { name = "xmlall", public = true, actions = lxml.all, arguments = "2 strings" }
+implement { name = "xmlatt", public = true, actions = lxml.att, arguments = "2 strings" }
+implement { name = "xmlattdef", public = true, actions = lxml.att, arguments = "3 strings" }
+implement { name = "xmlattribute", public = true, actions = lxml.attribute, arguments = "3 strings" }
+implement { name = "xmlattributedef", public = true, actions = lxml.attribute, arguments = "4 strings" }
+implement { name = "xmlbadinclusions", public = true, actions = lxml.badinclusions, arguments = "string" }
+implement { name = "xmlchainatt", public = true, actions = lxml.chainattribute, arguments = { "string", "'/'", "string" } }
+implement { name = "xmlchainattdef", public = true, actions = lxml.chainattribute, arguments = { "string", "'/'", "string", "string" } }
+implement { name = "xmlchecknamespace", public = true, actions = xml.checknamespace, arguments = { "lxmlid", "string", "string" } }
+implement { name = "xmlcommand", public = true, actions = lxml.command, arguments = "3 strings" }
+implement { name = "xmlconcat", actions = lxml.concat, arguments = "3 strings" } -- \detokenize{#3}
+implement { name = "xmlconcatrange", actions = lxml.concatrange, arguments = "5 strings" } -- \detokenize{#5}
+--------- { name = "xmlconcat", actions = lxml.concat, arguments = { "string", "string", "verbatim" } }
+--------- { name = "xmlconcatrange", actions = lxml.concatrange, arguments = { "string", "string", "string", "string", "verbatim" } }
+implement { name = "xmlcontext", public = true, actions = lxml.context, arguments = "2 strings" }
+implement { name = "xmlcount", public = true, actions = lxml.count, arguments = "2 strings" }
+implement { name = "xmldepth", public = true, actions = lxml.depth, arguments = "string" }
+implement { name = "xmldelete", public = true, actions = lxml.delete, arguments = "2 strings" }
+implement { name = "xmldirect", public = true, actions = lxml.direct, arguments = "string" }
+implement { name = "xmldirectives", public = true, actions = lxml.directives.setup, arguments = "string" }
+implement { name = "xmldirectivesafter", public = true, actions = lxml.directives.after, arguments = "string" }
+implement { name = "xmldirectivesbefore", public = true, actions = lxml.directives.before, arguments = "string" }
+implement { name = "xmldisplayverbatim", public = true, actions = lxml.displayverbatim, arguments = "string" }
+implement { name = "xmlelement", public = true, actions = lxml.element, arguments = "2 strings" } -- could be integer but now we can alias
+implement { name = "xmlfilter", public = true, actions = lxml.filter, arguments = "2 strings" }
+implement { name = "xmlfilterlist", public = true, actions = lxml.filterlist, arguments = "2 strings" }
+implement { name = "xmlfirst", public = true, actions = lxml.first, arguments = "2 strings" }
+implement { name = "xmlflush", public = true, actions = lxml.flush, arguments = "string" }
+implement { name = "xmlflushcontext", public = true, actions = lxml.context, arguments = "string" }
+implement { name = "xmlflushlinewise", public = true, actions = lxml.flushlinewise, arguments = "string" }
+implement { name = "xmlflushpure", public = true, actions = lxml.pure, arguments = "string" }
+implement { name = "xmlflushspacewise", public = true, actions = lxml.flushspacewise, arguments = "string" }
+implement { name = "xmlflushtext", public = true, actions = lxml.text, arguments = "string" }
+implement { name = "xmlfunction", public = true, actions = lxml.applyfunction, arguments = "2 strings" }
+implement { name = "xmlinclude", public = true, actions = lxml.include, arguments = { "string", "string", "string", true } }
+implement { name = "xmlincludeoptions", public = true, actions = lxml.include, arguments = "4 strings" }
+implement { name = "xmlinclusion", public = true, actions = lxml.inclusion, arguments = "string" }
+implement { name = "xmlinclusionbase", public = true, actions = lxml.inclusion, arguments = { "string", false, true } }
+implement { name = "xmlinclusions", public = true, actions = lxml.inclusions, arguments = "string" }
+implement { name = "xmlindex", public = true, actions = lxml.index, arguments = "3 strings" } -- can be integer but now we can alias
+implement { name = "xmlinlineverbatim", public = true, actions = lxml.inlineverbatim, arguments = "string" }
+implement { name = "xmllast", public = true, actions = lxml.last, arguments = "2 strings" }
+implement { name = "xmllastatt", public = true, actions = lxml.lastatt }
+implement { name = "xmllastmatch", public = true, actions = lxml.lastmatch }
+implement { name = "xmllastpar", public = true, actions = lxml.lastpar }
+implement { name = "xmlloadfile", actions = lxml.load, arguments = "3 strings" }
+implement { name = "xmlloadbuffer", actions = lxml.loadbuffer, arguments = "3 strings" }
+implement { name = "xmlloaddata", actions = lxml.loaddata, arguments = "3 strings" }
+implement { name = "xmlloaddirectives", public = true, actions = lxml.directives.load, arguments = "string" }
+implement { name = "xmlmain", public = true, actions = lxml.main, arguments = "string" }
+implement { name = "xmlmatch", public = true, actions = lxml.match, arguments = "string" }
+implement { name = "xmlname", public = true, actions = lxml.name, arguments = "string" }
+implement { name = "xmlnamespace", public = true, actions = lxml.namespace, arguments = "string" }
+implement { name = "xmlnonspace", public = true, actions = lxml.nonspace, arguments = "2 strings" }
+implement { name = "xmlpar", public = true, actions = lxml.par, arguments = "2 strings" }
+implement { name = "xmlparam", public = true, actions = lxml.param, arguments = "3 strings" }
+implement { name = "xmlpath", public = true, actions = lxml.path, arguments = { "string", "'/'" } }
+implement { name = "xmlpopmatch", public = true, actions = lxml.popmatch }
+implement { name = "xmlpos", public = true, actions = lxml.pos, arguments = "string" }
+implement { name = "xmlpure", public = true, actions = lxml.pure, arguments = "2 strings" }
+implement { name = "xmlpushmatch", public = true, actions = lxml.pushmatch }
+implement { name = "xmlraw", public = true, actions = lxml.raw, arguments = "2 strings" }
+implement { name = "xmlrawtex", actions = lxml.rawtex, arguments = "2 strings" }
+implement { name = "xmlrefatt", public = true, actions = lxml.refatt, arguments = "2 strings" }
+implement { name = "xmlregisterns", public = true, actions = xml.registerns, arguments = "2 strings" }
+implement { name = "xmlremapname", public = true, actions = xml.remapname, arguments = { "lxmlid", "string","string","string" } }
+implement { name = "xmlremapnamespace", public = true, actions = xml.renamespace, arguments = { "lxmlid", "string", "string" } }
+implement { name = "xmlsave", public = true, actions = lxml.save, arguments = "2 strings" }
+implement { name = "xmlsetatt", public = true, actions = lxml.setatt, arguments = "3 strings" }
+implement { name = "xmlsetattribute", public = true, actions = lxml.setattribute, arguments = "4 strings" }
+implement { name = "xmlsetpar", public = true, actions = lxml.setpar, arguments = "3 strings" }
+implement { name = "xmlsetparam", public = true, actions = lxml.setparam, arguments = "4 strings" }
+implement { name = "xmlsetsetup", public = true, actions = lxml.setsetup, arguments = "3 strings" }
+implement { name = "xmlsnippet", public = true, actions = lxml.snippet, arguments = "2 strings" }
+implement { name = "xmlstrip", public = true, actions = lxml.strip, arguments = "2 strings" }
+implement { name = "xmlstripanywhere", public = true, actions = lxml.strip, arguments = { "string", "string", true, true } }
+implement { name = "xmlstripeverything", public = true, actions = lxml.strip, arguments = { "string", "string", true, true, true } }
+implement { name = "xmlstripnolines", public = true, actions = lxml.strip, arguments = { "string", "string", true } }
+implement { name = "xmlstripped", public = true, actions = lxml.stripped, arguments = "2 strings" }
+implement { name = "xmlstrippednolines", public = true, actions = lxml.stripped, arguments = { "string", "string", true } }
+implement { name = "xmltag", public = true, actions = lxml.tag, arguments = "string" }
+implement { name = "xmltext", public = true, actions = lxml.text, arguments = "2 strings" }
+implement { name = "xmltobuffer", public = true, actions = lxml.tobuffer, arguments = "3 strings" }
+implement { name = "xmltobuffertextonly", public = true, actions = lxml.tobuffer, arguments = { "string", "string", "string", false } }
+implement { name = "xmltobufferverbose", public = true, actions = lxml.tobuffer, arguments = { "string", "string", "string", true, true } }
+implement { name = "xmltofile", public = true, actions = lxml.tofile, arguments = "3 strings" }
+implement { name = "xmltoparameters", public = true, actions = lxml.toparameters, arguments = "string" }
+implement { name = "xmlverbatim", public = true, actions = lxml.verbatim, arguments = "string" }
+
+implement { name = "xmlstartraw", actions = lxml.startraw }
+implement { name = "xmlstopraw", actions = lxml.stopraw }
+
+implement { name = "xmlprependsetup", actions = lxml.installsetup, arguments = { 1, "string", "string" } } -- 2:*
+implement { name = "xmlappendsetup", actions = lxml.installsetup, arguments = { 2, "string", "string" } } -- 2:*
+implement { name = "xmlbeforesetup", actions = lxml.installsetup, arguments = { 3, "string", "string", "string" } } -- 2:*
+implement { name = "xmlaftersetup", actions = lxml.installsetup, arguments = { 4, "string", "string", "string" } } -- 2:*
+implement { name = "xmlremovesetup", actions = lxml.removesetup, arguments = "2 strings" } -- 1:*
+implement { name = "xmlflushsetups", actions = lxml.flushsetups, arguments = "3 strings" } -- 2:*
+implement { name = "xmlresetsetups", actions = lxml.resetsetups, arguments = "string" }
implement { name = "xmlgetindex", actions = lxml.getindex, arguments = "2 strings" }
implement { name = "xmlwithindex", actions = lxml.withindex, arguments = "3 strings" }
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv
index 09358e11cba..52514519a96 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-ini.mkiv
@@ -34,7 +34,7 @@
\def\ctxlxml #1{\ctxlua{lxml.#1}}
-% for now indirect
+% for now indirect .. this will change when we have updated luatex (scan_argument)
\def\xmlconcat #1#2#3{\clf_xmlconcat {#1}{#2}{\detokenize{#3}}}
\def\xmlconcatrange #1#2#3#4#5{\clf_xmlconcatrange{#1}{#2}{#3}{#4}{\detokenize{#5}}}
@@ -49,93 +49,94 @@
% aliased
-\let\xmlall \clf_xmlall
-\let\xmlatt \clf_xmlatt
-\let\xmlattdef \clf_xmlattdef
-\let\xmlattribute \clf_xmlattribute
-\let\xmlattributedef \clf_xmlattributedef
-\let\xmlbadinclusions \clf_xmlbadinclusions
-\let\xmlchainatt \clf_xmlchainatt
-\let\xmlchainattdef \clf_xmlchainattdef
-\let\xmlchecknamespace \clf_xmlchecknamespace
-\let\xmlcommand \clf_xmlcommand
-\let\xmlcontext \clf_xmlcontext
-\let\xmlcount \clf_xmlcount
-\let\xmldelete \clf_xmldelete
-\let\xmldirect \clf_xmldirect % in loops, not dt but root
-\let\xmldirectives \clf_xmldirectives
-\let\xmldirectivesafter \clf_xmldirectivesafter
-\let\xmldirectivesbefore \clf_xmldirectivesbefore
-\let\xmldisplayverbatim \clf_xmldisplayverbatim
-\let\xmlelement \clf_xmlelement
-\let\xmlfilter \clf_xmlfilter
-\let\xmlfilterlist \clf_xmlfilterlist
-\let\xmlfirst \clf_xmlfirst
-\let\xmlflush \clf_xmlflush
-\let\xmlflushcontext \clf_xmlflushcontext
-\let\xmlflushlinewise \clf_xmlflushlinewise
-\let\xmlflushpure \clf_xmlflushpure
-\let\xmlflushspacewise \clf_xmlflushspacewise
-\let\xmlflushtext \clf_xmlflushtext
-\let\xmlfunction \clf_xmlfunction
-\let\xmlinclude \clf_xmlinclude
-\let\xmlincludeoptions \clf_xmlincludeoptions
-\let\xmlinclusion \clf_xmlinclusion
-\let\xmlinclusionbase \clf_xmlinclusionbase
-\let\xmlinclusions \clf_xmlinclusions
-\let\xmlindex \clf_xmlindex
-\let\xmlinlineverbatim \clf_xmlinlineverbatim
-\let\xmllast \clf_xmllast
-\let\xmllastatt \clf_xmllastatt
-\let\xmllastmatch \clf_xmllastmatch
-\let\xmllastpar \clf_xmllastpar
-\let\xmlloaddirectives \clf_xmlloaddirectives
-\let\xmlmain \clf_xmlmain
-\let\xmlmatch \clf_xmlmatch
-\let\xmlname \clf_xmlname
-\let\xmlnamespace \clf_xmlnamespace
-\let\xmlnonspace \clf_xmlnonspace
-\let\xmlpar \clf_xmlpar
-\let\xmlparam \clf_xmlparam
-\let\xmlpath \clf_xmlpath
-\let\xmlpopmatch \clf_xmlpopmatch
-\let\xmlpos \clf_xmlpos
-\let\xmlposition \clf_xmlindex
-\let\xmlpure \clf_xmlpure
-\let\xmlpushmatch \clf_xmlpushmatch
-\let\xmlraw \clf_xmlraw
-\let\xmlrefatt \clf_xmlrefatt
-\let\xmlregisterns \clf_xmlregisterns % document
-\let\xmlremapname \clf_xmlremapname % element
-\let\xmlremapnamespace \clf_xmlremapnamespace % document
-\let\xmlsave \clf_xmlsave
-\let\xmlsetatt \clf_xmlsetatt
-\let\xmlsetattribute \clf_xmlsetattribute
-\let\xmlsetpar \clf_xmlsetpar
-\let\xmlsetparam \clf_xmlsetparam
-\let\xmlsetsetup \clf_xmlsetsetup
-\let\xmlsnippet \clf_xmlsnippet
-\let\xmlstrip \clf_xmlstrip
-\let\xmlstripanywhere \clf_xmlstripanywhere
-\let\xmlstripnolines \clf_xmlstripnolines
-\let\xmlstripped \clf_xmlstripped
-\let\xmlstrippednolines \clf_xmlstrippednolines
-\let\xmltag \clf_xmltag
-\let\xmltext \clf_xmltext
-\let\xmltobuffer \clf_xmltobuffer % id pattern name
-\let\xmltobuffertextonly \clf_xmltobuffertextonly % id pattern name
-\let\xmltobufferverbose \clf_xmltobufferverbose % id pattern name
-\let\xmltofile \clf_xmltofile % id pattern filename
-\let\xmltoparameters \clf_xmltoparameters
-\let\xmlverbatim \clf_xmlverbatim
-
-\unexpanded\def\xmlinfo#1{\hbox{\ttxx[\clf_xmlname{#1}]}}
+%let\xmlall \clf_xmlall
+%let\xmlatt \clf_xmlatt
+%let\xmlattdef \clf_xmlattdef
+%let\xmlattribute \clf_xmlattribute
+%let\xmlattributedef \clf_xmlattributedef
+%let\xmlbadinclusions \clf_xmlbadinclusions
+%let\xmlchainatt \clf_xmlchainatt
+%let\xmlchainattdef \clf_xmlchainattdef
+%let\xmlchecknamespace \clf_xmlchecknamespace
+%let\xmlcommand \clf_xmlcommand
+%let\xmlcontext \clf_xmlcontext
+%let\xmlcount \clf_xmlcount
+%let\xmldelete \clf_xmldelete
+%let\xmldirect \clf_xmldirect % in loops, not dt but root
+%let\xmldirectives \clf_xmldirectives
+%let\xmldirectivesafter \clf_xmldirectivesafter
+%let\xmldirectivesbefore \clf_xmldirectivesbefore
+%let\xmldisplayverbatim \clf_xmldisplayverbatim
+%let\xmlelement \clf_xmlelement
+%let\xmlfilter \clf_xmlfilter
+%let\xmlfilterlist \clf_xmlfilterlist
+%let\xmlfirst \clf_xmlfirst
+%let\xmlflush \clf_xmlflush
+%let\xmlflushcontext \clf_xmlflushcontext
+%let\xmlflushlinewise \clf_xmlflushlinewise
+%let\xmlflushpure \clf_xmlflushpure
+%let\xmlflushspacewise \clf_xmlflushspacewise
+%let\xmlflushtext \clf_xmlflushtext
+%let\xmlfunction \clf_xmlfunction
+%let\xmlinclude \clf_xmlinclude
+%let\xmlincludeoptions \clf_xmlincludeoptions
+%let\xmlinclusion \clf_xmlinclusion
+%let\xmlinclusionbase \clf_xmlinclusionbase
+%let\xmlinclusions \clf_xmlinclusions
+%let\xmlindex \clf_xmlindex
+%let\xmlinlineverbatim \clf_xmlinlineverbatim
+%let\xmllast \clf_xmllast
+%let\xmllastatt \clf_xmllastatt
+%let\xmllastmatch \clf_xmllastmatch
+%let\xmllastpar \clf_xmllastpar
+%let\xmlloaddirectives \clf_xmlloaddirectives
+%let\xmlmain \clf_xmlmain
+%let\xmlmatch \clf_xmlmatch
+%let\xmlname \clf_xmlname
+%let\xmlnamespace \clf_xmlnamespace
+%let\xmlnonspace \clf_xmlnonspace
+%let\xmlpar \clf_xmlpar
+%let\xmlparam \clf_xmlparam
+%let\xmlpath \clf_xmlpath
+%let\xmlpopmatch \clf_xmlpopmatch
+%let\xmlpos \clf_xmlpos
+%let\xmlpure \clf_xmlpure
+%let\xmlpushmatch \clf_xmlpushmatch
+%let\xmlraw \clf_xmlraw
+%let\xmlrefatt \clf_xmlrefatt
+%let\xmlregisterns \clf_xmlregisterns % document
+%let\xmlremapname \clf_xmlremapname % element
+%let\xmlremapnamespace \clf_xmlremapnamespace % document
+%let\xmlsave \clf_xmlsave
+%let\xmlsetatt \clf_xmlsetatt
+%let\xmlsetattribute \clf_xmlsetattribute
+%let\xmlsetpar \clf_xmlsetpar
+%let\xmlsetparam \clf_xmlsetparam
+%let\xmlsetsetup \clf_xmlsetsetup
+%let\xmlsnippet \clf_xmlsnippet
+%let\xmlstrip \clf_xmlstrip
+%let\xmlstripanywhere \clf_xmlstripanywhere
+%let\xmlstripnolines \clf_xmlstripnolines
+%let\xmlstripped \clf_xmlstripped
+%let\xmlstrippednolines \clf_xmlstrippednolines
+%let\xmltag \clf_xmltag
+%let\xmltext \clf_xmltext
+%let\xmltobuffer \clf_xmltobuffer % id pattern name
+%let\xmltobuffertextonly \clf_xmltobuffertextonly % id pattern name
+%let\xmltobufferverbose \clf_xmltobufferverbose % id pattern name
+%let\xmltofile \clf_xmltofile % id pattern filename
+%let\xmltoparameters \clf_xmltoparameters
+%let\xmlverbatim \clf_xmlverbatim
+
+\let\xmlposition \xmlindex
+
+\unexpanded\def\xmlinfo#1{\hbox{\ttxx[\xmlname{#1}]}}
\unexpanded\def\xmlshow#1{\startpacked\ttx\xmlverbatim{#1}\stoppacked}
% the next one is handy for mode runs because it enforces a consistent
% #1 indexing (needed when using \xmltext{main:123}{...} like calls
-\let\xmladdindex \clf_xmladdindex
+%let\xmladdindex \clf_xmladdindex
% we need to pass the last argument as function, so
@@ -185,23 +186,23 @@
% these are expandable! todo: \xmldoifelseattribute
-\let\xmldoif \clf_xmldoif
-\let\xmldoifnot \clf_xmldoifnot
-\let\xmldoifelse \clf_xmldoifelse
-\let\xmldoiftext \clf_xmldoiftext
-\let\xmldoifnottext \clf_xmldoifnottext
-\let\xmldoifelsetext \clf_xmldoifelsetext
-
-\let\xmldoifatt \clf_xmldoifatt
-\let\xmldoifnotatt \clf_xmldoifnotatt
-\let\xmldoifelseatt \clf_xmldoifelseatt
-
-\let\xmldoifempty \clf_xmldoifempty
-\let\xmldoifnotempty \clf_xmldoifnotempty
-\let\xmldoifelseempty \clf_xmldoifelseempty
-\let\xmldoifselfempty \clf_xmldoifselfempty
-\let\xmldoifnotselfempty \clf_xmldoifnotselfempty
-\let\xmldoifelseselfempty \clf_xmldoifelseselfempty
+%let\xmldoif \clf_xmldoif
+%let\xmldoifnot \clf_xmldoifnot
+%let\xmldoifelse \clf_xmldoifelse
+%let\xmldoiftext \clf_xmldoiftext
+%let\xmldoifnottext \clf_xmldoifnottext
+%let\xmldoifelsetext \clf_xmldoifelsetext
+
+%let\xmldoifatt \clf_xmldoifatt
+%let\xmldoifnotatt \clf_xmldoifnotatt
+%let\xmldoifelseatt \clf_xmldoifelseatt
+
+%let\xmldoifempty \clf_xmldoifempty
+%let\xmldoifnotempty \clf_xmldoifnotempty
+%let\xmldoifelseempty \clf_xmldoifelseempty
+%let\xmldoifselfempty \clf_xmldoifselfempty
+%let\xmldoifnotselfempty \clf_xmldoifnotselfempty
+%let\xmldoifelseselfempty \clf_xmldoifelseselfempty
\let\xmldoiftextelse \xmldoifelsetext
\let\xmldoifemptyelse \xmldoifelseempty
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua
index 5bcdfbabcb0..9e4b475fb09 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-lpt.lua
@@ -648,7 +648,7 @@ local lp_attribute = (P("@") + P("attribute::")) / "" * Cc("(ll.at and ll.at['")
----- lp_fastpos_n = (P("-") * R("09")^1 * P(-1)) / function(s) return "(" .. s .. "<0 and (#list+".. s .. "==l))" end
local lp_fastpos_p = P("+")^0 * R("09")^1 * P(-1) / "l==%0"
-local lp_fastpos_n = P("-") * R("09")^1 * P(-1) / "(%0<0 and (#list+%0==l))"
+local lp_fastpos_n = P("-") * R("09")^1 * P(-1) / "(%0<0 and (#list+%0+1==l))" -- +1 added
local lp_fastpos = lp_fastpos_n + lp_fastpos_p
local lp_reserved = C("and") + C("or") + C("not") + C("div") + C("mod") + C("true") + C("false")
@@ -1317,6 +1317,8 @@ end
-- return false
-- end
+-- could be a hashed hash
+
expressions.oneof = function(s,...)
for i=1,select("#",...) do
if s == select(i,...) then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua
index 8f6379f2f8b..3af4974d300 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-tab.lua
@@ -1292,13 +1292,26 @@ end
xml.convert = xmlconvert
-function xml.inheritedconvert(data,xmldata) -- xmldata is parent
+function xml.inheritedconvert(data,xmldata,cleanup) -- xmldata is parent
local settings = xmldata.settings
if settings then
settings.parent_root = xmldata -- to be tested
end
-- settings.no_root = true
local xc = xmlconvert(data,settings) -- hm, we might need to locate settings
+ if cleanup then
+ local x = xc.dt
+ if x then
+ x = x[1]
+ if x and x.tg == "@pi@" then
+ local dt = x.dt
+ local pi = dt and dt[1]
+ if type(pi) == "string" and find(pi,"^xml") then
+ remove(dt,1)
+ end
+ end
+ end
+ end
-- xc.settings = nil
-- xc.entities = nil
-- xc.special = nil
@@ -1414,9 +1427,17 @@ local function copy(old,p)
new[k] = t
elseif k == "dt" then
v.__p__ = nil
- v = copy(v,new)
- new[k] = v
- v.__p__ = p
+ local t = { }
+ for i=1,#v do
+ local vi = v[i]
+ if type(vi) == "table" then
+ t[i] = copy(vi,new)
+ else
+ t[i] = vi
+ end
+ end
+ new[k] = t
+ t.__p__ = p
else
new[k] = v -- so we also share entities, etc in root
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua
index 9ab8cafc60a..7a79ee15f4d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lxml-tex.lua
@@ -14,7 +14,7 @@ local concat, insert, remove, sortedkeys, reversed = table.concat, table.insert,
local format, sub, gsub, find, gmatch, match = string.format, string.sub, string.gsub, string.find, string.gmatch, string.match
local type, next, tonumber, tostring, select = type, next, tonumber, tostring, select
local lpegmatch = lpeg.match
-local P, S, C, Cc, Cs = lpeg.P, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs
+local P, S, C = lpeg.P, lpeg.S, lpeg.C
local patterns = lpeg.patterns
local setmetatableindex = table.setmetatableindex
local formatters, strip = string.formatters, string.strip
@@ -472,6 +472,7 @@ lxml.addindex = addindex
implement {
name = "xmladdindex",
arguments = "string",
+ public = true,
actions = addindex,
}
@@ -1754,6 +1755,23 @@ local function concatlist(collected,separator,lastseparator,textonly) -- test th
concatrange(collected,false,false,separator,lastseparator,textonly)
end
+local function depth(collected)
+ local d = 0
+ if collected then
+ local c = collected and collected[1]
+ if c.tg then
+ while c do
+ d = d + 1
+ c = c.__p__
+ if not c then
+ break
+ end
+ end
+ end
+ end
+ contextsprint(ctxcatcodes,d)
+end
+
texfinalizers.first = first
texfinalizers.last = last
texfinalizers.all = all
@@ -1777,6 +1795,7 @@ texfinalizers.concatrange = concatrange
texfinalizers.chainattribute = chainattribute
texfinalizers.chainpath = chainpath
texfinalizers.default = all -- !!
+texfinalizers.depth = depth
function texfinalizers.tag(collected,n)
if collected then
@@ -1862,6 +1881,10 @@ lxml.verbatim = verbatim
-- helpers
+function lxml.depth(id)
+ depth { getid(id) }
+end
+
function lxml.first(id,pattern)
local collected = xmlapplylpath(getid(id),pattern)
if collected then
@@ -2070,7 +2093,8 @@ do
implement {
name = "xmldoifatt",
arguments = "3 strings",
- actions = function(id,k,v)
+ public = true,
+ actions = function(id,k,v)
local e = getid(id)
ctx_doif(e and e.at[k] == v or false)
end
@@ -2079,7 +2103,8 @@ do
implement {
name = "xmldoifnotatt",
arguments = "3 strings",
- actions = function(id,k,v)
+ public = true,
+ actions = function(id,k,v)
local e = getid(id)
ctx_doifnot(e and e.at[k] == v or false)
end
@@ -2088,7 +2113,8 @@ do
implement {
name = "xmldoifelseatt",
arguments = "3 strings",
- actions = function(id,k,v)
+ public = true,
+ actions = function(id,k,v)
local e = getid(id)
ctx_doifelse(e and e.at[k] == v or false)
end
@@ -2356,8 +2382,8 @@ function lxml.nonspace(id,pattern) -- slow, todo loop
xmltprint(xmlcollect(getid(id),pattern,true))
end
-function lxml.strip(id,pattern,nolines,anywhere)
- xml.strip(getid(id),pattern,nolines,anywhere)
+function lxml.strip(id,pattern,nolines,anywhere,everywhere)
+ xml.strip(getid(id),pattern,nolines,anywhere,everywhere)
end
function lxml.stripped(id,pattern,nolines)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv b/Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv
index 08c23e7cc87..3300e0d799a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/m-oldbibtex.mkiv
@@ -10,7 +10,12 @@
%C This module is part of the \CONTEXT\ macro||package and is therefore copyrighted
%D by \PRAGMA. See mreadme.pdf for details.
-\loadmarkfile{bibl-bib}
-\loadmarkfile{bibl-tra}
+\ifconditional\contextlmtxmode
+ \loadmkivfile{bibl-bib}
+ \loadmkivfile{bibl-tra}
+\else
+ \loadmkivfile{bibl-bib}
+ \loadmkxlfile{bibl-tra}
+\fi
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-act.lua b/Master/texmf-dist/tex/context/base/mkiv/math-act.lua
index 1f0140960fe..e1ef751d7ed 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-act.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-act.lua
@@ -55,7 +55,11 @@ end
function mathematics.initializeparameters(target,original)
local mathparameters = original.mathparameters
if mathparameters and next(mathparameters) then
- target.mathparameters = mathematics.dimensions(mathparameters)
+ mathparameters = mathematics.dimensions(mathparameters)
+ if not mathparameters.SpaceBeforeScript then
+ mathparameters.SpaceBeforeScript = mathparameters.SpaceAfterScript
+ end
+ target.mathparameters = mathparameters
end
end
@@ -224,117 +228,6 @@ sequencers.appendaction("mathparameters","system","mathematics.overloadparameter
sequencers.appendaction("beforecopyingcharacters","system","mathematics.tweakbeforecopyingfont")
sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweakaftercopyingfont")
-local virtualized = mathematics.virtualized
-
-function mathematics.overloaddimensions(target,original,set)
- local goodies = target.goodies
- if goodies then
- for i=1,#goodies do
- local goodie = goodies[i]
- local mathematics = goodie.mathematics
- local dimensions = mathematics and mathematics.dimensions
- if dimensions then
- if trace_defining then
- report_math("overloading dimensions in %a @ %p",target.properties.fullname,target.parameters.size)
- end
- local characters = target.characters
- local descriptions = target.descriptions
- local parameters = target.parameters
- local factor = parameters.factor
- local hfactor = parameters.hfactor
- local vfactor = parameters.vfactor
- -- to be sure
- target.type = "virtual"
- target.properties.virtualized = true
- --
- local function overload(dimensions)
- for unicode, data in next, dimensions do
- local character = characters[unicode]
- if not character then
- local c = virtualized[unicode]
- if c then
- character = characters[c]
- end
- end
- if character then
- --
- local width = data.width
- local height = data.height
- local depth = data.depth
- if trace_defining and (width or height or depth) then
- report_math("overloading dimensions of %C, width %p, height %p, depth %p",
- unicode,width or 0,height or 0,depth or 0)
- end
- if width then character.width = width * hfactor end
- if height then character.height = height * vfactor end
- if depth then character.depth = depth * vfactor end
- --
- local xoffset = data.xoffset
- local yoffset = data.yoffset
- if xoffset == "llx" then
- local d = descriptions[unicode]
- if d then
- xoffset = - d.boundingbox[1] * hfactor
- character.width = character.width + xoffset
- xoffset = rightcommand[xoffset]
- else
- xoffset = nil
- end
- elseif xoffset and xoffset ~= 0 then
- xoffset = rightcommand[xoffset * hfactor]
- else
- xoffset = nil
- end
- if yoffset and yoffset ~= 0 then
- yoffset = upcommand[yoffset * vfactor]
- else
- yoffset = nil
- end
- if xoffset or yoffset then
- local commands = characters.commands
- if commands then
- prependcommands(commands,yoffset,xoffset)
- else
- local slot = charcommand[unicode]
- if xoffset and yoffset then
- character.commands = { xoffset, yoffset, slot }
- elseif xoffset then
- character.commands = { xoffset, slot }
- else
- character.commands = { yoffset, slot }
- end
- end
- end
- elseif trace_defining then
- report_math("no overloading dimensions of %C, not in font",unicode)
- end
- end
- end
- if set == nil then
- set = { "default" }
- end
- if set == "all" or set == true then
- for name, set in next, dimensions do
- overload(set)
- end
- else
- if type(set) == "string" then
- set = utilities.parsers.settings_to_array(set)
- end
- if type(set) == "table" then
- for i=1,#set do
- local d = dimensions[set[i]]
- if d then
- overload(d)
- end
- end
- end
- end
- end
- end
- end
-end
-
-- no, it's a feature now (see good-mth):
--
-- sequencers.appendaction("aftercopyingcharacters", "system","mathematics.overloaddimensions")
@@ -350,6 +243,8 @@ mathematics.tweaks = tweaks
-- these could go to math-fbk
+-- local virtualized = mathematics.virtualized
+--
-- local function accent_to_extensible(target,newchr,original,oldchr,height,depth,swap)
-- local characters = target.characters
-- -- if not characters[newchr] then -- xits needs an enforce
@@ -599,8 +494,10 @@ interfaces.implement {
-- if not fonts then
-- fonts = { }
-- target.fonts = fonts
+-- if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
-- target.type = "virtual"
-- target.properties.virtualized = true
+-- end
-- end
-- if #fonts == 0 then
-- fonts[1] = { id = 0, size = size } -- sel, will be resolved later
@@ -705,8 +602,10 @@ function mathematics.finishfallbacks(target,specification,fallbacks)
fonts = { }
target.fonts = fonts
end
+ --
target.type = "virtual"
target.properties.virtualized = true
+ --
if #fonts == 0 then
fonts[1] = { id = 0, size = size } -- self, will be resolved later
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv
index 400326d2691..e617224d22d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ali.mkiv
@@ -50,23 +50,6 @@
\def\displayopenupvalue{.25\bodyfontsize}
-% \def\math_build_eqalign
-% {\scratchtoks\emptytoks
-% \d_math_eqalign_distance\mathalignmentparameter\c!distance
-% \scratchcounterone\mathalignmentparameter\c!m
-% \scratchcountertwo\mathalignmentparameter\c!n
-% \normalexpanded{\scratchtoks{\the\scratchtoks\the\t_math_align_a}}%
-% \scratchcounter\plusone
-% \dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
-% {\ifnum\scratchcounter=\scratchcountertwo
-% \scratchcounter\plusone
-% \scratchtoks\expandafter{\the\scratchtoks\math_eqalign_distance}%
-% \else
-% \advance\scratchcounter\plusone
-% \fi
-% \normalexpanded{\scratchtoks{\the\scratchtoks\the\t_math_align_b}}}%
-% \normalexpanded{\scratchtoks{\the\scratchtoks\the\t_math_align_c}}}
-
\def\math_build_eqalign
{\scratchtoks\emptytoks
\d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
@@ -78,6 +61,7 @@
{\ifnum\scratchcounter=\scratchcountertwo
\scratchcounter\plusone
\etoksapp\scratchtoks{\math_eqalign_distance}%
+ \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
\else
\advance\scratchcounter\plusone
\fi
@@ -395,7 +379,7 @@
{\advance\c_math_eqalign_column\plusone\math_eqalign_set_column}% takes argument
\global\c_math_eqalign_column\plusone
\dostarttagged\t!math\empty
- \dostarttagged\t!mathtable\currentmathalignment
+ \dostarttagged\t!mtable\currentmathalignment
\numberedeqalign}
\def\math_alignment_stop
@@ -473,13 +457,13 @@
\def\math_first_in_eqalign
{\global\c_math_eqalign_column\plusone
- \dostarttagged\t!mathtablerow \empty
- \dostarttagged\t!mathtablecell\empty}
+ \dostarttagged\t!mtablerow \empty
+ \dostarttagged\t!mtablecell\empty}
\def\math_next_in_eqalign
{\global\advance\c_math_eqalign_column\plusone
\dostoptagged % finish cell
- \dostarttagged\t!mathtablecell\empty}
+ \dostarttagged\t!mtablecell\empty}
\def\math_left_of_eqalign
{\ifcsname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname
@@ -832,7 +816,7 @@
\def\math_matrix_start_table
{\global\c_math_eqalign_column\zerocount
\dostarttagged\t!math\empty
- \dostarttagged\t!mathtable\empty}
+ \dostarttagged\t!mtable\empty}
\def\math_matrix_stop_table
{\dostoptagged
@@ -840,13 +824,13 @@
\def\math_matrix_start_row
{\noalign{\global\c_math_eqalign_column\zerocount}%
- \dostarttagged\t!mathtablerow\empty}
+ \dostarttagged\t!mtablerow\empty}
\def\math_matrix_stop_row
{\dostoptagged}
\unexpanded\def\math_matrix_start_cell
- {\dostarttagged\t!mathtablecell\empty
+ {\dostarttagged\t!mtablecell\empty
\hss
\math_left_of_eqalign
\startimath
@@ -1012,12 +996,12 @@
\let\mathmatrixleft \empty % experimental hook
\let\mathmatrixright\empty % experimental hook
-\setvalue{\??mathmatrixalignlocation\v!top }{\raise\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\textfont\zerocount\relax}
+\setvalue{\??mathmatrixalignlocation\v!top }{\raise\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\mathstyle\relax}
\setvalue{\??mathmatrixalignlocation\v!high }{\raise\dimexpr(\nextboxdp-\nextboxht)/2\relax}
\setvalue{\??mathmatrixalignlocation\v!center}{\relax}
\setvalue{\??mathmatrixalignlocation\v!lohi} {\relax}
\setvalue{\??mathmatrixalignlocation\v!normal}{\relax}
-\setvalue{\??mathmatrixalignlocation\v!bottom}{\lower\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\textfont\zerocount\relax}
+\setvalue{\??mathmatrixalignlocation\v!bottom}{\lower\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\mathstyle\relax}
\setvalue{\??mathmatrixalignlocation\v!low }{\lower\dimexpr(\nextboxdp-\nextboxht)/2\relax}
\def\math_matrix_finish_nextbox
@@ -1908,7 +1892,7 @@
\begingroup
\beforedisplayspace
% subset of \everydisplay:
- \attribute \mathmodeattribute \plusone
+ \c_attr_mathmode\plusone
\settrue \indisplaymath
% end of subset
\informulatrue}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv
index 641f7411edb..901f075d348 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-def.mkiv
@@ -1,4 +1,4 @@
-%D \module
+ %D \module
%D [ file=math-tex,
%D version=2001.04.12,
%D title=\CONTEXT\ Math Macros,
@@ -15,13 +15,15 @@
\unprotect
-%D Some day this will be done at the lua end.
+\pushoverloadmode % cap etc
\startluacode
mathematics.define(\number\defaultmathfamily)
-- mathematics.xml.registerentities()
\stopluacode
+\popoverloadmode
+
\activatemathcharacters
%D The \mfunction macro is an alternative for \hbox with a controlable font
@@ -80,6 +82,8 @@
{\savenormalmeaning{#1}%
\expandafter\def\expandafter#1\expandafter{\csname normal\csstring#1\endcsname#2}}
+\pushoverloadmode
+
\setoperatorlimits \int \intlimits
\setoperatorlimits \iint \intlimits
\setoperatorlimits \iiint \intlimits
@@ -90,6 +94,8 @@
\setoperatorlimits \ointclockwise \intlimits
\setoperatorlimits \ointctrclockwise \intlimits
+\popoverloadmode
+
%D \macros
%D {centercolon, colonminus, minuscolon, colonequals, equalscolon,
%D colonapprox, approxcolon, colonsim, simcolon, coloncolon,
@@ -131,6 +137,8 @@
%D The next macros take care of the space between the colon and the
%D relation symbol.
+\pushoverloadmode
+
\definemathcommand [colonsep] {\mkern-1.2mu}
\definemathcommand [doublecolonsep] {\mkern-0.9mu}
@@ -154,6 +162,8 @@
\definemathcommand [coloncolonsim] [rel] {\coloncolon\colonsep\sim}
\definemathcommand [simcoloncolon] [rel] {\sim\coloncolon\colonsep}
+\popoverloadmode
+
% \appendtoks
% \def\over{\primitive\over}%
% \to \everymathematics
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua
index eb7adb53f97..06b4bbd97fd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-dim.lua
@@ -62,6 +62,7 @@ local defaults = {
radical_vgap = { default = { "RadicalVerticalGap", "default_rule_thickness+(abs(default_rule_thickness)/4)" },
display_style = { "RadicalDisplayStyleVerticalGap", "default_rule_thickness+(abs(math_x_height)/4)" }, },
space_after_script = { default = { "SpaceAfterScript", "script_space" }, },
+ space_before_script = { default = { "SpaceAfterScript", "script_space" }, },
stack_denom_down = { default = { "StackBottomShiftDown", "denom2" },
cramped_display_style = { "StackBottomDisplayStyleShiftDown", "denom1" },
display_style = { "StackBottomDisplayStyleShiftDown", "denom1" }, },
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua b/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua
index 963461de5cf..6b43a901bdd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-fbk.lua
@@ -53,13 +53,15 @@ function fallbacks.apply(target,original)
-- we also have forcedsize ... at this moment we already passed through
-- constructors.scale so we have this set
local parameters = target.parameters
+ local properties = target.properties
local mathsize = parameters.mathsize
if mathsize < 1 or mathsize > 3 then
return
end
- local characters = target.characters
- local size = parameters.size
- local usedfonts = target.fonts
+ local characters = target.characters
+ local size = parameters.size
+ local usedfonts = target.fonts
+ local compactmath = properties.compactmath
if not usedfonts then
usedfonts = { { id = 0 } } -- we need at least one entry (automatically done anyway)
target.fonts = usedfonts
@@ -91,6 +93,10 @@ function fallbacks.apply(target,original)
else
textdata = target
end
+ if compactmath then
+ scriptid = textid
+ scriptscriptid = textid
+ end
if scriptid and scriptid ~= 0 then
scriptindex = #usedfonts + 1
scriptdata = identifiers[scriptid]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv
index 6c6724bf52e..246ff989d93 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-fen.mkiv
@@ -65,9 +65,39 @@
% we need the direct use of \Udelimiter because of { etc
+%D So we can do:
+%D
+%D \starttyping
+%D $ a + \fenced[bar][size=1] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=2] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=3] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=4] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=big] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=Big] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=bigg]{\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=Bigg]{\frac {b} {c}} + d $
+%D $ a + \fenced[bar][factor=1] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][factor=2] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][factor=4] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar] {\frac {b} {c}} + d $
+%D \stoptyping
+
\newconditional\c_math_fenced_mirror \settrue \c_math_fenced_mirror
\newconditional\c_math_fenced_sized \setfalse\c_math_fenced_sized
+\installcorenamespace {mathfencesize}
+
+\setvalue{\??mathfencesize big}{1}
+\setvalue{\??mathfencesize Big}{2}
+\setvalue{\??mathfencesize bigg}{3}
+\setvalue{\??mathfencesize Bigg}{4}
+
+\def\math_fenced_force_size#1#2%
+ {\c_attr_mathsize\numexpr
+ #1*\plushundred
+ +\ifcsname\??mathfencesize#2\endcsname\lastnamedcs\else#2\fi
+ \relax}
+
\unexpanded\def\math_fenced_inject#1#2#3#4%
{\ifx#1\empty
#2.%
@@ -200,9 +230,6 @@
\edef\currentmathfence{#1}%
\dosingleempty\math_fenced_fenced_indeed}
-\def\math_fenced_force_size#1#2%
- {\attribute\mathsizeattribute\numexpr#1*\plushundred+#2\relax}
-
% \unexpanded\def\math_fenced_fenced_indeed[#1]#2%
% {\iffirstargument\setupcurrentmathfence[#1]\fi
% \math_fenced_fenced_common
@@ -635,6 +662,11 @@
\installcorenamespace{mathbig}
+\setvalue{\??mathbig1}{0.85}
+\setvalue{\??mathbig2}{1.15}
+\setvalue{\??mathbig3}{1.45}
+\setvalue{\??mathbig4}{1.75}
+
\unexpanded\def\choosemathbig#1#2% so we accept \big{||} as well
{{\naturalhbox\bgroup
\startimath
@@ -644,13 +676,32 @@
\math_fenced_force_size\bigmathdelimitervariant{#1}\relax
\math_fenced_step#2\relax
\else
- \math_fenced_step#2{\vpack to\csname\??mathbig\number#1\endcsname\bodyfontsize{}}%
+ \math_fenced_step#2{\vpack to\csname\??mathbig#1\endcsname\bodyfontsize{}}%
\fi
\nulldelimiterspace\zeropoint\relax
\mathsurround\zeropoint
\stopimath
\egroup}}
+% needs testing:
+%
+% \unexpanded\def\choosemathbig#1#2% so we accept \big{||} as well
+% {{\naturalhbox\bgroup
+% \startimath
+% \ifcase\bigmathdelimitermethod
+% \Uvextensible#2\relax
+% \or
+% \math_fenced_force_size\bigmathdelimitervariant{#1}\relax
+% \Uvextensible#2\relax
+% \else
+% \scratchdimen.5\dimexpr\csname\??mathbig\number#1\endcsname\bodyfontsize+1.1\exheight\relax
+% \Uvextensible\s!axis \s!depth \scratchdimen \s!height \scratchdimen #2\relax
+% \fi
+% \nulldelimiterspace\zeropoint\relax
+% \mathsurround\zeropoint
+% \stopimath
+% \egroup}}
+
\def\math_fenced_step#1#2%
{\setfalse\c_math_fenced_unknown
\setfalse\c_math_fenced_done
@@ -675,15 +726,10 @@
\math_fenced_step#2\relax
\endgroup}
-\setvalue{\??mathbig1}{0.85}
-\setvalue{\??mathbig2}{1.15}
-\setvalue{\??mathbig3}{1.45}
-\setvalue{\??mathbig4}{1.75}
-
-\definemathcommand [big] {\choosemathbig\plusone }
-\definemathcommand [Big] {\choosemathbig\plustwo }
-\definemathcommand [bigg] {\choosemathbig\plusthree}
-\definemathcommand [Bigg] {\choosemathbig\plusfour }
+\definemathcommand [big] {\choosemathbig1}
+\definemathcommand [Big] {\choosemathbig2}
+\definemathcommand [bigg] {\choosemathbig3}
+\definemathcommand [Bigg] {\choosemathbig4}
\definemathcommand [bigl] [open] [one] {\big}
\definemathcommand [bigm] [rel] [one] {\big}
@@ -789,10 +835,10 @@
\let\math_fences_normal_middle\middle
\let\math_fences_normal_both \leftorright
-\unexpanded\def\math_fences_auto_left #1{\attribute\mathautofenceattribute\plusone #1\attribute\mathautofenceattribute\attributeunsetvalue}
-\unexpanded\def\math_fences_auto_right #1{\attribute\mathautofenceattribute\plustwo #1\attribute\mathautofenceattribute\attributeunsetvalue}
-\unexpanded\def\math_fences_auto_middle#1{\attribute\mathautofenceattribute\plusthree#1\attribute\mathautofenceattribute\attributeunsetvalue}
-\unexpanded\def\math_fences_auto_both #1{\attribute\mathautofenceattribute\plusfour #1\attribute\mathautofenceattribute\attributeunsetvalue}
+\unexpanded\def\math_fences_auto_left #1{\c_attr_mathautofence\plusone #1\c_attr_mathautofence\attributeunsetvalue}
+\unexpanded\def\math_fences_auto_right #1{\c_attr_mathautofence\plustwo #1\c_attr_mathautofence\attributeunsetvalue}
+\unexpanded\def\math_fences_auto_middle#1{\c_attr_mathautofence\plusthree#1\c_attr_mathautofence\attributeunsetvalue}
+\unexpanded\def\math_fences_auto_both #1{\c_attr_mathautofence\plusfour #1\c_attr_mathautofence\attributeunsetvalue}
\let\autofenceopen \math_fences_auto_left % for testing
\let\autofenceclose \math_fences_auto_right % for testing
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua b/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua
index 190c364101d..fa3ac515fe1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-frc.lua
@@ -13,6 +13,7 @@ local variables = interfaces.variables
local v_no = variables.no
local v_yes = variables.yes
+local v_hidden = variables.hidden
local resolved = {
[0x007B] = "\\{",
@@ -35,11 +36,12 @@ local function mathfraction(how,left,right,width)
else
context("\\atopwithdelims%s%s",resolved[left],resolved[right])
end
- elseif how == v_yes then
+ elseif how == v_yes or how == v_hidden then
+ local norule = how == v_hidden and LUATEXFUNCTIONALITY > 7361 and " norule " or ""
if left == 0x002E and right == 0x002E then
- context("\\normalabove%ssp",width)
+ context("\\normalabove%s%s%ssp",norule,width)
else
- context("\\abovewithdelims%s%s%ssp",resolved[left],resolved[right],width)
+ context("\\abovewithdelims%s%s%s%s%ssp",norule,resolved[left],resolved[right],width)
end
else -- v_auto
if left == 0x002E and right == 0x002E then
@@ -55,3 +57,41 @@ interfaces.implement {
actions = mathfraction,
arguments = { "string", "number", "number", "dimen" }
}
+
+-- experimental code in lmtx
+
+if CONTEXTLMTXMODE > 0 then
+
+ local ctx_Uatop = context.Uatop
+ local ctx_Uover = context.Uover
+
+ local function umathfraction(how,left,right,width)
+ if how == v_no then
+ if left == 0x002E and right == 0x002E then
+ ctx_Uatop()
+ else
+ context("\\Uatopwithdelims%s%s",resolved[left],resolved[right])
+ end
+ elseif how == v_yes or how == v_hidden then
+ local norule = how == v_hidden and " norule " or ""
+ if left == 0x002E and right == 0x002E then
+ context("\\Uabove%s%ssp",norule,width)
+ else
+ context("\\Uabovewithdelims%s%s%s%ssp",norule,resolved[left],resolved[right],width)
+ end
+ else -- v_auto
+ if left == 0x002E and right == 0x002E then
+ ctx_Uover()
+ else
+ context("\\Uoverwithdelims%s%s",resolved[left],resolved[right])
+ end
+ end
+ end
+
+ interfaces.implement {
+ name = "umathfraction",
+ actions = umathfraction,
+ arguments = { "string", "number", "number", "dimen" }
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv
index 97107a6bf91..1b0149f96b4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-frc.mkiv
@@ -361,10 +361,12 @@
\unexpanded\def\xfrac#1#2{\normalxfrac{\let\xfrac\xxfrac#1}{\let\xfrac\xxfrac#2}}
-%D Spacing:
+%D Spacing (sensitive for definition of \triggermathstyle:
-\unexpanded\def\nomathfractiongaps {\normalexpanded{\math_no_fraction_gaps \triggermathstyle\mathstyle}} % maybe collect settings
-\unexpanded\def\overlaymathfractiongaps{\normalexpanded{\math_overlay_fraction_gaps\triggermathstyle\mathstyle}} % maybe collect settings
+% \ifcase\contextlmtxmode
+
+\unexpanded\def\nomathfractiongaps {\normalexpanded{\math_no_fraction_gaps \mathstyletrigger\mathstyle}} % maybe collect settings
+\unexpanded\def\overlaymathfractiongaps{\normalexpanded{\math_overlay_fraction_gaps\mathstyletrigger\mathstyle}} % maybe collect settings
\unexpanded\def\math_no_fraction_gaps#1%
{\Umathfractionnumup #1\zeropoint
@@ -377,6 +379,21 @@
\Umathfractiondenomvgap#1\zeropoint
\Umathfractiondenomdown#1\zeropoint}
+% \else
+
+% \unexpanded\def\math_no_fraction_gaps
+% {\Umathfractionnumup \mathstyle\zeropoint
+% \Umathfractiondenomdown\mathstyle\zeropoint}
+%
+% \unexpanded\def\math_overlay_fraction_gaps
+% {\Umathfractionnumup \mathstyle\zeropoint
+% \Umathfractionnumvgap \mathstyle\zeropoint
+% %Umathfractionrule \mathstyle\zeropoint
+% \Umathfractiondenomvgap\mathstyle\zeropoint
+% \Umathfractiondenomdown\mathstyle\zeropoint}
+
+% \fi
+
\installcorenamespace{mathfractiondistance}
\letvalue{\??mathfractiondistance\v!none }\nomathfractiongaps
@@ -613,8 +630,6 @@
%D More fracking (for Alan):
-\def\s!vfrac{vfrac}
-
\unexpanded\def\math_frac_colored_vulgar#1#2%
{\savecolor
\colo_helpers_activate\p_math_fractions_color
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-inc.lua b/Master/texmf-dist/tex/context/base/mkiv/math-inc.lua
index 010d29a359a..7c32adde6ca 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-inc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-inc.lua
@@ -20,6 +20,8 @@ local undent = buffers.undent
local f_entity = string.formatters["&x%X;"]
local f_blob = string.formatters['<?xml version="2.0"?>\n\n<!-- formula %i -->\n\n%s']
+local report_tags = logs.reporter("structure","tags")
+
local all = nil
local back = nil
@@ -62,7 +64,12 @@ local function getblob(n)
local root = xml.load(full)
for c in xml.collected(root,"formulacontent") do
local index = tonumber(c.at.n)
- all[index] = f_blob(index,beautify(xmltext(c,"math") or ""))
+ local data = beautify(xmltext(c,"math") or "")
+ if index and data then
+ all[index] = f_blob(index,data)
+ else
+ report_tags("no formula content id")
+ end
end
local it = mathematics.alphabets.regular.it
for k, v in next, it.digits do back[v] = k end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua
index 0af9a2121ba..19bf868020a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ini.lua
@@ -97,9 +97,17 @@ local classes = allocate {
root = 16, -- a private one
}
-local open_class = 4
-local middle_class = 4
-local close_class = 5
+local open_class = 4
+local middle_class = 4
+local close_class = 5
+local accent_class = 8
+local radical_class = 9
+local topaccent_class = 11
+local botaccent_class = 12
+local under_class = 13
+local over_class = 14
+local delimiter_class = 15
+local root_class = 16
local accents = allocate {
accent = true, -- some can be both
@@ -231,39 +239,73 @@ local setmathcharacter = function(class,family,slot,unicode,mset,dset)
return mset, dset
end
-local f_accent = formatters[ [[\ugdef\%s{\Umathaccent 0 "%X "%X }]] ]
-local f_topaccent = formatters[ [[\ugdef\%s{\Umathaccent 0 "%X "%X }]] ]
-local f_botaccent = formatters[ [[\ugdef\%s{\Umathbotaccent 0 "%X "%X }]] ]
-local f_over = formatters[ [[\ugdef\%s{\Udelimiterover "%X "%X }]] ]
-local f_under = formatters[ [[\ugdef\%s{\Udelimiterunder "%X "%X }]] ]
-local f_fence = formatters[ [[\ugdef\%s{\Udelimiter "%X "%X "%X }]] ]
-local f_delimiter = formatters[ [[\ugdef\%s{\Udelimiter 0 "%X "%X }]] ]
-local f_radical = formatters[ [[\ugdef\%s{\Uradical "%X "%X }]] ]
-local f_root = formatters[ [[\ugdef\%s{\Uroot "%X "%X }]] ]
------ f_char = formatters[ [[\ugdef\%s{\Umathchar "%X "%X "%X }]]
-local f_char = formatters[ [[\Umathchardef\%s "%X "%X "%X ]] ]
+-- todo: make nice setters for this in lua
+
+local f_accent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ]
+local f_topaccent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ]
+local f_botaccent = formatters[ [[\defUmathbotaccent \%s{%X}{%X}{%X}]] ]
+local f_over = formatters[ [[\defUdelimiterover \%s{%X}{%X}{%X}]] ]
+local f_under = formatters[ [[\defUdelimiterunder\%s{%X}{%X}{%X}]] ]
+local f_fence = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ]
+local f_delimiter = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ]
+local f_radical = formatters[ [[\defUradical \%s{%X}{%X}]] ]
+local f_root = formatters[ [[\defUroot \%s{%X}{%X}]] ]
+local f_char = formatters[ [[\defUmathchar \%s{%X}{%X}{%X}]] ]
+
+local texmathchardef = tex.mathchardef
+
+-- local setmathsymbol = function(name,class,family,slot) -- hex is nicer for tracing
+-- if class == classes.accent then
+-- ctx_sprint(f_topaccent(name,0,family,slot))
+-- elseif class == classes.topaccent then
+-- ctx_sprint(f_topaccent(name,0,family,slot))
+-- elseif class == classes.botaccent then
+-- ctx_sprint(f_botaccent(name,0,family,slot))
+-- elseif class == classes.over then
+-- ctx_sprint(f_over(name,0,family,slot))
+-- elseif class == classes.under then
+-- ctx_sprint(f_under(name,0,family,slot))
+-- elseif class == open_class or class == close_class or class == middle_class then
+-- setdelcode("global",slot,{family,slot,0,0})
+-- ctx_sprint(f_fence(name,class,family,slot))
+-- elseif class == classes.delimiter then
+-- setdelcode("global",slot,{family,slot,0,0})
+-- ctx_sprint(f_delimiter(name,0,family,slot))
+-- elseif class == classes.radical then
+-- ctx_sprint(f_radical(name,family,slot))
+-- elseif class == classes.root then
+-- ctx_sprint(f_root(name,family,slot))
+-- elseif texmathchardef then
+-- texmathchardef(name,class,family,slot,"permanent")
+-- else
+-- -- beware, open/close and other specials should not end up here
+-- ctx_sprint(f_char(name,class,family,slot))
+-- end
+-- end
local setmathsymbol = function(name,class,family,slot) -- hex is nicer for tracing
- if class == classes.accent then
- ctx_sprint(f_accent(name,family,slot))
- elseif class == classes.topaccent then
- ctx_sprint(f_topaccent(name,family,slot))
- elseif class == classes.botaccent then
- ctx_sprint(f_botaccent(name,family,slot))
- elseif class == classes.over then
- ctx_sprint(f_over(name,family,slot))
- elseif class == classes.under then
- ctx_sprint(f_under(name,family,slot))
+ if class == accent_class then
+ ctx_sprint(f_topaccent(name,0,family,slot))
+ elseif class == topaccent_class then
+ ctx_sprint(f_topaccent(name,0,family,slot))
+ elseif class == botaccent_class then
+ ctx_sprint(f_botaccent(name,0,family,slot))
+ elseif class == over_class then
+ ctx_sprint(f_over(name,0,family,slot))
+ elseif class == under_class then
+ ctx_sprint(f_under(name,0,family,slot))
elseif class == open_class or class == close_class or class == middle_class then
setdelcode("global",slot,{family,slot,0,0})
ctx_sprint(f_fence(name,class,family,slot))
- elseif class == classes.delimiter then
+ elseif class == delimiter_class then
setdelcode("global",slot,{family,slot,0,0})
- ctx_sprint(f_delimiter(name,family,slot))
- elseif class == classes.radical then
+ ctx_sprint(f_delimiter(name,0,family,slot))
+ elseif class == radical_class then
ctx_sprint(f_radical(name,family,slot))
- elseif class == classes.root then
+ elseif class == root_class then
ctx_sprint(f_root(name,family,slot))
+ elseif texmathchardef then
+ texmathchardef(name,class,family,slot,"permanent")
else
-- beware, open/close and other specials should not end up here
ctx_sprint(f_char(name,class,family,slot))
@@ -642,7 +684,7 @@ function mathematics.big(tfmdata,unicode,n,method)
end
end
end
- elseif method == 3 then
+ elseif method >= 3 then
local size = 1.33^n
if method == 4 then
size = tfmdata.parameters.size * size
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv
index c79d3579c8b..d0e18ff4b1b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ini.mkiv
@@ -103,9 +103,9 @@
\def\Umathaccents {\Umathaccent \s!both }
\ifdefined\Umathcharclass \else
- \def\Umathcharclass{\cldcontext{tex.getmathcode(token.scan_int())[1]}}
- \def\Umathcharfam {\cldcontext{tex.getmathcode(token.scan_int())[2]}}
- \def\Umathcharslot {\cldcontext{tex.getmathcode(token.scan_int())[3]}}
+ \def\Umathcharclass{\numexpr\cldcontext{tex.getmathcode(token.scan_int())[1]}\relax}
+ \def\Umathcharfam {\numexpr\cldcontext{tex.getmathcode(token.scan_int())[2]}\relax}
+ \def\Umathcharslot {\numexpr\cldcontext{tex.getmathcode(token.scan_int())[3]}\relax}
\fi
%D The attributes that we will use (todo: pack some into one but uglier code):
@@ -134,12 +134,12 @@
\fi
\appendtoks
- \attribute\mathmodeattribute\plusone
+ \c_attr_mathmode\plusone
\to \everydisplay
\appendtoks
- \attribute\mathmodeattribute\plusone
- \attribute\displaymathattribute\plusone
+ \c_attr_mathmode \plusone
+ \c_attr_displaymath\plusone
\to \everybeforedisplayformula
\setnewconstant\defaultmathfamily \zerocount % 255
@@ -596,7 +596,7 @@
\appendtoks
\ifcase\c_math_renderings_attribute\else
- \attribute\mathrenderingattribute\c_math_renderings_attribute
+ \c_attr_mathrendering\c_math_renderings_attribute
\fi
\to \everymathematics
@@ -867,10 +867,10 @@
\let\math_tags_mfunctiontxt\gobbletwoarguments
\let\math_tags_mfunctionlab\gobbletwoarguments
-\unexpanded\def\math_tags_mo_indeed#1{\begingroup \attribute\mathcategoryattribute\plusone #1\endgroup}
-\unexpanded\def\math_tags_mi_indeed#1{\begingroup \attribute\mathcategoryattribute\plustwo #1\endgroup}
-\unexpanded\def\math_tags_mn_indeed#1{\begingroup\mathupright\attribute\mathcategoryattribute\plusthree\math_set_o_both#1\endgroup}
-\unexpanded\def\math_tags_ms_indeed#1{\begingroup\mathupright\attribute\mathcategoryattribute\plusfour \math_set_p_both#1\endgroup} % todo: mathoptext
+\unexpanded\def\math_tags_mo_indeed#1{\begingroup \c_attr_mathcategory\plusone #1\endgroup}
+\unexpanded\def\math_tags_mi_indeed#1{\begingroup \c_attr_mathcategory\plustwo #1\endgroup}
+\unexpanded\def\math_tags_mn_indeed#1{\begingroup\mathupright\c_attr_mathcategory\plusthree\math_set_o_both#1\endgroup}
+\unexpanded\def\math_tags_ms_indeed#1{\begingroup\mathupright\c_attr_mathcategory\plusfour \math_set_p_both#1\endgroup} % todo: mathoptext
\newconditional\c_apply_function
@@ -1390,7 +1390,7 @@
\to \everysetupmathematics
\appendtoks
- \attribute\mathbidiattribute\ifconditional\c_math_right_to_left\c_math_bidi\else\attributeunsetvalue\fi
+ \c_attr_mathbidi\ifconditional\c_math_right_to_left\c_math_bidi\else\attributeunsetvalue\fi
\to \everyswitchmathematics
%D Delayed: greek.
@@ -1445,15 +1445,15 @@
% only used local
-\unexpanded\def\mathgreekupright{\attribute\mathgreekattribute"222\relax}
-\unexpanded\def\mathgreekitalic {\attribute\mathgreekattribute"333\relax}
-\unexpanded\def\mathgreekdefault{\attribute\mathgreekattribute"000\relax}
+\unexpanded\def\mathgreekupright{\c_attr_mathgreek"222\relax}
+\unexpanded\def\mathgreekitalic {\c_attr_mathgreek"333\relax}
+\unexpanded\def\mathgreekdefault{\c_attr_mathgreek"000\relax}
\let\mathgreeknormal\mathgreekupright
\let\mathgreeknone \mathgreekdefault
\appendtoks
- \attribute\mathgreekattribute\c_math_greek_attribute
+ \c_attr_mathgreek\c_math_greek_attribute
\to \everymathematics
\setupmathematics
@@ -1488,7 +1488,7 @@
\appendtoks
\math_collapsing_initialize
- \attribute\mathcollapsingattribute\c_math_collapsing_attribute
+ \c_attr_mathcollapsing\c_math_collapsing_attribute
\to \everymathematics
\setupmathematics
@@ -1526,7 +1526,7 @@
\appendtoks
\math_italics_initialize
- \attribute\mathitalicsattribute\c_math_italics_attribute
+ \c_attr_mathitalics\c_math_italics_attribute
\to \everymathematics
% \setupmathematics % done later
@@ -1563,7 +1563,7 @@
\appendtoks
\math_kernpairs_initialize
- \attribute\mathkernpairsattribute\c_math_kernpairs_attribute
+ \c_attr_mathkernpairs\c_math_kernpairs_attribute
\to \everymathematics
\setupmathematics
@@ -1611,13 +1611,13 @@
% \mathcode\c_math_period\c_math_special
% \let,\math_punctuation_comma
% \let.\math_punctuation_period
-% \attribute\mathpunctuationattribute\plustwo}
+% \c_attr_mathpunctuation\plustwo}
%
% \unexpanded\gdef\math_punctuation_initialize_yes
-% {\attribute\mathpunctuationattribute\plustwo}
+% {\c_attr_mathpunctuation\plustwo}
%
% \unexpanded\gdef\math_punctuation_initialize_nop
-% {\attribute\mathpunctuationattribute\plusone}
+% {\c_attr_mathpunctuation\plusone}
%
% \egroup
%
@@ -1760,7 +1760,7 @@
\setupmathematics
[\v!autopunctuation=\v!no] % no | yes | all | comma | yes,semicolon | all,semicolon
-%D The consequences of settign this are as follows:
+%D The consequences of setting this are as follows:
%D
%D \def\TestA#1#2#3%
%D {\ifnum#1=0 \type{#2}\else\setupmathematics[autopunctuation={#2}]$#3$\fi}
@@ -1841,6 +1841,8 @@
% error
\fi}
+\let\mathstyletrigger\triggermathstyle
+
\def\triggeredmathstyleparameter#1% to bypass the relax
{\ifcase\numexpr\normalmathstyle\relax
#1\displaystyle \or % 0
@@ -1980,7 +1982,7 @@
\scriptscriptfont \else
\textfont
\fi
- \zeropoint}
+ \zerocount}
\def\mathemwidth
{\fontdimen
@@ -1996,7 +1998,7 @@
\scriptscriptfont \else
\textfont
\fi
- \zeropoint}
+ \zerocount}
%D A plain inheritance:
@@ -2778,8 +2780,9 @@
%
% 0x002B=plus 0x2212=minus 0x2013=endash
-\unexpanded\def\mathplus {+}
-\unexpanded\def\mathminus{\ifmmode –\else\iffontchar\font`−−\else –\fi\fi}
+\unexpanded\def\mathplus {+}
+\unexpanded\def\mathminus {\ifmmode –\else\iffontchar\font`−−\else –\fi\fi}
+\unexpanded\def\mathplusminus{±}
%D The \type {\displaywidth} is only known inside a display formula, so we need to catch
%D it when still zero.
@@ -2825,7 +2828,7 @@
\to \everyswitchmathematics % only in mathematics
\appendtoks
- \attribute\mathdomainattribute\c_math_domain_attribute
+ \c_attr_mathdomain\c_math_domain_attribute
\to \everymathematics
\setupmathematics
@@ -2899,17 +2902,35 @@
%D Experiment
\unexpanded\def\math_scripts_stack
- {\attribute\mathunstackattribute\attributeunsetvalue}
+ {\c_attr_mathunstack\attributeunsetvalue}
\unexpanded\def\math_scripts_unstack
{\clf_enablescriptunstacking
- \attribute\mathunstackattribute\plusone}
+ \c_attr_mathunstack\plusone}
\appendtoks
\let\stackscripts \math_scripts_stack
\let\unstackscripts\math_scripts_unstack
\to \everymathematics
+%D Expensive (tracing and inject) but a primitive (using factors) is tricky as we
+%D want this frozen support.
+
+\def\math_openup_parameter#1#2%
+ {\ifzeropt#1\displaystyle \else\ifdim#1\displaystyle =\maxdimen\else\frozen#1\displaystyle #2#1\displaystyle \fi\fi
+ \ifzeropt#1\crampeddisplaystyle \else\ifdim#1\crampeddisplaystyle =\maxdimen\else\frozen#1\crampeddisplaystyle #2#1\crampeddisplaystyle \fi\fi
+ \ifzeropt#1\textstyle \else\ifdim#1\textstyle =\maxdimen\else\frozen#1\textstyle #2#1\textstyle \fi\fi
+ \ifzeropt#1\crampedtextstyle \else\ifdim#1\crampedtextstyle =\maxdimen\else\frozen#1\crampedtextstyle #2#1\crampedtextstyle \fi\fi
+ \ifzeropt#1\scriptstyle \else\ifdim#1\scriptstyle =\maxdimen\else\frozen#1\scriptstyle #2#1\scriptstyle \fi\fi
+ \ifzeropt#1\crampedscriptstyle \else\ifdim#1\crampedscriptstyle =\maxdimen\else\frozen#1\crampedscriptstyle #2#1\crampedscriptstyle \fi\fi
+ \ifzeropt#1\scriptscriptstyle \else\ifdim#1\scriptscriptstyle =\maxdimen\else\frozen#1\scriptscriptstyle #2#1\scriptscriptstyle \fi\fi
+ \ifzeropt#1\crampedscriptscriptstyle\else\ifdim#1\crampedscriptscriptstyle=\maxdimen\else\frozen#1\crampedscriptscriptstyle#2#1\crampedscriptscriptstyle\fi\fi}
+
+\unexpanded\def\mathopenupparameter#1#2%
+ {\ifdim#2\points=\zeropoint\else
+ \math_openup_parameter#1{#2}%
+ \fi}
+
\protect \endinput
% % not used (yet)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-map.lua b/Master/texmf-dist/tex/context/base/mkiv/math-map.lua
index 2233722a03d..97860b923ba 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-map.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-map.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['math-map'] = {
version = 1.001,
+ optimize = true,
comment = "companion to math-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua
index f53410b18cd..1fb763a3b6c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['math-noa'] = {
version = 1.001,
+ optimize = true,
comment = "companion to math-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -124,10 +125,14 @@ local getdepth = nuts.getdepth
local getnucleus = nuts.getnucleus
local getsub = nuts.getsub
local getsup = nuts.getsup
+local getsubpre = nuts.getsubpre
+local getsuppre = nuts.getsuppre
local setnucleus = nuts.setnucleus
local setsub = nuts.setsub
local setsup = nuts.setsup
+local setsubpre = nuts.setsubpre
+local setsuppre = nuts.setsuppre
local flush_node = nuts.flush
local copy_node = nuts.copy
@@ -198,7 +203,7 @@ local subbox_code = nodecodes.subbox -- attr list
local submlist_code = nodecodes.submlist -- attr list
local mathchar_code = nodecodes.mathchar -- attr fam char
local mathtextchar_code = nodecodes.mathtextchar -- attr fam char
-local delim_code = nodecodes.delim -- attr small_fam small_char large_fam large_char
+local delimiter_code = nodecodes.delimiter -- attr small_fam small_char large_fam large_char
----- style_code = nodecodes.style -- attr style
----- parameter_code = nodecodes.parameter -- attr style
local math_choice = nodecodes.choice -- attr display text script scriptscript
@@ -273,7 +278,11 @@ local function process(start,what,n,parent)
local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list
noad = getsup (start) if noad then process(noad,what,n,start) end -- list
noad = getsub (start) if noad then process(noad,what,n,start) end -- list
- elseif id == mathchar_code or id == mathtextchar_code or id == delim_code then
+ if getsubpre then
+ noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list
+ end
+ elseif id == mathchar_code or id == mathtextchar_code or id == delimiter_code then
break
elseif id == subbox_code or id == submlist_code then
local noad = getlist(start) if noad then process(noad,what,n,start) end -- list (not getlist !)
@@ -293,12 +302,20 @@ local function process(start,what,n,parent)
local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list
noad = getsup (start) if noad then process(noad,what,n,start) end -- list
noad = getsub (start) if noad then process(noad,what,n,start) end -- list
+ if getsubpre then
+ noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list
+ end
noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter
noad = getfield(start,"degree") if noad then process(noad,what,n,start) end -- list
elseif id == accent_code then
local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list
noad = getsup (start) if noad then process(noad,what,n,start) end -- list
noad = getsub (start) if noad then process(noad,what,n,start) end -- list
+ if getsubpre then
+ noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list
+ end
noad = getfield(start,"accent") if noad then process(noad,what,n,start) end -- list
noad = getfield(start,"bot_accent") if noad then process(noad,what,n,start) end -- list
-- elseif id == style_code then
@@ -322,6 +339,10 @@ local function processnested(current,what,n)
noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list
noad = getsup (current) if noad then process(noad,what,n,current) end -- list
noad = getsub (current) if noad then process(noad,what,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list
+ end
elseif id == subbox_code or id == submlist_code then
noad = getlist(current) if noad then process(noad,what,n,current) end -- list (not getlist !)
elseif id == fraction_code then
@@ -340,12 +361,20 @@ local function processnested(current,what,n)
noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list
noad = getsup (current) if noad then process(noad,what,n,current) end -- list
noad = getsub (current) if noad then process(noad,what,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list
+ end
noad = getfield(current,"left") if noad then process(noad,what,n,current) end -- delimiter
noad = getfield(current,"degree") if noad then process(noad,what,n,current) end -- list
elseif id == accent_code then
noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list
noad = getsup (current) if noad then process(noad,what,n,current) end -- list
noad = getsub (current) if noad then process(noad,what,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list
+ end
noad = getfield(current,"accent") if noad then process(noad,what,n,current) end -- list
noad = getfield(current,"bot_accent") if noad then process(noad,what,n,current) end -- list
end
@@ -358,6 +387,10 @@ local function processstep(current,process,n,id)
noad = getnucleus(current) if noad then process(noad,n,current) end -- list
noad = getsup (current) if noad then process(noad,n,current) end -- list
noad = getsub (current) if noad then process(noad,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,n,current) end -- list
+ end
elseif id == subbox_code or id == submlist_code then
noad = getlist(current) if noad then process(noad,n,current) end -- list (not getlist !)
elseif id == fraction_code then
@@ -376,12 +409,20 @@ local function processstep(current,process,n,id)
noad = getnucleus(current) if noad then process(noad,n,current) end -- list
noad = getsup (current) if noad then process(noad,n,current) end -- list
noad = getsub (current) if noad then process(noad,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,n,current) end -- list
+ end
noad = getfield(current,"left") if noad then process(noad,n,current) end -- delimiter
noad = getfield(current,"degree") if noad then process(noad,n,current) end -- list
elseif id == accent_code then
noad = getnucleus(current) if noad then process(noad,n,current) end -- list
noad = getsup (current) if noad then process(noad,n,current) end -- list
noad = getsub (current) if noad then process(noad,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,n,current) end -- list
+ end
noad = getfield(current,"accent") if noad then process(noad,n,current) end -- list
noad = getfield(current,"bot_accent") if noad then process(noad,n,current) end -- list
end
@@ -542,7 +583,7 @@ do
end
end
end
- families[delim_code] = function(pointer)
+ families[delimiter_code] = function(pointer)
if getfield(pointer,"small_fam") == 0 then
local a = getattr(pointer,a_mathfamily)
if a and a > 0 then
@@ -574,7 +615,7 @@ do
-- will become:
- -- families[delim_code] = function(pointer)
+ -- families[delimiter_code] = function(pointer)
-- if getfam(pointer) == 0 then
-- local a = getattr(pointer,a_mathfamily)
-- if a and a > 0 then
@@ -717,7 +758,7 @@ do
end
end
- relocate[delim_code] = function(pointer)
+ relocate[delimiter_code] = function(pointer)
if trace_analyzing then
setnodecolor(pointer,"font:fina")
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi b/Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi
index c0b128a616c..a11ec045d0d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-rad.mkvi
@@ -26,12 +26,24 @@
% \def\rootradical{\Uroot \defaultmathfamily "221A } % can be done in char-def
% \def\surdradical{\Uradical \defaultmathfamily "221A } % can be done in char-def
-\def\root#1\of{\rootradical{#1}} % #2
+\unexpanded\def\root#1\of{\rootradical{#1}} % #2
\unexpanded\def\sqrt{\doifelsenextoptionalcs\rootwithdegree\rootwithoutdegree}
-\unexpanded\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird
- {\normalexpanded{\rootradical{\normalunexpanded{#1}}{\noexpand\triggermathstyle{\normalmathstyle}\normalunexpanded{#2}}}}
+% \ifcase \contextlmtxmode
+
+ \unexpanded\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird
+ {\normalexpanded{\rootradical
+ {\normalunexpanded{#1}}%
+ {\noexpand\triggermathstyle{\number\normalmathstyle}%
+ \normalunexpanded{#2}}}}
+
+% \else % experimental new keyword: (maybe keywords should come after the symbol)
+%
+% \unexpanded\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird
+% {\Uroot style \normalmathstyle "0 "221A {#1}{#2}}
+%
+% \fi
\unexpanded\def\rootwithdegree[#1]{\rootradical{#1}}
\unexpanded\def\rootwithoutdegree {\rootradical {}}
@@ -43,8 +55,36 @@
% \let\normalsurd\surd % \Uradical "0 "221A
% \unexpanded\def\surd{\normalsurd{}}
-
-%D The real thing:
+%D The real thing. If needed one can control matters with one of the many
+%D \type {\Umath...} parameters.
+%D
+%D \starttyping
+%D \def\R {\Umathradicaldegreeafter\textstyle0pt}
+%D \def\RR{\Umathradicaldegreeafter\textstyle\dimexpr
+%D \Umathradicaldegreeafter\textstyle+.1em\relax}
+%D \def\RRR{\frozen\Umathradicaldegreeafter\textstyle\dimexpr
+%D \Umathradicaldegreeafter\textstyle+.2em\relax}
+%D
+%D $ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
+%D $ \sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D
+%D \def\R {\Umathradicaldegreeafter\textstyle
+%D 0pt}
+%D \def\RR {\Umathradicaldegreeafter\textstyle
+%D 0.95\Umathradicaldegreeafter\textstyle}
+%D \def\RRR{\frozen\Umathradicaldegreeafter\textstyle
+%D 0.9\Umathradicaldegreeafter\textstyle}
+%D
+%D $ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
+%D $ \sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D
+%D \def\RR {\mathopenupparameter\Umathradicaldegreeafter{.1}}
+%D
+%D $ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
+%D $ \sqrt[3]{5} {\RR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D \stoptyping
\installcorenamespace{mathradical}
\installcorenamespace{mathradicalalternative}
@@ -157,10 +197,11 @@
enddef ;
\stopMPextensions
-\startuniqueMPgraphic{math:radical:default}%{...}
+\startuniqueMPgraphic{minifun::math:radical:default}%{...}
draw
math_radical_simple(OverlayWidth,OverlayHeight,OverlayDepth,OverlayOffset)
- withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ % withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ withpen pencircle scaled OverlayLineWidth
% dashed evenly
withcolor OverlayLineColor ;
\stopuniqueMPgraphic
@@ -177,7 +218,8 @@
\d_overlay_height \ht\nextbox
\d_overlay_depth \dp\nextbox
\d_overlay_offset \scratchoffset
- \d_overlay_linewidth\linewidth
+ \d_overlay_linewidth\the\dimexpr\triggeredmathstyleparameter\Umathfractionrule
+ %
\edef\overlaylinecolor{\mathradicalparameter\c!color}%
%
\edef\p_mp{\mathradicalparameter\c!mp}%
@@ -201,7 +243,7 @@
\fi
\endgroup}
-\definemathradical[sqrt][mp=math:radical:default]
+\definemathradical[sqrt][mp=minifun::math:radical:default]
% \setupmathradical[sqrt][alternative=normal,color=darkblue]
% \setupmathradical[sqrt][alternative=mp,color=darkgreen]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi b/Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi
index 8048bf92364..8f2a20440f3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-stc.mkvi
@@ -16,12 +16,12 @@
\unprotect
-%D WARNING: If the code here changes, the export needs to be checked! Stackers are rather
-%D special because the order in mathml matters, so we flush in [base under over] order. We
-%D also do some analysis at the \TEX\ end (passing the right variant). It's easy in the
-%D export to deal with it but in the pdf stream less trivial as we don't actually analyze
-%D there.
-
+%D WARNING: If the code here changes, the export needs to be checked! Stackers are
+%D rather special because the order in mathml matters, so we flush in [base under
+%D over] order. We also do some analysis at the \TEX\ end (passing the right
+%D variant). It's easy in the export to deal with it but in the pdf stream less
+%D trivial as we don't actually analyze there.
+%D
%D At some point the \MKII\ arrow mechanism has been converted to \MKIV, but we kept
%D most of the logic. We now have a more generic variant dealing with extensibles.
%D There are a few demands than we need to meet:
@@ -42,11 +42,11 @@
%D to support the traditional Latin Modern Virtual math font those were extended
%D with a couple of virtual extensibles as well.
%D
-%D {\em For the moment we still have some mess here: we can deal with known dimensions, but
-%D fillers (like \type {\rightarrowfil} don't work with \OPENTYPE\ extensibles yet
-%D because there is no way to let them stretch like leaders. At some point \LUATEX\
-%D might provide a auto||fit||to||encapsulated||box and if not I will cook up a \LUA\
-%D based variant.}
+%D {\em For the moment we still have some mess here: we can deal with known
+%D dimensions, but fillers (like \type {\rightarrowfil} don't work with \OPENTYPE\
+%D extensibles yet because there is no way to let them stretch like leaders. At some
+%D point \LUATEX\ might provide a auto||fit||to||encapsulated||box and if not I will
+%D cook up a \LUA\ based variant.}
%D
%D We could mess with something like \type {$mid\limits^{top}_{bottom}$} but we like
%D a bit more control. At some point we need to add some hacks to get exports
@@ -54,9 +54,9 @@
%D
%D In the end we have a more flexible mechanism which also handles text variants.
-%D When wrapping up some math developments I decided to add mp support here
-%D as well. A nice evening job with Joe Bonamassa performing live on the big
-%D screen (real nice bluray's). See meta-imp-mat.mkiv for examples.
+%D When wrapping up some math developments I decided to add mp support here as well.
+%D A nice evening job with Joe Bonamassa performing live on the big screen (real
+%D nice bluray's). See meta-imp-mat.mkiv for examples.
% possible improvements:
%
@@ -150,9 +150,9 @@
\let\math_stackers_stop_tagged \relax
\appendtoks
- \def\math_stackers_start_tagged_mid{\dostarttagged\t!mathstackermid\empty\hbox\bgroup}%
- \def\math_stackers_start_tagged_top{\dostarttagged\t!mathstackertop\empty\hbox\bgroup}%
- \def\math_stackers_start_tagged_bot{\dostarttagged\t!mathstackerbot\empty\hbox\bgroup}%
+ \def\math_stackers_start_tagged_mid{\dostarttagged\t!mstackermid\empty\hbox\bgroup}%
+ \def\math_stackers_start_tagged_top{\dostarttagged\t!mstackertop\empty\hbox\bgroup}%
+ \def\math_stackers_start_tagged_bot{\dostarttagged\t!mstackerbot\empty\hbox\bgroup}%
\def\math_stackers_stop_tagged {\egroup\dostoptagged}%
\to \everysetuptagging
@@ -328,7 +328,7 @@
{\begingroup
\edef\currentmathstackers{#category}%
\mathstackersparameter\c!left\relax
- \dostarttagged\t!mathstacker\currentmathstackers
+ \dostarttagged\t!mstacker\currentmathstackers
\ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
{\edef\p_offset {\mathstackersparameter\c!offset}%
\edef\p_location {\mathstackersparameter\c!location}%
@@ -415,7 +415,7 @@
\advance\scratchwidth2\scratchhoffset
%
\ifcase#method\relax
- \dostarttagged\t!mathstackermid\empty
+ \dostarttagged\t!mstackermid\empty
\setbox\scratchboxthree\csname\??mathstackersalternative\p_alternative\endcsname
\dostoptagged
\fi
@@ -433,20 +433,15 @@
\ifcsname\??mathstackerslocation\p_location\endcsname
\ifcase\csname\??mathstackerslocation\p_location\endcsname\relax
\scratchdistance\zeropoint
- \or
- % top
+ \or % top
\scratchdistance\zeropoint
- \or
- % high
+ \or % high
\scratchdistance.25\htdp\scratchboxthree
- \or
- % centered
+ \or % centered
\scratchdistance.5\htdp\scratchboxthree
- \or
- % low
+ \or % low
\scratchdistance.75\htdp\scratchboxthree
- \or
- % bottom
+ \or % bottom
\scratchdistance\htdp\scratchboxthree
\else
\scratchdistance\zeropoint
@@ -602,7 +597,7 @@
\setupcurrentmathstackers[#settings]%
\fi
\mathstackersparameter\c!left\relax
- \dostarttagged\t!mathstacker\currentmathstackers
+ \dostarttagged\t!mstacker\currentmathstackers
\ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
{\edef\m_math_stackers_text_middle {#text}%
%
@@ -798,7 +793,7 @@
\unexpanded\def\math_stackers_make_double_text#where#category#codepoint#text#extra%
{\math_stackers_start_group{#category}%
\mathstackersparameter\c!left\relax
- \dostarttagged\t!mathstacker\currentmathstackers
+ \dostarttagged\t!mstacker\currentmathstackers
\ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
{\edef\currentmathstackers{#category}%
%
@@ -1069,8 +1064,8 @@
%D We save a few definitions that we automatically got from the \type {char-def.lua}
%D database.
-% Be careful in choosing what accents you take (the code below uses a
-% combining one):
+% Be careful in choosing what accents you take (the code below uses a combining
+% one):
%
% \startbuffer
% % $\Umathaccent top 0 0 "20D7 {example}$
@@ -1224,15 +1219,15 @@
% We don't use overline and underline. This is one of the overlooked aspects of
% unicode cq. opentype math: why treat rules different than e.g. arrows and
% accents. It is a bit unfortunate that the opportunity to move math to new
-% technologies happened outside the tex domain (and/or some aspects were kept
-% while in fact they were side effects of limitations of traditional fonts).
-% From the unicode aware tex engines' implementation point of view things
-% could have been done a bit nicer but then: the community didn't seem to care
-% too much and just has to follow now.
+% technologies happened outside the tex domain (and/or some aspects were kept while
+% in fact they were side effects of limitations of traditional fonts). From the
+% unicode aware tex engines' implementation point of view things could have been
+% done a bit nicer but then: the community didn't seem to care too much and just
+% has to follow now.
%
-% Anyhow, we use a character based approach so that at least we get unicode
-% stuff in the backend (okay, we still need to deal with some cut and paste
-% issues but at least we now know what we deal with.
+% Anyhow, we use a character based approach so that at least we get unicode stuff
+% in the backend (okay, we still need to deal with some cut and paste issues but at
+% least we now know what we deal with.
% alternatively we can move the original to FE*
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua b/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua
index 9267e0f39c0..41373fcb58b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-tag.lua
@@ -52,7 +52,7 @@ local subbox_code = nodecodes.subbox -- attr list
local submlist_code = nodecodes.submlist -- attr list
local mathchar_code = nodecodes.mathchar -- attr fam char
local mathtextchar_code = nodecodes.mathtextchar -- attr fam char
-local delim_code = nodecodes.delim -- attr small_fam small_char large_fam large_char
+local delimiter_code = nodecodes.delimiter -- attr small_fam small_char large_fam large_char
local style_code = nodecodes.style -- attr style
local choice_code = nodecodes.choice -- attr display text script scriptscript
local fence_code = nodecodes.fence -- attr subtype
@@ -259,7 +259,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer
stop_tagged()
-- showtag(start,id,false)
break
- elseif id == delim_code then
+ elseif id == delimiter_code then
-- check for code
setattr(start,a_tagged,start_tagged("mo"))
stop_tagged()
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua b/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua
index 1f644e78834..151183212a3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-ttv.lua
@@ -62,7 +62,7 @@ mathencodings["large-to-small"] = {
}
-- Beware: these are (in cm/lm) below the baseline due to limitations
--- in the tfm format bu the engien (combined with the mathclass) takes
+-- in the tfm format but the engine (combined with the mathclass) takes
-- care of it. If we need them in textmode, we should make them virtual
-- and move them up but we're in no hurry with that.
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua b/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua
index 9090955e9c4..221bbff8975 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/math-vfu.lua
@@ -628,10 +628,6 @@ setmetatableindex(reverse, function(t,name)
return r
end)
--- use char and font hash
---
--- commands = { { "font", slot }, { "char", unicode } },
-
local function copy_glyph(main,target,original,unicode,slot)
local addprivate = fonts.helpers.addprivate
local olddata = original[unicode]
@@ -837,7 +833,6 @@ function vfmath.define(specification,set,goodies)
setmetatableindex(goodies,parent.goodies)
end
--
- properties.virtualized = true
properties.hasitalics = true
properties.hasmath = true
--
@@ -850,9 +845,11 @@ function vfmath.define(specification,set,goodies)
-- we need to set some values in main as well (still?)
--
main.fullname = properties.fullname
- main.type = "virtual"
main.nomath = false
--
+ properties.virtualized = true
+ main.type = "virtual"
+ --
parameters.x_height = parameters.x_height or 0
--
local already_reported = false
@@ -918,7 +915,7 @@ function vfmath.define(specification,set,goodies)
else
local vectorname = ss.vector
if vectorname then
- local offset = 0xFF000
+ local offset = 0xFF000 -- todo: -- private
local vector = mathencodings[vectorname]
local rotcev = reverse[vectorname]
local isextension = ss.extension
@@ -926,11 +923,11 @@ function vfmath.define(specification,set,goodies)
local fc = fs.characters
local fd = fs.descriptions
local si = shared[s]
+ local fontname = fs.properties.name or "unknown"
local skewchar = ss.skewchar
for unicode, index in next, vector do
local fci = fc[index]
if not fci then
- local fontname = fs.properties.name or "unknown"
local rf = reported[fontname]
if not rf then rf = { } reported[fontname] = rf end
local rv = rf[vectorname]
@@ -1111,7 +1108,8 @@ function vfmath.define(specification,set,goodies)
-- so better is to also reserve the id already which then involves some more
-- management (so not now).
fontlist[#fontlist+1] = {
- id = font.nextid(),
+ -- id = font.nextid(),
+ id = 0, -- self
size = size,
}
vfmath.addmissing(main,#fontlist,size)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua
index 9ee57d80dd1..c690f3902e7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-blb.lua
@@ -293,7 +293,7 @@ function mp.mf_inject_blob(category,str)
newblob(category,str) -- only for tracing
mp_category = category
mp_str = str
- tex.runtoks("mpblobtext")
+ tex.runlocal("mpblobtext")
end
interfaces.implement {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv
index e89cb14425d..d18adc927c0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-fig.mkiv
@@ -65,8 +65,8 @@
\getfiguredimensions[#1]% [\c!object=\v!no] already set
\startMPcode
draw externalfigure "#1"
- xscaled \the\dimexpr\figurewidth \relax\space % must be points
- yscaled \the\dimexpr\figureheight\relax\space % must be points
+ xsized \the\dimexpr\figurewidth \relax\space % must be points
+ ysized \the\dimexpr\figureheight\relax\space % must be points
#2 ;
\stopMPcode
\egroup}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua
index 92bbe071617..54c66ceb976 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-fnt.lua
@@ -12,6 +12,7 @@ local format = string.format
local formatters = string.formatters
local chardata = characters.data
local fontdata = fonts.hashes.identifiers
+local round = math.round
local vffonts = fonts.handlers.vf
@@ -97,7 +98,7 @@ local function process(mpxformat,name,instances,scalefactor)
local fontname = file.removesuffix(file.basename(name))
local modification = attributes.modification
local filesize = attributes.size
- local hash = file.robustname(formatters["%s %05i %03i"](fontname,scalefactor*1000,instances))
+ local hash = file.robustname(formatters["%s %05i %03i"](fontname,round(scalefactor*1000),instances))
local lists = containers.read(mpfonts.cache,hash)
if not lists or lists.modification ~= modification or lists.filesize ~= filesize or lists.instances ~= instances or lists.scalefactor ~= scalefactor then
statistics.starttiming(flusher)
@@ -167,8 +168,8 @@ local function build(g,v)
local t = { }
for d=1,#data do
t = fonts.constructors.scale(data[d],-1000)
- -- local id = font.nextid()
- -- t.fonts = { { id = id } }
+ local id = font.nextid()
+ t.fonts = { { id = id } }
fontdata[id] = t
if v[5] then
vffonts.helpers.composecharacters(t)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv
index 495864a9eeb..e1b5d9d0059 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-mat.mkiv
@@ -129,7 +129,9 @@
% main handler
def math_stacker_draw_accent(expr p) =
- draw p withpen pencircle scaled OverlayLineWidth xyscaled (2,3) rotated 45 ;
+% draw p withpen pencircle scaled OverlayLineWidth xyscaled (2,3) rotated 45 ;
+% draw p withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 45 ;
+ draw p withpen pencircle scaled OverlayLineWidth ;
enddef ;
def math_stacker_draw_arrow(expr p) =
@@ -204,11 +206,16 @@
\startuniqueMPgraphic{minifun::math:radical:default}{axis,ex,em}
draw
math_radical_simple(OverlayWidth,OverlayHeight,OverlayDepth,OverlayOffset)
- withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ % withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ withpen pencircle scaled OverlayLineWidth
% dashed evenly
withcolor OverlayLineColor ;
\stopuniqueMPgraphic
+% already setup:
+%
+% definemathradical [sqrt] [mp=minifun::math:radical:default]
+
\continueifinputfile{meta-imp-mat.mkiv}
\setupmathstackers [both] [color=darkred,alternative=mp]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv
index e683c3766c9..2c28acf7290 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-imp-txt.mkiv
@@ -25,7 +25,7 @@
\unprotect
-\definesystemvariable {sh} % ShapedText .. todo: commandhandler
+\ifdefined\??sh \else \definesystemvariable {sh} \fi % ShapedText .. todo: commandhandler
\unexpanded\def\setupshapetexts
{\dodoubleempty\getparameters[\??sh]}
@@ -80,16 +80,17 @@
\unexpanded\def\adaptparshape
{\def\docommand##1%
- {\ifcase\scratchcounter
- \expandafter\appendtoks\space##1 \to\scratchtoks
- \else
- \advance\scratchcounter\minusone
- \fi}%
+ {\doifsomething{##1}%
+ {\ifcase\scratchcounter\relax
+ \expandafter\appendtoks\space##1 \to\scratchtoks
+ \else
+ \advance\scratchcounter\minusone
+ \fi}}%
\scratchcounter\prevgraf
\doglobal\decrement(\totalparlines,\scratchcounter)%
\multiply\scratchcounter\plustwo
\scratchtoks\emptytoks
- \expanded{\processseparatedlist[\the\partoks][\space]}\docommand
+ \expanded{\processseparatedlist[\the\partoks][\space]}\docommand % we can have two spaces
\global\partoks\scratchtoks
\parshape\totalparlines\the\partoks\relax}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv
index ac920450e84..9305a04957e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv
@@ -136,25 +136,34 @@
\let\stopMPinclusions\relax
+% The next was broken since we added instances so it will go away!
+
\unexpanded\def\MPinclusions
{\dosingleempty\meta_inclusions}
\def\meta_inclusions[#1]%
{\edef\m_meta_option{#1}%
- \dosinglegroupempty\meta_inclusions_indeed}
+ \dodoublegroupempty\meta_inclusions_indeed}
\def\meta_inclusions_indeed#1#2%
{\let\m_meta_saved_instance\currentMPinstance
- \edef\currentMPinstance{#1}%
- \ifx\currentMPinstance\empty
- \let\currentMPinstance\defaultMPinstance
- \fi
\ifx\m_meta_option\!!plustoken \else
\global\t_meta_inclusions\emptytoks
\fi
- \gtoksapp\t_meta_inclusions{#2}%
+ \ifsecondargument
+ \edef\currentMPinstance{#1}%
+ \ifx\currentMPinstance\empty
+ \let\currentMPinstance\defaultMPinstance
+ \fi
+ \gtoksapp\t_meta_inclusions{#2}%
+ \else
+ \let\currentMPinstance\defaultMPinstance
+ \gtoksapp\t_meta_inclusions{#1}%
+ \fi
\let\currentMPinstance\m_meta_saved_instance}
+% so far
+
\installcommandhandler \??mpinstance {MPinstance} \??mpinstance
\setupMPinstance
@@ -874,11 +883,8 @@
{\meta_prepare_instance_variable{#1}%
\edef\overlaystamp{\overlaystamp:\MPvariable{#1}}}
-\unexpanded\def\getMPdata {\clf_getMPdata}
- \let\rawMPdata \clf_getMPdata
-
-\unexpanded\def\getMPstored{\clf_getMPstored}
- \let\rawMPstored \clf_getMPstored
+\unexpanded\def\getMPdata{\clf_getMPdata}
+ \let\rawMPdata \clf_getMPdata
%D We need this trick because we need to make sure that the tex scanner sees
%D newlines and does not quit. Also, we do need to flush the buffer under a normal
@@ -1110,7 +1116,7 @@
% \newcount\c_overlay_linetransparency
% \appendtoks
-% \c_overlay_colormodel \attribute\colormodelattribute
+% \c_overlay_colormodel \c_attr_colormodel
% \c_overlay_color \colo_helpers_inherited_current_ca\overlaycolor
% \c_overlay_transparency \colo_helpers_inherited_current_ta\overlaycolor
% \c_overlay_linecolor \colo_helpers_inherited_current_ca\overlaylinecolor
@@ -1368,8 +1374,8 @@
\appendtoks
\clf_mpsetoutercolor
\MPcolormethod\space
- \attribute\colormodelattribute\space
- \attribute\colorattribute\space
+ \c_attr_colormodel\space
+ \c_attr_color\space
\dogetattribute{transparency}\relax
\to \everyMPgraphic
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/meta-lua.lua
index 42d0366308c..cdcd5c0a857 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/meta-lua.lua
@@ -89,7 +89,7 @@ mplib.finders.mpstemplate = function(specification,name,mode,ftype)
data = errorformatter(nameonly)
end
local name = luatex.registertempfile(nameonly,true)
- local data = metapost.checktexts(data)
+-- local data = metapost.checktexts(data)
io.savedata(name,data)
return name
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua
index c913408cd05..24b02f6f6a6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.lua
@@ -266,10 +266,10 @@ function metapost.getclippath(specification) -- why not a special instance for t
result = metapost.filterclippath(result)
end
stoptiming(metapost)
- metapost.pushformat()
+ metapost.popformat()
return result
else
- metapost.pushformat()
+ metapost.popformat()
end
end
@@ -335,12 +335,13 @@ statistics.register("metapost", function()
if n and n > 0 then
local elapsedtime = statistics.elapsedtime
local elapsed = statistics.elapsed
+ local runs, stats = metapost.nofscriptruns()
local instances,
memory = metapost.getstatistics(true)
- return format("%s seconds, loading: %s, execution: %s, n: %s, average: %s, instances: %i, luacalls: %i, memory: %0.3f M",
+ return format("%s seconds, loading: %s, execution: %s, n: %s, average: %s, instances: %i, luacalls: %s, memory: %0.3f M",
elapsedtime(metapost), elapsedtime(mplib), elapsedtime(metapost.exectime), n,
elapsedtime((elapsed(metapost) + elapsed(mplib) + elapsed(metapost.exectime)) / n),
- instances, metapost.nofscriptruns(),memory/(1024*1024))
+ instances, stats and stats or runs, memory/(1024*1024))
else
return nil
end
@@ -400,3 +401,31 @@ implement {
name = "mptexreset",
actions = mptex.reset
}
+
+-- moved from mlib-lua:
+
+mp = mp or { -- system namespace
+ set = { },
+ get = { },
+ aux = { },
+ scan = { },
+ skip = { },
+ inject = { },
+}
+
+MP = MP or { } -- user namespace
+
+-- We had this:
+--
+-- table.setmetatablecall(mp,function(t,k) mpprint(k) end)
+--
+-- but the next one is more interesting because we cannot use calls like:
+--
+-- lua.mp.somedefdname("foo")
+--
+-- which is due to expansion of somedefdname during suffix creation. So:
+--
+-- lua.mp("somedefdname","foo")
+
+table.setmetatablecall(mp,function(t,k,...) return t[k](...) end)
+table.setmetatablecall(MP,function(t,k,...) return t[k](...) end)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv
index a1ed7efeb8c..7fb567746d0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkiv
@@ -13,14 +13,13 @@
\writestatus{loading}{MetaPost Library Graphics / Initializations}
+\registerctxluafile{mlib-fio}{}
\registerctxluafile{mlib-run}{}
\registerctxluafile{mlib-ctx}{}
-\registerctxluafile{mlib-lua}{}
-\registerctxluafile{mlib-lmp}{}
-\registerctxluafile{mlib-int}{}
-
-\doifelsefileexists{mlib-cnt.lua}{\registerctxluafile{mlib-cnt}{optimize}}{}
-\doifelsefileexists{mlib-svg.lua}{\registerctxluafile{mlib-svg}{optimize}}{}
+\registerctxluafile{mlib-lua}{autosuffix}
+\registerctxluafile{mlib-mpf}{}
+\registerctxluafile{mlib-lmp}{autosuffix}
+\registerctxluafile{mlib-int}{autosuffix}
\unprotect
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkxl b/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkxl
deleted file mode 100644
index bb246062710..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-ctx.mkxl
+++ /dev/null
@@ -1,31 +0,0 @@
-%D \module
-%D [ file=mlib-ctx,
-%D version=2008.03.25,
-%D title=\METAPOST\ Integrated Graphics,
-%D subtitle=Basics,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\writestatus{loading}{MetaPost Library Graphics / Initializations}
-
-\registerctxluafile{mlib-run}{}
-\registerctxluafile{mlib-ctx}{}
-\registerctxluafile{mlib-lua}{}
-\registerctxluafile{mlib-scn}{}
-\registerctxluafile{mlib-mat}{}
-\registerctxluafile{mlib-lmp}{}
-\registerctxluafile{mlib-int}{}
-\registerctxluafile{mlib-lmt}{}
-
-\doifelsefileexists{mlib-cnt.lua}{\registerctxluafile{mlib-cnt}{}}{}
-\doifelsefileexists{mlib-svg.lua}{\registerctxluafile{mlib-svg}{}}{}
-
-\unprotect
-
-\protect \endinput
-
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua
new file mode 100644
index 00000000000..51c88eb2237
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-fio.lua
@@ -0,0 +1,85 @@
+if not modules then modules = { } end modules ['mlib-run'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local concat = table.concat
+local mplib = mplib
+
+local report_logger = logs.reporter("metapost log")
+local report_error = logs.reporter("metapost error")
+
+local l, nl, dl = { }, 0, false
+local t, nt, dt = { }, 0, false
+local e, ne, de = { }, 0, false
+
+mplib.realtimelogging = false
+
+local function logger(target,str)
+ if target == 1 then
+ -- log
+ elseif target == 2 or target == 3 then
+ -- term
+ if str == "\n" then
+ mplib.realtimelogging = true
+ if nl > 0 then
+ report_logger(concat(l,"",1,nl))
+ nl, dl = 0, false
+ elseif not dl then
+ report_logger("")
+ dl = true
+ end
+ else
+ nl = nl + 1
+ l[nl] = str
+ end
+ elseif target == 4 then
+ report_error(str)
+ end
+end
+
+local finders = { }
+mplib.finders = finders -- also used in meta-lua.lua
+
+local new_instance = mplib.new
+
+local function validftype(ftype)
+ if ftype == "mp" then
+ return "mp"
+ else
+ return nil
+ end
+end
+
+finders.file = function(specification,name,mode,ftype)
+ return resolvers.findfile(name,validftype(ftype))
+end
+
+local function i_finder(name,mode,ftype) -- fake message for mpost.map and metafun.mpvi
+ local specification = url.hashed(name)
+ local finder = finders[specification.scheme] or finders.file
+ local found = finder(specification,name,mode,validftype(ftype))
+ return found
+end
+
+local function o_finder(name,mode,ftype)
+ return name
+end
+
+o_finder = sandbox.register(o_finder,sandbox.filehandlerone,"mplib output finder")
+
+local function finder(name,mode,ftype)
+ return (mode == "w" and o_finder or i_finder)(name,mode,validftype(ftype))
+end
+
+function mplib.new(specification)
+ specification.find_file = finder
+ specification.run_logger = logger
+ return new_instance(specification)
+end
+
+mplib.finder = finder
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua
index 6fca9530236..2f5f539e9ec 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-int.lua
@@ -20,8 +20,6 @@ local mpcolor = attributes.colors.mpcolor
local emwidths = fonts.hashes.emwidths
local exheights = fonts.hashes.exheights
-local mpgetdimen = mp.getdimen
-
local registerscript = metapost.registerscript
local on_right_page = structures.pages.on_right
@@ -34,233 +32,123 @@ local function defaultcolormodel() -- can be helper
return (colormethod == 0 or colormethod == 1) and 1 or 3
end
-if CONTEXTLMTXMODE > 0 then
-
- local t = os.date("*t") -- maybe this should be a very early on global
-
- registerscript("year", function() return t.year end)
- registerscript("month", function() return t.month end)
- registerscript("day", function() return t.day end)
- registerscript("hour", function() return t.hour end)
- registerscript("minute", function() return t.min end)
- registerscript("second", function() return t.sec end)
-
- registerscript("PaperHeight", function() return getdimen("paperheight") * factor end)
- registerscript("PaperWidth", function() return getdimen("paperwidth") * factor end)
- registerscript("PrintPaperHeight", function() return getdimen("printpaperheight") * factor end)
- registerscript("PrintPaperWidth", function() return getdimen("printpaperwidth") * factor end)
- registerscript("TopSpace", function() return getdimen("topspace") * factor end)
- registerscript("BottomSpace", function() return getdimen("bottomspace") * factor end)
- registerscript("BackSpace", function() return getdimen("backspace") * factor end)
- registerscript("CutSpace", function() return getdimen("cutspace") * factor end)
- registerscript("MakeupHeight", function() return getdimen("makeupheight") * factor end)
- registerscript("MakeupWidth", function() return getdimen("makeupwidth") * factor end)
- registerscript("TopHeight", function() return getdimen("topheight") * factor end)
- registerscript("TopDistance", function() return getdimen("topdistance") * factor end)
- registerscript("HeaderHeight", function() return getdimen("headerheight") * factor end)
- registerscript("HeaderDistance", function() return getdimen("headerdistance") * factor end)
- registerscript("TextHeight", function() return getdimen("textheight") * factor end)
- registerscript("FooterDistance", function() return getdimen("footerdistance") * factor end)
- registerscript("FooterHeight", function() return getdimen("footerheight") * factor end)
- registerscript("BottomDistance", function() return getdimen("bottomdistance") * factor end)
- registerscript("BottomHeight", function() return getdimen("bottomheight") * factor end)
- registerscript("LeftEdgeWidth", function() return getdimen("leftedgewidth") * factor end)
- registerscript("LeftEdgeDistance", function() return getdimen("leftedgedistance") * factor end)
- registerscript("LeftMarginWidth", function() return getdimen("leftmarginwidth") * factor end)
- registerscript("LeftMarginDistance", function() return getdimen("leftmargindistance") * factor end)
- registerscript("TextWidth", function() return getdimen("textwidth") * factor end)
- registerscript("RightMarginDistance", function() return getdimen("rightmargindistance") * factor end)
- registerscript("RightMarginWidth", function() return getdimen("rightmarginwidth") * factor end)
- registerscript("RightEdgeDistance", function() return getdimen("rightedgedistance") * factor end)
- registerscript("RightEdgeWidth", function() return getdimen("rightedgewidth") * factor end)
- registerscript("InnerMarginDistance", function() return getdimen("innermargindistance") * factor end)
- registerscript("InnerMarginWidth", function() return getdimen("innermarginwidth") * factor end)
- registerscript("OuterMarginDistance", function() return getdimen("outermargindistance") * factor end)
- registerscript("OuterMarginWidth", function() return getdimen("outermarginwidth") * factor end)
- registerscript("InnerEdgeDistance", function() return getdimen("inneredgedistance") * factor end)
- registerscript("InnerEdgeWidth", function() return getdimen("inneredgewidth") * factor end)
- registerscript("OuterEdgeDistance", function() return getdimen("outeredgedistance") * factor end)
- registerscript("OuterEdgeWidth", function() return getdimen("outeredgewidth") * factor end)
- registerscript("PageOffset", function() return getdimen("pagebackgroundoffset") * factor end)
- registerscript("PageDepth", function() return getdimen("pagebackgrounddepth") * factor end)
- registerscript("LayoutColumns", function() return getcount("layoutcolumns") end)
- registerscript("LayoutColumnDistance", function() return getdimen("layoutcolumndistance") * factor end)
- registerscript("LayoutColumnWidth", function() return getdimen("layoutcolumnwidth") * factor end)
- registerscript("SpineWidth", function() return getdimen("spinewidth") * factor end)
- registerscript("PaperBleed", function() return getdimen("paperbleed") * factor end)
-
- registerscript("RealPageNumber", function() return getcount("realpageno") end)
- registerscript("LastPageNumber", function() return getcount("lastpageno") end)
-
- registerscript("PageNumber", function() return getcount("pageno") end)
- registerscript("NOfPages", function() return getcount("lastpageno") end)
-
- registerscript("SubPageNumber", function() return getcount("subpageno") end)
- registerscript("NOfSubPages", function() return getcount("lastsubpageno") end)
-
- registerscript("CurrentColumn", function() return getcount("mofcolumns") end)
- registerscript("NOfColumns", function() return getcount("nofcolumns") end)
-
- registerscript("BaseLineSkip", function() return get ("baselineskip",true) * factor end)
- registerscript("LineHeight", function() return getdimen("lineheight") * factor end)
- registerscript("BodyFontSize", function() return getdimen("bodyfontsize") * factor end)
-
- registerscript("TopSkip", function() return get ("topskip",true) * factor end)
- registerscript("StrutHeight", function() return getdimen("strutht") * factor end)
- registerscript("StrutDepth", function() return getdimen("strutdp") * factor end)
-
- registerscript("PageNumber", function() return getcount("pageno") end)
- registerscript("RealPageNumber", function() return getcount("realpageno") end)
- registerscript("NOfPages", function() return getcount("lastpageno") end)
-
- registerscript("CurrentWidth", function() return get ("hsize") * factor end)
- registerscript("CurrentHeight", function() return get ("vsize") * factor end)
-
- registerscript("EmWidth", function() return emwidths [false] * factor end)
- registerscript("ExHeight", function() return exheights[false] * factor end)
-
- registerscript("HSize", function() return get ("hsize") * factor end)
- registerscript("VSize", function() return get ("vsize") * factor end)
- registerscript("LastPageNumber", function() return getcount("lastpageno") end)
-
- registerscript("OverlayWidth", function() return getdimen("d_overlay_width") * factor end)
- registerscript("OverlayHeight", function() return getdimen("d_overlay_height") * factor end)
- registerscript("OverlayDepth", function() return getdimen("d_overlay_depth") * factor end)
- registerscript("OverlayLineWidth", function() return getdimen("d_overlay_linewidth") * factor end)
- registerscript("OverlayOffset", function() return getdimen("d_overlay_offset") * factor end)
- registerscript("OverlayRegion", function() mpstring(getmacro("m_overlay_region")) end)
- -- ("CurrentLayout", function() mpstring(getmacro("currentlayout")) end)
-
- registerscript("PageFraction", page_fraction)
- registerscript("OnRightPage", on_right_page)
- registerscript("OnOddPage", is_odd_page )
- registerscript("InPageBody", in_body_page )
-
- registerscript("defaultcolormodel", defaultcolormodel)
-
-else
-
- function mp.PaperHeight () mpnumeric(getdimen("paperheight") * factor) end
- function mp.PaperWidth () mpnumeric(getdimen("paperwidth") * factor) end
- function mp.PrintPaperHeight () mpnumeric(getdimen("printpaperheight") * factor) end
- function mp.PrintPaperWidth () mpnumeric(getdimen("printpaperwidth") * factor) end
- function mp.TopSpace () mpnumeric(getdimen("topspace") * factor) end
- function mp.BottomSpace () mpnumeric(getdimen("bottomspace") * factor) end
- function mp.BackSpace () mpnumeric(getdimen("backspace") * factor) end
- function mp.CutSpace () mpnumeric(getdimen("cutspace") * factor) end
- function mp.MakeupHeight () mpnumeric(getdimen("makeupheight") * factor) end
- function mp.MakeupWidth () mpnumeric(getdimen("makeupwidth") * factor) end
- function mp.TopHeight () mpnumeric(getdimen("topheight") * factor) end
- function mp.TopDistance () mpnumeric(getdimen("topdistance") * factor) end
- function mp.HeaderHeight () mpnumeric(getdimen("headerheight") * factor) end
- function mp.HeaderDistance () mpnumeric(getdimen("headerdistance") * factor) end
- function mp.TextHeight () mpnumeric(getdimen("textheight") * factor) end
- function mp.FooterDistance () mpnumeric(getdimen("footerdistance") * factor) end
- function mp.FooterHeight () mpnumeric(getdimen("footerheight") * factor) end
- function mp.BottomDistance () mpnumeric(getdimen("bottomdistance") * factor) end
- function mp.BottomHeight () mpnumeric(getdimen("bottomheight") * factor) end
- function mp.LeftEdgeWidth () mpnumeric(getdimen("leftedgewidth") * factor) end
- function mp.LeftEdgeDistance () mpnumeric(getdimen("leftedgedistance") * factor) end
- function mp.LeftMarginWidth () mpnumeric(getdimen("leftmarginwidth") * factor) end
- function mp.LeftMarginDistance () mpnumeric(getdimen("leftmargindistance") * factor) end
- function mp.TextWidth () mpnumeric(getdimen("textwidth") * factor) end
- function mp.RightMarginDistance () mpnumeric(getdimen("rightmargindistance") * factor) end
- function mp.RightMarginWidth () mpnumeric(getdimen("rightmarginwidth") * factor) end
- function mp.RightEdgeDistance () mpnumeric(getdimen("rightedgedistance") * factor) end
- function mp.RightEdgeWidth () mpnumeric(getdimen("rightedgewidth") * factor) end
- function mp.InnerMarginDistance () mpnumeric(getdimen("innermargindistance") * factor) end
- function mp.InnerMarginWidth () mpnumeric(getdimen("innermarginwidth") * factor) end
- function mp.OuterMarginDistance () mpnumeric(getdimen("outermargindistance") * factor) end
- function mp.OuterMarginWidth () mpnumeric(getdimen("outermarginwidth") * factor) end
- function mp.InnerEdgeDistance () mpnumeric(getdimen("inneredgedistance") * factor) end
- function mp.InnerEdgeWidth () mpnumeric(getdimen("inneredgewidth") * factor) end
- function mp.OuterEdgeDistance () mpnumeric(getdimen("outeredgedistance") * factor) end
- function mp.OuterEdgeWidth () mpnumeric(getdimen("outeredgewidth") * factor) end
- function mp.PageOffset () mpnumeric(getdimen("pagebackgroundoffset") * factor) end
- function mp.PageDepth () mpnumeric(getdimen("pagebackgrounddepth") * factor) end
- function mp.LayoutColumns () mpnumeric(getcount("layoutcolumns")) end
- function mp.LayoutColumnDistance() mpnumeric(getdimen("layoutcolumndistance") * factor) end
- function mp.LayoutColumnWidth () mpnumeric(getdimen("layoutcolumnwidth") * factor) end
- function mp.SpineWidth () mpnumeric(getdimen("spinewidth") * factor) end
- function mp.PaperBleed () mpnumeric(getdimen("paperbleed") * factor) end
-
- function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
- function mp.LastPageNumber () mpnumeric(getcount("lastpageno") ) end
-
- function mp.PageNumber () mpnumeric(getcount("pageno") ) end
- function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
-
- function mp.SubPageNumber () mpnumeric(getcount("subpageno") ) end
- function mp.NOfSubPages () mpnumeric(getcount("lastsubpageno") ) end
-
- function mp.CurrentColumn () mpnumeric(getcount("mofcolumns") ) end
- function mp.NOfColumns () mpnumeric(getcount("nofcolumns") ) end
-
- function mp.BaseLineSkip () mpnumeric(get ("baselineskip",true) * factor) end
- function mp.LineHeight () mpnumeric(getdimen("lineheight") * factor) end
- function mp.BodyFontSize () mpnumeric(getdimen("bodyfontsize") * factor) end
-
- function mp.TopSkip () mpnumeric(get ("topskip",true) * factor) end
- function mp.StrutHeight () mpnumeric(getdimen("strutht") * factor) end
- function mp.StrutDepth () mpnumeric(getdimen("strutdp") * factor) end
-
- function mp.PageNumber () mpnumeric(getcount("pageno") ) end
- function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
- function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
-
- function mp.CurrentWidth () mpnumeric(get ("hsize") * factor) end
- function mp.CurrentHeight () mpnumeric(get ("vsize") * factor) end
-
- function mp.EmWidth () mpnumeric(emwidths [false] * factor) end
- function mp.ExHeight () mpnumeric(exheights[false] * factor) end
-
- function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
- function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
- function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
- function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
- function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
- function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
-
- function mp.PageFraction () mpnumeric(page_fraction() ) end
- function mp.OnRightPage () mpboolean(on_right_page() ) end
- function mp.OnOddPage () mpboolean(is_odd_page () ) end
- function mp.InPageBody () mpboolean(in_body_page () ) end
-
- function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
- function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
- function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
- function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
- function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
- function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
- -- mp.CurrentLayout () mpstring (getmacro("currentlayout")) end
-
- function mp.defaultcolormodel () mpnumeric(defaultcolormodel()) end
-
- mp.HSize = mp.CurrentWidth
- mp.VSize = mp.CurrentHeight
- mp.LastPageNumber = mp.NOfPages
-
- -- not much difference (10000 calls in a graphic neither as expansion seems to win
- -- over defining the macro etc) so let's not waste counters then
-
- -- function mp.OverlayColor()
- -- local c = mpcolor(
- -- getcount("c_overlay_colormodel"),
- -- getcount("c_overlay_color"),
- -- getcount("c_overlay_transparency")
- -- )
- -- mpquoted(c)
- -- end
- --
- -- function mp.OverlayLineColor()
- -- local c = mpcolor(
- -- getcount("c_overlay_colormodel"),
- -- getcount("c_overlay_linecolor"),
- -- getcount("c_overlay_linetransparency")
- -- )
- -- mpquoted(c)
- -- end
-
-end
-
-
+function mp.PaperHeight () mpnumeric(getdimen("paperheight") * factor) end
+function mp.PaperWidth () mpnumeric(getdimen("paperwidth") * factor) end
+function mp.PrintPaperHeight () mpnumeric(getdimen("printpaperheight") * factor) end
+function mp.PrintPaperWidth () mpnumeric(getdimen("printpaperwidth") * factor) end
+function mp.TopSpace () mpnumeric(getdimen("topspace") * factor) end
+function mp.BottomSpace () mpnumeric(getdimen("bottomspace") * factor) end
+function mp.BackSpace () mpnumeric(getdimen("backspace") * factor) end
+function mp.CutSpace () mpnumeric(getdimen("cutspace") * factor) end
+function mp.MakeupHeight () mpnumeric(getdimen("makeupheight") * factor) end
+function mp.MakeupWidth () mpnumeric(getdimen("makeupwidth") * factor) end
+function mp.TopHeight () mpnumeric(getdimen("topheight") * factor) end
+function mp.TopDistance () mpnumeric(getdimen("topdistance") * factor) end
+function mp.HeaderHeight () mpnumeric(getdimen("headerheight") * factor) end
+function mp.HeaderDistance () mpnumeric(getdimen("headerdistance") * factor) end
+function mp.TextHeight () mpnumeric(getdimen("textheight") * factor) end
+function mp.FooterDistance () mpnumeric(getdimen("footerdistance") * factor) end
+function mp.FooterHeight () mpnumeric(getdimen("footerheight") * factor) end
+function mp.BottomDistance () mpnumeric(getdimen("bottomdistance") * factor) end
+function mp.BottomHeight () mpnumeric(getdimen("bottomheight") * factor) end
+function mp.LeftEdgeWidth () mpnumeric(getdimen("leftedgewidth") * factor) end
+function mp.LeftEdgeDistance () mpnumeric(getdimen("leftedgedistance") * factor) end
+function mp.LeftMarginWidth () mpnumeric(getdimen("leftmarginwidth") * factor) end
+function mp.LeftMarginDistance () mpnumeric(getdimen("leftmargindistance") * factor) end
+function mp.TextWidth () mpnumeric(getdimen("textwidth") * factor) end
+function mp.RightMarginDistance () mpnumeric(getdimen("rightmargindistance") * factor) end
+function mp.RightMarginWidth () mpnumeric(getdimen("rightmarginwidth") * factor) end
+function mp.RightEdgeDistance () mpnumeric(getdimen("rightedgedistance") * factor) end
+function mp.RightEdgeWidth () mpnumeric(getdimen("rightedgewidth") * factor) end
+function mp.InnerMarginDistance () mpnumeric(getdimen("innermargindistance") * factor) end
+function mp.InnerMarginWidth () mpnumeric(getdimen("innermarginwidth") * factor) end
+function mp.OuterMarginDistance () mpnumeric(getdimen("outermargindistance") * factor) end
+function mp.OuterMarginWidth () mpnumeric(getdimen("outermarginwidth") * factor) end
+function mp.InnerEdgeDistance () mpnumeric(getdimen("inneredgedistance") * factor) end
+function mp.InnerEdgeWidth () mpnumeric(getdimen("inneredgewidth") * factor) end
+function mp.OuterEdgeDistance () mpnumeric(getdimen("outeredgedistance") * factor) end
+function mp.OuterEdgeWidth () mpnumeric(getdimen("outeredgewidth") * factor) end
+function mp.PageOffset () mpnumeric(getdimen("pagebackgroundoffset") * factor) end
+function mp.PageDepth () mpnumeric(getdimen("pagebackgrounddepth") * factor) end
+function mp.LayoutColumns () mpnumeric(getcount("layoutcolumns")) end
+function mp.LayoutColumnDistance() mpnumeric(getdimen("layoutcolumndistance") * factor) end
+function mp.LayoutColumnWidth () mpnumeric(getdimen("layoutcolumnwidth") * factor) end
+function mp.SpineWidth () mpnumeric(getdimen("spinewidth") * factor) end
+function mp.PaperBleed () mpnumeric(getdimen("paperbleed") * factor) end
+
+function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
+function mp.LastPageNumber () mpnumeric(getcount("lastpageno") ) end
+
+function mp.PageNumber () mpnumeric(getcount("pageno") ) end
+function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
+
+function mp.SubPageNumber () mpnumeric(getcount("subpageno") ) end
+function mp.NOfSubPages () mpnumeric(getcount("lastsubpageno") ) end
+
+function mp.CurrentColumn () mpnumeric(getcount("mofcolumns") ) end
+function mp.NOfColumns () mpnumeric(getcount("nofcolumns") ) end
+
+function mp.BaseLineSkip () mpnumeric(get ("baselineskip",true) * factor) end
+function mp.LineHeight () mpnumeric(getdimen("lineheight") * factor) end
+function mp.BodyFontSize () mpnumeric(getdimen("bodyfontsize") * factor) end
+
+function mp.TopSkip () mpnumeric(get ("topskip",true) * factor) end
+function mp.StrutHeight () mpnumeric(getdimen("strutht") * factor) end
+function mp.StrutDepth () mpnumeric(getdimen("strutdp") * factor) end
+
+function mp.PageNumber () mpnumeric(getcount("pageno") ) end
+function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
+function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
+
+function mp.CurrentWidth () mpnumeric(get ("hsize") * factor) end
+function mp.CurrentHeight () mpnumeric(get ("vsize") * factor) end
+
+function mp.EmWidth () mpnumeric(emwidths [false] * factor) end
+function mp.ExHeight () mpnumeric(exheights[false] * factor) end
+
+function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
+function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
+function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
+function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
+function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
+function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
+
+function mp.PageFraction () mpnumeric(page_fraction() ) end
+function mp.OnRightPage () mpboolean(on_right_page() ) end
+function mp.OnOddPage () mpboolean(is_odd_page () ) end
+function mp.InPageBody () mpboolean(in_body_page () ) end
+
+function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
+function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
+function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
+function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
+function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
+function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
+-- mp.CurrentLayout () mpstring (getmacro("currentlayout")) end
+
+function mp.defaultcolormodel () mpnumeric(defaultcolormodel()) end
+
+mp.HSize = mp.CurrentWidth
+mp.VSize = mp.CurrentHeight
+mp.LastPageNumber = mp.NOfPages
+
+-- not much difference (10000 calls in a graphic neither as expansion seems to win
+-- over defining the macro etc) so let's not waste counters then
+
+-- function mp.OverlayColor()
+-- local c = mpcolor(
+-- getcount("c_overlay_colormodel"),
+-- getcount("c_overlay_color"),
+-- getcount("c_overlay_transparency")
+-- )
+-- mpquoted(c)
+-- end
+--
+-- function mp.OverlayLineColor()
+-- local c = mpcolor(
+-- getcount("c_overlay_colormodel"),
+-- getcount("c_overlay_linecolor"),
+-- getcount("c_overlay_linetransparency")
+-- )
+-- mpquoted(c)
+-- end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-lmp.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-lmp.lua
index f000f428245..79370d2ce8d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-lmp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-lmp.lua
@@ -6,219 +6,60 @@ if not modules then modules = { } end modules ['mlib-lmp'] = {
license = "see context related readme files",
}
+-- path relates stuff ... todo: use a stack (or numeric index to list)
+
local type = type
local aux = mp.aux
local mpnumeric = aux.numeric
local mppair = aux.pair
-local mpquoted = aux.quoted
-local mpdirect = aux.direct
-
--- todo: use a stack?
-
-do
-
- local p = nil
- local n = 0
-
- local function mf_path_reset()
- p = nil
- n = 0
- end
-
- if CONTEXTLMTXMODE > 0 then
-
- local scan = mp.scan
- local scannumber = scan.number
- local scanpath = scan.path
-
- local function mf_path_length()
- p = scanpath()
- n = p and #p or 1
- mpnumeric(n)
- end
-
- local function mf_path_point()
- local i = scannumber()
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[1],pi[2])
- end
- end
-
- local function mf_path_left()
- local i = scannumber()
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[5],pi[6])
- end
- end
-
- local function mf_path_right()
- local i = scannumber()
- if i > 0 and i <= n then
- local pn
- if i == 1 then
- pn = p[2] or p[1]
- else
- pn = p[i+1] or p[1]
- end
- mppair(pn[3],pn[4])
- end
- end
-
- local registerscript = metapost.registerscript
-
- registerscript("pathreset", mf_path_reset)
- registerscript("pathlengthof", mf_path_length)
- registerscript("pathpointof", mf_path_point)
- registerscript("pathleftof", mf_path_left)
- registerscript("pathrightof", mf_path_right)
-
- else
-
- local get = mp.get
- local mpgetpath = get.path
-
- local function mf_path_length(name)
- p = mpgetpath(name)
- n = p and #p or 0
- mpnumeric(n)
- end
-
- local function mf_path_point(i)
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[1],pi[2])
- end
- end
-
- local function mf_path_left(i)
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[5],pi[6])
- end
- end
- local function mf_path_right(i)
- if i > 0 and i <= n then
- local pn
- if i == 1 then
- pn = p[2] or p[1]
- else
- pn = p[i+1] or p[1]
- end
- mppair(pn[3],pn[4])
- end
- end
-
- mp.mf_path_length = mf_path_length mp.pathlength = mf_path_length
- mp.mf_path_point = mf_path_point mp.pathpoint = mf_path_point
- mp.mf_path_left = mf_path_left mp.pathleft = mf_path_left
- mp.mf_path_right = mf_path_right mp.pathright = mf_path_right
- mp.mf_path_reset = mf_path_reset mp.pathreset = mf_path_reset
-
- end
+local p = nil
+local n = 0
+local function mf_path_reset()
+ p = nil
+ n = 0
end
-do
+local get = mp.get
+local mpgetpath = get.path
- -- if needed we can optimize the sub (cache last split)
-
- local utflen, utfsub = utf.len, utf.sub
-
- function mp.utflen(s)
- mpnumeric(utflen(s))
- end
+local function mf_path_length(name)
+ p = mpgetpath(name)
+ n = p and #p or 0
+ mpnumeric(n)
+end
- function mp.utfsub(s,f,t)
- mpquoted(utfsub(s,f,t or f))
+local function mf_path_point(i)
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[1],pi[2])
end
-
end
-if CONTEXTLMTXMODE > 0 then
-
- function mp.lmt_svg_include()
- local labelfile = metapost.getparameter { "labelfile" }
- if labelfile and labelfile ~= "" then
- local labels = table.load(labelfile) -- todo: same path as svg file
- if type(labels) == "table" then
- for i=1,#labels do
- metapost.remaptext(labels[i])
- end
- end
- end
- local fontname = metapost.getparameter { "fontname" }
- if fontname and fontname ~= "" then
- local unicode = metapost.getparameter { "unicode" }
- if unicode then
- mpdirect (
- metapost.svgglyphtomp(fontname,math.round(unicode))
- )
- end
- return
- end
- local colorfile = metapost.getparameter { "colormap" }
- local colormap = false
- if colorfile and colorfile ~= "" then
- colormap = metapost.svgcolorremapper(colorfile)
- end
- local filename = metapost.getparameter { "filename" }
- if filename and filename ~= "" then
- mpdirect ( metapost.svgtomp {
- data = io.loaddata(filename),
- remap = true,
- colormap = colormap,
- } )
- else
- local buffer = metapost.getparameter { "buffer" }
- if buffer then
- mpdirect ( metapost.svgtomp {
- data = buffers.getcontent(buffer),
- -- remap = true,
- colormap = colormap,
- } )
- else
- local code = metapost.getparameter { "code" }
- if code then
- mpdirect ( metapost.svgtomp {
- data = code,
- colormap = colormap,
- } )
- end
- end
- end
+local function mf_path_left(i)
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[5],pi[6])
end
-
end
-if CONTEXTLMTXMODE > 0 then
-
- function mp.lmt_do_remaptext()
- local parameters = metapost.scanparameters()
- if parameters and parameters.label then
- metapost.remaptext(parameters)
+local function mf_path_right(i)
+ if i > 0 and i <= n then
+ local pn
+ if i == 1 then
+ pn = p[2] or p[1]
+ else
+ pn = p[i+1] or p[1]
end
+ mppair(pn[3],pn[4])
end
-
end
-if CONTEXTLMTXMODE > 0 then
-
- local dropins = fonts.dropins
- local registerglyphs = dropins.registerglyphs
- local registerglyph = dropins.registerglyph
-
- function mp.lmt_register_glyph()
- registerglyph(metapost.getparameterset("mpsglyph"))
- end
-
- function mp.lmt_register_glyphs()
- registerglyphs(metapost.getparameterset("mpsglyphs"))
- end
-
-end
+mp.mf_path_length = mf_path_length mp.pathlength = mf_path_length
+mp.mf_path_point = mf_path_point mp.pathpoint = mf_path_point
+mp.mf_path_left = mf_path_left mp.pathleft = mf_path_left
+mp.mf_path_right = mf_path_right mp.pathright = mf_path_right
+mp.mf_path_reset = mf_path_reset mp.pathreset = mf_path_reset
-todecimal = xdecimal and xdecimal.new or tonumber -- bonus
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-lmt.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-lmt.lua
deleted file mode 100644
index 9137861a58e..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-lmt.lua
+++ /dev/null
@@ -1,63 +0,0 @@
-if not modules then modules = { } end modules ['mlib-lmt'] = {
- version = 1.001,
- comment = "companion to mlib-ctx.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files",
-}
-
-local mppath = mp.path
-
-local scannumeric = mp.scan.numeric
-local scanpath = mp.scan.path
-
-local getparameter = metapost.getparameter
-
-function mp.lmt_function_x(xmin,xmax,xstep,code,shape) -- experimental
- local code = "return function(x) return " .. code .. " end"
- local action = load(code)
- local points = { }
- local nofpoints = 0
- if action then
- action = action()
- end
- if shape == "steps" then
- local halfx = xstep / 2
- local lastx = xmin
- local lasty = action(xmin)
- for xi = xmin, xmax, xstep do
- local yi = action(xi)
- local xx = lastx + halfx
- nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, lasty }
- nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, yi }
- lastx = xi
- lasty = yi
- end
- if points[nofpoints][1] ~= xmax then
- local yi = action(xmax)
- local xx = lastx + halfx
- nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, lasty }
- nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, yi }
- lastx = xi
- lasty = yi
- end
- else
- for xi = xmin, xmax, xstep do
- nofpoints = nofpoints + 1 ; points[nofpoints] = { xi, action(xi) }
- end
- if points[nofpoints][1] ~= xmax then
- nofpoints = nofpoints + 1 ; points[nofpoints] = { xmax, action(xmax) }
- end
- end
- mppath(points,shape == "curve" and ".." or "--",false)
-end
-
-function mp.lmt_mesh_set()
- local mesh = getparameter { "mesh", "paths" }
- structures.references.currentset.mesh = mesh
-end
-
-function mp.lmt_mesh_update()
- local mesh = getparameter { "paths" } or getparameter { "mesh", "paths" }
- mesh[scannumeric()] = scanpath(true)
-end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua
index 83ce152e201..b38dbdcf6ea 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-lua.lua
@@ -6,1305 +6,45 @@ if not modules then modules = { } end modules ['mlib-lua'] = {
license = "see context related readme files",
}
--- This is very preliminary code!
+local type = type
+local insert, remove = table.insert, table.remove
--- maybe we need mplib.model, but how with instances
+local set = mp.set
+local get = mp.get
-local type, tostring, tonumber, select, loadstring = type, tostring, tonumber, select, loadstring
-local find, match, gsub, gmatch = string.find, string.match, string.gsub, string.gmatch
-local concat, insert, remove = table.concat, table.insert, table.remove
+local currentmpx = nil
+local stack = { }
-local formatters = string.formatters
-local lpegmatch = lpeg.match
-local lpegpatterns = lpeg.patterns
+local get_numeric = mplib.get_numeric
+local get_integer = mplib.get_integer
+local get_string = mplib.get_string
+local get_boolean = mplib.get_boolean
+local get_path = mplib.get_path
+local set_path = mplib.set_path
-local P, S, Ct, Cs, Cc, C = lpeg.P, lpeg.S, lpeg.Ct, lpeg.Cs, lpeg.Cc, lpeg.C
-
-local report_luarun = logs.reporter("metapost","lua")
-local report_script = logs.reporter("metapost","script")
-local report_message = logs.reporter("metapost")
-
-local trace_luarun = false trackers.register("metapost.lua",function(v) trace_luarun = v end)
-
-local be_tolerant = true directives.register("metapost.lua.tolerant", function(v) be_tolerant = v end)
-
-local get, set, aux, scan = { }, { }, { }, { }
-
-mp = mp or { -- system namespace
- set = set,
- get = get,
- aux = aux,
- scan = scan,
-}
-
-MP = MP or { -- user namespace
-}
-
--- We had this:
---
--- table.setmetatablecall(mp,function(t,k) mpprint(k) end)
---
--- but the next one is more interesting because we cannot use calls like:
---
--- lua.mp.somedefdname("foo")
---
--- which is due to expansion of somedefdname during suffix creation. So:
---
--- lua.mp("somedefdname","foo")
-
-table.setmetatablecall(mp,function(t,k,...) return t[k](...) end)
-table.setmetatablecall(MP,function(t,k,...) return t[k](...) end)
-
-do
-
- local currentmpx = nil
- local stack = { }
-
- if CONTEXTLMTXMODE > 0 then
-
- local scan_next = mplib.scan_next
- local scan_expression = mplib.scan_expression
- local scan_token = mplib.scan_token
- local scan_symbol = mplib.scan_symbol
- local scan_numeric = mplib.scan_numeric
- local scan_integer = mplib.scan_integer
- local scan_boolean = mplib.scan_boolean
- local scan_string = mplib.scan_string
- local scan_pair = mplib.scan_pair
- local scan_color = mplib.scan_color
- local scan_cmykcolor = mplib.scan_cmykcolor
- local scan_transform = mplib.scan_transform
- local scan_path = mplib.scan_path
- local scan_pen = mplib.scan_pen
-
- scan.next = function(k) return scan_next (currentmpx,k) end
- scan.expression = function(k) return scan_expression(currentmpx,k) end
- scan.token = function(k) return scan_token (currentmpx,k) end
- scan.symbol = function(k,e) return scan_symbol (currentmpx,k,e) end
- scan.numeric = function() return scan_numeric (currentmpx) end
- scan.number = function() return scan_numeric (currentmpx) end
- scan.integer = function() return scan_integer (currentmpx) end
- scan.boolean = function() return scan_boolean (currentmpx) end
- scan.string = function() return scan_string (currentmpx) end
- scan.pair = function(t) return scan_pair (currentmpx,t) end
- scan.color = function(t) return scan_color (currentmpx,t) end
- scan.cmykcolor = function(t) return scan_cmykcolor (currentmpx,t) end
- scan.transform = function(t) return scan_transform (currentmpx,t) end
- scan.path = function(t) return scan_path (currentmpx,t) end
- scan.pen = function(t) return scan_pen (currentmpx,t) end
-
- else
-
- local get_numeric = mplib.get_numeric
- local get_integer = mplib.get_integer
- local get_string = mplib.get_string
- local get_boolean = mplib.get_boolean
- local get_path = mplib.get_path
- local set_path = mplib.set_path
-
- get.numeric = function(s) return get_numeric(currentmpx,s) end
- get.number = function(s) return get_numeric(currentmpx,s) end
- get.integer = function(s) return get_integer(currentmpx,s) end
- get.string = function(s) return get_string (currentmpx,s) end
- get.boolean = function(s) return get_boolean(currentmpx,s) end
- get.path = function(s) return get_path (currentmpx,s) end
- set.path = function(s,t) return set_path (currentmpx,s,t) end -- not working yet
-
- end
-
- function metapost.pushscriptrunner(mpx)
- insert(stack,mpx)
- currentmpx = mpx
- end
-
- function metapost.popscriptrunner()
- currentmpx = remove(stack,mpx)
- end
-
- function metapost.currentmpx()
- return currentmpx
- end
-
- local status = mplib.status
-
- function metapost.currentmpxstatus()
- return status and status(currentmpx) or 0
- end
-
-end
-
-do
-
- -- serializers
-
- local f_integer = formatters["%i"]
- local f_numeric = formatters["%F"]
-
- -- no %n as that can produce -e notation and that is not so nice for scaled butmaybe we
- -- should then switch between ... i.e. make a push/pop for the formatters here ... not now.
-
- local f_integer = formatters["%i"]
- local f_numeric = formatters["%F"]
- local f_pair = formatters["(%F,%F)"]
- local f_ctrl = formatters["(%F,%F) .. controls (%F,%F) and (%F,%F)"]
- local f_triplet = formatters["(%F,%F,%F)"]
- local f_quadruple = formatters["(%F,%F,%F,%F)"]
- local f_transform = formatters["totransform(%F,%F,%F,%F,%F,%F)"]
- local f_pen = formatters["(pencircle transformed totransform(%F,%F,%F,%F,%F,%F))"]
-
- local f_points = formatters["%p"]
- local f_pair_pt = formatters["(%p,%p)"]
- local f_ctrl_pt = formatters["(%p,%p) .. controls (%p,%p) and (%p,%p)"]
- local f_triplet_pt = formatters["(%p,%p,%p)"]
- local f_quadruple_pt = formatters["(%p,%p,%p,%p)"]
-
- local r = P('%') / "percent"
- + P('"') / "dquote"
- + P('\n') / "crlf"
- -- + P(' ') / "space"
- local a = Cc("&")
- local q = Cc('"')
- local p = Cs(q * (r * a)^-1 * (a * r * (P(-1) + a) + P(1))^0 * q)
-
- mp.cleaned = function(s) return lpegmatch(p,s) or s end
-
- -- management
-
- -- sometimes we gain (e.g. .5 sec on the sync test)
-
- local cache = table.makeweak()
-
- local runscripts = { }
- local runnames = { }
- local nofscripts = 0
-
- function metapost.registerscript(name,f)
- nofscripts = nofscripts + 1
- if f then
- runscripts[nofscripts] = f
- runnames[name] = nofscripts
- else
- runscripts[nofscripts] = name
- end
- return nofscripts
- end
-
- function metapost.scriptindex(name)
- return runnames[name] or 0
- end
-
- -- The gbuffer sharing and such is not really needed now but make a dent when
- -- we have a high volume of simpel calls (loops) so we keep it around for a
- -- while.
-
- local nesting = 0
- local runs = 0
- local gbuffer = { }
- local buffer = gbuffer
- local n = 0
-
- local function mpdirect1(a)
- n = n + 1 buffer[n] = a
- end
- local function mpdirect2(a,b)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- end
- local function mpdirect3(a,b,c)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- n = n + 1 buffer[n] = c
- end
- local function mpdirect4(a,b,c,d)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- n = n + 1 buffer[n] = c
- n = n + 1 buffer[n] = d
- end
- local function mpdirect5(a,b,c,d,e)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- n = n + 1 buffer[n] = c
- n = n + 1 buffer[n] = d
- n = n + 1 buffer[n] = e
- end
-
- local function mpflush(separator)
- buffer[1] = concat(buffer,separator or "",1,n)
- n = 1
- end
-
- function metapost.runscript(code)
- nesting = nesting + 1
- runs = runs + 1
-
- local index = type(code) == "number"
- local f
- local result
-
- if index then
- f = runscripts[code]
- if not f then
- report_luarun("%i: bad index: %s",nesting,code)
- elseif trace_luarun then
- report_luarun("%i: index: %i",nesting,code)
- end
- else
- if trace_luarun then
- report_luarun("%i: code: %s",nesting,code)
- end
- f = cache[code]
- if not f then
- f = loadstring("return " .. code)
- if f then
- cache[code] = f
- elseif be_tolerant then
- f = loadstring(code)
- if f then
- cache[code] = f
- end
- end
- end
- end
-
- -- returning nil is more efficient and a signal not to scan in mp
-
- if f then
-
- local lbuffer, ln
-
- if nesting == 1 then
- buffer = gbuffer
- n = 0
- else
- lbuffer = buffer
- ln = n
- buffer = { }
- n = 0
- end
-
- result = f()
-
- if result then
- local t = type(result)
- if t == "number" then
- result = f_numeric(result)
- elseif t == "table" then
- result = concat(result) -- no spaces here
- else
- result = tostring(result)
- end
- if trace_luarun then
- report_luarun("%i: %s result: %s",nesting,t,result)
- end
- elseif n == 0 then
- result = ""
- if trace_luarun then
- report_luarun("%i: no buffered result",nesting)
- end
- elseif n == 1 then
- result = buffer[1]
- if trace_luarun then
- report_luarun("%i: 1 buffered result: %s",nesting,result)
- end
- else
- -- the space is why we sometimes have collectors
- if nesting == 1 then
- result = concat(buffer," ",1,n)
- if n > 500 or #result > 10000 then
- gbuffer = { } -- newtable(20,0)
- lbuffer = gbuffer
- end
- else
- result = concat(buffer," ")
- end
- if trace_luarun then
- report_luarun("%i: %i buffered results: %s",nesting,n,result)
- end
- end
-
- if nesting == 1 then
- n = 0
- else
- buffer = lbuffer
- n = ln
- end
-
- else
- report_luarun("%i: no result, invalid code: %s",nesting,code)
- result = ""
- end
-
- nesting = nesting - 1
-
- return result
- end
-
- function metapost.nofscriptruns()
- return runs
- end
-
- -- writers
-
- local function mpp(value)
- n = n + 1
- local t = type(value)
- if t == "number" then
- buffer[n] = f_numeric(value)
- elseif t == "string" then
- buffer[n] = value
- elseif t == "table" then
- if #t == 6 then
- buffer[n] = "totransform(" .. concat(value,",") .. ")"
- else
- buffer[n] = "(" .. concat(value,",") .. ")"
- end
- else -- boolean or whatever
- buffer[n] = tostring(value)
- end
- end
-
- local function mpprint(first,second,...)
- if second == nil then
- if first ~= nil then
- mpp(first)
- end
- else
- for i=1,select("#",first,second,...) do
- local value = (select(i,first,second,...))
- if value ~= nil then
- mpp(value)
- end
- end
- end
- end
-
- local function mpp(value)
- n = n + 1
- local t = type(value)
- if t == "number" then
- buffer[n] = f_numeric(value)
- elseif t == "string" then
- buffer[n] = lpegmatch(p,value)
- elseif t == "table" then
- if #t > 4 then
- buffer[n] = ""
- else
- buffer[n] = "(" .. concat(value,",") .. ")"
- end
- else -- boolean or whatever
- buffer[n] = tostring(value)
- end
- end
-
- local function mpvprint(first,second,...) -- variable print
- if second == nil then
- if first ~= nil then
- mpp(first)
- end
- else
- for i=1,select("#",first,second,...) do
- local value = (select(i,first,second,...))
- if value ~= nil then
- mpp(value)
- end
- end
- end
- end
-
- local function mpstring(value)
- n = n + 1
- buffer[n] = lpegmatch(p,value)
- end
-
- local function mpboolean(b)
- n = n + 1
- buffer[n] = b and "true" or "false"
- end
-
- local function mpnumeric(f)
- n = n + 1
- if not f or f == 0 then
- buffer[n] = "0"
- else
- buffer[n] = f_numeric(f)
- end
- end
-
- local function mpinteger(i)
- n = n + 1
- -- buffer[n] = i and f_integer(i) or "0"
- buffer[n] = i or "0"
- end
-
- local function mppoints(i)
- n = n + 1
- if not i or i == 0 then
- buffer[n] = "0pt"
- else
- buffer[n] = f_points(i)
- end
- end
-
- local function mppair(x,y)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_pair(x[1],x[2])
- else
- buffer[n] = f_pair(x,y)
- end
- end
-
- local function mppairpoints(x,y)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_pair_pt(x[1],x[2])
- else
- buffer[n] = f_pair_pt(x,y)
- end
- end
-
- local function mptriplet(x,y,z)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_triplet(x[1],x[2],x[3])
- else
- buffer[n] = f_triplet(x,y,z)
- end
- end
-
- local function mptripletpoints(x,y,z)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_triplet_pt(x[1],x[2],x[3])
- else
- buffer[n] = f_triplet_pt(x,y,z)
- end
- end
-
- local function mpquadruple(w,x,y,z)
- n = n + 1
- if type(w) == "table" then
- buffer[n] = f_quadruple(w[1],w[2],w[3],w[4])
- else
- buffer[n] = f_quadruple(w,x,y,z)
- end
- end
-
- local function mpquadruplepoints(w,x,y,z)
- n = n + 1
- if type(w) == "table" then
- buffer[n] = f_quadruple_pt(w[1],w[2],w[3],w[4])
- else
- buffer[n] = f_quadruple_pt(w,x,y,z)
- end
- end
-
- local function mptransform(x,y,xx,xy,yx,yy)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_transform(x[1],x[2],x[3],x[4],x[5],x[6])
- else
- buffer[n] = f_transform(x,y,xx,xy,yx,yy)
- end
- end
-
- local function mpcolor(c,m,y,k)
- n = n + 1
- if type(c) == "table" then
- local l = #c
- if l == 4 then
- buffer[n] = f_quadruple(c[1],c[2],c[3],c[4])
- elseif l == 3 then
- buffer[n] = f_triplet(c[1],c[2],c[3])
- else
- buffer[n] = f_numeric(c[1])
- end
- else
- if k then
- buffer[n] = f_quadruple(c,m,y,k)
- elseif y then
- buffer[n] = f_triplet(c,m,y)
- else
- buffer[n] = f_numeric(c)
- end
- end
- end
-
- -- we have three kind of connectors:
- --
- -- .. ... -- (true)
-
- local function mp_path(f2,f6,t,connector,cycle)
- if type(t) == "table" then
- local tn = #t
- if tn == 1 then
- local t1 = t[1]
- n = n + 1
- if t.pen then
- buffer[n] = f_pen(unpack(t1))
- else
- buffer[n] = f2(t1[1],t1[2])
- end
- elseif tn > 0 then
- if connector == true or connector == nil then
- connector = ".."
- elseif connector == false then
- connector = "--"
- end
- if cycle == nil then
- cycle = t.cycle
- if cycle == nil then
- cycle = true
- end
- end
- local six = connector == ".." -- otherwise we use whatever gets asked for
- local controls = connector -- whatever
- local a = t[1]
- local b = t[2]
- n = n + 1
- buffer[n] = "("
- n = n + 1
- if six and #a == 6 and #b == 6 then
- buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
- controls = ".."
- else
- buffer[n] = f2(a[1],a[2])
- controls = connector
- end
- for i=2,tn-1 do
- a = b
- b = t[i+1]
- n = n + 1
- buffer[n] = connector
- n = n + 1
- if six and #a == 6 and #b == 6 then
- buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
- controls = ".."
- else
- buffer[n] = f2(a[1],a[2])
- controls = connector
- end
- end
- n = n + 1
- buffer[n] = connector
- a = b
- b = t[1]
- n = n + 1
- if cycle then
- if six and #a == 6 and #b == 6 then
- buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
- controls = ".."
- else
- buffer[n] = f2(a[1],a[2])
- controls = connector
- end
- n = n + 1
- buffer[n] = connector
- n = n + 1
- buffer[n] = "cycle"
- else
- buffer[n] = f2(a[1],a[2])
- end
- n = n + 1
- buffer[n] = ")"
- end
- end
- end
-
- local function mppath(...)
- mp_path(f_pair,f_ctrl,...)
- end
-
- local function mppathpoints(...)
- mp_path(f_pair_pt,f_ctrl_pt,...)
- end
-
- local function mpsize(t)
- n = n + 1
- buffer[n] = type(t) == "table" and f_numeric(#t) or "0"
- end
-
- local replacer = lpeg.replacer("@","%%")
-
- local function mpfprint(fmt,...)
- n = n + 1
- if not find(fmt,"%",1,true) then
- fmt = lpegmatch(replacer,fmt)
- end
- buffer[n] = formatters[fmt](...)
- end
-
- local function mpquoted(fmt,s,...)
- if s then
- n = n + 1
- if not find(fmt,"%",1,true) then
- fmt = lpegmatch(replacer,fmt)
- end
- -- buffer[n] = '"' .. formatters[fmt](s,...) .. '"'
- buffer[n] = lpegmatch(p,formatters[fmt](s,...))
- elseif fmt then
- n = n + 1
- -- buffer[n] = '"' .. fmt .. '"'
- buffer[n] = lpegmatch(p,fmt)
- else
- -- something is wrong
- end
- end
-
- aux.direct = mpdirect1
- aux.direct1 = mpdirect1
- aux.direct2 = mpdirect2
- aux.direct3 = mpdirect3
- aux.direct4 = mpdirect4
- aux.flush = mpflush
-
- aux.print = mpprint
- aux.vprint = mpvprint
- aux.boolean = mpboolean
- aux.string = mpstring
- aux.numeric = mpnumeric
- aux.number = mpnumeric
- aux.integer = mpinteger
- aux.points = mppoints
- aux.pair = mppair
- aux.pairpoints = mppairpoints
- aux.triplet = mptriplet
- aux.tripletpoints = mptripletpoints
- aux.quadruple = mpquadruple
- aux.quadruplepoints = mpquadruplepoints
- aux.path = mppath
- aux.pathpoints = mppathpoints
- aux.size = mpsize
- aux.fprint = mpfprint
- aux.quoted = mpquoted
- aux.transform = mptransform
- aux.color = mpcolor
-
- -- for the moment
-
- local function mpdraw(lines,list) -- n * 4
- if list then
- local c = #lines
- for i=1,c do
- local ci = lines[i]
- local ni = #ci
- n = n + 1 buffer[n] = i < c and "d(" or "D("
- for j=1,ni,2 do
- local l = j + 1
- n = n + 1 buffer[n] = ci[j]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = ci[l]
- n = n + 1 buffer[n] = l < ni and ")--(" or ");"
- end
- end
- else
- local l = #lines
- local m = l - 4
- for i=1,l,4 do
- n = n + 1 buffer[n] = i < m and "d(" or "D("
- n = n + 1 buffer[n] = lines[i]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+1]
- n = n + 1 buffer[n] = ")--("
- n = n + 1 buffer[n] = lines[i+2]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+3]
- n = n + 1 buffer[n] = ");"
- end
- end
- end
-
- local function mpfill(lines,list)
- if list then
- local c = #lines
- for i=1,c do
- local ci = lines[i]
- local ni = #ci
- n = n + 1 buffer[n] = i < c and "f(" or "F("
- for j=1,ni,2 do
- local l = j + 1
- n = n + 1 buffer[n] = ci[j]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = ci[l]
- n = n + 1 buffer[n] = l < ni and ")--(" or ")--C;"
- end
- end
- else
- local l = #lines
- local m = l - 4
- for i=1,l,4 do
- n = n + 1 buffer[n] = i < m and "f(" or "F("
- n = n + 1 buffer[n] = lines[i]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+1]
- n = n + 1 buffer[n] = ")--("
- n = n + 1 buffer[n] = lines[i+2]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+3]
- n = n + 1 buffer[n] = ")--C;"
- end
- end
- end
-
- aux.draw = mpdraw
- aux.fill = mpfill
-
- for k, v in next, aux do mp[k] = v end
-
-end
-
-do
-
- -- Another experimental feature:
-
- local mpnumeric = mp.numeric
- local scanstring = scan.string
- local scriptindex = metapost.scriptindex
-
- function mp.mf_script_index(name)
- local index = scriptindex(name)
- -- report_script("method %i, name %a, index %i",1,name,index)
- mpnumeric(index)
- end
-
- -- once bootstrapped ... (needs pushed mpx instances)
-
- metapost.registerscript("scriptindex",function()
- local name = scanstring()
- local index = scriptindex(name)
- -- report_script("method %i, name %a, index %i",2,name,index)
- mpnumeric(index)
- end)
-
-end
-
--- the next will move to mlib-lmp.lua
-
-do
-
- local mpnamedcolor = attributes.colors.mpnamedcolor
- local mpprint = aux.print
- local scanstring = scan.string
-
- mp.mf_named_color = function(str)
- mpprint(mpnamedcolor(str))
- end
-
- metapost.registerscript("namedcolor",function()
- mpprint(mpnamedcolor(scanstring()))
--- test: return mpnamedcolor(scanstring())
- end)
+get.numeric = function(s) return get_numeric(currentmpx,s) end
+get.number = function(s) return get_numeric(currentmpx,s) end
+get.integer = function(s) return get_integer(currentmpx,s) end
+get.string = function(s) return get_string (currentmpx,s) end
+get.boolean = function(s) return get_boolean(currentmpx,s) end
+get.path = function(s) return get_path (currentmpx,s) end
+set.path = function(s,t) return set_path (currentmpx,s,t) end -- not working yet
+function metapost.pushscriptrunner(mpx)
+ insert(stack,mpx)
+ currentmpx = mpx
end
-function mp.n(t) -- used ?
- return type(t) == "table" and #t or 0
+function metapost.popscriptrunner()
+ currentmpx = remove(stack,mpx)
end
-do
-
- -- experiment: names can change
-
- local mppath = aux.path
- local mpsize = aux.size
-
- local whitespace = lpegpatterns.whitespace
- local newline = lpegpatterns.newline
- local setsep = newline^2
- local comment = (S("#%") + P("--")) * (1-newline)^0 * (whitespace - setsep)^0
- local value = (1-whitespace)^1 / tonumber
- local entry = Ct( value * whitespace * value)
- local set = Ct((entry * (whitespace-setsep)^0 * comment^0)^1)
- local series = Ct((set * whitespace^0)^1)
-
- local pattern = whitespace^0 * series
-
- local datasets = { }
- mp.datasets = datasets
-
- function mp.dataset(str)
- return lpegmatch(pattern,str)
- end
-
- function datasets.load(tag,filename)
- if not filename then
- tag, filename = file.basename(tag), tag
- end
- local data = lpegmatch(pattern,io.loaddata(filename) or "")
- datasets[tag] = {
- data = data,
- line = function(n) mppath(data[n or 1]) end,
- size = function() mpsize(data) end,
- }
- end
-
- table.setmetatablecall(datasets,function(t,k,f,...)
- local d = datasets[k]
- local t = type(d)
- if t == "table" then
- d = d[f]
- if type(d) == "function" then
- d(...)
- else
- mpvprint(...)
- end
- elseif t == "function" then
- d(f,...)
- end
- end)
-
+function metapost.currentmpx()
+ return currentmpx
end
--- \startluacode
--- local str = [[
--- 10 20 20 20
--- 30 40 40 60
--- 50 10
---
--- 10 10 20 30
--- 30 50 40 50
--- 50 20 -- the last one
---
--- 10 20 % comment
--- 20 10
--- 30 40 # comment
--- 40 20
--- 50 10
--- ]]
---
--- MP.myset = mp.dataset(str)
---
--- inspect(MP.myset)
--- \stopluacode
---
--- \startMPpage
--- color c[] ; c[1] := red ; c[2] := green ; c[3] := blue ;
--- for i=1 upto lua("mp.print(mp.n(MP.myset))") :
--- draw lua("mp.path(MP.myset[" & decimal i & "])") withcolor c[i] ;
--- endfor ;
--- \stopMPpage
-
--- texts:
-
-do
-
- local mptriplet = mp.triplet
-
- local bpfactor = number.dimenfactors.bp
- local textexts = nil
- local mptriplet = mp.triplet
- local nbdimensions = nodes.boxes.dimensions
-
- function mp.mf_tt_initialize(tt)
- textexts = tt
- end
-
- function mp.mf_tt_dimensions(n)
- local box = textexts and textexts[n]
- if box then
- -- could be made faster with nuts but not critical
- mptriplet(box.width*bpfactor,box.height*bpfactor,box.depth*bpfactor)
- else
- mptriplet(0,0,0)
- end
- end
-
- function mp.mf_tb_dimensions(category,name)
- local w, h, d = nbdimensions(category,name)
- mptriplet(w*bpfactor,h*bpfactor,d*bpfactor)
- end
-
- function mp.report(a,b,c,...)
- if c then
- report_message("%s : %s",a,formatters[(gsub(b,"@","%%"))](c,...))
- elseif b then
- report_message("%s : %s",a,b)
- elseif a then
- report_message("%s : %s","message",a)
- end
- end
+local status = mplib.status
+function metapost.currentmpxstatus()
+ return status and status(currentmpx) or 0
end
-
-do
-
- local mpprint = aux.print
- local modes = tex.modes
- local systemmodes = tex.systemmodes
-
- function mp.mode(s)
- mpprint(modes[s] and true or false)
- end
-
- function mp.systemmode(s)
- mpprint(systemmodes[s] and true or false)
- end
-
- mp.processingmode = mp.mode
-
-end
-
--- for alan's nodes:
-
-do
-
- local mpprint = aux.print
- local mpquoted = aux.quoted
-
- function mp.isarray(str)
- mpprint(find(str,"%d") and true or false)
- end
-
- function mp.prefix(str)
- mpquoted(match(str,"^(.-)[%d%[]") or str)
- end
-
- -- function mp.dimension(str)
- -- local n = 0
- -- for s in gmatch(str,"%[?%-?%d+%]?") do --todo: lpeg
- -- n = n + 1
- -- end
- -- mpprint(n)
- -- end
-
- mp.dimension = lpeg.counter(P("[") * lpegpatterns.integer * P("]") + lpegpatterns.integer,mpprint)
-
- -- faster and okay as we don't have many variables but probably only
- -- basename makes sense and even then it's not called that often
-
- -- local hash = table.setmetatableindex(function(t,k)
- -- local v = find(k,"%d") and true or false
- -- t[k] = v
- -- return v
- -- end)
- --
- -- function mp.isarray(str)
- -- mpprint(hash[str])
- -- end
- --
- -- local hash = table.setmetatableindex(function(t,k)
- -- local v = '"' .. (match(k,"^(.-)%d") or k) .. '"'
- -- t[k] = v
- -- return v
- -- end)
- --
- -- function mp.prefix(str)
- -- mpprint(hash[str])
- -- end
-
-end
-
-do
-
- local getmacro = tex.getmacro
- local getdimen = tex.getdimen
- local getcount = tex.getcount
- local gettoks = tex.gettoks
- local setmacro = tex.setmacro
- local setdimen = tex.setdimen
- local setcount = tex.setcount
- local settoks = tex.settoks
-
- local mpprint = mp.print
- local mpquoted = mp.quoted
-
- local bpfactor = number.dimenfactors.bp
-
- -- more helpers
-
- local function getmacro(k) mpprint (getmacro(k)) end
- local function getdimen(k) mpprint (getdimen(k)*bpfactor) end
- local function getcount(k) mpprint (getcount(k)) end
- local function gettoks (k) mpquoted(gettoks (k)) end
-
- local function setmacro(k,v) setmacro(k,v) end
- local function setdimen(k,v) setdimen(k,v/bpfactor) end
- local function setcount(k,v) setcount(k,v) end
- local function settoks (k,v) settoks (k,v) end
-
- -- def foo = lua.mp.foo ... enddef ; % loops due to foo in suffix
-
- mp._get_macro_ = getmacro mp.getmacro = getmacro
- mp._get_dimen_ = getdimen mp.getdimen = getdimen
- mp._get_count_ = getcount mp.getcount = getcount
- mp._get_toks_ = gettoks mp.gettoks = gettoks
-
- mp._set_macro_ = setmacro mp.setmacro = setmacro
- mp._set_dimen_ = setdimen mp.setdimen = setdimen
- mp._set_count_ = setcount mp.setcount = setcount
- mp._set_toks_ = settoks mp.settoks = settoks
-
-end
-
--- position fun
-
-do
-
- local mprint = mp.print
- local fprint = mp.fprint
- local qprint = mp.quoted
- local jobpositions = job.positions
- local getwhd = jobpositions.whd
- local getxy = jobpositions.xy
- local getposition = jobpositions.position
- local getpage = jobpositions.page
- local getregion = jobpositions.region
- local getmacro = tokens.getters.macro
-
- function mp.positionpath(name)
- local w, h, d = getwhd(name)
- if w then
- fprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",0,-d,w,-d,w,h,0,h)
- else
- mprint("(origin--cycle)")
- end
- end
-
- function mp.positioncurve(name)
- local w, h, d = getwhd(name)
- if w then
- fprint("((%p,%p)..(%p,%p)..(%p,%p)..(%p,%p)..cycle)",0,-d,w,-d,w,h,0,h)
- else
- mprint("(origin--cycle)")
- end
- end
-
- function mp.positionbox(name)
- local p, x, y, w, h, d = getposition(name)
- if p then
- fprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",x,y-d,x+w,y-d,x+w,y+h,x,y+h)
- else
- mprint("(%p,%p)",x,y)
- end
- end
-
- function mp.positionxy(name)
- local x, y = getxy(name)
- if x then
- fprint("(%p,%p)",x,y)
- else
- mprint("origin")
- end
- end
-
- function mp.positionpage(name)
- fprint("%i",getpage(name) or 0)
- end
-
- function mp.positionregion(name)
- local r = getregion(name)
- if r then
- qprint(r)
- else
- qprint("unknown")
- end
- end
-
- function mp.positionwhd(name)
- local w, h, d = getwhd(name)
- if w then
- fprint("(%p,%p,%p)",w,h,d)
- else
- mprint("(0,0,0)")
- end
- end
-
- function mp.positionpxy(name)
- local p, x, y = getposition(name)
- if p then
- fprint("(%p,%p,%p)",p,x,y)
- else
- mprint("(0,0,0)")
- end
- end
-
- function mp.positionanchor()
- qprint(getmacro("MPanchorid"))
- end
-
-end
-
-do
-
- local mppair = mp.pair
-
- function mp.textextanchor(s)
- local x, y = match(s,"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
- if x and y then
- x = tonumber(x)
- y = tonumber(y)
- end
- mppair(x or 0,y or 0)
- end
-
-end
-
-do
-
- local mprint = mp.print
- local qprint = mp.quoted
- local getmacro = tokens.getters.macro
-
- function mp.texvar(name)
- mprint(getmacro(metapost.namespace .. name))
- end
-
- function mp.texstr(name)
- qprint(getmacro(metapost.namespace .. name))
- end
-
-end
-
-do
-
- local mpprint = aux.print
- local mpvprint = aux.vprint
-
- local hashes = { }
-
- function mp.newhash(name)
- if name then
- hashes[name] = { }
- else
- for i=1,#hashes+1 do
- if not hashes[i] then
- hashes[i] = { }
- mpvprint(i)
- return
- end
- end
- end
- end
-
- function mp.disposehash(n)
- if tonumber(n) then
- hashes[n] = false
- else
- hashes[n] = nil
- end
- end
-
- function mp.inhash(n,key)
- local h = hashes[n]
- mpvprint(h and h[key] and true or false)
- end
-
- function mp.tohash(n,key,value)
- local h = hashes[n]
- if h then
- if value == nil then
- h[key] = true
- else
- h[key] = value
- end
- end
- end
-
- function mp.fromhash(n,key)
- local h = hashes[n]
- mpvprint(h and h[key] or false)
- end
-
- interfaces.implement {
- name = "MPfromhash",
- arguments = "2 strings",
- actions = function(name,key)
- local h = hashes[name] or hashes[tonumber(name)]
- if h then
- local v = h[key] or h[tonumber(key)]
- if v then
- context(v)
- end
- end
- end
- }
-
-end
-
-do
-
- -- a bit overkill: just a find(str,"mf_object=") can be enough
- --
- -- todo : share with mlib-pps.lua metapost,isobject
-
- local mpboolean = aux.boolean
-
- local p1 = P("mf_object=")
- local p2 = lpegpatterns.eol * p1
- local pattern = (1-p2)^0 * p2 + p1
-
- function mp.isobject(str)
- mpboolean(pattern and str ~= "" and lpegmatch(pattern,str))
- end
-
-end
-
-function mp.flatten(t)
- local tn = #t
-
- local t1 = t[1]
- local t2 = t[2]
- local t3 = t[3]
- local t4 = t[4]
-
- for i=1,tn-5,2 do
- local t5 = t[i+4]
- local t6 = t[i+5]
- if t1 == t3 and t3 == t5 and ((t2 <= t4 and t4 <= t6) or (t6 <= t4 and t4 <= t2)) then
- t[i+3] = t2
- t4 = t2
- t[i] = false
- t[i+1] = false
- elseif t2 == t4 and t4 == t6 and ((t1 <= t3 and t3 <= t5) or (t5 <= t3 and t3 <= t1)) then
- t[i+2] = t1
- t3 = t1
- t[i] = false
- t[i+1] = false
- end
- t1 = t3
- t2 = t4
- t3 = t5
- t4 = t6
- end
-
- -- remove duplicates
-
- local t1 = t[1]
- local t2 = t[2]
- for i=1,tn-2,2 do
- local t3 = t[i+2]
- local t4 = t[i+3]
- if t1 == t3 and t2 == t4 then
- t[i] = false
- t[i+1] = false
- end
- t1 = t3
- t2 = t4
- end
-
- -- move coordinates
-
- local m = 0
- for i=1,tn,2 do
- if t[i] then
- m = m + 1 t[m] = t[i]
- m = m + 1 t[m] = t[i+1]
- end
- end
-
- -- prune the table (not gc'd)
-
- for i=tn,m+1,-1 do
- t[i] = nil
- end
-
- -- safeguard so that we have at least one segment
-
- if m == 2 then
- t[3] = t[1]
- t[4] = t[2]
- end
-
-end
-
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua
new file mode 100644
index 00000000000..7452c011187
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-mpf.lua
@@ -0,0 +1,1244 @@
+if not modules then modules = { } end modules ['mlib-mpf'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- moved from mlib-lua:
+
+local type, tostring, tonumber, select, loadstring = type, tostring, tonumber, select, loadstring
+local find, match, gsub, gmatch = string.find, string.match, string.gsub, string.gmatch
+local concat = table.concat
+
+local formatters = string.formatters
+local lpegmatch = lpeg.match
+local lpegpatterns = lpeg.patterns
+
+local P, S, Ct, Cs, Cc, C = lpeg.P, lpeg.S, lpeg.Ct, lpeg.Cs, lpeg.Cc, lpeg.C
+
+local report_luarun = logs.reporter("metapost","lua")
+local report_script = logs.reporter("metapost","script")
+local report_message = logs.reporter("metapost")
+
+local trace_luarun = false trackers.register("metapost.lua",function(v) trace_luarun = v end)
+
+local be_tolerant = true directives.register("metapost.lua.tolerant", function(v) be_tolerant = v end)
+
+local set = mp.set
+local get = mp.get
+local aux = mp.aux
+local scan = mp.scan
+local inject = mp.inject
+
+do
+
+ -- serializers
+
+ local f_integer = formatters["%i"]
+ local f_numeric = formatters["%F"]
+
+ -- no %n as that can produce -e notation and that is not so nice for scaled butmaybe we
+ -- should then switch between ... i.e. make a push/pop for the formatters here ... not now.
+
+ local f_integer = formatters["%i"]
+ local f_numeric = formatters["%F"]
+ local f_pair = formatters["(%F,%F)"]
+ local f_ctrl = formatters["(%F,%F) .. controls (%F,%F) and (%F,%F)"]
+ local f_triplet = formatters["(%F,%F,%F)"]
+ local f_quadruple = formatters["(%F,%F,%F,%F)"]
+ local f_transform = formatters["totransform(%F,%F,%F,%F,%F,%F)"]
+ local f_pen = formatters["(pencircle transformed totransform(%F,%F,%F,%F,%F,%F))"]
+
+ local f_points = formatters["%p"]
+ local f_pair_pt = formatters["(%p,%p)"]
+ local f_ctrl_pt = formatters["(%p,%p) .. controls (%p,%p) and (%p,%p)"]
+ local f_triplet_pt = formatters["(%p,%p,%p)"]
+ local f_quadruple_pt = formatters["(%p,%p,%p,%p)"]
+
+ local r = P('%') / "percent"
+ + P('"') / "dquote"
+ + P('\n') / "crlf"
+ -- + P(' ') / "space"
+ local a = Cc("&")
+ local q = Cc('"')
+ local p = Cs(q * (r * a)^-1 * (a * r * (P(-1) + a) + P(1))^0 * q)
+
+ mp.cleaned = function(s) return lpegmatch(p,s) or s end
+
+ -- management
+
+ -- sometimes we gain (e.g. .5 sec on the sync test)
+
+ local cache = table.makeweak()
+
+ local runscripts = { }
+ local runnames = { }
+ local nofscripts = 0
+
+ function metapost.registerscript(name,f)
+ nofscripts = nofscripts + 1
+ if f then
+ runscripts[nofscripts] = f
+ runnames[name] = nofscripts
+ else
+ runscripts[nofscripts] = name
+ end
+ return nofscripts
+ end
+
+ function metapost.scriptindex(name)
+ return runnames[name] or 0
+ end
+
+ -- The gbuffer sharing and such is not really needed now but make a dent when
+ -- we have a high volume of simpel calls (loops) so we keep it around for a
+ -- while.
+
+ local nesting = 0
+ local runs = 0
+ local gbuffer = { }
+ local buffer = gbuffer
+ local n = 0
+
+ local function mpdirect1(a)
+ n = n + 1 buffer[n] = a
+ end
+ local function mpdirect2(a,b)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ end
+ local function mpdirect3(a,b,c)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ end
+ local function mpdirect4(a,b,c,d)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ n = n + 1 buffer[n] = d
+ end
+ local function mpdirect5(a,b,c,d,e)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ n = n + 1 buffer[n] = d
+ n = n + 1 buffer[n] = e
+ end
+
+ local function mpflush(separator)
+ buffer[1] = concat(buffer,separator or "",1,n)
+ n = 1
+ end
+
+ function metapost.runscript(code)
+ nesting = nesting + 1
+ runs = runs + 1
+
+ local index = type(code) == "number"
+ local f
+ local result
+
+ if index then
+ f = runscripts[code]
+ if not f then
+ report_luarun("%i: bad index: %s",nesting,code)
+ elseif trace_luarun then
+ report_luarun("%i: index: %i",nesting,code)
+ end
+ else
+ if trace_luarun then
+ report_luarun("%i: code: %s",nesting,code)
+ end
+ f = cache[code]
+ if not f then
+ f = loadstring("return " .. code)
+ if f then
+ cache[code] = f
+ elseif be_tolerant then
+ f = loadstring(code)
+ if f then
+ cache[code] = f
+ end
+ end
+ end
+ end
+
+ -- returning nil is more efficient and a signal not to scan in mp
+
+ if f then
+
+ local lbuffer, ln
+
+ if nesting == 1 then
+ buffer = gbuffer
+ n = 0
+ else
+ lbuffer = buffer
+ ln = n
+ buffer = { }
+ n = 0
+ end
+
+ result = f()
+ if result then
+ local t = type(result)
+ if t == "number" then
+ result = f_numeric(result)
+ elseif t == "table" then
+ result = concat(result) -- no spaces here
+ else
+ result = tostring(result)
+ end
+ if trace_luarun then
+ report_luarun("%i: %s result: %s",nesting,t,result)
+ end
+ elseif n == 0 then
+ -- result = ""
+ result = nil -- no scantokens done then
+ if trace_luarun then
+ report_luarun("%i: no buffered result",nesting)
+ end
+ elseif n == 1 then
+ result = buffer[1]
+ if trace_luarun then
+ report_luarun("%i: 1 buffered result: %s",nesting,result)
+ end
+ else
+ -- the space is why we sometimes have collectors
+ if nesting == 1 then
+ -- if we had no space we could pass result directly in lmtx
+ result = concat(buffer," ",1,n)
+ if n > 500 or #result > 10000 then
+ gbuffer = { } -- newtable(20,0)
+ lbuffer = gbuffer
+ end
+ else
+ -- if we had no space we could pass result directly in lmtx
+ result = concat(buffer," ")
+ end
+ if trace_luarun then
+ report_luarun("%i: %i buffered results: %s",nesting,n,result)
+ end
+ end
+
+ if nesting == 1 then
+ n = 0
+ else
+ buffer = lbuffer
+ n = ln
+ end
+
+ else
+ report_luarun("%i: no result, invalid code: %s",nesting,code)
+ result = ""
+ end
+
+ nesting = nesting - 1
+
+ return result
+ end
+
+ function metapost.nofscriptruns()
+ return runs
+ end
+
+ -- writers
+
+ local function mpp(value)
+ n = n + 1
+ local t = type(value)
+ if t == "number" then
+ buffer[n] = f_numeric(value)
+ elseif t == "string" then
+ buffer[n] = value
+ elseif t == "table" then
+ if #t == 6 then
+ buffer[n] = "totransform(" .. concat(value,",") .. ")"
+ else
+ buffer[n] = "(" .. concat(value,",") .. ")"
+ end
+ else -- boolean or whatever
+ buffer[n] = tostring(value)
+ end
+ end
+
+ local function mpprint(first,second,...)
+ if second == nil then
+ if first ~= nil then
+ mpp(first)
+ end
+ else
+ for i=1,select("#",first,second,...) do
+ local value = (select(i,first,second,...))
+ if value ~= nil then
+ mpp(value)
+ end
+ end
+ end
+ end
+
+ local function mpp(value)
+ n = n + 1
+ local t = type(value)
+ if t == "number" then
+ buffer[n] = f_numeric(value)
+ elseif t == "string" then
+ buffer[n] = lpegmatch(p,value)
+ elseif t == "table" then
+ if #t > 4 then
+ buffer[n] = ""
+ else
+ buffer[n] = "(" .. concat(value,",") .. ")"
+ end
+ else -- boolean or whatever
+ buffer[n] = tostring(value)
+ end
+ end
+
+ local function mpvprint(first,second,...) -- variable print
+ if second == nil then
+ if first ~= nil then
+ mpp(first)
+ end
+ else
+ for i=1,select("#",first,second,...) do
+ local value = (select(i,first,second,...))
+ if value ~= nil then
+ mpp(value)
+ end
+ end
+ end
+ end
+
+ local function mpstring(value)
+ n = n + 1
+ buffer[n] = lpegmatch(p,value)
+ end
+
+ local function mpboolean(b)
+ n = n + 1
+ buffer[n] = b and "true" or "false"
+ end
+
+ local function mpnumeric(f)
+ n = n + 1
+ if not f or f == 0 then
+ buffer[n] = "0"
+ else
+ buffer[n] = f_numeric(f)
+ end
+ end
+
+ local function mpinteger(i)
+ n = n + 1
+ -- buffer[n] = i and f_integer(i) or "0"
+ buffer[n] = i or "0"
+ end
+
+ local function mppoints(i)
+ n = n + 1
+ if not i or i == 0 then
+ buffer[n] = "0pt"
+ else
+ buffer[n] = f_points(i)
+ end
+ end
+
+ local function mppair(x,y)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_pair(x[1],x[2])
+ else
+ buffer[n] = f_pair(x,y)
+ end
+ end
+
+ local function mppairpoints(x,y)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_pair_pt(x[1],x[2])
+ else
+ buffer[n] = f_pair_pt(x,y)
+ end
+ end
+
+ local function mptriplet(x,y,z)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_triplet(x[1],x[2],x[3])
+ else
+ buffer[n] = f_triplet(x,y,z)
+ end
+ end
+
+ local function mptripletpoints(x,y,z)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_triplet_pt(x[1],x[2],x[3])
+ else
+ buffer[n] = f_triplet_pt(x,y,z)
+ end
+ end
+
+ local function mpquadruple(w,x,y,z)
+ n = n + 1
+ if type(w) == "table" then
+ buffer[n] = f_quadruple(w[1],w[2],w[3],w[4])
+ else
+ buffer[n] = f_quadruple(w,x,y,z)
+ end
+ end
+
+ local function mpquadruplepoints(w,x,y,z)
+ n = n + 1
+ if type(w) == "table" then
+ buffer[n] = f_quadruple_pt(w[1],w[2],w[3],w[4])
+ else
+ buffer[n] = f_quadruple_pt(w,x,y,z)
+ end
+ end
+
+ local function mptransform(x,y,xx,xy,yx,yy)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_transform(x[1],x[2],x[3],x[4],x[5],x[6])
+ else
+ buffer[n] = f_transform(x,y,xx,xy,yx,yy)
+ end
+ end
+
+ local function mpcolor(c,m,y,k)
+ n = n + 1
+ if type(c) == "table" then
+ local l = #c
+ if l == 4 then
+ buffer[n] = f_quadruple(c[1],c[2],c[3],c[4])
+ elseif l == 3 then
+ buffer[n] = f_triplet(c[1],c[2],c[3])
+ else
+ buffer[n] = f_numeric(c[1])
+ end
+ else
+ if k then
+ buffer[n] = f_quadruple(c,m,y,k)
+ elseif y then
+ buffer[n] = f_triplet(c,m,y)
+ else
+ buffer[n] = f_numeric(c)
+ end
+ end
+ end
+
+ -- we have three kind of connectors:
+ --
+ -- .. ... -- (true)
+
+ local function mp_path(f2,f6,t,connector,cycle)
+ if type(t) == "table" then
+ local tn = #t
+ if tn == 1 then
+ local t1 = t[1]
+ n = n + 1
+ if t.pen then
+ buffer[n] = f_pen(unpack(t1))
+ else
+ buffer[n] = f2(t1[1],t1[2])
+ end
+ elseif tn > 0 then
+ if connector == true or connector == nil then
+ connector = ".."
+ elseif connector == false then
+ connector = "--"
+ end
+ if cycle == nil then
+ cycle = t.cycle
+ if cycle == nil then
+ cycle = true
+ end
+ end
+ local six = connector == ".." -- otherwise we use whatever gets asked for
+ local controls = connector -- whatever
+ local a = t[1]
+ local b = t[2]
+ n = n + 1
+ buffer[n] = "("
+ n = n + 1
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ for i=2,tn-1 do
+ a = b
+ b = t[i+1]
+ n = n + 1
+ buffer[n] = connector
+ n = n + 1
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ end
+ n = n + 1
+ buffer[n] = connector
+ a = b
+ b = t[1]
+ n = n + 1
+ if cycle then
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ n = n + 1
+ buffer[n] = connector
+ n = n + 1
+ buffer[n] = "cycle"
+ else
+ buffer[n] = f2(a[1],a[2])
+ end
+ n = n + 1
+ buffer[n] = ")"
+ end
+ end
+ end
+
+ local function mppath(...)
+ mp_path(f_pair,f_ctrl,...)
+ end
+
+ local function mppathpoints(...)
+ mp_path(f_pair_pt,f_ctrl_pt,...)
+ end
+
+ local function mpsize(t)
+ n = n + 1
+ buffer[n] = type(t) == "table" and f_numeric(#t) or "0"
+ end
+
+ local replacer = lpeg.replacer("@","%%")
+
+ local function mpfprint(fmt,...)
+ n = n + 1
+ if not find(fmt,"%",1,true) then
+ fmt = lpegmatch(replacer,fmt)
+ end
+ buffer[n] = formatters[fmt](...)
+ end
+
+ local function mpquoted(fmt,s,...)
+ if s then
+ n = n + 1
+ if not find(fmt,"%",1,true) then
+ fmt = lpegmatch(replacer,fmt)
+ end
+ -- buffer[n] = '"' .. formatters[fmt](s,...) .. '"'
+ buffer[n] = lpegmatch(p,formatters[fmt](s,...))
+ elseif fmt then
+ n = n + 1
+ -- buffer[n] = '"' .. fmt .. '"'
+ buffer[n] = lpegmatch(p,fmt)
+ else
+ -- something is wrong
+ end
+ end
+
+ aux.direct = mpdirect1
+ aux.direct1 = mpdirect1
+ aux.direct2 = mpdirect2
+ aux.direct3 = mpdirect3
+ aux.direct4 = mpdirect4
+ aux.flush = mpflush
+
+ aux.print = mpprint
+ aux.vprint = mpvprint
+ aux.boolean = mpboolean
+ aux.string = mpstring
+ aux.numeric = mpnumeric
+ aux.number = mpnumeric
+ aux.integer = mpinteger
+ aux.points = mppoints
+ aux.pair = mppair
+ aux.pairpoints = mppairpoints
+ aux.triplet = mptriplet
+ aux.tripletpoints = mptripletpoints
+ aux.quadruple = mpquadruple
+ aux.quadruplepoints = mpquadruplepoints
+ aux.path = mppath
+ aux.pathpoints = mppathpoints
+ aux.size = mpsize
+ aux.fprint = mpfprint
+ aux.quoted = mpquoted
+ aux.transform = mptransform
+ aux.color = mpcolor
+
+ -- for the moment
+
+ local function mpdraw(lines,list) -- n * 4
+ if list then
+ local c = #lines
+ for i=1,c do
+ local ci = lines[i]
+ local ni = #ci
+ n = n + 1 buffer[n] = i < c and "d(" or "D("
+ for j=1,ni,2 do
+ local l = j + 1
+ n = n + 1 buffer[n] = ci[j]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = ci[l]
+ n = n + 1 buffer[n] = l < ni and ")--(" or ");"
+ end
+ end
+ else
+ local l = #lines
+ local m = l - 4
+ for i=1,l,4 do
+ n = n + 1 buffer[n] = i < m and "d(" or "D("
+ n = n + 1 buffer[n] = lines[i]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+1]
+ n = n + 1 buffer[n] = ")--("
+ n = n + 1 buffer[n] = lines[i+2]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+3]
+ n = n + 1 buffer[n] = ");"
+ end
+ end
+ end
+
+ local function mpfill(lines,list)
+ if list then
+ local c = #lines
+ for i=1,c do
+ local ci = lines[i]
+ local ni = #ci
+ n = n + 1 buffer[n] = i < c and "f(" or "F("
+ for j=1,ni,2 do
+ local l = j + 1
+ n = n + 1 buffer[n] = ci[j]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = ci[l]
+ n = n + 1 buffer[n] = l < ni and ")--(" or ")--C;"
+ end
+ end
+ else
+ local l = #lines
+ local m = l - 4
+ for i=1,l,4 do
+ n = n + 1 buffer[n] = i < m and "f(" or "F("
+ n = n + 1 buffer[n] = lines[i]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+1]
+ n = n + 1 buffer[n] = ")--("
+ n = n + 1 buffer[n] = lines[i+2]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+3]
+ n = n + 1 buffer[n] = ")--C;"
+ end
+ end
+ end
+
+ aux.draw = mpdraw
+ aux.fill = mpfill
+
+ for k, v in next, aux do mp[k] = v end
+
+end
+
+do
+
+ -- Another experimental feature:
+
+ local mpnumeric = mp.numeric
+ local scanstring = scan.string
+ local scriptindex = metapost.scriptindex
+
+ function mp.mf_script_index(name)
+ local index = scriptindex(name)
+ -- report_script("method %i, name %a, index %i",1,name,index)
+ mpnumeric(index)
+ end
+
+ -- once bootstrapped ... (needs pushed mpx instances)
+
+ metapost.registerscript("scriptindex",function()
+ local name = scanstring()
+ local index = scriptindex(name)
+ -- report_script("method %i, name %a, index %i",2,name,index)
+ mpnumeric(index)
+ end)
+
+end
+
+-- the next will move to mlib-lmp.lua
+
+do
+
+ local mpnamedcolor = attributes.colors.mpnamedcolor
+ local mpprint = aux.print
+ local scanstring = scan.string
+
+ mp.mf_named_color = function(str)
+ mpprint(mpnamedcolor(str))
+ end
+
+ -- todo: we can inject but currently we always get a string back so then
+ -- we need to deal with it upstream in the color module ... not now
+
+ metapost.registerscript("namedcolor",function()
+ mpprint(mpnamedcolor(scanstring()))
+ end)
+
+end
+
+function mp.n(t) -- used ?
+ return type(t) == "table" and #t or 0
+end
+
+do
+
+ -- experiment: names can change
+
+ local mppath = aux.path
+ local mpsize = aux.size
+
+ local whitespace = lpegpatterns.whitespace
+ local newline = lpegpatterns.newline
+ local setsep = newline^2
+ local comment = (S("#%") + P("--")) * (1-newline)^0 * (whitespace - setsep)^0
+ local value = (1-whitespace)^1 / tonumber
+ local entry = Ct( value * whitespace * value)
+ local set = Ct((entry * (whitespace-setsep)^0 * comment^0)^1)
+ local series = Ct((set * whitespace^0)^1)
+
+ local pattern = whitespace^0 * series
+
+ local datasets = { }
+ mp.datasets = datasets
+
+ function mp.dataset(str)
+ return lpegmatch(pattern,str)
+ end
+
+ function datasets.load(tag,filename)
+ if not filename then
+ tag, filename = file.basename(tag), tag
+ end
+ local data = lpegmatch(pattern,io.loaddata(filename) or "")
+ datasets[tag] = {
+ data = data,
+ line = function(n) mppath(data[n or 1]) end,
+ size = function() mpsize(data) end,
+ }
+ end
+
+ table.setmetatablecall(datasets,function(t,k,f,...)
+ local d = datasets[k]
+ local t = type(d)
+ if t == "table" then
+ d = d[f]
+ if type(d) == "function" then
+ d(...)
+ else
+ mpvprint(...)
+ end
+ elseif t == "function" then
+ d(f,...)
+ end
+ end)
+
+end
+
+-- \startluacode
+-- local str = [[
+-- 10 20 20 20
+-- 30 40 40 60
+-- 50 10
+--
+-- 10 10 20 30
+-- 30 50 40 50
+-- 50 20 -- the last one
+--
+-- 10 20 % comment
+-- 20 10
+-- 30 40 # comment
+-- 40 20
+-- 50 10
+-- ]]
+--
+-- MP.myset = mp.dataset(str)
+--
+-- inspect(MP.myset)
+-- \stopluacode
+--
+-- \startMPpage
+-- color c[] ; c[1] := red ; c[2] := green ; c[3] := blue ;
+-- for i=1 upto lua("mp.print(mp.n(MP.myset))") :
+-- draw lua("mp.path(MP.myset[" & decimal i & "])") withcolor c[i] ;
+-- endfor ;
+-- \stopMPpage
+
+-- texts:
+
+do
+
+ local mptriplet = mp.triplet
+
+ local bpfactor = number.dimenfactors.bp
+ local textexts = nil
+ local mptriplet = mp.triplet
+ local nbdimensions = nodes.boxes.dimensions
+
+ function mp.mf_tt_initialize(tt)
+ textexts = tt
+ end
+
+ function mp.mf_tt_dimensions(n)
+ local box = textexts and textexts[n]
+ if box then
+ -- could be made faster with nuts but not critical
+ mptriplet(box.width*bpfactor,box.height*bpfactor,box.depth*bpfactor)
+ else
+ mptriplet(0,0,0)
+ end
+ end
+
+ function mp.mf_tb_dimensions(category,name)
+ local w, h, d = nbdimensions(category,name)
+ mptriplet(w*bpfactor,h*bpfactor,d*bpfactor)
+ end
+
+ function mp.report(a,b,c,...)
+ if c then
+ report_message("%s : %s",a,formatters[(gsub(b,"@","%%"))](c,...))
+ elseif b then
+ report_message("%s : %s",a,b)
+ elseif a then
+ report_message("%s : %s","message",a)
+ end
+ end
+
+end
+
+do
+
+ local mpprint = aux.print
+ local modes = tex.modes
+ local systemmodes = tex.systemmodes
+
+ function mp.mode(s)
+ mpprint(modes[s] and true or false)
+ end
+
+ function mp.systemmode(s)
+ mpprint(systemmodes[s] and true or false)
+ end
+
+ mp.processingmode = mp.mode
+
+end
+
+-- for alan's nodes:
+
+do
+
+ local mpprint = aux.print
+ local mpquoted = aux.quoted
+
+ function mp.isarray(str)
+ mpprint(find(str,"%d") and true or false)
+ end
+
+ function mp.prefix(str)
+ mpquoted(match(str,"^(.-)[%d%[]") or str)
+ end
+
+ -- function mp.dimension(str)
+ -- local n = 0
+ -- for s in gmatch(str,"%[?%-?%d+%]?") do --todo: lpeg
+ -- n = n + 1
+ -- end
+ -- mpprint(n)
+ -- end
+
+ mp.dimension = lpeg.counter(P("[") * lpegpatterns.integer * P("]") + lpegpatterns.integer,mpprint)
+
+ -- faster and okay as we don't have many variables but probably only
+ -- basename makes sense and even then it's not called that often
+
+ -- local hash = table.setmetatableindex(function(t,k)
+ -- local v = find(k,"%d") and true or false
+ -- t[k] = v
+ -- return v
+ -- end)
+ --
+ -- function mp.isarray(str)
+ -- mpprint(hash[str])
+ -- end
+ --
+ -- local hash = table.setmetatableindex(function(t,k)
+ -- local v = '"' .. (match(k,"^(.-)%d") or k) .. '"'
+ -- t[k] = v
+ -- return v
+ -- end)
+ --
+ -- function mp.prefix(str)
+ -- mpprint(hash[str])
+ -- end
+
+end
+
+do
+
+ local getmacro = tokens.getters.macro
+ local setmacro = tokens.setters.macro
+
+ local getdimen = tex.getdimen
+ local getcount = tex.getcount
+ local gettoks = tex.gettoks
+ local setdimen = tex.setdimen
+ local setcount = tex.setcount
+ local settoks = tex.settoks
+
+ local mpprint = mp.print
+ local mpquoted = mp.quoted
+
+ local bpfactor = number.dimenfactors.bp
+
+ -- more helpers
+
+ function mp.getmacro(k) mpquoted(getmacro(k)) end
+ function mp.getdimen(k) mpprint (getdimen(k)*bpfactor) end
+ function mp.getcount(k) mpprint (getcount(k)) end
+ function mp.gettoks (k) mpquoted(gettoks (k)) end
+
+ function mp.setmacro(k,v) setmacro(k,v) end
+ function mp.setdimen(k,v) setdimen(k,v/bpfactor) end
+ function mp.setcount(k,v) setcount(k,v) end
+ function mp.settoks (k,v) settoks (k,v) end
+
+ function mp.setglobalmacro(k,v) setmacro(k,v,"global") end
+ function mp.setglobaldimen(k,v) setdimen("global",k,v/bpfactor) end
+ function mp.setglobalcount(k,v) setcount("global",k,v) end
+ function mp.setglobaltoks (k,v) settoks ("global",k,v) end
+
+ -- def foo = lua.mp.foo ... enddef ; % loops due to foo in suffix
+
+ mp._get_macro_ = mp.getmacro
+ mp._get_dimen_ = mp.getdimen
+ mp._get_count_ = mp.getcount
+ mp._get_toks_ = mp.gettoks
+
+ mp._set_macro_ = mp.setmacro
+ mp._set_dimen_ = mp.setdimen
+ mp._set_count_ = mp.setcount
+ mp._set_toks_ = mp.settoks
+
+ mp._set_global_macro_ = mp.setglobalmacro
+ mp._set_global_dimen_ = mp.setglobaldimen
+ mp._set_global_count_ = mp.setglobalcount
+ mp._set_global_toks_ = mp.setglobaltoks
+
+end
+
+-- position fun
+
+do
+
+ local mpprint = mp.print
+ local mpfprint = mp.fprint
+ local mpquoted = mp.quoted
+ local jobpositions = job.positions
+ local getwhd = jobpositions.whd
+ local getxy = jobpositions.xy
+ local getposition = jobpositions.position
+ local getpage = jobpositions.page
+ local getregion = jobpositions.region
+ local getmacro = tokens.getters.macro
+
+ function mp.positionpath(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",0,-d,w,-d,w,h,0,h)
+ else
+ mpprint("(origin--cycle)")
+ end
+ end
+
+ function mp.positioncurve(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("((%p,%p)..(%p,%p)..(%p,%p)..(%p,%p)..cycle)",0,-d,w,-d,w,h,0,h)
+ else
+ mpprint("(origin--cycle)")
+ end
+ end
+
+ function mp.positionbox(name)
+ local p, x, y, w, h, d = getposition(name)
+ if p then
+ mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",x,y-d,x+w,y-d,x+w,y+h,x,y+h)
+ else
+ mpprint("(%p,%p)",x,y)
+ end
+ end
+
+ function mp.positionxy(name)
+ local x, y = getxy(name)
+ if x then
+ mpfprint("(%p,%p)",x,y)
+ else
+ mpprint("origin")
+ end
+ end
+
+ function mp.positionpage(name)
+ mpfprint("%i",getpage(name) or 0)
+ end
+
+ function mp.positionregion(name)
+ local r = getregion(name)
+ if r then
+ mpquoted(r)
+ else
+ mpquoted("unknown")
+ end
+ end
+
+ function mp.positionwhd(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("(%p,%p,%p)",w,h,d)
+ else
+ mpprint("(0,0,0)")
+ end
+ end
+
+ function mp.positionpxy(name)
+ local p, x, y = getposition(name)
+ if p then
+ mpfprint("(%p,%p,%p)",p,x,y)
+ else
+ mpprint("(0,0,0)")
+ end
+ end
+
+ function mp.positionanchor()
+ mpquoted(getmacro("MPanchorid"))
+ end
+
+end
+
+do
+
+ local mppair = mp.pair
+
+ function mp.textextanchor(s)
+ local x, y = match(s,"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
+ if x and y then
+ x = tonumber(x)
+ y = tonumber(y)
+ end
+ mppair(x or 0,y or 0)
+ end
+
+end
+
+do
+
+ local mpprint = mp.print
+ local mpquoted = mp.quoted
+ local getmacro = tokens.getters.macro
+
+ function mp.texvar(name)
+ mpprint(getmacro(metapost.namespace .. name))
+ end
+
+ function mp.texstr(name)
+ mpquoted(getmacro(metapost.namespace .. name))
+ end
+
+end
+
+do
+
+ local mpprint = aux.print
+ local mpvprint = aux.vprint
+
+ local hashes = { }
+
+ function mp.newhash(name)
+ if name then
+ hashes[name] = { }
+ else
+ for i=1,#hashes+1 do
+ if not hashes[i] then
+ hashes[i] = { }
+ mpvprint(i)
+ return
+ end
+ end
+ end
+ end
+
+ function mp.disposehash(n)
+ if tonumber(n) then
+ hashes[n] = false
+ else
+ hashes[n] = nil
+ end
+ end
+
+ function mp.inhash(n,key)
+ local h = hashes[n]
+ mpvprint(h and h[key] and true or false)
+ end
+
+ function mp.tohash(n,key,value)
+ local h = hashes[n]
+ if h then
+ if value == nil then
+ h[key] = true
+ else
+ h[key] = value
+ end
+ end
+ end
+
+ function mp.fromhash(n,key)
+ local h = hashes[n]
+ mpvprint(h and h[key] or false)
+ end
+
+ interfaces.implement {
+ name = "MPfromhash",
+ arguments = "2 strings",
+ actions = function(name,key)
+ local h = hashes[name] or hashes[tonumber(name)]
+ if h then
+ local v = h[key] or h[tonumber(key)]
+ if v then
+ context(v)
+ end
+ end
+ end
+ }
+
+end
+
+do
+
+ -- a bit overkill: just a find(str,"mf_object=") can be enough
+ --
+ -- todo : share with mlib-pps.lua metapost,isobject
+
+ local mpboolean = aux.boolean
+
+ local p1 = P("mf_object=")
+ local p2 = lpegpatterns.eol * p1
+ local pattern = (1-p2)^0 * p2 + p1
+
+ function mp.isobject(str)
+ mpboolean(pattern and str ~= "" and lpegmatch(pattern,str))
+ end
+
+end
+
+function mp.flatten(t)
+ local tn = #t
+
+ local t1 = t[1]
+ local t2 = t[2]
+ local t3 = t[3]
+ local t4 = t[4]
+
+ for i=1,tn-5,2 do
+ local t5 = t[i+4]
+ local t6 = t[i+5]
+ if t1 == t3 and t3 == t5 and ((t2 <= t4 and t4 <= t6) or (t6 <= t4 and t4 <= t2)) then
+ t[i+3] = t2
+ t4 = t2
+ t[i] = false
+ t[i+1] = false
+ elseif t2 == t4 and t4 == t6 and ((t1 <= t3 and t3 <= t5) or (t5 <= t3 and t3 <= t1)) then
+ t[i+2] = t1
+ t3 = t1
+ t[i] = false
+ t[i+1] = false
+ end
+ t1 = t3
+ t2 = t4
+ t3 = t5
+ t4 = t6
+ end
+
+ -- remove duplicates
+
+ local t1 = t[1]
+ local t2 = t[2]
+ for i=1,tn-2,2 do
+ local t3 = t[i+2]
+ local t4 = t[i+3]
+ if t1 == t3 and t2 == t4 then
+ t[i] = false
+ t[i+1] = false
+ end
+ t1 = t3
+ t2 = t4
+ end
+
+ -- move coordinates
+
+ local m = 0
+ for i=1,tn,2 do
+ if t[i] then
+ m = m + 1 t[m] = t[i]
+ m = m + 1 t[m] = t[i+1]
+ end
+ end
+
+ -- prune the table (not gc'd)
+
+ for i=tn,m+1,-1 do
+ t[i] = nil
+ end
+
+ -- safeguard so that we have at least one segment
+
+ if m == 2 then
+ t[3] = t[1]
+ t[4] = t[2]
+ end
+
+end
+
+do
+
+ -- if needed we can optimize the sub (cache last split)
+
+ local mpnumeric = mp.numeric
+ local mpquoted = mp.quoted
+
+ local utflen = utf.len
+ local utfsub = utf.sub
+
+ function mp.utflen(s)
+ mpnumeric(utflen(s))
+ end
+
+ function mp.utfsub(s,f,t)
+ mpquoted(utfsub(s,f,t))
+ end
+
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua
index 372a77f4181..e737b5d8688 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.lua
@@ -27,7 +27,7 @@ local copy_node = node.copy
local write_node = node.write
local pen_info = mplib.pen_info
-local object_fields = mplib.fields
+local getfields = mplib.getfields or mplib.fields -- todo: in lmtx get them once and then use gettype
local save_table = false
local force_stroke = false
@@ -363,18 +363,20 @@ end
local stack = { }
local function pushproperties(figure)
+ -- maybe there will be getters in lmtx
local boundingbox = figure:boundingbox()
+ local slot = figure:charcode() or 0
local properties = {
llx = boundingbox[1],
lly = boundingbox[2],
urx = boundingbox[3],
ury = boundingbox[4],
- slot = figure:charcode(),
+ slot = slot,
width = figure:width(),
height = figure:height(),
depth = figure:depth(),
- italic = figure:italcorr(),
- number = figure:charcode() or 0,
+ italic = figure:italcorr(), -- figure:italic() in lmtx
+ number = slot,
}
insert(stack,properties)
metapost.properties = properties
@@ -460,7 +462,7 @@ function metapost.flush(specification,result)
result[#result+1] = evenodd and "W* n" or "W n"
elseif objecttype == "stop_clip" then
result[#result+1] = "Q"
- miterlimit, linecap, linejoin, dashed = -1, -1, -1, "" -- was false
+ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
elseif objecttype == "start_bounds" or objecttype == "stop_bounds" then
-- skip
elseif objecttype == "start_group" then
@@ -475,7 +477,7 @@ function metapost.flush(specification,result)
bbox = toboundingbox(object.path),
})
result = { }
-miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
+ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
else
insert(groupstack,false)
end
@@ -490,7 +492,7 @@ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
result[#result+1] = reference
result = pluginactions(data.after,result,flushfigure)
result[#result+1] = "Q"
-miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
+ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
end
else
-- we use an indirect table as we want to overload
@@ -744,9 +746,9 @@ function metapost.totable(result,askedfig)
for o=1,#objects do
local object = objects[o]
local result = { }
- local fields = object_fields(object) -- hm, is this the whole list, if so, we can get it once
+ local fields = getfields(object) -- hm, is this the whole list, if so, we can get it once
for f=1,#fields do
- local field = fields[f]
+ local field = fields[f]
result[field] = object[field]
end
results[o] = result
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua
index 0250df35c60..8a6f4b4f825 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.lua
@@ -25,6 +25,7 @@ local setmacro = interfaces.setmacro
local texsetbox = tex.setbox
local textakebox = tex.takebox -- or: nodes.takebox
+local texrunlocal = tex.runlocal
local copy_list = node.copy_list
local flush_list = node.flush_list
local setmetatableindex = table.setmetatableindex
@@ -250,6 +251,7 @@ local function startjob(plugmode,kind,mpx)
top = {
textexts = { }, -- all boxes, optionally with a different color
texstrings = { },
+ texregimes = { },
mapstrings = { },
mapindices = { },
mapmoves = { },
@@ -499,8 +501,8 @@ implement {
arguments = { "dimen", "dimen", "dimen" },
actions = function(wd,ht,dp)
local hd = ht + dp
- setmacro("sx",wd ~= 0 and factor/wd or 0)
- setmacro("sy",hd ~= 0 and factor/hd or 0)
+ setmacro("mlib_sx",wd ~= 0 and factor/wd or 0)
+ setmacro("mlib_sy",hd ~= 0 and factor/hd or 0)
end
}
@@ -811,7 +813,13 @@ local tx_reset, tx_process do
local mp_t = nil
local function processtext()
- local mp_text = top.texstrings[mp_index]
+ local mp_text = top.texstrings[mp_index]
+ local mp_regime = top.texregimes[mp_index]
+ if mp_regime and tonumber(mp_regime) >= 0 then
+ mp_text = function()
+ context.sprint(mp_regime,top.texstrings[mp_index] or "")
+ end
+ end
if not mp_text then
report_textexts("missing text for index %a",mp_index)
elseif not mp_c then
@@ -842,14 +850,15 @@ local tx_reset, tx_process do
local madetext = nil
- function mp.mf_some_text(index,str)
+ function mp.mf_some_text(index,str,regime)
mp_target = index
mp_index = index
mp_c = nil
mp_a = nil
mp_t = nil
top.texstrings[mp_index] = str
- tex.runtoks("mptexttoks")
+ top.texregimes[mp_index] = regime or -1
+ texrunlocal("mptexttoks")
local box = textakebox("mptextbox")
top.textexts[mp_target] = box
mp.triplet(bp*box.width,bp*box.height,bp*box.depth)
@@ -857,7 +866,7 @@ local tx_reset, tx_process do
end
function mp.mf_made_text(index)
- mp.mf_some_text(index,madetext)
+ mp.mf_some_text(index,madetext,catcodes.numbers.ctxcatcodes) -- btex/etex ..
end
-- a label can be anything, also something mp doesn't like in strings
@@ -899,7 +908,7 @@ local tx_reset, tx_process do
mp.triplet(top.mapmoves[index])
end
- function mp.mf_map_text(index,str)
+ function mp.mf_map_text(index,str,regime)
local map = top.mapindices[tonumber(str)]
if type(map) == "table" then
local text = map.text
@@ -912,14 +921,16 @@ local tx_reset, tx_process do
-- the image text
if overload then
top.texstrings[mp_index] = map.template or map.label or "error"
- tex.runtoks("mptexttoks")
+ top.texregimes[mp_index] = regime or -1
+ texrunlocal("mptexttoks")
local box = textakebox("mptextbox") or new_hlist()
width = bp * box.width
where = overload.where
end
-- the real text
top.texstrings[mp_index] = overload and overload.text or text or "error"
- tex.runtoks("mptexttoks")
+ top.texregimes[mp_index] = regime or -1
+ texrunlocal("mptexttoks")
local box = textakebox("mptextbox") or new_hlist()
local twd = bp * box.width
local tht = bp * box.height
@@ -953,8 +964,8 @@ local tx_reset, tx_process do
-- instance in a macro definition (rawtextext (pass back string)) ... of course one
-- should use textext so this is just a catch. When not in lmtx it's never immediate.
- local reported = false
- local awayswrap = CONTEXTLMTXMODE <= 1
+ local reported = false
+ local alwayswrap = false -- CONTEXTLMTXMODE <= 1 -- was always nil due to typo
function metapost.maketext(s,mode)
if not reported then
@@ -1036,7 +1047,7 @@ local tx_reset, tx_process do
local mp_hash = prescript.tx_cache
local box
if mp_hash == "no" then
- tex.runtoks("mptexttoks")
+ texrunlocal("mptexttoks")
box = textakebox("mptextbox")
else
local cache = data.texhash
@@ -1069,7 +1080,7 @@ local tx_reset, tx_process do
if box then
box = copy_list(box)
else
- tex.runtoks("mptexttoks")
+ texrunlocal("mptexttoks")
box = textakebox("mptextbox")
cache[mp_hash] = box
end
@@ -1152,7 +1163,7 @@ local gt_reset, gt_process do
if not graphics[index] then
mp_index = index
mp_str = str
- tex.runtoks("mpgraphictexttoks")
+ texrunlocal("mpgraphictexttoks")
end
end
@@ -1573,7 +1584,7 @@ local ot_reset, ot_process do
mp_index = index
mp_kind = kind
mp_str = str
- tex.runtoks("mpoutlinetoks")
+ texrunlocal("mpoutlinetoks")
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv
index 05113058511..74d6ae142d0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-pps.mkiv
@@ -86,7 +86,7 @@
\unexpanded\def\MPLIBfigure#1#2%
{\setbox\scratchbox\hpack{\externalfigure[#1][\c!mask=#2]}%
\clf_mpsetsxsy\wd\scratchbox\ht\scratchbox\zeropoint
- \vpack to \zeropoint{\vss\hpack to \zeropoint{\fastsxsy{\sx}{\sy}{\box\scratchbox}\hss}}}
+ \vpack to \zeropoint{\vss\hpack to \zeropoint{\fastsxsy{\mlib_sx}{\mlib_sy}{\box\scratchbox}\hss}}}
% horrible (we could inline scale and matrix code):
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua b/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua
index 07fa6a19198..602d6f36c0d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mlib-run.lua
@@ -34,14 +34,11 @@ local find, striplines = string.find, utilities.strings.striplines
local concat, insert, remove = table.concat, table.insert, table.remove
local emptystring = string.is_empty
-local P = lpeg.P
local trace_graphics = false trackers.register("metapost.graphics", function(v) trace_graphics = v end)
local trace_tracingall = false trackers.register("metapost.tracingall", function(v) trace_tracingall = v end)
-local trace_terminal = false trackers.register("metapost.terminal", function(v) trace_terminal = v end)
local report_metapost = logs.reporter("metapost")
-local report_terminal = logs.reporter("metapost","terminal")
local texerrormessage = logs.texerrormessage
local starttiming = statistics.starttiming
@@ -60,9 +57,9 @@ metapost.exectime = metapost.exectime or { } -- hack
metapost.nofruns = 0
local mpxformats = { }
-local mpxterminals = { }
local nofformats = 0
local mpxpreambles = { }
+local mpxterminals = { }
local mpxextradata = { }
-- The flatten hack is needed because the library currently barks on \n\n and the
@@ -112,225 +109,6 @@ function metapost.resetlastlog()
metapost.lastlog = ""
end
------ mpbasepath = lpeg.instringchecker(lpeg.append { "/metapost/context/", "/metapost/base/" })
-local mpbasepath = lpeg.instringchecker(P("/metapost/") * (P("context") + P("base")) * P("/"))
-
--- mplib has no real io interface so we have a different mechanism than
--- tex (as soon as we have more control, we will use the normal code)
---
--- for some reason mp sometimes calls this function twice which is inefficient
--- but we cannot catch this
-
-local realtimelogging do
-
- local finders = { }
- mplib.finders = finders -- also used in meta-lua.lua
-
- local new_instance = mplib.new
-
- local function validftype(ftype)
- if ftype == "mp" then
- return "mp"
- else
- return nil
- end
- end
-
- finders.file = function(specification,name,mode,ftype)
- return resolvers.findfile(name,validftype(ftype))
- end
-
- -- this will be redone in lmtx
-
- local function i_finder(name,mode,ftype) -- fake message for mpost.map and metafun.mpvi
- local specification = url.hashed(name)
- local finder = finders[specification.scheme] or finders.file
- local found = finder(specification,name,mode,validftype(ftype))
- return found
- end
-
- local function o_finder(name,mode,ftype)
- return name
- end
-
- o_finder = sandbox.register(o_finder,sandbox.filehandlerone,"mplib output finder")
-
- local function finder(name,mode,ftype)
- return (mode == "w" and o_finder or i_finder)(name,mode,validftype(ftype))
- end
-
- local report_logger = logs.reporter("metapost log")
- local report_error = logs.reporter("metapost error")
-
- local l, nl, dl = { }, 0, false
- local t, nt, dt = { }, 0, false
- local e, ne, de = { }, 0, false
-
- local function logger(target,str)
- if target == 1 then
- -- log
- elseif target == 2 or target == 3 then
- -- term
- if str == "\n" then
- realtimelogging = true
- if nl > 0 then
- report_logger(concat(l,"",1,nl))
- nl, dl = 0, false
- elseif not dl then
- report_logger("")
- dl = true
- end
- else
- nl = nl + 1
- l[nl] = str
- end
- elseif target == 4 then
- report_error(str)
- end
- end
-
- -- experiment, todo: per instance, just a push / pop ?
-
- local findtexfile = resolvers.findtexfile
- local opentexfile = resolvers.opentexfile
- local splitlines = string.splitlines
-
- local function writetoterminal(terminaldata,maxterm,d)
- local t = type(d)
- local n = 0
- if t == "string" then
- d = splitlines(d)
- n = #d
- for i=1,#d do
- maxterm = maxterm + 1
- terminaldata[maxterm] = d[i]
- end
- elseif t == "table" then
- for i=1,#d do
- local l = d[i]
- if find(l,"[\n\r]") then
- local s = splitlines(l)
- local m = #s
- for i=1,m do
- maxterm = maxterm + 1
- terminaldata[maxterm] = s[i]
- end
- n = n + m
- else
- maxterm = maxterm + 1
- terminaldata[maxterm] = d[i]
- n = 1
- end
- end
- end
- if trace_terminal then
- report_metapost("writing %i lines, in cache %s",n,maxterm)
- end
- return maxterm
- end
-
- local function readfromterminal(terminaldata,maxterm,nowterm)
- if nowterm >= maxterm then
- terminaldata[nowterm] = false
- maxterm = 0
- nowterm = 0
- if trace_terminal then
- report_metapost("resetting, maxcache %i",#terminaldata)
- end
- return maxterm, nowterm, nil
- else
- if nowterm > 0 then
- terminaldata[nowterm] = false
- end
- nowterm = nowterm + 1
- local s = terminaldata[nowterm]
- if trace_terminal then
- report_metapost("reading line %i: %s",nowterm,s)
- end
- return maxterm, nowterm, s
- end
- end
-
- local function fileopener()
-
- -- these can go into the table itself
-
- local terminaldata = { }
- local maxterm = 0
- local nowterm = 0
-
- local terminal = {
- name = "terminal",
- close = function()
- -- terminal = { }
- -- maxterm = 0
- -- nowterm = 0
- end,
- reader = function()
- local line
- maxterm, nowterm, line = readfromterminal(terminaldata,maxterm,nowterm)
- return line
- end,
- writer = function(d)
- maxterm = writetoterminal(terminaldata,maxterm,d)
- end,
- }
-
- return function(name,mode,kind)
- if name == "terminal" then
- -- report_metapost("opening terminal")
- return terminal
- elseif mode == "w" then
- local f = io.open(name,"wb")
- if f then
- -- report_metapost("opening file %a for writing",full)
- return {
- name = full,
- writer = function(s) return f:write(s) end, -- io.write(f,s)
- close = function() f:close() end,
- }
- end
- else
- local full = findtexfile(name,validftype(ftype))
- if full then
- -- report_metapost("opening file %a for reading",full)
- return opentexfile(full)
- end
- end
- end
-
- end
-
- -- end of experiment
-
- if CONTEXTLMTXMODE > 0 then
-
- function mplib.new(specification)
- local openfile = fileopener()
- specification.find_file = finder
- specification.run_logger = logger
- specification.open_file = openfile
- specification.interaction = "silent"
- specification.halt_on_error = true
- local instance = new_instance(specification)
- mpxterminals[instance] = openfile("terminal")
- return instance
- end
-
- else
-
- function mplib.new(specification)
- specification.find_file = finder
- specification.run_logger = logger
- return new_instance(specification)
- end
-
- end
-
- mplib.finder = finder
-
-end
-
local new_instance = mplib.new
local find_file = mplib.finder
@@ -340,7 +118,7 @@ function metapost.reporterror(result)
return true
elseif result.status == 0 then
return false
- elseif realtimelogging then
+ elseif mplib.realtimelogging then
return false -- we already reported
else
local t = result.term
@@ -405,7 +183,7 @@ function metapost.load(name,method)
end
end
method = method and methods[method] or "scaled"
- local mpx = new_instance {
+ local mpx, terminal = new_instance {
ini_version = true,
math_mode = method,
run_script = metapost.runscript,
@@ -414,12 +192,14 @@ function metapost.load(name,method)
extensions = 1,
-- random_seed = seed,
utf8_mode = true,
+ text_mode = true,
}
report_metapost("initializing number mode %a",method)
local result
if not mpx then
result = { status = 99, error = "out of memory"}
else
+ mpxterminals[mpx] = terminal
-- pushing permits advanced features
metapost.pushscriptrunner(mpx)
result = executempx(mpx,f_preamble(file.addsuffix(name,"mp"),seed))
@@ -557,17 +337,17 @@ function metapost.reset(mpx)
if mpxformats[mpx] then
local instance = mpxformats[mpx]
instance:finish()
- mpxterminals[instance] = nil
- mpxextradata[mpx] = nil
- mpxformats [mpx] = nil
+ mpxterminals[mpx] = nil
+ mpxextradata[mpx] = nil
+ mpxformats [mpx] = nil
end
else
for name, instance in next, mpxformats do
if instance == mpx then
mpx:finish()
+ mpxterminals[mpx] = nil
mpxextradata[mpx] = nil
mpxformats [mpx] = nil
- mpxterminals[mpx] = nil
break
end
end
@@ -881,20 +661,21 @@ do
end
+local getstatistics = mplib.getstatistics or mplib.statistics
+
function metapost.getstatistics(memonly)
if memonly then
local n, m = 0, 0
for name, mpx in next, mpxformats do
n = n + 1
- m = m + mpx:statistics().memory
+ m = m + getstatistics(mpx).memory
end
return n, m
else
local t = { }
for name, mpx in next, mpxformats do
- t[name] = mpx:statistics()
+ t[name] = getstatistics(mpx)
end
return t
end
end
-
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex
index e970ac450cd..ab638dde6f7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-arrange.tex
@@ -35,7 +35,7 @@
\doifdocumentargument {paperoffset} {
\definepapersize
- [offset=\getdocumentargument{paperoffset}]
+ [offset=\getdocumentargumentdefault{paperoffset}{0pt}]
}
\doifdocumentargumentelse {noduplex} {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex
index ffa744013f5..c940270c8ab 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-compare.tex
@@ -24,17 +24,17 @@
\starttext
\starttexdefinition unexpanded ShowBoth #1#2#3
- \startTEXpage
+ \startTEXpage[width=21cm]
\startoverlay
- {\externalfigure[#1][page=#3]}
- {\externalfigure[#2][page=#3]}
+ {\externalfigure[#1][page=#3,width=21cm]}
+ {\externalfigure[#2][page=#3,width=21cm]}
\stopoverlay
\stopTEXpage
\stoptexdefinition
\starttexdefinition unexpanded ShowPage #1#2
- \startTEXpage
- \externalfigure[#1][page=#2]
+ \startTEXpage[width=21cm]
+ \externalfigure[#1][page=#2,width=21cm]
\stopTEXpage
\stoptexdefinition
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-meaning.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-meaning.tex
index 88b81ef041e..2ec66780eb5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-meaning.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-meaning.tex
@@ -31,19 +31,31 @@
\setupbodyfont
[dejavu]
-\def\showmeaning#1%
+\unexpanded\def\ShowMeaning#1%
{\ctxlua{logs.pushtarget("both")}%
\writestatus{meaning}{\strippedcsname#1}%
\writestring{}%
\writestring{\expandafter\meaning\begincsname#1\endcsname}%
\ctxlua{logs.poptarget()}}
+\unexpanded\def\ShowTokens#1%
+ {\ctxlua{logs.pushtarget("both")}%
+ \writestatus{tokens}{\strippedcsname#1}%
+ \writestring{}%
+ \ifcase\contextlmtxmode
+ \writestring{only supported in lmtx}%
+ \else
+ \expandafter\showluatokens\begincsname#1\endcsname
+ \fi
+ \ctxlua{logs.poptarget()}}
+
\starttext
\usemodule[setups-macros]
\startluacode
local h = tex.hashtokens()
+ local t = environment.arguments.tokens
local function showmeaning(str)
local h = interfaces.macros.collect(str)
@@ -54,7 +66,11 @@
local hi = h[i]
context.type(hi)
context.par()
- context.showmeaning(hi)
+ if t then
+ context.ShowTokens(hi)
+ else
+ context.ShowMeaning(hi)
+ end
end
context.page()
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex
index 2f63f595513..61f58d61f0a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-select.tex
@@ -1,5 +1,3 @@
-% engine=luatex
-
%D \module
%D [ file=mtx-context-select,
%D version=2008.11.10, % about that time i started playing with this
@@ -31,11 +29,11 @@
\input mtx-context-common.tex
\setuppapersize
- [\getdocumentargumentdefault{paperformat_from}{A4}]
- [\getdocumentargumentdefault{paperformat_to}{A4}]
+ [\getdocumentargumentdefault{paperformat_paper}{A4}]
+ [\getdocumentargumentdefault{paperformat_print}{A4}]
\setuppaper
- [offset=\getdocumentargumentdefault{paperformat_to}{0pt}]
+ [offset=\getdocumentargumentdefault{paperoffset}{0pt}]
\setuplayout
[width=middle,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex
index c545c768f97..db0d4c28322 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex
+++ b/Master/texmf-dist/tex/context/base/mkiv/mtx-context-timing.tex
@@ -19,14 +19,27 @@
\enablemode[no-timing] \usemodule[timing]
+\usemodule[article-basic]
+
\setuplayout
- [topspace=1cm,
- bottomspace=.5cm,
- header=0pt,
- width=middle,
- height=middle,
+ [tight]
+ [footer=15pt,
style=\tt]
+\setuplayout
+ [tight]
+
+\setupbodyfont
+ [10pt]
+
+% \setuplayout
+% [topspace=1cm,
+% bottomspace=.5cm,
+% header=0pt,
+% width=middle,
+% height=middle,
+% style=\tt]
+
\setupfootertexts
[\getdocumentfilename{1}-luatex-progress.lut \emdash\ \pagenumber]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv
index 99d252c6b67..d7921bcc290 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkiv
@@ -186,28 +186,28 @@
%D and that only the high level setup commands are used with language specific
%D interfaces.
-% \unexpanded\def\mult_interfaces_let #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_lete#1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
-% \unexpanded\def\mult_interfaces_def #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_edef#1#2{\expandafter\edef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_gdef#1#2{\expandafter\gdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_xdef#1#2{\expandafter\xdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+% \protected\def\mult_interfaces_let #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+% \protected\def\mult_interfaces_lete#1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
+% \protected\def\mult_interfaces_def #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+% \protected\def\mult_interfaces_edef#1#2{\expandafter\edef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+% \protected\def\mult_interfaces_gdef#1#2{\expandafter\gdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+% \protected\def\mult_interfaces_xdef#1#2{\expandafter\xdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
% \startinterface english
- \unexpanded\def\mult_interfaces_let #1#2{\expandafter \let\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_lete#1#2{\expandafter \let\csname#1#2\endcsname\empty}
- \unexpanded\def\mult_interfaces_def #1#2{\expandafter \def\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_edef#1#2{\expandafter\edef\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_gdef#1#2{\expandafter\gdef\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_xdef#1#2{\expandafter\xdef\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_let #1#2{\expandafter \let\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_lete#1#2{\expandafter \let\csname#1#2\endcsname\empty}
+ \protected\def\mult_interfaces_def #1#2{\expandafter \def\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_edef#1#2{\expandafter\edef\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_gdef#1#2{\expandafter\gdef\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_xdef#1#2{\expandafter\xdef\csname#1#2\endcsname}
% \stopinterface
%D Do, we only interface the assignment definition:
-\unexpanded\def\mult_interfaces_adef#1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\protected\def\mult_interfaces_adef#1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
\startinterface english
- \unexpanded\def\mult_interfaces_adef#1#2{\expandafter \def\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_adef#1#2{\expandafter \def\csname#1#2\endcsname}
\stopinterface
% the commented detokenized variant that backtracks ... needs testing usage first
@@ -226,7 +226,7 @@
\def\mult_interfaces_detokenize{\expandafter\expandafter\expandafter\detokenize\expandafter\expandafter\expandafter}
-\unexpanded\def\mult_interfaces_install_parameter_handler#1#2#3#4#5#6#7#8#9% inlining \csname*\endcsname is more efficient (#3 and #6 only)
+\protected\def\mult_interfaces_install_parameter_handler#1#2#3#4#5#6#7#8#9% inlining \csname*\endcsname is more efficient (#3 and #6 only)
{\ifx#2\relax\let#2\empty\fi % it is hardly faster but produces less expansion tracing
\def#3##1{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}%
\def#4##1##2{\ifcsname##1:##2\endcsname##1:##2\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
@@ -238,7 +238,7 @@
\def#8##1{\begincsname#1#2:##1\endcsname}
\def#9##1##2{\expandafter\let\expandafter##1\csname\ifcsname#1#2:##2\endcsname#1#2:##2\else\expandafter#5\csname#1#2:\s!parent\endcsname{##2}\fi\endcsname}}
-\unexpanded\def\installparameterhandler#1#2%
+\protected\def\installparameterhandler#1#2%
{\normalexpanded
{\mult_interfaces_install_parameter_handler
{\noexpand#1}% \??aa
@@ -251,18 +251,18 @@
\expandafter\noexpand\csname direct#2parameter\endcsname
\expandafter\noexpand\csname letfrom#2parameter\endcsname}} % strict#2parameter is gone
-\unexpanded\def\mult_interfaces_install_root_parameter_handler#1#2#3%
+\protected\def\mult_interfaces_install_root_parameter_handler#1#2#3%
{\def#2##1{\detokenize\expandafter\expandafter\expandafter{\csname#1:##1\endcsname}}% always root
\def#3##1{\begincsname#1:##1\endcsname}}
-\unexpanded\def\installrootparameterhandler#1#2%
+\protected\def\installrootparameterhandler#1#2%
{\normalexpanded
{\mult_interfaces_install_root_parameter_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname detokenizedroot#2parameter\endcsname
\expandafter\noexpand\csname root#2parameter\endcsname}}
-\unexpanded\def\mult_interfaces_install_parameter_hash_handler#1#2#3#4#5#6#7#8#9%
+\protected\def\mult_interfaces_install_parameter_hash_handler#1#2#3#4#5#6#7#8#9%
{\ifx#2\relax\let#2\empty\fi
\def#3##1{#1#4{#1#2}{##1}:}% leading #1 was missing .. is this one used?
\def#4##1##2{\ifcsname##1:##2\endcsname##1\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
@@ -271,9 +271,9 @@
\def#6{#1#2:}%
\def#7##1{#1##1:}%
\def#8{\ifx#2\empty\else\ifcsname#1#2:\s!parent\endcsname\else\expandafter\let\csname#1#2:\s!parent\endcsname#1\fi\fi}%
- \unexpanded\def#9##1{\expandafter\edef\csname#1##1:\s!parent\endcsname{#1#2}}}
+ \protected\def#9##1{\expandafter\edef\csname#1##1:\s!parent\endcsname{#1#2}}}
-\unexpanded\def\installparameterhashhandler#1#2%
+\protected\def\installparameterhashhandler#1#2%
{\expandafter\let\csname#2namespace\endcsname#1%
\normalexpanded
{\mult_interfaces_install_parameter_hash_handler
@@ -291,23 +291,23 @@
% todo: inline the def/let
-% \unexpanded\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
+% \protected\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
% {\ifx#2\relax\let#2\empty\fi
-% \unexpanded\def#3{\mult_interfaces_def {#1#2:}}% ##1 {##2} (braces are mandate)
-% \unexpanded\def#4{\mult_interfaces_edef{#1#2:}}% ##1 {##2} (braces are mandate)
-% \unexpanded\def#5{\mult_interfaces_let {#1#2:}}% ##1 ##2
-% \unexpanded\def#6{\mult_interfaces_lete{#1#2:}}}% ##1
+% \protected\def#3{\mult_interfaces_def {#1#2:}}% ##1 {##2} (braces are mandate)
+% \protected\def#4{\mult_interfaces_edef{#1#2:}}% ##1 {##2} (braces are mandate)
+% \protected\def#5{\mult_interfaces_let {#1#2:}}% ##1 ##2
+% \protected\def#6{\mult_interfaces_lete{#1#2:}}}% ##1
%
% \startinterface english
- \unexpanded\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
+ \protected\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
{\ifx#2\relax\let#2\empty\fi
- \unexpanded\def#3##1{\expandafter \def\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
- \unexpanded\def#4##1{\expandafter\edef\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
- \unexpanded\def#5##1{\expandafter \let\csname#1#2:##1\endcsname}% ##1 ##2
- \unexpanded\def#6##1{\expandafter \let\csname#1#2:##1\endcsname\empty}}% ##1
+ \protected\def#3##1{\expandafter \def\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
+ \protected\def#4##1{\expandafter\edef\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
+ \protected\def#5##1{\expandafter \let\csname#1#2:##1\endcsname}% ##1 ##2
+ \protected\def#6##1{\expandafter \let\csname#1#2:##1\endcsname\empty}}% ##1
% \stopinterface
-\unexpanded\def\installparametersethandler#1#2%
+\protected\def\installparametersethandler#1#2%
{\normalexpanded
{\mult_interfaces_install_parameter_set_handler
{\noexpand#1}% \??aa
@@ -323,20 +323,20 @@
\let\currentstyleparameter\empty
\let\currentcolorparameter\empty
-\unexpanded\def\mult_interfaces_install_style_and_color_handler#1#2#3#4%
- {\unexpanded\def#2##1##2% style color
+\protected\def\mult_interfaces_install_style_and_color_handler#1#2#3#4%
+ {\protected\def#2##1##2% style color
{\edef\currentstyleparameter{#1{##1}}% this name is public (can also set color e.g. in underline)
\ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi
\edef\currentcolorparameter{#1{##2}}% this name is public (so we do this after the style switch)
\ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}%
- \unexpanded\def#3##1% style
+ \protected\def#3##1% style
{\edef\currentstyleparameter{#1{##1}}% this name is public
\ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi}%
- \unexpanded\def#4##1% color
+ \protected\def#4##1% color
{\edef\currentcolorparameter{#1{##1}}% this name is public
\ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}}
-\unexpanded\def\installstyleandcolorhandler#1#2%
+\protected\def\installstyleandcolorhandler#1#2%
{\normalexpanded
{\mult_interfaces_install_style_and_color_handler
\expandafter\noexpand\csname #2parameter\endcsname
@@ -360,12 +360,12 @@
\def\getparentchain #1#2{\begincsname#1#2:\s!chain\endcsname}
\def\getcurrentparentchain#1#2{\begincsname#1#2:\s!chain\endcsname}
-% \unexpanded\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% why is \expanded still needed in clones
+% \protected\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% why is \expanded still needed in clones
% {\ifx#4\relax\let#4\empty\fi % see \defineregister
-% \unexpanded\def#2{\dotripleempty#5}%
+% \protected\def#2{\dotripleempty#5}%
% \newtoks#6%
% \newtoks#7%
-% \unexpanded\def#5[##1][##2][##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child]
+% \protected\def#5[##1][##2][##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child]
% {\let#9#4%
% \edef#4{##1}%
% \ifthirdargument
@@ -398,12 +398,12 @@
% \the#7%
% \let#4#9}}
-\unexpanded\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% why is \expanded still needed in clones
+\protected\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% why is \expanded still needed in clones
{\ifx#4\relax\let#4\empty\fi % see \defineregister
- \unexpanded\def#2{\dotripleempty#5}%
+ \protected\def#2{\dotripleempty#5}%
\newtoks#6%
\newtoks#7%
- \unexpanded\def#5[##1][##2][##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child]
+ \protected\def#5[##1][##2][##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child]
{\let#9#4%
\edef#4{##1}%
\ifthirdargument
@@ -435,7 +435,7 @@
\the#7%
\let#4#9}}
-\unexpanded\def\installdefinehandler#1#2#3%
+\protected\def\installdefinehandler#1#2#3%
{\normalexpanded
{\mult_interfaces_install_define_handler
{\noexpand#1}% \??aa
@@ -448,13 +448,13 @@
\expandafter\noexpand\csname current#2parent\endcsname
\expandafter\noexpand\csname saved_defined_#2\endcsname}}
-\unexpanded\def\mult_interfaces_install_setup_handler#1#2#3#4#5#6#7#8#9%
+\protected\def\mult_interfaces_install_setup_handler#1#2#3#4#5#6#7#8#9%
{\ifx#3\relax\let#3\empty\fi
- \unexpanded\def#2{\dodoubleempty#4}%
- \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
+ \protected\def#2{\dodoubleempty#4}%
+ \protected\def#6{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
\newtoks#5%
\newtoks#8%
- \unexpanded\def#4[##1][##2]% maybe helper
+ \protected\def#4[##1][##2]% maybe helper
{\let#7#3%
\ifsecondargument
\def#9####1% we will have a simple one as well
@@ -470,7 +470,7 @@
\let#3#7%
\the#8}}
-\unexpanded\def\installsetuphandler#1#2%
+\protected\def\installsetuphandler#1#2%
{\normalexpanded
{\mult_interfaces_install_setup_handler
{\noexpand#1}% \??aa
@@ -488,18 +488,18 @@
\let\doingrootsetnamed \plusthree % \setuplayout[name]
\let\doingrootsetroot \plusfour % \setuplayout
-\unexpanded\def\mult_interfaces_install_switch_setup_handler_a#1#2#3#4#5%
+\protected\def\mult_interfaces_install_switch_setup_handler_a#1#2#3#4#5%
{\ifx#3\relax\let#3\empty\fi
- \unexpanded\def#2{\dodoubleempty#4}%
- \unexpanded\def#5{\mult_interfaces_get_parameters{#1#3:}}}
+ \protected\def#2{\dodoubleempty#4}%
+ \protected\def#5{\mult_interfaces_get_parameters{#1#3:}}}
-% \unexpanded\def\mult_interfaces_install_switch_setup_handler_b#1#2#3#4#5#6#7#8#9%
+% \protected\def\mult_interfaces_install_switch_setup_handler_b#1#2#3#4#5#6#7#8#9%
% {\newtoks#5%
% \newconstant#2%
% \newtoks#8%
% \newtoks#9%
% \ifx#6\relax\let#6\empty\fi
-% \unexpanded\def#4[##1][##2]% maybe helper
+% \protected\def#4[##1][##2]% maybe helper
% {\ifsecondargument % no commalist here
% % \setuplayout[whatever][key=value]
% \let#7#3%
@@ -542,13 +542,13 @@
% #2\zerocount % mode is always zero at the end
% \the#9}}
-\unexpanded\def\mult_interfaces_install_switch_setup_handler_b#1#2#3#4#5#6#7#8#9%
+\protected\def\mult_interfaces_install_switch_setup_handler_b#1#2#3#4#5#6#7#8#9%
{\newtoks#5%
\newconstant#2%
\newtoks#8%
\newtoks#9%
\ifx#6\relax\let#6\empty\fi
- \unexpanded\def#4[##1][##2]% maybe helper
+ \protected\def#4[##1][##2]% maybe helper
{\ifsecondargument % no commalist here
% \setuplayout[whatever][key=value]
\let#7#3%
@@ -590,7 +590,7 @@
#2\zerocount % mode is always zero at the end
\the#9}}
-\unexpanded\def\installswitchsetuphandler#1#2%
+\protected\def\installswitchsetuphandler#1#2%
{\normalexpanded
{\mult_interfaces_install_switch_setup_handler_a
{\noexpand#1}% \??aa
@@ -609,10 +609,10 @@
\expandafter\noexpand\csname everyswitch#2\endcsname
\expandafter\noexpand\csname everysetup#2root\endcsname}}
-\unexpanded\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8#9%
+\protected\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8#9%
{\ifx#3\relax\let#3\empty\fi
- \unexpanded\def#2{\dotripleempty#4}%
- \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}%
+ \protected\def#2{\dotripleempty#4}%
+ \protected\def#6{\mult_interfaces_get_parameters{#1#3:}}%
\newtoks#5%
\def#4[##1][##2][##3]%
{\let#8#3%
@@ -637,7 +637,7 @@
\fi\fi
\let#3#8}}
-\unexpanded\def\installautosetuphandler#1#2%
+\protected\def\installautosetuphandler#1#2%
{\normalexpanded
{\mult_interfaces_install_auto_setup_handler
{\noexpand#1}% \??aa
@@ -650,40 +650,40 @@
\expandafter\noexpand\csname saved_setup_current#2\endcsname
\expandafter\noexpand\csname nested_setup_current#2\endcsname}}
-\unexpanded\def\installbasicparameterhandler#1#2%
+\protected\def\installbasicparameterhandler#1#2%
{\installparameterhandler {#1}{#2}%
\installparameterhashhandler{#1}{#2}%
\installparametersethandler {#1}{#2}%
\installrootparameterhandler{#1}{#2}}
-\unexpanded\def\installbasicautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
+\protected\def\installbasicautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installautosetuphandler {#1}{#2}}
-\unexpanded\def\installstylisticautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
+\protected\def\installstylisticautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installautosetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installcommandhandler#1#2#3% \??self name \??parent (can be \??self)
+\protected\def\installcommandhandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installdefinehandler {#1}{#2}{#3}%
\installsetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installswitchcommandhandler#1#2#3% \??self name \??parent (can be \??self)
+\protected\def\installswitchcommandhandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installdefinehandler {#1}{#2}{#3}%
\installswitchsetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installautocommandhandler#1#2#3% automatically defined cloned setups
+\protected\def\installautocommandhandler#1#2#3% automatically defines cloned setups
{\installbasicparameterhandler{#1}{#2}%
\installdefinehandler {#1}{#2}{#3}%
\installautosetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installsimplecommandhandler#1#2#3% no define (experiment) - use \check*parent when defining
+\protected\def\installsimplecommandhandler#1#2#3% no define (experiment) - use \check*parent when defining
{\installbasicparameterhandler{#1}{#2}%
\installsetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
@@ -699,14 +699,14 @@
%D We don't need colons for such simple cases.
-\unexpanded\def\mult_interfaces_install_direct_parameter_handler#1#2#3#4#5%
+\protected\def\mult_interfaces_install_direct_parameter_handler#1#2#3#4#5%
%%{\def#3##1{\csname\ifcsname#1##1\endcsname#1##1\else\s!empty\fi\endcsname}%
{\def#3##1{\begincsname#1##1\endcsname}%
\def#4##1{\detokenize\expandafter\expandafter\expandafter{\csname#1##1\endcsname}}%
% \def#4##1{\mult_interfaces_detokenize{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}}%
\def#5##1{\begincsname#1##1\endcsname}}
-\unexpanded\def\installdirectparameterhandler#1#2%
+\protected\def\installdirectparameterhandler#1#2%
{\normalexpanded
{\mult_interfaces_install_direct_parameter_handler
{\noexpand#1}%
@@ -715,13 +715,13 @@
\expandafter\noexpand\csname detokenized#2parameter\endcsname
\expandafter\noexpand\csname direct#2parameter\endcsname}}
-\unexpanded\def\mult_interfaces_install_direct_setup_handler#1#2#3#4#5%
- {\unexpanded\def#2{\dosingleempty#3}%
+\protected\def\mult_interfaces_install_direct_setup_handler#1#2#3#4#5%
+ {\protected\def#2{\dosingleempty#3}%
\newtoks#5%
\def#3[##1]{\mult_interfaces_get_parameters#1[##1]\the#5}%
\def#4{\mult_interfaces_get_parameters#1}}
-\unexpanded\def\installdirectsetuphandler#1#2%
+\protected\def\installdirectsetuphandler#1#2%
{\normalexpanded
{\mult_interfaces_install_direct_setup_handler
{\noexpand#1}% \??aa
@@ -730,21 +730,21 @@
\expandafter\noexpand\csname setupcurrent#2\endcsname % no \every (we use 'current' for consistency)
\expandafter\noexpand\csname everysetup#2\endcsname}}
-% \unexpanded\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
-% {\unexpanded\def#2{\mult_interfaces_def #1}%
-% \unexpanded\def#3{\mult_interfaces_edef#1}%
-% \unexpanded\def#4{\mult_interfaces_let #1}%
-% \unexpanded\def#5{\mult_interfaces_let #1\empty}}%
+% \protected\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
+% {\protected\def#2{\mult_interfaces_def #1}%
+% \protected\def#3{\mult_interfaces_edef#1}%
+% \protected\def#4{\mult_interfaces_let #1}%
+% \protected\def#5{\mult_interfaces_let #1\empty}}%
% \startinterface english
- \unexpanded\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
- {\unexpanded\def#2##1{\expandafter \def\csname#1##1\endcsname}%
- \unexpanded\def#3##1{\expandafter\edef\csname#1##1\endcsname}%
- \unexpanded\def#4##1{\expandafter \let\csname#1##1\endcsname}%
- \unexpanded\def#5##1{\expandafter \let\csname#1##1\endcsname\empty}}%
+ \protected\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
+ {\protected\def#2##1{\expandafter \def\csname#1##1\endcsname}%
+ \protected\def#3##1{\expandafter\edef\csname#1##1\endcsname}%
+ \protected\def#4##1{\expandafter \let\csname#1##1\endcsname}%
+ \protected\def#5##1{\expandafter \let\csname#1##1\endcsname\empty}}%
% \stopinterface
-\unexpanded\def\installdirectparametersethandler#1#2%
+\protected\def\installdirectparametersethandler#1#2%
{\normalexpanded
{\mult_interfaces_install_direct_parameter_set_handler
{\noexpand#1}% \??aa
@@ -755,13 +755,13 @@
\let\installdirectstyleandcolorhandler\installstyleandcolorhandler
-\unexpanded\def\installdirectcommandhandler#1#2%
+\protected\def\installdirectcommandhandler#1#2%
{\installdirectparameterhandler {#1}{#2}%
\installdirectsetuphandler {#1}{#2}%
\installdirectparametersethandler {#1}{#2}%
\installdirectstyleandcolorhandler{#1}{#2}}
-\unexpanded\def\installsetuponlycommandhandler#1#2%
+\protected\def\installsetuponlycommandhandler#1#2%
{\installdirectparameterhandler{#1}{#2}%
\installdirectsetuphandler {#1}{#2}%
}% maybe \installdirectparametersethandler {#1}{#2}%
@@ -789,15 +789,15 @@
% yes:\twoparameter{alpha}\par
% yes:\twoparameter{beta}\par
-\unexpanded\def\relateparameterhandlers#1#2#3#4% {from} {instance} {to} {instance}
+\protected\def\relateparameterhandlers#1#2#3#4% {from} {instance} {to} {instance}
{\expandafter\edef\csname\csname#1namespace\endcsname#2:\s!parent\endcsname{\csname#3namespace\endcsname#4}}
-\unexpanded\def\relateparameterhandlersbyns#1#2#3#4% {from} {instance} {to} {instance}
+\protected\def\relateparameterhandlersbyns#1#2#3#4% {from} {instance} {to} {instance}
{\expandafter\edef\csname#1#2:\s!parent\endcsname{#3#4}}
%D Here is another experiment:
-\unexpanded\def\installactionhandler#1%
+\protected\def\installactionhandler#1%
{\normalexpanded
{\mult_interfaces_install_action_handler
{#1}%
@@ -805,9 +805,9 @@
\expandafter\noexpand\csname setupcurrent#1\endcsname
\expandafter\noexpand\csname #1_action\endcsname}}
-% \unexpanded\def\mult_interfaces_install_action_handler#1#2#3#4%
-% {\unexpanded\expandafter\def\csname#1\endcsname{\dodoubleempty#4}%
-% \unexpanded\def#4[##1][##2]%
+% \protected\def\mult_interfaces_install_action_handler#1#2#3#4%
+% {\protected\expandafter\def\csname#1\endcsname{\dodoubleempty#4}%
+% \protected\def#4[##1][##2]%
% {\begingroup
% \ifsecondargument
% \edef#2{##1}%
@@ -823,9 +823,9 @@
% \directsetup{handler:action:#1}%
% \endgroup}}
-\unexpanded\def\mult_interfaces_install_action_handler#1#2#3#4%
- {\unexpanded\expandafter\def\csname#1\endcsname{\dodoubleempty#4}%
- \unexpanded\def#4[##1][##2]%
+\protected\def\mult_interfaces_install_action_handler#1#2#3#4%
+ {\protected\expandafter\def\csname#1\endcsname{\dodoubleempty#4}%
+ \protected\def#4[##1][##2]%
{\begingroup
\ifsecondargument
\edef#2{##1}%
@@ -846,7 +846,7 @@
% First we had, in tune with the regular system variables:
%
% \starttyping
-% \unexpanded\def\installnamespace#1{\setvalue{????#1}{@@@@#1}}
+% \protected\def\installnamespace#1{\setvalue{????#1}{@@@@#1}}
% \stoptyping
%
% The following variant is nicer and in principle faster but that gets unnoticed
@@ -880,7 +880,7 @@
\def\v_interfaces_prefix_template
{\number\c_mult_interfaces_n_of_namespaces>}
-\unexpanded\def\installnamespace#1% for modules and users
+\protected\def\installnamespace#1% for modules and users
{\ifcsname ????#1\endcsname
\writestatus\m!system{duplicate user namespace '#1'}\wait
\else
@@ -888,7 +888,7 @@
\expandafter\edef\csname ????#1\endcsname{\v_interfaces_prefix_template}%
\fi}
-\unexpanded\def\installcorenamespace#1%
+\protected\def\installcorenamespace#1%
{\ifcsname ??#1\endcsname
\writestatus\m!system{duplicate core namespace '#1'}\wait
\else
@@ -913,16 +913,16 @@
\letvalue\??dummy\empty
- \def\dummyparameter #1{\begincsname\??dummy#1\endcsname}
- \def\directdummyparameter #1{\begincsname\??dummy#1\endcsname}
-\unexpanded\def\setdummyparameter #1{\expandafter\def\csname\??dummy#1\endcsname}
-\unexpanded\def\setexpandeddummyparameter#1{\expandafter\edef\csname\??dummy#1\endcsname}
-\unexpanded\def\letdummyparameter #1{\expandafter\let\csname\??dummy#1\endcsname}
+ \def\dummyparameter #1{\begincsname\??dummy#1\endcsname}
+ \def\directdummyparameter #1{\begincsname\??dummy#1\endcsname}
+\protected\def\setdummyparameter #1{\expandafter\def\csname\??dummy#1\endcsname}
+\protected\def\setexpandeddummyparameter#1{\expandafter\edef\csname\??dummy#1\endcsname}
+\protected\def\letdummyparameter #1{\expandafter\let\csname\??dummy#1\endcsname}
-% \unexpanded\def\getdummyparameters
+% \protected\def\getdummyparameters
% {\mult_interfaces_get_parameters\??dummy}
-\unexpanded\def\getdummyparameters[#1%
+\protected\def\getdummyparameters[#1%
{\if\noexpand#1]%
\expandafter\gobbleoneargument
\else
@@ -977,7 +977,7 @@
%
% This is a user (module) command:
-\unexpanded\def\definenamespace
+\protected\def\definenamespace
{\dodoubleargument\mult_interfaces_define_name_space}
\def\mult_interfaces_define_name_space[#1][#2]% namespace settings
@@ -992,7 +992,7 @@
%D \showparentchain{@@am}{left}
%D \stoptyping
-\unexpanded\def\showparentchain#1#2%
+\protected\def\showparentchain#1#2%
{\writestatus\m!system{chain: [ \mult_interfaces_show_parent_chain{#1#2}]}}
% \def\mult_interfaces_show_parent_chain#1%
@@ -1010,7 +1010,7 @@
%D Another helper (needs to be applied):
-\unexpanded\def\doifelsecommandhandler#1#2% namespace name
+\protected\def\doifelsecommandhandler#1#2% namespace name
{\ifcsname#1#2:\s!parent\endcsname
\expandafter\firstoftwoarguments
\else
@@ -1019,14 +1019,14 @@
\let\doifcommandhandlerelse\doifelsecommandhandler
-\unexpanded\def\doifcommandhandler#1#2% namespace name
+\protected\def\doifcommandhandler#1#2% namespace name
{\ifcsname#1#2:\s!parent\endcsname
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotcommandhandler#1#2% namespace name
+\protected\def\doifnotcommandhandler#1#2% namespace name
{\ifcsname#1#2:\s!parent\endcsname
\expandafter\gobbleoneargument
\else
@@ -1077,7 +1077,7 @@
\def\s!double{double}
\def\s!triple{triple}
-% \unexpanded\def\syst_helpers_double_empty#1#2#3%
+% \protected\def\syst_helpers_double_empty#1#2#3%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_double_empty_one_yes_mult#2#3}%
@@ -1105,17 +1105,17 @@
% \def\syst_helpers_double_empty_one_spaced_mult#1#2{#1[{#2}] }
% \def\syst_helpers_double_empty_one_normal_mult#1#2{#1[{#2}]}
%
-% \unexpanded\def\mult_interfaces_install_setup_handler#1#2#3#4#5#6#7#8%
+% \protected\def\mult_interfaces_install_setup_handler#1#2#3#4#5#6#7#8%
% {\ifx#3\relax\let#3\empty\fi
-% \unexpanded\def#5{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
+% \protected\def#5{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
% \newtoks#4%
% \newtoks#7%
% \edef\m_mult_interface_setup{\csstring#2_}%
-% \unexpanded\edef#2{\syst_helpers_double_empty
+% \protected\edef#2{\syst_helpers_double_empty
% \csname\m_mult_interface_setup\s!simple\endcsname
% \csname\m_mult_interface_setup\s!single\endcsname
% \csname\m_mult_interface_setup\s!double\endcsname}%
-% \unexpanded\expandafter\def\csname\m_mult_interface_setup\s!double\endcsname[##1][##2]%
+% \protected\expandafter\def\csname\m_mult_interface_setup\s!double\endcsname[##1][##2]%
% {\let#6#3%
% \def#8####1% we will have a simple one as well
% {\edef#3{####1}%
@@ -1124,21 +1124,21 @@
% \processcommalist[##1]#8%
% \let#3#6%
% \the#7}%
-% \unexpanded\expandafter\def\csname\m_mult_interface_setup\s!single\endcsname[##1]%
+% \protected\expandafter\def\csname\m_mult_interface_setup\s!single\endcsname[##1]%
% {\let#6#3%
% \let#3\empty
% \mult_interfaces_get_parameters{#1:}[##1]%
% \the#4%
% \let#3#6%
% \the#7}%
-% \unexpanded\expandafter\def\csname\m_mult_interface_setup\s!simple\endcsname%
+% \protected\expandafter\def\csname\m_mult_interface_setup\s!simple\endcsname%
% {\let#6#3%
% \let#3\empty
% \the#4%
% \let#3#6%
% \the#7}}
-% \unexpanded\def\installsetuphandler#1#2%
+% \protected\def\installsetuphandler#1#2%
% {\normalexpanded
% {\mult_interfaces_install_setup_handler
% {\noexpand#1}% \??aa
@@ -1150,7 +1150,7 @@
% \expandafter\noexpand\csname everysetup#2root\endcsname
% \expandafter\noexpand\csname nested_setup_current#2\endcsname}}
%
-% \unexpanded\def\syst_helpers_triple_empty#1#2#3#4%
+% \protected\def\syst_helpers_triple_empty#1#2#3#4%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_triple_empty_one_yes_mult#2#3#4}%
@@ -1196,17 +1196,17 @@
% \def\syst_helpers_triple_empty_three_spaced_mult#1#2#3{#1[{#2}][{#3}] }
% \def\syst_helpers_triple_empty_three_normal_mult#1#2#3{#1[{#2}][{#3}]}
%
-% \unexpanded\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8%
+% \protected\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8%
% {\ifx#3\relax\let#3\empty\fi
-% \unexpanded\def#5{\mult_interfaces_get_parameters{#1#3:}}%
+% \protected\def#5{\mult_interfaces_get_parameters{#1#3:}}%
% \newtoks#4%
% \edef\m_mult_interface_setup{\csstring#2_}%
-% \unexpanded\edef#2{\syst_helpers_triple_empty
+% \protected\edef#2{\syst_helpers_triple_empty
% \csname\m_mult_interface_setup\s!simple\endcsname
% \csname\m_mult_interface_setup\s!single\endcsname
% \csname\m_mult_interface_setup\s!double\endcsname
% \csname\m_mult_interface_setup\s!triple\endcsname}%
-% \unexpanded\expandafter\def\csname\m_mult_interface_setup\s!triple\endcsname[##1][##2][##3]%
+% \protected\expandafter\def\csname\m_mult_interface_setup\s!triple\endcsname[##1][##2][##3]%
% {\let#7#3%
% \def#8####1%
% {\edef#3{####1}%
@@ -1215,7 +1215,7 @@
% \the#4}%
% \processcommalist[##1]#8%
% \let#3#7}%
-% \unexpanded\expandafter\def\csname\m_mult_interface_setup\s!double\endcsname[##1][##2]%
+% \protected\expandafter\def\csname\m_mult_interface_setup\s!double\endcsname[##1][##2]%
% {\let#7#3%
% \def#8####1%
% {\edef#3{####1}%
@@ -1224,19 +1224,19 @@
% \the#4}%
% \processcommalist[##1]#8%
% \let#3#7}%
-% \unexpanded\expandafter\def\csname\m_mult_interface_setup\s!single\endcsname[##1]%
+% \protected\expandafter\def\csname\m_mult_interface_setup\s!single\endcsname[##1]%
% {\let#7#3%
% \let#3\empty
% \mult_interfaces_get_parameters{#1:}[##1]%
% \the#4%
% \let#3#7}%
-% \unexpanded\expandafter\def\csname\m_mult_interface_setup\s!simple\endcsname%
+% \protected\expandafter\def\csname\m_mult_interface_setup\s!simple\endcsname%
% {\let#7#3%
% \let#3\empty
% \the#4%
% \let#3#7}}
%
-% \unexpanded\def\installautosetuphandler#1#2%
+% \protected\def\installautosetuphandler#1#2%
% {\normalexpanded
% {\mult_interfaces_install_auto_setup_handler
% {\noexpand#1}% \??aa
@@ -1266,30 +1266,30 @@
\let\c_mult_set\relax
-\unexpanded\def\mult_interfaces_install_definition_set#1#2#3#4#5#6#7%
+\protected\def\mult_interfaces_install_definition_set#1#2#3#4#5#6#7%
{\newcount#3%
\let#6\empty
- \unexpanded\def#2%
+ \protected\def#2%
{\expandafter\let\expandafter\c_mult_set\csname #1_t_#6\endcsname
\ifx\c_mult_set\relax
\expandafter\newtoks\c_mult_set
\expandafter\let\csname #1_t_#6\endcsname\c_mult_set
\fi}
- \unexpanded\def#4##1%
+ \protected\def#4##1%
{\pushmacro#6%
\advance#3\plusone
\edef#6{##1}%
\unprotect}%
- \unexpanded\def#5%
+ \protected\def#5%
{\protect
\advance#3\minusone
\popmacro#6}%
- \unexpanded\def#7##1%
+ \protected\def#7##1%
{\edef#6{##1}%
#2%
\the\c_mult_set\relax}}
-\unexpanded\def\installdefinitionset#1#2%
+\protected\def\installdefinitionset#1#2%
{\normalexpanded
{\mult_interfaces_install_definition_set
{\noexpand#1}% \??aa
@@ -1300,13 +1300,13 @@
\expandafter\noexpand\csname current#2\endcsname
\expandafter\noexpand\csname use#2\endcsname}}
-\unexpanded\def\mult_interfaces_install_definition_set_member#1#2#3#4#5#6#7#8#9% no everysetups etc
+\protected\def\mult_interfaces_install_definition_set_member#1#2#3#4#5#6#7#8#9% no everysetups etc
{\let#5#2%
- \unexpanded\def#2%
+ \protected\def#2%
{\ifcase#4\relax\expandafter#5\else\expandafter#6\fi}%
- \unexpanded\def#6%
+ \protected\def#6%
{\dodoubleempty#7}%
- \unexpanded\def#7[##1][##2]%
+ \protected\def#7[##1][##2]%
{\ifsecondargument
%#3\c_mult_set\expandafter{\the\c_mult_set#9[##1][##2]}%
#3\toksapp\c_mult_set{#9[##1][##2]}%
@@ -1315,7 +1315,7 @@
#3\toksapp\c_mult_set{#8[##1]}%
\fi\fi}}
-\unexpanded\def\installdefinitionsetmember#1#2#3#4%
+\protected\def\installdefinitionsetmember#1#2#3#4%
{\normalexpanded
{\mult_interfaces_install_definition_set_member
{\noexpand#3}% \??aa
@@ -1330,13 +1330,13 @@
%D Another experiment:
-\unexpanded\def\mult_interfaces_install_parent_injector#1#2#3#4%
- {\unexpanded\def#4##1%
+\protected\def\mult_interfaces_install_parent_injector#1#2#3#4%
+ {\protected\def#4##1%
{\ifx#3\empty
\expandafter\def\csname#1#2:\s!parent\endcsname{#1##1}%
\fi}}
-\unexpanded\def\installparentinjector#1#2%
+\protected\def\installparentinjector#1#2%
{\normalexpanded{\mult_interfaces_install_parent_injector
{\noexpand#1}%
\expandafter\noexpand\csname current#2\endcsname
@@ -1346,7 +1346,7 @@
% Faster but not used that much to make a dent in performance. But, because it's
% cleaner anyway and also gives less tracing, we apply it a few times.
-\unexpanded\def\syst_helpers_install_macro_stack#1#2#3%
+\protected\def\syst_helpers_install_macro_stack#1#2#3%
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
\ifcsname#3\m_syst_helpers_push_macro\endcsname\else
\expandafter\newcount\csname#3\m_syst_helpers_push_macro\endcsname
@@ -1362,23 +1362,23 @@
\noexpand\csname\m_syst_helpers_push_macro\noexpand\the\csname#3\m_syst_helpers_push_macro\endcsname\endcsname}%
\fi}
-\unexpanded\def\installmacrostack #1{\syst_helpers_install_macro_stack#1\let \??localpushedmacro }
-\unexpanded\def\installglobalmacrostack#1{\syst_helpers_install_macro_stack#1\glet\??globalpushedmacro}
+\protected\def\installmacrostack #1{\syst_helpers_install_macro_stack#1\let \??localpushedmacro }
+\protected\def\installglobalmacrostack#1{\syst_helpers_install_macro_stack#1\glet\??globalpushedmacro}
% \unprotect
%
% \installcorenamespace {test} \installcommandhandler \??test {test} \??test
-% \unexpanded\def\TestMeA[#1]%
+% \protected\def\TestMeA[#1]%
% {\edef\currenttest{#1}
% \edef\p_before{\testparameter\c!before}%
% \ifx\p_before\empty \relax \else \relax \fi}
-% \unexpanded\def\TestMeB[#1]%
+% \protected\def\TestMeB[#1]%
% {\edef\currenttest{#1}
% \doifelsenothing{\testparameter\c!before}\relax\relax}
-% \unexpanded\def\TestMeC[#1]%
+% \protected\def\TestMeC[#1]%
% {\edef\currenttest{#1}
% \expandafter\expandafter\expandafter\ifx\testparameter\c!before\empty \relax \else \relax \fi}
-% \unexpanded\def\TestMeD[#1]%
+% \protected\def\TestMeD[#1]%
% {\edef\currenttest{#1}
% \doubleexpandafter\ifx\testparameter\c!before\empty \relax \else \relax \fi}
%
@@ -1396,7 +1396,7 @@
% only gain a few milliseconds:
%
% \starttyping
-% \unexpanded\def\foo#1{[foo:#1]}
+% \protected\def\foo#1{[foo:#1]}
%
% \installcommalistprocessor {foo} \foo
% \installcommalistprocessorcommand \processfoolist \foo
@@ -1413,7 +1413,7 @@
% \processfoolist[{x,y,z}]\par
% \processcommalist[{x,y,z}]\foo\blank
%
-% \unexpanded\def\foo#1{}
+% \protected\def\foo#1{}
%
% \testfeatureonce{400000}{\processfoolist [fixed,middle,bar]} \elapsedtime\quad
%%\testfeatureonce{400000}{\commalistprocessor{foo}[fixed,middle,bar]} \elapsedtime\quad
@@ -1434,46 +1434,46 @@
\installcorenamespace{commalistprocessorpickup}
\installcorenamespace{commalistprocessorfinish}
-\unexpanded\def\installcommalistprocessor#1#2% 8 macro names overhead
+\protected\def\installcommalistprocessor#1#2% 8 macro names overhead
{\let\nexttoken\relax
- \unexpanded\expandafter\edef\csname\??commalistprocessor#1\endcsname[%
+ \protected\expandafter\edef\csname\??commalistprocessor#1\endcsname[%
{\futurelet\nexttoken\csname\??commalistprocessorcheck#1\endcsname}%
- \unexpanded\expandafter\edef\csname\??commalistprocessorcheck#1\endcsname
+ \protected\expandafter\edef\csname\??commalistprocessorcheck#1\endcsname
{\noexpand\ifx\nexttoken]%
\noexpand\expandafter\noexpand\gobblethreearguments
\noexpand\else
\noexpand\expandafter\csname\??commalistprocessorwrap#1\endcsname
\noexpand\fi
\relax}% this one preserved the next {}
- \unexpanded\expandafter\edef\csname\??commalistprocessorwrap#1\endcsname##1]%
+ \protected\expandafter\edef\csname\??commalistprocessorwrap#1\endcsname##1]%
{\csname\??commalistprocessorfirst#1\endcsname##1,]\relax}%
- \unexpanded\expandafter\edef\csname\??commalistprocessorfirst#1\endcsname##1% picks up \relax
+ \protected\expandafter\edef\csname\??commalistprocessorfirst#1\endcsname##1% picks up \relax
{\csname\??commalistprocessornext#1\endcsname}%
- \unexpanded\expandafter\edef\csname\??commalistprocessornext#1\endcsname
+ \protected\expandafter\edef\csname\??commalistprocessornext#1\endcsname
{\noexpand\ifx\nexttoken\noexpand\blankspace
\noexpand\expandafter\csname\??commalistprocessorspace#1\endcsname
\noexpand\else
\noexpand\expandafter\csname\??commalistprocessorfinish#1\endcsname
\noexpand\fi}%
- \unexpanded\expandafter\edef\csname\??commalistprocessorfinish#1\endcsname
+ \protected\expandafter\edef\csname\??commalistprocessorfinish#1\endcsname
{\noexpand\ifx\nexttoken]%
\noexpand\expandafter\noexpand\gobbleoneargument
\noexpand\else
\noexpand\expandafter\csname\??commalistprocessoraction#1\endcsname
\noexpand\fi}%
- \unexpanded\expandafter\edef\csname\??commalistprocessoraction#1\endcsname##1,%
+ \protected\expandafter\edef\csname\??commalistprocessoraction#1\endcsname##1,%
{\noexpand#2{##1}%
\futurelet\nexttoken\csname\??commalistprocessornext#1\endcsname}%
\let\next\:%
- \unexpanded\edef \:{\csname\??commalistprocessorspace#1\endcsname}%
- \unexpanded\expandafter\edef\: {\futurelet\nexttoken\csname\??commalistprocessornext#1\endcsname}%
+ \protected\edef \:{\csname\??commalistprocessorspace#1\endcsname}%
+ \protected\expandafter\edef\: {\futurelet\nexttoken\csname\??commalistprocessornext#1\endcsname}%
\let\:\next}
-\unexpanded\def\installcommalistprocessorcommand#1#2% \processor \action
+\protected\def\installcommalistprocessorcommand#1#2% \processor \action
{\edef\p_name{\csstring#2}%
\installcommalistprocessor\p_name{#2}%
\expandafter\let\expandafter#1\csname\??commalistprocessor\p_name\endcsname}
-\unexpanded\def\commalistprocessor#1{\csname\??commalistprocessor#1\endcsname}
+\protected\def\commalistprocessor#1{\csname\??commalistprocessor#1\endcsname}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv
index 83b82242e67..529ab2308ab 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-chk.mkiv
@@ -35,8 +35,8 @@
\registerctxluafile{mult-chk}{}
-\unexpanded\def\setvalidparameterkeys{\dodoubleargument\mult_checkers_set_valid_parameter_keys}
-\unexpanded\def\addvalidparameterkeys{\dodoubleargument\mult_checkers_add_valid_parameter_keys}
+\protected\def\setvalidparameterkeys{\dodoubleargument\mult_checkers_set_valid_parameter_keys}
+\protected\def\addvalidparameterkeys{\dodoubleargument\mult_checkers_add_valid_parameter_keys}
\def\mult_checkers_set_valid_parameter_keys[#1][#2]{\clf_setvalidinterfacekeys{#1}{#2}}
\def\mult_checkers_add_valid_parameter_keys[#1][#2]{\clf_addvalidinterfacekeys{#1}{#2}}
@@ -64,8 +64,8 @@
{\def\syst_helpers_get_parameters_assign{\syst_helpers_get_parameters_assign_indeed#1}% will change
\syst_helpers_process_comma_item#2,],^^^^0004}
-\unexpanded\def\disablecheckparameters{\let\getcheckedparameters\mult_checkers_get_checked_parameters_nop}
-\unexpanded\def\enablecheckparameters {\let\getcheckedparameters\mult_checkers_get_checked_parameters_yes}
+\protected\def\disablecheckparameters{\let\getcheckedparameters\mult_checkers_get_checked_parameters_nop}
+\protected\def\enablecheckparameters {\let\getcheckedparameters\mult_checkers_get_checked_parameters_yes}
\disablecheckparameters
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua
index 1e22aaa865c..0f2ef419c17 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-def.lua
@@ -11,16 +11,16 @@ if not modules then modules = { } end modules ['mult-def'] = {
return {
["commands"]={
- ["CAPPED"]={
- ["cs"]="KAP",
- ["de"]="KAP",
- ["en"]="CAP",
- ["fr"]="CAP",
- ["it"]="CAP",
- ["nl"]="KAP",
- ["pe"]="CAP",
- ["ro"]="KAP",
- },
+--["CAPPED"]={
+-- ["cs"]="KAP",
+-- ["de"]="KAP",
+-- ["en"]="CAP",
+-- ["fr"]="CAP",
+-- ["it"]="CAP",
+-- ["nl"]="KAP",
+-- ["pe"]="CAP",
+-- ["ro"]="KAP",
+--},
["Character"]={
["cs"]="Znak",
["de"]="Buchstabe",
@@ -75,7 +75,7 @@ return {
["cs"]="Kap",
["de"]="Kap",
["en"]="Cap",
- ["fr"]="Cap",
+ ["fr"]="PetitesCap",
["it"]="Cap",
["nl"]="Kap",
["pe"]="Cap",
@@ -85,7 +85,7 @@ return {
["cs"]="Kaps",
["de"]="Kaps",
["en"]="Caps",
- ["fr"]="Caps",
+ ["fr"]="PetitesCaps",
["it"]="Caps",
["nl"]="Kaps",
["pe"]="Caps",
@@ -145,23 +145,67 @@ return {
["cs"]="oref",
["de"]="ueber",
["en"]="about",
- ["fr"]="concernant",
+ ["fr"]="apropos",
["it"]="intorno",
["nl"]="about",
["pe"]="درمورد",
["ro"]="despre",
},
+ ["adaptfontfeature"]={
+ ["en"]="adaptfontfeature",
+ ["fr"]="adapterfonctionnalitepolice",
+ },
["adaptlayout"]={
["cs"]="prizpusobvzhled",
["de"]="passelayoutan",
["en"]="adaptlayout",
- ["fr"]="adaptedisposition",
+ ["fr"]="adaptermiseenpage",
["it"]="adattalayout",
["nl"]="paslayoutaan",
["pe"]="تنظیم‌طرح‌بندی",
["ro"]="adapteazaaspect",
},
- ["adding"]={},
+ ["addfeature"]={
+ ["en"]="addfeature",
+ ["fr"]="ajouterfonctionnalite",
+ },
+ ["alignbottom"]={
+ ["en"]="alignbottom",
+ ["fr"]="alignerbas",
+ },
+ ["aligned"]={
+ ["en"]="aligned",
+ ["fr"]="aligne",
+ },
+ ["alignedbox"]={
+ ["en"]="alignedbox",
+ ["fr"]="boitealignee",
+ },
+ ["alignedline"]={
+ ["en"]="alignedline",
+ ["fr"]="lignealignee",
+ },
+ ["alignhere"]={
+ ["en"]="alignhere",
+ ["fr"]="alignerici",
+ },
+ ["alignment"]={
+ ["en"]="alignment",
+ ["fr"]="alignement",
+ ["nl"]="uitlijnen",
+ },
+ ["alignmentcharacter"]={
+ ["en"]="alignmentcharacter",
+ ["fr"]="caracterealignement",
+ },
+ ["applytocharacters"]={
+ ["en"]="applytocharacters",
+ ["fr"]="appliquerauxcaracteres",
+ },
+ ["applytofirstcharacter"]={
+ ["en"]="applytofirstcharacter",
+ ["fr"]="appliqueraupremiercaractere",
+ },
["arg"]={
["cs"]="arg",
["de"]="arg",
@@ -176,7 +220,7 @@ return {
["cs"]="pref",
["de"]="bei",
["en"]="at",
- ["fr"]="a",
+ ["fr"]="en",
["it"]="al",
["nl"]="op",
["pe"]="در",
@@ -186,7 +230,7 @@ return {
["cs"]="atleftmargin",
["de"]="atleftmargin",
["en"]="atleftmargin",
- ["fr"]="atleftmargin",
+ ["fr"]="enmargegauche",
["it"]="atleftmargin",
["nl"]="oplinkermarge",
["pe"]="درحاشیه‌چپ",
@@ -196,7 +240,7 @@ return {
["cs"]="nastrane",
["de"]="aufseite",
["en"]="atpage",
- ["fr"]="alapage",
+ ["fr"]="enpage",
["it"]="apagina",
["nl"]="oppagina",
["pe"]="درصÙحه",
@@ -206,7 +250,7 @@ return {
["cs"]="atrightmargin",
["de"]="atrightmargin",
["en"]="atrightmargin",
- ["fr"]="atrightmargin",
+ ["fr"]="enmargedroite",
["it"]="atrightmargin",
["nl"]="oprechtermarge",
["pe"]="درحاشیه‌راست",
@@ -226,7 +270,7 @@ return {
["cs"]="odsazenizleva",
["de"]="rumpfweite",
["en"]="backspace",
- ["fr"]="retourarriere",
+ ["fr"]="retourarrière",
["it"]="spaziodietro",
["nl"]="rugwit",
["pe"]="Ùاصله‌پشت",
@@ -236,7 +280,7 @@ return {
["cs"]="cernalinka",
["de"]="rechteck",
["en"]="blackrule",
- ["fr"]="lignenoire",
+ ["fr"]="traitepais",
["it"]="lineanera",
["nl"]="blokje",
["pe"]="خط‌سیاه",
@@ -246,7 +290,7 @@ return {
["cs"]="cernelinky",
["de"]="rechtecke",
["en"]="blackrules",
- ["fr"]="lignesnoires",
+ ["fr"]="traitsepais",
["it"]="lineenere",
["nl"]="blokjes",
["pe"]="خطهای‌سیاه",
@@ -256,7 +300,7 @@ return {
["cs"]="preskoc",
["de"]="blanko",
["en"]="blank",
- ["fr"]="vide",
+ ["fr"]="vierge",
["it"]="rigovuoto",
["nl"]="blanko",
["pe"]="خالی",
@@ -272,11 +316,15 @@ return {
["pe"]="چوبخط",
["ro"]="semncarte",
},
+ ["bottombox"]={
+ ["en"]="bottombox",
+ ["fr"]="boitebas",
+ },
["bottomdistance"]={
["cs"]="vzdalenostspodku",
["de"]="abstandunten",
["en"]="bottomdistance",
- ["fr"]="distanceinf",
+ ["fr"]="distancebas",
["it"]="distanzafondo",
["nl"]="onderafstand",
["pe"]="Ùاصله‌پایین",
@@ -286,27 +334,39 @@ return {
["cs"]="vyskaspodku",
["de"]="hoeheunten",
["en"]="bottomheight",
- ["fr"]="hauteurinf",
+ ["fr"]="hauteurbas",
["it"]="altezzafondo",
["nl"]="onderhoogte",
["pe"]="ارتÙاع‌پایین",
["ro"]="inaltimejos",
},
+ ["bottomleftbox"]={
+ ["en"]="bottomleftbox",
+ ["fr"]="basgaucheboite",
+ },
+ ["bottomrightbox"]={
+ ["en"]="bottomrightbox",
+ ["fr"]="boitebasdroite",
+ },
["bottomspace"]={
["cs"]="bottomspace",
["de"]="bottomspace",
["en"]="bottomspace",
- ["fr"]="espaceinf",
+ ["fr"]="espacebas",
["it"]="spaziofondo",
["nl"]="bodemwit",
["pe"]="Ùضای‌پایین",
["ro"]="spatiujos",
},
+ ["buildtextbottomdot"]={
+ ["en"]="buildtextbottomdot",
+ ["fr"]="construirepointtextebas",
+ },
["but"]={
["cs"]="spodek",
["de"]="but",
["en"]="but",
- ["fr"]="but",
+ ["fr"]="mais",
["it"]="fondo",
["nl"]="but",
["pe"]="اما",
@@ -326,7 +386,7 @@ return {
["cs"]="bypassblocks",
["de"]="bypassblocks",
["en"]="bypassblocks",
- ["fr"]="sauteblocs",
+ ["fr"]="eviteblocs",
["it"]="saltablocchi",
["nl"]="passeerblokken",
["pe"]="عبوربلوکها",
@@ -366,7 +426,7 @@ return {
["cs"]="orez",
["de"]="ausschnitt",
["en"]="clip",
- ["fr"]="clip",
+ ["fr"]="decouper",
["it"]="clip",
["nl"]="clip",
["pe"]="گیره",
@@ -376,7 +436,7 @@ return {
["cs"]="klonujpole",
["de"]="klonierefeld",
["en"]="clonefield",
- ["fr"]="clonechamp",
+ ["fr"]="clonerchamp",
["it"]="clonacampo",
["nl"]="kloonveld",
["pe"]="میدان‌شبیه‌سازی",
@@ -426,7 +486,7 @@ return {
["cs"]="porovnejskupinubarev",
["de"]="vergleichefarbengruppe",
["en"]="comparecolorgroup",
- ["fr"]="comparegroupecouleur",
+ ["fr"]="comparergroupecouleur",
["it"]="confrontagruppocolori",
["nl"]="vergelijkkleurgroep",
["pe"]="مقایسه‌گروه‌رنگ",
@@ -436,7 +496,7 @@ return {
["cs"]="porovnejpaletu",
["de"]="vergleichepalette",
["en"]="comparepalet",
- ["fr"]="comparepalette",
+ ["fr"]="comparerpalette",
["it"]="confrontatavolozza",
["nl"]="vergelijkpalet",
["pe"]="لوح‌مقایسه",
@@ -446,7 +506,7 @@ return {
["cs"]="completepagenumber",
["de"]="completepagenumber",
["en"]="completepagenumber",
- ["fr"]="completenumeropage",
+ ["fr"]="numeropagecomplet",
["it"]="numeropaginacompleto",
["nl"]="volledigepaginanummer",
["pe"]="شماره‌صÙحه‌کامل",
@@ -456,7 +516,7 @@ return {
["cs"]="completeregister",
["de"]="completeregister",
["en"]="completeregister",
- ["fr"]="completeregistre",
+ ["fr"]="registrecomplet",
["it"]="completeregister",
["nl"]="volledigregister",
["pe"]="ثبت‌کامل",
@@ -476,7 +536,7 @@ return {
["cs"]="konvertujcislo",
["de"]="konvertierezahl",
["en"]="convertnumber",
- ["fr"]="convertitnumero",
+ ["fr"]="convertirnumero",
["it"]="convertinumero",
["nl"]="converteernummer",
["pe"]="شماره‌مبدل",
@@ -486,7 +546,7 @@ return {
["cs"]="kopirujpole",
["de"]="kopierefeld",
["en"]="copyfield",
- ["fr"]="copitchamp",
+ ["fr"]="copierchamp",
["it"]="copiacampo",
["nl"]="copieerveld",
["pe"]="میدان‌کپی",
@@ -496,7 +556,7 @@ return {
["cs"]="korekcebilehomista",
["de"]="korrigierezwischenraum",
["en"]="correctwhitespace",
- ["fr"]="corrigeespaceblanc",
+ ["fr"]="corrigerespaceblanc",
["it"]="correggispaziobianco",
["nl"]="corrigeerwitruimte",
["pe"]="Ùضای‌سÙیدصحیح",
@@ -526,7 +586,7 @@ return {
["cs"]="parovastrana",
["de"]="doppelseite",
["en"]="couplepage",
- ["fr"]="pagedouble",
+ ["fr"]="couplepage",
["it"]="accoppiapagina",
["nl"]="koppelpagina",
["pe"]="صÙحه‌زوج",
@@ -576,7 +636,7 @@ return {
["cs"]="aktualnicislonadpisu",
["de"]="heutigeskopfnummer",
["en"]="currentheadnumber",
- ["fr"]="numerotetecourant",
+ ["fr"]="numerotetecourante",
["it"]="numerotestacorrente",
["nl"]="huidigekopnummer",
["pe"]="شماره‌سرجاری",
@@ -586,7 +646,7 @@ return {
["cs"]="cutspace",
["de"]="cutspace",
["en"]="cutspace",
- ["fr"]="cutspace",
+ ["fr"]="espacecoupe",
["it"]="cutspace",
["nl"]="snijwit",
["pe"]="Ùضای‌برش",
@@ -626,7 +686,7 @@ return {
["cs"]="definuj",
["de"]="definieren",
["en"]="define",
- ["fr"]="definit",
+ ["fr"]="définir",
["it"]="definisci",
["nl"]="definieer",
["pe"]="تعریÙ",
@@ -636,7 +696,7 @@ return {
["cs"]="definujakcent",
["de"]="definiereakzent",
["en"]="defineaccent",
- ["fr"]="definitaccent",
+ ["fr"]="définiraccent",
["it"]="definisciaccento",
["nl"]="definieeraccent",
["pe"]="تعریÙ‌لهجه",
@@ -646,7 +706,7 @@ return {
["cs"]="definujpreskok",
["de"]="definiereblanko",
["en"]="defineblank",
- ["fr"]="definitvide",
+ ["fr"]="définirvierge",
["it"]="definiscirigovuoto",
["nl"]="definieerblanko",
["pe"]="تعریÙ‌خالی",
@@ -656,7 +716,7 @@ return {
["cs"]="definujblok",
["de"]="definiereblock",
["en"]="defineblock",
- ["fr"]="definitbloc",
+ ["fr"]="définirbloc",
["it"]="definisciblocco",
["nl"]="definieerblok",
["pe"]="تعریÙ‌بلوک",
@@ -666,7 +726,7 @@ return {
["cs"]="definujzakladnifont",
["de"]="definierefliesstext",
["en"]="definebodyfont",
- ["fr"]="definitpolicecorps",
+ ["fr"]="définirpolicedecorps",
["it"]="definiscifontdeltesto",
["nl"]="definieerkorps",
["pe"]="تعریÙ‌قلم‌متن",
@@ -676,17 +736,21 @@ return {
["cs"]="definujprostredizakladnihofontu",
["de"]="definierefliesstextumgebung",
["en"]="definebodyfontenvironment",
- ["fr"]="definitenvironnementpolicecorps",
+ ["fr"]="définirenvironnementpolicedecorps",
["it"]="definisciambientefontdeltesto",
["nl"]="definieerkorpsomgeving",
["pe"]="تعریÙ‌محیط‌قلم‌بدنه",
["ro"]="definestemediulfonttext",
},
+ ["definebodyfontswitch"]={
+ ["en"]="definebodyfontswitch",
+ ["fr"]="définircommutateurpolicedecorps",
+ },
["definebuffer"]={
["cs"]="definujbuffer",
["de"]="definierepuffer",
["en"]="definebuffer",
- ["fr"]="definitbuffer",
+ ["fr"]="définirtampon",
["it"]="definiscibuffer",
["nl"]="definieerbuffer",
["pe"]="تعریÙ‌باÙر",
@@ -696,17 +760,25 @@ return {
["cs"]="definujznak",
["de"]="definierezeichen",
["en"]="definecharacter",
- ["fr"]="definicaractere",
+ ["fr"]="définircaractere",
["it"]="definiscicarattere",
["nl"]="definieerkarakter",
["pe"]="تعریÙ‌حرÙ",
["ro"]="definestecaracter",
},
+ ["definecharacterkerning"]={
+ ["en"]="definecharacterkerning",
+ ["fr"]="définirapprochecaracteres",
+ },
+ ["definecharacterspacing"]={
+ ["en"]="definecharacterspacing",
+ ["fr"]="définirespacementcaracteres",
+ },
["definecolor"]={
["cs"]="definujbarvu",
["de"]="definierefarbe",
["en"]="definecolor",
- ["fr"]="definitcouleur",
+ ["fr"]="définircouleur",
["it"]="definiscicolore",
["nl"]="definieerkleur",
["pe"]="تعریÙ‌رنگ",
@@ -716,7 +788,7 @@ return {
["cs"]="definujskupinubarev",
["de"]="definierefarbengruppe",
["en"]="definecolorgroup",
- ["fr"]="definitgroupecouleur",
+ ["fr"]="définirgroupecouleur",
["it"]="definiscigruppocolori",
["nl"]="definieerkleurgroep",
["pe"]="تعریÙ‌گروه‌رنگ",
@@ -726,7 +798,7 @@ return {
["cs"]="definecolumnbreak",
["de"]="definecolumnbreak",
["en"]="definecolumnbreak",
- ["fr"]="definitsautdecolonne",
+ ["fr"]="définirsautdecolonne",
["it"]="definecolumnbreak",
["nl"]="definieerkolomovergang",
["pe"]="تعریÙ‌شکستن‌ستون",
@@ -736,7 +808,7 @@ return {
["cs"]="definecolumnset",
["de"]="definecolumnset",
["en"]="definecolumnset",
- ["fr"]="definitjeucolonne",
+ ["fr"]="définirjeucolonnes",
["it"]="definiscigruppocolonne",
["nl"]="definieerkolomgroep",
["pe"]="تعریÙ‌مجموعه‌ستون",
@@ -746,7 +818,7 @@ return {
["cs"]="definecombination",
["de"]="definecombination",
["en"]="definecombination",
- ["fr"]="definecombination",
+ ["fr"]="définircombinaison",
["it"]="definecombination",
["nl"]="definieercombinatie",
["pe"]="تعریÙ‌ترکیب",
@@ -756,7 +828,7 @@ return {
["cs"]="definujkombinovanyseznam",
["de"]="definierezusammengestellteliste",
["en"]="definecombinedlist",
- ["fr"]="definitlisteimbriquee",
+ ["fr"]="définirlistecombinee",
["it"]="definiscielencocombinato",
["nl"]="definieersamengesteldelijst",
["pe"]="تعریÙ‌لیست‌ترکیبی",
@@ -766,7 +838,7 @@ return {
["cs"]="definujprikaz",
["de"]="definierebefehl",
["en"]="definecommand",
- ["fr"]="definitcommande",
+ ["fr"]="définircommande",
["it"]="definiscicomando",
["nl"]="definieercommando",
["pe"]="تعریÙ‌Ùرمان",
@@ -776,7 +848,7 @@ return {
["cs"]="definujkonverzi",
["de"]="definierekonversion",
["en"]="defineconversion",
- ["fr"]="definitconversion",
+ ["fr"]="définirconversion",
["it"]="definisciconversione",
["nl"]="definieerconversie",
["pe"]="تعریÙ‌تبدیل",
@@ -786,27 +858,35 @@ return {
["cs"]="definujpopis",
["de"]="definierebeschreibung",
["en"]="definedescription",
- ["fr"]="definitdescription",
+ ["fr"]="définirdescription",
["it"]="definiscidescrizione",
["nl"]="doordefinieren",
["pe"]="تعریÙ‌شرح",
["ro"]="definestedescriere",
},
+ ["definedfont"]={
+ ["en"]="definedfont",
+ ["fr"]="policedefinie",
+ },
["defineenumeration"]={
["cs"]="definujvycet",
["de"]="definierenummerierung",
["en"]="defineenumeration",
- ["fr"]="definitenumeration",
+ ["fr"]="définirénumération",
["it"]="definiscienumerazione",
["nl"]="doornummeren",
["pe"]="تعریÙ‌شماره‌بندی",
["ro"]="definesteenumerare",
},
+ ["definefallbackfamily"]={
+ ["en"]="definefallbackfamily",
+ ["fr"]="définirfamillederepli",
+ },
["definefield"]={
["cs"]="definujpole",
["de"]="definierefeld",
["en"]="definefield",
- ["fr"]="definitchamp",
+ ["fr"]="définirchamp",
["it"]="definiscicampo",
["nl"]="definieerveld",
["pe"]="تعریÙ‌میدان",
@@ -816,7 +896,7 @@ return {
["cs"]="definujzasobnikpoli",
["de"]="definierefeldstapel",
["en"]="definefieldstack",
- ["fr"]="definitpilechamp",
+ ["fr"]="définirpilechamp",
["it"]="definiscistackcampi",
["nl"]="definieerveldstapel",
["pe"]="تعریÙ‌توده‌میدان",
@@ -826,17 +906,25 @@ return {
["cs"]="definujobrazeksymbol",
["de"]="definiereabbsymbol",
["en"]="definefiguresymbol",
- ["fr"]="definitsymbolefigure",
+ ["fr"]="définirfiguresymbole",
["it"]="definiscifigurasimbolo",
["nl"]="definieerfiguursymbool",
["pe"]="تعریÙ‌نمادشکل",
["ro"]="definestesimbolfigura",
},
+ ["definefilefallback"]={
+ ["en"]="definefilefallback",
+ ["fr"]="définirfichierderepli",
+ },
+ ["definefirstline"]={
+ ["en"]="definefirstline",
+ ["fr"]="définirpremiereligne",
+ },
["definefloat"]={
["cs"]="definujplvouciobjekt",
["de"]="definieregleitobjekt",
["en"]="definefloat",
- ["fr"]="definitflottant",
+ ["fr"]="définirflottant",
["it"]="definiscioggettomobile",
["nl"]="definieerplaatsblok",
["pe"]="تعریÙ‌شناور",
@@ -846,17 +934,49 @@ return {
["cs"]="definujfont",
["de"]="definiereschrift",
["en"]="definefont",
- ["fr"]="definitpolice",
+ ["fr"]="définirpolice",
["it"]="definiscifont",
["nl"]="definieerfont",
["pe"]="تعریÙ‌قلم",
["ro"]="definestefont",
},
+ ["definefontalternative"]={
+ ["en"]="definefontalternative",
+ ["fr"]="définirvariantepolice",
+ },
+ ["definefontfallback"]={
+ ["en"]="definefontfallback",
+ ["fr"]="définirpolicederepli",
+ },
+ ["definefontfamily"]={
+ ["en"]="definefontfamily",
+ ["fr"]="définirfamillepolice",
+ },
+ ["definefontfamilypreset"]={
+ ["en"]="definefontfamilypreset",
+ ["fr"]="définirprereglagefamillepolice",
+ },
+ ["definefontfeature"]={
+ ["en"]="definefontfeature",
+ ["fr"]="définirfonctionnalitepolice",
+ },
+ ["definefontfile"]={
+ ["en"]="definefontfile",
+ ["fr"]="définirfichierpolice",
+ },
+ ["definefontsize"]={
+ ["en"]="definefontsize",
+ ["fr"]="définirtaillepolice",
+ },
+ ["definefontsolution"]={
+ ["en"]="definefontsolution",
+ ["fr"]="définirsolutionpolice",
+ },
["definefontstyle"]={
["cs"]="definujstylfontu",
["de"]="definiereschriftstil",
["en"]="definefontstyle",
- ["fr"]="definitstylepolice",
+ ["fr"]="définirstylepolice",
["it"]="definiscistilefont",
["nl"]="definieerfontstijl",
["pe"]="تعریÙ‌سبک‌قلم",
@@ -866,7 +986,7 @@ return {
["cs"]="definujsynonumumfontu",
["de"]="defineschriftsynonym",
["en"]="definefontsynonym",
- ["fr"]="definitsynonymepolice",
+ ["fr"]="définirsynonymepolice",
["it"]="definiscisinonimofont",
["nl"]="definieerfontsynoniem",
["pe"]="تعریÙ‌مترادÙ‌قلم",
@@ -876,7 +996,7 @@ return {
["cs"]="definujoramovani",
["de"]="definiereumrahmt",
["en"]="defineframed",
- ["fr"]="defineframed",
+ ["fr"]="définirencadre",
["it"]="definisciincorniciato",
["nl"]="definieeromlijnd",
["pe"]="تعریÙ‌قالبی",
@@ -886,17 +1006,21 @@ return {
["cs"]="definujoramovanytext",
["de"]="definiereumrahmtertext",
["en"]="defineframedtext",
- ["fr"]="defineframedtext",
+ ["fr"]="définirtexteencadre",
["it"]="definiscitestoincorniciato",
["nl"]="definieerkadertekst",
["pe"]="تعریÙ‌متن‌قالبی",
["ro"]="definestetextinconjurat",
},
+ ["definefrozenfont"]={
+ ["en"]="definefrozenfont",
+ ["fr"]="définirpolicegelee",
+ },
["definehbox"]={
["cs"]="definujhbox",
["de"]="definierehbox",
["en"]="definehbox",
- ["fr"]="definithbox",
+ ["fr"]="définirhbox",
["it"]="definiscihbox",
["nl"]="definieerhbox",
["pe"]="تعریÙ‌جعبه‌‌اÙÙ‚ÛŒ",
@@ -906,21 +1030,26 @@ return {
["cs"]="definujnadpis",
["de"]="definiereueberschrift",
["en"]="definehead",
- ["fr"]="definittete",
+ ["fr"]="définirtete",
["it"]="definiscitesta",
["nl"]="definieerkop",
["pe"]="تعریÙ‌سر",
["ro"]="definesteantet",
},
+ ["definehyphenationfeatures"]={
+ ["en"]="definehyphenationfeatures",
+ ["fr"]="définirfonctionnalitescesure",
+ },
["defineindentedtext"]={
["en"]="defineindentedtext",
+ ["fr"]="définirtexteindente",
["nl"]="definieeringesprongentext",
},
["defineinmargin"]={
["cs"]="defineinmargin",
["de"]="defineinmargin",
["en"]="defineinmargin",
- ["fr"]="definitdansmarge",
+ ["fr"]="définirdansmarge",
["it"]="defineinmargin",
["nl"]="definieerinmarge",
["pe"]="تعریÙ‌درون‌حاشیه",
@@ -930,7 +1059,7 @@ return {
["cs"]="definujinterakcnimenu",
["de"]="definiereinteraktionsmenue",
["en"]="defineinteractionmenu",
- ["fr"]="definitmenuinteraction",
+ ["fr"]="définirmenuinteraction",
["it"]="definiscimenuinterazione",
["nl"]="definieerinteractiemenu",
["pe"]="تعریÙ‌منوی‌پانل",
@@ -940,17 +1069,21 @@ return {
["cs"]="defineitemgroup",
["de"]="defineitemgroup",
["en"]="defineitemgroup",
- ["fr"]="defineitemgroup",
+ ["fr"]="définirgroupedéléments",
["it"]="defineitemgroup",
["nl"]="definieeritemgroep",
["pe"]="تعریÙ‌گروه‌آیتم",
["ro"]="defineitemgroup",
},
+ ["defineitems"]={
+ ["en"]="defineitems",
+ ["fr"]="définiréléments",
+ },
["definelabel"]={
["cs"]="definujpopisek",
["de"]="definierelabel",
["en"]="definelabel",
- ["fr"]="definitetiquette",
+ ["fr"]="définiretiquette",
["it"]="definiscietichetta",
["nl"]="doorlabelen",
["pe"]="تعریÙ‌برچسب",
@@ -960,7 +1093,7 @@ return {
["cs"]="definelayer",
["de"]="definelayer",
["en"]="definelayer",
- ["fr"]="definitcalque",
+ ["fr"]="définircalque",
["it"]="definelayer",
["nl"]="definieerlayer",
["pe"]="تعریÙ‌لایه",
@@ -970,17 +1103,21 @@ return {
["cs"]="definelayout",
["de"]="definelayout",
["en"]="definelayout",
- ["fr"]="definitdisposition",
+ ["fr"]="définirmiseenpage",
["it"]="definiscilayout",
["nl"]="definieerlayout",
["pe"]="تعریÙ‌طرح‌بندی",
["ro"]="definelayout",
},
+ ["definelinenote"]={
+ ["en"]="definelinenote",
+ ["fr"]="définirnotedeligne",
+ },
["definelist"]={
["cs"]="definujseznam",
["de"]="definiereliste",
["en"]="definelist",
- ["fr"]="definitliste",
+ ["fr"]="définirliste",
["it"]="definiscielenco",
["nl"]="definieerlijst",
["pe"]="تعریÙ‌لیست",
@@ -990,7 +1127,7 @@ return {
["cs"]="definujlogo",
["de"]="definierelogo",
["en"]="definelogo",
- ["fr"]="definitlogo",
+ ["fr"]="définirlogo",
["it"]="definiscilogo",
["nl"]="definieerbeeldmerk",
["pe"]="تعریÙ‌آرم",
@@ -1000,7 +1137,7 @@ return {
["cs"]="definujhlavnipole",
["de"]="definierehauptfeld",
["en"]="definemainfield",
- ["fr"]="definitchampprincipal",
+ ["fr"]="définirchampprincipal",
["it"]="definiscicampoprincipale",
["nl"]="definieerhoofdveld",
["pe"]="تعریÙ‌میدان‌اصلی",
@@ -1010,7 +1147,7 @@ return {
["cs"]="definujupravu",
["de"]="definiereumbruch",
["en"]="definemakeup",
- ["fr"]="definitmakeup",
+ ["fr"]="définircomposition",
["it"]="definiscimakeup",
["nl"]="definieeropmaak",
["pe"]="تعریÙ‌آرایش",
@@ -1020,7 +1157,7 @@ return {
["cs"]="definujznaceni",
["de"]="definierebeschriftung",
["en"]="definemarking",
- ["fr"]="definitmarquage",
+ ["fr"]="définirmarquage",
["it"]="definiscimarcatura",
["nl"]="definieermarkering",
["pe"]="تعریÙ‌نشانه‌گذاری",
@@ -1030,17 +1167,29 @@ return {
["cs"]="definemathalignment",
["de"]="definemathalignment",
["en"]="definemathalignment",
- ["fr"]="definemathalignment",
+ ["fr"]="définiralignementmath",
["it"]="definemathalignment",
["nl"]="definieerwiskundeuitlijnen",
["pe"]="تعریÙ‌تنظیم‌ریاضی",
["ro"]="definemathalignment",
},
+ ["definemode"]={
+ ["en"]="definemode",
+ ["fr"]="définirmode",
+ },
+ ["definenamedcolor"]={
+ ["en"]="definenamedcolor",
+ ["fr"]="définircouleurnommee",
+ },
+ ["definenote"]={
+ ["en"]="definenote",
+ ["fr"]="définirnote",
+ },
["defineoutput"]={
["cs"]="definujvystup",
["de"]="defineoutput",
["en"]="defineoutput",
- ["fr"]="definitsortie",
+ ["fr"]="définirsortie",
["it"]="definiscioutput",
["nl"]="definieeruitvoer",
["pe"]="تعریÙ‌خروجی",
@@ -1050,7 +1199,7 @@ return {
["cs"]="definujprekryv",
["de"]="definiereoverlay",
["en"]="defineoverlay",
- ["fr"]="definitrevetement",
+ ["fr"]="définirsuperposition",
["it"]="definiscisovrapposizione",
["nl"]="definieeroverlay",
["pe"]="تعریÙ‌پوشش",
@@ -1060,7 +1209,7 @@ return {
["cs"]="definepagebreak",
["de"]="definepagebreak",
["en"]="definepagebreak",
- ["fr"]="definitsautdepage",
+ ["fr"]="définirsautdepage",
["it"]="definepagebreak",
["nl"]="definieerpaginaovergang",
["pe"]="تعریÙ‌شکست‌صÙحه",
@@ -1070,7 +1219,7 @@ return {
["cs"]="definujpaletu",
["de"]="definierepalette",
["en"]="definepalet",
- ["fr"]="definitpalette",
+ ["fr"]="définirpalette",
["it"]="definiscitavolozza",
["nl"]="definieerpalet",
["pe"]="تعریÙ‌لوح",
@@ -1080,7 +1229,7 @@ return {
["cs"]="definujvelikostpapiru",
["de"]="definierepapierformat",
["en"]="definepapersize",
- ["fr"]="definittaillepapier",
+ ["fr"]="définirtaillepapier",
["it"]="definiscidimensionicarta",
["nl"]="definieerpapierformaat",
["pe"]="تعریÙ‌اندازه‌برگ",
@@ -1090,17 +1239,21 @@ return {
["cs"]="definujodstavce",
["de"]="definiereabsaetze",
["en"]="defineparagraphs",
- ["fr"]="definitparagraphes",
+ ["fr"]="définirparagraphes",
["it"]="definiscicapoversi",
["nl"]="definieeralineas",
["pe"]="تعریÙ‌پاراگراÙها",
["ro"]="definesteparagraf",
},
+ ["defineperiodkerning"]={
+ ["en"]="defineperiodkerning",
+ ["fr"]="reglerapprochepoint",
+ },
["defineplacement"]={
["cs"]="defineplacement",
["de"]="defineplacement",
["en"]="defineplacement",
- ["fr"]="defineplacement",
+ ["fr"]="définirplacement",
["it"]="defineplacement",
["nl"]="definieerplaats",
["pe"]="تعریÙ‌جانشانی",
@@ -1110,7 +1263,7 @@ return {
["cs"]="definujprofil",
["de"]="definiereprofil",
["en"]="defineprofile",
- ["fr"]="definitprofil",
+ ["fr"]="définirprofil",
["it"]="definisciprofilo",
["nl"]="definieerprofiel",
["pe"]="تعریÙ‌پروÙایل",
@@ -1120,7 +1273,7 @@ return {
["cs"]="definujprogram",
["de"]="definiereprogramme",
["en"]="defineprogram",
- ["fr"]="definitprogramme",
+ ["fr"]="définirprogramme",
["it"]="definisciprogramma",
["nl"]="definieerprogramma",
["pe"]="تعریÙ‌برنامه",
@@ -1130,7 +1283,7 @@ return {
["cs"]="definerawfont",
["de"]="definerawfont",
["en"]="definerawfont",
- ["fr"]="definitpolicebrute",
+ ["fr"]="définirpolicebrute",
["it"]="definiscifontgrezzo",
["nl"]="definerawfont",
["pe"]="تعریÙ‌قلم‌خام",
@@ -1140,7 +1293,7 @@ return {
["cs"]="definujodkaz",
["de"]="definierereferenz",
["en"]="definereference",
- ["fr"]="definitreference",
+ ["fr"]="définirreference",
["it"]="definisciriferimento",
["nl"]="definieerreferentie",
["pe"]="تعریÙ‌مرجع",
@@ -1150,7 +1303,7 @@ return {
["cs"]="definujformatodkazu",
["de"]="definierereferenzformat",
["en"]="definereferenceformat",
- ["fr"]="definitformatreference",
+ ["fr"]="définirformatrereference",
["it"]="definisciformatoriferimento",
["nl"]="definieerreferentieformaat",
["pe"]="تعریÙ‌شمایل‌مرجع",
@@ -1160,7 +1313,7 @@ return {
["cs"]="definujseznamodkazu",
["de"]="definierereferenzliste",
["en"]="definereferencelist",
- ["fr"]="definitlistereference",
+ ["fr"]="définirlistereference",
["it"]="definiscilistariferimenti",
["nl"]="definieerreferentielijst",
["pe"]="تعریÙ‌لیست‌مرجع",
@@ -1170,7 +1323,7 @@ return {
["cs"]="definujrejstrik",
["de"]="definiereregister",
["en"]="defineregister",
- ["fr"]="definitregistre",
+ ["fr"]="définirregistre",
["it"]="definisciregistro",
["nl"]="definieerregister",
["pe"]="تعریÙ‌ثبت",
@@ -1180,7 +1333,7 @@ return {
["cs"]="definerule",
["de"]="definerule",
["en"]="definerule",
- ["fr"]="definitregle",
+ ["fr"]="définirtrait",
["it"]="definiscilinea",
["nl"]="definieerlijn",
["pe"]="تعریÙ‌خط‌حائل",
@@ -1190,7 +1343,7 @@ return {
["cs"]="definujsekci",
["de"]="definiereabschnitt",
["en"]="definesection",
- ["fr"]="definitsection",
+ ["fr"]="définirsection",
["it"]="definiscisezione",
["nl"]="definieersectie",
["pe"]="تعریÙ‌بخش",
@@ -1200,7 +1353,7 @@ return {
["cs"]="definujbloksekce",
["de"]="definiereabschnittsblock",
["en"]="definesectionblock",
- ["fr"]="definitblocsection",
+ ["fr"]="définirblocsection",
["it"]="definiscibloccosezione",
["nl"]="definieersectieblok",
["pe"]="تعریÙ‌بلوک‌بخش",
@@ -1210,7 +1363,7 @@ return {
["cs"]="definujtrideni",
["de"]="definieresortieren",
["en"]="definesorting",
- ["fr"]="definittri",
+ ["fr"]="définirtri",
["it"]="definisciordinamento",
["nl"]="definieersorteren",
["pe"]="تعریÙ‌ترتیب",
@@ -1220,7 +1373,7 @@ return {
["cs"]="definujstartstop",
["de"]="definierestartstop",
["en"]="definestartstop",
- ["fr"]="definitdemarrestoppe",
+ ["fr"]="définirdébutfin",
["it"]="definisciiniziatermina",
["nl"]="definieerstartstop",
["pe"]="تعریÙ‌شروع‌پایان",
@@ -1230,7 +1383,7 @@ return {
["cs"]="definujstyl",
["de"]="definierestil",
["en"]="definestyle",
- ["fr"]="definitstyle",
+ ["fr"]="définirstyle",
["it"]="definiscistile",
["nl"]="definieerletter",
["pe"]="تعریÙ‌سبک",
@@ -1240,7 +1393,7 @@ return {
["cs"]="definujpodpole",
["de"]="definieresubfeld",
["en"]="definesubfield",
- ["fr"]="definitsouschamp",
+ ["fr"]="définirsouschamp",
["it"]="definiscisottocampo",
["nl"]="definieersubveld",
["pe"]="تعریÙ‌زیرمیدان",
@@ -1250,7 +1403,7 @@ return {
["cs"]="definujsymbol",
["de"]="definieresymbol",
["en"]="definesymbol",
- ["fr"]="definitsymbole",
+ ["fr"]="définirsymbole",
["it"]="definiscisimbolo",
["nl"]="definieersymbool",
["pe"]="تعریÙ‌نماد",
@@ -1260,7 +1413,7 @@ return {
["cs"]="definujsynonyma",
["de"]="definieresynonyme",
["en"]="definesynonyms",
- ["fr"]="definitsynonymes",
+ ["fr"]="définirsynonymes",
["it"]="definiscisinonimi",
["nl"]="definieersynoniemen",
["pe"]="تعریÙ‌مترادÙها",
@@ -1270,7 +1423,7 @@ return {
["cs"]="definujsablonutabulky",
["de"]="definieretabellenvorlage",
["en"]="definetabletemplate",
- ["fr"]="definittrametableau",
+ ["fr"]="définirgabarittable",
["it"]="definiscimodellotabella",
["nl"]="definieertabelvorm",
["pe"]="تعریÙ‌الگوی‌جدول",
@@ -1280,7 +1433,7 @@ return {
["cs"]="definujtabelaci",
["de"]="definieretabulator",
["en"]="definetabulate",
- ["fr"]="definittabulation",
+ ["fr"]="définirtabulation",
["it"]="definiscitabulato",
["nl"]="definieertabulatie",
["pe"]="تعریÙ‌جدول‌بندی",
@@ -1290,7 +1443,7 @@ return {
["cs"]="definujtext",
["de"]="definieretext",
["en"]="definetext",
- ["fr"]="definittexte",
+ ["fr"]="définirtexte",
["it"]="definiscitesto",
["nl"]="definieertekst",
["pe"]="تعریÙ‌متن",
@@ -1298,13 +1451,18 @@ return {
},
["definetextbackground"]={
["en"]="definetextbackground",
+ ["fr"]="définirtextearriereplan",
["nl"]="definieertekstachtergrond",
},
+ ["definetextnote"]={
+ ["en"]="definetextnote",
+ ["fr"]="définirnotetexte",
+ },
["definetextposition"]={
["cs"]="definetextposition",
["de"]="definetextposition",
["en"]="definetextposition",
- ["fr"]="definitpositiontexte",
+ ["fr"]="définirpositiontexte",
["it"]="definisciposizionetesto",
["nl"]="definieertekstpositie",
["pe"]="تعریÙ‌مکان‌متن",
@@ -1314,7 +1472,7 @@ return {
["cs"]="definetextvariable",
["de"]="definetextvariable",
["en"]="definetextvariable",
- ["fr"]="definitvariabletexte",
+ ["fr"]="définirvariabletexte",
["it"]="definiscivariabiletesto",
["nl"]="definieertekstvariabele",
["pe"]="تعریÙ‌متغیرمتن",
@@ -1324,7 +1482,7 @@ return {
["cs"]="definetype",
["de"]="definetype",
["en"]="definetype",
- ["fr"]="definittype",
+ ["fr"]="définirtranscrire",
["it"]="definiscitype",
["nl"]="definieertype",
["pe"]="تعریÙ‌تایپ",
@@ -1334,7 +1492,7 @@ return {
["cs"]="definujopis",
["de"]="definieretippen",
["en"]="definetyping",
- ["fr"]="definitdactylo",
+ ["fr"]="définirtranscription",
["it"]="definiscityping",
["nl"]="definieertypen",
["pe"]="تعریÙ‌تایپ‌کردن",
@@ -1344,17 +1502,21 @@ return {
["cs"]="definujverzi",
["de"]="definiereversion",
["en"]="defineversion",
- ["fr"]="definitversion",
+ ["fr"]="définirversion",
["it"]="definisciversion",
["nl"]="definieerversie",
["pe"]="تعریÙ‌نسخه",
["ro"]="definesteversiune",
},
+ ["depthspanningtext"]={
+ ["en"]="depthspanningtext",
+ ["fr"]="jambagetextecouvrant",
+ },
["determineheadnumber"]={
["cs"]="stanovcislonadpisu",
["de"]="bestimmekopfnummer",
["en"]="determineheadnumber",
- ["fr"]="determinenumerotete",
+ ["fr"]="determinernumerotete",
["it"]="determinanumerotesta",
["nl"]="bepaalkopnummer",
["pe"]="تعیین‌شماره‌سر",
@@ -1364,7 +1526,7 @@ return {
["cs"]="stanovcharakteristickuseznamu",
["de"]="bestimmelistencharakeristika",
["en"]="determinelistcharacteristics",
- ["fr"]="determinecaracteristiqueliste",
+ ["fr"]="determinercaracteristiquesliste",
["it"]="determinacarattersticheelenco",
["nl"]="bepaallijstkenmerken",
["pe"]="تعیین‌مشخصات‌لیست",
@@ -1374,7 +1536,7 @@ return {
["cs"]="urcicharakteristikurejstriku",
["de"]="bestimmeregistercharakteristika",
["en"]="determineregistercharacteristics",
- ["fr"]="determinecaracteristiquesregistre",
+ ["fr"]="determinercaracteristiquesregistre",
["it"]="determinacaratteristicheregistro",
["nl"]="bepaalregisterkenmerken",
["pe"]="تعیین‌مشخصات‌ثبت",
@@ -1394,12 +1556,20 @@ return {
["cs"]="zablokujinterakcnimenu",
["de"]="inaktiviereinteraktionsmenue",
["en"]="disableinteractionmenu",
- ["fr"]="inhibemenuinteraction",
+ ["fr"]="desactivermenuinteraction",
["it"]="disabilitamenuinterazione",
["nl"]="blokkeerinteractiemenu",
["pe"]="ازکارانداختن‌منوی‌پانل",
["ro"]="dezactiveazameniuinteractiune",
},
+ ["disablemode"]={
+ ["en"]="disablemode",
+ ["fr"]="desactivermode",
+ },
+ ["doaddfeature"]={
+ ["en"]="doaddfeature",
+ ["fr"]="faireajouterfonctionnalite",
+ },
["domicile"]={
["cs"]="bydliste",
["de"]="wohnort",
@@ -1410,11 +1580,15 @@ return {
["pe"]="مسکن",
["ro"]="domiciliu",
},
+ ["dontconvertfont"]={
+ ["en"]="dontconvertfont",
+ ["fr"]="nepasconvertirpolice",
+ },
["donttest"]={
["cs"]="zadnytest",
["de"]="keintest",
["en"]="donttest",
- ["fr"]="sanstest",
+ ["fr"]="sanstester",
["it"]="notest",
["nl"]="geentest",
["pe"]="امتحان‌نکن",
@@ -1440,21 +1614,29 @@ return {
["pe"]="عرض‌لبه",
["ro"]="latimecolturi",
},
+ ["emphasisboldface"]={
+ ["en"]="emphasisboldface",
+ ["fr"]="policegrasaccentue",
+ },
["emptylines"]={
["cs"]="emptylines",
["de"]="emptylines",
["en"]="emptylines",
- ["fr"]="emptylines",
+ ["fr"]="lignesvide",
["it"]="emptylines",
["nl"]="legeregels",
["pe"]="خطها‌خالی",
["ro"]="emptylines",
},
+ ["enablemode"]={
+ ["en"]="enablemode",
+ ["fr"]="activermode",
+ },
["environment"]={
["cs"]="prostredi",
["de"]="umgebung",
["en"]="environment",
- ["fr"]="environement",
+ ["fr"]="environnement",
["it"]="ambiente",
["nl"]="omgeving",
["pe"]="محیط",
@@ -1480,6 +1662,14 @@ return {
["pe"]="حقیقت",
["ro"]="fact",
},
+ ["fastswitchtobodyfont"]={
+ ["en"]="fastswitchtobodyfont",
+ ["fr"]="passerrapideapolicedecorps",
+ },
+ ["feature"]={
+ ["en"]="feature",
+ ["fr"]="fonctionnalite",
+ },
["field"]={
["cs"]="pole",
["de"]="feld",
@@ -1504,7 +1694,7 @@ return {
["cs"]="vyplnovepole",
["de"]="ausfuellfeld",
["en"]="fillinfield",
- ["fr"]="remplitchamp",
+ ["fr"]="champarenseigner",
["it"]="camporiempimento",
["nl"]="invulveld",
["pe"]="درج‌درمیدان",
@@ -1514,7 +1704,7 @@ return {
["cs"]="vyplnovyradek",
["de"]="gefuelltezeile",
["en"]="fillinline",
- ["fr"]="remplitligne",
+ ["fr"]="lignearenseigner",
["it"]="rigariempimento",
["nl"]="invulregel",
["pe"]="درج‌درخط",
@@ -1524,7 +1714,7 @@ return {
["cs"]="vyplnovelinky",
["de"]="gefuelltesrechteck",
["en"]="fillinrules",
- ["fr"]="remplitlignesreglees",
+ ["fr"]="traitsarenseigner",
["it"]="lineeriempimento",
["nl"]="invullijnen",
["pe"]="درج‌درخطها",
@@ -1534,22 +1724,30 @@ return {
["cs"]="vyplnenytext",
["de"]="ausfuelltext",
["en"]="fillintext",
- ["fr"]="remplittexte",
+ ["fr"]="textearenseigner",
["it"]="testoriempimento",
["nl"]="invultekst",
["pe"]="درج‌درمتن",
["ro"]="textumplere",
},
+ ["firstcharacter"]={
+ ["en"]="firstcharacter",
+ ["fr"]="premiercaractere",
+ },
["fitfield"]={
["cs"]="prizpusobivepole",
["de"]="passendfeld",
["en"]="fitfield",
- ["fr"]="ajustechamp",
+ ["fr"]="adapterchamp",
["it"]="adattacampo",
["nl"]="passendveld",
["pe"]="پرکردن‌میدان",
["ro"]="potrivestecamp",
},
+ ["fittopbaselinegrid"]={
+ ["en"]="fittopbaselinegrid",
+ ["fr"]="adaptergrillehautlignedebase",
+ },
["fixedspace"]={
["cs"]="tvrdamezera",
["de"]="festesspatium",
@@ -1570,11 +1768,15 @@ return {
["pe"]="Ùضاهای‌ثابت",
["ro"]="spatiifixate",
},
+ ["flushnotes"]={
+ ["en"]="flushnotes",
+ ["fr"]="vidernotes",
+ },
["followprofile"]={
["cs"]="dodrzujprofil",
["de"]="folgeprofil",
["en"]="followprofile",
- ["fr"]="suivantprofil",
+ ["fr"]="suivreprofile",
["it"]="seguiprofilo",
["nl"]="volgprofiel",
["pe"]="پیروی‌پروÙایل",
@@ -1584,7 +1786,7 @@ return {
["cs"]="dodrzujverziprofilu",
["de"]="folgeprofilversion",
["en"]="followprofileversion",
- ["fr"]="suivantversionprofil",
+ ["fr"]="suivreversionprofil",
["it"]="seguiversioneprofilo",
["nl"]="volgprofielversie",
["pe"]="پیروی‌نسخه‌پروÙایل",
@@ -1594,7 +1796,7 @@ return {
["cs"]="dodrzujverzi",
["de"]="folgeversion",
["en"]="followversion",
- ["fr"]="suivantversion",
+ ["fr"]="suivreversion",
["it"]="seguiversione",
["nl"]="volgversie",
["pe"]="پیروی‌نسخه",
@@ -1624,7 +1826,7 @@ return {
["cs"]="poznamkapodcarou",
["de"]="fussnote",
["en"]="footnote",
- ["fr"]="notepdp",
+ ["fr"]="notebdp",
["it"]="notapdp",
["nl"]="voetnoot",
["pe"]="پانوشت",
@@ -1634,7 +1836,7 @@ return {
["cs"]="footnotetext",
["de"]="footnotetext",
["en"]="footnotetext",
- ["fr"]="textenotepdp",
+ ["fr"]="textenotebdp",
["it"]="testonotapdp",
["nl"]="voetnoottekst",
["pe"]="متن‌پانوشت",
@@ -1644,12 +1846,16 @@ return {
["cs"]="forceblocks",
["de"]="forceblocks",
["en"]="forceblocks",
- ["fr"]="forceblocs",
+ ["fr"]="forcerblocs",
["it"]="forzablocchi",
["nl"]="forceerblokken",
["pe"]="اجباربلوکها",
["ro"]="forteazablocuri",
},
+ ["forcecharacterstripping"]={
+ ["en"]="forcecharacterstripping",
+ ["fr"]="forcerdemontagecaracteres",
+ },
["formulanumber"]={
["cs"]="cislorovnice",
["de"]="formelnummer",
@@ -1674,7 +1880,7 @@ return {
["cs"]="oramovani",
["de"]="umrahmt",
["en"]="framed",
- ["fr"]="framed",
+ ["fr"]="encadre",
["it"]="incorniciato",
["nl"]="omlijnd",
["pe"]="قالبی",
@@ -1690,21 +1896,29 @@ return {
["pe"]="از",
["ro"]="din",
},
+ ["fromlinenote"]={
+ ["en"]="fromlinenote",
+ ["fr"]="denotedeligne",
+ },
["getbuffer"]={
["cs"]="ziskejbuffer",
["de"]="holepuffer",
["en"]="getbuffer",
- ["fr"]="prendbuffer",
+ ["fr"]="obtenirtampon",
["it"]="prendibuffer",
["nl"]="haalbuffer",
["pe"]="دریاÙت‌باÙر",
["ro"]="adubuffer",
},
+ ["getfirstcharacter"]={
+ ["en"]="getfirstcharacter",
+ ["fr"]="obtenirpremiercaractere",
+ },
["getmarking"]={
["cs"]="ziskejznaceni",
["de"]="holebeschriftung",
["en"]="getmarking",
- ["fr"]="obtientmarquage",
+ ["fr"]="obtenirmarquage",
["it"]="prendimarcatura",
["nl"]="haalmarkering",
["pe"]="دریاÙت‌نشانه",
@@ -1714,17 +1928,29 @@ return {
["cs"]="getnumber",
["de"]="getnumber",
["en"]="getnumber",
- ["fr"]="getnumber",
+ ["fr"]="obtenirnumero",
["it"]="getnumber",
["nl"]="haalnummer",
["pe"]="دریاÙت‌شماره",
["ro"]="getnumber",
},
+ ["globaldisablemode"]={
+ ["en"]="globaldisablemode",
+ ["fr"]="desactivermodeglobal",
+ },
+ ["globalenablemode"]={
+ ["en"]="globalenablemode",
+ ["fr"]="activermodeglobal",
+ },
+ ["globalpreventmode"]={
+ ["en"]="globalpreventmode",
+ ["fr"]="empechermodeglobal",
+ },
["godown"]={
["cs"]="jdidolu",
["de"]="nachunten",
["en"]="godown",
- ["fr"]="vaenbas",
+ ["fr"]="allerenbas",
["it"]="vaigiu",
["nl"]="omlaag",
["pe"]="بروپایین",
@@ -1734,7 +1960,7 @@ return {
["cs"]="jdina",
["de"]="zu",
["en"]="goto",
- ["fr"]="va",
+ ["fr"]="allera",
["it"]="vaia",
["nl"]="naar",
["pe"]="بروبه",
@@ -1744,7 +1970,7 @@ return {
["cs"]="jdinabox",
["de"]="zurbox",
["en"]="gotobox",
- ["fr"]="vaalaboite",
+ ["fr"]="alleraboite",
["it"]="vaiabox",
["nl"]="naarbox",
["pe"]="بروبه‌جعبه",
@@ -1754,7 +1980,7 @@ return {
["cs"]="jdinastranu",
["de"]="zurseite",
["en"]="gotopage",
- ["fr"]="vaalapage",
+ ["fr"]="allerapage",
["it"]="vaiapagina",
["nl"]="naarpagina",
["pe"]="بروبه‌صÙحه",
@@ -1794,7 +2020,7 @@ return {
["cs"]="vlasovalinka",
["de"]="haarlinie",
["en"]="hairline",
- ["fr"]="ligneh",
+ ["fr"]="ligneavectrait",
["it"]="capello",
["nl"]="haarlijn",
["pe"]="خط‌مو",
@@ -1804,7 +2030,7 @@ return {
["cs"]="nadpis",
["de"]="kopf",
["en"]="head",
- ["fr"]="tete",
+ ["fr"]="tête",
["it"]="testa",
["nl"]="kop",
["pe"]="سر",
@@ -1814,7 +2040,7 @@ return {
["cs"]="vzdalenostzahlavi",
["de"]="kopfzeilenabstand",
["en"]="headerdistance",
- ["fr"]="distanceentete",
+ ["fr"]="distanceentête",
["it"]="distanzaintestazione",
["nl"]="hoofdafstand",
["pe"]="Ùاصله‌سربرگ",
@@ -1824,7 +2050,7 @@ return {
["cs"]="vyskazahlavi",
["de"]="kopfzeilenhoehe",
["en"]="headerheight",
- ["fr"]="hauteurentete",
+ ["fr"]="hauteurentête",
["it"]="altezzaintestazione",
["nl"]="hoofdhoogte",
["pe"]="ارتÙاع‌سربرگ",
@@ -1854,7 +2080,7 @@ return {
["cs"]="headsym",
["de"]="headsym",
["en"]="headsym",
- ["fr"]="headsym",
+ ["fr"]="symtete",
["it"]="headsym",
["nl"]="kopsym",
["pe"]="نمادسر",
@@ -1870,11 +2096,15 @@ return {
["pe"]="متن‌سر",
["ro"]="texttitlu",
},
+ ["heightspanningtext"]={
+ ["en"]="heightspanningtext",
+ ["fr"]="hauteurtextecouvrant",
+ },
["hideblocks"]={
["cs"]="schovejbloky",
["de"]="verbergebloecke",
["en"]="hideblocks",
- ["fr"]="cacheblocs",
+ ["fr"]="cacherblocs",
["it"]="nascondiblocchi",
["nl"]="verbergblokken",
["pe"]="بلوکها‌پنهان",
@@ -1884,7 +2114,7 @@ return {
["cs"]="vysoky",
["de"]="hoch",
["en"]="high",
- ["fr"]="haut",
+ ["fr"]="exposant",
["it"]="ap",
["nl"]="hoog",
["pe"]="بلند",
@@ -1894,7 +2124,7 @@ return {
["cs"]="hl",
["de"]="hl",
["en"]="hl",
- ["fr"]="hl",
+ ["fr"]="lh",
["it"]="hl",
["nl"]="hl",
["pe"]="خ‌ا",
@@ -1904,7 +2134,7 @@ return {
["cs"]="immediatebetweenlist",
["de"]="immediatebetweenlist",
["en"]="immediatebetweenlist",
- ["fr"]="immediatebetweenlist",
+ ["fr"]="immediatemententreliste",
["it"]="immediatebetweenlist",
["nl"]="directtussenlijst",
["pe"]="Ùوری‌بین‌لیست",
@@ -1914,7 +2144,7 @@ return {
["cs"]="immediatetolist",
["de"]="immediatetolist",
["en"]="immediatetolist",
- ["fr"]="immediatetolist",
+ ["fr"]="immediatementalister",
["it"]="immediatetolist",
["nl"]="directnaarlijst",
["pe"]="Ùوری‌به‌لیست",
@@ -1934,7 +2164,7 @@ return {
["cs"]="zvysujicicislo",
["de"]="nummererhoehen",
["en"]="incrementnumber",
- ["fr"]="incrementenumero",
+ ["fr"]="incrementernumero",
["it"]="incrementanumero",
["nl"]="verhoognummer",
["pe"]="شماره‌اÙزایش",
@@ -1944,7 +2174,7 @@ return {
["cs"]="odsazovani",
["de"]="einziehen",
["en"]="indenting",
- ["fr"]="composeenalinea",
+ ["fr"]="indentation",
["it"]="rientro",
["nl"]="inspringen",
["pe"]="تورÙتگی",
@@ -1954,7 +2184,7 @@ return {
["cs"]="zaramovani",
["de"]="imumriss",
["en"]="inframed",
- ["fr"]="inframed",
+ ["fr"]="dansencadre",
["it"]="circondato",
["nl"]="inlijnd",
["pe"]="درقالبی",
@@ -1964,7 +2194,7 @@ return {
["cs"]="plnezneni",
["de"]="volleswort",
["en"]="infull",
- ["fr"]="infull",
+ ["fr"]="encomplet",
["it"]="perlungo",
["nl"]="voluit",
["pe"]="درپر",
@@ -1974,7 +2204,7 @@ return {
["cs"]="ininner",
["de"]="ininner",
["en"]="ininner",
- ["fr"]="ininner",
+ ["fr"]="dansinterieur",
["it"]="ininner",
["nl"]="inbinnen",
["pe"]="درداخلی",
@@ -2014,7 +2244,7 @@ return {
["cs"]="vradku",
["de"]="inzeile",
["en"]="inline",
- ["fr"]="alaligne",
+ ["fr"]="enligne",
["it"]="inriga",
["nl"]="inregel",
["pe"]="درخط",
@@ -2034,7 +2264,7 @@ return {
["cs"]="mazaramovani",
["de"]="immaumrise",
["en"]="inmaframed",
- ["fr"]="inmframed",
+ ["fr"]="dansencadremath",
["it"]="inmaframed",
["nl"]="inwilijnd",
["pe"]="inmframed",
@@ -2044,7 +2274,7 @@ return {
["cs"]="inneredgedistance",
["de"]="inneredgedistance",
["en"]="inneredgedistance",
- ["fr"]="inneredgedistance",
+ ["fr"]="distancebordinterieur",
["it"]="inneredgedistance",
["nl"]="binnenrandafstand",
["pe"]="Ùاصله‌لبه‌داخلی",
@@ -2054,7 +2284,7 @@ return {
["cs"]="inneredgewidth",
["de"]="inneredgewidth",
["en"]="inneredgewidth",
- ["fr"]="inneredgewidth",
+ ["fr"]="largeurbordinterieur",
["it"]="inneredgewidth",
["nl"]="binnenrandbreedte",
["pe"]="عرض‌لبه‌داخلی",
@@ -2064,7 +2294,7 @@ return {
["cs"]="innermargindistance",
["de"]="innermargindistance",
["en"]="innermargindistance",
- ["fr"]="innermargindistance",
+ ["fr"]="distancemargeinterieure",
["it"]="innermargindistance",
["nl"]="binnenmargeafstand",
["pe"]="Ùاصله‌حاشیه‌داخلی",
@@ -2074,7 +2304,7 @@ return {
["cs"]="innermarginwidth",
["de"]="innermarginwidth",
["en"]="innermarginwidth",
- ["fr"]="innermarginwidth",
+ ["fr"]="largeurmargeinterieure",
["it"]="innermarginwidth",
["nl"]="binnenmargebreedte",
["pe"]="عرض‌حاشیه‌داخلی",
@@ -2094,7 +2324,7 @@ return {
["cs"]="inouter",
["de"]="inouter",
["en"]="inouter",
- ["fr"]="inouter",
+ ["fr"]="dansexterieur",
["it"]="inouter",
["nl"]="inbuiten",
["pe"]="درخارجی",
@@ -2134,7 +2364,7 @@ return {
["cs"]="instalacejazyka",
["de"]="installieresprache",
["en"]="installlanguage",
- ["fr"]="installelangue",
+ ["fr"]="installerlangue",
["it"]="installalingua",
["nl"]="installeertaal",
["pe"]="نصب‌زبان",
@@ -2174,27 +2404,35 @@ return {
["cs"]="polozka",
["de"]="pos",
["en"]="item",
- ["fr"]="element",
+ ["fr"]="élément",
["it"]="elemento",
["nl"]="som",
["pe"]="آیتم",
["ro"]="element",
},
+ ["itemgroup"]={
+ ["en"]="itemgroup",
+ ["fr"]="groupedéléments",
+ },
["items"]={
["cs"]="polozky",
["de"]="posten",
["en"]="items",
- ["fr"]="elements",
+ ["fr"]="éléments",
["it"]="elementi",
["nl"]="items",
["pe"]="آیتمها",
["ro"]="element",
},
+ ["itemtag"]={
+ ["en"]="itemtag",
+ ["fr"]="étiquettedélément",
+ },
["its"]={
["cs"]="pol",
["de"]="its",
["en"]="its",
- ["fr"]="el",
+ ["fr"]="els",
["it"]="el",
["nl"]="its",
["pe"]="its",
@@ -2204,12 +2442,16 @@ return {
["cs"]="zachovejbloky",
["de"]="behaltebloecke",
["en"]="keepblocks",
- ["fr"]="gardeblocs",
+ ["fr"]="conserverblocs",
["it"]="tieniblocchi",
["nl"]="handhaafblokken",
["pe"]="Ø­Ùظ‌بلوکها",
["ro"]="pastreazablocuri",
},
+ ["kerncharacters"]={
+ ["en"]="kerncharacters",
+ ["fr"]="approchercaracteres",
+ },
["label"]={
["cs"]="poppisek",
["de"]="label",
@@ -2234,7 +2476,7 @@ return {
["cs"]="textpopisku",
["de"]="labeltext",
["en"]="labeltext",
- ["fr"]="labeltexte",
+ ["fr"]="texteetiquette",
["it"]="testoetichetta",
["nl"]="labeltekst",
["pe"]="متن‌برچسب",
@@ -2250,6 +2492,14 @@ return {
["pe"]="زبان",
["ro"]="limba",
},
+ ["languageCharacters"]={
+ ["en"]="languageCharacters",
+ ["fr"]="Caractereslangue",
+ },
+ ["languagecharacters"]={
+ ["en"]="languagecharacters",
+ ["fr"]="caractereslangue",
+ },
["leftaligned"]={
["cs"]="zarovnanovlevo",
["de"]="linksbuendig",
@@ -2260,6 +2510,10 @@ return {
["pe"]="چپ‌چین",
["ro"]="aliniatstanga",
},
+ ["leftbottombox"]={
+ ["en"]="leftbottombox",
+ ["fr"]="boitebasgauche",
+ },
["leftedgedistance"]={
["cs"]="vzdalenostlevehookraje",
["de"]="abstandlinkerrand",
@@ -2280,6 +2534,10 @@ return {
["pe"]="عرض‌لبه‌چپ",
["ro"]="latimecoltstanga",
},
+ ["leftline"]={
+ ["en"]="leftline",
+ ["fr"]="lignegauche",
+ },
["leftmargindistance"]={
["cs"]="vzdalenostlevemarginalie",
["de"]="linkemarginalafstand",
@@ -2310,6 +2568,19 @@ return {
["pe"]="پا",
["ro"]="leg",
},
+ ["linecorrection"]={
+ ["en"]="linecorrection",
+ ["fr"]="correctionligne",
+ ["nl"]="regelcorrectie",
+ },
+ ["linenote"]={
+ ["en"]="linenote",
+ ["fr"]="notedeligne",
+ },
+ ["linespanningtext"]={
+ ["en"]="linespanningtext",
+ ["fr"]="largeurtextecouvrant",
+ },
["linewidth"]={
["cs"]="tloustkacary",
["de"]="liniendicke",
@@ -2334,7 +2605,7 @@ return {
["cs"]="delkaseznamu",
["de"]="listenlaenge",
["en"]="listlength",
- ["fr"]="llongueurliste",
+ ["fr"]="longueurtexte",
["it"]="lunghezzaelenco",
["nl"]="lijstlengte",
["pe"]="طول‌لیست",
@@ -2344,7 +2615,7 @@ return {
["cs"]="listsymbol",
["de"]="listsymbol",
["en"]="listsymbol",
- ["fr"]="listesymbole",
+ ["fr"]="symboleliste",
["it"]="listsymbol",
["nl"]="lijstsymbool",
["pe"]="نمادلیست",
@@ -2360,11 +2631,24 @@ return {
["pe"]="عرض‌لیست",
["ro"]="latimelista",
},
+ ["loadfontgoodies"]={
+ ["en"]="loadfontgoodies",
+ ["fr"]="charerfriandisespolice",
+ },
+ ["localfootnotes"]={
+ ["en"]="localfootnotes",
+ ["fr"]="notesbdplocales",
+ ["nl"]="lokalevoetnoten",
+ },
+ ["localnotes"]={
+ ["en"]="localnotes",
+ ["fr"]="noteslocales",
+ },
["logfields"]={
["cs"]="zaznamovepole",
["de"]="registrierefelder",
["en"]="logfields",
- ["fr"]="logchamp",
+ ["fr"]="logchamps",
["it"]="logcampi",
["nl"]="registreervelden",
["pe"]="میدانهای‌گزارش",
@@ -2374,7 +2658,7 @@ return {
["cs"]="nivy",
["de"]="tiho",
["en"]="lohi",
- ["fr"]="baha",
+ ["fr"]="inex",
["it"]="pedap",
["nl"]="laho",
["pe"]="پابا",
@@ -2384,7 +2668,7 @@ return {
["cs"]="nizky",
["de"]="tief",
["en"]="low",
- ["fr"]="bas",
+ ["fr"]="indice",
["it"]="ped",
["nl"]="laag",
["pe"]="پایین",
@@ -2414,7 +2698,7 @@ return {
["cs"]="vyskasazby",
["de"]="satzhoehe",
["en"]="makeupheight",
- ["fr"]="hauteurmakeup",
+ ["fr"]="hauteurcomposition",
["it"]="altezzamakeup",
["nl"]="zethoogte",
["pe"]="ارتÙاع‌آرایش",
@@ -2424,7 +2708,7 @@ return {
["cs"]="sirkasazby",
["de"]="satzbreite",
["en"]="makeupwidth",
- ["fr"]="largeurmakeup",
+ ["fr"]="largeurcomposition",
["it"]="ampiezzamakeup",
["nl"]="zetbreedte",
["pe"]="عرض‌آرایش",
@@ -2434,12 +2718,17 @@ return {
["cs"]="okr",
["de"]="mar",
["en"]="mar",
- ["fr"]="mar",
+ ["fr"]="rem",
["it"]="mar",
["nl"]="mar",
["pe"]="حاش",
["ro"]="mar",
},
+ ["marginblock"]={
+ ["en"]="marginblock",
+ ["fr"]="blocmarginal",
+ ["nl"]="margeblok",
+ },
["margindistance"]={
["cs"]="vzdalenostmarginalie",
["de"]="marginalafstand",
@@ -2454,7 +2743,7 @@ return {
["cs"]="marginalnilinka",
["de"]="marginallinie",
["en"]="marginrule",
- ["fr"]="margereglee",
+ ["fr"]="traitmarge",
["it"]="lineamargine",
["nl"]="kantlijn",
["pe"]="خط‌حاشیه",
@@ -2514,7 +2803,7 @@ return {
["cs"]="oznacverzi",
["de"]="beschrifteversion",
["en"]="markversion",
- ["fr"]="marquageversion",
+ ["fr"]="marquerversion",
["it"]="marcaversione",
["nl"]="markeerversie",
["pe"]="نسخه‌نشانه",
@@ -2524,7 +2813,7 @@ return {
["cs"]="matematika",
["de"]="mathematik",
["en"]="mathematics",
- ["fr"]="mathematique",
+ ["fr"]="mathematics",
["it"]="matematica",
["nl"]="wiskunde",
["pe"]="ریاضی",
@@ -2544,7 +2833,7 @@ return {
["cs"]="maoramovani",
["de"]="maumrise",
["en"]="maframed",
- ["fr"]="mframed",
+ ["fr"]="encadremath",
["it"]="maframed",
["nl"]="wilijnd",
["pe"]="mframed",
@@ -2564,7 +2853,7 @@ return {
["cs"]="zrcadlit",
["de"]="spiegeln",
["en"]="mirror",
- ["fr"]="reflete",
+ ["fr"]="refleter",
["it"]="riflessione",
["nl"]="spiegel",
["pe"]="آینه",
@@ -2584,7 +2873,7 @@ return {
["cs"]="moveformula",
["de"]="moveformula",
["en"]="moveformula",
- ["fr"]="deplaceformule",
+ ["fr"]="deplacerformule",
["it"]="spostaformula",
["nl"]="verplaatsformule",
["pe"]="انتقال‌Ùرمول",
@@ -2594,7 +2883,7 @@ return {
["cs"]="premistinamrizku",
["de"]="amgitterneuausrichten",
["en"]="moveongrid",
- ["fr"]="deplacesurgrille",
+ ["fr"]="deplacersurgrille",
["it"]="spostaagriglia",
["nl"]="verplaatsopgrid",
["pe"]="انتقال‌به‌توری",
@@ -2604,7 +2893,7 @@ return {
["cs"]="movesidefloat",
["de"]="movesidefloat",
["en"]="movesidefloat",
- ["fr"]="movesidefloat",
+ ["fr"]="deplacerflottantcote",
["it"]="movesidefloat",
["nl"]="verplaatszijblok",
["pe"]="انتقال‌کنار‌شناور",
@@ -2614,7 +2903,7 @@ return {
["cs"]="navigating",
["de"]="navigating",
["en"]="navigating",
- ["fr"]="navigating",
+ ["fr"]="navigation",
["it"]="navigating",
["nl"]="navigerend",
["pe"]="هدایت",
@@ -2634,7 +2923,7 @@ return {
["cs"]="zadnezahlaviaupati",
["de"]="keinekopfundfusszeilen",
["en"]="noheaderandfooterlines",
- ["fr"]="sanslignesenteteetpdp",
+ ["fr"]="sansentêtenipdp",
["it"]="nientelineintestazionepdp",
["nl"]="geenhoofdenvoetregels",
["pe"]="بدون‌خط‌سروته‌برگ",
@@ -2644,12 +2933,16 @@ return {
["cs"]="zadneodsazovani",
["de"]="nichteinziehen",
["en"]="noindenting",
- ["fr"]="sansalinea",
+ ["fr"]="sansindentation",
["it"]="nienterientro",
["nl"]="nietinspringen",
["pe"]="بدون‌تورÙتگی",
["ro"]="faraaliniat",
},
+ ["noitem"]={
+ ["en"]="noitem",
+ ["fr"]="sansélément",
+ },
["nolist"]={
["cs"]="zadnyseznam",
["de"]="keineliste",
@@ -2674,7 +2967,7 @@ return {
["cs"]="zadnedalsibloky",
["de"]="keinebloeckemehr",
["en"]="nomoreblocks",
- ["fr"]="pasplusdeblocs",
+ ["fr"]="sansplusdeblocs",
["it"]="bastablocchi",
["nl"]="geenblokkenmeer",
["pe"]="بدون‌بلوکهای‌بیشتر",
@@ -2684,7 +2977,7 @@ return {
["cs"]="zadnedalsisoubory",
["de"]="keinedateienmehr",
["en"]="nomorefiles",
- ["fr"]="pasplusdefichiers",
+ ["fr"]="sansplusdefichiers",
["it"]="bastafile",
["nl"]="geenfilesmeer",
["pe"]="بدون‌Ùایلهای‌بیشتر",
@@ -2694,7 +2987,7 @@ return {
["cs"]="nop",
["de"]="nop",
["en"]="nop",
- ["fr"]="nop",
+ ["fr"]="san",
["it"]="nop",
["nl"]="nop",
["pe"]="منÙÛŒ",
@@ -2720,11 +3013,15 @@ return {
["pe"]="یادداشت",
["ro"]="nota",
},
+ ["notesymbol"]={
+ ["en"]="notesymbol",
+ ["fr"]="symbolenote",
+ },
["notopandbottomlines"]={
["cs"]="zadnehorniadolniradky",
["de"]="keinzeilenobenundunten",
["en"]="notopandbottomlines",
- ["fr"]="sanslignessupetinf",
+ ["fr"]="sansligneshautetbas",
["it"]="nientelineecimafondo",
["nl"]="geenbovenenonderregels",
["pe"]="بدون‌خط‌بالاوپایین",
@@ -2734,7 +3031,7 @@ return {
["cs"]="nokap",
["de"]="nokap",
["en"]="nocap",
- ["fr"]="nocap",
+ ["fr"]="paspetitescaps",
["it"]="nocap",
["nl"]="nokap",
["pe"]="سرپوش‌کوچک‌نه",
@@ -2774,7 +3071,7 @@ return {
["cs"]="outeredgedistance",
["de"]="outeredgedistance",
["en"]="outeredgedistance",
- ["fr"]="outeredgedistance",
+ ["fr"]="distancebordexterieur",
["it"]="outeredgedistance",
["nl"]="buitenrandafstand",
["pe"]="Ùاصله‌لبه‌خارجی",
@@ -2784,7 +3081,7 @@ return {
["cs"]="outeredgewidth",
["de"]="outeredgewidth",
["en"]="outeredgewidth",
- ["fr"]="outeredgewidth",
+ ["fr"]="largeurbordexterieur",
["it"]="outeredgewidth",
["nl"]="buitenrandbreedte",
["pe"]="عرض‌لبه‌خارجی",
@@ -2794,7 +3091,7 @@ return {
["cs"]="outermargindistance",
["de"]="outermargindistance",
["en"]="outermargindistance",
- ["fr"]="outermargindistance",
+ ["fr"]="distancemargeexterieure",
["it"]="outermargindistance",
["nl"]="buitenmargeafstand",
["pe"]="Ùاصله‌حاشیه‌خارجی",
@@ -2804,7 +3101,7 @@ return {
["cs"]="outermarginwidth",
["de"]="outermarginwidth",
["en"]="outermarginwidth",
- ["fr"]="outermarginwidth",
+ ["fr"]="largeurmargeexterieure",
["it"]="outermarginwidth",
["nl"]="buitenmargebreedte",
["pe"]="عرض‌حاشیه‌خارجی",
@@ -2814,7 +3111,7 @@ return {
["cs"]="zhustene",
["de"]="kleinerdurchschuss",
["en"]="packed",
- ["fr"]="groupe",
+ ["fr"]="sansespaceentreitem",
["it"]="impaccato",
["nl"]="opelkaar",
["pe"]="Ùشرده",
@@ -2830,11 +3127,15 @@ return {
["pe"]="صÙحه",
["ro"]="pagina",
},
+ ["pagebreak"]={
+ ["en"]="pagebreak",
+ ["fr"]="sautdepage",
+ },
["pagedepth"]={
["cs"]="pagedepth",
["de"]="pagedepth",
["en"]="pagedepth",
- ["fr"]="pagedepth",
+ ["fr"]="profondeurpage",
["it"]="pagedepth",
["nl"]="paginadiepte",
["pe"]="عمق‌صÙحه",
@@ -2854,7 +3155,7 @@ return {
["cs"]="pageoffset",
["de"]="pageoffset",
["en"]="pageoffset",
- ["fr"]="pageoffset",
+ ["fr"]="decalagepage",
["it"]="pageoffset",
["nl"]="paginaoffset",
["pe"]="Ø¢Ùست‌صÙحه",
@@ -2904,7 +3205,7 @@ return {
["cs"]="umistizalozky",
["de"]="platzierebookmarks",
["en"]="placebookmarks",
- ["fr"]="placemarquespages",
+ ["fr"]="placermarquepages",
["it"]="mettisegnalibro",
["nl"]="plaatsbookmarks",
["pe"]="درج‌چوب‌خط",
@@ -2914,7 +3215,7 @@ return {
["cs"]="umistikombinovanyseznam",
["de"]="platzierezusammengestellteliste",
["en"]="placecombinedlist",
- ["fr"]="placelisteinmbriquee",
+ ["fr"]="placerlistecombinee",
["it"]="mettielencocombinato",
["nl"]="plaatssamengesteldelijst",
["pe"]="درج‌لیست‌مختلط",
@@ -2924,7 +3225,7 @@ return {
["cs"]="placefloat",
["de"]="placefloat",
["en"]="placefloat",
- ["fr"]="placeflottant",
+ ["fr"]="placerflottant",
["it"]="placefloat",
["nl"]="plaatsplaatsblok",
["pe"]="درج‌شناور",
@@ -2934,7 +3235,7 @@ return {
["cs"]="umistipoznamkypodcarou",
["de"]="platzierefussnoten",
["en"]="placefootnotes",
- ["fr"]="placenotespdp",
+ ["fr"]="placernotesbdp",
["it"]="mettinotepdp",
["nl"]="plaatsvoetnoten",
["pe"]="درج‌پانوشتها",
@@ -2944,7 +3245,7 @@ return {
["cs"]="umistirovnici",
["de"]="platziereformel",
["en"]="placeformula",
- ["fr"]="placeformule",
+ ["fr"]="placerformule",
["it"]="mettiformula",
["nl"]="plaatsformule",
["pe"]="درج‌Ùرمول",
@@ -2954,7 +3255,7 @@ return {
["cs"]="placeheadnumber",
["de"]="placeheadnumber",
["en"]="placeheadnumber",
- ["fr"]="placenumerotete",
+ ["fr"]="placernumerotete",
["it"]="posizionanumerotesta",
["nl"]="plaatskopnummer",
["pe"]="درج‌شماره‌سر",
@@ -2964,7 +3265,7 @@ return {
["cs"]="placeheadtext",
["de"]="placeheadtext",
["en"]="placeheadtext",
- ["fr"]="placetextetete",
+ ["fr"]="placertextetete",
["it"]="posizionatestotesta",
["nl"]="plaatskoptekst",
["pe"]="درج‌متن‌سر",
@@ -2974,7 +3275,7 @@ return {
["cs"]="umistilegendu",
["de"]="platzierelegende",
["en"]="placelegend",
- ["fr"]="placelegende",
+ ["fr"]="placerlegende",
["it"]="mettilegenda",
["nl"]="plaatslegenda",
["pe"]="درج‌راهنما",
@@ -2984,7 +3285,7 @@ return {
["cs"]="umistiseznam",
["de"]="platziereliste",
["en"]="placelist",
- ["fr"]="placeliste",
+ ["fr"]="placerliste",
["it"]="mettielenco",
["nl"]="plaatslijst",
["pe"]="درج‌لیست",
@@ -2992,33 +3293,46 @@ return {
},
["placelistofsynonyms"]={
["en"]="placelistofsynonyms",
+ ["fr"]="placerlistedesynonymes",
["nl"]="plaatslijstmetsynoniemen",
},
["placelocalfootnotes"]={
["cs"]="umistilokalnipoznamkypodcarou",
["de"]="platzierelokalefussnoten",
["en"]="placelocalfootnotes",
- ["fr"]="placenotespdplocales",
+ ["fr"]="placernotesbdplocales",
["it"]="mettinotepdplocali",
["nl"]="plaatslokalevoetnoten",
["pe"]="درج‌پانوشتهای‌موضعی",
["ro"]="punenotesubsollocale",
},
+ ["placelocalnotes"]={
+ ["en"]="placelocalnotes",
+ ["fr"]="placernoteslocales",
+ },
["placelogos"]={
["cs"]="umistiloga",
["de"]="platzierelogo",
["en"]="placelogos",
- ["fr"]="placelogos",
+ ["fr"]="placerlogo",
["it"]="mettiloghi",
["nl"]="plaatsbeeldmerken",
["pe"]="درج‌آرمها",
["ro"]="punelogouri",
},
+ ["placenamedfloat"]={
+ ["en"]="placenamedfloat",
+ ["fr"]="placerflottantnomme",
+ },
+ ["placenotes"]={
+ ["en"]="placenotes",
+ ["fr"]="placernotes",
+ },
["placeongrid"]={
["cs"]="umistinamrizku",
["de"]="amgitterausrichten",
["en"]="placeongrid",
- ["fr"]="placesurgrille",
+ ["fr"]="placersurgrille",
["it"]="mettiingriglia",
["nl"]="plaatsopgrid",
["pe"]="درج‌در‌توری",
@@ -3028,7 +3342,7 @@ return {
["cs"]="umistinadsebe",
["de"]="platziereuntereinander",
["en"]="placeontopofeachother",
- ["fr"]="placelesunsaudessusdesautres",
+ ["fr"]="placerlunaudessusdelautre",
["it"]="mettiunosullaltro",
["nl"]="plaatsonderelkaar",
["pe"]="درج‌در‌بالای‌یکدیگر",
@@ -3038,7 +3352,7 @@ return {
["cs"]="placepagenumber",
["de"]="placepagenumber",
["en"]="placepagenumber",
- ["fr"]="placenumeropage",
+ ["fr"]="placernumeropage",
["it"]="mettinumeropagina",
["nl"]="plaatspaginanummer",
["pe"]="درج‌شماره‌صÙحه",
@@ -3048,7 +3362,7 @@ return {
["cs"]="placerawlist",
["de"]="placerawlist",
["en"]="placerawlist",
- ["fr"]="placerawlist",
+ ["fr"]="placerlistebrute",
["it"]="placerawlist",
["nl"]="plaatsruwelijst",
["pe"]="درج‌لیست‌خام",
@@ -3058,7 +3372,7 @@ return {
["cs"]="placereferencelist",
["de"]="placereferencelist",
["en"]="placereferencelist",
- ["fr"]="placelistereference",
+ ["fr"]="placerlistereference",
["it"]="placereferencelist",
["nl"]="plaatsreferentielijst",
["pe"]="درج‌لیست‌مرجع",
@@ -3068,7 +3382,7 @@ return {
["cs"]="umistirejstrik",
["de"]="platziereregister",
["en"]="placeregister",
- ["fr"]="placeregistre",
+ ["fr"]="placerregistre",
["it"]="mettiregistro",
["nl"]="plaatsregister",
["pe"]="درج‌ثبت",
@@ -3078,7 +3392,7 @@ return {
["cs"]="placerule",
["de"]="placerule",
["en"]="placerule",
- ["fr"]="placeregle",
+ ["fr"]="placertrait",
["it"]="mettilinea",
["nl"]="plaatslijn",
["pe"]="درج‌خط",
@@ -3088,7 +3402,7 @@ return {
["cs"]="umistivedlesebe",
["de"]="platzierenebeneinander",
["en"]="placesidebyside",
- ["fr"]="placecoteacote",
+ ["fr"]="placercoteacote",
["it"]="mettifiancoafianco",
["nl"]="plaatsnaastelkaar",
["pe"]="درج‌کنار‌به‌کنار",
@@ -3098,7 +3412,7 @@ return {
["cs"]="umistipodrovnici",
["de"]="platziereunterformel",
["en"]="placesubformula",
- ["fr"]="placesousformule",
+ ["fr"]="placersousformule",
["it"]="mettisottoformula",
["nl"]="plaatssubformule",
["pe"]="درج‌زیرÙرمول",
@@ -3108,7 +3422,7 @@ return {
["cs"]="placetextvariable",
["de"]="placetextvariable",
["en"]="placetextvariable",
- ["fr"]="placevariabletexte",
+ ["fr"]="placervariabletexte",
["it"]="mettivariabiletesto",
["nl"]="plaatstekstvariabele",
["pe"]="درج‌متغیرمتن",
@@ -3128,17 +3442,45 @@ return {
["cs"]="positiontext",
["de"]="positiontext",
["en"]="positiontext",
- ["fr"]="positionnetexte",
+ ["fr"]="texteposition",
["it"]="posizionatesto",
["nl"]="positioneertekst",
["pe"]="مکان‌متن",
["ro"]="pozitietext",
},
+ ["postponenotes"]={
+ ["en"]="postponenotes",
+ ["fr"]="reporternotes",
+ },
+ ["postponingnotes"]={
+ ["en"]="postponingnotes",
+ ["fr"]="reportnotes",
+ },
+ ["predefinedfont"]={
+ ["en"]="predefinedfont",
+ ["fr"]="policepredefinie",
+ },
+ ["predefinefont"]={
+ ["en"]="predefinefont",
+ ["fr"]="predéfinirpolice",
+ },
+ ["presetdocument"]={
+ ["en"]="presetdocument",
+ ["fr"]="prereglerdocument",
+ },
+ ["prettyprintbuffer"]={
+ ["en"]="prettyprintbuffer",
+ ["fr"]="imprimerjolimenttampon",
+ },
+ ["preventmode"]={
+ ["en"]="preventmode",
+ ["fr"]="empechermode",
+ },
["printpaperheight"]={
["cs"]="vyskatiskpapiru",
["de"]="printpapierhoehe",
["en"]="printpaperheight",
- ["fr"]="hauteureditionpapier",
+ ["fr"]="hauteurpapierimpression",
["it"]="altezzacartastampa",
["nl"]="printpapierhoogte",
["pe"]="چاپ‌ارتÙاع‌برگ",
@@ -3148,7 +3490,7 @@ return {
["cs"]="sirkatiskpapiru",
["de"]="printpapierbreite",
["en"]="printpaperwidth",
- ["fr"]="largeureditionpapier",
+ ["fr"]="largeurpapierimpression",
["it"]="ampiezzacartastampa",
["nl"]="printpapierbreedte",
["pe"]="چاپ‌عرض‌برگ",
@@ -3158,17 +3500,21 @@ return {
["cs"]="zpracujbloky",
["de"]="bearbeitebloecke",
["en"]="processblocks",
- ["fr"]="traiteblocs",
+ ["fr"]="traiterblocs",
["it"]="elaborablocchi",
["nl"]="verwerkblokken",
["pe"]="بلوکهای‌پردازش",
["ro"]="proceseazabloc",
},
+ ["processbodyfontenvironmentlist"]={
+ ["en"]="processbodyfontenvironmentlist",
+ ["fr"]="traiterlisteenvironnementpolicedecorps",
+ },
["processpage"]={
["cs"]="zpracujstranu",
["de"]="bearbeiteseite",
["en"]="processpage",
- ["fr"]="traitepage",
+ ["fr"]="traiterpage",
["it"]="elaborapagina",
["nl"]="verwerkpagina",
["pe"]="صÙحه‌پردازش",
@@ -3248,12 +3594,16 @@ return {
["cs"]="opakovat",
["de"]="wiederholen",
["en"]="redo",
- ["fr"]="refait",
+ ["fr"]="refaire",
["it"]="rifai",
["nl"]="herhaal",
["pe"]="انجام‌دوباره",
["ro"]="refa",
},
+ ["redoconvertfont"]={
+ ["en"]="redoconvertfont",
+ ["fr"]="refaireconvertirpolice",
+ },
["ref"]={
["cs"]="ref",
["de"]="ref",
@@ -3278,7 +3628,7 @@ return {
["cs"]="odkaz",
["de"]="verweis",
["en"]="referral",
- ["fr"]="recommandation",
+ ["fr"]="redirection",
["it"]="referral",
["nl"]="kenmerk",
["pe"]="رجوع",
@@ -3288,7 +3638,7 @@ return {
["cs"]="odkaznadatum",
["de"]="verweisdatum",
["en"]="referraldate",
- ["fr"]="daterecommandation",
+ ["fr"]="dateredirection",
["it"]="datareferral",
["nl"]="kenmerkdatum",
["pe"]="تاریخ‌رجوع",
@@ -3298,22 +3648,38 @@ return {
["cs"]="odkazujici",
["de"]="referieren",
["en"]="referring",
- ["fr"]="faitreference",
+ ["fr"]="fairereference",
["it"]="referring",
["nl"]="refereer",
["pe"]="مراجعه",
["ro"]="referring",
},
+ ["registerfontclass"]={
+ ["en"]="registerfontclass",
+ ["fr"]="enregistrerclassepolice",
+ },
+ ["registerhyphenationexception"]={
+ ["en"]="registerhyphenationexception",
+ ["fr"]="enregistrerexceptioncesure",
+ },
+ ["registerhyphenationpattern"]={
+ ["en"]="registerhyphenationpattern",
+ ["fr"]="enregistrermotifcesure",
+ },
["remark"]={
["cs"]="oznaceni",
["de"]="bemerkung",
["en"]="remark",
- ["fr"]="commentaire",
+ ["fr"]="remarque",
["it"]="commento",
["nl"]="toelichting",
["pe"]="توجه",
["ro"]="remarca",
},
+ ["replacefeature"]={
+ ["en"]="replacefeature",
+ ["fr"]="remplacerfonctionnalite",
+ },
["reset"]={
["cs"]="reset",
["de"]="ruecksetzten",
@@ -3324,6 +3690,50 @@ return {
["pe"]="بازنشانی",
["ro"]="reset",
},
+ ["resetandaddfeature"]={
+ ["en"]="resetandaddfeature",
+ ["fr"]="razetajouterfonctionnalite",
+ },
+ ["resetcharacteralign"]={
+ ["en"]="resetcharacteralign",
+ ["fr"]="razalignercaractere",
+ },
+ ["resetcharacterkerning"]={
+ ["en"]="resetcharacterkerning",
+ ["fr"]="razapprochecaracteres",
+ },
+ ["resetcharacterspacing"]={
+ ["en"]="resetcharacterspacing",
+ ["fr"]="razespacementcaracteres",
+ },
+ ["resetcharacterstripping"]={
+ ["en"]="resetcharacterstripping",
+ ["fr"]="razdemontagecaracteres",
+ },
+ ["resetfeature"]={
+ ["en"]="resetfeature",
+ ["fr"]="razfonctionnalite",
+ },
+ ["resetfontcolorsheme"]={
+ ["en"]="resetfontcolorsheme",
+ ["fr"]="razthemecouleurpolice",
+ },
+ ["resetfontfallback"]={
+ ["en"]="resetfontfallback",
+ ["fr"]="razpolicederepli",
+ },
+ ["resetfontsolution"]={
+ ["en"]="resetfontsolution",
+ ["fr"]="zarsolutionpolice",
+ },
+ ["resethyphenationfeatures"]={
+ ["en"]="resethyphenationfeatures",
+ ["fr"]="razfonctionnalitescesure",
+ },
+ ["resetlocalfloats"]={
+ ["en"]="resetlocalfloats",
+ ["fr"]="razflottantslocaux",
+ },
["resetmarking"]={
["cs"]="resetznaceni",
["de"]="ruecksetztenbeschriftung",
@@ -3334,6 +3744,10 @@ return {
["pe"]="بازنشانی‌نشانه‌گذاری",
["ro"]="reseteazamarcaje",
},
+ ["resetmode"]={
+ ["en"]="resetmode",
+ ["fr"]="razmode",
+ },
["resetnumber"]={
["cs"]="resetnumber",
["de"]="resetnumber",
@@ -3344,16 +3758,44 @@ return {
["pe"]="بازنشانی‌شماره",
["ro"]="resetnumber",
},
- ["resettext"]={
+ ["resetpath"]={
+ ["en"]="resetpath",
+ ["fr"]="razchemin",
+ },
+ ["resetperiodkerning"]={
+ ["en"]="resetperiodkerning",
+ ["fr"]="razapprochepoint",
+ },
+ ["resetsystemmode"]={
+ ["en"]="resetsystemmode",
+ ["fr"]="razmodesysteme",
+ },
+ ["resettextcontent"]={
["cs"]="resettextcontent",
["de"]="resettextcontent",
["en"]="resettextcontent",
- ["fr"]="resettextcontent",
+ ["fr"]="raztexte",
["it"]="resettextcontent",
["nl"]="resettekstinhoud",
["pe"]="بازنشانی‌متن",
["ro"]="resettextcontent",
},
+ ["resetvisualizers"]={
+ ["en"]="resetvisualizers",
+ ["fr"]="razvisualisateurs",
+ },
+ ["restoreglobalbodyfont"]={
+ ["en"]="restoreglobalbodyfont",
+ ["fr"]="restaurerpolicedecorpsglobale",
+ },
+ ["retestfeature"]={
+ ["en"]="retestfeature",
+ ["fr"]="retesterfonctionnalite",
+ },
+ ["revivefeature"]={
+ ["en"]="revivefeature",
+ ["fr"]="relancerfonctionnalite",
+ },
["rightaligned"]={
["cs"]="zarovnanovpravo",
["de"]="rechtsbuendig",
@@ -3364,6 +3806,10 @@ return {
["pe"]="تنظیم‌راست",
["ro"]="aliniatdreapta",
},
+ ["rightbottombox"]={
+ ["en"]="rightbottombox",
+ ["fr"]="boitebasdroite",
+ },
["rightedgedistance"]={
["cs"]="vzdalenostpravehookraje",
["de"]="abstandrechterrand",
@@ -3384,6 +3830,10 @@ return {
["pe"]="عرض‌لبه‌راست",
["ro"]="latimecoltdreapta",
},
+ ["rightline"]={
+ ["en"]="rightline",
+ ["fr"]="lignedroite",
+ },
["rightmargindistance"]={
["cs"]="vzdalenostpravemarginalie",
["de"]="rechtemarginalafstand",
@@ -3418,7 +3868,7 @@ return {
["cs"]="otocit",
["de"]="drehen",
["en"]="rotate",
- ["fr"]="oriente",
+ ["fr"]="tourner",
["it"]="ruota",
["nl"]="roteer",
["pe"]="دوران",
@@ -3426,13 +3876,14 @@ return {
},
["savebuffer"]={
["en"]="savebuffer",
+ ["fr"]="enregistrertampon",
["nl"]="bewaarbuffer",
},
["scale"]={
["cs"]="meritko",
["de"]="format",
["en"]="scale",
- ["fr"]="echelle",
+ ["fr"]="mettrealechelle",
["it"]="scala",
["nl"]="schaal",
["pe"]="مقیاس",
@@ -3452,7 +3903,7 @@ return {
["cs"]="vyberbloky",
["de"]="waehlebloeckeaus",
["en"]="selectblocks",
- ["fr"]="selectionneblocs",
+ ["fr"]="selectionnerblocs",
["it"]="selezionablocchi",
["nl"]="selecteerblokken",
["pe"]="انتخاب‌بلوکها",
@@ -3462,7 +3913,7 @@ return {
["cs"]="vyberpapir",
["de"]="waehlepapieraus",
["en"]="selectpaper",
- ["fr"]="selectionnepapier",
+ ["fr"]="selectionnerpapier",
["it"]="selezionacarta",
["nl"]="selecteerpapier",
["pe"]="انتخاب‌برگ",
@@ -3472,27 +3923,127 @@ return {
["cs"]="vyberverzi",
["de"]="waehleversionaus",
["en"]="selectversion",
- ["fr"]="selectionneversion",
+ ["fr"]="selectionnerversion",
["it"]="selezionaversione",
["nl"]="selecteerversie",
["pe"]="انتخاب‌نسخه",
["ro"]="selecteazaversiune",
},
+ ["setbigbodyfont"]={
+ ["en"]="setbigbodyfont",
+ ["fr"]="reglerpolicedecorpsimportante",
+ },
+ ["setcharacteralign"]={
+ ["en"]="setcharacteralign",
+ ["fr"]="regleralignercaractere",
+ },
+ ["setcharacteraligndetail"]={
+ ["en"]="setcharacteraligndetail",
+ ["fr"]="reglerdetailalignercaractere",
+ },
+ ["setcharactercasing"]={
+ ["en"]="setcharactercasing",
+ ["fr"]="reglercassecaracteres",
+ },
+ ["setcharactercleaning"]={
+ ["en"]="setcharactercleaning",
+ ["fr"]="reglernettoyagecaracteres",
+ },
+ ["setcharacterkerning"]={
+ ["en"]="setcharacterkerning",
+ ["fr"]="reglerapprochecaracteres",
+ },
+ ["setcharacterspacing"]={
+ ["en"]="setcharacterspacing",
+ ["fr"]="reglerespacementcaracteres",
+ },
+ ["setcharacterstripping"]={
+ ["en"]="setcharacterstripping",
+ ["fr"]="reglerdemontagecaracteres",
+ },
+ ["setcurrentfontclass"]={
+ ["en"]="setcurrentfontclass",
+ ["fr"]="reglerclassepolicecourante",
+ },
+ ["setfirstline"]={
+ ["en"]="setfirstline",
+ ["fr"]="reglerpremiereligne",
+ },
+ ["setfirstpasscharacteralign"]={
+ ["en"]="setfirstpasscharacteralign",
+ ["fr"]="regleralignercaracterepremierepasse",
+ },
+ ["setfont"]={
+ ["en"]="setfont",
+ ["fr"]="reglerpolice",
+ },
+ ["setfontcolorsheme"]={
+ ["en"]="setfontcolorsheme",
+ ["fr"]="reglerthemecouleurpolice",
+ },
+ ["setfontfeature"]={
+ ["en"]="setfontfeature",
+ ["fr"]="reglerfonctionnalitepolice",
+ },
+ ["setfontsolution"]={
+ ["en"]="setfontsolution",
+ ["fr"]="reglersolutionpolice",
+ },
+ ["setfontstrut"]={
+ ["en"]="setfontstrut",
+ ["fr"]="reglerentretoisepolice",
+ },
+ ["sethyphenationfeatures"]={
+ ["en"]="sethyphenationfeatures",
+ ["fr"]="reglerfonctionnalitescesure",
+ },
+ ["setmainbodyfont"]={
+ ["en"]="setmainbodyfont",
+ ["fr"]="reglerpolicedecorpsprincipale",
+ },
+ ["setmode"]={
+ ["en"]="setmode",
+ ["fr"]="reglermode",
+ },
+ ["setnote"]={
+ ["en"]="setnote",
+ ["fr"]="reglernote",
+ },
+ ["setnotetext"]={
+ ["en"]="setnotetext",
+ ["fr"]="reglertextenote",
+ },
["setnumber"]={
["cs"]="setnumber",
["de"]="setnumber",
["en"]="setnumber",
- ["fr"]="affectenumero",
+ ["fr"]="reglernumero",
["it"]="setnumber",
["nl"]="setnummer",
["pe"]="تعیین‌شماره",
["ro"]="setnumber",
},
+ ["setperiodkerning"]={
+ ["en"]="setperiodkerning",
+ ["fr"]="reglerapprochepoint",
+ },
+ ["setsecondpasscharacteralign"]={
+ ["en"]="setsecondpasscharacteralign",
+ ["fr"]="regleralignercaracteresecondepasse",
+ },
+ ["setsmallbodyfont"]={
+ ["en"]="setsmallbodyfont",
+ ["fr"]="reglerpolicedecorpspetite",
+ },
+ ["setsystemmode"]={
+ ["en"]="setsystemmode",
+ ["fr"]="reglermodesysteme",
+ },
["settextcontent"]={
["cs"]="settextcontent",
["de"]="settext",
["en"]="settextcontent",
- ["fr"]="settext",
+ ["fr"]="reglercontenutexte",
["it"]="settext",
["nl"]="steltekstinhoudin",
["pe"]="تعیین‌محتوای‌متن",
@@ -3502,7 +4053,7 @@ return {
["cs"]="settextvariable",
["de"]="settextvariable",
["en"]="settextvariable",
- ["fr"]="affectevariabletexte",
+ ["fr"]="reglervariabletexte",
["it"]="setvariabiletesto",
["nl"]="kentekstvariabeletoe",
["pe"]="تعیین‌متغیر‌متن",
@@ -3512,7 +4063,7 @@ return {
["cs"]="nastavzarovnani",
["de"]="stelleausrichtungein",
["en"]="setupalign",
- ["fr"]="reglealignement",
+ ["fr"]="configureraligner",
["it"]="impostaallineamento",
["nl"]="steluitlijnenin",
["pe"]="بارگذاری‌تنظیم",
@@ -3522,7 +4073,7 @@ return {
["cs"]="setupanswerarea",
["de"]="setupanswerarea",
["en"]="setupanswerarea",
- ["fr"]="setupanswerarea",
+ ["fr"]="configurerzonereponse",
["it"]="setupanswerarea",
["nl"]="stelantwoordgebiedin",
["pe"]="setupanswerarea",
@@ -3532,17 +4083,21 @@ return {
["cs"]="nastavusporadani",
["de"]="stelleanordnenein",
["en"]="setuparranging",
- ["fr"]="reglearrangement",
+ ["fr"]="configurerarrangement",
["it"]="impostaparranging",
["nl"]="stelarrangerenin",
["pe"]="بارگذاری‌ترتیب",
["ro"]="seteazaaranjareapag",
},
+ ["setupattachment"]={
+ ["en"]="setupattachment",
+ ["fr"]="configurepiecejointe",
+ },
["setupbackground"]={
["cs"]="nastavpozadi",
["de"]="stellehintergrundein",
["en"]="setupbackground",
- ["fr"]="reglearriereplan",
+ ["fr"]="configurerarriereplan",
["it"]="impostasfondo",
["nl"]="stelachtergrondin",
["pe"]="بارگذاری‌پس‌زمینه",
@@ -3552,7 +4107,7 @@ return {
["cs"]="nastavpozadi",
["de"]="stellehintergruendeein",
["en"]="setupbackgrounds",
- ["fr"]="reglearriereplans",
+ ["fr"]="configurerarriereplans",
["it"]="impostasfondi",
["nl"]="stelachtergrondenin",
["pe"]="بارگذاری‌پس‌زمینه‌ها",
@@ -3562,7 +4117,7 @@ return {
["cs"]="nastavcernelinky",
["de"]="stellerechteckein",
["en"]="setupblackrules",
- ["fr"]="reglelignesnoires",
+ ["fr"]="configurertraitsepais",
["it"]="impostalineenere",
["nl"]="stelblokjesin",
["pe"]="بارگذاری‌خطهای‌سیاه",
@@ -3572,7 +4127,7 @@ return {
["cs"]="nastavpreskok",
["de"]="stelleblankoein",
["en"]="setupblank",
- ["fr"]="definitvide",
+ ["fr"]="configurervierge",
["it"]="impostarigovuoto",
["nl"]="stelblankoin",
["pe"]="بارگذاری‌خالی",
@@ -3582,7 +4137,7 @@ return {
["cs"]="nastavblok",
["de"]="stelleblockein",
["en"]="setupblock",
- ["fr"]="reglebloc",
+ ["fr"]="configurerbloc",
["it"]="impostablocco",
["nl"]="stelblokin",
["pe"]="بارگذاری‌بلوک",
@@ -3592,7 +4147,7 @@ return {
["cs"]="nastavzakladnifont",
["de"]="stellefliesstextein",
["en"]="setupbodyfont",
- ["fr"]="reglepolicecorps",
+ ["fr"]="configurerpolicedecorps",
["it"]="impostafontdeltesto",
["nl"]="stelkorpsin",
["pe"]="بارگذاری‌قلم‌متن",
@@ -3602,7 +4157,7 @@ return {
["cs"]="nastavprostredizakladnihofontu",
["de"]="stellefliesstextumgebungein",
["en"]="setupbodyfontenvironment",
- ["fr"]="regleenvironnementpolicecorps",
+ ["fr"]="configurerenvironnementpolicedecorps",
["it"]="impostaambientefontdeltesto",
["nl"]="stelkorpsomgevingin",
["pe"]="بارگذاری‌محیط‌قلم‌متن",
@@ -3612,7 +4167,7 @@ return {
["cs"]="nastavspodek",
["de"]="stelleuntenein",
["en"]="setupbottom",
- ["fr"]="regleinf",
+ ["fr"]="configurerbas",
["it"]="impostafondo",
["nl"]="stelonderin",
["pe"]="بارگذاری‌پایین",
@@ -3622,7 +4177,7 @@ return {
["cs"]="nastavdolnitexty",
["de"]="stelletextuntenein",
["en"]="setupbottomtexts",
- ["fr"]="regletextesinf",
+ ["fr"]="configurertextesbas",
["it"]="impostatestifondo",
["nl"]="stelondertekstenin",
["pe"]="بارگذاری‌متن‌پایین",
@@ -3632,7 +4187,7 @@ return {
["cs"]="nastavbuffer",
["de"]="stellepufferein",
["en"]="setupbuffer",
- ["fr"]="reglebuffer",
+ ["fr"]="configurertampon",
["it"]="impostabuffer",
["nl"]="stelbufferin",
["pe"]="بارگذاری‌باÙر",
@@ -3642,7 +4197,7 @@ return {
["cs"]="nastavtlacitka",
["de"]="stelleknopfein",
["en"]="setupbuttons",
- ["fr"]="regleboutons",
+ ["fr"]="configurerboutons",
["it"]="impostapulsanti",
["nl"]="stelbuttonsin",
["pe"]="بارگذاری‌دکمه‌ها",
@@ -3652,7 +4207,7 @@ return {
["cs"]="nastavkapitalky",
["de"]="stelleversalienein",
["en"]="setupcapitals",
- ["fr"]="reglecapitales",
+ ["fr"]="configurercapitales",
["it"]="impostamaiuscole",
["nl"]="stelkapitalenin",
["pe"]="setupcapitals",
@@ -3662,7 +4217,7 @@ return {
["cs"]="nastavpopisek",
["de"]="stellebildunterschriftein",
["en"]="setupcaption",
- ["fr"]="regleintitule",
+ ["fr"]="configurerintitule",
["it"]="impostacaption",
["nl"]="stelblokkopjein",
["pe"]="بارگذاری‌شرح",
@@ -3672,17 +4227,29 @@ return {
["cs"]="nastavpopisky",
["de"]="stellebilderunterschriftein",
["en"]="setupcaptions",
- ["fr"]="regleintitules",
+ ["fr"]="configurerintitules",
["it"]="impostacaptions",
["nl"]="stelblokkopjesin",
["pe"]="بارگذاری‌شرحها",
["ro"]="seteazalegendele",
},
+ ["setupcharacteralign"]={
+ ["en"]="setupcharacteralign",
+ ["fr"]="configureralignercaractere",
+ },
+ ["setupcharacterkerning"]={
+ ["en"]="setupcharacterkerning",
+ ["fr"]="configurerapprochecaracteres",
+ },
+ ["setupcharacterspacing"]={
+ ["en"]="setupcharacterspacing",
+ ["fr"]="configurerespacementcaracteres",
+ },
["setupclipping"]={
["cs"]="nastavorez",
["de"]="stelleausschnittein",
["en"]="setupclipping",
- ["fr"]="regleclipping",
+ ["fr"]="configurerdecoupage",
["it"]="impostaclippling",
["nl"]="stelclipin",
["pe"]="بارگذاری‌چیدن",
@@ -3692,7 +4259,7 @@ return {
["cs"]="nastavbarvu",
["de"]="stellefarbeein",
["en"]="setupcolor",
- ["fr"]="reglecouleur",
+ ["fr"]="configurercouleur",
["it"]="impostacolore",
["nl"]="stelkleurin",
["pe"]="بارگذاری‌رنگ",
@@ -3702,7 +4269,7 @@ return {
["cs"]="nastavbarvy",
["de"]="stellefarbenein",
["en"]="setupcolors",
- ["fr"]="reglecouleurs",
+ ["fr"]="configurercouleurs",
["it"]="impostacolori",
["nl"]="stelkleurenin",
["pe"]="بارگذاری‌رنگها",
@@ -3712,7 +4279,7 @@ return {
["cs"]="nastavsloupce",
["de"]="stellespaltenein",
["en"]="setupcolumns",
- ["fr"]="reglecolonnes",
+ ["fr"]="configurercolonnes",
["it"]="impostacolonne",
["nl"]="stelkolommenin",
["pe"]="بارگذاری‌ستونها",
@@ -3722,7 +4289,7 @@ return {
["cs"]="setupcolumnset",
["de"]="setupcolumnset",
["en"]="setupcolumnset",
- ["fr"]="reglejeucolonne",
+ ["fr"]="configurerjeucolonnes",
["it"]="impostagruppocolonne",
["nl"]="stelkolomgroepin",
["pe"]="بارگذاری‌مجموعه‌ستون",
@@ -3732,7 +4299,7 @@ return {
["cs"]="setupcolumnsetlines",
["de"]="setupcolumnsetlines",
["en"]="setupcolumnsetlines",
- ["fr"]="setupcolumnsetlines",
+ ["fr"]="configurerlignesjeucolonnes",
["it"]="setupcolumnsetlines",
["nl"]="stelkolomgroepregelsin",
["pe"]="بارگذاری‌خطهای‌مجموعه‌ستون",
@@ -3742,7 +4309,7 @@ return {
["cs"]="setupcolumnsetstart",
["de"]="setupcolumnsetstart",
["en"]="setupcolumnsetstart",
- ["fr"]="setupcolumnsetstart",
+ ["fr"]="configurerfinjeucolonnes",
["it"]="setupcolumnsetstart",
["nl"]="stelkolomgroepstartin",
["pe"]="بارگذاری‌شروع‌مجموعه‌ستون",
@@ -3752,7 +4319,7 @@ return {
["cs"]="nastavspojeni",
["de"]="stellekombinationein",
["en"]="setupcombinations",
- ["fr"]="reglecombinaisons",
+ ["fr"]="configurercombinaisons",
["it"]="impostacombinazioni",
["nl"]="stelcombinatiesin",
["pe"]="بارگذاری‌ترکیب‌ها",
@@ -3762,7 +4329,7 @@ return {
["cs"]="nastavkombinovanyseznam",
["de"]="stellezusammengestelltelisteein",
["en"]="setupcombinedlist",
- ["fr"]="reglelisteimbriquee",
+ ["fr"]="configurerlistecombinee",
["it"]="impostaelencocombinato",
["nl"]="stelsamengesteldelijstin",
["pe"]="بارگذاری‌لیست‌ترکیبی",
@@ -3772,45 +4339,51 @@ return {
["cs"]="nastavkomentar",
["de"]="stellekommentarein",
["en"]="setupcomment",
- ["fr"]="reglecommentaire",
+ ["fr"]="configurercommentaire",
["it"]="impostacommento",
["nl"]="stelcommentaarin",
["pe"]="بارگذاری‌توضیح",
["ro"]="seteazacomentariu",
},
+ ["setupcounter"]={
+ ["en"]="setupcounter",
+ ["fr"]="configurercompteur",
+ },
+ ["setupdescription"]={
+ ["en"]="setupdescription",
+ ["fr"]="configurerdescription",
+ ["nl"]="steldoordefinierenin",
+ },
["setupdescriptions"]={
["cs"]="nastavpopisy",
["de"]="definierebeschreibungen",
["en"]="setupdescriptions",
- ["fr"]="regledescriptions",
+ ["fr"]="configurerdescriptions",
["it"]="impostadescrizioni",
["nl"]="steldoordefinierenin",
["pe"]="بارگذاری‌شرح",
["ro"]="seteazadescriere",
},
- ["setupdescription"]={
- ["en"]="setupdescription",
- ["nl"]="steldoordefinierenin",
+ ["setupenumeration"]={
+ ["en"]="setupenumeration",
+ ["fr"]="configurerénumération",
+ ["nl"]="steldoornummerenin",
},
["setupenumerations"]={
["cs"]="nastavvycty",
["de"]="stellebeschreibungein",
["en"]="setupenumerations",
- ["fr"]="regleenumerations",
+ ["fr"]="configurerénumérations",
["it"]="impostaenumerazioni",
["nl"]="steldoornummerenin",
["pe"]="بارگذاری‌شماره‌گذاریها",
["ro"]="seteazaenumerare",
},
- ["setupenumeration"]={
- ["en"]="setupenumeration",
- ["nl"]="steldoornummerenin",
- },
["setupexternalfigures"]={
["cs"]="nastavexterniobrazy",
["de"]="stelleexterneabbildungenein",
["en"]="setupexternalfigures",
- ["fr"]="reglefiguresexternes",
+ ["fr"]="configurerfiguresexterne",
["it"]="impostafigureesterne",
["nl"]="stelexternefigurenin",
["pe"]="بارگذاری‌شکلهای‌خارجی",
@@ -3820,7 +4393,7 @@ return {
["cs"]="nastavpole",
["de"]="stellefeldein",
["en"]="setupfield",
- ["fr"]="reglechamp",
+ ["fr"]="configurerchamp",
["it"]="impostacampo",
["nl"]="stelveldin",
["pe"]="بارگذاری‌میدان",
@@ -3830,7 +4403,7 @@ return {
["cs"]="nastavvsechnapole",
["de"]="stellefelderin",
["en"]="setupfields",
- ["fr"]="reglechamps",
+ ["fr"]="configurerchamps",
["it"]="impostacampi",
["nl"]="stelveldenin",
["pe"]="بارگذاری‌میدانها",
@@ -3840,7 +4413,7 @@ return {
["cs"]="nastavvyplnoveradky",
["de"]="stellegefuelltezeileein",
["en"]="setupfillinlines",
- ["fr"]="regleremplitligne",
+ ["fr"]="configurerlignesarenseigner",
["it"]="impostarigheriempimento",
["nl"]="stelinvulregelsin",
["pe"]="بارگذاری‌پرکردن‌خطها",
@@ -3850,17 +4423,21 @@ return {
["cs"]="nastavvyplnovelinky",
["de"]="stellegefuelltesrechteckein",
["en"]="setupfillinrules",
- ["fr"]="regleremplitlignesreglees",
+ ["fr"]="configurertraitsarenseigner",
["it"]="impostalineeriempimento",
["nl"]="stelinvullijnenin",
["pe"]="بارگذاری‌درج‌درخطها",
["ro"]="seteazarigleumplere",
},
+ ["setupfirstline"]={
+ ["en"]="setupfirstline",
+ ["fr"]="configurerpremiereligne",
+ },
["setupfloat"]={
["cs"]="nastavplvouciobjekt",
["de"]="stellegleitobjektein",
["en"]="setupfloat",
- ["fr"]="regleflottant",
+ ["fr"]="configurerflottant",
["it"]="impostaoggettomobile",
["nl"]="stelplaatsblokin",
["pe"]="بارگذاری‌شناور",
@@ -3870,7 +4447,7 @@ return {
["cs"]="nastavplvouciobjekty",
["de"]="stellegleitobjekteein",
["en"]="setupfloats",
- ["fr"]="regleflottants",
+ ["fr"]="configurerflottants",
["it"]="impostaoggettimobili",
["nl"]="stelplaatsblokkenin",
["pe"]="بارگذاری‌شناورها",
@@ -3880,17 +4457,33 @@ return {
["cs"]="nastavdeleniplvoucichobjektu",
["de"]="stelleplatziegeteiltegleitobjekt",
["en"]="setupfloatsplitting",
- ["fr"]="regleseparationflottant",
+ ["fr"]="configurerpartageflottants",
["it"]="impostaspezzamentooggettomobile",
["nl"]="stelplaatsbloksplitsenin",
["pe"]="بارگذاری‌شکاÙتن‌شناورها",
["ro"]="seteazaimpartireafloat",
},
+ ["setupfontexpansion"]={
+ ["en"]="setupfontexpansion",
+ ["fr"]="configurerexpansionpolice",
+ },
+ ["setupfontprotrusion"]={
+ ["en"]="setupfontprotrusion",
+ ["fr"]="configurerprotrusionpolice",
+ },
+ ["setupfonts"]={
+ ["en"]="setupfonts",
+ ["fr"]="configurerpolices",
+ },
+ ["setupfontsolution"]={
+ ["en"]="setupfontsolution",
+ ["fr"]="configuresolutionpolice",
+ },
["setupfooter"]={
["cs"]="nastavupati",
["de"]="stellefusszeileein",
["en"]="setupfooter",
- ["fr"]="reglepdp",
+ ["fr"]="configurerpdp",
["it"]="impostapdp",
["nl"]="stelvoetin",
["pe"]="بارگذاری‌ته‌برگ",
@@ -3900,7 +4493,7 @@ return {
["cs"]="nastavtextyupati",
["de"]="stellefusszeilentextein",
["en"]="setupfootertexts",
- ["fr"]="regletextespdp",
+ ["fr"]="configurertextespdp",
["it"]="impostatestipdp",
["nl"]="stelvoettekstenin",
["pe"]="بارگذاری‌متن‌پانوشت",
@@ -3910,7 +4503,7 @@ return {
["cs"]="nastavdefinicipoznamekpodcarou",
["de"]="stellefussnotendefinitionein",
["en"]="setupfootnotedefinition",
- ["fr"]="definitnotepdp",
+ ["fr"]="configurerdefinitionnotebdp",
["it"]="impostadefinizionenotepdp",
["nl"]="stelvoetnootdefinitiein",
["pe"]="بارگذاری‌تعریÙ‌پانوشت",
@@ -3920,7 +4513,7 @@ return {
["cs"]="nastavpoznamkypodcarou",
["de"]="stellefussnotenein",
["en"]="setupfootnotes",
- ["fr"]="reglenotepdp",
+ ["fr"]="configurernotesbdp",
["it"]="impostanotepdp",
["nl"]="stelvoetnotenin",
["pe"]="بارگذاری‌پانوشتها",
@@ -3930,55 +4523,57 @@ return {
["cs"]="setupforms",
["de"]="setupforms",
["en"]="setupforms",
- ["fr"]="regleformulaires",
+ ["fr"]="configurerformulaires",
["it"]="impostaforms",
["nl"]="stelformulierenin",
["pe"]="بارگذاری‌طرح",
["ro"]="seteazaformulare",
},
+ ["setupformula"]={
+ ["en"]="setupformula",
+ ["fr"]="configurerformule",
+ ["nl"]="stelformulein",
+ },
["setupformulas"]={
["cs"]="nastavrovnice",
["de"]="stelleformelnein",
["en"]="setupformulae",
- ["fr"]="regleformules",
+ ["fr"]="configurerformules",
["it"]="impostaformule",
["nl"]="stelformulesin",
["pe"]="بارگذاری‌Ùرمولها",
["ro"]="seteazaformule",
},
- ["setupformula"]={
- ["en"]="setupformula",
- ["nl"]="stelformulein",
- },
["setupframed"]={
["cs"]="nastavoramovani",
["de"]="stelleumrahmtein",
["en"]="setupframed",
- ["fr"]="regleencadre",
+ ["fr"]="configurerencadre",
["it"]="impostaincorniciato",
["nl"]="stelomlijndin",
["pe"]="بارگذاری‌قالبی",
["ro"]="seteazainconjurat",
},
+ ["setupframedtext"]={
+ ["en"]="setupframedtext",
+ ["fr"]="configurertexteencadre",
+ ["nl"]="stelkadertekstin",
+ },
["setupframedtexts"]={
["cs"]="nastavoramovanetexty",
["de"]="stelleumrahmtetexteein",
["en"]="setupframedtexts",
- ["fr"]="setupframedtexts",
+ ["fr"]="configurertextesencadres",
["it"]="impostatestiincorniciati",
["nl"]="stelkadertekstenin",
["pe"]="بارگذاری‌متن‌قالبی",
["ro"]="definestetexteinconjurate",
},
- ["setupframedtext"]={
- ["en"]="setupframedtext",
- ["nl"]="stelkadertekstin",
- },
["setuphead"]={
["cs"]="nastavnadpis",
["de"]="stelleueberschriftein",
["en"]="setuphead",
- ["fr"]="regletete",
+ ["fr"]="configurertête",
["it"]="impostatesta",
["nl"]="stelkopin",
["pe"]="بارگذاری‌سر",
@@ -3988,7 +4583,7 @@ return {
["cs"]="nastavzahlavi",
["de"]="stellekopfzeileein",
["en"]="setupheader",
- ["fr"]="regleentete",
+ ["fr"]="configurerentête",
["it"]="impostainstestazione",
["nl"]="stelhoofdin",
["pe"]="بارگذاری‌سربرگ",
@@ -3998,7 +4593,7 @@ return {
["cs"]="nastavtextyzahlavi",
["de"]="stellekopfzeilentextein",
["en"]="setupheadertexts",
- ["fr"]="regletextesentete",
+ ["fr"]="configurertextesentête",
["it"]="impostatestiintestazioni",
["nl"]="stelhoofdtekstenin",
["pe"]="بارگذاری‌متن‌سربرگ",
@@ -4008,7 +4603,7 @@ return {
["cs"]="nastavcislonadpisu",
["de"]="stellekopfzahlein",
["en"]="setupheadnumber",
- ["fr"]="reglenumerotete",
+ ["fr"]="configurernumerotête",
["it"]="impostanumerotesta",
["nl"]="stelkopnummerin",
["pe"]="بارگذاری‌شماره‌سر",
@@ -4018,7 +4613,7 @@ return {
["cs"]="nastavnadpisy",
["de"]="stelleueberschriftenein",
["en"]="setupheads",
- ["fr"]="regletetes",
+ ["fr"]="configurertêtes",
["it"]="impostateste",
["nl"]="stelkoppenin",
["pe"]="بارگذاری‌سرها",
@@ -4028,17 +4623,21 @@ return {
["cs"]="nastavtexthlavicky",
["de"]="stelleueberschrifttextein",
["en"]="setupheadtext",
- ["fr"]="regletextetete",
+ ["fr"]="configurertextêtete",
["it"]="impostatestointestazioni",
["nl"]="stelkoptekstin",
["pe"]="بارگذاری‌متن‌سر",
["ro"]="seteazatexttitlu",
},
+ ["setuphyphenation"]={
+ ["en"]="setuphyphenation",
+ ["fr"]="configurercesure",
+ },
["setuphyphenmark"]={
["cs"]="nastavdelitko",
["de"]="stellebindestrichein",
["en"]="setuphyphenmark",
- ["fr"]="reglemarquagehyphenation",
+ ["fr"]="configurermarquecesure",
["it"]="impostasegnosillabazione",
["nl"]="stelkoppeltekenin",
["pe"]="بارگذاری‌نشانه‌شکستن",
@@ -4046,13 +4645,14 @@ return {
},
["setupindentedtext"]={
["en"]="setupindentedtext",
+ ["fr"]="configurertexteindente",
["nl"]="stelingesprongentextin",
},
["setupindenting"]={
["cs"]="nastavodsazovani",
["de"]="stelleeinziehenein",
["en"]="setupindenting",
- ["fr"]="reglecomposeenalinea",
+ ["fr"]="configurerindentation",
["it"]="impostarientro",
["nl"]="stelinspringenin",
["pe"]="بارگذاری‌تورÙتگی",
@@ -4062,7 +4662,7 @@ return {
["cs"]="nastavmarginalie",
["de"]="stelleinmarginalieein",
["en"]="setupinmargin",
- ["fr"]="regledansmarge",
+ ["fr"]="configurerdansmarge",
["it"]="impostainmargine",
["nl"]="stelinmargein",
["pe"]="بارگذاری‌درون‌حاشیه",
@@ -4072,7 +4672,7 @@ return {
["cs"]="nastavinterakci",
["de"]="stelleinteraktionein",
["en"]="setupinteraction",
- ["fr"]="regleinteraction",
+ ["fr"]="configurerinteraction",
["it"]="impostainterazione",
["nl"]="stelinteractiein",
["pe"]="بارگذاری‌پانل",
@@ -4082,7 +4682,7 @@ return {
["cs"]="nastavinterakcnilistu",
["de"]="stelleinteraktionsbalkenein",
["en"]="setupinteractionbar",
- ["fr"]="reglebarreinteraction",
+ ["fr"]="configurerbarreinteraction",
["it"]="impostabarrainterazione",
["nl"]="stelinteractiebalkin",
["pe"]="بارگذاری‌میله‌پانل",
@@ -4092,7 +4692,7 @@ return {
["cs"]="nastavinterakcnimenu",
["de"]="stelleinteraktionsmenueein",
["en"]="setupinteractionmenu",
- ["fr"]="reglemenuinteraction",
+ ["fr"]="configurermenuinteraction",
["it"]="impostamenuinterazione",
["nl"]="stelinteractiemenuin",
["pe"]="بارگذاری‌منوی‌پانل",
@@ -4102,7 +4702,7 @@ return {
["cs"]="nastavinterakcniobrazovku",
["de"]="stelleinteraktionsbildschirmein",
["en"]="setupinteractionscreen",
- ["fr"]="regleecraninteraction",
+ ["fr"]="configurerecraninteraction",
["it"]="impostaschermointerazione",
["nl"]="stelinteractieschermin",
["pe"]="بارگذاری‌پرده‌پانل",
@@ -4112,7 +4712,7 @@ return {
["cs"]="nastavmeziradkovoumezeru",
["de"]="stellezeilenabstandein",
["en"]="setupinterlinespace",
- ["fr"]="regleespacementinterligne",
+ ["fr"]="configurerespaceinterligne",
["it"]="impostainterlinea",
["nl"]="stelinterliniein",
["pe"]="بارگذاری‌Ùاصله‌بین‌خط",
@@ -4122,7 +4722,7 @@ return {
["cs"]="setupitemgroup",
["de"]="setupitemgroup",
["en"]="setupitemgroup",
- ["fr"]="setupitemgroup",
+ ["fr"]="configurergroupedéléments",
["it"]="setupitemgroup",
["nl"]="stelitemgroepin",
["pe"]="بارگذاری‌گروه‌آیتم",
@@ -4132,7 +4732,7 @@ return {
["cs"]="nastavvycty",
["de"]="stelleaufzaehlungenein",
["en"]="setupitemizations",
- ["fr"]="reglegroupeselements",
+ ["fr"]="configurergroupesdéléments",
["it"]="impostaelencazioni",
["nl"]="stelopsommingenin",
["pe"]="بارگذاری‌گروههای‌آیتم",
@@ -4142,7 +4742,7 @@ return {
["cs"]="nastavpolozky",
["de"]="stellepostenein",
["en"]="setupitems",
- ["fr"]="regleelements",
+ ["fr"]="configureréléments",
["it"]="impostaelementi",
["nl"]="stelitemsin",
["pe"]="بارگذاری‌آیتمها",
@@ -4152,7 +4752,7 @@ return {
["cs"]="nastavtextpopisku",
["de"]="stellelabeltextein",
["en"]="setuplabeltext",
- ["fr"]="reglelabeltexte",
+ ["fr"]="configureretiquettetexte",
["it"]="impostatestoetichette",
["nl"]="stellabeltekstin",
["pe"]="باگذاری‌متن‌برچسب",
@@ -4162,7 +4762,7 @@ return {
["cs"]="nastavjazyk",
["de"]="stellespracheein",
["en"]="setuplanguage",
- ["fr"]="reglelangue",
+ ["fr"]="configurerlangue",
["it"]="impostalingua",
["nl"]="steltaalin",
["pe"]="بارگذاری‌زبان",
@@ -4172,7 +4772,7 @@ return {
["cs"]="nastavvzhled",
["de"]="stellelayoutein",
["en"]="setuplayout",
- ["fr"]="regledisposition",
+ ["fr"]="configurermiseenpage",
["it"]="impostalayout",
["nl"]="stellayoutin",
["pe"]="بارگذاری‌طرح‌بندی",
@@ -4182,17 +4782,21 @@ return {
["cs"]="nastavlegendu",
["de"]="stellelegendeein",
["en"]="setuplegend",
- ["fr"]="reglelegende",
+ ["fr"]="configurerlegende",
["it"]="impostalegenda",
["nl"]="stellegendain",
["pe"]="بارگذاری‌راهنما",
["ro"]="seteazalegenda",
},
+ ["setuplinenote"]={
+ ["en"]="setuplinenote",
+ ["fr"]="configurernotedeligne",
+ },
["setuplinenumbering"]={
["cs"]="nastavcislovaniradku",
["de"]="stellezeilennumerierungein",
["en"]="setuplinenumbering",
- ["fr"]="reglenumerotationligne",
+ ["fr"]="configurernumérotationligne",
["it"]="impostanumerazionerighe",
["nl"]="stelregelnummerenin",
["pe"]="بارگذاری‌شماره‌‌گذاری‌خط",
@@ -4202,7 +4806,7 @@ return {
["cs"]="nastavradky",
["de"]="stellezeilenein",
["en"]="setuplines",
- ["fr"]="reglelignes",
+ ["fr"]="configurerlignes",
["it"]="impostarighe",
["nl"]="stelregelsin",
["pe"]="بارگذاری‌خطها",
@@ -4212,7 +4816,7 @@ return {
["cs"]="nastavsirkucary",
["de"]="stellelinienbreiteein",
["en"]="setuplinewidth",
- ["fr"]="regleepaisseurligne",
+ ["fr"]="configurerepaisseurtrait",
["it"]="impostaampiezzariga",
["nl"]="stellijndiktein",
["pe"]="بارگذاری‌عرض‌خط",
@@ -4222,7 +4826,7 @@ return {
["cs"]="nastavseznam",
["de"]="stellelisteein",
["en"]="setuplist",
- ["fr"]="regleliste",
+ ["fr"]="configurerliste",
["it"]="impostaelenco",
["nl"]="stellijstin",
["pe"]="بارگذاری‌لیست",
@@ -4232,35 +4836,37 @@ return {
["cs"]="nastavupravu",
["de"]="stelleumbruchein",
["en"]="setupmakeup",
- ["fr"]="reglemakeup",
+ ["fr"]="configurercomposition",
["it"]="impostamakeup",
["nl"]="stelopmaakin",
["pe"]="بارگذاری‌آرایش",
["ro"]="seteazamakeup",
},
+ ["setupmarginblock"]={
+ ["en"]="setupmarginblock",
+ ["fr"]="configurerblocmarginal",
+ ["nl"]="stelmargeblokkenin",
+ },
["setupmarginblocks"]={
["cs"]="nastavmarginalniblok",
["de"]="stellemarginalblockein",
["en"]="setupmarginblocks",
- ["fr"]="regleblocmarge",
+ ["fr"]="configurerblocmarge",
["it"]="impostablocchimargine",
["nl"]="stelmargeblokkenin",
["pe"]="بارگذاری‌بلوکهای‌حاشیه",
["ro"]="seteazablocurimarginale",
},
- ["setupmarginblock"]={
- ["en"]="setupmarginblock",
- ["nl"]="stelmargeblokkenin",
- },
["setupmargindata"]={
["en"]="setupmargindata",
+ ["fr"]="configurerdonneesmarginales",
["nl"]="stelinmargein",
},
["setupmarginrules"]={
["cs"]="nastavmarginalnilinky",
["de"]="stellemarginallinieein",
["en"]="setupmarginrules",
- ["fr"]="reglemargereglee",
+ ["fr"]="configurertraitsmarge",
["it"]="impostalineemargine",
["nl"]="stelkantlijnin",
["pe"]="بارگذاری‌خطهای‌حاشیه",
@@ -4270,7 +4876,7 @@ return {
["cs"]="nastavznaceni",
["de"]="stellebeschriftungein",
["en"]="setupmarking",
- ["fr"]="reglemarquage",
+ ["fr"]="configurermarquage",
["it"]="impostamarcatura",
["nl"]="stelmarkeringin",
["pe"]="بارگذاری‌نشانه‌گذاری",
@@ -4280,7 +4886,7 @@ return {
["cs"]="setupmathalignment",
["de"]="setupmathalignment",
["en"]="setupmathalignment",
- ["fr"]="setupmathalignment",
+ ["fr"]="configureralignementmath",
["it"]="setupmathalignment",
["nl"]="stelwiskundeuitlijnenin",
["pe"]="بارگذاری‌تنظیم‌ریاضی",
@@ -4290,17 +4896,33 @@ return {
["cs"]="nastavzuzeni",
["de"]="stelleengerein",
["en"]="setupnarrower",
- ["fr"]="reglecompoetroite",
+ ["fr"]="configurerplusetroit",
["it"]="impostapiustretto",
["nl"]="stelsmallerin",
["pe"]="بارگذاری‌باریکتر",
["ro"]="seteazaingust",
},
+ ["setupnotation"]={
+ ["en"]="setupnotation",
+ ["fr"]="configurernotation",
+ },
+ ["setupnotations"]={
+ ["en"]="setupnotations",
+ ["fr"]="configurernotations",
+ },
+ ["setupnote"]={
+ ["en"]="setupnote",
+ ["fr"]="configurenote",
+ },
+ ["setupnotes"]={
+ ["en"]="setupnotes",
+ ["fr"]="configurenotes",
+ },
["setupnumber"]={
["cs"]="setupnumber",
["de"]="setupnumber",
["en"]="setupnumber",
- ["fr"]="reglenumero",
+ ["fr"]="configurernumero",
["it"]="impostanumerazione",
["nl"]="stelnummerin",
["pe"]="بارگذاری‌شماره",
@@ -4310,7 +4932,7 @@ return {
["cs"]="nastavcislovani",
["de"]="stellenummerierungein",
["en"]="setupnumbering",
- ["fr"]="reglenumerotation",
+ ["fr"]="configurernumérotation",
["it"]="impostanumerazione",
["nl"]="stelnummerenin",
["pe"]="بارگذاری‌شماره‌گذاری",
@@ -4320,7 +4942,7 @@ return {
["cs"]="nastavumisteniprotejsku",
["de"]="stellegegenueberplatzierenein",
["en"]="setupoppositeplacing",
- ["fr"]="regleplacementopposition",
+ ["fr"]="configurerplacementopposition",
["it"]="impostaposizionamentoopposti",
["nl"]="stelnaastplaatsenin",
["pe"]="بارگذاری‌درج‌مخالÙ",
@@ -4330,7 +4952,7 @@ return {
["cs"]="nastavvystup",
["de"]="stelleausgabeein",
["en"]="setupoutput",
- ["fr"]="reglesortie",
+ ["fr"]="configurersortie",
["it"]="impostaoutput",
["nl"]="steluitvoerin",
["pe"]="بارگذاری‌خروجی",
@@ -4340,7 +4962,7 @@ return {
["cs"]="nastavkomentarstrany",
["de"]="stelleseitenkommentarein",
["en"]="setuppagecomment",
- ["fr"]="reglecommentairepage",
+ ["fr"]="configurercommentairepage",
["it"]="impostacommentopagina",
["nl"]="stelpaginacommentaarin",
["pe"]="بارگذاری‌توضیح‌صÙحه",
@@ -4350,7 +4972,7 @@ return {
["cs"]="nastavcislostrany",
["de"]="stelleseitennummerein",
["en"]="setuppagenumber",
- ["fr"]="reglenumeropage",
+ ["fr"]="configurernumeropage",
["it"]="impostanumeropagina",
["nl"]="stelpaginanummerin",
["pe"]="بارگذاری‌شماره‌صÙحه",
@@ -4360,7 +4982,7 @@ return {
["cs"]="nastavcislovanistran",
["de"]="stelleseitennummeriernungein",
["en"]="setuppagenumbering",
- ["fr"]="reglenumerotationpage",
+ ["fr"]="configurernumérotationpage",
["it"]="impostanumerazionepagina",
["nl"]="stelpaginanummeringin",
["pe"]="بارگذاری‌شماره‌گذاری‌صÙحه",
@@ -4370,7 +4992,7 @@ return {
["cs"]="nastavprechodstrany",
["de"]="stelleseitenuebergangein",
["en"]="setuppagetransitions",
- ["fr"]="regletransitionspage",
+ ["fr"]="configurertransitionpage",
["it"]="impostatransizionepagina",
["nl"]="stelpaginaovergangenin",
["pe"]="بارگذاری‌گذارصÙحه",
@@ -4380,7 +5002,7 @@ return {
["cs"]="nastavpaletu",
["de"]="stellepaletteein",
["en"]="setuppalet",
- ["fr"]="reglepalette",
+ ["fr"]="configurerpalette",
["it"]="impostatavolozza",
["nl"]="stelpaletin",
["pe"]="بارگذاری‌لوح",
@@ -4390,7 +5012,7 @@ return {
["cs"]="setuppaper",
["de"]="setuppaper",
["en"]="setuppaper",
- ["fr"]="reglepapier",
+ ["fr"]="configurerpapier",
["it"]="setuppaper",
["nl"]="stelpapierin",
["pe"]="بارگذاری‌برگ",
@@ -4400,7 +5022,7 @@ return {
["cs"]="nastavvelikostpapiru",
["de"]="stellepapierformatein",
["en"]="setuppapersize",
- ["fr"]="regletaillepapier",
+ ["fr"]="configurertaillepapier",
["it"]="impostadimensionicarta",
["nl"]="stelpapierformaatin",
["pe"]="بارگذاری‌اندازه‌برگ",
@@ -4410,7 +5032,7 @@ return {
["cs"]="nastavcislovaniodstavcu",
["de"]="stelleabsatznummerierungein",
["en"]="setupparagraphnumbering",
- ["fr"]="reglenumerotationparagraphe",
+ ["fr"]="configurernumérotationparagraphe",
["it"]="impostanumerazionecapoversi",
["nl"]="stelparagraafnummerenin",
["pe"]="بارگذاری‌شماره‌گذاری‌پاراگراÙ",
@@ -4420,17 +5042,21 @@ return {
["cs"]="nastavodstavce",
["de"]="stelleabsaetzeein",
["en"]="setupparagraphs",
- ["fr"]="regleparagraphes",
+ ["fr"]="configurerparagraphe",
["it"]="impostacapoversi",
["nl"]="stelalineasin",
["pe"]="بارگذاری‌پاراگراÙها",
["ro"]="seteazaparagrafe",
},
+ ["setupperiodkerning"]={
+ ["en"]="setupperiodkerning",
+ ["fr"]="configurerapprochepoint",
+ },
["setupplacement"]={
["cs"]="setupplacement",
["de"]="setupplacement",
["en"]="setupplacement",
- ["fr"]="setupplacement",
+ ["fr"]="configurerplacement",
["it"]="setupplacement",
["nl"]="stelplaatsin",
["pe"]="بارگذاری‌جانشانی",
@@ -4440,7 +5066,7 @@ return {
["cs"]="nastavumistovani",
["de"]="stellepositionierenein",
["en"]="setuppositioning",
- ["fr"]="reglepositionnement",
+ ["fr"]="configurerpositionnement",
["it"]="impostaposizionamento",
["nl"]="stelpositionerenin",
["pe"]="بارگذاری‌مکان‌گذاری",
@@ -4450,7 +5076,7 @@ return {
["cs"]="nastavprofily",
["de"]="stelleprofilein",
["en"]="setupprofiles",
- ["fr"]="regleprofils",
+ ["fr"]="configurerprofils",
["it"]="impostaprofili",
["nl"]="stelprofielenin",
["pe"]="بارگذاری‌پروÙایلها",
@@ -4460,7 +5086,7 @@ return {
["cs"]="nastavprogramy",
["de"]="stelleprogrammein",
["en"]="setupprograms",
- ["fr"]="regleprogrammes",
+ ["fr"]="configurerprogrammes",
["it"]="impostaprogrammi",
["nl"]="stelprogrammasin",
["pe"]="بارگذاری‌برنامه‌ها",
@@ -4470,7 +5096,7 @@ return {
["cs"]="nastavpublikace",
["de"]="stellepublikationein",
["en"]="setuppublications",
- ["fr"]="reglepublications",
+ ["fr"]="configurerpublications",
["it"]="impostapubblicazioni",
["nl"]="stelpublicatiesin",
["pe"]="بارگذاری‌نشرها",
@@ -4480,7 +5106,7 @@ return {
["cs"]="nastavcitaci",
["de"]="stellezitierenein",
["en"]="setupquote",
- ["fr"]="demarreciter",
+ ["fr"]="configurerciter",
["it"]="impostamenzione",
["nl"]="stelciterenin",
["pe"]="بارگذاری‌نقل",
@@ -4490,7 +5116,7 @@ return {
["cs"]="nastavseznamodkazu",
["de"]="stellereferenzlisteein",
["en"]="setupreferencelist",
- ["fr"]="reglelistereference",
+ ["fr"]="configurerlistereference",
["it"]="impostalistariferimenti",
["nl"]="stelreferentielijstin",
["pe"]="بارگذاری‌لیست‌مرجع",
@@ -4500,7 +5126,7 @@ return {
["cs"]="nastavodkazovani",
["de"]="stellereferenzierenein",
["en"]="setupreferencing",
- ["fr"]="reglereferencage",
+ ["fr"]="configurerreferencement",
["it"]="impostariferimento",
["nl"]="stelrefererenin",
["pe"]="بارگذاری‌ارجاع",
@@ -4510,7 +5136,7 @@ return {
["cs"]="nastavrejstrik",
["de"]="stelleregisterein",
["en"]="setupregister",
- ["fr"]="regleregistre",
+ ["fr"]="configurerregistre",
["it"]="impostaregistro",
["nl"]="stelregisterin",
["pe"]="بارگذاری‌ثبت",
@@ -4520,7 +5146,7 @@ return {
["cs"]="nastavotoceni",
["de"]="stelledrehenein",
["en"]="setuprotate",
- ["fr"]="regleoriente",
+ ["fr"]="configurerrotation",
["it"]="impostarotazione",
["nl"]="stelroterenin",
["pe"]="بارگذاری‌دوران",
@@ -4530,7 +5156,7 @@ return {
["cs"]="setuprule",
["de"]="setuprule",
["en"]="setuprule",
- ["fr"]="regleregle",
+ ["fr"]="configurertrait",
["it"]="impostalinea",
["nl"]="stellijnin",
["pe"]="بارگذاری‌خط",
@@ -4540,7 +5166,7 @@ return {
["cs"]="nastavrastr",
["de"]="stellerasterein",
["en"]="setupscreens",
- ["fr"]="regleecrans",
+ ["fr"]="configurerecran",
["it"]="impostaschermi",
["nl"]="stelrastersin",
["pe"]="بارگذاری‌پرده‌ها",
@@ -4550,7 +5176,7 @@ return {
["cs"]="nastavsekci",
["de"]="stelleabschnittein",
["en"]="setupsection",
- ["fr"]="reglesection",
+ ["fr"]="configurersection",
["it"]="impostasezione",
["nl"]="stelsectiein",
["pe"]="بارگذاری‌بخش",
@@ -4560,7 +5186,7 @@ return {
["cs"]="nastavbloksekce",
["de"]="stelleabschnittsblockein",
["en"]="setupsectionblock",
- ["fr"]="regleblocsection",
+ ["fr"]="configurerblocsection",
["it"]="impostabloccosezione",
["nl"]="stelsectieblokin",
["pe"]="بارگذاری‌بلوک‌بخش",
@@ -4570,7 +5196,7 @@ return {
["cs"]="nastavtrideni",
["de"]="stellesortierenein",
["en"]="setupsorting",
- ["fr"]="regletri",
+ ["fr"]="configurertri",
["it"]="impostaordinamento",
["nl"]="stelsorterenin",
["pe"]="بارگذاری‌ترتیب",
@@ -4580,7 +5206,7 @@ return {
["cs"]="nastavradkovani",
["de"]="stellespatiumein",
["en"]="setupspacing",
- ["fr"]="regleespacement",
+ ["fr"]="configurerespacement",
["it"]="impostaspaziatura",
["nl"]="stelspatieringin",
["pe"]="بارگذاری‌Ùضا‌گذاری",
@@ -4590,7 +5216,7 @@ return {
["cs"]="setupstartstop",
["de"]="setupstartstop",
["en"]="setupstartstop",
- ["fr"]="regledemarrestoppe",
+ ["fr"]="configurerdébutfin",
["it"]="impostainiziatermina",
["nl"]="stelstartstopin",
["pe"]="بارگذاری‌شروع‌پایان",
@@ -4600,7 +5226,7 @@ return {
["cs"]="setupstrut",
["de"]="setupstrut",
["en"]="setupstrut",
- ["fr"]="reglestrut",
+ ["fr"]="configurerentretoise",
["it"]="impostastrut",
["nl"]="stelstrutin",
["pe"]="بارگذاری‌بست",
@@ -4610,7 +5236,7 @@ return {
["cs"]="nastavpodcislostrany",
["de"]="stelleunterseitennummerein",
["en"]="setupsubpagenumber",
- ["fr"]="reglesousnumeropage",
+ ["fr"]="configurernumerosouspage",
["it"]="impostanumerosottopagina",
["nl"]="stelsubpaginanummerin",
["pe"]="بارگذاری‌شماره‌زیرصÙحه",
@@ -4620,7 +5246,7 @@ return {
["cs"]="nastavsadusymbolu",
["de"]="stellesymbolsetein",
["en"]="setupsymbolset",
- ["fr"]="reglejeusymboles",
+ ["fr"]="configurerjeusymboles",
["it"]="impostasetsimboli",
["nl"]="stelsymboolsetin",
["pe"]="بارگذاری‌مجموعه‌نماد",
@@ -4630,7 +5256,7 @@ return {
["cs"]="nastavsynchronizaci",
["de"]="stellesynchronisationein",
["en"]="setupsynchronization",
- ["fr"]="reglesynchronisation",
+ ["fr"]="configurersynchronisation",
["it"]="impostasincronizzazione",
["nl"]="stelsynchronisatiein",
["pe"]="بارگذاری‌تطابق",
@@ -4640,7 +5266,7 @@ return {
["cs"]="nastavsynchronizacnilistu",
["de"]="stellesynchronisationsbalkenein",
["en"]="setupsynchronizationbar",
- ["fr"]="reglebarresynchronisation",
+ ["fr"]="configurerbarresynchronisation",
["it"]="impostabarrasincronizzazione",
["nl"]="stelsynchronisatiebalkin",
["pe"]="بارگذاری‌میله‌تطابق",
@@ -4650,7 +5276,7 @@ return {
["cs"]="nastavsynonyma",
["de"]="stellesynonymein",
["en"]="setupsynonyms",
- ["fr"]="reglesynonymes",
+ ["fr"]="configurersynonymes",
["it"]="impostasinonimi",
["nl"]="stelsynoniemenin",
["pe"]="بارگذاری‌مترادÙها",
@@ -4660,7 +5286,7 @@ return {
["cs"]="nastavsystem",
["de"]="stellesystemein",
["en"]="setupsystem",
- ["fr"]="reglesysteme",
+ ["fr"]="configurersysteme",
["it"]="impostasistema",
["nl"]="stelsysteemin",
["pe"]="بارگذاری‌سیستم",
@@ -4670,7 +5296,7 @@ return {
["cs"]="nastavtab",
["de"]="stelletabein",
["en"]="setuptab",
- ["fr"]="regletab",
+ ["fr"]="configurertab",
["it"]="impostatab",
["nl"]="steltabin",
["pe"]="بارگذاری‌تب",
@@ -4680,7 +5306,7 @@ return {
["cs"]="nastavtabulky",
["de"]="stelletabellenein",
["en"]="setuptables",
- ["fr"]="regletableaux",
+ ["fr"]="configurertables",
["it"]="impostatabelle",
["nl"]="steltabellenin",
["pe"]="بارگذاری‌جدولها",
@@ -4690,7 +5316,7 @@ return {
["cs"]="nastavtabelaci",
["de"]="stelletabulatorein",
["en"]="setuptabulate",
- ["fr"]="regletabulation",
+ ["fr"]="configurertabulation",
["it"]="impostatabulato",
["nl"]="steltabulatiein",
["pe"]="بارگذاری‌جدول‌بندی",
@@ -4700,7 +5326,7 @@ return {
["cs"]="nastavtext",
["de"]="stelletextein",
["en"]="setuptext",
- ["fr"]="regletexte",
+ ["fr"]="configurertexte",
["it"]="impostatesto",
["nl"]="steltekstin",
["pe"]="بارگذاری‌متن",
@@ -4708,13 +5334,18 @@ return {
},
["setuptextbackground"]={
["en"]="setuptextbackground",
+ ["fr"]="configurertextearriereplan",
["nl"]="steltekstachtergrondin",
},
+ ["setuptextnote"]={
+ ["en"]="setuptextnote",
+ ["fr"]="configurernotetexte",
+ },
["setuptextposition"]={
["cs"]="setuptextposition",
["de"]="setuptextposition",
["en"]="setuptextposition",
- ["fr"]="reglepositiontexte",
+ ["fr"]="configurerpositiontexte",
["it"]="impostaposizionetesto",
["nl"]="steltekstpositiein",
["pe"]="بارگذاری‌مکان‌متن",
@@ -4724,7 +5355,7 @@ return {
["cs"]="nastavtextovelinky",
["de"]="stelletextumrissein",
["en"]="setuptextrules",
- ["fr"]="reglelignesreglestexte",
+ ["fr"]="configurertextetraits",
["it"]="impostalineetesto",
["nl"]="steltekstlijnenin",
["pe"]="بارگذاری‌خطهای‌متن",
@@ -4734,7 +5365,7 @@ return {
["cs"]="nastavtexttexty",
["de"]="stelletexttexteein",
["en"]="setuptexttexts",
- ["fr"]="regletextestexte",
+ ["fr"]="configurertextestexte",
["it"]="impostatestotesti",
["nl"]="stelteksttekstenin",
["pe"]="بارگذاری‌متن‌متنها",
@@ -4744,7 +5375,7 @@ return {
["cs"]="setuptextvariable",
["de"]="setuptextvariable",
["en"]="setuptextvariable",
- ["fr"]="reglevariabletexte",
+ ["fr"]="configurervariabletexte",
["it"]="impostavariabiletesto",
["nl"]="steltekstvariabelein",
["pe"]="بارگذاری‌متغیر‌متن",
@@ -4754,7 +5385,7 @@ return {
["cs"]="nastavtenkelinky",
["de"]="stelleduennerumrissein",
["en"]="setupthinrules",
- ["fr"]="regletraitsfins",
+ ["fr"]="configurertraitsfins",
["it"]="impostalineesottili",
["nl"]="steldunnelijnenin",
["pe"]="بارگذاری‌خطها‌ی‌نازک",
@@ -4764,7 +5395,7 @@ return {
["cs"]="nastavtoleranci",
["de"]="stelletoleranzein",
["en"]="setuptolerance",
- ["fr"]="regletolerance",
+ ["fr"]="configurertolerance",
["it"]="impostatolleranza",
["nl"]="steltolerantiein",
["pe"]="بارگذاری‌بردباری",
@@ -4774,7 +5405,7 @@ return {
["cs"]="nastavhorejsek",
["de"]="stellenobenein",
["en"]="setuptop",
- ["fr"]="reglesup",
+ ["fr"]="configurerhaut",
["it"]="impostacima",
["nl"]="stelbovenin",
["pe"]="بارگذاری‌بالا",
@@ -4784,7 +5415,7 @@ return {
["cs"]="nastavhornitexty",
["de"]="stelletextobenein",
["en"]="setuptoptexts",
- ["fr"]="regletextessup",
+ ["fr"]="configurertexteshaut",
["it"]="impostatesticima",
["nl"]="stelboventekstenin",
["pe"]="بارگذاری‌متنهای‌بالا",
@@ -4794,7 +5425,7 @@ return {
["cs"]="nastavtype",
["de"]="stelletipein",
["en"]="setuptype",
- ["fr"]="regletype",
+ ["fr"]="configurertranscrire",
["it"]="impostatype",
["nl"]="steltypein",
["pe"]="بارگذاری‌تایپ",
@@ -4804,7 +5435,7 @@ return {
["cs"]="nastavopis",
["de"]="stelletippenein",
["en"]="setuptyping",
- ["fr"]="regledactylo",
+ ["fr"]="configurertranscription",
["it"]="impostatyping",
["nl"]="steltypenin",
["pe"]="بارگذاری‌تایپ‌کردن",
@@ -4814,7 +5445,7 @@ return {
["cs"]="nastavpodtrzeni",
["de"]="stelleunterstreichenein",
["en"]="setupunderbar",
- ["fr"]="reglesouslignage",
+ ["fr"]="configurersouligner",
["it"]="impostasottolinea",
["nl"]="stelonderstrepenin",
["pe"]="بارگذاری‌میله‌زیر",
@@ -4824,7 +5455,7 @@ return {
["cs"]="nastavurl",
["de"]="stelleurlein",
["en"]="setupurl",
- ["fr"]="regleurl",
+ ["fr"]="configurerurl",
["it"]="impostaurl",
["nl"]="stelurlin",
["pe"]="setupurl",
@@ -4834,7 +5465,7 @@ return {
["cs"]="nastavverze",
["de"]="stelleversionein",
["en"]="setupversions",
- ["fr"]="regleversions",
+ ["fr"]="configurerversions",
["it"]="impostaversioni",
["nl"]="stelversiesin",
["pe"]="بارگذاری‌نسخه‌ها",
@@ -4844,17 +5475,21 @@ return {
["cs"]="nastavbilamista",
["de"]="stellezwischenraumein",
["en"]="setupwhitespace",
- ["fr"]="regleespaceblanc",
+ ["fr"]="configurerespaceblanc",
["it"]="impostaspaziobianco",
["nl"]="stelwitruimtein",
["pe"]="بارگذاری‌Ùضای‌سÙید",
["ro"]="seteazaspatiualb",
},
+ ["setvisualizerfont"]={
+ ["en"]="setvisualizerfont",
+ ["fr"]="reglervisualisateurpolice",
+ },
["showbodyfont"]={
["cs"]="ukazzakladnifont",
["de"]="zeigefliesstext",
["en"]="showbodyfont",
- ["fr"]="montrepolicecorps",
+ ["fr"]="montrerpolicedecorps",
["it"]="mostrafontdeltesto",
["nl"]="toonkorps",
["pe"]="نمایش‌قلم‌بدنه",
@@ -4864,7 +5499,7 @@ return {
["cs"]="ukazpostredizakladnihofontu",
["de"]="zeigefliesstextumgebung",
["en"]="showbodyfontenvironment",
- ["fr"]="montreenvironnementpolicecorps",
+ ["fr"]="montrerenvironnementpolicedecorps",
["it"]="mostraambientefontdeltesto",
["nl"]="toonkorpsomgeving",
["pe"]="نمایش‌محیط‌قلم‌بدنه",
@@ -4874,7 +5509,7 @@ return {
["cs"]="ukazbarvu",
["de"]="zeigefarbe",
["en"]="showcolor",
- ["fr"]="montrecouleur",
+ ["fr"]="montrercouleur",
["it"]="mostracolore",
["nl"]="toonkleur",
["pe"]="نمایش‌رنگ",
@@ -4884,17 +5519,21 @@ return {
["cs"]="ukazskupinubarev",
["de"]="zeigefarbengruppe",
["en"]="showcolorgroup",
- ["fr"]="montregroupecouleur",
+ ["fr"]="montrergroupecouleur",
["it"]="mostragruppocolori",
["nl"]="toonkleurgroep",
["pe"]="نمایش‌گروه‌رنگ",
["ro"]="afiseazagrupculoare",
},
+ ["showcounter"]={
+ ["en"]="showcounter",
+ ["fr"]="montrercompteur",
+ },
["showexternalfigures"]={
["cs"]="ukazexterniobrazy",
["de"]="zeigeexterneabbildungen",
["en"]="showexternalfigures",
- ["fr"]="montrefiguresexternes",
+ ["fr"]="montrerfiguresexternes",
["it"]="mostrafiguresterne",
["nl"]="toonexternefiguren",
["pe"]="نمایش‌شکلهای‌خارجی",
@@ -4904,17 +5543,49 @@ return {
["cs"]="ukazpole",
["de"]="zeigefelder",
["en"]="showfields",
- ["fr"]="montrechamps",
+ ["fr"]="montrerchamps",
["it"]="mostracampi",
["nl"]="toonvelden",
["pe"]="نمایش‌میدانها",
["ro"]="afiseazacampuri",
},
+ ["showfont"]={
+ ["en"]="showfont",
+ ["fr"]="montrerpolice",
+ },
+ ["showfontdata"]={
+ ["en"]="showfontdata",
+ ["fr"]="montrerdonneespolice",
+ },
+ ["showfontexpansion"]={
+ ["en"]="showfontexpansion",
+ ["fr"]="montrerexpansionpolice",
+ },
+ ["showfontitalics"]={
+ ["en"]="showfontitalics",
+ ["fr"]="montreritaliquespolice",
+ },
+ ["showfontkerns"]={
+ ["en"]="showfontkerns",
+ ["fr"]="montrerlesapproches",
+ },
+ ["showfontparameters"]={
+ ["en"]="showfontparameters",
+ ["fr"]="montrerparametrespolice",
+ },
+ ["showfontstrip"]={
+ ["en"]="showfontstrip",
+ ["fr"]="montrervisuellementpolice",
+ },
+ ["showfontstyle"]={
+ ["en"]="showfontstyle",
+ ["fr"]="montrerstylepolice",
+ },
["showframe"]={
["cs"]="ukazramecek",
["de"]="zeigerahmen",
["en"]="showframe",
- ["fr"]="montrecadre",
+ ["fr"]="montrermiseenpage",
["it"]="mostracornice",
["nl"]="toonkader",
["pe"]="نمایش‌قالب",
@@ -4924,17 +5595,25 @@ return {
["cs"]="ukazmrizku",
["de"]="zeigegitter",
["en"]="showgrid",
- ["fr"]="montregrille",
+ ["fr"]="montrergrille",
["it"]="mostragriglia",
["nl"]="toongrid",
["pe"]="نمایش‌توری",
["ro"]="afiseazagrid",
},
+ ["showhyphenationtrace"]={
+ ["en"]="showhyphenationtrace",
+ ["fr"]="montrertracecesure",
+ },
+ ["showkerning"]={
+ ["en"]="showkerning",
+ ["fr"]="montrerapproche",
+ },
["showlayout"]={
["cs"]="ukazvzhled",
["de"]="zeigelayout",
["en"]="showlayout",
- ["fr"]="montredisposition",
+ ["fr"]="montrermiseenpage",
["it"]="mostralyout",
["nl"]="toonlayout",
["pe"]="نمایش‌طرح‌بندی",
@@ -4944,17 +5623,21 @@ return {
["cs"]="ukazupravu",
["de"]="zeigeumbruch",
["en"]="showmakeup",
- ["fr"]="montremakeup",
+ ["fr"]="montrercomposition",
["it"]="mostramakeup",
["nl"]="toonopmaak",
["pe"]="نمایش‌آرایش",
["ro"]="afiseazamakeup",
},
+ ["showminimalbaseline"]={
+ ["en"]="showminimalbaseline",
+ ["fr"]="montrerlignedebase",
+ },
["showpalet"]={
["cs"]="ukazpaletu",
["de"]="zeigepalette",
["en"]="showpalet",
- ["fr"]="montrepalette",
+ ["fr"]="montrerpalette",
["it"]="mostratavolozza",
["nl"]="toonpalet",
["pe"]="نمایش‌لوح",
@@ -4964,7 +5647,7 @@ return {
["cs"]="ukazvytisk",
["de"]="zeigedruck",
["en"]="showprint",
- ["fr"]="montreedition",
+ ["fr"]="montrerimpression",
["it"]="mostrastampa",
["nl"]="toonprint",
["pe"]="نمایش‌چاپ",
@@ -4974,7 +5657,7 @@ return {
["cs"]="ukaznastaveni",
["de"]="zeigeeinstellungen",
["en"]="showsetups",
- ["fr"]="montrereglages",
+ ["fr"]="montrerconfigurations",
["it"]="mostraimpostazioni",
["nl"]="tooninstellingen",
["pe"]="نمایش‌بارگذاریها",
@@ -4984,7 +5667,7 @@ return {
["cs"]="ukazpodpery",
["de"]="zeigestruts",
["en"]="showstruts",
- ["fr"]="montrestruts",
+ ["fr"]="montrerentretoises",
["it"]="mostrastruts",
["nl"]="toonstruts",
["pe"]="نمایش‌بستها",
@@ -4994,7 +5677,7 @@ return {
["cs"]="ukazsadusymbolu",
["de"]="showsymbolset",
["en"]="showsymbolset",
- ["fr"]="montrejeusymboles",
+ ["fr"]="montrerjeusymboles",
["it"]="mostrasetsimboli",
["nl"]="toonsymboolset",
["pe"]="نمایش‌مجموعه‌علامت",
@@ -5004,7 +5687,7 @@ return {
["cs"]="kap",
["de"]="kap",
["en"]="cap",
- ["fr"]="cap",
+ ["fr"]="petitescap",
["it"]="cap",
["nl"]="kap",
["pe"]="cap",
@@ -5040,11 +5723,15 @@ return {
["pe"]="Ùضا",
["ro"]="spatiu",
},
+ ["specialitem"]={
+ ["en"]="specialitem",
+ ["fr"]="élémentspécial",
+ },
["splitfloat"]={
["cs"]="rozdelplvouciobjekt",
["de"]="teilegleitobjekt",
["en"]="splitfloat",
- ["fr"]="separeflottant",
+ ["fr"]="flottantpartage",
["it"]="spezzaoggettomobile",
["nl"]="splitsplaatsblok",
["pe"]="شکاÙتن‌شناور",
@@ -5054,21 +5741,17 @@ return {
["cs"]="startzarovnavani",
["de"]="startausrichtung",
["en"]="startalignment",
- ["fr"]="demarrealignement",
+ ["fr"]="débutalignement",
["it"]="iniziaallineamento",
["nl"]="startuitlijnen",
["pe"]="شروع‌تنظیم",
["ro"]="startaliniere",
},
- ["alignment"]={
- ["en"]="alignment",
- ["nl"]="uitlijnen",
- },
["startbackground"]={
["cs"]="startpozadi",
["de"]="starthintergrund",
["en"]="startbackground",
- ["fr"]="demarrearriereplan",
+ ["fr"]="débutarriereplan",
["it"]="iniziasfondo",
["nl"]="startachtergrond",
["pe"]="شروع‌پس‌زمینه",
@@ -5078,7 +5761,7 @@ return {
["cs"]="startkodovani",
["de"]="startkodierung",
["en"]="startcoding",
- ["fr"]="demarrecodage",
+ ["fr"]="débutcodage",
["it"]="iniziacodifica",
["nl"]="startcodering",
["pe"]="شروع‌کد",
@@ -5088,7 +5771,7 @@ return {
["cs"]="startbarva",
["de"]="startfarbe",
["en"]="startcolor",
- ["fr"]="demarrecouleur",
+ ["fr"]="débutcouleur",
["it"]="iniziacolore",
["nl"]="startkleur",
["pe"]="شروع‌رنگ",
@@ -5098,7 +5781,7 @@ return {
["cs"]="startcolumnmakeup",
["de"]="startcolumnmakeup",
["en"]="startcolumnmakeup",
- ["fr"]="startcolumnmakeup",
+ ["fr"]="débutcompositioncolonne",
["it"]="startcolumnmakeup",
["nl"]="startkolomopmaak",
["pe"]="شروع‌آرایش‌ستون",
@@ -5108,7 +5791,7 @@ return {
["cs"]="startsloupce",
["de"]="startspalten",
["en"]="startcolumns",
- ["fr"]="demarrecolonnes",
+ ["fr"]="débutcolonnes",
["it"]="iniziacolonne",
["nl"]="startkolommen",
["pe"]="شروع‌ستونها",
@@ -5118,7 +5801,7 @@ return {
["cs"]="startcolumnset",
["de"]="startcolumnset",
["en"]="startcolumnset",
- ["fr"]="demarrejeucolonne",
+ ["fr"]="débutjeucolonnes",
["it"]="iniziagruppocolonne",
["nl"]="startkolomgroep",
["pe"]="شروع‌مجموعه‌ستون",
@@ -5128,7 +5811,7 @@ return {
["cs"]="startspojeni",
["de"]="startkombination",
["en"]="startcombination",
- ["fr"]="demarrecombinaison",
+ ["fr"]="débutcombinaison",
["it"]="iniziacombinazione",
["nl"]="startcombinatie",
["pe"]="شروع‌ترکیب",
@@ -5138,7 +5821,7 @@ return {
["cs"]="startkomponenta",
["de"]="startkomponente",
["en"]="startcomponent",
- ["fr"]="demarrecomposant",
+ ["fr"]="débutcomposant",
["it"]="iniziacomponente",
["nl"]="startonderdeel",
["pe"]="شروع‌مولÙÙ‡",
@@ -5148,7 +5831,7 @@ return {
["cs"]="startdokument",
["de"]="startdokument",
["en"]="startdocument",
- ["fr"]="demarredocument",
+ ["fr"]="débutdocument",
["it"]="iniziadocumento",
["nl"]="startdocument",
["pe"]="شروع‌نوشتار",
@@ -5158,7 +5841,7 @@ return {
["cs"]="startprostredi",
["de"]="startumgebung",
["en"]="startenvironment",
- ["fr"]="demarreenvironement",
+ ["fr"]="débutenvironnement",
["it"]="iniziaambiente",
["nl"]="startomgeving",
["pe"]="شروع‌محیط",
@@ -5168,7 +5851,7 @@ return {
["cs"]="startobraz",
["de"]="startabbildung",
["en"]="startfigure",
- ["fr"]="demarrefigure",
+ ["fr"]="débutfigure",
["it"]="iniziafigura",
["nl"]="startfiguur",
["pe"]="شروع‌شکل",
@@ -5176,13 +5859,14 @@ return {
},
["startframed"]={
["en"]="startframed",
+ ["fr"]="débutencadre",
["nl"]="startomlijnd",
},
["startglobal"]={
["cs"]="startglobalni",
["de"]="startglobal",
["en"]="startglobal",
- ["fr"]="demarreglobal",
+ ["fr"]="débutglobal",
["it"]="iniziaglobale",
["nl"]="startglobaal",
["pe"]="شروع‌سراسری",
@@ -5192,7 +5876,7 @@ return {
["cs"]="startradek",
["de"]="startzeile",
["en"]="startline",
- ["fr"]="demarreligne",
+ ["fr"]="débutligneref",
["it"]="iniziariga",
["nl"]="startregel",
["pe"]="شروع‌خط",
@@ -5202,21 +5886,21 @@ return {
["cs"]="startkorekceradku",
["de"]="startzeilenkorrektur",
["en"]="startlinecorrection",
- ["fr"]="demarrecorrectionligne",
+ ["fr"]="débutcorrectionligne",
["it"]="iniziacorrezioneriga",
["nl"]="startregelcorrectie",
["pe"]="شروع‌تصحیح‌خط",
["ro"]="startcorectielinie",
},
- ["linecorrection"]={
- ["en"]="linecorrection",
- ["nl"]="regelcorrectie",
+ ["startlinenote"]={
+ ["en"]="startlinenote",
+ ["fr"]="débutnotedeligne",
},
["startlinenumbering"]={
["cs"]="startcislovaniradku",
["de"]="startzeilennumerierung",
["en"]="startlinenumbering",
- ["fr"]="demarrenumerotationligne",
+ ["fr"]="débutnumérotationligne",
["it"]="inizianumerazionerighe",
["nl"]="startregelnummeren",
["pe"]="شروع‌شماره‌گذاری‌خط",
@@ -5226,7 +5910,7 @@ return {
["cs"]="startradky",
["de"]="startzeilen",
["en"]="startlines",
- ["fr"]="demarrelignes",
+ ["fr"]="débutlignes",
["it"]="iniziarighe",
["nl"]="startregels",
["pe"]="شروع‌خطها",
@@ -5236,7 +5920,7 @@ return {
["cs"]="startlokalni",
["de"]="startlokal",
["en"]="startlocal",
- ["fr"]="demarrelocal",
+ ["fr"]="débutlocal",
["it"]="inizialocale",
["nl"]="startlokaal",
["pe"]="شروع‌موضعی",
@@ -5246,21 +5930,17 @@ return {
["cs"]="startlokalnipoznamkypodcarou",
["de"]="startlokalefussnoten",
["en"]="startlocalfootnotes",
- ["fr"]="demarrenotespdplocales",
+ ["fr"]="débutnotesbdplocal",
["it"]="inizianotepdplocali",
["nl"]="startlokalevoetnoten",
["pe"]="شروع‌پانوشتهای‌موضعی",
["ro"]="startnotesubsollocale",
},
- ["localfootnotes"]={
- ["en"]="localfootnotes",
- ["nl"]="lokalevoetnoten",
- },
["startmakeup"]={
["cs"]="startuprava",
["de"]="startumbruch",
["en"]="startmakeup",
- ["fr"]="demarremakeup",
+ ["fr"]="débutcomposition",
["it"]="iniziamakeup",
["nl"]="startopmaak",
["pe"]="شروع‌آرایش",
@@ -5270,21 +5950,17 @@ return {
["cs"]="startmarginalniblok",
["de"]="startmarginalblock",
["en"]="startmarginblock",
- ["fr"]="demarreblocmarge",
+ ["fr"]="débutblocmarge",
["it"]="iniziabloccomargine",
["nl"]="startmargeblok",
["pe"]="شروع‌بلوک‌حاشیه",
["ro"]="startblocmarginal",
},
- ["marginblock"]={
- ["en"]="marginblock",
- ["nl"]="margeblok",
- },
["startmarginrule"]={
["cs"]="startmarginalnilinka",
["de"]="startmarginallinie",
["en"]="startmarginrule",
- ["fr"]="demarremargereglee",
+ ["fr"]="débuttraitmarge",
["it"]="inizialineamargine",
["nl"]="startkantlijn",
["pe"]="شروع‌خط‌حاشیه",
@@ -5294,7 +5970,7 @@ return {
["cs"]="startzuzeni",
["de"]="startenger",
["en"]="startnarrower",
- ["fr"]="demarrecompoetroite",
+ ["fr"]="débutplusetroit",
["it"]="iniziapiustretto",
["nl"]="startsmaller",
["pe"]="شروع‌باریکتر",
@@ -5304,7 +5980,7 @@ return {
["cs"]="startprotejsek",
["de"]="startgegenueber",
["en"]="startopposite",
- ["fr"]="demarreopposition",
+ ["fr"]="débutopposition",
["it"]="iniziaopposto",
["nl"]="startnaast",
["pe"]="شروع‌مخالÙ",
@@ -5314,17 +5990,17 @@ return {
["cs"]="startprekryv",
["de"]="startoverlay",
["en"]="startoverlay",
- ["fr"]="demarrerevetement",
+ ["fr"]="débutsuperposition",
["it"]="iniziasovrapposizione",
["nl"]="startoverlay",
["pe"]="شروع‌پوشش",
["ro"]="startoverlay",
},
- ["startoverzicht"]={
+ ["startoverview"]={
["cs"]="startprehled",
["de"]="startueberblick",
["en"]="startoverview",
- ["fr"]="demarrevuedensemble",
+ ["fr"]="débutvuedensemble",
["it"]="iniziaoverview",
["nl"]="startoverzicht",
["pe"]="شروع‌بازبینی",
@@ -5334,7 +6010,7 @@ return {
["cs"]="startzhustene",
["de"]="startkleinerdurchschuss",
["en"]="startpacked",
- ["fr"]="demarregroupe",
+ ["fr"]="débutemballage",
["it"]="iniziaimpaccato",
["nl"]="startopelkaar",
["pe"]="شروع‌Ùشرده",
@@ -5344,7 +6020,7 @@ return {
["cs"]="startumistovani",
["de"]="startpositionieren",
["en"]="startpositioning",
- ["fr"]="demarrepositionnement",
+ ["fr"]="débutpositionnement",
["it"]="iniziaposizionamento",
["nl"]="startpositioneren",
["pe"]="شروع‌مکان‌گذاری",
@@ -5354,7 +6030,7 @@ return {
["cs"]="startprodukt",
["de"]="startprodukt",
["en"]="startproduct",
- ["fr"]="demarreproduit",
+ ["fr"]="débutproduit",
["it"]="iniziaprodotto",
["nl"]="startprodukt",
["pe"]="شروع‌تولید",
@@ -5364,7 +6040,7 @@ return {
["cs"]="startprofil",
["de"]="startprofil",
["en"]="startprofile",
- ["fr"]="demarreprofil",
+ ["fr"]="débutprofil",
["it"]="iniziaprofilo",
["nl"]="startprofiel",
["pe"]="شروع‌پروÙایل",
@@ -5374,7 +6050,7 @@ return {
["cs"]="startprojekt",
["de"]="startprojekt",
["en"]="startproject",
- ["fr"]="demarreprojet",
+ ["fr"]="débutprojet",
["it"]="iniziaprogetto",
["nl"]="startprojekt",
["pe"]="شروع‌پروژه",
@@ -5384,7 +6060,7 @@ return {
["cs"]="startcitace",
["de"]="startzitat",
["en"]="startquotation",
- ["fr"]="demarrecitation",
+ ["fr"]="débutcitation",
["it"]="iniziacitazione",
["nl"]="startcitaat",
["pe"]="شروع‌نقل‌قول",
@@ -5394,7 +6070,7 @@ return {
["cs"]="startrastr",
["de"]="startraster",
["en"]="startraster",
- ["fr"]="demarreraster",
+ ["fr"]="débutraster",
["it"]="iniziaraster",
["nl"]="startraster",
["pe"]="startraster",
@@ -5404,7 +6080,7 @@ return {
["cs"]="startsadasymbolu",
["de"]="startsymbolset",
["en"]="startsymbolset",
- ["fr"]="demarrejeusymboles",
+ ["fr"]="débutjeusymboles",
["it"]="iniziasetsimboli",
["nl"]="startsymboolset",
["pe"]="شروع‌مجموعه‌نماد",
@@ -5414,7 +6090,7 @@ return {
["cs"]="startsynchronizace",
["de"]="startsynchronisation",
["en"]="startsynchronization",
- ["fr"]="demarresynchronisation",
+ ["fr"]="débutsynchronisation",
["it"]="iniziasincronizzazione",
["nl"]="startsynchronisatie",
["pe"]="شروع‌تطابق",
@@ -5424,7 +6100,7 @@ return {
["cs"]="starttabulka",
["de"]="starttabelle",
["en"]="starttable",
- ["fr"]="demarretableau",
+ ["fr"]="débuttable",
["it"]="iniziatabella",
["nl"]="starttabel",
["pe"]="شروع‌جدول",
@@ -5434,7 +6110,7 @@ return {
["cs"]="starttabulky",
["de"]="starttabellen",
["en"]="starttables",
- ["fr"]="demarretableaux",
+ ["fr"]="débuttables",
["it"]="iniziatabelle",
["nl"]="starttabellen",
["pe"]="شروع‌جدولها",
@@ -5444,7 +6120,7 @@ return {
["cs"]="starttext",
["de"]="starttext",
["en"]="starttext",
- ["fr"]="demarretexte",
+ ["fr"]="débuttexte",
["it"]="iniziatesto",
["nl"]="starttekst",
["pe"]="شروع‌متن",
@@ -5452,17 +6128,14 @@ return {
},
["starttextbackground"]={
["en"]="starttextbackground",
+ ["fr"]="débuttextearriereplan",
["nl"]="starttekstachtergrond",
},
- ["textbackground"]={
- ["en"]="textbackground",
- ["nl"]="tekstachtergrond",
- },
["starttextrule"]={
["cs"]="starttextovalinka",
["de"]="starttextlinie",
["en"]="starttextrule",
- ["fr"]="demarreligneregleetexte",
+ ["fr"]="débuttextetrait",
["it"]="inizialineatesto",
["nl"]="starttekstlijn",
["pe"]="شروع‌خط‌متن",
@@ -5472,7 +6145,7 @@ return {
["cs"]="startnezhustene",
["de"]="startgrosserdurchschuss",
["en"]="startunpacked",
- ["fr"]="demarredegroupe",
+ ["fr"]="débutdesemballage",
["it"]="iniziaunpacked",
["nl"]="startvanelkaar",
["pe"]="شروع‌غیر‌Ùشرده",
@@ -5482,7 +6155,7 @@ return {
["cs"]="startverze",
["de"]="startversion",
["en"]="startversion",
- ["fr"]="demarreversion",
+ ["fr"]="débutversion",
["it"]="iniziaversione",
["nl"]="startversie",
["pe"]="شروع‌نسخه",
@@ -5492,7 +6165,7 @@ return {
["cs"]="stopzarovnavani",
["de"]="stopausrichtung",
["en"]="stopalignment",
- ["fr"]="stoppealignement",
+ ["fr"]="finalignement",
["it"]="terminaallineamento",
["nl"]="stopuitlijnen",
["pe"]="پایان‌تنظیم",
@@ -5502,7 +6175,7 @@ return {
["cs"]="stoppozadi",
["de"]="stophintergrund",
["en"]="stopbackground",
- ["fr"]="stoppearriereplan",
+ ["fr"]="finarriereplan",
["it"]="terminasfondo",
["nl"]="stopachtergrond",
["pe"]="پایان‌پس‌زمینه",
@@ -5512,7 +6185,7 @@ return {
["cs"]="stopkodovani",
["de"]="stopkodierung",
["en"]="stopcoding",
- ["fr"]="stoppecodage",
+ ["fr"]="fincodage",
["it"]="terminacodifica",
["nl"]="stopcodering",
["pe"]="پایان‌کد",
@@ -5522,7 +6195,7 @@ return {
["cs"]="stopbarva",
["de"]="stopfarbe",
["en"]="stopcolor",
- ["fr"]="stoppecouleur",
+ ["fr"]="fincouleur",
["it"]="terminacolore",
["nl"]="stopkleur",
["pe"]="پایان‌رنگ",
@@ -5532,7 +6205,7 @@ return {
["cs"]="stopcolumnmakeup",
["de"]="stopcolumnmakeup",
["en"]="stopcolumnmakeup",
- ["fr"]="stopcolumnmakeup",
+ ["fr"]="fincompositioncolonne",
["it"]="stopcolumnmakeup",
["nl"]="stopkolomopmaak",
["pe"]="پایان‌آرایش‌ستون",
@@ -5542,7 +6215,7 @@ return {
["cs"]="stopsloupce",
["de"]="stopspalten",
["en"]="stopcolumns",
- ["fr"]="stoppecolonnes",
+ ["fr"]="fincolonnes",
["it"]="terminacolonne",
["nl"]="stopkolommen",
["pe"]="پایان‌ستونها",
@@ -5552,7 +6225,7 @@ return {
["cs"]="stopcolumnset",
["de"]="stopcolumnset",
["en"]="stopcolumnset",
- ["fr"]="stoppejeucolonne",
+ ["fr"]="finjeucolonnes",
["it"]="terminagruppocolonne",
["nl"]="stopkolomgroep",
["pe"]="پایان‌مجموعه‌ستون",
@@ -5562,7 +6235,7 @@ return {
["cs"]="stopspojeni",
["de"]="stopkombination",
["en"]="stopcombination",
- ["fr"]="stoppecombinaison",
+ ["fr"]="fincombinaison",
["it"]="terminacombinazione",
["nl"]="stopcombinatie",
["pe"]="پایان‌ترکیب",
@@ -5572,7 +6245,7 @@ return {
["cs"]="stopkomponenta",
["de"]="stopkomponente",
["en"]="stopcomponent",
- ["fr"]="stoppecomposant",
+ ["fr"]="fincomposant",
["it"]="terminacomponente",
["nl"]="stoponderdeel",
["pe"]="پایان‌مولÙÙ‡",
@@ -5582,7 +6255,7 @@ return {
["cs"]="stopdokument",
["de"]="stopdokument",
["en"]="stopdocument",
- ["fr"]="stoppedocument",
+ ["fr"]="findocument",
["it"]="terminadocumento",
["nl"]="stopdocument",
["pe"]="پایان‌نوشتار",
@@ -5592,7 +6265,7 @@ return {
["cs"]="stopprostredi",
["de"]="stopumgebung",
["en"]="stopenvironment",
- ["fr"]="stoppeenvironement",
+ ["fr"]="finenvironnement",
["it"]="terminaambiente",
["nl"]="stopomgeving",
["pe"]="پایان‌محیط",
@@ -5600,13 +6273,14 @@ return {
},
["stopframed"]={
["en"]="stopframed",
+ ["fr"]="finencadre",
["nl"]="stopomlijnd",
},
["stopglobal"]={
["cs"]="stopglobalni",
["de"]="stopglobal",
["en"]="stopglobal",
- ["fr"]="stoppeglobal",
+ ["fr"]="finglobal",
["it"]="terminaglobale",
["nl"]="stopglobaal",
["pe"]="پایان‌سراسری",
@@ -5616,7 +6290,7 @@ return {
["cs"]="stopradek",
["de"]="stopzeile",
["en"]="stopline",
- ["fr"]="stoppeligne",
+ ["fr"]="finligneref",
["it"]="terminariga",
["nl"]="stopregel",
["pe"]="پایان‌خط",
@@ -5626,17 +6300,21 @@ return {
["cs"]="stopkorekceradku",
["de"]="stopzeilenkorrektur",
["en"]="stoplinecorrection",
- ["fr"]="stoppecorrectionligne",
+ ["fr"]="fincorrectionligne",
["it"]="terminacorrezioneriga",
["nl"]="stopregelcorrectie",
["pe"]="پایان‌تصحیح‌خط",
["ro"]="stopcorectielinie",
},
+ ["stoplinenote"]={
+ ["en"]="stoplinenote",
+ ["fr"]="finnotedeligne",
+ },
["stoplinenumbering"]={
["cs"]="stopcislovaniradku",
["de"]="stopzeilennumerierung",
["en"]="stoplinenumbering",
- ["fr"]="stoppenumerotationligne",
+ ["fr"]="finnumérotationligne",
["it"]="terminanumerazionerighe",
["nl"]="stopregelnummeren",
["pe"]="پایان‌شماره‌گذاری‌خط",
@@ -5646,7 +6324,7 @@ return {
["cs"]="stopradky",
["de"]="stopzeilen",
["en"]="stoplines",
- ["fr"]="stoppelignes",
+ ["fr"]="finlignes",
["it"]="terminarighe",
["nl"]="stopregels",
["pe"]="پایان‌خطها",
@@ -5656,7 +6334,7 @@ return {
["cs"]="stoplokalni",
["de"]="stoplokal",
["en"]="stoplocal",
- ["fr"]="stoppelocal",
+ ["fr"]="finlocal",
["it"]="terminalocale",
["nl"]="stoplokaal",
["pe"]="پایان‌موضعی",
@@ -5666,7 +6344,7 @@ return {
["cs"]="stoplokalnipoznamkypodcarou",
["de"]="stoplokalefussnoten",
["en"]="stoplocalfootnotes",
- ["fr"]="stoppenotespdplocales",
+ ["fr"]="finnotesbdplocal",
["it"]="terminanotepdplocali",
["nl"]="stoplokalevoetnoten",
["pe"]="پایان‌پانوشتهای‌موضعی",
@@ -5676,7 +6354,7 @@ return {
["cs"]="stopuprava",
["de"]="stopumbruch",
["en"]="stopmakeup",
- ["fr"]="stoppemakeup",
+ ["fr"]="fincomposition",
["it"]="terminamakeup",
["nl"]="stopopmaak",
["pe"]="پایان‌آرایش",
@@ -5686,7 +6364,7 @@ return {
["cs"]="stopmarginalniblok",
["de"]="stopmarginalblock",
["en"]="stopmarginblock",
- ["fr"]="stoppeblocmarge",
+ ["fr"]="finblocmarge",
["it"]="terminabloccomargine",
["nl"]="stopmargeblok",
["pe"]="پایان‌بلوک‌حاشیه",
@@ -5696,7 +6374,7 @@ return {
["cs"]="stopmarginalnilinka",
["de"]="stopmarginallinie",
["en"]="stopmarginrule",
- ["fr"]="stoppemargereglee",
+ ["fr"]="fintraitmarge",
["it"]="terminalineamargine",
["nl"]="stopkantlijn",
["pe"]="پایان‌خط‌حاشیه",
@@ -5706,7 +6384,7 @@ return {
["cs"]="stopzuzeni",
["de"]="stopenger",
["en"]="stopnarrower",
- ["fr"]="stopcompoetroite",
+ ["fr"]="finplusetroit",
["it"]="terminapiustretto",
["nl"]="stopsmaller",
["pe"]="پایان‌نازکتر",
@@ -5716,7 +6394,7 @@ return {
["cs"]="stopprotejsek",
["de"]="stopgegenueber",
["en"]="stopopposite",
- ["fr"]="stoppeopposition",
+ ["fr"]="finopposition",
["it"]="terminaopposto",
["nl"]="stopnaast",
["pe"]="پایان‌مخالÙ",
@@ -5726,17 +6404,17 @@ return {
["cs"]="stopprekryv",
["de"]="stopoverlay",
["en"]="stopoverlay",
- ["fr"]="stopperevetement",
+ ["fr"]="finsuperposition",
["it"]="terminasovrapposizione",
["nl"]="stopoverlay",
["pe"]="پایان‌پوشش",
["ro"]="stopoverlay",
},
- ["stopoverzicht"]={
+ ["stopoverview"]={
["cs"]="stopprehled",
["de"]="stopueberblick",
["en"]="stopoverview",
- ["fr"]="stoppevuedensemble",
+ ["fr"]="finvuedensemble",
["it"]="terminaoverview",
["nl"]="stopoverzicht",
["pe"]="پایان‌بازبینی",
@@ -5746,7 +6424,7 @@ return {
["cs"]="stopzhustene",
["de"]="stopkleinerdurchschuss",
["en"]="stoppacked",
- ["fr"]="stoppegroupe",
+ ["fr"]="finemballage",
["it"]="terminaimpaccato",
["nl"]="stopopelkaar",
["pe"]="پایان‌Ùشرده",
@@ -5756,7 +6434,7 @@ return {
["cs"]="stopumistovani",
["de"]="stoppositionieren",
["en"]="stoppositioning",
- ["fr"]="stoppepositionnement",
+ ["fr"]="finpositionnement",
["it"]="terminaposizionamento",
["nl"]="stoppositioneren",
["pe"]="پایان‌مکان‌گذاری",
@@ -5766,7 +6444,7 @@ return {
["cs"]="stopprodukt",
["de"]="stopprodukt",
["en"]="stopproduct",
- ["fr"]="stoppeproduit",
+ ["fr"]="finproduit",
["it"]="terminaprodotto",
["nl"]="stopprodukt",
["pe"]="پایان‌تولید",
@@ -5776,7 +6454,7 @@ return {
["cs"]="stopprofil",
["de"]="stopprofil",
["en"]="stopprofile",
- ["fr"]="stoppeprofil",
+ ["fr"]="finprofil",
["it"]="terminaprofili",
["nl"]="stopprofiel",
["pe"]="پایان‌پروÙایل",
@@ -5786,7 +6464,7 @@ return {
["cs"]="stopprojekt",
["de"]="stopprojekt",
["en"]="stopproject",
- ["fr"]="stoppeprojet",
+ ["fr"]="finprojet",
["it"]="terminaprogetto",
["nl"]="stopprojekt",
["pe"]="پایان‌پروژه",
@@ -5796,7 +6474,7 @@ return {
["cs"]="stopcitace",
["de"]="stopzitat",
["en"]="stopquotation",
- ["fr"]="stoppecitation",
+ ["fr"]="fincitation",
["it"]="terminacitazione",
["nl"]="stopcitaat",
["pe"]="پایان‌نقل‌قول",
@@ -5806,7 +6484,7 @@ return {
["cs"]="stoprastr",
["de"]="stopraster",
["en"]="stopraster",
- ["fr"]="stopperaster",
+ ["fr"]="finraster",
["it"]="terminaraster",
["nl"]="stopraster",
["pe"]="stopraster",
@@ -5816,7 +6494,7 @@ return {
["cs"]="stopsynchronizace",
["de"]="stopsynchronisation",
["en"]="stopsynchronization",
- ["fr"]="stoppesynchronisation",
+ ["fr"]="finsynchronisation",
["it"]="terminasincronizzazione",
["nl"]="stopsynchronisatie",
["pe"]="پایان‌تطابق",
@@ -5826,7 +6504,7 @@ return {
["cs"]="stoptabulka",
["de"]="stoptabelle",
["en"]="stoptable",
- ["fr"]="stoppetableau",
+ ["fr"]="fintable",
["it"]="terminatabella",
["nl"]="stoptabel",
["pe"]="پایان‌جدول",
@@ -5836,7 +6514,7 @@ return {
["cs"]="stoptabulky",
["de"]="stoptabellen",
["en"]="stoptables",
- ["fr"]="stoppetableaux",
+ ["fr"]="fintables",
["it"]="terminatabelle",
["nl"]="stoptabellen",
["pe"]="پایان‌جدولها",
@@ -5846,7 +6524,7 @@ return {
["cs"]="stoptext",
["de"]="stoptext",
["en"]="stoptext",
- ["fr"]="stoppetexte",
+ ["fr"]="fintexte",
["it"]="terminatesto",
["nl"]="stoptekst",
["pe"]="پایان‌متن",
@@ -5854,13 +6532,14 @@ return {
},
["stoptextbackground"]={
["en"]="stoptextbackground",
+ ["fr"]="fintextearriereplan",
["nl"]="stoptekstachtergrond",
},
["stoptextrule"]={
["cs"]="stoptextovalinka",
["de"]="stoptextlinie",
["en"]="stoptextrule",
- ["fr"]="stoppeligneregleetexte",
+ ["fr"]="fintextetrait",
["it"]="terminalineatesto",
["nl"]="stoptekstlijn",
["pe"]="پایان‌خط‌متن",
@@ -5870,7 +6549,7 @@ return {
["cs"]="stopnezhustene",
["de"]="stopgrosserdurchschuss",
["en"]="stopunpacked",
- ["fr"]="stoppedegroupe",
+ ["fr"]="findesemballage",
["it"]="terminaunpacked",
["nl"]="stopvanelkaar",
["pe"]="پایان‌غیرÙشرده",
@@ -5880,7 +6559,7 @@ return {
["cs"]="stopverze",
["de"]="stopversion",
["en"]="stopversion",
- ["fr"]="stoppeversion",
+ ["fr"]="finversion",
["it"]="terminaversioni",
["nl"]="stopversie",
["pe"]="پایان‌نسخه",
@@ -5896,6 +6575,14 @@ return {
["pe"]="کشیده",
["ro"]="intins",
},
+ ["strictinspectnextcharacter"]={
+ ["en"]="strictinspectnextcharacter",
+ ["fr"]="inspecterstrictementcaracteresuivant",
+ },
+ ["stripcharacter"]={
+ ["en"]="stripcharacter",
+ ["fr"]="demontercaractere",
+ },
["subformulanumber"]={
["cs"]="cislopodrovnice",
["de"]="unterformelnummer",
@@ -5910,17 +6597,21 @@ return {
["cs"]="subpagenumber",
["de"]="subpagenumber",
["en"]="subpagenumber",
- ["fr"]="sousnumeropage",
+ ["fr"]="numerosouspage",
["it"]="subpagenumber",
["nl"]="subpaginanummer",
["pe"]="شماره‌زیرصÙحه",
["ro"]="subpagenumber",
},
+ ["subtractfeature"]={
+ ["en"]="subtractfeature",
+ ["fr"]="enleverfonctionnalite",
+ },
["switchtobodyfont"]={
["cs"]="prepninazakladnifont",
["de"]="wechselezumfliesstext",
["en"]="switchtobodyfont",
- ["fr"]="changepolicecorps",
+ ["fr"]="passerapolicedecorps",
["it"]="cambiaafontdeltesto",
["nl"]="switchnaarkorps",
["pe"]="تغییربه‌قلم‌بدنه",
@@ -5930,7 +6621,7 @@ return {
["cs"]="switchtorawfont",
["de"]="switchtorawfont",
["en"]="switchtorawfont",
- ["fr"]="changepolicebrute",
+ ["fr"]="passerapolicebrute",
["it"]="passaafontgrezzo",
["nl"]="switchtorawfont",
["pe"]="تغییربه‌قلم‌خام",
@@ -5958,6 +6649,7 @@ return {
},
["symoffset"]={
["en"]="symoffset",
+ ["fr"]="decalagesym",
["nl"]="symoffset",
},
["synchronizationbar"]={
@@ -5974,7 +6666,7 @@ return {
["cs"]="synchronizovat",
["de"]="synchronisieren",
["en"]="synchronize",
- ["fr"]="synchronise",
+ ["fr"]="synchroniser",
["it"]="sincronizza",
["nl"]="synchroniseer",
["pe"]="تطابق",
@@ -5994,12 +6686,20 @@ return {
["cs"]="testcolumn",
["de"]="testcolumn",
["en"]="testcolumn",
- ["fr"]="testcolumn",
+ ["fr"]="testcolonne",
["it"]="testcolumn",
["nl"]="testkolom",
["pe"]="ستون‌امتحان",
["ro"]="testcolumn",
},
+ ["testfeature"]={
+ ["en"]="testfeature",
+ ["fr"]="testerfonctionnalite",
+ },
+ ["testfeatureonce"]={
+ ["en"]="testfeatureonce",
+ ["fr"]="testerfonctionnaliteunfois",
+ },
["testpage"]={
["cs"]="testpage",
["de"]="testpage",
@@ -6020,6 +6720,15 @@ return {
["pe"]="تک",
["ro"]="tex",
},
+ ["textbackground"]={
+ ["en"]="textbackground",
+ ["fr"]="textearriereplan",
+ ["nl"]="tekstachtergrond",
+ },
+ ["textcolor"]={
+ ["en"]="textcolor",
+ ["fr"]="textecouleura",
+ },
["textheight"]={
["cs"]="vyskatextu",
["de"]="texthoehe",
@@ -6030,6 +6739,10 @@ return {
["pe"]="ارتÙاع‌متن",
["ro"]="inaltimetext",
},
+ ["textnote"]={
+ ["en"]="textnote",
+ ["fr"]="notetexte",
+ },
["textreference"]={
["cs"]="odkaznatext",
["de"]="textreferenz",
@@ -6044,7 +6757,7 @@ return {
["cs"]="textovalinka",
["de"]="textlinie",
["en"]="textrule",
- ["fr"]="ligneregleetexte",
+ ["fr"]="traittexte",
["it"]="lineatesto",
["nl"]="tekstlijn",
["pe"]="خط‌متن",
@@ -6070,6 +6783,18 @@ return {
["pe"]="عرض‌متن",
["ro"]="latimetext",
},
+ ["thefirstcharacter"]={
+ ["en"]="thefirstcharacter",
+ ["fr"]="lepremiercaractere",
+ },
+ ["thenormalizedbodyfontsize"]={
+ ["en"]="thenormalizedbodyfontsize",
+ ["fr"]="lataillenormaliseepolicedecorps",
+ },
+ ["theremainingcharacters"]={
+ ["en"]="theremainingcharacters",
+ ["fr"]="lescaracteresrestants",
+ },
["thinrule"]={
["cs"]="tenkalinka",
["de"]="duennelinie",
@@ -6090,11 +6815,15 @@ return {
["pe"]="خطهای‌نازک",
["ro"]="liniisubtiri",
},
+ ["tolinenote"]={
+ ["en"]="tolinenote",
+ ["fr"]="alanotedeligne",
+ },
["tooltip"]={
["cs"]="bublinkovanapoveda",
["de"]="tooltip",
["en"]="tooltip",
- ["fr"]="suggestion",
+ ["fr"]="infobulle",
["it"]="tooltip",
["nl"]="suggestie",
["pe"]="tooltip",
@@ -6104,7 +6833,7 @@ return {
["cs"]="vzdalenosthorejsku",
["de"]="abstandoben",
["en"]="topdistance",
- ["fr"]="distancesup",
+ ["fr"]="distancehaut",
["it"]="distanzacima",
["nl"]="bovenafstand",
["pe"]="Ùاصله‌بالا",
@@ -6114,7 +6843,7 @@ return {
["cs"]="vyskahorejsku",
["de"]="hoeheoben",
["en"]="topheight",
- ["fr"]="hauteursup",
+ ["fr"]="hauteurhaut",
["it"]="altezzacima",
["nl"]="bovenhoogte",
["pe"]="ارتÙاع‌بالا",
@@ -6124,7 +6853,7 @@ return {
["cs"]="odsazenishora",
["de"]="kopfweite",
["en"]="topspace",
- ["fr"]="espacesup",
+ ["fr"]="espacehaut",
["it"]="spaziocima",
["nl"]="kopwit",
["pe"]="Ùضای‌بالا",
@@ -6164,7 +6893,7 @@ return {
["cs"]="pis",
["de"]="tip",
["en"]="typ",
- ["fr"]="typ",
+ ["fr"]="transcrireaveccesure",
["it"]="typ",
["nl"]="typ",
["pe"]="typ",
@@ -6174,7 +6903,7 @@ return {
["cs"]="opis",
["de"]="tippen",
["en"]="type",
- ["fr"]="dactylographier",
+ ["fr"]="transcrire",
["it"]="type",
["nl"]="type",
["pe"]="تایپ",
@@ -6184,27 +6913,39 @@ return {
["cs"]="typebuffer",
["de"]="tippepuffer",
["en"]="typebuffer",
- ["fr"]="tapebuffer",
+ ["fr"]="transcriretampon",
["it"]="typebuffer",
["nl"]="typebuffer",
["pe"]="تایپ‌باÙر",
["ro"]="scriebuffer",
},
+ ["typedefinedbuffer"]={
+ ["en"]="typedefinedbuffer",
+ ["fr"]="transcriretampondefini",
+ },
["typefile"]={
["cs"]="opissoubor",
["de"]="tippedatei",
["en"]="typefile",
- ["fr"]="fichierdactylo",
+ ["fr"]="transcrirefichier",
["it"]="typefile",
["nl"]="typefile",
["pe"]="تایپ‌پرونده",
["ro"]="typefile",
},
+ ["typeinlinebuffer"]={
+ ["en"]="typeinlinebuffer",
+ ["fr"]="transcriretamponenligne",
+ },
+ ["typing"]={
+ ["en"]="typing",
+ ["fr"]="transcription",
+ },
["unitmeaning"]={
["cs"]="vyznam",
["de"]="bedeutung",
["en"]="unitmeaning",
- ["fr"]="sensunite",
+ ["fr"]="significationunite",
["it"]="nomeunita",
["nl"]="betekenis",
["pe"]="معنی‌واحد",
@@ -6220,11 +6961,15 @@ return {
["pe"]="ناشناس",
["ro"]="necunoscut",
},
+ ["unregisterhyphenationpattern"]={
+ ["en"]="unregisterhyphenationpattern",
+ ["fr"]="desenregistrermotifcesure",
+ },
["useJSscripts"]={
["cs"]="uzijJSscripts",
["de"]="verwendeJSscript",
["en"]="useJSscripts",
- ["fr"]="utiliseJSscripts",
+ ["fr"]="utiliserJSscript",
["it"]="usaJSscripts",
["nl"]="gebruikJSscripts",
["pe"]="useJSscripts",
@@ -6234,7 +6979,7 @@ return {
["cs"]="uzijURL",
["de"]="verwendeURL",
["en"]="useURL",
- ["fr"]="utiliseURL",
+ ["fr"]="utiliserURL",
["it"]="usaURL",
["nl"]="gebruikURL",
["pe"]="useURL",
@@ -6244,7 +6989,7 @@ return {
["cs"]="useXMLfilter",
["de"]="useXMLfilter",
["en"]="useXMLfilter",
- ["fr"]="useXMLfilter",
+ ["fr"]="utiliserfiltreXML",
["it"]="useXMLfilter",
["nl"]="gebruikXMLfilter",
["pe"]="useXMLfilter",
@@ -6254,17 +6999,25 @@ return {
["cs"]="uzijbloky",
["de"]="verwendebloecke",
["en"]="useblocks",
- ["fr"]="utiliseblocs",
+ ["fr"]="utiliserblocs",
["it"]="usablocco",
["nl"]="gebruikblokken",
["pe"]="استÙاده‌بلوکها",
["ro"]="folosestebloc",
},
+ ["usebodyfont"]={
+ ["en"]="usebodyfont",
+ ["fr"]="utiliserpolicedecorps",
+ },
+ ["usebodyfontparameter"]={
+ ["en"]="usebodyfontparameter",
+ ["fr"]="utiliserparametrepolicedecorps",
+ },
["usecommands"]={
["cs"]="uzijprikazy",
["de"]="verwendebefehl",
["en"]="usecommands",
- ["fr"]="utilisecommandes",
+ ["fr"]="utilisercommandes",
["it"]="usacomandi",
["nl"]="gebruikcommandos",
["pe"]="استÙاده‌Ùرمانها",
@@ -6274,7 +7027,7 @@ return {
["cs"]="uzijkodovani",
["de"]="benutzekodierung",
["en"]="useencoding",
- ["fr"]="utiliseencodage",
+ ["fr"]="utilisercodage",
["it"]="usacodifica",
["nl"]="usecodering",
["pe"]="استÙاده‌رمزینه",
@@ -6284,7 +7037,7 @@ return {
["cs"]="uzijexternidokument",
["de"]="verwendeexteresdokument",
["en"]="useexternaldocument",
- ["fr"]="utilisedocumentexterne",
+ ["fr"]="utiliserdocumentexterne",
["it"]="usadocumentoesterno",
["nl"]="gebruikexterndocument",
["pe"]="استÙاده‌نوشتارخارجی",
@@ -6294,7 +7047,7 @@ return {
["cs"]="uzijexterniobraz",
["de"]="verwendeexterneabbildung",
["en"]="useexternalfigure",
- ["fr"]="utilisefigureexterne",
+ ["fr"]="utiliserfigureexterne",
["it"]="usafiguraesterna",
["nl"]="gebruikexternfiguur",
["pe"]="استÙاده‌شکل‌خارجی",
@@ -6304,7 +7057,7 @@ return {
["cs"]="uzijexternisoubor",
["de"]="verwendeexternedatei",
["en"]="useexternalfile",
- ["fr"]="utilisefichierexterne",
+ ["fr"]="utiliserfichierexterne",
["it"]="usafileesterno",
["nl"]="gebruikexternefile",
["pe"]="استÙاده‌پرونده‌خارجی",
@@ -6314,7 +7067,7 @@ return {
["cs"]="uzijexternisoubory",
["de"]="verwendeexternedateien",
["en"]="useexternalfiles",
- ["fr"]="utilisefichiersexternes",
+ ["fr"]="utiliserfichiersexternes",
["it"]="usafileesterni",
["nl"]="gebruikexternefiles",
["pe"]="استÙاده‌پرونده‌های‌خارجی",
@@ -6324,7 +7077,7 @@ return {
["cs"]="uzijexternizvuk",
["de"]="verwendeexternestonstueck",
["en"]="useexternalsoundtrack",
- ["fr"]="utilisepsiteaudioexterne",
+ ["fr"]="utilisersonexterne",
["it"]="usacolonnasonoraesterna",
["nl"]="gebruikexterngeluidsfragment",
["pe"]="استÙاده‌قطعه‌موزیک‌خارجی",
@@ -6334,7 +7087,7 @@ return {
["cs"]="uzijmodul",
["de"]="verwendemodul",
["en"]="usemodule",
- ["fr"]="utilisemodule",
+ ["fr"]="utilisermodule",
["it"]="usamodulo",
["nl"]="gebruikmodule",
["pe"]="استÙاده‌مدول",
@@ -6344,7 +7097,7 @@ return {
["cs"]="uzijmoduly",
["de"]="verwendemodule",
["en"]="usemodules",
- ["fr"]="utilisemodules",
+ ["fr"]="utilisermodules",
["it"]="usamoduli",
["nl"]="gebruikmodules",
["pe"]="استÙاده‌مدولها",
@@ -6354,7 +7107,7 @@ return {
["cs"]="uzijadresar",
["de"]="benutzeverzeichnis",
["en"]="usedirectory",
- ["fr"]="utilisechemin",
+ ["fr"]="utiliserchemin",
["it"]="usacartella",
["nl"]="gebruikpad",
["pe"]="استÙاده‌مسیر",
@@ -6364,7 +7117,7 @@ return {
["cs"]="uzijodkazy",
["de"]="verwendereferenzen",
["en"]="usereferences",
- ["fr"]="utilisereferences",
+ ["fr"]="utiliserreferences",
["it"]="usariferimenti",
["nl"]="gebruikreferenties",
["pe"]="استÙاده‌مرجعها",
@@ -6374,7 +7127,7 @@ return {
["cs"]="uzijspeciality",
["de"]="benutzespezielles",
["en"]="usespecials",
- ["fr"]="utilisespecialites",
+ ["fr"]="utiliserspeciaux",
["it"]="usaspecialita",
["nl"]="gebruikspecials",
["pe"]="استÙاده‌ویژگیها",
@@ -6384,7 +7137,7 @@ return {
["cs"]="uzijsymbol",
["de"]="verwendesymbole",
["en"]="usesymbols",
- ["fr"]="utilisesymboles",
+ ["fr"]="utilisersymboles",
["it"]="usasimboli",
["nl"]="gebruiksymbolen",
["pe"]="استÙاده‌نمادها",
@@ -6394,7 +7147,7 @@ return {
["cs"]="usetypescript",
["de"]="usetypescript",
["en"]="usetypescript",
- ["fr"]="usetypescript",
+ ["fr"]="utiliserscriptdepolices",
["it"]="usetypescript",
["nl"]="gebruiktypescript",
["pe"]="استÙاده‌دستخط‌تایپ",
@@ -6404,6 +7157,7 @@ return {
["cs"]="usetypescriptfile",
["de"]="usetypescriptfile",
["en"]="usetypescriptfile",
+ ["fr"]="utiliserfichierscriptdepolices",
["it"]="usetypescriptfile",
["nl"]="gebruiktypescriptfile",
["pe"]="استÙاده‌پرونده‌دستخط‌تایپ",
@@ -6413,12 +7167,16 @@ return {
["cs"]="uzijurl",
["de"]="verwendeurl",
["en"]="useurl",
- ["fr"]="utiliseurl",
+ ["fr"]="utiliserurl",
["it"]="usaurl",
["nl"]="gebruikurl",
["pe"]="useurl",
["ro"]="folosesteurl",
},
+ ["verbatim"]={
+ ["en"]="verbatim",
+ ["fr"]="verbatim",
+ },
["version"]={
["cs"]="verze",
["de"]="version",
@@ -6433,7 +7191,7 @@ return {
["cs"]="vl",
["de"]="vl",
["en"]="vl",
- ["fr"]="vl",
+ ["fr"]="lv",
["it"]="vl",
["nl"]="vl",
["pe"]="خ‌ع",
@@ -6459,11 +7217,15 @@ return {
["pe"]="Ùضای‌سÙید",
["ro"]="spatiualb",
},
+ ["widthspanningtext"]={
+ ["en"]="widthspanningtext",
+ ["fr"]="largeurtextecouvrant",
+ },
["wordright"]={
["cs"]="slovovpravo",
["de"]="wortrechts",
["en"]="wordright",
- ["fr"]="motdroit",
+ ["fr"]="ecrireadroite",
["it"]="paroladestra",
["nl"]="woordrechts",
["pe"]="کلمه‌راست",
@@ -6473,7 +7235,7 @@ return {
["cs"]="zapismeziseznam",
["de"]="schreibezwischenliste",
["en"]="writebetweenlist",
- ["fr"]="ecritentreliste",
+ ["fr"]="ecrireentreliste",
["it"]="scrividentroelenco",
["nl"]="schrijftussenlijst",
["pe"]="بنویس‌بین‌لیست",
@@ -6483,7 +7245,7 @@ return {
["cs"]="zapisdoseznamu",
["de"]="schreibezurliste",
["en"]="writetolist",
- ["fr"]="ecritdansliste",
+ ["fr"]="ecriredansliste",
["it"]="scriviinelenco",
["nl"]="schrijfnaarlijst",
["pe"]="بنویس‌در‌لیست",
@@ -6493,7 +7255,7 @@ return {
["cs"]="zapisdoseznamuodkazu",
["de"]="schreibezurreferenzliste",
["en"]="writetoreferencelist",
- ["fr"]="ecritdanslistereference",
+ ["fr"]="ecriredanslistereference",
["it"]="scriviinlistariferimenti",
["nl"]="schrijfnaarreferentielijst",
["pe"]="بنویس‌درلیست‌مرجع",
@@ -6503,7 +7265,7 @@ return {
["cs"]="zapisdorejstriku",
["de"]="schreibezumregister",
["en"]="writetoregister",
- ["fr"]="ecritregistre",
+ ["fr"]="ecriredansregistre",
["it"]="scriviinregistro",
["nl"]="schrijfnaarregister",
["pe"]="بنویس‌درثبت",
@@ -6511,10 +7273,6 @@ return {
},
},
["constants"]={
- ["fractions"]={
- ["en"]="fractions",
- ["nl"]="breuken",
- },
["action"]={
["cs"]="akce",
["de"]="aktion",
@@ -6539,7 +7297,7 @@ return {
["cs"]="po",
["de"]="nach",
["en"]="after",
- ["fr"]="apres",
+ ["fr"]="après",
["it"]="dopo",
["nl"]="na",
["pe"]="بعداز",
@@ -6549,7 +7307,7 @@ return {
["cs"]="pohlavicce",
["de"]="nachkopf",
["en"]="afterhead",
- ["fr"]="aprestete",
+ ["fr"]="aprèstête",
["it"]="dopotesta",
["nl"]="kopna",
["pe"]="بعدازسر",
@@ -6559,7 +7317,7 @@ return {
["cs"]="klavesapo",
["de"]="nachtaste",
["en"]="afterkey",
- ["fr"]="aprescle",
+ ["fr"]="aprèsclé",
["it"]="dopotasto",
["nl"]="natoets",
["pe"]="بعدازکلید",
@@ -6567,58 +7325,68 @@ return {
},
["aftersection"]={
["en"]="aftersection",
+ ["fr"]="aprèssection",
["nl"]="nasectie",
},
["align"]={
["cs"]="zarovnani",
["de"]="ausrichtung",
["en"]="align",
- ["fr"]="alignement",
+ ["fr"]="aligner",
["it"]="allinea",
["nl"]="uitlijnen",
["pe"]="تنظیم",
["ro"]="aliniere",
},
+ ["alignbottom"]={
+ ["en"]="alignbottom",
+ ["fr"]="alignerbas",
+ },
["aligncharacter"]={
["cs"]="aligncharacter",
["de"]="aligncharacter",
["en"]="aligncharacter",
- ["fr"]="caracterealigne",
+ ["fr"]="alignersurcaractere",
["it"]="allineacarattere",
["nl"]="karakteruitlijnen",
["pe"]="حرÙ‌تنظیم",
["ro"]="aliniazacaracter",
},
- ["alignmentleftwidth"]={
- ["en"]="alignmentleftwidth",
- },
- ["alignmentrightwidth"]={
- ["en"]="alignmentrightwidth",
- },
- ["alignmentleftsample"]={
- ["en"]="alignmentleftsample",
- },
- ["alignmentrightsample"]={
- ["en"]="alignmentrightsample",
- },
["alignmentcharacter"]={
["cs"]="alignmentcharacter",
["de"]="alignmentcharacter",
["en"]="alignmentcharacter",
- ["fr"]="alignementcaractere",
+ ["fr"]="caracterealignement",
["it"]="carattereallineamento",
["nl"]="uitlijnkarakter",
["pe"]="حرÙ‌تنظیم‌کردن",
["ro"]="alierecaracter",
},
+ ["alignmentleftsample"]={
+ ["en"]="alignmentleftsample",
+ ["fr"]="echantillongauchealignement",
+ },
+ ["alignmentleftwidth"]={
+ ["en"]="alignmentleftwidth",
+ ["fr"]="largeurgauchealignement",
+ },
+ ["alignmentrightsample"]={
+ ["en"]="alignmentrightsample",
+ ["fr"]="echantillondroitealignement",
+ },
+ ["alignmentrightwidth"]={
+ ["en"]="alignmentrightwidth",
+ ["fr"]="largeurdroitealignement",
+ },
["alignsymbol"]={
["en"]="alignsymbol",
+ ["fr"]="alignersursymbol",
},
["aligntitle"]={
["cs"]="zarovnejtitul",
["de"]="titelausrichten",
["en"]="aligntitle",
- ["fr"]="alignementtitre",
+ ["fr"]="alignersurtitre",
["it"]="allineatitolo",
["nl"]="titeluitlijnen",
["pe"]="عنوان‌تنظیم",
@@ -6628,22 +7396,25 @@ return {
["cs"]="alternativa",
["de"]="alternative",
["en"]="alternative",
- ["fr"]="alternative",
+ ["fr"]="variante",
["it"]="alternativa",
["nl"]="variant",
["pe"]="جایگزین",
["ro"]="alternativ",
},
- ["stylealternative"]={
- ["en"]="stylealternative",
- ["nl"]="stylevariant",
- },
["anchor"]={
["en"]="anchor",
+ ["fr"]="ancre",
["nl"]="anker",
},
+ ["anchoring"]={
+ ["en"]="anchoring",
+ ["fr"]="ancrage",
+ ["nl"]="verankering",
+ },
["andtext"]={
["en"]="andtext",
+ ["fr"]="ettexte",
},
["apa"]={
["cs"]="apa",
@@ -6657,6 +7428,7 @@ return {
},
["arguments"]={
["en"]="arguments",
+ ["fr"]="arguments",
["nl"]="argumenten",
},
["arrow"]={
@@ -6671,24 +7443,29 @@ return {
},
["artauthor"]={
["en"]="artauthor",
+ ["fr"]="artauteur",
},
["artauthoretaldisplay"]={
["en"]="artauthoretaldisplay",
+ ["fr"]="artauteuretalaffichage",
},
["artauthoretallimit"]={
["en"]="artauthoretallimit",
+ ["fr"]="artauteuretallimite",
},
["artauthoretaltext"]={
["en"]="artauthoretaltext",
+ ["fr"]="artauteuretaltexte",
},
["artoffset"]={
["en"]="artoffset",
+ ["fr"]="artdecalage",
},
["at"]={
["cs"]="u",
["de"]="bei",
["en"]="at",
- ["fr"]="a",
+ ["fr"]="en",
["it"]="ad",
["nl"]="op",
["pe"]="در",
@@ -6706,15 +7483,19 @@ return {
},
["authorconversion"]={
["en"]="authorconversion",
+ ["fr"]="auteurconversion",
},
["authoretaldisplay"]={
["en"]="authoretaldisplay",
+ ["fr"]="auteuretalaffichage",
},
["authoretallimit"]={
["en"]="authoretallimit",
+ ["fr"]="auteuretallimite",
},
["authoretaltext"]={
["en"]="authoretaltext",
+ ["fr"]="auteuretaltexte",
},
["auto"]={
["cs"]="auto",
@@ -6728,13 +7509,14 @@ return {
},
["autocase"]={
["en"]="autocase",
+ ["fr"]="autocase",
["nl"]="autocase",
},
["autofile"]={
["cs"]="autofile",
["de"]="autofile",
["en"]="autofile",
- ["fr"]="autofile",
+ ["fr"]="autofichier",
["it"]="autofile",
["nl"]="autofile",
["pe"]="پرونده‌خودکار",
@@ -6754,7 +7536,7 @@ return {
["cs"]="autohang",
["de"]="autohang",
["en"]="autohang",
- ["fr"]="autohang",
+ ["fr"]="autosuspendre",
["it"]="autohang",
["nl"]="autohang",
["pe"]="آویزان‌خودکار",
@@ -6764,7 +7546,7 @@ return {
["cs"]="autostrut",
["de"]="autostrut",
["en"]="autostrut",
- ["fr"]="autostrut",
+ ["fr"]="autoentretoise",
["it"]="autostrut",
["nl"]="autostrut",
["pe"]="بست‌خودکار",
@@ -6782,10 +7564,12 @@ return {
},
["availableheight"]={
["en"]="availableheight",
+ ["fr"]="hauteurdisponible",
["nl"]="beschikbarehoogte",
},
["availablewidth"]={
["en"]="availablewidth",
+ ["fr"]="largeurdisponible",
["nl"]="beschikbarebreedte",
},
["axis"]={
@@ -6870,13 +7654,14 @@ return {
},
["backreference"]={
["en"]="backreference",
+ ["fr"]="retroreference",
["nl"]="terugreferentie",
},
["backspace"]={
["cs"]="zpetnamezera",
["de"]="rumpfspatium",
["en"]="backspace",
- ["fr"]="retour",
+ ["fr"]="espacearrière",
["it"]="backspace",
["nl"]="rugwit",
["pe"]="Ùضای‌پس",
@@ -6886,7 +7671,7 @@ return {
["cs"]="rovnovaha",
["de"]="ausgleichen",
["en"]="balance",
- ["fr"]="equilibre",
+ ["fr"]="equilibrer",
["it"]="bilanciamento",
["nl"]="balanceren",
["pe"]="تعادل",
@@ -6914,13 +7699,14 @@ return {
},
["beforesection"]={
["en"]="beforesection",
+ ["fr"]="avantsection",
["nl"]="voorsectie",
},
["bet"]={
["cs"]="bet",
["de"]="bet",
["en"]="bet",
- ["fr"]="bet",
+ ["fr"]="suj",
["it"]="bet",
["nl"]="bet",
["pe"]="bet",
@@ -6928,12 +7714,13 @@ return {
},
["bidi"]={
["en"]="bidi",
+ ["fr"]="bidi",
},
["big"]={
["cs"]="velky",
["de"]="gross",
["en"]="big",
- ["fr"]="grand",
+ ["fr"]="important",
["it"]="grande",
["nl"]="groot",
["pe"]="بزرگ",
@@ -6943,7 +7730,7 @@ return {
["cs"]="prazdny",
["de"]="blanko",
["en"]="blank",
- ["fr"]="vide",
+ ["fr"]="vierge",
["it"]="rigovuoto",
["nl"]="blanko",
["pe"]="خالی",
@@ -6951,12 +7738,13 @@ return {
},
["bleedoffset"]={
["en"]="bleedoffset",
+ ["fr"]="decalagefuite",
},
["blockway"]={
["cs"]="dobloku",
["de"]="blockauf",
["en"]="blockway",
- ["fr"]="blockway",
+ ["fr"]="faconbloc",
["it"]="blockway",
["nl"]="blokwijze",
["pe"]="راه‌بلوک",
@@ -6966,7 +7754,7 @@ return {
["cs"]="zakladnifont",
["de"]="fliesstext",
["en"]="bodyfont",
- ["fr"]="policecorps",
+ ["fr"]="policedecorps",
["it"]="fonttesto",
["nl"]="korps",
["pe"]="قلم‌بدنه",
@@ -6974,24 +7762,31 @@ return {
},
["boffset"]={
["en"]="boffset",
+ ["fr"]="decalageb",
},
["boldfeatures"]={
["en"]="boldfeatures",
+ ["fr"]="fonctionnalitesgras",
},
["boldfont"]={
["en"]="boldfont",
+ ["fr"]="policegras",
},
["bolditalicfeatures"]={
["en"]="bolditalicfeatures",
+ ["fr"]="fonctionnalitesgrasitalique",
},
["bolditalicfont"]={
["en"]="bolditalicfont",
+ ["fr"]="policegrasitalique",
},
["boldslantedfeatures"]={
["en"]="boldslantedfeatures",
+ ["fr"]="fonctionnalitesgrasincline",
},
["boldslantedfont"]={
["en"]="boldslantedfont",
+ ["fr"]="policegrasincline",
},
["bookmark"]={
["cs"]="zalozka",
@@ -7007,7 +7802,7 @@ return {
["cs"]="spodek",
["de"]="unten",
["en"]="bottom",
- ["fr"]="inf",
+ ["fr"]="bas",
["it"]="fondo",
["nl"]="onder",
["pe"]="پایین",
@@ -7015,19 +7810,22 @@ return {
},
["bottomafter"]={
["en"]="bottomafter",
+ ["fr"]="basaprès",
},
["bottombefore"]={
["en"]="bottombefore",
+ ["fr"]="basavant",
},
["bottomcommand"]={
["en"]="bottomcommand",
+ ["fr"]="commandebas",
["nl"]="ondercommando",
},
["bottomdistance"]={
["cs"]="vzdalenostspodku",
["de"]="abstandunten",
["en"]="bottomdistance",
- ["fr"]="distanceinf",
+ ["fr"]="distancebas",
["it"]="distanzafondo",
["nl"]="onderafstand",
["pe"]="Ùاصله‌پایین",
@@ -7037,7 +7835,7 @@ return {
["cs"]="ramecekdole",
["de"]="untenrahmen",
["en"]="bottomframe",
- ["fr"]="cadreinf",
+ ["fr"]="cadrebas",
["it"]="cornicefondo",
["nl"]="onderkader",
["pe"]="قالب‌پایین",
@@ -7047,7 +7845,7 @@ return {
["cs"]="offsetspodku",
["de"]="untenoffset",
["en"]="bottomoffset",
- ["fr"]="decalageinf",
+ ["fr"]="decalagebas",
["it"]="offsetfondo",
["nl"]="onderoffset",
["pe"]="Ø¢Ùست‌پایین",
@@ -7057,7 +7855,7 @@ return {
["cs"]="bottomspace",
["de"]="bottomspace",
["en"]="bottomspace",
- ["fr"]="espaceinf",
+ ["fr"]="espacebas",
["it"]="spaziofondo",
["nl"]="bodemwit",
["pe"]="Ùضای‌پایین",
@@ -7067,7 +7865,7 @@ return {
["cs"]="statusspodku",
["de"]="untenstatus",
["en"]="bottomstate",
- ["fr"]="etatinf",
+ ["fr"]="etatbas",
["it"]="statofondo",
["nl"]="onderstatus",
["pe"]="وضعیت‌پایین",
@@ -7075,17 +7873,19 @@ return {
},
["break"]={
["en"]="break",
+ ["fr"]="saut",
["nl"]="break",
},
["buffer"]={
["en"]="buffer",
+ ["fr"]="tampon",
["nl"]="buffer",
},
["cache"]={
["cs"]="cache",
["de"]="cache",
["en"]="cache",
- ["fr"]="cache",
+ ["fr"]="memoirecache",
["it"]="cache",
["nl"]="cache",
["pe"]="میانگیر",
@@ -7103,13 +7903,14 @@ return {
},
["category"]={
["en"]="category",
+ ["fr"]="categorie",
["nl"]="categorie",
},
["ccommand"]={
["cs"]="cprikaz",
["de"]="cbefehl",
["en"]="ccommand",
- ["fr"]="ccommande",
+ ["fr"]="commandec",
["it"]="ccomando",
["nl"]="ccommando",
["pe"]="Ùرمان",
@@ -7117,12 +7918,15 @@ return {
},
["character"]={
["en"]="character",
+ ["fr"]="caractere",
},
["characters"]={
["en"]="characters",
+ ["fr"]="caracteres",
},
["check"]={
["en"]="check",
+ ["fr"]="verifier",
},
["click"]={
["cs"]="klik",
@@ -7158,7 +7962,7 @@ return {
["cs"]="clipoffset",
["de"]="clipoffset",
["en"]="clipoffset",
- ["fr"]="clipoffset",
+ ["fr"]="decalagedecoupe",
["it"]="clipoffset",
["nl"]="clipoffset",
["pe"]="Ø¢Ùست‌کلیپ",
@@ -7168,7 +7972,7 @@ return {
["cs"]="zavriakci",
["de"]="schliessenaktion",
["en"]="closeaction",
- ["fr"]="actionfermeture",
+ ["fr"]="fermeraction",
["it"]="azionechiudi",
["nl"]="sluitactie",
["pe"]="بستن‌کنش",
@@ -7178,7 +7982,7 @@ return {
["cs"]="closecommand",
["de"]="closecommand",
["en"]="closecommand",
- ["fr"]="closecommand",
+ ["fr"]="fermercommande",
["it"]="closecommand",
["nl"]="sluitcommando",
["pe"]="بستن‌Ùرمان",
@@ -7186,13 +7990,14 @@ return {
},
["closepage"]={
["en"]="closepage",
+ ["fr"]="fermerpage",
["nl"]="sluitpagina",
},
["closepageaction"]={
["cs"]="akcezavrenistranky",
["de"]="closepageaction",
["en"]="closepageaction",
- ["fr"]="actionfermeturepage",
+ ["fr"]="fermeractionpage",
["it"]="azionechiudipagina",
["nl"]="sluitpaginaactie",
["pe"]="بستن‌عمل‌صÙحه",
@@ -7202,7 +8007,7 @@ return {
["cs"]="closesymbol",
["de"]="closesymbol",
["en"]="closesymbol",
- ["fr"]="closesymbol",
+ ["fr"]="fermersymbol",
["it"]="closesymbol",
["nl"]="sluitsymbool",
["pe"]="بستن‌نماد",
@@ -7250,6 +8055,7 @@ return {
},
["comma"]={
["en"]="comma",
+ ["fr"]="virgule",
},
["command"]={
["cs"]="prikaz",
@@ -7265,7 +8071,7 @@ return {
["cs"]="prikazpo",
["de"]="zumbefehl",
["en"]="commandafter",
- ["fr"]="commandeapres",
+ ["fr"]="commandeaprès",
["it"]="comdandodopo",
["nl"]="nacommando",
["pe"]="Ùرمان‌بعداز",
@@ -7293,15 +8099,19 @@ return {
},
["comment"]={
["en"]="comment",
+ ["fr"]="commentaire",
},
["commentchar"]={
["en"]="commentchar",
+ ["fr"]="caracommentaire",
},
["commentoffset"]={
["en"]="commentoffset",
+ ["fr"]="decalagecommentaire",
},
["compact"]={
["en"]="compact",
+ ["fr"]="compact",
["nl"]="compact",
},
["component"]={
@@ -7318,7 +8128,7 @@ return {
["cs"]="compoundhyphen",
["de"]="compoundhyphen",
["en"]="compoundhyphen",
- ["fr"]="compoundhyphen",
+ ["fr"]="traitdunioncompose",
["it"]="compoundhyphen",
["nl"]="koppelteken",
["pe"]="compoundhyphen",
@@ -7328,36 +8138,42 @@ return {
["cs"]="compress",
["de"]="compress",
["en"]="compress",
- ["fr"]="compress",
+ ["fr"]="reduire",
["it"]="compress",
["nl"]="comprimeren",
["pe"]="Ùشردن",
["ro"]="compress",
},
- ["compressseparator"]={
- ["en"]="compressseparator",
- },
["compressdistance"]={
["en"]="compressdistance",
+ ["fr"]="distancereduction",
},
["compressmethod"]={
["en"]="compressmethod",
+ ["fr"]="methodereduction",
+ },
+ ["compressseparator"]={
+ ["en"]="compressseparator",
+ ["fr"]="separateurreduction",
},
["compressstopper"]={
["en"]="compressstopper",
+ ["fr"]="stoppeurreduction",
},
["concerns"]={
["en"]="concerns",
+ ["fr"]="concerne",
["nl"]="betreft",
},
["connector"]={
["en"]="connector",
+ ["fr"]="connecteur",
},
["continue"]={
["cs"]="pokracovat",
["de"]="fortsetzen",
["en"]="continue",
- ["fr"]="continue",
+ ["fr"]="continuer",
["it"]="continua",
["nl"]="doorgaan",
["pe"]="ادامه",
@@ -7367,7 +8183,7 @@ return {
["cs"]="kontrastnibarva",
["de"]="kontrastfarbe",
["en"]="contrastcolor",
- ["fr"]="coleurcontraste",
+ ["fr"]="couleurconstrast",
["it"]="colorecontrasto",
["nl"]="contrastkleur",
["pe"]="contrastcolor",
@@ -7397,7 +8213,7 @@ return {
["cs"]="konverzesouboru",
["de"]="konvertieredatei",
["en"]="convertfile",
- ["fr"]="conversionfichier",
+ ["fr"]="convertirfichier",
["it"]="convertifile",
["nl"]="converteerfile",
["pe"]="پرونده‌تبدیل",
@@ -7405,6 +8221,7 @@ return {
},
["copies"]={
["en"]="copies",
+ ["fr"]="copies",
["nl"]="kopieen",
},
["corner"]={
@@ -7431,7 +8248,7 @@ return {
["cs"]="zpusobpropojeni",
["de"]="verkopplungsart",
["en"]="couplingway",
- ["fr"]="modecouplage",
+ ["fr"]="faconcouplage",
["it"]="modoaccoppiamento",
["nl"]="koppelwijze",
["pe"]="روش‌تزویج",
@@ -7447,14 +8264,17 @@ return {
["pe"]="criterium",
["ro"]="criteriu",
},
- ["crossreference"]={
- ["en"]="crossreference",
- },
["cropoffset"]={
["en"]="cropoffset",
+ ["fr"]="decalagerecadre",
+ },
+ ["crossreference"]={
+ ["en"]="crossreference",
+ ["fr"]="renvoi",
},
["cssfile"]={
["en"]="cssfile",
+ ["fr"]="fichiercss",
},
["current"]={
["cs"]="aktualni",
@@ -7470,7 +8290,7 @@ return {
["cs"]="cutspace",
["de"]="cutspace",
["en"]="cutspace",
- ["fr"]="cutspace",
+ ["fr"]="espacecoupe",
["it"]="cutspace",
["nl"]="snijwit",
["pe"]="Ùضای‌برش",
@@ -7498,9 +8318,11 @@ return {
},
["database"]={
["en"]="database",
+ ["fr"]="basededonnees",
},
["dataset"]={
["en"]="dataset",
+ ["fr"]="jeudedonnees",
},
["date"]={
["cs"]="datum",
@@ -7512,15 +8334,11 @@ return {
["pe"]="تاریخ",
["ro"]="data",
},
- ["time"]={
- ["en"]="time",
- ["nl"]="tijd",
- },
["deepnumbercommand"]={
["cs"]="deepnumbercommand",
["de"]="deepnumbercommand",
["en"]="deepnumbercommand",
- ["fr"]="deepnumbercommand",
+ ["fr"]="commandeprofondenumero",
["it"]="deepnumbercommand",
["nl"]="diepnummercommando",
["pe"]="Ùرمان‌شماره‌عمیق",
@@ -7530,12 +8348,16 @@ return {
["cs"]="deeptextcommand",
["de"]="deeptextcommand",
["en"]="deeptextcommand",
- ["fr"]="deeptextcommand",
+ ["fr"]="commandeprofondetexte",
["it"]="deeptextcommand",
["nl"]="dieptekstcommando",
["pe"]="Ùرمان‌متن‌عمیق",
["ro"]="deeptextcommand",
},
+ ["define"]={
+ ["en"]="define",
+ ["nl"]="definieer",
+ },
["default"]={
["cs"]="implicitni",
["de"]="default",
@@ -7546,11 +8368,19 @@ return {
["pe"]="پیش‌Ùرض",
["ro"]="implicit",
},
+ ["defaultwidth"]={
+ ["en"]="defaultwidth",
+ ["nl"]="defaultbreedte",
+ },
+ ["defaultheight"]={
+ ["en"]="defaultheight",
+ ["nl"]="defaulthoogte",
+ },
["delay"]={
["cs"]="prodleva",
["de"]="wartezeit",
["en"]="delay",
- ["fr"]="delai",
+ ["fr"]="retard",
["it"]="attesa",
["nl"]="wachttijd",
["pe"]="تاخیر",
@@ -7606,6 +8436,10 @@ return {
["pe"]="نمایش",
["ro"]="display",
},
+ ["displaythreshold"]={
+ ["en"]="displaythreshold",
+ ["fr"]="seuilaffichage",
+ },
["distance"]={
["cs"]="vzdalenost",
["de"]="abstand",
@@ -7618,6 +8452,7 @@ return {
},
["domain"]={
["en"]="domain",
+ ["fr"]="domaine",
},
["dot"]={
["cs"]="tecka",
@@ -7641,12 +8476,13 @@ return {
},
["down"]={
["en"]="down",
+ ["fr"]="enbas",
},
["dummy"]={
["cs"]="dummy",
["de"]="dummy",
["en"]="dummy",
- ["fr"]="dummy",
+ ["fr"]="factice",
["it"]="dummy",
["nl"]="dummy",
["pe"]="مصنوعی",
@@ -7694,15 +8530,19 @@ return {
},
["editor"]={
["en"]="editor",
+ ["fr"]="editeur",
},
["editoretaldisplay"]={
["en"]="editoretaldisplay",
+ ["fr"]="editeurealaffichage",
},
["editoretallimit"]={
["en"]="editoretallimit",
+ ["fr"]="editeureallimite",
},
["editoretaltext"]={
["en"]="editoretaltext",
+ ["fr"]="editeurealtexte",
},
["empty"]={
["cs"]="prazdne",
@@ -7716,17 +8556,22 @@ return {
},
["entities"]={
["en"]="entities",
+ ["fr"]="entitees",
["nl"]="entities",
},
["entries"]={
["en"]="entries",
+ ["fr"]="entrees",
["nl"]="ingangen",
},
+ ["processors"]={
+ ["en"]="processors",
+ },
["equalheight"]={
["cs"]="equalheight",
["de"]="equalheight",
["en"]="equalheight",
- ["fr"]="equalheight",
+ ["fr"]="hauteuregale",
["it"]="equalheight",
["nl"]="equalheight",
["pe"]="ارتÙاع‌یکسان",
@@ -7736,7 +8581,7 @@ return {
["cs"]="equalwidth",
["de"]="equalwidth",
["en"]="equalwidth",
- ["fr"]="equalwidth",
+ ["fr"]="margeuregale",
["it"]="equalwidth",
["nl"]="equalwidth",
["pe"]="عرض‌یکسان",
@@ -7746,7 +8591,7 @@ return {
["cs"]="escape",
["de"]="escape",
["en"]="escape",
- ["fr"]="escape",
+ ["fr"]="echappatoire",
["it"]="escape",
["nl"]="escape",
["pe"]="Ùرار",
@@ -7754,15 +8599,19 @@ return {
},
["etaldisplay"]={
["en"]="etaldisplay",
+ ["fr"]="etalaffichage",
},
["etallimit"]={
["en"]="etallimit",
+ ["fr"]="etallimite",
},
["etaloption"]={
["en"]="etaloption",
+ ["fr"]="etaloption",
},
["etaltext"]={
["en"]="etaltext",
+ ["fr"]="etalttexte",
},
["evenmargin"]={
["cs"]="sudamarginalie",
@@ -7776,9 +8625,11 @@ return {
},
["exact"]={
["en"]="exact",
+ ["fr"]="exact",
},
["exitoffset"]={
["en"]="exitoffset",
+ ["fr"]="decalagesortie",
},
["expansion"]={
["cs"]="expanzen",
@@ -7792,6 +8643,7 @@ return {
},
["export"]={
["en"]="export",
+ ["fr"]="exporter",
["nl"]="exporteer",
},
["extras"]={
@@ -7818,12 +8670,16 @@ return {
["cs"]="fallback",
["de"]="fallback",
["en"]="fallback",
- ["fr"]="fallback",
+ ["fr"]="repli",
["it"]="fallback",
["nl"]="terugval",
["pe"]="عقب‌ریختن",
["ro"]="fallback",
},
+ ["fallbacks"]={
+ ["en"]="fallbacks",
+ ["fr"]="replis",
+ },
["family"]={
["cs"]="rodina",
["de"]="familie",
@@ -7836,12 +8692,19 @@ return {
},
["features"]={
["en"]="features",
+ ["fr"]="fonctionnalites",
+ },
+ ["featureset"]={
+ ["en"]="featureset",
+ ["fr"]="jeufonctionnalite",
},
["fences"]={
["en"]="fences",
+ ["fr"]="barrieres",
},
["field"]={
["en"]="field",
+ ["fr"]="champ",
["nl"]="veld",
},
["fieldbackgroundcolor"]={
@@ -7878,7 +8741,7 @@ return {
["cs"]="offsetpole",
["de"]="feldoffset",
["en"]="fieldoffset",
- ["fr"]="offsetchamp",
+ ["fr"]="decalagechamp",
["it"]="offsetcampo",
["nl"]="veldoffset",
["pe"]="Ø¢Ùست‌میدان",
@@ -7896,21 +8759,27 @@ return {
},
["filler"]={
["en"]="filler",
+ ["fr"]="remplisseur",
},
["filter"]={
["en"]="filter",
+ ["fr"]="filtre",
},
["filtercommand"]={
["en"]="filtercommand",
+ ["fr"]="commandefiltre",
},
["finalnamesep"]={
["en"]="finalnamesep",
+ ["fr"]="sepnomfinal",
},
["finalpagesep"]={
["en"]="finalpagesep",
+ ["fr"]="seppagefinale",
},
["finalpubsep"]={
["en"]="finalpubsep",
+ ["fr"]="seppubfinale",
},
["first"]={
["cs"]="prvni",
@@ -7924,6 +8793,7 @@ return {
},
["firstnamesep"]={
["en"]="firstnamesep",
+ ["fr"]="seppremiernom",
},
["firstpage"]={
["cs"]="prvnistranka",
@@ -7955,6 +8825,11 @@ return {
["pe"]="تمرکزدرون",
["ro"]="focusin",
},
+ ["focusoffset"]={
+ ["en"]="focusoffset",
+ ["fr"]="decalagefocus",
+ ["nl"]="focusoffset",
+ },
["focusout"]={
["cs"]="focusout",
["de"]="focusout",
@@ -7965,9 +8840,9 @@ return {
["pe"]="تمرکزبیرون",
["ro"]="focusout",
},
- ["focusoffset"]={
- ["en"]="focusoffset",
- ["nl"]="focusoffset",
+ ["font"]={
+ ["en"]="font",
+ ["nl"]="font",
},
["footer"]={
["cs"]="upati",
@@ -7983,7 +8858,7 @@ return {
["cs"]="vzdalenostupati",
["de"]="fusszeilenabstand",
["en"]="footerdistance",
- ["fr"]="dsitancepdp",
+ ["fr"]="distancepdp",
["it"]="distanzapdp",
["nl"]="voetafstand",
["pe"]="Ùاصله‌ته‌برگ",
@@ -8003,7 +8878,7 @@ return {
["cs"]="sila",
["de"]="zwinge",
["en"]="force",
- ["fr"]="force",
+ ["fr"]="forcer",
["it"]="forza",
["nl"]="forceer",
["pe"]="اجبار",
@@ -8039,6 +8914,11 @@ return {
["pe"]="شمایل",
["ro"]="format",
},
+ ["fractions"]={
+ ["en"]="fractions",
+ ["fr"]="fractions",
+ ["nl"]="breuken",
+ },
["frame"]={
["cs"]="ramecek",
["de"]="rahmen",
@@ -8111,6 +8991,7 @@ return {
},
["freeregion"]={
["en"]="freeregion",
+ ["fr"]="regionlibre",
["nl"]="vrijgebied",
},
["from"]={
@@ -8125,15 +9006,17 @@ return {
},
["functioncolor"]={
["en"]="functioncolor",
+ ["fr"]="couleurfonction",
},
["functionstyle"]={
["en"]="functionstyle",
+ ["fr"]="stylefonction",
},
["get"]={
["cs"]="ziskat",
["de"]="hole",
["en"]="get",
- ["fr"]="obtient",
+ ["fr"]="obtenir",
["it"]="prendi",
["nl"]="haal",
["pe"]="بگیر",
@@ -8151,6 +9034,7 @@ return {
},
["goodies"]={
["en"]="goodies",
+ ["fr"]="friandises",
},
["grid"]={
["cs"]="mrizka",
@@ -8164,15 +9048,17 @@ return {
},
["group"]={
["en"]="group",
+ ["fr"]="groupe",
},
["groupsuffix"]={
["en"]="groupsuffix",
+ ["fr"]="suffixegroupe",
},
["hang"]={
["cs"]="zaveseni",
["de"]="haengend",
["en"]="hang",
- ["fr"]="suspend",
+ ["fr"]="suspendre",
["it"]="sospendi",
["nl"]="hang",
["pe"]="بیاویز",
@@ -8180,10 +9066,12 @@ return {
},
["hcompact"]={
["en"]="hcompact",
+ ["fr"]="compacth",
["nl"]="hcomprimeer",
},
["headalign"]={
["en"]="headalign",
+ ["fr"]="alignertete",
["nl"]="kopuitlijnen",
},
["headcolor"]={
@@ -8216,15 +9104,11 @@ return {
["pe"]="تبدیل‌سر",
["ro"]="conversietitlu",
},
- ["headseparator"]={
- ["en"]="headseparator",
- ["nl"]="kopscheider",
- },
["header"]={
["cs"]="zahlavi",
["de"]="kopfzeile",
["en"]="header",
- ["fr"]="entete",
+ ["fr"]="entête",
["it"]="intestazione",
["nl"]="hoofd",
["pe"]="سربرگ",
@@ -8234,7 +9118,7 @@ return {
["cs"]="vzdalenostzahlavi",
["de"]="kopfzeilenabstand",
["en"]="headerdistance",
- ["fr"]="distanceentete",
+ ["fr"]="distanceentête",
["it"]="distanzaintestazione",
["nl"]="hoofdafstand",
["pe"]="Ùاصله‌سربرگ",
@@ -8244,7 +9128,7 @@ return {
["cs"]="statuszahlavi",
["de"]="kopfzeilenstatus",
["en"]="headerstate",
- ["fr"]="etatentete",
+ ["fr"]="etatentête",
["it"]="statointestazione",
["nl"]="hoofdstatus",
["pe"]="وضعیت‌سربرگ",
@@ -8270,6 +9154,11 @@ return {
["pe"]="شماره‌سر",
["ro"]="numartitlu",
},
+ ["headseparator"]={
+ ["en"]="headseparator",
+ ["fr"]="separateurtete",
+ ["nl"]="kopscheider",
+ },
["headstyle"]={
["cs"]="stylhlavicky",
["de"]="kopfstil",
@@ -8294,25 +9183,17 @@ return {
["cs"]="hfaktor",
["de"]="hfaktor",
["en"]="hfactor",
- ["fr"]="facteurhauteur",
+ ["fr"]="facteurh",
["it"]="hfactor",
["nl"]="hfactor",
["pe"]="عامل‌ارتÙاع",
["ro"]="hfactor",
},
- ["vfactor"]={
- ["cs"]="vfaktor",
- ["de"]="vfaktor",
- ["en"]="vfactor",
- ["it"]="vfactor",
- ["nl"]="vfactor",
- ["ro"]="vfactor",
- },
["hfil"]={
["cs"]="hfil",
["de"]="hfil",
["en"]="hfil",
- ["fr"]="hfil",
+ ["fr"]="remplissageh",
["it"]="hfil",
["nl"]="hfil",
["pe"]="پرکردن‌ارتÙاع",
@@ -8320,32 +9201,33 @@ return {
},
["hidenumber"]={
["en"]="hidenumber",
- },
- ["horizontal"]={
- ["cs"]="horizontalne",
- ["de"]="horizontal",
- ["en"]="horizontal",
- ["fr"]="horizontale",
- ["it"]="orizzontale",
- ["nl"]="horizontaal",
- ["pe"]="اÙÙ‚ÛŒ",
- ["ro"]="orizontal",
+ ["fr"]="cachernumero",
},
["hoffset"]={
["cs"]="hoffset",
["de"]="hoffset",
["en"]="hoffset",
- ["fr"]="decalagehauteur",
+ ["fr"]="decalageh",
["it"]="hoffset",
["nl"]="hoffset",
["pe"]="Ø¢Ùست‌ا",
["ro"]="hoffset",
},
+ ["horizontal"]={
+ ["cs"]="horizontalne",
+ ["de"]="horizontal",
+ ["en"]="horizontal",
+ ["fr"]="horizontal",
+ ["it"]="orizzontale",
+ ["nl"]="horizontaal",
+ ["pe"]="اÙÙ‚ÛŒ",
+ ["ro"]="orizontal",
+ },
["horoffset"]={
["cs"]="horoffset",
["de"]="rumpfabstand",
["en"]="horoffset",
- ["fr"]="horoffset",
+ ["fr"]="decalagehor",
["it"]="horoffset",
["nl"]="rugoffset",
["pe"]="Ø¢Ùست‌اÙÙ‚",
@@ -8355,7 +9237,7 @@ return {
["cs"]="hyphen",
["de"]="hyphen",
["en"]="hyphen",
- ["fr"]="hyphen",
+ ["fr"]="traitdunion",
["it"]="hyphen",
["nl"]="hyphen",
["pe"]="شکستن",
@@ -8363,12 +9245,13 @@ return {
},
["hyphens"]={
["en"]="hyphens",
+ ["fr"]="traitsdunion",
},
["icommand"]={
["cs"]="iprikaz",
["de"]="ibefehl",
["en"]="icommand",
- ["fr"]="icommande",
+ ["fr"]="commandei",
["it"]="icomando",
["nl"]="icommando",
["pe"]="icommand",
@@ -8376,12 +9259,13 @@ return {
},
["ignore"]={
["en"]="ignore",
+ ["fr"]="ignorer",
},
["in"]={
["cs"]="v",
["de"]="in",
["en"]="in",
- ["fr"]="in",
+ ["fr"]="dans",
["it"]="in",
["nl"]="in",
["pe"]="درون",
@@ -8401,7 +9285,7 @@ return {
["cs"]="zvysit",
["de"]="erhoehen",
["en"]="increment",
- ["fr"]="incremente",
+ ["fr"]="incrementer",
["it"]="incremento",
["nl"]="verhoog",
["pe"]="اÙزایش",
@@ -8411,7 +9295,7 @@ return {
["cs"]="zvysujicicislo",
["de"]="nummererhoehen",
["en"]="incrementnumber",
- ["fr"]="incrementenumero",
+ ["fr"]="incrementernumero",
["it"]="incrementanumero",
["nl"]="verhoognummer",
["pe"]="شماره‌اÙزایش",
@@ -8421,17 +9305,20 @@ return {
["cs"]="odsazovani",
["de"]="einziehen",
["en"]="indenting",
- ["fr"]="composeenalinea",
+ ["fr"]="indentation",
["it"]="rientro",
["nl"]="inspringen",
["pe"]="تورÙتگی",
["ro"]="aliniat",
},
+ ["indentlist"]={
+ ["en"]="indentlist",
+ },
["indentnext"]={
["cs"]="odsadpristi",
["de"]="ziehefolgendeein",
["en"]="indentnext",
- ["fr"]="indentesuivant",
+ ["fr"]="indenterauuivant",
["it"]="rientrasuccessivo",
["nl"]="springvolgendein",
["pe"]="متن‌تورÙته",
@@ -8439,6 +9326,7 @@ return {
},
["index"]={
["en"]="index",
+ ["fr"]="index",
},
["indicator"]={
["cs"]="indikator",
@@ -8452,6 +9340,11 @@ return {
},
["initialsep"]={
["en"]="initialsep",
+ ["fr"]="sepinitial",
+ },
+ ["inlinethreshold"]={
+ ["en"]="inlinethreshold",
+ ["fr"]="seuilenligne",
},
["inner"]={
["cs"]="vnitrni",
@@ -8485,13 +9378,16 @@ return {
},
["insidesection"]={
["en"]="insidesection",
+ ["fr"]="auseinsection",
["nl"]="binnensectie",
},
["instance"]={
["en"]="instance",
+ ["fr"]="instance",
},
["intent"]={
["en"]="intent",
+ ["fr"]="intention",
},
["interaction"]={
["cs"]="interakce",
@@ -8515,19 +9411,22 @@ return {
},
["internalgrid"]={
["en"]="internalgrid",
+ ["fr"]="grilleinterieure",
["nl"]="interngrid",
},
["italicfeatures"]={
["en"]="italicfeatures",
+ ["fr"]="fonctionnalitesitalique",
},
["italicfont"]={
["en"]="italicfont",
+ ["fr"]="policeitalique",
},
["itemalign"]={
["cs"]="itemalign",
["de"]="itemalign",
["en"]="itemalign",
- ["fr"]="itemalign",
+ ["fr"]="alignerelem",
["it"]="itemalign",
["nl"]="itemuitlijnen",
["pe"]="تنظیم‌آیتم",
@@ -8537,7 +9436,7 @@ return {
["cs"]="polozky",
["de"]="posten",
["en"]="items",
- ["fr"]="elements",
+ ["fr"]="élément",
["it"]="elementi",
["nl"]="items",
["pe"]="آیتمها",
@@ -8545,21 +9444,25 @@ return {
},
["joiners"]={
["en"]="joiners",
+ ["fr"]="joins",
},
["journalconversion"]={
["en"]="journalconversion",
+ ["fr"]="conversionjournal",
},
["juniorsep"]={
["en"]="juniorsep",
+ ["fr"]="sepjunior",
},
["keeptogether"]={
["en"]="keeptogether",
+ ["fr"]="conserverensemble",
},
["ken"]={
["cs"]="ken",
["de"]="ken",
["en"]="ken",
- ["fr"]="ken",
+ ["fr"]="rep",
["it"]="ken",
["nl"]="ken",
["pe"]="ken",
@@ -8569,7 +9472,7 @@ return {
["cs"]="keyexpansion",
["de"]="keyexpansion",
["en"]="keyexpansion",
- ["fr"]="keyexpansion",
+ ["fr"]="expansioncle",
["it"]="keyexpansion",
["nl"]="sleutelexpansie",
["pe"]="گسترش‌کلید",
@@ -8577,13 +9480,14 @@ return {
},
["keys"]={
["en"]="keys",
+ ["fr"]="cles",
["nl"]="sleutels",
},
["keyword"]={
["cs"]="keyword",
["de"]="keyword",
["en"]="keyword",
- ["fr"]="motcle",
+ ["fr"]="motclé",
["it"]="parolachiave",
["nl"]="trefwoord",
["pe"]="کلید‌واژه",
@@ -8599,17 +9503,36 @@ return {
["pe"]="برچسب",
["ro"]="eticheta",
},
+ ["labelalternative"]={
+ ["en"]="labelalternative",
+ ["fr"]="varianteetiquette",
+ ["nl"]="labelvariant",
+ },
+ ["labelcolor"]={
+ ["en"]="labelcolor",
+ ["fr"]="couleuretiquette",
+ ["nl"]="labelkleur",
+ },
["labeloffset"]={
["en"]="labeloffset",
+ ["fr"]="decalageetiquette",
+ },
+ ["labelstyle"]={
+ ["en"]="labelstyle",
+ ["fr"]="styleetiquette",
+ ["nl"]="labelletter",
},
["language"]={
["en"]="language",
+ ["fr"]="langue",
},
["last"]={
["en"]="last",
+ ["fr"]="dernier",
},
["lastnamesep"]={
["en"]="lastnamesep",
+ ["fr"]="sepderniernom",
},
["lastpage"]={
["cs"]="poslednistrana",
@@ -8623,12 +9546,15 @@ return {
},
["lastpagesep"]={
["en"]="lastpagesep",
+ ["fr"]="sepdernierepage",
},
["lastpubsep"]={
["en"]="lastpubsep",
+ ["fr"]="sepdernierepub",
},
["layout"]={
["en"]="layout",
+ ["fr"]="miseenpage",
["nl"]="layout",
},
["left"]={
@@ -8655,7 +9581,7 @@ return {
["cs"]="leftcompoundhyphen",
["de"]="leftcompoundhyphen",
["en"]="leftcompoundhyphen",
- ["fr"]="leftcompoundhyphen",
+ ["fr"]="traitdunioncomposegauche",
["it"]="leftcompoundhyphen",
["nl"]="linkerkoppelteken",
["pe"]="leftcompoundhyphen",
@@ -8695,7 +9621,7 @@ return {
["cs"]="lefthyphen",
["de"]="lefthyphen",
["en"]="lefthyphen",
- ["fr"]="lefthyphen",
+ ["fr"]="traitduniongauche",
["it"]="lefthyphen",
["nl"]="lefthyphen",
["pe"]="شکست‌چپ",
@@ -8751,6 +9677,10 @@ return {
["pe"]="نقل‌چپ",
["ro"]="minicitatstanga",
},
+ ["leftsample"]={
+ ["en"]="leftsample",
+ ["fr"]="echantillongauche",
+ },
["leftsentence"]={
["cs"]="vetavlevo",
["de"]="linkersatz",
@@ -8765,7 +9695,7 @@ return {
["cs"]="leftspeech",
["de"]="leftspeech",
["en"]="leftspeech",
- ["fr"]="leftspeech",
+ ["fr"]="discoursgauche",
["it"]="leftspeech",
["nl"]="linkeruitspraak",
["pe"]="سخنرانی‌چپ",
@@ -8775,7 +9705,7 @@ return {
["cs"]="stylvlevo",
["de"]="linkerstil",
["en"]="leftstyle",
- ["fr"]="leftstyle",
+ ["fr"]="stylegauche",
["it"]="stilesinistra",
["nl"]="linkerletter",
["pe"]="سبک‌چپ",
@@ -8813,9 +9743,11 @@ return {
},
["leftwords"]={
["en"]="leftwords",
+ ["fr"]="motsgauche",
},
["less"]={
["en"]="less",
+ ["fr"]="moins",
["nl"]="minder",
},
["level"]={
@@ -8842,7 +9774,7 @@ return {
["cs"]="limittext",
["de"]="limittext",
["en"]="limittext",
- ["fr"]="limittext",
+ ["fr"]="textelimite",
["it"]="limittext",
["nl"]="limiettekst",
["pe"]="مرزمتن",
@@ -8868,6 +9800,10 @@ return {
["pe"]="تصحیح‌خط",
["ro"]="corectielinie",
},
+ ["linedirection"]={
+ ["en"]="linedirection",
+ ["nl"]="regelrichting",
+ },
["lines"]={
["cs"]="radky",
["de"]="zeilen",
@@ -8920,6 +9856,7 @@ return {
},
["loffset"]={
["en"]="loffset",
+ ["fr"]="decalagel",
},
["logo"]={
["cs"]="logo",
@@ -8945,7 +9882,7 @@ return {
["cs"]="barvaznacky",
["de"]="beschrfarbe",
["en"]="marcolor",
- ["fr"]="couleurmarquage",
+ ["fr"]="couleurrem",
["it"]="coloremarcatura",
["nl"]="markleur",
["pe"]="رنگ‌حاش",
@@ -8975,7 +9912,7 @@ return {
["cs"]="textovahrana",
["de"]="marginalkante",
["en"]="marginedge",
- ["fr"]="bordmarge",
+ ["fr"]="margebord",
["it"]="bordomargine",
["nl"]="kantlijn",
["pe"]="لبه‌حاشیه",
@@ -8985,7 +9922,7 @@ return {
["cs"]="textmarginalnihookraje",
["de"]="marginalkantetext",
["en"]="marginedgetext",
- ["fr"]="textebordmarge",
+ ["fr"]="textemargebord",
["it"]="testobordomargine",
["nl"]="kantlijntekst",
["pe"]="متن‌لبه‌حاشیه",
@@ -9003,6 +9940,7 @@ return {
},
["mark"]={
["en"]="mark",
+ ["fr"]="marque",
["nl"]="kernmerk",
},
["marking"]={
@@ -9019,7 +9957,7 @@ return {
["cs"]="stylsnacky",
["de"]="beschrstil",
["en"]="marstyle",
- ["fr"]="stylemarquage",
+ ["fr"]="stylerem",
["it"]="stilemarcatura",
["nl"]="marletter",
["pe"]="سبک‌حاش",
@@ -9027,16 +9965,20 @@ return {
},
["mask"]={
["en"]="mask",
+ ["fr"]="masque",
["nl"]="masker",
},
["mathclass"]={
["en"]="mathclass",
+ ["fr"]="classemath",
},
["mathlimits"]={
["en"]="mathlimits",
+ ["fr"]="limitesmath",
},
["mathstyle"]={
["en"]="mathstyle",
+ ["fr"]="stylemath",
},
["max"]={
["cs"]="max",
@@ -9050,6 +9992,7 @@ return {
},
["maxdepth"]={
["en"]="maxdepth",
+ ["fr"]="profondeurmax",
},
["maxheight"]={
["cs"]="maxvyska",
@@ -9073,6 +10016,7 @@ return {
},
["maybeyear"]={
["en"]="maybeyear",
+ ["fr"]="anneepeutetre",
},
["menu"]={
["cs"]="menu",
@@ -9104,47 +10048,51 @@ return {
["pe"]="میان",
["ro"]="mijloc",
},
- ["middlecommand"]={
- ["en"]="middlecommand",
- ["nl"]="middencommando",
- },
["middlecolor"]={
["en"]="middlecolor",
+ ["fr"]="couleurmilieu",
["nl"]="middenkleur",
},
- ["middlestyle"]={
- ["en"]="middlestyle",
- ["nl"]="middenletter",
- },
- ["middlewidth"]={
- ["en"]="middlewidth",
- ["nl"]="middenbreedte",
+ ["middlecommand"]={
+ ["en"]="middlecommand",
+ ["fr"]="commandemilieu",
+ ["nl"]="middencommando",
},
["middlespeech"]={
["cs"]="middlespeech",
["de"]="middlespeech",
["en"]="middlespeech",
- ["fr"]="middlespeech",
+ ["fr"]="discoursmilieu",
["it"]="middlespeech",
["nl"]="middenuitspraak",
["pe"]="سخنرانی‌میانی",
["ro"]="middlespeech",
},
+ ["middlestyle"]={
+ ["en"]="middlestyle",
+ ["fr"]="stylemilieu",
+ ["nl"]="middenletter",
+ },
["middletext"]={
["cs"]="strednitext",
["de"]="mittigertext",
["en"]="middletext",
- ["fr"]="textecentre",
+ ["fr"]="textemilieu",
["it"]="testocentro",
["nl"]="middentekst",
["pe"]="متن‌میانی",
["ro"]="textmijloc",
},
+ ["middlewidth"]={
+ ["en"]="middlewidth",
+ ["fr"]="largeurmilieu",
+ ["nl"]="middenbreedte",
+ },
["midsentence"]={
["cs"]="midsentence",
["de"]="midsentence",
["en"]="midsentence",
- ["fr"]="midsentence",
+ ["fr"]="milieuphrase",
["it"]="midsentence",
["nl"]="middenzin",
["pe"]="جمله‌میانی",
@@ -9194,7 +10142,7 @@ return {
["cs"]="moffset",
["de"]="moffset",
["en"]="moffset",
- ["fr"]="moffset",
+ ["fr"]="decalagem",
["it"]="moffset",
["nl"]="moffset",
["pe"]="moffset",
@@ -9202,26 +10150,32 @@ return {
},
["monthconversion"]={
["en"]="monthconversion",
+ ["fr"]="conversionmois",
["nl"]="maandconversie",
},
["more"]={
["en"]="more",
+ ["fr"]="plus",
["nl"]="meer",
},
["mpdepth"]={
["en"]="mpdepth",
+ ["fr"]="profondeurmp",
["nl"]="mpdiepte",
},
["mpheight"]={
["en"]="mpheight",
+ ["fr"]="hauteurmp",
["nl"]="mphoogte",
},
["mpoffset"]={
["en"]="mpoffset",
+ ["fr"]="decalagemp",
["nl"]="mpoffset",
},
["mpwidth"]={
["en"]="mpwidth",
+ ["fr"]="largeurmp",
["nl"]="mpbreedte",
},
["n"]={
@@ -9246,12 +10200,13 @@ return {
},
["namesep"]={
["en"]="namesep",
+ ["fr"]="sepnom",
},
["nbottom"]={
["cs"]="nspodek",
["de"]="nunten",
["en"]="nbottom",
- ["fr"]="ninf",
+ ["fr"]="nbas",
["it"]="nfondo",
["nl"]="nonder",
["pe"]="nbottom",
@@ -9279,15 +10234,19 @@ return {
},
["nextleft"]={
["en"]="nextleft",
+ ["fr"]="suivantgauche",
},
["nextleftquotation"]={
["en"]="nextleftquotation",
+ ["fr"]="citationgauchesuivante",
},
["nextright"]={
["en"]="nextright",
+ ["fr"]="suivantdroite",
},
["nextrightquotation"]={
["en"]="nextrightquotation",
+ ["fr"]="citationdroitesuivante",
},
["nl"]={
["cs"]="nl",
@@ -9331,10 +10290,12 @@ return {
},
["note"]={
["en"]="note",
+ ["fr"]="note",
["nl"]="noot",
},
["notes"]={
["en"]="notes",
+ ["fr"]="notes",
["nl"]="noten",
},
["nr"]={
@@ -9361,7 +10322,7 @@ return {
["cs"]="nvrsek",
["de"]="noben",
["en"]="ntop",
- ["fr"]="nsup",
+ ["fr"]="nhaut",
["it"]="ncima",
["nl"]="nboven",
["pe"]="ntop",
@@ -9379,6 +10340,7 @@ return {
},
["numberalign"]={
["en"]="numberalign",
+ ["fr"]="alignernumero",
["nl"]="nummeruitlijnen",
},
["numbercolor"]={
@@ -9403,15 +10365,17 @@ return {
},
["numberconversion"]={
["en"]="numberconversion",
+ ["fr"]="conversionnumero",
},
["numberconversionset"]={
["en"]="numberconversionset",
+ ["fr"]="jeuconversionnumero",
},
["numberdistance"]={
["cs"]="numberdistance",
["de"]="numberdistance",
["en"]="numberdistance",
- ["fr"]="numberdistance",
+ ["fr"]="distancenumero",
["it"]="numberdistance",
["nl"]="nummerafstand",
["pe"]="Ùاصله‌شماره",
@@ -9421,7 +10385,7 @@ return {
["cs"]="cislovani",
["de"]="nummerierung",
["en"]="numbering",
- ["fr"]="numerotation",
+ ["fr"]="numérotation",
["it"]="numerazione",
["nl"]="nummeren",
["pe"]="شماره‌گذاری",
@@ -9429,18 +10393,21 @@ return {
},
["numberorder"]={
["en"]="numberorder",
+ ["fr"]="ordrenumero",
},
["numberprefix"]={
["en"]="numberprefix",
+ ["fr"]="prefixenumero",
},
["numbersegments"]={
["en"]="numbersegments",
+ ["fr"]="segmentsnumero",
},
["numberseparator"]={
["cs"]="oddelovaccisla",
["de"]="nummernseperator",
["en"]="numberseparator",
- ["fr"]="separateurnumbero",
+ ["fr"]="separateurnumero",
["it"]="separatorenumero",
["nl"]="nummerscheider",
["pe"]="جداکننده‌شماره",
@@ -9448,15 +10415,24 @@ return {
},
["numberseparatorset"]={
["en"]="numberseparatorset",
+ ["fr"]="jeuseparateurnumero",
},
["numberset"]={
["en"]="numberset",
+ ["fr"]="jeunumero",
},
["numberstarter"]={
["en"]="numberstarter",
+ ["fr"]="demarreurnumero",
},
["numberstopper"]={
["en"]="numberstopper",
+ ["fr"]="stoppeurnumero",
+ },
+ ["numberstrut"]={
+ ["en"]="numberstrut",
+ ["fr"]="entretoisenumero",
+ ["nl"]="nummerstrut",
},
["numberstyle"]={
["cs"]="stylcisla",
@@ -9472,7 +10448,7 @@ return {
["cs"]="numberwidth",
["de"]="numberwidth",
["en"]="numberwidth",
- ["fr"]="numberwidth",
+ ["fr"]="largeurnumero",
["it"]="numberwidth",
["nl"]="nummerbreedte",
["pe"]="عرض‌شماره",
@@ -9522,7 +10498,7 @@ return {
["cs"]="lichyokraj",
["de"]="ungeraderand",
["en"]="oddmargin",
- ["fr"]="margepaire",
+ ["fr"]="margeimpaire",
["it"]="marginedispari",
["nl"]="onevenmarge",
["pe"]="حاشیه‌Ùرد",
@@ -9532,7 +10508,7 @@ return {
["cs"]="offset",
["de"]="offset",
["en"]="offset",
- ["fr"]="offset",
+ ["fr"]="decalage",
["it"]="offset",
["nl"]="offset",
["pe"]="Ø¢Ùست",
@@ -9542,7 +10518,7 @@ return {
["cs"]="otevriakci",
["de"]="oeffenaktion",
["en"]="openaction",
- ["fr"]="actionouverture",
+ ["fr"]="actionouvrir",
["it"]="azioneapri",
["nl"]="openactie",
["pe"]="عمل‌باز",
@@ -9550,13 +10526,14 @@ return {
},
["openpage"]={
["en"]="openpage",
+ ["fr"]="ouvrirpage",
["nl"]="openpagina",
},
["openpageaction"]={
["cs"]="akceotevrenistranky",
["de"]="openpageaction",
["en"]="openpageaction",
- ["fr"]="actionouverturepage",
+ ["fr"]="actionouvrirpage",
["it"]="azioneapripagina",
["nl"]="openpaginaactie",
["pe"]="عمل‌صÙحه‌باز",
@@ -9564,9 +10541,11 @@ return {
},
["openup"]={
["en"]="openup",
+ ["fr"]="ouverture",
},
["opticalsize"]={
["en"]="opticalsize",
+ ["fr"]="tailleoptique",
},
["option"]={
["cs"]="volba",
@@ -9580,12 +10559,9 @@ return {
},
["order"]={
["en"]="order",
+ ["fr"]="ordre",
["nl"]="volgorde",
},
- ["anchoring"]={
- ["en"]="anchoring",
- ["nl"]="verankering",
- },
["orientation"]={
["cs"]="orientation",
["de"]="orientation",
@@ -9598,6 +10574,7 @@ return {
},
["otherstext"]={
["en"]="otherstext",
+ ["fr"]="texteautres",
},
["outermargin"]={
["cs"]="outermargin",
@@ -9613,17 +10590,21 @@ return {
["cs"]="overprint",
["de"]="overprint",
["en"]="overprint",
- ["fr"]="overprint",
+ ["fr"]="surimpression",
["it"]="overprint",
["nl"]="overprint",
["pe"]="overprint",
["ro"]="overprint",
},
+ ["ownerpassword"]={
+ ["en"]="ownerpassword",
+ ["fr"]="motdepasseproprietaire",
+ },
["ownnumber"]={
["cs"]="vlastnicislo",
["de"]="eigenenummer",
["en"]="ownnumber",
- ["fr"]="numeroproprio",
+ ["fr"]="numeropropre",
["it"]="numeroproprio",
["nl"]="eigennummer",
["pe"]="شماره‌خود",
@@ -9631,6 +10612,7 @@ return {
},
["packcriterium"]={
["en"]="packcriterium",
+ ["fr"]="criterepack",
["nl"]="opelkaarcriterium",
},
["page"]={
@@ -9647,7 +10629,7 @@ return {
["cs"]="hranicestranky",
["de"]="seitenbegrenzung",
["en"]="pageboundaries",
- ["fr"]="limitespage",
+ ["fr"]="frontierespage",
["it"]="limitipagina",
["nl"]="paginaovergangen",
["pe"]="مرزهای‌صÙحه",
@@ -9665,6 +10647,7 @@ return {
},
["pagecolormodel"]={
["en"]="pagecolormodel",
+ ["fr"]="modelecouleurpage",
["nl"]="paginakleurmodel",
},
["pagecommand"]={
@@ -9679,18 +10662,23 @@ return {
},
["pageconnector"]={
["en"]="pageconnector",
+ ["fr"]="connecteurpage",
},
["pageconversion"]={
["en"]="pageconversion",
+ ["fr"]="conversionpage",
},
["pageconversionset"]={
["en"]="pageconversionset",
+ ["fr"]="jeuconversionpage",
},
["pageleft"]={
["en"]="pageleft",
+ ["fr"]="pagegauche",
},
["pagemethod"]={
["en"]="pagemethod",
+ ["fr"]="methodepage",
["nl"]="paginamethode",
},
["pagenumber"]={
@@ -9705,48 +10693,63 @@ return {
},
["pageprefix"]={
["en"]="pageprefix",
+ ["fr"]="prefixepage",
},
["pageprefixconnector"]={
["en"]="pageprefixconnector",
+ ["fr"]="connecteurprefixepage",
},
["pageprefixconversion"]={
["en"]="pageprefixconversion",
+ ["fr"]="conversionprefixepage",
},
["pageprefixconversionset"]={
["en"]="pageprefixconversionset",
+ ["fr"]="jeuconversionprefixepage",
},
["pageprefixsegments"]={
["en"]="pageprefixsegments",
+ ["fr"]="segmentsprefixepage",
},
["pageprefixseparatorset"]={
["en"]="pageprefixseparatorset",
+ ["fr"]="jeuseparateurprefixepage",
},
["pageprefixset"]={
["en"]="pageprefixset",
+ ["fr"]="jeuprefixepage",
},
["pageprefixstarter"]={
["en"]="pageprefixstarter",
+ ["fr"]="demarreurprefixepage",
},
["pageprefixstopper"]={
["en"]="pageprefixstopper",
+ ["fr"]="stoppeurprefixpage",
},
["pageright"]={
["en"]="pageright",
+ ["fr"]="pagedroite",
},
["pagesegments"]={
["en"]="pagesegments",
+ ["fr"]="segmentspage",
},
["pagesep"]={
["en"]="pagesep",
+ ["fr"]="seppage",
},
["pageseparatorset"]={
["en"]="pageseparatorset",
+ ["fr"]="jeuseparateurpage",
},
["pageset"]={
["en"]="pageset",
+ ["fr"]="jeupage",
},
["pagestarter"]={
["en"]="pagestarter",
+ ["fr"]="demarreurpage",
},
["pagestate"]={
["cs"]="pagestate",
@@ -9760,6 +10763,7 @@ return {
},
["pagestopper"]={
["en"]="pagestopper",
+ ["fr"]="stoppeurpage",
},
["pagestyle"]={
["cs"]="stylstranky",
@@ -9803,12 +10807,13 @@ return {
},
["period"]={
["en"]="period",
+ ["fr"]="periode",
},
["place"]={
["cs"]="umistit",
["de"]="platziere",
["en"]="place",
- ["fr"]="place",
+ ["fr"]="placer",
["it"]="metti",
["nl"]="plaatsen",
["pe"]="بگذار",
@@ -9818,17 +10823,20 @@ return {
["cs"]="umistihlavicku",
["de"]="setzekopf",
["en"]="placehead",
- ["fr"]="placetete",
+ ["fr"]="placertete",
["it"]="mettitesta",
["nl"]="plaatskop",
["pe"]="بگذارسر",
["ro"]="punetitlu",
},
+ ["placeholder"]={
+ ["en"]="placeholder",
+ },
["placestopper"]={
["cs"]="predelmista",
["de"]="setzetrenner",
["en"]="placestopper",
- ["fr"]="emplacementstopper",
+ ["fr"]="placerstoppeur",
["it"]="mettistopper",
["nl"]="plaatsafsluiter",
["pe"]="بگذارایست",
@@ -9856,33 +10864,41 @@ return {
},
["prefixconnector"]={
["en"]="prefixconnector",
+ ["fr"]="connecteurprefixe",
},
["prefixconversion"]={
["en"]="prefixconversion",
+ ["fr"]="conversionprefixe",
},
["prefixconversionset"]={
["en"]="prefixconversionset",
+ ["fr"]="jeuconversionprefixe",
},
["prefixsegments"]={
["en"]="prefixsegments",
+ ["fr"]="segmentsprefixe",
},
["prefixseparatorset"]={
["en"]="prefixseparatorset",
+ ["fr"]="jeuseparateurprefixe",
},
["prefixset"]={
["en"]="prefixset",
+ ["fr"]="jeuprefixe",
},
["prefixstarter"]={
["en"]="prefixstarter",
+ ["fr"]="demarreurprefixe",
},
["prefixstopper"]={
["en"]="prefixstopper",
+ ["fr"]="stoppeurprefixe",
},
["preset"]={
["cs"]="prednastaveni",
["de"]="voreinstellung",
["en"]="preset",
- ["fr"]="prereglage",
+ ["fr"]="preregler",
["it"]="preimpostato",
["nl"]="preset",
["pe"]="preset",
@@ -9892,7 +10908,7 @@ return {
["cs"]="nahled",
["de"]="vorschau",
["en"]="preview",
- ["fr"]="previsualisation",
+ ["fr"]="apercu",
["it"]="anteprima",
["nl"]="preview",
["pe"]="پیش‌دید",
@@ -9920,13 +10936,14 @@ return {
},
["print"]={
["en"]="print",
+ ["fr"]="imprimer",
["nl"]="print",
},
["printable"]={
["cs"]="tisknutelne",
["de"]="druckbar",
["en"]="printable",
- ["fr"]="editable",
+ ["fr"]="imprimable",
["it"]="stampabile",
["nl"]="printbaar",
["pe"]="قابل‌چاپ",
@@ -9936,7 +10953,7 @@ return {
["cs"]="process",
["de"]="process",
["en"]="process",
- ["fr"]="process",
+ ["fr"]="traiter",
["it"]="process",
["nl"]="proces",
["pe"]="پردازش",
@@ -9944,15 +10961,19 @@ return {
},
["profile"]={
["en"]="profile",
+ ["fr"]="profil",
},
["properties"]={
["en"]="properties",
+ ["fr"]="proprietes",
},
["pubsep"]={
["en"]="pubsep",
+ ["fr"]="seppub",
},
["quotechar"]={
["en"]="quotechar",
+ ["fr"]="caracitation",
},
["radius"]={
["cs"]="polomer",
@@ -9976,6 +10997,7 @@ return {
},
["range"]={
["en"]="range",
+ ["fr"]="gamme",
["nl"]="bereik",
},
["reduction"]={
@@ -10000,6 +11022,7 @@ return {
},
["refcommand"]={
["en"]="refcommand",
+ ["fr"]="commanderef",
},
["reference"]={
["cs"]="odkaz",
@@ -10013,15 +11036,20 @@ return {
},
["referencemethod"]={
["en"]="referencemethod",
+ ["fr"]="methodereference",
+ },
+ ["referencetext"]={
+ ["en"]="referencetext",
},
["referenceprefix"]={
["en"]="referenceprefix",
+ ["fr"]="prefixereference",
},
["referencing"]={
["cs"]="odkazujici",
["de"]="referieren",
["en"]="referencing",
- ["fr"]="referencing",
+ ["fr"]="referencement",
["it"]="referencing",
["nl"]="refereren",
["pe"]="مراجعه",
@@ -10029,13 +11057,14 @@ return {
},
["region"]={
["en"]="region",
+ ["fr"]="region",
["nl"]="gebied",
},
["regionin"]={
["cs"]="oblastuvnitr",
["de"]="regionin",
["en"]="regionin",
- ["fr"]="entreregion",
+ ["fr"]="regiondedans",
["it"]="entraregione",
["nl"]="gebiedin",
["pe"]="ناحیه‌درون",
@@ -10045,7 +11074,7 @@ return {
["cs"]="oblastvne",
["de"]="regionaus",
["en"]="regionout",
- ["fr"]="regionexterieure",
+ ["fr"]="regiondehors",
["it"]="esciregione",
["nl"]="gebieduit",
["pe"]="ناحیه‌بیرون",
@@ -10053,21 +11082,25 @@ return {
},
["register"]={
["en"]="register",
+ ["fr"]="registre",
},
["regularfeatures"]={
["en"]="regularfeatures",
+ ["fr"]="fonctionnalitesordinaires",
},
["regularfont"]={
["en"]="regularfont",
+ ["fr"]="policereordinaire",
},
["renderingsetup"]={
["en"]="renderingsetup",
+ ["fr"]="configurationrendu",
},
["repeat"]={
["cs"]="opakovat",
["de"]="wiederholen",
["en"]="repeat",
- ["fr"]="repete",
+ ["fr"]="repeter",
["it"]="ripeti",
["nl"]="herhaal",
["pe"]="تکرار",
@@ -10077,7 +11110,7 @@ return {
["cs"]="reset",
["de"]="reset",
["en"]="reset",
- ["fr"]="reset",
+ ["fr"]="raz",
["it"]="reset",
["nl"]="reset",
["pe"]="بازنشانی",
@@ -10105,12 +11138,13 @@ return {
},
["resources"]={
["en"]="resources",
+ ["fr"]="ressources",
},
["reverse"]={
["cs"]="reverse",
["de"]="reverse",
["en"]="reverse",
- ["fr"]="inverse",
+ ["fr"]="inverser",
["it"]="invertito",
["nl"]="omgekeerd",
["pe"]="برعکس",
@@ -10126,6 +11160,10 @@ return {
["pe"]="راست",
["ro"]="dreapta",
},
+ ["rightchars"]={
+ ["en"]="rightchars",
+ ["fr"]="caracteresdroite",
+ },
["rightcolor"]={
["cs"]="barvavpravo",
["de"]="rechterfarbe",
@@ -10140,7 +11178,7 @@ return {
["cs"]="rightcompoundhyphen",
["de"]="rightcompoundhyphen",
["en"]="rightcompoundhyphen",
- ["fr"]="rightcompoundhyphen",
+ ["fr"]="traitdunioncomposedroite",
["it"]="rightcompoundhyphen",
["nl"]="rechterkoppelteken",
["pe"]="rightcompoundhyphen",
@@ -10170,7 +11208,7 @@ return {
["cs"]="ramecekvpravo",
["de"]="rechterrahmen",
["en"]="rightframe",
- ["fr"]="cadredroit",
+ ["fr"]="cadredroite",
["it"]="cornicedestra",
["nl"]="rechterkader",
["pe"]="قالب‌راست",
@@ -10180,7 +11218,7 @@ return {
["cs"]="righthyphen",
["de"]="righthyphen",
["en"]="righthyphen",
- ["fr"]="righthyphen",
+ ["fr"]="traitduniondroite",
["it"]="righthyphen",
["nl"]="righthyphen",
["pe"]="righthyphen",
@@ -10210,7 +11248,7 @@ return {
["cs"]="pravyoffset",
["de"]="rechterabstand",
["en"]="rightoffset",
- ["fr"]="rightoffset",
+ ["fr"]="decalagedroite",
["it"]="offsetdestro",
["nl"]="rechteroffset",
["pe"]="Ø¢Ùست‌راست",
@@ -10236,6 +11274,10 @@ return {
["pe"]="نقل‌راست",
["ro"]="minicitatdreapta",
},
+ ["rightsample"]={
+ ["en"]="rightsample",
+ ["fr"]="echantillondroite",
+ },
["rightsentence"]={
["cs"]="vetavpravo",
["de"]="rechtersatz",
@@ -10250,7 +11292,7 @@ return {
["cs"]="rightspeech",
["de"]="rightspeech",
["en"]="rightspeech",
- ["fr"]="rightspeech",
+ ["fr"]="discoursdroite",
["it"]="rightspeech",
["nl"]="rechteruitspraak",
["pe"]="سخنرانی‌راست",
@@ -10280,7 +11322,7 @@ return {
["cs"]="textvpravo",
["de"]="rechtertext",
["en"]="righttext",
- ["fr"]="textedroit",
+ ["fr"]="textedroite",
["it"]="testodestro",
["nl"]="rechtertekst",
["pe"]="متن‌راست",
@@ -10298,12 +11340,11 @@ return {
},
["rightwords"]={
["en"]="rightwords",
- },
- ["rightchars"]={
- ["en"]="rightchars",
+ ["fr"]="motsdroite",
},
["roffset"]={
["en"]="roffset",
+ ["fr"]="decalager",
},
["rotation"]={
["cs"]="rotace",
@@ -10319,7 +11360,7 @@ return {
["cs"]="linka",
["de"]="linie",
["en"]="rule",
- ["fr"]="ligne",
+ ["fr"]="trait",
["it"]="linea",
["nl"]="lijn",
["pe"]="خط",
@@ -10329,7 +11370,7 @@ return {
["cs"]="barvalinky",
["de"]="linienfarbe",
["en"]="rulecolor",
- ["fr"]="couleurligne",
+ ["fr"]="couleurtrait",
["it"]="colorelinea",
["nl"]="lijnkleur",
["pe"]="رنگ‌خط",
@@ -10337,13 +11378,14 @@ return {
},
["rulecommand"]={
["en"]="rulecommand",
+ ["fr"]="commandetrait",
["nl"]="lijncommando",
},
["rulethickness"]={
["cs"]="tloustkalinky",
["de"]="liniendicke",
["en"]="rulethickness",
- ["fr"]="epaisseurligne",
+ ["fr"]="epaisseurtrait",
["it"]="spessorelinea",
["nl"]="lijndikte",
["pe"]="ضخامت‌خط",
@@ -10359,12 +11401,6 @@ return {
["pe"]="همان‌صÙحه",
["ro"]="aceeasipagina",
},
- ["leftsample"]={
- ["en"]="leftsample",
- },
- ["rightsample"]={
- ["en"]="rightsample",
- },
["sample"]={
["cs"]="vzor",
["de"]="muster",
@@ -10377,9 +11413,11 @@ return {
},
["samplesize"]={
["en"]="samplesize",
+ ["fr"]="tailleechantillon",
},
["saveinlist"]={
["en"]="saveinlist",
+ ["fr"]="enregistrerdansliste",
},
["scale"]={
["cs"]="meritko",
@@ -10395,7 +11433,7 @@ return {
["cs"]="rozsah",
["de"]="bereich",
["en"]="scope",
- ["fr"]="scope",
+ ["fr"]="perimetre",
["it"]="scope",
["nl"]="scope",
["pe"]="طرح",
@@ -10423,12 +11461,15 @@ return {
},
["sectionblock"]={
["en"]="sectionblock",
+ ["fr"]="blocsection",
},
["sectionconversion"]={
["en"]="sectionconversion",
+ ["fr"]="conversionsection",
},
["sectionconversionset"]={
["en"]="sectionconversionset",
+ ["fr"]="jeuconversionsection",
},
["sectionnumber"]={
["cs"]="cislooddilu",
@@ -10442,21 +11483,27 @@ return {
},
["sectionresetset"]={
["en"]="sectionresetset",
+ ["fr"]="jeurazsection",
},
["sectionsegments"]={
["en"]="sectionsegments",
+ ["fr"]="segmentssection",
},
["sectionseparatorset"]={
["en"]="sectionseparatorset",
+ ["fr"]="jeuseparateursection",
},
["sectionset"]={
["en"]="sectionset",
+ ["fr"]="jeusection",
},
["sectionstarter"]={
["en"]="sectionstarter",
+ ["fr"]="demarreursection",
},
["sectionstopper"]={
["en"]="sectionstopper",
+ ["fr"]="stoppeursection",
},
["separator"]={
["cs"]="oddelovac",
@@ -10470,28 +11517,30 @@ return {
},
["separatorcolor"]={
["en"]="separatorcolor",
+ ["fr"]="couleurseparateur",
["nl"]="scheiderkleur",
},
["separatorstyle"]={
["en"]="separatorstyle",
+ ["fr"]="styleseparateur",
["nl"]="scheiderletter",
},
["set"]={
["cs"]="set",
["de"]="set",
["en"]="set",
- ["fr"]="set",
+ ["fr"]="regler",
["it"]="set",
["nl"]="set",
["pe"]="قراربده",
["ro"]="set",
},
["setups"]={
- ["comment"]="no translations",
["en"]="setups",
},
["shrink"]={
["en"]="shrink",
+ ["fr"]="retrecir",
["nl"]="krimp",
},
["side"]={
@@ -10508,7 +11557,7 @@ return {
["cs"]="sidealign",
["de"]="sidealign",
["en"]="sidealign",
- ["fr"]="sidealign",
+ ["fr"]="alignercote",
["it"]="sidealign",
["nl"]="zijuitlijnen",
["pe"]="تنظیم‌کنار",
@@ -10518,7 +11567,7 @@ return {
["cs"]="sidemethod",
["de"]="sidemethod",
["en"]="sidemethod",
- ["fr"]="sidemethod",
+ ["fr"]="methodecote",
["it"]="sidemethod",
["nl"]="zijmethode",
["pe"]="روش‌کنار",
@@ -10528,7 +11577,7 @@ return {
["cs"]="bocnimezeraza",
["de"]="nebennachspatium",
["en"]="sidespaceafter",
- ["fr"]="espacelateralapres",
+ ["fr"]="espacelatéralaprès",
["it"]="spaziolateraledopo",
["nl"]="zijnawit",
["pe"]="Ùضای‌کناری‌بعد",
@@ -10546,15 +11595,12 @@ return {
},
["sidespaceinbetween"]={
["en"]="sidespaceinbetween",
+ ["fr"]="espacelateralentre",
["nl"]="zijtussenwit",
},
- ["spaceafterside"]={
- ["en"]="spaceafterside",
- ["nl"]="witnazij",
- },
- ["spacebeforeside"]={
- ["en"]="spacebeforeside",
- ["nl"]="witvoorzij",
+ ["sidethreshold"]={
+ ["en"]="sidethreshold",
+ ["fr"]="seuilcote",
},
["sign"]={
["cs"]="znak",
@@ -10566,11 +11612,16 @@ return {
["pe"]="علامت",
["ro"]="semn",
},
+ ["simplecommand"]={
+ ["en"]="simplecommand",
+ ["fr"]="commandesimple",
+ ["nl"]="simpelcommando",
+ },
["size"]={
["cs"]="velikost",
["de"]="groesse",
["en"]="size",
- ["fr"]="dimension",
+ ["fr"]="taille",
["it"]="dimensione",
["nl"]="formaat",
["pe"]="اندازه",
@@ -10578,9 +11629,11 @@ return {
},
["slantedfeatures"]={
["en"]="slantedfeatures",
+ ["fr"]="fonctionnalitesincline",
},
["slantedfont"]={
["en"]="slantedfont",
+ ["fr"]="policeinclinee",
},
["small"]={
["cs"]="male",
@@ -10594,22 +11647,26 @@ return {
},
["smallcapsfeatures"]={
["en"]="smallcapsfeatures",
+ ["fr"]="fonctionnalitespetitescaps",
},
["smallcapsfont"]={
["en"]="smallcapsfont",
+ ["fr"]="policepetitescaps",
},
["solution"]={
["en"]="solution",
+ ["fr"]="solution",
["nl"]="oplossing",
},
["sort"]={
["en"]="sort",
+ ["fr"]="trier",
},
["sorttype"]={
["cs"]="sorttype",
["de"]="sorttype",
["en"]="sorttype",
- ["fr"]="sorttype",
+ ["fr"]="modetri",
["it"]="sorttype",
["nl"]="sortering",
["pe"]="ترتیب‌تایپ",
@@ -10619,7 +11676,7 @@ return {
["cs"]="zdroj",
["de"]="quelle",
["en"]="source",
- ["fr"]="origine",
+ ["fr"]="source",
["it"]="origine",
["nl"]="bron",
["pe"]="منبع",
@@ -10639,12 +11696,17 @@ return {
["cs"]="mezeraza",
["de"]="nachspatium",
["en"]="spaceafter",
- ["fr"]="espaceapres",
+ ["fr"]="espaceaprès",
["it"]="spaziodopo",
["nl"]="nawit",
["pe"]="Ùضا‌بعداز",
["ro"]="spatiudupa",
},
+ ["spaceafterside"]={
+ ["en"]="spaceafterside",
+ ["fr"]="espaceaprèscoté",
+ ["nl"]="witnazij",
+ },
["spacebefore"]={
["cs"]="mezerapred",
["de"]="vorspatium",
@@ -10655,11 +11717,16 @@ return {
["pe"]="Ùضا‌قبل‌از",
["ro"]="spatiuinainte",
},
+ ["spacebeforeside"]={
+ ["en"]="spacebeforeside",
+ ["fr"]="espaceavantcote",
+ ["nl"]="witvoorzij",
+ },
["spaceinbetween"]={
["cs"]="spaceinbetween",
["de"]="spaceinbetween",
["en"]="spaceinbetween",
- ["fr"]="spaceinbetween",
+ ["fr"]="espaceentre",
["it"]="spaceinbetween",
["nl"]="tussenwit",
["pe"]="Ùضا‌دربین",
@@ -10677,12 +11744,13 @@ return {
},
["specification"]={
["en"]="specification",
+ ["fr"]="specification",
},
["split"]={
["cs"]="split",
["de"]="split",
["en"]="split",
- ["fr"]="split",
+ ["fr"]="partager",
["it"]="separa",
["nl"]="splitsen",
["pe"]="شکاÙتن",
@@ -10692,7 +11760,7 @@ return {
["cs"]="splitcolor",
["de"]="splitcolor",
["en"]="splitcolor",
- ["fr"]="splitcolor",
+ ["fr"]="couleurpartage",
["it"]="splitcolor",
["nl"]="splitskleur",
["pe"]="شکاÙتن‌رنگ",
@@ -10702,7 +11770,7 @@ return {
["cs"]="splitmethod",
["de"]="splitmethod",
["en"]="splitmethod",
- ["fr"]="splitmethod",
+ ["fr"]="methodepartage",
["it"]="splitmethod",
["nl"]="splitsmethode",
["pe"]="روش‌شکاÙتن",
@@ -10712,7 +11780,7 @@ return {
["cs"]="splitoffset",
["de"]="splitoffset",
["en"]="splitoffset",
- ["fr"]="splitoffset",
+ ["fr"]="decalagepartage",
["it"]="splitoffset",
["nl"]="splitsoffset",
["pe"]="شکاÙتن‌آÙست",
@@ -10722,7 +11790,7 @@ return {
["cs"]="spot",
["de"]="spot",
["en"]="spot",
- ["fr"]="spot",
+ ["fr"]="tondirect",
["it"]="spot",
["nl"]="spot",
["pe"]="Ù„Ú©Ù‡",
@@ -10732,7 +11800,7 @@ return {
["cs"]="stack",
["de"]="stack",
["en"]="stack",
- ["fr"]="stack",
+ ["fr"]="pile",
["it"]="stack",
["nl"]="stapel",
["pe"]="توده",
@@ -10740,13 +11808,14 @@ return {
},
["stackname"]={
["en"]="stackname",
+ ["fr"]="nompile",
["nl"]="stapelnaam",
},
["start"]={
["cs"]="start",
["de"]="start",
["en"]="start",
- ["fr"]="demarre",
+ ["fr"]="début",
["it"]="inizia",
["nl"]="start",
["pe"]="شروع",
@@ -10754,13 +11823,14 @@ return {
},
["starter"]={
["en"]="starter",
+ ["fr"]="demarreur",
["nl"]="opener",
},
["state"]={
["cs"]="status",
["de"]="status",
["en"]="state",
- ["fr"]="etat",
+ ["fr"]="état",
["it"]="stato",
["nl"]="status",
["pe"]="وضعیت",
@@ -10770,7 +11840,7 @@ return {
["cs"]="krok",
["de"]="schritt",
["en"]="step",
- ["fr"]="pas",
+ ["fr"]="etape",
["it"]="passo",
["nl"]="stap",
["pe"]="گام",
@@ -10780,7 +11850,7 @@ return {
["cs"]="stop",
["de"]="stop",
["en"]="stop",
- ["fr"]="stoppe",
+ ["fr"]="fin",
["it"]="termina",
["nl"]="stop",
["pe"]="پایان",
@@ -10790,7 +11860,7 @@ return {
["cs"]="predel",
["de"]="abschnitttrenner",
["en"]="stopper",
- ["fr"]="taquet",
+ ["fr"]="stoppeur",
["it"]="stopper",
["nl"]="afsluiter",
["pe"]="ایست",
@@ -10800,7 +11870,7 @@ return {
["cs"]="natahnout",
["de"]="strecken",
["en"]="stretch",
- ["fr"]="etire",
+ ["fr"]="etirer",
["it"]="dilata",
["nl"]="rek",
["pe"]="کشیدن",
@@ -10808,25 +11878,18 @@ return {
},
["strip"]={
["en"]="strip",
+ ["fr"]="bande",
},
["strut"]={
["cs"]="strut",
["de"]="strut",
["en"]="strut",
- ["fr"]="strut",
+ ["fr"]="entretoise",
["it"]="strut",
["nl"]="strut",
["pe"]="بست",
["ro"]="strut",
},
- ["numberstrut"]={
- ["en"]="numberstrut",
- ["nl"]="nummerstrut",
- },
- ["titlestrut"]={
- ["en"]="titlestrut",
- ["nl"]="titelstrut",
- },
["style"]={
["cs"]="pismeno",
["de"]="stil",
@@ -10837,6 +11900,11 @@ return {
["pe"]="سبک",
["ro"]="stil",
},
+ ["stylealternative"]={
+ ["en"]="stylealternative",
+ ["fr"]="variantestyle",
+ ["nl"]="stylevariant",
+ },
["sub"]={
["cs"]="pod",
["de"]="unter",
@@ -10861,7 +11929,7 @@ return {
["cs"]="suffix",
["de"]="suffix",
["en"]="suffix",
- ["fr"]="suffix",
+ ["fr"]="suffixe",
["it"]="suffix",
["nl"]="suffix",
["pe"]="پسوند",
@@ -10869,23 +11937,29 @@ return {
},
["suffixseparator"]={
["en"]="suffixseparator",
+ ["fr"]="separateursuffixe",
["nl"]="suffixscheider",
},
["suffixstopper"]={
["en"]="suffixstopper",
+ ["fr"]="stoppeursuffixe",
["nl"]="suffixafsluiter",
},
["surnamefirstnamesep"]={
["en"]="surnamefirstnamesep",
+ ["fr"]="sepnomfamilleprenom",
},
["surnameinitialsep"]={
["en"]="surnameinitialsep",
+ ["fr"]="sepnomfamilleinitial",
},
["surnamesep"]={
["en"]="surnamesep",
+ ["fr"]="seprenom",
},
["svgstyle"]={
["en"]="svgstyle",
+ ["fr"]="stylesvg",
},
["sx"]={
["cs"]="sx",
@@ -10911,7 +11985,7 @@ return {
["cs"]="symzarovnani",
["de"]="symausrichtung",
["en"]="symalign",
- ["fr"]="symalignement",
+ ["fr"]="alignersym",
["it"]="symallinea",
["nl"]="symuitlijnen",
["pe"]="تنظیم‌نماد",
@@ -10929,6 +12003,7 @@ return {
},
["symbolcommand"]={
["en"]="symbolcommand",
+ ["fr"]="commandesymbole",
},
["symbolset"]={
["cs"]="sadasymbolu",
@@ -10984,7 +12059,7 @@ return {
["cs"]="synonymcommand",
["de"]="synonymbefehl",
["en"]="synonymcommand",
- ["fr"]="synonymcommand",
+ ["fr"]="commandesynonyme",
["it"]="synonymcommand",
["nl"]="synoniemcommando",
["pe"]="synonymcommand",
@@ -11022,6 +12097,7 @@ return {
},
["textalign"]={
["en"]="textalign",
+ ["fr"]="alignertexte",
},
["textcolor"]={
["cs"]="barvatextu",
@@ -11087,7 +12163,7 @@ return {
["cs"]="textmethod",
["de"]="textmethod",
["en"]="textmethod",
- ["fr"]="textmethod",
+ ["fr"]="methodetexte",
["it"]="textmethod",
["nl"]="tekstmethode",
["pe"]="روش‌متن",
@@ -11145,15 +12221,12 @@ return {
},
["threshold"]={
["en"]="threshold",
+ ["fr"]="seuil",
},
- ["sidethreshold"]={
- ["en"]="sidethreshold",
- },
- ["displaythreshold"]={
- ["en"]="displaythreshold",
- },
- ["inlinethreshold"]={
- ["en"]="inlinethreshold",
+ ["time"]={
+ ["en"]="time",
+ ["fr"]="temps",
+ ["nl"]="tijd",
},
["title"]={
["cs"]="titul",
@@ -11175,15 +12248,11 @@ return {
["pe"]="رنگ‌عنوان",
["ro"]="culoaretitlu",
},
- ["simplecommand"]={
- ["en"]="simplecommand",
- ["nl"]="simpelcommando",
- },
["titlecommand"]={
["cs"]="titlecommand",
["de"]="titlecommand",
["en"]="titlecommand",
- ["fr"]="titlecommand",
+ ["fr"]="commandetitre",
["it"]="titlecommand",
["nl"]="titelcommando",
["pe"]="Ùرمان‌عنوان",
@@ -11203,7 +12272,7 @@ return {
["cs"]="titleleft",
["de"]="titleleft",
["en"]="titleleft",
- ["fr"]="titleleft",
+ ["fr"]="gauchetitre",
["it"]="titleleft",
["nl"]="titellinks",
["pe"]="عنوان‌چپ",
@@ -11213,12 +12282,17 @@ return {
["cs"]="titleright",
["de"]="titleright",
["en"]="titleright",
- ["fr"]="titleright",
+ ["fr"]="droitetitre",
["it"]="titleright",
["nl"]="titelrechts",
["pe"]="عنوان‌راست",
["ro"]="titleright",
},
+ ["titlestrut"]={
+ ["en"]="titlestrut",
+ ["fr"]="entretoisetitre",
+ ["nl"]="titelstrut",
+ },
["titlestyle"]={
["cs"]="styltitulek",
["de"]="titelstil",
@@ -11241,6 +12315,7 @@ return {
},
["toffset"]={
["en"]="toffset",
+ ["fr"]="decalaget",
},
["tolerance"]={
["cs"]="tolerance",
@@ -11256,7 +12331,7 @@ return {
["cs"]="vrsek",
["de"]="oben",
["en"]="top",
- ["fr"]="sup",
+ ["fr"]="haut",
["it"]="cima",
["nl"]="boven",
["pe"]="بالا",
@@ -11264,13 +12339,14 @@ return {
},
["topcommand"]={
["en"]="topcommand",
+ ["fr"]="commandehaut",
["nl"]="bovencommando",
},
["topdistance"]={
["cs"]="vzdalenostvrsku",
["de"]="obenabstand",
["en"]="topdistance",
- ["fr"]="distancesup",
+ ["fr"]="distancehaut",
["it"]="distanzacima",
["nl"]="bovenafstand",
["pe"]="Ùاصله‌بالا",
@@ -11280,7 +12356,7 @@ return {
["cs"]="rameceknahore",
["de"]="obenrahmen",
["en"]="topframe",
- ["fr"]="cadresup",
+ ["fr"]="cadrehaut",
["it"]="cornicecima",
["nl"]="bovenkader",
["pe"]="قالب‌راست",
@@ -11290,7 +12366,7 @@ return {
["cs"]="offsetvrsku",
["de"]="obenoffset",
["en"]="topoffset",
- ["fr"]="decalagesup",
+ ["fr"]="decalagehaut",
["it"]="offsetcima",
["nl"]="bovenoffset",
["pe"]="Ø¢Ùست‌بالا",
@@ -11300,7 +12376,7 @@ return {
["cs"]="svrchnimezera",
["de"]="kopfspatium",
["en"]="topspace",
- ["fr"]="espacesup",
+ ["fr"]="espacehaut",
["it"]="spaziocima",
["nl"]="kopwit",
["pe"]="Ùضای‌بالا",
@@ -11310,7 +12386,7 @@ return {
["cs"]="statusvrsku",
["de"]="statusoben",
["en"]="topstate",
- ["fr"]="etatsup",
+ ["fr"]="etathaut",
["it"]="statocima",
["nl"]="bovenstatus",
["pe"]="وضعیت‌بالا",
@@ -11318,22 +12394,26 @@ return {
},
["totalnumber"]={
["en"]="totalnumber",
+ ["fr"]="nombretotal",
},
["transform"]={
- ["en"]="transform",
- ["nl"]="transformatie",
+ ["en"]="transform",
+ ["fr"]="transformer",
+ ["nl"]="transformatie",
},
["translate"]={
["en"]="translate",
+ ["fr"]="traduire",
},
["trimoffset"]={
["en"]="trimoffset",
+ ["fr"]="decalagecoupe",
},
["type"]={
["cs"]="typ",
["de"]="typ",
["en"]="type",
- ["fr"]="type",
+ ["fr"]="transcrire",
["it"]="type",
["nl"]="type",
["pe"]="تایپ",
@@ -11361,12 +12441,13 @@ return {
},
["up"]={
["en"]="up",
+ ["fr"]="enhaut",
},
["urlalternative"]={
["cs"]="urlalternativa",
["de"]="urlalternative",
["en"]="urlalternative",
- ["fr"]="alternativeurl",
+ ["fr"]="varianteurl",
["it"]="alternativaurl",
["nl"]="urlvariant",
["pe"]="urlalternative",
@@ -11382,6 +12463,10 @@ return {
["pe"]="urlspace",
["ro"]="spatiuurl",
},
+ ["userpassword"]={
+ ["en"]="userpassword",
+ ["fr"]="motdepasseutilisateur",
+ },
["validate"]={
["cs"]="validovat",
["de"]="validieren",
@@ -11394,13 +12479,14 @@ return {
},
["values"]={
["en"]="values",
+ ["fr"]="valeurs",
["nl"]="waarden",
},
["vcommand"]={
["cs"]="vprikaz",
["de"]="vbefehl",
["en"]="vcommand",
- ["fr"]="vcommande",
+ ["fr"]="commandev",
["it"]="vcomando",
["nl"]="vcommando",
["pe"]="vcommand",
@@ -11408,37 +12494,48 @@ return {
},
["vcompact"]={
["en"]="vcompact",
+ ["fr"]="compactv",
["nl"]="vcomprimeer",
},
["vector"]={
["en"]="vector",
+ ["fr"]="vecteur",
["nl"]="vector",
},
+ ["veroffset"]={
+ ["cs"]="offsethlavicky",
+ ["de"]="kopfoffset",
+ ["en"]="veroffset",
+ ["fr"]="decalagever",
+ ["it"]="veroffset",
+ ["nl"]="kopoffset",
+ ["pe"]="Ø¢Ùست‌عم",
+ ["ro"]="veroffset",
+ },
["vertical"]={
["cs"]="vertikalne",
["de"]="vertikal",
["en"]="vertical",
- ["fr"]="verticale",
+ ["fr"]="vertical",
["it"]="verticale",
["nl"]="vertikaal",
["pe"]="عمودی",
["ro"]="vertical",
},
- ["veroffset"]={
- ["cs"]="offsethlavicky",
- ["de"]="kopfoffset",
- ["en"]="veroffset",
- ["fr"]="veroffset",
- ["it"]="veroffset",
- ["nl"]="kopoffset",
- ["pe"]="Ø¢Ùست‌عم",
- ["ro"]="veroffset",
+ ["vfactor"]={
+ ["cs"]="vfaktor",
+ ["de"]="vfaktor",
+ ["en"]="vfactor",
+ ["fr"]="facteurv",
+ ["it"]="vfactor",
+ ["nl"]="vfactor",
+ ["ro"]="vfactor",
},
["vfil"]={
["cs"]="vfil",
["de"]="vfil",
["en"]="vfil",
- ["fr"]="vfil",
+ ["fr"]="remplissagev",
["it"]="vfil",
["nl"]="vfil",
["pe"]="vfil",
@@ -11446,12 +12543,13 @@ return {
},
["viewerprefix"]={
["en"]="viewerprefix",
+ ["fr"]="prefixevisualisateur",
},
["voffset"]={
["cs"]="voffset",
["de"]="voffset",
["en"]="voffset",
- ["fr"]="voffset",
+ ["fr"]="decalagev",
["it"]="voffset",
["nl"]="voffset",
["pe"]="Ø¢Ùست‌ع",
@@ -11459,12 +12557,13 @@ return {
},
["vonsep"]={
["en"]="vonsep",
+ ["fr"]="sepvon",
},
["way"]={
["cs"]="zpusob",
["de"]="art",
["en"]="way",
- ["fr"]="mode",
+ ["fr"]="maniere",
["it"]="modo",
["nl"]="wijze",
["pe"]="راه",
@@ -11474,7 +12573,7 @@ return {
["cs"]="sfaktor",
["de"]="bfaktor",
["en"]="wfactor",
- ["fr"]="facteurlargeur",
+ ["fr"]="facteurw",
["it"]="wfactor",
["nl"]="bfactor",
["pe"]="wfactor",
@@ -11502,12 +12601,18 @@ return {
},
["words"]={
["en"]="words",
+ ["fr"]="mots",
+ },
+ ["xanchor"]={
+ ["en"]="xanchor",
+ ["fr"]="ancrex",
+ ["nl"]="xanker",
},
["xfactor"]={
["cs"]="xfaktor",
["de"]="xfaktor",
["en"]="xfactor",
- ["fr"]="xfactor",
+ ["fr"]="facteurx",
["it"]="xfactor",
["nl"]="xfactor",
["pe"]="Ùاکتورایکس",
@@ -11515,6 +12620,7 @@ return {
},
["xhtml"]={
["en"]="xhtml",
+ ["fr"]="xhtml",
},
["xmax"]={
["cs"]="xmax",
@@ -11528,16 +12634,13 @@ return {
},
["xmlsetup"]={
["en"]="xmlsetup",
- },
- ["xanchor"]={
- ["en"]="xanchor",
- ["nl"]="xanker",
+ ["fr"]="configurationxml",
},
["xoffset"]={
["cs"]="xoffset",
["de"]="xoffset",
["en"]="xoffset",
- ["fr"]="xoffset",
+ ["fr"]="decalagex",
["it"]="xoffset",
["nl"]="xoffset",
["pe"]="Ø¢Ùست‌ایکس",
@@ -11547,7 +12650,7 @@ return {
["cs"]="xmeritko",
["de"]="xformat",
["en"]="xscale",
- ["fr"]="xscale",
+ ["fr"]="echellex",
["it"]="xscale",
["nl"]="xschaal",
["pe"]="مقیاس‌ایکس",
@@ -11557,17 +12660,22 @@ return {
["cs"]="xkrok",
["de"]="xschritt",
["en"]="xstep",
- ["fr"]="xstep",
+ ["fr"]="etapex",
["it"]="xstep",
["nl"]="xstap",
["pe"]="گام‌ایکس",
["ro"]="xstep",
},
+ ["yanchor"]={
+ ["en"]="yanchor",
+ ["fr"]="ancrey",
+ ["nl"]="yanker",
+ },
["yfactor"]={
["cs"]="yfaktor",
["de"]="yfaktor",
["en"]="yfactor",
- ["fr"]="yfactor",
+ ["fr"]="facteury",
["it"]="yfactor",
["nl"]="yfactor",
["pe"]="Ùاکتوروای",
@@ -11583,15 +12691,11 @@ return {
["pe"]="ymax",
["ro"]="ymax",
},
- ["yanchor"]={
- ["en"]="yanchor",
- ["nl"]="yanker",
- },
["yoffset"]={
["cs"]="yoffset",
["de"]="yoffset",
["en"]="yoffset",
- ["fr"]="yoffset",
+ ["fr"]="decalagey",
["it"]="yoffset",
["nl"]="yoffset",
["pe"]="Ø¢Ùست‌وای",
@@ -11601,7 +12705,7 @@ return {
["cs"]="ymeritko",
["de"]="yformat",
["en"]="yscale",
- ["fr"]="yscale",
+ ["fr"]="echelley",
["it"]="yscale",
["nl"]="yschaal",
["pe"]="مقیاس‌وای",
@@ -11611,25 +12715,19 @@ return {
["cs"]="ykrok",
["de"]="yschritt",
["en"]="ystep",
- ["fr"]="ystep",
+ ["fr"]="etapey",
["it"]="ystep",
["nl"]="ystap",
["pe"]="گام‌وای",
["ro"]="ystep",
},
- ["ownerpassword"]={
- ["en"]="ownerpassword",
- },
- ["userpassword"]={
- ["en"]="userpassword",
- },
},
["elements"]={
["answerlines"]={
["cs"]="answerlines",
["de"]="answerlines",
["en"]="answerlines",
- ["fr"]="answerlines",
+ ["fr"]="lignesreponse",
["it"]="answerlines",
["nl"]="antwoordregels",
["pe"]="answerlines",
@@ -11639,7 +12737,7 @@ return {
["cs"]="answerspace",
["de"]="answerspace",
["en"]="answerspace",
- ["fr"]="answerspace",
+ ["fr"]="espacereponse",
["it"]="answerspace",
["nl"]="antwoordruimte",
["pe"]="answerspace",
@@ -11649,7 +12747,7 @@ return {
["cs"]="zacatek",
["de"]="anfang",
["en"]="begin",
- ["fr"]="debut",
+ ["fr"]="commencer",
["it"]="inizio",
["nl"]="beginvan",
["pe"]="عنصرها",
@@ -11659,7 +12757,7 @@ return {
["cs"]="uplny",
["de"]="vollende",
["en"]="complete",
- ["fr"]="complete",
+ ["fr"]="complet",
["it"]="completo",
["nl"]="volledige",
["pe"]="کامل",
@@ -11689,7 +12787,7 @@ return {
["cs"]="konec",
["de"]="ende",
["en"]="end",
- ["fr"]="fin",
+ ["fr"]="terminer",
["it"]="fine",
["nl"]="eindvan",
["pe"]="انتها",
@@ -11709,7 +12807,7 @@ return {
["cs"]="ziskat",
["de"]="get",
["en"]="get",
- ["fr"]="obtient",
+ ["fr"]="obtenir",
["it"]="prendi",
["nl"]="haal",
["pe"]="بگیر",
@@ -11719,7 +12817,7 @@ return {
["cs"]="zvysit",
["de"]="erhoehen",
["en"]="increment",
- ["fr"]="incremente",
+ ["fr"]="incrementer",
["it"]="incrementa",
["nl"]="verhoog",
["pe"]="اÙزایش",
@@ -11749,7 +12847,7 @@ return {
["cs"]="nacist",
["de"]="laden",
["en"]="load",
- ["fr"]="charge",
+ ["fr"]="charger",
["it"]="carica",
["nl"]="laad",
["pe"]="بارگذاشتن",
@@ -11769,7 +12867,7 @@ return {
["cs"]="zlom",
["de"]="umbruch",
["en"]="makeup",
- ["fr"]="makeup",
+ ["fr"]="composition",
["it"]="makeup",
["nl"]="opmaak",
["pe"]="آرایش",
@@ -11789,7 +12887,7 @@ return {
["cs"]="umisti",
["de"]="platziere",
["en"]="place",
- ["fr"]="place",
+ ["fr"]="placer",
["it"]="metti",
["nl"]="plaats",
["pe"]="مکان",
@@ -11829,7 +12927,7 @@ return {
["cs"]="viz",
["de"]="sieh",
["en"]="see",
- ["fr"]="voit",
+ ["fr"]="voir",
["it"]="vedi",
["nl"]="zie",
["pe"]="ببینید",
@@ -11839,7 +12937,7 @@ return {
["cs"]="nastaveni",
["de"]="stelle",
["en"]="setup",
- ["fr"]="regle",
+ ["fr"]="configurer",
["it"]="imposta",
["nl"]="stel",
["pe"]="بارگذاری",
@@ -11849,7 +12947,7 @@ return {
["cs"]="start",
["de"]="start",
["en"]="start",
- ["fr"]="demarre",
+ ["fr"]="début",
["it"]="inizia",
["nl"]="start",
["pe"]="شروع",
@@ -11859,7 +12957,7 @@ return {
["cs"]="stop",
["de"]="stop",
["en"]="stop",
- ["fr"]="stoppe",
+ ["fr"]="fin",
["it"]="termina",
["nl"]="stop",
["pe"]="پایان",
@@ -11879,23 +12977,777 @@ return {
["cs"]="opis",
["de"]="type",
["en"]="type",
- ["fr"]="type",
+ ["fr"]="transcrire",
["it"]="type",
["nl"]="type",
["pe"]="تایپ",
["ro"]="type",
},
},
- ["variables"]={
- ["aside"]={
- ["en"]="aside",
+ ["setupstrings"]={
+ ["cd:angle-l"]={
+ ["en"]="<<...>>",
},
- ["ordinal"]={
- ["en"]="ordinal",
+ ["cd:angle-s"]={
+ ["en"]="<<...>>",
},
- ["Ordinal"]={
- ["en"]="Ordinal",
+ ["cd:apply-l"]={
+ ["en"]="[..,..=>..,..]",
+ },
+ ["cd:apply-s"]={
+ ["en"]="[..=>..]",
+ },
+ ["cd:assignment-l"]={
+ ["en"]="[..,..=..,..]",
+ ["lua"]="{ ..,..=..,.. } ",
+ },
+ ["cd:assignment-s"]={
+ ["en"]="[..=..]",
+ ["lua"]="{ ..=.. } ",
+ },
+ ["cd:assignmentbraces-l"]={
+ ["en"]="{..,..=..,..}",
+ },
+ ["cd:assignmentbraces-s"]={
+ ["en"]="{..=..}",
+ },
+ ["cd:assignmentbrackets-l"]={
+ ["en"]="[..,..=..,..]",
+ ["lua"]="{ ..,..=..,.. } ",
+ },
+ ["cd:assignmentbrackets-s"]={
+ ["en"]="[..=..]",
+ ["lua"]="{ ..=.. } ",
+ },
+ ["cd:assignmentparentheses-l"]={
+ ["en"]="(..,..=..,..)",
+ },
+ ["cd:assignmentparentheses-s"]={
+ ["en"]="(..=..)",
+ },
+ ["cd:braces-l"]={
+ ["en"]="{...,...}",
+ ["lua"]=".. ... ..",
+ },
+ ["cd:braces-s"]={
+ ["en"]="{...}",
+ ["lua"]="\"...\"",
+ },
+ ["cd:brackets-l"]={
+ ["en"]="[...,...]",
+ ["lua"]="{..., ...}",
+ },
+ ["cd:brackets-s"]={
+ ["en"]="[...]",
+ ["lua"]="{ ... }",
+ },
+ ["cd:buffer"]={
+ ["cs"]="buffer",
+ ["de"]="buffer",
+ ["en"]="buffer",
+ ["fr"]="tampon",
+ ["it"]="buffer",
+ ["nl"]="buffer",
+ ["ro"]="buffer",
+ },
+ ["cd:case-l"]={
+ ["en"]="\\case ",
+ },
+ ["cd:case-s"]={
+ ["en"]="\\case ",
+ },
+ ["cd:category"]={
+ ["cs"]="category",
+ ["de"]="category",
+ ["en"]="category",
+ ["fr"]="categorie",
+ ["it"]="category",
+ ["nl"]="category",
+ ["ro"]="category",
+ },
+ ["cd:character"]={
+ ["cs"]="character",
+ ["de"]="character",
+ ["en"]="character",
+ ["fr"]="caractere",
+ ["it"]="character",
+ ["nl"]="karakter",
+ ["ro"]="character",
+ },
+ ["cd:color"]={
+ ["cs"]="color",
+ ["de"]="color",
+ ["en"]="color",
+ ["fr"]="couleur",
+ ["it"]="color",
+ ["nl"]="kleur",
+ ["ro"]="color",
+ },
+ ["cd:column"]={
+ ["cs"]="column",
+ ["de"]="column",
+ ["en"]="column",
+ ["fr"]="colonne",
+ ["it"]="column",
+ ["nl"]="kolom",
+ ["ro"]="column",
+ },
+ ["cd:command"]={
+ ["cs"]="Befehl",
+ ["de"]="Befehl",
+ ["en"]="command",
+ ["fr"]="commande",
+ ["it"]="Befehl",
+ ["nl"]="commando",
+ ["ro"]="Befehl",
+ },
+ ["cd:content"]={
+ ["cs"]="content",
+ ["de"]="content",
+ ["en"]="content",
+ ["fr"]="contenu",
+ ["it"]="content",
+ ["nl"]="inhoud",
+ ["ro"]="content",
+ },
+ ["cd:content-l"]={
+ ["en"]="{.. ... ..}",
+ ["lua"]="\".. ... ..\"",
+ },
+ ["cd:content-s"]={
+ ["en"]="{...}",
+ ["lua"]="\"...\"",
+ },
+ ["cd:csname"]={
+ ["cs"]="csname",
+ ["de"]="csname",
+ ["en"]="csname",
+ ["fr"]="nomsc",
+ ["it"]="csname",
+ ["nl"]="naam",
+ ["ro"]="csname",
+ },
+ ["cd:csname-l"]={
+ ["en"]="\\...",
+ },
+ ["cd:csname-s"]={
+ ["en"]="\\...",
+ },
+ ["cd:delimiter"]={
+ ["cs"]="delimiter",
+ ["de"]="delimiter",
+ ["en"]="delimiter",
+ ["fr"]="delimiteur",
+ ["it"]="delimiter",
+ ["nl"]="delimiter",
+ ["ro"]="delimiter",
+ },
+ ["cd:destination"]={
+ ["cs"]="destination",
+ ["de"]="destination",
+ ["en"]="destination",
+ ["fr"]="destination",
+ ["it"]="destination",
+ ["nl"]="bestemming",
+ ["ro"]="destination",
+ },
+ ["cd:destination-l"]={
+ ["en"]="[..,{..[ref,..]},..]",
+ },
+ ["cd:destination-s"]={
+ ["en"]="[{..[ref]}]",
+ },
+ ["cd:dimension"]={
+ ["cs"]="Dimension",
+ ["de"]="Dimension",
+ ["en"]="dimension",
+ ["fr"]="dimension",
+ ["it"]="Dimension",
+ ["nl"]="maat",
+ ["ro"]="Dimension",
+ },
+ ["cd:displaymath"]={
+ ["cs"]="formula",
+ ["de"]="formula",
+ ["en"]="formula",
+ ["fr"]="affichemath",
+ ["it"]="formula",
+ ["nl"]="formule",
+ ["ro"]="formula",
+ },
+ ["cd:displaymath-l"]={
+ ["en"]="$$...$$",
+ },
+ ["cd:displaymath-s"]={
+ ["en"]="$$...$$",
+ },
+ ["cd:else-l"]={
+ ["en"]="\\else ",
+ },
+ ["cd:else-s"]={
+ ["en"]="\\else ",
+ },
+ ["cd:false"]={
+ ["cs"]="false",
+ ["de"]="false",
+ ["en"]="false",
+ ["fr"]="faux",
+ ["it"]="false",
+ ["nl"]="false",
+ ["ro"]="false",
+ },
+ ["cd:fi-l"]={
+ ["en"]="\\fi ",
+ },
+ ["cd:fi-s"]={
+ ["en"]="\\fi ",
+ },
+ ["cd:file"]={
+ ["cs"]="file",
+ ["de"]="file",
+ ["en"]="file",
+ ["fr"]="fichier",
+ ["it"]="file",
+ ["nl"]="file",
+ ["ro"]="file",
+ },
+ ["cd:file-l"]={
+ ["en"]=" ... ",
+ },
+ ["cd:file-s"]={
+ ["en"]=" ... ",
+ },
+ ["cd:first"]={
+ ["cs"]="first",
+ ["de"]="first",
+ ["en"]="first",
+ ["fr"]="premier",
+ ["it"]="first",
+ ["nl"]="eerste",
+ ["ro"]="first",
+ },
+ ["cd:font"]={
+ ["cs"]="font",
+ ["de"]="font",
+ ["en"]="font",
+ ["fr"]="police",
+ ["it"]="font",
+ ["nl"]="font",
+ ["ro"]="font",
+ },
+ ["cd:formula"]={
+ ["cs"]="Formel",
+ ["de"]="Formel",
+ ["en"]="formula",
+ ["fr"]="formule",
+ ["it"]="Formel",
+ ["nl"]="formule",
+ ["ro"]="Formel",
+ },
+ ["cd:identifier"]={
+ ["cs"]="Name",
+ ["de"]="Name",
+ ["en"]="identifier",
+ ["fr"]="identifiant",
+ ["it"]="Name",
+ ["nl"]="naam",
+ ["ro"]="Name",
+ },
+ ["cd:if-l"]={
+ ["en"]="\\if... ",
+ },
+ ["cd:if-s"]={
+ ["en"]="\\if... ",
+ },
+ ["cd:index"]={
+ ["cs"]="entry",
+ ["de"]="entry",
+ ["en"]="entry",
+ ["fr"]="index",
+ ["it"]="entry",
+ ["nl"]="ingang",
+ ["ro"]="entry",
+ },
+ ["cd:index-l"]={
+ ["en"]="{..+...+..}",
+ },
+ ["cd:index-s"]={
+ ["en"]="{...}",
+ },
+ ["cd:inherits"]={
+ ["cs"]="inherits",
+ ["de"]="inherits",
+ ["en"]="inherits",
+ ["fr"]="heritede",
+ ["it"]="inherits",
+ ["nl"]="erft",
+ ["ro"]="inherits",
+ },
+ ["cd:inlinemath-l"]={
+ ["en"]="$...$",
+ },
+ ["cd:inlinemath-s"]={
+ ["en"]="$...$",
+ },
+ ["cd:key"]={
+ ["cs"]="key",
+ ["de"]="key",
+ ["en"]="key",
+ ["fr"]="cle",
+ ["it"]="key",
+ ["nl"]="parameter",
+ ["ro"]="key",
+ },
+ ["cd:language"]={
+ ["cs"]="sprache",
+ ["de"]="sprache",
+ ["en"]="language",
+ ["fr"]="langage",
+ ["it"]="sprache",
+ ["nl"]="taal",
+ ["ro"]="sprache",
+ },
+ ["cd:last"]={
+ ["cs"]="last",
+ ["de"]="last",
+ ["en"]="last",
+ ["fr"]="dernier",
+ ["it"]="last",
+ ["nl"]="laatste",
+ ["ro"]="last",
+ },
+ ["cd:list"]={
+ ["cs"]="Liste",
+ ["de"]="Liste",
+ ["en"]="list",
+ ["fr"]="liste",
+ ["it"]="Liste",
+ ["nl"]="lijst",
+ ["ro"]="Liste",
+ },
+ ["cd:lpath"]={
+ ["cs"]="lpath",
+ ["de"]="lpath",
+ ["en"]="lpath",
+ ["fr"]="cheminl",
+ ["it"]="lpath",
+ ["nl"]="lpath",
+ ["ro"]="lpath",
+ },
+ ["cd:luafunction"]={
+ ["cs"]="luafunction",
+ ["de"]="luafunction",
+ ["en"]="luafunction",
+ ["fr"]="fonctionlua",
+ ["it"]="luafunction",
+ ["nl"]="luafunction",
+ ["ro"]="luafunction",
+ },
+ ["cd:macro-l"]={
+ ["en"]="\\... ",
+ },
+ ["cd:macro-s"]={
+ ["en"]="\\... ",
+ },
+ ["cd:mark"]={
+ ["cs"]="Beschriftung",
+ ["de"]="Beschriftung",
+ ["en"]="mark",
+ ["fr"]="marque",
+ ["it"]="Beschriftung",
+ ["nl"]="markering",
+ ["ro"]="Beschriftung",
+ },
+ ["cd:marking"]={
+ ["cs"]="marking",
+ ["de"]="marking",
+ ["en"]="marking",
+ ["fr"]="marquage",
+ ["it"]="marking",
+ ["nl"]="markering",
+ ["ro"]="marking",
+ },
+ ["cd:math"]={
+ ["cs"]="formula",
+ ["de"]="formula",
+ ["en"]="formula",
+ ["fr"]="math",
+ ["it"]="formula",
+ ["nl"]="formule",
+ ["ro"]="formula",
+ },
+ ["cd:math-l"]={
+ ["en"]="$...$",
+ },
+ ["cd:math-s"]={
+ ["en"]="$...$",
+ },
+ ["cd:matrix"]={
+ ["cs"]="n*m",
+ ["de"]="n*m",
+ ["en"]="n*m",
+ ["fr"]="matrice",
+ ["it"]="n*m",
+ ["nl"]="n*m",
+ ["ro"]="n*m",
+ },
+ ["cd:name"]={
+ ["cs"]="Name",
+ ["de"]="Name",
+ ["en"]="name",
+ ["fr"]="nom",
+ ["it"]="Name",
+ ["nl"]="naam",
+ ["ro"]="Name",
+ },
+ ["cd:noargument-l"]={
+ ["en"]="\\...",
+ },
+ ["cd:noargument-s"]={
+ ["en"]="\\...",
+ },
+ ["cd:node"]={
+ ["cs"]="node",
+ ["de"]="node",
+ ["en"]="node",
+ ["fr"]="noeud",
+ ["it"]="node",
+ ["nl"]="node",
+ ["ro"]="node",
+ },
+ ["cd:none-l"]={
+ ["en"]=".. ... ..",
+ },
+ ["cd:none-s"]={
+ ["en"]="...",
+ },
+ ["cd:nothing"]={
+ ["cs"]="empty",
+ ["de"]="empty",
+ ["en"]="empty",
+ ["fr"]="rien",
+ ["it"]="empty",
+ ["nl"]="leeg",
+ ["ro"]="empty",
+ },
+ ["cd:nothing-l"]={
+ ["en"]="...",
+ },
+ ["cd:nothing-s"]={
+ ["en"]="...",
+ },
+ ["cd:number"]={
+ ["cs"]="Nummer",
+ ["de"]="Nummer",
+ ["en"]="number",
+ ["fr"]="nombre",
+ ["it"]="Nummer",
+ ["nl"]="getal",
+ ["ro"]="Nummer",
+ },
+ ["cd:oneargument"]={
+ ["en"]="\\...#1",
+ },
+ ["cd:optional"]={
+ ["cs"]="opt",
+ ["de"]="opt",
+ ["en"]="opt",
+ ["fr"]="optionnel",
+ ["it"]="opt",
+ ["nl"]="opt",
+ ["ro"]="opt",
+ },
+ ["cd:or-l"]={
+ ["en"]="\\or ",
+ },
+ ["cd:or-s"]={
+ ["en"]="\\or ",
+ },
+ ["cd:par-l"]={
+ ["en"]="\\par ",
+ },
+ ["cd:par-s"]={
+ ["en"]="\\par ",
+ },
+ ["cd:parenthesis-l"]={
+ ["en"]="(...,...)",
+ },
+ ["cd:parenthesis-s"]={
+ ["en"]="(...)",
+ },
+ ["cd:path"]={
+ ["cs"]="path",
+ ["de"]="path",
+ ["en"]="path",
+ ["fr"]="chemin",
+ ["it"]="path",
+ ["nl"]="path",
+ ["ro"]="path",
+ },
+ ["cd:plural"]={
+ ["cs"]="plural",
+ ["de"]="plural",
+ ["en"]="plural",
+ ["fr"]="pluriel",
+ ["it"]="plural",
+ ["nl"]="naam",
+ ["ro"]="plural",
+ },
+ ["cd:position"]={
+ ["cs"]="position",
+ ["de"]="position",
+ ["en"]="position",
+ ["fr"]="position",
+ ["it"]="position",
+ ["nl"]="positie",
+ ["ro"]="position",
+ },
+ ["cd:position-l"]={
+ ["en"]="(...,...)",
+ },
+ ["cd:position-s"]={
+ ["en"]="(...)",
+ },
+ ["cd:processor"]={
+ ["cs"]="processor",
+ ["de"]="processor",
+ ["en"]="processor",
+ ["fr"]="processeur",
+ ["it"]="processor",
+ ["nl"]="verwerker",
+ ["ro"]="processor",
+ },
+ ["cd:reference"]={
+ ["cs"]="reference",
+ ["de"]="reference",
+ ["en"]="reference",
+ ["fr"]="reference",
+ ["it"]="reference",
+ ["nl"]="verwijzing",
+ ["ro"]="reference",
+ },
+ ["cd:reference-l"]={
+ ["en"]="[...,...]",
+ ["lua"]="{..., ...}",
+ },
+ ["cd:reference-s"]={
+ ["en"]="[...]",
+ ["lua"]="{ ... }",
+ },
+ ["cd:row"]={
+ ["cs"]="row",
+ ["de"]="row",
+ ["en"]="row",
+ ["fr"]="rang",
+ ["it"]="row",
+ ["nl"]="rij",
+ ["ro"]="row",
+ },
+ ["cd:section"]={
+ ["cs"]="Abschnitt",
+ ["de"]="Abschnitt",
+ ["en"]="section",
+ ["fr"]="section",
+ ["it"]="Abschnitt",
+ ["nl"]="sectie",
+ ["ro"]="Abschnitt",
+ },
+ ["cd:sectionblock"]={
+ ["cs"]="sectionblock",
+ ["de"]="sectionblock",
+ ["en"]="sectionblock",
+ ["fr"]="blocsection",
+ ["it"]="sectionblock",
+ ["nl"]="sectieblok",
+ ["ro"]="sectionblock",
+ },
+ ["cd:see"]={
+ ["cs"]="siehe",
+ ["de"]="siehe",
+ ["en"]="see",
+ ["fr"]="voir",
+ ["it"]="siehe",
+ ["nl"]="zie",
+ ["ro"]="siehe",
+ },
+ ["cd:sep-l"]={
+ ["en"]="\\",
+ },
+ ["cd:sep-s"]={
+ ["en"]="\\",
+ },
+ ["cd:setup"]={
+ ["cs"]="setup",
+ ["de"]="setup",
+ ["en"]="setup",
+ ["fr"]="configurer",
+ ["it"]="setup",
+ ["nl"]="setup",
+ ["ro"]="setup",
+ },
+ ["cd:sign"]={
+ ["en"]="[-+]",
+ },
+ ["cd:singular"]={
+ ["cs"]="singular",
+ ["de"]="singular",
+ ["en"]="singular",
+ ["fr"]="singulier",
+ ["it"]="singular",
+ ["nl"]="naam",
+ ["ro"]="singular",
+ },
+ ["cd:style"]={
+ ["cs"]="style",
+ ["de"]="style",
+ ["en"]="style",
+ ["fr"]="style",
+ ["it"]="style",
+ ["nl"]="letter",
+ ["ro"]="style",
+ },
+ ["cd:template"]={
+ ["cs"]="template",
+ ["de"]="template",
+ ["en"]="template",
+ ["fr"]="gabarit",
+ ["it"]="template",
+ ["nl"]="sjabloon",
+ ["ro"]="template",
+ },
+ ["cd:template-l"]={
+ ["en"]="[|...|...|]",
+ },
+ ["cd:template-s"]={
+ ["en"]="[|...|]",
+ },
+ ["cd:text"]={
+ ["cs"]="Text",
+ ["de"]="Text",
+ ["en"]="text",
+ ["fr"]="texte",
+ ["it"]="Text",
+ ["nl"]="tekst",
+ ["ro"]="Text",
+ },
+ ["cd:textual-l"]={
+ ["en"]=".. ... ..",
+ },
+ ["cd:textual-s"]={
+ ["en"]="...",
+ },
+ ["cd:threearguments"]={
+ ["en"]="\\...#1#2#3",
},
+ ["cd:threewords-l"]={
+ ["en"]="[..+..+..]",
+ },
+ ["cd:threewords-s"]={
+ ["en"]="[..+..+..]",
+ },
+ ["cd:title"]={
+ ["cs"]="Setup",
+ ["de"]="Setup",
+ ["en"]="setup",
+ ["fr"]="titre",
+ ["it"]="Setup",
+ ["nl"]="setup",
+ ["ro"]="Setup",
+ },
+ ["cd:to-l"]={
+ ["en"]="\\to ",
+ },
+ ["cd:to-s"]={
+ ["en"]="\\to ",
+ },
+ ["cd:triplet"]={
+ ["cs"]="triplet",
+ ["de"]="triplet",
+ ["en"]="triplet",
+ ["fr"]="triplet",
+ ["it"]="triplet",
+ ["nl"]="triplet",
+ ["ro"]="triplet",
+ },
+ ["cd:triplet-l"]={
+ ["en"]="[x:y:z,..]",
+ },
+ ["cd:triplet-s"]={
+ ["en"]="[x:y:z]",
+ },
+ ["cd:true"]={
+ ["cs"]="true",
+ ["de"]="true",
+ ["en"]="true",
+ ["fr"]="vrai",
+ ["it"]="true",
+ ["nl"]="true",
+ ["ro"]="true",
+ },
+ ["cd:twoarguments"]={
+ ["en"]="\\...#1#2",
+ },
+ ["cd:twowords-l"]={
+ ["en"]="[..+..]",
+ },
+ ["cd:twowords-s"]={
+ ["en"]="[..+..]",
+ },
+ ["cd:url"]={
+ ["cs"]="url",
+ ["de"]="url",
+ ["en"]="url",
+ ["fr"]="url",
+ ["it"]="url",
+ ["nl"]="url",
+ ["ro"]="url",
+ },
+ ["cd:userdata"]={
+ ["cs"]="userdata",
+ ["de"]="userdata",
+ ["en"]="userdata",
+ ["fr"]="donneesutilisateur",
+ ["it"]="userdata",
+ ["nl"]="gebruikersdata",
+ ["ro"]="userdata",
+ },
+ ["cd:value"]={
+ ["cs"]="value",
+ ["de"]="value",
+ ["en"]="value",
+ ["fr"]="valeur",
+ ["it"]="value",
+ ["nl"]="waarde",
+ ["ro"]="value",
+ },
+ ["cd:word"]={
+ ["cs"]="word",
+ ["de"]="word",
+ ["en"]="word",
+ ["fr"]="mot",
+ ["it"]="word",
+ ["nl"]="woord",
+ ["ro"]="word",
+ },
+ ["cd:word-l"]={
+ ["en"]="{.. ... ..}",
+ ["lua"]="\".. ... ..\"",
+ },
+ ["cd:word-s"]={
+ ["en"]="{...}",
+ ["lua"]="\"...\"",
+ },
+ ["cd:xmlsetup"]={
+ ["cs"]="xmlsetup",
+ ["de"]="xmlsetup",
+ ["en"]="xmlsetup",
+ ["fr"]="configurationxml",
+ ["it"]="xmlsetup",
+ ["nl"]="xmlsetup",
+ ["ro"]="xmlsetup",
+ },
+ },
+ ["variables"]={
["Addition"]={
["cs"]="Pridavek",
["de"]="Zusatz",
@@ -11908,6 +13760,7 @@ return {
},
["Alphabetic"]={
["en"]="Alphabetic",
+ ["fr"]="Alphabetique",
},
["Balloon"]={
["cs"]="Bublinka",
@@ -11933,7 +13786,7 @@ return {
["cs"]="Kapitalky",
["de"]="Versalien",
["en"]="Capital",
- ["fr"]="Capitale",
+ ["fr"]="Capitales",
["it"]="Maiuscolo",
["nl"]="Kapitaal",
["pe"]="Capital",
@@ -11943,7 +13796,7 @@ return {
["cs"]="Pismeno",
["de"]="Buchstabe",
["en"]="Character",
- ["fr"]="Caratere",
+ ["fr"]="Caractere",
["it"]="Lettera",
["nl"]="Letter",
["pe"]="Character",
@@ -11963,7 +13816,7 @@ return {
["cs"]="ZavritDokument",
["de"]="SchliesseDokument",
["en"]="CloseDocument",
- ["fr"]="FermeDocument",
+ ["fr"]="FermerDocument",
["it"]="ChiudiDocumento",
["nl"]="SluitDocument",
["pe"]="بستن‌نوشتار",
@@ -11973,7 +13826,7 @@ return {
["cs"]="UkoncitProhlizec",
["de"]="BeendeViewer",
["en"]="ExitViewer",
- ["fr"]="SortVisualisateur",
+ ["fr"]="SortirVisualisateur",
["it"]="EsciVisualizzatore",
["nl"]="VerlaatViewer",
["pe"]="خروج‌نمایشگر",
@@ -11993,7 +13846,7 @@ return {
["cs"]="FitHeight",
["de"]="HoehePassend",
["en"]="FitHeight",
- ["fr"]="AjusteHauteur",
+ ["fr"]="AdapterHauteur",
["it"]="FitHeight",
["nl"]="HoogtePassend",
["pe"]="پرکردن‌ارتÙاع",
@@ -12003,7 +13856,7 @@ return {
["cs"]="FitWidth",
["de"]="BreitePassend",
["en"]="FitWidth",
- ["fr"]="AjusteLargeur",
+ ["fr"]="AdapterLargeur",
["it"]="FitWidth",
["nl"]="BreedtePassend",
["pe"]="پرکردن‌عرض",
@@ -12013,7 +13866,7 @@ return {
["cs"]="JdiNaStranku",
["de"]="GotoPage",
["en"]="GotoPage",
- ["fr"]="VaalaPage",
+ ["fr"]="AlleraPage",
["it"]="VaiAPagina",
["nl"]="GaNaarPagina",
["pe"]="برو‌به‌صÙحه",
@@ -12043,7 +13896,7 @@ return {
["cs"]="SkryjPole",
["de"]="VerbergeFeld",
["en"]="HideField",
- ["fr"]="CacheChamp",
+ ["fr"]="CacherChamps",
["it"]="NascondiCampo",
["nl"]="VerbergVeld",
["pe"]="پنهان‌میدان",
@@ -12053,7 +13906,7 @@ return {
["cs"]="HideLayer",
["de"]="HideLayer",
["en"]="HideLayer",
- ["fr"]="CacheCalque",
+ ["fr"]="CacherCalque",
["it"]="HideLayer",
["nl"]="VerbergLaag",
["pe"]="پنهان‌لایه",
@@ -12083,7 +13936,7 @@ return {
["cs"]="NacistFormular",
["de"]="LadeFormular",
["en"]="LoadForm",
- ["fr"]="ChargeForm",
+ ["fr"]="ChargerFormulaire",
["it"]="CaricaForm",
["nl"]="LaadFormulier",
["pe"]="بارگذاشتن‌Ùرم",
@@ -12143,12 +13996,16 @@ return {
["cs"]="OpenNamedDocument",
["de"]="OpenNamedDocument",
["en"]="OpenNamedDocument",
- ["fr"]="OuvreDocumentNomme",
+ ["fr"]="OuvrirDocumentNomme",
["it"]="OpenNamedDocument",
["nl"]="OpenDocumentOpNaam",
["pe"]="بازکردن‌نوشتار‌ذخیره‌شده",
["ro"]="OpenNamedDocument",
},
+ ["Ordinal"]={
+ ["en"]="Ordinal",
+ ["fr"]="Ordinal",
+ },
["Paragraph"]={
["cs"]="Odstavec",
["de"]="Absatz",
@@ -12173,7 +14030,7 @@ return {
["cs"]="PauseRendering",
["de"]="PauseRendering",
["en"]="PauseRendering",
- ["fr"]="PauseRendering",
+ ["fr"]="PauseRendu",
["it"]="PauseRendering",
["nl"]="PauzeerRendering",
["pe"]="توقÙ‌تعبیر",
@@ -12213,7 +14070,7 @@ return {
["cs"]="VytisknoutDokument",
["de"]="DruckeDokument",
["en"]="PrintDocument",
- ["fr"]="ImprimeDocument",
+ ["fr"]="ImprimerDocument",
["it"]="StampaDocumento",
["nl"]="PrintDocument",
["pe"]="چاپ‌نوشتار",
@@ -12223,7 +14080,7 @@ return {
["cs"]="Query",
["de"]="Query",
["en"]="Query",
- ["fr"]="Query",
+ ["fr"]="Interroger",
["it"]="Richiesta",
["nl"]="RaadpleegDocument",
["pe"]="پرسش",
@@ -12233,7 +14090,7 @@ return {
["cs"]="QueryAgain",
["de"]="QueryAgain",
["en"]="QueryAgain",
- ["fr"]="QueryAgain",
+ ["fr"]="InterrogerSuivant",
["it"]="RinnovaRichiesta",
["nl"]="HerhaalRaadplegen",
["pe"]="پرسش‌دوباره",
@@ -12243,7 +14100,7 @@ return {
["cs"]="ResetFormulare",
["de"]="ZuruecksetzenFormular",
["en"]="ResetForm",
- ["fr"]="RazForm",
+ ["fr"]="RazFormulaire",
["it"]="ReimpostaForm",
["nl"]="ResetFormulier",
["pe"]="دوباره‌نشانی‌Ùرم",
@@ -12253,7 +14110,7 @@ return {
["cs"]="PokracovatFilm",
["de"]="FortsetzenFilm",
["en"]="ResumeMovie",
- ["fr"]="ReprendFilm",
+ ["fr"]="RepriseFilm",
["it"]="RiprendiFilm",
["nl"]="HervatFilm",
["pe"]="ادامه‌Ùیلم",
@@ -12263,7 +14120,7 @@ return {
["cs"]="ResumeRendering",
["de"]="ResumeRendering",
["en"]="ResumeRendering",
- ["fr"]="ResumeRendering",
+ ["fr"]="RepriseRendu",
["it"]="ResumeRendering",
["nl"]="HervatRendering",
["pe"]="ادامه‌تعبیر",
@@ -12273,7 +14130,7 @@ return {
["cs"]="PokracovatZvuk",
["de"]="ResumeSound",
["en"]="ResumeSound",
- ["fr"]="ReprendSon",
+ ["fr"]="RepriseSon",
["it"]="RiprendiSuono",
["nl"]="HervatGeluid",
["pe"]="ادامه‌صدا",
@@ -12293,7 +14150,7 @@ return {
["cs"]="UlozitDokument",
["de"]="SpeichereDokument",
["en"]="SaveDocument",
- ["fr"]="SauvegardeDocument",
+ ["fr"]="EnregistrerDocument",
["it"]="SalvaDocumento",
["nl"]="BewaarDocument",
["pe"]="ذخیره‌نوشتار",
@@ -12303,7 +14160,7 @@ return {
["cs"]="UlozitFormular",
["de"]="SpeicheFormular",
["en"]="SaveForm",
- ["fr"]="SauvegardeForm",
+ ["fr"]="EnregistrerFormulaire",
["it"]="SalvaForm",
["nl"]="BewaarFormulier",
["pe"]="ذخیره‌Ùرم",
@@ -12313,7 +14170,7 @@ return {
["cs"]="SaveNamedDocument",
["de"]="SaveNamedDocument",
["en"]="SaveNamedDocument",
- ["fr"]="SauvegardeDocumentNomme",
+ ["fr"]="EnregistrerDocumentNomme",
["it"]="SaveNamedDocument",
["nl"]="BewaarDocumentOpNaam",
["pe"]="ذخیره‌نوشتار‌بانام",
@@ -12323,7 +14180,7 @@ return {
["cs"]="HledatZnovu",
["de"]="WeiterSuchen",
["en"]="SearchAgain",
- ["fr"]="RechercheSuivant",
+ ["fr"]="ChercherSuivant",
["it"]="CercaAncora",
["nl"]="HerhaalZoeken",
["pe"]="جستجوی‌دوباره",
@@ -12333,7 +14190,7 @@ return {
["cs"]="ProhledatDokument",
["de"]="DokumentDurchsuchen",
["en"]="SearchDocument",
- ["fr"]="RechercheDocument",
+ ["fr"]="ChercherDocument",
["it"]="CercaDocumento",
["nl"]="DoorzoekDocument",
["pe"]="جستجوی‌نوشتار",
@@ -12343,7 +14200,7 @@ return {
["cs"]="UkazZalozky",
["de"]="ShowBookmarks",
["en"]="ShowBookmarks",
- ["fr"]="ShowBookmarks",
+ ["fr"]="MontrerMarquepages",
["it"]="MostraSegnalibro",
["nl"]="ShowBookmarks",
["pe"]="نمایش‌چوبخط",
@@ -12353,7 +14210,7 @@ return {
["cs"]="UkazPole",
["de"]="ZeigeFeld",
["en"]="ShowField",
- ["fr"]="MontreChamp",
+ ["fr"]="MontrerChamp",
["it"]="MostraCampo",
["nl"]="ToonVeld",
["pe"]="نمایش‌میدان",
@@ -12363,7 +14220,7 @@ return {
["cs"]="UkazNahledy",
["de"]="ShowThumbs",
["en"]="ShowThumbs",
- ["fr"]="ShowThumbs",
+ ["fr"]="MontrerVignettes",
["it"]="MostraThumbs",
["nl"]="ShowThumbs",
["pe"]="نمایش‌شصت",
@@ -12373,7 +14230,7 @@ return {
["cs"]="SpustitFilm",
["de"]="StartFilm",
["en"]="StartMovie",
- ["fr"]="DemarreFilm",
+ ["fr"]="débutFilm",
["it"]="IniziaFilm",
["nl"]="StartFilm",
["pe"]="شروع‌Ùیلم",
@@ -12383,7 +14240,7 @@ return {
["cs"]="StartRendering",
["de"]="StartRendering",
["en"]="StartRendering",
- ["fr"]="StartRendering",
+ ["fr"]="débutRendu",
["it"]="StartRendering",
["nl"]="StartRendering",
["pe"]="شروع‌تعبیر",
@@ -12393,7 +14250,7 @@ return {
["cs"]="StartZvuk",
["de"]="StartSound",
["en"]="StartSound",
- ["fr"]="DemarreSon",
+ ["fr"]="débutSon",
["it"]="IniziaSuono",
["nl"]="StartGeluid",
["pe"]="شروع‌صدا",
@@ -12403,7 +14260,7 @@ return {
["cs"]="ZastavitFilm",
["de"]="StopFilm",
["en"]="StopMovie",
- ["fr"]="StoppeFilm",
+ ["fr"]="FinFilm",
["it"]="FermaFilm",
["nl"]="StopFilm",
["pe"]="پایان‌Ùیلم",
@@ -12413,7 +14270,7 @@ return {
["cs"]="StopRendering",
["de"]="StopRendering",
["en"]="StopRendering",
- ["fr"]="StopRendering",
+ ["fr"]="FinRendu",
["it"]="StopRendering",
["nl"]="StopRendering",
["pe"]="پایان‌تعبیر",
@@ -12423,7 +14280,7 @@ return {
["cs"]="StopZvuk",
["de"]="StopSound",
["en"]="StopSound",
- ["fr"]="StoppeSon",
+ ["fr"]="FinSon",
["it"]="FermaSuono",
["nl"]="StopGeluid",
["pe"]="پایان‌صدا",
@@ -12433,7 +14290,7 @@ return {
["cs"]="PoslatFormular",
["de"]="VersendeFormular",
["en"]="SubmitForm",
- ["fr"]="SoumettreForm",
+ ["fr"]="SoumettreFormulaire",
["it"]="MandaForm",
["nl"]="VerzendFormulier",
["pe"]="تسلیم‌Ùرم",
@@ -12443,7 +14300,7 @@ return {
["cs"]="ToggleLayer",
["de"]="ToggleLayer",
["en"]="ToggleLayer",
- ["fr"]="ToggleLayer",
+ ["fr"]="BasculerCalque",
["it"]="ToggleLayer",
["nl"]="WisselLaag",
["pe"]="تغییرلایه",
@@ -12453,7 +14310,7 @@ return {
["cs"]="ZmenitProhlizec",
["de"]="WechseleViewer",
["en"]="ToggleViewer",
- ["fr"]="ChangeVisualisateur",
+ ["fr"]="BasculerVisualisateur",
["it"]="ScambiaVisualizzatore",
["nl"]="WisselViewer",
["pe"]="تغییرنمایشگر",
@@ -12473,7 +14330,7 @@ return {
["cs"]="VideLayer",
["de"]="VideLayer",
["en"]="VideLayer",
- ["fr"]="VideLayer",
+ ["fr"]="VideCalque",
["it"]="VideLayer",
["nl"]="ToonLaag",
["pe"]="VideLayer",
@@ -12563,16 +14420,12 @@ return {
["cs"]="absolutni",
["de"]="absolut",
["en"]="absolute",
- ["fr"]="absolute",
+ ["fr"]="absolu",
["it"]="assoluto",
["nl"]="absoluut",
["pe"]="قطعی",
["ro"]="absolut",
},
- ["anchor"]={
- ["en"]="anchor",
- ["nl"]="anker",
- },
["action"]={
["cs"]="akce",
["de"]="aktion",
@@ -12587,7 +14440,7 @@ return {
["cs"]="po",
["de"]="nach",
["en"]="after",
- ["fr"]="apres",
+ ["fr"]="après",
["it"]="dopo",
["nl"]="na",
["pe"]="بعداز",
@@ -12605,6 +14458,7 @@ return {
},
["alphabetic"]={
["en"]="alphabetic",
+ ["fr"]="Alphabetique",
},
["always"]={
["cs"]="vzdy",
@@ -12616,16 +14470,22 @@ return {
["pe"]="همواره",
["ro"]="totdeauna",
},
+ ["anchor"]={
+ ["en"]="anchor",
+ ["fr"]="ancre",
+ ["nl"]="anker",
+ },
["and"]={
["de"]="und",
["en"]="and",
+ ["fr"]="et",
["nl"]="en",
},
["answerarea"]={
["cs"]="answerarea",
["de"]="answerarea",
["en"]="answerarea",
- ["fr"]="answerarea",
+ ["fr"]="zonereponse",
["it"]="answerarea",
["nl"]="antwoordgebied",
["pe"]="answerarea",
@@ -12661,11 +14521,15 @@ return {
["pe"]="آوریل",
["ro"]="aprilie",
},
+ ["aside"]={
+ ["en"]="aside",
+ ["fr"]="apart",
+ },
["atleftmargin"]={
["cs"]="atleftmargin",
["de"]="atleftmargin",
["en"]="atleftmargin",
- ["fr"]="atleftmargin",
+ ["fr"]="enmargegauche",
["it"]="atleftmargin",
["nl"]="oplinkermarge",
["pe"]="درحاشیه‌چپ",
@@ -12675,7 +14539,7 @@ return {
["cs"]="naokraji",
["de"]="amrand",
["en"]="atmargin",
- ["fr"]="alamarge",
+ ["fr"]="enmarge",
["it"]="almargine",
["nl"]="opmarge",
["pe"]="درحاشیه",
@@ -12685,7 +14549,7 @@ return {
["cs"]="nastrance",
["de"]="aufseite",
["en"]="atpage",
- ["fr"]="alapage",
+ ["fr"]="enpage",
["it"]="apagina",
["nl"]="oppagina",
["pe"]="درصÙحه",
@@ -12695,7 +14559,7 @@ return {
["cs"]="atrightmargin",
["de"]="atrightmargin",
["en"]="atrightmargin",
- ["fr"]="atrightmargin",
+ ["fr"]="enmargedroite",
["it"]="atrightmargin",
["nl"]="oprechtermarge",
["pe"]="درحاشیه‌راست",
@@ -12703,13 +14567,14 @@ return {
},
["attachment"]={
["en"]="attachment",
+ ["fr"]="piecejointe",
["nl"]="aanhangsel",
},
["august"]={
["cs"]="srpen",
["de"]="august",
["en"]="august",
- ["fr"]="août",
+ ["fr"]="aout",
["it"]="agosto",
["nl"]="augustus",
["pe"]="آگوست",
@@ -12746,6 +14611,7 @@ return {
},
["autopunctuation"]={
["en"]="autopunctuation",
+ ["fr"]="autoponctuation",
},
["back"]={
["cs"]="zpet",
@@ -12771,7 +14637,7 @@ return {
["cs"]="epilogy",
["de"]="epiloge",
["en"]="backmatter",
- ["fr"]="epilogue",
+ ["fr"]="pagesdefin",
["it"]="postambolo",
["nl"]="uitleidingen",
["pe"]="پس‌مطلب",
@@ -12791,7 +14657,7 @@ return {
["cs"]="zpetnamezera",
["de"]="rumpfspatium",
["en"]="backspace",
- ["fr"]="retourarriere",
+ ["fr"]="retourarrière",
["it"]="backspace",
["nl"]="rugwit",
["pe"]="Ùضای‌پشت",
@@ -12801,7 +14667,7 @@ return {
["cs"]="zpet",
["de"]="rueckwaerts",
["en"]="backward",
- ["fr"]="retourarriere",
+ ["fr"]="enarriere",
["it"]="indietro",
["nl"]="achteruit",
["pe"]="عقب‌گرد",
@@ -12809,6 +14675,7 @@ return {
},
["bbl"]={
["en"]="bbl",
+ ["fr"]="bbl",
},
["before"]={
["cs"]="pred",
@@ -12822,16 +14689,18 @@ return {
},
["begin"]={
["en"]="begin",
+ ["fr"]="commencer",
["nl"]="begin",
},
["bib"]={
["en"]="bib",
+ ["fr"]="bib",
},
["big"]={
["cs"]="velke",
["de"]="gross",
["en"]="big",
- ["fr"]="grand",
+ ["fr"]="important",
["it"]="grande",
["nl"]="groot",
["pe"]="بزرگ",
@@ -12841,7 +14710,7 @@ return {
["cs"]="bigbodyfont",
["de"]="bigbodyfont",
["en"]="bigbodyfont",
- ["fr"]="grandepolicecorp",
+ ["fr"]="policedecorpsimportante",
["it"]="grossofontdeltesto",
["nl"]="grootkorps",
["pe"]="قلم‌بدنه‌بزرگ",
@@ -12849,13 +14718,14 @@ return {
},
["bigger"]={
["en"]="bigger",
+ ["fr"]="plusimportant",
["nl"]="groter",
},
["bigpreference"]={
["cs"]="vysokapriorita",
["de"]="grosszuegig",
["en"]="bigpreference",
- ["fr"]="grandepreference",
+ ["fr"]="preferenceimportante",
["it"]="grandepreferenza",
["nl"]="grotevoorkeur",
["pe"]="اولویت‌بزرگ",
@@ -12865,7 +14735,7 @@ return {
["cs"]="prazdny",
["de"]="blanko",
["en"]="blank",
- ["fr"]="vide",
+ ["fr"]="vierge",
["it"]="rigovuoto",
["nl"]="blanko",
["pe"]="خالی",
@@ -12873,12 +14743,13 @@ return {
},
["block"]={
["en"]="block",
+ ["fr"]="bloc",
},
["blockquote"]={
["cs"]="blockquote",
["de"]="blockquote",
["en"]="blockquote",
- ["fr"]="blockquote",
+ ["fr"]="citerbloc",
["it"]="blockquote",
["nl"]="blokcitaat",
["pe"]="نقل‌بلوک",
@@ -12888,7 +14759,7 @@ return {
["cs"]="hlavnicasti",
["de"]="haupttexte",
["en"]="bodymatter",
- ["fr"]="texteprincipal",
+ ["fr"]="pagescorpsdetexte",
["it"]="testiprincipali",
["nl"]="hoofdteksten",
["pe"]="مطلب‌بدنه",
@@ -12918,7 +14789,7 @@ return {
["cs"]="tucnekurzivni",
["de"]="fettitalic",
["en"]="bolditalic",
- ["fr"]="italiquegras",
+ ["fr"]="grasitalique",
["it"]="grassettocorsivo",
["nl"]="vetitalic",
["pe"]="ایتالیک‌مشکی",
@@ -12928,7 +14799,7 @@ return {
["cs"]="tucnesklonene",
["de"]="fettgeneigt",
["en"]="boldslanted",
- ["fr"]="inclinegras",
+ ["fr"]="grasincline",
["it"]="grassettoinclinato",
["nl"]="vetschuin",
["pe"]="خوابیده‌مشکی",
@@ -12948,7 +14819,7 @@ return {
["cs"]="obe",
["de"]="beide",
["en"]="both",
- ["fr"]="lesdeux",
+ ["fr"]="chacun",
["it"]="entrambi",
["nl"]="beide",
["pe"]="هردو",
@@ -12956,12 +14827,13 @@ return {
},
["bothtext"]={
["en"]="bothtext",
+ ["fr"]="textechacun",
},
["bottom"]={
["cs"]="spodek",
["de"]="unten",
["en"]="bottom",
- ["fr"]="inf",
+ ["fr"]="bas",
["it"]="fondo",
["nl"]="onder",
["pe"]="پایین",
@@ -12969,6 +14841,7 @@ return {
},
["box"]={
["en"]="box",
+ ["fr"]="boite",
},
["brief"]={
["cs"]="brief",
@@ -12994,7 +14867,7 @@ return {
["cs"]="buffer",
["de"]="puffer",
["en"]="buffer",
- ["fr"]="buffer",
+ ["fr"]="tampon",
["it"]="buffer",
["nl"]="buffer",
["pe"]="باÙر",
@@ -13022,6 +14895,7 @@ return {
},
["camel"]={
["en"]="camel",
+ ["fr"]="camel",
},
["cap"]={
["cs"]="kap",
@@ -13037,17 +14911,29 @@ return {
["cs"]="kapitalky",
["de"]="versalien",
["en"]="capital",
- ["fr"]="capitale",
+ ["fr"]="capitales",
["it"]="maiuscolo",
["nl"]="kapitaal",
["pe"]="capital",
["ro"]="majuscula",
},
+ ["category"]={
+ ["en"]="category",
+ ["fr"]="categorie",
+ },
+ ["cd:character"]={
+ ["en"]="cd:character",
+ ["fr"]="caracteres",
+ },
+ ["cd:font"]={
+ ["en"]="cd:font",
+ ["fr"]="police",
+ },
["center"]={
["cs"]="center",
["de"]="center",
["en"]="center",
- ["fr"]="center",
+ ["fr"]="centrer",
["it"]="center",
["nl"]="centreer",
["pe"]="مرکز",
@@ -13055,6 +14941,7 @@ return {
},
["centerlast"]={
["en"]="centerlast",
+ ["fr"]="centrerdernier",
},
["chapter"]={
["cs"]="kapitola",
@@ -13088,19 +14975,24 @@ return {
},
["chemical"]={
["en"]="chemical",
+ ["fr"]="chimique",
},
["chemicals"]={
["en"]="chemicals",
+ ["fr"]="chimiques",
},
["chemistry"]={
["en"]="chemistry",
+ ["fr"]="chimie",
["nl"]="chemie",
},
["cite"]={
["en"]="cite",
+ ["fr"]="cite",
},
["closed"]={
["en"]="closed",
+ ["fr"]="ferme",
["nl"]="gesloten",
},
["color"]={
@@ -13135,6 +15027,7 @@ return {
},
["combination"]={
["en"]="combination",
+ ["fr"]="combinaison",
["nl"]="combinatie",
},
["command"]={
@@ -13179,9 +15072,11 @@ return {
},
["compressseparator"]={
["en"]="compressseparator",
+ ["fr"]="separateurreduction",
},
["compressstopper"]={
["en"]="compressstopper",
+ ["fr"]="stoppeurreduction",
},
["concept"]={
["cs"]="koncept",
@@ -13195,6 +15090,7 @@ return {
},
["construction"]={
["en"]="construction",
+ ["fr"]="construction",
},
["content"]={
["cs"]="obsah",
@@ -13220,7 +15116,7 @@ return {
["cs"]="pokracovat",
["de"]="fortsetzten",
["en"]="continue",
- ["fr"]="continue",
+ ["fr"]="continuer",
["it"]="continua",
["nl"]="verder",
["pe"]="ادامه",
@@ -13228,6 +15124,7 @@ return {
},
["continued"]={
["en"]="continued",
+ ["fr"]="continue",
["nl"]="vervolgd",
},
["controls"]={
@@ -13264,7 +15161,7 @@ return {
["cs"]="cutspace",
["de"]="cutspace",
["en"]="cutspace",
- ["fr"]="cutspace",
+ ["fr"]="espacecoupe",
["it"]="cutspace",
["nl"]="snijwit",
["pe"]="Ùضای‌برش",
@@ -13272,6 +15169,7 @@ return {
},
["dataset"]={
["en"]="dataset",
+ ["fr"]="jeudedonnees",
},
["date"]={
["cs"]="datum",
@@ -13375,6 +15273,7 @@ return {
},
["down"]={
["en"]="down",
+ ["fr"]="enbas",
["nl"]="omlaag",
},
["each"]={
@@ -13399,10 +15298,22 @@ return {
},
["effective"]={
["en"]="effective",
+ ["fr"]="effectif",
["nl"]="effectief",
},
+ ["eight"]={
+ ["cs"]="eight",
+ ["de"]="acht",
+ ["en"]="eight",
+ ["fr"]="huit",
+ ["it"]="eight",
+ ["nl"]="acht",
+ ["pe"]="eight",
+ ["ro"]="eight",
+ },
["embed"]={
["en"]="embed",
+ ["fr"]="integrer",
["nl"]="sluitin",
},
["empty"]={
@@ -13417,30 +15328,28 @@ return {
},
["enable"]={
["en"]="enable",
+ ["fr"]="activer",
},
["end"]={
["en"]="end",
+ ["fr"]="terminer",
["nl"]="eind",
},
["endnote"]={
["cs"]="endnote",
["de"]="endnote",
["en"]="endnote",
- ["fr"]="notefin",
+ ["fr"]="noteseule",
["it"]="endnote",
["nl"]="eindnoot",
["pe"]="ته‌نوشت",
["ro"]="endnote",
},
- ["textnote"]={
- ["en"]="textnote",
- ["nl"]="tekstnoot",
- },
["enumeration"]={
["cs"]="vycet",
["de"]="nummerierung",
["en"]="enumeration",
- ["fr"]="enumeration",
+ ["fr"]="énumération",
["it"]="enumerazione",
["nl"]="doornummering",
["pe"]="شماره‌بندی",
@@ -13450,7 +15359,7 @@ return {
["cs"]="prostredi",
["de"]="umgebung",
["en"]="environment",
- ["fr"]="environement",
+ ["fr"]="environnement",
["it"]="ambiente",
["nl"]="omgeving",
["pe"]="محیط",
@@ -13468,12 +15377,13 @@ return {
},
["export"]={
["en"]="export",
+ ["fr"]="exporter",
},
["external"]={
["cs"]="externi",
["de"]="extern",
["en"]="external",
- ["fr"]="external",
+ ["fr"]="externe",
["it"]="esterno",
["nl"]="extern",
["pe"]="خارجی",
@@ -13481,6 +15391,7 @@ return {
},
["extremestretch"]={
["en"]="extremestretch",
+ ["fr"]="etirementextreme",
},
["fact"]={
["cs"]="fakt",
@@ -13492,6 +15403,10 @@ return {
["pe"]="fact",
["ro"]="fapt",
},
+ ["fallback"]={
+ ["en"]="fallback",
+ ["fr"]="repli",
+ },
["february"]={
["cs"]="unor",
["de"]="februar",
@@ -13504,6 +15419,7 @@ return {
},
["field"]={
["en"]="field",
+ ["fr"]="champ",
["nl"]="veld",
},
["figure"]={
@@ -13590,7 +15506,7 @@ return {
["cs"]="prizpusobive",
["de"]="passend",
["en"]="fit",
- ["fr"]="adapte",
+ ["fr"]="adapter",
["it"]="adatta",
["nl"]="passend",
["pe"]="پرکردن",
@@ -13606,51 +15522,11 @@ return {
["pe"]="پنج",
["ro"]="cinci",
},
- ["six"]={
- ["cs"]="six",
- ["de"]="sechs",
- ["en"]="six",
- ["fr"]="six",
- ["it"]="six",
- ["nl"]="zes",
- ["pe"]="six",
- ["ro"]="six",
- },
- ["seven"]={
- ["cs"]="seven",
- ["de"]="sieben",
- ["en"]="seven",
- ["fr"]="seven",
- ["it"]="seven",
- ["nl"]="zeven",
- ["pe"]="seven",
- ["ro"]="seven",
- },
- ["eight"]={
- ["cs"]="eight",
- ["de"]="acht",
- ["en"]="eight",
- ["fr"]="eight",
- ["it"]="eight",
- ["nl"]="acht",
- ["pe"]="eight",
- ["ro"]="eight",
- },
- ["nine"]={
- ["cs"]="nine",
- ["de"]="neun",
- ["en"]="nine",
- ["fr"]="nine",
- ["it"]="nine",
- ["nl"]="negen",
- ["pe"]="nine",
- ["ro"]="nine",
- },
["fix"]={
["cs"]="fixuj",
["de"]="stellewiederher",
["en"]="fix",
- ["fr"]="fixe",
+ ["fr"]="fix",
["it"]="fisso",
["nl"]="herstel",
["pe"]="ثابت‌کن",
@@ -13690,7 +15566,7 @@ return {
["cs"]="flushinner",
["de"]="flushinner",
["en"]="flushinner",
- ["fr"]="flushinner",
+ ["fr"]="alignerinterieur",
["it"]="flushinner",
["nl"]="lijnbinnen",
["pe"]="پمپ‌داخلی",
@@ -13700,7 +15576,7 @@ return {
["cs"]="flushleft",
["de"]="flushleft",
["en"]="flushleft",
- ["fr"]="flushleft",
+ ["fr"]="alignergauche",
["it"]="flushleft",
["nl"]="lijnlinks",
["pe"]="پمپ‌چپ",
@@ -13710,7 +15586,7 @@ return {
["cs"]="flushouter",
["de"]="flushouter",
["en"]="flushouter",
- ["fr"]="flushouter",
+ ["fr"]="alignerexterieur",
["it"]="flushouter",
["nl"]="lijnbuiten",
["pe"]="پمپ‌خارجی",
@@ -13720,7 +15596,7 @@ return {
["cs"]="flushright",
["de"]="flushright",
["en"]="flushright",
- ["fr"]="flushright",
+ ["fr"]="alignerdroite",
["it"]="flushright",
["nl"]="lijnrechts",
["pe"]="پمپ‌راست",
@@ -13728,8 +15604,13 @@ return {
},
["followingpage"]={
["en"]="followingpage",
+ ["fr"]="pagesuccesseur",
["nl"]="opvolgendepagina",
},
+ ["font"]={
+ ["en"]="font",
+ ["nl"]="font",
+ },
["footer"]={
["cs"]="upati",
["de"]="fusszeile",
@@ -13744,7 +15625,7 @@ return {
["cs"]="poznamkapodcarou",
["de"]="fussnote",
["en"]="footnote",
- ["fr"]="notepdp",
+ ["fr"]="notebdp",
["it"]="notapdp",
["nl"]="voetnoot",
["pe"]="پانوشت",
@@ -13754,7 +15635,7 @@ return {
["cs"]="sila",
["de"]="zwinge",
["en"]="force",
- ["fr"]="force",
+ ["fr"]="forcer",
["it"]="forza",
["nl"]="forceer",
["pe"]="اجبار",
@@ -13794,7 +15675,7 @@ return {
["cs"]="vpred",
["de"]="vorwaerts",
["en"]="forward",
- ["fr"]="avance",
+ ["fr"]="enavant",
["it"]="avanti",
["nl"]="vooruit",
["pe"]="به‌جلو",
@@ -13810,6 +15691,10 @@ return {
["pe"]="چهار",
["ro"]="patru",
},
+ ["fractions"]={
+ ["en"]="fractions",
+ ["fr"]="fractions",
+ },
["frame"]={
["cs"]="ramecek",
["de"]="rahmen",
@@ -13844,7 +15729,7 @@ return {
["cs"]="prednicasti",
["de"]="einleitungen",
["en"]="frontmatter",
- ["fr"]="preambule",
+ ["fr"]="pagesliminaires",
["it"]="preambolo",
["nl"]="inleidingen",
["pe"]="پیش‌مطلب",
@@ -13864,7 +15749,7 @@ return {
["cs"]="fullhz",
["de"]="fullhz",
["en"]="fullhz",
- ["fr"]="fullhz",
+ ["fr"]="hzcomplet",
["it"]="fullhz",
["nl"]="fullenhz",
["pe"]="fullhz",
@@ -13954,7 +15839,7 @@ return {
["cs"]="zaveseni",
["de"]="haengend",
["en"]="hang",
- ["fr"]="suspend",
+ ["fr"]="suspendre",
["it"]="sospendi",
["nl"]="hang",
["pe"]="بیاویز",
@@ -13964,7 +15849,7 @@ return {
["cs"]="visici",
["de"]="haengend",
["en"]="hanging",
- ["fr"]="suspend",
+ ["fr"]="suspension",
["it"]="sospeso",
["nl"]="hangend",
["pe"]="آویزان",
@@ -13972,6 +15857,7 @@ return {
},
["hangingboth"]={
["en"]="hangingboth",
+ ["fr"]="suspensionchacun",
["nl"]="beidehangend",
},
["head"]={
@@ -13988,12 +15874,17 @@ return {
["cs"]="zahlavi",
["de"]="kopfzeile",
["en"]="header",
- ["fr"]="entete",
+ ["fr"]="entête",
["it"]="intestazione",
["nl"]="hoofd",
["pe"]="سربرگ",
["ro"]="antet",
},
+ ["headintext"]={
+ ["en"]="headintext",
+ ["fr"]="tetedanstexte",
+ ["nl"]="kopintekst",
+ },
["height"]={
["cs"]="vyska",
["de"]="hoehe",
@@ -14018,7 +15909,7 @@ return {
["cs"]="vyse",
["de"]="vorher",
["en"]="hencefore",
- ["fr"]="precedent",
+ ["fr"]="precedemment",
["it"]="precedente",
["nl"]="hierboven",
["pe"]="hencefore",
@@ -14038,7 +15929,7 @@ return {
["cs"]="nize",
["de"]="nachher",
["en"]="hereafter",
- ["fr"]="suivant",
+ ["fr"]="ciapres",
["it"]="seguente",
["nl"]="hieronder",
["pe"]="ازاین‌به‌بعد",
@@ -14056,12 +15947,13 @@ return {
},
["hiddenbar"]={
["en"]="hiddenbar",
+ ["fr"]="barrecachee",
},
["hiding"]={
["cs"]="skryt",
["de"]="verbergen",
["en"]="hiding",
- ["fr"]="cache",
+ ["fr"]="encachant",
["it"]="nascondere",
["nl"]="verbergen",
["pe"]="پنهان‌کردن",
@@ -14071,7 +15963,7 @@ return {
["cs"]="vysoko",
["de"]="hoch",
["en"]="high",
- ["fr"]="haut",
+ ["fr"]="exp",
["it"]="alto",
["nl"]="hoog",
["pe"]="بلند",
@@ -14081,7 +15973,7 @@ return {
["cs"]="horizontalne",
["de"]="horizontal",
["en"]="horizontal",
- ["fr"]="horizontale",
+ ["fr"]="horizontal",
["it"]="orizzontale",
["nl"]="horizontaal",
["pe"]="اÙÙ‚ÛŒ",
@@ -14091,7 +15983,7 @@ return {
["cs"]="hyphenated",
["de"]="hyphenate",
["en"]="hyphenated",
- ["fr"]="hyphenated",
+ ["fr"]="aveccesure",
["it"]="sillabato",
["nl"]="afgebroken",
["pe"]="شکسته",
@@ -14141,7 +16033,7 @@ return {
["cs"]="inherit",
["de"]="inherit",
["en"]="inherit",
- ["fr"]="herite",
+ ["fr"]="heriter",
["it"]="inherit",
["nl"]="erf",
["pe"]="ارث‌بردن",
@@ -14151,7 +16043,7 @@ return {
["cs"]="ininner",
["de"]="ininner",
["en"]="ininner",
- ["fr"]="ininner",
+ ["fr"]="dansinterieur",
["it"]="ininner",
["nl"]="inbinnen",
["pe"]="درداخلی",
@@ -14159,9 +16051,11 @@ return {
},
["ininneredge"]={
["en"]="ininneredge",
+ ["fr"]="dansbordinterieur",
},
["ininnermargin"]={
["en"]="ininnermargin",
+ ["fr"]="dansmargeinterieure",
},
["inleft"]={
["cs"]="ivlevo",
@@ -14195,6 +16089,7 @@ return {
},
["inline"]={
["en"]="inline",
+ ["fr"]="enligne",
},
["inmargin"]={
["cs"]="naokraji",
@@ -14240,7 +16135,7 @@ return {
["cs"]="inother",
["de"]="inother",
["en"]="inother",
- ["fr"]="inother",
+ ["fr"]="dansautre",
["it"]="inother",
["nl"]="inandere",
["pe"]="inother",
@@ -14250,7 +16145,7 @@ return {
["cs"]="inouter",
["de"]="inouter",
["en"]="inouter",
- ["fr"]="inouter",
+ ["fr"]="dansexterieur",
["it"]="inouter",
["nl"]="inbuiten",
["pe"]="درخارجی",
@@ -14258,15 +16153,17 @@ return {
},
["inouteredge"]={
["en"]="inouteredge",
+ ["fr"]="dansbordexterieur",
},
["inoutermargin"]={
["en"]="inoutermargin",
+ ["fr"]="dansmargeexterieure",
},
["inright"]={
["cs"]="ivpravo",
["de"]="imrechten",
["en"]="inright",
- ["fr"]="dansdroit",
+ ["fr"]="dansdroite",
["it"]="indestra",
["nl"]="inrechter",
["pe"]="درون‌راست",
@@ -14294,6 +16191,7 @@ return {
},
["integral"]={
["en"]="integral",
+ ["fr"]="integrale",
},
["interaction"]={
["cs"]="interakce",
@@ -14317,12 +16215,13 @@ return {
},
["interactive"]={
["en"]="interactive",
+ ["fr"]="interactif",
},
["intermezzi"]={
["cs"]="intermezzi",
["de"]="intermezzi",
["en"]="intermezzi",
- ["fr"]="intermezzi",
+ ["fr"]="interludes",
["it"]="intermezzi",
["nl"]="intermezzos",
["pe"]="میان‌پرده‌ها",
@@ -14332,7 +16231,7 @@ return {
["cs"]="intermezzo",
["de"]="intermezzo",
["en"]="intermezzo",
- ["fr"]="intermezzo",
+ ["fr"]="interlude",
["it"]="intermezzo",
["nl"]="intermezzo",
["pe"]="میان‌پرده",
@@ -14348,10 +16247,6 @@ return {
["pe"]="درون‌متن",
["ro"]="intext",
},
- ["headintext"]={
- ["en"]="headintext",
- ["nl"]="kopintekst",
- },
["intro"]={
["cs"]="uvod",
["de"]="intro",
@@ -14362,6 +16257,9 @@ return {
["pe"]="پیشگÙتار",
["ro"]="intro",
},
+ ["invertedshort"]={
+ ["en"]="invertedshort",
+ },
["italic"]={
["cs"]="kurziva",
["de"]="italic",
@@ -14376,7 +16274,7 @@ return {
["cs"]="kurzivnitucne",
["de"]="italicfett",
["en"]="italicbold",
- ["fr"]="grasitalique",
+ ["fr"]="italiquegras",
["it"]="corsivograssetto",
["nl"]="italicvet",
["pe"]="مشکی‌ایتالیک",
@@ -14386,7 +16284,7 @@ return {
["cs"]="polozka",
["de"]="pos",
["en"]="item",
- ["fr"]="element",
+ ["fr"]="élément",
["it"]="elemento",
["nl"]="som",
["pe"]="آیتم",
@@ -14396,7 +16294,7 @@ return {
["cs"]="vycet",
["de"]="aufzaehlung",
["en"]="itemize",
- ["fr"]="lister",
+ ["fr"]="détailler",
["it"]="elenco",
["nl"]="opsomming",
["pe"]="آیتم‌بندی",
@@ -14406,7 +16304,7 @@ return {
["cs"]="pol",
["de"]="its",
["en"]="its",
- ["fr"]="its",
+ ["fr"]="els",
["it"]="its",
["nl"]="its",
["pe"]="آیم",
@@ -14426,16 +16324,12 @@ return {
["cs"]="spojeno",
["de"]="keinabstand",
["en"]="joinedup",
- ["fr"]="joinedup",
+ ["fr"]="sansespaceentre",
["it"]="unito",
["nl"]="aansluitend",
["pe"]="متصل‌بالا",
["ro"]="unit",
},
- ["notjoinedup"]={
- ["en"]="notjoinedup",
- ["nl"]="nietaansluitend",
- },
["july"]={
["cs"]="cervenec",
["de"]="juli",
@@ -14460,7 +16354,7 @@ return {
["cs"]="drzet",
["de"]="behalte",
["en"]="keep",
- ["fr"]="maintient",
+ ["fr"]="conserver",
["it"]="mantieni",
["nl"]="handhaaf",
["pe"]="نگهدار",
@@ -14468,6 +16362,7 @@ return {
},
["kerncharacters"]={
["en"]="kerncharacters",
+ ["fr"]="approchercaracteres",
},
["knockout"]={
["cs"]="knockout",
@@ -14533,7 +16428,7 @@ return {
["cs"]="lastpagenumber",
["de"]="lastpagenumber",
["en"]="lastpagenumber",
- ["fr"]="derniernumeropage",
+ ["fr"]="numerodenierepage",
["it"]="lastpagenumber",
["nl"]="laatstepaginanummer",
["pe"]="شماه‌صÙحه‌آخر",
@@ -14553,7 +16448,7 @@ return {
["cs"]="layer",
["de"]="layer",
["en"]="layer",
- ["fr"]="layer",
+ ["fr"]="calque",
["it"]="layer",
["nl"]="layer",
["pe"]="layer",
@@ -14583,7 +16478,7 @@ return {
["cs"]="lefthanging",
["de"]="lefthanging",
["en"]="lefthanging",
- ["fr"]="lefthanging",
+ ["fr"]="suspensiongauche",
["it"]="lefthanging",
["nl"]="linkshangend",
["pe"]="آویزان‌چپ",
@@ -14603,7 +16498,7 @@ return {
["cs"]="levastranka",
["de"]="linkerseite",
["en"]="leftpage",
- ["fr"]="pagegauche",
+ ["fr"]="surpagegauche",
["it"]="paginasinistra",
["nl"]="linkerpagina",
["pe"]="صÙحه‌چپ",
@@ -14613,7 +16508,7 @@ return {
["cs"]="lefttoright",
["de"]="lefttoright",
["en"]="lefttoright",
- ["fr"]="lefttoright",
+ ["fr"]="gaucheadroite",
["it"]="lefttoright",
["nl"]="lefttoright",
["pe"]="lefttoright",
@@ -14631,13 +16526,14 @@ return {
},
["less"]={
["en"]="less",
+ ["fr"]="moins",
["nl"]="minder",
},
["lesshyphenation"]={
["cs"]="lesshyphenation",
["de"]="lesshyphenation",
["en"]="lesshyphenation",
- ["fr"]="lesshyphenation",
+ ["fr"]="moinsdecesure",
["it"]="lesshyphenation",
["nl"]="lesshyphenation",
["pe"]="شکست‌کلمات‌کمتر",
@@ -14645,6 +16541,7 @@ return {
},
["letterspacing"]={
["en"]="letterspacing",
+ ["fr"]="espacementlettre",
},
["line"]={
["cs"]="radek",
@@ -14678,6 +16575,7 @@ return {
},
["linked"]={
["en"]="linked",
+ ["fr"]="lie",
},
["list"]={
["cs"]="seznam",
@@ -14703,7 +16601,7 @@ return {
["cs"]="lokalnihoprostredi",
["de"]="lokaleumgebung",
["en"]="localenvironment",
- ["fr"]="environementlocal",
+ ["fr"]="environnementlocal",
["it"]="ambientelocale",
["nl"]="deelomgeving",
["pe"]="محیط‌موضعی",
@@ -14733,7 +16631,7 @@ return {
["cs"]="nivy",
["de"]="hoti",
["en"]="lohi",
- ["fr"]="baha",
+ ["fr"]="inex",
["it"]="pedap",
["nl"]="laho",
["pe"]="پابا",
@@ -14741,12 +16639,13 @@ return {
},
["long"]={
["en"]="long",
+ ["fr"]="long",
},
["loose"]={
["cs"]="uvolnene",
["de"]="lose",
["en"]="loose",
- ["fr"]="perte",
+ ["fr"]="envrac",
["it"]="lento",
["nl"]="los",
["pe"]="شل",
@@ -14756,7 +16655,7 @@ return {
["cs"]="nizko",
["de"]="tief",
["en"]="low",
- ["fr"]="bas",
+ ["fr"]="ind",
["it"]="basso",
["nl"]="laag",
["pe"]="پایین",
@@ -14776,7 +16675,7 @@ return {
["cs"]="zlom",
["de"]="umbruch",
["en"]="makeup",
- ["fr"]="makeup",
+ ["fr"]="composition",
["it"]="makeup",
["nl"]="opmaak",
["pe"]="آرایش",
@@ -14786,7 +16685,7 @@ return {
["cs"]="mar",
["de"]="mar",
["en"]="mar",
- ["fr"]="mar",
+ ["fr"]="rem",
["it"]="mar",
["nl"]="mar",
["pe"]="حاش",
@@ -14816,7 +16715,7 @@ return {
["cs"]="textovahrana",
["de"]="marginalkante",
["en"]="marginedge",
- ["fr"]="bordmarge",
+ ["fr"]="margebord",
["it"]="bordomargine",
["nl"]="kantlijn",
["pe"]="لبه‌حاشیه",
@@ -14854,12 +16753,13 @@ return {
},
["math"]={
["en"]="math",
+ ["fr"]="math",
},
["mathalignment"]={
["cs"]="mathalignment",
["de"]="mathalignment",
["en"]="mathalignment",
- ["fr"]="mathalignment",
+ ["fr"]="alignementmath",
["it"]="mathalignment",
["nl"]="wiskundeuitlijnen",
["pe"]="تنظیم‌ریاضی",
@@ -14869,7 +16769,7 @@ return {
["cs"]="mathcases",
["de"]="mathcases",
["en"]="mathcases",
- ["fr"]="mathcases",
+ ["fr"]="casmath",
["it"]="mathcases",
["nl"]="mathcases",
["pe"]="حالتهای‌ریاضی",
@@ -14879,7 +16779,7 @@ return {
["cs"]="mathematika",
["de"]="mathematik",
["en"]="mathematics",
- ["fr"]="mathematique",
+ ["fr"]="mathematics",
["it"]="matematica",
["nl"]="wiskunde",
["pe"]="ریاضی",
@@ -14889,7 +16789,7 @@ return {
["cs"]="mathmatrix",
["de"]="mathmatrix",
["en"]="mathmatrix",
- ["fr"]="mathmatrix",
+ ["fr"]="matricemath",
["it"]="mathmatrix",
["nl"]="wiskundematrix",
["pe"]="ماتریش‌ریاضی",
@@ -14907,14 +16807,17 @@ return {
},
["maxdepth"]={
["en"]="maxdepth",
+ ["fr"]="profondeurmax",
["nl"]="maxdiepte",
},
["maxheight"]={
["en"]="maxheight",
+ ["fr"]="hauteurmax",
["nl"]="maxhoogte",
},
["maxwidth"]={
["en"]="maxwidth",
+ ["fr"]="largeurmax",
["nl"]="maxbreedte",
},
["may"]={
@@ -14969,6 +16872,7 @@ return {
},
["mindepth"]={
["en"]="mindepth",
+ ["fr"]="profondeurmin",
["nl"]="mindiepte",
},
["minheight"]={
@@ -15003,6 +16907,7 @@ return {
},
["mixed"]={
["en"]="mixed",
+ ["fr"]="mixte",
},
["monday"]={
["cs"]="pondeli",
@@ -15036,6 +16941,7 @@ return {
},
["mononormal"]={
["en"]="mononormal",
+ ["fr"]="normalmono",
},
["month"]={
["cs"]="mesic",
@@ -15049,13 +16955,14 @@ return {
},
["more"]={
["en"]="more",
+ ["fr"]="plus",
["nl"]="meer",
},
["morehyphenation"]={
["cs"]="morehyphenation",
["de"]="morehyphenation",
["en"]="morehyphenation",
- ["fr"]="morehyphenation",
+ ["fr"]="plusdecesure",
["it"]="morehyphenation",
["nl"]="morehyphenation",
["pe"]="شکست‌کلمات‌بیشتر",
@@ -15115,7 +17022,7 @@ return {
["cs"]="dalsi",
["de"]="folgende",
["en"]="next",
- ["fr"]="prochain",
+ ["fr"]="suivant",
["it"]="successivo",
["nl"]="volgende",
["pe"]="بعدی",
@@ -15161,6 +17068,16 @@ return {
["pe"]="زیرصÙحه‌بعدی",
["ro"]="urmatoareasubpagina",
},
+ ["nine"]={
+ ["cs"]="nine",
+ ["de"]="neun",
+ ["en"]="nine",
+ ["fr"]="neuf",
+ ["it"]="nine",
+ ["nl"]="negen",
+ ["pe"]="nine",
+ ["ro"]="nine",
+ },
["no"]={
["cs"]="ne",
["de"]="nein",
@@ -15175,7 +17092,7 @@ return {
["cs"]="nocheck",
["de"]="nocheck",
["en"]="nocheck",
- ["fr"]="nonverifie",
+ ["fr"]="sansverifier",
["it"]="nocheck",
["nl"]="geencontrole",
["pe"]="بدون‌بررسی",
@@ -15183,12 +17100,13 @@ return {
},
["nodepth"]={
["en"]="nodepth",
+ ["fr"]="sansprodondeur",
},
["nofit"]={
["cs"]="nofit",
["de"]="nofit",
["en"]="nofit",
- ["fr"]="nofit",
+ ["fr"]="sansadapter",
["it"]="nofit",
["nl"]="nietpassend",
["pe"]="بدون‌پرکردن",
@@ -15198,7 +17116,7 @@ return {
["cs"]="nogrid",
["de"]="nogrid",
["en"]="nogrid",
- ["fr"]="nogrid",
+ ["fr"]="sansgrille",
["it"]="nogrid",
["nl"]="geengrid",
["pe"]="بدون‌توری",
@@ -15206,12 +17124,13 @@ return {
},
["noheight"]={
["en"]="noheight",
+ ["fr"]="sanshauteur",
},
["nohz"]={
["cs"]="nohz",
["de"]="nohz",
["en"]="nohz",
- ["fr"]="nohz",
+ ["fr"]="sanshz",
["it"]="nohz",
["nl"]="geenhz",
["pe"]="nohz",
@@ -15219,6 +17138,7 @@ return {
},
["noline"]={
["en"]="noline",
+ ["fr"]="sansligne",
},
["nomarking"]={
["cs"]="zadneznaceni",
@@ -15232,13 +17152,14 @@ return {
},
["nomenubar"]={
["en"]="nomenubar",
+ ["fr"]="sansbarremenu",
["nl"]="geenmenubalk",
},
["none"]={
["cs"]="zadny",
["de"]="kein",
["en"]="none",
- ["fr"]="rien",
+ ["fr"]="aucun",
["it"]="nessuno",
["nl"]="geen",
["pe"]="هیچکدام",
@@ -15256,6 +17177,7 @@ return {
},
["norepeat"]={
["en"]="norepeat",
+ ["fr"]="sansrepetition",
},
["normal"]={
["cs"]="normalni",
@@ -15267,6 +17189,9 @@ return {
["pe"]="نرمال",
["ro"]="normal",
},
+ ["normalshort"]={
+ ["en"]="normalshort",
+ },
["nospacing"]={
["cs"]="nospacing",
["de"]="nospacing",
@@ -15277,6 +17202,11 @@ return {
["pe"]="بدون‌Ùضاگذاری",
["ro"]="nospacing",
},
+ ["nostopper"]={
+ ["en"]="nostopper",
+ ["fr"]="sansstoppeur",
+ ["nl"]="geenafsluiter",
+ },
["not"]={
["cs"]="ne",
["de"]="nicht",
@@ -15289,15 +17219,17 @@ return {
},
["notation"]={
["en"]="notation",
+ ["fr"]="notation",
},
["note"]={
["en"]="note",
+ ["fr"]="note",
},
["nothanging"]={
["cs"]="nothanging",
["de"]="nothanging",
["en"]="nothanging",
- ["fr"]="nonsuspendu",
+ ["fr"]="sanssuspension",
["it"]="nonsospeso",
["nl"]="niethangend",
["pe"]="بدون‌آویزان‌کردن",
@@ -15307,12 +17239,17 @@ return {
["cs"]="nothyphenated",
["de"]="nothyphenated",
["en"]="nothyphenated",
- ["fr"]="nothyphenated",
+ ["fr"]="sanscesure",
["it"]="nonsillabato",
["nl"]="nietafgebroken",
["pe"]="بدون‌شکست",
["ro"]="nedespsilabe",
},
+ ["notjoinedup"]={
+ ["en"]="notjoinedup",
+ ["fr"]="passansespaceentre",
+ ["nl"]="nietaansluitend",
+ },
["november"]={
["cs"]="listopad",
["de"]="november",
@@ -15327,7 +17264,7 @@ return {
["cs"]="nikde",
["de"]="nirgens",
["en"]="nowhere",
- ["fr"]="nulpart",
+ ["fr"]="nullepart",
["it"]="danessunaparte",
["nl"]="nergens",
["pe"]="هیچ‌حا",
@@ -15387,7 +17324,7 @@ return {
["cs"]="vyp",
["de"]="aus",
["en"]="off",
- ["fr"]="desactive",
+ ["fr"]="arret",
["it"]="disattivo",
["nl"]="uit",
["pe"]="خاموش",
@@ -15397,7 +17334,7 @@ return {
["cs"]="offset",
["de"]="offset",
["en"]="offset",
- ["fr"]="offset",
+ ["fr"]="decalage",
["it"]="offset",
["nl"]="offset",
["pe"]="Ø¢Ùست",
@@ -15407,7 +17344,7 @@ return {
["cs"]="old",
["de"]="old",
["en"]="old",
- ["fr"]="old",
+ ["fr"]="ancien",
["it"]="old",
["nl"]="oud",
["pe"]="قدیمی",
@@ -15415,15 +17352,13 @@ return {
},
["oldstyle"]={
["en"]="oldstyle",
- },
- ["fractions"]={
- ["en"]="fractions",
+ ["fr"]="styleancien",
},
["on"]={
["cs"]="zap",
["de"]="an",
["en"]="on",
- ["fr"]="actif",
+ ["fr"]="marche",
["it"]="attivo",
["nl"]="aan",
["pe"]="روی",
@@ -15443,12 +17378,16 @@ return {
["cs"]="naproti",
["de"]="gegenueber",
["en"]="opposite",
- ["fr"]="opposition",
+ ["fr"]="enface",
["it"]="opposto",
["nl"]="naast",
["pe"]="مخالÙ",
["ro"]="opus",
},
+ ["ordinal"]={
+ ["en"]="ordinal",
+ ["fr"]="ordinal",
+ },
["outer"]={
["cs"]="vnejsi",
["de"]="aussen",
@@ -15483,7 +17422,7 @@ return {
["cs"]="nadtrzeno",
["de"]="ueberstrichen",
["en"]="overbar",
- ["fr"]="overbar",
+ ["fr"]="surligner",
["it"]="sopralinea",
["nl"]="overstreep",
["pe"]="میله‌رو",
@@ -15493,7 +17432,7 @@ return {
["cs"]="nadtrzeni",
["de"]="ueberstreichen",
["en"]="overbars",
- ["fr"]="overbars",
+ ["fr"]="surlignermots",
["it"]="sopralinee",
["nl"]="overstrepen",
["pe"]="میله‌ها‌رو",
@@ -15503,7 +17442,7 @@ return {
["cs"]="prekryv",
["de"]="overlay",
["en"]="overlay",
- ["fr"]="revetement",
+ ["fr"]="superposition",
["it"]="sovrapponi",
["nl"]="overlay",
["pe"]="پوشش",
@@ -15513,7 +17452,7 @@ return {
["cs"]="overprint",
["de"]="overprint",
["en"]="overprint",
- ["fr"]="overprint",
+ ["fr"]="surimpression",
["it"]="overprint",
["nl"]="overprint",
["pe"]="overprint",
@@ -15523,7 +17462,7 @@ return {
["cs"]="preskrtnuto",
["de"]="durchgestrichen",
["en"]="overstrike",
- ["fr"]="surlignetout",
+ ["fr"]="barrer",
["it"]="sbarrato",
["nl"]="doorstreep",
["pe"]="خط‌زدن",
@@ -15533,7 +17472,7 @@ return {
["cs"]="preskrtnuti",
["de"]="durchstreichen",
["en"]="overstrikes",
- ["fr"]="surligne",
+ ["fr"]="barrermots",
["it"]="sbarrati",
["nl"]="doorstrepen",
["pe"]="خط‌زدنها",
@@ -15543,7 +17482,7 @@ return {
["cs"]="zhustene",
["de"]="gepackt",
["en"]="packed",
- ["fr"]="groupe",
+ ["fr"]="sansespaceentreitem",
["it"]="impaccato",
["nl"]="opelkaar",
["pe"]="Ùشرده",
@@ -15623,7 +17562,7 @@ return {
["cs"]="odlozit",
["de"]="verschieben",
["en"]="postponing",
- ["fr"]="postponing",
+ ["fr"]="report",
["it"]="posporre",
["nl"]="uitstellen",
["pe"]="تاخیر",
@@ -15641,6 +17580,7 @@ return {
},
["precedingpage"]={
["en"]="precedingpage",
+ ["fr"]="pageantecedent",
["nl"]="voorafgaandepagina",
},
["preference"]={
@@ -15657,7 +17597,7 @@ return {
["cs"]="nahled",
["de"]="vorschau",
["en"]="preview",
- ["fr"]="previsualisation",
+ ["fr"]="apercu",
["it"]="anteprima",
["nl"]="preview",
["pe"]="پیش‌دید",
@@ -15715,13 +17655,14 @@ return {
},
["print"]={
["en"]="print",
+ ["fr"]="imprimer",
["nl"]="print",
},
["printable"]={
["cs"]="tisknutelne",
["de"]="druckbar",
["en"]="printable",
- ["fr"]="editable",
+ ["fr"]="imprimable",
["it"]="stampabile",
["nl"]="printbaar",
["pe"]="قابل‌چاپ",
@@ -15731,7 +17672,7 @@ return {
["cs"]="process",
["de"]="process",
["en"]="process",
- ["fr"]="process",
+ ["fr"]="traiter",
["it"]="process",
["nl"]="proces",
["pe"]="پردازش",
@@ -15789,6 +17730,7 @@ return {
},
["quarterline"]={
["en"]="quarterline",
+ ["fr"]="quartdeligne",
["nl"]="kwartregel",
},
["quotation"]={
@@ -15815,7 +17757,7 @@ return {
["cs"]="rozsah",
["de"]="ran",
["en"]="ran",
- ["fr"]="cours",
+ ["fr"]="gam",
["it"]="corse",
["nl"]="ran",
["pe"]="برد",
@@ -15865,12 +17807,17 @@ return {
["cs"]="znacka",
["de"]="merkmal",
["en"]="referral",
- ["fr"]="referral",
+ ["fr"]="redirection",
["it"]="referral",
["nl"]="kenmerk",
["pe"]="مراجعه",
["ro"]="referinta",
},
+ ["region"]={
+ ["en"]="region",
+ ["fr"]="region",
+ ["nl"]="gebied",
+ },
["register"]={
["cs"]="rejstrik",
["de"]="register",
@@ -15885,7 +17832,7 @@ return {
["cs"]="pravidelne",
["de"]="regular",
["en"]="regular",
- ["fr"]="regulier",
+ ["fr"]="ordinaire",
["it"]="regolare",
["nl"]="regular",
["pe"]="منظم",
@@ -15905,7 +17852,7 @@ return {
["cs"]="opakovat",
["de"]="wiederholen",
["en"]="repeat",
- ["fr"]="repete",
+ ["fr"]="repeter",
["it"]="ripeti",
["nl"]="herhaal",
["pe"]="تکرار",
@@ -15915,7 +17862,7 @@ return {
["cs"]="pozadovane",
["de"]="obligatorisch",
["en"]="required",
- ["fr"]="recquis",
+ ["fr"]="requis",
["it"]="richiestp",
["nl"]="verplicht",
["pe"]="موردنیاز",
@@ -15935,7 +17882,7 @@ return {
["cs"]="reverse",
["de"]="reverse",
["en"]="reverse",
- ["fr"]="inverse",
+ ["fr"]="inverser",
["it"]="invertito",
["nl"]="omgekeerd",
["pe"]="برعکس",
@@ -15965,7 +17912,7 @@ return {
["cs"]="righthanging",
["de"]="righthanging",
["en"]="righthanging",
- ["fr"]="righthanging",
+ ["fr"]="suspensiondroite",
["it"]="righthanging",
["nl"]="rechtshangend",
["pe"]="آویزان‌کردن‌راست",
@@ -15985,7 +17932,7 @@ return {
["cs"]="pravastranka",
["de"]="rechterseite",
["en"]="rightpage",
- ["fr"]="pagedroite",
+ ["fr"]="surpagedroite",
["it"]="paginadestra",
["nl"]="rechterpagina",
["pe"]="صÙحه‌راست",
@@ -15995,7 +17942,7 @@ return {
["cs"]="righttoleft",
["de"]="righttoleft",
["en"]="righttoleft",
- ["fr"]="righttoleft",
+ ["fr"]="droiteagauche",
["it"]="righttoleft",
["nl"]="righttoleft",
["pe"]="righttoleft",
@@ -16005,7 +17952,7 @@ return {
["cs"]="antikva",
["de"]="antiqua",
["en"]="roman",
- ["fr"]="roman",
+ ["fr"]="romain",
["it"]="roman",
["nl"]="romaan",
["pe"]="رومن",
@@ -16025,7 +17972,7 @@ return {
["cs"]="otoc",
["de"]="drehe",
["en"]="rotate",
- ["fr"]="oriente",
+ ["fr"]="tourner",
["it"]="ruota",
["nl"]="roteer",
["pe"]="دوران",
@@ -16065,7 +18012,7 @@ return {
["cs"]="linka",
["de"]="linie",
["en"]="rule",
- ["fr"]="regle",
+ ["fr"]="trait",
["it"]="linea",
["nl"]="lijn",
["pe"]="خط",
@@ -16095,7 +18042,7 @@ return {
["cs"]="sanstucne",
["de"]="sansfett",
["en"]="sansbold",
- ["fr"]="sansgras",
+ ["fr"]="sansserifbold",
["it"]="sansgrassetto",
["nl"]="sansvet",
["pe"]="مشکی‌سانز",
@@ -16103,6 +18050,7 @@ return {
},
["sansnormal"]={
["en"]="sansnormal",
+ ["fr"]="normalsans",
},
["sansserif"]={
["cs"]="bezserifu",
@@ -16148,7 +18096,7 @@ return {
["cs"]="sectionblockenvironment",
["de"]="sectionblockenvironment",
["en"]="sectionblockenvironment",
- ["fr"]="environementblocsection",
+ ["fr"]="environnementblocsection",
["it"]="ambientebloccosezione",
["nl"]="sectieblokomgeving",
["pe"]="محیط‌بلوک‌بخش",
@@ -16168,7 +18116,7 @@ return {
["cs"]="viz",
["de"]="sieh",
["en"]="see",
- ["fr"]="voit",
+ ["fr"]="voir",
["it"]="vedi",
["nl"]="zie",
["pe"]="ببینید",
@@ -16176,9 +18124,11 @@ return {
},
["selectfont"]={
["en"]="selectfont",
+ ["fr"]="selectionnerpolice",
},
["separator"]={
["en"]="separator",
+ ["fr"]="separateur",
["nl"]="scheider",
},
["september"]={
@@ -16203,29 +18153,40 @@ return {
},
["serifbold"]={
["en"]="serifbold",
+ ["fr"]="serifgras",
},
["serifnormal"]={
["en"]="serifnormal",
+ ["fr"]="serifnormal",
},
["serried"]={
["cs"]="semknuto",
["de"]="kleinerabstand",
["en"]="serried",
- ["fr"]="serried",
+ ["fr"]="serre",
["it"]="vicino",
["nl"]="aanelkaar",
["pe"]="تنگ‌هم",
["ro"]="serried",
},
["setups"]={
- ["comment"]="no translations",
["en"]="setups",
},
+ ["seven"]={
+ ["cs"]="seven",
+ ["de"]="sieben",
+ ["en"]="seven",
+ ["fr"]="sept",
+ ["it"]="seven",
+ ["nl"]="zeven",
+ ["pe"]="seven",
+ ["ro"]="seven",
+ },
["sheet"]={
["cs"]="sheet",
["de"]="sheet",
["en"]="sheet",
- ["fr"]="sheet",
+ ["fr"]="feuille",
["it"]="sheet",
["nl"]="sheet",
["pe"]="ورقه",
@@ -16233,24 +18194,28 @@ return {
},
["shiftdown"]={
["en"]="shiftdown",
+ ["fr"]="decalerenbas",
},
["shiftup"]={
["en"]="shiftup",
+ ["fr"]="decalerenhaut",
},
["short"]={
["cs"]="short",
["de"]="kurz",
["en"]="short",
- ["fr"]="short",
+ ["fr"]="court",
["it"]="short",
["nl"]="kort",
["ro"]="short",
},
["simplefonts"]={
["en"]="simplefonts",
+ ["fr"]="policessimple",
},
["simplelist"]={
["en"]="simplelist",
+ ["fr"]="listesimple",
},
["singlesided"]={
["cs"]="jednostranne",
@@ -16262,6 +18227,16 @@ return {
["pe"]="یک‌رو",
["ro"]="ofata",
},
+ ["six"]={
+ ["cs"]="six",
+ ["de"]="sechs",
+ ["en"]="six",
+ ["fr"]="six",
+ ["it"]="six",
+ ["nl"]="zes",
+ ["pe"]="six",
+ ["ro"]="six",
+ },
["slanted"]={
["cs"]="sklonene",
["de"]="geneigt",
@@ -16276,7 +18251,7 @@ return {
["cs"]="sklonenetucne",
["de"]="geneigtfett",
["en"]="slantedbold",
- ["fr"]="grasincline",
+ ["fr"]="inclinegras",
["it"]="inclinatograssetto",
["nl"]="schuinvet",
["pe"]="مشکی‌خوابیده",
@@ -16296,7 +18271,7 @@ return {
["cs"]="smallbodyfont",
["de"]="smallbodyfont",
["en"]="smallbodyfont",
- ["fr"]="petitepolicecorps",
+ ["fr"]="policedecorpspetite",
["it"]="piccolofontdelcorpo",
["nl"]="kleinkorps",
["pe"]="قلم‌بدنه‌کوچک",
@@ -16306,7 +18281,7 @@ return {
["cs"]="maletucne",
["de"]="kleinfett",
["en"]="smallbold",
- ["fr"]="graspetit",
+ ["fr"]="petitgras",
["it"]="piccolograssetto",
["nl"]="kleinvet",
["pe"]="مشکی‌کوچک",
@@ -16316,7 +18291,7 @@ return {
["cs"]="maletucnekurzivni",
["de"]="kleinfettitalic",
["en"]="smallbolditalic",
- ["fr"]="italiquegraspetit",
+ ["fr"]="petitgrasitalique",
["it"]="piccolograssettocorsivo",
["nl"]="kleinvetitalic",
["pe"]="ایتالیک‌مشکی‌کوچک",
@@ -16326,7 +18301,7 @@ return {
["cs"]="maletucnesklonene",
["de"]="kleinfettgeneigt",
["en"]="smallboldslanted",
- ["fr"]="inclinegraspetit",
+ ["fr"]="petitgrasincline",
["it"]="piccolograssettoinclinato",
["nl"]="kleinvetschuin",
["pe"]="خوابیده‌مشکی‌کوچک",
@@ -16336,7 +18311,7 @@ return {
["cs"]="kapitalky",
["de"]="smallcaps",
["en"]="smallcaps",
- ["fr"]="petitescapitales",
+ ["fr"]="petitescaps",
["it"]="maiuscoletto",
["nl"]="smallcaps",
["pe"]="smallcaps",
@@ -16344,13 +18319,14 @@ return {
},
["smaller"]={
["en"]="smaller",
+ ["fr"]="pluspetit",
["nl"]="kleiner",
},
["smallitalic"]={
["cs"]="malekurzivni",
["de"]="kleinitalic",
["en"]="smallitalic",
- ["fr"]="italiquepetit",
+ ["fr"]="petititalique",
["it"]="piccolocorsivo",
["nl"]="kleinitalic",
["pe"]="ایتالیک‌کوچک",
@@ -16360,7 +18336,7 @@ return {
["cs"]="malekurzivnitucne",
["de"]="kleinitalicfett",
["en"]="smallitalicbold",
- ["fr"]="grasitaliquepetit",
+ ["fr"]="petititaliquegras",
["it"]="piccolocorsivograssetto",
["nl"]="kleinitalicvet",
["pe"]="مشکی‌ایتالیک‌کوچک",
@@ -16370,7 +18346,7 @@ return {
["cs"]="malenormalni",
["de"]="kleinnormal",
["en"]="smallnormal",
- ["fr"]="normalpetit",
+ ["fr"]="petitnormal",
["it"]="piccolonormale",
["nl"]="kleinnormaal",
["pe"]="نرمال‌کوچک",
@@ -16380,7 +18356,7 @@ return {
["cs"]="malesklonene",
["de"]="kleingeneigt",
["en"]="smallslanted",
- ["fr"]="inclinepetit",
+ ["fr"]="petitincline",
["it"]="piccoloinclinato",
["nl"]="kleinschuin",
["pe"]="خوابیده‌کوچک",
@@ -16390,7 +18366,7 @@ return {
["cs"]="malesklonenetucne",
["de"]="kleingeneigtfett",
["en"]="smallslantedbold",
- ["fr"]="grasinclinepetit",
+ ["fr"]="petitinclinegras",
["it"]="piccoloinclinatograssetto",
["nl"]="kleinschuinvet",
["pe"]="مشکی‌خوابیده‌کوچک",
@@ -16400,7 +18376,7 @@ return {
["cs"]="maletype",
["de"]="kleintippen",
["en"]="smalltype",
- ["fr"]="petittype",
+ ["fr"]="petitcaractere",
["it"]="piccolotype",
["nl"]="kleintype",
["pe"]="تایپ‌کوچک",
@@ -16428,6 +18404,7 @@ return {
},
["sorting"]={
["en"]="sorting",
+ ["fr"]="tri",
},
["space"]={
["cs"]="mezera",
@@ -16463,7 +18440,7 @@ return {
["cs"]="split",
["de"]="split",
["en"]="split",
- ["fr"]="split",
+ ["fr"]="partager",
["it"]="separa",
["nl"]="splitsen",
["pe"]="شکاÙتن",
@@ -16473,7 +18450,7 @@ return {
["cs"]="spot",
["de"]="spot",
["en"]="spot",
- ["fr"]="spot",
+ ["fr"]="tondirect",
["it"]="spot",
["nl"]="spot",
["pe"]="Ù„Ú©Ù‡",
@@ -16493,7 +18470,7 @@ return {
["cs"]="start",
["de"]="start",
["en"]="start",
- ["fr"]="demarre",
+ ["fr"]="activé",
["it"]="inizia",
["nl"]="start",
["pe"]="شروع",
@@ -16501,13 +18478,14 @@ return {
},
["starter"]={
["en"]="starter",
+ ["fr"]="demarreur",
["nl"]="opener",
},
["sticker"]={
["cs"]="sticker",
["de"]="sticker",
["en"]="sticker",
- ["fr"]="sticker",
+ ["fr"]="autocollant",
["it"]="sticker",
["nl"]="sticker",
["pe"]="دشنه",
@@ -16517,7 +18495,7 @@ return {
["cs"]="stop",
["de"]="stop",
["en"]="stop",
- ["fr"]="stoppe",
+ ["fr"]="fin",
["it"]="termina",
["nl"]="stop",
["pe"]="پایان",
@@ -16527,21 +18505,17 @@ return {
["cs"]="predel",
["de"]="trenner",
["en"]="stopper",
- ["fr"]="stopper",
+ ["fr"]="stoppeur",
["it"]="stopper",
["nl"]="afsluiter",
["pe"]="ایست",
["ro"]="stopper",
},
- ["nostopper"]={
- ["en"]="nostopper",
- ["nl"]="geenafsluiter",
- },
["stretch"]={
["cs"]="natahnout",
["de"]="strecken",
["en"]="stretch",
- ["fr"]="etire",
+ ["fr"]="etirer",
["it"]="dilata",
["nl"]="rek",
["pe"]="بکش",
@@ -16549,6 +18523,7 @@ return {
},
["stretched"]={
["en"]="stretched",
+ ["fr"]="etire",
},
["strict"]={
["cs"]="striktni",
@@ -16564,7 +18539,7 @@ return {
["cs"]="strong",
["de"]="strong",
["en"]="strong",
- ["fr"]="strong",
+ ["fr"]="fort",
["it"]="strong",
["nl"]="sterk",
["pe"]="محکم",
@@ -16574,7 +18549,7 @@ return {
["cs"]="strut",
["de"]="strut",
["en"]="strut",
- ["fr"]="strut",
+ ["fr"]="entretoise",
["it"]="strut",
["nl"]="strut",
["pe"]="بست",
@@ -16594,7 +18569,7 @@ return {
["cs"]="podzpet",
["de"]="unterrueckwaerts",
["en"]="subbackward",
- ["fr"]="sousretourarriere",
+ ["fr"]="petitenarriere",
["it"]="sottoindietro",
["nl"]="subachteruit",
["pe"]="زیرعقب‌گرد",
@@ -16604,7 +18579,7 @@ return {
["cs"]="subrovnice",
["de"]="subformel",
["en"]="subformula",
- ["fr"]="subformule",
+ ["fr"]="sousformule",
["it"]="subformula",
["nl"]="subformule",
["pe"]="زیرÙرمول",
@@ -16614,7 +18589,7 @@ return {
["cs"]="podvpred",
["de"]="untervorwaerts",
["en"]="subforward",
- ["fr"]="sousavance",
+ ["fr"]="petitenavant",
["it"]="sottoavanti",
["nl"]="subvooruit",
["pe"]="زیرجلوگرد",
@@ -16642,6 +18617,7 @@ return {
},
["subs"]={
["en"]="subs",
+ ["fr"]="subs",
},
["subsection"]={
["cs"]="podsekce",
@@ -16867,7 +18843,7 @@ return {
["cs"]="synchronize",
["de"]="synchronize",
["en"]="synchronize",
- ["fr"]="synchronize",
+ ["fr"]="synchroniser",
["it"]="synchronize",
["nl"]="synchroniseer",
["pe"]="تطابق",
@@ -16875,6 +18851,7 @@ return {
},
["synonym"]={
["en"]="synonym",
+ ["fr"]="synonyme",
},
["system"]={
["cs"]="system",
@@ -16890,7 +18867,7 @@ return {
["cs"]="tabulka",
["de"]="tabelle",
["en"]="table",
- ["fr"]="tableau",
+ ["fr"]="table",
["it"]="tabella",
["nl"]="tabel",
["pe"]="جدول",
@@ -16920,7 +18897,7 @@ return {
["cs"]="konectabulky",
["de"]="tabellenende",
["en"]="tabletail",
- ["fr"]="queuetableau",
+ ["fr"]="queuetable",
["it"]="codatabella",
["nl"]="tabelstaart",
["pe"]="دنباله‌جدول",
@@ -16930,7 +18907,7 @@ return {
["cs"]="tabelator",
["de"]="tabulator",
["en"]="tabulate",
- ["fr"]="tabule",
+ ["fr"]="tabulation",
["it"]="tabulato",
["nl"]="tabulatie",
["pe"]="جدول‌بندی",
@@ -16940,7 +18917,7 @@ return {
["cs"]="tabulatehead",
["de"]="tabulatehead",
["en"]="tabulatehead",
- ["fr"]="tetetabule",
+ ["fr"]="tetetabulation",
["it"]="testatabulato",
["nl"]="tabulatiekop",
["pe"]="سرجدول‌بندی",
@@ -16950,7 +18927,7 @@ return {
["cs"]="tabulatetail",
["de"]="tabulatetail",
["en"]="tabulatetail",
- ["fr"]="queuetabule",
+ ["fr"]="queuetabulation",
["it"]="codatabulato",
["nl"]="tabulatiestaart",
["pe"]="دنباله‌جدول‌بندی",
@@ -16960,7 +18937,7 @@ return {
["cs"]="vysoko",
["de"]="lang",
["en"]="tall",
- ["fr"]="long",
+ ["fr"]="grand",
["it"]="alto",
["nl"]="lang",
["pe"]="دراز",
@@ -16970,7 +18947,7 @@ return {
["cs"]="strojopis",
["de"]="fernschreiber",
["en"]="teletype",
- ["fr"]="teletype",
+ ["fr"]="caractereterminal",
["it"]="teletype",
["nl"]="teletype",
["pe"]="دورنگاره",
@@ -17006,6 +18983,11 @@ return {
["pe"]="متن",
["ro"]="text",
},
+ ["textnote"]={
+ ["en"]="textnote",
+ ["fr"]="notetexte",
+ ["nl"]="tekstnoot",
+ },
["three"]={
["cs"]="tri",
["de"]="drei",
@@ -17028,6 +19010,7 @@ return {
},
["tight"]={
["en"]="tight",
+ ["fr"]="resserre",
["nl"]="krap",
},
["title"]={
@@ -17044,7 +19027,7 @@ return {
["cs"]="toggle",
["de"]="toggle",
["en"]="wissel",
- ["fr"]="toggle",
+ ["fr"]="basculer",
["it"]="toggle",
["nl"]="toggle",
["pe"]="تغییر",
@@ -17064,7 +19047,7 @@ return {
["cs"]="vrsek",
["de"]="oben",
["en"]="top",
- ["fr"]="sup",
+ ["fr"]="haut",
["it"]="cima",
["nl"]="boven",
["pe"]="بالا",
@@ -17104,7 +19087,7 @@ return {
["cs"]="opis",
["de"]="tippen",
["en"]="type",
- ["fr"]="type",
+ ["fr"]="transcrire",
["it"]="type",
["nl"]="type",
["pe"]="تایپ",
@@ -17114,7 +19097,7 @@ return {
["cs"]="typing",
["de"]="tippen",
["en"]="typing",
- ["fr"]="typing",
+ ["fr"]="transcription",
["it"]="typing",
["nl"]="typen",
["pe"]="تایپ‌کردن",
@@ -17134,7 +19117,7 @@ return {
["cs"]="podtrzeno",
["de"]="unterstrichen",
["en"]="underbar",
- ["fr"]="souslignetout",
+ ["fr"]="souligner",
["it"]="sottolinea",
["nl"]="onderstreep",
["pe"]="میله‌زیر",
@@ -17144,7 +19127,7 @@ return {
["cs"]="podtrzeni",
["de"]="unterstreichen",
["en"]="underbars",
- ["fr"]="sousligne",
+ ["fr"]="soulignermots",
["it"]="sottolinee",
["nl"]="onderstrepen",
["pe"]="میله‌‌های‌زیر",
@@ -17152,15 +19135,19 @@ return {
},
["understrike"]={
["en"]="understrike",
+ ["fr"]="soubarrer",
},
["understrikes"]={
["en"]="understrikes",
+ ["fr"]="soubarrermots",
},
["unframed"]={
["en"]="unframed",
+ ["fr"]="desencadre",
},
["unicode"]={
["en"]="unicode",
+ ["fr"]="unicode",
},
["unit"]={
["cs"]="jednotka",
@@ -17196,7 +19183,7 @@ return {
["cs"]="rozbalene",
["de"]="ungepackt",
["en"]="unpacked",
- ["fr"]="degroupe",
+ ["fr"]="avecespaceentreitem",
["it"]="unpacked",
["nl"]="vanelkaar",
["pe"]="غیرÙشرده",
@@ -17204,6 +19191,7 @@ return {
},
["up"]={
["en"]="up",
+ ["fr"]="enhaut",
["nl"]="omhoog",
},
["url"]={
@@ -17220,7 +19208,7 @@ return {
["cs"]="uzito",
["de"]="verwende",
["en"]="used",
- ["fr"]="used",
+ ["fr"]="utilise",
["it"]="usato",
["nl"]="gebruikt",
["pe"]="استÙاده‌شده",
@@ -17240,7 +19228,7 @@ return {
["cs"]="vertikalne",
["de"]="vertikal",
["en"]="vertical",
- ["fr"]="verticale",
+ ["fr"]="vertical",
["it"]="verticale",
["nl"]="vertikaal",
["pe"]="عمودی",
@@ -17278,15 +19266,17 @@ return {
},
["vfenced"]={
["en"]="vfenced",
+ ["fr"]="cloturev",
},
["vulgarfraction"]={
["en"]="vulgarfraction",
+ ["fr"]="vulgarfraction",
},
["weak"]={
["cs"]="weak",
["de"]="weak",
["en"]="weak",
- ["fr"]="weak",
+ ["fr"]="faible",
["it"]="weak",
["nl"]="zwak",
["pe"]="Ù‡Ùته",
@@ -17364,6 +19354,7 @@ return {
},
["words"]={
["en"]="words",
+ ["fr"]="mots",
},
["xml"]={
["cs"]="xml",
@@ -17396,597 +19387,4 @@ return {
["ro"]="da",
},
},
- ["setupstrings"]={
- ["cd:buffer"]={
- ["cs"]="buffer",
- ["de"]="buffer",
- ["en"]="buffer",
- ["fr"]="buffer",
- ["it"]="buffer",
- ["nl"]="buffer",
- ["ro"]="buffer",
- },
- ["cd:category"]={
- ["cs"]="category",
- ["de"]="category",
- ["en"]="category",
- ["fr"]="category",
- ["it"]="category",
- ["nl"]="category",
- ["ro"]="category",
- },
- ["cd:character"]={
- ["cs"]="character",
- ["de"]="character",
- ["en"]="character",
- ["fr"]="character",
- ["it"]="character",
- ["nl"]="karakter",
- ["ro"]="character",
- },
- ["cd:color"]={
- ["cs"]="color",
- ["de"]="color",
- ["en"]="color",
- ["fr"]="color",
- ["it"]="color",
- ["nl"]="kleur",
- ["ro"]="color",
- },
- ["cd:column"]={
- ["cs"]="column",
- ["de"]="column",
- ["en"]="column",
- ["fr"]="column",
- ["it"]="column",
- ["nl"]="kolom",
- ["ro"]="column",
- },
- ["cd:command"]={
- ["cs"]="Befehl",
- ["de"]="Befehl",
- ["en"]="command",
- ["fr"]="Befehl",
- ["it"]="Befehl",
- ["nl"]="commando",
- ["ro"]="Befehl",
- },
- ["cd:content"]={
- ["cs"]="content",
- ["de"]="content",
- ["en"]="content",
- ["fr"]="content",
- ["it"]="content",
- ["nl"]="inhoud",
- ["ro"]="content",
- },
- ["cd:csname"]={
- ["cs"]="csname",
- ["de"]="csname",
- ["en"]="csname",
- ["fr"]="csname",
- ["it"]="csname",
- ["nl"]="naam",
- ["ro"]="csname",
- },
- ["cd:delimiter"]={
- ["cs"]="delimiter",
- ["de"]="delimiter",
- ["en"]="delimiter",
- ["fr"]="delimiter",
- ["it"]="delimiter",
- ["nl"]="delimiter",
- ["ro"]="delimiter",
- },
- ["cd:destination"]={
- ["cs"]="destination",
- ["de"]="destination",
- ["en"]="destination",
- ["fr"]="destination",
- ["it"]="destination",
- ["nl"]="bestemming",
- ["ro"]="destination",
- },
- ["cd:dimension"]={
- ["cs"]="Dimension",
- ["de"]="Dimension",
- ["en"]="dimension",
- ["fr"]="Dimension",
- ["it"]="Dimension",
- ["nl"]="maat",
- ["ro"]="Dimension",
- },
- ["cd:displaymath"]={
- ["cs"]="formula",
- ["de"]="formula",
- ["en"]="formula",
- ["fr"]="formula",
- ["it"]="formula",
- ["nl"]="formule",
- ["ro"]="formula",
- },
- ["cd:false"]={
- ["cs"]="false",
- ["de"]="false",
- ["en"]="false",
- ["fr"]="false",
- ["it"]="false",
- ["nl"]="false",
- ["ro"]="false",
- },
- ["cd:file"]={
- ["cs"]="file",
- ["de"]="file",
- ["en"]="file",
- ["fr"]="file",
- ["it"]="file",
- ["nl"]="file",
- ["ro"]="file",
- },
- ["cd:path"]={
- ["cs"]="path",
- ["de"]="path",
- ["en"]="path",
- ["fr"]="path",
- ["it"]="path",
- ["nl"]="path",
- ["ro"]="path",
- },
- ["cd:first"]={
- ["cs"]="first",
- ["de"]="first",
- ["en"]="first",
- ["fr"]="first",
- ["it"]="first",
- ["nl"]="eerste",
- ["ro"]="first",
- },
- ["cd:font"]={
- ["cs"]="font",
- ["de"]="font",
- ["en"]="font",
- ["fr"]="font",
- ["it"]="font",
- ["nl"]="font",
- ["ro"]="font",
- },
- ["cd:formula"]={
- ["cs"]="Formel",
- ["de"]="Formel",
- ["en"]="formula",
- ["fr"]="Formel",
- ["it"]="Formel",
- ["nl"]="formule",
- ["ro"]="Formel",
- },
- ["cd:identifier"]={
- ["cs"]="Name",
- ["de"]="Name",
- ["en"]="identifier",
- ["fr"]="Name",
- ["it"]="Name",
- ["nl"]="naam",
- ["ro"]="Name",
- },
- ["cd:index"]={
- ["cs"]="entry",
- ["de"]="entry",
- ["en"]="entry",
- ["fr"]="entry",
- ["it"]="entry",
- ["nl"]="ingang",
- ["ro"]="entry",
- },
- ["cd:inherits"]={
- ["cs"]="inherits",
- ["de"]="inherits",
- ["en"]="inherits",
- ["fr"]="inherits",
- ["it"]="inherits",
- ["nl"]="erft",
- ["ro"]="inherits",
- },
- ["cd:key"]={
- ["cs"]="key",
- ["de"]="key",
- ["en"]="key",
- ["fr"]="key",
- ["it"]="key",
- ["nl"]="parameter",
- ["ro"]="key",
- },
- ["cd:language"]={
- ["cs"]="sprache",
- ["de"]="sprache",
- ["en"]="language",
- ["fr"]="sprache",
- ["it"]="sprache",
- ["nl"]="taal",
- ["ro"]="sprache",
- },
- ["cd:last"]={
- ["cs"]="last",
- ["de"]="last",
- ["en"]="last",
- ["fr"]="last",
- ["it"]="last",
- ["nl"]="laatste",
- ["ro"]="last",
- },
- ["cd:list"]={
- ["cs"]="Liste",
- ["de"]="Liste",
- ["en"]="list",
- ["fr"]="Liste",
- ["it"]="Liste",
- ["nl"]="lijst",
- ["ro"]="Liste",
- },
- ["cd:lpath"]={
- ["cs"]="lpath",
- ["de"]="lpath",
- ["en"]="lpath",
- ["fr"]="lpath",
- ["it"]="lpath",
- ["nl"]="lpath",
- ["ro"]="lpath",
- },
- ["cd:luafunction"]={
- ["cs"]="luafunction",
- ["de"]="luafunction",
- ["en"]="luafunction",
- ["fr"]="luafunction",
- ["it"]="luafunction",
- ["nl"]="luafunction",
- ["ro"]="luafunction",
- },
- ["cd:mark"]={
- ["cs"]="Beschriftung",
- ["de"]="Beschriftung",
- ["en"]="mark",
- ["fr"]="Beschriftung",
- ["it"]="Beschriftung",
- ["nl"]="markering",
- ["ro"]="Beschriftung",
- },
- ["cd:marking"]={
- ["cs"]="marking",
- ["de"]="marking",
- ["en"]="marking",
- ["fr"]="marking",
- ["it"]="marking",
- ["nl"]="markering",
- ["ro"]="marking",
- },
- ["cd:math"]={
- ["cs"]="formula",
- ["de"]="formula",
- ["en"]="formula",
- ["fr"]="formula",
- ["it"]="formula",
- ["nl"]="formule",
- ["ro"]="formula",
- },
- ["cd:matrix"]={
- ["cs"]="n*m",
- ["de"]="n*m",
- ["en"]="n*m",
- ["fr"]="n*m",
- ["it"]="n*m",
- ["nl"]="n*m",
- ["ro"]="n*m",
- },
- ["cd:name"]={
- ["cs"]="Name",
- ["de"]="Name",
- ["en"]="name",
- ["fr"]="Name",
- ["it"]="Name",
- ["nl"]="naam",
- ["ro"]="Name",
- },
- ["cd:node"]={
- ["cs"]="node",
- ["de"]="node",
- ["en"]="node",
- ["fr"]="node",
- ["it"]="node",
- ["nl"]="node",
- ["ro"]="node",
- },
- ["cd:nothing"]={
- ["cs"]="empty",
- ["de"]="empty",
- ["en"]="empty",
- ["fr"]="empty",
- ["it"]="empty",
- ["nl"]="leeg",
- ["ro"]="empty",
- },
- ["cd:number"]={
- ["cs"]="Nummer",
- ["de"]="Nummer",
- ["en"]="number",
- ["fr"]="Nummer",
- ["it"]="Nummer",
- ["nl"]="getal",
- ["ro"]="Nummer",
- },
- ["cd:optional"]={
- ["cs"]="opt",
- ["de"]="opt",
- ["en"]="opt",
- ["fr"]="opt",
- ["it"]="opt",
- ["nl"]="opt",
- ["ro"]="opt",
- },
- ["cd:plural"]={
- ["cs"]="plural",
- ["de"]="plural",
- ["en"]="plural",
- ["fr"]="plural",
- ["it"]="plural",
- ["nl"]="naam",
- ["ro"]="plural",
- },
- ["cd:position"]={
- ["cs"]="position",
- ["de"]="position",
- ["en"]="position",
- ["fr"]="position",
- ["it"]="position",
- ["nl"]="positie",
- ["ro"]="position",
- },
- ["cd:processor"]={
- ["cs"]="processor",
- ["de"]="processor",
- ["en"]="processor",
- ["fr"]="processor",
- ["it"]="processor",
- ["nl"]="verwerker",
- ["ro"]="processor",
- },
- ["cd:reference"]={
- ["cs"]="reference",
- ["de"]="reference",
- ["en"]="reference",
- ["fr"]="reference",
- ["it"]="reference",
- ["nl"]="verwijzing",
- ["ro"]="reference",
- },
- ["cd:row"]={
- ["cs"]="row",
- ["de"]="row",
- ["en"]="row",
- ["fr"]="row",
- ["it"]="row",
- ["nl"]="rij",
- ["ro"]="row",
- },
- ["cd:section"]={
- ["cs"]="Abschnitt",
- ["de"]="Abschnitt",
- ["en"]="section",
- ["fr"]="Abschnitt",
- ["it"]="Abschnitt",
- ["nl"]="sectie",
- ["ro"]="Abschnitt",
- },
- ["cd:sectionblock"]={
- ["cs"]="sectionblock",
- ["de"]="sectionblock",
- ["en"]="sectionblock",
- ["fr"]="sectionblock",
- ["it"]="sectionblock",
- ["nl"]="sectieblok",
- ["ro"]="sectionblock",
- },
- ["cd:see"]={
- ["cs"]="siehe",
- ["de"]="siehe",
- ["en"]="see",
- ["fr"]="siehe",
- ["it"]="siehe",
- ["nl"]="zie",
- ["ro"]="siehe",
- },
- ["cd:setup"]={
- ["cs"]="setup",
- ["de"]="setup",
- ["en"]="setup",
- ["fr"]="setup",
- ["it"]="setup",
- ["nl"]="setup",
- ["ro"]="setup",
- },
- ["cd:singular"]={
- ["cs"]="singular",
- ["de"]="singular",
- ["en"]="singular",
- ["fr"]="singular",
- ["it"]="singular",
- ["nl"]="naam",
- ["ro"]="singular",
- },
- ["cd:style"]={
- ["cs"]="style",
- ["de"]="style",
- ["en"]="style",
- ["fr"]="style",
- ["it"]="style",
- ["nl"]="letter",
- ["ro"]="style",
- },
- ["cd:template"]={
- ["cs"]="template",
- ["de"]="template",
- ["en"]="template",
- ["fr"]="template",
- ["it"]="template",
- ["nl"]="sjabloon",
- ["ro"]="template",
- },
- ["cd:text"]={
- ["cs"]="Text",
- ["de"]="Text",
- ["en"]="text",
- ["fr"]="Text",
- ["it"]="Text",
- ["nl"]="tekst",
- ["ro"]="Text",
- },
- ["cd:title"]={
- ["cs"]="Setup",
- ["de"]="Setup",
- ["en"]="setup",
- ["fr"]="Setup",
- ["it"]="Setup",
- ["nl"]="setup",
- ["ro"]="Setup",
- },
- ["cd:triplet"]={
- ["cs"]="triplet",
- ["de"]="triplet",
- ["en"]="triplet",
- ["fr"]="triplet",
- ["it"]="triplet",
- ["nl"]="triplet",
- ["ro"]="triplet",
- },
- ["cd:true"]={
- ["cs"]="true",
- ["de"]="true",
- ["en"]="true",
- ["fr"]="true",
- ["it"]="true",
- ["nl"]="true",
- ["ro"]="true",
- },
- ["cd:url"]={
- ["cs"]="url",
- ["de"]="url",
- ["en"]="url",
- ["fr"]="url",
- ["it"]="url",
- ["nl"]="url",
- ["ro"]="url",
- },
- ["cd:userdata"]={
- ["cs"]="userdata",
- ["de"]="userdata",
- ["en"]="userdata",
- ["fr"]="userdata",
- ["it"]="userdata",
- ["nl"]="gebruikersdata",
- ["ro"]="userdata",
- },
- ["cd:value"]={
- ["cs"]="value",
- ["de"]="value",
- ["en"]="value",
- ["fr"]="value",
- ["it"]="value",
- ["nl"]="waarde",
- ["ro"]="value",
- },
- ["cd:word"]={
- ["cs"]="word",
- ["de"]="word",
- ["en"]="word",
- ["fr"]="word",
- ["it"]="word",
- ["nl"]="woord",
- ["ro"]="word",
- },
- ["cd:xmlsetup"]={
- ["cs"]="xmlsetup",
- ["de"]="xmlsetup",
- ["en"]="xmlsetup",
- ["fr"]="xmlsetup",
- ["it"]="xmlsetup",
- ["nl"]="xmlsetup",
- ["ro"]="xmlsetup",
- },
- ["cd:sign"] = { en = "[-+]" },
- ["cd:csname-s"] = { en = "\\..." },
- ["cd:csname-l"] = { en = "\\..." },
- ["cd:noargument-s"] = { en = "\\..." },
- ["cd:noargument-l"] = { en = "\\..." },
- ["cd:oneargument"] = { en = "\\...#1" },
- ["cd:twoarguments"] = { en = "\\...#1#2" },
- ["cd:threearguments"] = { en = "\\...#1#2#3" },
- ["cd:braces-s"] = { en = "{...}", lua = '"..."' },
- ["cd:braces-l"] = { en = "{...,...}", lua = '".. ... .."' },
- ["cd:brackets-s"] = { en = "[...]", lua = "{ ... }" },
- ["cd:brackets-l"] = { en = "[...,...]", lua = "{..., ...}" },
- ["cd:parenthesis-s"] = { en = "(...)" },
- ["cd:parenthesis-l"] = { en = "(...,...)" },
- ["cd:index-s"] = { en = "{...}" },
- ["cd:index-l"] = { en = "{..+...+..}" },
- ["cd:math-s"] = { en = "$...$" },
- ["cd:math-l"] = { en = "$...$" },
- ["cd:inlinemath-s"] = { en = "$...$" },
- ["cd:inlinemath-l"] = { en = "$...$" },
- ["cd:displaymath-s"] = { en = "$$...$$" },
- ["cd:displaymath-l"] = { en = "$$...$$" },
- ["cd:template-s"] = { en = "[|...|]" },
- ["cd:template-l"] = { en = "[|...|...|]" },
- ["cd:twowords-s"] = { en = "[..+..]" },
- ["cd:twowords-l"] = { en = "[..+..]" },
- ["cd:threewords-s"] = { en = "[..+..+..]" },
- ["cd:threewords-l"] = { en = "[..+..+..]" },
- ["cd:angle-s"] = { en = "<<...>>" },
- ["cd:angle-l"] = { en = "<<...>>" },
- ["cd:reference-s"] = { en = "[...]", lua = "{ ... }" },
- ["cd:reference-l"] = { en = "[...,...]", lua = "{..., ...}" },
- ["cd:position-s"] = { en = "(...)" },
- ["cd:position-l"] = { en = "(...,...)" },
- ["cd:triplet-s"] = { en = "[x:y:z]" },
- ["cd:triplet-l"] = { en = "[x:y:z,..]" },
- ["cd:word-s"] = { en = "{...}", lua = '"..."' },
- ["cd:word-l"] = { en = "{.. ... ..}", lua = '".. ... .."' },
- ["cd:content-s"] = { en = "{...}", lua = '"..."' },
- ["cd:content-l"] = { en = "{.. ... ..}", lua = '".. ... .."' },
- ["cd:textual-s"] = { en = "..." },
- ["cd:textual-l"] = { en = ".. ... .." },
- ["cd:none-s"] = { en = "..." },
- ["cd:none-l"] = { en = ".. ... .." },
- ["cd:macro-s"] = { en = "\\... " },
- ["cd:macro-l"] = { en = "\\... " },
- ["cd:to-s"] = { en = "\\to " },
- ["cd:to-l"] = { en = "\\to " },
- ["cd:destination-s"] = { en = "[{..[ref]}]" },
- ["cd:destination-l"] = { en = "[..,{..[ref,..]},..]" },
- ["cd:nothing-s"] = { en = "..." },
- ["cd:nothing-l"] = { en = "..." },
- ["cd:file-s"] = { en = " ... " },
- ["cd:file-l"] = { en = " ... " },
- ["cd:assignment-s"] = { en = "[..=..]", lua = "{ ..=.. } " },
- ["cd:assignment-l"] = { en = "[..,..=..,..]", lua = "{ ..,..=..,.. } " },
- ["cd:assignmentbraces-s"] = { en = "{..=..}" },
- ["cd:assignmentbraces-l"] = { en = "{..,..=..,..}" },
- ["cd:assignmentbrackets-s"] = { en = "[..=..]", lua = "{ ..=.. } " },
- ["cd:assignmentbrackets-l"] = { en = "[..,..=..,..]", lua = "{ ..,..=..,.. } " },
- ["cd:assignmentparentheses-s"] = { en = "(..=..)" },
- ["cd:assignmentparentheses-l"] = { en = "(..,..=..,..)" },
- ["cd:apply-s"] = { en = "[..=>..]" },
- ["cd:apply-l"] = { en = "[..,..=>..,..]" },
- ["cd:if-s"] = { en = "\\if... " },
- ["cd:if-l"] = { en = "\\if... " },
- ["cd:case-s"] = { en = "\\case " },
- ["cd:case-l"] = { en = "\\case " },
- ["cd:else-s"] = { en = "\\else " },
- ["cd:else-l"] = { en = "\\else " },
- ["cd:or-s"] = { en = "\\or " },
- ["cd:or-l"] = { en = "\\or " },
- ["cd:fi-s"] = { en = "\\fi " },
- ["cd:fi-l"] = { en = "\\fi " },
- ["cd:par-s"] = { en = "\\par " },
- ["cd:par-l"] = { en = "\\par " },
- ["cd:sep-s"] = { en = "\\" },
- ["cd:sep-l"] = { en = "\\" },
- }
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv
index 78fcdf667dd..0a450e8b070 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-def.mkiv
@@ -37,9 +37,9 @@
% some left-overs
-\def\c!HL{HL}
-\def\c!VL{VL}
-\def\c!NL{NL}
+\defineinterfaceconstant {HL} {HL}
+\defineinterfaceconstant {VL} {VL}
+\defineinterfaceconstant {NL} {NL}
% stop todo
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi b/Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi
index 0224e3dbb16..952550055c6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-dim.mkvi
@@ -48,10 +48,10 @@
\setvalue{\??dimensionnormal-\v!big }#value#dimension#small#medium#big{#dimension=-#big\relax}
\letvalue{\??dimensionnormal\s!unknown}\assign_dimension_direct
-% \unexpanded\def\assigndimension#value%
+% \protected\def\assigndimension#value%
% {\csname\??dimensionnormal\ifcsname\??dimensionnormal#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
-\unexpanded\def\assigndimension#value%
+\protected\def\assigndimension#value%
{\ifcsname\??dimensionnormal#value\endcsname
\expandafter\lastnamedcs
\else
@@ -81,10 +81,10 @@
\setvalue{\??dimensionalfa\v!big }#value#macro#small#medium#big{\edef#macro{#big}}
\letvalue{\??dimensionalfa\s!unknown}\assign_alpha_dimension_direct
-% \unexpanded\def\assignalfadimension#value%
+% \protected\def\assignalfadimension#value%
% {\csname\??dimensionalfa\ifcsname\??dimensionalfa#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
-\unexpanded\def\assignalfadimension#value%
+\protected\def\assignalfadimension#value%
{\ifcsname\??dimensionalfa#value\endcsname
\expandafter\lastnamedcs
\else
@@ -115,10 +115,10 @@
\setvalue{\??dimensionvalue\v!big }#value#macro#small#medium#big{\edef#macro{#big}}
\letvalue{\??dimensionvalue\s!unknown}\assign_value_direct
-% \unexpanded\def\assignvalue#value%
+% \protected\def\assignvalue#value%
% {\csname\??dimensionvalue\ifcsname\??dimensionvalue#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
-\unexpanded\def\assignvalue#value%
+\protected\def\assignvalue#value%
{\ifcsname\??dimensionvalue#value\endcsname
\expandafter\lastnamedcs
\else
@@ -157,10 +157,10 @@
\setbox\b_assign_width\emptybox}
\letvalue{\??dimensionwidth\s!unknown}\assign_width_direct
-% \unexpanded\def\assignwidth#value%
+% \protected\def\assignwidth#value%
% {\csname\??dimensionwidth\ifcsname\??dimensionwidth#value\endcsname#value\else\s!unknown\fi\endcsname{#value}}
-\unexpanded\def\assignwidth#value%
+\protected\def\assignwidth#value%
{\ifcsname\??dimensionwidth#value\endcsname
\expandafter\lastnamedcs
\else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua
new file mode 100644
index 00000000000..0d11a425333
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-fmt.lua
@@ -0,0 +1,338 @@
+if not modules then modules = { } end modules ['mult-fmt'] = {
+ version = 1.001,
+ comment = "companion to mult-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next = next
+local concat, sortedhash = table.concat, table.sortedhash
+local sub, formatters = string.sub, string.formatters
+local utfsplit = utf.split
+
+local prtcatcodes = catcodes.numbers.prtcatcodes
+local contextsprint = context.sprint
+local implement = interfaces.implement
+
+local setmacro = token.set_macro
+local definedmacro = token.is_defined
+
+local report = logs.reporter("interface")
+local report_interface = logs.reporter("interface","initialization")
+local report_variable = logs.reporter("variable")
+local report_constant = logs.reporter("constant")
+local report_command = logs.reporter("command")
+local report_element = logs.reporter("element")
+local report_format = logs.reporter("format")
+local report_messagetag = logs.reporter("messagetag")
+local report_setupstring = logs.reporter("setupstring")
+
+local function limit(str,n)
+ if n > 6 and #str > n then
+ n = n - 4
+ local t = utfsplit(str)
+ local m = #t
+ if m > n then
+ t[n] = " ..."
+ str = concat(t,"",1,n)
+ end
+ end
+ return str
+end
+
+-- function interfaces.setuserinterface(interface,response)
+-- local variables = interfaces.variables
+-- local constants = interfaces.constants
+-- local elements = interfaces.elements
+-- local formats = interfaces.formats
+-- local translations = interfaces.translations
+-- local setupstrings = interfaces.setupstrings
+-- local complete = interfaces.complete
+-- local sharedstorage = storage.shared
+-- --
+-- sharedstorage.currentinterface, currentinterface = interface, interface
+-- sharedstorage.currentresponse, currentresponse = response, response
+-- --
+-- if environment.initex then
+-- local nofconstants = 0
+-- local nofvariables = 0
+-- local nofelements = 0
+-- local nofcommands = 0
+-- local nofformats = 0
+-- local noftranslations = 0
+-- local nofsetupstrings = 0
+-- --
+-- do
+-- local list = complete.constants -- forces the load
+-- local t = { }
+-- local f = formatters["\\ui_c{%s}{%s}"]
+-- local s = formatters["\\ui_s{%s}"]
+-- logs.startfilelogging(report,"translated constants")
+-- for given, constant in sortedhash(list) do
+-- constant = constant[interface] or constant.en or given
+-- constants[constant] = given -- breedte -> width
+-- nofconstants = nofconstants + 1
+-- if given == constant then
+-- t[nofconstants] = s(given)
+-- else
+-- t[nofconstants] = f(given,constant)
+-- end
+-- report_constant("%-40s: %s",given,constant)
+-- end
+-- logs.stopfilelogging()
+-- contextsprint(prtcatcodes,concat(t))
+-- end
+-- do
+-- local list = complete.variables -- forces the load
+-- local t = { }
+-- local f = formatters["\\ui_v{%s}{%s}"]
+-- logs.startfilelogging(report,"translated variables")
+-- for given, variable in sortedhash(list) do
+-- variable = variable[interface] or variable.en or given
+-- variables[given] = variable -- ja -> yes
+-- nofvariables = nofvariables + 1
+-- t[nofvariables] = f(given,variable)
+-- report_variable("%-40s: %s",given,variable)
+-- end
+-- logs.stopfilelogging()
+-- contextsprint(prtcatcodes,concat(t))
+-- end
+-- do
+-- local list = complete.elements -- forces the load
+-- local t = { }
+-- local f = formatters["\\ui_e{%s}{%s}"]
+-- logs.startfilelogging(report,"translated elements")
+-- for given, element in sortedhash(list) do
+-- element = element[interface] or element.en or given
+-- elements[element] = given
+-- nofelements = nofelements + 1
+-- t[nofelements] = f(given,element)
+-- report_element("%-40s: %s",given,element)
+-- end
+-- logs.stopfilelogging()
+-- contextsprint(prtcatcodes,concat(t))
+-- end
+-- do
+-- local list = complete.commands -- forces the load
+-- local t = { }
+-- local n = 0
+-- local f = formatters["\\ui_a\\%s\\%s"] -- formatters["\\ui_m{%s}{%s}"]
+-- logs.startfilelogging(report,"translated commands")
+-- for given, command in sortedhash(list) do
+-- command = command[interface] or command.en or given
+-- if command ~= given then
+-- n = n + 1
+-- t[n] = f(given,command)
+-- report_command("%-40s: %s",given,command)
+-- end
+-- nofcommands = nofcommands + 1
+-- end
+-- logs.stopfilelogging()
+-- contextsprint(prtcatcodes,"\\toksapp\\everydump{"..concat(t).."}")
+-- end
+-- do
+-- local list = complete.messages.formats
+-- logs.startfilelogging(report,"translated message formats")
+-- for given, format in sortedhash(list) do
+-- local found = format[interface] or format.en or given
+-- formats[given] = found
+-- nofformats = nofformats + 1
+-- report_messagetag("%-40s: %s",limit(given,38),limit(found,38))
+-- end
+-- logs.stopfilelogging()
+-- end
+-- do
+-- local list = complete.messages.translations
+-- logs.startfilelogging(report,"translated message tags")
+-- for given, translation in sortedhash(list) do
+-- local found = translation[interface] or translation.en or given
+-- translations[given] = found
+-- noftranslations = noftranslations + 1
+-- report_messagetag("%-40s: %s",given,found)
+-- end
+-- logs.stopfilelogging()
+-- end
+-- do
+-- local list = complete.setupstrings
+-- logs.startfilelogging(report,"translated setupstrings")
+-- for given, setupstring in sortedhash(list) do
+-- local found = setupstring[interface] or setupstring.en or given
+-- setupstrings[given] = found
+-- nofsetupstrings = nofsetupstrings + 1
+-- report_setupstring("%-40s: %s",given,found)
+-- end
+-- logs.stopfilelogging()
+-- end
+-- report_interface("definitions: %a constants, %a variables, %a elements, %a commands, %a formats, %a translations, %a setupstrings",
+-- nofconstants,nofvariables,nofelements,nofcommands,nofformats,noftranslations,nofsetupstrings)
+-- else
+-- report_interface("the language(s) can only be set when making the format")
+-- end
+-- interfaces.currentinterface = currentinterface
+-- interfaces.currentresponse = currentresponse
+-- end
+
+-- different per interface
+--
+-- en:
+--
+-- ui_c macro:#1#2 -> \immutable \gdefcsname \c!prefix! #1\endcsname {#1}
+-- ui_v macro:#1#2 -> \immutable \gdefcsname \v!prefix! #1\endcsname {#2}
+-- ui_e macro:#1#2 -> \immutable \gdefcsname \e!prefix! #1\endcsname {#2}
+-- ui_a macro:#1#2 -> \frozen \protected \def #2{#1}
+--
+-- otherwise:
+--
+-- ui_c macro:#1#2 -> \immutable \gdefcsname \c!prefix! #1\endcsname {#1}
+-- \immutable \gdefcsname \k!prefix! #2\endcsname {#1}
+
+function interfaces.setuserinterface(interface,response)
+ local variables = interfaces.variables
+ local constants = interfaces.constants
+ local elements = interfaces.elements
+ local formats = interfaces.formats
+ local translations = interfaces.translations
+ local setupstrings = interfaces.setupstrings
+ local complete = interfaces.complete
+ local sharedstorage = storage.shared
+ --
+ sharedstorage.currentinterface, currentinterface = interface, interface
+ sharedstorage.currentresponse, currentresponse = response, response
+ --
+ if environment.initex then
+ local nofconstants = 0
+ local nofvariables = 0
+ local nofelements = 0
+ local nofcommands = 0
+ local nofformats = 0
+ local noftranslations = 0
+ local nofsetupstrings = 0
+ local reversetoo = interface ~= "en"
+ --
+ do
+ local list = complete.constants -- forces the load
+ logs.startfilelogging(report,"translated constants")
+ for given, constant in sortedhash(list) do
+ constant = constant[interface] or constant.en or given
+ constants[constant] = given -- breedte -> width
+ nofconstants = nofconstants + 1
+ setmacro("c!" .. given,given,"immutable")
+ if reversetoo then
+ setmacro("k!" .. constant,given,"immutable")
+ end
+ report_constant("%-40s: %s",given,constant)
+ end
+ logs.stopfilelogging()
+ end
+ do
+ local list = complete.variables -- forces the load
+ logs.startfilelogging(report,"translated variables")
+ for given, variable in sortedhash(list) do
+ variable = variable[interface] or variable.en or given
+ variables[given] = variable -- ja -> yes
+ nofvariables = nofvariables + 1
+ setmacro("v!" .. given,variable,"immutable")
+ report_variable("%-40s: %s",given,variable)
+ end
+ logs.stopfilelogging()
+ end
+ do
+ local list = complete.elements -- forces the load
+ logs.startfilelogging(report,"translated elements")
+ for given, element in sortedhash(list) do
+ element = element[interface] or element.en or given
+ elements[element] = given
+ nofelements = nofelements + 1
+ setmacro("e!" .. given,element,"immutable")
+ report_element("%-40s: %s",given,element)
+ end
+ logs.stopfilelogging()
+ end
+-- do
+-- local list = complete.commands -- forces the load
+-- local todo = { } -- normally a small list
+-- logs.startfilelogging(report,"translated commands")
+-- for given, command in sortedhash(list) do
+-- command = command[interface] or command.en or given
+-- if command ~= given then
+-- report_command("%-40s: %s",given,command)
+-- todo[given] = command
+-- end
+-- nofcommands = nofcommands + 1
+-- end
+-- logs.stopfilelogging()
+-- -- For some reason we get corrupted definitions.
+-- luatex.registerdumpactions(function()
+-- for given, command in sortedhash(todo) do
+-- -- if definedmacro(given) then
+-- setmacro(command,"\\"..given,"frozen","protected","global")
+-- -- end
+-- end
+-- end)
+-- end
+ do
+ local list = complete.commands -- forces the load
+ local t = { }
+ local n = 0
+ local f = formatters["\\frozen\\protected\\def\\%s{\\%s}"] -- formatters["\\ui_m{%s}{%s}"]
+ logs.startfilelogging(report,"translated commands")
+ for given, command in sortedhash(list) do
+ command = command[interface] or command.en or given
+ if command ~= given then
+ n = n + 1
+ t[n] = f(command,given)
+ report_command("%-40s: %s",given,command)
+ end
+ nofcommands = nofcommands + 1
+ end
+ logs.stopfilelogging()
+ contextsprint(prtcatcodes,"\\toksapp\\everydump{"..concat(t).."}")
+ end
+ do
+ local list = complete.messages.formats
+ logs.startfilelogging(report,"translated message formats")
+ for given, format in sortedhash(list) do
+ local found = format[interface] or format.en or given
+ formats[given] = found
+ nofformats = nofformats + 1
+ report_messagetag("%-40s: %s",limit(given,38),limit(found,38))
+ end
+ logs.stopfilelogging()
+ end
+ do
+ local list = complete.messages.translations
+ logs.startfilelogging(report,"translated message tags")
+ for given, translation in sortedhash(list) do
+ local found = translation[interface] or translation.en or given
+ translations[given] = found
+ noftranslations = noftranslations + 1
+ report_messagetag("%-40s: %s",given,found)
+ end
+ logs.stopfilelogging()
+ end
+ do
+ local list = complete.setupstrings
+ logs.startfilelogging(report,"translated setupstrings")
+ for given, setupstring in sortedhash(list) do
+ local found = setupstring[interface] or setupstring.en or given
+ setupstrings[given] = found
+ nofsetupstrings = nofsetupstrings + 1
+ report_setupstring("%-40s: %s",given,found)
+ end
+ logs.stopfilelogging()
+ end
+ report_interface("definitions: %a constants, %a variables, %a elements, %a commands, %a formats, %a translations, %a setupstrings",
+ nofconstants,nofvariables,nofelements,nofcommands,nofformats,noftranslations,nofsetupstrings)
+ else
+ report_interface("the language(s) can only be set when making the format")
+ end
+ interfaces.currentinterface = currentinterface
+ interfaces.currentresponse = currentresponse
+end
+
+interfaces.implement {
+ name = "setuserinterface",
+ actions = interfaces.setuserinterface,
+ arguments = "2 strings",
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua
index 99700f47458..4ecbb1abdf4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-fun.lua
@@ -2,7 +2,7 @@ return {
internals = {
--
"nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel",
- "shadefactor",
+ "shadefactor", "shadeoffset",
"textextoffset", "textextanchor",
"normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent",
"softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent",
@@ -17,7 +17,7 @@ return {
"drawoptionsfactor",
"dq", "sq",
"crossingscale", "crossingoption",
- "contextlmtxmode",
+ "contextlmtxmode", "metafunversion", "minifunversion",
--
-- for the moment we put these here as they need to stand out
--
@@ -74,6 +74,7 @@ return {
"withshadedomain", "withshademethod", "withshadefactor", "withshadevector",
"withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform",
"withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin",
+ "shownshadedirection", "shownshadecenter",
"cmyk", "spotcolor", "multitonecolor", "namedcolor",
"drawfill", "undrawfill",
"inverted", "uncolored", "softened", "grayed", "greyed",
@@ -85,11 +86,12 @@ return {
"withmask", "bitmapimage",
"colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist",
"textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext",
+ "rawmadetext", "validtexbox", "onetimetextext", "rawfmttext", "thefmttext", "fmttext", "onetimefmttext",
"notcached", "keepcached",
"verbatim",
"thelabel", "label",
"autoalign",
- "transparent", "withtransparency",
+ "transparent", "withtransparency", "withopacity",
"property", "properties", "withproperties",
"asgroup",
"infont", -- redefined using textext
@@ -174,6 +176,7 @@ return {
"isarray", "prefix", "dimension",
"getmacro", "getdimen", "getcount", "gettoks",
"setmacro", "setdimen", "setcount", "settoks",
+ "setglobalmacro", "setglobaldimen", "setglobalcount", "setglobaltoks",
--
"positionpath", "positioncurve", "positionxy", "positionpxy",
"positionwhd", "positionpage", "positionregion", "positionbox",
@@ -185,16 +188,21 @@ return {
--
"inpath", "pointof", "leftof", "rightof",
--
- "utflen", "utfsub",
+ "utfnum", "utflen", "utfsub",
--
"newhash", "disposehash", "inhash", "tohash",
--
"isarray", "prefix", "isobject",
--
- "comment", "report", "lua", "mp", "MP", "luacall",
+ "comment", "report", "lua", "lualist", "mp", "MP", "luacall",
--
"mirrored", "mirroredabout",
--
- "scriptindex",
+ "scriptindex", "newscriptindex",
+ --
+ "newcolor", "newrgbcolor", "newcmykcolor",
+ "newnumeric", "newboolean", "newtransform", "newpath", "newpicture", "newstring", "newpair",
+
+ "mpvar",
},
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua
index 0c8581281d1..eb758fcbf07 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.lua
@@ -233,138 +233,6 @@ end
logs.setmessenger(context.verbatim.ctxreport)
--- todo: use setmacro
-
-function interfaces.setuserinterface(interface,response)
- sharedstorage.currentinterface, currentinterface = interface, interface
- sharedstorage.currentresponse, currentresponse = response, response
- if environment.initex then
- local setmacro = false
- -- local setmacro = interfaces.setmacro -- cleaner (but we need to test first)
- local nofconstants = 0
- local nofvariables = 0
- local nofelements = 0
- local nofcommands = 0
- local nofformats = 0
- local noftranslations = 0
- local nofsetupstrings = 0
- --
- if setmacro then
- for given, constant in next, complete.constants do
- constant = constant[interface] or constant.en or given
- constants[constant] = given -- breedte -> width
- nofconstants = nofconstants + 1
- setmacro("c!"..given,given)
- if currentinterface ~= "en" then
- setmacro("k!"..constant,given)
- end
- end
- else
- local t, f, s = { }, formatters["\\ui_c{%s}{%s}"], formatters["\\ui_s{%s}"]
- for given, constant in next, complete.constants do
- constant = constant[interface] or constant.en or given
- constants[constant] = given -- breedte -> width
- nofconstants = nofconstants + 1
- if given == constant then
- t[nofconstants] = s(given)
- else
- t[nofconstants] = f(given,constant)
- end
- end
- contextsprint(prtcatcodes,concat(t))
- end
- --
- if setmacro then
- for given, variable in next, complete.variables do
- variable = variable[interface] or variable.en or given
- variables[given] = variable -- ja -> yes
- nofvariables = nofvariables + 1
- setmacro("v!"..given,variable)
- end
- else
- local t, f = { }, formatters["\\ui_v{%s}{%s}"]
- for given, variable in next, complete.variables do
- variable = variable[interface] or variable.en or given
- variables[given] = variable -- ja -> yes
- nofvariables = nofvariables + 1
- t[nofvariables] = f(given,variable)
- end
- contextsprint(prtcatcodes,concat(t))
- end
- --
- if setmacro then
- for given, element in next, complete.elements do
- element = element[interface] or element.en or given
- elements[element] = given
- nofelements = nofelements + 1
- setmacro("e!"..given,element)
- end
- else
- local t, f = { }, formatters["\\ui_e{%s}{%s}"]
- for given, element in next, complete.elements do
- element = element[interface] or element.en or given
- elements[element] = given
- nofelements = nofelements + 1
- t[nofelements] = f(given,element)
- end
- contextsprint(prtcatcodes,concat(t))
- end
- --
- if setmacro then
- -- this can only work ok when we already have defined the command
- luatex.registerdumpactions(function()
- for given, command in next, complete.commands do
- command = command[interface] or command.en or given
- if command ~= given then
- setmacro(prtcatcodes,given,"\\"..command)
- end
- nofcommands = nofcommands + 1
- end
- end)
- else
- local t, n, f = { }, 0, formatters["\\ui_m{%s}{%s}"]
- for given, command in next, complete.commands do
- command = command[interface] or command.en or given
- if command ~= given then
- n = n + 1
- t[n] = f(given,command)
- end
- nofcommands = nofcommands + 1
- end
- contextsprint(prtcatcodes,concat(t))
- end
- --
- for given, format in next, complete.messages.formats do
- formats[given] = format[interface] or format.en or given
- nofformats = nofformats + 1
- end
- --
- for given, translation in next, complete.messages.translations do
- translations[given] = translation[interface] or translation.en or given
- noftranslations = noftranslations + 1
- end
- --
- for given, setupstring in next, complete.setupstrings do
- setupstring = setupstring[interface] or setupstring.en or given
- setupstrings[given] = setupstring
- nofsetupstrings = nofsetupstrings + 1
- end
- --
- report_interface("definitions: %a constants, %a variables, %a elements, %a commands, %a formats, %a translations, %a setupstrings",
- nofconstants,nofvariables,nofelements,nofcommands,nofformats,noftranslations,nofsetupstrings)
- else
- report_interface("the language(s) can only be set when making the format")
- end
- interfaces.currentinterface = currentinterface
- interfaces.currentresponse = currentresponse
-end
-
-interfaces.implement {
- name = "setuserinterface",
- actions = interfaces.setuserinterface,
- arguments = "2 strings",
-}
-
interfaces.cachedsetups = interfaces.cachedsetups or { }
interfaces.hashedsetups = interfaces.hashedsetups or { }
@@ -437,10 +305,10 @@ implement {
}
local function gss(s)
- contextsprint(vrbcatcodes,getsetupstring(s))
- end
+ contextsprint(vrbcatcodes,getsetupstring(s))
+end
-implement { -- will b eoverloaded
+implement { -- will be overloaded
name = "getsetupstring",
actions = gss,
arguments = "string",
@@ -454,16 +322,18 @@ implement {
local function showassignerror(namespace,key,line)
- local ns, instance = match(namespace,"^(%d+)[^%a]+(%a*)")
- if ns then
- namespace = corenamespaces[tonumber(ns)] or ns
- end
- -- injected in the stream for timing:
- if instance and instance ~= "" then
- context.writestatus("setup",formatters["error in line %a, namespace %a, instance %a, key %a"](line,namespace,instance,key))
- else
- context.writestatus("setup",formatters["error in line %a, namespace %a, key %a"](line,namespace,key))
- end
+ -- if key and key ~= "" and key ~= "," then
+ local ns, instance = match(namespace,"^(%d+)[^%a]+(%a*)")
+ if ns then
+ namespace = corenamespaces[tonumber(ns)] or ns
+ end
+ -- injected in the stream for timing:
+ if instance and instance ~= "" then
+ context.writestatus("setup",formatters["error in line %a, namespace %a, instance %a, key %a"](line,namespace,instance,key))
+ else
+ context.writestatus("setup",formatters["error in line %a, namespace %a, key %a"](line,namespace,key))
+ end
+ -- end
end
implement {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv
index 641c8a4f50e..75fa5c7bfa4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-ini.mkiv
@@ -20,6 +20,7 @@
\unprotect
\registerctxluafile{mult-ini}{}
+\registerctxluafile{mult-fmt}{initexonly}
%D \macros
%D [constanten,variabelen,commands]
@@ -59,6 +60,7 @@
\def\m!prefix!{m!}
\def\s!prefix!{s!}
\def\v!prefix!{v!}
+\def\t!prefix!{t!}
%D \macros
%D [constants,variables,commands]
@@ -105,33 +107,35 @@
%D than once. Savings like this should of course be implemented in english, just
%D because \TEX\ is english.
-\def\s!width {width} \let\!!width \s!width % obsolete
-\def\s!height{height} \let\!!height\s!height % obsolete
-\def\s!depth {depth} \let\!!depth \s!depth % obsolete
-\def\s!spread{spread} \let\!!spread\s!spread % obsolete
-\def\s!plus {plus} \let\!!plus \s!plus % obsolete
-\def\s!minus {minus} \let\!!minus \s!minus % obsolete
-\def\s!left {left}
-\def\s!right {right}
-\def\s!fil {fil}
-\def\s!fill {fill} \let\!!fill \s!fill % obsolete
-\def\s!filll {filll}
-\def\s!to {to} \let\!!to \s!to % obsolete
-\def\s!attr {attr}
-\def\s!axis {axis}
-
-\def\s!bottom{bottom}
-\def\s!top {top}
-\def\s!both {both}
-
-\def\s!reverse {reverse}
+\def\s!width {width}
+\def\s!height {height}
+\def\s!depth {depth}
+\def\s!spread {spread}
+\def\s!plus {plus}
+\def\s!minus {minus}
+\def\s!to {to}
+
+\def\s!fil {fil}
+\def\s!fill {fill}
+\def\s!filll {filll}
+
+\def\s!attr {attr}
+\def\s!axis {axis}
+\def\s!both {both}
+\def\s!bottom {bottom}
+\def\s!left {left}
+\def\s!options {options}
\def\s!orientation{orientation}
-\def\s!xoffset {xoffset}
+\def\s!reverse {reverse}
+\def\s!right {right}
+\def\s!top {top}
\def\s!xmove {xmove}
-\def\s!yoffset {yoffset}
+\def\s!xoffset {xoffset}
\def\s!ymove {ymove}
+\def\s!yoffset {yoffset}
%D \macros
+
%D {defineinterfaceconstant,
%D defineinterfacevariable,
%D defineinterfaceelement,
@@ -165,9 +169,9 @@
%D \def\e!name{meaning}
%D \stoptyping
-\unexpanded\def\defineinterfaceconstant #1#2{\expandafter\def\csname\c!prefix!#1\endcsname{#2}}
-\unexpanded\def\defineinterfacevariable #1#2{\expandafter\def\csname\v!prefix!#1\endcsname{#2}}
-\unexpanded\def\defineinterfaceelement #1#2{\expandafter\def\csname\e!prefix!#1\endcsname{#2}}
+\protected\def\defineinterfaceconstant#1#2{\expandafter\def\csname\c!prefix!#1\endcsname{#2}}
+\protected\def\defineinterfacevariable#1#2{\expandafter\def\csname\v!prefix!#1\endcsname{#2}}
+\protected\def\defineinterfaceelement #1#2{\expandafter\def\csname\e!prefix!#1\endcsname{#2}}
%D Next come some interface independant constants:
%D
@@ -175,7 +179,7 @@
%D \definefileconstant {name} {meaning}
%D \stoptyping
-\unexpanded\def\definefileconstant #1#2{\expandafter\def\csname\f!prefix!#1\endcsname{#2}}
+\protected\def\definefileconstant#1#2{\expandafter\def\csname\f!prefix!#1\endcsname{#2}}
%D And finaly we have the one argument, space saving constants
%D
@@ -184,8 +188,13 @@
%D \definemessageconstant {name}
%D \stoptyping
-\unexpanded\def\definesystemconstant #1{\expandafter\def\csname\s!prefix!#1\endcsname{#1}}
-\unexpanded\def\definemessageconstant #1{\expandafter\def\csname\m!prefix!#1\endcsname{#1}}
+\protected\def\definesystemconstant #1{\expandafter\def\csname\s!prefix!#1\endcsname{#1}}
+\protected\def\definemessageconstant#1{\expandafter\def\csname\m!prefix!#1\endcsname{#1}}
+
+%D For now here:
+
+\protected\def\definetagconstant #1{\expandafter\def\csname\t!prefix!#1\endcsname{#1}}
+\protected\def\aliastagconstant #1#2{\expandafter\let\csname\t!prefix!#1\expandafter\endcsname\csname\t!prefix!#2\endcsname}
%D In a parameter driven system, some parameters are shared by more system
%D components. In \CONTEXT\ we can distinguish parameters by a unique prefix. Such a
@@ -195,7 +204,7 @@
%D \definesystemvariable {name}
%D \stoptyping
-\unexpanded\def\definesystemvariable#1{\expandafter\edef\csname\??prefix#1\endcsname{\@@prefix#1}}
+\protected\def\definesystemvariable#1{\expandafter\edef\csname\??prefix#1\endcsname{\@@prefix#1}}
\definesystemvariable{ms}
@@ -260,7 +269,7 @@
%D \stopinterface
%D \stoptyping
-\unexpanded\def\startinterface #1
+\protected\def\startinterface #1
{\doifnot{#1}{all}{\doifnotinset\currentinterface{#1}{\gobbleuntil\stopinterface}}}
\let\stopinterface\relax
@@ -344,7 +353,7 @@
%D
%D These will become obsolete:
-\unexpanded\def\startmessages #1 library: #2 %
+\protected\def\startmessages #1 library: #2 %
{\begingroup
\ifcsname\m!prefix!#2\endcsname\else\setgvalue{\m!prefix!#2}{#2}\fi
\catcode\endoflineasciicode\othercatcode
@@ -359,21 +368,21 @@
\let\stopmessages\relax
-\unexpanded\def\setinterfacemessage#1#2#3%
+\protected\def\setinterfacemessage#1#2#3%
{\ifcsname\m!prefix!#1\endcsname\else\setgvalue{\m!prefix!#1}{#1}\fi
\clf_setinterfacemessage{#1}{#2}{#3}}
-\unexpanded\def\setmessagetext #1#2{\relax\edef\currentmessagetext{\clf_getmessage{#1}{#2}}}
-\unexpanded\def\getmessage #1#2{\relax\clf_getmessage{#1}{#2}}
-\unexpanded\def\doifelsemessage #1#2{\relax\clf_doifelsemessage{#1}{#2}}
-\unexpanded\def\showmessage #1#2#3{\relax\clf_showmessage{#1}{#2}{#3}}
-\unexpanded\def\writestatus #1#2{\relax\clf_writestatus{#1}{#2}}
-\unexpanded\def\message {\relax\clf_message}
+\protected\def\setmessagetext #1#2{\relax\edef\currentmessagetext{\clf_getmessage{#1}{#2}}}
+\protected\def\getmessage #1#2{\relax\clf_getmessage{#1}{#2}}
+\protected\def\doifelsemessage #1#2{\relax\clf_doifelsemessage{#1}{#2}}
+\protected\def\showmessage #1#2#3{\relax\clf_showmessage{#1}{#2}{#3}}
+\protected\def\writestatus #1#2{\relax\clf_writestatus{#1}{#2}}
+\protected\def\message {\relax\clf_message}
\let\doifmessageelse\doifelsemessage
-\unexpanded\def\inlinemessage #1{\dontleavehmode{\tttf#1}}
-\unexpanded\def\displaymessage#1{\blank\inlinemessage{#1}\blank}
+\protected\def\inlinemessage #1{\dontleavehmode{\tttf#1}}
+\protected\def\displaymessage#1{\blank\inlinemessage{#1}\blank}
\let\getsetupstring\clf_getsetupstring
\let\rawsetupstring\clf_rawsetupstring
@@ -392,15 +401,15 @@
%D backmapping (\type{\c!k...}) and make \type {\c!c...} similar to \type {\v!...}.
%D In that case we can simply the following setters.
-\unexpanded\def\doletvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-\unexpanded\def\dosetvalue #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-\unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-\unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-\unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-\unexpanded\def\doresetvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
-\unexpanded\def\doignorevalue#1#2#3{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
+\protected\def\doletvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\protected\def\dosetvalue #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\protected\def\dosetevalue #1#2{\expandafter\edef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\protected\def\dosetgvalue #1#2{\expandafter\gdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\protected\def\dosetxvalue #1#2{\expandafter\xdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\protected\def\doresetvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
+\protected\def\doignorevalue#1#2#3{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
-\unexpanded\def\docopyvalue#1#2#3%
+\protected\def\docopyvalue#1#2#3%
{\ifcsname\k!prefix!#3\endcsname
\expandafter\def\csname#1\csname\k!prefix!#3\endcsname\expandafter\endcsname\expandafter
{\csname#2\csname\k!prefix!#3\endcsname\endcsname}%
@@ -411,15 +420,15 @@
\startinterface english
- \unexpanded\def\doletvalue #1#2{\expandafter \let\csname#1#2\endcsname}
- \unexpanded\def\dosetvalue #1#2{\expandafter \def\csname#1#2\endcsname}
- \unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1#2\endcsname}
- \unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1#2\endcsname}
- \unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1#2\endcsname}
- \unexpanded\def\doresetvalue #1#2{\expandafter \let\csname#1#2\endcsname\empty}
- \unexpanded\def\doignorevalue#1#2#3{\expandafter \let\csname#1#2\endcsname\empty}
+ \protected\def\doletvalue #1#2{\expandafter \let\csname#1#2\endcsname}
+ \protected\def\dosetvalue #1#2{\expandafter \def\csname#1#2\endcsname}
+ \protected\def\dosetevalue #1#2{\expandafter\edef\csname#1#2\endcsname}
+ \protected\def\dosetgvalue #1#2{\expandafter\gdef\csname#1#2\endcsname}
+ \protected\def\dosetxvalue #1#2{\expandafter\xdef\csname#1#2\endcsname}
+ \protected\def\doresetvalue #1#2{\expandafter \let\csname#1#2\endcsname\empty}
+ \protected\def\doignorevalue#1#2#3{\expandafter \let\csname#1#2\endcsname\empty}
- \unexpanded\def\docopyvalue#1#2#3%
+ \protected\def\docopyvalue#1#2#3%
{\expandafter\def\csname#1#3\expandafter\endcsname\expandafter
{\csname#2#3\endcsname}}
@@ -428,9 +437,9 @@
%D We can now redefine some messages that will be introduced in the multi||lingual
%D system module.
-\unexpanded\def\showassignerror #1#2{\showmessage\m!check1{#1,#2}}
-\unexpanded\def\showargumenterror#1#2{\showmessage\m!check2{#1,#2}}
-\unexpanded\def\showdefinederror #1#2{\showmessage\m!check3{#1,#2}}
+\protected\def\showassignerror #1#2{\showmessage\m!check1{#1,#2}}
+\protected\def\showargumenterror#1#2{\showmessage\m!check2{#1,#2}}
+\protected\def\showdefinederror #1#2{\showmessage\m!check3{#1,#2}}
%D \CONTEXT\ is a parameter driven package. This means that users instruct the
%D system by means of variables, values and keywords. These instructions take the
@@ -598,7 +607,7 @@
%D simple setup command:
%D
%D \starttyping
-%D \unexpanded\def\setupbox[#1]%
+%D \protected\def\setupbox[#1]%
%D {\getparameters[\??bx][#1]}
%D \stoptyping
%D
@@ -667,11 +676,11 @@
% temporary mkiv hack (we can best just store the whole table in memory)
-\unexpanded\def\setinterfaceconstant#1#2%
+\protected\def\setinterfaceconstant#1#2%
{\clf_setinterfaceconstant{#1}{#2}%
\expandafter\def\csname\c!prefix!#1\endcsname{#1}}
-\unexpanded\def\setinterfacevariable#1#2%
+\protected\def\setinterfacevariable#1#2%
{\clf_setinterfacevariable{#1}{#2}%
\expandafter\def\csname\v!prefix!#1\endcsname{#2}}
@@ -682,7 +691,7 @@
%D too. It's a bit redundant, because in these situations we could use the
%D c||version, but for documentation purposes the x||alternative comes in handy.
-\unexpanded\def\defineinterfaceconstant#1#2%
+\protected\def\defineinterfaceconstant#1#2%
{\expandafter\def\csname\c!prefix!#1\endcsname{#2}}
%D \macros
@@ -697,7 +706,7 @@
%D {\stel<iets>in}. Such split elements are no problem, because we just define two
%D elements. When no second part is needed, we use a \type {-}:
-\unexpanded\def\setinterfaceelement#1#2%
+\protected\def\setinterfaceelement#1#2%
{\clf_setinterfaceelement{#1}{#2}%
\ifcsname\e!prefix!#1\endcsname
\doifnotvalue{\e!prefix!#1}{#2}{\setvalue{\e!prefix!#1}{#2}}%
@@ -705,38 +714,27 @@
\setvalue{\e!prefix!#1}{#2}%
\fi}
-\unexpanded\def\setinterfacecommand#1#2%
+\protected\def\setinterfacecommand#1#2%
{\doifnot{#1}{#2}% todo: let when already defined
{\expandafter\def\csname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}}}
%D We just ignore these:
-\unexpanded\def\startvariables{\gobbleuntil\stopvariables} \let\stopvariables\relax
-\unexpanded\def\startconstants{\gobbleuntil\stopconstants} \let\stopconstants\relax
-\unexpanded\def\startelements {\gobbleuntil\stopelements } \let\stopelements \relax
-\unexpanded\def\startcommands {\gobbleuntil\stopcommands } \let\stopcommands \relax
+\protected\def\startvariables{\gobbleuntil\stopvariables} \let\stopvariables\relax
+\protected\def\startconstants{\gobbleuntil\stopconstants} \let\stopconstants\relax
+\protected\def\startelements {\gobbleuntil\stopelements } \let\stopelements \relax
+\protected\def\startcommands {\gobbleuntil\stopcommands } \let\stopcommands \relax
%D For at the \LUA\ end (experiment):
-% \def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}%
-% \expandafter\gdef\csname\k!prefix!#2\endcsname{#1}} % backmapping from non english
-% \def\do@sivar#1#2{\expandafter\gdef\csname\v!prefix!#1\endcsname{#2}}
-% \def\do@siele#1#2{\expandafter\gdef\csname\e!prefix!#1\endcsname{#2}}
-% \def\do@sicom#1#2{\expandafter\gdef\csname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}}
-%
-% \startinterface english
-%
-% \def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}}
-%
-% \stopinterface
-
\def\ui_c#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}%
\expandafter\gdef\csname\k!prefix!#2\endcsname{#1}} % backmapping from non english
\def\ui_s #1{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}%
\expandafter\gdef\csname\k!prefix!#1\endcsname{#1}} % backmapping from non english
\def\ui_v#1#2{\expandafter\gdef\csname\v!prefix!#1\endcsname{#2}}
\def\ui_e#1#2{\expandafter\gdef\csname\e!prefix!#1\endcsname{#2}}
-\def\ui_m#1#2{\expandafter\gdef\csname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}}
+%def\ui_m#1#2{\expandafter\gdef\csname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}}
+\def\ui_a#1#2{\aliasmacro#2#1}
\startinterface english
@@ -760,11 +758,11 @@
\def\contextbanner
{ConTeXt \space
- ver: \contextversion \space \contextmark \space \contextkind \space \space
+ ver: \contextversion \space \contextmark \space \space
fmt: \formatversion \space \space
int: \currentinterface/\currentresponses}
-\unexpanded\def\showcontextbanner
+\protected\def\showcontextbanner
{\writestatus\m!system\empty
\writestatus\m!system\contextbanner
\writestatus\m!system\empty}
@@ -781,9 +779,9 @@
% \def\contextversionnumber#1.#2.#3 #4:#5\relax{#1\ifnum#2<10 0\fi\purenumber{#2}\ifnum#3<10 0\fi\purenumber{#3} #4:#5}
% \edef\contextversionnumber{\expandafter\contextversionnumber\contextversion\relax\space\contextmark}
-\unexpanded\def \contextversionnumber #1.#2.#3 #4:#5\relax{#1#2#3}
- \contextversionno \expandafter\contextversionnumber\contextversion\relax
- \edef \contextversionnumber {\the\contextversionno\space\contextmark}
+\protected\def \contextversionnumber #1.#2.#3 #4:#5\relax{#1#2#3}
+ \contextversionno \expandafter\contextversionnumber\contextversion\relax
+ \edef \contextversionnumber {\the\contextversionno\space\contextmark}
%D \macros
%D {everydump}
@@ -792,7 +790,7 @@
\ifx\undefined\everydump
\newtoks\everydump
- \def\dump{\the\everydump\normaldump}
+ \def\dump{\the\everydump\global\everydump\emptytoks\glet\dump\relax\normaldump}
\fi
% \appendtoks \showcontextbanner \to \everydump
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua
index aa0329e48cf..a893d455c1f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-low.lua
@@ -12,7 +12,7 @@ return {
["constants"] = {
--
"zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive",
- "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen",
+ "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen",
"plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred",
"plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone",
"zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint",
@@ -34,7 +34,7 @@ return {
--
"fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality",
"luatexengine", "pdftexengine", "xetexengine", "unknownengine",
- "contextformat", "contextversion", "contextkind", "contextlmtxmode", "contextmark", "mksuffix",
+ "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix",
--
"activecatcode",
--
@@ -45,26 +45,36 @@ return {
--
"attributeunsetvalue",
--
+ "statuswrite",
+ --
"uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle",
--
"inicatcodes",
"ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes",
"prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes",
- "xmlcatcodes", "ctdcatcodes",
+ "xmlcatcodes", "ctdcatcodes", "rlncatcodes",
--
"escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode",
"endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode",
"spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode",
--
"tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode",
- "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode",
+ "commaasciicode", "spaceasciicode", "periodasciicode",
+ "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode",
"colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode",
"leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode",
"leftparentasciicode", "rightparentasciicode",
"lessthanasciicode", "morethanasciicode", "doublecommentsignal",
"atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode",
"doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode",
- "primeasciicode", "hyphenasciicode",
+ "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode",
+ --
+ "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode",
+ "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode",
+ "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode",
+ "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode",
+ "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenhyphenationcode",
+ "frozenallcode",
--
"activemathcharcode",
--
@@ -74,8 +84,10 @@ return {
--
"bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode",
"vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode",
- "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode",
- "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode",
+ "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode",
+ "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode",
+ "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode",
+ "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode",
--
"charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode",
"adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode",
@@ -89,7 +101,7 @@ return {
"fontexheight", "fontemwidth", "fontextraspace", "slantperpoint",
"mathexheight", "mathemwidth",
"interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace",
- "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight",
+ "mathaxisheight",
"muquad",
--
-- maybe a different class
@@ -145,6 +157,23 @@ return {
"startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode",
--
"wildcardsymbol",
+ --
+ "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode",
+ "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode",
+ "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode",
+ "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode",
+ "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode",
+ "forcecheckhyphenationmodecode", "lazyligatureshyphenationmodecode",
+ --
+ "normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode", "clipwidthcode",
+ --
+ "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode",
+ "noexpansioncode", "noprotrusioncode",
+ --
+ "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode",
+ "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode",
+ --
+ "continuewhenlmtxmode"
},
["helpers"] = {
--
@@ -179,6 +208,7 @@ return {
--
"strippedcsname","checkedstrippedcsname",
--
+ "nofarguments",
"firstargumentfalse", "firstargumenttrue",
"secondargumentfalse", "secondargumenttrue",
"thirdargumentfalse", "thirdargumenttrue",
@@ -187,7 +217,7 @@ return {
"sixthargumentfalse", "sixthargumenttrue",
"seventhargumentfalse", "seventhargumenttrue",
--
- "vkern", "hkern",
+ "vkern", "hkern", "vpenalty", "hpenalty",
--
"doglobal", "dodoglobal", "redoglobal", "resetglobal",
--
@@ -199,6 +229,7 @@ return {
--
"mathortext",
--
+ "thebox",
"htdp",
"unvoidbox",
"hfilll", "vfilll",
@@ -222,12 +253,18 @@ return {
--
"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",
--
@@ -235,14 +272,14 @@ return {
"triggergroupedcommand", "triggergroupedcommandcs",
"simplegroupedcommand", "pickupgroupedcommand",
--
- "normalbaselineskip", "normallineskip", "normallineskiplimit",
+ "usedbaselineskip", "usedlineskip", "usedlineskiplimit",
--
"availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction",
--
"next", "nexttoken",
--
"nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox",
- "boxisempty",
+ "boxisempty", "boxtostring", "contentostring", "prerolltostring",
--
"givenwidth", "givenheight", "givendepth", "scangivendimensions",
--
@@ -297,12 +334,18 @@ return {
"quitcondition", "truecondition", "falsecondition",
--
"tracingall", "tracingnone", "loggingall",
+ "showluatokens",
+ --
+ "aliasmacro",
--
"removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to",
--
- "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf",
- "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage",
- "normalspace",
+ -- "everyendpar",
+ --
+ "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",
--
@@ -324,8 +367,8 @@ return {
"getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue",
"resetvalue", "undefinevalue", "ignorevalue",
"setuvalue", "setuevalue", "setugvalue", "setuxvalue",
- --
- "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique",
+ -- glet
+ "globallet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique",
--
"getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters",
--
@@ -335,7 +378,7 @@ return {
"processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist",
"processaction", "processallactions", "processfirstactioninset", "processallactionsinset",
--
- "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect",
+ "unexpanded", "expanded", "startexpanded", "stopexpanded", "protect", "unprotect",
--
"firstofoneargument",
"firstoftwoarguments", "secondoftwoarguments",
@@ -352,9 +395,10 @@ return {
"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",
+ "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional",
--
"newmacro", "setnewmacro", "newfraction",
"newsignal",
@@ -413,8 +457,11 @@ return {
"startdmath", "stopdmath", "normalstartdmath", "normalstopdmath",
"normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript",
"superscript", "subscript", "nosuperscript", "nosubscript",
+ "superprescript", "subprescript", "nosuperprescript", "nosubsprecript",
--
- "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette",
+ "uncramped", "cramped",
+ "mathstyletrigger", "triggermathstyle",
+ "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette",
"mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox",
"mathtext", "setmathsmalltextbox", "setmathtextbox",
"pushmathstyle", "popmathstyle",
@@ -433,7 +480,7 @@ return {
"ctxlua", "luacode", "lateluacode", "directluacode",
"registerctxluafile", "ctxloadluafile",
"luaversion", "luamajorversion", "luaminorversion",
- "ctxluacode", "luaconditional", "luaexpanded",
+ "ctxluacode", "luaconditional", "luaexpanded", "ctxluamatch",
"startluaparameterset", "stopluaparameterset", "luaparameterset",
"definenamedlua",
"obeylualines", "obeyluatokens",
@@ -444,11 +491,15 @@ return {
"cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand",
--
"carryoverpar",
+ "freezeparagraphproperties", "defrostparagraphproperties",
+ "setparagraphfreezing", "forgetparagraphfreezing",
+ "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphlines",
+ --
"lastlinewidth",
--
"assumelongusagecs",
--
- "Umathbotaccent",
+ "Umathbotaccent", "Umathtopaccent",
--
"righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop",
"rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop",
@@ -459,6 +510,7 @@ return {
"dirlre", "dirrle", "dirlro", "dirrlo",
--
"lesshyphens", "morehyphens", "nohyphens", "dohyphens",
+ "compounddiscretionary",
--
"Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath",
--
@@ -469,6 +521,8 @@ return {
"naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack",
"reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack",
--
+ "hcontainer", "vcontainer", "tcontainer",
+ --
"frule",
--
"compoundhyphenpenalty",
@@ -476,5 +530,34 @@ return {
"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",
+ -- old ... very low level
+ "textdir", "linedir", "pardir", "boxdir",
+ --
+ "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox",
+ --
+ "noligaturing", "nokerning", "noexpansion", "noprotrusion",
+ "noleftkerning", "noleftligaturing", "norightkerning", "norightligaturing",
+ --
+ "futureletnexttoken", "defbackslashbreak", "letbackslashbreak",
+ --
+ "pushoverloadmode", "popoverloadmode", "pushrunstate", "poprunstate",
+ --
+ "suggestedalias",
+ --
+ "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox",
+ "newlocalwrite", "newlocalread",
+ "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox",
}
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua
index 299f1a404ae..65ae022c0bb 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-mes.lua
@@ -1159,6 +1159,9 @@ return {
no = "slutten av blokk %a (seksjon)",
ro = "sfarsit de bloc sectiune %a",
},
+ ["structures:3"] = {
+ en = "title to bookmark: %s",
+ },
["symbols:1"] = {
cs = "nacita se soubor symbolu %a",
de = "Lade Symboldatei %a",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua
index 6385d3fe51f..a2a74b3b316 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-mps.lua
@@ -27,7 +27,6 @@ return {
"shipout", "show", "showdependencies", "showtoken", "showvariable",
"special",
"begingroup", "endgroup", "of", "curl", "tension", "and", "controls",
- "interpath", "on", "off",
"def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary",
"tertiary", "primarydef", "secondarydef", "tertiarydef",
"randomseed", "also", "contour", "doublepath",
@@ -68,11 +67,14 @@ return {
"fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode",
--
"runscript", "maketext", "numbersystem",
+ "overloadmode", "setproperty",
},
commands = {
+ "on", "off",
+ "interpath",
"upto", "downto",
"beginfig", "endfig",
- "beginglyph", "endglyph", -- actually a mult-fun one
+ "beginglyph", "endglyph", "beginfont", "endfont", -- actually a mult-fun one
"rotatedaround", "reflectedabout",
"arrowhead",
"currentpen", "currentpicture", "cuttings",
@@ -119,6 +121,9 @@ return {
--
"triplet", "quadruplet", "totransform", "bymatrix",
--
+ "primitive", "permanent", "immutable", "mutable", "frozen",
+ --
+ "showproperty", "showhashentry",
},
internals = { -- we need to remove duplicates above
--
@@ -131,6 +136,10 @@ return {
"join_radius",
"charscale", -- actually a mult-fun one
--
+ "inicatcoderegime", "texcatcoderegime", "luacatcoderegime", "notcatcoderegime",
+ "vrbcatcoderegime", "prtcatcoderegime", "ctxcatcoderegime", "txtcatcoderegime",
+ "catcoderegime",
+ --
"ditto", "EOF", -- maybe also down etc
--
"pen_lft", "pen_rt", "pen_top", "pen_bot", -- "pen_count_",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua
index 279de60e2d6..250a5dfc18d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-prm.lua
@@ -32,11 +32,14 @@ return {
"iffontchar",
"interactionmode",
"interlinepenalties",
+ "lastchkdim",
+ "lastchknum",
"lastlinefit",
"lastnodetype",
"marks",
"muexpr",
"mutoglue",
+ "numericscale",
"numexpr",
"pagediscards",
"parshapedimen",
@@ -44,7 +47,6 @@ return {
"parshapelength",
"predisplaydirection",
"protected",
- "readline",
"savinghyphcodes",
"savingvdiscards",
"scantokens",
@@ -55,16 +57,22 @@ return {
"splitdiscards",
"splitfirstmarks",
"topmarks",
+ "tracingalignments",
"tracingassigns",
"tracinggroups",
"tracingifs",
"tracingnesting",
- "tracingscantokens",
"unexpanded",
"unless",
"widowpenalties",
},
["luatex"]={
+ "UUskewed",
+ "UUskewedwithdelims",
+ "Uabove",
+ "Uabovewithdelims",
+ "Uatop",
+ "Uatopwithdelims",
"Uchar",
"Udelcode",
"Udelcodenum",
@@ -74,6 +82,7 @@ return {
"Uhextensible",
"Uleft",
"Umathaccent",
+ "Umathaccentbaseheight",
"Umathaxis",
"Umathbinbinspacing",
"Umathbinclosespacing",
@@ -90,6 +99,7 @@ return {
"Umathcharnum",
"Umathcharnumdef",
"Umathcharslot",
+ "Umathclass",
"Umathclosebinspacing",
"Umathcloseclosespacing",
"Umathcloseinnerspacing",
@@ -179,6 +189,8 @@ return {
"Umathskewedfractionhgap",
"Umathskewedfractionvgap",
"Umathspaceafterscript",
+ "Umathspacebeforescript",
+ "Umathspacingmode",
"Umathstackdenomdown",
"Umathstacknumup",
"Umathstackvgap",
@@ -197,9 +209,13 @@ return {
"Umathunderdelimiterbgap",
"Umathunderdelimitervgap",
"Umiddle",
+ "Unosubprescript",
"Unosubscript",
+ "Unosuperprescript",
"Unosuperscript",
+ "Uover",
"Uoverdelimiter",
+ "Uoverwithdelims",
"Uradical",
"Uright",
"Uroot",
@@ -210,7 +226,10 @@ return {
"Ustartmath",
"Ustopdisplaymath",
"Ustopmath",
+ "Ustyle",
+ "Usubprescript",
"Usubscript",
+ "Usuperprescript",
"Usuperscript",
"Uunderdelimiter",
"Uvextensible",
@@ -218,18 +237,22 @@ return {
"adjustspacingshrink",
"adjustspacingstep",
"adjustspacingstretch",
+ "afterassigned",
"aftergrouped",
+ "aliased",
"alignmark",
"aligntab",
+ "atendofgroup",
+ "atendofgrouped",
"attribute",
"attributedef",
"automaticdiscretionary",
- "automatichyphenmode",
"automatichyphenpenalty",
+ "automigrationmode",
"begincsname",
"beginlocalcontrol",
"boundary",
- "boxattr",
+ "boxattribute",
"boxdirection",
"boxorientation",
"boxtotal",
@@ -237,43 +260,68 @@ return {
"boxxoffset",
"boxymove",
"boxyoffset",
- "breakafterdirmode",
"catcodetable",
"clearmarks",
- "compoundhyphenmode",
"crampeddisplaystyle",
"crampedscriptscriptstyle",
"crampedscriptstyle",
"crampedtextstyle",
"csstring",
+ "defcsname",
+ "dimensiondef",
+ "directlua",
+ "edefcsname",
"efcode",
"endlocalcontrol",
+ "enforced",
"etoksapp",
"etokspre",
+ "everytab",
"exceptionpenalty",
+ "expand",
+ "expandafterpars",
+ "expandafterspaces",
+ "expandcstoken",
"expanded",
+ "expandtoken",
"explicitdiscretionary",
"explicithyphenpenalty",
"firstvalidlanguage",
- "fixupboxesmode",
"fontid",
+ "fontspecifiedsize",
"formatname",
"frozen",
+ "futuredef",
"futureexpand",
"futureexpandis",
"futureexpandisap",
+ "gdefcsname",
"gleaders",
"glet",
+ "gletcsname",
+ "gluespecdef",
"glyphdatafield",
+ "glyphoptions",
+ "glyphscale",
+ "glyphscriptfield",
+ "glyphscriptscale",
+ "glyphscriptscriptscale",
+ "glyphstatefield",
+ "glyphtextscale",
+ "glyphxoffset",
+ "glyphxscale",
+ "glyphyoffset",
+ "glyphyscale",
"gtoksapp",
"gtokspre",
"hjcode",
"hpack",
- "hyphenationbounds",
"hyphenationmin",
- "hyphenpenaltymode",
+ "hyphenationmode",
"ifabsdim",
"ifabsnum",
+ "ifarguments",
+ "ifboolean",
"ifchkdim",
"ifchknum",
"ifcmpdim",
@@ -281,27 +329,42 @@ return {
"ifcondition",
"ifcstok",
"ifdimval",
- "iffrozen",
+ "ifempty",
+ "ifflags",
+ "ifhastok",
+ "ifhastoks",
+ "ifhasxtoks",
"ifincsname",
+ "ifmathparameter",
+ "ifmathstyle",
"ifnumval",
- "ifprotected",
+ "ifparameter",
+ "ifparameters",
+ "ifrelax",
"iftok",
- "ifusercmd",
+ "ignorearguments",
"ignorepars",
- "immediateassigned",
- "immediateassignment",
+ "immediate",
+ "immutable",
"initcatcodetable",
+ "insertheights",
"insertht",
- "internalcodesmode",
+ "instance",
+ "integerdef",
+ "lastarguments",
"lastnamedcs",
"lastnodesubtype",
- "leftghost",
"leftmarginkern",
"letcharcode",
+ "letcsname",
"letfrozen",
"letprotected",
"linedirection",
+ "linepar",
+ "listcallbackmode",
"localbrokenpenalty",
+ "localcontrol",
+ "localcontrolled",
"localinterlinepenalty",
"localleftbox",
"localrightbox",
@@ -323,25 +386,35 @@ return {
"mathflattenmode",
"mathitalicsmode",
"mathnolimitsmode",
- "matholdmode",
"mathpenaltiesmode",
"mathrulesfam",
"mathrulesmode",
"mathrulethicknessmode",
+ "mathscale",
"mathscriptboxmode",
"mathscriptcharmode",
"mathscriptsmode",
"mathstyle",
"mathsurroundmode",
"mathsurroundskip",
+ "mugluespecdef",
+ "mutable",
+ "noaligned",
"noboundary",
"nohrule",
- "nokerns",
- "noligs",
+ "norelax",
+ "normalizelinemode",
"nospaces",
"novrule",
+ "orelse",
+ "orunless",
"outputbox",
+ "overloaded",
+ "overloadmode",
+ "parametercount",
+ "parattr",
"pardirection",
+ "permanent",
"postexhyphenchar",
"posthyphenchar",
"prebinoppenalty",
@@ -353,22 +426,30 @@ return {
"protrusionboundary",
"pxdimen",
"quitvmode",
- "rightghost",
"rightmarginkern",
"rpcode",
"savecatcodetable",
"scantextokens",
"setfontid",
- "shapemode",
+ "snapshotpar",
+ "supmarkmode",
+ "swapcsvalues",
"textdirection",
+ "thewithoutunit",
+ "tokenized",
"toksapp",
"tokspre",
+ "tolerant",
"tpack",
"tracingfonts",
+ "tracingmath",
+ "undent",
"unletfrozen",
"unletprotected",
"vpack",
"wordboundary",
+ "wrapuppar",
+ "xdefcsname",
"xtoksapp",
"xtokspre",
},
@@ -521,7 +602,6 @@ return {
"char",
"chardef",
"cleaders",
- "closein",
"clubpenalty",
"copy",
"count",
@@ -540,7 +620,6 @@ return {
"delimitershortfall",
"dimen",
"dimendef",
- "directlua",
"discretionary",
"displayindent",
"displaylimits",
@@ -571,7 +650,6 @@ return {
"everyjob",
"everymath",
"everypar",
- "everytab",
"everyvbox",
"exhyphenchar",
"exhyphenpenalty",
@@ -584,10 +662,12 @@ return {
"font",
"fontdimen",
"fontname",
+ "fontspecifiedname",
"futurelet",
"gdef",
"global",
"globaldefs",
+ "glyph",
"halign",
"hangafter",
"hangindent",
@@ -597,7 +677,6 @@ return {
"hfill",
"hfilneg",
"hfuzz",
- "hoffset",
"holdinginserts",
"hrule",
"hsize",
@@ -611,7 +690,6 @@ return {
"ifcase",
"ifcat",
"ifdim",
- "ifeof",
"iffalse",
"ifhbox",
"ifhmode",
@@ -653,7 +731,6 @@ return {
"looseness",
"lower",
"lowercase",
- "mag",
"mark",
"mathaccent",
"mathbin",
@@ -672,6 +749,8 @@ return {
"maxdeadcycles",
"maxdepth",
"meaning",
+ "meaningfull",
+ "meaningless",
"medmuskip",
"message",
"middle",
@@ -694,16 +773,15 @@ return {
"nullfont",
"number",
"omit",
- "openin",
"or",
"ordlimits",
- "orelse",
"outer",
"output",
"outputpenalty",
"over",
"overfullrule",
"overline",
+ "overshoot",
"overwithdelims",
"pagedepth",
"pagefilllstretch",
@@ -714,6 +792,7 @@ return {
"pagestretch",
"pagetotal",
"par",
+ "parfillleftskip",
"parfillskip",
"parindent",
"parshape",
@@ -729,13 +808,13 @@ return {
"prevgraf",
"radical",
"raise",
- "read",
"relax",
"relpenalty",
"right",
"righthyphenmin",
"rightskip",
"romannumeral",
+ "scaledfontdimen",
"scriptfont",
"scriptscriptfont",
"scriptscriptstyle",
@@ -771,11 +850,14 @@ return {
"thickmuskip",
"thinmuskip",
"time",
+ "todimension",
+ "tointeger",
"toks",
"toksdef",
"tolerance",
"topmark",
"topskip",
+ "toscaled",
"tracingcommands",
"tracinglostchars",
"tracingmacros",
@@ -790,11 +872,13 @@ return {
"underline",
"unhbox",
"unhcopy",
+ "unhpack",
"unkern",
"unpenalty",
"unskip",
"unvbox",
"unvcopy",
+ "unvpack",
"uppercase",
"vadjust",
"valign",
@@ -805,7 +889,6 @@ return {
"vfill",
"vfilneg",
"vfuzz",
- "voffset",
"vrule",
"vsize",
"vskip",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv b/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv
index 8f8794df71c..7e9792720ad 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/mult-sys.mkiv
@@ -34,6 +34,7 @@
\definesystemconstant {hans}
\definesystemconstant {taco}
+\definesystemconstant {wolfgang}
%D First we define some system constants used for both the multi||lingual
%D interface and multi||linguag typesetting.
@@ -46,16 +47,17 @@
\definesystemconstant {ancientgreek} \definesystemconstant {agr}
\definesystemconstant {ancientlatin} \definesystemconstant {ala}
\definesystemconstant {arabic} \definesystemconstant {ar}
+\definesystemconstant {belarussian} \definesystemconstant {be}
\definesystemconstant {bokmal} \definesystemconstant {nb}
\definesystemconstant {catalan} \definesystemconstant {ca}
\definesystemconstant {chinese} \definesystemconstant {cn}
-\definesystemconstant {chinese} \definesystemconstant {cn}
\definesystemconstant {croatian} \definesystemconstant {hr}
\definesystemconstant {czech} \definesystemconstant {cs}
\definesystemconstant {danish} \definesystemconstant {da}
\definesystemconstant {dutch} \definesystemconstant {nl}
\definesystemconstant {english} \definesystemconstant {en}
\definesystemconstant {estonian} \definesystemconstant {et}
+\definesystemconstant {esperanto} % \definesystemconstant {eo}
\definesystemconstant {farsi} \definesystemconstant {fa} % just persian
\definesystemconstant {finnish} \definesystemconstant {fi}
\definesystemconstant {french} \definesystemconstant {fr}
@@ -63,6 +65,7 @@
\definesystemconstant {german} \definesystemconstant {de}
\definesystemconstant {greek} \definesystemconstant {gr}
\definesystemconstant {hebrew} \definesystemconstant {he}
+\definesystemconstant {yiddish} \definesystemconstant {yi}
\definesystemconstant {hungarian} \definesystemconstant {hu}
\definesystemconstant {italian} \definesystemconstant {it}
\definesystemconstant {japanese} \definesystemconstant {ja}
@@ -70,6 +73,7 @@
\definesystemconstant {latin} \definesystemconstant {la}
\definesystemconstant {lithuanian} \definesystemconstant {lt}
\definesystemconstant {malayalam} \definesystemconstant {ml}
+\definesystemconstant {macedonian} \definesystemconstant {mk}
\definesystemconstant {norwegian} \definesystemconstant {no}
\definesystemconstant {nynorsk} \definesystemconstant {nn}
\definesystemconstant {persian} \definesystemconstant {pe}
@@ -79,6 +83,7 @@
\definesystemconstant {russian} \definesystemconstant {ru}
\definesystemconstant {slovak} \definesystemconstant {sk}
\definesystemconstant {slovenian} \definesystemconstant {sl}
+\definesystemconstant {serbian} \definesystemconstant {sr}
\definesystemconstant {spanish} \definesystemconstant {es}
\definesystemconstant {swedish} \definesystemconstant {sv}
\definesystemconstant {thai} \definesystemconstant {th} % mojca mentioned it at BT2013 but we need more info
@@ -274,6 +279,7 @@
\definesystemconstant {start}
\definesystemconstant {stop}
\definesystemconstant {unknown}
+\definesystemconstant {unexpanded}
% translating setups is asking for a mess so we keep them as-is:
@@ -407,8 +413,11 @@
\definesystemconstant {text}
\definesystemconstant {paragraph}
\definesystemconstant {margintext}
+\definesystemconstant {themaintextcolor}
\definesystemconstant {line}
+\definesystemconstant {itemgroupcolumns}
+\definesystemconstant {vfrac}
\definesystemconstant {number}
\definesystemconstant {symbol}
\definesystemconstant {format}
@@ -573,19 +582,19 @@
\defineinterfaceconstant {e} {e} % can go
\defineinterfaceconstant {f} {f} % can go
-\defineinterfaceconstant {s} {s}
+%defineinterfaceconstant {s} {s}
\defineinterfaceconstant {r} {r}
\defineinterfaceconstant {g} {g}
-\defineinterfaceconstant {b} {b}
-\defineinterfaceconstant {c} {c}
+%defineinterfaceconstant {b} {b}
+%defineinterfaceconstant {c} {c}
\defineinterfaceconstant {m} {m}
-\defineinterfaceconstant {y} {y}
+%defineinterfaceconstant {y} {y}
\defineinterfaceconstant {k} {k}
-\defineinterfaceconstant {a} {a} % alternative
-\defineinterfaceconstant {t} {t} % transparency
+%defineinterfaceconstant {a} {a} % alternative
+%defineinterfaceconstant {t} {t} % transparency
\defineinterfaceconstant {p} {p} % percentage
-\defineinterfaceconstant {h} {h}
-\defineinterfaceconstant {s} {s}
+%defineinterfaceconstant {h} {h}
+%defineinterfaceconstant {s} {s}
\defineinterfaceconstant {v} {v}
\defineinterfaceconstant {rgb} {rgb}
@@ -672,7 +681,7 @@
\selectinterface
-%D Ok, here are some more, because we've got ouselves some extensions to \CONTEXT.
+%D Ok, here are some more, because we've got ourselves some extensions to \CONTEXT.
\definemessageconstant {addresses}
\definemessageconstant {documents}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua b/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua
index e6c6176026e..d8f4b25bf3a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-acc.lua
@@ -129,10 +129,9 @@ end)
-- local done = false
-- for n, id in nextnode, tonuts(head) do
-- if id == disc then
--- local r = getfield(n,"replace")
--- local p = getfield(n,"pre")
--- if r and p then
--- local str = compact(r)
+-- local pre, post, replace = getdisc(n)
+-- if replace and pre then
+-- local str = compact(replace)
-- local hsh = hyphenated[str]
-- if not hsh then
-- hsh = #codes + 1
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua
index d13db4bbaf5..d3c537a3bce 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-aux.lua
@@ -21,8 +21,7 @@ local glyph_code = nodecodes.glyph
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local attributelist_code = nodecodes.attributelist -- temporary
-local localpar_code = nodecodes.localpar
-local ligatureglyph_code = nodes.glyphcodes.ligature
+local par_code = nodecodes.par
local nuts = nodes.nuts
local tonut = nuts.tonut
@@ -48,7 +47,6 @@ local setlink = nuts.setlink
local setlist = nuts.setlist
local setnext = nuts.setnext
local setprev = nuts.setprev
-local setcomponents = nuts.setcomponents
local setattrlist = nuts.setattrlist
local traversers = nuts.traversers
@@ -382,167 +380,11 @@ function nodes.rehpack(n,...)
rehpack(tonut(n),...)
end
-if CONTEXTLMTXMODE > 0 then
-
- local fastcopy = table.fastcopy
- local getprop = nuts.getprop
- local setprop = nuts.setprop
-
- local function set_components(base,list)
- local t = { }
- local n = 0
- while list do
- local char = isglyph(list)
- if char then
- n = n + 1
- t[n] = char
- end
- list = getnext(list)
- end
- setprop(base,"components",n > 0 and t or false)
- end
-
- local function get_components(base)
- return getprop(base,"components")
- end
-
- local function copy_no_components(base)
- local copy = copy_node(base)
- setprop(copy,"components",false) -- no metatable lookup!
- return copy
- end
-
- local function copy_only_glyphs(base)
- local t = getprop(base,"components") -- also metatable
- if t then
- return fastcopy(t)
- end
- end
-
- local function do_count(t,marks)
- local n = 0
- if t then
- for i=1,#t do
- local c = t[i]
- if type(c) == "table" then
- n = n + do_count(t,marks)
- elseif not marks[c] then
- n = n + 1
- else
- --marks don't count
- end
- end
- end
- return n
- end
-
- -- start is a mark and we need to keep that one
-
- local done = false
-
- local function count_components(base,marks)
- local char = isglyph(base)
- if char then
- if getsubtype(base) == ligatureglyph_code then
- if not done then
- logs.report("fonts","!")
- logs.report("fonts","! check count_components with mkiv !")
- logs.report("fonts","!")
- done = true
- end
- local t = getprop(base,"components")
- if t then
- return do_count(t,marks)
- end
- elseif not marks[char] then
- return 1
- end
- end
- return 0
- end
-
- nuts.set_components = set_components
- nuts.get_components = get_components
- nuts.copy_only_glyphs = copy_only_glyphs
- nuts.copy_no_components = copy_no_components
- nuts.count_components = count_components
-
-else
-
- local get_components = node.direct.getcomponents
- local set_components = node.direct.setcomponents
-
- local function copy_no_components(g,copyinjection)
- local components = get_components(g)
- if components then
- set_components(g)
- local n = copy_node(g)
- if copyinjection then
- copyinjection(n,g)
- end
- set_components(g,components)
- -- maybe also upgrade the subtype but we don't use it anyway
- return n
- else
- local n = copy_node(g)
- if copyinjection then
- copyinjection(n,g)
- end
- return n
- end
- end
-
- local function copy_only_glyphs(current)
- local head = nil
- local previous = nil
- for n in nextglyph, current do
- n = copy_node(n)
- if head then
- setlink(previous,n)
- else
- head = n
- end
- previous = n
- end
- return head
- end
-
- -- start is a mark and we need to keep that one
-
- local function count_components(start,marks)
- local char = isglyph(start)
- if char then
- if getsubtype(start) == ligatureglyph_code then
- local n = 0
- local components = get_components(start)
- while components do
- n = n + count_components(components,marks)
- components = getnext(components)
- end
- return n
- elseif not marks[char] then
- return 1
- end
- end
- return 0
- end
-
- nuts.set_components = set_components
- nuts.get_components = get_components
- nuts.copy_only_glyphs = copy_only_glyphs
- nuts.copy_no_components = copy_no_components
- nuts.count_components = count_components
-
-end
-
-nuts.setcomponents = function() report_error("unsupported: %a","setcomponents") end
-nuts.getcomponents = function() report_error("unsupported: %a","getcomponents") end
-
do
- local localparcodes = nodes.localparcodes
- local hmodepar_code = localparcodes.vmode_par
- local vmodepar_code = localparcodes.hmode_par
+ local parcodes = nodes.parcodes
+ local hmodepar_code = parcodes.vmode_par
+ local vmodepar_code = parcodes.hmode_par
local getnest = tex.getnest
local getsubtype = nuts.getsubtype
@@ -550,7 +392,7 @@ do
function nuts.setparproperty(action,...)
local tail = tonut(getnest().tail)
while tail do
- if getid(tail) == localpar_code then
+ if getid(tail) == par_code then
local s = getsubtype(tail)
if s == hmodepar_code or s == vmodepar_code then
return action(tail,...)
@@ -571,10 +413,7 @@ do
end
--- Currently only in luametatex ... experimental anyway .. if it doesn't end
--- up in luatex I'll move this to a different module.
-
-do
+if not nuts.getnormalizedline then
local nextnode = traversers.glue
local findfail = nuts.tail
@@ -617,14 +456,12 @@ do
nuts.find_node = find_node
- nodes.getnormalizeline = node.getnormalizeline or function() return 0 end
- nodes.setnormalizeline = node.setnormalizeline or function() end
-
- nuts.getnormalizedline = direct.getnormalizedline or function(h)
+ function nuts.getnormalizedline(h)
if getid(h) == hlist_code and getsubtype(h) == line_code then
local ls, rs = 0, 0
local lh, rh = 0, 0
- local is, ps = 0, 0
+ local lp, rp = 0, 0
+ local is = 0
local h = getlist(h)
local t = findtail(h)
for n, subtype in nextglue, h do
@@ -633,241 +470,21 @@ do
elseif subtype == lefthangskip_code then lh = getwidth(n)
elseif subtype == righthangskip_code then rh = getwidth(n)
elseif subtype == indentskip_code then is = getwidth(n)
- elseif subtype == parfillskip_code then ps = getwidth(n)
+ elseif subtype == parfillskip_code then rp = getwidth(n)
end
end
- return ls, rs, lh, rh, is, ps, h, t
- end
- end
-
-end
-
-if not nodes.count then
-
- local type = type
-
- local direct = node.direct
- local todirect = direct.tovaliddirect
- local tonode = direct.tonode
-
- local count = direct.count
- local length = direct.length
- local slide = direct.slide
-
- function node.count(id,first,last)
- return count(id,first and todirect(first), last and todirect(last) or nil)
- end
-
- function node.length(first,last)
- return length(first and todirect(first), last and todirect(last) or nil)
- end
-
- function node.slide(n)
- if n then
- n = slide(todirect(n))
- if n then
- return tonode(n)
- end
- end
- return nil
- end
-
- local hyphenating = direct.hyphenating
- local ligaturing = direct.ligaturing
- local kerning = direct.kerning
-
- -- kind of inconsistent
-
- function node.hyphenating(first,last)
- if first then
- local h, t = hyphenating(todirect(first), last and todirect(last) or nil)
- return h and tonode(h) or nil, t and tonode(t) or nil, true
- else
- return nil, false
- end
- end
-
- function node.ligaturing(first,last)
- if first then
- local h, t = ligaturing(todirect(first), last and todirect(last) or nil)
- return h and tonode(h) or nil, t and tonode(t) or nil, true
- else
- return nil, false
- end
- end
-
- function node.kerning(first,last)
- if first then
- local h, t = kerning(todirect(first), last and todirect(last) or nil)
- return h and tonode(h) or nil, t and tonode(t) or nil, true
- else
- return nil, false
- end
- end
-
- local protect_glyph = direct.protect_glyph
- local unprotect_glyph = direct.unprotect_glyph
- local protect_glyphs = direct.protect_glyphs
- local unprotect_glyphs = direct.unprotect_glyphs
-
- function node.protect_glyphs(first,last)
- protect_glyphs(todirect(first), last and todirect(last) or nil)
- end
-
- function node.unprotect_glyphs(first,last)
- unprotect_glyphs(todirect(first), last and todirect(last) or nil)
- end
-
- function node.protect_glyph(first)
- protect_glyph(todirect(first))
- end
-
- function node.unprotect_glyph(first)
- unprotect_glyph(todirect(first))
- end
-
- local flatten_discretionaries = direct.flatten_discretionaries
- local check_discretionaries = direct.check_discretionaries
- local check_discretionary = direct.check_discretionary
-
- function node.flatten_discretionaries(first)
- local h, count = flatten_discretionaries(todirect(first))
- return tonode(h), count
- end
-
- function node.check_discretionaries(n)
- check_discretionaries(todirect(n))
- end
-
- function node.check_discretionary(n)
- check_discretionary(todirect(n))
- end
-
- local hpack = direct.hpack
- local vpack = direct.vpack
- local list_to_hlist = direct.mlist_to_hlist
-
- function node.hpack(head,...)
- local h, badness = hpack(head and todirect(head) or nil,...)
- return tonode(h), badness
- end
-
- function node.vpack(head,...)
- local h, badness = vpack(head and todirect(head) or nil,...)
- return tonode(h), badness
- end
-
- function node.mlist_to_hlist(head,...)
- return tonode(mlist_to_hlist(head and todirect(head) or nil,...))
- end
-
- local end_of_math = direct.end_of_math
- local find_attribute = direct.find_attribute
- local first_glyph = direct.first_glyph
-
- function node.end_of_math(n)
- if n then
- n = end_of_math(todirect(n))
- if n then
- return tonode(n)
- end
- end
- return nil
- end
-
- function node.find_attribute(n,a)
- if n then
- local v, n = find_attribute(todirect(n),a)
- if n then
- return v, tonode(n)
- end
+ return {
+ leftskip = ls,
+ rightskip = rs,
+ lefthangskip = lh,
+ righthangskip = rh,
+ indent = is,
+ parfillrightskip = rp,
+ parfillleftskip = lp,
+ head = h,
+ tail = t,
+ }
end
- return nil
- end
-
- function node.first_glyph(first,last)
- local n = first_glyph(todirect(first), last and todirect(last) or nil)
- return n and tonode(n) or nil
- end
-
- local dimensions = direct.dimensions
- local rangedimensions = direct.rangedimensions
- local effective_glue = direct.effective_glue
-
- function node.dimensions(a,b,c,d,e)
- if type(a) == "userdata" then
- a = todirect(a)
- if type(b) == "userdata" then
- b = todirect(b)
- end
- return dimensions(a,b)
- else
- d = todirect(d)
- if type(e) == "userdata" then
- e = todirect(e)
- end
- return dimensions(a,b,c,d,e)
- end
- return 0, 0, 0
- end
-
- function node.rangedimensions(parent,first,last)
- return rangedimenensions(todirect(parent),todirect(first),last and todirect(last))
- end
-
- function node.effective_glue(list,parent)
- return effective_glue(list and todirect(list) or nil,parent and todirect(parent) or nil)
- end
-
- local uses_font = direct.uses_font
- local has_glyph = direct.has_glyph
- local protrusion_skippable = direct.protrusion_skippable
- local prepend_prevdepth = direct.prepend_prevdepth
- local make_extensible = direct.make_extensible
-
- function node.uses_font(n,f)
- return uses_font(todirect(n),f)
- end
-
- function node.has_glyph(n)
- return has_glyph(todirect(n))
- end
-
- function node.protrusion_skippable(n)
- return protrusion_skippable(todirect(n))
- end
-
- function node.prepend_prevdepth(n)
- local n, d = prepend_prevdepth(todirect(n))
- return tonode(n), d
- end
-
- function node.make_extensible(...)
- local n = make_extensible(...)
- return n and tonode(n) or nil
- end
-
- local last_node = direct.last_node
-
- function node.last_node()
- local n = last_node()
- return n and tonode(n) or nil
- end
-
- local is_zero_glue = direct.is_zero_glue
- local getglue = direct.getglue
- local setglue = direct.setglue
-
- function node.is_zero_glue(n)
- return is_zero_glue(todirect(n))
- end
-
- function node.get_glue(n)
- return get_glue(todirect(n))
- end
-
- function node.set_glue(n)
- return set_glue(todirect(n))
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua b/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua
index 53ace65e99e..ec84a3db5c3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-bck.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['node-bck'] = {
version = 1.001,
+ optimize = true,
comment = "companion to node-bck.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -62,9 +63,6 @@ local unsetvalue = attributes.unsetvalue
local linefillers = nodes.linefillers
-local a_color = privateattributes("color")
-local a_transparency = privateattributes("transparency")
-local a_colormodel = privateattributes("colormodel")
local a_background = privateattributes("background")
local a_alignbackground = privateattributes("alignbackground")
local a_linefiller = privateattributes("linefiller")
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv
index b093274430c..0e7bbb853f3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-bck.mkiv
@@ -34,12 +34,12 @@
\fi\fi}
\def\node_backgrounds_thecolorattr#1%
- {attr \colormodelattribute \attribute\colormodelattribute
+ {attr \colormodelattribute \c_attr_colormodel
attr \colorattribute \lastnamedcs
attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
\def\thecolorattr#1%
- {attr \colormodelattribute \attribute\colormodelattribute
+ {attr \colormodelattribute \c_attr_colormodel
attr \colorattribute \csname\??colorattribute#1\endcsname
attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
@@ -52,19 +52,19 @@
\def\thebackgroundcolorattr#1%
{attr \backgroundattribute \plusone
- attr \colormodelattribute \attribute\colormodelattribute
+ attr \colormodelattribute \c_attr_colormodel
attr \colorattribute \csname\??colorattribute#1\endcsname
attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
\def\node_backgrounds_thebackgroundcolorattr#1%
{attr \backgroundattribute \plusone
- attr \colormodelattribute \attribute\colormodelattribute
+ attr \colormodelattribute \c_attr_colormodel
attr \colorattribute \lastnamedcs
attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
\def\thealignbackgroundcolorattr#1%
{attr \alignbackgroundattribute \plusone
- attr \colormodelattribute \attribute\colormodelattribute
+ attr \colormodelattribute \c_attr_colormodel
attr \colorattribute \csname\??colorattribute#1\endcsname
attr \transparencyattribute \thetransparencyattribute{#1} } % can be optimized
@@ -81,9 +81,9 @@
% \dousecolorparameter{#2}%
% \normalexpanded{\endgroup#1
% attr \backgroundattribute \plusone
-% attr \colormodelattribute \the\attribute\colormodelattribute
-% attr \colorattribute \the\attribute\colorattribute
-% attr \transparencyattribute \the\attribute\transparencyattribute}}
+% attr \colormodelattribute \the\c_attr_colormodel
+% attr \colorattribute \the\c_attr_color
+% attr \transparencyattribute \the\c_attr_transparency}}
%
% more efficient:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ext.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ext.lua
deleted file mode 100644
index 82ec04ee592..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/node-ext.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-if not modules then modules = { } end modules ['node-ext'] = {
- version = 1.001,
- comment = "companion to node-ini.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
---[[ldx--
-<p>Serializing nodes can be handy for tracing. Also, saving and
-loading node lists can come in handy as soon we are going to
-use external applications to process node lists.</p>
---ldx]]--
-
-function nodes.show(stack)
--- logs.writer(table.serialize(stack))
-end
-
-function nodes.save(stack,name) -- *.ltn : luatex node file
--- if name then
--- file.savedata(name,table.serialize(stack))
--- else
--- logs.writer(table.serialize(stack))
--- end
-end
-
-function nodes.load(name)
--- return file.loaddata(name)
--- -- todo
-end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua b/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua
index a848cef69da..373cce3ce60 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-fin.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['node-fin'] = {
version = 1.001,
+ optimize = true,
comment = "companion to node-fin.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -375,6 +376,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes
else
check = has_dimensions(stack)
end
+ else
end
if check then
local c = getattr(stack,attribute)
@@ -634,100 +636,3 @@ end
statistics.register("attribute processing time", function()
return statistics.elapsedseconds(attributes,"front- and backend")
end)
-
--- -- --
-
-do
-
- local cleaners = { }
- local trace = true -- false
-
- function attributes.cleanup()
- if next(cleaners) then
- local values = setmetatableindex("table")
-
- if trace then
- starttiming(values)
- end
-
- local function check(l)
- for n, id in nextnode, l do
- if id == hlist_code or id == vlist_code or id == glue_code then
- local l = getlist(n)
- if l then
- check(l)
- end
- end
- for a in next, cleaners do
- local v = getattr(n,a)
- if v then
- -- values[a] = values[a] + 1
- values[a][v] = true
- end
- end
- end
- end
-
- local top = texgetnest("ptr")
- for i=1,top do
- local l = texgetnest(i)
- if l then
- check(tonut(l.head))
- end
- end
-
- do local l
- l = tonut(texlists.page_ins_head) if l then check(l) end
- l = tonut(texlists.contrib_head) if l then check(l) end
- l = tonut(texlists.page_discards_head) if l then check(l) end
- l = tonut(texlists.split_discards_head) if l then check(l) end
- l = tonut(texlists.page_head) if l then check(l) end
- end
-
- -- todo: traverseboxes
-
- for i=0,65535 do
- local b = getbox(i)
- if b then
- local l = getlist(b)
- if l then
- check(l)
- end
- end
- end
-
- for a, t in next, values do
- cleaners[a](a,t)
- end
-
- if trace then
- stoptiming(values)
- local a = table.sortedkeys(values)
- local t = statistics.elapsedtime(values)
- local r = tex.getcount("realpageno")
- if #a == 0 then
- logs.report("attributes","cleaning up at page %i took %s seconds, no attributes",r,t)
- else
- logs.report("attributes","cleaning up at page %i took %s seconds, attributes: % t",r,t,a)
- end
- end
- end
- end
-
- -- not yet used but when we do ... delay a call till we enable it (attr-ini.mkiv)
-
- -- local function show(a,t) for k, v in next, t do print(a,k) end end
- --
- -- attributes.registercleaner( 1, show)
- -- attributes.registercleaner( 2, show)
-
- function attributes.registercleaner(a,f)
- cleaners[a] = f
- end
-
- implement {
- name = "cleanupattributes",
- actions = attributes.cleanup,
- }
-
-end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv
index 086b19ae5dc..2bf0e0806cd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-fin.mkiv
@@ -19,6 +19,7 @@
\unprotect
\registerctxluafile{node-shp}{optimize}
+% \registerctxluafile{node-fin}{autosuffix,optimize} % we might generalize this one
\registerctxluafile{node-fin}{optimize} % we might generalize this one
% we might have two variants at some point (efficiency)
@@ -36,8 +37,8 @@
\newcount\c_syst_attr_trigger
-\edef\startinheritattributes{\attribute\triggerattribute\plusone}
-\edef\stopinheritattributes {\attribute\triggerattribute\attributeunsetvalue}
+\edef\startinheritattributes{\c_attr_trigger\plusone}
+\edef\stopinheritattributes {\c_attr_trigger\attributeunsetvalue}
\def\syst_attr_trigger_copy_yes{\afterassignment\syst_attr_trigger_copy_indeed\c_syst_attr_trigger}
\def\syst_attr_trigger_dump_yes{\afterassignment\syst_attr_trigger_dump_indeed\c_syst_attr_trigger}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua b/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua
index 1b245639b78..f3bb6228fe0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-fnt.lua
@@ -45,13 +45,12 @@ local nuts = nodes.nuts
local getid = nuts.getid
local getsubtype = nuts.getsubtype
-local getdisc = nuts.getdisc
+local getreplace = nuts.getreplace
local getnext = nuts.getnext
local getprev = nuts.getprev
local getboth = nuts.getboth
local getdata = nuts.getdata
local getglyphdata = nuts.getglyphdata
------ getdisc = nuts.getdisc
local setchar = nuts.setchar
local setlink = nuts.setlink
@@ -139,37 +138,14 @@ fonts.hashes.processes = fontprocesses
-- inside a run which means that we need to keep track of this which in turn complicates matters
-- in a way i don't like
--- we need to deal with the basemode fonts here and can only run over ranges as we
--- otherwise get luatex craches due to all kind of asserts in the disc/lig builder
+-- we need to deal with the basemode fonts here and can only run over ranges as we otherwise get
+-- luatex craches due to all kind of asserts in the disc/lig builder
+
+-- there is no gain in merging used (dynamic 0) and dynamics apart from a bit less code
local ligaturing = nuts.ligaturing
local kerning = nuts.kerning
--- -- -- this will go away
---
--- local disccodes = nodes.disccodes
--- local explicitdisc_code = disccodes.explicit
--- local automaticdisc_code = disccodes.automatic
--- local expanders = nil
---
--- function fonts.setdiscexpansion(v)
--- if v == nil or v == true then
--- expanders = languages and languages.expanders
--- elseif type(v) == "table" then
--- expanders = v
--- else
--- expanders = false
--- end
--- end
---
--- function fonts.getdiscexpansion()
--- return expanders and true or false
--- end
---
--- fonts.setdiscexpansion(true)
---
--- -- -- till here
-
local function start_trace(head)
run = run + 1
report_fonts()
@@ -193,19 +169,15 @@ local function start_trace(head)
end
end
-local function stop_trace(u,usedfonts,a,attrfonts,b,basefonts,r,redundant,e,expanders)
+local function stop_trace(u,usedfonts,a,attrfonts,b,basefonts,r,redundant)
report_fonts()
report_fonts("statics : %s",u > 0 and concat(keys(usedfonts)," ") or "none")
report_fonts("dynamics: %s",a > 0 and concat(keys(attrfonts)," ") or "none")
report_fonts("built-in: %s",b > 0 and b or "none")
report_fonts("removed : %s",r > 0 and r or "none")
- -- if expanders then
- -- report_fonts("expanded: %s",e > 0 and e or "none")
- -- end
report_fonts()
end
-
do
local usedfonts
@@ -221,7 +193,7 @@ do
local lastproc
local lastnone
- local a, u, b, r, e
+ local a, u, b, r
local function protectnone()
protect_glyphs(firstnone,lastnone)
@@ -307,7 +279,7 @@ do
lastproc = nil
lastnone = nil
- a, u, b, r, e = 0, 0, 0, 0, 0
+ a, u, b, r = 0, 0, 0, 0
if trace_fontrun then
start_trace(head)
@@ -425,15 +397,13 @@ do
end
if force_discrun then
-
-- basefont is not supported in disc only runs ... it would mean a lot of
- -- ranges .. we could try to run basemode as a separate processor run but
- -- not for now (we can consider it when the new node code is tested
+ -- ranges .. we could try to run basemode as a separate processor run but not
+ -- for now (we can consider it when the new node code is tested
for d in nextdisc, head do
- -- we could use first_glyph, only doing replace is good enough because
- -- pre and post are normally used for hyphens and these come from fonts
- -- that part of the hyphenated word
- local _, _, r = getdisc(d)
+ -- doing only replace is good enough because pre and post are normally used
+ -- for hyphens and these come from fonts that part of the hyphenated word
+ local r = getreplace(d)
if r then
local prevfont = nil
local prevattr = nil
@@ -465,19 +435,13 @@ do
if firstnone then
protectnone()
end
- -- elseif expanders then
- -- local subtype = getsubtype(d)
- -- if subtype == automaticdisc_code or subtype == explicitdisc_code then
- -- expanders[subtype](d)
- -- e = e + 1
- -- end
end
end
end
if trace_fontrun then
- stop_trace(u,usedfonts,a,attrfonts,b,basefonts,r,redundant,e,expanders)
+ stop_trace(u,usedfonts,a,attrfonts,b,basefonts,r,redundant)
end
-- in context we always have at least 2 processors
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua b/Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua
new file mode 100644
index 00000000000..5b598f6b033
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-gcm.lua
@@ -0,0 +1,96 @@
+if not modules then modules = { } end modules ['node-gmc'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, tostring = type, tostring
+
+local nodes = nodes
+local nodecodes = nodes.nodecodes
+local ligature_code = nodes.glyphcodes.ligature
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getsubtype = nuts.getsubtype
+local getprev = nuts.getprev
+local setlink = nuts.setlink
+local nextglyph = nuts.traversers.glyph
+local copy_node = nuts.copy
+local isglyph = nuts.isglyph
+
+local report_error = logs.reporter("node-aux:error")
+
+local get_components = node.direct.getcomponents
+local set_components = node.direct.setcomponents
+
+local function copy_no_components(g,copyinjection)
+ local components = get_components(g)
+ if components then
+ set_components(g)
+ local n = copy_node(g)
+ if copyinjection then
+ copyinjection(n,g)
+ end
+ set_components(g,components)
+ -- maybe also upgrade the subtype but we don't use it anyway
+ return n
+ else
+ local n = copy_node(g)
+ if copyinjection then
+ copyinjection(n,g)
+ end
+ return n
+ end
+end
+
+local function copy_only_glyphs(current)
+ local head = nil
+ local previous = nil
+ for n in nextglyph, current do
+ n = copy_node(n)
+ if head then
+ setlink(previous,n)
+ else
+ head = n
+ end
+ previous = n
+ end
+ return head
+end
+
+-- start is a mark and we need to keep that one
+
+local function count_components(start,marks)
+ local char = isglyph(start)
+ if char then
+ if getsubtype(start) == ligature_code then
+ local n = 0
+ local components = get_components(start)
+ while components do
+ n = n + count_components(components,marks)
+ components = getnext(components)
+ end
+ return n
+ elseif not marks[char] then
+ return 1
+ end
+ end
+ return 0
+end
+
+local function flush_components()
+ -- this is a no-op in mkiv / generic
+end
+
+nuts.set_components = set_components
+nuts.get_components = get_components
+nuts.copy_only_glyphs = copy_only_glyphs
+nuts.copy_no_components = copy_no_components
+nuts.count_components = count_components
+nuts.flush_components = flush_components
+
+nuts.setcomponents = function() report_error("unsupported: %a","setcomponents") end
+nuts.getcomponents = function() report_error("unsupported: %a","getcomponents") end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua
index 8ebec4a1c62..701e3efa92c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ini.lua
@@ -78,19 +78,18 @@ local dircodes = mark(getsubtypes("dir"))
local glyphcodes = mark(getsubtypes("glyph"))
local disccodes = mark(getsubtypes("disc"))
local gluecodes = mark(getsubtypes("glue"))
-local leadercodes = mark(getsubtypes("leader"))
local fillcodes = mark(getsubtypes("fill"))
local boundarycodes = mark(getsubtypes("boundary"))
local penaltycodes = mark(getsubtypes("penalty"))
local kerncodes = mark(getsubtypes("kern"))
-local margincodes = CONTEXTLMTXMODE == 0 and mark(getsubtypes("marginkern")) or { }
+local margincodes = mark(getsubtypes("marginkern"))
local mathcodes = mark(getsubtypes("math"))
local noadcodes = mark(getsubtypes("noad"))
local radicalcodes = mark(getsubtypes("radical"))
local accentcodes = mark(getsubtypes("accent"))
local fencecodes = mark(getsubtypes("fence"))
----- fractioncodes = mark(getsubtypes("fraction"))
-local localparcodes = allocate { [0] = "new_graf", "local_box", "hmode_par", "penalty", "math" } -- only in luametatex now
+local parcodes = allocate { [0] = "vmode_par", "local_box", "hmode_par", "penalty", "math" }
local function simplified(t)
local r = { }
@@ -104,13 +103,13 @@ local nodecodes = simplified(node.types())
local whatcodes = simplified(node.whatsits and node.whatsits() or { })
local usercodes = allocate {
- [ 97] = "attribute", -- a
- [100] = "number", -- d
- [102] = "float", -- f
- [108] = "lua", -- l
- [110] = "node", -- n
- [115] = "string", -- s
- [116] = "token" -- t
+ [ 97] = "attribute", -- a
+ [100] = "number", -- d
+ [102] = "float", -- f
+ [108] = "lua", -- l
+ [110] = "node", -- n
+ [115] = "string", -- s
+ [116] = "token" -- t
}
local noadoptions = allocate {
@@ -125,23 +124,9 @@ local noadoptions = allocate {
right = 0x14 + 0x08,
}
--- local directionvalues = mark(getvalues("dir"))
--- local gluevalues = mark(getvalues("glue"))
--- local literalvalues = mark(getvalues("literal"))
-
local dirvalues = allocate {
- [0] = "TLT",
- [1] = "TRT",
- [2] = "LTL",
- [3] = "RTT",
-}
-
-local gluevalues = allocate {
- [0] = "normal",
- [1] = "fi",
- [2] = "fil",
- [3] = "fill",
- [4] = "filll",
+ [0] = "lefttoright",
+ [1] = "righttoleft",
}
local literalvalues = allocate {
@@ -154,6 +139,8 @@ local literalvalues = allocate {
[6] = "special",
}
+local gluevalues = mark(getvalues("glue"))
+
gluecodes = allocate(swapped(gluecodes,gluecodes))
dircodes = allocate(swapped(dircodes,dircodes))
boundarycodes = allocate(swapped(boundarycodes,boundarycodes))
@@ -171,35 +158,39 @@ margincodes = allocate(swapped(margincodes,margincodes))
disccodes = allocate(swapped(disccodes,disccodes))
accentcodes = allocate(swapped(accentcodes,accentcodes))
fencecodes = allocate(swapped(fencecodes,fencecodes))
-localparcodes = allocate(swapped(localparcodes,localparcodes))
+parcodes = allocate(swapped(parcodes,parcodes))
rulecodes = allocate(swapped(rulecodes,rulecodes))
-leadercodes = allocate(swapped(leadercodes,leadercodes))
usercodes = allocate(swapped(usercodes,usercodes))
noadoptions = allocate(swapped(noadoptions,noadoptions))
dirvalues = allocate(swapped(dirvalues,dirvalues))
gluevalues = allocate(swapped(gluevalues,gluevalues))
literalvalues = allocate(swapped(literalvalues,literalvalues))
+if not nodecodes.delimiter then
+ -- as in luametatex / lmtx
+ nodecodes.delimiter = nodecodes.delim
+ nodecodes[nodecodes.delimiter] = "delimiter"
+ nodecodes.delim = nil
+end
+
+if not nodecodes.par then
+ -- as in luametatex / lmtx
+ local p = nodecodes.localpar
+ nodecodes.par = p
+ nodecodes[p] = "par"
+end
+
if not gluecodes.indentskip then
- gluecodes.indentskip = gluecodes.userskip
- gluecodes.lefthangskip = gluecodes.userskip
- gluecodes.righthangskip = gluecodes.userskip
- gluecodes.correctionskip = gluecodes.userskip
- gluecodes.intermathskip = gluecodes.userskip
+ gluecodes.indentskip = gluecodes.userskip
+ gluecodes.lefthangskip = gluecodes.userskip
+ gluecodes.righthangskip = gluecodes.userskip
+ gluecodes.correctionskip = gluecodes.userskip
+ gluecodes.intermathskip = gluecodes.userskip
+ gluecodes.parfillleftskip = gluecodes.parfillskip
+ gluecodes.parfillrightskip = gluecodes.parfillskip
end
-if CONTEXTLMTXMODE > 0 then
- whatcodes.literal = 0x1 whatcodes[0x1] = "literal"
- whatcodes.latelua = 0x2 whatcodes[0x2] = "latelua"
- whatcodes.userdefined = 0x3 whatcodes[0x3] = "userdefined"
- whatcodes.savepos = 0x4 whatcodes[0x4] = "savepos"
- whatcodes.save = 0x5 whatcodes[0x5] = "save"
- whatcodes.restore = 0x6 whatcodes[0x6] = "restore"
- whatcodes.setmatrix = 0x7 whatcodes[0x7] = "setmatrix"
- whatcodes.open = 0x8 whatcodes[0x8] = "open"
- whatcodes.close = 0x9 whatcodes[0x9] = "close"
- whatcodes.write = 0xA whatcodes[0xA] = "write"
-elseif not whatcodes.literal then
+if not whatcodes.literal then
whatcodes.literal = whatcodes.pdfliteral
whatcodes.save = whatcodes.pdfsave
whatcodes.restore = whatcodes.pdfrestore
@@ -223,18 +214,14 @@ nodes.disccodes = disccodes
nodes.accentcodes = accentcodes
nodes.radicalcodes = radicalcodes
nodes.fencecodes = fencecodes
-nodes.localparcodes = localparcodes
+nodes.parcodes = parcodes
nodes.rulecodes = rulecodes
-nodes.leadercodes = leadercodes
nodes.usercodes = usercodes
nodes.noadoptions = noadoptions
nodes.dirvalues = dirvalues
nodes.gluevalues = gluevalues
nodes.literalvalues = literalvalues
-dirvalues.lefttoright = 0
-dirvalues.righttoleft = 1
-
nodes.subtypes = allocate {
[nodecodes.accent] = accentcodes,
[nodecodes.boundary] = boundarycodes,
@@ -245,7 +232,7 @@ nodes.subtypes = allocate {
[nodecodes.glyph] = glyphcodes,
[nodecodes.hlist] = listcodes,
[nodecodes.kern] = kerncodes,
- [nodecodes.localpar] = localparcodes,
+ [nodecodes.par] = parcodes,
-- [nodecodes.marginkern] = margincodes,
[nodecodes.math] = mathcodes,
[nodecodes.noad] = noadcodes,
@@ -255,31 +242,28 @@ nodes.subtypes = allocate {
-- [nodecodes.user] = usercodes,
[nodecodes.vlist] = listcodes,
[nodecodes.whatsit] = whatcodes,
+ [nodecodes.marginkern] = margincodes
}
-if CONTEXTLMTXMODE == 0 then
- nodes.subtypes[nodecodes.marginkern] = margincodes
-end
-
table.setmetatableindex(nodes.subtypes,function(t,k)
local v = { }
t[k] = v
return v
end)
-nodes.skipcodes = gluecodes -- more friendly
-nodes.directioncodes = dircodes -- more friendly
-nodes.whatsitcodes = whatcodes -- more official
+-- a few more friendly aliases:
+
+nodes.skipcodes = gluecodes
+nodes.directioncodes = dircodes
+nodes.whatsitcodes = whatcodes
nodes.marginkerncodes = margincodes
nodes.discretionarycodes = disccodes
-nodes.directionvalues = dirvalues -- more friendly
-nodes.skipvalues = gluevalues -- more friendly
-nodes.literalvalues = literalvalues -- more friendly
+nodes.directionvalues = dirvalues
+nodes.skipvalues = gluevalues
+nodes.literalvalues = literalvalues
glyphcodes.glyph = glyphcodes.character
-localparcodes.vmode_par = localparcodes.new_graf
-
listcodes.row = listcodes.alignment
listcodes.column = listcodes.alignment
@@ -307,7 +291,6 @@ nodes.codes = allocate { -- mostly for listing
accent = accentcodes,
fence = fencecodes,
rule = rulecodes,
- leader = leadercodes,
user = usercodes,
noadoptions = noadoptions,
}
@@ -351,18 +334,3 @@ trackers.register("system.showcodes", nodes.showcodes)
if node.fix_node_lists then
node.fix_node_lists(false)
end
-
--- We use the real node code numbers.
-
-if CONTEXTLMTXMODE > 0 then
-
- local texchardef = tex.chardef
-
- if texchardef then
- for i=0,nodecodes.glyph do
- texchardef(nodecodes[i] .. "nodecode",i)
- end
- tex.set("internalcodesmode",1)
- end
-
-end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv
index 5bf53cd2d01..072cb319aad 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ini.mkiv
@@ -17,16 +17,13 @@
\newcount\filterstate \filterstate\plusone % hm, public
-\ifcase\contextlmtxmode \else
- \registerctxluafile{node-cmp}{}
-\fi
-
\registerctxluafile{node-ini}{}
\registerctxluafile{node-met}{}
\registerctxluafile{node-nut}{}
\registerctxluafile{node-res}{}
%registerctxluafile{node-ppt}{} % experimental, not used so probably useless
\registerctxluafile{node-aux}{}
+\registerctxluafile{node-gcm}{}
\registerctxluafile{node-tst}{}
\registerctxluafile{node-tra}{} % we might split it off (module)
\registerctxluafile{node-snp}{}
@@ -35,7 +32,7 @@
\registerctxluafile{node-dir}{} % experimental, not yet (and maybe never) used
\registerctxluafile{node-pro}{}
\registerctxluafile{node-ser}{}
-\registerctxluafile{node-ext}{}
+%registerctxluafile{node-ext}{}
\registerctxluafile{node-acc}{} % experimental
%registerctxluafile{node-prp}{} % makes no sense (yet)
\registerctxluafile{node-scn}{}
@@ -53,14 +50,4 @@
\unexpanded\def\visualizenextnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,false,true)}}}
\unexpanded\def\visualizeflatnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,true,true)}}}
-\unexpanded\def\starttracingnodes[#1]{\ctxlua{nodes.tracers.characters.start("#1")}}
-\unexpanded\def\stoptracingnodes {\ctxlua{nodes.tracers.characters.stop()}}
-
-% \starttext
-% \starttracingnodes[characters]
-% \input tufte \par
-% \input tufte \par
-% \stoptracingnodes
-% \stoptext
-
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua
index a85bdfe0128..6cb9e8d102f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ltp.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['node-par'] = {
version = 1.001,
+ optimize = true,
comment = "companion to node-par.mkiv",
author = "Hans Hagen",
copyright = "ConTeXt Development Team",
@@ -259,7 +260,6 @@ local nodepool = nuts.pool
local nodecodes = nodes.nodecodes
local kerncodes = nodes.kerncodes
-local margincodes = nodes.margincodes
local disccodes = nodes.disccodes
local mathcodes = nodes.mathcodes
local fillcodes = nodes.fillcodes
@@ -281,12 +281,11 @@ local unset_code = nodecodes.unset
local marginkern_code = nodecodes.marginkern
local dir_code = nodecodes.dir
local boundary_code = nodecodes.boundary
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local protrusionboundary_code = nodes.boundarycodes.protrusion
-local leaders_code = nodes.leadercodes.leaders
+local leaders_code = nodes.gluecodes.leaders
local indentlist_code = nodes.listcodes.indent
-local ligatureglyph_code = nodes.glyphcodes.ligature
local cancel_code = nodes.dircodes.cancel
local userkern_code = kerncodes.userkern
@@ -294,9 +293,6 @@ local italickern_code = kerncodes.italiccorrection
local fontkern_code = kerncodes.fontkern
local accentkern_code = kerncodes.accentkern
-local leftmargin_code = margincodes.left
------ rightmargin_code = margincodes.right
-
local automaticdisc_code = disccodes.automatic
local regulardisc_code = disccodes.regular
local firstdisc_code = disccodes.first
@@ -349,6 +345,11 @@ local new_hlist = nodepool.hlist
local getnormalizeline = nodes.getnormalizeline
+local packing_exactly = "exactly"
+local packing_additional = "additional"
+local packing_expanded = CONTEXTLMTXMODE > 0 and "expanded" or "cal_expand_ratio"
+local packing_substitute = CONTEXTLMTXMODE > 0 and "substiture" or "subst_ex_font"
+
-- helpers --
-- It makes more sense to move the somewhat messy dir state tracking
@@ -1321,7 +1322,7 @@ do
while current_break do
- -- hm, here we have head == localpar and in the engine it's a temp node
+ -- hm, here we have head == par and in the engine it's a temp node
head = inject_dirs_at_begin_of_line(dirstack,head)
@@ -1461,7 +1462,7 @@ do
p = nil
end
break
- elseif id == localpar_code then
+ elseif id == par_code then
break
elseif id == temp_code then
-- Go on.
@@ -1558,29 +1559,29 @@ do
start = insert_node_before(start,start,ls)
end
if normalize > 0 then
- local localpar = nil
- local localdir = nil
+ local par = nil
+ local dir = nil
local indent = nil
- local localpars = nil
+ local pars = nil
local notflocal = 0
for n, id, subtype in nextnode, start do
if id == hlist_code then
if normalize > 1 and subtype == indentlist_code then
indent = n
end
- elseif id == localpar_code then
+ elseif id == par_code then
if start_of_par(n) then --- maybe subtype check instead
- localpar = n
+ par = n
elseif noflocals then
noflocals = noflocals + 1
- localpars[noflocals] = n
+ pars[noflocals] = n
else
noflocals = 1
- localpars = { n }
+ pars = { n }
end
elseif id == dir_code then
- if localpar and not localdir and subtype(n) == cancel_code then
- localdir = n
+ if par and not dir and subtype(n) == cancel_code then
+ dir = n
end
end
end
@@ -1589,14 +1590,14 @@ do
setattributelist(i,start)
replace_node(indent,i)
end
- if localdir then
- local d = new_direction((getdirection(localpar)))
+ if dir then
+ local d = new_direction((getdirection(par)))
setattributelist(d,start)
- replace_node(localpar,d)
+ replace_node(par,d)
end
- if localpars then
+ if pars then
for i=1,noflocals do
- start = remove_node(start,localpars[i],true)
+ start = remove_node(start,pars[i],true)
end
end
end
@@ -1651,9 +1652,9 @@ do
local finished_line = nil
if adjust_spacing > 0 then
statistics.nofadjustedlines = statistics.nofadjustedlines + 1
- finished_line = xpack_nodes(start,cur_width,"cal_expand_ratio",par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis)
+ finished_line = xpack_nodes(start,cur_width,packing_expanded,par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis)
else
- finished_line = xpack_nodes(start,cur_width,"exactly",par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis)
+ finished_line = xpack_nodes(start,cur_width,packing_exactly,par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis)
end
if protrude_chars > 0 then
statistics.nofprotrudedlines = statistics.nofprotrudedlines + 1
@@ -1717,7 +1718,7 @@ do
local id = getid(next)
if id == glyph_code then
break
- elseif id == localpar_code then
+ elseif id == par_code then
-- nothing
elseif id < math_code then
-- messy criterium
@@ -1754,7 +1755,7 @@ par.head = head
if getnext(h) then
report_parbuilders("something is left over")
end
- if getid(h) ~= localpar_code then
+ if getid(h) ~= par_code then
report_parbuilders("no local par node")
end
end
@@ -2452,7 +2453,7 @@ par.head = head
if current then
local id = getid(current)
- if id == localpar_code then
+ if id == par_code then
par.init_internal_left_box = getfield(current,"box_left")
par.init_internal_left_box_width = getfield(current,"box_left_width")
par.internal_pen_inter = getfield(current,"pen_inter")
@@ -2615,7 +2616,7 @@ par.head = head
p_active, n_active = try_break(getpenalty(current), unhyphenated_code, par, first_p, current, checked_expansion)
elseif id == dir_code then
par.line_break_dir = checked_line_dir(dirstack,current) or par.line_break_dir
- elseif id == localpar_code then
+ elseif id == par_code then
par.internal_pen_inter = getfield(current,"pen_inter")
par.internal_pen_broken = getfield(current,"pen_broken")
par.internal_left_box = getfield(current,"box_left")
@@ -2881,7 +2882,7 @@ do
local function common_message(hlist,line,str)
write_nl("")
- if status.output_active then -- unset
+ if CONTEXTLMTXMODE > 0 and tex.getoutputactive() or status.output_active then
write(str," has occurred while \\output is active")
else
write(str)
@@ -2961,7 +2962,7 @@ do
setlist(hlist,head)
end
- local cal_expand_ratio = method == "cal_expand_ratio" or method == "subst_ex_font"
+ local cal_expand_ratio = method == packing_expanded or method == packing_substitute
direction = direction or texget("textdir")
@@ -3136,7 +3137,7 @@ do
if pre_adjust_tail then
pre_adjust_tail.next = nil -- todo
end
- if method == "additional" then
+ if method == packing_additional then
width = width + natural
end
setwhd(hlist,width,height,depth)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-met.lua b/Master/texmf-dist/tex/context/base/mkiv/node-met.lua
index db079c11628..31f9a16b28b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-met.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-met.lua
@@ -1,4 +1,4 @@
-if not modules then modules = { } end modules ['node-nut'] = {
+if not modules then modules = { } end modules ['node-MET'] = {
version = 1.001,
comment = "companion to node-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -102,7 +102,7 @@ nodes.uses_font = node.uses_font
nodes.first_glyph = node.first_glyph
nodes.has_glyph = node.has_glyph or node.first_glyph
-nodes.current_attr = node.current_attr
+nodes.current_attributes = node.current_attributes or node.current_attr
nodes.has_field = node.has_field
nodes.last_node = node.last_node
nodes.usedlist = node.usedlist
@@ -629,233 +629,3 @@ end
nodes.keys = keys -- [id][subtype]
nodes.fields = nodefields -- (n)
-
-if not nodes.count then
-
- local type = type
-
- local direct = node.direct
- local todirect = direct.tovaliddirect
- local tonode = direct.tonode
-
- local count = direct.count
- local length = direct.length
- local slide = direct.slide
-
- function node.count(id,first,last)
- return count(id,first and todirect(first), last and todirect(last) or nil)
- end
-
- function node.length(first,last)
- return length(first and todirect(first), last and todirect(last) or nil)
- end
-
- function node.slide(n)
- if n then
- n = slide(todirect(n))
- if n then
- return tonode(n)
- end
- end
- return nil
- end
-
- local hyphenating = direct.hyphenating
- local ligaturing = direct.ligaturing
- local kerning = direct.kerning
-
- -- kind of inconsistent
-
- function node.hyphenating(first,last)
- if first then
- local h, t = hyphenating(todirect(first), last and todirect(last) or nil)
- return h and tonode(h) or nil, t and tonode(t) or nil, true
- else
- return nil, false
- end
- end
-
- function node.ligaturing(first,last)
- if first then
- local h, t = ligaturing(todirect(first), last and todirect(last) or nil)
- return h and tonode(h) or nil, t and tonode(t) or nil, true
- else
- return nil, false
- end
- end
-
- function node.kerning(first,last)
- if first then
- local h, t = kerning(todirect(first), last and todirect(last) or nil)
- return h and tonode(h) or nil, t and tonode(t) or nil, true
- else
- return nil, false
- end
- end
-
- local protect_glyph = direct.protect_glyph
- local unprotect_glyph = direct.unprotect_glyph
- local protect_glyphs = direct.protect_glyphs
- local unprotect_glyphs = direct.unprotect_glyphs
-
- function node.protect_glyphs(first,last)
- protect_glyphs(todirect(first), last and todirect(last) or nil)
- end
-
- function node.unprotect_glyphs(first,last)
- unprotect_glyphs(todirect(first), last and todirect(last) or nil)
- end
-
- function node.protect_glyph(first)
- protect_glyph(todirect(first))
- end
-
- function node.unprotect_glyph(first)
- unprotect_glyph(todirect(first))
- end
-
- local flatten_discretionaries = direct.flatten_discretionaries
- local check_discretionaries = direct.check_discretionaries
- local check_discretionary = direct.check_discretionary
-
- function node.flatten_discretionaries(first)
- local h, count = flatten_discretionaries(todirect(first))
- return tonode(h), count
- end
-
- function node.check_discretionaries(n)
- check_discretionaries(todirect(n))
- end
-
- function node.check_discretionary(n)
- check_discretionary(todirect(n))
- end
-
- local hpack = direct.hpack
- local vpack = direct.vpack
- local list_to_hlist = direct.mlist_to_hlist
-
- function node.hpack(head,...)
- local h, badness = hpack(head and todirect(head) or nil,...)
- return tonode(h), badness
- end
-
- function node.vpack(head,...)
- local h, badness = vpack(head and todirect(head) or nil,...)
- return tonode(h), badness
- end
-
- function node.mlist_to_hlist(head,...)
- return tonode(mlist_to_hlist(head and todirect(head) or nil,...))
- end
-
- local end_of_math = direct.end_of_math
- local find_attribute = direct.find_attribute
- local first_glyph = direct.first_glyph
-
- function node.end_of_math(n)
- if n then
- n = end_of_math(todirect(n))
- if n then
- return tonode(n)
- end
- end
- return nil
- end
-
- function node.find_attribute(n,a)
- if n then
- local v, n = find_attribute(todirect(n),a)
- if n then
- return v, tonode(n)
- end
- end
- return nil
- end
-
- function node.first_glyph(first,last)
- local n = first_glyph(todirect(first), last and todirect(last) or nil)
- return n and tonode(n) or nil
- end
-
- local dimensions = direct.dimensions
- local rangedimensions = direct.rangedimensions
- local effective_glue = direct.effective_glue
-
- function node.dimensions(a,b,c,d,e)
- if type(a) == "userdata" then
- a = todirect(a)
- if type(b) == "userdata" then
- b = todirect(b)
- end
- return dimensions(a,b)
- else
- d = todirect(d)
- if type(e) == "userdata" then
- e = todirect(e)
- end
- return dimensions(a,b,c,d,e)
- end
- return 0, 0, 0
- end
-
- function node.rangedimensions(parent,first,last)
- return rangedimenensions(todirect(parent),todirect(first),last and todirect(last))
- end
-
- function node.effective_glue(list,parent)
- return effective_glue(list and todirect(list) or nil,parent and todirect(parent) or nil)
- end
-
- local uses_font = direct.uses_font
- local has_glyph = direct.has_glyph
- local protrusion_skippable = direct.protrusion_skippable
- local prepend_prevdepth = direct.prepend_prevdepth
- local make_extensible = direct.make_extensible
-
- function node.uses_font(n,f)
- return uses_font(todirect(n),f)
- end
-
- function node.has_glyph(n)
- return has_glyph(todirect(n))
- end
-
- function node.protrusion_skippable(n)
- return protrusion_skippable(todirect(n))
- end
-
- function node.prepend_prevdepth(n)
- local n, d = prepend_prevdepth(todirect(n))
- return tonode(n), d
- end
-
- function node.make_extensible(...)
- local n = make_extensible(...)
- return n and tonode(n) or nil
- end
-
- local last_node = direct.last_node
-
- function node.last_node()
- local n = last_node()
- return n and tonode(n) or nil
- end
-
- local is_zero_glue = direct.is_zero_glue
- local getglue = direct.getglue
- local setglue = direct.setglue
-
- function node.is_zero_glue(n)
- return is_zero_glue(todirect(n))
- end
-
- function node.get_glue(n)
- return get_glue(todirect(n))
- end
-
- function node.set_glue(n)
- return set_glue(todirect(n))
- end
-
-end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua b/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua
index 6c10625eb64..13414c560c7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-mig.lua
@@ -14,157 +14,174 @@ local trace_migrations = false trackers.register("nodes.migrations", function(v)
local report_nodes = logs.reporter("nodes","migrations")
-local attributes = attributes
-local nodes = nodes
-local enableaction = nodes.tasks.enableaction
+local attributes = attributes
+local nodes = nodes
-local nuts = nodes.nuts
-local tonut = nuts.tonut
+local nuts = nodes.nuts
+local tonut = nuts.tonut
-local getnext = nuts.getnext
-local getid = nuts.getid
-local getlist = nuts.getlist
------ getattr = nuts.getattr
-local getprop = nuts.getprop
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getprop = nuts.getprop
------ setattr = nuts.setattr
-local setprop = nuts.setprop
-local setlink = nuts.setlink
-local setlist = nuts.setlist
-local setprev = nuts.setprev
-local setnext = nuts.setnext
-local setboth = nuts.setboth
+local setprop = nuts.setprop
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setprev = nuts.setprev
+local setnext = nuts.setnext
+local setboth = nuts.setboth
-local remove_node = nuts.remove
+local remove_node = nuts.remove
+local count = nuts.count
-local nodecodes = nodes.nodecodes
-local hlist_code = nodecodes.hlist
-local vlist_code = nodecodes.vlist
-local insert_code = nodecodes.ins
-local mark_code = nodecodes.mark
+local nodecodes = nodes.nodecodes
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local insert_code = nodecodes.ins
+local mark_code = nodecodes.mark
-local a_migrated = attributes.private("migrated")
+local a_migrated = attributes.private("migrated")
+local trialtypesetting = context.trialtypesetting
-local migrate_inserts, migrate_marks, inserts_too
+local migrate_inserts = false
+local migrate_marks = false
-local t_inserts, t_marks, t_sweeps = 0, 0, 0
+local t_inserts = 0
+local t_marks = 0
+local t_sweeps = 0
-local function locate(head,first,last,ni,nm)
+local function locate(head,first,last)
local current = head
while current do
local id = getid(current)
if id == vlist_code or id == hlist_code then
local list = getlist(current)
if list then
- list, first, last, ni, nm = locate(list,first,last,ni,nm)
- setlist(current,list)
+ local l
+ l, first, last = locate(list,first,last)
+ if l ~= list then
+ setlist(current,l)
+ end
end
current = getnext(current)
- elseif migrate_inserts and id == insert_code then
- local insert
- head, current, insert = remove_node(head,current)
- if first then
- setnext(insert)
- setlink(last,insert)
- else
- setboth(insert)
- first = insert
+ elseif id == insert_code then
+ if migrate_inserts then
+ local insert
+ head, current, insert = remove_node(head,current)
+ if first then
+ setnext(insert)
+ setlink(last,insert)
+ else
+ setboth(insert)
+ first = insert
+ end
+ last = insert
end
- last = insert
- ni = ni + 1
- elseif migrate_marks and id == mark_code then
- local mark
- head, current, mark = remove_node(head,current)
- if first then
- setnext(mark)
- setlink(last,mark)
- else
- setboth(mark)
- first = mark
+ elseif id == mark_code then
+ if migrate_marks then
+ local mark
+ head, current, mark = remove_node(head,current)
+ if first then
+ setnext(mark)
+ setlink(last,mark)
+ else
+ setboth(mark)
+ first = mark
+ end
+ last = mark
end
- last = mark
- nm = nm + 1
else
current = getnext(current)
end
end
- return head, first, last, ni, nm
+ return head, first, last
end
function nodes.handlers.migrate(head,where)
- if head then
+ if head and not trialtypesetting() then
if trace_migrations then
report_nodes("migration sweep %a",where)
end
local current = head
while current do
local id = getid(current)
- -- inserts_too is a temp hack, we should only do them when it concerns
- -- newly placed (flushed) inserts
-
- -- todo: getprop / setprop
-
- -- if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getattr(current,a_migrated) then
- if id == vlist_code or id == hlist_code or (inserts_too and id == insert_code) and not getprop(current,"migrated") then
- -- setattr(current,a_migrated,1)
+ if (id == vlist_code or id == hlist_code or id == insert_code) and not getprop(current,"migrated") then
setprop(current,"migrated",true)
- t_sweeps = t_sweeps + 1
local h = getlist(current)
- local first, last, ni, nm
- while h do
- local id = getid(h)
- if id == vlist_code or id == hlist_code then
- h, first, last, ni, nm = locate(h,first,last,0,0)
+ if h then
+ t_sweeps = t_sweeps + 1
+ local first, last
+ while h do
+ local id = getid(h)
+ if id == vlist_code or id == hlist_code then
+ h, first, last = locate(h,first,last)
+ end
+ h = getnext(h)
end
- h = getnext(h)
- end
- if first then
- t_inserts = t_inserts + ni
- t_marks = t_marks + nm
- if trace_migrations and (ni > 0 or nm > 0) then
- report_nodes("sweep %a, container %a, %s inserts and %s marks migrated outwards during %a",
- t_sweeps,nodecodes[id],ni,nm,where)
- end
- -- inserts after head, use insert_after
- local n = getnext(current)
- if n then
- setlink(last,n)
+ if first then
+ if trace_migrations then
+ local ni = count(insert_code,first)
+ local nm = count(mark_code,first)
+ t_inserts = t_inserts + ni
+ t_marks = t_marks + nm
+ report_nodes("sweep %a, container %a, %s inserts and %s marks migrated outwards during %a",
+ t_sweeps,nodecodes[id],ni,nm,where)
+ end
+ local n = getnext(current)
+ if n then
+ setlink(last,n)
+ end
+ setlink(current,first)
+ current = last
end
- setlink(current,first)
- current = last
end
end
current = getnext(current)
end
- return head
end
+ return head
end
--- for the moment this way, this will disappear
-
-experiments.register("marks.migrate", function(v)
- if v then
- enableaction("mvlbuilders", "nodes.handlers.migrate")
+statistics.register("node migrations", function()
+ if trace_migrations and t_sweeps > 0 then
+ return format("%s sweeps, %s inserts moved, %s marks moved",t_sweeps,t_inserts,t_marks)
end
- migrate_marks = v
end)
-experiments.register("inserts.migrate", function(v)
- if v then
- enableaction("mvlbuilders", "nodes.handlers.migrate")
- end
- migrate_inserts = v
-end)
+-- Since we started with mkiv we had it as experiment but it is about time
+-- to have a more formal interface .. it's still optional due to possible
+-- side effects.
-experiments.register("inserts.migrate.nested", function(v)
- if v then
- enableaction("mvlbuilders", "nodes.handlers.migrate")
+local enableaction = nodes.tasks.enableaction
+local disableaction = nodes.tasks.disableaction
+
+local migrations = { }
+nodes.migrations = migrations
+local enabled = false
+
+local function check()
+ if migrate_marks or migrate_inserts then
+ if not enabled then
+ enableaction("mvlbuilders", "nodes.handlers.migrate")
+ enableaction("processors", "nodes.handlers.migrate")
+ enabled = true
+ end
+ else
+ if enabled then
+ disableaction("mvlbuilders", "nodes.handlers.migrate")
+ disableaction("processors", "nodes.handlers.migrate")
+ enabled = false
+ end
end
- inserts_too = v
-end)
+end
-statistics.register("node migrations", function()
- if trace_migrations and t_sweeps > 0 then
- return format("%s sweeps, %s inserts moved, %s marks moved",t_sweeps,t_inserts,t_marks)
- end
-end)
+function migrations.setmarks(v)
+ migrate_marks = v
+ check()
+end
+
+function migrations.setinserts(v)
+ migrate_inserts = v
+ check()
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv
index 010d009b35b..0e76e479447 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-mig.mkiv
@@ -13,9 +13,9 @@
\writestatus{loading}{ConTeXt Node Support / Migrations}
-%D This is very experimental and although it is used in a
-%D real project it mostly serves a testbed for Taco and me so
-%D as prelude to extending the inserts mechanism.
+%D This is very experimental and although it is used in a real project it mostly
+%D serves a testbed for Taco and me so as prelude to extending the inserts
+%D mechanism.
%D
%D \starttyping
%D \automigrateinserts
@@ -42,20 +42,7 @@
\registerctxluafile{node-mig}{}
-\newtoks\everyautomigratefootnotes
-\newtoks\everyautomigratemarks
-
-\def\automigrateinserts{\the\everyautomigratefootnotes} % soon default but does not work (yet) for notes in captions (themselves inserts)
-\def\automigratemarks {\the\everyautomigratemarks}
-
-\appendtoks
- \let\postponenotes\relax
- \enableexperiments[inserts.migrate,inserts.migrate.nested]%
-\to \everyautomigratefootnotes
-
-\appendtoks
- \writestatus\m!system{migration of marks is normally not needed}%
- \enableexperiments[marks.migrate]%
-\to \everyautomigratemarks
+\protected\def\automigrateinserts{\setupinsertion[\c!anchoring=\v!auto]}
+ \let\automigratemarks \relax
\protect
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua b/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua
index e722bbd66a9..9909194e7ae 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-nut.lua
@@ -1,4 +1,4 @@
-if not modules then modules = { } end modules ['node-met'] = {
+if not modules then modules = { } end modules ['node-nut'] = {
version = 1.001,
comment = "companion to node-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -200,11 +200,11 @@ nuts.unset_attribute = direct.unset_attribute
nuts.usedlist = direct.usedlist
nuts.uses_font = direct.uses_font
nuts.vpack = direct.vpack
-nuts.writable_spec = direct.writable_spec
nuts.write = direct.write
nuts.mlist_to_hlist = direct.mlist_to_hlist
nuts.has_dimensions = direct.has_dimensions
nuts.start_of_par = direct.start_of_par
+nuts.migrate = direct.migrate
if not nuts.mlist_to_hlist then
@@ -295,6 +295,7 @@ nuts.getdepth = direct.getdepth
nuts.setdepth = direct.setdepth
nuts.getshift = direct.getshift
nuts.setshift = direct.setshift
+nuts.gettotal = direct.gettotal
-- lmtx compatibility
@@ -307,6 +308,11 @@ nuts.setglyphdata = direct.setglyphdata or function(n,d) set_attribute(n,0,d
nuts.getruledata = direct.getglyphdata and getdata or function(n) return getfield(n,"transform") end
nuts.setruledata = direct.setglyphdata and setdata or function(n,d) return setfield(n,"transform",d) end
+-- maybe some day: [g|s]etglyphoptions and then use attribute for mkiv / generic but not now
+
+nuts.getoptions = direct.getoptions or function() return 0 end
+nuts.setoptions = direct.setoptions or function() end
+
-- so far
nuts.getnucleus = direct.getnucleus
@@ -315,6 +321,10 @@ nuts.getsup = direct.getsup
nuts.setsup = direct.setsup
nuts.getsub = direct.getsub
nuts.setsub = direct.setsub
+nuts.getsuppre = direct.getsuppre
+nuts.setsuppre = direct.setsuppre
+nuts.getsubpre = direct.getsubpre
+nuts.setsubpre = direct.setsubpre
nuts.getchar = direct.getchar
nuts.setchar = direct.setchar
@@ -326,6 +336,8 @@ nuts.setfam = direct.setfam
nuts.getboth = direct.getboth
nuts.setboth = direct.setboth
nuts.setlink = direct.setlink
+nuts.exchange = direct.exchange
+nuts.reverse = direct.reverse
nuts.setsplit = direct.setsplit
nuts.getlist = direct.getlist -- only hlist and vlist !
@@ -388,7 +400,7 @@ local d_setlink = direct.setlink
local d_setboth = direct.setboth
local d_getboth = direct.getboth
-local remove = CONTEXTLMTXMODE > 0 and d_remove_node or function(head,current,free_too)
+local remove = function(head,current,free_too)
if current then
local h, c = d_remove_node(head,current)
if free_too then
@@ -406,9 +418,9 @@ end
if not nuts.start_of_par then
- local localparcodes = nodes.localparcodes
- local hmodepar_code = localparcodes.vmode_par
- local vmodepar_code = localparcodes.hmode_par
+ local parcodes = nodes.parcodes
+ local hmodepar_code = parcodes.vmode_par
+ local vmodepar_code = parcodes.hmode_par
local getsubtype = nuts.getsubtype
@@ -421,6 +433,31 @@ end
-- for now
+if not nuts.exchange then
+
+ local d_getprev = direct.getprev
+ local d_getnext = direct.getnext
+ local d_setlink = direct.setlink
+
+ function nuts.exchange(head,first,second)
+ if first then
+ if not second then
+ second = d_getnext(first)
+ end
+ if second then
+ d_setlink(d_getprev(first),second,first,d_getnext(second))
+ if first == head then
+ return second
+ end
+ end
+ end
+ return head
+ end
+
+end
+
+-- for now
+
if not nuts.getpre then
local d_getdisc = direct.getdisc
@@ -436,6 +473,17 @@ if not nuts.getpre then
end
+if not nuts.gettotal then
+
+ local d_getheight = direct.getheight
+ local d_getdepth = direct.getdepth
+
+ function nuts.gettotal(n)
+ return (d_getheight(n) or 0) + (d_getdepth(n) or 0)
+ end
+
+end
+
-- alias
nuts.getsurround = nuts.getkern
@@ -768,8 +816,6 @@ nuts.tracedslide = tracedslide
nuts.untracedslide = untracedslide
nuts.nestedtracedslide = nestedtracedslide
--- nuts.slide = tracedslide
-
-- this might move
local propertydata = direct.get_properties_table(true)
@@ -833,6 +879,7 @@ local getstate = direct.getstate
local setstate = direct.setstate
if not setstate or not getstate then
+
setstate = function(n,v)
local p = propertydata[n]
if p then
@@ -841,6 +888,7 @@ if not setstate or not getstate then
propertydata[n] = { state = v }
end
end
+
getstate = function(n,v)
local p = propertydata[n]
if p then
@@ -853,11 +901,18 @@ if not setstate or not getstate then
return nil
end
end
- nuts.setstate = setstate
- nuts.getstate = getstate
end
-nuts.isdone = function(n,k)
+nuts.setstate = setstate
+nuts.getstate = getstate
+
+local getscript = direct.getscript or function(n,v) end -- elsewhere
+local setscript = direct.setscript or function(n,v) end -- elsewhere
+
+nuts.setscript = getscript
+nuts.getscript = setscript
+
+function nuts.isdone(n,k)
local p = propertydata[n]
if not p then
propertydata[n] = { [k] = true }
@@ -871,9 +926,6 @@ nuts.isdone = function(n,k)
return v
end
--- nodes.setprop = nodes.setproperty
--- nodes.getprop = nodes.getproperty
-
function nuts.copy_properties(source,target,what)
local newprops = propertydata[source]
if not newprops then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/node-pag.lua
deleted file mode 100644
index 9b8202042c5..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/node-pag.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-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"
-}
-
--- this callback might disappear and come back in the same way
--- as par builders
-
-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)
- starttiming(pagebuilders)
- local _, done = actions(head,groupcode,size,packtype,maxdepth,direction)
- stoptiming(pagebuilders)
- return (done and head) or true
--- return vpack(head)
-end
-
---~ callbacks.register('pre_output_filter', processor, "preparing output box")
-
---~ statistics.register("output preparation time", function()
---~ return statistics.elapsedseconds(pagebuilders)
---~ end)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-par.lua b/Master/texmf-dist/tex/context/base/mkiv/node-par.lua
index d89edf6f4ca..5a0f0d2e94f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-par.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-par.lua
@@ -25,7 +25,7 @@ end
callbacks.register("insert_local_par",everypar,"after paragraph start")
local actions = sequencers.new {
- name = "newgraf",
+ name = "paragraph",
arguments = "mode,indented",
returnvalues = "indented",
results = "indented",
@@ -35,7 +35,7 @@ sequencers.appendgroup(actions,"before") -- user
sequencers.appendgroup(actions,"system") -- private
sequencers.appendgroup(actions,"after" ) -- user
-local function newgraf(mode,indented)
+local function paragraph(mode,indented)
local runner = actions.runner
if runner then
starttiming(builders)
@@ -45,4 +45,4 @@ local function newgraf(mode,indented)
return indented
end
-callbacks.register("new_graf",newgraf,"before paragraph start")
+callbacks.register("new_graf",paragraph,"before paragraph start")
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua
index ac43a84a368..098ed50c28e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ref.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['node-ref'] = {
version = 1.001,
+ optimize = true,
comment = "companion to node-ref.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -93,10 +94,11 @@ local glue_code = nodecodes.glue
local glyph_code = nodecodes.glyph
local rule_code = nodecodes.rule
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local leftskip_code = gluecodes.leftskip
local rightskip_code = gluecodes.rightskip
+local parfillleftskip_code = gluecodes.parfillleftskip
local parfillskip_code = gluecodes.parfillskip
----- linelist_code = listcodes.line
@@ -322,7 +324,8 @@ local function inject_list(id,current,reference,make,stack,pardir,txtdir)
local last = find_node_tail(first)
if getid(last) == glue_code and getsubtype(last) == rightskip_code then
local prev = getprev(last)
- moveright = getid(first) == glue_code and getsubtype(first) == leftskip_code
+ -- this can be more clever
+ moveright = getid(first) == glue_code and (getsubtype(first) == leftskip_code or getsubtype(first) == parfillleftskip_code)
if prev and getid(prev) == glue_code and getsubtype(prev) == parfillskip_code then
width = dimensions(current,first,getprev(prev)) -- maybe not current as we already take care of it
else
@@ -414,16 +417,29 @@ local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,tx
if r then
done[r] = done[r] - 1
end
- elseif id == glue_code and getsubtype(current) == leftskip_code then -- any glue at the left?
- --
elseif id == dir_code then
local direction, pop = getdirection(current)
txtdir = not pop and direction -- we might need a stack
- elseif id == localpar_code then
+ elseif id == par_code then
if start_of_par(current) then
pardir = getdirection(current)
end
+ elseif id == glue_code and getsubtype(current) == leftskip_code then -- any glue at the left?
+ --
else
+ if id == glue_code then
+ local subtype = getsubtype(current)
+ -- todo in lmtx: lefthangskip and righthangskip
+ if subtype == leftskip_code or subtype == parfillleftskip_code then
+ goto NEXT
+ elseif subtype == rightskip_code or subtype == parfillskip_code then
+ if reference and (done[reference] or 0) == 0 then
+ head, current = inject_range(head,first,last,reference,make,stack,parent,pardir,firstdir)
+ reference, first, last, firstdir = nil, nil, nil, nil
+ end
+ goto NEXT
+ end
+ end
local r = getattr(current,attribute)
if not r then
-- just go on, can be kerns
@@ -431,7 +447,7 @@ local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,tx
reference, first, last, firstdir = r, current, current, txtdir
elseif r == reference then
last = current
- elseif (done[reference] or 0) == 0 then -- or id == glue_code and getsubtype(current) == right_skip_code
+ elseif (done[reference] or 0) == 0 then -- or (id == glue_code and getsubtype(current) == right_skip_code) then
if not skip or r > skip then -- maybe no > test
head, current = inject_range(head,first,last,reference,make,stack,parent,pardir,firstdir)
reference, first, last, firstdir = nil, nil, nil, nil
@@ -440,6 +456,7 @@ local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,tx
reference, first, last, firstdir = r, current, current, txtdir
end
end
+ ::NEXT::
current = getnext(current)
end
if reference and (done[reference] or 0) == 0 then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-res.lua b/Master/texmf-dist/tex/context/base/mkiv/node-res.lua
index 1832a0d1e1b..478a46906e0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-res.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-res.lua
@@ -26,7 +26,6 @@ local gluecodes = nodes.gluecodes
local kerncodes = nodes.kerncodes
local rulecodes = nodes.rulecodes
local nodecodes = nodes.nodecodes
-local leadercodes = nodes.leadercodes
local boundarycodes = nodes.boundarycodes
local usercodes = nodes.usercodes
@@ -36,6 +35,7 @@ local glyph_code = nodecodes.glyph
local rule_code = nodecodes.rule
local kern_code = nodecodes.kern
local glue_code = nodecodes.glue
+local gluespec_code = nodecodes.gluespec
local whatsit_code = nodecodes.whatsit
local currentfont = font.current
@@ -163,6 +163,7 @@ local fontkern = register_nut(new_nut(kern_code,kerncodes.fontkern))
local italickern = register_nut(new_nut(kern_code,kerncodes.italiccorrection))
local penalty = register_nut(new_nut(nodecodes.penalty))
local glue = register_nut(new_nut(glue_code))
+local gluespec = register_nut(new_nut(gluespec_code))
local glyph = register_nut(new_nut(glyph_code,0))
local textdir = register_nut(new_nut(nodecodes.dir))
@@ -198,7 +199,7 @@ local correctionskip = register_nut(new_nut(glue_code,gluecodes.correctionski
local temp = register_nut(new_nut(nodecodes.temp,0))
local noad = register_nut(new_nut(nodecodes.noad))
-local delimiter = register_nut(new_nut(nodecodes.delim))
+local delimiter = register_nut(new_nut(nodecodes.delimiter))
local fence = register_nut(new_nut(nodecodes.fence))
local submlist = register_nut(new_nut(nodecodes.submlist))
local accent = register_nut(new_nut(nodecodes.accent))
@@ -212,7 +213,7 @@ local choice = register_nut(new_nut(nodecodes.choice))
local boundary = register_nut(new_nut(nodecodes.boundary,boundarycodes.user))
local wordboundary = register_nut(new_nut(nodecodes.boundary,boundarycodes.word))
-local cleader = register_nut(copy_nut(glue)) setsubtype(cleader,leadercodes.cleaders) setglue(cleader,0,65536,0,2,0)
+local cleader = register_nut(copy_nut(glue)) setsubtype(cleader,gluecodes.cleaders) setglue(cleader,0,65536,0,2,0)
-- the dir field needs to be set otherwise crash:
@@ -283,6 +284,14 @@ function nutpool.italickern(k)
return n
end
+function nutpool.gluespec(width,stretch,shrink,stretch_order,shrink_order)
+ local n = copy_nut(gluespec)
+ if width or stretch or shrink or stretch_order or shrink_order then
+ setglue(n,width,stretch,shrink,stretch_order,shrink_order)
+ end
+ return n
+end
+
local function someskip(skip,width,stretch,shrink,stretch_order,shrink_order)
-- maybe setglue
local n = copy_nut(skip)
@@ -574,12 +583,17 @@ local usage = CONTEXTLMTXMODE > 0 and node.inuse or function()
return t
end
+local stock = CONTEXTLMTXMODE > 0 and node.instock or { }
+
nutpool .cleanup = cleanup
nodepool.cleanup = cleanup
nutpool .usage = usage
nodepool.usage = usage
+nutpool .stock = stock
+nodepool.stock = stock
+
-- end
statistics.register("cleaned up reserved nodes", function()
@@ -612,10 +626,10 @@ do
return v
end)
- traversers.node = nodes.traverse (glyph)
- traversers.char = nodes.traverse_char (glyph)
- if nuts.traverse_glyph then traversers.glyph = nodes.traverse_glyph(glyph) end
- if nuts.traverse_list then traversers.list = nodes.traverse_list (glyph) end
+ traversers.node = nodes.traverse (glyph)
+ traversers.char = nodes.traverse_char (glyph)
+ if nodes.traverse_glyph then traversers.glyph = nodes.traverse_glyph(glyph) end
+ if nodes.traverse_list then traversers.list = nodes.traverse_list (glyph) end
nodes.traversers = traversers
@@ -632,10 +646,11 @@ do
return v
end)
- traversers.node = nuts.traverse (glyph)
- traversers.char = nuts.traverse_char (glyph)
- if nuts.traverse_glyph then traversers.glyph = nuts.traverse_glyph(glyph) end
- if nuts.traverse_list then traversers.list = nuts.traverse_list (glyph) end
+ traversers.node = nuts.traverse (glyph)
+ traversers.char = nuts.traverse_char (glyph)
+ if nuts.traverse_glyph then traversers.glyph = nuts.traverse_glyph (glyph) end
+ if nuts.traverse_list then traversers.list = nuts.traverse_list (glyph) end
+ if nuts.traverse_content then traversers.content = nuts.traverse_content(glyph) end
nuts.traversers = traversers
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua
index b904e54d616..f60fb2406a7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-rul.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['node-rul'] = {
version = 1.001,
+ optimize = true,
comment = "companion to node-rul.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -74,7 +75,7 @@ local gluecodes = nodes.gluecodes
local listcodes = nodes.listcodes
local glyph_code = nodecodes.glyph
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local dir_code = nodecodes.dir
local glue_code = nodecodes.glue
local hlist_code = nodecodes.hlist
@@ -587,7 +588,7 @@ function linefillers.handler(head)
else
break
end
- elseif id == localpar_code or id == dir_code then
+ elseif id == par_code or id == dir_code then
-- go on
elseif id == hlist_code then
if getsubtype(head) == indentlist_code then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv
index 7f2093bf2c3..660c0d4e617 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-rul.mkiv
@@ -162,14 +162,14 @@
\expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname
\advance\c_node_rules_index\plusone
\clf_enablerules % will be relaxed
- \attribute\ruledattribute\numexpr
+ \c_attr_ruled\numexpr
\plusthousand*\c_node_rules_index
% optimizing this one needs testing
+\csname\??barattribute#1\ifcsname\??bar#1:\number\c_node_rules_index\s!parent\endcsname:\number\c_node_rules_index\fi\endcsname
\relax}
\unexpanded\def\resetbar
- {\attribute\ruledattribute\attributeunsetvalue}
+ {\c_attr_ruled\attributeunsetvalue}
\unexpanded\def\nobar
{\groupedcommand
@@ -198,7 +198,7 @@
\unexpanded\def\pushbar[#1]%
{\global\advance\c_node_rules_nesting\plusone
- \expandafter\edef\csname\??barstack\number\c_node_rules_nesting\endcsname{\attribute\ruledattribute\the\attribute\ruledattribute}%
+ \expandafter\edef\csname\??barstack\number\c_node_rules_nesting\endcsname{\c_attr_ruled\the\c_attr_ruled}%
\node_rules_set{#1}}
\unexpanded\def\popbar
@@ -221,6 +221,8 @@
% \definebar[touchbar] [\c!method=0,\c!dy=-0.4,\c!offset=-0.0]
% \definebar[touchbars] [touchbar] [\c!continue=\v!yes]
+\pushoverloadmode
+
\let\normalmathoverbar \overbar
\let\normalmathunderbar \underbar
\let\normalmathoverstrike \overstrike
@@ -230,6 +232,8 @@
\definebar[\v!underbar] [\c!method=1,\c!dy=-0.4,\c!offset=-0.3,\c!continue=\v!yes]
\definebar[\v!overstrike][\c!method=0,\c!dy=0.4,\c!offset=0.5,\c!continue=\v!yes]
+\popoverloadmode
+
\definebar
[\v!understrike]
[\c!method=0,
@@ -405,7 +409,7 @@
\expandafter\let\expandafter\c_node_shifts_index\csname\??shiftindex#1\endcsname
\advance\c_node_shifts_index\plusone
\clf_enableshifts % will be relaxed
- \attribute\shiftedattribute\numexpr
+ \c_attr_shifted\numexpr
\plusthousand*\c_node_shifts_index
+\csname\??shiftattribute#1\ifcsname\??shift#1:\number\c_node_shifts_index\s!parent\endcsname:\number\c_node_shifts_index\fi\endcsname
\relax
@@ -525,7 +529,7 @@
\expandafter\let\expandafter\c_node_linefiller_index\csname\??linefillerindex#1\endcsname
\advance\c_node_linefiller_index\plusone
\clf_enablelinefillers
- \attribute\linefillerattribute\numexpr
+ \c_attr_linefiller\numexpr
\plusthousand*\c_node_linefiller_index
+\csname\??linefillerattribute#1\ifcsname\??linefiller#1:\number\c_node_linefiller_index\s!parent\endcsname:\number\c_node_linefiller_index\fi\endcsname
\relax}
@@ -601,7 +605,7 @@
\node_linefiller_set{#3}% already sets the attribute
#1%
attr \backgroundattribute \plusone
- % attr \linefillerattribute \the\attribute\linefillerattribute
+ % attr \linefillerattribute \the\c_attr_linefiller
{\box\nextbox}%
\egroup}%
#2}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua b/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
index 055f5e20def..0ec1ba387c9 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-scn.lua
@@ -24,7 +24,6 @@ local setlist = nuts.setlist
local end_of_math = nuts.end_of_math
local nodecodes = nodes.nodecodes
-local leadercodes = nodes.leadercodes
local gluecodes = nodes.gluecodes
local kerncodes = nodes.kerncodes
@@ -43,8 +42,7 @@ local vlist_code = nodecodes.vlist
local userskip_code = gluecodes.userskip
local spaceskip_code = gluecodes.spaceskip
local xspaceskip_code = gluecodes.xspaceskip
-
-local leaders_code = leadercodes.leaders
+local leaders_code = gluecodes.leaders
local fontkern_code = kerncodes.fontkern
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua
index 6fc2b7ea4cf..25a6dd6c39d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua
@@ -19,7 +19,6 @@ local context = context
local nodes = nodes
local node = node
-local traverse = nodes.traverse
local is_node = nodes.is_node
local nodecodes = nodes.nodecodes
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua b/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua
index 306e38f6a58..58dc944951a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-shp.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['node-shp'] = {
version = 1.001,
+ optimize = true,
comment = "companion to node-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -66,59 +67,61 @@ local removables = {
-- (like marks) is not saving much and removing empty boxes is even
-- dangerous because we can rely on dimensions (e.g. in references).
-local wipedisc = false -- we can use them in the export ... can be option
-
-local function cleanup_redundant(head) -- better name is: flatten_page
- local start = head
- while start do
- local id = getid(start)
- if id == disc_code then
- if getsubtype(start) == discretionarydisc_code then
- local _, _, replace, _, _ tail = getdisc(start,true)
- if replace then
- local prev, next = getboth(start)
- setfield(start,"replace",nil)
- if start == head then
- remove_node(head,start,true)
- head = replace
- else
- remove_node(head,start,true)
- end
- if next then
- setlink(tail,next)
- end
- if prev then
- setlink(prev,replace)
- else
- setprev(replace) -- to be sure
- end
- start = next
- elseif wipedisc then
- -- pre and post can have values
- head, start = remove_node(head,start,true)
- else
- start = getnext(start)
- end
- else
- start = getnext(start)
- end
- elseif id == hlist_code or id == vlist_code then
- local sl = getlist(start)
- if sl then
- local rl = cleanup_redundant(sl)
- if rl ~= sl then
- setlist(start,rl)
- end
- end
- start = getnext(start)
- else
- start = getnext(start)
- end
- end
- return head
-end
-
-handlers.cleanuppage = cleanup_redundant -- nut
+-- local wipedisc = false -- we can use them in the export ... can be option
+--
+-- local function cleanup_redundant(head) -- better name is: flatten_page
+-- local start = head
+-- while start do
+-- local id = getid(start)
+-- if id == disc_code then
+-- if getsubtype(start) == discretionarydisc_code then
+-- local _, _, replace, _, _ tail = getdisc(start,true)
+-- if replace then
+-- local prev, next = getboth(start)
+-- setfield(start,"replace",nil)
+-- if start == head then
+-- remove_node(head,start,true)
+-- head = replace
+-- else
+-- remove_node(head,start,true)
+-- end
+-- if next then
+-- setlink(tail,next)
+-- end
+-- if prev then
+-- setlink(prev,replace)
+-- else
+-- setprev(replace) -- to be sure
+-- end
+-- start = next
+-- elseif wipedisc then
+-- -- pre and post can have values
+-- head, start = remove_node(head,start,true)
+-- else
+-- start = getnext(start)
+-- end
+-- else
+-- start = getnext(start)
+-- end
+-- elseif id == hlist_code or id == vlist_code then
+-- local sl = getlist(start)
+-- if sl then
+-- local rl = cleanup_redundant(sl)
+-- if rl ~= sl then
+-- setlist(start,rl)
+-- end
+-- end
+-- start = getnext(start)
+-- else
+-- start = getnext(start)
+-- end
+-- end
+-- return head
+-- end
+--
+-- handlers.cleanuppage = cleanup_redundant -- nut
+
+handlers.cleanuppage = nuts.flatten_discretionaries
local function cleanup_flushed(head) -- rough
local start = head
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua
index 68a05234e90..d9c653abbb0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-syn.lua
@@ -170,15 +170,11 @@ local new_kern = nodepool.kern
local getdimensions = nuts.dimensions
local getrangedimensions = nuts.rangedimensions
-local get_synctex_fields = nuts.get_synctex_fields
------ set_synctex_fields = nuts.set_synctex_fields
-local set_synctex_line = tex.set_synctex_line
-local set_synctex_tag = tex.set_synctex_tag
-local force_synctex_tag = tex.force_synctex_tag
-local force_synctex_line = tex.force_synctex_line
------ get_synctex_tag = tex.get_synctex_tag
-local get_synctex_line = tex.get_synctex_line
-local set_synctex_mode = tex.set_synctex_mode
+local getsynctexfields = nuts.getsynctexfields or nuts.get_synctex_fields
+local forcesynctextag = tex.forcesynctextag or tex.force_synctex_tag
+local forcesynctexline = tex.forcesynctexline or tex.force_synctex_line
+local getsynctexline = tex.getsynctexline or tex.get_synctex_line
+local setsynctexmode = tex.setsynctexmode or tex.set_synctex_mode
local foundintree = resolvers.foundintree
@@ -212,7 +208,7 @@ local paused = 0
local used = false
local never = false
--- get rid of overhead
+-- get rid of overhead in mkiv
if tex.set_synctex_no_files then
tex.set_synctex_no_files(1)
@@ -261,18 +257,18 @@ function synctex.blockfilename(name)
end
function synctex.setfilename(name,line)
- if paused == 0 and force_synctex_tag and name then
- force_synctex_tag(sttags[name])
+ if paused == 0 and name then
+ forcesynctextag(sttags[name])
if line then
- force_synctex_line(line)
+ forcesynctexline(line)
end
end
end
function synctex.resetfilename()
- if paused == 0 and force_synctex_tag then
- force_synctex_tag(0)
- force_synctex_line(0)
+ if paused == 0 then
+ forcesynctextag(0)
+ forcesynctexline(0)
end
end
@@ -284,10 +280,10 @@ do
function synctex.pushline()
nesting = nesting + 1
if nesting == 1 then
- local l = get_synctex_line()
+ local l = getsynctexline()
ignored = l and l > 0
if not ignored then
- force_synctex_line(texget("inputlineno"))
+ forcesynctexline(texget("inputlineno"))
end
end
end
@@ -295,7 +291,7 @@ do
function synctex.popline()
if nesting == 1 then
if not ignored then
- force_synctex_line()
+ forcesynctexline()
ignored = false
end
end
@@ -469,7 +465,11 @@ local x_hlist do
local doaction = doaction_1
x_hlist = function(head,current,t,l,w,h,d)
- return insert_before(head,current,new_latelua(function() doaction(t,l,w,h,d) end))
+ if filehandle then
+ return insert_before(head,current,new_latelua(function() doaction(t,l,w,h,d) end))
+ else
+ return head
+ end
end
directives.register("system.synctex.compression", function(v)
@@ -520,7 +520,7 @@ local function collect_min(head)
local line = 0
while true do
if id == glyph_code then
- local tc, lc = get_synctex_fields(current)
+ local tc, lc = getsynctexfields(current)
if tc and tc > 0 then
tag = tc
line = lc
@@ -587,7 +587,7 @@ local function collect_max(head,parent)
local line = 0
while true do
if id == glyph_code then
- local tc, lc = get_synctex_fields(current)
+ local tc, lc = getsynctexfields(current)
if tc and tc > 0 then
if tag > 0 and (tag ~= tc or line ~= lc) then
head = inject(parent,head,first,last,tag,line)
@@ -615,7 +615,7 @@ local function collect_max(head,parent)
end
elseif id == glue_code then
if tag > 0 then
- local tc, lc = get_synctex_fields(current)
+ local tc, lc = getsynctexfields(current)
if tc and tc > 0 then
if tag ~= tc or line ~= lc then
head = inject(parent,head,first,last,tag,line)
@@ -730,7 +730,7 @@ end
function synctex.enable()
if not never and not enabled then
enabled = true
- set_synctex_mode(3) -- we want details
+ setsynctexmode(3) -- we want details
if not used then
nodes.tasks.enableaction("shipouts","luatex.synctex.collect")
report_system("synctex functionality is enabled, expect 5-10 pct runtime overhead!")
@@ -744,7 +744,7 @@ end
function synctex.disable()
if enabled then
- set_synctex_mode(0)
+ setsynctexmode(0)
report_system("synctex functionality is disabled!")
enabled = false
for i=1,#disablers do
@@ -768,13 +768,13 @@ local filename = nil
function synctex.pause()
paused = paused + 1
if enabled and paused == 1 then
- set_synctex_mode(0)
+ setsynctexmode(0)
end
end
function synctex.resume()
if enabled and paused == 1 then
- set_synctex_mode(3)
+ setsynctexmode(3)
end
paused = paused - 1
end
@@ -849,12 +849,17 @@ implement {
actions = synctex.resume,
}
-interfaces.implement {
+implement {
name = "synctexpushline",
actions = synctex.pushline,
}
-interfaces.implement {
+
+implement {
name = "synctexpopline",
actions = synctex.popline,
}
+implement {
+ name = "synctexdisable",
+ actions = synctex.disable,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-tex.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tex.lua
index 5857fd2e65b..cda6ff132d6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-tex.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-tex.lua
@@ -16,7 +16,6 @@ local hyphenate = lang.hyphenate
local hyphenating = nuts.hyphenating
local ligaturing = nuts.ligaturing
local kerning = nuts.kerning
-local cleanup = nuts.flush_components
function kernel.hyphenation(head)
return (hyphenate(head)) -- nodes !
@@ -34,14 +33,6 @@ function kernel.kerning(head)
return (kerning(head))
end
-if cleanup then
-
- function kernel.cleanup(head)
- return (cleanup(head))
- end
-
-end
-
callbacks.register('hyphenate' , false, "normal hyphenation routine, called elsewhere")
callbacks.register('ligaturing', false, "normal ligaturing routine, called elsewhere")
callbacks.register('kerning' , false, "normal kerning routine, called elsewhere")
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua b/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua
index c7556aba6d0..83c072c19b0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-tra.lua
@@ -77,7 +77,7 @@ local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local rule_code = nodecodes.rule
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local whatsit_code = nodecodes.whatsit
local dimenfactors = number.dimenfactors
@@ -115,19 +115,6 @@ function nodes.handlers.checkglyphs(head,message)
return false
end
-function nodes.handlers.checkforleaks(sparse)
- local l = { }
- local q = used_nodes()
- for p, id in nextnode, q do
- local s = table.serialize(nodes.astable(p,sparse),nodecodes[id])
- l[s] = (l[s] or 0) + 1
- end
- flush_list(q)
- for k, v in next, l do
- report_nodes("%s * %s",v,k)
- end
-end
-
local fontcharacters -- = fonts.hashes.descriptions
local function tosequence(start,stop,compact)
@@ -167,7 +154,7 @@ local function tosequence(start,stop,compact)
elseif id == dir_code then
local d, p = getdirection(start)
n = n + 1 ; t[n] = "[<" .. (p and "-" or "+") .. d .. ">]" -- todo l2r etc
- elseif id == localpar_code and start_of_par(current) then
+ elseif id == par_code and start_of_par(current) then
n = n + 1 ; t[n] = "[<" .. getdirection(start) .. ">]" -- todo l2r etc
elseif compact then
n = n + 1 ; t[n] = "[]"
@@ -315,14 +302,6 @@ local function showsimplelist(h,depth,n)
end
end
--- \startluacode
--- callbacks.register('buildpage_filter',function() nodes.show_simple_list(tex.lists.contrib_head) end)
--- \stopluacode
--- \vbox{b\footnote{n}a}
--- \startluacode
--- callbacks.register('buildpage_filter',nil)
--- \stopluacode
-
nodes.showsimplelist = function(h,depth) showsimplelist(h,depth,0) end
local function listtoutf(h,joiner,textonly,last,nodisc)
@@ -503,8 +482,8 @@ function number.tobasepoints (n,fmt) return numbertodimen(n,"bp",fmt) end
function number.topicas (n,fmt) return numbertodimen(n "pc",fmt) end
function number.todidots (n,fmt) return numbertodimen(n,"dd",fmt) end
function number.tociceros (n,fmt) return numbertodimen(n,"cc",fmt) end
-function number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end
-function number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end
+-------- number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end
+-------- number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end
function nodes.topoints (n,fmt) return nodetodimen(n,"pt",fmt) end
function nodes.toinches (n,fmt) return nodetodimen(n,"in",fmt) end
@@ -516,8 +495,8 @@ function nodes.tobasepoints (n,fmt) return nodetodimen(n,"bp",fmt) end
function nodes.topicas (n,fmt) return nodetodimen(n "pc",fmt) end
function nodes.todidots (n,fmt) return nodetodimen(n,"dd",fmt) end
function nodes.tociceros (n,fmt) return nodetodimen(n,"cc",fmt) end
-function nodes.tonewdidots (n,fmt) return nodetodimen(n,"nd",fmt) end
-function nodes.tonewciceros (n,fmt) return nodetodimen(n,"nc",fmt) end
+-------- nodes.tonewdidots (n,fmt) return nodetodimen(n,"nd",fmt) end
+-------- nodes.tonewciceros (n,fmt) return nodetodimen(n,"nc",fmt) end
-- stop redefinition
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua b/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua
index 021bfefc263..adf0d18c005 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/node-typ.lua
@@ -8,33 +8,36 @@ if not modules then modules = { } end modules ['node-typ'] = {
-- code has been moved to blob-ini.lua
-local typesetters = nodes.typesetters or { }
-nodes.typesetters = typesetters
+local typesetters = nodes.typesetters or { }
+nodes.typesetters = typesetters
-local nuts = nodes.nuts
-local tonode = nuts.tonode
-local tonut = nuts.tonut
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+local tonut = nuts.tonut
-local setlink = nuts.setlink
-local setchar = nuts.setchar
-local setattrlist = nuts.setattrlist
+local setlink = nuts.setlink
+local setchar = nuts.setchar
+local setattrlist = nuts.setattrlist
-local getfont = nuts.getfont
-local getattrlist = nuts.getattrlist
+local getfont = nuts.getfont
+local getattrlist = nuts.getattrlist
-local hpack_node_list = nuts.hpack
-local vpack_node_list = nuts.vpack
-local full_hpack_list = nuts.fullhpack
+local hpack_node_list = nuts.hpack
+local vpack_node_list = nuts.vpack
+local full_hpack_list = nuts.fullhpack
-local nodepool = nuts.pool
-local new_glyph = nodepool.glyph
-local new_glue = nodepool.glue
+local nodepool = nuts.pool
+local new_glyph = nodepool.glyph
+local new_glue = nodepool.glue
-local utfvalues = utf.values
+local utfvalues = utf.values
-local currentfont = font.current -- mabe nicer is fonts .current
-local currentattr = node.current_attr -- mabe nicer is attributes.current
-local fontparameters = fonts.hashes.parameters
+local currentfont = font.current -- mabe nicer is fonts .current
+local currentattributes = node.current_attributes -- mabe nicer is attributes.current
+
+local fontparameters = fonts.hashes.parameters
+
+if not currentattributes then currentattributes = node.current_attr end -- CONTEXTLMTXMODE == 0
-- when attrid == true then take from glyph or current else use the given value
@@ -51,7 +54,7 @@ local function tonodes(str,fontid,spacing,templateglyph,attrid) -- quick and dir
if templateglyph then
attrid = false -- we copy with the glyph
else
- attrid = currentattr()
+ attrid = currentattributes()
end
end
local fp = fontparameters[fontid]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv
index b67d6f14b28..99323b43564 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-bar.mkiv
@@ -40,7 +40,7 @@
\installcorenamespace{positionbar}
-\installsimplecommandhandler \??positionbar {positionbar}
+\installsimplecommandhandler \??positionbar {positionbar} \??positionbar
\setuppositionbar
[\c!min=1,
@@ -63,7 +63,8 @@
\unexpanded\def\verticalpositionbar[#1]%
{\vbox to \vsize
- {\setuppositionbar[#1]%
+ {\hsize\positionbarparameter\c!width
+ \setuppositionbar[#1]%
\usepositionbarstyleandcolor\c!style\c!color
\vskip\zeropoint\s!plus \positionbarparameter\c!n \s!fill
\vskip\zeropoint\s!plus-\positionbarparameter\c!min\s!fill
@@ -75,17 +76,18 @@
{\hpack to \hsize
{\setuppositionbar[#1]%
\usepositionbarstyleandcolor\c!style\c!color
- \leaders\vrule\hskip\zeropoint\s!plus\numexpr\positionbarparameter\c!n-\positionbarparameter\c!min+\plusone\relax\s!fill
\vrule\s!width\zeropoint\s!height\positionbarparameter\c!height\s!depth\positionbarparameter\c!depth
+ \leaders\vrule\hskip\zeropoint\s!plus\numexpr\positionbarparameter\c!n-\positionbarparameter\c!min+\plusone\relax\s!fill
\hskip\zeropoint\s!plus \positionbarparameter\c!max\s!fill
\hskip\zeropoint\s!plus-\positionbarparameter\c!n \s!fill}}
\unexpanded\def\verticalgrowingbar[#1]%
{\vpack to \vsize
- {\setuppositionbar[#1]%
+ {\hsize\positionbarparameter\c!width
+ \setuppositionbar[#1]%
\usepositionbarstyleandcolor\c!style\c!color
- \leaders\hrule\vskip\zeropoint\s!plus\numexpr\positionbarparameter\c!n-\positionbarparameter\c!min+\plusone\relax\s!fill
\hrule\s!width\positionbarparameter\c!width\s!height\zeropoint\s!depth\zeropoint
+ \leaders\hrule\vskip\zeropoint\s!plus\numexpr\positionbarparameter\c!n-\positionbarparameter\c!min+\plusone\relax\s!fill
\vskip\zeropoint\s!plus \positionbarparameter\c!max\s!fill
\vskip\zeropoint\s!plus-\positionbarparameter\c!n \s!fill}}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv
index 422f090f0b9..4c9a4c17d5c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-box.mkiv
@@ -337,7 +337,7 @@
\pack_boxes_collector_check_box{#1}%
\ifconditional\c_pack_boxes_collector_valid_box
\letcollectorparameter\c!voffset\zeropoint
- \letcollectorparameter\h!voffset\zeropoint
+ \letcollectorparameter\c!hoffset\zeropoint
\ifsecondargument
\setupcurrentcollector[#2]%
\fi
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv
index fe622509a10..17675fa7ab6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-com.mkiv
@@ -77,11 +77,15 @@
\to \everyinsidefloat
\newcount\c_pack_combinations_nesting % local
+
\newcount\c_pack_combinations_x % global
\newcount\c_pack_combinations_y % global
\newcount\c_pack_combinations_max % global
-\newbox \b_pack_combinations_captions % global
-\newbox \b_pack_combinations_temp % global
+
+\newdimen\d_pack_combinations_ht % global
+
+\newbox \b_pack_combinations_captions % global % can go
+\newbox \b_pack_combinations_temp % global % can go
\newbox \b_pack_combinations_content % local
\newbox \b_pack_combinations_caption % local
@@ -95,6 +99,9 @@
\newcount\c_pack_combinations_x_saved
\newcount\c_pack_combinations_y_saved
\newcount\c_pack_combinations_max_saved
+
+\newdimen\d_pack_combinations_ht_saved
+
\newbox \b_pack_combinations_captions_saved
\newbox \b_pack_combinations_temp_saved
\newbox \b_pack_combinations_content_saved
@@ -108,6 +115,7 @@
\c_pack_combinations_x_saved \c_pack_combinations_x
\c_pack_combinations_y_saved \c_pack_combinations_y
\c_pack_combinations_max_saved\c_pack_combinations_max
+ \d_pack_combinations_ht_saved \d_pack_combinations_ht
\setbox\b_pack_combinations_captions_saved\box\b_pack_combinations_captions
\setbox\b_pack_combinations_temp_saved \box\b_pack_combinations_temp
\setbox\b_pack_combinations_content_saved \box\b_pack_combinations_content
@@ -121,6 +129,7 @@
\global\c_pack_combinations_x \c_pack_combinations_x_saved
\global\c_pack_combinations_y \c_pack_combinations_y_saved
\global\c_pack_combinations_max\c_pack_combinations_max_saved
+ \global\d_pack_combinations_ht \d_pack_combinations_ht_saved
\global\setbox\b_pack_combinations_captions\box\b_pack_combinations_captions_saved
\global\setbox\b_pack_combinations_temp \box\b_pack_combinations_temp_saved
\setbox\b_pack_combinations_content \box\b_pack_combinations_content_saved
@@ -360,7 +369,7 @@
\to \everydefinecombination
\def\pack_combinations_pickup
- {\dostarttagged\t!combinationpair\empty
+ {\dostarttagged\t!combinationpair\empty % better make this text
\dostarttagged\t!combinationcontent\empty
\assumelongusagecs\pack_combinations_pickup_content_indeed}
@@ -474,37 +483,72 @@
\pack_combinations_flush_captions
\egroup}
+% \def\pack_combinations_save_caption
+% {\global\setbox\b_pack_combinations_captions\hpack
+% {\hpack{\box\b_pack_combinations_caption}%
+% \unhbox\b_pack_combinations_captions}}
+%
+% \def\pack_combinations_flush_captions
+% {\noalign
+% {\ifdim\ht\b_pack_combinations_captions>\zeropoint
+% \nointerlineskip % indeed
+% \combinationparameter\c!inbetween
+% \global\c_pack_combinations_x\c_pack_combinations_max
+% \glet\pack_combinations_flush_captions_indeed\pack_combinations_flush_captions_yes
+% \else
+% \global\setbox\b_pack_combinations_captions\emptybox
+% \glet\pack_combinations_flush_captions_indeed\pack_combinations_flush_captions_nop
+% \fi}%
+% \pack_combinations_flush_captions_indeed
+% \crcr}
+%
+% \def\pack_combinations_flush_captions_yes
+% {\global\setbox\b_pack_combinations_captions\hpack
+% {\unhbox\b_pack_combinations_captions
+% \global\setbox\b_pack_combinations_temp\lastbox}%
+% \box\b_pack_combinations_temp
+% \global\advance\c_pack_combinations_x\minusone\relax
+% \ifnum\c_pack_combinations_x>\zerocount
+% \expandafter\pack_combinations_flush_captions_yes_followup
+% \else
+% \global\setbox\b_pack_combinations_captions\emptybox
+% \fi}
+
+\installcorenamespace{combinationcaption}
+
\def\pack_combinations_save_caption
- {\global\setbox\b_pack_combinations_captions\hpack
- {\hpack{\box\b_pack_combinations_caption}%
- \unhbox\b_pack_combinations_captions}}
+ {\ifdim\htdp\b_pack_combinations_caption>\d_pack_combinations_ht
+ \global\d_pack_combinations_ht\htdp\b_pack_combinations_caption
+ \fi
+ \savebox{\??combinationcaption:\number\c_pack_combinations_nesting}{\number\c_pack_combinations_x}{\box\b_pack_combinations_caption}}
\def\pack_combinations_flush_captions
{\noalign
- {\ifdim\ht\b_pack_combinations_captions>\zeropoint
+ {\ifdim\d_pack_combinations_ht>\zeropoint
\nointerlineskip % indeed
\combinationparameter\c!inbetween
\global\c_pack_combinations_x\c_pack_combinations_max
\glet\pack_combinations_flush_captions_indeed\pack_combinations_flush_captions_yes
\else
- \global\setbox\b_pack_combinations_captions\emptybox
\glet\pack_combinations_flush_captions_indeed\pack_combinations_flush_captions_nop
\fi}%
\pack_combinations_flush_captions_indeed
\crcr}
\def\pack_combinations_flush_captions_yes
- {\global\setbox\b_pack_combinations_captions\hpack
- {\unhbox\b_pack_combinations_captions
- \global\setbox\b_pack_combinations_temp\lastbox}%
- \box\b_pack_combinations_temp
- \global\advance\c_pack_combinations_x\minusone\relax
- \ifnum\c_pack_combinations_x>\zerocount
+ {\vpack to \d_pack_combinations_ht\bgroup
+ \foundbox{\??combinationcaption:\number\c_pack_combinations_nesting}{\number\c_pack_combinations_x}%
+ \vss
+ \egroup
+ \global\advance\c_pack_combinations_x\minusone
+ \ifnum\c_pack_combinations_x>\zerocount % \c_pack_combinations_max
\expandafter\pack_combinations_flush_captions_yes_followup
\else
- \global\setbox\b_pack_combinations_captions\emptybox
+ \global\d_pack_combinations_ht\zeropoint
+ \initializeboxstack{\??combinationcaption:\number-\c_pack_combinations_nesting}%
\fi}
+
\let\pack_combinations_flush_captions_nop\donothing
\def\pack_combinations_flush_captions_yes_followup
@@ -539,8 +583,15 @@
\let\stopfloatcombination\relax
+% \unexpanded\def\pack_combinations_float_hack_a#1%
+% {\strc_floats_build_box_separate_split{\getlocalfloat{#1}}%
+% \box\b_strc_floats_separate_content}
+
+% \unexpanded\def\pack_combinations_float_hack_b#1%
+% {\box\b_strc_floats_separate_caption}
+
\unexpanded\def\pack_combinations_float_hack_a#1%
- {\strc_floats_build_box_separate_split{\getlocalfloat{#1}}%
+ {\strc_floats_build_box_separate_split{#1}%
\box\b_strc_floats_separate_content}
\unexpanded\def\pack_combinations_float_hack_b#1%
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv
index e5d19d3b3de..1b7d4eb3018 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-mrl.mkiv
@@ -36,7 +36,7 @@
\installcorenamespace{blackrules}
-\installsimplecommandhandler \??blackrules {blackrules}
+\installsimplecommandhandler \??blackrules {blackrules} \??blackrules
\unexpanded\def\blackrule
{\hpack\bgroup
@@ -810,9 +810,9 @@
%D a piece of text, like
%D
%D \startbuffer
-%D
-%D \stopbuffer\fillinline \input reich \par
+%D \fillinline \input reich \par
%D \fillinline[margin=0cm] \input reich \par
+%D \stopbuffer
%D
%D \startexample
%D \getbuffer
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua b/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua
index ea36b10de7a..445085776f3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-obj.lua
@@ -176,6 +176,7 @@ function objects.restore(ns,id) -- why not just pass a box number here too (ok,
number = index,
page = getcount("realpageno"),
}
+ -- list is a rule
setlink(list,page)
end
setbox("objectbox",hbox)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua
index ef8d8136f48..8e410f0cfc0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['pack-rul'] = {
version = 1.001,
+ optimize = true,
comment = "companion to pack-rul.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -122,6 +123,7 @@ local function doreshapeframedbox(n)
if hdone then
for h, id, subtype, list in nextlist, list do
if list and id == hlist_code then
+ -- called a lot so maybe a simple case is needed
if subtype == boxlist_code or subtype == linelist_code then
-- getdirection is irrelevant here so it will go
-- somehow a parfillskip also can get influenced
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv
index 8732c7e6b7c..e06949ed80e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv
@@ -1542,7 +1542,7 @@
\d_framed_linewidth
\fi
\ifconditional\c_framed_has_offset
- \advance\d_framed_applied_offset\localoffset
+ \advance\d_framed_applied_offset\localoffset\relax
\fi
\ifconditional\c_framed_has_extra_offset
\pack_framed_apply_extra_offsets % includes \d_framed_applied_offset
@@ -1900,7 +1900,7 @@
{\iffirstargument
\setupcurrentmathframed[#1]%
\fi
- \c_framed_mstyle\mathstyle
+ \c_framed_mstyle\normalmathstyle
\edef\m_framed_location{\mathframedparameter\c!location}%
\ifx\m_framed_location\v!mathematics
\let\normalstrut\pack_framed_math_pos
@@ -2693,7 +2693,7 @@
% \edef\p_framed_text_strut{\letframedtextparameter\c!strut}% to be used
\letframedtextparameter\c!strut\v!no
\inheritedframedtextframed\bgroup
- \let\\=\endgraf
+ \let\\\endgraf
\edef\p_framed_text_depthcorrection{\framedtextparameter\c!depthcorrection}%
\ifx\p_framed_text_depthcorrection\v!on
\pack_framed_text_start_depth_correction
@@ -2814,7 +2814,7 @@
\letframedtextparameter\c!strut\v!no
\inheritedframedtextframed\bgroup
\blank[\v!disable]%
- \let\\=\endgraf
+ \let\\\endgraf
\useframedtextstyleandcolor\c!style\c!color
\vskip-\strutdp % brrr why is this needed ... needs to be sorted out, see testcase 1
\framedtextparameter\c!inner
@@ -3007,8 +3007,6 @@
%D A Goodie:
-\def\v!unframed{unframed}
-
\defineframed
[\v!unframed]
[\c!frame=\v!off,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv
index 1ec7cdbb86e..1af681049ac 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-bck.mkiv
@@ -269,14 +269,14 @@
\def\page_backgrounds_set_boxes_b
{\ifconditional\c_page_backgrounds_new_left
% \showmessage\m!layouts8\empty
- \page_backgrounds_set_box\leftbackground % \conditionalfalse
+ \page_backgrounds_set_box\leftbackground
\global\setfalse\c_page_backgrounds_new_left
\fi}
\def\page_backgrounds_set_boxes_c
{\ifconditional\c_page_backgrounds_new_right
% \showmessage\m!layouts8\empty
- \page_backgrounds_set_box\rightbackground % \conditionaltrue
+ \page_backgrounds_set_box\rightbackground
\global\setfalse\c_page_backgrounds_new_right
\fi}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi
index 4804e83706a..02c190e6558 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-box.mkvi
@@ -252,7 +252,6 @@
{\setbox#1\vpack to \paperheight
{\hsize\paperwidth
\vkern\topspace
-% \parfillskip\zeropoint
\hkern\doifbothsides\backspace\backspace{\dimexpr\paperwidth-\backspace-\makeupwidth\relax}%
\box#1}%
\dp#1\zeropoint}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv
index e18c0d9232a..e275c8b41eb 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-brk.mkiv
@@ -290,6 +290,13 @@
\installpagebreakmethod \v!start {\global\settrue \c_otr_shipout_enabled}
\installpagebreakmethod \v!stop {\global\setfalse\c_otr_shipout_enabled}
+\installpagebreakmethod{xy}% for Mojca
+ {\page_breaks_handle_direct\v!yes
+ \scratchcounterone \numexpr\rootlayouttargetparameter\c!nx*\rootlayouttargetparameter\c!ny\relax
+ \scratchcountertwo \luaexpr{math.mod(\the\realpageno-1,\the\scratchcounterone)}\relax
+ \scratchcounterthree\numexpr\scratchcounterone-\scratchcountertwo\relax
+ \dorecurse\scratchcounterthree{\page_breaks_handle_direct\v!empty}}
+
% Column breaks.
\installcorenamespace{columnbreakmethod}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv
index 272ffe18168..a51406cd900 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-col.mkiv
@@ -22,7 +22,7 @@
%D We reserve a counter for the number of columns as well as the current
%D column. Both are not to be changed by users!
-\newcount\nofcolumns \nofcolumns\plusone
+%newcount\nofcolumns \nofcolumns\plusone % already in core-ini.mkiv
\newcount\mofcolumns \mofcolumns\plusone
\newconstant\columndirection % 0:lr 1:rl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-ffl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-ffl.mkiv
index 176c4a185e7..b02b908a921 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-ffl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ffl.mkiv
@@ -23,6 +23,8 @@
%D \setupfacingfloat
%D [whatever]
%D [style=bold,
+%D width=frame,
+%D offset=10pt,
%D color=white]
%D
%D \setupfacingfloat
@@ -56,6 +58,12 @@
\unprotect
+% width:
+%
+% -- fit : do nothing
+% -- dimension : use that
+% -- frame : use hsize minus frame offsets (based on preroll)
+
\installcorenamespace {facingfloat}
\installframedcommandhandler \??facingfloat {facingfloat} \??facingfloat
@@ -63,6 +71,7 @@
\setupfacingfloat
[\c!spaceinbetween=\v!big,
\c!inbetween={\blank[\v!big]},
+ \c!width=\v!fit,
%\c!style,
%\c!color,
\c!page=\v!left]
@@ -82,7 +91,7 @@
\let\m_strc_floats_state\relax
-\def\strc_floats_facing_flush
+\unexpanded\def\strc_floats_facing_flush
{\ifnum\c_strc_floats_facing_flushed<\c_strc_floats_facing_saved
\ifodd\c_strc_floats_facing_flushed
\ifodd\realpageno
@@ -121,6 +130,8 @@
\resetboxesincache{\currentfacingfloat}%
\fi}
+\let\flushfacingfloats\strc_floats_facing_flush
+
\unexpanded\def\strc_floats_facing_setup
{\edef\currentfacingfloat{\currentfacingfloat:\m_strc_floats_state}%
\usefacingfloatstyleandcolor\c!style\v!color}
@@ -175,9 +186,19 @@
% \page[\p_page]%
% \fi
%
+ \edef\currentfacingfloat{#1}%
+ \edef\p_width{\facingfloatparameter\c!width}%
+ \letfacingfloatparameter\c!width\v!fit
+ \ifx\p_width\v!frame
+ \setbox\scratchbox\hpack{\inheritedfacingfloatframed{}}%
+ \advance\hsize-\wd\scratchbox
+ \else\ifx\p_width\v!fit
+ % whatever
+ \else
+ \hsize\p_width
+ \fi\fi
\let\startcontent\bgroup
\let\stopcontent\egroup
- \def\currentfacingfloat{#1}%
\let\m_strc_floats_state\v!left
\strc_floats_facing_handle}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv
index 01ee8b689e8..87476adeb3f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-flt.mkiv
@@ -48,7 +48,7 @@
\def\page_floats_report_flushed
{\showmessage\m!floatblocks3%
- {\the\numexpr\totalnoffloats-\savednoffloats\relax}}
+ {\the\numexpr\totalnoffloats-\savednoffloats\relax}}
%D Extra float registers.
@@ -131,7 +131,7 @@
\unexpanded\def\page_floats_collect#1#2#3%
{\clf_collectfloat{#1}\dimexpr#2\relax\dimexpr#3\relax}
-\def\nofstackedfloatincategory#1%
+\def\nofstackedfloatsincategory#1%
{\clf_nofstackedfloats{#1}}
\let\page_floats_column_push_saved\page_floats_push_saved % overloaded in page-mul
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv
index a7ef6ca38f7..829ed24f427 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-imp.mkiv
@@ -167,8 +167,13 @@
% \def\page_shipout_box#1{\normalshipout\box#1\relax} % takes a number
+\def\page_shipout_show_box{\scratchcounter}
+
\unexpanded\def\page_shipout_box#1%
- {\clf_shipoutpage#1\relax
+ {\ifcase\tracingoutput\else
+ \page_shipout_show_box#1\relax
+ \fi
+ \clf_shipoutpage#1\relax
\global\setbox#1\emptybox
\global\deadcycles\zerocount}
@@ -322,13 +327,14 @@
\gdef\arrangedrotationO{0}%
\gdef\arrangedrotationE{180}%
\processcommalist[#1]\doinstalledarrangedoption
- \ifx\handlearrangedpage\undefined
+ \ifdefined\handlearrangedpage\else
\global\arrangingpagesfalse
\fi
\setuppapersize
\ifarrangingpages
\ifconditional\c_page_shipouts_use_objects\else
\clf_disablejobsave
+ \clf_synctexdisable
%\disabledirective[job.save]%
\fi
\fi
@@ -356,6 +362,15 @@
\installpagearrangement {\v!normal}
{\global\arrangingpagesfalse}
+%D (WS:) Watch out with 2UP and A4/A5:
+%D
+%D \definepapersize [A4] [width=210mm,height=297mm]
+%D \definepapersize [A5] [width=148mm,height=210mm]
+%D
+%D 297 mm - 2 * 148 mm = 1 mm
+%D
+%D This is only visible when we have a full background.
+
\installpagearrangement 2*16
{\dosetuparrangement{4}{4}{16}{5}{5}%
\pusharrangedpageTHIRTYTWO\poparrangedpagesAB\relax}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
index 17f4c44dadd..924e01b2aa8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['page-ini'] = {
local tonumber, rawget, rawset, type, next = tonumber, rawget, rawset, type, next
local match = string.match
-local sort, tohash, insert, remove = table.sort, table.tohash, table.insert, table.remove
+local sort, tohash, insert, remove, sortedkeys = table.sort, table.tohash, table.insert, table.remove, table.sortedkeys
local settings_to_array, settings_to_hash = utilities.parsers.settings_to_array, utilities.parsers.settings_to_hash
local texgetcount = tex.getcount
@@ -87,10 +87,23 @@ function pages.mark(name,list)
end
end
+local tobemarked = { }
+
+function pages.markedlist(realpage)
+ if realpage then
+ local m = rawget(tobemarked,realpage) or rawget(data,realpage)
+ return m and next(m) and sortedkeys(m)
+ end
+end
+
local function marked(name)
local realpage = texgetcount("realpageno")
for i=last,realpage-1 do
- rawset(data,i,nil)
+ local di = data[i]
+ if di then
+ tobemarked[i] = di
+ rawset(data,i,nil)
+ end
end
local pagedata = rawget(data,realpage)
return pagedata and pagedata[name] and true or false
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi
index b1a2913cf6f..f1b520f5e3e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-inj.mkvi
@@ -149,7 +149,7 @@
\stopsetups
\startsetups[\??pageinjectionrenderings:\s!setup]
- \setups[\dummyparameter\c!setup]% kind of redundant but fits in
+ \setups[\dummyparameter\c!setups]% kind of redundant but fits in
\stopsetups
\startsetups[\??pageinjectionrenderings:\v!buffer]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-ins.lua b/Master/texmf-dist/tex/context/base/mkiv/page-ins.lua
index 0323952d00f..8a68e16ddaa 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-ins.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ins.lua
@@ -19,6 +19,7 @@ inserts.data = inserts.data or allocate { } -- bytecode storage pool
local variables = interfaces.variables
local v_page = variables.page
+local v_auto = variables.auto
local context = context
local implement = interfaces.implement
@@ -111,3 +112,10 @@ implement {
arguments = "string"
}
+implement {
+ name = "setinsertmigration",
+ arguments = "string",
+ actions = function(state)
+ nodes.migrations.setinserts(state == v_auto)
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv
index 3b473343afe..6f2b56f8285 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ins.mkiv
@@ -1,6 +1,6 @@
%D \module
-%D [ file=core-ins,
-%D version=2002.04.16,
+%D [ file=page-ins,
+%D version=2002.04.16, % was core-ins
%D title=\CONTEXT\ Insertion Macros,
%D subtitle=Insertions,
%D author=Hans Hagen,
@@ -38,6 +38,26 @@
%c!factor=\plusthousand,
\c!location=\v!page]
+\newconstant\insertionmigrationmode
+
+\def\page_inserts_check_anchoring
+ {\edef\p_anchoring{\namedinsertionparameter\empty\c!anchoring}%
+ \insertionmigrationmode\ifx\p_anchoring\v!auto\plusone\else\zerocount\fi
+ \clf_setinsertmigration{\p_anchoring}}
+
+\appendtoks
+ \ifx\currentinsertionparent\empty
+ \page_inserts_check_anchoring
+ \fi
+\to \everysetupinsertion
+
+\setupinsertion
+ [\c!anchoring=\v!none]
+
+\appendtoks
+ \page_inserts_check_anchoring
+\to \everystarttext % or \everyjob
+
\newcount\currentinsertionnumber % This is a count and not a macro !
\newtoks\t_page_inserts_list
@@ -63,7 +83,9 @@
% \floatingpenalty\zerocount
\appendtoks
- \page_inserts_synchronize_registers
+ \ifx\currentinsertionparent\empty \else
+ \page_inserts_synchronize_registers
+ \fi
\to \everysetupinsertion
\unexpanded\def\page_inserts_process#1% beware, this adapts currentinsertion !
@@ -131,12 +153,14 @@
\to \everydefineinsertion
\appendtoks
- \clf_setupinsertion
- {\currentinsertion}
- {%
- location {\insertionparameter\c!location}%
- }%
- \relax
+ \ifx\currentinsertionparent\empty \else
+ \clf_setupinsertion
+ {\currentinsertion}
+ {%
+ location {\insertionparameter\c!location}%
+ }%
+ \relax
+ \fi
\to \everysetupinsertion
\unexpanded\def\page_inserts_set_location#1#2% fast one
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
index d115b588d6f..6f41f3bd85e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-lay.mkiv
@@ -521,6 +521,8 @@
\edef\currentlayouttarget{#1}%
\fi}
+\newdimen\d_page_minimum_paper_size \d_page_minimum_paper_size\luaexpr{math.pi}\onebasepoint
+
\unexpanded\def\page_paper_set_current_indeed[#1][#2]%
{\edef\m_page_asked_paper{#1}% can be the restores
\edef\m_page_asked_print{#2}%
@@ -539,18 +541,18 @@
\processcommacommand[\m_page_asked_paper]\page_paper_handle_page_option
\global\paperwidth \layouttargetparameter\c!width \relax
\global\paperheight\layouttargetparameter\c!height\relax
- \ifdim\paperwidth<\onepoint
- \global\paperwidth\onepoint
+ \ifdim\paperwidth<\d_page_minimum_paper_size
+ \global\paperwidth\d_page_minimum_paper_size
\fi
- \ifdim\paperheight<\onepoint
- \global\paperheight\onepoint
+ \ifdim\paperheight<\d_page_minimum_paper_size
+ \global\paperheight\d_page_minimum_paper_size
\fi
\ifconditional\c_page_target_paper_landscape
\doglobal\swapdimens\paperwidth\paperheight
\fi
\ifinpagebody % local freeze
- \normalexpanded{\setlayouttargetparemeter\c!height{\the\paperheight}}%
- \normalexpanded{\setlayouttargetparemeter\c!width {\the\paperwidth }}%
+ \normalexpanded{\setlayouttargetparameter\c!height{\the\paperheight}}%
+ \normalexpanded{\setlayouttargetparameter\c!width {\the\paperwidth }}%
\fi
%
\page_paper_set_offsets
@@ -1363,7 +1365,6 @@
\fetchruntimecommand \showsetups \f!page_run
\fetchruntimecommand \showmargins \f!page_run
\fetchruntimecommand \showgrid \f!page_run
-\fetchruntimecommand \showusage \f!page_run
\glet\page_grids_add_to_box\gobbleoneargument
\glet\page_grids_add_to_one\gobbleoneargument
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua b/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua
index 5ad660460c1..06983ef5c6f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-lin.lua
@@ -485,15 +485,6 @@ function boxed.stage_two(n,m)
local m = li[2]
local ti = t[i]
if ti then
- -- local d = getdirection(n)
- -- local l = getlist(n)
- -- if d == 1 then
- -- local w = getwidth(n)
- -- ti = hpack_nodes(linked_nodes(new_kern(-w),ti,new_kern(w)))
- -- end
- -- setnext(ti,l)
- -- setprev(l,ti)
- -- setlist(n,ti)
addtoline(n,ti)
resolve(n,m)
else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi
index 6a03d12e45b..e355e3e6017 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-lin.mkvi
@@ -16,6 +16,9 @@
%
% to be redone (was experiment) .. can be hooked into margin code
% reshuffle arguments
+%
+% this is early luatex code, 2007 or even before that, and it shows ... we
+% have better tricks now
\writestatus{loading}{ConTeXt Core Macros / Line Numbering}
@@ -43,14 +46,15 @@
\definesystemattribute[linereference][public]
\appendtoksonce
- \attribute\linenumberattribute\attributeunsetvalue
+ \c_attr_linenumber\attributeunsetvalue
\to \everyforgetall
\appendtoks
- \attribute\linenumberattribute \attributeunsetvalue
+ \c_attr_linenumber\attributeunsetvalue
\to \everyinsidefloat
-\newcount \linenumber % not used
+\mutable\let\linenumber\!!zerocount
+
\newbox \b_page_lines_scratch
\newcount \c_page_lines_reference
\newconstant\c_page_lines_nesting
@@ -127,7 +131,7 @@
\unexpanded\def\page_lines_some_reference#1#2#3%
{\dontleavehmode\begingroup
\global\advance\c_page_lines_reference\plusone
- \attribute\linereferenceattribute\c_page_lines_reference
+ \c_attr_linereference\c_page_lines_reference
#3% todo: #3{#1} as there is no need to pass #1 as part of #3
% for the moment we use a simple system i.e. no prefixes etc .. todo: store as number
\c_strc_references_bind_state\zerocount % we don't want the prewordbreak and manage it here
@@ -312,11 +316,11 @@
\or
\page_lines_start_define % only when assignment
\fi
- \attribute\linenumberattribute\csname\??linenumberinginstance\currentlinenumbering\endcsname\relax}
+ \c_attr_linenumber\csname\??linenumberinginstance\currentlinenumbering\endcsname\relax}
\unexpanded\def\stoplinenumbering
{\ifconditional\c_pages_lines_nesting=\plusone
- \attribute\linenumberattribute\attributeunsetvalue
+ \c_attr_linenumber\attributeunsetvalue
\the\aftereverylinenumbering
\ifconditional\c_page_lines_auto_narrow\par\fi
\fi
@@ -348,6 +352,7 @@
\def\page_lines_add_numbers_to_box#box#column#max#nesting%
{\bgroup
+ \strc_tags_enable_indeed
\b_page_lines_number #box\relax
\c_page_lines_column #column\relax
\c_page_lines_last_column#max\relax
@@ -459,24 +464,34 @@
% \def\dodollap{\hbox to \zeropoint{\normalhss\box\nextbox}\endgroup}
\def\page_line_handle_left#align#width#distance%
- {\llap
+ {\dostarttagged\t!linenumber\empty
+ \llap
{\page_lines_number_inject#align#width%
+ \dostarttagged\t!ignore\empty
\kern\dimexpr
#distance+\d_page_lines_distance
\ifconditional\c_page_lines_dir_left_to_right\else+\d_page_lines_line_width\fi
\relax
\the\everylinenumber
- \hss}}
+ \hss
+ \dostoptagged}%
+ \dostoptagged}
\def\page_line_handle_right#align#width#distance%
- {\rlap
- {\kern\dimexpr
+ {\dostarttagged\t!linenumber\empty
+ \rlap
+ {\dostarttagged\t!ignore\empty
+ \kern\dimexpr
#distance+\d_page_lines_distance
\ifconditional\c_page_lines_dir_left_to_right+\d_page_lines_line_width\fi
\relax
+ \dostoptagged
\page_lines_number_inject#align#width%
+ \dostarttagged\t!ignore\empty
\the\everylinenumber
- \hss}}
+ \hss
+ \dostoptagged}%
+ \dostoptagged}
\setuvalue{\??linenumberinghandler\v!left}%
{\page_line_handle_left\p_align\leftmarginwidth\leftmargindistance}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv
index f54b8ec71d4..e38ad74068d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mix.mkiv
@@ -125,6 +125,7 @@
\setnewconstant\c_page_mix_routine_error \plusfour
\newconditional\c_page_mix_process_notes
+\newconditional\c_page_mix_grid_snapping
%D The main environment is called as follows:
%D
@@ -253,9 +254,15 @@
%D The error routine is there but unlikely to be called. It is a left-over from
%D the traditional routine that might come in handy some day.
+\def\page_mix_construct_and_shipout#1#2#3%
+ {\ifconditional\c_page_mix_grid_snapping\else\gridsnappingfalse\fi % maybe only for notes (bottom alignment)
+ \page_otr_construct_and_shipout#1#2#3%
+ \ifconditional\c_page_mix_grid_snapping \gridsnappingtrue \fi}
+
+
\def\page_mix_routine_error
{\showmessage\m!columns3\empty
- \page_otr_construct_and_shipout\unvbox\normalpagebox\zerocount} % three arguments
+ \page_mix_construct_and_shipout\unvbox\normalpagebox\zerocount} % three arguments
%D Some settings (and actions) depend on the current output routine and setting the
%D hsize and vsize is among them. The calculation of the hsize is done elsewhere.
@@ -300,9 +307,11 @@
\def\page_mix_enable_grid_snapping
{\edef\p_grid{\mixedcolumnsparameter\c!grid}%
+ \setfalse\c_page_mix_grid_snapping
\ifx\p_grid\empty
% just follow the default grid settings
\else
+ \ifgridsnapping\settrue\c_page_mix_grid_snapping\fi
\gridsnappingtrue
\setsystemmode\v!grid
\spac_grids_snap_value_set\p_grid
@@ -795,7 +804,6 @@
% \hss
% \egroup}
-
\unexpanded\def\page_mix_routine_continue
{\bgroup
\forgetall
@@ -803,7 +811,7 @@
\setbox\b_page_mix_collected\vpack{\unvbox\normalpagebox}% brrr we need to make a tight box (combine this in lua)
\page_mix_routine_construct\v!no
\page_mix_routine_package
- \page_otr_construct_and_shipout\box\b_page_mix_collected\zerocount % three arguments
+ \page_mix_construct_and_shipout\box\b_page_mix_collected\zerocount % three arguments
\clf_mixflushrest
\clf_mixcleanup
\egroup}
@@ -841,7 +849,7 @@
% 1 = we have stuff left, so flush and rebalance
%writestatus\m!columns{flush continue}%
\page_mix_routine_package
- \page_otr_construct_and_shipout\box\b_page_mix_collected\zerocount % three arguments
+ \page_mix_construct_and_shipout\box\b_page_mix_collected\zerocount % three arguments
\setbox\b_page_mix_collected\vpack{\clf_mixflushrest}% we could avoid this
\clf_mixcleanup
\ifdim\ht\b_page_mix_collected=\zeropoint
@@ -1005,7 +1013,7 @@
{\page_one_place_float_force}
\unexpanded\def\page_mix_command_side_float_output
- {\page_otr_construct_and_shipout\unvbox\normalpagebox\zerocount} % three arguments
+ {\page_mix_construct_and_shipout\unvbox\normalpagebox\zerocount} % three arguments
\unexpanded\def\page_mix_command_synchronize_side_floats
{\page_sides_forget_floats}
@@ -1029,7 +1037,7 @@
\begingroup
\scratchdimen\dimexpr#1\lineheight\ifsecondargument+#2\fi\relax
\ifdim\scratchdimen>\zeropoint
- \attribute\checkedbreakattribute\number\scratchdimen
+ \c_attr_checkedbreak\number\scratchdimen % why \number
\penalty\c_page_mix_break_forced\relax
\fi
\endgroup}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv
index f1d68827ab7..a0a02543e95 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-mul.mkiv
@@ -690,17 +690,17 @@
\else
\unvcopy#4%
\fi
- \fuzzysnappedbox\unvbox\scratchbox
+ \unvbox\scratchbox
\fakecolumnfootnotes{#1}}%
\else\ifcase\c_strc_notes_page_location
\global\setbox#1\vsplit#2 to #3%
\global\setbox#1\vbox
- {\fuzzysnappedbox\unvbox{#1}}% % or \box ?
+ {\unvbox{#1}}% % or \box ?
\else
\columnfootnotecorrection{#1}{#3}%
\setbox\scratchbox\vsplit#2 to #3%
\global\setbox#1\vbox to #3%
- {\fuzzysnappedbox\unvbox\scratchbox
+ {\unvbox\scratchbox
\fakecolumnfootnotes{#1}}%
\fi \fi
\egroup}
@@ -714,7 +714,7 @@
\def\page_mul_split_last_column#1#2%
{\global\setbox\lastcolumnbox\vbox
{\unvcopy\lasttopcolumnbox
- \fuzzysnappedbox\unvbox{#1}%
+ \unvbox{#1}%
\fakecolumnfootnotes\lastcolumnbox}}
%D NEW: still to be documented.
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv
index d6f63846f6e..6d71539d5dc 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-not.mkiv
@@ -22,23 +22,6 @@
\unprotect
-% \def\checkbegincolumnfootnotes % should happen inside otr
-% {\ifcase\c_strc_notes_page_location
-% \erasenotebackup
-% \else
-% \flushnotes
-% \savenotecontent
-% \fi
-% \savenotedata}
-
-% \def\checkendcolumnfootnotes
-% {\restorenotedata
-% \ifcase\c_strc_notes_page_location\else
-% \restorenotecontent
-% \fi}
-
-\let\checksinglecolumnfootnotes\relax
-
\newdimen\totalinsertionheight
\unexpanded\def\settotalinsertionheight
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv
index 85ed76da180..54e53035f51 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-one.mkiv
@@ -82,7 +82,12 @@
% 1 = partial page, 2 = whole page, 3 = partial page
-\setnewconstant\kindofpagetextareas\plustwo % \plusone can become default some day
+% We really need a setting! Todo, what key to use?
+
+\pushoverloadmode
+ \setnewconstant\kindofpagetextareas\plustwo % \plusone can become default some day
+ \overloaded\let\kindofpagetextareas\kindofpagetextareas
+\popoverloadmode
\def\page_one_registered_text_area_a % two arguments: (un)vbox n
{\ifconditional\c_page_areas_enabled
@@ -184,8 +189,7 @@
\scratchoffset\ht\b_page_one_contents
\fi
\setbox\b_page_one_bottom_notes\hpack
- {\checksinglecolumnfootnotes % why this check? ***
- \lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}% kerns makes notes sit on bottom % pack ?
+ {\lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}% kerns makes notes sit on bottom % pack ?
\smashbox\b_page_one_bottom_notes
\ht\b_page_one_contents\zeropoint
\page_one_registered_text_area_b
@@ -486,11 +490,24 @@
\fi\fi
\fi}
+% \def\page_one_place_float_here_indeed
+% {\ifgridsnapping
+% % otherwise real bad outcome
+% \else
+% \baselinecorrection % this has to be done better (and definitely not in column mode)
+% \fi
+% \doplacefloatbox
+% \page_floats_report_total
+% \dohandlenextfloatindent}
+
\def\page_one_place_float_here_indeed
{\ifgridsnapping
% otherwise real bad outcome
\else
- \baselinecorrection % this has to be done better (and definitely not in column mode)
+ % this was not really applied (delayed)
+ % \baselinecorrection % this has to be done better (and definitely not in column mode)
+ % so we now use this:
+ \checkprevdepth
\fi
\doplacefloatbox
\page_floats_report_total
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-otr.lua b/Master/texmf-dist/tex/context/base/mkiv/page-otr.lua
index 30715868426..c87f419b4ff 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-otr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-otr.lua
@@ -7,6 +7,6 @@ if not modules then modules = { } end modules ['page-otr'] = {
}
interfaces.implement {
- name = "triggerpagebuilder",
- actions = tex.triggerbuildpage,
+ name = "triggerpagebuilder",
+ actions = tex.triggerbuildpage,
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi
index 6feb15a9d61..0627612610f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi
@@ -25,8 +25,6 @@
\let\triggerpagebuilder\clf_triggerpagebuilder
-\def\m!otr{otr} % todo
-
\installcorenamespace{outputroutine}
\installswitchcommandhandler \??outputroutine {outputroutine} \??outputroutine
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv
index 09368c53746..43ba4feb326 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-pcl.mkiv
@@ -173,8 +173,7 @@
\scratchoffset\ht\b_page_one_contents
\fi
\setbox\b_page_one_bottom_notes\hpack
- {\checksinglecolumnfootnotes % ?
- \hsize\d_page_col_column_width
+ {\hsize\d_page_col_column_width
\setupnotes[\c!width=\textwidth]%
\lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}%
\ht\b_page_one_contents \zeropoint
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-run.lua b/Master/texmf-dist/tex/context/base/mkiv/page-run.lua
index cb8cf03117f..7ad9c8d9fe0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-run.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-run.lua
@@ -186,38 +186,4 @@ function commands.showlayout(options)
end
-local report = logs.reporter("usage")
-
-function commands.showusage()
- report("")
- report("status after shipping out page %s",tex.getcount("realpageno"))
- report("")
- report(" filename : %s", status.filename)
- report(" inputid : %s", status.inputid)
- report(" linenumber : %s", status.linenumber)
- report(" input pointer : %s", status.input_ptr)
- report("")
- report(" string pointer : %s of %s", status.str_ptr, status.max_strings + status.init_str_ptr)
- report(" pool size : %s", status.pool_size)
- report("")
- report(" node memory usage : %s of %s", status.var_used, status.var_mem_max)
- report(" token memory usage : %s of %s", status.dyn_used, status.fix_mem_max)
- report("")
- report(" cs count : %s of %s", status.cs_count, status.hash_size + status.hash_extra)
- report("")
- report(" stack size : %s of %s", status.max_in_stack, status.stack_size)
- report(" nest size : %s of %s", status.max_nest_stack, status.nest_size)
- report(" parameter size : %s of %s", status.max_param_stack, status.param_size)
- report(" buffer size : %s of %s", status.max_buf_stack, status.buf_size)
- report(" save size : %s of %s", status.max_save_stack, status.save_size)
- report("")
- report(" luabytecode bytes : %s in %s registers", status.luabytecode_bytes, status.luabytecodes)
- report(" luastate bytes : %s of %s", status.luastate_bytes, status.luastate_bytes_max or "unknown")
- report("")
- report(" callbacks : %s", status.callbacks)
- report(" indirect callbacks : %s", status.indirect_callbacks)
- report(" saved callbacks : %s", status.saved_callbacks)
- report(" direct callbacks : %s", status.direct_callbacks)
- report(" function callbacks : %s", status.function_callbacks)
- report("")
-end
+commands.showusage = statistics.showusage
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv
index d3efe169816..fc46d8236fb 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-run.mkiv
@@ -215,10 +215,4 @@
\global\setbox#1\vpack{\noindent\backgroundline[layout:mix]{\box#1}}%
\endgroup}
-%D The next command shows some statistics (we might add more in due time):
-
-\unexpanded\gdef\showusage
- {\gtoksapp\everyaftershipout{\ctxcommand{showusage()}}%
- \glet\showusage\relax}
-
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv
index bb95ee467b1..2d9e488f558 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-spr.mkiv
@@ -121,8 +121,8 @@
\unexpanded\def\page_spread_stop_yes
{\kern\zeropoint
\page
- \setuplayout[\c!textwidth=\textwidth]
- \page[\v!left]
+ \setuplayout[\c!textwidth=\textwidth]%
+ \page[\v!left]%
\egroup}
\unexpanded\def\page_spread_start_nop
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi
index 8b021acca5d..9bc78ec9298 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-txt.mkvi
@@ -463,10 +463,19 @@
\unexpanded\def\resettextcontent
{\dotripleempty\page_layouts_reset_text_content}
+% \def\page_layouts_reset_text_content[#vertical][#horizontal][#tag]% header text middle
+% {\edef\currentlayoutelement{#vertical:#horizontal}%
+% \ifthirdargument
+% \letvalueempty{\layoutelementhash\executeifdefined{\??layouttextcontent\v!text:#tag}\c!middletext}%
+% \else\ifsecondargument
+% \resetlayoutelementparameter\c!lefttext
+% \resetlayoutelementparameter\c!middletext
+% \resetlayoutelementparameter\c!righttext
+% \fi\fi}
+
\def\page_layouts_reset_text_content[#vertical][#horizontal][#tag]% header text middle
- {\edef\currentlayoutelement{#vertical:#horizontal}%
- \ifthirdargument
- \letvalueempty{\layoutelementhash\executeifdefined{\??layouttextcontent\v!text:#tag}\c!middletext}%
+ {\ifthirdargument
+ \letvalueempty{\namedlayoutelementhash{#vertical:#horizontal}\executeifdefined{\??layouttextcontent\v!text:#tag}\c!middletext}%
\else\ifsecondargument
\resetlayoutelementparameter\c!lefttext
\resetlayoutelementparameter\c!middletext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua
index 363b4a79cc4..e0cea7babde 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.lua
@@ -41,7 +41,7 @@ if not modules then modules = { } end modules ['phys-dim'] = {
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 = string.format, string.lower
+local format, lower, gsub = string.format, string.lower, string.gsub
local appendlpeg = lpeg.append
local utfchartabletopattern = lpeg.utfchartabletopattern
local mergetable, mergedtable, keys, loweredkeys = table.merge, table.merged, table.keys, table.loweredkeys
@@ -68,7 +68,10 @@ local math_one = Cs((P("$") /"") * (1-P("$"))^1 * (P("$")/"")) / contex
local math_two = Cs((P("\\m {")/"") * (1-P("}"))^1 * (P("}")/"")) / context.m -- watch the space after \m
local digit = R("09")
-local sign = S("+-")
+local plus = P("+")
+local minus = P("-")
+local plusminus = P("±")
+local sign = plus + minus
local power = S("^e")
local digitspace = S("~@_")
local comma = P(",")
@@ -80,8 +83,6 @@ local positive = P("++") -- was p
local negative = P("--") -- was n
local highspace = P("//") -- was s
local padding = P("=")
-local plus = P("+")
-local minus = P("-")
local space = P(" ")
local lparent = P("(")
local rparent = P(")")
@@ -111,6 +112,7 @@ 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
@@ -152,7 +154,8 @@ local c_p = (ddigitspace^1 * dskipcomma)^0 -- ___,
* (ddigitspace^0 * ddigit * dintercomma)^0 -- _00, 000,
* ddigitspace^0 * ddigit^0 -- _00 000
* (
- dfinalperiod * ddigit * (dintercomma * ddigit)^0 -- .00
+ dfinalperiod * ddigit^1 * dpadding^1 -- .0=
+ + dfinalperiod * ddigit * (dintercomma * ddigit)^0 -- .00
+ dskipperiod * dpadding^1 -- .==
+ dsemiperiod * ddigit * (dintercomma * ddigit)^0 -- :00
+ dsemiperiod * dpadding^1 -- :==
@@ -163,7 +166,8 @@ local p_c = (ddigitspace^1 * dskipperiod)^0 -- ___.
* (ddigitspace^0 * ddigit * dinterperiod)^0 -- _00. 000.
* ddigitspace^0 * ddigit^0 -- _00 000
* (
- dfinalcomma * ddigit * (dinterperiod * ddigit)^0 -- 00
+ dfinalcomma * ddigit^1 * dpadding^1 -- ,0=
+ + dfinalcomma * ddigit * (dinterperiod * ddigit)^0 -- 00
+ dskipcomma * dpadding^1 -- ,==
+ dsemicomma * ddigit * (dinterperiod * ddigit)^0 -- :00
+ dsemicomma * dpadding^1 -- :==
@@ -265,7 +269,7 @@ local long_units = {
Celsius = "celsius",
Lumen = "lumen",
Lux = "lux",
- Bequerel = "bequerel",
+ Becquerel = "becquerel",
Gray = "gray",
Sievert = "sievert",
Katal = "katal",
@@ -531,9 +535,14 @@ 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
@@ -599,7 +608,7 @@ labels.units = allocate {
celsius = { labels = { en = [[\checkedtextcelsius]] } }, -- 0x2103
lumen = { labels = { en = [[lm]] } },
lux = { labels = { en = [[lx]] } },
- bequerel = { labels = { en = [[Bq]] } },
+ becquerel = { labels = { en = [[Bq]] } },
gray = { labels = { en = [[Gy]] } },
sievert = { labels = { en = [[Sv]] } },
katal = { labels = { en = [[kat]] } },
@@ -856,35 +865,60 @@ local function update_parsers() -- todo: don't remap utf sequences
)^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-R("az","AZ")-P(" "))^1 -- todo: catch { } -- not ok
+ + (1-letter-P(" "))^1 -- todo: catch { } -- not ok
) / ctx_unitsN
- local start = Cc(nil) / ctx_unitsNstart
- local stop = Cc(nil) / ctx_unitsNstop
- local space = Cc(nil) / ctx_unitsNspace
-
- -- todo: avoid \ctx_unitsNstart\ctx_unitsNstop (weird that it can happen .. now catched at tex end)
-
- local p_c_combinedparser = P { "start",
- number = start * dleader * (p_c_dparser + number) * stop,
- rule = V("number")^-1 * unitparser,
- space = space,
- start = V("rule") * (V("space") * V("rule"))^0 + V("number")
- }
-
- local c_p_combinedparser = P { "start",
- number = start * dleader * (c_p_dparser + number) * stop,
- rule = V("number")^-1 * unitparser,
- space = space,
- start = V("rule") * (V("space") * V("rule"))^0 + V("number")
- }
+ 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 p_c_combinedparser, c_p_combinedparser
+ return combine(p_c_dparser), combine(c_p_dparser)
end
local p_c_parser = nil
@@ -967,3 +1001,15 @@ implement { name = "digits_reverse", actions = makedigits, arguments = { "stri
implement { name = "unit_normal", actions = makeunit, arguments = "string"}
implement { name = "unit_reverse", actions = makeunit, arguments = { "string", true } }
implement { name = "registerunit", actions = registerunit, arguments = "2 strings" }
+
+implement {
+ name = "hyphenateddigits",
+ public = true,
+ protected = true,
+ arguments = { "optional", "string" },
+ actions = function(filler, digits)
+ digits = gsub(digits,"(%d)","%1\\digitsbreak")
+ digits = gsub(digits,"\\-$",filler)
+ context(digits)
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv
index 1eb1f37f76b..b390ce64aef 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/phys-dim.mkiv
@@ -86,7 +86,6 @@
%D the grouped call.
%D
%D \starttabulate[|l|l|l|]
-%D \starttabulate[|l|l|l|]
%D \NC \type{.} \NC , . \NC comma or period \NC \NR
%D \NC \type{,} \NC , . \NC comma or period \NC \NR
%D \NC \type{:} \NC \NC invisible period \NC \NR
@@ -100,7 +99,6 @@
%D \NC \type{++} \NC $\positive$ \NC high plus sign \NC \NR
%D \NC \type{=} \NC $\zeroamount$ \NC zero padding \NC \NR
%D \stoptabulate
-%D \stoptabulate
%D
%D These triggers are used in the following examples.
%D
@@ -172,10 +170,10 @@
% \definesymbol[units][times][\ifmmode\cdot\else\kern.2\emwidth\cdot\kern.2\emwidth\fi]
\unexpanded\def\digitstextbinop#1% assumes preceding
- {\fourperemspace\nobreak\times\fourperemspace}
+ {\ifmmode#1\else\fourperemspace\nobreak#1\fourperemspace\fi}
%def\digitstimessymbol{\ifmmode\cdot\else\digitstextbinop\cdot\fi}
-\def\digitstimessymbol{\ifmmode\times\else\digitstextbinop\times\fi}
+\def\digitstimessymbol{\digitstextbinop\times}
\unexpanded\def\digitszeropadding {\hphantom{0}}
\unexpanded\def\digitsnegative {\phys_digits_normalized{0}{\phys_digits_raised{\textminus}}}
@@ -185,7 +183,8 @@
%unexpanded\def\digitsminus {\phys_digits_normalized{0}{\mathematics{-}}}
%unexpanded\def\digitsplus {\phys_digits_normalized{0}{\mathematics{+}}}
\unexpanded\def\digitsminus {\phys_digits_normalized{0}{\mathminus}}
-\unexpanded\def\digitsplus {\phys_digits_normalized{0}{\mathplus }}
+\unexpanded\def\digitsplus {\phys_digits_normalized{0}{\mathplus}}
+\unexpanded\def\digitsplusminus {\phys_digits_normalized{0}{\mathplusminus}}
\unexpanded\def\digitsspace {\hphantom{0}}
\unexpanded\def\digitsseparatorspace{\hphantom{.}}
\unexpanded\def\digitssignspace {\hphantom{\digitsminus}}
@@ -522,6 +521,9 @@
{\edef\p_order{\unitparameter\c!order}%
\ifx\p_order\v!reverse\expandafter\clf_unit_reverse\else\expandafter\clf_unit_normal\fi{\detokenize{#1}}}
+\unexpanded\def\digitstextbinnop#1%
+ {\ifmmode#1\else#1\fourperemspace\fi}
+
\unexpanded\def\unitsPUS#1#2#3{\phys_units_next\prefixtext{#1}\unittext{#2}\unitsraise{\suffixtext{#3}}\c_phys_units_state\plusone} % suffix
\unexpanded\def\unitsPU #1#2{\phys_units_next\prefixtext{#1}\unittext{#2}\c_phys_units_state\plusthree} % unit
\unexpanded\def\unitsPS #1#2{\phys_units_next\prefixtext{#1}\unitsraise{\suffixtext{#2}}\c_phys_units_state\plusone} % suffix
@@ -531,8 +533,28 @@
\unexpanded\def\unitsS #1{\phys_units_start{}\unitsraise{\suffixtext{#1}}\c_phys_units_state\plusone} % suffix
\unexpanded\def\unitsO #1{\phys_units_start\operatortext{#1}\c_phys_units_state\plustwo} % operator
\unexpanded\def\unitsN #1{\phys_units_start#1\c_phys_units_state\plusfive} % number
-\unexpanded\def\unitsC #1{\removeunwantedspaces\unittext{#1}\c_phys_units_state\plussix} % connected
-\unexpanded\def\unitsQ #1{\removeunwantedspaces\unitslower{#1}\c_phys_units_state\zerocount} %
+\unexpanded\def\unitsC #1{\removeunwantedspaces\unittext{#1}\c_phys_units_state\plussix} % connected
+\unexpanded\def\unitsQ #1{\removeunwantedspaces\unitslower{#1}\c_phys_units_state\zerocount}
+\unexpanded\def\unitsR #1#2{% todo: tagging
+ \ifmmode
+ #2%
+ \else\ifnum#1=\plusone
+ \digitstextbinop{#2}% before and after
+ \else
+ \digitstextbinnop{#2}% after
+ \fi\fi
+ \c_phys_units_state\zerocount
+ \setfalse\c_phys_units_dospace
+ \setfalse\c_phys_units_number
+ \setfalse\c_phys_units_quantity}
+
+\unexpanded\def\unitsRPM {\unitsR\plusone {±}} % todo: symbols
+\unexpanded\def\unitsRTO {\unitsR\plusone {–}} % todo: symbols
+\unexpanded\def\unitsRabout {\unitsR\zerocount{±}} % todo: symbols
+\unexpanded\def\unitsPopen {(}
+\unexpanded\def\unitsPclose {)}
+
+\unexpanded\def\unitrange#1{}
% Fonts can have a celsius and lack a fahrenheit symbol and as we want
% to be consistent so we check for the counterparts as well. It's slow
@@ -610,7 +632,7 @@
\def\phys_units_start
{\ifmmode
- \dostarttagged\t!mathaction\t!unit
+ \dostarttagged\t!maction\t!unit
\bgroup % make an mrow
\else
\dostarttagged\t!unit\empty
diff --git a/Master/texmf-dist/tex/context/base/mkiv/prop-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/prop-ini.mkiv
deleted file mode 100644
index 3b1c59b245c..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/prop-ini.mkiv
+++ /dev/null
@@ -1,64 +0,0 @@
-%D \module
-%D [ file=prop-ini,
-%D version=2003.04.20,
-%D title=\CONTEXT\ Property Macros,
-%D subtitle=Initialization,
-%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 Property Macros / Initialization}
-
-%D This module is replaced by dedicated mechanisms. Originally properties were
-%D a sort of attributes in \MKII, but now we do things different anyway. We keep
-%D a surrogate mechanism around for compatibility reasons but even this will
-%D become obsolete some day.
-
-\unprotect
-
-\installcorenamespace{propertytypes}
-\installcorenamespace{propertydefiners}
-\installcorenamespace{propertystarters}
-
-\def\properties_obsolete_message
- {\writestatus\m!system{properties are obsolete, use dedicated commands}%
- \glet\properties_obsolete_message\donothing}
-
-\setvalue{\??propertydefiners\v!layer }[#1][#2][#3]{\defineviewerlayer[#1][#3]}
-\setvalue{\??propertydefiners\s!effect }[#1][#2][#3]{\defineeffect [#1][#3]}
-\setvalue{\??propertydefiners\v!negative}[#1][#2][#3]{}
-
-\unexpanded\def\defineproperty
- {\dotripleempty\properties_define}
-
-\def\properties_define[#1][#2][#3]%
- {\properties_obsolete_message
- \setevalue{\??propertytypes#1}{#2}%
- \getvalue{\??propertydefiners#2}[#1][#2][#3]}
-
-\setvalue{\??propertystarters\v!layer }#1{\let\properties_stop\stopviewerlayer\startviewerlayer[#1]}
-\setvalue{\??propertystarters\s!effect }#1{\let\properties_stop\stopeffect \starteffect [#1]}
-\setvalue{\??propertystarters\v!negative}#1{\let\properties_stop\stopnegative \startnegative }
-
-\unexpanded\def\property[#1]%
- {\groupedcommand{\properties_start{#1}}\properties_stop}
-
-\unexpanded\def\startproperty[#1]%
- {\properties_start{#1}}
-
-\unexpanded\def\stopproperty
- {\properties_stop}
-
-\unexpanded\def\properties_start#1%
- {\pushmacro\properties_stop
- \getvalue{\??propertystarters\getvalue{\??propertytypes#1}}{#1}}
-
-\unexpanded\def\properties_stop
- {\properties_stop
- \popmacro\properties_stop}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua
index e74c7ee18b5..123a67009d4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-aut.lua
@@ -530,9 +530,9 @@ implement {
name = "btxauthor",
actions = btxauthor,
arguments = {
- "string",
- "string",
- "string",
+ "argument",
+ "argument",
+ "argument",
{
{ "combiner" },
{ "kind" },
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi
index 5603b79a5f1..c7c00fd1436 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-apa.mkvi
@@ -846,7 +846,7 @@
% #title can be title or booktitle
-\starttexdefinition unexpanded btx:apa:translated-title #title
+\starttexdefinition mutable protected btx:apa:translated-title #title
\ifx\currentbtxlanguage\empty
% no need for an extra
\else\ifx\mainbtxlanguage\currentbtxlanguage
@@ -865,7 +865,7 @@
\fi\fi
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:composed-title #title
+\starttexdefinition mutable protected btx:apa:composed-title #title
\btxstartstyleandcolor[apa:\s!list:#title:\currentbtxcategory]
\begingroup
\language[\currentbtxlanguage]
@@ -884,7 +884,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:title
+\starttexdefinition mutable protected btx:apa:title
\setmode{btx:apa:title-placed}
% we make the title active, opening "file"
\btxdoifelse {file} {
@@ -925,7 +925,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:title-if-not-placed
+\starttexdefinition mutable protected btx:apa:title-if-not-placed
\doifelsemode {btx:apa:title-placed} {
\resetmode{btx:apa:title-placed}
} {
@@ -940,7 +940,7 @@
\btxlabeltext{apa:nd}
\stopsetups
-\starttexdefinition unexpanded btx:apa:suffixedyear
+\starttexdefinition mutable protected btx:apa:suffixedyear
\btxdoifelse {year} {
\btxflush{year}
\btxflushsuffix
@@ -965,7 +965,7 @@
% #author may be author(set) or editor
-\starttexdefinition unexpanded btx:apa:author-or-editor #author
+\starttexdefinition mutable protected btx:apa:author-or-editor #author
\btxdoifelse {#author} {
\btxstartstyleandcolor[apa:\s!list:#author]
\btxusecommand[apa:\s!list:#author]{
@@ -1048,7 +1048,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:authoryear
+\starttexdefinition mutable protected btx:apa:authoryear
% we make the authoryear active, pointing to the citation
\texdefinition{btx:format:inject}
{internal(\currentbtxinternal)}
@@ -1073,7 +1073,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:editor-in
+\starttexdefinition mutable protected btx:apa:editor-in
\btxdoif {booktitle} {
\btxlabeltext{In}
\btxspace
@@ -1086,7 +1086,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:organization-if-not-author
+\starttexdefinition mutable protected btx:apa:organization-if-not-author
\btxdoif {organization} {
\doifnot {\btxfoundname{author}} {organization} {
\btxspace
@@ -1099,7 +1099,7 @@
% TODO: The title is terminated with period. However,
% we probably don't want this before the parenthesis.
-\starttexdefinition unexpanded btx:apa:leftparenthesis-or-comma
+\starttexdefinition mutable protected btx:apa:leftparenthesis-or-comma
\doifelsemode {btx:apa:editionset-is-empty} {
\btxleftparenthesis
\resetmode{btx:apa:editionset-is-empty}
@@ -1108,7 +1108,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:editionset
+\starttexdefinition mutable protected btx:apa:editionset
\setmode{btx:apa:editionset-is-empty}
\doif {\currentbtxcategory} {techreport} {
\texdefinition{btx:apa:leftparenthesis-or-comma}
@@ -1157,7 +1157,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:journal
+\starttexdefinition mutable protected btx:apa:journal
\btxstartstyleandcolor[apa:\s!list:journal]
\btxusecommand [apa:\s!list:journal] {
\btxflush{journal}
@@ -1165,7 +1165,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:volume
+\starttexdefinition mutable protected btx:apa:volume
\btxstartstyleandcolor[apa:\s!list:volume]
\btxflush{volume}
\btxstopstyleandcolor
@@ -1173,7 +1173,7 @@
% this could be simplified!
-\starttexdefinition unexpanded btx:apa:journal-volume-number-pages
+\starttexdefinition mutable protected btx:apa:journal-volume-number-pages
\btxdoif {journal} {
\btxspace
\texdefinition{btx:apa:journal}
@@ -1222,7 +1222,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:wherefrom-publisher
+\starttexdefinition mutable protected btx:apa:wherefrom-publisher
\btxdoifelse {address} {
\btxflush{address}
\btxdoif {country} {
@@ -1256,7 +1256,7 @@
% use \btxentry here?
-\starttexdefinition unexpanded btx:apa:url
+\starttexdefinition mutable protected btx:apa:url
\begingroup
\setbreakpoints[doi]
\ifconditional\btxinteractive
@@ -1273,7 +1273,7 @@
% use \btxentry here?
-\starttexdefinition unexpanded btx:apa:doi
+\starttexdefinition mutable protected btx:apa:doi
\begingroup
\setbreakpoints[doi]
\ifconditional\btxinteractive
@@ -1288,7 +1288,7 @@
\endgroup
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:note
+\starttexdefinition mutable protected btx:apa:note
\btxdoif {note} {
\btxleftparenthesis
\btxflush{note}
@@ -1296,7 +1296,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:url-doi-note
+\starttexdefinition mutable protected btx:apa:url-doi-note
\doif {\btxfoundname{doi}} {url} {
\btxspace
\btxlabeltext{apa:Retrieved}
@@ -1311,7 +1311,7 @@
\removeunwantedspaces
\stoptexdefinition
-\starttexdefinition unexpanded btx:apa:type
+\starttexdefinition mutable protected btx:apa:type
\btxdoif {type} {
\btxleftbracket
\btxflush{type}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi
index d085b96eb63..e16279222a6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-aps.mkvi
@@ -596,7 +596,7 @@
%D returned. In lua syntax, it can be understood as
%D author or editor or publisher or title or ""
-\starttexdefinition unexpanded btx:aps:composed-title #title
+\starttexdefinition mutable protected btx:aps:composed-title #title
\btxstartstyleandcolor [aps:\s!list:title:\currentbtxcategory]
\begingroup
\language[\currentbtxlanguage]
@@ -611,7 +611,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:title
+\starttexdefinition mutable protected btx:aps:title
\btxdoif {title} {
% we make the title active, opening file
\btxdoifelse {file} {
@@ -627,13 +627,13 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:optional-title
+\starttexdefinition mutable protected btx:aps:optional-title
\doif{\btxparameter{\c!title}}\v!yes {
\texdefinition {btx:aps:title}
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:year
+\starttexdefinition mutable protected btx:aps:year
\btxdoifelse {year} {
\btxflush{year}
} {
@@ -643,7 +643,7 @@
% #author may be author(set) or editor
-\starttexdefinition unexpanded btx:aps:author-or-editor #author
+\starttexdefinition mutable protected btx:aps:author-or-editor #author
\btxdoif {#author} {
\btxflush{#author}
\doifelse {\btxfoundname{#author}} {editor} {
@@ -664,14 +664,14 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:author
+\starttexdefinition mutable protected btx:aps:author
\btxdoif {author} {
\btxflush{author}
\btxcomma
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:organization-if-not-author
+\starttexdefinition mutable protected btx:aps:organization-if-not-author
\btxdoif {organization} {
\doifnot {\btxfoundname{author}} {organization} {
\btxspace
@@ -681,7 +681,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:editor-in
+\starttexdefinition mutable protected btx:aps:editor-in
\btxdoif {booktitle} {
\btxlabeltext{In}
\doifnot {\btxfoundname{author}} {editor} {
@@ -694,7 +694,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:editionset
+\starttexdefinition mutable protected btx:aps:editionset
\doif {\currentbtxcategory} {techreport} {
\btxdoifelse {type} {
\btxusecommand [\currentbtx:type] {
@@ -739,7 +739,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:journal-volume-year
+\starttexdefinition mutable protected btx:aps:journal-volume-year
\btxdoif {journal} {
\btxspace
\btxstartstyleandcolor [aps:\s!list:journal]
@@ -773,7 +773,7 @@
\btxrightparenthesis
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:publisher-wherefrom-year
+\starttexdefinition mutable protected btx:aps:publisher-wherefrom-year
\removeunwantedspaces
\removepunctuation
\btxleftparenthesis
@@ -797,7 +797,7 @@
\btxrightparenthesis
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:note
+\starttexdefinition mutable protected btx:aps:note
\btxperiod
\btxdoif {note} {
\btxleftparenthesis
@@ -806,7 +806,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:aps:doi-url #text
+\starttexdefinition mutable protected btx:aps:doi-url #text
\ifconditional\btxinteractive
\btxdoifelse {doi} {
\goto {#text} [url(http://dx.doi.org/\btxflush{doi})]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi
index b524331867c..8ee7835996f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-author.mkvi
@@ -23,7 +23,7 @@
% \currentbtxsurnames : \btxauthorfield{surnames}
% \currentbtxjuniors : \btxauthorfield{juniors}
-\starttexdefinition unexpanded \s!btx:\s!cite:\s!author:\s!de
+\starttexdefinition mutable protected \s!btx:\s!cite:\s!author:\s!de
\ifx\currentbtxlanguage\s!de
\setmode{\s!btx:\s!de}
\fi
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi
index 867535ca6be..315d686129d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-chicago.mkvi
@@ -702,20 +702,20 @@
chicago:edition={Utgåva},
chicago:Editor=Redaktör,
chicago:Editors=Redaktörer,
- chicago:Volume=Band,
+ chicago:Volume=Band,
chicago:Volumes=Band,
chicago:nd={u.å.}, % utan årtal
chicago:supplement=Bilaga, % Supplement
chicago:MotionPicture=Spelfilm, % ?
chicago:Writer={Manusförfattare}, % Assuming for a movie
- chicago:Writers={Manusförfattare}, %
+ chicago:Writers={Manusförfattare}, %
chicago:Producer=Producent, % Assuming for a movie
- chicago:Producers=Producenter, %
+ chicago:Producers=Producenter, %
chicago:Director={Regissör}, % Assuming for a movie
- chicago:Directors={Regissörer}, %
+ chicago:Directors={Regissörer}, %
chicago:Recordedby={Inspelad av}, % Assuming for a movie
chicago:Author={Författare},
- chicago:Translator={Översättare},
+ chicago:Translator={Översättare},
chicago:Advanced={Avancerad onlinepublikation}, % ?
chicago:Retrieved={Hämtad från}]
@@ -845,7 +845,7 @@
% #title can be title or booktitle
-\starttexdefinition unexpanded btx:chicago:translated-title #title
+\starttexdefinition mutable protected btx:chicago:translated-title #title
\ifx\currentbtxlanguage\empty
% no need for an extra
\else\ifx\mainbtxlanguage\currentbtxlanguage
@@ -864,7 +864,7 @@
\fi\fi
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:composed-title #title
+\starttexdefinition mutable protected btx:chicago:composed-title #title
\btxstartstyleandcolor[chicago:\s!list:#title:\currentbtxcategory]
\begingroup
\language[\currentbtxlanguage]
@@ -883,7 +883,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:title
+\starttexdefinition mutable protected btx:chicago:title
\setmode{btx:chicago:title-placed}
% we make the title active, opening "file"
\btxdoifelse {file} {
@@ -924,7 +924,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:title-if-not-placed
+\starttexdefinition mutable protected btx:chicago:title-if-not-placed
\doifelsemode {btx:chicago:title-placed} {
\resetmode{btx:chicago:title-placed}
} {
@@ -939,7 +939,7 @@
\btxlabeltext{chicago:nd}
\stopsetups
-\starttexdefinition unexpanded btx:chicago:suffixedyear
+\starttexdefinition mutable protected btx:chicago:suffixedyear
\btxdoifelse {year} {
\btxflush{year}
\btxflushsuffix
@@ -964,7 +964,7 @@
% #author may be author(set) or editor
-\starttexdefinition unexpanded btx:chicago:author-or-editor #author
+\starttexdefinition mutable protected btx:chicago:author-or-editor #author
\btxdoifelse {#author} {
\btxstartstyleandcolor[chicago:\s!list:#author]
\btxusecommand[chicago:\s!list:#author]{
@@ -1047,7 +1047,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:authoryear
+\starttexdefinition mutable protected btx:chicago:authoryear
% we make the authoryear active, pointing to the citation
\texdefinition{btx:format:inject}
{internal(\currentbtxinternal)}
@@ -1070,7 +1070,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:editor-in
+\starttexdefinition mutable protected btx:chicago:editor-in
\btxdoif {booktitle} {
\btxlabeltext{In}
\btxspace
@@ -1083,7 +1083,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:organization-if-not-author
+\starttexdefinition mutable protected btx:chicago:organization-if-not-author
\btxdoif {organization} {
\doifnot {\btxfoundname{author}} {organization} {
\btxspace
@@ -1096,7 +1096,7 @@
% TODO: The title is terminated with period. However,
% we probably don't want this before the parenthesis.
-\starttexdefinition unexpanded btx:chicago:leftparenthesis-or-comma
+\starttexdefinition mutable protected btx:chicago:leftparenthesis-or-comma
\doifelsemode {btx:chicago:editionset-is-empty} {
\btxleftparenthesis
\resetmode{btx:chicago:editionset-is-empty}
@@ -1105,7 +1105,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:editionset
+\starttexdefinition mutable protected btx:chicago:editionset
\setmode{btx:chicago:editionset-is-empty}
\doif {\currentbtxcategory} {techreport} {
\texdefinition{btx:chicago:leftparenthesis-or-comma}
@@ -1154,7 +1154,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:journal
+\starttexdefinition mutable protected btx:chicago:journal
\btxstartstyleandcolor[chicago:\s!list:journal]
\btxusecommand [chicago:\s!list:journal] {
\btxflush{journal}
@@ -1162,7 +1162,7 @@
\btxstopstyleandcolor
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:volume
+\starttexdefinition mutable protected btx:chicago:volume
\btxstartstyleandcolor[chicago:\s!list:volume]
\btxflush{volume}
\btxstopstyleandcolor
@@ -1170,7 +1170,7 @@
% this could be simplified!
-\starttexdefinition unexpanded btx:chicago:journal-volume-number-pages
+\starttexdefinition mutable protected btx:chicago:journal-volume-number-pages
\btxdoif {journal} {
\btxspace
\texdefinition{btx:chicago:journal}
@@ -1219,7 +1219,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:wherefrom-publisher
+\starttexdefinition mutable protected btx:chicago:wherefrom-publisher
\btxdoifelse {address} {
\btxflush{address}
\btxdoif {country} {
@@ -1253,7 +1253,7 @@
% use \btxentry here?
-\starttexdefinition unexpanded btx:chicago:url
+\starttexdefinition mutable protected btx:chicago:url
\begingroup
\setbreakpoints[doi]
\ifconditional\btxinteractive
@@ -1270,7 +1270,7 @@
% use \btxentry here?
-\starttexdefinition unexpanded btx:chicago:doi
+\starttexdefinition mutable protected btx:chicago:doi
\begingroup
\setbreakpoints[doi]
\ifconditional\btxinteractive
@@ -1285,7 +1285,7 @@
\endgroup
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:note
+\starttexdefinition mutable protected btx:chicago:note
\btxdoif {note} {
\btxleftparenthesis
\btxflush{note}
@@ -1293,7 +1293,7 @@
}
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:url-doi-note
+\starttexdefinition mutable protected btx:chicago:url-doi-note
\doif {\btxfoundname{doi}} {url} {
\btxspace
\btxlabeltext{chicago:Retrieved}
@@ -1308,7 +1308,7 @@
\removeunwantedspaces
\stoptexdefinition
-\starttexdefinition unexpanded btx:chicago:type
+\starttexdefinition mutable protected btx:chicago:type
\btxdoif {type} {
\btxleftbracket
\btxflush{type}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi
index 3a01b219a65..721985499b6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-cite.mkvi
@@ -13,7 +13,7 @@
\unprotect
-\starttexdefinition unexpanded btx:cite:inject #content
+\starttexdefinition mutable protected btx:cite:inject #content
\ifconditional\btxinteractive
\ifx\currentbtxinternal\empty
#content
@@ -29,7 +29,7 @@
\fi
\stoptexdefinition
-\starttexdefinition unexpanded btx:cite:checkconcat
+\starttexdefinition mutable protected btx:cite:checkconcat
\ifnum\currentbtxcount>\zerocount
\let\currentbtxinternal\empty
\let\currentbtxbacklink\empty
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi
index 281b8324a3e..a5e6bd6de43 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-commands.mkvi
@@ -2,6 +2,8 @@
% for tugboat
+\mutable\protected\def\acro#1{\dontleavehmode{\smallcaps#1}} % can be redefined
+
\definebtxcommand\hbox {\hbox}
\definebtxcommand\vbox {\vbox}
\definebtxcommand\llap {\llap}
@@ -9,7 +11,7 @@
\definebtxcommand\url #1{\hyphenatedurl{#1}}
\definebtxcommand\acro #1{\dontleavehmode{\smallcaps#1}}
-\let\<<
-\let\>>
+\mutable\let\<< % for now \mutable, maybe \definebtxcommand\<{<}
+\mutable\let\>> % for now \mutable, maybe \definebtxcommand\>{>}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi
index fef993fe052..8d9d24b5947 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-default.mkvi
@@ -365,7 +365,7 @@
[\s!default:and=och,
\s!default:number={nr.},
\s!default:edition={Utgåva},
- \s!default:Editor=Redaktör,
+ \s!default:Editor=Redaktör,
\s!default:Editors=Redaktörer,
\s!default:Volume=Band,
\s!default:Volumes=Band,
@@ -374,7 +374,7 @@
% First some helpers:
-\starttexdefinition btx:default:composed-title
+\starttexdefinition mutable protected btx:default:composed-title
\begingroup
\language[\currentbtxlanguage]
\btxflush{title}
@@ -385,7 +385,7 @@
\endgroup
\stoptexdefinition
-\starttexdefinition btx:default:title
+\starttexdefinition mutable protected btx:default:title
\btxdoif {title} {
\btxspace
\btxstartstyleandcolor [default:list:title:\currentbtxcategory]
@@ -397,7 +397,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:default:author
+\starttexdefinition mutable protected btx:default:author
\btxdoif {author} {
\btxflush{author}
\doif {\btxfoundname{author}} {editor} {
@@ -412,12 +412,12 @@
}
\stoptexdefinition
-\starttexdefinition btx:default:year
+\starttexdefinition mutable protected btx:default:year
\btxflush{year}
\btxflushsuffix
\stoptexdefinition
-\starttexdefinition btx:default:journal
+\starttexdefinition mutable protected btx:default:journal
\btxdoif {journal} {
\btxspace
\btxstartstyleandcolor [default:list:journal]
@@ -450,7 +450,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:default:editionset
+\starttexdefinition mutable protected btx:default:editionset
\btxdoif {editionset} {
\removeunwantedspaces
\removepunctuation
@@ -483,7 +483,7 @@
}
\stoptexdefinition
-\starttexdefinition btx:default:publisher
+\starttexdefinition mutable protected btx:default:publisher
\btxdoif {publisher} {
\btxflush{publisher}
\btxcomma
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi
index 295586f60fb..1e9f8ea9bb1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-definitions.mkvi
@@ -27,7 +27,7 @@
\btxfield{short}
\stopxmlsetups
-\starttexdefinition unexpanded btx:format:inject #link #content
+\starttexdefinition mutable protected btx:format:inject #link #content
\ifx\currentbtxinternal\empty
#content
\else\ifconditional\btxinteractive
@@ -86,7 +86,7 @@
% macros:
-\starttexdefinition unexpanded btx:style:italic #content
+\starttexdefinition mutable protected btx:style:italic #content
\dontleavehmode
\begingroup
\it
@@ -95,7 +95,7 @@
\endgroup
\stoptexdefinition
-\starttexdefinition unexpanded btx:style:bold #content
+\starttexdefinition mutable protected btx:style:bold #content
\dontleavehmode
\begingroup
\bf
@@ -103,14 +103,14 @@
\endgroup
\stoptexdefinition
-\starttexdefinition unexpanded btx:style:quote #content
+\starttexdefinition mutable protected btx:style:quote #content
\dontleavehmode
\startquote
#content
\stopquote
\stoptexdefinition
-\starttexdefinition unexpanded btx:style #style #content
+\starttexdefinition mutable protected btx:style #style #content
\doifelsedefined {btx:style:#style} {
\texdefinition{btx:style:#style} {
#content
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
index b00c4bd4012..eec63e515c6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
@@ -13,7 +13,7 @@
\unprotect
-\starttexdefinition unexpanded btx:list:inject:text #content
+\starttexdefinition mutable protected btx:list:inject:text #content
\ifconditional\btxinteractivetext
\ifx\currentbtxinternal\empty
#content
@@ -39,7 +39,7 @@
}
\stopsetups
-\starttexdefinition unexpanded btx:list:inject:number #content
+\starttexdefinition mutable protected btx:list:inject:number #content
\ifconditional\btxinteractivenumber
\ifx\currentbtxinternal\empty
#content
@@ -55,7 +55,7 @@
\fi
\stoptexdefinition
-\starttexdefinition unexpanded btx:list:helpers:concat
+\starttexdefinition mutable protected btx:list:helpers:concat
\space
\stoptexdefinition
@@ -66,7 +66,7 @@
}
\stopsetups
-\starttexdefinition unexpanded btx:list:numbering #variant
+\starttexdefinition mutable protected btx:list:numbering #variant
\btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:#variant]
\btxusecommand[\currentbtxspecification:\s!list:\s!numbering:#variant] {
\fastsetup{\s!btx:\s!list:\s!numbering}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
index da6c74b2e46..ec36be89ad7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.lua
@@ -3500,7 +3500,7 @@ do
function publications.prerollcmdstring(str)
btxstring = str or ""
- tex.runtoks("t_btx_cmd")
+ tex.runlocal("t_btx_cmd")
return nodes.toutf(tex.getbox("b_btx_cmd").list) or str
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv
index 996b6d3cab7..dfed53c7374 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/publ-ini.mkiv
@@ -59,22 +59,24 @@
\startcontextdefinitioncode
-\def\s!btx {btx}
-
-\def\v!btxcite {btxcite}
-\def\v!btxlist {btxlist}
-\def\v!btxrendering {btxrendering}
-
-\def\s!btxset {btxset}
-\def\s!btxref {btxref}
-\def\s!btxint {btxint}
-\def\s!btxltx {btxltx}
-\def\s!btxrtx {btxrtx}
-\def\s!btxatx {btxatx}
-\def\s!btxbtx {btxbtx}
-\def\s!btxspc {btxspc}
-\def\s!btxlst {btxlst}
-\def\s!btxcom {btxcom}
+%D These are currently not interfaced.
+
+\definesystemconstant {btx}
+
+\definesystemconstant {btxset}
+\definesystemconstant {btxref}
+\definesystemconstant {btxint}
+\definesystemconstant {btxltx}
+\definesystemconstant {btxrtx}
+\definesystemconstant {btxatx}
+\definesystemconstant {btxbtx}
+\definesystemconstant {btxspc}
+\definesystemconstant {btxlst}
+\definesystemconstant {btxcom}
+
+\defineinterfacevariable {btxcite} {btxcite}
+\defineinterfacevariable {btxlist} {btxlist}
+\defineinterfacevariable {btxrendering} {btxrendering}
\definelabelclass[btxlabel][2]
@@ -394,6 +396,10 @@
\let\btxsetup\fastsetup
+% This fails when we check field values:
+
+\let\btxrawfield\btxfield
+
\def\btxfield #1{\dostarttagged\t!pubfld{#1}\clf_btxfield {\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
\def\btxdetail #1{\dostarttagged\t!pubfld{#1}\clf_btxdetail{\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
\def\btxflush #1{\dostarttagged\t!pubfld{#1}\clf_btxflush {\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
@@ -679,7 +685,7 @@
\dostarttagged\t!publication\empty
\dotagpublication\currentbtxdataset\currentbtxtag
\redoconvertfont % see (**) in strc-lst, this will become an configuration option
- \edef\currentbtxcategory{\btxfield{category}}%
+ \edef\currentbtxcategory{\btxrawfield{category}}%
\ignorespaces
\ifconditional\c_btx_list_texts
\dostarttagged\t!listtext\s!left
@@ -917,7 +923,7 @@
%D \starttyping
%D % #1 is number of entries
%D
-%D \starttexdefinition unexpanded btx:for:alan:wrapper #1
+%D \starttexdefinition mutable protected btx:for:alan:wrapper #1
%D \bTABLE
%D % we can have a command or setups
%D \flushbtxentries[command=\texdefinition{btx:for:alan:content}]
@@ -926,7 +932,7 @@
%D
%D % #1 is tag
%D
-%D \starttexdefinition unexpanded btx:for:alan:content #1
+%D \starttexdefinition mutable protected btx:for:alan:content #1
%D \bTR
%D \bTD
%D \btxsettag{#1}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/publ-usr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/publ-usr.mkiv
deleted file mode 100644
index cb078f424d5..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/publ-usr.mkiv
+++ /dev/null
@@ -1,2 +0,0 @@
-% todo
-
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi
index c089eb94576..4b50a437d00 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-bar.mkvi
@@ -343,13 +343,13 @@
\ifnum\scratchcounterthree<\plusone \scratchcounterthree\plusone \fi
\scratchcounterfive\zerocount
\dostepwiserecurse\firstsubpage\lastsubpage\plusone
- {\!!doneafalse
+ {\donefalse
\advance\scratchcounterfive \plusone
- \ifnum\recurselevel=\firstsubpage\relax \!!doneatrue \fi
- \ifnum\recurselevel=\lastsubpage \relax \!!doneatrue \fi
+ \ifnum\recurselevel=\firstsubpage\relax \donetrue \fi
+ \ifnum\recurselevel=\lastsubpage \relax \donetrue \fi
\scratchcountersix\therealsubpageno\recurselevel\relax
\c_scrn_bar_mode
- \if!!donea
+ \ifdone
\ifnum\scratchcountersix<\realpageno
\zerocount
\else\ifnum\scratchcountersix>\realpageno
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi
index 0c9b4cfb51b..6c279dfc487 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-but.mkvi
@@ -155,7 +155,7 @@
\def\scrn_button_make#currentparameter#inheritedframed#letparameter#setparameter#text#action%
{\begingroup
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\global\setfalse\c_scrn_button_skipped
\chardef\locationboxpagestate\csname\??buttonlocation#currentparameter\c!samepage\endcsname % ?? bt: todo
\doifelsereferencefound{#action}\scrn_button_make_yes\scrn_button_make_nop
@@ -337,7 +337,7 @@
\let\scrn_menu_define_original\defineinteractionmenu
-\unexpanded\def\defineinteractionmenu
+\unexpanded\overloaded\def\defineinteractionmenu
{\dotripleempty\scrn_menu_define}
\def\scrn_menu_define[#tag][#category][#settings]% category reflects location, settings can be parent
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi
index 7710a32dcb5..6c0e97a9af0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-fld.mkvi
@@ -235,7 +235,7 @@
fontsize {\fontbody}%
fontsymbol {\fieldbodyparameter\c!symbol}%
color {\fieldbodyparameter\c!color}%
- colorvalue \attribute\colorattribute
+ colorvalue \c_attr_color
\ifx\currentfieldbackgroundcolor\empty \else
backgroundcolor {\currentfieldbackgroundcolor}%
backgroundcolorvalue \numexpr\currentfieldbackgroundcolorvalue\relax
@@ -390,6 +390,8 @@
\installparameterhandler \??fieldcontent {fieldcontentframed}
\installparameterhandler \??fieldtotal {fieldtotalframed}
+\installparametersethandler \??fieldcontent {fieldcontentframed}
+
\installsetuphandler \??fieldlabel {fieldlabelframed}
\installsetuphandler \??fieldcontent {fieldcontentframed}
\installsetuphandler \??fieldtotal {fieldtotalframed}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi
index 557ceb5631a..39fef740c24 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi
@@ -231,7 +231,7 @@
% this comes before starttext
\def\scrn_identity_document#1#2%
- {\doifvariable{document}{metadata:#1}{\setupinteraction[#2=\documentvariable{metadata:#1}]}}
+ {\doifdocumentvariable{metadata:#1}{\setupinteraction[#2=\documentvariable{metadata:#1}]}}
\appendtoks % not interfaced i.e. english
\scrn_identity_document {title}\c!title
@@ -242,7 +242,7 @@
\scrn_identity_document {keyword}\c!keyword
\scrn_identity_document{keywords}\c!keyword
\scrn_identity_document {date}\c!date
-\to \everysetupdocument
+\to \everystartdocument % or stop
\setupinteraction
[\c!title=,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi
index 6808bd0b3e4..d0b0fb006a2 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi
@@ -202,7 +202,7 @@
height \dimexpr\currentattachmentheight\relax
depth \dimexpr\currentattachmentdepth \relax
color {\attachmentparameter\c!color}%
- colormodel \attribute\colormodelattribute
+ colormodel \c_attr_colormodel
colorvalue \numexpr\thecolorattribute{\attachmentparameter\c!color}\relax % or are these chardefs
transparencyvalue \numexpr\thetransparencyattribute{\attachmentparameter\c!color}\relax % or are these chardefs
symbol {\currentattachmentsymbol}%
@@ -501,7 +501,7 @@
depth \dimexpr\currentcommentdepth\relax
nx {\commentparameter\c!nx}%
ny {\commentparameter\c!ny}%
- colormodel \attribute\colormodelattribute
+ colormodel \c_attr_colormodel
colorvalue \numexpr\thecolorattribute{\commentparameter\c!color}\relax
transparencyvalue \numexpr\thetransparencyattribute{\commentparameter\c!color}\relax
option {\commentparameter\c!option}% % todo
@@ -605,7 +605,7 @@
{\iflocation
\clf_insertsoundclip
tag {#tag}%
- repeat {\directexternalsoundtrackparameter\c!option}%
+ repeat {\directexternalsoundtracksparameter\c!option}%
\relax
\fi}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua
index 83eecf6a3b3..9e6e24f4d02 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-cjk.lua
@@ -30,7 +30,6 @@ local getprev = nuts.getprev
local getfont = nuts.getfont
local getchar = nuts.getchar
local getid = nuts.getid
-local getattr = nuts.getattr
local getsubtype = nuts.getsubtype
local getwidth = nuts.getwidth
@@ -51,13 +50,11 @@ local userskip_code = gluecodes.userskip
local spaceskip_code = gluecodes.spaceskip
local xspaceskip_code = gluecodes.xspaceskip
-local a_scriptstatus = attributes.private('scriptstatus')
-local a_scriptinjection = attributes.private('scriptinjection')
-
-local categorytonumber = scripts.categorytonumber
-local numbertocategory = scripts.numbertocategory
local hash = scripts.hash
-local numbertodataset = scripts.numbertodataset
+
+local getscriptstatus = scripts.getstatus
+local getscriptdata = scripts.getdata
+local scriptcolors = scripts.colors
local fonthashes = fonts.hashes
local quaddata = fonthashes.quads
@@ -440,6 +437,21 @@ local injectors = { -- [previous] [current]
half_width_close = korean_5,
}
+scriptcolors.korean = "trace:0"
+scriptcolors.chinese = "trace:0"
+scriptcolors.katakana = "trace:0"
+scriptcolors.hiragana = "trace:0"
+scriptcolors.full_width_open = "trace:1"
+scriptcolors.full_width_close = "trace:2"
+scriptcolors.half_width_open = "trace:3"
+scriptcolors.half_width_close = "trace:4"
+scriptcolors.full_width_punct = "trace:5"
+------------.hyphen = "trace:5"
+scriptcolors.non_starter = "trace:6"
+scriptcolors.jamo_initial = "trace:7"
+scriptcolors.jamo_medial = "trace:8"
+scriptcolors.jamo_final = "trace:9"
+
local function process(head,first,last)
if first ~= last then
local lastfont = nil
@@ -449,8 +461,7 @@ local function process(head,first,last)
local upcoming = getnext(first)
local id = getid(first)
if id == glyph_code then
- local a = getattr(first,a_scriptstatus)
- local current = numbertocategory[a]
+ local current = getscriptstatus(first)
local action = injectors[previous]
if action then
action = action[current]
@@ -458,7 +469,7 @@ local function process(head,first,last)
local font = getfont(first)
if font ~= lastfont then
lastfont = font
- set_parameters(font,numbertodataset[getattr(first,a_scriptinjection)])
+ set_parameters(font,getscriptdata(first))
end
action(head,first)
end
@@ -471,10 +482,8 @@ local function process(head,first,last)
local pid = getid(p)
local nid = getid(n)
if pid == glyph_code and nid == glyph_code then
- local pa = getattr(p,a_scriptstatus)
- local na = getattr(n,a_scriptstatus)
- local pcjk = pa and numbertocategory[pa]
- local ncjk = na and numbertocategory[na]
+ local pcjk = getscriptstatus(p)
+ local ncjk = getscriptstatus(n)
if not pcjk or not ncjk
or pcjk == "korean" or ncjk == "korean"
or pcjk == "other" or ncjk == "other"
@@ -711,8 +720,7 @@ local function process(head,first,last)
local upcoming = getnext(first)
local id = getid(first)
if id == glyph_code then
- local a = getattr(first,a_scriptstatus)
- local current = numbertocategory[a]
+ local current = getscriptstatus(first)
local action = injectors[previous]
if action then
action = action[current]
@@ -720,7 +728,7 @@ local function process(head,first,last)
local font = getfont(first)
if font ~= lastfont then
lastfont = font
- set_parameters(font,numbertodataset[getattr(first,a_scriptinjection)])
+ set_parameters(font,getscriptdata(first))
end
action(head,first)
end
@@ -733,10 +741,8 @@ local function process(head,first,last)
local pid = getid(p)
local nid = getid(n)
if pid == glyph_code and nid == glyph_code then
- local pa = getattr(p,a_scriptstatus)
- local na = getattr(n,a_scriptstatus)
- local pcjk = pa and numbertocategory[pa]
- local ncjk = na and numbertocategory[na]
+ local pcjk = getscriptstatus(p)
+ local ncjk = getscriptstatus(n)
if not pcjk or not ncjk
or pcjk == "korean" or ncjk == "korean"
or pcjk == "other" or ncjk == "other"
@@ -940,8 +946,7 @@ local function process(head,first,last)
local upcoming = getnext(first)
local id = getid(first)
if id == glyph_code then
- local a = getattr(first,a_scriptstatus)
- local current = numbertocategory[a]
+ local current = getscriptstatus(first)
local action = injectors[previous]
if action then
action = action[current]
@@ -949,7 +954,7 @@ local function process(head,first,last)
local font = getfont(first)
if font ~= lastfont then
lastfont = font
- set_parameters(font,numbertodataset[getattr(first,a_scriptinjection)])
+ set_parameters(font,getscriptdata(first))
end
action(head,first)
end
@@ -965,10 +970,8 @@ local function process(head,first,last)
local pid = getid(p)
local nid = getid(n)
if pid == glyph_code and nid == glyph_code then
- local pa = getattr(p,a_scriptstatus)
- local na = getattr(n,a_scriptstatus)
- local pcjk = pa and numbertocategory[pa]
- local ncjk = na and numbertocategory[na]
+ local pcjk = getscriptstatus(p)
+ local ncjk = getscriptstatus(n)
if not pcjk or not ncjk
or pcjk == "korean" or ncjk == "korean"
or pcjk == "other" or ncjk == "other"
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua
index f6a994b884b..f20d4b9f50b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-eth.lua
@@ -18,10 +18,10 @@ local getattr = nuts.getattr
local nodecodes = nodes.nodecodes
local glyph_code = nodecodes.glyph
-local a_scriptstatus = attributes.private('scriptstatus')
+local getscriptstatus = scripts.getstatus
-local numbertocategory = scripts.numbertocategory
local inserters = scripts.inserters
+local colors = scripts.colors
-- syllable [zerowidthspace] syllable
-- syllable [zerowidthspace] word
@@ -33,7 +33,6 @@ local inserters = scripts.inserters
-- sentence [space] word
-- sentence [space] sentence
-
local injectors = { -- [previous] [current]
ethiopic_syllable = {
ethiopic_syllable = inserters.zerowidthspace_before,
@@ -52,6 +51,10 @@ local injectors = { -- [previous] [current]
},
}
+colors.ethiopic_syllable = "trace:1"
+colors.ethiopic_word = "trace:2"
+colors.ethiopic_sentence = "trace:3"
+
local function process(head,first,last)
if first ~= last then
local injector = false
@@ -59,8 +62,7 @@ local function process(head,first,last)
while current do
local char, id = ischar(current)
if char then
- local scriptstatus = getattr(current,a_scriptstatus)
- local category = numbertocategory[scriptstatus]
+ local category = getscriptstatus(current)
if injector then
local action = injector[category]
if action then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua
index 3d3aa44066e..ab6fca4dbef 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.lua
@@ -10,6 +10,9 @@ if not modules then modules = { } end modules ['scrp-ini'] = {
-- is finished.
local tonumber, next = tonumber, next
+local setmetatableindex = table.setmetatableindex
+local utfbyte, utfsplit = utf.byte, utf.split
+local gmatch = string.gmatch
local trace_analyzing = false trackers.register("scripts.analyzing", function(v) trace_analyzing = v end)
local trace_injections = false trackers.register("scripts.injections", function(v) trace_injections = v end)
@@ -19,17 +22,12 @@ local trace_splitdetails = false trackers.register("scripts.splitting.details",
local report_preprocessing = logs.reporter("scripts","preprocessing")
local report_splitting = logs.reporter("scripts","splitting")
-local utfbyte, utfsplit = utf.byte, utf.split
-local gmatch = string.gmatch
local attributes = attributes
local nodes = nodes
local context = context
-local texsetattribute = tex.setattribute
-
local nodecodes = nodes.nodecodes
-local unsetvalue = attributes.unsetvalue
local implement = interfaces.implement
@@ -39,14 +37,11 @@ local glue_code = nodecodes.glue
local emwidths = fonts.hashes.emwidths
local exheights = fonts.hashes.exheights
-local a_scriptinjection = attributes.private('scriptinjection')
-local a_scriptsplitting = attributes.private('scriptsplitting')
-local a_scriptstatus = attributes.private('scriptstatus')
+local a_script = attributes.private('script')
local fontdata = fonts.hashes.identifiers
local allocate = utilities.storage.allocate
local setnodecolor = nodes.tracers.colors.set
-local setmetatableindex = table.setmetatableindex
local enableaction = nodes.tasks.enableaction
local disableaction = nodes.tasks.disableaction
@@ -58,9 +53,7 @@ local getchar = nuts.getchar
local getfont = nuts.getfont
local getid = nuts.getid
local getglyphdata = nuts.getglyphdata
-
-local getattr = nuts.getattr
-local setattr = nuts.setattr
+local setglyphdata = nuts.setglyphdata
local isglyph = nuts.isglyph
@@ -69,8 +62,6 @@ local insert_node_before = nuts.insert_before
local first_glyph = nuts.first_glyph
------ traverse_id = nuts.traverse_id
------ traverse_char = nuts.traverse_char
local nextglyph = nuts.traversers.glyph
local nextchar = nuts.traversers.char
@@ -95,6 +86,36 @@ scripts.injectors = handlers
local splitters = allocate()
scripts.splitters = splitters
+-- we need to fake it in luatex
+
+local getscript = node.direct.getscript
+local texsetglyphscript = tex.setglyphscript
+
+if not getscript then
+
+ local getattr = nuts.getattr
+ local texsetattribute = tex.setattribute
+ local unsetvalue = attributes.unsetvalue
+
+ getscript = function(n)
+ local a = getattr(n,a_script)
+ if a and a ~= unsetvalue and a > 0 then
+ return a
+ end
+ end
+
+ texsetglyphscript = function(a)
+ if not a or a == 0 then
+ a = unsetvalue
+ end
+ texsetattribute(a_script,a)
+ end
+
+ nuts.getscript = getscript
+ tex .setglyphscript = texsetglyphscript
+
+end
+
local hash = { -- we could put these presets in char-def.lua
--
-- half width opening parenthesis
@@ -200,10 +221,12 @@ local hash = { -- we could put these presets in char-def.lua
[0x30A5] = "non_starter", [0x30A7] = "non_starter", [0x30A9] = "non_starter", [0x30C3] = "non_starter", [0x30E3] = "non_starter",
[0x30E5] = "non_starter", [0x30E7] = "non_starter", [0x30EE] = "non_starter", [0x30F5] = "non_starter", [0x30F6] = "non_starter",
[0x30FC] = "non_starter", [0x30FD] = "non_starter", [0x30FE] = "non_starter", [0x31F0] = "non_starter", [0x31F1] = "non_starter",
- [0x30F2] = "non_starter", [0x30F3] = "non_starter", [0x30F4] = "non_starter", [0x31F5] = "non_starter", [0x31F6] = "non_starter",
- [0x30F7] = "non_starter", [0x30F8] = "non_starter", [0x30F9] = "non_starter", [0x31FA] = "non_starter", [0x31FB] = "non_starter",
- [0x30FC] = "non_starter", [0x30FD] = "non_starter", [0x30FE] = "non_starter", [0x31FF] = "non_starter",
+ [0x31F2] = "non_starter", [0x31F3] = "non_starter", [0x31F4] = "non_starter", [0x31F5] = "non_starter", [0x31F6] = "non_starter",
+ [0x31F7] = "non_starter", [0x31F8] = "non_starter", [0x31F9] = "non_starter", [0x31FA] = "non_starter", [0x31FB] = "non_starter",
+ [0x31FC] = "non_starter", [0x31FD] = "non_starter", [0x31FE] = "non_starter", [0x31FF] = "non_starter",
--
+ [0x301C] = "non_starter", [0x303B] = "non_starter", [0x303C] = "non_starter", [0x309B] = "non_starter", [0x30FB] = "non_starter",
+ [0x30FE] = "non_starter",
-- hyphenation
--
[0x2026] = "hyphen", -- … ellipsis
@@ -270,6 +293,8 @@ local defaults = {
scripts.defaults = defaults -- so we can add more
+-- todo: copy more efficient than metatable
+
function scripts.installmethod(handler)
local name = handler.name
handlers[name] = handler
@@ -283,20 +308,18 @@ function scripts.installmethod(handler)
for k, v in next, datasets do
setmetatableindex(v,defaults)
end
- setmetatable(attributes, {
- __index = function(t,k)
- local v = datasets[k] or datasets.default
- local a = unsetvalue
- if v then
- v.name = name -- for tracing
- a = #numbertodataset + 1
- numbertodataset[a] = v
- numbertohandler[a] = handler
- end
- t[k] = a
- return a
+ setmetatableindex(attributes, function(t,k)
+ local v = datasets[k] or datasets.default
+ local a = 0
+ if v then
+ v.name = name -- for tracing
+ a = #numbertodataset + 1
+ numbertodataset[a] = v
+ numbertohandler[a] = handler
end
- } )
+ t[k] = a
+ return a
+ end)
handler.attributes = attributes
end
@@ -346,96 +369,124 @@ end
local injectorenabled = false
local splitterenabled = false
+local function getscriptdata(n)
+ local s = getscript(n)
+ if s then
+ return s and numbertodataset[s]
+ end
+end
+
+local function getinjector(n)
+ local s = getscript(n)
+ if s then
+ s = numbertohandler[s]
+ return s and s.injector
+ end
+end
+
+local function getsplitter(n)
+ local s = getscript(n)
+ if s then
+ s = numbertodataset[s]
+ return s and s.splitter
+ end
+end
+
+scripts.getdata = getscriptdata
+scripts.getinjector = getinjector
+scripts.getsplitter = getsplitter
+
function scripts.set(name,method,preset)
local handler = handlers[method]
if handler then
+ local index = handler.attributes[preset]
if handler.injector then
if not injectorenabled then
enableaction("processors","scripts.injectors.handler")
injectorenabled = true
end
- texsetattribute(a_scriptinjection,handler.attributes[preset] or unsetvalue)
end
if handler.splitter then
if not splitterenabled then
enableaction("processors","scripts.splitters.handler")
splitterenabled = true
end
- texsetattribute(a_scriptsplitting,handler.attributes[preset] or unsetvalue)
end
if handler.initializer then
handler.initializer(handler)
handler.initializer = nil
end
+ texsetglyphscript(index)
else
- texsetattribute(a_scriptinjection,unsetvalue)
- texsetattribute(a_scriptsplitting,unsetvalue)
+ texsetglyphscript()
end
end
function scripts.reset()
- texsetattribute(a_scriptinjection,unsetvalue)
- texsetattribute(a_scriptsplitting,unsetvalue)
+ texsetglyphscript()
end
--- the following tables will become a proper installer (move to cjk/eth)
---
-- 0=gray 1=red 2=green 3=blue 4=yellow 5=magenta 6=cyan 7=x-yellow 8=x-magenta 9=x-cyan
-local scriptcolors = allocate { -- todo: just named colors
- korean = "trace:0",
- chinese = "trace:0",
- katakana = "trace:0",
- hiragana = "trace:0",
- full_width_open = "trace:1",
- full_width_close = "trace:2",
- half_width_open = "trace:3",
- half_width_close = "trace:4",
- full_width_punct = "trace:5",
- hyphen = "trace:5",
- non_starter = "trace:6",
- jamo_initial = "trace:7",
- jamo_medial = "trace:8",
- jamo_final = "trace:9",
- ethiopic_syllable = "trace:1",
- ethiopic_word = "trace:2",
- ethiopic_sentence = "trace:3",
- breaking_tsheg = "trace:1",
- nonbreaking_tsheg = "trace:2",
+-- local categories = allocate { -- rather bound to cjk ... will be generalized
+-- "korean",
+-- "chinese",
+-- "katakana",
+-- "hiragana",
+-- "full_width_open",
+-- "full_width_close",
+-- "half_width_open",
+-- "half_width_close",
+-- "full_width_punct",
+-- "hyphen",
+-- "non_starter",
+-- "jamo_initial",
+-- "jamo_medial",
+-- "jamo_final",
+-- "ethiopic_syllable",
+-- "ethiopic_word",
+-- "ethiopic_sentence",
+-- "breaking_tsheg",
+-- "nonbreaking_tsheg",
+-- }
+--
+-- scripts.categories = categories
+
+local scriptcolors = allocate {
+ -- todo: just named colors
+ hyphen = "trace:5",
}
scripts.colors = scriptcolors
-local numbertocategory = allocate { -- rather bound to cjk ... will be generalized
- "korean",
- "chinese",
- "katakana",
- "hiragana",
- "full_width_open",
- "full_width_close",
- "half_width_open",
- "half_width_close",
- "full_width_punct",
- "hyphen",
- "non_starter",
- "jamo_initial",
- "jamo_medial",
- "jamo_final",
- "ethiopic_syllable",
- "ethiopic_word",
- "ethiopic_sentence",
- "breaking_tsheg",
- "nonbreaking_tsheg",
-}
+-- this can become setprop ...
-local categorytonumber = allocate(table.swapped(numbertocategory)) -- could be one table
+local propertydata = nodes.properties.data
-scripts.categorytonumber = categorytonumber
-scripts.numbertocategory = numbertocategory
+local function setscriptstatus(n,s)
+ local p = propertydata[n]
+ if p then
+ p.scriptstatus = s
+ else
+ propertydata[n] = { scriptstatus = s }
+ end
+end
+
+function getscriptstatus(n)
+ local p = propertydata[n]
+ if p then
+ return p.scriptstatus
+ end
+end
+
+scripts.setstatus = setscriptstatus
+scripts.getstatus = getscriptstatus
+
+--
local function colorize(start,stop)
for n in nextglyph, start do
- local kind = numbertocategory[getattr(n,a_scriptstatus)]
+ local kind = getscriptstatus(n)
if kind then
local ac = scriptcolors[kind]
if ac then
@@ -459,13 +510,6 @@ local function traced_process(head,first,last,process,a)
end
end
--- eventually we might end up with more extensive parsing
--- todo: pass t[start..stop] == original
---
--- one of the time consuming functions:
-
--- we can have a fonts.hashes.originals
-
function scripts.injectors.handler(head)
local start = first_glyph(head) -- we already have glyphs here (subtype 1)
if not start then
@@ -476,7 +520,8 @@ function scripts.injectors.handler(head)
while start do
local char, id = isglyph(start)
if char then
- local a = getattr(start,a_scriptinjection)
+ -- local a = getinjector(start)
+ local a = getscript(start)
if a then
if a ~= last_a then
if first then
@@ -494,8 +539,8 @@ function scripts.injectors.handler(head)
first, last = nil, nil
end
last_a = a
- local handler = numbertohandler[a]
- normal_process = handler.injector
+ -- normal_process = a
+ normal_process = getinjector(start)
end
if normal_process then
-- id == font
@@ -513,7 +558,7 @@ function scripts.injectors.handler(head)
end
local h = hash[char]
if h then
- setattr(start,a_scriptstatus,categorytonumber[h])
+ setscriptstatus(start,h)
if not first then
first, last = start, start
else
@@ -750,13 +795,13 @@ function splitters.handler(head) -- todo: also first_glyph test
local current = head
while current do
if getid(current) == glyph_code then
- local a = getattr(current,a_scriptsplitting)
+ local a = getsplitter(current)
if a then
if a ~= attr then
local handler = numbertohandler[a]
tree = handler.tree or { }
attr = a
- proc = handler.splitter
+ proc = a
end
if proc then
local root = tree[getchar(current)]
@@ -813,10 +858,10 @@ end
local last_a, last_f, last_s, last_q
function splitters.insertafter(handler,head,first,last,detail)
- local a = getattr(first,a_scriptsplitting)
+ local a = getscriptdata(first)
local f = getfont(first)
- if a ~= last_a or f ~= last_f then
- last_s = emwidths[f] * numbertodataset[a].inter_word_stretch_factor
+ if a and a ~= last_a or f ~= last_f then
+ last_s = emwidths[f] * data.inter_word_stretch_factor
last_a = a
last_f = f
end
@@ -892,7 +937,7 @@ setmetatableindex(cache_nop,function(t,k) local v = { } t[k] = v return v end)
function autofontfeature.handler(head)
for n, char, font in nextchar, head do
- -- if getattr(n,a_scriptinjection) then
+ -- if getscript(n) then
-- -- already tagged by script feature, maybe some day adapt
-- else
local script = otfscripts[char]
@@ -923,7 +968,7 @@ function autofontfeature.handler(head)
end
end
if attr ~= 0 then
- setattr(n,0,attr)
+ setglyphdata(n,attr)
-- maybe set scriptinjection when associated
end
end
@@ -965,7 +1010,6 @@ implement {
-- some common helpers
-
do
local parameters = fonts.hashes.parameters
@@ -977,7 +1021,8 @@ do
local inter_character_shrink_factor = 1
local function space_glue(current)
- local data = numbertodataset[getattr(current,a_scriptinjection)]
+ -- local data = numbertodataset[getattr(current,a_scriptinjection)]
+ local data = getscriptdata(current)
if data then
inter_character_space_factor = data.inter_character_space_factor or 1
inter_character_stretch_factor = data.inter_character_stretch_factor or 1
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv
index f2d1da62741..4eb3f29e373 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-ini.mkiv
@@ -11,7 +11,30 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-% here we collect code from other places (was organized differently)
+%D The script handler has been upgraded mid June 2020 so there might be issues as I
+%D didn't test everything (yet). It should all be a bit more efficient now in
+%D \LUAMETATEX, although not spectacular. We use no attributes in \LUAMETATEX\ and
+%D only one in \LUATEX\ now.
+%D
+%D A glyph can have (an dget) all kind of properties. Except from the state, these
+%D are assigned within \TEX's grouping model!
+%D
+%D \startitemize
+%D \startitem font \stopitem
+%D \startitem character \stopitem
+%D \startitem language (4 properties packed in an unsigned integer) \stopitem
+%D \startitem data (used for dynamics) \stopitem
+%D \startitem script (used for special script processing) \stopitem
+%D \startitem state (used for analyzing, related to font features) \stopitem
+%D \stopitemize
+%D
+%D Additional properties are set via node list handlers. The state is stored in the
+%D glyph, but additional properties are stored in a node's property table. In the
+%D future the state might get used for something else, in which case we will stire
+%D the state in the property table too. On the other hand, we can now (if we want)
+%D influence the state at the\TEX\ end (not that we do that yet).
+
+%D Todo: as in bidi mode we need a way to globally keep the setting.
\registerctxluafile{scrp-ini}{}
\registerctxluafile{scrp-cjk}{}
@@ -19,13 +42,10 @@
\registerctxluafile{scrp-tha}{}
\registerctxluafile{scrp-tib}{}
-\definesystemattribute[scriptinjection][public,pickup]
-\definesystemattribute[scriptsplitting][public,pickup]
-\definesystemattribute[scriptstatus] [public,pickup]
+\definesystemattribute[script][public,pickup]
-%D Since scripts need specific \LUA\ code we use hard coded attribute
-%D values, but we might have more tricks at some time, so we use a
-%D proper define macro too.
+%D Since scripts need specific \LUA\ code we use hard coded attribute values, but we
+%D might have more tricks at some time, so we use a proper define macro too.
\unprotect
@@ -37,23 +57,17 @@
% presets are global and are currently defined in lua
-\appendtoks
- \setuevalue\currentscript{\setscript[\currentscript]}%
-\to \everydefinescript
+% \appendtoks
+% \setuevalue\currentscript{\setscript[\currentscript]}%
+% \to \everydefinescript
\unexpanded\def\scripts_basics_set
{\clf_setscript{\currentscript}{\scriptparameter\c!method}{\scriptparameter\c!preset}}
-% \unexpanded\def\setscript[#1]%
-% {\edef\currentscript{#1}%
-% \scripts_basics_set}
-
\unexpanded\def\setglobalscript[#1]%
{\edef\currentscript{#1}%
\scripts_basics_set
- \pickupscriptinjectionattribute
- \pickupscriptsplittingattribute
- \pickupscriptstatusattribute}
+ \pickupscriptattribute}
\unexpanded\def\setlocalscript[#1]%
{\edef\currentscript{#1}%
@@ -80,7 +94,7 @@
% \def\scripts_basics_set_splitter_list[#1][#2]%
% {\ctxcommand{setscriptsplitterlist("#1","#2")}
-% \setscript[hangul] \hangul \startscript[hangul]
+% \setscript[hangul] \startscript[hangul]
\definescript [hangul] [\c!method=hangul]
\definescript [hanzi] [\c!method=hanzi]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrp-tib.lua b/Master/texmf-dist/tex/context/base/mkiv/scrp-tib.lua
index b67f6964800..b1d50a469a4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/scrp-tib.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/scrp-tib.lua
@@ -12,25 +12,17 @@ local getnext = nuts.getnext
local getattr = nuts.getattr
local ischar = nuts.ischar
-local a_scriptstatus = attributes.private('scriptstatus')
+local getscriptstatus = scripts.getstatus
-local numbertocategory = scripts.numbertocategory
local inserters = scripts.inserters
+local colors = scripts.colors
local injectors = {
- breaking_tsheg = inserters.space_after,
+ breaking_tsheg = inserters.space_after
}
--- more efficient is to check directly
---
--- local b_tsheg = 0x0F0B -- breaking
--- local n_tsheg = 0x0F0C -- nonbreaking
---
--- if char == b_tsheg then
--- head, current = insert_space_after(head,current)
--- end
---
--- but this is more general
+colors.breaking_tsheg = "trace:1"
+colors.nonbreaking_tsheg = "trace:2"
local function process(head,first,last)
if first ~= last then
@@ -38,14 +30,11 @@ local function process(head,first,last)
while current do
local char, id = ischar(current)
if char then
- local scriptstatus = getattr(current,a_scriptstatus)
- if scriptstatus and scriptstatus > 0 then
- local category = numbertocategory[scriptstatus]
- if category then
- local injector = injectors[category]
- if injector then
- head, current = injector(head,current)
- end
+ local category = getscriptstatus(current)
+ if category then
+ local injector = injectors[category]
+ if injector then
+ head, current = injector(head,current)
end
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua b/Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua
index b277989664b..35116f1f648 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/sort-lan.lua
@@ -11,10 +11,9 @@ if not modules then modules = { } end modules ['sort-lan'] = {
-- to finish in winter.
-- todo: U+1E9E (german SS)
--- Many vectors were supplied by Wolfgang Schuster and Philipp
--- Gesang. However this is a quite adapted and reformatted variant
--- so it needs some checking. Other users provides tables and
--- corrections as well.
+-- Many vectors were supplied by Wolfgang Schuster and Philipp Gesang. However this is
+-- a quite adapted and reformatted variant so it needs some checking. Other users
+-- provides tables and corrections as well.
local utfchar, utfbyte = utf.char, utf.byte
local sorters = sorters
@@ -973,3 +972,42 @@ definitions["jp"] = {
"ら", "ã‚Š", "ã‚‹", "ã‚Œ", "ã‚", "ã‚", "ã‚", "ã‚‘", "ã‚’", "ã‚“",
}
}
+
+-- Hebrew and Jiddish (Marc Trius)
+
+definitions['he'] = {
+ entries = {
+ ['×'] = '×', ['ב'] = 'ב', ['×’'] = '×’', ['ד'] = 'ד', ['×”'] = '×”',
+ ['ו'] = 'ו', ['ז'] = 'ז', ['ח'] = 'ח', ['ט'] = 'ט', ['י'] = 'י',
+ ['כ'] = 'כ', ['ל'] = 'ל', ['מ'] = 'מ', ['נ'] = 'נ', ['ס'] = 'ס',
+ ['ע'] = 'ע', ['פ'] = 'פ', ['צ'] = 'צ', ['ק'] = 'ק', ['ר'] = 'ר',
+ ['ש'] = 'ש', ['ת'] = 'ת',
+ },
+ orders = {
+ "×", "ב", "×’", "ד", "×”", "ו", "×–", "×—", "ט", "×™", "×›",
+ "ל", "מ", "נ", "ס", "ע", "פ", "צ", "ק", "ר", "ש", "ת",
+ }
+}
+
+definitions["yi"] = {
+ parent = "he",
+ entries = {
+ ['×'] = '×', ['ב'] = 'ב', ['ï­Œ'] = 'ï­Œ', ['×’'] = '×’', ['ד'] = 'ד',
+ ['ה'] = 'ה', ['ו'] = 'ו', ['ז'] = 'ז', ['ח'] = 'ח', ['ט'] = 'ט',
+ ['י'] = 'י', ['כּ'] = 'כּ', ['כ'] = 'כ', ['ל'] = 'ל', ['מ'] = 'מ',
+ ['נ'] = 'נ', ['ס'] = 'ס', ['ע'] = 'ע', ['פ'] = 'פ', ['פֿ'] = 'פֿ',
+ ['צ'] = 'צ', ['ק'] = 'ק', ['ר'] = 'ר', ['ש'] = 'ש', ['שׂ'] = 'שׂ',
+ ['תּ'] = 'תּ', ['ת'] = 'ת',
+ },
+ orders = {
+ "×", "ב", "ï­Œ", "×’", "ד", "×”", "ו", "×–", "×—", "ט", "×™", "כּ", "×›", "ל",
+ "מ", "נ", "ס", "ע", "פּ", "פֿ", "צ", "ק", "ר", "ש", "שׂ", "תּ", "ת",
+ },
+ replacements = {
+ { "×Ö·", "×" }, { "×Ö¸", "×" }, { "בּ", "ב" }, { "בֿ", "ï­Œ" }, { "וּ", "ו" },
+ { "×°", "וו" }, { "×±", "וי" }, { "ï¬", "×™" }, { "ײ", "×™×™" }, { "ײַ", "×™×™" },
+ { "×›Ö¼", "כּ" }, { "ך", "×›" }, { "×", "מ" }, { "ן", "× " }, { "פּ", "ï­„" },
+ { "פ", "פּ" }, { "פֿ", "פֿ" }, { "ף", "פֿ" }, { "ץ", "צ" }, { "שׁ", "ש" },
+ { "שׂ", "שׂ" }, { "תּ", "תּ" },
+ },
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
index c30a4fa942d..2e2650f3b7a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['spac-ali'] = {
version = 1.001,
+ optimize = true,
comment = "companion to spac-ali.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -111,7 +112,7 @@ local function handler(head,leftpage,realpageno) -- traverse_list
local head = setlink(new_stretch(3),list) -- prepend
setlist(current,hpack_nodes(head,getwidth(current),"exactly",direction))
if trace_realign then
- report_realign("flushing right. align %a, page %a, realpage %a",align,pageno,realpageno)
+ report_realign("flushing right, align %a, page %a, realpage %a",align,pageno,realpageno)
end
elseif trace_realign then
report_realign("invalid flushing, align %a, page %a, realpage %a",align,pageno,realpageno)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv
index 8451e2494f9..2467f83525b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.mkiv
@@ -33,11 +33,11 @@
\definesystemattribute[alignstate][public] % will make a single attributes for several states
\appendtoks
- \attribute\realignattribute \attributeunsetvalue
- \attribute\alignstateattribute\attributeunsetvalue
+ \c_attr_realign \attributeunsetvalue
+ \c_attr_alignstate\attributeunsetvalue
\to \everyforgetall
-\unexpanded\def\resetrealignsignal{\attribute\realignattribute\attributeunsetvalue}
+\unexpanded\def\resetrealignsignal{\c_attr_realign\attributeunsetvalue}
\unexpanded\def\signalinnerrealign{\clf_setrealign\plustwo}
\unexpanded\def\signalouterrealign{\clf_setrealign\plusone}
@@ -293,7 +293,7 @@
\unexpanded\def\spac_align_set_horizontal_none % should also relax \updateraggedskips
{\raggedstatus\zerocount
- \attribute\alignstateattribute\attributeunsetvalue
+ \c_attr_alignstate\attributeunsetvalue
\leftskip \plusone\leftskip
\rightskip \plusone\rightskip
\spaceskip \zeropoint
@@ -305,7 +305,7 @@
\unexpanded\def\spac_align_set_horizontal_left
{\setraggedness\spac_align_set_raggedness_left
\raggedstatus\plusone
- \attribute\alignstateattribute\plusone
+ \c_attr_alignstate\plusone
\leftskip \plusone\leftskip \s!plus\spac_align_set_raggedness_left
\rightskip \plusone\rightskip\s!plus\zeropoint
\spaceskip \v_spac_align_space_amount
@@ -317,7 +317,7 @@
\unexpanded\def\spac_align_set_horizontal_center
{\setraggedness\spac_align_set_raggedness_middle
\raggedstatus\plustwo
- \attribute\alignstateattribute\plustwo
+ \c_attr_alignstate\plustwo
\leftskip \plusone\leftskip \s!plus\spac_align_set_raggedness_middle
\rightskip \plusone\rightskip\s!plus\spac_align_set_raggedness_middle
\spaceskip \v_spac_align_space_amount
@@ -329,7 +329,7 @@
\unexpanded\def\spac_align_set_horizontal_right
{\setraggedness\spac_align_set_raggedness_right
\raggedstatus\plusthree
- \attribute\alignstateattribute\plusthree
+ \c_attr_alignstate\plusthree
\leftskip \plusone\leftskip \s!plus\zeropoint
\rightskip \plusone\rightskip\s!plus\spac_align_set_raggedness_right
\spaceskip \v_spac_align_space_amount
@@ -340,7 +340,7 @@
\unexpanded\def\spac_align_set_horizontal_very_left
{\raggedstatus\plusone
- \attribute\alignstateattribute\plusone
+ \c_attr_alignstate\plusone
\leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount
\rightskip \plusone\rightskip\s!plus\zeropoint
\spaceskip \v_spac_align_space_amount
@@ -351,7 +351,7 @@
\unexpanded\def\spac_align_set_horizontal_very_center
{\raggedstatus\plustwo
- \attribute\alignstateattribute\plustwo
+ \c_attr_alignstate\plustwo
\leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount
\rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount
\spaceskip \v_spac_align_space_amount
@@ -362,7 +362,7 @@
\unexpanded\def\spac_align_set_horizontal_very_right
{\raggedstatus\plusthree
- \attribute\alignstateattribute\plusthree
+ \c_attr_alignstate\plusthree
\leftskip \plusone\leftskip \s!plus\zeropoint
\rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount
\spaceskip \v_spac_align_space_amount
@@ -374,7 +374,7 @@
\unexpanded\def\spac_align_set_horizontal_wide_center
{\setraggedness\spac_align_set_raggedness_middle
\raggedstatus\plustwo
- \attribute\alignstateattribute\plustwo
+ \c_attr_alignstate\plustwo
\leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount_half
\rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount_half
\spaceskip \v_spac_align_space_amount
@@ -385,7 +385,7 @@
\unexpanded\def\spac_align_set_horizontal_centered_last_line
{\raggedstatus\zerocount
- \attribute\alignstateattribute\attributeunsetvalue
+ \c_attr_alignstate\attributeunsetvalue
\leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount\relax
\rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount_negative\relax
\spaceskip \zeropoint\relax
@@ -396,7 +396,7 @@
\unexpanded\def\spac_align_set_horizontal_flushedright_last_line
{\raggedstatus\zerocount
- \attribute\alignstateattribute\attributeunsetvalue
+ \c_attr_alignstate\attributeunsetvalue
\leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount\relax
\rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount_negative\relax
\spaceskip \zeropoint\relax
@@ -410,7 +410,7 @@
\unexpanded\def\spac_align_set_horizontal_right_tt % a plain command
{\tttf % brrr
\raggedstatus\plusthree
- \attribute\alignstateattribute\plusthree
+ \c_attr_alignstate\plusthree
\leftskip \plusone\leftskip \s!plus\zeropoint\relax
\rightskip \plusone\rightskip\s!plus\spac_align_set_raggedness_right\relax
\spaceskip \zeropoint\relax
@@ -797,7 +797,7 @@
\unexpanded\def\ibox
{\vbox\bgroup
\forgetall
- \let\\=\endgraf
+ \let\\\endgraf
\ifdoublesided\signalinnerrealign\fi
\doifelserightpage\spac_align_set_horizontal_right\spac_align_set_horizontal_left
\let\next}
@@ -805,9 +805,9 @@
\unexpanded\def\obox
{\vbox\bgroup
\forgetall
- \let\\=\endgraf
+ \let\\\endgraf
\ifdoublesided\signalouterrealign\fi
- \doifelserightpage\c_spac_align_state_horizontal_left\spac_align_set_horizontal_right
+ \doifelserightpage\spac_align_set_horizontal_left\spac_align_set_horizontal_right
\let\next}
\let\raggedbox\relax
@@ -882,7 +882,7 @@
\xspaceskip #5\relax
\parfillskip \zeropoint\s!plus#6\relax
\parindent #7\relax
- \attribute\alignstateattribute\ifcase\raggedstatus\attributeunsetvalue\else\raggedstatus\fi}
+ \c_attr_alignstate\ifcase\raggedstatus\attributeunsetvalue\else\raggedstatus\fi}
% older (context) names:
@@ -956,7 +956,7 @@
\dontleavehmode % added in marrakesch at TUG 2006\begingroup
\begingroup
\setlocalhsize % new
- \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
+ \protected\def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
\dowithnextbox
{\hbox to \localhsize
{\ifcase\alignstrutmode\or\strut\fi
@@ -1036,7 +1036,7 @@
\dontleavehmode % added in marrakesch at TUG 2006\begingroup
\begingroup
\setlocalhsize
- \def\\{\egroup\par\doxalignline#1#2#3#4#5#6\bgroup}% inefficient
+ \protected\def\\{\egroup\par\doxalignline#1#2#3#4#5#6\bgroup}% inefficient
\dowithnextbox
{\hbox to \localhsize
{#1\hskip\ifdone#2\else#3\fi#4%
@@ -1230,10 +1230,6 @@
\setvalue{\??reverse\v!normal }{\ifconditional\inlinelefttoright\else\s!reverse\fi}
\setvalue{\??reverse\v!reverse}{\ifconditional\inlinelefttoright \s!reverse\fi}
-\ifcase\contextlmtxmode
- \let\usedirectionparameterreverse\gobbleoneargument
-\else
- \def\usedirectionparameterreverse#1{\begincsname\??reverse#1\c!direction\endcsname}
-\fi
+\let\usedirectionparameterreverse\gobbleoneargument
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua
index 9b8453ca690..fa6eb18a576 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['spac-chr'] = {
version = 1.001,
+ optimize = true,
comment = "companion to spac-chr.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -32,12 +33,11 @@ local getnext = nuts.getnext
local getprev = nuts.getprev
local getattr = nuts.getattr
local setattr = nuts.setattr
-local getlang = nuts.getlang
+local getlanguage = nuts.getlanguage
local setchar = nuts.setchar
local setattrlist = nuts.setattrlist
local getfont = nuts.getfont
local setsubtype = nuts.setsubtype
-local setdisc = nuts.setdisc
local isglyph = nuts.isglyph
local setcolor = nodes.tracers.colors.set
@@ -57,7 +57,6 @@ local new_penalty = nodepool.penalty
local new_glue = nodepool.glue
local new_kern = nodepool.kern
local new_rule = nodepool.rule
-local new_disc = nodepool.disc
local nodecodes = nodes.nodecodes
local gluecodes = nodes.gluecodes
@@ -82,7 +81,7 @@ local fontquads = fonthashes.quads
local setmetatableindex = table.setmetatableindex
-local a_character = attributes.private("characters")
+local a_character = attributes.private("characters") -- this will become a property (or maybe even a field)
local a_alignstate = attributes.private("alignstate")
local c_zero = byte('0')
@@ -130,7 +129,8 @@ end
local function nbsp(head,current)
local para = fontparameters[getfont(current)]
- if getattr(current,a_alignstate) == 1 then -- flushright
+ local attr = getattr(current,a_alignstate) or 0
+ if attr >= 1 or attr <= 3 then -- flushright
head, current = inject_nobreak_space(0x00A0,head,current,para.space,0,0)
else
head, current = inject_nobreak_space(0x00A0,head,current,para.space,para.spacestretch,para.spaceshrink)
@@ -295,30 +295,6 @@ local methods = {
characters.methods = methods
--- function characters.handler(head) -- todo: use traverse_id
--- local current = head
--- while current do
--- local char, id = isglyph(current)
--- if char then
--- local next = getnext(current)
--- local method = methods[char]
--- if method then
--- if trace_characters then
--- report_characters("replacing character %C, description %a",char,lower(chardata[char].description))
--- end
--- local h = method(head,current)
--- if h then
--- head = remove_node(h,current,true)
--- end
--- end
--- current = next
--- else
--- current = getnext(current)
--- end
--- end
--- return head
--- end
-
-- this also works ok in math as we run over glyphs and these stay glyphs ... not sure
-- about scripts and such but that is not important anyway ... some day we can consider
-- special definitions in math
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv
index 23f4ac8dd64..9113dc6a110 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-chr.mkiv
@@ -29,7 +29,7 @@
%D them in a string. So this needs thinking. Not that we can compare the
%D nobreakspace now anyway.
-% \unexpanded\def\specialspacecharacter#1{\begingroup\attribute\charactersattribute#1\ \endgroup}
+% \unexpanded\def\specialspacecharacter#1{\begingroup\c_attr_characters#1\ \endgroup}
%
% \unexpanded\edef\nobreakspace {\specialspacecharacter{"00A0}} % 1 = left
% \unexpanded\edef\ideographicspace {\specialspacecharacter{"2000}}
@@ -54,6 +54,8 @@
% Making them active is also not an option unless we do that in every
% catcode vector.
+\pushoverloadmode
+
% \nobreakspace {\begingroup\setalignstateattribute\normalUchar"00A0\endgroup} % 1 = left
\edef\nobreakspace {\normalUchar"00A0} % space
\edef\softhyphen {\normalUchar"00AD} % softhyohen
@@ -63,6 +65,9 @@
\let\ideographicspace \enquad
\let\ideographichalffillspace \emquad
+\unletfrozen\hairspace
+\unletfrozen\sixperemspace
+
\edef\twoperemspace {\normalUchar"2002} % quad/2
% % "2003 % quad == \quad == \hskip\emwidth
\edef\threeperemspace {\normalUchar"2004} % quad/3
@@ -88,6 +93,8 @@
\let\zwj \zerowidthjoiner
\let\nbsp \nobreakspace
+\popoverloadmode
+
\chardef\optionalspace"1F % will be space unless before punctuation
% Shortcuts:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv
index 4c3c0c0421f..a64171247e3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-flr.mkiv
@@ -168,6 +168,23 @@
[\c!alternative=\v!space,
\c!distance=3\emwidth]
+% bonus:
+
+\definefiller
+ [dotfill]
+ [\c!symbol=\textperiod,
+ \c!style=\v!normal,
+ \c!method=\v!middle,
+ \c!width=.5\emwidth,
+ \c!leftmargin=.2\emwidth,
+ \c!rightmargin=.2\emwidth]
+
+\let\mathdotfill\dotfill
+
+\unexpanded\def\textdotfill{\filler[dotfill]}
+
+\unexpanded\def\dotfill{\mathortext\mathdotfill\textdotfill}
+
% maybe box -> symbol
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv
index 72d017836f6..482d0cf2ef6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv
@@ -300,6 +300,14 @@
\normalstartbaselinecorrection
\fi}
+%D Different in LMTX, maybe here we can use this in \MKIV:
+%D
+%D \let\checkprevdepth\forcestrutdepth % mlv only
+%D
+%D as we have sync issues that makes it not work otherwise.
+
+\let\checkprevdepth\baselinecorrection
+
% This is new (and experimental) and might replace some of the above. beware it doesn't always work
% out well, e.g. when used grouped and such (e.g. before display math doesn't work out well).
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv
index 0f65eea3310..16a1a0d4e9a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-hor.mkiv
@@ -210,12 +210,12 @@
%D Here come the handlers (still rather messy ... we need states).
-\newif\ifindentation \indentationtrue % will become a mode
+%newif\ifindentation \indentationtrue % will become a mode
\let\checkindentation\relax
\installmacrostack\checkindentation
-\installmacrostack\ifindentation
+%installmacrostack\ifindentation
\def\spac_indentation_remove
{\ifzeropt\parindent \else
@@ -225,20 +225,20 @@
\fi}
\def\spac_indentation_kill_indeed
- {\global\indentationfalse
+ {%\global\indentationfalse
\spac_indentation_remove}
\def\spac_indentation_do_toggle_indeed
- {\global\indentationfalse
+ {%\global\indentationfalse
\glet\checkindentation\spac_indentation_no_toggle_indeed
\spac_indentation_remove}
\def\spac_indentation_no_toggle_indeed
- {\global\indentationtrue
+ {%\global\indentationtrue
\glet\checkindentation\spac_indentation_do_toggle_indeed}
\def\spac_indentation_do_indeed
- {\global\indentationtrue}
+ {}%\global\indentationtrue}
\def\spac_indentation_do_toggle
{\glet\checkindentation\spac_indentation_do_toggle_indeed}
@@ -264,13 +264,13 @@
\def\spac_indentation_variant_no % made global
{\ifinpagebody \else
- \global\indentationfalse
+ %\global\indentationfalse
\glet\checkindentation\spac_indentation_no_next_check
\fi}
\def\nonoindentation % bv bij floats
{\ifinpagebody \else
- \global\indentationtrue
+ %\global\indentationtrue
\glet\checkindentation\spac_indentation_do_indeed
\fi}
@@ -478,11 +478,20 @@
%D from now on we treat it as a normal space and not as a space with \type
%D {sfcode} 1000.
+% \unexpanded\def\specialspaceprimitive
+% {\begingroup
+% % so, no fancy extra spacing after: foo i.e.\ bar
+% \nonfrenchspacing\normalspaceprimitive
+% \endgroup}
+
\unexpanded\def\specialspaceprimitive
- {\begingroup
- % so, no fancy extra spacing after: foo i.e.\ bar
- \nonfrenchspacing\normalspaceprimitive
- \endgroup}
+ {% is a current state, set explicitly or when a character is appended
+ \ifhmode
+ \spacefactor\plusthousand
+ \else
+ \dontleavehmode
+ \fi
+ \normalspaceprimitive}
\unexpanded\def\normalnotobeyedspace
{\mathortext\normalspaceprimitive\specialspaceprimitive} % no \dontleavehmode\space (else no frenchspacing)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv
index d862f6d8109..aaa73d19490 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-lin.mkiv
@@ -74,6 +74,42 @@
\let\spac_lines_break \relax
\let\spac_after_first_obeyed_line\relax
+\let\spac_lines_indent \relax
+
+%D See \type {indentation-005.tex}:
+%D
+%D \starttyping
+%D \setuplines[indentlist={0pt,10pt,15pt,20pt}]
+%D
+%D \setupindenting[yes,1em]
+%D \setuplines[indentlist={0pt,*,*}]
+%D
+%D \setuplines[indentlist={0pt,1em,*}]
+%D \starttyping
+
+\newcount\c_spac_lines_indent_cnt
+\newcount\c_spac_lines_indent_max
+\newdimen\d_spac_lines_indent
+
+\def\spac_lines_indent_indeed
+ {\ifnum\c_spac_lines_indent_cnt=\c_spac_lines_indent_max
+ \c_spac_lines_indent_cnt\plusone
+ \else
+ \advance\c_spac_lines_indent_cnt\plusone
+ \fi
+ \getfromcommacommand[\m_spac_lines_indentlist][\c_spac_lines_indent_cnt]%
+ \ifx\commalistelement\wildcardsymbol
+ \hskip\d_spac_lines_indent
+ \else
+ \scratchdimen\dimexpr\commalistelement\relax
+ \hskip\ifdim\scratchdimen=\zeropoint
+ \zeropoint
+ \else
+ \scratchdimen
+ \d_spac_lines_indent\scratchdimen
+ \fi
+ \fi
+ \relax}
\def\spac_lines_start_indeed[#1]% new: optional second argument (WS)
{\iffirstargument
@@ -96,23 +132,38 @@
\typesettinglinestrue
\setupwhitespace[\v!none]% todo use fast variant
%\obeylines % move upwards to keep spaces in the first line due to optional argument
+ %
+ \edef\m_spac_lines_indentlist{\linesparameter\c!indentlist}%
+ \getcommacommandsize[\m_spac_lines_indentlist]%
+ \c_spac_lines_indent_max\commalistsize
+ \c_spac_lines_indent_cnt\zerocount
+ \ifnum\c_spac_lines_indent_max>\plusone
+ \let\spac_lines_indent\spac_lines_indent_indeed
+ \d_spac_lines_indent\d_spac_indentation_par
+ \else
+ \let\spac_lines_indent\relax
+ \fi
+ %
\ignorespaces
\glet\spac_after_first_obeyed_line\spac_lines_after_first_obeyed_line_a
- \let\obeyedline\spac_lines_obeyed_line
+ \enforced\let\obeyedline\spac_lines_obeyed_line
\activatespacehandler{\linesparameter\c!space}%
\dostarttagged\t!line\empty
- \GotoPar} % this will become a nice lowercased helper
+ \ignorepars}
+
% we could have states instead and handle option in there
\def\spac_lines_after_first_obeyed_line_a % tzt two pass, like itemize
{\linesparameter\c!command
+ \spac_lines_indent
\linesparameter\c!left
\glet\spac_after_first_obeyed_line\spac_lines_after_first_obeyed_line_b}
\def\spac_lines_after_first_obeyed_line_b
{\spac_lines_break
\linesparameter\c!command
+ \spac_lines_indent
\linesparameter\c!left}
\def\spac_lines_obeyed_line
@@ -120,7 +171,7 @@
\dostoptagged % can be a dummy one as we don't look ahead
\par
\dostarttagged\t!line\empty
- \futurelet\next\spac_lines_between}
+ \futurelet\nexttoken\spac_lines_between}
\unexpanded\def\spac_lines_stop
{\dostoptagged
@@ -131,10 +182,10 @@
\egroup}
\def\spac_lines_between
- {\ifx\next\spac_lines_stop
+ {\ifx\nexttoken\spac_lines_stop
\donefalse
\else
- \doifelsemeaning\next\obeyedline % brrr
+ \doifelsemeaning\nexttoken\obeyedline % brrr
{\donefalse\linesparameter\c!inbetween}
{\donetrue\spac_after_first_obeyed_line}%
\fi}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv
index 7678cc34bdd..752d5c05904 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-par.mkiv
@@ -15,13 +15,19 @@
\unprotect
-%D The dreadful sequence \type {\bgroup} \unknown\
-%D \type {\carryoverpar} \unknown\ \type {\egroup} is needed
-%D when for instance sidefloats are used in combination with
-%D something that starts with a group. This is because
-%D otherwise the indentation as set (by the output routine)
-%D inside the group are forgotten afterwards. (I must
-%D not forget its existence).
+%D The dreadful sequence \type {\bgroup} \unknown\ \type {\carryoverpar} \unknown\
+%D \type {\egroup} is needed when for instance sidefloats are used in combination
+%D with something that starts with a group. This is because otherwise the
+%D indentation as set (by the output routine) inside the group are forgotten
+%D afterwards. (I must not forget its existence).
+
+% Todo (maybe):
+%
+% \parshape \getparshape\relax
+% \interlinepenalties \getinterlinepenalties\relax
+% \clubpenalties \getclubpenalties\relax
+% \widowpenalties \getwidowpenalties\relax
+% \displaywidowpenalties\getdisplaywidowpenalties\relax
\def\carryoverpar#1% #1 can be \endgroup or \egroup or ... expandable !
{\normalexpanded
@@ -30,7 +36,8 @@
\hangafter \the\hangafter
\parskip \the\parskip
\leftskip \the\leftskip
- \rightskip \the\rightskip}}
+ \rightskip \the\rightskip
+ \relax}}
\unexpanded\def\pushparagraphproperties
{\edef\currentparagraphproperties{\carryoverpar\relax}%
@@ -43,8 +50,27 @@
\unexpanded\def\flushparagraphproperties
{\popmacro\currentparagraphproperties}
-% Beware, changing this will break some code (like pos/backgrounds) but
-% it has been changed anyway so let's see where things go wrong.
+%D New experimental stuff, not supported in \MKIV:
+
+\let\freezeparagraphproperties \relax
+\let\defrostparagraphproperties\relax
+\let\setparagraphfreezing \relax
+\let\forgetparagraphfreezing \relax
+\let\updateparagraphproperties \relax
+\let\updateparagraphpenalties \relax
+\let\updateparagraphdemerits \relax
+\let\updateparagraphshapes \relax
+
+\let\updateparwrapper \relax
+\let\forgetparwrapper \relax
+\let\registerparwrapper\gobblethreearguments
+\let\directparwrapper \gobbletwoarguments
+
+\let\spac_paragraph_wrap \relax
+\let\spac_paragraph_freeze\relax
+
+%D Beware, changing this will break some code (like pos/backgrounds) but it has been
+%D changed anyway so let's see where things go wrong.
\installcorenamespace{paragraphintro}
@@ -133,11 +159,11 @@
\gtoksapp\t_spac_paragraphs_intro_first{#1}%
\glet\insertparagraphintro\spac_paragraphs_flush_intro}
-%D Here comes the flusher (we misuse the one level expansion of token
-%D registers to feed a nice stream into the paragraph.)
+%D Here comes the flusher (we misuse the one level expansion of token registers to
+%D feed a nice stream into the paragraph.)
-\unexpanded\def\spac_paragraphs_flush_intro % we make sure that the token lists expand directly after another
- {\normalexpanded{% % so the first code is there twice
+\unexpanded\def\spac_paragraphs_flush_intro % we make sure that the token lists expand directly
+ {\normalexpanded{% % after another so the first code is there twice
\ifconditional\c_spac_paragraphs_intro_each
\ifconditional\c_spac_paragraphs_intro_next
\glet\insertparagraphintro\spac_paragraphs_flush_intro_next
@@ -180,8 +206,8 @@
%D \macros
%D {flushatnextpar}
%D
-%D This macro collects data that will be flushed at the next paragraph.
-%D By using this macro you can avoid interfering nodes (writes, etc).
+%D This macro collects data that will be flushed at the next paragraph. By using
+%D this macro you can avoid interfering nodes (writes, etc).
\let\flushpostponednodedata\relax % hook into everypar
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
index 7731b21f7e1..2223c77302d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.lua
@@ -17,7 +17,6 @@ local formatters = string.formatters
local nodecodes = nodes.nodecodes
local gluecodes = nodes.gluecodes
local listcodes = nodes.listcodes
-local leadercodes = nodes.leadercodes
local glyph_code = nodecodes.glyph
local disc_code = nodecodes.disc
@@ -31,8 +30,7 @@ local math_code = nodecodes.math
local rule_code = nodecodes.rule
local marginkern_code = nodecodes.marginkern
-local leaders_code = leadercodes.leaders
-
+local leaders_code = gluecodes.leaders
local lineskip_code = gluecodes.lineskip
local baselineskip_code = gluecodes.baselineskip
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi
index 9a00da395e2..ac0a2f4e15c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-prf.mkvi
@@ -70,7 +70,7 @@
\relax}
\unexpanded\def\resetprofile
- {\attribute\profilemethodattribute\attributeunsetvalue}
+ {\c_attr_profilemethod\attributeunsetvalue}
\unexpanded\def\useprofileparameter#getparameter%
{\edef\m_spac_profile_asked{#getparameter\c!profile}%
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua
index 33b81e5c7e8..2fc9263213c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['spac-ver'] = {
version = 1.001,
+ optimize = true,
comment = "companion to spac-ver.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -38,6 +39,7 @@ local unpack = unpack or table.unpack
local allocate = utilities.storage.allocate
local todimen = string.todimen
local formatters = string.formatters
+local abs = math.abs
local nodes = nodes
local trackers = trackers
@@ -180,11 +182,10 @@ local gluecodes = nodes.gluecodes
local penalty_code = nodecodes.penalty
local kern_code = nodecodes.kern
local glue_code = nodecodes.glue
-local insert_code = nodecodes.ins
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local rule_code = nodecodes.rule
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local userskip_code = gluecodes.userskip
local lineskip_code = gluecodes.lineskip
@@ -292,7 +293,7 @@ end
local function validvbox(parentid,list)
if parentid == hlist_code then
local id = getid(list)
- if id == localpar_code and start_of_par(list) then
+ if id == par_code and start_of_par(list) then
list = getnext(list)
if not next then
return nil
@@ -328,7 +329,7 @@ local function already_done(parentid,list,a_snapmethod) -- todo: done when only
-- problem: any snapped vbox ends up in a line
if list and parentid == hlist_code then
local id = getid(list)
- if id == localpar_code and start_of_par(list) then
+ if id == par_code and start_of_par(list) then
list = getnext(list)
if not list then
return false
@@ -1262,7 +1263,7 @@ do
end
end
-- in fact, we could try again later ... so then no remove (a few tries)
- return remove_node(head, current, true)
+ return remove_node(head,current,true)
end
local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also pass tail
@@ -1500,7 +1501,7 @@ do
-- if trace then
-- trace_done("removed penalty",current)
-- end
- -- head, current = remove_node(head, current, true)
+ -- head, current = remove_node(head,current,true)
current = getnext(current)
elseif id == kern_code then
if snap and trace_vsnapping and getkern(current) ~= 0 then
@@ -1538,7 +1539,7 @@ do
if trace then
trace_skip("penalty in skip",sc,so,sp,current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
elseif not sc then -- if not sc then
if glue_data then
if trace then
@@ -1561,7 +1562,7 @@ do
if trace then
trace_natural("removed",current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
if trace then
trace_natural("collapsed",previous)
end
@@ -1586,7 +1587,7 @@ do
if trace then
trace_skip(sc == disable and "disable" or "enable",sc,so,sp,current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
else
current = next
end
@@ -1595,12 +1596,12 @@ do
trace_skip("packed",sc,so,sp,current)
end
-- can't happen !
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
elseif sc == nowhite then
local next = getnext(current)
if next then
ignore_whitespace = true
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
else
current = next
end
@@ -1608,7 +1609,7 @@ do
if trace then
trace_skip("discard",sc,so,sp,current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
elseif sc == overlay then
-- todo (overlay following line over previous
if trace then
@@ -1621,20 +1622,20 @@ do
if trace then
trace_skip("disabled",sc,so,sp,current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
elseif not glue_data then
if trace then
trace_skip("assign",sc,so,sp,current)
end
glue_order = so
- head, current, glue_data = remove_node(head, current)
+ head, current, glue_data = remove_node(head,current)
elseif glue_order < so then
if trace then
trace_skip("force",sc,so,sp,current)
end
glue_order = so
flush_node(glue_data)
- head, current, glue_data = remove_node(head, current)
+ head, current, glue_data = remove_node(head,current)
elseif glue_order == so then
-- is now exclusive, maybe support goback as combi, else why a set
if sc == largest then
@@ -1650,7 +1651,7 @@ do
if trace then
trace_skip("remove smallest",sc,so,sp,current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
end
elseif sc == goback then
if trace then
@@ -1665,34 +1666,34 @@ do
trace_skip("force",sc,so,sp,current)
end
flush_node(glue_data)
- head, current, glue_data = remove_node(head, current)
+ head, current, glue_data = remove_node(head,current)
elseif sc == penalty then
if trace then
trace_skip("penalty",sc,so,sp,current)
end
flush_node(glue_data)
glue_data = nil
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
elseif sc == add then
if trace then
trace_skip("add",sc,so,sp,current)
end
local cwidth, cstretch, cshrink = getglue(current)
local gwidth, gstretch, gshrink = getglue(glue_data)
- setglue(old,gwidth + cwidth, gstretch + cstretch, gshrink + cshrink)
+ setglue(glue_data,gwidth + cwidth, gstretch + cstretch,gshrink + cshrink)
-- toto: order
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
else
if trace then
trace_skip("unknown",sc,so,sp,current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
end
else
if trace then
trace_skip("unknown",sc,so,sp,current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
end
if sc == force then
force_glue = true
@@ -1747,7 +1748,7 @@ do
if trace then
trace_natural("ignored parskip",current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
elseif glue_data then
local w = getwidth(current)
if (w ~= 0) and (w > getwidth(glue_data)) then
@@ -1755,18 +1756,18 @@ do
if trace then
trace_natural("taking parskip",current)
end
- head, current = remove_node(head, current)
+ head, current = remove_node(head,current)
else
if trace then
trace_natural("removed parskip",current)
end
- head, current = remove_node(head, current, true)
+ head, current = remove_node(head,current,true)
end
else
if trace then
trace_natural("honored parskip",current)
end
- head, current, glue_data = remove_node(head, current)
+ head, current, glue_data = remove_node(head,current)
end
elseif subtype == topskip_code or subtype == splittopskip_code then
local next = getnext(current)
@@ -1901,18 +1902,6 @@ do
return head
end
- -- alignment after_output end box new_graf vmode_par hmode_par insert penalty before_display after_display
- -- \par -> vmode_par
- --
- -- status.best_page_break
- -- tex.lists.best_page_break
- -- tex.lists.best_size (natural size to best_page_break)
- -- tex.lists.least_page_cost (badness of best_page_break)
- -- tex.lists.page_head
- -- tex.lists.contrib_head
-
- -- do
-
local stackhead, stacktail, stackhack = nil, nil, false
local function report(message,where,lst)
@@ -1929,7 +1918,6 @@ do
local forceflush = false
function vspacing.pagehandler(newhead,where)
- -- local newhead = texlists.contrib_head
if newhead then
local newtail = find_node_tail(newhead) -- best pass that tail, known anyway
local flush = false
@@ -1971,11 +1959,9 @@ do
if stackhack then
stackhack = false
if trace_collect_vspacing then report("%s > processing %s nodes: %s",where,newhead) end
- -- texlists.contrib_head = collapser(newhead,"page",where,trace_page_vspacing,true,a_snapmethod)
newhead = collapser(newhead,"page",where,trace_page_vspacing,true,a_snapmethod)
else
if trace_collect_vspacing then report("%s > flushing %s nodes: %s",where,newhead) end
- -- texlists.contrib_head = newhead
end
return newhead
else
@@ -1992,20 +1978,6 @@ do
return nil
end
- -- function vspacing.flushpagestack()
- -- if stackhead then
- -- local head = texlists.contrib_head
- -- if head then
- -- local tail = find_node_tail(head)
- -- setlink(tail,stackhead)
- -- else
- -- texlists.contrib_head = tonode(stackhead)
- -- end
- -- stackhead, stacktail = nil, nil
- -- end
- --
- -- end
-
function vspacing.pageoverflow()
local h = 0
if stackhead then
@@ -2156,32 +2128,49 @@ do
end
end
- local trace = false
+ local trace = false
+ local last = nil
+ local vmode_code = tex.modelevels.vertical
+ local temp_code = nodecodes.temp
+ local getnest = tex.getnest
+ local getlist = tex.getlist
trackers.register("vspacing.forcestrutdepth",function(v) trace = v end)
- local last = nil
+ -- abs : negative is inner
- -- function vspacing.forcestrutdepth(n,depth,trace_mode,plus)
- -- local box = texgetbox(n)
- -- if box then
- -- box = tonut(box)
- -- local head = getlist(box)
- -- if head then
- -- local tail = find_node_tail(head)
- -- if tail and getid(tail) == hlist_code then
- -- local dp = getdepth(tail)
- -- if dp < depth then
- -- setdepth(tail,depth)
- -- outer.prevdepth = depth
- -- if trace or trace_mode > 0 then
- -- nuts.setvisual(tail,"depth")
- -- end
- -- end
- -- end
- -- end
- -- end
- -- end
+ function vspacing.checkstrutdepth(depth)
+ local nest = getnest()
+ if abs(nest.mode) == vmode_code and nest.head then
+ local tail = nest.tail
+ local id = tail.id
+ if id == hlist_code then
+ if tail.depth < depth then
+ tail.depth = depth
+ end
+ nest.prevdepth = depth
+ elseif id == temp_code and getnest("ptr") == 0 then
+ local head = getlist("page_head")
+ if head then
+ tail = nodes.tail(head)
+ if tail and tail.id == hlist_code then
+ if tail.depth < depth then
+ tail.depth = depth
+ end
+ nest.prevdepth = depth
+ -- only works in lmtx
+ texset("pagedepth",depth)
+ end
+ end
+ end
+ end
+ end
+
+ interfaces.implement {
+ name = "checkstrutdepth",
+ arguments = "dimension",
+ actions = vspacing.checkstrutdepth,
+ }
function vspacing.forcestrutdepth(n,depth,trace_mode,plus)
local box = texgetbox(n)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv
index 6ed1847c577..3f330a267f4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkiv
@@ -66,7 +66,7 @@
\def\normalskipamount
{\openlineheight
- \ifgridsnapping \else \ifblankflexible
+ \ifgridsnapping \else \ifconditional\c_spac_whitespace_flexible
\s!plus \skipgluefactor\openlineheight
\s!minus\skipgluefactor\openlineheight
\fi \fi
@@ -166,17 +166,11 @@
\installmacrostack\currentinterlinespace
\unexpanded\def\setupinterlinespace
- {\dodoubleempty\spac_linespacing_setup}
+ {\dosingleempty\spac_linespacing_setup}
-\ifdefined\setupinterlinespace_double \else
- \let\setupinterlinespace_double\setup_interlinespace % for a while
-\fi
-
-\def\spac_linespacing_setup[#1][#2]%
+\def\spac_linespacing_setup[#1]%
{\settrue\interlinespaceisset % reset has to be done when needed
- \ifsecondargument
- \setupinterlinespace_double[#1][#2]%
- \else\iffirstargument
+ \iffirstargument
\ifcsname\namedinterlinespacehash{#1}\s!parent\endcsname
\edef\currentinterlinespace{#1}%
\spac_linespacing_setup_specified_interline_space
@@ -187,7 +181,7 @@
\else
\let\currentinterlinespace\empty
\spac_linespacing_synchronize_local
- \fi\fi}
+ \fi}
\def\spac_linespacing_setup_specified_or_relative[#1]%
{\doifelseassignment{#1}\setupspecifiedinterlinespace\setuprelativeinterlinespace[#1]%
@@ -738,19 +732,19 @@
\unexpanded\def\setmaxdepth
{\maxdepth\systemmaxdepthfactor\globalbodyfontsize}
-\let\normalbaselineskip \relax \newskip \normalbaselineskip % these got lost in the transition to mkiv due
-\let\normallineskip \relax \newskip \normallineskip % to auto-\normal* definitions and registers
-\let\normallineskiplimit\relax \newdimen\normallineskiplimit % being protected
+\newskip \usedbaselineskip
+\newskip \usedlineskip
+\newdimen\usedlineskiplimit
\unexpanded\def\normalbaselines
- {\baselineskip \normalbaselineskip
- \lineskip \normallineskip
- \lineskiplimit\normallineskiplimit}
+ {\baselineskip \usedbaselineskip
+ \lineskip \usedlineskip
+ \lineskiplimit\usedlineskiplimit}
\unexpanded\def\flexiblebaselines
- {\baselineskip \normalbaselineskip
- \lineskip 1\normallineskip \s!plus 1\s!fill
- \lineskiplimit\normallineskiplimit}
+ {\baselineskip \usedbaselineskip
+ \lineskip 1\usedlineskip \s!plus 1\s!fill
+ \lineskiplimit\usedlineskiplimit}
\unexpanded\def\setnormalbaselines
{\ifdim\normallineheight>\zeropoint
@@ -770,13 +764,13 @@
\ifdim\dimexpr\minimumstrutdepth+\minimumstrutheight\relax>\zeropoint
\openlineheight\dimexpr\openstrutheight+\openstrutdepth\relax % new
\fi
- \normalbaselineskip\openlineheight
+ \usedbaselineskip\openlineheight
\ifgridsnapping\else
\s!plus \m_spac_vertical_baseline_stretch_factor\openlineheight
\s!minus\m_spac_vertical_baseline_shrink_factor \openlineheight
\fi
- \normallineskip\minimumlinedistance\relax % \onepoint\relax
- \normallineskiplimit\zeropoint\relax
+ \usedlineskip\minimumlinedistance\relax % \onepoint\relax
+ \usedlineskiplimit\zeropoint\relax
\normalbaselines}
\unexpanded\def\spacing#1% vertical
@@ -818,9 +812,9 @@
\openstrutheight \the\openstrutheight
\openstrutdepth \the\openstrutdepth
\openlineheight \the\openlineheight
- \normalbaselineskip \the\normalbaselineskip
- \normallineskip \the\normallineskip
- \normallineskiplimit\the\normallineskiplimit
+ \usedbaselineskip \the\usedbaselineskip
+ \usedlineskip \the\usedlineskip
+ \usedlineskiplimit \the\usedlineskiplimit
\noexpand\def\noexpand\normallineheight{\the\dimexpr\normallineheight}%
\noexpand\normalbaselines}}
@@ -1351,11 +1345,6 @@
\let\oninterlineskip\relax
-\unexpanded\def\leaveoutervmode
- {\ifvmode\ifinner\else
- \leavevmode
- \fi\fi}
-
\unexpanded\def\resetpenalties#1%
{\ifdefined#1%
#1\minusone
@@ -1500,14 +1489,14 @@
\newdimen \globalbodyfontstrutheight
\newdimen \globalbodyfontstrutdepth
-\def\snappedvboxattribute{\ifgridsnapping attr \snapvboxattribute \attribute\snapmethodattribute\fi}
-\def\setlocalgridsnapping{\ifgridsnapping \attribute \snapvboxattribute \attribute\snapmethodattribute\fi}
+\def\snappedvboxattribute{\ifgridsnapping attr\snapvboxattribute\c_attr_snapmethod\fi}
+\def\setlocalgridsnapping{\ifgridsnapping \c_attr_snapvbox \c_attr_snapmethod\fi}
\def\spac_grids_set_local_snapping#1%
{\ifgridsnapping
\doifsomething{#1}%
{\spac_grids_snap_value_set{#1}%
- \attribute \snapvboxattribute \attribute\snapmethodattribute}%
+ \c_attr_snapvbox\c_attr_snapmethod}%
\fi}
% \unexpanded\def\installsnapvalues#1#2% todo: a proper define
@@ -1515,7 +1504,7 @@
% \ifcsname\??gridsnapperattributes\currentsnapper\endcsname \else
% \setevalue{\??gridsnapperattributes\currentsnapper}{\clf_definesnapmethod{#1}{#2}}%
% \fi
-% \setevalue{\??gridsnappers#1}{\attribute\snapmethodattribute\csname\??gridsnapperattributes\currentsnapper\endcsname\space}}
+% \setevalue{\??gridsnappers#1}{\c_attr_snapmethod\csname\??gridsnapperattributes\currentsnapper\endcsname\space}}
\def\spac_grids_expand_snapper#1%
{\edef\m_spac_snapper
@@ -1534,7 +1523,7 @@
\scratchcounter\clf_definesnapmethod{#1}{\m_spac_snapper}%
\setevalue{\??gridsnapperattributes\currentsnapper}{\the\scratchcounter}%
\fi
- \setevalue{\??gridsnappers#1}{\attribute\snapmethodattribute\the\scratchcounter\relax}%
+ \setevalue{\??gridsnappers#1}{\c_attr_snapmethod\the\scratchcounter\relax}%
\letvalue{\??gridsnappersets#1}\m_spac_snapper}
\def\theexpandedsnapperset#1{\begincsname\??gridsnappersets#1\endcsname} % only for manuals
@@ -1542,10 +1531,10 @@
\unexpanded\def\usegridparameter#1% no checking here
{\edef\m_spac_grid_asked{#1\c!grid}%
\ifx\m_spac_grid_asked\empty
- \attribute \snapvboxattribute\attributeunsetvalue
+ \c_attr_snapvbox\attributeunsetvalue
\else
\spac_grids_snap_value_set\m_spac_grid_asked
- \attribute \snapvboxattribute\attribute\snapmethodattribute
+ \c_attr_snapvbox\c_attr_snapmethod
\fi}
\unexpanded\def\definegridsnapping
@@ -1556,7 +1545,7 @@
\edef\spac_grids_snap_value_reset
{%\gridsnappingfalse
- \attribute\snapmethodattribute\attributeunsetvalue}
+ \c_attr_snapmethod\attributeunsetvalue}
\def\spac_grids_snap_value_set#1%
{%\gridsnappingtrue
@@ -1605,9 +1594,9 @@
%D We're not downward compatible with \MKII ! Not yet in interface file:
-\definegridsnapping[\v!normal] [\v!maxheight,\v!maxdepth,\v!strut]
-\definegridsnapping[\v!standard] [\v!maxheight,\v!maxdepth,\v!strut]
-\definegridsnapping[\v!yes] [\v!maxheight,\v!maxdepth,\v!strut]
+\definegridsnapping[\v!normal] [\v!maxheight,\v!maxdepth,\v!strut]
+\definegridsnapping[\v!standard] [\v!maxheight,\v!maxdepth,\v!strut]
+\definegridsnapping[\v!yes] [\v!maxheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!strict] [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut]
\definegridsnapping[\v!tolerant] [\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut]
@@ -1717,7 +1706,7 @@
\clf_vspacingcollapse\nextbox\relax % isn't that already done?
\fi
\doifelsenothing{#1}{\spac_grids_snap_value_set\v!normal}{\spac_grids_snap_value_set{#1}}%
- \clf_vspacingsnap\nextbox\attribute\snapmethodattribute\relax
+ \clf_vspacingsnap\nextbox\c_attr_snapmethod\relax
\ifvbox\nextbox\vbox\else\hbox\fi attr \snapmethodattribute \zerocount {\box\nextbox}% no pack (?), we snap
\egroup}
@@ -1883,11 +1872,8 @@
%D This has become obsolete:
-\def\fuzzysnappedbox#1#2% \box<n> \unvbox<n>
- {#1#2}
-
-\def\moveboxontogrid#1#2#3% will become obsolete, but it needs checking
- {}
+% \def\moveboxontogrid#1#2#3% will become obsolete, but it needs checking
+% {}
%D Helper:
@@ -1948,7 +1934,7 @@
\clf_vspacingsetamount{#1}}
\def\spac_vspacing_no_topskip % use grouped
- {\attribute\skipcategoryattribute\plusten}
+ {\c_attr_skipcategory\pluseleven}
% \installcorenamespace{vspacingamountnormal}
% \installcorenamespace{vspacingamountgrid}
@@ -1979,9 +1965,9 @@
\appendtoks
\s_spac_vspacing_temp\zeropoint
- \attribute\skipcategoryattribute\plusone
- \attribute\skippenaltyattribute \attributeunsetvalue
- \attribute\skiporderattribute \attributeunsetvalue
+ \c_attr_skipcategory\plusone
+ \c_attr_skippenalty \attributeunsetvalue
+ \c_attr_skiporder \attributeunsetvalue
\ifgridsnapping
\settrue\c_space_vspacing_fixed
\else
@@ -2003,10 +1989,10 @@
\unexpanded\def\setblankcategory#1%
{\settrue\c_space_vspacing_done
- \attribute\skipcategoryattribute#1\relax}
+ \c_attr_skipcategory#1\relax}
\unexpanded\def\setblankorder#1%
- {\attribute\skiporderattribute#1\relax}
+ {\c_attr_skiporder#1\relax}
\unexpanded\def\fixedblankskip
{\settrue\c_space_vspacing_fixed}
@@ -2021,8 +2007,8 @@
\unexpanded\def\setblankpenalty#1%
{\flushblankhandling
\settrue\c_space_vspacing_done
- \attribute\skipcategoryattribute \plusthree
- \attribute\skippenaltyattribute #1\relax
+ \c_attr_skipcategory\plusthree
+ \c_attr_skippenalty #1\relax
\flushblankhandling}
\unexpanded\def\startblankhandling % move this to \vspacing
@@ -2181,17 +2167,17 @@
\unexpanded\def\directvpenalty#1%
{\begingroup
- \attribute\skipcategoryattribute \plusthree
- \attribute\skippenaltyattribute #1\relax
- \attribute\skiporderattribute \attributeunsetvalue
+ \c_attr_skipcategory\plusthree
+ \c_attr_skippenalty #1\relax
+ \c_attr_skiporder \attributeunsetvalue
\vskip\zeropoint
\endgroup}
\unexpanded\def\directvskip#1%
{\begingroup
- \attribute\skipcategoryattribute \plusone
- \attribute\skippenaltyattribute \attributeunsetvalue
- \attribute\skiporderattribute \attributeunsetvalue
+ \c_attr_skipcategory\plusone
+ \c_attr_skippenalty \attributeunsetvalue
+ \c_attr_skiporder \attributeunsetvalue
\vskip#1\relax
\endgroup}
@@ -2343,7 +2329,7 @@
\unexpanded\def\inhibitblank
{\ifvmode
\begingroup
- \attribute\skipcategoryattribute\plusfive
+ \c_attr_skipcategory\plusfive
\vskip\zeropoint
\endgroup
\fi}
@@ -2655,6 +2641,8 @@
% test \par
% test \par
+% only main vertical list
+
\unexpanded\def\ignoreparskip{\c_spac_vspacing_ignore_parskip\plusone}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf b/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
index 01dde89ff97..e890fa88c93 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
+++ b/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf b/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
index 105405cc41e..ffeb01fef65 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
+++ b/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi
index 8c75eb6df5e..81e28f67fd5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-con.mkvi
@@ -226,7 +226,7 @@
{\begingroup
\iftrialtypesetting \else
\currentconstructionsynchronize
- \attribute\destinationattribute\currentconstructionattribute\relax
+ \c_attr_destination\currentconstructionattribute\relax
\fi
#1%
\endgroup}
@@ -235,7 +235,7 @@
{\begingroup
\iftrialtypesetting \else
\currentconstructionsynchronize
- \attribute\destinationattribute\currentconstructionattribute\relax
+ \c_attr_destination\currentconstructionattribute\relax
\fi
\currentconstructiontext
\endgroup}
@@ -244,7 +244,7 @@
{\iftrialtypesetting \else
\begingroup
\currentconstructionsynchronize % reinstated
- \attribute\destinationattribute\currentconstructionattribute\relax % todo, whole text
+ \c_attr_destination\currentconstructionattribute\relax % todo, whole text
\signalcharacter
\endgroup
\fi#1}
@@ -418,6 +418,8 @@
%
\dostoptagged % tag
\dostarttagged\t!constructioncontent\empty
+ %\freezeparagraphproperties
+ \updateparagraphshapes
\ignorespaces} % args not needed
\unexpanded\setvalue{\??constructionstophandler\v!construction}%
@@ -433,7 +435,7 @@
\dorechecknextindentation}
\unexpanded\def\boxedconstructionhead#1%
- {\vtop
+ {\doifelse{\constructionalternativeparameter\c!alignbottom}{\v!yes}\vbox\vtop
{\hsize\constructionsheadwidth
\edef\p_strc_constructions_headalign{\constructionparameter\c!headalign}%
\ifx\p_strc_constructions_headalign\empty \else
@@ -618,7 +620,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!left:\v!none]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\strc_constructions_set_pure_box\v!flushleft
\leftskip\dimexpr\leftconstructionskip+\constructionsheadwidth+\constructionsheaddistance\relax
@@ -644,7 +646,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!right:\v!none]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\leftskip\leftconstructionskip
\rightskip\dimexpr\rightconstructionskip+\constructionsheadwidth\relax
@@ -670,7 +672,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!left:\v!margin]%
- \let\\=\crlf
+ \let\\\crlf
\noindent
\strc_constructions_set_pure_box\v!flushleft
\llap {
@@ -685,7 +687,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!right:\v!margin]%
- \let\\=\crlf
+ \let\\\crlf
\noindent
\strc_constructions_set_pure_box\v!flushright
\rlap {
@@ -700,7 +702,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!left:\v!hanging]%
- \let\\=\crlf
+ \let\\\crlf
\dontcomplain
\advance\constructionsheadwidth \constructionsheaddistance
\strc_constructions_set_hang_box\v!flushleft
@@ -717,7 +719,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!right:\v!hanging]%
- \let\\=\crlf
+ \let\\\crlf
\dontcomplain
\advance\constructionsheadwidth \constructionsheaddistance
\strc_constructions_set_hang_box\v!flushright
@@ -738,7 +740,7 @@
\startsetups[\??constructionrenderings:\v!top]
% \strc_sectioning_prevent_page_break % commented per 31/5/2019
- \let\\=\space
+ \let\\\space
\noindent
\copy\constructionheadbox % why copy ?
\par
@@ -756,7 +758,7 @@
% why copy? historic reason?
\startsetups[\??constructionrenderings:\v!margin]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\inmargin[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
@@ -764,7 +766,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!leftmargin]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\inleft[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
@@ -772,7 +774,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!rightmargin]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\inright[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
@@ -780,7 +782,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!innermargin]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\ininner[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
@@ -788,7 +790,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!outermargin]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\inouter[\c!scope=\v!local]{\flushconstructionheadbox}%
\useconstructionstyleandcolor\c!style\c!color
@@ -818,7 +820,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!serried:\v!fit]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\flushconstructionheadbox
\nobreak
@@ -828,7 +830,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!serried:\v!broad]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\flushconstructionheadbox
\ifconditional\c_strc_constructions_distance_none \else
@@ -847,7 +849,7 @@
\stopsetups
\startsetups[\??constructionrenderings:\v!serried:\v!wide]
- \let\\=\crlf
+ \let\\\crlf
\noindent
\hbox to \constructionsheadwidth {
\flushconstructionheadbox
@@ -861,7 +863,7 @@
\startsetups[\??constructionrenderings:\v!hanging]
% tricky: leftskipadaption is somewhat unpredictable
- \let\\=\crlf
+ \let\\\crlf
\noindent
\advance\leftskip-\leftskipadaption\relax
\ifdim\leftskipadaption=\zeropoint
@@ -919,6 +921,43 @@
\endgroup
\stopsetups
+\ifcase\contextlmtxmode \else
+ % just an empty check so that we can grep for contextlmtxmode in mkiv files
+\fi
+
+% \definedescription[whatever][alternative=right:bottom]
+%
+% \startwhatever{just a small\\example}
+% \input ward
+% \stopwhatever
+
+\defineconstructionalternative
+ [\v!right:\v!bottom]
+ [%\c!width=7em,
+ %\c!distance=1em,
+ \c!alignbottom=\v!yes,
+ \c!renderingsetup=\??constructionrenderings:\v!right:\v!bottom]
+
+\startsetups[\??constructionrenderings:\v!right:\v!bottom]
+ \let\\\crlf
+ \noindent
+ \leftskip\leftconstructionskip
+ \rightskip\dimexpr\rightconstructionskip+\constructionsheadwidth+\constructionsheaddistance\relax
+ \parfillskip\zeropoint
+ \strc_constructions_set_pure_box\v!flushright
+ \directparwrapper \relax {%
+ \hfilll
+ \rlap
+ {\kern\constructionsheaddistance
+ \copy\constructionheadbox}%
+ }%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+%D This next feature will get an lmtx implementation (probably by using a new generic
+%D close mechanism).
+
% you can use \placeclosesymbol or \qed to place a symbol at the end of a
% construction
@@ -1013,7 +1052,7 @@
\begingroup
\simplifycommands
\xdef\currentconstructionbookmark{\detokenize\expandafter{\normalexpanded{\constructionparameter\c!title}}}%
- \endgroup
+ \endgroup
\fi \fi
\fi
\ifx\currentconstructionlist\empty
@@ -1085,7 +1124,7 @@
\relax
% \writestatus{constructions}{registering \currentconstruction: \number\scratchcounter}%
\clf_setinternalreference
- prefix {\referenceprefix}%
+ prefix {\currentconstructionreferenceprefix}%
reference {\currentconstructionreference}%
internal \locationcount
view {\interactionparameter\c!focus}%
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi
index 76f878f5f03..5ae4c25eb97 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-des.mkvi
@@ -221,8 +221,8 @@
{\csname\??constructionstophandler \v!construction\endcsname\endgroup}}
\unexpanded\setvalue{\??constructionstarthandler\v!description}%
- {\BeforePar{\csname\??constructionstarthandler\v!construction\endcsname}%
- \GotoPar}
+ {\dogotopar
+ {\csname\??constructionstarthandler\v!construction\endcsname}}
\unexpanded\setvalue{\??constructionstophandler\v!description}%
{\csname\??constructionstophandler\v!construction\endcsname
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua
index 9877a0f9c0e..5cb207c38bf 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-doc.lua
@@ -1103,9 +1103,9 @@ implement { name = "namedstructureuservariable", actions = sections.userdata,
implement { name = "setstructurelevel", actions = sections.setlevel, arguments = "2 strings" }
implement { name = "getstructurelevel", actions = sections.getcurrentlevel, arguments = "string" }
implement { name = "setstructurenumber", actions = sections.setnumber, arguments = { "integer", "string" } } -- string as we support +-
-implement { name = "getstructurenumber", actions = sections.getnumber, arguments = { "integer" } }
+implement { name = "getstructurenumber", actions = sections.getnumber, arguments = "integer" }
implement { name = "getsomestructurenumber", actions = sections.getnumber, arguments = { "integer", "string" } }
-implement { name = "getfullstructurenumber", actions = sections.fullnumber, arguments = { "integer" } }
+implement { name = "getfullstructurenumber", actions = sections.fullnumber, arguments = "integer" }
implement { name = "getsomefullstructurenumber", actions = sections.fullnumber, arguments = { "integer", "string" } }
implement { name = "getspecificstructuretitle", actions = sections.structuredata, arguments = { "string", "'titledata.title'",false,"string" } }
@@ -1160,6 +1160,7 @@ implement {
{ "bookmark" },
{ "marking" },
{ "list" },
+ { "reference" },
}
},
{ "numberdata", {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua
index e3a0ea30edb..59c67efa1ad 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.lua
@@ -31,13 +31,13 @@ function builders.checksidefloat(mode,indented)
return indented
end
-appendaction ("newgraf","system","builders.checksidefloat")
-disableaction("newgraf","builders.checksidefloat")
+appendaction ("paragraph","system","builders.checksidefloat")
+disableaction("paragraph","builders.checksidefloat")
interfaces.implement {
name = "enablesidefloatchecker",
onlyonce = true,
actions = function()
- enableaction("newgraf","builders.checksidefloat")
+ enableaction("paragraph","builders.checksidefloat")
end,
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
index d6a6723d7be..d9fd359c668 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
@@ -211,7 +211,7 @@
\let\strc_floats_define_saved\definefloat
-\unexpanded\def\definefloat
+\unexpanded\overloaded\def\definefloat
{\dotripleempty\strc_floats_define}
\def\strc_floats_define[#1][#2][#3]% name+plural+parent | name+parent+settings
@@ -397,7 +397,7 @@
\glet\currentfloatsynchronize\m_strc_counters_last_registered_synchronize
%
% \iflocation
- % \attribute\destinationattribute\currentfloatattribute\relax
+ % \c_attr_destination\currentfloatattribute\relax
% \fi
\currentfloatsynchronize
\strc_floats_make_complete_caption
@@ -844,7 +844,8 @@
{\strc_floats_set_local_hsize
\floatparameter\c!inner
\postponenotes} % new
- {\dostoptagged
+ {\page_postprocessors_linenumbers_box\nextbox % for aditya
+ \dostoptagged
\strc_floats_finish_placement}
\vbox}
@@ -1229,7 +1230,7 @@
\let\doifoddpagefloatelse \doifelseoddpagefloat
\appendtoks
- \let\rightorleftpageaction\doifelserightpagefloat
+ \overloaded\frozen\let\rightorleftpageaction\doifelserightpagefloat
\to \everyinsidefloat
% \let\movesidefloat\gobbleoneargument
@@ -1623,7 +1624,7 @@
\setbox\b_strc_floats_caption\hbox % text
{\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}%
\strc_floats_set_caption_dimensions\b_strc_floats_caption
- \moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
+ %\moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
%\page_backgrounds_add_local_to_box\b_strc_floats_caption
\strc_floats_build_box
\fi
@@ -2202,6 +2203,8 @@
{\box\floatbox}}}
% special purpose: used in floatcombinations
+%
+% todo : keep float content and caption separated in local
\newbox\b_strc_floats_separate_content
\newbox\b_strc_floats_separate_caption
@@ -2210,37 +2213,44 @@
{\settrue\c_floats_adapt_to_caption_width
\settrue\c_floats_store_minimal_package}
+% \def\strc_floats_build_box_separate_make
+% {\offinterlineskip
+% \vpack to \onepoint{\box\b_strc_floats_content}\break
+% \vpack to \onepoint{\box\b_strc_floats_caption}}
+
+%D Remark for \LMTX: we don't want to migrate inserts here so we unpack
+%D (could be a flag). When migrated, the inserts end up in the vertical
+%D list and we no longer have just a box (but inserts and lines again).
+
+% \def\strc_floats_build_box_separate_split#1%
+% {\setbox\scratchbox\vpack{#1}%
+% \setbox\scratchbox\vbox\bgroup
+% \unvpack\scratchbox
+% \setbox\scratchbox\lastbox % can have (unmigrated) inserts
+% \unvpack\scratchbox
+% \setbox\scratchbox\lastbox % can have (unmigrated) inserts
+% \unvpack\scratchbox
+% \setbox\scratchbox\lastbox % can have (unmigrated) inserts
+% \splittopskip\zeropoint
+% \global\setbox\b_strc_floats_separate_content\vsplit\scratchbox to \onepoint
+% \global\setbox\b_strc_floats_separate_caption\vsplit\scratchbox to \onepoint
+% \egroup
+% \global\setbox\b_strc_floats_separate_content\vpack
+% {\unvbox\b_strc_floats_separate_content
+% \setbox\scratchbox\lastbox
+% \unvbox\scratchbox}%
+% \global\setbox\b_strc_floats_separate_caption\tpack
+% {\unvbox\b_strc_floats_separate_caption
+% \setbox\scratchbox\lastbox
+% \unvbox\scratchbox}}
+
\def\strc_floats_build_box_separate_make
- {\offinterlineskip
- \vpack to \onepoint{\box\b_strc_floats_content}\break
- \vpack to \onepoint{\box\b_strc_floats_caption}}
-
-\def\strc_floats_build_box_separate_split#1%
- {\setbox\scratchbox\vbox\bgroup
- \setbox\scratchbox\vpack{#1}%
- \unvbox\scratchbox\relax
- \setbox\scratchbox\lastbox
- %\doloop{%
- \unvbox\scratchbox
- \setbox\scratchbox\lastbox
- % \ifdim\ht\scratchbox=2\onepoint
- \unvbox\scratchbox
- \setbox\scratchbox\lastbox
- % \exitloop
- % \fi
- %}%
- \splittopskip\zeropoint
- \global\setbox\b_strc_floats_separate_content\vsplit\scratchbox to \onepoint
- \global\setbox\b_strc_floats_separate_caption\vsplit\scratchbox to \onepoint
- \egroup
- \global\setbox\b_strc_floats_separate_content\vpack
- {\unvbox\b_strc_floats_separate_content
- \setbox\scratchbox\lastbox
- \unvbox\scratchbox}%
- \global\setbox\b_strc_floats_separate_caption\tpack
- {\unvbox\b_strc_floats_separate_caption
- \setbox\scratchbox\lastbox
- \unvbox\scratchbox}}
+ {\savebox\??localfloatstack{\number\numexpr\c_strc_localfloats_n+1\relax:a}{\box\b_strc_floats_content}%
+ \savebox\??localfloatstack{\number\numexpr\c_strc_localfloats_n+1\relax:b}{\box\b_strc_floats_caption}}
+
+\unexpanded\def\strc_floats_build_box_separate_split#1%
+ {\global\setbox\b_strc_floats_separate_content\vpack{\foundbox\??localfloatstack{\number#1:a}}%
+ \global\setbox\b_strc_floats_separate_caption\tpack{\foundbox\??localfloatstack{\number#1:b}}}
% \def\strc_floats_build_box_step#1%
% {\doifdefined{\??floatbuilder#1}{\def\floatcaptionarrangement{#1}\quitcommalist}}
@@ -2339,7 +2349,7 @@
\strc_floats_check_caption_content
\strc_floats_prepare_side_caption
\setbox\b_strc_floats_caption\hbox{\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}% \hpack ?
- \moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
+ %\moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
%\page_backgrounds_add_local_to_box\b_strc_floats_caption
\strc_floats_build_side_box
\fi
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi
index cbbefd5dbcc..a46923d3eb5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mkvi
@@ -676,6 +676,12 @@
\strc_itemgroups_insert_item_counter_indeed
\fi}
+\installcorenamespace{itemstopper}
+
+\setvalue{\??itemstopper\v!yes }{\itemgroupparameter\c!stopper}
+\setvalue{\??itemstopper\v!display}{\ifconditional\c_strc_itemgroups_inline\else\itemgroupparameter\c!stopper\fi}
+\setvalue{\??itemstopper\v!inline }{\ifconditional\c_strc_itemgroups_inline\itemgroupparameter\c!stopper\fi}
+
\def\strc_itemgroups_insert_item_counter_indeed % quite slow ... every time this setup .. but it
{\begingroup % can be optimized ... best move some to strc-num
\setupcounter
@@ -690,7 +696,7 @@
\c!prefixconnector=\itemgroupparameter\c!prefixconnector,
\c!criterium=\itemgroupparameter\c!criterium,
\c!numberorder=\ifconditional\c_strc_itemgroups_reverse\v!reverse\else\v!normal\fi,
- \c!numberstopper=\expdoif{\itemgroupparameter\c!placestopper}\v!yes{\itemgroupparameter\c!stopper},
+ \c!numberstopper=\begincsname\??itemstopper\itemgroupparameter\c!placestopper\endcsname,
\c!numberconversionset=\v_strc_itemgroups_counter,
\c!numbersegments=\currentitemgroupsegments]%
% there will be a fixedconversion key
@@ -1321,6 +1327,7 @@
\letvalue{\??itemgroupstart\v!ran }\strc_itemgroups_start_edge
\letvalue{\??itemgroupstart\v!its }\strc_itemgroups_start_items
\letvalue{\??itemgroupstart\v!mar }\strc_itemgroups_start_margin
+\letvalue{\??itemgroupstart\v!txt }\strc_itemgroups_start_text
\def\optimizelistitemsbreak
{\ifcase\c_strc_itemgroups_column_depth \ifconditional\c_strc_itemgroups_optimize
@@ -1538,7 +1545,7 @@
{\let\m_strc_itemgroups_text_distance\zeropoint}
\setvalue{\??itemgroupdistance\v!space}%
- {\def\m_strc_itemgroups_text_distance{\interwordspace\!!plus\interwordstretch\!!minus\interwordshrink}}
+ {\def\m_strc_itemgroups_text_distance{\interwordspace\s!plus\interwordstretch\s!minus\interwordshrink}}
\setvalue\??itemgroupdistance % catches empty value
{\let\m_strc_itemgroups_text_distance\zeropoint}
@@ -1557,9 +1564,9 @@
{\assignvalue
\m_strc_itemgroups_text_distance
\m_strc_itemgroups_text_distance
- {.5\interwordspace\!!plus.5\emwidth}%
- {\interwordspace \!!plus \emwidth}%
- {\emwidth \!!plus \interwordstretch\!!minus\interwordshrink}}
+ {.5\interwordspace\s!plus.5\emwidth}%
+ {\interwordspace \s!plus \emwidth}%
+ {\emwidth \s!plus \interwordstretch\s!minus\interwordshrink}}
% \unexpanded\def\strc_itemgroups_default_command
% {\EveryPar{\ignorespaces}% needed ?
@@ -1577,6 +1584,11 @@
\appendtoks
\let\item \strc_itemgroups_start_do_item
+ \let\sub \strc_itemgroups_start_subitem
+ \let\sym \strc_itemgroups_start_symbol
+ \let\ran \strc_itemgroups_start_edge
+ \let\its \strc_itemgroups_start_items
+ \let\mar \strc_itemgroups_start_margin
\let\noitem \strc_itemgroups_start_no_item
\let\itm \strc_itemgroups_start_do_item
\let\but \strc_itemgroups_start_button
@@ -1587,27 +1599,29 @@
\let\startitem \startitemgroupitem
\let\stopitem \stopitemgroupitem
\let\starthead \startitemgrouphead
- \let\stophead \stopitemgroupitemhead
+ \let\stophead \stopitemgrouphead
\let\startspecialitem\startspecialitemgroupitem
\let\stopspecialitem \stopspecialitemgroupitem
\to \itemgroupcommands
-\ifx\currentinterface \v!english \else
-
- \appendtoks
- \expandafter\let\csname\v!item \endcsname\strc_itemgroups_start_do_item
- \expandafter\let\csname\v!sub \endcsname\strc_itemgroups_start_subitem
- \expandafter\let\csname\v!sym \endcsname\strc_itemgroups_start_symbol
- \expandafter\let\csname\v!ran \endcsname\strc_itemgroups_start_edge
- \expandafter\let\csname\v!head \endcsname\strc_itemgroups_head
- \expandafter\let\csname\v!its \endcsname\strc_itemgroups_start_items
- \expandafter\let\csname\v!mar \endcsname\strc_itemgroups_start_margin
- \expandafter\let\csname\v!txt \endcsname\strc_itemgroups_start_text
- \expandafter\let\csname\e!start\v!item\endcsname\startitemgroupitem
- \expandafter\let\csname\e!stop \v!item\endcsname\stopitemgroupitem
- \expandafter\let\csname\e!start\v!head\endcsname\startitemgrouphead
- \expandafter\let\csname\e!stop \v!head\endcsname\stopitemgrouphead
- \to \itemgroupcommands
+\ifx\currentinterface \s!english \else
+
+ \def\next#1#2{\ifcsname#1\endcsname\else\let\csname#1\endcsname#2\fi}
+
+ \etoksapp\itemgroupcommands{%
+ \next{\v!item }\strc_itemgroups_start_do_item
+ \next{\v!sub }\strc_itemgroups_start_subitem
+ \next{\v!sym }\strc_itemgroups_start_symbol
+ \next{\v!ran }\strc_itemgroups_start_edge
+ \next{\v!head }\strc_itemgroups_head
+ \next{\v!its }\strc_itemgroups_start_items
+ \next{\v!mar }\strc_itemgroups_start_margin
+ \next{\v!txt }\strc_itemgroups_start_text
+ \next{\e!start\v!item}\startitemgroupitem
+ \next{\e!stop \v!item}\stopitemgroupitem
+ \next{\e!start\v!head}\startitemgrouphead
+ \next{\e!stop \v!head}\stopitemgrouphead
+ }
\fi
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi
index ad8c80d93e6..0d35be90cdc 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lnt.mkvi
@@ -234,17 +234,15 @@
\let\strc_linenotes_traced\gobbleoneargument
\def\strc_linenotes_traced_indeed#1%
- {\iftracelinenotes
- \hpack to \zeropoint
- {\forgetall
- \hsize\zeropoint
- \hss
- \vpack to \strutheight{\llap{\red\infofont\setstrut\the\c_strc_linenotes}\vss}%
- {\color[blue]{\vl}}%
- \vpack to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
- \hss}%
- \prewordbreak
- \fi}
+ {\hpack to \zeropoint
+ {\forgetall
+ \hsize\zeropoint
+ \hss
+ \vpack to \strutheight{\llap{\red\infofont\setstrut\the\c_strc_linenotes}\vss}%
+ {\color[blue]{\vl}}%
+ \vpack to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
+ \hss}%
+ \prewordbreak}
\unexpanded\def\tracelinenotes
{\let\strc_linenotes_traced\strc_linenotes_traced_indeed}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua
index bc6135e7242..a6799d80f1a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua
@@ -835,14 +835,18 @@ function lists.getresult(r)
end
function lists.process(specification)
- lists.result = filtercollected(specification)
- local specials = settings_to_set(specification.extras or "")
- specials = next(specials) and specials or nil
- for i=1,#lists.result do
- local r = lists.result[i]
- local m = r.metadata
- local s = specials and r.numberdata and specials[zerostrippedconcat(r.numberdata.numbers,".")] or ""
- context.strclistsentryprocess(m.name,m.kind,i,s)
+ local result = filtercollected(specification)
+ local total = #result
+ lists.result = result
+ if total > 0 then
+ local specials = settings_to_set(specification.extras or "")
+ specials = next(specials) and specials or nil
+ for i=1,total do
+ local r = result[i]
+ local m = r.metadata
+ local s = specials and r.numberdata and specials[zerostrippedconcat(r.numberdata.numbers,".")] or ""
+ context.strclistsentryprocess(m.name,m.kind,i,s)
+ end
end
end
@@ -1050,6 +1054,7 @@ implement {
{ "bookmark" },
{ "marking" },
{ "list" },
+ { "reference" },
}
},
{ "prefixdata", {
@@ -1212,7 +1217,7 @@ implement {
implement { name = "doifelselisthastitle", actions = { lists.hastitledata, commands.doifelse }, arguments = { "string", "integer" } }
implement { name = "doifelselisthaspage", actions = { lists.haspagedata, commands.doifelse }, arguments = { "string", "integer" } }
implement { name = "doifelselisthasnumber", actions = { lists.hasnumberdata, commands.doifelse }, arguments = { "string", "integer" } }
-implement { name = "doifelselisthasentry", actions = { lists.iscached, commands.doifelse }, arguments = { "integer" } }
+implement { name = "doifelselisthasentry", actions = { lists.iscached, commands.doifelse }, arguments = "integer" }
local function savedlisttitle(name,n,tag)
local data = cached[tonumber(n)]
@@ -1270,7 +1275,7 @@ implement {
implement {
name = "discardfromlist",
actions = lists.discard,
- arguments = { "integer" }
+ arguments = "integer"
}
-- new and experimental and therefore off by default
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi
index d29b1f6fdae..e3a466656c3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi
@@ -76,7 +76,7 @@
%\c!inbetween=,
%\c!symbol=,
%\c!expansion=,
- \c!limittext=\languageparameter\c!limittext] % not used currently
+ \c!limittext=\languageparameter\c!limittext] % not used currently
%D Helpers:
@@ -242,7 +242,7 @@
%D When placing a list either one or a set can be giving. This makes
%D it possible to flush for instance an nested (or merged) table of
%D contents. Keep in mind that placing a list is what we do most (think
-%D of tables of contents, figures, etc.\ but other usag eis also possible
+%D of tables of contents, figures, etc.\ but other usage is also possible
%D in which case low level commands have to be used.
\newtoks\everystructurelist
@@ -367,6 +367,17 @@
\unexpanded\def\savedlisttitle #1#2{\clf_savedlisttitle {#1}\numexpr#2\relax}
\unexpanded\def\savedlistprefixednumber#1#2{\clf_savedlistprefixednumber{#1}\numexpr#2\relax}
+\newconditional\c_lists_show_realpage
+
+\installcorenamespace {listpagenumber}
+
+\setvalue{\??listpagenumber\v!always }{\settrue\c_lists_show_page\settrue\c_lists_has_page}
+\setvalue{\??listpagenumber\v!yes }{\settrue\c_lists_show_page}
+\setvalue{\??listpagenumber\s!realpage}{\settrue\c_lists_show_page\settrue\c_lists_show_realpage}
+
+\def\strc_lists_process_pagenumber#1%
+ {\begincsname\??listpagenumber#1\endcsname}
+
\def\structurelistlocation
{\clf_listlocation\numexpr\currentlistindex\relax}
@@ -375,23 +386,27 @@
\unexpanded\def\structurelistpagenumber
{\dostarttagged\t!listpage\empty
- \clf_listprefixedpage
- {\currentlist}%
- \currentlistindex
- {
- separatorset {\listparameter\c!pageprefixseparatorset}
- conversionset {\listparameter\c!pageprefixconversionset}
- set {\listparameter\c!pageprefixset}
- segments {\listparameter\c!pageprefixsegments}
- connector {\listparameter\c!pageprefixconnector}
- }%
- {
- prefix {\listparameter\c!pageprefix}
- conversionset {\listparameter\c!pageconversionset}
- starter {\listparameter\c!pagestarter}
- stopper {\listparameter\c!pagestopper}
- }%
- \relax
+ \ifconditional\c_lists_show_realpage
+ \clf_listrealpage{\currentlist}\numexpr\currentlistindex\relax
+ \else
+ \clf_listprefixedpage
+ {\currentlist}%
+ \currentlistindex
+ {
+ separatorset {\listparameter\c!pageprefixseparatorset}
+ conversionset {\listparameter\c!pageprefixconversionset}
+ set {\listparameter\c!pageprefixset}
+ segments {\listparameter\c!pageprefixsegments}
+ connector {\listparameter\c!pageprefixconnector}
+ }%
+ {
+ prefix {\listparameter\c!pageprefix}
+ conversionset {\listparameter\c!pageconversionset}
+ starter {\listparameter\c!pagestarter}
+ stopper {\listparameter\c!pagestopper}
+ }%
+ \relax
+ \fi
\dostoptagged}
\unexpanded\def\structurelistuservariable#name%
@@ -402,8 +417,8 @@
\def\rawstructurelistuservariable#name%
{\clf_listuserdata{\currentlist}\currentlistindex{#name}}
-\unexpanded\def\structurelistfirst {\structurelistuservariable\s!first } % s!
-\unexpanded\def\structurelistsecond {\structurelistuservariable\s!second} % s!
+\unexpanded\def\structurelistfirst {\structurelistuservariable\s!first } % s!
+\unexpanded\def\structurelistsecond{\structurelistuservariable\s!second} % s!
\def\rawstructurelistfirst {\rawstructurelistuservariable\s!first } % s! % was \unexpanded
\def\rawstructurelistsecond{\rawstructurelistuservariable\s!second} % s! % was \unexpanded
@@ -612,14 +627,14 @@
{\strut\symbol[bullet]}
\unexpanded\def\strc_lists_symbol_two
- {\vrule\!!width\emwidth\!!height\exheight\!!depth\zeropoint}
+ {\vrule\s!width\emwidth\s!height\exheight\s!depth\zeropoint\relax}
\unexpanded\def\strc_lists_symbol_three
{\begingroup
\strc_lists_assign_dimen\scratchwidth \c!width {1.5\emwidth}%
\strc_lists_assign_dimen\scratchheight\c!height\exheight
\strc_lists_assign_dimen\scratchdepth \c!depth \zeropoint
- \vrule\!!width\scratchwidth\!!height\scratchheight\!!depth\scratchdepth
+ \vrule\s!width\scratchwidth\s!height\scratchheight\s!depth\scratchdepth
\endgroup}
\unexpanded\def\strc_lists_symbol_unknown
@@ -877,7 +892,7 @@
\appendtoks
% better is to use a special list entry but we keep this for compatibility
- \let\\=\space
+ \enforced\let\\\space
% so expanding this token register has to come *after* the font switch
\dontconvertfont % (**) this has to become an option (see publ)
\to \t_lists_every_renderingtext
@@ -891,17 +906,22 @@
% because these tests happen often and because we're dealing with
% rather complex composed data we have special conditionals; keep
% in mind that testing for empty fails do to tagging being applied
- \edef\p_pagenumber{\listparameter\c!pagenumber}%
- \ifx\p_pagenumber\v!always
- \settrue\c_lists_has_page
- \settrue\c_lists_show_page
- \else
+% \edef\p_pagenumber{\listparameter\c!pagenumber}%
+% \ifx\p_pagenumber\v!always
+% \settrue\c_lists_has_page
+% \settrue\c_lists_show_page
+% \else
+% \doifelsestructurelisthaspage\settrue\setfalse\c_lists_has_page
+% \ifx\p_pagenumber\v!yes
+% \settrue\c_lists_show_page
+% \else
+% \setfalse\c_lists_show_page
+% \fi
+% \fi
+ \setfalse\c_lists_show_page % necessary?
+ \processcommacommand[\listparameter\c!pagenumber]\strc_lists_process_pagenumber
+ \ifconditional\c_lists_has_page \else
\doifelsestructurelisthaspage\settrue\setfalse\c_lists_has_page
- \ifx\p_pagenumber\v!yes
- \settrue\c_lists_show_page
- \else
- \setfalse\c_lists_show_page
- \fi
\fi
% always forces number placement (in bib we use a forced number)
\edef\p_headnumber{\listparameter\c!headnumber}%
@@ -933,6 +953,7 @@
\setfalse\c_lists_has_page
\setfalse\c_lists_has_number
\setfalse\c_lists_show_page
+ \setfalse\c_lists_show_realpage
\setfalse\c_lists_show_number
\to \t_lists_every_renderingcleanup
@@ -1118,7 +1139,7 @@
\hangafter\ifx\p_hang\v!no\zerocount\else\plusone\fi
\scratchdimen\listalternativeparameter\c!distance\relax
\ifzeropt\wd\b_strc_lists_page \else \ifdim\scratchdimen>\zeropoint\relax
- \rightskip\scratchdimen\!!plus\listalternativeparameter\c!stretch\relax
+ \rightskip\scratchdimen\s!plus\listalternativeparameter\c!stretch\relax
\parfillskip-\rightskip
\fi \fi
\else
@@ -1241,9 +1262,9 @@
\endgroup
\scratchdistance\listparameter\c!distance\relax
\ifdim\scratchdistance<\emwidth
- \hskip\emwidth\!!plus\emwidth\!!minus.25\emwidth\relax
+ \hskip\emwidth\s!plus\emwidth\s!minus.25\emwidth\relax
\else
- \hskip\scratchdistance\!!plus.5\scratchdistance\!!minus.25\scratchdistance\relax
+ \hskip\scratchdistance\s!plus.5\scratchdistance\s!minus.25\scratchdistance\relax
\fi
\endgroup
\endgroup
@@ -1346,7 +1367,8 @@
%D such (for now). No interaction either as that is dealt with elsewhere.
%D
%D \currentlistsymbol
-%D \currentlistentry
+%D \currentlistentrynumber
+%D \currentlistentrytitle
%D \currentlistentrypagenumber % not really used
\definelistalternative
@@ -1522,14 +1544,14 @@
\def\strc_lists_set_reference_attribute_indeed#element%
{\ifx#element\p_interaction_forward
- \attribute\referenceattribute\a_strc_lists_reference
+ \c_attr_reference\a_strc_lists_reference
\fi}
\def\strc_lists_get_destination_attribute_indeed
{attr \destinationattribute\number\a_strc_lists_destination}
\def\strc_lists_set_destination_attribute_indeed
- {\attribute\destinationattribute\a_strc_lists_destination}
+ {\c_attr_destination\a_strc_lists_destination}
\unexpanded\def\strc_lists_set_style_color_normal#style#color#element%
{\useliststyleandcolor#style#color}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua
index b5fd2667b1a..f7953c416e0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mar.lua
@@ -122,7 +122,7 @@ end
local function sweep(head,first,last)
for n, id, subtype in nextnode, head do
-- we need to handle empty heads so we test for latelua
- if id == glyph_code or (id == whatsit_code and subtype == lateluawhatsit_code) then
+ if id == glyph_code or (id == whatsit_code and subtype == lateluawhatsit_code) then -- brrr
local a = getattr(n,a_marks)
if not a then
-- next
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv
index 0b80a26cd63..7f5a1915445 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-mat.mkiv
@@ -1,5 +1,4 @@
%D \module
-%D \module
%D [ file=strc-mat,
%D version=2008.10.20,
%D title=\CONTEXT\ Structure Macros,
@@ -315,7 +314,7 @@
\def\theformuladestinationattribute#1%
{\iflocation\ifx#1\relax\else\ifx#1\empty\else
- \attribute\destinationattribute#1%
+ \c_attr_destination#1%
\glet#1\relax
\fi\fi\fi}
@@ -500,6 +499,8 @@
%D
%D Otherwise we get a missing \type {$$} error reported.
+\pushoverloadmode
+
\let\reqno\eqno % no longer valid as we just nil it
\let\math_native_leqno\leqno
@@ -514,6 +515,8 @@
\let\reqno\normaleqno
\let\eqno \normaleqno
+\popoverloadmode
+
%D \macros
%D {startsubformulas}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-not.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-not.lua
index b2c8106e153..a18b3bd5e4a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-not.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-not.lua
@@ -32,7 +32,8 @@ notes.states = notes.states or { }
lists.enhancers = lists.enhancers or { }
notes.numbers = notes.numbers or { }
-storage.register("structures/notes/states", notes.states, "structures.notes.states")
+storage.register("structures/notes/states", notes.states, "structures.notes.states")
+storage.register("structures/notes/numbers", notes.numbers, "structures.notes.numbers")
local notestates = notes.states
local notedata = table.setmetatableindex("table")
@@ -492,6 +493,7 @@ local texgetglue = tex.getglue
local texsetglue = tex.setglue
local function check_spacing(n,i)
+ -- we can also check for tex.insertheights > 0 (instead of i > 1)
local gn, pn, mn = texgetglue(n)
local gi, pi, mi = texgetglue(i > 1 and "s_strc_notes_inbetween" or "s_strc_notes_before")
local gt, pt, mt = gn + gi, pn + pi, mn + mi
@@ -508,7 +510,7 @@ notes.check_spacing = check_spacing
callback.register("build_page_insert", function(n,i)
local state = notes.numbers[n]
if state then
- -- only notes, kind of hardcoded .. bah
+ -- only notes, kind of hardcoded .. bah
local gt, pt, mt = check_spacing(n,i)
texsetglue(0,gt,pt,mt) -- for the moment we use skip register 0
return 0
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi
index 05aa1eb6bbe..f29cb38ba16 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-not.mkvi
@@ -27,39 +27,50 @@
\unexpanded\def\unvboxed {\ifvmode\unvbox \else\box \fi} % will change or used more often
\unexpanded\def\unvcopied{\ifvmode\unvcopy\else\copy\fi} % will change or used more often
-%D Notes have two handlers: notations and notes. Although notations can
-%D be defined independently it makes not much sense. In principle we can
-%D treat notes as lists but they are currently done as a variant on
-%D enumerations. I will provide a list variant as well. One complication is
-%D that for page related notes inserts are used and therefore notes are
-%D typeset immediately and descriptions are better suited for that. For
-%D instance endnotes can as well be typeset using lists.
+%D \LMTX\ testcase:
+%D
+%D \starttyping
+%D \hbox {\hbox{\footnote{HH1}\footnote{HH2}}} \par
+%D \hbox {\hbox{x\footnote{XHH1}x\footnote{XHH2}}} \par
+%D \vbox {\setbox0\hbox{\footnote{VH1}\footnote{VH2}}\box0} \par
+%D \vbox {\hbox{\footnote{VH1}xxx\footnote{VH2}}} \par
+%D \vbox {\hbox{\footnote{VH1}\footnote{VH2}}
+%D \hbox{\footnote{VH1}\footnote{VH2}}} \par
+%D \vbox {\hbox{x\footnote{XVH1}x\footnote{XVH2}}} \par
+%D \vbox {\vbox{\footnote{VV1}\footnote{VV2}}} \par % two lines
+%D \vbox {\vbox{x\footnote{XVV1}x\footnote{XVV2}}} \par
+%D \stoptyping
+
+%D Notes have two handlers: notations and notes. Although notations can be defined
+%D independently it makes not much sense. In principle we can treat notes as lists
+%D but they are currently done as a variant on enumerations. I will provide a list
+%D variant as well. One complication is that for page related notes inserts are used
+%D and therefore notes are typeset immediately and descriptions are better suited
+%D for that. For instance endnotes can as well be typeset using lists.
% textcommand/textstyle/textcolor : set by note commandhandler and used for inline number
%D \macros
%D {setupnote,setupnotation}
%D
-%D We can influence footnote typesetting with the setup
-%D command:
+%D We can influence footnote typesetting with the setup command:
%D
%D \showsetup{setupnotation}
%D \showsetup{setupnote}
%D
-%D The definition command indicate that we can frame the footnote
-%D area. The footnotes themselves are treated as descriptions.
+%D The definition command indicate that we can frame the footnote area. The
+%D footnotes themselves are treated as descriptions.
%D
%D \showsetup{definenote}
%D
-%D It's sort of a custom to precede footnotes by a horizontal
-%D rule and although fancy rules like
+%D It's sort of a custom to precede footnotes by a horizontal rule and although
+%D fancy rules like
%D
%D \starttyping
%D \hbox to 10em{\hskip-3em\dotfill}
%D \stoptyping
%D
-%D Are quite ligitimate, we default to a simple one 20\% of the
-%D text width.
+%D Are quite ligitimate, we default to a simple one 20\% of the text width.
% \c!headstyle=\noteparameter\c!style,
% \c!headcolor=\noteparameter\c!color,
@@ -211,11 +222,10 @@
\fi
\fi}
-%D Notations (we simply needed a word that relates to notes and is
-%D and sounds like description and enumeration) are a special case
-%D in the sense that they are stored, rendered elsewhere and referered
-%D to from where they are specified. For that reason they have a different
-%D set op main commands.
+%D Notations (we simply needed a word that relates to notes and is and sounds like
+%D description and enumeration) are a special case in the sense that they are
+%D stored, rendered elsewhere and referered to from where they are specified. For
+%D that reason they have a different set op main commands.
% \notation[ref]{title}
% \notation[reference=,title=]
@@ -305,10 +315,10 @@
\unexpanded\def\strc_notations_stop
{}
-%D A complication is that we need to set up rather specific properties
-%D of e.g. footnotes. It is for this reason that we introduce an extra
-%D level of indirectness. This way notations don't bark on undefined
-%D macros when used in combination.
+%D A complication is that we need to set up rather specific properties of e.g.
+%D footnotes. It is for this reason that we introduce an extra level of
+%D indirectness. This way notations don't bark on undefined macros when used in
+%D combination.
\unexpanded\setvalue{\??constructionnotehandler\v!notation}%
{\csname\??constructionnotehandler\currentconstructionhandler:\constructionparameter\c!type\endcsname}
@@ -338,8 +348,7 @@
\let\setupnotes\setupnote
-% These only concern the inline symbol/number and wrapping of the
-% whole list.
+% These only concern the inline symbol/number and wrapping of the whole list.
\setupnotes % not all make sense here
[\c!location=\v!page,
@@ -437,7 +446,7 @@
{\iftrialtypesetting \else
\begingroup
\currentconstructionsynchronize
- \attribute\destinationattribute\currentconstructionattribute\relax % todo, whole text
+ \c_attr_destination\currentconstructionattribute\relax % todo, whole text
\signalcharacter
\endgroup
\fi#following}
@@ -486,20 +495,19 @@
\kern\notesignal\relax % \relax is needed to honor spaces
\fi}
-%D Interaction in notes is somewhat complex due to the way notes get
-%D flushed. In principle it is more or less the same as lists but where
-%D in lists we pack whole entries, in notes this doesn't happen. Okay,
-%D in retrospect we could have made descriptions lists but that will be
-%D a backward compatibility mess. At some point a completely new mechanism
-%D might show up, but not now. Also, as notes are inserts there is some
-%D extra mess to be kept in mind and it's easier to maintain two mechanisms
-%D than to combine too much.
+%D Interaction in notes is somewhat complex due to the way notes get flushed. In
+%D principle it is more or less the same as lists but where in lists we pack whole
+%D entries, in notes this doesn't happen. Okay, in retrospect we could have made
+%D descriptions lists but that will be a backward compatibility mess. At some point
+%D a completely new mechanism might show up, but not now. Also, as notes are inserts
+%D there is some extra mess to be kept in mind and it's easier to maintain two
+%D mechanisms than to combine too much.
%D
-%D Interaction is also complicated because we want to provide several variants.
-%D For simple reference there is no need for anything special, as page references
-%D will do and we store them in the list anyway. But if we want a destination with
-%D dimensions we will use an additional destination because we can have only
-%D one with the same name and we always have the number as one.
+%D Interaction is also complicated because we want to provide several variants. For
+%D simple reference there is no need for anything special, as page references will
+%D do and we store them in the list anyway. But if we want a destination with
+%D dimensions we will use an additional destination because we can have only one
+%D with the same name and we always have the number as one.
% interaction:
%
@@ -579,25 +587,6 @@
\let\strc_notes_set_destination_attribute_text\donothing
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_nop}
-% \def\strc_references_prepare_display_references_yes_number
-% {\let\strc_notes_set_reference_attribute_text\donothing
-% \strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
-% \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
-% \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes}
-
-% \def\strc_references_prepare_display_references_yes_text
-% {\strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
-% \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
-% \let\strc_notes_set_reference_attribute_number\donothing
-% \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes}
-
-% \def\strc_references_prepare_display_references_yes_all
-% {\strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
-% \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
-% \strc_references_get_simple_reference{symb:\currentnote:\currentnotenumber}% reference
-% \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
-% \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes}
-
\def\strc_references_prepare_display_references_yes_number
{\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
\ifcase\currentnoteinternal\relax
@@ -605,7 +594,7 @@
\else
\let\strc_notes_set_reference_attribute_text\donothing
\strc_references_get_simple_reference{*\currentnoteinternal}% reference
- \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
+ \edef\strc_notes_set_reference_attribute_number{\c_attr_reference\currentreferenceattribute}%
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
\fi}
@@ -615,7 +604,7 @@
\strc_references_prepare_display_references_nop
\else
\strc_references_get_simple_reference{*\currentnoteinternal}% reference
- \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
+ \edef\strc_notes_set_reference_attribute_text{\c_attr_reference\currentreferenceattribute}%
\let\strc_notes_set_reference_attribute_number\donothing
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
\fi}
@@ -626,9 +615,9 @@
\strc_references_prepare_display_references_nop
\else
\strc_references_get_simple_reference{*\currentnoteinternal}% reference
- \edef\strc_notes_set_reference_attribute_text{\attribute\referenceattribute\currentreferenceattribute}%
+ \edef\strc_notes_set_reference_attribute_text{\c_attr_reference\currentreferenceattribute}%
\strc_references_get_simple_reference{*\currentnoteinternal}% reference
- \edef\strc_notes_set_reference_attribute_number{\attribute\referenceattribute\currentreferenceattribute}%
+ \edef\strc_notes_set_reference_attribute_number{\c_attr_reference\currentreferenceattribute}%
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
\fi}
@@ -802,26 +791,23 @@
%D Footnotes are can be characterized by three components:
%D
%D \startitemize[packed]
-%D \item a small number \footnote {a footnote number} or
-%D symbol {\setupfootnotes [conversion=set 2]\footnote
-%D {a footnote}}
+%D \item a small number \footnote {a footnote number} or symbol {\setupfootnotes
+%D [conversion=set 2]\footnote {a footnote}}
%D \item and a similar mark at the bottom of the page
%D \item followed by some additional text
%D \stopitemize
%D
-%D Because footnotes are declared at the location of their
-%D reference they can be seen as a special kind of
-%D floating bodies. Their placement is postponed but has to be
-%D taken into account in the pagebreak calculations. This kind
-%D of calculations are forced by using \type{\insert}s and dealing
-%D with all cases is not trivial.
+%D Because footnotes are declared at the location of their reference they can be
+%D seen as a special kind of floating bodies. Their placement is postponed but has
+%D to be taken into account in the pagebreak calculations. This kind of calculations
+%D are forced by using \type{\insert}s and dealing with all cases is not trivial.
%D \macros
%D {notesenabled}
%D
-%D We need a couple of states because at some moments we don't want
-%D to mess around with inserts at all. Take for instance a table
-%D of contents. And so we can temporary disable footnotes by saying
+%D We need a couple of states because at some moments we don't want to mess around
+%D with inserts at all. Take for instance a table of contents. And so we can
+%D temporary disable footnotes by saying
%D
%D \starttyping
%D \notesenabledfalse
@@ -837,8 +823,8 @@
\appendtoks \notesenabledfalse \to \everysimplifycommands % quick hack
\appendtoks \notesenabledfalse \to \everypreroll % quick hack
-%D Often we need to process the whole set of notes and to make that
-%D fast, we use a token register:
+%D Often we need to process the whole set of notes and to make that fast, we use a
+%D token register:
% we have several synchronizers:
%
@@ -943,27 +929,6 @@
\letvalue{\??notepenalty\v!verystrict}\notepenaltyverystrict
\letvalue{\??notepenalty }\notepenaltytolerant
-% \def\strc_notes_set_width
-% {\edef\p_width{\noteparameter\c!width}%
-% \ifx\p_width\empty
-% \setnoteparameter\c!width{\hsize}%
-% \fi}
-
-\setupnotes
- [\c!width=\v!auto]
-
-\def\strc_notes_set_width
- {\edef\p_width{\noteparameter\c!width}%
- \ifx\p_width\v!auto
- \setnoteparameter\c!width{\ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi}%
- \else\ifx\p_width\empty
- \setnoteparameter\c!width{\hsize}%
- \fi\fi}
-
-\appendtoks
- \strc_notes_set_width
-\to \everysynchronizenote
-
%D The following switch can be used to disable limiting the height of the footnote
%D area, something that is needed in multi column balancing. Use this switch with
%D care.
@@ -1112,12 +1077,21 @@
\c_strc_notes_columns\plusone
\fi}
+% \def\strc_notes_set_location_page
+% {\setfalse\c_strc_notes_delayed
+% \strc_notes_set_distance
+% \strc_notes_set_columns
+% \page_inserts_set_location\currentnoteinsertion\v!page % \setupinsertion[\currentnote][\c!location=\v!page]%
+% \global\count\currentnoteinsertionnumber\numexpr\plusthousand/\c_strc_notes_columns\relax
+% \global\dimen\currentnoteinsertionnumber\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
+% \global\skip \currentnoteinsertionnumber\s_strc_notes_distance\relax}
+
\def\strc_notes_set_location_page
{\setfalse\c_strc_notes_delayed
\strc_notes_set_distance
\strc_notes_set_columns
\page_inserts_set_location\currentnoteinsertion\v!page % \setupinsertion[\currentnote][\c!location=\v!page]%
- \global\count\currentnoteinsertionnumber\numexpr\plusthousand/\c_strc_notes_columns\relax
+ \global\count\currentnoteinsertionnumber\numexpr(\plusthousand/\c_strc_notes_columns)*\nofmulticolumns\relax
\global\dimen\currentnoteinsertionnumber\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
\global\skip \currentnoteinsertionnumber\s_strc_notes_distance}
@@ -1195,12 +1169,9 @@
% \dorecurse{10}{test \mynote{one one one one one one} \input zapf \mynote{one one one one one one} }
% \stoptext
-%D The noterule can be a graphic and therefore calling this
-%D setup macro at every skipswitch is tricky (many many MP
-%D runs). Let's just reserve a few points, that probably match
-%D those of the stretch component.
-
-%D A bit messy:
+%D The noterule can be a graphic and therefore calling this setup macro at every
+%D skipswitch is tricky (many many MP runs). Let's just reserve a few points, that
+%D probably match those of the stretch component. A bit messy:
\unexpanded\def\placenoterule
{\begingroup
@@ -1220,14 +1191,8 @@
\kern\strutdepth
\fi}
-\ifdefined\setnotehsize \else
-
- \unexpanded\def\setnotehsize{\hsize\noteparameter\c!width\relax} % can be overloaded
-
-\fi
-
-%D The formatting depends on the width of the table, so we
-%D have to set \type {n} to zero.
+%D The formatting depends on the width of the table, so we have to set \type {n} to
+%D zero.
%D
%D \starttyping
%D \startbuffer
@@ -1245,21 +1210,19 @@
%D \macros
%D {footnote}
%D
-%D A footnote can have a reference as optional argument and
-%D therefore its formal specification looks like:
+%D A footnote can have a reference as optional argument and therefore its formal
+%D specification looks like:
%D
%D \showsetup{footnote}
%D
-%D This command has one optional command: the reference. By
-%D saying \type{[-]} the number is omitted. The footnote
-%D command is not that sensitive to spacing, so it's quite
-%D legal to say:
+%D This command has one optional command: the reference. By saying \type{[-]} the
+%D number is omitted. The footnote command is not that sensitive to spacing, so it's
+%D quite legal to say:
%D
%D \startbuffer
-%D Users of \CONTEXT\ must keep both feet \footnote{Given they
-%D have two.} on the ground and not get confused \footnote{Or
-%D even crazy.} by all those obscure \footnote{But fortunately
-%D readable.} parameters.
+%D Users of \CONTEXT\ must keep both feet \footnote {Given they have two.} on the
+%D ground and not get confused \footnote {Or even crazy.} by all those obscure
+%D \footnote {But fortunately readable.} parameters.
%D \stopbuffer
%D
%D \typebuffer
@@ -1274,15 +1237,11 @@
%D \stopnarrower
%D \egroup
%D
-%D Typesetting footnotes is, at least for the moment, disabled
-%D when reshaping boxes.
-%D
-%D The additional macro \type {\footnotetext} and the
-%D associated \type {\note} macro were implemented at
-%D request of users on the mailing list and a suggestion by
-%D taco to split of the symbol placement. I decided to
-%D merge this functionality with the existing \type {\note}
-%D functionality.
+%D Typesetting footnotes is, at least for the moment, disabled when reshaping boxes.
+%D The additional macro \type {\footnotetext} and the associated \type {\note} macro
+%D were implemented at request of users on the mailing list and a suggestion by taco
+%D to split of the symbol placement. I decided to merge this functionality with the
+%D existing \type {\note} functionality.
\newconditional\c_strc_notes_symbol \settrue\c_strc_notes_symbol % not used
\newconditional\c_strc_notes_skip
@@ -1357,6 +1316,13 @@
\newtoks\everyinsidenoteinsert
\newtoks\everyafternoteinsert
+\unexpanded\def\doifelseinnote
+ {\ifconditional\processingnote
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
\appendtoks
\let\flushnotes\relax
\let\postponenotes\relax
@@ -1410,17 +1376,35 @@
% \setfalse\inhibitmargindata
% \to \everyinsidenoteinsert
+\setupnotes
+ [\c!width=\v!auto]
+
+\unexpanded\def\setnotehsize
+ {\ifinsidemulticolumns
+ \setnoteparameter\c!width{\makeupwidth}%
+ \else
+ \edef\p_width{\noteparameter\c!width}%
+ \ifx\p_width\v!auto
+ % \ifinsidecolumns
+ \setnoteparameter\c!width{\ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi}%
+ % \else
+ % \setnoteparameter\c!width{\makeupwidth}%
+ % \fi
+ \else\ifx\p_width\empty
+ \setnoteparameter\c!width{\hsize}%
+ \fi\fi
+ \fi
+ \hsize\noteparameter\c!width\relax}
+
\appendtoks
% only needed when columns (could be three \set...)
+ \setnotehsize
\setsimplecolumnshsize[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\noteparameter\c!width]%
\to \everyinsidenoteinsert
-% not: \appendtoks \setnotehsize \to \everyinsidenoteinsert (spoils columns)
-
-%D Normally footnotes are saved as inserts that are called upon
-%D as soon as the pagebody is constructed. The footnote
-%D insertion routine looks just like the \PLAIN\ \TEX\ one,
-%D except that we check for the end note state.
+%D Normally footnotes are saved as inserts that are called upon as soon as the
+%D pagebody is constructed. The footnote insertion routine looks just like the
+%D \PLAIN\ \TEX\ one, except that we check for the end note state.
% testcase for split bottom alignment see (a) below
%
@@ -1506,9 +1490,12 @@
\obeydepth} % (a) added , since split footnotes will not align properly
\def\strc_notes_flush_inserts_columns
- {\startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\noteparameter\c!width]%
+ {\begingroup
+ \setnotehsize % probably still not ok for columns
+ \startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\noteparameter\c!width]%
\strc_notes_flush_global
- \stopsimplecolumns}
+ \stopsimplecolumns
+ \endgroup}
% idea: tag with attr and then just flush them again
@@ -1523,10 +1510,9 @@
{\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}%
\endgroup}
-%D Supporting end notes is surprisingly easy. Even better, we
-%D can combine this feature with solving the common \TEX\
-%D problem of disappearing inserts when they're called for in
-%D deeply nested boxes. The general case looks like:
+%D Supporting end notes is surprisingly easy. Even better, we can combine this
+%D feature with solving the common \TEX\ problem of disappearing inserts when
+%D they're called for in deeply nested boxes. The general case looks like:
%D
%D \starttyping
%D \postponenotes
@@ -1534,9 +1520,8 @@
%D \flushnotes
%D \stoptyping
%D
-%D This alternative can be used in headings, captions, tables
-%D etc. The latter one sometimes calls for notes local to
-%D the table, which can be realized by saying
+%D This alternative can be used in headings, captions, tables etc. The latter one
+%D sometimes calls for notes local to the table, which can be realized by saying
%D
%D \starttyping
%D \setlocalfootnotes
@@ -1544,26 +1529,28 @@
%D \placelocalfootnotes
%D \stoptyping
%D
-%D Postponing is accomplished by simply redefining the (local)
-%D insert operation. A not too robust method uses the
-%D \type{\insert} primitive when possible. This method fails in
-%D situations where it's not entirely clear in what mode \TEX\
-%D is. Therefore the auto method can is to be overruled when
-%D needed.
+%D Postponing is accomplished by simply redefining the (local) insert operation. A
+%D not too robust method uses the \type{\insert} primitive when possible. This
+%D method fails in situations where it's not entirely clear in what mode \TEX\ is.
+%D Therefore the auto method can is to be overruled when needed.
\newconditional\postponingnotes
% we need a proper state: normal, postponing, flushing
\unexpanded\def\postponenotes
- {\ifconditional\postponingnotes\else
- \global\settrue\postponingnotes
- \glet\flushnotes\doflushnotes
- \clf_postponenotes
+ {\ifcase\insertionmigrationmode
+ \ifconditional\postponingnotes\else
+ \global\settrue\postponingnotes
+ \glet\flushnotes\doflushnotes
+ \clf_postponenotes
+ \fi
\fi}
\let\flushnotes\relax
+% also \ifcase\insertionmigrationmode here, needs testing:
+
\unexpanded\def\startpostponingnotes % experimental, page-mix
{\ifconditional\postponingnotes\else
\global\settrue\postponingnotes
@@ -1595,8 +1582,8 @@
%D \macros
%D {startlocalfootnotes,placelocalfootnotes}
%D
-%D The next two macros can be used in for instance tables, as
-%D we'll demonstrate later on.
+%D The next two macros can be used in for instance tables, as we'll demonstrate
+%D later on.
%D
%D \showsetup{startlocalfootnotes}
%D \showsetup{placelocalfootnotes}
@@ -1678,19 +1665,17 @@
%D
%D \typebuffer
%D
-%D Because this table placement macro expect box content, and
-%D thanks to the grouping of the local footnotes, we don't need
-%D additional braces.
+%D Because this table placement macro expect box content, and thanks to the grouping
+%D of the local footnotes, we don't need additional braces.
%D
%D \getbuffer
%D \macros
%D {placefootnotes}
%D
-%D We still have no decent command for placing footnotes
-%D somewhere else than at the bottom of the page (for which no
-%D user action is needed). Footnotes (endnotes) can be
-%D placed by using
+%D We still have no decent command for placing footnotes somewhere else than at the
+%D bottom of the page (for which no user action is needed). Footnotes (endnotes) can
+%D be placed by using
%D
%D \showsetup{placefootnotes}
@@ -1866,22 +1851,20 @@
\def\calculatetotalclevernoteheight{\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalclevernoteheight}
\def\calculatetotalpagenoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalpagenoteheight}
-%D Now how can this mechanism be hooked into \CONTEXT\ without
-%D explictly postponing footnotes? The solution turned out to
-%D be rather simple:
+%D Now how can this mechanism be hooked into \CONTEXT\ without explictly postponing
+%D footnotes? The solution turned out to be rather simple:
%D
%D \starttyping
%D \everypar {...\flushnotes...}
%D \neverypar {...\postponenotes}
%D \stoptyping
%D
-%D We can use \type{\neverypar} because in most commands
-%D sensitive to footnote gobbling we disable \type{\everypar}
-%D in favor for \type{\neverypar}. In fact, this footnote
-%D implementation is the first to use this scheme.
+%D We can use \type {\neverypar} because in most commands sensitive to footnote
+%D gobbling we disable \type {\everypar} in favor for \type {\neverypar}. In fact,
+%D this footnote implementation is the first to use this scheme.
-%D This is a nasty and new secondary footnote flusher. It
-%D can be hooked into \type {\everypar} like:
+%D This is a nasty and new secondary footnote flusher. It can be hooked into \type
+%D {\everypar} like:
%D
%D \starttyping
%D \appendtoks \synchronizenotes \to \everypar
@@ -1895,10 +1878,9 @@
\let\synchronizenotes\relax
-%D When typesetting footnotes, we have to return to the
-%D footnote specific bodyfont size, which is in most cases derived
-%D from the global document bodyfont size. In the previous macros
-%D we already used a footnote specific font setting macro.
+%D When typesetting footnotes, we have to return to the footnote specific bodyfont
+%D size, which is in most cases derived from the global document bodyfont size. In
+%D the previous macros we already used a footnote specific font setting macro.
\def\strc_notes_set_bodyfont
{\let\strc_notes_set_bodyfont\relax
@@ -1906,9 +1888,23 @@
\usebodyfontparameter\noteparameter
\usealignparameter\noteparameter}
-%D The footnote mechanism defaults to a traditional one
-%D column way of showing them. By default we precede them by
-%D a small line.
+%D The footnote mechanism defaults to a traditional one column way of showing them.
+%D By default we precede them by a small line.
+
+% end notes in the margin:
+%
+% \setuptexttexts
+% [margin]
+% [] [{\directsetup{notabene}}]
+%
+% \startsetups notabene
+% \vbox to \textheight \bgroup
+% \setupalign[tolerant]
+% \topskipcorrection
+% \placenotes[endnote][before=,after=]
+% \vfilll
+% \egroup
+% \stopsetups
\definenote [\v!footnote]
\definenote [\v!endnote ] [\c!location=\v!none] % else no break
@@ -1954,8 +1950,7 @@
%D \macros
%D {note}
%D
-%D Refering to a note is accomplished by the rather short
-%D command:
+%D Refering to a note is accomplished by the rather short command:
%D
%D \showsetup{note}
%D
@@ -2031,5 +2026,10 @@
% a\footnote{\input tufte\par\input ward\relax}
% \stoptext
-\protect \endinput
+%D Bonus:
+\appendtoks
+ \setsystemmode\currentnote
+\to \everysynchronizenote
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua
index 9b3a77e741f..9c040104db4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.lua
@@ -35,6 +35,8 @@ local stopapplyprocessor = processors.stopapply
local texsetcount = tex.setcount
local texgetcount = tex.getcount
+local texconditionals = tex.conditionals
+
local ctx_convertnumber = context.convertnumber
-- storage
@@ -82,6 +84,7 @@ function pages.save(prefixdata,numberdata,extradata)
block = sections.currentblock(),
prefixdata = prefixdata and helpers.simplify(prefixdata),
numberdata = numberdata and helpers.simplify(numberdata),
+ marked = pages.markedlist(realpage), -- not yet defined
}
tobesaved[realpage] = data
if not collected[realpage] then
@@ -319,6 +322,10 @@ function pages.on_right(n)
end
end
+function pages.has_changed()
+ return texconditionals.layouthaschanged
+end
+
function pages.in_body(n)
return texgetcount("pagebodymode") > 0
end
@@ -440,6 +447,6 @@ implement { -- weird place
interfaces.implement {
name = "pageofinternal",
- arguments = { "integer" },
+ arguments = "integer",
actions = helpers.pageofinternal,
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv
index 01361e2c53b..909c418f956 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-pag.mkiv
@@ -21,14 +21,14 @@
% Allocation:
-\countdef\realpageno \zerocount \realpageno \plusone
-\countdef\userpageno \plusone \userpageno \plusone
-\countdef\subpageno \plustwo \subpageno \plusone % was \zerocount but that doesn't work well with bytext
-\countdef\arrangeno \plusthree \arrangeno \zerocount % !
-\countdef\pagenoshift\plusfour \pagenoshift\zerocount % !
-\countdef\lastpageno \plusfive \lastpageno \zerocount % !
+\ifdefined\realpageno \else \countdef\realpageno \zerocount \fi \realpageno \plusone
+\ifdefined\userpageno \else \countdef\userpageno \plusone \fi \userpageno \plusone
+\ifdefined\subpageno \else \countdef\subpageno \plustwo \fi \subpageno \plusone % was \zerocount but that doesn't work well with bytext
+\ifdefined\arrangeno \else \countdef\arrangeno \plusthree \fi \arrangeno \zerocount % !
+\ifdefined\pagenoshift \else \countdef\pagenoshift\plusfour \fi \pagenoshift\zerocount % !
+\ifdefined\lastpageno \else \countdef\lastpageno \plusfive \fi \lastpageno \zerocount % !
-\let\pageno\userpageno
+\ifdefined\pageno \else \let\pageno\userpageno \fi
\def\realfolio{\the\realpageno}
\def\userfolio{\the\userpageno}
@@ -268,8 +268,8 @@
% States:
-\newif\ifdoublesided \newconditional\layoutisdoublesided
-\newif\ifsinglesided \newconditional\layoutissinglesided
+\newconditional\layoutisdoublesided % already defined: \newif\ifdoublesided
+\newconditional\layoutissinglesided % already defined: \newif\ifsinglesided
% Realpage and subpage numbers:
@@ -316,7 +316,8 @@
\doublesidedfalse \setfalse\layoutissinglesided
\resetsystemmode\v!singlesided
\resetsystemmode\v!doublesided
- \processallactionsinset[\directpagenumberingparameter\c!alternative]
+ \processallactionsinset
+ [\directpagenumberingparameter\c!alternative]%
[ \v!singlesided=>\setsystemmode\v!singlesided\singlesidedtrue\settrue\layoutissinglesided,
\v!doublesided=>\setsystemmode\v!doublesided\doublesidedtrue\settrue\layoutisdoublesided]%
\the\everysidedswitch
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua
index c85b3338a32..bca36ccef43 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.lua
@@ -2289,7 +2289,7 @@ function genericfilters.title(data)
if data then
local titledata = data.titledata or data.useddata
if titledata then
- helpers.title(titledata.title or "?",data.metadata)
+ helpers.title(titledata.reference or titledata.title or "?",data.metadata)
end
end
end
@@ -2615,6 +2615,18 @@ implement {
-- }
implement {
+ name = "askedreference",
+ public = true,
+ protected = true,
+ actions = function()
+ local actions = references.currentset
+ if actions then
+ context("[p=%s,r=%s]",actions.prefix or "",actions.reference)
+ end
+ end
+}
+
+implement {
name = "referencerealpage",
actions = function()
local actions = references.currentset
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi
index e774117fa50..3bf33963851 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ref.mkvi
@@ -167,7 +167,7 @@
\def\strc_references_placeholder
{\ifx\dotaggedplaceholder\empty\else
- \attribute\destinationattribute\lastdestinationattribute
+ \c_attr_destination\lastdestinationattribute
\dotaggedplaceholder
\fi}
@@ -373,7 +373,7 @@
\unexpanded\def\vboxreference[#1]{\boxreference[#1]\vbox}
% \ifx\currentdestinationattribute\empty
-% \begingroup\attribute\destinationattribute\currentdestinationattribute\emptyhbox\endgroup % todo
+% \begingroup\c_attr_destination\currentdestinationattribute\emptyhbox\endgroup % todo
% \fi
\def\defaultreferencepage#text{[[[#text]]]}
@@ -737,6 +737,29 @@
\def\dummyreference{{\tttf ??}}
\def\emptyreference{{\tttf !!}}
+\installtextracker
+ {structures.referencing.show}
+ {\let\strc_references_dummy\strc_references_dummy_yes}
+ {\let\strc_references_dummy\strc_references_dummy_nop}
+
+\def\strc_references_dummy_nop
+ {\dummyreference}
+
+\def\strc_references_dummy_yes
+ {\dummyreference
+ \margindata
+ [\referencingparameter\c!labelalternative]% alternative?
+ [\c!style=\referencingparameter\c!labelstyle,
+ \c!color=\referencingparameter\c!labelcolor]
+ {\askedreference}}
+
+\let\strc_references_dummy\strc_references_dummy_nop
+
+\setupreferencing
+ [\c!labelalternative=\v!inleft,
+ \c!labelcolor=darkred,
+ \c!labelstyle=\smallinfofont]
+
%D To prevent repetitive messages concerning a reference being defined, we set such
%D an unknown reference to an empty one after the first encounter.
%D
@@ -971,9 +994,9 @@
\def\strc_references_get_reference[#key][#label]% #key = number page title text default realpage ...
{\ifsecondargument
- \doifelsereferencefound{#label}{\clf_filterreference{#key}}\dummyreference
+ \doifelsereferencefound{#label}{\clf_filterreference{#key}}\strc_references_dummy
\else
- \dummyreference
+ \strc_references_dummy
\fi}
\let\ref\getreference
@@ -983,8 +1006,8 @@
\unexpanded\def\strc_references_about[#label]%
{\dontleavehmode
\begingroup
- \let\crlf\space
- \let\\\space
+ \enforced\let\crlf\space
+ \enforced\let\\\space
\postponenotes % might go
\referencingparameter\c!left
\doifelsereferencefound{#label}
@@ -1143,12 +1166,12 @@
\unexpanded\def\atpage[#label]% todo
{\doifcheckedpagestate{#label}%
- {\goto{\labeltext \v!precedingpage }[#label]}%
- {\goto{\labeltext \v!hencefore }[#label]}%
+ {\goto{\labeltext\v!precedingpage}[#label]}%
+ {\goto{\labeltext\v!hencefore}[#label]}%
{\ignorespaces}%
- {\goto{\labeltext \v!hereafter }[#label]}%
- {\goto{\labeltext \v!followingpage }[#label]}%
- {\goto{\labeltexts\v!page\dummyreference}[#label]}}
+ {\goto{\labeltext\v!hereafter}[#label]}%
+ {\goto{\labeltext\v!followingpage}[#label]}%
+ {\goto{\labeltexts\v!page\strc_references_dummy}[#label]}}
% Someone requested this but in retrospect didn't need it so we keep it as example.
% Beware: a node is injected which is why we add ignorespaces!
@@ -1262,7 +1285,7 @@
% inefficient: double resolve
\doifelsereferencefound{#label} % we need to resolve the text
{\goto{\referencesequence}[#label]}
- {\let\currentreferencecontent\dummyreference
+ {\let\currentreferencecontent\strc_references_dummy
\goto{\referencesequence}[#label]}%
\strc_references_stop_goto}
@@ -1452,12 +1475,12 @@
\newbox\referencebox
\def\revivesavedreferenceattribute % sometimes handy as no test etc needed
- {\attribute\referenceattribute\lastsavedreferenceattribute}
+ {\c_attr_reference\lastsavedreferenceattribute}
\def\strc_references_direct_goto#content[#label]% no test for valid references
{\dontleavehmode
\begingroup
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\global\lastsavedreferenceattribute\attributeunsetvalue
\iflocation
\clf_injectreference
@@ -1472,7 +1495,7 @@
\setlocationattributes
\setstrut % can be option
\global\lastsavedreferenceattribute\lastreferenceattribute
- \attribute\referenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
\dostarttagged\t!link\empty % not here
#content%
\dostoptagged
@@ -1485,7 +1508,7 @@
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\clf_injectreference
{\referenceprefix}%
@@ -1497,7 +1520,7 @@
}%
\relax
\setlocationattributes
- \attribute\referenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
\global\lastsavedreferenceattribute\lastreferenceattribute
\dostarttagged\t!link\empty
#content%
@@ -1512,7 +1535,7 @@
\begingroup
%\setbox\referencebox\hbox\bgroup % experiment, might change again to non \par support
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
{\expandtexincurrentreference
@@ -1523,7 +1546,7 @@
\setlocationattributes
\setstrut % can be option
\global\lastsavedreferenceattribute\lastreferenceattribute
- \attribute\referenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
\dostarttagged\t!link\empty
#content%
\dostoptagged}%
@@ -1538,12 +1561,12 @@
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\setstrut % can be option
\strc_references_get_simple_reference{#internal}%
\global\lastsavedreferenceattribute\currentreferenceattribute
- \attribute\referenceattribute\currentreferenceattribute
+ \c_attr_reference\currentreferenceattribute
\setlocationattributes
\dostarttagged\t!link\empty
#content%
@@ -1579,7 +1602,7 @@
\setlocationattributes
\setstrut % can be option
\global\lastsavedreferenceattribute\lastreferenceattribute
- \attribute\referenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
\dostarttagged\t!link\empty
\let\stopgoto\strc_references_stop_goto_yes}
@@ -1591,7 +1614,7 @@
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
{\expandtexincurrentreference
@@ -1601,7 +1624,7 @@
\relax
\setlocationattributes
\global\lastsavedreferenceattribute\lastreferenceattribute
- \attribute\referenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
\dostarttagged\t!link\empty
#content%
\dostoptagged}%
@@ -1615,7 +1638,7 @@
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\clf_injectreference
{\referenceprefix}%
@@ -1636,7 +1659,7 @@
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\clf_injectreference
{\referenceprefix}%
@@ -1657,7 +1680,7 @@
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\clf_injectreference
{\referenceprefix}%
@@ -1677,7 +1700,7 @@
{\dontleavehmode
\begingroup
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\iflocation
\clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
{\expandtexincurrentreference
@@ -1700,7 +1723,7 @@
\wd\scratchbox#width%
\ht\scratchbox#height%
\global\lastsavedreferenceattribute\attributeunsetvalue
- \attribute\referenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
\clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
{\clf_injectcurrentreference
\global\lastsavedreferenceattribute\lastreferenceattribute
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua
index 6873f89eb72..6e26f6f3701 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.lua
@@ -460,6 +460,7 @@ local function preprocessentries(rawdata)
local processors = rawdata.processors
local et = entries.entries
local kt = entries.keys
+ local pt = entries.processors
local entryproc = processors and processors.entry
local pageproc = processors and processors.page
local coding = rawdata.metadata.coding
@@ -483,16 +484,20 @@ local function preprocessentries(rawdata)
end
kt = lpegmatch(coding == "xml" and entrysplitter_xml or entrysplitter_tex,k)
end
+ if not pt then
+ pt = { }
+ end
--
entries = { }
local ok = false
for k=#et,1,-1 do
local etk = et[k]
local ktk = kt[k]
+ local ptk = pt[k]
if not ok and etk == "" then
entries[k] = nil
else
- entries[k] = { etk or "", ktk ~= "" and ktk or nil }
+ entries[k] = { etk or "", ktk ~= "" and ktk or false, ptk ~= "" and ptk or false }
ok = true
end
end
@@ -677,31 +682,33 @@ implement {
{ "catcodes", "integer" },
{ "own" },
{ "xmlroot" },
- { "xmlsetup" }
+ { "xmlsetup" },
}
},
{ "entries", {
{ "entries", "list" },
{ "keys", "list" },
+ { "processors", "list" },
{ "entry" },
- { "key" }
+ { "key" },
+ { "processor" },
}
},
{ "references", {
{ "internal", "integer" },
{ "section", "integer" },
{ "view" },
- { "label" }
+ { "label" },
}
},
{ "seeword", {
- { "text" }
+ { "text" },
}
},
{ "processors", {
{ "entry" },
{ "key" },
- { "page" }
+ { "page" },
}
},
{ "userdata" },
@@ -1258,6 +1265,7 @@ function registers.flush(data,options,prefixspec,pagespec)
while d < #data do
d = d + 1
local entry = data[d]
+-- inspect(entry)
local metadata = entry.metadata
local kind = metadata.kind
local list = entry.list
@@ -1266,8 +1274,9 @@ function registers.flush(data,options,prefixspec,pagespec)
e[i] = false
end
for i=1,maxlevel do
+ local li = list[i]
if list[i] then
- e[i] = list[i][1]
+ e[i] = li[1]
end
if e[i] == done[i] then
-- skip
@@ -1309,7 +1318,7 @@ function registers.flush(data,options,prefixspec,pagespec)
local processors = entry.processors
local internal = references.internal or 0
local seeparent = references.seeparent or ""
- local processor = processors and processors[1] or ""
+ local processor = (li and li[3]) or (processors and processors[1]) or ""
-- so, we need to keep e as is (local), or we need local title = e[i] ... which might be
-- more of a problem
ctx_startregisterentry(0) -- will become a counter
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv
index e955c700ba7..1e632eebc39 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-reg.mkiv
@@ -48,7 +48,7 @@
\let\strc_registers_setup_saved\setupregister
-\unexpanded\def\setupregister % maybe we should drop the plural form
+\unexpanded\overloaded\def\setupregister % maybe we should drop the plural form
{\dotripleempty\strc_registers_setup}
\def\strc_registers_setup[#1][#2][#3]%
@@ -311,7 +311,7 @@
% needs thinking ... bla\index{bla}. will break before the . but adding a
% penalty is also no solution
\dostarttagged\t!registerlocation\currentregister
- \attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
+ \c_attr_destination\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
\dotagregisterlocation
\dostoptagged
\endgroup}
@@ -344,7 +344,7 @@
\xdef\currentregistersynchronize{\clf_deferredenhanceregister{\currentregister}\number\currentregisternumber}%
\currentregistersynchronize % here?
\dostarttagged\t!registerlocation\currentregister
- \attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
+ \c_attr_destination\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
\dotagregisterlocation
\dostoptagged
\endgroup}
@@ -564,7 +564,7 @@
view {\interactionparameter\c!focus}%
\relax % this will change
\dostarttagged\t!registerlocation\currentregister
- \attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
+ \c_attr_destination\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
\dotagregisterlocation
\dostoptagged
\endgroup}
@@ -618,7 +618,7 @@
\edef\currentregister{\firstinset{#1}}%
\the\everyplaceregister
\ifnum\namedmixedcolumnsparameter\currentregister\c!n>\plusone
- \startmixedcolumns[\currentregister]
+ \startmixedcolumns[\currentregister]%
\strc_registers_place_indeed{#1}%
\stopmixedcolumns
\else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv
index 59f3a9256ee..359bd6aecc0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv
@@ -90,9 +90,9 @@
\def\setinlineheadreferenceattributes
{\ifconditional\headisdisplay \else \iflocation
- \attribute\destinationattribute\currentstructureattribute
- \attribute\referenceattribute \currentstructurereferenceattribute
- % \attribute\internalattribute \locationcount
+ \c_attr_destination\currentstructureattribute
+ \c_attr_reference \currentstructurereferenceattribute
+ % \c_attr_internal \locationcount
\fi \fi}
\def\docheckheadreference
@@ -187,7 +187,7 @@
\ifx\p_strut\v!no
\setnostrut
\fi
- \let\\\strc_rendering_shortcut_backslash}
+ \enforced\let\\\strc_rendering_shortcut_backslash}
\unexpanded\def\strc_rendering_shortcut_backslash
{\crlf
@@ -745,8 +745,8 @@
\vbox {
\headsetupspacing
\veryraggedcenter
- \let\\\endgraf
- \let\crlf\endgraf
+ \enforced\let\\\endgraf
+ \enforced\let\crlf\endgraf
\ifconditional\headshownumber
\strut
\headnumbercontent
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv
index 0e30d92fa03..8d326e30022 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-sec.mkiv
@@ -145,6 +145,7 @@
\xdef\currentstructureshownumber {\structureparameter\c!number}%
\xdef\currentstructuresaveinlist {\structureparameter\c!saveinlist}%
\xdef\currentstructureincrementnumber{\structureparameter\c!incrementnumber}%
+ \xdef\currentstructureplaceholder {\structureparameter\c!placeholder}%
\ifx\currentstructureexpansion\s!xml
\xmlstartraw
\xdef\currentstructuretitle {\structureparameter\c!title}%
@@ -797,7 +798,7 @@
\glet\currentstructuresynchronize\donothing
\to \everyheadsynchronization
-\unexpanded\def\theheadsynchonization
+\unexpanded\def\theheadsynchronization
{% no, interferes: \signalcharacter
\the\everyheadsynchronization}
@@ -926,7 +927,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\let\getheadtitle\fullheadtitle
\ifconditional\headshownumber
\let\getheadnumber\fullheadnumber
@@ -940,7 +941,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\ifconditional\c_strc_sectioning_section
\strc_rendering_place_head_section
\else
@@ -952,7 +953,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\strc_rendering_place_head_empty % just flush 'm
\dostoptagged
\strc_sectioning_after_nop
@@ -963,7 +964,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\let\getheadtitle\fullheadtitle
\strc_rendering_place_head_text
\dostoptagged
@@ -971,7 +972,7 @@
\else\ifconditional\c_strc_sectioning_hidden
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\dostarttagged\t!sectioncaption\empty
\ifconditional\c_strc_sectioning_section
\strc_rendering_place_head_section
@@ -985,7 +986,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\strc_rendering_place_head_empty % just flush 'm
\dostoptagged
\strc_sectioning_after_nop
@@ -997,12 +998,26 @@
\setfalse\c_strc_sectioning_ignore_page
% ignorespaces prevents spaces creeping in when after=\dontleavehmode
\dostarttagged\t!sectioncontent\empty
- \ifconditional\headisdisplay
- \ignorespaces
+ \ifx\currentstructureplaceholder\empty
+ \ifconditional\headisdisplay
+ \doubleexpandafter\ignorespaces
+ \else
+ \doubleexpandafter\ignorepars
+ \fi
\else
- \expandafter\GotoPar
+ \expandafter\strc_sectioning_placeholder
\fi}
+%D \starttyping
+%D \startsubject[placeholder=todo,title=one]
+%D whatever one
+%D \stopsubject
+%D \stoptyping
+
+\def\strc_sectioning_placeholder
+ {\placeholder[\currentstructureplaceholder]%
+ \gobblenested{\e!start\currenthead}{\e!stop\currenthead}{\e!stop\currenthead}}
+
% typesetting (the getters are public)
\unexpanded\def\strc_rendering_place_head_number_and_text
@@ -1029,14 +1044,14 @@
\def\strc_sectioning_delayed_flush
{\ifvoid\b_sectioning_delayed\else
- \smashboxed\b_sectioning_delayed
+ \smashedbox\b_sectioning_delayed
\fi}
\unexpanded\def\strc_rendering_place_head_section % see hidden below
{\global\setbox\b_sectioning_delayed\hpack\bgroup
\setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
\hpack\headreferenceattributes{}% also does the mark
- \theheadsynchonization
+ \theheadsynchronization
\egroup}
\unexpanded\def\strc_rendering_place_head_hidden % maybe trialtypesetting check
@@ -1046,7 +1061,7 @@
{\noexpand\letgvalue{\??hiddenheadsync\currenthead}\relax
\noexpand\setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
\hpack\headreferenceattributes{}% otherwise no destination ... maybe tag ref as hidden and fall back on page reference
- \theheadsynchonization}} % and it's a node anyway
+ \theheadsynchronization}} % and it's a node anyway
\def\synchronizehead #1{\csname\??hiddenheadsync#1\endcsname}
\def\theheadreferenceattributes#1{\csname\??hiddenheadattr#1\endcsname}
@@ -1283,6 +1298,14 @@
\fi
\glet\previoushead\currenthead}
+\def\strc_sectioning_depth_correction
+ {\ifvmode
+ \edef\p_depthcorrection{\headparameter\c!depthcorrection}%
+ \ifx\p_depthcorrection\v!strut
+ \prevdepth\strutdepth
+ \fi
+ \fi}
+
\def\strc_sectioning_after_yes
{\ifconditional\headisdisplay
\ifconditional\c_strc_sectioning_auto_break
@@ -1290,6 +1313,7 @@
\fi
\strc_sectioning_empty_correction
\headparameter\c!after
+ \strc_sectioning_depth_correction
\fi}
\unexpanded\def\strc_sectioning_prevent_page_break % see strc-con
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua
index eec025593d7..c0ebb556cc7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.lua
@@ -37,6 +37,20 @@ end
local function finalizer()
for entry, data in next, tobesaved do
data.hash = nil
+ -- being sparse can be an option but often we actually do want the
+ -- whole list so we don't do this ... only as possible option
+ --
+ -- local entries = data.entries
+ -- local t = { }
+ -- local n = 0
+ -- for i=1,#entries do
+ -- local e = entries[i]
+ -- if e.definition.shown then
+ -- n = n + 1
+ -- t[n] = e
+ -- end
+ -- end
+ -- data.entries = t
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv
index 7f71e88f52f..cdede1d0da0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-syn.mkiv
@@ -383,6 +383,7 @@
\startsetups[\??simplelistrenderings::\v!text]
\begingroup
+ \usehyphensparameter\simplelistparameter
\usesimpleliststyleandcolor\c!textstyle\c!textcolor
\simplelistparameter\c!textcommand{\currentsynonymmeaning}%
\endgroup
@@ -663,7 +664,8 @@
\setupsynonyms
[\v!abbreviation]
- [\c!textstyle=\v!capital]
+ [\c!hyphens=\v!no, % new, not yet in setup definitions
+ \c!textstyle=\v!capital]
\definesorting
[\v!logo]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua
index 88e0f108dc9..83ff515e30c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.lua
@@ -104,6 +104,7 @@ local properties = allocate { -- todo: more "record = true" to improve forma
lines = { pdf = "Code", nature = "display" },
line = { pdf = "Code", nature = "mixed" },
+ linenumber = { pdf = "Span", nature = "inline" },
synonym = { pdf = "Span", nature = "inline" },
sorting = { pdf = "Span", nature = "inline" },
@@ -265,8 +266,8 @@ end
function structures.atlocation(str)
local specification = taglist[texgetattribute(a_tagged)]
if specification then
+ local list = specification.taglist
if list then
- local taglist = specification.taglist
local pattern = patterns[str]
for i=#list,1,-1 do
if find(list[i],pattern) then
@@ -362,7 +363,9 @@ function tags.start(tag,specification)
metadata = nil
end
local userdata = specification.userdata
- if userdata ~= "" and type(userdata) == "string" then
+ if userdata == "" then
+ specification.userdata = nil
+ elseif type(userdata) == "string" then
specification.userdata = settings_to_hash(userdata)
end
local detail = specification.detail
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv
index 83ee030902a..bae04461243 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-tag.mkiv
@@ -20,168 +20,173 @@
\unprotect
-%D Eventually these labels will either move to the modules
-%D where they're used, or they will en dup in mult-tag.
-
-\def\t!document {document} % Div
-
-\def\t!division {division} % Div
-\def\t!paragraph {paragraph} % P
-\def\t!p {p} % P
-\def\t!construct {construct} % Span
-\def\t!highlight {highlight} % Span
-
-\def\t!section {section} % Sect
-\def\t!sectioncaption {sectioncaption} % Div
-\def\t!sectiontitle {sectiontitle} % H
-\def\t!sectionnumber {sectionnumber} % H
-\def\t!sectioncontent {sectioncontent} % Div
-
-\def\t!itemgroup {itemgroup} % L
-\def\t!item {item} % Li
-\def\t!itemtag {itemtag} % Lbl
-\def\t!itemcontent {itemcontent} % LBody
-\def\t!itemhead {itemhead} % Div
-\def\t!itembody {itembody} % Div
-
-\def\t!description {description} % Li
-\def\t!descriptiontag {descriptiontag} % Lbl
-\def\t!descriptioncontent {descriptioncontent} % LBody
-\def\t!descriptionsymbol {descriptionsymbol} % Span
-
-\let\t!construction \t!description
-\let\t!constructiontag \t!descriptiontag
-\let\t!constructioncontent \t!descriptioncontent
-\let\t!constructionsymbol \t!descriptionsymbol
-
-\def\t!verbatimblock {verbatimblock} % Code
-\def\t!verbatimlines {verbatimlines} % Code
-\def\t!verbatimline {verbatimline} % Code
-\def\t!verbatim {verbatim} % Code
-
-\def\t!lines {lines} % Code
-\def\t!line {line} % Code
-
-\def\t!sorting {sorting} % Span
-\def\t!synonym {synonym} % Span
-
-\def\t!register {register} % Div
-\def\t!registerlocation {registerlocation} % Span
-\def\t!registersection {registersection} % Div
-\def\t!registertag {registertag} % Span
-\def\t!registerentries {registerentries} % Div
-\def\t!registerentry {registerentry} % Span
-\def\t!registercontent {registercontent} % Span
-\def\t!registersee {registersee} % Span
-\def\t!registersection {registersection} % Span
-\def\t!registerpages {registerpages} % Span
-\def\t!registerpage {registerpage} % Span
-\def\t!registerpagerange {registerpagerange} % Span
-\def\t!registerfrompage {registerfrompage} % Span
-\def\t!registertopage {registertopage} % Span
-\def\t!registerseparator {registerseparator} % Span
-
-\def\t!table {table} % Table
-\def\t!tablerow {tablerow} % TR
-\def\t!tablecell {tablecell} % TD
-\def\t!tableheadcell {tableheadcell} % TH
-\def\t!tablehead {tablehead} % THEAD
-\def\t!tablebody {tablebody} % TBODY
-\def\t!tablefoot {tablefoot} % TFOOT
-
-
-\def\t!tabulate {tabulate} % Table
-\def\t!tabulaterow {tabulaterow} % TR
-\def\t!tabulatecell {tabulatecell} % TD
-\def\t!tabulateheadcell {tabulateheadcell} % TH
-\def\t!tabulatehead {tabulatehead} % THEAD
-\def\t!tabulatebody {tabulatebody} % TBODY
-\def\t!tabulatefoot {tabulatefoot} % TFOOT
-
-\def\t!math {math} % math
-\def\t!mathtable {mtable} % Table
-\def\t!mathtablerow {mtr} % TR
-\def\t!mathtablecell {mtd} % TD
-\def\t!mathaction {maction} %
-\def\t!mathstacker {mstacker}
-\def\t!mathstackertop {mstackertop}
-\def\t!mathstackermid {mstackermid}
-\def\t!mathstackerbot {mstackerbot}
-
-\def\t!munderover {munderover} % special cases
-\def\t!munder {munder} % special cases
-\def\t!mover {mover} % special cases
-
-\def\t!list {list} % TOC
-\def\t!listitem {listitem} % TOCI
-\def\t!listtag {listtag} % Lbl
-\def\t!listcontent {listcontent} % P
-\def\t!listdata {listdata} % P
-\def\t!listpage {listpage} % Reference
-\def\t!listtext {listtext} % Span
-
-\def\t!delimitedblock {delimited} % BlockQuote
-\def\t!delimited {delimited} % Quote
-\def\t!delimitedsymbol {delimitedsymbol} % Span
-\def\t!delimitedcontent {delimitedcontent} % Span
-\def\t!subsentence {subsentence} % Span
-\def\t!subsentencecontent {subsentencecontent} % Span
-\def\t!subsentencesymbol {subsentencesymbol} % Span
-
-\def\t!float {float} % Div
-\def\t!floatcaption {floatcaption} % Caption
-\def\t!floatlabel {floatlabel} % Span
-\def\t!floattext {floattext} % Span
-\def\t!floatnumber {floatnumber} % Span
-\def\t!floatcontent {floatcontent} % P
-
-\def\t!image {image} % P
-
-\def\t!mpgraphic {mpgraphic} % P
-
-\def\t!formulaset {formulaset} % Div
-\def\t!formula {formula} % Div
-\def\t!formulacaption {formulacaption} % Span
-\def\t!formulalabel {formulalabel} % Span
-\def\t!formulanumber {formulanumber} % P
-\def\t!formulacontent {formulacontent} % P
-\def\t!subformula {subformula} % Div
-
-\def\t!link {link} % Link
-\def\t!reference {reference} % Span
-
-\def\t!margintext {margintext} % Span
-\def\t!margintextblock {margintextblock} % Div
-\def\t!marginanchor {marginanchor} % Span
+%D Eventually these labels will either move to the modules where they're used, or
+%D they will en dup in mult-tag.
+
+\definetagconstant{document} % Div
+
+\definetagconstant{division} % Div
+\definetagconstant{paragraph} % P
+\definetagconstant{p} % P
+\definetagconstant{construct} % Span
+\definetagconstant{highlight} % Span
+
+\definetagconstant{section} % Sect
+\definetagconstant{sectioncaption} % Div
+\definetagconstant{sectiontitle} % H
+\definetagconstant{sectionnumber} % H
+\definetagconstant{sectioncontent} % Div
+
+\definetagconstant{itemgroup} % L
+\definetagconstant{item} % Li
+\definetagconstant{itemtag} % Lbl
+\definetagconstant{itemcontent} % LBody
+\definetagconstant{itemhead} % Div
+\definetagconstant{itembody} % Div
+
+\definetagconstant{description} % Li
+\definetagconstant{descriptiontag} % Lbl
+\definetagconstant{descriptioncontent} % LBody
+\definetagconstant{descriptionsymbol} % Span
+
+\aliastagconstant{construction} {description}
+\aliastagconstant{constructiontag} {descriptiontag}
+\aliastagconstant{constructioncontent}{descriptioncontent}
+\aliastagconstant{constructionsymbol} {descriptionsymbol}
+
+\definetagconstant{verbatimblock} % Code
+\definetagconstant{verbatimlines} % Code
+\definetagconstant{verbatimline} % Code
+\definetagconstant{verbatim} % Code
+
+\definetagconstant{lines} % Code
+\definetagconstant{line} % Code
+\definetagconstant{linenumber} % Span
+
+\definetagconstant{sorting} % Span
+\definetagconstant{synonym} % Span
+
+\definetagconstant{register} % Div
+\definetagconstant{registerlocation} % Span
+\definetagconstant{registersection} % Div
+\definetagconstant{registertag} % Span
+\definetagconstant{registerentries} % Div
+\definetagconstant{registerentry} % Span
+\definetagconstant{registercontent} % Span
+\definetagconstant{registersee} % Span
+\definetagconstant{registerpages} % Span
+\definetagconstant{registerpage} % Span
+\definetagconstant{registerpagerange} % Span
+\definetagconstant{registerfrompage} % Span
+\definetagconstant{registertopage} % Span
+\definetagconstant{registerseparator} % Span
+
+\definetagconstant{table} % Table
+\definetagconstant{tablerow} % TR
+\definetagconstant{tablecell} % TD
+\definetagconstant{tableheadcell} % TH
+\definetagconstant{tablehead} % THEAD
+\definetagconstant{tablebody} % TBODY
+\definetagconstant{tablefoot} % TFOOT
+
+\definetagconstant{tabulate} % Table
+\definetagconstant{tabulaterow} % TR
+\definetagconstant{tabulatecell} % TD
+\definetagconstant{tabulateheadcell} % TH
+\definetagconstant{tabulatehead} % THEAD
+\definetagconstant{tabulatebody} % TBODY
+\definetagconstant{tabulatefoot} % TFOOT
+
+\definetagconstant{math} % math
+\definetagconstant{mtable} % Table
+\definetagconstant{mtr} % TR
+\definetagconstant{mtd} % TD
+\definetagconstant{maction} %
+\definetagconstant{mstacker}
+\definetagconstant{mstackertop}
+\definetagconstant{mstackermid}
+\definetagconstant{mstackerbot}
+
+\aliastagconstant{mtablerow} {mtr}
+\aliastagconstant{mtablecell}{mtd}
+
+\definetagconstant{munderover} % special cases
+\definetagconstant{munder} % special cases
+\definetagconstant{mover} % special cases
+
+\definetagconstant{list} % TOC
+\definetagconstant{listitem} % TOCI
+\definetagconstant{listtag} % Lbl
+\definetagconstant{listcontent} % P
+\definetagconstant{listdata} % P
+\definetagconstant{listpage} % Reference
+\definetagconstant{listtext} % Span
+
+\definetagconstant{delimited} % BlockQuote
+%definetagconstant{delimited} % Quote
+\definetagconstant{delimitedsymbol} % Span
+\definetagconstant{delimitedcontent} % Span
+
+\aliastagconstant{delimitedblock}{delimited}
+
+\definetagconstant{subsentence} % Span
+\definetagconstant{subsentencecontent} % Span
+\definetagconstant{subsentencesymbol} % Span
+
+\definetagconstant{float} % Div
+\definetagconstant{floatcaption} % Caption
+\definetagconstant{floatlabel} % Span
+\definetagconstant{floattext} % Span
+\definetagconstant{floatnumber} % Span
+\definetagconstant{floatcontent} % P
+
+\definetagconstant{image} % P
+
+\definetagconstant{mpgraphic} % P
+
+\definetagconstant{formulaset} % Div
+\definetagconstant{formula} % Div
+\definetagconstant{formulacaption} % Span
+\definetagconstant{formulalabel} % Span
+\definetagconstant{formulanumber} % P
+\definetagconstant{formulacontent} % P
+\definetagconstant{subformula} % Div
+
+\definetagconstant{link} % Link
+\definetagconstant{reference} % Span
+
+\definetagconstant{margintext} % Span
+\definetagconstant{margintextblock} % Div
+\definetagconstant{marginanchor} % Span
% we might opt for verbose variants so this is experimental:
-\def\t!label {label} % Span
-\def\t!number {number} % Span
+\definetagconstant{label} % Span
+\definetagconstant{number} % Span
-\def\t!ignore {ignore} % Span
-\def\t!private {private} % Span
+\definetagconstant{ignore} % Span
+\definetagconstant{private} % Span
-\def\t!mid {mid} % Span
-\def\t!sub {sub} % Span
-\def\t!sup {sup} % Span
-\def\t!subsup {subsup} % Span
+\definetagconstant{mid} % Span
+\definetagconstant{sub} % Span
+\definetagconstant{sup} % Span
+\definetagconstant{subsup} % Span
-\def\t!unit {unit} % Span
-\def\t!quantity {quantity} % Span
-\def\t!number {number} % Span
+\definetagconstant{unit} % Span
+\definetagconstant{quantity} % Span
+%definetagconstant{number} % Span
-\def\t!combination {combination} % Span
-\def\t!combinationpair {combinationpair} % Span
-\def\t!combinationcontent {combinationcontent} % Span
-\def\t!combinationcaption {combinationcaption} % Span
+\definetagconstant{combination} % Span
+\definetagconstant{combinationpair} % Span
+\definetagconstant{combinationcontent} % Span
+\definetagconstant{combinationcaption} % Span
-\def\t!publications {publications} % Span
-\def\t!publication {publication} % Span
-\def\t!pubfld {pubfld} % Span
+\definetagconstant{publications} % Span
+\definetagconstant{publication} % Span
+\definetagconstant{pubfld} % Span
-\def\t!block {block} % Div
-\def\t!userdata {userdata} % Div
+\definetagconstant{block} % Div
+\definetagconstant{userdata} % Div
% \setuptaglabeltext
% [en]
@@ -329,11 +334,8 @@
\chardef\strc_tags_placeholder_char\zerocount % "FFFC
-\unexpanded\def\strc_tags_enable
- {% once enable one is toast
- \global\settrue\c_strc_tags_enabled
- % and gets:
- \let\dotaggedplaceholder \strc_tags_placeholder_char
+\unexpanded\def\strc_tags_enable_indeed
+ {\let\dotaggedplaceholder \strc_tags_placeholder_char
\let\dostarttagged \strc_tags_enabled_start_detail
\let\dostarttaggednodetail\strc_tags_enabled_start_no_detail
\let\dostarttaggedchained \strc_tags_enabled_start_chained
@@ -341,6 +343,12 @@
\let\dostartignoretagging \strc_tags_start_yes_ignore
\let\dostopignoretagging \strc_tags_stop_yes_ignore}
+\unexpanded\def\strc_tags_enable
+ {% once enable one is toast
+ \global\settrue\c_strc_tags_enabled
+ % and gets:
+ \strc_tags_enable_indeed}
+
\unexpanded\def\strc_tags_disable
{\ifconditional\c_strc_tags_enabled
% so now all are artifacts
@@ -411,7 +419,7 @@
\to \everysetuptagging
\unexpanded\def\forgettagging
- {\attribute\taggedattribute\attributeunsetvalue}
+ {\c_attr_tagged\attributeunsetvalue}
\setuptagging
[\c!state=\v!stop,
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua b/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua
index e547c8710d6..4914b6818f1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-box.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['supp-box'] = {
version = 1.001,
+ optimize = true,
comment = "companion to supp-box.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -28,6 +29,11 @@ local vlist_code = nodecodes.vlist
local glue_code = nodecodes.glue
local penalty_code = nodecodes.penalty
local glyph_code = nodecodes.glyph
+local par_code = nodecodes.par
+
+local indent_code = nodes.listcodes.indent
+
+local hmode_code = tex.modelevels.horizontal
local nuts = nodes.nuts
local tonut = nuts.tonut
@@ -39,11 +45,13 @@ local getprev = nuts.getprev
local getboth = nuts.getboth
local getdisc = nuts.getdisc
local getid = nuts.getid
+local getsubtype = nuts.getsubtype
local getlist = nuts.getlist
local getattribute = nuts.getattribute
local getbox = nuts.getbox
local getdirection = nuts.getdirection
local getwidth = nuts.getwidth
+local getwhd = nuts.getwhd
local takebox = nuts.takebox
----- setfield = nuts.setfield
@@ -70,6 +78,7 @@ local getdimensions = nuts.dimensions
local hpack = nuts.hpack
local vpack = nuts.vpack
local traverse_id = nuts.traverse_id
+local traverse = nuts.traverse
local free = nuts.free
local findtail = nuts.tail
@@ -89,6 +98,7 @@ local setlistcolor = nodes.tracers.colors.setlist
local texget = tex.get
local texgetbox = tex.getbox
local texsetdimen = tex.setdimen
+local texgetnest = tex.getnest
local function hyphenatedlist(head,usecolor)
local current = head and tonut(head)
@@ -825,3 +835,68 @@ implement {
context(limitate(t))
end,
}
+
+implement {
+ name = "doifelseindented",
+ public = true,
+ protected = true,
+ actions = function()
+ local n = texgetnest()
+ local b = false
+ if n.mode == hmode_code then
+ n = tonut(n.head)
+ while n do
+ n = getnext(n)
+ if n then
+ local id = getid(n)
+ if id == hlist_code then
+ if getsubtype(n) == indent_code then
+ b = getwidth(n) > 0
+ break
+ end
+ elseif id ~= par_code then
+ break
+ end
+ end
+ end
+ end
+ commands.doifelse(b)
+ end,
+}
+
+implement {
+ name = "noflinesinbox",
+ public = true,
+ protected = false,
+ arguments = "integer",
+ actions = function(n)
+ local c = 0
+ local b = getbox(n)
+ if b then
+ b = getlist(b)
+ if b then
+ for n, id in traverse(b) do
+ if id == hlist_code or id == vlist_code then
+ c = c + 1
+ end
+ end
+ end
+ end
+ context(c)
+ end,
+}
+
+do
+
+ local takebox = tex.takebox
+
+ interfaces.implement {
+ name = "thebox",
+ public = true,
+ arguments = "integer",
+ actions = function(n)
+ context(takebox(n))
+ end
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv
index d43459c631b..16f09302301 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkiv
@@ -66,7 +66,7 @@
%D The next macro suppresses over- and underfull messages which often makes sense
%D when we deal with boxes.
-\unexpanded\def\dontcomplain
+\protected\def\dontcomplain
{\hbadness\plustenthousand
\vbadness\plustenthousand
\hfuzz \maxdimen
@@ -112,16 +112,16 @@
%D Smashing is introduced in \PLAIN\ \TEX, and stands for reducing the dimensions of
%D a box to zero. The most resolute one is presented first.
-\unexpanded\def\smashbox#1%
- {\wd#1\zeropoint
- \ht#1\zeropoint
- \dp#1\zeropoint}
+% \protected\def\smashbox#1%
+% {\wd#1\zeropoint
+% \ht#1\zeropoint
+% \dp#1\zeropoint}
-\unexpanded\def\smashboxed#1%
- {\wd#1\zeropoint
- \ht#1\zeropoint
- \dp#1\zeropoint
- \box#1\relax}
+% \protected\def\smashboxed#1%
+% {\wd#1\zeropoint
+% \ht#1\zeropoint
+% \dp#1\zeropoint
+% \box#1\relax}
%D \macros
%D {hsmashbox,vsmashbox}
@@ -129,10 +129,10 @@
%D Smashing can be used for overlaying boxes. Depending on the mode, horizontal or
%D vertical, one can use:
-\unexpanded\def\hsmashbox#1%
+\protected\def\hsmashbox#1%
{\wd#1\zeropoint}
-\unexpanded\def\vsmashbox#1%
+\protected\def\vsmashbox#1%
{\ht#1\zeropoint
\dp#1\zeropoint}
@@ -140,7 +140,7 @@
\newcount\c_boxes_register
-\unexpanded\def\smashbox
+\protected\def\smashbox
{\afterassignment\syst_boxes_smash_boxes_register\c_boxes_register}
\def\syst_boxes_smash_boxes_register
@@ -148,28 +148,30 @@
\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint}
-\unexpanded\def\hsmashbox
+\protected\def\hsmashbox
{\afterassignment\syst_boxes_hsmashed_boxes_register\c_boxes_register}
\def\syst_boxes_hsmashed_boxes_register
{\wd\c_boxes_register\zeropoint}
-\unexpanded\def\vsmashbox
+\protected\def\vsmashbox
{\afterassignment\syst_boxes_vsmashed_boxes_register\c_boxes_register}
\def\syst_boxes_vsmashed_boxes_register
{\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint}
-\unexpanded\def\smashedbox
+\protected\def\smashedbox
{\afterassignment\syst_boxes_smashed_boxes_register\c_boxes_register}
-\unexpanded\def\syst_boxes_smashed_boxes_register
+\protected\def\syst_boxes_smashed_boxes_register
{\wd\c_boxes_register\zeropoint
\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint
\box\c_boxes_register}
+\let\smashboxed\smashedbox
+
%D \macros
%D {hsmash,vsmash,
%D hsmashed,vsmashed}
@@ -178,23 +180,23 @@
%D some subtle differences betreen the smash and smashed alternatives. The later
%D ones reduce all dimensions to zero.
-\unexpanded\def\hsmash {\bgroup\dowithnextboxcs\syst_boxes_hsmashed_nextbox\hbox}
-\unexpanded\def\vsmash {\bgroup\dowithnextboxcs\syst_boxes_vsmashed_nextbox\vbox}
-\unexpanded\def\hsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \hbox}
-\unexpanded\def\vsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \vbox}
+\protected\def\hsmash {\bgroup\dowithnextboxcs\syst_boxes_hsmashed_nextbox\hbox}
+\protected\def\vsmash {\bgroup\dowithnextboxcs\syst_boxes_vsmashed_nextbox\vbox}
+\protected\def\hsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \hbox}
+\protected\def\vsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \vbox}
-\unexpanded\def\syst_boxes_hsmashed_nextbox
+\protected\def\syst_boxes_hsmashed_nextbox
{\wd\nextbox\zeropoint
\box\nextbox
\egroup}
-\unexpanded\def\syst_boxes_vsmashed_nextbox
+\protected\def\syst_boxes_vsmashed_nextbox
{\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
\box\nextbox
\egroup}
-\unexpanded\def\syst_boxes_smashed_nextbox
+\protected\def\syst_boxes_smashed_nextbox
{\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
\wd\nextbox\zeropoint
@@ -211,16 +213,16 @@
%D \smashedvbox to ... {...}
%D \stoptyping
-\unexpanded\def\smashedhbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\hbox}
-\unexpanded\def\smashedvbox{\vpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\vbox}
+\protected\def\smashedhbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\hbox}
+\protected\def\smashedvbox{\vpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\vbox}
%D First we define a helper. We use a \LUATEX\ feature in order to avoid
%D mathpalettes.
\newcount\c_boxes_math_style
-\unexpanded\def\syst_boxes_math_set_nextbox#1%
- {\c_boxes_math_style\mathstyle
+\protected\def\syst_boxes_math_set_nextbox#1%
+ {\c_boxes_math_style\normalmathstyle
\setbox\nextbox\hbox{\normalstartimath\mathsurround\zeropoint\triggermathstyle\c_boxes_math_style{#1}\normalstopimath}}
%D \macros
@@ -230,7 +232,7 @@
%D catcode safer. It is needed by the math module (although the \type {\leavevmode}
%D is not added here).
-\unexpanded\def\smash
+\protected\def\smash
{\begingroup
\futurelet\nexttoken\syst_boxes_smash}
@@ -309,9 +311,9 @@
%D {\mathchoice}, the next macro looks ugly. We also take care of non||braced
%D arguments.
-\unexpanded\def\phantom {\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed }
-\unexpanded\def\vphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_v}
-\unexpanded\def\hphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_h}
+\protected\def\phantom {\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed }
+\protected\def\vphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_v}
+\protected\def\hphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_h}
\def\syst_boxes_phantom_math #1{\syst_boxes_math_set_nextbox{#1}\syst_boxes_phantom_make }
\def\syst_boxes_phantom_math_v#1{\syst_boxes_math_set_nextbox{#1}\syst_boxes_phantom_make_v}
@@ -375,7 +377,7 @@
%D We also define plain's \type {\mathstrut}.
-\unexpanded\def\mathstrut{\vphantom(} % can be made faster by inlining
+\protected\def\mathstrut{\vphantom(} % can be made faster by inlining
%D \macros
%D {getboxheight}
@@ -409,7 +411,7 @@
%D The next alternative is slightly more clever, since it accepts \type {{12}} as
%D well as \type {12} as box number.
-\unexpanded\def\getboxheight#1\of#2\box#3%
+\protected\def\getboxheight#1\of#2\box#3%
{\def\next{#1\dimexpr\ht\c_boxes_register+\dp\c_boxes_register\relax}%
\afterassignment\next\c_boxes_register=#3}
@@ -458,7 +460,7 @@
\newcount\noflines
\newdimen\noflinesheight
-\unexpanded\def\getnoflines#1%
+\protected\def\getnoflines#1%
{\noflinesheight#1\relax
\ifzeropt\noflinesheight
\noflines\zerocount
@@ -474,7 +476,7 @@
\advance\noflines\minusone
\fi\fi}
-\unexpanded\def\getroundednoflines#1%
+\protected\def\getroundednoflines#1%
{\noflinesheight#1\relax
\ifzeropt\noflinesheight
\noflines\zerocount
@@ -488,7 +490,7 @@
\noflines\noflinesheight
\fi\fi}
-\unexpanded\def\getrawnoflines#1%
+\protected\def\getrawnoflines#1%
{\noflinesheight#1\relax
\ifzeropt\noflinesheight
\noflines\zerocount
@@ -541,15 +543,18 @@
%D \determinenoflines{\definedfont[Sans at 40pt]test\\test}
%D \stoptyping
-\def\syst_boxes_determine_noflines % can be mkiv'd
- {\beginofshapebox
- \unvbox\nextbox
- \endofshapebox
- \globalscratchcounter\zerocount
- \reshapebox{\global\advance\globalscratchcounter\plusone}%
- \expandafter\egroup\expandafter\noflines\the\globalscratchcounter\relax}
+% \def\syst_boxes_determine_noflines % can be mkiv'd
+% {\beginofshapebox
+% \unvbox\nextbox
+% \endofshapebox
+% \globalscratchcounter\zerocount
+% \reshapebox{\global\advance\globalscratchcounter\plusone}%
+% \expandafter\egroup\expandafter\noflines\the\globalscratchcounter\relax}
-\unexpanded\def\determinenoflines
+\def\syst_boxes_determine_noflines
+ {\expandafter\egroup\expandafter\noflines\noflinesinbox\nextbox\relax}
+
+\protected\def\determinenoflines
{\bgroup
\forgetall
\let\crlf\endgraf
@@ -567,7 +572,7 @@
%D \doiftext {data} {then branch}
%D \stoptyping
-\unexpanded\def\doifelsetext#1%
+\protected\def\doifelsetext#1%
{\begingroup
\setbox\scratchbox\hbox % no \hpack because we can have fallbacks
{\settrialtypesetting
@@ -580,7 +585,7 @@
\let\doiftextelse\doifelsetext
-\unexpanded\def\doiftext#1%
+\protected\def\doiftext#1%
{\begingroup
\setbox\scratchbox\hbox % no \hpack because we can have fallbacks
{\settrialtypesetting
@@ -624,7 +629,7 @@
%D In this implementation the \type {\aftergroup} construction is needed because
%D \type {\afterassignment} is executed inside the box.
-\unexpanded\def\dowithnextbox#1%
+\protected\def\dowithnextbox#1%
{\def\syst_boxes_with_next_box{#1}%
\afterassignment\syst_boxes_with_next_box_indeed
\setbox\nextbox}
@@ -632,7 +637,7 @@
\def\syst_boxes_with_next_box_indeed
{\aftergroup\syst_boxes_with_next_box}
-\unexpanded\def\dowithnextboxcs#1%
+\protected\def\dowithnextboxcs#1%
{\let\syst_boxes_with_next_box#1%
\afterassignment\syst_boxes_with_next_box_indeed
\setbox\nextbox}
@@ -652,7 +657,7 @@
%D A slower but more versatile implementation is:
%D
%D \starttyping
-%D \unexpanded\def\dowithnextbox#1#2%
+%D \protected\def\dowithnextbox#1#2%
%D {\def\syst_boxes_with_next_box{#1}%
%D \ifx#2\hbox
%D \afterassignment\syst_boxes_with_next_box_indeed
@@ -682,7 +687,7 @@
\def\nextboxdp {\dp\nextbox}
\def\nextboxhtdp{\dimexpr\ht\nextbox+\dp\nextbox\relax}
-\unexpanded\def\flushnextbox{\box\nextbox}
+\protected\def\flushnextbox{\box\nextbox}
%D \macros
%D {dowithnextboxcontent}
@@ -696,13 +701,13 @@
%D
%D {\em todo: Search source for potential usage!}
-\unexpanded\def\dowithnextboxcontent#1#2% inside, after
+\protected\def\dowithnextboxcontent#1#2% inside, after
{\def\syst_boxes_with_next_box_one{#2}%
\def\syst_boxes_with_next_box_two{#1}%
\afterassignment\syst_boxes_with_next_box_content_indeed
\setbox\nextbox}
-\unexpanded\def\dowithnextboxcontentcs#1#2% inside, after
+\protected\def\dowithnextboxcontentcs#1#2% inside, after
{\let\syst_boxes_with_next_box_one#2%
\let\syst_boxes_with_next_box_two#1%
\afterassignment\syst_boxes_with_next_box_content_indeed
@@ -729,15 +734,15 @@
\def\domathllap{\mathpalette\dodomathllap} \def\dodomathllap#1#2{\dollap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
\def\domathrlap{\mathpalette\dodomathrlap} \def\dodomathrlap#1#2{\dorlap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
-\unexpanded\def\rlap{\mathortext\domathrlap\dorlap}
-\unexpanded\def\llap{\mathortext\domathllap\dollap}
-\unexpanded\def\clap{\mathortext\domathclap\doclap}
+\protected\def\rlap{\mathortext\domathrlap\dorlap}
+\protected\def\llap{\mathortext\domathllap\dollap}
+\protected\def\clap{\mathortext\domathclap\doclap}
\def\dodotlap{\vpack to \zeropoint{\vss\box\nextbox}\endgroup}
\def\dodoblap{\vpack to \zeropoint{\box\nextbox\vss}\endgroup}
-\unexpanded\def\tlap{\begingroup\dowithnextboxcs\dodotlap\vbox}
-\unexpanded\def\blap{\begingroup\dowithnextboxcs\dodoblap\vbox}
+\protected\def\tlap{\begingroup\dowithnextboxcs\dodotlap\vbox}
+\protected\def\blap{\begingroup\dowithnextboxcs\dodoblap\vbox}
%D \macros
%D {beginofshapebox,
@@ -871,7 +876,7 @@
\def\shapesignal{.12345678pt} % or 12345sp
-\unexpanded\def\reshapebox#1%
+\protected\def\reshapebox#1%
{\doreshapebox
{#1}%
{\penalty\shapepenalty}%
@@ -895,11 +900,11 @@
% We will turn this into a \MKIV\ variant (we can use \type {\vpack} too).
-\unexpanded\def\insertshapesignal
+\protected\def\insertshapesignal
{\hpack to \shapesignal{\strut\hss}% plus \strut
\prevdepth\strutdp} % never \nointerlineskip
-\unexpanded\def\restoreshapebox % compensates for the signal
+\protected\def\restoreshapebox % compensates for the signal
{\global\setbox\tmpshapebox\vbox{\vskip-\lineheight\unvcopy\oldshapebox}}
\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
@@ -936,21 +941,21 @@
\advance\shapecounter \plusone
\fi}
-\unexpanded\def\beginofshapebox
+\protected\def\beginofshapebox
{\setbox\oldshapebox\vbox
\bgroup
\reshapingboxtrue
\the\everyshapebox
\insertshapesignal}
-\unexpanded\def\endofshapebox
+\protected\def\endofshapebox
{\endgraf
\egroup}
\let\beginshapebox\beginofshapebox
\let\endshapebox \endofshapebox
-\unexpanded\def\flushshapebox
+\protected\def\flushshapebox
{\bgroup
\ifzeropt\ht\newshapebox
\else
@@ -1001,7 +1006,7 @@
%
% \omlijnd[offset=0pt,hoogte=8mm,uitlijnen={rechts,laho}]{\bfa test}
-\unexpanded\def\innerflushshapebox
+\protected\def\innerflushshapebox
{\ifzeropt\ht\newshapebox \else
\unvcopy\newshapebox\relax % unvcopy ! else spacing problem
% \kern-\dp\newshapebox\relax
@@ -1024,7 +1029,7 @@
%D use \type {\shapedhbox} instead of \type {\hbox}, since it manages the height and
%D depth of the line.
-\unexpanded\def\shapedhbox % lines with non strutted dimensions have
+\protected\def\shapedhbox % lines with non strutted dimensions have
{\expanded{\dowithnextbox % interlineskip so if we want the original
{\ht\nextbox\the\ht\shapebox % spacing, we need to preserve the original
\dp\nextbox\the\dp\shapebox % height and depth which is definitely
@@ -1044,10 +1049,10 @@
%D \showhyphens{dohyphenatedword}
%D \stoptyping
-\unexpanded\def\doshowhyphenatednextbox
+\protected\def\doshowhyphenatednextbox
{\clf_showhyphenatedinlist\nextbox}
-\unexpanded\def\showhyphens % hpack: so no processing (we hyphenate in lua)
+\protected\def\showhyphens % hpack: so no processing (we hyphenate in lua)
{\dowithnextboxcs\doshowhyphenatednextbox\hpack}
%D The following macros are seldom used but handy for tracing.
@@ -1058,19 +1063,19 @@
%D \hyphenatedfile{tufte}
%D \stoptyping
-\unexpanded\def\dohyphenatednextbox
+\protected\def\dohyphenatednextbox
{\clf_hyphenatedlist\nextbox false\relax
\unhbox\nextbox}
-\unexpanded\def\hyphenatedword {\dowithnextboxcs\dohyphenatednextbox\hbox}
-\unexpanded\def\hyphenatedpar {\dowithnextboxcs\dohyphenatednextbox\hbox}
-\unexpanded\def\hyphenatedfile#1{\dowithnextboxcs\dohyphenatednextbox\hbox{\readfile{#1}\donothing\donothing}}
+\protected\def\hyphenatedword {\dowithnextboxcs\dohyphenatednextbox\hbox}
+\protected\def\hyphenatedpar {\dowithnextboxcs\dohyphenatednextbox\hbox}
+\protected\def\hyphenatedfile#1{\dowithnextboxcs\dohyphenatednextbox\hbox{\readfile{#1}\donothing\donothing}}
-\unexpanded\def\dohyphenatednextboxcolor
+\protected\def\dohyphenatednextboxcolor
{\clf_hyphenatedlist\nextbox true\relax
\unhbox\nextbox}
-\unexpanded\def\hyphenatedcoloredword{\dowithnextboxcs\dohyphenatednextboxcolor\hbox}
+\protected\def\hyphenatedcoloredword{\dowithnextboxcs\dohyphenatednextboxcolor\hbox}
%D \macros
%D {processtokens}
@@ -1099,11 +1104,11 @@
%D The list of tokens may contain spaces, while \type {\\}, \type {{}} and \type {\
%D } are handled as space too.
-\unexpanded\def\processtokens#1#2#3#4#5%
+\protected\def\processtokens#1#2#3#4#5%
{\begingroup
\def\lastcharacter{\lastcharacter}% hm, recursive ?
+ \let\\\space
\def\space{ }%
- \let\\=\space
\def\before {#1}%
\def\between{#2}%
\def\after {#3}%
@@ -1188,7 +1193,7 @@
\ifdefined\fakecompoundhyphen\else \let\fakecompoundhyphen\relax \fi
\ifdefined\veryraggedright \else \def\veryraggedright{\raggedright} \fi
-\unexpanded\def\limitatetext
+\protected\def\limitatetext
{\bgroup % evt \setstrut
\forgetall % otherwise indentation and so
\let\limitatetext\firstofthreearguments
@@ -1285,7 +1290,7 @@
\ifdim\wd\scratchboxtwo<\wd\scratchboxone #1\else\unhbox\scratchboxone\fi
\egroup}
-\unexpanded\def\limitatetext#1#2#3% \expanded added 2003/01/16
+\protected\def\limitatetext#1#2#3% \expanded added 2003/01/16
{\splitatcomma{#2}\leftlimit\rightlimit
\ifx\rightlimit\empty
\normallimitatetext {#1}\leftlimit {#3}%
@@ -1299,7 +1304,7 @@
%D \limitatefirstline{\input tufte\relax}{10cm}{\unknown}
%D \stoptyping
-\unexpanded\def\limitatefirstline#1#2#3%
+\protected\def\limitatefirstline#1#2#3%
{\hbox\bgroup\strut % \hpack
\setbox\scratchbox\hbox{\begstrut#1\endstrut}%
\ifdim\wd\scratchbox>#2\relax
@@ -1342,7 +1347,7 @@
% todo: provide variant with #1 picked up as box
-\unexpanded\def\processisolatedchars#1#2%
+\protected\def\processisolatedchars#1#2%
{\dontleavehmode
\begingroup
\setbox\scratchbox\hbox{\settrialtypesetting#2{\savecurrentattributes{pic}}}%
@@ -1355,7 +1360,7 @@
\relax
\endgroup}
-\unexpanded\def\processisolatedwords#1#2%
+\protected\def\processisolatedwords#1#2%
{\dontleavehmode
\begingroup
\setbox\scratchbox\hbox{\settrialtypesetting#2{\savecurrentattributes{pic}}}%
@@ -1370,7 +1375,7 @@
%D A variant:
-\unexpanded\def\applytocharacters#1%
+\protected\def\applytocharacters#1%
{\dontleavehmode
\dowithnextbox{\clf_applytobox
method {char}%
@@ -1380,7 +1385,7 @@
\relax}%
\hbox}
-\unexpanded\def\applytowords#1%
+\protected\def\applytowords#1%
{\dontleavehmode
\dowithnextbox{\clf_applytobox
method {word}%
@@ -1392,33 +1397,33 @@
%D The old call:
-\unexpanded\def\processwords#1%
+\protected\def\processwords#1%
{\processisolatedwords{#1}\processword}
\let\processword\relax
-\unexpanded\def\applytosplitstringchar#1#2%
+\protected\def\applytosplitstringchar#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
method {char}%
\relax}
-\unexpanded\def\applytosplitstringword#1#2%
+\protected\def\applytosplitstringword#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
method {word}%
\relax}
-\unexpanded\def\applytosplitstringline#1#2%
+\protected\def\applytosplitstringline#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
method {line}%
\relax}
-\unexpanded\def\applytosplitstringcharspaced#1#2%
+\protected\def\applytosplitstringcharspaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
@@ -1426,7 +1431,7 @@
spaced true%
\relax}
-\unexpanded\def\applytosplitstringwordspaced#1#2%
+\protected\def\applytosplitstringwordspaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
@@ -1434,7 +1439,7 @@
spaced true%
\relax}
-\unexpanded\def\applytosplitstringlinespaced#1#2%
+\protected\def\applytosplitstringlinespaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
@@ -1467,11 +1472,11 @@
%D would have ended up in the text. This macro can be useful when building
%D complicated menus, headers and footers and|/|or margin material.
-\unexpanded\def\sbox
+\protected\def\sbox
{\vpack\bgroup
\dowithnextboxcs\syst_boxes_sbox_finish\vbox}
-\unexpanded\def\syst_boxes_sbox_finish
+\protected\def\syst_boxes_sbox_finish
{\setbox\nextbox\hpack
{\strut % not needed
\dp\nextbox\zeropoint % not needed
@@ -1487,7 +1492,7 @@
%D xx \ruledhbox{\inlinedbox{\tfd test}} xx
%D \stoptyping
-\unexpanded\def\inlinedbox
+\protected\def\inlinedbox
{\bgroup
\dowithnextbox
{\setbox\nextbox\hpack
@@ -1505,7 +1510,7 @@
%D
%D This boxing macro limits the height and depth to those of a strut.
-\unexpanded\def\struttedbox
+\protected\def\struttedbox
{\hpack\bgroup
\dowithnextboxcs\syst_boxes_struttedbox_finish\hbox}
@@ -1521,7 +1526,7 @@
%D This macro compensates the difference between the topskip and strutheight. Watch
%D how we preserve the depth when it equals strutdepth.
-\unexpanded\def\topskippedbox
+\protected\def\topskippedbox
{\hpack\bgroup\dowithnextboxcs\syst_boxes_topskippedbox_finish\hbox}
\def\syst_boxes_topskippedbox_finish
@@ -1573,7 +1578,7 @@
%D The dimensions of the surrounding box are kept intact. This commands handles
%D positive and negative dimensions (which is why we need two boxes with rules).
-\unexpanded\def\centeredbox#1#% height +/-dimen width +/-dimen
+\protected\def\centeredbox#1#% height +/-dimen width +/-dimen
{\bgroup
\setbox\scratchboxone\vpack to \vsize
\bgroup
@@ -1613,7 +1618,7 @@
%D
%D Do you see what we call this one \type {next}?
-\unexpanded\def\centerednextbox#1#%
+\protected\def\centerednextbox#1#%
{\bgroup
\dowithnextbox
{\hsize\wd\nextbox
@@ -1634,7 +1639,7 @@
%D When omitted, the current \type {\hsize} and \type {\vsize} are used. Local
%D dimensions are supported.
-\unexpanded\def\centerbox#1#% optional height +/-dimen width +/-dimen
+\protected\def\centerbox#1#% optional height +/-dimen width +/-dimen
{\bgroup
\dowithnextbox
{\setlocalhsize
@@ -1664,7 +1669,7 @@
\newif\ifstretchrigidcolumns
\newif\iftightrigidcolumns % if true: just a vbox, no depth/noflines/gridsnap corrrections
-\unexpanded\def\setrigidcolumnhsize#1#2#3% todo: \dimexpr
+\protected\def\setrigidcolumnhsize#1#2#3% todo: \dimexpr
{\xdef\savedrigidhsize{\the\hsize}%
\hsize#1\relax
\global\chardef\rigidcolumns#3\relax
@@ -1685,7 +1690,7 @@
\let\rigidcolumnlines\!!zerocount
-\unexpanded\def\rigidcolumnbalance#1%
+\protected\def\rigidcolumnbalance#1%
{\ifnum\rigidcolumns=1 % tzt ook h/d correctie
\ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi#1\relax
\else
@@ -1776,7 +1781,7 @@
%D Create line and fake height of paragraph by messign with heights: a nice hack by
%D DEK himself.
-%\unexpanded\def\setvboxtohbox
+%\protected\def\setvboxtohbox
% {\bgroup
% \ifdim\baselineskip<16pt \relax
% \scratchdimen\baselineskip
@@ -1790,13 +1795,13 @@
% \xdef\vboxtohboxfactor{\withoutpt\the\scratchdimen}%
% \egroup}
%
-% \unexpanded\def\startvboxtohbox
+% \protected\def\startvboxtohbox
% {\bgroup
% \setvboxtohbox
% \setbox\scratchbox\hbox\bgroup}
%
-% \unexpanded\def\stopvboxtohbox
-% {\ifcase\vboxtohboxslack\else\hskip\zeropoint\!!minus\vboxtohboxslack\fi
+% \protected\def\stopvboxtohbox
+% {\ifcase\vboxtohboxslack\else\hskip\zeropoint\s!minus\vboxtohboxslack\fi
% \egroup
% \dp\scratchbox\zeropoint
% \ht\scratchbox\vboxtohboxfactor\wd\scratchbox
@@ -1810,17 +1815,17 @@
%newbox\d_syst_boxes_vboxtohbox
\newbox\d_syst_boxes_separator
-\unexpanded\def\startvboxtohboxseparator
+\protected\def\startvboxtohboxseparator
{\setbox\d_syst_boxes_separator\hbox attr \vboxtohboxseparatorattribute\plusone\bgroup}
-\unexpanded\def\stopvboxtohboxseparator
+\protected\def\stopvboxtohboxseparator
{\egroup}
-\unexpanded\def\startvboxtohbox
+\protected\def\startvboxtohbox
{\begingroup
\setbox\scratchbox\hbox\bgroup}
-\unexpanded\def\stopvboxtohbox
+\protected\def\stopvboxtohbox
{\ifvoid\d_syst_boxes_separator
\hskip\zeropoint\ifcase\vboxtohboxslack\else\s!minus\vboxtohboxslack\fi % we really need a skip
\else
@@ -1833,12 +1838,12 @@
% A possible reconstruction:
-\unexpanded\def\convertvboxtohbox
+\protected\def\convertvboxtohbox
{\makehboxofhboxes
\setbox\scratchboxone\hpack{\unhbox\scratchboxone\removehboxes}% \hpack
\noindent\unhbox\scratchboxone\par}
-\unexpanded\def\makehboxofhboxes
+\protected\def\makehboxofhboxes
{\setbox\scratchboxone\emptyhbox
\loop % \doloop { .. \exitloop .. }
\setbox\scratchboxtwo\lastbox
@@ -1846,7 +1851,7 @@
\setbox\scratchboxone\hpack{\box\scratchboxtwo\unhbox\scratchboxone}%
\repeat}
-\unexpanded\def\removehboxes
+\protected\def\removehboxes
{\setbox\scratchboxone\lastbox
\ifhbox\scratchboxone
{\removehboxes}\unhbox\scratchboxone
@@ -1854,16 +1859,16 @@
% And one special for notes:
-% \unexpanded\def\starthboxestohbox
+% \protected\def\starthboxestohbox
% {\bgroup
% \beginofshapebox}
%
-% \unexpanded\def\stophboxestohbox
+% \protected\def\stophboxestohbox
% {\endofshapebox
% \doreshapebox
% {\hbox\bgroup
% \unhbox\shapebox
-% \ifcase\hboxestohboxslack\else\hskip\zeropoint\!!minus\hboxestohboxslack\fi
+% \ifcase\hboxestohboxslack\else\hskip\zeropoint\s!minus\hboxestohboxslack\fi
% \egroup}%
% \donothing
% \donothing
@@ -1875,11 +1880,11 @@
% More modern:
-\unexpanded\def\starthboxestohbox
+\protected\def\starthboxestohbox
{\bgroup
\setbox\scratchbox\vbox\bgroup}
-\unexpanded\def\stophboxestohbox
+\protected\def\stophboxestohbox
{\egroup
\clf_vboxlisttohbox\scratchbox\nextbox\dimexpr\hboxestohboxslack\relax
\dontleavehmode
@@ -1899,7 +1904,7 @@
\newdimen \lasthhboxwidth
\newskip \hhboxindent
-\unexpanded\def\unhhbox#1\with#2%
+\protected\def\unhhbox#1\with#2%
{\bgroup
\nopenalties
\dontcomplain
@@ -1930,7 +1935,7 @@
\unhbox1
\egroup}
-\unexpanded\def\hboxofvbox
+\protected\def\hboxofvbox
{\bgroup
\afterassignment\dohboxofvbox
\scratchcounter=}
@@ -1973,7 +1978,7 @@
%D dimension of this box suggest some content, the resulting box is unboxed and
%D surrounded by the first two arguments, else the third arguments is executed.
-\unexpanded\def\doifcontent#1#2#3%
+\protected\def\doifcontent#1#2#3%
{\dowithnextbox
{\ifhbox\nextbox
\ifdim\wd\nextbox>\zeropoint
@@ -2019,7 +2024,7 @@
% \newbox\processbox % public : this is the one where \nextbox's end up in
%
-% \unexpanded\def\processboxes#1%
+% \protected\def\processboxes#1%
% {\bgroup
% \def\syst_boxes_process_indeed{#1}% #1 can be redefined halfway
% \setbox\processbox\emptybox
@@ -2042,7 +2047,7 @@
% \afterassignment\syst_boxes_process
% \let\nexttoken}
%
-% \unexpanded\def\syst_boxes_process_nop
+% \protected\def\syst_boxes_process_nop
% {\removeunwantedspaces
% \box\processbox
% \nexttoken % messy as we are still in the group
@@ -2050,7 +2055,7 @@
\newbox\processbox % public : this is the one where \nextbox's end up in
-\unexpanded\def\processboxes#1%
+\protected\def\processboxes#1%
{\bgroup
\def\syst_boxes_process_indeed{#1}% #1 can be redefined halfway
\setbox\processbox\emptybox
@@ -2064,7 +2069,7 @@
\syst_boxes_process_indeed % takes \nextbox makes \processbox
\doifelsenextbgroup\syst_boxes_process_yes\syst_boxes_process_nop}
-\unexpanded\def\syst_boxes_process_nop
+\protected\def\syst_boxes_process_nop
{\removeunwantedspaces
\box\processbox
\egroup}
@@ -2124,7 +2129,7 @@
\kern-\scratchwidth
\hpack to \scratchwidth{\hss\box\nextbox \hss}}}
-\unexpanded\def\startoverlay
+\protected\def\startoverlay
{\bgroup
\let\stopoverlay\egroup
\processboxes\syst_boxes_overlay_process}
@@ -2142,7 +2147,7 @@
%D
%D returns an empty box with the dimensions of the box specified, here being zero.
-\unexpanded\def\fakebox
+\protected\def\fakebox
{\bgroup
\afterassignment\syst_boxes_fakebox_finish\scratchcounter}
@@ -2171,13 +2176,13 @@
\def\syst_boxes_lrc_process#1{\bgroup\forgetall\let\\\endgraf#1\let\next}
-\unexpanded\def\lbox#1#{\vbox#1\syst_boxes_lrc_process\raggedleft }
-\unexpanded\def\cbox#1#{\vbox#1\syst_boxes_lrc_process\raggedcenter}
-\unexpanded\def\rbox#1#{\vbox#1\syst_boxes_lrc_process\raggedright }
+\protected\def\lbox#1#{\vbox#1\syst_boxes_lrc_process\raggedleft }
+\protected\def\cbox#1#{\vbox#1\syst_boxes_lrc_process\raggedcenter}
+\protected\def\rbox#1#{\vbox#1\syst_boxes_lrc_process\raggedright }
-\unexpanded\def\ltop#1#{\vtop#1\syst_boxes_lrc_process\raggedleft }
-\unexpanded\def\ctop#1#{\vtop#1\syst_boxes_lrc_process\raggedcenter}
-\unexpanded\def\rtop#1#{\vtop#1\syst_boxes_lrc_process\raggedright }
+\protected\def\ltop#1#{\vtop#1\syst_boxes_lrc_process\raggedleft }
+\protected\def\ctop#1#{\vtop#1\syst_boxes_lrc_process\raggedcenter}
+\protected\def\rtop#1#{\vtop#1\syst_boxes_lrc_process\raggedright }
%D The alternatives \type {\tbox} and \type {\bbox} can be used to properly align
%D boxes, like in:
@@ -2199,8 +2204,8 @@
%D
%D \getbuffer
-\unexpanded\def\tbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_tbox_finish\hbox}
-\unexpanded\def\bbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_bbox_finish\hbox}
+\protected\def\tbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_tbox_finish\hbox}
+\protected\def\bbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_bbox_finish\hbox}
\def\syst_boxes_tbox_finish
{\scratchdepth\dimexpr\ht\nextbox+\dp\nextbox-\ht\strutbox\relax
@@ -2231,9 +2236,9 @@
\def\dodomhbox{\hpack to \hsize{\hss\box\nextbox\hss}}
\def\dodorhbox{\hpack to \hsize{\hss\box\nextbox }}
-\unexpanded\def\lhbox{\dowithnextboxcs\dodolhbox\hbox}
-\unexpanded\def\mhbox{\dowithnextboxcs\dodomhbox\hbox}
-\unexpanded\def\rhbox{\dowithnextboxcs\dodorhbox\hbox}
+\protected\def\lhbox{\dowithnextboxcs\dodolhbox\hbox}
+\protected\def\mhbox{\dowithnextboxcs\dodomhbox\hbox}
+\protected\def\rhbox{\dowithnextboxcs\dodorhbox\hbox}
\let\lefthbox \lhbox
\let\midhbox \mhbox
@@ -2254,15 +2259,15 @@
\newdimen\sizeofbox
-\unexpanded\def\boxofsize#1%
+\protected\def\boxofsize#1%
{\bgroup
\sizeofbox\zeropoint
\scratchdimen\zeropoint
\def\docommand
{\advance\sizeofbox\scratchdimen
- \futurelet\next\dodocommand}%
+ \futurelet\nexttoken\dodocommand}%
\def\dodocommand
- {\ifx\next\bgroup
+ {\ifx\nexttoken\bgroup
\expanded{\egroup#1 to \the\sizeofbox}%
\else
\expandafter\afterassignment\expandafter\docommand\expandafter\scratchdimen
@@ -2276,7 +2281,7 @@
% \limitvbox
% \limithbox
-\unexpanded\def\limitatelines#1#2% size sentinel
+\protected\def\limitatelines#1#2% size sentinel
{\dowithnextbox
{\scratchdimen#1\hsize
\ifdim\wd\nextbox>\scratchdimen
@@ -2287,7 +2292,7 @@
\unhbox\nextbox}
\hbox}
-\unexpanded\def\fittoptobaselinegrid % weg hier
+\protected\def\fittoptobaselinegrid % weg hier
{\dowithnextbox
{\bgroup
\par
@@ -2316,7 +2321,7 @@
\setbox\fakedboxcursor\hpack
{\vrule\s!width\zeropoint\s!height\zeropoint\s!depth\zeropoint}
-\unexpanded\def\boxcursor % overloaded in core-vis
+\protected\def\boxcursor % overloaded in core-vis
{\iftraceboxplacement
\bgroup
\scratchdimen2\onepoint
@@ -2333,21 +2338,21 @@
\copy\fakedboxcursor
\fi}
-\unexpanded\def\placedbox
+\protected\def\placedbox
{\iftraceboxplacement\ruledhbox\else\hbox\fi}
\newdimen\boxoffset
\newdimen\boxhdisplacement
\newdimen\boxvdisplacement
-\unexpanded\def\rightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbox_finish \placedbox}
-\unexpanded\def\leftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbox_finish \placedbox}
-\unexpanded\def\topbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_topbox_finish \placedbox}
-\unexpanded\def\bottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_bottombox_finish \placedbox}
-\unexpanded\def\lefttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_lefttopbox_finish \placedbox}
-\unexpanded\def\righttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_righttopbox_finish \placedbox}
-\unexpanded\def\leftbottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbottombox_finish \placedbox}
-\unexpanded\def\rightbottombox{\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbottombox_finish\placedbox}
+\protected\def\rightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbox_finish \placedbox}
+\protected\def\leftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbox_finish \placedbox}
+\protected\def\topbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_topbox_finish \placedbox}
+\protected\def\bottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_bottombox_finish \placedbox}
+\protected\def\lefttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_lefttopbox_finish \placedbox}
+\protected\def\righttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_righttopbox_finish \placedbox}
+\protected\def\leftbottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbottombox_finish \placedbox}
+\protected\def\rightbottombox{\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbottombox_finish\placedbox}
\let\topleftbox \lefttopbox
\let\toprightbox \righttopbox
@@ -2413,10 +2418,10 @@
\boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox
\egroup}
-\unexpanded\def\middlebox {\hpack\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox}
-\unexpanded\def\baselinemiddlebox{\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinemiddlebox_finish\placedbox}
-\unexpanded\def\baselineleftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox}
-\unexpanded\def\baselinerightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox}
+\protected\def\middlebox {\hpack\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox}
+\protected\def\baselinemiddlebox{\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinemiddlebox_finish\placedbox}
+\protected\def\baselineleftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox}
+\protected\def\baselinerightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox}
\def\syst_boxes_middlebox_finish
{\global\boxhdisplacement-.5\wd\nextbox
@@ -2450,7 +2455,7 @@
%D
%D Experimental, not yet frozen:
-\unexpanded\def\lrtbbox#1#2#3#4% l r t b
+\protected\def\lrtbbox#1#2#3#4% l r t b
{\bgroup
\dowithnextboxcontent
{\advance\hsize-#1\advance\hsize-#2\relax
@@ -2463,7 +2468,7 @@
%D
%D See core-tbl.tex for an example of its usage:
-\unexpanded\def\toplinebox
+\protected\def\toplinebox
{\dowithnextboxcs\syst_boxes_toplinebox_finish\tbox}
\def\syst_boxes_toplinebox_finish
@@ -2502,20 +2507,20 @@
\installcorenamespace {stackbox}
\installcorenamespace {stacklst}
-\unexpanded\def\setstackbox#1#2%
+\protected\def\setstackbox#1#2%
{\ifcsname\??stackbox#1:#2\endcsname\else
\expandafter\newbox\csname\??stackbox#1:#2\endcsname
\fi
\global\setbox\csname\??stackbox#1:#2\endcsname\vbox}
-\unexpanded\def\initializeboxstack#1%
+\protected\def\initializeboxstack#1%
{\def\docommand##1{\setstackbox{#1}{##1}{}}%
\ifcsname\??stacklst#1\endcsname
\expandafter\processcommacommand\expandafter[\lastnamedcs]\docommand
\fi
\letgvalueempty{\??stacklst#1}}
-\unexpanded\def\savebox#1#2% stack name
+\protected\def\savebox#1#2% stack name
{% beware, \setxvalue defines the cs beforehand so we cannot use the
% test inside the { }
\ifcsname\??stacklst#1\endcsname
@@ -2526,27 +2531,27 @@
\fi
\setstackbox{#1}{#2}}
-\unexpanded\def\flushbox#1#2% unwrapped
+\protected\def\flushbox#1#2% unwrapped
{\ifcsname\??stackbox#1:#2\endcsname
\box\lastnamedcs
\else
\emptybox
\fi}
-\unexpanded\def\restorebox#1#2% unwrapped
+\protected\def\restorebox#1#2% unwrapped
{\ifcsname\??stackbox#1:#2\endcsname
\copy\lastnamedcs
\else
\emptybox
\fi}
-\unexpanded\def\foundbox#1#2% wrapped
+\protected\def\foundbox#1#2% wrapped
{\vpack
{\ifcsname\??stackbox#1:#2\endcsname
\copy\lastnamedcs
\fi}}
-\unexpanded\def\doifelsebox#1#2%
+\protected\def\doifelsebox#1#2%
{\ifcsname\??stackbox#1:#2\endcsname
\ifvoid\lastnamedcs
\doubleexpandafter\secondoftwoarguments
@@ -2566,11 +2571,11 @@
\newcount\c_syst_boxes_stack
\let \b_syst_boxes_stack\relax
-\unexpanded\def\syst_boxes_stack_allocate
+\protected\def\syst_boxes_stack_allocate
{\newbox\b_syst_boxes_stack
\expandafter\let\csname\??boxstack\number\c_syst_boxes_stack\endcsname\b_syst_boxes_stack}
-\unexpanded\def\syst_boxes_push#1#2%
+\protected\def\syst_boxes_push#1#2%
{\global\advance\c_syst_boxes_stack\plusone
\expandafter\let\expandafter\b_syst_boxes_stack\csname\??boxstack\number\c_syst_boxes_stack\endcsname
\ifx\b_syst_boxes_stack\relax % cheaper then csname check as in most cases it's defined
@@ -2578,15 +2583,15 @@
\fi
#1\setbox\b_syst_boxes_stack\box#2\relax}
-\unexpanded\def\syst_boxes_pop#1#2%
+\protected\def\syst_boxes_pop#1#2%
{#1\setbox#2\box\csname\??boxstack\number\c_syst_boxes_stack\endcsname
\global\advance\c_syst_boxes_stack\minusone}
-\unexpanded\def\localpushbox {\syst_boxes_push\relax}
-\unexpanded\def\localpopbox {\syst_boxes_pop \relax}
+\protected\def\localpushbox {\syst_boxes_push\relax}
+\protected\def\localpopbox {\syst_boxes_pop \relax}
-\unexpanded\def\globalpushbox{\syst_boxes_push\global}
-\unexpanded\def\globalpopbox {\syst_boxes_pop \global}
+\protected\def\globalpushbox{\syst_boxes_push\global}
+\protected\def\globalpopbox {\syst_boxes_pop \global}
%D And here is a more modern one (not yet in i-*):
%D
@@ -2604,15 +2609,15 @@
%D \resetboxesincache{foo}
%D \stoptyping
-\unexpanded\def\putboxincache #1#2#3{\clf_putboxincache {#1}{#2}#3\relax}
-\unexpanded\def\getboxfromcache #1#2#3{\clf_getboxfromcache {#1}{#2}#3\relax}
-\unexpanded\def\doifelseboxincache #1#2{\clf_doifelseboxincache {#1}{#2}}
-\unexpanded\def\copyboxfromcache #1#2#3{\clf_copyboxfromcache {#1}{#2}#3\relax}
-\unexpanded\def\directboxfromcache #1#2{\clf_directboxfromcache {#1}{#2}}
-\unexpanded\def\directcopyboxfromcache#1#2{\clf_directcopyboxfromcache{#1}{#2}}
-\unexpanded\def\resetboxesincache #1{\clf_resetboxesincache {#1}}
+\protected\def\putboxincache #1#2#3{\clf_putboxincache {#1}{#2}#3\relax}
+\protected\def\getboxfromcache #1#2#3{\clf_getboxfromcache {#1}{#2}#3\relax}
+\protected\def\doifelseboxincache #1#2{\clf_doifelseboxincache {#1}{#2}}
+\protected\def\copyboxfromcache #1#2#3{\clf_copyboxfromcache {#1}{#2}#3\relax}
+\protected\def\directboxfromcache #1#2{\clf_directboxfromcache {#1}{#2}}
+\protected\def\directcopyboxfromcache#1#2{\clf_directcopyboxfromcache{#1}{#2}}
+\protected\def\resetboxesincache #1{\clf_resetboxesincache {#1}}
-\unexpanded\def\putnextboxincache#1#2%
+\protected\def\putnextboxincache#1#2%
{\dowithnextbox{\putboxincache{#1}{#2}\nextbox}}
%D \macros
@@ -2621,21 +2626,21 @@
%D While \type {\removedepth} removes the preceding depth, \type {\obeydepth} makes
%D sure we have depth. Both macros leave the \type {\prevdepth} untouched.
-\unexpanded\def\removedepth
+\protected\def\removedepth
{\ifvmode
\ifdim\prevdepth>\zeropoint
\kern-\prevdepth
\fi
\fi}
-\unexpanded\def\obeydepth
+\protected\def\obeydepth
{\par % watch out for changes in math formulas
\ifvmode\ifdim\prevdepth<\zeropoint\else\ifdim\prevdepth<\strutdp
\kern\dimexpr\strutdp-\prevdepth\relax
\prevdepth\strutdp
\fi\fi\fi}
-\unexpanded\def\undepthed
+\protected\def\undepthed
{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\hbox}
%D \macros
@@ -2643,10 +2648,10 @@
%D
%D A funny (but rather stupid) one, plus a redefinition.
-\unexpanded\def\removebottomthings
+\protected\def\removebottomthings
{\dorecurse\plusfive{\unskip\unkern\unpenalty}}
-\unexpanded\def\removelastskip % \ifvmode the plain tex one \fi
+\protected\def\removelastskip % \ifvmode the plain tex one \fi
{\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi}
%D \macros
@@ -2655,7 +2660,7 @@
%D This macro sets the dimensions of a box to those of a strut. Sort of obsolete so
%D it will go away.
-\unexpanded\def\makestrutofbox % not used
+\protected\def\makestrutofbox % not used
{\afterassignment\syst_boxes_makestrutofbox\c_boxes_register}
\def\syst_boxes_makestrutofbox
@@ -2674,8 +2679,8 @@
%D \hsmash{\raisebox{100pt}\hbox{test}}
%D \stoptyping
-\unexpanded\def\raisebox#1{\bgroup\afterassignment\syst_boxes_raise_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
-\unexpanded\def\lowerbox#1{\bgroup\afterassignment\syst_boxes_lower_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
+\protected\def\raisebox#1{\bgroup\afterassignment\syst_boxes_raise_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
+\protected\def\lowerbox#1{\bgroup\afterassignment\syst_boxes_lower_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
\def\syst_boxes_raise_indeed{\dowithnextboxcs\syst_boxes_raise_finish}
\def\syst_boxes_lower_indeed{\dowithnextboxcs\syst_boxes_lower_finish}
@@ -2696,7 +2701,7 @@
% vcenter in text, we kunnen vcenter overloaden
-\unexpanded\def\halfwaybox
+\protected\def\halfwaybox
{\hpack\bgroup
\dowithnextboxcs\syst_boxes_halfwaybox_finish\hbox}
@@ -2705,7 +2710,7 @@
\lower.5\ht\nextbox\box\nextbox
\egroup}
-\unexpanded\def\depthonlybox
+\protected\def\depthonlybox
{\tpack\bgroup
\dowithnextboxcs\syst_boxes_depthonlybox_finish\vbox}
@@ -2728,7 +2733,9 @@
%D
%D Also new: tex mode \type {\vcenter}.
-\unexpanded\def\vcenter
+% not in lmtxmode:
+
+\protected\def\vcenter
{\vbox\bgroup
\dowithnextboxcs\syst_boxes_vcenter_finish\vbox}
@@ -2748,7 +2755,7 @@
%D
%D A not so well unhboxable box can be made with:
-\unexpanded\def\frozenhbox
+\protected\def\frozenhbox
{\hpack\bgroup
\dowithnextboxcs\syst_boxes_frozenhbox_finish\hbox}
@@ -2764,11 +2771,11 @@
\installcorenamespace {box_x}
\installcorenamespace {box_y}
-\unexpanded\def\setboxllx #1#2{\expandafter\edef\csname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
-\unexpanded\def\setboxlly #1#2{\expandafter\edef\csname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
+\protected\def\setboxllx #1#2{\expandafter\edef\csname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
+\protected\def\setboxlly #1#2{\expandafter\edef\csname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
-\unexpanded\def\gsetboxllx#1#2{\expandafter\xdef\csname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
-\unexpanded\def\gsetboxlly#1#2{\expandafter\xdef\csname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
+\protected\def\gsetboxllx#1#2{\expandafter\xdef\csname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
+\protected\def\gsetboxlly#1#2{\expandafter\xdef\csname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
%def\getboxllx#1{\ifcsname\??box_x\number#1\endcsname\csname\??box_x\number#1\endcsname\else\zeropoint\fi}
%def\getboxlly#1{\ifcsname\??box_y\number#1\endcsname\csname\??box_y\number#1\endcsname\else\zeropoint\fi}
@@ -2791,7 +2798,7 @@
%D \shownextbox\vbox{\setupwhitespace[big]test\endgraf\thinrule}
%D \stoptyping
-\unexpanded\def\shownextbox % seldom used
+\protected\def\shownextbox % seldom used
{\dowithnextbox
{\bgroup
\showboxbreadth\maxdimen
@@ -2803,7 +2810,7 @@
\interactionmode\scratchcounter
\egroup}}
-\unexpanded\def\spreadhbox#1% rebuilds \hbox{<box><hss><box><hss><box>}
+\protected\def\spreadhbox#1% rebuilds \hbox{<box><hss><box><hss><box>}
{\bgroup
\ifhbox#1\relax
\setbox\scratchboxtwo\emptybox
@@ -2835,7 +2842,7 @@
%D \minimalhbox 100pt {test}
%D \stoptyping
-\unexpanded\def\minimalhbox#1#%
+\protected\def\minimalhbox#1#%
{\dowithnextbox
{\bgroup
\setbox\scratchbox\hpack#1{\hss}%
@@ -2846,7 +2853,7 @@
%D A bit dirty:
-\unexpanded\def\nodestostring#1#2% more tolerant for #2=\cs
+\protected\def\nodestostring#1#2% more tolerant for #2=\cs
{\begingroup
\setbox\nextbox\hbox{#2}%
\normalexpanded{\endgroup\edef\noexpand#1{\clf_boxtostring\nextbox}}}
@@ -2877,7 +2884,7 @@
\let\getnaturalwd\clf_getnaturalwd % no intermediate
\let\setnaturalwd\clf_setnaturalwd % no intermediate
-\unexpanded\def\doifelserighttoleftinbox{\clf_doifelserighttoleftinbox}
+\protected\def\doifelserighttoleftinbox{\clf_doifelserighttoleftinbox}
\let\doifrighttoleftinboxelse\doifelserighttoleftinbox
@@ -2886,23 +2893,23 @@
\definesystemattribute [runningtext] [public]
%unexpanded\def\runninghbox{\hbox attr \runningtextattribute \plusone} % not yet in i-*
-\unexpanded\def\runninghbox{\hbox attr \runningtextattribute \fontid\font} % not yet in i-*
+\protected\def\runninghbox{\hbox attr \runningtextattribute \fontid\font} % not yet in i-*
%D To complement lua (yet undocumented):
-\unexpanded\def\beginhbox{\hbox\bgroup} \let\endhbox\egroup
-\unexpanded\def\beginvbox{\vbox\bgroup} \let\endvbox\egroup
-\unexpanded\def\beginvtop{\vtop\bgroup} \let\endvtop\egroup
+\protected\def\beginhbox{\hbox\bgroup} \let\endhbox\egroup
+\protected\def\beginvbox{\vbox\bgroup} \let\endvbox\egroup
+\protected\def\beginvtop{\vtop\bgroup} \let\endvtop\egroup
-\unexpanded\def\sethboxregister#1{\setbox#1\hbox}
-\unexpanded\def\setvboxregister#1{\setbox#1\vbox}
-\unexpanded\def\setvtopregister#1{\setbox#1\vtop}
+\protected\def\sethboxregister#1{\setbox#1\hbox}
+\protected\def\setvboxregister#1{\setbox#1\vbox}
+\protected\def\setvtopregister#1{\setbox#1\vtop}
-\unexpanded\def\flushboxregister#1{\box\numexpr#1\relax}
+\protected\def\flushboxregister#1{\box\numexpr#1\relax}
-\unexpanded\def\starthboxregister#1{\setbox#1\hbox\bgroup} \let\stophboxregister\egroup
-\unexpanded\def\startvboxregister#1{\setbox#1\vbox\bgroup} \let\stopvboxregister\egroup
-\unexpanded\def\startvtopregister#1{\setbox#1\vtop\bgroup} \let\stopvtopregister\egroup
+\protected\def\starthboxregister#1{\setbox#1\hbox\bgroup} \let\stophboxregister\egroup
+\protected\def\startvboxregister#1{\setbox#1\vbox\bgroup} \let\stopvboxregister\egroup
+\protected\def\startvtopregister#1{\setbox#1\vtop\bgroup} \let\stopvtopregister\egroup
%D For whatever third party package needs it:
%D
@@ -2918,7 +2925,7 @@
\installcorenamespace{localbox}
-\unexpanded\def\newlocalbox#1%
+\protected\def\newlocalbox#1%
{\expandafter\let\expandafter#1\csname\??localbox\string#1\endcsname
\ifx#1\relax
\syst_aux_new_localbox#1%
@@ -2930,26 +2937,26 @@
%D Who knows when this comes in handy:
-\unexpanded\def\lastlinewidth{\dimexpr\clf_lastlinewidth\scaledpoint\relax}
+\protected\def\lastlinewidth{\dimexpr\clf_lastlinewidth\scaledpoint\relax}
%D Keep as reference:
-% \unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
-% \unexpanded\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop}
+% \protected\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
+% \protected\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop}
%D This one keeps dimensions and sets the shift field (and so it's more for testing
%D than for real usage):
-\unexpanded\def\shiftbox {\clf_shiftbox}
-\unexpanded\def\vpackbox {\clf_vpackbox}
-\unexpanded\def\hpackbox {\clf_hpackbox}
-\unexpanded\def\vpackedbox{\clf_vpackedbox}
-\unexpanded\def\hpackedbox{\clf_hpackedbox}
+\protected\def\shiftbox {\clf_shiftbox}
+\protected\def\vpackbox {\clf_vpackbox}
+\protected\def\hpackbox {\clf_hpackbox}
+\protected\def\vpackedbox{\clf_vpackedbox}
+\protected\def\hpackedbox{\clf_hpackedbox}
%D This one has been moved from a 2 decade old file. It makes something boxed
%D sit on the baseline.
-\unexpanded\def\linebox
+\protected\def\linebox
{\hpack\bgroup\dowithnextbox
{\scratchdimen\dimexpr\dimexpr\htdp\nextbox-\lineheight\relax/2+\dp\strutbox\relax
\setbox\nextbox\hpack{\lower\scratchdimen\box\nextbox}%
@@ -3000,10 +3007,10 @@
%
% \unprotect
%
-% \unexpanded\def\withwordsinstring#1#2% command str
+% \protected\def\withwordsinstring#1#2% command str
% {\ctxcommand{withwords(\!!bs#1\!!es,\!!bs#2\!!es)}}
%
-% \unexpanded\def\withwordsinfile#1#2% command name
+% \protected\def\withwordsinfile#1#2% command name
% {\ctxcommand{withwords(\!!bs#1\!!es,io.loaddata(resolvers.findfile("#2")))}}
%
% \protect
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv
index 277f2b7cac2..0b643709916 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-dir.mkiv
@@ -13,41 +13,34 @@
\unprotect
-\chardef\directionlefttoright\zerocount
-\chardef\directionrighttoleft\plusone
-
-\edef\??bdir{\ifdefined\bodydir bdir\else direction\fi}
-
-\unexpanded\edef\naturalhbox {\hbox \??bdir\directionlefttoright}
-\unexpanded\edef\naturalvbox {\vbox \??bdir\directionlefttoright}
-\unexpanded\edef\naturalvtop {\vtop \??bdir\directionlefttoright}
-\unexpanded\edef\naturalhpack {\hpack \??bdir\directionlefttoright}
-\unexpanded\edef\naturalvpack {\vpack \??bdir\directionlefttoright}
-\unexpanded\edef\naturaltpack {\tpack \??bdir\directionlefttoright}
-
-\unexpanded\edef\reversehbox {\hbox \??bdir\directionrighttoleft}
-\unexpanded\edef\reversevbox {\vbox \??bdir\directionrighttoleft}
-\unexpanded\edef\reversevtop {\vtop \??bdir\directionrighttoleft}
-\unexpanded\edef\reversehpack {\hpack \??bdir\directionrighttoleft}
-\unexpanded\edef\reversevpack {\vpack \??bdir\directionrighttoleft}
-\unexpanded\edef\reversetpack {\tpack \??bdir\directionrighttoleft}
-
-\ifdefined\bodydir
- \let\bodydir \undefined \let\normalbodydir \undefined
- \let\bodydirection\undefined \let\normalbodydirection\undefined
-\fi
-
-\ifdefined\pagedir
- \let\pagedir \undefined \let\normalpagedir \undefined
- \let\pagedirection\undefined \let\normalpagedirection\undefined
-\fi
+% \immutable\chardef\directionlefttoright\zerocount
+% \immutable\chardef\directionrighttoleft\plusone
+
+\setnewconstant\directionlefttoright\zerocount
+\setnewconstant\directionrighttoleft\plusone
+
+\immutable\edef\??bdir{\ifdefined\bodydir bdir\else direction\fi}
+
+\permanent\protected\edef\naturalhbox {\hbox \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalvbox {\vbox \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalvtop {\vtop \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalhpack {\hpack \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalvpack {\vpack \??bdir\directionlefttoright}
+\permanent\protected\edef\naturaltpack {\tpack \??bdir\directionlefttoright}
+
+\permanent\protected\edef\reversehbox {\hbox \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversevbox {\vbox \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversevtop {\vtop \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversehpack {\hpack \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversevpack {\vpack \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversetpack {\tpack \??bdir\directionrighttoleft}
% \expanded{\defineactivecharacter \number"2000E} {\textdirection\directionrighttoleft\relax}
% \expanded{\defineactivecharacter \number"2000F} {\textdirection\directionlefttoright\relax}
\def\syst_direction_string#1{\ifcase#1=\plusone r2l\else l2r\fi}
-\unexpanded\def\showdirsinmargin
+\permanent\protected\def\showdirsinmargin
{\normalexpanded{\inleft{\naturalhbox
{\ttxx[\syst_direction_string\pardirection,\syst_direction_string\textdirection]}}}}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv
index f3b94f73522..8f49ac25453 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-mat.mkiv
@@ -53,7 +53,7 @@
% \let\normalstartdmath \Ustartdisplaymath
% \let\normalstopdmath \Ustopdisplaymath
-% \unexpanded\def\Ustartdisplaymath
+% \protected\def\Ustartdisplaymath
% {\ifinner
% \ifhmode
% \normalUstartmath
@@ -67,7 +67,7 @@
% \let\Ustopdisplaymath\normalUstopdisplaymath
% \fi}
-\unexpanded\def\Ucheckedstartdisplaymath
+\protected\def\Ucheckedstartdisplaymath
{\ifinner
\ifhmode
\normalUstartmath
@@ -93,16 +93,16 @@
\let\startdmath \Ustartdisplaymath % \Ucheckedstartdisplaymath
\let\stopdmath \Ustopdisplaymath % \Ucheckedstopdisplaymath
-\unexpanded\def\mathematics#1{\relax \ifmmode#1\else\normalstartimath#1\normalstopimath\fi}
-\unexpanded\def\displaymath#1{\noindent \ifmmode#1\else\normalstartdmath#1\normalstopdmath\fi}
-\unexpanded\def\inlinemath #1{\dontleavehmode\ifmmode#1\else\normalstartimath#1\normalstopimath\fi}
-\unexpanded\def\textmath #1{\dontleavehmode\ifmmode#1\else\begingroup\everymath\emptytoks\normalstartimath#1\normalstopimath\endgroup\fi} % \mathsurround\zeropoint
+\protected\def\mathematics#1{\relax \ifmmode#1\else\normalstartimath#1\normalstopimath\fi}
+\protected\def\displaymath#1{\noindent \ifmmode#1\else\normalstartdmath#1\normalstopdmath\fi}
+\protected\def\inlinemath #1{\dontleavehmode\ifmmode#1\else\normalstartimath#1\normalstopimath\fi}
+\protected\def\textmath #1{\dontleavehmode\ifmmode#1\else\begingroup\everymath\emptytoks\normalstartimath#1\normalstopimath\endgroup\fi} % \mathsurround\zeropoint
\let\m\mathematics
\let\stopmathmode\relax
-\unexpanded\def\startmathmode % nested variant
+\protected\def\startmathmode % nested variant
{\relax\ifmmode
\begingroup
\let\stopmathmode\endgroup
@@ -111,7 +111,7 @@
\let\stopmathmode\normalstopimath
\fi}
-\unexpanded\def\nomathematics#1%
+\protected\def\nomathematics#1%
{\relax\ifmmode\hbox{#1}\else#1\fi}
\let\math\mathematics
@@ -126,13 +126,13 @@
\def\strc_formulas_stop_formula {\normalstopdmath }
\fi
-\unexpanded\def\displaymathematics#1{\relax\ifmmode#1\else\strc_formulas_start_formula{}#1\strc_formulas_stop_formula\fi}
-\unexpanded\def\inlinemathematics {\dontleavehmode\mathematics}
-\unexpanded\def\automathematics {\relax\ifhmode\expandafter\inlinemathematics\else\expandafter\displaymathematics\fi}
+\protected\def\displaymathematics#1{\relax\ifmmode#1\else\strc_formulas_start_formula{}#1\strc_formulas_stop_formula\fi}
+\protected\def\inlinemathematics {\dontleavehmode\mathematics}
+\protected\def\automathematics {\relax\ifhmode\expandafter\inlinemathematics\else\expandafter\displaymathematics\fi}
% better, esp when used in bTABLE ... eTABLE
-\unexpanded\def\automathematics
+\protected\def\automathematics
{\relax
\ifhmode
\expandafter\inlinemathematics
@@ -157,7 +157,7 @@
\def\dimensiontypeface {\tf}
\def\dimensionhalfspace {\,}
-\unexpanded\def\dimension#1%
+\protected\def\dimension#1%
{\pushmacro\dodimensionsignal
\gdef\dodimensionsignal{\kern\dimensionsignal}%
\ifzeropt\lastskip
@@ -178,7 +178,7 @@
\dodimensionsignal
\popmacro\dodimensionsignal}
-\unexpanded\def\nodimension#1%
+\protected\def\nodimension#1%
{\unskip#1\glet\dodimensionsignal\relax}
%D \macros
@@ -193,7 +193,7 @@
%D
%D \typebuffer \getbuffer
-\unexpanded\def\cramped
+\protected\def\cramped
{\mathpalette\math_cramped}
%D We force a cramped style by issuing a non||existing radical (box).
@@ -294,9 +294,9 @@
%D Notice that \type {\clap{\cramped ... }} would also work,
%D but it requires \TEX\ to typeset it arguments 16 times.
-\unexpanded\def\crampedllap{\mathpalette\math_cramped_llap}
-\unexpanded\def\crampedrlap{\mathpalette\math_cramped_rlap}
-\unexpanded\def\crampedclap{\mathpalette\math_cramped_clap}
+\protected\def\crampedllap{\mathpalette\math_cramped_llap}
+\protected\def\crampedrlap{\mathpalette\math_cramped_rlap}
+\protected\def\crampedclap{\mathpalette\math_cramped_clap}
\def\math_cramped_llap#1#2{{}\dollap{\math_cramped #1{#2}}}
\def\math_cramped_rlap#1#2{{}\dorlap{\math_cramped #1{#2}}}
@@ -304,7 +304,7 @@
% experiment, not yet to be used
-% \unexpanded\def\displaybreak
+% \protected\def\displaybreak
% {\ifhmode
% \removeunwantedspaces
% \ifcase\raggedstatus\hfill\fi
@@ -319,4 +319,11 @@
\let\nosuperscript\Unosuperscript
\let\nosubscript \Unosubscript
+% only in luametatex:
+
+\let\superprescript \Usuperprescript
+\let\subprescript \Usubprescript
+\let\nosuperprescript\Unosuperprescript
+\let\nosubsprecript \Unosubprescript
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua
index 1a2d10bea72..7946370d727 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.lua
@@ -53,6 +53,9 @@ end
math.setrandomseedi = setrandomseedi
local function getrandomnumber(min,max)
+ if min > max then
+ min, max = max, min
+ end
last = random(min,max)
if trace_details then
report_system("number %s",last)
@@ -80,7 +83,8 @@ end
-- maybe stack
local function pushrandomseed()
- insert(stack,last)
+ -- insert(stack,last) -- doesn't work okay
+ insert(stack,randomseed(last) or last)
if trace_random or trace_details then
report_system("pushing seed %s",last)
end
@@ -132,6 +136,8 @@ utilities.randomizer = {
reuseseed = reuserandomseed,
popseed = poprandomseed,
get = getrandom,
+ -- the original, only for testing
+ -- mathrandom = random,
}
-- todo: also open up in utilities.randomizer.*
@@ -139,10 +145,9 @@ utilities.randomizer = {
implement { name = "getrandomnumber", actions = { getrandomnumber, context }, arguments = { "integer", "integer" } }
implement { name = "getrandomdimen", actions = { getrandomnumber, context }, arguments = { "dimen", "dimen" } }
implement { name = "getrandomfloat", actions = { getrandomnumber, context }, arguments = { "number", "number" } }
---------- { name = "getmprandomnumber", actions = { getmprandomnumber, context } }
-implement { name = "setrandomseed", actions = { setrandomseed }, arguments = { "integer" } }
-implement { name = "getrandomseed", actions = { getrandomseed, context } }
-implement { name = "pushrandomseed", actions = { pushrandomseed } }
-implement { name = "poprandomseed", actions = { poprandomseed } }
-implement { name = "reuserandomseed", actions = { reuserandomseed } }
+implement { name = "getrandomseed", actions = { getrandomseed, context } }
+implement { name = "setrandomseed", actions = setrandomseed, arguments = "integer" }
+implement { name = "pushrandomseed", actions = pushrandomseed, public = true, }
+implement { name = "poprandomseed", actions = poprandomseed, public = true, }
+implement { name = "reuserandomseed", actions = reuserandomseed, public = true, }
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv
index 59707836aeb..52a45cf9cd0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-ran.mkiv
@@ -13,27 +13,40 @@
\writestatus{loading}{ConTeXt Support Macros / Random Number Generation}
-%D This module is downward compatible in the sense that we've kept
-%D the user interface (which uses intermediate variables).
+%D This module is downward compatible in the sense that we've kept the user
+%D interface (which uses intermediate variables).
+%D
+%D \starttyping
+%D \type{new}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \setrandomseed{24}\type{set}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \setrandomseed{24}\type{set}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \setrandomseed{24}\type{set}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \pushrandomseed \type{new}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \poprandomseed \type{old}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \type{new}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \stoptyping
\registerctxluafile{supp-ran}{}
\unprotect
-\unexpanded\def\getrandomcount #1#2#3{#1=\clf_getrandomnumber\numexpr#2\relax\numexpr#3\relax\relax}
-\unexpanded\def\getrandomdimen #1#2#3{#1=\clf_getrandomdimen\dimexpr#2\relax\dimexpr#3\relax\scaledpoint\relax}
-\unexpanded\def\getrandomnumber#1#2#3{\edef#1{\clf_getrandomnumber\numexpr#2\relax\numexpr#3\relax}}
-\unexpanded\def\getrandomfloat #1#2#3{\edef#1{\clf_getrandomfloat\dimexpr#2\relax\dimexpr#3\relax}}
-\unexpanded\def\setrandomseed #1{\clf_setrandomseed\numexpr#1\relax}
-\unexpanded\def\getrandomseed #1{\edef#1{\clf_getrandomseed}}
-\unexpanded\def\pushrandomseed {\clf_pushrandomseed}
-\unexpanded\def\poprandomseed {\clf_poprandomseed}
-\unexpanded\def\reuserandomseed {\clf_reuserandomseed} % within push/pop
+\protected\def\getrandomcount #1#2#3{#1=\clf_getrandomnumber\numexpr#2\relax\numexpr#3\relax\relax}
+\protected\def\getrandomdimen #1#2#3{#1=\clf_getrandomdimen\dimexpr#2\relax\dimexpr#3\relax\scaledpoint\relax}
+\protected\def\getrandomnumber#1#2#3{\edef#1{\clf_getrandomnumber\numexpr#2\relax\numexpr#3\relax}}
+\protected\def\getrandomfloat #1#2#3{\edef#1{\clf_getrandomfloat\dimexpr#2\relax\dimexpr#3\relax}}
+\protected\def\setrandomseed #1{\clf_setrandomseed\numexpr#1\relax}
+\protected\def\getrandomseed #1{\edef#1{\clf_getrandomseed}}
+\protected\def\newrandomseed {\clf_getrandomseed}
+%protected\def\pushrandomseed {\clf_pushrandomseed}
+%protected\def\poprandomseed {\clf_poprandomseed}
+%protected\def\reuserandomseed {\clf_reuserandomseed} % within push/pop
\let\freezerandomseed \pushrandomseed
\let\defrostrandomseed\poprandomseed
+\setnewconstant \mpscaledmax 4095 % for old times sake
+
\def\randomnumber #1#2{\clf_getrandomnumber\numexpr#1\relax\numexpr#2\relax}
-\let\mprandomnumber \clf_getmprandomnumber
+\def\mprandomnumber {\clf_getrandomnumber\zerocount\mpscaledmax}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv
index 23dfcb5fa75..f32f21ae0fa 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/supp-vis.mkiv
@@ -97,7 +97,7 @@
%D unwanted results. We can therefore turn all those things
%D off with \type{\dontinterfere}.
-\unexpanded\def\dontinterfere % or maybe just forgetall
+\protected\def\dontinterfere % or maybe just forgetall
{\reseteverypar
\parindent\zeropoint
\parskip \zeropoint
@@ -114,7 +114,7 @@
\ifdefined\dontcomplain \else
- \unexpanded\def\dontcomplain
+ \protected\def\dontcomplain
{\hbadness\plustenthousand
\vbadness\plustenthousand
\hfuzz \maxdimen
@@ -316,7 +316,7 @@
\let\dowithruledbox\relax % hook
-\unexpanded\def\makeruledbox#1%
+\protected\def\makeruledbox#1%
{\boxruleht\ht#1%
\boxruledp\dp#1%
\boxrulewd\wd#1%
@@ -397,7 +397,7 @@
%D
%D \ShowBufferedExampleBox
-\unexpanded\def\ruledhbox
+\protected\def\ruledhbox
{\normalhbox\bgroup
\dowithnextboxcs\supp_visualizers_hbox_finish\normalhbox}
@@ -419,7 +419,7 @@
%D
%D \ShowBufferedExampleBox
-\unexpanded\def\ruledvbox
+\protected\def\ruledvbox
{\normalvbox\bgroup
\dowithnextboxcs\supp_visualizers_vbox_finish\normalvbox}
@@ -441,7 +441,7 @@
%D
%D \ShowBufferedExampleBox
-\unexpanded\def\ruledvtop
+\protected\def\ruledvtop
{\normalvtop\bgroup
\dowithnextboxcs\supp_visualizers_vtop_finish\normalvtop}
@@ -462,7 +462,7 @@
%D
%D \ShowBufferedExampleBox
-\unexpanded\def\ruledvcenter
+\protected\def\ruledvcenter
{\normalvbox\bgroup
\dontinterfere
\dowithnextboxcs\supp_visualizers_vcenter_finish\normalvbox}
@@ -499,7 +499,7 @@
%D At the cost of some extra macros we can implement a
%D variant that does not need the~\type{=}, but we stick to:
-\unexpanded\def\ruledbox
+\protected\def\ruledbox
{\dowithnextboxcs\supp_visualizers_box_finish}
\def\supp_visualizers_box_finish
@@ -811,11 +811,11 @@
%D All five substitutions use the same auxiliary macro. Watch
%D the positive first -- negative next approach.
-\unexpanded\def\ruledhss {\doruledhfiller\normalhss \normalhfilneg {0}{0}}
-\unexpanded\def\ruledhfil {\doruledhfiller\normalhfil \normalhfilneg {10}{-6}}
-\unexpanded\def\ruledhfill {\doruledhfiller\normalhfill \normalhfillneg{18}{-14}}
-\unexpanded\def\ruledhfilneg {\doruledhfiller\normalhfilneg \normalhfil {-6}{10}}
-\unexpanded\def\ruledhfillneg{\doruledhfiller\normalhfillneg\normalhfill {-14}{18}}
+\protected\def\ruledhss {\doruledhfiller\normalhss \normalhfilneg {0}{0}}
+\protected\def\ruledhfil {\doruledhfiller\normalhfil \normalhfilneg {10}{-6}}
+\protected\def\ruledhfill {\doruledhfiller\normalhfill \normalhfillneg{18}{-14}}
+\protected\def\ruledhfilneg {\doruledhfiller\normalhfilneg \normalhfil {-6}{10}}
+\protected\def\ruledhfillneg{\doruledhfiller\normalhfillneg\normalhfill {-14}{18}}
%D \macros
%D {ruledvss,
@@ -889,11 +889,11 @@
%D Keep in mind that \type{\vfillneg} is not part of \PLAIN\
%D \TEX, but are mimmicked by a macro.
-\unexpanded\def\ruledvss {\doruledvfiller\normalvss \normalvfilneg {2}}
-\unexpanded\def\ruledvfil {\doruledvfiller\normalvfil \normalvfilneg {-4}}
-\unexpanded\def\ruledvfill {\doruledvfiller\normalvfill \normalvfillneg{-12}}
-\unexpanded\def\ruledvfilneg {\doruledvfiller\normalvfilneg \normalvfil {8}}
-\unexpanded\def\ruledvfillneg{\doruledvfiller\normalvfillneg\normalvfill {16}}
+\protected\def\ruledvss {\doruledvfiller\normalvss \normalvfilneg {2}}
+\protected\def\ruledvfil {\doruledvfiller\normalvfil \normalvfilneg {-4}}
+\protected\def\ruledvfill {\doruledvfiller\normalvfill \normalvfillneg{-12}}
+\protected\def\ruledvfilneg {\doruledvfiller\normalvfilneg \normalvfil {8}}
+\protected\def\ruledvfillneg{\doruledvfiller\normalvfillneg\normalvfill {16}}
%D \macros
%D {ruledhskip}
@@ -999,7 +999,7 @@
\fi
\egroup}
-\unexpanded\def\ruledhskip
+\protected\def\ruledhskip
{\bgroup
\afterassignment\supp_visualizers_hskip_indeed
\scratchskip=}
@@ -1149,7 +1149,7 @@
\fi
\egroup}
-\unexpanded\def\ruledvskip
+\protected\def\ruledvskip
{\bgroup
\afterassignment\doruledvskip
\scratchskip=}
@@ -1228,7 +1228,7 @@
\afterwards\scratchskip
\egroup}
-\unexpanded\def\ruledhkern#1%
+\protected\def\ruledhkern#1%
{\bgroup
\let\afterwards#1%
\afterassignment\supp_visualizers_hkern_indeed
@@ -1317,13 +1317,13 @@
\afterwards\scratchskip
\egroup}
-\unexpanded\def\ruledvkern#1%
+\protected\def\ruledvkern#1%
{\bgroup
\let\afterwards#1\relax
\afterassignment\supp_visualizers_vkern_indeed
\scratchskip=}
-\unexpanded\def\ruledkern
+\protected\def\ruledkern
{\ifvmode
\expandafter\ruledvkern
\else
@@ -1334,7 +1334,7 @@
%D A a bit more \TEX nice solution is:
%D
%D \starttyping
-%D \unexpanded\def\ruledkern%
+%D \protected\def\ruledkern%
%D {\csname ruled\ifvmode v\else h\fi kern\endcsname\normalkern}
%D \stoptyping
@@ -1370,7 +1370,7 @@
\spacefactor\scratchcounter
\egroup}
-\unexpanded\def\ruledhglue
+\protected\def\ruledhglue
{\bgroup
\afterassignment\supp_visualizers_hglue_indeed\scratchskip=}
@@ -1400,7 +1400,7 @@
\prevdepth\nextdepth
\egroup}
-\unexpanded\def\ruledvglue
+\protected\def\ruledvglue
{\bgroup
\afterassignment\supp_visualizers_vglue_indeed\scratchskip=}
@@ -1461,7 +1461,7 @@
%D
%D \ShowBufferedExample
-\unexpanded\def\ruledmkern
+\protected\def\ruledmkern
{\bgroup
\afterassignment\supp_visualizers_mkern_indeed
\scratchmuskip=}
@@ -1485,7 +1485,7 @@
\flexibletrue
\supp_visualizers_mkern_finish\normalmskip}
-\unexpanded\def\ruledmskip
+\protected\def\ruledmskip
{\bgroup
\afterassignment\supp_visualizers_mskip_indeed
\scratchmuskip=}
@@ -1589,7 +1589,7 @@
\fi}%
\smashbox#1}
-\unexpanded\def\ruledhpenalty
+\protected\def\ruledhpenalty
{\bgroup
\afterassignment\supp_visualizers_hpenalty_indeed
\scratchcounter=}
@@ -1639,7 +1639,7 @@
%D
%D \ShowBufferedExample
-\unexpanded\def\ruledvpenalty
+\protected\def\ruledvpenalty
{\bgroup
\afterassignment\supp_visualizers_vpenalty_indeed
\scratchcounter=}
@@ -1682,7 +1682,7 @@
%D This comes together in:
-\unexpanded\def\ruledpenalty
+\protected\def\ruledpenalty
{\ifvmode
\expandafter\ruledvpenalty
\else
@@ -1698,7 +1698,7 @@
%D For those who want to manipulate the visual cues in detail,
%D we have grouped them.
-\unexpanded\def\showfils
+\protected\def\showfils
{\showingcompositiontrue
\let\hss \ruledhss
\let\hfil \ruledhfil
@@ -1711,7 +1711,7 @@
\let\vfilneg \ruledvfilneg
\let\vfillneg \ruledvfillneg}
-\unexpanded\def\dontshowfils
+\protected\def\dontshowfils
{\let\hss \normalhss
\let\hfil \normalhfil
\let\hfill \normalhfill
@@ -1723,7 +1723,7 @@
\let\vfilneg \normalvfilneg
\let\vfillneg \normalvfillneg}
-\unexpanded\def\showboxes
+\protected\def\showboxes
{\showingcompositiontrue
\baselineruletrue
\let\hbox \ruledhbox
@@ -1731,13 +1731,13 @@
\let\vtop \ruledvtop
\let\vcenter \ruledvcenter}
-\unexpanded\def\dontshowboxes
+\protected\def\dontshowboxes
{\let\hbox \normalhbox
\let\vbox \normalvbox
\let\vtop \normalvtop
\let\vcenter \normalvcenter}
-\unexpanded\def\showskips
+\protected\def\showskips
{\showingcompositiontrue
\let\hskip \ruledhskip
\let\vskip \ruledvskip
@@ -1747,7 +1747,7 @@
\let\hglue \ruledhglue
\let\vglue \ruledvglue}
-\unexpanded\def\dontshowskips
+\protected\def\dontshowskips
{\let\hskip \normalhskip
\let\vskip \normalvskip
\let\kern \normalkern
@@ -1756,11 +1756,11 @@
\let\hglue \normalhglue
\let\vglue \normalvglue}
-\unexpanded\def\showpenalties
+\protected\def\showpenalties
{\showingcompositiontrue
\let\penalty \ruledpenalty}
-\unexpanded\def\dontshowpenalties
+\protected\def\dontshowpenalties
{\let\penalty \normalpenalty}
%D \macros
@@ -1787,7 +1787,7 @@
\newif\ifshowingcomposition
-\unexpanded\def\showcomposition
+\protected\def\showcomposition
{\ifshowingcomposition
\showfils
\showboxes
@@ -1795,7 +1795,7 @@
\showpenalties
\fi}
-\unexpanded\def\dontshowcomposition
+\protected\def\dontshowcomposition
{\ifshowingcomposition
\dontshowfils
\dontshowboxes
@@ -1829,7 +1829,7 @@
\def\defaulttestrulewidth{.02\bodyfontsize}
\fi
-\unexpanded\def\showmakeup
+\protected\def\showmakeup
{\testrulewidth\defaulttestrulewidth
\showingcompositiontrue
\showcomposition}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/symb-emj.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-emj.mkiv
index e063b6a7a13..7bfe4c0232a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/symb-emj.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-emj.mkiv
@@ -23,5 +23,4 @@
\unexpanded\def\emoji #1{\dontleavehmode{\setdirectsymbolicfont{emoji}\clf_resolvedemoji{#1}}}
\unexpanded\def\robustemoji #1{\dontleavehmode{\setdirectsymbolicfont{emoji}\clf_checkedemoji {#1}}}
-
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv
index e753d695f8c..d9f596b9c72 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-cc.mkiv
@@ -69,8 +69,8 @@
\unexpanded\def\creativecommons#1%
{\dontleavehmode\lower.15\exheight\hbox\bgroup
- \let\inbetween\relax
- \processseparatedlist[#1][-]{\inbetween\let\inbetween\enspace\directsymbol{cc}}%
+ \overloaded\let\inbetween\relax
+ \processseparatedlist[#1][-]{\inbetween\overloaded\let\inbetween\enspace\directsymbol{cc}}%
\egroup}
\definesymbol [cc-by-sa-nc] [\creativecommons{cc-by-sa-nc}]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv
index 2320ea59ae0..b02233baaf0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-mis.mkiv
@@ -72,9 +72,9 @@
\definesymbol [numero] [\textnumero]
\definesymbol [euro] [\texteuro]
-\let\euro\texteuro
+\aliased\let\euro\texteuro
-\def\Numero{\symbol[Numero]} % obsolete
-\def\numero{\symbol[numero]} % obsolete
+\permanent\protected\def\Numero{\symbol[Numero]} % obsolete
+\permanent\protected\def\numero{\symbol[numero]} % obsolete
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv
index 6e2f2c1f034..ce5b1d76afa 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-imp-nav.mkiv
@@ -24,7 +24,7 @@
\definefontsynonym [ContextNavigation] [contnav]
-\def\ContextNavigationGlyph{\getnamedglyphdirect{ContextNavigation}} % #1
+\permanent\protected\def\ContextNavigationGlyph{\getnamedglyphdirect{ContextNavigation}} % #1
\startsymbolset [navigation 1]
@@ -122,8 +122,15 @@
\stopsymbolset
-%D \showsymbolset[navigation 1]
-%D \showsymbolset[navigation 2]
-%D \showsymbolset[navigation 3]
+\protect
-\protect \endinput
+\continueifinputfile{symb-imp-nav.mkiv}
+
+\starttext
+ \showsymbolset[navigation 1]\page
+ \showsymbolset[navigation 2]\page
+ \showsymbolset[navigation 3]\page
+ \ContextNavigationGlyph{char03}\quad
+ \ContextNavigationGlyph{char67}\quad
+ \ContextNavigationGlyph{charcb}
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua
index 588e5d2ab5c..c0e717f465b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/symb-ini.lua
@@ -21,7 +21,6 @@ local report_symbols = logs.reporter ("fonts","symbols")
local status_symbols = logs.messenger("fonts","symbols")
local patterns = {
- CONTEXTLMTXMODE > 0 and "symb-imp-%s.mkxl" or "",
"symb-imp-%s.mkiv",
"symb-imp-%s.tex",
-- obsolete:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua
index 46bb8e3f748..85604a2327d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.lua
@@ -1,4 +1,4 @@
-if not modules then modules = { } end modules ['syst-aux'] = {
+ if not modules then modules = { } end modules ['syst-aux'] = {
version = 1.001,
comment = "companion to syst-aux.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -11,20 +11,19 @@ if not modules then modules = { } end modules ['syst-aux'] = {
-- utfmatch(str,"(.?)(.*)$")
-- utf.sub(str,1,1)
-local tonumber, next = tonumber, next
+local tonumber, next, type = tonumber, next, type
local utfsub = utf.sub
local P, S, R, C, Cc, Cs, Carg, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Carg, lpeg.match
-local next = next
-local find = string.find
+local find, formatters = string.find, string.formatters
local context = context
local implement = interfaces.implement
-local formatters = string.formatters
+local setmacro = interfaces.setmacro
local setcatcode = tex.setcatcode
+local texget = tex.get
local utf8character = lpeg.patterns.utf8character
local settings_to_array = utilities.parsers.settings_to_array
local settings_to_set = utilities.parsers.settings_to_set
-local setmacro = interfaces.setmacro
local pattern = C(utf8character^-1) * C(P(1)^0)
@@ -131,115 +130,14 @@ local sentinel = spaces * (nohash^1 / "\\%0")
local sargument = (single * digit)^1
local dargument = (double * digit)^1
--- first variant:
---
--- local texpreamble = nil
--- local usespaces = nil
---
--- local pattern = Cs( -- ^-1
--- ( P("spaces") / function() usespaces = true return "" end )^0
--- * spaces
--- * ( P("nospaces") / function() usespaces = false return "" end )^0
--- * spaces
--- * ( P("global") / "\\global" )^0
--- * spaces
--- * ( P("unexpanded") / "\\unexpanded" )^0
--- * spaces
--- * Cc("\\expandafter\\")
--- * spaces
--- * ( P("expanded") / "e" )^0
--- * spaces
--- * ( P((1-S(" #"))^1) / "def\\csname %0\\endcsname" )
--- * spaces
--- * (
--- -- (double * digit)^1 * sentinel^-1 * double^-1
--- -- + (single * digit)^1 * sentinel^-1 * single^-1
--- ( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1
--- + ( P("[") * sargument * P("]") + sargument)^1 * sentinel^-1 * single^-1
--- + sentinel^-1 * (double+single)^-1
--- )
--- )
---
--- local ctx_dostarttexdefinition = context.dostarttexdefinition
---
--- local function texdefinition_one(str)
--- usespaces = nil
--- texpreamble = lpegmatch(pattern,str)
--- if usespaces == true then
--- setcatcode(32,10) -- space
--- setcatcode(13, 5) -- endofline
--- elseif usespaces == false then
--- setcatcode(32, 9) -- ignore
--- setcatcode(13, 9) -- ignore
--- else
--- -- this is default
--- -- setcatcode(32,10) -- space
--- -- setcatcode(13, 9) -- ignore
--- end
--- ctx_dostarttexdefinition()
--- end
---
--- local function texdefinition_two()
--- context(texpreamble)
--- end
-
--- second variant:
---
--- -- default:
--- --
--- -- setcatcode(32,10) -- space
--- -- setcatcode(13, 9) -- ignore
---
--- local function catcodes_s()
--- setcatcode(32,10) -- space
--- setcatcode(13, 5) -- endofline
--- return ""
--- end
---
--- local function catcodes_n()
--- setcatcode(32, 9) -- ignore
--- setcatcode(13, 9) -- ignore
--- return ""
--- end
---
--- local pattern = Cs( -- ^-1
--- ( P("spaces") * space / catcodes_s )^0
--- * spaces * ( P("nospaces") * space / catcodes_n )^0
--- * spaces * ( P("global") * space / "\\global" )^0
--- * spaces * ( P("unexpanded") * space / "\\unexpanded" )^0
--- * spaces * Cc("\\expandafter\\")
--- * spaces * ( P("expanded") / "e" )^0
--- * spaces * ( P((1-S(" #["))^1) / "def\\csname %0\\endcsname" )
--- * spaces * (
--- -- (double * digit)^1 * sentinel^-1 * double^-1
--- -- + (single * digit)^1 * sentinel^-1 * single^-1
--- ( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1
--- + ( P("[") * sargument * P("]") + sargument)^1 * sentinel^-1 * single^-1
--- + sentinel^-1 * (double+single)^-1
--- )
--- )
---
--- local texpreamble = nil
---
--- local ctx_dostarttexdefinition = context.dostarttexdefinition
---
--- local function texdefinition_one(str)
--- texpreamble = lpegmatch(pattern,str)
--- ctx_dostarttexdefinition()
--- end
---
--- local function texdefinition_two()
--- context(texpreamble)
--- end
-
-- third variant:
-local global = nil
-local unexpanded = nil
-local expanded = nil
-local optional = nil
-local csname = nil
-local rest = nil
+local global = nil
+local protected = nil
+local expanded = nil
+local optional = nil
+local csname = nil
+local rest = nil
local function catcodes_s()
setcatcode(32,10) -- space
@@ -264,12 +162,23 @@ local option = (
) * (P("empty") + P("argument"))
local pattern = (
- ( P("spaces") * space / catcodes_s )^0
- * spaces * ( P("nospaces") * space / catcodes_n )^0
- * spaces * ( P("global") * space * Cc(true) + Cc(false) )
- * spaces * ( P("unexpanded") * space * Cc(true) + Cc(false) )
- * spaces * ( P("expanded") * space * Cc(true) + Cc(false) )
- * spaces * ( C(option) * space + Cc(false) )
+ (
+ spaces * (
+ ( P("spaces") * space / catcodes_s )
+ + ( P("nospaces") * space / catcodes_n )
+ + ( P("global") * space / function() global = true end )
+ + ( P("protected") * space / function() protected = true end)
+ + ( P("permanent") * space )
+ + ( P("expanded") * space / function() expanded = true end)
+ + ( P("tolerant") * space )
+ + ( P("instance") * space )
+ + ( P("frozen") * space )
+ + ( P("mutable") * space )
+ + ( P("immutable") * space )
+ + ( P("unexpanded") * space / function() protected = true end)
+ + ( C(option) * space / function(s) optional = s end)
+ )
+ )^0
* spaces * ( C((1-S(" #["))^1) )
* spaces * Cs(
( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1
@@ -281,40 +190,29 @@ local pattern = (
local ctx_dostarttexdefinition = context.dostarttexdefinition
local function texdefinition_one(str)
- global, unexpanded, expanded, optional, csname, rest = lpegmatch(pattern,str)
+ global = false
+ protected = false
+ expanded = false
+ optional = false
+ csname, rest = lpegmatch(pattern,str)
ctx_dostarttexdefinition()
end
local function texdefinition_two()
if optional then
context (
- [[\unexpanded\expandafter]] ..
- (global and [[\xdef]] or [[\edef]]) ..
- [[\csname ]] ..
- csname ..
- [[\endcsname{\expandafter\noexpand\expandafter\do]] ..
- optional ..
- [[\csname _do_]] ..
- csname ..
- -- [[_\endcsname}\unexpanded\expandafter]] ..
- [[_\endcsname}\expandafter]] ..
- (global and [[\gdef]] or [[\edef]]) ..
- [[\csname _do_]] ..
- csname ..
- [[_\endcsname ]] ..
+ (protected and [[\protected]] or "") ..
+ [[\expandafter]] .. (global and [[\xdef]] or [[\edef]]) ..
+ [[\csname ]] .. csname .. [[\endcsname{\expandafter\noexpand\expandafter\do]] .. optional ..
+ [[\csname _do_]] .. csname .. [[_\endcsname}\expandafter]] .. (global and [[\gdef]] or [[\edef]]) ..
+ [[\csname _do_]] .. csname .. [[_\endcsname ]] ..
rest
)
else
context (
- [[\unexpanded\expandafter]] ..
- ( global and (
- expanded and [[\xdef]] or [[\gdef]]
- ) or (
- expanded and [[\edef]] or [[\def]]
- ) ) ..
- [[\csname ]] ..
- csname ..
- [[\endcsname ]] ..
+ (protected and [[\protected]] or "") ..
+ [[\expandafter]] .. (global and (expanded and [[\xdef]] or [[\gdef]]) or (expanded and [[\edef]] or [[\def]])) ..
+ [[\csname ]] .. csname .. [[\endcsname ]] ..
rest
)
end
@@ -404,6 +302,20 @@ implement {
end
}
+implement {
+ name = "elapsedsteptime",
+ arguments = "integer",
+ actions = function(n)
+ statistics.stoptiming("whatever")
+ local t = statistics.elapsed("whatever")/(n > 0 and n or 1)
+ if t > 0 then
+ context("%0.9f",t)
+ else
+ context(0)
+ end
+ end
+}
+
local accuracy = table.setmetatableindex(function(t,k)
local v = formatters["%0." ..k .. "f"]
t[k] = v
@@ -771,15 +683,58 @@ implement {
local bp = number.dimenfactors.bp
-interfaces.implement {
+implement {
name = "tobigpoints",
actions = function(d) context("%.5F",bp * d) end,
arguments = "dimension",
}
-interfaces.implement {
+implement {
name = "towholebigpoints",
actions = function(d) context("%r",bp * d) end,
arguments = "dimension",
}
+-- for now here:
+
+local function getshape(s)
+ local t = texget(s)
+ local n = t and #t or 0
+ context(n)
+ if n > 0 then
+ for i=1,n do
+ local ti = t[i]
+ if type(ti) == "table" then
+ context(" %isp %isp",ti[1],ti[2])
+ else
+ context(" %i",ti)
+ end
+ end
+ end
+end
+
+implement {
+ name = "getparshape",
+ public = true,
+ actions = function() getshape("parshape") end,
+}
+implement {
+ name = "getclubpenalties",
+ public = true,
+ actions = function() getshape("clubpenalties") end,
+}
+implement {
+ name = "getinterlinepenalties",
+ public = true,
+ actions = function() getshape("interlinepenalties") end,
+ }
+implement {
+ name = "getdisplaywidowpenalties",
+ public = true,
+ actions = function() getshape("displaywidowpenalties") end,
+}
+implement {
+ name = "getwidowpenalties",
+ public = true,
+ actions = function() getshape("widowpenalties") end,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv
index 255f0746c39..194f1de2cb1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkiv
@@ -12,6 +12,7 @@
%C details.
\registerctxluafile{syst-aux}{}
+\registerctxluafile{syst-mac}{}
% A dedicated primitive \ifvoidmacro\cs == \ifx\cs\empty is some 10% faster but
% probably not that noticeable in practice. An \ifvoidtoks might make sense but we
@@ -47,7 +48,7 @@
%D code.
%D
%D \starttyping
-%D \unexpanded\def\somecommand{... ... ...}
+%D \protected\def\somecommand{... ... ...}
%D \stoptyping
%D
%D This overloads the \ETEX\ primitive but as we already had an \MKII\ solution we
@@ -55,21 +56,10 @@
\let\unexpanded\normalprotected
-\ifcase\contextlmtxmode
-
- \def\startlmtxmode#1\stoplmtxmode{}
- \let\stoplmtxmode \relax
- \let\startmkivmode\relax
- \let\stopmkivmode \relax
-
-\else
-
- \let\startlmtxmode\relax
- \let\stoplmtxmode \relax
- \def\startmkivmode#1\stopmkivmode{}
- \let\stopmkivmode \relax
-
-\fi
+\def\startlmtxmode#1\stoplmtxmode{}
+\let\stoplmtxmode \relax
+\let\startmkivmode\relax
+\let\stopmkivmode \relax
%D As we don't have namespace definers yet, we use a special one:
@@ -86,7 +76,7 @@
\fi
-\unexpanded\def\installsystemnamespace#1% maybe move this to syst-ini
+\protected\def\installsystemnamespace#1% maybe move this to syst-ini
{\ifcsname ??#1\endcsname
\writestatus\m!system{duplicate system namespace '#1'}\wait
\else
@@ -198,10 +188,10 @@
\let\m_syst_helpers_expanded\empty
-\unexpanded\def\expanded#1%
+\protected\def\expanded#1%
{\xdef\m_syst_helpers_expanded{\noexpand#1}\m_syst_helpers_expanded}
-\unexpanded\def\startexpanded#1\stopexpanded
+\protected\def\startexpanded#1\stopexpanded
{\xdef\m_syst_helpers_expanded{#1}\m_syst_helpers_expanded}
\let\stopexpanded\relax
@@ -296,13 +286,13 @@
\expandafter\m_syst_action_nop
\fi}
-\unexpanded\def\doifelsenextchar#1#2#3% #1 should not be {} !
+\protected\def\doifelsenextchar#1#2#3% #1 should not be {} !
{\let\charactertoken=#1% = needed here
\def\m_syst_action_yes{#2}%
\def\m_syst_action_nop{#3}%
\futurelet\nexttoken\syst_helpers_inspect_next_character}
-\unexpanded\def\doifelsenextcharcs#1#2#3% #1 should not be {} !
+\protected\def\doifelsenextcharcs#1#2#3% #1 should not be {} !
{\let\charactertoken=#1% = needed here
\let\m_syst_action_yes#2%
\let\m_syst_action_nop#3%
@@ -343,13 +333,13 @@
\expandafter\m_syst_action_nop
\fi}
-\unexpanded\def\doifelsenextoptional#1#2%
+\protected\def\doifelsenextoptional#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\let\if_next_blank_space_token\iffalse
\futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-\unexpanded\def\doifelsenextoptionalcs#1#2% \cs \cs (upto 10% faster)
+\protected\def\doifelsenextoptionalcs#1#2% \cs \cs (upto 10% faster)
{\let\m_syst_action_yes#1%
\let\m_syst_action_nop#2%
\let\if_next_blank_space_token\iffalse
@@ -360,14 +350,14 @@
% fails on assignments
%
-% \unexpanded\def\doifelsenextoptional {\afterassignment\doifelsenextoptional_n \def\m_syst_action_yes}
-% \def\doifelsenextoptional_n {\afterassignment\doifelsenextoptional_n_n\def\m_syst_action_nop}
-% \def\doifelsenextoptional_n_n {\let\if_next_blank_space_token\iffalse
+% \protected\def\doifelsenextoptional {\afterassignment\doifelsenextoptional_n \def\m_syst_action_yes}
+% \def\doifelsenextoptional_n {\afterassignment\doifelsenextoptional_n_n\def\m_syst_action_nop}
+% \def\doifelsenextoptional_n_n {\let\if_next_blank_space_token\iffalse
% \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
%
-% \unexpanded\def\doifelsenextoptionalcs {\afterassignment\doifelsenextoptionalcs_n \let\m_syst_action_yes}
-% \def\doifelsenextoptionalcs_n {\afterassignment\doifelsenextoptionalcs_n_n\let\m_syst_action_nop}
-% \def\doifelsenextoptionalcs_n_n{\let\if_next_blank_space_token\iffalse
+% \protected\def\doifelsenextoptionalcs {\afterassignment\doifelsenextoptionalcs_n \let\m_syst_action_yes}
+% \def\doifelsenextoptionalcs_n {\afterassignment\doifelsenextoptionalcs_n_n\let\m_syst_action_nop}
+% \def\doifelsenextoptionalcs_n_n{\let\if_next_blank_space_token\iffalse
% \futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
\let\syst_helpers_next_bgroup_character_token\bgroup
@@ -386,13 +376,13 @@
\expandafter\m_syst_action_nop
\fi}
-\unexpanded\def\doifelsenextbgroup#1#2%
+\protected\def\doifelsenextbgroup#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\let\if_next_blank_space_token\iffalse
\futurelet\nexttoken\syst_helpers_inspect_next_bgroup_character}
-\unexpanded\def\doifelsenextbgroupcs#1#2%
+\protected\def\doifelsenextbgroupcs#1#2%
{\let\m_syst_action_yes#1%
\let\m_syst_action_nop#2%
\let\if_next_blank_space_token\iffalse
@@ -417,7 +407,7 @@
\expandafter\m_syst_action_nop
\fi}
-\unexpanded\def\doifelsenextparenthesis#1#2%
+\protected\def\doifelsenextparenthesis#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\let\if_next_blank_space_token\iffalse
@@ -434,12 +424,12 @@
\expandafter\m_syst_action_nop
\fi}
-\unexpanded\def\doifelsefastoptionalcheck#1#2%
+\protected\def\doifelsefastoptionalcheck#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\futurelet\nexttoken\syst_helpers_do_if_fast_optional_check_else}
-\unexpanded\def\doifelsefastoptionalcheckcs#1#2% \cs \cs
+\protected\def\doifelsefastoptionalcheckcs#1#2% \cs \cs
{\let\m_syst_action_yes#1%
\let\m_syst_action_nop#2%
\futurelet\nexttoken\syst_helpers_do_if_fast_optional_check_else}
@@ -455,7 +445,7 @@
%D {a few lines later}
%D \stoptyping
-% \unexpanded\def\assumelongusagecs#1%
+% \protected\def\assumelongusagecs#1%
% {\let\m_syst_action#1%
% \futurelet\nexttoken\syst_helpers_ignore_par_character}
%
@@ -476,7 +466,7 @@
% \def\syst_helpers_ignore_par_partoken
% {\afterassignment\m_syst_action\let\nexttoken}
-\unexpanded\def\assumelongusagecs#1%
+\protected\def\assumelongusagecs#1%
{\let\m_syst_action#1%
\futurelet\nexttoken\syst_helpers_ignore_spacing}
@@ -590,12 +580,12 @@
\def\undefinevalue#1{\expandafter\let \csname#1\endcsname\undefined}
\def\ignorevalue#1#2{\expandafter\let \csname#1\endcsname\empty}
-\def\setuvalue #1{\normalprotected\expandafter \def\csname#1\endcsname}
-\def\setuevalue #1{\normalprotected\expandafter\edef\csname#1\endcsname}
-\def\setugvalue #1{\normalprotected\expandafter\gdef\csname#1\endcsname}
-\def\setuxvalue #1{\normalprotected\expandafter\xdef\csname#1\endcsname}
+\def\setuvalue #1{\protected\expandafter \def\csname#1\endcsname}
+\def\setuevalue #1{\protected\expandafter\edef\csname#1\endcsname}
+\def\setugvalue #1{\protected\expandafter\gdef\csname#1\endcsname}
+\def\setuxvalue #1{\protected\expandafter\xdef\csname#1\endcsname}
-\unexpanded\def\getuvalue#1{\csname#1\endcsname}
+\protected\def\getuvalue#1{\csname#1\endcsname}
%D \macros
%D {globallet,glet}
@@ -670,13 +660,13 @@
%D {\undefined}! In \ETEX\ we have \type {\ifcsname} and that way of testing on
%D existance is not the same as the one described here. Therefore we introduce:
-\unexpanded\def\letbeundefined#1% potential stack buildup when used \global
+\protected\def\letbeundefined#1% potential stack buildup when used \global
{\expandafter\let\csname#1\endcsname\undefined} % or use \undefinevalue to match \setvalue
-\unexpanded\def\localundefine#1% conditional
+\protected\def\localundefine#1% conditional
{\ifcsname#1\endcsname\expandafter\let\csname#1\endcsname\undefined\fi}
-\unexpanded\def\globalundefine#1% conditional
+\protected\def\globalundefine#1% conditional
{\ifcsname#1\endcsname\expandafter\glet\csname#1\endcsname\undefined\fi}
%D Beware, being \type {\undefined} in \ETEX\ means that the macro {\em is} defined!
@@ -685,7 +675,7 @@
%D behavior in text and math mode, which was due to this grouping subtilities. We
%D therefore decided to use \type{\begingroup} instead of \type{\bgroup}.
-\unexpanded\def\doifelsealldefined#1%
+\protected\def\doifelsealldefined#1%
{\begingroup
\donetrue % we could use a reserved one and avoid the group
\processcommalist[#1]\syst_helpers_do_if_all_defined_else
@@ -720,7 +710,7 @@
%D \doifelse {string1} {string2} {then ...}{else ...}
%D \stoptyping
-\unexpanded\def\doif#1#2%
+\protected\def\doif#1#2%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -729,7 +719,7 @@
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnot#1#2%
+\protected\def\doifnot#1#2%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -738,7 +728,7 @@
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifelse#1#2%
+\protected\def\doifelse#1#2%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -760,7 +750,7 @@
%D
%D This time, the string is not expanded.
-\unexpanded\def\doifelseempty#1%
+\protected\def\doifelseempty#1%
{\def\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\firstoftwoarguments
@@ -770,7 +760,7 @@
\let\doifemptyelse\doifelseempty
-\unexpanded\def\doifempty#1%
+\protected\def\doifempty#1%
{\def\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\firstofoneargument
@@ -778,7 +768,7 @@
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotempty#1%
+\protected\def\doifnotempty#1%
{\def\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\gobbleoneargument
@@ -835,7 +825,7 @@
% \def\syst_helpers_re_do_if_in_set {\expandafter\syst_helpers_do_check_if_item_in_set \m_syst_string_two,],\relax}
% \def\syst_helpers_re_do_if_not_in_set {\expandafter\syst_helpers_do_check_if_item_not_in_set \m_syst_string_two,],\relax}
%
-% \unexpanded\def\doifelseinset#1% make this two step too
+% \protected\def\doifelseinset#1% make this two step too
% {\edef\m_syst_string_one{#1}%
% \ifx\m_syst_string_one\empty
% \expandafter\thirdofthreearguments
@@ -853,7 +843,7 @@
% \expandafter\syst_helpers_re_do_if_in_set_else
% \fi}
%
-% \unexpanded\def\doifinset#1%
+% \protected\def\doifinset#1%
% {\edef\m_syst_string_one{#1}%
% \ifx\m_syst_string_one\empty
% \expandafter\gobbletwoarguments
@@ -869,7 +859,7 @@
% \expandafter\syst_helpers_re_do_if_in_set
% \fi}
%
-% \unexpanded\def\doifnotinset#1%
+% \protected\def\doifnotinset#1%
% {\edef\m_syst_string_one{#1}%
% \ifx\m_syst_string_one\empty
% \expandafter\secondoftwoarguments
@@ -951,9 +941,9 @@
% \expandafter\syst_helpers_do_check_if_item_not_in_set
% \fi}
-\unexpanded\def\doifelseinset#1#2{\clf_doifelseinset{#1}{#2}}
-\unexpanded\def\doifinset #1#2{\clf_doifinset {#1}{#2}}
-\unexpanded\def\doifnotinset #1#2{\clf_doifnotinset {#1}{#2}}
+\protected\def\doifelseinset#1#2{\clf_doifelseinset{#1}{#2}}
+\protected\def\doifinset #1#2{\clf_doifinset {#1}{#2}}
+\protected\def\doifnotinset #1#2{\clf_doifnotinset {#1}{#2}}
% \let\firstinset \clf_firstinset
\let\doifinsetelse\doifelseinset
@@ -1042,15 +1032,15 @@
% \fi\fi
% #1#2}
-% \unexpanded\def\doifelsecommon{\syst_helpers_do_do_if_common_else\firstoftwoarguments\secondoftwoarguments}
-% \unexpanded\def\doifcommon {\syst_helpers_do_do_if_common_else\firstofoneargument \gobbleoneargument }
-% \unexpanded\def\doifnotcommon {\syst_helpers_do_do_if_common_else\gobbleoneargument \firstofoneargument }
+% \protected\def\doifelsecommon{\syst_helpers_do_do_if_common_else\firstoftwoarguments\secondoftwoarguments}
+% \protected\def\doifcommon {\syst_helpers_do_do_if_common_else\firstofoneargument \gobbleoneargument }
+% \protected\def\doifnotcommon {\syst_helpers_do_do_if_common_else\gobbleoneargument \firstofoneargument }
%
% \let\doifcommonelse\doifelsecommon
-\unexpanded\def\doifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}}
-\unexpanded\def\doifcommon #1#2{\clf_doifcommon {#1}{#2}}
-\unexpanded\def\doifnotcommon #1#2{\clf_doifnotcommon {#1}{#2}}
+\protected\def\doifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}}
+\protected\def\doifcommon #1#2{\clf_doifcommon {#1}{#2}}
+\protected\def\doifnotcommon #1#2{\clf_doifnotcommon {#1}{#2}}
\let\doifcommonelse\doifelsecommon
@@ -1122,7 +1112,7 @@
%D Empty arguments are not processed. Empty items (\type {,,}) however are
%D treated. We have to check for the special case \type {[{a,b,c}]}.
-\unexpanded\def\processcommalist[%
+\protected\def\processcommalist[%
{\futurelet\nexttoken\syst_helpers_do_check_comma_item}
\def\syst_helpers_do_check_comma_item
@@ -1151,13 +1141,13 @@
%D One way of quitting a commalist halfway is:
-\unexpanded\def\quitcommalist
+\protected\def\quitcommalist
{\begingroup\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_comma_list}
\def\syst_helpers_do_quit_comma_list#1]%
{\endgroup}
-\unexpanded\def\quitprevcommalist
+\protected\def\quitprevcommalist
{\begingroup\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_prev_comma_list}
\def\syst_helpers_do_quit_prev_comma_list#1]%
@@ -1208,7 +1198,7 @@
%D Commands that are part of the list are expanded, so the use of this macro has its
%D limits.
-\unexpanded\def\processcommacommand[#1]%
+\protected\def\processcommacommand[#1]%
{\normalexpanded{\processcommalist[#1]}}
%D The argument to \type{\command} is not delimited. Because we often use \type {[]}
@@ -1224,7 +1214,7 @@
%D \def\command[#1]{... #1 ...}
%D \stoptyping
-\unexpanded\def\processcommalistwithparameters[#1]#2%
+\protected\def\processcommalistwithparameters[#1]#2%
{\def\syst_helpers_do_process_comma_list_with_parameters##1{#2[##1]}%
\processcommalist[#1]\syst_helpers_do_process_comma_list_with_parameters}
@@ -1235,11 +1225,11 @@
\let\syst_helpers_comma_list_step\relax
-\unexpanded\def\startprocesscommalist[#1]#2\stopprocesscommalist
+\protected\def\startprocesscommalist[#1]#2\stopprocesscommalist
{\def\syst_helpers_comma_list_step##1{\def\currentcommalistitem{##1}#2}%
\processcommalist[#1]\syst_helpers_comma_list_step}
-\unexpanded\def\startprocesscommacommand[#1]#2\stopprocesscommacommand
+\protected\def\startprocesscommacommand[#1]#2\stopprocesscommacommand
{\def\syst_helpers_comma_list_step##1{\def\currentcommalistitem{##1}#2}%
\normalexpanded{\processcommalist[#1]}\syst_helpers_comma_list_step}
@@ -1287,7 +1277,7 @@
% obsolete: \def\expandactions{\let\expandedaction\edef} \expandactions (see mkii)
-\unexpanded\def\syst_helpers_do_compare_process_action_a[#1=>#2][#3]%
+\protected\def\syst_helpers_do_compare_process_action_a[#1=>#2][#3]%
{\edef\m_syst_string_two{#1}%
\ifx\m_syst_string_two\s!default
\let\commalistelement\empty
@@ -1296,7 +1286,7 @@
% met \quitcommalist tot meer dan 25\% sneller
-\unexpanded\def\syst_helpers_do_compare_process_action_b[#1=>#2][#3]%
+\protected\def\syst_helpers_do_compare_process_action_b[#1=>#2][#3]%
{\edef\m_syst_string_two{#1}%
\ifx\m_syst_string_one\m_syst_string_two
\def\commalistelement{#3}%
@@ -1307,7 +1297,7 @@
#2%
\fi\fi}
-\unexpanded\def\processaction[#1]#2[%
+\protected\def\processaction[#1]#2[%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\let\syst_helpers_do_compare_process_action\syst_helpers_do_compare_process_action_a
@@ -1317,7 +1307,7 @@
\edef\syst_helpers_do_process_action##1{\syst_helpers_do_compare_process_action[##1][#1]}% expands #1
\processnextcommalist\relax\relax\syst_helpers_do_process_action[}
-\unexpanded\def\syst_helpers_do_compare_process_action_c[#1=>#2][#3]%
+\protected\def\syst_helpers_do_compare_process_action_c[#1=>#2][#3]%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#3}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -1332,7 +1322,7 @@
\fi
\fi}
-\unexpanded\def\processfirstactioninset[#1]%
+\protected\def\processfirstactioninset[#1]%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\processaction
@@ -1341,13 +1331,13 @@
\fi
[#1]}
-\unexpanded\def\syst_helpers_process_first_action_in_set_indeed[#1]#2[#3]%
+\protected\def\syst_helpers_process_first_action_in_set_indeed[#1]#2[#3]%
{\def\syst_helpers_do_process_action##1%
{\def\syst_helpers_do_do_process_action####1{\syst_helpers_do_compare_process_action_c[####1][##1]}%
\processcommalist[#3]\syst_helpers_do_do_process_action}%
\normalexpanded{\processcommalist[#1]}\syst_helpers_do_process_action}
-\unexpanded\def\syst_helpers_do_compare_process_action_d[#1=>#2][#3]%
+\protected\def\syst_helpers_do_compare_process_action_d[#1=>#2][#3]%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#3}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -1364,10 +1354,10 @@
\installsystemnamespace{nextactionlevel}
-\unexpanded\def\syst_helpers_do_process_all_actions_in_set
+\protected\def\syst_helpers_do_process_all_actions_in_set
{\csname\??nextactionlevel\the\processlevel\endcsname}
-\unexpanded\def\processallactionsinset[#1]%
+\protected\def\processallactionsinset[#1]%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\processaction
@@ -1376,7 +1366,7 @@
\fi
[#1]}
-\unexpanded\def\syst_helpers_process_all_actions_in_set_indeed[#1]#2[#3]%
+\protected\def\syst_helpers_process_all_actions_in_set_indeed[#1]#2[#3]%
{\advance\processlevel \plusone
\expandafter\def\csname\??nextactionlevel\the\processlevel\endcsname##1%
{\def\syst_helpers_do_do_process_action####1{\syst_helpers_do_compare_process_action_d[####1][##1]}%
@@ -1386,7 +1376,7 @@
%D These macros use:
-\unexpanded\def\processnextcommalist#1#2#3[#4#5]%
+\protected\def\processnextcommalist#1#2#3[#4#5]%
{#1%
\let\nexttoken#4%
\global\advance\commalevel \plusone
@@ -1412,10 +1402,10 @@
\let\firstcharacter \empty
\let\remainingcharacters\empty
-\unexpanded\def\getfirstcharacter #1{\clf_getfirstcharacter{#1}}
-\unexpanded\def\doifelsefirstchar #1#2{\clf_doifelsefirstchar{#1}{#2}}
-\unexpanded\def\thefirstcharacter #1{\clf_thefirstcharacter{#1}}
-\unexpanded\def\theremainingcharacters#1{\clf_theremainingcharacters{#1}}
+\protected\def\getfirstcharacter #1{\clf_getfirstcharacter{#1}}
+\protected\def\doifelsefirstchar #1#2{\clf_doifelsefirstchar{#1}{#2}}
+\protected\def\thefirstcharacter #1{\clf_thefirstcharacter{#1}}
+\protected\def\theremainingcharacters#1{\clf_theremainingcharacters{#1}}
\let\doiffirstcharelse\doifelsefirstchar
@@ -1430,7 +1420,7 @@
\let\m_syst_sub_string\empty
-\unexpanded\def\doifelseinstring#1%
+\protected\def\doifelseinstring#1%
{\edef\m_syst_sub_string{#1}% expand #1 here
\ifx\m_syst_sub_string\empty
\expandafter\thirdofthreearguments
@@ -1440,14 +1430,14 @@
\let\doifinstringelse\doifelseinstring
-\unexpanded\def\syst_helpers_do_if_in_string_else_indeed#1%
+\protected\def\syst_helpers_do_if_in_string_else_indeed#1%
{\syst_helpers_do_if_in_string_else\m_syst_sub_string{#1}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifinstring#1%%
+\protected\def\doifinstring#1%%
{\edef\m_syst_sub_string{#1}% expand #1 here
\ifx\m_syst_sub_string\empty
\expandafter\gobbletwoarguments
@@ -1455,22 +1445,23 @@
\expandafter\syst_helpers_do_if_in_string_indeed
\fi}
-\unexpanded\def\syst_helpers_do_if_in_string_indeed#1%
+\protected\def\syst_helpers_do_if_in_string_indeed#1%
{\syst_helpers_do_if_in_string_else\m_syst_sub_string{#1}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotinstring#1%%
+\protected\def\doifnotinstring#1%%
{\edef\m_syst_sub_string{#1}% expand #1 here
\ifx\m_syst_sub_string\empty
- \expandafter\gobbletwoarguments
+ %\expandafter\gobbletwoarguments
+ \expandafter\secondoftwoarguments
\else
\expandafter\syst_helpers_do_if_not_in_string_indeed
\fi}
-\unexpanded\def\syst_helpers_do_if_not_in_string_indeed#1%
+\protected\def\syst_helpers_do_if_not_in_string_indeed#1%
{\syst_helpers_do_if_in_string_else\m_syst_sub_string{#1}%
\expandafter\gobbleoneargument
\else
@@ -1479,7 +1470,7 @@
% replaces prev
-\unexpanded\def\syst_helpers_do_if_in_string_else#1#2% ##2 can be {abc}
+\protected\def\syst_helpers_do_if_in_string_else#1#2% ##2 can be {abc}
{\expandafter\def\expandafter\syst_helpers_do_do_if_in_string_else
\expandafter##\expandafter1#1##2##3^^^^0004{\unless\if##2@}% expand #1 here
\expandafter\syst_helpers_do_do_if_in_string_else\normalexpanded{#2#1}@@^^^^0004} % expand #2 here
@@ -1495,12 +1486,12 @@
%D Where \type {\doifinstringelse} does as much expansion as possible, the latter
%D alternative does minimal (one level) expansion.
-\unexpanded\def\syst_helpers_do_if_in_csname_else#1#2%
+\protected\def\syst_helpers_do_if_in_csname_else#1#2%
{\def\syst_helpers_do_do_if_in_csname_else##1#1##2##3^^^^0004%
{\unless\if##2@}%
\expandafter\syst_helpers_do_do_if_in_csname_else#2#1@@^^^^0004}
-\unexpanded\def\doifelseincsname#1#2%
+\protected\def\doifelseincsname#1#2%
{\normalexpanded{\syst_helpers_do_if_in_csname_else{#1}}{#2}%
\expandafter\firstoftwoarguments
\else
@@ -1558,7 +1549,7 @@
\def\percentdimen#1#2% dimen percentage (with %)
{\dimexpr\clf_percentageof{#2}\dimexpr#1\relax}
-\unexpanded\def\setpercentdimen#1#2% dimen percentage (with %)
+\protected\def\setpercentdimen#1#2% dimen percentage (with %)
{#1=\clf_percentageof{#2}\dimexpr#1\relax}
%D \macros
@@ -1586,7 +1577,7 @@
%D The gain in speed depends on the length of the argument (the longer the argument,
%D the less we gain).
-\unexpanded\def\makerawcommalist[#1]#2% use \processnext ... here
+\protected\def\makerawcommalist[#1]#2% use \processnext ... here
{\def\syst_helpers_do_make_raw_comma_list##1% we don't expand ##1
{\ifx#2\empty
\def#2{##1}%
@@ -1602,28 +1593,28 @@
\expandafter\syst_helpers_raw_process_comma_item
\fi#2}
-\unexpanded\def\rawprocesscommalist[#1]#2% accepteert ook [\cs]
+\protected\def\rawprocesscommalist[#1]#2% accepteert ook [\cs]
{\global\advance\commalevel \plusone
\expandafter\let\csname\??nextcommalevel\the\commalevel\endcsname#2%
\expandafter\syst_helpers_raw_process_comma_item#1,],% \relax
\global\advance\commalevel \minusone }
-\unexpanded\def\rawprocesscommacommand[#1]% not really needed
+\protected\def\rawprocesscommacommand[#1]% not really needed
{\normalexpanded{\rawprocesscommalist[#1]}}
%D Here is one without nesting:
-\unexpanded\def\syst_helpers_fast_process_comma_item#1,#2% #2 eats up preceding space
+\protected\def\syst_helpers_fast_process_comma_item#1,#2% #2 eats up preceding space
{\if]#1\else
\syst_helpers_fast_process_comma_command{#1}%
\expandafter\syst_helpers_fast_process_comma_item
\fi#2}
-\unexpanded\def\fastprocesscommalist[#1]#2% accepteert ook [\cs]
+\protected\def\fastprocesscommalist[#1]#2% accepteert ook [\cs]
{\let\syst_helpers_fast_process_comma_command#2%
\expandafter\syst_helpers_fast_process_comma_item#1,],}% \relax
-\unexpanded\def\fastprocesscommacommand[#1]#2% accepteert ook [\cs]
+\protected\def\fastprocesscommacommand[#1]#2% accepteert ook [\cs]
{\let\syst_helpers_fast_process_comma_command#2%
\normalexpanded{\syst_helpers_fast_process_comma_item#1},],}% \relax
@@ -1632,7 +1623,7 @@
\def\m_syst_two_commas{,,}
-\unexpanded\def\rawdoifelseinset#1%
+\protected\def\rawdoifelseinset#1%
{\edef\m_syst_sub_string{,#1,}% expand #1 here
\ifx\m_syst_sub_string\m_syst_two_commas
\expandafter\thirdofthreearguments
@@ -1640,16 +1631,16 @@
\expandafter\syst_helpers_raw_do_if_in_set_else
\fi}
-\let\rawdoifinsetelse\rawdoifinsetelse
+\let\rawdoifinsetelse\rawdoifelseinset
-\unexpanded\def\syst_helpers_raw_do_if_in_set_else#1%
+\protected\def\syst_helpers_raw_do_if_in_set_else#1%
{\syst_helpers_do_if_in_string_else\m_syst_sub_string{,#1,}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\rawdoifinset#1%
+\protected\def\rawdoifinset#1%
{\edef\m_syst_sub_string{,#1,}% expand #1 here
\ifx\m_syst_sub_string\m_syst_two_commas
\expandafter\gobbletwoarguments
@@ -1657,7 +1648,7 @@
\expandafter\syst_helpers_raw_do_if_in_set
\fi}
-\unexpanded\def\syst_helpers_raw_do_if_in_set#1%%
+\protected\def\syst_helpers_raw_do_if_in_set#1%%
{\syst_helpers_do_if_in_string_else\m_syst_sub_string{,#1,}%
\expandafter\firstofoneargument
\else
@@ -1673,7 +1664,7 @@
\fi}%
\syst_helpers_do_do_raw_process_action,#2,#1=>,@^^^^0004}
-\unexpanded\def\rawprocessaction[#1]#2[#3]%
+\protected\def\rawprocessaction[#1]#2[#3]%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{undefined}% better \!!undefined
\let\m_syst_helpers_process_action\m_syst_string_two
@@ -1731,6 +1722,14 @@
\def\docopyvalue#1#2#3%
{\expandafter\def\csname#1#3\endcsname{\csname#2#3\endcsname}}
+%D Experiment:
+
+\edef\m_syst_protected{\detokenize{protected}}
+
+\protected\def\aliasmacro#1#2%
+ {\doifinstring{\m_syst_protected}{\meaning#2}\protected
+ \def#1{#2}}
+
%D \macros
%D {doassign,undoassign,doassignempty}
%D
@@ -1763,10 +1762,10 @@
%D will redefine this macro later on, when a more advanced message mechanism is
%D implemented.
-\unexpanded\def\showassignerror#1#2%
+\protected\def\showassignerror#1#2%
{\writestatus{setup}{missing or ungrouped '=' after '#1' in line #2}}
-\unexpanded\def\doassignempty[#1][#2=#3]%
+\protected\def\doassignempty[#1][#2=#3]%
{\ifcsname#1#2\endcsname\else\dosetvalue{#1}{#2}{#3}\fi}
%D \macros
@@ -1836,15 +1835,15 @@
\let\currentvalue\empty
-\unexpanded\def\getparameters {\dogetparameters\dosetvalue}
-\unexpanded\def\geteparameters {\dogetparameters\dosetevalue}
-\unexpanded\def\getgparameters {\dogetparameters\dosetgvalue}
-\unexpanded\def\getxparameters {\dogetparameters\dosetxvalue}
-\unexpanded\def\forgetparameters{\dogetparameters\doignorevalue}
+\protected\def\getparameters {\dogetparameters\dosetvalue}
+\protected\def\geteparameters {\dogetparameters\dosetevalue}
+\protected\def\getgparameters {\dogetparameters\dosetgvalue}
+\protected\def\getxparameters {\dogetparameters\dosetxvalue}
+\protected\def\forgetparameters{\dogetparameters\doignorevalue}
\let\getexpandedparameters\geteparameters
-\unexpanded\def\dogetparameters#1[#2]#3[#4%
+\protected\def\dogetparameters#1[#2]#3[#4%
{\if\noexpand#4]%
\expandafter\gobbleoneargument
\else
@@ -1896,9 +1895,9 @@
\let\syst_helpers_get_parameters_assign_indeed\syst_helpers_get_parameters_assign_normal
-\unexpanded\def\doassign [#1][#2]{\let\setsomevalue\dosetvalue \syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
-\unexpanded\def\doeassign [#1][#2]{\let\setsomevalue\dosetevalue \syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
-\unexpanded\def\undoassign[#1][#2]{\let\setsomevalue\doresetvalue\syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
+\protected\def\doassign [#1][#2]{\let\setsomevalue\dosetvalue \syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
+\protected\def\doeassign [#1][#2]{\let\setsomevalue\dosetevalue \syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
+\protected\def\undoassign[#1][#2]{\let\setsomevalue\doresetvalue\syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
%D \macros
%D {processassignmentlist,processassignmentcommand,
@@ -1914,18 +1913,18 @@
%D We can optimize this one if needed but it's not a core macro so hardly worth the
%D trouble and tokens.
-\unexpanded\def\processassignmentlist[#1]#2% #2 == \command{key}{value]
+\protected\def\processassignmentlist[#1]#2% #2 == \command{key}{value]
{\def\syst_helpers_process_assignment_entry##1{#2}% {##2}{##3} % namespace is ignored
\dogetparameters\syst_helpers_process_assignment_entry[][#1]}
-\unexpanded\def\processassignmentcommand[#1]%
+\protected\def\processassignmentcommand[#1]%
{\normalexpanded{\processassignmentlist[#1]}}
-\unexpanded\def\startprocessassignmentlist[#1]#2\stopprocessassignmentlist
+\protected\def\startprocessassignmentlist[#1]#2\stopprocessassignmentlist
{\def\currentassignmentlistcommand##1##2{\def\currentassignmentlistkey{##1}\def\currentassignmentlistvalue{##2}#2}%
\processassignmentlist[#1]\currentassignmentlistcommand}
-\unexpanded\def\startprocessassignmentcommand[#1]#2\stopprocessassignmentcommand
+\protected\def\startprocessassignmentcommand[#1]#2\stopprocessassignmentcommand
{\def\currentassignmentlistcommand##1##2{\def\currentassignmentlistkey{##1}\def\currentassignmentlistvalue{##2}#2}%
\normalexpanded{\processassignmentlist[#1]}\currentassignmentlistcommand}
@@ -1979,7 +1978,7 @@
\let\syst_helpers_get_parameters\syst_helpers_get_parameters_normal % **
-\unexpanded\def\expandparameters
+\protected\def\expandparameters
{\let\syst_helpers_get_parameters\syst_helpers_get_parameters_expanded}
%D \macros
@@ -1992,7 +1991,7 @@
%D \getemptyparameters [label] [...=...,...=...]
%D \stoptyping
-\unexpanded\def\getemptyparameters[#1]#2[#3]%
+\protected\def\getemptyparameters[#1]#2[#3]%
{\def\syst_helpers_get_empty_parameters##1{\doassignempty[#1][##1]}%
\processcommalist[#3]\syst_helpers_get_empty_parameters}
@@ -2025,7 +2024,7 @@
%D By using \type {\docopyvalue} we've prepared this command for use in a
%D multi||lingual environment.
-\unexpanded\def\copyparameters[#1]#2[#3]#4[#5]%
+\protected\def\copyparameters[#1]#2[#3]#4[#5]%
{\doifnot{#1}{#3}
{\def\syst_helpers_copy_parameter{\docopyvalue{#1}{#3}}% ##1
\processcommalist[#5]\syst_helpers_copy_parameter}}
@@ -2048,7 +2047,7 @@
\def\syst_helpers_check_parameters#1=#2#3^^^^0004%
{\if#2^^^^0003\parametersfalse\else\parameterstrue\fi}
-\unexpanded\def\checkparameters[#1]%
+\protected\def\checkparameters[#1]%
{\syst_helpers_check_parameters#1=^^^^0003^^^^0003^^^^0004}
%D \macros
@@ -2085,7 +2084,7 @@
\def\syst_helpers_get_comma_list_size#1%
{\advance\commalistcounter\plusone}
-\unexpanded\def\getcommalistsize#1]% don't loose [{#1}]
+\protected\def\getcommalistsize#1]% don't loose [{#1}]
{\commalistcounter\zerocount
\processcommalist#1]\syst_helpers_get_comma_list_size % was [{#1}]
\edef\commalistsize{\the\commalistcounter}}
@@ -2095,7 +2094,7 @@
% \scratchtoks\expandafter{\expandafter[\commacommand]}%
% \expandafter\getcommalistsize\the\scratchtoks }
-\unexpanded\def\getcommacommandsize[#1]%
+\protected\def\getcommacommandsize[#1]%
{\normalexpanded{\getcommalistsize[#1]}}
\def\syst_helpers_get_from_comma_list#1%
@@ -2105,12 +2104,12 @@
\expandafter\quitcommalist
\fi}
-\unexpanded\def\getfromcommalist[#1]#2[#3]%
+\protected\def\getfromcommalist[#1]#2[#3]%
{\let\commalistelement\empty
\commalistcounter#3\relax
\processcommalist[#1]\syst_helpers_get_from_comma_list}
-\unexpanded\def\getfromcommacommand[#1]%
+\protected\def\getfromcommacommand[#1]%
{\normalexpanded{\getfromcommalist[#1]}}
%D Watertight (and efficient) solutions are hard to find, due to the handling of
@@ -2176,7 +2175,7 @@
%D \def\dosetupsomething[#1][#2]%
%D {... #1 ... #2 ...}
%D
-%D \unexpanded\def\setupsomething
+%D \protected\def\setupsomething
%D {\dodoubleargument\dosetupsomething}
%D \stoptyping
%D
@@ -2204,13 +2203,13 @@
% no longer a message:
%
-% \unexpanded\def\dosingleargument {\let\expectedarguments\plusone \dosingleempty }
-% \unexpanded\def\dodoubleargument {\let\expectedarguments\plustwo \dodoubleempty }
-% \unexpanded\def\dotripleargument {\let\expectedarguments\plusthree \dotripleempty }
-% \unexpanded\def\doquadrupleargument {\let\expectedarguments\plusfour \doquadrupleempty }
-% \unexpanded\def\doquintupleargument {\let\expectedarguments\plusfive \doquintupleempty }
-% \unexpanded\def\dosixtupleargument {\let\expectedarguments\plussix \dosixtupleempty }
-% \unexpanded\def\doseventupleargument{\let\expectedarguments\plusseven \doseventupleempty}
+% \protected\def\dosingleargument {\let\expectedarguments\plusone \dosingleempty }
+% \protected\def\dodoubleargument {\let\expectedarguments\plustwo \dodoubleempty }
+% \protected\def\dotripleargument {\let\expectedarguments\plusthree \dotripleempty }
+% \protected\def\doquadrupleargument {\let\expectedarguments\plusfour \doquadrupleempty }
+% \protected\def\doquintupleargument {\let\expectedarguments\plusfive \doquintupleempty }
+% \protected\def\dosixtupleargument {\let\expectedarguments\plussix \dosixtupleempty }
+% \protected\def\doseventupleargument{\let\expectedarguments\plusseven \doseventupleempty}
%D \macros
%D {iffirstagument,ifsecondargument,ifthirdargument,
@@ -2259,16 +2258,16 @@
% \setnewconstant\noexpectedarguments\zerocount
% \setnewconstant\expectedarguments \zerocount
%
-% \unexpanded\def\showargumenterror#1#2%
+% \protected\def\showargumenterror#1#2%
% {\writestatus{system}{\number#1 argument(s) expected in line #2}}
%
-% \unexpanded\def\syst_helpers_argument_error
+% \protected\def\syst_helpers_argument_error
% {\ifnum\expectedarguments>\noexpectedarguments
% \showargumenterror{\number\expectedarguments}{\number\inputlineno}%
% \fi
% \syst_helpers_argument_reset}
%
-% \unexpanded\def\syst_helpers_argument_reset
+% \protected\def\syst_helpers_argument_reset
% {\let\expectedarguments\noexpectedarguments}
% \def\test[#1]{(#1)}
@@ -2316,7 +2315,7 @@
%
% with
%
-% \unexpanded\def\dodoubleempty#1%
+% \protected\def\dodoubleempty#1%
% {\syst_helpers_argument_reset
% \let\m_syst_aux_do#1% alias
% \let\m_syst_action_yes\syst_helpers_double_empty_one_yes
@@ -2357,7 +2356,7 @@
%D Single:
-% \unexpanded\def\dosingleempty#1%
+% \protected\def\dosingleempty#1%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\firstargumenttrue#1}%
@@ -2367,7 +2366,7 @@
% {\firstargumentfalse
% #1[]}
-\unexpanded\def\dosingleempty#1%
+\protected\def\dosingleempty#1%
{%syst_helpers_argument_reset
\t_syst_aux{#1}%
\let\m_syst_action_yes\syst_helpers_single_empty_one_yes
@@ -2381,7 +2380,7 @@
%D Double
-% \unexpanded\def\dodoubleempty#1%
+% \protected\def\dodoubleempty#1%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_double_empty_one_yes#1}%
@@ -2409,7 +2408,7 @@
% \def\syst_helpers_double_empty_one_spaced#1#2{#1[{#2}][] }
% \def\syst_helpers_double_empty_one_normal#1#2{#1[{#2}][]}
-\unexpanded\def\dodoubleempty#1%
+\protected\def\dodoubleempty#1%
{%syst_helpers_argument_reset
\t_syst_aux{#1}%
\let\m_syst_action_yes\syst_helpers_double_empty_one_yes
@@ -2440,7 +2439,7 @@
% Triple
-% \unexpanded\def\dotripleempty#1%
+% \protected\def\dotripleempty#1%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_triple_empty_one_yes#1}%
@@ -2486,7 +2485,7 @@
% \def\syst_helpers_triple_empty_three_spaced#1#2#3{#1[{#2}][{#3}][] }
% \def\syst_helpers_triple_empty_three_normal#1#2#3{#1[{#2}][{#3}][]}
-\unexpanded\def\dotripleempty#1%
+\protected\def\dotripleempty#1%
{%syst_helpers_argument_reset
\t_syst_aux{#1}%
\let\m_syst_action_yes\syst_helpers_triple_empty_one_yes
@@ -2535,7 +2534,7 @@
%D Quadruple:
-% \unexpanded\def\doquadrupleempty#1%
+% \protected\def\doquadrupleempty#1%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_quadruple_empty_one_yes#1}%
@@ -2600,7 +2599,7 @@
% \def\syst_helpers_quadruple_empty_four_spaced #1#2#3#4{#1[{#2}][{#3}][{#4}][] }
% \def\syst_helpers_quadruple_empty_four_normal #1#2#3#4{#1[{#2}][{#3}][{#4}][]}
-\unexpanded\def\doquadrupleempty#1%
+\protected\def\doquadrupleempty#1%
{%syst_helpers_argument_reset
\t_syst_aux{#1}%
\let\m_syst_action_yes\syst_helpers_quadruple_empty_one_yes
@@ -2668,7 +2667,7 @@
%D Quintuple:
-% \unexpanded\def\doquintupleempty#1%
+% \protected\def\doquintupleempty#1%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_quintuple_empty_one_yes#1}%
@@ -2753,7 +2752,7 @@
% \def\syst_helpers_quintuple_empty_five_spaced #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][] }
% \def\syst_helpers_quintuple_empty_five_normal #1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][]}
-\unexpanded\def\doquintupleempty#1%
+\protected\def\doquintupleempty#1%
{%syst_helpers_argument_reset
\t_syst_aux{#1}%
\let\m_syst_action_yes\syst_helpers_quintuple_empty_one_yes
@@ -2841,7 +2840,7 @@
%D Sixtuple:
-% \unexpanded\def\dosixtupleempty#1%
+% \protected\def\dosixtupleempty#1%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_sixtuple_empty_one_yes#1}
@@ -2947,7 +2946,7 @@
% \def\syst_helpers_sixtuple_empty_six_spaced #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][] }
% \def\syst_helpers_sixtuple_empty_six_normal #1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][]}
-\unexpanded\def\dosixtupleempty#1%
+\protected\def\dosixtupleempty#1%
{%syst_helpers_argument_reset
\t_syst_aux{#1}%
\let\m_syst_action_yes\syst_helpers_sixtuple_empty_one_yes
@@ -3056,7 +3055,7 @@
%D Seventuple:
-% \unexpanded\def\doseventupleempty#1%
+% \protected\def\doseventupleempty#1%
% {\syst_helpers_argument_reset
% \doifelsenextoptional
% {\syst_helpers_seventuple_empty_one_yes#1}%
@@ -3184,7 +3183,7 @@
% \def\syst_helpers_seventuple_empty_seven_spaced#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][] }
% \def\syst_helpers_seventuple_empty_seven_normal#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][]}
-\unexpanded\def\doseventupleempty#1%
+\protected\def\doseventupleempty#1%
{%syst_helpers_argument_reset
\t_syst_aux{#1}%
\let\m_syst_action_yes\syst_helpers_seventuple_empty_one_yes
@@ -3378,13 +3377,13 @@
%D Many \CONTEXT\ commands started as complex or simple ones, but changed into more
%D versatile (more object oriented) ones using the \type {\get..argument} commands.
-\unexpanded\def\complexorsimple#1%
+\protected\def\complexorsimple#1%
{% \relax % prevents lookahead, brrr
\doifelsenextoptional
{\firstargumenttrue \csname\s!complex\csstring#1\endcsname}
{\firstargumentfalse\csname\s!simple \csstring#1\endcsname}}
-\unexpanded\def\complexorsimpleempty#1%
+\protected\def\complexorsimpleempty#1%
{% \relax % prevents lookahead, brrr
\doifelsenextoptional
{\firstargumenttrue \csname\s!complex\csstring#1\endcsname}
@@ -3396,19 +3395,19 @@
%D The previous commands are used that often that we found it worthwile to offer two
%D more alternatives. Watch the build in protection.
-\unexpanded\def\syst_helpers_complex_or_simple#1#2%
+\protected\def\syst_helpers_complex_or_simple#1#2%
{\doifelsenextoptional{\firstargumenttrue#1}{\firstargumentfalse#2}}
-\unexpanded\def\syst_helpers_complex_or_simple_empty#1%
+\protected\def\syst_helpers_complex_or_simple_empty#1%
{\doifelsenextoptional{\firstargumenttrue#1}{\firstargumentfalse#1[]}}
-\unexpanded\def\definecomplexorsimple#1%
- {\unexpanded\edef#1{\syst_helpers_complex_or_simple
+\protected\def\definecomplexorsimple#1%
+ {\protected\edef#1{\syst_helpers_complex_or_simple
\expandafter\noexpand\csname\s!complex\csstring#1\endcsname
\expandafter\noexpand\csname\s!simple \csstring#1\endcsname}}
-\unexpanded\def\definecomplexorsimpleempty#1%
- {\unexpanded\edef#1{\syst_helpers_complex_or_simple_empty
+\protected\def\definecomplexorsimpleempty#1%
+ {\protected\edef#1{\syst_helpers_complex_or_simple_empty
\expandafter\noexpand\csname\s!complex\csstring#1\endcsname}}
%D These commands are called as:
@@ -3446,8 +3445,8 @@
\newconditional\c_syst_helpers_permit_spaces_between_groups
-\unexpanded\def \permitspacesbetweengroups{\settrue \c_syst_helpers_permit_spaces_between_groups}
-\unexpanded\def\dontpermitspacesbetweengroups{\setfalse\c_syst_helpers_permit_spaces_between_groups}
+\protected\def \permitspacesbetweengroups{\settrue \c_syst_helpers_permit_spaces_between_groups}
+\protected\def\dontpermitspacesbetweengroups{\setfalse\c_syst_helpers_permit_spaces_between_groups}
\dontpermitspacesbetweengroups
@@ -3456,7 +3455,7 @@
%D \type {conditional} token. Okay, these macros are not called that often but it
%D saves crap when tracing.
-\unexpanded\def\syst_helpers_get_grouped_argument#1#2%
+\protected\def\syst_helpers_get_grouped_argument#1#2%
{\let\syst_helpers_get_grouped_argument_yes#1%
\let\syst_helpers_get_grouped_argument_nop#2%
\futurelet\nextargument\syst_helpers_get_grouped_argument_indeed}
@@ -3495,13 +3494,13 @@
\expandafter\syst_helpers_get_grouped_argument_d % h
\fi}
-\unexpanded\def\dosinglegroupempty#1%
+\protected\def\dosinglegroupempty#1%
{\def\syst_helpers_get_grouped_argument_nested
{\dontpermitspacesbetweengroups
#1}%
\syst_helpers_get_grouped_argument\firstargumenttrue\firstargumentfalse}
-\unexpanded\def\dodoublegroupempty#1%
+\protected\def\dodoublegroupempty#1%
{\def\syst_helpers_get_grouped_argument_nested##1%
{\def\syst_helpers_get_grouped_argument_nested
{\dontpermitspacesbetweengroups
@@ -3509,7 +3508,7 @@
\syst_helpers_get_grouped_argument\secondargumenttrue\secondargumentfalse}%
\syst_helpers_get_grouped_argument\firstargumenttrue\firstargumentfalse}
-\unexpanded\def\dotriplegroupempty#1%
+\protected\def\dotriplegroupempty#1%
{\def\syst_helpers_get_grouped_argument_nested##1%
{\def\syst_helpers_get_grouped_argument_nested####1%
{\def\syst_helpers_get_grouped_argument_nested
@@ -3519,7 +3518,7 @@
\syst_helpers_get_grouped_argument\secondargumenttrue\secondargumentfalse}%
\syst_helpers_get_grouped_argument\firstargumenttrue\firstargumentfalse}
-\unexpanded\def\doquadruplegroupempty#1%
+\protected\def\doquadruplegroupempty#1%
{\def\syst_helpers_get_grouped_argument_nested##1%
{\def\syst_helpers_get_grouped_argument_nested####1%
{\def\syst_helpers_get_grouped_argument_nested########1%
@@ -3531,7 +3530,7 @@
\syst_helpers_get_grouped_argument\secondargumenttrue\secondargumentfalse}%
\syst_helpers_get_grouped_argument\firstargumenttrue\firstargumentfalse}
-\unexpanded\def\doquintuplegroupempty#1%
+\protected\def\doquintuplegroupempty#1%
{\def\syst_helpers_get_grouped_argument_nested##1%
{\def\syst_helpers_get_grouped_argument_nested####1%
{\def\syst_helpers_get_grouped_argument_nested########1%
@@ -3599,14 +3598,14 @@
\def\fifthofsixarguments #1#2#3#4#5#6{#5}
\def\sixthofsixarguments #1#2#3#4#5#6{#6}
-\unexpanded\def\firstofoneunexpanded #1{#1}
+\protected\def\firstofoneunexpanded #1{#1}
-\unexpanded\def\firstoftwounexpanded #1#2{#1}
-\unexpanded\def\secondoftwounexpanded #1#2{#2}
+\protected\def\firstoftwounexpanded #1#2{#1}
+\protected\def\secondoftwounexpanded #1#2{#2}
-\unexpanded\def\firstofthreeunexpanded #1#2#3{#1}
-\unexpanded\def\secondofthreeunexpanded#1#2#3{#2}
-\unexpanded\def\thirdofthreeunexpanded #1#2#3{#3}
+\protected\def\firstofthreeunexpanded #1#2#3{#1}
+\protected\def\secondofthreeunexpanded#1#2#3{#2}
+\protected\def\thirdofthreeunexpanded #1#2#3{#3}
%D \macros
%D {globalletempty,letempty,
@@ -3615,15 +3614,15 @@
%D
%D Trivial:
-\unexpanded\def\letempty #1{\let #1\empty}
-\unexpanded\def\globalletempty#1{\glet#1\empty}
+\protected\def\letempty #1{\let #1\empty}
+\protected\def\globalletempty#1{\glet#1\empty}
-\unexpanded\def\letvalueempty #1{\expandafter\let \csname#1\endcsname\empty}
-\unexpanded\def\letgvalueempty#1{\expandafter\glet\csname#1\endcsname\empty}
-\unexpanded\def\letvaluerelax #1{\expandafter\let \csname#1\endcsname\relax}
-\unexpanded\def\letgvalurelax #1{\expandafter\glet\csname#1\endcsname\relax}
+\protected\def\letvalueempty #1{\expandafter\let \csname#1\endcsname\empty}
+\protected\def\letgvalueempty#1{\expandafter\glet\csname#1\endcsname\empty}
+\protected\def\letvaluerelax #1{\expandafter\let \csname#1\endcsname\relax}
+\protected\def\letgvalurelax #1{\expandafter\glet\csname#1\endcsname\relax}
-\unexpanded\def\relaxvalueifundefined#1%
+\protected\def\relaxvalueifundefined#1%
{\ifcsname#1\endcsname \else
\expandafter\let\csname#1\endcsname\relax
\fi}
@@ -3634,7 +3633,7 @@
%D The next macro hardly needs explanation. Because no nesting is to be expected, we
%D can reuse \type {\wait} within \type {\wait} itself.
-\unexpanded\def\wait
+\protected\def\wait
{\begingroup
\read16 to \wait
\endgroup}
@@ -3661,12 +3660,12 @@
\ifdefined\writestring \else
- \unexpanded\def\writestring{\immediate\write\statuswrite}
- \unexpanded\def\writeline {\writestring{}}
+ \protected\def\writestring{\immediate\write\statuswrite}
+ \protected\def\writeline {\writestring{}}
\fi
-\unexpanded\def\normalwritestatus#1#2%
+\protected\def\normalwritestatus#1#2%
{\writestring{\expandafter\syst_helpers_split_status_yes\expandafter\statuswidth#1%
\space\space\space\space\space\space\space
\space\space\space\space\space\space\space
@@ -3692,13 +3691,13 @@
%D
%D A raw and dirty alternative for \type {\getparameters}; no checking is done!
-\unexpanded\def\rawsetparameter#1=#2,%
+\protected\def\rawsetparameter#1=#2,%
{\if]#1\else
\expandafter\def\csname\rawparameterprefix#1\endcsname{#2}%
\expandafter\rawsetparameter
\fi}
-\unexpanded\def\rawgetparameters[#1][#2% some 5-10% faster
+\protected\def\rawgetparameters[#1][#2% some 5-10% faster
{\ifx#2]% test is needed, else bomb on [#1][]
\expandafter\gobbleoneargument
\else
@@ -3719,13 +3718,13 @@
%D all preceding ones with \type {\redoglobal}. When using only alternatives, one
%D can reset this mechanism with \type {\resetglobal}.
-\unexpanded\def\resetglobal
+\protected\def\resetglobal
{\let\redoglobal\relax
\let\dodoglobal\relax}
\resetglobal
-\unexpanded\def\doglobal
+\protected\def\doglobal
{\ifx\redoglobal\relax
\let\redoglobal\global
\let\dodoglobal\syst_helpers_dodo_global
@@ -3759,7 +3758,7 @@
%D
%D Apart from the prefixes, a few more \type {\expandafters} are needed:
-% \unexpanded\def\newif#1% uses the original plain \@if
+% \protected\def\newif#1% uses the original plain \@if
% {\privatescratchcounter\escapechar
% \escapechar\minusone
% \expandafter\expandafter\expandafter
@@ -3771,7 +3770,7 @@
% \dodoglobal\@if#1{false}%
% \escapechar\privatescratchcounter}
-\normalprotected\def\newif#1% see syst-ini.mkiv
+\protected\def\newif#1% see syst-ini.mkiv
{\let\new_if_saved\newif
\let\newif\new_if_check
\expandafter\redoglobal\expandafter\def\csname\expandafter\newif\csstring#1true\endcsname {\let#1\iftrue }%
@@ -3781,26 +3780,26 @@
%D Also new:
-\unexpanded\def\define#1%
+\protected\def\define#1%
{\ifdefined#1%
\message{[\noexpand#1is already defined]}%
- \unexpanded\expandafter\def\expandafter\gobbleddefinition
+ \protected\expandafter\def\expandafter\gobbleddefinition
\else
- \unexpanded\expandafter\def
+ \protected\expandafter\def
\fi#1}
-\unexpanded\def\redefine#1%
+\protected\def\redefine#1%
{\ifdefined#1%
\message{[\noexpand#1is redefined]}%
\fi
- \unexpanded\def#1}
+ \protected\def#1}
-\unexpanded\def\definemacro#1%
+\protected\def\definemacro#1%
{\ifdefined#1%
\message{[\noexpand#1is already defined]}%
- \unexpanded\expandafter\def\expandafter\gobbleddefinition
+ \protected\expandafter\def\expandafter\gobbleddefinition
\else
- \unexpanded\expandafter\def
+ \protected\expandafter\def
\fi#1}
% \define\hans{hans}
@@ -3831,7 +3830,7 @@
%
% \glet\stoptexdefinition\relax
%
-% \unexpanded\gdef\starttexdefinition%
+% \protected\gdef\starttexdefinition%
% {\bgroup%
% \obeylines%
% \syst_helpers_start_tex_definition}
@@ -3854,7 +3853,7 @@
% \gdef\syst_helpers_start_tex_definition_yes_unexpanded#1#2 #3
% #4\stoptexdefinition%
% {\egroup% #1=unexpanded
-% \unexpanded\expandafter\def\csname#2\endcsname#3{#4}}
+% \protected\expandafter\def\csname#2\endcsname#3{#4}}
%
% \gdef\syst_helpers_start_tex_definition_yes_normal#1#2
% #3\stoptexdefinition%
@@ -3888,7 +3887,7 @@
%
% \glet\stoptexdefinition\relax
%
-% \unexpanded\gdef\starttexdefinition%
+% \protected\gdef\starttexdefinition%
% {\bgroup%
% \obeylines%
% \syst_helpers_start_tex_definition_one}
@@ -3907,7 +3906,7 @@
\glet\stoptexdefinition\relax
-\unexpanded\gdef\starttexdefinition%
+\protected\gdef\starttexdefinition%
{\bgroup%
\obeylines%
\syst_helpers_start_tex_definition}
@@ -3922,14 +3921,14 @@
\egroup
-% \unexpanded\def\texdefinition#1{\csname\ifcsname#1\endcsname#1\else donothing\fi\endcsname} % todo: a nop cs: char 0 or some corenamespace
+% \protected\def\texdefinition#1{\csname\ifcsname#1\endcsname#1\else donothing\fi\endcsname} % todo: a nop cs: char 0 or some corenamespace
-\unexpanded\def\texdefinition#1{\begincsname#1\endcsname}
+\protected\def\texdefinition#1{\begincsname#1\endcsname}
% This is a first variant, more might be added:
-\unexpanded\def\starttexcode{\unprotect}
-\unexpanded\def\stoptexcode {\protect}
+\protected\def\starttexcode{\unprotect}
+\protected\def\stoptexcode {\protect}
%D \macros
%D {newcounter,
@@ -3984,7 +3983,7 @@
\def\zerocountervalue{0}
-\unexpanded\def\newcounter#1%
+\protected\def\newcounter#1%
{\dodoglobal\let#1\zerocountervalue}
%D Nowadays we don't mind a few more tokens if we can gain a bit of speed.
@@ -4005,14 +4004,14 @@
\def\m_syst_action_nop{\syst_helpers_do_do_do_decrement#1,\plusone}%
\doifelsenextcharcs,\m_syst_action_yes\m_syst_action_nop}
-\unexpanded\def\increment{\doifelsenextcharcs(\syst_helpers_do_do_increment\syst_helpers_do_increment}
-\unexpanded\def\decrement{\doifelsenextcharcs(\syst_helpers_do_do_decrement\syst_helpers_do_decrement}
+\protected\def\increment{\doifelsenextcharcs(\syst_helpers_do_do_increment\syst_helpers_do_increment}
+\protected\def\decrement{\doifelsenextcharcs(\syst_helpers_do_do_decrement\syst_helpers_do_decrement}
-\unexpanded\def\fastincrement#1{\dodoglobal\edef#1{\the\numexpr#1+\plusone \relax}}
-\unexpanded\def\fastdecrement#1{\dodoglobal\edef#1{\the\numexpr#1+\minusone\relax}}
+\protected\def\fastincrement#1{\dodoglobal\edef#1{\the\numexpr#1+\plusone \relax}}
+\protected\def\fastdecrement#1{\dodoglobal\edef#1{\the\numexpr#1+\minusone\relax}}
-\unexpanded\def\incrementvalue#1{\expandafter\increment\csname#1\endcsname}
-\unexpanded\def\decrementvalue#1{\expandafter\decrement\csname#1\endcsname}
+\protected\def\incrementvalue#1{\expandafter\increment\csname#1\endcsname}
+\protected\def\decrementvalue#1{\expandafter\decrement\csname#1\endcsname}
%D \macros
%D {newsignal}
@@ -4031,7 +4030,7 @@
\newdimen\maximumsignal % step is about 0.00025pt
-\unexpanded\def\newsignal#1%
+\protected\def\newsignal#1%
{\ifdefined#1\else
\advance\maximumsignal 2\scaledpoint % to be save in rounding
\edef#1{\the\maximumsignal}%
@@ -4060,7 +4059,7 @@
%D
%D We will use this one in:
-\unexpanded\def\savenormalmeaning#1%
+\protected\def\savenormalmeaning#1%
{\ifcsname normal\csstring#1\endcsname \else
\expandafter\let\csname normal\csstring#1\endcsname#1%
\fi}
@@ -4113,7 +4112,7 @@
\installsystemnamespace{recurseindex}
\installsystemnamespace{recurseaction}
-\unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
+\protected\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
{\global\advance\outerrecurse \plusone
\expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#4}%
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
@@ -4135,7 +4134,7 @@
\fi
\fi\normalexpanded{\syst_helpers_stepwise_next{\number#1}{\number#2}{\number#3}}}
-\unexpanded\def\syst_helpers_stepwise_recurse#1#2#3% from to step
+\protected\def\syst_helpers_stepwise_recurse#1#2#3% from to step
{\ifnum#1>#2\relax
\expandafter\syst_helpers_stepwise_recurse_nop
\else
@@ -4143,14 +4142,14 @@
\doubleexpandafter\syst_helpers_stepwise_recurse_yes\expandafter
\fi\expandafter{\the\numexpr\recurselevel+#3\relax}{#2}{#3}}
-\unexpanded\def\syst_helpers_recurse_content
+\protected\def\syst_helpers_recurse_content
{\csname\??recurseaction\the\outerrecurse\endcsname}
-\unexpanded\def\syst_helpers_stepwise_recurse_yes
+\protected\def\syst_helpers_stepwise_recurse_yes
{\syst_helpers_recurse_content
\syst_helpers_stepwise_recurse}
-\unexpanded\def\syst_helpers_stepwise_reverse#1#2#3% from to step
+\protected\def\syst_helpers_stepwise_reverse#1#2#3% from to step
{\ifnum#1<#2\relax
\expandafter\syst_helpers_stepwise_recurse_nop
\else
@@ -4160,22 +4159,22 @@
\doubleexpandafter\syst_helpers_stepwise_reverse_yes\expandafter
\fi\expandafter{\the\innerrecurse}{#2}{#3}}
-\unexpanded\def\syst_helpers_stepwise_reverse_yes
+\protected\def\syst_helpers_stepwise_reverse_yes
{\syst_helpers_recurse_content
\syst_helpers_stepwise_reverse}
-\unexpanded\def\syst_helpers_stepwise_exit
+\protected\def\syst_helpers_stepwise_exit
{\syst_helpers_stepwise_recurse_nop\relax}
-\unexpanded\def\syst_helpers_stepwise_recurse_nop#1#2#3#4%
+\protected\def\syst_helpers_stepwise_recurse_nop#1#2#3#4%
{\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse\minusone}
-% \unexpanded\def\nonostepwiserecurse#1#2#3%
+% \protected\def\nonostepwiserecurse#1#2#3%
% {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
% \global\advance\outerrecurse\minusone}
-\unexpanded\def\dorecurse#1%
+\protected\def\dorecurse#1%
{\dostepwiserecurse\plusone{#1}\plusone}
\def\doexpandedrecurse#1#2% user macro (also was \doxprecurse)
@@ -4200,7 +4199,7 @@
%D
%D Because the simple case is used often, we implement it more efficiently:
-\unexpanded\def\dorecurse#1%
+\protected\def\dorecurse#1%
{\ifcase#1\relax
\expandafter\gobbletwoarguments
\or
@@ -4209,13 +4208,13 @@
\expandafter\syst_helpers_recurse_x
\fi{#1}}
-\unexpanded\def\syst_helpers_recurse_x#1#2%
+\protected\def\syst_helpers_recurse_x#1#2%
{\global\advance\outerrecurse \plusone
\expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#2}%
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\expandafter\syst_helpers_recurse_indeed\expandafter1\expandafter{\number#1}}
-\unexpanded\def\syst_helpers_recurse_y#1#2%
+\protected\def\syst_helpers_recurse_y#1#2%
{\global\advance\outerrecurse \plusone
\expandafter\glet\csname\??recurseindex\the\outerrecurse\endcsname\recurselevel
\let\recurselevel\!!plusone
@@ -4223,7 +4222,7 @@
\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse \minusone}
-\unexpanded\def\syst_helpers_recurse_indeed#1#2% from to
+\protected\def\syst_helpers_recurse_indeed#1#2% from to
{\ifnum#1>#2\relax
\expandafter\syst_helpers_recurse_indeed_nop
\else
@@ -4231,7 +4230,7 @@
\doubleexpandafter\syst_helpers_recurse_indeed_yes
\fi\expandafter{\the\numexpr\recurselevel+\plusone\relax}{#2}}
-\unexpanded\def\syst_helpers_recurse_indeed#1#2% from to
+\protected\def\syst_helpers_recurse_indeed#1#2% from to
{\ifnum#1>#2\relax
\expandafter\syst_helpers_recurse_indeed_nop
\else
@@ -4240,11 +4239,11 @@
\doubleexpandafter\syst_helpers_recurse_indeed_yes
\fi\expandafter{\the\innerrecurse}{#2}}
-\unexpanded\def\syst_helpers_recurse_indeed_yes
+\protected\def\syst_helpers_recurse_indeed_yes
{\syst_helpers_recurse_content
\syst_helpers_recurse_indeed}
-\unexpanded\def\syst_helpers_recurse_indeed_nop#1#2#3%
+\protected\def\syst_helpers_recurse_indeed_nop#1#2#3%
{\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse \minusone }
@@ -4257,7 +4256,7 @@
%D \dowith{a,b,c}{[#1]}
%D \stoptyping
-\unexpanded\def\dowith#1#2%
+\protected\def\dowith#1#2%
{\def\syst_helpers_with##1{#2}%
\normalexpanded{\processcommalist[#1]}\syst_helpers_with}
@@ -4279,30 +4278,30 @@
\let\endofloop\donothing % maybe \syst_helpers_loop_end
-\unexpanded\def\doloop#1%
+\protected\def\doloop#1%
{\global\advance\outerrecurse \plusone
\expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#1}%
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\let\endofloop\syst_helpers_loop
\syst_helpers_loop1} % no \plusone else \recurselevel wrong
-\unexpanded\def\syst_helpers_loop#1%
+\protected\def\syst_helpers_loop#1%
{\def\recurselevel{#1}%
\expandafter\syst_helpers_loop_yes\expandafter{\the\numexpr\recurselevel+\plusone\relax}}
-\unexpanded\def\syst_helpers_loop_yes
+\protected\def\syst_helpers_loop_yes
{\syst_helpers_recurse_content
\endofloop}
-\unexpanded\def\syst_helpers_loop_nop#1%
+\protected\def\syst_helpers_loop_nop#1%
{\let\endofloop\syst_helpers_loop % new, permits nested \doloop's
\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse\minusone}
-\unexpanded\def\exitloop % \exitloop quits at end
+\protected\def\exitloop % \exitloop quits at end
{\let\endofloop\syst_helpers_loop_nop}
-\unexpanded\def\exitloopnow#1\endofloop % \exitloopnow quits directly
+\protected\def\exitloopnow#1\endofloop % \exitloopnow quits directly
{\syst_helpers_loop_nop}
%D The loop is executed at least once, so beware of situations
@@ -4345,13 +4344,13 @@
{\csname\??recurseaction\the\outerrecurse\expandafter\expandafter\expandafter\endcsname
\expandafter\expandafter\expandafter{\expandafter\recurselevel\expandafter}\expandafter{\the\outerrecurse}}
-\unexpanded\def\syst_helpers_recurse_x#1#2%
+\protected\def\syst_helpers_recurse_x#1#2%
{\global\advance\outerrecurse \plusone
\expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#2}%
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\expandafter\syst_helpers_recurse_indeed\expandafter1\expandafter{\number#1}}
-\unexpanded\def\syst_helpers_recurse_y#1#2%
+\protected\def\syst_helpers_recurse_y#1#2%
{\global\advance\outerrecurse \plusone
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
\let\recurselevel\!!plusone
@@ -4360,7 +4359,7 @@
\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
\global\advance\outerrecurse \minusone}
-\unexpanded\def\doloop#1%
+\protected\def\doloop#1%
{\global\advance\outerrecurse \plusone
\expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#1}%
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
@@ -4369,7 +4368,7 @@
% for instance:
%
-% \unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
+% \protected\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
% {\global\advance\outerrecurse \plusone
% \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
% \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
@@ -4393,7 +4392,7 @@
%
% faster:
%
-% \unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
+% \protected\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
% {\global\advance\outerrecurse \plusone
% \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
% \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
@@ -4413,7 +4412,7 @@
\installsystemnamespace{recursestepwise}
-\unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
+\protected\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
{\global\advance\outerrecurse \plusone
\expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
@@ -4423,6 +4422,8 @@
\ifnum#2<#1x\else d\fi
\else\ifnum#3<\zerocount
\ifnum#1<#2x\else r\fi
+ \else
+ x%
\fi\fi
\expandafter\endcsname\normalexpanded{{\number#1}{\number#2}{\number#3}}}
% \expandafter\endcsname\expandafter{\number#1\expandafter}\expandafter{\number#2\expandafter}\expandafter{\number#3}}
@@ -4463,7 +4464,7 @@
\let\m_syst_helpers_fast_loop_cs\relax
-\unexpanded\def\dofastloopcs#1%
+\protected\def\dofastloopcs#1%
{\fastloopfinal#1\relax
\ifcase\fastloopfinal
\expandafter\gobbleoneargument
@@ -4471,12 +4472,12 @@
\expandafter\syst_helpers_fast_loop_cs
\fi}
-\unexpanded\def\syst_helpers_fast_loop_cs#1%
+\protected\def\syst_helpers_fast_loop_cs#1%
{\let\m_syst_helpers_fast_loop_cs#1%
\fastloopindex\plusone
\syst_helpers_fast_loop_cs_step}
-\unexpanded\def\syst_helpers_fast_loop_cs_step
+\protected\def\syst_helpers_fast_loop_cs_step
{\ifnum\fastloopindex>\fastloopfinal
\let\m_syst_helpers_fast_loop_cs\relax
\else
@@ -4487,9 +4488,11 @@
% Helper:
-\unexpanded\def\resetrecurselevel{\let\recurselevel\!!zerocount}
+\protected\def\resetrecurselevel{\let\recurselevel\!!zerocount}
-\let\recurselevel\!!zerocount
+\let\recurselevel \!!zerocount
+\let\recurseaction\relax
+\let\recursestring\empty
% \appendtoks \resetrecurselevel \to \everydump
@@ -4516,7 +4519,7 @@
%D }
%D \stoptyping
-\unexpanded\def\doloopoverlist#1#2%
+\protected\def\doloopoverlist#1#2%
{\global\advance\outerrecurse\plusone
\expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1{\edef\recursestring{##1}#2}%
\expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recursestring
@@ -4548,26 +4551,26 @@
\installsystemnamespace{extraevery}
-% \unexpanded\def\newevery#1#2%
+% \protected\def\newevery#1#2%
% {\ifx#1\everypar\else\newtoks#1\fi% we test for redefinition elsewhere
% \ifx#2\relax\else\ifdefined#2\else
% \expandafter\newtoks\csname\??extraevery\csstring#1\endcsname
% \def#2{\syst_helpers_every#1}%
% \fi\fi}
%
-% \unexpanded\def\syst_helpers_every#1%
+% \protected\def\syst_helpers_every#1%
% {\expandafter\removetoks\expandafter\the\csname\??extraevery\csstring#1\endcsname\from#1%
% \expandafter\appendtoks\expandafter\the\csname\??extraevery\csstring#1\endcsname\to #1%
% \csname\??extraevery\csstring#1\endcsname}
-\unexpanded\def\newevery#1#2%
+\protected\def\newevery#1#2%
{\ifx#1\everypar\else\newtoks#1\fi% we test for redefinition elsewhere
\ifx#2\relax\else\ifdefined#2\else
\expandafter\newtoks\csname\??extraevery\csstring#1\endcsname
\edef#2{\syst_helpers_every#1\csname\??extraevery\csstring#1\endcsname}%
\fi\fi}
-\unexpanded\def\syst_helpers_every#1#2%
+\protected\def\syst_helpers_every#1#2%
{\removetoks\the#2\from#1%
\appendtoks\the#2\to #1%
#2}
@@ -4582,19 +4585,19 @@
% \newtoks \neverypar
% \newtoks \neveryendpar
%
-% \normalprotected\def\syst_helpers_forgotten_endpar
+% \protected\def\syst_helpers_forgotten_endpar
% {\the\neveryendpar\normalpar}
%
-% \unexpanded\def\forgeteverypar
+% \protected\def\forgeteverypar
% {\everypar{\the\neverypar}%
% \let\endpar\syst_helpers_forgotten_endpar}
%
-% \unexpanded\def\finishpar
+% \protected\def\finishpar
% {\ifvmode\else\par\fi}
\newtoks \neverypar
-\unexpanded\def\forgeteverypar
+\protected\def\forgeteverypar
{\everypar{\the\neverypar}}
%D Which we're going to use indeed! When the second argument equals \type {\relax},
@@ -4660,10 +4663,10 @@
%D
%D Both commands accept the prefix \type{\doglobal} for global assignments.
-\unexpanded\def\convertvalue#1\to
+\protected\def\convertvalue#1\to
{\expandafter\convertcommand\csname#1\endcsname\to}
-\unexpanded\def\defconvertedvalue#1#2% less sensitive for \to
+\protected\def\defconvertedvalue#1#2% less sensitive for \to
{\expandafter\defconvertedcommand\expandafter#1\csname#2\endcsname}
%D \macros
@@ -4687,14 +4690,14 @@
\def\syst_helpers_check_if_assignment_else#1=#2#3^^^^0004{\if#2^^^^0003}%
\def\syst_helpers_check_else_assignment_if#1=#2#3^^^^0004{\unless\if#2^^^^0003}%
-\unexpanded\def\doifelseassignment#1%
+\protected\def\doifelseassignment#1%
{\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004%
\expandafter\secondoftwoarguments
\else
\expandafter\firstoftwoarguments
\fi}
-\unexpanded\def\doifelseassignmentcs#1#2#3%
+\protected\def\doifelseassignmentcs#1#2#3%
{\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004%
\expandafter#3%
\else
@@ -4706,7 +4709,7 @@
\newif\ifassignment
-\unexpanded\def\docheckassignment#1%
+\protected\def\docheckassignment#1%
{\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004%
\assignmentfalse
\else
@@ -4715,10 +4718,10 @@
%D These can be used for cases where we want less tracing noise.
-\unexpanded\def\validassignment#1%
+\protected\def\validassignment#1%
{\expandafter\syst_helpers_check_else_assignment_if\detokenize{#1}=^^^^0003^^^^0003^^^^0004}
-\unexpanded\def\novalidassignment#1%
+\protected\def\novalidassignment#1%
{\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004}
%D In \ETEX\ we can use \type {\detokenize} and gain some speed, but in general far
@@ -4726,16 +4729,16 @@
%D This macro is more robust than the pure \TEX\ one, something I found out when
%D primitives like \type {\jobname} were fed (or something undefined).
-\unexpanded\def\convertargument#1\to#2{\dodoglobal\edef#2{\detokenize{#1}}}
-\unexpanded\def\convertcommand #1\to#2{\dodoglobal\edef#2{\expandafter\detokenize\expandafter{#1}}} % hm, only second is also ok
+\protected\def\convertargument#1\to#2{\dodoglobal\edef#2{\detokenize{#1}}}
+\protected\def\convertcommand #1\to#2{\dodoglobal\edef#2{\expandafter\detokenize\expandafter{#1}}} % hm, only second is also ok
-\unexpanded\def\defconvertedargument #1#2{\edef#1{\detokenize{#2}}}
-\unexpanded\def\defconvertedcommand #1#2{\edef#1{\detokenize\expandafter{#2}}}
-\unexpanded\def\edefconvertedargument#1#2{\edef#1{#2}%
+\protected\def\defconvertedargument #1#2{\edef#1{\detokenize{#2}}}
+\protected\def\defconvertedcommand #1#2{\edef#1{\detokenize\expandafter{#2}}}
+\protected\def\edefconvertedargument#1#2{\edef#1{#2}%
\edef#1{\detokenize\expandafter{#1}}}
-\unexpanded\def\gdefconvertedargument#1#2{\xdef#1{\detokenize{#2}}}
-\unexpanded\def\gdefconvertedcommand #1#2{\xdef#1{\detokenize\expandafter{#2}}}
-\unexpanded\def\xdefconvertedargument#1#2{\xdef#1{#2}%
+\protected\def\gdefconvertedargument#1#2{\xdef#1{\detokenize{#2}}}
+\protected\def\gdefconvertedcommand #1#2{\xdef#1{\detokenize\expandafter{#2}}}
+\protected\def\xdefconvertedargument#1#2{\xdef#1{#2}%
\xdef#1{\detokenize\expandafter{#1}}}
%D When you try to convert a primitive command, you'll find out that the \ETEX\
@@ -4759,7 +4762,7 @@
%D
%D Ahandy macro, for testing purposes only:
-\unexpanded\def\showvalue#1%
+\protected\def\showvalue#1%
{\ifcsname#1\endcsname
\expandafter\show\csname#1\endcsname
\else
@@ -4779,7 +4782,7 @@
%D
%D Watch the one level expansion of the second argument.
-\unexpanded\def\doifelsemeaning#1#2%
+\protected\def\doifelsemeaning#1#2%
{\edef\m_syst_string_one{\normalmeaning#1}%
\def \m_syst_string_two{#2}%
\edef\m_syst_string_two{\normalmeaning\m_syst_string_two}%
@@ -4808,9 +4811,9 @@
\edef\m_syst_string_two{\detokenize\expandafter{\normalexpanded{#4}}}%
\ifx\m_syst_string_one\m_syst_string_two\expandafter#1\else\expandafter#2\fi}
-\unexpanded\def\doifelsesamestring{\syst_helpers_if_samestring_else\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifsamestring {\syst_helpers_if_samestring_else\firstofoneargument \gobbleoneargument }
-\unexpanded\def\doifnotsamestring {\syst_helpers_if_samestring_else\gobbleoneargument \firstofoneargument }
+\protected\def\doifelsesamestring{\syst_helpers_if_samestring_else\firstoftwoarguments\secondoftwoarguments}
+\protected\def\doifsamestring {\syst_helpers_if_samestring_else\firstofoneargument \gobbleoneargument }
+\protected\def\doifnotsamestring {\syst_helpers_if_samestring_else\gobbleoneargument \firstofoneargument }
\let\doifsamestringelse\doifelsesamestring
@@ -4838,7 +4841,7 @@
%D
%D In examples~2 and~3 both arguments equal, in~1 and~4 they differ.
-\unexpanded\def\ConvertToConstant#1#2#3%
+\protected\def\ConvertToConstant#1#2#3%
{\edef\m_syst_string_one{\expandafter\detokenize\expandafter{#2}}%
\edef\m_syst_string_two{\expandafter\detokenize\expandafter{#3}}%
#1{\m_syst_string_one}{\m_syst_string_two}}
@@ -4868,14 +4871,14 @@
%D
%D where \type {...} can be anything legally \TEX.
-\unexpanded\def\CheckConstantAfter#1#2%
+\protected\def\CheckConstantAfter#1#2%
{\expandafter\convertargument\v!prefix!\to\ascii
\convertargument#1\to#2\relax
\doifelseinstring\ascii{#2}
{\expandafter\convertargument#1\to#2}
{}}
-\unexpanded\def\ConvertConstantAfter#1#2#3%
+\protected\def\ConvertConstantAfter#1#2#3%
{\CheckConstantAfter{#2}\asciia
\CheckConstantAfter{#3}\asciib
#1{\asciia}{\asciib}}
@@ -4891,8 +4894,8 @@
%D
%D We don't explicitly test if the macro is defined.
-\unexpanded\def\assignifempty#1#2% can be sped up
- {\doifsomething{#1}{\def#1{#2}}} % {\doifnot{#1}{}{\def#1{#2}}}
+\protected\def\assignifempty#1#2% can be sped up
+ {\doifnothing{#1}{\def#1{#2}}}
%D \macros
%D {gobbleuntil,grabuntil,gobbleuntilrelax,
@@ -4904,7 +4907,7 @@
%D In \CONTEXT\ we use a lot of \type {\start}||\type {\stop} like constructions.
%D Sometimes, the \type {\stop} is used as a hard coded delimiter like in: %D
%D \starttyping
-%D \unexpanded\def\startcommand#1\stopcommand%
+%D \protected\def\startcommand#1\stopcommand%
%D {... #1 ...}
%D \stoptyping
%D
@@ -4922,7 +4925,7 @@
%D {\stop}. This means that:
%D
%D \starttyping
-%D \unexpanded\def\starthello%
+%D \protected\def\starthello%
%D {\grabuntil{stophello}\message}
%D
%D \starthello Hello world!\stophello
@@ -4932,10 +4935,10 @@
\let\syst_helpers_grab_indeed\relax
-\unexpanded\def\syst_helpers_grab#1#2%
+\protected\def\syst_helpers_grab#1#2%
{\def\syst_helpers_grab_indeed##1#1{#2{##1}}\syst_helpers_grab_indeed}
-\unexpanded\def\grabuntil#1%
+\protected\def\grabuntil#1%
{\expandafter\syst_helpers_grab\expandafter{\csname#1\endcsname}}
%D The next command build on this mechanism:
@@ -4962,15 +4965,21 @@
\let\syst_helpers_gobble_indeed\relax
-\unexpanded\def\processbetween#1#2%
+\protected\def\processbetween#1#2%
{\setvalue{\s!start#1}{\grabuntil{\s!stop#1}{#2}}}
-\unexpanded\def\gobbleuntil#1%
+\protected\def\gobbleuntil#1%
{\def\syst_helpers_gobble_indeed##1#1{}\syst_helpers_gobble_indeed}
-\unexpanded\def\gobbleuntilrelax#1\relax
+\protected\def\gobbleuntilrelax#1\relax
{}
+% experimental
+
+\protected\def\gobblenested#1#2#3%
+ {\normalexpanded{\def\noexpand\next##1\csname#2\endcsname}{\csname#3\endcsname}%
+ \next}%
+
%D The next one simply expands the pickup up tokens.
%D
%D \starttyping
@@ -4979,7 +4988,7 @@
\let\syst_helpers_until_indeed\relax
-\unexpanded\def\processuntil#1%
+\protected\def\processuntil#1%
{\def\syst_helpers_until_indeed##1#1{##1}\syst_helpers_until_indeed}
%D \macros
@@ -5051,14 +5060,14 @@
% keep:
%
-% \unexpanded\def\syst_helpers_handle_group_normal#1#2%
+% \protected\def\syst_helpers_handle_group_normal#1#2%
% {\bgroup
% \def\m_syst_helpers_handle_group_before{\bgroup#1\bgroup\aftergroup\m_syst_helpers_handle_group_after}% can't we remove the second \bgroup
% \def\m_syst_helpers_handle_group_after {#2\egroup\egroup}% and one \egroup here?
% \afterassignment\m_syst_helpers_handle_group_before
% \let\next=}
-% \unexpanded\def\syst_helpers_handle_group_normal#1#2%
+% \protected\def\syst_helpers_handle_group_normal#1#2%
% {\bgroup
% \def\m_syst_helpers_handle_group_before{#1}%
% \def\m_syst_helpers_handle_group_after {#2}%
@@ -5076,7 +5085,7 @@
% \egroup
% \egroup}
%
-% \unexpanded\def\syst_helpers_handle_group_simple#1#2% no inner group (so no kerning interference)
+% \protected\def\syst_helpers_handle_group_simple#1#2% no inner group (so no kerning interference)
% {\bgroup
% \def\m_syst_helpers_handle_group_before{#1}%
% \def\m_syst_helpers_handle_group_after {#2}%
@@ -5092,7 +5101,7 @@
% {\m_syst_helpers_handle_group_after
% \egroup}%
%
-% \unexpanded\def\syst_helpers_handle_group_pickup#1#2#3% no inner group (so no kerning interference)
+% \protected\def\syst_helpers_handle_group_pickup#1#2#3% no inner group (so no kerning interference)
% {\bgroup
% \def\m_syst_helpers_handle_group_before{#1}%
% \def\m_syst_helpers_handle_group_after {#2\egroup#3}%
@@ -5104,7 +5113,7 @@
% \aftergroup\m_syst_helpers_handle_group_after
% \m_syst_helpers_handle_group_before}
%
-% \unexpanded\def\syst_helpers_handle_group_nop
+% \protected\def\syst_helpers_handle_group_nop
% {\ifnum\currentgrouptype=\semisimplegroupcode
% \expandafter\syst_helpers_handle_group_nop_a
% \else
@@ -5123,7 +5132,7 @@
% \aftergroup\m_syst_helpers_handle_group_after
% #1}
-\unexpanded\def\syst_helpers_handle_group_nop
+\protected\def\syst_helpers_handle_group_nop
{\ifnum\currentgrouptype=\semisimplegroupcode
\expandafter\syst_helpers_handle_group_nop_a
\else
@@ -5142,7 +5151,7 @@
\aftergroup\egroup
\m_syst_helpers_handle_group_b}
-\unexpanded\def\syst_helpers_handle_group_normal
+\protected\def\syst_helpers_handle_group_normal
{\bgroup
\afterassignment\m_syst_helpers_handle_group_normal_before
\let\next=}
@@ -5155,7 +5164,7 @@
\aftergroup\egroup
\aftergroup\egroup}
-\unexpanded\def\syst_helpers_handle_group_simple% no inner group (so no kerning interference)
+\protected\def\syst_helpers_handle_group_simple% no inner group (so no kerning interference)
{\bgroup
\afterassignment\m_syst_helpers_handle_group_simple_before
\let\next=}
@@ -5169,7 +5178,7 @@
{\m_syst_helpers_handle_group_a
\egroup}%
-\unexpanded\def\syst_helpers_handle_group_pickup% no inner group (so no kerning interference)
+\protected\def\syst_helpers_handle_group_pickup% no inner group (so no kerning interference)
{\bgroup
\afterassignment\m_syst_helpers_handle_group_pickup_before
\let\next=}
@@ -5181,7 +5190,7 @@
\aftergroup\m_syst_helpers_handle_group_p
\m_syst_helpers_handle_group_b}
-\unexpanded\def\syst_helpers_handle_group_nop_x
+\protected\def\syst_helpers_handle_group_nop_x
{\ifnum\currentgrouptype=\semisimplegroupcode
\begingroup
\aftergroup\endgroup
@@ -5191,7 +5200,7 @@
\fi
\m_syst_helpers_handle_group_b}
-\unexpanded\def\syst_helpers_handle_group_normal_x
+\protected\def\syst_helpers_handle_group_normal_x
{\bgroup
\afterassignment\m_syst_helpers_handle_group_normal_before_x
\let\next=}
@@ -5214,50 +5223,50 @@
%D {\futurelet} obeys blank spaces, and a line||ending token is treated as a blank
%D space. So the final implementation became:
-% \unexpanded\def\groupedcommand#1#2%
+% \protected\def\groupedcommand#1#2%
% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
%
-% \unexpanded\def\groupedcommandcs#1#2%
+% \protected\def\groupedcommandcs#1#2%
% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
%
-% \unexpanded\def\triggergroupedcommand#1%
+% \protected\def\triggergroupedcommand#1%
% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{}}{\syst_helpers_handle_group_nop{#1}{}}}
%
-% \unexpanded\def\triggergroupedcommandcs#1%
+% \protected\def\triggergroupedcommandcs#1%
% {\doifelsenextbgroup{\syst_helpers_handle_group_normal{#1}{}}{\syst_helpers_handle_group_nop{#1}{}}}
%
-% \unexpanded\def\simplegroupedcommand#1#2%
+% \protected\def\simplegroupedcommand#1#2%
% {\doifelsenextbgroup{\syst_helpers_handle_group_simple{#1}{#2}}{\syst_helpers_handle_group_nop{#1}{#2}}}
%
-% \unexpanded\def\pickupgroupedcommand#1#2#3%
+% \protected\def\pickupgroupedcommand#1#2#3%
% {\doifelsenextbgroup{\syst_helpers_handle_group_pickup{#1}{#2}{#3}}{\syst_helpers_handle_group_nop{#1}{#2}}}
-\unexpanded\def\groupedcommand#1#2%
+\protected\def\groupedcommand#1#2%
{\def\m_syst_helpers_handle_group_b{#1}%
\def\m_syst_helpers_handle_group_a{#2}%
\doifelsenextbgroupcs\syst_helpers_handle_group_normal\syst_helpers_handle_group_nop}
-\unexpanded\def\groupedcommandcs#1#2%
+\protected\def\groupedcommandcs#1#2%
{\let\m_syst_helpers_handle_group_b#1%
\let\m_syst_helpers_handle_group_a#2%
\doifelsenextbgroupcs\syst_helpers_handle_group_normal\syst_helpers_handle_group_nop}
-\unexpanded\def\simplegroupedcommand#1#2%
+\protected\def\simplegroupedcommand#1#2%
{\def\m_syst_helpers_handle_group_b{#1}%
\def\m_syst_helpers_handle_group_a{#2}%
\doifelsenextbgroupcs\syst_helpers_handle_group_simple\syst_helpers_handle_group_nop}
-\unexpanded\def\pickupgroupedcommand#1#2#3%
+\protected\def\pickupgroupedcommand#1#2#3%
{\def\m_syst_helpers_handle_group_b{#1}%
\def\m_syst_helpers_handle_group_a{#2}%
\def\m_syst_helpers_handle_group_p{#3}%
\doifelsenextbgroupcs\syst_helpers_handle_group_pickup\syst_helpers_handle_group_nop}
-\unexpanded\def\triggergroupedcommand#1%
+\protected\def\triggergroupedcommand#1%
{\def\m_syst_helpers_handle_group_b{#1}%
\doifelsenextbgroupcs\syst_helpers_handle_group_normal_x\syst_helpers_handle_group_nop_x}
-\unexpanded\def\triggergroupedcommandcs#1%
+\protected\def\triggergroupedcommandcs#1%
{\let\m_syst_helpers_handle_group_b#1%
\doifelsenextbgroupcs\syst_helpers_handle_group_normal_x\syst_helpers_handle_group_nop_x}
@@ -5286,10 +5295,10 @@
%D The user is warned with the suggestion to use \type {CAPITALS}. This suggestion
%D is feasible, because \CONTEXT only defines lowcased macros.
-\unexpanded\def\showdefinederror#1#2%
+\protected\def\showdefinederror#1#2%
{\writestatus\m!system{#1 #2 replaces a macro, use CAPITALS!}}
-\unexpanded\def\checkdefined#1#2#3%
+\protected\def\checkdefined#1#2#3%
{\doifdefined{#3}{\showdefinederror{#2}{#3}}}
%D \macros
@@ -5344,25 +5353,29 @@
\newtoks\BeforePar
\newtoks\AfterPar
-\def\redowithpar\par
+\protected\def\redowithpar\par
{\doifelsenextchar\par\redowithpar\dodowithpar}%
-\def\dowithpar#1#2%
+\protected\def\dowithpar#1#2%
{\def\dodowithpar##1\par{#1##1#2}%
\redowithpar\par}
-\def\redogotopar\par
+\protected\def\redogotopar\par
{\doifelsenextchar\par\redogotopar\dodogotopar}%
-\def\dogotopar#1%
+\protected\def\dogotopar#1%
{\def\dodogotopar{#1}%
\redogotopar\par}
-\def\dogotoparcs#1%
+\protected\def\dogotoparcs#1%
{\let\dodogotopar#1%
\redogotopar\par}
-\unexpanded\def\GetPar
+\ifdefined \ignorepars \else
+ \protected\def\ignorepars{\dogotoparcs\relax}
+\fi
+
+\protected\def\GetPar
{\expanded
{\dowithpar
{\the\BeforePar
@@ -5371,7 +5384,7 @@
\BeforePar\emptytoks
\AfterPar\emptytoks}}}
-\unexpanded\def\GotoPar
+\protected\def\GotoPar
{\expanded
{\dogotopar
{\the\BeforePar
@@ -5410,7 +5423,7 @@
\let\syst_helpers_next_par\relax
\let\syst_helpers_next_arg\relax
-\unexpanded\def\dowithpargument#1%
+\protected\def\dowithpargument#1%
{\def\syst_helpers_next_par##1 \par{#1{##1}}%
\def\syst_helpers_next_arg##1{#1{##1}}%
\doifelsenextbgroup\syst_helpers_next_arg{\doifelsenextchar\par{#1{}}\syst_helpers_next_par}}
@@ -5438,7 +5451,7 @@
\let\syst_helpers_next_war\relax
\let\syst_helpers_next_arg\relax
-\unexpanded\def\dowithwargument#1%
+\protected\def\dowithwargument#1%
{\def\syst_helpers_next_war##1 {#1{##1}}%
\def\syst_helpers_next_arg##1{#1{##1}}%
\doifelsenextbgroup\syst_helpers_next_arg\syst_helpers_next_war}
@@ -5472,7 +5485,7 @@
%D commands, the \type {n*} is optional. When this specification is missing, the
%D command executes once.
-\unexpanded\def\dorepeatwithcommand[#1]%
+\protected\def\dorepeatwithcommand[#1]%
{\syst_helpers_repeat_with_command#1*\empty*\relax}
\def\syst_helpers_repeat_with_command#1*#2#3*#4\relax#5%
@@ -5563,10 +5576,10 @@
% no longer \def but \let to target toks .. the space gobbling \relax will go
-% \unexpanded\def\appendtoks {\syst_helpers_append_toks \relax}
-% \unexpanded\def\prependtoks {\syst_helpers_prepend_toks \relax}
-% \unexpanded\def\appendtoksonce {\syst_helpers_append_toks_once \relax}
-% \unexpanded\def\prependtoksonce{\syst_helpers_prepend_toks_once\relax}
+% \protected\def\appendtoks {\syst_helpers_append_toks \relax}
+% \protected\def\prependtoks {\syst_helpers_prepend_toks \relax}
+% \protected\def\appendtoksonce {\syst_helpers_append_toks_once \relax}
+% \protected\def\prependtoksonce{\syst_helpers_prepend_toks_once\relax}
%
% \def\syst_helpers_append_toks_indeed
% {\dodoglobal\m_syst_helpers_scratch\doubleexpandafter{\expandafter\the\expandafter\m_syst_helpers_scratch\the\t_syst_helpers_scratch}}
@@ -5598,13 +5611,13 @@
% \donothing
% \syst_helpers_prepend_toks_indeed}
-% \unexpanded\def\appendtoks#1\to#2%
+% \protected\def\appendtoks#1\to#2%
% {\toksapp#2{#1}%
% \ifx\dodoglobal\relax\else
% \dodoglobal#2#2%
% \fi}
%
-% \unexpanded\def\prependtoks#1\to#2%
+% \protected\def\prependtoks#1\to#2%
% {\tokspre#2{#1}%
% \ifx\dodoglobal\relax\else
% \dodoglobal#2#2%
@@ -5622,7 +5635,7 @@
% \dodoglobal\m_syst_helpers_scratch\m_syst_helpers_scratch
% \fi}
-\unexpanded\def\appendtoks#1\to#2%
+\protected\def\appendtoks#1\to#2%
{\ifx\dodoglobal\relax
\expandafter\toksapp
\else
@@ -5630,7 +5643,7 @@
\expandafter\gtoksapp
\fi#2{#1}}
-\unexpanded\def\prependtoks#1\to#2%
+\protected\def\prependtoks#1\to#2%
{\ifx\dodoglobal\relax
\expandafter\tokspre
\else
@@ -5654,14 +5667,14 @@
\expandafter\gtokspre
\fi\m_syst_helpers_scratch\t_syst_helpers_scratch}
-\unexpanded\def\appendtoksonce#1\to#2%
+\protected\def\appendtoksonce#1\to#2%
{\let\m_syst_helpers_scratch#2%
\t_syst_helpers_scratch{#1}%
\doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
\donothing
\syst_helpers_append_toks_indeed}
-\unexpanded\def\prependtoksonce#1\to#2%
+\protected\def\prependtoksonce#1\to#2%
{\let\m_syst_helpers_scratch#2%
\t_syst_helpers_scratch{#1}%
\doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
@@ -5670,7 +5683,7 @@
%D The test macro:
-\unexpanded\def\doifelseintoks#1#2% #1 en #2 zijn toks
+\protected\def\doifelseintoks#1#2% #1 en #2 zijn toks
{\edef\asciia{\detokenize\expandafter{\the#1}}%
\edef\asciib{\detokenize\expandafter{\the#2}}%
\doifelsestringinstring\asciia\asciib}
@@ -5698,14 +5711,14 @@
\newtoks \collectingtoks
-\unexpanded\def\startcollect #1\stopcollect {\toksapp \collectingtoks{#1}}
-\unexpanded\def\startexpandedcollect#1\stopexpandedcollect{\etoksapp\collectingtoks{#1}}
+\protected\def\startcollect #1\stopcollect {\toksapp \collectingtoks{#1}}
+\protected\def\startexpandedcollect#1\stopexpandedcollect{\etoksapp\collectingtoks{#1}}
-\unexpanded\def\startcollecting{\collectingtoks\emptytoks}
-\unexpanded\def\stopcollecting {\the\collectingtoks}
+\protected\def\startcollecting{\collectingtoks\emptytoks}
+\protected\def\stopcollecting {\the\collectingtoks}
-\unexpanded\def\collect {\toksapp \collectingtoks}
-\unexpanded\def\collectexpanded{\etoksapp\collectingtoks}
+\protected\def\collect {\toksapp \collectingtoks}
+\protected\def\collectexpanded{\etoksapp\collectingtoks}
%D A nice one too:
@@ -5715,7 +5728,7 @@
% {\scratchtoks{xaa} \removetoks x\from\scratchtoks [\the\scratchtoks]}
% {\scratchtoks{a\relax b} \removetoks \relax\from\scratchtoks [\showthe\scratchtoks]}
-\unexpanded\def\removetoks#1\from#2%
+\protected\def\removetoks#1\from#2%
{\def\syst_helpers_remove_toks##1#1##2\empty\empty\empty##3^^^^0004%
{\def\m_syst_string_one{##3}%
\ifx\m_syst_string_one\empty#2{##1}\else#2{##1##2}\fi}%
@@ -5723,22 +5736,22 @@
%D Also:
-% \unexpanded\def\appendetoks #1\to{\normalexpanded{\appendtoks #1}\to}
-% \unexpanded\def\prependetoks#1\to{\normalexpanded{\prependtoks#1}\to}
+% \protected\def\appendetoks #1\to{\normalexpanded{\appendtoks #1}\to}
+% \protected\def\prependetoks#1\to{\normalexpanded{\prependtoks#1}\to}
-% \unexpanded\def\appendetoks#1\to#2%
+% \protected\def\appendetoks#1\to#2%
% {\etoksapp#2{#1}%
% \ifx\dodoglobal\relax\else
% \global#2#2%
% \fi}
%
-% \unexpanded\def\prependetoks#1\to#2%
+% \protected\def\prependetoks#1\to#2%
% {\etokspre#2{#1}%
% \ifx\dodoglobal\relax\else
% \global#2#2%
% \fi}
-\unexpanded\def\appendetoks#1\to#2%
+\protected\def\appendetoks#1\to#2%
{\ifx\dodoglobal\relax
\expandafter\etoksapp
\else
@@ -5746,7 +5759,7 @@
\expandafter\xtoksapp
\fi#2{#1}}
-\unexpanded\def\prependetoks#1\to#2%
+\protected\def\prependetoks#1\to#2%
{\ifx\dodoglobal\relax
\expandafter\etokspre
\else
@@ -5756,7 +5769,7 @@
%D Hm.
-\unexpanded\def\flushtoks#1% nb: can reassign to #1 again, hence the indirectness
+\protected\def\flushtoks#1% nb: can reassign to #1 again, hence the indirectness
{\t_syst_helpers_scratch#1\relax
\dodoglobal#1\emptytoks
\the\t_syst_helpers_scratch\relax}
@@ -5783,12 +5796,12 @@
\let\syst_helpers_split_string\relax
-\unexpanded\def\beforesplitstring#1\at#2\to#3%
+\protected\def\beforesplitstring#1\at#2\to#3%
{\def\syst_helpers_split_string##1#2##2#2##3\\%
{\def#3{##1}}%
\expandafter\syst_helpers_split_string#1#2#2\\}
-\unexpanded\def\aftersplitstring#1\at#2\to#3%
+\protected\def\aftersplitstring#1\at#2\to#3%
{\def\syst_helpers_split_string##1#2##2@@@##3\\%
{\def#3{##2}}%
\expandafter\syst_helpers_split_string#1@@@#2@@@\\}
@@ -5798,7 +5811,7 @@
%D
%D A bonus macro.
-\unexpanded\def\splitstring#1\at#2\to#3\and#4%
+\protected\def\splitstring#1\at#2\to#3\and#4%
{\def\syst_helpers_split_string##1#2##2\empty\empty\empty##3\\%
{\def#3{##1}%
\def\syst_helpers_split_string{##3}%
@@ -5809,7 +5822,7 @@
\fi}%
\expandafter\syst_helpers_split_string#1\empty\empty\empty#2\empty\empty\empty\\}
-\unexpanded\def\greedysplitstring#1\at#2\to#3\and#4%
+\protected\def\greedysplitstring#1\at#2\to#3\and#4%
{\edef\asciib{#1}%
\let\asciic\asciib
\let#3\empty
@@ -5831,12 +5844,12 @@
%D aftertestandsplitstring,
%D testandsplitstring}
-\unexpanded\def\beforetestandsplitstring#1\at#2\to#3%
+\protected\def\beforetestandsplitstring#1\at#2\to#3%
{\def\syst_helpers_split_string##1#2##2#2##3##4\\%
{\ifx##3\empty\let#3\empty\else\def#3{##1}\fi}%
\expandafter\syst_helpers_split_string#1#2#2\empty\\}
-\unexpanded\def\aftertestandsplitstring#1\at#2\to#3%
+\protected\def\aftertestandsplitstring#1\at#2\to#3%
{\def\syst_helpers_split_string ##1#2##2@@@##3##4\\%
{\ifx##3\empty\let#3\empty\else\def#3{##2}\fi}%
\expandafter\syst_helpers_split_string #1@@@#2@@@\empty\\}
@@ -5853,17 +5866,17 @@
%D splitatcolon,
%D splitatcolons}
-\unexpanded\def\splitatperiod #1{\normalexpanded{\syst_helpers_splitatperiod #1}..\relax}
-\unexpanded\def\splitatcomma #1{\normalexpanded{\syst_helpers_splitatcomma #1},,\relax} % not at ", "
-\unexpanded\def\splitatasterisk#1{\normalexpanded{\syst_helpers_splitatasterisk#1}**\relax}
-\unexpanded\def\splitatcolon #1{\normalexpanded{\syst_helpers_splitatcolon #1}::\relax}
-\unexpanded\def\splitatcolons #1{\normalexpanded{\syst_helpers_splitatcolons #1}::::\relax}
+\protected\def\splitatperiod #1{\normalexpanded{\syst_helpers_splitatperiod #1}..\relax}
+\protected\def\splitatcomma #1{\normalexpanded{\syst_helpers_splitatcomma #1},,\relax} % not at ", "
+\protected\def\splitatasterisk#1{\normalexpanded{\syst_helpers_splitatasterisk#1}**\relax}
+\protected\def\splitatcolon #1{\normalexpanded{\syst_helpers_splitatcolon #1}::\relax}
+\protected\def\splitatcolons #1{\normalexpanded{\syst_helpers_splitatcolons #1}::::\relax}
-\unexpanded\def\syst_helpers_splitatperiod #1.#2.#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatcomma #1,#2,#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatasterisk #1*#2*#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatcolon #1:#2:#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatcolons #1::#2::#3\relax#4#5{\edef#4{#1}\edef#5{#2}}
+\protected\def\syst_helpers_splitatperiod #1.#2.#3\relax#4#5{\def#4{#1}\def#5{#2}}
+\protected\def\syst_helpers_splitatcomma #1,#2,#3\relax#4#5{\def#4{#1}\def#5{#2}}
+\protected\def\syst_helpers_splitatasterisk #1*#2*#3\relax#4#5{\def#4{#1}\def#5{#2}}
+\protected\def\syst_helpers_splitatcolon #1:#2:#3\relax#4#5{\def#4{#1}\def#5{#2}}
+\protected\def\syst_helpers_splitatcolons #1::#2::#3\relax#4#5{\edef#4{#1}\edef#5{#2}}
%D \macros
%D {removesubstring}
@@ -5876,7 +5889,7 @@
%D
%D Which in terms of \TEX\ looks like:
-\unexpanded\def\removesubstring#1\from#2\to#3%
+\protected\def\removesubstring#1\from#2\to#3%
{\splitstring#2\to\m_syst_string_one\and\m_syst_string_two
\dodoglobal#3{\m_syst_string_one\m_syst_string_two}}
@@ -5933,36 +5946,36 @@
%D
%D The faster alternatives are:
-\unexpanded\def\appendtocommalist#1#2%
+\protected\def\appendtocommalist#1#2%
{\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}
-\unexpanded\def\prependtocommalist#1#2%
+\protected\def\prependtocommalist#1#2%
{\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}
-\unexpanded\def\addtocommalist#1#2% {item} \cs
+\protected\def\addtocommalist#1#2% {item} \cs
{\rawdoifelseinset{#1}#2\resetglobal
{\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}}
-\unexpanded\def\pretocommalist#1#2% {item} \cs
+\protected\def\pretocommalist#1#2% {item} \cs
{\rawdoifelseinset{#1}#2\resetglobal
{\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}}
-\unexpanded\def\robustdoifelseinset#1#2%
+\protected\def\robustdoifelseinset#1#2%
{\edef\m_syst_string_one{\detokenize\expandafter{\normalexpanded{#1}}}%
\edef\m_syst_string_two{\detokenize\expandafter{\normalexpanded{#2}}}%
\rawdoifelseinset\m_syst_string_one\m_syst_string_two}
\let\robustdoifinsetelse\robustdoifelseinset
-\unexpanded\def\robustaddtocommalist#1#2% {item} \cs
+\protected\def\robustaddtocommalist#1#2% {item} \cs
{\robustdoifelseinset{#1}#2\resetglobal
{\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}}
-\unexpanded\def\robustpretocommalist#1#2% {item} \cs
+\protected\def\robustpretocommalist#1#2% {item} \cs
{\robustdoifelseinset{#1}#2\resetglobal
{\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}}
-\unexpanded\def\xsplitstring#1#2% \cs {str}
+\protected\def\xsplitstring#1#2% \cs {str}
{\def\syst_helpers_split_string##1,#2,##2,#2,##3\\%
{\edef\m_syst_string_one{\bcleanedupcommalist##1\empty\empty\relax}%
\edef\m_syst_string_two{\acleanedupcommalist##2,,\relax}}%
@@ -5972,7 +5985,7 @@
\def\bcleanedupcommalist#1#2\relax{\if#1,\else#1\fi#2}
\def\acleanedupcommalist#1,,#2\relax{#1}
-\unexpanded\def\removefromcommalist#1#2% to be sped up
+\protected\def\removefromcommalist#1#2% to be sped up
{\rawdoifelseinset{#1}#2%
{\normalexpanded{\xsplitstring\noexpand#2{#1}}%
\dodoglobal\edef#2%
@@ -5983,10 +5996,10 @@
\fi}}
\resetglobal}
-% \unexpanded\def\addtocommalist#1#2% upto 3 times slower
+% \protected\def\addtocommalist#1#2% upto 3 times slower
% {\dodoglobal\edef#2{\ctxcommand{addtocommalist(\!!bs#1\!!es,\!!bs#2\!!es)}}}
%
-% \unexpanded\def\removefromcommalist#1#2% faster and more robust
+% \protected\def\removefromcommalist#1#2% faster and more robust
% {\dodoglobal\edef#2{\ctxcommand{addtocommalist(\!!bs#1\!!es,\!!bs#2\!!es)}}}
%D \macros
@@ -6008,7 +6021,7 @@
\edef\m_syst_string_four{\ifx\m_syst_string_four\empty\else\m_syst_string_four,\fi#1}%
\fi}
-\unexpanded\def\substituteincommalist#1#2#3% old, new, list (slooow)
+\protected\def\substituteincommalist#1#2#3% old, new, list (slooow)
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#2}%
\let\m_syst_string_four\empty
@@ -6071,7 +6084,7 @@
\fi
\advance\commalistcounter\plusone}
-\unexpanded\def\replaceincommalist#1#2% #1 = commalistelement #2 = position starts at 1
+\protected\def\replaceincommalist#1#2% #1 = commalistelement #2 = position starts at 1
{\c_syst_helpers_comma_list_index#2\relax
\let\m_syst_helpers_comma_list_target\empty
\let\commalistelement\empty
@@ -6095,7 +6108,7 @@
\expandafter\syst_helpers_comma_list_command_global_step
\fi}
-\unexpanded\def\globalprocesscommalist[#1]#2%
+\protected\def\globalprocesscommalist[#1]#2%
{\glet\m_syst_helpers_comma_list_command_global#2%
\expandafter\syst_helpers_comma_list_command_global_step#1,],}
@@ -6142,23 +6155,26 @@
\def\numberofpoints #1{\the\numexpr\dimexpr#1\relax/\maxcard\relax}
%D \macros
-%D {swapdimens,swapcounts,swapmacros,
+%D {swapdimens,swapskips,swapcounts,swapmacros,
%D globalswapdimens,globalswapcounts,globalswapmacros}
%D
%D Simple but effective are the next two macros. There name exactly states their
%D purpose.
\newdimen\d_syst_helpers_swapped
+\newskip \s_syst_helpers_swapped
\newcount\c_syst_helpers_swapped
\let \m_syst_helpers_swapped\relax
-\unexpanded\def\swapdimens#1#2{\d_syst_helpers_swapped #1\relax#1#2\relax#2\d_syst_helpers_swapped}
-\unexpanded\def\swapcounts#1#2{\c_syst_helpers_swapped #1\relax#1#2\relax#2\c_syst_helpers_swapped}
-\unexpanded\def\swapmacros#1#2{\let\m_syst_helpers_swapped#1\let #1#2\let #2\m_syst_helpers_swapped}
+\protected\def\swapdimens#1#2{\d_syst_helpers_swapped #1\relax#1#2\relax#2\d_syst_helpers_swapped}
+\protected\def\swapskips #1#2{\s_syst_helpers_swapped #1\relax#1#2\relax#2\s_syst_helpers_swapped}
+\protected\def\swapcounts#1#2{\c_syst_helpers_swapped #1\relax#1#2\relax#2\c_syst_helpers_swapped}
+\protected\def\swapmacros#1#2{\let\m_syst_helpers_swapped#1\let #1#2\let #2\m_syst_helpers_swapped}
-\unexpanded\def\globalswapdimens#1#2{\d_syst_helpers_swapped #1\global#1#2\global#2\d_syst_helpers_swapped}
-\unexpanded\def\globalswapcounts#1#2{\c_syst_helpers_swapped #1\global#1#2\global#2\c_syst_helpers_swapped}
-\unexpanded\def\globalswapmacros#1#2{\let\m_syst_helpers_swapped#1\glet #1#2\glet #2\m_syst_helpers_swapped}
+\protected\def\globalswapdimens#1#2{\d_syst_helpers_swapped #1\global#1#2\global#2\d_syst_helpers_swapped}
+\protected\def\globalswapskips #1#2{\s_syst_helpers_swapped #1\global#1#2\global#2\s_syst_helpers_swapped}
+\protected\def\globalswapcounts#1#2{\c_syst_helpers_swapped #1\global#1#2\global#2\c_syst_helpers_swapped}
+\protected\def\globalswapmacros#1#2{\let\m_syst_helpers_swapped#1\glet #1#2\glet #2\m_syst_helpers_swapped}
%D \macros
%D {pushmacro,popmacro}
@@ -6177,7 +6193,7 @@
% \let\m_syst_helpers_push_macro\empty
%
-% \unexpanded\def\globalpushmacro#1%
+% \protected\def\globalpushmacro#1%
% {\xdef\m_syst_helpers_push_macro{\string#1}%
% \ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \else
% \expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
@@ -6185,12 +6201,12 @@
% \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
% \expandafter\glet\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
%
-% \unexpanded\def\globalpopmacro#1%
+% \protected\def\globalpopmacro#1%
% {\xdef\m_syst_helpers_push_macro{\string#1}%
% \expandafter\glet\expandafter#1\csname\the\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
% \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname \minusone}
%
-% \unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup
+% \protected\def\localpushmacro#1% this one can be used to push a value over an \egroup
% {\xdef\m_syst_helpers_push_macro{\string#1}%
% \ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \else
% \expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
@@ -6198,7 +6214,7 @@
% \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \plusone
% \expandafter\glet\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname#1}
%
-% \unexpanded\def\localpopmacro#1%
+% \protected\def\localpopmacro#1%
% {\xdef\m_syst_helpers_push_macro{\string#1}%
% \expandafter\let\expandafter#1\csname\the\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\m_syst_helpers_push_macro\endcsname
% \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname \minusone }
@@ -6222,7 +6238,7 @@
{\expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
\global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\plusone}
-\unexpanded\def\globalpushmacro#1%
+\protected\def\globalpushmacro#1%
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
\ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
\global\advance\lastnamedcs\plusone
@@ -6231,7 +6247,7 @@
\fi
\expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
-\unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup
+\protected\def\localpushmacro#1% this one can be used to push a value over an \egroup
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
\ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
\global\advance\lastnamedcs\plusone
@@ -6240,13 +6256,13 @@
\fi
\expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
-\unexpanded\def\globalpopmacro#1%
+\protected\def\globalpopmacro#1%
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
\c_syst_helpers_pop_count\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
\global\advance\lastnamedcs \minusone
\expandafter\glet\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
-\unexpanded\def\localpopmacro#1%
+\protected\def\localpopmacro#1%
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
\c_syst_helpers_pop_count\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
\global\advance\lastnamedcs \minusone
@@ -6273,7 +6289,7 @@
\newdimen\localhsize
-\unexpanded\def\setlocalhsize % don't change !
+\protected\def\setlocalhsize % don't change !
{\doifelsenextoptional
\syst_helpers_set_local_hsize_yes
\syst_helpers_set_local_hsize_nop}
@@ -6309,7 +6325,7 @@
%D three tokens per call. Anyone familiar with the not||values ones, can derive
%D their meaning from the definitions.
-\unexpanded\def\doifvalue#1#2%
+\protected\def\doifvalue#1#2%
{\edef\m_syst_string_one{\csname#1\endcsname}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -6318,7 +6334,7 @@
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotvalue#1#2%
+\protected\def\doifnotvalue#1#2%
{\edef\m_syst_string_one{\csname#1\endcsname}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -6327,7 +6343,7 @@
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifelsevalue#1#2%
+\protected\def\doifelsevalue#1#2%
{\edef\m_syst_string_one{\csname#1\endcsname}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -6336,7 +6352,7 @@
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifnothing#1%
+\protected\def\doifnothing#1%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\firstofoneargument
@@ -6344,7 +6360,7 @@
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifsomething#1%
+\protected\def\doifsomething#1%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\gobbleoneargument
@@ -6352,7 +6368,7 @@
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifelsenothing#1%
+\protected\def\doifelsenothing#1%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\firstoftwoarguments
@@ -6360,7 +6376,7 @@
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifelsesomething#1%
+\protected\def\doifelsesomething#1%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty
\expandafter\secondoftwoarguments
@@ -6368,7 +6384,7 @@
\expandafter\firstoftwoarguments
\fi}
-\unexpanded\def\doifvaluenothing#1%
+\protected\def\doifvaluenothing#1%
{\edef\m_syst_string_one{\csname#1\endcsname}%
\ifx\m_syst_string_one\empty
\expandafter\firstofoneargument
@@ -6376,7 +6392,7 @@
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifvaluesomething#1%
+\protected\def\doifvaluesomething#1%
{\edef\m_syst_string_one{\csname#1\endcsname}%
\ifx\m_syst_string_one\empty
\expandafter\gobbleoneargument
@@ -6384,7 +6400,7 @@
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifelsevaluenothing#1%
+\protected\def\doifelsevaluenothing#1%
{\edef\m_syst_string_one{\csname#1\endcsname}%
\ifx\m_syst_string_one\empty
\expandafter\firstoftwoarguments
@@ -6439,9 +6455,9 @@
\processcommalist[#3]\syst_helpers_do_common_check_all
\ifdone\expandafter#1\else\expandafter#2\fi}
-\unexpanded\def\doifelseallcommon{\syst_helpers_do_if_all_common_else\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifallcommon {\syst_helpers_do_if_all_common_else\firstofonearguments\gobbleoneargument }
-\unexpanded\def\doifnotallcommon {\syst_helpers_do_if_all_common_else\gobbleoneargument \firstofonearguments }
+\protected\def\doifelseallcommon{\syst_helpers_do_if_all_common_else\firstoftwoarguments\secondoftwoarguments}
+\protected\def\doifallcommon {\syst_helpers_do_if_all_common_else\firstofonearguments\gobbleoneargument }
+\protected\def\doifnotallcommon {\syst_helpers_do_if_all_common_else\gobbleoneargument \firstofonearguments }
\let\doifallcommonelse\doifelseallcommon
@@ -6464,38 +6480,38 @@
%D These might end up as \LUA based helpers (i.e. consider these
%D obsolete:
-\unexpanded\def\syst_helpers_do_IF#1#2%
+\protected\def\syst_helpers_do_IF#1#2%
{\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\syst_helpers_do_IF_NOT#1#2%
+\protected\def\syst_helpers_do_IF_NOT#1#2%
{\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\syst_helpers_do_IF_ELSE#1#2%
+\protected\def\syst_helpers_do_IF_ELSE#1#2%
{\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\syst_helpers_do_IF_INSTRING_ELSE#1#2%
+\protected\def\syst_helpers_do_IF_INSTRING_ELSE#1#2%
{\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\DOIF #1#2{\normalexpanded{\syst_helpers_do_IF {#1}{#2}}}% will become obsolete
-\unexpanded\def\DOIFNOT #1#2{\normalexpanded{\syst_helpers_do_IF_NOT {#1}{#2}}}% will become obsolete
-\unexpanded\def\DOIFELSE #1#2{\normalexpanded{\syst_helpers_do_IF_ELSE {#1}{#2}}}% will become obsolete
-\unexpanded\def\DOIFINSTRINGELSE #1#2{\normalexpanded{\syst_helpers_do_IF_INSTRING_ELSE{#1}{#2}}}% will become obsolete
+\protected\def\DOIF #1#2{\normalexpanded{\syst_helpers_do_IF {#1}{#2}}}% will become obsolete
+\protected\def\DOIFNOT #1#2{\normalexpanded{\syst_helpers_do_IF_NOT {#1}{#2}}}% will become obsolete
+\protected\def\DOIFELSE #1#2{\normalexpanded{\syst_helpers_do_IF_ELSE {#1}{#2}}}% will become obsolete
+\protected\def\DOIFINSTRINGELSE #1#2{\normalexpanded{\syst_helpers_do_IF_INSTRING_ELSE{#1}{#2}}}% will become obsolete
%D \macros
%D {dosingleargumentwithset,
@@ -6520,7 +6536,7 @@
%D \def\dodefinesomething[#1][#2]%
%D {\getparameters[\??xx#1][#2]}
%D
-%D \unexpanded\def\definesomething%
+%D \protected\def\definesomething%
%D {\dodoubleargumentwithset\dodefinesomething}
%D \stoptyping
%D
@@ -6574,7 +6590,7 @@
\let\m_syst_helpers_strip_character\empty
-\unexpanded\def\stripcharacter#1\from#2\to#3%
+\protected\def\stripcharacter#1\from#2\to#3%
{\def\syst_helpers_strip_character##1#1##2\end
{\edef\m_syst_helpers_strip_character{\m_syst_helpers_strip_character##1}%
\doifnotempty{##2}{\syst_helpers_strip_character##2\end}}%
@@ -6583,7 +6599,7 @@
\expandafter\syst_helpers_strip_character\m_syst_string_one#1\end
\dodoglobal\let#3\m_syst_helpers_strip_character}
-\unexpanded\def\stripspaces\from#1\to#2% will become \unspacestring#1\from#2
+\protected\def\stripspaces\from#1\to#2% will become \unspacestring#1\from#2
{\stripcharacter{ }\from#1\to#2}
%D \macros
@@ -6592,7 +6608,7 @@
%D The next macro does the same but is more compatible with other macros, like \type
%D {\convert...}.
-\unexpanded\def\unspacestring#1\to#2%
+\protected\def\unspacestring#1\to#2%
{\stripcharacter{ }\from#1\to#2}
%D \macros
@@ -6697,7 +6713,7 @@
\syst_helpers_process_separated_list_step}%
\expandafter\syst_helpers_process_separated_list_step\gobbleoneargument#1#3]#3}
-\unexpanded\def\processseparatedlist[%
+\protected\def\processseparatedlist[%
{\syst_helpers_process_separated_list\relax}
%D \macros
@@ -6720,7 +6736,7 @@
\let\syst_helpers_process_any_list_indeed\relax
\let\syst_helpers_process_any_list_step \relax
-\unexpanded\def\processlist#1#2#3#4% no blank skipping !
+\protected\def\processlist#1#2#3#4% no blank skipping !
{\def\syst_helpers_process_any_list_indeed##1#2%
{\def\syst_helpers_process_any_list_step####1####2#3%
{\ifx#2####1%
@@ -6749,7 +6765,7 @@
%D This command can be integrated in \type {\getparameters}, but we decided best not
%D to do so.
-\unexpanded\def\processassignlist#1[#2]#3%
+\protected\def\processassignlist#1[#2]#3%
{\def\syst_helpers_process_assign_list_assign[##1=##2=##3]%
{\doif{##3}\relax{#3{##1}}}%
\def\syst_helpers_process_assign_list_step##1%
@@ -6772,7 +6788,7 @@
\let\m_syst_helpers_untexed\empty
-\unexpanded\def\untexsomething
+\protected\def\untexsomething
{\begingroup
\catcode\leftbraceasciicode \ignorecatcode
\catcode\rightbraceasciicode\ignorecatcode
@@ -6784,8 +6800,8 @@
\endgroup
\let#3\m_syst_helpers_untexed}
-\unexpanded\def\untexargument{\untexsomething\convertargument}
-\unexpanded\def\untexcommand {\untexsomething\convertcommand}
+\protected\def\untexargument{\untexsomething\convertargument}
+\protected\def\untexcommand {\untexsomething\convertcommand}
%D \macros
%D {ScaledPointsToBigPoints,ScaledPointsToWholeBigPoints}
@@ -6801,16 +6817,16 @@
%D
%D In pure \TEX:
-% \unexpanded\def\PointsToBigPoints#1#2%
+% \protected\def\PointsToBigPoints#1#2%
% {\edef#2{\withoutpt\the\dimexpr.996264\dimexpr#1\relax\relax}}
%
-% \unexpanded\def\PointsToWholeBigPoints#1#2%
+% \protected\def\PointsToWholeBigPoints#1#2%
% {\edef#2{\the\numexpr\dimexpr.996264\dimexpr#1\relax\relax/\maxcard\relax}}
%
-% \unexpanded\def\ScaledPointsToBigPoints#1% % #2
+% \protected\def\ScaledPointsToBigPoints#1% % #2
% {\PointsToBigPoints{\number#1\scaledpoint}} % {#2}
%
-% \unexpanded\def\ScaledPointsToWholeBigPoints#1% % #2
+% \protected\def\ScaledPointsToWholeBigPoints#1% % #2
% {\PointsToWholeBigPoints{\number#1\scaledpoint}} % {#2}
%D This is slower but cleaner and more accurate too. The only place these are still
@@ -6819,10 +6835,10 @@
\let\tobigpoints \clf_tobigpoints
\let\towholebigpoints\clf_towholebigpoints
-\unexpanded\def\PointsToBigPoints #1#2{\edef#2{\tobigpoints #1}} % can be avoided
-\unexpanded\def\PointsToWholeBigPoints #1#2{\edef#2{\towholebigpoints#1}} % can be avoided
-\unexpanded\def\ScaledPointsToBigPoints #1#2{\edef#2{\tobigpoints #1\scaledpoint}} % obsolete
-\unexpanded\def\ScaledPointsToWholeBigPoints#1#2{\edef#2{\towholebigpoints#1\scaledpoint}} % obsolete
+\protected\def\PointsToBigPoints #1#2{\edef#2{\tobigpoints #1}} % can be avoided
+\protected\def\PointsToWholeBigPoints #1#2{\edef#2{\towholebigpoints#1}} % can be avoided
+\protected\def\ScaledPointsToBigPoints #1#2{\edef#2{\tobigpoints #1\scaledpoint}} % obsolete
+\protected\def\ScaledPointsToWholeBigPoints#1#2{\edef#2{\towholebigpoints#1\scaledpoint}} % obsolete
%D \macros
%D {PointsToReal}
@@ -6834,7 +6850,7 @@
%D \PointsToReal {dimension} \target
%D \stoptyping
-\unexpanded\def\PointsToReal#1#2%
+\protected\def\PointsToReal#1#2%
{\edef#2{\withoutpt\the\dimexpr#1}}
%D \macros
@@ -6869,7 +6885,7 @@
%D \starttyping
%D \newbox\b_syst_helpers_dlh
%D
-%D \unexpanded\def\dontleavehmode
+%D \protected\def\dontleavehmode
%D {\ifhmode\else \ifmmode\else
%D \setbox\b_syst_helpers_dlh\hbox{\mathsurround\zeropoint\everymath\emptytoks$ $}\unhbox\b_syst_helpers_dlh
%D \fi \fi}
@@ -6891,10 +6907,10 @@
%D
%D The first argument may be a \type{\macro}.
-% \unexpanded\def\uppercasestring#1\to#2%
+% \protected\def\uppercasestring#1\to#2%
% {\uppercase\expandafter{\expandafter\dodoglobal\expandafter\edef\expandafter#2\expandafter{\normalexpanded{#1}}}}
%
-% \unexpanded\def\lowercasestring#1\to#2%
+% \protected\def\lowercasestring#1\to#2%
% {\lowercase\expandafter{\expandafter\dodoglobal\expandafter\edef\expandafter#2\expandafter{\normalexpanded{#1}}}}
%D These macros are sort of obsolete as we never use uppercase this way. But
@@ -6903,8 +6919,8 @@
\def\utfupper#1{\clf_upper{#1}} % expandable
\def\utflower#1{\clf_lower{#1}} % expandable
-\unexpanded\def\uppercasestring#1\to#2{\dodoglobal\edef#2{\clf_upper{#1}}}
-\unexpanded\def\lowercasestring#1\to#2{\dodoglobal\edef#2{\clf_lower{#1}}}
+\protected\def\uppercasestring#1\to#2{\dodoglobal\edef#2{\clf_upper{#1}}}
+\protected\def\lowercasestring#1\to#2{\dodoglobal\edef#2{\clf_lower{#1}}}
%D \macros
%D {handletokens}
@@ -6949,14 +6965,14 @@
\expandafter\syst_helpers_count_token
\fi}
-\unexpanded\def\counttoken#1\in#2\to#3%
+\protected\def\counttoken#1\in#2\to#3%
{\privatescratchcounter\zerocount
\def\m_syst_string_one{#1}%
\def\m_syst_string_two{\end}%
\syst_helpers_count_token#2\end
\dodoglobal#3\privatescratchcounter}
-\unexpanded\def\counttokens#1\to#2%
+\protected\def\counttokens#1\to#2%
{\privatescratchcounter\zerocount
\def\syst_helpers_count_token##1{\advance\privatescratchcounter\plusone}%
\handletokens#1\with\syst_helpers_count_token
@@ -6968,7 +6984,7 @@
%D Running this one not always gives the expected results. Consider for instance the
%D macro for which I originally wrote this token handler.
-\unexpanded\def\splitofftokens#1\from#2\to#3% slow but hardly used
+\protected\def\splitofftokens#1\from#2\to#3% slow but hardly used
{\ifnum#1>\zerocount
\privatescratchcounter#1\relax
\def\syst_helpers_split_off_tokens##1%
@@ -7012,7 +7028,7 @@
%D assignment, this time by using \type {\futurelet}, and grabbing an argument as
%D well. That way we can handle the sentinal, a blank space and grouped tokens.
-\unexpanded\def\syst_helpers_handle_tokens % \nexthandledtoken is part of interface
+\protected\def\syst_helpers_handle_tokens % \nexthandledtoken is part of interface
{\futurelet\nexthandledtoken\syst_helpers_handle_tokens_indeed}
\def\handletokens#1\with#2%
@@ -7064,8 +7080,8 @@
\newtoks\everysettrialtypesetting
\newtoks\everyresettrialtypesetting
-\unexpanded\def\settrialtypesetting {\the\everysettrialtypesetting } % obeys grouping so
-\unexpanded\def\resettrialtypesetting{\the\everyresettrialtypesetting} % this one is seldom needed
+\protected\def\settrialtypesetting {\the\everysettrialtypesetting } % obeys grouping so
+\protected\def\resettrialtypesetting{\the\everyresettrialtypesetting} % this one is seldom needed
\let\iftrialtypesetting\iffalse % so we have no \trialtypesettingtrue|false in mkiv !
@@ -7104,15 +7120,15 @@
%D This macro is first used in the tabulation macros.
%D
%D \starttyping
-%D \unexpanded\def\starthans%
+%D \protected\def\starthans%
%D {\processcontent{stophans}\test{\message{\test}\wait}}
%D \stoptyping
-\unexpanded\def\processcontent#1%
+\protected\def\processcontent#1%
{\begingroup\expandafter\syst_helpers_process_content\csname#1\endcsname}
-\unexpanded\def\syst_helpers_process_content#1#2#3%
- {\unexpanded\def\syst_helpers_process_content##1#1%
+\protected\def\syst_helpers_process_content#1#2#3%
+ {\protected\def\syst_helpers_process_content##1#1%
{\endgroup\def#2{##1}#3}%
\syst_helpers_process_content}
@@ -7158,10 +7174,10 @@
%D As an alternative for the next macro we can use a global assignment inside a box.
%D The \type {\empty}'s permits gobbling while preventing spurious \type {\relax}'s.
-\unexpanded\def\setdimensionwithunit#1#2#3% number unit dimension / nice trick
+\protected\def\setdimensionwithunit#1#2#3% number unit dimension / nice trick
{\afterassignment\gobblefourarguments#1=#2#3pt\relax\empty\empty\empty\empty}
-\unexpanded\def\freezedimensionwithunit#1#2%
+\protected\def\freezedimensionwithunit#1#2%
{\setdimensionwithunit\privatescratchdimen#1{#2}\edef#1{\the\privatescratchdimen}}
%D \macros
@@ -7169,7 +7185,7 @@
%D
%D Not that fast I guess, but here's a way to test for token registers being empty.
-\unexpanded\def\doifelsesometoks#1%
+\protected\def\doifelsesometoks#1%
{\edef\m_syst_string_one{\the#1}% one level expansion so quite ok
\ifx\m_syst_string_one\empty
\expandafter\secondoftwoarguments
@@ -7177,7 +7193,7 @@
\expandafter\firstoftwoarguments
\fi}
-\unexpanded\def\doifsometoks#1%
+\protected\def\doifsometoks#1%
{\edef\m_syst_string_one{\the#1}% one level expansion so quite ok
\ifx\m_syst_string_one\empty
\expandafter\gobbleoneargument
@@ -7185,7 +7201,7 @@
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifemptytoks#1%
+\protected\def\doifemptytoks#1%
{\edef\m_syst_string_one{\the#1}% one level expansion so quite ok
\ifx\m_syst_string_one\empty
\expandafter\firstofoneargument
@@ -7209,7 +7225,7 @@
\expandafter\m_syst_action_nop
\fi}
-\unexpanded\def\strictdoifelsenextoptional#1#2%
+\protected\def\strictdoifelsenextoptional#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\futurelet\nexttoken\syst_helpers_strict_inspect_next_character}
@@ -7258,7 +7274,7 @@
\def\syst_helpers_serialize_comma_list_step#1%
{\edef\serializedcommalist{\serializedcommalist#1}}
-\unexpanded\def\serializecommalist[#1]%
+\protected\def\serializecommalist[#1]%
{\let\serializedcommalist\empty
\processcommacommand[#1]\syst_helpers_serialize_comma_list_step}
@@ -7353,22 +7369,22 @@
\installsystemnamespace{measure}
-\unexpanded\def\definemeasure
+\protected\def\definemeasure
{\dodoubleargument\syst_helpers_define_measure}
\def\syst_helpers_define_measure[#1][#2]%
{\expandafter\def\csname\??measure#1\endcsname{#2}}
-\unexpanded\def\freezemeasure
+\protected\def\freezemeasure
{\dodoubleargument\syst_helpers_freeze_measure}
\def\syst_helpers_freeze_measure[#1][#2]%
{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}}
-\unexpanded\def\setmeasure #1#2{\expandafter\def \csname\??measure#1\endcsname{#2}} % quick way
-\unexpanded\def\setgmeasure#1#2{\expandafter\gdef\csname\??measure#1\endcsname{#2}} % quick way
-\unexpanded\def\setemeasure#1#2{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
-\unexpanded\def\setxmeasure#1#2{\expandafter\xdef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
+\protected\def\setmeasure #1#2{\expandafter\def \csname\??measure#1\endcsname{#2}} % quick way
+\protected\def\setgmeasure#1#2{\expandafter\gdef\csname\??measure#1\endcsname{#2}} % quick way
+\protected\def\setemeasure#1#2{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
+\protected\def\setxmeasure#1#2{\expandafter\xdef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
\def\measure
{\the\measured}
@@ -7393,22 +7409,22 @@
\installsystemnamespace{quantity}
-\unexpanded\def\definequantity
+\protected\def\definequantity
{\dodoubleargument\syst_helpers_define_quantity}
\def\syst_helpers_define_quantity[#1][#2]%
{\expandafter\def\csname\??quantity#1\endcsname{#2}}
-\unexpanded\def\freezequantity
+\protected\def\freezequantity
{\dodoubleargument\syst_helpers_freeze_quantity}
\def\syst_helpers_freeze_quantity[#1][#2]%
{\expandafter\edef\csname\??quantity#1\endcsname{\the\numexpr#2}}
-\unexpanded\def\setquantity #1#2{\expandafter\def \csname\??quantity#1\endcsname{#2}} % quick way
-\unexpanded\def\setgquantity#1#2{\expandafter\gdef\csname\??quantity#1\endcsname{#2}} % quick way
-\unexpanded\def\setequantity#1#2{\expandafter\edef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
-\unexpanded\def\setxquantity#1#2{\expandafter\xdef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
+\protected\def\setquantity #1#2{\expandafter\def \csname\??quantity#1\endcsname{#2}} % quick way
+\protected\def\setgquantity#1#2{\expandafter\gdef\csname\??quantity#1\endcsname{#2}} % quick way
+\protected\def\setequantity#1#2{\expandafter\edef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
+\protected\def\setxquantity#1#2{\expandafter\xdef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
\def\quantity
{\the\quantitied}
@@ -7538,9 +7554,9 @@
\def\comparedimension#1#2%
{\compresult
- \ifdim#1<#2%
+ \ifdim#1<#2 % space wil be skipped
\zerocount
- \else\ifdim#1<#2%
+ \else\ifdim#1<#2 % space wil be skipped
\plusone
\else
\plustwo
@@ -7552,7 +7568,7 @@
\zerocount
\else\ifdim\dimexpr#2-#1\relax<\roudingeps
\zerocount
- \else\ifdim#1<#2%
+ \else\ifdim#1<#2 % space wil be skipped
\plusone
\else
\plustwo
@@ -7562,19 +7578,19 @@
% \copycsname xxx\endcsname\csname ..\endcsname
-\unexpanded\def\copycsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter\csname}
+\protected\def\copycsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter\csname}
% \letcscsname \crap \csname ..\endcsname
% \letcsnamecs \csname ..\endcsname\crap
% \letcsnamecsname\csname ..\endcsname\csname ..\endcsname
-\unexpanded\def\letcscsname {\expandafter\let\expandafter}
-\unexpanded\def\letcsnamecs {\expandafter\let}
-\unexpanded\def\letcsnamecsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter}
+\protected\def\letcscsname {\expandafter\let\expandafter}
+\protected\def\letcsnamecs {\expandafter\let}
+\protected\def\letcsnamecsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter}
% another one, add an item to a commalist
-\unexpanded\def\addvalue#1#2% cs item
+\protected\def\addvalue#1#2% cs item
{\ifcsname#1\endcsname\else\expandafter\let\csname#1\endcsname\empty\fi
\normalexpanded{\noexpand\addtocommalist{#2}\expandafter\noexpand\csname#1\endcsname}}
@@ -7589,25 +7605,25 @@
\fi
\syst_helpers_unspaced}
-\unexpanded\def\unspaceargument#1\to#2%
+\protected\def\unspaceargument#1\to#2%
{\privatescratchcounter\catcode\spaceasciicode
\catcode\spaceasciicode\ignorecatcode
\scantextokens{\edef#2{#1}}%
\catcode\spaceasciicode\privatescratchcounter}
-\unexpanded\def\unspaceafter#1#2%
+\protected\def\unspaceafter#1#2%
{\unspaceargument#2\to\ascii
\expandafter#1\expandafter{\ascii}}
% sometimes handy:
-\unexpanded\def\doifelsehasspace#1%
+\protected\def\doifelsehasspace#1%
{\edef\m_syst_string_one{#1}%
\normalexpanded{\syst_helpers_if_has_space_else#1\space}\empty\relax}
\let\doifhasspaceelse\doifelsehasspace
-\unexpanded\def\syst_helpers_if_has_space_else#1 #2#3\relax % \space\empty\relax
+\protected\def\syst_helpers_if_has_space_else#1 #2#3\relax % \space\empty\relax
{\ifx\m_syst_string_one\space
\expandafter\firstoftwoarguments
\else\ifx#2\empty
@@ -7620,8 +7636,8 @@
\installsystemnamespace{flag}
-\unexpanded\def\setflag #1{\expandafter\dodoglobal\expandafter\let\csname\??flag#1\endcsname\zerocount}
-\unexpanded\def\resetflag#1{\expandafter\dodoglobal\expandafter\let\csname\??flag#1\endcsname\plusone}
+\protected\def\setflag #1{\expandafter\dodoglobal\expandafter\let\csname\??flag#1\endcsname\zerocount}
+\protected\def\resetflag#1{\expandafter\dodoglobal\expandafter\let\csname\??flag#1\endcsname\plusone}
\def\flag#1{\csname\??flag#1\endcsname}
@@ -7645,7 +7661,7 @@
\doubleexpandafter\firstofoneargument
\fi\fi}
-\unexpanded\def\inheritparameter[#1]#2[#3]#4[#5]% tag tokey fromkey
+\protected\def\inheritparameter[#1]#2[#3]#4[#5]% tag tokey fromkey
{\expandafter\def\csname#1#3\expandafter\endcsname\expandafter{\csname#1#5\endcsname}}
\def\syst_helpers_if_non_zero_positive_else#1#2\end % #3#4%
@@ -7671,50 +7687,56 @@
% here ?
-\unexpanded\def\dosetrawvalue #1#2#3{\expandafter \def\csname#1#2\endcsname{#3}}
-\unexpanded\def\dosetrawevalue#1#2#3{\expandafter\edef\csname#1#2\endcsname{#3}}
-\unexpanded\def\dosetrawgvalue#1#2#3{\expandafter\gdef\csname#1#2\endcsname{#3}}
-\unexpanded\def\dosetrawxvalue#1#2#3{\expandafter\xdef\csname#1#2\endcsname{#3}}
+\protected\def\dosetrawvalue #1#2#3{\expandafter \def\csname#1#2\endcsname{#3}}
+\protected\def\dosetrawevalue#1#2#3{\expandafter\edef\csname#1#2\endcsname{#3}}
+\protected\def\dosetrawgvalue#1#2#3{\expandafter\gdef\csname#1#2\endcsname{#3}}
+\protected\def\dosetrawxvalue#1#2#3{\expandafter\xdef\csname#1#2\endcsname{#3}}
-\unexpanded\def\getrawparameters {\dogetparameters\dosetrawvalue }
-\unexpanded\def\getraweparameters {\dogetparameters\dosetrawevalue}
-\unexpanded\def\getrawgparameters {\dogetparameters\dosetrawgvalue}
-\unexpanded\def\getrawxparameters {\dogetparameters\dosetrawxvalue}
+\protected\def\getrawparameters {\dogetparameters\dosetrawvalue }
+\protected\def\getraweparameters {\dogetparameters\dosetrawevalue}
+\protected\def\getrawgparameters {\dogetparameters\dosetrawgvalue}
+\protected\def\getrawxparameters {\dogetparameters\dosetrawxvalue}
-\unexpanded\def\globalgetrawparameters{\dogetparameters\dosetrawgvalue} % obsolete
+\protected\def\globalgetrawparameters{\dogetparameters\dosetrawgvalue} % obsolete
%D Sort of obsolete:
\newcount\c_syst_helpers_mod
-\unexpanded\def\dosetmodulo#1#2#3%
+\protected\def\dosetmodulo#1#2#3%
{\c_syst_helpers_mod#1\divide\c_syst_helpers_mod#2\multiply\c_syst_helpers_mod#2%
#3#1\advance#3-\c_syst_helpers_mod}
-\unexpanded\def\dosetdivision#1#2#3%
+\protected\def\dosetdivision#1#2#3%
{#3#1\divide#3 #2\relax}
-\unexpanded\def\DoMod#1by#2to#3{\dosetmodulo {#1}{#2}{#3}}
-\unexpanded\def\DoDiv#1by#2to#3{\dosetdivision{#1}{#2}{#3}}
+\protected\def\DoMod#1by#2to#3{\dosetmodulo {#1}{#2}{#3}}
+\protected\def\DoDiv#1by#2to#3{\dosetdivision{#1}{#2}{#3}}
\def\syst_helpers_unprotected#1\par
{#1\protect}
-\unexpanded\def\unprotected
+\protected\def\unprotected
{\unprotect
\syst_helpers_unprotected}
\let\resettimer \clf_resettimer
\let\elapsedtime \clf_elapsedtime
-\let\elapsedseconds \elapsedtime
+\let\elapsedseconds\elapsedtime
+
+\let\elapsedsteps\!!zerocount
+
+\protected\def\elapsedsteptime % unexpanded ! a bit useless but who knows ...
+ {\clf_elapsedsteptime\elapsedsteps\relax}
\newcount\c_syst_helpers_test_feature_n
\newcount\c_syst_helpers_test_feature_m
\def\currentfeaturetest{\number\c_syst_helpers_test_feature_n}
-\unexpanded\def\testfeature#1#2%
+\protected\def\testfeature#1#2%
{\c_syst_helpers_test_feature_m#1\relax
+ \xdef\elapsedsteps{\number\c_syst_helpers_test_feature_m}%
\def\syst_helpers_test_feature_yes
{\advance\c_syst_helpers_test_feature_n\plusone
\ifnum\c_syst_helpers_test_feature_n>\c_syst_helpers_test_feature_m\else
@@ -7727,7 +7749,7 @@
\fi}%
\retestfeature}
-\unexpanded\def\retestfeature % timer support is new per 10/5/2005
+\protected\def\retestfeature % timer support is new per 10/5/2005
{\bgroup
\ifcase\interactionmode\let\wait\relax\fi
\clf_resettimer
@@ -7741,10 +7763,10 @@
\wait
\egroup}
-\unexpanded\def\showtimer#1%
+\protected\def\showtimer#1%
{\writestatus{runtime}{\elapsedseconds\space s / #1}}
-\unexpanded\def\testfeatureonce#1#2%
+\protected\def\testfeatureonce#1#2%
{\begingroup
\let\wait\relax
\testfeature{#1}{#2}%
@@ -7759,7 +7781,7 @@
%D \freezedimenmacro\leftmargindistance
%D \stoptyping
-\unexpanded\def\freezedimenmacro#1%
+\protected\def\freezedimenmacro#1%
{\edef#1{\the\dimexpr#1}}
%D The next macro negates a macro (dimension or number, or actually, whatever. It's
@@ -7777,17 +7799,17 @@
\def\assigndimen#1#2%
{\afterassignment\gobbleassigndimen#1=#2\zeropoint\\}
-\unexpanded\def\appended#1#2#3{\expandafter#1\expandafter#2\expandafter{#2#3}}
-\unexpanded\def\appendvalue #1{\expandafter\appended\expandafter \def\csname#1\endcsname}
-\unexpanded\def\appendgvalue#1{\expandafter\appended\expandafter\gdef\csname#1\endcsname}
+\protected\def\appended#1#2#3{\expandafter#1\expandafter#2\expandafter{#2#3}}
+\protected\def\appendvalue #1{\expandafter\appended\expandafter \def\csname#1\endcsname}
+\protected\def\appendgvalue#1{\expandafter\appended\expandafter\gdef\csname#1\endcsname}
-\unexpanded\def\prepended#1#2#3%
+\protected\def\prepended#1#2#3%
{\t_syst_helpers_scratch{#3}%
\expandafter\expandafter\expandafter#1\expandafter\expandafter\expandafter#2\expandafter\expandafter\expandafter
{\expandafter\the\expandafter\t_syst_helpers_scratch#2}}
-\unexpanded\def\prependvalue #1{\expandafter\prepended\expandafter \def\csname#1\endcsname}
-\unexpanded\def\prependgvalue#1{\expandafter\prepended\expandafter\gdef\csname#1\endcsname}
+\protected\def\prependvalue #1{\expandafter\prepended\expandafter \def\csname#1\endcsname}
+\protected\def\prependgvalue#1{\expandafter\prepended\expandafter\gdef\csname#1\endcsname}
%D \macros
%D {dowithrange}
@@ -7809,11 +7831,11 @@
\ifx\m_syst_helpers_range_to\empty\let\m_syst_helpers_range_to\m_syst_helpers_range_from\fi
\dostepwiserecurse\m_syst_helpers_range_from\m_syst_helpers_range_to\plusone{\m_helpers_range_action{##1}}}%
-\unexpanded\def\processranges[#1]#2% #1= n:m,p,q:r
+\protected\def\processranges[#1]#2% #1= n:m,p,q:r
{\def\m_helpers_range_action{#2}%
\processcommacommand[#1]\syst_helpers_with_range}
-\unexpanded\def\dowithrange#1#2%
+\protected\def\dowithrange#1#2%
{\def\m_helpers_range_action{#2}%
\processcommacommand[#1]\syst_helpers_with_range}
@@ -7832,7 +7854,7 @@
%D
%D \typebuffer \getbuffer
-\unexpanded\def\ignoreimplicitspaces
+\protected\def\ignoreimplicitspaces
{\doifelsenextchar\relax\relax\relax}
%D \macros
@@ -7859,11 +7881,11 @@
\newbox\b_syst_helpers_no_interference
-\unexpanded\def\startnointerference % not even grouped !
+\protected\def\startnointerference % not even grouped !
{\setbox\b_syst_helpers_no_interference\vbox
\bgroup}
-\unexpanded\def\stopnointerference
+\protected\def\stopnointerference
{\egroup
\setbox\b_syst_helpers_no_interference\emptybox}
@@ -7878,9 +7900,9 @@
%D Signal. Some fonts have a char0 rendering so we need to make sure that it is not
%D set in the font! (This will be overloaded)
-\unexpanded\def\signalcharacter{\char\zerocount} % \zwj
+\protected\def\signalcharacter{\char\zerocount} % \zwj
-% \unexpanded\def\signalcharacter
+% \protected\def\signalcharacter
% {\scratchcounter\normallanguage
% \normallanguage\zerocount
% \char\zerocount
@@ -7914,9 +7936,9 @@
%D \typebuffer \startlines \getbuffer \stoplines
\def\docheckedpair#1%
- {\syst_helpers_checked_pair#1,,\_o_e_p_}
+ {\syst_helpers_checked_pair#1,,\_e_o_p_}
-\def\syst_helpers_checked_pair#1,#2,#3\_o_e_p_
+\def\syst_helpers_checked_pair#1,#2,#3\_e_o_p_
{#1,#2}
%D Here are some nasty helpers. They can be used to fill often expanded token
@@ -8046,7 +8068,7 @@
% {title} {\texdefinition{btx:apa:title-subtitle-type}}
% {default} {\btxflush{author}}
-% \unexpanded\def\doifcase#1%
+% \protected\def\doifcase#1%
% {\edef\m_case_asked{#1}%
% \syst_aux_case}
%
@@ -8093,8 +8115,8 @@
%D Not that useful:
-% \unexpanded\def\doifelsestringbefore{\clf_doifelsestringbefore}
-% \unexpanded\def\doifelsestringafter {\clf_doifelsestringafter}
+% \protected\def\doifelsestringbefore{\clf_doifelsestringbefore}
+% \protected\def\doifelsestringafter {\clf_doifelsestringafter}
% Could have been useful but not faster that addtocommalist and also expansion mess:
%
@@ -8102,30 +8124,30 @@
%D Experiment (sometimes looks nicer in code):
-\unexpanded\def\sameargumentscondition#1#2%
+\protected\def\sameargumentscondition#1#2%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two}
-\unexpanded\def\emptyargumentcondition#1%
+\protected\def\emptyargumentcondition#1%
{\edef\m_syst_string_one{#1}%
\ifx\m_syst_string_one\empty}
-% \unexpanded\def\hascommonargumentcondition#1#2{\clf_hascommonargumentcondition{#1}{#2}}
+% \protected\def\hascommonargumentcondition#1#2{\clf_hascommonargumentcondition{#1}{#2}}
% \let\hascommonargumentcondition \clf_hascommonargumentcondition
-% \unexpanded\def\hascommonargumentcondition{\clf_hascommonargumentcondition}
+% \protected\def\hascommonargumentcondition{\clf_hascommonargumentcondition}
\protect \endinput
% \edef\choicetokenyes{+}
% \edef\choicetokennop{-}
%
-% \unexpanded\def\startchoice#1%
+% \protected\def\startchoice#1%
% {\pushmacro\currentchoicevalue
% \edef\currentchoicevalue{#1}%
% \checkchoicetoken}
%
-% \unexpanded\def\checkchoicetoken#1%
+% \protected\def\checkchoicetoken#1%
% {\edef\choicetoken{#1}%
% \ifx\choicetoken\choicetokenyes
% \singleexpandafter\checkchoiceyes
@@ -8210,7 +8232,7 @@
%
% \showvalue{mylist}
-% \unexpanded\def\showtokenlist#1%
+% \protected\def\showtokenlist#1%
% {\begingroup
% \edef\tempstring{\the#1}%
% \tx\ttbf\string#1: \tttf\meaning\tempstring
@@ -8220,7 +8242,7 @@
%
% \chardef\_E_O_T_0
%
-% \unexpanded\def\doifelsetokens#1%
+% \protected\def\doifelsetokens#1%
% {\dodoifelsetokens#1\_E_O_T_\_e_o_t_}
%
% \def\dodoifelsetokens#1#2\_e_o_t_
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua
index 1af2d9a5d5e..6e998bdfd5e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-con.lua
@@ -30,12 +30,18 @@ function converters.octstringtonumber(n) tonumber(n, 8) end
function converters.rawcharacter (n) utfchar(0x110000+n) end
-local lchexnumber = formatters["%x"]
-local uchexnumber = formatters["%X"]
-local lchexnumbers = formatters["%02x"]
-local uchexnumbers = formatters["%02X"]
-local octnumber = formatters["%03o"]
-local nicenumber = formatters["%0.6F"]
+local f_lchexnumber = formatters["%x"]
+local f_uchexnumber = formatters["%X"]
+local f_lchexnumbers = formatters["%02x"]
+local f_uchexnumbers = formatters["%02X"]
+local f_octnumber = formatters["%03o"]
+local nicenumber = formatters["%0.6F"]
+
+local lchexnumber = function(n) if n < 0 then n = 0x100000000 + n end return f_lchexnumber (n) end
+local uchexnumber = function(n) if n < 0 then n = 0x100000000 + n end return f_uchexnumber (n) end
+local lchexnumbers = function(n) if n < 0 then n = 0x100000000 + n end return f_lchexnumbers(n) end
+local uchexnumbers = function(n) if n < 0 then n = 0x100000000 + n end return f_uchexnumbers(n) end
+local octnumber = function(n) if n < 0 then n = 0x100000000 + n end return f_octnumber (n) end
converters.lchexnumber = lchexnumber
converters.uchexnumber = uchexnumber
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv
index 56155460a90..ddd65865d22 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkiv
@@ -84,14 +84,14 @@
%D \macros{setcalculatedsin,setcalculatedcos,setcalculatedtan}
-\unexpanded\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}}
-\unexpanded\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}}
-\unexpanded\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}}
+\protected\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}}
+\protected\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}}
+\protected\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}}
%D \macros{formatted,format}
- \def\formatted#1{\ctxcommand{format(#1)}} % not clf
-\unexpanded\def\format #1{\ctxcommand{format(#1)}} % not clf
+ \def\formatted#1{\ctxcommand{format(#1)}} % not clf
+\protected\def\format #1{\ctxcommand{format(#1)}} % not clf
%D The \type {\modulatednumber} and \type {\realnumber} macros have been removed.
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv
index cacc5f51740..83b57f5f726 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-fnt.mkiv
@@ -15,28 +15,23 @@
\unprotect
-\def\fontslantperpoint {\fontdimen\plusone }
-\def\fontinterwordspace {\fontdimen\plustwo }
-\def\fontinterwordstretch{\fontdimen\plusthree}
-\def\fontinterwordshrink {\fontdimen\plusfour }
-\def\fontexheight {\fontdimen\plusfive }
-\def\fontemwidth {\fontdimen\plussix }
-\def\fontextraspace {\fontdimen\plusseven}
-
-\def\slantperpoint {\fontdimen\plusone \font}
-\def\interwordspace {\fontdimen\plustwo \font}
-\def\interwordstretch {\fontdimen\plusthree\font}
-\def\interwordshrink {\fontdimen\plusfour \font}
-\def\exheight {\fontdimen\plusfive \font}
-\def\emwidth {\fontdimen\plussix \font}
-\def\extraspace {\fontdimen\plusseven\font}
-
-\def\mathsupdisplay {\fontdimen13 } % to be remapped
-\def\mathsupnormal {\fontdimen14 } % to be remapped
-\def\mathsupcramped {\fontdimen15 } % to be remapped
-\def\mathsubnormal {\fontdimen16 } % to be remapped
-\def\mathsubcombined {\fontdimen17 } % to be remapped
-\def\mathaxisheight {\fontdimen22 } % to be remapped
+\protected\def\fontslantperpoint {\fontdimen\plusone }
+\protected\def\fontinterwordspace {\fontdimen\plustwo }
+\protected\def\fontinterwordstretch{\fontdimen\plusthree}
+\protected\def\fontinterwordshrink {\fontdimen\plusfour }
+\protected\def\fontexheight {\fontdimen\plusfive }
+\protected\def\fontemwidth {\fontdimen\plussix }
+\protected\def\fontextraspace {\fontdimen\plusseven}
+
+\protected\def\slantperpoint {\fontdimen\plusone \font}
+\protected\def\interwordspace {\fontdimen\plustwo \font}
+\protected\def\interwordstretch {\fontdimen\plusthree\font}
+\protected\def\interwordshrink {\fontdimen\plusfour \font}
+\protected\def\exheight {\fontdimen\plusfive \font}
+\protected\def\emwidth {\fontdimen\plussix \font}
+\protected\def\extraspace {\fontdimen\plusseven\font}
+
+\let \mathaxisheight \Umathaxis % takes style
\def\currentspaceskip {\interwordspace\s!plus\interwordstretch\s!minus\interwordshrink\relax}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv
index 0dd1fe29cf6..aafbc787e5e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkiv
@@ -58,7 +58,9 @@
\chardef\primeasciicode 39 % '
\chardef\leftparentasciicode 40
\chardef\rightparentasciicode 41
+\chardef\commaasciicode 44
\chardef\hyphenasciicode 45
+\chardef\periodasciicode 46
\chardef\forwardslashasciicode 47 % /
\chardef\colonasciicode 58
\chardef\lessthanasciicode 60 % < used as alternative verbatim {
@@ -233,21 +235,21 @@
%D The allocators share a common helper macro.
-\normalprotected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
-\normalprotected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
-\normalprotected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
-\normalprotected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
-\normalprotected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \mathchardef\c_syst_max_allocated_register}
-\normalprotected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
-\normalprotected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \chardef \c_syst_max_allocated_read}
-\normalprotected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \chardef \c_syst_max_allocated_write}
-\normalprotected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \mathchardef\c_syst_max_allocated_register}
-\normalprotected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
+\protected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
+\protected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
+\protected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
+\protected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
+\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \mathchardef\c_syst_max_allocated_register}
+\protected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
+\protected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \chardef \c_syst_max_allocated_read}
+\protected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \chardef \c_syst_max_allocated_write}
+\protected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \mathchardef\c_syst_max_allocated_register}
+\protected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
%D We don't need these in \CONTEXT:
-\normalprotected\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\chardef \c_syst_max_allocated_language}
-\normalprotected\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \chardef \c_syst_max_allocated_family}
+\protected\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\chardef \c_syst_max_allocated_language}
+\protected\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \chardef \c_syst_max_allocated_family}
\let\newfam\newfamily
@@ -256,10 +258,10 @@
% Watch out, for the moment we disable the check for already being defined
% later we will revert this but first all chardefs must be replaced.
-\normalprotected\def\newconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1}
-\normalprotected\def\setnewconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1#1} % just a number
-\normalprotected\def\setconstant {} % dummy, no checking, so it warns
-\normalprotected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
+\protected\def\newconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1}
+\protected\def\setnewconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1#1} % just a number
+\protected\def\setconstant {} % dummy, no checking, so it warns
+\protected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
% maybe setconstant with check
@@ -274,8 +276,8 @@
%D as all engines now provide many registers we removed all traces.
\ifdefined\writestatus \else
- %\normalprotected\def\writestatus#1#2{\immediate\write\statuswrite{#1: #2}}
- \normalprotected\def\writestatus#1#2{\message{#1: #2}}
+ %\protected\def\writestatus#1#2{\immediate\write\statuswrite{#1: #2}}
+ \protected\def\writestatus#1#2{\message{#1: #2}}
\fi
\def\syst_basics_allocate_yes#1#2#3#4#5% last class method max name
@@ -302,8 +304,8 @@
%D Since the number of chars exceed 256 now, we can use \type {\chardef} instead of
%D the more limited \type {\mathchardef}.
-\normalprotected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \chardef\c_syst_max_allocated_register}
-\normalprotected\def\newmarks{\syst_basics_allocate\c_syst_last_allocated_marks\marks\chardef\c_syst_max_allocated_register}
+\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \chardef\c_syst_max_allocated_register}
+\protected\def\newmarks{\syst_basics_allocate\c_syst_last_allocated_marks\marks\chardef\c_syst_max_allocated_register}
%D Attributes are something very \LUATEX. In \CONTEXT\ you are not supposed to use
%D the attributes directly but always allocate then first. For instance attribute~0
@@ -312,14 +314,14 @@
\let\attributeunsetvalue\c_syst_min_counter_value % used to be \minusone
-\normalprotected\def\newattribute{\syst_basics_allocate\c_syst_last_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}
+\protected\def\newattribute{\syst_basics_allocate\c_syst_last_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}
%D Not used by \CONTEXT\ but for instance \PICTEX\ needs it. It's a trick to force
%D strings instead of tokens that take more memory. It's a trick to trick to force
%D strings. This macro is never used in \CONTEXT.
-%normalprotected\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
-\normalprotected\def\newhelp#1#2{\newtoks#1#1\expandafter{\detokenize{#2}}}
+%protected\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
+\protected\def\newhelp#1#2{\newtoks#1#1\expandafter{\detokenize{#2}}}
%D \macros
%D {scratchcounter,
@@ -442,6 +444,8 @@
\chardef \pluseight 8
\chardef \plusnine 9
\chardef \plusten 10
+\chardef \pluseleven 11
+\chardef \plustwelve 12
\chardef \plussixteen 16
\chardef \plusfifty 50
\chardef \plushundred 100
@@ -488,7 +492,7 @@
%D
%D We need this one soon:
-\normalprotected\def\dontcomplain
+\protected\def\dontcomplain
{\hbadness\plustenthousand
\vbadness\plustenthousand
\hfuzz \maxdimen
@@ -522,7 +526,7 @@
%D creates \type {\footrue}, \type {\foofalse} to go with \type {\iffoo}.
%D \stopnarrower
-% \normalprotected\def\newif#1%
+% \protected\def\newif#1%
% {\count@\escapechar
% \escapechar\minusone
% \expandafter\expandafter\expandafter\def\new_if #1{true}{\let#1\iftrue }%
@@ -540,7 +544,7 @@
% We use \csstring so there is no need to push/pop escapechar.
% We use different names so that we get a better error message.
%
-% \normalprotected\def\newif#1%
+% \protected\def\newif#1%
% {\let\new_if_saved\newif
% \let\newif\new_if_check
% \expandafter\expandafter\expandafter\def\new_if_cs #1{true}{\let#1\iftrue }%
@@ -548,12 +552,12 @@
% \new_if_cs#1{false}%
% \let\newif\new_if_saved}
%
-% \normalprotected\def\new_if_cs#1#2%
+% \protected\def\new_if_cs#1#2%
% {\csname\expandafter\newif\csstring#1#2\endcsname}
%
% We wrap all into one macro:
-\normalprotected\def\newif#1%
+\protected\def\newif#1%
{\let\new_if_saved\newif
\let\newif\new_if_check
\expandafter\def\csname\expandafter\newif\csstring#1true\endcsname {\let#1\iftrue }%
@@ -574,10 +578,21 @@
%D A few shortcuts:
-\normalprotected\def\udef {\normalprotected\def }
-\normalprotected\def\ugdef{\normalprotected\gdef}
-\normalprotected\def\uedef{\normalprotected\edef}
-\normalprotected\def\uxdef{\normalprotected\xdef}
+\protected\def\udef {\protected\def }
+\protected\def\ugdef{\protected\gdef}
+\protected\def\uedef{\protected\edef}
+\protected\def\uxdef{\protected\xdef}
+
+% For now:
+
+\protected\def\defUmathtopaccent #1#2#3#4{\global\instance\protected\def#1{\Umathaccent "#2 "#3 "#4 }}
+\protected\def\defUmathbotaccent #1#2#3#4{\global\instance\protected\def#1{\Umathbotaccent "#2 "#3 "#4 }}
+\protected\def\defUdelimiterover #1#2#3#4{\global\instance\protected\def#1{\Udelimiterover "#2 "#3 }}
+\protected\def\defUdelimiterunder #1#2#3#4{\global\instance\protected\def#1{\Udelimiterunder "#2 "#3 }}
+\protected\def\defUdelimiter #1#2#3#4{\global\instance\protected\def#1{\Udelimiter "#2 "#2 "#4 }}
+\protected\def\defUradical #1#2#3{\global\instance\protected\def#1{\Uradical "#2 "#3 }}
+\protected\def\defUroot #1#2#3{\global\instance\protected\def#1{\Uroot "#2 "#3 }}
+\protected\def\defUmathchar #1#2#3#4{\global\instance\Umathchardef #1 "#2 "#3 "#4 }
%D For a while we keep the following, as systems like tikz need it. Best
%D not use that one \CONTEXT.
@@ -694,7 +709,7 @@
% no longer \errorstopmode cf. plain tex 3.141592653
-\normalprotected\def\tracingall
+\protected\def\tracingall
{\tracingonline \plusone
\tracingcommands \plusthree
\tracingstats \plustwo
@@ -712,11 +727,11 @@
\tracingnesting \plustwo
\tracingassigns \plustwo}
-\normalprotected\def\loggingall
+\protected\def\loggingall
{\tracingall
\tracingonline \zerocount}
-\normalprotected\def\tracingnone
+\protected\def\tracingnone
{\tracingassigns \zerocount
\tracingnesting \zerocount
\tracingscantokens\zerocount
@@ -759,7 +774,7 @@
\newtoks\everydump
-\def\dump{\the\everydump\normaldump}
+\def\dump{\the\everydump\global\everydump\emptytoks\glet\dump\relax\normaldump}
%D The same applies for the startup actions.
@@ -809,11 +824,11 @@
\let\conditionalfalse\plusone % maybe we will have a dedicated count/chardef
\let\conditionaltrue \zerocount % maybe we will have a dedicated count/chardef
-\normalprotected\def\settrue #1{\let#1\conditionaltrue }
-\normalprotected\def\setfalse#1{\let#1\conditionalfalse}
+\protected\def\settrue #1{\let#1\conditionaltrue }
+\protected\def\setfalse#1{\let#1\conditionalfalse}
-\normalprotected\def\settruevalue #1{\expandafter\let\csname#1\endcsname\conditionaltrue }
-\normalprotected\def\setfalsevalue#1{\expandafter\let\csname#1\endcsname\conditionalfalse}
+\protected\def\settruevalue #1{\expandafter\let\csname#1\endcsname\conditionaltrue }
+\protected\def\setfalsevalue#1{\expandafter\let\csname#1\endcsname\conditionalfalse}
\let\newconditional\setfalse
\let\ifconditional \ifcase
@@ -829,13 +844,13 @@
%D Let's be complete and also introduce some definers. These are not mandate
%D but handy for grepping.
-\normalprotected\def\newmacro #1{\let#1\empty}
-\normalprotected\def\setnewmacro#1{\let#1}
+\protected\def\newmacro #1{\let#1\empty}
+\protected\def\setnewmacro#1{\let#1}
\def\!!zerocount{0}
\def\!!plusone {1}
-\normalprotected\def\newfraction#1{\let#1\!!plusone}
+\protected\def\newfraction#1{\let#1\!!plusone}
%D It would be handy to have a primitive \type {\unless\ifcase} because then we
%D could use nicer values. Anyhow, this conditional code used to be in the \type
@@ -857,19 +872,19 @@
%
% we assume a \cs. not toks0 or so
%
-% \normalprotected\def\appendtotoks #1#{\def\temp{#1}\afterassignment\doappendtotoks \scratchtoks=}
-% \normalprotected\def\prependtotoks#1#{\def\temp{#1}\afterassignment\doprependtotoks\scratchtoks=}
+% \protected\def\appendtotoks #1#{\def\temp{#1}\afterassignment\doappendtotoks \scratchtoks=}
+% \protected\def\prependtotoks#1#{\def\temp{#1}\afterassignment\doprependtotoks\scratchtoks=}
\newtoks\t_syst_toks_temp \let\m_syst_toks_temp\t_syst_toks_temp
-\normalprotected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
-\normalprotected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
+\protected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
+\protected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
% \def\syst_toks_append {\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\m_syst_toks_temp\the\t_syst_toks_temp}}}
% \def\syst_toks_prepend{\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\t_syst_toks_temp\the\m_syst_toks_temp}}}
-\normalprotected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
-\normalprotected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
+\protected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
+\protected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
\def\syst_toks_append_l {\normalexpanded{\m_syst_toks_temp{\the\m_syst_toks_temp\the\t_syst_toks_temp}}}
\def\syst_toks_prepend_l{\normalexpanded{\m_syst_toks_temp{\the\t_syst_toks_temp\the\m_syst_toks_temp}}}
@@ -877,14 +892,14 @@
\def\syst_toks_append_g {\global\syst_toks_append_l }
\def\syst_toks_prepend_g{\global\syst_toks_prepend_l}
-\normalprotected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
-\normalprotected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
+\protected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
+\protected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
\def\syst_toks_add_l{\m_syst_toks_temp\expandafter\bgroup\the\m_syst_toks_temp}
\def\syst_toks_add_g{\global\syst_toks_add_l}
-\normalprotected\def\addtotokscs #1#2{#1{\the#1#2}} % saves a few bytes
-\normalprotected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}} % saves a few bytes
+\protected\def\addtotokscs #1#2{#1{\the#1#2}} % saves a few bytes
+\protected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}} % saves a few bytes
%D \macros
%D {begcsname}
@@ -903,20 +918,20 @@
%
% \newtoks\everyendpar
%
-% \normalprotected\def\endpar{\the\everyendpar\normalpar}
-% \normalprotected\def\par {\endpar}
+% \protected\def\endpar{\the\everyendpar\normalpar}
+% \protected\def\par {\endpar}
%
-% \normalprotected\def\reseteverypar
+% \protected\def\reseteverypar
% {\everypar \emptytoks
% \everyendpar\emptytoks}
-\normalprotected\def\reseteverypar
+\protected\def\reseteverypar
{\everypar\emptytoks}
\let\endgraf\par
\let\endline\cr
-\normalprotected\def\null{\hpack{}}
+\protected\def\null{\hpack{}}
%D The following two might be overloaded later on but some modules need then
%D earlier. These functionality is reflected in the name and will not change.
@@ -995,8 +1010,11 @@
%D Sometimes kerns make more sense than glue but we need to be in the
%D right mode:
-\normalprotected\def\vkern{\ifhmode\par \fi\kern}
-\normalprotected\def\hkern{\ifvmode\dontleavehmode\fi\kern}
+\protected\def\vkern {\ifhmode\par \fi\kern}
+\protected\def\hkern {\ifvmode\dontleavehmode\fi\kern}
+
+\protected\def\vpenalty{\ifhmode\par \fi\penalty}
+\protected\def\hpenalty{\ifvmode\dontleavehmode\fi\penalty}
%D Again a few kind-of-extensions the core. These come from plain \TEX\ but
%D are probably not used in \CONTEXT.
@@ -1132,9 +1150,34 @@
\matheqnogapstep\zerocount % for now
-%D Experiment:
-
-\ifdefined\frozen \else \def\frozen{} \let\normalfrozen\frozen \fi
+%D For as long as we share code between \MKIV\ and \LMTX\ we need these:
+
+\ifdefined\overloadmode \else
+ \newcount\overloadmode
+ %
+ \let\frozen \empty
+ \let\tolerant \empty
+ \let\overloaded\empty
+ \let\aliased \empty
+ \let\permanent \empty
+ \let\immutable \empty
+ \let\mutable \empty
+ \let\instance \empty
+ \let\noaligned \empty
+ \let\enforced \empty
+ %
+ \let\unletfrozen\gobbleoneargument
+ \let\letfrozen \gobbleoneargument
+ \def\letcsname {\expandafter\let \csname}
+ \def\defcsname {\expandafter\def \csname}
+ \def\edefcsname {\expandafter\edef\csname}
+ %
+ \let\pushoverloadmode\relax
+ \let\popoverloadmode\relax
+
+ \let\pushrunstate\relax
+ \let\poprunstate \relax
+\fi
%D Now we define a few helpers that we need in a very early stage. We have no
%D message system yet but redundant definitions are fatal anyway.
@@ -1144,7 +1187,7 @@
\def\v_interfaces_prefix_template_system{\number \c_syst_helpers_n_of_namespaces>>}
%def\v_interfaces_prefix_template_system{\characters\c_syst_helpers_n_of_namespaces>>} % no \characters yet
-\normalprotected\def\installsystemnamespace#1%
+\protected\def\installsystemnamespace#1%
{\ifcsname ??#1\endcsname
\immediate\write\statuswrite{fatal error: duplicate system namespace '#1'}%
\expandafter\normalend
@@ -1174,4 +1217,27 @@
\let\eTeXglueshrinkorder \undefined
\let\eTeXgluestretchorder\undefined
+%D Experiment:
+
+\ifdefined\glyphdimensionsmode \else \newcount\glyphdimensionsmode \fi
+
+\glyphdimensionsmode\plusone
+
+%D For completeness (tokenizer commands have complements), so this one complements
+%D \type {\detokenize}, like \type {\expanded} and \type {\unexpanded}. Not that we
+%D ever needed this one:
+
+\ifdefined \tokenized \else
+ \def\tokenized#1{\scantextokens\expandafter{\normalexpanded{#1}}}
+\fi
+
+\ifdefined \unhpack \else
+ \let\unhpack\unhbox
+ \let\unvpack\unvbox
+\fi
+
+%D Needed:
+
+\let\nexttoken\relax
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkxl b/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkxl
deleted file mode 100644
index 9394807c8da..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-ini.mkxl
+++ /dev/null
@@ -1,1116 +0,0 @@
-%D \module
-%D [ file=syst-ini,
-%D version=2008.11.04, % 2001.11.16, % 1999.03.17, % an oldie: 1995.10.10
-%D title=\CONTEXT\ System Macros,
-%D subtitle=Bootstrapping \TEX,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D We used to load plain \TEX\ in a special way, but redefining a couple of
-%D primitives so that for instance font loading was ignored. For those interested,
-%D this loader is found in \type {syst-tex.tex}. Some of the comment's are Don
-%D Knuths and more of it can be found in the plain \TEX\ format.
-%D
-%D Characters can have special states, that can be triggered by setting their
-%D category coded. Some are preset, others are to be set as soon as possible,
-%D otherwise we cannot define any useful macros.
-%D
-%D First we define a bunch of constants. Normally we would \type {\setconstant}
-%D but we're prestine and have no macros defined yet. Abstraction also makes it
-%D possible to avoid the \type {^^} in the input.
-
-\chardef\escapecatcode 0
-\chardef\begingroupcatcode 1
-\chardef\endgroupcatcode 2
-\chardef\mathshiftcatcode 3
-\chardef\alignmentcatcode 4
-\chardef\endoflinecatcode 5
-\chardef\parametercatcode 6
-\chardef\superscriptcatcode 7
-\chardef\subscriptcatcode 8
-\chardef\ignorecatcode 9
-\chardef\spacecatcode 10
-\chardef\lettercatcode 11
-\chardef\othercatcode 12 % finally obsolete: \let\other \othercatcode
-\chardef\activecatcode 13 % finally obsolete: \let\active\activecatcode
-\chardef\commentcatcode 14
-\chardef\invalidcatcode 15
-
-%chardef\zeroasciicode 0
-\chardef\tabasciicode 9
-\chardef\newlineasciicode 10 % don't confuse this one with \endoflineasciicode
-\chardef\formfeedasciicode 12
-\chardef\endoflineasciicode 13 % somewhat messy but this can be the active \par
-\chardef\endoffileasciicode 26
-\chardef\spaceasciicode 32
-\chardef\exclamationmarkasciicode 33 % ! used in namespace protection
-\chardef\doublequoteasciicode 34 % "
-\chardef\hashasciicode 35
-\chardef\dollarasciicode 36
-\chardef\commentasciicode 37
-\chardef\ampersandasciicode 38
-\chardef\singlequoteasciicode 39 % '
-\chardef\primeasciicode 39 % '
-\chardef\leftparentasciicode 40
-\chardef\rightparentasciicode 41
-\chardef\hyphenasciicode 45
-\chardef\forwardslashasciicode 47 % /
-\chardef\colonasciicode 58
-\chardef\lessthanasciicode 60 % < used as alternative verbatim {
-\chardef\morethanasciicode 62 % > used as alternative verbatim }
-\chardef\questionmarkasciicode 63 % ? used in namespace protection
-\chardef\atsignasciicode 64 % @ used in namespace protection
-\chardef\backslashasciicode 92 % `\\
-\chardef\circumflexasciicode 94
-\chardef\underscoreasciicode 95
-\chardef\leftbraceasciicode 123 % `\{
-\chardef\barasciicode 124 % `\|
-\chardef\rightbraceasciicode 125 % `\}
-\chardef\tildeasciicode 126 % `\~
-\chardef\delasciicode 127
-
-%catcode\zeroasciicode \ignorecatcode % `\^^@ ascii null is ignored
-\catcode\tabasciicode \spacecatcode % `\^^I ascii tab is a blank space
-\catcode\formfeedasciicode \activecatcode % `\^^L ascii form-feed (active, set later)
-%catcode\endoflineasciicode \endoflinecatcode % `\^^M ascii return is end-line
-\catcode\endoffileasciicode \ignorecatcode % `\^^Z endoffile (ignored in ConTeXt)
-%catcode\spaceasciicode \spacecatcode % `\ ascii space is blank space
-\catcode\hashasciicode \parametercatcode % `\# hash mark is macro parameter character
-\catcode\dollarasciicode \mathshiftcatcode % `\$ dollar sign is math shift
-%catcode\commentasciicode \commentcatcode % `\% percent sign is comment character
-\catcode\ampersandasciicode \alignmentcatcode % `\& ampersand is alignment tab
-%catcode\backslashasciicode \escapecatcode % `\\ backslash is TeX escape character
-\catcode\circumflexasciicode \superscriptcatcode % `\^ circumflex and uparrow are for superscripts
-\catcode\underscoreasciicode \subscriptcatcode % `\_ underline and downarrow are for subscripts
-\catcode\leftbraceasciicode \begingroupcatcode % `\{ left brace is begin-group character
-\catcode\rightbraceasciicode \endgroupcatcode % `\} right brace is end-group character
-\catcode\tildeasciicode \activecatcode % `\~ tilde is active
-%catcode\delasciicode \invalidcatcode % `\^^? ascii delete is invalid
-
-\chardef\statuswrite 128
-
-%D First we need to initialization the primitives. Because \CONTEXT\ is already a
-%D pretty old macro package, we have a couple of issues with respect to primitives.
-%D The \ETEX\ engine added a few as did \PDFTEX. The \LUATEX\ engine added even
-%D more. This means that there can be a potential clash between primitives and
-%D existing macros. The most noticeable ones are:
-%D
-%D \starttyping
-%D \protected
-%D \expanded
-%D \unexpanded
-%D \stoptyping
-%D
-%D Because we had macros like that before the primitives showed up. The protection
-%D related macros were there before we even knew about extensions to the engine.
-%D When the expansion related ones were introduced, we originally came up with
-%D different names but due to requests we used the current names, somethng that in
-%D retrospect was a bad idea: they should have gotten different names in \LUATEX, if
-%D only because at that time only \CONTEXT\ was using them in rolling releases.
-%D Anyway, we're now stuck with this situation, and it means that one should use the
-%D \type {\normal...} variants in low level code:
-%D
-%D \starttyping
-%D \normalexpanded
-%D \normalprotected
-%D \normalunexpanded
-%D \stoptyping
-%D
-%D In the end not using different names in \LUATEX\ for these kind of backfires. It
-%D makes not much sense to fix this in \LUAMETATEX\ because we're now to long on the
-%D road. It is actually the reason why we have the option in \LUATEX\ to alias all
-%D primitives in one go using a prefix. Actually this trick could be used to recover
-%D a primitive meaning: just enable it with some prefix and \type {\let} the
-%D original to that. But \unknown\ we prevent that trick below.
-%D
-%D The code below differs from \LUATEX: in \LUAMETATEX\ all primitives are already
-%D available; it cannot limit itself to being \TEX\ or \ETEX. It could not do that
-%D anyway because there are differences (no backend, to mention one).
-
-\directlua {
- local primitives = tex.extraprimitives() % "tex","etex","luatex"
- tex.enableprimitives("normal",primitives) % could default to everything
- function tex.enableprimitives() end % so we kind of protect what's there
-}
-
-\def\space{ }
-\def\empty{}
-
-\letcharcode \formfeedasciicode \par % \def ^^L{\par} formfeed
-\letcharcode \tildeasciicode \ % tilde
-\letcharcode \spaceasciicode \space % space
-
-\expandafter\def\csname\Uchar\tabasciicode \endcsname {\ } % \def\^^I{\ } tab
-\expandafter\def\csname\Uchar\formfeedasciicode \endcsname {\par} % \def\^^L{\par} formfeed
-\expandafter\def\csname\Uchar\endoflineasciicode\endcsname {\ } % \def\^^M{\ } return
-
-%D For now:
-
-\def\gobbleoneargument#1{} % will be defined later on anyway
-
-%D First we define a simplified version of the \CONTEXT\ protection mechanism.
-%D Later we will implement a better variant.
-
-\def\unprotect
- {\edef\protect
- {\catcode\atsignasciicode \the\catcode\atsignasciicode \relax
- \catcode\exclamationmarkasciicode\the\catcode\exclamationmarkasciicode\relax
- \catcode\questionmarkasciicode \the\catcode\questionmarkasciicode \relax
- \catcode\underscoreasciicode \the\catcode\underscoreasciicode \relax
- \let\protect\relax}%
- \catcode\atsignasciicode \lettercatcode
- \catcode\exclamationmarkasciicode\lettercatcode
- \catcode\questionmarkasciicode \lettercatcode
- \catcode\underscoreasciicode \lettercatcode}
-
-\let\protect\relax
-
-\unprotect
-
-%D Some pretty important definitions:
-
-\let\bgroup={
-\let\egroup=}
-
-%D \macros
-%D {normalbgroup,normalgroup}
-%D
-%D No comment.
-
-%D Allocation of registers is done slightly different than in plain \TEX. First of
-%D all we use different reserved counters. We also don't implement a family handler
-%D because users are not supposed to implement their own math. We reserve the lowest
-%D 31 registers for scratch purposes. Keep in mind that in the core engine some
-%D registers are reserved: counters 0 upto 9, and counter 255.
-%D
-%D As with plain \TEX\ we recommend that macro designers always use \type {\global}
-%D assignments with respect to registers numbered 1, 3, 5 \unknown\ 31, and always
-%D non||\type {\global} assignments with respect to registers 0, 2, 4, \unknown\ 30.
-%D This will prevent \quote {save stack buildup} that might otherwise occur.
-%D
-%D We reserve some registers for special (management) purposes:
-
-% 0 - 20 : scratch
-% 21 - 127 : internal
-% 128 - 254 : inserts
-% 255 : page
-% 256 - : user
-
-\countdef \c_syst_min_allocated_register = 52 \c_syst_min_allocated_register = 256 % can change
-\countdef \c_syst_max_allocated_register = 53 \c_syst_max_allocated_register = 32767
-\countdef \c_syst_min_allocated_read = 54 \c_syst_min_allocated_read = -1
-\countdef \c_syst_max_allocated_read = 55 \c_syst_max_allocated_read = 16
-\countdef \c_syst_min_allocated_language = 56 \c_syst_min_allocated_language = 0
-\countdef \c_syst_max_allocated_language = 57 \c_syst_max_allocated_language = 255
-\countdef \c_syst_min_allocated_insert = 58 \c_syst_min_allocated_insert = 128
-\countdef \c_syst_max_allocated_insert = 59 \c_syst_max_allocated_insert = 254
-\countdef \c_syst_min_allocated_family = 60 \c_syst_min_allocated_family = 128
-\countdef \c_syst_max_allocated_family = 61 \c_syst_max_allocated_family = 255
-\countdef \c_syst_min_allocated_attribute = 62 \c_syst_min_allocated_attribute = 1024 % 0-1023 : private
-\countdef \c_syst_min_allocated_write = 63 \c_syst_min_allocated_write = 0
-\countdef \c_syst_max_allocated_write = 64 \c_syst_max_allocated_write = 127
-
-\countdef \c_syst_last_allocated_count = 32 \c_syst_last_allocated_count = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_dimen = 33 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_skip = 34 \c_syst_last_allocated_skip = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_muskip = 35 \c_syst_last_allocated_muskip = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_box = 36 \c_syst_last_allocated_box = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_toks = 37 \c_syst_last_allocated_toks = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_read = 38 \c_syst_last_allocated_read = \c_syst_min_allocated_read
-\countdef \c_syst_last_allocated_write = 39 \c_syst_last_allocated_write = \c_syst_min_allocated_write
-\countdef \c_syst_last_allocated_marks = 40 \c_syst_last_allocated_marks = \c_syst_min_allocated_register
-\countdef \c_syst_last_allocated_language = 41 \c_syst_last_allocated_language = \c_syst_min_allocated_language % not used in context
-\countdef \c_syst_last_allocated_insertion = 42 \c_syst_last_allocated_insertion = \c_syst_min_allocated_insert
-\countdef \c_syst_last_allocated_family = 43 \c_syst_last_allocated_family = \c_syst_min_allocated_family % not used in context
-\countdef \c_syst_last_allocated_attribute = 44 \c_syst_last_allocated_attribute = \c_syst_min_allocated_attribute % not used in context
-
-\countdef \c_syst_min_counter_value = 125 \c_syst_min_counter_value = -"7FFFFFFF % beware, we use index 125 at the lua end
-\countdef \c_syst_max_counter_value = 126 \c_syst_max_counter_value = "7FFFFFFF % beware, we use index 126 at the lua end
-
-\countdef \zerocount = 120 \zerocount = 0
-\countdef \plusone = 121 \plusone = 1
-\countdef \minusone = 122 \minusone = -1
-
-\countdef \normalpagebox = 127 \normalpagebox = 255 % hardcoded in pdftex/xetex
-
-% Only to be used by developers in very special cases!
-
-% \def\lastallocatedcount {\the\c_syst_last_allocated_count}
-% \def\lastallocateddimen {\the\c_syst_last_allocated_dimen}
-% \def\lastallocatedskip {\the\c_syst_last_allocated_skip}
-% \def\lastallocatedmuskip {\the\c_syst_last_allocated_muskip}
-% \def\lastallocatedbox {\the\c_syst_last_allocated_dimen}
-% \def\lastallocatedtoks {\the\c_syst_last_allocated_toks}
-% \def\lastallocatedattribute{\the\c_syst_last_allocated_attribute}
-
-% A few traditional allocations (these might go):
-
-\countdef \count@ 255 % hm, used in \newif .. todo: replace it there
-\dimendef \dimen@ 0
-\dimendef \dimen@i 1 % global only
-\dimendef \dimen@ii 2
-
-%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
-%D 255. Users can use the scratch registers upto 31 without problem but all others
-%D are reserved.
-
-\let\wlog\gobbleoneargument % Let's get rid of this one.
-
-%D The allocators share a common helper macro.
-
-\normalprotected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
-\normalprotected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
-\normalprotected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
-\normalprotected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
-\normalprotected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \mathchardef\c_syst_max_allocated_register}
-\normalprotected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
-\normalprotected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \chardef \c_syst_max_allocated_read}
-\normalprotected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \chardef \c_syst_max_allocated_write}
-\normalprotected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \mathchardef\c_syst_max_allocated_register}
-\normalprotected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
-
-%D We don't need these in \CONTEXT:
-
-\normalprotected\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\chardef \c_syst_max_allocated_language}
-\normalprotected\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \chardef \c_syst_max_allocated_family}
-
-\let\newfam\newfamily
-
-\firstvalidlanguage\plusone
-
-% Watch out, for the moment we disable the check for already being defined
-% later we will revert this but first all chardefs must be replaced.
-
-\normalprotected\def\newconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1}
-\normalprotected\def\setnewconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1#1} % just a number
-\normalprotected\def\setconstant {} % dummy, no checking, so it warns
-\normalprotected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
-
-% maybe setconstant with check
-
-% %D The next definitions are really needed (in \CONTEXT):
-
-\newlinechar\newlineasciicode \edef\outputnewlinechar{\Uchar\newlineasciicode} % {^^J}
-
-%D One reason to start high with allocation is that it permits us to allocate
-%D consecutive ranges more easily, for instance if for \MPLIB\ we want to allocate a
-%D continuous range of boxes. It also permits us to do a proper upward allocation
-%D for inserts. The current code evolved from code that dealt with older engines but
-%D as all engines now provide many registers we removed all traces.
-
-\ifdefined\writestatus \else
- %\normalprotected\def\writestatus#1#2{\immediate\write\statuswrite{#1: #2}}
- \normalprotected\def\writestatus#1#2{\message{#1: #2}}
-\fi
-
-\def\syst_basics_allocate_yes#1#2#3#4#5% last class method max name
- {\ifnum#1<#4\relax
- \global\advance#1\plusone
- \global#3#5=#1\relax
- \else
- \writestatus{warning}{no room for \string#2\space \string#5\space (max: \number#4)}%
- \fi}
-
-\def\syst_basics_allocate_nop#1#2#3#4#5% last class method max name
- {\writestatus{warning}{\string#2 \string#5 is already defined (\string\relax\space it first)}}
-
-\def\syst_basics_allocate#1#2#3#4#5% last class method max name
- {\ifx#5\undefined
- \expandafter\syst_basics_allocate_yes
- \else\ifx#5\relax
- \expandafter\expandafter\expandafter\syst_basics_allocate_yes
- \else
- \expandafter\expandafter\expandafter\syst_basics_allocate_nop
- \fi\fi
- #1#2#3#4#5}
-
-%D Since the number of chars exceed 256 now, we can use \type {\chardef} instead of
-%D the more limited \type {\mathchardef}.
-
-\normalprotected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \chardef\c_syst_max_allocated_register}
-\normalprotected\def\newmarks{\syst_basics_allocate\c_syst_last_allocated_marks\marks\chardef\c_syst_max_allocated_register}
-
-%D Attributes are something very \LUATEX. In \CONTEXT\ you are not supposed to use
-%D the attributes directly but always allocate then first. For instance attribute~0
-%D is reserved for special purposes (this might change). Attributes in the range
-%D 128-1023 are private and should not be touched.
-
-\let\attributeunsetvalue\c_syst_min_counter_value % used to be \minusone
-
-\normalprotected\def\newattribute{\syst_basics_allocate\c_syst_last_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}
-
-%D Not used by \CONTEXT\ but for instance \PICTEX\ needs it. It's a trick to force
-%D strings instead of tokens that take more memory. It's a trick to trick to force
-%D strings. This macro is never used in \CONTEXT.
-
-%normalprotected\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
-\normalprotected\def\newhelp#1#2{\newtoks#1#1\expandafter{\detokenize{#2}}}
-
-%D \macros
-%D {scratchcounter,
-%D scratchdimen,scratchskip,scratchmuskip,
-%D scratchbox,
-%D scratchtoks}
-%D
-%D We now define a few scratch registers, so that successive loads at least have
-%D some available. The private ones are used in cases where we don't want to
-%D intrude on normal scratch ones.
-
-\newcount \scratchcounter \newcount \globalscratchcounter \newcount \privatescratchcounter
-\newdimen \scratchdimen \newdimen \globalscratchdimen \newdimen \privatescratchdimen
-\newskip \scratchskip \newskip \globalscratchskip \newskip \privatescratchskip
-\newmuskip\scratchmuskip \newmuskip\globalscratchmuskip \newmuskip\privatescratchmuskip
-\newtoks \scratchtoks \newtoks \globalscratchtoks \newtoks \privatescratchtoks
-\newbox \scratchbox \newbox \globalscratchbox \newbox \privatescratchbox
-
-\newcount\scratchcounterone \newcount\scratchcountertwo \newcount\scratchcounterthree
-\newdimen \scratchdimenone \newdimen \scratchdimentwo \newdimen \scratchdimenthree
-\newskip \scratchskipone \newskip \scratchskiptwo \newskip \scratchskipthree
-\newmuskip\scratchmuskipone \newmuskip\scratchmuskiptwo \newmuskip\scratchmuskipthree
-\newtoks \scratchtoksone \newtoks \scratchtokstwo \newtoks \scratchtoksthree
-\newbox \scratchboxone \newbox \scratchboxtwo \newbox \scratchboxthree
-
-\newcount\scratchcounterfour \newcount\scratchcounterfive \newcount\scratchcountersix
-\newdimen \scratchdimenfour \newdimen \scratchdimenfive \newdimen \scratchdimensix
-\newskip \scratchskipfour \newskip \scratchskipfive \newskip \scratchskipsix
-\newmuskip\scratchmuskipfour \newmuskip\scratchmuskipfive \newmuskip\scratchmuskipsix
-\newtoks \scratchtoksfour \newtoks \scratchtoksfive \newtoks \scratchtokssix
-\newbox \scratchboxfour \newbox \scratchboxfive \newbox \scratchboxsix
-
-\newcount\globalscratchcounterone
-\newcount\globalscratchcountertwo
-\newcount\globalscratchcounterthree
-
-%D \macros
-%D {tempstring}
-
-\let\tempstring\empty
-
-%D \macros
-%D {scratchwidth, scratchheight, scratchdepth, scratchoffset, scratchdistance}
-%D
-%D A few more scratch dimensions:
-
-\newdimen\scratchwidth
-\newdimen\scratchheight
-\newdimen\scratchdepth
-\newdimen\scratchtotal
-
-\newdimen\scratchoffset
-\newdimen\scratchleftoffset
-\newdimen\scratchrightoffset
-\newdimen\scratchtopoffset
-\newdimen\scratchbottomoffset
-
-\newdimen\scratchdistance
-
-\newdimen\scratchhsize
-\newdimen\scratchvsize
-
-\newdimen\scratchxoffset
-\newdimen\scratchyoffset
-\newdimen\scratchhoffset
-\newdimen\scratchvoffset
-
-\newdimen\scratchxposition
-\newdimen\scratchyposition
-
-\newcount\scratchnx
-\newcount\scratchny
-
-\newcount\scratchmx
-\newcount\scratchmy
-
-\newcount\scratchmin
-\newcount\scratchmax
-
-\newcount\scratchunicode
-
-\newdimen\scratchleftskip
-\newdimen\scratchrightskip
-\newdimen\scratchtopskip
-\newdimen\scratchbottomskip
-
-%D More allocations:
-
-\newskip \zeroskip \zeroskip 0pt plus 0pt minus 0pt
-\newdimen \zeropoint \zeropoint 0pt
-\newdimen \onepoint \onepoint 1pt
-\newdimen \halfapoint \halfapoint 0.5pt
-\newdimen \maxdimen \maxdimen 16383.99999pt % 1073741823sp
-\newcount \maxcount \maxcount 2147483647
-\newdimen \onebasepoint \onebasepoint 1bp
-\newdimen \scaledpoint \scaledpoint 1sp
-\newdimen \thousandpoint \thousandpoint 1000pt
-\newmuskip\zeromuskip \zeromuskip 0mu
-\newmuskip\onemuskip \onemuskip 1mu
-
-\newmuskip\muquad \muquad 18mu
-
-\let\points \onepoint
-\let\halfpoint\halfapoint
-
-\newtoks \emptytoks
-
-%D And even more: (todo: countdefs 60+)
-
-%newcount\minusone \minusone -1
-\newcount\minustwo \minustwo -2
-%chardef \zerocount 0
-%chardef \plusone 1
-\chardef \plustwo 2
-\chardef \plusthree 3
-\chardef \plusfour 4
-\chardef \plusfive 5
-\chardef \plussix 6
-\chardef \plusseven 7
-\chardef \pluseight 8
-\chardef \plusnine 9
-\chardef \plusten 10
-\chardef \plussixteen 16
-\chardef \plusfifty 50
-\chardef \plushundred 100
-\chardef \plusonehundred 100
-\chardef \plustwohundred 200
-\chardef \plusfivehundred 500
-\chardef \pluscxxvii 127
-\chardef \pluscxxviii 128
-\chardef \pluscclv 255
-\chardef \pluscclvi 256
-\chardef \plusthousand 1000
-\chardef \plustenthousand 10000
-\chardef \plustwentythousand 20000
-\chardef \medcard 32768
-\chardef \maxcard 65536 % pdftex has less mathchars
-\chardef \maxcardminusone 65535
-
-%D \macros
-%D {doubleexpandafter,tripleexpandafter,expanded,startexpanded}
-%D
-%D A few handy shortcuts
-
-\let\singleexpandafter \expandafter
-\def\doubleexpandafter{\expandafter\expandafter\expandafter}
-\def\tripleexpandafter{\expandafter\doubleexpandafter\expandafter}
-
-%D We prefer the more readable variant than in plain \TEX. User should only
-%D use \type {\emptybox}:
-
-\newbox\voidbox % public
-
-\let\normalhbox\hbox
-\let\normalvbox\vbox
-
-\def\unvoidbox{\unhbox\voidbox}
-\def\emptybox {\box \voidbox} % used in initializations so no attributes
-\def\emptyvbox{\normalvpack{}} % no copy as we need to set attributes
-\def\emptyhbox{\normalhpack{}} % no copy as we need to set attributes
-
-\let\leavevmode\unvoidbox % we prefer to use \dontleavehmode
-
-%D \macros
-%D {dontcomplain}
-%D
-%D We need this one soon:
-
-\normalprotected\def\dontcomplain
- {\hbadness\plustenthousand
- \vbadness\plustenthousand
- \hfuzz \maxdimen
- \vfuzz \maxdimen}
-
-%D Some expected plain variants follow. We don't reuse registers because we
-%D don't want clashes.
-
-\let \p@ \onepoint
-\let \m@ne \minusone
-\let \z@ \zeropoint
-\let \@ne \plusone
-\let \tw@ \plustwo
-\let \thr@@ \plusthree
-\let \sixt@@n \plussixteen
-\let \@cclv \pluscclv
-\let \@cclvi \pluscclvi
-\let \voidb@x \voidbox
-\newtoks \toks@ % \scratchtoks
-
-%D We define \type {\newif} a la plain \TEX, but will redefine it later. As
-%D Knuth says:
-%D
-%D \startnarrower
-%D And here's a different sort of allocation: for example,
-%D
-%D \starttyping
-%D \newif\iffoo
-%D \stoptyping
-%D
-%D creates \type {\footrue}, \type {\foofalse} to go with \type {\iffoo}.
-%D \stopnarrower
-
-% \normalprotected\def\newif#1%
-% {\count@\escapechar
-% \escapechar\minusone
-% \expandafter\expandafter\expandafter\def\new_if #1{true}{\let#1\iftrue }%
-% \expandafter\expandafter\expandafter\def\new_if#1{false}{\let#1\iffalse}%
-% \new_if#1{false}% the condition starts out false
-% \escapechar\count@}
-%
-% \def\new_if#1#2%
-% {\csname\expandafter\if@\string#1#2\endcsname}
-%
-% \bgroup % `if' is required
-% \uccode`1=`i \uccode`2=`f \uppercase{\gdef\if@12{}}
-% \egroup
-
-% We use \csstring so there is no need to push/pop escapechar.
-% We use different names so that we get a better error message.
-%
-% \normalprotected\def\newif#1%
-% {\let\new_if_saved\newif
-% \let\newif\new_if_check
-% \expandafter\expandafter\expandafter\def\new_if_cs #1{true}{\let#1\iftrue }%
-% \expandafter\expandafter\expandafter\def\new_if_cs#1{false}{\let#1\iffalse}%
-% \new_if_cs#1{false}%
-% \let\newif\new_if_saved}
-%
-% \normalprotected\def\new_if_cs#1#2%
-% {\csname\expandafter\newif\csstring#1#2\endcsname}
-%
-% We wrap all into one macro:
-
-\normalprotected\def\newif#1%
- {\let\new_if_saved\newif
- \let\newif\new_if_check
- \expandafter\def\csname\expandafter\newif\csstring#1true\endcsname {\let#1\iftrue }%
- \expandafter\def\csname\expandafter\newif\csstring#1false\endcsname{\let#1\iffalse}%
- \csname\expandafter\newif\csstring#1false\endcsname
- \let\newif\new_if_saved}
-
-\bgroup
- \normalexpanded{\gdef\noexpand\new_if_check\string i\string f{}}
-\egroup
-
-%D Let's test this one:
-
-\newif\ifdone
-\newif\iffound
-
-\let\htdp\boxtotal
-
-%D A few shortcuts:
-
-\normalprotected\def\udef {\normalprotected\def }
-\normalprotected\def\ugdef{\normalprotected\gdef}
-\normalprotected\def\uedef{\normalprotected\edef}
-\normalprotected\def\uxdef{\normalprotected\xdef}
-
-%D For a while we keep the following, as systems like tikz need it. Best
-%D not use that one \CONTEXT.
-
-\let\active\activecatcode
-
-%D Constants to be used with \type {\currentgrouptype}.
-
-\chardef\bottomlevelgroupcode = 0
-\chardef\simplegroupcode = 1
-\chardef\hboxgroupcode = 2
-\chardef\adjustedhboxgroupcode = 3
-\chardef\vboxgroupcode = 4
-\chardef\vtopgroupcode = 5
-\chardef\aligngroupcode = 6
-\chardef\noaligngroupcode = 7
-\chardef\outputgroupcode = 8
-\chardef\mathgroupcode = 9
-\chardef\discretionarygroupcode = 10
-\chardef\insertgroupcode = 11
-\chardef\vcentergroupcode = 12
-\chardef\mathchoicegroupcode = 13
-\chardef\semisimplegroupcode = 14
-\chardef\mathshiftgroupcode = 15
-\chardef\mathleftgroupcode = 16
-\chardef\vadjustgroupcode = \insertgroupcode
-
-%D Constants to be used with \type {\interactionmode}.
-
-\chardef\batchmodecode \zerocount
-\chardef\nonstopmodecode \plusone
-\chardef\scrollmodecode \plustwo
-\chardef\errorstopmodecode \plusthree
-
-%D Constants to be used with \type {\lastnodetype}. The \type {\lastnodetype}
-%D primitive is \ETEX\ compliant. The valid range is still -1 .. 15 and glyph nodes
-%D have number 0 (used to be char node) and ligature nodes are mapped to 7. That way
-%D macro packages can use the same symbolic names as in traditional \ETEX. Keep in
-%D mind that the internal node numbers are different and that there are more node
-%D types that 15. The mode parameter forces \LUAMETATEX\ to use the real node
-%D numbers.
-
-\internalcodesmode\plusone
-
-%D Constants to be used with \type {\currentiftype}. I wonder if we will ever
-%D use these in \CONTEXT. We have a few more anyway and in \LUAMETATEX\ we
-%D have different numbers. So for now let's just not define them. The
-%D previously mentioned mode parameters enables the real numbers (we have
-%D some more and they are therefore ordered differently).
-
-% \chardef\charifcode = 1
-% \chardef\catifcode = 2
-% \chardef\numifcode = 3
-% \chardef\dimifcode = 4
-% \chardef\oddifcode = 5
-% \chardef\vmodeifcode = 6
-% \chardef\hmodeifcode = 7
-% \chardef\mmodeifcode = 8
-% \chardef\innerifcode = 9
-% \chardef\voidifcode = 10
-% \chardef\hboxifcode = 11
-% \chardef\vboxifcode = 12
-% \chardef\xifcode = 13
-% \chardef\eofifcode = 14
-% \chardef\trueifcode = 15
-% \chardef\falseifcode = 16
-% \chardef\caseifcode = 17
-% \chardef\definedifcode = 18
-% \chardef\csnameifcode = 19
-% \chardef\fontcharifcode = 20
-%
-% % there are some more in luametatex
-
-%D Of course we want even bigger log files, so we copied this from the \ETEX\
-%D source files.
-%D
-%D When watching such logs, beware of nasty side effects of \type {\scantokens},
-%D as in:
-%D
-%D \starttyping
-%D \bgroup
-%D \lccode`a=12\lowercase{\xdef\whatever{a}}\egroup
-%D \def\whatever{test \whatever test}
-%D \scantokens\expandafter{\whatever}
-%D \egroup
-%D \stoptyping
-%D
-%D In \LUATEX\ we have ways around this.
-
-% no longer \errorstopmode cf. plain tex 3.141592653
-
-\normalprotected\def\tracingall
- {\tracingonline \plusone
- \tracingcommands \plusthree
- \tracingstats \plustwo
- \tracingpages \plusone
- \tracingoutput \plusone
- \tracinglostchars \plustwo
- \tracingmacros \plustwo
- \tracingparagraphs\plusone
- \tracingrestores \plusone
- \showboxbreadth \maxdimen
- \showboxdepth \maxdimen
- \tracinggroups \plusone
- \tracingifs \plusone
- \tracingscantokens\plusone
- \tracingnesting \plustwo
- \tracingassigns \plustwo}
-
-\normalprotected\def\loggingall
- {\tracingall
- \tracingonline \zerocount}
-
-\normalprotected\def\tracingnone
- {\tracingassigns \zerocount
- \tracingnesting \zerocount
- \tracingscantokens\zerocount
- \tracingifs \zerocount
- \tracinggroups \zerocount
- \showboxdepth \plusthree
- \showboxbreadth \plusfive
- \tracingrestores \zerocount
- \tracingparagraphs\zerocount
- \tracingmacros \zerocount
- \tracinglostchars \plusone
- \tracingoutput \zerocount
- \tracingpages \zerocount
- \tracingstats \zerocount
- \tracingcommands \zerocount
- \tracingonline \zerocount}
-
-%D When we want to see a box we can as well show all of it.
-
-\showboxdepth \maxdimen
-\showboxbreadth\maxdimen
-
-%D Just for tracing purposes we set:
-
-\tracingstats\plusone
-
-%D Here we also save \type {\input}, more will be saved later.
-
-\ifdefined\normalinput \else \let\normalinput\input \fi
-
-%D We don't like outer commands, and we always want access to the original
-%D \type {\input} primitive.
-
-\let\normalouter\outer \def\outer{} % no longer \relax
-
-%D To circumvent dependencies, we can postpone certain initializations to
-%D dumping time, by appending them to the \type {\everydump} token register.
-
-\ifdefined\normaldump \else \let\normaldump\dump \fi
-
-\newtoks\everydump
-
-\def\dump{\the\everydump\normaldump}
-
-%D The same applies for the startup actions.
-
-\ifdefined\normaleveryjob \else \let\normaleveryjob\everyjob \fi
-
-\let\everyjob\relax \newtoks\everyjob
-
-\normaleveryjob{\the\everyjob}
-
-%D \macros
-%D {newconditional,
-%D settrue, setfalse,
-%D ifconditional,then}
-%D
-%D \TEX's lacks boolean variables, although the \PLAIN\ format implements \type
-%D {\newif}. The main disadvantage of this scheme is that it takes three hash table
-%D entries. A more memory saving alternative is presented here. A conditional is
-%D defined by:
-%D
-%D \starttyping
-%D \newconditional\doublesided
-%D \setfalse
-%D \stoptyping
-%D Setting a conditional is done by \type{\settrue} and
-%D \type{\setfalse}:
-%D
-%D \starttyping
-%D \settrue\doublesided
-%D \setfalse
-%D \stoptyping
-%D while testing is accomplished by:
-%D
-%D \starttyping
-%D \ifconditional\doublesided ... \else ... \fi
-%D \setfalse
-%D \stoptyping
-%D We cannot use the simple scheme:
-%D
-%D \starttyping
-%D \def\settrue #1{\let#1=\iftrue}
-%D \def\setfalse#1{\let#1=\iffalse}
-%D \stoptyping
-%D
-%D Such an implementation gives problems with nested conditionals. The next
-%D implementation is about as fast and just as straightforward:
-
-\let\conditionalfalse\plusone % maybe we will have a dedicated count/chardef
-\let\conditionaltrue \zerocount % maybe we will have a dedicated count/chardef
-
-\normalprotected\def\settrue #1{\let#1\conditionaltrue }
-\normalprotected\def\setfalse#1{\let#1\conditionalfalse}
-
-\normalprotected\def\settruevalue #1{\expandafter\let\csname#1\endcsname\conditionaltrue }
-\normalprotected\def\setfalsevalue#1{\expandafter\let\csname#1\endcsname\conditionalfalse}
-
-\let\newconditional\setfalse
-\let\ifconditional \ifcase
-
-\let\then\relax % so that we can say: \ifnum1>2\then -)
-
-\def\truecondition {\iftrue}
-\def\falsecondition{\iffalse}
-
-% This one has to be unprotected otherwise we get a files-ends-to-soon but it's ok
-% as conditions expand anyway.
-
-\def\quitcondition{\orelse\iffalse}
-
-%D \macros
-%D {newmacro,setnewmacro,newfraction}
-%D
-%D Let's be complete and also introduce some definers. These are not mandate
-%D but handy for grepping.
-
-\normalprotected\def\newmacro #1{\let#1\empty}
-\normalprotected\def\setnewmacro#1{\let#1}
-
-\def\!!zerocount{0}
-\def\!!plusone {1}
-
-\normalprotected\def\newfraction#1{\let#1\!!plusone}
-
-%D It would be handy to have a primitive \type {\unless\ifcase} because then we
-%D could use nicer values. Anyhow, this conditional code used to be in the \type
-%D {syst-aux} module but is now promoted to here.
-
-%D \macros
-%D {ifzeropt}
-%D
-%D The next macro is both cosmetic and byte saving. It is pretty \type
-%D {\if}||safe too. It can be used in cases like:
-%D
-%D \starttyping
-%D \ifzeropt \somedimen ... \else ... \fi
-%D \stoptyping
-
-\let\ifzeropt\ifcase
-
-% these token list helpers might move to syst-aux.mkiv
-%
-% we assume a \cs. not toks0 or so
-%
-% \normalprotected\def\appendtotoks #1#{\def\temp{#1}\afterassignment\doappendtotoks \scratchtoks=}
-% \normalprotected\def\prependtotoks#1#{\def\temp{#1}\afterassignment\doprependtotoks\scratchtoks=}
-
-\newtoks\t_syst_toks_temp \let\m_syst_toks_temp\t_syst_toks_temp
-
-\normalprotected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
-\normalprotected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
-
-% \def\syst_toks_append {\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\m_syst_toks_temp\the\t_syst_toks_temp}}}
-% \def\syst_toks_prepend{\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\t_syst_toks_temp\the\m_syst_toks_temp}}}
-
-\normalprotected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
-\normalprotected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
-
-\def\syst_toks_append_l {\normalexpanded{\m_syst_toks_temp{\the\m_syst_toks_temp\the\t_syst_toks_temp}}}
-\def\syst_toks_prepend_l{\normalexpanded{\m_syst_toks_temp{\the\t_syst_toks_temp\the\m_syst_toks_temp}}}
-
-\def\syst_toks_append_g {\global\syst_toks_append_l }
-\def\syst_toks_prepend_g{\global\syst_toks_prepend_l}
-
-\normalprotected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
-\normalprotected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
-
-\def\syst_toks_add_l{\m_syst_toks_temp\expandafter\bgroup\the\m_syst_toks_temp}
-\def\syst_toks_add_g{\global\syst_toks_add_l}
-
-\normalprotected\def\addtotokscs #1#2{#1{\the#1#2}} % saves a few bytes
-\normalprotected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}} % saves a few bytes
-
-%D \macros
-%D {begcsname}
-%D
-%D Handy for \ETEX-only usage (avoids making \type {\relax}'s:
-
-% \def\begcsname#1\endcsname{\ifcsname#1\endcsname\csname#1\endcsname\fi}
-
-\let\begcsname\begincsname
-
-%D Now come a few macros that might be needed in successive loading. We redefine the
-%D \type {\par} primitive pretty soon so that we get the equivalents right.
-
-% too tricky: \par is use more often than a par starts so we have too much change
-% that we get assymetrical behaviour
-%
-% \newtoks\everyendpar
-%
-% \normalprotected\def\endpar{\the\everyendpar\normalpar}
-% \normalprotected\def\par {\endpar}
-%
-% \normalprotected\def\reseteverypar
-% {\everypar \emptytoks
-% \everyendpar\emptytoks}
-
-\normalprotected\def\reseteverypar
- {\everypar\emptytoks}
-
-\let\endgraf\par
-\let\endline\cr
-
-\normalprotected\def\null{\hpack{}}
-
-%D The following two might be overloaded later on but some modules need then
-%D earlier. These functionality is reflected in the name and will not change.
-
-% \bgroup
-% \catcode`\^^M=\activecatcode%
-% \gdef\obeylines{\catcode`\^^M\activecatcode \let^^M\par}%
-% \glet^^M\par%
-% \egroup
-%
-% \bgroup
-% \gdef\obeyspaces{\catcode`\ \activecatcode}%
-% \obeyspaces\glet =\space%
-% \egroup
-
-\def\obeylines {\catcode\endoflineasciicode\activecatcode\letcharcode\endoflineasciicode\par}
-\def\obeyspaces{\catcode\spaceasciicode \activecatcode\letcharcode\spaceasciicode \space}
-
-% %D A constant:
-%
-% \let\endoflinetoken=^^M
-
-%D Also needed might be a simple loop structure and we borrow plain \TEX's one
-%D as it is often expected to be present and it is about the fastest you can
-%D get. Beware: this macro does not support nested loops. We use a namespace
-%D prefix \type {@@pln}.
-
-\def\loop#1\repeat{\def\@@plnbody{#1}\@@plniterate} % might go
-
-%D The following makes \type {\loop} \unknown\ \type {\if} \unknown\ \type
-%D {\repeat} skippable (clever trick):
-
-\let\repeat\fi % so both \loop and \repeat are reserved words!
-
-%D The original (no \type {@@pln} there):
-%D
-%D \starttyping
-%D \def\@@plniterate{\@@plnbody\let\next\@@plniterate\else\let\next\relax\fi\next}
-%D \stoptyping
-%D
-%D A more efficient alternative:
-%D
-%D \starttyping
-%D \def\@@plniterate{\@@plnbody\expandafter\@@plniterate\else\expandafter\relax\fi}
-%D \stoptyping
-%D
-%D An even more efficient one:
-
-\def\@@plniterate{\@@plnbody\expandafter\@@plniterate\else\fi}
-
-%D We don't define a real output routine yet but at least get rid of pages:
-
-\output{\shipout\box\normalpagebox}
-
-%D Although we don't add pagenumbers yet we alias the default register used
-%D for counting pages:
-
-\countdef\pageno\zerocount \pageno\plusone % first page is number 1
-
-%D Beside the raw counter \type {\pageno} the \type {\folio} macro provides
-%D the value.
-
-\def\folio{\the\pageno} % kind of expected and therefore reserved
-
-%D The following registers are kind of standard and (for the moment) we define
-%D them here. This might change.
-
-\newskip \bigskipamount \bigskipamount = 12pt plus 4pt minus 4pt
-\newskip \medskipamount \medskipamount = 6pt plus 2pt minus 2pt
-\newskip \smallskipamount \smallskipamount = 3pt plus 1pt minus 1pt
-
-\baselineskip = 12pt
-\lineskip = 1pt
-\lineskiplimit = 0pt
-
-%D Sometimes kerns make more sense than glue but we need to be in the
-%D right mode:
-
-\normalprotected\def\vkern{\ifhmode\par \fi\kern}
-\normalprotected\def\hkern{\ifvmode\dontleavehmode\fi\kern}
-
-%D Again a few kind-of-extensions the core. These come from plain \TEX\ but
-%D are probably not used in \CONTEXT.
-
-\newskip \hideskip \hideskip = -1000pt plus 1fill
-\newskip \centering \centering = 0pt plus 1000pt minus 1000pt
-
-\def\hidewidth % for alignment entries that can stick out
- {\hskip\hideskip}
-
-\def\ialign % initialized \halign
- {\everycr\emptytoks
- \tabskip\zeroskip
- \halign}
-
-\newcount \mscount
-
-\def\spanomit{\span\omit} % bypass error message
-
-\def\multispan#1%
- {\omit
- \mscount#1\relax
- \loop
- \ifnum\mscount>\plusone
- \spanomit \advance\mscount\minusone
- \repeat}
-
-\let\nopdfcompression \relax
-\let\onlypdfobjectcompression\relax
-\let\maximumpdfcompression \relax
-\let\normalpdfcompression \relax
-
-%D Basic status stuff.
-
-\newif\ifproductionrun
-
-%D For those who expect this \unknown
-
-\ifx\fmtname \undefined \def\fmtname {ConTeXt Initial TeX} \fi
-\ifx\fmtversion\undefined \def\fmtversion{3.1415926} \fi
-
-%D A few bonus macros:
-
-\def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax}
-\def\dividenumber#1#2{\the\numexpr(#2-(#1/2))/#1\relax}
-
-%D These could be set at the \LUA\ end instead:
-
-\edef\texenginename {\directlua{tex.print(LUATEXENGINE)}}
-\edef\texengineversion {\directlua{tex.print(LUATEXVERSION)}}
-\edef\texenginefunctionality{\directlua{tex.print(LUATEXFUNCTIONALITY)}}
-
-%D We have no reason not to enable this:
-
-\savingvdiscards\plusone
-
-%D We only can set this one via directives (system.synctex) and we only support
-%D the context variant. This will go away completely.
-
-\newcount\synctex \let\normalsynctex\synctex
-
-%D We get rid of the funny \TEX\ offset defaults of one inch by setting them to zero.
-
-\voffset\zeropoint \let\voffset\relax \newdimen\voffset \let\normalvoffset\voffset
-\hoffset\zeropoint \let\hoffset\relax \newdimen\hoffset \let\normalhoffset\hoffset
-
-\matheqnogapstep\zerocount % for now
-
-%D Now we define a few helpers that we need in a very early stage. We have no
-%D message system yet but redundant definitions are fatal anyway.
-
-\newcount\c_syst_helpers_n_of_namespaces \c_syst_helpers_n_of_namespaces\pluseight % 1-8 reserved for catcodes
-
-\def\v_interfaces_prefix_template_system{\number \c_syst_helpers_n_of_namespaces>>}
-%def\v_interfaces_prefix_template_system{\characters\c_syst_helpers_n_of_namespaces>>} % no \characters yet
-
-\normalprotected\def\installsystemnamespace#1%
- {\ifcsname ??#1\endcsname
- \immediate\write\statuswrite{fatal error: duplicate system namespace '#1'}%
- \expandafter\normalend
- \else
- \global\advance\c_syst_helpers_n_of_namespaces\plusone
- \expandafter\edef\csname ??#1\endcsname{\v_interfaces_prefix_template_system}%
- \fi}
-
-%D It makes more sense to have these here:
-
-\let\normalsuperscript \Usuperscript
-\let\normalsubscript \Usubscript
-\let\normalnosuperscript\Unosuperscript
-\let\normalnosubscript \Unosubscript
-\let\normalstartimath \Ustartmath
-\let\normalstopimath \Ustopmath
-\let\normalstartdmath \Ustartdisplaymath
-\let\normalstopdmath \Ustopdisplaymath
-
-%D Also better here:
-
-\def\wildcardsymbol{*}
-
-%D For a while we will keep these useless numbers as for instance tikz checks for them:
-
-\chardef\eTeXversion 2
-\def \eTeXrevision {2}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua
index 5911d7f0059..085f75eca92 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.lua
@@ -6,13 +6,43 @@ if not modules then modules = { } end modules ['syst-lua'] = {
license = "see context related readme files"
}
+local load, type, tonumber = load, type, tonumber
+local concat = table.concat
+local utfchar = utf.char
local find = string.find
local S, C, P, lpegmatch, lpegtsplitat = lpeg.S, lpeg.C, lpeg.P, lpeg.match, lpeg.tsplitat
-commands = commands or { }
-local commands = commands
-local context = context
-local implement = interfaces.implement
+local xmath = xmath or math
+local xcomplex = xcomplex or { }
+
+local cmd = tokens.commands
+
+local scan_next = token.scan_next or token.get_next
+local scan_cmdchr = token.scan_cmdchr_expanded
+
+local get_command = token.get_command
+local get_mode = token.get_mode
+local get_index = token.get_index
+local get_csname = token.get_csname
+local get_macro = token.get_macro
+
+local put_next = token.put_next
+
+local scan_token = token.scan_token or token.get_token
+
+local getdimen = tex.getdimen
+local getglue = tex.getglue
+local getcount = tex.getcount
+local gettoks = tex.gettoks
+local gettex = tex.get
+
+local context = context
+local dimenfactors = number.dimenfactors
+
+commands = commands or { }
+local commands = commands
+local context = context
+local implement = interfaces.implement
local ctx_protected_cs = context.protected.cs -- more efficient
local ctx_firstoftwoarguments = context.firstoftwoarguments
@@ -20,11 +50,9 @@ local ctx_secondoftwoarguments = context.secondoftwoarguments
local ctx_firstofoneargument = context.firstofoneargument
local ctx_gobbleoneargument = context.gobbleoneargument
-local two_strings = interfaces.strings[2]
-
implement { -- will be overloaded later
name = "writestatus",
- arguments = two_strings,
+ arguments = "2 strings",
actions = logs.status,
}
@@ -123,7 +151,7 @@ implement {
implement {
name = "doifelsesame",
- arguments = two_strings,
+ arguments = "2 strings",
actions = function(a,b)
if a == b then
ctx_firstoftwoarguments()
@@ -135,7 +163,7 @@ implement {
implement {
name = "doifsame",
- arguments = two_strings,
+ arguments = "2 strings",
actions = function(a,b)
if a == b then
ctx_firstofoneargument()
@@ -147,7 +175,7 @@ implement {
implement {
name = "doifnotsame",
- arguments = two_strings,
+ arguments = "2 strings",
actions = function(a,b)
if a == b then
ctx_gobbleoneargument()
@@ -164,237 +192,107 @@ implement {
-- stick to the next gimmick. It looks inefficient but performance is actually quite
-- efficient.
-local concat = table.concat
-local utfchar = utf.char
-local load, type, tonumber = load, type, tonumber
-
-local xmath = xmath or math
-local xcomplex = xcomplex or { }
+do
-local cmd = tokens.commands
+ local result = { "return " }
+ local word = { }
+ local r = 1
+ local w = 0
-local get_next = token.get_next
-local get_command = token.get_command
-local get_mode = token.get_mode
-local get_index = token.get_index
-local get_csname = token.get_csname
-local get_macro = token.get_macro
+ local report = logs.reporter("system","expression")
-local put_next = token.put_next
-
-local scan_token = token.scan_token
-
-local getdimen = tex.getdimen
-local getglue = tex.getglue
-local getcount = tex.getcount
-local gettoks = tex.gettoks
-local gettex = tex.get
-
-local context = context
-local dimenfactors = number.dimenfactors
-
-local result = { "return " }
-local word = { }
-local r = 1
-local w = 0
-
-local report = logs.reporter("system","expression")
-
-local function unexpected(c)
- report("unexpected token %a",c)
-end
+ local function unexpected(c)
+ report("unexpected token %a",c)
+ end
-local function expression()
- local w = 0
- local r = 1
- while true do
- local t = get_next()
- local n = get_command(t)
- local c = cmd[n]
- -- todo, helper: returns number
- if c == "letter" then
- w = w + 1 ; word[w] = utfchar(get_mode(t))
- else
- if w > 0 then
- local s = concat(word,"",1,w)
- local d = dimenfactors[s]
- if d then
- r = r + 1 ; result[r] = "*"
- r = r + 1 ; result[r] = 1/d
- else
- if xmath[s] then
- r = r + 1 ; result[r] = "xmath."
- elseif xcomplex[s] then
- r = r + 1 ; result[r] = "xcomplex."
+ local function expression()
+ local w = 0
+ local r = 1
+ while true do
+ local t = scan_next()
+ local n = get_command(t)
+ local c = cmd[n]
+ -- todo, helper: returns number
+ if c == "letter" then
+ w = w + 1 ; word[w] = utfchar(get_mode(t))
+ else
+ if w > 0 then
+ local s = concat(word,"",1,w)
+ local d = dimenfactors[s]
+ if d then
+ r = r + 1 ; result[r] = "*"
+ r = r + 1 ; result[r] = 1/d
+ else
+ if xmath[s] then
+ r = r + 1 ; result[r] = "xmath."
+ elseif xcomplex[s] then
+ r = r + 1 ; result[r] = "xcomplex."
+ end
+ r = r + 1 ; result[r] = s
end
- r = r + 1 ; result[r] = s
+ w = 0
end
- w = 0
- end
- if c == "other_char" then
- r = r + 1 ; result[r] = utfchar(get_mode(t))
- elseif c == "spacer" then
- -- r = r + 1 ; result[r] = " "
- elseif c == "relax" then
- break
- elseif c == "assign_int" then
- r = r + 1 ; result[r] = getcount(get_index(t))
- elseif c == "assign_dimen" then
- r = r + 1 ; result[r] = getdimen(get_index(t))
- elseif c == "assign_glue" then
- r = r + 1 ; result[r] = getglue(get_index(t))
- elseif c == "assign_toks" then
- r = r + 1 ; result[r] = gettoks(get_index(t))
- elseif c == "char_given" or c == "math_given" or c == "xmath_given" then
- r = r + 1 ; result[r] = get_mode(t)
- elseif c == "last_item" then
- local n = get_csname(t)
- if n then
- local s = gettex(n)
- if s then
- r = r + 1 ; result[r] = s
+ if c == "other_char" then
+ r = r + 1 ; result[r] = utfchar(get_mode(t))
+ elseif c == "spacer" then
+ -- r = r + 1 ; result[r] = " "
+ elseif c == "relax" then
+ break
+ elseif c == "assign_int" then
+ r = r + 1 ; result[r] = getcount(get_index(t))
+ elseif c == "assign_dimen" then
+ r = r + 1 ; result[r] = getdimen(get_index(t))
+ elseif c == "assign_glue" then
+ r = r + 1 ; result[r] = getglue(get_index(t))
+ elseif c == "assign_toks" then
+ r = r + 1 ; result[r] = gettoks(get_index(t))
+ elseif c == "char_given" or c == "math_given" or c == "xmath_given" then
+ r = r + 1 ; result[r] = get_mode(t)
+ elseif c == "last_item" then
+ local n = get_csname(t)
+ if n then
+ local s = gettex(n)
+ if s then
+ r = r + 1 ; result[r] = s
+ else
+ unexpected(c)
+ end
else
unexpected(c)
end
- else
- unexpected(c)
- end
- elseif c == "call" then
- local n = get_csname(t)
- if n then
- local s = get_macro(n)
- if s then
- r = r + 1 ; result[r] = s
+ elseif c == "call" then
+ local n = get_csname(t)
+ if n then
+ local s = get_macro(n)
+ if s then
+ r = r + 1 ; result[r] = s
+ else
+ unexpected(c)
+ end
else
unexpected(c)
end
+ elseif c == "the" or c == "convert" or c == "lua_expandable_call" then
+ put_next(t)
+ scan_token() -- expands
else
unexpected(c)
end
- elseif c == "the" or c == "convert" or c == "lua_expandable_call" then
- put_next(t)
- scan_token() -- expands
- else
- unexpected(c)
end
end
+ local code = concat(result,"",1,r)
+ local func = load(code)
+ if type(func) == "function" then
+ context(func())
+ else
+ report("invalid lua %a",code)
+ end
end
- local code = concat(result,"",1,r)
- local func = load(code)
- if type(func) == "function" then
- context(func())
- else
- report("invalid lua %a",code)
- end
-end
--- local letter_code <const> = cmd.letter
--- local other_char_code <const> = cmd.other_char
--- local spacer_code <const> = cmd.spacer
--- local other_char_code <const> = cmd.other_char
--- local relax_code <const> = cmd.relax
--- local assign_int_code <const> = cmd.assign_int
--- local assign_dimen_code <const> = cmd.assign_dimen
--- local assign_glue_code <const> = cmd.assign_glue
--- local assign_toks_code <const> = cmd.assign_toks
--- local char_given_code <const> = cmd.char_given
--- local math_given_code <const> = cmd.math_given
--- local xmath_given_code <const> = cmd.xmath_given
--- local last_item_code <const> = cmd.last_item
--- local call_code <const> = cmd.call
--- local the_code <const> = cmd.the
--- local convert_code <const> = cmd.convert
--- local lua_expandable_call_code <const> = cmd.lua_expandable_call
---
--- local function unexpected(c)
--- report("unexpected token %a",c)
--- end
---
--- local function expression()
--- local w = 0
--- local r = 1
--- while true do
--- local t = get_next()
--- local n = get_command(t)
--- if n == letter_code then
--- w = w + 1 ; word[w] = utfchar(get_mode(t))
--- else
--- if w > 0 then
--- -- we could use a metatable for all math, complex and factors
--- local s = concat(word,"",1,w)
--- local d = dimenfactors[s]
--- if d then
--- r = r + 1 ; result[r] = "*"
--- r = r + 1 ; result[r] = 1/d
--- else
--- if xmath[s] then
--- r = r + 1 ; result[r] = "xmath."
--- elseif xcomplex[s] then
--- r = r + 1 ; result[r] = "xcomplex."
--- end
--- r = r + 1 ; result[r] = s
--- end
--- w = 0
--- end
--- if n == other_char_code then
--- r = r + 1 ; result[r] = utfchar(get_mode(t))
--- elseif n == spacer_code then
--- -- r = r + 1 ; result[r] = " "
--- elseif n == relax_code then
--- break
--- elseif n == assign_int_code then
--- r = r + 1 ; result[r] = getcount(get_index(t))
--- elseif n == assign_dimen_code then
--- r = r + 1 ; result[r] = getdimen(get_index(t))
--- elseif n == assign_glue_code then
--- r = r + 1 ; result[r] = getglue(get_index(t))
--- elseif n == assign_toks_code then
--- r = r + 1 ; result[r] = gettoks(get_index(t))
--- elseif n == char_given_code or n == math_given_code or n == xmath_given_code then
--- r = r + 1 ; result[r] = get_mode(t)
--- elseif n == last_item_code then
--- local n = get_csname(t)
--- if n then
--- local s = gettex(n)
--- if s then
--- r = r + 1 ; result[r] = s
--- else
--- unexpected(c)
--- end
--- else
--- unexpected(c)
--- end
--- elseif n == call_code then
--- local n = get_csname(t)
--- if n then
--- local s = get_macro(n)
--- if s then
--- r = r + 1 ; result[r] = s
--- else
--- unexpected(c)
--- end
--- else
--- unexpected(c)
--- end
--- elseif n == the_code or n == convert_code or n == lua_expandable_call_code then
--- put_next(t)
--- scan_token() -- expands
--- else
--- unexpected(c)
--- end
--- end
--- end
--- local code = concat(result,"",1,r)
--- local func = load(code)
--- if type(func) == "function" then
--- context(func())
--- else
--- report("invalid lua %a",code)
--- end
--- end
+ implement {
+ public = true,
+ name = "expression",
+ actions = expression,
+ }
-implement {
- public = true,
- name = "expression",
- actions = expression,
-}
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv
index d275acd7dd1..f0902eaf58b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkiv
@@ -57,8 +57,8 @@
\def\expdoifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}}
\def\expdoifelseinset #1#2{\clf_doifelseinset {#1}{#2}}
-\def\expdoifcommonelse\expdoifelsecommon
-\def\expdoifinsetelse \expdoifelseinset
+\let\expdoifcommonelse\expdoifelsecommon
+\let\expdoifinsetelse \expdoifelseinset
%D We define these here, just in case. This permits \typefile {self} otherwise
%D nested b|/|e sep problems.
@@ -68,7 +68,7 @@
\edef\!!bs{[\luastringsep[}
\edef\!!es{]\luastringsep]}
-\unexpanded\def\writestatus#1#2{\clf_writestatus{#1}{#2}}
+\protected\def\writestatus#1#2{\clf_writestatus{#1}{#2}}
%D We can omit the tex.ctxcatcodes here as nowadays we seldom change the regime at
%D the \TEX\ end:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-mac.lua b/Master/texmf-dist/tex/context/base/mkiv/syst-mac.lua
new file mode 100644
index 00000000000..b7c36817c50
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-mac.lua
@@ -0,0 +1,9 @@
+if not modules then modules = { } end modules ['syst-mac'] = {
+ version = 1.001,
+ comment = "companion to syst-aux.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- empty
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv
index 4ed2697f15a..ff7ab1ce39f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-mes.mkiv
@@ -11,8 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\normalprotected\def\writestring {\immediate\write\statuswrite}
-\normalprotected\def\writeline {\writestring{}}
- \let\message \normalmessage
+\protected\def\writestring{\immediate\write\statuswrite}
+\protected\def\writeline {\writestring{}}
+% \let\message \normalmessage
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv
index 2481131209f..38ec9c4c1c5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/syst-pln.mkiv
@@ -13,10 +13,9 @@
\unprotect
-%D This module set a couple of variables to the plain \TEX\
-%D values. Later they might be overloaded. There is not much
-%D difference between \MKII\ and \MKIV\ but at some point they
-%D might diverge.
+%D This module set a couple of variables to the plain \TEX\ values. Later they might
+%D be overloaded. There is not much difference between \MKII\ and \MKIV\ but at some
+%D point they might diverge.
%D Build||in numeric variables.
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv
index de90d658528..0650cf9ce72 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-ltb.mkiv
@@ -503,7 +503,7 @@
\fi
\global\d_tabl_lines_width\wd\b_tabl_lines_cell
\tabl_lines_start_part
- \if!!doneb \else \ifcase\c_tabl_lines_repeat \else
+ \if!!donea \else \ifcase\c_tabl_lines_repeat \else
% check for left/right page
\ifcase\c_tabl_lines_page\donetrue\or\donetrue\or\donefalse\fi\ifdone
% insert repeater
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv
index b2af1993eac..d9022b06d7a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-mis.mkiv
@@ -130,7 +130,7 @@
\let\typo_paragraphs_setup_saved\setupparagraphs
-\unexpanded\def\setupparagraphs
+\unexpanded\overloaded\def\setupparagraphs
{\dotripleempty\typo_paragraphs_setup}
\def\typo_paragraphs_setup[#1][#2][#3]% we are downward compatible with [each] and [1,3]
@@ -193,7 +193,7 @@
\fi
\parindent\zeropoint
\c_typo_paragraphs_n\zerocount
- \let\\=\typo_paragraphs_next % downward compatible
+ \enforced\let\\\typo_paragraphs_next % downward compatible
\edef\p_offset{\paragraphsparameter\c!offset}%
\doifelsedimension\p_offset
{\scratchoffset\p_offset}%
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv
index 8ff02330a9a..45f746f3a08 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkiv
@@ -243,12 +243,18 @@
\tabl_ntb_next_level % go to level 1
+%D This is for the special cases where for instance a table is in a header or footer
+%D line and we have a split table in progress. (See mail to list from Taco.)
+
\installcorenamespace{naturaltable} % was tbl
\installcorenamespace{naturaltablelocal} % was tbltbl
\installdirectcommandhandler \??naturaltable {naturaltable} % \??naturaltable
\installsimpleframedcommandhandler \??naturaltablelocal {naturaltablelocal} \??naturaltablelocal
+\unexpanded\def\bTABLEnested{\tabl_ntb_next_level\bTABLE}
+\unexpanded\def\eTABLEnested{\eTABLE\tabl_ntb_prev_level}
+
\installcorenamespace{naturaltabletal}
\installcorenamespace{naturaltablegal}
\installcorenamespace{naturaltablenob}
@@ -1505,7 +1511,7 @@
\advance\scratchcounter\plusone}%
\fi
% cell
- \setbox\scratchbox\hbox attr \taggedattribute \attribute\taggedattribute \bgroup
+ \setbox\scratchbox\hbox attr \taggedattribute \c_attr_tagged \bgroup
\dotagTABLEsignal % maybe we need to add some packaging in this case
\tabl_ntb_get_txt{#1}{#2}%
\egroup
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv
index af74a2abe9b..2a8c4c7dd89 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-nte.mkiv
@@ -81,10 +81,10 @@
\setfalse\c_tabl_nte_in_nc}
\unexpanded\def\tabl_nte_start_nc
- {\futurelet\next\tabl_nte_start_nc_indeed}
+ {\futurelet\nexttoken\tabl_nte_start_nc_indeed}
\def\tabl_nte_start_nc_indeed
- {\ifx\next\tabl_nte_start_nr \else
+ {\ifx\nexttoken\tabl_nte_start_nr \else
\expandafter\tabl_nte_start_nc_finish
\fi}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv
index 3799964c9f8..e646a1a184f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-tab.mkiv
@@ -1739,7 +1739,7 @@
%D elsewhere. Here we only check for inconsistent spacing. Due to the way \TEX\
%D handles alignments, we cannot automate spacing for colored rows and columns.
-\setnewconstant\tablerowzero\zerocount
+\tablerowzero\zerocount
\appendtoks
\let\SR\tabl_table_SR
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua
index 13d899de647..aa4d5051f97 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.lua
@@ -18,13 +18,16 @@ local commands = commands
local texsetcount = tex.setcount
-local separator = P("|")
-local nested = lpeg.patterns.nested
-local pattern = Ct((separator * (C(nested) + Cc("")) * C((1-separator)^0))^0)
+local separator = P("|") -- keep { }
+----- nested = C(lpeg.patterns.nested) -- remove { }
+local nested = lpeg.patterns.argument
+local pattern = Ct((separator * (nested + Cc("")) * C((1-separator)^0))^0)
local ctx_settabulatelastentry = context.settabulatelastentry
local ctx_settabulateentry = context.settabulateentry
+-- the lmtx raw processor handles {} like the normal one so we need to prune
+
local function presettabulate(preamble)
preamble = gsub(preamble,"~","d") -- let's get rid of ~ mess here
if find(preamble,"*",1,true) then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv
index 434b260950c..2ed104adf38 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -224,6 +224,9 @@
\newconstant \c_tabl_tabulate_localcolorspan
\newconstant \c_tabl_tabulate_modus
+%newconditional \c_tabl_pre_is_set
+\newconditional \c_tabl_post_is_set
+
\let\tabulatesplitlinemode\c_tabl_tabulate_splitlinemode % temp hack, we need an interface
\let \m_tabl_tabulate_separator_factor \empty % fraction
@@ -424,9 +427,9 @@
\fi\fi}
% \unexpanded % we can expand this one
-\def\tabl_tabulate_inject_post_skip#1%
+\def\tabl_tabulate_inject_post_skip#1#2%
{\ifdim#1>\zeropoint
- \kern#1\relax % was \hskip
+ \kern\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns#2\else#1\fi\relax
\else\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns
\ifconditional\c_tabl_tabulate_autorulespacing
\ifcase\c_tabl_tabulate_has_rule_spec_last\else
@@ -516,7 +519,9 @@
\egroup
\aligntab
\noexpand\dostoptagged
- \tabl_tabulate_inject_post_skip{\the\dimexpr\s_tabl_tabulate_post}% get rid of plus
+ \tabl_tabulate_inject_post_skip
+ {\the\ifconditional\c_tabl_post_is_set\s_tabl_tabulate_post\else\s_tabl_tabulate_last\fi}%
+ {\the\s_tabl_tabulate_post}%
\alignmark\alignmark
}%
\toksapp\t_tabl_tabulate_dummy{\NC}%
@@ -527,7 +532,9 @@
\s_tabl_tabulate_post\zeropoint
\fi
%\let\gettabulateexit\dogettabulateexit % still needed ?
- \d_tabl_tabulate_width\zeropoint}
+ \d_tabl_tabulate_width\zeropoint
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set}
\unexpanded\def\installtabulatepreambleoption#1#2%
{\setvalue{\??tabulatepreamble\string#1}{#2}}%
@@ -622,17 +629,21 @@
\tabl_tabulate_set_preamble}
\def\tabl_tabulate_set_preskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_posskip#1%
- {\doifelsenumber{#1}%
+ {\settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_post#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_post.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_preposskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble#1}}
@@ -803,6 +814,8 @@
\c_tabl_tabulate_modus\zerocount
\setfalse\c_tabl_tabulate_pwidth_set
\setfalse\c_tabl_tabulate_reshape
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set
\t_tabl_tabulate_before\emptytoks
\t_tabl_tabulate_after\emptytoks
\t_tabl_tabulate_bmath\emptytoks
@@ -2112,7 +2125,7 @@
\stoptabulatenoalign}
\def\spac_vspacing_no_topskip % use grouped
- {\attribute\skipcategoryattribute\plusten}
+ {\c_attr_skipcategory\plusten}
\unexpanded\def\tabl_tabulate_ML_second_indeed
{\tabl_tabulate_break_no
@@ -2264,7 +2277,7 @@
\s_tabl_tabulate_first.5\d_tabl_tabulate_unit
\s_tabl_tabulate_last\s_tabl_tabulate_first
\s_tabl_tabulate_pre\zeropoint
- \s_tabl_tabulate_post\s_tabl_tabulate_first % was: \zeropoint
+ \s_tabl_tabulate_post\zeropoint
\global\c_tabl_tabulate_columns\zerocount
\global\c_tabl_tabulate_nofauto\zerocount
\global\c_tabl_tabulate_noflines\zerocount
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua
index 2ff87e21abe..c9dd1e4e519 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.lua
@@ -900,7 +900,7 @@ function xtables.construct()
end
nofr = nofr + 1
local rp = rowproperties[r]
- -- we have a direction issue here but hpack_node_list(list,0,"exactly","TLT") cannot be used
+ -- we have a direction issue here but hpack_node_list(list,0,"exactly") cannot be used
-- due to the fact that we need the width
local hbox = hpack_node_list(list)
setdirection(hbox,lefttoright_code)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi
index e8279589276..c5042a405bd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/tabl-xtb.mkvi
@@ -67,7 +67,7 @@
%
% cells: option=fixed : nils autostretch (not yet complete)
-% \setbox\scratchbox\hbox attr \taggedattribute \attribute\taggedattribute {...}
+% \setbox\scratchbox\hbox attr \taggedattribute \c_attr_tagged {...}
%
% \let\tsplitbeforeresult\donothing
% \let\tsplitafterresult \donothing
diff --git a/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua
index 19fff66b8f4..3e78fb2f9c8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/task-ini.lua
@@ -53,7 +53,7 @@ appendaction("processors", "fonts", "typesetters.fontkerns.handler",
appendaction("processors", "fonts", "nodes.handlers.protectglyphs", nil, "nonut", "enabled" )
appendaction("processors", "fonts", "builders.kernel.ligaturing", nil, "nut", "disabled" )
appendaction("processors", "fonts", "builders.kernel.kerning", nil, "nut", "disabled" )
-appendaction("processors", "fonts", "builders.kernel.cleanup", nil, "nut", "enabled" )
+appendaction("processors", "fonts", "nodes.handlers.show", nil, "nut", "disabled" )
appendaction("processors", "fonts", "nodes.handlers.stripping", nil, "nut", "disabled" )
appendaction("processors", "fonts", "nodes.handlers.flatten", nil, "nut", "disabled" )
appendaction("processors", "fonts", "fonts.goodies.colorschemes.coloring", nil, "nut", "disabled" )
@@ -66,11 +66,17 @@ appendaction("processors", "lists", "typesetters.digits.handler",
appendaction("processors", "lists", "typesetters.italics.handler", nil, "nut", "disabled" )
appendaction("processors", "lists", "languages.visualizediscretionaries", nil, "nut", "disabled" )
+if CONTEXTLMTXMODE == 0 then
+
+appendaction("processors", "lists", "nodes.handlers.migrate", nil, "nut", "disabled" )
+
+end
+
appendaction("processors", "after", "typesetters.marksuspects", nil, "nut", "disabled" )
+appendaction("shipouts", "normalizers", "nodes.handlers.cleanuppage", nil, "nut", "production")
appendaction("shipouts", "normalizers", "typesetters.showsuspects", nil, "nut", "disabled" )
appendaction("shipouts", "normalizers", "typesetters.margins.finalhandler", nil, "nut", "disabled" )
-------------("shipouts", "normalizers", "nodes.handlers.cleanuppage", nil, "nut", "disabled" )
appendaction("shipouts", "normalizers", "builders.paragraphs.expansion.trace", nil, "nut", "disabled" )
appendaction("shipouts", "normalizers", "typesetters.alignments.handler", nil, "nut", "disabled" )
appendaction("shipouts", "normalizers", "nodes.references.handler", nil, "nut", "production")
@@ -89,6 +95,7 @@ appendaction("shipouts", "finishers", "attributes.transparencies.handler",
appendaction("shipouts", "finishers", "attributes.colorintents.handler", nil, "nut", "disabled" )
appendaction("shipouts", "finishers", "attributes.negatives.handler", nil, "nut", "disabled" )
appendaction("shipouts", "finishers", "attributes.effects.handler", nil, "nut", "disabled" )
+appendaction("shipouts", "finishers", "attributes.alternates.handler", nil, "nut", "disabled" )
appendaction("shipouts", "finishers", "attributes.viewerlayers.handler", nil, "nut", "disabled" )
appendaction("shipouts", "wrapup", "nodes.handlers.export", nil, "nut", "disabled" ) -- always last
@@ -118,7 +125,12 @@ appendaction("math", "builders", "typesetters.directions.processmath"
appendaction("math", "builders", "noads.handlers.makeup", nil, "nonut", "disabled" )
appendaction("math", "builders", "noads.handlers.align", nil, "nonut", "enabled" )
+if CONTEXTLMTXMODE == 0 then
+
appendaction("finalizers", "lists", "typesetters.paragraphs.normalize", nil, "nut", "enabled" ) -- "disabled"
+
+end
+
appendaction("finalizers", "lists", "typesetters.margins.localhandler", nil, "nut", "disabled" )
appendaction("finalizers", "lists", "builders.paragraphs.keeptogether", nil, "nut", "disabled" )
appendaction("finalizers", "fonts", "builders.paragraphs.solutions.splitters.optimize", nil, "nonut", "disabled" )
diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua
index eef26574e0e..7120b47c3cd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-ini.lua
@@ -18,63 +18,53 @@ local printtable = table.print
local concat = table.concat
local format = string.format
-if token.commands then
-
- local commands = token.commands()
-
- tokens.commands = utilities.storage.allocate(table.swapped(commands,commands))
-
-else
-
- tokens.commands = { }
-
-end
-
-local scan_toks = token.scan_toks
-local scan_string = token.scan_string
-local scan_argument = token.scan_argument
-local scan_tokenlist = token.scan_tokenlist
-local scan_int = token.scan_int
-local scan_code = token.scan_code
-local scan_token_code = token.scan_token_code
-local scan_dimen = token.scan_dimen
-local scan_glue = token.scan_glue
-local scan_keyword = token.scan_keyword
-local scan_keyword_cs = token.scan_keyword_cs or scan_keyword
-local scan_token = token.scan_token
-local scan_box = token.scan_box
-local scan_word = token.scan_word
-local scan_key = token.scan_key
-local scan_value = token.scan_value
-local scan_char = token.scan_char
-local scan_number = token.scan_number
-local scan_csname = token.scan_csname
-local scan_real = token.scan_real
-local scan_float = token.scan_float
-
-local get_next = token.get_next
-local get_next_token = token.get_next_token
-local skip_next = token.skip_next
-local peek_next_char = token.peek_next_char
-local is_next_char = token.is_next_char
-
-local set_macro = token.set_macro
-local get_macro = token.get_macro
-local get_meaning = token.get_meaning
-local get_cmdname = token.get_cmdname
-local set_char = token.set_char
-local set_lua = token.set_lua
-
-local create_token = token.create
-local new_token = token.new
-local is_defined = token.is_defined
-local is_token = token.is_token
-
-tokens.new = new_token
-tokens.create = create_token
-tokens.istoken = is_token
-tokens.isdefined = is_defined
-tokens.defined = is_defined
+local commands = token.commands()
+tokens.commands = utilities.storage.allocate(table.swapped(commands,commands))
+tokens.values = { }
+
+local scan_toks = token.scan_toks
+local scan_string = token.scan_string
+local scan_argument = token.scan_argument
+local scan_delimited = token.scan_delimited
+local scan_tokenlist = token.scan_tokenlist or scan_string
+local scan_integer = token.scan_integer or token.scan_int
+local scan_cardinal = token.scan_cardinal
+local scan_code = token.scan_code
+local scan_token_code = token.scan_token_code
+local scan_dimen = token.scan_dimen
+local scan_glue = token.scan_glue
+local scan_skip = token.scan_skip
+local scan_keyword = token.scan_keyword
+local scan_keyword_cs = token.scan_keyword_cs or scan_keyword
+local scan_token = token.scan_token
+local scan_box = token.scan_box
+local scan_word = token.scan_word
+local scan_letters = token.scan_letters or scan_word -- lmtx
+local scan_key = token.scan_key
+local scan_value = token.scan_value
+local scan_char = token.scan_char
+local scan_number = token.scan_number -- not defined
+local scan_csname = token.scan_csname
+local scan_real = token.scan_real
+local scan_float = token.scan_float
+local scan_luanumber = token.scan_luanumber or scan_float -- only lmtx
+local scan_luainteger = token.scan_luainteger or scan_integer -- only lmtx
+local scan_luacardinal = token.scan_luacardinal or scan_cardinal -- only lmtx
+
+local set_macro = token.set_macro
+local set_char = token.set_char
+local set_lua = token.set_lua
+
+local create_token = token.create
+local new_token = token.new
+local is_defined = token.is_defined
+local is_token = token.is_token
+
+tokens.new = new_token
+tokens.create = create_token
+tokens.istoken = is_token
+tokens.isdefined = is_defined
+tokens.defined = is_defined
local bits = {
escape = 0x00000001, -- 2^00
@@ -147,6 +137,7 @@ if not scan_box then
if s == "hbox" or s == "vbox" or s == "vtop" then
put_next(create_token(s))
end
+ return scan_list()
end
token.scan_box = scan_box
@@ -154,45 +145,65 @@ if not scan_box then
end
tokens.scanners = { -- these expand
- token = scan_token,
- toks = scan_toks,
- tokens = scan_toks,
- box = scan_box,
- hbox = function() return scan_box("hbox") end,
- vbox = function() return scan_box("vbox") end,
- vtop = function() return scan_box("vtop") end,
- dimen = scan_dimen,
- dimension = scan_dimen,
- glue = scan_glue,
- skip = scan_glue,
- integer = scan_int,
- real = scan_real,
- float = scan_float,
- count = scan_int,
- string = scan_string,
- argument = scan_argument,
- tokenlist = scan_tokenlist,
- verbatim = scan_verbatim,
- code = scan_code,
- tokencode = scan_token_code,
- word = scan_word,
- key = scan_key,
- value = scan_value,
- char = scan_char,
- number = scan_number,
- boolean = scan_boolean,
- keyword = scan_keyword,
- keywordcs = scan_keyword_cs,
- csname = scan_csname,
- peek = peek_next_char,
- skip = skip_next,
- ischar = is_next_char,
+ token = scan_token,
+ toks = scan_toks,
+ tokens = scan_toks,
+ box = scan_box,
+ hbox = function() return scan_box("hbox") end,
+ vbox = function() return scan_box("vbox") end,
+ vtop = function() return scan_box("vtop") end,
+ dimen = scan_dimen,
+ dimension = scan_dimen,
+ glue = scan_glue,
+ gluevalues = function() return scan_glue(false,false,true) end,
+ gluespec = scan_skip,
+ integer = scan_integer,
+ cardinal = scan_cardinal,
+ real = scan_real,
+ float = scan_float,
+ luanumber = scan_luanumber,
+ luainteger = scan_luainteger,
+ luacardinal = scan_luacardinal,
+ count = scan_integer,
+ string = scan_string,
+ argument = scan_argument,
+ delimited = scan_delimited,
+ tokenlist = scan_tokenlist,
+ verbatim = scan_verbatim, -- detokenize
+ code = scan_code,
+ tokencode = scan_token_code,
+ word = scan_word,
+ letters = scan_letters,
+ key = scan_key,
+ value = scan_value,
+ char = scan_char,
+ number = scan_number,
+ boolean = scan_boolean,
+ keyword = scan_keyword,
+ keywordcs = scan_keyword_cs,
+ csname = scan_csname,
+
+ next = token.scan_next,
+ nextexpanded = token.scan_next_expanded,
+
+ peek = token.peek_next,
+ peekexpanded = token.peek_next_expanded,
+ peekchar = token.peek_next_char,
+
+ skip = token.skip_next,
+ skipexpanded = token.skip_next_expanded,
+
+ cmdchr = token.scan_cmdchr,
+ cmdchrexpanded = token.scan_cmdchr_expanded,
+
+ ischar = token.is_next_char,
}
tokens.getters = { -- these don't expand
- meaning = get_meaning,
- macro = get_macro,
- token = get_next,
+ meaning = token.get_meaning,
+ macro = token.get_macro,
+ token = token.scan_next or token.get_next, -- not here, use scanners.next or token
+ cstoken = token.get_cstoken,
count = tex.getcount,
dimen = tex.getdimen,
skip = tex.getglue,
@@ -215,6 +226,23 @@ tokens.setters = {
box = tex.setbox,
}
+token.accessors = {
+ command = token.get_command,
+ cmd = token.get_command,
+ cmdname = token.get_cmdname,
+ name = token.get_cmdname,
+ csname = token.get_csname,
+ index = token.get_index,
+ active = token.get_active,
+ frozen = token.get_frozen,
+ protected = token.get_protected,
+ expandable = token.get_protected,
+ user = token.get_user,
+ cmdchrcs = token.get_cmdchrcs,
+ active = token.get_active,
+ range = token.get_range,
+}
+
-- static int run_scan_token(lua_State * L)
-- {
-- saved_tex_scanner texstate;
@@ -240,12 +268,13 @@ if setinspector then
local simple = { letter = "letter", other_char = "other" }
- local function astable(t)
+ local astable = function(t)
if t and is_token(t) then
local cmdname = t.cmdname
local simple = simple[cmdname]
if simple then
return {
+ id = t.id,
category = simple,
character = utfchar(t.mode) or nil,
}
@@ -261,6 +290,7 @@ if setinspector then
frozen = t.frozen,
mode = t.mode,
index = t.index,
+ user = t.user,
cmdname = cmdname,
}
end
@@ -281,3 +311,18 @@ tokens.cache = table.setmetatableindex(function(t,k)
t[k] = v
return v
end)
+
+if LUATEXVERSION < 114 then
+
+ local d = tokens.defined
+ local c = tokens.create
+
+ function tokens.defined(s,b)
+ if b then
+ return d(s)
+ else
+ return c(s).cmd_name == "undefined_cmd"
+ end
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua b/Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua
index 2d20d5a8b31..98d2f66c08d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-scn.lua
@@ -22,17 +22,24 @@ local tokenbits = tokens.bits
local scanstring = scanners.string
local scanargument = scanners.argument
+local scandelimited = scanners.delimited -- lmtx
local scanverbatim = scanners.verbatim
local scantokenlist = scanners.tokenlist
+local scantoks = scanners.toks
local scaninteger = scanners.integer
+local scancardinal = scanners.cardinal
local scannumber = scanners.number
local scankeyword = scanners.keyword
local scankeywordcs = scanners.keywordcs
local scanword = scanners.word
+local scanletters = scanners.letters
local scankey = scanners.key
local scancode = scanners.code
local scanboolean = scanners.boolean
local scandimen = scanners.dimen
+local scanglue = scanners.glue
+local scangluevalues = scanners.gluevalues
+local scangluespec = scanners.gluespec
local scancsname = scanners.csname
local todimen = number.todimen
@@ -113,22 +120,24 @@ local function scantable(t,data)
if not data then
data = { }
end
- local wrapped = scanopen()
- while true do
- local key = scanword()
- if key then
- local get = t[key]
- if get then
- data[key] = get()
+ if t then
+ local wrapped = scanopen()
+ while true do
+ local key = scanword(true)
+ if key then
+ local get = t[key]
+ if get then
+ data[key] = get()
+ else
+ -- catch all we can get
+ end
else
- -- catch all we can get
+ break
end
- else
- break
end
- end
- if wrapped then
- scanclose()
+ if wrapped then
+ scanclose()
+ end
end
return data
end
@@ -165,42 +174,89 @@ function scanners.whd()
end
end
+-- begin lmtx
+
+local l = utf.byte("[")
+local r = utf.byte("]")
+
+local function scanbracketed()
+ local s = scandelimited(l, r)
+ if s then
+ return s
+ else
+ local readstate = status.getreadstate()
+ report_scan("missing argument in line %i of %a", readstate.linenumber, readstate.filename)
+ return ""
+ end
+end
+
+local function scanoptional()
+ return scandelimited(l, r) or ""
+end
+
+local function scanbracketedasis()
+ return scandelimited(l, r, false)
+end
+
+local function scanargumentasis()
+ return scanargument(false)
+end
+
+scanners.bracketed = scanbracketed
+scanners.optional = scanoptional
+scanners.bracketedasis = scanbracketedasis
+scanners.argumentasis = scanargumentasis
+
+-- end lmtx
+
local shortcuts = {
- tokens = tokens,
- bits = tokenbits,
- open = open,
- close = close,
- scanners = scanners,
- scanstring = scanstring,
- scanargument = scanargument,
- scanverbatim = scanverbatim,
- scantokenlist = scantokenlist,
- scaninteger = scaninteger,
- scannumber = scannumber,
- scantable = scantable,
- scankeyword = scankeyword,
- scankeywordcs = scankeywordcs,
- scanword = scanword,
- -- scankey = scankey,
- scancode = scancode,
- scanboolean = scanboolean,
- scandimen = scandimen,
- scandimension = scandimen,
- scanbox = scanners.box,
- scanhbox = scanners.hbox,
- scanvbox = scanners.vbox,
- scanvtop = scanners.vtop,
- scanconditional = scanconditional,
- scanopen = scanopen,
- scanclose = scanclose,
- scanlist = scanlist,
- scancsname = scancsname,
- todimen = todimen,
- tonumber = tonumber,
- tostring = tostring,
- toboolean = toboolean,
- inspect = inspect,
- report = report_scan,
+ tokens = tokens,
+ bits = tokenbits,
+ open = open,
+ close = close,
+ scanners = scanners,
+ scanstring = scanstring,
+ scanargument = scanargument,
+ scanverbatim = scanverbatim,
+ scantokenlist = scantokenlist,
+ scantoks = scantoks,
+ scaninteger = scaninteger,
+ scancardinal = scancardinal,
+ scannumber = scannumber,
+ scantable = scantable, -- not directly useable
+ scankeyword = scankeyword,
+ scankeywordcs = scankeywordcs,
+ scanword = scanword,
+ scanletters = scanletters,
+ -- scankey = scankey,
+ scancode = scancode,
+ scanboolean = scanboolean,
+ scanglue = scanglue, -- list
+ scangluespec = scangluespec,
+ scangluevalues = scangluevalues,
+ scandimen = scandimen,
+ scandimension = scandimen,
+ scanbox = scanners.box,
+ scanhbox = scanners.hbox,
+ scanvbox = scanners.vbox,
+ scanvtop = scanners.vtop,
+ scanconditional = scanconditional,
+ scanopen = scanopen,
+ scanclose = scanclose,
+ scanlist = scanlist,
+ scancsname = scancsname,
+ todimen = todimen,
+ tonumber = tonumber,
+ tostring = tostring,
+ toboolean = toboolean,
+ inspect = inspect,
+ report = report_scan,
+ -- lmtx
+ scandelimited = scandelimited, -- not directly useable
+ scanbracketed = scanbracketed,
+ scanoptional = scanoptional,
+ scanbracketedasis = scanbracketedasis,
+ scanargumentasis = scanargumentasis,
}
tokens.shortcuts = shortcuts
@@ -221,22 +277,20 @@ tokens.converters = {
toglue = "todimen",
}
--- We could just pickup a keyword but then we really need to make sure
--- that no number follows it when that is the assignment and adding
--- an optional = defeats the gain in speed. Currently we have sources
--- with no spaces (\startcontextdefinitioncode ...) so it fails there.
+-- We could just pickup a keyword but then we really need to make sure that no number
+-- follows it when that is the assignment and adding an optional = defeats the gain
+-- in speed. Currently we have sources with no spaces (\startcontextdefinitioncode
+-- ...) so it fails there.
--
--- Another drawback is that we then need to use { } instead of ending
--- with \relax (as we can do now) but that is no big deal. It's just
--- that I then need to check the TeX end. More pain than gain and a bit
--- risky too.
+-- Another drawback is that we then need to use { } instead of ending with \relax (as
+-- we can do now) but that is no big deal. It's just that I then need to check the TeX
+-- end. More pain than gain and a bit risky too. Using scanletters works better, but
+-- the gain is only some 10 percent but if we don't have keywords with numbers it might
+-- make sense in the end, some day.
local f_if = formatters[ " if scankeywordcs('%s') then data['%s'] = scan%s()"]
local f_elseif = formatters[" elseif scankeywordcs('%s') then data['%s'] = scan%s()"]
------ f_if = formatters[" local key = scanword() if key == '' then break elseif key == '%s' then data['%s'] = scan%s()"]
------ f_elseif = formatters[" elseif key == '%s' then data['%s'] = scan%s()"]
-
----- f_if_x = formatters[ " if not data['%s'] and scankeywordcs('%s') then data['%s'] = scan%s()"]
----- f_elseif_x = formatters[" elseif not data['%s'] and scankeywordcs('%s') then data['%s'] = scan%s()"]
@@ -249,52 +303,23 @@ local f_elseif_c = formatters[" elseif scankeywordcs('%s') then data['%s'] = %s
local f_scan_c = formatters["%s(scan%s())"]
-- see above
---
------ f_if_c = formatters[" local key = scanword() if key == '' then break elseif key == '%s' then data['%s'] = %s(scan%s())"]
------ f_elseif_c = formatters[" elseif k == '%s' then data['%s'] = %s(scan%s())"]
-local f_any = formatters[" else local key = scanword() if key then data[key] = scan%s() else break end end"]
-local f_any_c = formatters[" else local key = scanword() if key then data[key] = %s(scan%s()) else break end end"]
+local f_any = formatters[" else local key = scanword(true) if key then data[key] = scan%s() else break end end"]
+local f_any_c = formatters[" else local key = scanword(true) if key then data[key] = %s(scan%s()) else break end end"]
local s_done = " else break end"
-local f_any_all = formatters[" local key = scanword() if key then data[key] = scan%s() else break end"]
-local f_any_all_c= formatters[" local key = scanword() if key then data[key] = %s(scan%s()) else break end"]
+local f_any_all = formatters[" local key = scanword(true) if key then data[key] = scan%s() else break end"]
+local f_any_all_c= formatters[" local key = scanword(true) if key then data[key] = %s(scan%s()) else break end"]
local f_table = formatters["%\nt\nreturn function()\n local data = { }\n%s\n return %s\nend\n"]
local f_sequence = formatters["%\nt\n%\nt\n%\nt\nreturn function()\n return %s\nend\n"]
+local f_singular = formatters["%\nt\n%\nt\n\nreturn function(%s)\n return %s\nend\n"]
local f_simple = formatters["%\nt\nreturn function()\n return %s\nend\n"]
local f_string = formatters["%q"]
local f_action_f = formatters["action%s(%s)"]
local f_action_s = formatters["local action%s = tokens._action[%s]"]
local f_nested = formatters["local function scan%s()\n local data = { }\n%s\n return data\nend\n"]
--- local f_check = formatters[ [[
--- local wrapped = false
--- while true do
--- local c = scancode(open)
--- if c == 123 then
--- wrapped = true
--- break
--- elseif c ~= 32 then
--- break
--- end
--- end
--- while true do
--- ]] .. "%\nt\n" .. [[
--- %s
--- end
--- if wrapped then
--- while true do
--- local c = scancode(close)
--- if c == 125 then
--- break
--- elseif c ~= 32 then
--- break
--- end
--- end
--- end
--- ]] ]
-
local f_check = formatters[ [[
local wrapped = scanopen()
while true do
@@ -317,6 +342,11 @@ local presets = {
["6 strings"] = { "string", "string", "string", "string", "string", "string" },
["7 strings"] = { "string", "string", "string", "string", "string", "string", "string" },
["8 strings"] = { "string", "string", "string", "string", "string", "string", "string", "string" },
+
+ ["1 argument" ] = { "argument" },
+ ["2 arguments"] = { "argument", "argument" },
+ ["3 arguments"] = { "argument", "argument", "argument" },
+ ["4 arguments"] = { "argument", "argument", "argument", "argument" },
}
tokens.presets = presets
@@ -331,6 +361,7 @@ function tokens.compile(specification)
a = { a }
end
local code
+ local args
local function compile(t,nested)
local done = s_done
local r = { }
@@ -437,6 +468,23 @@ function tokens.compile(specification)
else
return scanners[ti]
end
+ elseif #t == 0 then
+ if specification.usage == "value" then
+ code = "b"
+ args = "_,b"
+ else
+ code = ""
+ args = ""
+ end
+ if a then
+ tokens._action = a
+ for i=1,#a do
+ code = f_action_f(i,code)
+ n = n + 1
+ f[n] = f_action_s(i,i)
+ end
+ end
+ code = f_singular(c,f,args,code)
else
local r = { }
local p = { }
@@ -522,7 +570,7 @@ end
-- { "nature", "boolean" },
-- { "escape", "string" },
-- { "escape" },
--- }
+-- },
-- "boolean",
-- }
--
diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv b/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv
index 49edf0c242a..12abf0cb85f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/toks-scn.mkiv
@@ -19,4 +19,8 @@
\registerctxluafile{cldf-scn}{}
\registerctxluafile{cldf-stp}{}
+\ifcase \contextlmtxmode \else
+ \registerctxluafile{cldf-lmt}{}
+\fi
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-tra.mkiv b/Master/texmf-dist/tex/context/base/mkiv/toks-tra.mkiv
deleted file mode 100644
index 04f837f1cf9..00000000000
--- a/Master/texmf-dist/tex/context/base/mkiv/toks-tra.mkiv
+++ /dev/null
@@ -1,34 +0,0 @@
-%D \module
-%D [ file=toks-tra, % was toks-ini
-%D version=2007.03.03,
-%D title=\CONTEXT\ Token Support,
-%D subtitle=Initialization,
-%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 Token Support / Tracing}
-
-\registerctxluafile{toks-tra}{}
-
-\unprotect
-
-%D Handy for manuals \unknown\ but not really used in practice, so it might
-%D become a runtime loaded module instead.
-
-\unexpanded\def\starttokens [#1]{\ctxcommand{collecttokens("#1","stoptokens")}}
- \let\stoptokens \relax
-\unexpanded\def\flushtokens [#1]{\ctxcommand{flushtokens("#1")}}
-\unexpanded\def\showtokens [#1]{\ctxcommand{showtokens("#1")}}
-\unexpanded\def\testtokens [#1]{\ctxcommand{testtokens("#1")}}
-\unexpanded\def\registertoken #1{\ctxcommand{registertoken("#1")}}
-
-\let\toks_show\showtokens % we also support the primitive
-
-\unexpanded\def\showtokens{\doifelsenextoptional\toks_show\normalshowtokens}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua
index 6681be51c5f..a808778b316 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.lua
@@ -8,18 +8,21 @@ if not modules then modules = { } end modules ['trac-ctx'] = {
local next = next
-local context = context
-local implement = interfaces.implement
-local register = trackers.register
+local context = context
+local implement = interfaces.implement
+local register = trackers.register
-local textrackers = tex.trackers or { }
-local texdirectives = tex.directives or { }
+local textrackers = tex.trackers or { }
+local texdirectives = tex.directives or { }
+local texexperiments = tex.experiments or { }
-tex.trackers = textrackers
-tex.directives = texdirectives
+tex.trackers = textrackers
+tex.directives = texdirectives
+tex.experiments = texexperiments
-storage.register("tex/trackers", textrackers, "tex.trackers")
-storage.register("tex/directives",texdirectives,"tex.directives")
+storage.register("tex/trackers", textrackers, "tex.trackers")
+storage.register("tex/directives", texdirectives, "tex.directives")
+storage.register("tex/experiments",texexperiments,"tex.experiments")
local function doit(category,tag,v)
local tt = category[tag]
@@ -56,6 +59,13 @@ implement {
}
implement {
+ name = "initializetexexperiments",
+ actions = function()
+ initialize(texexperiments,experiments.register)
+ end
+}
+
+implement {
name = "installtextracker",
arguments = "3 strings",
actions = function(tag,enable,disable)
@@ -71,6 +81,14 @@ implement {
end,
}
+implement {
+ name = "installtexexperiment",
+ arguments = "3 strings",
+ actions = function(tag,enable,disable)
+ install(texexperiments,experiments.register,tag,enable,disable)
+ end,
+}
+
-- this one might move
interfaces.implement {
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv
index 66b5ef1ee7a..77e4a4f0ff7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-ctx.mkiv
@@ -23,9 +23,13 @@
\unexpanded\def\installtexdirective#1#2#3%
{\clf_installtexdirective{#1}{\detokenize{#2}}{\detokenize{#3}}}
+\unexpanded\def\installtexexperiment#1#2#3%
+ {\clf_installtexexperiment{#1}{\detokenize{#2}}{\detokenize{#3}}}
+
\appendtoks
\clf_initializetextrackers
\clf_initializetexdirectives
+ \clf_initializetexexperiments
\to \everyjob
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua
index 71055eafac9..07865e4bf50 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.lua
@@ -13,100 +13,13 @@ local status = status
local tonumber, tostring, type = tonumber, tostring, type
local format, concat, match, find, gsub = string.format, table.concat, string.match, string.find, string.gsub
-local lpegmatch = lpeg.match
--- maybe tracers -> tracers.tex (and tracers.lua for current debugger)
+local report_nl = logs.newline
+local report_str = logs.writer
------ report_tex = logs.reporter("tex error")
------ report_lua = logs.reporter("lua error")
-local report_nl = logs.newline
-local report_str = logs.writer
-
-tracers = tracers or { }
-local tracers = tracers
-
-tracers.lists = { }
-local lists = tracers.lists
-
-tracers.strings = { }
-local strings = tracers.strings
-
-local texgetdimen = tex.getdimen
-local texgettoks = tex.gettoks
-local texgetcount = tex.getcount
-local texgethelp = tex.gethelptext or function() end
-local fatalerror = tex.fatalerror
-
-local implement = interfaces.implement
-
--- this is used in lmx files but needs to be redone
-
-strings.undefined = "undefined"
-
-function tracers.dimen(name)
- local d = texgetdimen(name)
- return d and number.topoints(d) or strings.undefined
-end
-
-function tracers.count(name)
- return texgetcount(name) or strings.undefined
-end
-
-function tracers.toks(name,limit)
- local t = texgettoks(name)
- return t and string.limit(t,tonumber(limit) or 40) or strings.undefined
-end
-
-function tracers.primitive(name)
- return tex[name] or strings.undefined
-end
-
-lists.scratch = {
- 0, 2, 4, 6, 8
-}
-
-lists.internals = {
- 'p:hsize', 'p:parindent', 'p:leftskip','p:rightskip',
- 'p:vsize', 'p:parskip', 'p:baselineskip', 'p:lineskip', 'p:topskip'
-}
-
-lists.context = {
- 'd:lineheight',
- 'c:realpageno', 'c:userpageno', 'c:pageno', 'c:subpageno'
-}
-
-local types = {
- ['d'] = tracers.dimen,
- ['c'] = tracers.count,
- ['t'] = tracers.toks,
- ['p'] = tracers.primitive
-}
-
-local splitboth = lpeg.splitat(":")
-
-function tracers.type(csname)
- local tag, name = lpegmatch(splitboth,csname)
- return tag or ""
-end
-
-function tracers.name(csname)
- local tag, name = lpegmatch(splitboth,csname)
- return name or csname
-end
-
-function tracers.cs(csname)
- local tag, name = lpegmatch(splitboth,csname)
- if name and types[tag] then
- return types[tag](name)
- else
- return tracers.primitive(csname)
- end
-end
-
-function tracers.knownlist(name)
- local l = lists[name]
- return l and #l > 0
-end
+tracers = tracers or { }
+local tracers = tracers
+local implement = interfaces.implement
local savedluaerror = nil
local usescitelexer = nil
@@ -179,19 +92,12 @@ end
-- todo: some nested errors have two line numbers
-- todo: collect errorcontext in string (after code cleanup)
-- todo: have a separate status.lualinenumber
-
-- todo: \starttext bla \blank[foo] bla \stoptext
local nop = function() end
local resetmessages = status.resetmessages or nop
-local function processerror(offset)
- -- print("[[ last tex error: " .. tostring(status.lasterrorstring or "<unset>") .. " ]]")
- -- print("[[ last lua error: " .. tostring(status.lastluaerrorstring or "<unset>") .. " ]]")
- -- print("[[ last warning : " .. tostring(status.lastwarningstring or "<unset>") .. " ]]")
- -- print("[[ last location : " .. tostring(status.lastwarninglocation or "<unset>") .. " ]]")
- -- print("[[ last context : " .. tostring(status.lasterrorcontext or "<unset>") .. " ]]")
-
+local function processerror(offset,eof)
local filename = status.filename
local linenumber = tonumber(status.linenumber) or 0
local lastcontext = status.lasterrorcontext
@@ -211,26 +117,15 @@ local function processerror(offset)
luaerrorline = luaerrorline,
lastcontext = lastcontext,
lasttexhelp = tex.gethelptext and tex.gethelptext() or nil,
+ endoffile = eof,
}
-end
-
--- so one can overload the printer if (really) needed
-
-if fatalerror then
- callback.register("terminal_input",function(what)
- if what == "*" then
- fatalerror("some kind of input expected, file ends too soon, quitting now")
- else
- fatalerror("bad input, quitting now")
- end
- end)
-else
- -- tex.print("\\nonstopmode")
+ if job and type(job.disablesave) == "function" then
+ job.disablesave()
+ end
end
directives.register("system.quitonerror",function(v)
quitonerror = toboolean(v)
- -- tex.print("\\errorstopmode")
end)
directives.register("system.usescitelexer",function(v)
@@ -251,9 +146,15 @@ function tracers.printerror(specification)
local luaerrorline = specification.luaerrorline
local errortype = specification.errortype
local offset = specification.offset
+ local endoffile = specification.endoffile
local report = errorreporter(luaerrorline)
- if not filename then
- report("error not related to input file:")
+ if endoffile then
+ report("runaway error: %s",lasttexerror or "-")
+ if not quitonerror and texio.terminal then
+ texio.terminal() -- not well tested
+ end
+ elseif not filename then
+ report("fuzzy error:")
report(" tex: %s",lasttexerror or "-")
report(" lua: %s",lastluaerror or "-")
report(" mps: %s",lastmpserror or "-")
@@ -281,6 +182,10 @@ function tracers.printerror(specification)
report_nl()
tex.show_context()
end
+ if lastluaerror and not match(lastluaerror,"^%s*[%?]*%s*$") then
+ print("\nlua error:\n\n",lastluaerror,"\n")
+ quitonerror = true
+ end
end
report_nl()
report_str(tracers.showlines(filename,linenumber,offset,tonumber(luaerrorline)))
@@ -322,9 +227,9 @@ directives.register("system.errorcontext", function(v)
local register = callback.register
if v then
register('show_error_message', nop)
- register('show_warning_message',function() processwarning(v) end)
- register('show_error_hook', function() processerror(v) end)
- register('show_lua_error_hook', function() processerror(v) end)
+ register('show_warning_message',function() processwarning(v) end)
+ register('show_error_hook', function(eof) processerror(v,eof) end)
+ register('show_lua_error_hook', function() processerror(v) end)
else
register('show_error_message', nil)
register('show_error_hook', nil)
@@ -351,15 +256,6 @@ local function reportback(lmxname,default,variables)
end
end
-function lmx.showdebuginfo(lmxname)
- local variables = {
- ['title'] = 'ConTeXt Debug Information',
- ['color-background-one'] = lmx.get('color-background-green'),
- ['color-background-two'] = lmx.get('color-background-blue'),
- }
- reportback(lmxname,"context-debug.lmx",variables)
-end
-
local function showerror(lmxname)
local filename, linenumber, errorcontext = status.filename, tonumber(status.linenumber) or 0, ""
if not filename then
@@ -390,6 +286,7 @@ function lmx.overloaderror(v)
end
callback.register('show_error_hook', function() showerror() end) -- prevents arguments being passed
callback.register('show_lua_error_hook', function() showerror() end) -- prevents arguments being passed
+ callback.register('show_tex_error_hook', function() showerror() end) -- prevents arguments being passed
end
directives.register("system.showerror", lmx.overloaderror)
@@ -429,8 +326,6 @@ directives.register("system.showerror", lmx.overloaderror)
-- end
-- end)
-local implement = interfaces.implement
-
implement { name = "showtrackers", actions = trackers.show }
implement { name = "enabletrackers", actions = trackers.enable, arguments = "string" }
implement { name = "disabletrackers", actions = trackers.disable, arguments = "string" }
@@ -444,7 +339,6 @@ implement { name = "showexperiments", actions = experiments.show }
implement { name = "enableexperiments", actions = experiments.enable, arguments = "string" }
implement { name = "disableexperiments", actions = experiments.disable, arguments = "string" }
-implement { name = "showdebuginfo", actions = lmx.showdebuginfo }
implement { name = "overloaderror", actions = lmx.overloaderror }
implement { name = "showlogcategories", actions = logs.show }
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv
index b5366d88c73..fcbacfb9e24 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-deb.mkiv
@@ -13,12 +13,10 @@
\writestatus{loading}{ConTeXt Tracing Macros / Debugger}
-\unprotect
-
%registerctxluafile{trac-lmx}{}
-\registerctxluafile{trac-deb}{}
+\registerctxluafile{trac-deb}{autosuffix}
-\unexpanded\def\breakpoint {\showdebuginfo\wait}
+\unprotect
\unexpanded\def\showtrackers {\clf_showtrackers}
\unexpanded\def\enabletrackers [#1]{\clf_enabletrackers{#1}}
@@ -33,7 +31,6 @@
\unexpanded\def\enableexperiments [#1]{\clf_enableexperiments{#1}}
\unexpanded\def\disableexperiments[#1]{\clf_disableexperiments{#1}}
-\unexpanded\def\showdebuginfo {\clf_showdebuginfo}
\unexpanded\def\overloaderror {\clf_overloaderror}
\unexpanded\def\showlogcategories {\clf_showlogcategories}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua
index 244ba4604a3..e2736cfb6eb 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-inf.lua
@@ -129,10 +129,8 @@ local function stoptiming(instance)
timer.loadtime = timer.loadtime + loadtime
timer.timing = 0
timer.starttime = 0
- return loadtime
end
end
- return 0
end
local function benchmarktimer(instance)
@@ -223,21 +221,11 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown", environment.texos or "unknown")
end)
- -- register("luatex banner", function()
- -- return lower(status.banner)
- -- end)
- if LUATEXENGINE == "luametatex" then
- register("used engine", function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE, LUATEXVERSION, LUATEXFUNCTIONALITY, LUATEXFORMATID, status.used_compiler)
- end)
- else
- register("used engine", function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE, LUATEXVERSION, LUATEXFUNCTIONALITY, lower(status.banner))
- end)
- end
- register("control sequences", function()
+ register("used engine", function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE, LUATEXVERSION, LUATEXFUNCTIONALITY, lower(status.banner))
+ end)
+ register("used hash slots", function()
return format("%s of %s + %s", status.cs_count, status.hash_size,status.hash_extra)
end)
register("callbacks", statistics.callbacks)
@@ -251,17 +239,11 @@ function statistics.show()
end
end
-- so far
- -- collectgarbage("collect")
register("lua properties",function()
- local hashchar = tonumber(status.luatex_hashchars)
- local mask = lua.mask or "ascii"
+ local hash = 2^status.luatex_hashchars
+ local mask = load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask == "utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua", LUAVERSION, statistics.memused(), hash, mask, mask == "utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline() -- initial newline
@@ -328,3 +310,12 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+
+function status.getreadstate()
+ return {
+ filename = status.filename or "?",
+ linenumber = status.linenumber or 0,
+ iocode = status.inputid or 0,
+ }
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-log.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-log.lua
index bb154067f70..96b69a73e0f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-log.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-log.lua
@@ -8,6 +8,11 @@ if not modules then modules = { } end modules ['trac-log'] = {
-- In fact all writes could go through lua and we could write the console and
-- terminal handler in lua then. Ok, maybe it's slower then, so a no-go.
+--
+-- This is the version for mtxrun. The alternative functions for the TeX engines
+-- have been separated. In order to keep in sync we use tex specific witer names.
+--
+-- Todo: some cleanup (less local needed).
local next, type, select, print = next, type, select, print
local format, gmatch, find = string.format, string.gmatch, string.find
@@ -17,30 +22,16 @@ local utfchar = utf.char
local datetime = os.date
local openfile = io.open
-local runningtex = tex and (tex.jobname or tex.formatname)
--- local write_nl = texio and texio.write_nl or print
--- local write = texio and texio.write or io.write
-
-local write_nl = runningtex and texio and texio.write_nl or print
-local write = runningtex and texio and texio.write or io.write
+local write_nl = print
+local write = io.write
local setmetatableindex = table.setmetatableindex
local formatters = string.formatters
local settings_to_hash = utilities.parsers.settings_to_hash
local sortedkeys = table.sortedkeys
--- variant is set now
-
local variant = "default"
--- local variant = "ansi"
-
--- todo: less categories, more subcategories (e.g. nodes)
--- todo: split into basics and ctx specific
-
---[[ldx--
-<p>This is a prelude to a more extensive logging module. We no longer
-provide <l n='xml'/> based logging as parsing is relatively easy anyway.</p>
---ldx]]--
+----- variant = "ansi"
logs = logs or { }
local logs = logs
@@ -53,23 +44,6 @@ webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
wiki : http://contextgarden.net
]]
--- -- we extend the formatters:
---
--- function utilities.strings.unichr(s) return "U+" .. format("%05X",s) .. " (" .. utfchar(s) .. ")" end
--- function utilities.strings.chruni(s) return utfchar(s) .. " (U+" .. format("%05X",s) .. ")" end
---
--- utilities.strings.formatters.add (
--- string.formatters, "unichr",
--- [[unichr(%s)]],
--- [[local unichr = utilities.strings.unichr]]
--- )
---
--- utilities.strings.formatters.add (
--- string.formatters, "chruni",
--- [[chruni(%s)]],
--- [[local chruni = utilities.strings.chruni]]
--- )
-
formatters.add (
formatters, "unichr",
[["U+" .. format("%%05X",%s) .. " (" .. utfchar(%s) .. ")"]]
@@ -80,26 +54,6 @@ formatters.add (
[[utfchar(%s) .. " (U+" .. format("%%05X",%s) .. ")"]]
)
--- function utilities.strings.unichk(s) return s <= 0xFFFF and ("U+" .. format("%05X",s) .. " (" .. utfchar(s) .. ")") or ("U+" .. format("%05X",s)) end
--- function utilities.strings.chkuni(s) return s <= 0xFFFF and (utfchar(s) .. " (U+" .. format("%05X",s) .. ")") or ("U+" .. format("%05X",s)) end
---
--- utilities.strings.formatters.add (
--- string.formatters, "unichk",
--- [[unichk(%s)]],
--- [[local unichk = utilities.strings.unichk]]
--- )
---
--- utilities.strings.formatters.add (
--- string.formatters, "chkuni",
--- [[chkuni(%s)]],
--- [[local chkuni = utilities.strings.chkuni]]
--- )
---
--- print(formatters["Missing character %!chruni! in font."](234))
--- print(formatters["Missing character %!unichr! in font."](234))
--- print(formatters["Missing character %!chkuni! in font."](234))
--- print(formatters["Missing character %!unichk! in font."](234))
-
-- basic loggers
local function ignore() end
@@ -124,322 +78,7 @@ local function ansisupported(specification)
end
end
-if runningtex and texio then
-
- if texio.setescape then
- texio.setescape(0) -- or (false)
- end
-
- if arg and ansisupported then
- -- we're don't have environment.arguments yet
- for k, v in next, arg do -- k can be negative !
- if v == "--ansi" or v == "--c:ansi" then
- if ansisupported("ansi") then
- variant = "ansi"
- end
- break
- elseif v == "--ansilog" or v == "--c:ansilog" then
- if ansisupported("ansilog") then
- variant = "ansilog"
- end
- break
- end
- end
- end
-
- local function useluawrites()
-
- -- quick hack, awaiting speedup in engine (8 -> 6.4 sec for --make with console2)
- -- still needed for luajittex .. luatex should not have that ^^ mess
-
- local texio_write_nl = texio.write_nl
- local texio_write = texio.write
- local io_write = io.write
-
- write_nl = function(target,...)
- if not io_write then
- io_write = io.write
- end
- if target == "term and log" then
- texio_write_nl("log",...)
- texio_write_nl("term","")
- io_write(...)
- elseif target == "log" then
- texio_write_nl("log",...)
- elseif target == "term" then
- texio_write_nl("term","")
- io_write(...)
- elseif type(target) == "number" then
- texio_write_nl(target,...) -- a tex output channel
- elseif target ~= "none" then
- texio_write_nl("log",target,...)
- texio_write_nl("term","")
- io_write(target,...)
- end
- end
-
- write = function(target,...)
- if not io_write then
- io_write = io.write
- end
- if target == "term and log" then
- texio_write("log",...)
- io_write(...)
- elseif target == "log" then
- texio_write("log",...)
- elseif target == "term" then
- io_write(...)
- elseif type(target) == "number" then
- texio_write(target,...) -- a tex output channel
- elseif target ~= "none" then
- texio_write("log",target,...)
- io_write(target,...)
- end
- end
-
- texio.write = write
- texio.write_nl = write_nl
-
- useluawrites = ignore
-
- end
-
- -- local format = string.formatter
-
- local whereto = "both"
- local target = nil
- local targets = nil
-
- local formats = table.setmetatableindex("self")
- local translations = table.setmetatableindex("self")
-
- local report_yes, subreport_yes, direct_yes, subdirect_yes, status_yes
- local report_nop, subreport_nop, direct_nop, subdirect_nop, status_nop
-
- local variants = {
- default = {
- formats = {
- report_yes = formatters["%-15s > %s\n"],
- report_nop = formatters["%-15s >\n"],
- direct_yes = formatters["%-15s > %s"],
- direct_nop = formatters["%-15s >"],
- subreport_yes = formatters["%-15s > %s > %s\n"],
- subreport_nop = formatters["%-15s > %s >\n"],
- subdirect_yes = formatters["%-15s > %s > %s"],
- subdirect_nop = formatters["%-15s > %s >"],
- status_yes = formatters["%-15s : %s\n"],
- status_nop = formatters["%-15s :\n"],
- },
- targets = {
- logfile = "log",
- log = "log",
- file = "log",
- console = "term",
- terminal = "term",
- both = "term and log",
- },
- },
- ansi = {
- formats = {
- report_yes = formatters["%-15s > %s\n"],
- report_nop = formatters["%-15s >\n"],
- direct_yes = formatters["%-15s > %s"],
- direct_nop = formatters["%-15s >"],
- subreport_yes = formatters["%-15s > %s > %s\n"],
- subreport_nop = formatters["%-15s > %s >\n"],
- subdirect_yes = formatters["%-15s > %s > %s"],
- subdirect_nop = formatters["%-15s > %s >"],
- status_yes = formatters["%-15s : %s\n"],
- status_nop = formatters["%-15s :\n"],
- },
- targets = {
- logfile = "none",
- log = "none",
- file = "none",
- console = "term",
- terminal = "term",
- both = "term",
- },
- }
- }
-
- variants.ansilog = {
- formats = variants.ansi.formats,
- targets = variants.default.targets,
- }
-
- logs.flush = io.flush
-
- writer = function(...)
- write_nl(target,...)
- end
-
- newline = function()
- write_nl(target,"\n")
- end
-
- report = function(a,b,c,...)
- if c ~= nil then
- write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,report_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,report_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
-
- direct = function(a,b,c,...)
- if c ~= nil then
- return direct_yes(translations[a],formatters[formats[b]](c,...))
- elseif b then
- return direct_yes(translations[a],formats[b])
- elseif a then
- return direct_nop(translations[a])
- else
- return ""
- end
- end
-
- subreport = function(a,s,b,c,...)
- if c ~= nil then
- write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
- elseif a then
- write_nl(target,subreport_nop(translations[a],translations[s]))
- else
- write_nl(target,"\n")
- end
- end
-
- subdirect = function(a,s,b,c,...)
- if c ~= nil then
- return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
- elseif b then
- return subdirect_yes(translations[a],translations[s],formats[b])
- elseif a then
- return subdirect_nop(translations[a],translations[s])
- else
- return ""
- end
- end
-
- status = function(a,b,c,...)
- if c ~= nil then
- write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
- elseif b then
- write_nl(target,status_yes(translations[a],formats[b]))
- elseif a then
- write_nl(target,status_nop(translations[a]))
- else
- write_nl(target,"\n")
- end
- end
-
- settarget = function(askedwhereto)
- whereto = askedwhereto or whereto or "both"
- target = targets[whereto]
- if not target then
- whereto = "both"
- target = targets[whereto]
- end
- if target == "term" or target == "term and log" then
- logs.flush = io.flush
- else
- logs.flush = ignore
- end
- end
-
- local stack = { }
-
- pushtarget = function(newtarget)
- insert(stack,target)
- settarget(newtarget)
- end
-
- poptarget = function()
- if #stack > 0 then
- settarget(remove(stack))
- end
- end
-
- setformats = function(f)
- formats = f
- end
-
- settranslations = function(t)
- translations = t
- end
-
- setprocessor = function(f)
- local writeline = write_nl
- write_nl = function(target,...)
- writeline(target,f(...))
- end
- end
-
- setformatters = function(specification)
- local t = nil
- local f = nil
- local d = variants.default
- if not specification then
- --
- elseif type(specification) == "table" then
- t = specification.targets
- f = specification.formats or specification
- else
- if not ansisupported(specification) then
- specification = "default"
- end
- local v = variants[specification]
- if v then
- t = v.targets
- f = v.formats
- variant = specification
- end
- end
- targets = t or d.targets
- target = targets[whereto] or target
- if f then
- d = d.formats
- else
- f = d.formats
- d = f
- end
- setmetatableindex(f,d)
- report_yes = f.report_yes
- report_nop = f.report_nop
- subreport_yes = f.subreport_yes
- subreport_nop = f.subreport_nop
- direct_yes = f.direct_yes
- direct_nop = f.direct_nop
- subdirect_yes = f.subdirect_yes
- subdirect_nop = f.subdirect_nop
- status_yes = f.status_yes
- status_nop = f.status_nop
- if variant == "ansi" or variant == "ansilog" then
- useluawrites() -- because tex escapes ^^, not needed in lmtx
- end
- settarget(whereto)
- end
-
- setformatters(variant)
-
- setlogfile = ignore
- settimedlog = ignore
-
- -- settimedlog = function()
- -- local localtime = os.localtime
- -- local writeline = write_nl
- -- write_nl = function(f,...)
- -- writeline(f,localtime() .. " | " .. concat { ... })
- -- end
- -- settimedlog = ignore
- -- end
-
-else
+do
local report_yes, subreport_yes, status_yes
local report_nop, subreport_nop, status_nop
@@ -788,56 +427,6 @@ directives.register("logs.target", function(v)
settarget(v)
end)
--- tex specific loggers (might move elsewhere)
-
-if tex then
-
- local report = logs.reporter("pages") -- not needed but saves checking when we grep for it
- local texgetcount = tex and tex.getcount
-
- local real, user, sub = 0, 0, 0
-
- function logs.start_page_number()
- real = texgetcount("realpageno")
- user = texgetcount("userpageno")
- sub = texgetcount("subpageno")
- end
-
- local timing = false
- local lasttime = nil
-
- trackers.register("pages.timing", function(v) -- only for myself (diagnostics)
- timing = ""
- end)
-
- function logs.stop_page_number() -- the first page can includes the initialization so we omit this in average
- if timing then
- local elapsed = statistics.currenttime(statistics)
- local average, page
- if not lasttime or real < 2 then
- average = elapsed
- page = elapsed
- else
- average = elapsed / (real - 1)
- page = elapsed - lasttime
- end
- lasttime = elapsed
- timing = formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
- end
- if real <= 0 then
- report("flushing page%s",timing)
- elseif user <= 0 then
- report("flushing realpage %s%s",real,timing)
- elseif sub <= 0 then
- report("flushing realpage %s, userpage %s%s",real,user,timing)
- else
- report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
- end
- logs.flush()
- end
-
-end
-
-- we don't have show_open and show_close callbacks yet
----- report_files = logs.reporter("files")
@@ -864,14 +453,6 @@ logs.help = ignore -- obsolete
-- applications
--- local function reportlines(t,str)
--- if str then
--- for line in gmatch(str,"([^\n\r]*)[\n\r]") do
--- t.report(line)
--- end
--- end
--- end
-
local Carg, C, lpegmatch = lpeg.Carg, lpeg.C, lpeg.match
local p_newline = lpeg.patterns.newline
@@ -926,12 +507,12 @@ local function reportexport(t,method)
end
local reporters = {
- lines = reportlines, -- not to be overloaded
- banner = reportbanner,
- version = reportversion,
- help = reporthelp,
- info = reportinfo,
- export = reportexport,
+ lines = reportlines, -- not to be overloaded
+ banner = reportbanner,
+ version = reportversion,
+ help = reporthelp,
+ info = reportinfo,
+ export = reportexport,
}
local exporters = {
@@ -1000,47 +581,10 @@ end
local report_system = logs.reporter("system","logs")
-function logs.obsolete(old,new)
- local o = loadstring("return " .. new)()
- if type(o) == "function" then
- return function(...)
- report_system("function %a is obsolete, use %a",old,new)
- loadstring(old .. "=" .. new .. " return ".. old)()(...)
- end
- elseif type(o) == "table" then
- local t, m = { }, { }
- m.__index = function(t,k)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index, m.__newindex = o, o
- return o[k]
- end
- m.__newindex = function(t,k,v)
- report_system("table %a is obsolete, use %a",old,new)
- m.__index, m.__newindex = o, o
- o[k] = v
- end
- if libraries then
- libraries.obsolete[old] = t -- true
- end
- setmetatable(t,m)
- return t
- end
-end
-
if utilities then
utilities.report = report_system
end
-if tex and tex.error then
- function logs.texerrormessage(...) -- for the moment we put this function here
- tex.error(format(...))
- end
-else
- function logs.texerrormessage(...)
- print(format(...))
- end
-end
-
-- this is somewhat slower but prevents out-of-order messages when print is mixed
-- with texio.write
@@ -1053,104 +597,3 @@ end
if package.helpers.report then
package.helpers.report = logs.reporter("package loader") -- when used outside mtxrun
end
-
-if tex then
-
- local finalactions = { }
- local fatalerrors = { }
- local possiblefatal = { }
- local loggingerrors = false
-
- function logs.loggingerrors()
- return loggingerrors
- end
-
- directives.register("logs.errors",function(v)
- loggingerrors = v
- if type(v) == "string" then
- fatalerrors = settings_to_hash(v)
- else
- fatalerrors = { }
- end
- end)
-
- function logs.registerfinalactions(...)
- insert(finalactions,...) -- so we can force an order if needed
- end
-
- local what = nil
- local report = nil
- local state = nil
- local target = nil
-
- local function startlogging(t,r,w,s)
- target = t
- state = force
- force = true
- report = type(r) == "function" and r or logs.reporter(r)
- what = w
- pushtarget(target)
- newline()
- if s then
- report("start %s: %s",what,s)
- else
- report("start %s",what)
- end
- if target == "logfile" then
- newline()
- end
- return report
- end
-
- local function stoplogging()
- if target == "logfile" then
- newline()
- end
- report("stop %s",what)
- if target == "logfile" then
- newline()
- end
- poptarget()
- state = oldstate
- end
-
- function logs.startfilelogging(...)
- return startlogging("logfile", ...)
- end
-
- logs.stopfilelogging = stoplogging
-
- local done = false
-
- function logs.starterrorlogging(r,w,...)
- if not done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","start possible issues")
- poptarget()
- done = true
- end
- if fatalerrors[w] then
- possiblefatal[w] = true
- end
- return startlogging("terminal",r,w,...)
- end
-
- logs.stoperrorlogging = stoplogging
-
- function logs.finalactions()
- if #finalactions > 0 then
- for i=1,#finalactions do
- finalactions[i]()
- end
- if done then
- pushtarget("terminal")
- newline()
- logs.report("error logging","stop possible issues")
- poptarget()
- end
- return next(possiblefatal) and sortedkeys(possiblefatal) or false
- end
- end
-
-end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua
index 960c4ef84a6..3974830fab0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-set.lua
@@ -33,7 +33,7 @@ local data = { }
local trace_initialize = false -- only for testing during development
local frozen = true -- this needs checking
-function setters.initialize(filename,name,values) -- filename only for diagnostics
+local function initialize_setter(filename,name,values) -- filename only for diagnostics
local setter = data[name]
if setter then
-- trace_initialize = true
@@ -81,8 +81,8 @@ end
-- user interface code
local function set(t,what,newvalue)
- local data = t.data
- if not data.frozen then
+ local data = t.data -- somehow this can be nil
+ if data and not data.frozen then
local done = t.done
if type(what) == "string" then
what = settings_to_hash(what) -- inefficient but ok
@@ -120,7 +120,7 @@ end
local function reset(t)
local data = t.data
- if not data.frozen then
+ if data and not data.frozen then
for name, functions in sortedthash(data) do
for i=1,#functions do
functions[i](false)
@@ -144,7 +144,7 @@ local function disable(t,what)
end
end
-function setters.register(t,what,...)
+local function register_setter(t,what,...)
local data = t.data
what = lower(what)
local functions = data[what]
@@ -182,26 +182,27 @@ function setters.register(t,what,...)
return false -- so we can use it in an assignment
end
-function setters.enable(t,what)
+local function enable_setter(t,what)
local e = t.enable
t.enable, t.done = enable, { }
+ set(t,what,true)
enable(t,what)
t.enable, t.done = e, { }
end
-function setters.disable(t,what)
+local function disable_setter(t,what)
local e = t.disable
t.disable, t.done = disable, { }
disable(t,what)
t.disable, t.done = e, { }
end
-function setters.reset(t)
+local function reset_setter(t)
t.done = { }
reset(t)
end
-function setters.list(t) -- pattern
+local function list_setter(t) -- pattern
local list = table.sortedkeys(t.data)
local user, system = { }, { }
for l=1,#list do
@@ -215,8 +216,8 @@ function setters.list(t) -- pattern
return user, system
end
-function setters.show(t)
- local list = setters.list(t)
+local function show_setter(t)
+ local list = list_setter(t)
t.report()
for k=1,#list do
local name = list[k]
@@ -253,44 +254,56 @@ end
-- we could make this into a module but we also want the rest avaliable
-local enable, disable, register, list, show = setters.enable, setters.disable, setters.register, setters.list, setters.show
-
function setters.report(setter,fmt,...)
- print(formatters["%-15s : %s\n"](setter.name,formatters[fmt](...)))
+ if fmt then
+ print(formatters["%-15s : %s"](setter.name,formatters[fmt](...)))
+ else
+ print("")
+ end
end
-local function default(setter,name)
+local function setter_default(setter,name)
local d = setter.data[name]
return d and d.default
end
-local function value(setter,name)
+local function setter_value(setter,name)
local d = setter.data[name]
return d and (d.value or d.default)
end
-function setters.new(name) -- we could use foo:bar syntax (but not used that often)
+local function new_setter(name) -- we could use foo:bar syntax (but not used that often)
local setter -- we need to access it in setter itself
setter = {
data = allocate(), -- indexed, but also default and value fields
name = name,
- report = function(...) setters.report (setter,...) end,
- enable = function(...) enable (setter,...) end,
- disable = function(...) disable (setter,...) end,
- reset = function(...) reset (setter,...) end, -- can be dangerous
- register = function(...) register(setter,...) end,
- list = function(...) return list (setter,...) end,
- show = function(...) show (setter,...) end,
- default = function(...) return default (setter,...) end,
- value = function(...) return value (setter,...) end,
+ report = function(...) setters.report (setter,...) end, -- setters.report gets implemented later
+ enable = function(...) enable_setter (setter,...) end,
+ disable = function(...) disable_setter (setter,...) end,
+ reset = function(...) reset_setter (setter,...) end, -- can be dangerous
+ register = function(...) register_setter(setter,...) end,
+ list = function(...) return list_setter (setter,...) end,
+ show = function(...) show_setter (setter,...) end,
+ default = function(...) return setter_default (setter,...) end,
+ value = function(...) return setter_value (setter,...) end,
}
data[name] = setter
return setter
end
-trackers = setters.new("trackers")
-directives = setters.new("directives")
-experiments = setters.new("experiments")
+setters.enable = enable_setter
+setters.disable = disable_setter
+-------.report = report_setter -- todo: adapt after call (defaults to print)
+setters.register = register_setter
+setters.list = list_setter
+setters.show = show_setter
+setters.reset = reset_setter
+setters.new = new_setter
+setters.initialize = initialize_setter
+
+trackers = new_setter("trackers")
+directives = new_setter("directives")
+experiments = new_setter("experiments")
local t_enable, t_disable = trackers .enable, trackers .disable
local d_enable, d_disable = directives .enable, directives .disable
@@ -361,12 +374,12 @@ if environment then
if engineflags then
local list = engineflags["c:trackers"] or engineflags["trackers"]
if type(list) == "string" then
- setters.initialize("commandline flags","trackers",settings_to_hash(list))
+ initialize_setter("commandline flags","trackers",settings_to_hash(list))
-- t_enable(list)
end
local list = engineflags["c:directives"] or engineflags["directives"]
if type(list) == "string" then
- setters.initialize("commandline flags","directives", settings_to_hash(list))
+ initialize_setter("commandline flags","directives", settings_to_hash(list))
-- d_enable(list)
end
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua
index 0ca50899bf6..fb5ef98d939 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.lua
@@ -1,12 +1,13 @@
if not modules then modules = { } end modules ['trac-vis'] = {
version = 1.001,
+ optimize = true,
comment = "companion to trac-vis.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
-local node, nodes, attributes, fonts, tex = node, nodes, attributes, fonts, tex
+local node, nodes, attributes, tex = node, nodes, attributes, tex
local type, tonumber, next, rawget = type, tonumber, next, rawget
local gmatch = string.gmatch
local formatters = string.formatters
@@ -27,14 +28,13 @@ local round = math.round
-- todo: maybe also xoffset, yoffset of glyph
-- todo: inline concat (more efficient)
-- todo: tags can also be numbers (just add to hash)
+-- todo: make a lmtx variant (a few more efficient fetchers)
local nodecodes = nodes.nodecodes
local nuts = nodes.nuts
local tonut = nuts.tonut
-local tonode = nuts.tonode
------ setfield = nuts.setfield
local setboth = nuts.setboth
local setlink = nuts.setlink
local setdisc = nuts.setdisc
@@ -63,6 +63,8 @@ local getwidth = nuts.getwidth
local getdepth = nuts.getdepth
local getshift = nuts.getshift
local getexpansion = nuts.getexpansion
+local getdirection = nuts.getdirection
+local getstate = nuts.getstate
local isglyph = nuts.isglyph
@@ -77,8 +79,6 @@ local apply_to_nodes = nuts.apply
local find_tail = nuts.tail
local effectiveglue = nuts.effective_glue
-local nextnode = nuts.traversers.node
-
local hpack_string = nuts.typesetters.tohpack
local texgetattribute = tex.getattribute
@@ -166,10 +166,14 @@ local modes = {
space = 0x040000,
depth = 0x080000,
marginkern = 0x100000,
+ mathlistkern = 0x200000,
+ dir = 0x400000,
+ par = 0x800000,
}
local usedfont, exheight, emwidth
-local l_penalty, l_glue, l_kern, l_fontkern, l_hbox, l_vbox, l_vtop, l_strut, l_whatsit, l_glyph, l_user, l_math, l_marginkern, l_italic, l_origin, l_discretionary, l_expansion, l_line, l_space, l_depth
+local l_penalty, l_glue, l_kern, l_fontkern, l_hbox, l_vbox, l_vtop, l_strut, l_whatsit, l_glyph, l_user, l_math, l_marginkern, l_mathlistkern, l_italic, l_origin, l_discretionary, l_expansion, l_line, l_space, l_depth,
+ l_dir, l_whatsit
local enabled = false
local layers = { }
@@ -178,7 +182,9 @@ local preset_boxes = modes.hbox + modes.vbox + modes.origin
local preset_makeup = preset_boxes
+ modes.kern + modes.glue + modes.penalty
local preset_all = preset_makeup
- + modes.fontkern + modes.marginkern + modes.whatsit + modes.glyph + modes.user + modes.math
+ + modes.fontkern + modes.marginkern + modes.mathlistkern
+ + modes.whatsit + modes.glyph + modes.user + modes.math
+ + modes.dir + modes.whatsit
function visualizers.setfont(id)
usedfont = id or current_font()
@@ -223,12 +229,15 @@ local function initialize()
l_math = layers.math
l_italic = layers.italic
l_marginkern = layers.marginkern
+ l_mathlistkern = layers.mathlistkern
l_origin = layers.origin
l_discretionary = layers.discretionary
l_expansion = layers.expansion
l_line = layers.line
l_space = layers.space
l_depth = layers.depth
+ l_dir = layers.dir
+ l_par = layers.par
--
if not userrule then
userrule = nuts.rules.userrule
@@ -366,10 +375,6 @@ for mode, value in next, modes do
trackers.register(formatters["visualizers.%s"](mode), function(v) set(mode,v) end)
end
-local raisepenalties = false
-
-directives.register("visualizers.raisepenalties",function(v) raisepenalties = v end)
-
local fraction = 10
trackers .register("visualizers.reset", function(v) set("reset", v) end)
@@ -389,10 +394,10 @@ local c_skip_b = "trace:m"
local c_glyph = "trace:o"
local c_ligature = "trace:s"
local c_white = "trace:w"
-local c_math = "trace:s"
-local c_origin = "trace:o"
-local c_discretionary = "trace:d"
-local c_expansion = "trace:o"
+----- c_math = "trace:s"
+----- c_origin = "trace:o"
+----- c_discretionary = "trace:d"
+----- c_expansion = "trace:o"
local c_depth = "trace:o"
local c_indent = "trace:s"
@@ -410,8 +415,9 @@ local c_white_d = "trace:dw"
local c_math_d = "trace:dr"
local c_origin_d = "trace:do"
local c_discretionary_d = "trace:dd"
-local c_expansion_d = "trace:do"
-local c_depth_d = "trace:do"
+----- c_expansion_d = "trace:do"
+----- c_depth_d = "trace:do"
+----- c_indent_d = "trace:ds"
local function sometext(str,layer,color,textcolor,lap) -- we can just paste verbatim together .. no typesteting needed
local text = hpack_string(str,usedfont)
@@ -463,11 +469,12 @@ end
local caches = setmetatableindex("table")
-local fontkern, italickern, marginkern do
+local fontkern, italickern, marginkern, mathlistkern do
local f_cache = caches["fontkern"]
local i_cache = caches["italickern"]
local m_cache = caches["marginkern"]
+ local l_cache = caches["mathlistkern"]
local function somekern(head,current,cache,color,layer)
local width = getkern(current)
@@ -509,6 +516,10 @@ local fontkern, italickern, marginkern do
return somekern(head,current,m_cache,c_glyph_d,l_marginkern)
end
+ mathlistkern = function(head,current)
+ return somekern(head,current,l_cache,c_glyph_d,l_mathlistkern)
+ end
+
end
local glyphexpansion do
@@ -549,6 +560,8 @@ local kernexpansion do
local f_cache = caches["kernexpansion"]
+ -- in mkiv we actually need to reconstruct but let's not do that now
+
kernexpansion = function(head,current)
local extra = getexpansion(current)
if extra ~= 0 then
@@ -604,9 +617,7 @@ local whatsit do
if info then
-- print("hit whatsit")
else
- local tag = whatsitcodes[what]
- -- maybe different text colors per tag
- info = sometext(formatters["W:%s"](tag and tags[tag] or what),usedfont,nil,c_white)
+ info = sometext(formatters["W:%s"](what),usedfont,nil,c_white)
setattr(info,a_layer,l_whatsit)
w_cache[what] = info
end
@@ -616,6 +627,59 @@ local whatsit do
end
+local dir, par do
+
+ local dircodes = nodes.dircodes
+ local dirvalues = nodes.dirvalues
+
+ local cancel_code = dircodes.cancel
+ local l2r_code = dirvalues.l2r
+ local r2l_code = dirvalues.r2l
+
+ local d_cache = caches["dir"]
+
+ local tags = {
+ l2r = "L2R",
+ r2l = "R2L",
+ cancel = "CAN",
+ par = "PAR",
+ }
+
+ par = function(head,current)
+ local what = "par" -- getsubtype(current)
+ local info = d_cache[what]
+ if info then
+ -- print("hit par")
+ else
+ info = sometext(formatters["L:%s"](what),usedfont,nil,c_white)
+ setattr(info,a_layer,l_dir)
+ d_cache[what] = info
+ end
+ return head, current
+ end
+
+ dir = function(head,current)
+ local what = getsubtype(current)
+ if what == cancelcode then
+ what = "cancel"
+ elseif getdirection(current) == r2l_code then
+ what = "r2l"
+ else
+ what = "l2r"
+ end
+ local info = d_cache[what]
+ if info then
+ -- print("hit dir")
+ else
+ info = sometext(formatters["D:%s"](what),usedfont,nil,c_white)
+ setattr(info,a_layer,l_dir)
+ d_cache[what] = info
+ end
+ return head, current
+ end
+
+end
+
local user do
local u_cache = caches["user"]
@@ -865,26 +929,26 @@ end
local ruledglue do
- local gluecodes = nodes.gluecodes
- local leadercodes = nodes.gluecodes
+ local gluecodes = nodes.gluecodes
- local userskip_code = gluecodes.userskip
- local spaceskip_code = gluecodes.spaceskip
- local xspaceskip_code = gluecodes.xspaceskip
- local leftskip_code = gluecodes.leftskip
- local rightskip_code = gluecodes.rightskip
- local parfillskip_code = gluecodes.parfillskip
- local indentskip_code = gluecodes.indentskip
- local correctionskip_code = gluecodes.correctionskip
-
- local cleaders_code = leadercodes.cleaders
+ local userskip_code = gluecodes.userskip
+ local spaceskip_code = gluecodes.spaceskip
+ local xspaceskip_code = gluecodes.xspaceskip
+ local zerospaceskip_code = gluecodes.zerospaceskip or gluecodes.userskip
+ -- local keepskip_code = gluecodes.keepskip or gluecodes.userskip
+ local leftskip_code = gluecodes.leftskip
+ local rightskip_code = gluecodes.rightskip
+ local parfillleftskip_code = gluecodes.parfillleftskip or parfillskip_code
+ local parfillrightskip_code = gluecodes.parfillrightskip or parfillskip_code
+ local indentskip_code = gluecodes.indentskip
+ local correctionskip_code = gluecodes.correctionskip
local g_cache_v = caches["vglue"]
local g_cache_h = caches["hglue"]
local tags = {
-- [userskip_code] = "US",
- [gluecodes.lineskip] = "LS",
+ [gluecodes.lineskip] = "LI",
[gluecodes.baselineskip] = "BS",
[gluecodes.parskip] = "PS",
[gluecodes.abovedisplayskip] = "DA",
@@ -900,18 +964,21 @@ local ruledglue do
[gluecodes.medmuskip] = "MM",
[gluecodes.thickmuskip] = "ML",
[gluecodes.intermathskip] = "IM",
+ [gluecodes.keepskip or 99] = "KS",
[gluecodes.mathskip] = "MT",
- [leadercodes.leaders] = "NL",
- [leadercodes.cleaders] = "CL",
- [leadercodes.xleaders] = "XL",
- [leadercodes.gleaders] = "GL",
+ [gluecodes.leaders] = "NL",
+ [gluecodes.cleaders] = "CL",
+ [gluecodes.xleaders] = "XL",
+ [gluecodes.gleaders] = "GL",
-- true = "VS",
-- false = "HS",
[leftskip_code] = "LS",
[rightskip_code] = "RS",
[spaceskip_code] = "SP",
[xspaceskip_code] = "XS",
- [parfillskip_code] = "PF",
+ [zerospaceskip_code] = "ZS",
+ [parfillleftskip_code] = "PL",
+ [parfillrightskip_code] = "PR",
[indentskip_code] = "IN",
[correctionskip_code] = "CS",
}
@@ -926,11 +993,11 @@ local ruledglue do
if info then
-- print("glue hit")
else
- if subtype == spaceskip_code or subtype == xspaceskip_code then
+ if subtype == spaceskip_code or subtype == xspaceskip_code or subtype == zerospaceskip_code then
info = sometext(amount,l_glue,c_space)
elseif subtype == leftskip_code or subtype == rightskip_code then
info = sometext(amount,l_glue,c_skip_a)
- elseif subtype == parfillskip_code or subtype == indentskip_code or subtype == correctionskip_code then
+ elseif subtype == parfillleftskip_code or subtype == parfillrightskip_code or subtype == indentskip_code or subtype == correctionskip_code then
info = sometext(amount,l_glue,c_indent)
elseif subtype == userskip_code then
if width > 0 then
@@ -955,7 +1022,7 @@ local ruledglue do
-- ruledspace = function(head,current,parent)
-- local subtype = getsubtype(current)
- -- if subtype == spaceskip_code or subtype == xspaceskip_code then
+ -- if subtype == spaceskip_code or subtype == xspaceskip_code or subtype == zerospaceskip_code then
-- local width = effectiveglue(current,parent)
-- local amount = formatters["%s:%0.3f"](tags[subtype] or "HS",width*pt_factor)
-- local info = g_cache_h[amount]
@@ -978,7 +1045,7 @@ local ruledglue do
ruledspace = function(head,current,parent)
local subtype = getsubtype(current)
- if subtype == spaceskip_code or subtype == xspaceskip_code then -- not yet all space
+ if subtype == spaceskip_code or subtype == xspaceskip_code or subtype == zerospaceskip_code then -- not yet all space
local width = effectiveglue(current,parent)
local info
if subtype == spaceskip_code then
@@ -1084,6 +1151,31 @@ local ruledmarginkern do
end
+local ruledmathlistkern do
+
+ local l_cache = caches["mathlistkern"]
+
+ ruledmathlistkern = function(head,current)
+ local kern = getkern(current)
+ local info = l_cache[kern]
+ if not info then
+ local amount = formatters["%s:%0.3f"]("LK",kern*pt_factor)
+ if kern > 0 then
+ info = sometext(amount,l_mathlistkern,c_positive)
+ elseif kern < 0 then
+ info = sometext(amount,l_mathlistkern,c_negative)
+ else
+ info = sometext(amount,l_mathlistkern,c_zero)
+ end
+ l_cache[kern] = info
+ end
+ info = copy_list(info)
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ end
+
+end
+
local ruleddiscretionary do
local d_cache = caches["discretionary"]
@@ -1111,6 +1203,10 @@ local ruledpenalty do
local p_cache_v = caches["vpenalty"]
local p_cache_h = caches["hpenalty"]
+ local raisepenalties = false
+
+ directives.register("visualizers.raisepenalties",function(v) raisepenalties = v end)
+
ruledpenalty = function(head,current,vertical)
local penalty = getpenalty(current)
local info = (vertical and p_cache_v or p_cache_h)[penalty]
@@ -1141,27 +1237,31 @@ end
do
- local disc_code = nodecodes.disc
- local kern_code = nodecodes.kern
- local glyph_code = nodecodes.glyph
- local glue_code = nodecodes.glue
- local penalty_code = nodecodes.penalty
- local whatsit_code = nodecodes.whatsit
- local user_code = nodecodes.user
- local math_code = nodecodes.math
- local hlist_code = nodecodes.hlist
- local vlist_code = nodecodes.vlist
- local marginkern_code = nodecodes.marginkern
+ local disc_code = nodecodes.disc
+ local kern_code = nodecodes.kern
+ local glyph_code = nodecodes.glyph
+ local glue_code = nodecodes.glue
+ local penalty_code = nodecodes.penalty
+ local whatsit_code = nodecodes.whatsit
+ local user_code = nodecodes.user
+ local math_code = nodecodes.math
+ local hlist_code = nodecodes.hlist
+ local vlist_code = nodecodes.vlist
+ local marginkern_code = nodecodes.marginkern
+ local mathlistkern_code = nodecodes.mathlistkern
+ local dir_code = nodecodes.dir
+ local par_code = nodecodes.par
local kerncodes = nodes.kerncodes
local fontkern_code = kerncodes.fontkern
local italickern_code = kerncodes.italiccorrection
local leftmarginkern_code = kerncodes.leftmarginkern
local rightmarginkern_code = kerncodes.rightmarginkern
+ local mathlistkern_code = kerncodes.mathlistkern
----- userkern_code = kerncodes.userkern
- local listcodes = nodes.listcodes
- local linelist_code = listcodes.line
+ local listcodes = nodes.listcodes
+ local linelist_code = listcodes.line
local cache
@@ -1186,73 +1286,27 @@ do
local trace_line = false
local trace_space = false
local trace_depth = false
+ local trace_dir = false
+ local trace_par = false
local current = head
local previous = nil
local attr = unsetvalue
local prev_trace_fontkern = nil
- local prev_trace_marginkern = nil
local prev_trace_italic = nil
+ local prev_trace_marginkern = nil
+-- local prev_trace_mathlist = nil
local prev_trace_expansion = nil
- -- local function setthem(t,k)
- -- local v_trace_hbox = band(k, 1) ~= 0
- -- local v_trace_vbox = band(k, 2) ~= 0
- -- local v_trace_vtop = band(k, 4) ~= 0
- -- local v_trace_kern = band(k, 8) ~= 0
- -- local v_trace_glue = band(k, 16) ~= 0
- -- local v_trace_penalty = band(k, 32) ~= 0
- -- local v_trace_fontkern = band(k, 64) ~= 0
- -- local v_trace_strut = band(k, 128) ~= 0
- -- local v_trace_whatsit = band(k, 256) ~= 0
- -- local v_trace_glyph = band(k, 512) ~= 0
- -- local v_trace_simple = band(k, 1024) ~= 0
- -- local v_trace_user = band(k, 2048) ~= 0
- -- local v_trace_math = band(k, 4096) ~= 0
- -- local v_trace_italic = band(k, 8192) ~= 0
- -- local v_trace_origin = band(k, 16384) ~= 0
- -- local v_trace_discretionary = band(k, 32768) ~= 0
- -- local v_trace_expansion = band(k, 65536) ~= 0
- -- local v_trace_line = band(k,131072) ~= 0
- -- local v_trace_space = band(k,262144) ~= 0
- -- local v_trace_depth = band(k,524288) ~= 0
- -- local v = function()
- -- trace_hbox = v_trace_hbox
- -- trace_vbox = v_trace_vbox
- -- trace_vtop = v_trace_vtop
- -- trace_kern = v_trace_kern
- -- trace_glue = v_trace_glue
- -- trace_penalty = v_trace_penalty
- -- trace_fontkern = v_trace_fontkern
- -- trace_strut = v_trace_strut
- -- trace_whatsit = v_trace_whatsit
- -- trace_glyph = v_trace_glyph
- -- trace_simple = v_trace_simple
- -- trace_user = v_trace_user
- -- trace_math = v_trace_math
- -- trace_italic = v_trace_italic
- -- trace_origin = v_trace_origin
- -- trace_discretionary = v_trace_discretionary
- -- trace_expansion = v_trace_expansion
- -- trace_line = v_trace_line
- -- trace_space = v_trace_space
- -- trace_depth = v_trace_depth
- -- end
- -- t[k] = v
- -- return v
- -- end
- --
- -- if not cache then
- -- cache = setmetatableindex(setthem)
- -- end
-
while current do
local id = getid(current)
local a = forced or getattr(current,a_visual) or unsetvalue
+ local subtype
if a ~= attr then
- prev_trace_fontkern = trace_fontkern
- prev_trace_italic = trace_italic
- prev_trace_marginkern = trace_marginkern
- prev_trace_expansion = trace_expansion
+ prev_trace_fontkern = trace_fontkern
+ prev_trace_italic = trace_italic
+ prev_trace_marginkern = trace_marginkern
+-- prev_trace_mathlistkern = trace_mathlistkern
+ prev_trace_expansion = trace_expansion
attr = a
if a == unsetvalue then
trace_hbox = false
@@ -1276,7 +1330,14 @@ do
trace_space = false
trace_depth = false
trace_marginkern = false
- goto list
+ trace_mathlistkern = false
+ trace_dir = false
+ trace_par = false
+ if id == kern_code then
+ goto kern
+ else
+ goto list
+ end
else -- dead slow:
-- cache[a]()
trace_hbox = band(a,0x000001) ~= 0
@@ -1300,6 +1361,9 @@ do
trace_space = band(a,0x040000) ~= 0
trace_depth = band(a,0x080000) ~= 0
trace_marginkern = band(a,0x100000) ~= 0
+ trace_mathlistkern = band(a,0x200000) ~= 0
+ trace_dir = band(a,0x400000) ~= 0
+ trace_whatsit = band(a,0x800000) ~= 0
end
elseif a == unsetvalue then
goto list
@@ -1329,31 +1393,7 @@ do
end
setdisc(current,pre,post,replace)
elseif id == kern_code then
- local subtype = getsubtype(current)
- if subtype == fontkern_code then
- if trace_fontkern or prev_trace_fontkern then
- head, current = fontkern(head,current)
- end
- if trace_expansion or prev_trace_expansion then
- head, current = kernexpansion(head,current)
- end
- elseif subtype == italickern_code then
- if trace_italic or prev_trace_italic then
- head, current = italickern(head,current)
- elseif trace_kern then
- head, current = ruleditalic(head,current)
- end
- elseif subtype == leftmarginkern_code or subtype == rightmarginkern_code then
- if trace_marginkern or prev_trace_marginkern then
- head, current = marginkern(head,current)
- elseif trace_kern then
- head, current = ruledmarginkern(head,current)
- end
- else
- if trace_kern then
- head, current = ruledkern(head,current,vertical)
- end
- end
+ goto kern
elseif id == glue_code then
local content = getleader(current)
if content then
@@ -1385,8 +1425,49 @@ do
if trace_kern then
head, current = ruledkern(head,current,vertical,true)
end
+ elseif id == dir_code then
+ if trace_dir then
+ head, current = dir(head,current)
+ end
+ elseif id == par_code then
+ if trace_par then
+ head, current = par(head,current)
+ end
end
goto next
+ ::kern::
+ subtype = getsubtype(current)
+ if subtype == fontkern_code then
+ if trace_fontkern or prev_trace_fontkern then
+ head, current = fontkern(head,current)
+ end
+ if trace_expansion or prev_trace_expansion then
+ head, current = kernexpansion(head,current)
+ end
+ elseif subtype == italickern_code then
+ if trace_italic or prev_trace_italic then
+ head, current = italickern(head,current)
+ elseif trace_kern then
+ head, current = ruleditalic(head,current)
+ end
+ elseif subtype == leftmarginkern_code or subtype == rightmarginkern_code then
+ if trace_marginkern or prev_trace_marginkern then
+ head, current = marginkern(head,current)
+ elseif trace_kern then
+ head, current = ruledmarginkern(head,current)
+ end
+ elseif subtype == mathlistkern_code then
+ if trace_mathlist then -- or prev_trace_mathlist then
+ head, current = mathlistkern(head,current)
+ elseif trace_kern then
+ head, current = ruledmathlistkern(head,current)
+ end
+ else
+ if trace_kern then
+ head, current = ruledkern(head,current,vertical)
+ end
+ end
+ goto next;
::list::
if id == hlist_code then
local content = getlist(current)
@@ -1430,7 +1511,9 @@ do
end
end
- local function handler(head)
+ luatex.registerstopactions(cleanup)
+
+ function visualizers.handler(head)
if usedfont then
starttiming(visualizers)
head = visualize(head,true)
@@ -1441,10 +1524,6 @@ do
end
end
- visualizers.handler = handler
-
- luatex.registerstopactions(cleanup)
-
function visualizers.box(n)
if usedfont then
starttiming(visualizers)
@@ -1465,6 +1544,7 @@ do
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
+ local nextnode = nuts.traversers.node
local last = nil
local used = nil
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv
index 570e6a7c730..5357c841470 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-vis.mkiv
@@ -44,15 +44,16 @@
% no, but can become an option:
%
% \appendtoks
-% \attribute\visualattribute\attributeunsetvalue
+% \c_attr_visual\attributeunsetvalue
% \to \everybeforepagebody
%D We only provide box visualizers as they can come in handy for testing
%D macros. In due time we will move some of the m-visual code here too.
-\let\syst_visualizers_hbox\hbox
-\let\syst_visualizers_vbox\vbox
-\let\syst_visualizers_vtop\vtop
+\let\syst_visualizers_hbox \hbox
+\let\syst_visualizers_vbox \vbox
+\let\syst_visualizers_vtop \vtop
+\let\syst_visualizers_vcenter\vcenter
\let\syst_visualizers_hpack\hpack
\let\syst_visualizers_vpack\vpack
@@ -69,6 +70,19 @@
\unexpanded\def\ruledmbox#1{\ruledhbox{\startimath#1\stopimath}}
+\unexpanded\def\sys_ruled_vcenter{\syst_visualizers_vcenter attr \visualattribute \clf_getvisual {simplevbox}}
+
+\unexpanded\def\ruledvcenter
+ {\ruledvbox\bgroup
+ \dowithnextboxcs\syst_boxes_ruled_vcenter_finish\ruledvbox}
+
+\def\syst_boxes_ruled_vcenter_finish
+ {\ruledhpack{\normalstartimath\ruledvcenter{\box\nextbox}\normalstopimath}%
+ \egroup}
+
+\prependtoks \let\ruledvcenter\sys_ruled_vcenter \to \everymath
+\prependtoks \let\ruledvcenter\sys_ruled_vcenter \to \everydisplay
+
\appendtoks
\ifcase\c_syst_visualizers_state\else
\syst_visualizers_speedup
@@ -140,7 +154,7 @@
\endgroup}
\unexpanded\def\resetvisualizers
- {\attribute\visualattribute\attributeunsetvalue}
+ {\c_attr_visual\attributeunsetvalue}
%D New (these might also be a visualizers):
diff --git a/Master/texmf-dist/tex/context/base/mkiv/type-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/type-ini.lua
index a2e19725ed0..771cf39c056 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/type-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/type-ini.lua
@@ -17,9 +17,6 @@ local implement = interfaces.implement
local uselibrary = resolvers.uselibrary
-local name_one = nil
-local name_two = nil
-
local p_strip = Cs((P("type-") * (P("imp-")^0))^0/"" * P(1)^0)
local report = logs.reporter("fonts","typescripts")
@@ -29,6 +26,7 @@ local function action(name,foundname)
end
local patterns = {
+ "type-imp-%s.mkxl",
"type-imp-%s.mkiv",
"type-imp-%s.tex"
}
@@ -56,6 +54,7 @@ implement {
}
local patterns = {
+ "type-imp-%s.mkxl",
"type-imp-%s.mkiv",
"type-imp-%s.tex",
-- obsolete
@@ -63,6 +62,9 @@ local patterns = {
"type-%s.tex"
}
+-- local name_one = nil
+-- local name_two = nil
+--
-- local function failure_two(name)
-- report("unknown library %a or %a",name_one,name_two)
-- end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua
index 6874d385a9b..30503277212 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-bld.lua
@@ -243,10 +243,9 @@ end
-- the check can go away
function builders.buildpage_filter(groupcode)
- -- the next check saves 1% runtime on 1000 tufte pages
local head = texlists.contrib_head
- local done = false
if head then
+ local done = false
-- called quite often ... maybe time to remove timing
starttiming(builders)
if trace_page_builder then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua
index d670c53196f..89eb7e52d33 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.lua
@@ -33,7 +33,7 @@ local getid = nuts.getid
----- getattr = nuts.getattr
local getattrlist = nuts.getattrlist
local takeattr = nuts.takeattr
-local getlang = nuts.getlang
+local getlanguage = nuts.getlanguage
local isglyph = nuts.isglyph
local setattr = nuts.setattr
@@ -168,7 +168,7 @@ methods[2] = function(head,start) -- ( => (-
head, start, replace = remove_node(head,start)
local post = copy_node(replace)
local hyphen = copy_node(post)
- setchar(hyphen,languages.prehyphenchar(getlang(post)))
+ setchar(hyphen,languages.prehyphenchar(getlanguage(post)))
setlink(post,hyphen)
head, start = insert_node_before(head,start,new_disc(nil,post,replace))
setattrlist(start,replace)
@@ -184,7 +184,7 @@ methods[3] = function(head,start) -- ) => -)
head, start, replace = remove_node(head,start)
local pre = copy_node(replace)
local hyphen = copy_node(pre)
- setchar(hyphen,languages.prehyphenchar(getlang(pre)))
+ setchar(hyphen,languages.prehyphenchar(getlanguage(pre)))
setlink(hyphen,pre)
head, start = insert_node_before(head,start,new_disc(hyphen,nil,replace)) -- so not pre !
setattrlist(start,tmp)
@@ -264,7 +264,7 @@ function breakpoints.handler(head)
-- setattr(current,a_breakpoints,unsetvalue) -- should not be needed
-- for now we collect but when found ok we can move the handler here
-- although it saves nothing in terms of performance
- local lang = getlang(current)
+ local lang = getlanguage(current)
local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[languages.numbers[lang]] or cmap[""])
if smap then
local skip = smap.skip
@@ -322,7 +322,7 @@ function breakpoints.handler(head)
local cmap = data[3]
local smap = data[4]
-- we do a sanity check for language
- -- local lang = getlang(start)
+ -- local lang = getlanguage(start)
-- local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[numbers[lang]] or cmap[""])
-- if smap then
local nleft = smap.nleft
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv
index 6071221dd43..23ab414fe03 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-brk.mkiv
@@ -64,7 +64,7 @@
\unexpanded\def\resetbreakpoints
{\exhyphenchar\hyphenasciicode % 2020.03.05
- \attribute\breakpointattribute\attributeunsetvalue}
+ \c_attr_breakpoint\attributeunsetvalue}
\definebreakpoints[compound]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua
index c1666a9f119..3d0d6055a77 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['typo-cap'] = {
version = 1.001,
+ optimize = true,
comment = "companion to typo-cap.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv
index 20e2eb7a945..3dea50c99e1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cap.mkiv
@@ -228,8 +228,11 @@
\unexpanded\def\autocap{\ifmmode\expandafter\normalcap\else\expandafter\smallcapped\fi}
-\appendtoks
+\prependtoks
\let\normalcap\cap % mathmode cap
+\to \everydump
+
+\appendtoks
\let\cap\autocap
\to \everydump
@@ -298,9 +301,9 @@
%
% \definestartstop[randomized][\c!before=\dosetattribute{case}{8},\c!after=]
-% \unexpanded\def\randomizetext{\groupedcommand{\attribute\caseattribute\pluseight}{}}
+% \unexpanded\def\randomizetext{\groupedcommand{\c_attr_case\pluseight}{}}
-\unexpanded\def\randomizetext{\triggergroupedcommand{\attribute\caseattribute\pluseight}}
+\unexpanded\def\randomizetext{\triggergroupedcommand{\c_attr_case\pluseight}}
\definestartstop[randomized][\c!before=\dosetattribute{case}{8},\c!after=]
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua
index 7a0f1fd7521..bb3883b3308 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua
@@ -91,7 +91,7 @@ local boundarycodes = nodes.boundarycodes
local subtypes = nodes.subtypes
local glyph_code = nodecodes.glyph
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local boundary_code = nodecodes.boundary
local wordboundary_code = boundarycodes.word
@@ -175,7 +175,7 @@ local function pickup(head,tail,str)
while true do
local prev = first.prev
if prev and prev[a_marked] == attr then
- if prev.id == localpar_code then -- and start_of_par(prev)
+ if prev.id == par_code then -- and start_of_par(prev)
break
else
first = prev
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv
index efc278cfa05..bdda1942410 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.mkiv
@@ -27,7 +27,7 @@
{\clf_setcharactercleaning{#1}} % also accepts "reset"
% \appendtoks
-% \attribute\cleanerattribute\attributeunsetvalue
+% \c_attr_cleaner\attributeunsetvalue
% \to \everyforgetall
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv
index 9320c37ee6f..9720326be14 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-del.mkiv
@@ -142,8 +142,8 @@
[\c!rightsubsentence]
[\rightboundarycharacter\c!rightsubsentence{sentence}]
-\newsignal \d_typo_subsentence_signal
-\newcount \c_typo_subsentence_nesting
+\newsignal\d_typo_subsentence_signal
+\newcount \c_typo_subsentence_nesting
\let\beforesubsentence\donothing
\let\aftersubsentence \donothing
@@ -179,7 +179,7 @@
\fi
\global\advance\c_typo_subsentence_nesting\plusone
\ifnum\c_typo_subsentence_nesting=\plusone
- \dontleavehmode % was \leaveoutervmode
+ \dontleavehmode
\fi
\dostarttagged\t!subsentence\empty % no chain
\dostarttagged\t!subsentencesymbol\empty
@@ -420,7 +420,7 @@
\typo_delimited_push{#1}{#2}%
\dostarttaggedchained\t!delimitedblock\currentdelimitedtext\??delimitedtext
\edef\p_delimited_method{\delimitedtextparameter\c!method}%
- \ifx\p_delimited_method\s!font
+ \ifx\p_delimited_method\v!font
\expandafter\typo_delimited_start_font
\else
\expandafter\typo_delimited_start_other
@@ -524,6 +524,7 @@
\begingroup
\usedelimitedtextstyleandcolor\c!style\c!color
%
+ \begingroup
\edef\p_delimited_left {\delimitedtextparameter{\c!left}}%
\edef\p_delimited_right {\delimitedtextparameter{\c!right}}%
\edef\p_delimited_nextleft {\delimitedtextparameter{\c!nextleft}}%
@@ -539,7 +540,10 @@
\def\typo_delimited_stop_par
{\typo_delimited_stop_content
\rightdelimitedtextmark
- \carryoverpar\endgroup % new per 2013-01-21 ... please left floats
+ \rightdelimitedtextmark
+ \carryoverpar\endgroup
+ \endgraf
+ \endgroup
\pop_macro_checkindentation
\typo_delimited_stop_par_indeed
\delimitedtextparameter\c!after
@@ -575,7 +579,7 @@
{\dontleavehmode % following ones can be omited
\typo_delimited_push{#1}{#2}%
\edef\p_delimited_method{\delimitedtextparameter\c!method}%
- \ifx\p_delimited_method\s!font
+ \ifx\p_delimited_method\v!font
\expandafter\typo_delimited_fontdriven
\else
\expandafter\typo_delimited_other
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua
index 7d5c7751b35..ac72ae39488 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dha.lua
@@ -14,12 +14,12 @@ if not modules then modules = { } end modules ['typo-dha'] = {
--
-- Then we have, with input: LATIN ARAB
--
--- \textdir TLT LATIN ARAB => LATIN BARA
--- \textdir TRT LATIN ARAB => LATIN BARA
--- \textdir TRT LRO LATIN ARAB => LATIN ARAB
--- \textdir TLT LRO LATIN ARAB => LATIN ARAB
--- \textdir TLT RLO LATIN ARAB => NITAL ARAB
--- \textdir TRT RLO LATIN ARAB => NITAL ARAB
+-- \textdirection 1 LATIN ARAB => LATIN BARA
+-- \textdirection 1 LATIN ARAB => LATIN BARA
+-- \textdirection 1 LRO LATIN ARAB => LATIN ARAB
+-- \textdirection 1 LRO LATIN ARAB => LATIN ARAB
+-- \textdirection 1 RLO LATIN ARAB => NITAL ARAB
+-- \textdirection 1 RLO LATIN ARAB => NITAL ARAB
-- elseif d == "es" then -- European Number Separator
-- elseif d == "et" then -- European Number Terminator
@@ -78,7 +78,7 @@ local math_code = nodecodes.math
local kern_code = nodecodes.kern
local glue_code = nodecodes.glue
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local dirvalues = nodes.dirvalues
local lefttoright_code = dirvalues.lefttoright
@@ -272,12 +272,12 @@ local function process(start)
stack[top] = { override, embedded }
override = 1
obsolete[#obsolete+1] = current
- elseif direction == "lre" then -- Left-to-Right Embedding -> TLT
+ elseif direction == "lre" then -- Left-to-Right Embedding -> lefttoright_code
top = top + 1
stack[top] = { override, embedded }
embedded = 1
obsolete[#obsolete+1] = current
- elseif direction == "rle" then -- Right-to-Left Embedding -> TRT
+ elseif direction == "rle" then -- Right-to-Left Embedding -> righttoleft_code
top = top + 1
stack[top] = { override, embedded }
embedded = -1
@@ -332,7 +332,7 @@ local function process(start)
end
textdir = autodir
setprop(current,"direction",true)
- elseif id == localpar_code and start_of_par(current) then
+ elseif id == par_code and start_of_par(current) then
local direction = getdirection(current)
if direction == righttoleft_code then
autodir = -1
@@ -382,7 +382,7 @@ local function process(start)
if cp == "n" then
local swap = state == "r"
if swap then
- head = insert_node_before(head,current,startdir("TLT"))
+ head = insert_node_before(head,current,startdir(lefttoright_code))
end
setprop(current,"direction",true)
while true do
@@ -395,14 +395,14 @@ local function process(start)
end
end
if swap then
- head, current = insert_node_after(head,current,stopdir("TLT"))
+ head, current = insert_node_after(head,current,stopdir(lefttoright_code))
end
elseif cp == "l" then
if state ~= "l" then
if state == "r" then
- head = insert_node_before(head,last or current,stopdir("TRT"))
+ head = insert_node_before(head,last or current,stopdir(righttoleft_code))
end
- head = insert_node_before(head,current,startdir("TLT"))
+ head = insert_node_before(head,current,startdir(lefttoright_code))
state = "l"
done = true
end
@@ -410,9 +410,9 @@ local function process(start)
elseif cp == "r" then
if state ~= "r" then
if state == "l" then
- head = insert_node_before(head,last or current,stopdir("TLT"))
+ head = insert_node_before(head,last or current,stopdir(lefttoright_code))
end
- head = insert_node_before(head,current,startdir("TRT"))
+ head = insert_node_before(head,current,startdir(righttoleft_code))
state = "r"
done = true
end
@@ -425,9 +425,9 @@ local function process(start)
end
else
if state == "r" then
- head = insert_node_before(head,current,stopdir("TRT"))
+ head = insert_node_before(head,current,stopdir(righttoleft_code))
elseif state == "l" then
- head = insert_node_before(head,current,stopdir("TLT"))
+ head = insert_node_before(head,current,stopdir(lefttoright_code))
end
state = false
last = false
@@ -438,7 +438,7 @@ local function process(start)
if next then
current = next
else
- local sd = (state == "r" and stopdir("TRT")) or (state == "l" and stopdir("TLT"))
+ local sd = (state == "r" and stopdir(righttoleft_code)) or (state == "l" and stopdir(lefttoright_code))
if sd then
if id == glue_code and getsubtype(current) == parfillskip_code then
head = insert_node_before(head,current,sd)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua
index 175fc0cc7ef..a9294a38dae 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['typo-dig'] = {
version = 1.001,
+ optimize = true,
comment = "companion to typo-dig.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv
index 0f957fbc1d6..26e35c19928 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dig.mkiv
@@ -42,7 +42,7 @@
{\clf_setdigitsmanipulation{#1}}
\unexpanded\def\resetdigitsmanipulation
- {\attribute\digitsattribute\attributeunsetvalue}
+ {\c_attr_digits\attributeunsetvalue}
\appendtoks
\resetdigitsmanipulation
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv
index 7449a705323..d9fb3b050a7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dir.mkiv
@@ -45,7 +45,7 @@
% is in fact:
\unexpanded\def\resetdirection
- {\attribute\directionsattribute\attributeunsetvalue}
+ {\c_attr_directions\attributeunsetvalue}
\newconstant\directionsbidimode % this one might become pivate
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua
index 50eb765f221..ddc6d68ae82 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.lua
@@ -82,7 +82,7 @@ local glyph_code = nodecodes.glyph
local hlist_code = nodecodes.hlist
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local actions = { }
initials.actions = actions
@@ -270,7 +270,7 @@ actions[v_default] = function(head,setting)
end
-- We pack so that successive handling cannot touch the dropped cap. Packaging
-- in a hlist is also needed because we cannot locally adapt e.g. parindent (not
- -- yet stored in with localpar).
+ -- yet stored in with par).
local prev = getprev(first)
local next = getnext(last)
--
@@ -334,7 +334,7 @@ end
-- we can count ... when all done, we can disable ...
function initials.handler(head)
- if getid(head) == localpar_code and start_of_par(head) then
+ if getid(head) == par_code and start_of_par(head) then
local settings = getprop(head,a_initial)
if settings then
disableaction("processors","typesetters.initials.handler")
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv
index 25b006b2f0f..e774b6796c4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-drp.mkiv
@@ -22,7 +22,7 @@
\definesystemattribute[initial][public]
\appendtoks
- \attribute\initialattribute\attributeunsetvalue
+ \c_attr_initial\attributeunsetvalue
\to \everyforgetall
%D For the moment here: dropped caps redone. In addition to the
@@ -59,9 +59,9 @@
\c!n=3,
\c!m=1,
\c!method=\v!none,
- % \s!font=Bold sa 4,
- % \s!font=Bold ht \measure{initial:n},
- \s!font=Bold cp \measure{initial:n},
+ % \c!font=Bold sa 4,
+ % \c!font=Bold ht \measure{initial:n},
+ \c!font=Bold cp \measure{initial:n},
\c!distance=.125\emwidth,
\c!hoffset=\zeropoint,
\c!voffset=\v!line, % \dimexp\lineheight*\initialparameter\c!n-\lineheight\relax]
@@ -90,7 +90,7 @@
\setupcurrentinitial[#2]%
\resetfontfeature % might be needed in more places
\doifelsenothing{\initialparameter\c!style}
- {\definedfont[\initialparameter\s!font]}
+ {\definedfont[\initialparameter\c!font]}
{\useinitialstyleparameter\c!style}%
\useinitialcolorparameter\c!color
\edef\p_voffset{\initialparameter\c!voffset}%
@@ -105,13 +105,13 @@
distance \dimexpr\initialparameter\c!distance\relax
hoffset \dimexpr\initialparameter\c!hoffset\relax
voffset \scratchvoffset
- ma \attribute\colormodelattribute
- ca \attribute\colorattribute
- ta \attribute\transparencyattribute
+ ma \c_attr_colormodel
+ ca \c_attr_color
+ ta \c_attr_transparency
font \fontid\font
dynamic \font_dynamic_value % it's a bit over the top to support this here
\relax
- \attribute\initialattribute\plusone
+ \c_attr_initial\plusone
\initialparameter\c!text
\endgroup
\glet\typo_initial_handle\relax}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua
index 0cec0e08e1e..5e1d4c109ae 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dua.lua
@@ -99,7 +99,7 @@ local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local math_code = nodecodes.math
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local parfillskip_code = gluecodes.parfillskip
@@ -337,18 +337,12 @@ local function get_baselevel(head,list,size,direction)
-- This is an adapted version:
if direction == lefttoright_code or direction == righttoleft_code then
return direction, true
- elseif getid(head) == localpar_code and start_of_par(head) then
+ elseif getid(head) == par_code and start_of_par(head) then
direction = getdirection(head)
if direction == lefttoright_code or direction == righttoleft_code then
return direction, true
end
end
- -- for old times sake we we handle strings too
- if direction == "TLT" then
- return lefttoright_code, true
- elseif direction == "TRT" then
- return righttoleft_code, true
- end
-- P2, P3
for i=1,size do
local entry = list[i]
@@ -775,8 +769,8 @@ local function apply_to_list(list,size,head,pardir)
enddir = false
end
elseif begindir then
- if id == localpar_code and start_of_par(current) then
- -- localpar should always be the 1st node
+ if id == par_code and start_of_par(current) then
+ -- par should always be the 1st node
local d = new_direction(begindir)
-- setprop(d,"directions",true)
-- setattrlist(d,current)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua
index f1bd38fcc5d..88b3361da4a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-dub.lua
@@ -87,7 +87,7 @@ local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
local math_code = nodecodes.math
local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local parfillskip_code = gluecodes.parfillskip
@@ -398,18 +398,12 @@ end
local function get_baselevel(head,list,size,direction)
if direction == lefttoright_code or direction == righttoleft_code then
return direction, true
- elseif getid(head) == localpar_code and start_of_par(head) then
+ elseif getid(head) == par_code and start_of_par(head) then
direction = getdirection(head)
if direction == lefttoright_code or direction == righttoleft_code then
return direction, true
end
end
- -- for old times sake we we handle strings too
- if direction == "TLT" then
- return lefttoright_code, true
- elseif direction == "TRT" then
- return righttoleft_code, true
- end
-- P2, P3
for i=1,size do
local entry = list[i]
@@ -908,8 +902,8 @@ local function apply_to_list(list,size,head,pardir)
enddir = false
end
elseif begindir then
- if id == localpar_code and start_of_par(current) then
- -- localpar should always be the 1st node
+ if id == par_code and start_of_par(current) then
+ -- par should always be the 1st node
local d = new_direction(begindir)
-- setprop(d,"directions",true)
-- setattrlist(d,current)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua
index d4c56e3008d..6e4f27de257 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-duc.lua
@@ -51,70 +51,73 @@ local utfchar = utf.char
local setmetatable = setmetatable
local formatters = string.formatters
-local directiondata = characters.directions
-local mirrordata = characters.mirrors
-local textclassdata = characters.textclasses
+local directiondata = characters.directions
+local mirrordata = characters.mirrors
+local textclassdata = characters.textclasses
-local nuts = nodes.nuts
+local nuts = nodes.nuts
-local getnext = nuts.getnext
-local getid = nuts.getid
-local getsubtype = nuts.getsubtype
-local getlist = nuts.getlist
-local getchar = nuts.getchar
-local getattr = nuts.getattr
-local getprop = nuts.getprop
-local getdirection = nuts.getdirection
-local isglyph = nuts.isglyph
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local getchar = nuts.getchar
+local getattr = nuts.getattr
+local getprop = nuts.getprop
+local getdirection = nuts.getdirection
+local isglyph = nuts.isglyph
-local setprop = nuts.setprop
-local setchar = nuts.setchar
-local setdirection = nuts.setdirection
-local setattrlist = nuts.setattrlist
+local setprop = nuts.setprop
+local setchar = nuts.setchar
+local setdirection = nuts.setdirection
+local setattrlist = nuts.setattrlist
-local properties = nodes.properties.data
+local properties = nodes.properties.data
-local remove_node = nuts.remove
-local insert_node_after = nuts.insert_after
-local insert_node_before = nuts.insert_before
-local start_of_par = nuts.start_of_par
+local remove_node = nuts.remove
+local insert_node_after = nuts.insert_after
+local insert_node_before = nuts.insert_before
+local start_of_par = nuts.start_of_par
-local nodepool = nuts.pool
-local new_direction = nodepool.direction
+local nodepool = nuts.pool
+local new_direction = nodepool.direction
-local nodecodes = nodes.nodecodes
-local gluecodes = nodes.gluecodes
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
-local glyph_code = nodecodes.glyph
-local glue_code = nodecodes.glue
-local hlist_code = nodecodes.hlist
-local vlist_code = nodecodes.vlist
-local math_code = nodecodes.math
-local dir_code = nodecodes.dir
-local localpar_code = nodecodes.localpar
+local glyph_code = nodecodes.glyph
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local math_code = nodecodes.math
+local dir_code = nodecodes.dir
+local par_code = nodecodes.par
+local penalty_code = nodecodes.penalty
-local parfillskip_code = gluecodes.parfillskip
+local parfillskip_code = gluecodes.parfillskip
+local parfillleftskip_code = gluecodes.parfillleftskip
-local dirvalues = nodes.dirvalues
-local lefttoright_code = dirvalues.lefttoright
-local righttoleft_code = dirvalues.righttoleft
+local dirvalues = nodes.dirvalues
+local lefttoright_code = dirvalues.lefttoright
+local righttoleft_code = dirvalues.righttoleft
-local maximum_stack = 0xFF
+local maximum_stack = 0xFF
-local a_directions = attributes.private('directions')
+local a_directions = attributes.private('directions')
-local directions = typesetters.directions
-local setcolor = directions.setcolor
-local getfences = directions.getfences
+local directions = typesetters.directions
+local setcolor = directions.setcolor
+local getfences = directions.getfences
-local remove_controls = true directives.register("typesetters.directions.removecontrols",function(v) remove_controls = v end)
------ analyze_fences = true directives.register("typesetters.directions.analyzefences", function(v) analyze_fences = v end)
+local remove_controls = true directives.register("typesetters.directions.removecontrols",function(v) remove_controls = v end)
+----- analyze_fences = true directives.register("typesetters.directions.analyzefences", function(v) analyze_fences = v end)
-local report_directions = logs.reporter("typesetting","directions three")
+local report_directions = logs.reporter("typesetting","directions three")
-local trace_directions = false trackers.register("typesetters.directions", function(v) trace_directions = v end)
-local trace_details = false trackers.register("typesetters.directions.details", function(v) trace_details = v end)
-local trace_list = false trackers.register("typesetters.directions.list", function(v) trace_list = v end)
+local trace_directions = false trackers.register("typesetters.directions", function(v) trace_directions = v end)
+local trace_details = false trackers.register("typesetters.directions.details", function(v) trace_details = v end)
+local trace_list = false trackers.register("typesetters.directions.list", function(v) trace_list = v end)
-- strong (old):
--
@@ -413,18 +416,12 @@ end
local function get_baselevel(head,list,size,direction)
if direction == lefttoright_code or direction == righttoleft_code then
return direction, true
- elseif getid(head) == localpar_code and start_of_par(head) then
+ elseif getid(head) == par_code and start_of_par(head) then
direction = getdirection(head)
if direction == lefttoright_code or direction == righttoleft_code then
return direction, true
end
end
- -- for old times sake we we handle strings too
- if direction == "TLT" then
- return lefttoright_code, true
- elseif direction == "TRT" then
- return righttoleft_code, true
- end
-- P2, P3
for i=1,size do
local entry = list[i]
@@ -949,14 +946,25 @@ local function apply_to_list(list,size,head,pardir)
elseif id == hlist_code or id == vlist_code then
setdirection(current,pardir) -- is this really needed?
elseif id == glue_code then
+ -- Maybe I should also fix dua and dub but on the other hand ... why?
if enddir and getsubtype(current) == parfillskip_code then
-- insert the last enddir before \parfillskip glue
- head = insert_node_before(head,current,new_direction(enddir,true))
+ local c = current
+ local p = getprev(c)
+ if p and getid(p) == glue_code and getsubtype(p) == parfillleftskip_code then
+ c = p
+ p = getprev(c)
+ end
+ if p and getid(p) == penalty_code then -- linepenalty
+ c = p
+ end
+ -- there is always a par nodes so head will stay
+ head = insert_node_before(head,c,new_direction(enddir,true))
enddir = false
end
elseif begindir then
- if id == localpar_code and start_of_par(current) then
- -- localpar should always be the 1st node
+ if id == par_code and start_of_par(current) then
+ -- par should always be the 1st node
head, current = insert_node_after(head,current,new_direction(begindir))
begindir = nil
end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.mkiv
index 7444db511eb..ec1b2907f3e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.mkiv
@@ -29,7 +29,7 @@
{\clf_setextrafontkerns{#1}}
\unexpanded\def\resetextrafontkerns
- {\attribute\extrafontkernattribute\attributeunsetvalue}
+ {\c_attr_extrafontkern\attributeunsetvalue}
\appendtoks
\resetextrafontkerns
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua
index 326d3acf570..3941e65efaa 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.lua
@@ -56,7 +56,7 @@ local glyph_code = nodecodes.glyph
local disc_code = nodecodes.disc
local kern_code = nodecodes.kern
local glue_code = nodecodes.glue
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local spaceskip_code = nodes.gluecodes.spaceskip
@@ -136,7 +136,7 @@ actions[v_line] = function(head,setting)
local temp = copy_node_list(head)
local linebreaks = { }
- set = function(head)
+ local set = function(head)
for g in nextglyph, head do
if dynamic > 0 then
setglyphdata(g,dynamic)
@@ -180,9 +180,9 @@ actions[v_line] = function(head,setting)
-- nodes.handlers.protectglyphs(temp) -- not needed as we discard
-- temp = typesetters.spacings.handler(temp) -- maybe when enabled
-- temp = typesetters.kerns.handler(temp) -- maybe when enabled
--- temp = typesetters.cases.handler(temp) -- maybe when enabled
-flush_node_list(temp);
+ -- temp = typesetters.cases.handler(temp) -- maybe when enabled
local width = getdimensions(temp)
+ flush_node_list(temp)
return width
end
@@ -372,7 +372,7 @@ end
actions[v_default] = actions[v_line]
function firstlines.handler(head)
- if getid(head) == localpar_code and start_of_par(head) then
+ if getid(head) == par_code and start_of_par(head) then
local settings = getprop(head,a_firstline)
if settings then
disableaction("processors","typesetters.firstlines.handler")
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv
index 6cca39f91c2..64ec092d6ea 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fln.mkiv
@@ -55,7 +55,7 @@
\definesystemattribute[firstline][public]
\appendtoks
- \attribute\firstlineattribute\attributeunsetvalue
+ \c_attr_firstline\attributeunsetvalue
\to \everyforgetall
\installcorenamespace {firstline}
@@ -81,9 +81,9 @@
\usefirstlinestyleandcolor\c!style\c!color
\clf_setfirstline
alternative {\firstlineparameter\c!alternative}%
- ma \attribute\colormodelattribute
- ca \attribute\colorattribute
- ta \attribute\transparencyattribute
+ ma \c_attr_colormodel
+ ca \c_attr_color
+ ta \c_attr_transparency
n \numexpr\firstlineparameter\c!n\relax
font \fontid\font
dynamic \font_dynamic_value
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
index 5aeb6723971..2bde63857f7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
@@ -35,10 +35,14 @@
\fi
\unexpanded\def\italiccorrection
- {\ifnum\attribute\italicsattribute<\plusone\normalitaliccorrection\fi}
+ {\ifnum\c_attr_italics<\plusone\normalitaliccorrection\fi}
+
+\pushoverloadmode
\let\/\italiccorrection
+\popoverloadmode
+
% 1 = end of word
% 2 = end of word and end of a list
@@ -57,7 +61,7 @@
{\clf_setupitaliccorrection{#settings}}
\appendtoks
- \attribute\italicsattribute\attributeunsetvalue
+ \c_attr_italics\attributeunsetvalue
\to \everymathematics
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv
index 0bb8170c721..18619957bd7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itm.mkiv
@@ -122,7 +122,7 @@
\edef\p_typo_items_n{\itemsparameter\c!n}%
\ifx\p_typo_items_n\empty
\getcommalistsize[#2]%
- \c_typo_items_n\commalistsize\relax
+ \c_typo_items_n\commalistsize\relax % \commalistcounter
\else
\c_typo_items_n\p_typo_items_n\relax
\fi
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv
index fedbce4d15b..80c71932f94 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-krn.mkiv
@@ -41,7 +41,7 @@
\clf_setcharacterkerning{\characterkerningparameter\c!factor}}
\unexpanded\def\resetcharacterkerning % fast one
- {\attribute\kernattribute\attributeunsetvalue}
+ {\c_attr_kern\attributeunsetvalue}
\appendtoks
\resetcharacterkerning
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv
index 6171441d6d3..ea1b27b73b2 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lig.mkiv
@@ -24,7 +24,7 @@
\unexpanded\def\noligature#1%
{\dontleavehmode
\begingroup
- \attribute\noligatureattribute\plusone
+ \c_attr_noligature\plusone
#1%
\endgroup}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua
index 15e543c52e5..84d622e1e9c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-lin.lua
@@ -38,7 +38,7 @@ if not modules then modules = { } end modules ['typo-lin'] = {
-- But, maybe there are good reasons for having just that anchor (mostly for educational purposes
-- I guess.)
--
--- At this stage the localpar node is no longer of any use so we remove it (each line has the
+-- At this stage the par node is no longer of any use so we remove it (each line has the
-- direction attached). We might at some point also strip the disc nodes as they no longer serve
-- a purpose but that can better be a helper. Anchoring left has advantage of keeping page
-- stream.
@@ -65,7 +65,7 @@ local hlist_code = nodecodes.hlist
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local linelist_code = listcodes.line
------ localpar_code = nodecodes.localpar
+----- par_code = nodecodes.par
local leftskip_code = gluecodes.leftskip
local rightskip_code = gluecodes.rightskip
local parfillskip_code = gluecodes.parfillskip
@@ -123,10 +123,10 @@ local getreserved = jobpositions.getreserved
local paragraphs = { }
typesetters.paragraphs = paragraphs
-local addskips = false
+local addskips = false -- todo: use engine normalizer
local noflines = 0
--- This is the third version, a mix between immediate (prestice lines) and delayed
+-- This is the third version, a mix between immediate (prestine lines) and delayed
-- as we don't want anchors that are not used.
-- I will make a better variant once lmtx is stable i.e. less clutter.
@@ -185,7 +185,7 @@ local function normalize(line,islocal) -- assumes prestine lines, nothing pre/ap
id = getid(current)
end
-- no:
- -- if id == localpar_code then
+ -- if id == par_code then
-- head = remove_node(head,head,true)
-- end
local tail = find_tail(head)
@@ -236,6 +236,8 @@ function paragraphs.checkline(n)
return getprop(n,"line") or normalize(n,true)
end
+-- do we still need this:
+
function paragraphs.normalize(head,islocal)
if texgetcount("pagebodymode") > 0 then
-- can be an option, maybe we need a proper state in lua itself ... is this check still needed?
@@ -482,7 +484,7 @@ function paragraphs.calculatedelta(n,width,delta,atleft,islocal,followshape,area
addanchortoline(line,setanchor(number))
line.hanchor = true
end
- local blob = getposition(s_anchor,number)
+ local blob = getposition("md:h",number)
if blob then
local reference = getreserved(area,blob.c)
if reference then
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv
index 921f1f230c3..95010ab8eaa 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.mkiv
@@ -161,8 +161,6 @@
% trialtypesetting: no need for margin stuff while trialing as
% is has no dimensions
-\definesystemconstant{margintext}
-
\newcount\nofmargintexts
\definepagestate[\s!margintext]
@@ -337,7 +335,7 @@
{\endgraf\ifhmode\space\fi}
\appendtoks
- \let\\\spaceorpar
+ \enforced\let\\\spaceorpar
\to \everymargindatacontent
%D Another one:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-ovl.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-ovl.mkiv
index 025ae8a8f9c..767ba3569d4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-ovl.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-ovl.mkiv
@@ -55,7 +55,7 @@
{\ifcsname\??overloads#1\endcsname\else
\typo_overloads_define{#1}%
\fi
- \attribute\overloadsattribute\csname\??overloads#1\endcsname}
+ \c_attr_overloads\csname\??overloads#1\endcsname}
\unexpanded\def\registeroverloads[#1]%
{\ifcsname\??overloads#1\endcsname\else
@@ -63,7 +63,7 @@
\fi}
\unexpanded\def\resetoverloads
- {\overloadsattribute\attributeunsetvalue}
+ {\c_attr_overloads\attributeunsetvalue}
%D We hook this into the replacement module, probably the only place where it makes
%D sense. Here is an adapted version of an example:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-plc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-plc.mkiv
new file mode 100644
index 00000000000..dbc9f081db6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-plc.mkiv
@@ -0,0 +1,39 @@
+%D \module
+%D [ file=typo-plc,
+%D version=2020.07.01,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Placeholders,
+%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 Typesetting Macros / Placeholders}
+
+\unprotect
+
+\installcorenamespace {placeholder}
+
+\installcommandhandler \??placeholder {placeholder} \??placeholder
+
+\unexpanded\def\placeholder[#1]%
+ {\begingroup
+ \edef\currentplaceholder{#1}%
+ \placeholderparameter\c!before
+ \useplaceholderstyleandcolor\c!style\c!color
+ \placeholderparameter\c!text
+ \placeholderparameter\c!after
+ \endgroup}
+
+\defineplaceholder
+ [todo]
+ %[\c!text={Still to be written!},
+ [\c!text=todo, % labeltext ?
+ \c!style=\v!bold,
+ \c!before=\blank,
+ \c!after=\blank]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.mkiv
index 39d0c85f438..f2c588912f4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-pnc.mkiv
@@ -39,7 +39,7 @@
{\clf_setperiodkerning{\periodkerningparameter\c!factor}}
\unexpanded\def\resetperiodkerning % fast one
- {\attribute\periodkernattribute\attributeunsetvalue}
+ {\c_attr_periodkern\attributeunsetvalue}
\appendtoks
\resetperiodkerning
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv
index df840899914..71ab9ffa9d1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-rep.mkiv
@@ -41,7 +41,7 @@
{\clf_setcharacterstripping{#1}}
\unexpanded\def\resetcharacterstripping
- {\attribute\strippingattribute\attributeunsetvalue}
+ {\c_attr_stripping\attributeunsetvalue}
% maybe .. this might disappear, but is handy for testing
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua
index da63d7b64e9..6c6ab9a3334 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-rub.lua
@@ -63,7 +63,7 @@ local glue_code = nodecodes.glue
local penalty_code = nodecodes.penalty
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
-local localpar_code = nodecodes.localpar
+local par_code = nodecodes.par
local dir_code = nodecodes.dir
local kerncodes = nodes.kerncodes
@@ -310,7 +310,7 @@ local function whatever(current)
-- go on
elseif id == hlist_code and getwidth(c) == 0 then
-- go on
- elseif id == whatsit_code or id == localpar_code or id == dir_code then
+ elseif id == whatsit_code or id == par_code or id == dir_code then
-- go on
else
l = false
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv
index fc73ef02185..682830150fb 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.mkiv
@@ -58,7 +58,7 @@
{\clf_setcharacterspacing{#1}}
\unexpanded\def\resetcharacterspacing % fast one
- {\attribute\spacingattribute\attributeunsetvalue}
+ {\c_attr_spacing\attributeunsetvalue}
\appendtoks
\resetcharacterspacing
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua
index ff10fb12103..db605a4916d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.lua
@@ -51,7 +51,6 @@ local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
local nextglyph = nuts.traversers.glyph
local getdimensions = nuts.dimensions
-local first_glyph = nuts.first_glyph
local setglue = nuts.setglue
@@ -174,7 +173,6 @@ function characteralign.handler(head,where)
if not datasets then
return head
end
- -- local first = first_glyph(head) -- we could do that once
local first
for n in nextglyph, head do
first = n
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv
index 33e071e7537..36e78aee05c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-tal.mkiv
@@ -56,10 +56,10 @@
% D
% D \typebuffer \blank \getbuffer \blank
-\unexpanded\def\signalcharacteralign #1#2{\attribute\characteralignattribute\numexpr#1*\maxcardminusone+#2\relax} % 0xFFFF
+\unexpanded\def\signalcharacteralign #1#2{\c_attr_characteralign\numexpr#1*\maxcardminusone+#2\relax} % 0xFFFF
\unexpanded\def\setcharacteralign #1#2{\clf_setcharacteralign#1{#2}}
\unexpanded\def\resetcharacteralign {\clf_resetcharacteralign}
-\unexpanded\def\nocharacteralign {\attribute\characteralignattribute\attributeunsetvalue}
+\unexpanded\def\nocharacteralign {\c_attr_characteralign\attributeunsetvalue}
\unexpanded\def\setcharacteraligndetail#1#2#3#4{\clf_setcharacteraligndetail#1{#2}#3#4\relax}
%D Mostly downward compatible:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv
index 684e3aa0491..a48bd6ad7f5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/unic-ini.mkiv
@@ -17,7 +17,7 @@
\unprotect
-\def\unicodenumber #1{\the \numexpr#1\relax} % no lookahead
+\def\unicodenumber #1{\the\numexpr#1\relax} % no lookahead
\def\unicodehexnumber#1{\cldcontext{number.toevenhex(\number#1))}}
%D \startbuffer
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua b/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua
index 76b5fd20bb3..bb9eca96688 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-dim.lua
@@ -44,8 +44,8 @@ local dimenfactors = allocate {
["pc"] = ( 1/ 12)/65536,
["dd"] = ( 1157/ 1238)/65536,
["cc"] = ( 1157/14856)/65536,
- ["nd"] = (20320/21681)/65536,
- ["nc"] = ( 5080/65043)/65536
+ -- ["nd"] = (20320/21681)/65536,
+ -- ["nc"] = ( 5080/65043)/65536
}
-- print(table.serialize(dimenfactors))
@@ -61,9 +61,9 @@ local dimenfactors = allocate {
-- ["ex"]=6.103515625e-005,
-- ["in"]=2.1113586636917117e-007,
-- ["mm"]=5.3628510057769473e-008,
--- ["nc"]=1.1917446679504327e-006,
--- ["nd"]=1.4300936015405194e-005,
--- ["pc"]=1.2715657552083333e-006,
+-- --["nc"]=1.1917446679504327e-006,
+-- --["nd"]=1.4300936015405194e-005,
+-- --["pc"]=1.2715657552083333e-006,
-- ["pt"]=1.52587890625e-005,
-- ["sp"]=1,
-- }
@@ -79,8 +79,8 @@ local dimenfactors = allocate {
-- ["ex"]=0.00006103515625,
-- ["in"]=0.00000021113587,
-- ["mm"]=0.00000005362851,
--- ["nc"]=0.00000119174467,
--- ["nd"]=0.00001430093602,
+-- --["nc"]=0.00000119174467,
+-- --["nd"]=0.00001430093602,
-- ["pc"]=0.00000127156576,
-- ["pt"]=0.00001525878906,
-- ["sp"]=1,
@@ -128,8 +128,8 @@ function number.tobasepoints (n,fmt) return numbertodimen(n,"bp",fmt) end
function number.topicas (n,fmt) return numbertodimen(n "pc",fmt) end
function number.todidots (n,fmt) return numbertodimen(n,"dd",fmt) end
function number.tociceros (n,fmt) return numbertodimen(n,"cc",fmt) end
-function number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end
-function number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end
+-------- number.tonewdidots (n,fmt) return numbertodimen(n,"nd",fmt) end
+-------- number.tonewciceros (n,fmt) return numbertodimen(n,"nc",fmt) end
--[[ldx--
<p>More interesting it to implement a (sort of) dimen datatype, one
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua
index 79af277437b..183f7bea81f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-fil.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['util-fil'] = {
version = 1.001,
+ optimize = true,
comment = "companion to luat-lib.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua b/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua
index a49507c6060..be763d92e91 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-lib.lua
@@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['util-lib'] = {
license = "see context related readme files",
}
+-- not used in context any more
+
--[[
The problem with library bindings is manyfold. They are of course platform
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua b/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua
index 3154bf6c28d..6d2f8c19e06 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-prs.lua
@@ -10,7 +10,7 @@ local lpeg, table, string = lpeg, table, string
local P, R, V, S, C, Ct, Cs, Carg, Cc, Cg, Cf, Cp = lpeg.P, lpeg.R, lpeg.V, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.Carg, lpeg.Cc, lpeg.Cg, lpeg.Cf, lpeg.Cp
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local concat, gmatch, find = table.concat, string.gmatch, string.find
-local tostring, type, next, rawset = tostring, type, next, rawset
+local tonumber, tostring, type, next, rawset = tonumber, tostring, type, next, rawset
local mod, div = math.mod, math.div
utilities = utilities or {}
@@ -373,6 +373,8 @@ hashes.settings_to_set = table.setmetatableindex(function(t,k) -- experiment, n
return v
end)
+-- as we use a next, we are not sure when the gc kicks in
+
getmetatable(hashes.settings_to_set).__mode = "kv" -- could be an option (maybe sharing makes sense)
function parsers.simple_hash_to_string(h, separator)
@@ -538,13 +540,15 @@ function parsers.csvsplitter(specification)
specification = specification and setmetatableindex(specification,defaultspecification) or defaultspecification
local separator = specification.separator
local quotechar = specification.quote
+ local numbers = specification.numbers
local separator = S(separator ~= "" and separator or ",")
local whatever = C((1 - separator - newline)^0)
if quotechar and quotechar ~= "" then
local quotedata = nil
for chr in gmatch(quotechar,".") do
local quotechar = P(chr)
- local quoteword = quotechar * C((1 - quotechar)^0) * quotechar
+ local quoteitem = (1 - quotechar)^0
+ local quoteword = quotechar * (numbers and (quoteitem/tonumber) or C(quoteitem)) * quotechar
if quotedata then
quotedata = quotedata + quoteword
else
@@ -559,29 +563,29 @@ function parsers.csvsplitter(specification)
end
end
--- and this is a slightly patched version of a version posted by Philipp Gesang
-
--- local mycsvsplitter = parsers.rfc4180splitter()
-
-- local crap = [[
-- first,second,third,fourth
-- "1","2","3","4"
--- "a","b","c","d"
--- "foo","bar""baz","boogie","xyzzy"
+-- "5","6","7","8"
-- ]]
+--
+-- local mycsvsplitter = parsers.csvsplitter { numbers = true }
+--
+-- local list = mycsvsplitter(crap) inspect(list)
--- local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
--- local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
+-- and this is a slightly patched version of a version posted by Philipp Gesang
function parsers.rfc4180splitter(specification)
specification = specification and setmetatableindex(specification,defaultspecification) or defaultspecification
+ local numbers = specification.numbers
local separator = specification.separator --> rfc: COMMA
local quotechar = P(specification.quote) --> DQUOTE
local dquotechar = quotechar * quotechar --> 2DQUOTE
/ specification.quote
local separator = S(separator ~= "" and separator or ",")
+ local whatever = (dquotechar + (1 - quotechar))^0
local escaped = quotechar
- * Cs((dquotechar + (1 - quotechar))^0)
+ * (numbers and (whatever/tonumber) or Cs(whatever))
* quotechar
local non_escaped = C((1 - quotechar - newline - separator)^1)
local field = escaped + non_escaped + Cc("")
@@ -601,6 +605,18 @@ function parsers.rfc4180splitter(specification)
end
end
+-- local mycsvsplitter = parsers.rfc4180splitter { numbers = true }
+--
+-- local crap = [[
+-- first,second,third,fourth
+-- "1","2","3","4"
+-- "a","b","c","d"
+-- "foo","bar""baz","boogie","xyzzy"
+-- ]]
+--
+-- local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
+-- local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
+
-- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
-- parsers.stepper("1-3,7,8,9")
-- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua b/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua
index 47c753ab18b..a8851f4c835 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-sac.lua
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['util-sac'] = {
version = 1.001,
+ optimize = true,
comment = "companion to luat-lib.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-soc-imp-http.lua b/Master/texmf-dist/tex/context/base/mkiv/util-soc-imp-http.lua
index c3a28be822a..d8f45880e7f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-soc-imp-http.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-soc-imp-http.lua
@@ -59,7 +59,7 @@ local function receiveheaders(sock, headers)
headers = { }
end
-- get first line
- local line, err = sock:receive()
+ local line, err = sock:receive("*l") -- this seems to be wrong!
if err then
return nil, err
end
@@ -72,14 +72,14 @@ local function receiveheaders(sock, headers)
end
name = lower(name)
-- get next line (value might be folded)
- line, err = sock:receive()
+ line, err = sock:receive("*l")
if err then
return nil, err
end
-- unfold any folded values
while find(line, "^%s") do
value = value .. line
- line = sock:receive()
+ line = sock:receive("*l")
if err then
return nil, err
end
@@ -103,7 +103,7 @@ socket.sourcet["http-chunked"] = function(sock, headers)
dirty = function() return sock:dirty() end,
}, {
__call = function()
- local line, err = sock:receive()
+ local line, err = sock:receive("*l")
if err then
return nil, err
end
@@ -114,7 +114,7 @@ socket.sourcet["http-chunked"] = function(sock, headers)
if size > 0 then
local chunk, err, part = sock:receive(size)
if chunk then
- sock:receive()
+ sock:receive("*a")
end
return chunk, err
else
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-str.lua b/Master/texmf-dist/tex/context/base/mkiv/util-str.lua
index aba7859c31e..0d1f39de9d7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-str.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-str.lua
@@ -70,27 +70,63 @@ local function points(n)
n = n * ptf
if n % 1 == 0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n)) -- plural as we need to keep the pt
+ end
+end
+
+local function nupoints(n)
+ if n == 0 then
+ return "0"
+ end
+ n = tonumber(n)
+ if not n or n == 0 then
+ return "0"
+ end
+ n = n * ptf
+ if n % 1 == 0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n) -- no strip
end
- return lpegmatch(stripzeros,format("%.5fpt",n)) -- plural as we need to keep the pt
end
local function basepoints(n)
if n == 0 then
- return "0pt"
+ return "0bp"
end
n = tonumber(n)
if not n or n == 0 then
- return "0pt"
+ return "0bp"
end
n = n * bpf
if n % 1 == 0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n)) -- plural as we need to keep the pt
end
- return lpegmatch(stripzeros,format("%.5fbp",n)) -- plural as we need to keep the pt
end
-number.points = points
-number.basepoints = basepoints
+local function nubasepoints(n)
+ if n == 0 then
+ return "0"
+ end
+ n = tonumber(n)
+ if not n or n == 0 then
+ return "0"
+ end
+ n = n * bpf
+ if n % 1 == 0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n) -- no strip
+ end
+end
+
+number.points = points
+number.nupoints = nupoints
+number.basepoints = basepoints
+number.nubasepoints = nubasepoints
-- str = " \n \ntest \n test\ntest "
-- print("["..string.gsub(string.collapsecrlf(str),"\n","+").."]")
@@ -357,7 +393,9 @@ end
-- U+hexadecimal %...u character number
-- U+HEXADECIMAL %...U character number
-- points %p number (scaled points)
+-- nupoints %P number (scaled points) / without unit / always 5 decimals
-- basepoints %b number (scaled points)
+-- nubasepoints %B number (scaled points) / without unit / always 5 decimals
-- table concat %...t table
-- table concat %{.}t table
-- serialize %...T sequenced (no nested tables)
@@ -616,7 +654,9 @@ local environment = {
concat = table.concat,
signed = number.signed,
points = number.points,
+ nupoints = number.nupoints,
basepoints = number.basepoints,
+ nubasepoints = number.nubasepoints,
utfchar = utf.char,
utfbyte = utf.byte,
lpegmatch = lpeg.match,
@@ -879,11 +919,21 @@ local format_p = function()
return format("points(a%s)",n)
end
+local format_P = function()
+ n = n + 1
+ return format("nupoints(a%s)",n)
+end
+
local format_b = function()
n = n + 1
return format("basepoints(a%s)",n)
end
+local format_B = function()
+ n = n + 1
+ return format("nubasepoints(a%s)",n)
+end
+
local format_t = function(f)
n = n + 1
if f and f ~= "" then
@@ -1057,76 +1107,44 @@ local format_rest = function(s)
return format("%q",s) -- catches " and \n and such
end
--- local format_extension = function(extensions,f,name)
--- local extension = extensions[name] or "tostring(%s)"
--- local f = tonumber(f) or 1
--- local w = find(extension,"%.%.%.")
--- if f == 0 then
--- if w then
--- extension = gsub(extension,"%.%.%.","")
--- end
--- return extension
--- elseif f == 1 then
--- if w then
--- extension = gsub(extension,"%.%.%.","%%s")
--- end
--- n = n + 1
--- local a = "a" .. n
--- return format(extension,a,a) -- maybe more times?
--- elseif f < 0 then
--- local a = "a" .. (n + f + 1)
--- return format(extension,a,a)
--- else
--- if w then
--- extension = gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
--- end
--- -- we could fill an array and then n = n + 1 unpack(t,n,n+f) but as we
--- -- cache we don't save much and there are hardly any extensions anyway
--- local t = { }
--- for i=1,f do
--- n = n + 1
--- -- t[#t+1] = "a" .. n
--- t[i] = "a" .. n
--- end
--- return format(extension,unpack(t))
--- end
--- end
-
local format_extension = function(extensions,f,name)
local extension = extensions[name] or "tostring(%s)"
local f = tonumber(f) or 1
local w = find(extension,"%.%.%.")
- if w then
- -- we have a wildcard
- if f == 0 then
+ if f == 0 then
+ if w then
extension = gsub(extension,"%.%.%.","")
- return extension
- elseif f == 1 then
+ end
+ return extension
+ elseif f == 1 then
+ if w then
extension = gsub(extension,"%.%.%.","%%s")
- n = n + 1
- local a = "a" .. n
- return format(extension,a,a) -- maybe more times?
- elseif f < 0 then
+ end
+ n = n + 1
+ local a = "a" .. n
+ return format(extension,a,a) -- maybe more times?
+ elseif f < 0 then
+ if w then
+ -- not supported
+ extension = gsub(extension,"%.%.%.","")
+ return extension
+ else
local a = "a" .. (n + f + 1)
return format(extension,a,a)
- else
- extension = gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- -- we could fill an array and then n = n + 1 unpack(t,n,n+f) but as we
- -- cache we don't save much and there are hardly any extensions anyway
- local t = { }
- for i=1,f do
- n = n + 1
- -- t[#t+1] = "a" .. n
- t[i] = "a" .. n
- end
- return format(extension,unpack(t))
end
else
- extension = gsub(extension,"%%s",function()
+ if w then
+ extension = gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ -- we could fill an array and then n = n + 1 unpack(t,n,n+f) but as we
+ -- cache we don't save much and there are hardly any extensions anyway
+ local t = { }
+ for i=1,f do
n = n + 1
- return "a" .. n
- end)
- return extension
+ -- t[#t+1] = "a" .. n
+ t[i] = "a" .. n
+ end
+ return format(extension,unpack(t))
end
end
@@ -1157,7 +1175,7 @@ local builder = Cs { "start",
--
+ V("r")
+ V("h") + V("H") + V("u") + V("U")
- + V("p") + V("b")
+ + V("p") + V("P") + V("b") + V("B")
+ V("t") + V("T")
+ V("l") + V("L")
+ V("I")
@@ -1206,8 +1224,10 @@ local builder = Cs { "start",
["H"] = (prefix_any * P("H")) / format_H, -- %H => 0x0A1B2 (when - no 0x) was V
["u"] = (prefix_any * P("u")) / format_u, -- %u => u+0a1b2 (when - no u+)
["U"] = (prefix_any * P("U")) / format_U, -- %U => U+0A1B2 (when - no U+)
- ["p"] = (prefix_any * P("p")) / format_p, -- %p => 12.345pt / maybe: P (and more units)
- ["b"] = (prefix_any * P("b")) / format_b, -- %b => 12.342bp / maybe: B (and more units)
+ ["p"] = (prefix_any * P("p")) / format_p, -- %p => 12.345pt
+ ["P"] = (prefix_any * P("P")) / format_P, -- %p => 12.345
+ ["b"] = (prefix_any * P("b")) / format_b, -- %b => 12.342bp
+ ["B"] = (prefix_any * P("B")) / format_B, -- %b => 12.342
["t"] = (prefix_tab * P("t")) / format_t, -- %t => concat
["T"] = (prefix_tab * P("T")) / format_T, -- %t => sequenced
["l"] = (prefix_any * P("l")) / format_l, -- %l => boolean
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua b/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua
index 4dafb2acd65..9f7112eb915 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-tab.lua
@@ -961,3 +961,12 @@ function table.ordered(t)
return function() end
end
end
+
+-- function table.randomremove(t,n)
+-- if not n then
+-- n = #t
+-- end
+-- if n > 0 then
+-- return remove(t,random(1,n))
+-- end
+-- end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-bar.mkxl b/Master/texmf-dist/tex/context/base/mkxl/anch-bar.mkxl
new file mode 100644
index 00000000000..3587eb8a052
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-bar.mkxl
@@ -0,0 +1,220 @@
+%D \module
+%D [ file=anch-bar,
+%D version=2003.03.16,
+%D title=\CONTEXT\ Anchoring Macros,
+%D subtitle=Margin Bars and alike,
+%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 Anchoring Macros / Margin Bars}
+
+\unprotect
+
+%D This can be done better now ...
+
+%D We will implement a sidebar mechanism using the functionality from
+%D \type {core-pos}.
+%D
+%D \starttyping
+%D \definesidebar[whow][rulecolor=green,distance=0pt]
+%D
+%D \input tufte \par
+%D \startsidebar
+%D \input tufte \par
+%D \input tufte \par
+%D \startsidebar[whow]
+%D \input tufte \par
+%D \input tufte \par
+%D \input tufte
+%D \stopsidebar \par
+%D \input tufte \par
+%D \input tufte
+%D \stopsidebar \par
+%D \input tufte \par
+%D \input tufte \par
+%D \startsidebar
+%D \input tufte \par
+%D \input tufte \par
+%D \input tufte \par
+%D \input tufte \par
+%D \input tufte
+%D \stopsidebar \par
+%D \input tufte \par
+%D \input tufte \par
+%D \startsidebar
+%D \input tufte
+%D \input tufte
+%D \input tufte
+%D \input tufte
+%D \input tufte
+%D \stopsidebar
+%D \stoptyping
+
+\installcorenamespace{sidebar}
+
+\installcommandhandler \??sidebar {sidebar} \??sidebar
+
+\newcount\c_anch_sidebars_n
+\newcount\c_anch_sidebars_current % local
+\newdimen\d_anch_sidebars_distance
+\newcount\c_anch_sidebars_level
+
+% \setupMPvariables
+% [mpos:sidebar]
+% [linecolor=red,
+% linewidth=2pt,
+% distance=5pt]
+
+\setupsidebar
+ [\c!rulethickness=\dimexpr\bodyfontsize/6\relax, % 2pt default
+ \c!rulecolor=\s!black,
+ \c!alternative=0,
+ \c!topoffset=\zeropoint,
+ \c!bottomoffset=\zeropoint,
+ \c!distance=.5\bodyfontsize,
+ \c!level=,
+ \c!leftmargindistance=\zeropoint]
+
+\aliased\let\setupsidebars\setupsidebar
+
+\permanent\tolerant\protected\def\startsidebar[#1]#*[#2]%
+ {\bgroup
+ \dontleavehmode
+ \advance\c_anch_sidebars_level\plusone
+ \global\advance\c_anch_sidebars_n\plusone
+ \c_anch_sidebars_current\c_anch_sidebars_n\relax % relax needed
+ \ifhastok={#1}%
+ \edef\currentsidebar{\the\c_anch_sidebars_level}%
+ \checksidebarparent
+ \setupcurrentsidebar[#1]%
+ \else
+ \def\currentsidebar{#1}%
+ \setupcurrentsidebar[#2]%
+ \fi
+ \scratchdistance\sidebarparameter\c!distance\relax
+ \scratchdimen\sidebarparameter\c!leftmargindistance\relax
+ \edef\m_level{\sidebarparameter\c!level}%
+ \ifempty\m_level
+ \ifnum\c_anch_sidebars_level=\plusone
+ \ifzeropt\scratchdimen
+ \advance\d_anch_sidebars_distance\scratchdistance\relax
+ \else
+ \d_anch_sidebars_distance\scratchdimen
+ \fi
+ \else
+ \advance\d_anch_sidebars_distance\scratchdistance\relax
+ \fi
+ \else
+ \ifnum\m_level=\plusone
+ \ifzeropt\scratchdimen
+ \advance\d_anch_sidebars_distance\scratchdistance\relax
+ \else
+ \d_anch_sidebars_distance\scratchdimen
+ \fi
+ \else
+ \d_anch_sidebars_distance\dimexpr\scratchdimen+\numexpr\m_level-\plusone\relax\dimexpr\scratchdistance\relax\relax
+ \fi
+ \fi
+ \startpositionoverlay{\v!text-1}%
+ \normalexpanded{\setMPpositiongraphicrange % maybe expand in definition
+ {b:sidebar:\the\c_anch_sidebars_n}%
+ {e:sidebar:\the\c_anch_sidebars_n}%
+ {mpos:sidebar}%
+ {self=sidebar:\the\c_anch_sidebars_n,
+ linewidth=\sidebarparameter\c!rulethickness,
+ linecolor=\sidebarparameter\c!rulecolor,
+ alternative=\sidebarparameter\c!alternative,
+ topoffset=\the\dimexpr\sidebarparameter\c!topoffset,
+ bottomoffset=\the\dimexpr\sidebarparameter\c!bottomoffset,
+ distance=\the\d_anch_sidebars_distance}%
+ }%
+ \stoppositionoverlay
+ \bpos{sidebar:\the\c_anch_sidebars_current}%
+ \ignorespaces}
+
+\permanent\protected\def\stopsidebar
+ {\removelastspace
+ \epos{sidebar:\the\c_anch_sidebars_current}
+ \carryoverpar\egroup}
+
+%D Let's keep this nice and simple (okay, we could pass the 6 variables in
+%D one lua call).
+
+\startMPpositionmethod{mpos:sidebar}
+ \startMPpositiongraphic{mpos:sidebar}{linecolor,linewidth,distance,alternative}%
+ anch_sidebars_draw (
+ \MPp\MPbself,\MPp\MPeself,\MPy\MPbself,\MPy\MPeself,\MPh\MPbself,\MPd\MPeself,
+ \MPx{\textanchor},\MPy{\textanchor},\MPw{\textanchor},\MPh{\textanchor},
+ \MPvar{alternative},\MPvar{distance},\MPvar{linewidth},\MPvar{linecolor},
+ \MPvar{topoffset}, \MPvar{bottomoffset}
+ ) ;
+ \stopMPpositiongraphic
+ \MPpositiongraphic{mpos:sidebar}{}%
+\stopMPpositionmethod
+
+%D We now reimplement the \MKII\ margin rules handler in a more
+%D modern way.
+%D
+%D \setupmarginrules
+%D [rulecolor=darkred,
+%D rulethickness=2pt]
+%D
+%D \setupmarginrules % sidebar
+%D [2]
+%D [rulecolor=darkblue]
+%D
+%D \startmarginrule[1]
+%D \input ward
+%D \startmarginrule[2]
+%D \input ward
+%D \startmarginrule[3]
+%D \input ward
+%D \startmarginrule[level=6,rulecolor=darkgreen]
+%D \input ward
+%D \stopmarginrule
+%D \input ward
+%D \stopmarginrule
+%D \input ward
+%D \stopmarginrule
+%D \input ward
+%D \stopmarginrule
+%D
+%D Compared to the old mechanism we now can pass settings too.
+
+\definesidebar
+ [\v!margin]
+ [\c!leftmargindistance=\dimexpr\leftmargindistance+\sidebarparameter\c!rulethickness/2\relax]
+
+\dorecurse{5}{\definesidebar[\v!margin:#1][\v!margin]} % let's be nice and predefine 5 levels
+
+\permanent\tolerant\protected\def\setupmarginrule[#1]#*[#2]%
+ {\ifarguments\or
+ \setupsidebar[\v!margin][#1]%
+ \or
+ \setupsidebar[\v!margin:#1][#2]%
+ \fi}
+
+\aliased\let\setupmarginrules\setupmarginrule
+
+\permanent\tolerant\protected\def\startmarginrule[#1]% pretty inefficient checking
+ {\edef\m_anch_marginrules_kind{#1}%
+ \ifempty\m_anch_marginrules_kind
+ \startsidebar[\v!margin][]%
+ \orelse\ifhastok={\m_anch_marginrules_kind}%
+ \startsidebar[\v!margin][#1]%
+ \else
+ \anch_marginrules_check{#1}%
+ \startsidebar[\v!margin:#1][\c!level=#1]%
+ \fi}
+
+\def\anch_marginrules_check#1%
+ {\doifnotcommandhandler\??sidebar{\v!margin:#1}{\definesidebar[\v!margin:#1][\v!margin]}}
+
+\aliased\let\stopmarginrule\stopsidebar
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-bck.mklx b/Master/texmf-dist/tex/context/base/mkxl/anch-bck.mklx
new file mode 100644
index 00000000000..36416c93da3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-bck.mklx
@@ -0,0 +1,775 @@
+%D \module
+%D [ file=anch-bck, % moved from anch-pgr (1999.08.01)
+%D version=2011.12.19,
+%D title=\CONTEXT\ Anchoring Macros,
+%D subtitle=Backgrounds,
+%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.
+
+% when tested for a while: \MPgetmultipars -> getmultipars
+% when tested for a while: \MPvar -> mpvar
+
+\writestatus{loading}{ConTeXt Anchoring Macros / Backgrounds}
+
+%D This module is quite okay but at some point I might add methods that use
+%D attributes although not too much is to be expected, apart from better anchoring.
+%D In fact better anchoring can be done independent of that.
+
+\unprotect
+
+% This might be overloaded later on:
+
+% \defineoverlay[\v!text-2][\positionoverlay{\v!text-2}]
+% \defineoverlay[\v!text-1][\positionoverlay{\v!text-1}]
+% \defineoverlay[\v!text+1][\positionoverlay{\v!text+1}]
+% \defineoverlay[\v!text+2][\positionoverlay{\v!text+2}]
+
+% Paragraph positions:
+
+\newcount\c_anch_backgrounds_text_n
+
+\def\v_anch_backgrounds_text_current {tbg:0}
+\def\v_anch_backgrounds_anchor_current_b{b:\v_anch_backgrounds_text_current}
+\def\v_anch_backgrounds_anchor_current_e{e:\v_anch_backgrounds_text_current}
+
+\def\anch_backgrounds_text_initialize_next
+ {\global\advance\c_anch_backgrounds_text_n\plusone
+ \edef\v_anch_backgrounds_text_current{tbg:\number\c_anch_backgrounds_text_n}}
+
+% The first position can be used in the middle of a paragraph in which case we're
+% too late with initializing par positions. Therefore we check if positions are
+% used at all.
+%
+% tricky: we need to catch newly set! otherwise an old run can have positions
+
+\protected\def\anch_backgrounds_text_initialize
+ {\doifelsepositionsused\enableparpositions\donothing
+ \glet\anch_backgrounds_text_initialize\relax}
+
+\appendtoks
+ \anch_backgrounds_text_initialize
+\to \everystarttext
+
+%D Some MP
+
+\newcount\MPparcounter
+
+\permanent\def\MPself {\MPvar{self}}
+\permanent\def\MPbself {b:\MPvar{self}}
+\permanent\def\MPeself {e:\MPvar{self}}
+\permanent\def\MPparanchor{p:\number\MPparcounter}
+
+% \carryoverpar is needed for left/right floats
+
+% \definetextbackground[more][state=start,backgroundcolor=red] % location=paragraph
+% \definetextbackground[test][state=start,backgroundcolor=green]
+%
+% \page \placefigure[left]{}{}
+%
+% \starttextbackground[test]
+% \readfile{ward}{}{}
+% \starttextbackground[more]
+% \readfile{ward}{}{}
+% \stoptextbackground
+% \readfile{ward}{}{}
+% \stoptextbackground
+%
+% \page \placefigure[right]{}{}
+%
+% \starttextbackground[test]
+% \readfile{ward}{}{}
+% \starttextbackground[more]
+% \readfile{ward}{}{}
+% \stoptextbackground
+% \readfile{ward}{}{}
+% \stoptextbackground
+
+\newcount\c_anch_backgrounds_text_level
+
+\installcorenamespace{textbackground}
+\installcorenamespace{textbackgroundlevel}
+
+\installcommandhandler \??textbackground {textbackground} \??textbackground
+
+\appendtoks
+ \frozen\instance\setuevalue{\currenttextbackground}{\groupedcommand{\starttextbackground[\currenttextbackground]}{\stoptextbackground}}%
+ \frozen\instance\setuevalue{\e!start\currenttextbackground}{\starttextbackground[\currenttextbackground]}%
+ \frozen\instance\setuevalue{\e!stop \currenttextbackground}{\stoptextbackground}%
+\to \everydefinetextbackground
+
+\newconstant \c_anch_backgrounds_pos_state
+\newconditional\c_anch_backgrounds_pos_no_shape
+
+\def\anch_backgrounds_bpos
+ {\ifconditional\c_anch_backgrounds_pos_no_shape
+ \bposkind\v_anch_backgrounds_text_current\plusthree
+ \else
+ \bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state
+ \fi}
+
+\def\anch_backgrounds_epos
+ {\ifconditional\c_anch_backgrounds_pos_no_shape
+ \eposkind\v_anch_backgrounds_text_current\plusthree
+ \else
+ \eposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state
+ \fi}
+
+% \permanent\tolerant\protected\def\starttextbackground[#tag]#spacer[#settings]%
+% {\begingroup
+% \advance\c_anch_backgrounds_text_level\plusone
+% \def\currenttextbackground{#tag}%
+% \anch_backgrounds_text_initialize_next
+% \ifparameter#settings\or
+% \setupcurrenttextbackground[#settings]%
+% \fi
+% \doifelse{\textbackgroundparameter\c!state}\v!start
+% \anch_backgrounds_text_preset_yes
+% \anch_backgrounds_text_preset_nop
+% \anch_backgrounds_text_start_indeed}
+
+% ugly hack to register usage
+
+\newcount \c_anch_backgrounds_text_count
+\newcount \c_anch_backgrounds_text_check
+\newconstant\c_anch_backgrounds_text_state
+
+\permanent\tolerant\protected\def\starttextbackground[#tag]#spacer[#settings]%
+ {\begingroup
+ \global\advance\c_anch_backgrounds_text_count\plusone
+ \advance\c_anch_backgrounds_text_level\plusone
+ \def\currenttextbackground{#tag}%
+ \anch_backgrounds_text_initialize_next
+ \ifparameter#settings\or
+ \setupcurrenttextbackground[#settings]%
+ \fi
+ \doifelse{\textbackgroundparameter\c!state}\v!start
+ \anch_backgrounds_text_preset_yes
+ \anch_backgrounds_text_preset_nop
+ \anch_backgrounds_text_start_indeed}
+
+\def\anch_backgrounds_text_level_start
+ {\c_anch_backgrounds_text_check\c_anch_backgrounds_text_count}
+
+\def\anch_backgrounds_text_level_stop
+ {\c_anch_backgrounds_text_state
+ \ifnum\c_anch_backgrounds_text_count>\c_anch_backgrounds_text_check
+ \plusone
+ \else
+ \zerocount
+ \fi}
+
+% todo \backgroundvariable\c!variant
+
+% criterium determines when we fall back on text
+% always is always forcing paragraphs
+
+\let\anch_backgrounds_text_start_indeed\relax
+\let\anch_backgrounds_text_stop_indeed \relax
+
+\setvalue{\??textbackgroundlevel\v!text}%
+ {\let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_txt
+ \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_txt}
+
+\setvalue{\??textbackgroundlevel\v!paragraph}%
+ {\ifnum\c_anch_backgrounds_text_level>\textbackgroundparameter\c!criterium\relax
+ \let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_txt
+ \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_txt
+ \else
+ \let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_par
+ \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_par
+ \fi}
+
+\setvalue{\??textbackgroundlevel\v!always}%
+ {\let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_par
+ \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_par}
+
+\setvalue{\??textbackgroundlevel\v!none}%
+ {\anch_backgrounds_text_preset_nop}
+
+\def\anch_backgrounds_text_preset_nop
+ {\let\anch_backgrounds_text_start_indeed\relax
+ \let\anch_backgrounds_text_stop_indeed \relax}
+
+\def\anch_backgrounds_text_preset_yes
+ {\anch_backgrounds_text_preset_nop
+ \csname\??textbackgroundlevel\textbackgroundparameter\c!location\endcsname
+ \edef\p_anch_backgrounds_text_frame {\textbackgroundparameter\c!frame}%
+ \edef\p_anch_backgrounds_text_corner {\textbackgroundparameter\c!corner}%
+ \edef\p_anch_backgrounds_text_background{\textbackgroundparameter\c!background}%
+ \ifx\p_anch_backgrounds_text_frame\v!on
+ \ifx\p_anch_backgrounds_text_corner\v!round
+ \let\p_anch_backgrounds_text_frame\!!plustwo
+ \else
+ \let\p_anch_backgrounds_text_frame\!!plusone
+ \fi
+ \else
+ \let\p_anch_backgrounds_text_frame\!!zerocount
+ \fi
+ \ifx\p_anch_backgrounds_text_background\v!color
+ \let\p_anch_backgrounds_text_background\!!plusone
+ \else
+ \let\p_anch_backgrounds_text_background\!!zerocount
+ \fi
+ \startpositionoverlay{\textbackgroundoverlay{\textbackgroundparameter\c!level}}%
+ \anch_backgrounds_text_meta_graphic % gets expanded directly
+ \stoppositionoverlay}
+
+\def\anch_backgrounds_text_meta_graphic
+ {\normalexpanded
+ {\setMPpositiongraphicrange % needs to be optimized
+ {\v_anch_backgrounds_anchor_current_b}%
+ {\v_anch_backgrounds_anchor_current_e}%
+ {\textbackgroundparameter\c!method}%
+ {self=\v_anch_backgrounds_text_current,
+ mp=\textbackgroundparameter\c!mp,
+ gridtype=\textbackgroundparameter\c!alternative,
+ filltype=\p_anch_backgrounds_text_background,
+ linetype=\p_anch_backgrounds_text_frame,
+ dashtype=\textbackgroundparameter\c!dash,
+ gridcolor=\textbackgroundparameter\c!framecolor,
+ linecolor=\textbackgroundparameter\c!framecolor,
+ lineoffset=\textbackgroundparameter\c!frameoffset,
+ fillcolor=\textbackgroundparameter\c!backgroundcolor,
+ filloffset=\textbackgroundparameter\c!backgroundoffset,
+ gridwidth=\textbackgroundparameter\c!rulethickness,
+ gridshift=\textbackgroundparameter\c!voffset,
+ linewidth=\textbackgroundparameter\c!rulethickness,
+ lineradius=\textbackgroundparameter\c!radius}}}
+
+\permanent\protected\def\stoptextbackground
+ {\anch_backgrounds_text_stop_indeed
+ \carryoverpar\endgroup} % why doesn't this work ?
+
+\permanent\protected\def\starttextbackgroundmanual
+ {\begingroup
+ \c_anch_backgrounds_pos_state\plusone
+ \usetextbackgroundstyleandcolor\c!style\c!color
+ \anch_backgrounds_bpos}
+
+\permanent\protected\def\stoptextbackgroundmanual
+ {\anch_backgrounds_epos
+ \carryoverpar\endgroup}
+
+\def\anch_backgrounds_text_start_txt
+ {\ifvmode \dontleavehmode \fi
+ \begingroup
+ \c_anch_backgrounds_pos_state\plusone
+ \usetextbackgroundstyleandcolor\c!style\c!color
+ \anch_backgrounds_bpos}
+
+\def\anch_backgrounds_text_stop_txt
+ {\anch_backgrounds_epos
+ \carryoverpar\endgroup}
+
+\newskip\textbackgroundskip
+
+% maybe we should have a resetter for such compensation struts
+
+\def\anch_backgrounds_reset_attributes
+ {\scratchcounter\c_attr_snapmethod
+ \resetallattributes % \c_attr_linenumber\attributeunsetvalue
+ \c_attr_snapmethod\scratchcounter}
+
+\def\anch_backgrounds_text_start_par % beware .. background shapes
+ {\endgraf % new
+ \textbackgroundparameter\c!before
+ \begingroup
+ \c_anch_backgrounds_pos_state\plustwo
+ \begingroup
+ \anch_backgrounds_reset_attributes
+ \noindent
+ \ifgridsnapping
+ \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!topoffset}%
+ \ifdim\textbackgroundskip>\zeropoint
+ \struttedbox % not always ok (e.g. setups)
+ {\hpack{\raise\textbackgroundskip\hpack{\anch_backgrounds_bpos}}}%
+ \else
+ \anch_backgrounds_bpos
+ \fi
+ \else
+ \anch_backgrounds_bpos
+ \fi
+ \endgraf % we need a vertical nobreak - 29/06/2004
+ \endgroup
+ \nobreak
+ \vskip-\lineheight
+ \nobreak
+ \ifgridsnapping \else
+ \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!topoffset}%
+ \ifdim\textbackgroundskip>\zeropoint
+ \kern\textbackgroundskip\nobreak
+ \fi
+ \fi
+ \dosetleftskipadaption{\textbackgroundparameter\c!leftoffset}%
+ \advance\leftskip\leftskipadaption
+ \dosetleftskipadaption{\textbackgroundparameter\c!rightoffset}%
+ \advance\rightskip\leftskipadaption
+ % new
+ \dosetraggedcommand{\textbackgroundparameter\c!align}%
+ \raggedcommand
+ %
+ \usetextbackgroundstyleandcolor\c!style\c!color
+ \nowhitespace
+ \seteffectivehsize
+ \doinhibitblank % \blank[\v!disable]% new
+ \par}
+
+\def\anch_backgrounds_text_stop_par
+ {\par
+ \removelastskip % new
+ \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!bottomoffset}%
+ \ifdim\lastskip>\zeropoint
+ \advance\textbackgroundskip-\lastskip
+ \fi
+ \ifgridsnapping
+ \orelse\ifdim\textbackgroundskip>\zeropoint
+ \kern\textbackgroundskip\nobreak
+ \fi
+ \nobreak
+ \vskip-\dimexpr\lineheight+\parskip\relax % problem: we loose the hangindent
+ \nobreak
+ \endgroup
+ \begingroup
+ \forgeteverypar % NOT REALLY NEEDED, SAVES HASH/MEM
+ \anch_backgrounds_reset_attributes
+ \nobreak \noindent \strut \hfill \kern\zeropoint
+ % so far
+ \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!bottomoffset}%
+ \ifgridsnapping % experimental, pascal (todo: topoffset in same way)
+ \ifdim\textbackgroundskip>\zeropoint
+ \struttedbox % not always ok (e.g. setups)
+ {\hpack{\lower\textbackgroundskip\hpack{\anch_backgrounds_epos}}}%
+ \else
+ \anch_backgrounds_epos
+ \fi
+ \else
+ \anch_backgrounds_epos
+ \fi
+ \endgraf
+ \carryoverpar\endgroup
+ \endgraf % new
+ \textbackgroundparameter\c!after}
+
+\permanent\protected\def\checkpositionoverlays % overloads \relax in anch-pgr
+ {\ifproductionrun
+ \enabletextarearegistration
+ \enablehiddenbackground
+ \enforced\glet\checkpositionoverlays\relax
+ \fi}
+
+% shape handling
+
+\definesystemattribute[textbackground][public]
+
+% \def\page_prepare_backgrounds#1%
+% {\clf_collectbackgrounds\realpageno#1\relax}
+
+\def\anch_backgrounds_bpos
+ {\ifconditional\c_anch_backgrounds_pos_no_shape
+ \c_attr_textbackground\attributeunsetvalue
+ \bposkind\v_anch_backgrounds_text_current\plusthree
+ \orelse\ifnum\c_anch_backgrounds_pos_state=\plusone
+ \bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state
+ \clf_registerbackground{\v_anch_backgrounds_text_current}%
+ \else
+ \bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state
+ \c_attr_textbackground\attributeunsetvalue
+ \fi}
+
+% plugs into other code
+
+\def\strc_floats_wrap_free_region
+ {\global\setbox\floatbox\hpack % we always need to wrap
+ {\ifconditional\c_strc_floats_trace_free
+ \strc_floats_show_free_region
+ \fi
+ \box\floatbox}}
+
+\startuseMPgraphic{floatfree}
+ draw_free_region(
+ \the\wd\floatbox,
+ \the\ht\floatbox,
+ \the\dp\floatbox,
+ \the\d_free_offset_left,
+ \the\d_free_offset_right,
+ \the\d_free_offset_top,
+ \the\d_free_offset_bottom
+ ) ;
+\stopuseMPgraphic
+
+\def\strc_floats_show_free_region
+ {\lower\dp\floatbox\hpack to \zeropoint {\useMPgraphic{floatfree}}}
+
+\newconditional\c_strc_floats_mark_as_free
+\newconditional\c_strc_floats_trace_free
+\newconstant \c_free_offset_kind
+\newdimen \d_free_offset_left
+\newdimen \d_free_offset_right
+\newdimen \d_free_offset_top
+\newdimen \d_free_offset_bottom
+
+\installtextracker{floats.freeregion}
+ {\settrue \c_strc_floats_trace_free}
+ {\setfalse\c_strc_floats_trace_free}
+
+\def\strc_floats_mark_as_free#1#2#3#4#5%
+ {\c_free_offset_kind #1%
+ \d_free_offset_left #2%
+ \d_free_offset_right #3%
+ \d_free_offset_top #4%
+ \d_free_offset_bottom#5%
+ \strc_floats_wrap_free_region
+ \anch_mark_tagged_box_free
+ \floatbox
+ \c_free_offset_kind
+ \d_free_offset_left
+ \d_free_offset_right
+ \d_free_offset_top
+ \d_free_offset_bottom}
+
+\ifrelax\strc_floats_mark_pag_as_free \else
+ \writestatus{error}{wrong place for pag_as_free}\wait
+\fi
+
+\ifrelax\strc_floats_mark_par_as_free \else
+ \writestatus{error}{wrong place for par_as_free}\wait
+\fi
+
+\def\strc_floats_mark_pag_as_free
+ {\ifpositioning
+ \ifconditional\c_strc_floats_mark_as_free
+ \strc_floats_mark_as_free
+ \plusone
+ \zeropoint
+ \zeropoint
+ \d_strc_floats_top
+ \d_strc_floats_bottom
+ \fi
+ \fi}
+
+\def\strc_floats_mark_par_as_free
+ {\ifpositioning
+ \ifconditional\c_strc_floats_mark_as_free
+ \ifcase\c_page_sides_float_type
+ \or % backspace
+ \strc_floats_mark_as_free
+ \plustwo
+ \zeropoint
+ \d_page_sides_rightoffset
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \or % leftedge
+ \strc_floats_mark_as_free
+ \plustwo
+ \zeropoint
+ \d_page_sides_rightoffset
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \or % leftmargin
+ \strc_floats_mark_as_free
+ \plustwo
+ \zeropoint
+ \d_page_sides_rightoffset
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \or % leftside
+ \strc_floats_mark_as_free
+ \plustwo
+ \d_page_sides_leftskip % maybe too
+ \d_page_sides_margin
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \or % rightside
+ \strc_floats_mark_as_free
+ \plusthree
+ \d_page_sides_margin
+ \d_page_sides_rightskip % maybe too
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \or % rightmargin
+ \strc_floats_mark_as_free
+ \plusthree
+ \d_page_sides_leftoffset
+ \zeropoint
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \or % rightedge
+ \strc_floats_mark_as_free
+ \plusthree
+ \d_page_sides_leftoffset
+ \zeropoint
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \or % cutspace
+ \strc_floats_mark_as_free
+ \plusthree
+ \d_page_sides_leftoffset
+ \zeropoint
+ \d_page_sides_topskip
+ \d_page_sides_bottomskip
+ \fi
+ \fi
+ \fi}
+
+% so far
+
+\setuptextbackground
+ [\c!mp=mpos:region:draw,
+ \c!method=mpos:region,
+ \c!state=\v!start,
+ \c!location=\v!text,
+ \c!leftoffset=\!!zeropoint, % 1em,
+ \c!rightoffset=\textbackgroundparameter\c!leftoffset,
+ \c!topoffset=\!!zeropoint, % \v!medium,
+ \c!bottomoffset=\textbackgroundparameter\c!topoffset,
+ \c!criterium=\plusone,
+ \c!level=-1,
+ \c!alternative=0,
+ \c!align=,
+ \c!dash=0, % to be internationalized
+ \c!background=\v!color,
+ \c!backgroundcolor=lightgray,
+ \c!backgroundoffset=\!!zeropoint,
+ \c!corner=\v!rectangular,
+ \c!radius=.5\bodyfontsize,
+ \c!voffset=\!!zeropoint,
+ \c!frame=\v!on,
+ \c!framecolor=blue,
+ \c!frameoffset=\!!zeropoint,
+ \c!rulethickness=\linewidth]
+
+%D The \METAPOST\ connection:
+
+% gridtype = 1 => baseline
+% gridtype = 2 => betweenline
+
+\setupMPvariables
+ [mpos:region]
+ [mp=mpos:region:unset,
+ gridtype=0,
+ linetype=1,
+ filltype=1,
+ dashtype=0, % 1 = dashed, 2 = dashed with background
+ gridcolor=red,
+ linecolor=blue,
+ fillcolor=lightgray,
+ filloffset=\!!zeropoint,
+ linewidth=\linewidth,
+ gridwidth=\linewidth,
+ gridshift=\!!zeropoint,
+ lineradius=.5\bodyfontsize,
+ lineoffset=\!!zeropoint,
+ dashtype=1]
+
+\startuseMPgraphic{mpos:region:setup}
+ boxgridtype := \MPvar{gridtype} ;
+ boxlinetype := \MPvar{linetype} ;
+ boxfilltype := \MPvar{filltype} ;
+ boxdashtype := \MPvar{dashtype} ;
+ boxfilloffset := \MPvar{filloffset} ;
+ boxlinewidth := \MPvar{linewidth} ;
+ boxgridwidth := \MPvar{gridwidth} ;
+ boxgridshift := \MPvar{gridshift} ;
+ boxlineradius := \MPvar{lineradius} ;
+ boxlineoffset := \MPvar{lineoffset} ;
+ %
+ def boxgridcolor = \MPvar{gridcolor} enddef ;
+ def boxlinecolor = \MPvar{linecolor} enddef ;
+ def boxfillcolor = \MPvar{fillcolor} enddef ;
+ %
+ def boxgridoptions = withcolor boxgridcolor enddef ;
+ def boxlineoptions = withcolor boxlinecolor enddef ;
+ def boxfilloptions = withcolor boxfillcolor enddef ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{mpos:region:extra}
+ % user stuff
+\stopuseMPgraphic
+
+\startuseMPgraphic{mpos:region:anchor}
+ setbounds currentpicture to multibox ;
+\stopuseMPgraphic
+
+\startMPpositiongraphic{mpos:region}{fillcolor,filloffset,linecolor,gridcolor,linewidth,gridwidth,gridshift,lineradius,lineoffset}
+ \includeMPgraphic{mpos:region:setup} ;
+ \includeMPgraphic{mpos:region:extra} ;
+ % \getmultipars("self","anchor") ;
+ \MPgetmultipars{\MPvar{self}}{\MPanchorid} ;
+ \includeMPgraphic{\MPvar{mp}} ;
+ \includeMPgraphic{mpos:region:anchor} ;
+\stopMPpositiongraphic
+
+%D For old times sake:
+
+\startMPpositiongraphic{mpos:box}{fillcolor,linecolor,linewidth}
+ string tag; tag := "\MPvar{self}" ;
+ path box ; box := positionbox(tag) ;
+
+ box := box enlarged \MPvar{filloffset} ;
+ fill box withcolor \MPvar{fillcolor} ;
+ draw box withcolor \MPvar{linecolor} withpen pencircle scaled \MPvar{linewidth} ;
+
+ positioninregion;
+\stopMPpositiongraphic
+
+\startMPpositionmethod{mpos:region}
+ \MPpositiongraphic{mpos:region}{}%
+\stopMPpositionmethod
+
+\startuseMPgraphic{mpos:region:draw}
+ draw_multi_pars
+\stopuseMPgraphic
+
+\startuseMPgraphic{mpos:region:show}
+ show_multi_pars
+\stopuseMPgraphic
+
+\startuseMPgraphic{mpos:region:kind}
+ show_multi_kind
+\stopuseMPgraphic
+
+\startuseMPgraphic{mpos:region:sideline}
+ draw_multi_side
+\stopuseMPgraphic
+
+\startuseMPgraphic{mpos:region:sideline:dashed}
+ draw_multi_side_path dashed evenly ;
+\stopuseMPgraphic
+
+%D As an example we define a grid background:
+
+\pushoverloadmode
+
+\definetextbackground
+ [\v!grid]
+ [\c!state=\v!stop,
+ \c!location=\v!paragraph,
+ \c!frame=\v!off,
+ \c!framecolor=red,
+ \c!background=,
+ \c!alternative=1]
+
+\ifdefined\basegrid
+ \aliased\letcsname\v!grid\endcsname\basegrid
+\fi
+
+\popoverloadmode
+
+%D Some examples (that might become modules anch-imp-whatever):
+
+\setupMPvariables
+ [mpos:encircle]
+ [fillcolor=lightgray,
+ filloffset=\!!zeropoint,
+ linecolor=blue,
+ lineoffset=5pt,
+ linewidth=1pt]
+
+% \startMPpositiongraphic{mpos:encircle}{linecolor,fillcolor,linewidth,lineoffset}
+% getposboxes("self","anchor") ;
+% if nofposboxes = 1 :
+% posboxes[1] := posboxes[1] enlarged \MPvar{lineoffset} cornered \MPvar{lineoffset} ;
+% fill posboxes[1] withcolor \MPvar{fillcolor} ;
+% draw posboxes[1] withpen pencircle scaled \MPvar{linewidth} withcolor \MPvar{linecolor} ;
+% fi ;
+% \stopMPpositiongraphic
+
+\startMPpositiongraphic{mpos:encircle}{linecolor,fillcolor,linewidth,lineoffset}
+ getposboxes("self","anchor") ;
+ if nofposboxes = 1 :
+ posboxes[1] := (posboxes[1] enlarged mpvar "lineoffset") cornered mpvar "lineoffset" ;
+ fill posboxes[1] withcolor mpvar "fillcolor" ;
+ draw posboxes[1] withpen pencircle scaled mpvar "linewidth" withcolor mpvar "linecolor" ;
+ fi ;
+\stopMPpositiongraphic
+
+\setupMPvariables
+ [mpos:connect]
+ [linecolor=red,
+ lineoffset=.25ex,
+ linewidth=1pt]
+
+% \startMPpositiongraphic{mpos:connect}{linecolor,lineoffset,linewidth}
+% boxlinewidth := \MPvar{linewidth} ;
+% boxlineoffset := \MPvar{lineoffset} ;
+% def boxlineoptions = withcolor \MPvar{linecolor} enddef ;
+% getposboxes("from,to","anchor") ;
+% connect_positions ;
+% \stopMPpositiongraphic
+
+\startMPpositiongraphic{mpos:connect}{linecolor,lineoffset,linewidth}
+ boxlinewidth := mpvar "linewidth" ;
+ boxlineoffset := mpvar "lineoffset" ;
+ def boxlineoptions = withcolor mpvar "linecolor" enddef ;
+ getposboxes("from,to","anchor") ;
+ connect_positions ;
+\stopMPpositiongraphic
+
+\protect \endinput
+
+\definetextbackground[underline] [location=text,alternative=1,background=,frame=off]
+\definetextbackground[overstrike] [location=text,alternative=2,background=,frame=off]
+\definetextbackground[exlines] [location=text,alternative=3,background=,frame=off]
+\definetextbackground[strikethrough][location=text,alternative=4,background=,frame=off]
+
+\definestartstop [underline]
+ [before={\starttextbackground[underline]},
+ after=\stoptextbackground]
+
+\definestartstop
+ [overstrike]
+ [before={\starttextbackground[overstrike]},
+ after=\stoptextbackground]
+
+\definestartstop
+ [exlines]
+ [before={\starttextbackground[exlines]},
+ after=\stoptextbackground]
+
+\definestartstop
+ [strikethrough]
+ [before={\starttextbackground[strikethrough]},
+ after=\stoptextbackground]
+
+\definetextbackground
+ [sideline]
+ [mp=mpos:region:sideline,
+ location=paragraph,
+ framecolor=red,
+ frameoffset=5mm]
+
+\definestartstop [sideline]
+ [before={\starttextbackground[sideline]},
+ after=\stoptextbackground]
+
+\starttext
+
+ \startunderline \input tufte \stopunderline \blank
+ \startoverstrike \input tufte \stopoverstrike \blank
+ \startexlines \input tufte \stopexlines \blank
+ \startstrikethrough \input tufte \stopstrikethrough \blank
+ \startsideline \input tufte \stopsideline \blank
+
+ \page
+
+ \startpositionoverlay{text-1}
+ \setMPpositiongraphic{connect-1-b}{mpos:connect}{from=connect-1-b,to=connect-1-e}
+ \setMPpositiongraphic{connect-1-e}{mpos:connect}{from=connect-1-b,to=connect-1-e}
+ \stoppositionoverlay
+
+ \startpositionoverlay{text-1}
+ \setMPpositiongraphic{encircle-1}{mpos:encircle}{self=encircle-1}
+ \stoppositionoverlay
+
+ test \hpos{connect-1-b}{START}
+ \dorecurse{10}{\input ward}
+ \hpos{encircle-1}{\strut HERE}
+ \dorecurse{10}{\input ward}
+ \hpos{connect-1-e}{STOP} test
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-pgr.lmt b/Master/texmf-dist/tex/context/base/mkxl/anch-pgr.lmt
new file mode 100644
index 00000000000..5b750d80e7a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-pgr.lmt
@@ -0,0 +1,1325 @@
+if not modules then modules = { } end modules ['anch-pgr'] = {
+ version = 1.001,
+ comment = "companion to anch-pgr.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is a bit messy module but backgrounds are messy anyway. Especially when we want to
+-- follow shapes. This will always be work in progress as it also depends on new features
+-- in context.
+--
+-- Alas, shapes and inline didn't work as expected end of 2016 so I had to pick up this
+-- thread again. But with regular excursions to listening to Brad Mehldau's Mehliana I
+-- could keep myself motivated. Some old stuff has been removed, some suboptimal code has
+-- been replaced. Background code is still not perfect, but some day ... the details manual
+-- will discuss this issue.
+
+local tonumber = tonumber
+local sort, concat = table.sort, table.concat
+local splitter = lpeg.splitat(":")
+local lpegmatch = lpeg.match
+
+local jobpositions = job.positions
+local formatters = string.formatters
+local setmetatableindex = table.setmetatableindex
+local settings_to_array = utilities.parsers.settings_to_array
+
+local enableaction = nodes.tasks.enableaction
+
+local commands = commands
+local context = context
+
+local implement = interfaces.implement
+
+local getmacro = tokens.getters.macro
+local scanmpstring = mp.scan.string
+local mpgnamespace = getmacro("??graphicvariable")
+
+local report_graphics = logs.reporter("backgrounds")
+local report_shapes = logs.reporter("backgrounds","shapes")
+local report_free = logs.reporter("backgrounds","free")
+
+local trace_shapes = false trackers.register("backgrounds.shapes", function(v) trace_shapes = v end)
+local trace_ranges = false trackers.register("backgrounds.shapes.ranges",function(v) trace_ranges = v end)
+local trace_free = false trackers.register("backgrounds.shapes.free", function(v) trace_free = v end)
+
+local f_b_tag = formatters["b:%s"]
+local f_e_tag = formatters["e:%s"]
+local f_p_tag = formatters["p:%s"]
+
+local f_tag_two = formatters["%s:%s"]
+
+local f_point = formatters["%p"]
+local f_pair = formatters["(%p,%p)"]
+local f_path = formatters["%--t--cycle"]
+local f_pair_i = formatters["(%r,%r)"] -- rounded
+
+graphics = graphics or { }
+local backgrounds = { }
+graphics.backgrounds = backgrounds
+
+-- -- -- these can go -- -- --
+
+backgrounds.point = f_point
+backgrounds.pair = f_pair
+backgrounds.path = f_path
+
+-- -- --
+
+local texsetattribute = tex.setattribute
+
+local a_textbackground = attributes.private("textbackground")
+
+local nuts = nodes.nuts
+
+local new_latelua = nuts.pool.latelua
+local new_rule = nuts.pool.rule
+local new_kern = nuts.pool.kern
+local new_hlist = nuts.pool.hlist
+
+local getbox = nuts.getbox
+local getid = nuts.getid
+----- getlist = nuts.getlist
+local setlink = nuts.setlink
+local getheight = nuts.getheight
+local getdepth = nuts.getdepth
+
+local nodecodes = nodes.nodecodes
+local par_code = nodecodes.par
+
+local start_of_par = nuts.start_of_par
+local insert_before = nuts.insert_before
+local insert_after = nuts.insert_after
+
+local processranges = nuts.processranges
+
+local unsetvalue = attributes.unsetvalue
+
+local jobpositions = job.positions
+local getpos = jobpositions.getpos
+local getfree = jobpositions.getfree
+
+local data = { }
+local realpage = 1
+local recycle = 1000 -- only tables can overflow this
+local enabled = false
+
+-- Freeing the data is somewhat tricky as we can have backgrounds spanning
+-- many pages but for an arbitrary background shape that is not so common.
+
+local function check(specification)
+ local a = specification.attribute
+ local index = specification.index
+ local depth = specification.depth
+ local d = specification.data
+ local where = specification.where
+ local ht = specification.ht
+ local dp = specification.dp
+ -- this is not yet r2l ready
+ local w = d.shapes[realpage]
+ local x, y = getpos()
+ if trace_ranges then
+ report_shapes("attribute %i, index %i, depth %i, location %s, position (%p,%p)",
+ a,index,depth,where,x,y)
+ end
+ local n = #w
+ if d.index ~= index then
+ n = n + 1
+ d.index = index
+ d.depth = depth
+ -- w[n] = { x, x, y, ht, dp }
+ w[n] = { y, ht, dp, x, x }
+ else
+ local wn = w[n]
+ local wh = wn[2]
+ local wd = wn[3]
+ if depth < d.depth then
+ local wy = wn[1]
+ wn[1] = y
+ d.depth = depth
+ local dy = wy - y
+ wh = wh - dy
+ wd = wd - dy
+ end
+ if where == "r" then
+ if x > wn[5] then
+ wn[5] = x
+ end
+ else
+ if x < wn[4] then
+ wn[4] = x
+ end
+ end
+ if ht > wh then
+ wn[2] = ht
+ end
+ if dp > wd then
+ wn[3] = dp
+ end
+ end
+ -- inspect(w)
+end
+
+local index = 0
+
+local function flush(head,f,l,a,parent,depth)
+ local d = data[a]
+ if d then
+ local ix = index
+ local ht = getheight(parent)
+ local dp = getdepth(parent)
+ local ln = new_latelua { action = check, attribute = a, index = ix, depth = depth, data = d, where = "l", ht = ht, dp = dp }
+ local rn = new_latelua { action = check, attribute = a, index = ix, depth = depth, data = d, where = "r", ht = ht, dp = dp }
+ if trace_ranges then
+ ln = new_hlist(setlink(new_rule(65536,65536*4,0),new_kern(-65536),ln))
+ rn = new_hlist(setlink(new_rule(65536,0,65536*4),new_kern(-65536),rn))
+ end
+ if getid(f) == par_code and start_of_par(f) then -- we need to clean this mess
+ insert_after(head,f,ln)
+ else
+ head, f = insert_before(head,f,ln)
+ end
+ insert_after(head,l,rn)
+ end
+ return head, true
+end
+
+local function registerbackground(name)
+ local n = #data + 1
+ if n > recycle then
+ -- we could also free all e: that are beyond a page but we don't always
+ -- know the page so a recycle is nicer and the s lists are kept anyway
+ -- so the amount of kept data is not that large
+ n = 1
+ end
+ local b = jobpositions.tobesaved["b:"..name]
+ if b then
+ local s = setmetatableindex("table")
+ b.s = s
+ data[n] = {
+ bpos = b,
+ name = name,
+ n = n,
+ shapes = s,
+ count = 0,
+ sindex = 0,
+ }
+ texsetattribute(a_textbackground,n)
+ if not enabled then
+ enableaction("contributers", "nodes.handlers.textbackgrounds")
+ enabled = true
+ end
+ else
+ texsetattribute(a_textbackground,unsetvalue)
+ end
+end
+
+-- local function collectbackgrounds(r,n)
+-- if enabled then
+-- local parent = getbox(n)
+-- local head = getlist(parent)
+-- realpage = r
+-- processranges(a_textbackground,flush,head) -- ,parent)
+-- end
+-- end
+--
+-- interfaces.implement {
+-- name = "collectbackgrounds",
+-- actions = collectbackgrounds,
+-- arguments = { "integer", "integer" }
+-- }
+
+nodes.handlers.textbackgrounds = function(head,where,parent) -- we have hlistdir and local dir
+ -- todo enable action in register
+ index = index + 1
+ return processranges(a_textbackground,flush,head,parent)
+end
+
+interfaces.implement {
+ name = "registerbackground",
+ actions = registerbackground,
+ arguments = "string",
+}
+
+-- optimized already but we can assume a cycle i.e. prune the last point and then
+-- even less code .. we could merge some loops but his is more robust
+
+-- use idiv here
+
+local function topairs(t,n)
+ local r = { }
+ for i=1,n do
+ local ti = t[i]
+ r[i] = f_pair_i(ti[1]/65556,ti[2]/65536)
+ end
+ return concat(r," ")
+end
+
+local eps = 65536 / 4
+local pps = eps
+local nps = - pps
+
+local function unitvector(x,y)
+ if x < pps and x > nps then
+ x = 0
+ elseif x < 0 then
+ x = -1
+ else
+ x = 1
+ end
+ if y < pps and y > nps then
+ y = 0
+ elseif y < 0 then
+ y = -1
+ else
+ y = 1
+ end
+ return x, y
+end
+
+local function finish(t)
+ local tm = #t
+ if tm < 2 then
+ return
+ end
+ if trace_ranges then
+ report_shapes("initial list: %s",topairs(t,tm))
+ end
+ -- remove similar points
+ local n = 1
+ local tn = tm
+ local tf = t[1]
+ local tx = tf[1]
+ local ty = tf[2]
+ for i=2,#t do
+ local ti = t[i]
+ local ix = ti[1]
+ local iy = ti[2]
+ local dx = ix - tx
+ local dy = iy - ty
+ if dx > eps or dx < - eps or dy > eps or dy < - eps then
+ n = n + 1
+ t[n] = ti
+ tx = ix
+ ty = iy
+ end
+ end
+ if trace_shapes then
+ report_shapes("removing similar points: %s",topairs(t,n))
+ end
+ if n > 2 then
+ -- remove redundant points
+ repeat
+ tn = n
+ n = 0
+ local tm = t[tn]
+ local tmx = tm[1]
+ local tmy = tm[2]
+ local tp = t[1]
+ local tpx = tp[1]
+ local tpy = tp[2]
+ for i=1,tn do -- while and only step when done
+ local ti = tp
+ local tix = tpx
+ local tiy = tpy
+ if i == tn then
+ tp = t[1]
+ else
+ tp = t[i+1]
+ end
+ tpx = tp[1]
+ tpy = tp[2]
+
+ local vx1, vx2 = unitvector(tix - tmx,tpx - tix)
+ if vx1 ~= vx2 then
+ n = n + 1
+ t[n] = ti
+ else
+ local vy1, vy2 = unitvector(tiy - tmy,tpy - tiy)
+ if vy1 ~= vy2 then
+ n = n + 1
+ t[n] = ti
+ end
+ end
+
+ tmx = tix
+ tmy = tiy
+ end
+ until n == tn or n <= 2
+ if trace_shapes then
+ report_shapes("removing redundant points: %s",topairs(t,n))
+ end
+ -- remove spikes
+ if n > 2 then
+ repeat
+ tn = n
+ n = 0
+ local tm = t[tn]
+ local tmx = tm[1]
+ local tmy = tm[2]
+ local tp = t[1]
+ local tpx = tp[1]
+ local tpy = tp[2]
+ for i=1,tn do -- while and only step when done
+ local ti = tp
+ local tix = tpx
+ local tiy = tpy
+ if i == tn then
+ tp = t[1]
+ else
+ tp = t[i+1]
+ end
+ tpx = tp[1]
+ tpy = tp[2]
+
+ local vx1, vx2 = unitvector(tix - tmx,tpx - tix)
+ if vx1 ~= - vx2 then
+ n = n + 1
+ t[n] = ti
+ else
+ local vy1, vy2 = unitvector(tiy - tmy,tpy - tiy)
+ if vy1 ~= - vy2 then
+ n = n + 1
+ t[n] = ti
+ end
+ end
+
+ tmx = tix
+ tmy = tiy
+ end
+ until n == tn or n <= 2
+ if trace_shapes then
+ report_shapes("removing spikes: %s",topairs(t,n))
+ end
+ end
+ end
+ -- prune trailing points
+ if tm > n then
+ for i=tm,n+1,-1 do
+ t[i] = nil
+ end
+ end
+ if n > 1 then
+ local tf = t[1]
+ local tl = t[n]
+ local dx = tf[1] - tl[1]
+ local dy = tf[2] - tl[2]
+ if dx > eps or dx < - eps or dy > eps or dy < - eps then
+ -- different points
+ else
+ -- saves a point (as we -- cycle anyway)
+ t[n] = nil
+ n = n -1
+ end
+ if trace_shapes then
+ report_shapes("removing cyclic endpoints: %s",topairs(t,n))
+ end
+ end
+ return t
+end
+
+local eps = 65536
+
+-- The next function can introduce redundant points but these are removed later on
+-- in the unspiker. It makes checking easier.
+
+local function shape(kind,b,p,realpage,xmin,xmax,ymin,ymax,fh,ld)
+ local s = b.s
+ if not s then
+ if trace_shapes then
+ report_shapes("calculating %s area, no shape",kind)
+ end
+ return
+ end
+ s = s[realpage]
+ if not s then
+ if trace_shapes then
+ report_shapes("calculating %s area, no shape for page %s",kind,realpage)
+ end
+ return
+ end
+ local ns = #s
+ if ns == 0 then
+ if trace_shapes then
+ report_shapes("calculating %s area, empty shape for page %s",kind,realpage)
+ end
+ return
+ end
+ --
+ if trace_shapes then
+ report_shapes("calculating %s area, using shape for page %s",kind,realpage)
+ end
+ -- it's a bit inefficient to use the par values and later compensate for b and
+ -- e but this keeps the code (loop) cleaner
+ local ph = p and p.h or 0
+ local pd = p and p.d or 0
+ --
+ xmax = xmax + eps
+ xmin = xmin - eps
+ ymax = ymax + eps
+ ymin = ymin - eps
+ local ls = { } -- left shape
+ local rs = { } -- right shape
+ local pl = nil -- previous left x
+ local pr = nil -- previous right x
+ local n = 0
+ local xl = nil
+ local xr = nil
+ local mh = ph -- min
+ local md = pd -- min
+ for i=1,ns do
+ local si = s[i]
+ local y = si[1]
+ local ll = si[4] -- can be sparse
+ if ll then
+ xl = ll
+ local rr = si[5] -- can be sparse
+ if rr then
+ xr = rr
+ end
+ end
+ if trace_ranges then
+ report_shapes("original : [%02i] xl=%p xr=%p y=%p",i,xl,xr,y)
+ end
+ if xl ~= xr then -- could be catched in the finalizer
+ local xm = xl + (xr - xl)/2 -- midpoint should be in region
+ if xm >= xmin and xm <= xmax and y >= ymin and y <= ymax then
+ local ht = si[2] -- can be sparse
+ if ht then
+ ph = ht
+ local dp = si[3] -- can be sparse
+ if dp then
+ pd = dp
+ end
+ end
+ local h = y + (ph < mh and mh or ph)
+ local d = y - (pd < md and md or pd)
+ if pl then
+ n = n + 1
+ ls[n] = { pl, h }
+ rs[n] = { pr, h }
+ if trace_ranges then
+ report_shapes("paragraph : [%02i] xl=%p xr=%p y=%p",i,pl,pr,h)
+ end
+ end
+ n = n + 1
+ ls[n] = { xl, h }
+ rs[n] = { xr, h }
+ if trace_ranges then
+ report_shapes("height : [%02i] xl=%p xr=%p y=%p",i,xl,xr,h)
+ end
+ n = n + 1
+ ls[n] = { xl, d }
+ rs[n] = { xr, d }
+ if trace_ranges then
+ report_shapes("depth : [%02i] xl=%p xr=%p y=%p",i,xl,xr,d)
+ end
+ end
+ pl, pr = xl, xr
+ else
+ if trace_ranges then
+ report_shapes("ignored : [%02i] xl=%p xr=%p y=%p",i,xl,xr,y)
+ end
+ end
+ end
+ --
+ if true and n > 0 then
+ -- use height of b and depth of e, maybe check for weird border
+ -- cases here
+ if fh then
+ local lsf = ls[1]
+ local rsf = rs[1]
+ if lsf[2] < fh then
+ lsf[2] = fh
+ end
+ if rsf[2] < fh then
+ rsf[2] = fh
+ end
+ end
+ if fd then
+ local lsl = ls[n]
+ local rsl = rs[n]
+ if lsl[2] > fd then
+ lsl[2] = fd
+ end
+ if rsl[2] > fd then
+ rsl[2] = fd
+ end
+ end
+ end
+ --
+ for i=n,1,-1 do
+ n = n + 1 rs[n] = ls[i]
+ end
+ return rs
+end
+
+local function singlepart(b,e,p,realpage,r,left,right)
+ local bx = b.x
+ local by = b.y
+ local ex = e.x
+ local ey = e.y
+ local rx = r.x
+ local ry = r.y
+ local bh = by + b.h
+ local bd = by - b.d
+ local eh = ey + e.h
+ local ed = ey - e.d
+ local rh = ry + r.h
+ local rd = ry - r.d
+ local rw = rx + r.w
+ if left then
+ rx = rx + left
+ rw = rw - right
+ end
+ if ex == rx then
+ -- We probably have a strut at the next line so we force a width
+ -- although of course it is better to move up. But as we have whitespace
+ -- (at least visually) injected then it's best to stress the issue.
+ ex = rw
+ end
+ local area
+ if by == ey then
+ if trace_shapes then
+ report_shapes("calculating single area, partial line")
+ end
+ area = {
+ { bx, bh },
+ { ex, eh },
+ { ex, ed },
+ { bx, bd },
+ }
+ elseif b.k == 2 then
+ area = {
+ { rx, bh },
+ { rw, bh },
+ { rw, ed },
+ { rx, ed },
+ }
+ else
+ area = shape("single",b,p,realpage,rx,rw,rd,rh,bh,ed)
+ end
+ if not area then
+ area = {
+ { bx, bh },
+ { rw, bh },
+ { rw, eh },
+ { ex, eh },
+ { ex, ed },
+ { rx, ed },
+ { rx, bd },
+ { bx, bd },
+ }
+ end
+ return {
+ location = "single",
+ region = r,
+ area = finish(area),
+ }
+end
+
+local function firstpart(b,e,p,realpage,r,left,right)
+ local bx = b.x
+ local by = b.y
+ local rx = r.x
+ local ry = r.y
+ local bh = by + b.h
+ local bd = by - b.d
+ local rh = ry + r.h
+ local rd = ry - r.d
+ local rw = rx + r.w
+ if left then
+ rx = rx + left
+ rw = rw - right
+ end
+ local area = shape("first",b,p,realpage,rx,rw,rd,rh,bh,false)
+ if not area then
+ if b.k == 2 then
+ area = {
+ { rx, bh },
+ { rw, bh },
+ { rw, rd },
+ { rx, rd },
+ }
+ else
+ area = {
+ { bx, bh },
+ { rw, bh },
+ { rw, rd }, -- { rw, eh },
+ { rx, rd }, -- { rx, ed },
+ { rx, bd },
+ { bx, bd },
+ }
+ end
+ end
+ return {
+ location = "first",
+ region = r,
+ area = finish(area),
+ }
+end
+
+local function middlepart(b,e,p,realpage,r,left,right)
+ local rx = r.x
+ local ry = r.y
+ local rh = ry + r.h
+ local rd = ry - r.d
+ local rw = rx + r.w
+ if left then
+ rx = rx + left
+ rw = rw - right
+ end
+ local area = shape("middle",b,p,realpage,rx,rw,rd,rh,false,false)
+ if not area then
+ area = {
+ { rw, rh },
+ { rw, rd },
+ { rx, rd },
+ { rx, rh },
+ }
+ end
+ return {
+ location = "middle",
+ region = r,
+ area = finish(area),
+ }
+end
+
+local function lastpart(b,e,p,realpage,r,left,right)
+ local ex = e.x
+ local ey = e.y
+ local rx = r.x
+ local ry = r.y
+ local eh = ey + e.h
+ local ed = ey - e.d
+ local rh = ry + r.h
+ local rd = ry - r.d
+ local rw = rx + r.w
+ if left then
+ rx = rx + left
+ rw = rw - right
+ end
+ local area = shape("last",b,p,realpage,rx,rw,rd,rh,false,ed)
+ if not area then
+ if b.k == 2 then
+ area = {
+ { rw, rh },
+ { rw, ed },
+ { rx, ed },
+ { rx, rh },
+ }
+ else
+ area = {
+ { rw, rh }, -- { rw, bh },
+ { rw, eh },
+ { ex, eh },
+ { ex, ed },
+ { rx, ed },
+ { rx, rh }, -- { rx, bd },
+ }
+ end
+ end
+ return {
+ location = "last",
+ region = r,
+ area = finish(area),
+ }
+end
+
+local function calculatemultipar(tag)
+ local collected = jobpositions.collected
+ local b = collected[f_b_tag(tag)]
+ local e = collected[f_e_tag(tag)]
+ if not b or not e then
+ report_shapes("invalid tag %a",tag)
+ return { }
+ end
+ local br = b.r
+ local er = e.r
+ if not br or not er then
+ report_shapes("invalid region for %a",tag)
+ return { }
+ end
+ local btag, bindex = lpegmatch(splitter,br)
+ local etag, eindex = lpegmatch(splitter,er)
+ if not bindex or not eindex or btag ~= etag then
+ report_shapes("invalid indices for %a",tag)
+ return { }
+ end
+ local bindex = tonumber(bindex)
+ local eindex = tonumber(eindex)
+ -- Here we compensate for columns (in tables): a table can have a set of column
+ -- entries and these are shared. We compensate left/right based on the columns
+ -- x and w but need to take the region into acount where the specification was
+ -- flushed and not the begin pos's region, because otherwise we get the wrong
+ -- compensation for asymetrical doublesided layouts.
+ local left = 0
+ local right = 0
+ local bc = b.c
+ local rc = bc and collected[bc]
+ if rc then
+ local tb = collected[rc.r]
+ if tb then
+ left = -(tb.x - rc.x)
+ right = (tb.w - rc.w - left)
+ end
+ end
+ -- Obeying intermediate changes of left/rightskip makes no sense as it will
+ -- look bad, so we only look at the begin situation.
+ local bn = b.n
+ local p = bn and collected[f_p_tag(bn)] -- par
+ if p then
+ left = left + (p.ls or 0)
+ right = right + (p.rs or 0)
+ end
+ --
+ local bp = b.p -- page
+ if trace_shapes then
+ report_shapes("tag %a, left %p, right %p, par %s, page %s, column %s",
+ tag,left,right,bn or "-",bp or "-",bc or "-")
+ end
+ --
+ if bindex == eindex then
+ return {
+ list = { [bp] = { singlepart(b,e,p,bp,collected[br],left,right) } },
+ bpos = b,
+ epos = e,
+ }
+ else
+ local list = {
+ [bp] = { firstpart(b,e,p,bp,collected[br],left,right) },
+ }
+ for i=bindex+1,eindex-1 do
+ br = f_tag_two(btag,i)
+ local r = collected[br]
+ if not r then
+ report_graphics("invalid middle for %a",br)
+ else
+ local rp = r.p -- page
+ local pp = list[rp]
+ local mp = middlepart(b,e,p,rp,r,left,right)
+ if pp then
+ pp[#pp+1] = mp
+ else
+ list[rp] = { mp }
+ end
+ end
+ end
+ local ep = e.p -- page
+ local pp = list[ep]
+ local lp = lastpart(b,e,p,ep,collected[er],left,right)
+ if pp then
+ pp[#pp+1] = lp
+ else
+ list[ep] = { lp }
+ end
+ return {
+ list = list,
+ bpos = b,
+ epos = e,
+ }
+ end
+end
+
+local pbg = { } -- will move to pending
+
+local multilocs = {
+ single = 1, -- maybe 0
+ first = 1,
+ middle = 2,
+ last = 3,
+}
+
+-- if unknown context_abck : input mp-abck.mpiv ; fi ;
+
+local f_template_a = formatters[ [[
+path multiregs[], multipars[], multibox ;
+string multikind[] ;
+numeric multilocs[], nofmultipars ;
+nofmultipars := %s ;
+multibox := unitsquare xyscaled (%p,%p) ;
+numeric par_strut_height, par_strut_depth, par_line_height ;
+par_strut_height := %p ;
+par_strut_depth := %p ;
+par_line_height := %p ;
+]] ]
+
+local f_template_b = formatters[ [[
+multilocs[%s] := %s ;
+multikind[%s] := "%s" ;
+multipars[%s] := (%--t--cycle) shifted - (%p,%p) ;
+]] ]
+
+-- unspiked(simplified(%--t--cycle)) shifted - (%p,%p) ;
+
+local f_template_c = formatters[ [[
+setbounds currentpicture to multibox ;
+]] ]
+
+local function freemultipar(pagedata,frees) -- ,k
+ -- if k == 3 then
+ -- -- tables have local regions
+ -- return
+ -- end
+ if not frees then
+ return
+ end
+ local nfree = #frees
+ if nfree == 0 then
+ return
+ end
+ for i=1,#pagedata do
+ local data = pagedata[i]
+ local area = data.area
+
+ if area then
+
+ local region = data.region
+ local y = 0 -- region.y
+ -- local x = region.x
+ local areas = { }
+ data.areas = areas
+
+ local f_1 = { }
+ local n_1 = 0
+ local f_2 = { }
+ local n_2 = 0
+ for i=1,#frees do
+ local f = frees[i]
+ local k = f.k
+ if k == 1 then -- pag
+ n_1 = n_1 + 1
+ f_1[n_1] = f
+ elseif k == 2 or k == 3 then -- par
+ n_2 = n_2 + 1
+ f_2[n_2] = f
+ end
+ end
+
+ local lineheight = tex.dimen.lineheight
+
+ -- page floats
+
+ local function check_one(free1,free2)
+ local temp = { }
+ local some = false
+ local top = (free2 and (y + free2.y + free2.h + (free2.to or 0))) or false
+ local bot = (free1 and (y + free1.y - free1.d - (free1.bo or 0))) or false
+ for i=1,#area do
+ local a = area[i]
+ local x = a[1]
+ local y = a[2]
+ if free2 and y <= top then
+ y = top
+ end
+ if free1 and y >= bot then
+ y = bot
+ end
+ if not some then
+ some = y
+ elseif some == true then
+ -- done
+ elseif y ~= some then
+ some = true
+ end
+ temp[i] = { x, y }
+ end
+ if some == true then
+ areas[#areas+1] = temp
+ end
+ end
+
+ if n_1 > 0 then
+ check_one(false,f_1[1])
+ for i=2,n_1 do
+ check_one(f_1[i-1],f_1[i])
+ end
+ check_one(f_1[n_1],false)
+ end
+
+ -- par floats
+
+ if #areas == 0 then
+ areas[1] = area
+ end
+
+ -- we can collect the coordinates first
+
+ local function check_two(area,frees)
+ local ul = area[1]
+ local ur = area[2]
+ local lr = area[3]
+ local ll = area[4]
+ local ulx = ul[1]
+ local uly = ul[2]
+ local urx = ur[1]
+ local ury = ur[2]
+ local lrx = lr[1]
+ local lry = lr[2]
+ local llx = ll[1]
+ local lly = ll[2]
+
+ local temp = { }
+ local n = 0
+ local done = false
+
+ for i=1,#frees do
+ local free = frees[i]
+ local fx = free.x
+ local fy = free.y
+ local ymax = y + fy + free.h + (free.to or 0)
+ local ymin = y + fy - free.d - (free.bo or 0)
+ local xmin = fx - (free.lo or 0)
+ local xmax = fx + free.w + (free.ro or 0)
+ if free.k == 3 then
+ if uly <= ymax and uly >= ymin and lly <= ymin then
+ if trace_free then
+ report_free("case 1, top, right") -- ok
+ end
+ n = n + 1 temp[n] = { xmin, ury }
+ n = n + 1 temp[n] = { xmin, ymin }
+ n = n + 1 temp[n] = { lrx, ymin }
+ n = n + 1 temp[n] = { lrx, lry }
+ done = true
+ elseif uly >= ymax and lly <= ymin then
+ if trace_free then
+ report_free("case 2, outside, right") -- ok
+ end
+ if uly - ymax < lineheight then
+ n = n + 1 temp[n] = { xmin, ury }
+ else
+ n = n + 1 temp[n] = { urx, ury }
+ n = n + 1 temp[n] = { urx, ymax }
+ end
+ n = n + 1 temp[n] = { xmin, ymax }
+ n = n + 1 temp[n] = { xmin, ymin }
+ n = n + 1 temp[n] = { lrx, ymin }
+ n = n + 1 temp[n] = { lrx, lry }
+ done = true
+ elseif lly <= ymax and lly >= ymin and uly >= ymax then
+ if trace_free then
+ report_free("case 3, bottom, right")
+ end
+ if uly - ymax < lineheight then
+ n = n + 1 temp[n] = { xmin, ury }
+ else
+ n = n + 1 temp[n] = { urx, ury }
+ n = n + 1 temp[n] = { urx, ymax }
+ end
+ n = n + 1 temp[n] = { xmin, ymax }
+ n = n + 1 temp[n] = { xmin, lry }
+ done = true
+ elseif uly <= ymax and lly >= ymin then
+ if trace_free then
+ report_free("case 4, inside, right")
+ end
+ n = n + 1 temp[n] = { xmin, uly }
+ n = n + 1 temp[n] = { xmin, lly }
+ done = true
+ else
+ -- case 0
+ if trace_free then
+ report_free("case 0, nothing")
+ end
+ end
+ end
+ end
+
+ if not done then
+ if trace_free then
+ report_free("no right shape")
+ end
+ n = n + 1 temp[n] = { urx, ury }
+ n = n + 1 temp[n] = { lrx, lry }
+ n = n + 1 temp[n] = { llx, lly }
+ else
+ done = false
+ end
+
+ for i=#frees,1,-1 do
+ local free = frees[i]
+ local fx = free.x
+ local fy = free.y
+ local ymax = y + fy + free.h + (free.to or 0)
+ local ymin = y + fy - free.d - (free.bo or 0)
+ local xmin = fx - (free.lo or 0)
+ local xmax = fx + free.w + (free.ro or 0)
+ if free.k == 2 then
+ if uly <= ymax and uly >= ymin and lly <= ymin then
+ if trace_free then
+ report_free("case 1, top, left") -- ok
+ end
+ n = n + 1 temp[n] = { ulx, ymin }
+ n = n + 1 temp[n] = { xmax, ymin }
+ n = n + 1 temp[n] = { xmax, uly }
+ done = true
+ elseif uly >= ymax and lly <= ymin then
+ if trace_free then
+ report_free("case 2, outside, left") -- ok
+ end
+ n = n + 1 temp[n] = { llx, lly }
+ n = n + 1 temp[n] = { llx, ymin }
+ n = n + 1 temp[n] = { xmax, ymin }
+ n = n + 1 temp[n] = { xmax, ymax }
+ if uly - ymax < lineheight then
+ n = n + 1 temp[n] = { xmax, uly }
+ else
+ n = n + 1 temp[n] = { llx, ymax }
+ n = n + 1 temp[n] = { llx, uly }
+ end
+ done = true
+ elseif lly <= ymax and lly >= ymin and uly >= ymax then
+ if trace_free then
+ report_free("case 3, bottom, left")
+ end
+ n = n + 1 temp[n] = { xmax, lly }
+ n = n + 1 temp[n] = { xmax, ymax }
+ if uly - ymax < lineheight then
+ n = n + 1 temp[n] = { xmax, uly }
+ else
+ n = n + 1 temp[n] = { llx, ymax }
+ n = n + 1 temp[n] = { llx, uly }
+ end
+ done = true
+ elseif uly <= ymax and lly >= ymin then
+ if trace_free then
+ report_free("case 4, inside, left")
+ end
+ n = n + 1 temp[n] = { xmax, lly }
+ n = n + 1 temp[n] = { xmax, uly }
+ done = true
+ else
+ -- case 0
+ end
+ end
+ end
+
+ if not done then
+ if trace_free then
+ report_free("no left shape")
+ end
+ n = n + 1 temp[n] = { llx, lly }
+ end
+ n = n + 1 temp[n] = { ulx, uly }
+
+ return temp
+ end
+
+ if n_2 > 0 then
+ for i=1,#areas do
+ local area = areas[i]
+ if #area == 4 then -- and also check type, must be pargaraph
+ areas[i] = check_two(area,f_2)
+ else
+ -- message that not yet supported
+ end
+ end
+ end
+
+ for i=1,#areas do
+ finish(areas[i]) -- again
+ end
+
+ end
+
+ end
+end
+
+local function fetchmultipar(n,anchor,page)
+ local a = jobpositions.collected[anchor]
+ if not a then
+ report_graphics("missing anchor %a",anchor)
+ else
+ local data = pbg[n]
+ if not data then
+ data = calculatemultipar(n)
+ pbg[n] = data -- can be replaced by register
+ -- register(data.list,n,anchor)
+ end
+ local list = data and data.list
+ if list then
+ local pagedata = list[page]
+ if pagedata then
+ local k = data.bpos.k
+ if k ~= 3 then
+ -- to be checked: no need in txt mode
+ freemultipar(pagedata,getfree(page))
+ end
+ local nofmultipars = #pagedata
+ if trace_shapes then
+ report_graphics("fetching %a at page %s using anchor %a containing %s multipars",
+ n,page,anchor,nofmultipars)
+ end
+ local x = a.x
+ local y = a.y
+ local w = a.w
+ local h = a.h
+ local d = a.d
+ local bpos = data.bpos
+ local bh = bpos.h
+ local bd = bpos.d
+ local result = { false } -- slot 1 will be set later
+ local n = 0
+ for i=1,nofmultipars do
+ local data = pagedata[i]
+ local location = data.location
+ local region = data.region
+ local areas = data.areas
+ if not areas then
+ areas = { data.area }
+ end
+ for i=1,#areas do
+ local area = areas[i]
+ for i=1,#area do
+ local a = area[i]
+ area[i] = f_pair(a[1],a[2])
+ end
+ n = n + 1
+ result[n+1] = f_template_b(n,multilocs[location],n,location,n,area,x,y)
+ end
+ end
+ data[page] = nil
+ result[1] = f_template_a(n,w,h+d,bh,bd,bh+bd) -- was delayed
+ result[n+2] = f_template_c()
+ return concat(result,"\n")
+ end
+ end
+ end
+ return f_template_a(0,0,0,0,0,0);
+end
+
+backgrounds.fetchmultipar = fetchmultipar
+
+local function getwhatever(action)
+ local tags = scanmpstring()
+ local anchor = scanmpstring()
+ local page = nil
+ if tags == "self" then
+ tags = getmacro(mpgnamespace .. getmacro("currentmpvariableclass") .. ":self",true) -- Isn't it already edef'd?
+ elseif type(tags) == "string" then
+ tags = settings_to_array(tags)
+ for i=1,#tags do
+ tags[i] = getmacro(mpgnamespace .. getmacro("currentmpvariableclass") .. ":" .. tags[i],true) -- Isn't it already edef'd?
+ end
+ end
+ if anchor == "anchor" then
+ anchor = getmacro("MPanchorid") -- brrr
+ end
+ if tags and anchor then
+ return action(tags,anchor,page)
+ end
+end
+
+metapost.registerscript("getmultipars", function()
+ return getwhatever(fetchmultipar)
+end)
+
+-- n anchor page
+
+implement {
+ name = "fetchmultipar",
+ actions = { fetchmultipar, context },
+ arguments = { "string", "string", "integer" }
+}
+
+-- todo: use inject
+
+do
+
+ local f_template_a = formatters[ [[
+ path posboxes[], posregions[] ;
+ numeric pospages[] ;
+ numeric nofposboxes ;
+ nofposboxes := %s ;
+ %t
+ ]] ]
+
+ local f_template_b = formatters[ [[
+ pospages[%s] := %s ;
+ posboxes[%s] := (%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle ;
+ posregions[%s] := (%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle ;
+ ]] ]
+
+ local function getposboxes(tags,anchor,page) -- no caching (yet) / page
+ local collected = jobpositions.collected
+ if type(tags) == "string" then
+ tags = settings_to_array(tags)
+ end
+ local list = { }
+ local nofboxes = 0
+ for i=1,#tags do
+ local tag= tags[i]
+ local c = collected[tag]
+ if c then
+ local r = c.r
+ if anchor ~= r then
+ r = anchor
+ end
+ if r then
+ r = collected[r]
+ if r then
+ local rx = r.x
+ local ry = r.y
+ local rw = r.w
+ local rh = r.h
+ local rd = r.d
+ local cx = c.x - rx
+ local cy = c.y - ry
+ local cw = cx + c.w
+ local ch = cy + c.h
+ local cd = cy - c.d
+ nofboxes = nofboxes + 1
+ list[nofboxes] = f_template_b(
+ nofboxes,c.p,
+ nofboxes,cx,ch,cw,ch,cw,cd,cx,cd,
+ nofboxes,0,rh,rw,rh,rw,rd,0,rd
+ )
+ end
+ end
+ else
+ -- print("\n missing",tag)
+ end
+ end
+ return f_template_a(nofboxes,list)
+ end
+
+ metapost.registerscript("getposboxes", function()
+ return getwhatever(getposboxes)
+ end)
+
+ implement {
+ name = "fetchposboxes",
+ arguments = { "string", "string", "integer" },
+ actions = { getposboxes, context },
+ }
+
+end
+
+do
+
+ local doifelse = commands.doifelse
+
+ implement {
+ name = "doifelserangeonpage",
+ arguments = { "string", "string", "integer" },
+ actions = function(first,last,page)
+ local c = jobpositions.collected
+ local f = c[first]
+ if f then
+ f = f.p
+ if f and f ~= true and page >= f then
+ local l = c[last]
+ if l then
+ l = l.p
+ doifelse(l and l ~= true and page <= l)
+ return
+ end
+ end
+ end
+ doifelse(false)
+ end
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-pgr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/anch-pgr.mkxl
new file mode 100644
index 00000000000..ec8f0e549f2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-pgr.mkxl
@@ -0,0 +1,444 @@
+%D \module
+%D [ file=anch-pgr, % split off core-pos
+%D version=1999.08.01,
+%D title=\CONTEXT\ Anchoring Macros,
+%D subtitle=Positioning Graphics,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Anchoring Macros / Grapics}
+
+%D Before we come to graphics support, we have to make sure of the reference point
+%D on the page. The next macros do so and are hooked into the page building routine.
+
+\registerctxluafile{anch-pgr}{autosuffix}
+
+\unprotect
+
+%D A few more low level macros take care of defining and recalling actions. Actions
+%D are saved globally! The lists can become quite long because there can be lots of
+%D parameters passed on so we clean up the list afterwards.
+
+\newtoks\everypositionaction
+\newtoks\everyinsertpositionaction
+\newtoks\everycleanpositionaction
+
+\installcorenamespace{positionaction}
+\installcorenamespace{positioncleanup}
+
+\protected\def\anch_positions_set_action#1%
+ {\gdefcsname\??positionaction#1\endcsname} % nicely gobbles spaces
+
+\permanent\protected\def\doifpositionaction#1%
+ {\ifcsname\??positionaction#1\endcsname
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\permanent\protected\def\doifelsepositionaction#1%
+ {\ifcsname\??positionaction#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifpositionactionelse\doifelsepositionaction
+
+\permanent\protected\def\dopositionaction#1%
+ {\edef\currentpositionaction{#1}%
+ \ifcsname\??positionaction\currentpositionaction\endcsname
+ \anch_positions_action_indeed
+ \fi}
+
+\def\anch_positions_action_indeed
+ {\doifelseposition\currentpositionaction
+ \anch_positions_action_indeed_yes
+ \anch_positions_action_indeed_nop}
+
+\def\anch_positions_action_indeed_nop
+ {\anch_positions_trace_action_nop}
+
+\def\anch_positions_action_indeed_yes % we need a way to figure out if we have actions
+ {\begingroup
+ \setbox\scratchbox\hbox % \hpack
+ {\anch_positions_trace_action_yes
+ \the\everyinsertpositionaction
+ \the\everypositionaction
+ \begincsname\??positionaction\currentpositionaction\endcsname
+ \anch_positions_cleanup_action}%
+ \smashedbox\scratchbox % smashing is really needed else we get problems with too big overlays
+ \endgroup}
+
+\protected\def\anch_positions_trace_action_nop_indeed
+ {\anch_positions_trace\clap\darkred{<\currentpositionaction>}}
+
+\protected\def\anch_positions_trace_action_yes_indeed
+ {\anch_positions_trace\clap\darkgreen{<\currentpositionaction>}}
+
+\let\anch_positions_trace_action_nop\relax
+\let\anch_positions_trace_action_yes\relax
+
+\appendtoks
+ \let\anch_positions_trace_action_nop\anch_positions_trace_action_nop_indeed
+ \let\anch_positions_trace_action_yes\anch_positions_trace_action_yes_indeed
+\to \t_anch_positions_tracers
+
+%D Here the complication has to do with collecting actions for later execution. This
+%D collection is especially handy when we want to move actions to a specific layer.
+%D Such series of actions are stored in a macro that is cleaned up after each
+%D invocation.
+
+\def\anch_positions_cleanup_action % not in trialtypesetting
+ {\ifcsname\??positioncleanup\currentpositionaction\endcsname
+ \the\everycleanpositionaction
+ \xdefcsname\??positioncleanup\currentpositionaction\endcsname{\csname\??positioncleanup\currentpositionaction\endcsname}%
+ \fi}
+
+\permanent\protected\def\handlepositionaction#1\with#2\on#3% ugly, will change
+ {\begingroup
+ \edef\currentpositionanchor{\ifempty\currentpositionoverlay#3\else\currentpositionoverlay::\MPanchoridentifier\fi}%
+ \normalexpanded{\anch_positions_set_action{\currentpositionanchor}{\noexpand\csname\??positioncleanup\currentpositionanchor\endcsname}}%
+ \let#1\relax
+ \ifcsname\??positioncleanup\currentpositionanchor\endcsname
+ \xdefcsname\??positioncleanup\currentpositionanchor\endcsname{\csname\??positioncleanup\currentpositionanchor\endcsname#1#2}%
+ \else
+ \xdefcsname\??positioncleanup\currentpositionanchor\endcsname{#1#2}%
+ \fi
+ \endgroup}
+
+%D The first version of this module implemented head and tail anchors. Currently we
+%D stick to just one anchor and derive the head and tail anchors from this one. We
+%D set these anchors before and after each page.
+
+\newdimen\c_anch_page_width
+\newdimen\c_anch_page_height
+
+\protected\def\anch_positions_register_page#1% this one is flushed first ! ... can't we avoid this one
+ {\ifpositioning\ifcase\realpageno\or
+ \ifdim\c_anch_page_height=\paperheight
+ \ifdim\c_anch_page_width=\paperwidth
+ % no change
+ \else
+ \c_anch_page_width \paperwidth
+ \c_anch_page_height\paperheight
+ \anch_make_page_box{#1}% \ifvbox#1\setbox#1\hpack{\box#1}\fi
+ \fi
+ \else
+ \c_anch_page_width \paperwidth
+ \c_anch_page_height\paperheight
+ \anch_make_page_box{#1}% \ifvbox#1\setbox#1\hpack{\box#1}\fi
+ \fi
+ \fi\fi}
+
+\protected\def\anch_positions_place_anchors
+ {\ifpositioning
+ \anch_positions_place_anchors_yes
+ \else
+ \anch_positions_place_anchors_nop
+ \fi}
+
+\def\anch_positions_place_anchors_yes % todo : depth pagebox
+ {\begingroup
+ \setbox\scratchbox\emptyhbox
+ \ht\scratchbox\textheight
+ \dp\scratchbox\zeropoint % redundant
+ \wd\scratchbox\makeupwidth
+ \anch_mark_text_box\scratchbox
+ \box\scratchbox
+ \endgroup}
+
+\def\anch_positions_place_anchors_nop
+ {\vkern\textheight}
+
+%D \macros
+%D {positionoverlay,startpositionoverlay}
+%D
+%D As long as we're dealing with graphics it makes much sense to use the available
+%D overlay mechanism. For this purpose, we define some dedicated overlay extensions.
+%D
+%D \startbuffer[sample]
+%D \defineoverlay [sample] [\positionoverlay{sample}]
+%D
+%D \startpositionoverlay{sample}
+%D \setMPpositiongraphic{A-1}{connectcenter}{from=A-1,to=A-2}
+%D \stoppositionoverlay
+%D \stopbuffer
+%D
+%D \typebuffer[sample]
+%D
+%D \startbuffer[graphic]
+%D \startMPpositiongraphic{connectcenter}
+%D path pa, pb ; pair ca, cb ;
+%D initialize_box(\MPpos{\MPvar{from}}) ; pa := pxy ; ca := cxy ;
+%D initialize_box(\MPpos{\MPvar{to}}) ; pb := pxy ; cb := cxy ;
+%D draw pa withcolor red ;
+%D draw pb withcolor red ;
+%D draw ca -- cb withcolor blue ;
+%D anchor_box(\MPanchor{\MPvar{from}}) ;
+%D \stopMPpositiongraphic
+%D \stopbuffer
+%D
+%D We can best demonstrate this in an example, say:
+%D
+%D \startbuffer[text]
+%D \framed
+%D [backgroundachtergrond=sample,align=middle,width=7cm]
+%D {We want to connect \hpos {A-1} {this} word with its
+%D grammatical cousin \hpos {A-2} {that}.}
+%D \stopbuffer
+%D
+%D \typebuffer[text]
+%D
+%D \startlinecorrection
+%D %\getbuffer[graphic,sample,text]
+%D \stoplinecorrection
+%D
+%D The graphic is defined in the following way, using some macros defined in an
+%D auxiliary \METAPOST\ module that is preloaded.
+%D
+%D \typebuffer[graphic]
+
+\immutable\def\MPanchoridentifier{mpa} % {mp-anchor}
+\mutable \def\MPanchornumber {\the\realpageno}
+\mutable \let\MPanchorid \empty
+
+%D The rest of the definitions concerning such overlays may look complicated,
+
+\mutable\let\currentpositionoverlay\empty
+
+%D Position actions are automatically executed when a position is set.
+
+\immutable\def\textbackgroundoverlay#1{\v!text#1}
+
+\permanent\protected\def\positionoverlay % the test prevents too many redundant positions
+ {\ifpositioning % in (not used) text* position layers
+ \expandafter\anch_positions_overlay_indeed
+ \else % also \iftrialtypesetting test here?
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\anch_positions_overlay_indeed#1%
+ {\begingroup
+ \edef\currentpositionoverlay{#1}%
+ \ifcsname\??positionaction\currentpositionoverlay::\MPanchoridentifier\endcsname
+ \anch_positions_overlay_compose
+ \fi
+ \endgroup}
+
+\permanent\def\MPoverlayanchor#1{\MPpos\MPanchorid}
+
+\def\anch_positions_overlay_compose
+ {\vpack to \d_overlay_height
+ {%\writestatus{!!!}{\currentpositionoverlay/\MPanchoridentifier/\MPanchornumber}%
+ \edef\MPanchorid{\currentpositionoverlay::\MPanchoridentifier:\MPanchornumber}% realpageno
+ % \edef\MPanchor##1{\MPpos\MPanchorid}%
+ \enforced\let\MPanchor\MPoverlayanchor % no need to fetch it already, seldom used
+ \the\everyinsertpositionaction
+ \copyposition{\currentpositionoverlay::\MPanchoridentifier}\MPanchorid
+ \setbox\scratchbox\hbox to \d_overlay_width % \hpack
+ {\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}%
+ \ht\scratchbox\d_overlay_height
+ \dp\scratchbox\zeropoint
+ \anch_mark_tagged_box\scratchbox\MPanchorid % needs an hbox
+ \box\scratchbox
+ \vfill}}
+
+\permanent\protected\def\positionregionoverlay % shares regions
+ {\ifpositioning
+ \expandafter\anch_positions_region_overlay_indeed
+ \else % also \iftrialtypesetting test here?
+ \expandafter\gobbletwoarguments
+ \fi}
+
+\let\currentpositionregion\empty
+
+\def\anch_positions_region_overlay_indeed#1#2%
+ {\begingroup
+ \edef\currentpositionregion {#1}%
+ \edef\currentpositionoverlay{#2}%
+ \ifcsname\??positionaction\currentpositionoverlay::\MPanchoridentifier\endcsname
+ \anch_positions_region_overlay_compose
+ \fi
+ \endgroup}
+
+\def\anch_positions_region_overlay_compose
+ {\vpack to \d_overlay_height
+ {\let\MPanchorid\currentpositionregion
+ \enforced\let\MPanchor\MPoverlayanchor % no need to fetch it already, seldom used
+ \the\everyinsertpositionaction
+ \copyposition{\currentpositionoverlay::\MPanchoridentifier}\MPanchorid
+ \setbox\scratchbox\hbox to \d_overlay_width % \hpack
+ {\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}%
+ \ht\scratchbox\d_overlay_height
+ \dp\scratchbox\zeropoint
+ \box\scratchbox
+ \vfill}}
+
+% \let\anch_positions_overlay_nop\gobbleoneargument
+
+\permanent\protected\def\startpositionoverlay
+ {\iftrialtypesetting
+ \expandafter\anch_positions_overlay_start_nop
+ \else
+ \expandafter\anch_positions_overlay_start_yes
+ \fi}
+
+\def\anch_positions_overlay_start_nop#1\stoppositionoverlay
+ {}
+
+\ifdefined\checkpositionoverlays \else \let\checkpositionoverlays\relax \fi
+
+\mutable\let\currentpositionoverlay\empty
+
+\def\anch_positions_overlay_start_yes#1%
+ {\checkpositionoverlays
+ \edef\currentpositionoverlay{#1}}
+
+\permanent\protected\def\stoppositionoverlay
+ {\let\currentpositionoverlay\empty}
+
+%D A position graphic is a normal (non||reused) \METAPOST\ graphic, used
+%D immediately, with zero dimensions, so that a sequence of them does not harm.
+
+\installcorenamespace{positiongraphic}
+\installcorenamespace{positionmethod}
+%installcorenamespace{graphicvariable}
+
+\newbox\b_anch_positions_graphic
+
+\permanent\tolerant\protected\def\startMPpositiongraphic#=#*#=#:#3\stopMPpositiongraphic % tag list mpcode
+ {\gdefcsname\??positiongraphic#1\endcsname{\anch_positions_meta_graphic_use{#1}{#2}{#3}}}
+
+\aliased\let\stopMPpositiongraphic\relax
+
+\def\anch_positions_meta_graphic_prepare
+ {\ifcsname\??graphicvariable\currentmpvariableclass:self\endcsname \else
+ \letcsname\??graphicvariable\currentmpvariableclass:self\endcsname\currentposition
+ \fi
+ \ifcsname\??graphicvariable\currentmpvariableclass:from\endcsname \else
+ \letcsname\??graphicvariable\currentmpvariableclass:from\endcsname\currentposition
+ \fi}
+
+\def\anch_positions_meta_graphic_use#1#2#3%
+ {\begingroup
+ \meta_prepare_variables{#2}%
+ \anch_positions_meta_graphic_prepare
+ \startMPcode#3\stopMPcode
+ \endgroup}
+
+\permanent\tolerant\protected\def\MPpositiongraphic#=#*#=%
+ {\ifcsname\??positionmethod#1\endcsname % method
+ \expandafter\anch_positions_meta_graphic_direct_method
+ \orelse\ifcsname\??positiongraphic#1\endcsname
+ \expandafter\anch_positions_meta_graphic_direct_normal
+ \else
+ \expandafter\gobbletwoarguments
+ \fi{#1}{#2}}
+
+\def\anch_positions_meta_graphic_direct_method{\anch_positions_meta_graphic_direct\??positionmethod }
+\def\anch_positions_meta_graphic_direct_normal{\anch_positions_meta_graphic_direct\??positiongraphic}
+
+\def\anch_positions_meta_graphic_direct#1#2#3% what tag setups
+ {\begingroup
+ \setupMPvariables[#2][#3]%
+ \edef\currentmpvariableclass{#2}%
+ \anch_positions_meta_graphic_prepare
+ \obeyMPboxorigin % do we also set the size ? when needed this must be done in mp ... might change
+ \enforced\tolerant\protected\def\MPpositiongraphic##=##*##={\anch_positions_meta_graphic_nested{#3}{##1}{##2}}% takes two extra arguments
+ % \def\anch_positions_meta_graphic_direct{\anch_positions_meta_graphic_nested{#3}}% takes two extra arguments
+ \setbox\b_anch_positions_graphic\hbox % \hpack
+ {\ignorespaces\begincsname#1#2\endcsname\removelastspace}%
+ \smashbox\b_anch_positions_graphic
+ \box\b_anch_positions_graphic
+ \endgroup}
+
+\def\anch_positions_meta_graphic_nested#1#2#3% nesting used in prikkels / pascal (might go away)
+ {\begingroup
+ \setupMPvariables[#2][#1,#3]%
+ \edef\currentmpvariableclass{#2}%
+ \anch_positions_meta_graphic_prepare
+ \begincsname\??positiongraphic#2\endcsname
+ \endgroup}%
+
+\permanent\def\startMPpositionmethod#1#2\stopMPpositionmethod
+ {\gdefcsname\??positionmethod#1\endcsname{#2}} % todo: var list here
+
+\aliased\let\stopMPpositionmethod\relax
+
+%D Simple one position graphics.
+
+\permanent\tolerant\protected\def\setMPpositiongraphic#=#*#=#*#=%
+ {\ifempty\currentpositionoverlay
+ \anch_positions_set_action{#1}{\MPpositiongraphic{#2}{#3}}%
+ \else % silly can be one
+ \anch_positions_meta_graphic_handle{#1}{#2}{#3}%
+ \fi}
+
+\def\anch_positions_meta_graphic_handle#1#2#3% combine with boxes
+ {\handlepositionaction\anch_positions_meta_graphic_handle_indeed\with{#1}{#2}{#3}\on{#2}}
+
+\def\anch_positions_meta_graphic_insert#1#2#3% pos tag setups
+ {\ifnum\MPp{#1}=\realpageno\relax % extra saveguard
+ \def\currentposition{#1}\MPpositiongraphic{#2}{#3}%
+ \fi}
+
+\let\anch_positions_meta_graphic_handle_indeed\relax
+
+\appendtoks
+ \let\anch_positions_meta_graphic_handle_indeed\anch_positions_meta_graphic_insert
+\to \everyinsertpositionaction
+
+\def\anch_positions_meta_graphic_cleanup#1#2#3% pos tag setups
+ {\ifnum\MPp{#1}<\realpageno \else
+ \noexpand\anch_positions_meta_graphic_handle_indeed{#1}{#2}{#3}%
+ \fi}
+
+\appendtoks
+ \let\anch_positions_meta_graphic_handle_indeed\anch_positions_meta_graphic_cleanup
+\to \everycleanpositionaction
+
+%D Graphics that span two positions (beware, does not cross pages).
+
+\permanent\tolerant\protected\def\setMPpositiongraphicrange#=#*#=#*#=#*#=%
+ {\ifempty\currentpositionoverlay
+ \anch_positions_set_action{#1}{\MPpositiongraphic{#3}{#4}}%
+ \else
+ \anch_positions_meta_graphic_handle_range{#1}{#2}{#3}{#4}%
+ \fi}
+
+\def\anch_positions_meta_graphic_handle_range#1#2#3#4%
+ {\handlepositionaction\anch_positions_meta_graphic_handle_range_indeed\with{#1}{#2}{#3}{#4}\on{#2}}
+
+\def\anch_positions_meta_graphic_insert_range#1#2#3#4% pos pos tag setups
+ {\clf_doifelserangeonpage{#1}{#2}\realpageno
+ {\def\currentposition{#1}%
+ \MPpositiongraphic{#3}{#4}}%
+ {}}
+
+\appendtoks
+ \let\anch_positions_meta_graphic_handle_range_indeed\anch_positions_meta_graphic_insert_range
+\to \everyinsertpositionaction
+
+\def\anch_positions_meta_graphic_cleanup_range#1#2#3#4% pos tag setups
+ {\ifnum\MPp{#2}<\realpageno \else
+ \noexpand \anch_positions_meta_graphic_handle_range_indeed{#1}{#2}{#3}{#4}%
+ \fi}
+
+\appendtoks
+ \let\anch_positions_meta_graphic_handle_range_indeed\anch_positions_meta_graphic_cleanup_range
+\to \everycleanpositionaction
+
+\let\anch_positions_meta_graphic_handle_range_indeed\gobblefourarguments
+
+% Helpers:
+
+\permanent\def\MPgetposboxes #1#2{\clf_fetchposboxes{#1}{#2}\realpageno}
+\permanent\def\MPgetmultipars#1#2{\clf_fetchmultipar{#1}{#2}\realpageno}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-pos.lmt b/Master/texmf-dist/tex/context/base/mkxl/anch-pos.lmt
new file mode 100644
index 00000000000..67d1657f20d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-pos.lmt
@@ -0,0 +1,1636 @@
+if not modules then modules = { } end modules ['anch-pos'] = {
+ version = 1.001,
+ comment = "companion to anch-pos.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ 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]]--
+
+-- plus (extra) is obsolete but we will keep it for a while
+--
+-- maybe replace texsp by our own converter (stay at the lua end)
+-- eventually mp will have large numbers so we can use sp there too
+--
+-- this is one of the first modules using scanners and we need to replace it by
+-- implement and friends
+--
+-- we could have namespaces, like p, page, region, columnarea, textarea but then
+-- we need virtual table accessors as well as have tag/id accessors ... we don't
+-- save much here (at least not now)
+--
+-- This was the last module that got rid of directly setting scanners, with a little
+-- performance degradation but not that noticeable.
+
+local tostring, next, setmetatable, tonumber = tostring, next, setmetatable, tonumber
+local sort = table.sort
+local format, gmatch = string.format, string.gmatch
+local lpegmatch = lpeg.match
+local insert, remove = table.insert, table.remove
+local allocate = utilities.storage.allocate
+
+local report = logs.reporter("positions")
+
+local scanners = tokens.scanners
+local scanstring = scanners.string
+local scaninteger = scanners.integer
+local scandimen = scanners.dimen
+
+local implement = interfaces.implement
+
+local commands = commands
+local context = context
+
+local ctx_latelua = context.latelua
+
+local tex = tex
+local texgetcount = tex.getcount
+local texgetinteger = tex.getintegervalue or tex.getcount
+local texsetcount = tex.setcount
+local texget = tex.get
+local texsp = tex.sp
+----- texsp = string.todimen -- because we cache this is much faster but no rounding
+
+local setmetatableindex = table.setmetatableindex
+local setmetatablenewindex = table.setmetatablenewindex
+
+local nuts = nodes.nuts
+
+local setlink = nuts.setlink
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getbox = nuts.getbox
+local getid = nuts.getid
+local getwhd = nuts.getwhd
+
+local hlist_code = nodes.nodecodes.hlist
+
+local find_tail = nuts.tail
+----- hpack = nuts.hpack
+
+local new_latelua = nuts.pool.latelua
+
+local variables = interfaces.variables
+local v_text = variables.text
+local v_column = variables.column
+
+local pt = number.dimenfactors.pt
+local pts = number.pts
+local formatters = string.formatters
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local jobpositions = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.positions = jobpositions
+
+local default = { -- not r and paragraphs etc
+ __index = {
+ x = 0, -- x position baseline
+ y = 0, -- y position baseline
+ w = 0, -- width
+ h = 0, -- height
+ d = 0, -- depth
+ p = 0, -- page
+ n = 0, -- paragraph
+ ls = 0, -- leftskip
+ rs = 0, -- rightskip
+ hi = 0, -- hangindent
+ ha = 0, -- hangafter
+ hs = 0, -- hsize
+ pi = 0, -- parindent
+ ps = false, -- parshape
+ dir = 0,
+ }
+}
+
+local f_b_tag = formatters["b:%s"]
+local f_e_tag = formatters["e:%s"]
+local f_p_tag = formatters["p:%s"]
+local f_w_tag = formatters["w:%s"]
+
+local f_region = formatters["region:%s"]
+
+local f_tag_three = formatters["%s:%s:%s"]
+local f_tag_two = formatters["%s:%s"]
+
+local nofregular = 0
+local nofspecial = 0
+local splitter = lpeg.splitat(":",true)
+
+local pagedata = { }
+local columndata = setmetatableindex("table") -- per page
+local freedata = setmetatableindex("table") -- per page
+
+local function initializer()
+ tobesaved = jobpositions.tobesaved
+ collected = jobpositions.collected
+ for tag, data in next, collected do
+ local prefix, rest = lpegmatch(splitter,tag)
+ if prefix == "p" then
+ nofregular = nofregular + 1
+ elseif prefix == "page" then
+ nofregular = nofregular + 1
+ pagedata[tonumber(rest) or 0] = data
+ elseif prefix == "free" then
+ nofspecial = nofspecial + 1
+ local t = freedata[data.p or 0]
+ t[#t+1] = data
+ elseif prefix == "columnarea" then
+ columndata[data.p or 0][data.c or 0] = data
+ end
+ setmetatable(data,default)
+ end
+ --
+ local pages = structures.pages.collected
+ if pages then
+ local last = nil
+ for p=1,#pages do
+ local region = "page:" .. p
+ local data = pagedata[p]
+ local free = freedata[p]
+ if free then
+ sort(free,function(a,b) return b.y < a.y end) -- order matters !
+ end
+ if data then
+ last = data
+ last.free = free
+ elseif last then
+ local t = setmetatableindex({ free = free, p = p },last)
+ if not collected[region] then
+ collected[region] = t
+ else
+ -- something is wrong
+ end
+ pagedata[p] = t
+ end
+ end
+ end
+ jobpositions.pagedata = pagedata
+end
+
+function jobpositions.used()
+ return next(collected) -- we can safe it
+end
+
+function jobpositions.getfree(page)
+ return freedata[page]
+end
+
+-- we can gain a little when we group positions but then we still have to
+-- deal with regions and cells so we either end up with lots of extra small
+-- tables pointing to them and/or assembling/disassembling so in the end
+-- it makes no sense to do it (now) and still have such a mix
+--
+-- proof of concept code removed ... see archive
+
+local function finalizer()
+ -- We make the (possible extensive) shape lists sparse working
+ -- from the end. We could also drop entries here that have l and
+ -- r the same which saves testing later on.
+ for k, v in next, tobesaved do
+ local s = v.s
+ if s then
+ for p, data in next, s do
+ local n = #data
+ if n > 1 then
+ local ph = data[1][2]
+ local pd = data[1][3]
+ local xl = data[1][4]
+ local xr = data[1][5]
+ for i=2,n do
+ local di = data[i]
+ local h = di[2]
+ local d = di[3]
+ local l = di[4]
+ local r = di[5]
+ if r == xr then
+ di[5] = nil
+ if l == xl then
+ di[4] = nil
+ if d == pd then
+ di[3] = nil
+ if h == ph then
+ di[2] = nil
+ else
+ ph = h
+ end
+ else
+ pd, ph = d, h
+ end
+ else
+ ph, pd, xl = h, d, l
+ end
+ else
+ ph, pd, xl, xr = h, d, l, r
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+job.register('job.positions.collected', tobesaved, initializer, finalizer)
+
+local regions = { }
+local nofregions = 0
+local region = nil
+
+local columns = { }
+local nofcolumns = 0
+local column = nil
+
+local nofpages = nil
+
+-- beware ... we're not sparse here as lua will reserve slots for the nilled
+
+local getpos, gethpos, getvpos, getrpos
+
+function jobpositions.registerhandlers(t)
+ getpos = t and t.getpos or function() return 0, 0 end
+ getrpos = t and t.getrpos or function() return 0, 0, 0 end
+ gethpos = t and t.gethpos or function() return 0 end
+ getvpos = t and t.getvpos or function() return 0 end
+end
+
+function jobpositions.getpos () return getpos () end
+function jobpositions.getrpos() return getrpos() end
+function jobpositions.gethpos() return gethpos() end
+function jobpositions.getvpos() return getvpos() end
+
+-------- jobpositions.getcolumn() return column end
+
+jobpositions.registerhandlers()
+
+local function setall(name,p,x,y,w,h,d,extra)
+ tobesaved[name] = {
+ p = p,
+ x = x ~= 0 and x or nil,
+ y = y ~= 0 and y or nil,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ e = extra ~= "" and extra or nil,
+ r = region,
+ c = column,
+ r2l = texgetinteger("inlinelefttoright") == 1 and true or nil,
+ }
+end
+
+local function enhance(data)
+ if not data then
+ return nil
+ end
+ if data.r == true then -- or ""
+ data.r = region
+ end
+ if data.x == true then
+ if data.y == true then
+ local x, y = getpos()
+ data.x = x ~= 0 and x or nil
+ data.y = y ~= 0 and y or nil
+ else
+ local x = gethpos()
+ data.x = x ~= 0 and x or nil
+ end
+ elseif data.y == true then
+ local y = getvpos()
+ data.y = y ~= 0 and y or nil
+ end
+ if data.p == true then
+ data.p = texgetcount("realpageno") -- we should use a variable set in otr
+ end
+ if data.c == true then
+ data.c = column
+ end
+ if data.w == 0 then
+ data.w = nil
+ end
+ if data.h == 0 then
+ data.h = nil
+ end
+ if data.d == 0 then
+ data.d = nil
+ end
+ return data
+end
+
+-- analyze some files (with lots if margindata) and then when one key optionally
+-- use that one instead of a table (so, a 3rd / 4th argument: key, e.g. "x")
+
+local function set(name,index,value) -- ,key
+ -- officially there should have been a settobesaved
+ local data = enhance(value or {})
+ if value then
+ container = tobesaved[name]
+ if not container then
+ tobesaved[name] = {
+ [index] = data
+ }
+ else
+ container[index] = data
+ end
+ else
+ tobesaved[name] = data
+ end
+end
+
+local function setspec(specification)
+ local name = specification.name
+ local index = specification.index
+ local value = specification.value
+ local data = enhance(value or {})
+ if value then
+ container = tobesaved[name]
+ if not container then
+ tobesaved[name] = {
+ [index] = data
+ }
+ else
+ container[index] = data
+ end
+ else
+ tobesaved[name] = data
+ end
+end
+
+local function get(id,index)
+ if index then
+ local container = collected[id]
+ return container and container[index]
+ else
+ return collected[id]
+ end
+end
+
+------------.setdim = setdim
+jobpositions.setall = setall
+jobpositions.set = set
+jobpositions.setspec = setspec
+jobpositions.get = get
+
+implement {
+ name = "dosaveposition",
+ public = true,
+ protected = true,
+ arguments = { "argument", "integerargument", "dimenargument", "dimenargument" },
+ actions = setall, -- name p x y
+}
+
+implement {
+ name = "dosavepositionwhd",
+ public = true,
+ protected = true,
+ arguments = { "argument", "integerargument", "dimenargument", "dimenargument", "dimenargument", "dimenargument", "dimenargument" },
+ actions = setall, -- name p x y w h d
+}
+
+implement {
+ name = "dosavepositionplus",
+ public = true,
+ protected = true,
+ arguments = { "argument", "integerargument", "dimenargument", "dimenargument", "dimenargument", "dimenargument", "dimenargument", "argument" },
+ actions = setall, -- name p x y w h d extra
+}
+
+-- will become private table (could also become attribute driven but too nasty
+-- as attributes can bleed e.g. in margin stuff)
+
+-- not much gain in keeping stack (inc/dec instead of insert/remove)
+
+local function b_column(specification)
+ local tag = specification.tag
+ local x = gethpos()
+ tobesaved[tag] = {
+ r = true,
+ x = x ~= 0 and x or nil,
+ -- w = 0,
+ }
+ insert(columns,tag)
+ column = tag
+end
+
+local function e_column()
+ local t = tobesaved[column]
+ if not t then
+ -- something's wrong
+ else
+ local x = gethpos() - t.x
+ t.w = x ~= 0 and x or nil
+ t.r = region
+ end
+ remove(columns)
+ column = columns[#columns]
+end
+
+jobpositions.b_column = b_column
+jobpositions.e_column = e_column
+
+implement {
+ name = "bposcolumn",
+ arguments = "string",
+ actions = function(tag)
+ insert(columns,tag)
+ column = tag
+ end
+}
+
+implement {
+ name = "bposcolumnregistered",
+ arguments = "string",
+ actions = function(tag)
+ insert(columns,tag)
+ column = tag
+ ctx_latelua { action = b_column, tag = tag }
+ end
+}
+
+implement {
+ name = "eposcolumn",
+ actions = function()
+ remove(columns)
+ column = columns[#columns]
+ end
+}
+
+implement {
+ name = "eposcolumnregistered",
+ actions = function()
+ ctx_latelua { action = e_column }
+ remove(columns)
+ column = columns[#columns]
+ end
+}
+
+-- regions
+
+local function b_region(specification)
+ local tag = specification.tag or specification
+ local last = tobesaved[tag]
+ local x, y = getpos()
+ last.x = x ~= 0 and x or nil
+ last.y = y ~= 0 and y or nil
+ last.p = texgetcount("realpageno")
+ insert(regions,tag) -- todo: fast stack
+ region = tag
+end
+
+local function e_region(specification)
+ local last = tobesaved[region]
+ local y = getvpos()
+ local x, y = getpos()
+ if specification.correct then
+ local h = (last.y or 0) - y
+ last.h = h ~= 0 and h or nil
+ end
+ last.y = y ~= 0 and y or nil
+ remove(regions) -- todo: fast stack
+ region = regions[#regions]
+end
+
+jobpositions.b_region = b_region
+jobpositions.e_region = e_region
+
+local lastregion
+
+local function setregionbox(n,tag,k,lo,ro,to,bo,column) -- kind
+ if not tag or tag == "" then
+ nofregions = nofregions + 1
+ tag = f_region(nofregions)
+ end
+ local box = getbox(n)
+ local w, h, d = getwhd(box)
+ tobesaved[tag] = {
+ -- p = texgetcount("realpageno"), -- we copy them
+ x = 0,
+ y = 0,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ k = k ~= 0 and k or nil,
+ lo = lo ~= 0 and lo or nil,
+ ro = ro ~= 0 and ro or nil,
+ to = to ~= 0 and to or nil,
+ bo = bo ~= 0 and bo or nil,
+ c = column or nil,
+ }
+ lastregion = tag
+ return tag, box
+end
+
+local function markregionbox(n,tag,correct,...) -- correct needs checking
+ local tag, box = setregionbox(n,tag,...)
+ -- todo: check if tostring is needed with formatter
+ local push = new_latelua { action = b_region, tag = tag }
+ local pop = new_latelua { action = e_region, correct = correct }
+ -- maybe we should construct a hbox first (needs experimenting) so that we can avoid some at the tex end
+ local head = getlist(box)
+ -- no, this fails with \framed[region=...] .. needs thinking
+ -- if getid(box) ~= hlist_code then
+ -- -- report("mark region box assumes a hlist, fix this for %a",tag)
+ -- head = hpack(head)
+ -- end
+ if head then
+ local tail = find_tail(head)
+ setlink(push,head)
+ setlink(tail,pop)
+ else -- we can have a simple push/pop
+ setlink(push,pop)
+ end
+ setlist(box,push)
+end
+
+jobpositions.markregionbox = markregionbox
+jobpositions.setregionbox = setregionbox
+
+function jobpositions.enhance(name)
+ enhance(tobesaved[name])
+end
+
+function jobpositions.gettobesaved(name,tag)
+ local t = tobesaved[name]
+ if t and tag then
+ return t[tag]
+ else
+ return t
+ end
+end
+
+function jobpositions.settobesaved(name,tag,data)
+ local t = tobesaved[name]
+ if t and tag and data then
+ t[tag] = data
+ end
+end
+
+local nofparagraphs = 0
+
+implement {
+ name = "parpos",
+ actions = function()
+ nofparagraphs = nofparagraphs + 1
+ texsetcount("global","c_anch_positions_paragraph",nofparagraphs)
+ local box = getbox("strutbox")
+ local w, h, d = getwhd(box)
+ local t = {
+ p = true,
+ c = true,
+ r = true,
+ x = true,
+ y = true,
+ h = h,
+ d = d,
+ hs = texget("hsize"), -- never 0
+ }
+ local leftskip = texget("leftskip",false)
+ local rightskip = texget("rightskip",false)
+ local hangindent = texget("hangindent")
+ local hangafter = texget("hangafter")
+ local parindent = texget("parindent")
+ local parshape = texget("parshape")
+ if leftskip ~= 0 then
+ t.ls = leftskip
+ end
+ if rightskip ~= 0 then
+ t.rs = rightskip
+ end
+ if hangindent ~= 0 then
+ t.hi = hangindent
+ end
+ if hangafter ~= 1 and hangafter ~= 0 then -- can not be zero .. so it needs to be 1 if zero
+ t.ha = hangafter
+ end
+ if parindent ~= 0 then
+ t.pi = parindent
+ end
+ if parshape and #parshape > 0 then
+ t.ps = parshape
+ end
+ local name = f_p_tag(nofparagraphs)
+ tobesaved[name] = t
+ ctx_latelua { action = enhance, specification = t }
+ end
+}
+
+implement {
+ name = "dosetposition",
+ arguments = "argument",
+ public = true,
+ protected = true,
+ actions = function(name)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
+
+implement {
+ name = "dosetpositionwhd",
+ arguments = { "argument", "dimenargument", "dimenargument", "dimenargument" },
+ public = true,
+ protected = true,
+ actions = function(name,w,h,d)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
+
+implement {
+ name = "dosetpositionbox",
+ arguments = { "argument", "integerargument" },
+ public = true,
+ protected = true,
+ actions = function(name,n)
+ local box = getbox(n)
+ local w, h, d = getwhd(box)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
+
+implement {
+ name = "dosetpositionplus",
+ arguments = { "argument", "dimenargument", "dimenargument", "dimenargument" },
+ public = true,
+ protected = true,
+ actions = function(name,w,h,d)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ w = w ~= 0 and w or nil,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ e = scanstring(),
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
+
+implement {
+ name = "dosetpositionstrut",
+ arguments = "argument",
+ public = true,
+ protected = true,
+ actions = function(name)
+ local box = getbox("strutbox")
+ local w, h, d = getwhd(box)
+ local spec = {
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
+
+implement {
+ name = "dosetpositionstrutkind",
+ arguments = { "argument", "integerargument" },
+ public = true,
+ protected = true,
+ actions = function(name,kind)
+ local box = getbox("strutbox")
+ local w, h, d = getwhd(box)
+ local spec = {
+ k = kind,
+ p = true,
+ c = column,
+ r = true,
+ x = true,
+ y = true,
+ h = h ~= 0 and h or nil,
+ d = d ~= 0 and d or nil,
+ n = nofparagraphs > 0 and nofparagraphs or nil,
+ r2l = texgetinteger("inlinelefttoright") == 1 or nil,
+ }
+ tobesaved[name] = spec
+ ctx_latelua { action = enhance, specification = spec }
+ end
+}
+
+function jobpositions.getreserved(tag,n)
+ if tag == v_column then
+ local fulltag = f_tag_three(tag,texgetcount("realpageno"),n or 1)
+ local data = collected[fulltag]
+ if data then
+ return data, fulltag
+ end
+ tag = v_text
+ end
+ if tag == v_text then
+ local fulltag = f_tag_two(tag,texgetcount("realpageno"))
+ return collected[fulltag] or false, fulltag
+ end
+ return collected[tag] or false, tag
+end
+
+function jobpositions.copy(target,source)
+ collected[target] = collected[source]
+end
+
+function jobpositions.replace(id,p,x,y,w,h,d)
+ collected[id] = { p = p, x = x, y = y, w = w, h = h, d = d } -- c g
+end
+
+local function getpage(id)
+ local jpi = collected[id]
+ return jpi and jpi.p
+end
+
+local function getcolumn(id)
+ local jpi = collected[id]
+ return jpi and jpi.c or false
+end
+
+local function getparagraph(id)
+ local jpi = collected[id]
+ return jpi and jpi.n
+end
+
+local function getregion(id)
+ local jpi = collected[id]
+ if jpi then
+ local r = jpi.r
+ if r then
+ return r
+ end
+ local p = jpi.p
+ if p then
+ return "page:" .. p
+ end
+ end
+ return false
+end
+
+jobpositions.page = getpage
+jobpositions.column = getcolumn
+jobpositions.paragraph = getparagraph
+jobpositions.region = getregion
+
+jobpositions.p = getpage -- not used, kind of obsolete
+jobpositions.c = getcolumn -- idem
+jobpositions.n = getparagraph -- idem
+jobpositions.r = getregion -- idem
+
+function jobpositions.x(id)
+ local jpi = collected[id]
+ return jpi and jpi.x
+end
+
+function jobpositions.y(id)
+ local jpi = collected[id]
+ return jpi and jpi.y
+end
+
+function jobpositions.width(id)
+ local jpi = collected[id]
+ return jpi and jpi.w
+end
+
+function jobpositions.height(id)
+ local jpi = collected[id]
+ return jpi and jpi.h
+end
+
+function jobpositions.depth(id)
+ local jpi = collected[id]
+ return jpi and jpi.d
+end
+
+function jobpositions.whd(id)
+ local jpi = collected[id]
+ if jpi then
+ return jpi.h, jpi.h, jpi.d
+ end
+end
+
+function jobpositions.leftskip(id)
+ local jpi = collected[id]
+ return jpi and jpi.ls
+end
+
+function jobpositions.rightskip(id)
+ local jpi = collected[id]
+ return jpi and jpi.rs
+end
+
+function jobpositions.hsize(id)
+ local jpi = collected[id]
+ return jpi and jpi.hs
+end
+
+function jobpositions.parindent(id)
+ local jpi = collected[id]
+ return jpi and jpi.pi
+end
+
+function jobpositions.hangindent(id)
+ local jpi = collected[id]
+ return jpi and jpi.hi
+end
+
+function jobpositions.hangafter(id)
+ local jpi = collected[id]
+ return jpi and jpi.ha or 1
+end
+
+function jobpositions.xy(id)
+ local jpi = collected[id]
+ if jpi then
+ return jpi.x, jpi.y
+ else
+ return 0, 0
+ end
+end
+
+function jobpositions.lowerleft(id)
+ local jpi = collected[id]
+ if jpi then
+ return jpi.x, jpi.y - jpi.d
+ else
+ return 0, 0
+ end
+end
+
+function jobpositions.lowerright(id)
+ local jpi = collected[id]
+ if jpi then
+ return jpi.x + jpi.w, jpi.y - jpi.d
+ else
+ return 0, 0
+ end
+end
+
+function jobpositions.upperright(id)
+ local jpi = collected[id]
+ if jpi then
+ return jpi.x + jpi.w, jpi.y + jpi.h
+ else
+ return 0, 0
+ end
+end
+
+function jobpositions.upperleft(id)
+ local jpi = collected[id]
+ if jpi then
+ return jpi.x, jpi.y + jpi.h
+ else
+ return 0, 0
+ end
+end
+
+function jobpositions.position(id)
+ local jpi = collected[id]
+ if jpi then
+ return jpi.p, jpi.x, jpi.y, jpi.w, jpi.h, jpi.d
+ else
+ return 0, 0, 0, 0, 0, 0
+ end
+end
+
+local splitter = lpeg.splitat(",")
+
+function jobpositions.extra(id,n,default) -- assume numbers
+ local jpi = collected[id]
+ if jpi then
+ local e = jpi.e
+ if e then
+ local split = jpi.split
+ if not split then
+ split = lpegmatch(splitter,jpi.e)
+ jpi.split = split
+ end
+ return texsp(split[n]) or default -- watch the texsp here
+ end
+ end
+ return default
+end
+
+local function overlapping(one,two,overlappingmargin) -- hm, strings so this is wrong .. texsp
+ one = collected[one]
+ two = collected[two]
+ if one and two and one.p == two.p then
+ if not overlappingmargin then
+ overlappingmargin = 2
+ end
+ local x_one = one.x
+ local x_two = two.x
+ local w_two = two.w
+ local llx_one = x_one - overlappingmargin
+ local urx_two = x_two + w_two + overlappingmargin
+ if llx_one > urx_two then
+ return false
+ end
+ local w_one = one.w
+ local urx_one = x_one + w_one + overlappingmargin
+ local llx_two = x_two - overlappingmargin
+ if urx_one < llx_two then
+ return false
+ end
+ local y_one = one.y
+ local y_two = two.y
+ local d_one = one.d
+ local h_two = two.h
+ local lly_one = y_one - d_one - overlappingmargin
+ local ury_two = y_two + h_two + overlappingmargin
+ if lly_one > ury_two then
+ return false
+ end
+ local h_one = one.h
+ local d_two = two.d
+ local ury_one = y_one + h_one + overlappingmargin
+ local lly_two = y_two - d_two - overlappingmargin
+ if ury_one < lly_two then
+ return false
+ end
+ return true
+ end
+end
+
+local function onsamepage(list,page)
+ for id in gmatch(list,"(, )") do
+ local jpi = collected[id]
+ if jpi then
+ local p = jpi.p
+ if not p then
+ return false
+ elseif not page then
+ page = p
+ elseif page ~= p then
+ return false
+ end
+ end
+ end
+ return page
+end
+
+local function columnofpos(realpage,xposition)
+ local p = columndata[realpage]
+ if p then
+ for i=1,#p do
+ local c = p[i]
+ local x = c.x or 0
+ local w = c.w or 0
+ if xposition >= x and xposition <= (x + w) then
+ return i
+ end
+ end
+ end
+ return 1
+end
+
+jobpositions.overlapping = overlapping
+jobpositions.onsamepage = onsamepage
+jobpositions.columnofpos = columnofpos
+
+-- interface
+
+implement {
+ name = "replacepospxywhd",
+ arguments = { "argument", "integerargument", "dimenargument", "dimenargument", "dimenargument", "dimenargument", "dimenargument" },
+ public = true,
+ protected = true,
+ actions = function(name,page,x,y,w,h,d)
+ collected[name] = {
+ p = page,
+ x = x,
+ y = y,
+ w = w,
+ h = h,
+ d = d,
+ }
+ end
+}
+
+implement {
+ name = "copyposition",
+ arguments = "2 arguments",
+ public = true,
+ protected = true,
+ actions = function(target,source)
+ collected[target] = collected[source]
+ end
+}
+
+implement {
+ name = "MPp",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local p = jpi.p
+ if p and p ~= true then
+ context(p)
+ return
+ end
+ end
+ context('0')
+ end
+}
+
+implement {
+ name = "MPx",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local x = jpi.x
+ if x and x ~= true and x ~= 0 then
+ context("%.5Fpt",x*pt)
+ return
+ end
+ end
+ context('0pt')
+ end
+}
+
+implement {
+ name = "MPy",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local y = jpi.y
+ if y and y ~= true and y ~= 0 then
+ context("%.5Fpt",y*pt)
+ return
+ end
+ end
+ context('0pt')
+ end
+}
+
+implement {
+ name = "MPw",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local w = jpi.w
+ if w and w ~= 0 then
+ context("%.5Fpt",w*pt)
+ return
+ end
+ end
+ context('0pt')
+ end
+}
+
+implement {
+ name = "MPh",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local h = jpi.h
+ if h and h ~= 0 then
+ context("%.5Fpt",h*pt)
+ return
+ end
+ end
+ context('0pt')
+ end
+}
+
+implement {
+ name = "MPd",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local d = jpi.d
+ if d and d ~= 0 then
+ context("%.5Fpt",d*pt)
+ return
+ end
+ end
+ context('0pt')
+ end
+}
+
+implement {
+ name = "MPxy",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ jpi.x*pt,
+ jpi.y*pt
+ )
+ else
+ context('(0,0)')
+ end
+ end
+}
+
+implement {
+ name = "MPwhd",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local w = jpi.w or 0
+ local h = jpi.h or 0
+ local d = jpi.d or 0
+ if w ~= 0 or h ~= 0 or d ~= 0 then
+ context("%.5Fpt,%.5Fpt,%.5Fpt",w*pt,h*pt,d*pt)
+ return
+ end
+ end
+ context('0pt,0pt,0pt')
+ end
+}
+
+implement {
+ name = "MPll",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ jpi.x *pt,
+ (jpi.y-jpi.d)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
+ end
+}
+
+implement {
+ name = "MPlr",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ (jpi.x + jpi.w)*pt,
+ (jpi.y - jpi.d)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
+ end
+}
+
+implement {
+ name = "MPur",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ (jpi.x + jpi.w)*pt,
+ (jpi.y + jpi.h)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
+ end
+}
+
+implement {
+ name = "MPul",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context('(%.5Fpt,%.5Fpt)',
+ jpi.x *pt,
+ (jpi.y + jpi.h)*pt
+ )
+ else
+ context('(0,0)') -- for mp only
+ end
+ end
+}
+
+local function MPpos(id)
+ local jpi = collected[id]
+ if jpi then
+ local p = jpi.p
+ if p then
+ context("%s,%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt",
+ p,
+ jpi.x*pt,
+ jpi.y*pt,
+ jpi.w*pt,
+ jpi.h*pt,
+ jpi.d*pt
+ )
+ return
+ end
+ end
+ context('0,0,0,0,0,0') -- for mp only
+end
+
+implement {
+ name = "MPpos",
+ arguments = "argument",
+ public = true,
+ actions = MPpos
+}
+
+implement {
+ name = "MPn",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local n = jpi.n
+ if n then
+ context(n)
+ return
+ end
+ end
+ context(0)
+ end
+}
+
+implement {
+ name = "MPc",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local c = jpi.c
+ if c and c ~= true then
+ context(c)
+ return
+ end
+ end
+ context('0') -- okay ?
+ end
+}
+
+implement {
+ name = "MPr",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ local r = jpi.r
+ if r and r ~= true then
+ context(r)
+ return
+ end
+ local p = jpi.p
+ if p and p ~= true then
+ context("page:" .. p)
+ end
+ end
+ end
+}
+
+local function MPpardata(id)
+ local t = collected[id]
+ if not t then
+ local tag = f_p_tag(id)
+ t = collected[tag]
+ end
+ if t then
+ context("%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt,%s,%.5Fpt",
+ t.hs*pt,
+ t.ls*pt,
+ t.rs*pt,
+ t.hi*pt,
+ t.ha,
+ t.pi*pt
+ )
+ else
+ context("0,0,0,0,0,0") -- for mp only
+ end
+end
+
+implement {
+ name = "MPpardata",
+ arguments = "argument",
+ public = true,
+ actions = MPpardata
+}
+
+implement {
+ name = "MPposset",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local b = f_b_tag(name)
+ local e = f_e_tag(name)
+ local w = f_w_tag(name)
+ local p = f_p_tag(getparagraph(b))
+ MPpos(b) context(",") MPpos(e) context(",") MPpos(w) context(",") MPpos(p) context(",") MPpardata(p)
+ end
+}
+
+implement {
+ name = "MPls",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context("%.5Fpt",jpi.ls*pt)
+ else
+ context("0pt")
+ end
+ end
+}
+
+implement {
+ name = "MPrs",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context("%.5Fpt",jpi.rs*pt)
+ else
+ context("0pt")
+ end
+ end
+}
+
+local splitter = lpeg.tsplitat(",")
+
+implement {
+ name = "MPplus",
+ arguments = { "argument", "integerargument", "argument" },
+ public = true,
+ actions = function(name,n,default)
+ local jpi = collected[name]
+ if jpi then
+ local e = jpi.e
+ if e then
+ local split = jpi.split
+ if not split then
+ split = lpegmatch(splitter,jpi.e)
+ jpi.split = split
+ end
+ context(split[n] or default)
+ return
+ end
+ end
+ context(default)
+ end
+}
+
+implement {
+ name = "MPrest",
+ arguments = { "argument", "argument" },
+ public = true,
+ actions = function(name,default)
+ local jpi = collected[name]
+ context(jpi and jpi.e or default)
+ end
+}
+
+implement {
+ name = "MPxywhd",
+ arguments = "argument",
+ public = true,
+ actions = function(name)
+ local jpi = collected[name]
+ if jpi then
+ context("%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt,%.5Fpt",
+ jpi.x*pt,
+ jpi.y*pt,
+ jpi.w*pt,
+ jpi.h*pt,
+ jpi.d*pt
+ )
+ else
+ context("0,0,0,0,0") -- for mp only
+ end
+ end
+}
+
+local doif = commands.doif
+local doifelse = commands.doifelse
+
+implement {
+ name = "doifelseposition",
+ arguments = "argument",
+ public = true,
+ protected = true,
+ actions = function(name)
+ doifelse(collected[name])
+ end
+}
+
+implement {
+ name = "doifposition",
+ arguments = "argument",
+ public = true,
+ protected = true,
+ actions = function(name)
+ doif(collected[name])
+ end
+}
+
+implement {
+ name = "doifelsepositiononpage",
+ arguments = { "string", "integerargument" },
+ public = true,
+ protected = true,
+ actions = function(name,p)
+ local c = collected[name]
+ doifelse(c and c.p == p)
+ end
+}
+
+implement {
+ name = "doifelseoverlapping",
+ arguments = { "argument", "argument" },
+ public = true,
+ protected = true,
+ actions = function(one,two)
+ doifelse(overlapping(one,two))
+ end
+}
+
+implement {
+ name = "doifelsepositionsonsamepage",
+ arguments = "argument", -- string
+ public = true,
+ protected = true,
+ actions = function(list)
+ doifelse(onsamepage(list))
+ end
+}
+
+implement {
+ name = "doifelsepositionsonthispage",
+ arguments = "argument", -- string
+ public = true,
+ protected = true,
+ actions = function(list)
+ doifelse(onsamepage(list,tostring(texgetcount("realpageno"))))
+ end
+}
+
+implement {
+ name = "doifelsepositionsused",
+ public = true,
+ protected = true,
+ actions = function()
+ doifelse(next(collected))
+ end
+}
+
+implement {
+ name = "markregionbox",
+ arguments = "integer",
+ actions = markregionbox
+}
+
+implement {
+ name = "setregionbox",
+ arguments = "integer",
+ actions = setregionbox
+}
+
+implement {
+ name = "markregionboxtagged",
+ arguments = { "integer", "string" },
+ actions = markregionbox
+}
+
+implement {
+ name = "markregionboxtaggedn",
+ arguments = { "integer", "string", "integer" },
+ actions = function(box,tag,n)
+ markregionbox(box,tag,nil,nil,nil,nil,nil,nil,n)
+ end
+}
+
+implement {
+ name = "setregionboxtagged",
+ arguments = { "integer", "string" },
+ actions = setregionbox
+}
+
+implement {
+ name = "markregionboxcorrected",
+ arguments = { "integer", "string", true },
+ actions = markregionbox
+}
+
+implement {
+ name = "markregionboxtaggedkind",
+ arguments = { "integer", "string", "integer", "dimen", "dimen", "dimen", "dimen" },
+ actions = function(box,tag,n,d1,d2,d3,d4)
+ markregionbox(box,tag,nil,n,d1,d2,d3,d4)
+ end
+}
+
+implement {
+ name = "reservedautoregiontag",
+ public = true,
+ actions = function()
+ nofregions = nofregions + 1
+ context(f_region(nofregions))
+ end
+}
+
+-- statistics (at least for the moment, when testing)
+
+-- statistics.register("positions", function()
+-- local total = nofregular + nofusedregions + nofmissingregions
+-- if total > 0 then
+-- return format("%s collected, %s regulars, %s regions, %s unresolved regions",
+-- total, nofregular, nofusedregions, nofmissingregions)
+-- else
+-- return nil
+-- end
+-- end)
+
+statistics.register("positions", function()
+ local total = nofregular + nofspecial
+ if total > 0 then
+ return format("%s collected, %s regular, %s special",total,nofregular,nofspecial)
+ else
+ return nil
+ end
+end)
+
+-- We support the low level positional commands too:
+
+local newsavepos = nodes.pool.savepos
+
+jobpositions.lastx = 0
+jobpositions.lasty = 0
+
+implement { name = "savepos", actions = function() context(newsavepos()) end }
+implement { name = "lastxpos", actions = function() context(jobpositions.lastx) end }
+implement { name = "lastypos", actions = function() context(jobpositions.lasty) end }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-pos.mkxl b/Master/texmf-dist/tex/context/base/mkxl/anch-pos.mkxl
new file mode 100644
index 00000000000..d217f2cac3f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-pos.mkxl
@@ -0,0 +1,506 @@
+%D \module
+%D [ file=anch-pos, % was core-pos
+%D version=1999.08.01,
+%D title=\CONTEXT\ Anchoring Macros,
+%D subtitle=Positioning Support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Anchoring Macros / Positioning}
+
+%D In \MKIV\ there was already a different housekeeping model for positions quite
+%D early, but starting in 2012 more dramatic changes started to happen, especially
+%D in relation to background graphics. It will probably take some time to settle.
+
+\registerctxluafile{anch-pos}{autosuffix}
+
+\unprotect
+
+%D The first application of positional information was embedded graphics. Since we
+%D are interacting with text, it made sense to take the current line height and
+%D depth into account too. This is why we have position macros for simple positions
+%D and one boxes.
+%D
+%D \starttyping
+%D \dosetposition {identifier}
+%D \dosetpositionwhd {identifier} {width} {height} {depth}
+%D \dosetpositionplus {identifier} {width} {height} {depth} {list}
+%D \stoptyping
+
+% \dosaveposition #1#2#3#4 % defined at lua end
+% \dosavepositionwhd #1#2#3#4#5#6#7 % defined at lua end
+% \dosavepositionplus #1#2#3#4#5#6#7#8 % defined at lua end
+
+% \dosetposition #1 % defined at lua end
+% \dosetpositionwhd #1#2#3#4 % defined at lua end
+% \dosetpositionplus #1#2#3#4#5 % defined at lua end
+% \dosetpositionbox #1#2 % defined at lua end
+% \dosetpositionstrut #1 % defined at lua end
+% \dosetpositionstrutkind #1#2 % defined at lua end
+
+\newbox\b_anch_position
+\newif \ifpositioning % sort of public
+
+\mutable\let\currentposition \empty
+\mutable\let\currentpositionaction\empty
+\mutable\let\currentpositionanchor\empty
+\mutable\let\currentpositionregion\empty
+
+%D Sometimes we want to trick the position handler a bit:
+
+% \replacepospxywhd #1#2#3#4#5#6#7 % defined at lua end
+
+%D \macros
+%D {MPp, MPx, MPy, MPw, MPh, MPd, MPxy, MPll, MPlr, MPur, MPul, MPpos, MPanchor}
+%D
+%D Access to the positional information is provided by macros with short names
+%S that are clearly meant for \METAPOST\ but nowadays also used for other purposes.
+
+% \MPp : defined at lua end
+% \MPr : defined at lua end
+% \MPc : defined at lua end
+% \MPn : defined at lua end
+% \MPx : defined at lua end
+% \MPy : defined at lua end
+% \MPw : defined at lua end
+% \MPh : defined at lua end
+% \MPd : defined at lua end
+% \MPxy : defined at lua end
+% \MPwhd : defined at lua end
+% \MPll : defined at lua end
+% \MPlr : defined at lua end
+% \MPur : defined at lua end
+% \MPul : defined at lua end
+% \MPpos : defined at lua end
+% \MPls : defined at lua end
+% \MPrs : defined at lua end
+% \MPpardata : defined at lua end
+% \MPxywhd : defined at lua end
+% \MPposset : defined at lua end
+
+\aliased\let\MPpage \MPp
+\aliased\let\MPregion \MPr
+\aliased\let\MPcolumn \MPc
+\aliased\let\MPparagraph\MPn
+\aliased\let\MPanchor \MPpos % overloaded locally when needed (todo: LMTX)
+
+\aliased\let\MPleftskip \MPls % compatible feature
+\aliased\let\MPrightkip \MPrs % compatible feature
+
+%D \macros
+%D {MPplus, MPrest, MPv, MPvv}
+%D
+%D Since we will probably keep on extending, we provide a general extension
+%D macro. The plus alternative takes an extra argument, denoting what additional
+%D parameter to pick up. So, the third extra is fetched with,
+%D
+%D \starttyping
+%D \MPplus{identifier}{3}{default}
+%D \stoptyping
+%D
+%D All extras (comma separated) are fetched with:
+%D
+%D \starttyping
+%D \MPrest{identifier}
+%D \stoptyping
+%D
+%D The extra parameters are not treated.
+
+% \MPplus #1#2#3 % defined at lua end
+% \MPrest #1 % defined at lua end
+
+\aliased\let\MPv \MPplus
+\aliased\let\MPvv\MPrest
+
+%D There are two low level positioning macros. Both store the position as well
+%D as execute an action associated with that position.
+
+\let\dopositionaction\gobbleoneargument % implemented later
+
+\def\anch_positions_initialize
+ {\ifpositioning \else
+ \global\positioningtrue
+ \fi}
+
+\permanent\protected\def\setpositiononly
+ {\iftrialtypesetting
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\anch_positions_set_only_indeed
+ \fi}
+
+\def\anch_positions_set_only_indeed#1%
+ {\anch_positions_initialize
+ \edef\currentposition{#1}%
+ \dosetposition\currentposition}
+
+\permanent\protected\def\setposition
+ {\iftrialtypesetting
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\anch_positions_set_indeed
+ \fi}
+
+\def\anch_positions_set_indeed#1%
+ {\anch_positions_initialize
+ \edef\currentposition{#1}%
+ \dosetposition\currentposition
+ \anch_positions_trace_left
+ \dopositionaction\currentposition}
+
+\permanent\protected\def\setpositiondata
+ {\iftrialtypesetting
+ \expandafter\gobblefourarguments
+ \else
+ \expandafter\anch_positions_set_data_indeed
+ \fi}
+
+\def\anch_positions_set_data_indeed#1#2#3#4%
+ {\anch_positions_initialize
+ \hbox % \hpack
+ {\edef\currentposition{#1}%
+ \dosetpositionwhd\currentposition{#2}{#3}{#4}% already \the\dimexpr
+ \anch_positions_trace_left
+ \dopositionaction\currentposition
+ \hss}}
+
+\permanent\protected\def\setpositionbox
+ {\iftrialtypesetting
+ \expandafter\anch_positions_set_box_nop
+ \else
+ \expandafter\anch_positions_set_box_yes
+ \fi}
+
+\def\anch_positions_set_box_nop#1%
+ {\dowithnextboxcs\flushnextbox}
+
+\def\anch_positions_set_box_yes#1%
+ {\dowithnextbox{\anch_positions_set_box_finish{#1}}}
+
+\def\anch_positions_set_box_finish#1%
+ {\anch_positions_initialize
+ \hbox to \wd\nextbox % \hpack
+ {\edef\currentposition{#1}%
+ \dosetpositionbox\currentposition\nextbox
+ \anch_positions_trace_left
+ \setbox\b_anch_position\box\nextbox
+ \dopositionaction\currentposition
+ \box\b_anch_position
+ \hss}}
+
+\permanent\protected\def\setpositionstrut
+ {\iftrialtypesetting
+ \expandafter\anch_positions_set_strut_nop
+ \else
+ \expandafter\anch_positions_set_strut_yes
+ \fi}
+
+\def\anch_positions_set_strut_nop#1%
+ {\strut}
+
+\def\anch_positions_set_strut_yes#1%
+ {\anch_positions_initialize
+ \hbox to \zeropoint % \hpack
+ {\edef\currentposition{#1}%
+ \dosetpositionstrut\currentposition
+ \anch_positions_trace_left
+ \dopositionaction\currentposition
+ \strut
+ \hss}}
+
+\permanent\protected\def\setpositionstrutkind
+ {\iftrialtypesetting
+ \expandafter\anch_positions_set_strut_kind_nop
+ \else
+ \expandafter\anch_positions_set_strut_kind_yes
+ \fi}
+
+\def\anch_positions_set_strut_kind_yes#1#2%
+ {\anch_positions_initialize
+ \hbox to \zeropoint % \hpack
+ {\edef\currentposition{#1}%
+ \dosetpositionstrutkind\currentposition{#2}%
+ \anch_positions_trace_left
+ \dopositionaction\currentposition
+ \strut
+ \hss}}
+
+\def\anch_positions_set_strut_kind_nop#1#2%
+ {\strut}
+
+\permanent\protected\def\setpositiondataplus
+ {\iftrialtypesetting
+ \expandafter\gobblefivearguments
+ \else
+ \expandafter\anch_positions_set_plus_indeed
+ \fi}
+
+\def\anch_positions_set_plus_indeed#1#2#3#4#5%
+ {\anch_positions_initialize
+ \hbox % \hpack
+ {\edef\currentposition{#1}%
+ \dosetpositionplus\currentposition{#2}{#3}{#4}{#5}% already \the\dimexpr
+ \anch_positions_trace_right
+ \dopositionaction\currentposition
+ \hss}}
+
+\permanent\protected\def\setpositionplus
+ {\iftrialtypesetting
+ \expandafter\anch_positions_set_plus_nop
+ \else
+ \expandafter\anch_positions_set_plus_yes
+ \fi}
+
+\def\anch_positions_set_plus_nop#1#2%
+ {\dowithnextboxcs\flushnextbox}
+
+\def\anch_positions_set_plus_yes#1#2%
+ {\dowithnextbox{\anch_positions_set_plus_yes_finish{#1}{#2}}}
+
+\def\anch_positions_set_plus_yes_finish#1#2%
+ {\anch_positions_initialize
+ \hbox to \nextboxwd % \hpack
+ {\edef\currentposition{#1}%
+ \dosetpositionplus\currentposition{\wd\nextbox}{\ht\nextbox}{\dp\nextbox}{#2}%
+ \anch_positions_trace_right
+ \setbox\b_anch_position\flushnextbox
+ \dopositionaction\currentposition
+ \box\b_anch_position
+ \hss}}
+
+\let\currentposition\s!unknown
+
+%D A few special ones .. will be cleaned up
+
+\permanent\def\pageanchor {page:\the\realpageno} % for the moment only one pagesize
+\permanent\def\textanchor {text:\the\realpageno}
+\permanent\def\regionanchor{region:0}
+
+\newcount\c_anch_column % will be delegated to lua
+\newcount\c_anch_text % will be delegated to lua
+
+% beware we need to pass \somethingexpanded or { }
+
+\protected\def\anch_mark_column_box#1#2% box n
+ {\global\advance\c_anch_column\plusone
+ \clf_markregionboxtaggedn#1{columnarea:\the\c_anch_column}#2\relax} % extra height
+
+\protected\def\anch_mark_region_box
+ {\iftrialtypesetting
+ \expandafter\gobbleoneargument
+ \orelse\ifpositioning
+ \expandafter\anch_mark_region_box_indeed
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\protected\def\anch_mark_region_box_indeed#1%
+ {\clf_markregionbox#1\relax}
+
+\protected\def\anch_mark_flow_box#1% will be extended / renamed
+ {\hpack\bgroup
+ \global\advance\c_anch_text\plusone
+ \clf_markregionboxtagged#1{textarea:\the\c_anch_text}%
+ \box#1%
+ \egroup}
+
+\protected\def\anch_mark_tagged_box#1#2%
+ {\clf_markregionboxtagged#1{#2}}
+
+\protected\def\anch_mark_flow_only#1% will be extended / renamed
+ {\global\advance\c_anch_text\plusone
+ \clf_markregionboxcorrected#1{textarea:\the\c_anch_text}}
+
+\protected\def\anch_make_page_box#1% maybe like text
+ {\clf_setregionboxtagged#1{page:\the\realpageno}}
+
+\protected\def\anch_mark_text_box#1%
+ {\clf_markregionboxtagged#1{text:\the\realpageno}} % needs an hbox
+
+\newcount\c_anch_free
+
+\protected\def\anch_mark_tagged_box_free#1#2#3#4#5#6% only needed when positions
+ {\ifpositioning
+ \global\advance\c_anch_free\plusone % could be done at the lua end
+ \clf_markregionboxtaggedkind
+ #1%
+ {free:\number\c_anch_free}%
+ #2\space % kind
+ #3\space % leftoffset
+ #4\space % rightoffset
+ #5\space % topoffset
+ #6\relax % bottomoffset
+ \fi}
+
+% \reservedautoregiontag % define at lua end
+
+%D We can copy a position with:
+%D
+%D \starttyping
+%D \copyposition {to} {from}
+%D \stoptyping
+%D
+%D Again, this is a global operation.
+
+% \copyposition #1#2 % defined at lua end
+
+%D The fact that handling positions is a two pass operation, is one of the
+%D reasons why we need to be able to test for existence, using:
+%D
+%D \starttyping
+%D \doifpositionelse {identifier} {found action} {not found action}
+%D \stoptyping
+
+% \doifposition #1 % defined at lua end
+% \doifelseposition #1#2 % defined at lua end
+% \doifelsepositiononpage #1#2 % defined at lua end
+
+\aliased\let\doifpositionelse \doifelseposition
+\aliased\let\doifpositiononpageelse\doifelsepositiononpage
+
+%D \macros
+%D {xypos}
+%D
+%D We have several macros available to save positions. Later we will see
+%D applications.
+%D
+%D \starttabulate[|l|l||]
+%D \NC \type {\xypos} \NC \NC simple position with no dimensions \NC \NR
+%D \NC \type {\hpos} \NC \NC position and characteristics of a \type {\hbox} \NC \NR
+%D \NC \type {\vpos} \NC \NC position and characteristics of a \type {\vbox} \NC \NR
+%D \NC \type {\bpos} \NC b: \NC begin point in a line \NC \NR
+%D \NC \type {\epos} \NC e: \NC end point in a line \NC \NR
+%D \stoptabulate
+%D
+%D Each macro takes an identifier as argument, and the \type {\hpos} and
+%D \type {\vpos} also expect box content.
+
+\aliased\let\xypos\setpositiononly
+
+\permanent\protected\def\hpos #1{\dontleavehmode\setpositionbox{#1}\hbox}
+\permanent\protected\def\vpos #1{\setpositionbox{#1}\vbox}
+\permanent\protected\def\bpos #1{\dontleavehmode\setpositionstrut{b:#1}\ignorespaces}
+\permanent\protected\def\epos #1{\removeunwantedspaces\setpositionstrut{e:#1}}
+\permanent\protected\def\bposkind#1#2{\dontleavehmode\setpositionstrutkind{b:#1}{#2}\ignorespaces} % not public, used in backgrounds
+\permanent\protected\def\eposkind#1#2{\removeunwantedspaces\setpositionstrutkind{e:#1}{#2}} % not public, used in backgrounds
+
+%D When we want to calculate more complex backgrounds, we need to know what the
+%D current indentation scheme is. At the cost of many positions and memory, we
+%D can keep track of them. This mechanism is activated automatically based on
+%D information collected in the previous pass.
+
+\newtoks \t_anch_positions_tracers
+\newcount\c_anch_positions_paragraph
+
+\permanent\protected\def\tracepositions
+ {\the\t_anch_positions_tracers}
+
+\permanent\protected\def\enableparpositions % global
+ {\enforced\aliased\glet\registerparoptions\doregisterparoptions
+ \global\positioningtrue}
+
+\permanent\let\disableparpositions\relax
+
+\aliased\let\registerparoptions\relax
+
+\permanent\protected\def\doregisterparoptions
+ {\iftrialtypesetting \orelse\ifinpagebody \orelse\ifmmode \orelse\ifinformula \else
+ \anch_positions_register_par_options
+ \fi}
+
+\def\anch_positions_register_par_options_normal
+ {\dontleavehmode\clf_parpos}
+
+\def\anch_positions_register_par_options_traced
+ {\anch_positions_register_par_options_normal
+ \smashedhbox to \zeropoint
+ {\hss
+ \startcolor[blue]%
+ \llap{\infofont\number\c_anch_positions_paragraph}%
+ \vrule
+ \s!width 4\onepoint
+ \s!height2\onepoint
+ \s!depth 2\onepoint
+ \stopcolor
+ \hss}}
+
+\let\anch_positions_register_par_options\anch_positions_register_par_options_normal
+
+\appendtoks
+ \let\anch_positions_register_par_options\anch_positions_register_par_options_traced
+\to \t_anch_positions_tracers
+
+\protected\def\anch_positions_trace#1#2#3%
+ {\smashedhbox
+ {#1{\infofont#2#3}%
+ \kern-\onepoint
+ \vrule\s!width2\onepoint\s!height\halfapoint\s!depth\halfapoint}}
+
+\protected\def\anch_positions_trace_left_indeed
+ {\anch_positions_trace\llap\darkmagenta{\currentposition>}}
+
+\protected\def\anch_positions_trace_right_indeed
+ {\anch_positions_trace\rlap\darkcyan{<\currentposition}}
+
+\let\anch_positions_trace_left \relax
+\let\anch_positions_trace_right\relax
+
+\appendtoks
+ \let\anch_positions_trace_left \anch_positions_trace_left_indeed
+ \let\anch_positions_trace_right \anch_positions_trace_right_indeed
+\to \t_anch_positions_tracers
+
+% \appendtoks \registerparoptions \to \everypar
+
+%D \macros
+%D {doifoverlappingelse}
+%D
+%D A first application of positional information, is to determine if two boxes do
+%D overlap:
+%D
+%D \starttyping
+%D \doifoverlappingelse{point a}{point b}
+%D {action when overlapping}
+%D {action when not overlapping}
+%D \stoptyping
+
+% \doifelseoverlapping #1#2#3#4 % defined at lua end
+
+\aliased\let\doifoverlappingelse\doifelseoverlapping
+
+%D \macros
+%D {doifpositionsonsamepageelse,
+%D doifpositionsonthispageelse}
+%D
+%D Instead of letting the user handle fuzzy expansion, we provide a simple test on
+%D positions being on the same page.
+%D
+%D \starttyping
+%D \doifpositionsonsamepageelse{point a}{point b}
+%D {action when on same page}
+%D {action when not on same page}
+%D \doifpositionsonthispageelse{point a}{point b}
+%D {action when on this page}
+%D {action when not on this page}
+%D \stoptyping
+
+% \doifelsepositionsonsamepage #1 % defined at lua end
+% \doifelsepositionsonthispage #1 % defined at lua end
+% \doifelsepositionsused % defined at lua end
+
+\aliased\let\doifpositionsonsamepageelse\doifelsepositionsonsamepage
+\aliased\let\doifpositionsonthispageelse\doifelsepositionsonthispage
+\aliased\let\doifpositionsusedelse \doifelsepositionsused
+
+%D Moved here:
+
+\permanent\protected\def\savepos {\clf_savepos}
+\permanent\protected\def\lastxpos{\numexpr\clf_lastxpos\relax}
+\permanent\protected\def\lastypos{\numexpr\clf_lastypos\relax}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-snc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/anch-snc.mkxl
new file mode 100644
index 00000000000..e186e024f96
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-snc.mkxl
@@ -0,0 +1,157 @@
+%D \module
+%D [ file=anch-snc,
+%D version=2003.12.01, % actually 1999 so real old
+%D title=\CONTEXT\ Anchoring Macros,
+%D subtitle=Synchronization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The original is in the mkii file. It does more at the \TEX\ end and
+%D has some more magic. If we really need that I'll add it. After all,
+%D in mkiv we can do things different.
+
+%D TODO: bleed : + left , minus right oro check if it touches page ... autobleed
+
+\writestatus{loading}{ConTeXt Anchoring Macros / Synchronization}
+
+\registerctxluafile{anch-snc}{}
+
+\unprotect
+
+\ifdefined\??syncposcounter \else \installcorenamespace{syncposcounter} \fi
+\ifdefined\s!syncpos \else \def\s!syncpos {syncpos} \fi
+
+\let\c_sync_n\relax
+
+\permanent\protected\def\definesyncpositions[#1]%
+ {\ifcsname\??syncposcounter:#1\endcsname \else
+ \expandafter\newcount\csname\??syncposcounter:#1\endcsname
+ \fi}
+
+\permanent\tolerant\protected\def\syncposition[#1]#*[#2]% we could actually use par positions
+ {\dontleavehmode
+ \ifcsname\??syncposcounter:#1\endcsname
+ \let\c_sync_n\lastnamedcs
+ \global\advance\c_sync_n\plusone
+ \enabletextarearegistration
+ \setpositionplus{\s!syncpos:#1:\the\c_sync_n}{#2}\hpack{\strut}%
+ \else
+ \strut
+ \fi
+ \ignorespaces}
+
+\protect
+
+\continueifinputfile{anch-snc.mkiv}
+
+\starttext
+
+% \setuppapersize[A4][A3]
+
+\setuplayout[location=middle]
+
+\setupbodyfont[dejavu]
+
+\definesyncpositions[1]
+\definesyncpositions[2]
+
+% \enabletrackers[metapost.lua]
+
+\startMPdefinitions
+ input "mp-asnc.mpiv" ;
+
+ SetSyncColor(1,0,"magenta") ;
+ SetSyncColor(1,1,"red") ;
+ SetSyncColor(1,2,"green") ;
+ SetSyncColor(1,3,"blue") ;
+ SetSyncColor(1,4,"yellow") ;
+
+ SetSyncColor(2,0,"magenta") ;
+ SetSyncColor(2,1,"red") ;
+ SetSyncColor(2,2,"green") ;
+ SetSyncColor(2,3,"blue") ;
+ SetSyncColor(2,4,"yellow") ;
+\stopMPdefinitions
+
+\startuseMPgraphic{sync1}
+ StartPage ;
+ StartSync(1) ;
+ SyncHOffset := 0 ;
+ SyncWidth := BackSpace - LeftMarginDistance;
+ CollectSyncDataPage ;
+ % ExtendSyncPaths ; % to top of text area
+ PruneSyncPaths ; % clip top / bottom
+ CollapseSyncPaths ;
+ MakeSyncPaths ;
+ % DrawSyncPaths ;
+ FillSyncPaths ;
+ StopSync ;
+ clip currentpicture to Page ;
+ setbounds currentpicture to Page ;
+ StopPage ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{sync2}
+ StartSync(2) ;
+ SyncHOffset := -1cm ;
+ SyncWidth := 1cm ;
+ CollectSyncDataRegion(OverlayRegion) ;
+ ExtendSyncPaths ; % to top of text area
+ MakeSyncPaths ;
+ FillSyncPaths ;
+ StopSync ;
+ clip currentpicture to OverlayBox leftenlarged 1cm;
+ setbounds currentpicture to OverlayBox ;
+\stopuseMPgraphic
+
+\defineoverlay[tempoverlay1][\useMPgraphic{sync1}]
+\defineoverlay[tempoverlay2][\useMPgraphic{sync2}]
+
+\setupbackgrounds[page][background=tempoverlay1]
+
+\framed[region=yes,background=tempoverlay2,width=14cm,align=normal]{
+ \syncposition[2][1]\samplefile{ward}\endgraf
+ \syncposition[2][2]\samplefile{ward}\endgraf
+ \syncposition[2][3]\samplefile{ward}\endgraf
+}
+
+
+\vskip1cm \hskip1cm \framed[region=yes,background=tempoverlay2,width=16cm,align=normal]{
+ \syncposition[2][1]\samplefile{ward}\endgraf
+ \syncposition[2][2]\samplefile{ward}\endgraf
+ \syncposition[2][3]\samplefile{ward}\endgraf
+}
+
+\vskip1cm \hskip1cm \framed[region=yes,background=tempoverlay2,width=10cm,align=normal]{
+ \syncposition[2][1]\samplefile{ward}\endgraf
+ \syncposition[2][2]\samplefile{ward}\endgraf
+ \syncposition[2][3]\samplefile{ward}\endgraf
+}
+
+
+\dorecurse {100} {
+% \dorecurse {1} {
+ \startchapter[title={Test #1}]
+ \syncposition[1][1,reset]\dorecurse{20}{\samplefile{ward}\endgraf}
+ \syncposition[1][2]\dorecurse {4}{\samplefile{ward}\endgraf}
+ \syncposition[1][3]\dorecurse {7}{\samplefile{ward}\endgraf}
+ \syncposition[1][4]\dorecurse {3}{\samplefile{ward}\endgraf}
+ \stopchapter
+}
+
+\dorecurse {100} {
+% \dorecurse {1} {
+ \startchapter[title={Test #1}]
+ \syncposition[1][1]\dorecurse{1}{\samplefile{ward}\endgraf}
+ \syncposition[1][2]\dorecurse{1}{\samplefile{ward}\endgraf}
+ \syncposition[1][3]\dorecurse{1}{\samplefile{ward}\endgraf}
+ \syncposition[1][4]\dorecurse{1}{\samplefile{ward}\endgraf}
+ \stopchapter
+}
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/anch-tab.mkxl b/Master/texmf-dist/tex/context/base/mkxl/anch-tab.mkxl
new file mode 100644
index 00000000000..11e9598d9c2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/anch-tab.mkxl
@@ -0,0 +1,387 @@
+%D \module
+%D [ file=anch-pgr, % moved from anch-pgr (1999.08.01)
+%D version=2011.12.19, % 1999.08.01,
+%D title=\CONTEXT\ Anchoring Macros,
+%D subtitle=Table Extensions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Anchoring Macros / Table Extensions}
+
+%D This is just a playground and functionality might change or even dissappear in
+%D favour of better solutions. Anyway, it now has been aroudn too long to bother.
+
+\unprotect
+
+\newcount\c_anch_tabs
+
+\protected\def\tabl_tabulate_hook_b
+ {\iftrialtypesetting\else
+ \ifpositioning
+ \ifconditional\tablehaspositions
+ \ifcase\c_tabl_tabulate_noflines % \ifnum\c_tabl_tabulate_noflines=\c_tabl_tabulate_totalnoflines
+ \tabl_tabulate_hook_b_first
+ \else
+ \tabl_tabulate_hook_b_next
+ \fi
+ \fi
+ \fi
+ \fi}
+
+\protected\def\tabl_tabulate_hook_e
+ {\iftrialtypesetting\else
+ \ifpositioning
+ \ifconditional\tablehaspositions
+ \ifcase\c_tabl_tabulate_noflines % \ifnum\c_tabl_tabulate_noflines=\c_tabl_tabulate_totalnoflines
+ \tabl_tabulate_hook_e_first
+ \else
+ \tabl_tabulate_hook_e_next
+ \fi
+ \fi
+ \fi
+ \fi}
+
+\protected\def\tabl_tabulate_hook_b_first{\clf_bposcolumnregistered{tabulate:\the\c_anch_tabs:\the\c_tabl_tabulate_column}}
+\protected\def\tabl_tabulate_hook_b_next {\clf_bposcolumn{tabulate:\the\c_anch_tabs:\the\c_tabl_tabulate_column}}
+\protected\def\tabl_tabulate_hook_e_first{\clf_eposcolumnregistered}
+\protected\def\tabl_tabulate_hook_e_next {\clf_eposcolumn}
+
+% \appendtoks \registerparoptions \to \everypar
+
+\appendtoks
+ \global\advance\c_anch_tabs\plusone
+\to \everytabulate
+
+% for text backgrounds
+
+\appendtoks
+ \settrue\c_anch_backgrounds_pos_no_shape
+\to \everytabulate
+
+%D Beware, the following code is somewhat weird and experimental and might be
+%D dropped or become a loadable module.
+
+%D \macros
+%D {GFC, GTC, GSC}
+%D
+%D The next macros extend tables and tabulation with backgrounds and position
+%D related features. Areas are specified with symbolic names, and symbolic
+%D references to the graphics involved. Each table has its own namespace.
+
+\newconditional\tablehaspositions
+\newcount \noftabpositions
+\newtoks \posXCtoks
+
+\protected\def\anch_tabulate_bpos{\bpos}
+\protected\def\anch_tabulate_epos{\epos}
+
+\installcorenamespace{positiontables}
+
+\permanent\def\tbPOSprefix{\??positiontables\number\noftabpositions:}
+
+\permanent\protected\def\tablepos
+ {\normalexpanded{\global\posXCtoks\emptytoks\the\posXCtoks}}
+
+\permanent\protected\def\tbXC {\anch_table_checked\anch_tables_indeed_XC }
+\permanent\protected\def\tbGSC{\anch_table_checked\anch_tables_indeed_GSC}
+\permanent\protected\def\tbGFC{\anch_table_checked\anch_tables_indeed_GFC}
+\permanent\protected\def\tbGTC{\anch_table_checked\anch_tables_indeed_GTC}
+
+\tolerant\def\anch_table_checked#1[#2]%
+ {\iftrialtypesetting
+ \global\settrue\tablehaspositions
+ \expandafter\anch_tables_indeed_NC
+ \orelse\ifparameter#2\or
+ \expandafter#1%
+ \else
+ \expandafter\anch_tables_indeed_NC
+ \fi[#2]}
+
+\def\anch_tables_indeed_NC[#1]%
+ {\NC}
+
+\def\anch_tables_indeed_XC[#1]%
+ {{\enforced\let\NC\relax\processcommalist[#1]\anch_tables_step_XC}}
+
+\def\anch_tables_step_XC#1%
+ {\anch_tables_step_indeed_XC[#1]}
+
+\def\anch_tables_step_indeed_XC[#1#2]%
+ {\if#1>\anch_tables_indeed_GFC[#2:#2]\orelse
+ \if#1+\anch_tables_indeed_GFC[#2:#2]\orelse
+ \if#1<\anch_tables_indeed_GTC[#2:#2]\orelse
+ \if#1-\anch_tables_indeed_GTC[#2:#2]\orelse
+ \if#1=\anch_tables_indeed_GSC[#2:#2]\orelse
+ \anch_tables_indeed_GSC[#1#2:#1#2]\fi}
+
+\def\anch_tables_indeed_GSC[#1]%
+ {\processcommalist[#1]\anch_tables_step_GSC}
+
+\def\anch_tables_step_GSC#1%
+ {\anch_tables_append_GSC[#1:#1]}
+
+\def\anch_tables_append_GSC[#1:#2:#3]%
+% {\doglobal\appendtoks\anch_tables_process_GSC[#1:#2]\to\posXCtoks\NC}
+ {\gtoksapp\posXCtoks{\anch_tables_process_GSC[#1:#2]}\NC}
+
+\def\anch_tables_process_GSC[#1:#2]%
+ {\remappositionframed{#2}{\tbPOSprefix#1}%
+ \anch_tabulate_bpos{\tbPOSprefix#1}%
+ \doglobal\appendtoks\expandafter\anch_tabulate_epos\expandafter{\tbPOSprefix#1}\to\posXCtoks}
+% \xtoksapp\posXCtoks{\anch_tabulate_epos{\tbPOSprefix#1}}}
+
+\def\anch_tables_indeed_GFC[#1]%
+ {\doglobal\appendtoks\anch_tables_delayed_GFC[#1]\to\posXCtoks\NC}
+% {\gtoksapp\posXCtoks{\anch_tables_delayed_GFC[#1]}\NC}
+
+\def\anch_tables_delayed_GFC[#1]%
+ {\processcommalist[#1]\anch_tables_step_GFC}
+
+\def\anch_tables_step_GFC#1%
+ {\anch_tables_process_GFC[#1:#1]}
+
+\def\anch_tables_process_GFC[#1:#2:#3]%
+ {\remappositionframed{#2}{\tbPOSprefix#1}%
+ \anch_tabulate_bpos{\tbPOSprefix#1}}
+
+\def\anch_tables_indeed_GTC[#1]%
+ {\doglobal\appendtoks\anch_tables_delayed_GTC[#1]\to\posXCtoks\NC}
+% {\gtoksapp\posXCtoks{\anch_tables_delayed_GTC[#1]}\NC}
+
+\def\anch_tables_delayed_GTC[#1]%
+ {\doglobal\appendtoks\anch_tables_process_GTC[#1]\to\posXCtoks}
+% {\gtoksapp\posXCtoks{\anch_tables_process_GTC[#1]}\NC}
+
+\def\anch_tables_process_GTC[#1]%
+ {\processcommalist[#1]\anch_tables_step_GTC}
+
+\def\anch_tables_step_GTC#1%
+ {\anch_tables_step_indeed_GTC[#1:#1]}
+
+\def\anch_tables_step_indeed_GTC[#1:#2]%
+ {\anch_tabulate_epos{\tbPOSprefix#1}}
+
+%D The amount of code to support tables and tabulation is rather minimalistic.
+
+\aliased\let\tabulatepos\tablepos
+
+\permanent\protected\def\tabulatenormalpos
+ {\iftrialtypesetting
+ % nothing
+ \orelse\ifconditional\tablehaspositions
+ \hss\tabulatepos\hss
+ \else
+ % nothing
+ \fi}
+
+\permanent\protected\def\tabulateequalpos
+ {\iftrialtypesetting
+ \tabulateEQ
+ \orelse\ifconditional\tablehaspositions
+ \tabulateEQpos
+ \else
+ \tabulateEQ
+ \fi}
+
+\permanent\protected\def\tabulateEQpos
+ {\setbox\scratchbox\hbox{\tabulateEQ}%
+ \hbox to \wd\scratchbox{\hss\kern\zeropoint\tabulatepos\hss}% hpack
+ \kern-\wd\scratchbox
+ \box\scratchbox}
+
+\appendtoks
+ \global\advance\noftabpositions\plusone
+ \global\setfalse\tablehaspositions
+\to \everytabulate
+
+% We need to handle paragraphs as well.
+
+\let\anch_tabulate_flush_epos\relax
+
+\protected\def\anch_tabulate_bpos_indeed
+ {\bpos}
+
+\protected\def\anch_tabulate_epos_indeed#1%
+ {\ifvoid\b_tabl_tabulate_current\c_tabl_tabulate_column
+ \epos{#1}%
+ \glet\anch_tabulate_flush_epos\relax
+ \else
+ \gdef\anch_tabulate_flush_epos{\epos{#1}}%
+ \fi}
+
+\permanent\def\flushtabulatesplitbox
+ {\box\b_tabl_tabulate
+ \iftrialtypesetting\orelse\ifconditional\tablehaspositions\anch_tabulate_flush_epos\fi}
+
+\appendtoks
+ \let\anch_tabulate_bpos\anch_tabulate_bpos_indeed % ?
+ \let\anch_tabulate_epos\anch_tabulate_epos_indeed % ?
+ \glet\anch_tabulate_flush_epos\relax
+\to \everytabulate
+
+%D In order to prevent potential clashes with abbreviations, postpone the mapping and
+%D make them mutable.
+
+\mutable\let\GSC\empty
+\mutable\let\GFC\empty
+\mutable\let\GTC\empty
+
+\appendtoks
+ \enforced\let\GSC\tbGSC
+ \enforced\let\GFC\tbGFC
+ \enforced\let\GTC\tbGTC
+ \enforced\let\XC \tbXC
+\to \everytabulate
+
+%D \macros
+%D {definepositionframed}
+%D
+%D The next example show how to provide backgrounds to table cells. First we define
+%D some framed backgrounds.
+%D
+%D \startbuffer
+%D \definepositionframed[x][background=color,backgroundcolor=red]
+%D \definepositionframed[y][background=color,backgroundcolor=green]
+%D \definepositionframed[z][background=color,backgroundcolor=blue]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D % \getbuffer
+%D
+%D \startbuffer
+%D \starttabulate[|c|c|c|]
+%D \GFC[f:x] this is a small \NC table \NC in which we \NC \FR
+%D \NC will demonstrate \GFC[g:z] that this \GTC[g] positioning \NC \MR
+%D \GSC[e:y] mechanism also \GTC[f] works quite well \NC in tables \NC \LR
+%D \stoptabulate
+%D \stopbuffer
+%D
+%D The table itself defines three areas (a, b and~c) using these frames.
+%D
+%D \typebuffer
+%D % \getbuffer
+%D
+%D Tables (based on \TABLE) are supported by:
+
+\permanent\def\normalTABLEsimplebar {\unskip\!ttRightGlue&\tablepos&} % |
+\permanent\def\normalTABLEcomplexbar{\unskip\!ttRightGlue&\omit\tablepos\!ttAlternateVrule} % \|
+\permanent\def\normalTABLEquote {\unskip\!ttRightGlue&\omit\tablepos&} % "
+
+\appendtoks
+ \global\advance\noftabpositions\plusone
+ \global\setfalse\tablehaspositions
+\to \everytable
+
+%D Since we don't want nameclashes:
+
+\appendtoks
+ \enforced\let\GSC\tbGSC
+ \enforced\let\GFC\tbGFC
+ \enforced\let\GTC\tbGTC
+ \enforced\let\XC \tbXC
+\to \everytable
+
+%D In the previous example, we could have provided an overlay to the framed definition.
+%D A more direct approach is demonstrated below:
+%D
+%D \startbuffer
+%D \def\cw#1{\color[white]{#1}}
+%D
+%D \startMPpositiongraphic{tableshade}
+%D initialize_area(\MPpos{\MPvar{from}},\MPpos{\MPvar{to}}) ;
+%D color c ; c := \MPvar{color} ;
+%D linear_shade(pxy,0,.4c,.9c) ;
+%D anchor_area(\MPanchor{\MPvar{from}}) ;
+%D \stopMPpositiongraphic
+%D
+%D \setMPpositiongraphic{b:x}{tableshade}{from=b:x,to=e:x,color=red}
+%D \setMPpositiongraphic{b:y}{tableshade}{from=b:y,to=e:y,color=green}
+%D \setMPpositiongraphic{b:z}{tableshade}{from=b:z,to=e:z,color=blue}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D The definition of the table looks about the same as the previous one:
+%D
+%D \startbuffer
+%D \starttable[|c|c|c|]
+%D \GFC[b:z] \cw{this is a small} \NC \cw{table} \NC in which we \NC \FR
+%D \NC \cw{will demonstrate} \GFC[c:y] \cw{that this} \GTC[c] \cw{positioning} \NC \MR
+%D \GSC[a:x] \cw{mechanism also} \GTC[b] \cw{works quite well} \NC in tables \NC \LR
+%D \stoptable
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+
+% \definepositionframed[w][background=color,backgroundcolor=yellow]
+% \definepositionframed[x][background=color,backgroundcolor=red]
+% \definepositionframed[y][background=color,backgroundcolor=green]
+% \definepositionframed[z][background=color,backgroundcolor=blue]
+%
+% \starttabulate[|c|c|c|]
+% \NC this is a small \NC table \NC in which we \NC \FR
+% \NC will demonstrate \NC that this \NC positioning \NC \MR
+% \NC mechanism also \NC works quite well \NC in tables \NC \LR
+% \stoptabulate
+%
+% \starttabulate[|c|c|c|]
+% \GFC[f:x] this is a small \GTC table \NC in which we \NC \FR
+% \NC will demonstrate \GFC[g:z] that this \GTC[g] positioning \NC \MR
+% \GSC[e:y] mechanism also \GTC[f] works quite well \NC in tables \NC \LR
+% \stoptabulate
+%
+% \starttabulate[|c|c|c|]
+% \GFC[f:x,d:w] this is a small \GTC[d] table \NC in which we \NC \FR
+% \NC will demonstrate \GFC[g:z] that this \GTC[g] positioning \NC \MR
+% \GSC[e:y] mechanism also \GTC[f] works quite well \NC in tables \NC \LR
+% \stoptabulate
+%
+% \starttabulate[|c|c|c|]
+% \XC[+f:x] this is a small \XC table \NC in which we \NC \FR
+% \NC will demonstrate \XC[+g:z] that this \XC[-g] positioning \NC \MR
+% \XC[=e:y] mechanism also \XC[-f] works quite well \NC in tables \NC \LR
+% \stoptabulate
+%
+% \starttabulate[|c|c|c|]
+% \XC[+f:x,+d:w] this is a small \XC[-d] table \NC in which we \NC \FR
+% \NC will demonstrate \XC[+g:z] that this \XC[-g] positioning \NC \MR
+% \XC[=e:y] mechanism also \XC[-f] works quite well \NC in tables \NC \LR
+% \stoptabulate
+
+% evt [b:x]
+%
+% \definepositionframed[x][background=color,fillcolor=red]
+% \definepositionframed[y][background=color,fillcolor=green]
+% \definepositionframed[z][background=color,fillcolor=blue]
+
+\permanent\protected\def\remappositionframed#1#2% from to
+ {\copyposition{b:#1}{b:#2}%
+ \copyposition{e:#1}{e:#2}%
+ \anch_positions_set_action{b:#2}{\dopositionaction{b:#1}}}
+
+\permanent\tolerant\protected\def\definepositionframed[#1]#*[#2]%
+ {\anch_positions_set_action{b:#1}{\anch_framed_handle[#1][#2]}}
+
+\protected\def\anch_framed_handle
+ {\bgroup
+ \positionframed}
+
+\permanent\tolerant\protected\def\positionframed[#1]#*[#2]%
+ {\setbox\scratchbox\hpack
+ {\scratchwidth \dimexpr\MPx{e:#1}-\MPx{b:#1}\relax
+ \scratchdepth \dimexpr\MPy{b:#1}-\MPy{e:#1}+\MPd{e:#1}\relax
+ \scratchheight\dimexpr\scratchdepth+\MPh{b:#1}\relax
+ \lower\scratchdepth\hpack
+ {\framed[\c!width=\scratchwidth,\c!height=\scratchheight,\c!offset=\v!overlay,#2]{}}}%
+ \smashedbox\scratchbox
+ \egroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-alt.lmt b/Master/texmf-dist/tex/context/base/mkxl/attr-alt.lmt
new file mode 100644
index 00000000000..9d85920741d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-alt.lmt
@@ -0,0 +1,111 @@
+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 interfaces = interfaces
+local implement = interfaces.implement
+
+attributes.alternates = attributes.alternates or { }
+local alternates = attributes.alternates
+
+local a_alternate = attributes.private('alternate')
+
+alternates.data = allocate()
+alternates.values = alternates.values or { }
+alternates.registered = alternates.registered or { }
+alternates.attribute = a_alternate
+
+local data = alternates.data
+local registered = alternates.registered
+local values = alternates.values
+
+storage.register("attributes/alternates/registered", registered, "attributes.alternates.registered")
+storage.register("attributes/alternates/values", values, "attributes.alternates.values")
+
+local function extender(alternates,key)
+ if key == "none" then
+ local d = nodeinjections.stopalternate()
+ alternates.none = d
+ return d
+ end
+end
+
+local function reviver(data,n)
+ local d = values[n] and nodeinjections.startalternate(values[n]) or nodeinjections.stopalternate()
+ data[n] = d
+ return d
+end
+
+setmetatableindex(alternates, extender)
+setmetatableindex(alternates.data, reviver)
+
+alternates.handler = nodes.installattributehandler {
+ name = "alternate",
+ namespace = alternates,
+ initializer = states.initialize,
+ finalizer = states.finalize,
+ processor = states.simple,
+}
+
+local function register(specification)
+ local text = specification.text or "unknown"
+ local n = registered[text]
+ if not n then
+ n = #values + 1
+ values[n] = text
+ registered[text] = n
+ end
+ return n
+end
+
+local enabled = false
+
+local function enable()
+ if not enabled then
+ enableaction("shipouts","attributes.alternates.handler")
+ enabled = true
+ end
+end
+
+alternates.register = register
+alternates.enable = enable
+
+-- interface
+
+implement {
+ name = "setalternate",
+ actions = function(specification)
+ if not enabled then
+ enable()
+ end
+ texsetattribute(a_alternate,register(specification))
+ end,
+ arguments = {
+ {
+ { "text", "string" },
+ }
+ }
+}
+
+implement {
+ name = "resetalternate",
+ actions = function()
+ if enabled then
+ texsetattribute(a_alternate)
+ end
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-alt.mkxl b/Master/texmf-dist/tex/context/base/mkxl/attr-alt.mkxl
new file mode 100644
index 00000000000..3881d929e1c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-alt.mkxl
@@ -0,0 +1,55 @@
+%D \module
+%D [ file=attr-alt,
+%D version=2007.06.06,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Alternates,
+%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 Attribute Macros / Alternates}
+
+\registerctxluafile{attr-alt}{autosuffix}
+
+%D The main reason for providing this is that we need to make sure we have no
+%D dangling end markers when we cross a page. Public viewers don't seem to support
+%D actual text at all and acrobat has some funny selection issues.
+%D
+%D \starttyping
+%D test
+%D \startalternate[text={A}]
+%D \dorecurse{10}{A }
+%D \startalternate[text={B}]
+%D \dorecurse{10}{B }
+%D \stopalternate
+%D \dorecurse{10}{A }
+%D \stopalternate
+%D test \par
+%D \stoptyping
+%D
+%D \starttyping
+%D test \startalternate[text={e=mc^2}]!$e=mc^2$\stopalternate\par
+%D test \alternate{e=mc^2}{copy:}\nbsp$e=mc^2$\par
+%D \stoptyping
+
+\unprotect
+
+\permanent\protected\def\startalternate[#1]% maybe better/also: [text={...}]
+ {\begingroup
+ \getdummyparameters[\c!text=,#1]%
+ \clf_setalternate text {\dummyparameter\c!text}\relax}
+
+\permanent\protected\def\stopalternate
+ {\endgroup}
+
+\permanent\protected\def\alternate#1%
+ {\groupedcommand{\clf_setalternate text {#1}\relax}{}}
+
+\permanent\protected\def\setalternate #1{\clf_setalternate text {#1}\relax}
+\permanent\protected\def\resetalternate {\clf_resetalternate}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-col.lmt b/Master/texmf-dist/tex/context/base/mkxl/attr-col.lmt
new file mode 100644
index 00000000000..9c542a94293
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-col.lmt
@@ -0,0 +1,666 @@
+if not modules then modules = { } end modules ['attr-col'] = {
+ version = 1.001,
+ comment = "companion to attr-col.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
+
+-- list could as well refer to the tables (instead of numbers that
+-- index into another table) .. depends on what we need
+
+local type, tonumber = type, tonumber
+local concat = table.concat
+local min, max, floor, mod = math.min, math.max, math.floor, math.mod
+
+local attributes = attributes
+local nodes = nodes
+local utilities = utilities
+local logs = logs
+local backends = backends
+local storage = storage
+local context = context
+local tex = tex
+
+local variables = interfaces.variables
+local v_yes = variables.yes
+local v_no = variables.no
+
+local p_split_comma = lpeg.tsplitat(",")
+local p_split_colon = lpeg.splitat(":")
+local lpegmatch = lpeg.match
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+
+local report_attributes = logs.reporter("attributes","colors")
+local report_colors = logs.reporter("colors","support")
+local report_transparencies = logs.reporter("transparencies","support")
+
+-- todo: document this but first reimplement this as it reflects the early
+-- days of luatex / mkiv and we have better ways now
+
+-- nb: attributes: color etc is much slower than normal (marks + literals) but ...
+-- nb. too many "0 g"s
+
+local states = attributes.states
+local nodeinjections = backends.nodeinjections
+local registrations = backends.registrations
+local unsetvalue = attributes.unsetvalue
+
+local enableaction = nodes.tasks.enableaction
+local setaction = nodes.tasks.setaction
+
+local registerstorage = storage.register
+local formatters = string.formatters
+
+local interfaces = interfaces
+local implement = interfaces.implement
+
+local texgetattribute = tex.getattribute
+
+-- We can distinguish between rules and glyphs but it's not worth the trouble. A
+-- first implementation did that and while it saves a bit for glyphs and rules, it
+-- costs more resourses for transparencies. So why bother.
+
+--
+-- colors
+--
+
+-- we can also collapse the two attributes: n, n+1, n+2 and then
+-- at the tex end add 0, 1, 2, but this is not faster and less
+-- flexible (since sometimes we freeze color attribute values at
+-- the lua end of the game)
+--
+-- we also need to store the colorvalues because we need then in mp
+--
+-- This is a compromis between speed and simplicity. We used to store the
+-- values and data in one array, which made in neccessary to store the
+-- converters that need node constructor into strings and evaluate them
+-- at runtime (after reading from storage). Think of:
+--
+-- colors.strings = colors.strings or { }
+--
+-- if environment.initex then
+-- colors.strings[color] = "return colors." .. colorspace .. "(" .. concat({...},",") .. ")"
+-- end
+--
+-- registerstorage("attributes/colors/data", colors.strings, "attributes.colors.data") -- evaluated
+--
+-- We assume that only processcolors are defined in the format.
+
+attributes.colors = attributes.colors or { }
+local colors = attributes.colors
+
+local a_color = attributes.private('color')
+local a_selector = attributes.private('colormodel')
+
+colors.data = allocate()
+colors.values = colors.values or { }
+colors.registered = colors.registered or { }
+colors.weightgray = true
+colors.attribute = a_color
+colors.selector = a_selector
+colors.default = 1
+colors.main = nil
+colors.triggering = true
+colors.supported = true
+colors.model = "all"
+
+local data = colors.data
+local values = colors.values
+local registered = colors.registered
+
+local cmykrgbmode = 0 -- only for testing, already defined colors are not affected
+
+local numbers = attributes.numbers
+local list = attributes.list
+
+registerstorage("attributes/colors/values", values, "attributes.colors.values")
+registerstorage("attributes/colors/registered", registered, "attributes.colors.registered")
+
+directives.register("colors.cmykrgbmode", function(v) cmykrgbmode = tonumber(v) or 0 end)
+
+local f_colors = {
+ rgb = formatters["r:%s:%s:%s"],
+ cmyk = formatters["c:%s:%s:%s:%s"],
+ gray = formatters["s:%s"],
+ spot = formatters["p:%s:%s:%s:%s"],
+}
+
+local models = {
+ [interfaces.variables.none] = unsetvalue,
+ black = unsetvalue,
+ bw = unsetvalue,
+ all = 1,
+ gray = 2,
+ rgb = 3,
+ cmyk = 4,
+}
+
+local function rgbtocmyk(r,g,b) -- we could reduce
+ if not r then
+ return 0, 0, 0
+ else
+ return 1-r, 1-g, 1-b, 0
+ end
+end
+
+local function cmyktorgb(c,m,y,k)
+ if not c then
+ return 0, 0, 0, 1
+ elseif cmykrgbmode == 1 then
+ local d = 1.0 - k
+ return 1.0 - min(1.0,c*d+k), 1.0 - min(1.0,m*d+k), 1.0 - min(1.0,y*d+k)
+ else
+ return 1.0 - min(1.0,c +k), 1.0 - min(1.0,m +k), 1.0 - min(1.0,y +k)
+ end
+end
+
+local function rgbtogray(r,g,b)
+ if not r then
+ return 0
+ end
+ local w = colors.weightgray
+ if w == true then
+ return .30*r + .59*g + .11*b
+ elseif not w then
+ return r/3 + g/3 + b/3
+ else
+ return w[1]*r + w[2]*g + w[3]*b
+ end
+end
+
+local function cmyktogray(c,m,y,k)
+ return rgbtogray(cmyktorgb(c,m,y,k))
+end
+
+-- http://en.wikipedia.org/wiki/HSI_color_space
+-- http://nl.wikipedia.org/wiki/HSV_(kleurruimte)
+
+-- h /= 60; // sector 0 to 5
+-- i = floor( h );
+-- f = h - i; // factorial part of h
+
+local function hsvtorgb(h,s,v)
+ if s > 1 then
+ s = 1
+ elseif s < 0 then
+ s = 0
+ elseif s == 0 then
+ return v, v, v
+ end
+ if v > 1 then
+ s = 1
+ elseif v < 0 then
+ v = 0
+ end
+ if h < 0 then
+ h = 0
+ elseif h >= 360 then
+ h = mod(h,360)
+ end
+ local hd = h / 60
+ local hi = floor(hd)
+ local f = hd - hi
+ local p = v * (1 - s)
+ local q = v * (1 - f * s)
+ local t = v * (1 - (1 - f) * s)
+ if hi == 0 then
+ return v, t, p
+ elseif hi == 1 then
+ return q, v, p
+ elseif hi == 2 then
+ return p, v, t
+ elseif hi == 3 then
+ return p, q, v
+ elseif hi == 4 then
+ return t, p, v
+ elseif hi == 5 then
+ return v, p, q
+ else
+ print("error in hsv -> rgb",h,s,v)
+ return 0, 0, 0
+ end
+end
+
+local function rgbtohsv(r,g,b)
+ local offset, maximum, other_1, other_2
+ if r >= g and r >= b then
+ offset, maximum, other_1, other_2 = 0, r, g, b
+ elseif g >= r and g >= b then
+ offset, maximum, other_1, other_2 = 2, g, b, r
+ else
+ offset, maximum, other_1, other_2 = 4, b, r, g
+ end
+ if maximum == 0 then
+ return 0, 0, 0
+ end
+ local minimum = other_1 < other_2 and other_1 or other_2
+ if maximum == minimum then
+ return 0, 0, maximum
+ end
+ local delta = maximum - minimum
+ return (offset + (other_1-other_2)/delta)*60, delta/maximum, maximum
+end
+
+local function graytorgb(s) -- unweighted
+ return 1-s, 1-s, 1-s
+end
+
+local function hsvtogray(h,s,v)
+ return rgb_to_gray(hsv_to_rgb(h,s,v))
+end
+
+local function graytohsv(s)
+ return 0, 0, s
+end
+
+local function hwbtorgb(hue,black,white)
+ local r, g, b = hsvtorgb(hue,1,.5)
+ local f = 1 - white - black
+ return f * r + white, f * g + white , f * b + white
+end
+
+colors.rgbtocmyk = rgbtocmyk
+colors.rgbtogray = rgbtogray
+colors.cmyktorgb = cmyktorgb
+colors.cmyktogray = cmyktogray
+colors.rgbtohsv = rgbtohsv
+colors.hsvtorgb = hsvtorgb
+colors.hwbtorgb = hwbtorgb
+colors.hsvtogray = hsvtogray
+colors.graytohsv = graytohsv
+
+-- we can share some *data by using s, rgb and cmyk hashes, but
+-- normally the amount of colors is not that large; storing the
+-- components costs a bit of extra runtime, but we expect to gain
+-- some back because we have them at hand; the number indicates the
+-- default color space
+
+function colors.gray(s)
+ return { 2, s, s, s, s, 0, 0, 0, 1-s }
+end
+
+function colors.rgb(r,g,b)
+ local s = rgbtogray(r,g,b)
+ local c, m, y, k = rgbtocmyk(r,g,b)
+ return { 3, s, r, g, b, c, m, y, k }
+end
+
+function colors.cmyk(c,m,y,k)
+ local s = cmyktogray(c,m,y,k)
+ local r, g, b = cmyktorgb(c,m,y,k)
+ return { 4, s, r, g, b, c, m, y, k }
+end
+
+--~ function colors.spot(parent,f,d,p)
+--~ return { 5, .5, .5, .5, .5, 0, 0, 0, .5, parent, f, d, p }
+--~ end
+
+function colors.spot(parent,f,d,p)
+ -- inspect(parent) inspect(f) inspect(d) inspect(p)
+ if type(p) == "number" then
+ local n = list[numbers.color][parent] -- hard coded ref to color number
+ if n then
+ local v = values[n]
+ if v then
+ -- the via cmyk hack is dirty, but it scales better
+ local c, m, y, k = p*v[6], p*v[7], p*v[8], p*v[9]
+ local r, g, b = cmyktorgb(c,m,y,k)
+ local s = cmyktogray(c,m,y,k)
+ return { 5, s, r, g, b, c, m, y, k, parent, f, d, p }
+ end
+ end
+ else
+ -- todo, multitone (maybe p should be a table)
+ local ps = lpegmatch(p_split_comma,p)
+ local ds = lpegmatch(p_split_comma,d)
+ local c, m, y, k = 0, 0, 0, 0
+ local done = false
+ for i=1,#ps do
+ local p = tonumber(ps[i])
+ local d = ds[i]
+ if p and d then
+ local n = list[numbers.color][d] -- hard coded ref to color number
+ if n then
+ local v = values[n]
+ if v then
+ c = c + p*v[6]
+ m = m + p*v[7]
+ y = y + p*v[8]
+ k = k + p*v[9]
+ done = true
+ end
+ end
+ end
+ end
+ if done then
+ local r, g, b = cmyktorgb(c,m,y,k)
+ local s = cmyktogray(c,m,y,k)
+ local f = tonumber(f)
+ return { 5, s, r, g, b, c, m, y, k, parent, f, d, p }
+ end
+ end
+ return { 5, .5, .5, .5, .5, 0, 0, 0, .5, parent, f, d, p }
+end
+
+local function graycolor(...) graycolor = nodeinjections.graycolor return graycolor(...) end
+local function rgbcolor (...) rgbcolor = nodeinjections.rgbcolor return rgbcolor (...) end
+local function cmykcolor(...) cmykcolor = nodeinjections.cmykcolor return cmykcolor(...) end
+local function spotcolor(...) spotcolor = nodeinjections.spotcolor return spotcolor(...) end
+
+local function extender(colors,key)
+ if colors.supported and key == "none" then
+ local d = graycolor(0)
+ colors.none = d
+ return d
+ end
+end
+
+local function reviver(data,n)
+ if colors.supported then
+ local v = values[n]
+ local d
+ if not v then
+ local gray = graycolor(0)
+ d = { gray, gray, gray, gray }
+ report_attributes("unable to revive color %a",n)
+ else
+ local model = colors.forcedmodel(v[1])
+ if model == 2 then
+ local gray = graycolor(v[2])
+ d = { gray, gray, gray, gray }
+ elseif model == 3 then
+ local gray = graycolor(v[2])
+ local rgb = rgbcolor(v[3],v[4],v[5])
+ local cmyk = cmykcolor(v[6],v[7],v[8],v[9])
+ d = { rgb, gray, rgb, cmyk }
+ elseif model == 4 then
+ local gray = graycolor(v[2])
+ local rgb = rgbcolor(v[3],v[4],v[5])
+ local cmyk = cmykcolor(v[6],v[7],v[8],v[9])
+ d = { cmyk, gray, rgb, cmyk }
+ elseif model == 5 then
+ local spot = spotcolor(v[10],v[11],v[12],v[13])
+ -- d = { spot, gray, rgb, cmyk }
+ d = { spot, spot, spot, spot }
+ end
+ end
+ data[n] = d
+ return d
+ end
+end
+
+setmetatableindex(colors, extender)
+setmetatableindex(colors.data, reviver)
+
+function colors.filter(n)
+ return concat(data[n],":",5)
+end
+
+-- unweighted (flat) gray could be another model but a bit work as we need to check:
+--
+-- attr-col colo-ini colo-run
+-- grph-inc grph-wnd
+-- lpdf-col lpdf-fmt lpdf-fld lpdf-grp
+-- meta-pdf meta-pdh mlib-pps
+--
+-- but as we never needed it we happily delay that.
+
+function colors.setmodel(name,weightgray)
+ if weightgray == true or weightgray == v_yes then
+ weightgray = true
+ elseif weightgray == false or weightgray == v_no then
+ weightgray = false
+ else
+ local r, g, b = lpegmatch(p_split_colon,weightgray)
+ if r and g and b then
+ weightgray = { r, g, b }
+ else
+ weightgray = true
+ end
+ end
+ local default = models[name] or 1
+
+ colors.model = name -- global, not useful that way
+ colors.default = default -- global
+ colors.weightgray = weightgray -- global
+
+ -- avoid selective checking is no need for it
+
+ local forced = colors.forced
+
+ if forced == nil then
+ -- unset
+ colors.forced = default
+ elseif forced == false then
+ -- assumed mixed
+ elseif forced ~= default then
+ -- probably mixed
+ colors.forced = false
+ else
+ -- stil the same
+ end
+ return default
+end
+
+function colors.register(name, colorspace, ...) -- passing 9 vars is faster (but not called that often)
+ local stamp = f_colors[colorspace](...)
+ local color = registered[stamp]
+ if not color then
+ color = #values + 1
+ values[color] = colors[colorspace](...)
+ registered[stamp] = color
+ -- colors.reviver(color)
+ end
+ if name then
+ list[a_color][name] = color -- not grouped, so only global colors
+ end
+ return registered[stamp]
+end
+
+function colors.value(id)
+ return values[id]
+end
+
+attributes.colors.handler = nodes.installattributehandler {
+ name = "color",
+ namespace = colors,
+ initializer = states.initialize,
+ finalizer = states.finalize,
+ processor = states.selective,
+ resolver = function() return colors.main end,
+}
+
+function colors.enable(value)
+ setaction("shipouts","attributes.colors.handler",not (value == false or not colors.supported))
+end
+
+function colors.forcesupport(value) -- can move to attr-div
+ colors.supported = value
+ report_colors("color is %ssupported",value and "" or "not ")
+ colors.enable(value)
+end
+
+function colors.toattributes(name)
+ local mc = list[a_color][name]
+ local mm = texgetattribute(a_selector)
+ return (mm == unsetvalue and 1) or mm or 1, mc or list[a_color][1] or unsetvalue
+end
+
+-- transparencies
+
+local a_transparency = attributes.private('transparency')
+
+attributes.transparencies = attributes.transparencies or { }
+local transparencies = attributes.transparencies
+transparencies.registered = transparencies.registered or { }
+transparencies.data = allocate()
+transparencies.values = transparencies.values or { }
+transparencies.triggering = true
+transparencies.attribute = a_transparency
+transparencies.supported = true
+
+local registered = transparencies.registered -- we could use a 2 dimensional table instead
+local data = transparencies.data
+local values = transparencies.values
+local f_transparency = formatters["%s:%s"]
+
+registerstorage("attributes/transparencies/registered", registered, "attributes.transparencies.registered")
+registerstorage("attributes/transparencies/values", values, "attributes.transparencies.values")
+
+local function inject_transparency(...)
+ inject_transparency = nodeinjections.transparency
+ return inject_transparency(...)
+end
+
+local function register_transparency(...)
+ register_transparency = registrations.transparency
+ return register_transparency(...)
+end
+
+function transparencies.register(name,a,t,force) -- name is irrelevant here (can even be nil)
+ -- Force needed here for metapost converter. We could always force
+ -- but then we'd end up with transparencies resources even if we
+ -- would not use transparencies (but define them only). This is
+ -- somewhat messy.
+ local stamp = f_transparency(a,t)
+ local n = registered[stamp]
+ if not n then
+ n = #values + 1
+ values[n] = { a, t }
+ registered[stamp] = n
+ if force then
+ register_transparency(n,a,t)
+ end
+ elseif force and not data[n] then
+ register_transparency(n,a,t)
+ end
+ if name then
+ list[a_transparency][name] = n -- not grouped, so only global transparencies
+ end
+ return registered[stamp]
+end
+
+local function extender(transparencies,key)
+ if colors.supported and key == "none" then
+ local d = inject_transparency(0)
+ transparencies.none = d
+ return d
+ end
+end
+
+local function reviver(data,n)
+ if n and transparencies.supported then
+ local v = values[n]
+ local d
+ if not v then
+ d = inject_transparency(0)
+ else
+ d = inject_transparency(n)
+ register_transparency(n,v[1],v[2])
+ end
+ data[n] = d
+ return d
+ else
+ return ""
+ end
+end
+
+setmetatableindex(transparencies,extender)
+setmetatableindex(transparencies.data,reviver) -- register if used
+
+-- check if there is an identity
+
+function transparencies.value(id)
+ return values[id]
+end
+
+attributes.transparencies.handler = nodes.installattributehandler {
+ name = "transparency",
+ namespace = transparencies,
+ initializer = states.initialize,
+ finalizer = states.finalize,
+ processor = states.process,
+}
+
+function transparencies.enable(value) -- nil is enable
+ setaction("shipouts","attributes.transparencies.handler",not (value == false or not transparencies.supported))
+end
+
+function transparencies.forcesupport(value) -- can move to attr-div
+ transparencies.supported = value
+ report_transparencies("transparency is %ssupported",value and "" or "not ")
+ transparencies.enable(value)
+end
+
+function transparencies.toattribute(name)
+ return list[a_transparency][name] or unsetvalue
+end
+
+--- colorintents: overprint / knockout
+
+attributes.colorintents = attributes.colorintents or { }
+local colorintents = attributes.colorintents
+colorintents.data = allocate() -- colorintents.data or { }
+colorintents.attribute = attributes.private('colorintent')
+
+colorintents.registered = allocate {
+ overprint = 1,
+ knockout = 2,
+}
+
+local data, registered = colorintents.data, colorintents.registered
+
+local function extender(colorintents,key)
+ if key == "none" then
+ local d = data[2]
+ colorintents.none = d
+ return d
+ end
+end
+
+local function reviver(data,n)
+ if n == 1 then
+ local d = nodeinjections.overprint() -- called once
+ data[1] = d
+ return d
+ elseif n == 2 then
+ local d = nodeinjections.knockout() -- called once
+ data[2] = d
+ return d
+ end
+end
+
+setmetatableindex(colorintents, extender)
+setmetatableindex(colorintents.data, reviver)
+
+function colorintents.register(stamp)
+ return registered[stamp] or registered.overprint
+end
+
+colorintents.handler = nodes.installattributehandler {
+ name = "colorintent",
+ namespace = colorintents,
+ initializer = states.initialize,
+ finalizer = states.finalize,
+ processor = states.process,
+}
+
+function colorintents.enable()
+ enableaction("shipouts","attributes.colorintents.handler")
+end
+
+-- interface
+
+implement { name = "enablecolor", onlyonce = true, actions = colors.enable }
+implement { name = "enabletransparency", onlyonce = true, actions = transparencies.enable }
+implement { name = "enablecolorintents", onlyonce = true, actions = colorintents.enable }
+
+--------- { name = "registercolor", actions = { colors .register, context }, arguments = "string" }
+--------- { name = "registertransparency", actions = { transparencies.register, context }, arguments = "string" }
+implement { name = "registercolorintent", actions = { colorintents .register, context }, arguments = "string" }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-col.mkxl b/Master/texmf-dist/tex/context/base/mkxl/attr-col.mkxl
new file mode 100644
index 00000000000..0c23f2ce384
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-col.mkxl
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=attr-col,
+%D version=2007.06.06,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Color,
+%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 Attribute Macros / Color}
+
+\registerctxluafile{attr-col}{autosuffix}
+
+\unprotect
+
+% We implement this elsewhere but some code might end up here.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl b/Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl
new file mode 100644
index 00000000000..42aadf9a278
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-eff.mkxl
@@ -0,0 +1,60 @@
+%D \module
+%D [ file=attr-eff,
+%D version=2007.06.06,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Effects,
+%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 Attribute Macros / Effects}
+
+\registerctxluafile{attr-eff}{}
+
+\unprotect
+
+\installcorenamespace{effect}
+
+\installcommandhandler \??effect {effect} \??effect
+
+\setupeffect
+ [\c!method=\v!none,
+ \c!stretch=\zerocount,
+ \c!rulethickness=\zeropoint,
+ \c!alternative=\v!normal]
+
+\appendtoks
+ \edef\p_method{\effectparameter\c!method}%
+ \ifx\p_method\v!command
+ \frozen\protected\xdefcsname\e!start\currenteffect\endcsname{\starteffect[#1]}%
+ \frozen\protected\xdefcsname\e!stop \currenteffect\endcsname{\stopeffect}%
+ \fi
+\to \everydefineeffect
+
+\permanent\protected\def\starteffect[#1]%
+ {\clf_seteffect
+ alternative {\namedeffectparameter{#1}\c!alternative}
+ stretch \numexpr\namedeffectparameter{#1}\c!stretch\relax
+ rulethickness \dimexpr\namedeffectparameter{#1}\c!rulethickness\relax
+ \relax}
+
+\permanent\protected\def\stopeffect % can be special
+ {\clf_reseteffect} % v!normal 0 0
+
+\permanent\protected\def\effect[#1]%
+ {\groupedcommand{\starteffect[#1]}{\stopeffect}}
+
+% yes or no grouped
+
+\defineeffect [\v!inner] [\c!alternative=\v!inner,\c!rulethickness=.25pt]
+\defineeffect [\v!outer] [\c!alternative=\v!outer,\c!rulethickness=.25pt]
+\defineeffect [\v!both] [\c!alternative=\v!both, \c!rulethickness=.25pt]
+\defineeffect [\v!normal] [\c!alternative=\v!normal]
+\defineeffect [\v!hidden] [\c!alternative=\v!hidden]
+\defineeffect [\v!stretch] [\c!alternative=\v!stretch,\c!stretch=1]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/attr-ini.mkxl
new file mode 100644
index 00000000000..e707a478f1f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-ini.mkxl
@@ -0,0 +1,141 @@
+%D \module
+%D [ file=attr-ini,
+%D version=2007.06.06,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Initialization,
+%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 Attribute Macros / Initialization}
+
+\unprotect
+
+\registerctxluafile{attr-ini}{}
+
+\installcorenamespace{attributecount} % the counter representing the attribute (attrdef'd)
+\installcorenamespace{attributeid} % the internal number
+\installcorenamespace{attributestack} % the attribute specific stack
+\installcorenamespace{attributepickup}
+
+\permanent\protected\def\pushattribute#1%
+ {\global\advance\csname\??attributestack\string#1\endcsname\plusone
+ \gdefcsname\??attributestack\string#1:\number\csname\??attributestack\string#1\endcsname\endcsname{\number\attribute#1}}
+
+\permanent\protected\def\popattribute#1%
+ {\attribute#1\csname\??attributestack\string#1:\number\csname\??attributestack\string#1\endcsname\endcsname\relax
+ \global\advance\csname\??attributestack\string#1\endcsname\minusone}
+
+\permanent\protected\def\installattributestack#1%
+ {\ifcsname\??attributestack\string#1\endcsname \else
+ \expandafter\newcount\csname\??attributestack\string#1\endcsname
+ \fi}
+
+\newtoks \t_attr_list_global
+\newtoks \t_attr_list_local
+\newtoks \t_attr_list_pickup
+\newtoks \t_attr_list_nomath
+
+\ifdefined \s!global \else \immutable\def\s!global {global} \fi % for metatex % or hard check later
+\ifdefined \s!public \else \immutable\def\s!public {public} \fi % for metatex % or hard check later
+\ifdefined \s!private \else \immutable\def\s!private {private} \fi % for metatex % or hard check later
+\ifdefined \s!attribute \else \immutable\def\s!attribute{attribute} \fi % for metatex % or hard check later
+\ifdefined \s!pickup \else \immutable\def\s!pickup {pickup} \fi % for metatex % or hard check later
+\ifdefined \s!forget \else \immutable\def\s!forget {forget} \fi % for metatex % or hard check later
+
+\immutable\def\??attributeprefix{c_attr_}
+
+\permanent\protected\def\defineattribute {\attr_basics_define_indeed[\s!public ]}
+\permanent\protected\def\definesystemattribute{\attr_basics_define_indeed[\s!private]}
+
+\tolerant\def\attr_basics_define_indeed[#1]#*[#2]#*[#3]%
+ {\ifcsname\??attributeprefix#2\endcsname\else
+ \scratchcounter\clf_defineattribute{#2}{#1}\relax
+ %\writestatus\m!system{defining #1 attribute #2 with number \number\scratchcounter}%
+ \global\permanent\expandafter\attributedef\csname\??attributeprefix#2\endcsname\scratchcounter % \foo = 123
+ \global\permanent\expandafter\integerdef \csname\??attributeid #2\endcsname\scratchcounter % \attribute\foo = 123
+ % some attributes are always global
+ \doifelseinset\s!global{#3}%
+ {\xtoksapp\t_attr_list_global{\csname\??attributeprefix#2\endcsname\attributeunsetvalue}}% \c_attr_foo
+ {\xtoksapp\t_attr_list_local {\csname\??attributeprefix#2\endcsname\attributeunsetvalue}}%
+ \doifinset\s!nomath{#3}%
+ {\xtoksapp\t_attr_list_nomath{\csname\??attributeprefix#2\endcsname\attributeunsetvalue}}%
+ \doifinset\s!public{#3}%
+ {\aliased\gletcsname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}% \attribute\fooattribute
+ % used to sync in the page builder .. used for directions and scripts ... i start forgetting these details .. (seldom used)
+ \doifinset\s!pickup{#3}%
+ {\global\expandafter\integerdef\csname\??attributepickup#2\endcsname\attributeunsetvalue
+ \xtoksapp\t_attr_list_pickup{\csname\??attributeprefix#2\endcsname\csname\??attributepickup#2\endcsname}%
+ \ifcsname#2\s!attribute\endcsname
+ \permanent\xdefcsname\s!pickup#2\s!attribute\endcsname{\expandafter\integerdef\csname\??attributepickup#2\endcsname\csname\??attributeprefix#2\endcsname}%
+ \permanent\xdefcsname\s!forget#2\s!attribute\endcsname{\expandafter\integerdef\csname\??attributepickup#2\endcsname\attributeunsetvalue}%
+ \fi}%
+ \fi}
+
+\permanent\protected\def\pickupattributes
+ {\the\t_attr_list_pickup\relax}
+
+\permanent\protected\def\newattribute#1%
+ {\attr_basics_define_indeed[\s!public][\csstring#1][]%
+ \expandafter\glet\expandafter#1\csname\??attributeid\csstring#1\endcsname}
+
+% expandable so we can \edef them for speed
+
+\permanent\def\dosetattribute#1#2{\csname\??attributeprefix#1\endcsname#2\relax}
+\permanent\def\doresetattribute#1{\csname\??attributeprefix#1\endcsname\attributeunsetvalue}
+\permanent\def\dogetattribute #1{\number\csname\??attributeprefix#1\endcsname}
+\permanent\def\dogetattributeid#1{\number\csname\??attributeid #1\endcsname}
+
+\aliased\let\dompattribute\gobbletwoarguments
+
+\permanent\protected\def\resetglobalattributes{\the\t_attr_list_global\glyphdatafield\zerocount\glyphscriptfield\zerocount}
+\permanent\protected\def\resetlocalattributes {\the\t_attr_list_local \glyphdatafield\zerocount\glyphscriptfield\zerocount}
+
+\aliased\let\resetallattributes\resetlocalattributes
+
+%D Rather special.
+
+\permanent\protected\def\savecurrentattributes #1{\clf_savecurrentattributes {#1}}
+\permanent\protected\def\restorecurrentattributes#1{\clf_restorecurrentattributes{#1}}
+
+%D For the moment we put this here. The order of definition matters a bit because
+%D performance is better when we put frequently accessed attributes at the front.
+%D So, we might move more here.
+
+%definesystemattribute [state] % nomath
+\definesystemattribute [color] [public] % global
+\definesystemattribute [colormodel] [public,global]
+%definesystemattribute [skip]
+%definesystemattribute [penalty]
+\definesystemattribute [transparency] [public]
+\definesystemattribute [reference] [public]
+\definesystemattribute [destination] [public]
+\definesystemattribute [case] [public]
+\definesystemattribute [visual] [public,global]
+\definesystemattribute [viewerlayer] [public]
+\definesystemattribute [background] [public]
+\definesystemattribute [alignbackground] [public]
+\definesystemattribute [colorintent] [public]
+\definesystemattribute [negative] [public]
+\definesystemattribute [effect] [public]
+\definesystemattribute [layoutcomponent] [public]
+\definesystemattribute [internal] [public]
+\definesystemattribute [ruled] [public]
+\definesystemattribute [shifted] [public]
+\definesystemattribute [checkedbreak] [public]
+\definesystemattribute [alternate] [public]
+\definesystemattribute [vboxtohboxseparator] [public]
+
+\permanent\protected\let\showattributes\clf_showattributes % maybe at lua end
+
+%D Todo:
+
+% \appendtoks
+% \clf_cleanupattributes
+% \to \everyafterpagebreak
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-lay.lmt b/Master/texmf-dist/tex/context/base/mkxl/attr-lay.lmt
new file mode 100644
index 00000000000..d0febb9eefb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-lay.lmt
@@ -0,0 +1,311 @@
+if not modules then modules = { } end modules ['attr-lay'] = {
+ version = 1.001,
+ comment = "companion to attr-lay.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- layers (ugly code, due to no grouping and such); currently we use exclusive layers
+-- but when we need it stacked layers might show up too; the next function based
+-- approach can be replaced by static (metatable driven) resolvers
+
+-- maybe use backends.registrations here too
+
+local type = type
+local insert, remove = table.insert, table.remove
+
+local attributes = attributes
+local nodes = nodes
+local utilities = utilities
+local logs = logs
+local backends = backends
+
+local context = context
+local interfaces = interfaces
+local tex = tex
+
+local implement = interfaces.implement
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local report_viewerlayers = logs.reporter("viewerlayers")
+
+-- todo: document this but first reimplement this as it reflects the early
+-- days of luatex / mkiv and we have better ways now
+
+-- nb: attributes: color etc is much slower than normal (marks + literals) but ...
+-- nb. too many "0 g"s
+-- nb: more local tables
+
+attributes.viewerlayers = attributes.viewerlayers or { }
+local viewerlayers = attributes.viewerlayers
+
+local variables = interfaces.variables
+local v_local = variables["local"]
+local v_global = variables["global"]
+local v_start = variables["start"]
+local v_yes = variables["yes"]
+
+local a_viewerlayer = attributes.private("viewerlayer")
+
+viewerlayers = viewerlayers or { }
+viewerlayers.data = allocate()
+viewerlayers.registered = viewerlayers.registered or { }
+viewerlayers.values = viewerlayers.values or { }
+viewerlayers.scopes = viewerlayers.scopes or { }
+viewerlayers.listwise = allocate()
+viewerlayers.attribute = a_viewerlayer
+viewerlayers.supported = true
+viewerlayers.hasorder = true
+
+local states = attributes.states
+local enableaction = nodes.tasks.enableaction
+local disableaction = nodes.tasks.disableaction
+local nodeinjections = backends.nodeinjections
+local codeinjections = backends.codeinjections
+
+local texsetattribute = tex.setattribute
+local texgetattribute = tex.getattribute
+local texsettokenlist = tex.settoks
+local unsetvalue = attributes.unsetvalue
+
+local data = viewerlayers.data
+local values = viewerlayers.values
+local listwise = viewerlayers.listwise
+local registered = viewerlayers.registered
+local scopes = viewerlayers.scopes
+
+local f_stamp = formatters["%s"]
+
+storage.register("attributes/viewerlayers/registered", registered, "attributes.viewerlayers.registered")
+storage.register("attributes/viewerlayers/values", values, "attributes.viewerlayers.values")
+storage.register("attributes/viewerlayers/scopes", scopes, "attributes.viewerlayers.scopes")
+
+local layerstacker = utilities.stacker.new("layers") -- experiment
+
+layerstacker.mode = "stack"
+layerstacker.unset = attributes.unsetvalue
+
+viewerlayers.resolve_reset = layerstacker.resolve_reset
+viewerlayers.resolve_begin = layerstacker.resolve_begin
+viewerlayers.resolve_step = layerstacker.resolve_step
+viewerlayers.resolve_end = layerstacker.resolve_end
+
+-- stacked
+
+local function startlayer(...) startlayer = nodeinjections.startlayer return startlayer(...) end
+local function stoplayer (...) stoplayer = nodeinjections.stoplayer return stoplayer (...) end
+
+local function extender(viewerlayers,key)
+ if viewerlayers.supported and key == "none" then
+ local d = stoplayer()
+ viewerlayers.none = d
+ return d
+ end
+end
+
+local function reviver(data,n)
+ if viewerlayers.supported then
+ local v = values[n]
+ if v then
+ local d = startlayer(v)
+ data[n] = d
+ return d
+ else
+ report_viewerlayers("error: unknown reference %a",tostring(n))
+ end
+ end
+end
+
+setmetatableindex(viewerlayers,extender)
+setmetatableindex(viewerlayers.data,reviver)
+
+-- !!!! TEST CODE !!!!
+
+layerstacker.start = function(...) local f = nodeinjections.startstackedlayer layerstacker.start = f return f(...) end
+layerstacker.stop = function(...) local f = nodeinjections.stopstackedlayer layerstacker.stop = f return f(...) end
+layerstacker.change = function(...) local f = nodeinjections.changestackedlayer layerstacker.change = f return f(...) end
+
+local function initializer(...)
+ return states.initialize(...)
+end
+
+attributes.viewerlayers.handler = nodes.installattributehandler {
+ name = "viewerlayer",
+ namespace = viewerlayers,
+ initializer = initializer,
+ finalizer = states.finalize,
+ processor = states.stacker,
+ -- processor = states.stacked,
+}
+
+local stack, enabled, global = { }, false, false
+
+function viewerlayers.enable(value)
+ if value == false or not viewerlayers.supported then
+ if enabled then
+ disableaction("shipouts","attributes.viewerlayers.handler")
+ end
+ enabled = false
+ else
+ if not enabled then
+ enableaction("shipouts","attributes.viewerlayers.handler")
+ end
+ enabled = true
+ end
+end
+
+function viewerlayers.forcesupport(value)
+ viewerlayers.supported = value
+ report_viewerlayers("viewerlayers are %ssupported",value and "" or "not ")
+ viewerlayers.enable(value)
+end
+
+local function register(name,lw) -- if not inimode redefine data[n] in first call
+ if not enabled then
+ viewerlayers.enable(true)
+ end
+ local stamp = f_stamp(name)
+ local n = registered[stamp]
+ if not n then
+ n = #values + 1
+ values[n] = name
+ registered[stamp] = n
+ listwise[n] = lw or false -- lw forces a used
+ end
+ return registered[stamp] -- == n
+end
+
+viewerlayers.register = register
+
+function viewerlayers.setfeatures(hasorder)
+ viewerlayers.hasorder = hasorder
+end
+
+local usestacker = true -- new, experimental
+
+function viewerlayers.start(name)
+ local a
+ if usestacker then
+ a = layerstacker.push(register(name) or unsetvalue)
+ else
+ insert(stack,texgetattribute(a_viewerlayer))
+ a = register(name) or unsetvalue
+ end
+ if global or scopes[name] == v_global then
+ scopes[a] = v_global -- messy but we don't know the attributes yet
+ texsetattribute("global",a_viewerlayer,a)
+ else
+ texsetattribute(a_viewerlayer,a)
+ end
+ -- or macro
+ texsettokenlist("currentviewerlayertoks",name)
+end
+
+function viewerlayers.stop()
+ local a
+ if usestacker then
+ a = layerstacker.pop()
+ else
+ a = remove(stack)
+ end
+ if not a then
+ -- error
+ elseif a >= 0 then
+ if global or scopes[a] == v_global then
+ texsetattribute("global",a_viewerlayer,a)
+ else
+ texsetattribute(a_viewerlayer,a)
+ end
+ texsettokenlist("currentviewerlayertoks",values[a] or "")
+ else
+ if global or scopes[a] == v_global then
+ texsetattribute("global",a_viewerlayer,unsetvalue)
+ else
+ texsetattribute(a_viewerlayer,unsetvalue)
+ end
+ texsettokenlist("currentviewerlayertoks","")
+ end
+end
+
+function viewerlayers.define(settings)
+ local tag = settings.tag
+ if not tag or tag == "" then
+ -- error
+ elseif not scopes[tag] then -- prevent duplicates
+ local title = settings.title
+ if not title or title == "" then
+ settings.title = tag
+ end
+ scopes[tag] = settings.scope or v_local
+ codeinjections.defineviewerlayer(settings)
+ end
+end
+
+function viewerlayers.definedlayoutcomponent(tag)
+ viewerlayers.define {
+ tag = tag,
+ title = utilities.strings.nice(tag),
+ visible = v_start,
+ editable = v_yes,
+ printable = v_yes,
+ }
+ return register(tag,true) -- true forces a use
+end
+
+function viewerlayers.cleanup()
+ layerstacker.clean()
+ -- todo
+end
+
+implement {
+ name = "cleanuplayers",
+ actions = viewerlayers.cleanup
+}
+
+implement {
+ name = "defineviewerlayer",
+ actions = viewerlayers.define,
+ arguments = {
+ {
+ { "tag" },
+ { "title" },
+ { "visible" },
+ { "editable" },
+ { "export" },
+ { "printable" },
+ { "scope" },
+ },
+ true
+ }
+}
+
+implement {
+ name = "definedlayoutcomponent",
+ actions = { viewerlayers.definedlayoutcomponent, context },
+ arguments = "string"
+}
+
+implement {
+ name = "startviewerlayer",
+ public = true,
+ protected = true,
+ actions = viewerlayers.start,
+ arguments = "optional",
+}
+
+implement {
+ name = "stopviewerlayer",
+ public = true,
+ protected = true,
+ actions = viewerlayers.stop
+}
+
+implement {
+ name = "registeredviewerlayer",
+ actions = { register, context },
+ arguments = { "string", true } -- true forces a use
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-lay.mkxl b/Master/texmf-dist/tex/context/base/mkxl/attr-lay.mkxl
new file mode 100644
index 00000000000..00c6335337a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-lay.mkxl
@@ -0,0 +1,107 @@
+%D \module
+%D [ file=attr-lay,
+%D version=2007.06.06,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Viewerlayers,
+%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 Attribute Macros / Viewerlayers}
+
+%D Currently there is a limitation in mixed inline usage. This has to do with the fact
+%D that we have a stacked model but cannot determine where to revert to (as we can
+%D have AABBCCAA ranges). Maybe I'll solve that one day. It only affects nested inline
+%D layers and these make not much sense anyway. We'd have to store the complete nesting
+%D stack in the attribute in order to be able to cross pages and that demands a new
+%D mechanism.
+
+\unprotect
+
+\registerctxluafile{attr-lay}{autosuffix}
+
+% needs to work over stopitemize grouping etc
+
+\installcorenamespace{viewerlayer}
+
+\installcommandhandler \??viewerlayer {viewerlayer} \??viewerlayer
+
+\setupviewerlayer
+ [\c!state=\v!start,
+ \c!title=,
+ \c!export=\v!yes, % exportable is ugly
+ \c!printable=\v!yes,
+ \c!scope=\v!local, % maybe global but needs checking with layout
+ \c!method=\v!none]
+
+\appendtoks
+ \clf_defineviewerlayer
+ tag {\currentviewerlayer}%
+ title {\viewerlayerparameter\c!title}%
+ visible {\viewerlayerparameter\c!state}%
+ editable {\v!yes}%
+ export {\viewerlayerparameter\c!export}%
+ printable {\viewerlayerparameter\c!printable}%
+ scope {\viewerlayerparameter\c!scope}%
+ \relax
+ \doif{\viewerlayerparameter\c!method}\v!command
+ {\frozen\instance\setuxvalue{\e!start#1}{\startviewerlayer[\currentviewerlayer]}%
+ \frozen\instance\setuxvalue{\e!stop #1}{\stopviewerlayer}}%
+\to \everydefineviewerlayer
+
+% \startviewerlayer[#1] % defined at lua end
+% \stopviewerlayer % defined at lua end
+
+\permanent\protected\def\viewerlayer[#1]%
+ {\groupedcommand{\startviewerlayer[#1]}{\stopviewerlayer}}
+
+% some day we will keep this at the lua end as the info is only needed there
+
+\newtoks\currentviewerlayertoks % soon we can set macros at the lua end
+
+\def\currentviewerlayer{\the\currentviewerlayertoks}
+
+\appendtoks
+ \let\currentviewerlayer\empty
+\to \everybeforepagebody
+
+% layout components are implemented rather directly (speed)
+
+\installcorenamespace{layoutcomponentattribute}
+
+\mutable\let\layoutcomponentboxattribute\empty
+
+\permanent\def\attr_layoutcomponent_initialize#1%
+ {\edef\layoutcomponentboxattribute{\clf_definedlayoutcomponent{#1}}%
+ \edef\layoutcomponentboxattribute{attr \viewerlayerattribute \layoutcomponentboxattribute\relax}%
+ \gletcsname\??layoutcomponentattribute#1\endcsname\layoutcomponentboxattribute}
+
+\permanent\def\attr_layoutcomponent_set#1% make this faster
+ {\expandafter\let\expandafter\layoutcomponentboxattribute\csname\??layoutcomponentattribute#1\endcsname
+ \ifrelax\layoutcomponentboxattribute
+ \attr_layoutcomponent_initialize{#1}% get rid of { }
+ \fi}
+
+\permanent\def\attr_layoutcomponent_reset
+ {\let\layoutcomponentboxattribute\empty}
+
+\permanent\let\setlayoutcomponentattribute \gobbleoneargument
+\permanent\let\resetlayoutcomponentattribute\relax
+ \let\layoutcomponentboxattribute \empty
+
+\permanent\protected\def\showlayoutcomponents
+ {\enforced\let\setlayoutcomponentattribute \attr_layoutcomponent_set
+ \enforced\let\resetlayoutcomponentattribute\attr_layoutcomponent_reset}
+
+\protected\def\attr_layoutcomponent_cleanup
+ {\clf_cleanuplayers}
+
+\appendtoks
+ \attr_layoutcomponent_cleanup
+\to \everyshipout
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl
new file mode 100644
index 00000000000..2209af24157
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-mkr.mkxl
@@ -0,0 +1,25 @@
+%D \module
+%D [ file=attr-mkr,
+%D version=2013.01.09,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Markers,
+%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 Attribute Macros / Markers}
+
+\unprotect
+
+\registerctxluafile{attr-mkr}{}
+
+\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}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl b/Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl
new file mode 100644
index 00000000000..c849e6bf6db
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/attr-neg.mkxl
@@ -0,0 +1,28 @@
+%D \module
+%D [ file=attr-neg,
+%D version=2007.06.06,
+%D title=\CONTEXT\ Attribute Macros,
+%D subtitle=Negation,
+%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 Attribute Macros / Negation}
+
+\registerctxluafile{attr-neg}{}
+
+\unprotect
+
+% positive and negative are preregistered
+
+\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}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-mth.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-mth.lmt
new file mode 100644
index 00000000000..73c09d79ecf
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-mth.lmt
@@ -0,0 +1,742 @@
+if not modules then modules = { } end modules ['back-exp-imp-mth'] = {
+ version = 1.001,
+ comment = "companion to back-exp.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local sub = string.sub
+local utfchar, utfvalues = utf.char, utf.values
+local setmetatableindex, concat = table.setmetatableindex, table.concat
+
+local structurestags = structures.tags
+local specifications = structurestags.specifications
+local locatedtag = structurestags.locatedtag
+
+local backend = structurestags.backend
+
+local setattribute = backend.setattribute
+local extras = backend.extras
+local checks = backend.checks
+local finalizers = backend.finalizers
+
+local implement = interfaces.implement
+
+do
+
+ local automathrows = true directives.register("export.math.autorows", function(v) automathrows = v end)
+ local automathapply = true directives.register("export.math.autoapply", function(v) automathapply = v end)
+ local automathnumber = true directives.register("export.math.autonumber", function(v) automathnumber = v end)
+ local automathstrip = true directives.register("export.math.autostrip", function(v) automathstrip = v end)
+
+ local functions = mathematics.categories.functions
+
+ local function collapse(di,i,data,ndata,detail,element)
+ local collapsing = di.data
+ if data then
+ di.element = element
+ di.detail = nil
+ i = i + 1
+ while i <= ndata do
+ local dn = data[i]
+ if dn.detail == detail then
+ collapsing[#collapsing+1] = dn.data[1]
+ dn.skip = "ignore"
+ i = i + 1
+ else
+ break
+ end
+ end
+ end
+ return i
+ end
+
+ local function collapse_mn(di,i,data,ndata)
+ -- this is tricky ... we need to make sure that we wrap in mrows if we want
+ -- to bypass this one
+ local collapsing = di.data
+ if data then
+ i = i + 1
+ while i <= ndata do
+ local dn = data[i]
+ local tg = dn.tg
+ if tg == "mn" then
+ collapsing[#collapsing+1] = dn.data[1]
+ dn.skip = "ignore"
+ i = i + 1
+ elseif tg == "mo" then
+ local d = dn.data[1]
+ if d == "." then
+ collapsing[#collapsing+1] = d
+ dn.skip = "ignore"
+ i = i + 1
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ end
+ return i
+ end
+
+ -- maybe delay __i__ till we need it
+
+ local apply_function = {
+ {
+ element = "mo",
+ -- comment = "apply function",
+ -- data = { utfchar(0x2061) },
+ data = { "&#x2061;" },
+ nature = "mixed",
+ }
+ }
+
+ local functioncontent = { }
+
+ setmetatableindex(functioncontent,function(t,k)
+ local v = { { content = k } }
+ t[k] = v
+ return v
+ end)
+
+ local dummy_nucleus = {
+ element = "mtext",
+ data = { content = "" },
+ nature = "inline",
+ comment = "dummy nucleus",
+ fulltag = "mtext>0"
+ }
+
+ local function accentchar(d)
+ for i=1,3 do
+ d = d.data
+ if not d then
+ return
+ end
+ d = d[1]
+ if not d then
+ return
+ end
+ local tg = d.tg
+ if tg == "mover" then
+ local s = specifications[d.fulltag]
+ local t = s.top
+ if t then
+ d = d.data[1]
+ local d1 = d.data[1]
+ d1.content = utfchar(t)
+ d.data = { d1 }
+ return d
+ end
+ elseif tg == "munder" then
+ local s = specifications[d.fulltag]
+ local b = s.bottom
+ if b then
+ d = d.data[1]
+ local d1 = d.data[1]
+ d1.content = utfchar(b)
+ d.data = { d1 }
+ return d
+ end
+ end
+ end
+ end
+
+ local no_mrow = {
+ mrow = true,
+ mfenced = true,
+ mfrac = true,
+ mroot = true,
+ msqrt = true,
+ mtable = true,
+ mi = true,
+ mo = true,
+ mn = true,
+ }
+
+ local function checkmath(root) -- we can provide utf.toentities as an option
+ local data = root.data
+ if data then
+ local ndata = #data
+ local roottg = root.tg
+ if roottg == "msubsup" then
+ -- kind of tricky: we have a diufferent order in display mode
+ local nucleus, superscript, subscript
+ if ndata > 3 then
+ -- error
+ else
+ for i=1,ndata do
+ local di = data[i]
+ if not di then
+ -- weird
+ elseif di.content then
+ -- text
+ else
+ local s = specifications[di.fulltag]
+ if s.subscript then
+ subscript = i
+ elseif s.superscript then
+ superscript = i
+ else
+ nucleus = i
+ end
+ end
+ end
+ if superscript or subscript then
+ -- we probably always have 3 anyway ... needs checking
+ local nuc = nucleus and data[nucleus]
+ local sub = subscript and data[subscript]
+ local sup = superscript and data[superscript]
+ local n = 0 -- play safe
+ if nuc then n = n + 1 ; data[n] = nuc end
+ if sub then n = n + 1 ; data[n] = sub end
+ if sup then n = n + 1 ; data[n] = sup end
+ end
+ end
+ -- elseif roottg == "msup" or roottg == "msub" then
+ -- -- m$^2$
+ -- if ndata == 1 then
+ -- local d = data[1]
+ -- data[2] = d
+ -- d.__i__ = 2
+ -- data[1] = dummy_nucleus
+ -- end
+ elseif roottg == "mfenced" then
+ local s = specifications[root.fulltag]
+ local l, m, r = s.left, s.middle, s.right
+ if l then
+ l = utfchar(l)
+ end
+ if m then
+ local t = { }
+ for i=1,#m do
+ t[i] = utfchar(m[i])
+ end
+ m = concat(t)
+ end
+ if r then
+ r = utfchar(r)
+ end
+ root.attributes = {
+ open = l,
+ separators = m,
+ close = r,
+ }
+ end
+ if ndata == 0 then
+ root.skip = "comment" -- get rid of weird artefacts
+ root.nota = "weird"
+ return
+ elseif ndata == 1 then
+ local d = data[1]
+ if not d or d == "" then
+ root.skip = "comment"
+ return
+ elseif d.content then
+ return
+ else -- if ndata == 1 then
+ local tg = d.tg
+ if automathrows and (roottg == "mrow" or roottg == "mtext") then
+ -- maybe just always ! check spec first
+ -- or we can have chesks.* for each as we then can flatten
+ if no_mrow[tg] then
+ root.skip = "comment"
+ end
+ elseif roottg == "mo" then
+ if tg == "mo" then
+ root.skip = "comment"
+ end
+ end
+ end
+ end
+ local i = 1
+ while i <= ndata do -- -- -- TOO MUCH NESTED CHECKING -- -- --
+ local di = data[i]
+ if di and not di.content then
+ local tg = di.tg
+ if tg == "math" then
+ -- di.element = "mrow" -- when properties
+ di.skip = "comment"
+ checkmath(di)
+ i = i + 1
+ elseif tg == "mover" then
+ local s = specifications[di.fulltag]
+ if s.accent then
+ local t = s.top
+ local d = di.data
+ -- todo: accent = "false" (for scripts like limits)
+ di.attributes = {
+ accent = "true",
+ }
+ -- todo: p.topfixed
+ if t then
+ -- mover
+ d[1].data[1].content = utfchar(t)
+ di.data = { d[2], d[1] }
+ end
+ else
+ -- can't happen
+ end
+ checkmath(di)
+ i = i + 1
+ elseif tg == "munder" then
+ local s = specifications[di.fulltag]
+ if s.accent then
+ local b = s.bottom
+ local d = di.data
+ -- todo: accent = "false" (for scripts like limits)
+ di.attributes = {
+ accent = "true",
+ }
+ -- todo: p.bottomfixed
+ if b then
+ -- munder
+ d[2].data[1].content = utfchar(b)
+ end
+ else
+ -- can't happen
+ end
+ checkmath(di)
+ i = i + 1
+ elseif tg == "munderover" then
+ local s = specifications[di.fulltag]
+ if s.accent then
+ local t = s.top
+ local b = s.bottom
+ local d = di.data
+ -- todo: accent = "false" (for scripts like limits)
+ -- todo: accentunder = "false" (for scripts like limits)
+ di.attributes = {
+ accent = "true",
+ accentunder = "true",
+ }
+ -- todo: p.topfixed
+ -- todo: p.bottomfixed
+ if t and b then
+ -- munderover
+ d[1].data[1].content = utfchar(t)
+ d[3].data[1].content = utfchar(b)
+ di.data = { d[2], d[3], d[1] }
+ else
+ -- can't happen
+ end
+ else
+ -- can't happen
+ end
+ checkmath(di)
+ i = i + 1
+ elseif tg == "mstacker" then
+ local d = di.data
+ local d1 = d[1]
+ local d2 = d[2]
+ local d3 = d[3]
+ local t1 = d1 and d1.tg
+ local t2 = d2 and d2.tg
+ local t3 = d3 and d3.tg
+ local m = nil -- d1.data[1]
+ local t = nil
+ local b = nil
+ -- only accent when top / bot have stretch
+ -- normally we flush [base under over] which is better for tagged pdf
+ if t1 == "mstackermid" then
+ m = accentchar(d1) -- or m
+ if t2 == "mstackertop" then
+ if t3 == "mstackerbot" then
+ t = accentchar(d2)
+ b = accentchar(d3)
+ di.element = "munderover"
+ di.data = { m or d1.data[1], b or d3.data[1], t or d2.data[1] }
+ else
+ t = accentchar(d2)
+ di.element = "mover"
+ di.data = { m or d1.data[1], t or d2.data[1] }
+ end
+ elseif t2 == "mstackerbot" then
+ if t3 == "mstackertop" then
+ b = accentchar(d2)
+ t = accentchar(d3)
+ di.element = "munderover"
+ di.data = { m or d1.data[1], t or d3.data[1], m, b or d2.data[1] }
+ else
+ b = accentchar(d2)
+ di.element = "munder"
+ di.data = { m or d1.data[1], b or d2.data[1] }
+ end
+ else
+ -- can't happen
+ end
+ else
+ -- can't happen
+ end
+ if t or b then
+ di.attributes = {
+ accent = t and "true" or nil,
+ accentunder = b and "true" or nil,
+ }
+ di.detail = nil
+ end
+ checkmath(di)
+ i = i + 1
+ elseif tg == "mroot" then
+ local data = di.data
+ local size = #data
+ if size == 1 then
+ -- else firefox complains ... code in math-tag (for pdf tagging)
+ di.element = "msqrt"
+ elseif size == 2 then
+ data[1], data[2] = data[2], data[1]
+ end
+ checkmath(di)
+ i = i + 1
+ elseif tg == "break" then
+ di.skip = "comment"
+ i = i + 1
+ elseif tg == "mtext" then
+ -- this is only needed for unboxed mtexts ... all kind of special
+ -- tex border cases and optimizations ... trial and error
+ local data = di.data
+ if #data > 1 then
+ for i=1,#data do
+ local di = data[i]
+ local content = di.content
+ if content then
+ data[i] = {
+ element = "mtext",
+ nature = "inline",
+ data = { di },
+ n = 0,
+ }
+ elseif di.tg == "math" then
+ local di = di.data[1]
+ if di then
+ data[i] = di
+ checkmath(di)
+ end
+ end
+ end
+ di.element = "mrow"
+ -- di.tg = "mrow"
+ -- di.nature = "inline"
+ end
+ checkmath(di)
+ i = i + 1
+ elseif tg == "mrow" and detail then -- hm, falls through
+ di.detail = nil
+ checkmath(di)
+ di = {
+ element = "maction",
+ nature = "display",
+ attributes = { actiontype = detail },
+ data = { di },
+ n = 0,
+ }
+ data[i] = di
+ i = i + 1
+ else
+ local category = di.mathcategory
+ if category then
+ -- no checkmath(di) here
+ if category == 1 then -- mo
+ i = collapse(di,i,data,ndata,detail,"mo")
+ elseif category == 2 then -- mi
+ i = collapse(di,i,data,ndata,detail,"mi")
+ elseif category == 3 then -- mn
+ i = collapse(di,i,data,ndata,detail,"mn")
+ elseif category == 4 then -- ms
+ i = collapse(di,i,data,ndata,detail,"ms")
+ elseif category >= 1000 then
+ local apply = category >= 2000
+ if apply then
+ category = category - 1000
+ end
+ if tg == "mi" then -- function
+ if roottg == "mrow" then
+ root.skip = "comment"
+ root.element = "function"
+ end
+ i = collapse(di,i,data,ndata,detail,"mi")
+ local tag = functions[category]
+ if tag then
+ di.data = functioncontent[tag]
+ end
+ if apply then
+ di.after = apply_function
+ elseif automathapply then -- make function
+ local following
+ if i <= ndata then
+ -- normally not the case
+ following = data[i]
+ else
+ local parent = di.__p__ -- == root
+ if parent.tg == "mrow" then
+ parent = parent.__p__
+ end
+ local index = parent.__i__
+ following = parent.data[index+1]
+ end
+ if following then
+ local tg = following.tg
+ if tg == "mrow" or tg == "mfenced" then -- we need to figure out the right condition
+ di.after = apply_function
+ end
+ end
+ end
+ else -- some problem
+ checkmath(di)
+ i = i + 1
+ end
+ else
+ checkmath(di)
+ i = i + 1
+ end
+ elseif automathnumber and tg == "mn" then
+ checkmath(di)
+ i = collapse_mn(di,i,data,ndata)
+ else
+ checkmath(di)
+ i = i + 1
+ end
+ end
+ else -- can be string or boolean
+ if parenttg ~= "mtext" and di == " " then
+ data[i] = false
+ end
+ i = i + 1
+ end
+ end
+ end
+ end
+
+ local function stripmath(di)
+ if not di then
+ --
+ elseif di.content then
+ return di
+ else
+ local tg = di.tg
+ if tg == "mtext" or tg == "ms" then
+ return di
+ else
+ local data = di.data
+ local ndata = #data
+ local n = 0
+ for i=1,ndata do
+ local d = data[i]
+ if d and not d.content then
+ d = stripmath(d)
+ end
+ if d then
+ local content = d.content
+ if not content then
+ n = n + 1
+ d.__i__ = n
+ data[n] = d
+ elseif content == " " or content == "" then
+ if di.tg == "mspace" then
+ -- we append or prepend a space to a preceding or following mtext
+ local parent = di.__p__
+ local index = di.__i__ -- == i
+ local data = parent.data
+ if index > 1 then
+ local d = data[index-1]
+ if d.tg == "mtext" then
+ local dd = d.data
+ local dn = dd[#dd]
+ local dc = dn.content
+ if dc then
+ dn.content = dc .. content
+ end
+ end
+ elseif index < ndata then
+ local d = data[index+1]
+ if d.tg == "mtext" then
+ local dd = d.data
+ local dn = dd[1]
+ local dc = dn.content
+ if dc then
+ dn.content = content .. dc
+ end
+ end
+ end
+ end
+ else
+ n = n + 1
+ data[n] = d
+ end
+ end
+ end
+ for i=ndata,n+1,-1 do
+ data[i] = nil
+ end
+ if #data > 0 then
+ return di
+ end
+ end
+ end
+ end
+
+ function checks.math(di)
+ if di.skip == "comment" then
+ -- already done, kind of weird, happens in mathmatrix, maybe some collapse
+ -- issue that i need to look into
+ else
+ local specification = specifications[di.fulltag]
+ local mode = specification and specification.mode == "display" and "block" or "inline"
+ di.attributes = {
+ ["display"] = mode,
+ ["xmlns:m"] = mathmlns,
+ }
+ -- can be option if needed:
+ if mode == "inline" then
+ -- di.nature = "mixed" -- else spacing problem (maybe inline)
+ di.nature = "inline" -- we need to catch x$X$x and x $X$ x
+ else
+ di.nature = "display"
+ end
+ if automathstrip then
+ stripmath(di)
+ end
+ checkmath(di)
+ end
+ end
+
+ -- this one can replace some of the previous code .. todo (test on mathmatrix)
+
+ -- ignore with no data can be removed
+
+ local function checked(d)
+ local n = #d
+ if n == 1 then
+ local di = d[1]
+ local tg = di.tg
+ if tg == "ignore" then
+ -- todo: we can move ignore's data one level up
+ return 1
+ elseif di.content then
+ return 1
+ else
+ local dd = di.data
+ if #dd > 0 and checked(dd) > 0 then
+ return 1
+ else
+ return 0
+ end
+ end
+ else
+ local m = 0
+ for i=1,n do
+ local di = d[i]
+ local tg = di.tg
+ if tg == "ignore" then
+ -- skip
+ elseif di.content then
+ m = m + 1
+ d[m] = di
+ else
+ local dd = di.data
+ if #dd > 0 and checked(dd) > 0 then
+ m = m + 1
+ d[m] = di
+ end
+ end
+ end
+ if m < n then
+ for i=n,m+1,-1 do
+ d[i] = nil
+ end
+ end
+ return m
+ end
+ end
+
+ function checks.mrow(di)
+ -- local d = di.data
+ -- if d then
+ -- checked(d)
+ -- end
+ end
+
+ -- we can move more checks here
+
+ local function flatten(di)
+ local r = di.__p__
+ while r do
+ local d = r.data
+ local n = #d
+ if d and n > 1 then
+ n = checked(d)
+ end
+ local tg = r.tg
+ if n == 1 and (tg == "mtext" or tg == "mrow") then
+ r.skip = "comment" -- weird error
+ r = r.__p__
+ else
+ break
+ end
+ end
+ end
+
+ function checks.mtable(di)
+ flatten(di)
+ local d = di.data
+ for i=1,#d do
+ local d = d[i]
+ if d.tg == "mtr" then
+ local d = d.data
+ for i=1,#d do
+ local d = d[i]
+ if d.tg == "mtd" then
+ -- okay
+ elseif d.content then
+ d.content = ""
+ else
+ d.skip = "comment" -- weird error
+ end
+ end
+ elseif d.content then
+ d.content = ""
+ else
+ d.skip = "comment" -- weird error
+ end
+ end
+ end
+
+ do
+
+ local a, z, A, Z = 0x61, 0x7A, 0x41, 0x5A
+
+ function extras.mi(di,element,n,fulltag) -- check with content
+ local str = di.data[1].content
+ if str and sub(str,1,1) ~= "&" then -- hack but good enough (maybe gsub op eerste)
+ for v in utfvalues(str) do
+ if (v >= a and v <= z) or (v >= A and v <= Z) then
+ local a = di.attributes
+ if a then
+ a.mathvariant = "normal"
+ else
+ di.attributes = { mathvariant = "normal" }
+ end
+ end
+ end
+ end
+ end
+
+ end
+
+ function extras.msub(di,element,n,fulltag)
+ -- m$^2$
+ local data = di.data
+ if #data == 1 then
+ local d = data[1]
+ data[2] = d
+ d.__i__ = 2
+ data[1] = dummy_nucleus
+ end
+ end
+
+ extras.msup = extras.msub
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-ref.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-ref.lmt
new file mode 100644
index 00000000000..25682f8edfa
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-ref.lmt
@@ -0,0 +1,261 @@
+if not modules then modules = { } end modules ['back-exp-imp-ref'] = {
+ version = 1.001,
+ comment = "companion to back-exp.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- quite some code deals with exporting references --
+
+-- links:
+--
+-- url :
+-- file :
+-- internal : automatic location
+-- location : named reference
+
+-- references:
+--
+-- implicit : automatic reference
+-- explicit : named reference
+
+local tonumber = tonumber
+local lpegmatch = lpeg.match
+local insert = table.insert
+
+local references = structures.references
+
+local structurestags = structures.tags
+local specifications = structurestags.specifications
+local locatedtag = structurestags.locatedtag
+
+local backend = structurestags.backend
+
+local setattribute = backend.setattribute
+local extras = backend.extras
+local fixes = backend.fixes
+local referencehash = backend.referencehash
+local destinationhash = backend.destinationhash
+
+local implement = interfaces.implement
+
+local evaluators = { }
+local specials = { }
+local explicits = { }
+
+evaluators.inner = function(di,var)
+ local inner = var.inner
+ if inner then
+ setattribute(di,"location",inner,true)
+ end
+end
+
+evaluators.outer = function(di,var)
+ local file, url = references.checkedfileorurl(var.outer,var.outer)
+ if url then
+ setattribute(di,"url",url,true)
+ elseif file then
+ setattribute(di,"file",file,true)
+ end
+end
+
+evaluators["outer with inner"] = function(di,var)
+ local file = references.checkedfile(var.f)
+ if file then
+ setattribute(di,"file",file,true)
+ end
+ local inner = var.inner
+ if inner then
+ setattribute(di,"inner",inner,true)
+ end
+end
+
+evaluators.special = function(di,var)
+ local handler = specials[var.special]
+ if handler then
+ handler(di,var)
+ end
+end
+
+do
+
+ evaluators["special outer with operation"] = evaluators.special
+ evaluators["special operation"] = evaluators.special
+ evaluators["special operation with arguments"] = evaluators.special
+
+ function specials.url(di,var)
+ local url = references.checkedurl(var.operation)
+ if url and url ~= "" then
+ setattribute(di,"url",url,true)
+ end
+ end
+
+ function specials.file(di,var)
+ local file = references.checkedfile(var.operation)
+ if file and file ~= "" then
+ setattribute(di,"file",file,true)
+ end
+ end
+
+ function specials.fileorurl(di,var)
+ local file, url = references.checkedfileorurl(var.operation,var.operation)
+ if url and url ~= "" then
+ setattribute(di,"url",url,true)
+ elseif file and file ~= "" then
+ setattribute(di,"file",file,true)
+ end
+ end
+
+ function specials.internal(di,var)
+ local internal = references.checkedurl(var.operation)
+ if internal then
+ setattribute(di,"location",internal)
+ end
+ end
+
+ local function adddestination(di,references) -- todo: specials -> exporters and then concat
+ if references then
+ local reference = references.reference
+ if reference and reference ~= "" then
+ local prefix = references.prefix
+ if prefix and prefix ~= "" then
+ setattribute(di,"prefix",prefix,true)
+ end
+ setattribute(di,"destination",reference,true)
+ for i=1,#references do
+ local r = references[i]
+ local e = evaluators[r.kind]
+ if e then
+ e(di,r)
+ end
+ end
+ end
+ end
+ end
+
+ function extras.addimplicit(di,references)
+ if references then
+ local internal = references.internal
+ if internal then
+ setattribute(di,"implicit",internal)
+ end
+ end
+ end
+
+ function extras.addinternal(di,references)
+ if references then
+ local internal = references.internal
+ if internal then
+ setattribute(di,"internal",internal)
+ end
+ end
+ end
+
+ local p_firstpart = lpeg.Cs((1-lpeg.P(","))^0)
+
+ local function addreference(di,references)
+ if references then
+ local reference = references.reference
+ if reference and reference ~= "" then
+ local prefix = references.prefix
+ if prefix and prefix ~= "" then
+ setattribute(di,"prefix",prefix)
+ end
+ setattribute(di,"reference",reference,true)
+ setattribute(di,"explicit",lpegmatch(p_firstpart,reference),true)
+ end
+ local internal = references.internal
+ if internal and internal ~= "" then
+ setattribute(di,"implicit",internal)
+ end
+ end
+ end
+
+ local function link(di,element,n,fulltag)
+ -- for instance in lists a link has nested elements and no own text
+ local reference = referencehash[fulltag]
+ if reference then
+ adddestination(di,structures.references.get(reference))
+ return true
+ else
+ local data = di.data
+ if data then
+ for i=1,#data do
+ local di = data[i]
+ if di then
+ local fulltag = di.fulltag
+ if fulltag and link(di,element,n,fulltag) then
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+
+ local function reference(di,element,n,fulltag)
+ local destination = destinationhash[fulltag]
+ if destination then
+ local d = structures.references.internals[destination]
+ if d then
+ addreference(di,d.references)
+ return true
+ else
+ return false
+ end
+ else
+ local data = di.data
+ if data then
+ for i=1,#data do
+ local di = data[i]
+ if di then
+ local fulltag = di.fulltag
+ if fulltag and reference(di,element,n,fulltag) then
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+
+ extras.adddestination = adddestination
+ extras.addreference = addreference
+
+ extras.link = link
+ extras.reference = reference
+
+end
+
+do
+
+ function fixes.linenumber(di,data,i)
+ local ni = data[i+1]
+ if ni then
+ if ni.data then
+ while true do
+ local d = ni.data[1]
+ if d then
+ local e = d.element
+ if e then
+ if e == "line" or e == "verbatimline" then
+ insert(d.data,1,di)
+ data[i] = false
+ return
+ else
+ ni = d
+ end
+ else
+ return
+ end
+ else
+ return
+ end
+ end
+ end
+ end
+ end
+
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-tag.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-tag.lmt
new file mode 100644
index 00000000000..73b7b5b47e6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-exp-imp-tag.lmt
@@ -0,0 +1,846 @@
+if not modules then modules = { } end modules ['back-exp-imp-tag'] = {
+ version = 1.001,
+ comment = "companion to back-exp.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Because we run into the 200 locals limit we now split the file into smaller
+-- parts.
+
+local tonumber = tonumber
+local todimen = number.todimen
+local sortedhash, setmetatableindex, concat, insert = table.sortedhash, table.setmetatableindex, table.concat, table.insert
+local settings_to_hash = utilities.parsers.settings_to_hash
+local lpegmatch = lpeg.match
+local formatters = string.formatters
+
+local references = structures.references
+local structurestags = structures.tags
+local taglist = structurestags.taglist
+local specifications = structurestags.specifications
+local properties = structurestags.properties
+local locatedtag = structurestags.locatedtag
+
+local backend = structurestags.backend
+
+local setattribute = backend.setattribute
+local extras = backend.extras
+local checks = backend.checks
+local fixes = backend.fixes
+local listdata = backend.listdata
+local finalizers = backend.finalizers
+local usedstyles = backend.usedstyles -- for now
+local usedimages = backend.usedimages -- for now
+local referencehash = backend.referencehash
+local destinationhash = backend.destinationhash
+
+local implement = interfaces.implement
+
+do
+
+ local itemgroups = { }
+
+ local function setitemgroup(packed,level,symbol)
+ itemgroups[locatedtag("itemgroup")] = {
+ packed = packed,
+ symbol = symbol,
+ level = level,
+ }
+ end
+
+ local function setitem(kind)
+ itemgroups[locatedtag("item")] = {
+ kind = kind,
+ }
+ end
+
+ function extras.itemgroup(di,element,n,fulltag)
+ local hash = itemgroups[fulltag]
+ if hash then
+ setattribute(di,"packed",hash.packed and "yes" or nil)
+ setattribute(di,"symbol",hash.symbol)
+ setattribute(di,"level",hash.level)
+ end
+ end
+
+ function extras.item(di,element,n,fulltag)
+ local hash = itemgroups[fulltag]
+ if hash then
+ local kind = hash.kind
+ if kind and kind ~= "" then
+ setattribute(di,"kind",kind)
+ end
+ end
+ end
+
+ implement {
+ name = "settagitemgroup",
+ actions = setitemgroup,
+ arguments = { "boolean", "integer", "string" }
+ }
+
+ implement {
+ name = "settagitem",
+ actions = setitem,
+ arguments = "string"
+ }
+
+ structurestags.setitemgroup = setitemgroup
+ structurestags.setitem = setitem
+
+end
+
+do
+
+ local registered = structures.sections.registered
+
+ local function resolve(di,element,n,fulltag)
+ local data = listdata[fulltag]
+ if data then
+ extras.addreference(di,data.references)
+ return true
+ else
+ local data = di.data
+ if data then
+ for i=1,#data do
+ local di = data[i]
+ if di then
+ local ft = di.fulltag
+ if ft and resolve(di,element,n,ft) then
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+
+ function extras.section(di,element,n,fulltag)
+ local r = registered[specifications[fulltag].detail]
+ if r then
+ setattribute(di,"level",r.level)
+ end
+ resolve(di,element,n,fulltag)
+ end
+
+ local floats = { }
+
+ local function setfloat(options,method)
+ floats[locatedtag("float")] = {
+ options = options,
+ method = method,
+ }
+ end
+
+ function extras.float(di,element,n,fulltag)
+ local hash = floats[fulltag]
+ if hash then
+ local method = hash.method
+ if not method or method == "" then
+ method = "here"
+ end
+ setattribute(di,"method",method)
+ local options = hash.options
+ if options and options ~= "" then
+ options = settings_to_hash(options)
+ options[method] = nil
+ options = concat(sortedkeys(options),",")
+ if #options > 0 then
+ setattribute(di,"options",options)
+ end
+ end
+ end
+ resolve(di,element,n,fulltag)
+ end
+
+ implement {
+ name = "settagfloat",
+ actions = setfloat,
+ arguments = "2 strings",
+ }
+
+ structurestags.setfloat = setfloat
+
+end
+
+do
+
+ local registered = { }
+
+ local function setformulacontent(n)
+ registered[locatedtag("formulacontent")] = {
+ n = n,
+ }
+ end
+
+ function extras.formulacontent(di,element,n,fulltag)
+ local r = registered[fulltag]
+ if r then
+ setattribute(di,"n",r.n)
+ end
+ end
+
+ implement {
+ name = "settagformulacontent",
+ actions = setformulacontent,
+ arguments = "integer",
+ }
+
+ structurestags.setformulacontent = setformulacontent
+
+end
+
+do
+
+ local symbols = { }
+
+ local function settagdelimitedsymbol(symbol)
+ symbols[locatedtag("delimitedsymbol")] = {
+ symbol = symbol,
+ }
+ end
+
+ function extras.delimitedsymbol(di,element,n,fulltag)
+ local hash = symbols[fulltag]
+ if hash then
+ setattribute(di,"symbol",hash.symbol or nil)
+ end
+ end
+
+ implement {
+ name = "settagdelimitedsymbol",
+ actions = settagdelimitedsymbol,
+ arguments = "string"
+ }
+
+ structurestags.settagdelimitedsymbol = settagdelimitedsymbol
+
+end
+
+
+do
+
+ local symbols = { }
+
+ local function settagsubsentencesymbol(symbol)
+ symbols[locatedtag("subsentencesymbol")] = {
+ symbol = symbol,
+ }
+ end
+
+ function extras.subsentencesymbol(di,element,n,fulltag)
+ local hash = symbols[fulltag]
+ if hash then
+ setattribute(di,"symbol",hash.symbol or nil)
+ end
+ end
+
+ implement {
+ name = "settagsubsentencesymbol",
+ actions = settagsubsentencesymbol,
+ arguments = "string"
+ }
+
+ structurestags.settagsubsentencesymbol = settagsubsentencesymbol
+
+end
+
+do
+
+ local synonyms = { }
+ local sortings = { }
+
+ local function setsynonym(tag)
+ synonyms[locatedtag("synonym")] = tag
+ end
+
+ function extras.synonym(di,element,n,fulltag)
+ local tag = synonyms[fulltag]
+ if tag then
+ setattribute(di,"tag",tag)
+ end
+ end
+
+ local function setsorting(tag)
+ sortings[locatedtag("sorting")] = tag
+ end
+
+ function extras.sorting(di,element,n,fulltag)
+ local tag = sortings[fulltag]
+ if tag then
+ setattribute(di,"tag",tag)
+ end
+ end
+
+ implement {
+ name = "settagsynonym",
+ actions = setsynonym,
+ arguments = "string"
+ }
+
+ implement {
+ name = "settagsorting",
+ actions = setsorting,
+ arguments = "string"
+ }
+
+ structurestags.setsynonym = setsynonym
+ structurestags.setsorting = setsorting
+
+end
+
+do
+
+ local descriptions = { }
+ local symbols = { }
+ local linked = { }
+
+ -- we could move the notation itself to the first reference (can be an option)
+
+ local function setnotation(tag,n) -- needs checking (is tag needed)
+ -- we can also use the internals hash or list
+ local nd = structures.notes.get(tag,n)
+ if nd then
+ local references = nd.references
+ descriptions[references and references.internal] = locatedtag("description")
+ end
+ end
+
+ local function setnotationsymbol(tag,n) -- needs checking (is tag needed)
+ local nd = structures.notes.get(tag,n) -- todo: use listdata instead
+ if nd then
+ local references = nd.references
+ symbols[references and references.internal] = locatedtag("descriptionsymbol")
+ end
+ end
+
+ function finalizers.descriptions(tree)
+ local n = 0
+ for id, tag in sortedhash(descriptions) do
+ local sym = symbols[id]
+ if sym then
+ n = n + 1
+ linked[tag] = n
+ linked[sym] = n
+ end
+ end
+ end
+
+ function extras.description(di,element,n,fulltag)
+ local id = linked[fulltag]
+ if id then
+ setattribute(di,"insert",id)
+ end
+ end
+
+ function extras.descriptionsymbol(di,element,n,fulltag)
+ local id = linked[fulltag]
+ if id then
+ setattribute(di,"insert",id)
+ end
+ end
+
+ implement {
+ name = "settagnotation",
+ actions = setnotation,
+ arguments = { "string", "integer" }
+ }
+
+ implement {
+ name = "settagnotationsymbol",
+ actions = setnotationsymbol,
+ arguments = { "string", "integer" }
+ }
+
+ structurestags.setnotation = setnotation
+ structurestags.setnotationsymbol = setnotationsymbol
+
+end
+
+
+do
+
+ local strippedtag = structurestags.strip -- we assume global styles
+
+ local highlight = { }
+ local construct = { }
+
+ usedstyles.highlight = highlight
+ usedstyles.construct = construct
+
+ local function sethighlight(name,style,color,mode)
+ if not highlight[name] then
+ highlight[name] = {
+ style = style,
+ color = color,
+ mode = mode == 1 and "display" or nil,
+ }
+ end
+ end
+
+ local function setconstruct(name,style,color,mode)
+ if not construct[name] then
+ construct[name] = {
+ style = style,
+ color = color,
+ mode = mode == 1 and "display" or nil,
+ }
+ end
+ end
+
+ implement {
+ name = "settagconstruct",
+ actions = setconstruct,
+ arguments = { "string", "string", "integer", "integer" }
+ }
+
+ implement {
+ name = "settaghighlight",
+ actions = sethighlight,
+ arguments = { "string", "string", "integer", "integer" }
+ }
+
+ structurestags.sethighlight = sethighlight
+ structurestags.setconstruct = setconstruct
+
+end
+
+do
+
+ local f_id = formatters["%s-%s"]
+ local image = { }
+ usedimages.image = image
+
+ structurestags.usewithcare.images = image
+
+ local function setfigure(name,used,page,width,height,label)
+ local fulltag = locatedtag("image")
+ local spec = specifications[fulltag]
+ if spec then
+ local page = tonumber(page)
+ image[fulltag] = {
+ id = f_id(spec.tagname,spec.tagindex),
+ name = name,
+ used = used,
+ page = page and page > 1 and page or nil,
+ width = todimen(width, "cm","%0.3F%s"),
+ height = todimen(height,"cm","%0.3F%s"),
+ label = label,
+ }
+ else
+ -- we ignore images in layers in the background / pagebody
+ end
+ end
+
+ function extras.image(di,element,n,fulltag)
+ local data = image[fulltag]
+ if data then
+ setattribute(di,"name",data.name)
+ setattribute(di,"page",data.page)
+ setattribute(di,"id",data.id)
+ setattribute(di,"width",data.width)
+ setattribute(di,"height",data.height)
+ setattribute(di,"label",data.height)
+ end
+ end
+
+ implement {
+ name = "settagfigure",
+ actions = setfigure,
+ arguments = { "string", "string", "string", "dimen", "dimen", "string" }
+ }
+
+ structurestags.setfigure = setfigure
+
+end
+
+do
+
+ local combinations = { }
+
+ local function setcombination(nx,ny)
+ combinations[locatedtag("combination")] = {
+ nx = nx,
+ ny = ny,
+ }
+ end
+
+ function extras.combination(di,element,n,fulltag)
+ local data = combinations[fulltag]
+ if data then
+ setattribute(di,"nx",data.nx)
+ setattribute(di,"ny",data.ny)
+ end
+ end
+
+ implement {
+ name = "settagcombination",
+ actions = setcombination,
+ arguments = { "integer", "integer" }
+ }
+
+ structurestags.setcombination = setcombination
+
+end
+
+do
+
+ local function hascontent(data)
+ for i=1,#data do
+ local di = data[i]
+ if not di or di.tg == "ignore" then
+ --
+ else
+ local content = di.content
+ if content == " " then
+ --
+ elseif content then
+ return true
+ else
+ local d = di.data
+ if d and #d > 0 and hascontent(d) then
+ return true
+ end
+ end
+ end
+ end
+ end
+
+ local tabledata = { }
+
+ local function settablecell(rows,columns,align)
+ if align > 0 or rows > 1 or columns > 1 then -- or kind > 0
+ tabledata[locatedtag("tablecell")] = {
+ rows = rows,
+ columns = columns,
+ align = align,
+ }
+ end
+ end
+
+ local function gettablecell(fulltag)
+ return tabledata[fulltag]
+ end
+
+ function extras.tablecell(di,element,n,fulltag)
+ local hash = tabledata[fulltag]
+ if hash then
+ local columns = hash.columns
+ if columns and columns > 1 then
+ setattribute(di,"columns",columns)
+ end
+ local rows = hash.rows
+ if rows and rows > 1 then
+ setattribute(di,"rows",rows)
+ end
+ local align = hash.align
+ if not align or align == 0 then
+ -- normal
+ elseif align == 1 then -- use numbertoalign here
+ setattribute(di,"align","flushright")
+ elseif align == 2 then
+ setattribute(di,"align","middle")
+ elseif align == 3 then
+ setattribute(di,"align","flushleft")
+ end
+ end
+ end
+
+ local tabulatedata = { }
+
+ local function settabulatecell(align,kind)
+ if align > 0 or kind > 0 then
+ tabulatedata[locatedtag("tabulatecell")] = {
+ align = align,
+ kind = kind, -- 1 = bold head
+ }
+ end
+ end
+
+ local function gettabulatecell(fulltag)
+ return tabulatedata[fulltag]
+ end
+
+ function extras.tabulate(di,element,n,fulltag)
+ local data = di.data
+ for i=1,#data do
+ local di = data[i]
+ if di.tg == "tabulaterow" and not hascontent(di.data) then
+ di.element = "" -- or simply remove
+ end
+ end
+ end
+
+ function extras.tabulatecell(di,element,n,fulltag)
+ local hash = tabulatedata[fulltag]
+ if hash then
+ local align = hash.align
+ if not align or align == 0 then
+ -- normal
+ elseif align == 1 then
+ setattribute(di,"align","flushleft")
+ elseif align == 2 then
+ setattribute(di,"align","flushright")
+ elseif align == 3 then
+ setattribute(di,"align","middle")
+ end
+ local kind = hash.kind
+ if kind == 1 then
+ setattribute(di,"kind","strong")
+ elseif kind == 2 then
+ setattribute(di,"kind","equals")
+ end
+ end
+ end
+
+ implement {
+ name = "settagtablecell",
+ actions = settablecell,
+ arguments = { "integer", "integer", "integer" }
+ }
+
+ implement {
+ name = "settagtabulatecell",
+ actions = settabulatecell,
+ arguments = { "integer", "integer" },
+ }
+
+ structurestags.settablecell = settablecell
+ structurestags.gettablecell = gettablecell
+ structurestags.settabulatecell = settabulatecell
+ structurestags.gettabulatecell = gettabulatecell
+
+end
+
+do
+
+ -- todo: internal is already hashed
+
+ local p_stripper = lpeg.patterns.stripper
+
+ local function setregister(tag,n) -- check if tag is needed
+ local data = structures.registers.get(tag,n)
+ if data then
+ referencehash[locatedtag("registerlocation")] = data
+ end
+ end
+
+ function extras.registerlocation(di,element,n,fulltag)
+ local data = referencehash[fulltag]
+ if type(data) == "table" then
+ extras.addinternal(di,data.references)
+ return true
+ else
+ -- needs checking, probably bookmarks
+ end
+ end
+
+ function extras.registerpages(di,element,n,fulltag) -- ignorebreaks
+ local data = di.data
+ for i=1,#data do
+ local d = data[i]
+ if d.content == " " then
+ d.content = ""
+ end
+ end
+ end
+
+ function extras.registerseparator(di,element,n,fulltag) -- ignorespaces
+ local data = di.data
+ for i=1,#data do
+ local d = data[i]
+ local c = d.content
+ if type(c) == "string" then
+ d.content = lpegmatch(p_stripper,c)
+ end
+ end
+ end
+
+ implement {
+ name = "settagregister",
+ actions = setregister,
+ arguments = { "string", "integer" }
+ }
+
+ structurestags.setregister = setregister
+
+end
+
+do
+
+ -- todo: internal is already hashed
+
+ local function setlist(n)
+ local data = structures.lists.getresult(n)
+ if data then
+ referencehash[locatedtag("listitem")] = data
+ end
+ end
+
+ function extras.listitem(di,element,n,fulltag)
+ local data = referencehash[fulltag]
+ if data then
+ extras.addinternal(di,data.references)
+ return true
+ end
+ end
+
+ implement {
+ name = "settaglist",
+ actions = setlist,
+ arguments = "integer"
+ }
+
+ structurestags.setlist = setlist
+
+end
+
+do
+
+ local usedpublications = { }
+ local tagsindatasets = setmetatableindex("table")
+ local serialize = false
+
+ local function setpublication(dataset,tag,rendering)
+ usedpublications[locatedtag("publication")] = {
+ dataset = dataset,
+ tag = tag,
+ rendering = rendering
+ }
+ tagsindatasets[dataset][tag] = true
+ if not serialize then
+ structures.tags.registerextradata("btx",function()
+ local t = { "<btxdata>"}
+ for dataset, used in sortedhash(tagsindatasets) do
+ t[#t+1] = publications.converttoxml(dataset,true,false,true,false,true,true)
+ end
+ t[#t+1] = "</btxdata>"
+ return concat(t,"\n")
+ end)
+ end
+ end
+
+ function extras.publication(di,element,n,fulltag)
+ local hash = usedpublications[fulltag]
+ if hash then
+ setattribute(di,"dataset",hash.dataset)
+ setattribute(di,"tag",hash.tag)
+ end
+ end
+
+ implement {
+ name = "settagpublication",
+ actions = setpublication,
+ arguments = "2 strings"
+ }
+
+ structurestags.setpublication = setpublication
+
+end
+
+do
+
+ local usedparagraphs = { }
+
+ local function setparagraph(align)
+ if align ~= "" then
+ usedparagraphs[locatedtag("paragraph")] = {
+ align = align,
+ }
+ end
+ end
+
+ function extras.paragraph(di,element,n,fulltag)
+ local hash = usedparagraphs[fulltag]
+ if hash then
+ setattribute(di,"align",hash.align)
+ end
+ end
+
+ implement {
+ name = "settagparagraph",
+ actions = setparagraph,
+ arguments = "string"
+ }
+
+ structurestags.setparagraph = setparagraph
+
+end
+
+do
+
+ local marginanchors = { }
+ local margincontent = { }
+
+ function checks.margintext(di)
+ local i = marginanchors[di.fulltag]
+ margincontent[i] = di
+ end
+
+ function checks.marginanchor(di)
+ local i = marginanchors[di.fulltag]
+ local d = margincontent[i]
+ --
+ di.attribute = d.attribute
+ di.data = d.data
+ di.detail = d.detail
+ di.element = d.element
+ di.fulltag = d.fulltag
+ di.nature = d.nature
+ di.samepar = true
+ di.tg = d.tg
+ --
+ d.skip = "ignore"
+ end
+
+ implement {
+ name = "settagmargintext",
+ arguments = "integer",
+ actions = function(n)
+ marginanchors[locatedtag("margintext")] = n
+ end
+ }
+
+ implement {
+ name = "settagmarginanchor",
+ arguments = "integer",
+ actions = function(n)
+ marginanchors[locatedtag("marginanchor")] = n
+ end
+ }
+
+end
+
+do
+
+ function fixes.linenumber(di,data,i)
+ local ni = data[i+1]
+ if ni then
+ if ni.data then
+ while true do
+ local d = ni.data[1]
+ if d then
+ local e = d.element
+ if e then
+ if e == "line" or e == "verbatimline" then
+ insert(d.data,1,di)
+ data[i] = false
+ return
+ else
+ ni = d
+ end
+ else
+ return
+ end
+ else
+ return
+ end
+ end
+ end
+ end
+ end
+
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-exp.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-exp.lmt
new file mode 100644
index 00000000000..1375d2655c2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-exp.lmt
@@ -0,0 +1,2719 @@
+if not modules then modules = { } end modules ['back-exp'] = {
+ version = 1.001,
+ comment = "companion to back-exp.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Todo: share properties more with tagged pdf (or thge reverse)
+
+-- Because we run into the 200 local limit we quite some do .. end wrappers .. not always
+-- that nice but it has to be.
+
+-- Experiments demonstrated that mapping to <div> and classes is messy because we have to
+-- package attributes (some 30) into one set of (space seperatated but prefixed classes)
+-- which only makes things worse .. so if you want something else, use xslt to get there.
+
+-- language -> only mainlanguage, local languages should happen through start/stoplanguage
+-- tocs/registers -> maybe add a stripper (i.e. just don't flush entries in final tree)
+-- footnotes -> css 3
+-- bodyfont -> in styles.css
+
+-- Because we need to look ahead we now always build a tree (this was optional in
+-- the beginning). The extra overhead in the frontend is neglectable.
+--
+-- We can optimize the code ... currently the overhead is some 10% for xml + html so
+-- there is no hurry.
+
+-- todo: move critital formatters out of functions
+-- todo: delay loading (apart from basic tag stuff)
+
+-- problem : too many local variables
+
+-- check setting __i__
+
+local next, type, tonumber = next, type, tonumber
+local sub, gsub, match = string.sub, string.gsub, string.match
+local validstring = string.valid
+local lpegmatch = lpeg.match
+local utfchar, utfvalues, utflen = utf.char, utf.values, utf.len
+local concat, merge, sort, setmetatableindex = table.concat, table.merge, table.sort, table.setmetatableindex
+local sortedhash, sortedkeys = table.sortedhash, table.sortedkeys
+local formatters = string.formatters
+local todimen = number.todimen
+local replacetemplate = utilities.templates.replace
+local settings_to_array = utilities.parsers.settings_to_array
+
+local addsuffix, joinfile, nameonly, basename, filesuffix = file.addsuffix, file.join, file.nameonly, file.basename, file.suffix
+
+local trace_export = false trackers.register ("export.trace", function(v) trace_export = v end)
+local trace_spacing = false trackers.register ("export.trace.spacing", function(v) trace_spacing = v end)
+local trace_details = false trackers.register ("export.trace.details", function(v) trace_details = v end)
+
+local less_state = false directives.register("export.lessstate", function(v) less_state = v end)
+local show_comment = true directives.register("export.comment", function(v) show_comment = v end)
+
+-- maybe we will also support these:
+--
+-- local css_hyphens = false directives.register("export.css.hyphens", function(v) css_hyphens = v end)
+-- local css_textalign = false directives.register("export.css.textalign", function(v) css_textalign = v end)
+-- local css_bodyfontsize = false directives.register("export.css.bodyfontsize", function(v) css_bodyfontsize = v end)
+-- local css_textwidth = false directives.register("export.css.textwidth", function(v) css_textwidth = v end)
+
+local report_export = logs.reporter("backend","export")
+
+local nodes = nodes
+local attributes = attributes
+
+local variables = interfaces.variables
+local v_yes = variables.yes
+local v_no = variables.no
+local v_xml = variables.xml
+local v_hidden = variables.hidden
+
+local implement = interfaces.implement
+
+local included = backends.included
+
+local tasks = nodes.tasks
+local fontchar = fonts.hashes.characters
+local fontquads = fonts.hashes.quads
+local languagenames = languages.numbers
+
+local texgetcount = tex.getcount
+
+local references = structures.references
+local structurestags = structures.tags
+local taglist = structurestags.taglist
+local specifications = structurestags.specifications
+local properties = structurestags.properties
+local locatedtag = structurestags.locatedtag
+
+structurestags.usewithcare = { }
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local characterdata = characters.data
+local overloads = fonts.mappings.overloads
+
+-- todo: more locals (and optimize)
+
+local exportversion = "0.35"
+local mathmlns = "http://www.w3.org/1998/Math/MathML"
+local contextns = "http://www.contextgarden.net/context/export" -- whatever suits
+local cssnamespaceurl = "@namespace context url('%namespace%') ;"
+local cssnamespace = "context|"
+----- cssnamespacenop = "/* no namespace */"
+
+local usecssnamespace = false
+
+local nofcurrentcontent = 0 -- so we don't free (less garbage collection)
+local currentcontent = { }
+local currentnesting = nil
+local currentattribute = nil
+local last = nil
+local currentparagraph = nil
+
+local noftextblocks = 0
+
+----- hyphencode = 0xAD
+local hyphen = utfchar(0xAD) -- todo: also emdash etc
+local tagsplitter = structurestags.patterns.splitter
+----- colonsplitter = lpeg.splitat(":")
+----- dashsplitter = lpeg.splitat("-")
+local threshold = 65536
+local indexing = false
+local keephyphens = false
+local exportproperties = false
+
+local finetuning = { }
+
+local treestack = { }
+local nesting = { }
+local currentdepth = 0
+
+local wrapups = { }
+
+local tree = { data = { }, fulltag == "root" } -- root
+local treeroot = tree
+local treehash = { }
+local extras = { }
+local checks = { }
+local fixes = { }
+local finalizers = { }
+local nofbreaks = 0
+local used = { }
+local exporting = false
+local restart = false
+local specialspaces = { [0x20] = " " } -- for conversion
+local somespace = { [0x20] = true, [" "] = true } -- for testing
+local entities = { ["&"] = "&amp;", [">"] = "&gt;", ["<"] = "&lt;" }
+local attribentities = { ["&"] = "&amp;", [">"] = "&gt;", ["<"] = "&lt;", ['"'] = "quot;" }
+
+local p_entity = lpeg.replacer(entities) -- was: entityremapper = utf.remapper(entities)
+local p_attribute = lpeg.replacer(attribentities)
+local p_escaped = lpeg.patterns.xml.escaped
+
+local f_tagid = formatters["%s-%04i"]
+
+-- local alignmapping = {
+-- flushright = "right",
+-- middle = "center",
+-- flushleft = "left",
+-- }
+
+local defaultnature = "mixed" -- "inline"
+
+setmetatableindex(used, function(t,k)
+ if k then
+ local v = { }
+ t[k] = v
+ return v
+ end
+end)
+
+local f_entity = formatters["&#x%X;"]
+local f_attribute = formatters[" %s=%q"]
+local f_property = formatters[" %s%s=%q"]
+
+setmetatableindex(specialspaces, function(t,k)
+ local v = utfchar(k)
+ t[k] = v
+ entities[v] = f_entity(k)
+ somespace[k] = true
+ somespace[v] = true
+ return v
+end)
+
+
+local namespaced = {
+ -- filled on
+}
+
+local namespaces = {
+ msubsup = "m",
+ msub = "m",
+ msup = "m",
+ mn = "m",
+ mi = "m",
+ ms = "m",
+ mo = "m",
+ mtext = "m",
+ mrow = "m",
+ mfrac = "m",
+ mroot = "m",
+ msqrt = "m",
+ munderover = "m",
+ munder = "m",
+ mover = "m",
+ merror = "m",
+ math = "m",
+ mrow = "m",
+ mtable = "m",
+ mtr = "m",
+ mtd = "m",
+ mfenced = "m",
+ maction = "m",
+ mspace = "m",
+ -- only when testing
+ mstacker = "m",
+ mstackertop = "m",
+ mstackermid = "m",
+ mstackerbot = "m",
+}
+
+setmetatableindex(namespaced, function(t,k)
+ if k then
+ local namespace = namespaces[k]
+ local v = namespace and namespace .. ":" .. k or k
+ t[k] = v
+ return v
+ end
+end)
+
+local function attribute(key,value)
+ if value and value ~= "" then
+ return f_attribute(key,lpegmatch(p_attribute,value))
+ else
+ return ""
+ end
+end
+
+local function setattribute(di,key,value,escaped)
+ if value and value ~= "" then
+ local a = di.attributes
+ if escaped then
+ value = lpegmatch(p_escaped,value)
+ end
+ if not a then
+ di.attributes = { [key] = value }
+ else
+ a[key] = value
+ end
+ end
+end
+
+local listdata = { } -- this has to be done otherwise: each element can just point back to ...
+
+function wrapups.hashlistdata()
+ local c = structures.lists.collected
+ for i=1,#c do
+ local ci = c[i]
+ local tag = ci.references.tag
+ if tag then
+ local m = ci.metadata
+ local t = m.kind .. ">" .. tag -- todo: use internal (see strc-lst.lua where it's set)
+ listdata[t] = ci
+ end
+ end
+end
+
+function structurestags.setattributehash(attr,key,value) -- public hash
+ local specification = taglist[attr]
+ if specification then
+ specification[key] = value
+ else
+ -- some kind of error
+ end
+end
+
+local usedstyles = { }
+local usedimages = { }
+local referencehash = { } -- move ?
+local destinationhash = { } -- move ?
+
+structurestags.backend = {
+ setattribute = setattribute,
+ extras = extras,
+ checks = checks,
+ fixes = fixes,
+ listdata = listdata,
+ finalizers = finalizers,
+ usedstyles = usedstyles,
+ usedimages = usedimages,
+ referencehash = referencehash,
+ destinationhash = destinationhash,
+}
+
+local namespacetemplate = [[
+/* %what% for file %filename% */
+
+%cssnamespaceurl%
+]]
+
+do
+
+ -- experiment: styles and images
+ --
+ -- officially we should convert to bp but we round anyway
+
+ -- /* padding : ; */
+ -- /* text-justify : inter-word ; */
+ -- /* text-align : justify ; */
+
+local documenttemplate = [[
+document,
+%namespace%div.document {
+ font-size : %size% !important ;
+ max-width : %width% !important ;
+ text-align : %align% !important ;
+ hyphens : %hyphens% !important ;
+}]]
+
+local styletemplate = [[
+%element%[detail="%detail%"],
+%namespace%div.%element%.%detail% {
+ display : inline ;
+ font-style : %style% ;
+ font-variant : %variant% ;
+ font-weight : %weight% ;
+ font-family : %family% ;
+ color : %color% ;
+}]]
+
+ local numbertoallign = {
+ [0] = "justify", ["0"] = "justify", [variables.normal ] = "justify",
+ [1] = "right", ["1"] = "right", [variables.flushright] = "right",
+ [2] = "center", ["2"] = "center", [variables.middle ] = "center",
+ [3] = "left", ["3"] = "left", [variables.flushleft ] = "left",
+ }
+
+ function wrapups.allusedstyles(filename)
+ local result = { replacetemplate(namespacetemplate, {
+ what = "styles",
+ filename = filename,
+ namespace = contextns,
+ -- cssnamespaceurl = usecssnamespace and cssnamespaceurl or cssnamespacenop,
+ cssnamespaceurl = cssnamespaceurl,
+ },false,true) }
+ --
+ local bodyfont = finetuning.bodyfont
+ local width = finetuning.width
+ local hyphen = finetuning.hyphen
+ local align = finetuning.align
+ --
+ if type(bodyfont) == "number" then
+ bodyfont = todimen(bodyfont)
+ else
+ bodyfont = "12pt"
+ end
+ if type(width) == "number" then
+ width = todimen(width) or "50em"
+ else
+ width = "50em"
+ end
+ if hyphen == v_yes then
+ hyphen = "manual"
+ else
+ hyphen = "inherited"
+ end
+ if align then
+ align = numbertoallign[align]
+ end
+ if not align then
+ align = hyphen and "justify" or "inherited"
+ end
+ --
+ result[#result+1] = replacetemplate(documenttemplate,{
+ size = bodyfont,
+ width = width,
+ align = align,
+ hyphens = hyphen
+ })
+ --
+ local colorspecification = xml.css.colorspecification
+ local fontspecification = xml.css.fontspecification
+ for element, details in sortedhash(usedstyles) do
+ for detail, data in sortedhash(details) do
+ local s = fontspecification(data.style)
+ local c = colorspecification(data.color)
+ detail = gsub(detail,"[^A-Za-z0-9]+","-")
+ result[#result+1] = replacetemplate(styletemplate,{
+ namespace = usecssnamespace and cssnamespace or "",
+ element = element,
+ detail = detail,
+ style = s.style or "inherit",
+ variant = s.variant or "inherit",
+ weight = s.weight or "inherit",
+ family = s.family or "inherit",
+ color = c or "inherit",
+ display = s.display and "block" or nil,
+ })
+ end
+ end
+ return concat(result,"\n\n")
+ end
+
+end
+
+do
+
+local imagetemplate = [[
+%element%[id="%id%"], %namespace%div.%element%[id="%id%"] {
+ display : block ;
+ background-image : url('%url%') ;
+ background-size : 100%% auto ;
+ background-repeat : no-repeat ;
+ width : %width% ;
+ height : %height% ;
+}]]
+
+ local f_svgname = formatters["%s.svg"]
+ local f_svgpage = formatters["%s-page-%s.svg"]
+ local collected = { }
+
+ local function usedname(name,page)
+ if filesuffix(name) == "pdf" then
+ -- temp hack .. we will have a remapper
+ if page and page > 1 then
+ name = f_svgpage(nameonly(name),page)
+ else
+ name = f_svgname(nameonly(name))
+ end
+ end
+ local scheme = url.hasscheme(name)
+ if not scheme or scheme == "file" then
+ -- or can we just use the name ?
+ return joinfile("../images",basename(url.filename(name)))
+ else
+ return name
+ end
+ end
+
+ function wrapups.allusedimages(filename)
+ local result = { replacetemplate(namespacetemplate, {
+ what = "images",
+ filename = filename,
+ namespace = contextns,
+ -- cssnamespaceurl = usecssnamespace and cssnamespaceurl or "",
+ cssnamespaceurl = cssnamespaceurl,
+ },false,true) }
+ for element, details in sortedhash(usedimages) do
+ for detail, data in sortedhash(details) do
+ local name = data.name
+ local page = tonumber(data.page) or 1
+ local spec = {
+ element = element,
+ id = data.id,
+ name = name,
+ page = page,
+ url = usedname(name,page),
+ width = data.width,
+ height = data.height,
+ used = data.used,
+ namespace = usecssnamespace and cssnamespace or "",
+ }
+ result[#result+1] = replacetemplate(imagetemplate,spec)
+ collected[detail] = spec
+ end
+ end
+ return concat(result,"\n\n")
+ end
+
+ function wrapups.uniqueusedimages() -- todo: combine these two
+ return collected
+ end
+
+end
+
+--
+
+properties.vspace = { export = "break", nature = "display" }
+----------------- = { export = "pagebreak", nature = "display" }
+
+local function makebreaklist(list)
+ nofbreaks = nofbreaks + 1
+ local t = { }
+ local l = list and list.taglist
+ if l then
+ for i=1,#list do
+ t[i] = l[i]
+ end
+ end
+ t[#t+1] = "break>" .. nofbreaks -- maybe no number or 0
+ return { taglist = t }
+end
+
+local breakattributes = {
+ type = "collapse"
+}
+
+local function makebreaknode(attributes) -- maybe no fulltag
+ nofbreaks = nofbreaks + 1
+ return {
+ tg = "break",
+ fulltag = "break>" .. nofbreaks,
+ n = nofbreaks,
+ element = "break",
+ nature = "display",
+ attributes = attributes or nil,
+ -- data = { }, -- not needed
+ -- attribute = 0, -- not needed
+ -- parnumber = 0,
+ }
+end
+
+do
+
+ local fields = { "title", "subtitle", "author", "keywords", "url", "version" }
+
+ local ignoredelements = false
+
+ local function checkdocument(root)
+ local data = root.data
+ if data then
+ for i=1,#data do
+ local di = data[i]
+ local tg = di.tg
+ if tg == "noexport" then
+ local s = specifications[di.fulltag]
+ local u = s and s.userdata
+ if u then
+ local comment = u.comment
+ if comment then
+ di.element = "comment"
+ di.data = { { content = comment } }
+ u.comment = nil
+ else
+ data[i] = false
+ end
+ else
+ data[i] = false
+ end
+ elseif di.content then
+ -- okay
+ elseif tg == "ignore" then
+ di.element = ""
+ checkdocument(di)
+ elseif ignoredelements and ignoredelements[tg] then
+ di.element = ""
+ checkdocument(di)
+ else
+ checkdocument(di) -- new, else no noexport handling
+ end
+ end
+ end
+ end
+
+ function extras.document(di,element,n,fulltag)
+ setattribute(di,"language",languagenames[texgetcount("mainlanguagenumber")])
+ if not less_state then
+ setattribute(di,"file",tex.jobname)
+ if included.date then
+ setattribute(di,"date",os.fulltime())
+ end
+ setattribute(di,"context",environment.version)
+ setattribute(di,"version",exportversion)
+ setattribute(di,"xmlns:m",mathmlns)
+ local identity = interactions.general.getidentity()
+ for i=1,#fields do
+ local key = fields[i]
+ local value = identity[key]
+ if value and value ~= "" then
+ setattribute(di,key,value)
+ end
+ end
+ end
+ checkdocument(di)
+ end
+
+ implement {
+ name = "ignoretagsinexport",
+ arguments = "string",
+ actions = function(list)
+ for tag in string.gmatch(list,"[a-z]+") do
+ if ignoredelements then
+ ignoredelements[tag] = true
+ else
+ ignoredelements = { [tag] = true }
+ end
+ end
+ end,
+ }
+
+end
+
+-- flusher
+
+do
+
+ local f_detail = formatters[' detail="%s"']
+ local f_chain = formatters[' chain="%s"']
+ local f_index = formatters[' n="%s"']
+ local f_spacing = formatters['<c p="%s">%s</c>']
+
+ local f_empty_inline = formatters["<%s/>"]
+ local f_empty_mixed = formatters["%w<%s/>\n"]
+ local f_empty_display = formatters["\n%w<%s/>\n"]
+ local f_empty_inline_attr = formatters["<%s%s/>"]
+ local f_empty_mixed_attr = formatters["%w<%s%s/>"]
+ local f_empty_display_attr = formatters["\n%w<%s%s/>\n"]
+
+ local f_begin_inline = formatters["<%s>"]
+ local f_begin_mixed = formatters["%w<%s>"]
+ local f_begin_display = formatters["\n%w<%s>\n"]
+ local f_begin_inline_attr = formatters["<%s%s>"]
+ local f_begin_mixed_attr = formatters["%w<%s%s>"]
+ local f_begin_display_attr = formatters["\n%w<%s%s>\n"]
+
+ local f_end_inline = formatters["</%s>"]
+ local f_end_mixed = formatters["</%s>\n"]
+ local f_end_display = formatters["%w</%s>\n"]
+
+ local f_begin_inline_comment = formatters["<!-- %s --><%s>"]
+ local f_begin_mixed_comment = formatters["%w<!-- %s --><%s>"]
+ local f_begin_display_comment = formatters["\n%w<!-- %s -->\n%w<%s>\n"]
+ local f_begin_inline_attr_comment = formatters["<!-- %s --><%s%s>"]
+ local f_begin_mixed_attr_comment = formatters["%w<!-- %s --><%s%s>"]
+ local f_begin_display_attr_comment = formatters["\n%w<!-- %s -->\n%w<%s%s>\n"]
+
+ local f_comment_begin_inline = formatters["<!-- begin %s -->"]
+ local f_comment_begin_mixed = formatters["%w<!-- begin %s -->"]
+ local f_comment_begin_display = formatters["\n%w<!-- begin %s -->\n"]
+
+ local f_comment_end_inline = formatters["<!-- end %s -->"]
+ local f_comment_end_mixed = formatters["<!-- end %s -->\n"]
+ local f_comment_end_display = formatters["%w<!-- end %s -->\n"]
+
+ local f_metadata_begin = formatters["\n%w<metadata>\n"]
+ local f_metadata = formatters["%w<metavariable name=%q>%s</metavariable>\n"]
+ local f_metadata_end = formatters["%w</metadata>\n"]
+
+ local function attributes(a)
+ local r = { }
+ local n = 0
+ for k, v in next, a do
+ n = n + 1
+ r[n] = f_attribute(k,tostring(v)) -- tostring because of %q
+ end
+ sort(r)
+ return concat(r,"")
+ end
+
+ local function properties(a)
+ local r = { }
+ local n = 0
+ for k, v in next, a do
+ n = n + 1
+ r[n] = f_property(exportproperties,k,tostring(v)) -- tostring because of %q
+ end
+ sort(r)
+ return concat(r,"")
+ end
+
+ local depth = 0
+ local inline = 0
+
+ local function emptytag(result,element,nature,di) -- currently only break but at some point
+ local a = di.attributes -- we might add detail etc
+ if a then -- happens seldom
+ if nature == "display" then
+ result[#result+1] = f_empty_display_attr(depth,namespaced[element],attributes(a))
+ elseif nature == "mixed" then
+ result[#result+1] = f_empty_mixed_attr(depth,namespaced[element],attributes(a))
+ else
+ result[#result+1] = f_empty_inline_attr(namespaced[element],attributes(a))
+ end
+ else
+ if nature == "display" then
+ result[#result+1] = f_empty_display(depth,namespaced[element])
+ elseif nature == "mixed" then
+ result[#result+1] = f_empty_mixed(depth,namespaced[element])
+ else
+ result[#result+1] = f_empty_inline(namespaced[element])
+ end
+ end
+ end
+
+ -- local function stripspaces(di)
+ -- local d = di.data
+ -- local n = #d
+ -- local m = 0
+ -- for i=1,n do
+ -- local di = d[i]
+ -- if di.tg then
+ -- m = m + 1
+ -- d[m] = di
+ -- end
+ -- end
+ -- for i=n,m+1,-1 do
+ -- d[i] = nil
+ -- end
+ -- end
+ --
+ -- -- simpler:
+
+ local function stripspaces(di)
+ local d = di.data
+ for i=1,#d do
+ local di = d[i]
+ if not di.tg then
+ di.content = ""
+ end
+ end
+ end
+
+ local function begintag(result,element,nature,di,skip)
+ local index = di.n
+ local fulltag = di.fulltag
+ local specification = specifications[fulltag] or { } -- we can have a dummy
+ local comment = di.comment
+ local detail = specification.detail
+ if skip == "comment" then
+ if show_comment then
+ if nature == "inline" or inline > 0 then
+ result[#result+1] = f_comment_begin_inline(namespaced[element])
+ inline = inline + 1
+ elseif nature == "mixed" then
+ result[#result+1] = f_comment_begin_mixed(depth,namespaced[element])
+ depth = depth + 1
+ inline = 1
+ else
+ result[#result+1] = f_comment_begin_display(depth,namespaced[element])
+ depth = depth + 1
+ end
+ end
+ elseif skip then
+ -- ignore
+ else
+
+ local n = 0
+ local r = { } -- delay this
+ if detail then
+ detail = gsub(detail,"[^A-Za-z0-9]+","-")
+ specification.detail = detail -- we use it later in for the div
+ n = n + 1
+ r[n] = f_detail(detail)
+ end
+ local parents = specification.parents
+ if parents then
+ parents = gsub(parents,"[^A-Za-z0-9 ]+","-")
+ specification.parents = parents -- we use it later in for the div
+ n = n + 1
+ r[n] = f_chain(parents)
+ end
+ if indexing and index then
+ n = n + 1
+ r[n] = f_index(index)
+ end
+ --
+ local extra = extras[element]
+ if extra then
+ extra(di,element,index,fulltag)
+ end
+ --
+ if di.record then
+ stripspaces(di)
+ end
+ --
+ if exportproperties then
+ local p = specification.userdata
+ if not p then
+ -- skip
+ elseif exportproperties == v_yes then
+ n = n + 1
+ r[n] = attributes(p)
+ else
+ n = n + 1
+ r[n] = properties(p)
+ end
+ end
+ local a = di.attributes
+ if a then
+ if trace_spacing then
+ a.p = di.parnumber or 0
+ end
+ n = n + 1
+ r[n] = attributes(a)
+ elseif trace_spacing then
+ n = n + 1
+ r[n] = attributes { p = di.parnumber or 0 }
+ end
+ if n == 0 then
+ if nature == "inline" or inline > 0 then
+ if show_comment and comment then
+ result[#result+1] = f_begin_inline_comment(comment,namespaced[element])
+ else
+ result[#result+1] = f_begin_inline(namespaced[element])
+ end
+ inline = inline + 1
+ elseif nature == "mixed" then
+ if show_comment and comment then
+ result[#result+1] = f_begin_mixed_comment(depth,comment,namespaced[element])
+ else
+ result[#result+1] = f_begin_mixed(depth,namespaced[element])
+ end
+ depth = depth + 1
+ inline = 1
+ else
+ if show_comment and comment then
+ result[#result+1] = f_begin_display_comment(depth,comment,depth,namespaced[element])
+ else
+ result[#result+1] = f_begin_display(depth,namespaced[element])
+ end
+ depth = depth + 1
+ end
+ else
+ r = concat(r,"",1,n)
+ if nature == "inline" or inline > 0 then
+ if show_comment and comment then
+ result[#result+1] = f_begin_inline_attr_comment(comment,namespaced[element],r)
+ else
+ result[#result+1] = f_begin_inline_attr(namespaced[element],r)
+ end
+ inline = inline + 1
+ elseif nature == "mixed" then
+ if show_comment and comment then
+ result[#result+1] = f_begin_mixed_attr_comment(depth,comment,namespaced[element],r)
+ else
+ result[#result+1] = f_begin_mixed_attr(depth,namespaced[element],r)
+ end
+ depth = depth + 1
+ inline = 1
+ else
+ if show_comment and comment then
+ result[#result+1] = f_begin_display_attr_comment(depth,comment,depth,namespaced[element],r)
+ else
+ result[#result+1] = f_begin_display_attr(depth,namespaced[element],r)
+ end
+ depth = depth + 1
+ end
+ end
+ end
+ used[element][detail or ""] = { nature, specification.parents } -- for template css
+ -- also in last else ?
+ local metadata = specification.metadata
+ if metadata then
+ result[#result+1] = f_metadata_begin(depth)
+ for k, v in table.sortedpairs(metadata) do
+ if v ~= "" then
+ result[#result+1] = f_metadata(depth+1,k,lpegmatch(p_entity,v))
+ end
+ end
+ result[#result+1] = f_metadata_end(depth)
+ end
+ end
+
+ local function endtag(result,element,nature,di,skip)
+ if skip == "comment" then
+ if show_comment then
+ if nature == "display" and (inline == 0 or inline == 1) then
+ depth = depth - 1
+ result[#result+1] = f_comment_end_display(depth,namespaced[element])
+ inline = 0
+ elseif nature == "mixed" and (inline == 0 or inline == 1) then
+ depth = depth - 1
+ result[#result+1] = f_comment_end_mixed(namespaced[element])
+ inline = 0
+ else
+ inline = inline - 1
+ result[#result+1] = f_comment_end_inline(namespaced[element])
+ end
+ end
+ elseif skip then
+ -- ignore
+ else
+ if nature == "display" and (inline == 0 or inline == 1) then
+ depth = depth - 1
+ result[#result+1] = f_end_display(depth,namespaced[element])
+ inline = 0
+ elseif nature == "mixed" and (inline == 0 or inline == 1) then
+ depth = depth - 1
+ result[#result+1] = f_end_mixed(namespaced[element])
+ inline = 0
+ else
+ inline = inline - 1
+ result[#result+1] = f_end_inline(namespaced[element])
+ end
+ end
+ end
+
+ local function flushtree(result,data,nature)
+ local nofdata = #data
+ for i=1,nofdata do
+ local di = data[i]
+ if not di then -- hm, di can be string
+ -- whatever
+ else
+ local content = di.content
+ -- also optimize for content == "" : trace that first
+ if content then
+ -- already has breaks
+ local content = lpegmatch(p_entity,content)
+ if i == nofdata and sub(content,-1) == "\n" then -- move check
+ -- can be an end of line in par but can also be the last line
+ if trace_spacing then
+ result[#result+1] = f_spacing(di.parnumber or 0,sub(content,1,-2))
+ else
+ result[#result+1] = sub(content,1,-2)
+ end
+ result[#result+1] = " "
+ else
+ if trace_spacing then
+ result[#result+1] = f_spacing(di.parnumber or 0,content)
+ else
+ result[#result+1] = content
+ end
+ end
+ elseif not di.collapsed then -- ignore collapsed data (is appended, reconstructed par)
+ local element = di.element
+ if not element then
+ -- skip
+ elseif element == "break" then -- or element == "pagebreak"
+ emptytag(result,element,nature,di)
+ elseif element == "" or di.skip == "ignore" then
+ -- skip
+ else
+ if di.before then
+ flushtree(result,di.before,nature)
+ end
+ local natu = di.nature
+ local skip = di.skip
+ if di.breaknode then
+ emptytag(result,"break","display",di)
+ end
+ begintag(result,element,natu,di,skip)
+ flushtree(result,di.data,natu)
+ endtag(result,element,natu,di,skip)
+ if di.after then
+ flushtree(result,di.after,nature)
+ end
+ end
+ end
+ end
+ end
+ end
+
+ local function breaktree(tree,parent,parentelement) -- also removes double breaks
+ local data = tree.data
+ if data then
+ local nofdata = #data
+ local prevelement
+ local prevnature
+ local prevparnumber
+ local newdata = { }
+ local nofnewdata = 0
+ for i=1,nofdata do
+ local di = data[i]
+ if not di then
+ -- skip
+ elseif di.skip == "ignore" then
+ -- skip (new)
+elseif di.tg == "ignore" then
+ -- skip (new)
+ elseif di.content then
+ if di.samepar then
+ prevparnumber = false
+ else
+ local parnumber = di.parnumber
+ if prevnature == "inline" and prevparnumber and prevparnumber ~= parnumber then
+ nofnewdata = nofnewdata + 1
+ if trace_spacing then
+ newdata[nofnewdata] = makebreaknode { type = "a", p = prevparnumber, n = parnumber }
+ else
+ newdata[nofnewdata] = makebreaknode()
+ end
+ end
+ prevelement = nil
+ prevparnumber = parnumber
+ end
+ prevnature = "inline"
+ nofnewdata = nofnewdata + 1
+ newdata[nofnewdata] = di
+ elseif not di.collapsed then
+ local element = di.element
+ if element == "break" then -- or element == "pagebreak"
+ if prevelement == "break" then
+ di.element = ""
+ end
+ prevelement = element
+ prevnature = "display"
+ nofnewdata = nofnewdata + 1
+ newdata[nofnewdata] = di
+ elseif element == "" or di.skip == "ignore" then
+ -- skip
+ else
+ if di.samepar then
+ prevnature = "inline"
+ prevparnumber = false
+ else
+ local nature = di.nature
+ local parnumber = di.parnumber
+ if prevnature == "inline" and nature == "inline" and prevparnumber and prevparnumber ~= parnumber then
+ nofnewdata = nofnewdata + 1
+ if trace_spacing then
+ newdata[nofnewdata] = makebreaknode { type = "b", p = prevparnumber, n = parnumber }
+ else
+ newdata[nofnewdata] = makebreaknode()
+ end
+ end
+ prevnature = nature
+ prevparnumber = parnumber
+ end
+ prevelement = element
+ breaktree(di,tree,element)
+ nofnewdata = nofnewdata + 1
+ newdata[nofnewdata] = di
+ end
+ else
+ if di.samepar then
+ prevnature = "inline"
+ prevparnumber = false
+ else
+ local nature = di.nature
+ local parnumber = di.parnumber
+ if prevnature == "inline" and nature == "inline" and prevparnumber and prevparnumber ~= parnumber then
+ nofnewdata = nofnewdata + 1
+ if trace_spacing then
+ newdata[nofnewdata] = makebreaknode { type = "c", p = prevparnumber, n = parnumber }
+ else
+ newdata[nofnewdata] = makebreaknode()
+ end
+ end
+ prevnature = nature
+ prevparnumber = parnumber
+ end
+ nofnewdata = nofnewdata + 1
+ newdata[nofnewdata] = di
+ end
+ end
+ tree.data = newdata
+ end
+ end
+
+ -- also tabulaterow reconstruction .. maybe better as a checker
+ -- i.e cell attribute
+
+ local function collapsetree(tree)
+-- for tag, trees in sortedhash(treehash) do
+ for tag, trees in next, treehash do
+ local d = trees[1].data
+-- print("!!!!!!!!",tag)
+-- inspect(trees)
+ if d then
+ local nd = #d
+ if nd > 0 then
+ for i=2,#trees do
+ local currenttree = trees[i]
+ local currentdata = currenttree.data
+ local currentpar = currenttree.parnumber
+ local previouspar = trees[i-1].parnumber
+ currenttree.collapsed = true
+ -- is the next ok?
+ if previouspar == 0 or not (di and di.content) then
+ previouspar = nil -- no need anyway so no further testing needed
+ end
+ for j=1,#currentdata do
+ local cd = currentdata[j]
+ if not cd or cd == "" then
+ -- skip
+ elseif cd.skip == "ignore" then
+ -- skip
+ elseif cd.content then
+ if not currentpar then
+ -- add space ?
+ elseif not previouspar then
+ -- add space ?
+ elseif currentpar ~= previouspar then
+ nd = nd + 1
+ if trace_spacing then
+ d[nd] = makebreaknode { type = "d", p = previouspar, n = currentpar }
+ else
+ d[nd] = makebreaknode()
+ end
+ end
+ previouspar = currentpar
+ nd = nd + 1
+ d[nd] = cd
+ else
+ nd = nd + 1
+ d[nd] = cd
+ end
+ currentdata[j] = false
+ end
+ end
+ end
+ end
+ end
+ end
+
+ local function finalizetree(tree)
+ for _, finalizer in next, finalizers do
+ finalizer(tree)
+ end
+ end
+
+ -- local function showtree(data,when,where)
+ -- if data then
+ -- for i=1,#data do
+ -- local d = data[i]
+ -- if type(d) == "table" and d.element then
+ -- print(when,where,i,d.element,d.parnumber or 0)
+ -- end
+ -- end
+ -- end
+ -- end
+
+ local function indextree(tree)
+ local data = tree.data
+ if data then
+ local n, new = 0, { }
+ -- showtree(data,"before","index")
+ for i=1,#data do
+ local d = data[i]
+ if not d then
+ -- skip
+ elseif d.content then
+ n = n + 1
+ new[n] = d
+ elseif not d.collapsed then
+ n = n + 1
+ d.__i__ = n
+ d.__p__ = tree
+ indextree(d)
+ new[n] = d
+ end
+ end
+ tree.data = new
+ -- showtree(new,"after","index")
+ end
+ end
+
+ local function checktree(tree)
+ local data = tree.data
+ if data then
+ -- showtree(data,"before","check")
+ for i=1,#data do
+ local d = data[i]
+ if type(d) == "table" then
+ local check = checks[d.tg]
+ if check then
+ check(d,data,i)
+ end
+ checktree(d) -- so parts can pass twice
+ end
+ end
+ -- showtree(data,"after","check")
+ end
+ end
+
+ local function fixtree(tree)
+ local data = tree.data
+ if data then
+ -- showtree(data,"before","fix")
+ for i=1,#data do
+ local d = data[i]
+ if type(d) == "table" then
+ local fix = fixes[d.tg]
+ if fix then
+ fix(d,data,i)
+ end
+ fixtree(d) -- so parts can pass twice
+ end
+ end
+ -- showtree(data,"after","fix")
+ end
+ end
+
+ wrapups.flushtree = flushtree
+ wrapups.breaktree = breaktree
+ wrapups.collapsetree = collapsetree
+ wrapups.finalizetree = finalizetree
+ wrapups.indextree = indextree
+ wrapups.checktree = checktree
+ wrapups.fixtree = fixtree
+
+end
+
+-- collector code
+
+local function push(fulltag,depth)
+ local tg, n, detail, element, nature, record
+ local specification = specifications[fulltag]
+ if specification then
+ tg = specification.tagname
+ n = specification.tagindex
+ detail = specification.detail
+ else
+ -- a break (more efficient if we don't store those in specifications)
+ tg, n = lpegmatch(tagsplitter,fulltag)
+ n = tonumber(n) -- to tonumber in tagsplitter
+ end
+ local p = properties[tg]
+ if p then
+ element = p.export or tg
+ nature = p.nature or "inline" -- defaultnature
+ record = p.record
+ end
+ local treedata = tree.data
+ local t = { -- maybe we can use the tag table
+ tg = tg,
+ fulltag = fulltag,
+ detail = detail,
+ n = n, -- already a number
+ element = element,
+ nature = nature,
+ data = { },
+ attribute = currentattribute,
+ parnumber = currentparagraph,
+ record = record, -- we can consider storing properties
+ }
+ treedata[#treedata+1] = t
+ currentdepth = currentdepth + 1
+ nesting[currentdepth] = fulltag
+ treestack[currentdepth] = tree
+ if trace_export then
+ if detail and detail ~= "" then
+ report_export("%w<%s trigger=%q n=%q paragraph=%q index=%q detail=%q>",currentdepth-1,tg,n,currentattribute or 0,currentparagraph or 0,#treedata,detail)
+ else
+ report_export("%w<%s trigger=%q n=%q paragraph=%q index=%q>",currentdepth-1,tg,n,currentattribute or 0,currentparagraph or 0,#treedata)
+ end
+ end
+ tree = t
+ if tg == "break" then
+ -- no need for this
+ else
+ local h = treehash[fulltag]
+ if h then
+ h[#h+1] = t
+ else
+ treehash[fulltag] = { t }
+ end
+ end
+end
+
+local function pop()
+ if currentdepth > 0 then
+ local top = nesting[currentdepth]
+ tree = treestack[currentdepth]
+ currentdepth = currentdepth - 1
+ if trace_export then
+ if top then
+ report_export("%w</%s>",currentdepth,match(top,"[^>]+"))
+ else
+ report_export("</BAD>")
+ end
+ end
+ else
+ report_export("%w<!-- too many pops -->",currentdepth)
+ end
+end
+
+local function continueexport()
+ if nofcurrentcontent > 0 then
+ if trace_export then
+ report_export("%w<!-- injecting pagebreak space -->",currentdepth)
+ end
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " " -- pagebreak
+ end
+end
+
+local function pushentry(current)
+ if not current then
+ -- bad news
+ return
+ end
+ current = current.taglist
+ if not current then
+ -- even worse news
+ return
+ end
+ if restart then
+ continueexport()
+ restart = false
+ end
+ local newdepth = #current
+ local olddepth = currentdepth
+ if trace_export then
+ report_export("%w<!-- moving from depth %s to %s (%s) -->",currentdepth,olddepth,newdepth,current[newdepth])
+ end
+ if olddepth <= 0 then
+ for i=1,newdepth do
+ push(current[i],i)
+ end
+ else
+ local difference
+ if olddepth < newdepth then
+ for i=1,olddepth do
+ if current[i] ~= nesting[i] then
+ difference = i
+ break
+ end
+ end
+ else
+ for i=1,newdepth do
+ if current[i] ~= nesting[i] then
+ difference = i
+ break
+ end
+ end
+ end
+ if difference then
+ for i=olddepth,difference,-1 do
+ pop()
+ end
+ for i=difference,newdepth do
+ push(current[i],i)
+ end
+ elseif newdepth > olddepth then
+ for i=olddepth+1,newdepth do
+ push(current[i],i)
+ end
+ elseif newdepth < olddepth then
+ for i=olddepth,newdepth,-1 do
+ pop()
+ end
+ elseif trace_export then
+ report_export("%w<!-- staying at depth %s (%s) -->",currentdepth,newdepth,nesting[newdepth] or "?")
+ end
+ end
+ return olddepth, newdepth
+end
+
+local function pushcontent(oldparagraph,newparagraph)
+ if nofcurrentcontent > 0 then
+ if oldparagraph then
+ if currentcontent[nofcurrentcontent] == "\n" then
+ if trace_export then
+ report_export("%w<!-- removing newline -->",currentdepth)
+ end
+ nofcurrentcontent = nofcurrentcontent - 1
+ end
+ end
+ local content = concat(currentcontent,"",1,nofcurrentcontent)
+ if content == "" then
+ -- omit; when oldparagraph we could push, remove spaces, pop
+ elseif somespace[content] and oldparagraph then
+ -- omit; when oldparagraph we could push, remove spaces, pop
+ else
+ local olddepth, newdepth
+ local list = taglist[currentattribute]
+ if list then
+ olddepth, newdepth = pushentry(list)
+ end
+ if tree then
+ local td = tree.data
+ local nd = #td
+ td[nd+1] = { parnumber = oldparagraph or currentparagraph, content = content }
+ if trace_export then
+ report_export("%w<!-- start content with length %s -->",currentdepth,utflen(content))
+ report_export("%w%s",currentdepth,(gsub(content,"\n","\\n")))
+ report_export("%w<!-- stop content -->",currentdepth)
+ end
+ if olddepth then
+ for i=newdepth-1,olddepth,-1 do
+ pop()
+ end
+ end
+ end
+ end
+ nofcurrentcontent = 0
+ end
+ if oldparagraph then
+ pushentry(makebreaklist(currentnesting))
+ if trace_export then
+ report_export("%w<!-- break added between paragraph %a and %a -->",currentdepth,oldparagraph,newparagraph)
+ end
+ end
+end
+
+local function finishexport()
+ if trace_export then
+ report_export("%w<!-- start finalizing -->",currentdepth)
+ end
+ if nofcurrentcontent > 0 then
+ if somespace[currentcontent[nofcurrentcontent]] then
+ if trace_export then
+ report_export("%w<!-- removing space -->",currentdepth)
+ end
+ nofcurrentcontent = nofcurrentcontent - 1
+ end
+ pushcontent()
+ end
+ for i=currentdepth,1,-1 do
+ pop()
+ end
+ currentcontent = { } -- we're nice and do a cleanup
+ if trace_export then
+ report_export("%w<!-- stop finalizing -->",currentdepth)
+ end
+end
+
+-- inserts ?
+
+local collectresults do -- too many locals otherwise
+
+ local nodecodes = nodes.nodecodes
+ local gluecodes = nodes.gluecodes
+ local listcodes = nodes.listcodes
+ local whatsitcodes = nodes.whatsitcodes
+
+ local subtypes = nodes.subtypes
+
+ local hlist_code = nodecodes.hlist
+ local vlist_code = nodecodes.vlist
+ local glyph_code = nodecodes.glyph
+ local glue_code = nodecodes.glue
+ local kern_code = nodecodes.kern
+ local disc_code = nodecodes.disc
+ local whatsit_code = nodecodes.whatsit
+ local par_code = nodecodes.par
+
+ local userskip_code = gluecodes.userskip
+ local rightskip_code = gluecodes.rightskip
+ local parfillskip_code = gluecodes.parfillskip
+ local spaceskip_code = gluecodes.spaceskip
+ local xspaceskip_code = gluecodes.xspaceskip
+
+ local linelist_code = listcodes.line
+
+ local userdefinedwhatsit_code = whatsitcodes.userdefined
+
+ local privateattribute = attributes.private
+ local a_image = privateattribute('image')
+ local a_reference = privateattribute('reference')
+ local a_destination = privateattribute('destination')
+ local a_characters = privateattribute('characters')
+ local a_exportstatus = privateattribute('exportstatus')
+ local a_tagged = privateattribute('tagged')
+ local a_taggedpar = privateattribute("taggedpar")
+ local a_textblock = privateattribute("textblock")
+
+ local inline_mark = nodes.pool.userids["margins.inline"]
+
+ local nuts = nodes.nuts
+
+ local getnext = nuts.getnext
+ local getdisc = nuts.getdisc
+ local getlist = nuts.getlist
+ local getid = nuts.getid
+ local getattr = nuts.getattr
+ local setattr = nuts.setattr -- maybe use properties
+ local isglyph = nuts.isglyph
+ local getkern = nuts.getkern
+ local getwidth = nuts.getwidth
+
+ local start_of_par = nuts.start_of_par
+
+ local nexthlist = nuts.traversers.hlist
+ local nextnode = nuts.traversers.node
+
+ local function addtomaybe(maybewrong,c,case)
+ if trace_export then
+ report_export("%w<!-- possible paragraph mixup at %C case %i -->",currentdepth,c,case)
+ else
+ local s = formatters["%C"](c)
+ if maybewrong then
+ maybewrong[#maybewrong+1] = s
+ else
+ maybewrong = { s }
+ end
+ return maybewrong
+ end
+ end
+
+ local function showmaybe(maybewrong)
+ if not trace_export then
+ report_export("fuzzy paragraph: % t",maybewrong)
+ end
+ end
+
+ local function showdetail(n,id,subtype)
+ local a = getattr(n,a_tagged)
+ local t = taglist[a]
+ local c = nodecodes[id]
+ local s = subtypes[id][subtype]
+ if a and t then
+ report_export("node %a, subtype %a, tag %a, element %a, tree '% t'",c,s,a,t.tagname,t.taglist)
+ else
+ report_export("node %a, subtype %a, untagged",c,s)
+ end
+ end
+
+ local function collectresults(head,list,pat,pap) -- is last used (we also have currentattribute)
+ local p
+ local paragraph
+ local maybewrong
+ local pid
+ for n, id, subtype in nextnode, head do
+ if trace_details then
+ showdetail(n,id,subtype)
+ end
+ if id == glyph_code then
+ local c, f = isglyph(n)
+ local at = getattr(n,a_tagged) or pat
+ if not at then
+ -- we need to tag the pagebody stuff as being valid skippable
+ --
+ -- report_export("skipping character: %C (no attribute)",n.char)
+ else
+ if last ~= at then
+ local tl = taglist[at]
+ local ap = getattr(n,a_taggedpar) or pap
+ if paragraph and (not ap or ap < paragraph) then
+ maybewrong = addtomaybe(maybewrong,c,1)
+ end
+ pushcontent()
+ currentnesting = tl
+ currentparagraph = ap
+ currentattribute = at
+ last = at
+ pushentry(currentnesting)
+ if trace_export then
+ report_export("%w<!-- processing glyph %C tagged %a -->",currentdepth,c,at)
+ end
+ -- We need to intercept this here; maybe I will also move this
+ -- to a regular setter at the tex end.
+ local r = getattr(n,a_reference)
+ if r then
+ local t = tl.taglist
+ referencehash[t[#t]] = r -- fulltag
+ end
+ local d = getattr(n,a_destination)
+ if d then
+ local t = tl.taglist
+ destinationhash[t[#t]] = d -- fulltag
+ end
+ --
+ elseif last then
+ -- we can consider tagging the pars (lines) in the parbuilder but then we loose some
+ -- information unless we inject a special node (but even then we can run into nesting
+ -- issues)
+ local ap = getattr(n,a_taggedpar) or pap
+ if ap ~= currentparagraph then
+ pushcontent(currentparagraph,ap)
+ pushentry(currentnesting)
+ currentattribute = last
+ currentparagraph = ap
+ end
+ if paragraph and (not ap or ap < paragraph) then
+ maybewrong = addtomaybe(maybewrong,c,2)
+ end
+ if trace_export then
+ report_export("%w<!-- processing glyph %C tagged %a -->",currentdepth,c,last)
+ end
+ else
+ if trace_export then
+ report_export("%w<!-- processing glyph %C tagged %a -->",currentdepth,c,at)
+ end
+ end
+ local s = getattr(n,a_exportstatus)
+ if s then
+ c = s
+ end
+ if c == 0 then
+ if trace_export then
+ report_export("%w<!-- skipping last glyph -->",currentdepth)
+ end
+ elseif c == 0x20 then
+ local a = getattr(n,a_characters)
+ nofcurrentcontent = nofcurrentcontent + 1
+ if a then
+ if trace_export then
+ report_export("%w<!-- turning last space into special space %U -->",currentdepth,a)
+ end
+ currentcontent[nofcurrentcontent] = specialspaces[a] -- special space
+ else
+ currentcontent[nofcurrentcontent] = " "
+ end
+ else
+ local fc = fontchar[f]
+ if fc then
+ fc = fc and fc[c]
+ if fc then
+ local u = fc.unicode
+ if not u then
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = utfchar(c)
+ elseif type(u) == "table" then
+ for i=1,#u do
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = utfchar(u[i])
+ end
+ else
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = utfchar(u)
+ end
+ elseif c > 0 then
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = utfchar(c)
+ else
+ -- we can have -1 as side effect of an explicit hyphen (unless we expand)
+ end
+ elseif c > 0 then
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = utfchar(c)
+ else
+ -- we can have -1 as side effect of an explicit hyphen (unless we expand)
+ end
+ end
+ end
+ elseif id == glue_code then
+ -- we need to distinguish between hskips and vskips
+ local ca = getattr(n,a_characters)
+ if ca == 0 then
+ -- skip this one ... already converted special character (node-acc)
+ elseif ca then
+ local a = getattr(n,a_tagged) or pat
+ if a then
+ local c = specialspaces[ca]
+ if last ~= a then
+ local tl = taglist[a]
+ if trace_export then
+ report_export("%w<!-- processing space glyph %U tagged %a case 1 -->",currentdepth,ca,a)
+ end
+ pushcontent()
+ currentnesting = tl
+ currentparagraph = getattr(n,a_taggedpar) or pap
+ currentattribute = a
+ last = a
+ pushentry(currentnesting)
+ -- no reference check (see above)
+ elseif last then
+ local ap = getattr(n,a_taggedpar) or pap
+ if ap ~= currentparagraph then
+ pushcontent(currentparagraph,ap)
+ pushentry(currentnesting)
+ currentattribute = last
+ currentparagraph = ap
+ end
+ if trace_export then
+ report_export("%w<!-- processing space glyph %U tagged %a case 2 -->",currentdepth,ca,last)
+ end
+ end
+ -- if somespace[currentcontent[nofcurrentcontent]] then
+ -- if trace_export then
+ -- report_export("%w<!-- removing space -->",currentdepth)
+ -- end
+ -- nofcurrentcontent = nofcurrentcontent - 1
+ -- end
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = c
+ end
+ elseif subtype == userskip_code then
+ if getwidth(n) > threshold then
+ if last and not somespace[currentcontent[nofcurrentcontent]] then
+ local a = getattr(n,a_tagged) or pat
+ if a == last then
+ if trace_export then
+ report_export("%w<!-- injecting spacing 5a -->",currentdepth)
+ end
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+ elseif a then
+ -- e.g LOGO<space>LOGO
+ if trace_export then
+ report_export("%w<!-- processing glue > threshold tagged %s becomes %s -->",currentdepth,last,a)
+ end
+ pushcontent()
+ if trace_export then
+ report_export("%w<!-- injecting spacing 5b -->",currentdepth)
+ end
+ last = a
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+ currentnesting = taglist[last]
+ pushentry(currentnesting)
+ currentattribute = last
+ end
+ end
+ end
+ elseif subtype == spaceskip_code or subtype == xspaceskip_code then
+ if not somespace[currentcontent[nofcurrentcontent]] then
+ local a = getattr(n,a_tagged) or pat
+ if a == last then
+ if trace_export then
+ report_export("%w<!-- injecting spacing 7 (stay in element) -->",currentdepth)
+ end
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+ else
+ if trace_export then
+ report_export("%w<!-- injecting spacing 7 (end of element) -->",currentdepth)
+ end
+ last = a
+ pushcontent()
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+ currentnesting = taglist[last]
+ pushentry(currentnesting)
+ currentattribute = last
+ end
+ end
+ elseif subtype == rightskip_code then
+ -- a line
+ if nofcurrentcontent > 0 then
+ local r = currentcontent[nofcurrentcontent]
+ if r == hyphen then
+ if not keephyphens then
+ nofcurrentcontent = nofcurrentcontent - 1
+ end
+ elseif pid == disc_code then
+ -- go on .. tricky: we should mark the glyhs as coming from a disc
+ elseif not somespace[r] then
+ local a = getattr(n,a_tagged) or pat
+ if a == last then
+ if trace_export then
+ report_export("%w<!-- injecting spacing 1 (end of line, stay in element) -->",currentdepth)
+ end
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+ else
+ if trace_export then
+ report_export("%w<!-- injecting spacing 1 (end of line, end of element) -->",currentdepth)
+ end
+ last = a
+ pushcontent()
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+ currentnesting = taglist[last]
+ pushentry(currentnesting)
+ currentattribute = last
+ end
+ end
+ end
+ elseif subtype == parfillskip_code then
+ -- deal with paragraph endings (crossings) elsewhere and we quit here
+ -- as we don't want the rightskip space addition
+ if maybewrong then
+ showmaybe(maybewrong)
+ end
+ return
+ end
+ elseif id == hlist_code or id == vlist_code then
+ local ai = getattr(n,a_image)
+ if ai then
+ local at = getattr(n,a_tagged) or pat
+ if nofcurrentcontent > 0 then
+ pushcontent()
+ pushentry(currentnesting) -- ??
+ end
+ pushentry(taglist[at]) -- has an index, todo: flag empty element
+ if trace_export then
+ report_export("%w<!-- processing image tagged %a",currentdepth,last)
+ end
+ last = nil
+ currentparagraph = nil
+ else
+ -- we need to determine an end-of-line
+ local list = getlist(n)
+ if list then
+ -- todo: no par checking needed in math
+ local at = getattr(n,a_tagged) or pat
+ collectresults(list,n,at)
+ end
+ end
+ elseif id == kern_code then
+ local kern = getkern(n)
+ if kern > 0 then
+local a = getattr(n,a_tagged) or pat
+local t = taglist[a]
+if not t or t.tagname ~= "ignore" then -- maybe earlier on top)
+ local limit = threshold
+ if p then
+ local c, f = isglyph(p)
+ if c then
+ limit = fontquads[f] / 4
+ end
+ end
+ if kern > limit then
+ if last and not somespace[currentcontent[nofcurrentcontent]] then
+-- local a = getattr(n,a_tagged) or pat
+ if a == last then
+ if not somespace[currentcontent[nofcurrentcontent]] then
+ if trace_export then
+ report_export("%w<!-- injecting spacing 8 (kern %p) -->",currentdepth,kern)
+ end
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+ end
+ elseif a then
+ -- e.g LOGO<space>LOGO
+ if trace_export then
+ report_export("%w<!-- processing kern, threshold %p, tag %s => %s -->",currentdepth,limit,last,a)
+ end
+ last = a
+ pushcontent()
+ if trace_export then
+ report_export("%w<!-- injecting spacing 9 (kern %p) -->",currentdepth,kern)
+ end
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = " "
+-- currentnesting = taglist[last]
+currentnesting = t
+ pushentry(currentnesting)
+ currentattribute = last
+ end
+ end
+ end
+end
+ end
+ elseif id == whatsit_code then
+ if subtype == userdefinedwhatsit_code then
+ -- similar to images, see above
+ local at = getattr(n,a_tagged)
+ if nofcurrentcontent > 0 then
+ pushcontent()
+ pushentry(currentnesting) -- ??
+ end
+ pushentry(taglist[at])
+ if trace_export then
+ report_export("%w<!-- processing anchor tagged %a",currentdepth,last)
+ end
+ last = nil
+ currentparagraph = nil
+ end
+ elseif not paragraph and id == par_code and start_of_par(n) then
+ paragraph = getattr(n,a_taggedpar)
+ elseif id == disc_code then
+ -- very unlikely because we stripped them
+ local pre, post, replace = getdisc(n)
+ if keephyphens then
+ if pre and not getnext(pre) and isglyph(pre) == 0xAD then -- hyphencode then
+ nofcurrentcontent = nofcurrentcontent + 1
+ currentcontent[nofcurrentcontent] = hyphen
+ end
+ end
+ if replace then
+ collectresults(replace,nil)
+ end
+ end
+ p = n
+ pid = id
+ end
+ if maybewrong then
+ showmaybe(maybewrong)
+ end
+ end
+
+ function nodes.handlers.export(head) -- hooks into the page builder
+ starttiming(treehash)
+ if trace_export then
+ report_export("%w<!-- start flushing page -->",currentdepth)
+ end
+ -- continueexport()
+ restart = true
+ collectresults(head)
+ if trace_export then
+ report_export("%w<!-- stop flushing page -->",currentdepth)
+ end
+ stoptiming(treehash)
+ return head
+ end
+
+ function nodes.handlers.checkparcounter(p)
+ setattr(p,a_taggedpar,texgetcount("tagparcounter") + 1)
+ return p
+ end
+
+ function builders.paragraphs.tag(head)
+ noftextblocks = noftextblocks + 1
+ for n, subtype in nexthlist, head do
+ if subtype == linelist_code then
+ setattr(n,a_textblock,noftextblocks)
+ elseif subtype == glue_code or subtype == kern_code then -- no need to set fontkerns
+ setattr(n,a_textblock,0)
+ end
+ end
+ return false
+ end
+
+end
+
+do
+
+ local xmlcollected = xml.collected
+ local xmlsetcomment = xml.setcomment
+
+local xmlpreamble = [[
+<?xml version="1.0" encoding="UTF-8" standalone="%standalone%" ?>
+
+<!--
+
+ input filename : %filename%
+ processing date : %date%
+ context version : %contextversion%
+ exporter version : %exportversion%
+
+-->
+
+]]
+
+ local flushtree = wrapups.flushtree
+
+ local function wholepreamble(standalone)
+ return replacetemplate(xmlpreamble, {
+ standalone = standalone and "yes" or "no",
+ filename = tex.jobname,
+ date = included.date and os.fulltime(),
+ contextversion = environment.version,
+ exportversion = exportversion,
+ })
+ end
+
+
+local csspreamble = [[
+<?xml-stylesheet type="text/css" href="%filename%" ?>
+]]
+
+local cssheadlink = [[
+<link type="text/css" rel="stylesheet" href="%filename%" />
+]]
+
+ local function allusedstylesheets(cssfiles,files,path)
+ local done = { }
+ local result = { }
+ local extras = { }
+ for i=1,#cssfiles do
+ local cssfile = cssfiles[i]
+ if type(cssfile) ~= "string" then
+ -- error
+ elseif cssfile == "export-example.css" then
+ -- ignore
+ elseif not done[cssfile] then
+ cssfile = joinfile(path,basename(cssfile))
+ report_export("adding css reference '%s'",cssfile)
+ files[#files+1] = cssfile
+ result[#result+1] = replacetemplate(csspreamble, { filename = cssfile })
+ extras[#extras+1] = replacetemplate(cssheadlink, { filename = cssfile })
+ done[cssfile] = true
+ end
+ end
+ return concat(result), concat(extras)
+ end
+
+local elementtemplate = [[
+/* element="%element%" detail="%detail%" chain="%chain%" */
+
+%element%,
+%namespace%div.%element% {
+ display: %display% ;
+}]]
+
+local detailtemplate = [[
+/* element="%element%" detail="%detail%" chain="%chain%" */
+
+%element%[detail=%detail%],
+%namespace%div.%element%.%detail% {
+ display: %display% ;
+}]]
+
+-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd" >
+
+local htmltemplate = [[
+%preamble%
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:math="http://www.w3.org/1998/Math/MathML">
+
+ <head>
+
+ <meta charset="utf-8"/>
+
+ <title>%title%</title>
+
+%style%
+
+ </head>
+ <body>
+ <div class="document" xmlns="http://www.pragma-ade.com/context/export">
+
+<div class="warning">Rendering can be suboptimal because there is no default/fallback css loaded.</div>
+
+%body%
+
+ </div>
+ </body>
+</html>
+]]
+
+ local displaymapping = {
+ inline = "inline",
+ display = "block",
+ mixed = "inline",
+ }
+
+ local function allusedelements(filename)
+ local result = { replacetemplate(namespacetemplate, {
+ what = "template",
+ filename = filename,
+ namespace = contextns,
+ -- cssnamespaceurl = usecssnamespace and cssnamespaceurl or "",
+ cssnamespaceurl = cssnamespaceurl,
+ },false,true) }
+ for element, details in sortedhash(used) do
+ if namespaces[element] then
+ -- skip math
+ else
+ for detail, what in sortedhash(details) do
+ local nature = what[1] or "display"
+ local chain = what[2]
+ local display = displaymapping[nature] or "block"
+ if detail == "" then
+ result[#result+1] = replacetemplate(elementtemplate, {
+ element = element,
+ display = display,
+ chain = chain,
+ namespace = usecssnamespace and namespace or "",
+ })
+ else
+ result[#result+1] = replacetemplate(detailtemplate, {
+ element = element,
+ display = display,
+ detail = detail,
+ chain = chain,
+ namespace = usecssnamespace and cssnamespace or "",
+ })
+ end
+ end
+ end
+ end
+ return concat(result,"\n\n")
+ end
+
+ local function allcontent(tree,embed)
+ local result = { }
+ flushtree(result,tree.data,"display") -- we need to collect images
+ result = concat(result)
+ -- no need to lpeg .. fast enough
+ result = gsub(result,"\n *\n","\n")
+ result = gsub(result,"\n +([^< ])","\n%1")
+ return result
+ end
+
+ -- local xhtmlpreamble = [[
+ -- <!DOCTYPE html PUBLIC
+ -- "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
+ -- "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
+ -- >
+ -- ]]
+
+ local function cleanxhtmltree(xmltree)
+ if xmltree then
+ local implicits = { }
+ local explicits = { }
+ local overloads = { }
+ for e in xmlcollected(xmltree,"*") do
+ local at = e.at
+ if at then
+ local explicit = at.explicit
+ local implicit = at.implicit
+ if explicit then
+ if not explicits[explicit] then
+ explicits[explicit] = true
+ at.id = explicit
+ if implicit then
+ overloads[implicit] = explicit
+ end
+ end
+ else
+ if implicit and not implicits[implicit] then
+ implicits[implicit] = true
+ at.id = "aut:" .. implicit
+ end
+ end
+ end
+ end
+ for e in xmlcollected(xmltree,"*") do
+ local at = e.at
+ if at then
+ local internal = at.internal
+ local location = at.location
+ if internal then
+ if location then
+ local explicit = overloads[location]
+ if explicit then
+ at.href = "#" .. explicit
+ else
+ at.href = "#aut:" .. internal
+ end
+ else
+ at.href = "#aut:" .. internal
+ end
+ else
+ if location then
+ at.href = "#" .. location
+ else
+ local url = at.url
+ if url then
+ at.href = url
+ else
+ local file = at.file
+ if file then
+ at.href = file
+ end
+ end
+ end
+ end
+ end
+ end
+ return xmltree
+ else
+ return xml.convert('<?xml version="1.0"?>\n<error>invalid xhtml tree</error>')
+ end
+ end
+
+ -- maybe the reverse: be explicit about what is permitted
+
+ local private = {
+ destination = true,
+ prefix = true,
+ reference = true,
+ --
+ id = true,
+ href = true,
+ --
+ implicit = true,
+ explicit = true,
+ --
+ url = true,
+ file = true,
+ internal = true,
+ location = true,
+ --
+ name = true, -- image name
+ used = true, -- image name
+ page = true, -- image name
+ width = true,
+ height = true,
+ --
+ }
+
+ local addclicks = true
+ local f_onclick = formatters[ [[location.href='%s']] ]
+ local f_onclick = formatters[ [[location.href='%s']] ]
+
+ local p_cleanid = lpeg.replacer { [":"] = "-" }
+ local p_cleanhref = lpeg.Cs(lpeg.P("#") * p_cleanid)
+
+ local p_splitter = lpeg.Ct ( (
+ lpeg.Carg(1) * lpeg.C((1-lpeg.P(" "))^1) / function(d,s) if not d[s] then d[s] = true return s end end
+ * lpeg.P(" ")^0 )^1 )
+
+
+ local classes = table.setmetatableindex(function(t,k)
+ local v = concat(lpegmatch(p_splitter,k,1,{})," ")
+ t[k] = v
+ return v
+ end)
+
+ local function makeclass(tg,at)
+ local detail = at.detail
+ local chain = at.chain
+ local extra = nil
+ local classes = { }
+ local nofclasses = 0
+ at.detail = nil
+ at.chain = nil
+ for k, v in next, at do
+ if not private[k] then
+ nofclasses = nofclasses + 1
+ classes[nofclasses] = k .. "-" .. v
+ end
+ end
+ if detail and detail ~= "" then
+ if chain and chain ~= "" then
+ if chain ~= detail then
+ extra = classes[tg .. " " .. chain .. " " .. detail]
+ elseif tg ~= detail then
+ extra = detail
+ end
+ elseif tg ~= detail then
+ extra = detail
+ end
+ elseif chain and chain ~= "" then
+ if tg ~= chain then
+ extra = chain
+ end
+ end
+ -- in this order
+ if nofclasses > 0 then
+ sort(classes)
+ classes = concat(classes," ")
+ if extra then
+ return tg .. " " .. extra .. " " .. classes
+ else
+ return tg .. " " .. classes
+ end
+ else
+ if extra then
+ return tg .. " " .. extra
+ else
+ return tg
+ end
+ end
+ end
+
+ -- Some elements are not supported (well) in css so we need to retain them. For
+ -- instance, tablecells have no colspan so basically that renders css table div
+ -- elements quite useless. A side effect is that we nwo can have conflicts when
+ -- we mix in with other html (as there is no reset). Of course, when it eventually
+ -- gets added, there is a change then that those not using the div abstraction
+ -- will be rediculed.
+ --
+ -- a table tr td th thead tbody tfoot
+ --
+
+ local crappycss = {
+ table = "table", tabulate = "table",
+ tablehead = "thead", tabulatehead = "thead",
+ tablebody = "tbody", tabulatebody = "tbody",
+ tablefoot = "tfoot", tabulatefoot = "tfoot",
+ tablerow = "tr", tabulaterow = "tr",
+ tablecell = "td", tabulatecell = "td",
+ }
+
+ local cssmapping = false
+
+ directives.register("export.nativetags", function(v)
+ cssmapping = v and crappycss or false
+ end)
+
+ local function remap(specification,source,target)
+ local comment = nil -- share comments
+ for c in xmlcollected(source,"*") do
+ if not c.special then
+ local tg = c.tg
+ local ns = c.ns
+ if ns == "m" then
+ if false then -- yes or no
+ c.ns = ""
+ c.at["xmlns:m"] = nil
+ end
+ -- elseif tg == "a" then
+ -- c.ns = ""
+ else
+ local dt = c.dt
+ local nt = #dt
+ if nt == 0 or (nt == 1 and dt[1] == "") then
+ if comment then
+ c.dt = comment
+ else
+ xmlsetcomment(c,"empty")
+ comment = c.dt
+ end
+ end
+ local at = c.at
+ local class = nil
+ local label = nil
+ if tg == "document" then
+ at.href = nil
+ at.detail = nil
+ at.chain = nil
+ elseif tg == "metavariable" then
+ label = at.name
+ at.detail = "metaname-" .. label
+ class = makeclass(tg,at)
+ else
+ class = makeclass(tg,at)
+ end
+ local id = at.id
+ local href = at.href
+ local attr = nil
+ if id then
+ id = lpegmatch(p_cleanid, id) or id
+ if href then
+ href = lpegmatch(p_cleanhref,href) or href
+ attr = {
+ class = class,
+ id = id,
+ href = href,
+ onclick = addclicks and f_onclick(href) or nil,
+ }
+ else
+ attr = {
+ class = class,
+ id = id,
+ }
+ end
+ else
+ if href then
+ href = lpegmatch(p_cleanhref,href) or href
+ attr = {
+ class = class,
+ href = href,
+ onclick = addclicks and f_onclick(href) or nil,
+ }
+ else
+ attr = {
+ class = class,
+ }
+ end
+ end
+ c.at = attr
+ if label then
+ attr.label = label
+ end
+ c.tg = cssmapping and cssmapping[tg] or "div"
+ end
+ end
+ end
+ end
+
+ -- local cssfile = nil directives.register("backend.export.css", function(v) cssfile = v end)
+
+ local embedfile = false directives.register("export.embed",function(v) embedfile = v end)
+
+ function structurestags.finishexport()
+
+ if exporting then
+ exporting = false
+ else
+ return
+ end
+
+ local onlyxml = finetuning.export == v_xml
+
+ starttiming(treehash)
+ --
+ finishexport()
+ --
+ report_export("")
+ if onlyxml then
+ report_export("exporting xml, no other files")
+ else
+ report_export("exporting xml, xhtml, html and css files")
+ end
+ report_export("")
+ --
+ wrapups.fixtree(tree)
+ wrapups.collapsetree(tree)
+ wrapups.indextree(tree)
+ wrapups.checktree(tree)
+ wrapups.breaktree(tree)
+ wrapups.finalizetree(tree)
+ --
+ wrapups.hashlistdata()
+ --
+ local askedname = finetuning.file
+ --
+ -- we use a dedicated subpath:
+ --
+ -- ./jobname-export
+ -- ./jobname-export/images
+ -- ./jobname-export/styles
+ -- ./jobname-export/styles
+ -- ./jobname-export/jobname-export.xml
+ -- ./jobname-export/jobname-export.xhtml
+ -- ./jobname-export/jobname-export.html
+ -- ./jobname-export/jobname-specification.lua
+ -- ./jobname-export/styles/jobname-defaults.css
+ -- ./jobname-export/styles/jobname-styles.css
+ -- ./jobname-export/styles/jobname-images.css
+ -- ./jobname-export/styles/jobname-templates.css
+
+ if type(askedname) ~= "string" or askedname == "" then
+ askedname = tex.jobname
+ end
+
+ local usedname = nameonly(askedname)
+ local basepath = usedname .. "-export"
+ local imagepath = joinfile(basepath,"images")
+ local stylepath = joinfile(basepath,"styles")
+
+ local function validpath(what,pathname)
+ if lfs.isdir(pathname) then
+ report_export("using existing %s path %a",what,pathname)
+ return pathname
+ end
+ lfs.mkdir(pathname)
+ if lfs.isdir(pathname) then
+ report_export("using cretated %s path %a",what,basepath)
+ return pathname
+ else
+ report_export("unable to create %s path %a",what,basepath)
+ return false
+ end
+ end
+
+ if not (validpath("export",basepath) and validpath("images",imagepath) and validpath("styles",stylepath)) then
+ return
+ end
+
+ -- we're now on the dedicated export subpath so we can't clash names
+ --
+ -- a xhtml suffix no longer seems to be work well with browsers
+
+ local xmlfilebase = addsuffix(usedname .. "-raw","xml" )
+ local xhtmlfilebase = addsuffix(usedname .. "-tag","xhtml")
+ local htmlfilebase = addsuffix(usedname .. "-div","html")
+ local specificationfilebase = addsuffix(usedname .. "-pub","lua" )
+
+ local xmlfilename = joinfile(basepath, xmlfilebase )
+ local xhtmlfilename = joinfile(basepath, xhtmlfilebase )
+ local htmlfilename = joinfile(basepath, htmlfilebase )
+ local specificationfilename = joinfile(basepath, specificationfilebase)
+ --
+ local defaultfilebase = addsuffix(usedname .. "-defaults", "css")
+ local imagefilebase = addsuffix(usedname .. "-images", "css")
+ local stylefilebase = addsuffix(usedname .. "-styles", "css")
+ local templatefilebase = addsuffix(usedname .. "-templates","css")
+ --
+ local defaultfilename = joinfile(stylepath,defaultfilebase )
+ local imagefilename = joinfile(stylepath,imagefilebase )
+ local stylefilename = joinfile(stylepath,stylefilebase )
+ local templatefilename = joinfile(stylepath,templatefilebase)
+
+ local cssfile = finetuning.cssfile
+
+ -- we keep track of all used files
+
+ local files = {
+ }
+
+ -- we always load the defaults and optionally extra css files; we also copy the example
+ -- css file so that we always have the latest version
+
+ local cssfiles = {
+ defaultfilebase,
+ imagefilebase,
+ stylefilebase,
+ }
+
+ local cssextra = cssfile and table.unique(settings_to_array(cssfile)) or { }
+
+ -- at this point we're ready for the content; the collector also does some
+ -- housekeeping and data collecting; at this point we still have an xml
+ -- representation that uses verbose element names and carries information in
+ -- attributes
+
+ local data = tree.data
+ for i=1,#data do
+ if data[i].tg ~= "document" then
+ data[i] = { }
+ end
+ end
+
+ local result = allcontent(tree,embedmath) -- embedfile is for testing
+
+ -- ugly but so be it:
+
+ local extradata = structures.tags.getextradata()
+ if extradata then
+ local t = { "" }
+ t[#t+1] = "<extradata>"
+ for name, action in sortedhash(extradata) do
+ t[#t+1] = action()
+ end
+ t[#t+1] = "</extradata>"
+ t[#t+1] = "</document>"
+ -- we use a function because otherwise we can have a bad capture index
+ result = gsub(result,"</document>",function()
+ return concat(t,"\n")
+ end)
+ end
+
+ -- done with ugly
+
+ if onlyxml then
+
+ os.remove(defaultfilename)
+ os.remove(imagefilename)
+ os.remove(stylefilename)
+ os.remove(templatefilename)
+
+ for i=1,#cssextra do
+ os.remove(joinfile(stylepath,basename(source)))
+ end
+
+ -- os.remove(xmlfilename)
+
+ os.remove(imagefilename)
+ os.remove(stylefilename)
+ os.remove(templatefilename)
+ os.remove(xhtmlfilename)
+ os.remove(specificationfilename)
+ os.remove(htmlfilename)
+
+ result = concat {
+ wholepreamble(true),
+ "<!-- This export file is used for filtering runtime only! -->\n",
+ result,
+ }
+
+ report_export("saving xml data in %a",xmlfilename)
+ io.savedata(xmlfilename,result)
+
+ return
+
+ end
+
+ local examplefilename = resolvers.findfile("export-example.css")
+ if examplefilename then
+ local data = io.loaddata(examplefilename)
+ if not data or data == "" then
+ data = "/* missing css file */"
+ elseif not usecssnamespace then
+ data = gsub(data,cssnamespace,"")
+ end
+ io.savedata(defaultfilename,data)
+ end
+
+ if cssfile then
+ for i=1,#cssextra do
+ local source = addsuffix(cssextra[i],"css")
+ local target = joinfile(stylepath,basename(source))
+ cssfiles[#cssfiles+1] = source
+ if not lfs.isfile(source) then
+ source = joinfile("../",source)
+ end
+ if lfs.isfile(source) then
+ report_export("copying %s",source)
+ file.copy(source,target)
+ end
+ end
+ end
+
+ local x_styles, h_styles = allusedstylesheets(cssfiles,files,"styles")
+
+ local attach = backends.nodeinjections.attachfile
+
+ if embedfile and attach then
+ -- only for testing
+ attach {
+ data = concat{ wholepreamble(true), result },
+ name = basename(xmlfilename),
+ registered = "export",
+ title = "raw xml export",
+ method = v_hidden,
+ mimetype = "application/mathml+xml",
+ }
+ end
+
+ result = concat {
+ wholepreamble(true),
+ x_styles, -- adds to files
+ result,
+ }
+
+ cssfiles = table.unique(cssfiles)
+
+ -- we're now ready for saving the result in the xml file
+
+ report_export("saving xml data in %a",xmlfilename)
+ io.savedata(xmlfilename,result)
+
+ report_export("saving css image definitions in %a",imagefilename)
+ io.savedata(imagefilename,wrapups.allusedimages(usedname))
+
+ report_export("saving css style definitions in %a",stylefilename)
+ io.savedata(stylefilename,wrapups.allusedstyles(usedname))
+
+ report_export("saving css template in %a",templatefilename)
+ io.savedata(templatefilename,allusedelements(usedname))
+
+ -- additionally we save an xhtml file; for that we load the file as xml tree
+
+ report_export("saving xhtml variant in %a",xhtmlfilename)
+
+ local xmltree = cleanxhtmltree(xml.convert(result))
+
+ -- local xmltree = xml.convert(result)
+ -- for c in xml.collected(xmltree,"m:mtext[lastindex()=1]/m:mrow") do
+ -- print(c)
+ -- end
+ -- for c in xml.collected(xmltree,"mtext/mrow") do
+ -- print(c)
+ -- end
+ -- local xmltree = cleanxhtmltree(xmltree)
+
+ xml.save(xmltree,xhtmlfilename)
+
+ -- now we save a specification file that can b eused for generating an epub file
+
+ -- looking at identity is somewhat redundant as we also inherit from interaction
+ -- at the tex end
+
+ local identity = interactions.general.getidentity()
+ local metadata = structures.tags.getmetadata()
+
+ local specification = {
+ name = usedname,
+ identifier = os.uuid(),
+ images = wrapups.uniqueusedimages(),
+ imagefile = joinfile("styles",imagefilebase),
+ imagepath = "images",
+ stylepath = "styles",
+ xmlfiles = { xmlfilebase },
+ xhtmlfiles = { xhtmlfilebase },
+ htmlfiles = { htmlfilebase },
+ styles = cssfiles,
+ htmlroot = htmlfilebase,
+ language = languagenames[texgetcount("mainlanguagenumber")],
+ title = validstring(finetuning.title) or validstring(identity.title),
+ subtitle = validstring(finetuning.subtitle) or validstring(identity.subtitle),
+ author = validstring(finetuning.author) or validstring(identity.author),
+ firstpage = validstring(finetuning.firstpage),
+ lastpage = validstring(finetuning.lastpage),
+ metadata = metadata,
+ }
+
+ report_export("saving specification in %a",specificationfilename,specificationfilename)
+
+ xml.wipe(xmltree,"metadata") -- maybe optional
+
+ io.savedata(specificationfilename,table.serialize(specification,true))
+
+ -- the html export for epub is different in the sense that it uses div's instead of
+ -- specific tags
+
+ report_export("saving div based alternative in %a",htmlfilename)
+
+ remap(specification,xmltree)
+
+ -- believe it or not, but a <title/> can prevent viewing in browsers
+
+ local title = specification.title
+
+ if not title or title == "" then
+ title = metadata.title
+ if not title or title == "" then
+ title = usedname -- was: "no title"
+ end
+ end
+
+ local variables = {
+ style = h_styles,
+ body = xml.tostring(xml.first(xmltree,"/div")),
+ preamble = wholepreamble(false),
+ title = title,
+ }
+
+ io.savedata(htmlfilename,replacetemplate(htmltemplate,variables,"xml"))
+
+ -- finally we report how an epub file can be made (using the specification)
+
+ report_export("")
+ report_export('create epub with: mtxrun --script epub --make "%s" [--purge --rename --svgmath]',usedname)
+ report_export("")
+
+ stoptiming(treehash)
+ end
+
+ local enableaction = nodes.tasks.enableaction
+
+ function structurestags.initializeexport()
+ if not exporting then
+ report_export("enabling export to xml")
+ enableaction("shipouts","nodes.handlers.export")
+ enableaction("shipouts","nodes.handlers.accessibility")
+ enableaction("math", "noads.handlers.tags")
+ enableaction("everypar","nodes.handlers.checkparcounter")
+ luatex.registerstopactions(structurestags.finishexport)
+ exporting = true
+ end
+ end
+
+ function structurestags.setupexport(t)
+ merge(finetuning,t)
+ keephyphens = finetuning.hyphen == v_yes
+ exportproperties = finetuning.properties
+ if exportproperties == v_no then
+ exportproperties = false
+ end
+ end
+
+ statistics.register("xml exporting time", function()
+ if exporting then
+ return string.format("%s seconds, version %s", statistics.elapsedtime(treehash),exportversion)
+ end
+ end)
+
+end
+
+-- These are called at the tex end:
+
+implement {
+ name = "setupexport",
+ actions = structurestags.setupexport,
+ arguments = {
+ {
+ { "align" },
+ { "bodyfont", "dimen" },
+ { "width", "dimen" },
+ { "properties" },
+ { "hyphen" },
+ { "title" },
+ { "subtitle" },
+ { "author" },
+ { "firstpage" },
+ { "lastpage" },
+ { "svgstyle" },
+ { "cssfile" },
+ { "file" },
+ { "export" },
+ }
+ }
+}
+
+implement {
+ name = "finishexport",
+ actions = structurestags.finishexport,
+}
+
+implement {
+ name = "initializeexport",
+ actions = structurestags.initializeexport,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-exp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-exp.mkxl
new file mode 100644
index 00000000000..5aebd302fdc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-exp.mkxl
@@ -0,0 +1,361 @@
+%D \module
+%D [ file=back-exp,
+%D version=2010.08.22,
+%D title=\CONTEXT\ Backend Macros,
+%D subtitle=XML export,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% see t:/export/todo-fonts.tex for (future) experiment
+
+\writestatus{loading}{ConTeXt Backend Macros / XML export}
+
+\registerctxluafile{back-exp} {autosuffix}
+\registerctxluafile{back-exp-imp-tag}{autosuffix}
+\registerctxluafile{back-exp-imp-mth}{autosuffix}
+\registerctxluafile{back-exp-imp-ref}{autosuffix}
+
+%D This is an experimental exporter and a logical follow up on tagging. The
+%D exporter assumes a properly tagged document. Some elements get a couple
+%D of attributes because otherwise rendering information would get lost. In
+%D general we assume that when the \XML\ is converted to \HTML\ some stylesheet
+%D is applied anyway.
+
+\unprotect
+
+% we can replace this by a more generic attributeset mechanism where we bind
+% to any element (needed anyway, see userdata thingies)
+
+\definesystemattribute[taggedpar][public]
+
+\permanent\tolerant\protected\def\setelementexporttag[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or
+ \clf_settagproperty{#1}{export}{#2}%
+ \or
+ \clf_settagproperty{#1}{#2}{#3}%
+ \fi}
+
+% todo: no need for calls when trialtypesetting
+
+\permanent\def\taggedctxcommand
+ {\iftrialtypesetting
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\ctxcommand
+ \fi}
+
+\newcount\tagparcounter
+
+\aliased\let\dotagsetparcounter\relax
+\aliased\let\doresetparcounter \relax
+
+\appendtoks
+ \doresetparcounter
+\to \everyflushatnextpar
+
+% \appendtoks
+% \dotagsetparcounter
+% \to \everypar
+
+\prependtoks
+ \dotagsetparcounter
+\to \everypar
+
+% \appendtoks
+% \dotagsetparcounter
+% \to \neverypar
+
+\prependtoks
+ \dotagsetparcounter
+\to \neverypar
+
+\appendtoks
+ \dotagsetparcounter
+\to \everytabulatepar % tricky, maybe this should be neverypar
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagTABLEcell
+ {\iftrialtypesetting\else
+ \clf_settagtablecell
+ \numexpr\tablecellrows\relax
+ \numexpr\tablecellcolumns\relax
+ \numexpr\raggedstatus\relax
+ \fi}%
+ % brrr, we need to tag empty cells (unless we start numbering)
+ \enforced\permanent\protected\def\dotagTABLEsignal
+ {\signalcharacter}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagtabulatecell
+ {\iftrialtypesetting\else
+ \clf_settagtabulatecell\c_tabl_tabulate_align\c_tabl_tabulate_kind
+ \fi}%
+ \enforced\permanent\protected\def\dotagtabulatesignal
+ {\dontleavehmode\signalcharacter\ignorespaces}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsynonym
+ {\iftrialtypesetting\else\clf_settagsynonym{\currentsynonymtag}\fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsorting
+ {\iftrialtypesetting\else\clf_settagsorting{\currentsortingtag}\fi}%
+\to \everyenableelements
+
+\appendtoks % frozen and assumed global per highlight class
+ \enforced\permanent\protected\def\dotagconstruct
+ {\iftrialtypesetting\else
+ \clf_settagconstruct
+ {\currentstartstop}%
+ {\startstopparameter\c!style}%
+ \c_attr_color
+ \ifvmode\plusone\else\zerocount\fi
+ \relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks % frozen and assumed global per highlight class
+ \enforced\permanent\protected\def\dotaghighlight
+ {\iftrialtypesetting\else
+ \clf_settaghighlight
+ {\currenthighlight}%
+ {\highlightparameter\c!style}
+ \c_attr_color
+ \ifvmode\plusone\else\zerocount\fi
+ \relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks % we can have differently scaled images
+ \enforced\permanent\protected\def\dotagfigure
+ {\iftrialtypesetting\else
+ \clf_settagfigure
+ {\figurefileoriginal}%
+ {\figurefullname}%
+ {\figurefilepage}%
+ \dimexpr\figurewidth\relax
+ \dimexpr\figureheight\relax
+ {\figurelabel}%
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagcombination
+ {\iftrialtypesetting\else
+ \clf_settagcombination
+ \numexpr\combinationparameter\c!nx\relax
+ \numexpr\combinationparameter\c!ny\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsetparcounter
+ {\global\advance\tagparcounter\plusone\c_attr_taggedpar\tagparcounter}%
+ \enforced\permanent\protected\def\doresetparcounter
+ {\c_attr_taggedpar\attributeunsetvalue}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsetitemgroup
+ {\iftrialtypesetting\else
+ \clf_settagitemgroup
+ \ifconditional\c_strc_itemgroups_pack true\else false\fi\space
+ \numexpr\currentitemlevel\relax
+ {\currentitemgroupsymbol}%
+ \fi}%
+ \enforced\permanent\protected\def\dotagsetitem#1%
+ {\iftrialtypesetting\else
+ \clf_settagitem{#1}%
+ \fi}%
+\to \everyenableelements
+
+% \appendtoks
+% \enforced\permanent\protected\def\dotagsetdescription
+% {\iftrialtypesetting\else
+% \clf_settagdescription{\currentdescription}\currentdescriptionnumberentry\relax
+% \fi}%
+% \to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsetnotation
+ {\iftrialtypesetting\else
+ \clf_settagnotation{\currentnote}\currentnotenumber\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsetnotesymbol
+ {\iftrialtypesetting\else
+ \clf_settagnotationsymbol{\currentnote}\currentnotenumber\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagregisterlocation
+ {\iftrialtypesetting\else
+ \clf_settagregister{\currentregister}\currentregisternumber\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotaglistlocation
+ {\iftrialtypesetting\else
+ \clf_settaglist\currentlistindex\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsetdelimitedsymbol#1%
+ {\iftrialtypesetting\else
+ \clf_settagdelimitedsymbol{#1}\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagsetsubsentencesymbol#1%
+ {\iftrialtypesetting\else
+ \clf_settagsubsentencesymbol{#1}\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagregisterfloat#1#2%
+ {\iftrialtypesetting\else
+ \clf_settagfloat{#1}{#2}\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\let\specialfixedspace \explicitfixedspace
+ \enforced\let\specialobeyedspace \explicitobeyedspace
+ \enforced\let\specialstretchedspace\explicitstretchedspace
+ \enforced\let\specialcontrolspace \explicitcontrolspace
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagregisterformula#1%
+ {\iftrialtypesetting\else
+ \clf_settagformulacontent#1\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagmarginanchor#1%
+ {\iftrialtypesetting\else\clf_settagmarginanchor#1\relax\fi}%
+ \enforced\permanent\protected\def\dotagmargintext#1%
+ {\iftrialtypesetting\else\clf_settagmargintext#1\relax\fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagpublication#1#2%
+ {\iftrialtypesetting\else
+ \clf_settagpublication{#1}{#2}\relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagparagraph#1%
+ {\iftrialtypesetting\else
+ \clf_settagparagraph{#1}\relax
+ \fi}%
+\to \everyenableelements
+
+% The action: \setupbackend[export=yes] % or filename
+
+% maybe xhtml css settings will move to setupexport
+
+% maybe some day a definer
+
+\installcorenamespace{export}
+
+\installparameterhandler \??export {export}
+\installsetuphandler \??export {export}
+
+\setupexport
+ [\c!align=\number\raggedstatus,
+ \c!bodyfont=\bodyfontsize,
+ \c!width=\textwidth,
+ \c!title={\directinteractionparameter\c!title},
+ \c!subtitle={\directinteractionparameter\c!subtitle},
+ \c!author={\directinteractionparameter\c!author},
+ % \c!firstpage=, % imagename
+ % \c!lastpage=, % imagename
+ \c!properties=\v!no, % no: ignore, yes: as attribute, otherwise: use as prefix
+ \c!hyphen=\v!no,
+ \c!svgstyle=,
+ \c!cssfile=,
+ \c!file=]
+
+\resetsystemmode\v!export
+
+\permanent\protected\def\doinitializeexport
+ {\edef\p_export{\backendparameter\c!export}%
+ \ifempty\p_export \else
+ % yes | xml
+ \setuptagging[\c!state=\v!start]%
+ \clf_initializeexport
+ \setsystemmode\v!export
+ \exportingtrue
+ \writestatus\m!backend\empty % so messages will stand out a bit
+ \the\everyinitializeexport
+ \writestatus\m!backend\empty % so messages will stand out a bit
+ \enforced\glet\doinitializeexport\relax
+ \fi}
+
+\permanent\protected\def\dostartexport
+ {%\glet\dostartexport\relax
+ \let\currentexport\empty
+ \clf_setupexport
+ align {\exportparameter\c!align}%
+ bodyfont \dimexpr\exportparameter\c!bodyfont\relax
+ width \dimexpr\exportparameter\c!width\relax
+ properties {\exportparameter\c!properties}%
+ hyphen {\exportparameter\c!hyphen}%
+ title {\exportparameter\c!title}%
+ subtitle {\exportparameter\c!subtitle}%
+ author {\exportparameter\c!author}%
+ firstpage {\exportparameter\c!firstpage}%
+ lastpage {\exportparameter\c!lastpage}%
+ svgstyle {\exportparameter\c!svgstyle}%
+ cssfile {\exportparameter\c!cssfile}%
+ file {\exportparameter\c!file}%
+ export {\backendparameter\c!export}%
+ \relax}
+
+\permanent\protected\def\dostopexport
+ {\enforced\glet\dostopexport\relax
+ \clf_finishexport}
+
+\appendtoks
+ \doinitializeexport
+\to \everysetupbackend
+
+\appendtoks
+ \ifexporting
+ \dostartexport
+ \fi
+\to \everystarttext
+
+% better (before pdf gets closed, so we can embed), but it needs testing:
+
+\appendtoks
+ \ifexporting
+ \dostopexport
+ \fi
+\to \everystoptext
+
+\appendtoks
+ \ifexporting
+ \dostartexport % in case it is done inside \starttext
+ \fi
+\to \everystartdocument
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-ext.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-ext.mkxl
new file mode 100644
index 00000000000..a3d9d2633e8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-ext.mkxl
@@ -0,0 +1,95 @@
+%D \module
+%D [ file=back-ext,
+%D version=2019.02.08, % and later, merged file
+%D title=\CONTEXT\ Backend Macros,
+%D subtitle=Output,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% \registerctxluafile{back-ext}{autosuffix}
+
+\unprotect
+
+% \let\normalopenout \openout
+% \let\normalwrite \write
+% \let\normalcloseout\closeout
+% \let\normallatelua \latelua
+% \let\normalspecial \special
+
+% rotation
+
+\permanent\protected\def\dostartrotation#1%
+ {\forcecolorhack
+ \clf_startrotation#1\relax} % todo: implement without Q q
+
+\permanent\protected\def\dostoprotation
+ {\clf_stoprotation
+ \forcecolorhack}
+
+% scaling
+
+\permanent\protected\def\dostartscaling#1#2%
+ {\forcecolorhack
+ \clf_startscaling rx #1 ry #2\relax}
+
+\permanent\protected\def\dostopscaling
+ {\clf_stopscaling
+ \forcecolorhack}
+
+% mirroring
+
+\permanent\protected\def\dostartmirroring
+ {\clf_startmirroring}
+
+\permanent\protected\def\dostopmirroring
+ {\clf_stopmirroring}
+
+% transform
+
+\permanent\protected\def\dotransformnextbox#1#2#3#4#5#6%
+ {\dowithnextbox{\dodotransformnextbox{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+\permanent\protected\def\dodotransformnextbox#1#2#3#4#5#6%
+ {\hpack
+ {\kern #5\onebasepoint
+ \raise#6\onebasepoint
+ \hpack
+ {\clf_startmatrix rx #1 sx #2 sy #3 ry #4\relax
+ \box\nextbox
+ \clf_stopmatrix}}}
+
+%D \macros
+%D {dostartclipping,dostopclipping}
+%D
+%D Clipping is implemented in such a way that an arbitrary code can be fed.
+%D
+%D \starttyping
+%D \dostartclipping {pathname} {width} {height}
+%D \dostopclipping
+%D \stoptyping
+
+\mutable\let\MPclippath\empty
+
+\permanent\protected\def\dostartclipping#1#2#3% we can move this to lua and only set a box here
+ {\forcecolorhack
+ \meta_grab_clip_path{#1}{#2}{#3}%
+ \clf_startclipping{\MPclippath}%
+ \glet\MPclippath\empty}
+
+\permanent\protected\def\dostopclipping
+ {\clf_stopclipping}
+
+%D This wrapper is needed when you use code that messes with e.g. local color
+%D directives, invisible for the rest of the machinery. It's only needed in very
+%D special cases, like around the above scaler directives:
+
+\permanent\protected\edef\hcontainer{\hpack \s!direction\directionlefttoright \s!container\space}
+\permanent\protected\edef\vcontainer{\vpack \s!direction\directionlefttoright \s!container\space}
+\permanent\protected\edef\tcontainer{\tpack \s!direction\directionlefttoright \s!container\space}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-ini.lmt
new file mode 100644
index 00000000000..92270574249
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-ini.lmt
@@ -0,0 +1,127 @@
+if not modules then modules = { } end modules ['back-ini'] = {
+ version = 1.001,
+ comment = "companion to back-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, type = next, type
+local format = string.format
+
+backends = backends or { }
+local backends = backends
+
+local context = context
+
+local trace = false trackers.register("backend", function(v) trace = v end)
+local report = logs.reporter("backend")
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local setaction = nodes.tasks.setaction
+
+local implement = interfaces.implement
+local variables = interfaces.variables
+
+local texset = tex.set
+
+local nodeinjections = { }
+local codeinjections = { }
+local registrations = { }
+local tables = allocate()
+
+local function nothing()
+ return nil
+end
+
+backends.nothing = nothing
+
+local function donothing(t,k)
+ t[k] = nothing
+ return nothing
+end
+
+setmetatableindex(nodeinjections, donothing)
+setmetatableindex(codeinjections, donothing)
+setmetatableindex(registrations, donothing)
+
+local defaults = {
+ nodeinjections = nodeinjections,
+ codeinjections = codeinjections,
+ registrations = registrations,
+ tables = tables,
+}
+
+backends.defaults = defaults
+
+backends.nodeinjections = { } setmetatableindex(backends.nodeinjections, nodeinjections)
+backends.codeinjections = { } setmetatableindex(backends.codeinjections, codeinjections)
+backends.registrations = { } setmetatableindex(backends.registrations, registrations)
+backends.tables = { } setmetatableindex(backends.tables, tables)
+
+backends.current = "unknown"
+
+function backends.install(what)
+ if type(what) == "string" then
+ local backend = backends[what]
+ if backend then
+ if trace then
+ if backend.comment then
+ report("initializing backend %a, %a",what,backend.comment)
+ else
+ report("initializing backend %a",what)
+ end
+ end
+ backends.current = what
+ for category, default in next, defaults do
+ local target = backends[category]
+ local plugin = backend [category]
+ setmetatableindex(plugin, default)
+ setmetatableindex(target, plugin)
+ end
+ elseif trace then
+ report("no backend named %a",what)
+ end
+ end
+end
+
+statistics.register("used backend", function()
+ local bc = backends.current
+ if bc ~= "unknown" then
+ return format("%s (%s)",bc,backends[bc].comment or "no comment")
+ else
+ return nil
+ end
+end)
+
+-- can best be here
+
+interfaces.implement {
+ name = "setrealspaces",
+ arguments = "string",
+ actions = function(v)
+ setaction("shipouts","nodes.handlers.accessibility",v == variables.yes)
+ end
+}
+
+-- moved to here
+
+local included = table.setmetatableindex( {
+ context = true,
+ id = true,
+ metadata = true,
+ date = true,
+ id = true,
+ pdf = true,
+}, function(t,k)
+ return true
+end)
+
+backends.included = included
+
+-- could also be codeinjections
+
+function backends.getcallbackstate()
+ return { count = status.late_callbacks or 0 }
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-ini.mkxl
index 4e2fa351ef0..fad9c1e709d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-ini.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-ini.mkxl
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Backend Macros / Initialization}
-\registerctxluafile{back-ini}{}
+\registerctxluafile{back-ini}{autosuffix}
\unprotect
@@ -50,12 +50,6 @@
\clf_setrealspaces{\backendparameter\c!space}%
\to \everysetupbackend
-\appendtoks
- \ifdefined\clf_resetmapfile
- \clf_resetmapfile
- \fi
-\to \everysetupbackend
-
%D For the moment this is an experiment (defauls is pdf, but we also
%D have lua, json and mps).
%D
@@ -75,7 +69,6 @@
%D \stoptext
%D \stoptyping
-\unexpanded\def\setupoutput[#1]%
- {\clf_enabledriver{#1}}
+\permanent\protected\def\setupoutput[#1]{\clf_enabledriver{#1}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-lua.lua b/Master/texmf-dist/tex/context/base/mkxl/back-lua.lmt
index 4e95d37e3fb..dc836f12bb3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-lua.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['back-lua'] = {
version = 1.001,
+ optimize = true,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -227,10 +228,15 @@ local function flushrule(current, pos_h, pos_v, pos_r, size_h, size_v, subtype)
return rule(pos_h, pos_v, pos_r, size_h, size_v, rule_s, rule_o)
end
-local function flushsimplerule(current, pos_h, pos_v, pos_r, size_h, size_v)
+local function flushsimplerule(pos_h, pos_v, pos_r, size_h, size_v)
return rule(pos_h, pos_v, pos_r, size_h, size_v, "normal", nil)
end
+local function flushspecialrule(pos_h, pos_v, pos_r, w, h, d, l, outline)
+ -- no l support yet
+ return rule(pos_h, pos_v - d, pos_r, w, h + d, outline and "outline" or "normal")
+end
+
-- file stuff too
-- todo: default flushers
-- also color (via hash)
@@ -252,6 +258,8 @@ drivers.install {
updatefontstate = updatefontstate,
character = flushcharacter,
rule = flushrule,
+ simplerule = flushsimplerule,
+ specialrule = flushspecialrule,
}
}
@@ -299,6 +307,8 @@ drivers.install {
updatefontstate = updatefontstate,
character = flushcharacter,
rule = flushrule,
+ simplerule = flushsimplerule,
+ specialrule = flushspecialrule,
}
}
@@ -350,5 +360,7 @@ drivers.install {
updatefontstate = updatefontstate,
character = flushcharacter,
rule = flushrule,
+ simplerule = flushsimplerule,
+ specialrule = flushspecialrule,
}
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-lua.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-lua.mkxl
index 82ba8f9f196..0fb1bcc88ef 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-lua.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-lua.mkxl
@@ -11,8 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\ifcase\contextlmtxmode \else
- \registerctxluafile{back-lua}{optimize}
-\fi
+\registerctxluafile{back-lua}{autosuffix,optimize}
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-mps.lua b/Master/texmf-dist/tex/context/base/mkxl/back-mps.lmt
index 96c850ed63e..4a2a573c459 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-mps.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-mps.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['back-mps'] = {
version = 1.001,
+ optimize = true,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -136,9 +137,12 @@ local function flushrule(current, pos_h, pos_v, pod_r, size_h, size_v, subtype)
end
end
-local function flushsimplerule(current, pos_h, pos_v, pod_r, size_h, size_v)
- b = b + 1
- buffer[b] = f_rule(size_h*bpfactor,size_v*bpfactor,pos_h*bpfactor,pos_v*bpfactor)
+local function flushsimplerule(pos_h, pos_v, pod_r, size_h, size_v)
+ flush_rule(false,pos_h,pos_v,pod_r,size_h,size_v,normalrule_code)
+end
+
+local function flushspecialrule(pos_h, pos_v, pod_r, w, h, d, l, outline)
+ flush_rule(false,pos_h,pos_v-d,pod_r,w,h+d,outline and outlinerule_code or normalrule_code)
end
-- installer
@@ -159,6 +163,7 @@ drivers.install {
character = flushcharacter,
rule = flushrule,
simplerule = flushsimplerule,
+ specialrule = flushspecialrule,
}
}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/back-mps.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-mps.mkxl
index 0a6640614aa..d4d428d4203 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/back-mps.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-mps.mkxl
@@ -11,8 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\ifcase\contextlmtxmode \else
- \registerctxluafile{back-mps}{optimize}
-\fi
+\registerctxluafile{back-mps}{autosuffix,optimize}
\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-pdf.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-pdf.lmt
new file mode 100644
index 00000000000..44d0230bdd6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-pdf.lmt
@@ -0,0 +1,55 @@
+if not modules then modules = { } end modules ['back-pdf'] = {
+ version = 1.001,
+ comment = "companion to back-pdf.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- We hide the pdf table from users so that we can guarantee no interference with
+-- the way we manage resources, info, etc. Users should use the \type {lpdf}
+-- interface instead. If needed I will provide replacement functionality.
+
+local setmetatableindex = table.setmetatableindex
+
+local pdfsetcompression
+local pdfimmediateobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfsetcompression = lpdf.setcompression
+ pdfimmediateobject = lpdf.immediateobject
+end)
+
+interfaces.implement {
+ name = "setpdfcompression",
+ arguments = { "integer", "integer" },
+ actions = function(...) pdfsetcompression(...) end,
+}
+
+do
+
+ local dummy = function() end
+ local report = logs.reporter("backend")
+
+ local function unavailable(t,k)
+ report("calling unavailable pdf.%s function",k)
+ t[k] = dummy
+ return dummy
+ end
+
+ updaters.register("backend.update",function()
+ --
+ -- For now we keep this for tikz. If really needed some more can be made
+ -- accessible but it has to happen in a controlled way then, for instance
+ -- by first loading or enabling some compatibility layer so that we can
+ -- trace possible interferences.
+ --
+ pdf = {
+ immediateobj = pdfimmediateobject
+ }
+ setmetatableindex(pdf,unavailable)
+ end)
+
+end
+
+backends.install("pdf")
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-pdf.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-pdf.mkxl
new file mode 100644
index 00000000000..d59c29bc01c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-pdf.mkxl
@@ -0,0 +1,157 @@
+%D \module
+%D [ file=back-pdf,
+%D version=2009.04.15,
+%D title=\CONTEXT\ Backend Macros,
+%D subtitle=\PDF,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The less there is here, the better. After a decade it is time to remove the \type
+%D {\pdf*} ones completely. For the moment I keep them commented but even that will
+%D go away.
+
+\writestatus{loading}{ConTeXt Backend Macros / PDF}
+
+\registerctxluafile{lpdf-ini}{autosuffix,optimize}
+\registerctxluafile{lpdf-lmt}{autosuffix,optimize}
+\registerctxluafile{lpdf-col}{autosuffix}
+\registerctxluafile{lpdf-xmp}{autosuffix}
+\registerctxluafile{lpdf-ano}{autosuffix}
+\registerctxluafile{lpdf-res}{autosuffix}
+\registerctxluafile{lpdf-mis}{autosuffix}
+\registerctxluafile{lpdf-ren}{autosuffix}
+\registerctxluafile{lpdf-grp}{autosuffix}
+\registerctxluafile{lpdf-wid}{autosuffix}
+\registerctxluafile{lpdf-fld}{autosuffix}
+\registerctxluafile{lpdf-mov}{autosuffix}
+\registerctxluafile{lpdf-u3d}{autosuffix} % this will become a module
+%registerctxluafile{lpdf-swf}{} % this will become a module
+\registerctxluafile{lpdf-tag}{autosuffix}
+\registerctxluafile{lpdf-fmt}{autosuffix}
+\registerctxluafile{lpdf-pde}{autosuffix}
+\registerctxluafile{lpdf-img}{autosuffix,optimize}
+\registerctxluafile{lpdf-epa}{autosuffix}
+\registerctxluafile{lpdf-emb}{autosuffix,optimize}
+\registerctxluafile{lpdf-fnt}{autosuffix}
+\registerctxluafile{lpdf-rul}{autosuffix}
+
+\registerctxluafile{back-pdp}{autosuffix}
+\registerctxluafile{back-pdf}{autosuffix} % some code will move to lpdf-*
+
+\loadmkxlfile{back-u3d} % this will become a module
+%loadmkxlfile{back-swf} % this will become a module
+
+\unprotect
+
+%D We will minimize the number of calls to \PDF\ specific primitives and delegate
+%D all management and injection of code to the backend.
+%D
+%D Because we do a lot in \LUA\ and don't want interferences, we nil most of the
+%D \PDFTEX\ primitives. Of course one can always use the \type {\pdfvariable},
+%D \type {\pdfextension} and \type {\pdffeedback} primitives but it will probably
+%D have bad side effects.
+
+\permanent\protected\def\pdfextension{\clf_pdfextension}
+\permanent \def\pdffeedback {\clf_pdffeedback}
+\permanent \def\pdfvariable {\clf_pdfvariable}
+
+%D For the moment we keep this for tikz but hopefully it will at some point use
+%D the proper ones. Consider them obsolete:
+
+\permanent\protected\def\pdfliteral {\clf_pdfliteral}
+\permanent\protected\def\pdfobj {\clf_pdfobj}%
+\permanent\protected\def\pdflastobj {\numexpr\clf_pdflastobj\relax}
+\permanent\protected\def\pdfrefobj {\clf_pdfrefobj}
+
+\permanent\protected\def\pdfrestore {\pdfextension restore}
+\permanent\protected\def\pdfsave {\pdfextension save}
+\permanent\protected\def\pdfsetmatrix{\pdfextension setmatrix}
+
+\permanent\let\pdfxform \saveboxresource
+\permanent\let\pdflastxform\lastsavedboxresourceindex
+\permanent\let\pdfrefxform \useboxresource
+
+%D Here are quick and dirty compression flippers, mostly used when testing something
+%D as one can best stick to the defaults that also adapt to specific standards.
+
+\permanent\protected\def\nopdfcompression {\clf_setpdfcompression\zerocount\zerocount}
+\permanent\protected\def\onlypdfobjectcompression{\clf_setpdfcompression\zerocount\plusthree}
+\permanent\protected\def\maximumpdfcompression {\clf_setpdfcompression\plusnine \plusnine }
+\permanent\protected\def\normalpdfcompression {\clf_setpdfcompression\plusthree\plusthree}
+
+%D PDF/X (maybe combine the two lua calls)
+
+\setupbackend
+ [xmpfile=]
+
+\appendtoks
+ \edef\p_file{\backendparameter{xmpfile}}%
+ \ifempty\p_file\else
+ \clf_setxmpfile{\p_file}%
+ \fi
+\to \everysetupbackend
+
+%D This will change:
+
+\appendtoks
+ \clf_setformat
+ format {\backendparameter\c!format}%
+ level {\backendparameter\c!level}%
+ option {\backendparameter\c!option}%
+ profile {\backendparameter\c!profile}%
+ intent {\backendparameter\c!intent}%
+ file {\backendparameter\c!file}%
+ \relax
+\to \everysetupbackend
+
+%D These are the only official methods to add stuff to the resources. If more is
+%D needed for third party low level code, it can be added.
+
+\permanent\protected\def\pdfbackendsetcatalog #1#2{\clf_lpdf_addtocatalog{#1}{#2}}
+\permanent\protected\def\pdfbackendsetinfo #1#2{\clf_lpdf_addtoinfo{#1}{#2}}
+\permanent\protected\def\pdfbackendsetname #1#2{\clf_lpdf_addtonames{#1}{#2}}
+
+\permanent\protected\def\pdfbackendsetpageattribute #1#2{\clf_lpdf_addtopageattributes{#1}{#2}}
+\permanent\protected\def\pdfbackendsetpagesattribute#1#2{\clf_lpdf_addtopagesattributes{#1}{#2}}
+\permanent\protected\def\pdfbackendsetpageresource #1#2{\clf_lpdf_addtopageresources{#1}{#2}}
+
+\permanent\protected\def\pdfbackendsetextgstate #1#2{\clf_lpdf_adddocumentextgstate{#1}{#2}}
+\permanent\protected\def\pdfbackendsetcolorspace #1#2{\clf_lpdf_adddocumentcolorspace{#1}{#2}}
+\permanent\protected\def\pdfbackendsetpattern #1#2{\clf_lpdf_adddocumentpattern{#1}{#2}}
+\permanent\protected\def\pdfbackendsetshade #1#2{\clf_lpdf_adddocumentshade{#1}{#2}}
+
+\permanent \def\pdfbackendcurrentresources {\clf_lpdf_collectedresources}
+\permanent \def\pdfcolor #1{\clf_lpdf_color\numexpr\rawcolorattribute{#1}\relax}
+
+%D This is a temporary hack mthat will be removed, improved or somehow can become
+%D default.
+
+\permanent\def\TransparencyHack{\setupcolors[\c!pagecolormodel=\v!auto]}
+
+%D Just in case one needs this \unknown:
+%D
+%D \starttyping
+%D text \pdfbackendactualtext{Meier}{Müller} text
+%D \stoptyping
+
+\permanent\protected\def\pdfbackendactualtext#1#2% not interfaced
+ {\clf_startactualtext{#2}%
+ #1%
+ \clf_stopactualtext}
+
+\aliased\let\pdfactualtext\pdfbackendactualtext
+
+%D Bah, this is also needed for tikz:
+
+\ifdefined\pdfsavepos\else
+ \permanent\let\pdfsavepos \savepos
+ \permanent\let\pdflastxpos\lastxpos
+ \permanent\let\pdflastypos\lastypos
+\fi
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-pdp.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-pdp.lmt
new file mode 100644
index 00000000000..1b3a1700790
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-pdp.lmt
@@ -0,0 +1,291 @@
+if not modules then modules = { } end modules ['back-pdp'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is temporary ... awaiting a better test .. basically we can
+-- always use this: pdf primitives.
+
+local context = context
+local lpdf = lpdf
+
+local pdfreserveobject
+local pdfcompresslevel
+local pdfobject
+local pdfpagereference
+local pdfgetxformname
+local pdfminorversion
+local pdfmajorversion
+
+updaters.register("backend.update.lpdf",function()
+ pdfreserveobject = lpdf.reserveobject
+ pdfcompresslevel = lpdf.compresslevel
+ pdfobject = lpdf.object
+ pdfpagereference = lpdf.pagereference
+ pdfgetxformname = lpdf.getxformname
+ pdfminorversion = lpdf.minorversion
+ pdfmajorversion = lpdf.majorversion
+end)
+
+local tokenscanners = tokens.scanners
+local scanword = tokenscanners.word
+local scankeyword = tokenscanners.keyword
+local scanstring = tokenscanners.string
+local scaninteger = tokenscanners.integer
+local scanwhd = tokenscanners.whd
+
+local trace = false trackers.register("backend", function(v) trace = v end)
+local report = logs.reporter("backend")
+
+local nodepool = nodes.pool
+local newliteral = nodepool.literal
+local newsave = nodepool.save
+local newrestore = nodepool.restore
+local newsetmatrix = nodepool.setmatrix
+
+local implement = interfaces.implement
+local constants = interfaces.constants
+local variables = interfaces.variables
+
+-- literals
+
+local function pdf_literal()
+ context(newliteral(scanword() or "origin",scanstring()))
+end
+
+-- objects
+
+local lastobjnum = 0
+
+local function pdf_obj()
+ if scankeyword("reserveobjnum") then
+ lastobjnum = pdfreserveobject()
+ if trace then
+ report("\\pdfobj reserveobjnum: object %i",lastobjnum)
+ end
+ else
+ local immediate = true
+ local objnum = scankeyword("useobjnum") and scaninteger() or pdfreserveobject()
+ local uncompress = scankeyword("uncompressed") or pdfcompresslevel() == 0
+ local streamobject = scankeyword("stream")
+ local attributes = scankeyword("attr") and scanstring() or nil
+ local fileobject = scankeyword("file")
+ local content = scanstring()
+ local object = streamobject and {
+ type = "stream",
+ objnum = objnum,
+ immediate = immediate,
+ attr = attributes,
+ compresslevel = uncompress and 0 or nil,
+ } or {
+ type = "raw",
+ objnum = objnum,
+ immediate = immediate,
+ }
+ if fileobject then
+ object.file = content
+ -- object.filename = content
+ else
+ object.string = content
+ end
+ pdfobject(object)
+ lastobjnum = objnum
+ if trace then
+ report("\\pdfobj: object %i",lastobjnum)
+ end
+ end
+end
+
+local function pdf_lastobj()
+ context("%i",lastobjnum)
+ if trace then
+ report("\\lastobj: object %i",lastobjnum)
+ end
+end
+
+local function pdf_refobj()
+ local objnum = scaninteger()
+ if trace then
+ report("\\refobj: object %i (todo)",objnum)
+ end
+end
+
+-- annotations
+
+local lastobjnum = 0
+
+local function pdf_annot()
+ if scankeyword("reserveobjnum") then
+ lastobjnum = pdfreserveobject()
+ if trace then
+ report("\\pdfannot reserveobjnum: object %i",lastobjnum)
+ end
+ else
+ local width = false
+ local height = false
+ local depth = false
+ local data = false
+ local object = false
+ local attr = false
+ --
+ if scankeyword("useobjnum") then
+ object = scancount()
+ report("\\pdfannot useobjectnum is not (yet) supported")
+ end
+ local width, height, depth = scanwhd()
+ if scankeyword("attr") then
+ attr = scanstring()
+ end
+ data = scanstring()
+ context(backends.nodeinjections.annotation(width or 0,height or 0,depth or 0,data or ""))
+ end
+end
+
+local function pdf_dest()
+ local name = false
+ local zoom = false
+ local view = false
+ local width = false
+ local height = false
+ local depth = false
+ if scankeyword("num") then
+ report("\\pdfdest num is not (yet) supported")
+ elseif scankeyword("name") then
+ name = scanstring()
+ end
+ if scankeyword("xyz") then
+ view = "xyz"
+ if scankeyword("zoom") then
+ report("\\pdfdest zoom is ignored")
+ zoom = scancount() -- will be divided by 1000 in the backend
+ end
+ elseif scankeyword("fitbh") then
+ view = "fitbh"
+ elseif scankeyword("fitbv") then
+ view = "fitbv"
+ elseif scankeyword("fitb") then
+ view = "fitb"
+ elseif scankeyword("fith") then
+ view = "fith"
+ elseif scankeyword("fitv") then
+ view = "fitv"
+ elseif scankeyword("fitr") then
+ view = "fitr"
+ width, height, depth = scanwhd()
+ elseif scankeyword("fit") then
+ view = "fit"
+ end
+ context(backends.nodeinjections.destination(width or 0,height or 0,depth or 0,{ name or "" },view or "fit"))
+end
+
+-- management
+
+local function pdf_save()
+ context(newsave())
+end
+
+local function pdf_restore()
+ context(newrestore())
+end
+
+local function pdf_setmatrix()
+ context(newsetmatrix(scanstring()))
+end
+
+-- extras
+
+-- extensions: literal dest annot save restore setmatrix obj refobj colorstack
+-- startlink endlink startthread endthread thread outline glyphtounicode fontattr
+-- mapfile mapline includechars catalog info names trailer
+
+local extensions = {
+ literal = pdf_literal,
+ obj = pdf_obj,
+ refobj = pdf_refobj,
+ dest = pdf_dest,
+ annot = pdf_annot,
+ save = pdf_save,
+ restore = pdf_restore,
+ setmatrix = pdf_setmatrix,
+}
+
+local function pdf_extension()
+ local w = scanword()
+ if w then
+ local e = extensions[w]
+ if e then
+ e()
+ else
+ report("\\pdfextension: unsupported %a",w)
+ end
+ end
+end
+
+-- feedbacks: colorstackinit creationdate fontname fontobjnum fontsize lastannot
+-- lastlink lastobj pageref retval revision version xformname
+
+local feedbacks = {
+ lastobj = pdf_lastobj,
+ pageref = function() context(pdfpagereference()) end,
+ xformname = function() context(pdfgetxformname ()) end,
+}
+
+local function pdf_feedback()
+ local w = scanword()
+ if w then
+ local f = feedbacks[w]
+ if f then
+ f()
+ else
+ report("\\pdffeedback: unsupported %a",w)
+ end
+ end
+end
+
+-- variables: (integers:) compresslevel decimaldigits gamma gentounicode
+-- ignoreunknownimages imageaddfilename imageapplygamma imagegamma imagehicolor
+-- imageresolution inclusioncopyfonts inclusionerrorlevel majorversion minorversion
+-- objcompresslevel omitcharset omitcidset pagebox pkfixeddpi pkresolution
+-- recompress suppressoptionalinfo uniqueresname (dimensions:) destmargin horigin
+-- linkmargin threadmargin vorigin xformmargin (tokenlists:) pageattr pageresources
+-- pagesattr pkmode trailerid xformattr xformresources
+
+local variables = {
+ minorversion = function() context(pdfminorversion()) end,
+ majorversion = function() context(pdfmajorversion()) end,
+}
+
+local function pdf_variable()
+ local w = scanword()
+ if w then
+ local f = variables[w]
+ if f then
+ f()
+ else
+ report("\\pdfvariable: unsupported %a",w)
+ end
+ else
+ print("missing variable")
+ end
+end
+
+-- kept:
+
+implement { name = "pdfextension", actions = pdf_extension }
+implement { name = "pdffeedback", actions = pdf_feedback }
+implement { name = "pdfvariable", actions = pdf_variable }
+
+-- for the moment (tikz)
+
+implement { name = "pdfliteral", actions = pdf_literal }
+implement { name = "pdfobj", actions = pdf_obj }
+implement { name = "pdflastobj", actions = pdf_lastobj }
+implement { name = "pdfrefobj", actions = pdf_refobj }
+--------- { name = "pdfannot", actions = pdf_annot }
+--------- { name = "pdfdest", actions = pdf_dest }
+--------- { name = "pdfsave", actions = pdf_save }
+--------- { name = "pdfrestore", actions = pdf_restore }
+--------- { name = "pdfsetmatrix", actions = pdf_setmatrix }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-res.lmt b/Master/texmf-dist/tex/context/base/mkxl/back-res.lmt
new file mode 100644
index 00000000000..3157b37ef61
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-res.lmt
@@ -0,0 +1,177 @@
+if not modules then modules = { } end modules ['back-res'] = {
+ version = 1.001,
+ comment = "companion to back-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local context = context
+
+local trace = false trackers.register("backend", function(v) trace = v end)
+local report = logs.reporter("backend")
+
+local scanners = tokens.scanners
+local scankeyword = scanners.keyword
+local scaninteger = scanners.integer
+local scanstring = scanners.string
+local scandimension = scanners.dimension
+local scanword = scanners.word
+local scanwhd = scanners.whd
+
+local implement = interfaces.implement
+local constants = interfaces.constants
+local variables = interfaces.variables
+
+-- A box resource has an index. This happens to be an object number due to the pdf
+-- backend but in fact it's an abstraction. This is why we have explicit fetchers.
+-- The internal number (as in \Fm123) is yet another number.
+
+local tex_saveboxresource = tex.saveboxresource
+local tex_useboxresource = tex.useboxresource
+local tex_getboxresourcebox = tex.getboxresourcebox
+local tex_getboxresourcedimensions = tex.getboxresourcedimensions
+
+updaters.register("backend.update",function()
+ tex_saveboxresource = tex.saveboxresource
+ tex_useboxresource = tex.useboxresource
+ tex_getboxresourcebox = tex.getboxresourcebox
+ tex_getboxresourcedimensions = tex.getboxresourcedimensions
+end)
+
+local savebox = function(...) return tex_saveboxresource(...) end
+local usebox = function(...) return tex_useboxresource(...) end
+local getbox = function(...) return tex_getboxresourcebox(...) end
+local getwhd = function(...) return tex_getboxresourcedimensions(...) end
+
+local boxresources = {
+ save = savebox,
+ use = usebox,
+ getbox = getbox,
+ getdimensions = getwhd,
+}
+
+tex.boxresources = boxresources
+
+local lastindex = 0
+
+local function saveboxresource()
+ local immediate = true
+ local kind = scankeyword("type") and scaninteger() or 0
+ local attributes = scankeyword("attr") and scanstring() or nil
+ local resources = scankeyword("resources") and scanstring() or nil
+ local margin = scankeyword("margin") and scandimension() or 0 -- register
+ local boxnumber = scaninteger()
+ --
+ lastindex = savebox(boxnumber,attributes,resources,immediate,kind,margin)
+ if trace then
+ report("\\saveboxresource: index %i",lastindex)
+ end
+end
+
+local function lastsavedboxresourceindex()
+ if trace then
+ report("\\lastsaveboxresource: index %i",lastindex)
+ end
+ context("%i",lastindex)
+end
+
+local function useboxresource()
+ local width, height, depth = scanwhd()
+ local index = scaninteger()
+ local node = usebox(index,width,height,depth)
+ if trace then
+ report("\\useboxresource: index %i",index)
+ end
+ context(node)
+end
+
+implement { name = "saveboxresource", actions = saveboxresource }
+implement { name = "lastsavedboxresourceindex", actions = lastsavedboxresourceindex }
+implement { name = "useboxresource", actions = useboxresource }
+
+-- image resources
+
+local imageresources = { }
+local lastindex = 0
+local lastpages = 1
+
+local function saveimageresource()
+ local width, height, depth = scanwhd()
+ local page = 1
+ local immediate = true
+ local margin = 0 -- or dimension
+ local attributes = scankeyword("attr") and scanstring() or nil
+ if scankeyword("named") then
+ scanstring() -- ignored
+ elseif scankeyword("page") then
+ page = scaninteger()
+ end
+ local userpassword = scankeyword("userpassword") and scanstring() or nil
+ local ownerpassword = scankeyword("ownerpassword") and scanstring() or nil
+ local visiblefilename = scankeyword("visiblefilename") and scanstring() or nil
+ local colorspace = scankeyword("colorspace") and scaninteger() or nil
+ local pagebox = scanword() or nil
+ local filename = scanstring()
+-- pcall
+ context.getfiguredimensions( { filename }, {
+ [constants.userpassword] = userpassword,
+ [constants.ownerpassword] = ownerpassword,
+ [constants.page] = page or 1,
+ [constants.size] = pagebox,
+ })
+ context.relax()
+ lastindex = lastindex + 1
+ lastpages = 1
+ imageresources[lastindex] = {
+ filename = filename,
+ page = page or 1,
+ size = pagebox,
+ width = width,
+ height = height,
+ depth = depth,
+ attr = attributes,
+ -- margin = margin,
+ }
+end
+
+local function lastsavedimageresourceindex()
+ context("%i",lastindex or 0)
+end
+
+local function lastsavedimageresourcepages()
+ context("%i",lastpages or 0) -- todo
+end
+
+local function useimageresource()
+ local width, height, depth = scanwhd()
+ if scankeyword("keepopen") then
+ -- ignored
+ end
+ local index = scaninteger()
+ local l = imageresources[index]
+ if l then
+ if not (width or height or depth) then
+ width = l.width
+ height = l.height
+ depth = l.depth
+ end
+ -- pcall / we could use a dedicated call instead:
+ context.externalfigure( { l.filename }, {
+ [constants.userpassword] = l.userpassword,
+ [constants.ownerpassword] = l.ownerpassword,
+ [constants.width] = width and (width .. "sp") or nil,
+ [constants.height] = height and (height .. "sp") or nil,
+ [constants.page] = l.page or 1,
+ [constants.size] = pagebox,
+ })
+ context.relax()
+ else
+ report("no valid image resource %a",index)
+ end
+end
+
+implement { name = "saveimageresource", actions = saveimageresource }
+implement { name = "lastsavedimageresourceindex", actions = lastsavedimageresourceindex }
+implement { name = "lastsavedimageresourcepages", actions = lastsavedimageresourcepages }
+implement { name = "useimageresource", actions = useimageresource }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-res.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-res.mkxl
new file mode 100644
index 00000000000..8a18eef991f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-res.mkxl
@@ -0,0 +1,34 @@
+%D \module
+%D [ file=back-res,
+%D version=2019.05.23, % 2009.04.15,
+%D title=\CONTEXT\ Backend Macros,
+%D subtitle=Resources,
+%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 Backend Macros / Resources}
+
+\registerctxluafile{back-res}{autosuffix}
+
+\unprotect
+
+%D We overload the primitives with our own but use a bit of indirection for the
+%D purpose of tracing. Some of these are needed for packages like tikz.
+
+% todo: public implementors (we can update the lua code anyway)
+
+\permanent\protected\def\saveboxresource {\clf_saveboxresource}
+\permanent\protected\def\lastsavedboxresourceindex {\numexpr\clf_lastsavedboxresourceindex\relax}
+\permanent\protected\def\useboxresource {\clf_useboxresource}
+
+\permanent\protected\def\saveimageresource {\clf_saveimageresource}
+\permanent\protected\def\lastsavedimageresourceindex{\numexpr\clf_lastsavedimageresourceindex\relax}
+\permanent\protected\def\lastsavedimageresourcepages{\numexpr\clf_lastsavedimageresourcepages\relax}
+\permanent\protected\def\useimageresource {\clf_useimageresource}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/back-u3d.mkxl b/Master/texmf-dist/tex/context/base/mkxl/back-u3d.mkxl
new file mode 100644
index 00000000000..297dd554579
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/back-u3d.mkxl
@@ -0,0 +1,158 @@
+%D \module
+%D [ file=back-u3d,
+%D version=2009.04.15,
+%D title=\CONTEXT\ Backend Macros,
+%D subtitle=U3D Experiment,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is only a placeholder that demonstrates the usage of u3d resources. The
+%D user interface is rather messy an might be improved. The files and setup is
+%D derived from an example by Michael Vidiassov.
+
+\endinput
+
+\starttext
+
+\startluaparameterset [u3d:myset:controls:1]
+ view = {
+ name = 'default',
+ bg = {1,1,1},
+ mag = 100,
+ coo = {0,0,0},
+ c2c = {0,0,1},
+ rot = {40,0,60},
+ roo = 6,
+ lights = 'CAD'
+ },
+ js = 'cloudq.js'
+\stopluaparameterset
+
+\startluaparameterset [u3d:myset:controls:2]
+ views = {
+ {
+ name = 'AnglePositioning',
+ bg = {1,1,1},
+ azimuth = 45,
+ altitude = 45,
+ roo = 50,
+ aac = 2.5,
+ lights = 'Artwork'
+ },
+ {
+ name = 'RotationPositioning',
+ bg = {1,1,1},
+ rot = {0,45,45},
+ roo = 50,
+ aac = 2.5,
+ lights = 'Artwork'
+ },
+ {
+ name = 'VectorPositioning',
+ bg = {1,0,0},
+ c2c = {1,1,math.sqrt(2)},
+ roo = 50,
+ aac = 2.5,
+ lights = 'CAD'
+ },
+ {
+ name = 'PositionPositioning',
+ bg = {1,0,0},
+ pos = {1+25,1+25,1+50/math.sqrt(2)},
+ aac = 2.5,
+ lights = 'CAD'
+ },
+ {
+ name = 'ortho',
+ bg = {1,1,1},
+ mag = 300,
+ lights = 'CAD',
+ crossection = {}
+ }
+ },
+ view = {
+ name = 'default',
+ bg = {1,1,1},
+ c2c = {-1,-1,0},
+ roo = 50,
+ aac = 2.5,
+ roll = 45,
+ lights = 'CAD',
+ crossection = {
+ normal = {-1,-1,-1},
+ transparent = true
+ },
+ nodes = {
+ {
+ name = 'xlabel',
+ visible = false
+ },
+ {
+ name = 'ylabel',
+ opacity = 0.5
+ },
+ {
+ name = 'zlabel',
+ rendermode = 'Wireframe'
+ }
+ }
+ }
+\stopluaparameterset
+
+\useexternalfigure
+ [cloudq]
+ [cloudq.u3d]
+ [width=0.7\textwidth,
+ height=.7\textwidth,
+ display=u3d:myset:display:1,
+ controls=u3d:myset:controls:1]
+
+\useexternalfigure
+ [axes]
+ [axes.u3d]
+ [width=0.7\textwidth,
+ height=.7\textwidth,
+ controls=u3d:myset:controls:1]
+
+\startluaparameterset[u3d:myset:display:2]
+ toolbar = true,
+ preview = 'cloudq.png'
+\stopluaparameterset
+
+\startluaparameterset[u3d:myset:display:3]
+ toolbar = true,
+ tree = false,
+ preview = 'axes.png'
+\stopluaparameterset
+
+\startluaparameterset[u3d:myset:display:4]
+ toolbar = true,
+ tree = false,
+ view = {
+ name = 'view',
+ bg = {0.1,0.1,0.1},
+ c2c = {-1,-1,0},
+ roo = 50,
+ aac = 2.5,
+ roll = 45,
+ lights = 'Red'
+ }
+\stopluaparameterset
+
+\startluaparameterset[u3d:myset:display:5]
+ toolbar = true,
+ tree = false,
+ view = 'ortho'
+\stopluaparameterset
+
+\placefigure[here]{none}{\externalfigure[cloudq][display=u3d:myset:display:2]}
+\placefigure[here]{none}{\externalfigure[axes] [display=u3d:myset:display:3]}
+\placefigure[here]{none}{\externalfigure[axes] [display=u3d:myset:display:4]}
+\placefigure[here]{none}{\externalfigure[axes] [display=u3d:myset:display:5,width=0.5\textwidth,height=.5\textwidth]}
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/bibl-bib.mkxl b/Master/texmf-dist/tex/context/base/mkxl/bibl-bib.mkxl
new file mode 100644
index 00000000000..20aea7bb612
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/bibl-bib.mkxl
@@ -0,0 +1,983 @@
+%D \module
+%D [ file=bibl-bib,
+%D version=2007.08.17,
+%D title=\CONTEXT\ Bibliography Support,
+%D subtitle=Initialization,
+%D author=Hans Hagen \& Taco Hoekwater,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is really obsolete in \LMTX. For now I keep it but it will either go
+%D away. The code is not upgraded, we only deal with macro protection. I will
+%D only update the bits that annoy me in grepping for possible optimizations.
+
+\writestatus{loading}{ConTeXt Bibliography Support / Experimental BibTeX}
+
+\registerctxluafile{bibl-bib}{}
+
+\unprotect
+
+% todo: et al limiters
+% todo: split: citationvariant and publicationvariant
+
+%D This interface is under development. As I don't use \BIBTEX\ myself I need some
+%D motivation to spend time on it, and an occasional question on the list can be a
+%D reason. A few examples. As \BIBTEX\ databases can be poluted by local commands,
+%D we need to catch:
+%D
+%D \startbuffer
+%D \defbibtexcommand\MF {MF}
+%D \defbibtexcommand\MP {MP}
+%D \defbibtexcommand\TUB {TUGboat}
+%D \defbibtexcommand\Mc {Mac}
+%D \defbibtexcommand\sltt{\tt}
+%D \defbibtexcommand\<#1>{\type{#1}}
+%D \defbibtexcommand\acro#1{#1}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Let's define a session and load a few databases. We convert to \UTF\ and strip
+%D commands.
+%D
+%D \startbuffer
+%D \definebibtexsession [somebibtex]
+%D \registerbibtexfile [somebibtex] [tugboat.bib]
+%D \registerbibtexfile [somebibtex] [komoedie.bib]
+%D \preparebibtexsession [somebibtex] [convert,strip]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This loads an mapping (work in progress):
+%D
+%D \startbuffer
+%D \def\currentbibtexformat{apa} \input bxml-\currentbibtexformat.mkiv
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D There are several ways to handle the \XML. It helps if you're a bit familiar with
+%D \XML\ processing in \MKIV.
+%D
+%D Here we regular setups. Three elements are mapped but only one is actually used
+%D and applied to root element \type {/bibtex}.
+%D
+%D \startbuffer
+%D \startxmlsetups bibtex
+%D \xmlregistereddocumentsetups{#1}{}
+%D \xmlsetsetup{#1}{bibtex|entry|field}{bibtex:*}
+%D \xmlmain{#1}
+%D \stopxmlsetups
+%D
+%D \startxmlsetups bibtex:bibtex
+%D \xmlfilter{#1}{
+%D /entry[@category='article']
+%D /field[@name='author' and (find(text(),'Hagen') or find(text(),'Hoekwater'))]
+%D /../command(bibtex:format)
+%D }
+%D \stopxmlsetups
+%D
+%D \applytobibtexsession[somebibtex][bibtex]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D A simpler setup is given next. Here we just apply a setup to the root element
+%D directly:
+%D
+%D \startbuffer
+%D \startxmlsetups bibtex:list
+%D \xmlfilter{#1}{/bibtex/entry/command(bibtex:format)}
+%D \stopxmlsetups
+%D
+%D \applytobibtexsession[somebibtex][bibtex:list]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D A slightly more complex expression:
+%D
+%D \startbuffer
+%D \startxmlsetups bibtex:filter
+%D \xmlfilter{#1}{
+%D /bibtex
+%D /entry[@category='article']
+%D /field[@name='author' and (find(text(),'Hagen') or find(text(),'Hoekwater'))]
+%D /../command(bibtex:format)
+%D }
+%D \stopxmlsetups
+%D
+%D \applytobibtexsession[somebibtex][bibtex:filter]
+%D \stopbuffer
+%D
+%D \typebuffer
+
+\newtoks \everydefinebibtexsession
+\newtoks \everypreparebibtexsession
+\newtoks \everysetupbibtexsession
+\setfalse \tracebibtexformat
+
+\protected\def\definebibtexsession {\dosingleargument\dodefinebibtexsession}
+ \def\preparebibtexsession{\dodoubleempty \dopreparebibtexsession}
+\protected\def\setupbibtexsession {\dodoubleargument\dosetupbibtexsession}
+
+\def\dodefinebibtexsession [#1]{\edef\currentbibtexsession{#1}%
+ \ctxcommand{definebibtexsession("#1")}%
+ \the\everydefinebibtexsession}
+
+\def\dopreparebibtexsession[#1][#2]{\edef\currentbibtexsession{#1}%
+ \ctxcommand{preparebibtexsession("#1","bibtex:#1","#2")}%
+ \the\everypreparebibtexsession}
+
+\def\dosetupbibtexsession [#1][#2]{\edef\currentbibtexsession{#1}%
+ \getparameters[\??pb#1][#2]%
+ \the\everysetupbibtexsession}
+
+\def\registerbibtexfile {\dodoubleargument\doregisterbibtexfile}
+\def\registerbibtexentry {\dodoubleargument\doregisterbibtexentry}
+\def\applytobibtexsession {\dodoubleargument\doapplytobibtexsession}
+
+\def\doregisterbibtexfile [#1][#2]{\ctxcommand{registerbibtexfile("#1","#2")}}
+\def\doregisterbibtexentry [#1][#2]{\ctxcommand{registerbibtexentry("#1","#2")}}
+\def\doapplytobibtexsession[#1][#2]{\xmlprocess{bibtex:#1}{#2}{#2}}
+
+\protected\def\bibtexcommand#1%
+ {\ifcsname\??pb:c:#1\endcsname \else
+ \fakebibtexcommand{#1}%
+ \fi
+ \csname\??pb:c:#1\endcsname}
+
+\def\fakebibtexcommand#1%
+ {\ifcsname#1\endcsname
+ \writestatus{bibtex}{unknown command: #1, using built-in context variant}%
+ \setugvalue{\??pb:c:#1}{\dosomebibtexcommand{#1}}%
+ \else
+ \writestatus{bibtex}{unknown command: #1}%
+ \setugvalue{\??pb:c:#1}{\dofakebibtexcommand{#1}}%
+ \fi}
+
+\let\dosomebibtexcommand \getvalue
+\def\dofakebibtexcommand#1{{\tttf#1}}
+\def\defbibtexcommand #1{\setuvalue{\strippedcsname#1}}
+
+\def\bibxmldoifelse#1{\xmldoifelse\currentbibxmlnode{/field[@name='#1']}}
+\def\bibxmldoif #1{\xmldoif \currentbibxmlnode{/field[@name='#1']}}
+\def\bibxmldoifnot #1{\xmldoifnot \currentbibxmlnode{/field[@name='#1']}}
+\def\bibxmlflush #1{\xmlcontext \currentbibxmlnode{/field[@name='#1']}}
+\def\bibxmlsetup {\xmlsetup \currentbibxmlnode} % {#1}
+
+\def\currentbibtexformat{apa} % how to interface this, maybe split loading and key
+\def\currentbibxmlnode {unset}
+\def\currentbibxmltag {unset}
+
+\startxmlsetups bibtex
+ \xmlregistereddocumentsetups{#1}{}
+ \xmlsetsetup{#1}{bibtex|entry|field}{bibtex:*}
+ \xmlmain{#1}
+\stopxmlsetups
+
+\startxmlsetups bibtex:format
+ \bibtexpublicationsparameter\c!before\relax % prevents lookahead
+ \edef\currentbibxmlnode {#1}
+ \edef\currentbibxmltag {\xmlatt{#1}{tag}}
+ \edef\currentbibxmlcategory{\xmlatt{#1}{category}}
+ \ifconditional\tracebibtexformat
+ \tracedbibxmlintro\currentbibxmltag
+ \tracedbibxmlintro\currentbibxmlcategory
+ \fi
+ \ignorespaces
+ \xmlcommand{#1}{.}{bibtex:\currentbibtexformat:\currentbibxmlcategory}
+ \removeunwantedspaces
+ \bibtexpublicationsparameter\c!after\relax % prevents lookahead
+\stopxmlsetups
+
+\startxmlsetups bibtex:list
+ \xmlfilter{#1}{/bibtex/entry/command(bibtex:format)}
+\stopxmlsetups
+
+\startxmlsetups bibtex:bibtex
+ \xmlfilter{#1}{/entry/command(bibtex:format)}
+\stopxmlsetups
+
+% formatters
+
+\let\normalbibxmlflush\bibxmlflush
+
+\definecolor[bibtextracecolor:field] [darkred]
+\definecolor[bibtextracecolor:crossref][darkblue]
+\definecolor[bibtextracecolor:key] [darkgreen]
+
+\def\tracedbibxmlintro #1{{\tttf#1 -> }}
+\def\tracedbibxmlflush #1{\color[bibtextracecolor:field] {\tttf[#1]}}
+\def\tracedbibxmltexts #1{\color[bibtextracecolor:field] {\tttf<#1>}}
+\def\tracedbibxmlcrossref#1{\color[bibtextracecolor:crossref]{\tttf#1}}
+\def\tracedbibxmlkey #1{\color[bibtextracecolor:key] {\tttf#1}}
+
+\def\tracedbibxmltext
+ {\ifconditional\tracebibtexformat
+ \expandafter\tracedbibxmltexts % plural
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\def\bibxmlflush
+ {\ifconditional\tracebibtexformat
+ \expandafter\tracedbibxmlflush
+ \else
+ \expandafter\normalbibxmlflush
+ \fi}
+
+\startxmlsetups bibtex:format:crossref
+ \ifconditional\tracebibtexformat
+ \tracedbibxmlcrossref{\xmlfirst\currentbibxmlnode{/field[@name='crossref']/lower()}}
+ \else
+ \cite[\xmlfirst\currentbibxmlnode{/field[@name='crossref']/lower()}]
+ \fi
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:key
+ \ifconditional\tracebibtexformat
+ \tracedbibxmlkey{\normalbibxmlflush{key}}
+ \else
+ \bibxmlflush{key}
+ \fi
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:common:author
+ \ifconditional\tracebibtexformat
+ \bibxmlflush\currentbibtexvariant
+ \else
+ \xmlfilter{#1}{/field[@name='\currentbibtexvariant']/bibtexconcat('\currentbibtexvariant')}
+ \fi
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:author
+ \begingroup
+ \def\currentbibtexvariant{author}
+ \xmlsetup{#1}{bibtex:format:common:author}
+ \endgroup
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:artauthor
+ \begingroup
+ \def\currentbibtexvariant{artauthor}
+ \xmlsetup{#1}{bibtex:format:common:author}
+ \endgroup
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:editor
+ \begingroup
+ \def\currentbibtexvariant{editor}
+ \xmlsetup{#1}{bibtex:format:common:author}
+ \endgroup
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:doi
+% \bibdoifelse{\@@pb@doi}{#1\expanded{\bibgotoDOI{\@@pb@thekey}{\@@pb@doi}}#2}{#3}
+ *doi*
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:doi
+% \bibdoifelse{\@@pb@biburl}{#1\expanded{\bibgotoURL{\@@pb@thekey}{\@@pb@biburl}}#2}{#3}
+ *url*
+\stopxmlsetups
+
+\startxmlsetups bibtex:format:month
+% {\bibdoifelse\@@pb@month
+% {#1\doifnumberelse\@@pb@month
+% {\doifconversiondefinedelse\@@pbmonthconversion
+% {\convertnumber\@@pbmonthconversion\@@pb@month}{\@@pb@month}}%
+% {\@@pb@month}#2}%
+% {#3}
+ *month*
+\stopxmlsetups
+
+% lists
+
+\def\bibtexlistprocessor
+ {\ctxlua{bibtex.hacks.add(structures.lists.uservalue("\currentlist",\currentlistindex,"bibref"),\currentlistindex)}}
+
+\appendtoks
+ \definelist[\currentbibtexsession]%
+ \setuplist[\currentbibtexsession][\c!state=\v!start,\c!width=]%
+ \installstructurelistprocessor{\currentbibtexsession:userdata}{\bibtexlistprocessor}%
+\to \everydefinebibtexsession
+
+% \def\installbibtexsorter#1#2%
+% {\setvalue{\??pb:\c!sort:#1}{#2}}
+
+% \installbibtexsorter\v!no {no}
+% \installbibtexsorter\v!author {au}
+% \installbibtexsorter\v!title {ti}
+% \installbibtexsorter\v!short {ab}
+% \installbibtexsorter\empty {no}
+% \installbibtexsorter\s!default{no}
+
+% \setupbibtex
+% [\c!sorttype=\v!cite,
+% \c!sort=no]
+
+% \protected\def\startpublication#1\stoppublication
+% {\blank
+% todo
+% \blank}
+
+% \let\stoppublication\relax
+
+\protected\def\bibtexspace {\removeunwantedspaces\space}
+\protected\def\bibtexperiod {\removeunwantedspaces.\space}
+\protected\def\bibtexcomma {\removeunwantedspaces,\space}
+\protected\def\bibtexlparent {\removeunwantedspaces\space(}
+\protected\def\bibtexrparent {\removeunwantedspaces)\space}
+\protected\def\bibtexlbracket{\removeunwantedspaces\space[}
+\protected\def\bibtexrbracket{\removeunwantedspaces]\space}
+
+% interfacing
+
+% todo : lang en language
+% todo : directions
+
+% variables
+
+\ifdefined\bibtexblock \else \newcount\bibtexblock \fi \bibtexblock\plusone
+\ifdefined\bibtexcounter \else \newcount\bibtexcounter \fi
+
+\newtoks \everysetupbibtexpublications
+\newtoks \everysetupbibtexcitations
+
+\def\bibtexrefprefix{\number\bibtexblock:}
+
+\let\currentbibtexsession\s!default
+\let\currentbibtexvariant\s!default
+
+% parameters: session+variant variant session shared
+
+\def\bibtexpublicationsparameter#1%
+ {\csname
+ \ifcsname\??pb\currentbibtexsession:\currentbibtexvariant#1\endcsname
+ \??pb\currentbibtexsession:\currentbibtexvariant#1%
+ \orelse\ifcsname\??pb:\currentbibtexvariant#1\endcsname
+ \??pb:\currentbibtexvariant#1%
+ \orelse\ifcsname\??pb\currentbibtexsession#1\endcsname
+ \??pb\currentbibtexsession#1%
+ \orelse\ifcsname\??pb#1\endcsname
+ \??pb#1%
+ \else
+ \s!empty
+ \fi
+ \endcsname}
+
+\def\bibtexcitationparameter#1%
+ {\csname
+ \ifcsname\??pv\currentbibtexsession:\currentbibtexvariant#1\endcsname
+ \??pv\currentbibtexsession:\currentbibtexvariant#1%
+ \orelse\ifcsname\??pv:\currentbibtexvariant#1\endcsname
+ \??pv:\currentbibtexvariant#1%
+ \orelse\ifcsname\??pv\currentbibtexsession#1\endcsname
+ \??pv\currentbibtexsession#1%
+ \orelse\ifcsname\??pv#1\endcsname
+ \??pv#1%
+ \else
+ \s!empty
+ \fi
+ \endcsname}
+
+% setup commands
+
+\protected\def\setupbibtexpublications
+ {\let\currentpublicationclass\??pb
+ \let\everysetupbibtexwhatever\everysetupbibtexpublications
+ \dosetupbibtexwhatever}
+
+\protected\def\setupbibtexcitations
+ {\let\currentpublicationclass\??pv
+ \let\everysetupbibtexwhatever\everysetupbibtexcitations
+ \dosetupbibtexwhatever}
+
+\protected\def\setupbibtexpublicationvariants
+ {\let\currentpublicationclass\??pb
+ \let\everysetupbibtexwhatever\everysetupbibtexpublications
+ \dosetupbibtexwhatevervariant}
+
+\protected\def\setupbibtexcitationvariants
+ {\let\currentpublicationclass\??pv
+ \let\everysetupbibtexwhatever\everysetupbibtexcitations
+ \dosetupbibtexwhatevervariant}
+
+\tolerant\def\dosetupbibtexwhatever[#1]#*[#2]% [sessionlist] [setup]
+ {\ifarguments\or
+ % setups
+ \getparameters[\currentpublicationclass][#1]%
+ \the\everysetupbibtexwhatever
+ \or
+ % sessions setups
+ \def\dobtxcommand##1{\getparameters[\currentpublicationclass##1][#2]}%
+ \processcommalist[#1]\dobtxcommand
+ \fi}
+
+\tolerant\def\dosetupbibtexwhatevervariant[#1]#*[#2]#*[#3]% [sessionlist] [variantlist] [setup]
+ {\ifarguments\or
+ % setups
+ \getparameters[\currentpublicationclass][#1]%
+ \the\everysetupbibtexwhatever
+ \or
+ % variants setups
+ \def\dobtxcommand##1{\getparameters[\currentpublicationclass:##1][#2]}%
+ \processcommalist[#1]\dobtxcommand
+ \or
+ % sessions variants setups
+ \def\dobtxcommand##1%
+ {\def\dodobtxcommand####1{\getparameters[\currentpublicationclass##1:####1][#3]}%
+ \processcommalist[#2]\dodobtxcommand}%
+ \processcommalist[#1]\docbtxommand
+ \fi}
+
+% some initializations
+
+\setupbibtexcitationvariants
+ [author,authoryear,authoryears]
+ [\c!namesep={, }]
+
+% loading alternatives (apa etc)
+
+\def\doloadbibtexpublicationalternative
+ {\ifproductionrun
+ \edef\bibtexpublicationsalternative{\@@pbalternative}% parent
+ \ifempty\bibtexpublicationsalternative \else
+ \processcommacommand[\bibtexpublicationsalternative]\dodoloadbibtexpublicationalternative
+ \let\@@pbalternative\empty
+ \fi
+ \fi}
+
+\def\dodoloadbibtexpublicationalternative#1%
+ {\doonlyonce{#1}
+ {\startreadingfile
+ \readsysfile{bxml-#1.mkiv}
+ {\showmessage\m!publications{6}{bxml-#1}}
+ {\showmessage\m!publications{1}{bxml-#1}}%
+ \stopreadingfile}}
+
+\appendtoks
+ \doloadbibtexpublicationalternative
+\to \everysetupbibtexpublications
+
+% we expect at least one invocation of the setup commands
+% because otherwise we always load the apa style even if
+% no publications are used
+%
+% \appendtoks
+% \doloadbibtexpublicationalternative
+% \to \everystarttext
+
+% whatever, should be key
+
+\def\bibtexleftnumber#1{#1\hfill~}
+
+% testing
+
+% \showmessage\m!publications{5}{#1 is unknown}\secondoftwoarguments}
+
+\let\doifbibreferencefoundelse\secondofthreearguments
+
+% lists
+
+\newtoks\everysetupbibtexlistplacement
+
+% this will change as we need it too often .. we will use context.thebibtexnamesep
+
+\appendtoks
+ \ctxlua {bibtex.authors.setsettings {
+ namesep = \!!bs\bibtexpublicationsparameter\c!namesep\!!es,
+ lastnamesep = \!!bs\bibtexpublicationsparameter\c!lastnamesep\!!es,
+ finalnamesep = \!!bs\bibtexpublicationsparameter\c!finalnamesep\!!es,
+ firstnamesep = \!!bs\bibtexpublicationsparameter\c!firstnamesep\!!es,
+ juniorsep = \!!bs\bibtexpublicationsparameter\c!juniorsep\!!es,
+ vonsep = \!!bs\bibtexpublicationsparameter\c!vonsep\!!es,
+ surnamesep = \!!bs\bibtexpublicationsparameter\c!surnamesep\!!es,
+ namesep = \!!bs\bibtexpublicationsparameter\c!namesep\!!es,
+ lastnamesep = \!!bs\bibtexpublicationsparameter\c!lastnamesep\!!es,
+ finalnamesep = \!!bs\bibtexpublicationsparameter\c!finalnamesep\!!es,
+ author = {
+ etallimit = \!!bs\bibtexpublicationsparameter\c!authoretallimit\!!es,
+ etaldisplay = \!!bs\bibtexpublicationsparameter\c!authoretaldisplay\!!es,
+ etaltext = \!!bs\bibtexpublicationsparameter\c!authoretaltext\!!es,
+ },
+ editor = {
+ etallimit = \!!bs\bibtexpublicationsparameter\c!editoretallimit\!!es,
+ etaldisplay = \!!bs\bibtexpublicationsparameter\c!editoretaldisplay\!!es,
+ etaltext = \!!bs\bibtexpublicationsparameter\c!editoretaltext\!!es,
+ },
+ artauthor = {
+ etallimit = \!!bs\bibtexpublicationsparameter\c!artauthoretallimit\!!es,
+ etaldisplay = \!!bs\bibtexpublicationsparameter\c!artauthoretaldisplay\!!es,
+ etaltext = \!!bs\bibtexpublicationsparameter\c!artauthoretaltext\!!es,
+ },
+ } }%
+\to \everysetupbibtexlistplacement
+
+\def\completebibtexpublications{\dodoubleempty\docompletebibtexpublications}
+\protected\def\placebibtexpublications {\dodoubleempty\doplacebibtexpublications}
+
+\def\docompletebibtexpublications[#1][#2]% title might become obsolete, just headtext
+ {\begingroup
+ \edef\currentbibtexsession{#1}%
+ \let\currentlist\currentbibtexsession
+ \setuplist[\currentbibtexsession][\c!criterium=\v!previous,#2]
+ \edef\currentbibtexsessiontitle{\namedlistparameter\currentbibtexsession\c!title}%
+ \ifempty\currentbibtexsessiontitle
+ \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbibtexsession,\c!title={\headtext{\currentbibtexsession}}]}%
+ \else
+ \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbibtexsession,\c!title={\currentbibtexsessiontitle}]}%
+ \fi
+ \dodoplacebibtexpublications
+ \stopnamedsection
+ \endgroup}
+
+\def\doplacebibtexpublications[#1][#2]%
+ {\begingroup
+ \edef\currentbibtexsession{#1}%
+ \let\currentlist\currentbibtexsession
+ \setuplist[\currentbibtexsession][\c!criterium=\v!previous,#2]%
+ \dodoplacebibtexpublications
+ \endgroup}
+
+\def\dodoplacebibtexpublications
+ {\determinelistcharacteristics[\currentbibtexsession]%
+ \the\everysetupbibtexlistplacement
+ \forgetall
+ \typesetbibtexlist
+ \global\advance\bibtexblock\plusone}
+
+\setvalue{\??pb:\c!numbering:\v!short}#1% todo var s -> short tag
+ {\bibtexlistnumberbox{\bibtexpublicationsparameter\c!numbercommand{\bibtexgetshort\currentpublicationtag}}}
+
+\setvalue{\??pb:\c!numbering:\v!bib}#1% todo var n -> number
+ {\bibtexlistnumberbox{\bibtexpublicationsparameter\c!numbercommand{\bibtexgetnumber\currentpublicationtag}}}
+
+\setvalue{\??pb:\c!numbering:\s!unknown}#1%
+ {\bibtexlistnumberbox{\bibtexpublicationsparameter\c!numbercommand{#1}}}
+
+\def\@@pblimitednumber % name
+ {\csname\??pb:\c!numbering:%
+ \ifcsname\??pb:\c!numbering:\currentbibtexnumbering\endcsname
+ \currentbibtexnumbering
+ \else
+ \s!unknown
+ \fi
+ \endcsname}
+
+\appendtoks
+ \edef\currentbibtexnumbering{\bibtexpublicationsparameter\c!numbering}%
+ \ifx\currentbibtexnumbering\v!no
+ \setuplist[\currentbibtexsession][\c!numbercommand=,\c!symbol=\v!none,\c!textcommand=\outdented]%
+ \else
+ \setuplist[\currentbibtexsession][\c!numbercommand=\@@pblimitednumber]%
+ \fi
+\to \everysetupbibtexlistplacement
+
+\newdimen\bibtexnumberwidth
+
+\def\bibtexlistnumberbox{\hbox \ifcase\bibtexnumberwidth\else to \bibtexnumberwidth\fi}
+
+\appendtoks
+ \doifelse{\bibtexpublicationsparameter\c!autohang}\v!yes
+ {\ifx\currentbibtexnumbering\v!short
+ \setbox\scratchbox\hbox{\bibtexpublicationsparameter\c!numbercommand{\bibtexpublicationsparameter\c!samplesize}}%
+ \else
+ \setbox\scratchbox\hbox{\bibtexpublicationsparameter\c!numbercommand{\ctxlua{tex.write(structures.lists.size())}}}%
+ \fi
+ \bibtexnumberwidth\wd\scratchbox
+ \setuplist[\currentbibtexsession][\c!distance=\zeropoint]}
+ {\doifelsenothing{\bibtexpublicationsparameter\c!width}
+ {\bibtexnumberwidth\zeropoint}
+ {\bibtexnumberwidth\bibtexpublicationsparameter\c!width}}%
+ \setuplist[\currentbibtexsession][\c!width=\bibtexnumberwidth]%
+\to \everysetupbibtexlistplacement
+
+\appendtoks
+ \let\maybeyear\gobbleoneargument
+ \let\noopsort \gobbleoneargument
+\to \everysetupbibtexlistplacement
+
+\appendtoks
+ \doifelse{\bibtexpublicationsparameter\c!maybeyear}\v!off
+ {\let\maybeyear\gobbleoneargument}
+ {\let\maybeyear\firstofoneargument}%
+\to \everysetupbibtexlistplacement
+
+\appendtoks
+ \doifnot{\bibtexpublicationsparameter\c!option}\v!continue
+ {\global\bibtexcounter\zerocount}%
+\to \everysetupbibtexlistplacement
+
+\appendtoks
+ \edef\currentbibtexcriterium{\namedlistparameter\currentbibtexsession\c!criterium}%
+\to \everysetupbibtexlistplacement
+
+\def\typesetbibtexlist
+ {\begingroup
+ \startpacked[\v!blank]%
+ \doif{\namedlistparameter\currentbibtexsession\c!criterium}\v!cite
+ {\setuplist[\currentbibtexsession][\c!criterium=\v!here]}%
+ \doifelse{\bibtexpublicationsparameter\c!method}\v!local
+ {\ctxlua{bibtex.hacks.reset(1)}}% function can take method
+ {\ctxlua{bibtex.hacks.reset(2)}}%
+ \strc_lists_place_current
+ {\currentbibtexsession}
+ {\currentbibtexcriterium}
+ {}%
+ {\namedlistparameter\currentbibtexsession\c!extras}%
+ {\namedlistparameter\currentbibtexsession\c!order}%
+ \ctxlua{bibtex.hacks.flush("\bibtexpublicationsparameter\c!sorttype")}%
+ \stoppacked
+ \endgroup}
+
+\protected\def\typesetbibtexpublication#1%
+ {\edef\currentbibtexsessiontag{#1}%
+ \ifempty\currentbibtexsessiontag
+ % can't really happen
+ \orelse\ifx\currentbibtexcriterium\v!all
+ \dotypesetbibtexpublication % was \doplacepublicationindeed
+ \else
+ \ctxlua{bibtex.hacks.doifalreadyplaced("\currentbibtexsessiontag")}
+ \donothing
+ \dotypesetbibtexpublication
+ \fi}
+
+\def\dotypesetbibtexpublication
+ {\doifelsebibreferencefound\currentbibtexsessiontag
+ {\global\advance\bibtexcounter\plusone
+ \ctxlua{bibtex.hacks.registerplaced("\currentbibtexsessiontag")}%
+ \let\currentlist\currentbibtexsession
+ \let\currentlistentrynumber \bibtexcounter
+ \let\currentlistentrytitle \thebibtexpublicationlistelement
+ \let\currentlistentrypagenumber\empty
+ \strc_lists_apply_renderingsetup}
+ {}} % invalid
+
+\def\thebibtexpublicationlistelement
+ {\strut
+ \expanded{\reference[\bibtexrefprefix\currentbibtexsessiontag]{\number\bibtexcounter}}%
+ \dotypesetabibtexpublication\currentbibtexsessiontag
+ \strut}
+
+\def\dotypesetabibtexpublication#1%
+ {\begingroup
+ \ignorespaces
+ \xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='#1']/command(bibtex:format)}%
+ \removeunwantedspaces
+% \ignorespaces
+% \bibalternative{\bibgetvart{#1}}%
+% \removeunwantedspaces
+ \endgroup}
+
+\def\doprocessbibtexentry#1{\typesetbibtexpublication{#1}}
+
+% citations
+
+\protected\def\bibtexcitation[#1]%
+ {\edef\currentbibtexsession{#1}%
+ \strictdoifelsenextoptional\dobibtexcitation\dobibtexref}
+
+\def\dobibtexref#1%
+ {\dodobibtexcitation[#1][]}
+
+\def\dobibtexcitation[#1]%
+ {\strictdoifelsenextoptional{\dodobibtexcitation[#1]}{\dodobibtexcitation[#1][]}}
+
+\def\dodobibtexcitation[#1][#2]%
+ {\dontleavehmode
+ \begingroup
+ \doifelsenothing{#2}\secondargumentfalse\secondargumenttrue
+ \ifsecondargument
+ \dowhateverbibtexcitation{#1}{#2}%
+ \else
+ \donumberedbibtexcitation{#1}%
+ \fi
+ \endgroup}
+
+\def\dowhatevercitation#1#2%
+ {\processcommalist[#2]\dobibtexcitationindeed
+ \setupinteraction[\c!style=]% use flag instead
+ \doifelseassignment{#1}
+ {\getparameters[\??pb\??pb][\c!alternative=,\c!extras=,#1]%
+ \edef\currentbibtexvariant{\@@pb@@pbalternative}%
+ \ifempty\currentbibtexvariant
+ \edef\currentbibtexvariant{\bibtexpublicationparameter\c!refcommand}%
+ \fi
+ \ifempty\@@pb@@pbextras
+ \setupcite[\currentbibtexvariant][#1]%
+ \else
+ \edef\@@pb@@pbextras{{\@@pb@@pbextras\ifdefined\@@pb@@pbright\@@pb@@pbright\else\bibtexpublicationparameter\c!right\fi}}%
+ \expanded{\setupcite[\currentbibtexvariant][#1,\c!right=\@@pb@@pbextras]}%
+ \fi}%
+ {\def\currentbibtexvariant{#1}}%
+ \getvalue{bibtex\currentbibtexvariant ref}[#2]}
+
+\def\donumberedbibtexcitation#1%
+ {\processcommalist[#1]\dobibtexcitationindeed
+ \setupinteraction[\c!style=]%
+ \edef\currentbibtexvariant{\bibtexcitationparameter\c!refcommand}%
+ \getvalue{bibtex\currentbibtexvariant ref}[#1]}
+
+\def\dobibtexcitationindeed#1%
+ {\iftrialtypesetting \else
+ \expanded{\writedatatolist[\currentbibtexsession][bibref=#1]}%
+ \fi}
+
+\def\nobibtexcitation[#1]%
+ {\processcommalist[#1]\dobibtexcitationindeed}
+
+\def\bibtexnumref[#1]%
+ {\dontleavehmode
+ \begingroup
+ \bibtexcitationparameter\v!left
+ \penalty\plustenthousand
+ \ctxlua{bibtex.hacks.resolve("","\number\bibtexblock","#1")}%
+ \bibtexcitationparameter\v!right
+ \endgroup}
+
+\def\dowithbibtexnumrefconnector#1#2%
+ {\ifnum#1>\plusone
+ \ifnum#2>\plusone
+ \ifnum#2=#1\relax
+ \bibtexpublicationsparameter\c!lastpubsep
+ \else
+ \bibtexpublicationsparameter\c!pubsep
+ \fi
+ \fi
+ \fi}
+
+\def\dowithbibtexnumref#1#2#3#4#5% n, i, prefix block ref
+ {\dowithbibtexnumrefconnector{#1}{#2}%
+ \def\bibtexrefprefix{#4:}%
+ \inbiblink[#5]}
+
+\def\dowithbibtexnumrefrange#1#2#3#4#5#6#7% n, i, prefix block ref
+ {\dowithbibtexnumrefconnector{#1}{#2}%
+ \def\bibtexrefprefix{#4:}%
+ \inbiblink[#5]%
+ \endash
+ \def\bibtexrefprefix{#6:}%
+ \inbiblink[#7]}
+
+\def\nobibtexnumref#1%
+ {[#1]}
+
+% hm
+
+% \def\@@pbinumbercommand{\executeifdefined{\??pb:\c!numbercommand:\@@pbnumbering}\firstofoneargument}
+
+% \letvalue{\??pb:\c!numbercommand:\v!yes }\firstofoneargument
+% \letvalue{\??pb:\c!numbercommand:\v!no }\gobbleoneargument
+% \setvalue{\??pb:\c!numbercommand:\v!short}{\bibtexgetshort\currentpublicationtag\gobbleoneargument}
+% \setvalue{\??pb:\c!numbercommand:\v!bib }{\bibtexgetnumber\currentpublicationtag\gobbleoneargument}
+
+% \def\bibalternative#1{\csname\??pv\@@currentalternative#1\endcsname}
+
+% basic setup
+
+% parent -> publicationlist
+%
+% \setuplist
+% [\currentbibtexsession]
+% [\c!samplesize={AA99},
+% \c!alternative=a,
+% \c!interaction=,
+% \c!pagenumber=\v!no,
+% #1,
+% \c!command=]
+
+% \setuppublicationlist
+% [\c!title=,
+% \c!command=\dospecialbibinsert,
+% \c!maybeyear=\v!on]
+
+\setupbibtexpublications
+ [\c!monthconversion=,
+ \c!alternative=apa,
+ \c!method=\v!global,
+ \c!refcommand=num,
+ \c!numbercommand=\bibtexleftnumber]
+
+\setupbibtexcitations % command ?
+ [\c!refcommand=num]
+
+% helpers
+
+\protected\def\doifelsebibtexinteraction
+ {\iflocation
+ \edef\temp{\bibtexcitationparameter\c!interaction}%
+ \ifx\temp\v!stop
+ \doubleexpandafter\secondoftwoarguments
+ \else
+ \doubleexpandafter\firstoftwoarguments
+ \fi
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\let\doifbibtexinteractionelse\doifelsebibtexinteraction
+
+% variants
+
+% todo: lastsep here
+
+\newconditional\firstbibtexrefsep
+
+\def\bibtexresetrefsep
+ {\settrue\firstbibtexrefsep}
+
+\def\bibtexinsertrefsep
+ {\ifconditional\firstbibtexrefsep
+ \setfalse\firstbibtexrefsep
+ \else
+ \bibtexcitationparameter\c!pubsep
+ \fi}
+
+\def\inbibtexlink#1#2%
+ {\doifelsereferencefound{\bibtexrefprefix#1}
+ {\goto{#2}[\bibtexrefprefix#1]}
+ {!#1!}}
+
+\def\dobibtexgotolink#1#2%
+ {\doifelsereferencefound{\bibtexrefprefix#1}
+ {\goto{#2}[\bibtexrefprefix#1]}
+ {!#1!}}
+
+\def\dobibattexlink#1#2%
+ {\doifelsereferencefound{\bibtexrefprefix#1}
+ {\at{#2}[\bibtexrefprefix#1]}
+ {!#1!}}
+
+\def\dobibtexurllink#1#2%
+ {\expanded{\useURL[bibtex:url:#1][#2]}%
+ \doifelsebibtexinteraction
+ {\goto{\url[bibtex:url:#1]}[url(bibtex:url:#1)]}
+ {\url[bibtex:url:#1]}}
+
+% todo: style, color
+
+\protected\def\bibtexdataref {\dodoubleargument\dobibtexdataref}
+\protected\def\bibtextyperef {\dodoubleargument\dobibtextyperef}
+\protected\def\bibtexkeyref {\dodoubleargument\dobibtexkeyref}
+\protected\def\bibtexserialref {\dodoubleargument\dobibtexserialref}
+\protected\def\bibtexurlref {\dodoubleargument\dobibtexurlref}
+\protected\def\bibtexdoiref {\dodoubleargument\dobibtexdoiref}
+\protected\def\bibtexpageref {\dodoubleargument\dobibtexpageref}
+\protected\def\bibtexnoneref {\dodoubleargument\dobibtexnoneref}
+\protected\def\bibtexshortref {\dodoubleargument\dobibtexshortref}
+\protected\def\bibtexyearref {\dodoubleargument\dobibtexyearref}
+\protected\def\bibtexauthorref {\dodoubleargument\dobibtexauthorref}
+\protected\def\bibtexauthoryearref {\dodoubleargument\dobibtexauthoryearref}
+\protected\def\bibtexauthoryearsref{\dodoubleargument\dobibtexauthoryearsref}
+
+\def\dobibtexdataref {\doprocessbibtexref\dodobibtexdataref {ref}} % [#1][#2]
+\def\dobibtextyperef {\doprocessbibtexref\dodobibtextyperef {type}} % [#1][#2]
+\def\dobibtexkeyref {\doprocessbibtexref\dodobibtexkeyref {key}} % [#1][#2]
+\def\dobibtexserialref {\doprocessbibtexref\dodobibtexserialref {serial}} % [#1][#2]
+\def\dobibtexurlref {\doprocessbibtexref\dodobibtexurlref {url}} % [#1][#2]
+\def\dobibtexdoiref {\doprocessbibtexref\dodobibtexdoiref {doi}} % [#1][#2]
+\def\dobibtexpageref {\doprocessbibtexref\dodobibtexpageref {page}} % [#1][#2]
+\def\dobibtexnoneref {\doprocessbibtexref\dodobibtexnoneref {none}} % [#1][#2]
+\def\dobibtexshortref {\doprocessbibtexref\dodobibtexshortref {short}} % [#1][#2]
+\def\dobibtexyearref {\doprocessbibtexref\dodobibtexyearref {year}} % [#1][#2]
+\def\dobibtexauthorref {\doprocessbibtexref\dodobibtexauthorref {author}} % [#1][#2]
+\def\dobibtexauthoryearref {\doprocessbibtexref\dodobibtexauthoryearref {authoryear}} % [#1][#2]
+\def\dobibtexauthoryearsref{\doprocessbibtexref\dodobibtexauthoryearsref{authoryears}} % [#1][#2]
+
+\def\doprocessbibtexref#1#2[#3][#4]%
+ {\edef\currentbibtexsession{#3}%
+ \edef\currentbibtexvariant{#2}%
+ \def\dodoprocessbibtexref##1%
+ {% test for existence
+ \edef\currentbibtextag{##1}%
+ \bibtexinsertrefsep
+ #1{##1}}%
+ \bibtexresetrefsep
+ \bibtexcitationparameter\v!left
+ \processcommalist[#4]\dodoprocessbibtexref\relax
+ \bibtexcitationparameter\v!right}
+
+\def\dodobibtexdataref#1%
+ {\dotypesetabibtexpublication{#1}}
+
+\def\dodobibtextyperef#1%
+ {\edef\bibtexrefcontent{\xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='#1']/attribute('category')}}%
+ \bibtexrefcontent}
+
+\def\dodobibtexkeyref#1%
+ {\edef\bibtexrefcontent{\xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='key']/context()}}%
+ \dobibtexgotolink{#1}{\bibtexrefcontent}}
+
+\def\dodobibtexserialref#1%
+ {\edef\bibtexrefcontent{\xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='#1']/match()}}%
+ \dobibtexgotolink{#1}{\bibtexrefcontent}}
+
+\def\dodobibtexurlref#1%
+ {\edef\bibtexrefcontent{\xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='#1']/field[@name='url']/context()}}%
+ \dobibtexurllink{#1}{\bibtexrefcontent}}
+
+\def\dodobibtexdoiref#1%
+ {\edef\bibtexrefcontent{\xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='#1']/field[@name='doi']/context()}}%
+ \dobibtexurllink{#1}{http://dx.doi.org/\bibtexrefcontent}}
+
+\def\dodobibtexpageref#1%
+ {\dobibtexatlink{#1}{}} % second argument can become 'page'
+
+\def\dodobibtexnoneref#1%
+ {}
+
+\def\dodobibtexshortref#1%
+ {\edef\bibtexrefcontent{\xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='#1']/bibtexshort()}}%
+ \dobibtexgotolink{#1}{\bibtexrefcontent}}
+
+\def\dodobibtexyearref#1%
+ {\edef\bibtexrefcontent{\xmlfilter{bibtex:\currentbibtexsession}{/bibtex/entry[@tag='#1']/field[@name='year']/context()}}%
+ \bibtexrefcontent}
+
+% \def\bibmaybeinteractive#1#2%
+% {\doifelsevalue{@@pv\@@currentalternative\c!compress}
+% {\ifbibinteractionelse{\gotobiblink{#2}[#1]}{#2}}
+% {#2}}
+
+% \def\bibauthornumref[#1]%
+% {\getcommalistsize[#1]%
+% \global\bibitemcounter\commalistsize
+% \bibresetrefsep
+% \processcommalist[#1]\dobibauthornumref }
+%
+% \def\dobibauthornumref#1%
+% {\bibinsertrefsep
+% \doifbibreferencefoundelse{#1}
+% {\begingroup
+% \bibgetvara{#1}%
+% \bibalternative\c!inbetween
+% \setuppublications[\c!refcommand=num]%
+% \cite[#1]%
+% \endgroup}
+% {}}
+
+% compress years
+% andtext namesep
+% otherstext authoretallimit
+
+% we will use context.* instead at the lua end because it saves us passing settings
+
+% \def\thebibtexpubsep {\bibtexpublicationsparameter\c!pubsep}
+% \def\thebibtexlastpubsep {\bibtexpublicationsparameter\c!lastpubsep}
+% \def\thebibtexfinalpubseparator{\bibtexpublicationsparameter\c!lastpubsep}
+
+\def\dodobibtexauthorref #1{\ctxlua{bibtex.authorref ("bibtex:\currentbibtexsession","#1","normal","author")}}
+\def\dodobibtexauthoryearref #1{\ctxlua{bibtex.authoryearref ("bibtex:\currentbibtexsession","#1","normal","author")}}
+\def\dodobibtexauthoryearsref#1{\ctxlua{bibtex.authoryearsref("bibtex:\currentbibtexsession","#1","normal","author")}}
+
+\protected\def\bibtexsingularplural#1#2{\ctxlua{bibtex.singularorplural(\!!bs#1\!!es,\!!bs#2\!!es)}}
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/bibl-tra.mkxl b/Master/texmf-dist/tex/context/base/mkxl/bibl-tra.mkxl
new file mode 100644
index 00000000000..536de8d31c9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/bibl-tra.mkxl
@@ -0,0 +1,1508 @@
+%D \module
+%D [ file=bibl-tra,
+%D version=2009.08.22,
+%D title=\CONTEXT\ Publication Module,
+%D subtitle=Publications,
+%D author=Taco Hoekwater,
+%D date=\currentdate,
+%D copyright={Public Domain}]
+%C
+%C Donated to the public domain.
+
+%D This is really obsolete in \LMTX. For now I keep it but it will either go
+%D away. The code is not upgraded, we only deal with macro protection. I will
+%D only update the bits that annoy me in grepping for possible optimizations.
+
+% % % % watch out ... bibl-tra-new.mkiv is work in progress % % % %
+
+% % % % mlbibtex also supports context and we can run that instead of bibtex % % % %
+
+%D This module has been adapted to \MKIV\ by Hans Hagen so if things go wrong, he is
+%D to blame. The changes concern references and lists but teh rendering itself is
+%D unchanged. Future versions might provide variants as we have plans for an
+%D upgrade.
+%D
+%D We use a still somewhat experimental extension to the list mechanism. Eventually
+%D the bibtex module will use the bibl loader and access the data by means of lpath
+%D expressions. In that case we don't need to process the bibliography but still
+%D need to track usage as done here.
+%D
+%D A bit ongoing: make more local macros prefixed with bib, i.e. the bib namespace
+%D is reserved.
+
+%D Todo: commandhandler
+
+\writestatus{loading}{ConTeXt Bibliography Support / BibTeX}
+
+\definefilesynonym[bib][obsolete]
+
+\registerctxluafile{bibl-tra}{}
+
+%D The original was developed independantly by Taco Hoekwater while still working
+%D for Kluwer Academic publishers (it still used the dutch interface then).
+%D Development continued after he left Kluwer, and in Januari 2005, the then already
+%D internationalized file was merged with the core distribution by Hans Hagen. The
+%D current version is once again by Taco.
+%D
+%D More documentation and additional resources can be found on the contextgarden:
+%D \hyphenatedurl {http://wiki.contextgarden.net//Bibliography}.
+
+%D \subject{DONE (dd/mm/yyyy)}
+%D
+%D \startitemize
+%D \item add author definition (and associated system variable) (26/05/2005)
+%D \item add finalnamesep support for Oxford comma (17/09/2005)
+%D \item add \type{\insert...} for: doi, eprint, howpublished (19/09/2005)
+%D \item allow a defaulted \type{\setupcite} (19/11/2005)
+%D \item renamed citation type 'number' to 'serial' (19/11/2005)
+%D \item better definition of \type{\inverted...author} (19/11/2005)
+%D \item don't reset [numbercommand] in \type {\setuppublication} by default (20/11/2005)
+%D \item don't disable other \type {\setuppublication} keys if alternative is present (20/11/2005)
+%D \item drop \type{\sanitizeaccents} (20/11/2005)
+%D \item added \type{\nocite} and \type{\cite[none]} (21/11/2005)
+%D \item added headtext for it (23/11/2005)
+%D \item make \type{\cite[url]} and \type{\cite[doi]} interactive (23/11/2005)
+%D \item make right-aligned labels in the list work even when autohang=no
+%D \item use 'et al.' instead of 'et.al.'. Pointed out by Peter M\"unster (30/12/2005)
+%D \item added headtext for cz (31/12/2005)
+%D \item Keep whitespace after \type{\cite} with single argument (31/12/2005)
+%D \item Fix broken \type{\cite{}} support (31/12/2005)
+%D \item Use \type{\readfile} inside \type{\usepublications} instead of \type{\readsysfile} (12/01/2006)
+%D \item Use \type{\currentbibyear} and \type{\currentbibauthor} instead of \type{\YR} and \type{\AU} (05/02/2006)
+%D \item Fix compressed version of authoryear style (05/02/2006)
+%D \item Rename the clashing data fields \type{\url} and \type{\type} to \type{\biburl} and \type{\bibtype} (05/02/2006)
+%D \item Added two french bibl files from Renaud Aubin (06/02/2006)
+%D \item Five new bib class and eight extra bib fields, for IEEEtran (07/02/2006)
+%D \item French keyword translation, provided by Renaud (08/02/2006)
+%D \item fix underscores in undefined keys (22/02/2006)
+%D \item Destroy interactivity in labels of the publication list (13/03/2006)
+%D \item fix multi-cite list compression (11/4/2006)
+%D \item fix \type{\getcitedata} (11/4/2006)
+%D \item magic for chapter bibs (18-25/4/2006)
+%D \item language setting (25/4/2006)
+%D \item use \type{\hyphenatedurl} for \type{\inserturl} (25/4/2006)
+%D \item Add \type{\docitation} to \type{\nocite}(26/4/2006)
+%D \item patents can have numbers, added to bst files (26/4/2006)
+%D \item \type{\docitation} needs a \type{\iftrialtypesetting} (27/4/2006)
+%D \item \type{\filllocalpublist}'s loop is bound by definedness, not resolvedness (27/4/2006)
+%D \item \type{\setuppublications[monthconversion=]} added (15/5/2006)
+%D \item use \type{\undefinedreference} instead of bare question marks (15/5/2006)
+%D \item add grouping around \type{\placepublications} commands (16/5/2006)
+%D \item fix a bug in \type{\cite{<item>}} (17/5/2006)
+%D \item support \type{\cite[authornum]} (18/5/2006)
+%D \item make \type{\cite} unexpandable (20/6/2006)
+%D \item allow hyperlinks in author\&year combo's
+%D (cite list compression has to be off) (20/6/2006)
+%D \item fix duplicate labels for per-chapter style (20/6/2006)
+%D \item allow \type{\setupcite[interaction=(start|stop)]}
+%D \item fix the item number in the publication list with 'numbering=yes' (22/6/2006)
+%D \item make the default criterium for \type{\placepublications} be \type{previous} (23/6/2006)
+%D \item fix \type{\normalauthor} and \type{\normalshortauthor} spacing (29/6/2006)
+%D \item do not typeset empty arguments to \type{\typesetapublication} (29/6/2006)
+%D \item add \type{symbol=none} to \type{\setuplist} in unnumbered
+%D mode to prevent typesetting of bare numbers (29/6/2006)
+%D \item remove two incorrect spaces from bibl-num.tex (1/7/2006)
+%D \item reset font styles within \type{\cite}, so that font switches
+%D in \type{left} stay in effect (12/7/2006)
+%D \item guard added against loading bbl files multiple times (13/7/2006)
+%D \item fix \type{\cite[num]} with compression is on. (14/7/2006)
+%D \item test \type{\iflocation} before deciding to use the
+%D interactive version of cite (18/7/2006)
+%D \item support \type{\setupcite[authoretallimit=1]} (18/7/2006)
+%D \item support use of \type{\cite} within titles and captions by
+%D saveguarding the list item extraction and reference placement
+%D code (19/7/2006)
+%D \item support \type{\setuppublicationlist[title=\chapter]} (4/8/2006)
+%D \item use the expansion of \type{\headtext{pubs}} (4/8/2006)
+%D \item hook added for repeated authors in publication list
+%D \type{\setuppublicationlist[artauthorcommand=\mythreeargscommand]}
+%D (4/8/2006)
+%D \item make the bracketed arguments of \type{\artauthor}, \type{\author}
+%D and \type{\editor} (bbl commands) optional (4/8/2006)
+%D \item the constants \type{sorttype}, \type{compress} and
+%D \type{autohang} have moved to the core (8/8/2006)
+%D \item bibtex is now registered as a program to be run by texexec (8/8/2006)
+%D \item fix a bug in \type{\setupcite[authoretallimit=1]} (9/8/2006)
+%D \item fix a bug inside citations that prevented lastpubsep from ever being
+%D used due to a volatile \type{\commalistsize} (25/8/2006).
+%D \item added the possibility of \type{\placepublications[option=continue]}
+%D (6/9/2006)
+%D \item Mojca translated Master's Thesis to Masterarbeit (bibl-apa-de.tex)
+%D (12/9/2006)
+%D \item Added \type{\setuppublicationlist[maybeyear=off]} by request from
+%D Thomas Schmitz (15/9/2006)
+%D \item Removed some spurious spaces pointed out by willi egger (19/9/2006)
+%D \item Add configuration of bibtex executable name (4/11/2006)
+%D \item Fix numbering=short and numbering=bib (spotted by Matthias W\"achter) (4/11/2006)
+%D \item third attempt to get a correct release (5/11/2006)
+%D \item fix a few missing dots in bibl-num.tex (7/12/2006)
+%D \item Patch for DOI's by Tobias Burnus (17/4/2007)
+%D \item Patch for \type{\insertbiburl} and \type{\insertdoi} for Tobias Burnus (18/4/2007)
+%D \item Added a missing \type{\relax} in \type{\dospecialbibinsert},
+%D that made the space before the {\it et al.} text disappear. (18/4/2007)
+%D \item Attempt to fix percent signs in bbl files. As a side-effect,
+%D this prohibits comments in \tex{startpublication} blocks! (17/4/2008)
+%D \item Patch from Matthias W\"achter that allows arbitrary .bst
+%D files to be used with \tex{setupbibtex} (25/9/2008)
+%D \item Extended for the new multilingual setups for the Oct 2008 current of ConTeXt (23/10/2008)
+%D \item Multilingual setups needed another fix (27/10/2008)
+%D \item Two fixes for bibl-apa by Michael Green (27/10/2008)
+%D \item Catalan translation of 'References' (10/11/2008)
+%D \item 'chapter' -> 'chapitre' in bibl-apa-fr (27/11/2008)
+%D \item Run bibtex via os.execute in mkiv modee (01/12/2008)
+%D \item Small correction in bibl-apa's placement of volume
+%D information in articles (05/01/2009)
+%D \item Handle multi-author (more than two) cases in \type{\cite}
+%D (02/03/2009)
+%D \item Suppress a syntax error in \type{cont-xp} mode. The output is
+%D probably not right, though (02/03/2009)
+%D \item Added a \tex{loadmarkfile} at the end, and two new files
+%D from Hans. The \type{t-bib.mkiv} is needed to make the module
+%D work with the new structure code (17/04/2009)
+%D \item Added a patch to \type{t-bib.mkiv} from Hans to make the
+%D cross referencing between multiple citations an
+%D bibliographies work (27/04/2009)
+%D \item Remove a superfluous \type{\unprotect} in t-bib.mkiv (11/05/2009).
+%D \item Patch of incollection in bibl-ams.tex from Xan (08/06/2009).
+%D \item Patch of unpublished in bibl-ams.tex from Xan (22/07/2009).
+%D \item Modified \type{\bibdogetupsometextprefix} so it works for undefined
+%D language labels, from Hans (13/08/2009).
+%D \item Adapt referencing and list insertion to \MKIV. Update some code
+%D to the latest \CONTEXT. Change some names in order to avoid conflicts
+%D with existing core names (like \type {\insertpages}).
+%D \item All constants, variables, message etc.\ are now in the core.
+%D \item Added key: \type {method} (when \type {global}, previous shown entries are
+%D not shown again, when \type {local} they are repeated).
+%D \stopitemize
+%D
+%D \subject{WISHLIST}
+%D
+%D \startitemize
+%D \item link back from publication list to citation
+%D \item export \type {\citation{<cited item>}}
+%D \item support mlbibtex
+%D \item don't load the whole lot, but filter entries instead
+%D \item 9 vs 10, 19 vs 20 ... prevent extra runs when only subtle changes in wd of reference
+%D \stopitemize
+
+\unprotect
+
+\def\biblistname{pubs} % for compatibility
+
+\definelist
+ [pubs]
+
+\setuplist
+ [pubs]
+ [\c!state=\v!start,
+ \c!criterium=\@@pbcriterium,
+ \c!headnumber=\v!always, % needed as we provide our own and need to force
+ \c!width=]
+
+\installstructurelistprocessor{pubs:userdata}%
+ {\ctxlua{bibtex.hacks.add(structures.lists.uservalue("\currentlist",\currentlistindex,"bibref"),\currentlistindex)}}
+
+\ifdefined\bibtexblock \else \newcount\bibtexblock \fi \bibtexblock\plusone
+\ifdefined\bibtexcounter \else \newcount\bibtexcounter \fi
+
+%D \macros{bibdoif,bibdoifnot,bibdoifelse}
+%D
+%D Here are a few small helpers that are used a lot in all the typesetting commands
+%D (\type{\bibinsert...}) we will encounter later.
+
+\protected\def\bibdoifelse#1%
+ {\expandafter\def\expandafter\!!stringa\expandafter{#1}%
+ \ifempty\!!stringa
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\protected\def\bibdoifnot#1%
+ {\expandafter\def\expandafter\!!stringa\expandafter{#1}%
+ \ifempty\!!stringa
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\protected\def\bibdoif#1%
+ {\expandafter\def\expandafter\!!stringa\expandafter{#1}%
+ \ifempty\!!stringa
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+%D Unfortunately, \BIBTEX\ is not the best configurable program around. The names of
+%D the commands it parses as well as the \type {.aux} extension to the file name are
+%D both hardwired.
+%D
+%D This means \CONTEXT\ has to write a \LATEX-style auxiliary file, yuk! The good
+%D news is that it can be rather short. We'll just ask \BIBTEX\ to output the entire
+%D database(s) into the \type {bbl} file.
+%D
+%D The \type {\bibstyle} command controls how the \type {bbl} file will be sorted.
+%D The possibilities are:
+%D
+%D \startitemize[packed]
+%D \item by author (+year, title): cont-au.bst
+%D \item by title (+author, year): cont-ti.bst
+%D \item by short key as in abbrev.bst: cont-ab.bst
+%D \item not sorted at all: cont-no.bst
+%D \stopitemize
+
+\newtoks\everysetupbibtex
+
+\protected\def\setupbibtex
+ {\dosingleempty\dosetupbibtex}
+
+\protected\def\dosetupbibtex[#1]%
+ {\let\@@pbdatabase\empty
+ \getparameters[\??pb][#1]%
+ \the\everysetupbibtex}
+
+\protected\def\installbibtexsorter#1#2%
+ {\setvalue{\??pb:\c!sort:#1}{#2}}
+
+\installbibtexsorter\v!no {no}
+\installbibtexsorter\v!author {au}
+\installbibtexsorter\v!title {ti}
+\installbibtexsorter\v!short {ab}
+\installbibtexsorter\empty {no}
+\installbibtexsorter\s!default{no}
+
+\def\thebibtexsorter{\executeifdefined{\??pb:\c!sort:\@@pbsort}\@@pbsort}
+
+\appendtoks
+ \ifempty\@@pbdatabase\else
+ \doifmode{*\v!first}{\ctxlua{bibtex.hacks.process { style="\thebibtexsorter", database="\@@pbdatabase" }}}%
+ \fi
+\to \everysetupbibtex
+
+\setupbibtex
+ [\c!sorttype=\v!cite,
+ \c!sort=no]
+
+%D \macros{iftypesetall,ifbibcitecompress}
+%D
+%D The module needs some new \type{\if} statements.
+
+\newtoks\everysetuppublications
+
+\protected\def\setuppublications
+ {\dosingleargument\dosetuppublications}
+
+\protected\def\dosetuppublications[#1]%
+ {\getparameters[\??pb][\c!alternative=,#1]%
+ \doifsomething\@@pbalternative
+ {\readsysfile{bibl-\@@pbalternative.tex}
+ {\showmessage\m!publications{6}{bibl-\@@pbalternative}}
+ {\showmessage\m!publications{1}{bibl-\@@pbalternative}}%
+ \let\@@pbalternative\empty}%
+ \let\setuppublicationlayout\normalsetuppublicationlayout % overloaded in bibl-num ... vadjust needs to be done with option
+ \getparameters[\??pb][#1]% as bibl-* can have set things back
+ \the\everysetuppublications
+ \ignorespaces}
+
+%D We can omit already shown references (\v!global) or use fresh lists each time
+%D (\v!local).
+
+\setnewconstant\bibtexoncemode\plusone % 0=disable, 1=local, 2=global
+
+\appendtoks
+ \doifelse\@@pbmethod\v!local
+ {\bibtexoncemode\plusone}%
+ {\bibtexoncemode\plustwo}%
+\to \everysetuppublications
+
+%D Cite lists are compressed, if possible. This is set later on.
+
+\newif\ifbibcitecompress\bibcitecompresstrue
+
+\def\@@pbinumbercommand{\executeifdefined{\??pb:\c!numbercommand:\@@pbnumbering}\firstofoneargument}
+
+\setvalue{\??pb:\c!numbercommand:\v!yes }#1{#1}%
+\setvalue{\??pb:\c!numbercommand:\v!no }#1{}
+\setvalue{\??pb:\c!numbercommand:\v!short}#1{\bibgetvars\currentpublicationkey}
+\setvalue{\??pb:\c!numbercommand:\v!bib }#1{\bibgetvarn\currentpublicationkey}
+
+% to be tested
+%
+% \setvalue{\??pb:\c!numbercommand:\v!short}{\bibgetvars\currentpublicationkey\firstofoneargument}
+% \setvalue{\??pb:\c!numbercommand:\v!bib }{\bibgetvarn\currentpublicationkey\firstofoneargument}
+
+\appendtoks
+ \processaction
+ [\@@pbrefcommand]
+ [\s!default=>\edef\@@citedefault{\@@pbrefcommand},
+ \s!unknown=>\edef\@@citedefault{\@@pbrefcommand}]%
+\to \everysetuppublications
+
+\protected\def\bibleftnumber#1{#1\hfill~}
+
+%D \macros{usepublications}
+%D
+%D After discussing it with Thomas Schmitz it became clear that using external
+%D references makes no sense as one needs to refer to it in special ways and because
+%D similar numbers can be confusing. So, for the moment this is not supported in
+%D \MKIV. (So no: see reference [3-5,9] in "some other document")
+
+\protected\def\usepublications[#1]%
+ {\processcommalist[#1]\dousepublications}
+
+\protected\def\dousepublications#1%
+ {\doonlyonce{#1.\f!bibextension}{\dodousepublications{#1}}}
+
+\pushoverloadmode
+
+\protected\def\dodousepublications#1% brr, this par stuff
+ {\enforced\let\par\ignorespaces
+ \ifhmode\kern\zeropoint\fi
+ \pushcatcodetable
+ \setcatcodetable\ctxcatcodes
+ \readfile{#1.\f!bibextension}
+ {\showmessage\m!publications{4}{#1.\f!bibextension}}
+ {\showmessage\m!publications{2}{#1.\f!bibextension}}%
+ \popcatcodetable
+ \ifhmode\removeunwantedspaces\fi
+ \enforced\let\par\normalpar}
+
+\popoverloadmode
+
+%D \macros{setuppublicationlist}
+%D
+%D This will be the first command in (\BIBTEX-generated) \type {bbl} files. \quote
+%D {samplesize} is a sample value (in case of \BIBTEX|-|generated files, this will
+%D be the longest \quote {short} key). Here \quote {totalnumber} is the total number
+%D of entries that will follow in this file.
+%D
+%D Both values are only needed for the label calculation if \quote {autohang} is
+%D \quote {true}, so by default the command is not even needed, and therefore I saw
+%D no need to give it it's own system variable and it just re-uses \type {pb}.
+
+\def\publicationlistparameter#1{\csname\??pv:l:#1\endcsname}
+
+\protected\def\setuppublicationlist
+ {\dosingleempty\dosetuppublicationlist}
+
+\protected\def\dosetuppublicationlist[#1]%
+ {\getparameters[\??pv:l:][#1]%
+ \setuplist[pubs][\c!samplesize={AA99},\c!alternative=a,\c!interaction=,\c!pagenumber=\v!no,#1,\c!command=]}
+
+\protected\def\setuppublicationlayout[#1]#2%
+ {\setvalue{\??pv:l:#1}{#2}}
+
+\let\normalsetuppublicationlayout\setuppublicationlayout
+
+\setuppublicationlist
+ [\c!title=,
+ \c!command=\dospecialbibinsert,
+ \c!maybeyear=\v!on]
+
+%D \macros{bibalternative}
+%D
+%D A nice little shorthand that will be used so we don't have to key in the weird
+%D \type {\@@pv} parameter names all the time.
+
+\def\bibalternative#1%
+ {\csname\??pv\@@currentalternative#1\endcsname}
+
+%D \macros{simplebibdef,bibcommandlist}
+%D
+%D \type {\simplebibdef} defines \type {bib@#1}, which in turn will use one argument
+%D that is stored in \type {@@pb@#1}.
+%D
+%D \type {\simplebibdef} also defines \type {bibinsert#1}, which can be used in the
+%D argument of \type {\setuppublicationlayout} to fetch one of the \type {@@pb@}
+%D data entries. \type {bibinsert#1} then has three arguments: \type {#1} are
+%D commands to be executed before the data, \type {#2} are commands to be executed
+%D after the data, and \type {#3} are commands to be executed if the data is not
+%D found.
+%D
+%D \type {\bibcommandlist} is the list of commands that is affected by this
+%D approach. Later on, it will be used to do a series of assignments from \type {#1}
+%D to \type {bib@#1}: e.g \type {\title} becomes \type {\bib@title} when used within
+%D a publication.
+
+\newtoks\initializebibdefinitions % we need to prevent clashes
+
+\protected\def\simplebibdef#1% hh: funny expansion ?
+ {\expandafter\def\csname bib@#1\endcsname##1%
+ {\setvalue{\??pb @#1}{##1}\ignorespaces}%
+ \expandafter \appendtoks
+ \expandafter\let\csname insert#1\expandafter\endcsname\csname bibinsert#1\endcsname
+ \to \initializebibdefinitions
+ \expandafter\protected\expandafter\def\csname bibinsert#1\endcsname##1##2##3%
+ {\expandafter\bibdoifelse\expandafter{\csname\??pb @#1\endcsname}{##1\csname\??pb @#1\endcsname##2}{##3}}}
+
+\def\bibcommandlist
+ {abstract, annotate, arttitle, assignee, bibnumber, bibtype, biburl, chapter, city,
+ comment, country, day, dayfiled, doi, edition, eprint, howpublished, isbn, issn,
+ issue, journal, keyword, keywords, lastchecked, month, monthfiled, names, nationality,
+ note, notes, organization, pages, pubname, pubyear, revision, series, size, thekey,
+ title, volume, yearfiled}
+
+\processcommacommand[\bibcommandlist]\simplebibdef
+
+\protected\def\bibinsertdoi#1#2#3% let's see how this fails
+ {\bibdoifelse{\@@pb@doi}{#1\expanded{\bibgotoDOI{\@@pb@thekey}{\@@pb@doi}}#2}{#3}}
+
+\protected\def\bibinsertbiburl#1#2#3% let's see how this fails
+ {\bibdoifelse{\@@pb@biburl}{#1\expanded{\bibgotoURL{\@@pb@thekey}{\@@pb@biburl}}#2}{#3}}
+
+\protected\def\bibinsertmonth#1#2#3%
+ {\bibdoifelse\@@pb@month
+ {#1\doifelsenumber\@@pb@month
+ {\doifelseconversiondefined\@@pbmonthconversion
+ {\convertnumber\@@pbmonthconversion\@@pb@month}{\@@pb@month}}%
+ {\@@pb@month}#2}%
+ {#3}}
+
+\appendtoks
+ \let\inserturl \bibinsertbiburl % for backward compat.
+ \let\inserttype\bibinsertbibtype % for backward compat.
+\to\initializebibdefinitions
+
+\protected\def\newbibfield[#1]%
+ {\simplebibdef{#1}%
+ \edef\bibcommandlist{\bibcommandlist,#1}}
+
+%D \macros{complexbibdef,specialbibinsert}
+%D
+%D The commands \type {\artauthor}, \type {\author} and \type {\editor} are more
+%D complex than the other commands. Their argument lists have this form:
+%D
+%D \type{\author[junior]{firstnames}[inits]{von}{surname}}
+%D
+%D (bracketed stuff is optional)
+%D
+%D And not only that, but there also might be more than one of each of these
+%D commands. This is why a special command is needed to insert them, as well as one
+%D extra counter for each command.
+
+% todo: instead of \getvalue {bla@num} in specs we should do \bibentrynum {bla} so
+% that we can create a better namespace
+
+%D All of these \type {\expandafter}'s and \type {\csnames} make this code look far
+%D more complex than it really is. For example, the argument \type {author} defines
+%D the macro \type {\bib@author} to do two things: increment the counter \type
+%D {\author@num} (let's say to 2) and next store it's arguments in the macro \type
+%D {\@@pb@author2}. And it defines \type {\bibinsertauthors} to expand into
+%D
+%D \starttyping
+%D \specialbibinsert{author}{\author@num}{<before>}{<after>}{<not>}
+%D \stoptyping
+
+\protected\def\docomplexbibdef#1%
+ {\dodoubleempty\dodocomplexbibdef[#1]}
+
+\protected\def\dodocomplexbibdef[#1][#2]#3%
+ {\doquadrupleempty\dododocomplexbibdef[#1][#2][#3]}
+
+\protected\def\dododocomplexbibdef[#1][#2][#3][#4]#5#6%
+ {\expandafter\increment\csname#1@num\endcsname % todo: bib in name
+ \setevalue{\??pb @#1\csname#1@num\endcsname}{{#3}{#5}{#6}{#4}{#2}}\ignorespaces}
+
+\protected\def\complexbibdef#1%
+ {\expandafter\newcounter\csname #1@num\endcsname
+ \expandafter\def\csname bib@#1\endcsname{\docomplexbibdef{#1}}%
+ \expandafter \appendtoks
+ \expandafter\let\csname insert#1s\expandafter\endcsname\csname bibinsert#1s\endcsname
+ \to \initializebibdefinitions
+ \expandafter\def\csname bibinsert#1s\endcsname##1##2##3{\specialbibinsert{#1}{\csname #1@num\endcsname}{##1}{\unskip ##2}{##3}}}
+
+\processcommalist[author,artauthor,editor]\complexbibdef
+
+%D Another level of indirection is needed to control the typesetting of all of these
+%D arguments.
+
+\newcount\etallimitcounter
+\newcount\etaldisplaycounter
+\newcount\todocounter
+
+\protected\def\specialbibinsert#1#2#3#4#5%
+ {\bgroup
+ \ifnum#2>\zerocount
+ \etallimitcounter =0\bibalternative{#1etallimit}\relax
+ \etaldisplaycounter=0\bibalternative{#1etaldisplay}\relax
+ \ifnum #2>\etallimitcounter
+ \todocounter\etaldisplaycounter
+ % just in case ...
+ \ifnum\todocounter>\etallimitcounter
+ \todocounter\etallimitcounter
+ \fi
+ \else
+ \todocounter#2\relax
+ \fi
+ \ifnum\todocounter>\zerocount
+ % find the current author list
+ \let\templist\empty
+ \dorecurse{#2}
+ {\scratchtoks\doubleexpandafter{\csname\??pb @#1\recurselevel\endcsname}%
+ \edef\templist{\ifempty\templist\else\templist,\fi\the\scratchtoks}}%
+ #3\publicationlistparameter\c!command{#1}{\todocounter}{\templist}#4\relax
+ \else
+ #5%
+ \fi
+ \else
+ #5%
+ \fi
+ \egroup}
+
+%D This macro does the hard work of inserting a list of people in the output, with
+%D proper regard of all the inbetween strings that can arise depending on length of
+%D the list of people.
+
+%D \#1 = type
+%D \#2 = number of items to be typeset
+%D \#3 = commacommand containing authors
+
+\protected\def\doprocessauthoritem#1#2#3%
+ {\advance\scratchcounter\plusone
+ \ifnum\numexpr\scratchcounter-\plusone\relax<#2\relax
+ \publicationlistparameter{#1}#3%
+ \ifnum\scratchcounter=#2\relax
+ \ifnum\etallimitcounter<\commalistsize\relax
+ \bibalternative{#1etaltext}%
+ \fi
+ \orelse\ifnum\numexpr\scratchcounter+\plusone\relax=#2\relax
+ \ifnum\commalistsize>\plustwo
+ \bibalternative\c!finalnamesep
+ \else
+ \bibalternative\c!lastnamesep
+ \fi
+ \else
+ \bibalternative\c!namesep
+ \fi
+ \fi}
+
+\protected\def\dospecialbibinsert#1#2#3%
+ {\getcommacommandsize[#3]%
+ \scratchcounter\zerocount
+ \processcommacommand[#3]{\doprocessauthoritem{#1}{#2}}}
+
+%D \macros{invertedauthor,normalauthor,invertedshortauthor,normalshortauthor}
+%D
+%D Just some commands that can be used in \type {\setuppublicationparameters}
+%D If you want to write an extension to the styles, you might as well define
+%D some of these commands yourself.
+%D
+%D The argument list has been reordered here, and the meanings are:
+%D
+%D \startlines
+%D \type{#1} firstnames
+%D \type{#2} von
+%D \type{#3} surname
+%D \type{#4} inits
+%D \type{#5} junior
+%D \stoplines
+
+\protected\def\normalauthor#1#2#3#4#5%
+ {\bibdoif{#1}{#1\bibalternative\c!firstnamesep}%
+ \bibdoif{#2}{#2\bibalternative\c!vonsep}%
+ #3%
+ \bibdoif{#5}{\bibalternative\c!surnamesep#5\unskip}}
+
+\protected\def\normalshortauthor#1#2#3#4#5%
+ {\bibdoif{#4}{#4\bibalternative\c!firstnamesep}%
+ \bibdoif{#2}{#2\bibalternative\c!vonsep}%
+ #3%
+ \bibdoif{#5}{\bibalternative\c!surnamesep#5\unskip}}
+
+\protected\def\invertedauthor#1#2#3#4#5%
+ {\bibdoif{#2}{#2\bibalternative\c!vonsep}%
+ #3%
+ \bibdoif{#5}{\bibalternative\c!juniorsep#5}%
+ \bibdoif{#1}{\bibalternative\c!surnamesep#1\unskip}}
+
+\protected\def\invertedshortauthor#1#2#3#4#5%
+ {\bibdoif{#2}{#2\bibalternative\c!vonsep}%
+ #3%
+ \bibdoif{#5}{\bibalternative\c!juniorsep#5}%
+ \bibdoif{#4}{\bibalternative\c!surnamesep#4\unskip}}
+
+%D \macros{clearbibitem,clearbibitemtwo,bibitemdefs}
+%D
+%D These are used in \type {\typesetapublication} to do initializations and
+%D cleanups.
+
+\protected\def\clearbibitem#1{\setvalue{\??pb @#1}{}}%
+
+\protected\def\clearbibitemtwo#1% is this reset really needed? after all we reset the counter and we are local
+ {%\dofastrecurse\plusone{\csname#1@num\endcsname}\plusone{\expandafter\let\csname\??pb @#1\recurselevel\undefined}%
+ \letvalue{#1@num}\!!zerocount}
+
+\protected\def\bibitemdefs#1%
+ {\expandafter\let\csname#1\expandafter\endcsname\csname bib@#1\endcsname}
+
+\protected\def\presetbibvariables % make a fast resetter (toks)
+ {\processcommacommand[\bibcommandlist,crossref]\clearbibitem
+ \processcommalist [artauthor,author,editor]\clearbibitemtwo
+ \processcommacommand[\bibcommandlist]\bibitemdefs
+ \processcommalist [artauthor,author,editor,crossref]\bibitemdefs}
+
+%D \macros{startpublication}
+%D
+%D We are coming to the end of this module, to the macros that do typesetting and
+%D read the \type {bbl} file.
+%D
+%D Just a \type {\dosingleempty} is the most friendly of doing this: there need not
+%D even be an argument to \type {\startpublication}. Of course, then there is no key
+%D either, and it had better be an article (otherwise the layout will be all screwed
+%D up).
+%D
+%D Only specifying the key in the argument is also legal. In storing this stuff into
+%D macros, some trickery with token registers is needed to fix the expansion
+%D problems. Even so, this appears to not always be 100\% safe, so people are
+%D urgently advised to use \ETEX\ instead of traditional \TEX.
+%D
+%D In \ETEX, all expansion problems are conveniently solved by the primitive \type
+%D {\protected}. To put that another way:
+%D
+%D It's not a bug in this module if it does not appear in \ETEX!
+%D
+%D Now prohibits comments, so % can be used for urls
+
+\pushoverloadmode
+
+\overloaded \protected\def\startpublication
+ {\dosingleempty\dostartpublication}
+
+\overloaded\let\stoppublication\relax
+
+\popoverloadmode
+
+%D This is rather memory hungry; some day i will rewrite this so that we use the
+%D database instead.
+
+%D \macros{doifbibreferencefoundelse}
+%D
+%D Some macros to fetch the information provided by \type {\startpublication}.
+%D
+%D We can consider a faster variant in the bbl file; we can also consider storing
+%D the keys in lua (and then do more in lua) and use calls to fetch the variables.
+
+% hm, we can store at the lua end ...
+
+\protected\def\dostartpublication[#1]%
+ {\begingroup
+ \doifelseassignment{#1}%
+ {\getparameters[\??pb][k=\s!unknown,t=article,n=,s=,a=,y=,o=,u=,#1]}%
+ {\getparameters[\??pb][k=#1,t=article,n=,s=,a=,y=,o=,u=]}%
+ \ctxlua{bibtex.hacks.register(\!!bs\@@pbk\!!es,\!!bs\@@pbs\!!es)}%
+ \catcode\commentasciicode\othercatcode
+ \dodostartpublication}
+
+\protected\def\dodostartpublication#1\stoppublication
+ {\setxvalue{pbd:\@@pbk}##1{\noexpand\ifcase##1\noexpand\or
+ \@@pbk\noexpand\or
+ \@@pba\noexpand\or
+ \@@pby\noexpand\or
+ \@@pbs\noexpand\or
+ \@@pbn\noexpand\or
+ \@@pbt\noexpand\or
+ \@@pbo\noexpand\or
+ \@@pbu\noexpand\or
+ \normalunexpanded{#1}\noexpand\fi}%
+ \endgroup
+ \ignorespaces}
+
+\def\bibgetvark#1{\csname pbd:#1\endcsname\plusone }
+\def\bibgetvara#1{\csname pbd:#1\endcsname\plustwo }
+\def\bibgetvary#1{\csname pbd:#1\endcsname\plusthree}
+\def\bibgetvars#1{\csname pbd:#1\endcsname\plusfour }
+\def\bibgetvarn#1{\csname pbd:#1\endcsname\plusfive }
+\def\bibgetvart#1{\csname pbd:#1\endcsname\plussix }
+\def\bibgetvaro#1{\csname pbd:#1\endcsname\plusseven}
+\def\bibgetvaru#1{\csname pbd:#1\endcsname\pluseight}
+\def\bibgetvard#1{\csname pbd:#1\endcsname\plusnine }
+
+\protected\def\doifelsebibreferencefound#1%
+ {\preloadbiblist
+ \doifelsedefined{pbd:#1}
+ \firstoftwoarguments
+ {\showmessage\m!publications{5}{#1,\the\inputlineno}\secondoftwoarguments}}
+
+\let\doifbibreferencefoundelse\doifelsebibreferencefound
+
+%D \macros{bib@crossref}
+%D
+%D \type {\crossref} is used in database files to point to another entry. Because of
+%D this special situation, it has to be defined separately. Since this command will
+%D not be seen until at \type {\placepublications}, it may force extra runs. The
+%D same is true for \type {\cite} commands inside of publications.
+
+% used in bib self
+
+\protected\def\bib@crossref#1% called via \csname \endcsname
+ {\setvalue{\??pb @crossref}{#1}\ignorespaces}
+
+\protected\def\bibinsertcrossref#1#2#3%
+ {\bibdoifelse\@@pb@crossref{#1\cite[\@@pb@crossref]#2}{#3}}
+
+\let\insertcrossref\gobblethreearguments
+
+\appendtoks\let\insertcrossref\bibinsertcrossref\to\initializebibdefinitions
+
+%D The next macro is needed because the number command of the publist sometimes
+%D needs to fetch something from the current item (like the 'short' key). For this,
+%D the ID of the current item is passed in the implict parameter \type
+%D {\currentpublicationkey}.
+
+\protected\def\doprocessbibtexentry#1{\typesetapublication{#1}}
+
+\protected\def\typesetpubslist
+ {\begingroup
+ \startpacked[\v!blank]%
+ \preloadbiblist
+ % \the\initializebibdefinitions % COMMENTED
+ \edef\currentlist{pubs}%
+ \ctxlua{bibtex.hacks.reset(\number\bibtexoncemode)}%
+ \doifelse{\listparameter\c!criterium}\v!all
+ {\showmessage\m!publications{7}{}%
+ \ctxlua{bibtex.hacks.filterall()}}
+ {\doif{\listparameter\c!criterium}\v!cite
+ {\setuplist[pubs][\c!criterium=\v!here]}%
+ \strc_lists_place_current
+ {pubs}%
+ {\listparameter\c!criterium}%
+ {}%
+ {\listparameter\c!extras}%
+ {\listparameter\c!order}}%
+ \ctxlua{bibtex.hacks.flush("\@@pbsorttype")}%
+ \stoppacked
+ \endgroup}
+
+\newif\ifinpublist
+
+\protected\def\initializepubslist
+ {\def\currentlist{pubs}%
+ \edef\@@pbnumbering{\@@pbnumbering}%
+ \doifelse\@@pbautohang\v!yes
+ {\ifx\@@pbnumbering\v!short
+ \setbox\scratchbox\hbox{\@@pbnumbercommand{\listparameter\c!samplesize}}%
+ \else
+ \doifelse{\listparameter\c!criterium}\v!all
+ {\setbox\scratchbox\hbox{\@@pbnumbercommand{\ctxlua{tex.write{bibtex.hacks.nofregistered()}}}}}
+ {\determinelistcharacteristics[pubs]%
+ \setbox\scratchbox\hbox{\@@pbnumbercommand{\structurelistsize}}}%
+ \fi
+ \edef\publistnumberbox{\hbox to \the\wd\scratchbox}%
+ \expanded{\setuplist[pubs][\c!width=\the\wd\scratchbox,\c!distance=\zeropoint]}%
+ \ifx\@@pbnumbering\v!short
+ \def\@@pblimitednumber##1{\publistnumberbox{\@@pbnumbercommand{\bibgetvars\currentpublicationkey}}}%
+ \orelse\ifx\@@pbnumbering\v!bib
+ \def\@@pblimitednumber##1{\publistnumberbox{\@@pbnumbercommand{\bibgetvarn\currentpublicationkey}}}%
+ \else
+ \def\@@pblimitednumber##1{\publistnumberbox{\@@pbnumbercommand{##1}}}%
+ \fi}
+ {\doifelsenothing{\listparameter\c!width}
+ {\let \publistnumberbox \hbox}
+ {\edef\publistnumberbox{\hbox to \listparameter\c!width}}%
+ \ifx\@@pbnumbering\v!short
+ \def\@@pblimitednumber##1{\publistnumberbox{\@@pbnumbercommand{\bibgetvars\currentpublicationkey}}}%
+ \orelse\ifx\@@pbnumbering\v!bib
+ \def\@@pblimitednumber##1{\publistnumberbox{\@@pbnumbercommand{\bibgetvarn\currentpublicationkey}}}%
+ \else
+ \def\@@pblimitednumber##1{\publistnumberbox{\@@pbnumbercommand{##1}}}%
+ \fi}%
+ \ifx\@@pbnumbering\v!no
+ \setuplist[pubs][\c!numbercommand=,\c!symbol=\v!none,\c!textcommand=\outdented]%
+ \else
+ \setuplist[pubs][\c!numbercommand=\@@pblimitednumber]%
+ \fi
+ \doifelse{\publicationlistparameter\c!maybeyear}{\v!off}{\def\maybeyear##1{}}{\def\maybeyear##1{##1}}%
+ \forgetall}
+
+%D The full list of publications
+
+\protected\def\completepublications
+ {\dosingleempty\docompletepublications}
+
+\protected\def\docompletepublications[#1]%
+ {\begingroup
+ \setuplist[pubs][#1]%
+ \edef\currentbibtexsessiontitle{\publicationlistparameter\c!title}%
+ \ifempty\currentbibtexsessiontitle
+ \normalexpanded{\startnamedsection[\v!chapter][\c!reference=pubs,\c!title={\headtext{pubs}}]}%
+ \else
+ \normalexpanded{\startnamedsection[\v!chapter][\c!reference=pubs,\c!title={\currentbibtexsessiontitle}]}%
+ \fi
+ \dodoplacepublications
+ \stopnamedsection
+ \endgroup}
+
+%D And the portion with the entries only.
+
+\def\bibrefprefix{\number\bibtexblock:}
+
+\protected\def\placepublications
+ {\dosingleempty\doplacepublications}
+
+\protected\def\doplacepublications[#1]%
+ {\begingroup
+ \setuplist[pubs][#1]%
+ \dodoplacepublications
+ \endgroup}
+
+\protected\def\dodoplacepublications
+ {\determinelistcharacteristics[pubs]%
+ \initializepubslist
+ \doifnot{\namedlistparameter{pubs}\c!option}\v!continue
+ {\global\bibtexcounter\zerocount}%
+ \inpublisttrue
+ \typesetpubslist
+ \inpublistfalse
+ \global\advance\bibtexblock\plusone}
+
+%D \subsubject{What's in a publication}
+%D
+%D Watch out: here all means all publications in database, so use text when you want
+%D text only.
+
+\protected\def\typesetapublication#1%
+ {\doifsomething{#1}
+ {\doifelse{\namedlistparameter{pubs}\c!criterium}\v!all
+ {\doplacepublicationindeed{#1}}%
+ {\ctxlua{bibtex.hacks.doifalreadyplaced("#1")}
+ {}
+ {\doplacepublicationindeed{#1}}}%
+ }}
+
+%D For the moment we don't access the data directly but we will do that later when
+%D we get away from storing the data and only deal with references.
+
+% we'll define proper handlers later
+
+\protected\def\doplacepublicationindeed#1%
+ {\doifelsebibreferencefound{#1}
+ {\global\advance\bibtexcounter\plusone
+ \def\currentpublicationkey{#1}%
+ \ctxlua{bibtex.hacks.registerplaced("#1")}%
+ \def \currentlist {pubs}%
+ \edef\currentlistentrynumber {\number\bibtexcounter}%
+ \let \currentlistentrytitle \bibtexpubtext
+ \let \currentlistentrypagenumber\empty
+ \strc_lists_apply_renderingsetup}
+ {}} % invalid
+
+\protected\def\bibtexpubtext
+ {\expanded{\reference[\bibrefprefix\currentpublicationkey]{\number\bibtexcounter}}%
+ \strut\dotypesetapublication\currentpublicationkey\strut}
+
+\protected\def\dotypesetapublication#1%
+ {\bgroup
+ \the\initializebibdefinitions % NEW
+ \def\@@currentalternative{:l:}%
+ \presetbibvariables
+ \let\biblanguage\empty
+ \ignorespaces
+ \bibgetvard{#1}%
+ \removeunwantedspaces
+ \ignorespaces
+ \bibalternative{\bibgetvart{#1}}%
+ \removeunwantedspaces
+ \egroup}
+
+%D An few afterthoughts:
+
+\let\maybeyear\gobbleoneargument
+\let\noopsort \gobbleoneargument
+
+%D This is the result of bibtex's `language' field.
+
+\protected\def\setbiblanguage#1#2{\setvalue{\??pb\s!language#1}{#2}}
+
+\protected\def\lang#1%
+ {\edef\biblanguage{#1}%
+ \ifcsname\??pb\s!language#1\endcsname
+ \language[\getvalue{\??pb\s!language#1}]%
+ \fi
+ \ignorespaces}
+
+%D \subject{Citations}
+
+%D \macros{cite,bibref}
+%D
+%D The indirection with \type {\dobibref} allows \LATEX\ style \type {\cite}
+%D commands with a braced argument (these might appear in included data from the
+%D \type {.bib} file).
+
+\pushoverloadmode
+
+\protected\def\cite
+ {\strictdoifelsenextoptional\dodocite\dobibref}
+
+\popoverloadmode
+
+\protected\def\dobibref#1%
+ {\docite[#1][]}
+
+\protected\def\dodocite[#1]%
+ {\strictdoifelsenextoptional{\docite[#1]}{\docite[#1][]}}
+
+\protected\def\docite[#1][#2]%
+ {\begingroup
+ \doifelsesomething{#2}
+ {\dowhatevercite{#1}{#2}}%
+ {\donumberedcite{#1}}%
+ \endgroup}
+
+\protected\def\dowhatevercite#1#2%
+ {\processcommalist[#2]\docitation
+ \setupinteraction[\c!style=]%
+ \doifelseassignment
+ {#1}%
+ {\getparameters[LO][\c!alternative=,\c!extras=,#1]%
+ \edef\@@currentalternative{\LOalternative}%
+ \ifempty\@@currentalternative
+ \edef\@@currentalternative{\@@citedefault}%
+ \fi
+ \ifempty\LOextras
+ \setupcite[\@@currentalternative][#1]%
+ \else
+ \expandafter\ifrelax\csname \??pv \@@currentalternative\c!right\endcsname
+ % avoids tail recursion
+ \expandafter\let\csname \??pv \@@currentalternative\c!right\endcsname\empty
+ \fi
+ \expandafter\ifrelax\csname LOright\endcsname
+ \edef\LOextras{{\LOextras\bibalternative\c!right}}%
+ \else
+ \edef\LOextras{{\LOextras\LOright}}%
+ \fi
+ \expanded{\setupcite[\@@currentalternative][#1,\c!right=\LOextras]}%
+ \fi}%
+ {\def\@@currentalternative{#1}}%
+ \doifelsevalue{@@pv\@@currentalternative\c!compress}\v!no\bibcitecompressfalse\bibcitecompresstrue
+ \getvalue{bib\@@currentalternative ref}[#2]}
+
+\protected\def\donumberedcite#1%
+ {\processcommalist[#1]\docitation
+ \setupinteraction[\c!style=]%
+ \edef\@@currentalternative{\@@citedefault}%
+ \doifelsevalue{@@pv\@@currentalternative\c!compress}\v!no\bibcitecompressfalse\bibcitecompresstrue
+ \getvalue{bib\@@citedefault ref}[#1]}
+
+%D \macros{nocite}
+
+\pushoverloadmode
+
+\protected\def\nocite[#1]%
+ {\processcommalist[#1]\docitation}
+
+\popoverloadmode
+
+%D \macros{setupcite}
+
+\permanent\tolerant\protected\def\setupcite[#1]#*[#2]%
+ {\ifparameter#2\or
+ \def\dodosetupcite##1{\getparameters[\??pv##1][#2]}%
+ \processcommalist[#1]\dodosetupcite
+ \else % default case
+ \getparameters[\??pv\@@citedefault][#1]%
+ \fi}
+
+%D Low-level stuff
+
+\protected\def\getcitedata#1[#2]#*[#3]#*to#4%
+ {\bgroup
+ \dofetchapublication{#3}%
+ \doifelsedefined{\??pb @bib#2}%
+ {\xdef#4{\getvalue{\??pb @bib#2}}}%
+ {\xdef#4{\getvalue{\??pb @#2}}}%
+ \egroup}
+
+\protected\def\dofetchapublication#1%
+ {\def\currentpublicationkey{#1}%
+ \presetbibvariables
+ \ignorespaces\bibgetvard{#1}}
+
+\protected\def\docitation#1%
+ {\iftrialtypesetting \else
+ \expanded{\writedatatolist[pubs][bibref=#1]}%
+ \fi}
+
+\let\addthisref\gobbleoneargument % keep this for compatibility
+
+%D \macros{ixbibauthoryear,thebibauthors,thebibyears}
+%D
+%D If compression of \type {\cite}'s argument expansion is on, the macros that deal
+%D with authors and years call this internal command to do the actual typesetting.
+%D
+%D Two entries with same author but with different years may be condensed into
+%D ``Author (year1,year2)''. This is about the only optimization that makes sense
+%D for the (author,year) style of citations (years within one author have to be
+%D unique anyway so no need to test for that, and ``Author1, Author2 (year)''
+%D creates more confusion than it does good).
+%D
+%D In the code below, the macro \type {\thebibauthors} holds the names of the
+%D alternative author info fields for the current list. This is a commalist, and
+%D \type {\thebibyears} holds the (collection of) year(s) that go with this author
+%D (possibly as a nested commalist).
+%D
+%D There had better be an author for all cases, but there does not have to be year
+%D info always. \type{\thebibyears} is pre|-|initialized because this makes the
+%D insertion macros simpler.
+%D
+%D In normal \TEX, of course there are expansion problems again.
+
+%D Delegate this to \LUA.
+
+% \let\ixlastcommand \relax
+% \let\ixsecondcomman \relax
+% \let\ixfirstcommand \relax
+% \let\thebibauthors \empty
+% \let\thebibyears \empty
+% \let\authorcount \!!zerocount
+
+\let\currentbibauthor\empty
+
+\protected\def\ixbibauthoryear#1#2#3#4%
+ {\bgroup
+ \gdef\ixlastcommand {#4}%
+ \gdef\ixsecondcommand{#3}%
+ \gdef\ixfirstcommand {#2}%
+ \glet\thebibauthors \empty
+ \glet\thebibyears \empty
+ \getcommalistsize[#1]%
+ \ifbibcitecompress
+ \dorecurse\commalistsize{\xdef\thebibyears{\thebibyears,}}%
+ \processcommalist[#1]\docompressbibauthoryear
+ \else
+ \processcommalist[#1]\donormalbibauthoryear
+ \fi
+ \egroup
+ \dobibauthoryear}
+
+%D \macros{dodobibauthoryear}
+%D
+%D This macro only has to make sure that the lists \type {\thebibauthors} and \type
+%D {\thebibyears} are printed.
+
+\protected\def\dobibauthoryear
+ {\scratchcounter\zerocount
+ \getcommacommandsize[\thebibauthors]%
+ \edef\authorcount{\commalistsize}%
+ \expandafter\processcommalist\expandafter[\thebibauthors]\dodobibauthoryear}
+
+\protected\def\dodobibauthoryear#1%
+ {\advance\scratchcounter\plusone
+ \edef\wantednumber{\the\scratchcounter}%
+ \getfromcommacommand[\thebibyears][\wantednumber]%
+ \expandafter\def\expandafter\currentbibyear\expandafter{\commalistelement}%
+ \setcurrentbibauthor{#1}%
+ \ifnum\scratchcounter=\plusone
+ \ixfirstcommand
+ \orelse\ifnum \scratchcounter=\authorcount\relax
+ \ixlastcommand
+ \else
+ \ixsecondcommand
+ \fi}
+
+\protected\def\setcurrentbibauthor#1% sensitive for empty entries but I don't want to touch this
+ {\getcommacommandsize[#1]%
+ \ifcase\commalistsize
+ % anonymous?
+ \let\currentbibauthor\empty
+ \or
+ \def\currentbibauthor{#1}%
+ \or
+ \expanded{\docurrentbibauthor#1}%
+ \else
+ \handlemultiplebibauthors{\commalistsize}{#1}%
+ \fi}
+
+\newcount\citescratchcounter
+
+\protected\def\handlemultiplebibauthors#1#2%
+ {\citescratchcounter\zerocount
+ \let\currentbibauthor\empty
+ \protected\def\bibprocessauthoritem##1%
+ {\advance\citescratchcounter\plusone
+ \ifnum \citescratchcounter=#1\relax
+ \edef\currentbibauthor{\currentbibauthor##1}%
+ \orelse\ifnum\numexpr\citescratchcounter+\plusone\relax=#1\relax
+ \edef\currentbibauthor{\currentbibauthor##1\bibalternative{andtext}}%
+ \else
+ \edef\currentbibauthor{\currentbibauthor##1\bibalternative{namesep}}%
+ \fi}%
+ \processcommalist[#2]\bibprocessauthoritem}
+
+\setupcite
+ [author,authoryear,authoryears]
+ [\c!namesep={, }]
+
+%D This discovery of authoretallimit is not the best one,
+%D but it will do for now.
+
+\protected\def\docurrentbibauthor#1,#2%
+ {\doifelseempty{#2}
+ {\def\currentbibauthor{#1\bibalternative{otherstext}}}
+ {\expandafter\ifrelax\csname\??pv\@@currentalternative authoretallimit\endcsname
+ \edef\currentbibauthor{#1\bibalternative{andtext}#2}%
+ \else
+ \edef\currentbibauthor{#1%
+ \ifcase0\bibalternative{authoretallimit}\relax\or
+ \bibalternative{otherstext}\else\bibalternative{andtext}#2\fi}%
+ \fi}}
+
+%D This is not the one Hans made for me, because I need a global
+%D edef, and the \type {\robustdoifinsetelse} doesn't listen to
+%D \type {\doglobal}.
+
+\pushoverloadmode
+
+ \protected\def\robustaddtocommalist#1#2% {item} \cs
+ {\robustdoifelseinset{#1}#2\resetglobal
+ {\dodoglobal\xdef#2{\ifempty#2\else#2,\fi#1}}}
+
+\popoverloadmode
+
+%D \macros{donormalbibauthoryear}
+%D
+%D Now we get to the macros that fill the two lists. The \quote {simple} one really
+%D is quite simple.
+
+\protected\def\donormalbibauthoryear#1%
+ {\def\myauthor{Xxxxxxxxxx}%
+ \def\myyear{0000}%
+ \doifelsebibreferencefound{#1}
+ {\def\myauthor{{\bibgetvara{#1}}}%
+ \def\myyear {\bibgetvary{#1}}}%
+ {}%
+ \expandafter\doglobal\expandafter\appendtocommalist\expandafter{\myauthor}\thebibauthors
+ \expandafter\doglobal\expandafter\appendtocommalist\expandafter{\myyear }\thebibyears}
+
+%D \macros{docompressbibauthoryear}
+%D
+%D So much for the easy parts. Nothing at all will be done if the reference is not
+%D found or the reference does not contain author data. No questions marks o.s.s.
+%D (to be fixed later).
+
+\protected\def\docompressbibauthoryear#1%
+ {\def\myauthor{Xxxxxxxxxx}%
+ \def\myyear {0000}%
+ \doifelsebibreferencefound{#1}
+ {\xdef\myauthor{\bibgetvara{#1}}%
+ \xdef\myyear {\bibgetvary{#1}}}
+ {}%
+ \ifempty\myauthor\else
+ \checkifmyauthoralreadyexists
+ \findmatchingyear
+ \fi}
+
+%D Two temporary counters. One of these two can possibly be replaced by \type
+%D {\scratchcounter}.
+
+\newcount\bibitemcounter
+\newcount\bibitemwanted
+
+%D The first portion is simple enough: if this is the very first author it is quite
+%D straightforward to add it. \type {\bibitemcounter} and \type {\bibitemwanted} are
+%D needed later to insert the year information in the correct item of \type
+%D {\thebibyears}.
+
+\protected\def\checkifmyauthoralreadyexists
+ {\doifelseemptyvalue{thebibauthors}
+ {\global\bibitemwanted \plusone
+ \global\bibitemcounter\plusone
+ \xdef\thebibauthors{{\myauthor}}}
+ {% the next weirdness is because according to \getcommalistsize,
+ % the length of \type{[{{},{}}]} is 2.
+ \expandafter\getcommalistsize\expandafter[\thebibauthors,]%
+ \global\bibitemcounter\numexpr\commalistsize+\minusone\relax
+ \global\bibitemwanted \zerocount
+ \processcommacommand[\thebibauthors]\docomparemyauthor}}
+
+%D The outer \type {\ifnum} accomplishes the addition of a new author to \type
+%D {\thebibauthors}. The messing about with the two counters is again to make sure
+%D that \type {\thebibyears} will be updated correctly.If the author {\it was}
+%D found, the counters will stay at their present values and everything will be
+%D setup properly to insert the year info.
+
+\protected\def\docomparemyauthor#1%
+ {\global\advance\bibitemwanted \plusone
+ \def\mytempc{#1}%
+ \ifx\mytempc\myauthor
+ \quitcommalist
+ \orelse\ifnum\bibitemwanted=\bibitemcounter\relax
+ \global\advance\bibitemwanted \plusone
+ \global\bibitemcounter\bibitemwanted\relax
+ \expandafter\doglobal\expandafter\robustaddtocommalist\expandafter{{\myauthor}}\thebibauthors
+ \fi}
+
+%D This macro should be clear now.
+
+\protected\def\findmatchingyear
+ {\edef\wantednumber{\the\bibitemwanted}%
+ \getfromcommacommand[\thebibyears][\wantednumber]%
+ \ifempty\commalistelement
+ \edef\myyear{{\myyear}}%
+ \else
+ \edef\myyear{{\commalistelement,\myyear}}%
+ \fi
+ \edef\newcommalistelement{\myyear}%
+ \doglobal\replaceincommalist \thebibyears \wantednumber}
+
+%D \macros{gotobiblink,inbiblink,atbiblink}
+%D
+%D The final task is looping over that list until a match is found.
+
+%D Beware, we can have cites without reference match.
+
+\protected\def\gotobiblink#1[#2]{\doifelsereferencefound{\bibrefprefix#2}{\goto{#1}[\bibrefprefix#2]}{#1}}
+\protected\def\atbiblink [#1]{\doifelsereferencefound{\bibrefprefix#1}{\at [\bibrefprefix#1]}{#1}}
+\protected\def\inbiblink [#1]{\doifelsereferencefound{\bibrefprefix#1}{\expanded{\goto{\currentreferencetext}}[\bibrefprefix#1]}{#1}}
+
+%D \macros{bibauthoryearref,bibauthoryearsref,bibauthorref,bibyearref}
+%D
+%D Now that all the hard work has been done, these are simple. \type
+%D {\ixbibauthoryearref} stores the data in the macros \type {\currentbibauthor} and
+%D \type {\currentbibyear}.
+
+\protected\def\doifelsebibinteraction
+ {\iflocation
+ \edef\test{\bibalternative\c!interaction}%
+ \ifx\test\v!stop
+ \doubleexpandafter\secondoftwoarguments
+ \else
+ \doubleexpandafter\firstoftwoarguments
+ \fi
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\let\doifbibinteractionelse\doifelsebibinteraction
+
+\protected\def\bibmaybeinteractive#1#2%
+ {\doifelsebibinteraction{\gotobiblink{#2}[#1]}{#2}}
+
+\protected\def\bibauthoryearref[#1]%
+ {\ixbibauthoryear{#1}%
+ {\bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween
+ \bibalternative\v!left{\currentbibyear}\bibalternative\v!right}}
+ {\bibalternative\c!pubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween
+ \bibalternative\v!left {\currentbibyear}\bibalternative\v!right}}
+ {\bibalternative\c!lastpubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween
+ \bibalternative\v!left {\currentbibyear}\bibalternative\v!right}}}
+
+\protected\def\bibauthoryearsref[#1]%
+ {\bibalternative\v!left
+ \ixbibauthoryear{#1}
+ {\bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}}
+ {\bibalternative\c!pubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}}
+ {\bibalternative\c!lastpubsep
+ \bibmaybeinteractive{#1}{{\currentbibauthor}\bibalternative\c!inbetween{\currentbibyear}}}%
+ \bibalternative\v!right}
+
+\protected\def\bibauthorref[#1]%
+ {\bibalternative\v!left
+ \ixbibauthoryear{#1}%
+ {\bibmaybeinteractive{#1}{{\currentbibauthor}}}
+ {\bibalternative\c!pubsep \bibmaybeinteractive{#1}{{\currentbibauthor}}}
+ {\bibalternative\c!lastpubsep\bibmaybeinteractive{#1}{{\currentbibauthor}}}%
+ \bibalternative\v!right}
+
+\protected\def\bibyearref[#1]%
+ {\bibalternative\v!left
+ \ixbibauthoryear{#1}%
+ {\bibmaybeinteractive{#1}{{\currentbibyear}}}
+ {\bibalternative\c!pubsep \bibmaybeinteractive{#1}{{\currentbibyear}}}
+ {\bibalternative\c!lastpubsep\bibmaybeinteractive{#1}{{\currentbibyear}}}%
+ \bibalternative\v!right}
+
+%D \macros{bibshortref,bibkeyref,bibpageref,bibtyperef,bibserialref}
+%D
+%D There is hardly any point in trying to compress these. The only thing that needs
+%D to be done is making sure that the separations are inserted correctly. And that
+%D is what \type {\bibinsertrefsep} does.
+
+\newconditional\firstbibrefsep
+
+\protected\def\bibresetrefsep
+ {\settrue\firstbibrefsep}
+
+\protected\def\bibinsertrefsep
+ {\ifconditional\firstbibrefsep
+ \setfalse\firstbibrefsep
+ \else
+ \bibalternative\c!pubsep
+ \fi}
+
+\protected\def\bibshortref[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobibshortref
+ \bibalternative\v!right}
+
+\protected\def\dobibshortref#1%
+ {\bibinsertrefsep
+ \doifelsebibreferencefound{#1}
+ {\gotobiblink{\bibgetvars{#1}}[#1]}
+ {}}
+
+\protected\def\bibserialref[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobibserialref
+ \bibalternative\v!right}
+
+\protected\def\dobibserialref#1%
+ {\bibinsertrefsep
+ \doifelsebibreferencefound{#1}
+ {\gotobiblink{\bibgetvarn{#1}}[#1]}
+ {}}
+
+\protected\def\bibkeyref[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobibkeyref
+ \bibalternative\v!right}
+
+\protected\def\dobibkeyref#1%
+ {\bibinsertrefsep
+ \gotobiblink{#1}[#1]}
+
+\protected\def\bibgotoDOI#1#2%
+ {\doifelsebibinteraction
+ {\useURL[bibfooDoi#1][#2]%
+ \useURL[bibfoo#1][http://dx.doi.org/#2]%
+ \goto{\url[bibfooDoi#1]}[url(bibfoo#1)]}
+ {\hyphenatedurl{#2}}}
+
+\protected\def\bibdoiref[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobibdoiref
+ \bibalternative\v!right}
+
+\protected\def\dobibdoiref#1%
+ {\bibinsertrefsep
+ \doifelsebibreferencefound{#1}
+ {\expanded{\bibgotoDOI{#1}{\bibgetvaro{#1}}}}
+ {}}
+
+\protected\def\biburlref[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobiburlref
+ \bibalternative\v!right}
+
+\protected\def\bibgotoURL#1#2%
+ {\doifelsebibinteraction
+ {\useURL[bibfoo#1][#2]\goto{\url[bibfoo#1]}[url(bibfoo#1)]}
+ {\hyphenatedurl{#2}}}
+
+\protected\def\dobiburlref#1%
+ {\bibinsertrefsep
+ \doifelsebibreferencefound{#1}
+ {\expanded{\bibgotoURL{#1}{\bibgetvaru{#1}}}}
+ {}}
+
+\protected\def\bibtyperef[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobibtyperef
+ \bibalternative\v!right}
+
+\protected\def\dobibtyperef#1%
+ {\bibinsertrefsep
+ \doifelsebibreferencefound{#1}
+ {\gotobiblink{\bibgetvart{#1}}[#1]}
+ {}}
+
+\protected\def\bibpageref[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobibpageref
+ \bibalternative\v!right}
+
+\protected\def\dobibpageref#1%
+ {\bibinsertrefsep
+ \doifelsebibinteraction
+ {\atbiblink[#1]}
+ {{\referencingfalse\at[#1]}}}
+
+\protected\def\bibdataref[#1]%
+ {\bibalternative\v!left
+ \bibresetrefsep\processcommalist[#1]\dobibdata
+ \bibalternative\v!right}
+
+\protected\def\dobibdata#1%
+ {\bibinsertrefsep
+ \doifelsebibreferencefound{#1}
+ {\dotypesetapublication{#1}}
+ {}}
+
+\let\bibnoneref\nocite
+
+%D \macros{bibnumref}
+
+\protected\def\bibnumref[#1]%
+ {\begingroup
+ \bibalternative\v!left
+ \penalty\plustenthousand
+ \ctxlua{bibtex.hacks.resolve("","\number\bibtexblock","#1")}%
+ \bibalternative\v!right
+ \endgroup}
+
+\protected\def\dowithbibtexnumrefconnector#1#2%
+ {\ifnum#1>\plusone
+ \ifnum#2>\plusone
+ \ifnum#2=#1\relax
+ \bibalternative{lastpubsep}%
+ \else
+ \bibalternative{pubsep}%
+ \fi
+ \fi
+ \fi}
+
+\protected\def\dowithbibtexnumref#1#2#3#4#5% n, i, prefix block ref
+ {\dowithbibtexnumrefconnector{#1}{#2}%
+ \def\bibrefprefix{#4:}%
+ \inbiblink[#5]}
+
+\protected\def\dowithbibtexnumrefrange#1#2#3#4#5#6#7% n, i, prefix block ref
+ {\dowithbibtexnumrefconnector{#1}{#2}%
+ \def\bibrefprefix{#4:}%
+ \inbiblink[#5]%
+ \endash
+ \def\bibrefprefix{#6:}%
+ \inbiblink[#7]}
+
+%D By request from Sanjoy. This makes it easier to implement \type {\citeasnoun}.
+
+\protected\def\bibauthornumref[#1]%
+ {\getcommalistsize[#1]%
+ \global\bibitemcounter\commalistsize
+ \bibresetrefsep
+ \processcommalist[#1]\dobibauthornumref}
+
+\protected\def\dobibauthornumref#1%
+ {\bibinsertrefsep
+ \doifelsebibreferencefound{#1}
+ {\begingroup
+ \cite[\c!left=,\c!right=,\c!alternative=\v!author][#1]%
+ \bibalternative\c!inbetween
+ \cite[num][#1]%
+ \endgroup}
+ {}}
+
+%D And some defaults are loaded from bibl-apa:
+
+\setuppublications
+ [\c!monthconversion=,
+ \c!alternative=apa,
+ \c!method=\v!global,
+ %\c!criterium=\v!previous,
+ \c!criterium=\v!cite, % mojca wants this so bother her, not me
+ \c!refcommand=num,
+ \c!numbercommand=\bibleftnumber]
+
+\protected\def\preloadbiblist
+ {\glet\preloadbiblist\relax
+ \dousepublications\jobname}
+
+% \appendtoks \preloadbiblist \to \everysetuppublications
+% \appendtoks \preloadbiblist \to \everystarttext
+
+\let\ifbibinteractionelse\doifbibinteractionelse
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/blob-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/blob-ini.lmt
new file mode 100644
index 00000000000..42a18fddde0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/blob-ini.lmt
@@ -0,0 +1,210 @@
+if not modules then modules = { } end modules ['blob-ini'] = {
+ version = 1.001,
+ comment = "companion to blob-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This module is just a playground. Occasionally we need to typeset at the lua and and
+-- this is one method. In principle we can construct pages this way too which sometimes
+-- makes sense in dumb cases. Actually, if one only needs this, one does not really need
+-- tex, okay maybe the parbuilder but that one can be simplified as well then.
+
+-- set fonts, attributes
+-- rest already done in packers etc
+-- add local par whatsit (or wait till cleaned up)
+-- collapse or new pars
+-- interline spacing etc
+
+-- blob.char
+-- blob.line
+-- blob.paragraph
+-- blob.page
+
+local type, tostring = type, tostring
+local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
+
+local report_blobs = logs.reporter("blobs")
+
+local flush_node_list = node.flush_list
+local hpack_node_list = node.hpack
+----- vpack_node_list = node.vpack
+local write_node = node.write
+
+local typesetters = nodes.typesetters
+local tonodes = typesetters.tonodes
+local tohpack = typesetters.tohpack
+local tovpack = typesetters.tovpack
+
+local implement = interfaces.implement
+
+-- provide copies here (nicer for manuals)
+
+blobs = blobs or { }
+local blobs = blobs
+
+blobs.tonodes = tonodes
+blobs.tohpack = tohpack
+blobs.tovpack = tovpack
+
+-- end of helpers
+
+local newline = lpeg.patterns.newline
+local space = lpeg.patterns.spacer
+local newpar = (space^0*newline*space^0)^2
+
+local ctxtextcapture = lpeg.Ct ( ( space^0 * ( newpar + lpeg.Cs(((space^1/" " + 1)-newpar)^1) ) )^0)
+
+function blobs.new()
+ return {
+ list = { },
+ }
+end
+
+function blobs.dispose(t)
+ local list = t.list
+ for i=1,#list do
+ local li = list[i]
+ local pack = li.pack
+ if pack then
+ flush_node_list(pack)
+ li.pack = nil
+ end
+ end
+end
+
+function blobs.append(t,str) -- compare concat and link
+ local typ = type(str)
+ local dummy = nil
+ if typ == "number" then
+ str = tostring(str)
+ typ = "string"
+ end
+ if typ == "string" then
+ local pars = lpegmatch(ctxtextcapture,str)
+ local list = t.list
+ for p=1,#pars do
+ local head, tail = tonodes(pars[p],nil,nil)
+ list[#list+1] = { head = head, tail = tail }
+ end
+ end
+end
+
+function blobs.pack(t,how)
+ local list = t.list
+ for i=1,#list do
+ local pack = list[i].pack
+ if pack then
+ flush_node_list(node.pack)
+ end
+ if how == "vertical" then
+ -- we need to prepend a local par node
+ -- list[i].pack = vpack_node_list(list[i].head,"exactly")
+ report_blobs("vpack not yet supported")
+ else
+ list[i].pack = hpack_node_list(list[i].head,"exactly")
+ end
+ end
+end
+
+function blobs.write(t)
+ local list = t.list
+ for i=1,#list do
+ local li = list[i]
+ local pack = li.pack
+ if pack then
+ write_node(pack)
+ flush_node_list(pack)
+ li.pack = nil
+ end
+ end
+end
+
+function blobs.dimensions(t)
+ local list = t.list
+ local first = list and list[1]
+ if first then
+ local pack = first.pack
+ return pack.width, pack.height, pack.depth
+ else
+ return 0, 0, 0
+ end
+end
+
+-- blob.char
+-- blob.line: head, tail
+-- blob.paragraph
+-- blob.page
+
+-- local lineblob = {
+-- type = "line",
+-- head = false,
+-- tail = false,
+-- pack = false,
+-- properties = { },
+-- end
+
+-- local parblob = {
+-- type = "line",
+-- head = false,
+-- tail = false,
+-- pack = false,
+-- properties = { },
+-- end
+
+-- for the moment here:
+
+local function strwd(str)
+ local l = tohpack(str)
+ local w = l.width
+ flush_node_list(l)
+ return w
+end
+
+local function strht(str)
+ local l = tohpack(str)
+ local h = l.height
+ flush_node_list(l)
+ return h
+end
+
+local function strdp(str)
+ local l = tohpack(str)
+ local d = l.depth
+ flush_node_list(l)
+ return d
+end
+
+local function strhd(str)
+ local l = tohpack(str)
+ local s = l.height + l.depth
+ flush_node_list(l)
+ return s
+end
+
+blobs.strwd = strwd
+blobs.strht = strht
+blobs.strdp = strdp
+blobs.strhd = strhd
+
+-- upgraded
+
+local dimension_code = tokens.values.dimension
+local scan_hbox = tokens.scanners.hbox
+
+local function action(field,what)
+ local l = scan_hbox()
+ local d = l[field]
+ flush_node_list(l)
+ if what == "value" then
+ return dimension_code, d
+ else
+ context("%p",d)
+ end
+end
+
+implement { name = "widthofstring", public = true, usage = "value", actions = function(w) return action("width", w) end }
+implement { name = "heightofstring", public = true, usage = "value", actions = function(w) return action("height",w) end }
+implement { name = "depthofstring", public = true, usage = "value", actions = function(w) return action("depth", w) end }
+implement { name = "totalofstring", public = true, usage = "value", actions = function(w) return action("total", w) end }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl
new file mode 100644
index 00000000000..1dcd5597254
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl
@@ -0,0 +1,56 @@
+%D \module
+%D [ file=blob-ini,
+%D version=2010.04.06,
+%D title=\CONTEXT\ \LUA\ Typesetting,
+%D subtitle=Initialization,
+%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 Lua Typesetting / Initialization}
+
+%D This is a prelude to typesetting at the \LUA\ end. The code
+%D is already quite old but will only get nice when we are further
+%D down the road (close to version 1.00 of \LUATEX). Typesetting in
+%D pure \LUA\ sometimes makes sense.
+
+\registerctxluafile{node-typ}{} % experimental
+\registerctxluafile{blob-ini}{autosuffix}
+
+\unprotect
+
+% \widthofstring % defined in lua
+% \heightofstring % defined in lua
+% \depthofstring % defined in lua
+% \heightanddepthofstring % defined in lua
+
+\permanent\def\wdofstring#1{\dimexpr\widthofstring {#1}\relax} % assured an dimen
+\permanent\def\htofstring#1{\dimexpr\heightofstring{#1}\relax} % assured an dimen
+\permanent\def\dpofstring#1{\dimexpr\depthofstring {#1}\relax} % assured an dimen
+\permanent\def\hdofstring#1{\dimexpr\totalofstring {#1}\relax} % assured an dimen
+
+\aliased\let\heightanddepthofstring\totalofstring
+\aliased\let\htdpofstring \hdofstring
+
+% \let\hd\htdp % if yes then move this
+
+% This one takes anything that can be typeset
+
+\permanent\protected\def\setwidthof#1\to#2{\edef#2{\widthofstring{#1}}}
+
+\protect \endinput
+
+% \starttext
+%
+% \startluacode
+% local b = blobs.new()
+% blobs.append(b,"Hello world.\n Here we are.\n\n And Again!")
+% blobs.pack(b)
+% blobs.write(b)
+% \stopluacode
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/buff-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/buff-ini.lmt
new file mode 100644
index 00000000000..41e8a50785e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/buff-ini.lmt
@@ -0,0 +1,900 @@
+if not modules then modules = { } end modules ['buff-ini'] = {
+ version = 1.001,
+ comment = "companion to buff-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local concat = table.concat
+local type, next, load = type, next, load
+local sub, format = string.sub, string.format
+local splitlines, validstring, replacenewlines = string.splitlines, string.valid, string.replacenewlines
+local P, Cs, patterns, lpegmatch = lpeg.P, lpeg.Cs, lpeg.patterns, lpeg.match
+local utfchar = utf.char
+local nameonly = file.nameonly
+local totable = string.totable
+local md5hex = md5.hex
+local isfile = lfs.isfile
+local savedata = io.savedata
+
+local trace_run = false trackers.register("buffers.run", function(v) trace_run = v end)
+local trace_grab = false trackers.register("buffers.grab", function(v) trace_grab = v end)
+local trace_visualize = false trackers.register("buffers.visualize", function(v) trace_visualize = v end)
+
+local report_buffers = logs.reporter("buffers","usage")
+local report_typeset = logs.reporter("buffers","typeset")
+----- report_grabbing = logs.reporter("buffers","grabbing")
+
+local context = context
+local commands = commands
+
+local implement = interfaces.implement
+
+local scanners = tokens.scanners
+local scanstring = scanners.string
+local scancsname = scanners.csname
+local scaninteger = scanners.integer
+local scanboolean = scanners.boolean
+local scancode = scanners.code
+local scantokencode = scanners.tokencode
+----- scantoken = scanners.token
+
+local getters = tokens.getters
+local gettoken = getters.token
+
+local getcommand = token.get_command
+----- getcsname = token.get_csname
+local getnextchar = token.scan_next_char or token.get_next_char
+
+local variables = interfaces.variables
+local settings_to_array = utilities.parsers.settings_to_array
+local formatters = string.formatters
+local addsuffix = file.addsuffix
+local replacesuffix = file.replacesuffix
+
+local registertempfile = luatex.registertempfile
+
+local v_yes = variables.yes
+
+local eol = patterns.eol
+local space = patterns.space
+local whitespace = patterns.whitespace
+local blackspace = whitespace - eol
+local whatever = (1-eol)^1 * eol^0
+local emptyline = space^0 * eol
+
+local catcodenumbers = catcodes.numbers
+
+local ctxcatcodes = catcodenumbers.ctxcatcodes
+local txtcatcodes = catcodenumbers.txtcatcodes
+
+local setdata = job.datasets.setdata
+local getdata = job.datasets.getdata
+
+local ctx_viafile = context.viafile
+local ctx_getbuffer = context.getbuffer
+local ctx_pushcatcodetable = context.pushcatcodetable
+local ctx_popcatcodetable = context.popcatcodetable
+local ctx_setcatcodetable = context.setcatcodetable
+local ctx_printlines = context.printlines
+
+buffers = buffers or { }
+local buffers = buffers
+
+local cache = { }
+
+local function erase(name)
+ cache[name] = nil
+end
+
+local function assign(name,str,catcodes)
+ cache[name] = {
+ data = str,
+ catcodes = catcodes,
+ typeset = false,
+ }
+end
+
+local function combine(name,str,prepend)
+ local buffer = cache[name]
+ if buffer then
+ buffer.data = prepend and (str .. buffer.data) or (buffer.data .. str)
+ buffer.typeset = false
+ else
+ cache[name] = {
+ data = str,
+ typeset = false,
+ }
+ end
+end
+
+local function prepend(name,str)
+ combine(name,str,true)
+end
+
+local function append(name,str)
+ combine(name,str)
+end
+
+local function exists(name)
+ return cache[name]
+end
+
+local function getcontent(name)
+ local buffer = name and cache[name]
+ return buffer and buffer.data or ""
+end
+
+local function getlines(name)
+ local buffer = name and cache[name]
+ return buffer and splitlines(buffer.data)
+end
+
+local function getnames(name)
+ if type(name) == "string" then
+ return settings_to_array(name)
+ else
+ return name
+ end
+end
+
+local function istypeset(name)
+ local names = getnames(name)
+ if #names == 0 then
+ return false
+ end
+ for i=1,#names do
+ local c = cache[names[i]]
+ if c and not c.typeset then
+ return false
+ end
+ end
+ return true
+end
+
+local function markastypeset(name)
+ local names = getnames(name)
+ for i=1,#names do
+ local c = cache[names[i]]
+ if c then
+ c.typeset = true
+ end
+ end
+end
+
+local function collectcontent(name,separator) -- no print
+ local names = getnames(name)
+ local nnames = #names
+ if nnames == 0 then
+ return getcontent("") -- default buffer
+ elseif nnames == 1 then
+ return getcontent(names[1])
+ else
+ local t = { }
+ local n = 0
+ for i=1,nnames do
+ local c = getcontent(names[i])
+ if c ~= "" then
+ n = n + 1
+ t[n] = c
+ end
+ end
+ -- the default separator was \r, then \n and is now os.newline because buffers
+ -- can be loaded in other applications
+ return concat(t,separator or os.newline)
+ end
+end
+
+local function loadcontent(name) -- no print
+ local content = collectcontent(name,"\n") -- tex likes \n hm, elsewhere \r
+ local ok, err = load(content)
+ if ok then
+ return ok()
+ else
+ report_buffers("invalid lua code in buffer %a: %s",name,err or "unknown error")
+ end
+end
+
+buffers.raw = getcontent
+buffers.erase = erase
+buffers.assign = assign
+buffers.prepend = prepend
+buffers.append = append
+buffers.exists = exists
+buffers.getcontent = getcontent
+buffers.getlines = getlines
+buffers.collectcontent = collectcontent
+buffers.loadcontent = loadcontent
+
+-- the context interface
+
+implement {
+ name = "assignbuffer",
+ actions = assign,
+ arguments = { "string", "string", "integer" }
+}
+
+implement {
+ name = "erasebuffer",
+ actions = erase,
+ arguments = "string"
+}
+
+-- local anything = patterns.anything
+-- local alwaysmatched = patterns.alwaysmatched
+-- local utf8character = patterns.utf8character
+--
+-- local function countnesting(b,e)
+-- local n
+-- local g = P(b) / function() n = n + 1 end
+-- + P(e) / function() n = n - 1 end
+-- -- + anything
+-- + utf8character
+-- local p = alwaysmatched / function() n = 0 end
+-- * g^0
+-- * alwaysmatched / function() return n end
+-- return p
+-- end
+
+local counters = { }
+local nesting = 0
+local autoundent = true
+local continue = false
+
+-- Beware: the first character of bufferdata has to be discarded as it's there to
+-- prevent gobbling of newlines in the case of nested buffers. The last one is
+-- a newlinechar and is removed too.
+--
+-- An \n is unlikely to show up as \r is the endlinechar but \n is more generic
+-- for us.
+
+-- This fits the way we fetch verbatim: the indentation before the sentinel
+-- determines the stripping.
+
+-- str = [[
+-- test test test test test test test
+-- test test test test test test test
+-- test test test test test test test
+--
+-- test test test test test test test
+-- test test test test test test test
+-- test test test test test test test
+-- ]]
+
+-- local function undent(str)
+-- local margin = match(str,"[\n\r]( +)[\n\r]*$") or ""
+-- local indent = #margin
+-- if indent > 0 then
+-- local lines = splitlines(str)
+-- local ok = true
+-- local pattern = "^" .. margin
+-- for i=1,#lines do
+-- local l = lines[i]
+-- if find(l,pattern) then
+-- lines[i] = sub(l,indent+1)
+-- else
+-- ok = false
+-- break
+-- end
+-- end
+-- if ok then
+-- return concat(lines,"\n")
+-- end
+-- end
+-- return str
+-- end
+
+-- how about tabs
+
+local strippers = { }
+local nofspaces = 0
+
+local normalline = space^0 / function(s) local n = #s if n < nofspaces then nofspaces = n end end
+ * whatever
+
+local getmargin = (emptyline + normalline)^1
+
+local function undent(str) -- new version, needs testing: todo: not always needed, like in xtables
+ nofspaces = #str
+ local margin = lpegmatch(getmargin,str)
+ if nofspaces == #str or nofspaces == 0 then
+ return str
+ end
+ local stripper = strippers[nofspaces]
+ if not stripper then
+ stripper = Cs(((space^-nofspaces)/"" * whatever + emptyline)^1)
+ strippers[nofspaces] = stripper
+ end
+ return lpegmatch(stripper,str) or str
+end
+
+buffers.undent = undent
+
+-- function commands.grabbuffer(name,begintag,endtag,bufferdata,catcodes,doundent) -- maybe move \\ to call
+-- local dn = getcontent(name)
+-- if dn == "" then
+-- nesting = 0
+-- continue = false
+-- end
+-- if trace_grab then
+-- if #bufferdata > 30 then
+-- report_grabbing("%s => |%s..%s|",name,sub(bufferdata,1,10),sub(bufferdata,-10,#bufferdata))
+-- else
+-- report_grabbing("%s => |%s|",name,bufferdata)
+-- end
+-- end
+-- local counter = counters[begintag]
+-- if not counter then
+-- counter = countnesting(begintag,endtag)
+-- counters[begintag] = counter
+-- end
+-- nesting = nesting + lpegmatch(counter,bufferdata)
+-- local more = nesting > 0
+-- if more then
+-- dn = dn .. sub(bufferdata,2,-1) .. endtag
+-- nesting = nesting - 1
+-- continue = true
+-- else
+-- if continue then
+-- dn = dn .. sub(bufferdata,2,-2) -- no \r, \n is more generic
+-- elseif dn == "" then
+-- dn = sub(bufferdata,2,-2)
+-- else
+-- dn = dn .. "\n" .. sub(bufferdata,2,-2) -- no \r, \n is more generic
+-- end
+-- local last = sub(dn,-1)
+-- if last == "\n" or last == "\r" then -- \n is unlikely as \r is the endlinechar
+-- dn = sub(dn,1,-2)
+-- end
+-- if doundent or (autoundent and doundent == nil) then
+-- dn = undent(dn)
+-- end
+-- end
+-- assign(name,dn,catcodes)
+-- commands.doifelse(more)
+-- end
+
+local split = table.setmetatableindex(function(t,k)
+ local v = totable(k)
+ t[k] = v
+ return v
+end)
+
+local tochar = {
+ [ 0] = "\\",
+ [ 1] = "{",
+ [ 2] = "}",
+ [ 3] = "$",
+ [ 4] = "&",
+ [ 5] = "\n",
+ [ 6] = "#",
+ [ 7] = "^",
+ [ 8] = "_",
+ [10] = " ",
+ [14] = "%",
+}
+
+local experiment = false
+local experiment = scantokencode and true
+
+local function pickup(start,stop)
+ local stoplist = split[stop] -- totable(stop)
+ local stoplength = #stoplist
+ local stoplast = stoplist[stoplength]
+ local startlist = split[start] -- totable(start)
+ local startlength = #startlist
+ local startlast = startlist[startlength]
+ local list = { }
+ local size = 0
+ local depth = 0
+-- local done = 32
+ local scancode = experiment and scantokencode or scancode
+ while true do -- or use depth
+ local char = scancode()
+ if char then
+-- if char < done then
+-- -- we skip leading control characters so that we can use them to
+-- -- obey spaces (a dirty trick)
+-- else
+-- done = 0
+ char = utfchar(char)
+ size = size + 1
+ list[size] = char
+ if char == stoplast and size >= stoplength then
+ local done = true
+ local last = size
+ for i=stoplength,1,-1 do
+ if stoplist[i] ~= list[last] then
+ done = false
+ break
+ end
+ last = last - 1
+ end
+ if done then
+ if depth > 0 then
+ depth = depth - 1
+ else
+ break
+ end
+ char = false -- trick: let's skip the next (start) test
+ end
+ end
+ if char == startlast and size >= startlength then
+ local done = true
+ local last = size
+ for i=startlength,1,-1 do
+ if startlist[i] ~= list[last] then
+ done = false
+ break
+ end
+ last = last - 1
+ end
+ if done then
+ depth = depth + 1
+ end
+ end
+-- end
+ else
+ -- local t = scantoken()
+ local t = gettoken()
+ if t then
+ -- we're skipping leading stuff, like obeyedlines and relaxes
+ if experiment and size > 0 then
+ -- we're probably in a macro
+ local char = tochar[getcommand(t)]
+ if char then
+ size = size + 1 ; list[size] = char
+ else
+-- local csname = getcsname(t)
+ local csname = scancsname(t)
+ if csname == stop then
+ stoplength = 0
+ break
+ else
+ size = size + 1 ; list[size] = "\\"
+ size = size + 1 ; list[size] = csname
+ size = size + 1 ; list[size] = " "
+ end
+ end
+ else
+ -- ignore and hope for the best
+ end
+ else
+ break
+ end
+ end
+ end
+ local start = 1
+ local stop = size - stoplength - 1
+ -- not good enough: only empty lines, but even then we miss the leading
+ -- for verbatim
+ --
+ -- the next is not yet adapted to the new scanner ... we don't need lpeg here
+ --
+ for i=start,stop do
+ local li = list[i]
+ if lpegmatch(blackspace,li) then
+ -- keep going
+ elseif lpegmatch(eol,li) then
+ -- okay
+ start = i + 1
+ else
+ break
+ end
+ end
+ for i=stop,start,-1 do
+ if lpegmatch(whitespace,list[i]) then
+ stop = i - 1
+ else
+ break
+ end
+ end
+ --
+ if start <= stop then
+ return concat(list,"",start,stop)
+ else
+ return ""
+ end
+end
+
+-- -- lmtx:
+--
+-- local function pickup(start,stop)
+-- local stoplist = split[stop] -- totable(stop)
+-- local stoplength = #stoplist
+-- local stoplast = stoplist[stoplength]
+-- local startlist = split[start] -- totable(start)
+-- local startlength = #startlist
+-- local startlast = startlist[startlength]
+-- local list = { }
+-- local size = 0
+-- local depth = 0
+-- getnextchar() -- we start with a \relax
+-- while true do -- or use depth
+-- local char = getnextchar()
+-- if char then
+-- size = size + 1
+-- list[size] = char
+-- if char == stoplast and size >= stoplength then
+-- local done = true
+-- local last = size
+-- for i=stoplength,1,-1 do
+-- if stoplist[i] ~= list[last] then
+-- done = false
+-- break
+-- end
+-- last = last - 1
+-- end
+-- if done then
+-- if depth > 0 then
+-- depth = depth - 1
+-- else
+-- break
+-- end
+-- char = false -- trick: let's skip the next (start) test
+-- end
+-- end
+-- if char == startlast and size >= startlength then
+-- local done = true
+-- local last = size
+-- for i=startlength,1,-1 do
+-- if startlist[i] ~= list[last] then
+-- done = false
+-- break
+-- end
+-- last = last - 1
+-- end
+-- if done then
+-- depth = depth + 1
+-- end
+-- end
+-- else
+-- local t = gettoken()
+-- if t then
+-- -- we're skipping leading stuff, like obeyedlines and relaxes
+-- if experiment and size > 0 then
+-- -- we're probably in a macro
+-- local char = tochar[getcommand(t)]
+-- if char then
+-- size = size + 1 ; list[size] = char
+-- else
+-- local csname = getcsname(t)
+ local csname = scancsname(t)
+-- if csname == stop then
+-- stoplength = 0
+-- break
+-- else
+-- size = size + 1 ; list[size] = "\\"
+-- size = size + 1 ; list[size] = csname
+-- size = size + 1 ; list[size] = " "
+-- end
+-- end
+-- else
+-- -- ignore and hope for the best
+-- end
+-- else
+-- break
+-- end
+-- end
+-- end
+-- local start = 1
+-- local stop = size - stoplength - 1
+-- -- not good enough: only empty lines, but even then we miss the leading
+-- -- for verbatim
+-- --
+-- -- the next is not yet adapted to the new scanner ... we don't need lpeg here
+-- --
+-- for i=start,stop do
+-- local li = list[i]
+-- if lpegmatch(blackspace,li) then
+-- -- keep going
+-- elseif lpegmatch(eol,li) then
+-- -- okay
+-- start = i + 1
+-- else
+-- break
+-- end
+-- end
+-- for i=stop,start,-1 do
+-- if lpegmatch(whitespace,list[i]) then
+-- stop = i - 1
+-- else
+-- break
+-- end
+-- end
+-- --
+-- if start <= stop then
+-- return concat(list,"",start,stop)
+-- else
+-- return ""
+-- end
+-- end
+
+-- function buffers.pickup(name,start,stop,finish,catcodes,doundent)
+-- local data = tokens.pickup(start,stop)
+-- if doundent or (autoundent and doundent == nil) then
+-- data = buffers.undent(data)
+-- end
+-- buffers.assign(name,data,catcodes)
+-- context(finish)
+-- end
+
+-- commands.pickupbuffer = buffers.pickup
+
+tokens.pickup = pickup
+
+implement {
+ name = "pickupbuffer",
+ actions = function()
+ -- let's pickup all here (no arguments)
+ local name = scanstring()
+ local start = scanstring()
+ local stop = scanstring()
+ local finish = scancsname()
+ local catcodes = scaninteger()
+ local doundent = scanboolean()
+ -- could be a scanner:
+ local data = pickup(start,stop)
+ if doundent or (autoundent and doundent == nil) then
+ data = undent(data)
+ end
+ buffers.assign(name,data,catcodes)
+ context[finish]()
+ end
+}
+
+local function savebuffer(list,name,prefix) -- name is optional
+ if not list or list == "" then
+ list = name
+ end
+ if not name or name == "" then
+ name = list
+ end
+ local content = collectcontent(list,nil) or ""
+ if content == "" then
+ content = "empty buffer"
+ end
+ if prefix == v_yes then
+ name = addsuffix(tex.jobname .. "-" .. name,"tmp")
+ end
+ io.savedata(name,replacenewlines(content))
+end
+
+implement {
+ name = "savebuffer",
+ actions = savebuffer,
+ arguments = "3 strings",
+}
+
+-- we can consider adding a size to avoid unlikely clashes
+
+local olddata = nil
+local newdata = nil
+local getrunner = sandbox.getrunner
+
+local runner = sandbox.registerrunner {
+ name = "run buffer",
+ program = "context",
+ method = "execute",
+ template = jit and "--purgeall --jit %filename%" or "--purgeall %filename%",
+ reporter = report_typeset,
+ checkers = {
+ filename = "readable",
+ }
+}
+
+local function runbuffer(name,encapsulate,runnername,suffixes)
+ if not runnername or runnername == "" then
+ runnername = "run buffer"
+ end
+ local suffix = "pdf"
+ if type(suffixes) == "table" then
+ suffix = suffixes[1]
+ elseif type(suffixes) == "string" and suffixes ~= "" then
+ suffix = suffixes
+ suffixes = { suffix }
+ else
+ suffixes = { suffix }
+ end
+ local runner = getrunner(runnername)
+ if not runner then
+ report_typeset("unknown runner %a",runnername)
+ return
+ end
+ if not olddata then
+ olddata = getdata("buffers","runners") or { }
+ local suffixes = olddata.suffixes
+ local hashes = olddata.hashes
+ if hashes and suffixes then
+ for k, hash in next, hashes do
+ for h, v in next, hash do
+ for s, v in next, suffixes do
+ local tmp = addsuffix(h,s)
+ -- report_typeset("mark for deletion: %s",tmp)
+ registertempfile(tmp)
+ end
+ end
+ end
+ end
+ end
+ if not newdata then
+ newdata = {
+ version = environment.version,
+ suffixes = { },
+ hashes = { },
+ }
+ setdata {
+ name = "buffers",
+ tag = "runners",
+ data = newdata,
+ }
+ end
+ local oldhashes = olddata.hashes or { }
+ local newhashes = newdata.hashes or { }
+ local old = oldhashes[suffix]
+ local new = newhashes[suffix]
+ if not old then
+ old = { }
+ oldhashes[suffix] = old
+ for hash, n in next, old do
+ local tag = formatters["%s-t-b-%s"](tex.jobname,hash)
+ local tmp = addsuffix(tag,"tmp")
+ -- report_typeset("mark for deletion: %s",tmp)
+ registertempfile(tmp) -- to be sure
+ end
+ end
+ if not new then
+ new = { }
+ newhashes[suffix] = new
+ end
+ local names = getnames(name)
+ local content = collectcontent(names,nil) or ""
+ if content == "" then
+ content = "empty buffer"
+ end
+ if encapsulate then
+ content = formatters["\\starttext\n%s\n\\stoptext\n"](content)
+ end
+ --
+ local hash = md5hex(content)
+ local tag = formatters["%s-t-b-%s"](nameonly(tex.jobname),hash) -- make sure we run on the local path
+ --
+ local filename = addsuffix(tag,"tmp")
+ local resultname = addsuffix(tag,suffix)
+ --
+ if new[tag] then
+ -- done
+ elseif not old[tag] or olddata.version ~= newdata.version or not isfile(resultname) then
+ if trace_run then
+ report_typeset("changes in %a, processing forced",name)
+ end
+ savedata(filename,content)
+ report_typeset("processing saved buffer %a\n",filename)
+ runner { filename = filename }
+ end
+ new[tag] = (new[tag] or 0) + 1
+ report_typeset("no changes in %a, processing skipped",name)
+ registertempfile(filename)
+ -- report_typeset("mark for persistence: %s",filename)
+ for i=1,#suffixes do
+ local suffix = suffixes[i]
+ newdata.suffixes[suffix] = true
+ local tmp = addsuffix(tag,suffix)
+ -- report_typeset("mark for persistance: %s",tmp)
+ registertempfile(tmp,nil,true)
+ end
+ --
+ return resultname -- first result
+end
+
+local f_getbuffer = formatters["buffer.%s"]
+
+local function getbuffer(name)
+ local str = getcontent(name)
+ if str ~= "" then
+ -- characters.showstring(str)
+ ctx_viafile(str,f_getbuffer(validstring(name,"noname")))
+ end
+end
+
+local function getbuffermkvi(name) -- rather direct !
+ ctx_viafile(resolvers.macros.preprocessed(getcontent(name)),formatters["buffer.%s.mkiv"](validstring(name,"noname")))
+end
+
+local function gettexbuffer(name)
+ local buffer = name and cache[name]
+ if buffer and buffer.data ~= "" then
+ ctx_pushcatcodetable()
+ if buffer.catcodes == txtcatcodes then
+ ctx_setcatcodetable(txtcatcodes)
+ else
+ ctx_setcatcodetable(ctxcatcodes)
+ end
+ -- context(function() ctx_viafile(buffer.data) end)
+ ctx_getbuffer { name } -- viafile flushes too soon
+ ctx_popcatcodetable()
+ end
+end
+
+buffers.get = getbuffer
+buffers.getmkiv = getbuffermkiv
+buffers.gettexbuffer = gettexbuffer
+buffers.run = runbuffer
+
+implement { name = "getbufferctxlua", actions = loadcontent, arguments = "string" }
+implement { name = "getbuffer", actions = getbuffer, arguments = "string" }
+implement { name = "getbuffermkvi", actions = getbuffermkvi, arguments = "string" }
+implement { name = "gettexbuffer", actions = gettexbuffer, arguments = "string" }
+
+interfaces.implement {
+ name = "getbuffercontent",
+ arguments = "string",
+ actions = { getcontent, context },
+}
+
+implement {
+ name = "typesetbuffer",
+ actions = { runbuffer, context },
+ arguments = { "string", true }
+}
+
+implement {
+ name = "runbuffer",
+ actions = { runbuffer, context },
+ arguments = { "string", false, "string" }
+}
+
+implement {
+ name = "doifelsebuffer",
+ actions = { exists, commands.doifelse },
+ arguments = "string"
+}
+
+-- This only used for mp buffers and is a kludge. Don't change the
+-- texprint into texsprint as it fails because "p<nl>enddef" becomes
+-- "penddef" then.
+
+implement {
+ name = "feedback", -- bad name, maybe rename to injectbuffercontent
+ actions = { collectcontent, ctx_printlines },
+ arguments = "string"
+}
+
+do
+
+ local context = context
+ local ctxcore = context.core
+
+ local ctx_startbuffer = ctxcore.startbuffer
+ local ctx_stopbuffer = ctxcore.stopbuffer
+
+ local ctx_startcollecting = context.startcollecting
+ local ctx_stopcollecting = context.stopcollecting
+
+ function ctxcore.startbuffer(...)
+ ctx_startcollecting()
+ ctx_startbuffer(...)
+ end
+
+ function ctxcore.stopbuffer()
+ ctx_stopbuffer()
+ ctx_stopcollecting()
+ end
+
+end
+
+-- moved here:
+
+function buffers.samplefile(name)
+ if not buffers.exists(name) then
+ buffers.assign(name,io.loaddata(resolvers.findfile(name)))
+ end
+ buffers.get(name)
+end
+
+implement {
+ name = "samplefile", -- bad name, maybe rename to injectbuffercontent
+ actions = buffers.samplefile,
+ arguments = "string"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/buff-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/buff-ini.mkxl
new file mode 100644
index 00000000000..ed62743ad89
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/buff-ini.mkxl
@@ -0,0 +1,233 @@
+%D \module
+%D [ file=buff-ini,
+%D version=2011.11.22, % previous big effort 2000.01.05,
+%D title=\CONTEXT\ Buffer Macros,
+%D subtitle=Buffers,
+%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 Buffer Macros / Buffers}
+
+\registerctxluafile{buff-ini}{autosuffix}
+
+\unprotect
+
+%D There have been several iterations in \MKIV\ but here we only show the currently
+%D used one. One can always look back (and maybe learn some). It will never look
+%D pretty and never be efficient but it has served us for ages (conceptually it's
+%D as in \MKII).
+
+\mutable\let\currentbuffer\empty
+
+\permanent\def\doifelsebuffer#1{\clf_doifelsebuffer{#1}} % expandable, todo: use public implementor
+
+\aliased\let\doifbufferelse\doifelsebuffer
+
+\permanent\tolerant\protected\def\resetbuffer[#1]{\clf_erasebuffer{#1}} % todo: use public implementor
+
+\permanent\setuvalue{\e!start\v!buffer}%
+ {\begingroup % (3)
+ \obeylines
+ \buff_start}
+
+\tolerant\def\buff_start[#1]#*[#2]%
+ {\buff_start_indeed{}{#1}{\e!start\v!buffer}{\e!stop\v!buffer}}
+
+\def\buff_start_indeed#1#2#3#4%
+ {\edef\p_strip{\namedbufferparameter{#1}\c!strip}% for aditya
+ \normalexpanded{\buff_pickup
+ {#2}%
+ {#3}%
+ {#4}%
+ {}%
+ {\buff_stop{#4}}%
+ \ifx\p_strip\v!no\zerocount\else\plusone\fi}}
+
+\permanent\protected\def\grabbufferdatadirect % name start stop
+ {\begingroup % (6)
+ \buff_start_indeed\empty}
+
+\permanent\protected\def\grabbufferdata % was: \dostartbuffer
+ {\begingroup % (4)
+ \obeylines
+ \buff_grab_direct}
+
+\tolerant\def\buff_grab_direct[#1]#*[#2]#*[#3]#*[#4]% [category] [name] [start] [stop]
+ {\ifnum\lastarguments=\plusfour
+ \expandafter\buff_start_indeed
+ \else
+ \expandafter\buff_start_indeed_default
+ \fi{#1}{#2}{#3}{#4}}
+
+\def\buff_start_indeed_default#1#2#3#4{\buff_start_indeed\empty{#1}{#2}{#3}}
+
+\let\buff_finish\relax
+%let\buff_gobble\relax
+
+\protected\def\buff_pickup#1#2#3#4#5#6% name, startsequence, stopsequence, before, after, undent
+ {\begingroup % (1)
+ #4%
+ \begingroup % (2)
+ \scratchcounter\catcodetable
+ \clf_erasebuffer{#1}%
+ \setcatcodetable\vrbcatcodes
+ \protected\def\buff_finish
+ {\endgroup % (1)
+ \endgroup % (2)
+ #5}%
+ % todo: we need to skip the first lineending which is an active character
+ % but sometimes we have something different ... this is a side effect of
+ % checking for optional arguments i.e. the next token is already tokenized
+ % and for that reason we have the \relax as well as the \string
+ \clf_pickupbuffer
+ {#1}%
+ {#2}%
+ {#3}%
+% {\string\dofinishpickupbuffer}%
+ \buff_finish
+ \scratchcounter
+ \ifnum#6=\plusone\s!true\else\s!false\fi
+ % \relax}
+ \expandafter\relax\string} % maybe \normalexpanded{\relax\utfchar{7}}} signal
+
+\protected\def\buff_stop#1%
+ {\endgroup % (3 & 4 & 5 & 6)
+ \begincsname#1\endcsname}
+
+\aliased\let\endbuffer\relax
+
+\permanent\tolerant\protected\def\setbuffer[#1]#:#2\endbuffer % seldom used so we just pass #2
+ {\clf_assignbuffer{#1}{\detokenize{#2}}\catcodetable\relax}
+
+% beware, never adapt the global buffer settings, actually we might introduce
+% a broken parent chain for this purpose but on the other hand it's not that
+% different from framed cum suis
+
+\installcorenamespace{buffer}
+
+\installcommandhandler \??buffer {buffer} \??buffer
+
+\setupbuffer
+ [\c!before=,
+ \c!after=]
+
+\newcount\c_buff_n_of_defined
+
+\mutable\let\currentdefinedbuffer\s!dummy
+
+\appendtoks
+ \global\advance\c_buff_n_of_defined\plusone
+ \setexpandedbufferparameter\c!number{\number\c_buff_n_of_defined}%
+ \edef\currentdefinedbuffer{def-\number\c_buff_n_of_defined}%
+ \frozen\instance\setuevalue{\e!start\currentbuffer}{\buff_start_defined{\currentbuffer}{\currentdefinedbuffer}{\e!start\currentbuffer}{\e!stop\currentbuffer}}%
+ \frozen\instance\setuevalue{\e!get \currentbuffer}{\buff_get_stored {\currentbuffer}{\currentdefinedbuffer}}%
+\to \everydefinebuffer
+
+\protected\def\buff_start_defined
+ {\begingroup % (5)
+ \buff_start_indeed}
+
+\permanent\def\thebuffernumber #1{\namedbufferparameter{#1}\c!number}
+\permanent\def\thedefinedbuffer#1{def-\namedbufferparameter{#1}\c!number}
+
+\permanent\tolerant\protected\def\getbuffer[#1]% [name]
+ {\namedbufferparameter\empty\c!before\relax
+ \doifelsenothing{#1}
+ {\buff_get_stored_indeed\empty}
+ {\processcommalist[#1]\buff_get_stored_indeed}%
+ \namedbufferparameter\empty\c!after\relax}
+
+\protected\def\buff_get_stored#1#2%
+ {\namedbufferparameter{#1}\c!before\relax
+ \buff_get_stored_indeed{#2}%
+ \namedbufferparameter{#1}\c!after\relax}
+
+\protected\def\buff_get_stored_indeed#1%
+ {\clf_getbuffer{#1}}
+
+\permanent\protected\def\getdefinedbuffer[#1]%
+ {\buff_get_stored{#1}{\thedefinedbuffer{#1}}}%
+
+\permanent\tolerant\protected\def\inlinebuffer[#1]% [name]
+ {\doifelsenothing{#1}
+ {\buff_get_stored_inline_indeed\empty}
+ {\processcommalist[#1]\buff_get_stored_inline_indeed}}
+
+\protected\def\buff_get_stored_inline_indeed#1%
+ {\ignorespaces\clf_getbuffer{#1}\removeunwantedspaces}
+
+\permanent\def\rawbuffer#1% expandable
+ {\clf_getbuffer{#1}}
+
+\definebuffer
+ [\v!hiding]
+
+\setupbuffer
+ [\v!hiding]
+ [\c!before=,
+ \c!after=]
+
+\permanent\protected\protected\def\processTEXbuffer[#1]% keep case, maybe also lower
+ {\pushcatcodetable
+ \catcodetable\ctxcatcodes % \setcatcodetable
+ \buff_get_stored_indeed{#1}%
+ \popcatcodetable}
+
+% only mkiv:
+%
+% \startbuffer[x]
+% x
+% \stopbuffer
+%
+% \savebuffer[x] [temp] % gets name: jobname-temp.tmp
+% \savebufferinfile[x][temp.log] % gets name: temp.log
+
+\installcorenamespace{savebuffer}
+
+\installsetuponlycommandhandler \??savebuffer {savebuffer}
+
+\setupsavebuffer
+ [\c!list=,
+ \c!file=,
+ \c!prefix=\v!yes]
+
+\permanent\tolerant\protected\def\savebuffer[#1]#*[#2]%
+ {\begingroup
+ \ifhastok={#1}%
+ \setupcurrentsavebuffer[#1]%
+ \else
+ \setupcurrentsavebuffer[\c!list={#1},\c!file=#2]%
+ \fi
+ \clf_savebuffer{\directsavebufferparameter\c!list}{\directsavebufferparameter\c!file}{\directsavebufferparameter\c!prefix}%
+ \endgroup}
+
+%D Experimental: no expansion of commands in buffer!
+
+% \startbuffer[what]
+% context("WHAT")
+% \stopbuffer
+% \startbuffer
+% context("JOBNAME")
+% \stopbuffer
+%
+% \ctxluabuffer[what] \ctxluabuffer
+
+\permanent\tolerant\protected\def\ctxluabuffer[#1]{\clf_getbufferctxlua{#1}} % todo: use public implementor
+\permanent\tolerant\protected\def\mkvibuffer [#1]{\clf_getbuffermkvi {#1}} % todo: use public implementor
+
+% maybe still used elsewhere
+
+% \aliased\doprocesstexbuffer\mkvibuffer
+
+\aliased\let\dostartbuffer\grabbufferdata % for old times sake, this will go away
+
+% new (expandable):
+
+\permanent\def\getbufferdata[#1]{\buff_get_stored_indeed{#1}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/buff-par.mklx b/Master/texmf-dist/tex/context/base/mkxl/buff-par.mklx
new file mode 100644
index 00000000000..b6ffa3f534e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/buff-par.mklx
@@ -0,0 +1,186 @@
+%D \module
+%D [ file=buff-par,
+%D version=2010.12.05,
+%D title=\CONTEXT\ Buffer Macros,
+%D subtitle=Parallel,
+%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 Buffer Macros / Parallel}
+
+\registerctxluafile{buff-par}{}
+
+%D This module is made for Thomas Schmitz as part of a project. There is
+%D no documentation yet. Also, this code is unfinished and not tested well.
+%D
+%D \starttyping
+%D \defineparallel[main][one,two]
+%D
+%D \startmain
+%D \startone
+%D first 0
+%D [reference] first 1
+%D first 2
+%D first 3
+%D \stopone
+%D \starttwo
+%D second 1
+%D second 2
+%D \stoptwo
+%D \stopmain
+%D
+%D \startmain
+%D \startone
+%D first 4
+%D first 4
+%D \stopone
+%D \starttwo
+%D second 3
+%D second 4
+%D \stoptwo
+%D \stopmain
+%D
+%D \placeparallel[main][one][criterium=all]
+%D
+%D \placeparallel[main][two][criterium=all]
+%D \stoptyping
+
+%D criterium=all start=<number> n=<number>
+
+\unprotect
+
+\installcorenamespace{parallel}
+\installcorenamespace{parallelhandler}
+
+\installcommandhandler \??parallel {parallel} \??parallel
+
+\setupparallel
+ [\c!setups=parallel:place:default]
+
+\pushoverloadmode
+
+\let\buff_parallel_define_saved \defineparallel
+\let\buff_process_parallel_instance\relax
+
+\permanent\tolerant\protected\overloaded\def\defineparallel[#name]#spacer[#instances]%
+ {\buff_parallel_define_saved[#name][\c!list={#instances}]% list is internal
+ \clf_defineparallel{#name}{#instances}%
+ \expandafter\newtoks\csname\??parallelhandler#name\endcsname
+ \processcommacommand[#instances]{\buff_parallel_define_instance{#name}}%
+ \frozen\instance\setuevalue{\e!start#name}{\buff_parallel_start{#name}}%
+ \frozen\instance\setuevalue{\e!stop #name}{\buff_parallel_stop}}
+
+\popoverloadmode
+
+\def\buff_process_parallel_instances
+ {\the\csname\??parallelhandler\currentparallel\endcsname}
+
+\def\buff_parallel_define_instance#name#instance%
+ {\normalexpanded{\buff_parallel_define_saved[#instance][#name]}%
+ \definebuffer[#instance]%
+ \toksapp
+ \csname\??parallelhandler#name\endcsname
+ {\edef\currentparallelinstance{#instance}\buff_process_parallel_instance\relax}%
+ \setuevalue{\e!stop#instance}{\buff_parallel_save{#instance}}}
+
+\pushoverloadmode
+
+\let\buff_parallel_setup_saved \setupparallel
+
+\permanent\tolerant\protected\def\setupparallel[#name]#spacer[#instances]#spacer[#setups]%
+ {\processcommalist[#instances]{\buff_parallel_setup_instance{#name}{#setups}}}
+
+\popoverloadmode
+
+\def\buff_parallel_setup_instance#name#setups#instance%
+ {\buff_parallel_setup_saved[#name:#instance][#setups]}
+
+\protected\def\buff_parallel_start#name%
+ {\pushmacro\currentparallel
+ \edef\currentparallel{#name}%
+ \clf_nextparallel{\currentparallel}}
+
+\protected\def\buff_parallel_stop
+ {\popmacro\currentparallel}
+
+\protected\def\buff_parallel_save#instance% defined moet ook aan de lua kant kunnen
+ {\clf_saveparallel
+ {\currentparallel}%
+ {#instance}%
+ {\thedefinedbuffer{#instance}}%
+ \relax}
+
+\permanent\tolerant\protected\def\placeparallel[#name]#spacer[#instance]#spacer[#settings]%
+ {\begingroup
+ \edef\currentparallel{#name}%
+ \setupcurrentparallel[#settings]%
+ \clf_placeparallel
+ {\currentparallel}%
+ {#instance}%
+ {%
+ % setups {\parallelparameter\c!setups}%
+ start {\parallelparameter\c!start}%
+ n {\parallelparameter\c!n}%
+ criterium {\parallelparameter\c!criterium}%
+ }%
+ \relax
+ \endgroup}
+
+\mutable\let\currentparallelinstance\empty
+\mutable\let\currentparallelnumber \empty
+\mutable\let\currentparallelline \empty
+\mutable\let\currentparallellabel \empty
+\mutable\let\currentparallelcontent \empty
+
+\permanent\protected\def\doflushparallel#instance#status#line#label#content% called at lua end
+ {\begingroup
+ \def\currentparallelinstance{#instance}%
+ \def\currentparallelnumber {#status}%
+ \def\currentparallelline {#line}%
+ \def\currentparallellabel {#label}%
+ \def\currentparallelcontent {#content}% can be kep at the lua end .. no need to use a virtual file
+ \ifcase#status\relax
+ \expandafter\buff_parallel_flush_nop
+ \or
+ \expandafter\buff_parallel_flush_yes
+ \fi
+ \endgroup}
+
+\def\buff_parallel_flush_nop
+ {}
+
+\def\buff_parallel_flush_yes
+ %{\directsetup{\namedparallelparameter{\currentparallel:\currentparallelinstance}\c!setups}}
+ {\directsetup{\namedparallelparameter{\currentparallelinstance}\c!setups}}
+
+\permanent\protected\def\doifelseparallel#name#instance%
+ {\clf_doifelseparallel{#name}{#instance}}
+
+\aliased\let\doifparallelelse\doifelseparallel
+
+\permanent\tolerant\protected\def\resetparallel[#name]#spacer[#instance]%
+ {\clf_resetparallel{#name}{#instance}}
+
+\startsetups parallel:place:default
+ \hangafter\plusone
+ \hangindent4\emwidth
+ \dontleavehmode
+ \hbox to 3\emwidth \bgroup
+ \hss
+ \bf
+ \doifsomething \currentparallellabel {
+ \textreference[\currentparallellabel]{\currentparallelline}
+ }
+ \currentparallelline
+ \quad
+ \egroup
+ \currentparallelcontent
+ \par
+\stopsetups
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkxl b/Master/texmf-dist/tex/context/base/mkxl/buff-ver.mkxl
index dec4dfb4a02..68a07df60be 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/buff-ver.mkxl
@@ -24,7 +24,7 @@
\definesystemattribute[verbatimline][public]
\appendtoksonce
- \attribute\verbatimlineattribute\attributeunsetvalue
+ \c_attr_verbatimline\attributeunsetvalue
\to \everyforgetall
%D Initializations.
@@ -39,46 +39,47 @@
\the\everyresettypesetting
\resetfontfeature
\resetcharacterspacing
+ \resetbreakpoints
\to \everyinitializeverbatim
-\unexpanded\def\setverbatimspaceskip % to be checked: must happen after font switch
+\permanent\protected\def\setverbatimspaceskip % to be checked: must happen after font switch
{\spaceskip\fontcharwd\font`x\relax
\xspaceskip\spaceskip}
-\setvalue{\??typinglines\v!no }{\buff_verbatim_ignore_hyphens}
-\setvalue{\??typinglines\v!normal }{\buff_verbatim_ignore_hyphens}
-\setvalue{\??typinglines\v!yes }{\buff_verbatim_obey_breakpoints}
-\setvalue{\??typinglines\v!hyphenated}{\buff_verbatim_obey_hyphens}
-
-\setvalue{\??typingspace\v!on }{\let\obeyedspace\specialcontrolspace}
-\setvalue{\??typingspace\v!stretch }{\let\obeyedspace\specialstretchedspace}
-\setvalue{\??typingspace\v!normal }{}
-\setvalue{\??typingspace\v!fixed }{\let\obeyedspace\specialfixedspace}
-
-\setvalue{\??typingblank\v!standard }{\s_spac_whitespace_parskip}
-\setvalue{\??typingblank\v!small }{\smallskipamount}
-\setvalue{\??typingblank\v!medium }{\medskipamount}
-\setvalue{\??typingblank\v!big }{\bigskipamount}
-\setvalue{\??typingblank\v!halfline }{.5\baselineskip}
-\setvalue{\??typingblank\v!line }{\baselineskip}
-\setvalue{\??typingblank\v!none }{\zeropoint}
-
-\unexpanded\def\buff_verbatim_obey_hyphens
+\defcsname\??typinglines\v!no \endcsname{\buff_verbatim_ignore_hyphens}
+\defcsname\??typinglines\v!normal \endcsname{\buff_verbatim_ignore_hyphens}
+\defcsname\??typinglines\v!yes \endcsname{\buff_verbatim_obey_breakpoints}
+\defcsname\??typinglines\v!hyphenated\endcsname{\buff_verbatim_obey_hyphens}
+
+\defcsname\??typingspace\v!on \endcsname{\enforced\let\obeyedspace\specialcontrolspace}
+\defcsname\??typingspace\v!stretch \endcsname{\enforced\let\obeyedspace\specialstretchedspace}
+\defcsname\??typingspace\v!normal \endcsname{}
+\defcsname\??typingspace\v!fixed \endcsname{\enforced\let\obeyedspace\specialfixedspace}
+
+\defcsname\??typingblank\v!standard \endcsname{\s_spac_whitespace_parskip}
+\defcsname\??typingblank\v!small \endcsname{\smallskipamount}
+\defcsname\??typingblank\v!medium \endcsname{\medskipamount}
+\defcsname\??typingblank\v!big \endcsname{\bigskipamount}
+\defcsname\??typingblank\v!halfline \endcsname{.5\baselineskip}
+\defcsname\??typingblank\v!line \endcsname{\baselineskip}
+\defcsname\??typingblank\v!none \endcsname{\zeropoint}
+
+\protected\def\buff_verbatim_obey_hyphens
{}
-\unexpanded\def\buff_verbatim_obey_breakpoints
- {\language\minusone % tricky as this affects the pagebuilder
+\protected\def\buff_verbatim_obey_breakpoints
+ {\nohyphens
\veryraggedright}
-\unexpanded\def\buff_verbatim_ignore_hyphens
- {\language\minusone} % tricky as this affects the pagebuilder
+\protected\def\buff_verbatim_ignore_hyphens
+ {\nohyphens}
\def\buff_verbatim_initialize_type_one
- {\let\obeylines\ignorelines
+ {\enforced\let\obeylines\ignorelines
\edef\p_buff_option{\typeparameter\c!option}%
\ifx\p_buff_option\v!none
\usetypestyleandcolor\c!style\c!color
- \orelse\ifx\p_buff_option\empty
+ \orelse\ifempty\p_buff_option
\usetypestyleandcolor\c!style\c!color
\else
\usetypestyleparameter\c!style % no color
@@ -87,15 +88,15 @@
\def\buff_verbatim_initialize_type_two
{\spaceskip.5\emwidth\relax
- \let\obeyedspace\specialobeyedspace
- \let\controlspace\specialcontrolspace
+ \enforced\let\obeyedspace\specialobeyedspace
+ \enforced\let\controlspace\specialcontrolspace
\edef\p_buff_lines{\typeparameter\c!lines}%
\begincsname\??typinglines\p_buff_lines\endcsname
\edef\p_buff_space{\typeparameter\c!space}%
\begincsname\??typingspace\p_buff_space\endcsname
\relax\the\everyinitializeverbatim\relax}
-\unexpanded\def\doinitializeverbatim % for use elsewhere .. temp hack (see lxml-ini)
+\permanent\protected\def\doinitializeverbatim % for use elsewhere .. temp hack (see lxml-ini)
{\buff_verbatim_initialize_type_one
\buff_verbatim_initialize_type_two}
@@ -114,13 +115,13 @@
\ifzeropt\scratchskip \else
\let\buff_verbatim_set_line_margin\buff_verbatim_set_line_margin_indeed
\fi
- \ifx\buff_verbatim_set_line_margin\relax
+ \ifrelax\buff_verbatim_set_line_margin
\doadaptleftskip{\typingparameter\c!margin}%
\fi
\edef\p_buff_option{\typingparameter\c!option}%
\ifx\p_buff_option\v!none
\usetypingstyleandcolor\c!style\c!color
- \orelse\ifx\p_buff_option\empty
+ \orelse\ifempty\p_buff_option
\usetypingstyleandcolor\c!style\c!color
\else
\usetypingstyleparameter\c!style % no color !
@@ -129,8 +130,8 @@
\def\buff_verbatim_initialize_typing_two
{\spaceskip.5\emwidth\relax
- \let\obeyedspace\specialobeyedspace
- \let\controlspace\specialcontrolspace
+ \enforced\let\obeyedspace\specialobeyedspace
+ \enforced\let\controlspace\specialcontrolspace
\edef\p_buff_lines{\typingparameter\c!lines}%
\begincsname\??typinglines\p_buff_lines\endcsname
\edef\p_buff_space{\typingparameter\c!space}%
@@ -147,7 +148,7 @@
\installcommandhandler \??type {type} \??type
\appendtoks
- \setuevalue{\currenttype}{\buff_verbatim_type{\currenttype}}%
+ \frozen\instance\setuevalue{\currenttype}{\buff_verbatim_type{\currenttype}}%
\to \everydefinetype
\appendtoks
@@ -175,9 +176,9 @@
\installcommandhandler \??typing {typing} \??typing
\appendtoks
- \setuevalue{\e!start\currenttyping}{\buff_verbatim_typing_start{\currenttyping}}%
- \setuevalue{\e!stop \currenttyping}{\buff_verbatim_typing_stop {\currenttyping}}%
- \ifx\currenttypingparent\empty
+ \frozen\instance\setuevalue{\e!start\currenttyping}{\buff_verbatim_typing_start{\currenttyping}}%
+ \frozen\instance\setuevalue{\e!stop \currenttyping}{\buff_verbatim_typing_stop {\currenttyping}}%
+ \ifempty\currenttypingparent
\normalexpanded{\definelinenumbering[\currenttyping]}%
\else
\normalexpanded{\definelinenumbering[\currenttyping][\currenttypingparent]}%
@@ -191,10 +192,10 @@
\def\buff_verbatim_initialize_visualizer#1%
{\ifproductionrun\clf_loadvisualizer{#1}\fi}
-\unexpanded\def\doifelsevisualizer#1%
+\permanent\protected\def\doifelsevisualizer#1%
{\clf_doifelsevisualizer{#1}}
-\let\doifvisualizerelse\doifelsevisualizer
+\aliased\let\doifvisualizerelse\doifelsevisualizer
%D Verbatim command are very sensitive to argument processing, which is a direct
%D result of the \CATCODES\ being fixed at reading time.
@@ -263,29 +264,26 @@
{\egroup
\typeparameter\c!right}
-\unexpanded\def\type{\buff_verbatim_type\empty}
-\unexpanded\def\typ {\buff_verbatim_typ \empty}
+\permanent\protected\def\type{\buff_verbatim_type\empty}
+\permanent\protected\def\typ {\buff_verbatim_typ \empty}
-\unexpanded\def\buff_verbatim_type#1%
+\protected\def\buff_verbatim_type#1%
{\dontleavehmode
\bgroup
\edef\currenttype{#1}%
- \doifelsenextoptionalcs\buff_verbatim_type_yes\buff_verbatim_type_nop}
-
-\def\buff_verbatim_type_yes[#1]%
- {\setupcurrenttype[#1]%
- \buff_verbatim_type_nop}
+ \buff_verbatim_type_indeed}
\def\buff_verbatim_typ#1%
{\dontleavehmode
\bgroup
\edef\currenttype{#1}%
\lettypeparameter\c!lines\v!hyphenated
- \let\specialobeyedspace\specialstretchedspace
- \doifelsenextoptionalcs\buff_verbatim_type_yes\buff_verbatim_type_nop}
+ \enforced\let\specialobeyedspace\specialstretchedspace
+ \buff_verbatim_type_indeed}
-\def\buff_verbatim_type_nop
- {\buff_verbatim_left_of_type
+\tolerant\def\buff_verbatim_type_indeed[#1]%
+ {\ifarguments\or\setupcurrenttype[#1]\fi
+ \buff_verbatim_left_of_type
\futureexpand\bgroup\buff_verbatim_type_a\buff_verbatim_type_one}
\def\buff_verbatim_type_one
@@ -368,33 +366,33 @@
%D right, but a decent hyphenation support of \type{\tt} text will be implemented
%D soon.
-\unexpanded\def\specialfixedspace {\kern\interwordspace\relax}
-\unexpanded\def\specialobeyedspace {\hskip\interwordspace\relax} % better than spaceskip
-\unexpanded\def\specialstretchedspace {\hskip.5\interwordspace\s!plus.125\interwordspace\relax} % \interwordstretch can be zero
-\unexpanded\def\specialcontrolspace {\normalcontrolspace\allowbreak} % uses fallback
+\permanent\protected\def\specialfixedspace {\kern\interwordspace\relax}
+\permanent\protected\def\specialobeyedspace {\hskip\interwordspace\relax} % better than spaceskip
+\permanent\protected\def\specialstretchedspace {\hskip.5\interwordspace\s!plus.125\interwordspace\relax} % \interwordstretch can be zero
+\permanent\protected\def\specialcontrolspace {\normalcontrolspace\allowbreak} % uses fallback
-\unexpanded\def\explicitfixedspace {\asciispacechar}
-\unexpanded\def\explicitobeyedspace {\asciispacechar\allowbreak}
-\unexpanded\def\explicitstretchedspace{\asciispacechar\hskip\zeropoint\s!plus.125\interwordspace\relax}%
-\unexpanded\def\explicitcontrolspace {\optionalcontrolspace\allowbreak} % uses asciispace
+\permanent\protected\def\explicitfixedspace {\asciispacechar}
+\permanent\protected\def\explicitobeyedspace {\asciispacechar\allowbreak}
+\permanent\protected\def\explicitstretchedspace{\asciispacechar\hskip\zeropoint\s!plus.125\interwordspace\relax}%
+\permanent\protected\def\explicitcontrolspace {\optionalcontrolspace\allowbreak} % uses asciispace
\appendtoks
- \unexpanded\def\obeyedspace{\hskip\zeropoint\asciispacechar\hskip\zeropoint}%
+ \enforced\protected\def\obeyedspace{\hskip\zeropoint\relax\asciispacechar\hskip\zeropoint\relax}%
\to \everyenableelements
-\unexpanded\def\obeyhyphens
- {\let\obeyedspace \specialobeyedspace % maybe \specialstretchedspace
- \let\controlspace\specialcontrolspace
+\permanent\protected\def\obeyhyphens
+ {\enforced\let\obeyedspace \specialobeyedspace % maybe \specialstretchedspace
+ \enforced\let\controlspace\specialcontrolspace
\spaceskip.25\emwidth\relax} % hm a bit of stretch !
-\unexpanded\def\obeybreakpoints
+\permanent\protected\def\obeybreakpoints
{\ignorehyphens
\veryraggedright}
-\unexpanded\def\ignorehyphens
- {\language\minusone % extra bonus, the \null should do the job too
- \let\obeyedspace \specialobeyedspace
- \let\controlspace\specialcontrolspace
+\permanent\protected\def\ignorehyphens
+ {\nohyphens
+ \enforced\let\obeyedspace \specialobeyedspace
+ \enforced\let\controlspace\specialcontrolspace
\spaceskip.5\emwidth\relax}
%D \macros
@@ -406,14 +404,14 @@
%D decided not to use that slow and sometimes troublesome solution. Instead we stick
%D to some 'old' \CONTEXT\ macros for typesetting typical \TEX\ characters.
-\def\lesscharacter {<} % obsolete
-\def\morecharacter {>} % obsolete
+\immutable\def\lesscharacter {<} % obsolete
+\immutable\def\morecharacter {>} % obsolete
-\let\texescape \textbackslash
-\let\leftargument \textbraceleft
-\let\rightargument \textbraceright
-\let\inlinemathmarker \textdollar
-\def\displaymathmarker{\textdollar\textdollar}
+\immutable\let\texescape \textbackslash
+\immutable\let\leftargument \textbraceleft
+\immutable\let\rightargument \textbraceright
+\immutable\let\inlinemathmarker \textdollar
+\immutable\def\displaymathmarker{\textdollar\textdollar}
\def\buff_verbatim_special_type#1#2#% # gobbles spaces
{\dontleavehmode\bgroup
@@ -426,21 +424,21 @@
\aftergroup\egroup
\let\nexttoken}
-\unexpanded\def\tex{\buff_verbatim_special_type\texescape \relax}
-\unexpanded\def\arg{\buff_verbatim_special_type\leftargument \rightargument}
-\unexpanded\def\mat{\buff_verbatim_special_type\inlinemathmarker \inlinemathmarker}
-\unexpanded\def\dis{\buff_verbatim_special_type\displaymathmarker\displaymathmarker}
+\mutable\protected\def\tex{\buff_verbatim_special_type\texescape \relax}
+\mutable\protected\def\arg{\buff_verbatim_special_type\leftargument \rightargument}
+\mutable\protected\def\mat{\buff_verbatim_special_type\inlinemathmarker \inlinemathmarker}
+\mutable\protected\def\dis{\buff_verbatim_special_type\displaymathmarker\displaymathmarker}
-\let\normaltexttex\tex
-\let\normaltextarg\arg
-\let\normaltextmat\mat
-\let\normaltextdis\dis
+\aliased\let\normaltexttex\tex
+\aliased\let\normaltextarg\arg
+\aliased\let\normaltextmat\mat
+\aliased\let\normaltextdis\dis
-\unexpanded\def\astype
+\permanent\protected\def\astype
{\dontleavehmode
\bgroup\usetypestyleandcolor\c!style\c!color\let\nexttoken}
-\unexpanded\def\asciistr#1% used in some old styles
+\permanent\protected\def\asciistr#1% used in some old styles
{\dontleavehmode\begingroup
\dostarttagged\t!verbatim\empty
\usetypestyleandcolor\c!style\c!color\detokenize{#1}%
@@ -450,25 +448,17 @@
%D The basic display verbatim commands are defined in an indirect way. As we
%D will see, they are a specific case of a more general mechanism.
-\let\beginofverbatimlines\relax % hooks
-\let\endofverbatimlines \relax % hooks
+\mutable\let\beginofverbatimlines\relax % hooks
+\mutable\let\endofverbatimlines \relax % hooks
-\unexpanded\def\buff_verbatim_typing_start#1% tricky non standard lookahead
+\protected\def\buff_verbatim_typing_start#1% tricky non standard lookahead
{\begingroup
\edef\currenttyping{#1}%
\obeylines
\futureexpandis[\buff_verbatim_typing_start_yes\buff_verbatim_typing_start_nop}
-\unexpanded\def\buff_verbatim_setup_keep_together
- {\edef\p_keeptogether{\typingparameter\c!keeptogether}%
- \ifx\p_keeptogether\v!yes
- \settrue \c_buff_optimize_linebreaks
- \else
- \setfalse\c_buff_optimize_linebreaks
- \fi}
-
\def\buff_verbatim_typing_start_nop
- {\typingparameter\c!before
+ {\typingparameter\c!before\relax
\startpacked[\v!blank]%
\buff_verbatim_setup_line_numbering
\buff_verbatim_initialize_typing_one
@@ -476,7 +466,7 @@
\normalexpanded{\buff_verbatim_type_block{\e!start\currenttyping}{\e!stop\currenttyping}}}
\def\buff_verbatim_typing_start_yes[#1]%
- {\typingparameter\c!before
+ {\typingparameter\c!before\relax
\startpacked[\v!blank]%
\ifcondition\validassignment{#1}%
\setupcurrenttyping[#1]%
@@ -488,7 +478,17 @@
\buff_verbatim_setup_keep_together
\normalexpanded{\buff_verbatim_type_block{\e!start\currenttyping}{\e!stop\currenttyping}}}
-\unexpanded\def\buff_verbatim_type_block#1#2%
+% \startnamedtyping[#1]
+
+\protected\def\buff_verbatim_setup_keep_together
+ {\edef\p_keeptogether{\typingparameter\c!keeptogether}%
+ \ifx\p_keeptogether\v!yes
+ \settrue \c_buff_optimize_linebreaks
+ \else
+ \setfalse\c_buff_optimize_linebreaks
+ \fi}
+
+\protected\def\buff_verbatim_type_block#1#2%
{\edef\p_strip{\typingparameter\c!strip}%
\normalexpanded{\buff_pickup
{_typing_}%
@@ -498,7 +498,7 @@
{\buff_verbatim_type_block_verbatim_indeed{#1}{#2}}%
\ifx\p_strip\v!no\zerocount\else\plusone\fi}}
-\unexpanded\def\buff_verbatim_type_block_verbatim_indeed#1#2%
+\protected\def\buff_verbatim_type_block_verbatim_indeed#1#2%
{\buff_verbatim_initialize_typing_two
\dostarttaggedchained\t!verbatimblock\currenttyping\??typing
\beginofverbatimlines
@@ -517,9 +517,9 @@
\dostoptagged
\begincsname#2\endcsname}
-\unexpanded\def\buff_verbatim_typing_stop#1% hm, currenttyping
+\protected\def\buff_verbatim_typing_stop#1% hm, currenttyping
{\stoppacked
- \typingparameter\c!after
+ \typingparameter\c!after\relax
\useindentnextparameter\typingparameter
\endgroup
\dorechecknextindentation}
@@ -577,20 +577,19 @@
% [category] [settings] {name} % for historic reasons, all filenames are {}
-\unexpanded\def\typefile
- {\dodoubleempty\buff_verbatim_type_file}
+\mutable\let\currenttypingfile\empty
\appendtoks
- \setuevalue{\e!type\currenttyping\v!file}{\typefile[\currenttyping]}%
+ \frozen\instance\setuevalue{\e!type\currenttyping\v!file}{\typefile[\currenttyping]}%
\to \everydefinetyping
-\def\buff_verbatim_type_file[#1][#2]#3%
+\permanent\tolerant\protected\def\typefile[#1]#*[#2]#:#3%
{\begingroup
- \ifsecondargument
+ \ifparameter#2\or
\setuptyping[#1][#2]%
\buff_verbatim_type_file_checked{#1}{#3}%
- \orelse\iffirstargument
- \ifcondition\validassignment{#1}%
+ \orelse\ifparameter#1\or
+ \ifhastok={#1}%
\setuptyping[\v!file][#1]%
\buff_verbatim_type_file_checked\v!file{#3}%
\else
@@ -605,25 +604,25 @@
\def\buff_verbatim_type_file_checked#1#2%
{\doifelsetypingfile{#2}
- {\buff_verbatim_type_file_indeed{#1}\askedtypingfile}
+ {\buff_verbatim_type_file_indeed{#1}\currenttypingfile}
{\showmessage\m!verbatims1{#2}}}
-\unexpanded\def\doifelsetypingfile#1%
- {\edef\askedtypingfile{\locfilename{#1}}%
- \ifx\askedtypingfile\empty
- \edef\askedtypingfile{\locfilename{#1.tex}}% downward compatible
+\permanent\protected\def\doifelsetypingfile#1%
+ {\edef\currenttypingfile{\locfilename{#1}}%
+ \ifempty\currenttypingfile
+ \edef\currenttypingfile{\locfilename{#1.tex}}% downward compatible
\fi
- \ifx\askedtypingfile\empty
+ \ifempty\currenttypingfile
\expandafter\secondoftwoarguments
\else
\expandafter\firstoftwoarguments
\fi}
-\let\doiftypingfileelse\doifelsetypingfile
+\aliased\let\doiftypingfileelse\doifelsetypingfile
\def\buff_verbatim_type_file_indeed#1#2% category name
{\edef\currenttyping{#1}%
- \typingparameter\c!before
+ \typingparameter\c!before\relax
\startpacked[\v!blank]
\buff_verbatim_setup_line_numbering
\buff_verbatim_initialize_typing_one
@@ -644,13 +643,13 @@
\endofverbatimlines
\dostoptagged
\stoppacked
- \typingparameter\c!after}
+ \typingparameter\c!after\relax}
%D Line numbering:
\newconditional\verbatimnumberinglines
-\def\beginofverbatimlinenumbering
+\permanent\protected\def\beginofverbatimlinenumbering
{\startlinenumbering
[\currenttyping]%
[\c!continue=\typingparameter\c!continue,
@@ -659,23 +658,23 @@
\c!stop=\typingparameter\c!stop, % ?
\c!step=\typingparameter\c!step]}
-\def\endofverbatimlinenumbering
+\permanent\protected\def\endofverbatimlinenumbering
{\stoplinenumbering}
\def\buff_verbatim_setup_line_numbering
{\ifdefined\startlinenumbering
- \edef\currenttypingnumbering{\typingparameter\c!numbering}%
- \ifx\currenttypingnumbering\v!file
+ \edef\p_numbering{\typingparameter\c!numbering}%
+ \ifx\p_numbering\v!file
\setuplinenumbering[\currenttyping][\c!method=\v!file]%
\settrue\verbatimnumberinglines
- \orelse\ifx\currenttypingnumbering\v!line
+ \orelse\ifx\p_numbering\v!line
\settrue\verbatimnumberinglines
\else
\setfalse\verbatimnumberinglines
\fi
\ifconditional\verbatimnumberinglines
- \let\beginofverbatimlines\beginofverbatimlinenumbering
- \let\endofverbatimlines \endofverbatimlinenumbering
+ \enforced\let\beginofverbatimlines\beginofverbatimlinenumbering
+ \enforced\let\endofverbatimlines \endofverbatimlinenumbering
\fi
\fi}
@@ -690,14 +689,14 @@
%D
%D The definition is not that spectacular.
-\unexpanded\def\filename#1{{\tttf\hyphenatedfilename{#1}}}
+\permanent\protected\def\filename#1{{\tttf\hyphenatedfilename{#1}}}
%D \macros
%D {verbatim}
%d
%D And a bonus macro, an unexpanded detokenize:
-\unexpanded\def\verbatim#1{\detokenize{#1}}
+\permanent\protected\def\verbatim#1{\detokenize{#1}}
%D The setups for display verbatim and file verbatim are shared. One can adapt the
%D extra defined typing environments, but they also default to the values below.
@@ -761,61 +760,58 @@
% [name] [settings] | [name] | [settings]
-% \unexpanded\def\typebuffer
-% {\dodoubleempty\buff_verbatim_type_buffer}
-
-\unexpanded\def\typebuffer
+\permanent\protected\def\typebuffer
{\begingroup
\let\currenttyping\v!buffer
- \dodoubleempty\buff_verbatim_type_buffer}
+ \buff_verbatim_type_buffer}
-\unexpanded\def\buff_verbatim_type_defined_buffer
- {\dotripleempty\buff_verbatim_type_defined_buffer_indeed}
-
-\unexpanded\def\typedefinedbuffer[#1]%
+\permanent\protected\def\typedefinedbuffer[#1]%
{\buff_verbatim_type_defined_buffer[\v!buffer][\thedefinedbuffer{#1}]}%
\appendtoks
- \setuevalue{\e!type\currentbuffer}{\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}%
+ \frozen\instance\setuevalue{\e!type\currentbuffer}{\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}%
\to \everydefinebuffer
\appendtoks % \e!buffer
- \setuevalue{\e!type\currenttyping\v!buffer}{\buff_verbatim_type_buffer_class{\currenttyping}}%
+ \frozen\instance\setuevalue{\e!type\currenttyping\v!buffer}{\buff_verbatim_type_buffer_class{\currenttyping}}%
\to \everydefinetyping
-\unexpanded\def\buff_verbatim_type_buffer[#1][#2]%
- {\ifsecondargument
- \setupcurrenttyping[#2]%
- \processcommalist[#1]{\buff_verbatim_type_buffer_indeed\currenttyping}% [name] [settings]
- \orelse\iffirstargument
- \ifcondition\validassignment{#1}%
+\tolerant\protected\def\buff_verbatim_type_buffer[#1]#*[#2]%
+ {\ifarguments
+ \buff_verbatim_type_buffer_indeed\currenttyping\empty% []
+ \or
+ \ifhastok={#1}%
\setupcurrenttyping[#1]%
\buff_verbatim_type_buffer_indeed\currenttyping\empty% [settings]
\else
\processcommalist[#1]{\buff_verbatim_type_buffer_indeed\currenttyping}% [name]
\fi
- \else
- \buff_verbatim_type_buffer_indeed\currenttyping\empty% []
+ \or
+ \setupcurrenttyping[#2]%
+ \processcommalist[#1]{\buff_verbatim_type_buffer_indeed\currenttyping}% [name] [settings]
\fi
+ \useindentnextparameter\typingparameter
\endgroup
\dorechecknextindentation}
-\unexpanded\def\buff_verbatim_type_buffer_class#1%
+\protected\def\buff_verbatim_type_buffer_class#1%
{\begingroup
\edef\currenttyping{#1}%
- \dodoubleempty\buff_verbatim_type_buffer}
+ \buff_verbatim_type_buffer}
-\unexpanded\def\buff_verbatim_type_defined_buffer_indeed[#1][#2][#3]% category name settings
+\tolerant\protected\def\buff_verbatim_type_defined_buffer[#1]#*[#2]#*[#3]% category name settings
{\begingroup
- \ifthirdargument
+ \ifarguments\or\or\or
\setuptyping[#1][#3]%
\fi
\buff_verbatim_type_buffer_indeed{#1}{#2}%
- \endgroup}
+ \useindentnextparameter\typingparameter
+ \endgroup
+ \dorechecknextindentation}
-\unexpanded\def\buff_verbatim_type_buffer_indeed#1#2% category name
+\protected\def\buff_verbatim_type_buffer_indeed#1#2% category name
{\edef\currenttyping{#1}%
- \typingparameter\c!before
+ \typingparameter\c!before\relax
\startpacked[\v!blank]
\buff_verbatim_setup_line_numbering
\buff_verbatim_initialize_typing_one
@@ -837,18 +833,17 @@
\endofverbatimlines
\dostoptagged
\stoppacked
- \typingparameter\c!after
- \dorechecknextindentation}
+ \typingparameter\c!after\relax}
-\unexpanded\def\typeinlinebuffer
+\permanent\protected\def\typeinlinebuffer
{\dontleavehmode
\begingroup
- \let\buff_verbatim_type_buffer_indeed\buff_verbatim_type_buffer_indeed_inline
- \let\setupcurrenttyping\setupcurrenttype % a terrible hack but it saves code
+ \enforced\let\buff_verbatim_type_buffer_indeed\buff_verbatim_type_buffer_indeed_inline
+ \enforced\let\setupcurrenttyping\setupcurrenttype % a terrible hack but it saves code
\let\currenttype\empty
- \dodoubleempty\buff_verbatim_type_buffer}
+ \buff_verbatim_type_buffer}
-\unexpanded\def\buff_verbatim_type_buffer_indeed_inline#1#2% category name
+\protected\def\buff_verbatim_type_buffer_indeed_inline#1#2% category name
{\edef\currenttype{#1}%
\buff_verbatim_initialize_type_one
\dostarttaggedchained\t!verbatim\currenttype\??type
@@ -868,24 +863,22 @@
% the next one is obsolete (bad name and used nowhere) so if it stays
% the name will change
-\unexpanded\def\processbuffer
+\permanent\tolerant\protected\def\processbuffer[#1]#*[#2]%
{\writestatus{nota bene}{\string\processbuffer\space is obsolete}%
- \dodoubleempty\buff_verbatim_process}
-
-\def\buff_verbatim_process[#1][#2]%
- {\begingroup
- \ifsecondargument
- \setuptyping[\v!buffer][#2]%
- \processcommalist[#1]{\buff_verbatim_process_indeed\v!buffer}% [name] [settings]
- \orelse\iffirstargument
- \ifcondition\validassignment{#1}%
+ \begingroup
+ \ifarguments
+ \buff_verbatim_process_indeed\v!buffer\empty% []
+ \or
+ %\ifcondition\validassignment{#1}%
+ \ifhastok={#1}%
\setuptyping[\v!buffer][#1]%
\buff_verbatim_process_indeed\v!buffer\empty% [settings]
\else
\processcommalist[#1]{\buff_verbatim_process_indeed\v!buffer}% [name]
\fi
- \else
- \buff_verbatim_process_indeed\v!buffer\empty% []
+ \or
+ \setuptyping[\v!buffer][#2]%
+ \processcommalist[#1]{\buff_verbatim_process_indeed\v!buffer}% [name] [settings]
\fi
\endgroup}
@@ -905,27 +898,26 @@
\newcount\nofverbatimlines
-\unexpanded\def\buff_verbatim_begin_of_line
+\protected\def\buff_verbatim_begin_of_line
{\ifconditional\verbatimnumberinglines
\global\advance\nofverbatimlines\plusone
- \attribute\verbatimlineattribute\nofverbatimlines
+ \c_attr_verbatimline\nofverbatimlines
\fi
\noindent
\buff_verbatim_set_line_margin
\the\everyline % maybe also after starttagged
\strut % after starttagged, else break !
- \dostarttagged\t!verbatimline\empty
- }
+ \dostarttagged\t!verbatimline\empty}
-\unexpanded\def\buff_verbatim_end_of_line
+\protected\def\buff_verbatim_end_of_line
{\dostoptagged
\obeyedline % still needed?
\par
\ifconditional\verbatimnumberinglines
- \attribute\verbatimlineattribute\attributeunsetvalue
+ \c_attr_verbatimline\attributeunsetvalue
\fi}
-\unexpanded\def\buff_verbatim_empty_line
+\protected\def\buff_verbatim_empty_line
{\dostoptagged
\ifconditional\verbatimnumberinglines
\par\strut\par % this will be an option where we use a signal instead of a strut
@@ -934,33 +926,33 @@
\fi
\dostarttagged\t!verbatimlines\empty}
-% hooks:
+% hooks (todo: frozen):
\newcount \c_buff_verbatim_noflines
\newcount \c_buff_verbatim_current
\newconditional\c_buff_optimize_linebreaks
- \def\doverbatimspace {\obeyedspace}
-
-\unexpanded\def\doinlineverbatimstart {}
-\unexpanded\def\doinlineverbatimstop {}
-\unexpanded\def\doinlineverbatimbeginline {}
-\unexpanded\def\doinlineverbatimnewline {\obeyedspace}
-\unexpanded\def\doinlineverbatimemptyline {\obeyedspace}
-
-\unexpanded\def\dodisplayverbatimstart {\advance\c_buff_verbatim_current\plusone
- \buff_verbatim_begin_of_line}
-\unexpanded\def\dodisplayverbatimstop {\buff_verbatim_end_of_line}
-\unexpanded\def\dodisplayverbatimbeginline{\advance\c_buff_verbatim_current\plusone
- \buff_verbatim_begin_of_line}
-\unexpanded\def\dodisplayverbatimnewline {\buff_verbatim_end_of_line
- \par
- \ifconditional\c_buff_optimize_linebreaks
- \buff_verbatim_inject_breaks
- \fi}
-\unexpanded\def\dodisplayverbatimemptyline{\buff_verbatim_empty_line}
-
-\unexpanded\def\buff_verbatim_inject_breaks
+\permanent\protected\def\doverbatimspace {\obeyedspace}
+
+\permanent\protected\def\doinlineverbatimstart {}
+\permanent\protected\def\doinlineverbatimstop {}
+\permanent\protected\def\doinlineverbatimbeginline {}
+\permanent\protected\def\doinlineverbatimnewline {\obeyedspace}
+\permanent\protected\def\doinlineverbatimemptyline {\obeyedspace}
+
+\permanent\protected\def\dodisplayverbatimstart {\advance\c_buff_verbatim_current\plusone
+ \buff_verbatim_begin_of_line}
+\permanent\protected\def\dodisplayverbatimstop {\buff_verbatim_end_of_line}
+\permanent\protected\def\dodisplayverbatimbeginline{\advance\c_buff_verbatim_current\plusone
+ \buff_verbatim_begin_of_line}
+\permanent\protected\def\dodisplayverbatimnewline {\buff_verbatim_end_of_line
+ \par
+ \ifconditional\c_buff_optimize_linebreaks
+ \buff_verbatim_inject_breaks
+ \fi}
+\permanent\protected\def\dodisplayverbatimemptyline{\buff_verbatim_empty_line}
+
+\protected\def\buff_verbatim_inject_breaks
{\ifnum\c_buff_verbatim_current=\plusone
\nobreak
\orelse\ifnum\c_buff_verbatim_noflines=\plusthree
@@ -969,7 +961,7 @@
\nobreak
\fi}
-\unexpanded\def\dodisplayverbatiminitialize#1%
+\permanent\protected\def\dodisplayverbatiminitialize#1%
{\forgetparindent % maybe more
\c_buff_verbatim_noflines#1\relax
\c_buff_verbatim_current\zerocount}
@@ -985,21 +977,24 @@
% \installcommandhandler \??visualizer {visualizer} \??visualizer
%
% \appendtoks
-% \setuevalue{\currentvisualizer}{\buff_verbatim_visualize{\currentvisualizer}}%
+% \frozen\instance\setuevalue{\currentvisualizer}{\buff_verbatim_visualize{\currentvisualizer}}%
% \to \everydefinevisualizer
%
-% \unexpanded\def\buff_verbatim_visualize#1%
+% \protected\def\buff_verbatim_visualize#1%
% {\bgroup
% \def\currentvisualizer{#1}%
% \usevisualizerstyleandcolor\c!style\c!color
% \let\next}
\appendtoks
- %def\type#1{\letterbackslash\checkedstrippedcsname#1}% or maybe detokenize
- \def\type#1{\detokenize\expandafter{\csstring#1}}% or maybe detokenize
- \def\tex #1{\letterbackslash#1}%
+ \enforced\def\type#1{\detokenize\expandafter{\csstring#1}}% or maybe detokenize
+ \enforced\def\tex #1{\letterbackslash#1}%
\to \everysimplifycommands
\stopcontextdefinitioncode
+%D This is \type {\asciimode} without the double comment hackery:
+
+\permanent\protected\def\literalmode{\setcatcodetable\txtcatcodes}
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/catc-act.mkxl b/Master/texmf-dist/tex/context/base/mkxl/catc-act.mkxl
new file mode 100644
index 00000000000..4ccf22a7f68
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/catc-act.mkxl
@@ -0,0 +1,51 @@
+%D \module
+%D [ file=catc-act,
+%D version=2006.09.18,
+%D title=\CONTEXT\ Catcode Macros,
+%D subtitle=Default Catcode Tables,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D \macros
+%D {installactivecharacter, defineactivecharacter}
+%D
+%D This module deals with some active character handling and I still need to
+%D update it to use \typ {\letcharcode <number> = \something}. This module
+%D will be simplified stepwise. Look into the \MKIV\ variant for originals.
+%D
+%D There was a time when we had active double quotes and such but we no longer
+%D do that. In fact, only the tilde and bar can be active in \CONTEXT.
+%D
+%D For those who love the more obscure features of \TEX: whenever you see
+%D uppercase magic with active characters, keep in mind that this is something
+%D deep down in the engine: handling of that specific case. The code here is
+%D not used and not really tested.
+
+\permanent\protected\def\installactivecharacter#1 %
+ {\ifchknum#1\or
+ \scratchcounter #1\edef\scratchmacro{\expandtoken\othercatcode\scratchcounter}%
+ \else
+ \scratchcounter`#1\let \scratchmacro #1%
+ \fi
+ \normalexpanded{\startextendcatcodetable\ctxcatcodes\catcode\the\scratchcounter\activecatcode\stopextendcatcodetable}%
+ \letcatcodecommand \ctxcatcodes \scratchcounter \scratchmacro
+ \ifnum\currentcatcodetable=\ctxcatcodes \setcatcodetable\ctxcatcodes \fi}
+
+\permanent\protected\def\defineactivecharacter #1 #2%
+ {\ifchknum#1\or\letcharcode#1=#2\relax\else\letcharcode`#1=#2\relax\fi}
+
+\permanent\protected\def\makecharacteractive #1 %
+ {\catcode`#1\activecatcode}
+
+\permanent\protected\def\installanddefineactivecharacter #1 #2%
+ {\normalexpanded{\installactivecharacter \utfchar{#1} }%
+ \defineactivecharacter #1 #2}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/catc-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/catc-def.mkxl
new file mode 100644
index 00000000000..a7d48714a5c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/catc-def.mkxl
@@ -0,0 +1,273 @@
+%D \module
+%D [ file=catc-def,
+%D version=2006.09.18,
+%D title=\CONTEXT\ Catcode Macros,
+%D subtitle=Default Tables,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Contrary to \MKIV\ we define the catcode tables in one file. The original split
+%D was a prelude to a split approach where context would run on top of a basic layer
+%D (so that we could make smaller alternative formats) but that idea (from the early
+%D days of \LUATEX) was dropped when I realized that there is not common ground to
+%D cover between formats. It is simply not worth the trouble.
+
+\ifdefined\nilcatcodes \else \newcatcodetable \nilcatcodes \fi
+\ifdefined\texcatcodes \else \newcatcodetable \texcatcodes \fi
+\ifdefined\luacatcodes \else \newcatcodetable \luacatcodes \fi
+\ifdefined\notcatcodes \else \newcatcodetable \notcatcodes \fi
+\ifdefined\rlncatcodes \else \newcatcodetable \rlncatcodes \fi
+\ifdefined\vrbcatcodes \else \newcatcodetable \vrbcatcodes \fi
+\ifdefined\prtcatcodes \else \newcatcodetable \prtcatcodes \fi
+\ifdefined\ctxcatcodes \else \newcatcodetable \ctxcatcodes \fi
+\ifdefined\txtcatcodes \else \newcatcodetable \txtcatcodes \fi
+\ifdefined\tpacatcodes \else \newcatcodetable \tpacatcodes \fi % { }
+\ifdefined\tpbcatcodes \else \newcatcodetable \tpbcatcodes \fi % < >
+\ifdefined\ctdcatcodes \else \newcatcodetable \ctdcatcodes \fi % context definitions
+
+\startcatcodetable \nilcatcodes
+ \catcode\tabasciicode \spacecatcode
+ \catcode\endoflineasciicode \endoflinecatcode
+ \catcode\formfeedasciicode \endoflinecatcode
+ \catcode\spaceasciicode \spacecatcode
+ \catcode\endoffileasciicode \ignorecatcode
+\stopcatcodetable
+
+\startcatcodetable \texcatcodes
+ \catcode\tabasciicode \spacecatcode
+ \catcode\endoflineasciicode \endoflinecatcode
+ \catcode\formfeedasciicode \endoflinecatcode
+ \catcode\spaceasciicode \spacecatcode
+ \catcode\endoffileasciicode \ignorecatcode
+ \catcode\circumflexasciicode\superscriptcatcode
+ \catcode\underscoreasciicode\subscriptcatcode
+ \catcode\ampersandasciicode \alignmentcatcode
+ \catcode\backslashasciicode \escapecatcode
+ \catcode\leftbraceasciicode \begingroupcatcode
+ \catcode\rightbraceasciicode\endgroupcatcode
+ \catcode\dollarasciicode \mathshiftcatcode
+ \catcode\hashasciicode \parametercatcode
+ \catcode\commentasciicode \commentcatcode
+\stopcatcodetable
+
+\startcatcodetable \luacatcodes
+ \catcode\tabasciicode \othercatcode
+ \catcode\endoflineasciicode \othercatcode
+ \catcode\formfeedasciicode \othercatcode
+ \catcode\spaceasciicode \othercatcode
+ \catcode\endoffileasciicode \ignorecatcode
+ \catcode\circumflexasciicode\othercatcode
+ \catcode\underscoreasciicode\othercatcode
+ \catcode\ampersandasciicode \othercatcode
+ \catcode\backslashasciicode \escapecatcode
+ \catcode\commentasciicode \othercatcode
+ \catcode\hashasciicode \othercatcode
+ \catcode\barasciicode \othercatcode
+ \catcode\leftbraceasciicode \othercatcode
+ \catcode\rightbraceasciicode\othercatcode
+ \catcode\tildeasciicode \othercatcode
+ \catcode\dollarasciicode \othercatcode
+\stopcatcodetable
+
+\startcatcodetable \notcatcodes % probably less needed
+ \catcode\tabasciicode \spacecatcode
+ \catcode\endoflineasciicode \endoflinecatcode
+ \catcode\formfeedasciicode \endoflinecatcode
+ \catcode\spaceasciicode \spacecatcode
+ \catcode\endoffileasciicode \ignorecatcode
+ \catcode\circumflexasciicode \othercatcode
+ \catcode\underscoreasciicode \othercatcode
+ \catcode\ampersandasciicode \othercatcode
+ \catcode\tildeasciicode \othercatcode
+ \catcode\hashasciicode \othercatcode
+ \catcode\dollarasciicode \othercatcode
+ \catcode\commentasciicode \othercatcode
+ \catcode\lessthanasciicode \othercatcode
+ \catcode\morethanasciicode \othercatcode
+ \catcode\leftbraceasciicode \othercatcode
+ \catcode\rightbraceasciicode \othercatcode
+ \catcode\doublequoteasciicode \othercatcode
+ \catcode\singlequoteasciicode \othercatcode
+ \catcode\forwardslashasciicode\othercatcode
+ \catcode\backslashasciicode \othercatcode
+ \catcode\barasciicode \othercatcode
+\stopcatcodetable
+
+\startcatcodetable \rlncatcodes
+ \catcode\tabasciicode \othercatcode
+ \catcode\endoflineasciicode \othercatcode
+ \catcode\formfeedasciicode \othercatcode
+ \catcode\spaceasciicode \spacecatcode % maybe we also need a vector with space being other
+ \catcode\endoffileasciicode \othercatcode
+ \catcode\circumflexasciicode \othercatcode
+ \catcode\underscoreasciicode \othercatcode
+ \catcode\ampersandasciicode \othercatcode
+ \catcode\tildeasciicode \othercatcode
+ \catcode\hashasciicode \othercatcode
+ \catcode\dollarasciicode \othercatcode
+ \catcode\commentasciicode \othercatcode
+ \catcode\lessthanasciicode \othercatcode
+ \catcode\morethanasciicode \othercatcode
+ \catcode\leftbraceasciicode \othercatcode
+ \catcode\rightbraceasciicode \othercatcode
+ \catcode\doublequoteasciicode \othercatcode
+ \catcode\singlequoteasciicode \othercatcode
+ \catcode\forwardslashasciicode\othercatcode
+ \catcode\backslashasciicode \othercatcode
+ \catcode\barasciicode \othercatcode
+\stopcatcodetable
+
+\startcatcodetable \vrbcatcodes % probably less needed
+ \catcode\tabasciicode \othercatcode
+ \catcode\endoflineasciicode\othercatcode
+ \catcode\formfeedasciicode \othercatcode
+ \catcode\spaceasciicode \othercatcode
+ \catcode\endoffileasciicode\othercatcode
+\stopcatcodetable
+
+\startcatcodetable \prtcatcodes
+ \catcode\tabasciicode \spacecatcode
+ \catcode\endoflineasciicode \endoflinecatcode
+ \catcode\formfeedasciicode \endoflinecatcode
+ \catcode\spaceasciicode \spacecatcode
+ \catcode\endoffileasciicode \ignorecatcode
+ \catcode\circumflexasciicode \superscriptcatcode
+ %catcode\underscoreasciicode \subscriptcatcode
+ \catcode\underscoreasciicode \lettercatcode
+ \catcode\ampersandasciicode \alignmentcatcode
+ \catcode\backslashasciicode \escapecatcode
+ \catcode\leftbraceasciicode \begingroupcatcode
+ \catcode\rightbraceasciicode \endgroupcatcode
+ \catcode\dollarasciicode \mathshiftcatcode
+ \catcode\hashasciicode \parametercatcode
+ \catcode\commentasciicode \commentcatcode
+ \catcode\atsignasciicode \lettercatcode
+ \catcode\exclamationmarkasciicode\lettercatcode
+ \catcode\questionmarkasciicode \lettercatcode
+ \catcode\tildeasciicode \activecatcode
+ \catcode\barasciicode \activecatcode
+\stopcatcodetable
+
+\startcatcodetable \ctxcatcodes
+ \catcode\tabasciicode \spacecatcode
+ \catcode\endoflineasciicode \endoflinecatcode
+ \catcode\formfeedasciicode \endoflinecatcode
+ \catcode\spaceasciicode \spacecatcode
+ \catcode\endoffileasciicode \ignorecatcode
+ % \catcode\circumflexasciicode\superscriptcatcode
+ % \catcode\underscoreasciicode\subscriptcatcode
+ % \catcode\ampersandasciicode \alignmentcatcode
+ \catcode\underscoreasciicode\othercatcode
+ \catcode\circumflexasciicode\othercatcode
+ \catcode\ampersandasciicode \othercatcode
+ \catcode\backslashasciicode \escapecatcode
+ \catcode\leftbraceasciicode \begingroupcatcode
+ \catcode\rightbraceasciicode\endgroupcatcode
+ \catcode\dollarasciicode \mathshiftcatcode
+ \catcode\hashasciicode \parametercatcode
+ \catcode\commentasciicode \commentcatcode
+ \catcode\tildeasciicode \activecatcode
+ \catcode\barasciicode \activecatcode
+\stopcatcodetable
+
+\startcatcodetable \tpacatcodes
+ \catcode\tabasciicode \othercatcode
+ \catcode\endoflineasciicode \othercatcode
+ \catcode\formfeedasciicode \othercatcode
+ \catcode\spaceasciicode \othercatcode
+ \catcode\endoffileasciicode \othercatcode
+ \catcode\leftbraceasciicode \begingroupcatcode
+ \catcode\rightbraceasciicode\endgroupcatcode
+\stopcatcodetable
+
+\startcatcodetable \tpbcatcodes
+ \catcode\tabasciicode \othercatcode
+ \catcode\endoflineasciicode \othercatcode
+ \catcode\formfeedasciicode \othercatcode
+ \catcode\spaceasciicode \othercatcode
+ \catcode\endoffileasciicode \othercatcode
+ \catcode\lessthanasciicode \begingroupcatcode
+ \catcode\morethanasciicode \endgroupcatcode
+\stopcatcodetable
+
+\setnewconstant \doublecommentsignal "10FF25 %% < 110000 (last valid range)
+
+\startcatcodetable \txtcatcodes
+ \catcode\tabasciicode \spacecatcode
+ \catcode\endoflineasciicode \endoflinecatcode
+ \catcode\formfeedasciicode \endoflinecatcode
+ \catcode\spaceasciicode \spacecatcode
+ \catcode\endoffileasciicode \ignorecatcode
+ \catcode\backslashasciicode \escapecatcode
+ \catcode\leftbraceasciicode \begingroupcatcode
+ \catcode\rightbraceasciicode\endgroupcatcode
+ \catcode\doublecommentsignal\commentcatcode
+\stopcatcodetable
+
+\startcatcodetable \ctdcatcodes
+ \catcode\tabasciicode \ignorecatcode
+ \catcode\endoflineasciicode \ignorecatcode
+ \catcode\formfeedasciicode \ignorecatcode
+ \catcode\spaceasciicode \ignorecatcode
+ \catcode\endoffileasciicode \ignorecatcode
+ \catcode\circumflexasciicode \superscriptcatcode % candidate
+ \catcode\underscoreasciicode \lettercatcode
+ \catcode\ampersandasciicode \alignmentcatcode
+ % \catcode\colonasciicode \lettercatcode % candidate
+ \catcode\backslashasciicode \escapecatcode
+ \catcode\leftbraceasciicode \begingroupcatcode
+ \catcode\rightbraceasciicode \endgroupcatcode
+ \catcode\dollarasciicode \mathshiftcatcode
+ \catcode\hashasciicode \parametercatcode
+ \catcode\commentasciicode \commentcatcode
+ \catcode\atsignasciicode \lettercatcode
+ \catcode\exclamationmarkasciicode\lettercatcode
+ \catcode\questionmarkasciicode \lettercatcode
+ \catcode\tildeasciicode \activecatcode
+ \catcode\barasciicode \activecatcode
+\stopcatcodetable
+
+%D From now on we can use the protection mechanisms.
+
+\permanent\protected\def\unprotect {\pushcatcodetable\catcodetable\prtcatcodes}
+\permanent\protected\def\protect {\popcatcodetable}
+
+\permanent\protected\def\starttexcode {\pushcatcodetable\catcodetable\prtcatcodes}
+\permanent\protected\def\stoptexcode {\popcatcodetable}
+
+\permanent\protected\def\startcontextcode {\pushcatcodetable\catcodetable\ctxcatcodes}
+\permanent\protected\def\stopcontextcode {\popcatcodetable}
+
+\permanent\protected\def\startcontextdefinitioncode {\pushcatcodetable\catcodetable\ctdcatcodes}
+\permanent\protected\def\stopcontextdefinitioncode {\popcatcodetable}
+
+%D We have a few active characters (left):
+
+\letcatcodecommand \ctxcatcodes \barasciicode \relax
+\letcatcodecommand \ctxcatcodes \tildeasciicode \relax
+
+%D Because some characters have a special meaning, we provide shortcuts to their
+%D character representation. Some will be overloaded (which might change).
+
+\permanent\chardef \^ = \circumflexasciicode
+\permanent\chardef \_ = \underscoreasciicode
+\permanent\chardef \& = \ampersandasciicode
+\permanent\chardef \% = \commentasciicode
+\permanent\chardef \# = \hashasciicode
+\permanent\chardef \$ = \dollarasciicode
+\permanent\chardef \{ = \leftbraceasciicode
+\permanent\chardef \} = \rightbraceasciicode
+\permanent\chardef \\ = \backslashasciicode
+\permanent\chardef \| = \barasciicode
+
+\pushoverloadmode
+ \catcodetable \ctxcatcodes
+ \aliased\let\defaultcatcodetable\ctxcatcodes
+\popoverloadmode
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/catc-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/catc-ini.lmt
new file mode 100644
index 00000000000..ede8216a640
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/catc-ini.lmt
@@ -0,0 +1,44 @@
+if not modules then modules = { } end modules ['catc-ini'] = {
+ version = 1.001,
+ comment = "companion to catc-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+catcodes = catcodes or { }
+catcodes.numbers = catcodes.numbers or { }
+catcodes.names = catcodes.names or { }
+
+storage.register("catcodes/numbers", catcodes.numbers, "catcodes.numbers")
+storage.register("catcodes/names", catcodes.names, "catcodes.names")
+
+local numbers = catcodes.numbers
+local names = catcodes.names
+
+-- We register the catcode tables in the \type {tex} namespace as we have been doing
+-- right from the start (when there wasn't much in that namespace). Normally
+-- registration of a table only happens when we're in so called ini mode. Also, the
+-- number of tables is rather small.
+
+function catcodes.register(name,number)
+ numbers[name] = number
+ local cnn = names[number]
+ if cnn then
+ cnn[#cnn+1] = name
+ else
+ names[number] = { name }
+ end
+ tex[name] = number -- downward compatible
+end
+
+-- At runtime we need to populate the \type {tex} namespace again.
+
+for name, number in next, numbers do
+ tex[name] = number -- downward compatible
+end
+
+-- We catch wrong usage.
+
+table.setmetatableindex(numbers,function(t,k) if type(k) == "number" then t[k] = k return k end end)
+table.setmetatableindex(names, function(t,k) if type(k) == "string" then t[k] = k return k end end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl
new file mode 100644
index 00000000000..5b33db981d6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/catc-ini.mkxl
@@ -0,0 +1,274 @@
+%D \module
+%D [ file=catc-ini,
+%D version=2006.09.18,
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Catcode Handling,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{catc-ini}{autosuffix}
+
+\unprotect
+
+%D A long standing wish has been the availability of catcode arrays. Because
+%D traditional \TEX\ does not provide this we implement a fake method in the \MKII\
+%D file. There is some overlap in code with \MKII\ but we take that for granted.
+%D Also, in \MKIV\ less active characters are used.
+
+% \begingroup
+% \letcharcode\newlineasciicode\relax \xdef\outputnewlinechar{\Uchar\newlineasciicode}
+% \endgroup
+
+% \endlinechar = \endoflineasciicode % appended to input lines
+% \newlinechar = \newlineasciicode % can be used in write
+
+% rather special and used in writing to file: \let\par\outputnewlinechar
+
+% \permanent\protected\def\initializenewlinechar % operating system dependent
+% {\begingroup
+% \enforced\letcharcode\newlineasciicode\relax
+% \newlinechar\newlineasciicode
+% \xdef\outputnewlinechar{\Uchar\newlineasciicode}%
+% \endgroup}
+
+%D We predefine some prefixes ahead of syst-aux and mult-sys. We reserve 8 slots for
+%D catcodes. (This active mess probably needs an update some day.)
+
+\installsystemnamespace{catcodelet} % let : \let
+\installsystemnamespace{catcodedef} % def : \def
+\installsystemnamespace{catcodeued} % ued : \protected\def
+\installsystemnamespace{catcodeget} % \meaning
+
+\installsystemnamespace{catcodetablet}
+\installsystemnamespace{catcodetablen}
+
+\newcount\c_syst_catcodes_n \c_syst_catcodes_n\zerocount % 0 = signal, so advance before allocate
+\newcount\c_syst_catcodes_a
+\newcount\c_syst_catcodes_b
+\newcount\c_syst_catcodes_c
+
+\permanent\protected\def\newcatcodetable#1% we could move the cctdefcounter to lua
+ {\global\advance\c_syst_catcodes_n\plusone
+ \gdefcsname\??catcodetablen\number\c_syst_catcodes_n\endcsname{\string#1}% logging
+ \immutable\integerdef#1\c_syst_catcodes_n
+ \ctxlua{catcodes.register("\expandafter\gobbleoneargument\string#1",\number#1)}}
+
+\newtoks\everysetdefaultcatcodes
+
+\everysetdefaultcatcodes % this might get dropped
+ {\catcode\backslashasciicode\othercatcode
+ \catcode\endoflineasciicode\othercatcode
+ \catcode\spaceasciicode \othercatcode
+ \catcode\commentasciicode \othercatcode
+ \catcode\delasciicode \othercatcode}
+
+\permanent\protected\def\startcatcodetable#1#2\stopcatcodetable
+ {\begingroup
+ \catcodetable\inicatcodes
+ \the\everysetdefaultcatcodes
+ #2%
+ \savecatcodetable#1\relax
+ \endgroup}
+
+\permanent\let\stopcatcodetable\relax
+
+\permanent\protected\def\startextendcatcodetable#1#2\stopextendcatcodetable
+ {\begingroup
+ \catcodetable#1\relax
+ \globaldefs\plusone
+ #2%
+ \globaldefs\zerocount
+ \endgroup}
+
+\permanent\let\stopextendcatcodetable\relax
+
+\permanent\protected\def\permitcircumflexescape % to be used grouped
+ {\catcode\circumflexasciicode\superscriptcatcode}
+
+\aliased\let\permitcaretescape\permitcircumflexescape
+
+% ==
+%
+% \protected\def\startextendcatcodetable#1#2\stopextendcatcodetable
+% {\bgroup
+% \scratchcounter\the\catcodetable
+% \catcodetable #1 #2
+% \catcodetable\scratchcounter
+% \egroup}
+
+%D The next command can be defined in a cleaner way in the MkIV way but we want
+%D to have a fast one with a minimal chance for interference. Do we still need
+%D this complex mechanism? Probably not. Future versions of \MKIV\ might only use
+%D active characters for very special cases.
+
+\setnewconstant\c_syst_catcodes_hack\tildeasciicode
+
+%D Once a catcode is assigned, the next assignments will happen faster. However,
+%D redefinitions probably happen seldom so it's sort of overkill.
+
+\permanent\protected\def\letcatcodecommand{\afterassignment\syst_catcodes_let_a\c_syst_catcodes_a}
+\permanent\protected\def\defcatcodecommand{\afterassignment\syst_catcodes_def_a\c_syst_catcodes_a}
+\permanent\protected\def\uedcatcodecommand{\afterassignment\syst_catcodes_ued_a\c_syst_catcodes_a}
+
+\def\syst_catcodes_let_a{\afterassignment\syst_catcodes_let_b\c_syst_catcodes_b}
+\def\syst_catcodes_def_a{\afterassignment\syst_catcodes_def_b\c_syst_catcodes_b}
+\def\syst_catcodes_ued_a{\afterassignment\syst_catcodes_ued_b\c_syst_catcodes_b}
+
+\def\syst_catcodes_let_b % each time
+ {\ifcsname\??catcodelet\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\syst_catcodes_let_c
+ \fi}
+
+\def\syst_catcodes_def_b % each time
+ {\ifcsname\??catcodedef\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\syst_catcodes_def_c
+ \fi}
+
+\def\syst_catcodes_ued_b % each time
+ {\ifcsname\??catcodeued\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\syst_catcodes_ued_c
+ \fi}
+
+\def\syst_catcodes_let_c % only first time
+ {\frozen\enforced\gdefcsname\??catcodelet\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname\expandafter
+ {\enforced\letcsname\??catcodeget\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}%
+ \syst_catcodes_reinstate_unexpanded
+ \csname\??catcodelet\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
+
+\def\syst_catcodes_def_c % only first time (we could use \normalexpanded here)
+ {\frozen\enforced\gdefcsname\??catcodedef\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
+ \expandafter##\expandafter1\expandafter
+ {\frozen\enforced\defcsname\??catcodeget\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname{##1}}%
+ \syst_catcodes_reinstate_normal
+ \csname\??catcodedef\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
+
+\def\syst_catcodes_ued_c % only first time
+ {\frozen\enforced\gdefcsname\??catcodeued\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\expandafter\endcsname
+ \expandafter##\expandafter1\expandafter
+ {\frozen\enforced\protected\defcsname\??catcodeget\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname{##1}}%
+ \syst_catcodes_reinstate_unexpanded
+ \csname\??catcodeued\number\c_syst_catcodes_a:\number\c_syst_catcodes_b\endcsname}
+
+\permanent\def\reinstatecatcodecommand{\afterassignment\syst_catcodes_reinstate_normal\c_syst_catcodes_b}
+
+%D This can be used when a direct definition has been done and the selector has been
+%D lost. A problem is that \type {\next} needs to be unique (as it gets bound) (still?).
+
+\def\syst_catcodes_reinstate_normal
+ {\begingroup
+ \edef\temp{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}%
+ \global\letcharcode\c_syst_catcodes_b\temp
+ \endgroup}
+
+\def\syst_catcodes_reinstate_unexpanded
+ {\begingroup
+ \protected\edef\temp{\noexpand\catcodecommand{\number\c_syst_catcodes_b}}%
+ \global\letcharcode\c_syst_catcodes_b\temp
+ \endgroup}
+
+\newconstant\defaultcatcodetable
+
+\permanent\def\catcodecommand#1%
+ {\csname\??catcodeget\number
+ \ifcsname\??catcodeget\number\currentcatcodetable:\number#1\endcsname
+ \currentcatcodetable \else \defaultcatcodetable
+ \fi
+ :\number#1\endcsname}
+
+%D \macros
+%D {restorecatcodes,pushcatcodetable,popcatcodetable}
+%D
+%D We're not finished dealing \CATCODES\ yet. In \CONTEXT\ we use only one auxiliary
+%D file, which deals with tables of contents, registers, two pass tracking,
+%D references etc. This file, as well as files concerning graphics, is processed
+%D when needed, which can be in the mid of typesetting verbatim. However, when
+%D reading in data in verbatim mode, we should temporary restore the normal
+%D \CATCODES, and that's exactly what the next macros do. Saving the catcodes can be
+%D disabled by saying \type {\localcatcodestrue}. In \MKIV\ instead we can push and
+%D pop catcode tables and as we keep track of used tables users seldom need to deal
+%D with this themselves.
+
+\newcount\c_syst_catcodes_level
+
+\permanent\protected\def\pushcatcodetable
+ {\advance\c_syst_catcodes_level\plusone
+ \syst_catcodes_trace_push
+ \expandafter\integerdef\csname\??catcodetablet\number\c_syst_catcodes_level\endcsname\currentcatcodetable}
+
+\permanent\protected\def\popcatcodetable
+ {\ifcase\c_syst_catcodes_level
+ \syst_catcodes_trace_nesting_error
+ \else
+ \catcodetable\csname\??catcodetablet\number\c_syst_catcodes_level\endcsname
+ \syst_catcodes_trace_pop
+ \advance\c_syst_catcodes_level\minusone
+ \fi}
+
+\protected\def\syst_catcodes_trace_nesting_error
+ {\immediate\write\statuswrite{}%
+ \immediate\write\statuswrite{Fatal error: catcode push/pop mismatch. Fix this! (restore level: \number\c_syst_catcodes_level)}\wait\end
+ \immediate\write\statuswrite{}}
+
+\permanent\protected\def\restorecatcodes % takes previous level
+ {\ifnum\c_syst_catcodes_level>\plusone
+ \catcodetable\csname\??catcodetablet\number\numexpr\c_syst_catcodes_level-1\relax\endcsname
+ \fi}
+
+\permanent\protected\def\setcatcodetable#1%
+ {\catcodetable#1%
+ \syst_catcodes_trace_set}
+
+%D Handy for debugging (not that we ever use(d) it):
+%D
+%D \starttyping
+%D \tracecatcodetables
+%D \stoptyping
+
+\permanent\protected\def\tracecatcodetables
+ {\def\syst_catcodes_trace_set {\syst_catcodes_trace{set \catcodetablename\space at \number\c_syst_catcodes_level}}%
+ \def\syst_catcodes_trace_push{\syst_catcodes_trace{push \catcodetablename\space from \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}%
+ \def\syst_catcodes_trace_pop {\syst_catcodes_trace{pop \catcodetablename\space to \syst_catcodes_prev\space at \number\c_syst_catcodes_level}}}
+
+\def\syst_catcodes_trace#1{\immediate\write\statuswrite{[#1]}}
+
+\def\syst_catcodes_prev
+ {\ifnum\numexpr\c_syst_catcodes_level-1\relax>\zerocount
+ \csname\??catcodetablen\number\csname\??catcodetablet\number\numexpr\c_syst_catcodes_level-1\relax\endcsname\endcsname
+ \else
+ -%
+ \fi}
+
+\permanent\def\catcodetablename
+ {\ifnum\currentcatcodetable>\zerocount
+ \csname\??catcodetablen\number\currentcatcodetable\endcsname
+ \else
+ -%
+ \fi}
+
+\let\syst_catcodes_trace_set \empty
+\let\syst_catcodes_trace_push\empty
+\let\syst_catcodes_trace_pop \empty
+
+% \tracecatcodetables
+
+\protect
+
+%D We still have to define these so let's do that now:
+
+\newcatcodetable \inicatcodes
+\initcatcodetable\inicatcodes
+
+\mutable\let\currentcatcodetable\catcodetable
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/catc-sym.mkxl b/Master/texmf-dist/tex/context/base/mkxl/catc-sym.mkxl
new file mode 100644
index 00000000000..a96ffb865c0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/catc-sym.mkxl
@@ -0,0 +1,96 @@
+%D \module
+%D [ file=catc-sym,
+%D version=1997.01.03, % moved code
+%D title=\CONTEXT\ Catcode Macros,
+%D subtitle=Some Handy Constants,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The following definitions can be used for mapping special characters onto
+%D letters, although we cheat a bit: they actually are of category other but
+%D for users that distinction doesn't matter here. The definitions in \MKII\
+%D and \MKIV\ look more impressive but here we use a \LUAMETATEX\ feature
+%D that permits a more direct definition (that also looks nice with the
+%D \CONTEXT\ syntax highlighting):
+
+\immutable\edef\letterleftbrace {\expandtoken \othercatcode \leftbraceasciicode}
+\immutable\edef\letterrightbrace {\expandtoken \othercatcode \rightbraceasciicode}
+\immutable\edef\letterampersand {\expandtoken \othercatcode \ampersandasciicode}
+\immutable\edef\letterless {\expandtoken \othercatcode \lessthanasciicode}
+\immutable\edef\lettermore {\expandtoken \othercatcode \morethanasciicode}
+\immutable\edef\letterhash {\expandtoken \othercatcode \hashasciicode}
+\immutable\edef\letterdoublequote {\expandtoken \othercatcode \doublequoteasciicode}
+\immutable\edef\lettersinglequote {\expandtoken \othercatcode \singlequoteasciicode}
+\immutable\edef\letterdollar {\expandtoken \othercatcode \dollarasciicode}
+\immutable\edef\letterpercent {\expandtoken \othercatcode \percentasciicode}
+\immutable\edef\letterhat {\expandtoken \othercatcode \circumflexasciicode}
+\immutable\edef\letterunderscore {\expandtoken \othercatcode \underscoreasciicode}
+\immutable\edef\letterbar {\expandtoken \othercatcode \barasciicode}
+\immutable\edef\lettertilde {\expandtoken \othercatcode \tildeasciicode}
+\immutable\edef\letterbackslash {\expandtoken \othercatcode \backslashasciicode}
+\immutable\edef\letterslash {\expandtoken \othercatcode \forwardslashasciicode}
+\immutable\edef\letterquestionmark {\expandtoken \othercatcode \questionmarkasciicode}
+\immutable\edef\letterexclamationmark {\expandtoken \othercatcode \exclamationmarkasciicode}
+\immutable\edef\letterat {\expandtoken \othercatcode \atsignasciicode}
+\immutable\edef\lettercolon {\expandtoken \othercatcode \colonasciicode}
+\immutable\edef\letterhyphen {\expandtoken \othercatcode \hyphenasciicode}
+
+\immutable\edef\letterleftparenthesis {\expandtoken \othercatcode \leftparentasciicode}
+\immutable\edef\letterrightparenthesis {\expandtoken \othercatcode \rightparentasciicode}
+\immutable\edef\letterleftbracket {\expandtoken \othercatcode \leftbracketasciicode}
+\immutable\edef\letterrightbracket {\expandtoken \othercatcode \rightbracketasciicode}
+
+\aliased\let\letterescape \letterbackslash
+\aliased\let\letterbgroup \letterleftbrace
+\aliased\let\letteregroup \letterrightbrace
+\aliased\let\letteropenbrace \letterleftbrace
+\aliased\let\letterclosebrace\letterrightbrace
+
+\unprotect
+
+%immutable\edef\s!n_u_l_token{\expandtoken \othercatcode \zerocount} % nul(l)
+%immutable\edef\s!s_o_h_token{\expandtoken \othercatcode \plusone } % start of header ^^^^0001
+%immutable\edef\s!s_t_x_token{\expandtoken \othercatcode \plustwo } % start of text ^^^^0002
+%immutable\edef\s!e_t_x_token{\expandtoken \othercatcode \plusthree} % end of text ^^^^0003
+\immutable\edef\s!e_o_t_token{\expandtoken \othercatcode \plusfour } % end of transmission ^^^^0004
+%immutable\edef\s!e_n_q_token{\expandtoken \othercatcode \plusfive } % enquiry
+%immutable\edef\s!a_c_k_token{\expandtoken \othercatcode \plussix } % aknowledgement
+
+\protect
+
+%D \macros
+%D {uncatcodespecials,setnaturalcatcodes,setnormalcatcodes,
+%D uncatcodecharacters,uncatcodeallcharacters,
+%D uncatcodespacetokens}
+%D
+%D The following macros are more or less replaced by switching to a catcode table
+%D (which we simulate in \MKII) but we keep them for convenience and compatibility.
+%D Some old engine code has been removed. A few ar still used a few times so I need
+%D to clean that up.
+
+%permanent\protected\def\uncatcodespecials {\setcatcodetable\nilcatcodes \uncatcodespacetokens}
+%permanent\protected\def\setnaturalcatcodes {\setcatcodetable\nilcatcodes}
+\permanent\protected\def\setnormalcatcodes {\setcatcodetable\ctxcatcodes} % maybe \texcatcodes
+%permanent\protected\def\uncatcodecharacters {\setcatcodetable\nilcatcodes} % was fast version, gone now
+%permanent\protected\def\uncatcodeallcharacters{\setcatcodetable\nilcatcodes} % was slow one, with restore
+
+\permanent\protected\def\uncatcodespacetokens
+ {\catcode\spaceasciicode \spacecatcode
+ \catcode\tabasciicode \spacecatcode
+ \catcode\formfeedasciicode \endoflinecatcode
+ \catcode\endoflineasciicode\endoflinecatcode
+ \catcode\delasciicode \ignorecatcode}
+
+%D These two are probably no longer needed, but we keep them for a while. Some more
+%D explanation can be foun din the mkiv variant of this module, where we also
+%D discuss side effects. It's time to move on, so these might go away some day.
+
+\aliased \let\rescan \scantextokens
+\permanent\def\rescanwithsetup#1#2{\begingroup\directsetup{#1}\scantextokens{#2}\endgroup}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/char-act.mkxl b/Master/texmf-dist/tex/context/base/mkxl/char-act.mkxl
new file mode 100644
index 00000000000..3fb4d2da65d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/char-act.mkxl
@@ -0,0 +1,99 @@
+%D \module
+%D [ file=char-act,
+%D version=2006.12.05,
+%D title=\CONTEXT\ Character Support,
+%D subtitle=Active,
+%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 Character Support / Active}
+
+\unprotect
+
+\ifdefined\page_otr_fill_and_eject_page \else \let\page_otr_fill_and_eject_page\relax \fi % forward reference
+
+%D \macros
+%D {obeyedspace, obeyedtab, obeyedline, obeyedpage}
+%D
+%D We have followed Knuth in naming macros that make \SPACE, \NEWLINE\ and \NEWPAGE\
+%D active and assigning them \type {\obeysomething}, but first we set some default
+%D values.
+%D
+%D These are expandable:
+
+\permanent\def\obeyedspace{\space}
+\permanent\def\obeyedtab {\obeyedspace}
+\permanent\def\obeyedline {\par}
+\permanent\def\obeyedpage {\page_otr_fill_and_eject_page}
+
+%D \macros
+%D {controlspace,setcontrolspaces}
+%D
+%D First we define \type {\obeyspaces}. When we want visible spaces (control spaces)
+%D we only have to adapt the definition of \type {\obeyedspace} to:
+
+\immutable\chardef\asciispacechar\spaceasciicode % a real space character
+
+\permanent\protected\def\naturalspace{\asciispacechar}
+\permanent\protected\def\controlspace{\hbox{\asciispacechar}} % rather tex, we need the unicode value
+\permanent\protected\def\normalspaces{\catcode\spaceasciicode\spacecatcode}
+
+% \bgroup
+% \catcode\spaceasciicode\activecatcode
+% \protected\gdef\obeyspaces {\catcode\spaceasciicode\activecatcode\def {\obeyedspace }}
+% \protected\gdef\setcontrolspaces{\catcode\spaceasciicode\activecatcode\def {\controlspace}}
+% \egroup
+
+%permanent\protected\def\obeyspaces {\catcode\spaceasciicode\activecatcode\letcharcode\spaceasciicode\obeyedspace }
+%permanent\protected\def\setcontrolspaces{\catcode\spaceasciicode\activecatcode\letcharcode\spaceasciicode\controlspace}
+
+%D \macros
+%D {obeytabs, obeylines, obeypages,ignoretabs, ignorelines, ignorepages}
+%D
+%D Next we take care of \NEWLINE\ and \NEWPAGE\ and because we want to be able to
+%D typeset listings that contain \TAB, we have to handle those too. Because we have
+%D to redefine the \NEWPAGE\ character locally, we redefine the meaning of this
+%D (often already) active character.
+
+% \expandafter\def\activeformfeedtoken{\par}
+
+\letcharcode\formfeedasciicode\par
+
+%D The following indirect definitions enable us to implement all kind of \type
+%D {\obeyed} handlers.
+
+% \protected\def\obeytabs {\catcode\tabasciicode \activecatcode\expandafter\def\activetabtoken {\obeyedtab }}
+% \protected\def\obeylines {\catcode\endoflineasciicode\activecatcode\expandafter\def\activeendoflinetoken{\obeyedline}}
+% \protected\def\obeypages {\catcode\formfeedasciicode \activecatcode\expandafter\def\activeformfeedtoken {\obeyedpage}}
+
+% \protected\def\ignoretabs {\catcode\tabasciicode \activecatcode\expandafter\def\activetabtoken {\obeyedspace}}
+% \protected\def\ignorelines{\catcode\endoflineasciicode\activecatcode\expandafter\def\activeendoflinetoken{\obeyedspace}}
+% \protected\def\ignorepages{\catcode\formfeedasciicode \ignorecatcode}
+% \protected\def\ignoreeofs {\catcode\endoffileasciicode\ignorecatcode}
+
+% but ... as we don't want to freeze to \obeyedspace etc which can be set after
+% \obeyspaces, we use an idirectness
+
+\def\syst_obeyed_space{\obeyedspace}
+\def\syst_obeyed_tab {\obeyedtab}
+\def\syst_obeyed_line {\obeyedline}
+\def\syst_obeyed_page {\obeyedpage}
+
+\permanent\protected\def\obeyspaces {\catcode\spaceasciicode \activecatcode\enforced\letcharcode\spaceasciicode \syst_obeyed_space}
+\permanent\protected\def\obeytabs {\catcode\tabasciicode \activecatcode\enforced\letcharcode\tabasciicode \syst_obeyed_tab }
+\permanent\protected\def\obeylines {\catcode\endoflineasciicode\activecatcode\enforced\letcharcode\endoflineasciicode\syst_obeyed_line }
+\permanent\protected\def\obeypages {\catcode\formfeedasciicode \activecatcode\enforced\letcharcode\formfeedasciicode \syst_obeyed_page }
+
+\permanent\protected\def\ignoretabs {\catcode\tabasciicode \activecatcode\enforced\letcharcode\tabasciicode \syst_obeyed_space}
+\permanent\protected\def\ignorelines{\catcode\endoflineasciicode\activecatcode\enforced\letcharcode\endoflineasciicode\syst_obeyed_space}
+\permanent\protected\def\ignorepages{\catcode\formfeedasciicode \ignorecatcode}
+\permanent\protected\def\ignoreeofs {\catcode\endoffileasciicode\ignorecatcode}
+
+\permanent\protected\def\setcontrolspaces{\catcode\spaceasciicode\activecatcode\enforced\letcharcode\spaceasciicode\controlspace}
+
+\endinput \protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/char-enc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/char-enc.mkxl
new file mode 100644
index 00000000000..d0dd3d20a5d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/char-enc.mkxl
@@ -0,0 +1,18 @@
+%D \module
+%D [ file=char-enc,
+%D version=2006.08.20,
+%D title=\CONTEXT\ Character Support,
+%D subtitle=Encodings,
+%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 Character Support / Encodings}
+
+\registerctxluafile{char-enc}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/char-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/char-ini.mkxl
new file mode 100644
index 00000000000..6965598a960
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/char-ini.mkxl
@@ -0,0 +1,126 @@
+%D \module
+%D [ file=char-ini,
+%D version=2006.08.20,
+%D title=\CONTEXT\ Character Support,
+%D subtitle=Initialization,
+%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 Character Support / Initialization}
+
+\registerctxluafile{char-fio}{}
+\registerctxluafile{char-map}{} % maybe we will load this someplace else
+\registerctxluafile{char-tex}{autosuffix}
+\registerctxluafile{char-ent}{}
+
+\unprotect
+
+% ¨äëïöüÿ
+% ´áćéíĺńóŕśúýź
+% ˙ċėġiż
+% ¯ÄÄ“Ä«ÅÅ«
+% Ëőű
+% ˆâĉêÄĥîĵôÅûŵŷ
+% `àèìòùỳ
+% ¸çķļņŗşţ
+% ˛ąęįų
+% ˚åů
+% ˘ăĕğĭÅÅ­
+% ˇÄÄěľňřšťž
+% ˜ãĩñõũ
+
+% \def\checkedchar#1% #2%
+% {\relax\iffontchar\font#1 \expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi{\char#1}}
+%
+% impossible in math mode so there always fallback (till we have gyre):
+%
+% use \normalUchar when possible .. the next one is nice for documents and it also accepts
+% 0x prefixed numbers
+
+\permanent\def\utfchar #1{\clf_utfchar {#1}} % todo: define public at lua end
+\permanent\def\safechar#1{\clf_safechar{#1}} % todo: define public at lua end
+
+\permanent\protected\def\Ux #1{\Uchar\numexpr"#1\relax} % used in xml (sometimes overloaded)
+\permanent \def\eUx#1{\Uchar\numexpr"#1\relax} % used in xml (sometimes overloaded)
+
+\permanent\def\expandUx{\enforced\let\Ux\eUx}
+
+\permanent \def\checkedchar {\relax\ifmmode\expandafter\checkedmathchar\else\expandafter\checkedtextchar\fi} % #1#2
+\permanent \def\checkedmathchar#1#2{#2}
+\permanent\protected\def\checkedtextchar #1{\clf_doifelsecharinfont\numexpr#1\relax{\char#1}} % {#2}
+
+\newconditional\prefermathovertextchar
+
+\permanent\protected\def\textormathchar#1%
+ {\begingroup
+ \scratchcounter#1\relax
+ \ifmmode
+ \char\scratchcounter
+ \else
+ \ifconditional\prefermathovertextchar
+ % dirty trick .. maybe let this adapt to bf too ?
+ \setfontid\fontid\textfont\c_font_fam_mr
+ \fi
+ \iffontchar\font\scratchcounter
+ \char\scratchcounter
+ \else
+ \normalstartimath\char\scratchcounter\normalstopimath
+ \fi
+ \fi
+ \endgroup}
+
+\permanent\protected\def\textormathchars#1%
+ {{\font_text_or_mathchars#1\relax}}
+
+\protected\def\font_text_or_mathchars#1#2\relax
+ {\relax\ifmmode
+ #1#2%
+ \orelse\iffontchar\font`#1\relax
+ #1#2\relax
+ \else
+ \normalstartimath#1#2\normalstopimath
+ \fi}
+
+%D The codes are stored in the format, so we don't need to reinitialize them (unless
+%D of course we have adapted the table). It is on the agenda to do this with \type
+%D {tex.lccode} cum suis once they're available.
+
+% Is setting up vrb tpa and tpb needed?
+
+% move to lua side
+
+\clf_setlettercatcodes\texcatcodes
+\clf_setlettercatcodes\ctxcatcodes
+\clf_setlettercatcodes\notcatcodes
+%clf_setlettercatcodes\mthcatcodes
+\clf_setlettercatcodes\vrbcatcodes % hm ... we need to hyphemate
+\clf_setlettercatcodes\prtcatcodes
+\clf_setlettercatcodes\tpacatcodes % hm
+\clf_setlettercatcodes\tpbcatcodes % hm
+\clf_setlettercatcodes\txtcatcodes
+
+\clf_setothercatcodes \rlncatcodes
+
+\clf_setactivecatcodes\ctxcatcodes
+\clf_setactivecatcodes\notcatcodes
+\clf_setactivecatcodes\prtcatcodes
+
+\clf_setcharacternames\ctxcatcodes
+
+\permanent\def\chardescription#1{\clf_chardescription#1\relax}
+
+% experiment (watch out: this is global and very font dependent when used with
+% casing mechanisms)
+%
+% \overloaduppercase{0xDF}{0x1E9E}}
+% \overloaduppercase{0xDF}{0x53,0x53}
+
+\permanent\protected\def\overloaduppercase{\clf_overloaduppercase} % todo: define public at lua end
+\permanent\protected\def\overloadlowercase{\clf_overloadlowercase} % todo: define public at lua end
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt b/Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt
new file mode 100644
index 00000000000..3d8f6a2598e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/char-tex.lmt
@@ -0,0 +1,994 @@
+if not modules then modules = { } end modules ['char-tex'] = {
+ version = 1.001,
+ comment = "companion to char-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local lpeg = lpeg
+local tonumber, next, type = tonumber, next, type
+local format, find, gmatch, match, gsub = string.format, string.find, string.gmatch, string.match, string.gsub
+local utfchar, utfbyte = utf.char, utf.byte
+local concat, tohash = table.concat, table.tohash
+local P, C, R, S, V, Cs, Cc = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.V, lpeg.Cs, lpeg.Cc
+
+local lpegpatterns = lpeg.patterns
+local lpegmatch = lpeg.match
+local utfchartabletopattern = lpeg.utfchartabletopattern
+
+local allocate = utilities.storage.allocate
+local mark = utilities.storage.mark
+
+local context = context
+local commands = commands
+
+local characters = characters
+local texcharacters = { }
+characters.tex = texcharacters
+local utffilters = characters.filters.utf
+
+local allocate = utilities.storage.allocate or function() return { } end
+local mark = utilities.storage.mark or allocate
+
+local is_character = characters.is_character
+local is_letter = characters.is_letter
+local is_command = characters.is_command
+local is_spacing = characters.is_spacing
+local is_mark = characters.is_mark
+local is_punctuation = characters.is_punctuation
+
+local data = characters.data if not data then return end
+local blocks = characters.blocks
+
+local trace_defining = false trackers.register("characters.defining", function(v) characters_defining = v end)
+
+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>
+
+<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()
+local special = "~#$%^&_{}\\|" -- "~#$%{}\\|"
+
+local private = {
+ low = low,
+ high = high,
+ escapes = escapes,
+}
+
+utffilters.private = private
+
+for ch in gmatch(special,".") do
+ local cb
+ if type(ch) == "number" then
+ cb, ch = ch, utfchar(ch)
+ else
+ cb = utfbyte(ch)
+ end
+ if cb < 256 then
+ escapes[ch] = "\\" .. ch
+ low[ch] = utfchar(0x0F0000 + cb)
+ if ch == "%" then
+ ch = "%%" -- nasty, but we need this as in replacements (also in lpeg) % is interpreted
+ end
+ high[utfchar(0x0F0000 + cb)] = ch
+ end
+end
+
+local tohigh = lpeg.replacer(low) -- frozen, only for basic tex
+local tolow = lpeg.replacer(high) -- frozen, only for basic tex
+
+lpegpatterns.utftohigh = tohigh
+lpegpatterns.utftolow = tolow
+
+function utffilters.harden(str)
+ return lpegmatch(tohigh,str)
+end
+
+function utffilters.soften(str)
+ return lpegmatch(tolow,str)
+end
+
+private.escape = utf.remapper(escapes) -- maybe: ,"dynamic"
+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 = "ä",
+ E = "Ë", e = "ë",
+ I = "Ã", i = "ï", ["ı"] = "ï", ["\\i"] = "ï",
+ O = "Ö", o = "ö",
+ U = "Ü", u = "ü",
+ Y = "Ÿ", y = "ÿ",
+ },
+ ["'"] = { [""] = "´",
+ A = "Ã", a = "á",
+ C = "Ć", c = "ć",
+ E = "É", e = "é",
+ I = "Ã", i = "í", ["ı"] = "í", ["\\i"] = "í",
+ L = "Ĺ", l = "ĺ",
+ N = "Ń", n = "ń",
+ O = "Ó", o = "ó",
+ R = "Å”", r = "Å•",
+ S = "Åš", s = "Å›",
+ U = "Ú", u = "ú",
+ Y = "Ã", y = "ý",
+ Z = "Ź", z = "ź",
+ },
+ ["."] = { [""] = "Ë™",
+ C = "ÄŠ", c = "Ä‹",
+ E = "Ä–", e = "Ä—",
+ G = "Ä ", g = "Ä¡",
+ I = "İ", i = "i", ["ı"] = "i", ["\\i"] = "i",
+ Z = "Ż", z = "ż",
+ },
+ ["="] = { [""] = "¯",
+ A = "Ä€", a = "Ä",
+ E = "Ä’", e = "Ä“",
+ I = "Ī", i = "ī", ["ı"] = "ī", ["\\i"] = "ī",
+ O = "ÅŒ", o = "Å",
+ U = "Ū", u = "ū",
+ },
+ ["H"] = { [""] = "Ë",
+ O = "Å", o = "Å‘",
+ U = "Ű", u = "ű",
+ },
+ ["^"] = { [""] = "ˆ",
+ A = "Â", a = "â",
+ C = "Ĉ", c = "ĉ",
+ E = "Ê", e = "ê",
+ G = "Äœ", g = "Ä",
+ H = "Ĥ", h = "ĥ",
+ I = "Î", i = "î", ["ı"] = "î", ["\\i"] = "î",
+ J = "Ĵ", j = "ĵ",
+ O = "Ô", o = "ô",
+ S = "Åœ", s = "Å",
+ U = "Û", u = "û",
+ W = "Ŵ", w = "ŵ",
+ Y = "Ŷ", y = "ŷ",
+ },
+ ["`"] = { [""] = "`",
+ A = "À", a = "à",
+ E = "È", e = "è",
+ I = "Ì", i = "ì", ["ı"] = "ì", ["\\i"] = "ì",
+ O = "Ò", o = "ò",
+ U = "Ù", u = "ù",
+ Y = "Ỳ", y = "ỳ",
+ },
+ ["c"] = { [""] = "¸",
+ C = "Ç", c = "ç",
+ K = "Ķ", k = "ķ",
+ L = "Ļ", l = "ļ",
+ N = "Ņ", n = "ņ",
+ R = "Å–", r = "Å—",
+ S = "Åž", s = "ÅŸ",
+ T = "Å¢", t = "Å£",
+ },
+ ["k"] = { [""] = "Ë›",
+ A = "Ä„", a = "Ä…",
+ E = "Ę", e = "ę",
+ I = "Į", i = "į",
+ U = "Ų", u = "ų",
+ },
+ ["r"] = { [""] = "Ëš",
+ A = "Ã…", a = "Ã¥",
+ U = "Ů", u = "ů",
+ },
+ ["u"] = { [""] = "˘",
+ A = "Ă", a = "ă",
+ E = "Ä”", e = "Ä•",
+ G = "Äž", g = "ÄŸ",
+ I = "Ĭ", i = "ĭ", ["ı"] = "ĭ", ["\\i"] = "ĭ",
+ O = "ÅŽ", o = "Å",
+ U = "Ŭ", u = "ŭ",
+ },
+ ["v"] = { [""] = "ˇ",
+ C = "ÄŒ", c = "Ä",
+ D = "ÄŽ", d = "Ä",
+ E = "Äš", e = "Ä›",
+ L = "Ľ", l = "ľ",
+ N = "Ň", n = "ň",
+ R = "Ř", r = "ř",
+ S = "Å ", s = "Å¡",
+ T = "Ť", t = "ť",
+ Z = "Ž", z = "ž",
+ },
+ ["~"] = { [""] = "˜",
+ A = "Ã", a = "ã",
+ I = "Ĩ", i = "ĩ", ["ı"] = "ĩ", ["\\i"] = "ĩ",
+ N = "Ñ", n = "ñ",
+ O = "Õ", o = "õ",
+ U = "Ũ", u = "ũ",
+ },
+}
+
+texcharacters.accentmapping = accentmapping
+
+local accent_map = allocate { -- incomplete
+ ['~'] = "̃" , -- ̃ Ẽ
+ ['"'] = "̈" , -- ̈ Ë
+ ["`"] = "̀" , -- ̀ È
+ ["'"] = "Ì" , -- Ì Ã‰
+ ["^"] = "̂" , -- ̂ Ê
+ -- Ì„ Ä’
+ -- ̆ Ĕ
+ -- ̇ Ė
+ -- ̉ Ẻ
+ -- ̌ Ě
+ -- Ì È„
+ -- ̑ Ȇ
+ -- ̣ Ẹ
+ -- ̧ Ȩ
+ -- ̨ Ę
+ -- ̭ Ḙ
+ -- ̰ Ḛ
+}
+
+-- local accents = concat(table.keys(accentmapping)) -- was _map
+
+local function remap_accent(a,c,braced)
+ local m = accentmapping[a]
+ if m then
+ local n = m[c]
+ if n then
+ return n
+ end
+ end
+-- local m = accent_map[a]
+-- if m then
+-- return c .. m
+-- elseif braced then -- or #c > 0
+ if braced then -- or #c > 0
+ return "\\" .. a .. "{" .. c .. "}"
+ else
+ return "\\" .. a .. " " .. c
+ end
+end
+
+local commandmapping = allocate {
+ ["aa"] = "Ã¥", ["AA"] = "â„«",
+ ["ae"] = "æ", ["AE"] = "Æ",
+ ["cc"] = "ç", ["CC"] = "Ç",
+ ["i"] = "ı", ["j"] = "ȷ",
+ ["ij"] = "ij", ["IJ"] = "IJ",
+ ["l"] = "Å‚", ["L"] = "Å",
+ ["o"] = "ø", ["O"] = "Ø",
+ ["oe"] = "Å“", ["OE"] = "Å’",
+ ["sz"] = "ß", ["SZ"] = "SZ", ["ss"] = "ß", ["SS"] = "ß", -- uppercase: ẞ
+}
+
+texcharacters.commandmapping = commandmapping
+
+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:
+
+local untex, pattern
+
+local function toutfpattern()
+ if not untex then
+ local hash = { }
+ for k, v in next, accentmapping do
+ for kk, vv in next, v do
+ if (k >= "a" and k <= "z") or (k >= "A" and k <= "Z") then
+ hash[ "\\"..k.." "..kk ] = vv
+ hash["{\\"..k.." "..kk.."}"] = vv
+ else
+ hash["\\" ..k ..kk ] = vv
+ hash["{\\"..k ..kk.."}"] = vv
+ end
+ hash["\\" ..k.."{"..kk.."}" ] = vv
+ hash["{\\"..k.."{"..kk.."}}"] = vv
+ end
+ end
+ for k, v in next, commandmapping do
+ hash["\\"..k.." "] = v
+ hash["{\\"..k.."}"] = v
+ hash["{\\"..k.." }"] = v
+ end
+ for k, v in next, ligaturemapping do
+ hash[k] = v
+ end
+ untex = utfchartabletopattern(hash) / hash
+ end
+ return untex
+end
+
+local function prepare()
+ pattern = Cs((toutfpattern() + P(1))^0)
+ return pattern
+end
+
+local function textoutf(str,strip)
+ if str == "" then
+ return str
+ elseif not find(str,"\\",1,true) then
+ return str
+ -- elseif strip then
+ else
+ return lpegmatch(pattern or prepare(),str)
+ end
+end
+
+texcharacters.toutfpattern = toutfpattern
+texcharacters.toutf = textoutf
+
+-- print(texcharacters.toutf([[\~{Z}]],true))
+-- print(texcharacters.toutf([[\'\i]],true))
+-- print(texcharacters.toutf([[\'{\i}]],true))
+-- print(texcharacters.toutf([[\"{e}]],true))
+-- print(texcharacters.toutf([[\" {e}]],true))
+-- print(texcharacters.toutf([[{\"{e}}]],true))
+-- print(texcharacters.toutf([[{\" {e}}]],true))
+-- print(texcharacters.toutf([[{\l}]],true))
+-- print(texcharacters.toutf([[{\l }]],true))
+-- print(texcharacters.toutf([[\v{r}]],true))
+-- print(texcharacters.toutf([[fo{\"o}{\ss}ar]],true))
+-- print(texcharacters.toutf([[H{\'a}n Th\^e\llap{\raise 0.5ex\hbox{\'{\relax}}} Th{\'a}nh]],true))
+
+-- Next the ones without backslash
+
+local untex, pattern
+
+local function toutfpattern()
+ if not untex then
+ local hash = { }
+ for k, v in next, accentmapping do
+ for kk, vv in next, v do
+ hash[k..kk] = vv
+ end
+ end
+ for k, v in next, commandmapping do
+ hash[k] = v
+ end
+ for k, v in next, ligaturemapping do
+ hash[k] = v
+ end
+ untex = utfchartabletopattern(hash) / hash
+ end
+ return untex
+end
+
+local function prepare()
+ pattern = Cs((toutfpattern() + P(1))^0)
+ return pattern
+end
+
+local function textoutf(str)
+ return lpegmatch(pattern or prepare(),str)
+end
+
+texcharacters.strtoutfpattern = toutfpattern
+texcharacters.strtextoutf = textoutf
+
+local collapse = utffilters.collapse
+local combine = utffilters.combine
+
+if not interfaces then return end
+
+local implement = interfaces.implement
+
+local pattern
+
+local verbosemarks = characters.verbosemarks
+
+if verbosemarks then
+
+ mark(verbosemarks)
+
+else
+
+ verbosemarks = allocate {
+ ["stroke"] = utfchar(0x02F), ["slash"] = utfchar(0x02F),
+ ["middle dot"] = utfchar(0x0B7),
+
+ ["grave"] = utfchar(0x300),
+ ["acute"] = utfchar(0x301),
+ ["circumflex"] = utfchar(0x302),
+ ["tilde"] = utfchar(0x303),
+ ["macron"] = utfchar(0x304), ["line"] = utfchar(0x304),
+ ["overline"] = utfchar(0x305),
+ ["breve"] = utfchar(0x306),
+ ["dot"] = utfchar(0x307),
+ ["dieresis"] = utfchar(0x308), ["diaeresis"] = utfchar(0x308),
+ ["hook"] = utfchar(0x309),
+ ["ring"] = utfchar(0x30A),
+ ["double acute"] = utfchar(0x30B), ["hungarumlaut"] = utfchar(0x30B), -- tex speak
+ ["caron"] = utfchar(0x30C),
+ ["vertical line"] = utfchar(0x30D),
+ ["double vertical line"] = utfchar(0x30E),
+ ["double grave"] = utfchar(0x30F),
+ ["inverted breve"] = utfchar(0x311),
+ ["dot below"] = utfchar(0x323),
+ ["ring below"] = utfchar(0x325),
+ ["cedilla"] = utfchar(0x327), ["comma below"] = utfchar(0x327),
+ ["ogonek"] = utfchar(0x328),
+ ["caron below"] = utfchar(0x32C),
+ ["circumflex below"] = utfchar(0x32D),
+ ["tilde below"] = utfchar(0x330),
+ ["macron below"] = utfchar(0x331), ["line below"] = utfchar(0x331),
+
+ ["hook below"] = utfchar(0x1FA9D),
+ }
+
+ characters.verbosemarks = verbosemarks
+
+ if storage then
+ storage.register("characters/verbosemarks", verbosemarks, "characters.verbosemarks")
+ end
+
+end
+
+local function prepare()
+ pattern = Cs((utfchartabletopattern(verbosemarks) / verbosemarks + lpegpatterns.space/"" + lpegpatterns.utf8character)^0)
+ return pattern
+end
+
+local hash = table.setmetatableindex(function(t,k)
+ local f = ""
+ k = lpegmatch(pattern or prepare(),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 = "\\"
+ goto DONE
+ end
+ v = textoutf(k) or k
+-- print("utf",k,v)
+ if k ~= v then
+ f = "\\"
+ goto DONE
+ end
+ ::DONE::
+ report_defining("instead of old school '%s%s' you can input the utf sequence %s",f,k,v)
+ t[k] = v
+ return v
+end)
+
+implement {
+ name = "chr",
+ arguments = "argument",
+ public = true,
+ actions = function(str)
+ context(hash[str]) -- expandable
+ end
+}
+
+function texcharacters.safechar(n) -- was characters.safechar
+ local c = data[n]
+ if c and c.contextname then
+ return "\\" .. c.contextname
+ else
+ return utfchar(n)
+ end
+end
+
+if not context or not commands then
+ -- used in e.g. mtx-bibtex
+ return
+end
+
+-- all kind of initializations
+
+local tex = tex
+local texsetlccode = tex.setlccode
+local texsetsfcode = tex.setsfcode
+local texsetcatcode = tex.setcatcode
+
+local contextsprint = context.sprint
+local ctxcatcodes = catcodes.numbers.ctxcatcodes
+
+local texsetmacro = tokens.setters.macro
+local texsetchar = tokens.setters.char
+
+-- function texcharacters.defineaccents()
+-- local ctx_dodefineaccentcommand = context.dodefineaccent
+-- local ctx_dodefineaccent = context.dodefineaccent
+-- local ctx_dodefinecommand = context.dodefinecommand
+-- for accent, group in next, accentmapping do
+-- ctx_dodefineaccentcommand(accent)
+-- for character, mapping in next, group do
+-- ctx_dodefineaccent(accent,character,mapping)
+-- end
+-- end
+-- for command, mapping in next, commandmapping do
+-- ctx_dodefinecommand(command,mapping)
+-- end
+-- os.exit()
+-- end
+
+function texcharacters.defineaccents()
+ local ctx_dodefinecombine = context.dodefinecombine
+ local ctx_dodefinecommand = context.dodefinecommand
+ for verbose, mark in next, verbosemarks do
+ ctx_dodefinecombine((gsub(verbose," ","")),mark)
+ end
+ for command, mapping in next, commandmapping do
+ ctx_dodefinecommand(command,mapping)
+ end
+end
+
+implement { -- a waste of scanner but consistent
+ name = "defineaccents",
+ 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]]--
+
+local function to_number(s)
+ local n = tonumber(s)
+ if n then
+ return n
+ end
+ return tonumber(match(s,'^"(.*)$'),16) or 0
+end
+
+implement {
+ name = "utfchar",
+ actions = { to_number, utfchar, contextsprint },
+ arguments = "string"
+}
+
+implement {
+ name = "safechar",
+ actions = { to_number, texcharacters.safechar, contextsprint },
+ arguments = "string"
+}
+
+implement {
+ name = "uchar",
+ arguments = { "integer", "integer" },
+ actions = function(h,l)
+ context(utfchar(h*256+l))
+ end
+}
+
+tex.uprint = commands.utfchar
+
+-- in contect we don't use lc and uc codes (in fact in luatex we should have a hf code)
+-- so at some point we might drop this
+
+-- The following get set at the TeX end:
+
+local forbidden = tohash {
+ 0x000A0, -- zs nobreakspace <self>
+ 0x000AD, -- cf softhyphen <self>
+ -- 0x00600, -- cf arabicnumber <self>
+ -- 0x00601, -- cf arabicsanah <self>
+ -- 0x00602, -- cf arabicfootnotemarker <self>
+ -- 0x00603, -- cf arabicsafha <self>
+ -- 0x00604, -- cf arabicsamvat <self>
+ -- 0x00605, -- cf arabicnumberabove <self>
+ -- 0x0061C, -- cf arabiclettermark <self>
+ -- 0x006DD, -- cf arabicendofayah <self>
+ -- 0x008E2, -- cf arabicdisputedendofayah <self>
+ 0x02000, -- zs enquad <self>
+ 0x02001, -- zs emquad <self>
+ 0x02002, -- zs enspace \kern .5\emwidth
+ 0x02003, -- zs emspace \hskip \emwidth
+ 0x02004, -- zs threeperemspace <self>
+ 0x02005, -- zs fourperemspace <self>
+ 0x02006, -- zs sixperemspace <self>
+ 0x02007, -- zs figurespace <self>
+ 0x02008, -- zs punctuationspace <self>
+ 0x02009, -- zs breakablethinspace <self>
+ 0x0200A, -- zs hairspace <self>
+ 0x0200B, -- cf zerowidthspace <self>
+ 0x0200C, -- cf zwnj <self>
+ 0x0200D, -- cf zwj <self>
+ 0x0202F, -- zs narrownobreakspace <self>
+ 0x0205F, -- zs medspace \textormathspace +\medmuskip 2
+ -- 0x03000, -- zs ideographicspace <self>
+ -- 0x0FEFF, -- cf zerowidthnobreakspace \penalty \plustenthousand \kern \zeropoint
+}
+
+local csletters = characters.csletters -- also a signal that we have initialized
+local activated = { }
+local sfmode = "unset" -- unset, traditional, normal
+local block_too = false
+
+directives.register("characters.blockstoo",function(v) block_too = v end)
+
+-- If this is something that is not documentwide and used a lot, then we
+-- need a more clever approach (trivial but not now).
+
+local function setuppersfcodes(v,n)
+ if sfstate ~= "unset" then
+ report_defining("setting uppercase sf codes to %a",n)
+ for u, chr in next, data do
+ if chr.category == "lu" then
+ texsetsfcode(u,n)
+ end
+ end
+ end
+ sfstate = v
+end
+
+directives.register("characters.spaceafteruppercase",function(v)
+ if v == "traditional" then
+ setuppersfcodes(v,999)
+ elseif v == "normal" then
+ setuppersfcodes(v,1000)
+ end
+end)
+
+if not csletters then
+
+ csletters = allocate()
+ characters.csletters = csletters
+
+ report_defining("setting up character related codes and commands")
+
+ if sfstate == "unset" then
+ sfstate = "traditional"
+ end
+
+ local traditional = sfstate == "traditional"
+
+ for u, chr in next, data do -- will move up
+ local contextname = chr.contextname
+ local category = chr.category
+ local isletter = is_letter[category]
+ if contextname then
+ if is_character[category] then
+ if chr.unicodeslot < 128 then
+ if isletter then
+ local c = utfchar(u)
+ csletters[c] = u
+ end
+ else
+ local c = utfchar(u)
+ if isletter and u >= 32 and u <= 65536 then
+ csletters[c] = u
+ end
+ end
+ if isletter then
+ local lc = chr.lccode
+ local uc = chr.uccode
+ if not lc then
+ chr.lccode = u
+ lc = u
+ elseif type(lc) == "table" then
+ lc = u
+ end
+ if not uc then
+ chr.uccode = u
+ uc = u
+ elseif type(uc) == "table" then
+ uc = u
+ end
+ texsetlccode(u,lc,uc)
+ if traditional and category == "lu" then
+ texsetsfcode(code,999)
+ end
+ end
+ elseif is_command[category] and not forbidden[u] then
+ -- skip
+ elseif is_mark[category] then
+ texsetlccode(u,u,u) -- for hyphenation
+ end
+ elseif isletter then
+ csletters[utfchar(u)] = u
+ local lc, uc = chr.lccode, chr.uccode
+ if not lc then
+ chr.lccode = u
+ lc = u
+ elseif type(lc) == "table" then
+ lc = u
+ end
+ if not uc then
+ chr.uccode = u
+ uc = u
+ elseif type(uc) == "table" then
+ uc = u
+ end
+ texsetlccode(u,lc,uc)
+ if traditional and category == "lu" then
+ texsetsfcode(code,999)
+ end
+ elseif is_mark[category] then
+ texsetlccode(u,u,u) -- for hyphenation
+ end
+ end
+
+ if blocks_too then
+ -- this slows down format generation by over 10 percent
+ for k, v in next, blocks do
+ if v.catcode == "letter" then
+ local first = v.first
+ local last = v.last
+ local gaps = v.gaps
+ if first and last then
+ for u=first,last do
+ csletters[utfchar(u)] = u
+ --
+ -- texsetlccode(u,u,u) -- self self
+ --
+ end
+ end
+ if gaps then
+ for i=1,#gaps do
+ local u = gaps[i]
+ csletters[utfchar(u)] = u
+ --
+ -- texsetlccode(u,u,u) -- self self
+ --
+ end
+ end
+ end
+ end
+ end
+
+ if storage then
+ storage.register("characters/csletters", csletters, "characters.csletters")
+ end
+
+ function characters.setcharacternames(ctt)
+ for u, chr in next, data do -- will move up
+ local contextname = chr.contextname
+ local category = chr.category
+ local isletter = is_letter[category]
+ if contextname then
+ if is_character[category] then
+ if chr.unicodeslot < 128 then
+ if isletter then
+ texsetmacro(contextname,utfchar(u),"immutable")
+ else
+ texsetchar(contextname,u,"immutable")
+ end
+ else
+ texsetmacro(contextname,utfchar(u),"immutable")
+ end
+ elseif is_command[category] and not forbidden[u] then
+ texsetmacro(contextname,utfchar(u),"immutable")
+ end
+ end
+ end
+ end
+
+else
+ mark(csletters)
+end
+
+lpegpatterns.csletter = utfchartabletopattern(csletters)
+
+-- The engine presets the letters to 11 (always).
+
+function characters.setlettercatcodes(cct)
+ if trace_defining then
+ report_defining("assigning letter catcodes to catcode table %a",cct)
+ end
+ local saved = tex.catcodetable
+ tex.catcodetable = cct
+ texsetcatcode(0x200C,11) -- non-joiner
+ texsetcatcode(0x200D,11) -- joiner
+ for c, u in next, csletters do
+ texsetcatcode(u,11)
+ end
+ tex.catcodetable = saved
+end
+
+function characters.setothercatcodes(cct)
+ if trace_defining then
+ report_defining("assigning other catcodes to catcode table %a",cct)
+ end
+ local saved = tex.catcodetable
+ tex.catcodetable = cct
+ for u=65,90 do
+ texsetcatcode(u,12)
+ end
+ for u=97,122 do
+ texsetcatcode(u,12)
+ end
+ tex.catcodetable = saved
+end
+
+function characters.setactivecatcodes(cct)
+ local saved = tex.catcodetable
+ tex.catcodetable = cct
+ for i=1,#activated do
+ local u = activated[i]
+ texsetcatcode(u,13)
+ if trace_defining then
+ report_defining("character %U (%s) is active in set %a",u,data[u].description,cct)
+ end
+ end
+ 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",
+ actions = function(slot)
+ local d = data[slot]
+ if d then
+ context(d.description)
+ end
+ end,
+}
+
+if characters.setcharacternames then -- only in ini mode
+
+ implement { name = "setlettercatcodes", scope = "private", actions = characters.setlettercatcodes, arguments = "integer" }
+ implement { name = "setothercatcodes", scope = "private", actions = characters.setothercatcodes, arguments = "integer" }
+ implement { name = "setactivecatcodes", scope = "private", actions = characters.setactivecatcodes, arguments = "integer" }
+ implement { name = "setcharacternames", scope = "private", actions = characters.setcharacternames, arguments = "integer" }
+
+end
+
+-- experiment (some can move to char-ini.lua)
+
+local function overload(c,u,code,codes)
+ local c = tonumber(c)
+ if not c then
+ return
+ end
+ local u = utilities.parsers.settings_to_array(u)
+ local n = #u
+ if n == 0 then
+ return
+ end
+ local t = nil
+ if n == 1 then
+ t = tonumber(u[1])
+ else
+ t = { }
+ for i=1,n do
+ t[#t+1] = tonumber(u[i])
+ end
+ end
+ if t then
+ data[c][code] = t
+ characters[codes][c] = nil
+ end
+end
+
+implement {
+ name = "overloaduppercase",
+ arguments = "2 strings",
+ actions = function(c,u)
+ overload(c,u,"uccode","uccodes")
+ end
+}
+
+implement {
+ name = "overloadlowercase",
+ arguments = "2 strings",
+ actions = function(c,u)
+ overload(c,u,"lccode","lccodes")
+ end
+}
+
+-- Just for fun we support keywords:
+--
+-- \startTEXpage[offset=10pt]
+-- abg"
+-- \sl \showboxes
+-- \accent `" h%
+-- \accent `" x%
+-- \accent yoffset .2ex `" x
+-- \accent yoffset 1.1ex `x x%
+-- \stopTEXpage
+--
+-- We could do this:
+--
+-- \startTEXpage[offset=10pt]
+-- abg"
+-- \sl \showboxes
+-- \withaccent `" h%
+-- \withaccent `" x%
+-- \withaccent yoffset .2ex `" x
+-- \withaccent yoffset 1.1ex accent `x base `x%
+-- \stopTEXpage
+--
+-- But only when users demand it:
+--
+-- do
+--
+-- local new_glyph = nodes.pool.glyph
+--
+-- local scankeyword = tokens.scanners.keyword
+-- local scaninteger = tokens.scanners.integer
+-- local scandimension = tokens.scanners.dimension
+-- local scantoken = tokens.scanners.token
+--
+-- implement {
+-- name = "withaccent",
+-- public = true,
+-- protected = true,
+-- actions = function()
+-- local xoffset = 0
+-- local yoffset = 0
+-- local accent = false
+-- local base = false
+-- local zwj = 0x200D
+-- while true do
+-- if scankeyword("xoffset") then
+-- xoffset = scandimension()
+-- elseif scankeyword("yoffset") then
+-- yoffset = scandimension()
+-- elseif scankeyword("accent") then
+-- accent = scaninteger()
+-- elseif scankeyword("base") then
+-- base = scaninteger()
+-- else
+-- break
+-- end
+-- end
+-- if not accent then
+-- accent = scaninteger()
+-- end
+-- if not base then
+-- local nxttok = scantoken()
+-- base = nxttok.cmdname == "char_number" and scaninteger() or nxttok.index
+-- end
+-- if base and accent and base > 0 and accent > 0 then
+-- base = new_glyph(true,base)
+-- zwj = new_glyph(true,zwj)
+-- accent = new_glyph(true,accent)
+-- local slant = fonts.hashes.parameters[true].slant / 65536 -- a la tex
+-- local xheight = fonts.hashes.parameters[true].xheight -- hm, compensated for glyphscale?
+-- accent.xoffset = xoffset - .5*(base.width -accent.width) + .5*(base.height-accent.height) * slant
+-- accent.yoffset = yoffset - (xheight - accent.height)
+-- accent.left = accent.width
+-- accent.options = accent.options | 0x40 | 0x80
+-- context.dontleavehmode()
+-- context(base)
+-- context(zwj)
+-- context(accent)
+-- end
+-- end,
+-- }
+--
+-- end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/char-utf.mkxl b/Master/texmf-dist/tex/context/base/mkxl/char-utf.mkxl
new file mode 100644
index 00000000000..a7cbab34522
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/char-utf.mkxl
@@ -0,0 +1,44 @@
+%D \module
+%D [ file=char-utf,
+%D version=2006.12.05,
+%D title=\CONTEXT\ Character Support,
+%D subtitle=Unicode UTF,
+%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 Character Support / Unicode UTF}
+
+%D After a bit of experimenting we reached a clean state where \UTF\ 8, 16 and 32
+%D were supported as well as collapsing (combining sequences). Writing the code was
+%D a relaxed experience, not in the last place because it was accompanied by
+%D listening to those nice Vienna Teng cd's (who decided that making music was more
+%D fun than programming, but then, she may not know \TEX\ and \LUA).
+
+\unprotect
+
+\registerctxluafile{char-def}{}
+\registerctxluafile{char-ini}{}
+\registerctxluafile{char-utf}{}
+\registerctxluafile{char-cjk}{}
+
+%D We enable collapsing (combining characters) by default, but since the source
+%D files are rather simple, we postpone the initialization till runtime.
+
+% \appendtoks
+% \clf_enableutf % not needed when we create a format so we do it now
+% \to \everyjob
+
+%D The next one influences input parsing.
+%D
+%D \starttyping
+%D \definecomposedutf 318 108 126 % lcaron
+%D \stoptyping
+
+\permanent\protected\def\definecomposedutf#1 #2 #3 {\clf_addgrapheme{#1}{#2}{#3}}
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/chem-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/chem-ini.mkxl
new file mode 100644
index 00000000000..b88d4d8346e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/chem-ini.mkxl
@@ -0,0 +1,53 @@
+%D \module
+%D [ file=chem-ini,
+%D version=2008.03.06,
+%D subtitle=Chemistry,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: \mathscriptsmode
+
+\writestatus{loading}{ConTeXt Chemistry Macros / Initialization} % might become Inline
+
+\registerctxluafile{chem-ini}{}
+
+\unprotect
+
+% todo: use \mathscriptsmode if needed
+
+%D \macros
+%D {molecule}
+%D
+%D Quick and dirty:
+%D
+%D \starttyping
+%D \permanent\protected\def\molecule#1%
+%D {$\enablesupersub\tf#1$}
+%D \stoptyping
+%D
+%D Using \LUA:
+%D
+%D \startbuffer
+%D \molecule{H_2SO_4^-2}
+%D \molecule{H_2SO_4^{-2}}
+%D \molecule{H_2SO_4^{-2{x}}}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\permanent\protected\def\molecule#1% todo: can become a public implementor
+ {\clf_molecule{#1}}
+
+%D For old times sake:
+
+\permanent\protected\def\chem#1#2#3%
+ {\dontleavehmode\begingroup#1\lohi{#2}{#3}\endgroup}
+
+\protect \endinput
+
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/chem-str.mkxl b/Master/texmf-dist/tex/context/base/mkxl/chem-str.mkxl
new file mode 100644
index 00000000000..6c591225e33
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/chem-str.mkxl
@@ -0,0 +1,751 @@
+%D \module
+%D [ file=chem-ini,
+%D version=2009.05.13,
+%D subtitle=Chemistry,
+%D author=Hans Hagen \& Alan Braslau,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The original \PPCHTEX\ code was written in pure \TEX\, although later we made
+%D the move from \PICTEX\ to \METAPOST\. The current implementation is a mix between
+%D \TEX\, \LUA\ and \METAPOST. Although the first objective is to get a compatible
+%D but better implementation, later versions might provide more,
+
+%D NOT YET LMTX'd
+
+\writestatus{loading}{ConTeXt Chemistry Macros / Structure}
+
+\registerctxluafile{chem-str}{}
+
+% We have a slightly different interface. This is unchanged:
+%
+% \startchemical[axis=on]
+% \chemical[SIX,ROT2,B,R6,SUB1,FIVE,ROT1,B][1]
+% \stopchemical
+%
+% Here we use chemicalformula instead, so no longer a mix:
+%
+% \startchemicalformula
+% \chemical{2H_2}{top}{bottom}
+% \chemical{PLUS}{top}{bottom}
+% \chemical{O_2}{top}{bottom}
+% \chemical{GIVES}{top}{bottom}
+% \chemical{2H_2O}{top}{bottom}
+% \stopchemicalformula
+%
+% \startchemicalformula
+% \chemical{2H_2}
+% \chemical{PLUS}
+% \chemical{O_2}
+% \chemical{GIVES}
+% \chemical{2H_2O}
+% \stopchemicalformula
+%
+% The inline variant has only one argument:
+%
+% \chemical{2H_2,PLUS,O_2,GIVES,2H_2O}
+
+\unprotect
+
+\installcorenamespace{chemical}
+\installcorenamespace{chemicalsymbol}
+\installcorenamespace{chemicalframed}
+\installcorenamespace{chemicalsize}
+
+% \installsimplecommandhandler \??chemical {chemical} \??chemical % no \define...
+\installcommandhandler \??chemical {chemical} \??chemical % no \define...
+
+\aliased\let\setupchemicals \setupchemical
+\aliased\let\definechemicals\definechemical
+
+%D We use a dedicated framed macro instead of inheriting one. This is both
+%D a historical and practical reason (like shared keys with different meaning
+%D that could clash, e.g.\ align).
+
+\defineMPinstance % not really needed as we set in lua
+ [chemistry]
+ [\s!format=metafun,
+ %\s!extensions=\v!yes, % Should we add extensions and initializations?
+ %\s!initializations=\v!yes, % Would this give EmWidth, etc.?
+ \c!method=\s!double]
+
+\startMPdefinitions{chemistry}
+ loadmodule "chem" ;
+\stopMPdefinitions
+
+\defineframed
+ [\??chemicalframed]
+ [\c!align=\v!normal,
+ \c!strut=\v!no]
+
+\mutable\let\currentdefinedchemical\empty
+
+\permanent\protected\def\setupchemicalframed
+ {\setupframed[\??chemicalframed]}
+
+\permanent\protected\tolerant\overloaded\def\definechemical[#1]#:#2% is global (so we don't use the commandhandler)
+ {\startnointerference
+ \edef\currentdefinedchemical{#1}%
+ \enforced\let\chemical\chem_chemical_nested
+ \clf_undefinechemical{#1}%
+ #2% flush
+ \stopnointerference}
+
+\permanent\tolerant\protected\def\chem_chemical_nested[#1]#*[#2]%
+ {\clf_definechemical{\currentdefinedchemical}{#1}{\detokenize{#2}}}
+
+% chemical symbols
+
+\permanent\tolerant\protected\def\definechemicalsymbol[#1]#*[#2]%
+ {\ifarguments\else\defcsname\??chemicalsymbol#1\endcsname{#2}\fi}
+
+\permanent\protected\def\chemicalsymbol[#1]%
+ {\csname\??chemicalsymbol\ifcsname\??chemicalsymbol#1\endcsname#1\else\s!unknown\fi\endcsname}
+
+\definechemicalsymbol[\s!unknown][] % \char"FFFD empty
+
+% size (small medium big)
+
+% \edef\chemicaltoplocation{t}
+% \edef\chemicalbotlocation{b}
+
+\permanent\protected\def\chemicaltext#1%
+ {\mathematics
+ {\usechemicalstyleandcolor\c!style\c!color
+ \strut
+ \ifcase\currentxfontsize\or\scriptstyle\or\scriptscriptstyle\fi
+ #1}}
+
+\setvalue{\??chemicalsize\v!small }{\txx}
+\setvalue{\??chemicalsize\v!medium}{\tx}
+\setvalue{\??chemicalsize\v!big }{}
+
+\newtoks \everychemical
+\newtoks \everystructurechemical
+%newconditional\indisplaychemical
+
+\newtoks \t_chem_every_box
+\newbox \b_chem_result
+\newconditional\c_chem_some_text
+\newdimen \d_chem_width
+\newdimen \d_chem_height
+\newdimen \d_chem_depth
+
+\permanent\tolerant\protected\def\startchemical[#1]#*[#2]%
+ {\ifmmode\vcenter\else\vbox\fi % vpack ?
+ \bgroup
+ \synchronizestrut{\chemicalparameter\c!strut}%
+ \dontcomplain
+ %\settrue\indisplaychemical
+ \forgetall
+ \ifparameter#2\or
+ \ifhastok={#1}%
+ \setupcurrentchemical[#1]% same as \currentchemical
+ \else
+ \edef\currentchemical{#1}%
+ \setupcurrentchemical[#2]%
+ \fi
+ \orelse\ifparameter#1\or
+ \ifhastok={#1}%
+ \setupcurrentchemical[#1]% same as \currentchemical
+ \else
+ \edef\currentchemical{#1}%
+ \fi
+ \fi
+ \the\everystructurechemical
+ \setbox\b_chem_result\hpack\bgroup
+ \clf_startchemical
+ width {\chemicalparameter\c!width}%
+ height {\chemicalparameter\c!height}%
+ left {\chemicalparameter\c!left}%
+ right {\chemicalparameter\c!right}%
+ top {\chemicalparameter\c!top}%
+ bottom {\chemicalparameter\c!bottom}%
+ scale {\chemicalparameter\c!scale}%
+ rotation {\chemicalparameter\c!rotation}%
+ symalign {\chemicalparameter\c!symalign}%
+ axis {\chemicalparameter\c!axis}% was \MPcolor{...}
+ framecolor {\chemicalparameter\c!framecolor}%
+ rulethickness {\number\dimexpr\chemicalparameter\c!rulethickness}%
+ offset {\number\dimexpr\chemicalparameter\c!offset}%
+ unit {\number\dimexpr\chemicalparameter\c!unit}%
+ factor {\number\chemicalparameter\c!factor}%
+ \relax
+ \startnointerference}
+
+\permanent\protected\def\stopchemical
+ {\stopnointerference
+ \clf_stopchemical
+ \egroup
+ \d_chem_width \wd\b_chem_result
+ \d_chem_height\ht\b_chem_result
+ \d_chem_depth \dp\b_chem_result
+ \the\t_chem_every_box
+ \doifelsenothing{\chemicalparameter\c!frame}\chem_framed_nop\chem_framed_yes
+ \egroup}
+
+\protected\def\chem_framed_yes
+ {\localframedwithsettings
+ [\??chemicalframed]%
+ [\c!frame=\chemicalparameter\c!frame,
+ \c!rulethickness=\chemicalparameter\c!rulethickness,
+ \c!framecolor=\chemicalparameter\c!framecolor]%
+ {\vpack{\box\b_chem_result\vss}}} % remove depth
+
+\protected\def\chem_framed_nop
+ {\directlocalframed
+ [\??chemicalframed]%
+ {\vpack{\box\b_chem_result\vss}}} % remove depth
+
+\aliased\let\startstructurechemical\startchemical
+\aliased\let\stopstructurechemical \stopchemical
+
+\appendtoks
+ \enforced\let\chemical\structurechemical
+\to\everystructurechemical
+
+\permanent\tolerant\protected\def\structurechemical[#1]#*[#2]#*[#3]%
+ {\ifparameter#3\or
+ \expandafter\strc_chem_indeed_three
+ \else
+ \expandafter\strc_chem_indeed_two
+ \fi[#1][#2][#3]}
+
+\def\strc_chem_indeed_three[#1][#2][#3]%
+ {\writestatus\m!chemicals{hyperlinked chemicals not yet supported}% todo reference, for the moment ignored
+ \clf_chemicalcomponent
+ {#2}%
+ {\detokenize{#3}}%
+ {\the\dimexpr\chemicalparameter\c!rulethickness}% todo: scaled points
+ {\chemicalparameter\c!rulecolor}%
+ \relax
+ \ignorespaces}
+
+\def\strc_chem_indeed_two[#1][#2]% why no [#3] here
+ {\clf_chemicalcomponent
+ {#1}%
+ {\detokenize{#2}}%
+ {\the\dimexpr\chemicalparameter\c!rulethickness}% todo: scaled points
+ {\chemicalparameter\c!rulecolor}%
+ \relax
+ \ignorespaces}
+
+\appendtoks
+ \setbox\b_chem_result\hpack{\raise\MPlly\box\b_chem_result}%
+ \d_chem_width \wd\b_chem_result
+ \d_chem_height\ht\b_chem_result
+ \d_chem_depth \dp\b_chem_result
+\to \t_chem_every_box
+
+% kind of compatible, but text sizes instead of math sizes (i.e. tx is larger than scriptsize)
+
+\appendtoks
+ \edef\m_bodyfont{\chemicalparameter\c!bodyfont}%
+ \ifempty\m_bodyfont
+ \switchtobodyfont[\m_bodyfont]%
+ \fi
+ \begincsname\??chemicalsize\chemicalparameter\c!size\endcsname
+% \to \everystructurechemical
+\to \everychemical
+
+\permanent\protected\def\chemicaltoptext#1{\global\settrue\c_chem_some_text\gdef\m_chem_top_text{#1}\ignorespaces}
+\permanent\protected\def\chemicalbottext#1{\global\settrue\c_chem_some_text\gdef\m_chem_bot_text{#1}\ignorespaces}
+\permanent\protected\def\chemicalmidtext#1{\global\settrue\c_chem_some_text\gdef\m_chem_mid_text{#1}\ignorespaces}
+
+\mutable\let\toptext\empty
+\mutable\let\bottext\empty
+\mutable\let\midtext\empty
+
+\appendtoks
+ \let\toptext\chemicaltoptext \glet\m_chem_top_text\empty
+ \let\bottext\chemicalbottext \glet\m_chem_bot_text\empty
+ \let\midtext\chemicalmidtext \glet\m_chem_mid_text\empty
+ \global\setfalse\c_chem_some_text
+\to \everystructurechemical
+
+\def\chem_add_texts
+ {\setbox2\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_mid_text}\hss}%
+ \setbox4\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_top_text}\hss}%
+ \setbox6\hpack to \d_chem_width{\strut\hss\hbox{\strut\m_chem_bot_text}\hss}%
+ \setbox\b_chem_result\hpack \bgroup
+ \box\b_chem_result
+ \hskip-\d_chem_width
+ \raise\d_chem_height\hpack{\lower\ht4\box4}%
+ \hskip-\d_chem_width
+ \lower.5\dimexpr\ht2-\dp2\relax\box2%
+ \hskip-\d_chem_width
+ \lower\d_chem_depth \hpack{\raise\dp6\box6}%
+ \hss
+ \egroup} % text on top of chemicals
+
+\appendtoks
+ \ifconditional\c_chem_some_text
+ \chem_add_texts
+ \d_chem_width \wd\b_chem_result
+ \d_chem_height\ht\b_chem_result
+ \d_chem_depth \dp\b_chem_result
+ \fi
+\to \t_chem_every_box
+
+% todo: enspace or emspace
+
+\definechemicalsymbol[space] [\enspace\quad\enspace]
+\definechemicalsymbol[plus] [\enspace+\enspace]
+\definechemicalsymbol[minus] [\enspace-\enspace]
+\definechemicalsymbol[gives] [\chem_arrow_construct\xrightarrow]
+\definechemicalsymbol[equilibrium] [\chem_arrow_construct\xrightoverleftarrow]
+\definechemicalsymbol[mesomeric] [\chem_arrow_construct\xleftrightarrow]
+\definechemicalsymbol[opencomplex] [\mathematics{\Bigg[}] % not yet ok
+\definechemicalsymbol[closecomplex][\mathematics{\Bigg]}] % not yet ok
+
+\definechemicalsymbol[SPACE] [{\chemicalsymbol[space]}]
+\definechemicalsymbol[PLUS] [{\chemicalsymbol[plus]}]
+\definechemicalsymbol[MINUS] [{\chemicalsymbol[minus]}]
+\definechemicalsymbol[GIVES] [{\chemicalsymbol[gives]}]
+\definechemicalsymbol[EQUILIBRIUM] [{\chemicalsymbol[equilibrium]}]
+\definechemicalsymbol[MESOMERIC] [{\chemicalsymbol[mesomeric]}]
+\definechemicalsymbol[OPENCOMPLEX] [{\chemicalsymbol[opencomplex]}]
+\definechemicalsymbol[CLOSECOMPLEX][{\chemicalsymbol[closecomplex]}]
+
+\def\chem_arrow_construct#1#2#3%
+ {\enspace
+ \mathematics{#1%
+ {\strut\hbox \s!spread 2\emwidth{\hss\clf_inlinechemical{#3}\hss}}% {\strut\hbox \s!spread 2em{\hss#3\hss}}}%
+ {\strut\hbox \s!spread 2\emwidth{\hss\clf_inlinechemical{#2}\hss}}}% {\strut\hbox \s!spread 2em{\hss#2\hss}}%
+ \enspace}
+
+% special macros (probably needs some more work)
+
+\let\chem_box_normal_yes\hbox
+\let\chem_box_visual_yes\hbox
+\let\chem_box_visual_nop\relax
+
+\installtextracker
+ {chemistry.boxes}
+ {\let\chem_box_visual_yes\ruledhbox \let\chem_box_visual_nop\ruledhbox}
+ {\let\chem_box_visual_yes\hbox \let\chem_box_visual_nop\relax }
+
+\def\chem_top_construct#1#2#3#4%
+ {\hpack\bgroup
+ \setstrut
+ \setbox\scratchboxone\chem_box_visual_yes{\strut#3}%
+ \setbox\scratchboxtwo\chem_box_visual_yes{\strut\molecule{#4}}%
+ \setbox\scratchboxone\chem_box_normal_yes{\raise\dimexpr\dp\scratchboxone+\ht\scratchboxtwo\relax\hbox to \wd\scratchboxtwo{#1\box\scratchboxone#2}}%
+ \smashbox\scratchboxone
+ \box\scratchboxone
+ \box\scratchboxtwo
+ \egroup}
+
+\def\chem_bottom_construct#1#2#3#4%
+ {\hpack\bgroup
+ \setstrut
+ \setbox\scratchboxone\chem_box_visual_yes{\strut#3}%
+ \setbox\scratchboxtwo\chem_box_visual_yes{\strut\molecule{#4}}%
+ \setbox\scratchboxone\chem_box_normal_yes{\lower\dimexpr\dp\scratchboxtwo+\ht\scratchboxone\relax\hbox to \wd\scratchboxtwo{#1\box\scratchboxone#2}}%
+ \smashbox\scratchboxone
+ \box\scratchboxone
+ \box\scratchboxtwo
+ \egroup}
+
+\permanent\protected\def\chemicalleft#1#2% redundant boxes thanks to visual
+ {\hbox\bgroup % hpack ?
+ \setstrut
+ \llap{\chem_box_visual_nop{\strut#1}}%
+ \chem_box_visual_nop{\strut#2}%
+ \egroup}
+
+\permanent\protected\def\chemicalright#1#2% redundant boxes thanks to visual
+ {\hbox\bgroup % hpack ?
+ \setstrut
+ \chem_box_visual_yes{\strut#2}%
+ \rlap{\chem_box_visual_nop{\strut#1}}%
+ \egroup}
+
+\permanent\protected\def\chemicaltop {\chem_top_construct \hss \hss }
+\permanent\protected\def\chemicallefttop {\chem_top_construct \relax\hss }
+\permanent\protected\def\chemicalrighttop {\chem_top_construct \hss \relax}
+\permanent\protected\def\chemicalbottom {\chem_bottom_construct\hss \hss }
+\permanent\protected\def\chemicalleftbottom {\chem_bottom_construct\relax\hss }
+\permanent\protected\def\chemicalrightbottom{\chem_bottom_construct\hss \relax}
+
+\permanent\protected\def\chemicaltopleft #1{\chemicalleft {\chemicalrighttop {#1}{}}}
+\permanent\protected\def\chemicalbottomleft #1{\chemicalleft {\chemicalrightbottom{#1}{}}}
+\permanent\protected\def\chemicaltopright #1{\chemicalright{\chemicallefttop {#1}{}}}
+\permanent\protected\def\chemicalbottomright#1{\chemicalright{\chemicalleftbottom {#1}{}}}
+
+% \protected\def\chemicalcentered #1{\hbox to \fontcharwd\font`C{\setstrut\strut\hss#1\hss}}
+% \protected\def\chemicalleftcentered #1{\hbox to \fontcharwd\font`C{\setstrut\strut #1\hss}}
+% \protected\def\chemicalrightcentered#1{\hbox to \fontcharwd\font`C{\setstrut\strut\hss#1}}
+
+% \let\chemicalsmashedmiddle\chemicalcentered
+% \let\chemicalsmashedleft \chemicalleftcentered
+% \let\chemicalsmashedright \chemicalrightcentered
+
+\permanent\protected\def\chemicalalignedtext
+ {\ifmmode
+ \expandafter\chem_aligned_text_math
+ \else
+ \expandafter\chem_aligned_text_text
+ \fi}
+
+\aliased\let\chemicaltighttext\relax % maybe smaller strut
+
+\def\chem_aligned_text_text#1#2#3%
+ {\dontleavehmode
+ \begingroup
+ \usechemicalstyleandcolor\c!style\c!color
+ \chem_box_visual_yes to \fontcharwd\font`C\bgroup
+ \setstrut\strut
+ #1\molecule{#3}#2%
+ \egroup
+ \endgroup}
+
+\def\chem_aligned_text_math#1#2#3%
+ {\dontleavehmode
+ \begingroup
+ \scratchcounter\normalmathstyle
+ \usechemicalstyleandcolor\c!style\c!color
+ \chem_box_visual_yes to \fontcharwd\font`C\bgroup
+ \setstrut\strut
+ #1\mathematics{\tf\triggermathstyle\scratchcounter\molecule{#3}}#2%
+ \egroup
+ \endgroup}
+
+\permanent\protected\def\chemicalcentered {\chemicalalignedtext\hss \hss }
+\permanent\protected\def\chemicalleftcentered {\chemicalalignedtext\relax\hss }
+\permanent\protected\def\chemicalrightcentered{\chemicalalignedtext\hss \relax}
+
+\aliased\let\chemicalsmashedmiddle\chemicalcentered
+\aliased\let\chemicalsmashedleft \chemicalleftcentered
+\aliased\let\chemicalsmashedright \chemicalrightcentered
+
+\permanent\protected\def\chemicaloxidation#1#2#3%
+ {\chemicaltop{\txx\ifcase#2\relax0\else#1\convertnumber{I}{#2}\fi}{#3}}
+
+\permanent\protected\def\chemicaloxidationplus {\dotriplegroupempty\chemicaloxidation{\textplus }} % {} needed!
+\permanent\protected\def\chemicaloxidationminus{\dotriplegroupempty\chemicaloxidation{\textminus}} % {} needed!
+\permanent\protected\def\chemicalforeveropen {\dotriplegroupempty\chemicalleft {$\big[$}} % {} needed!
+\permanent\protected\def\chemicalforeverclose {\dotriplegroupempty\chemicalright {$\big]$}} % {} needed!
+\permanent\protected\def\chemicaloxidationone {\chemicaloxidation\relax1}
+\permanent\protected\def\chemicaloxidationtwo {\chemicaloxidation\relax2}
+\permanent\protected\def\chemicaloxidationthree{\chemicaloxidation\relax3}
+\permanent\protected\def\chemicaloxidationfour {\chemicaloxidation\relax4}
+\permanent\protected\def\chemicaloxidationfive {\chemicaloxidation\relax5}
+\permanent\protected\def\chemicaloxidationsix {\chemicaloxidation\relax6}
+\permanent\protected\def\chemicaloxidationseven{\chemicaloxidation\relax7}
+
+\permanent\protected\def\chemicalbar
+ {\hpack \s!spread .5\emwidth \bgroup
+ \hss
+ \vrule \s!height .9\strutht \s!depth .65\strutdp \s!width .1\exheight
+ \hss
+ \egroup}
+
+\permanent\let\X\relax
+\permanent\let\T\relax
+\permanent\let\B\relax
+\permanent\let\L\relax
+\permanent\let\M\relax
+\permanent\let\R\relax
+
+\appendtoks
+ \enforced\let |\chemicalbar % \SR{N|NH}
+ \enforced\let \+\chemicaloxidationplus
+ \enforced\let \-\chemicaloxidationminus
+ \enforced\let \[\chemicalforeveropen
+ \enforced\let \]\chemicalforeverclose
+ \enforced\let \1\chemicaloxidationone
+ \enforced\let \2\chemicaloxidationtwo
+ \enforced\let \3\chemicaloxidationthree
+ \enforced\let \4\chemicaloxidationfour
+ \enforced\let \5\chemicaloxidationfive
+ \enforced\let \6\chemicaloxidationsix
+ \enforced\let \7\chemicaloxidationseven
+ \enforced\let \X\chemicaltighttext
+ \enforced\let \T\chemicaltop
+ \enforced\let \B\chemicalbottom
+ \enforced\let \L\chemicalleft
+ \enforced\let\LC\chemicalleftcentered
+ \enforced\let \R\chemicalright
+ \enforced\let\RC\chemicalrightcentered
+ \enforced\let\TL\chemicaltopleft
+ \enforced\let\BL\chemicalbottomleft
+ \enforced\let\TR\chemicaltopright
+ \enforced\let\BR\chemicalbottomright
+ \enforced\let\LT\chemicallefttop
+ \enforced\let\LB\chemicalleftbottom
+ \enforced\let\RT\chemicalrighttop
+ \enforced\let\RB\chemicalrightbottom
+ \enforced\let\SL\chemicalsmashedleft
+ \enforced\let\SM\chemicalsmashedmiddle
+ \enforced\let\SR\chemicalsmashedright
+\to \everychemical
+
+% Should these also be defined in lower case, so as to be case independent?
+
+\appendtoks
+ \the\everychemical
+\to \everystructurechemical
+
+% inline
+
+\permanent\protected\def\chemical
+ {\ifinformula
+ \expandafter\indisplaychemical
+ \else
+ \expandafter\inlinechemical
+ \fi}
+
+\permanent\protected\def\indisplaychemical
+ {\mathstylecommand\displaychemical\inlinechemical\inlinechemical}
+
+% \permanent\protected\def\inlinechemical#1%
+% {\dontleavehmode
+% \begingroup
+% \scratchcounter\normalmathstyle
+% \usechemicalstyleandcolor\c!style\c!color
+% \hbox{\mathematics{\tf\triggermathstyle\scratchcounter\clf_inlinechemical{#1}}}%
+% \endgroup}
+
+\permanent\tolerant\protected\def\displaychemical#=#=#=%
+ {\the\everychemical
+ \everychemical\emptytoks
+ \quad
+ \vcenter\bgroup
+ \usechemicalstyleandcolor\c!style\c!color
+ \ifparameter#3\or
+ \ifparameter#2\or
+ \halign{\aligntab\hss\alignmark\alignmark\hss\cr#2\cr\molecule{#1}\cr#3\cr}%
+ \else
+ \halign{\aligntab\hss\alignmark\alignmark\hss \cr\molecule{#1}\cr#2\cr}%
+ \fi
+ \else
+ \hbox{\molecule{#1}}%
+ \fi
+ \egroup
+ \quad}
+
+\permanent\protected\def\inlinechemical#1%
+ {\dontleavehmode
+ \hbox{\usechemicalstyleandcolor\c!style\c!color\clf_inlinechemical{#1}}}
+
+\permanent\protected\def\chemicalbondrule
+ {\hpack{\vrule\s!height.75\exheight\s!depth-\dimexpr.75\exheight-\linewidth\relax\s!width\emwidth\relax}}
+
+\definechemicalsymbol[i:space] [\enspace\quad\enspace]
+\definechemicalsymbol[i:plus] [\enspace\mathematics{+}\enspace]
+\definechemicalsymbol[i:minus] [\enspace\mathematics{-}\enspace]
+\definechemicalsymbol[i:equals] [\enspace\mathematics{=}\enspace]
+\definechemicalsymbol[i:gives] [\enspace\mathematics{\xrightarrow{}{}}\enspace]
+\definechemicalsymbol[i:equilibrium] [\enspace\mathematics{\xrightoverleftarrow{}{}}\enspace]
+\definechemicalsymbol[i:mesomeric] [\enspace\mathematics{\xleftrightarrow{}{}}\enspace]
+\definechemicalsymbol[i:single] [\chemicalbondrule]
+\definechemicalsymbol[i:double] [\hpack{\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+\definechemicalsymbol[i:triple] [\hpack{\chemicalbondrule\hskip-1em\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+
+\permanent\protected\def\chemicalsinglebond {\chemicalsymbol[i:single]}
+\permanent\protected\def\chemicaldoublebond {\chemicalsymbol[i:double]}
+\permanent\protected\def\chemicaltriplebond {\chemicalsymbol[i:triple]}
+\permanent\protected\def\chemicalgives {\chemicalsymbol[i:gives]}
+\permanent\protected\def\chemicalmesomeric {\chemicalsymbol[i:mesomeric]}
+\permanent\protected\def\chemicalequilibrium{\chemicalsymbol[i:equilibrium]}
+\permanent\protected\def\chemicalplus {\chemicalsymbol[i:plus]}
+\permanent\protected\def\chemicalminus {\chemicalsymbol[i:minus]}
+\permanent\protected\def\chemicalequals {\chemicalsymbol[i:equals]}
+\permanent\protected\def\chemicalspace {\chemicalsymbol[i:space]}
+\permanent\protected\def\chemicalinline #1{#1}
+
+% display
+
+\newconditional\c_chem_has_top
+\newconditional\c_chem_has_bot
+
+\newtoks\t_chem_top
+\newtoks\t_chem_mid
+\newtoks\t_chem_bot
+
+\newif\ifinchemicalformula
+
+\permanent\protected\def\startchemicalformula
+ {\mathortext\vcenter\vbox\bgroup
+ \forgetall
+ \inchemicalformulatrue
+ \the\everychemical
+ \everychemical\emptytoks
+ \t_chem_top\emptytoks % not needed
+ \t_chem_mid\emptytoks % not needed
+ \t_chem_bot\emptytoks % not needed
+ \enforced\let\chemical\formulachemical
+ \setfalse\c_chem_has_top
+ \setfalse\c_chem_has_bot}
+
+\permanent\protected\def\stopchemicalformula
+ {\tabskip\emwidth\relax
+ \nointerlineskip
+ \ifconditional\c_chem_has_top
+ \ifconditional\c_chem_has_bot
+ \halign{\aligntab\hss\usechemicalstyleandcolor\c!style\c!color\alignmark\alignmark\hss\cr\the\t_chem_top\cr\the\t_chem_mid\cr\the\t_chem_bot\cr}%
+ \else
+ \halign{\aligntab\hss\usechemicalstyleandcolor\c!style\c!color\alignmark\alignmark\hss\cr\the\t_chem_top\cr\the\t_chem_mid\cr}%
+ \fi
+ \else
+ \ifconditional\c_chem_has_bot
+ \halign{\aligntab\hss\usechemicalstyleandcolor\c!style\c!color\alignmark\alignmark\hss\cr\the\t_chem_mid\cr\the\t_chem_bot\cr}%
+ \else
+ \halign{\aligntab\hss\usechemicalstyleandcolor\c!style\c!color\alignmark\alignmark\hss\cr\the\t_chem_mid\cr}%
+ \fi
+ \fi
+ \egroup}
+
+% for the moment we have a special set
+
+\definechemicalsymbol[d:space] [\enspace\quad\enspace]
+\definechemicalsymbol[d:plus] [\enspace+\enspace]
+\definechemicalsymbol[d:minus] [\enspace-\enspace]
+\definechemicalsymbol[d:equals] [\enspace=\enspace]
+\definechemicalsymbol[d:gives] [\rightarrowfill] % \chem_arrow_construct\xrightarrow
+\definechemicalsymbol[d:equilibrium] [\rightoverleftarrowfill] % \chem_arrow_construct\xrightoverleftarrow
+\definechemicalsymbol[d:mesomeric] [\leftarrowfill] % \chem_arrow_construct\xleftrightarrow
+\definechemicalsymbol[d:single] [\chemicalbondrule]
+\definechemicalsymbol[d:double] [\hpack{\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+\definechemicalsymbol[d:triple] [\hpack{\chemicalbondrule\hskip-1em\lower.5ex\chemicalbondrule\hskip-1em\raise.5ex\chemicalbondrule}]
+\definechemicalsymbol[d:opencomplex] [\mathematics{\Bigg[}] % not yet ok
+\definechemicalsymbol[d:closecomplex][\mathematics{\Bigg]}] % not yet ok
+
+\definechemicalsymbol[d:SPACE] [{\chemicalsymbol[d:space]}]
+\definechemicalsymbol[d:PLUS] [{\chemicalsymbol[d:plus]}]
+\definechemicalsymbol[d:MINUS] [{\chemicalsymbol[d:minus]}]
+\definechemicalsymbol[d:EQUALS] [{\chemicalsymbol[d:equals]}]
+\definechemicalsymbol[d:GIVES] [{\chemicalsymbol[d:gives]}]
+\definechemicalsymbol[d:EQUILIBRIUM] [{\chemicalsymbol[d:equilibrium]}]
+\definechemicalsymbol[d:MESOMERIC] [{\chemicalsymbol[d:mesomeric]}]
+\definechemicalsymbol[d:SINGLE] [{\chemicalsymbol[d:single]}]
+\definechemicalsymbol[d:DOUBLE] [{\chemicalsymbol[d:double]}]
+\definechemicalsymbol[d:TRIPLE] [{\chemicalsymbol[d:triple]}]
+\definechemicalsymbol[d:OPENCOMPLEX] [{\chemicalsymbol[d:opencomplex]}]
+\definechemicalsymbol[d:CLOSECOMPLEX][{\chemicalsymbol[d:closecomplex]}]
+
+\permanent\tolerant\protected\def\formulachemical#=#=#=%
+ {\relax
+ \ifarguments\or
+ \chem_formula_top_nop
+ \chem_formula_bot_nop
+ \or
+ \chem_formula_top_nop
+ \doifelsenothing{#2}\chem_formula_bot_nop{\chem_formula_bot_yes{#2}}%
+ \or
+ \doifelsenothing{#2}\chem_formula_top_nop{\chem_formula_top_yes{#2}}%
+ \doifelsenothing{#3}\chem_formula_bot_nop{\chem_formula_bot_yes{#3}}%
+ \fi
+ \ifcsname\??chemicalsymbol d:\detokenize{#1}\endcsname
+ \toksapp\t_chem_mid{\chemicalsymbol[d:#1]\aligntab}%
+ \else
+ \toksapp\t_chem_mid{\molecule{#1}\aligntab}%
+ \fi}
+
+\def\chem_formula_mid#1%
+ {\csname\??chemicalsymbol\detokenize{#1}\endcsname}
+
+\def\chem_formula_top_nop {\toksapp\t_chem_top{\aligntab}}
+\def\chem_formula_bot_nop {\toksapp\t_chem_bot{\aligntab}}
+\def\chem_formula_top_yes#1{\toksapp\t_chem_top{\chem_formula_top_indeed{#1}\aligntab}\settrue\c_chem_has_top}
+\def\chem_formula_bot_yes#1{\toksapp\t_chem_bot{\chem_formula_bot_indeed{#1}\aligntab}\settrue\c_chem_has_bot}
+
+\def\chem_formula_top_indeed#1{\strut#1}
+\def\chem_formula_bot_indeed#1{\strut#1}
+
+% Experimental: defaults might change.
+
+\definefloat
+ [\v!chemical]
+ [\v!chemicals]
+
+\setuplabeltext
+ [\v!chemical=]
+
+\setupfloat
+ [\v!chemical]
+ [\c!location=\v!here,
+ \c!inner=\hsize.8\textwidth\dontleavehmode, % brr
+ \c!align={\v!flushleft,\v!lohi}]
+
+\setupcaption
+ [\v!chemical]
+ [\c!location=\v!right,
+ \c!distance=\zeropoint,
+ \c!width=.2\textwidth,
+ \c!align=\v!flushright]
+
+% Can be used as for displayed math: \startplaceformula... to display a chemical formula
+% or a chemical structure:
+%
+% \startplacechemical
+% \startchemicalformula
+% \chemical{2H_2}
+% \chemical{PLUS}
+% \chemical{O_2}
+% \chemical{GIVES}
+% \chemical{2H_2O}
+% \stopchemicalformula
+% \stopplacechemical
+
+% gone: state option resolution offset (now frame offset) alternative
+
+\setupchemicalframed
+ [\c!align=\v!normal,
+ \c!strut=\v!no,
+ \c!offset=\v!overlay,
+ \c!frame=\v!off]
+
+\definecolor % private color
+ [chemicalframecolor]
+ [r=.75,g=.85,b=.95]
+
+\setupchemical
+ [\c!frame=,
+ \c!width=\v!fit, % or unitless number, multiplies scale*unit
+ \c!height=\v!fit, % or unitless number, multiplies scale*unit
+ \c!left=\v!fit, % or unitless number, multiplies scale*unit
+ \c!right=\v!fit, % or unitless number, multiplies scale*unit
+ \c!top=\v!fit, % or unitless number, multiplies scale*unit
+ \c!bottom=\v!fit, % or unitless number, multiplies scale*unit
+ \c!bodyfont=,
+ \c!scale=\v!normal, % small, normal or medium, big, or unitless number (multiplies unit)
+ \c!size=\v!medium,
+ \c!textsize=\v!big, % how is textsize used??
+ \c!axis=\v!off,
+ \c!style=\rm,
+ \c!rotation=0, % unitless number (interpreted as degrees)
+ \c!symalign=\v!auto,
+ \c!location=, % not yet used (was interaction related in mkii)
+ \c!offset=.25\emwidth,
+ \c!unit=\emwidth,
+ \c!factor=3,
+ \c!color=,
+ \c!strut=\v!yes,
+ \c!framecolor=chemicalframecolor,
+ \c!rulethickness=0.6pt, %1.5\linewidth,
+ \c!rulecolor=]
+
+%D Compatibility:
+
+\definechemical[+R] {\chemical[RR]}
+\definechemical[-R] {\chemical[LR]}
+
+\definechemical[CARBON:CB] {\chemical[NEWMANSTAGGER,C,SB]}
+\definechemical[NEWMANSTAGGER:CB] {\chemical[NEWMANSTAGGER,C,SB]}
+\definechemical[NEWMANECLIPSED:CB]{\chemical[NEWMANECLIPSED,C,SB]}
+\definechemical[CARBON:CB1] {\chemical[CARBON,C,SB,Z234,1.5MOV1,MIR0,C,SB,Z234]}
+
+\definechemical[NEWMAN] {\chemical[]}
+\definechemical[STAGGER] {\chemical[NEWMANSTAGGER]}
+\definechemical[ECLIPSE] {\chemical[NEWMANECLIPSED]}
+\definechemical[ECLIPSED] {\chemical[NEWMANECLIPSED]}
+\definechemical[SIX:FRONT] {\chemical[SIXFRONT]}
+\definechemical[FIVE:FRONT] {\chemical[FIVEFRONT]}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cldf-bas.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cldf-bas.mkxl
new file mode 100644
index 00000000000..962db5209f5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cldf-bas.mkxl
@@ -0,0 +1,19 @@
+%D \module
+%D [ file=cldf-bas,
+%D version=2010.10.19,,
+%D title=\CONTEXT\ \LUA\ Document Functions,
+%D subtitle=Basics,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Lua Documents / Basics}
+
+\registerctxluafile{cldf-bas}{}
+\registerctxluafile{cldf-prs}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cldf-com.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cldf-com.mkxl
new file mode 100644
index 00000000000..7a8f7bf5c0d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cldf-com.mkxl
@@ -0,0 +1,19 @@
+%D \module
+%D [ file=cldf-com,
+%D version=2010.10.19,,
+%D title=\CONTEXT\ \LUA\ Document Functions,
+%D subtitle=Initialization,
+%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 Lua Documents / Functions}
+
+\registerctxluafile{cldf-com}{}
+%registerctxluafile{cldf-ver}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl
new file mode 100644
index 00000000000..b393eb9b572
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cldf-ini.mkxl
@@ -0,0 +1,45 @@
+%D \module
+%D [ file=cldf-int,
+%D version=2019.01.01,
+%D title=\CONTEXT\ Data Macros,
+%D subtitle=Integer,
+%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 Lua Documents / Initialization}
+
+\newcount\trialtypesettingstate % gets aliased at the Lua end
+
+\registerctxluafile{cldf-ini}{autosuffix}
+
+%D With each new update of \MKIV\ we can join Within Temptation in singing:
+%D
+%D \startbuffer
+%D \startluacode
+%D context("I go faster%s",string.rep(" and faster",6))
+%D \stopluacode
+%D
+%D \cldcontext{"I go faster\letterpercent s",
+%D string.rep(" and faster",6)}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D Anyway \unknown\ the following are {\em not} user commands:
+
+% \catcode`=\activecatcode \let\luafunction % saves 10% on the call
+
+% todo: these can become implementers
+
+\permanent\protected\def\cldprocessfile#1{\directlua{context.runfile("#1")}}
+\permanent \def\cldloadfile #1{\directlua{context.loadfile("#1")}}
+\permanent \def\cldloadviafile#1{\directlua{context.loadviafile("#1")}}
+\permanent \def\cldcontext #1{\directlua{context(#1)}}
+\permanent \def\cldcommand #1{\directlua{context.#1}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cldf-int.lmt b/Master/texmf-dist/tex/context/base/mkxl/cldf-int.lmt
new file mode 100644
index 00000000000..4a60b469a38
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cldf-int.lmt
@@ -0,0 +1,252 @@
+if not modules then modules = { } end modules ['cldf-int'] = {
+ version = 1.001,
+ comment = "companion to cldf-int.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- another experiment
+-- needs upgrading
+-- needs checking
+-- todo: multilingual
+
+local byte = string.byte
+local insert, remove, concat = table.insert, table.remove, table.concat
+local unpack, type = unpack or table.unpack, type
+
+local ctxcatcodes = catcodes.numbers.ctxcatcodes
+local context = context
+local contextsprint = context.sprint
+
+local trace_define = false trackers.register("context.define", function(v) trace_define = v end)
+
+interfaces = interfaces or { }
+local implement = interfaces.implement
+local estart = interfaces.elements.start
+local estop = interfaces.elements.stop
+
+local scanners = tokens.scanners
+local shortcuts = tokens.shortcuts
+
+local peekchar = scanners.peekchar
+local scankey = scanners.key
+local scanvalue = scanners.value
+local scanskip = scanners.skip
+
+local open = byte('[')
+local close = byte(']')
+local equal = byte('=')
+local comma = byte(',')
+
+local function scanhash(scanners)
+ if peekchar() == open then
+ local data = { }
+ scanskip()
+ while true do
+ local c = peekchar()
+ if c == comma then
+ scanskip()
+ elseif c == close then
+ scanskip()
+ break
+ else
+ local key = scankey(equal)
+ if key then
+ if peekchar() == equal then
+ scanskip()
+ if scanners then
+ local scanner = scanners[key]
+ if scanner then
+ data[key] = scanner()
+ else
+ data[key] = scanvalue(comma,close) or ""
+ end
+ else
+ data[key] = scanvalue(comma,close) or ""
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ end
+ return data
+ end
+end
+
+local function scanarray()
+ if peekchar() == open then
+ local data = { }
+ local d = 0
+ scanskip()
+ while true do
+ local c = peekchar()
+ if c == comma then
+ scanskip()
+ elseif c == close then
+ scanskip()
+ break
+ else
+ local v = scanvalue(comma,close) or ""
+ d = d + 1
+ data[d] = v
+ end
+ end
+ return data
+ end
+end
+
+shortcuts.scanhash = scanhash
+shortcuts.scanarray = scanarray
+
+scanners.hash = scanhash
+scanners.array = scanarray
+
+local function remap(arguments)
+ -- backward compatibility
+ if type(arguments) == "table" then
+ for i=1,#arguments do
+ local a = arguments[i]
+ if type(a) == "table" then
+ local t = a[2]
+ arguments[i] = t == "list" and "array" or t
+ end
+ end
+ return arguments
+ end
+end
+
+function interfaces.definecommand(name,specification) -- name is optional
+ if type(name) == "table" then
+ specification = name
+ name = specification.name
+ end
+ if name and specification then
+ local environment = specification.environment
+ local arguments = remap(specification.arguments)
+ if environment then
+ local starter = specification.starter
+ local stopper = specification.stopper
+ if starter and stopper then
+ implement {
+ name = estart .. name,
+ arguments = arguments,
+ public = true,
+ protected = true,
+ actions = starter,
+ }
+ implement {
+ name = estop .. name,
+ public = true,
+ protected = true,
+ actions = stopper,
+ }
+ else
+ -- message
+ end
+ end
+ if not environment or environment == "both" then
+ local macro = specification.macro
+ if macro then
+ implement {
+ name = name,
+ arguments = arguments,
+ public = true,
+ protected = true,
+ actions = macro,
+ }
+ else
+ -- message
+ end
+ end
+ else
+ -- message
+ end
+end
+
+function interfaces.tolist(t)
+ if t then
+ local r = { }
+ for i=1,#t do
+ r[i] = t[i]
+ end
+ local n = #r
+ for k,v in table.sortedhash(t) do
+ if type(k) ~= "number" then
+ n = n + 1
+ r[n] = k .. "=" .. v
+ end
+ end
+ return concat(r,", ")
+ else
+ return ""
+ end
+end
+
+-- \startluacode
+-- function test(opt_1, opt_2, arg_1)
+-- context.startnarrower()
+-- context("options 1: %s",interfaces.tolist(opt_1))
+-- context.par()
+-- context("options 2: %s",interfaces.tolist(opt_2))
+-- context.par()
+-- context("argument 1: %s",arg_1)
+-- context.stopnarrower()
+-- end
+--
+-- interfaces.definecommand {
+-- name = "test",
+-- arguments = {
+-- { "option", "list" },
+-- { "option", "hash" },
+-- { "content", "string" },
+-- },
+-- macro = test,
+-- }
+-- \stopluacode
+--
+-- test: \test[1][a=3]{whatever}
+--
+-- \startluacode
+-- local function startmore(opt_1)
+-- context.startnarrower()
+-- context("start more, options: %s",interfaces.tolist(opt_1))
+-- context.startnarrower()
+-- end
+--
+-- local function stopmore()
+-- context.stopnarrower()
+-- context("stop more")
+-- context.stopnarrower()
+-- end
+--
+-- interfaces.definecommand ( "more", {
+-- environment = true,
+-- arguments = {
+-- { "option", "list" },
+-- },
+-- starter = startmore,
+-- stopper = stopmore,
+-- } )
+-- \stopluacode
+--
+-- more: \startmore[1] one \startmore[2] two \stopmore one \stopmore
+--
+-- More modern (no need for option or content):
+--
+-- \startluacode
+-- interfaces.definecommand {
+-- name = "test",
+-- arguments = {
+-- "array", -- or list
+-- "hash",
+-- "string",
+-- "number",
+-- },
+-- macro = test,
+-- }
+-- \stopluacode
+--
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cldf-int.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cldf-int.mkxl
new file mode 100644
index 00000000000..a564afc80ad
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cldf-int.mkxl
@@ -0,0 +1,34 @@
+%D \module
+%D [ file=cldf-int,
+%D version=2019.01.01,
+%D title=\CONTEXT\ Data Macros,
+%D subtitle=Integer,
+%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 Multilingual Macros / Lua}
+
+\registerctxluafile{cldf-int}{autosuffix}
+
+%D These are user commands so we don't add any protection against overloading
+%D here.
+
+\unprotect
+
+\permanent\protected\def\newluatable#1{\clf_newluatable#1\atendofgrouped{\disposeluatable#1}}
+\permanent\protected\def\useluatable#1{\clf_useluatable#1\atendofgrouped{\disposeluatable#1}}
+
+\installcorenamespace{datavalue}
+
+\permanent\protected\def\setdatavalue#1#2% #2 is a number (expression)
+ {\expandafter\integerdef\csname\??datavalue#1\endcsname\numexpr#2\relax}
+
+\permanent\def\getdatavalue#1{\begincsname\??datavalue#1\endcsname}
+\permanent\def\thedatavalue#1{\the\begincsname\??datavalue#1\endcsname}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt b/Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt
new file mode 100644
index 00000000000..f3121eadc02
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cldf-lmt.lmt
@@ -0,0 +1,949 @@
+if not modules then modules = { } end modules ['cldf-lmt'] = {
+ version = 1.001,
+ comment = "companion to toks-scn.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, load = next, load
+local gmatch, gsub, byte = string.gmatch, string.gsub, string.byte
+
+local setmetatableindex = table.setmetatableindex
+local setmetatablenewindex = table.setmetatablenewindex
+local serialize = table.serialize
+local concat = table.concat
+
+local random = math.random
+local randomseed = math.randomseed
+local round = math.round
+local abs = math.abs
+
+local implement = interfaces.implement
+
+local scanners = tokens.scanners
+local scanword = scanners.word
+local scanstring = scanners.string
+local scanboolean = scanners.boolean
+local scandimen = scanners.dimen
+local scanfloat = scanners.float
+local scaninteger = scanners.integer
+local scancardinal = scanners.cardinal
+local scannumber = scanners.luanumber
+local scanluainteger = scanners.luainteger
+local scanluacardinal = scanners.luacardinal
+local scanluanumber = scanners.luanumber
+local scanargument = scanners.argument
+local scantoken = scanners.token
+local scancsname = scanners.csname
+local scankeyword = scanners.keyword
+
+local peekchar = scanners.peekchar
+local skipnext = scanners.skip
+
+local getindex = token.get_index
+
+local texsetdimen = tex.setdimen
+local texsetcount = tex.setcount
+local texgetcount = tex.getcount
+local texget = tex.get
+
+local values = tokens.values
+local none_code = values.none
+local integer_code = values.integer
+local cardinal_code = values.cardinal
+local dimension_code = values.dimension
+local skip_code = values.skip
+local boolean_code = values.boolean
+local float_code = values.float
+
+local global_code = tex.flagcodes.global
+
+local context = context
+
+-- variables --
+
+local floats = { }
+local integers = { }
+local cardinals = { }
+local numbers = { }
+
+implement {
+ name = "luafloat",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local n = scanword()
+ if b == "value" then
+ context("%.99g",floats[n] or 0)
+ else
+ floats[n] = scanluanumber(true)
+ -- floats[n] = scanfloat(true)
+ end
+ end,
+}
+
+implement {
+ name = "luainteger",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local n = scanword()
+ if b == "value" then
+ context("%i",integers[n] or 0)
+ else
+ integers[n] = scanluainteger(true)
+ end
+ end,
+}
+
+implement {
+ name = "luacount",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local n = scanword()
+ if b == "value" then
+ return integer_code, integers[n] or 0
+ else
+ integers[n] = scaninteger(true)
+ end
+ end,
+}
+
+implement {
+ name = "luadimen",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local n = scanword()
+ if b == "value" then
+ return dimension_code, integers[n] or 0
+ else
+ integers[n] = scandimen(false,false,true)
+ end
+ end,
+}
+
+implement {
+ name = "luacardinal",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local n = scanword()
+ if b == "value" then
+ context("%1.0f",cardinals[n] or 0)
+ else
+ cardinals[n] = scanluacardinal(true)
+ end
+ end,
+}
+
+implement {
+ name = "luanumber",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local n = scanword()
+ if b == "value" then
+ context("%N",floats[n] or integers[n] or cardinals[n] or 0) -- maybe %N
+ else
+ -- floats[n] = scanfloat(true)
+ floats[n] = scanluanumber(true)
+ end
+ end,
+}
+
+implement {
+ name = "luarandom",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ if b == "value" then
+ return integer_code, random(scanluainteger(),scanluainteger())
+ else
+ randomseed(scanluainteger(true))
+ end
+ end,
+}
+
+interfaces.floats = floats
+interfaces.integers = integers
+interfaces.cardinals = cardinals
+
+interfaces.numbers = table.setmetatableindex(function(t,k)
+ return floats[k] or integers[k] or cardinals[k]
+end)
+
+-- arrays --
+
+local arrays = { }
+
+interfaces.arrays = arrays
+
+local newindex = lua.newindex
+
+implement {
+ name = "newarray",
+ public = true,
+ protected = true,
+ arguments = { {
+ { "name", "string" },
+ { "nx", "integer" },
+ { "ny", "integer" },
+ { "type", "string" },
+ } },
+ actions = function(t)
+ local name = t.name
+ if t.name then
+ local nx = t.nx
+ local ny = t.ny
+ local ty = t.type or "integer"
+ local df = nil
+ if ty == "integer" or ty == "float" or ty == "dimension" then
+ df = 0
+ elseif ty == "boolean" then
+ df = false
+ else
+ ty = nil
+ end
+ if nx and ty ~= nil then
+ local data
+ if ny then
+ data = newindex(t.ny)
+ for i=1,ny do
+ data[i] = newindex(nx,df)
+ end
+ else
+ data = newindex(nx,df)
+ end
+ arrays[name] = data
+ data.nx = nx
+ data.ny = ny
+ data.type = ty
+ if ty == "integer" then
+ data.scanner = scaninteger
+ elseif ty == "boolean" then
+ data.scanner = scanboolean
+ elseif ty == "dimension" then
+ data.scanner = scandimen
+ elseif ty == "float" then
+ data.scanner = scanfloat
+ end
+ if ty == "integer" then
+ data.code = integer_code
+ elseif ty == "boolean" then
+ data.code = boolean_code
+ elseif ty == "dimension" then
+ data.code = dimension_code
+ elseif ty == "float" then
+ data.code = float_code
+ end
+ end
+ end
+ end,
+}
+
+implement {
+ name = "arrayvalue",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local name = scanstring()
+ if name then
+ local a = arrays[name]
+ if a then
+ local nx = a.nx
+ local ny = a.ny
+ local d = a
+ if ny then
+ d = d[scaninteger()]
+ end
+ local x = scaninteger()
+ if b == "value" then
+ local code = a.code
+ if code == float_code then
+ context("%.99g",d[x])
+ else
+ return code, d[x]
+ end
+ else
+ d[x] = a.scanner()
+ end
+ end
+ end
+ end,
+}
+
+implement {
+ name = "arrayequals",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local name = scanstring()
+ if name then
+ local a = arrays[name]
+ if a then
+ local nx = a.nx
+ local ny = a.ny
+ local d = a
+ if ny then
+ d = d[scaninteger()]
+ end
+ local x = scaninteger()
+ if b == "value" then
+ return boolean_code, a.scanner() == d[x]
+ end
+ end
+ end
+ end,
+}
+
+implement {
+ name = "arraycompare",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ local name = scanstring()
+ if name then
+ local a = arrays[name]
+ if a then
+ local nx = a.nx
+ local ny = a.ny
+ local d = a
+ if ny then
+ d = d[scaninteger()]
+ end
+ local x = scaninteger()
+ if b == "value" then
+ local v = a.scanner()
+ local d = d[x]
+ if d < v then
+ return integer_code, 0
+ elseif d == v then
+ return integer_code, 1
+ else
+ return integer_code, 2
+ end
+ end
+ end
+ end
+ end,
+}
+
+implement {
+ name = "showarray",
+ public = true,
+ protected = true,
+ actions = function()
+ local name = scanstring()
+ if name then
+ inspect(arrays[name])
+ end
+ end,
+}
+
+-- expressions --
+
+local cache = table.setmetatableindex(function(t,k)
+ local code = "return function() local n = interfaces.numbers local a = interfaces.arrays return " .. k .. " end"
+ code = loadstring(code)
+ if code then
+ code = code()
+ end
+ t[k] = code or false
+ return code
+end)
+
+table.makeweak(cache)
+
+implement {
+ name = "luaexpression",
+ public = true,
+ actions = function()
+ local how = scanword()
+ local code = cache[scanargument()]
+ if code then
+ local result = code()
+ if result then
+ if not how then
+ context(tostring(code()))
+ elseif how == "float" then
+ context("%.99g",result)
+ elseif how == "integer" then
+ context("%i",round(result))
+ elseif how == "cardinal" then
+ context("%d",abs(round(result)))
+ elseif how == "dimen" then
+ context("%p",result)
+ elseif how == "boolean" then
+ context("%d",result and 1 or 0)
+ elseif how == "lua" then
+ context("%q",result)
+ else
+ context(tostring(code()))
+ end
+ end
+ end
+ end
+}
+
+local dimenfactors = number.dimenfactors
+
+implement {
+ name = "nodimen",
+ public = true,
+ usage = "value",
+ actions = function(b)
+ if b == "value" then
+ local how = scanword()
+ local what = scandimen()
+ if how then
+ local factor = dimenfactors[how]
+ if factor then
+ context("%.6N%s",factor*what,how)
+ else
+ return dimension_code, what
+ end
+ else
+ return dimension_code, what
+ end
+ else
+ local t = scantoken()
+ if t then
+ local i = getindex(t)
+ if i then
+ local d = scandimen(false,false,true)
+ texsetdimen(i,d)
+ end
+ end
+ end
+ end,
+}
+
+-- experimental:
+
+local grouped = { }
+local slots = { }
+local nofslots = 0
+local nofgrouped = 0
+
+local getinteger = tokens.getinteger
+local setinteger = tokens.setinteger
+
+local report = logs.reporter("lua table")
+
+local ctxsprint = context.sprint
+
+-- we could have an extra one that collects all end of grouped actions
+-- so that we dispose more in one go but it doesn's pay off
+
+local function newluatable(name,mt,dispose)
+ local g = { }
+ local t = slots[nofslots]
+ slots[nofslots] = false
+ nofslots = nofslots - 1
+ if not t then
+ nofgrouped = nofgrouped + 1
+ t = nofgrouped
+ end
+ if mt then
+ mt = getinteger(name)
+ if mt then
+ mt = grouped[mt]
+ if mt then
+ setmetatableindex(g,mt)
+ end
+ end
+ end
+ grouped[t] = g
+ setinteger(name,t)
+ -- This is the slow part. Doing this at the TeX end saved 10% runtime. I'll
+ -- think of something that we can set it at the Lua end.
+ if dispose then
+ ctxsprint("\\atendofgrouped{\\disposeluatable\\" .. name .. "}")
+ end
+end
+
+local function disposeluatable(name)
+ local t = getinteger(name)
+ local g = grouped[t]
+ if g then
+ grouped[t] = false
+ nofslots = nofslots + 1
+ slots[nofslots] = t
+ end
+end
+
+local function setluatable(name,kv)
+ local t = getinteger(name)
+ local g = grouped[t]
+ if g and kv then
+ for k, v in next, kv do
+ g[k] = v
+ end
+ end
+end
+
+local function getfromluatable(name,k)
+ local t = getinteger(name)
+ local g = grouped[t]
+ if g then
+ local v = g[k]
+ if v then
+ context(v)
+ else
+ local n = tonumber(k)
+ if n then
+ local v = g[n]
+ if v then
+ context(v)
+ end
+ end
+ end
+ end
+end
+
+local function idxfromluatable(name,k)
+ local t = getinteger(name)
+ local g = grouped[t]
+ if g then
+ local v = g[k]
+ if v then
+ context(v)
+ end
+ end
+end
+
+local function getluatable(name,k)
+ local t = getinteger(name)
+ local g = grouped[t]
+ if g then
+ return g
+ end
+end
+
+local function inspectluatable(name)
+ local t = getinteger(name)
+ local g = grouped[t]
+ if g then
+ report("%s", serialize(g,'[grouped slot ' .. t .. ']'))
+ end
+end
+
+local function showluatables()
+ report("nofgrouped %i, nofslots %i",nofgrouped,nofslots)
+ for t=1,nofgrouped do
+ local g = grouped[t]
+ if g then
+ report("%s", serialize(g,'[grouped slot ' .. t .. ']'))
+ end
+ end
+end
+
+implement {
+ name = "newluatable",
+ protected = true,
+ arguments = "csname",
+ actions = newluatable,
+}
+
+implement {
+ name = "useluatable",
+ protected = true,
+ arguments = { "csname", true },
+ actions = newluatable,
+}
+
+implement {
+ name = "disposeluatable",
+ protected = true,
+ public = true,
+ arguments = "csname",
+ actions = disposeluatable,
+}
+
+implement {
+ name = "inspectluatable",
+ protected = true,
+ public = true,
+ arguments = "csname",
+ actions = inspectluatable,
+}
+
+implement {
+ name = "showluatables",
+ protected = true,
+ public = true,
+ actions = showluatables,
+}
+
+implement {
+ name = "setluatable",
+ protected = true,
+ public = true,
+ arguments = { "csname", "argument" },
+ actions = function(name,data)
+ data = load("return {" .. data .. "}")
+ if data then
+ data = data()
+ if data then
+ setluatable(name,data)
+ end
+ end
+ end
+}
+
+implement {
+ name = "getfromluatable",
+ protected = false,
+ public = true,
+ arguments = { "csname", "argument" },
+ actions = getfromluatable,
+}
+
+implement {
+ name = "idxfromluatable",
+ protected = false,
+ public = true,
+ arguments = { "csname", "integer" },
+ actions = idxfromluatable,
+}
+
+context.luatables = {
+ new = function(name) newluatable(name,false,true) end,
+ use = function(name) useluatable(name,true, true) end,
+ dispose = disposeluatable,
+ set = setluatable,
+ get = getluatable,
+ getfrom = getfromluatable,
+ idxfrom = idxfromluatable,
+ inspect = inspectluatable,
+ show = showluatables,
+}
+
+-- Here's another mechanism ...
+
+local tables = { }
+local stack = setmetatableindex("table")
+
+interfaces.implement {
+ name = "droptablegroup",
+ public = true,
+ actions = function()
+ local g = texget("currentgrouplevel") -- todo: tex.getgrouplevel()
+ local s = stack[g]
+ if s then
+ for t, data in next, s do
+ for k, v in next, data do
+ t[k] = v
+ end
+ end
+ stack[g] = { }
+ end
+ end,
+}
+
+local ctx_atendofgroup = context.core.cs.atendofgroup
+local ctx_droptablegroup = context.core.cs.droptablegroup
+
+local function handletable(t,b,array)
+ if b == "value" then
+ local k = array and scaninteger() or scanargument()
+ local v = t[k]
+ if v then
+ context(v)
+ end
+ else
+ local data = scanargument()
+ data = load("return {" .. data .. "}")
+ if data then
+ data = data()
+ if data then
+ local l = t.level
+ local g = texget("currentgrouplevel") -- todo: tex.getgrouplevel()
+ local s = stack[g]
+ local d = s[t]
+ if not d then
+ d = { }
+ s[t] = d
+ ctx_atendofgroup()
+ ctx_droptablegroup()
+ end
+ for k, v in next, data do
+ if not d[k] then
+ d[k] = t[k]
+ end
+ t[k] = v
+ end
+ -- if b == "global" then
+ if b and (b & 0x04) ~= 0 then -- or just band(b,0x04)
+ for k, v in next, stack do
+ local t = s[t]
+ if t then
+ for k, v in next, data do
+ if t[k] then
+ t[k] = nil
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local function newtable(array)
+ local name = scancsname(true)
+ if not tables[name] then
+ local t = { }
+ tables[name] = t
+ interfaces.implement {
+ name = name,
+ public = true,
+ usage = "value",
+ actions = function(b)
+ handletable(t,b,array)
+ end,
+ }
+ else
+ -- already defined
+ end
+end
+
+implement {
+ name = "newhashedtable",
+ protected = true,
+ public = true,
+ actions = newtable,
+}
+
+implement {
+ name = "newindexedtable",
+ protected = true,
+ public = true,
+ actions = function() newtable(true) end,
+}
+
+context.hashedtables = setmetatableindex(function(t,k) return tables[k] end)
+context.indexedtables = context.hashedtables
+
+-- I played with adding bitwise operator to the expr scanners but in the end didn't
+-- keep the code ... the problem is in what symbols ... so for now a more verbose
+-- and/or/xor is okay. Extending the expression scanner would add a little overhead
+-- to all expressions while an logical operator would gain less that 50% so for now
+-- we don't bother. Providing \ifbitwiseand makes sense for performance reasons as
+-- if a bit beter than testing the bitwise and with an \ifcase.
+
+local reporterror = logs.texerrormessage
+
+local function youcant(cmd)
+ reporterror("you can't use \\%s this way, it's an integer value", cmd)
+end
+
+implement {
+ name = "bitwiseset",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local a = scancardinal()
+ if what == "value" then
+ return cardinal_code, a
+ else
+ youcant("bitwiseset")
+ end
+ end
+}
+
+implement {
+ name = "bitwiseand",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local a = scancardinal()
+ scankeyword("with")
+ local b = scancardinal()
+ if what == "value" then
+ return cardinal_code, a & b
+ else
+ youcant("bitwiseand")
+ end
+ end
+}
+
+implement {
+ name = "bitwiseor",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local a = scancardinal()
+ scankeyword("with")
+ local b = scancardinal()
+ if what == "value" then
+ return cardinal_code, a | b
+ else
+ youcant("bitwiseor")
+ end
+ end
+}
+
+implement {
+ name = "bitwisexor",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local a = scancardinal()
+ scankeyword("with")
+ local b = scancardinal()
+ if what == "value" then
+ return cardinal_code, a ~ b
+ else
+ youcant("bitwisexor")
+ end
+ end
+}
+
+implement {
+ name = "bitwisenot",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local a = scancardinal()
+ if what == "value" then
+ return cardinal_code, ~a & 0xFFFFFFFF
+ else
+ youcant("bitwisenot")
+ end
+ end
+}
+
+implement {
+ name = "bitwisenil",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local a = scancardinal()
+ scankeyword("with")
+ local b = scancardinal()
+ if what == "value" then
+ return cardinal_code, a & (~b & 0xFFFFFFFF)
+ else
+ youcant("bitwisenil")
+ end
+ end
+}
+
+implement {
+ name = "bitwiseshift",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local a = scancardinal()
+ scankeyword("by")
+ local b = scaninteger()
+ if what == "value" then
+ return cardinal_code, (b < 0) and (a << -b) or (a >> b)
+ else
+ youcant("bitwiseshift")
+ end
+ end
+}
+
+implement {
+ name = "bitwiseflip",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local t = scancsname()
+ local b = scaninteger()
+ local c = texgetcount(t)
+ if c then
+ if b > 0 then
+ c = c | b
+ elseif b < 0 then
+ c = c & (~(-b) & 0xFFFFFFFF)
+ end
+ if what == "value" then
+ return cardinal_code, c
+ elseif what and (what & global_code) ~= 0 then
+ texsetcount("global",t,c)
+ else
+ texsetcount(t,c)
+ end
+ end
+ end
+}
+
+implement {
+ name = "ifbitwiseand",
+ public = true,
+ usage = "condition",
+ actions = function(what)
+ local a = scancardinal()
+ local b = scancardinal()
+ return boolean_code, (a & b) ~= 0
+ end
+}
+
+interfaces.implement {
+ name = "bitwise",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ if what == "value" then
+ local b = 0
+ while true do
+ local c = peekchar()
+ if c == 48 or c == 49 then
+ skipnext()
+ b = (b << 1) + (c - 48)
+ if b == 0xFFFFFFFF then
+ break
+ end
+ else
+ break
+ end
+ end
+ return 1, b
+ else
+ local b = scancardinal()
+ local t = nil
+ local n = 0
+ for i=1,32 do
+ if (b & (0x100000000 >> i)) == 0 then
+ if n > 0 then
+ n = n + 1
+ t[n] = "0"
+ end
+ elseif t then
+ n = n + 1
+ t[n] = "1"
+ else
+ n = 1
+ t = { "1" }
+ end
+ end
+ context(n > 0 and table.concat(t) or "0")
+ end
+ end,
+}
+
+-- something to play with, this might move to syst-aux.lmt when we have that
+
+local escape = function(s) return "\\" .. byte(s) end
+
+interfaces.implement {
+ name = "ctxluamatch",
+ public = true,
+ usage = "value",
+ actions = function()
+ local command = context[scancsname()]
+ local pattern = gsub(scanstring(),"\\.",escape)
+ local input = gsub(scanstring(),"\\.",escape)
+ for a, b, c, d, e, f, g, h, i in gmatch(input,pattern) do
+ command(a, b or "", c or "", d or "", e or "", f or "", g or "", h or "", i or "")
+ end
+ return none_code
+ end,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cldf-ver.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cldf-ver.mkxl
new file mode 100644
index 00000000000..0ff63810ead
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cldf-ver.mkxl
@@ -0,0 +1,18 @@
+%D \module
+%D [ file=cldf-com,
+%D version=2010.10.19,
+%D title=\CONTEXT\ \LUA\ Document Functions,
+%D subtitle=Verbatim,
+%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 Lua Documents / Verbatim}
+
+\registerctxluafile{cldf-ver}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/colo-ext.mkxl b/Master/texmf-dist/tex/context/base/mkxl/colo-ext.mkxl
new file mode 100644
index 00000000000..df2d9d768a1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/colo-ext.mkxl
@@ -0,0 +1,99 @@
+%D \module
+%D [ file=colo-ext, % mostof thsi code used to be in colo-ini.tex
+%D version=1997.04.01,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=Extras,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Color Macros / Extras}
+
+\unprotect
+
+%D \macros
+%D {negatecolorcomponent, negativecolorbox}
+%D
+%D Sometimes, especially when we deal with typesetting devices, we want to reverse
+%D the color scheme. Instead of recalculating all those colors, we use a quick and
+%D dirty approach:
+%D
+%D \starttyping
+%D \negativecolorbox0
+%D \stoptyping
+%D
+%D will negate the colors in box zero.
+
+\permanent\protected\def\negatecolorbox#1% or just set attr of #1
+ {\setbox#1\hpack to \wd#1%
+ {\scratchdimen\wd#1\relax
+ \startnegative % might change
+ \blackrule[\c!color=\s!white,\c!height=\ht#1,\c!depth=\dp#1,\c!width=\scratchdimen]%
+ \hskip-\scratchdimen
+ \leaders\box#1\hfill% this triggers application to the box .. a real dirty hack!
+ \stopnegative}}
+
+%D There are in principle two ways to handle overprint: bound to colors or
+%D independent. For the moment we only support independent overprint handling. Here
+%D we deal with a per-document setting.
+
+%D We can move the stack and attribute setting to the \LUA\ end.
+
+\installcorenamespace{colorintent}
+
+\permanent\protected\def\registercolorintent#1#2% \relax is needed !
+ {\setevalue{\??colorintent#1}{\c_attr_colorintent\clf_registercolorintent{#2}\relax}}
+
+\protected\def\colo_intents_set
+ {\clf_enablecolorintents
+ \protected\gdef\colo_intents_set##1{\csname\??colorintent##1\endcsname}%
+ \colo_intents_set}
+
+\registercolorintent{knockout} {knockout}
+\registercolorintent{overprint}{overprint}
+
+\installattributestack\colorintentattribute
+
+\setevalue{\??colorintent\v!none}{\c_attr_colorintent\attributeunsetvalue} % or reset? used at all?
+
+\permanent\protected\def\startcolorintent[#1]%
+ {\pushattribute\colorintentattribute
+ \colo_intents_set{#1}}
+
+\permanent\protected\def\stopcolorintent
+ {\popattribute\colorintentattribute}
+
+\permanent\protected\def\startoverprint{\startcolorintent[\v!overprint]}
+\permanent\protected\def\startknockout {\startcolorintent[\v!knockout ]}
+
+\aliased\let\stopoverprint\stopcolorintent
+\aliased\let\stopknockout \stopcolorintent
+
+\aliased\let\starttextcolorintent\relax
+\aliased\let\stoptextcolorintent \relax
+
+\appendtoks
+ \colo_intents_set_text
+\to \everysetupcolors
+
+\let\p_colo_intent\empty
+
+\def\colo_intents_set_text
+ {\edef\p_colo_intent{\colorsparameter\c!intent}%
+ \ifx\p_colo_intent\v!none \else
+ \enforced\protected\xdef\starttextcolorintent{\colo_intents_set{\p_colo_intent}}%
+ \glet\colo_intents_set_text\relax
+ \colo_intents_set\p_colo_intent
+ \fi}
+
+\appendtoks \starttextcolorintent \to \everystarttextproperties
+\appendtoks \stoptextcolorintent \to \everystoptextproperties
+
+\setupcolors
+ [\c!intent=\v!none]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/colo-grp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/colo-grp.mkxl
new file mode 100644
index 00000000000..9237952d750
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/colo-grp.mkxl
@@ -0,0 +1,163 @@
+%D \module
+%D [ file=colo-grp,
+%D version=2011.12.27, % moved from colo-ini
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=Groups,
+%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 Regular colors and palets are used most, contrary to groups which is why we
+%D define their support in a separate module.
+
+\writestatus{loading}{ConTeXt Color Macros / Groups}
+
+\unprotect
+
+%D \macros
+%D {definecolorgroup}
+%D
+%D The naming of the colors in this palet suggests some ordening, which in turn is
+%D suported by color grouping.
+%D
+%D \starttyping
+%D \definecolorgroup
+%D [red]
+%D [1.00:0.90:0.90,
+%D 1.00:0.80:0.80,
+%D 1.00:0.70:0.70,
+%D 1.00:0.55:0.55,
+%D 1.00:0.40:0.40,
+%D 1.00:0.25:0.25,
+%D 1.00:0.15:0.15,
+%D 0.90:0.00:0.00]
+%D \stoptyping
+%D
+%D In such a color group colors are numbered from~$1$ to~$n$.
+%D
+%D \showsetup{definecolorgroup}
+%D
+%D This kind of specification is not only more compact than defining each color
+%D separate, it also loads faster and takes less bytes.
+
+\installcorenamespace{colorgroup}
+\installcorenamespace{colorgroupsetter}
+
+\newcount\c_colo_groups_n % scratch counter
+
+\permanent\tolerant\protected\def\definecolorgroup[#1]#*[#2]#*[#3]% % sort of obsolete, just use palets directly
+ {\ifarguments\or\or
+ \ifhastok:{#2}%
+ \colo_groups_define_normal[#1][\v!rgb][#2]
+ \else
+ \colo_groups_define_checked[#1][#2][]%
+ \fi
+ \else
+ \colo_groups_define_normal[#1][#2][#3]%
+ \fi}
+
+\def\colo_groups_define_normal[#1][#2][#3]%
+ {\c_colo_groups_n\zerocount
+ \processcommalist[#3]{\colo_groups_define_entry{#1}{#2}}}
+
+\def\colo_groups_define_checked[#1][#2][#3]%
+ {\doloop % inherited
+ {\ifcsname#2:##1\endcsname
+ \definecolor[#1:##1][#2:##1]%
+ \else
+ \exitloop
+ \fi}}
+
+\def\colo_groups_define_entry#1#2#3% name mode specification
+ {\advance\c_colo_groups_n\plusone
+ \csname\??colorgroupsetter\ifcsname\??colorgroupsetter#2\endcsname#2\else\s!rgb\fi\endcsname[#1:\the\c_colo_groups_n][#3:0:0:0:0]}
+
+\setvalue{\??colorgroupsetter\s!gray}[#1][#2:#3]{\definecolor[#1][s=#2]}
+\setvalue{\??colorgroupsetter\s!rgb }[#1][#2:#3:#4:#5]{\definecolor[#1][r=#2,g=#3,b=#4]}
+\setvalue{\??colorgroupsetter\s!cmyk}[#1][#2:#3:#4:#5:#6]{\definecolor[#1][c=#2,m=#3=,y=#4,k=#5]}
+\setvalue{\??colorgroupsetter\s!spot}[#1][#2:#3:#4]{\definespotcolor[#1][#2][p=#3]}
+
+%D \macros
+%D {showcolorgroup}
+%D
+%D We can show the group by:
+%D
+%D \startbuffer
+%D \showcolorgroup [blue] [horizontal,name,number,value]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or in color:
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D which uses:
+%D
+%D \showsetup{showcolorgroup}
+
+\fetchmodulecommand \showcolorgroup \f!colo_run
+
+%D There are ten predefined color groups, like \color [green] {\em groen}, \color
+%D [red] {\em rood}, \color [blue] {\em blauw}, \color [cyan] {\em cyaan}, \color
+%D [magenta] {\em magenta} and \color [yellow] {\em geel}.
+%D
+%D \startlinecorrection
+%D \hbox to \hsize
+%D {\hss
+%D \showcolorgroup [red] [vertical,name,number]\hss
+%D \showcolorgroup [green] [vertical,name]\hss
+%D \showcolorgroup [blue] [vertical,name]\hss
+%D \showcolorgroup [cyan] [vertical,name]\hss
+%D \showcolorgroup [magenta][vertical,name]\hss
+%D \showcolorgroup [yellow] [vertical,name]\hss}
+%D \stoplinecorrection
+%D
+%D These groups are used to define palets {\em alfa} upto {\em zeta}. As long as we
+%D don't use colors from the same row, we get ourselves distinctive palets. By
+%D activating such a palet one gains access to its members {\em top} to {\em charm}
+%D (of course one should use more suitable names than these).
+%D
+%D \startlinecorrection
+%D \hbox to \hsize
+%D {\showpalet [alfa] [vertical,name,number]\hss
+%D \showpalet [beta] [vertical,name]\hss
+%D \showpalet [gamma] [vertical,name]\hss
+%D \showpalet [delta] [vertical,name]\hss
+%D \showpalet [epsilon] [vertical,name]\hss
+%D \showpalet [zeta] [vertical,name]}
+%D \stoplinecorrection
+%D
+%D By using the keyword \type {value} the individual color components are shown too.
+%D When printed in color, these showcases show both the colors and the gray value.
+
+%D \macros
+%D {comparecolorgroup}
+%D
+%D The similar command:
+%D
+%D \startbuffer
+%D \comparecolorgroup [blue]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D shows color groups:
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D this commands are defined as:
+%D
+%D \showsetup{comparecolorgroup}
+
+\fetchmodulecommand \comparecolorgroup \f!colo_run
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/colo-ini.mkxl
index e821fb7e282..c096fe90f2c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/colo-ini.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/colo-ini.mkxl
@@ -11,9 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D We need to clean this up further but first we have to make sure that mkiv
-%D code works ok.
-
\writestatus{loading}{ConTeXt Color Macros / Initialization}
%D Todo: move color space in color attribute (last two bits)
@@ -64,10 +61,10 @@
\let\m_colo_weight_gray\v!yes
-\let\currentcolormodel \empty
-\let\currentcolorname \empty
-\let\currentcolorpalet \empty
-\let\currentcolorprefix\empty % \currentcolorpalet:
+\mutable\let\currentcolormodel \empty
+\mutable\let\currentcolorname \empty
+\mutable\let\currentcolorpalet \empty
+\mutable\let\currentcolorprefix\empty % \currentcolorpalet:
%D \macros
%D {definecolor,defineglobalcolor,definenamedcolor,definespotcolor,definemultitonecolor,
@@ -98,16 +95,7 @@
%D \stopcombination
%D \stoptyping
-\unexpanded\def\definecolor {\dodoubleargument\colo_basics_define}
-\unexpanded\def\defineglobalcolor {\dodoubleargument\colo_basics_define_global}
-\unexpanded\def\defineprocesscolor {\dotripleargument\colo_basics_define_process}
-\unexpanded\def\definenamedcolor {\dodoubleargument\colo_basics_define_named}
-\unexpanded\def\definespotcolor {\dotripleargument\colo_basics_define_spot}
-\unexpanded\def\definemultitonecolor {\doquadrupleempty\colo_basics_define_multitone}
-\unexpanded\def\definetransparency {\dodoubleargument\colo_basics_define_transpancy}
-\unexpanded\def\defineglobaltransparency{\dodoubleargument\colo_basics_define_transpancy_global}
-
-\unexpanded\def\loadfoundcolorsetfile#1#2% name foundname / not a user command
+\permanent\protected\def\loadfoundcolorsetfile#1#2% name foundname / not a user command
{\startreadingfile
\startcolorset[#1]%
\input{#2}%
@@ -132,107 +120,104 @@
% \testfeatureonce{100000}{\color[red]{}} % 1.046 => 0.541
-\let\g_color\empty
-\let\g_style\empty
-
-\unexpanded\def\switchtocolor[#1]{\begincsname#1\endcsname}
+\permanent\protected\def\switchtocolor[#1]{\begincsname#1\endcsname}
% transparency
-\unexpanded\def\transparent[#1]%
+\permanent\protected\def\transparent[#1]%
{\bgroup
- \edef\currenttransparencyname{#1}%
+ \edef\scratchstringone{#1}%
% the \relax catches a non existent csname
- \ifx\currenttransparencyname\v!reset
- \attribute\transparencyattribute\attributeunsetvalue
+ \ifx\scratchstringone\v!reset
+ \c_attr_transparency\attributeunsetvalue
\else
- \begincsname\??transparencysetter\currenttransparencyname\endcsname\relax
+ \begincsname\??transparencysetter\scratchstringone\endcsname\relax
\fi
\let\nexttoken}
-\unexpanded\def\starttransparent[#1]%$
+\permanent\protected\def\starttransparent[#1]%$
{\begingroup
- \edef\currenttransparencyname{#1}%
- \ifx\currenttransparencyname\v!reset
- \attribute\transparencyattribute\attributeunsetvalue
+ \edef\scratchstringone{#1}%
+ \ifx\scratchstringone\v!reset
+ \c_attr_transparency\attributeunsetvalue
\else
- \begincsname\??transparencysetter\currenttransparencyname\endcsname\relax
+ \begincsname\??transparencysetter\scratchstringone\endcsname\relax
\fi}
-\unexpanded\def\stoptransparent
+\permanent\protected\def\stoptransparent
{\endgroup}
% color
-\unexpanded\def\coloronly[#1]%
+\permanent\protected\def\coloronly[#1]%
{\bgroup
\edef\currentcolorname{#1}%
- \ifx\currentcolorprefix\empty
+ \ifempty\currentcolorprefix
\colo_helpers_activate_nop_only
\else
\colo_helpers_activate_yes_only
\fi
\let\nexttoken}
-\unexpanded\def\startcoloronly[#1]%$
+\permanent\protected\def\startcoloronly[#1]%$
{\begingroup
\edef\currentcolorname{#1}%
- \ifx\currentcolorprefix\empty
+ \ifempty\currentcolorprefix
\colo_helpers_activate_nop_only
\else
\colo_helpers_activate_yes_only
\fi}
-\unexpanded\def\stopcoloronly
+\permanent\protected\def\stopcoloronly
{\endgroup}
% color + transparency
-\unexpanded\def\color[#1]%
+\permanent\protected\def\color[#1]%
{\bgroup
\edef\currentcolorname{#1}%
- \ifx\currentcolorprefix\empty
+ \ifempty\currentcolorprefix
\colo_helpers_activate_nop
\else
\colo_helpers_activate_yes
\fi
\let\nexttoken}
-\unexpanded\def\graycolor[#1]%
+\permanent\protected\def\graycolor[#1]%
{\bgroup
\colo_helpers_set_model\s!gray\colo_helpers_activate{#1}%
\let\nexttoken}
-\unexpanded\def\startcolor[#1]%$
+\permanent\protected\def\startcolor[#1]%$
{\begingroup
\edef\currentcolorname{#1}%
- \ifx\currentcolorprefix\empty
+ \ifempty\currentcolorprefix
\colo_helpers_activate_nop
\else
\colo_helpers_activate_yes
\fi}
-\unexpanded\def\stopcolor
+\permanent\protected\def\stopcolor
{\endgroup}
-\unexpanded\def\colored[#1]%
+\permanent\protected\def\colored[#1]%
{\bgroup
\colo_basics_defined_and_activated{#1}%
\let\nexttoken}
-\unexpanded\def\fastcolored[#1]#2%
+\permanent\protected\def\fastcolored[#1]#2%
{\begingroup % is this command still needed?
\colo_basics_defined_and_activated{#1}%
#2%
\endgroup}
-\unexpanded\def\directcolored[#1]%
+\permanent\protected\def\directcolored[#1]%
{\colo_basics_defined_and_activated{#1}}
-\unexpanded\def\fastcolor [#1]#2%
+\permanent\protected\def\fastcolor[#1]#2%
{\begingroup % is this command still needed?
\edef\currentcolorname{#1}%
- \ifx\currentcolorprefix\empty
+ \ifempty\currentcolorprefix
\colo_helpers_activate_nop
\else
\colo_helpers_activate_yes
@@ -240,9 +225,9 @@
#2%
\endgroup}
-\unexpanded\def\directcolor[#1]%
+\permanent\protected\def\directcolor[#1]%
{\edef\currentcolorname{#1}%
- \ifx\currentcolorprefix\empty
+ \ifempty\currentcolorprefix
\colo_helpers_activate_nop
\else
\colo_helpers_activate_yes
@@ -250,22 +235,21 @@
%D The following command is obsolete:
-\unexpanded\def\startcolorpage {\startcolor[\ifx\maintextcolor\empty\defaulttextcolor\else\maintextcolor\fi]}
-\unexpanded\def\stopcolorpage {\stopcolor}
+\permanent\protected\def\startcolorpage{\startcolor[\ifempty\maintextcolor\defaulttextcolor\else\maintextcolor\fi]}
+\permanent\protected\def\stopcolorpage {\stopcolor}
-\unexpanded\def\getcolorattributevalue#1#2% obsolete, use \thecolorattribute instead ...
+\permanent\protected\def\getcolorattributevalue#1#2% obsolete, use \thecolorattribute instead ...
{\begingroup
\colo_helpers_activate{#1}%
- \normalexpanded{\endgroup\edef\noexpand#2%
- {\ifnum\attribute\colorattribute=\attributeunsetvalue\else\number\attribute\colorattribute\fi}}}
+ \normalexpanded{\endgroup\edef\noexpand#2{\ifnum\c_attr_color=\attributeunsetvalue\else\number\c_attr_color\fi}}}
-\let\grey\graycolor % these macros are only used in tracing
+% \aliased\let\grey\graycolor % these macros are only used in tracing
%D \macros
%D {startcurrentcolor,stopcurrentcolor}
-\unexpanded\def\startcurrentcolor{\startcolor[\outercolorname]}
-\unexpanded\def\stopcurrentcolor {\stopcolor}
+\permanent\protected\def\startcurrentcolor{\startcolor[\outercolorname]}
+\permanent\protected\def\stopcurrentcolor {\stopcolor}
%D \macros
%D {setupcolor}
@@ -290,11 +274,11 @@
%D \usecolors[dem]
%D \stoptyping
-\unexpanded\def\startcolorset[#1]{\clf_startcolorset{#1}}
-\unexpanded\def\stopcolorset {\clf_stopcolorset}
-\unexpanded\def\usecolors [#1]{\clf_usecolors{#1}}
+\permanent\protected\def\startcolorset[#1]{\clf_startcolorset{#1}}
+\permanent\protected\def\stopcolorset {\clf_stopcolorset}
+\permanent\protected\def\usecolors [#1]{\clf_usecolors{#1}}
-\let\setupcolor\usecolors
+\aliased\let\setupcolor\usecolors
\installsetuponlycommandhandler \??color {colors}
@@ -351,16 +335,16 @@
\newcount\c_colo_nesting
-\unexpanded\def\pushcolor[#1]%
+\permanent\protected\def\pushcolor[#1]%
{\global\advance\c_colo_nesting\plusone
- \expandafter\edef\csname\??colorstack\number\c_colo_nesting\endcsname
- {\attribute\colormodelattribute \the\attribute\colormodelattribute
- \attribute\colorattribute \the\attribute\colorattribute
- \attribute\transparencyattribute\the\attribute\transparencyattribute
+ \edefcsname\??colorstack\number\c_colo_nesting\endcsname
+ {\c_attr_colormodel \the\c_attr_colormodel
+ \c_attr_color \the\c_attr_color
+ \c_attr_transparency\the\c_attr_transparency
\relax}% stack
\colo_helpers_activate{#1}}
-\unexpanded\def\popcolor
+\permanent\protected\def\popcolor
{\csname\??colorstack\number\c_colo_nesting\endcsname
\global\advance\c_colo_nesting\minusone}
@@ -369,13 +353,13 @@
\newcount\c_colo_saved_attribute_color
\newcount\c_colo_saved_attribute_transparency
-\unexpanded\def\savecolor
- {\c_colo_saved_attribute_color \attribute\colorattribute
- \c_colo_saved_attribute_transparency\attribute\transparencyattribute}
+\permanent\protected\def\savecolor
+ {\c_colo_saved_attribute_color \c_attr_color
+ \c_colo_saved_attribute_transparency\c_attr_transparency}
-\unexpanded\def\restorecolor
- {\attribute\colorattribute \c_colo_saved_attribute_color
- \attribute\transparencyattribute\c_colo_saved_attribute_transparency}
+\permanent\protected\def\restorecolor
+ {\c_attr_color \c_colo_saved_attribute_color
+ \c_attr_transparency\c_colo_saved_attribute_transparency}
%D In this documentation we will not go into too much details on palets. Curious
%D users can find more information on this topic in \from[use of color].
@@ -443,8 +427,10 @@
\let\c_colo_palet\relax
\def\colo_palet_allocate#1%
- {\expandafter\let \csname\??paletlist#1\endcsname\empty
- \expandafter\newcount\csname\??paletsize#1\endcsname}
+ {\letcsname\??paletlist#1\endcsname\empty
+ \ifcsname\??paletsize#1\endcsname\else
+ \expandafter\newcount\csname\??paletsize#1\endcsname
+ \fi}
\def\colo_palet_prepare#1%
{\edef\colo_palet_name{#1}%
@@ -453,59 +439,81 @@
\else
\colo_palet_allocate\colo_palet_name
\fi
- \edef\m_colo_palet{\begincsname\??paletlist\colo_palet_name\endcsname}%
- \expandafter\let\expandafter\c_colo_palet\csname\??paletsize\colo_palet_name\endcsname}
+ \enforced\expandafter\let\expandafter\c_colo_palet\csname\??paletsize\colo_palet_name\endcsname
+ \edef\m_colo_palet{\begincsname\??paletlist\colo_palet_name\endcsname}}
\def\colo_palet_extend#1%
{\addtocommalist{#1}\m_colo_palet
- \expandafter\let\csname\??paletlist\colo_palet_name\endcsname\m_colo_palet
+ \letcsname\??paletlist\colo_palet_name\endcsname\m_colo_palet
+ %\advance\csname\??paletsize\colo_palet_name\endcsname\plusone
\advance\c_colo_palet\plusone}
-\unexpanded\def\doifelsecolorpalet#1%
+\permanent\protected\def\doifelsecolorpalet#1%
{\ifcsname\??paletlist#1\endcsname
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\paletlist\empty
-\let\paletsize\!!zerocount
+\mutable\let\paletlist\empty
+\mutable\let\paletsize\!!zerocount
-\unexpanded\def\getpaletlist[#1]%
+\permanent\protected\def\getpaletlist[#1]%
{\edef\paletlist{\begincsname\??paletlist#1\endcsname}}
-\unexpanded\def\getpaletsize[#1]%
+\permanent\protected\def\getpaletsize[#1]%
{\ifcsname\??paletsize#1\endcsname
\edef\paletsize{\the\lastnamedcs}%
\else
\let\paletsize\!!zerocount
\fi}
-\unexpanded\def\definepalet
- {\dotripleempty\colo_palets_define}
-
-\def\colo_palets_define
- {\ifthirdargument
- \expandafter\colo_palets_define_b
- \else
+\permanent\tolerant\protected\def\definepalet[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ \expandafter\gobblethreearguments
+ \or
+ \expandafter\gobblethreearguments
+ \or
\expandafter\colo_palets_define_a
- \fi}
+ \or
+ \expandafter\colo_palets_define_b
+ \fi{#1}{#2}{#3}}
-\unexpanded\def\colo_palets_define_a[#1][#2][#3]%
+\protected\def\colo_palets_define_a#1#2#3%
{\colo_palet_prepare{#1}%
\ifcondition\validassignment{#2}%
- \setevalue{\??colorpaletspecification#1}{#2}%
+ \edefcsname\??colorpaletspecification#1\endcsname{#2}%
\processcommalist[#2]{\colo_palets_define_one{#1}}%
\orelse\ifcsname\??colorpaletspecification#2\endcsname
- \normalexpanded{\colo_palets_define[#1][\lastnamedcs]}%
+ \normalexpanded{\colo_palets_define_b{#1}{\lastnamedcs}\empty}%
\fi}
-\unexpanded\def\colo_palets_define_b[#1][#2][#3]%
+\protected\def\colo_palets_define_b#1#2#3%
{\colo_palet_prepare{#1}%
- \setevalue{\??colorpaletspecification#1}{#2}%
+ \edefcsname\??colorpaletspecification#1\endcsname{#2}%
\colo_palet_extend{#2}%
\colo_palets_define_assign{#1}{#2}{#3}}
+% % or, it being not that critital, just this
+%
+% \permanent\tolerant\protected\def\definepalet[#1]#*[#2]#*[#3]%
+% {\ifarguments
+% \or
+% \or
+% \colo_palet_prepare{#1}%
+% \ifcondition\validassignment{#2}%
+% \setevalue{\??colorpaletspecification#1}{#2}%
+% \processcommalist[#2]{\colo_palets_define_one{#1}}%
+% \orelse\ifcsname\??colorpaletspecification#2\endcsname
+% \normalexpanded{\colo_palets_define_b{#1}{\lastnamedcs}{}}%
+% \fi
+% \or
+% \colo_palet_prepare{#1}%
+% \setevalue{\??colorpaletspecification#1}{#2}%
+% \colo_palet_extend{#2}%
+% \colo_palets_define_assign{#1}{#2}{#3}%
+% \fi}
+
\def\colo_palets_define_one#1#2% get rid of { }
{\ifcondition\validassignment{#2}% catch empty entries
\colo_palets_define_two{#1}[#2]%
@@ -539,14 +547,11 @@
\newtoks\everysetuppalet
-\unexpanded\def\setuppalet
- {\dosingleempty\colo_palets_setup}
-
% \newtoks\t_colo_prefix % used in mp interface
-\def\colo_palets_setup[#1]%
+\permanent\tolerant\protected\def\setuppalet[#1]%
{\edef\currentcolorpalet{#1}%
- \ifx\currentcolorpalet\empty
+ \ifempty\currentcolorpalet
% seems to be a reset
\let\currentcolorprefix\empty
%\t_colo_prefix\emptytoks
@@ -573,7 +578,7 @@
%D
%D \showsetup{showpalet}
-\fetchruntimecommand \showpalet \f!colo_run
+\fetchmodulecommand \showpalet \f!colo_run
%D \macros
%D {showcolorcomponents}
@@ -582,7 +587,7 @@
%D \showcolorcomponents[color-1,color-2]
%D \stoptyping
-\fetchruntimecommand \showcolorcomponents \f!colo_run
+\fetchmodulecommand \showcolorcomponents \f!colo_run
%D \macros
%D {comparepalet}
@@ -605,7 +610,7 @@
%D
%D \showsetup{comparepalet}
-\fetchruntimecommand \comparepalet \f!colo_run
+\fetchmodulecommand \comparepalet \f!colo_run
%D \macros
%D {showcolor}
@@ -621,7 +626,7 @@
%D
%D \showsetup{showcolor}
-\fetchruntimecommand \showcolor \f!colo_run
+\fetchmodulecommand \showcolor \f!colo_run
%D It would make sense to put the following code in \type {colo-mps}, but it it
%D rather low level.
@@ -631,11 +636,8 @@
%D
%D These speak for themselves. See \type {colo-ext} for usage.
-\unexpanded\def\negatecolorcomponent#1% #1 = \macro
- {\edef#1{\clf_negatecolorcomponent{#1}}}
-
-\def\negatedcolorcomponent#1%
- {\clf_negatecolorcomponent{#1}}
+\permanent\protected\def\negatecolorcomponent #1{\edef#1{\clf_negatedcolorcomponent{#1}}}
+\permanent \def\negatedcolorcomponent#1{\clf_negatedcolorcomponent{#1}}
%D \macros
%D {MPcolor}
@@ -670,7 +672,7 @@
% draw btex test etex withprescript \mptexcolor{blue} ;
% \stopMPpage
-\unexpanded\def\setcolormodel[#1]% % beware, \setupcolors will overload this, so this one is
+\permanent\protected\def\setcolormodel[#1]% % beware, \setupcolors will overload this, so this one is
{\colo_helpers_set_model{#1}} % only for local usage
\def\colo_helpers_set_model#1% direct
@@ -687,23 +689,17 @@
\else
\colo_helpers_set_model\s!rgb
\fi
- \else
- \ifconditional\c_colo_cmyk_supported
- \colo_helpers_set_model\s!cmyk
- \else
- \ifconditional\c_colo_convert_gray
- \colo_helpers_set_model\s!gray
- \else
- \colo_helpers_set_model\s!none
- \fi
- \fi
- \fi
- \else
- \ifconditional\c_colo_convert_gray
+ \orelse\ifconditional\c_colo_cmyk_supported
+ \colo_helpers_set_model\s!cmyk
+ \orelse\ifconditional\c_colo_convert_gray
\colo_helpers_set_model\s!gray
\else
\colo_helpers_set_model\s!none
\fi
+ \orelse\ifconditional\c_colo_convert_gray
+ \colo_helpers_set_model\s!gray
+ \else
+ \colo_helpers_set_model\s!none
\fi}
%D Currently in mkiv transparency is implemented independent of color. This costs a
@@ -725,16 +721,16 @@
\letvalue{\??colorsetter -}\empty % used?
\letvalue{\??transparencysetter-}\empty % used?
-% new: expandable (see tbl)
+% new: expandable (see tbl preamble)
-\def\colo_helpers_fast_activate
- {\ifx\currentcolorprefix\empty
- \expandafter\colo_helpers_fast_activate_nop
+\def\colo_helpers_direct_activate
+ {\ifempty\currentcolorprefix
+ \expandafter\colo_helpers_direct_activate_nop
\else
- \expandafter\colo_helpers_fast_activate_yes
+ \expandafter\colo_helpers_direct_activate_yes
\fi}
-\def\colo_helpers_fast_activate_yes#1%
+\def\colo_helpers_direct_activate_yes#1%
{\ifcsname\??colorsetter\currentcolorprefix#1\endcsname
\lastnamedcs
\begincsname\??transparencysetter\currentcolorprefix#1\endcsname
@@ -743,7 +739,7 @@
\begincsname\??transparencysetter#1\endcsname
\fi}
-\def\colo_helpers_fast_activate_nop#1%
+\def\colo_helpers_direct_activate_nop#1%
{\ifcsname\??colorsetter#1\endcsname
\lastnamedcs
\begincsname\??transparencysetter#1\endcsname
@@ -753,16 +749,14 @@
{\begincsname\??colorsetter \v_colo_dummy_name\endcsname
\begincsname\??transparencysetter\v_colo_dummy_name\endcsname}
-\let\dofastcoloractivation\colo_helpers_fast_activate
-
% so far
-\def\colo_helpers_activate#1% two-step is not that much faster but less tracing
+\permanent\protected\def\colo_helpers_activate#1% two-step is not that much faster but less tracing
{\edef\currentcolorname{#1}%
- \ifx\currentcolorprefix\empty
- \expandafter\colo_helpers_activate_nop
+ \ifempty\currentcolorprefix
+ \colo_helpers_activate_nop
\else
- \expandafter\colo_helpers_activate_yes
+ \colo_helpers_activate_yes
\fi}
\def\colo_helpers_activate_yes
@@ -792,14 +786,14 @@
\lastnamedcs
\fi}
-\let\dousecolorparameter\colo_helpers_activate
+\aliased\let\dousecolorparameter\colo_helpers_activate
-\unexpanded\def\dousecolorhashparameter#1#2%
+\permanent\protected\def\dousecolorhashparameter#1#2%
{\ifcsname#1#2\endcsname
\expandafter\dousecolorparameter\csname#1#2\endcsname
\fi}
-\unexpanded\def\dousecurrentcolorparameter
+\permanent\protected\def\dousecurrentcolorparameter
{\let\currentcolorname\currentcolorparameter % maybe only when success
\ifcsname\??colorsetter\currentcolorprefix\currentcolorparameter\endcsname
\lastnamedcs
@@ -809,12 +803,10 @@
\begincsname\??transparencysetter\currentcolorparameter\endcsname
\fi}
-\let\dosetcolorattribute\dousecolorhashparameter % for a while
-
-\unexpanded\def\deactivatecolor % sort of public but a bad name
+\permanent\protected\def\deactivatecolor % sort of public but a bad name
{\let\currentcolorname\s!black
- \attribute\colorattribute\attributeunsetvalue
- \attribute\transparencyattribute\attributeunsetvalue}
+ \c_attr_color \attributeunsetvalue
+ \c_attr_transparency\attributeunsetvalue}
% todo: check if color is overloading a non-color command
@@ -837,97 +829,78 @@
\newcount\c_colo_protection
-\unexpanded\def\startprotectedcolors
- {\advance\c_colo_protection\plusone}
-
-\unexpanded\def\stopprotectedcolors
- {\advance\c_colo_protection\minusone}
+\permanent\protected\def\startprotectedcolors{\advance\c_colo_protection\plusone }
+\permanent\protected\def\stopprotectedcolors {\advance\c_colo_protection\minusone}
-\def\colo_basics_define[#1][#2]%
- {\edef\m_colo_old{#1}%
- \edef\m_colo_new{#2}%
- \ifx\m_colo_old\m_colo_new
+\permanent\tolerant\protected\def\definecolor[#1]#*[#2]%
+ {\iftok{#1}{#2}%
% maybe a warning
\else
\clf_defineprocesscolorlocal{#1}{#2}\v_colo_freeze_state\relax
\colo_basics_synchronize{#1}%
\ifcase\c_colo_protection
- \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}%
+ \protected\instance\defcsname#1\endcsname{\colo_helpers_activate{#1}}%
\fi
\fi}
-\def\colo_basics_define_global[#1][#2]%
- {\edef\m_colo_old{#1}%
- \edef\m_colo_new{#2}%
- \ifx\m_colo_old\m_colo_new
+\permanent\tolerant\protected\def\defineglobalcolor[#1]#*[#2]%
+ {\iftok{#1}{#2}%
% maybe a warning
\else
\clf_defineprocesscolorglobal{#1}{#2}\v_colo_freeze_state\relax
\colo_basics_synchronize{#1}%
\ifcase\c_colo_protection
- \unexpanded\setgvalue{#1}{\colo_helpers_activate{#1}}%
+ \protected\instance\setgvalue{#1}{\colo_helpers_activate{#1}}%
\fi
\fi}
-\let\colo_basics_define_named\colo_basics_define
-
-\def\dodefinefastcolor[#1][#2]% still not fast but ok (might change)
- {\clf_defineprocesscolorlocal{#1}{#2}\v_colo_freeze_state\relax
- \colo_basics_synchronize{#1}%
- \ifcase\c_colo_protection
- \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}%
- \fi}
+\aliased\let\definenamedcolor\definecolor
\def\colo_basics_defined_and_activated#1%
{\clf_defineprocesscolordummy{#1}% we could pass dummy here too
\colo_basics_synchronize{\v_colo_dummy_name}%
\colo_helpers_activate_dummy}
-\def\colo_basics_define_process
- {\ifthirdargument
- \expandafter\colo_basics_define_process_yes
- \else
- \expandafter\colo_basics_define_process_nop
- \fi}
-
-\def\colo_basics_define_process_yes[#1][#2][#3]%
- {\clf_defineprocesscolorlocal{#1}{\processcolorcomponents{#2},#3}\v_colo_freeze_state\relax
- \colo_basics_synchronize{#1}%
- \ifcase\c_colo_protection
- \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}%
+\permanent\tolerant\protected\def\defineprocesscolor[#1]#*[#2]#*[#3]%
+ {\ifarguments\or
+ \colo_basics_define_process_wrapup{#1}\empty
+ \or
+ \colo_basics_define_process_wrapup{#1}{#2}%
+ \or % we could just pass #3 to clf_... also when it's empty ... todo after split
+ \colo_basics_define_process_wrapup{#1}{\processcolorcomponents{#2},#3}%
\fi}
-\def\colo_basics_define_process_nop[#1][#2][#3]%
+\def\colo_basics_define_process_wrapup#1#2%
{\clf_defineprocesscolorlocal{#1}{#2}\v_colo_freeze_state\relax
\colo_basics_synchronize{#1}%
\ifcase\c_colo_protection
- \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}%
+ \protected\instance\defcsname#1\endcsname{\colo_helpers_activate{#1}}%
\fi}
%D Spotcolors used setxvalue but that messes up currentcolor and probably no global
%D is needed either but they are global at the lua end (true argument) so we keep
%D that if only because spot colors often are a document wide property
-\def\colo_basics_define_spot[#1][#2][#3]%
+\permanent\tolerant\protected\def\definespotcolor[#1]#*[#2]#*[#3]%
{\clf_definespotcolorglobal{#1}{#2}{#3}%
\colo_basics_synchronize{#1}%
\ifcase\c_colo_protection
- \unexpanded\setgvalue{#1}{\colo_helpers_activate{#1}}%
+ \protected\instance\setgvalue{#1}{\colo_helpers_activate{#1}}%
\fi}
-\def\colo_basics_define_multitone[#1][#2][#3][#4]%
+\permanent\tolerant\protected\def\definemultitonecolor[#1]#*[#2]#*[#3]#*[#4]%
{\clf_definemultitonecolorglobal{#1}{#2}{#3}{#4}%
\colo_basics_synchronize{#1}%
\ifcase\c_colo_protection
- \unexpanded\setgvalue{#1}{\colo_helpers_activate{#1}}%
+ \protected\instance\setgvalue{#1}{\colo_helpers_activate{#1}}%
\fi}
%D Transparencies (only):
-\def\colo_basics_define_transpancy[#1][#2]%
+\permanent\tolerant\protected\def\definetransparency[#1]#*[#2]%
{\clf_definetransparency{#1}{#2}}
-\def\colo_basics_define_transpancy_global[#1][#2]%
+\permanent\tolerant\protected\def\defineglobaltransparency[#1]#*[#2]%
{\clf_definetransparencyglobal{#1}{#2}}
% A goodie that replaces the startMPcolor hackery
@@ -973,10 +946,7 @@
%
% because the fractional definition results in a new definition.
-\unexpanded\def\defineintermediatecolor
- {\dotripleempty\colo_basics_define_intermediate}
-
-\def\colo_basics_define_intermediate[#1][#2][#3]% \dotripleempty adds {} inside []
+\permanent\tolerant\protected\def\defineintermediatecolor[#1]#*[#2]#*[#3]
{\colo_basics_define_intermediate_indeed[#1][#2][#3]}
\def\colo_basics_define_intermediate_indeed[#1][#2,#3,#4][#5]%
@@ -991,7 +961,7 @@
\v_colo_freeze_state
\relax
\colo_basics_synchronize{#1}%
- \unexpanded\setvalue{#1}{\colo_helpers_activate{#1}}}
+ \protected\instance\defcsname#1\endcsname{\colo_helpers_activate{#1}}}
%D Here is a more efficient helper for pgf:
%D
@@ -1028,11 +998,17 @@
%D \stoptyping
%D
%D \stopmode
+%D
+%D All this will move to m-tikz.mkxl as it doesn't belong in the core. They are
+%D mutable because \quote {who knows what gets redefined}.
+
+\mutable\let\color@ \relax
+\mutable\let\xcolor@\relax
-\def\pgf@context@registercolor#1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\zerocount\thecolorattribute{#1}}}
-\def\pgf@context@registergray #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plustwo \thecolorattribute{#1}}}
-\def\pgf@context@registerrgb #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusthree\thecolorattribute{#1}}}
-\def\pgf@context@registercmyk #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusfour \thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registercolor#1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\zerocount\thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registergray #1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plustwo \thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registerrgb #1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusthree\thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registercmyk #1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusfour \thecolorattribute{#1}}}
%D \starttyping
%D \ifdefined\pgf@context@registercolor
@@ -1046,7 +1022,7 @@
%D Switching to a color is done by means of the following command. Later on we will
%D explain the use of palets. We define ourselves a color conditional first.
-\def\doifelsecolor#1%
+\permanent\def\doifelsecolor#1%
{\ifcsname\??colorattribute\currentcolorprefix#1\endcsname
\expandafter\firstoftwoarguments
\orelse\ifcsname\??colorattribute#1\endcsname
@@ -1055,9 +1031,9 @@
\expandafter\secondoftwoarguments
\fi}
-\let\doifcolorelse\doifelsecolor
+\aliased\let\doifcolorelse\doifelsecolor
-\def\doifcolor#1%
+\permanent\def\doifcolor#1%
{\ifcsname\??colorattribute\currentcolorprefix#1\endcsname
\expandafter\firstofoneargument
\orelse\ifcsname\??colorattribute#1\endcsname
@@ -1090,15 +1066,14 @@
%D \stopregistercolor
%D \stoptyping
-\let\maintextcolor \empty
-\def\defaulttextcolor {black}
-\def\s!themaintextcolor{themaintextcolor}
+\mutable\let\maintextcolor \empty
+\mutable\def\defaulttextcolor{black}
-\unexpanded\def\inheritmaintextcolor
- {\ifx\maintextcolor\empty\else\colo_helpers_activate\maintextcolor\fi}
+\permanent\protected\def\inheritmaintextcolor
+ {\ifempty\maintextcolor\else\colo_helpers_activate\maintextcolor\fi}
-\unexpanded\def\onlyinheritmaintextcolor
- {\ifx\maintextcolor\empty
+\permanent\protected\def\onlyinheritmaintextcolor
+ {\ifempty\maintextcolor
\deactivatecolor
\else
\colo_helpers_activate\maintextcolor
@@ -1115,17 +1090,16 @@
\colo_helpers_activate\maintextcolor
\clf_registermaintextcolor\thecolorattribute\maintextcolor\relax}
-\unexpanded\def\starttextcolor[#1]%
- {\doifsomething{#1}
- {\colo_helpers_switch_to_maintextcolor{#1}}}
+\permanent\protected\def\starttextcolor[#1]%
+ {\doifsomething{#1}{\colo_helpers_switch_to_maintextcolor{#1}}}
-\let\stoptextcolor\relax
+\aliased\let\stoptextcolor\relax
\let\p_colo_textcolor\empty
\def\colo_helpers_initialize_maintextcolor
{\edef\p_colo_textcolor{\directcolorsparameter\c!textcolor}%
- \ifx\p_colo_textcolor\empty
+ \ifempty\p_colo_textcolor
\colo_helpers_switch_to_maintextcolor\defaulttextcolor
\else
\colo_helpers_switch_to_maintextcolor\p_colo_textcolor
@@ -1142,23 +1116,14 @@
\def\colo_helpers_inherited_direct_ts#1{\ifcsname\??transparencysetter #1\endcsname\lastnamedcs\fi}
\def\colo_helpers_inherited_direct_ta#1{\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\!!zerocount\fi}
-% %def\colo_helpers_inherited_palet_cs#1#2{\csname\??colorsetter \ifcsname\??colorsetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-% %def\colo_helpers_inherited_palet_ca#1#2{\csname\??colorattribute \ifcsname\??colorattribute \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-% %def\colo_helpers_inherited_palet_ts#1#2{\csname\??transparencysetter \ifcsname\??transparencysetter \??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-% %def\colo_helpers_inherited_palet_ta#1#2{\csname\??transparencyattribute\ifcsname\??transparencyattribute\??colorpalet#1:#2\endcsname\??colorpalet#1:#2\fi\endcsname}
-%
-% \def\colo_helpers_inherited_palet_cs#1#2{\ifcsname\??colorsetter \??colorpalet#1:#2\endcsname\lastnamedcs\fi}
-% \def\colo_helpers_inherited_palet_ca#1#2{\ifcsname\??colorattribute \??colorpalet#1:#2\endcsname\lastnamedcs\else\!!zerocount\fi}
-% \def\colo_helpers_inherited_palet_ts#1#2{\ifcsname\??transparencysetter \??colorpalet#1:#2\endcsname\lastnamedcs}
-% \def\colo_helpers_inherited_palet_ta#1#2{\ifcsname\??transparencyattribute\??colorpalet#1:#2\endcsname\lastnamedcs\else\!!zerocount\fi}
-
-\let\colo_helpers_set_value\setvalue
+\let\colo_defcsname\defcsname
+\let\colo_endcsname\endcsname
\appendtoks
\ifconditional\c_colo_expanded
- \let\colo_helpers_set_value\setevalue
+ \let\colo_defcsname\edefcsname
\else
- \let\colo_helpers_set_value\setvalue
+ \let\colo_defcsname\defcsname
\fi
\to \everysetupcolors
@@ -1176,53 +1141,60 @@
\def\colo_palets_define_inherit#1#2#3%
{\colo_basics_inherit{#1:#2}{#3}%
- \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_direct_cs{#3}}%
- \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_direct_ca{#3}}%
- \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{#3}}%
- \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{#3}}}
+ \colo_defcsname\??colorsetter #1:#2\colo_endcsname{\colo_helpers_inherited_direct_cs{#3}}%
+ \colo_defcsname\??colorattribute #1:#2\colo_endcsname{\colo_helpers_inherited_direct_ca{#3}}%
+ \colo_defcsname\??transparencysetter #1:#2\colo_endcsname{\colo_helpers_inherited_direct_ts{#3}}%
+ \colo_defcsname\??transparencyattribute#1:#2\colo_endcsname{\colo_helpers_inherited_direct_ta{#3}}}
\def\colo_palets_define_undefine#1#2#3%
- {\localundefine{\??colorsetter #1:#2}%
- \localundefine{\??colorattribute #1:#2}%
- \localundefine{\??transparencysetter #1:#2}%
- \localundefine{\??transparencyattribute#1:#2}}
+ {\letcsname\??colorsetter #1:#2\endcsname\undefined
+ \letcsname\??colorattribute #1:#2\endcsname\undefined
+ \letcsname\??transparencysetter #1:#2\endcsname\undefined
+ \letcsname\??transparencyattribute#1:#2\endcsname\undefined}
\def\colo_palets_define_assign#1#2#3%
{\definecolor[\??colorpalet#1:#2][#3]%
- \colo_helpers_set_value{\??colorsetter #1:#2}{\colo_helpers_inherited_direct_cs{\??colorpalet#1:#2}}%
- \colo_helpers_set_value{\??colorattribute #1:#2}{\colo_helpers_inherited_direct_ca{\??colorpalet#1:#2}}%
- \colo_helpers_set_value{\??transparencysetter #1:#2}{\colo_helpers_inherited_direct_ts{\??colorpalet#1:#2}}%
- \colo_helpers_set_value{\??transparencyattribute#1:#2}{\colo_helpers_inherited_direct_ta{\??colorpalet#1:#2}}}
-
-\setvalue{\??colorattribute currentcolor}{\the\attribute\colorattribute} % for mpcolor
-\setvalue{\??transparencyattribute currentcolor}{\the\attribute\transparencyattribute} % for mpcolor
+ \colo_defcsname\??colorsetter #1:#2\colo_endcsname{\colo_helpers_inherited_direct_cs{\??colorpalet#1:#2}}%
+ \colo_defcsname\??colorattribute #1:#2\colo_endcsname{\colo_helpers_inherited_direct_ca{\??colorpalet#1:#2}}%
+ \colo_defcsname\??transparencysetter #1:#2\colo_endcsname{\colo_helpers_inherited_direct_ts{\??colorpalet#1:#2}}%
+ \colo_defcsname\??transparencyattribute#1:#2\colo_endcsname{\colo_helpers_inherited_direct_ta{\??colorpalet#1:#2}}}
-%def\colo_helpers_inherited_current_ca#1{\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
-%def\colo_helpers_inherited_current_cs#1{\csname\??colorsetter \ifcsname\??colorsetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorsetter #1\endcsname#1\fi\fi\endcsname}
-%def\colo_helpers_inherited_current_ta#1{\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
-%def\colo_helpers_inherited_current_ts#1{\csname\??transparencysetter \ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencysetter #1\endcsname#1\fi\fi\endcsname}
+\setvalue{\??colorattribute currentcolor}{\the\c_attr_color} % for mpcolor
+\setvalue{\??transparencyattribute currentcolor}{\the\c_attr_transparency} % for mpcolor
-\def\colo_helpers_inherited_current_ca#1{\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\!!zerocount\fi\fi}
-\def\colo_helpers_inherited_current_cs#1{\ifcsname\??colorsetter \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??colorsetter #1\endcsname\lastnamedcs\else\fi\fi}
-\def\colo_helpers_inherited_current_ta#1{\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\!!zerocount\fi\fi}
-\def\colo_helpers_inherited_current_ts#1{\ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\lastnamedcs\else\ifcsname\??transparencysetter #1\endcsname\lastnamedcs\else\fi\fi}
+\def\colo_helpers_inherited_current_ca#1{\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\!!zerocount\fi}
+\def\colo_helpers_inherited_current_cs#1{\ifcsname\??colorsetter \currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??colorsetter #1\endcsname\lastnamedcs\fi}
+\def\colo_helpers_inherited_current_ta#1{\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\!!zerocount\fi}
+\def\colo_helpers_inherited_current_ts#1{\ifcsname\??transparencysetter \currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??transparencysetter #1\endcsname\lastnamedcs\fi}
%D Low level defs:
-\unexpanded\def\colordefalc#1#2{\setevalue{\??colorattribute #1}{#2}\setvalue {\??colorsetter #1}{\attribute\colorattribute #2 }}
-\unexpanded\def\colordefagc#1#2{\setxvalue{\??colorattribute #1}{#2}\setgvalue{\??colorsetter #1}{\attribute\colorattribute #2 }} % was not g
-\unexpanded\def\colordefalt#1#2{\setevalue{\??transparencyattribute#1}{#2}\setvalue {\??transparencysetter#1}{\attribute\transparencyattribute#2 }}
-\unexpanded\def\colordefagt#1#2{\setxvalue{\??transparencyattribute#1}{#2}\setgvalue{\??transparencysetter#1}{\attribute\transparencyattribute#2 }}
-
-\unexpanded\def\colordefflc#1#2{\setvalue {\??colorattribute #1}{\colo_helpers_inherited_current_ca{#2}}\setvalue {\??colorsetter #1}{\colo_helpers_inherited_current_cs{#2}}}
-\unexpanded\def\colordeffgc#1#2{\setgvalue{\??colorattribute #1}{\colo_helpers_inherited_current_ca{#2}}\setvalue {\??colorsetter #1}{\colo_helpers_inherited_current_cs{#2}}}
-\unexpanded\def\colordefflt#1#2{\setvalue {\??transparencyattribute#1}{\colo_helpers_inherited_current_ta{#2}}\setvalue {\??transparencysetter#1}{\colo_helpers_inherited_current_ts{#2}}}
-\unexpanded\def\colordeffgt#1#2{\setgvalue{\??transparencyattribute#1}{\colo_helpers_inherited_current_ta{#2}}\setgvalue{\??transparencysetter#1}{\colo_helpers_inherited_current_ts{#2}}}
-
-\unexpanded\def\colordefrlc #1{\localundefine {\??colorattribute #1}\localundefine {\??colorsetter #1}}
-\unexpanded\def\colordefrgc #1{\globalundefine{\??colorattribute #1}\globalundefine{\??colorsetter #1}}
-\unexpanded\def\colordefrlt #1{\localundefine {\??transparencyattribute#1}\localundefine {\??transparencysetter#1}}
-\unexpanded\def\colordefrgt #1{\globalundefine{\??transparencyattribute#1}\globalundefine{\??transparencysetter#1}}
+\permanent\protected\def\colordefalc#1#2{\edefcsname\??colorattribute #1\endcsname{#2}%
+ \defcsname \??colorsetter #1\endcsname{\c_attr_color #2 }}
+\permanent\protected\def\colordefagc#1#2{\xdefcsname\??colorattribute #1\endcsname{#2}%
+ \gdefcsname\??colorsetter #1\endcsname{\c_attr_color #2 }} % was not g
+\permanent\protected\def\colordefalt#1#2{\edefcsname\??transparencyattribute#1\endcsname{#2}%
+ \gdefcsname\??transparencysetter #1\endcsname{\c_attr_transparency#2 }}
+\permanent\protected\def\colordefagt#1#2{\xdefcsname\??transparencyattribute#1\endcsname{#2}%
+ \gdefcsname\??transparencysetter #1\endcsname{\c_attr_transparency#2 }}
+
+\permanent\protected\def\colordefflc#1#2{\defcsname \??colorattribute #1\endcsname{\colo_helpers_inherited_current_ca{#2}}%
+ \defcsname \??colorsetter #1\endcsname{\colo_helpers_inherited_current_cs{#2}}}
+\permanent\protected\def\colordeffgc#1#2{\gdefcsname\??colorattribute #1\endcsname{\colo_helpers_inherited_current_ca{#2}}%
+ \defcsname \??colorsetter #1\endcsname{\colo_helpers_inherited_current_cs{#2}}}
+\permanent\protected\def\colordefflt#1#2{\defcsname \??transparencyattribute#1\endcsname{\colo_helpers_inherited_current_ta{#2}}%
+ \defcsname \??transparencysetter #1\endcsname{\colo_helpers_inherited_current_ts{#2}}}
+\permanent\protected\def\colordeffgt#1#2{\gdefcsname\??transparencyattribute#1\endcsname{\colo_helpers_inherited_current_ta{#2}}%
+ \defcsname \??transparencysetter #1\endcsname{\colo_helpers_inherited_current_ts{#2}}}
+
+\permanent\protected\def\colordefrlc #1{\letcsname \??colorattribute #1\endcsname\undefined
+ \letcsname \??colorsetter #1\endcsname\undefined}
+\permanent\protected\def\colordefrgc #1{\gletcsname\??colorattribute #1\endcsname\undefined
+ \gletcsname\??colorsetter #1\endcsname\undefined}
+\permanent\protected\def\colordefrlt #1{\letcsname \??transparencyattribute#1\endcsname\undefined
+ \letcsname \??transparencysetter #1\endcsname\undefined}
+\permanent\protected\def\colordefrgt #1{\gletcsname\??transparencyattribute#1\endcsname\undefined
+ \gletcsname\??transparencysetter #1\endcsname\undefined}
%D \macros
%D {colorvalue, grayvalue}
@@ -1243,64 +1215,60 @@
%D \getbuffer
%D \stopexample
-\let\currentcolorname\s!black % todo
-\let\outercolorname \s!black % todo
+\mutable\let\currentcolorname\s!black % todo
+\mutable\let\outercolorname \s!black % todo
-\let\colorformatseparator\space
+\mutable\let\colorformatseparator\space
-\def\MPcolor#1%
+\permanent\def\MPcolor#1%
{\clf_mpcolor
- \attribute\colormodelattribute
+ \c_attr_colormodel
\colo_helpers_inherited_current_ca{#1} %
\colo_helpers_inherited_current_ta{#1} }
-\def\MPcoloronly#1%
+\permanent\def\MPcoloronly#1%
{\clf_mpcolor
- \attribute\colormodelattribute
+ \c_attr_colormodel
\colo_helpers_inherited_current_ca{#1} %
\zerocount}
-\def\MPtransparency#1%
+\permanent\def\MPtransparency#1%
{\clf_mpcolor
\zerocount
\zerocount
\colo_helpers_inherited_current_ta{#1} }
-\def\MPoptions#1%
+\permanent\def\MPoptions#1%
{\clf_mpoptions
- \attribute\colormodelattribute
+ \c_attr_colormodel
\colo_helpers_inherited_current_ca{#1} %
\colo_helpers_inherited_current_ta{#1} }
-\def\thecolormodelattribute {\the\attribute\colormodelattribute}
-
-%def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname}
-%def\thetransparencyattribute#1{\number\csname\??transparencyattribute\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??transparencyattribute#1\endcsname#1\fi\fi\endcsname}
+\permanent\def\rawcolormodelattribute {\c_attr_colormodel}
+\permanent\def\thecolormodelattribute {\the\c_attr_colormodel}
-\def\rawcolorattribute #1{\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\zerocount\fi}
-\def\rawtransparencyattribute#1{\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\zerocount\fi}
+\permanent\def\rawcolorattribute #1{\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\zerocount\fi}
+\permanent\def\rawtransparencyattribute#1{\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\zerocount\fi}
-\def\thecolorattribute #1{\number\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\zerocount\fi}
-\def\thetransparencyattribute#1{\number\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\zerocount\fi}
-\def\internalspotcolorname #1{\clf_spotcolorname \thecolorattribute{#1} }
-\def\internalspotcolorparent #1{\clf_spotcolorparent\thecolorattribute{#1} }
-\def\internalspotcolorsize #1{\clf_spotcolorvalue \thecolorattribute{#1} }
+\permanent\def\thecolorattribute #1{\number\ifcsname\??colorattribute \currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??colorattribute #1\endcsname\lastnamedcs\else\zerocount\fi}
+\permanent\def\thetransparencyattribute#1{\number\ifcsname\??transparencyattribute\currentcolorprefix#1\endcsname\lastnamedcs\orelse\ifcsname\??transparencyattribute#1\endcsname\lastnamedcs\else\zerocount\fi}
-\def\colorcomponents #1{\clf_colorcomponents \thecolorattribute {#1} }
-\def\transparencycomponents #1{\clf_transparencycomponents\thetransparencyattribute{#1} }
-\def\processcolorcomponents #1{\clf_processcolorcomponents\thecolorattribute {#1} }
+\permanent\def\internalspotcolorname #1{\clf_spotcolorname \rawcolorattribute{#1}}
+\permanent\def\internalspotcolorparent #1{\clf_spotcolorparent\rawcolorattribute{#1}}
+\permanent\def\internalspotcolorsize #1{\clf_spotcolorvalue \rawcolorattribute{#1}}
-\def\colorvalue #1{\clf_formatcolor\thecolorattribute{#1}{\colorformatseparator}}
-\def\grayvalue #1{\clf_formatgray \thecolorattribute{#1}{\colorformatseparator}}
+\permanent\def\colorcomponents #1{\clf_colorcomponents \rawcolorattribute {#1}}
+\permanent\def\transparencycomponents #1{\clf_transparencycomponents\rawtransparencyattribute{#1}}
+\permanent\def\processcolorcomponents #1{\clf_processcolorcomponents\rawcolorattribute {#1}}
-\def\doifelseblack #1{\clf_doifelseblack\thecolorattribute{#1} }
-\def\doifelsedrawingblack {\clf_doifelsedrawingblack}
+\permanent\def\colorvalue #1{\clf_formatcolor\rawcolorattribute{#1}{\colorformatseparator}}
+\permanent\def\grayvalue #1{\clf_formatgray \rawcolorattribute{#1}{\colorformatseparator}}
-\let\doifblackelse \doifelseblack
-\let\doifdrawingblackelse \doifelsedrawingblack
+\permanent\def\doifelseblack #1{\clf_doifelseblack\rawcolorattribute{#1}}
+\permanent\def\doifelsedrawingblack {\clf_doifelsedrawingblack}
-\let\doifblackelse \doifelseblack
-\let\doifdrawingblackelse\doifelsedrawingblack
+\aliased\let\doifblackelse \doifelseblack
+\aliased\let\doifdrawingblackelse \doifelsedrawingblack
%D \macros
%D {forcecolorhack}
@@ -1322,11 +1290,14 @@
% \normal added else fails in metafun manual (leaders do a hard scan)
-\unexpanded\def\forcecolorhack{\leaders\hrule\hskip\zeropoint\relax} % relax is needed !
+% \protected\def\forcecolorhack{\leaders\hrule\hskip\zeropoint\relax} % relax is needed !
+%
+% I really need to sort this out!
+
+\permanent\protected\def\forcecolorhack{\leaders\hrule\s!height\zeropoint\s!depth\zeropoint\hskip\zeropoint\relax} % relax is needed !
-%D We default to the colors defined in \type {colo-imp-rgb} and
-%D support both \RGB\ and \CMYK\ output. Transparencies are defined
-%D here:
+%D We default to the colors defined in \type {colo-imp-rgb} and support both \RGB\
+%D and \CMYK\ output. Transparencies are defined here:
\definecolor[black][s=0]
\definecolor[white][s=1]
diff --git a/Master/texmf-dist/tex/context/base/mkxl/colo-nod.lmt b/Master/texmf-dist/tex/context/base/mkxl/colo-nod.lmt
new file mode 100644
index 00000000000..67487fee522
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/colo-nod.lmt
@@ -0,0 +1,40 @@
+if not modules then modules = { } end modules ['node-tra'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local nuts = nodes.nuts
+
+local setattrs = nuts.setattrs
+
+local privateattributes = attributes.private
+
+local a_colormodel = privateattributes('colormodel')
+local a_color = privateattributes('color')
+local a_transparency = privateattributes('transparency')
+
+local colors = { }
+nuts.colors = colors
+
+function colors.set(n,ma,ca,ta) -- we could also do layers here
+ if ca then
+ if ca > 0 then
+ if not ma or ma == 0 then
+ ma = 1
+ end
+ if ta then
+ setattrs(n,a_colormodel,ma,a_color,ca,a_transparency,ta)
+ else
+ setattrs(n,a_colormodel,ma,a_color,ca)
+ end
+ end
+ elseif ta then
+ if ta > 0 then
+ setattr(n,a_transparency,ta)
+ end
+ end
+ return n
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/colo-nod.mkxl b/Master/texmf-dist/tex/context/base/mkxl/colo-nod.mkxl
new file mode 100644
index 00000000000..3cc3db03366
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/colo-nod.mkxl
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=colo-nod,
+%D version=2020.12.03,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=Nodes,
+%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 Color Macros / Nodes}
+
+%D In \LMTX\ we moved some code here.
+
+\registerctxluafile{colo-nod}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-cs.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-cs.mkxl
index 8e5ae567cc4..2167b568f92 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-cs.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-cs.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {czech}
-\def\defaultlanguagetag{cs}
+\immutable\def\defaultinterface {czech}
+\immutable\def\defaultlanguagetag{cs}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-de.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-de.mkxl
index 579cc88c3c3..1f54bbb30a0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-de.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-de.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {german}
-\def\defaultlanguagetag{de}
+\immutable\def\defaultinterface {german}
+\immutable\def\defaultlanguagetag{de}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-en.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-en.mkxl
index bfb17ffb3c2..5dd02f7d472 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-en.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-en.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {english}
-\def\defaultlanguagetag{en}
+\immutable\def\defaultinterface {english}
+\immutable\def\defaultlanguagetag{en}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cont-fil.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-fil.mkxl
new file mode 100644
index 00000000000..0ca3bb05acd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-fil.mkxl
@@ -0,0 +1,152 @@
+%D \module
+%D [ file=cont-fil,
+%D version=1997.11.15,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=File Synonyms,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Todo: use full names and remove calls at the tex end (now integrated in \LUA\
+%D library code .. then we can load it at runtime when needed. We can also remove
+%D some of the names that no longer make sense for \LMTX.
+
+\writestatus{loading}{ConTeXt File Synonyms}
+
+\definefilesynonym [chemics] [chemic]
+
+\definefilesynonym [unit] [units]
+
+\definefilesynonym [pstric] [pstricks]
+\definefilesynonym [pstrick] [pstricks]
+
+\definefilesynonym [finance] [financ]
+
+\definefilesynonym [dir-make] [dir-01]
+\definefilesynonym [dir-identify] [dir-05]
+
+\definefilesynonym [int-load] [set-11]
+\definefilesynonym [int-make] [set-12]
+
+ \definefilesynonym [fig-base] [fig-00]
+ \definefilesynonym [fig-make] [fig-01]
+ \definefilesynonym [fig-fake] [fig-02]
+ \definefilesynonym [fig-missing] [fig-06]
+
+ \definefilesynonym [exi-interface] [exi-21]
+
+ \definefilesynonym [res-make] [res-01]
+ \definefilesynonym [res-base] [res-04]
+ \definefilesynonym [res-crop] [res-07]
+ \definefilesynonym [res-trace] [res-08]
+ \definefilesynonym [res-log] [res-09]
+ \definefilesynonym [res-identify] [res-12]
+
+ \definefilesynonym [med-show] [res-50]
+
+\definefilesynonym [pre-general] [pre-00]
+\definefilesynonym [pre-original] [present-original]
+\definefilesynonym [pre-green] [present-green]
+\definefilesynonym [pre-funny] [present-funny]
+\definefilesynonym [pre-colorful] [present-colorful]
+\definefilesynonym [pre-fuzzy] [present-fuzzy]
+\definefilesynonym [pre-polish] [pre-06]
+\definefilesynonym [pre-spider] [pre-07]
+\definefilesynonym [pre-wonder] [pre-08]
+\definefilesynonym [pre-windows] [present-windows]
+\definefilesynonym [pre-grow] [present-grow]
+\definefilesynonym [pre-stack] [present-stack]
+\definefilesynonym [pre-split] [present-split]
+\definefilesynonym [pre-balls] [present-balls]
+\definefilesynonym [pre-weird] [present-weird]
+\definefilesynonym [pre-stepwise] [present-stepwise]
+\definefilesynonym [pre-stepper] [present-stepper]
+\definefilesynonym [pre-punk] [present-punk]
+\definefilesynonym [pre-random] [present-random]
+
+\definefilesynonym [pre-arrows] [pre-12]
+\definefilesynonym [pre-writing] [pre-13]
+\definefilesynonym [pre-knot] [pre-16]
+\definefilesynonym [pre-shade] [pre-18]
+\definefilesynonym [pre-organic] [pre-19]
+\definefilesynonym [pre-speckle] [pre-20]
+\definefilesynonym [pre-zoom] [pre-21]
+\definefilesynonym [pre-cycle] [pre-22]
+\definefilesynonym [pre-super] [pre-23]
+\definefilesynonym [pre-more] [pre-26]
+
+\definefilesynonym [pre-01] [present-original]
+\definefilesynonym [pre-02] [present-green]
+\definefilesynonym [pre-03] [present-funny]
+\definefilesynonym [pre-04] [present-colorful]
+\definefilesynonym [pre-05] [present-fuzzy]
+\definefilesynonym [pre-09] [present-windows]
+\definefilesynonym [pre-10] [present-grow]
+\definefilesynonym [pre-11] [present-stack]
+\definefilesynonym [pre-14] [present-split]
+\definefilesynonym [pre-15] [present-balls]
+\definefilesynonym [pre-17] [present-weird]
+\definefilesynonym [pre-41] [present-tiles]
+\definefilesynonym [pre-60] [present-stepwise]
+\definefilesynonym [pre-61] [present-stepper]
+\definefilesynonym [pre-62] [present-overlap]
+\definefilesynonym [pre-69] [present-wobbling]
+\definefilesynonym [pre-70] [present-punk]
+\definefilesynonym [pre-71] [present-random]
+
+\definefilesynonym [abr-01] [abbreviations-pseudocaps]
+\definefilesynonym [abr-02] [abbreviations-smallcaps]
+\definefilesynonym [abr-03] [abbreviations-words]
+\definefilesynonym [abr-04] [abbreviations-mixed]
+
+\definefilesynonym [art-01] [article-basic]
+\definefilesynonym [article] [article-basic]
+\definefilesynonym [mag-01] [magazine-basic]
+\definefilesynonym [magazine] [magazine-basic]
+\definefilesynonym [mod-01] [module-basic]
+\definefilesynonym [module] [module-basic]
+
+\definefilesynonym [map-10] [maps] % for a while
+
+\definefilesynonym [mml] [mathml]
+\definefilesynonym [cml] [chemml]
+
+\definefilesynonym [letter] [cor-01]
+\definefilesynonym [memo] [cor-02]
+\definefilesynonym [resume] [cor-03]
+
+\definefilesynonym [fnt-10] [fonts-complete]
+\definefilesynonym [fnt-11] [fonts-system]
+\definefilesynonym [fnt-20] [fonts-steps]
+\definefilesynonym [fnt-21] [fonts-steps]
+\definefilesynonym [fnt-22] [fonts-engines]
+\definefilesynonym [fnt-23] [fonts-shapes]
+\definefilesynonym [fnt-24] [fonts-cjk]
+\definefilesynonym [fnt-25] [math-characters]
+\definefilesynonym [fnt-28] [fonts-goodies]
+\definefilesynonym [fnt-29] [fonts-shapes]
+\definefilesynonym [fnt-31] [fonts-coverage]
+\definefilesynonym [fnt-33] [math-coverage]
+
+\definefilesynonym [mat-10] [math-characters]
+\definefilesynonym [mat-11] [math-characters]
+\definefilesynonym [mat-12] [math-parameters]
+\definefilesynonym [mat-20] [math-parameters]
+
+\definefilesynonym [syn-01] [syntax]
+
+\definefilesynonym [reg-01] [regimes-list]
+
+\definefilesynonym [set-11] [setups-basics]
+\definefilesynonym [set-12] [setups-overview]
+%definefilesynonym [set-13] [setups-proofing]
+%definefilesynonym [set-15] [setups-generate]
+
+\definefilesynonym [ecmascript] [libs-imp-mujs]
+\definefilesynonym [zint] [libs-imp-zint]
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-fr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-fr.mkxl
index bedae536b66..baee1ec71c8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-fr.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-fr.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {french}
-\def\defaultlanguagetag{fr}
+\immutable\def\defaultinterface {french}
+\immutable\def\defaultlanguagetag{fr}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-gb.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-gb.mkxl
index 464b237da87..0c3197a3e66 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-gb.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-gb.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {english}
-\def\defaultlanguagetag{gb}
+\immutable\def\defaultinterface {english}
+\immutable\def\defaultlanguagetag{gb}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-it.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-it.mkxl
index 1702a872fa4..0491c2efd7a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-it.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-it.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {italian}
-\def\defaultlanguagetag{it}
+\immutable\def\defaultinterface {italian}
+\immutable\def\defaultlanguagetag{it}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cont-log.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-log.mkxl
new file mode 100644
index 00000000000..4df509f608f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-log.mkxl
@@ -0,0 +1,306 @@
+%D \module
+%D [ file=cont-log,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=\TEX\ Logos,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 TeX Logos}
+
+%D The system that is used to typeset this text is called \TEX, typeset with an
+%D lowered~E. From te beginning of \TEX, authors of macro packages adapted this
+%D raising and lowering style. In this module we define some of those logos.
+
+%D We define the uppercase logo commands as (unfrozen) instances because they can be
+%D redefined in the synonyms modules.
+
+\unprotect
+
+\frozen\instance\protected\def\TeX
+ {\dontleavehmode
+ \begingroup
+ T%
+ \setbox\scratchbox\hbox{M}%
+ \kern-.1667\wd\scratchbox
+ \lower.5\exheight\hbox{E}%
+ \kern-.125\wd\scratchbox
+ X%
+ \endgroup}
+
+\frozen\instance\protected\def\TeXsuffix{\wordboundary\TeX}
+\frozen\instance\protected\def\TeXprefix{\TeX\wordboundary}
+
+\frozen\instance\protected\def\ConTeXt
+ {\dontleavehmode
+ \begingroup
+ Con%
+ \wordboundary
+ \setbox\scratchboxone\hbox{T\kern\zeropoint e}%
+ \setbox\scratchboxtwo\hbox{Te}%
+ \discretionary{-}{}{\kern\dimexpr\wd\scratchboxtwo-\wd\scratchboxone\relax}%
+ \TeX t%
+ \endgroup}
+
+\frozen\instance\protected\def\PPCHTeX{ppch\TeX}
+
+\frozen\instance\protected\def\LaTeX % requested by erik frambach
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\hbox{L}%
+ \scratchdimen\ht\scratchbox
+ \setbox\scratchbox\hbox{\doresetattribute{case}\txx A}%
+ L\kern-.55\wd\scratchbox
+ \raise\scratchdimen\hbox{\lower\ht\scratchbox\copy\scratchbox}%
+ \kern-.2\wd\scratchbox\TeX
+ \endgroup}
+
+\frozen\instance\protected\def\TaBlE
+ {T%
+ \kern-.27\emwidth\lower.5\exheight\hbox{A}%
+ \kern-.18\emwidth B%
+ \kern-.1\emwidth\lower.5\exheight\hbox{L}%
+ \kern-.075\emwidth E}
+
+\frozen\instance\protected\def\PiCTeX
+ {P%
+ \kern-.12\emwidth\lower.5\exheight\hbox{I}%
+ \kern-.075\emwidth C%
+ \kern-.11\emwidth\TeX}
+
+\def\syst_logos_ams_script#1%
+ {\normalstartimath
+ \cal\ifdim\bodyfontsize>1.1\emwidth\scriptstyle\fi#1%
+ \normalstopimath}
+
+\frozen\instance\protected\def\AmSTeX
+ {\dontleavehmode
+ \syst_logos_ams_script A%
+ \kern-.1667\emwidth\lower.5\exheight\hbox{\syst_logos_ams_script M}%
+ \kern-.125\emwidth\syst_logos_ams_script S%
+ -\TeX}
+
+\frozen\instance\protected\def\LamSTeX
+ {L%
+ \kern-.4\emwidth\raise.3\exheight\hbox{\syst_logos_ams_script A}%
+ \kern-.25\emwidth\lower.4\exheight\hbox{\syst_logos_ams_script M}%
+ \kern-.1\emwidth{\syst_logos_ams_script S}%
+ -\TeX}
+
+%D Alternative \CONTEXT\ logo, first Idris S.~Hamid's version:
+%D
+%D \def\Context
+%D {{\sc C\kern -.0667emo\kern -.0667emn\kern -.0549emt\kern
+%D -.1667em\lower.5ex\hbox {e}\kern -.125emx\kern -.0549emt}}
+%D
+%D I changed this into one that adapts itself:
+
+\frozen\instance\protected\def\Context % wrong usage of \getscaledglyph
+ {\dontleavehmode
+ \begingroup
+ C%
+ \kern -.0667\emwidth
+ \getscaledglyph{.8}\empty{%
+ O\kern-.0667\emwidth
+ N%
+ \discretionary{-}{}{\kern-.0549\emwidth}%
+ T%
+ \doifelseitalic{\kern-.1\emwidth}{\kern-.1667\emwidth}%
+ \lower.5\exheight\hbox{E}%
+ \doifelseitalic\empty{\kern-.11em}%
+ X%
+ \kern-.055\emwidth
+ T%
+ }%
+ \endgroup}
+
+%D The \METAFONT\ and \METAPOST\ logos adapt themselves to the current fontsize, an
+%D ugly but usefull hack.
+
+\mutable\let\logofont\nullfont
+
+% \loadmapfile[original-base.map] % stil needed? not if we assume afm
+
+\permanent\protected\def\setMFPfont% more sensitive for low level changes
+ {\font\logofont=logo%
+ \ifx\fontalternative\s!bf\s!bf\orelse
+ \ifx\fontalternative\s!it\s!sl\orelse
+ \ifx\fontalternative\s!sl\s!sl\orelse
+ \ifx\fontalternative\s!bi\s!bf\orelse
+ \ifx\fontalternative\s!bs\s!bf\fi
+ 10 at \currentfontscale\bodyfontsize % there is no afm in the minimals yet
+ \logofont}
+
+\def\syst_logos_meta_hyphen % there is no hyphenchar in this font
+ {\discretionary{\vrule\s!height.33\emwidth\s!depth-.27\emwidth\s!width.33\emwidth}{}{}}
+
+\frozen\instance\protected\def\MetaFontLogo
+ {\dontleavehmode
+ \begingroup
+ \setMFPfont META\syst_logos_meta_hyphen FONT%
+ \endgroup}
+
+\protected\def\MetaPostLogo
+ {\dontleavehmode
+ \begingroup
+ \setMFPfont META\syst_logos_meta_hyphen POST%
+ \endgroup}
+
+% \protected\def\MetaFunLogo
+% {\dontleavehmode
+% \begingroup
+% \setMFPfont META\syst_logos_meta_hyphen FUN%
+% \endgroup}
+
+% As decided on the ConText Meeting 2013 the logo has been simplified:
+
+\instance\protected\def\MetaFont{MetaFont}
+\instance\protected\def\MetaPost{MetaPost}
+\instance\protected\def\MetaFun {MetaFun}
+
+%D \macros
+%D {TEX, METAFONT, METAPOST, METAFUN,
+%D PICTEX, TABLE,
+%D CONTEXT, PPCHTEX,
+%D AMSTEX, LATEX, LAMSTEX}
+%D
+%D We define the funny written ones as well as the less error prone upper case names
+%D (in \CONTEXT\ we tend to write all user defined commands, like abbreviations, in
+%D uppercase.)
+
+\instance\protected\def\METAFONT{\MetaFont}
+\instance\protected\def\METAPOST{\MetaPost}
+\instance\protected\def\PPCHTEX {\PPCHTeX}
+\instance\protected\def\CONTEXT {\ConTeXt}
+\instance\protected\def\METAFUN {\MetaFun}
+
+\instance\protected\def\TEX {\TeX}
+\instance\protected\def\LATEX {\LaTeX}
+\instance\protected\def\PICTEX {\PiCTeX}
+\instance\protected\def\TABLE {\TaBlE}
+\instance\protected\def\AMSTEX {\AmSTeX}
+\instance\protected\def\LAMSTEX {\LamSTeX}
+\instance\protected\def\INRSTEX {inrs\TeX}
+
+\instance\protected\def\PRAGMA {Pragma ADE}
+
+%D And this is how they show up: \TeX, \MetaFont, \MetaPost, \PiCTeX, \TaBlE, \ConTeXt,
+%D \PPCHTeX, \AmSTeX, \LaTeX, \LamSTeX.
+
+%D Some placeholders:
+
+%frozen\instance\protected\def\eTeX {\mathematics{\varepsilon}-\TeX}
+\frozen\instance\protected\def\eTeX {{\tf \nocap $\varepsilon$}-\TeX} % compact mode hack for epsilon
+\frozen\instance\protected\def\pdfTeX {pdf\wordboundary\TeX}
+\frozen\instance\protected\def\pdfeTeX {pdfe-\wordboundary\TeX}
+\frozen\instance\protected\def\luaTeX {lua\wordboundary\TeX}
+\frozen\instance\protected\def\Lua {Lua}
+\frozen\instance\protected\def\luajitTeX {lua\wordboundary jit\wordboundary\TeX}
+\frozen\instance\protected\def\luametaTeX{lua\wordboundary meta\wordboundary\TeX}
+\frozen\instance\protected\def\XeTeX {X\lower.5\exheight\hbox{\kern-.15\emwidth\mirror{E}}\kern-.1667\emwidth\TeX}
+
+% Adapted from a patch by Mojca:
+
+\def\syst_logos_xetex_e
+ {\setbox\scratchbox\hbox{E}%
+ \raise\dimexpr\ht\scratchbox+\dp\scratchbox\relax\hbox{\rotate[\c!rotation=180]{\box\scratchbox}}}
+
+\frozen\instance\protected\def\XeTeX
+ {X\lower.5\exheight
+ \hbox
+ {\kern-.15\emwidth
+ \iffontchar\font"018E\relax
+ \char"018E%
+ \else
+ \ifx\fontalternative\s!bf \mirror{E}\orelse
+ \ifx\fontalternative\s!it\syst_logos_xetex_e\orelse
+ \ifx\fontalternative\s!sl\syst_logos_xetex_e\orelse
+ \ifx\fontalternative\s!bi\syst_logos_xetex_e\orelse
+ \ifx\fontalternative\s!bs\syst_logos_xetex_e\else
+ \mirror{E}\fi
+ \fi}%
+ \kern-.1667\emwidth\TeX}
+
+\instance\protected\def\ETEX {\eTeX}
+\instance\protected\def\PDFTEX {\pdfTeX}
+\instance\protected\def\PDFETEX {\pdfeTeX}
+\instance\protected\def\LUATEX {\luaTeX}
+\instance\protected\def\LUAJITTEX {\luajitTeX}
+\instance\protected\def\LuaTeX {\luaTeX}
+\instance\protected\def\LuaMetaTeX{\luametaTeX}
+\instance\protected\def\LUAMETATEX{\luametaTeX}
+\instance\protected\def\XETEX {\XeTeX}
+
+\frozen\instance\protected\def\LuaTeX
+ {\dontleavehmode
+ \begingroup
+ Lua%
+ % hope for kerning, try aT
+ \setbox0\hbox{aT}%
+ \setbox2\hbox{a\kern\zeropoint T}%
+ \ifdim\wd0=\wd2 % kerns can go two ways
+ % no aT kerning, try oT as a is not symmetrical
+ \setbox0\hbox{oT}%
+ \setbox2\hbox{o\kern\zeropoint T}%
+ \ifdim\wd0=\wd2 % kerns can go two ways
+ % no aT and oT kerning, try To
+ \setbox0\hbox{To}%
+ \setbox2\hbox{T\kern\zeropoint o}%
+ % maybe we need to compensate for the angle (sl/it/bs/bi)
+ \fi
+ \ifdim\wd0=\wd2\else
+ \kern\dimexpr\wd0-\wd2\relax
+ \fi
+ \fi
+ \TeX
+ \endgroup}
+
+\frozen\instance\protected\def\LuajitTeX
+ {\dontleavehmode
+ \begingroup
+ % at this moment there is no real need for kerning tT
+ Luajit\kern\zeropoint\TeX
+ \endgroup}
+
+\frozen\instance\let\luaTeX \LuaTeX
+\frozen\instance\let\luajitTeX\LuajitTeX
+
+\instance\protected\def\LUATEX {\LuaTeX}
+\instance\protected\def\LUAJITTEX{\LuajitTeX}
+
+\instance\protected\def\MKII{MkII} % MarkTwo
+\instance\protected\def\MKIV{MkIV} % MarkFour : MKIV
+\instance\protected\def\MKVI{MkVI} % MarkSix : MKIV
+\instance\protected\def\MKXL{MkXL} % MarkFourty : LMTX
+\instance\protected\def\MKLX{MkLX} % MarkSixty : LMTX
+\instance\protected\def\MKIX{MkIX} % : MKIV / LMTX
+\instance\protected\def\MKXI{MkXI} % : MKIV / LMTX
+
+\instance\protected\def\MPII{MpII} % MarkTwo
+\instance\protected\def\MPIV{MpIV} % MarkFour : MetaFun
+\instance\protected\def\MPVI{MpVI} % MarkSix : MetaFun
+\instance\protected\def\MPXL{MpXL} % MarkFourty : LuaMetaFun
+\instance\protected\def\MPLX{MpLX} % MarkSixty : LuaMetaFun
+
+\instance\protected\def\LMTX{LMTX} % for LuaMetaTeX
+
+\appendtoks
+ \enforced\instance\def\ConTeXt {ConTeXt}%
+ \enforced\instance\def\MetaPost {MetaPost}%
+ \enforced\instance\def\MetaFont {MetaFont}%
+ \enforced\instance\def\MetaFun {MetaFun}%
+ \enforced\instance\def\TeX {TeX}%
+ \enforced\instance\let\TeXsuffix \TeX
+ \enforced\instance\let\TeXprefix \TeX
+ \enforced\instance\def\LuaTeX {LuaTeX}%
+ \enforced\instance\def\LuajitTeX {LuajitTeX}%
+ \enforced\instance\def\LuaMetaTeX{LuaMetaTeX}%
+ %\let\wordboundary\empty % primitive so we need to promote it to frozen (orjust preroll)
+\to \everysimplifycommands
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl
new file mode 100644
index 00000000000..b60dd2dddd4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-new.mkxl
@@ -0,0 +1,54 @@
+%D \module
+%D [ file=cont-new,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=New Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% \normalend % uncomment this to get the real base runtime
+
+\newcontextversion{2021.03.05 19:11}
+
+%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
+%D (which has always been the case) and experimental code in cont-exp (which is also
+%D so old that I need to remind myself to check it occasionally, so here is the
+%D reminder).
+
+% \enabletrackers[pages.timing]
+% \enabletrackers[system.usage=summary]
+
+\unprotect
+
+\writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
+
+%D I need to verify if this indeed will make it into \type {math-ini.mkiv}, that is:
+%D does Alan use it?
+
+\ifdefined\t \else \permanent\protected\def\t{\mathortext\text\mathtext} \fi
+\ifdefined\w \else \permanent\protected\def\w{\mathortext\word\mathword} \fi
+
+\appendtoks
+ \enforced\aliased\let\t\mathtext
+ \enforced\aliased\let\w\mathword
+\to \everymathematics
+
+% so we need to be able to load modules in ini mode
+
+\pushoverloadmode
+ % charts needs these
+ \overloaded\unletfrozen\name % for now
+ \mutable\let\name\name
+ \mutable\let\text\text
+ \overloaded\frozen\let\type\type
+\popoverloadmode
+
+%D We're done.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-nl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-nl.mkxl
index 1f00e7e892f..5e74114e5b6 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-nl.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-nl.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {dutch}
-\def\defaultlanguagetag{nl}
+\immutable\def\defaultinterface {dutch}
+\immutable\def\defaultlanguagetag{nl}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-pe.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-pe.mkxl
index 82bf7372195..2242c3e0dda 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-pe.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-pe.mkxl
@@ -13,9 +13,9 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {persian}
-\def\messageinterface {english}
-\def\defaultlanguagetag{pe}
+\immutable\def\defaultinterface {persian}
+\immutable\def\messageinterface {english}
+\immutable\def\defaultlanguagetag{pe}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-ro.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-ro.mkxl
index 6d636c7dc87..ced28ba3d95 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/cont-ro.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-ro.mkxl
@@ -13,8 +13,8 @@
\catcode`\{=1 \catcode`\}=2
-\def\defaultinterface {romanian}
-\def\defaultlanguagetag{ro}
+\immutable\def\defaultinterface {romanian}
+\immutable\def\defaultlanguagetag{ro}
\input context.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cont-run.lmt b/Master/texmf-dist/tex/context/base/mkxl/cont-run.lmt
new file mode 100644
index 00000000000..76fd6ba249b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-run.lmt
@@ -0,0 +1,311 @@
+if not modules then modules = { } end modules ['cont-run'] = {
+ version = 1.001,
+ comment = "companion to cont-yes.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- When a style is loaded there is a good change that we never enter
+-- this code.
+
+
+local type, tostring = type, tostring
+
+local report_sandbox = logs.reporter("sandbox","call")
+local report_system = logs.reporter("system")
+local fastserialize = table.fastserialize
+local quoted = string.quoted
+local possiblepath = sandbox.possiblepath
+
+local context = context
+local implement = interfaces.implement
+
+local qualified = { }
+local writeable = { }
+local readable = { }
+local blocked = { }
+local trace_files = false
+local trace_calls = false
+local nofcalls = 0
+local nofrejected = 0
+local logfilename = "sandbox.log"
+
+local function registerstats()
+ statistics.register("sandboxing", function()
+ if trace_files then
+ return string.format("%i calls, %i rejected, logdata in '%s'",nofcalls,nofrejected,logfilename)
+ else
+ return string.format("%i calls, %i rejected",nofcalls,nofrejected)
+ end
+ end)
+ registerstats = false
+end
+
+local function logsandbox(details)
+ local comment = details.comment
+ local result = details.result
+ local arguments = details.arguments
+ for i=1,#arguments do
+ local argument = arguments[i]
+ local t = type(argument)
+ if t == "string" then
+ arguments[i] = quoted(argument)
+ if trace_files and possiblepath(argument) then
+ local q = qualified[argument]
+ if q then
+ local c = q[comment]
+ if c then
+ local r = c[result]
+ if r then
+ c[result] = r + 1
+ else
+ c[result] = r
+ end
+ else
+ q[comment] = {
+ [result] = 1
+ }
+ end
+ else
+ qualified[argument] = {
+ [comment] = {
+ [result] = 1
+ }
+ }
+ end
+ end
+ elseif t == "table" then
+ arguments[i] = fastserialize(argument)
+ else
+ arguments[i] = tostring(argument)
+ end
+ end
+ if trace_calls then
+ report_sandbox("%s(%,t) => %l",details.comment,arguments,result)
+ end
+ nofcalls = nofcalls + 1
+ if not result then
+ nofrejected = nofrejected + 1
+ end
+end
+
+local ioopen = sandbox.original(io.open) -- dummy call
+
+local function logsandboxfiles(name,what,asked,okay)
+ -- we're only interested in permitted access
+ if not okay then
+ blocked [asked] = blocked [asked] or 0 + 1
+ elseif what == "*" or what == "w" then
+ writeable[asked] = writeable[asked] or 0 + 1
+ else
+ readable [asked] = readable [asked] or 0 + 1
+ end
+end
+
+function sandbox.logcalls()
+ if not trace_calls then
+ trace_calls = true
+ sandbox.setlogger(logsandbox)
+ if registerstats then
+ registerstats()
+ end
+ end
+end
+
+function sandbox.logfiles()
+ if not trace_files then
+ trace_files = true
+ sandbox.setlogger(logsandbox)
+ sandbox.setfilenamelogger(logsandboxfiles)
+ luatex.registerstopactions(function()
+ table.save(logfilename,{
+ calls = {
+ nofcalls = nofcalls,
+ nofrejected = nofrejected,
+ filenames = qualified,
+ },
+ checkednames = {
+ readable = readable,
+ writeable = writeable,
+ blocked = blocked,
+ },
+ })
+ end)
+ if registerstats then
+ registerstats()
+ end
+ end
+end
+
+trackers.register("sandbox.tracecalls",sandbox.logcalls)
+trackers.register("sandbox.tracefiles",sandbox.logfiles)
+
+local sandboxing = environment.arguments.sandbox
+local debugging = environment.arguments.debug
+
+if sandboxing then
+
+ report_system("enabling sandbox")
+
+ sandbox.enable()
+
+ if type(sandboxing) == "string" then
+ sandboxing = utilities.parsers.settings_to_hash(sandboxing)
+ if sandboxing.calls then
+ sandbox.logcalls()
+ end
+ if sandboxing.files then
+ sandbox.logfiles()
+ end
+ end
+
+ -- Nicer would be if we could just disable write 18 and keep os.execute
+ -- which in fact we can do by defining write18 as macro instead of
+ -- primitive ... todo ... well, it has been done now.
+
+ -- We block some potential escapes from protection.
+
+ context [[\let\primitive\relax\let\normalprimitive\relax]]
+
+ debug = {
+ traceback = debug.traceback,
+ }
+
+ package.loaded.debug = debug
+
+elseif debugging then
+
+ -- we keep debug
+
+else
+
+ debug = {
+ traceback = debug.traceback,
+ getinfo = debug.getinfo,
+ sethook = debug.sethook,
+ }
+
+ package.loaded.debug = debug
+
+end
+
+local function processjob()
+
+ tokens.setters.macro("processjob","","permanent")
+
+ environment.initializefilenames() -- todo: check if we really need to pre-prep the filename
+
+ local arguments = environment.arguments
+ local suffix = environment.suffix
+ local filename = environment.filename -- hm, not inputfilename !
+
+ environment.lmtxmode = CONTEXTLMTXMODE -- should be true
+
+ if arguments.nosynctex then
+ luatex.synctex.setup {
+ state = interfaces.variables.never,
+ }
+ elseif arguments.synctex then
+ luatex.synctex.setup {
+ state = interfaces.variables.start,
+ method = interfaces.variables.max,
+ }
+ end
+
+ local overloadmode = arguments.overloadmode
+
+ if overloadmode == "warning" then
+ overloadmode = 3 -- 5
+ elseif overloadmode == "error" then
+ overloadmode = 4 -- 6
+ else
+ overloadmode = tonumber(overloadmode)
+ end
+
+ if overloadmode then
+ tex.set("overloadmode",overloadmode)
+ end
+
+ if not filename or filename == "" then
+ -- skip
+ elseif suffix == "xml" or arguments.forcexml then
+
+ -- Maybe we should move the preamble parsing here as it
+ -- can be part of (any) loaded (sub) file. The \starttext
+ -- wrapping might go away.
+
+ report_system("processing as xml: %s",filename)
+
+ context.starttext()
+ context.xmlprocess("main",filename,"")
+ context.stoptext()
+
+ elseif suffix == "cld" or arguments.forcecld then
+
+ report_system("processing as cld: %s",filename)
+
+ context.runfile(filename)
+
+ elseif suffix == "lua" or arguments.forcelua then
+
+ -- The wrapping might go away. Why is is it there in the
+ -- first place.
+
+ report_system("processing as lua: %s",filename)
+
+ context.starttext()
+ context.ctxlua(string.format('dofile("%s")',filename))
+ context.stoptext()
+
+ elseif suffix == "mp" or arguments.forcemp then
+
+ report_system("processing as metapost: %s",filename)
+
+ context.starttext()
+ context.processMPfigurefile(filename)
+ context.stoptext()
+
+ -- elseif suffix == "prep" then
+ --
+ -- -- Why do we wrap here. Because it can be xml? Let's get rid
+ -- -- of prepping in general.
+ --
+ -- context.starttext()
+ -- context.input(filename)
+ -- context.stoptext()
+
+ elseif suffix == "mps" or arguments.forcemps then
+
+ report_system("processing metapost output: %s",filename)
+
+ context.starttext()
+ context.startTEXpage()
+ context.externalfigure { filename }
+ context.stopTEXpage()
+ context.stoptext()
+
+ else
+
+ -- \writestatus{system}{processing as tex}
+ -- We have a regular tex file so no \starttext yet as we can
+ -- load fonts.
+ -- context.enabletrackers { "resolvers.*" }
+ context.input(filename)
+ -- context.disabletrackers { "resolvers.*" }
+
+ end
+
+ context.finishjob()
+
+end
+
+implement {
+ name = "processjob",
+ -- protected = true
+ public = true,
+ onlyonce = true,
+ actions = processjob,
+}
+
+texconfig.firstline = "\\processjob " -- experiment, yet undocumented
diff --git a/Master/texmf-dist/tex/context/base/mkxl/cont-run.mkxl b/Master/texmf-dist/tex/context/base/mkxl/cont-run.mkxl
new file mode 100644
index 00000000000..8944a0359e7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/cont-run.mkxl
@@ -0,0 +1,59 @@
+%D \module
+%D [ file=cont-run,
+%D version=2014.12.26,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Runner,
+%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 / Runner}
+
+\registerctxluafile{cont-run}{autosuffix}
+
+% \enabletrackers[system.synctex.visualize]
+% \enabletrackers[system.synctex.xml]
+% \enabledirectives[system.synctex.details]
+% \setupsynctex[state=start]
+
+\unprotect
+
+\permanent\let\synctexsetfilename \clf_synctexsetfilename % can be public implementors
+\permanent\let\synctexresetfilename\clf_synctexresetfilename % idem
+\permanent\let\synctexblockfilename\clf_synctexblockfilename % idem
+
+\aliased\let\synctexpause \donothing
+\aliased\let\synctexresume \donothing
+\aliased\let\synctexpushline\donothing
+\aliased\let\synctexpopline \donothing
+
+\appendtoks\synctexpause \to\everybeforeoutput
+\appendtoks\synctexresume\to\everyafteroutput
+
+\permanent\protected\def\setupsynctex[#1]%
+ {\begingroup
+ \getdummyparameters[\c!state=\v!stop,\c!method=\v!max,#1]%
+ \edef\p_state{\dummyparameter\c!state}%
+ \clf_setupsynctex
+ state {\p_state}%
+ method {\dummyparameter\c!method}%
+ \relax
+ \ifx\p_state\v!start
+ % when public implementor, use conditional
+ \enforced\glet\synctexpause \clf_synctexpause
+ \enforced\glet\synctexresume \clf_synctexresume
+ \enforced\glet\synctexpushline\clf_synctexpushline
+ \enforced\glet\synctexpopline \clf_synctexpopline
+ \fi
+ \endgroup}
+
+\permanent\protected\def\blocksynctexfile[#1]%
+ {\processcommacommand{#1}\synctexblockfilename}
+
+\aliased\let\continuewhenlmtxmode\relax
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/context.mkxl b/Master/texmf-dist/tex/context/base/mkxl/context.mkxl
new file mode 100644
index 00000000000..88b99e7d4a4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/context.mkxl
@@ -0,0 +1,614 @@
+%D \module
+%D [ file=context,
+%D version=2019.07.24, % 2008.28.10, % 1995.10.10,
+%D title=\CONTEXT,
+%D subtitle=\CONTEXT\ Format Generation,
+%D author=Hans Hagen, % ɦɑns ɦɑˈχən
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% http://build.contextgarden.net/waterfall?tag=c/lua(meta)tex
+
+%D Welcome to context, pronounced as kontekst (rather dutch) and not as conτεχt.
+
+\catcode`\{=1 \catcode`\}=2 \catcode`\#=6
+
+%D From the next string (which is set by the script that assembles the distribution)
+%D later on we will calculate a number that can be used by use modules to identify
+%D the feature level. Starting with version 2004.8.30 the low level interface is
+%D english. Watch out and adapt your styles an modules.
+
+% \everypar{\writestatus{!!!!}{some spurious input in line \the\inputlineno}\wait}
+
+%D The order of loading will change when all modules have been cleaned up and the
+%D dependencies are more consistent. Beware, the version number has to match \type
+%D {YYYY.MM.DD HH:MM} format.
+
+\immutable\edef\contextformat {\jobname}
+\immutable\edef\contextversion{2021.03.05 19:11}
+
+%overloadmode 1 % check frozen / warning
+%overloadmode 2 % check frozen / error
+%overloadmode 3 % check frozen, primitive, permanent / warning
+\overloadmode 4 % check frozen, primitive, permanent / error
+
+%D Kind of special:
+
+\immutable\chardef\contextlmtxmode\directlua{tex.print(CONTEXTLMTXMODE or 0)}\relax
+
+%D For those who want to use this:
+
+\aliased\let\fmtname \contextformat
+\aliased\let\fmtversion\contextversion
+
+%D Loading:
+
+\immutable\edef\mksuffix {mkiv}
+\immutable\edef\contextmark{LMTX}
+
+\ifdefined\normalinput \else \aliased\let\normalinput\input \fi
+
+\permanent\protected\def\loadmarkfile#1{\normalinput{#1.\mksuffix}}
+\permanent\protected\def\loadmkivfile#1{\normalinput{#1.mkiv}}
+\permanent\protected\def\loadmkvifile#1{\normalinput{#1.mkvi}}
+\permanent\protected\def\loadmkxlfile#1{\normalinput{#1.mkxl}}
+\permanent\protected\def\loadmklxfile#1{\normalinput{#1.mklx}}
+
+%D First we load the system modules. These implement a lot of manipulation macros.
+%D We start with setting up some basic \TEX\ machinery.
+
+\loadmkxlfile{syst-ini}
+
+%D Some checking (more primitives are now defined):
+
+\ifdefined\defaultinterface \else \immutable\def\defaultinterface {english} \fi
+%ifdefined\messageinterface \else \immutable\let\messageinterface \defaultinterface \fi
+\ifdefined\defaultlanguagetag \else \immutable\def\defaultlanguagetag{en} \fi
+
+%D There is only this way to pass the version info to \LUA\ (currently). Hm, we could
+%D now put it into the environment.
+
+\newtoks\contextversiontoks \contextversiontoks\expandafter{\contextversion}
+
+% \normaleverypar{\wait} % uncomment for test of funny injections
+
+%D Now the more fundamental code gets defined.
+
+\loadmkxlfile{norm-ctx}
+\loadmkxlfile{syst-pln}
+%loadmkxlfile{syst-mes}
+
+\loadmkxlfile{luat-cod}
+\loadmkxlfile{luat-bas}
+\loadmkxlfile{luat-lib}
+\loadmkxlfile{luat-soc}
+
+\loadmkxlfile{catc-ini}
+\loadmkxlfile{catc-act}
+\loadmkxlfile{catc-def}
+\loadmkxlfile{catc-sym}
+
+\loadmkxlfile{toks-ini}
+\loadmkxlfile{cldf-ini}
+
+% \tracecatcodetables
+
+%D From here on we have \unexpanded being \normalprotected, as we already had
+%D \type {\unexpanded} long before etex came around.
+
+\loadmkxlfile{luat-ini}
+\loadmkxlfile{toks-scn}
+
+\loadmkxlfile{syst-aux}
+\loadmkxlfile{syst-lua}
+\loadmkxlfile{syst-con}
+
+\loadmkxlfile{syst-fnt}
+\loadmkxlfile{syst-rtp}
+
+\loadmkxlfile{luat-usr}
+
+\loadmklxfile{file-ini}
+\loadmklxfile{file-res}
+\loadmkxlfile{file-lib}
+
+\loadmkxlfile{core-lmt}
+
+%D This needs more checking for clashes:
+%D
+%D \starttyping
+%D \doifelsefileexists{l-macro-imp-codes-luametatex.lua}{\registerctxluafile{l-macro-imp-codes-luametatex}{}}{}
+%D \stoptyping
+
+\loadmkxlfile{supp-dir}
+
+\loadmkxlfile{char-utf}
+\loadmkxlfile{char-ini}
+\loadmkxlfile{char-act}
+
+\loadmkxlfile{mult-ini}
+\loadmkxlfile{mult-sys}
+\loadmkxlfile{mult-aux}
+\loadmkxlfile{mult-def}
+%loadmarkfile{mult-chk}
+\loadmklxfile{mult-dim}
+
+\loadmkxlfile{cldf-int} % interface
+
+\loadmkxlfile{trac-ctx} % maybe move up
+
+\loadmkxlfile{toks-aux}
+
+\loadmkxlfile{attr-ini}
+
+\loadmkxlfile{core-ini}
+\loadmkxlfile{core-env}
+
+\loadmkxlfile{layo-ini}
+
+\loadmkxlfile{node-ini}
+
+% \loadmkxlfile{cldf-bas} % basics / depends on nodes
+
+\loadmkxlfile{node-fin}
+\loadmkxlfile{node-mig}
+%loadmkxlfile{node-pag}
+
+\loadmkxlfile{driv-ini}
+
+\loadmkxlfile{back-ini}
+\loadmkxlfile{back-res}
+\loadmkxlfile{back-ext}
+
+\loadmkxlfile{cldf-bas} % basics / depends on nodes
+
+\loadmkxlfile{attr-col}
+\loadmkxlfile{attr-lay}
+\loadmkxlfile{attr-neg}
+\loadmkxlfile{attr-eff}
+\loadmkxlfile{attr-alt}
+\loadmkxlfile{attr-mkr}
+
+\loadmkxlfile{trac-tex}
+\loadmkxlfile{trac-deb} % will move up
+
+\loadmkxlfile{supp-box}
+
+\loadmkxlfile{supp-ran}
+\loadmkxlfile{supp-mat}
+
+\loadmkxlfile{core-uti}
+\loadmklxfile{file-job}
+
+\loadmkxlfile{anch-pos}
+
+\loadmkxlfile{typo-ini}
+\loadmkxlfile{typo-lin}
+\loadmkxlfile{typo-bld} % par builders
+
+\loadmkxlfile{typo-inj}
+
+\loadmklxfile{file-syn}
+\loadmklxfile{file-mod}
+
+\loadmkxlfile{core-sys}
+\loadmkxlfile{core-con}
+
+\loadmkxlfile{cont-fil}
+
+\loadmkxlfile{regi-ini}
+\loadmkxlfile{enco-ini}
+\loadmkxlfile{hand-ini}
+
+\loadmkxlfile{lang-ini}
+\loadmkxlfile{lang-hyp} % also loads dis
+\loadmkxlfile{lang-lab}
+
+\loadmkxlfile{unic-ini}
+
+\loadmkxlfile{core-two}
+\loadmkxlfile{core-dat}
+
+\loadmkxlfile{colo-ini}
+\loadmkxlfile{colo-nod}
+\loadmkxlfile{colo-grp} % optional
+\loadmkxlfile{colo-ext}
+
+\loadmkxlfile{node-bck} % overloads anch-pgr (experimental and undocumented)
+
+\loadmkxlfile{pack-cut}
+
+\loadmkxlfile{lang-mis}
+\loadmkxlfile{lang-url}
+\loadmkxlfile{lang-def}
+
+% \loadmkvifile{file-job} % why so late?
+
+\loadmkxlfile{symb-ini} % brrr depends on fonts
+
+\loadmkxlfile{sort-ini}
+
+\loadmklxfile{pack-mis}
+\loadmkxlfile{pack-ori}
+\loadmkxlfile{pack-rul}
+\loadmkxlfile{pack-mrl}
+\loadmklxfile{pack-bck}
+\loadmkxlfile{pack-fen}
+
+\loadmkxlfile{lxml-ini}
+\loadmkxlfile{lxml-sor}
+
+\loadmklxfile{typo-prc}
+\loadmkxlfile{typo-plc}
+
+\loadmklxfile{strc-ini}
+\loadmkxlfile{strc-tag}
+\loadmkxlfile{strc-doc}
+\loadmkxlfile{strc-num}
+\loadmkxlfile{strc-mar}
+\loadmkxlfile{strc-sbe}
+\loadmklxfile{strc-lst}
+\loadmkxlfile{strc-sec}
+\loadmkxlfile{strc-pag} % hm, depends on core-num
+\loadmkxlfile{strc-ren}
+%loadmarkfile{strc-xml}
+\loadmkxlfile{strc-def} % might happen later
+\loadmklxfile{strc-ref}
+%loadmarkfile{strc-reg}
+\loadmklxfile{strc-lev} % experiment
+
+\loadmkxlfile{spac-hor}
+\loadmkxlfile{spac-ali}
+\loadmkxlfile{spac-flr}
+\loadmkxlfile{spac-ver} % beware, hooks into strc-sec
+\loadmkxlfile{spac-lin}
+\loadmkxlfile{spac-pag}
+\loadmkxlfile{spac-par}
+\loadmkxlfile{spac-def}
+\loadmklxfile{spac-prf}
+\loadmkxlfile{spac-grd}
+
+\loadmklxfile{scrn-ini}
+\loadmklxfile{scrn-ref}
+
+\loadmkxlfile{pack-obj}
+
+\loadmklxfile{strc-itm}
+
+\loadmklxfile{strc-con}
+\loadmklxfile{strc-des}
+\loadmklxfile{strc-enu}
+
+\loadmkxlfile{strc-ind}
+\loadmkxlfile{strc-lab}
+\loadmkxlfile{strc-syn}
+
+% \loadmarkfile{core-sys}
+
+\loadmkxlfile{page-var}
+\loadmklxfile{page-otr}
+\loadmkxlfile{page-ini}
+\loadmkxlfile{page-ins}
+\loadmkxlfile{page-fac}
+\loadmkxlfile{page-brk}
+\loadmkxlfile{page-col}
+\loadmkxlfile{page-inf}
+\loadmkxlfile{page-flt}
+\loadmkxlfile{page-bck}
+\loadmkxlfile{page-not}
+\loadmkxlfile{page-one}
+\loadmkxlfile{page-lay}
+\loadmklxfile{page-box}
+\loadmklxfile{page-txt}
+\loadmkxlfile{page-sid}
+
+\loadmklxfile{strc-flt}
+
+\loadmkxlfile{page-pst}
+\loadmklxfile{page-mbk}
+%loadmarkfile{page-mul} % \usecolumns[old-multicolumns]
+\loadmkxlfile{page-mix}
+\loadmkxlfile{page-smp}
+\loadmkxlfile{page-cst}
+\loadmkxlfile{page-pcl} % new
+\loadmkxlfile{pack-lyr}
+\loadmkxlfile{pack-pos}
+\loadmklxfile{page-mak}
+\loadmkxlfile{page-mcl}
+
+\loadmkxlfile{strc-reg} % uses mixed columns
+
+\loadmklxfile{page-lin}
+\loadmkxlfile{page-par}
+\loadmkxlfile{typo-pag}
+\loadmkxlfile{typo-mar}
+\loadmkxlfile{typo-itm}
+
+\loadmkxlfile{buff-ini}
+\loadmkxlfile{buff-ver}
+\loadmklxfile{buff-par}
+
+\loadmarkfile{buff-imp-tex} % optional as also runtime if not loaded
+\loadmarkfile{buff-imp-mp} % optional as also runtime if not loaded
+\loadmarkfile{buff-imp-lua} % optional as also runtime if not loaded
+\loadmarkfile{buff-imp-xml} % optional as also runtime if not loaded
+
+\loadmarkfile{buff-imp-parsed-xml} % optional
+%loadmarkfile{buff-imp-parsed-lua} % optional
+
+\loadmkxlfile{strc-blk}
+
+\loadmkxlfile{page-imp}
+\loadmklxfile{page-sel} % optional
+\loadmklxfile{page-inj} % optional
+
+\loadmklxfile{scrn-pag}
+\loadmklxfile{scrn-wid}
+\loadmklxfile{scrn-but}
+\loadmklxfile{scrn-bar}
+
+\loadmkxlfile{page-com} % optional (after scrn-pag)
+
+\loadmkxlfile{strc-bkm} % bookmarks
+
+\loadmkxlfile{java-ini}
+
+\loadmklxfile{scrn-fld}
+\loadmklxfile{scrn-hlp}
+
+\loadmkxlfile{char-enc}
+
+\loadmklxfile{font-lib} % way too late but after language
+\loadmklxfile{font-fil}
+\loadmklxfile{font-var}
+\loadmklxfile{font-fea}
+\loadmklxfile{font-mat}
+\loadmklxfile{font-ini}
+\loadmklxfile{font-glf}
+\loadmklxfile{font-sym}
+\loadmklxfile{font-sty}
+\loadmklxfile{font-set}
+\loadmklxfile{font-emp}
+\loadmkxlfile{font-pre}
+\loadmkxlfile{font-unk}
+\loadmkxlfile{font-tra}
+\loadmkxlfile{font-chk}
+\loadmkxlfile{font-uni}
+\loadmklxfile{font-col}
+\loadmklxfile{font-gds}
+\loadmklxfile{font-aux}
+\loadmklxfile{font-sel}
+\loadmkxlfile{font-tex}
+
+\loadmkxlfile{typo-tal}
+\loadmkxlfile{typo-par} % par builders (uses fonts)
+
+\loadmkxlfile{tabl-com}
+%loadmarkfile{tabl-pln}
+
+\loadmkxlfile{tabl-tab} % thrd-tab stripped and merged
+
+\loadmkxlfile{tabl-tbl}
+\loadmkxlfile{tabl-ntb}
+\loadmkxlfile{tabl-nte}
+\loadmkxlfile{tabl-ltb}
+\loadmkxlfile{tabl-frm}
+\loadmkxlfile{tabl-tsp}
+\loadmklxfile{tabl-xtb}
+\loadmkxlfile{tabl-mis}
+
+\loadmkxlfile{typo-lan}
+
+\loadmkxlfile{lxml-css}
+
+\loadmkxlfile{spac-chr} % depends on fonts
+
+\loadmkxlfile{blob-ini}
+
+\loadmkxlfile{trac-vis}
+\loadmkxlfile{trac-jus}
+
+\loadmkxlfile{typo-cln}
+\loadmkxlfile{typo-wrp}
+\loadmkxlfile{typo-spa}
+\loadmkxlfile{typo-krn}
+\loadmklxfile{typo-itc}
+\loadmkxlfile{typo-dir}
+\loadmkxlfile{typo-brk}
+\loadmkxlfile{typo-cap}
+\loadmkxlfile{typo-dig}
+\loadmkxlfile{typo-rep}
+\loadmklxfile{typo-txt}
+\loadmkxlfile{typo-drp}
+\loadmkxlfile{typo-fln}
+\loadmkxlfile{typo-sus}
+\loadmkxlfile{typo-lig}
+\loadmkxlfile{typo-chr}
+\loadmkxlfile{typo-rub}
+\loadmkxlfile{typo-fkr}
+\loadmkxlfile{typo-pnc}
+
+\loadmklxfile{type-ini}
+\loadmkxlfile{type-set}
+
+\loadmkxlfile{scrp-ini}
+
+\loadmkxlfile{symb-emj}
+
+\loadmkxlfile{lang-tra} % can be optional (discussion with mm sideeffect)
+\loadmkxlfile{lang-wrd} % can be optional (discussion with mm sideeffect)
+\loadmkxlfile{lang-rep} % can be optional (bt 2013 side effect)
+
+\loadmkxlfile{mlib-ctx} % messy order
+
+\loadmkxlfile{meta-ini}
+\loadmkxlfile{meta-tex}
+\loadmkxlfile{meta-fun}
+\loadmkxlfile{meta-pag}
+\loadmkxlfile{meta-grd}
+\loadmkxlfile{meta-fnt}
+\loadmkxlfile{meta-nod}
+\loadmkxlfile{meta-lua}
+\loadmkxlfile{meta-mac}
+
+\loadmkxlfile{page-mrk} % depends on mp
+
+\loadmkxlfile{page-flw}
+\loadmkxlfile{page-spr}
+\loadmkxlfile{page-plg}
+\loadmkxlfile{page-str}
+
+\loadmkxlfile{anch-pgr} % can be moved up (nicer for dependencies)
+\loadmklxfile{anch-bck}
+\loadmkxlfile{anch-tab} % overloads tabl-tbl
+\loadmkxlfile{anch-bar}
+%loadmkxlfile{anch-snc} % when needed this one will be redone
+
+\loadmkxlfile{math-ini} % way after font-pre !
+\loadmkxlfile{math-pln}
+\loadmkxlfile{math-for}
+\loadmkxlfile{math-def} % also saves some meanings
+\loadmkxlfile{math-ali}
+\loadmklxfile{math-stc}
+\loadmkxlfile{math-frc}
+\loadmkxlfile{math-mis}
+\loadmkxlfile{math-scr}
+\loadmkxlfile{math-int}
+\loadmkxlfile{math-del}
+\loadmkxlfile{math-fen}
+\loadmklxfile{math-acc}
+\loadmklxfile{math-rad}
+\loadmkxlfile{math-inl}
+\loadmkxlfile{math-dis}
+%loadmkxlfile{math-lan}
+\loadmkxlfile{math-toy}
+
+\loadmkxlfile{strc-mat}
+
+\loadmkxlfile{chem-ini}
+\loadmkxlfile{chem-str}
+
+\loadmkxlfile{typo-scr}
+\loadmkxlfile{phys-dim}
+
+\loadmkxlfile{node-rul} % beware, defined \underbar so after math
+\loadmklxfile{font-sol} % font solutions
+
+\loadmklxfile{strc-not}
+\loadmklxfile{strc-lnt}
+\loadmkxlfile{strc-tnt}
+\loadmkxlfile{strc-usr}
+
+\loadmkxlfile{pack-com}
+\loadmkxlfile{typo-del}
+
+\loadmkxlfile{grph-trf}
+\loadmkxlfile{grph-inc}
+\loadmkxlfile{grph-fig}
+\loadmkxlfile{grph-raw}
+\loadmkxlfile{grph-rul}
+\loadmkxlfile{grph-pat}
+
+\loadmkxlfile{pack-box}
+\loadmkxlfile{pack-bar}
+\loadmkxlfile{page-app}
+\loadmkxlfile{meta-fig}
+
+\loadmkxlfile{page-ffl}
+
+\loadmkxlfile{lang-spa} % will become obsolete
+
+\loadmkxlfile{typo-ovl} % fuzzy project (tracing) code
+
+% old bibtex support: (will be m-oldbibtex.mkiv)
+
+% \loadmarkfile{bibl-bib}
+% \loadmarkfile{bibl-tra}
+
+% new bibtex support:
+
+\loadmkxlfile{publ-ini}
+%loadmkxlfile{publ-tra}
+\loadmkxlfile{publ-xml}
+\loadmkxlfile{publ-old}
+
+%loadmarkfile{x-xtag} % no longer preloaded
+
+\loadmkxlfile{meta-xml}
+
+\loadmkxlfile{cont-log}
+
+\loadmkxlfile{cldf-ver} % verbatim, this can come late
+\loadmkxlfile{cldf-com} % commands, this can come late
+
+\loadmkxlfile{core-ctx} % this order might change but we need to check depedencies / move to another namespace
+
+\loadmkxlfile{core-def}
+
+%usemodule[x][res-04] % xml resource libraries
+%usemodule[x][res-08] % rlx runtime conversion
+%usemodule[x][res-12] % rli external indentification
+
+% now we hook in backend code (needs checking)
+
+\loadmkxlfile{driv-shp}
+
+\loadmkxlfile{back-exp}
+\loadmkxlfile{back-pdf}
+\loadmkxlfile{back-mps}
+\loadmkxlfile{back-lua}
+
+\loadmkxlfile{mlib-pdf}
+\loadmkxlfile{mlib-pps}
+\loadmkxlfile{meta-pdf}
+\loadmkxlfile{meta-blb}
+\loadmkxlfile{grph-epd}
+
+\loadmkxlfile{typo-shp}
+
+\loadmkxlfile{math-inc} % an experiment
+\loadmkxlfile{publ-inc} % an experiment
+
+\loadmkxlfile{task-ini}
+
+\loadmkxlfile{syst-cmp} % compatibility stuff moved here
+
+\loadmkxlfile{libs-ini}
+
+\loadmkxlfile{cont-run} % the main runner (used in cont-yes.mkiv)
+
+\setupcurrentlanguage[\defaultlanguagetag]
+
+\prependtoks
+ \ctxlua{statistics.starttiming(statistics)}%
+\to \everyjob
+
+\appendtoks
+ \ctxlua{statistics.stoptiming(statistics)}%
+\to \everyjob
+
+% \appendtoks
+% \ctxlua{job.prepare()}%
+% \to \everyjob
+
+% \appendtoks
+% \enabletrackers[*]%
+% \to \everyjob
+
+\appendtoks
+ \ctxlua{statistics.savefmtstatus("\jobname","\contextversion","context.mkxl","\contextbanner")}% can become automatic
+\to \everydump
+
+% some day:
+%
+% \prependtoks
+% \overloadmode 255
+% \to \everyjob
+
+\overloadmode 0 % for now
+
+\errorstopmode \dump \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-con.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-con.mkxl
new file mode 100644
index 00000000000..df505cfee5f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-con.mkxl
@@ -0,0 +1,1002 @@
+%D \module
+%D [ file=core-con,
+%D version=1997.26.08,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Conversion,
+%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 / Conversion}
+
+\registerctxluafile{core-con}{}
+
+% todo: iso date ranges (from/to)
+
+\unprotect
+
+\ifdefined\currentlanguage \else \let\currentlanguage\empty \fi
+\ifdefined\labeltext \else \let\labeltext \firstofoneargument \fi
+
+%D This module deals with all kind of conversions from numbers and dates. I
+%D considered splitting this module in a support one and a core one, but to keep
+%D things simple as well as preserve the overview, I decided against splitting.
+
+\aliased\let\spr\firstofoneargument % separator
+\aliased\let\stp\firstofoneargument % stopper
+
+% needed for arab (but can disappear as no ons used it, experiment for idris)
+
+\permanent\protected\def\isolateseparators % even works with list separator overloading
+ {\enforced\permanent\def\spr##1{{##1}}% % we can probably best mess around with zwj
+ \enforced\permanent\def\stp##1{{##1}}} % and friends
+
+%D \macros
+%D {numbers}
+%D
+%D First we deal with the dummy conversion of numbers using the \TEX\ primitive
+%D \type{\number}. The uppercase alternative is only there for compatibility with
+%D the other conversion macros. We could do without \type{#1} but this way we get
+%D rid of unwanted braces. For the savety we also define a non||sence uppercase
+%D alternative.
+%D
+%D \showsetup{numbers}
+%D
+%D \starttyping
+%D \def\numbers#1{\number#1}
+%D \def\Numbers#1{\number#1}
+%D \stoptyping
+%D
+%D Due to read ahead, as in \type{[\pagenumber\space]} the space will disappear,
+%D unless we use:
+
+\permanent\def\numbers#1{\purenumber{#1}}
+\permanent\def\Numbers#1{\purenumber{#1}}
+
+%D \macros
+%D {romannumerals,Romannumerals}
+%D
+%D \TEX\ the program uses a rather tricky conversion from numbers to their roman
+%D counterparts. This conversion could of course be programmed in \TEX\ itself, but
+%D I guess Knuth found the programming trick worth presenting.
+%D
+%D \showsetup{romannumerals}
+%D \showsetup{Romannumerals}
+
+\permanent\def\romannumerals#1{\clf_romannumerals\numexpr#1\relax}
+\permanent\def\Romannumerals#1{\clf_Romannumerals\numexpr#1\relax}
+
+%D Arabic etc:
+
+\permanent\def\abjadnumerals #1{\clf_abjadnumerals \numexpr#1\relax}
+\permanent\def\abjadnodotnumerals#1{\clf_abjadnodotnumerals\numexpr#1\relax}
+\permanent\def\abjadnaivenumerals#1{\clf_alphabetic \numexpr#1\relax{arabic}} % okay?
+
+\permanent\def\hebrewnumerals #1{\clf_hebrewnumerals\numexpr#1\relax}
+\aliased \let\yiddishnumerals \hebrewnumerals
+
+\permanent\def\languagecharacters#1{\clf_alphabetic\numexpr#1\relax{\currentlanguage}} % new
+\permanent\def\languageCharacters#1{\clf_Alphabetic\numexpr#1\relax{\currentlanguage}} % new
+
+\permanent\def\alphabeticnumerals#1{\clf_alphabetic\numexpr#1\relax{}}
+\permanent\def\Alphabeticnumerals#1{\clf_Alphabetic\numexpr#1\relax{}}
+
+\permanent\def\thainumerals #1{\clf_alphabetic\numexpr#1\relax{thai}}
+\permanent\def\devanagarinumerals#1{\clf_alphabetic\numexpr#1\relax{devanagari}}
+\permanent\def\gurmurkhinumerals #1{\clf_alphabetic\numexpr#1\relax{gurmurkhi}}
+\permanent\def\gujaratinumerals #1{\clf_alphabetic\numexpr#1\relax{gujarati}}
+\permanent\def\tibetannumerals #1{\clf_alphabetic\numexpr#1\relax{tibetan}}
+\permanent\def\greeknumerals #1{\clf_alphabetic\numexpr#1\relax{greek}}
+\permanent\def\Greeknumerals #1{\clf_Alphabetic\numexpr#1\relax{greek}}
+\permanent\def\arabicnumerals #1{\clf_alphabetic\numexpr#1\relax{arabic}}
+\permanent\def\persiannumerals #1{\clf_alphabetic\numexpr#1\relax{persian}}
+\permanent\def\arabicdecimals #1{\clf_decimals \numexpr#1\relax{arabic}}
+\permanent\def\persiandecimals #1{\clf_decimals \numexpr#1\relax{persian}}
+
+\aliased \let\arabicexnumerals \persiannumerals
+
+\permanent\def\koreannumerals #1{\clf_alphabetic\numexpr#1\relax{korean}}
+\permanent\def\koreannumeralsp #1{\clf_alphabetic\numexpr#1\relax{korean-parenthesis}}
+\permanent\def\koreannumeralsc #1{\clf_alphabetic\numexpr#1\relax{korean-circle}}
+
+\aliased \let\koreanparentnumerals \koreannumeralsp
+\aliased \let\koreanparenthesisnumerals\koreannumeralsp
+\aliased \let\koreancirclenumerals \koreannumeralsc
+
+\permanent\def\chinesenumerals #1{\clf_chinesenumerals\numexpr#1\relax{normal}}
+\permanent\def\chinesecapnumerals#1{\clf_chinesenumerals\numexpr#1\relax{cap}}
+\permanent\def\chineseallnumerals#1{\clf_chinesenumerals\numexpr#1\relax{all}}
+
+%D \macros
+%D {character,Character}
+%D
+%D Converting a number into a character can of course only be done with numbers
+%D less or equal to~26. At the cost of much more macros a faster conversion is
+%D possible, using:
+%D
+%D \starttyping
+%D \setvalue{char1}{a} \def\character#1{\getvalue{char#1}}
+%D \stoptyping
+%D
+%D But we prefer a simpel \type{\case}.
+%D
+%D \showsetup{character}
+%D \showsetup{Character}
+
+\permanent\def\character#1{\clf_character\numexpr#1\relax}
+\permanent\def\Character#1{\clf_Character\numexpr#1\relax}
+
+%D \macros
+%D {characters,Characters}
+%D
+%D Converting large numbers is supported by the next two macros. This time we
+%D just count on: $\cdots$~x, y, z, aa, ab, ac~$\cdots$.
+%D
+%D \showsetup{characters}
+%D \showsetup{Characters}
+
+\permanent\def\characters#1{\clf_characters\numexpr#1\relax}
+\permanent\def\Characters#1{\clf_Characters\numexpr#1\relax}
+
+%D \macros
+%D {greeknumerals,Greeknumerals}
+%D
+%D Why should we only honour the romans, and not the greek?
+
+% \let\greeknumerals\gobbleoneargument
+% \let\Greeknumerals\gobbleoneargument
+
+%D \macros
+%D {oldstylenumerals,oldstyleromannumerals}
+%D
+%D These conversions are dedicated to Frans Goddijn.
+
+\permanent\protected\def\oldstylenumerals#1%
+ {\begingroup
+ \os\number#1%
+ \endgroup}
+
+\permanent\protected\def\oldstyleromannumerals#1% will become obsolete
+ {\dontleavehmode
+ \hbox\bgroup
+ \ss\txx
+ \setbox\scratchbox\hbox \s!spread .15\emwidth{\hss\uppercased{\romannumerals{#1}}\hss}%
+ \scratchwidth \wd\scratchbox
+ \scratchheight\ht\scratchbox
+ \scratchdimen .1\exheight
+ \vrule\s!width\scratchwidth\s!height\dimexpr\scratchheight+\scratchdimen\relax\s!depth-\dimexpr\scratchheight-+\scratchdimen\relax
+ \hskip-\scratchwidth
+ \vrule\s!width\scratchwidth\s!height\scratchdimen\s!depth\scratchdimen
+ \hskip-\scratchwidth
+ \box\scratchbox
+ \egroup}
+
+%D \macros
+%D {normaltime,normalyear,normalmonth,normalday}
+%D
+%D The last part of this module is dedicated to converting dates. Because we want to
+%D use as meaningful commands as possible, and because \TEX\ already uses up some of
+%D those, we save the original meanings.
+
+% \savenormalmeaning\time
+% \savenormalmeaning\year
+% \savenormalmeaning\month
+% \savenormalmeaning\day
+
+%D \macros
+%D {month,MONTH}
+%D
+%D Converting the month number into a month name is done using a case statement,
+%D abstact values and the label mechanism. This way users can easily redefine a
+%D label from for instance german into austrian.
+%D
+%D \starttyping
+%D \setuplabeltext [de] [january=J\"anner]
+%D \stoptyping
+%D
+%D Anyhow, the conversion looks like:
+
+\permanent\protected\def\monthlong #1{\clf_monthname\numexpr#1\relax}
+\permanent\protected\def\monthshort#1{\clf_monthmnem\numexpr#1\relax}
+\permanent\protected\def\daylong #1{\clf_dayname\numexpr#1\relax}
+\permanent\protected\def\dayshort #1{\clf_daymnem\numexpr#1\relax}
+\aliased \let\convertmonth\monthlong % for old times sake
+
+%D We redefine the \TEX\ primitive \type{\month} as:
+%D
+%D \showsetup{month}
+%D \showsetup{MONTH}
+
+\pushoverloadmode
+
+\aliased\let\month\monthlong
+
+\popoverloadmode
+
+\permanent\protected\def\MONTH #1{\WORD{\clf_monthname\numexpr#1\relax}}
+\permanent\protected\def\MONTHLONG #1{\WORD{\clf_monthname\numexpr#1\relax}}
+\permanent\protected\def\MONTHSHORT#1{\WORD{\clf_monthmnem\numexpr#1\relax}}
+
+%D We never explicitly needed this, but Tobias Burnus pointed out that it would be
+%D handy to convert to the day of the week. In doing so, we have to calculate the
+%D total number of days, taking leapyears into account. For those who are curious:
+%D
+%D \startitemize[packed]
+%D \item years that can be divided by 4 are leapyears
+%D \item exept years that can be divided by 100
+%D \item unless years can be divided by 400
+%D \stopitemize
+
+%D \macros
+%D {weekday,WEEKDAY}
+%D
+%D The first one is sort of redundant. It takes the day number argument.
+%D
+%D \showsetup{weekday}
+%D \showsetup{WEEKDAY}
+
+\permanent\protected\def\weekday #1{\clf_dayname\numexpr#1\relax}
+\permanent\protected\def\WEEKDAY #1{\WORD{\clf_dayname\numexpr#1\relax}}
+\permanent\protected\def\DAYLONG #1{\WORD{\clf_dayname\numexpr#1\relax}}
+\permanent\protected\def\DAYSHORT#1{\WORD{\clf_daymnem\numexpr#1\relax}}
+
+%D \macros
+%D {getdayoftheweek, dayoftheweek}
+
+\newcount\normalweekday
+
+\permanent \def\dayoftheweek #1#2#3{\clf_weekdayname\numexpr#1\relax\numexpr#2\relax\numexpr#3\relax} % name
+\permanent\protected\def\getdayoftheweek#1#2#3{\normalweekday\clf_weekday\numexpr#1\relax\numexpr#2\relax\numexpr#3\relax\relax} % number
+
+%D Using this macro in
+%D
+%D \startbuffer
+%D monday: \dayoftheweek {4} {5} {1992}
+%D friday: \dayoftheweek {16} {6} {1995}
+%D monday: \dayoftheweek {25} {8} {1997}
+%D saturday: \dayoftheweek {30} {8} {1997}
+%D tuesday: \dayoftheweek {2} {1} {1996}
+%D tuesday: \dayoftheweek {7} {1} {1997}
+%D tuesday: \dayoftheweek {13} {1} {1998}
+%D friday: \dayoftheweek {1} {1} {2000}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D The macro \type {\getdayoftheweek} can be used to calculate the number \type
+%D {\normalweekday}.
+
+%D \macros
+%D {doifleapyearelse,
+%D getdayspermonth}
+%D
+%D Sometimes we need to know if we're dealing with a leapyear, so here is a
+%D testmacro:
+%D
+%D \starttyping
+%D \doifleapyearelse{year}{yes}{no}
+%D \stoptyping
+%D
+%D An example of its use can be seen in the macro
+%D
+%D \starttyping
+%D \getdayspermonth{year}{month}
+%D \stoptyping
+%D
+%D The number of days is available in the macro \type {\numberofdays}.
+
+\permanent\def\doifelseleapyear#1% expandable check
+ {\clf_doifelseleapyear\numexpr#1\relax}
+
+\aliased\let\doifleapyearelse\doifelseleapyear
+
+\mutable\let\numberofdays\!!zerocount
+
+\permanent\protected\def\getdayspermonth#1#2%
+ {\edef\numberofdays{\clf_nofdays\numexpr#1\relax\numexpr#2\relax}}
+
+\permanent\def\dayspermonth#1#2%
+ {\clf_nofdays\numexpr#1\relax\numexpr#2\relax}
+
+% \dayoftheweek{2006}{9}{15}
+% \doifleapyearelse{2000}{OK}{NOT OK}
+% \doifleapyearelse{2100}{NOT OK}{OK}
+% \doifleapyearelse{2004}{OK}{NOT OK}
+% \doifleapyearelse{2003}{NOT OK}{OK}
+% \dayspermonth{2000}{2}
+% [\the\normaltime=\the\time]
+
+%D \macros
+%D {currentdate, rawdate, date}
+%D
+%D We use these conversion macros in the date formatting macro:
+%D
+%D \showsetup{currentdate}
+%D
+%D This macro takes care of proper spacing and delivers for instance:
+%D
+%D \startbuffer
+%D \currentdate[weekday,day,month,year]
+%D \currentdate[WEEKDAY,day,MONTH,year]
+%D \stopbuffer
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D depending of course on the keywords. Here we gave:
+%D
+%D \typebuffer
+%D
+%D If needed one can also add non||keywords, like in
+%D
+%D \startbuffer
+%D \currentdate[dd,--,mm,--,yy]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or typeset: \getbuffer.
+%D
+%D When no argument is passed, the current date is given as specified per
+%D language (using \type{\installlanguage}).
+%D
+%D \showsetup{currentdate}
+%D
+%D \startbuffer
+%D \date
+%D \date[d=12,m=12,y=1998][weekday]
+%D \date[d=12,m=12,y=1998]
+%D \stopbuffer
+%D
+%D We can also typeset arbitrary dates, using the previous
+%D command.
+%D
+%D \typebuffer
+%D
+%D The date is specified by one character keys. When no date is given, we get the
+%D current date.
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+
+%D \starttabulate[|l|l|]
+%D \HL
+%D \NC year \NC (\currentdate[year]) \NC\NR
+%D \NC yy \NC (\currentdate[yy]) \NC\NR
+%D \NC y \NC (\currentdate[y]) \NC\NR
+%D \NC Y \NC (\currentdate[Y]) \NC\NR
+%D \HL
+%D \NC month \NC (\currentdate[month]) \NC\NR
+%D \NC mm \NC (\currentdate[mm]) \NC\NR
+%D \NC m \NC (\currentdate[m]) \NC\NR
+%D \NC M \NC (\currentdate[M]) \NC\NR
+%D \HL
+%D \NC day \NC (\currentdate[day]) \NC\NR
+%D \NC dd \NC (\currentdate[dd]) \NC\NR
+%D \NC d \NC (\currentdate[d]) \NC\NR
+%D \NC D \NC (\currentdate[D]) \NC\NR
+%D \HL
+%D \NC weekday \NC (\currentdate[weekday]) \NC\NR
+%D \NC w \NC (\currentdate[w]) \NC\NR
+%D \NC W \NC (\currentdate[W]) \NC\NR
+%D \HL
+%D \NC referral \NC (\currentdate[referral]) \NC\NR
+%D \HL
+%D \NC day:mnem \NC (\currentdate[day:mnem]) \NC\NR
+%D \NC dd:mnem \NC (\currentdate[dd:mnem]) \NC\NR
+%D \NC d:mnem \NC (\currentdate[d:mnem]) \NC\NR
+%D \NC D:mnem \NC (\currentdate[D:mnem]) \NC\NR
+%D \HL
+%D \stoptabulate
+%D
+%D \startbuffer
+%D (\currentdate[D,.,M,.,Y])
+%D (\currentdate[day,month,year])
+%D (\currentdate[day,+,month,+,year])
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D Some indirectness and abstraction:
+%D
+%D \starttyping
+%D \definedate[crap][year]
+%D \currentdate[crap]
+%D \stoptyping
+
+\installcorenamespace{date}
+
+\permanent\tolerant\protected\def\definedate[#1]#*[#2]%
+ {\ifarguments\else\setvalue{\??date#1}{#2}\fi}
+
+\def\syst_converters_check_date_specification#1%
+ {\ifcsname\??date#1\endcsname
+ \edef#1{\lastnamedcs}%
+ \fi}
+
+\newtoks\everycurrentdate
+
+\permanent\tolerant\protected\def\currentdate[#1]%
+ {\dontleavehmode
+ \begingroup
+ \the\everycurrentdate
+ \edef\m_syst_converters_date{#1}%
+ \syst_converters_check_date_specification\m_syst_converters_date
+ \syst_converters_check_date_specification\currentdatespecification
+ \clf_currentdate
+ {\m_syst_converters_date}{\currentdatespecification}{\labellanguage}%
+ \normalyear\normalmonth\normalday
+ \endgroup}
+
+\permanent\tolerant\protected\def\setdate[#1]% sets the date !
+ {\begingroup
+ \letdummyparameter\c!d\normalday
+ \letdummyparameter\c!m\normalmonth
+ \letdummyparameter\c!y\normalyear
+ \getdummyparameters[#1]%
+ \normalexpanded
+ {\endgroup
+ \iftok{\directdummyparameter\c!d}\emptytoks\else\normalday \number\directdummyparameter\c!d\relax\fi
+ \iftok{\directdummyparameter\c!m}\emptytoks\else\normalmonth\number\directdummyparameter\c!m\relax\fi
+ \iftok{\directdummyparameter\c!y}\emptytoks\else\normalyear \number\directdummyparameter\c!y\relax\fi}}
+
+\permanent\tolerant\protected\def\date[#1]#*[#2]% sets the date !
+ {\dontleavehmode
+ \begingroup
+ \setdate[#1]% sets the date !
+ \the\everycurrentdate
+ \edef\m_syst_converters_date{#2}%
+ \syst_converters_check_date_specification\m_syst_converters_date
+ \syst_converters_check_date_specification\currentdatespecification
+ \clf_currentdate
+ {\m_syst_converters_date}{\currentdatespecification}{\labellanguage}%
+ \normalyear\normalmonth\normalday
+ \endgroup}
+
+\permanent\def\rawdate[#1]% expandable and no labels
+ {\clf_currentdate
+ {#1}{\currentdatespecification}{}%
+ \normalyear\normalmonth\normalday}
+
+%D \macros
+%D {currenttime}
+%D
+%D The currenttime is actually the jobtime. You can specify a pattern similar
+%D to the previous date macro using the keys \type {h}, \type {m} and a separator.
+
+\mutable\let\currenthour \!!plusone
+\mutable\let\currentminute\!!plusone
+\mutable\let\currentsecond\!!plusone
+
+\permanent\protected\def\calculatecurrenttime
+ {\edef\currenthour {\clf_hour }%
+ \edef\currentminute{\clf_minute}%
+ \edef\currentsecond{\clf_second}}
+
+% \def\currenttimespecification{h,:,m}
+
+\permanent\protected\def\currenttime
+ {\doifelsenextoptional\syst_converters_current_time_yes\syst_converters_current_time_nop}
+
+\protected\def\syst_converters_current_time_yes[#1]%
+ {\calculatecurrenttime
+ \processallactionsinset[#1][h=>\currenthour,m=>\currentminute,\s!unknown=>\commalistelement]}
+
+\protected\def\syst_converters_current_time_nop
+ {\normalexpanded{\syst_converters_current_time_yes[\currenttimespecification]}}
+
+%D Because we're dealing with dates, we also introduce a few day loops:
+%D
+%D \starttyping
+%D \processmonth{year}{month}{command}
+%D \processyear{year}{command}{before}{after}
+%D \stoptyping
+%D
+%D The counters \type {\normalyear}, \type {\normalmonth} and \type {\normalday}
+%D can be used for for date manipulations.
+
+\permanent\protected\def\processmonth#1#2#3% year month command
+ {\begingroup
+ \getdayspermonth{#1}{#2}%
+ \dostepwiserecurse\plusone\numberofdays\plusone
+ {\normalyear #1\relax
+ \normalmonth#2\relax
+ \normalday \recurselevel\relax
+ #3}%
+ \endgroup}
+
+\permanent\protected\def\processyear#1#2#3#4% year command before after
+ {\begingroup
+ \dorecurse\plustwelve
+ {\normalyear #1\relax
+ \normalmonth\recurselevel\relax
+ #3\processmonth\normalyear\normalmonth{#2}#4}%
+ \endgroup}
+
+%D \macros
+%D {defineconversion, convertnumber}
+%D
+%D Conversion involves the macros that we implemented earlier in this module.
+%D
+%D \showsetup{defineconversion}
+%D \showsetup{convertnumber}
+%D
+%D We can feed this command with conversion macros as well as a set of conversion
+%D symbols. Both need a bit different treatment.
+%D
+%D \starttyping
+%D \defineconversion [roman] [\romannumerals]
+%D \defineconversion [set 1] [$\star$,$\bullet$,$\ast$]
+%D \stoptyping
+%D
+%D You can define a language dependent conversion with:
+%D
+%D \starttyping
+%D \defineconversion [en] [whatever] [\something]
+%D \stoptyping
+
+\installcorenamespace {conversion}
+\installcorenamespace {conversionarguments}
+\installcorenamespace {conversionwords}
+
+%D It might be better to move more to \LUA\ as we also need conversion there and
+%D doublicating logic doesn't make things cleaner. It means that all conversions
+%D will get a language argument too. However, we permit definitions at the \TEX\ end
+%D so we have to provide some hybrid method.
+
+% checkedconversion(method,n,language)
+
+\permanent\tolerant\protected\def\defineconversion[#1]#*[#2]#*[#3]% from now on global (maybe local again some day)
+ {\ifparameter#3\or
+ \syst_converters_define_conversion_indeed{#1#2}{#1:#2}{#3}%
+ \else
+ \syst_converters_define_conversion_indeed{#1}{#1}{#2}%
+ \fi}
+
+\def\syst_converters_define_conversion_indeed#1#2#3%
+ {\doifelseinstring{,}{\detokenize{#3}}
+ {\clf_defineconversion{#2}{\detokenize{#3}}% a set e.g. of symbols
+ \setgvalue{\??conversion#1}{\syst_converters_checked_conversion{#2}}}
+ {\setgvalue{\??conversion#1}{#3}}}
+
+\def\syst_converters_checked_conversion#1#2%
+ {\clf_checkedconversion{#1}\numexpr#2\relax}
+
+%D If a conversion is just a font switch then we need to make sure that the number
+%D is indeed ends up as number in the input, so we need to handle the second
+%D argument.
+
+\permanent\def\convertnumber#1#2% expandable
+ {\csname\??conversionarguments
+ \ifcsname\??conversion\currentlanguage#1\endcsname1\else
+ \ifcsname\??conversion #1\endcsname2\else
+ 3\fi\fi
+ \endcsname{#1}{\number#2}}
+
+\permanent\protected\def\uconvertnumber % unexpandable
+ {\convertnumber}
+
+\setvalue{\??conversionarguments1}#1{\csname\??conversion\currentlanguage#1\endcsname}
+\setvalue{\??conversionarguments2}#1{\csname\??conversion #1\endcsname}
+\letvalue{\??conversionarguments3}\syst_converters_checked_conversion
+
+% we can also add a \ctxcommand{doifelseconversion("#1","\currentlanguage")} to check
+% if we have definitions that are not matched at the lua end .. eventually we might do
+% that when more shows up
+
+\permanent\def\doifelseconversiondefined#1% expandable
+ {\ifcsname\??conversion\currentlanguage#1\endcsname
+ \expandafter\firstoftwoarguments
+ \orelse\ifcsname\??conversion#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\permanent\def\doifelseconversionnumber#1#2% expandable
+ {\ifnum#2>\numexpr\clf_nofconversions{#1}\relax
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\aliased\let\doifconversiondefinedelse\doifelseconversiondefined
+\aliased\let\doifconversionnumberelse \doifelseconversionnumber
+
+%D Handy.
+
+\setvalue{\??conversionwords\v!one }{1}
+\setvalue{\??conversionwords\v!two }{2}
+\setvalue{\??conversionwords\v!three}{3}
+\setvalue{\??conversionwords\v!four }{4}
+\setvalue{\??conversionwords\v!five }{5}
+
+%permanent\def\wordtonumber#1#2{\ifcsname\??conversionwords#1\endcsname\csname\??conversionwords#1\endcsname\else#2\fi}
+\permanent\def\wordtonumber#1#2{\ifcsname\??conversionwords#1\endcsname\lastnamedcs\else#2\fi}
+
+% \defineconversion[ctx][c,o,n,t,e,x,t]
+%
+% \doloop{\doifelseconversionnumber{ctx}{\recurselevel}{[\recurselevel]}{\exitloop}}
+
+%D \macros
+%D {ordinalnumber, highordinalstr, ordinalstr}
+%D
+%D Efficient general ordinal number converters are sometimes difficult to
+%D implement. Fortunately dates never exceed the number~31.
+
+\permanent\def\highordinalstr#1{\high{\notsmallcapped{#1}}}
+\permanent\def\ordinalstr #1{\notsmallcapped{#1}}
+\permanent\def\ordinalnumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
+\permanent\def\Ordinalnumber #1{\Words{\clf_ordinal\numexpr#1\relax{\currentlanguage}}}
+
+\mutable\let\verbosenumberconnector\space
+
+\permanent\def\verbosenumber#1{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}
+\permanent\def\VerboseNumber#1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}}
+
+%D As longs as symbols are linked to levels or numbers, we can also use the
+%D conversion mechanism, but in for instance the itemization macros, we prefer
+%D symbols because they can more easier be (partially) redefined. Symbols are
+%D implemented in another module.
+
+\permanent\def\smallcappedromannumerals#1{\smallcapped{\romannumerals{#1}}}
+\permanent\def\smallcappedcharacters #1{\smallcapped{\characters {#1}}}
+
+\defineconversion [] [\numbers] % the default conversion
+\defineconversion [\v!empty] [\gobbleoneargument]
+\defineconversion [\v!none] [\numbers]
+\defineconversion [\s!default] [\numbers]
+
+\defineconversion [month] [\monthlong]
+\defineconversion [month:mnem] [\monthshort]
+
+\defineconversion [\v!character] [\character]
+\defineconversion [\v!Character] [\Character]
+
+\defineconversion [\v!characters] [\characters]
+\defineconversion [\v!Characters] [\Characters]
+
+\defineconversion [a] [\alphabeticnumerals]
+\defineconversion [A] [\Alphabeticnumerals]
+\defineconversion [AK] [\smallcappedcharacters]
+\defineconversion [KA] [\smallcappedcharacters]
+
+\defineconversion [\v!alphabetic] [\alphabeticnumerals]
+\defineconversion [\v!Alphabetic] [\Alphabeticnumerals]
+
+\defineconversion [\v!number] [\numbers]
+\defineconversion [\v!numbers] [\numbers]
+\defineconversion [\v!Numbers] [\Numbers]
+\defineconversion [\v!mediaeval] [\mediaeval]
+
+\defineconversion [\v!word] [\verbosenumber]
+\defineconversion [\v!words] [\verbosenumber]
+
+\defineconversion [\v!Word] [\VerboseNumber]
+\defineconversion [\v!Words] [\VerboseNumber]
+
+\defineconversion[\v!ordinal] [\ordinalnumber]
+\defineconversion[\v!Ordinal] [\Ordinalnumber]
+
+\defineconversion [n] [\numbers]
+\defineconversion [N] [\Numbers]
+\defineconversion [m] [\mediaeval]
+\defineconversion [o] [\oldstylenumerals]
+\defineconversion [O] [\oldstylenumerals]
+\defineconversion [or] [\oldstyleromannumerals]
+
+\defineconversion [\v!romannumerals] [\romannumerals]
+\defineconversion [\v!Romannumerals] [\Romannumerals]
+
+\defineconversion [i] [\romannumerals]
+\defineconversion [I] [\Romannumerals]
+\defineconversion [r] [\romannumerals]
+\defineconversion [R] [\Romannumerals]
+
+\defineconversion [KR] [\smallcappedromannumerals]
+\defineconversion [RK] [\smallcappedromannumerals]
+
+\defineconversion [\v!greek] [\greeknumerals]
+\defineconversion [\v!Greek] [\Greeknumerals]
+
+\defineconversion [g] [\greeknumerals]
+\defineconversion [G] [\Greeknumerals]
+
+%defineconversion [ñ] [\spanishnumerals]
+%defineconversion [Ñ] [\Spanishnumerals]
+
+\defineconversion [abjadnumerals] [\abjadnumerals]
+\defineconversion [abjadnodotnumerals] [\abjadnodotnumerals]
+\defineconversion [abjadnaivenumerals] [\abjadnaivenumerals]
+
+\defineconversion [hebrewnumerals] [\hebrewnumerals]
+\defineconversion [yiddishnumerals] [\yiddishnumerals]
+
+% users can do: \defineconversion [he] [\hebrewnumerals]
+% users can do: \defineconversion [yi] [\hebrewnumerals]
+
+\defineconversion [thainumerals] [\thainumerals]
+\defineconversion [devanagarinumerals] [\devanagarinumerals]
+\defineconversion [gurmurkhinumerals] [\gurmurkhinumerals]
+\defineconversion [gujaratinumerals] [\gujaratinumerals]
+\defineconversion [tibetannumerals] [\tibetannumerals]
+\defineconversion [greeknumerals] [\greeknumerals]
+\defineconversion [Greeknumerals] [\Greeknumerals]
+\defineconversion [arabicnumerals] [\arabicnumerals]
+\defineconversion [persiannumerals] [\persiannumerals]
+\defineconversion [arabicexnumerals] [\arabicexnumerals]
+\defineconversion [arabicdecimals] [\arabicdecimals]
+\defineconversion [persiandecimals] [\persiandecimals]
+
+\defineconversion [koreannumerals] [\koreannumerals]
+\defineconversion [koreanparennumerals] [\koreanparenthesisnumerals] % for old times sake (for a while)
+\defineconversion [koreanparenthesisnumerals]
+ [\koreanparenthesisnumerals]
+\defineconversion [koreancirclenumerals] [\koreancirclenumerals]
+
+\defineconversion [kr] [\koreannumerals]
+\defineconversion [kr-p] [\koreanparentnumerals]
+\defineconversion [kr-c] [\koreancirclenumerals]
+
+\defineconversion [chinesenumerals] [\chinesenumerals]
+\defineconversion [chinesecapnumerals] [\chinesecapnumerals]
+\defineconversion [chineseallnumerals] [\chineseallnumerals]
+
+\defineconversion [cn] [\chinesenumerals]
+\defineconversion [cn-c] [\chinesecapnumerals]
+\defineconversion [cn-a] [\chineseallnumerals]
+
+%D Moved from lang-def.mkiv:
+%D
+%D Define these as the general character enumeration when language is Slovenian. If
+%D you feel uncomfortable with this, mail Mojca, since she promised to to take the
+%D heat. Pablo was next to request this. We changed characters to numerals for this
+%D feature. We do need these definitions for mechanisms like itemize that check
+%D for converters.
+
+\permanent\def\sloveniannumerals#1{\clf_alphabetic\numexpr#1\relax{sl}}
+\permanent\def\slovenianNumerals#1{\clf_Alphabetic\numexpr#1\relax{sl}}
+
+\permanent\def\spanishnumerals #1{\clf_alphabetic\numexpr#1\relax{es}}
+\permanent\def\spanishNumerals #1{\clf_Alphabetic\numexpr#1\relax{es}}
+
+\permanent\def\russiannumerals #1{\clf_alphabetic\numexpr#1\relax{ru}}
+\permanent\def\russianNumerals #1{\clf_Alphabetic\numexpr#1\relax{ru}}
+
+%defineconversion [\s!sl] [character] [\sloveniannumerals]
+%defineconversion [\s!sl] [Character] [\slovenianNumerals]
+%defineconversion [\s!sl] [characters] [\sloveniannumerals]
+%defineconversion [\s!sl] [Characters] [\slovenianNumerals]
+
+\defineconversion [\s!sl] [alphabetic] [\sloveniannumerals]
+\defineconversion [\s!sl] [Alphabetic] [\slovenianNumerals]
+
+\defineconversion [\s!sl] [a] [\sloveniannumerals]
+\defineconversion [\s!sl] [A] [\slovenianNumerals]
+\defineconversion [\s!sl] [AK] [\smallcapped\sloveniannumerals]
+\defineconversion [\s!sl] [KA] [\smallcapped\sloveniannumerals]
+
+%defineconversion [\s!es] [character] [\spanishnumerals]
+%defineconversion [\s!es] [Character] [\spanishNumerals]
+%defineconversion [\s!es] [characters] [\spanishnumerals]
+%defineconversion [\s!es] [Characters] [\spanishNumerals]
+
+\defineconversion [\s!es] [alphabetic] [\spanishnumerals]
+\defineconversion [\s!es] [Alphabetic] [\spanishNumerals]
+
+\defineconversion [\s!es] [a] [\spanishnumerals]
+\defineconversion [\s!es] [A] [\spanishNumerals]
+\defineconversion [\s!es] [AK] [\smallcapped\spanishnumerals]
+\defineconversion [\s!es] [KA] [\smallcapped\spanishnumerals]
+
+%defineconversion [\s!ru] [character] [\russiannumerals]
+%defineconversion [\s!ru] [Character] [\russianNumerals]
+%defineconversion [\s!ru] [characters] [\russiannumerals]
+%defineconversion [\s!ru] [Characters] [\russianNumerals]
+
+\defineconversion [\s!ru] [alphabetic] [\russiannumerals]
+\defineconversion [\s!ru] [Alphabetic] [\russianNumerals]
+
+\defineconversion [\s!ru] [a] [\russiannumerals]
+\defineconversion [\s!ru] [A] [\russianNumerals]
+\defineconversion [\s!ru] [AK] [\smallcapped\russiannumerals]
+\defineconversion [\s!ru] [KA] [\smallcapped\russiannumerals]
+
+\defineconversion [sloveniannumerals] [\sloveniannumerals]
+\defineconversion [slovenianNumerals] [\slovenianNumerals]
+
+\defineconversion [spanishnumerals] [\spanishnumerals]
+\defineconversion [spanishNumerals] [\spanishNumerals]
+
+\defineconversion [russiannumerals] [\russiannumerals]
+\defineconversion [russianNumerals] [\russianNumerals]
+
+%D In case a font has no greek (WS):
+
+\defineconversion [mathgreek]
+ [\m{α},\m{β},\m{γ},\m{δ},\m{ε},\m{ζ},
+ \m{η},\m{θ},\m{ι},\m{κ},\m{λ},\m{μ},
+ \m{ν},\m{ξ},\m{ο},\m{Ï€},\m{Ï},\m{σ},
+ \m{τ},\m{υ},\m{φ},\m{χ},\m{ψ},\m{ω}]
+
+%D Handy too (expanded!):
+
+\permanent\def\unihex#1{\clf_unihex\numexpr#1\relax}
+
+%D Symbol sets:
+
+\ifdefined\symbol \else \def\symbol[#1]{#1} \fi % todo
+
+% \defineconversion
+% [set 0]
+% [{\symbol[bullet]},
+% {\symbol[dash]},
+% {\symbol[star]},
+% {\symbol[triangle]},
+% {\symbol[circle]},
+% {\symbol[medcircle]},
+% {\symbol[bigcircle]},
+% {\symbol[square]},
+% {\symbol[checkmark]}]
+
+% \defineconversion
+% [set 1]
+% [\mathematics{\star},
+% \mathematics{\star\star},
+% \mathematics{\star\star\star},
+% \mathematics{\ddagger},
+% \mathematics{\ddagger\ddagger},
+% \mathematics{\ddagger\ddagger\ddagger},
+% \mathematics{\ast},
+% \mathematics{\ast\ast},
+% \mathematics{\ast\ast\ast}]
+%
+% \defineconversion
+% [set 2]
+% [\mathematics{\ast},
+% \mathematics{\dag},
+% \mathematics{\ddag},
+% \mathematics{\ast\ast},
+% \mathematics{\dag\dag},
+% \mathematics{\ddag\ddag},
+% \mathematics{\ast\ast\ast},
+% \mathematics{\dag\dag\dag},
+% \mathematics{\ddag\ddag\ddag},
+% \mathematics{\ast\ast\ast\ast},
+% \mathematics{\dag\dag\dag\dag},
+% \mathematics{\ddag\ddag\ddag\ddag}]
+%
+% \defineconversion
+% [set 3]
+% [\mathematics{\star},
+% \mathematics{\star\star},
+% \mathematics{\star\star\star},
+% \mathematics{\ddagger},
+% \mathematics{\ddagger\ddagger},
+% \mathematics{\ddagger\ddagger\ddagger},
+% \mathematics{\P},
+% \mathematics{\P\P},
+% \mathematics{\P\P\P},
+% \mathematics{\S},
+% \mathematics{\S\S},
+% \mathematics{\S\S\S},
+% \mathematics{\ast},
+% \mathematics{\ast\ast},
+% \mathematics{\ast\ast\ast}]
+
+\defineconversion
+ [set 0]
+ [\symbol{bullet},
+ \symbol{dash},
+ \symbol{star},
+ \symbol{triangle},
+ \symbol{circle},
+ \symbol{medcircle},
+ \symbol{bigcircle},
+ \symbol{square},
+ \symbol{checkmark}]
+
+\defineconversion
+ [set 1]
+ [\textormathchars{⋆},
+ \textormathchars{⋆⋆},
+ \textormathchars{⋆⋆⋆},
+ \textormathchars{‡},
+ \textormathchars{‡‡},
+ \textormathchars{‡‡‡},
+ \textormathchars{∗},
+ \textormathchars{∗∗},
+ \textormathchars{∗∗∗}]
+
+\defineconversion
+ [set 2]
+ [\textormathchars{∗},
+ \textormathchars{†},
+ \textormathchars{‡},
+ \textormathchars{∗∗},
+ \textormathchars{††},
+ \textormathchars{‡‡},
+ \textormathchars{∗∗∗},
+ \textormathchars{†††},
+ \textormathchars{‡‡‡},
+ \textormathchars{∗∗∗∗},
+ \textormathchars{††††},
+ \textormathchars{‡‡‡‡}]
+
+\defineconversion
+ [set 3]
+ [\textormathchars{⋆},
+ \textormathchars{⋆⋆},
+ \textormathchars{⋆⋆⋆},
+ \textormathchars{‡},
+ \textormathchars{‡‡},
+ \textormathchars{‡‡‡},
+ \textormathchars{¶},
+ \textormathchars{¶¶},
+ \textormathchars{¶¶¶},
+ \textormathchars{§},
+ \textormathchars{§§},
+ \textormathchars{§§§},
+ \textormathchars{∗},
+ \textormathchars{∗∗},
+ \textormathchars{∗∗∗}]
+
+%D Iteration of suggestion by WS on mailinglist 2010.12.22:
+%D
+%D \starttyping
+%D \setupfloatsplitting[conversion=continued]
+%D \stoptyping
+
+\permanent\protected\def\continuednumber#1%
+ {\labeltext{\ifcase#1\or\else\v!continued\fi}}
+
+\defineconversion
+ [\v!continued]
+ [\continuednumber]
+
+%D Taken from x-asciimath (see digits-001.tex for an example):
+
+\mutable\let\spaceddigitsmethod \empty % alternative methods : 1 default, 2 and 3 only when > 4
+\mutable\let\spaceddigitssymbol \empty % extra splitter symbol : {,}
+\mutable\let\spaceddigitsseparator\empty % separator symbol : {\Uchar{"2008}}
+
+\permanent\protected\def\spaceddigits#1%
+ {\clf_spaceddigits
+ method {\spaceddigitsmethod}%
+ symbol {\spaceddigitssymbol}%
+ separator {\spaceddigitsseparator}%
+ data {#1}%
+ \relax}
+
+%D For those who sart counting at zero:
+%D
+%D \starttyping
+%D \defineconversionset [zero] [n,zero] [n]
+%D
+%D \setuphead [sectionconversionset=zero]
+%D
+%D \starttext
+%D \startchapter [title=Introduction]
+%D \startsection [title=First topic] \stopsection
+%D \startsection [title=Second topic] \stopsection
+%D \stopchapter
+%D \stoptext
+%D \stoptyping
+
+\permanent\def\zeronumberconversion#1{\number\numexpr#1-\plusone\relax}
+
+\defineconversion [zero] [\zeronumberconversion]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-ctx.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-ctx.mkxl
new file mode 100644
index 00000000000..8837640d442
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-ctx.mkxl
@@ -0,0 +1,29 @@
+%D \module
+%D [ file=core-ctx,
+%D version=2006.08.16, % old stuff
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Job Control,
+%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 / Job Control}
+
+\registerctxluafile{core-ctx}{}
+
+\unprotect
+
+% called directly in core-def.mkiv
+%
+% \protected\def\job_options_get_commandline {\clf_setdocumentcommandline}
+% \protected\def\job_options_get_ctxfile {\clf_setdocumentctxfile}
+% \protected\def\job_options_set_modes {\clf_setdocumentmodes}
+% \protected\def\job_options_set_modules {\clf_setdocumentmodules}
+% \protected\def\job_options_set_environments{\clf_setdocumentenvironments}
+% \protected\def\job_options_set_filenames {\clf_setdocumentfilenames}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl
new file mode 100644
index 00000000000..93d0bbb7ae8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-dat.mkxl
@@ -0,0 +1,110 @@
+%D \module
+%D [ file=core-dat,
+%D version=20122.04.17, % replaces core-two from 1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Multipass Datasets,
+%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 Datasets}
+
+%D \starttyping
+%D \definedataset[test-1]
+%D \definedataset[test-2][delay=yes]
+%D
+%D \startlines
+%D set 1: \setdataset[test-1][whatever=this-or-that-1]
+%D set 2: \setdataset[test-2][whatever=this-or-that-2]
+%D set 3: \setdataset[test-2][whatever=this-or-that-3]
+%D \stoplines
+%D
+%D \startlines
+%D get 1: \datasetvariable{test-1}{1}{whatever} / \datasetvariable{test-1}{1}{realpage}
+%D get 2: \datasetvariable{test-2}{1}{whatever} / \datasetvariable{test-2}{1}{realpage}
+%D get 3: \datasetvariable{test-2}{2}{whatever} / \datasetvariable{test-2}{2}{realpage}
+%D \stoplines
+%D \stoptyping
+
+\unprotect
+
+\registerctxluafile{core-dat}{}
+
+\installcorenamespace{dataset}
+
+\installcommandhandler \??dataset {dataset} \??dataset
+
+\permanent\tolerant\protected\def\setdataset[#1]#*[#2]#*[#3]%
+ {\begingroup
+ \edef\currentdataset{#1}%
+ \ifparameters\or\or
+ \clf_setdataset
+ name {\currentdataset}%
+ delay {\datasetparameter\c!delay}%
+ data {#2}%
+ \relax
+ \or
+ \edef\currentdataset{#1}%
+ \clf_setdataset
+ name {\currentdataset}%
+ tag {#2}%
+ delay {\datasetparameter\c!delay}%
+ data {#3}%
+ \relax
+ \fi
+ \endgroup}
+
+\permanent\def\datasetvariable#1#2#3%
+ {\clf_datasetvariable{#1}{#2}{#3}}
+
+\installcorenamespace{pagestate}
+\installcorenamespace{pagestatecounter}
+
+\installcommandhandler \??pagestate {pagestate} \??pagestate
+
+\def\syst_pagestates_allocate
+ {\expandafter\newcount\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
+ \advance\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
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-def.mkxl
new file mode 100644
index 00000000000..96570bc366d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-def.mkxl
@@ -0,0 +1,182 @@
+%D \module
+%D [ file=core-def,
+%D version=2002.05.07,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Defaults,
+%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 / Defaults}
+
+%D Here we collect settings that cannot be done earlier due to
+%D depedencies. More code will moved to this module later.
+
+\unprotect
+
+\usesymbols[mis,nav] % no longer mvs preloaded
+
+\setupsymbolset[navigation 1]
+
+\setupinteraction[\c!symbolset=navigation 1]
+
+% what a mess
+
+\everypar \emptytoks
+\neverypar \emptytoks
+
+\appendtoks
+ % \flushnotes
+ \page_otr_command_synchronize_side_floats % an otr specific command
+ \checkindentation
+ \showparagraphnumber
+ \restoreinterlinepenalty
+ % \flushmargincontents
+ % \flushcommentanchors
+ \flushnotes
+ % \synchronizenotes
+ % \OTRSETshowstatus
+ \registerparoptions
+ % \flushsyncpositions
+ \flushpostponednodedata
+ \typo_delimited_repeat
+ \spac_paragraphs_flush_intro
+ \typo_initial_handle
+ \typo_firstline_handle
+ %
+ \spac_paragraph_wrap
+ \spac_paragraph_freeze
+\to \everypar
+
+\appendtoks
+ \flushnotes
+\to \everydisplay
+
+% \appendtoks
+% \adjustsidefloatdisplaylines
+% \to \everydisplay
+
+% \appendtoks
+% \flushpostponednodedata
+% \to \neverypar
+
+% \appendtoks
+% \flushsyncpositions
+% \to \everyheadstart
+
+% \appendtoks
+% \flushsyncresets
+% \to \everyendoftextbody
+
+\appendtoks
+ \ignorespaces
+\to \everybeginofpar
+
+\appendtoks
+ \removeunwantedspaces
+ % \strut % option ?
+ % \flushsyncresets
+ % \setlastlinewidth % gone, will be done in lua
+ \endgraf
+\to \everyendofpar
+
+% initialization order:
+
+\ifdefined\font_preloads_at_every_job \else \let\font_preloads_at_every_job \relax \fi
+\ifdefined\font_preloads_at_start_text \else \let\font_preloads_at_start_text\relax \fi
+\ifdefined\font_preloads_at_stop_text \else \let\font_preloads_at_stop_text \relax \fi
+
+\appendtoks
+ \font_preloads_at_start_text
+\to \everystarttext
+
+\appendtoks
+ \font_preloads_at_stop_text
+\to \everystoptext
+
+% We made \loadoptionfile obsolete: we pass options via the command line to
+% luatex now and handle them directly instead of via a file. This also makes
+% the next obsolete:
+%
+% \directsetup{*runtime:options}
+% \directsetup{*runtime:modules}
+
+\appendtoks
+ \showcontextbanner
+ %\initializenewlinechar
+ \calculatecurrenttime
+ \syst_files_load
+ % for the moment here (before doc env)
+ \setupoutput[pdf]%
+ %
+ \clf_setdocumentcommandline
+ \clf_setdocumentctxfile
+ \clf_setdocumentfilenames
+ \font_preloads_at_every_job
+ \settopskip % brrr
+ \initializemainlanguage
+ \initializepagebackgrounds
+ \initializepagecounters
+ \clf_setdocumentmodes
+ \clf_setdocumentmodules
+ \clf_setdocumentenvironments
+\to \everyjob
+
+\appendtoks
+ \ifarrangingpages\poparrangedpages\fi
+\to \everybye
+
+\prependtoks
+ \resetallattributes
+\to \everybeforeoutput
+
+\appendtoks
+ \the\everybackendshipout
+\to \everyshipout
+
+\prependtoks
+ \the\everylastbackendshipout
+\to \everylastshipout
+
+\prependtoks
+ \lefttoright
+\to \everybeforeoutput
+
+% temporary here:
+
+\pushoverloadmode
+ \frozen\protected\def\arg{\mathortext\normalmatharg\normaltextarg} % might be overloaded
+\popoverloadmode
+
+% might move to \everydump or even disappear:
+
+\nonknuthmode
+
+% brrr
+
+\appendtoks
+ \synchronizegloballinespecs
+ \synchronizelocallinespecs
+\to \everysetupbodyfont
+
+\appendtoks
+ \synchronizelocallinespecs
+\to \everyswitchtobodyfont
+
+% who knows
+
+% \appendtoks
+% \resetcharacterspacing
+% \to \everyhyphenatedurl
+
+% \setbreakpoints[compound]
+
+%D Till we fixed all styles:
+
+\enforced\let\\\crlf % frozen or permanent?
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-env.lmt b/Master/texmf-dist/tex/context/base/mkxl/core-env.lmt
new file mode 100644
index 00000000000..388e96787a0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-env.lmt
@@ -0,0 +1,213 @@
+if not modules then modules = { } end modules ['core-env'] = {
+ version = 1.001,
+ comment = "companion to core-env.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- maybe this will move to the context name space although the
+-- plurals are unlikely to clash with future tex primitives
+--
+-- if tex.modes['xxxx'] then .... else .... end
+
+local rawset = rawset
+
+local P, C, S, lpegmatch, patterns = lpeg.P, lpeg.C, lpeg.S, lpeg.match, lpeg.patterns
+
+local context = context
+local ctxcore = context.core
+
+local texgetcount = tex.getcount
+local texgetintegervalue = token.get_integer -- todo: in tex namespace
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local setmetatablenewindex = table.setmetatablenewindex
+local setmetatablecall = table.setmetatablecall
+
+local createtoken = token.create
+local isdefined = tokens.isdefined
+
+texmodes = allocate { } tex.modes = texmodes
+texsystemmodes = allocate { } tex.systemmodes = texsystemmodes
+texconstants = allocate { } tex.constants = texconstants
+texconditionals = allocate { } tex.conditionals = texconditionals
+texifs = allocate { } tex.ifs = texifs
+texisdefined = allocate { } tex.isdefined = texisdefined
+
+local modes = { }
+local systemmodes = { }
+
+-- we could use the built-in tex.is[count|dimen|skip|toks] here but caching
+-- at the lua end is not that bad (and we need more anyway)
+
+local cache = tokens.cache
+
+-- we can have a modes cache too
+
+local commandcodes = tokens.commands
+local iftrue = cache["iftrue"].index
+
+-- local dimencode = cache["scratchdimen"] .command -- tokens.commands.register_dimen
+-- local countcode = cache["scratchcounter"].command -- tokens.commands.register_int
+-- local tokencode = cache["scratchtoks"] .command -- tokens.commands.register_toks
+-- local skipcode = cache["scratchskip"] .command -- tokens.commands.register_glue
+-- local muskipcode = cache["scratchmuskip"] .command -- tokens.commands.register_mu_glue
+-- local conditioncode = cache["iftrue"] .command -- tokens.commands.if_test
+
+-- local types = {
+-- [dimencode] = "dimen",
+-- [countcode] = "count",
+-- [tokencode] = "token",
+-- [skipcode] = "skip",
+-- [muskipcode] = "muskip",
+-- -- [attributecode] = "attribute",
+-- [conditioncode] = "condition"
+-- }
+
+local dimencode = commandcodes.register_dimen -- cache["scratchdimen"] .command -- tokens.commands.register_dimen
+local countcode = commandcodes.register_int -- cache["scratchcounter"].command -- tokens.commands.register_int
+local tokencode = commandcodes.register_toks -- ["scratchtoks"] .command -- tokens.commands.register_toks
+local skipcode = commandcodes.register_glue -- cache["scratchskip"] .command -- tokens.commands.register_glue
+local muskipcode = commandcodes.register_mu_glue -- cache["scratchmuskip"] .command -- tokens.commands.register_mu_glue
+local conditioncode = commandcodes.if_test -- cache["iftrue"] .command -- tokens.commands.if_test
+local integercode = commandcodes.integer
+
+local types = {
+ [dimencode] = "dimen",
+ [countcode] = "count",
+ [tokencode] = "token",
+ [skipcode] = "skip",
+ [muskipcode] = "muskip",
+ -- [attributecode] = "attribute",
+ [conditioncode] = "condition",
+ [integercode] = "integer",
+}
+
+setmetatableindex(texmodes, function(t,k)
+ local m = systemmodes[k]
+ if not m then
+ local n = "mode>" .. k
+ m = function() return texgetintegervalue(n) == 1 end
+ rawset(modes,k,m)
+ end
+ return m()
+end)
+
+setmetatableindex(texsystemmodes, function(t,k)
+ local m = systemmodes[k]
+ if not m then
+ local n = "mode>*" .. k
+ m = function() return texgetintegervalue(n) == 1 end
+ rawset(modes,k,m)
+ end
+ return m()
+end)
+
+-- also a call method
+
+context.settrialtypesettingmethod(function() return texsystemmodes.trialtypesetting end)
+
+setmetatablenewindex(texmodes, function(t,k) report_mode("you cannot set the %s named %a this way","mode", k) end)
+setmetatablenewindex(texsystemmodes, function(t,k) report_mode("you cannot set the %s named %a this way","systemmode", k) end)
+setmetatablenewindex(texconstants, function(t,k) report_mode("you cannot set the %s named %a this way","constant", k) end)
+setmetatablenewindex(texconditionals, function(t,k) report_mode("you cannot set the %s named %a this way","conditional",k) end)
+setmetatablenewindex(texifs, function(t,k) end)
+
+-- if we really need performance we can have a dedicated cache for each
+-- kind of variable ... maybe we no longer have to cache anyway (in lmtx)
+
+setmetatableindex(texconstants, function(t,k)
+ -- return cache[k].command == countcode and texgetcount(k) or 0
+ return cache[k].command == integercode and texgetintegervalue(k) or 0
+end)
+
+setmetatableindex(texconditionals, function(t,k) -- 0 == true
+ -- return cache[k].command == countcode and texgetcount(k) == 0
+ return cache[k].command == integercode and texgetintegervalue(k) == 0
+end)
+
+setmetatableindex(texifs, function(t,k)
+ local c = cache[k]
+ return c.command == conditioncode and c.index == iftrue
+end)
+
+tex.isdefined = isdefined
+
+function tex.isdimen(name)
+ local hit = cache[name]
+ return hit.command == dimencode and hit.index or true
+end
+
+function tex.iscount(name)
+ local hit = cache[name]
+ return hit.command == countcode and hit.index or true
+end
+
+function tex.istoken(name)
+ local hit = cache[name]
+ return hit.command == tokencode and hit.index or true
+end
+
+function tex.isskip(name)
+ local hit = cache[name]
+ return hit.command == skipcode and hit.index or true
+end
+
+function tex.ismuskip(name)
+ local hit = cache[name]
+ return hit.command == muskipcode and hit.index or true
+end
+
+function tex.type(name)
+ return types[cache[name].command] or "macro"
+end
+
+function context.setconditional(name,value)
+ if value then
+ ctxcore.settruevalue(name)
+ else
+ ctxcore.setfalsevalue(name)
+ end
+end
+
+function context.setmode(name,value)
+ if value then
+ ctxcore.setmode(name)
+ else
+ ctxcore.resetmode(name)
+ end
+end
+
+function context.setsystemmode(name,value)
+ if value then
+ ctxcore.setsystemmode(name)
+ else
+ ctxcore.resetsystemmode(name)
+ end
+end
+
+context.modes = texmodes
+context.systemmodes = texsystemmodes
+context.conditionals = texconditionals
+-------.constants = texconstants
+-------.ifs = texifs
+
+local sep = S("), ")
+local str = C((1-sep)^1)
+local tag = P("(") * C((1-S(")" ))^1) * P(")")
+local arg = P("(") * C((1-S("){"))^1) * P("{") * C((1-P("}"))^0) * P("}") * P(")")
+
+local pattern = (
+ P("lua") * tag / ctxcore.luasetup
+ + P("xml") * arg / ctxcore.setupwithargument -- or xmlw as xmlsetup has swapped arguments
+ + (P("tex") * tag + str) / ctxcore.texsetup
+ + sep^1
+)^1
+
+interfaces.implement {
+ name = "autosetups",
+ actions = function(str) lpegmatch(pattern,str) end,
+ arguments = "string"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-env.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-env.mkxl
new file mode 100644
index 00000000000..62e4106c574
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-env.mkxl
@@ -0,0 +1,807 @@
+%D \module
+%D [ file=core-env, % was core-new
+%D version=1995.01.01, % wrong
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=New ones,
+%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 / Environments}
+
+\registerctxluafile{core-env}{autosuffix}
+
+\unprotect
+
+%D Modes:
+%D
+%D \starttyping
+%D \enablemode[screen,paper,bound]
+%D
+%D \doifmodeelse {paper} {this} {that}
+%D \doifmode {paper,screen} {this}
+%D \doifnotmode {paper,bound} {that}
+%D
+%D \startmode [list]
+%D \stopmode
+%D
+%D \startnotmode [list]
+%D \stopnotmode
+%D \stoptyping
+%D
+%D system modes have a * as prefix
+%D
+%D Sometimes, we want to prevent a mode for being set. Think of situations where a
+%D style enables a mode, but an outer level style does not want that. Preventing can
+%D be considered a permanent disabling on forehand.
+
+\aliased\let\systemmodeprefix\wildcardsymbol
+
+% we will have \installcorenamespace{mode} but need some hackery at the lua end then
+
+% TODO: make them mutable, also at the lua end
+
+\installcorenamespace{modestack}
+
+\immutable\def\??mode{mode>} % special namespace, also used at lua end
+
+\permanent\protected\def\newmode #1{\ifcsname \??mode#1\endcsname\else\resetmode{#1}\fi}
+\permanent\protected\def\setmode #1{\expandafter \integerdef\csname\??mode#1\endcsname\plusone}
+\permanent\protected\def\resetmode #1{\expandafter \integerdef\csname\??mode#1\endcsname\zerocount}
+\permanent\protected\def\globalsetmode #1{\global\expandafter\integerdef\csname\??mode#1\endcsname\plusone}
+\permanent\protected\def\globalresetmode #1{\global\expandafter\integerdef\csname\??mode#1\endcsname\zerocount}
+
+\permanent\protected\def\newsystemmode #1{\ifcsname \??mode\systemmodeprefix#1\endcsname\else\resetsystemmode{#1}\fi}
+\permanent\protected\def\setsystemmode #1{\expandafter \integerdef\csname\??mode\systemmodeprefix#1\endcsname\plusone}
+\permanent\protected\def\resetsystemmode #1{\expandafter \integerdef\csname\??mode\systemmodeprefix#1\endcsname\zerocount}
+\permanent\protected\def\globalsetsystemmode #1{\global\expandafter\integerdef\csname\??mode\systemmodeprefix#1\endcsname\plusone}
+\permanent\protected\def\globalresetsystemmode#1{\global\expandafter\integerdef\csname\??mode\systemmodeprefix#1\endcsname\zerocount}
+
+\expandafter \appendtoks
+ \expandafter\integerdef\csname\??mode\systemmodeprefix trialtypesetting\endcsname\plusone
+ \luacopyinputnodes\plusone
+\to \everysettrialtypesetting
+
+\expandafter \appendtoks
+ \expandafter\integerdef\csname\??mode\systemmodeprefix trialtypesetting\endcsname\zerocount
+ \luacopyinputnodes\zerocount
+\to \everyresettrialtypesetting
+
+\pushoverloadmode \newsystemmode{trialtypesetting} \popoverloadmode
+
+\the\everyresettrialtypesetting
+
+% user ones
+
+\mutable\let\syst_mode_prefix\relax
+
+\permanent\protected\def\preventmode{\unprotect\syst_modes_prevent}
+\permanent\protected\def\enablemode {\unprotect\syst_modes_enable }
+\permanent\protected\def\disablemode{\unprotect\syst_modes_disable}
+
+\permanent\protected\def\globalpreventmode{\let\syst_mode_prefix\global\unprotect\syst_modes_prevent}
+\permanent\protected\def\globalenablemode {\let\syst_mode_prefix\global\unprotect\syst_modes_enable }
+\permanent\protected\def\globaldisablemode{\let\syst_mode_prefix\global\unprotect\syst_modes_disable}
+
+\def\syst_modes_prevent[#1]{\protect\fastprocesscommacommand[#1]\syst_modes_prevent_indeed\let\syst_mode_prefix\relax}
+\def\syst_modes_enable [#1]{\protect\fastprocesscommacommand[#1]\syst_modes_enable_indeed \let\syst_mode_prefix\relax}
+\def\syst_modes_disable[#1]{\protect\fastprocesscommacommand[#1]\syst_modes_disable_indeed\let\syst_mode_prefix\relax}
+
+\def\syst_modes_prevent_indeed#1%
+ {\ifcsname\??mode#1\endcsname\else\setmode{#1}\fi
+ \syst_mode_prefix\expandafter\integerdef\lastnamedcs\plustwo}
+
+\def\syst_modes_enable_indeed#1% we can speed it up by moving the new outside
+ {\ifcsname\??mode#1\endcsname\else\setmode{#1}\fi
+ \ifnum\lastnamedcs=\plustwo\else
+ \syst_mode_prefix\expandafter\integerdef\lastnamedcs\plusone
+ \fi}
+
+\def\syst_modes_disable_indeed#1%
+ {\ifcsname\??mode#1\endcsname\else\setmode{#1}\fi
+ \ifnum\lastnamedcs=\plustwo\else
+ \syst_mode_prefix\expandafter\integerdef\lastnamedcs\zerocount
+ \fi}
+
+%D If you do a lot of mode testing, it makes sense to define modes (or disable them
+%D explicitly if unset. This makes testing twice as fast. Often one enables modes
+%D beforehand, in which case \type {\definemode} would reset the mode. The optional
+%D second argument \type {keep} will prevent changing the already set mode but defines
+%D it when undefined.
+
+\permanent\protected\def\definemode
+ {\unprotect
+ \syst_modes_define}
+
+\tolerant\def\syst_modes_define[#1]#*[#2]%
+ {\protect
+ \edef\m_modes_asked{#2}%
+ \fastprocesscommacommand[#1]\syst_modes_define_indeed}
+
+\def\syst_modes_define_indeed#1%
+ {\ifcsname\??mode#1\endcsname
+ % already set
+ \else
+ \newmode{#1}%
+ \fi
+ \ifx\m_modes_asked\v!keep
+ % not changes, disabled when undefined
+ \orelse\ifx\m_modes_asked\v!yes
+ \setmode{#1}%
+ \else
+ \resetmode{#1}%
+ \fi}
+
+% handy for mp
+
+\permanent\def\booleanmodevalue#1%
+ {\ifcsname\??mode#1\endcsname
+ \ifcase\lastnamedcs
+ \s!false
+ \or
+ \s!true
+ \else
+ \s!false
+ \fi
+ \else
+ \s!false
+ \fi}
+
+% check macros
+
+\newconditional\c_checked_mode
+
+% one
+
+\def\syst_modes_check_indeed#1%
+ {\ifcsname\??mode#1\endcsname
+ \ifcase\lastnamedcs\else
+ \let\syst_modes_check_step\gobbleoneargument
+ \fi
+ \fi}
+
+\def\syst_modes_check_nop#1#2#3%
+ {\let\syst_modes_check_step\syst_modes_check_indeed
+ \fastprocesscommacommand[#3]\syst_modes_check_step
+ \ifx\syst_modes_check_step\gobbleoneargument
+ \expandafter#1%
+ \else
+ \expandafter#2%
+ \fi}
+
+\def\syst_modes_check_yes#1#2#3%
+ {\ifcase\lastnamedcs
+ \expandafter#2%
+ \or
+ \expandafter#1%
+ \else
+ \expandafter#2%
+ \fi}
+
+\def\syst_modes_check_lr#1#2#3%
+ {\ifcsname\??mode#3\endcsname
+ \expandafter\syst_modes_check_yes
+ \else
+ \expandafter\syst_modes_check_nop
+ \fi#1#2{#3}}
+
+\def\syst_modes_check_ss#1#2[#3]%
+ {\ifcsname\??mode#3\endcsname
+ \expandafter\syst_modes_check_yes
+ \else
+ \expandafter\syst_modes_check_nop
+ \fi#1#2{#3}}
+
+% all
+
+\let\syst_modes_check_all_step\gobbleoneargument
+
+\def\syst_modes_check_all_indeed#1%
+ {\ifcsname\??mode#1\endcsname
+ \ifcase\lastnamedcs
+ \let\syst_modes_check_all_step\gobbleoneargument
+ \or
+ % enabled
+ \else
+ \let\syst_modes_check_all_step\gobbleoneargument
+ \fi
+ \else
+ \let\syst_modes_check_all_step\gobbleoneargument
+ \fi}
+
+\def\syst_modes_check_all_lr#1#2#3%
+ {\let\syst_modes_check_all_step\syst_modes_check_all_indeed
+ \fastprocesscommacommand[#3]\syst_modes_check_all_step
+ \ifx\syst_modes_check_all_step\gobbleoneargument
+ \expandafter#2%
+ \else
+ \expandafter#1%
+ \fi}
+
+\def\syst_modes_check_all_ss#1#2[#3]%
+ {\let\syst_modes_check_all_step\syst_modes_check_all_indeed
+ \fastprocesscommacommand[#3]\syst_modes_check_all_step
+ \ifx\syst_modes_check_all_step\gobbleoneargument
+ \expandafter#2%
+ \else
+ \expandafter#1%
+ \fi}
+
+\permanent\protected\def\doifelsemode {\syst_modes_check_lr \firstoftwoarguments \secondoftwoarguments}
+\permanent\protected\def\doifmode {\syst_modes_check_lr \firstofoneargument \gobbleoneargument}
+\permanent\protected\def\doifnotmode {\syst_modes_check_lr \gobbleoneargument \firstofoneargument}
+\permanent\protected\def\startmode {\syst_modes_check_ss \donothing \syst_modes_stop_yes}
+\permanent\protected\def\startnotmode {\syst_modes_check_ss \syst_modes_stop_nop \donothing}
+\permanent\protected\def\doifelseallmodes{\syst_modes_check_all_lr\firstoftwoarguments \secondoftwoarguments}
+\permanent\protected\def\doifallmodes {\syst_modes_check_all_lr\firstofoneargument \gobbleoneargument}
+\permanent\protected\def\doifnotallmodes {\syst_modes_check_all_lr\gobbleoneargument \firstofoneargument}
+\permanent\protected\def\startallmodes {\syst_modes_check_all_ss\donothing \syst_modes_stop_all_yes}
+\permanent\protected\def\startnotallmodes{\syst_modes_check_all_ss\syst_modes_stop_all_nop\donothing}
+
+\aliased\let\doifmodeelse \doifelsemode
+\aliased\let\doifallmodeselse\doifelseallmodes
+
+\permanent\protected\def\stopmode {} % no relax
+\permanent\protected\def\stopnotmode {} % no relax
+\permanent\protected\def\stopallmodes {} % no relax
+\permanent\protected\def\stopnotallmodes{} % no relax
+
+\def\syst_modes_stop_yes #1\stopmode {}
+\def\syst_modes_stop_nop #1\stopnotmode {}
+\def\syst_modes_stop_all_yes#1\stopallmodes {}
+\def\syst_modes_stop_all_nop#1\stopnotallmodes{}
+
+%D Pushing/popping:
+
+\permanent\protected\def\pushmode[#1]{\expandafter\pushmacro\csname\??mode#1\endcsname}
+\permanent\protected\def\popmode [#1]{\expandafter\popmacro \csname\??mode#1\endcsname}
+
+\permanent\protected\def\pushsystemmode#1{\expandafter\pushmacro\csname\??mode\systemmodeprefix#1\endcsname}
+\permanent\protected\def\popsystemmode #1{\expandafter\popmacro \csname\??mode\systemmodeprefix#1\endcsname}
+
+%D Here is a relatively new variant of mode checking:
+%D
+%D \starttyping
+%D \enablemode[two]
+%D
+%D \startmodeset
+%D [one] {1}
+%D [two] {2}
+%D [two] {2}
+%D [three] {3}
+%D [default] {?}
+%D \stopmodeset
+%D
+%D \startmodeset
+%D [one] {1}
+%D [three] {3}
+%D [default] {?}
+%D \stopmodeset
+%D
+%D \startmodeset
+%D [one] {
+%D \input tufte
+%D }
+%D [two] {
+%D \startmodeset
+%D [one] {1}
+%D [two] {2}
+%D [two] {2}
+%D [three] {3}
+%D [default] {?}
+%D \stopmodeset
+%D }
+%D [three] {
+%D \input zapf
+%D }
+%D [default] {
+%D \input ward
+%D }
+%D \stopmodeset
+%D \stoptyping
+
+\newconditional\c_syst_modes_set_done % conditionals can be pushed/popped
+
+\installmacrostack\c_syst_modes_set_done
+
+% \permanent\protected\def\startmodeset
+% {\push_macro_c_syst_modes_set_done
+% \setfalse\c_syst_modes_set_done
+% \doifelsenextoptionalcs\syst_modes_set_start\syst_modes_set_quit}
+%
+% \aliased\let\stopmodeset\relax
+%
+% \def\syst_modes_set_start[#1]%
+% {\edef\m_mode_case{#1}%
+% \unless\ifx\m_mode_case\s!default
+% \expandafter\syst_modes_set_check
+% \orelse\ifconditional\c_syst_modes_set_done
+% \expandafter\syst_modes_set_quit
+% \else
+% \expandafter\syst_modes_set_yes
+% \fi}
+%
+% \def\syst_modes_set_check
+% {\syst_modes_check_lr\syst_modes_set_yes\syst_modes_set_nop\m_mode_case}
+%
+% \def\syst_modes_set_yes#1%
+% {\settrue\c_syst_modes_set_done
+% #1%
+% \doifelsenextoptionalcs\syst_modes_set_start\syst_modes_set_quit}
+%
+% \def\syst_modes_set_nop#1%
+% {\doifelsenextoptionalcs\syst_modes_set_start\syst_modes_set_quit}
+%
+% \def\syst_modes_set_quit#-\stopmodeset
+% {\pop_macro_c_syst_modes_set_done}
+
+\permanent\protected\def\startmodeset
+ {\push_macro_c_syst_modes_set_done
+ \setfalse\c_syst_modes_set_done
+ \syst_modes_set_start}
+
+\aliased\let\stopmodeset\relax
+
+\tolerant\def\syst_modes_set_start#.[#1]% skip spaces and pars
+ {\edef\m_mode_case{#1}%
+ \ifempty\m_mode_case
+ \expandafter\syst_modes_set_quit
+ \orunless\ifx\m_mode_case\s!default
+ \expandafter\syst_modes_set_check
+ \orelse\ifconditional\c_syst_modes_set_done
+ \expandafter\syst_modes_set_quit
+ \else
+ \expandafter\syst_modes_set_yes
+ \fi}
+
+\def\syst_modes_set_check
+ {\syst_modes_check_lr\syst_modes_set_yes\syst_modes_set_nop\m_mode_case}
+
+\tolerant\def\syst_modes_set_yes#1%
+ {\settrue\c_syst_modes_set_done
+ #1%
+ \syst_modes_set_start}
+
+\tolerant\def\syst_modes_set_nop#1%
+ {\syst_modes_set_start}
+
+\def\syst_modes_set_quit#-\stopmodeset
+ {\pop_macro_c_syst_modes_set_done}
+
+%D Lets now set a mode:
+
+\enablemode[mkiv] \newsystemmode{mkiv} \setsystemmode{mkiv}
+
+%D Setups:
+
+\installcorenamespace{setup} % we can probably get rid of some :'s later on
+
+% \protected\def\startsetups{} % to please dep checker
+% \protected\def\stopsetups {} % to please dep checker
+%
+% \protected\def\setups{\doifelsenextbgroup\syst_setups_a\syst_setups_b} % {..} or [..]
+% \protected\def\setup {\doifelsenextbgroup\syst_setups \syst_setups_c} % {..} or [..]
+%
+% \def\syst_setups_a #1{\processcommacommand[#1]\syst_setups} % {..}
+% \def\syst_setups_b[#1]{\processcommacommand[#1]\syst_setups} % [..]
+% \def\syst_setups_c[#1]{\syst_setups{#1}} % [..]
+
+\permanent\protected\tolerant\def\setups[#1]#;#2{\processcommacommand[#1#2]\syst_setups} % {..} or [..]
+\permanent\protected\tolerant\def\setup [#1]#;#2{\syst_setups{#1#2}} % {..} or [..]
+
+\letvalue{\??setup:\??empty}\gobbleoneargument
+
+\permanent\def\syst_setups#1% the grid option will be extended to other main modes
+ {\csname\??setup
+ \ifgridsnapping
+ \ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else:\ifcsname\??setup:#1\endcsname#1\else\??empty\fi\fi
+ \else
+ :\ifcsname\??setup:#1\endcsname#1\else\??empty\fi
+ \fi
+ \endcsname\empty} % takes one argument
+
+% no checking and we assume it being defined:
+
+\permanent\def\fastsetup #1{\csname\??setup:#1\endcsname\empty}
+\permanent\def\fastsetupwithargument #1{\csname\??setup:#1\endcsname} % swapped per 2015-08-30
+\permanent\def\fastsetupwithargumentswapped#1#2{\csname\??setup:#2\endcsname{#1}}% swapped per 2015-09-05
+
+% the next one is meant for \c!setups situations, hence the check for
+% a shortcut
+
+\let\m_syst_setups_asked\empty
+
+\permanent\protected\def\doprocesslocalsetups#1% sort of public, fast local variant
+ {\edef\m_syst_setups_asked{#1}%
+ \ifempty\m_syst_setups_asked\else
+ \expandafter\syst_setups_process_local
+ \fi}
+
+\permanent\protected\def\usesetupsparameter#1%
+ {\edef\m_syst_setups_asked{#1\c!setups}%
+ \ifempty\m_syst_setups_asked\else
+ \expandafter\syst_setups_process_local
+ \fi}
+
+% setups=S1
+% setups=lua(S2)
+% setups=S3
+% setups={S1,lua(S2),xml(test{123}),S3}
+
+\def\syst_setups_process_local
+ {\clf_autosetups{\m_syst_setups_asked}%
+ \relax} % let's prevent lookahead
+
+\permanent\def\autosetups#1{\clf_autosetups{#1}} % todo: public implementor
+
+\permanent\edef\setupwithargument#1% saves a few expansions
+ {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#1\endcsname#1\noexpand\else\??empty\noexpand\fi\endcsname}
+
+\permanent\edef\setupwithargumentswapped#1#2% saves a few expansions (can be \let)
+ {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#2\endcsname#2\noexpand\else\??empty\noexpand\fi\endcsname{#1}}
+
+\aliased\let\directsetup\syst_setups
+\aliased\let\texsetup \syst_setups % nicer than \directsetup and more en par with xmlsetup and luasetup
+
+\permanent\protected\def\doifelsesetups#1% to be done: grid
+ {\ifcsname\??setup:#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifsetupselse\doifelsesetups
+
+\permanent\protected\def\doifsetups#1% to be done: grid
+ {\ifcsname\??setup:#1\endcsname
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\permanent\protected\def\doifnotsetups#1% to be done: grid
+ {\ifcsname\??setup:#1\endcsname
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+% maybe some day:
+%
+% \protected\def\fastsetupfallback#1#2%
+% {\ifcsname\??setup:#1\endcsname
+% \expandafter\lastnamedcs
+% \else
+% \csname\??setup:#2\expandafter\endcsname
+% \fi}
+%
+% or
+%
+% \protected\def\fastsetupfallback#1#2#3% prefix preferred fallback
+% {\ifcsname\??setup:#1#2\endcsname
+% \expandafter\lastnamedcs
+% \else
+% \csname\??setup:#1#3\expandafter\endcsname
+% \fi}
+
+% \startluasetups oeps
+% context("DONE")
+% a = 1
+% b = 1
+% \stopluasetups
+%
+% \luasetup{oeps}
+%
+% \startsetups xxx
+% ziezo
+% \stopsetups
+%
+% \directsetup{xxx}
+%
+% \startxmlsetups zzz
+% [[#1]]
+% \stopxmlsetups
+%
+% \xmlsetup{123}{zzz}
+%
+% \startbuffer[what]
+% context("DONE")
+% \stopbuffer
+%
+% \startbuffer
+% context("MORE")
+% \stopbuffer
+%
+% \ctxluabuffer[what]
+%
+% \ctxluabuffer
+
+\newtoks\t_syst_setups_tex \appendtoks
+ \catcode\endoflineasciicode \ignorecatcode
+\to \t_syst_setups_tex
+
+\newtoks\t_syst_setups_loc \appendtoks
+ \catcode\endoflineasciicode \ignorecatcode
+\to \t_syst_setups_loc
+
+\newtoks\t_syst_setups_raw \appendtoks
+ % nothing
+\to \t_syst_setups_raw
+
+\newtoks\t_syst_setups_xml \appendtoks
+ \catcode\endoflineasciicode\ignorecatcode
+ \catcode\barasciicode \othercatcode
+\to \t_syst_setups_xml
+
+\newtoks\t_syst_setups_lua \appendtoks
+ \obeylualines
+ \obeyluatokens
+\to \t_syst_setups_lua
+
+% Is doglobal still relevant? Maybe always global? Or never? Anyway, it will become obsolete.
+
+\permanent\protected\def\startluasetups {\begingroup\doifelsenextoptionalcs\syst_setups_start_lua_yes\syst_setups_start_lua_nop} \aliased\let\stopluasetups \relax
+\permanent\protected\def\startxmlsetups {\begingroup\doifelsenextoptionalcs\syst_setups_start_xml_yes\syst_setups_start_xml_nop} \aliased\let\stopxmlsetups \relax
+\permanent\protected\def\startrawsetups {\begingroup\doifelsenextoptionalcs\syst_setups_start_raw_yes\syst_setups_start_raw_nop} \aliased\let\stoprawsetups \relax
+\permanent\protected\def\startlocalsetups{\begingroup\doifelsenextoptionalcs\syst_setups_start_loc_yes\syst_setups_start_loc_nop} \aliased\let\stoplocalsetups\relax
+\permanent\protected\def\startsetups {\begingroup\doifelsenextoptionalcs\syst_setups_start_tex_yes\syst_setups_start_tex_nop} \aliased\let\stopsetups \relax
+
+\def\syst_setups_start_lua_two#1#2#+\stopluasetups {\endgroup\dodoglobal\instance\defcsname\??setup#1:#2\endcsname##1{#3}}
+\def\syst_setups_start_xml_two#1#2#+\stopxmlsetups {\endgroup\dodoglobal\instance\defcsname\??setup#1:#2\endcsname##1{#3}}
+\def\syst_setups_start_raw_two#1#2#+\stoprawsetups {\endgroup\dodoglobal\instance\defcsname\??setup#1:#2\endcsname##1{#3}}
+\def\syst_setups_start_loc_two#1#2#+\stoplocalsetups{\endgroup\dodoglobal\instance\defcsname\??setup#1:#2\endcsname##1{#3}}
+\def\syst_setups_start_tex_two#1#2#+\stopsetups {\endgroup\dodoglobal\instance\defcsname\??setup#1:#2\endcsname##1{#3}}
+
+\tolerant\def\syst_setups_start_lua_yes[#1]#*[#2]%
+ {\the\t_syst_setups_lua
+ \ifarguments\expandafter\syst_setups_start_lua_one
+ \or \expandafter\syst_setups_start_lua_one
+ \else \expandafter\syst_setups_start_lua_two
+ \fi{#1}{#2}}
+
+\tolerant\def\syst_setups_start_xml_yes[#1]#*[#2]%
+ {\the\t_syst_setups_xml
+ \ifarguments\expandafter\syst_setups_start_xml_one
+ \or \expandafter\syst_setups_start_xml_one
+ \else \expandafter\syst_setups_start_xml_two
+ \fi{#1}{#2}}
+
+\tolerant\def\syst_setups_start_raw_yes[#1]#*[#2]%
+ {\the\t_syst_setups_raw
+ \ifarguments\expandafter\syst_setups_start_raw_one
+ \or \expandafter\syst_setups_start_raw_one
+ \else \expandafter\syst_setups_start_raw_two
+ \fi{#1}{#2}}
+
+\tolerant\def\syst_setups_start_loc_yes[#1]#*[#2]%
+ {\the\t_syst_setups_loc
+ \ifarguments\expandafter\syst_setups_start_loc_one
+ \or \expandafter\syst_setups_start_loc_one
+ \else \expandafter\syst_setups_start_loc_two
+ \fi{#1}{#2}}
+
+\tolerant\def\syst_setups_start_tex_yes[#1]#*[#2]%
+ {\the\t_syst_setups_tex
+ \ifarguments\expandafter\syst_setups_start_tex_one
+ \or \expandafter\syst_setups_start_tex_one
+ \else \expandafter\syst_setups_start_tex_two
+ \fi{#1}{#2}}
+
+\def\syst_setups_start_lua_nop#1 {\the\t_syst_setups_lua\syst_setups_start_lua_two{}{#1}} % space delimited
+\def\syst_setups_start_xml_nop#1 {\the\t_syst_setups_xml\syst_setups_start_xml_two{}{#1}} % space delimited
+\def\syst_setups_start_raw_nop#1 {\the\t_syst_setups_raw\syst_setups_start_raw_two{}{#1}} % space delimited
+\def\syst_setups_start_loc_nop#1 {\the\t_syst_setups_loc\syst_setups_start_loc_two{}{#1}} % space delimited
+\def\syst_setups_start_tex_nop#1 {\the\t_syst_setups_tex\syst_setups_start_tex_two{}{#1}} % space delimited
+
+\def\syst_setups_start_lua_one#1#2{\syst_setups_start_lua_two{}{#1}} % [..]
+\def\syst_setups_start_xml_one#1#2{\syst_setups_start_xml_two{}{#1}} % [..]
+\def\syst_setups_start_raw_one#1#2{\syst_setups_start_raw_two{}{#1}} % [..]
+\def\syst_setups_start_loc_one#1#2{\syst_setups_start_loc_two{}{#1}} % [..]
+\def\syst_setups_start_tex_one#1#2{\syst_setups_start_tex_two{}{#1}} % [..]
+
+\permanent\def\luasetup#1{\ctxlua{\syst_setups{#1}}}
+
+%D System setups:
+
+\aliased\let\systemsetupsprefix\wildcardsymbol
+
+\permanent\def\systemsetups#1{\syst_setups{\systemsetupsprefix#1}}
+
+\permanent\protected\def\resetsetups[#1]% see x-fo for usage
+ {\ifcsname\??setup\ifgridsnapping\v!grid\fi:#1\endcsname
+ \dodoglobal\undefinevalue{\??setup\ifgridsnapping\v!grid\fi:#1}%
+ \else
+ \dodoglobal\undefinevalue{\??setup:#1}%
+ \fi}
+
+\permanent\tolerant\protected\def\copysetups[#1]#*[#2]%
+ {\ifcsname\??setup:#2\endcsname
+ \letcsname\??setup:#1\expandafter\endcsname\lastnamedcs
+ \fi}
+
+\permanent\protected\def\showsetupsdefinition[#1]%
+ {\showvalue{\??setup:#1}} % temp hack for debugging
+
+%D \macros
+%D {setvariables,getvariable,getvariabledefault}
+%D
+%D \starttyping
+%D \setvariables[xx][title=]
+%D \setvariables[xx][title=test test]
+%D \setvariables[xx][title=test $x=1$ test] % fatal error reported
+%D \setvariables[xx][title=test {$x=1$} test]
+%D \setvariables[xx][title] % fatal error reported
+%D \setvariables[xx][titletitel=e]
+%D \stoptyping
+
+\installcorenamespace{variables}
+
+\permanent\protected\def\setvariables {\syst_variables_set[\getrawparameters ]}
+\permanent\protected\def\setevariables{\syst_variables_set[\getraweparameters]}
+\permanent\protected\def\setgvariables{\syst_variables_set[\getrawgparameters]}
+\permanent\protected\def\setxvariables{\syst_variables_set[\getrawxparameters]}
+
+\mutable\let\currentvariableclass\empty
+
+\tolerant\def\syst_variables_set[#1]#*[#2]#*[#3]% tricky, test on s-pre-60
+ {\doifelse{#2}\currentvariableclass
+ {#1[\??variables#2:][#3]}%
+ {\pushmacro\currentvariableclass
+ \def\currentvariableclass{#2}%
+ \getvariable{#2}\s!reset
+ #1[\??variables#2:][#3]%
+ \getvariable{#2}\s!set
+ \popmacro\currentvariableclass}}
+
+\permanent\protected\def\setvariable #1#2#3{\defcsname \??variables#1:#2\endcsname{#3}}
+\permanent\protected\def\setevariable#1#2#3{\edefcsname\??variables#1:#2\endcsname{#3}}
+\permanent\protected\def\setgvariable#1#2#3{\defcsname \??variables#1:#2\endcsname{#3}}
+\permanent\protected\def\setxvariable#1#2#3{\xdefcsname\??variables#1:#2\endcsname{#3}}
+
+\permanent \def\getvariable #1#2{\begincsname\??variables#1:#2\endcsname}
+\permanent\protected\def\showvariable#1#2{\showvalue{\begincsname\??variables#1:#2\endcsname}}
+
+\let\currentvariableclass\empty
+
+%D \macros
+%D {checkvariables}
+%D
+%D I'll probably forget that this on exists.
+
+\let\m_syst_variables_temp\empty
+
+\permanent\tolerant\def\checkvariables[#1]#*[#2]%
+ {\dogetparameters\syst_variables_check_value[#1][#2]}
+
+\def\syst_variables_check_value#1#2#3%
+ {\ifcsname\??variables#1:#2\endcsname
+ \edef\m_syst_variables_temp{\lastnamedcs}%
+ \ifempty\m_syst_variables_temp
+ \defcsname\??variables#1:#2\endcsname{#3}%
+ \fi
+ \else
+ \defcsname\??variables#1:#2\endcsname{#3}%
+ \fi}
+
+%D \macros
+%D {doifelsevariable,doifvariable,doifnotvariable}
+%D
+%D A few trivial macros:
+
+\permanent\protected\def\doifelsevariable#1#2%
+ {\ifcsname\??variables#1:#2\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifvariableelse\doifelsevariable
+
+\permanent\protected\def\doifvariable#1#2%
+ {\ifcsname\??variables#1:#2\endcsname
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\permanent\protected\def\doifnotvariable#1#2%
+ {\ifcsname\??variables#1:#2\endcsname
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+%D A few more (we could use a public test variable so that we only need to expand
+%D once, assuming expandable variables):
+
+\letvalue{\??variables:}\empty
+
+\permanent\protected\def\doifelseemptyvariable#1#2%
+ {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}%
+ \ifempty\m_syst_string_one
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifemptyvariableelse\doifelseemptyvariable
+
+\permanent\protected\def\doifemptyvariable#1#2%
+ {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}%
+ \ifempty\m_syst_string_one
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\permanent\protected\def\doifnotemptyvariable#1#2%
+ {\edef\m_syst_string_one{\begincsname\??variables#1:#2\endcsname}%
+ \ifempty\m_syst_string_one
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\permanent\def\getvariabledefault#1#2% #3% can be command
+ {\ifcsname\??variables#1:#2\endcsname
+ \expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\permanent\tolerant\protected\def\setupenv[#1]%
+ {\syst_variables_set[\getrawparameters][\s!environment][#1]}
+
+\permanent\protected\def\doifelseenv{\doifelsevariable \s!environment}
+\permanent\protected\def\doifenv {\doifvariable \s!environment}
+\permanent\protected\def\doifnotenv {\doifnotvariable \s!environment}
+\permanent \def\env {\getvariable \s!environment}
+\permanent \def\envvar {\getvariabledefault\s!environment}
+
+\aliased\let\doifenvelse\doifelseenv
+
+%D \macros
+%D {defineselector,setupselector,select,directselect}
+%D
+%D \starttyping
+%D \defineselector[caption][max=2,n=2]
+%D
+%D \start
+%D \setupselector[caption][n=1]
+%D \placelist[figure][criterium=all]
+%D \stop
+%D
+%D \starttext
+%D \placefigure
+%D {\select{caption}{zapf}{\input zapf \relax}}
+%D {}
+%D \stoptext
+%D \stoptyping
+
+\installcorenamespace{selector}
+
+\permanent\tolerant\protected\def\defineselector[#1]#*[#2]{\getparameters[\??selector#1][\c!max=\plusone,\c!n=\plusone,#2]}
+\permanent\tolerant\protected\def\setupselector [#1]#*[#2]{\getparameters[\??selector#1][#2]}
+
+% \def\directselect#1% expandable
+% {\filterfromnext % maybe add an \expanded
+% {\csname\??selector\ifcsname\??selector#1\c!max\endcsname#1\fi\c!max\endcsname}%
+% {\csname\??selector\ifcsname\??selector#1\c!n \endcsname#1\fi\c!n \endcsname}}
+%
+% this is more efficient when the arguments are used a few times (or passed along):
+
+\permanent\def\directselect#1% expandable
+ {\expandafter\filterfromnext
+ \csname\??selector\ifcsname\??selector#1\c!max\endcsname#1\fi\c!max\expandafter\endcsname
+ \csname\??selector\ifcsname\??selector#1\c!n \endcsname#1\fi\c!n \endcsname}
+
+\permanent\protected\let\select\directselect % we promote to protected
+
+\letcsname\??selector\c!max\endcsname\plusone
+\letcsname\??selector\c!n \endcsname\plusone
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-ini.mkxl
new file mode 100644
index 00000000000..de7c645b425
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-ini.mkxl
@@ -0,0 +1,224 @@
+%D \module
+%D [ file=core-ini,
+%D version=2003.12.01,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Additional Initialization,
+%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 / Additional Initialization}
+
+\unprotect
+
+%D We introduce a couple of variables that are used all over \CONTEXT. Alternatively
+%D we could define them in each module but as they are part of the bigger picture we
+%D prefer to do it here. Ideally we should hav ea proper dependency tree but it might
+%D be that we want to make versions with a smaller footprints in which case one would
+%D still need to define the token list registers (unless we could do that runtime).
+
+%D \macros
+%D {every...}
+%D
+%D A few every's.
+
+%D Output routine:
+
+\newtoks \everybeforeoutput
+\newtoks \everyafteroutput
+
+%D Shipout:
+
+\newtoks \everyshipout
+\newtoks \everybeforeshipout
+\newtoks \everyaftershipout
+\newtoks \everyfirstshipout
+\newtoks \everylastshipout
+
+%D End of run:
+
+\newtoks \everybye
+\newtoks \everygoodbye
+\newtoks \everynotabene
+
+%D Document:
+
+\newtoks \everyendoftextbody
+
+\newtoks \everystarttext
+\newtoks \everystoptext
+
+\newtoks \everystartdocument
+\newtoks \everystopdocument
+
+%D Purity:
+
+\newtoks \everyforgetall
+\newtoks \everycleanupfeatures
+\newtoks \everysimplifycommands
+%newtoks \everypreroll
+
+\aliased\let\simplifiedcommands\everysimplifycommands % backward compatible, will stay as it's used in styles
+
+\newconditional\simplifyingcommands % public
+
+\permanent\protected\def\forgetall {\the\everyforgetall}
+\permanent\protected\def\cleanupfeatures {\the\everycleanupfeatures}
+\permanent\protected\def\simplifycommands{\the\everysimplifycommands}
+
+\appendtoks
+ \settrue\simplifyingcommands
+\to \everysimplifycommands
+
+\appendtoks
+ \everypar\emptytoks % pretty important
+\to \everyforgetall
+
+%D Page building:
+
+\newtoks \everybeforepagebody
+\newtoks \everyafterpagebody
+
+\aliased\let\everypagebody\everybeforepagebody % backward compatible, will become obsolete
+
+%D Floats:
+
+\newtoks \everyinsidefloat
+
+%D Exporting:
+
+\newtoks \everyinitializeexport
+
+%D Sectioning:
+
+%newtoks \everyheadstart
+
+%D Par building (experimental, used in xml <p> .. </p>)
+
+\newtoks \everybeginofpar
+\newtoks \everyendofpar
+%newtoks \everyparflush
+
+\protected\def\bpar{\the\everybeginofpar\ignorespaces} % may interfere with \everypar
+\protected\def\epar{\ifhmode\removeunwantedspaces\the\everyendofpar\fi} % test prevents problems with \bpar\epar
+
+%D Lists:
+
+\newtoks \everylistentry
+\newtoks \everysavesortkeys
+
+%D Marks:
+
+%newtoks \everymarking
+
+%D Fonts:
+
+\newtoks \everyfont
+\newtoks \everyglobalbodyfont
+\newtoks \everydefinedfont
+
+\newtoks \everybodyfont
+\newtoks \everyfontswitch
+
+\newtoks \everysetupbodyfont
+\newtoks \everyswitchtobodyfont
+
+%D Math:
+
+\newtoks \everybeforedisplayformula
+\newtoks \everymathematics
+
+\prependtoks \the\everymathematics \to \everymath
+\prependtoks \the\everymathematics \to \everydisplay
+
+%D Tables:
+
+%newtoks \everytable % we need to disstinguish kinds
+
+%D More generic (used to be pushcolor etc)
+
+\newtoks\everystarttextproperties
+\newtoks\everystoptextproperties
+
+\permanent\protected\def\starttextproperties{\the\everystarttextproperties}
+\permanent\protected\def\stoptextproperties {\the\everystoptextproperties}
+
+%D \macros
+%D {trialtypesetting}
+%D
+%D We disable trial typesetting in the output routine,
+%D just to be sure.
+
+\prependtoks
+ \resettrialtypesetting
+\to \everybeforepagebody
+
+%D \macros
+%D {ifinpagebody,ifinsidecolumns,ifdoublesided,ifsinglesided}
+%D
+%D These will become system modes and conditionals
+
+\newif \ifinpagebody
+\newif \ifinsidecolumns
+\newif \ifinsidemulticolumns % simple mixed-in-text columns
+\newif \ifdoublesided \doublesidedfalse
+\newif \ifsinglesided \singlesidedtrue
+\newif \ifinsidefloat
+\newif \ifdoingblocks
+\newif \ifgridsnapping
+\newif \ifexporting
+
+\newconstant\pageduplexmode % 0 single 1 double 2 mix
+\newconstant\pagebodymode % 0 not 1 normal pagebody 2 spread
+
+\newcount\nofcolumns \nofcolumns \plusone
+\newcount\nofmulticolumns \nofmulticolumns\plusone
+
+%D \macros
+%D {ifproductionrun}
+%D
+%D This boolean can be used to bypass certain initializations.
+
+% \newif\ifproductionrun % already defined
+
+\appendtoks
+ \productionruntrue
+\to \everydump
+
+%D \macros
+%D {everyboxedcontent, ifboxedcontent,
+%D startboxedcontent, stopboxedcontent}
+%D
+%D This one is relatively new and will be used as a more robust test for inner
+%D situations.
+
+\newif \ifboxedcontent
+\newtoks\everyboxedcontent
+
+\appendtoks
+ \boxedcontenttrue
+\to \everyboxedcontent
+
+\permanent\protected\def\startboxedcontent{\bgroup\the\everyboxedcontent}
+
+\aliased\let\stopboxedcontent\egroup
+
+% %D We store some original meanings, maybe in \type {math-ini}.
+%
+% \let\normalat \at
+% \let\normalin \in
+% \let\normalfrom \from
+% \let\normalover \over
+% \let\normalabout\about
+
+%D This will be implemented way later:
+
+\let\setlayoutcomponentattribute \gobbleoneargument
+\let\resetlayoutcomponentattribute\relax
+\let\layoutcomponentboxattribute \empty
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-lmt.lmt b/Master/texmf-dist/tex/context/base/mkxl/core-lmt.lmt
new file mode 100644
index 00000000000..ccbdcc0dff6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-lmt.lmt
@@ -0,0 +1,95 @@
+if not modules then modules = { } end modules ['core-lmt'] = {
+ version = 1.001,
+ comment = "companion to core-lmt.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Kind of obsolete ... old school directions.
+
+local implement = interfaces.implement
+local scankeyword = tokens.scanners.keyword
+local scaninteger = tokens.scanners.integer
+
+local settextdir = tex.settextdir
+local setlinedir = tex.setlinedir
+local setpardir = tex.setpardir
+local setboxdir = tex.setboxdir
+
+local gettextdir = tex.gettextdir
+local getlinedir = tex.getlinedir
+local getpardir = tex.getpardir
+local getboxdir = tex.getboxdir
+
+local none_code = tokens.values.none
+
+local context = context
+
+local function scandir()
+ if scankeyword("tlt") then
+ return 0
+ elseif scankeyword("trt") then
+ return 1
+ else
+ return 0
+ end
+end
+
+local function showdir(d)
+ context(d == 1 and "TRT" or "LTL")
+ return none_code
+end
+
+implement {
+ name = "textdir",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ if what == "value" then
+ showdir(gettextdir())
+ else
+ settextdir(scandir())
+ end
+ end
+}
+
+implement {
+ name = "linedir",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ if what == "value" then
+ return showdir(getlinedir())
+ else
+ setlinedir(scandir())
+ end
+ end
+}
+
+implement {
+ name = "pardir",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ if what == "value" then
+ return showdir(getpardir())
+ else
+ setpardir(scandir())
+ end
+ end
+}
+
+implement {
+ name = "boxdir",
+ public = true,
+ usage = "value",
+ actions = function(what)
+ local n = scaninteger()
+ if what == "value" then
+ return showdir(getboxdir(n))
+ else
+ setboxdir(n,scandir())
+ end
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/core-lmt.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-lmt.mkxl
index 75a791a50d9..77ef179669a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/core-lmt.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-lmt.mkxl
@@ -13,14 +13,11 @@
\writestatus{loading}{ConTeXt System Macros / Primitives}
-%D This is offered temporarily because in the end we don't expect u sers to use the
-%D low level direction directives directly.
-
-\registerctxluafile{core-lmt}{}
+\registerctxluafile{core-lmt}{autosuffix}
\unprotect
-% nothing yet
+% nothing here
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-sys.lmt b/Master/texmf-dist/tex/context/base/mkxl/core-sys.lmt
new file mode 100644
index 00000000000..0d471133d3f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-sys.lmt
@@ -0,0 +1,83 @@
+if not modules then modules = { } end modules ['core-sys'] = {
+ version = 1.001,
+ comment = "companion to core-sys.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local lower, format, gsub = string.lower, string.format, string.gsub
+local suffixonly, basename, removesuffix = file.suffix, file.basename, file.removesuffix
+
+local environment = environment
+local context = context
+local implement = interfaces.implement
+
+local report_files = logs.reporter("system","files")
+
+function environment.initializefilenames()
+
+ local arguments = environment.arguments
+
+ local jobname = arguments.jobname or tex.jobname
+ local fulljobname = arguments.fulljobname or jobname
+ local inputfilename = arguments.input or fulljobname
+ local outputfilename = arguments.result or removesuffix(jobname)
+
+ local inputfilename = suffixonly(inputfilename) == "tex" and removesuffix(inputfilename) or inputfilename or ""
+
+ local filename = fulljobname
+ local suffix = suffixonly(filename)
+
+ local filename = ctxrunner.resolve(filename) -- in case we're prepped
+
+ local jobfilename = jobname or inputfilename or tex.jobname or ""
+ local inputfilename = inputfilename or ""
+
+ local jobfilebase = basename(jobfilename)
+ local inputfilebase = basename(inputfilename)
+
+ -- jobfilename = gsub(jobfilename, "^./","")
+ -- inputfilename = gsub(inputfilename,"^./","")
+
+ environment.jobfilefullname = fulljobname
+ environment.jobfilename = jobfilebase
+ environment.jobfilesuffix = lower(suffixonly(jobfilebase))
+
+ environment.inputfilename = inputfilename -- so here we keep e.g. ./ or explicit paths
+ environment.inputfilebarename = removesuffix(inputfilebase)
+ environment.inputfilesuffix = lower(suffixonly(inputfilebase))
+
+ environment.outputfilename = outputfilename or environment.inputfilebarename or ""
+
+ environment.filename = filename
+ environment.suffix = suffix
+
+ -- if tex then
+ -- tex.jobname = jobfilename
+ -- end
+
+ report_files("jobname %a, input %a, result %a",jobfilename,inputfilename,outputfilename)
+
+ function environment.initializefilenames() end
+end
+
+-- we could set a macro (but will that work when we're expanding? needs testing!)
+
+implement { name = "operatingsystem", public = true, actions = function() context(os.platform) end }
+implement { name = "jobfilefullname", public = true, actions = function() context(environment.jobfilefullname) end }
+implement { name = "jobfilename", public = true, actions = function() context(environment.jobfilename) end }
+implement { name = "jobfilesuffix", public = true, actions = function() context(environment.jobfilesuffix) end }
+implement { name = "inputfilebarename", public = true, actions = function() context(environment.inputfilebarename) end }
+implement { name = "inputfilerealsuffix", public = true, actions = function() context(environment.inputfilerealsuffix) end }
+implement { name = "inputfilesuffix", public = true, actions = function() context(environment.inputfilesuffix) end }
+implement { name = "inputfilename", public = true, actions = function() context(environment.inputfilename) end }
+implement { name = "outputfilename", public = true, actions = function() context(environment.outputfilename) end }
+
+implement {
+ name = "systemlog",
+ arguments = "3 strings",
+ actions = function(whereto,category,text)
+ logs.system(whereto,"context",tex.jobname,category,text)
+ end,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-sys.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-sys.mkxl
new file mode 100644
index 00000000000..c5093588eb4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-sys.mkxl
@@ -0,0 +1,451 @@
+%D \module
+%D [ file=core-sys, % moved from main-001
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=System,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% we need to mkiv-ize this file !
+
+\writestatus{loading}{ConTeXt Core Macros / System}
+
+\registerctxluafile{core-sys}{autosuffix}
+
+\unprotect
+
+%D Version checking:
+
+\permanent\protected\def\newcontextversion#1%
+ {\doifelse{#1}\contextversion
+ {\aliased\let\newcontextversion\gobbleoneargument}
+ {\writeline
+ \writestatus{Fatal Error}{Your format does not match the base files!}%
+ \writeline
+ \writestatus{Format Version}{\contextversion\space\contextmark}%
+ \writestatus{Files Version}{#1}%
+ \batchmode
+ \normalend}}
+
+%D End of lines to the output. \TEX\ will map this onto the platform specific
+%D line ending. I hate this mess.
+
+
+% \operatingsystem % defined at lua end
+
+%D The jobname is what gets loaded by the cont-yes stub file. This name also
+%D determines the name of tuc etc files.
+
+% \jobfilefullname % defined at lua end
+% \jobfilename % defined at lua end
+% \jobfilesuffix % defined at lua end
+
+%D However, that one can itself load another file.
+
+% \inputfilebarename % defined at lua end
+% \inputfilerealsuffix % defined at lua end
+% \inputfilesuffix % defined at lua end
+% \inputfilename % defined at lua end
+
+%D The output name is only used for some checking.
+
+% \outputfilename % defined at lua end
+
+\installcorenamespace{system}
+
+\installdirectcommandhandler \??system {system}
+
+\appendtoks
+% \edef\outputfilename {\directsystemparameter\c!file }%
+% \edef\inputfilename {\directsystemparameter\c!inputfile }%
+\to \everysetupsystem
+
+\appendtoks
+ \ifcase\directsystemparameter\c!n\relax
+ % % 0 : unknown
+ \or
+ \setsystemmode\v!first % 1 : first run
+ \or
+ % % 2 : successive run
+ \or
+ \setsystemmode\v!first % 3 : first and only run
+ \or
+ \setsystemmode\v!last % 4 : (extra) last run
+ \fi
+\to \everysetupsystem
+
+\newconditional\prerollrun % when true it means that we have a forced number of runs
+
+% Some mechanisms (see x-res-01) use either \jobfilename or
+% \jobfilename.somesuffix, in which case we need to use the full name if given or a
+% default (like \jobfilename.xml); this comes down to replacing the default tex
+% suffix.
+
+\permanent\def\jobfullname{\jobfilename.\jobfilesuffix}
+
+\permanent\protected\def\setjobfullname#1% #1 = default if not given
+ {\doifelsenothing\jobfilename
+ {\let\jobfullname\empty}
+ {\doif\jobfilesuffix\c!tex{\edef\jobfullname{\jobfilename.#1}}}}
+
+%D There are a couple of system states avaiable:
+%D
+%D \starttabulate [|T|T|]
+%D \NC \type{\jobname} \NC \jobname \NC \NR
+%D \NC \type{\jobfilename} \NC \jobfilename \NC \NR
+%D \NC \type{\jobfilesuffix} \NC \jobfilesuffix \NC \NR
+%D \NC \type{\inputfilename} \NC \inputfilename \NC \NR
+%D \NC \type{\inputfilebarename} \NC \inputfilebarename \NC \NR
+%D \NC \type{\inputfilesuffix} \NC \inputfilesuffix \NC \NR
+%D \NC \type{\outputfilename} \NC \outputfilename \NC \NR
+%D \NC \type{\operatingsystem} \NC \operatingsystem \NC \NR
+%D \stoptabulate
+
+% \appendtoks
+% \edef\outputresolution{\directsystemparameter\c!resolution}%
+% \to \everysetupsystem
+
+%D The system modes set by the setup command can be used in situations like:
+%D
+%D \starttyping
+%D \startmode[*first]
+%D \executesystemcommand{cleanupxml text.xml clean-text.xml}
+%D \stopmode
+%D
+%D \starttext
+%D \typefile{clean-text.xml}
+%D \stoptext
+%D \stoptyping
+
+\permanent\protected\def\setuprandomize[#1]%
+ {\doifsomething{#1}
+ {\begingroup
+ % tex's time is in minutes
+ \scratchcounter\normaltime
+ \processaction
+ [#1]
+ [ \v!small=>\divide\scratchcounter 15, % 900,
+ \v!medium=>\divide\scratchcounter 30, % 1800,
+ \v!big=>\divide\scratchcounter 60, % 3600,
+ \v!normal=>\scratchcounter\newrandomseed,
+ \s!default=>\scratchcounter\newrandomseed,
+ \s!unknown=>\scratchcounter#1]%
+ \setrandomseed\scratchcounter
+ % \writestatus\m!system{randomseed: \the\scratchcounter}%
+ \endgroup}}
+
+\setupsystem
+ [\c!directory=,
+ \c!n=0, % 0:unknown 1: one run 2: first 3: successive 4: final run
+ % \c!resolution=600,% in dpi, no unit in mkiv, not used in lmtx
+ % \c!random=, % obsolete here
+ % \c!file=\jobname,
+ % \c!inputfile=\outputfilename,
+ \c!type=unix, % windows is normally less sensitive to handle
+ \c!bodyfont=\normalizedlocalbodyfontsize] % of iets anders
+
+%D Remark: windows programs normally handle \type {cr|lf|crlf} but unix is more
+%D picky, so we default to the \type {cr}. I never understood why \type {crlf} was
+%D not used in all systems, since it makes most sense. But anyway, in \MKIV\ we
+%D avoid most of the complications anyway as we deal with much at the \LUA\ end.
+
+\permanent\tolerant\protected\def\start[#1]%
+ {\bgroup
+ \ifparameters
+ \expandafter\syst_start_nop
+ \else
+ \edef\m_syst_start_stop{#1}%
+ \expandafter\syst_start_yes
+ \fi}
+
+\let\syst_stop_indeed\donothing
+
+\def\syst_start_yes
+ {\ifempty\m_syst_start_stop
+ \let\syst_stop_indeed\donothing
+ \orelse\ifcsname\e!start\m_syst_start_stop\endcsname
+ \expandafter\let\expandafter\syst_stop_indeed\csname\e!stop\m_syst_start_stop\endcsname
+ \csname\e!start\m_syst_start_stop\expandafter\expandafter\expandafter\endcsname
+ \else
+ \let\syst_stop_indeed\donothing
+ \fi}
+
+\def\syst_start_nop
+ {\let\syst_stop_indeed\donothing}
+
+\permanent\protected\def\stop
+ {\syst_stop_indeed
+ \egroup}
+
+% \c!before \c!after \c!inbetween \c!commands \c!style \c!color
+
+\installcorenamespace{startstop}
+
+\installcommandhandler \??startstop {startstop} \??startstop
+
+\appendtoks
+ \frozen\setuevalue{\e!start\currentstartstop}{\syst_startstop_start {\currentstartstop}}%
+ \frozen\setuevalue{\e!stop \currentstartstop}{\syst_startstop_stop {\currentstartstop}}%
+ \frozen\setuevalue {\currentstartstop}{\syst_startstop_indeed{\currentstartstop}}%
+\to \everydefinestartstop
+
+\ifdefined\dotagconstruct \else \aliased\let\dotagconstruct\relax \fi
+
+\protected\def\syst_startstop_start#1%
+ {\namedstartstopparameter{#1}\c!before\relax
+ \bgroup
+ \def\currentstartstop{#1}%
+ % we will keep this for a while:
+ \startstopparameter\c!commands\relax % obsolete
+ % this is the new method:
+ \usesetupsparameter\startstopparameter\relax % only in the display version
+ \dostarttagged\t!construct\currentstartstop
+ \usestartstopstyleandcolor\c!style\c!color
+ \dotagconstruct}
+
+\protected\def\syst_startstop_stop#1%
+ {\dostoptagged
+ \egroup
+ \namedstartstopparameter{#1}\c!after\relax}
+
+\protected\def\syst_startstop_indeed#1%
+ {\groupedcommand
+ {\def\currentstartstop{#1}%
+ \startstopparameter\c!commands\relax % better: setups so that will show op soon
+ \dostarttagged\t!construct\currentstartstop
+ \usestartstopstyleandcolor\c!style\c!color
+ \startstopparameter\c!left\relax}
+ {\def\currentstartstop{#1}% safeguard, not really needed
+ \startstopparameter\c!right\relax
+ \dostoptagged
+ \startstopparameter\c!inbetween\relax}}
+
+% \definestartstop[tracing][\c!style=\tt]
+
+% \protected\def\ignorestartstop[#1]%
+% {\protected\defcsname\e!start#1\expandafter\endcsname\expandafter
+% {\expandafter\gobbleuntil\csname\e!stop#1\endcsname}}
+%
+% \ignorestartstop[bagger]
+
+\installcorenamespace{highlight}
+
+\installcommandhandler \??highlight {highlight} \??highlight % we could do with less
+
+\setuphighlight
+ [\c!define=\v!yes]
+
+\appendtoks
+ \ifcstok{\highlightparameter\c!define}\v!yes
+ \frozen\instance\setuevalue\currenthighlight{\typo_highlights_indeed{\currenthighlight}}%
+ \fi
+\to \everydefinehighlight
+
+\ifdefined\dotaghighlight \else \aliased\let\dotaghighlight\relax \fi
+
+\permanent\protected\def\typo_highlights_indeed#1% inline style/color switch
+ {\dontleavehmode\groupedcommand % otherwise wrong par number in tags
+ {\def\currenthighlight{#1}%
+ \dostarttagged\t!highlight\currenthighlight
+ \usehighlightstyleandcolor\c!style\c!color
+ \dotaghighlight}
+ {\dostoptagged}}
+
+\permanent\protected\def\highlight[#1]%
+ {\typo_highlights_indeed{#1}}
+
+\permanent\protected\def\starthighlight[#1]%
+ {\begingroup
+ \def\currenthighlight{#1}%
+ \dostarttagged\t!highlight\currenthighlight
+ \usehighlightstyleandcolor\c!style\c!color
+ \dotaghighlight}
+
+\permanent\protected\def\stophighlight
+ {\dostoptagged
+ \endgroup}
+
+\aliased\let\directhighlight\typo_highlights_indeed
+
+\permanent\protected\def\defineexpandable
+ {\doifelsenextoptional
+ {\syst_basics_define_yes\def}%
+ {\syst_basics_define_nop\def}}
+
+\permanent\protected\def\define
+ {\doifelsenextoptional
+ {\syst_basics_define_yes{\protected\def}}%
+ {\syst_basics_define_nop{\protected\def}}}
+
+\protected\def\syst_basics_define_yes#1[#2]#3#4%
+ {\ifdefined#3%
+ \showmessage\m!system4{\string#3}%
+ \fi
+ \ifcase0#2\relax
+ #1#3{#4}\or
+ #1#3##1{#4}\or
+ #1#3##1##2{#4}\or
+ #1#3##1##2##3{#4}\or
+ #1#3##1##2##3##4{#4}\or
+ #1#3##1##2##3##4##5{#4}\or
+ #1#3##1##2##3##4##5##6{#4}\or
+ #1#3##1##2##3##4##5##6##7{#4}\or
+ #1#3##1##2##3##4##5##6##7##8{#4}\or
+ #1#3##1##2##3##4##5##6##7##8##9{#4}\else
+ #1#3{#4}\fi}
+
+\protected\def\syst_basics_define_nop#1#2#3%
+ {\ifdefined#2%
+ \showmessage\m!system4{\string#2}%
+ \fi
+ #1#2{#3}}
+
+\aliased\let\redefine\define
+
+% new but maybe not needed:
+%
+% \checked\def \whatever#alpha#beta{#alpha + #beta}
+% \checked\edef\whatever#alpha#beta{#alpha + #beta}
+
+\mutable\let\gobbleddefinition\relax % only for diagnostics
+
+\permanent\protected\def\unique#1#2%
+ {\ifdefined#2%
+ \showmessage\m!system4{\string#2}%
+ \expandafter#1\expandafter\gobbleddefinition
+ \else
+ \expandafter#1%
+ \fi#2}
+
+\permanent\protected\def\checked#1#2%
+ {\ifdefined#2%
+ \showmessage\m!system4{\string#2}%
+ \fi
+ #1#2}
+
+% \startluacode
+% local formatters = string.formatters
+% local contextsprint, ctxcatcodes, prtcatcodes = context.sprint, tex.ctxcatcodes, tex.prtcatcodes
+% local match, gmatch, rep = string.match, string.gmatch, string.rep
+% local empty = {
+% "single",
+% "double",
+% "triple",
+% "quadruple",
+% "quintuple",
+% }
+% local check = {
+% "first",
+% "second",
+% "third",
+% "fourth",
+% "fifth",
+% }
+% function commands.define(str)
+% -- we could store the defaults in lua and call lua instead but why bother
+% local arg, cmd = match(str,"(.*)\\(.-)$")
+% local a = { }
+% for s in gmatch(arg,"%[(.-)%]") do
+% a[#a+1] = s
+% end
+% local n = tonumber(a[#a])
+% if n then
+% a[#a] = nil
+% else
+% n = 0
+% end
+% contextsprint(ctxcatcodes,formatters["\\protected\\def\\%s"](cmd))
+% if #a > 0 then
+% contextsprint(prtcatcodes,formatters["{\\do%sempty\\user_defined_%s}"](empty[#a],cmd))
+% contextsprint(prtcatcodes,formatters["\\def\\user_defined_%s"](cmd))
+% for i=1,#a do
+% contextsprint(ctxcatcodes,formatters["[#%s]"](i))
+% end
+% contextsprint(ctxcatcodes,"{")
+% for i=#a,1,-1 do
+% contextsprint(ctxcatcodes,formatters["\\if%sargument"](check[i]))
+% contextsprint(prtcatcodes,formatters["\\def\\next{\\user_defined_indeed_%s"](cmd))
+% for j=1,#a-i do
+% contextsprint(ctxcatcodes,formatters["[%s]"](a[j]))
+% end
+% for j=1,i do
+% contextsprint(ctxcatcodes,formatters["[#%s]"](j))
+% end
+% contextsprint(ctxcatcodes,"}")
+% if i == 1 then
+% contextsprint(ctxcatcodes,rep("\\fi",#a))
+% else
+% contextsprint(ctxcatcodes,"\\else")
+% end
+% end
+% contextsprint(ctxcatcodes,"\\next}")
+% contextsprint(prtcatcodes,formatters["\\def\\user_defined_indeed_%s"](cmd))
+% for i=1,#a do
+% contextsprint(ctxcatcodes,formatters["[#%s]"](i))
+% end
+% end
+% for i=1,n do
+% contextsprint(ctxcatcodes,formatters["#%s"](#a+i))
+% end
+% end
+% \stopluacode
+%
+% \protected\def\define#1#{\ctxcommand{define([[\detokenize{#1}]])}}
+%
+% \starttext
+% \define[2]\whatevera{#1+#2}
+% \whatevera{A}{B}
+% \define[me][too][2]\whateverb{#1+#2+#3+#4}
+% \whateverb[A]{B}{C}
+% \whateverb[A][B]{C}{D}
+% \define[alpha][beta][gamma][delta]\whateverc{#1+#2+#3+#4}
+% \whateverc[P][Q]
+% \stoptext
+
+%D This is a checked variant of \type {\getvalue}.
+
+\permanent\protected\def\macroname#1% brrr
+ {\begincsname#1\endcsname}
+
+% %D A weird one that I probably needed once, so it might as well become
+% %D obsolete.
+%
+% \protected\def\usecommands#1%
+% {\begingroup
+% \def\docommand##1{\setbox\scratchbox\hbox{\csname\string##1\endcsname##1}}%
+% \processcommalist[#1]\docommand
+% \endgroup}
+
+\permanent\protected\def\syst_log_indeed#1#2#3%
+ {\ctxcommand{systemlog("#1","#2",\!!bs#3\!!es)}}
+
+\aliased\let\systemlog\syst_log_indeed
+
+\permanent\protected\def\systemlogfirst
+ {\ifcase\directsystemparameter\c!n\relax
+ \expandafter\syst_log_indeed
+ \or
+ \expandafter\syst_log_indeed
+ \else
+ \expandafter\gobblethreearguments
+ \fi}
+
+\permanent\protected\def\systemloglast
+ {\ifcase\directsystemparameter\c!n\relax
+ \expandafter\syst_log_indeed
+ \or
+ \expandafter\gobblethreearguments
+ \or
+ \expandafter\gobblethreearguments
+ \or
+ \expandafter\gobblethreearguments
+ \or
+ \expandafter\syst_log_indeed
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl
new file mode 100644
index 00000000000..cadd9d05907
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-two.mkxl
@@ -0,0 +1,111 @@
+%D \module
+%D [ file=core-two, % moved from core-uti
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Two Pass Data,
+%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 / 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}{}
+
+\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\let\twopassdata \empty
+\mutable\let\twopassdatalist\empty
+\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
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-uti.lua b/Master/texmf-dist/tex/context/base/mkxl/core-uti.lua
new file mode 100644
index 00000000000..887ef9a7536
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-uti.lua
@@ -0,0 +1,470 @@
+if not modules then modules = { } end modules ['core-uti'] = {
+ version = 1.001,
+ comment = "companion to core-uti.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: keep track of changes here (hm, track access, and only true when
+-- accessed and changed)
+
+--[[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
+local concat = table.concat
+
+local definetable = utilities.tables.definetable
+local accesstable = utilities.tables.accesstable
+local migratetable = utilities.tables.migratetable
+local serialize = table.serialize
+local packers = utilities.packers
+local allocate = utilities.storage.allocate
+local mark = utilities.storage.mark
+
+local getrandom = utilities.randomizer.get
+local setrandomseedi = utilities.randomizer.setseedi
+local getrandomseed = utilities.randomizer.getseed
+
+local implement = interfaces.implement
+
+local texgetcount = tex.getcount
+
+local report_passes = logs.reporter("job","passes")
+
+job = job or { }
+local job = job
+
+job.version = 1.32
+job.packversion = 1.02
+
+-- some day we will implement loading of other jobs and then we need
+-- job.jobs
+
+--[[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)
+ if type(key) == "table" then
+ for k, v in next, key do
+ comment[k] = v
+ end
+ else
+ comment[key] = value
+ end
+end
+
+job.comment("version",job.version)
+
+local enabled = true
+local initialized = false
+
+directives.register("job.save",function(v) enabled = v end)
+
+function job.disablesave()
+ enabled = false -- for instance called when an error
+end
+
+function job.initialize(loadname,savename)
+ if not initialized then
+ if not loadname or loadname == "" then
+ loadname = tex.jobname .. ".tuc"
+ end
+ if not savename or savename == "" then
+ savename = tex.jobname .. ".tua"
+ end
+ job.load(loadname) -- has to come after structure is defined !
+ luatex.registerstopactions(function()
+ if enabled then
+ job.save(savename)
+ end
+ end)
+ initialized = true
+ end
+end
+
+function job.register(collected, tobesaved, initializer, finalizer, serializer)
+ savelist[#savelist+1] = { collected, tobesaved, initializer, finalizer, serializer }
+end
+
+-- as an example we implement variables
+
+local tobesaved, collected, checksums = allocate(), allocate(), allocate()
+
+local jobvariables = {
+ collected = collected,
+ tobesaved = tobesaved,
+ checksums = checksums,
+}
+
+-- if not checksums.old then checksums.old = md5.HEX("old") end -- used in experiment
+-- if not checksums.new then checksums.new = md5.HEX("new") end -- used in experiment
+
+job.variables = jobvariables
+
+local function initializer()
+ checksums = jobvariables.checksums
+end
+
+job.register('job.variables.checksums', 'job.variables.checksums', initializer)
+
+local rmethod, rvalue
+local collectedmacros, tobesavedmacros
+
+local ctx_setxvalue = context.setxvalue
+
+local function initializer()
+ tobesaved = jobvariables.tobesaved
+ collected = jobvariables.collected
+ --
+ rvalue = collected.randomseed
+ if not rvalue then
+ rvalue = getrandom("initialize")
+ setrandomseedi(rvalue)
+ rmethod = "initialized"
+ else
+ setrandomseedi(rvalue)
+ rmethod = "resumed"
+ end
+ tobesaved.randomseed = rvalue
+ --
+ collectedmacros = collected.macros
+ tobesavedmacros = tobesaved.macros
+ if not collectedmacros then
+ collectedmacros = { }
+ collected.macros = collectedmacros
+ end
+ if not tobesavedmacros then
+ tobesavedmacros = { }
+ tobesaved.macros = tobesavedmacros
+ end
+ -- will become collected.macros
+ for cs, value in next, collectedmacros do
+ if type(value) == "string" then -- safeguard
+ ctx_setxvalue(cs,value)
+ end
+ end
+end
+
+job.register('job.variables.collected', tobesaved, initializer)
+
+function jobvariables.save(cs,value)
+ tobesavedmacros[cs] = value
+end
+
+function jobvariables.restore(cs)
+ return collectedmacros[cs] or tobesavedmacros[cs]
+end
+
+function job.getrandomseed()
+ return tobesaved.randomseed or getrandomseed()
+end
+
+-- checksums
+
+function jobvariables.getchecksum(tag)
+ return checksums[tag] -- no default
+end
+
+function jobvariables.makechecksum(data)
+ return data and md5.HEX(data) -- no default
+end
+
+function jobvariables.setchecksum(tag,checksum)
+ checksums[tag] = checksum
+end
+
+--
+
+local packlist = {
+ "numbers",
+ "ownnumbers",
+ "metadata",
+ "sectiondata",
+ "prefixdata",
+ "numberdata",
+ "pagedata",
+ "directives",
+ "specification",
+ "processors", -- might become key under directives or metadata
+-- "references", -- we need to rename of them as only one packs (not structures.lists.references)
+}
+
+local skiplist = {
+ "datasets",
+ "userdata",
+ "positions",
+}
+
+-- not ok as we can have arbitrary keys in userdata and dataset so some day we
+-- might need a bit more granularity, like skippers
+
+local jobpacker = packers.new(packlist,job.packversion,skiplist) -- jump number when changs in hash
+
+job.pack = true
+-- job.pack = false
+
+directives.register("job.pack",function(v) job.pack = v end)
+
+local _save_, _load_, _others_ = { }, { }, { } -- registers timing
+
+function job.save(filename) -- we could return a table but it can get pretty large
+ statistics.starttiming(_save_)
+ local f = io.open(filename,'w')
+ if f then
+ f:write("local utilitydata = { }\n\n")
+ f:write(serialize(comment,"utilitydata.comment",true),"\n\n")
+ for l=1,#savelist do
+ -- f:write("do\n\n") -- no solution for the jit limitatione either
+ local list = savelist[l]
+ local target = format("utilitydata.%s",list[1])
+ local data = list[2]
+ local finalizer = list[4]
+ local serializer = list[5]
+ if type(data) == "string" then
+ data = utilities.tables.accesstable(data)
+ end
+ if type(finalizer) == "function" then
+ finalizer()
+ end
+ if job.pack then
+ packers.pack(data,jobpacker,true)
+ end
+ local definer, name = definetable(target,true,true) -- no first and no last
+ if serializer then
+ f:write(definer,"\n\n",serializer(data,name,true),"\n\n")
+ else
+ f:write(definer,"\n\n",serialize(data,name,true),"\n\n")
+ end
+ -- f:write("end\n\n")
+ end
+ if job.pack then
+ packers.strip(jobpacker)
+ -- f:write("do\n\n")
+ f:write(serialize(jobpacker,"utilitydata.job.packed",true),"\n\n")
+ -- f:write("end\n\n")
+ end
+ f:write("return utilitydata")
+ f:close()
+ end
+ statistics.stoptiming(_save_)
+end
+
+local function load(filename)
+ if lfs.isfile(filename) then
+
+ local function dofile(filename)
+ local result = loadstring(io.loaddata(filename))
+ if result then
+ return result()
+ else
+ return nil
+ end
+ end
+
+ local okay, data = pcall(dofile,filename)
+ if okay and type(data) == "table" then
+ local jobversion = job.version
+ local datacomment = data.comment
+ local dataversion = datacomment and datacomment.version or "?"
+ if dataversion ~= jobversion then
+ report_passes("version mismatch: %s <> %s",dataversion,jobversion)
+ else
+ return data
+ end
+ else
+ os.remove(filename) -- probably a bad file (or luajit overflow as it cannot handle large tables well)
+ report_passes("removing stale job data file %a, restart job, message: %s%s",filename,tostring(data),
+ jit and " (try luatex instead of luajittex)" or "")
+ os.exit(true) -- trigger second run
+ end
+ end
+end
+
+function job.load(filename)
+ statistics.starttiming(_load_)
+ local utilitydata = load(filename)
+ if utilitydata then
+ local jobpacker = utilitydata.job.packed
+ local handlers = { }
+ for i=1,#savelist do
+ local list = savelist[i]
+ local target = list[1]
+ local initializer = list[3]
+ local result = accesstable(target,utilitydata)
+ if result then
+ local done = packers.unpack(result,jobpacker,true)
+ if done then
+ migratetable(target,mark(result))
+ if type(initializer) == "function" then
+ handlers[#handlers+1] = { initializer, result }
+ end
+ else
+ report_passes("pack version mismatch")
+ end
+ end
+ end
+ -- so we have all tables available (unpacked)
+ for i=1,#handlers do
+ local handler = handlers[i]
+ handler[1](handler[2])
+ end
+ end
+ statistics.stoptiming(_load_)
+end
+
+function job.loadother(filename)
+ statistics.starttiming(_load_)
+ _others_[#_others_+1] = file.nameonly(filename)
+ local utilitydata = load(filename)
+ if utilitydata then
+ local jobpacker = utilitydata.job.packed
+ local unpacked = { }
+ for l=1,#savelist do
+ local list = savelist[l]
+ local target = list[1]
+ local result = accesstable(target,utilitydata)
+ local done = packers.unpack(result,jobpacker,true)
+ if done then
+ migratetable(target,result,unpacked)
+ end
+ end
+ unpacked.job.packed = nil -- nicer in inspecting
+ return unpacked
+ end
+ statistics.stoptiming(_load_)
+end
+
+-- function job.keep(filename)
+-- local suffix = file.suffix(filename)
+-- local base = file.removesuffix(filename)
+-- if suffix == "" then
+-- suffix = "tuc"
+-- end
+-- for i=1,10 do
+-- local tmpname = format("%s-%s-%02d.tmp",base,suffix,i)
+-- if lfs.isfile(tmpname) then
+-- os.remove(tmpname)
+-- report_passes("removing %a",tmpname)
+-- end
+-- end
+-- if lfs.isfile(filename) then
+-- local tmpname = format("%s-%s-%02d.tmp",base,suffix,environment.currentrun or 1)
+-- report_passes("copying %a into %a",filename,tmpname)
+-- file.copy(filename,tmpname)
+-- else
+-- report_passes("no file %a, nothing kept",filename)
+-- end
+-- end
+
+-- eventually this will end up in strc-ini
+
+statistics.register("startup time", function()
+ return statistics.elapsedseconds(statistics,"including runtime option file processing")
+end)
+
+statistics.register("jobdata time",function()
+ if enabled then
+ if #_others_ > 0 then
+ return format("%s seconds saving, %s seconds loading, other files: %s",statistics.elapsedtime(_save_),statistics.elapsedtime(_load_),concat(_others_," "))
+ else
+ return format("%s seconds saving, %s seconds loading",statistics.elapsedtime(_save_),statistics.elapsedtime(_load_))
+ end
+ else
+ if #_others_ > 0 then
+ return format("nothing saved, %s seconds loading, other files: %s",statistics.elapsedtime(_load_),concat(_others_," "))
+ else
+ return format("nothing saved, %s seconds loading",statistics.elapsedtime(_load_))
+ end
+ end
+end)
+
+statistics.register("callbacks", function()
+ local c_internal = status.callbacks or 0
+ local c_file = status.indirect_callbacks or 0
+ local c_direct = status.direct_callbacks or 0
+ local c_late = backends.getcallbackstate().count
+ local c_function = status.function_callbacks or 0
+ local c_total = c_internal + c_file + c_direct + c_late + c_function
+ local n_pages = structures.pages.nofpages or 0
+ local c_average = n_pages > 0 and math.round(c_total/n_pages) or 0
+ local result = format (
+ "internal: %s, file: %s, direct: %s, late: %s, function %s, total: %s (%s per page)",
+ c_internal, c_file, c_direct, c_late, c_function, c_total, c_average
+ )
+ statistics.callbacks = function()
+ return result
+ end
+ return result
+end)
+
+statistics.register("randomizer", function()
+ if rmethod and rvalue then
+ return format("%s with value %s",rmethod,rvalue)
+ end
+end)
+
+-- a sort of joke (for ctx meeting)
+
+-- local kg_per_watt_per_second = 1 / 15000000
+-- local watts_per_core = 50
+-- local speedup_by_other_engine = 1.2
+-- local used_wood_factor = watts_per_core * kg_per_watt_per_second / speedup_by_other_engine
+-- local used_wood_factor = (50 / 15000000) / 1.2
+
+
+function statistics.formatruntime(runtime)
+ if not environment.initex then -- else error when testing as not counters yet
+ -- stoptiming(statistics) -- to be sure
+ local shipped = texgetcount('nofshipouts')
+ local pages = texgetcount('realpageno')
+ if pages > shipped then
+ pages = shipped
+ end
+ runtime = tonumber(runtime)
+ if shipped > 0 or pages > 0 then
+ local persecond = (runtime > 0) and (shipped/runtime) or pages
+ if pages == 0 then
+ pages = shipped
+ end
+ return format("%0.3f seconds, %i processed pages, %i shipped pages, %.3f pages/second",runtime,pages,shipped,persecond)
+ else
+ return format("%0.3f seconds",runtime)
+ end
+ end
+end
+
+implement {
+ name = "savevariable",
+ actions = job.variables.save,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "setjobcomment",
+ actions = job.comment,
+ arguments = { { "*" } }
+}
+
+implement {
+ name = "initializejob",
+ actions = job.initialize
+}
+
+implement {
+ name = "disablejobsave",
+ actions = job.disablesave
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/core-uti.mkxl b/Master/texmf-dist/tex/context/base/mkxl/core-uti.mkxl
new file mode 100644
index 00000000000..b8d3bf7ebed
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/core-uti.mkxl
@@ -0,0 +1,35 @@
+%D \module
+%D [ file=core-uti,
+%D version=1997.03.31, % 2006.09.19 mkiv
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Utility File Handling,
+%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 / Utility File Handling}
+
+\unprotect
+
+\registerctxluafile{core-uti}{}
+
+% savecurrentvalue#1#2% immediate, expanded, defined at lua end
+
+\appendtoks
+ \clf_setjobcomment
+ file {\jobname}%
+ format {\contextformat}%
+ stamp {\contextversion}%
+ escape {\!!bs\space...\space\!!es}%
+ \relax
+\to \everystarttext
+
+\appendtoks
+ \clf_initializejob
+\to \everyjob
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/driv-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/driv-ini.lmt
new file mode 100644
index 00000000000..729196e870d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/driv-ini.lmt
@@ -0,0 +1,375 @@
+if not modules then modules = { } end modules ['driv-ini'] = {
+ version = 1.001,
+ comment = "companion to driv-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type = type
+local addsuffix = file.addsuffix
+
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local report = logs.reporter("drivers")
+
+local instances = { }
+local helpers = { }
+local converters = { }
+local prepared = { }
+local wrappedup = { }
+local cleanedup = { }
+local currentdriver = "default"
+local currentinstance = nil
+
+local shipout = tex.shipout
+local texgetbox = tex.getbox
+local texgetcount = tex.getcount
+
+function converters.engine(driver,boxnumber,mode,number,specification)
+ return shipout(boxnumber)
+end
+
+local prepare = nil
+local convert = nil
+local wrapup = nil
+local cleanup = nil
+local outputfilename = nil
+
+drivers = drivers or {
+ instances = instances,
+ helpers = helpers,
+ converters = converters,
+ lmtxversion = 0.10,
+ report = report,
+}
+
+local dummy = function() end
+
+local defaulthandlers = {
+ prepare = dummy,
+ initialize = dummy,
+ finalize = dummy,
+ updatefontstate = dummy,
+ wrapup = dummy,
+ cleanup = dummy,
+ convert = dummy,
+ outputfilename = dummy,
+}
+
+local installwhatsits do
+
+ local leaderlevel = 0
+ local backends = backends
+
+ local function pushleaderlevel()
+ leaderlevel = leaderlevel + 1
+ end
+
+ local function popleaderlevel()
+ leaderlevel = leaderlevel - 1
+ end
+
+ local function flushlatelua(current,h,v)
+ -- Here we assume maganement by the lua function so currently we don't
+ -- check for leaderlevel.
+ return backends.latelua(current,h,v)
+ end
+
+ local function flushwriteout(current)
+ if leaderlevel == 0 then
+ backends.writeout(current)
+ end
+ end
+
+ local function flushopenout(current)
+ if leaderlevel == 0 then
+ backends.openout(current)
+ end
+ end
+
+ local function flushcloseout(current)
+ if leaderlevel == 0 then
+ backends.closeout(current)
+ end
+ end
+
+ local function flushsavepos(current,pos_h,pos_v)
+ local jp = job.positions
+ jp.lastx = pos_h
+ jp.lasty = pos_v
+ end
+
+ local function flushuserdefined()
+ -- nothing here
+ end
+
+ local whatsitcodes = nodes.whatsitcodes
+
+ local trace = true trackers.register("backends.whatsits",function(v) trace = v end)
+
+ installwhatsits = function(name,flushers)
+
+ -- latelua : specific
+ -- userdefined : special purpose, handled in callbacks
+ -- savepos : only used by generic packages
+ -- open : generic
+ -- close : generic
+ -- write : generic
+
+ -- An alternative is to have a first time setter.
+
+ local function checkagain(t, k)
+ local v = rawget(flushers,k) -- in case it's registered later
+ if not v then
+ if trace then
+ report("unsupported whatsit %a in driver %a",whatsitcodes[k] or k,name)
+ end
+ v = function() end
+ end
+ t[k] = v
+ return v
+ end
+
+ -- flushers.whatsit = setmetatableindex ( {
+ -- [whatsitcodes.literal] = flushers.literal,
+ -- [whatsitcodes.latelua] = flushlatelua,
+ -- [whatsitcodes.userdefined] = flushuserdefined,
+ -- [whatsitcodes.savepos] = flushsavepos,
+ -- [whatsitcodes.save] = flushers.save,
+ -- [whatsitcodes.restore] = flushers.restore,
+ -- [whatsitcodes.setmatrix] = flushers.setmatrix,
+ -- [whatsitcodes.open] = flushopenout,
+ -- [whatsitcodes.close] = flushcloseout,
+ -- [whatsitcodes.write] = flushwriteout,
+ -- [whatsitcodes.startmatrix] = flushers.startmatrix,
+ -- [whatsitcodes.stopmatrix] = flushers.stopmatrix,
+ -- [whatsitcodes.startscaling] = flushers.startscaling,
+ -- [whatsitcodes.stopscaling] = flushers.stopscaling,
+ -- [whatsitcodes.startrotation] = flushers.startrotation,
+ -- [whatsitcodes.stoprotation] = flushers.stoprotation,
+ -- [whatsitcodes.startmirroring] = flushers.startmirroring,
+ -- [whatsitcodes.stopmirroring] = flushers.stopmirroring,
+ -- [whatsitcodes.startclipping] = flushers.startclipping,
+ -- [whatsitcodes.stopclipping] = flushers.stopclipping,
+ -- [whatsitcodes.setstate] = flushers.setstate,
+ -- }, checkagain )
+
+ -- -- sparse
+
+ -- flushers.whatsit = setmetatableindex ( {
+ -- [whatsitcodes.latelua] = flushlatelua,
+ -- [whatsitcodes.userdefined] = flushuserdefined,
+ -- [whatsitcodes.savepos] = flushsavepos,
+ -- [whatsitcodes.open] = flushopenout,
+ -- [whatsitcodes.close] = flushcloseout,
+ -- [whatsitcodes.write] = flushwriteout,
+ -- }, checkagain )
+
+ -- -- delayed
+
+ local whatsit ; whatsit = setmetatableindex ( {
+ [whatsitcodes.literal] = flushers.literal or function(...) return checkagain(whatsit,whatsitcodes.literal )(...) end,
+ [whatsitcodes.latelua] = flushlatelua,
+ [whatsitcodes.userdefined] = flushuserdefined,
+ [whatsitcodes.savepos] = flushsavepos,
+ [whatsitcodes.save] = flushers.save or function(...) return checkagain(whatsit,whatsitcodes.save )(...) end,
+ [whatsitcodes.restore] = flushers.restore or function(...) return checkagain(whatsit,whatsitcodes.restore )(...) end,
+ [whatsitcodes.setmatrix] = flushers.setmatrix or function(...) return checkagain(whatsit,whatsitcodes.setmatrix )(...) end,
+ [whatsitcodes.open] = flushopenout,
+ [whatsitcodes.close] = flushcloseout,
+ [whatsitcodes.write] = flushwriteout,
+ [whatsitcodes.startmatrix] = flushers.startmatrix or function(...) return checkagain(whatsit,whatsitcodes.startmatrix )(...) end,
+ [whatsitcodes.stopmatrix] = flushers.stopmatrix or function(...) return checkagain(whatsit,whatsitcodes.stopmatrix )(...) end,
+ [whatsitcodes.startscaling] = flushers.startscaling or function(...) return checkagain(whatsit,whatsitcodes.startscaling )(...) end,
+ [whatsitcodes.stopscaling] = flushers.stopscaling or function(...) return checkagain(whatsit,whatsitcodes.stopscaling )(...) end,
+ [whatsitcodes.startrotation] = flushers.startrotation or function(...) return checkagain(whatsit,whatsitcodes.startrotation )(...) end,
+ [whatsitcodes.stoprotation] = flushers.stoprotation or function(...) return checkagain(whatsit,whatsitcodes.stoprotation )(...) end,
+ [whatsitcodes.startmirroring] = flushers.startmirroring or function(...) return checkagain(whatsit,whatsitcodes.startmirroring)(...) end,
+ [whatsitcodes.stopmirroring] = flushers.stopmirroring or function(...) return checkagain(whatsit,whatsitcodes.stopmirroring )(...) end,
+ [whatsitcodes.startclipping] = flushers.startclipping or function(...) return checkagain(whatsit,whatsitcodes.startclipping )(...) end,
+ [whatsitcodes.stopclipping] = flushers.stopclipping or function(...) return checkagain(whatsit,whatsitcodes.stopclippin )(...) end,
+ [whatsitcodes.setstate] = flushers.setstate or function(...) return checkagain(whatsit,whatsitcodes.setstate )(...) end,
+ }, checkagain)
+
+ flushers.whatsit = whatsit
+
+ flushers.pushleaderlevel = pushleaderlevel
+ flushers.popleaderlevel = popleaderlevel
+
+ end
+
+end
+
+function drivers.install(specification)
+ local name = specification.name
+ if not name then
+ report("missing driver name")
+ return
+ end
+ local actions = specification.actions
+ if not actions then
+ report("no actions for driver %a",name)
+ return
+ end
+ local flushers = specification.flushers
+ if not flushers then
+ report("no flushers for driver %a",name)
+ return
+ end
+ installwhatsits(name,flushers)
+ -- report("driver %a is installed",name)
+ setmetatableindex(actions, defaulthandlers)
+ setmetatableindex(flushers, function() return dummy end)
+ instances[name] = specification
+end
+
+function drivers.convert(boxnumber)
+ if currentinstance then
+ callbacks.functions.start_page_number()
+ starttiming(drivers)
+ convert(currentinstance,boxnumber,texgetcount("realpageno"))
+ stoptiming(drivers)
+ callbacks.functions.stop_page_number()
+ end
+end
+
+function drivers.outputfilename()
+ if currentinstance then
+ return outputfilename(currentinstance)
+ end
+end
+
+luatex.wrapup(function()
+ if currentinstance and wrapup and not wrappedup[currentdriver] then
+ starttiming(drivers)
+ wrapup(currentinstance)
+ stoptiming(drivers)
+ wrappedup[currentdriver] = true
+ cleanedup[currentdriver] = true
+ end
+end)
+
+luatex.cleanup(function()
+ if currentinstance and cleanup and not cleanedup[currentdriver] then
+ starttiming(drivers)
+ cleanup(currentinstance)
+ stoptiming(drivers)
+ wrappedup[currentdriver] = true
+ cleanedup[currentdriver] = true
+ end
+end)
+
+function drivers.enable(name)
+ if name ~= currentdriver then
+ if currentinstance then
+ starttiming(drivers)
+ cleanup(currentinstance)
+ stoptiming(drivers)
+ end
+ currentdriver = name or "default"
+ currentinstance = instances[currentdriver]
+ if currentinstance then
+ local actions = currentinstance.actions
+ prepare = actions.prepare
+ wrapup = actions.wrapup
+ cleanup = actions.cleanup
+ convert = actions.convert
+ outputfilename = actions.outputfilename
+ --
+ if prepare and not prepared[currentdriver] then
+ starttiming(drivers)
+ prepare(currentinstance)
+ stoptiming(drivers)
+ prepared[currentdriver] = true
+ end
+ else
+ report("bad driver")
+ end
+ end
+end
+
+statistics.register("driver time",function()
+ return statistics.elapsedseconds(drivers)
+end)
+
+interfaces.implement {
+ name = "shipoutpage",
+ arguments = "integer",
+ actions = drivers.convert,
+}
+
+interfaces.implement {
+ name = "enabledriver",
+ arguments = "string",
+ actions = drivers.enable,
+}
+
+-- The default driver:
+
+do
+
+ local filename = nil
+
+ drivers.install {
+ name = "default",
+ actions = {
+ convert = drivers.converters.engine,
+ outputfilename = function(driver)
+ if not filename then
+ filename = addsuffix(tex.jobname,"pdf")
+ end
+ return filename
+ end,
+ },
+ flushers = {
+ -- we always need this entry
+ },
+ }
+
+end
+
+-- No driver:
+
+do
+
+ drivers.install {
+ name = "none",
+ actions = { },
+ flushers = { },
+ }
+
+end
+
+do
+
+ local function prepare(driver)
+ converter = drivers.converters.lmtx
+ end
+
+ local function convert(driver,boxnumber,pagenumber)
+ converter(driver,texgetbox(boxnumber),"page",pagenumber)
+ end
+
+ drivers.install {
+ name = "empty",
+ actions = {
+ prepare = prepare,
+ convert = convert,
+ },
+ flushers = { },
+ }
+
+end
+
+--
+
+setmetatableindex(instances,function() return instances.default end)
+
+-- for now:
+
+drivers.enable("default")
diff --git a/Master/texmf-dist/tex/context/base/mkiv/driv-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/driv-ini.mkxl
index 9f489a2a1a6..947eb37779d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/driv-ini.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/driv-ini.mkxl
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Driver Macros / Initialization}
-\registerctxluafile{driv-ini}{}
+\registerctxluafile{driv-ini}{autosuffix}
\unprotect
diff --git a/Master/texmf-dist/tex/context/base/mkiv/driv-shp.lua b/Master/texmf-dist/tex/context/base/mkxl/driv-shp.lmt
index 5cf7cfcc614..d3a47bf0d2e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/driv-shp.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/driv-shp.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['driv-shp'] = {
version = 1.001,
+ optimize = true,
comment = "companion to driv-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -7,7 +8,6 @@ if not modules then modules = { } end modules ['driv-shp'] = {
}
local type, next = type, next
-local round = math.round
local setmetatableindex = table.setmetatableindex
local formatters = string.formatters
@@ -15,7 +15,11 @@ local concat = table.concat
local keys = table.keys
local sortedhash = table.sortedhash
local splitstring = string.split
+local find = string.find
+local stripstring = string.strip
local idiv = number.idiv
+local sequenced = table.sequenced
+local round = math.round
local extract = bit32.extract
local nuts = nodes.nuts
@@ -43,6 +47,7 @@ local getdata = nuts.getdata
local getreplace = nuts.getreplace
local setreplace = nuts.setreplace
local getfont = nuts.getfont
+local getkerndimension = nuts.getkerndimension
local setdirection = nuts.setdirection
local setfield = nuts.setfield
@@ -53,7 +58,7 @@ local findtail = nuts.tail
local nextdir = nuts.traversers.dir
local nextnode = nuts.traversers.node
-local rangedimensions = node.direct.rangedimensions -- nuts ?
+----- rangedimensions = node.direct.rangedimensions -- nuts ?
local effectiveglue = nuts.effective_glue
local start_of_par = nuts.start_of_par
local dirdimensions = nuts.dirdimensions
@@ -67,52 +72,35 @@ local parameters = fonthashes.parameters
local nodecodes = nodes.nodecodes
local whatsitcodes = nodes.whatsitcodes
-local leadercodes = nodes.leadercodes
local gluecodes = nodes.gluecodes
local dircodes = nodes.dircodes
local dirvalues = nodes.dirvalues
local subtypes = nodes.subtypes
-local normaldir_code <const> = dircodes.normal
-
-local lefttoright_code <const> = dirvalues.lefttoright
-local righttoleft_code <const> = dirvalues.righttoleft
-
-local glyph_code <const> = nodecodes.glyph
-local kern_code <const> = nodecodes.kern
-local glue_code <const> = nodecodes.glue
-local hlist_code <const> = nodecodes.hlist
-local vlist_code <const> = nodecodes.vlist
-local dir_code <const> = nodecodes.dir
-local disc_code <const> = nodecodes.disc
-local math_code <const> = nodecodes.math
-local rule_code <const> = nodecodes.rule
-local whatsit_code <const> = nodecodes.whatsit
------ penalty_code <const> = nodecodes.penalty
------ boundary_code <const> = nodecodes.boundary
-
-local leaders_code <const> = leadercodes.leaders
-local cleaders_code <const> = leadercodes.cleaders
-local xleaders_code <const> = leadercodes.xleaders
-local gleaders_code <const> = leadercodes.gleaders
-
-local spaceskip_code <const> = gluecodes.spaceskip
-
-local saveposwhatsit_code <const> = whatsitcodes.savepos
-local userdefinedwhatsit_code <const> = whatsitcodes.userdefined
-local openwhatsit_code <const> = whatsitcodes.open
-local writewhatsit_code <const> = whatsitcodes.write
-local closewhatsit_code <const> = whatsitcodes.close
-local lateluawhatsit_code <const> = whatsitcodes.latelua
-local literalwhatsit_code <const> = whatsitcodes.literal
-local setmatrixwhatsit_code <const> = whatsitcodes.setmatrix
-local savewhatsit_code <const> = whatsitcodes.save
-local restorewhatsit_code <const> = whatsitcodes.restore
-
-local getpagedimensions getpagedimensions = function()
- getpagedimensions = backends.codeinjections.getpagedimensions
- return getpagedimensions()
-end
+local lefttoright_code = dirvalues.lefttoright
+local righttoleft_code = dirvalues.righttoleft
+
+local glyph_code = nodecodes.glyph
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local dir_code = nodecodes.dir
+local disc_code = nodecodes.disc
+local math_code = nodecodes.math
+local rule_code = nodecodes.rule
+local whatsit_code = nodecodes.whatsit
+----- penalty_code = nodecodes.penalty
+----- boundary_code = nodecodes.boundary
+
+local leaders_code = gluecodes.leaders
+local cleaders_code = gluecodes.cleaders
+local xleaders_code = gluecodes.xleaders
+local gleaders_code = gluecodes.gleaders
+
+local spaceskip_code = gluecodes.spaceskip
+
+local getpagedimensions = layouts.getpagedimensions
local drivers = drivers
local instances = drivers.instances
@@ -121,28 +109,28 @@ local report = logs.reporter("drivers")
---------------------------------------------------------------------------------------
-local lastfont = nil
-local fontcharacters = nil
+local lastfont = nil
+local fontcharacters = nil
-local magicconstants = tex.magicconstants
-local trueinch = magicconstants.trueinch
-local maxdimen = magicconstants.maxdimen
-local running = magicconstants.running
+local magicconstants = tex.magicconstants
+local trueinch = magicconstants.trueinch
+local maxdimen = magicconstants.maxdimen
+local running = magicconstants.running
-local pos_h = 0
-local pos_v = 0
-local pos_r = lefttoright_code
-local shippingmode = "none"
+local pos_h = 0
+local pos_v = 0
+local pos_r = lefttoright_code
+local shippingmode = "none"
-local abs_max_v = 0
-local abs_max_h = 0
+local abs_max_v = 0
+local abs_max_h = 0
-local shipbox_h = 0
-local shipbox_v = 0
-local page_size_h = 0
-local page_size_v = 0
------ page_h_origin = 0 -- trueinch
------ page_v_origin = 0 -- trueinch
+local shipbox_h = 0
+local shipbox_v = 0
+local page_size_h = 0
+local page_size_v = 0
+----- page_h_origin = 0 -- trueinch
+----- page_v_origin = 0 -- trueinch
local initialize
local finalize
@@ -153,11 +141,7 @@ local flushcharacter
local flushfontchar
local flushrule
local flushliteral
-local flushsetmatrix
-local flushsave
-local flushrestore
-local flushspecial
------ flushimage
+local flushwhatsit
-- make local
@@ -168,248 +152,351 @@ function drivers.getvpos() return round(pos_v) end
-- characters
-local flush_character
+local flush_character do
-local stack = setmetatableindex("table")
-local level = 0
-local nesting = 0
-local main = 0
+ local stack = setmetatableindex("table")
+ local level = 0
+ local nesting = 0
+ local main = 0
--- experiment (smaller page stream but might be fragile)
+ -- experiment (smaller page stream but might be fragile)
-local tospace = false directives.register("backends.spaces", function(v) tospace = v end)
+ local tospace = false directives.register("backends.spaces", function(v) tospace = v end)
--- todo: cache streams
+ -- todo: cache streams
-local function flush_vf_packet(pos_h,pos_v,pos_r,font,char,data,factor,vfcommands)
+ local default = 16384 * number.dimenfactors.bp -- 65536 // 4
- if nesting > 100 then
- return
- elseif nesting == 0 then
- main = font
- end
+ local vfinjectors = fonts.helpers.vfinjectors
- nesting = nesting + 1
+ local function flush_vf_packet(current,pos_h,pos_v,pos_r,font,char,data,factor,vfcommands,sx,sy)
- local saved_h = pos_h
- local saved_v = pos_v
- local saved_r = pos_r
- pos_r = lefttoright_code
+ if nesting > 100 then
+ return
+ elseif nesting == 0 then
+ main = font
+ end
- local data = fontdata[font]
- local fnt = font
- local fonts = data.fonts
- local siz = (data.parameters.factor or 1)/65536
+ nesting = nesting + 1
- local function flushchar(font,char,fnt,chr,f,e)
- if fnt then
- local nest = char ~= chr or font ~= fnt
- if fnt == 0 then
- fnt = main
- end
- return flush_character(false,fnt,chr,factor,nest,pos_h,pos_v,pos_r,f,e)
- else
- return 0
- end
- end
+ local saved_h = pos_h
+ local saved_v = pos_v
+ local saved_r = pos_r
+ pos_r = lefttoright_code
- -- we assume resolved fonts: id mandate but maybe also size
-
- for i=1,#vfcommands do
- local packet = vfcommands[i]
- local command = packet[1]
- if command == "char" then
- local chr = packet[2]
- local f = packet[3]
- local e = packet[4]
- pos_h = pos_h + flushchar(font,char,fnt,chr,f,e)
- elseif command == "slot" then
- local index = packet[2]
- local chr = packet[3]
- local f = packet[4]
- local e = packet[5]
- if index == 0 then
- pos_h = pos_h + flushchar(font,char,font,chr,f,e)
- else
- local okay = fonts and fonts[index]
- if okay then
- local fnt = okay.id
- if fnt then
- pos_h = pos_h + flushchar(font,char,fnt,chr,f,e)
- end
- else
- -- safeguard, we assume the font itself (often index 1)
- pos_h = pos_h + flushchar(font,char,font,chr,f,e)
+ local data = fontdata[font]
+ local fnt = font
+ local fonts = data.fonts
+ local siz = (data.parameters.factor or 1)/65536
+
+ local function flushchar(font,char,fnt,chr,f,e)
+ if fnt then
+ local nest = char ~= chr or font ~= fnt
+ if fnt == 0 then
+ fnt = main
end
+ return flush_character(current,fnt,chr,factor,nest,pos_h,pos_v,pos_r,f,e)
+ else
+ return 0
end
- elseif command == "use" then
- local index = packet[2]
- if index then
- local fnt
+ end
+
+ -- we assume resolved fonts: id mandate but maybe also size
+
+ -- we could map left, right, up, down -> offset
+ -- we could map char, font, slot to -> slot
+
+ for i=1,#vfcommands do
+ local packet = vfcommands[i]
+ local command = packet[1]
+ if command == "char" then
+ local chr = packet[2]
+ local f = packet[3]
+ local e = packet[4]
+ pos_h = pos_h + flushchar(font,char,fnt,chr,f,e)
+ elseif command == "slot" then
+ local index = packet[2]
+ local chr = packet[3]
+ local f = packet[4]
+ local e = packet[5]
if index == 0 then
- fnt = font
+ pos_h = pos_h + flushchar(font,char,font,chr,f,e)
else
local okay = fonts and fonts[index]
if okay then
- fnt = okay.id
+ local fnt = okay.id
+ if fnt then
+ pos_h = pos_h + flushchar(font,char,fnt,chr,f,e)
+ end
+ else
+ -- safeguard, we assume the font itself (often index 1)
+ pos_h = pos_h + flushchar(font,char,font,chr,f,e)
end
end
- if fnt then
- -- not efficient but ok for now as experiment
- local d = characters[fnt]
- if d then
- for i=3,#packet do
- local chr = packet[i]
- local dat = d[chr]
- if dat then
- flushfontchar(fnt,chr,dat)
+ elseif command == "use" then
+ local index = packet[2]
+ if index then
+ local fnt
+ if index == 0 then
+ fnt = font
+ else
+ local okay = fonts and fonts[index]
+ if okay then
+ fnt = okay.id
+ end
+ end
+ if fnt then
+ -- not efficient but ok for now as experiment
+ local d = characters[fnt]
+ if d then
+ for i=3,#packet do
+ local chr = packet[i]
+ local dat = d[chr]
+ if dat then
+ flushfontchar(fnt,chr,dat)
+ end
end
end
end
end
- end
- elseif command == "right" then
- local h = packet[2] -- * siz
- if factor ~= 0 and h ~= 0 then
- h = h + h * factor / 1000 -- expansion
- end
- pos_h = pos_h + h
- elseif command == "down" then
- local v = packet[2] -- * siz
- pos_v = pos_v - v
- elseif command == "push" then
- level = level + 1
- local s = stack[level]
- s[1] = pos_h
- s[2] = pos_v
- elseif command == "pop" then
- if level > 0 then
+ elseif command == "right" then
+ local h = packet[2] -- already scaled
+ if h ~= 0 then
+ if factor ~= 0 then
+ h = h + h * factor / 1000 -- expansion
+ end
+ pos_h = pos_h + h * sx
+ end
+ elseif command == "left" then
+ local h = packet[2] -- already scaled
+ if h ~= 0 then
+ if factor ~= 0 then
+ h = h + h * factor / 1000 -- expansion
+ end
+ pos_h = pos_h - h * sx
+ end
+ elseif command == "down" then
+ local v = packet[2] -- already scaled
+ if v and v ~= 0 then
+ pos_v = pos_v - v * sy
+ end
+ elseif command == "up" then
+ local v = packet[2] -- already scaled
+ if v and v ~= 0 then
+ pos_v = pos_v + v * sy
+ end
+ elseif command == "offset" then
+ local ph = pos_h
+ local pv = pos_v
+ local h = packet[2] or 0
+ local v = packet[3] or 0
+ local c = packet[4]
+ if h ~= 0 then
+ if factor ~= 0 then
+ h = h + h * factor / 1000 -- expansion
+ end
+ pos_h = pos_h + h * sx
+ end
+ if v and v ~= 0 then
+ pos_v = pos_v + v * sy
+ end
+ if c then
+ flushchar(font,char,fnt,c)
+ pos_h = ph
+ pos_v = pv
+ end
+ elseif command == "compose" then
+ local ph = pos_h
+ local pv = pos_v
+ local h = packet[2] or 0
+ local v = packet[3] or 0
+ local c = packet[4]
+ if h ~= 0 then
+ if factor ~= 0 then
+ h = h + h * factor / 1000 -- expansion
+ end
+ pos_h = pos_h + h * sx
+ end
+ if v and v ~= 0 then
+ pos_v = pos_v + v * sy
+ end
+ if c then
+ flushchar(font,char,fnt,c)
+ pos_h = ph
+ pos_v = pv
+ end
+ elseif command == "push" then
+ level = level + 1
local s = stack[level]
- pos_h = s[1]
- pos_v = s[2]
- level = level - 1
- end
- elseif command == "pdf" then
- flushliteral(false,pos_h,pos_v,packet[2],packet[3])
- elseif command == "rule" then
- local size_v = packet[2]
- local size_h = packet[3]
- if factor ~= 0 and size_h > 0 then
- size_h = size_h + size_h * factor / 1000
- end
- if size_h > 0 and size_v > 0 then
- flushsimplerule(pos_h,pos_v,pos_r,size_h,size_v)
- pos_h = pos_h + size_h
- end
- elseif command == "font" then
- local index = packet[2]
- local okay = fonts and fonts[index]
- if okay then
- fnt = okay.id or fnt -- or maybe just return
- end
- elseif command == "lua" then
- local code = packet[2]
- if type(code) ~= "function" then
- code = loadstring(code)
- end
- if type(code) == "function" then
- code(font,char,pos_h,pos_v)
+ s[1] = pos_h
+ s[2] = pos_v
+ elseif command == "pop" then
+ if level > 0 then
+ local s = stack[level]
+ pos_h = s[1]
+ pos_v = s[2]
+ level = level - 1
+ end
+ elseif command == "rule" then
+ local size_v = packet[2]
+ local size_h = packet[3]
+ if size_h > 0 and size_v > 0 then
+ if factor ~= 0 then
+ size_h = size_h + size_h * factor / 1000
+ end
+ if size_h > 0 then
+ size_h = size_h * sx
+ size_v = size_v * sy
+ flushsimplerule(pos_h,pos_v,pos_r,size_h,size_v)
+ pos_h = pos_h + size_h
+ end
+ end
+ elseif command == "frame" then
+ -- d:width d:height d:depth d:rulethickness b:outline b:advance b:baseline s:color
+ local width = packet[2]
+ if width > 0 then
+ local height = packet[3] or 0
+ local depth = packet[4] or 0
+ local total = height + depth
+ if total > 0 then
+ if factor ~= 0 then
+ width = width + width * factor / 1000
+ end
+ if width > 0 then
+ local line = packet[5] or default
+ local outline = not packet[6]
+ local advance = not packet[7]
+ local baseline = outline and packet[8]
+ local color = packet[9] -- no longer needed probably
+ if color then
+ vfinjectors.startcolor(pos_h,pos_v,color) -- takes packet or string
+ end
+ width = width * sx
+ height = height * sy
+ depth = depth * sy
+ flushspecialrule(pos_h,pos_v,pos_r,width,height,depth,line,outline,baseline)
+ if color then
+ vfinjectors.stopcolor()
+ end
+ if advance then
+ pos_h = pos_h + width
+ end
+ end
+ end
+ end
+ elseif command == "font" then
+ local index = packet[2]
+ local okay = fonts and fonts[index]
+ if okay then
+ fnt = okay.id or fnt -- or maybe just return
+ end
+ elseif command == "lua" then
+ local code = packet[2]
+ local kind = type(code)
+ if kind ~= "function" then
+ code = loadstring(code)
+ kind = type(code)
+ end
+ if kind == "function" then
+ code(font,char,pos_h,pos_v,sx,sy)
+ end
+ elseif command == "node" then -- obsolete
+ local h = packet[2]
+ hlist_out(h,getlist(h))
+ else
+ local injector = vfinjectors[command]
+ if injector then
+ injector(pos_h,pos_v,packet)
+ end
end
- elseif command == "node" then
- local h = packet[2]
- hlist_out(h,getlist(h))
- elseif command == "image" then
- -- doesn't work because intercepted by engine so we use a different
- -- mechanism (for now)
- local image = packet[2]
- -- to do
- elseif command == "pdfmode" then
- -- doesn't happen
- -- elseif command == "special" then
- -- -- not supported
- -- elseif command == "nop" then
- -- -- nothing to do|
- -- elseif command == "scale" then
- -- -- not supported
+ -- image : not needed, maybe some day
+ -- pdfmode : not used
+ -- special : makes no sense
+ -- nop : the official ignore
+ -- scale : not supported
end
- end
- pos_h = saved_h
- pos_v = saved_v
- pos_r = saved_r
+ pos_h = saved_h
+ pos_v = saved_v
+ pos_r = saved_r
- nesting = nesting - 1
-end
+ nesting = nesting - 1
+ end
-local onetimemessage -- could be defined later (todo: make plug for this)
+ local onetimemessage -- could be defined later (todo: make plug for this)
-flush_character = function(current,font,char,factor,vfcommands,pos_h,pos_v,pos_r,f,e)
+ local getxyscales = nuts.getxyscales
- if font ~= lastfont then
- lastfont = font
- fontcharacters = characters[font]
- updatefontstate(font)
- end
+ flush_character = function(current,font,char,factor,vfcommands,pos_h,pos_v,pos_r,f,e)
- local data = fontcharacters[char]
- if not data then
- if char > 0 then
- if not onetimemessage then
- onetimemessage = fonts.loggers.onetimemessage
- end
- onetimemessage(font,char,"missing")
+ if font ~= lastfont then
+ lastfont = font
+ fontcharacters = characters[font]
+ updatefontstate(font)
end
- return 0, 0, 0
- end
- local width, height, depth, naturalwidth
- if current then
- naturalwidth, height, depth, factor = getwhd(current,true) -- also get corrected width
- if factor == 0 then
- width = naturalwidth
- else
- -- width = (1.0 + factor/1000000.0) * naturalwidth
- width = naturalwidth + naturalwidth * factor/1000000.0
- -- width = naturalwidth + naturalwidth * 0.000001 * factor
+ local data = fontcharacters[char]
+ if not data then
+ if char > 0 then
+ if not onetimemessage then
+ onetimemessage = fonts.loggers.onetimemessage
+ end
+ onetimemessage(font,char,"missing")
+ end
+ return 0, 0, 0
end
- else
- width = data.width or 0
- height = data.height or 0
- depth = data.depth or 0
- naturalwidth = width
- if not factor then
- factor = 0
+ if vfcommands then
+ vfcommands = data.commands
end
- end
-
- if pos_r == righttoleft_code then
- pos_h = pos_h - width
- end
- if vfcommands then
- vfcommands = data.commands
- end
- if vfcommands then
- flush_vf_packet(pos_h,pos_v,pos_r,font,char,data,factor,vfcommands) -- also f ?
- else
- -- kind of messy that we do orientation here and offsets elsewhere
- local orientation = data.orientation
- if orientation and (orientation == 1 or orientation == 3) then
- local x = data.xoffset
- local y = data.yoffset
- if x then
- pos_h = pos_h + x
+ local width, height, depth, naturalwidth, sx, sy
+ if current then
+ naturalwidth, height, depth, factor = getwhd(current,true) -- also get corrected width
+ sx, sy = getxyscales(current) -- maybe: getwhdfs
+ if factor == 0 then
+ width = naturalwidth
+ else
+ -- width = (1.0 + factor/1000000.0) * naturalwidth
+ width = naturalwidth + naturalwidth * factor/1000000.0
+ -- width = naturalwidth + naturalwidth * 0.000001 * factor
end
- if y then
- pos_v = pos_v + y
+ else
+ width = data.width or 0
+ height = data.height or 0
+ depth = data.depth or 0
+ naturalwidth = width
+ if not factor then
+ factor = 0
end
- pushorientation(orientation,pos_h,pos_v)
- flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,f,e,factor) -- ,naturalwidth,width)
- poporientation(orientation,pos_h,pos_v)
+ sx = 1
+ sy = 1
+ end
+ if pos_r == righttoleft_code then
+ pos_h = pos_h - width -- here ?
+ end
+ if vfcommands then
+ flush_vf_packet(current,pos_h,pos_v,pos_r,font,char,data,factor,vfcommands,sx,sy) -- also f ?
else
- flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,f,e,factor) -- ,naturalwidth,width)
+ -- kind of messy that we do orientation here and offsets elsewhere .. this might change
+ local orientation = data.orientation
+ if orientation and (orientation == 1 or orientation == 3) then
+ local x = data.xoffset
+ local y = data.yoffset
+ if x then
+ pos_h = pos_h + x
+ end
+ if y then
+ pos_v = pos_v + y
+ end
+ pushorientation(orientation,pos_h,pos_v)
+ flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,f,e,factor,sx,sy) -- ,naturalwidth,width)
+ poporientation(orientation,pos_h,pos_v)
+ else
+ flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,f,e,factor,sx,sy) -- ,naturalwidth,width)
+ end
end
+ return width, height, depth
end
- return width, height, depth
+
end
-- end of characters
@@ -437,37 +524,19 @@ end
-- t[k] = v
-- return v
-- end
+--
+-- local dirstack = setmetatableindex(dirstackentry)
+--
+-- local function reset_dir_stack()
+-- dirstack = setmetatableindex(dirstackentry)
+-- end
------ dirstack = { }
-local dirstack = setmetatableindex(dirstackentry)
+local dirstack = { }
local function reset_dir_stack()
- -- dirstack = setmetatableindex(dirstackentry)
dirstack = { }
end
-local function flushlatelua(current,h,v)
- return backends.latelua(current,h,v)
-end
-
-local function flushwriteout(current)
- if not doing_leaders then
- backends.writeout(current)
- end
-end
-
-local function flushopenout(current)
- if not doing_leaders then
- backends.openout(current)
- end
-end
-
-local function flushcloseout(current)
- if not doing_leaders then
- backends.closeout(current)
- end
-end
-
local hlist_out, vlist_out do
local function applyanchor(orientation,x,y,width,height,depth,woffset,hoffset,doffset,xoffset,yoffset)
@@ -539,15 +608,13 @@ local hlist_out, vlist_out do
-- check frequencies of nodes
hlist_out = function(this_box,current)
- local outer_doing_leaders = false
-
local ref_h = pos_h
local ref_v = pos_v
local ref_r = pos_r
pos_r = getdirection(this_box)
local boxwidth,
boxheight,
- boxdepth = getwhd(this_box)
+ boxdepth = getwhd(this_box)
local cur_h = 0
local cur_v = 0
@@ -556,13 +623,12 @@ local hlist_out, vlist_out do
-- current = getlist(this_box)
-- end
- -- we can encounter localpar, boundary and penalty nodes but a special
+ -- we can encounter par, boundary and penalty nodes but a special
-- iterator over content nodes won't save much
-
for current, id, subtype in nextnode, current do
if id == glyph_code then
local char, font = isglyph(current)
- local x_offset, y_offset = getoffsets(current)
+ local x_offset, y_offset, left, right, raise = getoffsets(current)
if x_offset ~= 0 or y_offset ~= 0 then
if pos_r == righttoleft_code then
pos_h = ref_h - (cur_h + x_offset)
@@ -572,8 +638,10 @@ local hlist_out, vlist_out do
pos_v = ref_v - (cur_v - y_offset)
-- synced
end
+ pos_v = pos_v + raise
+ pos_h = pos_h - left
local wd = flush_character(current,font,char,false,true,pos_h,pos_v,pos_r)
- cur_h = cur_h + wd
+ cur_h = cur_h + wd - right
elseif id == glue_code then
local gluewidth = effectiveglue(current,this_box)
if gluewidth ~= 0 then
@@ -635,6 +703,7 @@ local hlist_out, vlist_out do
end
end
local shift = getshift(leader)
+ pushleaderlevel()
while cur_h + width <= edge do
local basepoint_h = 0
-- local basepoint_v = shift
@@ -649,16 +718,14 @@ local hlist_out, vlist_out do
end
pos_v = ref_v - shift
-- synced
- outer_doing_leaders = doing_leaders
- doing_leaders = true
if getid(leader) == vlist_code then
vlist_out(leader,getlist(leader))
else
hlist_out(leader,getlist(leader))
end
- doing_leaders = outer_doing_leaders
cur_h = cur_h + width + lx
end
+ popleaderlevel()
cur_h = edge - 10
else
cur_h = cur_h + gluewidth
@@ -669,16 +736,16 @@ local hlist_out, vlist_out do
else
if tospace and subtype == spaceskip_code then
-- todo: flush_space
- flush_character(false,getfont(current),32,false,true,pos_h,pos_v,pos_r)
+ flush_character(false,getfont(current),32,false,true,pos_h,pos_v,pos_r) -- we need tp pass current for scale?
end
cur_h = cur_h + gluewidth
end
end
elseif id == hlist_code or id == vlist_code then
- local boxdir = getdirection(current) or lefttoright_code
local width, height, depth = getwhd(current)
local list = getlist(current)
if list then
+ local boxdir = getdirection(current) or lefttoright_code
local shift, orientation = getshift(current)
if not orientation then
local basepoint_h = boxdir ~= pos_r and width or 0
@@ -746,15 +813,9 @@ local hlist_out, vlist_out do
end
end
cur_h = cur_h + width
- elseif id == disc_code then
- local replace, tail = getreplace(current)
- if replace and subtype ~= select_disc then
- -- we could flatten .. no gain
- setlink(tail,getnext(current))
- setlink(current,replace)
- setreplace(current)
- end
elseif id == kern_code then
+ -- we can use getkerndimension(current) but then we get rounded values so for
+ -- now we calculate ourselves
local kern, factor = getkern(current,true)
if kern ~= 0 then
if factor ~= 0 then
@@ -776,8 +837,8 @@ local hlist_out, vlist_out do
if total > 0 then
local xoffset, yoffset, left, right = getoffsets(current) -- top bottom
if left ~= 0 then
- pos_v = pos_v + left
- total = total - left
+ pos_v = pos_v + left
+ total = total - left
end
if right ~= 0 then
depth = depth - right
@@ -790,8 +851,8 @@ local hlist_out, vlist_out do
pos_v = pos_v - depth
flushrule(current,pos_h + xoffset,pos_v + yoffset,pos_r,width,total,subtype)
end
- cur_h = cur_h + width
end
+ cur_h = cur_h + width
elseif id == math_code then
-- local kern = getkern(current)
-- if kern ~= 0 then
@@ -845,31 +906,24 @@ local hlist_out, vlist_out do
goto synced
end
elseif id == whatsit_code then
- if subtype == literalwhatsit_code then
- flushliteral(current,pos_h,pos_v)
- elseif subtype == lateluawhatsit_code then
- flushlatelua(current,pos_h,pos_v)
- elseif subtype == setmatrixwhatsit_code then
- flushsetmatrix(current,pos_h,pos_v)
- elseif subtype == savewhatsit_code then
- flushsave(current,pos_h,pos_v)
- elseif subtype == restorewhatsit_code then
- flushrestore(current,pos_h,pos_v)
- elseif subtype == saveposwhatsit_code then
- last_position_x = pos_h
- last_position_y = pos_v
- elseif subtype == writewhatsit_code then
- flushwriteout(current)
- elseif subtype == closewhatsit_code then
- flushcloseout(current)
- elseif subtype == openwhatsit_code then
- flushopenout(current)
+ flushwhatsit[subtype](current,pos_h,pos_v)
+ elseif id == disc_code then
+ local replace, tail = getreplace(current)
+ -- actually, we no longer have these select discs in the packaged list ... it's about
+ -- time to clean up the disc code a bit further
+ if replace then -- and subtype ~= select_disc_code then
+ setlink(tail,getnext(current))
+ setlink(current,replace)
+ setreplace(current)
end
- -- elseif id == localpar_code and start_of_par(current) then
+ -- elseif id == par_code and start_of_par(current) then
-- local pardir = getdirection(current) or lefttoright_code
-- if pardir == righttoleft_code then
-- end
-- end
+ else
+ -- penalty, boundary ... no dimensions
+ goto synced
end
-- There is no gain in skipping over this when we have zero progression
-- and such.
@@ -887,8 +941,6 @@ local hlist_out, vlist_out do
end
vlist_out = function(this_box,current)
- local outer_doing_leaders = false
-
local ref_h = pos_h
local ref_v = pos_v
local ref_r = pos_r
@@ -896,7 +948,7 @@ local hlist_out, vlist_out do
local boxwidth,
boxheight,
- boxdepth = getwhd(this_box)
+ boxdepth = getwhd(this_box)
local cur_h = 0
local cur_v = - boxheight
@@ -927,6 +979,7 @@ local hlist_out, vlist_out do
local total = height + depth
if getid(leader) == rule_code then
depth = 0 -- hm
+ total = glueheight -- forgotten ... needs testing
if total > 0 then
if width == running then
width = boxwidth
@@ -968,6 +1021,7 @@ local hlist_out, vlist_out do
end
end
local shift = getshift(leader)
+ pushleaderlevel()
while cur_v + total <= edge do -- todo: <= edge - total
-- synch_pos_with_cur(ref_h, ref_v, getshift(leader), cur_v + height)
if pos_r == righttoleft_code then
@@ -977,16 +1031,14 @@ local hlist_out, vlist_out do
end
pos_v = ref_v - (cur_v + height)
-- synced
- outer_doing_leaders = doing_leaders
- doing_leaders = true
if getid(leader) == vlist_code then
vlist_out(leader,getlist(leader))
else
hlist_out(leader,getlist(leader))
end
- doing_leaders = outer_doing_leaders
cur_v = cur_v + total + ly
end
+ popleaderlevel()
cur_v = edge - 10
else
cur_v = cur_v + glueheight
@@ -997,10 +1049,10 @@ local hlist_out, vlist_out do
end
end
elseif id == hlist_code or id == vlist_code then
- local boxdir = getdirection(current) or lefttoright_code
local width, height, depth = getwhd(current)
local list = getlist(current)
if list then
+ local boxdir = getdirection(current) or lefttoright_code
local shift, orientation = getshift(current)
if not orientation then
-- local basepoint_h = shift
@@ -1091,29 +1143,13 @@ local hlist_out, vlist_out do
end
flushrule(current,pos_h + xoffset,pos_v - total - yoffset,pos_r,width,total,subtype)
end
- cur_v = cur_v + total
end
+ cur_v = cur_v + total
elseif id == whatsit_code then
- if subtype == literalwhatsit_code then
- flushliteral(current,pos_h,pos_v)
- elseif subtype == lateluawhatsit_code then
- flushlatelua(current,pos_h,pos_v)
- elseif subtype == setmatrixwhatsit_code then
- flushsetmatrix(current,pos_h,pos_v)
- elseif subtype == savewhatsit_code then
- flushsave(current,pos_h,pos_v)
- elseif subtype == restorewhatsit_code then
- flushrestore(current,pos_h,pos_v)
- elseif subtype == saveposwhatsit_code then
- last_position_x = pos_h
- last_position_y = pos_v
- elseif subtype == writewhatsit_code then
- flushwriteout(current)
- elseif subtype == closewhatsit_code then
- flushcloseout(current)
- elseif subtype == openwhatsit_code then
- flushopenout(current)
- end
+ flushwhatsit[subtype](current,pos_h,pos_v)
+ else
+ -- penalty
+ goto synced
end
if pos_r == righttoleft_code then
pos_h = ref_h - cur_h
@@ -1155,16 +1191,16 @@ function drivers.converters.lmtx(driver,box,smode,objnum,specification)
pushorientation = flushers.pushorientation
poporientation = flushers.poporientation
+ pushleaderlevel = flushers.pushleaderlevel
+ popleaderlevel = flushers.popleaderlevel
+
flushcharacter = flushers.character
flushfontchar = flushers.fontchar
flushrule = flushers.rule
flushsimplerule = flushers.simplerule
- flushspecial = flushers.special
+ flushspecialrule = flushers.specialrule
flushliteral = flushers.literal
- flushsetmatrix = flushers.setmatrix
- flushsave = flushers.save
- flushrestore = flushers.restore
- -- flushimage = flushers.image
+ flushwhatsit = flushers.whatsit
reset_dir_stack()
reset_state()
@@ -1205,12 +1241,6 @@ function drivers.converters.lmtx(driver,box,smode,objnum,specification)
local pagewidth, pageheight = getpagedimensions()
- -- local h_offset_par = texget("hoffset")
- -- local v_offset_par = texget("voffset")
-
- -- page_h_origin = trueinch
- -- page_v_origin = trueinch
-
pos_r = lefttoright_code
if pagewidth > 0 then
@@ -1233,17 +1263,14 @@ function drivers.converters.lmtx(driver,box,smode,objnum,specification)
page_size_v = total
end
- local refpoint_h = 0 -- + page_h_origin + h_offset_par
- local refpoint_v = page_size_v -- - page_v_origin - v_offset_par
+ local refpoint_h = 0
+ local refpoint_v = page_size_v
pos_h = refpoint_h
pos_v = refpoint_v - height
- -- synced
else
- -- page_h_origin = 0
- -- page_v_origin = 0
page_size_h = width
page_size_v = total
pos_r = getdirection(box)
@@ -1288,21 +1315,28 @@ do
----- tonut = nodes.tonut
local properties = nodes.properties.data
- local flush = texio.write_nl
+ local flush = texio.write
+ local flushline = texio.write_nl
local periods = utilities.strings.newrepeater(".")
local function showdetails(n,l)
local p = properties[tonut(n)]
if p then
- local done = false
for k, v in sortedhash(p) do
- if done then
- flush("\n")
+ local t = type(v)
+ if t == "string" then
+ if find(v,"[\n\r]") then
+ v = "\n" .. stripstring(v) .. "\n"
+ end
+ elseif t == "number" or t == "boolean" then
+ v = tostring(v)
+ elseif t == "table" then
+ v = sequenced(v)
else
- done = true
+ v = "<" .. tostring(v) .. ">"
end
- flush(periods[l+1] .. " " .. k .. " = " .. tostring(v))
+ flushline(periods[l+1] .. " " .. k .. " = " .. v)
end
end
end
@@ -1314,7 +1348,7 @@ do
callback.register("show_whatsit",function(n,l)
local s = nodes.whatsitcodes[n.subtype]
- texio.write(" [" .. s .. "]")
+ flush(" [" .. s .. "]")
local w = whatsittracers[s]
if w then
w(n,l)
diff --git a/Master/texmf-dist/tex/context/base/mkiv/driv-shp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/driv-shp.mkxl
index 68b62c72a72..199215a59ea 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/driv-shp.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/driv-shp.mkxl
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{driv-shp}{optimize}
+\registerctxluafile{driv-shp}{autosuffix,optimize}
\unprotect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl
new file mode 100644
index 00000000000..c93ef7f6185
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/enco-ini.mkxl
@@ -0,0 +1,488 @@
+%D \module
+%D [ file=enco-ini,
+%D version=2007.02.19, % 2000.12.27, % 1998.12.03,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is stripped down version of the original enco-ini.tex file. For more details
+%D you might want to study the \MKII\ file but since \LUATEX\ is unicode inside we
+%D need less code. When we moved to \LMTX\ again some disappeared and the composition
+%D macros were upgraded in the process.
+%D
+%D An historic note: When dealing with characters we have four cases to take into
+%D account when moving from \MKII\ to \MKIV:
+%D
+%D \starttabulate[|l|l|]
+%D \NC \type {<byte 200>} \NC ref to slot 200 in current font \NC \NR
+%D \NC \type {\char 200} \NC ref to slot 200 in current font \NC \NR
+%D \NC \type {<active 200>} \NC can (e.g.) map to another slot in current font \NC \NR
+%D \NC \type {\namedglyph} \NC can map to some slot in some font \NC \NR
+%D \stoptabulate
+%D
+%D Using case 2 for special characters is doomed to fail because we are not going to
+%D intercept these on the fly as happens automatically with traditional font
+%D encoding handling. We could do that in a node pass but it's not worth the effort
+%D because we seldom use this case in a document source.
+
+\writestatus{loading}{ConTeXt Encoding Macros / Initialization}
+
+\unprotect
+
+%D This one is obsolete but maybe sometimes still used in styles:
+
+\immutable\let\defaultencoding\s!default
+
+%D \macros
+%D {defineaccent, definecharacter, definecommand}
+%D
+%D Some of these are used at the \LUA\ end but the names will change.
+
+\installcorenamespace{accents}
+
+%D These might go away:
+
+\permanent\protected\def\defineaccent#1 #2 #3 %
+ {\dodefineaccentcommand{#1}%
+ \dodefineaccent{#1}{#2}{#3}}
+
+\permanent\protected\def\dodefineaccentcommand#1%
+ {\ifcsname\string#1\endcsname\else
+ \edefcsname\string#1\endcsname{\noexpand\dohandleaccent{\string#1}}%
+ \fi}
+
+\permanent\protected\def\dodefineaccent#1#2#3% no spaces, used low level
+ {\defcsname\??accents\string#1\string#2\empty\endcsname{#3}}
+
+\permanent\protected\def\dohandleaccent#1#2% expandable because we want them in the tuc file
+ {\csname\??accents
+ \ifcsname\??accents\string#1#2\empty\endcsname
+ \string#1#2\empty
+ \orelse\ifcsname\??accents\string#1\string#2\empty\endcsname
+ \string#1\string#2\empty
+ \else
+ \endcsname#2\csname\??accents % very dirty trick: ignore accent but keep char
+ \fi
+ \endcsname}
+
+\immutable\letvalue{\??accents}\empty
+
+%D Because now have this (\type {\chr} issues a one|-|time warning):
+
+\permanent\protected\def\dodefinecombine#1#2%
+ {\ifcsname\string#1\endcsname\else
+ \permanent\protected\defcsname with#1\endcsname##1{\chr{##1#2}}%
+ \fi}
+
+%D The following dirty trick is needed to catch \asciimath{\^{1/5}log}, although:
+%D do we?
+
+\permanent\protected\def\definecharacter#1 #2 %
+ {\doifelsenumber{\string#2}
+ {\edefcsname\string#1\endcsname{\Uchar#2}}
+ {\protected\defcsname\string#1\endcsname{#2}}}
+
+%D specials: \aa \ae \cc \i \ij \l \o \oe \sz \par
+%D SPECIALS: \AA \AE \CC \j \IJ \L \O \OE \SZ \par
+
+\permanent\protected\def\definecommand#1 #2 %
+ {\protected\defcsname\string#1\endcsname{#2}}
+
+\permanent\protected\def\dodefinecommand#1#2% \O \L \AE ...
+ {% not permanent as these are kind of obsolete
+ \frozen\protected\defcsname\string#1\endcsname{#2}}
+
+%D We set up some things in \LUA:
+
+\clf_defineaccents % one time
+
+%D This defined commands like \type {\withgrave} and \type {\withcaronbelow} and
+%D some of these have aliases. Below ee also alias the traditional one character
+%D accent commands.
+%D
+%D \starttabulate[||||]
+%D \NC \getvalue{agrave} \NC \withgrave {a} \NC \`{a} \NC \NR
+%D \NC \getvalue{aacute} \NC \withacute {a} \NC \'{a} \NC \NR
+%D \NC \getvalue{acircumflex} \NC \withcircumflex {a} \NC \^{a} \NC \NR
+%D \NC \getvalue{atilde} \NC \withtilde {a} \NC \~{a} \NC \NR
+%D \NC \getvalue{amacron} \NC \withmacron {a} \NC \={a} \NC \NR
+%D \NC \getvalue{ebreve} \NC \withbreve {e} \NC \u{e} \NC \NR
+%D \NC \getvalue{cdotaccent} \NC \withdot {c} \NC \.{c} \NC \NR
+%D \NC \getvalue{ediaeresis} \NC \withdieresis {e} \NC \"{e} \NC \NR
+%D \NC \getvalue{uring} \NC \withring {u} \NC \r{u} \NC \NR
+%D \NC \getvalue{uhungarumlaut} \NC \withhungarumlaut{u} \NC \H{u} \NC \NR
+%D \NC \getvalue{ecaron} \NC \withcaron {e} \NC \v{e} \NC \NR
+%D \NC \getvalue{ecedilla} \NC \withcedilla {e} \NC \c{e} \NC \NR
+%D \NC \getvalue{eogonek} \NC \withogonek {e} \NC \k{e} \NC \NR
+%D \stoptabulate
+%D
+%D Now we alias these traditional shortcuts:
+
+\pushoverloadmode
+
+\suggestedalias \` \withgrave
+\suggestedalias \' \withacute
+\suggestedalias \^ \withcircumflex
+\suggestedalias \~ \withtilde
+\suggestedalias \= \withmacron
+\suggestedalias \u \withbreve
+\suggestedalias \. \withdot
+\suggestedalias \" \withdieresis
+\suggestedalias \r \withring
+\suggestedalias \H \withdoubleacute
+\suggestedalias \v \withcaron
+\suggestedalias \c \withcedilla
+\suggestedalias \k \withogonek
+\suggestedalias \d \withdotbelow
+
+\popoverloadmode
+
+% From \type {enco-com} we had these, maybe that's better:
+
+% \aliased\let\AE\AEligature \aliased\let\ae\aeligature
+% \aliased\let\OE\OEligature \aliased\let\oe\oeligature
+% \aliased\let\IJ\IJligature \aliased\let\ij\ijligature
+% \aliased\let\AA\textAngstrom \aliased\let\aa\aring
+% \aliased\let\CC\Ccedilla \aliased\let\cc\ccedilla
+% \aliased\let\L \Lslash \aliased\let\l \lslash
+% \aliased\let\O \Oslash \aliased\let\o \oslash
+% \aliased\let\SZ\Eszett \aliased\let\sz\eszett % \aliased\let\SS\Ssharp
+
+% %D \macros
+% %D {everyuppercase, everylowercase, everysanitize}
+%
+% \newtoks \everyuppercase
+% \newtoks \everylowercase
+% \newtoks \everysanitize
+
+%D Accent handling (try to avoid this):
+
+% \buildtextaccent\greekdasia\greekalphamacron
+% \buildtextaccent\textacute q
+
+%D We can use offsets in \LMTX\ but even that makes no sense because we have
+%D a virtual feature already in \MKIV. These builders are depricated:
+
+\newbox\b_enco_accent
+
+\permanent\protected\def\buildmathaccent#1%
+ {\mathaccent#1 }
+
+\permanent\protected\def\buildtextaccent#1#2% we could do all at the lua end
+ {\dontleavehmode\begingroup % but that's no fun (yet)
+ \setbox\scratchboxone\hbox{#1}% accent
+ \setbox\scratchboxtwo\hbox{#2}% character
+ \scratchheight\dimexpr\ht\scratchboxtwo-\ht\scratchboxone\relax
+ \scratchdepth \dimexpr\dp\scratchboxtwo-\dp\scratchboxone\relax
+ \scratchwidth \wd\scratchboxtwo
+ \hbox to \wd\ifdim\wd\scratchboxone>\wd\scratchboxtwo\scratchboxone\else\scratchboxtwo\fi\bgroup
+ \hss\box\scratchboxtwo\hss
+ \hskip-\scratchwidth
+ \hss
+ \ifdim\ht\scratchboxone>\exheight
+ % top accent
+ \raise\dimexpr\scratchheight+\exheight/3\relax
+ \else
+ \lower-\dimexpr\scratchdepth+\exheight/3\relax
+ \fi
+ \box\scratchboxone
+ \hss
+ \egroup
+ \endgroup}
+
+\permanent\protected\def\bottomaccent#1#2#3#4#5% down right slantcorrection accent char
+ {\dontleavehmode % why this align mess
+ \vtop
+ {\forgetall
+ \baselineskip\zeropoint
+ \lineskip#1%
+ \everycr\emptytoks
+ \tabskip\zeropoint
+ \lineskiplimit\zeropoint
+ \setbox0\hbox{#4}%
+ \halign
+ {##\crcr\hbox{#5}\crcr
+ \hidewidth
+ \hskip#2\wd0
+ \hskip-#3\slantperpoint % in plain 1ex * dimenless value
+ \vpack to .2\exheight{\box0\vss}\hidewidth
+ \crcr}}}
+
+\permanent\protected\def\buildtextmacron {\bottomaccent{.25ex}{0}{15}{\textmacron}}
+\permanent\protected\def\buildtextbottomdot {\bottomaccent{.25ex}{0}{5}{\textbottomdot}}
+\permanent\protected\def\buildtextcedilla {\bottomaccent{0ex}{0}{5}{\textcedilla}}
+\permanent\protected\def\buildtextogonek {\bottomaccent{-.1ex}{.5}{0}{\textogonek}}
+\permanent\protected\def\buildtextbottomcomma{\bottomaccent{.15ex}{0}{5}{\tx,}}
+
+\permanent\protected\def\topaccent#1#2#3#4#5% down right slantcorrection accent char
+ {\dontleavehmode
+ \bgroup
+ \setbox0\hbox{#4}%
+ \setbox2\hbox{#5}%
+ \hbox to \wd2 \bgroup
+ \hss\copy2\hss
+ \hskip-\wd2
+ \hss\hskip#2\wd0\hskip-#3\slantperpoint\raise#1\hbox{#4}\hss
+ \egroup
+ \egroup}
+
+\permanent\protected\def\buildtextgrave
+ {\topaccent{0pt}{0}{15}{\textgrave}} % e.g.
+
+\permanent\protected\def\definemathaccent#1 #2%
+ {\setvalue{#1}{\mathaccent#2 }}
+
+% from enco-def:
+
+% \aliased\let\i\dotlessi
+% \aliased\let\j\dotlessj
+
+% \aliased\let\P\paragraphmark \aliased\let\textP\paragraphmark % obsolete (surfaced in bibliographic files)
+% \aliased\let\S\sectionmark \aliased\let\textS\sectionmark % obsolete (surfaced in bibliographic files)
+
+\immutable\def\eszett {ß} \immutable\def\Eszett {SS} \permanent\def\Ssharp{SS}
+\immutable\def\lslash {Å‚} \immutable\def\Lslash {Å}
+\immutable\def\dslash {Ä‘} \immutable\def\Dslash {Ä}
+%immutable\def\oslash {ø} %immutable\def\Oslash {Ø} % clashes with math: use \Ostroke
+\immutable\def\dcroat {Ä‘} \immutable\def\Dcroat {Ä}
+\immutable\def\kcedilla{ķ} \immutable\def\Kcedilla{Ķ}
+\immutable\def\lcedilla{ļ} \immutable\def\Lcedilla{Ļ}
+\immutable\def\ncedilla{ņ} \immutable\def\Ncedilla{Ņ}
+\immutable\def\rcedilla{Å—} \immutable\def\Rcedilla{Å–}
+\immutable\def\aumlaut {ä} \immutable\def\Aumlaut {Ä}
+\immutable\def\eumlaut {ë} \immutable\def\Eumlaut {Ë}
+\immutable\def\iumlaut {ï} \immutable\def\Iumlaut {Ã}
+\immutable\def\oumlaut {ö} \immutable\def\Oumlaut {Ö}
+\immutable\def\uumlaut {ü} \immutable\def\Uumlaut {Ü}
+
+%D For old times sake we keep these (obsolete):
+
+\immutable\def\textflorin{Æ’} \immutable\def\florin {Æ’}
+\immutable\def\pound {£} \immutable\def\sterling{£}
+\immutable\def\promille {‰} \immutable\def\permille{‰}
+
+%D These are kind of \TEX\ specific
+
+\pushoverloadmode
+
+\permanent\protected\def\ampersand{\mathortext\mathampersand\textampersand}
+
+\immutable\let\percent\textpercent
+\immutable\let\procent\textpercent
+\immutable\let\dollar \textdollar
+\immutable\let\hash \texthash
+
+\popoverloadmode
+
+%D some more: what with freezing here?
+
+\ifdefined\softhyphen \else
+ \aliased\let\softhyphen\explicitdiscretionary
+\fi
+
+%D The softhyhen is never used but we keep the definition below:
+
+\aliased\let\hyphen \softhyphen % never used
+
+% But we ditch these:
+
+% \def\hyphen {\softhyphen} % never used
+% \def\compoundwordmark {\hyphen}
+% \def\cwm {\hyphen}
+% \def\nonbreakinghyphen{\hyphen}
+% \def\breakinghyphen {\hyphen\prewordbreak}
+
+%D Quotes \unknown\ we keep these funny names because they indicate where we come
+%D from \unknown\ long long ago when we had no real useful names for them. Some
+%D ancient styles might still use them.
+
+\aliased\let\lowerleftsingleninequote \quotesinglebase % ‚
+\aliased\let\lowerleftdoubleninequote \quotedblbase % „
+\aliased\let\lowerrightsingleninequote\quotesinglebase % ‚
+\aliased\let\lowerrightdoubleninequote\quotedblbase % „
+
+\aliased\let\upperleftsingleninequote \quoteright % ’
+\aliased\let\upperleftdoubleninequote \quotedblright % â€
+\aliased\let\upperrightsingleninequote\quoteright % ’
+\aliased\let\upperrightdoubleninequote\quotedblright % â€
+
+\aliased\let\upperleftsinglesixquote \quoteleft % ‘
+\aliased\let\upperleftdoublesixquote \quotedblleft % “
+\aliased\let\upperrightsinglesixquote \quoteleft % ‘
+\aliased\let\upperrightdoublesixquote \quotedblleft % “
+
+\aliased\let\leftsubguillemot \guilsingleleft % ‹
+\aliased\let\rightsubguillemot \guilsingleright % ›
+
+% Some left-overs that will go away!
+
+\permanent\protected\def\textblacksquare{\dontleavehmode\hpack{\vrule\s!width.3\s!em\s!height.4\s!em\s!depth-.1\s!em}}
+%permanent\protected\def\schwa {\hbox{\rotate[\c!rotation=180,\c!location=\v!high]{\hbox{e}}}}
+\permanent\protected\def\schwagrave {\buildtextgrave\schwa}
+
+\installcorenamespace{controlspace}
+
+\permanent\protected\def\fallbackcontrolspace % beware, current font, we also need to honor color
+ {\hbox to \interwordspace \bgroup
+ \hss
+ \ifcsname\??controlspace\number\interwordspace\endcsname
+ \csname\??controlspace\number\interwordspace\endcsname
+ \else
+ \enco_fast_control_space_define % only regular
+ \fi
+ \textcontrolspace
+ \hss
+ \egroup}
+
+\protected\def\enco_fast_control_space_define
+ {\scratchdimen\interwordspace
+ \definedfont[LMTypewriter-Regular at \the\dimexpr\currentfontbodyscale\dimexpr\fontbody]% see font-sym.mkiv
+ \gletcsname\??controlspace\number\scratchdimen\endcsname\lastrawfontcall}
+
+\permanent\protected\def\normalcontrolspace
+ {\iffontchar\font\numexpr\expandafter`\textcontrolspace\relax
+ \textcontrolspace
+ \else
+ \fallbackcontrolspace
+ \fi}
+
+\aliased\let\textvisiblespace\normalcontrolspace
+
+\permanent\protected\def\optionalcontrolspace
+ {\iffontchar\font\numexpr\expandafter`\textcontrolspace\relax
+ \textcontrolspace
+ \else
+ \asciispacechar % used for export !
+ \fi}
+
+%D A smaller and bolder variant, more like the math and monospaced ones.
+
+\permanent\protected\def\fakeunderscore
+ {\relax\ifmmode
+ \vrule\s!depth .12\fontexheight\mathstylefont\normalmathstyle\s!width \fontinterwordspace\mathstylefont\normalmathstyle\s!height\zeropoint\relax
+ \else
+ \dontleavehmode\hbox{\vrule\s!depth .12\fontexheight\font\s!width \fontinterwordspace\font\s!height\zeropoint}%
+ \fi}
+
+\permanent\protected\def\fakeunderscores{\enforced\let\_\fakeunderscore}
+\permanent\protected\def\textunderscores{\enforced\let\_\textunderscore}
+
+\textunderscores
+
+\ifdefined\mathunderscore \else \aliased\let\mathunderscore\fakeunderscore \fi
+\ifdefined\textunderscore \else \aliased\let\textunderscore\fakeunderscore \fi
+
+\permanent\protected\def\normalunderscore{\ifmmode\mathunderscore\else\textunderscore\fi}
+
+\pushoverloadmode
+ \enforced\let\_\normalunderscore
+\popoverloadmode
+
+%D To be sorted out:
+
+\pushoverloadmode
+
+\permanent\protected\def\textminus
+ {\char
+ \iffontchar\font"2012 "2012 \orelse % figuredash
+ \iffontchar\font"2013 "2013 \orelse % endash
+ \iffontchar\font"2212 "2212 \else % math minus
+ "002D \fi} % hyphen
+
+\permanent\protected\def\textplus
+ {\char"002B } % plus
+
+\popoverloadmode
+
+%D Moved from core-mis:
+
+% \permanent\protected\def\celsius #1{#1\mathematics{^\circ}C}
+% \permanent\protected\def\inch {\mathematics{\prime\prime}} % was: \hbox{\rm\char125\relax}
+% \permanent\protected\def\fraction#1#2{\mathematics{#1\over#2}}
+
+\permanent\protected\def\celsius #1{#1\iffontchar\font`℃℃\else\mathematics{^\circ}C\fi} % 0x2103
+\permanent\protected\def\inch {\iffontchar\font`″″\else\mathematics{\prime\prime}\fi} % 0x2103
+\permanent\protected\def\fraction#1#2{\mathematics{\Uabove exact .125\exheight {#1}{#2}}}
+
+%D \startbuffer
+%D \startlines
+%D x\periods x
+%D x\periods[10]x
+%D x\periods[n=10,symbol={,}]x
+%D x\periods[n=4,symbol={!!},width=1em]x
+%D x\periods[n=4,symbol={!!},width=fit]x
+%D x\periods[n=4,symbol={!!},width=fit,distance=1em]x
+%D x\unknown x
+%D \stoplines
+%D \stopbuffer
+%D
+%D \typbuffer \getbuffer
+
+\installcorenamespace {periods}
+
+\installsetuponlycommandhandler \??periods {periods}
+
+\setupperiods
+ [\c!n=3,
+ \c!width=.5\emwidth, % can also be \v!fit
+ \c!distance=.25\emwidth,
+ \c!symbol=.]
+
+\permanent\protected\def\periods
+ {\dontleavehmode
+ \hbox\bgroup
+ \doifelsenextoptional\enco_periods_yes\enco_periods_nop}
+
+\protected\def\enco_periods_yes[#1]%
+ {\doifelseassignment{#1}
+ {\setupcurrentperiods[#1]%
+ \scratchcounter\periodsparameter\c!n}
+ {\doifelsenothing{#1}
+ {\scratchcounter\periodsparameter\c!n}%
+ {\scratchcounter#1}}%
+ \enco_periods_finish}
+
+\protected\def\enco_periods_nop
+ {\scratchcounter\periodsparameter\c!n
+ \enco_periods_finish}
+
+\protected\def\enco_periods_finish
+ {\edef\p_width{\periodsparameter\c!width}%
+ \ifx\p_width\v!fit
+ \enco_periods_finish_fit
+ \else
+ \enco_periods_finish_width
+ \fi
+ \egroup}
+
+\protected\def\enco_periods_finish_width
+ {\setbox\scratchbox\hbox to \p_width
+ {\hss\periodsparameter\c!symbol\hss}%
+ \dorecurse\scratchcounter{\copy\scratchbox}}
+
+\protected\def\enco_periods_finish_fit
+ {\edef\p_symbol{\periodsparameter\c!symbol}%
+ \scratchdistance\periodsparameter\c!distance
+ \hskip\scratchdistance
+ \dorecurse\scratchcounter{\p_symbol\hskip\scratchdistance}}
+
+\permanent\protected\def\unknown
+ {\dontleavehmode
+ \hbox\bgroup
+ \enco_periods_nop}
+
+%D Left-overs:
+
+\appendtoks
+ \enforced\let\buildtextaccent\secondoftwoarguments
+\to \everysimplifycommands
+
+%D See enco-ini.mkivc for a definition of the obsolete \type {\t}.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-ini.mklx b/Master/texmf-dist/tex/context/base/mkxl/file-ini.mklx
new file mode 100644
index 00000000000..35a49c72dd4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-ini.mklx
@@ -0,0 +1,231 @@
+%D \module
+%D [ file=file-ini, % was supp-fil,
+%D version=20110701, % 1995.10.10,
+%D title=\CONTEXT\ File Macros,
+%D subtitle=Helpers,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 \TEX\ operates on files, so one wouldn't wonder that there is a separate module
+%D for file commands. In \CONTEXT\ files are used for several purposes:
+%D
+%D \startitemize[packed]
+%D \item general textual input
+%D \item logging status information
+%D \item saving registers, lists and references
+%D \item buffering defered textual input
+%D \stopitemize
+%D
+%D When dealing with files we can load them as a whole, using the \type {\input}
+%D primitive or load them on a line||by||line basis, using \type {\read}. Writing is
+%D always done line by line, using \type {\write}.
+
+\writestatus{loading}{ConTeXt File Macros / Helpers}
+
+\registerctxluafile{file-ini}{}
+
+\unprotect
+
+%D \macros
+%D {scratchread, scratchwrite}
+%D
+%D We define a scratch file for reading. Keep in mind that the number of files is
+%D limited to~16, so use this one when possible. We also define a scratch output
+%D file. In \MKIV\ and \LMTX\ we never use these file handles.
+
+\ifdefined\scratchread \else \newread \scratchread \fi
+\ifdefined\scratchwrite \else \newwrite\scratchwrite \fi
+
+%D Seldom needed:
+
+\permanent\def\openinputfile #handle#name{\immediate\openin #handle={#name}\relax}
+\permanent\def\openoutputfile #handle#name{\immediate\openout#handle={#name}\relax}
+
+\permanent\def\closeinputfile #handle{\immediate\closein #handle\relax}
+\permanent\def\closeoutputfile#handle{\immediate\closeout#handle\relax}
+
+%D \macros
+%D {writeln}
+%D
+%D This saves a few tokens:
+
+\permanent\def\writeln#handle{\write#handle{}}
+
+%D \macros
+%D {pushendofline,popendofline}
+%D
+%D When we are loading files in the middle of the typesetting process, for instance
+%D when we load references, we have to be sure that the reading process does not
+%D generate so called 'spurious spaces'. This can be prevented by assigning the line
+%D ending character the \CATCODE\ comment. This is accomplished by
+%D
+%D \starttyping
+%D \pushendofline
+%D ... reading ...
+%D \popendofline
+%D \stoptyping
+
+\installsystemnamespace{eolstack}
+
+\newcount\c_system_files_eol_level
+
+\permanent\protected\def\pushendofline
+ {\advance\c_system_files_eol_level\plusone
+ \expandafter\chardef\csname\??eolstack\number\c_system_files_eol_level\endcsname\catcode\endoflineasciicode
+ \catcode\endoflineasciicode\commentcatcode}
+
+\permanent\protected\def\popendofline
+ {\catcode\endoflineasciicode\csname\??eolstack\number\c_system_files_eol_level\endcsname
+ \advance\c_system_files_eol_level\minusone}
+
+\permanent\protected\def\restoreendofline
+ {\catcode\endoflineasciicode\endoflinecatcode}
+
+%D \macros
+%D {startreadingfile,stopreadingfile}
+%D
+%D A low level capsule:
+
+\newcount\readingfilelevel % no longer needed
+\newtoks \everystartreadingfile
+\newtoks \everystopreadingfile
+
+\permanent\protected\def\startreadingfile% beter een every en \setnormalcatcodes
+ {\global\advance\readingfilelevel\plusone
+ \the\everystartreadingfile
+ \pushcatcodetable % saveguard
+ \setcatcodetable\ctxcatcodes
+ \clf_pushregime}% temporarily this way
+
+\permanent\protected\def\stopreadingfile
+ {\popcatcodetable % saveguard
+ \clf_popregime % temporarily this way
+ \the\everystopreadingfile
+ \global\advance\readingfilelevel\minusone}
+
+%D \macros
+%D {input, normalinput}
+%D
+%D Sometimes we run into troubles when \type {\input} wants to get expanded, e.g. in
+%D a \type {\write} (which happens in the metafun manual when we permit long MP
+%D lines). So, instead of fixing that, we go for a redefinition of \type {\input}.
+%D Of course it's better to use \type {\readfile} or \type {\processfile}.
+
+\permanent\def\inputgivenfile#name{\normalinput{#name}} % expands
+
+%D \macros
+%D {doifelsefile}
+%D
+%D The next alternative only looks if a file is present. No loading is done. This
+%D one obeys the standard \TEX\ lookup.
+%D
+%D \starttyping
+%D \doiffileelse {filename} {found} {not found}
+%D \stoptyping
+
+\permanent\protected\def\doifelsefile {\clf_doifelsefileexist}
+\permanent\protected\def\doifelsepath {\clf_doifelsepathexist}
+\permanent\protected\def\doiffile #name{\clf_doifelsefileexist{#name}\firstofoneargument\gobbleoneargument}
+\permanent\protected\def\doifnotfile #name{\clf_doifelsefileexist{#name}\gobbleoneargument\firstofoneargument}
+
+\aliased\let\doiffileelse\doifelsefile
+\aliased\let\doifpathelse\doifelsepath
+
+\aliased\let\doifelsefileexists\doifelsefile
+\aliased\let\doifelsepathexists\doifelsepath
+
+\aliased\let\doiffileexistselse\doifelsefileexists
+\aliased\let\doifpathexistselse\doifelsepathexists
+
+%D \macros
+%D {doifparentfileelse}
+%D
+%D \starttyping
+%D \doifparentfileelse{filename}{yes}{no}
+%D \stoptyping
+
+\ifdefined\outputfilename \else \def\outputfilename{\jobname} \fi
+
+\permanent\protected\def\doifelseparentfile{\clf_doifelseparentfile}
+
+\aliased\let\doifparentfileelse\doifelseparentfile
+
+%D \macros
+%D {splitfilename}
+%D
+%D \startbuffer
+%D \def\showfilesplit
+%D {\bgroup \tttf
+%D \hbox{(full: \splitofffull)}\space
+%D \hbox{(path: \splitoffpath)}\space
+%D \hbox{(base: \splitoffbase)}\space
+%D \hbox{(name: \splitoffname)}\space
+%D \hbox{(type: \splitofftype)}\space
+%D \egroup}
+%D
+%D \splitfilename{c:/aa/bb/cc/dd.ee.ff} \showfilesplit \endgraf
+%D \splitfilename{c:/aa/bb/cc/dd.ee} \showfilesplit \endgraf
+%D \splitfilename{c:/aa/bb/cc/dd} \showfilesplit \endgraf
+%D
+%D \splitfilename{dd.ee.ff} \showfilesplit \endgraf
+%D \splitfilename{dd.ee} \showfilesplit \endgraf
+%D \splitfilename{dd} \showfilesplit \endgraf
+%D \stopbuffer
+%D
+%D \start \typebuffer \getbuffer \stop
+
+\newconstant\kindoffile % 0=normal 1=full path spec (or http) / set at the lua end
+\newconstant\splitoffkind
+
+\mutable\def\splitoffroot{.}
+\mutable\let\splitofffull\empty
+\mutable\let\splitoffpath\empty
+\mutable\let\splitoffbase\empty
+\mutable\let\splitoffname\empty
+\mutable\let\splitofftype\empty
+
+\permanent\protected\def\splitfilename{\clf_splitfilename}
+
+%D \macros
+%D {doonlyonce, doinputonce, doendinputonce}
+%D
+%D Especially macropackages need only be loaded once. Repetitive loading not only
+%D costs time, relocating registers often leads to abortion of the processing
+%D because \TEX's capacity is limited. One can prevent multiple execution and
+%D loading by using one of both:
+%D
+%D \starttyping
+%D \doonlyonce{actions}
+%D \doinputonce{filename}
+%D \doendinputonce{filename}
+%D \stoptyping
+%D
+%D This command obeys the standard method for locating files. We could move this
+%D function to the \LUA\ end.
+
+\installsystemnamespace{fileonce}
+
+\permanent\protected\def\doonlyonce#whatever%
+ {\ifcsname\??fileonce#whatever\endcsname
+ \expandafter\gobbleoneargument
+ \else
+ \letgvalue{\??fileonce#whatever}\relax
+ \expandafter\firstofoneargument
+ \fi}
+
+\permanent\protected\def\doinputonce#name%
+ {\doonlyonce{#name}{\doifelsefile{#name}{\inputgivenfile{#name}}\donothing}}
+
+\permanent\protected\def\doendinputonce#name%
+ {\ifcsname\??fileonce#name\endcsname
+ \expandafter\endinput
+ \fi}
+
+\permanent\protected\def\forgetdoingonce#whatever%
+ {\global\undefinevalue{\??fileonce#whatever}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-job.lmt b/Master/texmf-dist/tex/context/base/mkxl/file-job.lmt
new file mode 100644
index 00000000000..95ad48e824b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-job.lmt
@@ -0,0 +1,1283 @@
+if not modules then modules = { } end modules ['file-job'] = {
+ version = 1.001,
+ comment = "companion to file-job.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- in retrospect dealing it's not that bad to deal with the nesting
+-- and push/poppign at the tex end
+
+local next, rawget, tostring, tonumber = next, rawget, tostring, tonumber
+local gsub, match, find = string.gsub, string.match, string.find
+local insert, remove, concat = table.insert, table.remove, table.concat
+local validstring, formatters = string.valid, string.formatters
+local sortedhash = table.sortedhash
+local setmetatableindex, setmetatablenewindex = table.setmetatableindex, table.setmetatablenewindex
+
+local commands = commands
+local resolvers = resolvers
+local context = context
+
+local ctx_doifelse = commands.doifelse
+
+local implement = interfaces.implement
+
+local trace_jobfiles = false trackers.register("system.jobfiles", function(v) trace_jobfiles = v end)
+
+local report = logs.reporter("system")
+local report_jobfiles = logs.reporter("system", "jobfiles")
+local report_functions = logs.reporter("system", "functions")
+
+local texsetcount = tex.setcount
+local elements = interfaces.elements
+local constants = interfaces.constants
+local variables = interfaces.variables
+local settings_to_array = utilities.parsers.settings_to_array
+local allocate = utilities.storage.allocate
+
+local nameonly = file.nameonly
+local suffixonly = file.suffix
+local basename = file.basename
+local addsuffix = file.addsuffix
+local removesuffix = file.removesuffix
+local dirname = file.dirname
+local is_qualified_path = file.is_qualified_path
+
+local cleanpath = resolvers.cleanpath
+local toppath = resolvers.toppath
+local resolveprefix = resolvers.resolve
+
+local hasscheme = url.hasscheme
+
+local jobresolvers = resolvers.jobs
+
+local registerextrapath = resolvers.registerextrapath
+local resetextrapaths = resolvers.resetextrapaths
+local getextrapaths = resolvers.getextrapath
+local pushextrapath = resolvers.pushextrapath
+local popextrapath = resolvers.popextrapath
+
+----- v_outer = variables.outer
+local v_text = variables.text
+local v_project = variables.project
+local v_environment = variables.environment
+local v_product = variables.product
+local v_component = variables.component
+local v_yes = variables.yes
+
+-- main code .. there is some overlap .. here we have loc://
+
+local function findctxfile(name) -- loc ? any ?
+ if is_qualified_path(name) then -- maybe when no suffix do some test for tex
+ return name
+ elseif not hasscheme(name) then
+ return resolvers.finders.byscheme("loc",name) or ""
+ else
+ return resolvers.findtexfile(name) or ""
+ end
+end
+
+resolvers.findctxfile = findctxfile
+
+implement {
+ name = "processfile",
+ arguments = "string",
+ public = true,
+ protected = true,
+ actions = function(name)
+ name = findctxfile(name)
+ if name ~= "" then
+ context.input(name)
+ end
+ end
+}
+
+implement {
+ name = "doifelseinputfile",
+ arguments = "string",
+ public = true,
+ protected = true,
+ actions = function(name)
+ ctx_doifelse(findctxfile(name) ~= "")
+ end
+}
+
+implement {
+ name = "locatefilepath",
+ arguments = "string",
+ actions = function(name)
+ context(dirname(findctxfile(name)))
+ end
+}
+
+implement {
+ name = "usepath",
+ arguments = "optional",
+ public = true,
+ protected = true,
+ actions = function(paths)
+ report_jobfiles("using path: %s",paths)
+ registerextrapath(paths)
+ end
+}
+
+implement {
+ name = "pushpath",
+ arguments = "optional",
+ public = true,
+ protected = true,
+ actions = function(paths)
+ report_jobfiles("pushing path: %s",paths)
+ pushextrapath(paths)
+ end
+}
+
+implement {
+ name = "poppath",
+ public = true,
+ protected = true,
+ actions = function(paths)
+ popextrapath()
+ report_jobfiles("popping path")
+ end
+}
+
+implement {
+ name = "usesubpath",
+ arguments = "optional",
+ public = true,
+ protected = true,
+ actions = function(subpaths)
+ report_jobfiles("using subpath: %s",subpaths)
+ registerextrapath(nil,subpaths)
+ end
+}
+
+implement {
+ name = "resetpath",
+ public = true,
+ protected = true,
+ actions = function()
+ report_jobfiles("resetting path")
+ resetextrapaths()
+ end
+}
+
+implement {
+ name = "allinputpaths",
+ public = true,
+ actions = function()
+ context(concat(getextrapaths(),","))
+ end
+}
+
+implement {
+ name = "usezipfile",
+ public = true,
+ protected = true,
+ arguments = { "optional", "optional" },
+ actions = function(name,tree)
+ if tree and tree ~= "" then
+ resolvers.usezipfile(formatters["zip:///%s?tree=%s"](name,tree))
+ else
+ resolvers.usezipfile(formatters["zip:///%s"](name))
+ end
+ end
+}
+
+-- moved from tex to lua:
+
+local texpatterns = { "%s.mkvi", "%s.mkiv", "%s.mklx", "%s.mkxl", "%s.tex" }
+local luapatterns = { "%s" .. utilities.lua.suffixes.luc, "%s.lua", "%s.lmt" }
+local cldpatterns = { "%s.cld" }
+local xmlpatterns = { "%s.xml" }
+
+local uselibrary = resolvers.uselibrary
+local input = context.input
+
+-- status
+--
+-- these need to be synced with input stream:
+
+local processstack = { }
+local processedfile = ""
+local processedfiles = { }
+
+implement {
+ name = "processedfile",
+ actions = function()
+ context(processedfile)
+ end
+}
+
+implement {
+ name = "processedfiles",
+ actions = function()
+ context(concat(processedfiles,","))
+ end
+}
+
+implement {
+ name = "dostarttextfile",
+ public = true,
+ protected = true,
+ arguments = "string",
+ actions = function(name)
+ insert(processstack,name)
+ processedfile = name
+ insert(processedfiles,name)
+ end
+}
+
+implement {
+ name = "dostoptextfile",
+ public = true,
+ protected = true,
+ actions = function()
+ processedfile = remove(processstack) or ""
+ end
+}
+
+local function startprocessing(name,notext)
+ if not notext then
+ -- report("begin file %a at line %a",name,status.linenumber or 0)
+ context.dostarttextfile(name)
+ end
+end
+
+local function stopprocessing(notext)
+ if not notext then
+ context.dostoptextfile()
+ -- report("end file %a at line %a",name,status.linenumber or 0)
+ end
+end
+
+--
+
+local typestack = { }
+local currenttype = v_text
+local nofmissing = 0
+local missing = {
+ tex = setmetatableindex("number"),
+ lua = setmetatableindex("number"),
+ cld = setmetatableindex("number"),
+ xml = setmetatableindex("number"),
+}
+
+local function reportfailure(kind,name)
+ nofmissing = nofmissing + 1
+ missing[kind][name] = true
+ report_jobfiles("unknown %s file %a",kind,name)
+end
+
+--
+
+local function action(name,foundname)
+ input(foundname)
+end
+local function failure(name,foundname)
+ reportfailure("tex",name)
+end
+local function usetexfile(name,onlyonce,notext)
+ startprocessing(name,notext)
+ uselibrary {
+ name = name,
+ patterns = texpatterns,
+ action = action,
+ failure = failure,
+ onlyonce = onlyonce,
+ }
+ stopprocessing(notext)
+end
+
+local function action(name,foundname)
+ dofile(foundname)
+end
+local function failure(name,foundname)
+ reportfailure("lua",name)
+end
+local function useluafile(name,onlyonce,notext)
+ uselibrary {
+ name = name,
+ patterns = luapatterns,
+ action = action,
+ failure = failure,
+ onlyonce = onlyonce,
+ }
+end
+
+local function action(name,foundname)
+ dofile(foundname)
+end
+local function failure(name,foundname)
+ reportfailure("cld",name)
+end
+local function usecldfile(name,onlyonce,notext)
+ startprocessing(name,notext)
+ uselibrary {
+ name = name,
+ patterns = cldpatterns,
+ action = action,
+ failure = failure,
+ onlyonce = onlyonce,
+ }
+ stopprocessing(notext)
+end
+
+local function action(name,foundname)
+ context.xmlprocess(foundname,"main","")
+end
+local function failure(name,foundname)
+ reportfailure("xml",name)
+end
+local function usexmlfile(name,onlyonce,notext)
+ startprocessing(name,notext)
+ uselibrary {
+ name = name,
+ patterns = xmlpatterns,
+ action = action,
+ failure = failure,
+ onlyonce = onlyonce,
+ }
+ stopprocessing(notext)
+end
+
+local suffixes = {
+ mkvi = usetexfile,
+ mkiv = usetexfile,
+ mklx = usetexfile,
+ mkxl = usetexfile,
+ tex = usetexfile,
+ luc = useluafile,
+ lua = useluafile,
+ cld = usecldfile,
+ xml = usexmlfile,
+ [""] = usetexfile,
+}
+
+local function useanyfile(name,onlyonce)
+ local s = suffixes[suffixonly(name)]
+ context(function() resolvers.pushpath(name) end)
+ if s then
+ -- s(removesuffix(name),onlyonce)
+ s(name,onlyonce) -- so, first with suffix, then without
+ else
+ usetexfile(name,onlyonce) -- e.g. ctx file
+ -- resolvers.readfilename(name)
+ end
+ context(resolvers.poppath)
+end
+
+implement { name = "loadtexfile", public = true, protected = true, actions = usetexfile, arguments = "optional" }
+implement { name = "loadluafile", public = true, protected = true, actions = useluafile, arguments = "optional" }
+implement { name = "loadcldfile", public = true, protected = true, actions = usecldfile, arguments = "optional" }
+implement { name = "loadxmlfile", public = true, protected = true, actions = usexmlfile, arguments = "optional" }
+
+implement { name = "loadtexfileonce", public = true, protected = true, actions = usetexfile, arguments = { "optional", true } }
+implement { name = "loadluafileonce", public = true, protected = true, actions = useluafile, arguments = { "optional", true } }
+implement { name = "loadcldfileonce", public = true, protected = true, actions = usecldfile, arguments = { "optional", true } }
+implement { name = "loadxmlfileonce", public = true, protected = true, actions = usexmlfile, arguments = { "optional", true } }
+
+implement { name = "useanyfile", actions = useanyfile, arguments = "string" }
+implement { name = "useanyfileonce", actions = useanyfile, arguments = { "string", true } }
+
+function jobresolvers.usefile(name,onlyonce,notext)
+ local s = suffixes[suffixonly(name)]
+ if s then
+ -- s(removesuffix(name),onlyonce,notext)
+ s(name,onlyonce,notext) -- so, first with suffix, then without
+ end
+end
+
+-- document structure
+
+local textlevel = 0 -- inaccessible for user, we need to define counter textlevel at the tex end
+
+local function dummyfunction() end
+
+local function startstoperror()
+ report("invalid \\%s%s ... \\%s%s structure",elements.start,v_text,elements.stop,v_text)
+ startstoperror = dummyfunction
+end
+
+local stopped
+
+local function starttext()
+ if textlevel == 0 then
+ if trace_jobfiles then
+ report_jobfiles("starting text")
+ end
+ context.dostarttext()
+ end
+ textlevel = textlevel + 1
+ texsetcount("global","textlevel",textlevel)
+end
+
+local function stoptext()
+ if not stopped then
+ if textlevel == 0 then
+ startstoperror()
+ elseif textlevel > 0 then
+ textlevel = textlevel - 1
+ end
+ texsetcount("global","textlevel",textlevel)
+ if textlevel <= 0 then
+ if trace_jobfiles then
+ report_jobfiles("stopping text")
+ end
+ context.dostoptext()
+ stopped = true
+ end
+ end
+end
+
+implement {
+ name = "starttext",
+ public = true,
+ protected = true,
+ actions = starttext
+}
+
+implement {
+ name = "stoptext",
+ public = true,
+ protected = true,
+ actions = stoptext
+}
+
+implement {
+ name = "forcequitjob",
+ arguments = "string",
+ public = true,
+ protected = true,
+ actions = function(reason)
+ if reason then
+ report("forcing quit: %s",reason)
+ else
+ report("forcing quit")
+ end
+ context.batchmode()
+ while textlevel >= 0 do
+ context.stoptext()
+ end
+ end
+}
+
+implement {
+ name = "forceendjob",
+ public = true,
+ protected = true,
+ actions = function()
+ report([[don't use \end to finish a document]])
+ context.stoptext()
+ end
+}
+
+implement {
+ name = "autostarttext",
+ public = true,
+ protected = true,
+ actions = function()
+ if textlevel == 0 then
+ report([[auto \starttext ... \stoptext]])
+ end
+ context.starttext()
+ end
+}
+
+implement {
+ name = "autostoptext",
+ public = true,
+ protected = true,
+ actions = stoptext
+}
+
+-- project structure
+
+implement {
+ name = "processfilemany",
+ public = true,
+ protected = true,
+ arguments = { "string", false },
+ actions = useanyfile
+}
+
+implement {
+ name = "processfileonce",
+ public = true,
+ protected = true,
+ arguments = { "string", true },
+ actions = useanyfile
+}
+
+implement {
+ name = "processfilenone",
+ arguments = "string",
+ public = true,
+ protected = true,
+ actions = dummyfunction,
+}
+
+local tree = { type = "text", name = "", branches = { } }
+local treestack = { }
+local top = tree.branches
+local root = tree
+
+local project_stack = { }
+local product_stack = { }
+local component_stack = { }
+local environment_stack = { }
+
+local stacks = {
+ [v_project ] = project_stack,
+ [v_product ] = product_stack,
+ [v_component ] = component_stack,
+ [v_environment] = environment_stack,
+}
+
+--
+
+local function pushtree(what,name)
+ local t = { }
+ top[#top+1] = { type = what, name = name, branches = t }
+ insert(treestack,top)
+ top = t
+end
+
+local function poptree()
+ top = remove(treestack)
+ -- inspect(top)
+end
+
+do
+
+ local function log_tree(report,top,depth)
+ report("%s%s: %s",depth,top.type,top.name)
+ local branches = top.branches
+ if #branches > 0 then
+ depth = depth .. " "
+ for i=1,#branches do
+ log_tree(report,branches[i],depth)
+ end
+ end
+ end
+
+ logs.registerfinalactions(function()
+ root.name = environment.jobname
+ --
+ logs.startfilelogging(report,"used files")
+ log_tree(report,root,"")
+ logs.stopfilelogging()
+ --
+ if nofmissing > 0 and logs.loggingerrors() then
+ logs.starterrorlogging(report,"missing files")
+ for kind, list in sortedhash(missing) do
+ for name in sortedhash(list) do
+ report("%w%s %s",6,kind,name)
+ end
+ end
+ logs.stoperrorlogging()
+ end
+ end)
+
+end
+
+local jobstructure = job.structure or { }
+job.structure = jobstructure
+jobstructure.collected = jobstructure.collected or { }
+jobstructure.tobesaved = root
+jobstructure.components = { }
+
+local function initialize()
+ local function collect(root,result)
+ local branches = root.branches
+ if branches then
+ for i=1,#branches do
+ local branch = branches[i]
+ if branch.type == "component" then
+ result[#result+1] = branch.name
+ end
+ collect(branch,result)
+ end
+ end
+ return result
+ end
+ jobstructure.components = collect(jobstructure.collected,{})
+end
+
+job.register('job.structure.collected',root,initialize)
+
+-- component: small unit, either or not components itself
+-- product : combination of components
+
+local ctx_processfilemany = context.processfilemany
+local ctx_processfileonce = context.processfileonce
+local ctx_processfilenone = context.processfilenone
+
+-- we need a plug in the nested loaded, push pop pseudo current dir
+
+local function processfilecommon(name,action)
+ -- experiment, might go away
+-- if not hasscheme(name) then
+-- local path = dirname(name)
+-- if path ~= "" then
+-- registerextrapath(path)
+-- report_jobfiles("adding search path %a",path)
+-- end
+-- end
+ -- till here
+ action(name)
+end
+
+local function processfilemany(name) processfilecommon(name,ctx_processfilemany) end
+local function processfileonce(name) processfilecommon(name,ctx_processfileonce) end
+local function processfilenone(name) processfilecommon(name,ctx_processfilenone) end
+
+local processors = utilities.storage.allocate {
+ -- [v_outer] = {
+ -- [v_text] = { "many", processfilemany },
+ -- [v_project] = { "once", processfileonce },
+ -- [v_environment] = { "once", processfileonce },
+ -- [v_product] = { "once", processfileonce },
+ -- [v_component] = { "many", processfilemany },
+ -- },
+ [v_text] = {
+ [v_text] = { "many", processfilemany },
+ [v_project] = { "once", processfileonce }, -- dubious
+ [v_environment] = { "once", processfileonce },
+ [v_product] = { "many", processfilemany }, -- dubious
+ [v_component] = { "many", processfilemany },
+ },
+ [v_project] = {
+ [v_text] = { "many", processfilemany },
+ [v_project] = { "none", processfilenone },
+ [v_environment] = { "once", processfileonce },
+ [v_product] = { "none", processfilenone },
+ [v_component] = { "none", processfilenone },
+ },
+ [v_environment] = {
+ [v_text] = { "many", processfilemany },
+ [v_project] = { "none", processfilenone },
+ [v_environment] = { "once", processfileonce },
+ [v_product] = { "none", processfilenone },
+ [v_component] = { "none", processfilenone },
+ },
+ [v_product] = {
+ [v_text] = { "many", processfilemany },
+ [v_project] = { "once", processfileonce },
+ [v_environment] = { "once", processfileonce },
+ [v_product] = { "many", processfilemany },
+ [v_component] = { "many", processfilemany },
+ },
+ [v_component] = {
+ [v_text] = { "many", processfilemany },
+ [v_project] = { "once", processfileonce },
+ [v_environment] = { "once", processfileonce },
+ [v_product] = { "none", processfilenone },
+ [v_component] = { "many", processfilemany },
+ }
+}
+
+local start = {
+ [v_text] = nil,
+ [v_project] = nil,
+ [v_environment] = context.startreadingfile,
+ [v_product] = context.starttext,
+ [v_component] = context.starttext,
+}
+
+local stop = {
+ [v_text] = nil,
+ [v_project] = nil,
+ [v_environment] = context.stopreadingfile,
+ [v_product] = context.stoptext,
+ [v_component] = context.stoptext,
+}
+
+jobresolvers.processors = processors
+
+local function topofstack(what)
+ local stack = stacks[what]
+ return stack and stack[#stack] or environment.jobname
+end
+
+local function productcomponent() -- only when in product
+ local product = product_stack[#product_stack]
+ if product and product ~= "" then
+ local component = component_stack[1]
+ if component and component ~= "" then
+ return component
+ end
+ end
+end
+
+local function justacomponent()
+ local product = product_stack[#product_stack]
+ if not product or product == "" then
+ local component = component_stack[1]
+ if component and component ~= "" then
+ return component
+ end
+ end
+end
+
+jobresolvers.productcomponent = productcomponent
+jobresolvers.justacomponent = justacomponent
+
+function jobresolvers.currentproject () return topofstack(v_project ) end
+function jobresolvers.currentproduct () return topofstack(v_product ) end
+function jobresolvers.currentcomponent () return topofstack(v_component ) end
+function jobresolvers.currentenvironment() return topofstack(v_environment) end
+
+local done = { }
+local tolerant = false -- too messy, mkii user with the wrong structure should adapt
+
+local function process(what,name)
+ local depth = #typestack
+ local process
+ --
+ name = resolveprefix(name)
+ --
+-- if not tolerant then
+ -- okay, would be best but not compatible with mkii
+ process = processors[currenttype][what]
+-- elseif depth == 0 then
+-- -- could be a component, product or (brr) project
+-- if trace_jobfiles then
+-- report_jobfiles("%s : %s > %s (case 1)",depth,currenttype,v_outer)
+-- end
+-- process = processors[v_outer][what]
+-- elseif depth == 1 and typestack[1] == v_text then
+-- -- we're still not doing a component or product
+-- if trace_jobfiles then
+-- report_jobfiles("%s : %s > %s (case 2)",depth,currenttype,v_outer)
+-- end
+-- process = processors[v_outer][what]
+-- else
+-- process = processors[currenttype][what]
+-- end
+ if process then
+ local method = process[1]
+ if method == "none" then
+ if trace_jobfiles then
+ report_jobfiles("%s : %s : %s %s %a in %s %a",depth,method,"ignoring",what,name,currenttype,topofstack(currenttype))
+ end
+ elseif method == "once" and done[name] then
+ if trace_jobfiles then
+ report_jobfiles("%s : %s : %s %s %a in %s %a",depth,method,"skipping",what,name,currenttype,topofstack(currenttype))
+ end
+ else
+ -- keep in mind that we also handle "once" at the file level
+ -- so there is a double catch
+ done[name] = true
+ local before = start[what]
+ local after = stop [what]
+ if trace_jobfiles then
+ report_jobfiles("%s : %s : %s %s %a in %s %a",depth,method,"processing",what,name,currenttype,topofstack(currenttype))
+ end
+ if before then
+ before()
+ end
+ process[2](name)
+ if after then
+ after()
+ end
+ end
+ else
+ if trace_jobfiles then
+ report_jobfiles("%s : %s : %s %s %a in %s %a",depth,"none","ignoring",what,name,currenttype,topofstack(currenttype))
+ end
+ end
+end
+
+local scan_delimited = tokens.scanners.delimited
+
+local function getname()
+ return scan_delimited(91,93) or scan_delimited(0,32) -- [name] or name<space>
+end
+
+implement { name = "project", public = true, protected = true, actions = function() process(v_project, getname()) end }
+implement { name = "environment", public = true, protected = true, actions = function() process(v_environment,getname()) end }
+implement { name = "product", public = true, protected = true, actions = function() process(v_product, getname()) end } -- will be overloaded
+implement { name = "component", public = true, protected = true, actions = function() process(v_component, getname()) end }
+
+implement { name = "useproject", public = true, protected = true, actions = function(name) process(v_project, name) end, arguments = "optional" }
+implement { name = "useenvironment", public = true, protected = true, actions = function(name) process(v_environment,name) end, arguments = "optional" }
+implement { name = "useproduct", public = true, protected = true, actions = function(name) process(v_product, name) end, arguments = "optional" } -- will be overloaded
+implement { name = "usecomponent", public = true, protected = true, actions = function(name) process(v_component, name) end, arguments = "optional" }
+
+-- todo: setsystemmode to currenttype
+-- todo: make start/stop commands at the tex end
+
+local start = {
+ [v_project] = context.startprojectindeed,
+ [v_product] = context.startproductindeed,
+ [v_component] = context.startcomponentindeed,
+ [v_environment] = context.startenvironmentindeed,
+}
+
+local stop = {
+ [v_project] = context.stopprojectindeed,
+ [v_product] = context.stopproductindeed,
+ [v_component] = context.stopcomponentindeed,
+ [v_environment] = context.stopenvironmentindeed,
+}
+
+local function gotonextlevel(what,name) -- todo: something with suffix name
+ insert(stacks[what],name)
+ insert(typestack,currenttype)
+ currenttype = what
+ pushtree(what,name)
+ if start[what] then
+ start[what]()
+ end
+end
+
+local function gotopreviouslevel(what)
+ if stop[what] then
+ stop[what]()
+ end
+ poptree()
+ currenttype = remove(typestack) or v_text
+ remove(stacks[what]) -- not currenttype ... weak recovery
+context.endinput() -- does not work
+-- context.signalendofinput(what)
+end
+
+local function autoname()
+ local name = scan_delimited(91,93) or scan_delimited(0,32) -- [name] or name<space>
+ if name == "*" then
+ name = nameonly(toppath() or name)
+ end
+ 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 = "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 = "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 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+--
+-- <?xml version='1.0' standalone='yes'?>
+-- <exa:variables xmlns:exa='htpp://www.pragma-ade.com/schemas/exa-variables.rng'>
+-- <exa:variable label='mode:pragma'>nee</exa:variable>
+-- <exa:variable label='mode:variant'>standaard</exa:variable>
+-- </exa:variables>
+--
+-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+local report_examodes = logs.reporter("system","examodes")
+
+local function convertexamodes(str)
+ local x = xml.convert(str)
+ for e in xml.collected(x,"exa:variable") do
+ local label = e.at and e.at.label
+ if label and label ~= "" then
+ local data = xml.text(e)
+ local mode = match(label,"^mode:(.+)$")
+ if mode then
+ context.enablemode { formatters["%s:%s"](mode,data) }
+ end
+ context.setvariable("exa:variables",label,(gsub(data,"([{}])","\\%1")))
+ end
+ end
+end
+
+function environment.loadexamodes(filename)
+ if not filename or filename == "" then
+ filename = removesuffix(tex.jobname)
+ end
+ filename = resolvers.findfile(addsuffix(filename,'ctm')) or ""
+ if filename ~= "" then
+ report_examodes("loading %a",filename) -- todo: message system
+ convertexamodes(io.loaddata(filename))
+ else
+ report_examodes("no mode file %a",filename) -- todo: message system
+ end
+end
+
+implement {
+ name = "loadexamodes",
+ actions = environment.loadexamodes,
+ public = true,
+ protected = true,
+ arguments = "optional"
+}
+
+-- changed in mtx-context
+-- code moved from luat-ini
+
+-- todo: locals when mtx-context is changed
+
+document = document or {
+ arguments = allocate(),
+ files = allocate(),
+ variables = allocate(), -- for templates
+ options = {
+ commandline = {
+ environments = allocate(),
+ modules = allocate(),
+ modes = allocate(),
+ },
+ ctxfile = {
+ environments = allocate(),
+ modules = allocate(),
+ modes = allocate(),
+ },
+ },
+ functions = table.setmetatablenewindex(function(t,k,v)
+ if rawget(t,k) then
+ report_functions("overloading document function %a",k)
+ end
+ rawset(t,k,v)
+ return v
+ end),
+}
+
+function document.setargument(key,value)
+ document.arguments[key] = value
+end
+
+function document.setdefaultargument(key,default)
+ local v = document.arguments[key]
+ if v == nil or v == "" then
+ document.arguments[key] = default
+ end
+end
+
+function document.setfilename(i,name)
+ if name then
+ document.files[tonumber(i)] = name
+ else
+ document.files[#document.files+1] = tostring(i)
+ end
+end
+
+function document.getargument(key,default)
+ local v = document.arguments[key]
+ if type(v) == "boolean" then
+ v = (v and "yes") or "no"
+ document.arguments[key] = v
+ end
+ return v or default or ""
+end
+
+function document.getfilename(i)
+ return document.files[tonumber(i)] or ""
+end
+
+implement {
+ name = "setdocumentargument",
+ actions = document.setargument,
+ arguments = "2 strings"
+}
+
+implement {
+ name = "setdocumentdefaultargument",
+ actions = document.setdefaultargument,
+ arguments = "2 strings"
+}
+
+implement {
+ name = "setdocumentfilename",
+ actions = document.setfilename,
+ arguments = { "integer", "string" }
+}
+
+implement {
+ name = "getdocumentargument",
+ actions = { document.getargument, context },
+ arguments = "2 strings"
+}
+
+implement {
+ name = "getdocumentfilename",
+ actions = { document.getfilename, context },
+ arguments = "integer"
+}
+
+function document.setcommandline() -- has to happen at the tex end in order to expand
+
+ -- the document[arguments|files] tables are copies
+
+ local arguments = document.arguments
+ local files = document.files
+ local options = document.options
+
+ for k, v in next, environment.arguments do
+ k = gsub(k,"^c:","") -- already done, but better be safe than sorry
+ if arguments[k] == nil then
+ arguments[k] = v
+ end
+ end
+
+ -- in the new mtx=context approach we always pass a stub file so we need to
+ -- to trick the files table which actually only has one entry in a tex job
+
+ if arguments.timing then
+ context.usemodule { "timing" }
+ end
+
+ if arguments.usage then
+ trackers.enable("system.usage")
+ end
+
+ if arguments.batchmode then
+ context.batchmode(false)
+ end
+
+ if arguments.nonstopmode then
+ context.nonstopmode(false)
+ end
+
+ if arguments.nostatistics then
+ directives.enable("system.nostatistics")
+ end
+
+ if arguments.paranoid then
+ context.setvalue("maxreadlevel",1)
+ end
+
+ if validstring(arguments.path) then
+ context.usepath { arguments.path }
+ end
+
+ if arguments.export then
+ context.setupbackend { export = v_yes }
+ end
+
+ local inputfile = validstring(arguments.input)
+
+ if inputfile and dirname(inputfile) == "." and lfs.isfile(inputfile) then
+ -- nicer in checks
+ inputfile = basename(inputfile)
+ end
+
+ local forcedruns = arguments.forcedruns
+ local kindofrun = arguments.kindofrun
+ local currentrun = arguments.currentrun
+ local maxnofruns = arguments.maxnofruns or arguments.runs
+
+ -- context.setupsystem {
+ -- [constants.directory] = validstring(arguments.setuppath),
+ -- [constants.inputfile] = inputfile,
+ -- [constants.file] = validstring(arguments.result),
+ -- [constants.random] = validstring(arguments.randomseed),
+ -- -- old:
+ -- [constants.n] = validstring(kindofrun),
+ -- [constants.m] = validstring(currentrun),
+ -- }
+
+ context.setupsystem {
+ directory = validstring(arguments.setuppath),
+ inputfile = inputfile,
+ file = validstring(arguments.result),
+ random = validstring(arguments.randomseed),
+ -- old:
+ n = validstring(kindofrun),
+ m = validstring(currentrun),
+ }
+
+ forcedruns = tonumber(forcedruns) or 0
+ kindofrun = tonumber(kindofrun) or 0
+ maxnofruns = tonumber(maxnofruns) or 0
+ currentrun = tonumber(currentrun) or 0
+
+ local prerollrun = forcedruns > 0 and currentrun > 0 and currentrun < forcedruns
+
+ environment.forcedruns = forcedruns
+ environment.kindofrun = kindofrun
+ environment.maxnofruns = maxnofruns
+ environment.currentrun = currentrun
+ environment.prerollrun = prerollrun
+
+ context.setconditional("prerollrun",prerollrun)
+
+ if validstring(arguments.arguments) then
+ context.setupenv { arguments.arguments }
+ end
+
+ if arguments.once then
+ directives.enable("system.runonce")
+ end
+
+ if arguments.noarrange then
+ context.setuparranging { variables.disable }
+ end
+
+ --
+
+ local commandline = options.commandline
+
+ commandline.environments = table.append(commandline.environments,settings_to_array(validstring(arguments.environment)))
+ commandline.modules = table.append(commandline.modules, settings_to_array(validstring(arguments.usemodule)))
+ commandline.modes = table.append(commandline.modes, settings_to_array(validstring(arguments.mode)))
+
+ --
+
+ if #files == 0 then
+ local list = settings_to_array(validstring(arguments.files))
+ if list and #list > 0 then
+ files = list
+ end
+ end
+
+ if #files == 0 then
+ files = { validstring(arguments.input) }
+ end
+
+ --
+
+ document.arguments = arguments
+ document.files = files
+
+end
+
+-- commandline wins over ctxfile
+
+local function apply(list,action)
+ if list then
+ for i=1,#list do
+ action { list[i] }
+ end
+ end
+end
+
+function document.setmodes() -- was setup: *runtime:modes
+ apply(document.options.ctxfile .modes,context.enablemode)
+ apply(document.options.commandline.modes,context.enablemode)
+end
+
+function document.setmodules() -- was setup: *runtime:modules
+ apply(document.options.ctxfile .modules,context.usemodule)
+ apply(document.options.commandline.modules,context.usemodule)
+end
+
+function document.setenvironments() -- was setup: *runtime:environments
+ apply(document.options.ctxfile .environments,context.environment)
+ apply(document.options.commandline.environments,context.environment)
+end
+
+function document.setfilenames()
+ local initialize = environment.initializefilenames
+ if initialize then
+ initialize()
+ else
+ -- fatal error
+ end
+end
+
+implement { name = "setdocumentcommandline", actions = document.setcommandline, onlyonce = true }
+implement { name = "setdocumentmodes", actions = document.setmodes, onlyonce = true }
+implement { name = "setdocumentmodules", actions = document.setmodules, onlyonce = true }
+implement { name = "setdocumentenvironments", actions = document.setenvironments, onlyonce = true }
+implement { name = "setdocumentfilenames", actions = document.setfilenames, onlyonce = true }
+
+do
+
+ logs.registerfinalactions(function()
+ local foundintrees = resolvers.foundintrees()
+ if #foundintrees > 0 then
+ logs.startfilelogging(report,"used files")
+ for i=1,#foundintrees do
+ report("%4i: % T",i,foundintrees[i])
+ end
+ logs.stopfilelogging()
+ end
+ end)
+
+ logs.registerfinalactions(function()
+ local files = document.files -- or environment.files
+ local arguments = document.arguments -- or environment.arguments
+ --
+ logs.startfilelogging(report,"commandline options")
+ if arguments and next(arguments) then
+ for argument, value in sortedhash(arguments) do
+ report("%s=%A",argument,value)
+ end
+ else
+ report("no arguments")
+ end
+ logs.stopfilelogging()
+ --
+ logs.startfilelogging(report,"commandline files")
+ if files and #files > 0 then
+ for i=1,#files do
+ report("% 4i: %s",i,files[i])
+ end
+ else
+ report("no files")
+ end
+ logs.stopfilelogging()
+ end)
+
+end
+
+if environment.initex then
+
+ logs.registerfinalactions(function()
+ local startfilelogging = logs.startfilelogging
+ local stopfilelogging = logs.stopfilelogging
+ startfilelogging(report,"stored tables")
+ for k,v in sortedhash(storage.data) do
+ report("%03i %s",k,v[1])
+ end
+ stopfilelogging()
+ startfilelogging(report,"stored modules")
+ for k,v in sortedhash(lua.bytedata) do
+ report("%03i %s %s",k,v.name)
+ end
+ stopfilelogging()
+ startfilelogging(report,"stored attributes")
+ for k,v in sortedhash(attributes.names) do
+ report("%03i %s",k,v)
+ end
+ stopfilelogging()
+ startfilelogging(report,"stored catcodetables")
+ for k,v in sortedhash(catcodes.names) do
+ report("%03i % t",k,v)
+ end
+ stopfilelogging()
+ startfilelogging(report,"stored corenamespaces")
+ for k,v in sortedhash(interfaces.corenamespaces) do
+ report("%03i %s",k,v)
+ end
+ stopfilelogging()
+ end)
+
+end
+
+implement {
+ name = "continueifinputfile",
+ public = true,
+ protected = true,
+ arguments = "string",
+ actions = function(inpname,basetoo)
+ local inpnamefull = addsuffix(inpname,"tex")
+ local inpfilefull = addsuffix(environment.inputfilename,"tex")
+ local continue = inpnamefull == inpfilefull
+ -- if basetoo and not continue then
+ if not continue then
+ continue = inpnamefull == basename(inpfilefull)
+ end
+ if continue then
+ report("continuing input file %a",inpname)
+ else
+ context.endinput()
+ end
+-- ctx_doifelse(continue)
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-job.mklx b/Master/texmf-dist/tex/context/base/mkxl/file-job.mklx
new file mode 100644
index 00000000000..9fb14c9bfc2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-job.mklx
@@ -0,0 +1,361 @@
+%D \module
+%D [ file=file-job, % copied from main-001, later core-job
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Job Handling,
+%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 File Macros / Job Handling}
+
+\unprotect
+
+%D This module delegates most of the work to \LUA\ and therefore also let it
+%D define the commands, which is more efficient.
+
+\registerctxluafile{file-job}{autosuffix}
+
+%D Here are some helpers for processing and path control. In the following example
+%D the lookup order is \type {.}, {/foo}, \type {foo/bar} as one can always
+%D explicitly prefix a wanted file.
+%D
+%D \starttyping
+%D \pushpath[foo]
+%D \pushpath[foo/bar]
+%D \input test
+%D \poppath
+%D \poppath
+%D \stoptyping
+
+% \usepath [#path] % defined at lua end
+% \usesubpath [#path] % defined at lua end
+% \pushpath [#path] % defined at lua end
+% \poppath % defined at lua end
+% \resetpath % defined at lua end (not the pushed paths)
+% \allinputpaths % defined at lua end
+% \doifelseinputfile #name % defined at lua end
+% \processfile #name % defined at lua end
+
+\aliased\let\doifinputfileelse\doifelseinputfile
+
+% helper (not really needed nowadays)
+
+\mutable\let\locatedfilepath\empty
+
+\permanent\protected\def\locatefilepath#name%
+ {\edef\locatedfilepath{\clf_locatefilepath{#name}}} % todo: set at the lua end, catcodes and such
+
+% % maybe:
+%
+% % \dirlist{c:/data/temporary/foo}{images/bar.jpg}
+% % \dirfile{c:/data/temporary/foo}{images/bar.jpg}
+%
+% \def\dirlist#1#2{dirlist://#1/**/#2}
+% \def\dirfile#1#2{dirlist://#1/**/#2?option=fileonly}
+
+% zip files are tree'd
+% exa stuff might become obsolete:
+
+% \usezipfile [#zipname]#spacer[#subtree] % defined at lua end
+% \loadexamodes [#name] % defined at lua end
+
+\protected\def\syst_files_load
+ {\syst_files_load_indeed\f!newfilename % new code, to be integrated at some point, plus fixes posted on the list
+ \syst_files_load_indeed\f!locfilename % new code, somewhat experimental, not distributed (outside the dev group)
+ \syst_files_load_indeed\f!expfilename % new code, very experimental, can be engine specific, mostly for me only
+ \syst_files_load_indeed\f!sysfilename % local settings, but probably not that good an idea to use
+ %\syst_files_load_indeed\f!fntfilename % maybe some day, can load goodies and patches
+ }
+
+\def\syst_files_load_indeed#name% from now on we assume a suffix to be part of the name
+ {\readsysfile{#name}{\showmessage\m!system2{#name}}\donothing}
+
+% document structure
+
+\ifdefined\textlevel \else \newcount\textlevel \fi % might go away
+\ifdefined\strc_pagenumbers_flush_final_page \else \let\strc_pagenumbers_flush_final_page\relax \fi % ugly
+
+\permanent\protected\def\dostarttext
+ {\enforced\glet\dostarttext\relax
+ \the\everystarttext
+ \global\everystarttext\emptytoks}
+
+\permanent\protected\def\dostoptext
+ {\enforced\glet\dostoptext\relax
+ \strc_pagenumbers_flush_final_page
+ \page % hm, bonus
+ \the\everystoptext
+ \global\everystoptext\emptytoks
+ \the\everybye
+ \global\everybye\emptytoks
+ \the\everygoodbye
+ \global\everygoodbye\emptytoks
+ \doifelsesometoks\everynotabene{\writeline\the\everynotabene\writeline}\donothing
+ % tex's \end:
+ \normalend}
+
+% \starttext % defined at lua end
+% \stoptext % defined at lua end
+% \forcequitjob % defined at lua end
+% \autostarttext % defined at lua end
+% \autostoptext % defined at lua end
+
+\pushoverloadmode
+ \aliased\let\end\forceendjob
+\popoverloadmode
+
+\aliased\let\finishjob\stoptext % nicer in luatex call commandline
+
+\newtoks\everystartnotext
+\newtoks\everystopnotext
+
+\permanent\protected\def\startnotext{\the\everystartnotext}
+\permanent\protected\def\stopnotext {\the\everystopnotext\normalend}
+
+% protect structure
+
+% \processfilemany {#name} % defined at lua end
+% \processfileonce {#name} % defined at lua end
+% \processfilenone {#name} % defined at lua end
+
+% \useproject [#name] % defined at lua end
+% \useproduct [#name] % defined at lua end
+% \usecomponent [#name] % defined at lua end
+% \useenvironment [#name] % defined at lua end
+
+% \project [#name] or #name<space> % defined at lua end
+% \product [#name] or #name<space> % defined at lua end
+% \component [#name] or #name<space> % defined at lua end
+% \environment [#name] or #name<space> % defined at lua end
+
+% \startproject [#name] or #name<space> % defined at lua end
+% \startproduct [#name] or #name<space> % defined at lua end
+% \startcomponent [#name] or #name<space> % defined at lua end
+% \startenvironment [#name] or #name<space> % defined at lua end
+
+\newconditional\endofinput % hack, needed because \endinput happens one level down in the input when we write from lua
+
+% \protected\def\signalendofinput#1% argument just for tracing
+% {\global\settrue\endofinput}
+%
+% \protected\def\honorendofinput
+% {\ifconditional\endofinput
+% \global\setfalse\endofinput
+% \endinput
+% \fi}
+
+% \protected\def\stopproject {\clf_stopproject \honorendofinput} % todo
+% \protected\def\stopproduct {\clf_stopproduct \honorendofinput} % todo
+% \protected\def\stopcomponent {\clf_stopcomponent \honorendofinput} % todo
+% \protected\def\stopenvironment {\clf_stopenvironment\honorendofinput} % todo
+
+% \currentproject % defined at lua end
+% \currentproduct % defined at lua end
+% \currentcomponent % defined at lua end
+% \currentenvironment % defined at lua end
+% \processedfile % defined at lua end
+% \processedfiles % defined at lua end
+%
+% \dostarttextfile #name % defined at lua end
+% \dostoptextfile % defined at lua end
+%
+% \loadtexfile [#name] % defined at lua end
+% \loadluafile [#name] % defined at lua end
+% \loadcldfile [#name] % defined at lua end
+% \loadanyfile [#name] % defined at lua end
+%
+% \loadtexfileonce [#name] % defined at lua end
+% \loadluafileonce [#name] % defined at lua end
+% \loadcldfileonce [#name] % defined at lua end
+% \loadanyfileonce [#name] % defined at lua end
+
+%D Handy for modules that have a test/demo appended (true added).
+
+% \permanent\protected\def\continueifinputfile#name{\clf_doifelsecontinuewithfile{#name}\relax\endinput} % we cannot do \endinput via lua
+
+% \continueifinputfile #name % defined at lua end
+
+% \startproject test
+% 1: \startmode[*project] project \stopmode \endgraf
+% 2: \startmode[*product] product \stopmode \endgraf
+% \stopproject
+
+% A bit weird place:
+
+\neverypar\emptytoks
+
+%D Wrappers (the signal is a synchronization with lua hack):
+
+\newsystemmode\v!project
+\newsystemmode\v!product
+\newsystemmode\v!component
+\newsystemmode\v!environment
+
+\permanent\protected\def\startprojectindeed
+ {%starttext
+ \pushsystemmode\v!project
+ \setsystemmode\v!project}
+
+\permanent\protected\def\stopprojectindeed
+ {\popsystemmode\v!project
+ %stoptext
+ }%\signalendofinput\v!project}
+
+\permanent\protected\def\startproductindeed
+ {\starttext
+ \pushsystemmode\v!product
+ \setsystemmode\v!product}
+
+\permanent\protected\def\stopproductindeed
+ {\popsystemmode\v!product
+ \stoptext
+ }%\signalendofinput\v!product}
+
+\permanent\protected\def\startcomponentindeed
+ {\starttext
+ \pushreferenceprefix\currentcomponent
+ \pushsystemmode\v!component
+ \setsystemmode\v!component}
+
+\permanent\protected\def\stopcomponentindeed
+ {\popsystemmode\v!component
+ \popreferenceprefix
+ \stoptext
+ }%\signalendofinput\v!component}
+
+\permanent\protected\def\startenvironmentindeed
+ {\pushsystemmode\v!environment
+ \setsystemmode\v!environment}
+
+\permanent\protected\def\stopenvironmentindeed
+ {\popsystemmode\v!environment
+ }%\signalendofinput\v!environment}
+
+%D Upgraded after the ctx 2020 meeting:
+%D
+%D \starttyping
+%D \definedocument[thesis]
+%D
+%D \setupdocument[a=b,e=f]
+%D \setupdocument[thesis][a=x,c=d]
+%D
+%D % \startsetups[thesis:start]
+%D \startsetups[document:start]
+%D START
+%D \stopsetups
+%D
+%D \startsetups[thesis:stop]
+%D % \startsetups[document:stop]
+%D STOP
+%D \stopsetups
+%D
+%D % \startdocument[thesis]
+%D \startthesis
+%D (\currentdocument/a): \documentvariable{a}\par
+%D (\currentdocument/c): \documentvariable{c}\par
+%D (\currentdocument/e): \documentvariable{e}\par
+%D \stopthesis
+%D % \stopdocument
+%D \stoptyping
+
+\installcorenamespace {document}
+
+\installcommandhandler \??document \s!document \??document
+
+\setupdocument
+ [\c!before=\directsetup{\s!document:\v!start},
+ \c!after =\directsetup{\s!document:\v!stop}]
+
+% to be discussed:
+%
+% \setupdocument
+% [metadata:title=\documentvariable\c!title,
+% metadata:subject=\documentvariable\c!subtitle,
+% metadata:subtitle=\documentvariable\c!subtitle,
+% metadata:author=\documentvariable\c!author,
+% metadata:authors=\documentvariable\c!author,
+% metadata:keyword=\documentvariable\c!keyword,
+% metadata:keywords=\documentvariable\c!keyword,
+% metadata:date=\documentvariable\c!date]
+
+\def\syst_document_setup#1%
+ {\directsetup{\doifelsesetups{\currentdocument:\v!start}\currentdocument\s!document:\v!start}}
+
+\appendtoks
+ \normalexpanded {%
+ \startsetups[\currentdocument:\v!start]\noexpand\directsetup{\ifempty\currentdocumentparent\s!document\else\currentdocumentparent\fi:\v!start}\stopsetups
+ \startsetups[\currentdocument:\v!stop ]\noexpand\directsetup{\ifempty\currentdocumentparent\s!document\else\currentdocumentparent\fi:\v!stop }\stopsetups
+ \permanent\setvalue{\e!start\currentdocument}{\startdocument[\currentdocument]}%
+ \permanent\setvalue{\e!stop \currentdocument}{\stopdocument}
+ }%
+\to \everydefinedocument
+
+% todo: dostarttagged\t!document
+
+\permanent\tolerant\protected\def\startdocument[#namespace]#spacer[#settings]%
+ {\pushmacro\currentdocument
+ \ifparameters
+ \or
+ \ifhastok={#namespace}%
+ \let\currentdocument\empty
+ \setupcurrentdocument[#namespace]%
+ \else
+ \edef\currentdocument{#namespace}%
+ \fi
+ \or
+ \edef\currentdocument{#namespace}%
+ \setupcurrentdocument[#settings]%
+ \fi
+ \ifempty\currentdocument\else\setmode\currentdocument\fi
+ \starttext
+ \the\everystartdocument
+ \documentvariable\c!before}
+
+\permanent\protected\def\stopdocument % todo: dostoptagged\t!document
+ {\documentvariable\c!after
+ \the\everystopdocument
+ \stoptext
+ \ifempty\currentdocument\else\resetmode\currentdocument\fi
+ \popmacro\currentdocument}
+
+\aliased \let\documentvariable \documentparameter
+\permanent\protected\def\unexpandeddocumentvariable{\documentparameter}
+
+\permanent\protected\def\doifelsedocumentvariable#name{\doifelsesomething{\documentvariable{#name}}}
+\permanent\protected\def\doifdocumentvariable #name{\doifsomething {\documentvariable{#name}}}
+\permanent\protected\def\doifnotdocumentvariable #name{\doifnot {\documentvariable{#name}}}
+
+\aliased\let\doifdocumentvariableelse\doifelsedocumentvariable
+
+\permanent\tolerant\protected\def\presetdocument[#namespace]#spacer[#settings]%
+ {\pushmacro\currentdocument
+ \ifparameters
+ \or
+ \ifhastok={#namespace}%
+ \let\currentdocument\empty
+ \setupcurrentdocument[#namespace]%
+ \fi
+ \or
+ \edef\currentdocument{#namespace}%
+ \setupcurrentdocument[#settings]%
+ \fi
+ \popmacro\currentdocument}
+
+% Bonus:
+
+% \installcorenamespace{samplefile}
+%
+% \protected\def\samplefile#1%
+% {\ifcsname\??samplefile#1\endcsname \else
+% \setxvalue{\??samplefile#1}{\cldloadfile{#1}}%
+% \fi
+% \lastnamedcs}
+
+\permanent\protected\def\samplefile#1{\clf_samplefile{#1}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-lib.mkxl b/Master/texmf-dist/tex/context/base/mkxl/file-lib.mkxl
new file mode 100644
index 00000000000..c2ec555cf2f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-lib.mkxl
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=file-lib, % was core-fil,
+%D version=20110701, % 1997.11.15,
+%D title=\CONTEXT\ File Macros,
+%D subtitle=Module Support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt File Macros / Libraries}
+
+\unprotect
+
+\registerctxluafile{file-lib}{}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt b/Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt
new file mode 100644
index 00000000000..6af5d8816e0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-mod.lmt
@@ -0,0 +1,309 @@
+if not modules then modules = { } end modules ['file-mod'] = {
+ version = 1.001,
+ comment = "companion to file-mod.mkvi",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ 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/.
+
+-- 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
+
+local trace_modules = false trackers .register("modules.loading", function(v) trace_modules = v end)
+local permit_unprefixed = false directives.register("modules.permitunprefixed", function(v) permit_unprefixed = v end)
+
+local report = logs.reporter("modules")
+
+local commands = commands
+local context = context
+local implement = interfaces.implement
+
+local findbyscheme = resolvers.finders.byscheme -- use different one
+local iterator = utilities.parsers.iterator
+
+-- modules can have a specific suffix or can specify one
+
+local prefixes = {
+ "m", -- module, extends functionality
+ "p", -- private code
+ "s", -- styles
+ "x", -- xml specific modules
+ -- "v", -- an old internal one for examples
+ "t", -- third party extensions
+}
+
+-- the order might change and how about cld
+
+local suffixes = CONTEXTLMTXMODE > 0 and
+{
+ "mklx", -- preprocessed mkiv lmtx files
+ "mkxl", -- mkiv lmtx files
+ "mkvi", -- preprocessed mkiv files
+ "mkiv", -- mkiv files
+ "tex", -- normally source code files
+ "cld", -- context lua documents (often stand alone)
+ "lua", -- lua files
+}
+ or
+{
+ "mkvi",
+ "mkiv",
+ "tex",
+ "cld",
+ "lua",
+}
+
+-- This controls embedded overloads. Maybe at some point we will limit this to files in the
+-- tree but on the other hand we don't need to be that strict. It is just an extra level
+-- of protection.
+
+local setrunstate = tex.setrunstate
+local level = 0
+
+local function pushrunstate()
+ level = level + 1
+ if level == 1 then
+ setrunstate(1)
+ end
+end
+
+local function poprunstate()
+ if level == 1 then
+ setrunstate(3)
+ end
+ if level > 0 then
+ level = level - 1
+ end
+end
+
+luatex.pushrunstate = pushrunstate
+luatex.poprunstate = poprunstate
+
+tex.setrunstate = function() end
+
+implement { name = "pushrunstate", public = true, protected = true, actions = pushrunstate }
+implement { name = "poprunstate", public = true, protected = true, actions = poprunstate }
+
+-- Till here.
+
+local modstatus = { }
+local missing = false
+
+local function usemodule(name,hasscheme)
+ local foundname
+ if hasscheme then
+ -- no auto suffix as http will return a home page or error page
+ -- so we only add one if missing
+ local fullname = file.addsuffix(name,"tex")
+ if trace_modules then
+ report("checking url %a",fullname)
+ end
+ foundname = resolvers.findtexfile(fullname) or ""
+ elseif file.suffix(name) ~= "" then
+ if trace_modules then
+ report("checking file %a",name)
+ end
+ foundname = findbyscheme("any",name) or ""
+ else
+ for i=1,#suffixes do
+ local fullname = file.addsuffix(name,suffixes[i])
+ if trace_modules then
+ report("checking file %a",fullname)
+ end
+ foundname = findbyscheme("any",fullname) or ""
+ if foundname ~= "" then
+ break
+ end
+ end
+ end
+ if foundname ~= "" then
+ if trace_modules then
+ report("loading file %a",foundname)
+ end
+ context.pushrunstate()
+ context.startreadingfile()
+ resolvers.jobs.usefile(foundname,true) -- once, notext
+ -- context.input(foundname)
+ context.stopreadingfile()
+ context.poprunstate()
+ return true
+ else
+ return false
+ end
+end
+
+function environment.usemodules(prefix,askedname,truename)
+ local truename = truename or environment.truefilename(askedname) or askedname
+ if truename and truename ~= "" then
+ local hasprefix = prefix and prefix ~= ""
+ local hashname = ((hasprefix and prefix) or "*") .. "-" .. truename
+ local status = modstatus[hashname] or false -- yet unset
+ if status == 0 then
+ -- not found
+ elseif status == 1 then
+ status = status + 1
+ else
+ if trace_modules then
+ report("locating, prefix %a, askedname %a, truename %a",prefix,askedname,truename)
+ end
+ local hasscheme = url.hasscheme(truename)
+ if hasscheme then
+ -- no prefix and suffix done
+ if usemodule(truename,true) then
+ status = 1
+ else
+ status = 0
+ end
+ elseif hasprefix then
+ if usemodule(prefix .. "-" .. truename) then
+ status = 1
+ else
+ status = 0
+ end
+ else
+ for i=1,#prefixes do
+ -- todo: reconstruct name i.e. basename
+ local thename = prefixes[i] .. "-" .. truename
+ if usemodule(thename) then
+ status = 1
+ break
+ end
+ end
+ if status then
+ -- ok, don't change
+ elseif find(truename,"-",1,true) and usemodule(truename) then
+ -- assume a user namespace
+ report("using user prefixed file %a",truename)
+ status = 1
+ elseif permit_unprefixed and usemodule(truename) then
+ report("using unprefixed file %a",truename)
+ status = 1
+ else
+ status = 0
+ end
+ end
+ end
+ if status == 0 then
+ missing = true
+ report("%a is not found",askedname)
+ elseif status == 1 then
+ report("%a is loaded",trace_modules and truename or askedname)
+ else
+ report("%a is already loaded",trace_modules and truename or askedname)
+ end
+ modstatus[hashname] = status
+ end
+end
+
+statistics.register("loaded tex modules", function()
+ if next(modstatus) then
+ local t, f, nt, nf = { }, { }, 0, 0
+ for k, v in sortedhash(modstatus) do
+ local b = basename(k)
+ if v == 0 then
+ nf = nf + 1
+ f[nf] = b
+ else
+ nt = nt + 1
+ t[nt] = b
+ end
+ end
+ if nf == 0 then
+ return format("%s requested, all found (%s)",nt,concat(t," "))
+ elseif nt == 0 then
+ return format("%s requested, all missing (%s)",nf,concat(f," "))
+ else
+ return format("%s requested, %s found (%s), %s missing (%s)",nt+nf,nt,concat(t," "),nf,concat(f," "))
+ end
+ else
+ return nil
+ end
+end)
+
+logs.registerfinalactions(function()
+ logs.startfilelogging(report,"used modules")
+ for k, v in sortedhash(modstatus) do
+ report(v == 0 and "missing: %s" or "loaded : %s",basename(k))
+ end
+ logs.stopfilelogging()
+ if missing and logs.loggingerrors() then
+ logs.starterrorlogging(report,"missing modules")
+ for k, v in sortedhash(modstatus) do
+ if v == 0 then
+ report("%w%s",6,basename(k))
+ end
+ end
+ logs.stoperrorlogging()
+ end
+end)
+
+-- moved from syst-lua.lua:
+
+local lpegmatch = lpeg.match
+local splitter = lpeg.tsplitter(lpeg.S(". "),tonumber)
+
+function environment.comparedversion(one,two) -- one >= two
+ if not two or two == "" then
+ one, two = environment.version, one
+ elseif one == "" then
+ one = environment.version
+ end
+ one = lpegmatch(splitter,one)
+ two = lpegmatch(splitter,two)
+ one = (one[1] or 0) * 10000 + (one[2] or 0) * 100 + (one[3] or 0)
+ two = (two[1] or 0) * 10000 + (two[2] or 0) * 100 + (two[3] or 0)
+ if one < two then
+ return -1
+ elseif one > two then
+ return 1
+ else
+ return 0
+ end
+end
+
+environment.comparedversion = comparedversion
+
+
+function environment.useluamodule(list)
+ for filename in iterator(list) do
+ environment.loadluafile(filename)
+ end
+end
+
+implement {
+ name = "usemodules",
+ actions = environment.usemodules,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "doifelseolderversion",
+ actions = function(one,two) commands.doifelse(comparedversion(one,two) >= 0) end,
+ arguments = "2 strings"
+}
+
+implement {
+ name = "useluamodule",
+ actions = environment.useluamodule,
+ arguments = "string"
+}
+
+implement {
+ name = "loadluamodule",
+ actions = function(name) dofile(resolvers.findctxfile(name)) end, -- hack
+ arguments = "string"
+}
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-mod.mklx b/Master/texmf-dist/tex/context/base/mkxl/file-mod.mklx
new file mode 100644
index 00000000000..24471e30f00
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-mod.mklx
@@ -0,0 +1,262 @@
+%D \module
+%D [ file=file-mod, % was core-fil,
+%D version=20110701, % 1997.11.15,
+%D title=\CONTEXT\ File Macros,
+%D subtitle=Module Support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt File Macros / Modules}
+
+\unprotect
+
+\registerctxluafile{file-mod}{autosuffix}
+
+%D \macros
+%D {usemodule}
+%D
+%D Most of \CONTEXT is preloaded in the format file. Some very domain specific
+%D typesetting topics are however dealt with in separate modules, e.g. typesetting
+%D of chemical structure formulas. These modules are loaded by:
+%D
+%D \showsetup{usemodule}
+%D
+%D More information on the specific modules can be found in their dedicated manuals.
+%D We use \type {\next} so that we can \type {\end} in modules.
+
+\installcorenamespace{module}
+
+\mutable\let\currentmodule \s!unknown
+\mutable\let\currentmodulecategory \empty
+\mutable\let\currentmoduleparameters\empty
+
+\installmacrostack\currentmodule
+\installmacrostack\currentmodulecategory
+\installmacrostack\currentmoduleparameters
+
+\permanent\tolerant\protected\def\usemodules[#category]#spacer[#name]#spacer[#parameters]% category=t|m|x|p|...
+ {\push_macro_currentmodule
+ \push_macro_currentmodulecategory
+ \push_macro_currentmoduleparameters
+ \ifparameters
+ \let\currentmodule\empty
+ \or
+ \let \currentmodulecategory \empty
+ \edef\currentmodule {#category}%
+ \let \currentmoduleparameters\empty
+ \or
+ \ifhastok={#name}%
+ \let\currentmodulecategory \empty
+ \edef\currentmodule {#category}%
+ \edef\currentmoduleparameters{#name}%
+ \else
+ \edef\currentmodulecategory {#category}%
+ \edef\currentmodule {#name}%
+ \let \currentmoduleparameters\empty
+ \fi
+ \or
+ \edef\currentmodulecategory {#category}%
+ \edef\currentmodule {#name}%
+ \def \currentmoduleparameters{#parameters}%
+ \fi
+ \processcommacommand[\currentmodule]{\strc_modules_use\currentmodulecategory}%
+ \pop_macro_currentmoduleparameters
+ \pop_macro_currentmodulecategory
+ \pop_macro_currentmodule}
+
+\def\strc_modules_use#category#name%
+ {\ifempty\currentmoduleparameters\else
+ \scratchtoks\expandafter{\currentmoduleparameters}%
+ \normalexpanded{\getparameters[\??module#name:][\the\scratchtoks]}%
+ \fi
+ \clf_usemodules{#category}{#name}}
+
+\aliased\let\usemodule \usemodules
+\aliased\let\usetexmodule\usemodules
+
+\newcount\c_syst_modules_nesting
+\newtoks \everysetupmodule
+
+\permanent\tolerant\protected\def\startmodule[#1]#;#2 %
+ {\global\advance\c_syst_modules_nesting\plusone
+ \push_macro_currentmodule
+ \push_macro_currentmoduleparameters
+ \def\currentmodule{#1#2}}
+
+\permanent\protected\def\stopmodule
+ {\ifcase\c_syst_modules_nesting
+ \writestatus\m!system{module wrapping error in '\currentmodule'}%
+ \else
+ \pop_macro_currentmoduleparameters
+ \pop_macro_currentmodule
+ \global\advance\c_syst_modules_nesting\minusone
+ \fi}
+
+\permanent\protected\def\setupmodule % to be lmtx'd
+ {\ifempty\currentmoduleparameters
+ \expandafter\syst_modules_setup_nop
+ \else
+ \expandafter\syst_modules_setup_yes
+ \fi}
+
+\tolerant\def\syst_modules_setup_nop[#name]#spacer[#parameters]%
+ {\ifarguments
+ % nothing
+ \or
+ \doifassignmentelse{#name}{\getparameters[\??module\currentmodule:][#name]}\donothing
+ \or
+ \getparameters[\??module#name:][#parameters]% internal (defaults)
+ \fi
+ \the\everysetupmodule}
+
+\tolerant\def\syst_modules_setup_yes[#name]#spacer[#parameters]%
+ {\scratchtoks\expandafter{\currentmoduleparameters}%
+ \ifparameters
+ \normalexpanded{\getparameters[\??module\currentmodule:][\the\scratchtoks]}%
+ \or
+ \ifhastok={#name}%
+ \getparameters[\??module\currentmodule:][#name]% internal (defaults)
+ \normalexpanded{\getparameters[\??module\currentmodule:][\the\scratchtoks]}% loadtime (user)
+ \else
+ \normalexpanded{\getparameters[\??module#1:][\the\scratchtoks]}% loadtime (user)
+ \fi
+ \or
+ \getparameters[\??module#name:][#parameters]% internal (defaults)
+ \normalexpanded{\getparameters[\??module#name:][\the\scratchtoks]}% loadtime (user)
+ \fi
+ \let\currentmoduleparameters\empty
+ \the\everysetupmodule}
+
+\permanent\def\moduleparameter#name#parameter% should have been \namedmoduleparameter
+ {\begincsname\??module#name:#parameter\endcsname}
+
+\letvalue\??module\empty % so we default to empty as with all parameters
+
+\permanent\def\currentmoduleparameter{\moduleparameter\currentmodule} % no need for inlining
+
+%permanent\protected\def\useluamodule[#name]{\clf_loadluamodule{#1}} % why not use useluamodule
+
+\permanent\protected\def\useluamodule [#name]{\clf_useluamodule{#1}}
+\permanent\protected\def\luaenvironment #name {\clf_loadluamodule{#1}}
+
+% \usemodule[newmml]
+% \usemodule[newmml][a=b]
+% \usemodule[x][newmml]
+% \usemodule[x][newmml][a=b]
+%
+% \startmodule [mathml]
+% \setupmodule[a=c] \relax [\currentmoduleparameter{a}] % user vars will be set afterwards
+% \setupmodule[a=c] \relax [\currentmoduleparameter{a}] % user vars are now forgotten
+% \stopmodule
+
+% one can introduce test sections with:
+%
+% \enablemode[newmml:test:\currentmoduleparameter{test}]
+% \startmode[newmml:test:yes} ... \stopmode
+%
+% these will be ignored unless test=yes
+%
+% however, a better way is:
+
+\permanent\protected\def\startmoduletestsection
+ {\begingroup
+ \setupmodule % we need to make sure that the vars are set
+ \doifelse{\currentmoduleparameter\v!test}\v!yes
+ {\endgroup
+ \writestatus\currentmodule{loading experimental code}}
+ {\endgroup
+ \writestatus\currentmodule{skipping experimental code}%
+ \gobbleuntil\stopmoduletestsection}}
+
+\aliased\let\stopmoduletestsection\donothing
+
+% will become file-run
+
+%D \macros
+%D {doifolderversionelse}
+%D
+%D We start with a macro specially for Aditya who wants to be able
+%D to use development versions of \MKIV\ for real documents.
+%D
+%D \starttyping
+%D \doifolderversionelse\contextversion{1010.10.10} {OLDER} {OKAY} => OLDER
+%D \doifolderversionelse\contextversion{2020.20.20} {OLDER} {OKAY} => OKAY
+%D \doifolderversionelse\contextversion{2020} {OLDER} {OKAY} => OKAY
+%D \stoptyping
+%D
+%D The version pattern is \type {yyyy.mm.dd} (with mm and dd being optional).
+
+\permanent\protected\def\doifelseolderversion#parent#child{\clf_doifelseolderversion{#parent}{#child}}
+\permanent\protected\def\doifelseoldercontext #child{\clf_doifelseolderversion{#child}{}}
+
+\aliased\let\doifolderversionelse\doifelseolderversion
+\aliased\let\doifoldercontextelse\doifelseoldercontext
+
+%D Relatively new (no need for a speedup here). Can't this now be done nicer?
+
+\permanent\protected\def\syst_modules_direct_lua#1#2%
+ {\edef\m_module_command_command {#1}%
+ \edef\m_module_command_function{#2}%
+ \directsetup{module:\m_module_command_command:start}%
+ \ctxlua{\m_module_command_function()}%
+ \directsetup{module:\m_module_command_command:stop}}
+
+\permanent\protected\def\syst_modules_single_lua#1#2%
+ {\edef\m_module_command_command {#1}%
+ \edef\m_module_command_function{#2}%
+ \dosingleempty\syst_modules_single_lua_indeed}
+
+\permanent\protected\def\syst_modules_single_lua_indeed[#1]%
+ {\directsetup{module:\m_module_command_command:start}%
+ \ctxlua{\m_module_command_function(\!!bs#1\!!es)}%
+ \directsetup{module:\m_module_command_command:stop}}
+
+\permanent\protected\def\syst_modules_double_lua#1#2%
+ {\edef\m_module_command_command {#1}%
+ \edef\m_module_command_function{#2}%
+ \dodoubleempty\syst_modules_double_lua_indeed}
+
+\permanent\protected\def\syst_modules_double_lua_indeed[#1][#2]%
+ {\directsetup{module:\m_module_command_command:start}%
+ \ctxlua{\m_module_command_function(\!!bs#1\!!es,\!!bs#2\!!es)}%
+ \directsetup{module:\m_module_command_command:stop}}
+
+\permanent\protected\def\installmodulecommandlua #1#2{\enforced\permanent\protected\def#1{\normalexpanded{\syst_modules_direct_lua{\csstring#1}{#2}}}}
+\permanent\protected\def\installmodulecommandluasingle#1#2{\enforced\permanent\protected\def#1{\normalexpanded{\syst_modules_single_lua{\csstring#1}{#2}}}}
+\permanent\protected\def\installmodulecommandluadouble#1#2{\enforced\permanent\protected\def#1{\normalexpanded{\syst_modules_double_lua{\csstring#1}{#2}}}}
+
+\protected\def\syst_modules_one_lua#1#2#3%
+ {\directsetup{module:#1:start}%
+ \ctxlua{#2(\!!bs#3\!!es)}%
+ \directsetup{module:#1:stop}}
+
+\protected\def\syst_modules_two_lua#1#2#3#4%
+ {\directsetup{module:#1:start}%
+ \ctxlua{#2(\!!bs#3\!!es,\!!bs#4\!!es)}%
+ \directsetup{module:#1:stop}}
+
+\permanent\protected\def\installmodulecommandluaone#1#2{\enforced\permanent\protected\def#1{\normalexpanded{\syst_modules_one_lua{\csstring#1}{#2}}}}
+\permanent\protected\def\installmodulecommandluatwo#1#2{\enforced\permanent\protected\def#1{\normalexpanded{\syst_modules_two_lua{\csstring#1}{#2}}}}
+
+%D This replaces \type {\fetchruntimecommand}:
+%D
+%D \starttyping
+%D \fetchmodulecommand \csname {module}
+%D \stoptyping
+
+\permanent\protected\def\fetchmodulecommand#1#2%
+ {\mutable\protected\def#1{\syst_fetch_module_command#1{#2}}}
+
+\def\syst_fetch_module_command#1#2% actually a test on #1 being define would be ok as well
+ {%writestatus\m!systems{fetching \string#1}%
+ \usemodule[#2]%
+ #1}
+
+\aliased\let\fetchruntimecommand\fetchmodulecommand % obsolete
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-res.mklx b/Master/texmf-dist/tex/context/base/mkxl/file-res.mklx
new file mode 100644
index 00000000000..a123b5e2213
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-res.mklx
@@ -0,0 +1,145 @@
+%D \module
+%D [ file=file-mod, % was supp-fil,
+%D version=20110701, % 1995.10.10,
+%D title=\CONTEXT\ File Macros,
+%D subtitle=Resolvers,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D We could move some more to the lua end (implementors).
+
+\writestatus{loading}{ConTeXt File Macros / Resolvers}
+
+\unprotect
+
+\registerctxluafile{file-res}{}
+
+%D \macros
+%D {readfile,ReadFile}
+%D
+%D One cannot be sure if a file exists. When no file can be found, the \type
+%D {\input} primitive gives an error message and switches to interactive mode. The
+%D macro \type {\readfile} takes care of non||existing files. This macro has two
+%D faces.
+%D
+%D \starttyping
+%D \ReadFile {filename}
+%D \readfile {filename} {before loading} {not found}
+%D \stoptyping
+%D
+%D Many \TEX\ implementations have laid out some strategy for locating files. This
+%D can lead to unexpected results, especially when one loads files that are not
+%D found in the current directory. Let's give an example of this. In \CONTEXT\
+%D illustrations can be defined in an external file. The resizing macro first looks
+%D if an illustration is defined in the local definitions file. When no such file is
+%D found, it searches for a global file and when this file is not found either, the
+%D illustration itself is scanned for dimensions. One can imagine what happens if an
+%D adapted, localy stored illustration, is scaled according to dimensions stored
+%D somewhere else.
+%D
+%D When some \TEX\ implementation starts looking for a file, it normally first looks
+%D in the current directory. When no file is found, \TEX\ starts searching on the
+%D path where format and|/|or style files are stored. Depending on the
+%D implementation this can considerably slow down processing speed.
+%D
+%D In \CONTEXT, we support a project||wise ordening of files. In such an approach it
+%D seems feasible to store common files in a lower directory. When for instance
+%D searching for a general layout file, we therefore have to backtrack.
+%D
+%D These three considerations have lead to a more advanced approach for loading
+%D files.
+%D
+%D We first present an earlier implementation of \type {\readfile}. This command
+%D backtracks parent directories, upto a predefined level. Users can change this
+%D level (on the commandline using a directive); we default to~3.
+%D
+%D We use \type {\normalinput} instead of \type {\input} because we want to be able
+%D to redefine the original \type {\input} when needed, for instance when loading
+%D third party libraries.
+
+\mutable\let\readfilename\empty
+
+\def\syst_files_read_file#protocol#path#name% #true #false
+ {\edef\readfilename{\clf_getreadfilename{#protocol}{#path}{#name}}%
+ \ifempty\readfilename
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\syst_files_read_file_indeed
+ \fi}
+
+\def\syst_files_read_file_indeed#true#false%
+ {#true%
+ \relax
+ \normalinput{\readfilename}%
+ \relax}
+
+%D \macros
+%D {readjobfile,readlocfile,readsysfile,
+%D readfixfile,readsetfile}
+%D
+%D This implementation honnors the third situation, but we still can get unwanted
+%D files loaded and/or can get involved in extensive searching.
+%D
+%D Due to different needs, we decided to offer four alternative loading commands.
+%D With \type {\readjobfile} we load a local file and do no backtracking, while
+%D \type {\readlocfile} backtracks~\number \maxreadlevel\ directories, including the
+%D current one.
+%D
+%D System files can be anywhere and therefore \type {\readsysfile} is not bound to
+%D the current directory and obeys the \TEX\ implementation.
+%D
+%D Of the last two, \type {\readfixfile} searches on the directory specified and
+%D backtracks too, while \type {\readsetfile} does only search on the specified
+%D path.
+%D
+%D The most liberal is \type {\readfile}.
+
+\permanent\protected\def\readjobfile #name{\syst_files_read_file{job} {.}{#name}} % current path, no backtracking
+\permanent\protected\def\readlocfile #name{\syst_files_read_file{loc} {.}{#name}} % current path, backtracking
+\permanent\protected\def\readsysfile #name{\syst_files_read_file{sys} {.}{#name}} % current path, obeys tex search
+\permanent\protected\def\readfixfile#path#name{\syst_files_read_file{fix}{#path}{#name}} % specified path, backtracking
+\permanent\protected\def\readsetfile#path#name{\syst_files_read_file{set}{#path}{#name}} % specified path, no backtracking
+\permanent\protected\def\readfile #name{\syst_files_read_file{any} {.}{#name}}
+\permanent\protected\def\ReadFile #name{\syst_files_read_file{any} {.}{#name}\donothing\donothing}
+
+%D So now we've got ourselves five file loading commands:
+%D
+%D \starttyping
+%D \readfile {filename} {before loading} {not found}
+%D
+%D \readjobfile {filename} {before loading} {not found}
+%D \readlocfile {filename} {before loading} {not found}
+%D \readfixfile {filename} {before loading} {not found}
+%D \readsysfile {directory} {filename} {before loading} {not found}
+%D \stoptyping
+
+\permanent\protected\def\readtexfile#name#true#false%
+ {\pushcatcodetable
+ \catcodetable\ctxcatcodes
+ \readfile{#name}{#true}{#false}%
+ \popcatcodetable}
+
+% \permanent\protected\def\readxmlfile#name#true#false%
+% {\pushcatcodetable
+% \catcodetable\xmlcatcodes
+% \readfile{#name}{#true}{#false}%
+% \popcatcodetable}
+
+%D \macros
+%D {doiflocfileelse,locfilename}
+%D
+%D \starttyping
+%D \doiflocfileelse {filename} {before loading} {not found}
+%D \stoptyping
+
+\permanent\protected\def\doifelselocfile#name{\clf_doifelselocfile{#name}}
+\permanent \def\locfilename #name{\clf_locfilename {#name}}
+
+\aliased\let\doiflocfileelse\doifelselocfile
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/file-syn.mklx b/Master/texmf-dist/tex/context/base/mkxl/file-syn.mklx
new file mode 100644
index 00000000000..25f36f742fc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/file-syn.mklx
@@ -0,0 +1,61 @@
+%D \module
+%D [ file=file-syn, % was core-fil,
+%D version=20110701, % 1997.11.15,
+%D title=\CONTEXT\ File Macros,
+%D subtitle=Module Support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt File Macros / Synonyms}
+
+\unprotect
+
+\registerctxluafile{file-syn}{}
+
+%D \macros
+%D {definefilesynonym,definefilefallback}
+%D
+%D One of the problems with loading files is that their names can depend on the
+%D interface language. We therefore need a method to define filesynonyms. The actual
+%D synonyms are defined elsewhere, but look like:
+%D
+%D \starttyping
+%D \definefilesynonym [chemic] [chemie]
+%D \definefilesynonym [einheit] [unit]
+%D \definefilesynonym [unit] [unit]
+%D \stoptyping
+%D
+%D So we can say in english:
+%D
+%D \starttyping
+%D \usemodules[pictex,chemic,unit]
+%D \stoptyping
+%D
+%D and in dutch:
+%D
+%D \starttyping
+%D \usemodules[pictex,chemie,unit]
+%D \stoptyping
+
+\permanent\tolerant\def\definefilesynonym [#name]#spacer[#realname]{\clf_definefilesynonym {#name}{#realname}}
+\permanent\tolerant\def\definefilefallback[#name]#spacer[#alternatives]{\clf_definefilefallback{#name}{#alternatives}}
+
+%D \macros
+%D {truefilename}
+%D
+%D At the system level such a filename can be called upon by saying:
+%D
+%D \starttyping
+%D \truefilename{filename/filesynonym}
+%D \stoptyping
+%D
+%D The implementation shows that nesting is supported.
+
+\permanent\def\truefilename#1{\clf_truefilename{#1}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-aux.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-aux.mklx
new file mode 100644
index 00000000000..caf32510e5c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-aux.mklx
@@ -0,0 +1,26 @@
+%D \module
+%D [ file=font-gds,
+%D version=2012.06.26,
+%D title=\CONTEXT\ Font Support,
+%D subtitle=Helpers,
+%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 Font Support / Helpers}
+
+%D Here we collect code moved from other files, like some of the
+%D support modules.
+
+\unprotect
+
+%D Leftovers:
+
+\permanent\protected\def\xbox {\bgroup\aftergroup\egroup\hbox\bgroup\tx \let\next=}
+\permanent\protected\def\xxbox{\bgroup\aftergroup\egroup\hbox\bgroup\txx\let\next=}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt
new file mode 100644
index 00000000000..6f927e09764
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-chk.lmt
@@ -0,0 +1,452 @@
+if not modules then modules = { } end modules ['font-chk'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is kind of old but it makes no real sense to upgrade it to for instance
+-- using delayed type 3 fonts in order to be lean and mean and cut'n'paste
+-- compliant. When this kicks one needs to fix the choice of fonts anyway! So,
+-- instead we just keep the method we use but slightly adapted to the backend
+-- of lmtx.
+
+local next = next
+local floor = math.floor
+
+local context = context
+
+local formatters = string.formatters
+local bpfactor = number.dimenfactors.bp
+local fastcopy = table.fastcopy
+local sortedkeys = table.sortedkeys
+local sortedhash = table.sortedhash
+
+local report = logs.reporter("fonts")
+local report_checking = logs.reporter("fonts","checking")
+
+local allocate = utilities.storage.allocate
+
+local fonts = fonts
+
+fonts.checkers = fonts.checkers or { }
+local checkers = fonts.checkers
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontcharacters = fonthashes.characters
+
+local currentfont = font.current
+local addcharacters = font.addcharacters
+
+local helpers = fonts.helpers
+
+local addprivate = helpers.addprivate
+local hasprivate = helpers.hasprivate
+local getprivateslot = helpers.getprivateslot
+local getprivatecharornode = helpers.getprivatecharornode
+
+local otffeatures = fonts.constructors.features.otf
+local afmfeatures = fonts.constructors.features.afm
+
+local registerotffeature = otffeatures.register
+local registerafmfeature = afmfeatures.register
+
+local is_character = characters.is_character
+local chardata = characters.data
+
+local tasks = nodes.tasks
+local enableaction = tasks.enableaction
+local disableaction = tasks.disableaction
+
+local implement = interfaces.implement
+
+local glyph_code = nodes.nodecodes.glyph
+
+local hpack_node = node.hpack
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local isglyph = nuts.isglyph
+local setchar = nuts.setchar
+
+local nextglyph = nuts.traversers.glyph
+
+local remove_node = nuts.remove
+local insert_node_after = nuts.insert_after
+local insert_node_before = nuts.insert_before
+local copy_node = nuts.copy
+
+local actions = false
+
+-- to tfmdata.properties ?
+
+local function onetimemessage(font,char,message) -- char == false returns table
+ local tfmdata = fontdata[font]
+ local shared = tfmdata.shared
+ if not shared then
+ shared = { }
+ tfmdata.shared = shared
+ end
+ local messages = shared.messages
+ if not messages then
+ messages = { }
+ shared.messages = messages
+ end
+ local category = messages[message]
+ if not category then
+ category = { }
+ messages[message] = category
+ end
+ if char == false then
+ return sortedkeys(category), category
+ end
+ local cc = category[char]
+ if not cc then
+ report_checking("char %C in font %a with id %a: %s",char,tfmdata.properties.fullname,font,message)
+ category[char] = 1
+ else
+ category[char] = cc + 1
+ end
+end
+
+fonts.loggers.onetimemessage = onetimemessage
+
+local fakes = {
+ MissingLowercase = { width = .45, height = .55, depth = .20 },
+ MissingUppercase = { width = .65, height = .70, depth = .25 },
+ MissingMark = { width = .15, height = .70, depth = -.50 },
+ MissingPunctuation = { width = .15, height = .55, depth = .20 },
+ MissingUnknown = { width = .45, height = .20, depth = 0 },
+}
+
+local mapping = allocate {
+ lu = { "MissingUppercase", "darkred" },
+ ll = { "MissingLowercase", "darkred" },
+ lt = { "MissingUppercase", "darkred" },
+ lm = { "MissingLowercase", "darkred" },
+ lo = { "MissingLowercase", "darkred" },
+ mn = { "MissingMark", "darkgreen" },
+ mc = { "MissingMark", "darkgreen" },
+ me = { "MissingMark", "darkgreen" },
+ nd = { "MissingLowercase", "darkblue" },
+ nl = { "MissingLowercase", "darkblue" },
+ no = { "MissingLowercase", "darkblue" },
+ pc = { "MissingPunctuation", "darkcyan" },
+ pd = { "MissingPunctuation", "darkcyan" },
+ ps = { "MissingPunctuation", "darkcyan" },
+ pe = { "MissingPunctuation", "darkcyan" },
+ pi = { "MissingPunctuation", "darkcyan" },
+ pf = { "MissingPunctuation", "darkcyan" },
+ po = { "MissingPunctuation", "darkcyan" },
+ sm = { "MissingLowercase", "darkmagenta" },
+ sc = { "MissingLowercase", "darkyellow" },
+ sk = { "MissingLowercase", "darkyellow" },
+ so = { "MissingLowercase", "darkyellow" },
+}
+
+table.setmetatableindex(mapping, { "MissingUnknown", "darkgray" })
+
+checkers.mapping = mapping
+
+-- We provide access by (private) name for tracing purposes. We also need to make
+-- sure the dimensions are known at the lua and tex end. For previous variants see
+-- the mkiv files or older lmtx files. I decided to just drop the old stuff here.
+
+function checkers.placeholder(font,char)
+ local category = chardata[char].category or "lu" -- todo: unknown
+ local fakedata = mapping[category]
+ local tfmdata = fontdata[font]
+ local units = tfmdata.parameters.units or 1000
+ local slant = (tfmdata.parameters.slant or 0)/65536
+ local scale = units/1000
+ local rawdata = tfmdata.shared and tfmdata.shared.rawdata
+ local weight = (rawdata and rawdata.metadata and rawdata.metadata.pfmweight or 400)/400
+ local specification = {
+ code = "MissingGlyph",
+ scale = scale,
+ slant = slant,
+ weight = weight,
+ namespace = font,
+ shapes = { { shape = fakedata[1], color = fakedata[2] } },
+ }
+ fonts.helpers.setmetaglyphs("missing", font, char, specification)
+end
+
+function checkers.missing(head)
+ local lastfont = nil
+ local characters = nil
+ local found = nil
+ local addplaceholder = checkers.placeholder -- so we can overload
+ if actions.replace or actions.decompose then
+ for n, char, font in nextglyph, head do
+ if font ~= lastfont then
+ lastfont = font
+ characters = fontcharacters[font]
+ end
+ if font > 0 and not characters[char] and is_character[chardata[char].category or "unknown"] then
+ if actions.decompose then
+ local c = chardata[char]
+ if c then
+ local s = c.specials
+ if s and s[1] == "char" then
+ local l = #s
+ if l > 2 then
+ -- check first
+ local okay = true
+ for i=2,l do
+ if not characters[s[i]] then
+ okay = false
+ break
+ end
+ end
+ if okay then
+ -- we work backward
+ local o = n -- we're not supposed to change n (lua 5.4+)
+ onetimemessage(font,char,"missing (decomposed)")
+ setchar(n,s[l])
+ for i=l-1,2,-1 do
+ head, o = insert_node_before(head,o,copy_node(n))
+ setchar(o,s[i])
+ end
+ goto DONE
+ end
+ end
+ end
+ end
+ end
+ if actions.replace then
+ onetimemessage(font,char,"missing (replaced)")
+ local f, c = addplaceholder(font,char)
+ if f and c then
+ setchar(n, c, f)
+ end
+ goto DONE
+ end
+ if actions.remove then
+ onetimemessage(font,char,"missing (deleted)")
+ if not found then
+ found = { n }
+ else
+ found[#found+1] = n
+ end
+ goto DONE
+ end
+ onetimemessage(font,char,"missing (checked)")
+ ::DONE::
+ end
+ end
+ end
+ if found then
+ for i=1,#found do
+ head = remove_node(head,found[i],true)
+ end
+ end
+ return head
+end
+
+local relevant = {
+ "missing (decomposed)",
+ "missing (replaced)",
+ "missing (deleted)",
+ "missing (checked)",
+ "missing",
+}
+
+local function getmissing(id)
+ if id then
+ local list = getmissing(currentfont())
+ if list then
+ local _, list = next(getmissing(currentfont()))
+ return list
+ else
+ return { }
+ end
+ else
+ local t = { }
+ for id, d in next, fontdata do
+ local shared = d.shared
+ local messages = shared and shared.messages
+ if messages then
+ local filename = d.properties.filename
+ if not filename then
+ filename = tostring(d)
+ end
+ local tf = t[filename] or { }
+ for i=1,#relevant do
+ local tm = messages[relevant[i]]
+ if tm then
+ for k, v in next, tm do
+ tf[k] = (tf[k] or 0) + v
+ end
+ end
+ end
+ if next(tf) then
+ t[filename] = tf
+ end
+ end
+ end
+ local l = { }
+ for k, v in next, t do
+ l[k] = sortedkeys(v)
+ end
+ return l, t
+ end
+end
+
+checkers.getmissing = getmissing
+
+do
+
+ local reported = true
+
+ callback.register("glyph_not_found",function(font,char)
+ if font > 0 then
+ if char > 0 then
+ onetimemessage(font,char,"missing")
+ else
+ -- we have a special case
+ end
+ elseif not reported then
+ report("nullfont is used, maybe no bodyfont is defined")
+ reported = true
+ end
+ end)
+
+ local loaded = false
+
+ trackers.register("fonts.missing", function(v)
+ if v then
+ enableaction("processors","fonts.checkers.missing")
+ if v == true then
+ actions = { check = true }
+ else
+ actions = utilities.parsers.settings_to_set(v)
+ if not loaded and actions.replace then
+ metapost.simple("simplefun",'loadfile("mp-miss.mpxl");')
+ loaded = true
+ end
+ end
+ else
+ disableaction("processors","fonts.checkers.missing")
+ actions = false
+ end
+ end)
+
+ logs.registerfinalactions(function()
+ local collected, details = getmissing()
+ if next(collected) then
+ for filename, list in sortedhash(details) do
+ logs.startfilelogging(report,"missing characters",filename)
+ for u, v in sortedhash(list) do
+ report("%4i %U %c %s",v,u,u,chardata[u].description)
+ end
+ logs.stopfilelogging()
+ end
+ if logs.loggingerrors() then
+ for filename, list in sortedhash(details) do
+ logs.starterrorlogging(report,"missing characters",filename)
+ for u, v in sortedhash(list) do
+ report("%4i %U %c %s",v,u,u,chardata[u].description)
+ end
+ logs.stoperrorlogging()
+ end
+ end
+ end
+ end)
+
+end
+
+-- for the moment here
+
+local function expandglyph(characters,index,done)
+ done = done or { }
+ if not done[index] then
+ local data = characters[index]
+ if data then
+ done[index] = true
+ local d = fastcopy(data)
+ local n = d.next
+ if n then
+ d.next = expandglyph(characters,n,done)
+ end
+ local h = d.horiz_variants
+ if h then
+ for i=1,#h do
+ h[i].glyph = expandglyph(characters,h[i].glyph,done)
+ end
+ end
+ local v = d.vert_variants
+ if v then
+ for i=1,#v do
+ v[i].glyph = expandglyph(characters,v[i].glyph,done)
+ end
+ end
+ return d
+ end
+ end
+end
+
+helpers.expandglyph = expandglyph
+
+-- should not be needed as we add .notdef in the engine
+
+local dummyzero = {
+ -- width = 0,
+ -- height = 0,
+ -- depth = 0,
+ commands = { { "special", "" } },
+}
+
+local function adddummysymbols(tfmdata)
+ local characters = tfmdata.characters
+ if not characters[0] then
+ characters[0] = dummyzero
+ end
+ -- if not characters[1] then
+ -- characters[1] = dummyzero -- test only
+ -- end
+end
+
+local dummies_specification = {
+ name = "dummies",
+ description = "dummy symbols",
+ default = true,
+ manipulators = {
+ base = adddummysymbols,
+ node = adddummysymbols,
+ }
+}
+
+registerotffeature(dummies_specification)
+registerafmfeature(dummies_specification)
+
+--
+
+local function addvisualspace(tfmdata)
+ local spacechar = tfmdata.characters[32]
+ if spacechar and not spacechar.commands then
+ local w = spacechar.width
+ local h = tfmdata.parameters.xheight
+ local c = {
+ width = w,
+ commands = { { "rule", h, w } }
+ }
+ local u = addprivate(tfmdata, "visualspace", c)
+ end
+end
+
+local visualspace_specification = {
+ name = "visualspace",
+ description = "visual space",
+ default = true,
+ manipulators = {
+ base = addvisualspace,
+ node = addvisualspace,
+ }
+}
+
+registerotffeature(visualspace_specification)
+registerafmfeature(visualspace_specification)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-chk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/font-chk.mkxl
new file mode 100644
index 00000000000..34d67648270
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-chk.mkxl
@@ -0,0 +1,56 @@
+%D \module
+%D [ file=font-chk,
+%D version=2009.01.02, % moved from font-tra
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Checking,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Font Macros / Checking}
+
+\registerctxluafile{font-chk}{autosuffix}
+
+\tracinglostchars\zerocount
+
+% Use this instead:
+%
+% \definefontfeature[default][default][missing=yes]
+% \enabletrackers[fonts.missing=replace]
+
+\permanent\protected\def\checkmissingcharacters {\enabletrackers[fonts.missing]}
+\permanent\protected\def\removemissingcharacters {\enabletrackers[fonts.missing=remove]}
+\permanent\protected\def\replacemissingcharacters{\enabletrackers[fonts.missing=replace]}
+\permanent\protected\def\handlemissingcharacters {\enabletrackers[fonts.missing={decompose,replace}]}
+
+% \enableexperiments[fonts.compact]
+
+%D \starttyping
+%D \replacemissingcharacters
+%D
+%D \startbuffer
+%D \startlines[before=,after=]
+%D \strut {\tf test \char 12345\ test \char 12346\ test}
+%D \strut {\bf test \char 12345\ test \char 12346\ test}
+%D \strut {\it test \char 12345\ test \char 12346\ test}
+%D \strut {\bi test \char 12345\ test \char 12346\ test}
+%D \strut {test á½€ Ï Ï† α ν á¿– ο Ï‚ test}
+%D \stoplines
+%D \stopbuffer
+%D
+%D \starttext
+%D \startTEXpage[offset=2pt,strut=no]
+%D \getbuffer
+%D \switchtobodyfont[pagella]
+%D \getbuffer
+%D \switchtobodyfont[dejavu]
+%D \getbuffer
+%D \stopTEXpage
+%D \stoptext
+%D \stoptyping
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-col.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-col.lmt
new file mode 100644
index 00000000000..41d3274008c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-col.lmt
@@ -0,0 +1,525 @@
+if not modules then modules = { } end modules ['font-col'] = {
+ 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"
+}
+
+-- possible optimization: delayed initialization of vectors
+-- we should also share equal vectors (math)
+
+local context, commands, trackers, logs = context, commands, trackers, logs
+local node, nodes, fonts, characters = node, nodes, fonts, characters
+local file, lpeg, table, string = file, lpeg, table, string
+
+local type, next, tonumber, toboolean = type, next, tonumber, toboolean
+local gmatch = string.gmatch
+local fastcopy = table.fastcopy
+local formatters = string.formatters
+
+local nuts = nodes.nuts
+
+local setfont = nuts.setfont
+
+----- traverse_char = nuts.traverse_char
+local nextchar = nuts.traversers.char
+local getscales = nuts.getscales
+local setscales = nuts.setscales
+local setprop = nuts.setprop
+
+local settings_to_hash = utilities.parsers.settings_to_hash
+
+local trace_collecting = false trackers.register("fonts.collecting", function(v) trace_collecting = v end)
+
+local report_fonts = logs.reporter("fonts","collections")
+
+local texconditionals = tex.conditionals
+
+local enableaction = nodes.tasks.enableaction
+local disableaction = nodes.tasks.disableaction
+
+local collections = fonts.collections or { }
+fonts.collections = collections
+
+local definitions = collections.definitions or { }
+collections.definitions = definitions
+
+local vectors = collections.vectors or { }
+collections.vectors = vectors
+
+local helpers = fonts.helpers
+local charcommand = helpers.commands.char
+local rightcommand = helpers.commands.right
+local addprivate = helpers.addprivate
+local hasprivate = helpers.hasprivate
+local fontpatternhassize = helpers.fontpatternhassize
+
+local hashes = fonts.hashes
+local fontdata = hashes.identifiers
+local fontquads = hashes.quads
+local chardata = hashes.characters
+local propdata = hashes.properties
+local mathparameters = hashes.mathparameters
+
+local currentfont = font.current
+local addcharacters = font.addcharacters
+
+local implement = interfaces.implement
+
+local list = { }
+local current = 0
+local enabled = false
+
+local validvectors = table.setmetatableindex(function(t,k)
+ local v = false
+ if not mathparameters[k] then
+ v = vectors[k]
+ end
+ t[k] = v
+ return v
+end)
+
+local function checkenabled()
+ -- a bit ugly but nicer than a fuzzy state while defining math
+ if next(vectors) then
+ if not enabled then
+ enableaction("processors","fonts.collections.process")
+ enabled = true
+ end
+ else
+ if enabled then
+ disableaction("processors","fonts.collections.process")
+ enabled = false
+ end
+ end
+end
+
+collections.checkenabled = checkenabled
+
+function collections.reset(name,font)
+ if font and font ~= "" then
+ local d = definitions[name]
+ if d then
+ d[font] = nil
+ if not next(d) then
+ definitions[name] = nil
+ end
+ end
+ else
+ definitions[name] = nil
+ end
+end
+
+function collections.define(name,font,ranges,details)
+ -- todo: details -> method=force|conditional rscale=
+ -- todo: remap=name
+ local d = definitions[name]
+ if not d then
+ d = { }
+ definitions[name] = d
+ end
+ if name and trace_collecting then
+ report_fonts("extending collection %a using %a",name,font)
+ end
+ details = settings_to_hash(details)
+ -- todo, combine per font start/stop as arrays
+ local offset = details.offset
+ if type(offset) == "string" then
+ offset = characters.getrange(offset,true) or false
+ else
+ offset = tonumber(offset) or false
+ end
+ local target = details.target
+ if type(target) == "string" then
+ target = characters.getrange(target,true) or false
+ else
+ target = tonumber(target) or false
+ end
+ local rscale = tonumber (details.rscale) or 1
+ local force = toboolean(details.force,true)
+ local check = toboolean(details.check,true)
+ local factor = tonumber(details.factor)
+ local features = details.features
+ for s in gmatch(ranges,"[^, ]+") do
+ local start, stop, description, gaps = characters.getrange(s,true)
+ if start and stop then
+ if trace_collecting then
+ if description then
+ report_fonts("using range %a, slots %U - %U, description %a)",s,start,stop,description)
+ end
+ for i=1,#d do
+ local di = d[i]
+ if (start >= di.start and start <= di.stop) or (stop >= di.start and stop <= di.stop) then
+ report_fonts("overlapping ranges %U - %U and %U - %U",start,stop,di.start,di.stop)
+ end
+ end
+ end
+ d[#d+1] = {
+ font = font,
+ start = start,
+ stop = stop,
+ gaps = gaps,
+ offset = offset,
+ target = target,
+ rscale = rscale,
+ force = force,
+ check = check,
+ method = details.method,
+ factor = factor,
+ features = features,
+ }
+ end
+ end
+end
+
+-- todo: provide a lua variant (like with definefont)
+
+function collections.registermain(name)
+ local last = currentfont()
+ if trace_collecting then
+ report_fonts("registering font %a with name %a",last,name)
+ end
+ list[#list+1] = last
+end
+
+-- check: when true, only set when present in font
+-- force: when false, then not set when already set
+
+local uccodes = characters.uccodes
+local lccodes = characters.lccodes
+
+local methods = {
+ lowercase = function(oldchars,newchars,vector,start,stop,cloneid)
+ for k, v in next, oldchars do
+ if k >= start and k <= stop then
+ local lccode = lccodes[k]
+ if k ~= lccode and newchars[lccode] then
+ vector[k] = { cloneid, lccode }
+ end
+ end
+ end
+ end,
+ uppercase = function(oldchars,newchars,vector,start,stop,cloneid)
+ for k, v in next, oldchars do
+ if k >= start and k <= stop then
+ local uccode = uccodes[k]
+ if k ~= uccode and newchars[uccode] then
+ vector[k] = { cloneid, uccode }
+ end
+ end
+ end
+ end,
+}
+
+function collections.clonevector(name)
+ statistics.starttiming(fonts)
+ if trace_collecting then
+ report_fonts("processing collection %a",name)
+ end
+ local definitions = definitions[name]
+ local vector = { }
+ vectors[current] = vector
+ for i=1,#definitions do
+ local definition = definitions[i]
+ local name = definition.font
+ local start = definition.start
+ local stop = definition.stop
+ local check = definition.check
+ local force = definition.force
+ local offset = definition.offset or start
+ local remap = definition.remap -- not used
+ local target = definition.target
+ local method = definition.method
+ local cloneid = list[i]
+ local oldchars = fontdata[current].characters
+ local newchars = fontdata[cloneid].characters
+ local factor = definition.factor
+ local rscale = definition.rscale
+ if factor then
+ vector.factor = factor
+ end
+ if texconditionals["c_font_compact"] and rscale then
+ vector.rscale = rscale
+ end
+ if trace_collecting then
+ if target then
+ report_fonts("remapping font %a to %a for range %U - %U, offset %X, target %U",current,cloneid,start,stop,offset,target)
+ else
+ report_fonts("remapping font %a to %a for range %U - %U, offset %X",current,cloneid,start,stop,offset)
+ end
+ end
+ if method then
+ method = methods[method]
+ end
+ if method then
+ method(oldchars,newchars,vector,start,stop,cloneid)
+ elseif check then
+ if target then
+ for unicode = start, stop do
+ local unic = unicode + offset - start
+ if not newchars[target] then
+ -- not in font
+ elseif force or (not vector[unic] and not oldchars[unic]) then
+ vector[unic] = { cloneid, target }
+ end
+ target = target + 1
+ end
+ elseif remap then
+ -- not used
+ else
+ for unicode = start, stop do
+ local unic = unicode + offset - start
+ if not newchars[unicode] then
+ -- not in font
+ elseif force or (not vector[unic] and not oldchars[unic]) then
+ vector[unic] = cloneid
+ end
+ end
+ end
+ else
+ if target then
+ for unicode = start, stop do
+ local unic = unicode + offset - start
+ if force or (not vector[unic] and not oldchars[unic]) then
+ vector[unic] = { cloneid, target }
+ end
+ target = target + 1
+ end
+ elseif remap then
+ for unicode = start, stop do
+ local unic = unicode + offset - start
+ if force or (not vector[unic] and not oldchars[unic]) then
+ vector[unic] = { cloneid, remap[unicode] }
+ end
+ end
+ else
+ for unicode = start, stop do
+ local unic = unicode + offset - start
+ if force or (not vector[unic] and not oldchars[unic]) then
+ vector[unic] = cloneid
+ end
+ end
+ end
+ end
+ end
+ if trace_collecting then
+ report_fonts("activating collection %a for font %a",name,current)
+ end
+ statistics.stoptiming(fonts)
+ -- for WS: needs checking
+ if validvectors[current] then
+ checkenabled()
+ end
+end
+
+-- we already have this parser
+--
+-- local spec = (P("sa") + P("at") + P("scaled") + P("at") + P("mo")) * P(" ")^1 * (1-P(" "))^1 * P(" ")^0 * -1
+-- local okay = ((1-spec)^1 * spec * Cc(true)) + Cc(false)
+--
+-- if lpegmatch(okay,name) then
+
+function collections.prepare(name) -- we can do this in lua now .. todo
+ current = currentfont()
+ if vectors[current] then
+ return
+ end
+ local properties = propdata[current]
+ local mathsize = properties.mathsize
+ if mathsize == 1 or mathsize == 2 or mathsize == 3 then
+ return
+ end
+ local d = definitions[name]
+ if d then
+ if trace_collecting then
+ local filename = file.basename(properties.filename or "?")
+ report_fonts("applying collection %a to %a, file %a",name,current,filename)
+ end
+ list = { }
+ context.pushcatcodes("prt") -- context.unprotect()
+ context.font_fallbacks_start_cloning()
+ for i=1,#d do
+ local f = d[i]
+ local name = f.font
+ local scale = f.rscale or 1
+ if texconditionals["c_font_compact"] then
+ scale = 1
+ end
+ if fontpatternhassize(name) then
+ context.font_fallbacks_clone_unique(name,scale)
+ else
+ context.font_fallbacks_clone_inherited(name,scale)
+ end
+ context.font_fallbacks_register_main(name)
+ end
+ context.font_fallbacks_prepare_clone_vectors(name)
+ context.font_fallbacks_stop_cloning()
+ context.popcatcodes() -- context.protect()
+ end
+end
+
+function collections.report(message)
+ if trace_collecting then
+ report_fonts("tex: %s",message)
+ end
+end
+
+local function monoslot(font,char,parent,factor)
+ local tfmdata = fontdata[font]
+ local privatename = formatters["faked mono %s"](char)
+ local privateslot = hasprivate(tfmdata,privatename)
+ if privateslot then
+ return privateslot
+ else
+ local characters = tfmdata.characters
+ local properties = tfmdata.properties
+ local width = factor * fontquads[parent]
+ local character = characters[char]
+ if character then
+ -- runtime patching of the font (can only be new characters)
+ -- instead of messing with existing dimensions
+ local data = {
+ -- no features so a simple copy
+ width = width,
+ height = character.height,
+ depth = character.depth,
+ commands = {
+ rightcommand[(width - character.width or 0)/2],
+ charcommand[char],
+ }
+ }
+ local u = addprivate(tfmdata, privatename, data)
+ addcharacters(properties.id, { characters = { [u] = data } } )
+ return u
+ else
+ return char
+ end
+ end
+end
+
+function collections.register(font,char,handler)
+ if font and char and type(handler) == "function" then
+ local vector = vectors[font]
+ if not vector then
+ vector = { }
+ vectors[font] = vector
+ end
+ vector[char] = handler
+ end
+end
+
+-- todo: also general one for missing
+
+function collections.process(head) -- this way we keep feature processing
+ for n, char, font in nextchar, head do
+ local vector = validvectors[font]
+ if vector then
+ local vect = vector[char]
+ if vect then
+ local kind = type(vect)
+ local newfont, newchar
+ if kind == "table" then
+ newfont = vect[1]
+ newchar = vect[2]
+ if trace_collecting then
+ report_fonts("remapping character %C in font %a to character %C in font %a%s",
+ char,font,newchar,newfont,not chardata[newfont][newchar] and " (missing)" or ""
+ )
+ end
+ elseif kind == "function" then
+ newfont, newchar = vect(font,char,vector)
+ if not newfont then
+ newfont = font
+ end
+ if not newchar then
+ newchar = char
+ end
+ if trace_collecting then
+ report_fonts("remapping character %C in font %a to character %C in font %a%s",
+ char,font,newchar,newfont,not chardata[newfont][newchar] and " (missing)" or ""
+ )
+ end
+ vector[char] = { newfont, newchar }
+ else
+ local fakemono = vector.factor
+ if trace_collecting then
+ report_fonts("remapping font %a to %a for character %C%s",
+ font,vect,char,not chardata[vect][char] and " (missing)" or ""
+ )
+ end
+ newfont = vect
+ if fakemono then
+ newchar = monoslot(vect,char,font,fakemono)
+ else
+ newchar = char
+ end
+ end
+ local rscale = vector.rscale
+ if rscale and rscale ~= 1 then
+ local s, x, y = getscales(n)
+ setscales(n,s*rscale,x*rscale,y*rscale)
+ end
+ setfont(n,newfont,newchar)
+ setprop(n, "original", { font = font, char = char })
+ end
+ end
+ end
+ return head
+end
+
+function collections.found(font,char) -- this way we keep feature processing
+ if not char then
+ font, char = currentfont(), font
+ end
+ if chardata[font][char] then
+ return true -- in normal font
+ else
+ local v = vectors[font]
+ return v and v[char] and true or false
+ end
+end
+
+-- interface
+
+implement {
+ name = "fontcollectiondefine",
+ actions = collections.define,
+ arguments = "4 strings",
+}
+
+implement {
+ name = "fontcollectionreset",
+ actions = collections.reset,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "fontcollectionprepare",
+ actions = collections.prepare,
+ arguments = "string"
+}
+
+implement {
+ name = "fontcollectionreport",
+ actions = collections.report,
+ arguments = "string"
+}
+
+implement {
+ name = "fontcollectionregister",
+ actions = collections.registermain,
+ arguments = "string"
+}
+
+implement {
+ name = "fontcollectionclone",
+ actions = collections.clonevector,
+ arguments = "string"
+}
+
+implement {
+ name = "doifelsecharinfont",
+ actions = { collections.found, commands.doifelse },
+ arguments = "integer"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-col.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-col.mklx
new file mode 100644
index 00000000000..e6500dd7620
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-col.mklx
@@ -0,0 +1,150 @@
+%D \module
+%D [ file=font-col,
+%D version=2008.06.11,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Fallbacks (collections),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo : missing only, force always, multiple fallbacks with test, scale
+% beware : only english key/values
+%
+% \resetfontfallback [whatever]
+%
+% \definefontfallback [whatever] [Slanted] [0x0060-0x007F] [force=yes]
+% \definefontfallback [whatever] [Bold] [0x0080-0x00FF,0x00A0-0x00AF] [rscale=1.2]
+% \definefontfallback [whatever] [BoldSlanted] [0x00C0-0x00C7] [check=yes,force=yes]
+%
+% \definefontfeature [emboldened] [effect={width=0.1,delta=0.4,factor=0.3}]
+% \definefontsynonym [SansEmboldened] [Sans] [features=emboldened]
+% \definefontfallback[FakeSansCaps] [SansEmboldened] [0x0000-0xFFFF] [rscale=.8,method=uppercase]
+% \definefontsynonym [SansCaps] [file:MyriadPro-Regular.otf] [fallbacks=FakeSansCaps]
+
+\writestatus{loading}{ConTeXt Font Macros / Collections}
+
+\registerctxluafile{font-col}{autosuffix}
+
+\unprotect
+
+\permanent\tolerant\protected\def\definefontfallback[#name]#spacer[#font]#spacer[#ranges]#spacer[#settings]%
+ {\let\mathsizesuffix\relax
+ \clf_fontcollectiondefine{#name}{#font}{#ranges}{#settings}%
+ \let\mathsizesuffix\empty}
+
+\permanent\tolerant\protected\def\resetfontfallback[#name]#spacer[#font]%
+ {\clf_fontcollectionreset{#name}{#font}}
+
+\def\font_fallbacks_prepare#name%
+ {\clf_fontcollectionprepare{#name}} % add fallbacks to last font
+
+% we might as well move the handling to lua but then we need to pass the
+% fallbacks, skewchar etc.
+
+\newconditional\c_font_fallbacks_in_progress
+
+\def\font_fallbacks_prepare_indeed#fallbacks%
+ {\begingroup
+ \settrue\c_font_fallbacks_in_progress
+ \lastrawfontcall % sets current font id
+ \font_fallbacks_prepare#fallbacks%
+ \endgroup}
+
+\let\m_font_fallbacks\empty % set in the font-ini
+
+\appendtoks
+ \ifconditional\c_font_fallbacks_in_progress\else
+ \ifempty\m_font_fallbacks
+ \ifempty\m_font_class_fallbacks\else
+ \font_fallbacks_prepare_indeed\m_font_class_fallbacks
+ \fi
+ \else
+ \font_fallbacks_prepare_indeed\m_font_fallbacks
+ \fi
+ \fi
+\to\everydefinefont
+
+\let\m_font_fallbacks_spec\empty
+
+\def\font_fallbacks_start_cloning
+ {\begingroup
+ \let\m_font_fallbacks_spec\somefontspec}
+
+\def\font_fallbacks_stop_cloning
+ {\endgroup}
+
+\def\font_fallbacks_clone_unique#specification#scale% kind of dododefinefont
+ {\clf_fontcollectionreport{defining #specification (relative scale: #scale)}% brrr
+ \setfalse\c_font_auto_size
+ \let\lastfontidentifier\s!dummy
+ \def\v_font_size_relative{#scale}%
+ \let\v_font_size_absolute\fontbody
+ \font_helpers_low_level_define{#specification}\v_font_identifier_basic
+ \csname\v_font_identifier_basic\endcsname
+ \setfalse\c_font_auto_size} % no \setfontcharacteristics and \the\everyfontswitch needed
+
+\def\font_fallbacks_clone_inherited#font% also a second argument
+ {\font_fallbacks_clone_unique{#font \m_font_fallbacks_spec}}
+
+\def\font_fallbacks_register_main #name{\clf_fontcollectionregister{#name}}
+\def\font_fallbacks_prepare_clone_vectors#name{\clf_fontcollectionclone{#name}}
+
+% math (experiment, todo clf_)
+
+\def\font_fallbacks_register_math#1#2#3#4%
+ {\doifelsenothing{#3}%
+ {\definedfont[#2 at #4sp]}%
+ {\definedfont[#2*#3\space at #4\scaledpoint]}%
+ \clf_registerfontfallbackid#1\space\fontid\font\space{#2}}
+
+% \def\font_fallbacks_finish_math
+% {\ctxlua{mathematics.finishfallbacks()}}
+
+% check : only replace when present in replacement font (default: no)
+% force : force replacent even when basefont has glyph (default: yes)
+
+% \definefontfallback [whatever] [Slanted] [0x0060-0x007F] [force=yes]
+% \definefontfallback [whatever] [Bold] [0x0080:0x00FF,0x00A0:0x00AF] [rscale=2.0]
+% \definefontfallback [whatever] [BoldSlanted] ["00C0-"00C7] [check=yes,force=yes]
+% \definefontfallback [whatever] [Mono] [latinextendeda] [force=yes] % 0x0100:0x017F
+% \definefontfallback [whatever] [Mono] [latin extended a] [force=yes] % 0x0100:0x017F
+%
+% \definefontsynonym[SerifPlus][Serif][fallbacks=whatever]
+%
+% \showfont[SerifPlus][all]
+
+% \definefontfeature[zh][mode=node,script=hang,lang=zhs]
+% \definefontfallback[serifwhatever] [lmroman10-regular] [0x0000-0x0400][force=yes]
+% \definefontfallback[serifboldwhatever] [lmroman10-bold] [0x0000-0x0400][force=yes]
+% \definefontfallback[serifitalicwhatever] [lmroman10-italic] [0x0000-0x0400][force=yes]
+% \definefontfallback[serifbolditalicwhatever][lmroman10-bolditalic][0x0000-0x0400][force=yes]
+%
+% \starttypescript [serif] [zhfont]
+% \definefontsynonym [zhserif] [AdobeSongStd-Light] [features=zh,fallbacks=serifwhatever]
+% \definefontsynonym [zhserifbold] [AdobeHeitiStd-Regular][features=zh,fallbacks=serifboldwhatever]
+% \definefontsynonym [zhserifitalic] [AdobeKaitiStd-Regular][features=zh,fallbacks=serifitalicwhatever]
+% \definefontsynonym [zhserifbolditalic][AdobeHeitiStd-Regular][features=zh,fallbacks=serifbolditalicwhatever]
+% \stoptypescript
+%
+% \starttypescript [serif][zhfont][name]
+% \definefontsynonym[Serif] [zhserif] % [fallbacks=serifwhatever]
+% \definefontsynonym[SerifBold] [zhserifbold] % [fallbacks=serifboldwhatever]
+% \definefontsynonym[SerifItalic] [zhserifitalic] % [fallbacks=serifitalicwhatever]
+% \definefontsynonym[SerifBoldItalic] [zhserifbolditalic] % [fallbacks=serifbolditalicwhatever]
+% \stoptypescript
+%
+% \starttypescript[myfont]
+% \definetypeface[myfont][rm][serif][zhfont]
+% \stoptypescript
+%
+% \usetypescript[myfont] \setupbodyfont[myfont,rm,12pt]
+%
+% \starttext
+% fonts {\bf fonts} {\bi fonts} {\it fonts}
+% \stoptext
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-con.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-con.lmt
new file mode 100644
index 00000000000..bebc4e4984f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-con.lmt
@@ -0,0 +1,1508 @@
+if not modules then modules = { } end modules ['font-con'] = {
+ 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"
+}
+
+-- some names of table entries will be changed (no _)
+
+local next, tostring, tonumber, rawget = next, tostring, tonumber, rawget
+local format, match, lower, gsub, find = string.format, string.match, string.lower, string.gsub, string.find
+local sort, insert, concat = table.sort, table.insert, table.concat
+local sortedkeys, sortedhash, serialize, fastcopy = table.sortedkeys, table.sortedhash, table.serialize, table.fastcopy
+local derivetable = table.derive
+local ioflush = io.flush
+local round = math.round
+local setmetatable, getmetatable, rawget, rawset = setmetatable, getmetatable, rawget, rawset
+
+local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
+local trace_scaling = false trackers.register("fonts.scaling", function(v) trace_scaling = v end)
+
+local report_defining = logs.reporter("fonts","defining")
+
+-- watch out: no negative depths and negative eights permitted in regular fonts
+
+--[[ldx--
+<p>Here we only implement a few helper functions.</p>
+--ldx]]--
+
+local fonts = fonts
+local constructors = fonts.constructors or { }
+fonts.constructors = constructors
+local handlers = fonts.handlers or { } -- can have preloaded tables
+fonts.handlers = handlers
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+
+-- will be directives
+
+constructors.version = 1.01
+constructors.cache = containers.define("fonts", "constructors", constructors.version, false)
+
+constructors.privateoffset = fonts.privateoffsets.textbase or 0xF0000
+
+-- This might become an interface:
+
+local designsizes = allocate()
+constructors.designsizes = designsizes
+local loadedfonts = allocate()
+constructors.loadedfonts = loadedfonts
+
+----- 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]]--
+
+local factors = {
+ pt = 65536.0,
+ bp = 65781.8,
+}
+
+function constructors.setfactor(f)
+ constructors.factor = factors[f or 'pt'] or factors.pt
+end
+
+constructors.setfactor()
+
+function constructors.scaled(scaledpoints, designsize) -- handles designsize in sp as well
+ if scaledpoints < 0 then
+ local factor = constructors.factor
+ if designsize then
+ if designsize > factor then -- or just 1000 / when? mp?
+ return (- scaledpoints/1000) * designsize -- sp's
+ else
+ return (- scaledpoints/1000) * designsize * factor
+ end
+ else
+ return (- scaledpoints/1000) * 10 * factor
+ end
+ else
+ return scaledpoints
+ end
+end
+
+function constructors.getprivate(tfmdata)
+ local properties = tfmdata.properties
+ local private = properties.private
+ properties.private = private + 1
+ return private
+end
+
+function constructors.setmathparameter(tfmdata,name,value)
+ local m = tfmdata.mathparameters
+ local c = tfmdata.MathConstants
+ if m then
+ m[name] = value
+ end
+ if c and c ~= m then
+ c[name] = value
+ end
+end
+
+function constructors.getmathparameter(tfmdata,name)
+ local p = tfmdata.mathparameters or tfmdata.MathConstants
+ if p then
+ return p[name]
+ 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]]--
+
+-- 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 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
+
+function constructors.assignmathparameters(target,original)
+ -- implemented in math-act.lua
+end
+
+function constructors.beforecopyingcharacters(target,original)
+ -- can be used for additional tweaking
+end
+
+function constructors.aftercopyingcharacters(target,original)
+ -- can be used for additional tweaking
+end
+
+function constructors.trytosharefont(target,tfmdata)
+ -- implemented in font-def.lmt
+end
+
+local synonyms = {
+ exheight = "x_height",
+ xheight = "x_height",
+ ex = "x_height",
+ emwidth = "quad",
+ em = "quad",
+ spacestretch = "space_stretch",
+ stretch = "space_stretch",
+ spaceshrink = "space_shrink",
+ shrink = "space_shrink",
+ extraspace = "extra_space",
+ xspace = "extra_space",
+ slantperpoint = "slant",
+}
+
+function constructors.enhanceparameters(parameters)
+ local mt = getmetatable(parameters)
+ local getter = function(t,k)
+ if not k then
+ return nil
+ end
+ local s = synonyms[k]
+ if s then
+ return rawget(t,s) or (mt and mt[s]) or nil
+ end
+ if k == "spacing" then
+ return {
+ width = t.space,
+ stretch = t.space_stretch,
+ shrink = t.space_shrink,
+ extra = t.extra_space,
+ }
+ end
+ return mt and mt[k] or nil
+ end
+ local setter = function(t,k,v)
+ if not k then
+ return 0
+ end
+ local s = synonyms[k]
+ if s then
+ rawset(t,s,v)
+ elseif k == "spacing" then
+ if type(v) == "table" then
+ rawset(t,"space",v.width or 0)
+ rawset(t,"space_stretch",v.stretch or 0)
+ rawset(t,"space_shrink",v.shrink or 0)
+ rawset(t,"extra_space",v.extra or 0)
+ end
+ else
+ rawset(t,k,v)
+ end
+ end
+ setmetatable(parameters, {
+ __index = getter,
+ __newindex = setter,
+ })
+end
+
+local function mathkerns(v,vdelta)
+ local k = { }
+ for i=1,#v do
+ local entry = v[i]
+ local height = entry.height
+ local kern = entry.kern
+ k[i] = {
+ height = height and vdelta*height or 0,
+ kern = kern and vdelta*kern or 0,
+ }
+ end
+ return k
+end
+
+local psfake = 0
+
+local function fixedpsname(psname,fallback)
+ local usedname = psname
+ if psname and psname ~= "" then
+ if find(psname," ",1,true) then
+ usedname = gsub(psname,"[%s]+","-")
+ else
+ -- we assume that the name is sane enough (we might sanitize completely some day)
+ end
+ elseif not fallback or fallback == "" then
+ psfake = psfake + 1
+ psname = "fakename-" .. psfake
+ else
+ -- filenames can be a mess so we do a drastic cleanup
+ psname = fallback
+ usedname = gsub(psname,"[^a-zA-Z0-9]+","-")
+ end
+ return usedname, psname ~= usedname
+end
+
+function constructors.scale(tfmdata,specification)
+ local target = { } -- the new table
+ --
+ if tonumber(specification) then
+ specification = { size = specification }
+ end
+ target.specification = specification
+ --
+ local scalecommands = fonts.helpers.scalecommands -- defined later
+ --
+ local scaledpoints = specification.size
+ local relativeid = specification.relativeid
+ --
+ local properties = tfmdata.properties or { }
+ local goodies = tfmdata.goodies or { }
+ local resources = tfmdata.resources or { }
+ local descriptions = tfmdata.descriptions or { } -- bad news if empty
+ local characters = tfmdata.characters or { } -- bad news if empty
+ local changed = tfmdata.changed or { } -- for base mode
+ local shared = tfmdata.shared or { }
+ local parameters = tfmdata.parameters or { }
+ local mathparameters = tfmdata.mathparameters or { }
+ --
+ local targetcharacters = { }
+ local targetdescriptions = derivetable(descriptions)
+ local targetparameters = derivetable(parameters)
+ local targetproperties = derivetable(properties)
+ local targetgoodies = goodies -- we need to loop so no metatable
+ target.characters = targetcharacters
+ target.descriptions = targetdescriptions
+ target.parameters = targetparameters
+ -- target.mathparameters = targetmathparameters -- happens elsewhere
+ target.properties = targetproperties
+ target.goodies = targetgoodies
+ target.shared = shared
+ target.resources = resources
+ target.unscaled = tfmdata -- the original unscaled one
+ --
+ -- specification.mathsize : 1=text 2=script 3=scriptscript
+ -- specification.textsize : natural (text)size
+ -- parameters.mathsize : 1=text 2=script 3=scriptscript >1000 enforced size (feature value other than yes)
+ --
+ local mathsize = tonumber(specification.mathsize) or 0
+ local textsize = tonumber(specification.textsize) or scaledpoints
+ local forcedsize = tonumber(parameters.mathsize ) or 0 -- can be set by the feature "mathsize"
+ local extrafactor = tonumber(specification.factor ) or 1
+ if (mathsize == 2 or forcedsize == 2) and parameters.scriptpercentage then
+ scaledpoints = parameters.scriptpercentage * textsize / 100
+ elseif (mathsize == 3 or forcedsize == 3) and parameters.scriptscriptpercentage then
+ scaledpoints = parameters.scriptscriptpercentage * textsize / 100
+ elseif forcedsize > 1000 then -- safeguard
+ scaledpoints = forcedsize
+ else
+ -- in context x and xx also use mathsize
+ end
+ targetparameters.mathsize = mathsize
+ targetparameters.textsize = textsize
+ targetparameters.forcedsize = forcedsize
+ targetparameters.extrafactor = extrafactor
+ --
+ local defaultwidth = resources.defaultwidth or 0
+ local defaultheight = resources.defaultheight or 0
+ local defaultdepth = resources.defaultdepth or 0
+ local units = parameters.units or 1000
+ --
+ -- boundary keys are no longer needed as we now have a string 'right_boundary'
+ -- that can be used in relevant tables (kerns and ligatures) ... not that I ever
+ -- used them
+ --
+ -- boundarychar_label = 0, -- not needed
+ -- boundarychar = 65536, -- there is now a string 'right_boundary'
+ -- false_boundarychar = 65536, -- produces invalid tfm in luatex
+ --
+ targetproperties.language = properties.language or "dflt" -- inherited
+ targetproperties.script = properties.script or "dflt" -- inherited
+ targetproperties.mode = properties.mode or "base" -- inherited
+ targetproperties.method = properties.method
+ --
+ local askedscaledpoints = scaledpoints
+ local scaledpoints, delta = constructors.calculatescale(tfmdata,scaledpoints,nil,specification) -- no shortcut, dan be redefined
+ --
+ local hdelta = delta
+ local vdelta = delta
+ --
+ target.designsize = parameters.designsize -- not really needed so it might become obsolete
+ target.units = units
+ --
+ target.size = scaledpoints
+ --
+ target.subfont = properties.subfont
+ target.cidinfo = properties.cidinfo
+ target.format = properties.format
+ --
+ local original = properties.original or tfmdata.original
+ local fontname = properties.fontname or tfmdata.fontname
+ local fullname = properties.fullname or tfmdata.fullname
+ local filename = properties.filename or tfmdata.filename
+ local psname = properties.psname or tfmdata.psname
+ local name = properties.name or tfmdata.name
+ --
+ -- The psname used in pdf file as well as for selecting subfont in ttc although
+ -- we don't need that subfont look up here (mapfile stuff).
+ --
+ local psname, psfixed = fixedpsname(psname,fontname or fullname or file.nameonly(filename))
+ --
+ target.original = original
+ target.fontname = fontname
+ target.fullname = fullname
+ target.filename = filename
+ target.psname = psname
+ target.name = name
+ --
+ properties.fontname = fontname
+ properties.fullname = fullname
+ properties.filename = filename
+ properties.psname = psname
+ properties.name = name
+ -- expansion (hz)
+ local expansion = parameters.expansion
+ if expansion then
+ target.stretch = expansion.stretch
+ target.shrink = expansion.shrink
+ target.step = expansion.step
+ end
+ -- slanting
+ local slantfactor = parameters.slantfactor or 0
+ if slantfactor ~= 0 then
+ target.slant = slantfactor * 1000
+ else
+ target.slant = 0
+ end
+ -- widening
+ local extendfactor = parameters.extendfactor or 0
+ if extendfactor ~= 0 and extendfactor ~= 1 then
+ hdelta = hdelta * extendfactor
+ target.extend = extendfactor * 1000
+ else
+ target.extend = 1000 -- extent ?
+ end
+ -- squeezing
+ local squeezefactor = parameters.squeezefactor or 0
+ if squeezefactor ~= 0 and squeezefactor ~= 1 then
+ vdelta = vdelta * squeezefactor
+ target.squeeze = squeezefactor * 1000
+ else
+ target.squeeze = 1000 -- extent ?
+ end
+ -- effects
+ local mode = parameters.mode or 0
+ if mode ~= 0 then
+ target.mode = mode
+ end
+ local width = parameters.width or 0
+ if width ~= 0 then
+ target.width = width * delta * 1000 / 655360
+ end
+ --
+ targetparameters.factor = delta
+ targetparameters.hfactor = hdelta
+ targetparameters.vfactor = vdelta
+ targetparameters.size = scaledpoints
+ targetparameters.units = units
+ targetparameters.scaledpoints = askedscaledpoints
+ targetparameters.mode = mode
+ targetparameters.width = width
+ --
+ local hasquality = parameters.expansion or parameters.protrusion
+ local hasitalics = properties.hasitalics
+ local autoitalicamount = properties.autoitalicamount
+ local stackmath = not properties.nostackmath
+ local haskerns = properties.haskerns or properties.mode == "base" -- we can have afm in node mode
+ local hasligatures = properties.hasligatures or properties.mode == "base" -- we can have afm in node mode
+ local realdimensions = properties.realdimensions
+ local writingmode = properties.writingmode or "horizontal"
+ --
+ if changed and not next(changed) then
+ changed = false
+ end
+ --
+ target.writingmode = writingmode == "vertical" and "vertical" or "horizontal"
+ --
+ target.postprocessors = tfmdata.postprocessors
+ --
+ local targetslant = (parameters.slant or parameters[1] or 0) * factors.pt -- per point
+ local targetspace = (parameters.space or parameters[2] or 0) * hdelta
+ local targetspace_stretch = (parameters.space_stretch or parameters[3] or 0) * hdelta
+ local targetspace_shrink = (parameters.space_shrink or parameters[4] or 0) * hdelta
+ local targetx_height = (parameters.x_height or parameters[5] or 0) * vdelta
+ local targetquad = (parameters.quad or parameters[6] or 0) * hdelta
+ local targetextra_space = (parameters.extra_space or parameters[7] or 0) * hdelta
+ --
+ targetparameters.slant = targetslant -- slantperpoint
+ targetparameters.space = targetspace
+ targetparameters.space_stretch = targetspace_stretch
+ targetparameters.space_shrink = targetspace_shrink
+ targetparameters.x_height = targetx_height
+ targetparameters.quad = targetquad
+ targetparameters.extra_space = targetextra_space
+ --
+ local hshift = parameters.hshift
+ if hshift then
+ targetparameters.hshift = delta * hshift
+ end
+ local vshift = parameters.vshift
+ if vshift then
+ targetparameters.vshift = delta * vshift
+ end
+ --
+ local ascender = parameters.ascender
+ if ascender then
+ targetparameters.ascender = delta * ascender
+ end
+ local descender = parameters.descender
+ if descender then
+ targetparameters.descender = delta * descender
+ end
+ --
+ constructors.enhanceparameters(targetparameters) -- official copies for us, now virtual
+ --
+ local scaledwidth = defaultwidth * hdelta
+ local scaledheight = defaultheight * vdelta
+ local scaleddepth = defaultdepth * vdelta
+ --
+ local hasmath = (properties.hasmath or next(mathparameters)) and true
+ --
+ if hasmath then
+ constructors.assignmathparameters(target,tfmdata) -- does scaling and whatever is needed
+
+ properties.hasmath = true
+ target.nomath = false
+ target.MathConstants = target.mathparameters
+
+ properties.compactmath = true
+ target.compactmath = true
+
+ local textscale = parameters.textscale -- or 1000
+ local scriptscale = parameters.scriptscale -- or 700
+ local scriptscriptscale = parameters.scriptscriptscale -- or 500
+
+ parameters.textscale = textscale
+ parameters.scriptscale = scriptscale
+ parameters.scriptscriptscale = scriptscriptscale
+
+ target.textscale = textscale
+ target.scriptscale = scriptscale
+ target.scriptscriptscale = scriptscriptscale
+
+ targetparameters.textscale = textscale
+ targetparameters.scriptscale = scriptscale
+ targetparameters.scriptscriptscale = scriptscriptscale
+
+ -- todo: maybe retrofit to font-con.lua
+
+ local oldmath = properties.oldmath
+ targetproperties.oldmath = oldmath
+ target.oldmath = oldmath
+
+ else
+ properties.hasmath = false
+ target.nomath = true
+ target.mathparameters = nil -- nop
+ end
+ --
+ -- During the transition to opentype the engine had troubles with italics so we had some
+ -- additional code for fixing that. In node mode (text) we don't care much if italics gets
+ -- passed because the engine does nothing with them then.
+ --
+ if hasmath then
+ local mathitalics = properties.mathitalics
+ if mathitalics == false then
+ if trace_defining then
+ report_defining("%s italics %s for font %a, fullname %a, filename %a","math",hasitalics and "ignored" or "disabled",name,fullname,filename)
+ end
+ hasitalics = false
+ autoitalicamount = false
+ end
+ else
+ local textitalics = properties.textitalics
+ if textitalics == false then
+ if trace_defining then
+ report_defining("%s italics %s for font %a, fullname %a, filename %a","text",hasitalics and "ignored" or "disabled",name,fullname,filename)
+ end
+ hasitalics = false
+ autoitalicamount = false
+ end
+ end
+ --
+ -- end of context specific trickery
+ --
+ if trace_defining then
+ report_defining("defining tfm, name %a, fullname %a, filename %a, %spsname %a, hscale %a, vscale %a, math %a, italics %a",
+ name,fullname,filename,psfixed and "(fixed) " or "",psname,hdelta,vdelta,
+ hasmath and "enabled" or "disabled",hasitalics and "enabled" or "disabled")
+ end
+ --
+ constructors.beforecopyingcharacters(target,tfmdata)
+ --
+ local sharedkerns = { }
+ --
+ -- we can have a dumb mode (basemode without math etc) that skips most
+ --
+ for unicode, character in next, characters do
+ local chr, description, index
+ if changed then
+ local c = changed[unicode]
+ if c and c ~= unicode then
+ if c then
+ description = descriptions[c] or descriptions[unicode] or character
+ character = characters[c] or character
+ index = description.index or c
+ else
+ description = descriptions[unicode] or character
+ index = description.index or unicode
+ end
+ else
+ description = descriptions[unicode] or character
+ index = description.index or unicode
+ end
+ else
+ description = descriptions[unicode] or character
+ index = description.index or unicode
+ end
+ local width = description.width
+ local height = description.height
+ local depth = description.depth
+ local isunicode = description.unicode
+ if realdimensions then
+ -- this is mostly for checking issues
+ if not height or height == 0 then
+ local bb = description.boundingbox
+ local ht = bb[4]
+ if ht ~= 0 then
+ height = ht
+ end
+ if not depth or depth == 0 then
+ local dp = -bb[2]
+ if dp ~= 0 then
+ depth = dp
+ end
+ end
+ elseif not depth or depth == 0 then
+ local dp = -description.boundingbox[2]
+ if dp ~= 0 then
+ depth = dp
+ end
+ end
+ end
+ if width then width = hdelta*width else width = scaledwidth end
+ if height then height = vdelta*height else height = scaledheight end
+ -- if depth then depth = vdelta*depth else depth = scaleddepth end
+ if depth and depth ~= 0 then
+ depth = delta*depth
+ if isunicode then
+ chr = {
+ index = index,
+ height = height,
+ depth = depth,
+ width = width,
+ unicode = isunicode,
+ }
+ else
+ chr = {
+ index = index,
+ height = height,
+ depth = depth,
+ width = width,
+ }
+ end
+ else
+ if isunicode then
+ chr = {
+ index = index,
+ height = height,
+ width = width,
+ unicode = isunicode,
+ }
+ else
+ chr = {
+ index = index,
+ height = height,
+ width = width,
+ }
+ end
+ end
+ if hasquality then
+ -- we could move these calculations elsewhere (saves calculations)
+ local ve = character.expansion_factor
+ if ve then
+ chr.expansion_factor = ve*1000 -- expansionfactor, hm, can happen elsewhere
+ end
+ local vl = character.left_protruding
+ if vl then
+ chr.left_protruding = width*vl
+ end
+ local vr = character.right_protruding
+ if vr then
+ chr.right_protruding = width*vr
+ end
+ end
+ --
+ if hasmath then
+ --
+ -- todo, just operate on descriptions.math
+ local vn = character.next
+ if vn then
+ chr.next = vn
+ else
+ local vv = character.vert_variants
+ if vv then
+ local t = { }
+ for i=1,#vv do
+ local vvi = vv[i]
+ local s = vvi["start"] or 0
+ local e = vvi["end"] or 0
+ local a = vvi["advance"] or 0
+ t[i] = { -- zero check nicer for 5.3
+ ["start"] = s == 0 and 0 or s * vdelta,
+ ["end"] = e == 0 and 0 or e * vdelta,
+ ["advance"] = a == 0 and 0 or a * vdelta,
+ ["extender"] = vvi["extender"],
+ ["glyph"] = vvi["glyph"],
+ }
+ end
+ chr.vert_variants = t
+ else
+ local hv = character.horiz_variants
+ if hv then
+ local t = { }
+ for i=1,#hv do
+ local hvi = hv[i]
+ local s = hvi["start"] or 0
+ local e = hvi["end"] or 0
+ local a = hvi["advance"] or 0
+ t[i] = { -- zero check nicer for 5.3
+ ["start"] = s == 0 and 0 or s * hdelta,
+ ["end"] = e == 0 and 0 or e * hdelta,
+ ["advance"] = a == 0 and 0 or a * hdelta,
+ ["extender"] = hvi["extender"],
+ ["glyph"] = hvi["glyph"],
+ }
+ end
+ chr.horiz_variants = t
+ end
+ end
+ -- todo also check mathitalics (or that one can go away)
+ end
+ local vi = character.vert_italic
+ if vi and vi ~= 0 then
+ chr.vert_italic = vi*hdelta
+ end
+ local va = character.accent
+ if va then
+ chr.top_accent = vdelta*va
+ end
+ if stackmath then
+ local mk = character.mathkerns
+ if mk then
+ local tr = mk.topright
+ local tl = mk.topleft
+ local br = mk.bottomright
+ local bl = mk.bottomleft
+ chr.mathkern = { -- singular -> should be patched in luatex !
+ top_right = tr and mathkerns(tr,vdelta) or nil,
+ top_left = tl and mathkerns(tl,vdelta) or nil,
+ bottom_right = br and mathkerns(br,vdelta) or nil,
+ bottom_left = bl and mathkerns(bl,vdelta) or nil,
+ }
+ end
+ end
+ if hasitalics then
+ local vi = character.italic
+ if vi and vi ~= 0 then
+ chr.italic = vi*hdelta
+ end
+ end
+ elseif autoitalicamount then -- itlc feature
+ local vi = description.italic
+ if not vi then
+ local bb = description.boundingbox
+ if bb then
+ local vi = bb[3] - description.width + autoitalicamount
+ if vi > 0 then -- < 0 indicates no overshoot or a very small auto italic
+ chr.italic = vi*hdelta
+ end
+ else
+ -- report_defining("no boundingbox for character %C in font %a, fullname %a, filename %a",unicode,name,fullname,filename)
+ end
+ elseif vi ~= 0 then
+ chr.italic = vi*hdelta
+ end
+ elseif hasitalics then -- unlikely
+ local vi = character.italic
+ if vi and vi ~= 0 then
+ chr.italic = vi*hdelta
+ end
+ end
+ if haskerns then
+ local vk = character.kerns
+ if vk then
+ local s = sharedkerns[vk]
+ if not s then
+ s = { }
+ for k,v in next, vk do s[k] = v*hdelta end
+ sharedkerns[vk] = s
+ end
+ chr.kerns = s
+ end
+ end
+ if hasligatures then
+ local vl = character.ligatures
+ if vl then
+ if true then
+ chr.ligatures = vl -- shared
+ else
+ local tt = { }
+ for i, l in next, vl do
+ tt[i] = l
+ end
+ chr.ligatures = tt
+ end
+ end
+ end
+ local vc = character.commands
+ if vc then
+ chr.commands = scalecommands(vc,hdelta,vdelta)
+ end
+ targetcharacters[unicode] = chr
+ end
+ --
+ properties.setitalics = hasitalics -- for postprocessing
+ --
+ -- if hasmath then properties.mode = "none" end -- possible optimization but it needs testing
+ --
+ constructors.aftercopyingcharacters(target,tfmdata)
+ --
+ constructors.trytosharefont(target,tfmdata)
+ --
+ -- catch inconsistencies (for now)
+ --
+ local vfonts = target.fonts
+ if not vfonts or #vfonts == 0 then
+ target.fonts = { { id = 0 } }
+ end
+ --
+ return target
+end
+
+function constructors.finalize(tfmdata)
+ if tfmdata.properties and tfmdata.properties.finalized then
+ return
+ end
+ --
+ if not tfmdata.characters then
+ return nil
+ end
+ --
+ if not tfmdata.goodies then
+ tfmdata.goodies = { }
+ end
+ --
+ local parameters = tfmdata.parameters
+ if not parameters then
+ return nil
+ end
+ --
+ if not parameters.expansion then
+ parameters.expansion = {
+ stretch = tfmdata.stretch or 0,
+ shrink = tfmdata.shrink or 0,
+ step = tfmdata.step or 0,
+ }
+ end
+ --
+ if not parameters.size then
+ parameters.size = tfmdata.size
+ end
+ --
+ if not parameters.mode then
+ parameters.mode = 0
+ end
+ --
+ if not parameters.width then
+ parameters.width = 0
+ end
+ --
+ if not parameters.slantfactor then
+ parameters.slantfactor = (tfmdata.slant or 0)/1000
+ end
+ --
+ if not parameters.extendfactor then
+ parameters.extendfactor = (tfmdata.extend or 1000)/1000
+ end
+ --
+ if not parameters.squeezefactor then
+ parameters.squeezefactor = (tfmdata.squeeze or 1000)/1000
+ end
+ --
+ local designsize = parameters.designsize
+ if designsize then
+ parameters.minsize = tfmdata.minsize or designsize
+ parameters.maxsize = tfmdata.maxsize or designsize
+ else
+ designsize = factors.pt * 10
+ parameters.designsize = designsize
+ parameters.minsize = designsize
+ parameters.maxsize = designsize
+ end
+ parameters.minsize = tfmdata.minsize or parameters.designsize
+ parameters.maxsize = tfmdata.maxsize or parameters.designsize
+ --
+ if not parameters.units then
+ parameters.units = tfmdata.units or 1000
+ end
+ --
+ if not tfmdata.descriptions then
+ local descriptions = { } -- yes or no
+ setmetatableindex(descriptions, function(t,k) local v = { } t[k] = v return v end)
+ tfmdata.descriptions = descriptions
+ end
+ --
+ local properties = tfmdata.properties
+ if not properties then
+ properties = { }
+ tfmdata.properties = properties
+ end
+ --
+ properties.fontname = properties.fontname or tfmdata.fontname
+ properties.filename = properties.filename or tfmdata.filename
+ properties.fullname = properties.fullname or tfmdata.fullname
+ properties.name = properties.name or tfmdata.name
+ properties.psname = properties.psname or tfmdata.psname
+ --
+ properties.subfont = tfmdata.subfont or nil
+ properties.cidinfo = tfmdata.cidinfo or nil
+ properties.format = tfmdata.format or "type1"
+ properties.writingmode = tfmdata.writingmode or "horizontal"
+ properties.usedbitmap = tfmdata.usedbitmap
+ --
+ if not tfmdata.resources then
+ tfmdata.resources = { }
+ end
+ if not tfmdata.shared then
+ tfmdata.shared = { }
+ end
+ --
+ -- tfmdata.fonts
+ -- tfmdata.unscaled
+ --
+ if not properties.hasmath then
+ properties.hasmath = not tfmdata.nomath
+ end
+ --
+ tfmdata.MathConstants = nil
+ tfmdata.postprocessors = nil
+ --
+ tfmdata.fontname = nil
+ tfmdata.filename = nil
+ tfmdata.fullname = nil
+ tfmdata.name = nil -- most tricky part
+ tfmdata.psname = nil
+ --
+ tfmdata.subfont = nil
+ tfmdata.cidinfo = nil
+ tfmdata.format = nil
+ tfmdata.nomath = nil
+ tfmdata.designsize = nil
+ --
+ tfmdata.size = nil
+ tfmdata.stretch = nil
+ tfmdata.shrink = nil
+ tfmdata.step = nil
+ tfmdata.slant = nil
+ tfmdata.extend = nil
+ tfmdata.squeeze = nil
+ tfmdata.mode = nil
+ tfmdata.width = nil
+ tfmdata.units = nil
+ --
+ tfmdata.cache = nil
+ --
+ properties.finalized = true
+ --
+ return tfmdata
+end
+
+--[[ldx--
+<p>A unique hash value is generated by:</p>
+--ldx]]--
+
+local hashmethods = { }
+constructors.hashmethods = hashmethods
+
+function constructors.hashfeatures(specification) -- will be overloaded
+ local features = specification.features
+ if features then
+ local t, n = { }, 0
+ for category, list in sortedhash(features) do
+ if next(list) then
+ local hasher = hashmethods[category]
+ if hasher then
+ local hash = hasher(list)
+ if hash then
+ n = n + 1
+ t[n] = category .. ":" .. hash
+ end
+ end
+ end
+ end
+ if n > 0 then
+ return concat(t," & ")
+ end
+ end
+ return "unknown"
+end
+
+hashmethods.normal = function(list)
+ local s = { }
+ local n = 0
+ for k, v in next, list do
+ if not k then
+ -- no need to add to hash
+ elseif k == "number" or k == "features" then
+ -- no need to add to hash (maybe we need a skip list)
+ else
+ n = n + 1
+ if type(v) == "table" then
+ -- table.sequenced
+ local t = { }
+ local m = 0
+ for k, v in next, v do
+ m = m + 1
+ t[m] = k .. '=' .. tostring(v)
+ end
+ sort(t)
+ s[n] = k .. '={' .. concat(t,",") .. "}"
+ else
+ s[n] = k .. '=' .. tostring(v)
+ end
+ end
+ end
+ if n > 0 then
+ sort(s)
+ return concat(s,"+")
+ 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]]--
+
+function constructors.hashinstance(specification,force)
+ -- implemented in font-ctx.lmt
+end
+
+function constructors.setname(tfmdata,specification)
+ -- dummy (still called in generic font-otl)
+end
+
+function constructors.checkedfilename(data)
+ local foundfilename = data.foundfilename
+ if not foundfilename then
+ local askedfilename = data.filename or ""
+ if askedfilename ~= "" then
+ askedfilename = resolvers.resolve(askedfilename) -- no shortcut
+ foundfilename = resolvers.findbinfile(askedfilename,"") or ""
+ if foundfilename == "" then
+ report_defining("source file %a is not found",askedfilename)
+ foundfilename = resolvers.findbinfile(file.basename(askedfilename),"") or ""
+ if foundfilename ~= "" then
+ report_defining("using source file %a due to cache mismatch",foundfilename)
+ end
+ end
+ end
+ data.foundfilename = foundfilename
+ end
+ return foundfilename
+end
+
+local formats = allocate()
+fonts.formats = formats
+
+setmetatableindex(formats, function(t,k)
+ local l = lower(k)
+ if rawget(t,k) then
+ t[k] = l
+ return l
+ end
+ return rawget(t,file.suffix(l))
+end)
+
+do
+
+ local function setindeed(mode,source,target,group,name,position)
+ local action = source[mode]
+ if not action then
+ return
+ end
+ local t = target[mode]
+ if not t then
+ report_defining("fatal error in setting feature %a, group %a, mode %a",name,group,mode)
+ os.exit()
+ elseif position then
+ -- todo: remove existing
+ insert(t, position, { name = name, action = action })
+ else
+ for i=1,#t do
+ local ti = t[i]
+ if ti.name == name then
+ ti.action = action
+ return
+ end
+ end
+ insert(t, { name = name, action = action })
+ end
+ end
+
+ local function set(group,name,target,source)
+ target = target[group]
+ if not target then
+ report_defining("fatal target error in setting feature %a, group %a",name,group)
+ os.exit()
+ end
+ local source = source[group]
+ if not source then
+ report_defining("fatal source error in setting feature %a, group %a",name,group)
+ os.exit()
+ end
+ local position = source.position
+ setindeed("node",source,target,group,name,position)
+ setindeed("base",source,target,group,name,position)
+ setindeed("plug",source,target,group,name,position)
+ end
+
+ local function register(where,specification)
+ local name = specification.name
+ if name and name ~= "" then
+ local default = specification.default
+ local description = specification.description
+ local initializers = specification.initializers
+ local processors = specification.processors
+ local manipulators = specification.manipulators
+ local modechecker = specification.modechecker
+ if default then
+ where.defaults[name] = default
+ end
+ if description and description ~= "" then
+ where.descriptions[name] = description
+ end
+ if initializers then
+ set('initializers',name,where,specification)
+ end
+ if processors then
+ set('processors', name,where,specification)
+ end
+ if manipulators then
+ set('manipulators',name,where,specification)
+ end
+ if modechecker then
+ where.modechecker = modechecker
+ end
+ end
+ end
+
+ constructors.registerfeature = register
+
+ function constructors.getfeatureaction(what,where,mode,name)
+ what = handlers[what].features
+ if what then
+ where = what[where]
+ if where then
+ mode = where[mode]
+ if mode then
+ for i=1,#mode do
+ local m = mode[i]
+ if m.name == name then
+ return m.action
+ end
+ end
+ end
+ end
+ end
+ end
+
+ local newfeatures = { }
+ constructors.newfeatures = newfeatures -- downward compatible
+ constructors.features = newfeatures
+
+ local function setnewfeatures(what)
+ local handler = handlers[what]
+ local features = handler.features
+ if not features then
+ local tables = handler.tables -- can be preloaded
+ local statistics = handler.statistics -- can be preloaded
+ features = allocate {
+ defaults = { },
+ descriptions = tables and tables.features or { },
+ used = statistics and statistics.usedfeatures or { },
+ initializers = { base = { }, node = { }, plug = { } },
+ processors = { base = { }, node = { }, plug = { } },
+ manipulators = { base = { }, node = { }, plug = { } },
+ finalizers = { base = { }, node = { }, plug = { } },
+ }
+ features.register = function(specification) return register(features,specification) end
+ handler.features = features -- will also become hidden
+ end
+ return features
+ end
+
+ setmetatable(newfeatures, {
+ __call = function(t,k) local v = t[k] return v end,
+ __index = function(t,k) local v = setnewfeatures(k) t[k] = v return v end,
+ })
+
+end
+
+do
+
+ local newhandler = { }
+ constructors.handlers = newhandler -- downward compatible
+ constructors.newhandler = newhandler
+
+ local function setnewhandler(what) -- could be a metatable newindex
+ local handler = handlers[what]
+ if not handler then
+ handler = { }
+ handlers[what] = handler
+ end
+ return handler
+ end
+
+ setmetatable(newhandler, {
+ __call = function(t,k) local v = t[k] return v end,
+ __index = function(t,k) local v = setnewhandler(k) t[k] = v return v end,
+ })
+
+end
+
+do
+ -- a pitty that we need to be generic as we have nicer mechanisms for this ...
+
+ local newenhancer = { }
+ constructors.enhancers = newenhancer
+ constructors.newenhancer = newenhancer
+
+ local function setnewenhancer(format)
+
+ local handler = handlers[format]
+ local enhancers = handler.enhancers
+
+ if not enhancers then
+
+ local actions = allocate() -- no need to allocate thee
+ local before = allocate()
+ local after = allocate()
+ local order = allocate()
+ local known = { }
+ local nofsteps = 0
+ local patches = { before = before, after = after }
+
+ local trace = false
+ local report = logs.reporter("fonts",format .. " enhancing")
+
+ trackers.register(format .. ".loading", function(v) trace = v end)
+
+ local function enhance(name,data,filename,raw)
+ local enhancer = actions[name]
+ if enhancer then
+ if trace then
+ report("apply enhancement %a to file %a",name,filename)
+ ioflush()
+ end
+ enhancer(data,filename,raw)
+ else
+ -- no message as we can have private ones
+ end
+ end
+
+ local function apply(data,filename,raw)
+ local basename = file.basename(lower(filename))
+ if trace then
+ report("%s enhancing file %a","start",filename)
+ end
+ ioflush() -- we want instant messages
+ for e=1,nofsteps do
+ local enhancer = order[e]
+ local b = before[enhancer]
+ if b then
+ for pattern, action in next, b do
+ if find(basename,pattern) then
+ action(data,filename,raw)
+ end
+ end
+ end
+ enhance(enhancer,data,filename,raw) -- we have one installed: check extra features
+ local a = after[enhancer]
+ if a then
+ for pattern, action in next, a do
+ if find(basename,pattern) then
+ action(data,filename,raw)
+ end
+ end
+ end
+ ioflush() -- we want instant messages
+ end
+ if trace then
+ report("%s enhancing file %a","stop",filename)
+ end
+ ioflush() -- we want instant messages
+ end
+
+ local function register(what,action)
+ if action then
+ if actions[what] then
+ -- overloading, e.g."check extra features"
+ else
+ nofsteps = nofsteps + 1
+ order[nofsteps] = what
+ known[what] = nofsteps
+ end
+ actions[what] = action
+ else
+ report("bad enhancer %a",what)
+ end
+ end
+
+ -- We used to have a lot of enhancers but no longer with the new font loader. The order of enhancers
+ -- is the order of definition. The before/after patches are there for old times sake and happen
+ -- before or after a (named) enhancer. An example of a set enhancer is "check extra features" so one
+ -- one set patches before or after that is applied. Unknown enhancers are auto-registered. It's a bit
+ -- messy but we keep it for compatibility reasons.
+ --
+ -- fonts.handlers.otf.enhancers.patches.register("before","some patches","somefont",function(data,filename)
+ -- print("!!!!!!!") -- before | after
+ -- end)
+ --
+ -- fonts.handlers.otf.enhancers.register("more patches",function(data,filename)
+ -- print("???????") -- enhance
+ -- end)
+
+ local function patch(what,where,pattern,action)
+ local pw = patches[what]
+ if pw then
+ local ww = pw[where]
+ if ww then
+ ww[pattern] = action
+ else
+ pw[where] = { [pattern] = action }
+ if not known[where] then
+ nofsteps = nofsteps + 1
+ order[nofsteps] = where
+ known[where] = nofsteps
+ end
+ end
+ end
+ end
+
+ enhancers = {
+ register = register,
+ apply = apply,
+ patch = patch,
+ report = report,
+ patches = {
+ register = patch,
+ report = report,
+ }, -- for old times sake
+ }
+
+ handler.enhancers = enhancers
+ end
+ return enhancers
+ end
+
+ setmetatable(newenhancer, {
+ __call = function(t,k) local v = t[k] return v end,
+ __index = function(t,k) local v = setnewenhancer(k) t[k] = v return v end,
+ })
+
+end
+
+--[[ldx--
+<p>We need to check for default features. For this we provide
+a helper function.</p>
+--ldx]]--
+
+function constructors.checkedfeatures(what,features)
+ local defaults = handlers[what].features.defaults
+ if features and next(features) then
+ features = fastcopy(features) -- can be inherited (mt) but then no loops possible
+ for key, value in next, defaults do
+ if features[key] == nil then
+ features[key] = value
+ end
+ end
+ return features
+ else
+ return fastcopy(defaults) -- we can change features in place
+ end
+end
+
+-- before scaling
+
+function constructors.initializefeatures(what,tfmdata,features,trace,report)
+ if features and next(features) then
+ local properties = tfmdata.properties or { } -- brrr
+ local whathandler = handlers[what]
+ local whatfeatures = whathandler.features
+ local whatmodechecker = whatfeatures.modechecker
+ -- properties.mode can be enforces (for instance in font-otd)
+ local mode = properties.mode or (whatmodechecker and whatmodechecker(tfmdata,features,features.mode)) or features.mode or "base"
+ properties.mode = mode -- also status
+ features.mode = mode -- both properties.mode or features.mode can be changed
+ --
+ local done = { }
+ while true do
+ local redo = false
+ local initializers = whatfeatures.initializers[mode]
+ if initializers then
+ for i=1,#initializers do
+ local step = initializers[i]
+ local feature = step.name
+-- we could intercept mode here .. needs a rewrite of this whole loop then but it's cleaner that way
+ local value = features[feature]
+ if not value then
+ -- disabled
+ elseif done[feature] then
+ -- already done
+ else
+ local action = step.action
+ if trace then
+ report("initializing feature %a to %a for mode %a for font %a",feature,
+ value,mode,tfmdata.properties.fullname)
+ end
+ action(tfmdata,value,features) -- can set mode (e.g. goodies) so it can trigger a restart
+ if mode ~= properties.mode or mode ~= features.mode then
+ if whatmodechecker then
+ properties.mode = whatmodechecker(tfmdata,features,properties.mode) -- force checking
+ features.mode = properties.mode
+ end
+ if mode ~= properties.mode then
+ mode = properties.mode
+ redo = true
+ end
+ end
+ done[feature] = true
+ end
+ if redo then
+ break
+ end
+ end
+ if not redo then
+ break
+ end
+ else
+ break
+ end
+ end
+ properties.mode = mode -- to be sure
+ return true
+ else
+ return false
+ end
+end
+
+-- while typesetting
+
+function constructors.collectprocessors(what,tfmdata,features,trace,report)
+ local processes = { }
+ local nofprocesses = 0
+ if features and next(features) then
+ local properties = tfmdata.properties
+ local whathandler = handlers[what]
+ local whatfeatures = whathandler.features
+ local whatprocessors = whatfeatures.processors
+ local mode = properties.mode
+ local processors = whatprocessors[mode]
+ if processors then
+ for i=1,#processors do
+ local step = processors[i]
+ local feature = step.name
+ if features[feature] then
+ local action = step.action
+ if trace then
+ report("installing feature processor %a for mode %a for font %a",feature,mode,tfmdata.properties.fullname)
+ end
+ if action then
+ nofprocesses = nofprocesses + 1
+ processes[nofprocesses] = action
+ end
+ end
+ end
+ elseif trace then
+ report("no feature processors for mode %a for font %a",mode,properties.fullname)
+ end
+ end
+ return processes
+end
+
+-- after scaling
+
+local function apply(key,what,tfmdata,features,trace,report)
+ if features and next(features) then
+ local properties = tfmdata.properties
+ local whathandler = handlers[what]
+ local whatfeatures = whathandler.features
+ local whatactions = whatfeatures[key]
+ local mode = properties.mode
+ local actions = whatactions[mode]
+ if actions then
+ for i=1,#actions do
+ local step = actions[i]
+ local feature = step.name
+ local value = features[feature]
+ if value then
+ local action = step.action
+ if trace then
+ report("applying feature %s %a for mode %a for font %a",key,feature,mode,properties.fullname)
+ end
+ if action then
+ action(tfmdata,feature,value)
+ end
+ end
+ end
+ end
+ end
+end
+
+function constructors.applymanipulators(what,tfmdata,features,trace,report)
+ if features and next(features) then
+ apply("manipulators",what,tfmdata,features,trace,report)
+ end
+end
+
+function constructors.applyfinalizers(what,tfmdata,features,trace,report)
+ if features and next(features) then
+ apply("finalizers",what,tfmdata,features,trace,report)
+ end
+end
+
+function constructors.addcoreunicodes(unicodes) -- maybe make this a metatable if used at all
+ if not unicodes then
+ unicodes = { }
+ end
+ unicodes.space = 0x0020
+ unicodes.hyphen = 0x002D
+ unicodes.zwj = 0x200D
+ unicodes.zwnj = 0x200C
+ return unicodes
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt
new file mode 100644
index 00000000000..b735e3d2f91
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt
@@ -0,0 +1,3231 @@
+if not modules then modules = { } end modules ['font-ctx'] = {
+ 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"
+}
+
+-- At some point I will clean up the code here so that at the tex end
+-- the table interface is used.
+--
+-- Todo: make a proper 'next id' mechanism (register etc) or wait till 'true'
+-- in virtual fonts indices is implemented.
+--
+-- Olders code can be found in the mkiv lua variant.
+
+local tostring, next, type, rawget, tonumber = tostring, next, type, rawget, tonumber
+
+local format, gmatch, match, find, lower, upper, gsub, byte, topattern = string.format, string.gmatch, string.match, string.find, string.lower, string.upper, string.gsub, string.byte, string.topattern
+local concat, serialize, sort, fastcopy, mergedtable = table.concat, table.serialize, table.sort, table.fastcopy, table.merged
+local sortedhash, sortedkeys, sequenced = table.sortedhash, table.sortedkeys, table.sequenced
+local parsers = utilities.parsers
+local settings_to_hash, hash_to_string, settings_to_array = parsers.settings_to_hash, parsers.hash_to_string, parsers.settings_to_array
+local formatcolumns = utilities.formatters.formatcolumns
+local mergehashes = utilities.parsers.mergehashes
+local formatters = string.formatters
+local basename = file.basename
+
+local utfchar, utfbyte = utf.char, utf.byte
+local round = math.round
+
+local context, commands = context, commands
+
+local P, R, S, C, Cc, Cf, Cg, Ct, Cs, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Ct, lpeg.Cs, lpeg.match
+
+local trace_features = false trackers.register("fonts.features", function(v) trace_features = v end)
+local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
+local trace_designsize = false trackers.register("fonts.designsize", function(v) trace_designsize = v end)
+local trace_usage = false trackers.register("fonts.usage", function(v) trace_usage = v end)
+local trace_mapfiles = false trackers.register("fonts.mapfiles", function(v) trace_mapfiles = v end)
+local trace_automode = false trackers.register("fonts.automode", function(v) trace_automode = v end)
+local trace_merge = false trackers.register("fonts.merge", function(v) trace_merge = v end)
+
+local report = logs.reporter("fonts")
+local report_features = logs.reporter("fonts","features")
+local report_cummulative = logs.reporter("fonts","cummulative")
+local report_defining = logs.reporter("fonts","defining")
+local report_status = logs.reporter("fonts","status")
+local report_mapfiles = logs.reporter("fonts","mapfiles")
+
+local setmetatableindex = table.setmetatableindex
+
+local implement = interfaces.implement
+
+local chardata = characters.data
+
+local fonts = fonts
+local handlers = fonts.handlers
+local otf = handlers.otf -- brrr
+local afm = handlers.afm -- brrr
+local tfm = handlers.tfm -- brrr
+local names = fonts.names
+local definers = fonts.definers
+local specifiers = fonts.specifiers
+local constructors = fonts.constructors
+local loggers = fonts.loggers
+local fontgoodies = fonts.goodies
+local helpers = fonts.helpers
+local hashes = fonts.hashes
+local currentfont = font.current
+local definefont = font.define
+
+local getprivateslot = helpers.getprivateslot
+
+local cleanname = names.cleanname
+
+local encodings = fonts.encodings
+----- aglunicodes = encodings.agl.unicodes
+local aglunicodes = nil -- delayed loading
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local nextchar = nuts.traversers.char
+
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getstate = nuts.getstate
+local setsubtype = nuts.setsubtype
+
+local texgetdimen = tex.getdimen
+local texsetcount = tex.setcount
+local texget = tex.get
+
+local texdefinefont = tex.definefont
+local texsp = tex.sp
+
+local fontdata = hashes.identifiers
+local characters = hashes.characters
+local descriptions = hashes.descriptions
+local properties = hashes.properties
+local resources = hashes.resources
+local unicodes = hashes.unicodes
+local csnames = hashes.csnames
+local lastmathids = hashes.lastmathids
+local exheights = hashes.exheights
+local emwidths = hashes.emwidths
+local parameters = hashes.parameters
+
+local designsizefilename = fontgoodies.designsizes.filename
+
+local ctx_char = context.char
+local ctx_safechar = context.safechar
+local ctx_getvalue = context.getvalue
+
+local otffeatures = otf.features
+local otftables = otf.tables
+
+local registerotffeature = otffeatures.register
+
+local sequencers = utilities.sequencers
+local appendgroup = sequencers.appendgroup
+local appendaction = sequencers.appendaction
+
+specifiers.contextsetups = specifiers.contextsetups or { }
+specifiers.contextnumbers = specifiers.contextnumbers or { }
+specifiers.contextmerged = specifiers.contextmerged or { }
+specifiers.synonyms = specifiers.synonyms or { }
+
+local setups = specifiers.contextsetups
+local numbers = specifiers.contextnumbers
+local merged = specifiers.contextmerged
+local synonyms = specifiers.synonyms
+
+storage.register("fonts/setups" , setups , "fonts.specifiers.contextsetups" )
+storage.register("fonts/numbers", numbers, "fonts.specifiers.contextnumbers")
+storage.register("fonts/merged", merged, "fonts.specifiers.contextmerged")
+storage.register("fonts/synonyms", synonyms, "fonts.specifiers.synonyms")
+
+-- inspect(setups)
+
+setmetatableindex(setups, environment.initex and
+ function(t,k)
+ return type(k) == "number" and rawget(t,numbers[k]) or nil
+ end
+or
+ function(t,k)
+ local v = type(k) == "number" and rawget(t,numbers[k])
+ if v then
+ t[k] = v
+ return v
+ end
+ end
+)
+
+-- this will move elsewhere ...
+
+local function getfontname(tfmdata)
+ return basename(type(tfmdata) == "number" and properties[tfmdata].name or tfmdata.properties.name)
+end
+
+helpers.name = getfontname
+
+local addformatter = utilities.strings.formatters.add
+
+addformatter(formatters,"font:name", [["'"..fontname(%s).."'"]], { fontname = helpers.name })
+addformatter(formatters,"font:features",[["'"..sequenced(%s," ",true).."'"]],{ sequenced = table.sequenced })
+
+-- ... like font-sfm or so
+
+constructors.resolvevirtualtoo = true -- context specific (due to resolver)
+constructors.sharefonts = true -- experimental
+constructors.nofsharedfonts = 0
+constructors.nofsharedhashes = 0
+constructors.nofsharedvectors = 0
+constructors.noffontsloaded = 0
+
+-- we can get rid of the tfm instance when we have fast access to the
+-- scaled character dimensions at the tex end, e.g. a fontobject.width
+-- actually we already have some of that now as virtual keys in glyphs
+--
+-- flushing the kern and ligature tables from memory saves a lot (only
+-- base mode) but it complicates vf building where the new characters
+-- demand this data .. solution: functions that access them
+
+-- font.getcopy = font.getfont -- we always want the table that context uses
+
+do
+
+ -- Does this still make sense?
+
+ local shares = { }
+ local hashes = { }
+ local nofinstances = 0
+ local instances = setmetatableindex(function(t,k)
+ nofinstances = nofinstances + 1
+ t[k] = nofinstances
+ return nofinstances
+ end)
+
+ function constructors.trytosharefont(target,tfmdata)
+ constructors.noffontsloaded = constructors.noffontsloaded + 1
+ if constructors.sharefonts then
+ local fonthash = target.specification.hash
+ if fonthash then
+ local properties = target.properties
+ local fullname = target.fullname
+ local fontname = target.fontname
+ local psname = target.psname
+ -- for the moment here:
+ local instance = properties.instance
+ if instance then
+ local format = tfmdata.properties.format
+ if format == "opentype" then
+ target.streamprovider = 1
+ elseif format == "truetype" then
+ target.streamprovider = 2
+ else
+ target.streamprovider = 0
+ end
+ if target.streamprovider > 0 then
+ if fullname then
+ fullname = fullname .. ":" .. instances[instance]
+ target.fullname = fullname
+ end
+ if fontname then
+ fontname = fontname .. ":" .. instances[instance]
+ target.fontname = fontname
+ end
+ if psname then
+ -- this one is used for the funny prefix in font names in pdf
+ -- so it has to be kind of unique in order to avoid subset prefix
+ -- clashes being reported
+ psname = psname .. ":" .. instances[instance]
+ target.psname = psname
+ end
+ end
+ end
+ --
+ local sharedname = hashes[fonthash]
+ if sharedname then
+ -- this is ok for context as we know that only features can mess with font definitions
+ -- so a similar hash means that the fonts are similar too
+ if trace_defining then
+ report_defining("font %a uses backend resources of font %a (%s)",target.fullname,sharedname,"common hash")
+ end
+ target.fullname = sharedname
+ properties.sharedwith = sharedname
+ constructors.nofsharedfonts = constructors.nofsharedfonts + 1
+ constructors.nofsharedhashes = constructors.nofsharedhashes + 1
+ else
+ -- the one takes more time (in the worst case of many cjk fonts) but it also saves
+ -- embedding time .. haha, this is interesting: when i got a clash on subset tag
+ -- collision i saw in the source that these tags are also using a hash like below
+ -- so maybe we should have an option to pass it from lua
+ local characters = target.characters
+ local n = 1
+ local t = { target.psname }
+ -- for the moment here:
+ if instance then
+ n = n + 1
+ t[n] = instance
+ end
+ --
+ local u = sortedkeys(characters)
+ for i=1,#u do
+ local k = u[i]
+ n = n + 1 ; t[n] = k
+ n = n + 1 ; t[n] = characters[k].index or k
+ end
+ local checksum = md5.HEX(concat(t," "))
+ local sharedname = shares[checksum]
+ local fullname = target.fullname
+ if sharedname then
+ if trace_defining then
+ report_defining("font %a uses backend resources of font %a (%s)",fullname,sharedname,"common vector")
+ end
+ fullname = sharedname
+ properties.sharedwith = sharedname
+ constructors.nofsharedfonts = constructors.nofsharedfonts + 1
+ constructors.nofsharedvectors = constructors.nofsharedvectors + 1
+ else
+ shares[checksum] = fullname
+ end
+ target.fullname = fullname
+ hashes[fonthash] = fullname
+ end
+ end
+ end
+ end
+
+end
+
+directives.register("fonts.checksharing",function(v)
+ if not v then
+ report_defining("font sharing in backend is disabled")
+ end
+ constructors.sharefonts = v
+end)
+
+function definers.resetnullfont()
+ -- resetting is needed because tikz misuses nullfont
+ local parameters = fonts.nulldata.parameters
+ --
+ parameters.slant = 0 -- 1
+ parameters.space = 0 -- 2
+ parameters.space_stretch = 0 -- 3
+ parameters.space_shrink = 0 -- 4
+ parameters.x_height = 0 -- 5
+ parameters.quad = 0 -- 6
+ parameters.extra_space = 0 -- 7
+ parameters.designsize = 655360
+ --
+ constructors.enhanceparameters(parameters) -- official copies for us
+ --
+ definers.resetnullfont = function() end
+end
+
+-- This is some initialization code and we don't want (tracing) clutter in lmtx
+-- which is why we follow a different route there. I admit that is sounds freaky.
+-- Watch out: in lmtx the font dimen array is no longer resized automatically.
+
+implement {
+ name = "resetnullfont",
+ onlyonce = true,
+ permanent = false,
+ actions = function()
+ for i=1,7 do
+ font.setfontdimen(0,i,0)
+ end
+ definers.resetnullfont()
+ end
+}
+
+-- this cannot be a feature initializer as there is no auto namespace
+-- so we never enter the loop then; we can store the defaults in the tma
+-- file (features.gpos.mkmk = 1 etc)
+
+local needsnodemode = { -- we will have node mode by default anyway
+ -- gsub_single = true,
+ gsub_multiple = true,
+ -- gsub_alternate = true,
+ -- gsub_ligature = true,
+ gsub_context = true,
+ gsub_contextchain = true,
+ gsub_reversecontextchain = true,
+ -- chainsub = true,
+ -- reversesub = true,
+ gpos_mark2base = true,
+ gpos_mark2ligature = true,
+ gpos_mark2mark = true,
+ gpos_cursive = true,
+ -- gpos_single = true,
+ -- gpos_pair = true,
+ gpos_context = true,
+ gpos_contextchain = true,
+}
+
+otftables.scripts.auto = "automatic fallback to latn when no dflt present"
+
+-- setmetatableindex(otffeatures.descriptions,otftables.features)
+
+local function checkedscript(tfmdata,resources,features)
+ local latn = false
+ local script = false
+ if resources.features then
+ for g, list in next, resources.features do
+ for f, scripts in next, list do
+ if scripts.dflt then
+ script = "dflt"
+ break
+ elseif scripts.latn then
+ latn = true
+ end
+ end
+ end
+ end
+ if not script then
+ script = latn and "latn" or "dflt"
+ end
+ if trace_automode then
+ report_defining("auto script mode, using script %a in font %!font:name!",script,tfmdata)
+ end
+ features.script = script
+ return script
+end
+
+-- basemode combined with dynamics is somewhat tricky
+
+local function checkedmode(tfmdata,resources,features)
+ local sequences = resources.sequences
+ if sequences and #sequences > 0 then
+ local script = features.script or "dflt"
+ local language = features.language or "dflt"
+ for feature, value in next, features do
+ if value then
+ local found = false
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local features = sequence.features
+ if features then
+ local scripts = features[feature]
+ if scripts then
+ local languages = scripts[script]
+ if languages and languages[language] then
+ if found then
+ -- more than one lookup
+ if trace_automode then
+ report_defining("forcing mode %a, font %!font:name!, feature %a, script %a, language %a, %s",
+ "node",tfmdata,feature,script,language,"multiple lookups")
+ end
+ features.mode = "node"
+ return "node"
+ elseif needsnodemode[sequence.type] then
+ if trace_automode then
+ report_defining("forcing mode %a, font %!font:name!, feature %a, script %a, language %a, %s",
+ "node",tfmdata,feature,script,language,"no base support")
+ end
+ features.mode = "node"
+ return "node"
+ else
+ -- at least one lookup
+ found = true
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ if trace_automode then
+ report_defining("forcing mode base, font %!font:name!",tfmdata)
+ end
+ features.mode = "base" -- new, or is this wrong?
+ return "base"
+end
+
+definers.checkedscript = checkedscript
+definers.checkedmode = checkedmode
+
+-- We only set the checker and leave other settings of the mode feature as
+-- they are.
+
+local function modechecker(tfmdata,features,mode) -- we cannot adapt features as they are shared!
+ if trace_features then
+ report_features("fontname %!font:name!, features %!font:features!",tfmdata,features)
+ end
+ local rawdata = tfmdata.shared.rawdata
+ local resources = rawdata and rawdata.resources
+ local script = features.script
+ if resources then
+ if script == "auto" then
+ script = checkedscript(tfmdata,resources,features)
+ end
+ if mode == "auto" then
+ mode = checkedmode(tfmdata,resources,features)
+ end
+ else
+ report_features("missing resources for font %!font:name!",tfmdata)
+ end
+ return mode
+end
+
+registerotffeature {
+ name = "mode",
+ modechecker = modechecker,
+}
+
+do
+
+ -- copying will end up here too
+
+ local beforecopyingcharacters = sequencers.new {
+ name = "beforecopyingcharacters",
+ arguments = "target,original",
+ }
+
+ appendgroup(beforecopyingcharacters,"before") -- user
+ appendgroup(beforecopyingcharacters,"system") -- private
+ appendgroup(beforecopyingcharacters,"after" ) -- user
+
+ function constructors.beforecopyingcharacters(original,target)
+ local runner = beforecopyingcharacters.runner
+ if runner then
+ runner(original,target)
+ end
+ end
+
+ local aftercopyingcharacters = sequencers.new {
+ name = "aftercopyingcharacters",
+ arguments = "target,original",
+ }
+
+ appendgroup(aftercopyingcharacters,"before") -- user
+ appendgroup(aftercopyingcharacters,"system") -- private
+ appendgroup(aftercopyingcharacters,"after" ) -- user
+
+ function constructors.aftercopyingcharacters(original,target)
+ local runner = aftercopyingcharacters.runner
+ if runner then
+ runner(original,target)
+ end
+ end
+
+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@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
+ local variants = definers.methods.variants
+ local virtualfeatures = specification.features.virtual
+ if virtualfeatures and virtualfeatures.preset then
+ local variant = variants[virtualfeatures.preset]
+ if variant then
+ return variant(specification,size,id)
+ end
+ else
+ return loadfont(specification,size,id)
+ end
+end
+
+local function predefined(specification)
+ local variants = definers.methods.variants
+ local detail = specification.detail
+ if detail ~= "" and variants[detail] then
+ specification.features.virtual = { preset = detail }
+ end
+ return specification
+end
+
+definers.registersplit("@", predefined,"virtual")
+
+local normalize_features = otffeatures.normalize -- should be general
+
+local function definecontext(name,t) -- can be shared
+ local number = setups[name] and setups[name].number or 0 -- hm, numbers[name]
+ if number == 0 then
+ number = #numbers + 1
+ numbers[number] = name
+ end
+ t.number = number
+ setups[name] = t
+ return number, t
+end
+
+-- {a,b,c} as table (so we don' need to parse again when it gets applied)
+-- we will update this ... when we have foo={a,b,c} then we can keep the table
+
+-- \definefontfeature[demo][a={b,c}]
+-- \definefontfeature[demo][a={b=12,c={34,35}}]
+
+local h = setmetatableindex(function(t,k)
+ local v = "," .. k .. ","
+ t[k] = v
+ return v
+end)
+
+-- local function removefromhash(hash,key)
+-- local pattern = h[key]
+-- for k in next, hash do
+-- if k ~= key and find(h[k],pattern) then -- if find(k,",") and ...
+-- hash[k] = nil
+-- end
+-- end
+-- end
+
+local function presetcontext(name,parent,features) -- will go to con and shared
+ if features == "" and find(parent,"=",1,true) then
+ features = parent
+ parent = ""
+ end
+ if not features or features == "" then
+ features = { }
+ elseif type(features) == "string" then
+ features = normalize_features(settings_to_hash(features))
+ -- if type(value) == "string" and find(value,"[=:]") then
+ -- local t = settings_to_hash_colon_too(value) -- clashes with foo=file:bar
+ for key, value in next, features do
+ if type(value) == "string" and find(value,"[=]") then
+ local t = settings_to_hash(value)
+ if next(t) then
+ features[key] = sequenced(normalize_features(t,true),",")
+ end
+ end
+ end
+ else
+ features = normalize_features(features)
+ end
+ -- todo: synonyms, and not otf bound
+ if parent ~= "" then
+ for p in gmatch(parent,"[^, ]+") do
+ local s = setups[p]
+ if s then
+ for k, v in next, s do
+ -- no, as then we cannot overload: e.g. math,mathextra
+ -- reverted, so we only take from parent when not set
+ if features[k] == nil then
+ features[k] = v
+ end
+ end
+ else
+ -- just ignore an undefined one .. i.e. we can refer to not yet defined
+ end
+ end
+ end
+ -- these are auto set so in order to prevent redundant definitions
+ -- we need to preset them (we hash the features and adding a default
+ -- setting during initialization may result in a different hash)
+ --
+ -- for k,v in next, triggers do
+ -- if features[v] == nil then -- not false !
+ -- local vv = default_features[v]
+ -- if vv then features[v] = vv end
+ -- end
+ -- end
+ --
+ for feature,value in next, features do
+ if value == nil then -- not false !
+ local default = default_features[feature]
+ if default ~= nil then
+ features[feature] = default
+ end
+ end
+ end
+ -- sparse 'm so that we get a better hash and less test (experimental
+ -- optimization)
+ local t = { } -- can we avoid t ?
+ for k,v in next, features do
+ -- if v then t[k] = v end
+ t[k] = v
+ end
+ -- the number is needed for dynamic features; maybe number should always be
+ -- renewed as we can redefine features ... i need a test
+ local number = setups[name] and setups[name].number or 0
+ if number == 0 then
+ number = #numbers + 1
+ numbers[number] = name
+ end
+ --
+ t.number = number
+ -- there is the special case of combined features as we have in math but maybe
+ -- this has to change some day ... otherwise we mess up dynamics (ok, we could
+ -- impose a limit there: no combined features)
+ --
+ -- done elsewhere (!)
+ --
+ -- removefromhash(setups,name) -- can have changed (like foo,extramath)
+ --
+ setups[name] = t
+ return number, t
+end
+
+local function adaptcontext(pattern,features)
+ local pattern = topattern(pattern,false,true)
+ for name in next, setups do
+ if find(name,pattern) then
+ presetcontext(name,name,features)
+ end
+ end
+end
+
+-- See for old code in the lua file. We now share code.
+
+local function contextnumber(name)
+ local t = setups[name]
+ return t and t.number or 0
+end
+
+local function mergecontext(currentnumber,extraname,option) -- number string number (used in scrp-ini
+ local extra = setups[extraname]
+ if extra then
+ local current = setups[numbers[currentnumber]]
+ local mergedfeatures = { }
+ local mergedname = nil
+ if option < 0 then
+ if current then
+ for k, v in next, current do
+ if not extra[k] then
+ mergedfeatures[k] = v
+ end
+ end
+ end
+ mergedname = currentnumber .. "-" .. extraname
+ else
+ if current then
+ for k, v in next, current do
+ mergedfeatures[k] = v
+ end
+ end
+ for k, v in next, extra do
+ mergedfeatures[k] = v
+ end
+ mergedname = currentnumber .. "+" .. extraname
+ end
+ local number = #numbers + 1
+ mergedfeatures.number = number
+ numbers[number] = mergedname
+ merged[number] = option
+ setups[mergedname] = mergedfeatures
+ return number
+ else
+ return currentnumber
+ end
+end
+
+local extrasets = { }
+
+setmetatableindex(extrasets,function(t,k)
+ local v = mergehashes(setups,k)
+ t[k] = v
+ return v
+end)
+
+local function mergecontextfeatures(currentname,extraname,how,mergedname) -- string string
+ local extra = setups[extraname] or extrasets[extraname]
+ if extra then
+ local current = setups[currentname]
+ local mergedfeatures = { }
+ if how == "+" then
+ if current then
+ for k, v in next, current do
+ mergedfeatures[k] = v
+ end
+ end
+ for k, v in next, extra do
+ mergedfeatures[k] = v
+ end
+ if trace_merge then
+ report_features("merge %a, method %a, current %|T, extra %|T, result %|T",mergedname,"add",current or { },extra,mergedfeatures)
+ end
+ elseif how == "-" then
+ if current then
+ for k, v in next, current do
+ mergedfeatures[k] = v
+ end
+ end
+ for k, v in next, extra do
+ -- only boolean features
+ if v == true then
+ mergedfeatures[k] = false
+ end
+ end
+ if trace_merge then
+ report_features("merge %a, method %a, current %|T, extra %|T, result %|T",mergedname,"subtract",current or { },extra,mergedfeatures)
+ end
+ else -- =
+ for k, v in next, extra do
+ mergedfeatures[k] = v
+ end
+ if trace_merge then
+ report_features("merge %a, method %a, result %|T",mergedname,"replace",mergedfeatures)
+ end
+ end
+ local number = #numbers + 1
+ mergedfeatures.number = number
+ numbers[number] = mergedname
+ merged[number] = option
+ setups[mergedname] = mergedfeatures
+ return number
+ else
+ return numbers[currentname] or 0
+ end
+end
+
+local function registercontext(fontnumber,extraname,option)
+ local extra = setups[extraname]
+ if extra then
+ local mergedfeatures = { }
+ local mergedname = nil
+ if option < 0 then
+ mergedname = fontnumber .. "-" .. extraname
+ else
+ mergedname = fontnumber .. "+" .. extraname
+ end
+ for k, v in next, extra do
+ mergedfeatures[k] = v
+ end
+ local number = #numbers + 1
+ mergedfeatures.number = number
+ numbers[number] = mergedname
+ merged[number] = option
+ setups[mergedname] = mergedfeatures
+ return number
+ else
+ return 0
+ end
+end
+
+local function registercontextfeature(mergedname,extraname,how)
+ local extra = setups[extraname]
+ if extra then
+ local mergedfeatures = { }
+ for k, v in next, extra do
+ mergedfeatures[k] = v
+ end
+ local number = #numbers + 1 -- we somehow end up with steps of 2
+ mergedfeatures.number = number
+ numbers[number] = mergedname
+ merged[number] = how == "=" and 1 or 2 -- 1=replace, 2=combine
+ setups[mergedname] = mergedfeatures
+ return number
+ else
+ report_features("unknown feature %a cannot be merged into %a using method %a",extraname,mergedname,how)
+ return 0
+ end
+end
+
+specifiers.presetcontext = presetcontext
+specifiers.contextnumber = contextnumber
+specifiers.mergecontext = mergecontext
+specifiers.registercontext = registercontext
+specifiers.definecontext = definecontext
+
+constructors.hashmethods.normal = function(list)
+ local s = { }
+ local n = 0
+ for k, v in next, list do
+ if not k then
+ -- no need to add to hash
+ elseif k == "number" or k == "features" then
+ -- no need to add to hash (maybe we need a skip list)
+ else
+ n = n + 1
+ if type(v) == "table" then
+ -- table.sequenced
+ local t = { }
+ local m = 0
+ for k, v in next, v do
+ m = m + 1
+ t[m] = format("%q=%q",k,v)
+ end
+ sort(t)
+ s[n] = format("%q={%s}",k,concat(t,","))
+ else
+ s[n] = format("%q=%q",k,v)
+ end
+ end
+ end
+ if n > 0 then
+ sort(s)
+ return concat(s,"+")
+ end
+end
+
+constructors.hashmethods.virtual = function(list)
+ local s = { }
+ local n = 0
+ for k, v in next, list do
+ n = n + 1
+ s[n] = format("%q=%q",k,v)
+ end
+ if n > 0 then
+ sort(s)
+ return concat(s,"+")
+ end
+end
+
+-- end of redefine
+
+-- local withcache = { } -- concat might be less efficient than nested tables
+--
+-- local function withset(name,what)
+-- local zero = texgetattribute(0)
+-- local hash = zero .. "+" .. name .. "*" .. what
+-- local done = withcache[hash]
+-- if not done then
+-- done = mergecontext(zero,name,what)
+-- withcache[hash] = done
+-- end
+-- texsetattribute(0,done)
+-- end
+--
+-- local function withfnt(name,what,font)
+-- local font = font or currentfont()
+-- local hash = font .. "*" .. name .. "*" .. what
+-- local done = withcache[hash]
+-- if not done then
+-- done = registercontext(font,name,what)
+-- withcache[hash] = done
+-- end
+-- texsetattribute(0,done)
+-- end
+
+function specifiers.showcontext(name)
+ return setups[name] or setups[numbers[name]] or setups[numbers[tonumber(name)]] or { }
+end
+
+-- we need a copy as we will add (fontclass) goodies to the features and
+-- that is bad for a shared table
+
+-- local function splitcontext(features) -- presetcontext creates dummy here
+-- return fastcopy(setups[features] or (presetcontext(features,"","") and setups[features]))
+-- end
+
+-- local function splitcontext(features) -- presetcontext creates dummy here
+-- local sf = setups[features]
+-- if not sf then
+-- local n -- number
+-- if find(features,",") then
+-- -- let's assume a combination which is not yet defined but just specified (as in math)
+-- n, sf = presetcontext(features,features,"")
+-- else
+-- -- we've run into an unknown feature and or a direct spec so we create a dummy
+-- n, sf = presetcontext(features,"","")
+-- end
+-- end
+-- return fastcopy(sf)
+-- end
+
+local function splitcontext(features) -- presetcontext creates dummy here
+ local n, sf
+ -- We can have: "a=yes,b=yes" "a,b" "a" "a=yes" etc.
+ if find(features,"[,=]") then
+ --
+ -- from elsewhere (!)
+ --
+ -- this will become:
+ --
+ -- if find(features,"^reset," then
+ setups[features] = nil
+ -- end
+ -- let's assume a combination which is not yet defined but just specified (as in math)
+ n, sf = presetcontext(features,features,"")
+ else
+ sf = setups[features]
+ if not sf then
+ -- we've run into an unknown feature and or a direct spec so we create a dummy
+ n, sf = presetcontext(features,"","")
+ end
+ end
+ return fastcopy(sf)
+end
+
+-- local splitter = lpeg.splitat("=")
+--
+-- local function splitcontext(features)
+-- local setup = setups[features]
+-- if setup then
+-- return setup
+-- elseif find(features,",",1,true) then
+-- -- This is not that efficient but handy anyway for quick and dirty tests
+-- -- beware, due to the way of caching setups you can get the wrong results
+-- -- when components change. A safeguard is to nil the cache.
+-- local merge = nil
+-- for feature in gmatch(features,"[^, ]+") do
+-- if find(feature,"=",1,true) then
+-- local k, v = lpegmatch(splitter,feature)
+-- if k and v then
+-- if not merge then
+-- merge = { k = v }
+-- else
+-- merge[k] = v
+-- end
+-- end
+-- else
+-- local s = setups[feature]
+-- if not s then
+-- -- skip
+-- elseif not merge then
+-- merge = s
+-- else
+-- for k, v in next, s do
+-- merge[k] = v
+-- end
+-- end
+-- end
+-- end
+-- setup = merge and presetcontext(features,"",merge) and setups[features]
+-- -- actually we have to nil setups[features] in order to permit redefinitions
+-- setups[features] = nil
+-- end
+-- return setup or (presetcontext(features,"","") and setups[features]) -- creates dummy
+-- end
+
+specifiers.splitcontext = splitcontext
+
+function specifiers.contexttostring(name,kind,separator,yes,no,strict,omit) -- not used
+ return hash_to_string(
+ mergedtable(handlers[kind].features.defaults or {},setups[name] or {}),
+ separator, yes, no, strict, omit or { "number" }
+ )
+end
+
+local function starred(features) -- no longer fallbacks here
+ local detail = features.detail
+ if detail and detail ~= "" then
+ features.features.normal = splitcontext(detail)
+ else
+ features.features.normal = { }
+ end
+ return features
+end
+
+definers.registersplit('*',starred,"featureset")
+
+-- sort of xetex mode, but without [] and / as we have file: and name: etc
+
+local space = P(" ")
+local spaces = space^0
+local separator = S(";,")
+local equal = P("=")
+local sometext = C((1-equal-space-separator)^1)
+local truevalue = P("+") * spaces * sometext * Cc(true)
+local falsevalue = P("-") * spaces * sometext * Cc(false)
+local somevalue = sometext * spaces * Cc(true)
+local keyvalue = sometext * spaces * equal * spaces * sometext
+local pattern = Cf(Ct("") * (space + separator + Cg(falsevalue + truevalue + keyvalue + somevalue))^0, rawset)
+
+local function colonized(specification)
+ specification.features.normal = normalize_features(lpegmatch(pattern,specification.detail))
+ return specification
+end
+
+definers.registersplit(":",colonized,"direct")
+
+-- define (two steps)
+
+local sizepattern, splitpattern, specialscale do
+
+ -- todo: use lpeg.patterns
+
+ ----- space = P(" ")
+ ----- spaces = space^0
+ local digit = R('09')
+ local period = P(".")
+ local leftparent = (P"(")
+ local rightparent = (P")")
+ local leftbrace = (P"{")
+ local rightbrace = (P"}")
+ local withinparents = leftparent * (1-rightparent)^0 * rightparent
+ local withinbraces = leftbrace * (1-rightbrace )^0 * rightbrace
+ local value = C((withinparents + withinbraces + (1-space))^1)
+ -- local dimension = C((space/"" + P(1))^1)
+ local dimension = Cs((digit+period)^1 * (spaces/"") * (P(1)-digit)^0)
+-- local scaler = C((digit+period)^1)
+ local scaler = lpeg.patterns.unsigned/function(s) return round(tonumber(s)*1000) end
+ + C(lpeg.patterns.cardinal)
+ local rest = C(P(1)^0)
+ local scale_none = Cc(0)
+ local scale_at = (P("at") + P("@")) * Cc(1) * spaces * dimension -- dimension
+ local scale_sa = P("sa") * Cc(2) * spaces * dimension -- number
+ local scale_mo = P("mo") * Cc(3) * spaces * dimension -- number
+ local scale_scaled = P("scaled") * Cc(4) * spaces * dimension -- number
+ local scale_ht = P("ht") * Cc(5) * spaces * dimension -- dimension
+ local scale_cp = P("cp") * Cc(6) * spaces * dimension -- dimension
+
+ specialscale = { [5] = "ht", [6] = "cp" }
+
+ sizepattern = spaces * ((scale_at + scale_sa + scale_mo + scale_ht + scale_cp + scale_scaled) * (spaces * scaler)^0 + scale_none)
+ splitpattern = spaces * value * spaces * rest
+
+end
+
+function helpers.splitfontpattern(str)
+ local name, size = lpegmatch(splitpattern,str)
+ local kind, size = lpegmatch(sizepattern,size) -- sx, sy
+ return name, kind, size -- sx, sy
+end
+
+function helpers.fontpatternhassize(str)
+ local name, size = lpegmatch(splitpattern,str)
+ local kind, size = lpegmatch(sizepattern,size)
+ return size or false
+end
+
+local specification -- still needed as local ?
+
+local getspecification = definers.getspecification
+
+-- we can make helper macros which saves parsing (but normaly not
+-- that many calls, e.g. in mk a couple of 100 and in metafun 3500)
+
+local specifiers = { }
+
+do -- else too many locals
+
+ local starttiming = statistics.starttiming
+ local stoptiming = statistics.stoptiming
+
+ local setmacro = tokens.setters.macro
+ local ctxcatcodes = tex.ctxcatcodes
+ local texconditionals = tex.conditionals
+
+ local reported = setmetatableindex(function(t,k)
+ local v = setmetatableindex(function(t,k)
+ t[k] = true
+ return false
+ end)
+ t[k] = v
+ return v
+ end)
+
+ implement {
+ name = "definefont_one",
+ arguments = "string",
+ actions = function(str)
+ starttiming(fonts)
+ if trace_defining then
+ report_defining("memory usage before: %s",statistics.memused())
+ report_defining("start stage one: %s",str)
+ end
+ local fullname, size = lpegmatch(splitpattern,str)
+ local lookup, name, sub, method, detail = getspecification(fullname)
+ if not name then
+ report_defining("strange definition %a",str)
+ -- ctx_setdefaultfontname()
+ elseif name == "unknown" then
+ -- ctx_setdefaultfontname()
+ else
+ -- ctx_setsomefontname(name)
+ setmacro("somefontname",name,"global")
+ end
+ -- we can also use a count for the size
+ if size and size ~= "" then
+ local mode, size, sx, sy = lpegmatch(sizepattern,size)
+ if mode and size and size ~= "" then
+ texsetcount("scaledfontmode",mode)
+ -- ctx_setsomefontsize(size)
+ -- We use a catcodetable, just in case it's 1.2\exheight (a corner case that showed
+ -- up in the lmtx manual: marking that changed size in the mids of some verbatim).
+ setmacro(ctxcatcodes,"somefontsize",size)
+ if sx then
+ setmacro("somefontsizex",sx)
+ end
+ if sy then
+ setmacro("somefontsizey",sy)
+ end
+ else
+ texsetcount("scaledfontmode",0)
+ -- ctx_setemptyfontsize()
+ end
+ elseif true then
+ -- so we don't need to check in tex
+ texsetcount("scaledfontmode",2)
+ -- ctx_setemptyfontsize()
+ else
+ texsetcount("scaledfontmode",0)
+ -- ctx_setemptyfontsize()
+ end
+ specification = definers.makespecification(str,lookup,name,sub,method,detail,size)
+-- specification.original = str
+ if trace_defining then
+ report_defining("stop stage one")
+ end
+ end
+ }
+
+ local function nice_cs(cs)
+ return (gsub(cs,".->", ""))
+ end
+
+ local n = 0
+ local busy = false
+ local combinefeatures = false
+
+ directives.register("fonts.features.combine",function(v)
+ combinefeatures = v
+ end)
+
+ implement {
+ name = "definefont_two",
+ arguments = {
+ -- "boolean", "string", "string", "dimension", "integer", "string",
+ -- "string", "string", "string", "integer", "dimension", "string",
+ -- "string", "string", "string", "integer",
+ "boolean", "argument", "argument", "dimension", "integer",
+ "argument", "argument", "argument", "argument", "integer",
+ "dimension", "argument", "argument", "argument", "argument",
+ "integer",
+ },
+ actions = function (
+ global, -- \ifx\fontclass\empty\s!false\else\s!true\fi
+ cs, -- {#csname}%
+ str, -- \somefontfile
+ size, -- \d_font_scaled_font_size
+ inheritancemode, -- \c_font_feature_inheritance_mode
+ classfeatures, -- \m_font_class_features
+ fontfeatures, -- \m_font_features
+ classfallbacks, -- \m_font_class_fallbacks
+ fontfallbacks, -- \m_font_fallbacks
+ mathsize, -- \fontface
+ textsize, -- \d_font_scaled_text_face
+ classgoodies, -- \m_font_class_goodies
+ goodies, -- \m_font_goodies
+ classdesignsize, -- \m_font_class_designsize
+ fontdesignsize, -- \m_font_designsize
+ scaledfontmode -- \scaledfontmode
+ )
+ if trace_defining then
+ report_defining("start stage two: %s, size %s, features %a & %a, mode %a",str,size,classfeatures,fontfeatures,inheritancemode)
+ end
+ -- name is now resolved and size is scaled cf sa/mo
+ local lookup, name, sub, method, detail = getspecification(str or "")
+ -- new (todo: inheritancemode)
+ local designsize = fontdesignsize ~= "" and fontdesignsize or classdesignsize or ""
+ local designname = designsizefilename(name,designsize,size)
+ if designname and designname ~= "" then
+ if trace_defining or trace_designsize then
+ report_defining("remapping name %a, specification %a, size %a, designsize %a",name,designsize,size,designname)
+ end
+ -- we don't catch detail here
+ local o_lookup, o_name, o_sub, o_method, o_detail = getspecification(designname)
+ if o_lookup and o_lookup ~= "" then lookup = o_lookup end
+ if o_method and o_method ~= "" then method = o_method end
+ if o_detail and o_detail ~= "" then detail = o_detail end
+ name = o_name
+ sub = o_sub
+ end
+ if texconditionals["c_font_compact"] then
+ size = 655360
+ end
+ -- so far
+ -- some settings can have been overloaded
+ if lookup and lookup ~= "" then
+ specification.lookup = lookup
+ end
+ if relativeid and relativeid ~= "" then -- experimental hook
+ local id = tonumber(relativeid) or 0
+ specification.relativeid = id > 0 and id
+ end
+ --
+ specification.name = name
+ specification.size = size
+ specification.sub = (sub and sub ~= "" and sub) or specification.sub
+ specification.mathsize = mathsize
+ specification.textsize = textsize
+ specification.goodies = goodies
+ specification.cs = cs
+ specification.global = global
+ specification.scalemode = scaledfontmode -- context specific
+ if detail and detail ~= "" then
+ specification.method = method or "*"
+ specification.detail = detail
+ elseif specification.detail and specification.detail ~= "" then
+ -- already set
+ elseif inheritancemode == 0 then
+ -- nothing
+ elseif inheritancemode == 1 then
+ -- fontonly
+ if fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = fontfeatures
+ end
+ if fontfallbacks and fontfallbacks ~= "" then
+ specification.fallbacks = fontfallbacks
+ end
+ elseif inheritancemode == 2 then
+ -- classonly
+ if classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = classfeatures
+ end
+ if classfallbacks and classfallbacks ~= "" then
+ specification.fallbacks = classfallbacks
+ end
+ elseif inheritancemode == 3 then
+ -- fontfirst
+ if combinefeatures then
+ if classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ if fontfeatures and fontfeatures ~= "" and fontfeatures ~= classfeatures then
+ specification.detail = classfeatures .. "," .. fontfeatures
+ else
+ specification.detail = classfeatures
+ end
+ elseif fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = fontfeatures
+ end
+ else
+ if fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = fontfeatures
+ elseif classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = classfeatures
+ end
+ end
+ if fontfallbacks and fontfallbacks ~= "" then
+ specification.fallbacks = fontfallbacks
+ elseif classfallbacks and classfallbacks ~= "" then
+ specification.fallbacks = classfallbacks
+ end
+ elseif inheritancemode == 4 then
+ -- classfirst
+ if combinefeatures then
+ if fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ if classfeatures and classfeatures ~= "" and classfeatures ~= fontfeatures then
+ specification.detail = fontfeatures .. "," .. classfeatures
+ else
+ specification.detail = fontfeatures
+ end
+ elseif classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = classfeatures
+ end
+ else
+ if classfeatures and classfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = classfeatures
+ elseif fontfeatures and fontfeatures ~= "" then
+ specification.method = "*"
+ specification.detail = fontfeatures
+ end
+ end
+ if classfallbacks and classfallbacks ~= "" then
+ specification.fallbacks = classfallbacks
+ elseif fontfallbacks and fontfallbacks ~= "" then
+ specification.fallbacks = fontfallbacks
+ end
+ end
+ --
+ local tfmdata = definers.read(specification,size) -- id not yet known (size in spec?)
+ --
+ local lastfontid = 0
+ local tfmtype = type(tfmdata)
+ if tfmtype == "table" then
+ -- setting the extra characters will move elsewhere
+ 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
+ -- characters[0x00A0] = { width = parameters.space }
+ -- characters[0x2007] = { width = characters[0x0030] and characters[0x0030].width or parameters.space } -- figure
+ -- characters[0x2008] = { width = characters[0x002E] and characters[0x002E].width or parameters.space } -- period
+ --
+ local fallbacks = specification.fallbacks or ""
+ local mathsize = (mathsize == 1 or mathsize == 2 or mathsize == 3) and mathsize or nil -- can be unset so we test 1 2 3
+ if fallbacks ~= "" and mathsize and not busy then
+ busy = true
+ -- We need this ugly hack in order to resolve fontnames (at the \TEX end). Originally
+ -- math was done in Lua after loading (plugged into aftercopying).
+ --
+ -- After tl 2017 I'll also do text fallbacks this way (although backups there are done
+ -- in a completely different way.)
+ 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,1)
+ end
+ mathematics.resolvefallbacks(tfmdata,specification,fallbacks)
+ context(function()
+ -- We're doing math fallbacks.
+ busy = false
+ mathematics.finishfallbacks(tfmdata,specification,fallbacks)
+ 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,2)
+ end
+ -- resolved (when designsize is used):
+ local size = round(tfmdata.parameters.size or 655360)
+ setmacro("somefontsize",size.."sp")
+ -- ctx_setsomefontsize(size .. "sp")
+ texsetcount("scaledfontsize",size)
+ lastfontid = id
+ --
+ if trace_defining then
+ report_defining("memory usage after: %s",statistics.memused())
+ report_defining("stop stage two")
+ end
+ --
+ texsetcount("global","lastfontid",lastfontid)
+ specifiers[lastfontid] = { str, size }
+ if not mathsize then
+ -- forget about it (can't happen here)
+ elseif mathsize == 0 then
+ -- can't happen (here)
+ else
+ -- maybe only 1 2 3 (we already test for this)
+ lastmathids[mathsize] = lastfontid
+ end
+ stoptiming(fonts)
+ end)
+ return
+ else
+ 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")
+ -- ctx_setsomefontsize(size .. "sp")
+ texsetcount("scaledfontsize",size)
+ lastfontid = id
+ end
+ 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",
+ name,tfmdata,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,classgoodies,goodies,classdesignsize,fontdesignsize)
+ end
+ csnames[tfmdata] = specification.cs
+ texdefinefont(global,cs,tfmdata)
+ -- texdefinefont(cs,tfmdata,global and "global")
+ -- resolved (when designsize is used):
+ local size = round(fontdata[tfmdata].parameters.size or 0)
+ -- ctx_setsomefontsize(size .. "sp")
+ setmacro("somefontsize",size.."sp")
+ texsetcount("scaledfontsize",size)
+ lastfontid = tfmdata
+ else
+ 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("scaledfontsize",0)
+ -- ctx_letvaluerelax(cs) -- otherwise the current definition takes the previous one
+ end
+ if trace_defining then
+ report_defining("memory usage after: %s",statistics.memused())
+ report_defining("stop stage two")
+ end
+ --
+ texsetcount("global","lastfontid",lastfontid)
+ specifiers[lastfontid] = { str, size }
+ if not mathsize then
+ -- forget about it
+ elseif mathsize == 0 then
+ -- can't happen (here)
+ else
+ -- maybe only 1 2 3
+ lastmathids[mathsize] = lastfontid
+ end
+ --
+ stoptiming(fonts)
+ end
+ }
+
+ implement {
+ name = "specifiedfontspec",
+ arguments = "integer",
+ actions = function(id)
+ local f = specifiers[id]
+ if f then
+ context(f[1])
+ end
+ end
+ }
+
+ implement {
+ name = "specifiedfontsize",
+ arguments = "integer",
+ actions = function(id)
+ local f = specifiers[id]
+ if f then
+ context(f[2])
+ end
+ end
+ }
+
+ implement {
+ name = "specifiedfont",
+ arguments = { "integer", "number" },
+ actions = function(id,size)
+ local f = specifiers[id]
+ if f and size then
+ context("%s at %0.2p",f[1],size * f[2]) -- we round to 2 decimals (as at the tex end)
+ end
+ end
+ }
+ --
+
+ local function define(specification)
+ --
+ local name = specification.name
+ if not name or name == "" then
+ return -1
+ else
+ starttiming(fonts)
+ --
+ -- following calls expect a few properties to be set:
+ --
+ local lookup, name, sub, method, detail = getspecification(name or "")
+ --
+ specification.name = (name ~= "" and name) or specification.name
+ --
+ specification.lookup = specification.lookup or (lookup ~= "" and lookup) or "file"
+ specification.size = specification.size or 655260
+ specification.sub = specification.sub or (sub ~= "" and sub) or ""
+ specification.method = specification.method or (method ~= "" and method) or "*"
+ specification.detail = specification.detail or (detail ~= "" and detail) or ""
+ --
+ if type(specification.size) == "string" then
+ specification.size = texsp(specification.size) or 655260
+ end
+ --
+ specification.specification = "" -- not used
+ specification.resolved = ""
+ specification.forced = ""
+ specification.features = { } -- via detail, maybe some day
+ --
+ -- we don't care about mathsize textsize goodies fallbacks
+ --
+ local cs = specification.cs
+ if cs == "" then
+ cs = nil
+ specification.cs = nil
+ specification.global = false
+ elseif specification.global == nil then
+ specification.global = false
+ end
+ --
+ local tfmdata = definers.read(specification,specification.size)
+ if not tfmdata then
+ return -1, nil
+ elseif type(tfmdata) == "number" then
+ if cs then
+ texdefinefont(specification.global,cs,tfmdata)
+ -- texdefinefont(cs,tfmdata,specification.global and "global")
+ csnames[tfmdata] = cs
+ end
+ stoptiming(fonts)
+ return tfmdata, fontdata[tfmdata]
+ else
+ local id = definefont(tfmdata)
+ tfmdata.properties.id = id
+ definers.register(tfmdata,id)
+ if cs then
+ texdefinefont(specification.global,cs,id)
+ -- texdefinefont(cs,id,specification.global and "global")
+ csnames[id] = cs
+ end
+ constructors.finalize(tfmdata)
+ stoptiming(fonts)
+ return id, tfmdata
+ end
+ end
+ end
+
+ definers.define = define
+
+ -- local id, cs = fonts.definers.internal { }
+ -- local id, cs = fonts.definers.internal { number = 2 }
+ -- local id, cs = fonts.definers.internal { name = "dejavusans" }
+
+ local n = 0
+
+ function definers.internal(specification,cs)
+ specification = specification or { }
+ local name = specification.name
+ local size = tonumber(specification.size)
+ local number = tonumber(specification.number)
+ local id = nil
+ if not size then
+ size = texgetdimen("bodyfontsize")
+ end
+ if number then
+ id = number
+ elseif name and name ~= "" then
+ local cs = cs or specification.cs
+ if not cs then
+ n = n + 1 -- beware ... there can be many and they are often used once
+ -- cs = formatters["internal font %s"](n)
+ cs = "internal font " .. n
+ else
+ specification.cs = cs
+ end
+ id = define {
+ name = name,
+ size = size,
+ cs = cs,
+ }
+ end
+ if not id then
+ id = currentfont()
+ end
+ return id, csnames[id]
+ end
+
+ local function read(name,size)
+ return (define { name = name, size = size } or 0)
+ end
+
+ callbacks.register('define_font', read, "definition of fonts (tfmdata preparation)")
+
+ -- here
+
+ local infofont = 0
+
+ function fonts.infofont()
+ if infofont == 0 then
+ infofont = define { name = "dejavusansmono", size = texsp("6pt") }
+ end
+ return infofont
+ end
+
+ -- abstract interfacing
+
+ implement { name = "tf", actions = function() setmacro("fontalternative","tf") end }
+ implement { name = "bf", actions = function() setmacro("fontalternative","bf") end }
+ implement { name = "it", actions = function() setmacro("fontalternative","it") end }
+ implement { name = "sl", actions = function() setmacro("fontalternative","sl") end }
+ implement { name = "bi", actions = function() setmacro("fontalternative","bi") end }
+ implement { name = "bs", actions = function() setmacro("fontalternative","bs") end }
+
+end
+
+-- Not ok, we can best use a database for this. The problem is that we
+-- have delayed definitions and so we never know what style is taken
+-- as start.
+
+function constructors.calculatescale(tfmdata,scaledpoints,relativeid,specification)
+ local parameters = tfmdata.parameters
+ local units = parameters.units or 1000
+ if specification then
+ local scalemode = specification.scalemode
+ local special = scalemode and specialscale[scalemode]
+ if special == "ht" then
+ local height = parameters.ascender / units
+ scaledpoints = scaledpoints / height
+ elseif special == "cp" then
+ local glyph = tfmdata.descriptions[utfbyte("X")]
+ local height = (glyph and glyph.height or parameters.ascender) / units
+ scaledpoints = scaledpoints / height
+ end
+ end
+ if scaledpoints < 0 then
+ scaledpoints = (- scaledpoints/1000) * (tfmdata.designsize or parameters.designsize) -- already in sp
+ end
+ -- a temp hack till we have upgraded all mechanisms
+ local delta = round(scaledpoints/units)
+ local size = round(scaledpoints)
+ texsetcount("c_font_scaled_points",size)
+ --
+ return size, delta
+end
+
+local designsizes = constructors.designsizes
+
+-- called quite often when in mp labels
+-- otf.normalizedaxis
+
+function constructors.hashinstance(specification,force)
+ local hash = specification.hash
+ local size = specification.size
+ local fallbacks = specification.fallbacks
+ if force or not hash then
+ hash = constructors.hashfeatures(specification)
+ specification.hash = hash
+ end
+ if size < 1000 and designsizes[hash] then
+ size = round(constructors.scaled(size,designsizes[hash]))
+ else
+ size = round(size)
+ end
+ specification.size = size
+ if fallbacks then
+ return hash .. ' @ ' .. size .. ' @ ' .. fallbacks
+ else
+ local scalemode = specification.scalemode
+ local special = scalemode and specialscale[scalemode]
+ if special then
+ return hash .. ' @ ' .. size .. ' @ ' .. special
+ else
+ return hash .. ' @ ' .. size
+ end
+ end
+end
+
+-- We overload the (generic) resolver:
+
+local resolvers = definers.resolvers
+local hashfeatures = constructors.hashfeatures
+
+function definers.resolve(specification) -- overload function in font-con.lua
+ if not specification.resolved or specification.resolved == "" then -- resolved itself not per se in mapping hash
+ local r = resolvers[specification.lookup]
+ if r then
+ r(specification)
+ end
+ end
+ if specification.forced == "" then
+ specification.forced = nil
+ else
+ specification.forced = specification.forced
+ end
+ -- goodies are a context specific thing and are not always defined
+ -- as feature, so we need to make sure we add them here before
+ -- hashing because otherwise we get funny goodies applied
+ local goodies = specification.goodies
+ if goodies and goodies ~= "" then
+ -- this adapts the features table so it has best be a copy
+ local normal = specification.features.normal
+ if not normal then
+ specification.features.normal = { goodies = goodies }
+ elseif not normal.goodies then
+ local g = normal.goodies
+ if g and g ~= "" then
+ normal.goodies = formatters["%s,%s"](g,goodies)
+ else
+ normal.goodies = goodies
+ end
+ end
+ end
+ -- so far for goodie hacks
+ local hash = hashfeatures(specification)
+ local name = specification.name or "badfont"
+ local sub = specification.sub
+ if sub and sub ~= "" then
+ specification.hash = lower(name .. " @ " .. sub .. ' @ ' .. hash)
+ else
+ specification.hash = lower(name .. " @ " .. ' @ ' .. hash)
+ end
+ --
+ return specification
+end
+
+-- we need an 'do after the banner hook'
+
+-- => commands
+
+local pattern = P("P")
+ * (lpeg.patterns.hexdigit^4 / function(s) return tonumber(s,16) end)
+ * P(-1)
+
+local function nametoslot(name) -- also supports PXXXXX (4+ positions)
+ local t = type(name)
+ if t == "string" then
+ local unic = unicodes[true]
+ local slot = unic[name]
+ if slot then
+ return slot
+ end
+ --
+ local slot = unic[gsub(name,"_"," ")] or unic[gsub(name,"_","-")] or
+ unic[gsub(name,"-"," ")] or unic[gsub(name,"-","_")] or
+ unic[gsub(name," ","_")] or unic[gsub(name," ","-")]
+ if slot then
+ return slot
+ end
+ --
+ if not aglunicodes then
+ aglunicodes = encodings.agl.unicodes
+ end
+ local char = characters[true]
+ local slot = aglunicodes[name]
+ if slot and char[slot] then
+ return slot
+ end
+ local slot = lpegmatch(pattern,name)
+ if slot and char[slot] then
+ return slot
+ end
+ -- not in font
+ elseif t == "number" then
+ if characters[true][name] then
+ return slot
+ else
+ -- not in font
+ end
+ end
+end
+
+local found = { }
+
+local function descriptiontoslot(name)
+ local t = type(name)
+ if t == "string" then
+ -- slow
+ local list = sortedkeys(chardata) -- can be a cache with weak tables
+ local slot = found[name]
+ local char = characters[true]
+ if slot then
+ return char[slot] and slot or nil
+ end
+ local NAME = upper(name)
+ for i=1,#list do
+ slot = list[i]
+ local c = chardata[slot]
+ local d = c.description
+ if d == NAME then
+ found[name] = slot
+ return char[slot] and slot or nil
+ end
+ end
+ for i=1,#list do
+ slot = list[i]
+ local c = chardata[slot]
+ local s = c.synonyms
+ if s then
+ for i=1,#s do
+ local si = s[i]
+ if si == name then
+ found[name] = si
+ return char[slot] and slot or nil
+ end
+ end
+ end
+ end
+ for i=1,#list do
+ slot = list[i]
+ local c = chardata[slot]
+ local d = c.description
+ if d and find(d,NAME) then
+ found[name] = slot
+ return char[slot] and slot or nil
+ end
+ end
+ for i=1,#list do
+ slot = list[i]
+ local c = chardata[slot]
+ local s = c.synonyms
+ if s then
+ for i=1,#s do
+ local si = s[i]
+ if find(s[i],name) then
+ found[name] = si
+ return char[slot] and slot or nil
+ end
+ end
+ end
+ end
+ -- not in font
+ elseif t == "number" then
+ if characters[true][name] then
+ return slot
+ else
+ -- not in font
+ end
+ end
+end
+
+local function indextoslot(font,index)
+ if not index then
+ index = font
+ font = true
+ end
+ local r = resources[font]
+ if r then
+ local indices = r.indices
+ if not indices then
+ indices = { }
+ local c = characters[font]
+ for unicode, data in next, c do
+ local di = data.index
+ if di then
+ indices[di] = unicode
+ end
+ end
+ r.indices = indices
+ end
+ return indices[tonumber(index)]
+ end
+end
+
+do -- else too many locals
+
+ local entities = characters.entities
+ local lowered = { } -- delayed initialization
+
+ setmetatableindex(lowered,function(t,k)
+ for k, v in next, entities do
+ local l = lower(k)
+ if not entities[l] then
+ lowered[l] = v
+ end
+ end
+ setmetatableindex(lowered,nil)
+ return lowered[k]
+ end)
+
+ local methods = {
+ -- entity
+ e = function(name)
+ return entities[name] or lowered[name] or name
+ end,
+ -- hexadecimal unicode
+ x = function(name)
+ local n = tonumber(name,16)
+ return n and utfchar(n) or name
+ end,
+ -- decimal unicode
+ d = function(name)
+ local n = tonumber(name)
+ return n and utfchar(n) or name
+ end,
+ -- hexadecimal index (slot)
+ s = function(name)
+ local n = tonumber(name,16)
+ local n = n and indextoslot(n)
+ return n and utfchar(n) or name
+ end,
+ -- decimal index
+ i = function(name)
+ local n = tonumber(name)
+ local n = n and indextoslot(n)
+ return n and utfchar(n) or name
+ end,
+ -- name
+ n = function(name)
+ local n = nametoslot(name)
+ return n and utfchar(n) or name
+ end,
+ -- unicode description (synonym)
+ u = function(name)
+ local n = descriptiontoslot(name,false)
+ return n and utfchar(n) or name
+ end,
+ -- all
+ a = function(name)
+ local n = nametoslot(name) or descriptiontoslot(name)
+ return n and utfchar(n) or name
+ end,
+ -- char
+ c = function(name)
+ return name
+ end,
+ }
+
+ -- -- nicer:
+ --
+ -- setmetatableindex(methods,function(t,k) return methods.c end)
+ --
+ -- local splitter = (C(1) * P(":") + Cc("c")) * C(P(1)^1) / function(method,name)
+ -- return methods[method](name)
+ -- end
+ --
+ -- -- more efficient:
+
+ local splitter = C(1) * P(":") * C(P(1)^1) / function(method,name)
+ local action = methods[method]
+ return action and action(name) or name
+ end
+
+ local function tochar(str)
+ local t = type(str)
+ if t == "number" then
+ return utfchar(str)
+ elseif t == "string" then
+ return lpegmatch(splitter,str) or str
+ else
+ return str
+ end
+ end
+
+ helpers.nametoslot = nametoslot
+ helpers.descriptiontoslot = descriptiontoslot
+ helpers.indextoslot = indextoslot
+ helpers.tochar = tochar
+
+ -- interfaces:
+
+ implement {
+ name = "fontchar",
+ actions = { nametoslot, ctx_char },
+ arguments = "string",
+ }
+
+ implement {
+ name = "fontcharbyindex",
+ actions = { indextoslot, ctx_char },
+ arguments = "integer",
+ }
+
+ implement {
+ name = "tochar",
+ actions = { tochar, ctx_safechar },
+ arguments = "string",
+ }
+
+end
+
+-- this will change ...
+
+function loggers.reportdefinedfonts()
+ if trace_usage then
+ local t, tn = { }, 0
+ for id, data in sortedhash(fontdata) do
+ local properties = data.properties or { }
+ local parameters = data.parameters or { }
+ tn = tn + 1
+ t[tn] = {
+ formatters["%03i"](id or 0),
+ formatters["%p" ](parameters.size or 0),
+ properties.format or "unknown",
+ properties.name or "",
+ properties.psname or "",
+ properties.fullname or "",
+ properties.sharedwith or "",
+ }
+ end
+ formatcolumns(t," ")
+ --
+ logs.startfilelogging(report,"defined fonts")
+ for k=1,tn do
+ report(t[k])
+ end
+ logs.stopfilelogging()
+ end
+end
+
+logs.registerfinalactions(loggers.reportdefinedfonts)
+
+function loggers.reportusedfeatures()
+ -- numbers, setups, merged
+ if trace_usage then
+ local t, n = { }, #numbers
+ for i=1,n do
+ local name = numbers[i]
+ local setup = setups[name]
+ local n = setup.number
+ setup.number = nil -- we have no reason to show this
+ t[i] = { i, name, sequenced(setup,false,true) } -- simple mode
+ setup.number = n -- restore it (normally not needed as we're done anyway)
+ end
+ formatcolumns(t," ")
+ logs.startfilelogging(report,"defined featuresets")
+ for k=1,n do
+ report(t[k])
+ end
+ logs.stopfilelogging()
+ end
+end
+
+logs.registerfinalactions(loggers.reportusedfeatures)
+
+-- maybe move this to font-log.lua:
+
+statistics.register("font engine", function()
+ local elapsed = statistics.elapsedseconds(fonts)
+ local nofshared = constructors.nofsharedfonts or 0
+ local nofloaded = constructors.noffontsloaded or 0
+ if nofshared > 0 then
+ return format("otf %0.3f, afm %0.3f, tfm %0.3f, %s instances, %s shared in backend, %s common vectors, %s common hashes, load time %s",
+ otf.version,afm.version,tfm.version,nofloaded,
+ nofshared,constructors.nofsharedvectors,constructors.nofsharedhashes,
+ elapsed)
+ elseif nofloaded > 0 and elapsed then
+ return format("otf %0.3f, afm %0.3f, tfm %0.3f, %s instances, load time %s",
+ otf.version,afm.version,tfm.version,nofloaded,
+ elapsed)
+ else
+ return format("otf %0.3f, afm %0.3f, tfm %0.3f",
+ otf.version,afm.version,tfm.version)
+ end
+end)
+
+-- experimental mechanism for Mojca:
+--
+-- fonts.definetypeface {
+-- name = "mainbodyfont-light",
+-- preset = "antykwapoltawskiego-light",
+-- }
+--
+-- fonts.definetypeface {
+-- name = "mojcasfavourite",
+-- preset = "antykwapoltawskiego",
+-- normalweight = "light",
+-- boldweight = "bold",
+-- width = "condensed",
+-- }
+
+local Shapes = {
+ serif = "Serif",
+ sans = "Sans",
+ mono = "Mono",
+}
+
+local ctx_startfontclass = context.startfontclass
+local ctx_stopfontclass = context.stopfontclass
+local ctx_definefontsynonym = context.definefontsynonym
+local ctx_dofastdefinetypeface = context.dofastdefinetypeface
+
+function fonts.definetypeface(name,t)
+ if type(name) == "table" then
+ -- {name=abc,k=v,...}
+ t = name
+ elseif t then
+ if type(t) == "string" then
+ -- "abc", "k=v,..."
+ t = settings_to_hash(name)
+ else
+ -- "abc", {k=v,...}
+ end
+ t.name = t.name or name
+ else
+ -- "name=abc,k=v,..."
+ t = settings_to_hash(name)
+ end
+ local p = t.preset and fonts.typefaces[t.preset] or { }
+ local name = t.name or "unknowntypeface"
+ local shortcut = t.shortcut or p.shortcut or "rm"
+ local size = t.size or p.size or "default"
+ local shape = t.shape or p.shape or "serif"
+ local fontname = t.fontname or p.fontname or "unknown"
+ local normalweight = t.normalweight or t.weight or p.normalweight or p.weight or "normal"
+ local boldweight = t.boldweight or t.weight or p.boldweight or p.weight or "normal"
+ local normalwidth = t.normalwidth or t.width or p.normalwidth or p.width or "normal"
+ local boldwidth = t.boldwidth or t.width or p.boldwidth or p.width or "normal"
+ Shape = Shapes[shape] or "Serif"
+ ctx_startfontclass { name }
+ ctx_definefontsynonym( { formatters["%s"] (Shape) }, { formatters["spec:%s-%s-regular-%s"] (fontname, normalweight, normalwidth) } )
+ ctx_definefontsynonym( { formatters["%sBold"] (Shape) }, { formatters["spec:%s-%s-regular-%s"] (fontname, boldweight, boldwidth ) } )
+ ctx_definefontsynonym( { formatters["%sBoldItalic"](Shape) }, { formatters["spec:%s-%s-italic-%s"] (fontname, boldweight, boldwidth ) } )
+ ctx_definefontsynonym( { formatters["%sItalic"] (Shape) }, { formatters["spec:%s-%s-italic-%s"] (fontname, normalweight, normalwidth) } )
+ ctx_stopfontclass()
+ local settings = sequenced({ features= t.features },",")
+ ctx_dofastdefinetypeface(name, shortcut, shape, size, settings)
+end
+
+implement {
+ name = "definetypeface",
+ actions = fonts.definetypeface,
+ arguments = "2 strings"
+}
+
+function fonts.current() -- todo: also handle name
+ return fontdata[currentfont()] or fontdata[0]
+end
+
+function fonts.currentid()
+ return currentfont() or 0
+end
+
+-- for the moment here, this will become a chain of extras that is
+-- hooked into the ctx registration (or scaler or ...)
+
+local dimenfactors = number.dimenfactors
+
+function helpers.dimenfactor(unit,id)
+ if unit == "ex" then
+ return id and exheights[id] or 282460 -- lm 10pt
+ elseif unit == "em" then
+ return id and emwidths [id] or 655360 -- lm 10pt
+ else
+ local du = dimenfactors[unit]
+ return du and 1/du or tonumber(unit) or 1
+ end
+end
+
+local function digitwidth(font) -- max(quad/2,wd(0..9))
+ local tfmdata = fontdata[font]
+ local parameters = tfmdata.parameters
+ local width = parameters.digitwidth
+ if not width then
+ width = round(parameters.quad/2) -- maybe tex.scale
+ local characters = tfmdata.characters
+ for i=48,57 do
+ local wd = round(characters[i].width)
+ if wd > width then
+ width = wd
+ end
+ end
+ parameters.digitwidth = width
+ end
+ return width
+end
+
+helpers.getdigitwidth = digitwidth
+helpers.setdigitwidth = digitwidth
+
+--
+
+function helpers.getparameters(tfmdata)
+ local p = { }
+ local m = p
+ local parameters = tfmdata.parameters
+ while true do
+ for k, v in next, parameters do
+ m[k] = v
+ end
+ parameters = getmetatable(parameters)
+ parameters = parameters and parameters.__index
+ if type(parameters) == "table" then
+ m = { }
+ p.metatable = m
+ else
+ break
+ end
+ end
+ return p
+end
+
+if environment.initex then
+
+ local function names(t)
+ local nt = #t
+ if nt > 0 then
+ local n = { }
+ for i=1,nt do
+ n[i] = t[i].name
+ end
+ return concat(n," ")
+ else
+ return "-"
+ end
+ end
+
+ statistics.register("font processing", function()
+ local l = { }
+ for what, handler in table.sortedpairs(handlers) do
+ local features = handler and handler.features
+ if features then
+ l[#l+1] = format("[%s (base initializers: %s) (base processors: %s) (base manipulators: %s) (node initializers: %s) (node processors: %s) (node manipulators: %s)]",
+ what,
+ names(features.initializers.base),
+ names(features.processors .base),
+ names(features.manipulators.base),
+ names(features.initializers.node),
+ names(features.processors .node),
+ names(features.manipulators.node)
+ )
+ end
+ end
+ return concat(l, " | ")
+ end)
+
+end
+
+-- redefinition
+
+-- local hashes = fonts.hashes
+-- local emwidths = hashes.emwidths
+-- local exheights = hashes.exheights
+
+setmetatableindex(dimenfactors, function(t,k)
+ if k == "ex" then
+ return 1/exheights[currentfont()]
+ elseif k == "em" then
+ return 1/emwidths[currentfont()]
+ elseif k == "pct" or k == "%" then
+ return 1/(texget("hsize")/100)
+ else
+ -- error("wrong dimension: " .. (s or "?")) -- better a message
+ return false
+ end
+end)
+
+dimenfactors.ex = nil
+dimenfactors.em = nil
+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]]--
+
+do
+
+ -- can become luat-tex.lua
+
+ local texsetglyphdata = tex.setglyphdata
+ local texgetglyphdata = tex.getglyphdata
+
+ if not texsetglyphdata then
+
+ local texsetattribute = tex.setattribute
+ local texgetattribute = tex.getattribute
+
+ texsetglyphdata = function(n) return texsetattribute(0,n) end
+ texgetglyphdata = function() return texgetattribute(0) end
+
+ tex.setglyphdata = texsetglyphdata
+ tex.getglyphdata = texgetglyphdata
+
+ end
+
+ -- till here
+
+ local setmacro = tokens.setters.macro
+
+ function constructors.currentfonthasfeature(n)
+ local f = fontdata[currentfont()]
+ if not f then return end f = f.shared
+ if not f then return end f = f.rawdata
+ if not f then return end f = f.resources
+ if not f then return end f = f.features
+ return f and (f.gpos[n] or f.gsub[n])
+ end
+
+ local ctx_doifelse = commands.doifelse
+ local ctx_doif = commands.doif
+
+ implement {
+ name = "doifelsecurrentfonthasfeature",
+ actions = { constructors.currentfonthasfeature, ctx_doifelse },
+ arguments = "string"
+ }
+
+ local f_strip = formatters["%0.2fpt"] -- normally this value is changed only once
+ local stripper = lpeg.patterns.stripzeros
+
+ local cache = { }
+
+ local hows = {
+ ["+"] = "add",
+ ["-"] = "subtract",
+ ["="] = "replace",
+ }
+
+ local function setfeature(how,parent,name,font) -- 0/1 test temporary for testing
+ if not how or how == 0 then
+ if trace_features and texgetglyphdata() ~= 0 then
+ report_cummulative("font %!font:name!, reset",fontdata[font or true])
+ end
+ texsetglyphdata(0)
+ elseif how == true or how == 1 then
+ local hash = "feature > " .. parent
+ local done = cache[hash]
+ if trace_features and done then
+ report_cummulative("font %!font:name!, revive %a : %!font:features!",fontdata[font or true],parent,setups[numbers[done]])
+ end
+ texsetglyphdata(done or 0)
+ else
+ local full = parent .. how .. name
+ local hash = "feature > " .. full
+ local done = cache[hash]
+ if not done then
+ local n = setups[full]
+ if n then
+ -- already defined
+ else
+ n = mergecontextfeatures(parent,name,how,full)
+ end
+ done = registercontextfeature(hash,full,how)
+ cache[hash] = done
+ if trace_features then
+ report_cummulative("font %!font:name!, %s %a : %!font:features!",fontdata[font or true],hows[how],full,setups[numbers[done]])
+ end
+ end
+ texsetglyphdata(done)
+ end
+ end
+
+ local function resetfeature()
+ if trace_features and texgetglyphdata() ~= 0 then
+ report_cummulative("font %!font:name!, reset",fontdata[true])
+ end
+ texsetglyphdata(0)
+ end
+
+ local function setfontfeature(tag)
+ texsetglyphdata(contextnumber(tag))
+ end
+
+ local function resetfontfeature()
+ texsetglyphdata(0)
+ end
+
+ implement {
+ name = "nbfs",
+ arguments = "dimen",
+ actions = function(d)
+ context(lpegmatch(stripper,f_strip(d/65536)))
+ end
+ }
+
+ implement {
+ name = "featureattribute",
+ arguments = "string",
+ actions = { contextnumber, context }
+ }
+
+ implement {
+ name = "setfontfeature",
+ arguments = "string",
+ actions = setfontfeature,
+ }
+
+ implement {
+ name = "resetfontfeature",
+ -- arguments = { 0, 0 },
+ actions = resetfontfeature,
+ }
+
+ implement {
+ name = "setfontofid",
+ arguments = "integer",
+ actions = function(id)
+ ctx_getvalue(csnames[id])
+ end
+ }
+
+ implement {
+ name = "definefontfeature",
+ arguments = "3 strings",
+ actions = presetcontext,
+ }
+
+ implement {
+ name = "doifelsefontfeature",
+ arguments = "string",
+ actions = function(name) ctx_doifelse(contextnumber(name) > 1) end,
+ }
+
+ implement {
+ name = "doifunknownfontfeature",
+ arguments = "string",
+ actions = function(name) ctx_doif(contextnumber(name) == 0) end,
+ }
+
+ implement {
+ name = "adaptfontfeature",
+ arguments = "2 strings",
+ actions = adaptcontext
+ }
+
+ local function registerlanguagefeatures()
+ local specifications = languages.data.specifications
+ for i=1,#specifications do
+ local specification = specifications[i]
+ local language = specification.opentype
+ if language then
+ local script = specification.opentypescript or specification.script
+ if script then
+ local context = specification.context
+ if type(context) == "table" then
+ for i=1,#context do
+ definecontext(context[i], { language = language, script = script})
+ end
+ elseif type(context) == "string" then
+ definecontext(context, { language = language, script = script})
+ end
+ end
+ end
+ end
+ end
+
+ constructors.setfeature = setfeature
+ constructors.resetfeature = resetfeature
+
+ implement { name = "resetfeature", actions = resetfeature }
+ implement { name = "addfeature", actions = setfeature, arguments = { "'+'", "string", "string" } }
+ implement { name = "subtractfeature", actions = setfeature, arguments = { "'-'", "string", "string" } }
+ implement { name = "replacefeature", actions = setfeature, arguments = { "'='", "string", "string" } }
+ implement { name = "revivefeature", actions = setfeature, arguments = { true, "string" } }
+
+ implement {
+ name = "featurelist",
+ actions = { fonts.specifiers.contexttostring, context },
+ arguments = { "string", "'otf'", "string", "'yes'", "'no'", true }
+ }
+
+ implement {
+ name = "registerlanguagefeatures",
+ actions = registerlanguagefeatures,
+ }
+
+end
+
+-- a fontkern plug:
+
+-- nodes.injections.installnewkern(nuts.pool.fontkern)
+
+do
+
+ local report = logs.reporter("otf","variants")
+
+ local function replace(tfmdata,feature,value)
+ local characters = tfmdata.characters
+ local variants = tfmdata.resources.variants
+ if variants then
+ local t = { }
+ for k, v in sortedhash(variants) do
+ t[#t+1] = formatters["0x%X (%i)"](k,k)
+ end
+ value = tonumber(value) or 0xFE00 -- 917762
+ report("fontname : %s",tfmdata.properties.fontname)
+ report("available: % t",t)
+ local v = variants[value]
+ if v then
+ report("using : %X (%i)",value,value)
+ for k, v in next, v do
+ local c = characters[v]
+ if c then
+ characters[k] = c
+ end
+ end
+ else
+ report("unknown : %X (%i)",value,value)
+ end
+ end
+ end
+
+ registerotffeature {
+ name = 'variant',
+ description = 'unicode variant',
+ manipulators = {
+ base = replace,
+ node = replace,
+ }
+ }
+
+end
+
+-- here (todo: closure)
+
+-- make a closure (200 limit):
+
+do
+
+ local trace_analyzing = false trackers.register("otf.analyzing", function(v) trace_analyzing = v end)
+
+ local analyzers = fonts.analyzers
+ local methods = analyzers.methods
+
+ local unsetvalue = attributes.unsetvalue
+
+ local a_color = attributes.private('color')
+ local a_colormodel = attributes.private('colormodel')
+ local m_color = attributes.list[a_color] or { }
+
+ local glyph_code = nodes.nodecodes.glyph
+
+ local states = analyzers.states
+
+ local colornames = {
+ [states.init] = "font:1",
+ [states.medi] = "font:2",
+ [states.fina] = "font:3",
+ [states.isol] = "font:4",
+ [states.mark] = "font:5",
+ [states.rest] = "font:6",
+ [states.rphf] = "font:1",
+ [states.half] = "font:2",
+ [states.pref] = "font:3",
+ [states.blwf] = "font:4",
+ [states.pstf] = "font:5",
+ }
+
+ -- todo: traversers
+ -- todo: check attr_list so that we can use the same .. helper: setcolorattr
+
+ local function markstates(head)
+ if head then
+ head = tonut(head)
+ local model = getattr(head,a_colormodel) or 1
+ for glyph in nextchar, head do
+ local a = getstate(glyph)
+ if a then
+ local name = colornames[a]
+ if name then
+ local color = m_color[name]
+ if color then
+ setattr(glyph,a_colormodel,model)
+ setattr(glyph,a_color,color)
+ end
+ end
+ end
+ end
+ end
+ end
+
+ local function analyzeprocessor(head,font,attr)
+ local tfmdata = fontdata[font]
+ local script, language = otf.scriptandlanguage(tfmdata,attr)
+ local action = methods[script]
+ if not action then
+ return head, false
+ end
+ if type(action) == "function" then
+ local head, done = action(head,font,attr)
+ if done and trace_analyzing then
+ markstates(head)
+ end
+ return head, done
+ end
+ action = action[language]
+ if action then
+ local head, done = action(head,font,attr)
+ if done and trace_analyzing then
+ markstates(head)
+ end
+ return head, done
+ else
+ return head, false
+ end
+ end
+
+ registerotffeature { -- adapts
+ name = "analyze",
+ processors = {
+ node = analyzeprocessor,
+ }
+ }
+
+
+ function methods.nocolor(head,font,attr)
+ for n, c, f in nextchar, head do
+ if not font or f == font then
+ setattr(n,a_color,unsetvalue)
+ end
+ end
+ return head, true
+ end
+
+end
+
+
+local function purefontname(name)
+ if type(name) == "number" then
+ name = getfontname(name)
+ end
+ if type(name) == "string" then
+ return basename(name)
+ end
+end
+
+implement {
+ name = "purefontname",
+ actions = { purefontname, context },
+ arguments = "string",
+}
+
+local sharedstorage = storage.shared
+
+local list = sharedstorage.bodyfontsizes or { }
+local unknown = sharedstorage.unknownbodyfontsizes or { }
+
+sharedstorage.bodyfontsizes = list
+sharedstorage.unknownbodyfontsizes = unknown
+
+implement {
+ name = "registerbodyfontsize",
+ arguments = "string",
+ actions = function(size)
+ list[size] = true
+ end
+}
+
+interfaces.implement {
+ name = "registerunknownbodysize",
+ arguments = "string",
+ actions = function(size)
+ if not unknown[size] then
+ interfaces.showmessage("fonts",14,size)
+ end
+ unknown[size] = true
+ end,
+}
+
+implement {
+ name = "getbodyfontsizes",
+ arguments = "string",
+ actions = function(separator)
+ context(concat(sortedkeys(list),separator))
+ end
+}
+
+implement {
+ name = "processbodyfontsizes",
+ arguments = "string",
+ actions = function(command)
+ local keys = sortedkeys(list)
+ if command then
+ local action = context[command]
+ for i=1,#keys do
+ action(keys[i])
+ end
+ else
+ context(concat(keys,","))
+ end
+ end
+}
+
+implement {
+ name = "cleanfontname",
+ actions = { cleanname, context },
+ arguments = "string"
+}
+
+implement {
+ name = "fontlookupinitialize",
+ actions = names.lookup,
+ arguments = "string",
+}
+
+implement {
+ name = "fontlookupnoffound",
+ actions = { names.noflookups, context },
+}
+
+implement {
+ name = "fontlookupgetkeyofindex",
+ actions = { names.getlookupkey, context },
+ arguments = { "string", "integer"}
+}
+
+implement {
+ name = "fontlookupgetkey",
+ actions = { names.getlookupkey, context },
+ arguments = "string"
+}
+
+-- this might move to a runtime module:
+
+function commands.showchardata(n)
+ local tfmdata = fontdata[currentfont()]
+ if tfmdata then
+ if type(n) == "string" then
+ n = utfbyte(n)
+ end
+ local chr = tfmdata.characters[n]
+ if chr then
+ report_status("%s @ %s => %U => %c => %s",tfmdata.properties.fullname,tfmdata.parameters.size,n,n,serialize(chr,false))
+ end
+ end
+end
+
+function commands.showfontparameters(tfmdata)
+ -- this will become more clever
+ local tfmdata = tfmdata or fontdata[currentfont()]
+ if tfmdata then
+ local parameters = tfmdata.parameters
+ local mathparameters = tfmdata.mathparameters
+ local properties = tfmdata.properties
+ local hasparameters = parameters and next(parameters)
+ local hasmathparameters = mathparameters and next(mathparameters)
+ if hasparameters then
+ report_status("%s @ %s => text parameters => %s",properties.fullname,parameters.size,serialize(parameters,false))
+ end
+ if hasmathparameters then
+ report_status("%s @ %s => math parameters => %s",properties.fullname,parameters.size,serialize(mathparameters,false))
+ end
+ if not hasparameters and not hasmathparameters then
+ report_status("%s @ %s => no text parameters and/or math parameters",properties.fullname,parameters.size)
+ end
+ end
+end
+
+implement {
+ name = "currentdesignsize",
+ actions = function()
+ context(parameters[currentfont()].designsize)
+ end
+}
+
+implement {
+ name = "doifelsefontpresent",
+ actions = { names.exists, commands.doifelse },
+ arguments = "string"
+}
+
+-- we use 0xFE000+ and 0xFF000+ in math and for runtime (text) extensions we
+-- use 0xFD000+
+
+constructors.privateslots = constructors.privateslots or { }
+
+storage.register("fonts/constructors/privateslots", constructors.privateslots, "fonts.constructors.privateslots")
+
+do
+
+ local privateslots = constructors.privateslots
+ local lastprivateslot = 0xFD000
+
+ constructors.privateslots = setmetatableindex(privateslots,function(t,k)
+ local v = lastprivateslot
+ lastprivateslot = lastprivateslot + 1
+ t[k] = v
+ return v
+ end)
+
+ implement {
+ name = "getprivateglyphslot",
+ actions = function(name) context(privateslots[name]) end,
+ arguments = "string",
+ }
+
+end
+
+-- an extra helper
+
+function helpers.getcoloredglyphs(tfmdata)
+ if type(tfmdata) == "number" then
+ tfmdata = fontdata[tfmdata]
+ end
+ if not tfmdata then
+ tfmdata = fontdata[true]
+ end
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local collected = { }
+ for unicode, character in next, characters do
+ local description = descriptions[unicode]
+ if description and (description.colors or character.svg) then
+ collected[#collected+1] = unicode
+ end
+ end
+ table.sort(collected)
+ return collected
+end
+
+-- for the font manual
+
+statistics.register("body font sizes", function()
+ if next(unknown) then
+ return formatters["defined: % t, undefined: % t"](sortedkeys(list),sortedkeys(unknown))
+ end
+end)
+
+statistics.register("used fonts",function()
+ if trace_usage then
+ local filename = file.nameonly(environment.jobname) .. "-fonts-usage.lua"
+ if next(fontdata) then
+ local files = { }
+ local list = { }
+ for id, tfmdata in sortedhash(fontdata) do
+ local filename = tfmdata.properties.filename
+ if filename then
+ local filedata = files[filename]
+ if filedata then
+ filedata.instances = filedata.instances + 1
+ else
+ local rawdata = tfmdata.shared and tfmdata.shared.rawdata
+ local metadata = rawdata and rawdata.metadata
+ files[filename] = {
+ instances = 1,
+ filename = filename,
+ version = metadata and metadata.version,
+ size = rawdata and rawdata.size,
+ }
+ end
+ else
+ -- what to do
+ end
+ end
+ for k, v in sortedhash(files) do
+ list[#list+1] = v
+ end
+ table.save(filename,list)
+ else
+ os.remove(filename)
+ end
+ end
+end)
+
+-- new
+
+do
+
+ local settings_to_array = utilities.parsers.settings_to_array
+
+ implement {
+ name = "definefontcolorpalette",
+ arguments = "2 strings",
+ actions = function(name,set)
+ otf.registerpalette(name,settings_to_array(set))
+ end
+ }
+
+end
+
+do
+
+ local pattern = C((1-S("* "))^1) -- strips all after * or ' at'
+
+ implement {
+ name = "truefontname",
+ arguments = "string",
+ actions = function(s)
+ -- context(match(s,"[^* ]+") or s)
+ context(lpegmatch(pattern,s) or s)
+ end
+ }
+
+end
+
+do
+
+ local function getinstancespec(id)
+ local data = fontdata[id or true]
+ local shared = data.shared
+ local resources = shared and shared.rawdata.resources
+ if resources then
+ local instancespec = data.properties.instance
+ if instancespec then
+ local variabledata = resources.variabledata
+ if variabledata then
+ local instances = variabledata.instances
+ if instances then
+ for i=1,#instances do
+ local instance = instances[i]
+ if cleanname(instance.subfamily)== instancespec then
+ local values = table.copy(instance.values)
+ local axis = variabledata.axis
+ for i=1,#values do
+ for j=1,#axis do
+ if values[i].axis == axis[j].tag then
+ values[i].name = axis[j].name
+ break
+ end
+ end
+ end
+ return values
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ helpers.getinstancespec = getinstancespec
+
+ -- expandable
+
+ implement {
+ name = "currentfontinstancespec",
+ public = true,
+ actions = function()
+ local t = getinstancespec() -- current font
+ if t then
+ for i=1,#t do
+ if i > 1 then
+ context.space()
+ end
+ local ti = t[i]
+ context("%s=%s",ti.name,ti.value)
+ end
+ end
+ end
+ }
+
+end
+
+-- for the moment here (and not in font-con.lua):
+
+do
+
+ local identical = table.identical
+ local copy = table.copy
+ local fontdata = fonts.hashes.identifiers
+ local addcharacters = font.addcharacters
+
+ -- This helper is mostly meant to add last-resort (virtual) characters
+ -- or runtime generated fonts (so we forget about features and such). It
+ -- will probably take a while before it get used.
+
+ local trace_adding = false
+ local report_adding = logs.reporter("fonts","add characters")
+
+ trackers.register("fonts.addcharacters",function(v) trace_adding = v end)
+
+ function constructors.addcharacters(id,list)
+ local newchar = list.characters
+ if newchar then
+ local data = fontdata[id]
+ local newfont = list.fonts
+ local oldchar = data.characters
+ local oldfont = data.fonts
+ addcharacters(id, {
+ characters = newchar,
+ fonts = newfont,
+ nomath = not data.properties.hasmath,
+ })
+ -- this is just for tracing, as the assignment only uses the fonts list
+ -- and doesn't store it otherwise
+ if newfont then
+ if oldfont then
+ local oldn = #oldfont
+ local newn = #newfont
+ for n=1,newn do
+ local ok = false
+ local nf = newfont[n]
+ for o=1,oldn do
+ if identical(nf,oldfont[o]) then
+ ok = true
+ break
+ end
+ end
+ if not ok then
+ oldn = oldn + 1
+ oldfont[oldn] = newfont[i]
+ end
+ end
+ else
+ data.fonts = newfont
+ end
+ end
+ -- this is because we need to know what goes on and also might
+ -- want to access character data
+ for u, c in next, newchar do
+ if trace_adding then
+ report_adding("adding character %U to font %!font:name!",u,id)
+ end
+ oldchar[u] = c
+ end
+ end
+ end
+
+ implement {
+ name = "addfontpath",
+ arguments = "string",
+ actions = function(list)
+ names.addruntimepath(settings_to_array(list))
+ end
+ }
+
+end
+
+-- moved here
+
+do
+
+ local getfontoffamily = font.getfontoffamily
+ local new_glyph = nodes.pool.glyph
+ local fontproperties = fonts.hashes.properties
+
+ local function getprivateslot(id,name)
+ if not name then
+ name = id
+ id = currentfont()
+ end
+ local properties = fontproperties[id]
+ local privates = properties and properties.privates
+ return privates and privates[name]
+ end
+
+ local function getprivatenode(tfmdata,name)
+ if type(tfmdata) == "number" then
+ tfmdata = fontdata[tfmdata]
+ end
+ local properties = tfmdata.properties
+ local font = properties.id
+ local slot = getprivateslot(font,name)
+ if slot then
+ -- todo: set current attribibutes
+ local char = tfmdata.characters[slot]
+ local tonode = char.tonode
+ if tonode then
+ return tonode(font,char)
+ else
+ return new_glyph(font,slot)
+ end
+ end
+ end
+
+ local function getprivatecharornode(tfmdata,name)
+ if type(tfmdata) == "number" then
+ tfmdata = fontdata[tfmdata]
+ end
+ local properties = tfmdata.properties
+ local font = properties.id
+ local slot = getprivateslot(font,name)
+ if slot then
+ -- todo: set current attributes
+ local char = tfmdata.characters[slot]
+ local tonode = char.tonode
+ if tonode then
+ return "node", tonode(tfmdata,char)
+ else
+ return "char", slot
+ end
+ end
+ end
+
+ helpers.getprivateslot = getprivateslot
+ helpers.getprivatenode = getprivatenode
+ helpers.getprivatecharornode = getprivatecharornode
+
+ implement {
+ name = "getprivatechar",
+ arguments = "string",
+ actions = function(name)
+ local p = getprivateslot(name)
+ if p then
+ context(utfchar(p))
+ end
+ end
+ }
+
+ implement {
+ name = "getprivatemathchar",
+ arguments = "string",
+ actions = function(name)
+ local p = getprivateslot(getfontoffamily(0),name)
+ if p then
+ context(utfchar(p))
+ end
+ end
+ }
+
+ implement {
+ name = "getprivateslot",
+ arguments = "string",
+ actions = function(name)
+ local p = getprivateslot(name)
+ if p then
+ context(p)
+ end
+ end
+ }
+
+end
+
+-- handy, for now here:
+
+function fonts.helpers.collectanchors(tfmdata)
+
+ local resources = tfmdata.resources -- todo: use shared
+
+ if not resources or resources.anchors then
+ return resources.anchors
+ end
+
+ local anchors = { }
+
+ local function set(unicode,target,class,anchor)
+ local a = anchors[unicode]
+ if not a then
+ anchors[unicode] = { [target] = { anchor } }
+ return
+ end
+ local t = a[target]
+ if not t then
+ a[target] = { anchor }
+ return
+ end
+ local x = anchor[1]
+ local y = anchor[2]
+ for k, v in next, t do
+ if v[1] == x and v[2] == y then
+ return
+ end
+ end
+ t[#t+1] = anchor
+ end
+
+ local function getanchors(steps,target)
+ for i=1,#steps do
+ local step = steps[i]
+ local coverage = step.coverage
+ for unicode, data in next, coverage do
+ local class = data[1]
+ local anchor = data[2]
+ if anchor[1] ~= 0 or anchor[2] ~= 0 then
+ set(unicode,target,class,anchor)
+ end
+ end
+ end
+ end
+
+ local function getcursives(steps)
+ for i=1,#steps do
+ local step = steps[i]
+ local coverage = step.coverage
+ for unicode, data in next, coverage do
+ local class = data[1]
+ local en = data[2]
+ local ex = data[3]
+ if en then
+ set(unicode,"entry",class,en)
+ end
+ if ex then
+ set(unicode,"exit", class,ex)
+ end
+ end
+ end
+ end
+
+ local function collect(list)
+ if list then
+ for i=1,#list do
+ local entry = list[i]
+ local steps = entry.steps
+ local kind = entry.type
+ if kind == "gpos_mark2mark" then
+ getanchors(steps,"mark")
+ elseif kind == "gpos_mark2base" then
+ getanchors(steps,"base")
+ elseif kind == "gpos_mark2ligature" then
+ getanchors(steps,"ligature")
+ elseif kind == "gpos_cursive" then
+ getcursives(steps)
+ end
+ end
+ end
+ end
+
+ collect(resources.sequences)
+ collect(resources.sublookups)
+
+ local function sorter(a,b)
+ if a[1] == b[1] then
+ return a[2] < b[2]
+ else
+ return a[1] < b[1]
+ end
+ end
+
+ for unicode, old in next, anchors do
+ for target, list in next, old do
+ sort(list,sorter)
+ end
+ end
+
+ resources.anchors = anchors
+
+ return anchors
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-def.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-def.lmt
new file mode 100644
index 00000000000..614f9803606
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-def.lmt
@@ -0,0 +1,516 @@
+if not modules then modules = { } end modules ['font-def'] = {
+ 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"
+}
+
+-- We can overload some of the definers.functions so we don't local them.
+
+local lower, gsub = string.lower, string.gsub
+local tostring, next = tostring, next
+local lpegmatch = lpeg.match
+local suffixonly, removesuffix, basename = file.suffix, file.removesuffix, file.basename
+local formatters = string.formatters
+local sortedhash, sortedkeys, setmetatableindex = table.sortedhash, table.sortedkeys, table.setmetatableindex
+
+local allocate = utilities.storage.allocate
+
+local trace_defining = false trackers .register("fonts.defining", function(v) trace_defining = v end)
+local directive_embedall = false directives.register("fonts.embedall", function(v) directive_embedall = v end)
+
+trackers.register("fonts.loading", "fonts.defining", "otf.loading", "afm.loading", "tfm.loading")
+
+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]]--
+
+local nextfont = font.nextid
+
+local fonts = fonts
+local fontdata = fonts.hashes.identifiers
+local readers = fonts.readers
+local definers = fonts.definers
+local specifiers = fonts.specifiers
+local constructors = fonts.constructors
+local fontgoodies = fonts.goodies
+
+readers.sequence = allocate { 'otf', 'ttf', 'afm', 'tfm', 'lua' } -- dfont ttc
+
+local variants = allocate()
+specifiers.variants = variants
+
+definers.methods = definers.methods or { }
+
+local internalized = allocate() -- internal tex numbers (private)
+
+local loadedfonts = constructors.loadedfonts
+local designsizes = constructors.designsizes
+
+-- not in generic (some day I'll make two defs, one for context, one for generic)
+
+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]]--
+
+--[[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
+-- name name(sub) name(sub)*spec name*spec
+-- name@spec*oeps
+
+local function makespecification(specification,lookup,name,sub,method,detail,size)
+ size = size or 655360
+ if not lookup or lookup == "" then
+ lookup = definers.defaultlookup
+ end
+ if trace_defining then
+ report_defining("specification %a, lookup %a, name %a, sub %a, method %a, detail %a",
+ specification, lookup, name, sub, method, detail)
+ end
+ local t = {
+ lookup = lookup, -- forced type
+ specification = specification, -- full specification
+ size = size, -- size in scaled points or -1000*n
+ name = name, -- font or filename
+ sub = sub, -- subfont (eg in ttc)
+ method = method, -- specification method
+ detail = detail, -- specification
+ resolved = "", -- resolved font name
+ forced = "", -- forced loader
+ features = { }, -- preprocessed features
+ }
+ return t
+end
+
+definers.makespecification = makespecification
+
+do
+
+ local splitter, splitspecifiers = nil, "" -- not so nice
+
+ local P, C, S, Cc, Cs = lpeg.P, lpeg.C, lpeg.S, lpeg.Cc, lpeg.Cs
+
+ local left = P("(")
+ local right = P(")")
+ local colon = P(":")
+ local space = P(" ")
+ local lbrace = P("{")
+ local rbrace = P("}")
+
+ definers.defaultlookup = "file"
+
+ local prefixpattern = P(false)
+
+ local function addspecifier(symbol)
+ splitspecifiers = splitspecifiers .. symbol
+ local method = S(splitspecifiers)
+ local lookup = C(prefixpattern) * colon
+ local sub = left * C(P(1-left-right-method)^1) * right
+ local specification = C(method) * C(P(1)^1)
+ local name = Cs((lbrace/"") * (1-rbrace)^1 * (rbrace/"") + (1-sub-specification)^1)
+ splitter = P((lookup + Cc("")) * name * (sub + Cc("")) * (specification + Cc("")))
+ end
+
+ local function addlookup(str)
+ prefixpattern = prefixpattern + P(str)
+ end
+
+ definers.addlookup = addlookup
+
+ addlookup("file")
+ addlookup("name")
+ addlookup("spec")
+
+ local function getspecification(str)
+ return lpegmatch(splitter,str or "") -- weird catch
+ end
+
+ definers.getspecification = getspecification
+
+ function definers.registersplit(symbol,action,verbosename)
+ addspecifier(symbol)
+ variants[symbol] = action
+ if verbosename then
+ variants[verbosename] = action
+ end
+ end
+
+ function definers.analyze(specification, size)
+ -- can be optimized with locals
+ local lookup, name, sub, method, detail = getspecification(specification or "")
+ return makespecification(specification, lookup, name, sub, method, detail, size)
+ end
+
+end
+
+--[[ldx--
+<p>We can resolve the filename using the next function:</p>
+--ldx]]--
+
+definers.resolvers = definers.resolvers or { }
+local resolvers = definers.resolvers
+
+-- todo: reporter
+
+function resolvers.file(specification)
+ local name = resolvefile(specification.name) -- catch for renames
+ local suffix = lower(suffixonly(name))
+ if fonts.formats[suffix] then
+ specification.forced = suffix
+ specification.forcedname = name
+ specification.name = removesuffix(name)
+ else
+ specification.name = name -- can be resolved
+ end
+end
+
+function resolvers.name(specification)
+ local resolve = fonts.names.resolve
+ if resolve then
+ local resolved, sub, subindex, instance = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
+ if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
+ specification.subindex = subindex
+ -- new, needed for experiments
+ if instance then
+ specification.instance = instance
+ local features = specification.features
+ if not features then
+ features = { }
+ specification.features = features
+ end
+ local normal = features.normal
+ if not normal then
+ normal = { }
+ features.normal = normal
+ end
+ normal.instance = instance
+ end
+ --
+ local suffix = lower(suffixonly(resolved))
+ if fonts.formats[suffix] then
+ specification.forced = suffix
+ specification.forcedname = resolved
+ specification.name = removesuffix(resolved)
+ else
+ specification.name = resolved
+ end
+ end
+ else
+ resolvers.file(specification)
+ end
+end
+
+function resolvers.spec(specification)
+ local resolvespec = fonts.names.resolvespec
+ if resolvespec then
+ local resolved, sub, subindex = resolvespec(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
+ if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
+ specification.subindex = subindex
+ specification.forced = lower(suffixonly(resolved))
+ specification.forcedname = resolved
+ specification.name = removesuffix(resolved)
+ end
+ else
+ resolvers.name(specification)
+ end
+end
+
+function definers.resolve(specification)
+ if not specification.resolved or specification.resolved == "" then -- resolved itself not per se in mapping hash
+ local r = resolvers[specification.lookup]
+ if r then
+ r(specification)
+ end
+ end
+ if specification.forced == "" then
+ specification.forced = nil
+ specification.forcedname = nil
+ end
+ specification.hash = lower(specification.name .. ' @ ' .. constructors.hashfeatures(specification))
+ if specification.sub and specification.sub ~= "" then
+ specification.hash = specification.sub .. ' @ ' .. specification.hash
+ end
+ 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>
+
+<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
+ local properties = tfmdata.properties
+ for i=1,#postprocessors do
+ local extrahash = postprocessors[i](tfmdata) -- after scaling etc
+ if type(extrahash) == "string" and extrahash ~= "" then
+ -- e.g. a reencoding needs this
+ extrahash = gsub(lower(extrahash),"[^a-z]","-")
+ properties.fullname = formatters["%s-%s"](properties.fullname,extrahash)
+ end
+ end
+ end
+ return tfmdata
+end
+
+-- function definers.applypostprocessors(tfmdata)
+-- return tfmdata
+-- end
+
+local function checkfeatures(tfmdata)
+ local resources = tfmdata.resources
+ local shared = tfmdata.shared
+ if resources and shared then
+ local features = resources.features
+ local usedfeatures = shared.features
+ if features and usedfeatures then
+ local usedlanguage = usedfeatures.language or "dflt"
+ local usedscript = usedfeatures.script or "dflt"
+ local function check(what)
+ if what then
+ local foundlanguages = { }
+ for feature, scripts in next, what do
+ if usedscript == "auto" or scripts["*"] then
+ -- ok
+ elseif not scripts[usedscript] then
+ -- report_defining("font %!font:name!, feature %a, no script %a",
+ -- tfmdata,feature,usedscript)
+ else
+ for script, languages in next, scripts do
+ if languages["*"] then
+ -- ok
+ elseif not languages[usedlanguage] then
+ report_defining("font %!font:name!, feature %a, script %a, no language %a",
+ tfmdata,feature,script,usedlanguage)
+ end
+ end
+ end
+ for script, languages in next, scripts do
+ for language in next, languages do
+ foundlanguages[language] = true
+ end
+ end
+ end
+ if false then
+ foundlanguages["*"] = nil
+ foundlanguages = sortedkeys(foundlanguages)
+ for feature, scripts in sortedhash(what) do
+ for script, languages in next, scripts do
+ if not languages["*"] then
+ for i=1,#foundlanguages do
+ local language = foundlanguages[i]
+ if not languages[language] then
+ report_defining("font %!font:name!, feature %a, script %a, no language %a",
+ tfmdata,feature,script,language)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ check(features.gsub)
+ check(features.gpos)
+ end
+ end
+end
+
+local reported = setmetatableindex(function(t,k)
+ t[k] = true
+ return false
+end)
+
+function definers.loadfont(specification)
+ local hash = constructors.hashinstance(specification)
+ -- todo: also hash by instance / factors
+ local tfmdata = loadedfonts[hash] -- hashes by size !
+ local name = specification.name
+ if not tfmdata then
+ -- normally context will not end up here often (if so there is an issue somewhere)
+ local forced = specification.forced or ""
+local id = nextfont(true)
+specification.id = id
+ if forced ~= "" then
+ local reader = readers[lower(forced)] -- normally forced is already lowered
+ tfmdata = reader and reader(specification)
+ if not tfmdata and not reported[name] then
+ report_defining("forced type %a of %a not found",forced,name)
+ end
+ else
+ local sequence = readers.sequence -- can be overloaded so only a shortcut here
+ for s=1,#sequence do
+ local reader = sequence[s]
+ if readers[reader] then -- we skip not loaded readers
+ if trace_defining then
+ report_defining("trying (reader sequence driven) type %a for %a with file %a",reader,specification.name,specification.filename)
+ end
+ tfmdata = readers[reader](specification)
+ if tfmdata then
+ break
+ else
+ specification.filename = nil
+ end
+ end
+ end
+ end
+ if tfmdata then
+ tfmdata = definers.applypostprocessors(tfmdata)
+ loadedfonts[hash] = tfmdata
+ designsizes[specification.hash] = tfmdata.parameters.designsize
+ checkfeatures(tfmdata)
+ end
+ end
+ if not tfmdata and not reported[name] then
+ report_defining("font with asked name %a is not found using lookup %a",name,specification.lookup)
+ end
+ return tfmdata
+end
+
+function constructors.readanddefine(name,size) -- no id -- maybe a dummy first
+ local specification = definers.analyze(name,size)
+ local method = specification.method
+ if method and variants[method] then
+ specification = variants[method](specification)
+ end
+ specification = definers.resolve(specification)
+ local hash = constructors.hashinstance(specification)
+ local id = definers.registered(hash)
+ if not id then
+ local tfmdata = definers.loadfont(specification)
+ if tfmdata then
+ tfmdata.properties.hash = hash
+ id = font.define(tfmdata)
+ definers.register(tfmdata,id)
+ else
+ id = 0 -- signal
+ end
+ end
+ 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>
+
+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]
+end
+
+function definers.register(tfmdata,id)
+ if tfmdata and id then
+ local hash = tfmdata.properties.hash
+ if not hash then
+ report_defining("registering font, id %a, name %a, invalid hash",id,tfmdata.properties.filename or "?")
+ elseif not internalized[hash] then
+ internalized[hash] = id
+ if trace_defining then
+ report_defining("registering font, id %s, hash %a",id,hash)
+ end
+ fontdata[id] = tfmdata
+ end
+ end
+end
+
+function definers.read(specification,size,id) -- id can be optional, name can already be table
+ statistics.starttiming(fonts)
+ if type(specification) == "string" then
+ specification = definers.analyze(specification,size)
+ end
+ local method = specification.method
+ if method and variants[method] then
+ specification = variants[method](specification)
+ end
+ specification = definers.resolve(specification)
+ local hash = constructors.hashinstance(specification)
+ local tfmdata = definers.registered(hash) -- id
+ local name = specification.name
+ if tfmdata then
+ if trace_defining then
+ report_defining("already hashed: %s",hash)
+ end
+ else
+ tfmdata = definers.loadfont(specification) -- can be overloaded
+ if tfmdata then
+ tfmdata.original = specification.specification
+ if trace_defining then
+ report_defining("loaded and hashed: %s",hash)
+ end
+ tfmdata.properties.hash = hash
+ if id then
+ definers.register(tfmdata,id)
+ end
+ else
+ if trace_defining then
+ report_defining("not loaded and hashed: %s",hash)
+ end
+ end
+ end
+ if not tfmdata then -- or id?
+ if not reported[name] then
+ report_defining( "unknown font %a, loading aborted",name)
+ end
+ elseif trace_defining and type(tfmdata) == "table" then
+ local properties = tfmdata.properties or { }
+ local parameters = tfmdata.parameters or { }
+ report_defining("using %a font with id %a, name %a, size %a, fullname %a, filename %a",
+ properties.format or "unknown", id or "-", properties.name, parameters.size,
+ properties.fullname, basename(properties.filename))
+ end
+ statistics.stoptiming(fonts)
+ return tfmdata
+end
+
+function font.getfont(id)
+ return fontdata[id] -- otherwise issues
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-emp.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-emp.mklx
index 2bd6f3cf9c2..1e30e701264 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-emp.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-emp.mklx
@@ -32,8 +32,8 @@
%D But we prefer:
%D
%D \starttyping
-%D \unexpanded\def\emphasistypeface{\sl}
-%D \unexpanded\def\emphasisboldface{\bs}
+%D \protected\def\emphasistypeface{\sl}
+%D \protected\def\emphasisboldface{\bs}
%D \stoptyping
%D
%D or even better:
@@ -46,39 +46,39 @@
#slanted%
\orelse\ifx\m_font_emphasized_typeface\v!italic
#italic%
- \orelse\ifx\m_font_emphasized_typeface\empty
+ \orelse\ifempty\m_font_emphasized_typeface
#slanted%
\else
\csname\m_font_emphasized_typeface\endcsname
\fi}
-\unexpanded\def\emphasistypeface{\font_emphasis_checked_typeface\sl\it}
-\unexpanded\def\emphasisboldface{\font_emphasis_checked_typeface\bs\bi}
+\permanent\protected\def\emphasistypeface{\font_emphasis_checked_typeface\sl\it}
+\permanent\protected\def\emphasisboldface{\font_emphasis_checked_typeface\bs\bi}
-\unexpanded\def\normalboldface % public
+\permanent\protected\def\normalboldface % public
{\relax
\ifx\fontalternative\s!it\bi\orelse
\ifx\fontalternative\s!sl\bs\else
\bf\fi}
-\unexpanded\def\normalitalicface % public
+\permanent\protected\def\normalitalicface % public
{\relax
\ifx\fontalternative\s!tf\it\orelse
\ifx\fontalternative\s!bf\bi\else
\tf\fi}
-\unexpanded\def\normalslantedface % public
+\permanent\protected\def\normalslantedface % public
{\relax \ifx\fontalternative\s!tf\sl
\orelse\ifx\fontalternative\s!bf\bs
\else \tf\fi}
-\unexpanded\def\normaltypeface % public
+\permanent\protected\def\normaltypeface % public
{\relax
\ifx\fontalternative\s!bi \it \orelse
\ifx\fontalternative\s!bs \sl \else
\tf \fi}
-\unexpanded\def\swaptypeface % public
+\permanent\protected\def\swaptypeface % public
{\relax
\ifx\fontalternative\s!it \tf \orelse
\ifx\fontalternative\s!sl \tf \orelse
@@ -87,20 +87,20 @@
\ifx\fontalternative\s!bi \bf \else
\emphasistypeface \fi}
-\let\typeface \normaltypeface % public
-\let\boldface \normalboldface % public
-\let\slantedface\normalslantedface % public
-\let\italicface \normalitalicface % public
-\let\swapface \swaptypeface % public
+\aliased\let\typeface \normaltypeface % public
+\aliased\let\boldface \normalboldface % public
+\aliased\let\slantedface\normalslantedface % public
+\aliased\let\italicface \normalitalicface % public
+\aliased\let\swapface \swaptypeface % public
-%D To be set with the default body font environment: \type
-%D {em} being \type {slanted} or \type {italic}.
+%D To be set with the default body font environment: \type {em} being \type
+%D {slanted} or \type {italic}.
% maybe a \csname...\fontalternative\endcsname
\newconditional\c_font_emphasis_needed
-\unexpanded\def\em
+\permanent\protected\def\em
{\relax
\ifdim\slantperpoint>\zeropoint
\settrue\c_font_emphasis_needed
@@ -109,15 +109,15 @@
\fi
\font_emphasis_set_emphasis_boldface % new
\ifx\fontalternative\s!it
- \unexpanded\def\emphasistypeface{\it}\tf
+ \enforced\permanent\protected\def\emphasistypeface{\it}\tf
\orelse\ifx\fontalternative\s!sl
- \unexpanded\def\emphasistypeface{\sl}\tf
+ \enforced\permanent\protected\def\emphasistypeface{\sl}\tf
\orelse\ifx\fontalternative\s!bf
\emphasisboldface
\orelse\ifx\fontalternative\s!bs
- \unexpanded\def\emphasisboldface{\bs}\bf
+ \enforced\permanent\protected\def\emphasisboldface{\bs}\bf
\orelse\ifx\fontalternative\s!bi
- \unexpanded\def\emphasisboldface{\bi}\bf
+ \enforced\permanent\protected\def\emphasisboldface{\bi}\bf
\else
\emphasistypeface
\fi
@@ -126,19 +126,19 @@
\fi
\emphasiscorrection}
-%D The next feature was not present in previous versions. It
-%D takes care of \type {\em \bf ...} situations.
+%D The next feature was not present in previous versions. It takes care of \type
+%D {\em \bf ...} situations.
\let\font_emphasis_saved_emphasis_boldface\relax
\def\font_emphasis_set_emphasis_boldface
{\let\font_emphasis_saved_emphasis_boldface\bf
\let\font_emphasis_set_emphasis_boldface\relax
- \let\bf\font_emphasis_bold_bold}
+ \enforced\let\bf\font_emphasis_bold_bold}
-\unexpanded\def\font_emphasis_bold_bold
+\protected\def\font_emphasis_bold_bold
{%\relax
- \let\bf\relax % new
+ \enforced\let\bf\relax % new
\ifx\fontalternative\s!it
\bi
\orelse\ifx\fontalternative\s!sl
@@ -146,15 +146,17 @@
\else
\font_emphasis_saved_emphasis_boldface
\fi
- \let\bf\font_emphasis_saved_emphasis_boldface}
+ \enforced\let\bf\font_emphasis_saved_emphasis_boldface}
%D Donald's (adapted) macros take the next character into account when placing
%D italic correction. As a bonus we also look for something that looks like a dash,
%D in which case we don't correct.
-\let\italiccorrection=\/ % tex primitive
+\aliased\let\normalitaliccorrection\/ % the tex primitive
-\def\emphasiscorrection % public, not in raw alignment groups, else omit problem
+\let\italiccorrection\normalitaliccorrection % will be overloaded
+
+\permanent\protected\def\emphasiscorrection % public, not in raw alignment groups, else omit problem
{\ifhmode\ifnum\currentgrouptype=\aligngroupcode\else
\expandafter\expandafter\expandafter\font_emphasis_look
\fi\fi}
@@ -224,24 +226,34 @@
%D The next emphasis alternatives are for \THANH. They adapt their style as good as
%D possible. These macros are obsolete in \MKIV.
-% \unexpanded\def\emphbf{\groupedcommand{\bf\def\emphit{\bi}\def\emphsl{\bs}}{}}
-% \unexpanded\def\emphit{\groupedcommand{\it\def\emphbf{\bi}\def\emphsl{\sl}}{}}
-% \unexpanded\def\emphsl{\groupedcommand{\sl\def\emphbf{\bs}\def\emphit{\it}}{}}
-% \unexpanded\def\emphtf{\groupedcommand{\tf\def\emphbf{\bf}\def\emphit{\it}\def\emphsl{\sl}}{}}
-% \unexpanded\def\emph {\groupedcommand{\em}{}}
-
-\unexpanded\def\font_emphasis_bf{\bf\def\emphit{\bi}\def\emphsl{\bs}}
-\unexpanded\def\font_emphasis_it{\it\def\emphbf{\bi}\def\emphsl{\sl}}
-\unexpanded\def\font_emphasis_sl{\sl\def\emphbf{\bs}\def\emphit{\it}}
-\unexpanded\def\font_emphasis_tf{\tf\def\emphbf{\bf}\def\emphit{\it}\def\emphsl{\sl}}
-
-\unexpanded\def\emphbf{\triggergroupedcommandcs\font_emphasis_bf}
-\unexpanded\def\emphit{\triggergroupedcommandcs\font_emphasis_it}
-\unexpanded\def\emphsl{\triggergroupedcommandcs\font_emphasis_sl}
-\unexpanded\def\emphtf{\triggergroupedcommandcs\font_emphasis_tf}
-\unexpanded\def\emph {\triggergroupedcommandcs\em}
-
-\unexpanded\def\emphasized{\bgroup\em\let\nexttoken}
+% \protected\def\emphbf{\groupedcommand{\bf\def\emphit{\bi}\def\emphsl{\bs}}{}}
+% \protected\def\emphit{\groupedcommand{\it\def\emphbf{\bi}\def\emphsl{\sl}}{}}
+% \protected\def\emphsl{\groupedcommand{\sl\def\emphbf{\bs}\def\emphit{\it}}{}}
+% \protected\def\emphtf{\groupedcommand{\tf\def\emphbf{\bf}\def\emphit{\it}\def\emphsl{\sl}}{}}
+% \protected\def\emph {\groupedcommand{\em}{}}
+
+
+\permanent\protected\def\font_tf{\tf} \permanent\protected\def\font_bf{\bf}
+\permanent\protected\def\font_sl{\sl} \permanent\protected\def\font_bs{\bs}
+\permanent\protected\def\font_it{\it} \permanent\protected\def\font_bi{\bi}
+
+\protected\def\font_emphasis_bf{\bf\enforced\aliased\let\emphit\font_bi
+ \enforced\aliased\let\emphsl\font_bs}
+\protected\def\font_emphasis_it{\it\enforced\aliased\let\emphbf\font_bi
+ \enforced\aliased\let\emphsl\font_sl}
+\protected\def\font_emphasis_sl{\sl\enforced\aliased\let\emphbf\font_bs
+ \enforced\aliased\let\emphit\font_it}
+\protected\def\font_emphasis_tf{\tf\enforced\aliased\let\emphbf\font_bf
+ \enforced\aliased\let\emphit\font_it
+ \enforced\aliased\let\emphsl\font_sl}
+
+\permanent\protected\def\emphbf{\triggergroupedcommandcs\font_emphasis_bf}
+\permanent\protected\def\emphit{\triggergroupedcommandcs\font_emphasis_it}
+\permanent\protected\def\emphsl{\triggergroupedcommandcs\font_emphasis_sl}
+\permanent\protected\def\emphtf{\triggergroupedcommandcs\font_emphasis_tf}
+\permanent\protected\def\emph {\triggergroupedcommandcs\em}
+
+\permanent\protected\def\emphasized{\bgroup\em\let\nexttoken}
%D \startbuffer
%D TEXT {\emphbf text \emphit text \emphtf text \emphsl text} TEXT
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-enh.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-enh.lmt
new file mode 100644
index 00000000000..1e532d4adb3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-enh.lmt
@@ -0,0 +1,90 @@
+if not modules then modules = { } end modules ['font-enh'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This module is already stripped from old stuff but more might go away
+-- in lmtx. Stay tuned.
+
+local next = next
+
+local trace_unicoding = false
+
+trackers.register("fonts.defining", function(v) trace_unicoding = v end)
+trackers.register("fonts.unicoding", function(v) trace_unicoding = v end)
+
+local report_unicoding = logs.reporter("fonts","unicoding")
+
+local fonts = fonts
+local constructors = fonts.constructors
+
+local afmfeatures = constructors.features.afm
+local otffeatures = constructors.features.otf
+
+local registerafmfeature = afmfeatures.register
+local registerotffeature = otffeatures.register
+
+local function initialize(tfmdata)
+ local goodies = tfmdata.goodies
+ local newcoding = nil
+ for i=1,#goodies do
+ local remapping = goodies[i].remapping
+ if remapping and remapping.unicodes then
+ newcoding = remapping.unicodes -- names to unicodes
+ end
+ end
+ if newcoding then
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local oldcoding = tfmdata.resources.unicodes
+ local originals = { }
+ for name, newcode in next, newcoding do
+ local oldcode = oldcoding[name]
+ if characters[newcode] and not originals[newcode] then
+ originals[newcode] = {
+ character = characters [newcode],
+ description = descriptions[newcode],
+ }
+ end
+ if oldcode then
+ local original = originals[oldcode]
+ local character, description
+ if original then
+ character = original.character
+ description = original.description
+ else
+ character = characters [oldcode]
+ description = descriptions[oldcode]
+ end
+ characters [newcode] = character
+ descriptions[newcode] = description
+ character .unicode = newcode
+ description.unicode = newcode
+ else
+ oldcoding[name] = newcode
+ end
+ if trace_unicoding then
+ if oldcode then
+ report_unicoding("aliasing glyph %a from %U to %U",name,oldcode,newcode)
+ else
+ report_unicoding("aliasing glyph %a to %U",name,newcode)
+ end
+ end
+ end
+ end
+end
+
+local specification = {
+ name = "unicoding",
+ description = "adapt unicode table",
+ initializers = {
+ base = initialize,
+ node = initialize,
+ },
+}
+
+registerotffeature(specification)
+registerafmfeature(specification)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt
new file mode 100644
index 00000000000..47d284c845c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-fbk.lmt
@@ -0,0 +1,350 @@
+if not modules then modules = { } end modules ['font-fbk'] = {
+ 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 cos, tan, rad, format = math.cos, math.tan, math.rad, string.format
+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)
+
+local report = logs.reporter("fonts","combining")
+
+local allocate = utilities.storage.allocate
+
+local fonts = fonts
+local handlers = fonts.handlers
+local constructors = fonts.constructors
+local helpers = fonts.helpers
+
+local otf = handlers.otf
+local afm = handlers.afm
+local registerotffeature = otf.features.register
+local registerafmfeature = afm.features.register
+
+local addotffeature = otf.addfeature
+
+local unicodecharacters = characters.data
+local unicodefallbacks = characters.fallbacks
+
+local vfcommands = helpers.commands
+local charcommand = vfcommands.char
+local rightcommand = vfcommands.right
+local downcommand = vfcommands.down
+local upcommand = vfcommands.up
+local push = vfcommands.push
+local pop = vfcommands.pop
+
+local force_combining = false -- just for demo purposes (see mk)
+local fraction = 0.15 -- 30 units for lucida
+
+-- todo: we also need to update the feature hashes ... i'll do that when i'm in the mood
+-- and/or when i need it
+
+local function composecharacters(tfmdata)
+ -- this assumes that slot 1 is self, there will be a proper self some day
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local parameters = tfmdata.parameters
+ local properties = tfmdata.properties
+ local Xdesc = descriptions[utfbyte("X")]
+ local xdesc = descriptions[utfbyte("x")]
+ if Xdesc and xdesc then
+ local scale = parameters.factor or 1
+ local deltaxheight = scale * (Xdesc.boundingbox[4] - xdesc.boundingbox[4])
+ local extraxheight = fraction * deltaxheight -- maybe use compose value
+ local italicfactor = parameters.italicfactor or 0
+ local red, green, blue, black
+ if trace_visualize then
+ red = { "startcolor", "red" }
+ green = { "startcolor", "green" }
+ blue = { "startcolor", "blue" }
+ black = { "stopcolor" }
+ end
+ local compose = fonts.goodies.getcompositions(tfmdata)
+ if compose and trace_visualize then
+ report("using compose information from goodies file")
+ end
+ local done = false
+ for i, c in next, unicodecharacters do -- loop over all characters ... not that efficient but a specials hash takes memory
+ if force_combining or not characters[i] then
+ local s = c.specials
+ if s and s[1] == 'char' then
+ local chr = s[2]
+ local charschr = characters[chr]
+ if charschr then
+ local cc = c.category
+ if cc == 'll' or cc == 'lu' or cc == 'lt' then -- characters.is_letter[cc]
+ local acc = s[3]
+ local t = { }
+ for k, v in next, charschr do
+ if k ~= "commands" then
+ t[k] = v
+ end
+ end
+ local charsacc = characters[acc]
+ -- local ca = charsacc.category
+ -- if ca == "mn" then
+ -- -- mark nonspacing
+ -- elseif ca == "ms" then
+ -- -- mark spacing combining
+ -- elseif ca == "me" then
+ -- -- mark enclosing
+ -- else
+ if not charsacc then -- fallback accents
+ acc = unicodefallbacks[acc]
+ charsacc = acc and characters[acc]
+ end
+ local chr_t = charcommand[chr]
+ if charsacc then
+ if trace_define then
+ report("composed %C, base %C, accent %C",i,chr,acc)
+ end
+ local acc_t = charcommand[acc]
+ local cb = descriptions[chr].boundingbox
+ local ab = descriptions[acc].boundingbox
+ -- todo: adapt height
+ if cb and ab then
+ local c_llx = scale*cb[1]
+ local c_lly = scale*cb[2]
+ local c_urx = scale*cb[3]
+ local c_ury = scale*cb[4]
+ local a_llx = scale*ab[1]
+ local a_lly = scale*ab[2]
+ local a_urx = scale*ab[3]
+ local a_ury = scale*ab[4]
+ local done = false
+ if compose then
+ local i_compose = compose[i]
+ local i_anchored = i_compose and i_compose.anchored
+ if i_anchored then
+ local c_compose = compose[chr]
+ local a_compose = compose[acc]
+ local c_anchors = c_compose and c_compose.anchors
+ local a_anchors = a_compose and a_compose.anchors
+ if c_anchors and a_anchors then
+ local c_anchor = c_anchors[i_anchored]
+ local a_anchor = a_anchors[i_anchored]
+ if c_anchor and a_anchor then
+ local cx = c_anchor.x or 0
+ local cy = c_anchor.y or 0
+ local ax = a_anchor.x or 0
+ local ay = a_anchor.y or 0
+ local dx = cx - ax
+ local dy = cy - ay
+ if trace_define then
+ report("building %C from %C and %C",i,chr,acc)
+ report(" boundingbox:")
+ report(" chr: %3i %3i %3i %3i",unpack(cb))
+ report(" acc: %3i %3i %3i %3i",unpack(ab))
+ report(" anchors:")
+ report(" chr: %3i %3i",cx,cy)
+ report(" acc: %3i %3i",ax,ay)
+ report(" delta:")
+ report(" %s: %3i %3i",i_anchored,dx,dy)
+ end
+ local right = rightcommand[scale*dx]
+ local down = upcommand[scale*dy]
+ if trace_visualize then
+ t.commands = {
+ push, right, down,
+ green, acc_t, black,
+ pop, chr_t,
+ }
+ else
+ t.commands = {
+ push, right, down,
+ acc_t, pop, chr_t,
+ }
+ end
+ done = true
+ end
+ end
+ end
+ end
+ if not done then
+ -- can be sped up for scale == 1
+ local dx = (c_urx - a_urx - a_llx + c_llx)/2
+ local dd = (c_urx - c_llx)*italicfactor
+ if a_ury < 0 then
+ local right = rightcommand[dx-dd]
+ if trace_visualize then
+ t.commands = {
+ push, right, red, acc_t,
+ black, pop, chr_t,
+ }
+ else
+ t.commands = {
+ push, right, acc_t, pop,
+ chr_t,
+ }
+ end
+ t.depth = a_ury
+ elseif c_ury > a_lly then -- messy test
+ local dy
+ if compose then
+ -- experimental: we could use sx but all that testing
+ -- takes time and code
+ dy = compose[i]
+ if dy then
+ dy = dy.dy
+ end
+ if not dy then
+ dy = compose[acc]
+ if dy then
+ dy = dy and dy.dy
+ end
+ end
+ if not dy then
+ dy = compose.dy
+ end
+ if not dy then
+ dy = - deltaxheight + extraxheight
+ elseif dy > -1.5 and dy < 1.5 then
+ -- we assume a fraction of (percentage)
+ dy = - dy * deltaxheight
+ else
+ -- we assume fontunits (value smaller than 2 make no sense)
+ dy = - dy * scale
+ end
+ else
+ dy = - deltaxheight + extraxheight
+ end
+ t.height = a_ury-dy
+ local right = rightcommand[dx+dd]
+ local down = downcommand[dy]
+ if trace_visualize then
+ t.commands = {
+ push, right, down, green,
+ acc_t, black, pop, chr_t,
+ }
+ else
+ t.commands = {
+ push, right, down, acc_t,
+ pop, chr_t,
+ }
+ end
+ else
+ local right = rightcommand[dx+dd]
+ if trace_visualize then
+ t.commands = {
+ push, right, blue, acc_t,
+ black, pop, chr_t,
+ }
+ else
+ t.commands = {
+ push, right, acc_t, pop,
+ chr_t,
+ }
+ end
+ t.height = a_ury
+ end
+ end
+ else
+ t.commands = {
+ chr_t, -- else index mess
+ }
+ end
+ else
+ if trace_define then
+ report("%C becomes simplified %C",i,chr)
+ end
+ t.commands = {
+ chr_t, -- else index mess
+ }
+ end
+ done = true
+ characters[i] = t
+ local d = { }
+ for k, v in next, descriptions[chr] do
+ d[k] = v
+ end
+ descriptions[i] = d
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local specification = {
+ name = "compose",
+ description = "additional composed characters",
+ manipulators = {
+ base = composecharacters,
+ node = composecharacters,
+ }
+}
+
+registerotffeature(specification)
+registerafmfeature(specification)
+
+addotffeature {
+ name = "char-ligatures",
+ type = "ligature",
+ data = characters.splits.char,
+ order = { "char-ligatures" },
+ prepend = true,
+}
+
+addotffeature {
+ name = "compat-ligatures",
+ type = "ligature",
+ data = characters.splits.compat,
+ order = { "compat-ligatures" },
+ prepend = true,
+}
+
+registerotffeature {
+ name = 'char-ligatures',
+ description = 'unicode char specials to ligatures',
+}
+
+registerotffeature {
+ name = 'compat-ligatures',
+ description = 'unicode compat specials to ligatures',
+}
+
+-- We now provide the composer in the helpers namespace (too):
+
+fonts.helpers.composecharacters = composecharacters
+
+-- We keep this just because we have a few demos but there often are other ways to achieve
+-- the same. This code installs the builder into the regular virtual font builder, which
+-- only makes sense as demo. It also shows a bit what the evolution is.
+
+do
+
+ local vf = handlers.vf
+ local commands = vf.combiner.commands
+
+ vf.helpers.composecharacters = composecharacters
+
+ commands["compose.trace.enable"] = function() trace_visualize = true end
+ commands["compose.trace.disable"] = function() trace_visualize = false end
+ commands["compose.force.enable"] = function() force_combining = true end
+ commands["compose.force.disable"] = function() force_combining = false end
+
+ commands["compose.trace.set"] = function(g,v)
+ if v[2] == nil then
+ trace_visualize = true
+ else
+ trace_visualize = v[2]
+ end
+ end
+
+ commands["compose.apply"] = function(g,v)
+ composecharacters(g)
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-fea.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-fea.mklx
new file mode 100644
index 00000000000..9f4d2119e99
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-fea.mklx
@@ -0,0 +1,389 @@
+%D \module
+%D [ file=font-sty,
+%D version=2011.01.13, % (copied fron font-ini)
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=features,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Font Macros / Features}
+
+\unprotect
+
+%D Feature management.
+%D
+%D \starttyping
+%D \definefontfeature[smallcaps][smcp=yes,script=latn]
+%D \definefontfeature[smallcaps][SmallCapitals=yes,script=latn]
+%D \definefontfeature[smallcaps][Small Capitals=yes,script=latn]
+%D \definefontfeature[smallcaps][small capitals=yes,script=latn]
+%D \definefontfeature[smallcaps][smallcapitals=yes,script=latn]
+%D
+%D \definedfont[cambria*smallcaps] test
+%D
+%D \starttext
+%D \definefontfeature[basekerned][default][mode=base]
+%D \definefontfeature[nodekerned][default][mode=node]
+%D \definefontfeature[nonekerned][default][mode=base,kern=no]
+%D \setupcolors[state=start]
+%D \startoverlay
+%D {\vbox{\red \definedfont[Serif*nonekerned at 12pt]\input tufte }}
+%D {\vbox{\blue \definedfont[Serif*basekerned at 12pt]\input tufte }}
+%D {\vbox{\green\definedfont[Serif*nodekerned at 12pt]\input tufte }}
+%D \stopoverlay
+%D \stoptext
+%D
+%D \enabletrackers[otf.kerns]
+%D
+%D \definefontfeature[withkern][default][mode=node]
+%D \definefontfeature[nokern] [default][mode=node,kern=no]
+%D \definefontfeature[single] [default][mode=node,cpsp=yes]
+%D \definefontfeature[simple] [default][mode=node,cpsp=yes,kern=no]
+%D
+%D {\definedfont[Serif*default] [FGFGFGFGFGFGFGFGFGFGFGFGFG ABCDEFGHIJKLMNOPQRSTUVWXYZ] \par}
+%D {\definedfont[Serif*nokern] [FGFGFGFGFGFGFGFGFGFGFGFGFG ABCDEFGHIJKLMNOPQRSTUVWXYZ] \par}
+%D {\definedfont[Serif*single] [FGFGFGFGFGFGFGFGFGFGFGFGFG ABCDEFGHIJKLMNOPQRSTUVWXYZ] \par}
+%D {\definedfont[Serif*simple] [FGFGFGFGFGFGFGFGFGFGFGFGFG ABCDEFGHIJKLMNOPQRSTUVWXYZ] \par}
+%D \stoptyping
+
+% \definefontfeature[slanted] [default][slant=.25]
+% \definefontfeature[stretched][default][stretch=2]
+%
+% \start \definedfont[SerifBold*slanted at 20pt] \ruledhbox{Test!} \stop
+% \start \definedfont[SerifBold*stretched at 20pt] \ruledhbox{Test!} \stop
+%
+% \definefontfeature[default] [liga=yes,texligatures=yes,texquotes=yes]
+% \definefontfeature[default-caps][liga=yes,texligatures=yes,texquotes=yes,smcp=yes,script=latn]
+%
+% \starttypescript [serif] [palatino-nova-regular] [name]
+% \definefontsynonym[Serif] [palatinonova-regular][features=default]
+% \definefontsynonym[SerifCaps][palatinonova-regular][features=default-caps] % also sets Serif
+% \stoptypescript
+%
+% \starttypescript [serif] [palatino-nova-regular] [name]
+% \definefontsynonym[Serif] [palatinonova-regular*default]
+% \definefontsynonym[SerifCaps] [palatinonova-regular*default-caps]
+% \stoptypescript
+%
+% \definetypeface[mainface][rm][serif][palatino-nova-regular][default] \setupbodyfont[mainface]
+%
+% \starttext
+% ``Test'' -- --- ff fi fl \sc ``Test'' -- --- ff fi fl
+% \stoptext
+%
+% \definefontfeature
+% [default-base]
+% [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,trep=yes]
+% \definefontfeature
+% [default-node]
+% [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,trep=yes,mode=node]
+% \definefontfeature
+% [default-none]
+% [script=latn,language=dflt,liga=yes,kern=no, tlig=yes,trep=yes]
+%
+% \startoverlay
+% {\vtop{\color[red] {\font\test=name:lmroman12regular*default-node \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[green]{\font\test=name:lmroman12regular*default-base \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[blue] {\font\test=name:lmroman12regular*default-none \test \input ward \input zapf \input linden }}}
+% \stopoverlay
+%
+% \blank
+%
+% \startoverlay
+% {\vtop{\color[red] {\font\test=name:texgyrepagella*default-node \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[green]{\font\test=name:texgyrepagella*default-base \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[blue] {\font\test=name:texgyrepagella*default-none \test \input ward \input zapf \input linden }}}
+% \stopoverlay
+%
+% \blank
+%
+% \startoverlay
+% {\vtop{\color[red] {\font\test=name:palatinonovaregular*default-node \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[green]{\font\test=name:palatinonovaregular*default-base \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[blue] {\font\test=name:palatinonovaregular*default-none \test \input ward \input zapf \input linden }}}
+% \stopoverlay
+%
+% \startoverlay
+% {\vtop{\color[red] {\font\test=name:OfficinaSerifBookITC*default-node \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[green]{\font\test=name:OfficinaSerifBookITC*default-base \test \input ward \input zapf \input linden }}}
+% {\vtop{\color[blue] {\font\test=name:OfficinaSerifBookITC*default-none \test \input ward \input zapf \input linden }}}
+% \stopoverlay
+%
+% \definefontfeature[superdefault][default][compose=yes]
+%
+% {\font\oeps=name:lmroman10regular*default at 30pt \oeps test \char7683}
+% {\font\oeps=name:lmroman10regular*superdefault at 30pt \oeps test \char7683}
+
+\permanent\tolerant\protected\def\definefontfeature[#featureset]#spacer[#parent]#spacer[#settings]%
+ {\clf_definefontfeature{#featureset}{#parent}{#settings}}
+
+\permanent\tolerant\protected\def\adaptfontfeature[#pattern]#spacer[#settings]%
+ {\clf_adaptfontfeature{#pattern}{#settings}}
+
+\permanent\protected\def\fontfeatureslist[#name]#spacer[#separator]% todo: arg voor type
+ {\clf_featurelist{#name}{\detokenize{#separator}}}
+
+\attribute\zerocount\attributeunsetvalue
+
+\glyphdatafield\zerocount
+
+\let\font_dynamic_value\glyphdatafield
+
+% beware: these are global features on top of existing font features
+
+\mutable\let\currentfeature\s!current
+
+\let\m_font_feature_list \s!current
+\let\m_font_feature_asked\empty
+
+\newconstant\c_font_feature_state
+
+\newevery\everyfontfeatureswitch
+
+% hashing at this end is slower
+
+\permanent\tolerant\protected\def\addfeature [#1]#;#2{\edef\m_font_feature_asked{#1#2}\font_feature_add}
+\permanent\tolerant\protected\def\subtractfeature [#1]#;#2{\edef\m_font_feature_asked{#1#2}\font_feature_subtract}
+\permanent\tolerant\protected\def\replacefeature [#1]#;#2{\edef\m_font_feature_asked{#1#2}\font_feature_replace}
+\permanent\tolerant\protected\def\resetandaddfeature[#1]#;#2{\edef\m_font_feature_asked{#1#2}\font_feature_reset_add}
+\permanent\tolerant\protected\def\feature [#1]#;#2{\begincsname\??featureshortcut#1#2\endcsname}
+
+% for old times sake
+
+\permanent\protected\def\doaddfeature #1{\edef\m_font_feature_asked{#1}\font_feature_add}
+\permanent\protected\def\dosubtractfeature #1{\edef\m_font_feature_asked{#1}\font_feature_subtract}
+\permanent\protected\def\doreplacefeature #1{\edef\m_font_feature_asked{#1}\font_feature_replace}
+\permanent\protected\def\doresetandaddfeature#1{\edef\m_font_feature_asked{#1}\font_feature_reset_add}
+
+\protected\def\font_feature_add
+ {\ifnum\c_font_feature_state=\plusone
+ \ifx\m_font_feature_asked\currentfeature\else
+ \font_feature_add_indeed
+ \fi
+ \else
+ \font_feature_add_indeed
+ \fi}
+
+\protected\def\font_feature_add_indeed
+ {\clf_addfeature{\m_font_feature_list}{\m_font_feature_asked}%
+ \edef\m_font_feature_list{\m_font_feature_list+\m_font_feature_asked}% also + at the lua end
+ \c_font_feature_state\plusone
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
+
+\protected\def\font_feature_subtract
+ {\ifnum\c_font_feature_state=\minusone
+ \ifx\m_font_feature_asked\currentfeature\else
+ \font_feature_subtract_indeed
+ \fi
+ \else
+ \font_feature_subtract_indeed
+ \fi}
+
+\protected\def\font_feature_subtract_indeed
+ {\clf_subtractfeature{\m_font_feature_list}{\m_font_feature_asked}%
+ \edef\m_font_feature_list{\m_font_feature_list-\m_font_feature_asked}% also - at the lua end
+ \c_font_feature_state\minusone
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
+
+\protected\def\font_feature_replace
+ {\ifnum\c_font_feature_state=\zerocount
+ \ifx\m_font_feature_asked\currentfeature\else
+ \font_feature_replace_indeed
+ \fi
+ \else
+ \font_feature_replace_indeed
+ \fi}
+
+\protected\def\font_feature_replace_indeed
+ {\clf_replacefeature{\m_font_feature_list}{\m_font_feature_asked}%
+ \edef\m_font_feature_list{\m_font_feature_list=\m_font_feature_asked}% also = at the lua end
+ \c_font_feature_state\zerocount
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
+
+\permanent\protected\def\resetfeature
+ {\ifx\currentfeature\s!current \else
+ \font_feature_reset_indeed
+ \fi}
+
+\protected\def\font_feature_reset_indeed
+ {\let\m_font_feature_asked\empty
+ \let\currentfeature \s!current
+ \let\m_font_feature_list \s!current
+ \clf_resetfeature}
+
+\permanent\protected\def\revivefeature
+ {\ifx\currentfeature\s!current \else
+ \font_feature_revive_indeed
+ \fi}
+
+\protected\def\font_feature_revive_indeed
+ {\clf_revivefeature{\m_font_feature_list}}
+
+\protected\def\font_feature_reset_add
+ {\ifnum\c_font_feature_state=\plusone
+ \ifx\m_font_feature_asked\currentfeature\else
+ \font_feature_reset_add_indeed
+ \fi
+ \else
+ \font_feature_reset_add_indeed
+ \fi}
+
+\protected\def\font_feature_reset_add_indeed
+ {\clf_addfeature{\s!current}{\m_font_feature_asked}%
+ \edef\m_font_feature_list{\s!current+\m_font_feature_asked}% also + at the lua end
+ \c_font_feature_state\plusone
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
+
+\installcorenamespace{featureshortcut}
+
+\letcsname\??featureshortcut +\endcsname\addfeature
+\letcsname\??featureshortcut -\endcsname\subtractfeature
+\letcsname\??featureshortcut =\endcsname\replacefeature
+\letcsname\??featureshortcut !\endcsname\resetandaddfeature
+\letcsname\??featureshortcut >\endcsname\revivefeature
+\letcsname\??featureshortcut <\endcsname\resetfeature
+
+\letcsname\??featureshortcut\v!more \endcsname\addfeature % add set to previous set and combine with font set
+\letcsname\??featureshortcut\v!less \endcsname\subtractfeature % subtract set from previous set and combine with font set
+\letcsname\??featureshortcut\v!new \endcsname\replacefeature % replace font set
+\letcsname\??featureshortcut\v!reset \endcsname\resetfeature % forget sets and revert to font set
+\letcsname\??featureshortcut\v!default\endcsname\revivefeature % make sure the current set is used on top of the font set
+\letcsname\??featureshortcut\v!old \endcsname\revivefeature
+\letcsname\??featureshortcut\v!local \endcsname\resetandaddfeature
+\letcsname\??featureshortcut\s!unknown\endcsname\empty
+
+% experimental bonus:
+
+% \protected\def\addfflanguage
+% {\ifnum\c_font_feature_state=\plusone
+% \ifx\currentlanguage\currentfeature\else
+% \font_feature_add_language_indeed
+% \fi
+% \else
+% \font_feature_add_language_indeed
+% \fi}
+%
+% \protected\def\font_feature_add_language_indeed
+% {\clf_addfeature{\m_font_feature_list}{\currentlanguage}%
+% \edef\m_font_feature_list{\m_font_feature_list+\currentlanguage}% also + at the lua end
+% \c_font_feature_state\plusone
+% \let\currentfeature\currentlanguage}
+%
+% some 3% slower:
+
+% \protected\def\addfflanguage
+% {\let\m_font_feature_asked\currentlanguage
+% \font_feature_add}
+
+\let\m_font_feature_language\currentlanguage
+
+\permanent\protected\def\addfflanguage
+ {\ifx\currentlanguage\m_font_feature_language\else
+ \let\m_font_feature_language\currentlanguage
+ \let\m_font_feature_asked \currentlanguage
+ \font_feature_add
+ \fi}
+
+% just for old times sake:
+
+\permanent\protected\def\featureattribute#feature%
+ {\clf_featureattribute{#feature}}
+
+\permanent\protected\def\setfontfeature#feature%
+ {\edef\currentfeature{#feature}%
+ \let\m_font_feature_list\currentfeature
+ \clf_setfontfeature{\currentfeature}}
+
+% these are obsolete (don't use them any longer)
+
+\aliased\let\resetfontfeature\resetfeature % obsolete
+
+% these are obsolete (don't use them any longer)
+
+% \let\addfontfeaturetoset \font_feature_add_nop % obsolete
+% \let\subtractfontfeaturefromset \font_feature_subtract_nop % obsolete
+% \let\addfontfeaturetofont \font_feature_add_nop % obsolete
+% \let\subtractfontfeaturefromfont\font_feature_subtract_nop % obsolete
+
+% these are obsolete (don't use them any longer)
+
+\aliased\let\setff\setfontfeature % obsolete
+\aliased\let\addfs\doaddfeature % obsolete
+\aliased\let\subfs\dosubtractfeature % obsolete
+\aliased\let\addff\doaddfeature % obsolete
+\aliased\let\subff\dosubtractfeature % obsolete
+
+%D \macros
+%D {os}
+%D
+%D In good old \TEX, the old style numerals were often taken from the math fonts. No
+%D longer.
+
+\definefontfeature
+ [just-os]
+ [mode=node,onum=yes]
+
+%frozen\protected\def\sc{\setfontfeature{smallcaps}}
+\permanent\protected\def\os{\setfontfeature{just-os}}
+
+% \doifelsecurrentfonthasfeature{smcp}{YES}{NO}
+% \doifelsecurrentfonthasfeature{crap}{YES}{NO}
+% \doifelsecurrentfonthasfeature{kern}{YES}{NO}
+
+\permanent\def\doifelsecurrentfonthasfeature#feature{\clf_doifelsecurrentfonthasfeature{#feature}} % expandable
+\permanent\def\doifelsefontfeature #feature{\clf_doifelsefontfeature {#feature}} % expandable
+\permanent\def\doifunknownfontfeature #feature{\clf_doifunknownfontfeature {#feature}} % expandable
+
+\aliased\let\doifcurrentfonthasfeatureelse\doifelsecurrentfonthasfeature
+\aliased\let\doiffontfeatureelse \doifelsefontfeature
+
+% new:
+
+\clf_registerlanguagefeatures
+
+% also new
+
+\permanent\protected\def\useaddfontfeatureparameter#namespace% faster local variant
+ {\edef\m_font_feature_asked{#namespace\c!features}%
+ \ifempty\m_font_feature_asked\else
+ \font_feature_add
+ \fi}
+
+% let's put this here:
+
+\permanent\protected\def\slashedzero
+ {\dontleavehmode
+ \begingroup
+ %\addff{zero}
+ \doaddfeature{zero}%
+ 0%
+ \endgroup}
+
+% not nice but maybe handy
+
+% \starttyping
+% \blockligatures[fi,ff] \blockligatures[fl]
+%
+% \definefontfeature[default:b][default][blockligatures=yes]
+%
+% \setupbodyfont[pagella] \showfontkerns
+%
+% \definedfont[Serif*default:b]
+%
+% \startTEXpage[offset=1em]
+% fi ff fl
+% \stopTEXpage
+% \stoptyping
+
+\permanent\protected\def\blockligatures[#1]{\clf_blockligatures{#1}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-fil.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-fil.mklx
index 6cc25db1036..57ed47fa287 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-fil.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-fil.mklx
@@ -41,26 +41,22 @@
%
% \setupbodyfont[palatino]
-\unexpanded\def\startfontclass
- {\dosingleempty\font_basics_start_font_class}
-
-\def\font_basics_start_font_class[#class]%
+\permanent\protected\tolerant\protected\def\startfontclass[#class]%
{\push_macro_fontclass
\doifelse{#class}\v!each
{\let\fontclass\empty}
{\doifsomething{#class}{\def\fontclass{#class}}}}
-\unexpanded\def\stopfontclass
+\permanent\protected\def\stopfontclass
{\pop_macro_fontclass}
-\def\classfont#class#name{#class#name} % \definefont[whatever][\classfont{xx}{yy} at 10pt]
+\permanent\def\classfont#class#name{#class#name} % \definefont[whatever][\classfont{xx}{yy} at 10pt]
%D \macros
%D {definefontsynonym, doifelsefontsynonym,
%D expandfontsynonym, truefontname, truefontdata}
%D
-%D While looking for fonts, fontsynonyms are used for accessing
-%D the files!
+%D While looking for fonts, fontsynonyms are used for accessing the files!
%D
%D \starttyping
%D \definefontsynonym[Serif][Lucida-Bright]
@@ -72,73 +68,72 @@
\let\m_font_name\empty
\let\m_font_file\empty
-\def \defaultfontfile{\truefontname{Normal}} % was cmtt10, but that one is gone
-\edef\nullfontname {\fontname\nullfont}
+\mutable\def\defaultfontfile{\truefontname{Normal}} % was cmtt10, but that one is gone
-\unexpanded\def\definefontsynonym[#name]#crap[#file]%
+\permanent\protected\def\definefontsynonym[#name]#spacer[#file]%
{\edef\m_font_name{#name}%
\edef\m_font_file{#file}%
- \ifx\fontclass\empty
+ \ifempty\fontclass
\expandafter\font_basics_define_font_synonym_nop
\else
\expandafter\font_basics_define_font_synonym_yes
\fi}
-\unexpanded\def\font_basics_define_font_synonym_nop
- {\expandafter\let\csname\??fontfile\m_font_name\endcsname\m_font_file
+\protected\def\font_basics_define_font_synonym_nop
+ {\letcsname\??fontfile\m_font_name\endcsname\m_font_file
\doifelsenextoptionalcs\font_basics_define_font_synonym_nop_opt\font_basics_define_font_synonym_nop_nil}
-\unexpanded\def\font_basics_define_font_synonym_yes
- {\expandafter\let\csname\??fontfile\fontclass\m_font_name\endcsname\m_font_file
+\protected\def\font_basics_define_font_synonym_yes
+ {\letcsname\??fontfile\fontclass\m_font_name\endcsname\m_font_file
\doifelsenextoptionalcs\font_basics_define_font_synonym_yes_opt\font_basics_define_font_synonym_yes_nil}
-\unexpanded\def\edefinefontsynonym[#name]#crap[#file]%
+\permanent\protected\def\edefinefontsynonym[#name]#spacer[#file]%
{\edef\m_font_name{#name}%
\edef\m_font_file{#file}%
- \ifx\fontclass\empty
+ \ifempty\fontclass
\expandafter\font_basics_define_font_synonym_nop_expanded
\else
\expandafter\font_basics_define_font_synonym_yes_expanded
\fi}
-\unexpanded\def\font_basics_define_font_synonym_nop_expanded#crap[#spec]%
- {\expandafter\let\csname\??fontfile\m_font_name\endcsname\m_font_file
- \normalexpanded{\font_basics_define_font_synonym_nop_opt[#1]}}
+\protected\def\font_basics_define_font_synonym_nop_expanded#ignore[#spec]%
+ {\letcsname\??fontfile\m_font_name\endcsname\m_font_file
+ \normalexpanded{\font_basics_define_font_synonym_nop_opt[#spec]}}
-\unexpanded\def\font_basics_define_font_synonym_yes_expanded#crap[#spec]%
- {\expandafter\let\csname\??fontfile\fontclass\m_font_name\endcsname\m_font_file
+\protected\def\font_basics_define_font_synonym_yes_expanded#ignore[#spec]%
+ {\letcsname\??fontfile\fontclass\m_font_name\endcsname\m_font_file
\normalexpanded{\font_basics_define_font_synonym_yes_opt[#spec]}}
-\unexpanded\def\font_basics_define_font_synonym_nop_opt[#specification]%
+\protected\def\font_basics_define_font_synonym_nop_opt[#specification]%
{\let\p_features \undefined
\let\p_fallbacks \undefined
\let\p_goodies \undefined
\let\p_designsize\undefined
- \expandafter\font_basics_get_font_parameter_nop#specification,]=,}
+ \expandafter\font_basics_get_font_parameter_nop#specification,\ignorearguments}
-\unexpanded\def\font_basics_define_font_synonym_yes_opt[#specification]%
+\protected\def\font_basics_define_font_synonym_yes_opt[#specification]%
{\let\p_features \undefined
\let\p_fallbacks \undefined
\let\p_goodies \undefined
\let\p_designsize\undefined
- \expandafter\font_basics_get_font_parameter_yes#specification,]=,}
+ \expandafter\font_basics_get_font_parameter_yes#specification,\ignorearguments}
% todo: check if we can use \edef but then we need to protect \mathsizesuffix .. in fact that
% can be default then: \let\mathsizesuffix\relax .. i need to play with it first
\def\font_basics_get_font_parameter_nop#key=#value,%
- {\if]#key%
+ {\ifarguments
\font_basics_get_font_parameter_nop_finish
\else
- \expandafter\normaldef\csname p_#key\endcsname{#value}% % no edef as we need to keep \mathsizesuffix
+ \defcsname p_#key\endcsname{#value}% % no edef as we need to keep \mathsizesuffix
\expandafter\font_basics_get_font_parameter_nop
\fi}
\def\font_basics_get_font_parameter_yes#key=#value,%
- {\if]#key%
+ {\ifarguments
\font_basics_get_font_parameter_yes_finish
\else
- \expandafter\normaldef\csname p_#key\endcsname{#value}% % no edef as we need to keep \mathsizesuffix
+ \defcsname p_#key\endcsname{#value}% % no edef as we need to keep \mathsizesuffix
\expandafter\font_basics_get_font_parameter_yes
\fi}
@@ -156,78 +151,66 @@
% we could collect them in one macro (but no expansion)
\def\font_basics_define_font_synonym_nop_nil
- {\expandafter\let\csname\??fontfile\m_font_name\s!features \endcsname\undefined
- \expandafter\let\csname\??fontfile\m_font_name\s!fallbacks \endcsname\undefined
- \expandafter\let\csname\??fontfile\m_font_name\s!goodies \endcsname\undefined
- \expandafter\let\csname\??fontfile\m_font_name\s!designsize\endcsname\undefined}
+ {\letcsname\??fontfile\m_font_name\s!features \endcsname\undefined
+ \letcsname\??fontfile\m_font_name\s!fallbacks \endcsname\undefined
+ \letcsname\??fontfile\m_font_name\s!goodies \endcsname\undefined
+ \letcsname\??fontfile\m_font_name\s!designsize\endcsname\undefined}
\def\font_basics_define_font_synonym_yes_nil
- {\expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!features \endcsname\undefined
- \expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!fallbacks \endcsname\undefined
- \expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\undefined
- \expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!designsize\endcsname\undefined}
+ {\gletcsname\??fontfile\fontclass\m_font_name\s!features \endcsname\undefined
+ \gletcsname\??fontfile\fontclass\m_font_name\s!fallbacks \endcsname\undefined
+ \gletcsname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\undefined
+ \gletcsname\??fontfile\fontclass\m_font_name\s!designsize\endcsname\undefined}
\def\font_basics_get_font_parameter_nop_finish
- {\expandafter\let\csname\??fontfile\m_font_name\s!features \endcsname\p_features
- \expandafter\let\csname\??fontfile\m_font_name\s!fallbacks \endcsname\p_fallbacks
- \expandafter\let\csname\??fontfile\m_font_name\s!goodies \endcsname\p_goodies
- \expandafter\let\csname\??fontfile\m_font_name\s!designsize\endcsname\p_designsize}
+ {\letcsname\??fontfile\m_font_name\s!features \endcsname\p_features
+ \letcsname\??fontfile\m_font_name\s!fallbacks \endcsname\p_fallbacks
+ \letcsname\??fontfile\m_font_name\s!goodies \endcsname\p_goodies
+ \letcsname\??fontfile\m_font_name\s!designsize\endcsname\p_designsize}
\def\font_basics_get_font_parameter_yes_finish
- {\expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!features \endcsname\p_features
- \expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!fallbacks \endcsname\p_fallbacks
- \expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\p_goodies
- \expandafter\glet\csname\??fontfile\fontclass\m_font_name\s!designsize\endcsname\p_designsize}
+ {\gletcsname\??fontfile\fontclass\m_font_name\s!features \endcsname\p_features
+ \gletcsname\??fontfile\fontclass\m_font_name\s!fallbacks \endcsname\p_fallbacks
+ \gletcsname\??fontfile\fontclass\m_font_name\s!goodies \endcsname\p_goodies
+ \gletcsname\??fontfile\fontclass\m_font_name\s!designsize\endcsname\p_designsize}
%\definefontsynonym [KopFont] [\fontclassname{officina}{SerifBold}]
-%
%\defineclassfontsynonym [KopFont] [officina] [SerifBold]
-
-\unexpanded\def\defineclassfontsynonym
- {\dotripleargument\font_basics_define_class_font_synonym}
-
%\definefontsynonym[#tag][\fontclassname{#class}{#fileortag}]}
-\def\font_basics_define_class_font_synonym[#tag][#class][#fileortag]% needs testing
- {\expandafter\normaldef\csname\??fontfile\fontclass#tag\endcsname{\fontclassname{#class}{#fileortag}}%
+\permanent\tolerant\protected\def\defineclassfontsynonym[#tag]#spacer[#class]#spacer[#fileortag]% needs testing
+ {\defcsname\??fontfile\fontclass#tag\endcsname{\fontclassname{#class}{#fileortag}}%
\font_basics_define_font_synonym_yes_nil}
-\let\definefontfile\definefontsynonym % dedicated to Taco Hoekwater
-
-\unexpanded\def\setupfontsynonym
- {\dodoubleempty\dosetupfontsynonym}
+\aliased\let\definefontfile\definefontsynonym % dedicated to Taco Hoekwater
-\def\dosetupfontsynonym[#name][#settings]% not yet supported, will do when needed
+\permanent\tolerant\protected\def\setupfontsynonym[#name]#spacer[#settings]% not yet supported, will do when needed
{}
% todo: replace * by ... less messy with features
-\def\truefontname#name%
+% no \ifempty here as #1 can be empty
+
+\permanent\def\truefontname#name%
{\expandafter\font_helpers_true_fontname#name*\empty*\relax}
-\def\font_helpers_true_fontname#name*#first#rest*#crap\relax
+\def\font_helpers_true_fontname#name*#first#rest*#ignore\relax
{\ifcsname\??fontfile\fontclass#name\endcsname
\ifx#first\empty
- %\expandafter\truefontname\csname\??fontfile\fontclass#name\endcsname
\expandafter\truefontname\lastnamedcs
\else
- %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname*#first#rest%
\expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest%
\fi
\orelse\ifcsname\??fontfile\defaultfontclass#name\endcsname
\ifx#first\empty
- %\expandafter\truefontname\csname\??fontfile\defaultfontclass#name\endcsname
\expandafter\truefontname\lastnamedcs
\else
- %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname*#first#rest%
\expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest%
\fi
\orelse\ifcsname\??fontfile#name\endcsname
\ifx#first\empty
- %\expandafter\truefontname\csname\??fontfile#name\endcsname
\expandafter\truefontname\lastnamedcs
\else
- %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname*#first#rest%
\expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest%
\fi
\else
@@ -237,48 +220,27 @@
\def\font_helpers_true_fontname_check#name%
{\expandafter\font_helpers_true_fontname_check_indeed#name*\relax}
-\def\font_helpers_true_fontname_check_indeed#name*#crap\relax
+\def\font_helpers_true_fontname_check_indeed#name*#ignore\relax
{\ifcsname\??fontfile\fontclass#name\endcsname
- %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname
\expandafter\font_helpers_true_fontname_check\lastnamedcs
\orelse\ifcsname\??fontfile\defaultfontclass#name\endcsname
- %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname
\expandafter\font_helpers_true_fontname_check\lastnamedcs
\orelse\ifcsname\??fontfile#name\endcsname
- %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname
\expandafter\font_helpers_true_fontname_check\lastnamedcs
\else
#name%
\fi}
% ok when the last lookup is not stripped .. we need to be able to define synonyms for symbols
-%
-% \def\truefontname#name%
-% %{\normalexpanded{\noexpand\font_helpers_true_fontname{\clf_truefontname{#name}}}}
-% {\expandafter\expandafter\expandafter\font_helpers_true_fontname\expandafter\expandafter\expandafter{\clf_truefontname{#name}}}
-%
-% \def\font_helpers_true_fontname#name%
-% {\ifcsname\??fontfile\fontclass#name\endcsname
-% \expandafter\font_helpers_true_fontname\expandafter{\lastnamedcs}%
-% \orelse\ifcsname\??fontfile\defaultfontclass#name\endcsname
-% \expandafter\font_helpers_true_fontname\expandafter{\lastnamedcs}%
-% \orelse\ifcsname\??fontfile#name\endcsname
-% \expandafter\font_helpers_true_fontname\expandafter{\lastnamedcs}%
-% \else
-% % \clf_truefontname{#name}%
-% #name% so the last one can have features !
-% \fi}
-
-\def\expandfontsynonym#command#name% one level expansion
+
+\permanent\def\expandfontsynonym#command#name% one level expansion
{\ifcsname\??fontfile\fontclass#name\endcsname
- %\expandafter\normaldef\expandafter#command\expandafter{\csname\??fontfile\fontclass#name\endcsname}%
\expandafter\normaldef\expandafter#command\expandafter{\lastnamedcs}%
\orelse\ifcsname\??fontfile\defaultfontclass#2\endcsname
- %\expandafter\normaldef\expandafter#command\expandafter{\csname\??fontfile\defaultfontclass#name\endcsname}%
\expandafter\normaldef\expandafter#command\expandafter{\lastnamedcs}%
\fi}
-\def\doifelsefontsynonym#name%
+\permanent\def\doifelsefontsynonym#name%
{\ifcsname\??fontfile\fontclass#name\endcsname
\expandafter\firstoftwoarguments
\orelse\ifcsname\??fontfile\defaultfontclass#name\endcsname
@@ -287,14 +249,14 @@
\expandafter\secondoftwoarguments
\fi}
-\let\doiffontsynonymelse\doifelsefontsynonym
+\aliased\let\doiffontsynonymelse\doifelsefontsynonym
%D \macros
%D {tracedfontname}
%D
%D A goody:
-\def\tracedfontname#name%
+\permanent\def\tracedfontname#name%
{#name\ifcsname\??fontfile\fontclass#name\endcsname
%\expandafter\tracedfontname\csname\??fontfile\fontclass#name\endcsname
\expandafter\tracedfontname\lastnamedcs
@@ -313,7 +275,7 @@
\let\fontclass \empty
\let\defaultfontclass\empty
-\def\fontclassname#class#name% tricky ... no lastnamedcs here due to nesting
+\permanent\def\fontclassname#class#name% tricky ... no lastnamedcs here due to nesting
{\ifcsname\??fontfile#class#name\endcsname
\fontclassname{#class}{\csname\??fontfile#class#name\endcsname}%
\orelse\ifcsname\??fontfile#name\endcsname
@@ -328,8 +290,8 @@
%D They can inherit them.
% Why these expanded and rscale not ... maybe not worth the trouble (delayed
-% expansion actually would be better i.e. macros in feature specs). Test
-% without pre-expansion.
+% expansion actually would be better i.e. macros in feature specs). Test without
+% pre-expansion.
\def\font_helpers_update_font_class_parameters
{\edef\m_font_class_direction {\begincsname\??fontclass\fontclass\fontstyle\s!direction \endcsname}%
@@ -401,22 +363,22 @@
\font_helpers_set_designsize_nop\somefontname}
\def\font_helpers_update_font_parameters
- {\ifx\fontclass\empty\font_helpers_update_font_parameters_nop\else\font_helpers_update_font_parameters_yes\fi}
+ {\ifempty\fontclass\font_helpers_update_font_parameters_nop\else\font_helpers_update_font_parameters_yes\fi}
\installcorenamespace{fontclass}
% we can pack them (don't use \setxvalue!)
-\unexpanded\def\savefontclassparameters#style#rscale#features#fallbacks#goodies#designsize#direction%
- {\letgvalue{\??fontclass\fontclass#style\s!rscale }#rscale%
- \letgvalue{\??fontclass\fontclass#style\s!features }#features%
- \letgvalue{\??fontclass\fontclass#style\s!fallbacks }#fallbacks%
- \letgvalue{\??fontclass\fontclass#style\s!goodies }#goodies%
- \letgvalue{\??fontclass\fontclass#style\s!designsize}#designsize%
- \letgvalue{\??fontclass\fontclass#style\s!direction }#direction}% math
+\permanent\protected\def\savefontclassparameters#style#rscale#features#fallbacks#goodies#designsize#direction%
+ {\gletcsname\??fontclass\fontclass#style\s!rscale \endcsname#rscale%
+ \gletcsname\??fontclass\fontclass#style\s!features \endcsname#features%
+ \gletcsname\??fontclass\fontclass#style\s!fallbacks \endcsname#fallbacks%
+ \gletcsname\??fontclass\fontclass#style\s!goodies \endcsname#goodies%
+ \gletcsname\??fontclass\fontclass#style\s!designsize\endcsname#designsize%
+ \gletcsname\??fontclass\fontclass#style\s!direction \endcsname#direction}% math
% bonus
-\let\currentfontinstancespec\clf_currentfontinstancespec % expandable
+% \currentfontinstancespec % define ad the lua end
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-fmp.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-fmp.lmt
new file mode 100644
index 00000000000..f35c96f49ed
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-fmp.lmt
@@ -0,0 +1,123 @@
+if not modules then modules = { } end modules ['font-fmp'] = {
+ 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"
+}
+
+-- We only need to pick up the filename and optionally the enc file as we only use
+-- them for old school virtual math fonts. We might as well drop this completely.
+-- This used to be a backend module but the code is rather generic so we just put it
+-- here now.
+
+local find, match, splitlines = string.find, string.match, string.splitlines
+
+local implement = interfaces.implement
+
+local mappings = { }
+
+local function setline(n)
+ if trace_fonts then
+ report_fonts("mapline: %s",n)
+ end
+ local name, fullname, encfile, pfbfile = match(n,"(%S+)%s+(%S+).-<(.-%.enc).-<(.-%.pfb)")
+ if name then
+ mappings[name] = { fullname, encfile, pfbfile }
+ end
+end
+
+local function setfile(n)
+ local okay, data = resolvers.loadbinfile(n,"map")
+ if okay and data then
+ data = splitlines(data)
+ for i=1,#data do
+ local d = data[i]
+ if d ~= "" and not find(d,"^[#%%]") then
+ setline(d)
+ end
+ end
+ end
+end
+
+local function getentry(n)
+ local n = file.nameonly(n)
+ local m = mappings[n]
+ if m then
+ local encfile = m[2]
+ local encoding = fonts.encodings.load(encfile)
+ if not encoding then
+ return
+ end
+ local pfbfile = resolvers.findfile(m[3],"pfb")
+ if not pfbfile or pfbfile == "" then
+ return
+ end
+ return encoding, pfbfile, encfile
+ end
+end
+
+-- soon to be obsolete:
+
+local mappings = fonts.mappings or { }
+fonts.mappings = mappings
+
+local loaded = { -- prevent loading (happens in cont-sys files)
+ -- ["original-base.map" ] = true,
+ -- ["original-ams-base.map" ] = true,
+ -- ["original-ams-euler.map"] = true,
+ -- ["original-public-lm.map"] = true,
+}
+
+function mappings.loadfile(name)
+ name = file.addsuffix(name,"map")
+ if not loaded[name] then
+ if trace_mapfiles then
+ report_mapfiles("loading map file %a",name)
+ end
+ setfile(name)
+ loaded[name] = true
+ end
+end
+
+local loaded = { -- prevent double loading
+}
+
+function mappings.loadline(how,line)
+ if line then
+ how = how .. " " .. line
+ elseif how == "" then
+ how = "= " .. line
+ end
+ if not loaded[how] then
+ if trace_mapfiles then
+ report_mapfiles("processing map line %a",line)
+ end
+ setline(how)
+ loaded[how] = true
+ end
+end
+
+function mappings.reset()
+ lpdf.setmapfile("") -- tricky ... backend related
+end
+
+mappings.getentry = getentry
+
+implement {
+ name = "loadmapfile",
+ actions = mappings.loadfile,
+ arguments = "string"
+}
+
+implement {
+ name = "loadmapline",
+ actions = mappings.loadline,
+ arguments = "string"
+}
+
+implement {
+ name = "resetmapfiles",
+ actions = mappings.reset,
+ arguments = "string"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-gds.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-gds.mklx
new file mode 100644
index 00000000000..897478273ff
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-gds.mklx
@@ -0,0 +1,97 @@
+%D \module
+%D [ file=font-gds,
+%D version=2009.10.14,
+%D title=\CONTEXT\ Font Support,
+%D subtitle=Colorschemes,
+%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 Font Support / Colorschemes}
+
+%registerctxluafile{font-gds}{}
+
+\unprotect
+
+% this will become colorgroups and move to font-col or so
+
+\definecolor[colorscheme:1:1][s=.75]
+\definecolor[colorscheme:1:2][r=.75]
+\definecolor[colorscheme:1:3][g=.75]
+\definecolor[colorscheme:1:4][b=.75]
+\definecolor[colorscheme:1:5][c=.75]
+\definecolor[colorscheme:1:6][m=.75]
+\definecolor[colorscheme:1:7][y=.75]
+
+\definecolor[colorscheme:2:7][s=.75]
+\definecolor[colorscheme:2:6][r=.75]
+\definecolor[colorscheme:2:5][g=.75]
+\definecolor[colorscheme:2:4][b=.75]
+\definecolor[colorscheme:2:3][c=.75]
+\definecolor[colorscheme:2:2][m=.75]
+\definecolor[colorscheme:2:1][y=.75]
+
+\definecolor[colorscheme:3:1][r=.75]
+\definecolor[colorscheme:3:2][g=.75]
+\definecolor[colorscheme:3:3][b=.75]
+\definecolor[colorscheme:3:4][g=.75,b=.75]
+\definecolor[colorscheme:3:5][r=.75,b=.75]
+\definecolor[colorscheme:3:6][r=.75,g=.75]
+\definecolor[colorscheme:3:7][g=.75]
+
+\definecolor[colorscheme:4:1] [r=.6] % a
+\definecolor[colorscheme:4:5] [g=.6] % e
+\definecolor[colorscheme:4:9] [b=.6] % i
+\definecolor[colorscheme:4:15][g=.6,b=.6] % o
+\definecolor[colorscheme:4:21][r=.6,b=.6] % u
+\definecolor[colorscheme:4:25][r=.6,b=.6] % y
+
+\definesystemattribute[colorscheme][public]
+
+\permanent\protected\def\loadfontgoodies[#filename]{\clf_loadfontgoodies{#filename}} % todo: public implementor
+
+\permanent\protected\def\setfontcolorscheme % will move to the lua end
+ {\clf_enablefontcolorschemes
+ \enforced\permanent\protected\xdef\setfontcolorscheme[##1]{\c_attr_colorscheme##1\relax}%
+ \setfontcolorscheme}
+
+\permanent\protected\def\resetfontcolorscheme
+ {\c_attr_colorscheme\attributeunsetvalue}
+
+\protect \endinput
+
+% \definefontfeature[husayni-colored][goodies=husayni,colorscheme=default,featureset=default]
+%
+% \definedfont[husayni*husayni-colored at 36pt]
+%
+% \starttext \righttoleft
+%
+% \setfontcolorscheme[1]
+%
+% اَلْحَمْâ€Ø¯Ù Ù„Ùلّٰه٠حَمْدَ Ù…ÙعْتَرÙÙ٠بÙحَمْدÙهٖ، Ù…ÙغْتَرÙÙÙŒ Ù…Ùنْ بÙحَارÙ
+% مَجْدÙهٖ، بÙÙ„Ùسَان٠ٱلثَّنَاۤء٠شَاكÙرًا، ÙˆÙŽÙ„ÙØ­Ùسْن٠اٰلاۤئÙهٖ نَاشÙرًا؛
+% اَلَّذÙيْ خَلَقَ ٱلْمَوْتَ وَٱلْحَيٰوةَ، وَٱلْخَيْرَ وَٱلشَّرَّ،
+% وَٱلنَّÙْعَ وَٱلضَّرَّ، وَٱلسّÙÙƒÙوْنَ وَٱلْحَرَكَةَ، وَٱلْأَرْوَاحَ
+% وَٱلْأَجْسَامَ، وَٱلذّÙكْرَ وَٱلنّÙسْيَانَ.
+%
+% \setfontcolorscheme[2]
+%
+% اَلْحَمْâ€Ø¯Ù Ù„Ùلّٰه٠حَمْدَ Ù…ÙعْتَرÙÙ٠بÙحَمْدÙهٖ، Ù…ÙغْتَرÙÙÙŒ Ù…Ùنْ بÙحَارÙ
+% مَجْدÙهٖ، بÙÙ„Ùسَان٠ٱلثَّنَاۤء٠شَاكÙرًا، ÙˆÙŽÙ„ÙØ­Ùسْن٠اٰلاۤئÙهٖ نَاشÙرًا؛
+% اَلَّذÙيْ خَلَقَ ٱلْمَوْتَ وَٱلْحَيٰوةَ، وَٱلْخَيْرَ وَٱلشَّرَّ،
+% وَٱلنَّÙْعَ وَٱلضَّرَّ، وَٱلسّÙÙƒÙوْنَ وَٱلْحَرَكَةَ، وَٱلْأَرْوَاحَ
+% وَٱلْأَجْسَامَ، وَٱلذّÙكْرَ وَٱلنّÙسْيَانَ.
+%
+% \resetfontcolorscheme
+%
+% اَلْحَمْâ€Ø¯Ù Ù„Ùلّٰه٠حَمْدَ Ù…ÙعْتَرÙÙ٠بÙحَمْدÙهٖ، Ù…ÙغْتَرÙÙÙŒ Ù…Ùنْ بÙحَارÙ
+% مَجْدÙهٖ، بÙÙ„Ùسَان٠ٱلثَّنَاۤء٠شَاكÙرًا، ÙˆÙŽÙ„ÙØ­Ùسْن٠اٰلاۤئÙهٖ نَاشÙرًا؛
+% اَلَّذÙيْ خَلَقَ ٱلْمَوْتَ وَٱلْحَيٰوةَ، وَٱلْخَيْرَ وَٱلشَّرَّ،
+% وَٱلنَّÙْعَ وَٱلضَّرَّ، وَٱلسّÙÙƒÙوْنَ وَٱلْحَرَكَةَ، وَٱلْأَرْوَاحَ
+% وَٱلْأَجْسَامَ، وَٱلذّÙكْرَ وَٱلنّÙسْيَانَ.
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-glf.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-glf.mklx
new file mode 100644
index 00000000000..2c23f226eed
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-glf.mklx
@@ -0,0 +1,41 @@
+%D \module
+%D [ file=font-glf,
+%D version=2020.12.21,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Glyph Scaling,
+%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 Font Macros / Glyph Scaling}
+
+\unprotect
+
+%D Experiment:
+
+\installcorenamespace{tweakedfont}
+
+\installcommandhandler \??tweakedfont {tweakedfont} \??tweakedfont
+
+\appendtoks
+ % we can optimize for zero and 1000 .. maybe also options?
+ \overloaded\frozen\protected\edefcsname\currenttweakedfont\endcsname
+ {\begincsname\tweakedfontparameter\c!style\endcsname
+ \glyphxscale \numexpr\numericscale\tweakedfontparameter\c!xscale*\glyphxscale/\plusthousand\relax
+ \glyphyscale \numexpr\numericscale\tweakedfontparameter\c!yscale*\glyphyscale/\plusthousand\relax
+ \glyphxoffset\dimexpr\glyphxoffset+\tweakedfontparameter\c!xoffset\relax
+ \glyphyoffset\dimexpr\glyphyoffset+\tweakedfontparameter\c!yoffset\relax}%
+\to \everydefinetweakedfont
+
+\setuptweakedfont
+ [\c!scale=\plusthousand,
+ \c!xscale=\tweakedfontparameter\c!scale,
+ \c!yscale=\tweakedfontparameter\c!scale,
+ \c!xoffset=\zeropoint,
+ \c!yoffset=\zeropoint]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-imp-math.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-imp-math.lmt
new file mode 100644
index 00000000000..277190f2410
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-imp-math.lmt
@@ -0,0 +1,226 @@
+if not modules then modules = { } end modules ['font-imp-math'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv and hand-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, type, tonumber = next, type, tonumber
+
+local fonts = fonts
+local helpers = fonts.helpers
+local registerotffeature = fonts.handlers.otf.features.register
+
+local setmetatableindex = table.setmetatableindex
+
+local texconditionals = tex.conditionals
+
+-- tfmdata.properties.mathnolimitsmode = tonumber(value) or 0
+
+local splitter = lpeg.splitat(",",tonumber)
+local lpegmatch = lpeg.match
+
+local function initialize(tfmdata,value)
+ local mathparameters = tfmdata.mathparameters
+ if mathparameters then
+ local sup, sub
+ if type(value) == "string" then
+ sup, sub = lpegmatch(splitter,value)
+ if not sup then
+ sub, sup = 0, 0
+ elseif not sub then
+ sub, sup = sup, 0
+ end
+ elseif type(value) == "number" then
+ sup, sub = 0, value
+ end
+ if sup then
+ mathparameters.NoLimitSupFactor = sup
+ end
+ if sub then
+ mathparameters.NoLimitSubFactor = sub
+ end
+ end
+end
+
+registerotffeature {
+ name = "mathnolimitsmode",
+ description = "influence nolimits placement",
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+-- this will become a mode in the engine
+
+local function initialize(tfmdata,value)
+ tfmdata.properties.nostackmath = value and true
+end
+
+registerotffeature {
+ name = "nostackmath",
+ description = "disable math stacking mechanism",
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+-- A quick and dirty and low level implementation but okay for testing:
+
+function fonts.helpers.mathscriptslots(tfmdata,textcode)
+ local rawdata = tfmdata.shared.rawdata
+ local rawresources = rawdata and rawdata.resources
+ local rawfeatures = rawresources and rawresources.features
+ local basesubstitutions = rawfeatures and rawfeatures.gsub
+ local sequences = basesubstitutions and tfmdata.resources.sequences
+ if sequences then
+ local characters = tfmdata.characters
+ if characters[textcode] then
+ for s=1,#sequences do
+ local sequence = sequences[s]
+ local sfeatures = sequence.features
+ if sfeatures and sfeatures.ssty then
+ local steps = sequence.steps
+ for i=1,#steps do
+ local coverage = steps[i].coverage
+ if coverage then
+ local okay = coverage[textcode]
+ if okay then
+ return okay
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local function manipulate(tfmdata,key,value)
+ if texconditionals["c_font_compact"] then
+ local rawdata = tfmdata.shared.rawdata
+ local rawresources = rawdata and rawdata.resources
+ local rawfeatures = rawresources and rawresources.features
+ local basesubstitutions = rawfeatures and rawfeatures.gsub
+ local sequences = basesubstitutions and tfmdata.resources.sequences
+
+ if sequences then
+ local characters = tfmdata.characters
+ for s=1,#sequences do
+ local sequence = sequences[s]
+ local sfeatures = sequence.features
+ if sfeatures and sfeatures.ssty then
+ local steps = sequence.steps
+ for i=1,#steps do
+ local coverage = steps[i].coverage
+ if coverage then
+ for textcode, v in next, coverage do
+ local textdata = characters[textcode]
+ if textdata then
+ local scriptcode = v[1]
+ local scriptscriptcode = v[2]
+ local scriptdata = characters[scriptcode]
+ local scriptscriptdata = characters[scriptscriptcode]
+ if scriptdata then
+ textdata.smaller = scriptcode
+ end
+ if scriptscriptdata then
+ scriptdata.smaller = scriptscriptcode
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local function initialize(tfmdata,key,value)
+ if texconditionals["c_font_compact"] then
+ local rawdata = tfmdata.shared.rawdata
+ local rawresources = rawdata and rawdata.resources
+ local mathconstants = rawresources.mathconstants
+ if mathconstants then
+ local parameters = tfmdata.parameters
+ parameters.textscale = 1000
+ parameters.scriptscale = mathconstants.ScriptPercentScaleDown * 10
+ parameters.scriptscriptscale = mathconstants.ScriptScriptPercentScaleDown * 10
+ end
+ end
+end
+
+local specification = {
+ name = "compactmath",
+ description = "use one math font",
+ manipulators = {
+ base = manipulate,
+ node = manipulate,
+ },
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+registerotffeature(specification)
+
+-- The problem is that the traditional code path doesn't add an italic to the subscript,
+-- simply because it assumes that the width has that already subtracted. So, we cannot
+-- compensate in the following way. We're stuck with the fact that the texgyre fonts
+-- assume a traditional tex engine.
+
+-- local function manipulate(tfmdata,key,value)
+-- if value == "correct" then
+-- local chardata = characters.data
+-- for unicode, data in next, tfmdata.characters do
+-- local italic = data.italic
+-- if italic then
+-- -- todo: only letters
+-- data.width = (data.width or 0) + italic
+-- local cd = chardata[unicode]
+-- if cd then
+-- local visual = cd.visual
+-- if visual == "it" or visual == "bi" then
+-- italic = -italic
+-- else
+-- italic = 0
+-- end
+-- else
+-- italic = 0
+-- end
+-- data.italic = italic
+-- end
+-- end
+-- end
+-- end
+
+local function initialize(tfmdata,key,value)
+ if value then
+ local rawdata = tfmdata.shared.rawdata
+ local rawresources = rawdata and rawdata.resources
+ local mathconstants = rawresources.mathconstants
+ if mathconstants then
+ tfmdata.properties.oldmath = true
+ end
+ end
+end
+
+local specification = {
+ name = "oldmath",
+ description = "deal with fake opentype fonts",
+ -- manipulators = {
+ -- base = manipulate,
+ -- node = manipulate,
+ -- },
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+registerotffeature(specification)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-imp-tracing.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-imp-tracing.lmt
new file mode 100644
index 00000000000..59603c9ddd6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-imp-tracing.lmt
@@ -0,0 +1,286 @@
+if not modules then modules = { } end modules ['font-imp-tracing'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv and hand-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local abs = math.abs
+
+local next, type = next, type
+local concat = table.concat
+local formatters = string.formatters
+
+local fonts = fonts
+
+local handlers = fonts.handlers
+local registerotffeature = handlers.otf.features.register
+local registerafmfeature = handlers.afm.features.register
+
+local settings_to_array = utilities.parsers.settings_to_array
+local setmetatableindex = table.setmetatableindex
+
+local helpers = fonts.helpers
+local appendcommandtable = helpers.appendcommandtable
+local prependcommands = helpers.prependcommands
+local charcommand = helpers.commands.char
+
+local variables = interfaces.variables
+
+local v_background = variables.background
+local v_frame = variables.frame
+local v_empty = variables.empty
+local v_none = variables.none
+
+local function initialize(tfmdata,key,value)
+ if value then
+ local vfspecials = fonts.helpers.vfspecials
+ local vfcommands = fonts.helpers.commands
+ local backgrounds = vfspecials.backgrounds
+ local outlines = vfspecials.outlines
+ local characters = tfmdata.characters
+ local rulecache = backgrounds
+ local showchar = true
+ local color = "palegray"
+ if type(value) == "string" then
+ value = settings_to_array(value)
+ for i=1,#value do
+ local v = value[i]
+ if v == v_frame then
+ rulecache = outlines
+ elseif v == v_background then
+ rulecache = backgrounds
+ elseif v == v_empty then
+ showchar = false
+ elseif v == v_none then
+ color = nil
+ else
+ color = v
+ end
+ end
+ end
+ local gray = color and { "startcolor", color } or nil
+ local black = gray and { "stopcolor" } or nil
+ for unicode, character in next, characters do
+ local width = character.width or 0
+ local height = character.height or 0
+ local depth = character.depth or 0
+ local rule = rulecache[height][depth][width]
+ if showchar then
+ local commands = character.commands
+ if commands then
+ if gray then
+ character.commands = prependcommands (
+ commands, gray, rule, black
+ )
+ else
+ character.commands = prependcommands (
+ commands, rule
+ )
+ end
+ else
+ local char = charcommand[unicode]
+ if gray then
+ character.commands = {
+ gray, rule, black, char
+ }
+ else
+ character.commands = {
+ rule, char
+ }
+ end
+ end
+ else
+ if gray then
+ character.commands = {
+ gray, rule, black
+ }
+ else
+ character.commands = {
+ rule
+ }
+ end
+ end
+ end
+ end
+end
+
+local specification = {
+ name = "boundingbox",
+ description = "show boundingbox",
+ manipulators = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+registerotffeature(specification)
+registerafmfeature(specification)
+
+local function initialize(tfmdata,key,value)
+ if value then
+ local rawdata = tfmdata.shared.rawdata
+ local rawresources = rawdata and rawdata.resources
+ local mathconstants = rawresources.mathconstants
+ if mathconstants then
+ local vfspecials = fonts.helpers.vfspecials
+ local vfcommands = fonts.helpers.commands
+ local backgrounds = vfspecials.backgrounds
+ local outlines = vfspecials.outlines
+ local characters = tfmdata.characters
+ local rulecache = backgrounds
+ local push = vfcommands.push
+ local pop = vfcommands.pop
+ local black = { "stopcolor" }
+ local itcolor = { "startcolor", "trace:0" } -- s / dd (transparent)
+ local brcolor = { "startcolor", "trace:1" } -- r / dr
+ local trcolor = { "startcolor", "trace:2" } -- g / dg
+ local blcolor = { "startcolor", "trace:3" } -- b / db
+ local tlcolor = { "startcolor", "trace:4" } -- y / dy
+ for unicode, character in next, characters do
+ local mathkern = character.mathkern
+ local italic = character.vert_italic or character.italic
+ if mathkern or (italic and italic ~= 0) then
+ local width = character.width or 0
+ local height = character.height or 0
+ local depth = character.depth or 0
+ local list = { }
+ local count = 0
+ if italic and italic ~= 0 then
+ count = count + 1 list[count] = itcolor
+ count = count + 1 list[count] = push
+ count = count + 1 list[count] = { "offset", width + (italic < 0 and -italic or 0), 0 }
+ count = count + 1 list[count] = rulecache[height][depth][abs(-italic)]
+ count = count + 1 list[count] = pop
+ count = count + 1 list[count] = black
+ end
+ if mathkern then
+ local br = mathkern.bottom_right
+ local tr = mathkern.top_right
+ local bl = mathkern.bottom_left
+ local tl = mathkern.top_left
+ if br then
+ local done = false
+ for i=1,#br do
+ local l = br[i]
+ local h = l.height or 0
+ local k = l.kern or 0
+ if k ~= 0 then
+ if h == 0 then
+ h = height + depth -- todo max
+ end
+ if not done then
+ count = count + 1 list[count] = brcolor
+ done = true
+ end
+ count = count + 1 list[count] = push
+ count = count + 1 list[count] = { "offset", width + (k < 0 and k or 0), - depth }
+ count = count + 1 list[count] = rulecache[h][0][abs(k)]
+ count = count + 1 list[count] = pop
+ end
+ end
+ if done then
+ count = count + 1 list[count] = black
+ end
+ end
+ if tr then
+ local done = false
+ for i=1,#tr do
+ local l = tr[i]
+ local h = l.height or 0
+ local k = l.kern or 0
+ if k ~= 0 then
+ if h == 0 then
+ h = height + depth -- todo max
+ end
+ if not done then
+ count = count + 1 list[count] = trcolor
+ done = true
+ end
+ count = count + 1 list[count] = push
+ count = count + 1 list[count] = { "offset", width + (k < 0 and k or 0), height - h }
+ count = count + 1 list[count] = rulecache[h][0][abs(k)]
+ count = count + 1 list[count] = pop
+ end
+ end
+ if done then
+ count = count + 1 list[count] = black
+ end
+ end
+ if bl then
+ local done = false
+ for i=1,#bl do
+ local l = bl[i]
+ local h = l.height or 0
+ local k = l.kern or 0
+ if k ~= 0 then
+ if h == 0 then
+ h = height + depth -- todo max
+ end
+ if not done then
+ count = count + 1 list[count] = blcolor
+ done = true
+ end
+ count = count + 1 list[count] = push
+ count = count + 1 list[count] = { "offset", (k < 0 and k or 0), -depth }
+ count = count + 1 list[count] = rulecache[h][0][abs(k)]
+ count = count + 1 list[count] = pop
+ end
+ end
+ if done then
+ count = count + 1 list[count] = black
+ end
+ end
+ if tl then
+ local done = false
+ for i=1,#tl do
+ local l = tl[i]
+ local h = l.height or 0
+ local k = l.kern or 0
+ if k ~= 0 then
+ if h == 0 then
+ h = height + depth -- todo max
+ end
+ if not done then
+ count = count + 1 list[count] = tlcolor
+ done = true
+ end
+ count = count + 1 list[count] = push
+ count = count + 1 list[count] = { "offset", (k < 0 and k or 0), height - h }
+ count = count + 1 list[count] = rulecache[h][0][abs(k)]
+ count = count + 1 list[count] = pop
+ end
+ end
+ if done then
+ count = count + 1 list[count] = black
+ end
+ end
+ end
+ if count > 0 then
+ local commands = character.commands
+ if commands then
+ character.commands = appendcommandtable(commands,list)
+ else
+ list[#list+1] = charcommand[unicode]
+ character.commands = list
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local specification = {
+ name = "staircase",
+ description = "show staircase kerns",
+-- position = 1,
+ manipulators = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+registerotffeature(specification)
+registerafmfeature(specification)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt
new file mode 100644
index 00000000000..45e8f9e18a7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-ini.lmt
@@ -0,0 +1,40 @@
+if not modules then modules = { } end modules ['font-ini'] = {
+ 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"
+}
+
+--[[ldx--
+<p>Not much is happening here.</p>
+--ldx]]--
+
+local allocate = utilities.storage.allocate
+local sortedhash = table.sortedhash
+
+fonts = fonts or { }
+local fonts = fonts
+
+local identifiers = allocate()
+
+fonts.hashes = fonts.hashes or { identifiers = identifiers }
+fonts.tables = fonts.tables or { }
+fonts.helpers = fonts.helpers or { }
+fonts.tracers = fonts.tracers or { } -- for the moment till we have move to moduledata
+fonts.specifiers = fonts.specifiers or { } -- in format !
+
+fonts.analyzers = { } -- not needed here
+fonts.readers = { }
+fonts.definers = { methods = { } }
+fonts.loggers = { register = function() end }
+
+fonts.privateoffsets = {
+ textbase = 0xF0000, -- used for hidden (opentype features)
+ textextrabase = 0xFD000, -- used for visible by name
+ mathextrabase = 0xFE000, -- used for visible by code
+ mathbase = 0xFF000, -- used for hidden (virtual math)
+ keepnames = false, -- when set to true names are always kept (not for context)
+}
+
+-- Also here now:
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ini.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-ini.mklx
index 4b112322dc3..557ac3c49e2 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ini.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-ini.mklx
@@ -12,16 +12,13 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% todo: frozen tolerant iftok etc
+
% todo: < 3 pt => 3pt
% todo: check where more class usage
% todo: split font-nam (style/alternative/size)
% todo: split font-dim (scales etc)
% todo: reconsider defaultfontclass
-%
-
-%D Watch out: as we define inside macros in sometimes special ways,
-%D an occasional \type {\normaldef} is used in order to please the
-%D \MKVI\ parser.
%D Beware, we use a special set of parameters here:
%D
@@ -326,30 +323,38 @@
\newtoks\t_font_tracers_definitions
-\unexpanded\def\tracefontdefinitions
+\permanent\protected\def\tracefontdefinitions
{\the\t_font_tracers_definitions}
%D Some housekeeping macros:
-\unexpanded\def\setfontparameters
+\permanent\protected\def\setfontparameters
{\setfalse\c_font_synchronize
\the\everybodyfont
\settrue\c_font_synchronize}
-\let\savedfont\empty
+\mutable\let\savedfont\empty
\installmacrostack\savedfont
-\unexpanded\def\savefont
- {\edef\savedfont{\the\font}% gives \csname
+% \fontname\font : string
+% \fontid \font : integer
+% \the \font : token (reference to font)
+% \fontspecifiedname : string
+% \the \fontspecifiedsize : dimension
+
+\permanent\protected\def\savefont
+ {\edef\savedfont{\the\font}%
\push_macro_savedfont}
-\unexpanded\def\restorefont
+\permanent\protected\def\restorefont
{\pop_macro_savedfont
\savedfont}
-\unexpanded\def\pushcurrentfont
- {\edef\popcurrentfont
+\aliased\let\popcurrentfont\relax
+
+\permanent\protected\def\pushcurrentfont
+ {\enforced\permanent\protected\edef\popcurrentfont
{\def\noexpand\fontbody {\fontbody}%
\def\noexpand\fontstyle {\fontstyle}%
\def\noexpand\fontalternative{\fontalternative}%
@@ -359,26 +364,22 @@
%D \macros{definedfont}
-\let\thedefinedfont\relax % not to be confused with \everydefinefont
-
-\unexpanded\def\definedfont
- {\doifelsenextoptionalcs\font_basics_defined_font_yes\font_basics_defined_font_nop}
+\mutable\let\thedefinedfont\relax % not to be confused with \everydefinefont
-\def\font_basics_defined_font_yes[#specification]%
- {\c_font_feature_inheritance_mode\c_font_feature_inheritance_fontonly
- \font_basics_define_font_without_parameters{thedefinedfont}{#specification}%
- \thedefinedfont
- \the\everydefinedfont}
-
-\def\font_basics_defined_font_nop
- {\c_font_feature_inheritance_mode\c_font_feature_inheritance_fontonly
+\permanent\tolerant\protected\def\definedfont[#specification]%
+ {\ifarguments
+ \c_font_feature_inheritance_mode\c_font_feature_inheritance_fontonly
+ \or
+ \c_font_feature_inheritance_mode\c_font_feature_inheritance_fontonly
+ \font_basics_define_font_without_parameters{thedefinedfont}{#specification}%
+ \fi
\thedefinedfont
\the\everydefinedfont}
%D \macros{startfont}
-\unexpanded\def\startfont{\begingroup\definedfont}
-\unexpanded\def\stopfont {\endgroup}
+\permanent\protected\def\startfont{\begingroup\definedfont}
+\permanent\protected\def\stopfont {\endgroup}
%D \macros
%D {everybodyfont,everyglobalbodyfont}
@@ -400,9 +401,9 @@
%D local (sometimes in the textflow) size. We store these dimensions in two
%D \DIMENSION\ registers. These registers are not to be misused in calculations.
-\ifdefined\globalbodyfontsize\else \newdimen\globalbodyfontsize \fi \globalbodyfontsize=12pt
-\ifdefined\localbodyfontsize \else \newdimen\localbodyfontsize \fi \localbodyfontsize =\globalbodyfontsize
-\ifdefined\bodyfontsize \else \newdimen\bodyfontsize \fi \bodyfontsize =\globalbodyfontsize
+\ifdefined\globalbodyfontsize \else \newdimen\globalbodyfontsize \fi \globalbodyfontsize=12pt
+\ifdefined\localbodyfontsize \else \newdimen\localbodyfontsize \fi \localbodyfontsize =\globalbodyfontsize
+\ifdefined\bodyfontsize \else \newdimen\bodyfontsize \fi \bodyfontsize =\globalbodyfontsize
%D When we assign for instance 12pt to a \DIMENSION\ register the \type {\the}'d
%D value comes out as 12.0pt, which is often not the way users specify the bodyfont
@@ -411,22 +412,22 @@
\installcorenamespace{fontnormalizedbody}
-\def\normalizebodyfontsize#macro#body%
+\permanent\protected\def\normalizebodyfontsize#macro#body%
{\expandafter\let\expandafter#macro\csname\??fontnormalizedbody\number\dimexpr#body\endcsname
- \ifx#macro\relax
+ \ifrelax#macro%
\normalizebodyfontsize_indeed#macro{#body}%
\fi}
\def\normalizebodyfontsize_indeed#macro#body%
{\edef#macro{\clf_nbfs\dimexpr#body\relax}%
- \expandafter\glet\csname\??fontnormalizedbody\number\dimexpr#body\endcsname#macro}
+ \gletcsname\??fontnormalizedbody\number\dimexpr#body\endcsname#macro}
-\def\thenormalizedbodyfontsize#body%
+\permanent\def\thenormalizedbodyfontsize#body%
{\clf_nbfs\dimexpr#body\relax}
-\edef\normalizedglobalbodyfontsize{\thenormalizedbodyfontsize\bodyfontsize}
-\edef\normalizedlocalbodyfontsize {\thenormalizedbodyfontsize\bodyfontsize}
-\edef\normalizedbodyfontsize {\thenormalizedbodyfontsize\bodyfontsize}
+\mutable\edef\normalizedglobalbodyfontsize{\thenormalizedbodyfontsize\bodyfontsize}
+\mutable\edef\normalizedlocalbodyfontsize {\thenormalizedbodyfontsize\bodyfontsize}
+\mutable\edef\normalizedbodyfontsize {\thenormalizedbodyfontsize\bodyfontsize}
%D \macros
%D {mapfontsize}
@@ -457,11 +458,8 @@
\installcorenamespace{mappedfontsize}
-\unexpanded\def\mapfontsize
- {\dodoubleargument\font_basics_map_fontsize}
-
-\def\font_basics_map_fontsize[#from][#to]%
- {\setvalue{\??mappedfontsize\the\dimexpr#from\relax}{#to}}
+\permanent\tolerant\protected\def\mapfontsize[#from]#spacer[#to]%
+ {\ifarguments\or\or\defcsname\??mappedfontsize\the\dimexpr#from\relax\endcsname{#to}\fi}
\def\font_basics_set_mapped_fontsize#from%
{\ifcsname\??mappedfontsize\the\dimexpr#from\relax\endcsname
@@ -499,8 +497,6 @@
\ifx\p_font_rscale\v!auto
\let\p_font_rscale\plusone
\font_helpers_check_relative_font_id
- \else
- \let\relativefontid\minusone
\fi}
\def\font_rscale_xx#style%
@@ -518,7 +514,7 @@
\fi}
\def\font_helpers_register_fontbody#body%
- {\expandafter\let\csname\??fontbodyknown#body\endcsname\empty}
+ {\letcsname\??fontbodyknown#body\endcsname\empty}
%D \macros
%D {definefontstyle,definefontsize,definefontalternative}
@@ -551,14 +547,11 @@
\def\font_helpers_process_size_list #command{\def\m_font_size_command {#command}\the\t_font_size_commands}
\def\font_helpers_process_alternative_list#command{\def\m_font_alternative_command{#command}\the\t_font_alternative_commands}
-\def\font_helpers_register_style #style{\expandafter\let\csname\??fontstyleknown #style\endcsname\empty}
-\def\font_helpers_register_size #size{\expandafter\let\csname\??fontsizeknown #size\endcsname\empty}
-\def\font_helpers_register_alternative#alternative{\expandafter\let\csname\??fontalternativeknown#alternative\endcsname\empty}
-
-\unexpanded\def\definefontstyle
- {\dodoubleargument\font_basics_define_fontstyle}
+\def\font_helpers_register_style #style{\letcsname\??fontstyleknown #style\endcsname\empty}
+\def\font_helpers_register_size #size{\letcsname\??fontsizeknown #size\endcsname\empty}
+\def\font_helpers_register_alternative#alternative{\letcsname\??fontalternativeknown#alternative\endcsname\empty}
-\def\font_basics_define_fontstyle[#commands][#style]% style: rm ss tt ...
+\permanent\protected\def\definefontstyle[#commands]#spacer[#style]% style: rm ss tt ...
{\ifcsname\??fontstyleknown#style\endcsname \else % can be delayed till used (cg, hw)
\font_helpers_register_style{#style}%
\toksapp\t_font_style_commands{\m_font_style_command{#style}}%
@@ -566,24 +559,24 @@
\processcommalist[#commands]{\font_basics_define_fontstyle_indeed{#style}}}
\def\font_basics_define_fontstyle_indeed#style#command%
- {\setvalue{\??fontshortstyle#command}{#style}%
- \setvalue{\??fontstyle #command}{\csname#style\endcsname}}
+ {\defcsname\??fontshortstyle#command\endcsname{#style}%
+ \defcsname\??fontstyle #command\endcsname{\csname#style\endcsname}}
-\unexpanded\def\definefontsize[#size]%
+\permanent\protected\def\definefontsize[#size]%
{\ifcsname\??fontsizeknown#size\endcsname \else
\font_helpers_register_size{#size}%
\toksapp\t_font_size_commands{\m_font_size_command{#size}}%
\fi
\font_helpers_check_fontname_combinations}
-\unexpanded\def\definefontalternative[#alternative]%
+\permanent\protected\def\definefontalternative[#alternative]%
{\ifcsname\??fontalternativeknown#alternative\endcsname \else
\font_helpers_register_alternative{#alternative}%
\toksapp\t_font_alternative_commands{\m_font_alternative_command{#alternative}}%
\fi
\font_helpers_check_fontname_combinations}
-\unexpanded\def\font_helpers_check_fontname_combinations % we need to split math and text here ... todo (math only has mr and mb)
+\protected\def\font_helpers_check_fontname_combinations % we need to split math and text here ... todo (math only has mr and mb)
{\font_helpers_process_style_list\font_helpers_check_fontname_combinations_s}
\def\font_helpers_check_fontname_combinations_s#style%
@@ -619,7 +612,7 @@
\def\font_basics_check_text_bodyfont_step#whatever#body% size can be empty (checking needed as \bf is already defined)
{\ifcsname#whatever\endcsname\else
- \setugvalue{#whatever}{#body}%
+ \permanent\setugvalue{#whatever}{#body}%
\fi}
\def\font_basics_check_text_bodyfont#style#alternative#size% size can be empty (checking needed as \bf is already defined)
@@ -663,27 +656,28 @@
% 4:x{\definedfont[Serif sa 4]x}\par
% 5:x{\definedfont[Serif sa 5]x}\par
-\def\safontscale{\number\dimexpr\v_font_size_absolute\relax}
-\def\mofontscale{\number\dimexpr\font_basics_set_mapped_fontsize\v_font_size_absolute\relax}
+\permanent\def\safontscale{\number\dimexpr\v_font_size_absolute\relax}
+\permanent\def\mofontscale{\number\dimexpr\font_basics_set_mapped_fontsize\v_font_size_absolute\relax}
-\let\somefontname\s!unknown
-\let\somefontspec\s!unknown
-\let\somefontsize\zerocount
+\mutable\let\somefontname \s!unknown
+\mutable\let\somefontspec \s!unknown
+\mutable\let\somefontfile \s!unknown
+\mutable\let\somefontsize \zerocount
+\mutable\let\somefontsizex\empty
+\mutable\let\somefontsizey\empty
\newcount\scaledfontmode % also used at the lua end
\newcount\scaledfontsize % also used at the lua end
\newcount\lastfontid % also used at the lua end / tex end
\newtoks \everydefinefont
-\let\relativefontid\minusone % todo, not yet used
+\aliased\let\c_font_feature_inheritance_fontnone \zerocount % none
+\aliased\let\c_font_feature_inheritance_fontonly \plusone % fontonly
+\aliased\let\c_font_feature_inheritance_classonly \plustwo % classonly
+\aliased\let\c_font_feature_inheritance_fontfirst \plusthree % fontfirst
+\aliased\let\c_font_feature_inheritance_classfirst\plusfour % classfirst
-\let\c_font_feature_inheritance_fontnone \zerocount % none
-\let\c_font_feature_inheritance_fontonly \plusone % fontonly
-\let\c_font_feature_inheritance_classonly \plustwo % classonly
-\let\c_font_feature_inheritance_fontfirst \plusthree % fontfirst
-\let\c_font_feature_inheritance_classfirst\plusfour % classfirst
-
-\let\c_font_feature_inheritance_default \c_font_feature_inheritance_fontfirst
+\aliased\let\c_font_feature_inheritance_default \c_font_feature_inheritance_fontfirst
\setnewconstant\c_font_feature_inheritance_mode \c_font_feature_inheritance_default
@@ -692,10 +686,36 @@
\newconditional\c_font_body_scale
\newfraction \f_font_body_scale
-\unexpanded\def\font_helpers_low_level_define#specification#csname%
+\newconditional\c_font_compact
+\newcount \c_font_scaled_glyph_scale
+
+\immutable\dimensiondef\d_font_scaled_default 10pt
+
+\newcount\c_font_future_glyph_scale
+
+% todo: move all to lua: use localcall for resolving filename
+
+\newcount\c_font_future_glyph_scale
+\newcount\c_font_scaled_font_mode_saved
+\newcount\c_font_scaled_points
+
+\mutable\let\somefontspec \empty
+\mutable\let\lastrawfontcall \relax
+\mutable\let\lastglobalrawfontcall\relax
+
+\protected\def\font_helpers_low_level_define
+ {\ifconditional\c_font_compact
+ \expandafter\font_helpers_low_level_define_compact
+ \else
+ \expandafter\font_helpers_low_level_define_normal
+ \fi}
+
+\protected\def\font_helpers_low_level_define_normal#specification#csname%
{% we can now set more at the lua end
\glet\somefontname\defaultfontfile
\let\somefontsize\empty
+ \let\somefontsizex\empty
+ \let\somefontsizey\empty
\clf_definefont_one{\detokenize\expandafter{\normalexpanded{#specification}}}% the escapestring catches at \somedimen
% sets \scaledfontmode and \somefontname and \somefontsize
\ifcase\fontface\relax
@@ -735,6 +755,8 @@
\fi
\relax
\d_font_scaled_font_size\v_font_size_relative\d_font_scaled_font_size
+ \relax
+ %
\ifconditional\c_font_auto_size
\font_helpers_check_body_scale\fontsize
\ifconditional\c_font_body_scale
@@ -747,6 +769,7 @@
\else
\d_font_scaled_text_face\textface
\fi
+ %
\edef\somefontspec{at \number\d_font_scaled_font_size sp}%
\edef\somefontfile{\truefontname\somefontname}%
\ifx\somefontfile\s!unknown
@@ -755,30 +778,46 @@
\font_helpers_update_font_parameters
\font_helpers_update_font_class_parameters
%\writestatus{fonts}{low level define: #csname/\somefontfile/\number\d_font_scaled_font_size/\fontface/\number\d_font_scaled_text_face}%
+% \clf_definefont_two
+% \ifempty\fontclass\s!false\else\s!true\fi
+% {#csname}%
+% {\somefontfile}%
+% \d_font_scaled_font_size
+% \c_font_feature_inheritance_mode
+% {\m_font_class_features}%
+% {\m_font_features}%
+% {\m_font_class_fallbacks}%
+% {\m_font_fallbacks}%
+% \fontface
+% \d_font_scaled_text_face
+% {\m_font_class_goodies}%
+% {\m_font_goodies}%
+% {\m_font_class_designsize}%
+% {\m_font_designsize}%
+% \scaledfontmode
\clf_definefont_two
- \ifx\fontclass\empty\s!false\else\s!true\fi
+ \ifempty\fontclass\s!false\else\s!true\fi
{#csname}%
- {\somefontfile}%
+ \somefontfile
\d_font_scaled_font_size
\c_font_feature_inheritance_mode
- {\m_font_class_features}%
- {\m_font_features}%
- {\m_font_class_fallbacks}%
- {\m_font_fallbacks}%
+ \m_font_class_features
+ \m_font_features
+ \m_font_class_fallbacks
+ \m_font_fallbacks
\fontface
\d_font_scaled_text_face
- \relativefontid
- {\m_font_class_goodies}%
- {\m_font_goodies}%
- {\m_font_class_designsize}%
- {\m_font_designsize}%
+ \m_font_class_goodies
+ \m_font_goodies
+ \m_font_class_designsize
+ \m_font_designsize
\scaledfontmode
\relax
\ifcase\scaledfontsize
%\scaledfontsize\plusone
\let\somefontspec\empty
\let\lastrawfontcall\relax
- \expandafter\let\csname#csname\endcsname\relax
+ \mutable\letcsname#csname\endcsname\relax
\else
\edef\somefontspec{at \number\scaledfontsize sp}% we need the resolved designsize (for fallbacks)
\expandafter\let\expandafter\lastrawfontcall\csname#csname\endcsname
@@ -786,6 +825,135 @@
\fi
\c_font_feature_inheritance_mode\c_font_feature_inheritance_default}
+\protected\def\font_helpers_low_level_define_compact#specification#csname%
+ {% we can now set more at the lua end
+ \glet\somefontname\defaultfontfile
+ \let\somefontsize\empty
+ \let\somefontsizex\empty
+ \let\somefontsizey\empty
+ \clf_definefont_one{\detokenize\expandafter{\normalexpanded{#specification}}}% the escapestring catches at \somedimen
+ % sets \scaledfontmode and \somefontname and \somefontsize
+ \ifcase\fontface\relax
+ % \let\v_font_size_absolute\textface % fontbody
+ \or
+ \let\v_font_size_absolute\textface
+ \or
+ \let\v_font_size_absolute\scriptface
+ \or
+ \let\v_font_size_absolute\scriptscriptface
+ \or
+ \let\v_font_size_absolute\xtextface
+ \or
+ \let\v_font_size_absolute\xxtextface
+ \fi
+ %
+ \ifcase\scaledfontmode\relax
+ % none, avoid the designsize if possible
+ \d_font_scaled_font_size-\plusthousand\scaledpoint
+ \or
+ % at
+ \d_font_scaled_font_size\somefontsize
+ \or
+ % sa
+ \d_font_scaled_font_size\v_font_size_absolute\relax
+ \d_font_scaled_font_size\currentfontbodysize\d_font_scaled_font_size % uses \somefontsize set by lua
+ \or
+ % mo
+ \d_font_scaled_font_size\font_basics_set_mapped_fontsize\v_font_size_absolute
+ \d_font_scaled_font_size\currentfontbodysize\d_font_scaled_font_size
+ \or
+ % scaled, don't use this one as it's unpredictable
+ \d_font_scaled_font_size-\somefontsize\scaledpoint
+ \else % ht cp
+ % experiment, yet undocumented
+ \d_font_scaled_font_size\somefontsize
+ \fi
+ \relax
+ \d_font_scaled_font_size\v_font_size_relative\d_font_scaled_font_size
+ \relax
+ %
+ \ifconditional\c_font_auto_size
+ \font_helpers_check_body_scale\fontsize
+ \ifconditional\c_font_body_scale
+ \d_font_scaled_font_size\f_font_body_scale\d_font_scaled_font_size
+ \d_font_scaled_text_face\f_font_body_scale\dimexpr\textface\relax
+ \else
+ \d_font_scaled_font_size\f_font_body_scale
+ \d_font_scaled_text_face\textface
+ \fi
+ \else
+ \d_font_scaled_text_face\textface
+ \fi
+ %
+ \ifnum\c_font_scaled_font_mode_saved>\plusfour
+ \c_font_scaled_font_mode_saved\scaledfontmode
+ \scaledfontmode\zerocount
+ \fi
+ \c_font_future_glyph_scale\numexpr\plushundred*\d_font_scaled_font_size/\maxcard\relax
+ \glyphscale\numexpr\plushundred*\d_font_scaled_font_size/\maxcard\relax % needed ? for math i guess
+ % \d_font_scaled_font_size\d_font_scaled_default
+ % \d_font_scaled_text_face\d_font_scaled_default
+ %
+ \edef\somefontspec{at \number\d_font_scaled_font_size sp}%
+ % this has to happen at the tex end ...
+ \edef\somefontfile{\truefontname\somefontname}%
+ \ifx\somefontfile\s!unknown
+ \edef\somefontfile{\defaultfontfile}%
+ \fi
+ \font_helpers_update_font_parameters
+ \font_helpers_update_font_class_parameters
+ % ... till here
+ %\writestatus{fonts}{low level define: #csname/\somefontfile/\number\d_font_scaled_font_size/\fontface/\number\d_font_scaled_text_face}%
+ \clf_definefont_two
+ \ifempty\fontclass\s!false\else\s!true\fi
+ {#csname}%
+ \somefontfile
+ \d_font_scaled_font_size
+ \c_font_feature_inheritance_mode
+ \m_font_class_features
+ \m_font_features
+ \m_font_class_fallbacks
+ \m_font_fallbacks
+ \fontface
+ \d_font_scaled_default
+ \m_font_class_goodies
+ \m_font_goodies
+ \m_font_class_designsize
+ \m_font_designsize
+ \scaledfontmode
+ \relax
+ \ifcase\scaledfontsize
+ %\scaledfontsize\plusone
+ \let\somefontspec\empty
+ \let\lastrawfontcall\relax
+ \mutable\letcsname#csname\endcsname\relax
+ \else
+ \edef\somefontspec{at \number\scaledfontsize sp}% we need the resolved designsize (for fallbacks)
+ %
+ \glyphscale
+ \ifnum\c_font_scaled_font_mode_saved>\plusfour
+ \numexpr\plusthousand*\dimexpr\d_font_scaled_default\relax/\c_font_scaled_points\relax
+ \else
+ \c_font_future_glyph_scale
+ \fi
+ \ifempty\somefontsizex\else
+ \edef\somefontsizex{\glyphxscale\somefontsizex\relax}% todo: inserts relax
+ \fi
+ \ifempty\somefontsizey\else
+ \edef\somefontsizey{\glyphyscale\somefontsizey\relax}%
+ \fi
+ \ifempty\fontclass\else\global\fi
+ \mutable\protected\edefcsname#csname\endcsname
+ {\setfontid\the\fontid\csname#csname\endcsname\relax
+ \glyphscale\the\glyphscale\relax
+ \somefontsizex
+ \somefontsizey}%
+ %
+ \expandafter\let\expandafter\lastrawfontcall\csname#csname\endcsname
+ \the\everydefinefont
+ \fi
+ \c_font_feature_inheritance_mode\c_font_feature_inheritance_default}
+
\def\font_helpers_check_body_scale#fontsize% gets character (x xx a etc)
{\ifcsname\??fontenvironments\fontclass\fontbody#fontsize\endcsname
\expandafter\let\expandafter\f_font_body_scale\lastnamedcs
@@ -810,14 +978,6 @@
\settrue\c_font_body_scale
\fi}
-%D The following macros are used at the \LUA\ end. Watch the \type {\normal}
-%D hackery: this makes the mkvi parser happy.
-
-% \normaldef\fntsetdefname {\glet\somefontname\defaultfontfile} % do before calling
-% \normaldef\fntsetnopsize {\let\somefontsize\empty} % do before calling
-% \normaldef\fntsetsomename{\normalgdef\somefontname} % takes argument
-% \normaldef\fntsetsomesize{\normaldef\somefontsize} % takes argument
-
\newif\ifskipfontcharacteristics \skipfontcharacteristicstrue
\tracingfonts\plussix % <id: name @ size>
@@ -825,7 +985,7 @@
%D When fontclasses are used, we define the font global, since namespaces are
%D used. Otherwise we parse the specs each time.
-\let\fontfile\s!unknown
+\mutable\let\fontfile\s!unknown
%D Relatively new:
@@ -867,7 +1027,7 @@
\ifdefined\everyfont \else \newtoks\everyfont \fi
\ifdefined\everyfontswitch \else \newtoks\everyfontswitch \fi
-\def\setfontcharacteristics{\the\everyfont}
+\permanent\def\setfontcharacteristics{\the\everyfont}
% \appendtoks
% \ifcase\c_fonts_auto_language
@@ -895,23 +1055,20 @@
%D
%D The implementation looks as follows:
-\unexpanded\def\definefont % [name][spec][1.6 | line=10pt | setup_id]
- {\dotripleempty\font_basics_define_font}
-
-\def\font_basics_define_font
- {\ifthirdargument
+\permanent\tolerant\protected\def\definefont[#1]#*[#2]#*[#3]% [name][spec][1.6 | line=10pt | setup_id]
+ {\ifparameter#3\or
\expandafter\font_basics_define_font_a
\else
\expandafter\font_basics_define_font_b
- \fi}
+ \fi[#1][#2][#3]}
\def\font_basics_define_font_a[#name][#specification][#settings]% [name][spec][1.6 | line=10pt | setup_id]
{\doifelsesetups{#settings}%
- {\setuvalue{#name}{\font_basics_define_font_with_setups {#name}{#specification}{#settings}}}
- {\setuvalue{#name}{\font_basics_define_font_with_parameters{#name}{#specification}{#settings}}}}
+ {\mutable\protected\defcsname#name\endcsname{\font_basics_define_font_with_setups {#name}{#specification}{#settings}}}
+ {\mutable\protected\defcsname#name\endcsname{\font_basics_define_font_with_parameters{#name}{#specification}{#settings}}}}
\def\font_basics_define_font_b[#name][#specification][#dummy]%
- {\setuvalue{#name}{\font_basics_define_font_without_parameters{#name}{#specification}}}
+ {\mutable\protected\defcsname#name\endcsname{\font_basics_define_font_without_parameters{#name}{#specification}}}
\def\font_basics_define_font_with_parameters#name#specification#settings%
{\font_basics_define_font_without_parameters{#name}{#specification}%
@@ -925,22 +1082,15 @@
%D Beware, in the frozen variants no settings are supported yet, but that might happen
%D some day.
-\unexpanded\def\definefrozenfont
- {\dotripleempty\font_basics_define_frozen_font}
-
-% \def\font_basics_define_frozen_font[#name][#specification][#settings]%
-% {\begingroup
-% \font_basics_define_font[#name][#specification][#settings]%
-% \csname#name\endcsname
-% \expandafter\expandafter\expandafter\endgroup\expandafter\let\csname#name\endcsname\lastrawfontcall}
-
-\def\font_basics_define_frozen_font[#name][#specification][#settings]%
- {\begingroup
- \font_basics_define_font[#name][#specification][#settings]%
- \csname#name\endcsname
- \glet\lastglobalrawfontcall\lastrawfontcall
- \endgroup
- \expandafter\let\csname#name\endcsname\lastglobalrawfontcall}
+\permanent\tolerant\protected\def\definefrozenfont[#name]#spacer[#specification]#spacer[#settings]%
+ {\ifparameter#name\or
+ \begingroup
+ \definefont[#name][#specification][#settings]%
+ \csname#name\endcsname
+ \glet\lastglobalrawfontcall\lastrawfontcall
+ \endgroup
+ \aliased\letcsname#name\endcsname\lastglobalrawfontcall
+ \fi}
%D The instance namespace protection makes the switch local so that we can redefine a
%D logical name and/or change the size in between.
@@ -954,7 +1104,7 @@
\newconditional\c_font_auto_size \settrue\c_font_auto_size
-\let\lastfontidentifier\empty
+\mutable\let\lastfontidentifier\empty
\def\v_font_identifier_basic{\??fontinstancebasic \lastfontidentifier-\fontsize-\fontface}
\def\v_font_identifier_class{\??fontinstanceclass\fontclass-\lastfontidentifier-\fontsize-\fontface}
@@ -976,7 +1126,7 @@
\the\everyfontswitch
\let\v_font_identifier_basic\v_font_identifier_basic_saved}
-\unexpanded\def\font_helpers_trigger#identifier% make a traced variant
+\protected\def\font_helpers_trigger#identifier% make a traced variant
{\edef\lastfontidentifier{#identifier}%
\ifcsname\v_font_identifier_class\endcsname
% \writestatus{fonts}{trigger: reusing \v_font_identifier_class}%
@@ -1016,7 +1166,7 @@
\installcorenamespace{fontenvironments}
-\def\currentfontbodysize % gets number (the normal sa 1 etc)
+\permanent\def\currentfontbodysize % gets number (the normal sa 1 etc)
{\ifcsname\??fontenvironments\fontclass\s!default\somefontsize\endcsname
\lastnamedcs
\orelse\ifcsname\??fontenvironments\s!default\somefontsize\endcsname
@@ -1025,7 +1175,7 @@
\somefontsize
\fi}
-\def\currentfontbodyscale % gets character (x xx a etc)
+\permanent\def\currentfontbodyscale % gets character (x xx a etc)
{\csname\??fontenvironments
\ifcsname\??fontenvironments\fontclass\s!default\fontsize\endcsname\fontclass\s!default\fontsize\orelse
\ifcsname\??fontenvironments \s!default\fontsize\endcsname \s!default\fontsize\orelse
@@ -1041,7 +1191,7 @@
\ifcsname\??fontenvironments \s!default\s!text \endcsname\lastnamedcs\else
\csname\??fontenvironments \s!default \endcsname \fi}
-\def\currentfontscale % used in default definition
+\permanent\def\currentfontscale % used in default definition
{\csname\??fontenvironments
\ifcsname\??fontenvironments\fontclass\s!default\xfontsize\endcsname\fontclass\s!default\fontsize\orelse
\ifcsname\??fontenvironments \s!default\xfontsize\endcsname \s!default\fontsize\orelse
@@ -1065,7 +1215,7 @@
\newconstant\currentxfontsize
-\def\xfontsize{\ifcase\currentxfontsize\fontsize\or\s!x\else\s!xx\fi}
+\permanent\def\xfontsize{\ifcase\currentxfontsize\fontsize\or\s!x\else\s!xx\fi}
%D Now we enter the area of font switching. The switching mechanism has to take care
%D of several situations, like:
@@ -1076,7 +1226,7 @@
%D \item smaller and even more smaller alternatives (super- and subscripts)
%D \stopitemize
%D
-%D \TEX\ offers a powerfull family mechanism for super- and subscripts in math mode.
+%D \TEX\ offers a powerful family mechanism for super- and subscripts in math mode.
%D In text mode however, we don't use families for the smaller alternatives, and
%D therefore have to take care of it otherwise.
%D
@@ -1154,7 +1304,7 @@
\letvalue\??fontenvironments\empty % so we default to empty
-\def\bodyfontvariable#parameter%
+\permanent\def\bodyfontvariable#parameter%
{\csname\??fontenvironments
\ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname\fontclass\normalizedbodyfontsize#parameter\orelse
\ifcsname\??fontenvironments\fontclass #parameter\endcsname\fontclass #parameter\orelse
@@ -1168,7 +1318,7 @@
\ifcsname\??fontenvironments \normalizedbodyfontsize#parameter\endcsname\lastnamedcs\orelse
\ifcsname\??fontenvironments\s!default #parameter\endcsname\lastnamedcs\fi}
-\def\bodyfontsizevariable#size#parameter%
+\permanent\def\bodyfontsizevariable#size#parameter%
{\csname\??fontenvironments
\ifcsname\??fontenvironments\fontclass#size#parameter\endcsname\fontclass#size#parameter\orelse
\ifcsname\??fontenvironments\fontclass #parameter\endcsname\fontclass #parameter\orelse
@@ -1182,9 +1332,9 @@
\ifcsname\??fontenvironments #size#parameter\endcsname\lastnamedcs\orelse
\ifcsname\??fontenvironments\s!default #parameter\endcsname\lastnamedcs\fi}
-\def\bodyfontinterlinespace{\bodyfontvariable\c!interlinespace} % used elsewhere
+\permanent\def\bodyfontinterlinespace{\bodyfontvariable\c!interlinespace} % used elsewhere
-\def\bodyfontdimension#class#size#parameter#body%
+\permanent\def\bodyfontdimension#class#size#parameter#body%
{\the\dimexpr
\ifcsname\??fontenvironments #class#size#parameter\endcsname \lastnamedcs \orelse
\ifcsname\??fontenvironments#class\s!default#parameter\endcsname \lastnamedcs\dimexpr#body\relax\orelse % factor
@@ -1192,36 +1342,35 @@
\lastnamedcs\dimexpr#body\relax\fi % factor
\relax}
-\unexpanded\def\definebodyfontenvironment
- {\dotripleempty\font_basics_define_body_font_environment}
-
-\let\setupbodyfontenvironment\definebodyfontenvironment
-
\installcorenamespace{fontenvironmentknown}
\def\font_helpers_register_environment#class#body%
- {\expandafter\let\csname\??fontenvironmentknown#class#body\endcsname\empty}
+ {\letcsname\??fontenvironmentknown#class#body\endcsname\empty}
\newmacro\m_font_body
\newmacro\m_font_body_normalized
-\def\font_basics_define_body_font_environment
- {\ifthirdargument
- \singleexpandafter\font_basics_define_body_font_environment_class
- \orelse\ifsecondargument
- \expandafter\font_basics_define_body_font_environment_empty
- \else
+\permanent\tolerant\protected\def\definebodyfontenvironment[#1]#*[#2]#*[#3]% todo
+ {\ifarguments
\expandafter\font_basics_define_body_font_environment_unset
- \fi}
+ \or
+ \expandafter\font_basics_define_body_font_environment_unset
+ \or
+ \expandafter\font_basics_define_body_font_environment_empty
+ \or
+ \expandafter\font_basics_define_body_font_environment_class
+ \fi[#1][#2][#3]}
+
+\aliased\let\setupbodyfontenvironment\definebodyfontenvironment
%D First we handle the class specific case. Beware: you can change values before
%D a bodyfont is loaded but changing them afterwards can be sort of tricky as
%D values are not consulted afterwards.
-\def\processbodyfontenvironmentlist#1% no \unexpanded as then we cannot use it in alignments
+\permanent\def\processbodyfontenvironmentlist#1% no \protected as then we cannot use it in alignments (still?)
{\clf_processbodyfontsizes{\strippedcsname#1}}
-\def\bodyfontenvironmentlist
+\permanent\def\bodyfontenvironmentlist
{\clf_getbodyfontsizes}
\def\font_basics_define_body_font_environment_class[#class][#body][#settings]%
@@ -1371,17 +1520,22 @@
% [class] [10pt,11pt] [settings] == [name] [rm] [settings]
% [class] [10pt,11pt] [name] == [10pt,11pt] [rm] [name]
-\unexpanded\def\definebodyfont
- {\doquadrupleempty\font_basics_define_body_font}
-
-\def\font_basics_define_body_font[#1][#2][#3][#4]%
- {\iffourthargument
+\permanent\tolerant\protected\def\definebodyfont[#1]#*[#2]#*[#3]#*[#4]%
+ {\ifarguments
+ \or
+ \font_basics_define_body_font[#1][\s!rm][]%
+ \or
+ \font_basics_define_body_font[#1][\s!rm][#2]%
+ \or
+ \font_basics_define_body_font[#1][#2][#3]%
+ \or
\processcommacommand[#1]{\font_basics_define_body_font_class_given[#2][#3][#4]}%
- \else
- \font_basics_define_body_font_class_known[#1][#2][#3]%
\fi}
-\def\font_basics_define_body_font_class_given[#1][#2][#3]#4%
+\protected\def\font_basics_define_body_font[#whatever]%
+ {\doifelsenumber{#whatever}\font_basics_define_body_font_body\font_basics_define_body_font_name[#whatever]}
+
+\protected\def\font_basics_define_body_font_class_given[#1][#2][#3]#4%
{\push_macro_fontclass
\doifelse{#4}\s!default
{\let\fontclass\empty}
@@ -1389,28 +1543,7 @@
\definebodyfont[#1][#2][#3]%
\pop_macro_fontclass}
-\def\font_basics_define_body_font_class_known
- {\ifthirdargument
- \singleexpandafter\font_basics_define_body_font_a
- \orelse\ifsecondargument
- \expandafter\font_basics_define_body_font_b
- \else
- \expandafter\font_basics_define_body_font_c
- \fi}
-
-\unexpanded\def\font_basics_define_body_font_b[#whatever][#specification][#dummy]% body|identifier defs|identifier
- {\font_basics_define_body_font_a[#whatever][\s!rm][#specification]}
-
-\unexpanded\def\font_basics_define_body_font_c[#whatever][#dummya][#dummyb]% body|identifier
- {\font_basics_define_body_font_a[#whatever][\s!rm][]}
-
-\unexpanded\def\font_basics_define_body_font_a[#whatever]%
- {\doifelsenumber{#whatever}%
- \font_basics_define_body_font_body
- \font_basics_define_body_font_name
- [#whatever]}
-
-\unexpanded\def\font_basics_define_body_font_body[#body][#style][#specification]%
+\protected\def\font_basics_define_body_font_body[#body][#style][#specification]%
{\ifcondition\validassignment{#specification}%
\expandafter\font_basics_define_body_font_body_assignment
\else
@@ -1418,7 +1551,7 @@
\fi
[#body][#style][#specification]}%
-\unexpanded\def\font_basics_define_body_font_name[#name][#style][#specification]%
+\protected\def\font_basics_define_body_font_name[#name][#style][#specification]%
{\ifcondition\validassignment{#specification}%
\expandafter\font_basics_define_body_font_name_assignment
\else
@@ -1426,41 +1559,41 @@
\fi
[#name][#style][#specification]}%
-\unexpanded\def\font_basics_define_body_font_body_assignment[#bodylist][#stylelist][#assignments]%
+\protected\def\font_basics_define_body_font_body_assignment[#bodylist][#stylelist][#assignments]%
{\processcommalist[#bodylist]{\font_basics_define_body_font_body_assignment_a{#stylelist}{#assignments}}}
-\unexpanded\def\font_basics_define_body_font_body_assignment_a#stylelist#assignments#body%
+\protected\def\font_basics_define_body_font_body_assignment_a#stylelist#assignments#body%
{\normalizebodyfontsize\m_font_asked_body{#body}%
% normally we define quite a lot in advance, i.e global defs
\font_helpers_check_bodyfont_environment\m_font_asked_body\m_font_asked_body % !!
\processcommalist[#stylelist]{\font_basics_define_body_font_body_assignment_b{#assignments}}}
-\unexpanded\def\font_basics_define_body_font_body_assignment_b#assignments#style%
+\protected\def\font_basics_define_body_font_body_assignment_b#assignments#style%
{\edef\m_font_asked_style{#style}%
\processcommalist[#assignments]\font_basics_define_body_font_defs}
-\unexpanded\def\font_basics_define_body_font_defs
- {\ifx\fontclass\empty
+\protected\def\font_basics_define_body_font_defs
+ {\ifempty\fontclass
\expandafter\font_basics_define_body_font_defs_nop
\else
\expandafter\font_basics_define_body_font_defs_yes
\fi}
-\unexpanded\def\font_basics_define_body_font_defs_yes_normal#assignment%
+\protected\def\font_basics_define_body_font_defs_yes_normal#assignment%
{\ifx\m_font_asked_style\s!mm
\expandafter\font_basics_define_body_font_yes_mm
\else
\expandafter\font_basics_define_body_font_yes_xx
\fi[#assignment]}
-\unexpanded\def\font_basics_define_body_font_defs_nop_normal#assignment%
+\protected\def\font_basics_define_body_font_defs_nop_normal#assignment%
{\ifx\m_font_asked_style\s!mm
\expandafter\font_basics_define_body_font_nop_mm
\else
\expandafter\font_basics_define_body_font_nop_xx
\fi[#assignment]}
-\unexpanded\def\font_basics_define_body_font_defs_yes_traced#assignment%
+\protected\def\font_basics_define_body_font_defs_yes_traced#assignment%
{\writestatus\m!fonts{[\fontclass] [\m_font_asked_body] [\m_font_asked_style] [#assignment]}%
\ifx\m_font_asked_style\s!mm
\expandafter\font_basics_define_body_font_yes_mm
@@ -1468,7 +1601,7 @@
\expandafter\font_basics_define_body_font_yes_xx
\fi[#assignment]}
-\unexpanded\def\font_basics_define_body_font_defs_nop_traced#assignment%
+\protected\def\font_basics_define_body_font_defs_nop_traced#assignment%
{\writestatus\m!fonts{[\fontclass] [\m_font_asked_body] [\m_font_asked_style] [#assignment]}%
\ifx\m_font_asked_style\s!mm
\expandafter\font_basics_define_body_font_nop_mm
@@ -1488,29 +1621,29 @@
%D the style and the rest is a size, although in practice one will seldom define the
%D size directly. We might even drop that as it gives faster code.
-\unexpanded\def\font_basics_define_body_font_nop_xx[#one#two#rest=#value]% local
+\protected\def\font_basics_define_body_font_nop_xx[#one#two#rest=#value]% local
{\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi
- \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest-0\endcsname\undefined
- \unexpanded\expandafter\normaledef\csname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest-0\endcsname
+ \letcsname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest-0\endcsname\undefined
+ \protected\edefcsname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest-0\endcsname
{\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\noexpand\font_rscale_xx{\m_font_asked_style}}{\m_font_asked_body}{\normalunexpanded{#value}}}%
- \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest-4\endcsname\undefined
- \unexpanded\expandafter\normaledef\csname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest-4\endcsname
+ \letcsname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest-4\endcsname\undefined
+ \protected\edefcsname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest-4\endcsname
{\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\noexpand\font_rscale_xx{\m_font_asked_style}}{\m_font_asked_body}{\normalunexpanded{#value}}}%
- \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest-5\endcsname\undefined
- \unexpanded\expandafter\normaledef\csname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest-5\endcsname
+ \letcsname\??fontinstanceclass\m_font_asked_body-\m_font_asked_style-#one#two-#rest-5\endcsname\undefined
+ \protected\edefcsname\??fontinstanceready\m_font_asked_body-\m_font_asked_style-#one#two-#rest-5\endcsname
{\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest}{\noexpand\font_rscale_xx{\m_font_asked_style}}{\m_font_asked_body}{\normalunexpanded{#value}}}%
}
-\unexpanded\def\font_basics_define_body_font_yes_xx[#one#two#rest=#value]% global
+\protected\def\font_basics_define_body_font_yes_xx[#one#two#rest=#value]% global
{\ifcsname\m_font_asked_style#one#two#rest\endcsname\else\font_basics_check_fontname_combination\m_font_asked_style{#one#two}{#rest}\fi
- \expandafter\glet\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-1\endcsname\undefined
- \unexpanded\expandafter\normalxdef\csname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-0\endcsname
+ \gletcsname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-1\endcsname\undefined
+ \protected\xdefcsname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-0\endcsname
{\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest-0}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}%
- \expandafter\glet\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-2\endcsname\undefined
- \unexpanded\expandafter\normalxdef\csname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-4\endcsname
+ \gletcsname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-2\endcsname\undefined
+ \protected\xdefcsname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-4\endcsname
{\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest-4}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}%
- \expandafter\glet\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-3\endcsname\undefined
- \unexpanded\expandafter\normalxdef\csname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-5\endcsname
+ \gletcsname\??fontinstanceclass\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-3\endcsname\undefined
+ \protected\xdefcsname\??fontinstanceready\fontclass-\m_font_asked_body-\m_font_asked_style-#one#two-#rest-5\endcsname
{\font_helpers_trigger{\m_font_asked_body-\m_font_asked_style-#one#two#rest-5}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}%
}
@@ -1519,57 +1652,57 @@
%D Here the rest concerns rl or lr so in this case it is not a size specifier but
%D a directional one.
-\unexpanded\def\font_basics_define_body_font_nop_mm[#one#two#rest=#value]% local
+\protected\def\font_basics_define_body_font_nop_mm[#one#two#rest=#value]% local
{%\ifcsname\s!mm\endcsname\else\font_basics_check_fontname_combination\s!mm{#one#two}{#rest}\fi
- \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-1\endcsname\undefined
- % \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-2\endcsname\undefined
- % \expandafter\let\csname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-3\endcsname\undefined
- \unexpanded\expandafter\normaledef\csname\??fontinstanceready\m_font_asked_body-\s!mm-#one#two#rest\endcsname
+ \letcsname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-1\endcsname\undefined
+ % \letcsname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-2\endcsname\undefined
+ % \letcsname\??fontinstanceclass\m_font_asked_body-\s!mm-#one#two#rest-3\endcsname\undefined
+ \protected\xdefcsname\??fontinstanceready\m_font_asked_body-\s!mm-#one#two#rest\endcsname
{\font_helpers_trigger{\m_font_asked_body-\s!mm-#one#two#rest}{\noexpand\font_rscale_mm}{\m_font_asked_body}{\normalunexpanded{#value}}}%
}
% \writestatus{fonts}{define \m_asked_style\space nop: \expandafter\meaning\csname\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname}%
-\unexpanded\def\font_basics_define_body_font_yes_mm[#one#two#rest=#value]% global
+\protected\def\font_basics_define_body_font_yes_mm[#one#two#rest=#value]% global
{%\ifcsname\s!mm\endcsname\else\font_basics_check_fontname_combination\s!mm{#one#two}{#rest}\fi
- \expandafter\glet\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-1\endcsname\undefined
- % \expandafter\glet\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-2\endcsname\undefined
- % \expandafter\glet\csname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-3\endcsname\undefined
- \unexpanded\expandafter\normalxdef\csname\??fontinstanceready\fontclass-\m_font_asked_body-\s!mm-#one#two#rest\endcsname
+ \gletcsname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-1\endcsname\undefined
+ % \gletcsname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-2\endcsname\undefined
+ % \gletcsname\??fontinstanceclass\fontclass-\m_font_asked_body-\s!mm-#one#two#rest-3\endcsname\undefined
+ \protected\xdefcsname\??fontinstanceready\fontclass-\m_font_asked_body-\s!mm-#one#two#rest\endcsname
{\font_helpers_trigger{\m_font_asked_body-\s!mm-#one#two#rest}{\number\p_font_rscale}{\m_font_asked_body}{\normalunexpanded{#value}}}%
}
% \writestatus{fonts}{define \m_asked_style\space yes: \expandafter\meaning\csname\fontclass\m_font_asked_body\m_font_asked_style#one#two#rest\endcsname}%
-\unexpanded\def\font_basics_define_body_font_body_identifier[#bodylist][#stylelist][#name]%
+\protected\def\font_basics_define_body_font_body_identifier[#bodylist][#stylelist][#name]%
{\processcommalist[#bodylist]{\font_basics_define_body_font_body_identifier_a{#stylelist}{#name}}}
-\unexpanded\def\font_basics_define_body_font_body_identifier_a#stylelist#name#body%
+\protected\def\font_basics_define_body_font_body_identifier_a#stylelist#name#body%
{\normalizebodyfontsize\m_font_asked_body{#body}%
\font_helpers_check_bodyfont_environment\m_font_asked_body\m_font_asked_body % !!
\processcommalist[#stylelist]{\font_basics_define_body_font_body_identifier_b{#name}}}
-\unexpanded\def\font_basics_define_body_font_body_identifier_b#name#style%
+\protected\def\font_basics_define_body_font_body_identifier_b#name#style%
{\edef\m_font_asked_style{#style}%
%\writestatus\m!fonts{[\fontclass] [\m_font_asked_body] [\m_font_asked_style] => [#name]}%
\csname\??fontdefinitions#name:\m_font_asked_style\endcsname} % no checking
-\unexpanded\def\font_basics_define_body_font_name_assignment[#name][#stylelist][#assignments]%
+\protected\def\font_basics_define_body_font_name_assignment[#name][#stylelist][#assignments]%
{\processcommalist[#stylelist]{\font_basics_define_body_font_name_assignment_a{#name}{#assignments}}}
-\unexpanded\def\font_basics_define_body_font_name_assignment_a#name#assignments#style%
+\protected\def\font_basics_define_body_font_name_assignment_a#name#assignments#style%
{%\writestatus\m!fonts{[#name:#style] => [#assignments]}%
- \setevalue{\??fontdefinitions#name:#style}{\font_basics_define_body_font_default{#assignments}}}
+ \edefcsname\??fontdefinitions#name:#style\endcsname{\font_basics_define_body_font_default{#assignments}}}
-\unexpanded\def\font_basics_define_body_font_name_identifier[#name][#stylelist][#identifier]%
+\protected\def\font_basics_define_body_font_name_identifier[#name][#stylelist][#identifier]%
{\processcommalist[#stylelist]{\font_basics_define_body_font_name_identifier_a{#name}{#identifier}}}
-\unexpanded\def\font_basics_define_body_font_name_identifier_a#name#identifier#style%
+\protected\def\font_basics_define_body_font_name_identifier_a#name#identifier#style%
{%\writestatus\m!fonts{[#name:#style] => [##identifier:#style]}%
\ifcsname\??fontdefinitions#name:#style\endcsname
- \expandafter\let\csname\??fontdefinitions#name:#style\expandafter\endcsname\csname\??fontdefinitions#identifier:#style\endcsname
+ \letcsname\??fontdefinitions#name:#style\expandafter\endcsname\csname\??fontdefinitions#identifier:#style\endcsname
\else
- \expandafter\def\csname\??fontdefinitions#name:#style\endcsname{\csname\??fontdefinitions#identifier:#style\endcsname}%
+ \defcsname\??fontdefinitions#name:#style\endcsname{\csname\??fontdefinitions#identifier:#style\endcsname}%
\fi}
%D The unknown:
@@ -1577,7 +1710,7 @@
\newconditional\c_font_defining_unknown
\newconditional\c_font_defining_state
-\unexpanded\def\font_helpers_define_unknown_font#body% one level only
+\protected\def\font_helpers_define_unknown_font#body% one level only
{\font_helpers_register_fontbody{#body}% prevents loop, can go
\setfalse\c_font_defining_state
\font_helpers_process_relative_size_list{\font_helpers_define_unknown_check_sizes{#body}}%
@@ -1615,20 +1748,13 @@
\settrue\c_font_defining_state
\fi}
-% \def\font_helpers_define_unknown_check_relatives#body#relativesize%
-% {\ifcsname\??fontbodyknown\csname\??fontenvironments#body#relativesize\endcsname\endcsname \else
-% % how \lastnamedcs here
-% \expandafter\font_helpers_define_unknown_font\csname\??fontenvironments#body#relativesize\endcsname
-% \settrue\c_font_defining_state
-% \fi}
-
\def\font_helpers_define_unknown_check_relatives#body#relativesize%
{\ifcsname\??fontbodyknown\csname\??fontenvironments#body#relativesize\endcsname\endcsname \else
\expandafter\font_helpers_define_unknown_font\csname\??fontenvironments#body#relativesize\endcsname
\settrue\c_font_defining_state
\fi}
-\unexpanded\def\font_basics_define_body_font_default#assignments%
+\protected\def\font_basics_define_body_font_default#assignments%
{\font_helpers_check_relative_font_size\m_font_asked_style % still needed here?
\ifcsname\m_font_asked_style\endcsname\else
\normalexpanded{\definefontstyle[\m_font_asked_style][\m_font_asked_style]}%
@@ -1639,7 +1765,7 @@
%D These macros show that quite some definitions take place. Fonts are not loaded
%D yet! This means that at format generation time, no font files are present.
-\unexpanded\def\font_basics_switch_points#body%
+\protected\def\font_basics_switch_points#body%
{\ifcsname\??fontbodyknown#body\endcsname \else
% we need to check the relative sizes for this body
\font_helpers_define_unknown_font{#body}%
@@ -1651,9 +1777,21 @@
\font_helpers_check_bodyfont_environment\normalizedbodyfontsize\normalizedbodyfontsize % !!
\else
\showmessage\m!fonts4{#body}%
+ \fi
+ \ifconditional\c_font_compact
+ \glyphscale\numexpr\plushundred*\dimexpr\normalizedbodyfontsize\relax/\maxcard\relax
\fi}
-\unexpanded\def\font_basics_switch_style#style%
+% \prependtoks
+% \ifconditional\c_font_compact
+% % better in lua ... accuracy
+% \glyphtextscale \numexpr\plusthousand*\dimexpr\textface \relax/\d_font_scaled_default\relax
+% \glyphscriptscale \numexpr\plusthousand*\dimexpr\scriptface \relax/\d_font_scaled_default\relax
+% \glyphscriptscriptscale \numexpr\plusthousand*\dimexpr\scriptscriptface\relax/\d_font_scaled_default\relax
+% \fi
+% \to \everymathematics
+
+\protected\def\font_basics_switch_style#style%
{\ifcsname\??fontstyle#style\endcsname
\lastnamedcs
\edef\fontstyle{#style}%
@@ -1670,7 +1808,7 @@
\def\font_helpers_set_font#method#specification%
{\edef\m_font_specification{#specification}%
- \ifx\m_font_specification\empty \else
+ \ifempty\m_font_specification \else
\ifx\m_font_specification\v!global % we can have all kind of presets
\restoreglobalbodyfont
\else
@@ -1680,7 +1818,7 @@
\font_preloads_at_definition
\font_basics_switch_points\normalizedbodyfontsize
\font_basics_switch_style\fontstyle
- \ifx\defaultfontclass\empty
+ \ifempty\defaultfontclass
\let\defaultfontclass\fontclass
\fi
\fi
@@ -1702,7 +1840,7 @@
\newmacro\m_font_keyword
-\unexpanded\def\font_helpers_set_font_set_font_option_keyword#method#keyword#message%
+\protected\def\font_helpers_set_font_set_font_option_keyword#method#keyword#message%
{\edef\m_font_keyword{#keyword}%
\ifcsname\??fontenvironments\normalizedbodyfontsize\m_font_keyword\endcsname
\edef\m_font_step{\font_bodyfontvariable\m_font_keyword}%
@@ -1725,7 +1863,7 @@
\def\font_helpers_set_fontstyle_of_fontclass % will be overloaded later
{\let\fontstyle\s!rm}
-\unexpanded\def\font_helpers_set_font_set_font_option_body#method#body#message%
+\protected\def\font_helpers_set_font_set_font_option_body#method#body#message%
{\normalizebodyfontsize\normalizedsetfont{#body}% redundant for some calls
\ifcsname\??fontbodyknown\normalizedsetfont\endcsname \else
\font_helpers_define_unknown_font\normalizedsetfont
@@ -1740,33 +1878,33 @@
% we need to check the fontclass
-\def\registerfontclass#class%
+\permanent\def\registerfontclass#class%
{\letgvalue{\??fontclassyes#class}\v!yes} % global ?
-\def\setcurrentfontclass#class%
+\permanent\def\setcurrentfontclass#class%
{\ifcsname\??fontclassyes#class\endcsname
\edef\fontclass{#class}%
\orelse\ifcsname\??fontclassnop#class\endcsname
% already tried
\else % too messy: \ifcase\currentgrouplevel % (unpredictable)
- \trycurrentfontclass{#class}%
+ \fonts_helpers_try_currentfontclass{#class}%
\fi}
-\ifdefined\trycurrentfontclass \else
+\ifdefined\fonts_helpers_try_currentfontclass \else
- \unexpanded\def\trycurrentfontclass#typeface%
- {\letvalueempty{\??fontclassnop#typeface}}
+ \protected\def\fonts_helpers_try_currentfontclass#typeface%
+ {\letcsname\??fontclassnop#typeface\endcsname\empty}
\fi
-\let\defaultfontstyle \s!rm
-\let\defaultfontalternative\s!tf
-\let\defaultfontsize \empty
-\let\defaultfontface \!!zerocount
+% \let\defaultfontstyle \s!rm
+% \let\defaultfontalternative\s!tf
+% \let\defaultfontsize \empty
+% \let\defaultfontface \!!zerocount
%D So far for synchronisation. (We can inline the following macros.)
-\unexpanded\def\setcurrentfont#body#style#alternative#size% not used
+\permanent\protected\def\setcurrentfont#body#style#alternative#size% not used
{\edef\fontbody {#body}%
\edef\fontstyle {#style}%
\edef\fontalternative{#alternative}%
@@ -1774,7 +1912,7 @@
\font_helpers_check_big_math_synchronization
\font_helpers_synchronize_font}
-\unexpanded\def\setcurrentfontbody#body% % not used
+\permanent\protected\def\setcurrentfontbody#body% % not used
{\edef\fontbody{#body}%
\font_helpers_synchronize_font}
@@ -1784,52 +1922,52 @@
\let\font_typescripts_inherit_check\gobbleoneargument % implemented in type-ini
\fi
-\unexpanded\def\font_helpers_set_current_font_style#style%
+\protected\def\font_helpers_set_current_font_style#style%
{\edef\fontstyle{#style}%
\font_typescripts_inherit_check\fontstyle
\ifmmode\mr\fi % otherwise \rm not downward compatible ... not adapted yet
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_set_current_xsize_alternative#xsize#alternative%
+\protected\def\font_helpers_set_current_xsize_alternative#xsize#alternative%
{\edef\fontface{#xsize}%
\edef\fontalternative{#alternative}%
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_set_current_font_alternative#alternative%
+\protected\def\font_helpers_set_current_font_alternative#alternative%
{\edef\fontalternative{#alternative}%
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_set_current_font_size#size%
+\protected\def\font_helpers_set_current_font_size#size%
{\edef\fontsize{#size}%
\font_helpers_check_big_math_synchronization % double? better in everymath?
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_set_current_font_style_alternative#style#alternative% \rmsl
+\protected\def\font_helpers_set_current_font_style_alternative#style#alternative% \rmsl
{\edef\fontstyle {#style}%
\edef\fontalternative{#alternative}%
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_set_current_font_style_size#style#size% \rma
+\protected\def\font_helpers_set_current_font_style_size#style#size% \rma
{\edef\fontstyle{#style}%
\edef\fontsize {#size}%
\font_helpers_check_big_math_synchronization % double? better in everymath?
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_set_current_font_alternative_size#alternative#size% \sla
+\protected\def\font_helpers_set_current_font_alternative_size#alternative#size% \sla
{\edef\fontalternative{#alternative}%
\edef\fontsize {#size}%
\font_helpers_check_big_math_synchronization % double? better in everymath?
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_set_current_font_style_alternative_size#style#alternative#size% \rmsla
+\protected\def\font_helpers_set_current_font_style_alternative_size#style#alternative#size% \rmsla
{\edef\fontstyle {#style}%
\edef\fontalternative{#alternative}%
\edef\fontsize {#size}%
\font_helpers_check_big_math_synchronization % double? better in everymath?
\font_helpers_synchronize_font}
-\unexpanded\def\font_helpers_synchronize_font % we can have dups i.e. no need to let fontstrategy
- {\ifx\fontclass\empty
+\protected\def\font_helpers_synchronize_font % we can have dups i.e. no need to let fontstrategy
+ {\ifempty\fontclass
\applyfontstrategies
\else
\applyfontclassstrategies
@@ -1939,8 +2077,8 @@
\lastnamedcs
\fi}
-\let\applyfontstrategies \font_helpers_check_strategy_a
-\let\applyfontclassstrategies\font_helpers_check_strategy_class_a
+\permanent\let\applyfontstrategies \font_helpers_check_strategy_a
+\permanent\let\applyfontclassstrategies\font_helpers_check_strategy_class_a
%D Let's synchronize:
@@ -1970,8 +2108,8 @@
{\ifcase\currentxfontsize\else
\currentxfontsize\zerocount
% also \sx and \sxx ?
- \let\tx \normaltx
- \let\txx\normaltxx
+ \enforced\let\tx \normaltx
+ \enforced\let\txx\normaltxx
\fi}
\let\font_helpers_check_nested_x_fontsize\relax
@@ -1980,14 +2118,14 @@
{\font_helpers_check_nested_x_fontsize
\font_helpers_set_current_font_xxx_alternative{#alternative}{4}\scriptstyle
\currentxfontsize\plusone
- \let\tx\txx}
+ \enforced\let\tx\txx}
\def\font_helpers_set_current_font_xx_alternative#alternative%
{\font_helpers_check_nested_x_fontsize
\font_helpers_set_current_font_xxx_alternative{#alternative}{5}\scriptscriptstyle
\currentxfontsize\plustwo
- \let\tx\empty
- \let\txx\empty}
+ \enforced\let\tx\empty
+ \enforced\let\txx\empty}
%D This alterative is not really needed, but for old time's sake we keep it there.
%D We can speed it up when needed.
@@ -2032,6 +2170,9 @@
\scratchcounterthree\fontid\font\relax
% parent -> x -> xx
% parent -> xx
+ %
+ % this can become \integerdef
+ %
\global\expandafter\chardef\csname\??fontscalex \number\scratchcounterone\endcsname\scratchcountertwo
\global\expandafter\chardef\csname\??fontscalexx\number\scratchcounterone\endcsname\scratchcounterthree
\global\expandafter\chardef\csname\??fontscalex \number\scratchcountertwo\endcsname\scratchcounterthree
@@ -2071,59 +2212,61 @@
\let\fontalternative\fontalternative
\font_helpers_synchronize_font}
-\unexpanded\def\tx
+% to freeze or not ...
+
+\permanent\protected\def\tx
{\currentxfontsize\plusone
\ifmmode
\scriptstyle
- \else\ifconditional\c_font_inherit_scale
+ \orelse\ifconditional\c_font_inherit_scale
\font_scale_inherit_x
\else
\font_scale_defined_x
- \fi\fi
- \let\tx\txx}
+ \fi
+ \enforced\let\tx\txx}
-\unexpanded\def\txx
+\permanent\protected\def\txx
{\currentxfontsize\plustwo
\ifmmode
\scriptscriptstyle
- \else\ifconditional\c_font_inherit_scale
+ \orelse\ifconditional\c_font_inherit_scale
\font_scale_inherit_xx
\else
\font_scale_defined_xx
- \fi\fi
- \let\tx \empty
- \let\txx\empty}
+ \fi
+ \enforced\let\tx \empty
+ \enforced\let\txx\empty}
-\unexpanded\def\sx
+\permanent\protected\def\sx
{\currentxfontsize\plusone
\ifmmode
\scriptstyle
\else
\font_scale_inherit_x
\fi
- \let\tx\txx
- \let\sx\sxx}
+ \enforced\let\tx\txx
+ \enforced\let\sx\sxx}
-\unexpanded\def\sxx
+\permanent\protected\def\sxx
{\currentxfontsize\plustwo
\ifmmode
\scriptscriptstyle
\else
\font_scale_inherit_xx
\fi
- \let\tx \empty
- \let\txx\empty
- \let\sx \empty
- \let\sxx\empty}
+ \enforced\let\tx \empty
+ \enforced\let\txx\empty
+ \enforced\let\sx \empty
+ \enforced\let\sxx\empty}
-\unexpanded\def\useinheritxsizes{\settrue \c_font_inherit_scale} % not yet public, playground for WS and me
-\unexpanded\def\usedefinedxsizes{\setfalse\c_font_inherit_scale} % not yet public, playground for WS and me
+\permanent\protected\def\useinheritxsizes{\settrue \c_font_inherit_scale} % not yet public, playground for WS and me
+\permanent\protected\def\usedefinedxsizes{\setfalse\c_font_inherit_scale} % not yet public, playground for WS and me
-\let\normaltx \tx
-\let\normaltxx\txx
+\aliased\let\normaltx \tx
+\aliased\let\normaltxx\txx
-\let\normalsx \sx
-\let\normalsxx\sxx
+\aliased\let\normalsx \sx
+\aliased\let\normalsxx\sxx
%D When asking for a complete font switch, for instance from 10 to 12~points, the
%D next macro does the job. First we normalize the size, next we define the current
@@ -2131,34 +2274,34 @@
%D math families and finally we activate the default typeface and also set the font
%D specific parameters assigned to \type {\everybodyfont}.
-\def\textface {\currentbodyfontdimension\s!text }
-\def\scriptface {\currentbodyfontdimension\s!script }
-\def\scriptscriptface{\currentbodyfontdimension\s!scriptscript}
-\def\xtextface {\currentbodyfontdimension\s!x }
-\def\xxtextface {\currentbodyfontdimension\s!xx }
+\permanent\protected\def\textface {\currentbodyfontdimension\s!text }
+\permanent\protected\def\scriptface {\currentbodyfontdimension\s!script }
+\permanent\protected\def\scriptscriptface{\currentbodyfontdimension\s!scriptscript}
+\permanent\protected\def\xtextface {\currentbodyfontdimension\s!x }
+\permanent\protected\def\xxtextface {\currentbodyfontdimension\s!xx }
\installcorenamespace{fontbodyfaces}
-\unexpanded\def\font_basics_complete_switch#size%
+\protected\def\font_basics_complete_switch#size%
{\bodyfontsize#size\relax
\normalizebodyfontsize\normalizedbodyfontsize\bodyfontsize
\expandafter\let\expandafter\font_basics_set_faces\csname\??fontbodyfaces\fontbody\endcsname
- \ifx\font_basics_set_faces\relax
+ \ifrelax\font_basics_set_faces
\font_basics_set_faces_preset
\fi
\font_basics_set_faces}
\def\font_basics_set_faces_preset
{\edef\font_basics_set_faces{% 0.2 sec on 10K \tfa
- \noexpand\edef\noexpand\textface {\currentbodyfontdimension\s!text }%
- \noexpand\edef\noexpand\scriptface {\currentbodyfontdimension\s!script }%
- \noexpand\edef\noexpand\scriptscriptface{\currentbodyfontdimension\s!scriptscript}%
- \noexpand\edef\noexpand\xtextface {\currentbodyfontdimension\s!x }%
- \noexpand\edef\noexpand\xxtextface {\currentbodyfontdimension\s!xx }%
+ \enforced\permanent\protected\def\textface {\currentbodyfontdimension\s!text }%
+ \enforced\permanent\protected\def\scriptface {\currentbodyfontdimension\s!script }%
+ \enforced\permanent\protected\def\scriptscriptface{\currentbodyfontdimension\s!scriptscript}%
+ \enforced\permanent\protected\def\xtextface {\currentbodyfontdimension\s!x }%
+ \enforced\permanent\protected\def\xxtextface {\currentbodyfontdimension\s!xx }%
}%
- \expandafter\glet\csname\??fontbodyfaces\fontbody\endcsname\font_basics_set_faces}
+ \gletcsname\??fontbodyfaces\fontbody\endcsname\font_basics_set_faces}
-\def\currentbodyfontdimension#parameter% there can be factors here
+\permanent\def\currentbodyfontdimension#parameter% there can be factors here
{\the\dimexpr
\ifcsname\??fontenvironments\fontclass\normalizedbodyfontsize#parameter\endcsname
\lastnamedcs
@@ -2199,13 +2342,13 @@
%D Both macros look alike. The second one also has to take all kind of keywords into
%D account.
-\ifx\saveinterlinespace \undefined \let\saveinterlinespace \relax \fi
-\ifx\restoreinterlinespace\undefined \let\restoreinterlinespace\relax \fi
+\ifdefined\saveinterlinespace \else \let\saveinterlinespace \relax \fi
+\ifdefined\restoreinterlinespace \else \let\restoreinterlinespace\relax \fi
% \newtoks \everysetupbodyfont
% \newtoks \everyswitchtobodyfont
-\unexpanded\def\setupbodyfont
+\permanent\protected\def\setupbodyfont
{\doifelsenextoptionalcs\font_basics_setupbodyfont_yes\font_basics_setupbodyfont_nop}
\def\font_basics_setupbodyfont_nop
@@ -2225,9 +2368,9 @@
\fi
\the\everysetupbodyfont}}
-\unexpanded\def\font_basics_switchtobodyfont#specification%
+\protected\def\font_basics_switchtobodyfont#specification%
{\edef\m_font_step{\font_bodyfontvariable{#specification}}%
- \ifx\m_font_step\empty
+ \ifempty\m_font_step
\font_helpers_set_font\zerocount{#specification}%
\else
\font_helpers_switch_bodyfont_step % so we have a fast [small] switch
@@ -2235,12 +2378,12 @@
\the\everybodyfont
\the\everyswitchtobodyfont}
-\unexpanded\def\switchtobodyfont[#specification]% could become an ifx
+\permanent\protected\def\switchtobodyfont[#specification]% could become an ifx
{\doifsomething{#specification}{\font_basics_switchtobodyfont{#specification}}}
-\unexpanded\def\usebodyfontparameter#1%
+\permanent\protected\def\usebodyfontparameter#1%
{\edef\m_font_bodyfont_asked{#1\c!bodyfont}%
- \ifx\m_font_bodyfont_asked\empty\else
+ \ifempty\m_font_bodyfont_asked\else
\font_basics_switchtobodyfont\m_font_bodyfont_asked
\fi}
@@ -2251,13 +2394,12 @@
%D The following alternative is meant for math||to||text switching and will be
%D optimized.
-\unexpanded\def\fastswitchtobodyfont#name%
+\permanent\protected\def\fastswitchtobodyfont#name%
{\ifcsname\??fontenvironments\normalizedbodyfontsize#name\endcsname
- %\edef\futurebodyfontsize{\csname\??fontenvironments\normalizedbodyfontsize#name\endcsname}%
- \edef\futurebodyfontsize{\lastnamedcs}%
- \ifcsname\??fontbodyknown\futurebodyfontsize\endcsname
- \font_basics_complete_switch\futurebodyfontsize
- \localbodyfontsize\futurebodyfontsize\relax
+ \edef\p_bodyfont{\lastnamedcs}%
+ \ifcsname\??fontbodyknown\p_bodyfont\endcsname
+ \font_basics_complete_switch\p_bodyfont
+ \localbodyfontsize\p_bodyfont\relax
\fi
\fi
\csname\??fontstyle\fontstyle\endcsname
@@ -2284,23 +2426,15 @@
%D \stoptext
%D \stoptyping
-\unexpanded\def\usebodyfont[#1]%
- {\ifx\fontclass\empty
+\permanent\protected\def\usebodyfont[#1]%
+ {\ifempty\fontclass
\setupbodyfont[#1]%
\else
\switchtobodyfont[#1]%
\fullrestoreglobalbodyfont
\fi}
-\unexpanded\def\showbodyfontstate
- {\dontleavehmode
- \start
- \infofont
- [fontclass: \fontclass,\space
- fontbody: \fontbody ,\space
- fontface: \fontface ,\space
- fontsize: \fontsize ]%
- \stop}
+\fetchmodulecommand \showbodyfontstate \f!font_run
%D Handy for manuals:
@@ -2320,13 +2454,13 @@
%D
%D This is an expandable command!
-\unexpanded\def\fontchar #character{\clf_fontchar{#character}}
-\unexpanded\def\fontcharbyindex #index{\clf_fontcharbyindex#index\relax}
- \def\tochar #specifications{\clf_tochar{#specifications}} % expanded (also used in edef)
+\permanent\protected\def\fontchar #character{\clf_fontchar{#character}}
+\permanent\protected\def\fontcharbyindex #index{\clf_fontcharbyindex#index\relax}
+\permanent \def\tochar #specifications{\clf_tochar{#specifications}} % expanded (also used in edef)
%D The next auxilliary macro is an alternative to \type {\fontname}.
-\def\purefontname#font{\clf_purefontname{\fontname#font}}
+\permanent\def\purefontname#font{\clf_purefontname{\fontname#font}}
%D \macros
%D {switchstyleonly}
@@ -2340,7 +2474,7 @@
%D {\sl text \switchstyleonly[sansserif]text}
%D \stoptyping
-\unexpanded\def\switchstyleonly
+\permanent\protected\def\switchstyleonly
{\doifelsenextoptionalcs\font_basics_switch_style_only_opt\font_basics_switch_style_only_arg}
\def\font_basics_switch_style_only_arg#name% stupid version
@@ -2363,11 +2497,8 @@
%D
%D We don't support language specific synonyms here.
-\unexpanded\def\definebodyfontswitch
- {\dodoubleargument\font_basics_define_bodyfont_switch}
-
-\def\font_basics_define_bodyfont_switch[#command][#specification]% no longer a commalist (not useful)
- {\setvalue{#command}{\switchtobodyfont[#specification]}}%
+\permanent\tolerant\protected\def\definebodyfontswitch[#command]#spacer[#specification]% no longer a commalist (not useful)
+ {\frozen\protected\defcsname#command\endcsname{\switchtobodyfont[#specification]}}%
%D \macros
%D {setsmallbodyfont,setmainbodyfont,setbigbodyfont}
@@ -2384,10 +2515,10 @@
\font_basics_switch_points\m_font_step
\font_basics_switch_style \fontstyle}
-\unexpanded\def\setsmallbodyfont{\font_helpers_set_bodyfont_step\v!small\the\everybodyfont}
-\unexpanded\def\setbigbodyfont {\font_helpers_set_bodyfont_step\v!big \the\everybodyfont}
+\permanent\protected\def\setsmallbodyfont{\font_helpers_set_bodyfont_step\v!small\the\everybodyfont}
+\permanent\protected\def\setbigbodyfont {\font_helpers_set_bodyfont_step\v!big \the\everybodyfont}
-\unexpanded\def\setmainbodyfont
+\permanent\protected\def\setmainbodyfont
{\font_basics_switch_points\normalizedbodyfontsize
\font_basics_switch_style\fontstyle
\the\everybodyfont
@@ -2407,9 +2538,9 @@
%D the running text is temporary set to a smaller one|>| by saying \type
%D {\switchtobodyfont [global]}.
-\let\globalfontstyle\s!rm
+\mutable\let\globalfontstyle\s!rm
-\unexpanded\def\fullrestoreglobalbodyfont
+\permanent\protected\def\fullrestoreglobalbodyfont
{\let\fontsize\defaultfontsize
\let\fontbody\defaultfontbody
\let\fontface\defaultfontface
@@ -2423,7 +2554,7 @@
\the\everyglobalbodyfont
\saveinterlinespace}
-\unexpanded\def\partialrestoreglobalbodyfont
+\permanent\protected\def\partialrestoreglobalbodyfont
{\let\fontsize\defaultfontsize
\let\fontbody\defaultfontbody
\let\fontface\defaultfontface
@@ -2434,7 +2565,7 @@
\the\everyglobalbodyfont % indeed needed
\saveinterlinespace}
-\unexpanded\def\restoreglobalbodyfont % ook style etc
+\permanent\protected\def\restoreglobalbodyfont % ook style etc
{\ifx\fontclass\globalfontclass
\ifx\fontstyle\globalfontstyle
\ifx\normalizedbodyfontsize\normalizedglobalbodyfontsize
@@ -2466,59 +2597,61 @@
\installcorenamespace{predefinedfont}
-\unexpanded\def\predefinefont[#1]#2[#3]% global !
- {\setugvalue{#1}{\font_basics_predefine{#1}{#3}}}
+\permanent\protected\def\predefinefont[#1]#*[#2]% global !
+ {\protected\gdefcsname#1\endcsname{\font_basics_predefine{#1}{#2}}}
-\unexpanded\def\predefinedfont[#1]% global !
+\permanent\protected\def\predefinedfont[#1]% global !
{\ifcsname\??predefinedfont#1\endcsname
\lastnamedcs
\else
\font_basics_predefined{#1}%
\fi}
-\unexpanded\def\font_basics_predefine#1#2%
- {\font_basics_defined_font_yes[#2]%
- \expandafter\glet\csname#1\expandafter\endcsname\csname\v_font_identifier_basic\endcsname}
+\protected\def\font_basics_predefine#1#2%
+ {\definedfont[#2]%
+ \gletcsname#1\expandafter\endcsname\csname\v_font_identifier_basic\endcsname}
-\unexpanded\def\font_basics_predefined#1%
+\protected\def\font_basics_predefined#1%
{\font_basics_predefine{\??predefinedfont#1}{#1}}
%D Handy helper:
-\unexpanded\def\savedefinedfont[#1]%
+\permanent\protected\def\savedefinedfont[#1]% hm, how about scales
{\bgroup
\definedfont[#1]%
\xdef\saveddefinedfontid {\number\fontid\font}%
\xdef\saveddefinedfontname{\fontname\font}%
\egroup}
-\def\saveddefinedfontid {\number\fontid\font}
-\def\saveddefinedfontname{\fontname\font}
+\mutable\def\saveddefinedfontid {\number\fontid\font}
+\mutable\def\saveddefinedfontname{\fontname\font}
%D Ugly helper:
-\unexpanded\def\saverunningstyleandcolor
- {\unexpanded\edef\restorerunningstyleandcolor
- {\setfontid \number\fontid\font
- \attribute\colormodelattribute \the\attribute\colormodelattribute
- \attribute\colorattribute \the\attribute\colorattribute
- \attribute\transparencyattribute\the\attribute\transparencyattribute
+\permanent\protected\def\saverunningstyleandcolor
+ {\enforced\permanent\protected\edef\restorerunningstyleandcolor
+ {\setfontid \number\fontid\font
+ \c_attr_colormodel \the\c_attr_colormodel
+ \c_attr_color \the\c_attr_color
+ \c_attr_transparency\the\c_attr_transparency
\relax}}
-\let\restorerunningstyleandcolor\relax
+\aliased\let\restorerunningstyleandcolor\relax
%D Handy for defining additional glyphs:
-\let\getprivateglyphslot\clf_getprivateglyphslot % kind of private macro
+% todo: public implementors
-\let\getprivatechar \clf_getprivatechar % gives back a utf !
-\let\getprivatemathchar \clf_getprivatemathchar % gives back a utf !
-\let\getprivateslot \clf_getprivateslot % companion to fonts.helpers.addprivate
+\aliased\let\getprivateglyphslot\clf_getprivateglyphslot % kind of private macro
-% \unexpanded\def\getprivatemathchar#1%
+\aliased\let\getprivatechar \clf_getprivatechar % gives back a utf !
+\aliased\let\getprivatemathchar \clf_getprivatemathchar % gives back a utf !
+\aliased\let\getprivateslot \clf_getprivateslot % companion to fonts.helpers.addprivate
+
+% \protected\def\getprivatemathchar#1%
% {\begingroup\the\textfont\zerocount\getprivatechar{#1}\endgroup}
-\def\privatechar % the text variant gets expanded to utf
+\permanent\protected\def\privatechar % the text variant gets expanded to utf
{\ifmmode
\expandafter\getprivatemathchar
\else
@@ -2546,10 +2679,7 @@
%D \stopTEXpage
%D \stoptyping
-\unexpanded\def\definefontcolorpalette
- {\dodoubleargument\font_define_color_palette}
-
-\def\font_define_color_palette[#1][#2]%
+\permanent\tolerant\protected\def\definefontcolorpalette[#1]#*[#2]%
{\clf_definefontcolorpalette{#1}{#2}}
%D \macros
@@ -2557,7 +2687,7 @@
%D
%D A way to add a path at runtime (no need to generate database):
-\unexpanded\def\usefontpath[#1]%
+\permanent\protected\def\usefontpath[#1]%
{\clf_addfontpath{#1}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx
new file mode 100644
index 00000000000..72c2d4ba9f5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-lib.mklx
@@ -0,0 +1,156 @@
+%D \module
+%D [ file=font-lib,
+%D version=2011.01.13, % (copied fron font-ini)
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Libraries,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Font Macros / Libraries}
+
+\unprotect
+
+\registerctxluafile{font-ini}{autosuffix}
+\registerctxluafile{font-log}{}
+\registerctxluafile{font-con}{autosuffix} % kind of early
+%registerctxluafile{font-cft}{}
+\registerctxluafile{font-enc}{}
+\registerctxluafile{font-fmp}{autosuffix}
+\registerctxluafile{font-agl}{} % if needed we can comment this and delay loading
+\registerctxluafile{font-cid}{} % cid maps
+\registerctxluafile{font-map}{optimize}
+
+% helpers
+
+\registerctxluafile{font-otr}{optimize} % opentype fontloader
+\registerctxluafile{font-web}{} % opentype fontloader
+\registerctxluafile{font-cff}{optimize} % quadratic outlines
+\registerctxluafile{font-ttf}{optimize} % cubic outlines
+\registerctxluafile{font-dsp}{optimize} % ... for this one
+\registerctxluafile{font-hsh}{} % hashes used by context
+\registerctxluafile{font-vir}{}
+\registerctxluafile{font-vfc}{autosuffix}
+\registerctxluafile{font-prv}{} % needs hashes
+\registerctxluafile{font-nod}{optimize}
+\registerctxluafile{font-oti}{} % otf initialization
+\registerctxluafile{font-ott}{} % otf tables (first)
+\registerctxluafile{font-otl}{}
+\registerctxluafile{font-oto}{}
+\registerctxluafile{font-otj}{autosuffix,optimize}
+\registerctxluafile{font-oup}{}
+\registerctxluafile{font-ota}{autosuffix}
+% \registerctxluafile{font-ots-pre-scale}{autosuffix,optimize}
+\registerctxluafile{font-ots}{autosuffix,optimize}
+\registerctxluafile{font-otd}{optimize}
+\registerctxluafile{font-otc}{}
+\registerctxluafile{font-oth}{}
+\registerctxluafile{font-osd}{}
+%registerctxluafile{font-osm}{}
+\registerctxluafile{font-ogr}{autosuffix}
+
+% we use otf code for type one
+
+\registerctxluafile{font-onr}{optimize}
+\registerctxluafile{font-one}{optimize}
+\registerctxluafile{font-afk}{}
+
+% tfm
+
+\registerctxluafile{font-tpk}{optimize}
+\registerctxluafile{font-tfm}{}
+
+% name database
+
+\registerctxluafile{font-syn}{}
+\registerctxluafile{font-trt}{}
+
+% shapes
+
+\registerctxluafile{font-shp}{}
+
+% so far
+
+\registerctxluafile{font-pat}{} % patchers
+
+\registerctxluafile{node-fnt}{autosuffix} % here
+
+\registerctxluafile{font-mps}{autosuffix} % outline fun
+
+\registerctxluafile{font-lua}{}
+
+\registerctxluafile{font-enh}{autosuffix}
+
+\registerctxluafile{good-ini}{}
+\registerctxluafile{good-gen}{}
+\registerctxluafile{good-ctx}{}
+\registerctxluafile{good-mth}{autosuffix}
+
+\registerctxluafile{font-def}{autosuffix}
+\registerctxluafile{font-ctx}{autosuffix} % after def as it overloads
+
+% extensions, order matters
+
+\registerctxluafile{font-imp-ligatures}{}
+\registerctxluafile{font-imp-tex}{}
+\registerctxluafile{font-imp-reorder}{}
+\registerctxluafile{font-imp-properties}{}
+\registerctxluafile{font-imp-unicode}{}
+\registerctxluafile{font-imp-math}{autosuffix}
+\registerctxluafile{font-imp-notused}{}
+\registerctxluafile{font-imp-effects}{}
+\registerctxluafile{font-imp-quality}{}
+\registerctxluafile{font-imp-italics}{}
+\registerctxluafile{font-imp-dimensions}{}
+\registerctxluafile{font-imp-spacekerns}{}
+\registerctxluafile{font-imp-tweaks}{}
+\registerctxluafile{font-imp-combining}{}
+
+\doifelsefileexists{font-imp-scripts.lua} {
+ \registerctxluafile{font-imp-scripts}{}
+} {
+ % not yet, lmtx feature
+}
+
+\registerctxluafile{font-imp-tracing}{autosuffix} % comes last!
+
+\registerctxluafile{font-fbk}{autosuffix}
+
+\registerctxluafile{font-aux}{}
+
+\registerctxluafile{font-lig}{} % only for experiments so try to avoid it
+
+%D Some low level helpers
+%D
+%D \starttyping
+%D \def\TestLookup#specification%
+%D {\dolookupfontbyspec{#specification}
+%D pattern: #specification, found: \dolookupnoffound
+%D \blank
+%D \dorecurse {\dolookupnoffound} {%
+%D \recurselevel:~\dolookupgetkeyofindex{fontname}{\recurselevel}\quad
+%D }%
+%D \blank}
+%D
+%D \TestLookup{familyname=helveticaneue}
+%D \TestLookup{familyname=helveticaneue,weight=bold}
+%D \TestLookup{familyname=helveticaneue,weight=bold,style=italic}
+%D \stoptyping
+
+%D We can also move the lookups to the fonts.namespace (of commands) one can also
+%D directly use the clf calls when speed is needed.
+
+% todo: public implementors:
+
+\permanent \def\dolookupfontbyspec #1{\clf_fontlookupinitialize{#1}}
+\permanent \def\dolookupnoffound {\clf_fontlookupnoffound}
+\permanent \def\dolookupgetkeyofindex#1#2{\clf_fontlookupgetkeyofindex{#1}\numexpr#2\relax}
+\permanent \def\dolookupgetkey #1{\clf_fontlookupgetkey{#1}}
+\permanent \def\cleanfontname #1{\clf_cleanfontname{#1}}
+\permanent\protected\def\setfontofid #1{\clf_setfontofid\numexpr#1\relax}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-mat.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-mat.mklx
index d08a2ce879f..3fc6275a65d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-mat.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-mat.mklx
@@ -21,7 +21,7 @@
\ifdefined\??fontinstancebasic \else \installcorenamespace{fontinstancebasic} \fi
\ifdefined\??fontinstanceclass \else \installcorenamespace{fontinstanceclass} \fi
-%D The order 3 2 1 of siuze matters: needed for math-fbk relative size storage!
+%D The order 3 2 1 of size matters: needed for math-fbk relative size storage!
%D \macros
%D {textonly}
@@ -40,10 +40,10 @@
\newtoks \t_font_math_strategies
\newconditional\c_font_synchronize_math_fonts \settrue\c_font_synchronize_math_fonts
-\unexpanded\def\font_helpers_synchronize_math % math stuff in mmode
+\protected\def\font_helpers_synchronize_math % math stuff in mmode
{\ifconditional\c_font_synchronize_math_fonts\the\t_font_math_strategies\fi}
-\unexpanded\def\textonly{\setfalse\c_font_synchronize_math_fonts} % document this
+\permanent\protected\def\textonly{\setfalse\c_font_synchronize_math_fonts} % document this
%D The main math font definer. We have removed some optimized code simply because we
%D now always have a fontclass. We could check for fontclass being default or empty
@@ -54,24 +54,24 @@
% todo: \c_font_fam_mr
-\let\c_font_fam_mr \zerocount % math regular
-\let\c_font_fam_mr_lr\plusone % math regular l2r
-\let\c_font_fam_mr_rl\plustwo % math regular r2l
+\aliased\let\c_font_fam_mr \zerocount % math regular
+\aliased\let\c_font_fam_mr_lr\plusone % math regular l2r
+\aliased\let\c_font_fam_mr_rl\plustwo % math regular r2l
-\let\c_font_fam_mb \plusthree % math bold
-\let\c_font_fam_mb_lr\plusfour % math bold l2r
-\let\c_font_fam_mb_rl\plusfive % math bold r2l
+\aliased\let\c_font_fam_mb \plusthree % math bold
+\aliased\let\c_font_fam_mb_lr\plusfour % math bold l2r
+\aliased\let\c_font_fam_mb_rl\plusfive % math bold r2l
\definesystemattribute[mathfamily][public]
\newconditional\c_font_bidirectional_mathstrategy % can be default, not that much overhead: \settrue\c_font_bidirectional_mathstrategy
\newconditional\c_font_complete_bold_mathstrategy \settrue\c_font_complete_bold_mathstrategy
-\def\mathtextsuffix {-text}
-\def\mathscriptsuffix {-script}
-\def\mathscriptscriptsuffix{-scriptscript}
+% \frozen ...
-\def\mathsizesuffix{\ifcase\fontface\or\mathtextsuffix\or\mathscriptsuffix\or\mathscriptscriptsuffix\fi}
+\immutable\def\mathtextsuffix {-text}
+\immutable\def\mathscriptsuffix {-script}
+\immutable\def\mathscriptscriptsuffix{-scriptscript}
%D Beware: truefontname also does a fallback on defaultfontclass so there
%D can be some interference here, which is why we use a different method
@@ -101,9 +101,12 @@
\settrue \c_font_auto_size
\fi}
-\let\mathsizesuffix\empty
+%def\mathsizesuffix{\ifcase\fontface\or\mathtextsuffix\or\mathscriptsuffix\or\mathscriptscriptsuffix\fi}
+\mutable\let\mathsizesuffix\empty
-\def\font_helpers_set_math_family_indeed#mrtag#family% \fontface etc are also used later on
+\mutable\let\fontfamily\relax % for now public but it is a helper
+
+\def\font_helpers_set_math_family_indeed_normal#mrtag#family% \fontface etc are also used later on
{\let\savedfontbody\fontbody
\let\fontfamily#family%
% the order is important as we depend on known id's when completing fonts
@@ -121,19 +124,46 @@
\let\fontbody\savedfontbody
\setfalse\c_font_auto_size}
-\def\font_helpers_set_math_family_bold_a#font#mbfam#mrfam%
- {\ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
- \lastnamedcs #font#mbfam\font \orelse
- \ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
- \lastnamedcs #font#mbfam\font \else
- #font#mbfam#font#mrfam%
+\def\font_helpers_set_math_family_set_scales_compact
+ {% these are used when no font setting is there, the settings come before setting the parameters
+ % and are stored with the family
+ \glyphtextscale \plusthousand
+ \glyphscriptscale \numexpr\plusthousand*\dimexpr\scriptface \relax/\dimexpr\textface\relax\relax
+ \glyphscriptscriptscale \numexpr\plusthousand*\dimexpr\scriptscriptface\relax/\dimexpr\textface\relax\relax}
+
+\def\font_helpers_set_math_family_set_scales_normal
+ {\glyphtextscale \plusthousand
+ \glyphscriptscale \plusthousand
+ \glyphscriptscriptscale\plusthousand}
+
+\def\font_helpers_set_math_family_indeed_compact#mrtag#family% \fontface etc are also used later on
+ {\let\savedfontbody\fontbody
+ \let\fontfamily#family%
+ \font_helpers_set_math_family_set_scales_compact
+ % the order is important as we depend on known id's when completing fonts
+ % enabling is needed when we have fallbacks which spoils the families
+ \let\mathsizesuffix\mathtextsuffix \let\fontface\!!plusone
+ \font_helpers_set_math_family_a\textfont #mrtag\font % defines
+ \font_helpers_set_math_family_a\textfont #mrtag\font % enables
+ \scriptfont #mrtag\font % reuses
+ \scriptscriptfont#mrtag\font % reuses
+ \let\mathsizesuffix\empty \let\fontface\!!zerocount
+ \let\fontbody\savedfontbody
+ \setfalse\c_font_auto_size}
+
+\def\font_helpers_set_math_family_indeed
+ {\ifconditional\c_font_compact
+ \expandafter\font_helpers_set_math_family_indeed_compact
+ \else
+ \expandafter\font_helpers_set_math_family_indeed_normal
\fi}
-\def\font_helpers_set_math_family_bold_indeed#mbfam#familytag#mrfam% \c_font_fam_mb \s!mb \c_font_fam_mr
+\def\font_helpers_set_math_family_bold_indeed_normal#mbfam#familytag#mrfam% \c_font_fam_mb \s!mb \c_font_fam_mr
{\let\savedfontclass\defaultfontclass
\let\defaultfontclass\fontclass % else truefontname falls back on the wrong one
\let\savedfontbody\fontbody
\let\fontfamily#familytag%
+ \font_helpers_set_math_family_set_scales_normal
\let\mathsizesuffix\mathscriptscriptsuffix\let\fontface\!!plusthree
\font_helpers_set_math_family_bold_a\scriptscriptfont#mbfam#mrfam% defines
\font_helpers_set_math_family_bold_a\scriptscriptfont#mbfam#mrfam% enables
@@ -148,6 +178,36 @@
\let\defaultfontclass\savedfontclass
\setfalse\c_font_auto_size}
+\def\font_helpers_set_math_family_bold_indeed_compact#mbfam#familytag#mrfam% \c_font_fam_mb \s!mb \c_font_fam_mr
+ {\let\savedfontclass\defaultfontclass
+ \let\defaultfontclass\fontclass % else truefontname falls back on the wrong one
+ \let\savedfontbody\fontbody
+ \let\fontfamily#familytag%
+ \let\mathsizesuffix\mathtextsuffix \let\fontface\!!plusone
+ \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% defines
+ \font_helpers_set_math_family_bold_a\textfont #mbfam#mrfam% enables
+ \scriptfont #mbfam\scriptfont #mrfam% reuses
+ \scriptscriptfont#mbfam\scriptscriptfont#mrfam% reuses
+ \let\mathsizesuffix\empty \let\fontface\!!zerocount
+ \let\fontbody\savedfontbody
+ \let\defaultfontclass\savedfontclass
+ \setfalse\c_font_auto_size}
+
+\def\font_helpers_set_math_family_bold_indeed
+ {\ifconditional\c_font_compact
+ \expandafter\font_helpers_set_math_family_bold_indeed_compact
+ \else
+ \expandafter\font_helpers_set_math_family_bold_indeed_normal
+ \fi}
+
+\def\font_helpers_set_math_family_bold_a#font#mbfam#mrfam%
+ {\ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily-\fontsize\endcsname \setfalse\c_font_auto_size
+ \lastnamedcs #font#mbfam\font \orelse
+ \ifcsname\??fontinstanceready\fontclass-\fontbody-\s!mm-\fontfamily \endcsname \settrue \c_font_auto_size
+ \lastnamedcs #font#mbfam\font \else
+ #font#mbfam#font#mrfam%
+ \fi}
+
% optimized: math fonts are never changed (10K \bfa $x$: 3.2 => 2.5 (baseline 1.0))
%
% sort of tricky: we cannot reset in \everybeforedefinetypeface as we don't know
@@ -195,21 +255,68 @@
%D little in restoring global states and, what's more important, we get rid of large
%D math parameter push/pop in tracingall when not needed.
-\def\font_helpers_preset_math_family_indeed#fam#familytag%
- {\expandafter\let\expandafter\v_font_math_one\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname
- \ifx\v_font_math_one\relax
- \font_helpers_preset_math_family_warning
- \orelse\ifnum\fontid\textfont#fam=\fontid\v_font_math_one\else
- \font_helpers_preset_math_family_indeed_changed#fam#familytag%
+% \def\font_helpers_preset_math_family_indeed#fam#familytag%
+% {\expandafter\let\expandafter\v_font_math_one\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname
+% \ifrelax\v_font_math_one
+% \font_helpers_preset_math_family_warning
+% \orelse\ifnum\fontid\textfont#fam=\fontid\v_font_math_one\else
+% \font_helpers_preset_math_family_indeed_changed#fam#familytag%
+% \fi}
+
+% \def\font_helpers_preset_math_family_warning
+% {\writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}}
+
+% \def\font_helpers_preset_math_family_indeed_changed_normal#fam#familytag%
+% {\font_helpers_set_math_family_set_scales_normal
+% \scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname
+% \scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname
+% \textfont #fam\v_font_math_one}
+
+% \def\font_helpers_preset_math_family_indeed_changed_compact#fam#familytag%
+% {\font_helpers_set_math_family_set_scales_compact
+% \scriptscriptfont#fam\v_font_math_one
+% \scriptfont #fam\v_font_math_one
+% \textfont #fam\v_font_math_one}
+
+% \def\font_helpers_preset_math_family_indeed_changed
+% {\ifconditional\c_font_compact
+% \expandafter\font_helpers_preset_math_family_indeed_changed_compact
+% \else
+% \expandafter\font_helpers_preset_math_family_indeed_changed_normal
+% \fi}
+
+\def\font_helpers_preset_math_family_indeed_normal#fam#familytag%
+ {\expandafter\let\expandafter\font_math_last_font\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname
+ \font_math_last_font
+ \ifnum\fontid\textfont#fam=\fontid\font\else
+ \font_helpers_preset_math_family_indeed_changed_normal#fam#familytag%
\fi}
-\def\font_helpers_preset_math_family_warning
- {\writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}}
+\def\font_helpers_preset_math_family_indeed_changed_normal#fam#familytag%
+ {\font_helpers_set_math_family_set_scales_normal
+ \csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname\scriptscriptfont#fam\font
+ \csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname\scriptfont #fam\font
+ % \csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname\textfont #fam\font}
+ \font_math_last_font \textfont #fam\font}
+
+\def\font_helpers_preset_math_family_indeed_compact#fam#familytag%
+ {\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname
+ \ifnum\fontid\textfont#fam=\fontid\font\else
+ \font_helpers_preset_math_family_indeed_changed_compact#fam%
+ \fi}
-\def\font_helpers_preset_math_family_indeed_changed#fam#familytag%
- {\scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname
- \scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname
- \textfont #fam\v_font_math_one}
+\def\font_helpers_preset_math_family_indeed_changed_compact#fam%
+ {\font_helpers_set_math_family_set_scales_compact
+ \scriptscriptfont#fam\font
+ \scriptfont #fam\font
+ \textfont #fam\font}
+
+\def\font_helpers_preset_math_family_indeed
+ {\ifconditional\c_font_compact
+ \expandafter\font_helpers_preset_math_family_indeed_compact
+ \else
+ \expandafter\font_helpers_preset_math_family_indeed_normal
+ \fi}
\let\font_helpers_reset_fontclass_math_families\gobbleoneargument
@@ -343,8 +450,8 @@
\fam\defaultmathfamily % all characters and symbols are in this family
\to \everymathematics
-\unexpanded\def\font_helpers_synchronize_math_family_mr
- {\attribute\mathfamilyattribute\ifconditional\c_font_bidirectional_mathstrategy
+\protected\def\font_helpers_synchronize_math_family_mr
+ {\c_attr_mathfamily\ifconditional\c_font_bidirectional_mathstrategy
\ifconditional\c_math_right_to_left
\plustwo
\else
@@ -354,8 +461,8 @@
\zerocount
\fi}
-\unexpanded\def\font_helpers_synchronize_math_family_mb
- {\attribute\mathfamilyattribute\ifconditional\c_font_bidirectional_mathstrategy
+\protected\def\font_helpers_synchronize_math_family_mb
+ {\c_attr_mathfamily\ifconditional\c_font_bidirectional_mathstrategy
\ifconditional\c_math_right_to_left
\ifconditional\c_font_pseudo_bold_math_state\pluseight\else\plusfive\fi
\else
@@ -386,25 +493,13 @@
\font_helpers_synchronize_math_family_mr
\fi}
-\ifdefined \fontid % we need to keep this test for a while
- \appendtoks
- \ifnum\fontid\textfont\zerocount=\fontid\textfont\plusthree
- \letvalue{\??fontmathstoredstrategy\fontclass}\font_helpers_set_math_partial_bold_strategy
- \else
- \letvalue{\??fontmathstoredstrategy\fontclass}\font_helpers_set_math_full_bold_strategy
- \fi
- \to \t_font_math_strategies
-\else
- \appendtoks
- \edef\currentmathfontmr{\fontname\textfont\zerocount}%
- \edef\currentmathfontmb{\fontname\textfont\plusthree}%
- \ifx\currentmathfontmr\currentmathfontmb
- \letvalue{\??fontmathstoredstrategy\fontclass}\font_helpers_set_math_partial_bold_strategy
- \else
- \letvalue{\??fontmathstoredstrategy\fontclass}\font_helpers_set_math_full_bold_strategy
- \fi
- \to \t_font_math_strategies
-\fi
+\appendtoks
+ \ifnum\fontid\textfont\zerocount=\fontid\textfont\plusthree
+ \letcsname\??fontmathstoredstrategy\fontclass\endcsname\font_helpers_set_math_partial_bold_strategy
+ \else
+ \letcsname\??fontmathstoredstrategy\fontclass\endcsname\font_helpers_set_math_full_bold_strategy
+ \fi
+\to \t_font_math_strategies
%def\font_helpers_synchronize_math_bold_strategy{\csname\??fontmathstoredstrategy\fontclass\endcsname}
\def\font_helpers_synchronize_math_bold_strategy{\begincsname\??fontmathstoredstrategy\fontclass\endcsname}
@@ -427,7 +522,7 @@
\newconditional\c_math_bold
-\unexpanded\def\mr % math regular
+\permanent\protected\def\mr % math regular
{\ifmmode
\font_helpers_synchronize_math_family_mr
\else
@@ -436,7 +531,7 @@
\mathdefault
\setfalse\c_math_bold}
-\unexpanded\def\mb % math bold
+\permanent\protected\def\mb % math bold
{\ifmmode
\font_helpers_synchronize_math_family_mb
\else
@@ -474,13 +569,13 @@
\fi
\to \everymathematics
-\unexpanded\def\nobigmath {\synchronizebigmathflag\zerocount}
-\unexpanded\def\autobigmath{\synchronizebigmathflag\plusone\synchronizebigmath}
-\unexpanded\def\bigmath {\synchronizebigmathflag\plustwo\synchronizebigmath}
+\permanent\protected\def\nobigmath {\synchronizebigmathflag\zerocount}
+\permanent\protected\def\autobigmath{\synchronizebigmathflag\plusone\synchronizebigmath}
+\permanent\protected\def\bigmath {\synchronizebigmathflag\plustwo\synchronizebigmath}
-\let\bigmathfontsize\empty
+\mutable\let\bigmathfontsize\empty
-\unexpanded\def\synchronizebigmath
+\permanent\protected\def\synchronizebigmath
{\ifx\bigmathfontsize\fontsize
% already in sync
\else
@@ -488,7 +583,7 @@
\font_helpers_synchronize_math
\fi}
-\unexpanded\def\font_helpers_check_big_math_synchronization
+\protected\def\font_helpers_check_big_math_synchronization
{\ifcase\synchronizebigmathflag
% never
\or
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-mpf.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-mpf.lmt
new file mode 100644
index 00000000000..b1e6a00dd55
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-mpf.lmt
@@ -0,0 +1,173 @@
+if not modules then modules = { } end modules ['font-mpf'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local tonumber, unpack, type = tonumber, unpack, type
+
+local context = context
+local metapost = metapost
+
+local metafonts = { }
+metapost.metafonts = metafonts
+
+local sortedhash = table.sortedhash
+
+local addcharacters = fonts.constructors.addcharacters
+local fontdata = fonts.hashes.identifiers
+
+local otf = fonts.handlers.otf
+local otfregister = otf.features.register
+
+local getshapes = fonts.dropins.getshapes
+
+local setparameterset = metapost.setparameterset
+local simplemetapost = metapost.simple
+
+local register = fonts.collections.register
+local checkenabled = fonts.collections.checkenabled
+local newprivateslot = fonts.helpers.newprivateslot
+
+local currentfont = font.current
+
+local function setmetaglyphs(category,fontid,unicode,specification)
+ if unicode then
+ local tfmdata = fontdata[fontid]
+ local characters = tfmdata.characters
+ specification.unicode = unicode
+ specification.category = category
+ -- Generate one shape, make a use we pass the unicode as that is
+ -- the index in a picture list (normally). We could actually already
+ -- fetch the stream but for now we do that later (i.e. we delay the
+ -- serialization to pdf).
+ local code = specification.code
+ if code then
+ setparameterset("mpsfont",specification)
+ -- simplemetapost(instance,"begingroup;",true,true)
+ simplemetapost("simplefun",code)
+ -- simplemetapost(instance,"endgroup;",true,true)
+ end
+ -- We now know (hopefully) the dimensions of the image which is what
+ -- we need to pass to the engine in order to let it do its work.
+ local shapes = getshapes(category)
+ local units = shapes.parameters.units
+ local scale = tfmdata.parameters.size / units
+ local shape = shapes.glyphs[unicode]
+ --
+ local llx, lly, urx, ury = unpack(shape.boundingbox)
+ llx = llx * scale
+ urx = urx * scale
+ lly = lly * scale
+ ury = ury * scale
+ --
+ local newdata = { }
+ characters[unicode] = newdata -- so that we can register commands
+ fonts.dropins.swapone("mps",tfmdata,shape,unicode)
+ --
+ local olddata = characters[unicode]
+ newdata.width = urx - llx
+ newdata.height = ury
+ newdata.depth = -lly
+ newdata.unicode = unicode
+ -- commands = { { "offset", -llx, 0, newdata.commands[1][1], newdata.commands[1][2] } }
+ if llx ~= 0 then
+ newdata.commands = { { "offset", -llx, 0 }, newdata.commands[1] }
+ end
+ -- pass dimensions to lua
+ characters[unicode] = newdata
+ -- pass dimensions to tex
+ addcharacters(fontid, { characters = { [unicode] = newdata } })
+ return fontid, unicode
+ end
+end
+
+local function setmetaglyph(specification)
+ if specification then
+ local category = specification.category
+ local name = specification.name
+ if category and name then
+ local fontid = specification.fontid or currentfont()
+ local private = newprivateslot(name)
+ register(fontid,private,function(font,char)
+ return setmetaglyphs(category,font,char,specification) end
+ )
+ checkenabled()
+ end
+ end
+end
+
+local function initializempf(tfmdata,kind,value)
+ local metafont = metafonts[value]
+ if value then
+ local font = tfmdata.properties.id
+ for char, spec in sortedhash(metafont) do
+ if type(char) == "string" then
+ char = newprivateslot(char)
+ end
+ register(font,char,function(font,char)
+ return setmetaglyphs(value,font,char,spec)
+ end)
+ end
+ checkenabled()
+ end
+end
+
+fonts.helpers.setmetaglyphs = setmetaglyphs
+fonts.helpers.setmetaglyph = setmetaglyph
+
+otfregister {
+ name = "metafont",
+ description = "metafont glyphs",
+ manipulators = {
+ base = initializempf,
+ node = initializempf,
+ }
+}
+
+do
+
+ local scanners = tokens.scanners
+ local scanopen = scanners.scanopen
+ local scanclose = scanners.scanclose
+ local scanword = scanners.word
+ local scanstring = scanners.string
+
+ interfaces.implement {
+ name = "setmetaglyph",
+ public = true,
+ protected = true,
+ actions = function(t)
+ local t = { }
+ if scanopen() then
+ while not scanclose() do
+ local key = scanword()
+ if key == "shapes" then
+ if scanopen() then
+ local tt = { }
+ local nn = 0
+ while not scanclose() do
+ if scanopen() then
+ local ttt = { }
+ while not scanclose() do
+ local key = scanword()
+ ttt[key] = scanstring()
+ end
+ nn= nn + 1
+ tt[nn] = ttt
+ end
+ end
+ t[key] = tt
+ end
+ else
+ t[key] = scanstring()
+ end
+ end
+ end
+ setmetaglyph(t)
+ end
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-mps.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-mps.lmt
new file mode 100644
index 00000000000..8cab9cf5c8f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-mps.lmt
@@ -0,0 +1,398 @@
+if not modules then modules = { } end modules ['font-mps'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local tostring = tostring
+local concat = table.concat
+local formatters = string.formatters
+
+-- QP0 [QP1] QP2 => CP0 [CP1 CP2] CP3
+
+-- CP0 = QP0
+-- CP3 = QP2
+--
+-- CP1 = QP0 + 2/3 *(QP1-QP0)
+-- CP2 = QP2 + 2/3 *(QP1-QP2)
+
+fonts = fonts or { }
+local metapost = fonts.metapost or { }
+fonts.metapost = metapost
+
+local f_moveto = formatters["(%N,%N)"]
+local f_lineto = formatters["--(%N,%N)"]
+local f_curveto = formatters["..controls(%N,%N)and(%N,%N)..(%N,%N)"]
+local s_cycle = "--cycle"
+
+local f_nofill = formatters["nofill %s;"]
+local f_dofill = formatters["fill %s;"]
+
+local f_draw_trace = formatters["drawpathonly %s;"]
+local f_draw = formatters["draw %s;"]
+
+local f_boundingbox = formatters["((%N,%N)--(%N,%N)--(%N,%N)--(%N,%N)--cycle)"]
+local f_vertical = formatters["((%N,%N)--(%N,%N))"]
+
+function metapost.boundingbox(d,factor)
+ local bounds = d.boundingbox
+ local factor = factor or 1
+ local llx = factor*bounds[1]
+ local lly = factor*bounds[2]
+ local urx = factor*bounds[3]
+ local ury = factor*bounds[4]
+ return f_boundingbox(llx,lly,urx,lly,urx,ury,llx,ury)
+end
+
+function metapost.widthline(d,factor)
+ local bounds = d.boundingbox
+ local factor = factor or 1
+ local lly = factor*bounds[2]
+ local ury = factor*bounds[4]
+ local width = factor*d.width
+ return f_vertical(width,lly,width,ury)
+end
+
+function metapost.zeroline(d,factor)
+ local bounds = d.boundingbox
+ local factor = factor or 1
+ local lly = factor*bounds[2]
+ local ury = factor*bounds[4]
+ return f_vertical(0,lly,0,ury)
+end
+
+function metapost.paths(d,xfactor,yfactor)
+ local sequence = d.sequence
+ local segments = d.segments
+ local list = { }
+ local path = { } -- recycled
+ local size = 0
+ local xfactor = xfactor or 1
+ local yfactor = yfactor or xfactor
+ if sequence then
+ local i = 1
+ local n = #sequence
+ while i < n do
+ local operator = sequence[i]
+ if operator == "m" then -- "moveto"
+ if size > 0 then
+ size = size + 1
+ path[size] = s_cycle
+ list[#list+1] = concat(path,"",1,size)
+ size = 1
+ else
+ size = size + 1
+ end
+ path[size] = f_moveto(xfactor*sequence[i+1],yfactor*sequence[i+2])
+ i = i + 3
+ elseif operator == "l" then -- "lineto"
+ size = size + 1
+ path[size] = f_lineto(xfactor*sequence[i+1],yfactor*sequence[i+2])
+ i = i + 3
+ elseif operator == "c" then -- "curveto"
+ size = size + 1
+ path[size] = f_curveto(xfactor*sequence[i+1],yfactor*sequence[i+2],xfactor*sequence[i+3],yfactor*sequence[i+4],xfactor*sequence[i+5],yfactor*sequence[i+6])
+ i = i + 7
+ elseif operator =="q" then -- "quadraticto"
+ size = size + 1
+ -- first is always a moveto
+ local l_x = xfactor*sequence[i-2]
+ local l_y = yfactor*sequence[i-1]
+ local m_x = xfactor*sequence[i+1]
+ local m_y = yfactor*sequence[i+2]
+ local r_x = xfactor*sequence[i+3]
+ local r_y = yfactor*sequence[i+4]
+ path[size] = f_curveto (
+ l_x + 2/3 * (m_x-l_x),
+ l_y + 2/3 * (m_y-l_y),
+ r_x + 2/3 * (m_x-r_x),
+ r_y + 2/3 * (m_y-r_y),
+ r_x, r_y
+ )
+ i = i + 5
+ else
+ -- weird
+ i = i + 1
+ end
+ end
+ elseif segments then
+ for i=1,#segments do
+ local segment = segments[i]
+ local operator = segment[#segment]
+ if operator == "m" then -- "moveto"
+ if size > 0 then
+ size = size + 1
+ path[size] = s_cycle
+ list[#list+1] = concat(path,"",1,size)
+ size = 1
+ else
+ size = size + 1
+ end
+ path[size] = f_moveto(xfactor*segment[1],yfactor*segment[2])
+ elseif operator == "l" then -- "lineto"
+ size = size + 1
+ path[size] = f_lineto(xfactor*segment[1],yfactor*segment[2])
+ elseif operator == "c" then -- "curveto"
+ size = size + 1
+ path[size] = f_curveto(xfactor*segment[1],yfactor*segment[2],xfactor*segment[3],yfactor*segment[4],xfactor*segment[5],yfactor*segment[6])
+ elseif operator =="q" then -- "quadraticto"
+ size = size + 1
+ -- first is always a moveto
+ local prev = segments[i-1]
+ local l_x = xfactor*prev[#prev-2]
+ local l_y = yfactor*prev[#prev-1]
+ local m_x = xfactor*segment[1]
+ local m_y = yfactor*segment[2]
+ local r_x = xfactor*segment[3]
+ local r_y = yfactor*segment[4]
+ path[size] = f_curveto (
+ l_x + 2/3 * (m_x-l_x),
+ l_y + 2/3 * (m_y-l_y),
+ r_x + 2/3 * (m_x-r_x),
+ r_y + 2/3 * (m_y-r_y),
+ r_x, r_y
+ )
+ else
+ -- weird
+ end
+ end
+ else
+ return
+ end
+ if size > 0 then
+ size = size + 1
+ path[size] = s_cycle
+ list[#list+1] = concat(path,"",1,size)
+ end
+ return list
+end
+
+function metapost.fill(paths)
+ local r = { }
+ local n = #paths
+ for i=1,n do
+ if i < n then
+ r[i] = f_nofill(paths[i])
+ else
+ r[i] = f_dofill(paths[i])
+ end
+ end
+ return concat(r)
+end
+
+function metapost.draw(paths,trace)
+ local r = { }
+ local n = #paths
+ for i=1,n do
+ if trace then
+ r[i] = f_draw_trace(paths[i])
+ else
+ r[i] = f_draw(paths[i])
+ end
+ end
+ return concat(r)
+end
+
+function metapost.maxbounds(data,index,factor)
+ local maxbounds = data.maxbounds
+ local factor = factor or 1
+ local glyphs = data.glyphs
+ local glyph = glyphs[index]
+ local boundingbox = glyph.boundingbox
+ local xmin, ymin, xmax, ymax
+ if not maxbounds then
+ xmin = 0
+ ymin = 0
+ xmax = 0
+ ymax = 0
+ for i=1,#glyphs do
+ local d = glyphs[i]
+ if d then
+ local b = d.boundingbox
+ if b then
+ if b[1] < xmin then xmin = b[1] end
+ if b[2] < ymin then ymin = b[2] end
+ if b[3] > xmax then xmax = b[3] end
+ if b[4] > ymax then ymax = b[4] end
+ end
+ end
+ end
+ maxbounds = { xmin, ymin, xmax, ymax }
+ data.maxbounds = maxbounds
+ else
+ xmin = maxbounds[1]
+ ymin = maxbounds[2]
+ xmax = maxbounds[3]
+ ymax = maxbounds[4]
+ end
+ local llx = boundingbox[1]
+ local lly = boundingbox[2]
+ local urx = boundingbox[3]
+ local ury = boundingbox[4]
+ local width = glyph.width
+ if llx > 0 then
+ llx = 0
+ end
+ if width > urx then
+ urx = width
+ end
+ return f_boundingbox(
+ factor*llx,factor*ymin,
+ factor*urx,factor*ymin,
+ factor*urx,factor*ymax,
+ factor*llx,factor*ymax
+ )
+end
+
+-- This is a nice example of tex, metapost and lua working in tandem. Each kicks in at the
+-- right time. It's probably why I like watching https://www.youtube.com/watch?v=c5FqpddnJmc
+-- so much: precisely (and perfectly) timed too.
+
+local texgetbox = tex.getbox
+
+local nodecodes = nodes.nodecodes -- no nuts yet
+local rulecodes = nodes.rulecodes
+
+local rule_code = nodecodes.rule
+
+local normalrule_code = rulecodes.normal
+local outlinerule_code = rulecodes.outline
+local userrule_code = rulecodes.user
+local emptyrule_code = rulecodes.empty
+
+local nuts = nodes.nuts
+local getwhd = nuts.getwhd
+local getexpansion = nuts.getexpansion
+local isglyph = nuts.isglyph
+
+local characters = fonts.hashes.characters
+local parameters = fonts.hashes.parameters
+local shapes = fonts.hashes.shapes
+local topaths = metapost.paths
+
+local f_text = formatters["mfun_do_outline_text_flush(%q,%i,%N,%N,%q)(%,t);"]
+local f_rule = formatters["mfun_do_outline_rule_flush(%q,%N,%N,%N,%N);"]
+local f_bounds = formatters["checkbounds(%N,%N,%N,%N);"]
+local s_nothing = "(origin scaled 10)"
+
+local sc = 10
+local fc = number.dimenfactors.bp
+
+local function glyph(kind,font,char,advance,shift,ex)
+ local character = characters[font][char]
+ if character then
+ local index = character.index
+ if index then
+ local shapedata = shapes[font]
+ local glyphs = shapedata.glyphs -- todo: subfonts fonts.shapes.indexed(font,sub)
+ if glyphs then
+ local glyf = glyphs[index]
+ if glyf then
+ local units = 1000 -- factor already takes shapedata.units into account
+ local yfactor = (sc/units) * parameters[font].factor / 655.36
+ local xfactor = yfactor
+ local shift = shift or 0
+ local advance = advance or 0
+ local exfactor = ex or 0
+ local wfactor = 1
+ local detail = kind == "p" and tostring(char) or ""
+ if exfactor ~= 0 then
+ wfactor = (1+(ex/units)/1000)
+ xfactor = xfactor * wfactor
+ end
+ local paths = topaths(glyf,xfactor,yfactor)
+ if paths then
+ return f_text(kind,#paths,advance,shift,detail,paths) -- , character.width * fc * wfactor
+ end
+ end
+ end
+ end
+ end
+end
+
+metapost.glyph = glyph
+
+local kind = ""
+local buffer = { }
+local b = 0
+
+local function reset()
+ buffer = { }
+ b = 0
+end
+
+local function flushcharacter(current, pos_h, pos_v, pod_r, font, char)
+ local char, font = isglyph(current)
+ local code = glyph(kind,font,char,pos_h*fc,pos_v*fc,getexpansion(current))
+ if code then
+ b = b + 1
+ buffer[b] = code
+ end
+end
+
+local function flushrule(current, pos_h, pos_v, pos_r, size_h, size_v, subtype)
+ if subtype == normalrule_code then
+ b = b + 1
+ buffer[b] = f_rule(kind,pos_h*fc,pos_v*fc,size_h*fc,size_v*fc)
+ elseif subtype == outlinerule_code then
+ b = b + 1
+ buffer[b] = f_rule("d",pos_h*fc,pos_v*fc,size_h*fc,size_v*fc)
+ elseif subtype == userrule_code then
+ -- print("USER RULE")
+ -- b = b + 1
+ -- buffer[b] = f_rule("d",size_h*fc,size_v*fc,pos_h*fc,pos_v*fc)
+ elseif subtype == emptyrule_code then
+ -- ignore
+ else
+ -- b = b + 1
+ -- buffer[b] = f_rule("f",pos_h*fc,pos_v*fc,size_h*fc,size_v*fc)
+ end
+end
+
+local function flushsimplerule(pos_h, pos_v, pos_r, size_h, size_v)
+ flushrule(false,pos_h,pos_v,pos_r,size_h,size_v,normalrule_code)
+end
+
+local function flushspecialrule(pos_h, pos_v, pos_r, w, h, d, l, outline)
+ flushrule(false,pos_h,pos_v-d,pos_r,w,h+d,outline and outlinerule_code or normalrule_code)
+end
+
+-- installer
+
+drivers.install {
+ name = "mpo",
+ actions = {
+ initialize = function()
+ reset()
+ end,
+ finalize = function(driver,details)
+ local bb = details.boundingbox
+ local llx = bb[1] * fc
+ local lly = bb[2] * fc
+ local urx = bb[3] * fc
+ local ury = bb[4] * fc
+ b = b + 1
+ buffer[b] = f_bounds(llx,lly,urx,ury)
+ -- inspect(buffer)
+ end,
+ },
+ flushers = {
+ updatefontstate = updatefontstate,
+ character = flushcharacter,
+ rule = flushrule,
+ simplerule = flushsimplerule,
+ specialrule = flushspecialrule,
+ }
+}
+
+function metapost.boxtomp(n,k)
+ kind = k
+ nodes.handlers.finalizebox(n)
+ drivers.converters.lmtx(drivers.instances.mpo,texgetbox(n),"box",1)
+ local result = concat(buffer,";")
+ reset()
+ return result
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-ogr.lua b/Master/texmf-dist/tex/context/base/mkxl/font-ogr.lmt
index 94cf9149401..698593ac7e0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-ogr.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-ogr.lmt
@@ -9,13 +9,7 @@ if not modules then modules = { } end modules ['font-ogr'] = {
-- Here we deal with graphic variants and for now also color support ends up here
-- but that might change. It's lmtx only code.
-if not context then
- return
-elseif CONTEXTLMTXMODE == 0 then
- return
-end
-
-local tostring, tonumber, next, type = tostring, tonumber, next, type
+local tostring, tonumber, next, type, rawget = tostring, tonumber, next, type, rawget
local round, max, mod, div = math.round, math.max, math.mod, math.div
local find = string.find
local concat, setmetatableindex, sortedhash = table.concat, table.setmetatableindex, table.sortedhash
@@ -59,27 +53,28 @@ do
-- todo: pass specification table instead
function dropins.provide(method,t_tfmdata,indexdata,...)
- local droppedin = dropins.nextid()
- local t_characters = t_tfmdata.characters
- local t_descriptions = t_tfmdata.descriptions
- local t_properties = t_tfmdata.properties
- local d_tfmdata = setmetatableindex({ },t_tfmdata)
- local d_properties = setmetatableindex({ },t_properties)
- d_tfmdata.properties = d_properties
- local d_characters = { } -- setmetatableindex({ },t_characters) -- hm, index vs unicode
- local d_descriptions = { } -- setmetatableindex({ },t_descriptions) -- hm, index vs unicode
- d_tfmdata.characters = d_characters
- d_tfmdata.descriptions = d_descriptions
- d_properties.instance = - droppedin -- will become an extra element in the hash
- t_properties.virtualized = true
- identifiers[droppedin] = d_tfmdata
- local fonts = t_tfmdata.fonts or { }
- t_tfmdata.fonts = fonts
- d_properties.format = "type3"
- d_properties.method = method
- d_properties.indexdata = { indexdata, ... } -- can take quite some memory
- local slot = #fonts + 1
- fonts[slot] = { id = droppedin }
+ local droppedin = dropins.nextid()
+ local t_characters = t_tfmdata.characters
+ local t_descriptions = t_tfmdata.descriptions
+ local t_properties = t_tfmdata.properties
+ local d_tfmdata = setmetatableindex({ },t_tfmdata)
+ local d_properties = setmetatableindex({ },t_properties)
+ d_properties.basefontname = "ContextRuntimeFont" .. droppedin
+ d_tfmdata.properties = d_properties
+ local d_characters = { } -- setmetatableindex({ },t_characters) -- hm, index vs unicode
+ local d_descriptions = { } -- setmetatableindex({ },t_descriptions) -- hm, index vs unicode
+ d_tfmdata.characters = d_characters
+ d_tfmdata.descriptions = d_descriptions
+ d_tfmdata.parentdata = t_tfmdata -- so we can access it if needed
+ d_properties.instance = - droppedin -- will become an extra element in the hash
+ identifiers[droppedin] = d_tfmdata
+ local fonts = t_tfmdata.fonts or { }
+ t_tfmdata.fonts = fonts
+ d_properties.format = "type3"
+ d_properties.method = method
+ d_properties.indexdata = { indexdata, ... } -- can take quite some memory
+ local slot = #fonts + 1
+ fonts[slot] = { id = droppedin }
return slot, droppedin, d_tfmdata, d_properties
end
@@ -127,13 +122,57 @@ do
end
end
- function dropins.swap(method,tfmdata,shapes,...) -- by unicode
+-- function dropins.swap(method,tfmdata,shapes,...) -- by unicode
+-- if method and shapes then
+-- local characters = tfmdata.characters
+-- local descriptions = tfmdata.descriptions
+-- local droppedin, tfmdrop, dropchars, dropdescs, colrshapes
+-- local idx = 255
+-- local slot = 0
+-- -- we can have a variant where shaped are by unicode and not by index
+-- for k, v in next, characters do
+-- local description = descriptions[k]
+-- if description then
+-- local shape = shapes[k]
+-- if shape then
+-- if idx >= 255 then
+-- idx = 1
+-- colrshapes = setmetatableindex({ },shapes)
+-- slot, droppedin, tfmdrop = dropins.provide(method,tfmdata,colrshapes)
+-- dropchars = tfmdrop.characters
+-- dropdescs = tfmdrop.descriptions
+-- else
+-- idx = idx + 1
+-- end
+-- colrshapes[idx] = shape -- so not: description
+-- -- todo: prepend
+-- v.commands = { { "slot", slot, idx } }
+-- -- hack to prevent that type 3 also gets 'use' flags .. todo
+-- local c = { commands = false, index = idx, dropin = tfmdrop }
+-- local d = { } -- index = idx, dropin = tfmdrop }
+-- setmetatableindex(c,v)
+-- setmetatableindex(d,description)
+-- dropchars[idx] = c
+-- dropdescs[idx] = d -- not needed
+-- end
+-- end
+-- end
+-- else
+-- -- error
+-- end
+-- end
+
+ function dropins.swap(method,tfmdata,shapes) -- by unicode
if method and shapes then
local characters = tfmdata.characters
local descriptions = tfmdata.descriptions
- local droppedin, tfmdrop, dropchars, dropdescs, colrshapes
- local idx = 255
- local slot = 0
+ local droppedin = tfmdata.droppedin
+ local tfmdrop = tfmdata.tfmdrop
+ local dropchars = tfmdata.dropchars
+ local dropdescs = tfmdata.dropdescs
+ local colrshapes = tfmdata.colrshapes
+ local idx = tfmdata.dropindex or 255
+ local slot = tfmdata.dropslot or 0
-- we can have a variant where shaped are by unicode and not by index
for k, v in next, characters do
local description = descriptions[k]
@@ -162,11 +201,62 @@ do
end
end
end
+ tfmdata.droppedin = droppedin
+ tfmdata.tfmdrop = tfmdrop
+ tfmdata.dropchars = dropchars
+ tfmdata.dropdescs = dropdescs
+ tfmdata.colrshapes = colrshapes
+ tfmdata.dropindex = idx
+ tfmdata.dropslot = slot
else
-- error
end
end
+ function dropins.swapone(method,tfmdata,shape,unicode)
+ if method and shape then
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local droppedin = tfmdata.droppedin
+ local tfmdrop = tfmdata.tfmdrop
+ local dropchars = tfmdata.dropchars
+-- local dropdescs = tfmdata.dropdescs
+ local colrshapes = tfmdata.colrshapes
+ local idx = tfmdata.dropindex or 255
+ local slot = tfmdata.dropslot or 0
+ local character = characters[unicode]
+-- local description = descriptions[unicode] or { }
+ if character then
+ if idx >= 255 then
+ idx = 1
+ colrshapes = setmetatableindex({ },shapes)
+ slot, droppedin, tfmdrop = dropins.provide(method,tfmdata,colrshapes)
+ dropchars = tfmdrop.characters
+ dropdescs = tfmdrop.descriptions
+ else
+ idx = idx + 1
+ end
+ colrshapes[idx] = shape.code -- so not: description
+ -- todo: prepend
+ character.commands = { { "slot", slot, idx } }
+ -- hack to prevent that type 3 also gets 'use' flags .. todo
+ local c = { commands = false, index = idx, dropin = tfmdrop }
+-- local d = { } -- index = idx, dropin = tfmdrop }
+ setmetatableindex(c,character)
+-- setmetatableindex(d,description)
+ dropchars[idx] = c
+-- dropdescs[idx] = d -- not needed
+ end
+ tfmdata.droppedin = droppedin
+ tfmdata.tfmdrop = tfmdrop
+ tfmdata.dropchars = dropchars
+-- tfmdata.dropdescs = dropdescs
+ tfmdata.colrshapes = colrshapes
+ tfmdata.dropindex = idx
+ tfmdata.dropslot = slot
+ end
+ end
+
end
do -- this will move to its own module
@@ -177,13 +267,22 @@ do -- this will move to its own module
local v = {
glyphs = { },
parameters = {
- units = 1000
+ units = 10
},
}
t[k] = v
return v
end)
+ function dropins.getshape(name,n)
+ local s = shapes[name]
+ return s and s.glyphs and s.glyphs[n]
+ end
+
+ function dropins.getshapes(name)
+ return shapes[name]
+ end
+
function dropins.registerglyphs(parameters)
local category = parameters.name
local target = shapes[category].parameters
@@ -248,6 +347,8 @@ do -- this will move to its own module
return false
end
+ -- list of tonumber keywords
+
local function initializemps(tfmdata,kind,value)
if value then
local specification = settings_to_hash_strict(value)
@@ -262,9 +363,20 @@ do -- this will move to its own module
local categories = settings_to_array(category)
local usedshapes = nil
local index = 0
- local spread = tonumber(specification.spread or 0)
+ local spread = tonumber(specification.spread or 0) -- hm
local hascolor = hascolorspec(specification)
- specification.spread = spread -- now a number
+
+ specification.spread = spread -- now a number, maybe also for slant, weight etc
+
+ local preroll = specification.preroll
+ if preroll then
+ metapost.simple(instance,"begingroup;",true,true)
+ metapost.setparameterset("mpsfont",specification)
+ metapost.simple("simplefun",preroll)
+ metapost.setparameterset("mpsfont")
+ metapost.simple(instance,"endgroup;",true,true)
+ end
+
for i=1,#categories do
local category = categories[i]
local mpsshapes = shapes[category]
@@ -297,25 +409,45 @@ do -- this will move to its own module
}
-- todo: deal with extensibles and more properties
for unicode, shape in sortedhash(mpsshapes.glyphs) do
- -- local oldc = characters[unicode]
- -- if oldc then
- index = index + 1 -- todo: somehow we end up with 2 as first entry after 0
- local wd = shape.width or defaultwidth
- local ht = shape.height or defaultheight
- local dp = shape.depth or defaultdepth
- local newc = {
- index = index, -- into usedshapes
- width = scale * (wd + spread),
- height = scale * ht,
- depth = scale * dp,
- unicode = unicode,
- }
- --
- characters [unicode] = newc
- descriptions[unicode] = newc
- --
- usedshapes[unicode] = shape.code or defaultcode
- -- end
+ index = index + 1 -- todo: somehow we end up with 2 as first entry after 0
+ local wd = shape.width or defaultwidth
+ local ht = shape.height or defaultheight
+ local dp = shape.depth or defaultdepth
+ local bb = shape.boundingbox
+ local uc = shape.tounicode
+ if uc then
+ uc = round(uc) -- brrr can be 123.0
+ end
+ if bb then
+ for i=1,4 do bb[i] = scale * bb[i] end
+ end
+ local newc = {
+ index = index, -- into usedshapes -- used?
+ width = scale * (wd + spread),
+ height = scale * ht,
+ depth = scale * dp,
+ boundingbox = bb,
+ unicode = uc or unicode,
+ -- shape = shape, -- maybe a copy
+ }
+ --
+ characters [unicode] = newc
+ descriptions[unicode] = newc
+ usedshapes [unicode] = shape.code or defaultcode
+ --
+ -- This is a way to get/use randomized shapes (see punk example).
+ --
+ if uc and uc ~= unicode then
+ local c = characters[uc]
+ if c then
+ local v = c.variants
+ if v then
+ v[#v + 1] = unicode
+ else
+ c.variants = { unicode }
+ end
+ end
+ end
end
end
end
@@ -357,18 +489,23 @@ end
-- This is also somewhat specific.
-local sharedpalettes do
+local color_direct = function() return false end
+local color_indirect = color_direct
+
+updaters.register("backend.update",function()
+ color_direct = lpdf.fonts.color_direct
+ color_indirect = lpdf.fonts.color_indirect
+end)
+
+local sharedpalettes = { } do
- sharedpalettes = { }
+ local register = attributes.colors.register
- local colors = attributes.list[attributes.private('color')] or { }
- local transparencies = attributes.list[attributes.private('transparency')] or { }
+ local colors = attributes.list[attributes.private('color')] or { }
+ local transparencies = attributes.list[attributes.private('transparency')] or { }
function otf.registerpalette(name,values)
sharedpalettes[name] = values
- local color = lpdf.color
- local transparency = lpdf.transparency
- local register = colors.register
for i=1,#values do
local v = values[i]
if v == "textcolor" then
@@ -386,13 +523,7 @@ local sharedpalettes do
c = colors[v]
t = transparencies[v]
end
- if c and t then
- values[i] = color(1,c) .. " " .. transparency(t)
- elseif c then
- values[i] = color(1,c)
- elseif t then
- values[i] = color(1,t)
- end
+ values[i] = color_indirect(c,t)
end
end
end
@@ -401,29 +532,11 @@ end
local initializeoverlay do
- -- we should use the proper interface instead but for now:
-
- local colors = attributes.colors
- local rgbtocmyk = colors.rgbtocmyk
-
- local f_cmyk = formatters["%.3N %.3f %.3N %.3N k"]
- local f_rgb = formatters["%.3N %.3f %.3N rg"]
- local f_gray = formatters["%.3N g"]
-
- local function convert(t,k)
+ local function autoconvert(t,k)
local v = { }
- local m = colors.model
for i=1,#k do
local p = k[i]
- local r, g, b = p[1]/255, p[2]/255, p[3]/255
- if r == g and g == b then
- p = f_gray(r)
- elseif m == "cmyk" then
- p = f_cmyk(rgbtocmyk(r,g,b))
- else
- p = f_rgb(r,g,b)
- end
- v[i] = p
+ v[i] = color_direct(p[1]/255, p[2]/255, p[3]/255)
end
t[k] = v
return v
@@ -437,7 +550,7 @@ local initializeoverlay do
--
local converted = resources.converted
if not converted then
- converted = setmetatableindex(convert)
+ converted = setmetatableindex(autoconvert)
resources.converted = converted
end
local colorvalues = sharedpalettes[value]
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt
new file mode 100644
index 00000000000..6475c57e64b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-ota.lmt
@@ -0,0 +1,580 @@
+if not modules then modules = { } end modules ['font-ota'] = {
+ 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"
+}
+
+-- context only
+
+local type = type
+local setmetatableindex = table.setmetatableindex
+
+if not trackers then trackers = { register = function() end } end
+
+----- trace_analyzing = false trackers.register("otf.analyzing", function(v) trace_analyzing = v end)
+
+local fonts, nodes, node = fonts, nodes, node
+
+local allocate = utilities.storage.allocate
+
+local otf = fonts.handlers.otf
+
+local analyzers = fonts.analyzers
+local initializers = allocate()
+local methods = allocate()
+
+analyzers.initializers = initializers
+analyzers.methods = methods
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getprev = nuts.getprev
+local getprop = nuts.getprop
+local setprop = nuts.setprop
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local ischar = nuts.ischar
+local isnextchar = nuts.isnextchar
+----- isprevchar = nuts.isprevchar
+
+local end_of_math = nuts.end_of_math
+
+local nodecodes = nodes.nodecodes
+local disc_code = nodecodes.disc
+local math_code = nodecodes.math
+
+local fontdata = fonts.hashes.identifiers
+local descriptiondata = fonts.hashes.descriptions
+local categories = characters and characters.categories or { } -- sorry, only in context
+local chardata = characters and characters.data
+
+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]]--
+
+local setstate = nuts.setstate
+local getstate = nuts.getstate
+
+local classifiers = characters.classifiers
+
+-- never use these numbers directly
+
+local s_init = 1 local s_rphf = 7
+local s_medi = 2 local s_half = 8
+local s_fina = 3 local s_pref = 9
+local s_isol = 4 local s_blwf = 10
+local s_mark = 5 local s_pstf = 11
+local s_rest = 6
+
+local states = allocate {
+ init = s_init,
+ medi = s_medi,
+ med2 = s_medi,
+ fina = s_fina,
+ fin2 = s_fina,
+ fin3 = s_fina,
+ isol = s_isol,
+ mark = s_mark,
+ rest = s_rest,
+ rphf = s_rphf,
+ half = s_half,
+ pref = s_pref,
+ blwf = s_blwf,
+ pstf = s_pstf,
+}
+
+local features = allocate {
+ init = s_init,
+ medi = s_medi,
+ med2 = s_medi,
+ fina = s_fina,
+ fin2 = s_fina,
+ fin3 = s_fina,
+ isol = s_isol,
+ -- mark = s_mark,
+ -- rest = s_rest,
+ rphf = s_rphf,
+ half = s_half,
+ pref = s_pref,
+ blwf = s_blwf,
+ pstf = s_pstf,
+}
+
+local mappers = allocate {
+ l = s_init, -- left
+ d = s_medi, -- double
+ c = s_medi, -- joiner
+ r = s_fina, -- right
+ u = s_isol, -- nonjoiner
+}
+
+analyzers.states = states
+analyzers.features = features
+analyzers.useunicodemarks = false
+
+if not classifiers then
+
+ -- why not just always use categories[k] = "mn"
+
+ local f_arabic, l_arabic = characters.blockrange("arabic")
+ local f_syriac, l_syriac = characters.blockrange("syriac")
+ local f_mandiac, l_mandiac = characters.blockrange("mandiac")
+ local f_nko, l_nko = characters.blockrange("nko")
+ local f_ext_a, l_ext_a = characters.blockrange("arabicextendeda")
+
+ classifiers = setmetatableindex(function(t,k)
+ if type(k) == "number" then
+ local c = chardata[k]
+ local v = false
+ if c then
+ local arabic = c.arabic
+ if arabic then
+ v = mappers[arabic]
+ if not v then
+ log.report("analyze","error in mapping arabic %C",k)
+ -- error
+ v = false
+ end
+ elseif (k >= f_arabic and k <= l_arabic) or
+ (k >= f_syriac and k <= l_syriac) or
+ (k >= f_mandiac and k <= l_mandiac) or
+ (k >= f_nko and k <= l_nko) or
+ (k >= f_ext_a and k <= l_ext_a) then
+ if categories[k] == "mn" then
+ v = s_mark
+ else
+ v = s_rest
+ end
+ end
+ end
+ t[k] = v
+ return v
+ end
+ end)
+
+ characters.classifiers = classifiers
+
+end
+
+-- todo: analyzers per script/lang, cross font, so we need an font id hash -> script
+-- e.g. latin -> hyphenate, arab -> 1/2/3 analyze -- its own namespace
+
+local is_letter = characters.is_letter
+local is_mark = characters.is_mark
+
+function analyzers.setstate(head,font) -- latin
+ local useunicodemarks = analyzers.useunicodemarks
+ local descriptions = descriptiondata[font]
+ local first = false
+ local last = false
+ local current = head
+ local done = false
+ -- only letters
+ while current do
+ -- local char, id = ischar(current,font)
+ local nxt, char, id = isnextchar(current,font)
+ if char then
+ if not getstate(current) then
+ -- local d = descriptions[char]
+ -- if d then
+ -- if d.class == "mark" or (useunicodemarks and categories[char] == "mn") then
+ if is_mark[char] then
+ setstate(current,s_mark)
+ elseif is_letter[char] then
+ if first then
+ setstate(current,s_medi)
+ else
+ setstate(current,s_init)
+ first = current
+ done = true
+ end
+ last = current
+ else
+ goto PICKUP
+ end
+ goto NEXT
+ -- end
+ end
+ ::PICKUP::
+ if first then
+ setstate(last,first == last and s_isol or s_fina)
+ end
+ first = false
+ elseif char == false then
+ -- other font
+ if first then
+ setstate(last,first == last and s_isol or s_fina)
+ end
+ first = false
+ if id == math_code then
+ -- current = end_of_math(current)
+ nxt = getnext(end_of_math(current))
+ end
+ elseif id == disc_code then
+ -- always in the middle .. it doesn't make much sense to assign a property
+ -- here ... we might at some point decide to flag the components when present
+ -- but even then it's kind of bogus
+ setstate(current,s_medi)
+ last = current
+ else -- finish
+ if first then
+ setstate(last,first == last and s_isol or s_fina)
+ end
+ first = false
+ if id == math_code then
+ current = end_of_math(current)
+ end
+ end
+ ::NEXT::
+ -- current = getnext(current)
+ current = nxt
+ end
+ if first then
+ setstate(last,first == last and s_isol or s_fina)
+ end
+ return head, done
+end
+
+-- in the future we will use language/script attributes instead of the
+-- font related value, but then we also need dynamic features which is
+-- somewhat slower; and .. we need a chain of them
+
+local function analyzeinitializer(tfmdata,value) -- attr
+ local script, language = otf.scriptandlanguage(tfmdata) -- attr
+ local action = initializers[script]
+ if not action then
+ -- skip
+ elseif type(action) == "function" then
+ return action(tfmdata,value)
+ else
+ local action = action[language]
+ if action then
+ return action(tfmdata,value)
+ end
+ end
+end
+
+local function analyzeprocessor(head,font,attr)
+ local tfmdata = fontdata[font]
+ local script, language = otf.scriptandlanguage(tfmdata,attr)
+ local action = methods[script]
+ if not action then
+ -- skip
+ elseif type(action) == "function" then
+ return action(head,font,attr)
+ else
+ action = action[language]
+ if action then
+ return action(head,font,attr)
+ end
+ end
+ return head, false
+end
+
+registerotffeature {
+ name = "analyze",
+ description = "analysis of character classes",
+ default = true,
+ initializers = {
+ node = analyzeinitializer,
+ },
+ processors = {
+ position = 1,
+ node = analyzeprocessor,
+ }
+}
+
+-- latin
+
+methods.latn = analyzers.setstate
+-------.dflt = analyzers.setstate % can be an option or just the default
+
+local arab_warned = { }
+
+local function warning(current,what)
+ local char = getchar(current)
+ if not arab_warned[char] then
+ log.report("analyze","arab: character %C has no %a class",char,what)
+ arab_warned[char] = true
+ end
+end
+
+-- we can also use this trick for devanagari
+
+function methods.arab(head,font,attr)
+ local first, last, c_first, c_last
+ local current = head
+ local done = false
+ current = tonut(current)
+ while current do
+ -- local char, id = ischar(current,font)
+ local nxt, char, id = isnextchar(current,font)
+ if char and not getstate(current) then
+ done = true
+ local classifier = classifiers[char]
+ if not classifier then
+ if last then
+ if c_last == s_medi or c_last == s_fina then
+ setstate(last,s_fina)
+ else
+ warning(last,"fina")
+ setstate(last,s_error)
+ end
+ first = nil
+ last = nil
+ elseif first then
+ if c_first == s_medi or c_first == s_fina then
+ setstate(first,s_isol)
+ else
+ warning(first,"isol")
+ setstate(first,s_error)
+ end
+ first = nil
+ end
+ elseif classifier == s_mark then
+ setstate(current,s_mark)
+ elseif classifier == s_isol then
+ if last then
+ if c_last == s_medi or c_last == s_fina then
+ setstate(last,s_fina)
+ else
+ warning(last,"fina")
+ setstate(last,s_error)
+ end
+ first = nil
+ last = nil
+ elseif first then
+ if c_first == s_medi or c_first == s_fina then
+ setstate(first,s_isol)
+ else
+ warning(first,"isol")
+ setstate(first,s_error)
+ end
+ first = nil
+ end
+ setstate(current,s_isol)
+ elseif classifier == s_medi then
+ if first then
+ last = current
+ c_last = classifier
+ setstate(current,s_medi)
+ else
+ setstate(current,s_init)
+ first = current
+ c_first = classifier
+ end
+ elseif classifier == s_fina then
+ if last then
+ if getstate(last) ~= s_init then
+ setstate(last,s_medi)
+ end
+ setstate(current,s_fina)
+ first, last = nil, nil
+ elseif first then
+ -- if getstate(first) ~= s_init then
+ -- -- needs checking
+ -- setstate(first,s_medi)
+ -- end
+ setstate(current,s_fina)
+ first = nil
+ else
+ setstate(current,s_isol)
+ end
+ else -- classifier == s_rest
+ setstate(current,s_rest)
+ if last then
+ if c_last == s_medi or c_last == s_fina then
+ setstate(last,s_fina)
+ else
+ warning(last,"fina")
+ setstate(last,s_error)
+ end
+ first = nil
+ last = nil
+ elseif first then
+ if c_first == s_medi or c_first == s_fina then
+ setstate(first,s_isol)
+ else
+ warning(first,"isol")
+ setstate(first,s_error)
+ end
+ first = nil
+ end
+ end
+ else
+ if last then
+ if c_last == s_medi or c_last == s_fina then
+ setstate(last,s_fina)
+ else
+ warning(last,"fina")
+ setstate(last,s_error)
+ end
+ first = nil
+ last = nil
+ elseif first then
+ if c_first == s_medi or c_first == s_fina then
+ setstate(first,s_isol)
+ else
+ warning(first,"isol")
+ setstate(first,s_error)
+ end
+ first = nil
+ end
+ if id == math_code then -- a bit duplicate as we test for glyphs twice
+ -- current = end_of_math(current)
+ nxt = getnext(end_of_math(current))
+ end
+ end
+ -- current = getnext(current)
+ current = nxt
+ end
+ if last then
+ if c_last == s_medi or c_last == s_fina then
+ setstate(last,s_fina)
+ else
+ warning(last,"fina")
+ setstate(last,s_error)
+ end
+ elseif first then
+ if c_first == s_medi or c_first == s_fina then
+ setstate(first,s_isol)
+ else
+ warning(first,"isol")
+ setstate(first,s_error)
+ end
+ end
+ return head, done
+end
+
+methods.syrc = methods.arab
+methods.mand = methods.arab
+methods.nko = methods.arab
+
+-- a quick first attemp .. more later
+
+do
+
+ -- https://github.com/n8willis/opentype-shaping-documents/blob/master/opentype-shaping-mongolian.md#joining-properties
+ -- todo syrc
+
+ local joining = setmetatableindex(function(t,k)
+ if type(k) == "number" then
+ local c = chardata[k]
+ local v = false
+ if c then
+ local mongolian = c.mongolian
+ --
+ v = mongolian
+ end
+ t[k] = v
+ return v
+ end
+ end)
+
+ function methods.mong(head,font,attr)
+ local first, last
+ local current = head
+ local done = false
+ local prevjoin = nil
+ local prestate = nil
+ current = tonut(current)
+
+ local function wrapup()
+ if last then
+ if last ~= first then
+ local s = getstate(last)
+ if s == s_medi then
+ setstate(last,s_fina)
+ elseif s == s_init then
+ setstate(last,s_isol)
+ end
+ end
+ last = nil
+ first = nil
+ prevjoin = nil
+ prestate = nil
+ end
+ end
+
+ while current do
+ -- local char, id = ischar(current,font)
+ local nxt, char, id = isnextchar(current,font)
+ if char and not getstate(current) then
+ local currjoin = joining[char]
+ done = true
+ if not last then
+ setstate(current,s_isol)
+ prevjoin = currjoin
+ first = current
+ last = current
+ prevstate = s_isol
+ elseif currjoin == "t" then -- transparent
+ -- keep state
+ last = current
+ elseif prevjoin == "d" or prevjoin == "jc" or prevjoin == "l" then
+ if currjoin == "d" or prevjoin == "jc" or prevjoin == "r" then
+ local s = getstate(last)
+ if s == s_isol then
+ setstate(last,s_init)
+ elseif s == s_fina then
+ setstate(last,s_medi)
+ end
+ setstate(current,s_fina)
+ prevstate = s_fina
+ elseif prevjoin == "nj" or prevjoin == "l" then
+ local s = getstate(last)
+ if s == s_medi then
+ setstate(last,s_fina)
+ elseif s == s_init then
+ setstate(last,s_isol)
+ end
+ setstate(current,s_isol)
+ prevstate = s_isol
+ end
+ prevjoin = currjoin
+ last = current
+ elseif prevjoin == "nj" or prevjoin == "r" then
+ if s == s_medi then
+ setstate(last,s_fina)
+ elseif s == s_init then
+ setstate(last,s_isol)
+ end
+ setstate(current,s_isol)
+ prevjoin = currjoin
+ prevstate = s_isol
+ last = current
+ elseif last then
+ wrapup()
+ end
+ else
+ if last then
+ wrapup()
+ end
+ if id == math_code then -- a bit duplicate as we test for glyphs twice
+ -- current = end_of_math(current)
+ nxt = getnext(end_of_math(current))
+ end
+ end
+ -- current = getnext(current)
+ current = nxt
+ end
+ if last then
+ wrapup()
+ end
+ return head, done
+ end
+
+end
+
+directives.register("otf.analyze.useunicodemarks",function(v)
+ analyzers.useunicodemarks = v
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-otj.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-otj.lmt
new file mode 100644
index 00000000000..e9e9d524e4f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-otj.lmt
@@ -0,0 +1,2556 @@
+if not modules then modules = { } end modules ['font-otj'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to font-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- This property based variant is not faster but looks nicer than the attribute one. We
+-- need to use rawget (which is about 4 times slower than a direct access but we cannot
+-- get/set that one for our purpose! This version does a bit more with discretionaries
+-- (and Kai has tested it with his collection of weird fonts.)
+
+-- There is some duplicate code here (especially in the the pre/post/replace branches) but
+-- we go for speed. We could store a list of glyph and mark nodes when registering but it's
+-- cleaner to have an identification pass here. Also, I need to keep tracing in mind so
+-- being too clever here is dangerous.
+
+-- As we have a rawget on properties we don't need one on injections.
+
+-- The use_advance code was just a test and is meant for testing and manuals. There is no
+-- performance (or whatever) gain and using kerns is somewhat cleaner (at least for now).
+
+-- An alternative is to have a list per base of all marks and then do a run over the node
+-- list that resolves the accumulated l/r/x/y and then do an inject pass.
+
+-- The thing with these positioning options is that it is not clear what Uniscribe does with
+-- the 2rl flag and we keep oscillating a between experiments.
+
+-- Beware: combining advance with cursive and marks can be a problem because marks have no
+-- dimensions .. maybe we need a special field for that ... the advance also sets the apply
+-- x offset flag!
+
+if not nodes.properties then return end
+
+local next, rawget, tonumber = next, rawget, tonumber
+local fastcopy = table.fastcopy
+
+local registertracker = trackers.register
+local registerdirective = directives.register
+
+local trace_injections = false registertracker("fonts.injections", function(v) trace_injections = v end)
+local trace_marks = false registertracker("fonts.injections.marks", function(v) trace_marks = v end)
+local trace_cursive = false registertracker("fonts.injections.cursive", function(v) trace_cursive = v end)
+local trace_spaces = false registertracker("fonts.injections.spaces", function(v) trace_spaces = v end)
+
+-- local fix_cursive_marks = false
+--
+-- registerdirective("fonts.injections.fixcursivemarks", function(v)
+-- fix_cursive_marks = v
+-- end)
+
+local report_injections = logs.reporter("fonts","injections")
+local report_spaces = logs.reporter("fonts","spaces")
+
+local attributes, nodes, node = attributes, nodes, node
+
+fonts = fonts
+local hashes = fonts.hashes
+local fontdata = hashes.identifiers
+local fontmarks = hashes.marks
+local parameters = fonts.hashes.parameters -- not in generic
+----- resources = fonts.hashes.resources -- not in generic
+
+nodes.injections = nodes.injections or { }
+local injections = nodes.injections
+
+local tracers = nodes.tracers
+local setcolor = tracers and tracers.colors.set
+local resetcolor = tracers and tracers.colors.reset
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getfont = nuts.getfont
+local getchar = nuts.getchar
+local setchar = nuts.setchar
+----- getxoffset = nuts.getxoffset
+----- getyoffset = nuts.getyoffset
+local getoffsets = nuts.getoffsets
+local getxscale = nuts.getxscale
+local getyscale = nuts.getyscale
+local getxyscales = nuts.getxyscales
+local xscaled = nuts.xscaled
+local yscaled = nuts.yscaled
+local getboth = nuts.getboth
+local getdisc = nuts.getdisc
+local setdisc = nuts.setdisc
+local setoffsets = nuts.setoffsets
+local addxoffset = nuts.addxoffset
+local addyoffset = nuts.addyoffset
+local ischar = nuts.ischar
+local isnextchar = nuts.isnextchar
+local getkern = nuts.getkern
+local setkern = nuts.setkern
+local setlink = nuts.setlink
+local setwidth = nuts.setwidth
+local getwidth = nuts.getwidth
+local addxymargins = nuts.addxymargins -- we delegate scaling
+local copynode = nuts.copy
+
+local nextchar = nuts.traversers.char
+local nextglue = nuts.traversers.glue
+
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+
+local properties = nodes.properties.data
+
+local fontkern = nuts.pool and nuts.pool.fontkern
+local italickern = nuts.pool and nuts.pool.italickern
+
+local useitalickerns = false
+local useadvance = false
+local usezwjkerns = true -- when useadvance
+
+directives.register("fonts.injections.useitalics", function(v)
+ if v then
+ report_injections("using italics for space kerns (tracing only)")
+ end
+ useitalickerns = v
+end)
+
+registerdirective("fonts.injections.method", function(v)
+ useadvance = v == "advance"
+end)
+
+function injections.installnewkern() end -- obsolete
+
+local nofregisteredkerns = 0
+local nofregisteredpositions = 0
+local nofregisteredmarks = 0
+local nofregisteredcursives = 0
+local keepregisteredcounts = false
+
+function injections.keepcounts()
+ keepregisteredcounts = true
+end
+
+function injections.resetcounts()
+ nofregisteredkerns = 0
+ nofregisteredpositions = 0
+ nofregisteredmarks = 0
+ nofregisteredcursives = 0
+ keepregisteredcounts = false
+end
+
+-- We need to make sure that a possible metatable will not kick in unexpectedly.
+
+function injections.reset(n)
+ local p = rawget(properties,n)
+ if p then
+ p.injections = false -- { } -- nil should work too as we use rawget
+ else
+ properties[n] = false -- { injections = { } } -- nil should work too as we use rawget
+ end
+end
+
+function injections.copy(target,source)
+ local sp = rawget(properties,source)
+ if sp then
+ local tp = rawget(properties,target)
+ local si = sp.injections
+ if si then
+ si = fastcopy(si)
+ if tp then
+ tp.injections = si
+ else
+ properties[target] = {
+ injections = si,
+ }
+ end
+ elseif tp then
+ tp.injections = false -- { }
+ else
+ properties[target] = { injections = { } }
+ end
+ else
+ local tp = rawget(properties,target)
+ if tp then
+ tp.injections = false -- { }
+ else
+ properties[target] = false -- { injections = { } }
+ end
+ end
+end
+
+function injections.setligaindex(n,index) -- todo: don't set when 0
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections
+ if i then
+ i.ligaindex = index
+ else
+ p.injections = {
+ ligaindex = index
+ }
+ end
+ else
+ properties[n] = {
+ injections = {
+ ligaindex = index
+ }
+ }
+ end
+end
+
+function injections.getligaindex(n,default)
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections
+ if i then
+ return i.ligaindex or default
+ end
+ end
+ return default
+end
+
+function injections.setcursive(start,nxt,factor,rlmode,exit,entry,tfmstart,tfmnext,r2lflag)
+
+ -- The standard says something about the r2lflag related to the first in a series:
+ --
+ -- When this bit is set, the last glyph in a given sequence to which the cursive
+ -- attachment lookup is applied, will be positioned on the baseline.
+ --
+ -- But it looks like we don't need to consider it.
+
+ local dx = factor*(exit[1]-entry[1])
+ local dy = -factor*(exit[2]-entry[2])
+ local ws = tfmstart.width
+ local wn = tfmnext.width
+ nofregisteredcursives = nofregisteredcursives + 1
+ if rlmode < 0 then
+ dx = -(dx + wn)
+ else
+ dx = dx - ws
+ end
+ if dx == 0 then
+ -- get rid of funny -0
+ dx = 0
+ end
+ --
+ local p = rawget(properties,start)
+ if p then
+ local i = p.injections
+ if i then
+ i.cursiveanchor = true
+ else
+ p.injections = {
+ cursiveanchor = true,
+ }
+ end
+ else
+ properties[start] = {
+ injections = {
+ cursiveanchor = true,
+ },
+ }
+ end
+ local p = rawget(properties,nxt)
+ if p then
+ local i = p.injections
+ if i then
+ i.cursivex = dx
+ i.cursivey = dy
+ else
+ p.injections = {
+ cursivex = dx,
+ cursivey = dy,
+ }
+ end
+ else
+ properties[nxt] = {
+ injections = {
+ cursivex = dx,
+ cursivey = dy,
+ },
+ }
+ end
+ return dx, dy, nofregisteredcursives
+end
+
+-- kind: 0=single 1=first of pair, 2=second of pair
+
+function injections.setposition(kind,current,factor,rlmode,spec,injection)
+ local x = factor * (spec[1] or 0)
+ local y = factor * (spec[2] or 0)
+ local w = factor * (spec[3] or 0)
+ local h = factor * (spec[4] or 0)
+ if x ~= 0 or w ~= 0 or y ~= 0 or h ~= 0 then -- okay?
+ local yoffset = y - h
+ local leftkern = x -- both kerns are set in a pair kern compared
+ local rightkern = w - x -- to normal kerns where we set only leftkern
+ if leftkern ~= 0 or rightkern ~= 0 or yoffset ~= 0 then
+ nofregisteredpositions = nofregisteredpositions + 1
+ if rlmode and rlmode < 0 then
+ leftkern, rightkern = rightkern, leftkern
+ end
+ if not injection then
+ injection = "injections"
+ end
+ local p = rawget(properties,current)
+ if p then
+ local i = p[injection]
+ if i then
+ if leftkern ~= 0 then
+ i.leftkern = (i.leftkern or 0) + leftkern
+ end
+ if rightkern ~= 0 then
+ i.rightkern = (i.rightkern or 0) + rightkern
+ end
+ if yoffset ~= 0 then
+ i.yoffset = (i.yoffset or 0) + yoffset
+ end
+ elseif leftkern ~= 0 or rightkern ~= 0 then
+ p[injection] = {
+ leftkern = leftkern,
+ rightkern = rightkern,
+ yoffset = yoffset,
+ }
+ else
+ p[injection] = {
+ yoffset = yoffset,
+ }
+ end
+ elseif leftkern ~= 0 or rightkern ~= 0 then
+ properties[current] = {
+ [injection] = {
+ leftkern = leftkern,
+ rightkern = rightkern,
+ yoffset = yoffset,
+ },
+ }
+ else
+ properties[current] = {
+ [injection] = {
+ yoffset = yoffset,
+ },
+ }
+ end
+ return x, y, w, h, nofregisteredpositions
+ end
+ end
+ return x, y, w, h -- no bound
+end
+
+-- The next one is used for simple kerns coming from a truetype kern table. The r2l
+-- variant variant needs checking but it is unlikely that a r2l script uses thsi
+-- feature.
+
+function injections.setkern(current,factor,rlmode,x,injection)
+ local dx = factor * x
+ if dx ~= 0 then
+ nofregisteredkerns = nofregisteredkerns + 1
+ local p = rawget(properties,current)
+ if not injection then
+ injection = "injections"
+ end
+ if p then
+ local i = p[injection]
+ if i then
+ i.leftkern = dx + (i.leftkern or 0)
+ else
+ p[injection] = {
+ leftkern = dx,
+ }
+ end
+ else
+ properties[current] = {
+ [injection] = {
+ leftkern = dx,
+ },
+ }
+ end
+ return dx, nofregisteredkerns
+ else
+ return 0, 0
+ end
+end
+
+-- This one is an optimization of pairs where we have only a "w" entry. This one is
+-- potentially different from the previous one wrt r2l. It needs checking. The
+-- optimization relates to smaller tma files.
+
+function injections.setmove(current,factor,rlmode,x,injection)
+ local dx = factor * x
+ if dx ~= 0 then
+ nofregisteredkerns = nofregisteredkerns + 1
+ local p = rawget(properties,current)
+ if not injection then
+ injection = "injections"
+ end
+ if rlmode and rlmode < 0 then
+ -- we need to swap with a single so then we also need to to it here
+ -- as move is just a simple single
+ if p then
+ local i = p[injection]
+ if i then
+ i.rightkern = dx + (i.rightkern or 0)
+ else
+ p[injection] = {
+ rightkern = dx,
+ }
+ end
+ else
+ properties[current] = {
+ [injection] = {
+ rightkern = dx,
+ },
+ }
+ end
+ else
+ if p then
+ local i = p[injection]
+ if i then
+ i.leftkern = dx + (i.leftkern or 0)
+ else
+ p[injection] = {
+ leftkern = dx,
+ }
+ end
+ else
+ properties[current] = {
+ [injection] = {
+ leftkern = dx,
+ },
+ }
+ end
+ end
+ return dx, nofregisteredkerns
+ else
+ return 0, 0
+ end
+end
+
+function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase,mkmk,checkmark) -- ba=baseanchor, ma=markanchor
+ local dx = factor*(ba[1]-ma[1])
+ local dy = factor*(ba[2]-ma[2])
+ nofregisteredmarks = nofregisteredmarks + 1
+ if rlmode >= 0 then
+ dx = tfmbase.width - dx -- see later commented ox
+ end
+ local p = rawget(properties,start)
+ -- hm, dejavu serif does a sloppy mark2mark before mark2base
+ if p then
+ local i = p.injections
+ if i then
+ if i.markmark then
+ -- out of order mkmk: yes or no or option
+ else
+ -- if dx ~= 0 then
+ -- i.markx = dx
+ -- end
+ -- if y ~= 0 then
+ -- i.marky = dy
+ -- end
+ -- if rlmode then
+ -- i.markdir = rlmode
+ -- end
+ i.markx = dx
+ i.marky = dy
+ i.markdir = rlmode or 0
+ i.markbase = nofregisteredmarks
+ i.markbasenode = base
+ i.markmark = mkmk
+ i.checkmark = checkmark
+ end
+ else
+ p.injections = {
+ markx = dx,
+ marky = dy,
+ markdir = rlmode or 0,
+ markbase = nofregisteredmarks,
+ markbasenode = base,
+ markmark = mkmk,
+ checkmark = checkmark,
+ }
+ end
+ else
+ properties[start] = {
+ injections = {
+ markx = dx,
+ marky = dy,
+ markdir = rlmode or 0,
+ markbase = nofregisteredmarks,
+ markbasenode = base,
+ markmark = mkmk,
+ checkmark = checkmark,
+ },
+ }
+ end
+ return dx, dy, nofregisteredmarks
+end
+
+local function dir(n)
+ return (n and n<0 and "r-to-l") or (n and n>0 and "l-to-r") or "unset"
+end
+
+local function showchar(n,nested)
+ local char = getchar(n)
+ report_injections("%wfont %s, char %U, glyph %c",nested and 2 or 0,getfont(n),char,char)
+end
+
+local function show(n,what,nested,symbol)
+ if n then
+ local p = rawget(properties,n)
+ if p then
+ local i = p[what]
+ if i then
+ local leftkern = i.leftkern or 0
+ local rightkern = i.rightkern or 0
+ local yoffset = i.yoffset or 0
+ local markx = i.markx or 0
+ local marky = i.marky or 0
+ local markdir = i.markdir or 0
+ local markbase = i.markbase or 0
+ local cursivex = i.cursivex or 0
+ local cursivey = i.cursivey or 0
+ local ligaindex = i.ligaindex or 0
+ local cursbase = i.cursiveanchor
+ local margin = nested and 4 or 2
+ --
+ if rightkern ~= 0 or yoffset ~= 0 then
+ report_injections("%w%s pair: lx %p, rx %p, dy %p",margin,symbol,leftkern,rightkern,yoffset)
+ elseif leftkern ~= 0 then
+ report_injections("%w%s kern: dx %p",margin,symbol,leftkern)
+ end
+ if markx ~= 0 or marky ~= 0 or markbase ~= 0 then
+ report_injections("%w%s mark: dx %p, dy %p, dir %s, base %s",margin,symbol,markx,marky,markdir,markbase ~= 0 and "yes" or "no")
+ end
+ if cursivex ~= 0 or cursivey ~= 0 then
+ if cursbase then
+ report_injections("%w%s curs: base dx %p, dy %p",margin,symbol,cursivex,cursivey)
+ else
+ report_injections("%w%s curs: dx %p, dy %p",margin,symbol,cursivex,cursivey)
+ end
+ elseif cursbase then
+ report_injections("%w%s curs: base",margin,symbol)
+ end
+ if ligaindex ~= 0 then
+ report_injections("%w%s liga: index %i",margin,symbol,ligaindex)
+ end
+ end
+ end
+ end
+end
+
+local function showsub(n,what,where)
+ report_injections("begin subrun: %s",where)
+ for n in nextchar, n do
+ showchar(n,where)
+ show(n,what,where," ")
+ end
+ report_injections("end subrun")
+end
+
+local function trace(head,where)
+ report_injections()
+ report_injections("begin run %s: %s kerns, %s positions, %s marks and %s cursives registered",
+ where or "",nofregisteredkerns,nofregisteredpositions,nofregisteredmarks,nofregisteredcursives)
+ local n = head
+ while n do
+ local id = getid(n)
+ if id == glyph_code then
+ showchar(n)
+ show(n,"injections",false," ")
+ show(n,"preinjections",false,"<")
+ show(n,"postinjections",false,">")
+ show(n,"replaceinjections",false,"=")
+ show(n,"emptyinjections",false,"*")
+ elseif id == disc_code then
+ local pre, post, replace = getdisc(n)
+ if pre then
+ showsub(pre,"preinjections","pre")
+ end
+ if post then
+ showsub(post,"postinjections","post")
+ end
+ if replace then
+ showsub(replace,"replaceinjections","replace")
+ end
+ show(n,"emptyinjections",false,"*")
+ end
+ n = getnext(n)
+ end
+ report_injections("end run")
+end
+
+local function show_result(head)
+ local current = head
+ local skipping = false
+ while current do
+ local id = getid(current)
+ if id == glyph_code then
+ local w = getwidth(current)
+ local x, y = getoffsets(current)
+ report_injections("char: %C, width %p, xoffset %p, yoffset %p",getchar(current),w,x,y)
+ skipping = false
+ elseif id == kern_code then
+ report_injections("kern: %p",getkern(current))
+ skipping = false
+ elseif not skipping then
+ report_injections()
+ skipping = true
+ end
+ current = getnext(current)
+ end
+ report_injections()
+end
+
+-- G +D-pre G
+-- D-post+
+-- +D-replace+
+--
+-- G +D-pre +D-pre
+-- D-post +D-post
+-- +D-replace +D-replace
+
+-- Beware! pre/post/replace can have non glyphs too
+
+-- local function inject_kerns_only(head,where)
+-- if trace_injections then
+-- trace(head,"kerns")
+-- end
+-- local current = head
+-- local prev -- = nil
+-- local prevdisc -- = nil
+-- local pre -- = nil -- saves a lookup
+-- local post -- = nil -- saves a lookup
+-- local replace -- = nil -- saves a lookup
+-- local pretail -- = nil -- saves a lookup
+-- local posttail -- = nil -- saves a lookup
+-- local replacetail -- = nil -- saves a lookup
+-- while current do
+-- local next, char, id = isnextchar(current)
+-- if char then
+-- local p = rawget(properties,current)
+-- if p then
+-- local i = p.injections
+-- if i then
+-- -- left|glyph|right
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(current,leftkern)
+-- if useadvance then
+-- addmargins(current,-leftkern)
+-- elseif prev and getid(prev) == glue_code then
+-- if useitalickerns then
+-- head = insert_node_before(head,current,italickern(leftkern))
+-- else
+-- setwidth(prev, getwidth(prev) + leftkern)
+-- end
+-- else
+-- head = insert_node_before(head,current,fontkern(leftkern))
+-- end
+-- end
+-- end
+-- if prevdisc then
+-- local done = false
+-- if post then
+-- local i = p.postinjections
+-- if i then
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(current,leftkern)
+-- if useadvance then
+-- addmargins(posttail,false,-leftkern)
+-- else
+-- setlink(posttail,fontkern(leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- if replace then
+-- local i = p.replaceinjections
+-- if i then
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(current,leftkern)
+-- if useadvance then
+-- addmargins(replacetail,false,-leftkern)
+-- else
+-- setlink(replacetail,fontkern(leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- else
+-- local i = p.emptyinjections
+-- if i then
+-- -- glyph|disc|glyph (special case)
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(current,leftkern)
+-- -- if useadvance then
+-- -- add zwj with offset
+-- -- else
+-- replace = fontkern(leftkern)
+-- done = true
+-- -- end
+-- end
+-- end
+-- end
+-- if done then
+-- setdisc(prevdisc,pre,post,replace)
+-- end
+-- end
+-- end
+-- prevdisc = nil
+-- -- prevglyph = current
+-- elseif char == false then
+-- -- other font
+-- prevdisc = nil
+-- -- prevglyph = current
+-- elseif id == disc_code then
+-- pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+-- local done = false
+-- if pre then
+-- -- left|pre glyphs|right
+-- for n in nextchar, pre do
+-- local p = rawget(properties,n)
+-- if p then
+-- local i = p.injections or p.preinjections
+-- if i then
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(n,leftkern)
+-- if useadvance then
+-- addmargins(n,-leftkern)
+-- else
+-- pre = insert_node_before(pre,n,fontkern(leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if post then
+-- -- left|post glyphs|right
+-- for n in nextchar, post do
+-- local p = rawget(properties,n)
+-- if p then
+-- local i = p.injections or p.postinjections
+-- if i then
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(n,leftkern)
+-- if useadvance then
+-- addmargins(n,-leftkern)
+-- else
+-- post = insert_node_before(post,n,fontkern(leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if replace then
+-- -- left|replace glyphs|right
+-- for n in nextchar, replace do
+-- local p = rawget(properties,n)
+-- if p then
+-- local i = p.injections or p.replaceinjections
+-- if i then
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(n,leftkern)
+-- if useadvance then
+-- addmargins(n,-leftkern)
+-- else
+-- replace = insert_node_before(replace,n,fontkern(leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if done then
+-- setdisc(current,pre,post,replace)
+-- end
+-- -- prevglyph = nil
+-- prevdisc = current
+-- else
+-- -- prevglyph = nil
+-- prevdisc = nil
+-- end
+-- prev = current
+-- current = next
+-- end
+-- --
+-- if keepregisteredcounts then
+-- keepregisteredcounts = false
+-- else
+-- nofregisteredkerns = 0
+-- end
+-- if trace_injections then
+-- show_result(head)
+-- end
+-- return head
+-- end
+
+local function inject_kerns_only_kerns(head,where)
+ if trace_injections then
+ trace(head,"kerns")
+ end
+ local current = head
+ local prev -- = nil
+ local prevdisc -- = nil
+ local pre -- = nil -- saves a lookup
+ local post -- = nil -- saves a lookup
+ local replace -- = nil -- saves a lookup
+ local pretail -- = nil -- saves a lookup
+ local posttail -- = nil -- saves a lookup
+ local replacetail -- = nil -- saves a lookup
+ while current do
+ local next, char, id = isnextchar(current)
+ if char then
+ local p = rawget(properties,current)
+ if p then
+ local i = p.injections
+ if i then
+ -- left|glyph|right
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ leftkern = xscaled(current,leftkern)
+ if prev and getid(prev) == glue_code then
+ if useitalickerns then
+ head = insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev,getwidth(prev) + leftkern)
+ end
+ else
+ head = insert_node_before(head,current,fontkern(leftkern))
+ end
+ end
+ end
+ if prevdisc then
+ local done = false
+ if post then
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setlink(posttail,fontkern(xscaled(current,leftkern)))
+ done = true
+ end
+ end
+ end
+ if replace then
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setlink(replacetail,fontkern(xscaled(current,leftkern)))
+ done = true
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ -- glyph|disc|glyph (special case)
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ replace = fontkern(xscaled(current,leftkern))
+ done = true
+ end
+ end
+ end
+ if done then
+ setdisc(prevdisc,pre,post,replace)
+ end
+ end
+ end
+ prevdisc = nil
+ -- prevglyph = current
+ elseif char == false then
+ -- other font
+ prevdisc = nil
+ -- prevglyph = current
+ elseif id == disc_code then
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ local done = false
+ if pre then
+ -- left|pre glyphs|right
+ for n in nextchar, pre do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.preinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ pre = insert_node_before(pre,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if post then
+ -- left|post glyphs|right
+ for n in nextchar, post do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ post = insert_node_before(post,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ -- left|replace glyphs|right
+ for n in nextchar, replace do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ replace = insert_node_before(replace,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if done then
+ setdisc(current,pre,post,replace)
+ end
+ -- prevglyph = nil
+ prevdisc = current
+ else
+ -- prevglyph = nil
+ prevdisc = nil
+ end
+ prev = current
+ current = next
+ end
+ --
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredkerns = 0
+ end
+ if trace_injections then
+ show_result(head)
+ end
+ return head
+end
+
+local function inject_kerns_only_margins(head,where)
+ if trace_injections then
+ trace(head,"kerns")
+ end
+ local current = head
+ local prevdisc -- = nil
+ local pre -- = nil -- saves a lookup
+ local post -- = nil -- saves a lookup
+ local replace -- = nil -- saves a lookup
+ local pretail -- = nil -- saves a lookup
+ local posttail -- = nil -- saves a lookup
+ local replacetail -- = nil -- saves a lookup
+ while current do
+ local next, char, id = isnextchar(current)
+ if char then
+ local p = rawget(properties,current)
+ if p then
+ if prevdisc then
+ if post then
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(posttail,false,-leftkern)
+ end
+ end
+ end
+ if replace then
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(replacetail,false,-leftkern)
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if usezwjkerns then
+ replace = copynode(current)
+ setchar(replace,0x200D) -- zwj
+ addxymargins(replace,-leftkern)
+ else
+ replace = fontkern(xscaled(current,leftkern))
+ end
+ setdisc(prevdisc,pre,post,replace) -- setreplace
+ end
+ end
+ end
+ end
+ -- moved down so we can copy zwj
+ local i = p.injections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(current,-leftkern)
+ end
+ end
+ end
+ prevdisc = nil
+ elseif char == false then
+ prevdisc = nil
+ elseif id == disc_code then
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ if pre then
+ for n in nextchar, pre do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.preinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(n,-leftkern)
+ end
+ end
+ end
+ end
+ end
+ if post then
+ for n in nextchar, post do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(n,-leftkern)
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ for n in nextchar, replace do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(n,-leftkern)
+ end
+ end
+ end
+ end
+ end
+ prevdisc = current
+ else
+ prevdisc = nil
+ end
+ current = next
+ end
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredkerns = 0
+ end
+ if trace_injections then
+ show_result(head)
+ end
+ return head
+end
+
+-- local function inject_positions_only(head,where)
+-- if trace_injections then
+-- trace(head,"positions")
+-- end
+-- local current = head
+-- local prev = nil
+-- local next = nil
+-- local prevdisc = nil
+-- local prevglyph = nil
+-- local pre = nil -- saves a lookup
+-- local post = nil -- saves a lookup
+-- local replace = nil -- saves a lookup
+-- local pretail = nil -- saves a lookup
+-- local posttail = nil -- saves a lookup
+-- local replacetail = nil -- saves a lookup
+-- while current do
+-- local next, char, id = isnextchar(current)
+-- if char then
+-- local p = rawget(properties,current)
+-- if p then
+-- local i = p.injections
+-- if i then
+-- -- left|glyph|right
+-- local yoffset = i.yoffset
+-- if yoffset and yoffset ~= 0 then
+-- -- use raise when advance
+-- addyoffset(current,yscaled(current,yoffset))
+-- end
+-- local leftkern = i.leftkern or 0
+-- local rightkern = i.rightkern or 0
+-- if leftkern ~= 0 then
+-- leftkern = xscaled(current,leftkern)
+-- end
+-- if rightkern ~= 0 then
+-- rightkern = xscaled(current,rightkern)
+-- end
+-- if useadvance then
+-- if leftkern ~= 0 or rightkern ~= 0 then
+-- addmargins(current,-leftkern,-rightkern)
+-- end
+-- else
+-- if leftkern ~= 0 then
+-- if leftkern == -rightkern then
+-- addxoffset(current,leftkern)
+-- rightkern = 0
+-- elseif prev and getid(prev) == glue_code then
+-- if useitalickerns then
+-- head = insert_node_before(head,current,italickern(leftkern))
+-- else
+-- setwidth(prev,getwidth(prev)+leftkern)
+-- end
+-- else
+-- head = insert_node_before(head,current,fontkern(leftkern))
+-- end
+-- end
+-- if rightkern ~= 0 then
+-- if next and getid(next) == glue_code then
+-- if useitalickerns then
+-- insert_node_after(head,current,italickern(rightkern))
+-- else
+-- setwidth(next, getwidth(next)+rightkern)
+-- end
+-- else
+-- insert_node_after(head,current,fontkern(rightkern))
+-- end
+-- end
+-- end
+-- else
+-- local i = p.emptyinjections
+-- if i then
+-- -- glyph|disc|glyph (special case)
+-- local rightkern = i.rightkern
+-- if rightkern and rightkern ~= 0 then
+-- if next and getid(next) == disc_code then
+-- if replace then
+-- -- error, we expect an empty one
+-- else
+-- rightkern = xscaled(current,rightkern)
+-- replace = fontkern(rightkern) -- maybe also leftkern
+-- done = true --KE
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if prevdisc then
+-- local done = false
+-- if post then
+-- local i = p.postinjections
+-- if i then
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(current,leftkern)
+-- if useadvance then
+-- addmargins(posttail,-leftkern)
+-- else
+-- setlink(posttail,fontkern(leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- if replace then
+-- local i = p.replaceinjections
+-- if i then
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- leftkern = xscaled(current,leftkern)
+-- if useadvance then
+-- addmargins(replacetail,-leftkern)
+-- else
+-- setlink(replacetail,fontkern(leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- else
+-- local i = p.emptyinjections
+-- if i then
+-- -- new .. okay?
+-- local leftkern = i.leftkern
+-- if leftkern and leftkern ~= 0 then
+-- replace = fontkern(xscaled(current,leftkern))
+-- done = true
+-- end
+-- end
+-- end
+-- if done then
+-- setdisc(prevdisc,pre,post,replace)
+-- end
+-- end
+-- end
+-- prevdisc = nil
+-- prevglyph = current
+-- elseif char == false then
+-- prevdisc = nil
+-- prevglyph = current
+-- elseif id == disc_code then
+-- pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+-- local done = false
+-- if pre then
+-- -- left|pre glyphs|right
+-- for n in nextchar, pre do
+-- local p = rawget(properties,n)
+-- if p then
+-- local i = p.injections or p.preinjections
+-- if i then
+-- local yoffset = i.yoffset
+-- local leftkern = i.leftkern or 0
+-- local rightkern = i.rightkern or 0
+-- if yoffset and yoffset ~= 0 then
+-- -- use raise when advance
+-- addyoffset(n,yscaled(n,yoffset))
+-- end
+-- if leftkern ~= 0 then
+-- leftkern = xscaled(n,leftkern)
+-- end
+-- if rightkern ~= 0 then
+-- rightkern = xscaled(n,rightkern)
+-- end
+-- if useadvance then
+-- if leftkern ~= 0 or rightkern ~= 0 then
+-- addmargins(pre,-leftkern,-rightkern)
+-- end
+-- else
+-- if leftkern ~= 0 then
+-- pre = insert_node_before(pre,n,fontkern(leftkern))
+-- done = true
+-- end
+-- if rightkern ~= 0 then
+-- insert_node_after(pre,n,fontkern(rightkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if post then
+-- -- left|post glyphs|right
+-- for n in nextchar, post do
+-- local p = rawget(properties,n)
+-- if p then
+-- local i = p.injections or p.postinjections
+-- if i then
+-- local yoffset = i.yoffset
+-- local leftkern = i.leftkern or 0
+-- local rightkern = i.rightkern or 0
+-- if yoffset and yoffset ~= 0 then
+-- -- use raise when advance
+-- addyoffset(n,yscaled(n,yoffset))
+-- end
+-- if leftkern ~= 0 then
+-- leftkern = xscaled(n,leftkern)
+-- end
+-- if rightkern ~= 0 then
+-- rightkern = xscaled(n,rightkern)
+-- end
+-- if useadvance then
+-- if leftkern ~= 0 or rightkern ~= 0 then
+-- addmargins(post,-leftkern,-rightkern)
+-- end
+-- else
+-- if leftkern ~= 0 then
+-- post = insert_node_before(post,n,fontkern(leftkern))
+-- done = true
+-- end
+-- if rightkern ~= 0 then
+-- insert_node_after(post,n,fontkern(rightkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if replace then
+-- -- left|replace glyphs|right
+-- for n in nextchar, replace do
+-- local p = rawget(properties,n)
+-- if p then
+-- local i = p.injections or p.replaceinjections
+-- if i then
+-- local yoffset = i.yoffset
+-- local leftkern = i.leftkern or 0
+-- local rightkern = i.rightkern or 0
+-- if yoffset and yoffset ~= 0 then
+-- -- use raise when advance
+-- addyoffset(n,yscaled(n,yoffset))
+-- end
+-- if leftkern ~= 0 then
+-- leftkern = xscaled(n,leftkern)
+-- end
+-- if rightkern ~= 0 then
+-- rightkern = xscaled(n,rightkern)
+-- end
+-- if useadvance then
+-- if leftkern ~= 0 or rightkern ~= 0 then
+-- addmargins(replace,-leftkern,-rightkern)
+-- end
+-- else
+-- if leftkern ~= 0 then
+-- replace = insert_node_before(replace,n,fontkern(leftkern))
+-- done = true
+-- end
+-- if rightkern ~= 0 then
+-- insert_node_after(replace,n,fontkern(rightkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if prevglyph then
+-- if pre then
+-- local p = rawget(properties,prevglyph)
+-- if p then
+-- local i = p.preinjections
+-- if i then
+-- -- glyph|pre glyphs
+-- local rightkern = i.rightkern
+-- if rightkern and rightkern ~= 0 then
+-- rightkern = xscaled(prevglyph,rightkern)
+-- if useadvance then
+-- addmargins(pre,-rightkern)
+-- else
+-- pre = insert_node_before(pre,pre,fontkern(rightkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if replace then
+-- local p = rawget(properties,prevglyph)
+-- if p then
+-- local i = p.replaceinjections
+-- if i then
+-- -- glyph|replace glyphs
+-- local rightkern = i.rightkern
+-- if rightkern and rightkern ~= 0 then
+-- rightkern = xscaled(prevglyph,rightkern)
+-- if useadvance then
+-- addmargins(replace,-rightkern)
+-- else
+-- replace = insert_node_before(replace,replace,fontkern(rightkern))
+-- done = true
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+-- if done then
+-- setdisc(current,pre,post,replace)
+-- end
+-- prevglyph = nil
+-- prevdisc = current
+-- else
+-- prevglyph = nil
+-- prevdisc = nil
+-- end
+-- prev = current
+-- current = next
+-- end
+-- --
+-- if keepregisteredcounts then
+-- keepregisteredcounts = false
+-- else
+-- nofregisteredpositions = 0
+-- end
+-- if trace_injections then
+-- show_result(head)
+-- end
+-- return head
+-- end
+
+local function inject_positions_only_kerns(head,where)
+ if trace_injections then
+ trace(head,"positions")
+ end
+ local current = head
+ local prev = nil
+ local next = nil
+ local prevdisc = nil
+ local prevglyph = nil
+ local pre = nil -- saves a lookup
+ local post = nil -- saves a lookup
+ local replace = nil -- saves a lookup
+ local pretail = nil -- saves a lookup
+ local posttail = nil -- saves a lookup
+ local replacetail = nil -- saves a lookup
+ while current do
+ local next, char, id = isnextchar(current)
+ if char then
+ local p = rawget(properties,current)
+ if p then
+ local i = p.injections
+ if i then
+ -- left|glyph|right
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ -- use raise when advance
+ addyoffset(current,yscaled(current,yoffset))
+ end
+ local leftkern = i.leftkern or 0
+ local rightkern = i.rightkern or 0
+ if leftkern ~= 0 then
+ leftkern = xscaled(current,leftkern)
+ end
+ if rightkern ~= 0 then
+ rightkern = xscaled(current,rightkern)
+ end
+ if leftkern ~= 0 then
+ if leftkern == -rightkern then
+ addxoffset(current,leftkern)
+ rightkern = 0
+ elseif prev and getid(prev) == glue_code then
+ if useitalickerns then
+ head = insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev,getwidth(prev)+leftkern)
+ end
+ else
+ head = insert_node_before(head,current,fontkern(leftkern))
+ end
+ end
+ if rightkern ~= 0 then
+ if next and getid(next) == glue_code then
+ if useitalickerns then
+ insert_node_after(head,current,italickern(rightkern))
+ else
+ setwidth(next, getwidth(next)+rightkern)
+ end
+ else
+ insert_node_after(head,current,fontkern(rightkern))
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ -- glyph|disc|glyph (special case)
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ if next and getid(next) == disc_code then
+ if replace then
+ -- error, we expect an empty one
+ else
+ replace = fontkern(xscaled(current,rightkern)) -- maybe also leftkern
+ done = true --KE
+ end
+ end
+ end
+ end
+ end
+ if prevdisc then
+ local done = false
+ if post then
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setlink(posttail,fontkern(xscaled(current,leftkern)))
+ done = true
+ end
+ end
+ end
+ if replace then
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setlink(replacetail,fontkern(xscaled(current,leftkern)))
+ done = true
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ -- new .. okay?
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ replace = fontkern(xscaled(current,leftkern))
+ done = true
+ end
+ end
+ end
+ if done then
+ setdisc(prevdisc,pre,post,replace)
+ end
+ end
+ end
+ prevdisc = nil
+ prevglyph = current
+ elseif char == false then
+ prevdisc = nil
+ prevglyph = current
+ elseif id == disc_code then
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ local done = false
+ if pre then
+ -- left|pre glyphs|right
+ for n in nextchar, pre do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.preinjections
+ if i then
+ local yoffset = i.yoffset
+ local leftkern = i.leftkern
+ local rightkern = i.rightkern
+ if yoffset and yoffset ~= 0 then
+ addyoffset(n,yscaled(n,yoffset))
+ end
+ if leftkern and leftkern ~= 0 then
+ pre = insert_node_before(pre,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(pre,n,fontkern(xscaled(n,rightkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if post then
+ -- left|post glyphs|right
+ for n in nextchar, post do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.postinjections
+ if i then
+ local yoffset = i.yoffset
+ local leftkern = i.leftkern
+ local rightkern = i.rightkern
+ if yoffset and yoffset ~= 0 then
+ addyoffset(n,yscaled(n,yoffset))
+ end
+ if leftkern and leftkern ~= 0 then
+ post = insert_node_before(post,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(post,n,fontkern(xscaled(n,rightkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ -- left|replace glyphs|right
+ for n in nextchar, replace do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.replaceinjections
+ if i then
+ local yoffset = i.yoffset
+ local leftkern = i.leftkern
+ local rightkern = i.rightkern
+ if yoffset and yoffset ~= 0 then
+ addyoffset(n,yscaled(n,yoffset))
+ end
+ if leftkern and leftkern ~= 0 then
+ replace = insert_node_before(replace,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(replace,n,fontkern(xscaled(n,rightkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if prevglyph then
+ -- there can only be useful properties when pre/replace start with a glyph
+ if pre then
+ local p = rawget(properties,prevglyph)
+ if p then
+ local i = p.preinjections
+ if i then
+ -- glyph|pre glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ pre = insert_node_before(pre,pre,fontkern(xscaled(prevglyph,rightkern)))
+ done = true
+ end
+ end
+ end
+ end
+ if replace then
+ local p = rawget(properties,prevglyph)
+ if p then
+ local i = p.replaceinjections
+ if i then
+ -- glyph|replace glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ replace = insert_node_before(replace,replace,fontkern(xscaled(prevglyph,rightkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if done then
+ setdisc(current,pre,post,replace)
+ end
+ prevglyph = nil
+ prevdisc = current
+ else
+ prevglyph = nil
+ prevdisc = nil
+ end
+ prev = current
+ current = next
+ end
+ --
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredpositions = 0
+ end
+ if trace_injections then
+ show_result(head)
+ end
+ return head
+end
+
+local function inject_positions_only_margins(head,where)
+ if trace_injections then
+ trace(head,"positions")
+ end
+ local current = head
+ local prev = nil
+ local next = nil
+ local prevdisc = nil
+ local prevglyph = nil
+ local pre = nil -- saves a lookup
+ local post = nil -- saves a lookup
+ local replace = nil -- saves a lookup
+ local pretail = nil -- saves a lookup
+ local posttail = nil -- saves a lookup
+ local replacetail = nil -- saves a lookup
+ while current do
+ local next, char, id = isnextchar(current)
+ if char then
+ local p = rawget(properties,current)
+ if p then
+ local i = p.injections
+ if i then
+ -- left|glyph|right
+ local yoffset = i.yoffset or 0
+ local leftkern = i.leftkern or 0
+ local rightkern = i.rightkern or 0
+ if leftkern ~= 0 or rightkern ~= 0 or yoffset ~= 0 then
+ addxymargins(n,-leftkern,-rightkern,yoffset) -- also scales
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ -- glyph|disc|glyph (special case)
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ if next and getid(next) == disc_code then
+ if replace then
+ -- error, we expect an empty one
+ else
+ if usezwjkerns then
+ replace = copynode(current)
+ setchar(replace,0x200D) -- zwj
+ addxymargins(replace,false,-rightkern)
+ else
+ replace = fontkern(xscaled(current,rightkern)) -- maybe also leftkern
+ end
+ done = true --KE
+ end
+ end
+ end
+ end
+ end
+ if prevdisc then
+ if post then
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(posttail,-leftkern)
+ end
+ end
+ end
+ if replace then
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ addxymargins(replacetail,-leftkern)
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ -- new .. okay?
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ if usezwjkerns then
+ replace = copynode(current)
+ setchar(replace,0x200D) -- zwj
+ addxymargins(replace,-leftkern)
+ else
+ replace = fontkern(xscaled(current,leftkern))
+ end
+ setdisc(prevdisc,pre,post,replace)
+ end
+ end
+ end
+ end
+ end
+ prevdisc = nil
+ prevglyph = current
+ elseif char == false then
+ prevdisc = nil
+ prevglyph = current
+ elseif id == disc_code then
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ if pre then
+ -- left|pre glyphs|right
+ for n in nextchar, pre do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.preinjections
+ if i then
+ local yoffset = i.yoffset or 0
+ local leftkern = i.leftkern or 0
+ local rightkern = i.rightkern or 0
+ if leftkern ~= 0 or rightkern ~= 0 or yoffset ~= 0 then
+ addxymargins(n,-leftkern,-rightkern,yoffset) -- also scales
+ end
+ end
+ end
+ end
+ end
+ if post then
+ -- left|post glyphs|right
+ for n in nextchar, post do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.postinjections
+ if i then
+ local yoffset = i.yoffset or 0
+ local leftkern = i.leftkern or 0
+ local rightkern = i.rightkern or 0
+ if leftkern ~= 0 or rightkern ~= 0 or yoffset ~= 0 then
+ addxymargins(n,-leftkern,-rightkern,yoffset) -- also scales
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ -- left|replace glyphs|right
+ for n in nextchar, replace do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.replaceinjections
+ if i then
+ local yoffset = i.yoffset or 0
+ local leftkern = i.leftkern or 0
+ local rightkern = i.rightkern or 0
+ if leftkern ~= 0 or rightkern ~= 0 or yoffset ~= 0 then
+ addxymargins(n,-leftkern,-rightkern,yoffset) -- also scales
+ end
+ end
+ end
+ end
+ end
+ if prevglyph then
+ if pre then
+ local p = rawget(properties,prevglyph)
+ if p then
+ local i = p.preinjections
+ if i then
+ -- glyph|pre glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ addxymargins(pre,-rightkern,0,0)
+ end
+ end
+ end
+ end
+ if replace then
+ local p = rawget(properties,prevglyph)
+ if p then
+ local i = p.replaceinjections
+ if i then
+ -- glyph|replace glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ addxymargins(replace,-rightkern,0,0)
+ end
+ end
+ end
+ end
+ end
+ prevglyph = nil
+ prevdisc = current
+ else
+ prevglyph = nil
+ prevdisc = nil
+ end
+ prev = current
+ current = next
+ end
+ --
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredpositions = 0
+ end
+ if trace_injections then
+ show_result(head)
+ end
+ return head
+end
+
+local function showoffset(n,flag)
+ local x, y = getoffsets(n)
+ if x ~= 0 or y ~= 0 then
+ setcolor(n,"darkgray")
+ end
+end
+
+local function processmark(p,n,pn) -- p = basenode
+ local px, py = getoffsets(p)
+ local nx, ny = getoffsets(n)
+ local sx, sy = getxyscales(n) -- we assume n and p to have equal scales
+ local ox = 0
+ local rightkern = nil
+ local pp = rawget(properties,p)
+ if pp then
+ pp = pp.injections
+ if pp then
+ rightkern = pp.rightkern
+ end
+ end
+ local markdir = pn.markdir
+ if rightkern then -- x and w ~= 0
+ ox = px - sx * (pn.markx or 0) - rightkern
+ if markdir and markdir < 0 then
+ -- kern(w-x) glyph(p) kern(x) mark(n)
+ if not pn.markmark then
+ ox = ox + sx * (pn.leftkern or 0)
+ end
+ else
+ -- kern(x) glyph(p) kern(w-x) mark(n)
+ --
+ -- According to Kai we don't need to handle leftkern here but I'm
+ -- pretty sure I've run into a case where it was needed so maybe
+ -- some day we need something more clever here.
+ --
+ -- maybe we need to apply both then
+ --
+ if false then
+ -- a mark with kerning (maybe husayni needs it )
+ local leftkern = pp.leftkern
+ if leftkern then
+ ox = ox - sx * leftkern
+ end
+ end
+ end
+ else
+ ox = px - sx * (pn.markx or 0)
+ if markdir and markdir < 0 then
+ if not pn.markmark then
+ local leftkern = pn.leftkern
+ if leftkern then
+ ox = ox + sx * leftkern -- husayni needs it
+ end
+ end
+ end
+ if pn.checkmark then
+ local wn = getwidth(n) -- in arial marks have widths
+ if wn and wn ~= 0 then
+ wn = wn/2
+ if trace_injections then
+ report_injections("correcting non zero width mark %C",getchar(n))
+ end
+ -- -- bad: we should center
+ --
+ -- pn.leftkern = -wn
+ -- pn.rightkern = -wn
+ --
+ -- -- we're too late anyway as kerns are already injected so we do it the
+ -- -- ugly way (no checking if the previous is already a kern) .. maybe we
+ -- -- should fix the font instead
+ --
+ -- todo: head and check for prev / next kern
+ --
+ insert_node_before(n,n,fontkern(-wn))
+ insert_node_after(n,n,fontkern(-wn))
+ end
+ end
+ end
+ local oy = ny + py + sy * (pn.marky or 0)
+ if not pn.markmark then
+ local yoffset = pn.yoffset
+ if yoffset then
+ oy = oy + sy * yoffset -- husayni needs it
+ end
+ end
+ setoffsets(n,ox,oy)
+ if trace_marks then
+ showoffset(n,true)
+ end
+end
+
+local function inject_everything(head,where)
+ if trace_injections then
+ trace(head,"everything")
+ end
+ local hascursives = nofregisteredcursives > 0
+ local hasmarks = nofregisteredmarks > 0
+ --
+ local current = head
+ local last = nil
+ local prev = nil
+ local next = nil
+ local prevdisc = nil
+ local prevglyph = nil
+ local pre = nil -- saves a lookup
+ local post = nil -- saves a lookup
+ local replace = nil -- saves a lookup
+ local pretail = nil -- saves a lookup
+ local posttail = nil -- saves a lookup
+ local replacetail = nil -- saves a lookup
+ --
+ local cursiveanchor = nil
+ local minc = 0
+ local maxc = 0
+ local glyphs = { }
+ local marks = { }
+ local nofmarks = 0
+ --
+ while current do
+ local next, char, id = isnextchar(current)
+ if char then
+ local p = rawget(properties,current)
+ if p then
+ local i = p.injections
+ if i then
+ local pm = i.markbasenode
+ if pm then
+ nofmarks = nofmarks + 1
+ marks[nofmarks] = current
+ else
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ addyoffset(current,yscaled(current,yoffset)) -- or just * sy
+ end
+ if hascursives then
+ local cursivex = i.cursivex
+ if cursivex then
+ if cursiveanchor then
+ if cursivex ~= 0 then
+ i.leftkern = (i.leftkern or 0) + cursivex
+ end
+ if maxc == 0 then
+ minc = 1
+ maxc = 1
+ glyphs[1] = cursiveanchor
+ else
+ maxc = maxc + 1
+ glyphs[maxc] = cursiveanchor
+ end
+ properties[cursiveanchor].cursivedy = i.cursivey -- cursiveprops
+ last = current
+ else
+ maxc = 0
+ end
+ elseif maxc > 0 then
+ local nx, ny = getoffsets(current)
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + yscaled(current,properties[ti].cursivedy) -- stepwise increment
+ setoffsets(ti,false,ny)
+ if trace_cursive then
+ showoffset(ti)
+ end
+ end
+ maxc = 0
+ cursiveanchor = nil
+ end
+ if i.cursiveanchor then
+ cursiveanchor = current -- no need for both now
+ else
+ if maxc > 0 then
+ local nx, ny = getoffsets(current)
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + yscaled(current,properties[ti].cursivedy) -- stepwise increment
+ setoffsets(ti,false,ny)
+ if trace_cursive then
+ showoffset(ti)
+ end
+ end
+ maxc = 0
+ end
+ cursiveanchor = nil
+ end
+ end
+ -- left|glyph|right
+ local leftkern = i.leftkern
+ local rightkern = i.rightkern
+ if leftkern and leftkern ~= 0 then
+ local opposite = rightkern and leftkern == -rightkern
+ leftkern = xscaled(current,leftkern)
+ if opposite then
+ addxoffset(current,leftkern)
+ rightkern = 0
+ elseif prev and getid(prev) == glue_code then
+ if useitalickerns then
+ head = insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev, getwidth(prev) + leftkern)
+ end
+ else
+ head = insert_node_before(head,current,fontkern(leftkern))
+ end
+ end
+ if rightkern and rightkern ~= 0 then
+ rightkern = xscaled(current,rightkern)
+ if next and getid(next) == glue_code then
+ if useitalickerns then
+ insert_node_after(head,current,italickern(rightkern))
+ else
+ setwidth(next, getwidth(next) + rightkern)
+ end
+ else
+ insert_node_after(head,current,fontkern(rightkern))
+ end
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ -- glyph|disc|glyph (special case)
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ if next and getid(next) == disc_code then
+ if replace then
+ -- error, we expect an empty one
+ else
+ replace = fontkern(xscaled(current,rightkern))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if prevdisc then
+ if p then
+ local done = false
+ if post then
+ local i = p.postinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setlink(posttail,fontkern(xscaled(current,leftkern)))
+ done = true
+ end
+ end
+ end
+ if replace then
+ local i = p.replaceinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setlink(replacetail,fontkern(xscaled(current,leftkern)))
+ done = true
+ end
+ end
+ else
+ local i = p.emptyinjections
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ replace = fontkern(xscaled(current,leftkern))
+ done = true
+ end
+ end
+ end
+ if done then
+ setdisc(prevdisc,pre,post,replace)
+ end
+ end
+ end
+ else
+ -- cursive
+ if hascursives and maxc > 0 then
+ local nx, ny = getoffsets(current)
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + yscaled(current,properties[ti].cursivedy)
+ setoffsets(ti,false,ny) -- can be mark, we could use properties
+ end
+ maxc = 0
+ cursiveanchor = nil
+ end
+ end
+ prevdisc = nil
+ prevglyph = current
+ elseif char == false then
+ -- base = nil
+ prevdisc = nil
+ prevglyph = current
+ elseif id == disc_code then
+ -- base = nil
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ local done = false
+ if pre then
+ -- left|pre glyphs|right
+ for n in nextchar, pre do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.preinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ addyoffset(n,yscaled(n,yoffset))
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ pre = insert_node_before(pre,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(pre,n,fontkern(xscaled(n,rightkern)))
+ done = true
+ end
+ if hasmarks then
+ local pm = i.markbasenode
+ if pm then
+ processmark(pm,n,i)
+ end
+ end
+ end
+ end
+ end
+ end
+ if post then
+ -- left|post glyphs|right
+ for n in nextchar, post do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.postinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ addyoffset(n,yscaled(n,yoffset))
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ post = insert_node_before(post,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ done = true
+ insert_node_after(post,n,fontkern(xscaled(n,rightkern)))
+ end
+ if hasmarks then
+ local pm = i.markbasenode
+ if pm then
+ processmark(pm,n,i)
+ end
+ end
+ end
+ end
+ end
+ end
+ if replace then
+ -- left|replace glyphs|right
+ for n in nextchar, replace do
+ local p = rawget(properties,n)
+ if p then
+ local i = p.injections or p.replaceinjections
+ if i then
+ local yoffset = i.yoffset
+ if yoffset and yoffset ~= 0 then
+ addyoffset(n,yscaled(n,yoffset))
+ end
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ replace = insert_node_before(replace,n,fontkern(xscaled(n,leftkern)))
+ done = true
+ end
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ insert_node_after(replace,n,fontkern(xscaled(n,rightkern)))
+ done = true
+ end
+ if hasmarks then
+ local pm = i.markbasenode
+ if pm then
+ processmark(pm,n,i)
+ end
+ end
+ end
+ end
+ end
+ end
+ if prevglyph then
+ if pre then
+ local p = rawget(properties,prevglyph)
+ if p then
+ local i = p.preinjections
+ if i then
+ -- glyph|pre glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ pre = insert_node_before(pre,pre,fontkern(xscaled(prevglyph,rightkern)))
+ done = true
+ end
+ end
+ end
+ end
+ if replace then
+ local p = rawget(properties,prevglyph)
+ if p then
+ local i = p.replaceinjections
+ if i then
+ -- glyph|replace glyphs
+ local rightkern = i.rightkern
+ if rightkern and rightkern ~= 0 then
+ replace = insert_node_before(replace,replace,fontkern(xscaled(prevglyph,rightkern)))
+ done = true
+ end
+ end
+ end
+ end
+ end
+ if done then
+ setdisc(current,pre,post,replace)
+ end
+ prevglyph = nil
+ prevdisc = current
+ else
+ -- base = nil
+ prevglyph = nil
+ prevdisc = nil
+ end
+ prev = current
+ current = next
+ end
+ -- cursive
+ if hascursives and maxc > 0 then
+ local nx, ny = getoffsets(last)
+ for i=maxc,minc,-1 do
+ local ti = glyphs[i]
+ ny = ny + yscaled(properties[ti].cursivedy)
+ setoffsets(ti,false,ny)
+ if trace_cursive then
+ showoffset(ti)
+ end
+ end
+ end
+ --
+ if nofmarks > 0 then
+ for i=1,nofmarks do
+ local m = marks[i]
+ local p = rawget(properties,m)
+ local i = p.injections
+ local b = i.markbasenode
+ processmark(b,m,i)
+ end
+ elseif hasmarks then
+ -- sometyhing bad happened
+ end
+ --
+ if keepregisteredcounts then
+ keepregisteredcounts = false
+ else
+ nofregisteredkerns = 0
+ nofregisteredpositions = 0
+ nofregisteredmarks = 0
+ nofregisteredcursives = 0
+ end
+ if trace_injections then
+ show_result(head)
+ end
+ return head
+end
+
+-- space triggers
+
+local triggers = false
+
+function nodes.injections.setspacekerns(font,sequence)
+ if triggers then
+ triggers[font] = sequence
+ else
+ triggers = { [font] = sequence }
+ end
+end
+
+local threshold = 1 -- todo: add a few methods for context
+
+directives.register("otf.threshold", function(v) threshold = tonumber(v) or 1 end)
+
+local getthreshold = function(font)
+ local p = parameters[font]
+ local f = p.factor
+ local s = p.spacing
+ local t = threshold * (s and s.width or p.space or 0) - 2
+ return t > 0 and t or 0, f
+end
+
+injections.getthreshold = getthreshold
+
+function injections.isspace(n,threshold,id)
+ if (id or getid(n)) == glue_code then
+ local w = getwidth(n)
+ if threshold and w > threshold then -- was >=
+ return 32
+ end
+ end
+end
+
+-- We have a plugin so that Kai can use the next in plain. Such a plugin is rather application
+-- specific.
+--
+-- local getboth = nodes.direct.getboth
+-- local getid = nodes.direct.getid
+-- local getprev = nodes.direct.getprev
+-- local getnext = nodes.direct.getnext
+--
+-- local whatsit_code = nodes.nodecodes.whatsit
+-- local glyph_code = nodes.nodecodes.glyph
+--
+-- local function getspaceboth(n) -- fragile: what it prev/next has no width field
+-- local prev, next = getboth(n)
+-- while prev and (getid(prev) == whatsit_code or (getwidth(prev) == 0 and getid(prev) ~= glyph_code)) do
+-- prev = getprev(prev)
+-- end
+-- while next and (getid(next) == whatsit_code or (getwidth(next) == 0 and getid(next) ~= glyph_code)) do
+-- next = getnext(next)
+-- end
+-- end
+--
+-- injections.installgetspaceboth(getspaceboth)
+
+local getspaceboth = getboth
+
+function injections.installgetspaceboth(gb)
+ getspaceboth = gb or getboth
+end
+
+local function injectspaces(head)
+
+ if not triggers then
+ return head
+ end
+ local lastfont = nil
+ local spacekerns = nil
+ local leftkerns = nil
+ local rightkerns = nil
+ local factor = 0
+ local threshold = 0
+ local leftkern = false
+ local rightkern = false
+ local xscale = 1
+
+ local function updatefont(font,trig)
+ leftkerns = trig.left
+ rightkerns = trig.right
+ lastfont = font
+ threshold,
+ factor = getthreshold(font)
+ end
+
+ for n in nextglue, head do
+ local prev, next = getspaceboth(n)
+ local prevchar = prev and ischar(prev)
+ local nextchar = next and ischar(next)
+ if nextchar then
+ local font = getfont(next)
+ local trig = triggers[font]
+ if trig then
+ if lastfont ~= font then
+ updatefont(font,trig)
+ end
+ if rightkerns then
+ rightkern = rightkerns[nextchar]
+ end
+ xscale = getxscale(next)
+ end
+ end
+ if prevchar then
+ local font = getfont(prev)
+ local trig = triggers[font]
+ if trig then
+ if lastfont ~= font then
+ updatefont(font,trig)
+ end
+ if leftkerns then
+ leftkern = leftkerns[prevchar]
+ end
+ xscale = getxscale(prev)
+ end
+ end
+ if leftkern then
+ local old = getwidth(n)
+ if old > threshold then
+ if rightkern then
+ if useitalickerns then
+ local lnew = leftkern * factor
+ local rnew = rightkern * factor
+ if trace_spaces then
+ report_spaces("%C [%p + %p + %p] %C",prevchar,lnew,old,rnew,nextchar)
+ end
+ lnew = lnew * xscale
+ rnew = rnew * xscale
+ head = insert_node_before(head,n,italickern(lnew))
+ insert_node_after(head,n,italickern(rnew))
+ else
+ local new = old + (leftkern + rightkern) * factor
+ if trace_spaces then
+ report_spaces("%C [%p -> %p] %C",prevchar,old,new,nextchar)
+ end
+ setwidth(n,new)
+ end
+ rightkern = false
+ else
+ if useitalickerns then
+ local new = leftkern * factor
+ if trace_spaces then
+ report_spaces("%C [%p + %p]",prevchar,old,new)
+ end
+ new = new * xscale
+ insert_node_after(head,n,italickern(new)) -- tricky with traverse but ok
+ else
+ local new = old + leftkern * factor * xscale
+ if trace_spaces then
+ report_spaces("%C [%p -> %p]",prevchar,old,new)
+ end
+ setwidth(n,new)
+ end
+ end
+ end
+ leftkern = false
+ elseif rightkern then
+ local old = getwidth(n)
+ if old > threshold then
+ local new = rightkern * factor * xscale
+ if useitalickerns then
+ if trace_spaces then
+ report_spaces("[%p + %p] %C",old,new,nextchar)
+ end
+ insert_node_after(head,n,italickern(new))
+ else
+ new = old + new
+ if trace_spaces then
+ report_spaces("[%p -> %p] %C",old,new,nextchar)
+ end
+ setwidth(n,new)
+ end
+ else
+ -- message
+ end
+ rightkern = false
+ end
+ end
+
+ triggers = false
+
+ return head
+end
+
+-- When advance is found to be okay there will be split functions (which is abit
+-- more efficient) but first we need to have scales done (we can also have addoffset
+-- and alike then)
+
+function injections.handler(head,where)
+ if triggers then
+ head = injectspaces(head)
+ end
+ if nofregisteredmarks > 0 or nofregisteredcursives > 0 then
+ if trace_injections then
+ report_injections("injection variant %a (%s)","everything","kerns")
+ end
+ -- I will do useadvance here when I am playing with fonts that follow this
+ -- injection routem, which is seldom.
+ return inject_everything(head,where)
+ elseif nofregisteredpositions > 0 then
+ if trace_injections then
+ report_injections("injection variant %a (%s)","positions",useadvance and "margins" or "kerns")
+ end
+ if useadvance then
+ return inject_positions_only_margins(head,where)
+ else
+ return inject_positions_only_kerns(head,where)
+ end
+ elseif nofregisteredkerns > 0 then
+ if trace_injections then
+ report_injections("injection variant %a (%s)","kerns",useadvance and "margins" or "kerns")
+ end
+ if useadvance then
+ return inject_kerns_only_margins(head,where)
+-- return inject_positions_only_margins(head,where)
+ else
+ return inject_kerns_only_kerns(head,where)
+ end
+ else
+ return head
+ end
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt
new file mode 100644
index 00000000000..37f76b258a7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-ots.lmt
@@ -0,0 +1,4475 @@
+if not modules then modules = { } end modules ['font-ots'] = { -- sequences
+ version = 1.001,
+ optimize = true,
+ 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",
+}
+
+--[[ldx--
+<p>This module is a bit more split up that I'd like but since we also want to test
+with plain <l n='tex'/> it has to be so. This module is part of <l n='context'/>
+and discussion about improvements and functionality mostly happens on the
+<l n='context'/> mailing list.</p>
+
+<p>The specification of OpenType is (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.
+--
+-- 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}.
+--
+-- 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.
+--
+-- 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:
+--
+-- \discretionary {alpha-} {betagammadelta}
+-- {\discretionary {alphabeta-} {gammadelta}
+-- {\discretionary {alphabetagamma-} {delta}
+-- {alphabetagammadelta}}}
+--
+-- Remark: Something is messed up: we have two mark / ligature indices, one at the
+-- injection end and one here ... this is based on KE's patches but there is something
+-- fishy there as I'm pretty sure that for husayni we need some connection (as it's much
+-- more complex than an average font) but I need proper examples of all cases, not of
+-- only some.
+--
+-- Remark: I wonder if indexed would be faster than unicoded. It would be a major
+-- rewrite to have char being unicode + an index field in glyph nodes. Also more
+-- assignments have to be made in order to keep things in sync. So, it's a no-go.
+--
+-- Remark: We can provide a fast loop when there are no disc nodes (tests show a 1%
+-- gain). Smaller functions might perform better cache-wise. But ... memory becomes
+-- faster anyway, so ...
+--
+-- Remark: Some optimizations made sense for 5.2 but seem less important for 5.3 but
+-- anyway served their purpose.
+--
+-- Todo: just (0=l2r and 1=r2l) or maybe (r2l = true)
+
+-- Experiments with returning the data with the ischar are positive for lmtx but
+-- have a performance hit on mkiv because there we need to wrap ischardata (pending
+-- extensions to luatex which is unlikely to happen for such an experiment because
+-- we then can't remove it). Actually it might make generic slightly faster. Also,
+-- there are some corner cases where a data check comes before a char fetch and
+-- we're talking of millions of calls there. At some point I might make a version
+-- for lmtx that does it slightly different anyway.
+
+local type, next, tonumber = type, next, tonumber
+local random = math.random
+local formatters = string.formatters
+local insert = table.insert
+
+local registertracker = trackers.register
+
+local logs = logs
+local trackers = trackers
+local nodes = nodes
+local fonts = fonts
+
+local otf = fonts.handlers.otf
+local tracers = nodes.tracers
+
+local trace_singles = false registertracker("otf.singles", function(v) trace_singles = v end)
+local trace_multiples = false registertracker("otf.multiples", function(v) trace_multiples = v end)
+local trace_alternatives = false registertracker("otf.alternatives", function(v) trace_alternatives = v end)
+local trace_ligatures = false registertracker("otf.ligatures", function(v) trace_ligatures = v end)
+local trace_contexts = false registertracker("otf.contexts", function(v) trace_contexts = v end)
+local trace_marks = false registertracker("otf.marks", function(v) trace_marks = v end)
+local trace_kerns = false registertracker("otf.kerns", function(v) trace_kerns = v end)
+local trace_cursive = false registertracker("otf.cursive", function(v) trace_cursive = v end)
+local trace_preparing = false registertracker("otf.preparing", function(v) trace_preparing = v end)
+local trace_bugs = false registertracker("otf.bugs", function(v) trace_bugs = v end)
+local trace_details = false registertracker("otf.details", function(v) trace_details = v end)
+local trace_steps = false registertracker("otf.steps", function(v) trace_steps = v end)
+local trace_skips = false registertracker("otf.skips", function(v) trace_skips = v end)
+local trace_plugins = false registertracker("otf.plugins", function(v) trace_plugins = v end)
+local trace_chains = false registertracker("otf.chains", function(v) trace_chains = v end)
+
+local trace_kernruns = false registertracker("otf.kernruns", function(v) trace_kernruns = v end)
+----- trace_discruns = false registertracker("otf.discruns", function(v) trace_discruns = v end)
+local trace_compruns = false registertracker("otf.compruns", function(v) trace_compruns = v end)
+local trace_testruns = false registertracker("otf.testruns", function(v) trace_testruns = v end)
+
+local forcediscretionaries = false
+local forcepairadvance = false -- for testing
+
+directives.register("otf.forcediscretionaries",function(v)
+ forcediscretionaries = v
+end)
+
+directives.register("otf.forcepairadvance",function(v)
+ forcepairadvance = v
+end)
+
+local report_direct = logs.reporter("fonts","otf direct")
+local report_subchain = logs.reporter("fonts","otf subchain")
+local report_chain = logs.reporter("fonts","otf chain")
+local report_process = logs.reporter("fonts","otf process")
+local report_warning = logs.reporter("fonts","otf warning")
+local report_run = logs.reporter("fonts","otf run")
+
+registertracker("otf.substitutions", "otf.singles","otf.multiples","otf.alternatives","otf.ligatures")
+registertracker("otf.positions", "otf.marks","otf.kerns","otf.cursive")
+registertracker("otf.actions", "otf.substitutions","otf.positions")
+registertracker("otf.sample", "otf.steps","otf.substitutions","otf.positions","otf.analyzing")
+registertracker("otf.sample.silent", "otf.steps=silent","otf.substitutions","otf.positions","otf.analyzing")
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local setnext = nuts.setnext
+local getprev = nuts.getprev
+local setprev = nuts.setprev
+local getboth = nuts.getboth
+local setboth = nuts.setboth
+local getid = nuts.getid
+local getstate = nuts.getstate
+local setsubtype = nuts.setsubtype
+local getchar = nuts.getchar
+local setchar = nuts.setchar
+local getdisc = nuts.getdisc
+local setdisc = nuts.setdisc
+local getreplace = nuts.getreplace
+local setlink = nuts.setlink
+local getwidth = nuts.getwidth
+local getoptions = nuts.getoptions
+local setoptions = nuts.setoptions
+
+local getglyphdata = nuts.getglyphdata
+local getscales = nuts.getscales
+
+---------------------------------------------------------------------------------------
+
+-- Beware: In ConTeXt components no longer are real components. We only keep track of
+-- their positions because some complex ligatures might need that. For the moment we
+-- use an x_ prefix because for now generic follows the other approach.
+
+local copy_no_components = nuts.copy_no_components
+local copy_only_glyphs = nuts.copy_only_glyphs
+local count_components = nuts.count_components
+local set_components = nuts.set_components
+local get_components = nuts.get_components
+local flush_components = nuts.flush_components
+
+---------------------------------------------------------------------------------------
+
+local ischar = nuts.ischar
+local isnextchar = nuts.isnextchar -- only makes sense when we know we need next
+local isprevchar = nuts.isprevchar -- only makes sense when we know we need prev
+local usesfont = nuts.uses_font
+
+local insert_node_after = nuts.insert_after
+local copy_node = nuts.copy
+local copy_node_list = nuts.copy_list
+local remove_node = nuts.remove
+local find_node_tail = nuts.tail
+local flush_node_list = nuts.flush_list
+local flush_node = nuts.flush_node
+local end_of_math = nuts.end_of_math
+local start_of_par = nuts.start_of_par
+
+local setmetatable = setmetatable
+local setmetatableindex = table.setmetatableindex
+
+local nextnode = nuts.traversers.node
+
+----- zwnj = 0x200C
+----- zwj = 0x200D
+
+local nodecodes = nodes.nodecodes
+local glyphcodes = nodes.glyphcodes
+
+local glyph_code = nodecodes.glyph
+local glue_code = nodecodes.glue
+local disc_code = nodecodes.disc
+local math_code = nodecodes.math
+local dir_code = nodecodes.dir
+local par_code = nodecodes.par
+
+local lefttoright_code = nodes.dirvalues.lefttoright
+local righttoleft_code = nodes.dirvalues.righttoleft
+
+local discretionarydisc_code = nodes.disccodes.discretionary
+local ligatureglyph_code = glyphcodes.ligature
+
+local injections = nodes.injections
+local setmark = injections.setmark
+local setcursive = injections.setcursive
+local setkern = injections.setkern
+local setmove = injections.setmove
+local setposition = injections.setposition
+local resetinjection = injections.reset
+local copyinjection = injections.copy
+local setligaindex = injections.setligaindex
+local getligaindex = injections.getligaindex
+
+local fontdata = fonts.hashes.identifiers
+local fontfeatures = fonts.hashes.features
+
+local otffeatures = fonts.constructors.features.otf
+local registerotffeature = otffeatures.register
+
+local onetimemessage = fonts.loggers.onetimemessage or function() end
+
+local getrandom = utilities and utilities.randomizer and utilities.randomizer.get
+
+otf.defaultnodealternate = "none" -- first last
+
+-- We use a few semi-global variables. The handler can be called nested but this assumes
+-- that the same font is used.
+
+local tfmdata = false
+local characters = false
+local descriptions = false
+local marks = false
+local classes = false
+local currentfont = false
+local currentdynamic = false
+local currentscale = false
+local currentxscale = false
+local currentyscale = false
+local factor = 0
+local threshold = 0
+local checkmarks = false
+
+local discs = false
+local spaces = false
+
+local sweepnode = nil
+local sweephead = { } -- we don't nil entries but false them (no collection and such)
+
+local notmatchpre = { } -- to be checked: can we use false instead of nil / what if a == b tests
+local notmatchpost = { } -- to be checked: can we use false instead of nil / what if a == b tests
+local notmatchreplace = { } -- to be checked: can we use false instead of nil / what if a == b tests
+
+local handlers = { }
+
+local isspace = injections.isspace
+local getthreshold = injections.getthreshold
+
+local checkstep = (tracers and tracers.steppers.check) or function() end
+local registerstep = (tracers and tracers.steppers.register) or function() end
+local registermessage = (tracers and tracers.steppers.message) or function() end
+
+-- local function checkdisccontent(d)
+-- local pre, post, replace = getdisc(d)
+-- if pre then for n in traverse_id(glue_code,pre) do report("pre: %s",nodes.idstostring(pre)) break end end
+-- if post then for n in traverse_id(glue_code,post) do report("pos: %s",nodes.idstostring(post)) break end end
+-- if replace then for n in traverse_id(glue_code,replace) do report("rep: %s",nodes.idstostring(replace)) break end end
+-- end
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ if trace_steps == "silent" then
+ return
+ end
+ end
+ report_direct(...)
+end
+
+local function logwarning(...)
+ report_direct(...)
+end
+
+local gref do
+
+ local f_unicode = formatters["U+%X"] -- was ["%U"]
+ local f_uniname = formatters["U+%X (%s)"] -- was ["%U (%s)"]
+ local f_unilist = formatters["% t"]
+
+ gref = function(n) -- currently the same as in font-otb
+ if type(n) == "number" then
+ local description = descriptions[n]
+ local name = description and description.name
+ if name then
+ return f_uniname(n,name)
+ else
+ return f_unicode(n)
+ end
+ elseif n then
+ local t = { }
+ for i=1,#n do
+ local ni = n[i]
+ if tonumber(ni) then -- later we will start at 2
+ local di = descriptions[ni]
+ local nn = di and di.name
+ if nn then
+ t[#t+1] = f_uniname(ni,nn)
+ else
+ t[#t+1] = f_unicode(ni)
+ end
+ end
+ end
+ return f_unilist(t)
+ else
+ return "<error in node mode tracing>"
+ end
+ end
+
+end
+
+local function cref(dataset,sequence,index)
+ if not dataset then
+ return "no valid dataset"
+ end
+ local merged = sequence.merged and "merged " or ""
+ if index then
+ return formatters["feature %a, type %a, %schain lookup %a, index %a"](
+ dataset[4],sequence.type,merged,sequence.name,index)
+ else
+ return formatters["feature %a, type %a, %schain lookup %a"](
+ dataset[4],sequence.type,merged,sequence.name)
+ end
+end
+
+local function pref(dataset,sequence)
+ return formatters["feature %a, type %a, %slookup %a"](
+ dataset[4],sequence.type,sequence.merged and "merged " or "",sequence.name)
+end
+
+local function mref(rlmode)
+ if not rlmode or rlmode >= 0 then
+ return "l2r"
+ else
+ return "r2l"
+ end
+end
+
+-- The next code is somewhat complicated by the fact that some fonts can have ligatures made
+-- from ligatures that themselves have marks. This was identified by Kai in for instance
+-- arabtype: KAF LAM SHADDA ALEF FATHA (0x0643 0x0644 0x0651 0x0627 0x064E). This becomes
+-- KAF LAM-ALEF with a SHADDA on the first and a FATHA op de second component. In a next
+-- iteration this becomes a KAF-LAM-ALEF with a SHADDA on the second and a FATHA on the
+-- third component.
+
+-- We can assume that languages that use marks are not hyphenated. We can also assume
+-- that at most one discretionary is present.
+
+-- We do need components in funny kerning mode but maybe I can better reconstruct then
+-- as we do have the font components info available; removing components makes the
+-- previous code much simpler. Also, later on copying and freeing becomes easier.
+-- However, for arabic we need to keep them around for the sake of mark placement
+-- and indices.
+
+local function flattendisk(head,disc)
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ local prev, next = getboth(disc)
+ local ishead = head == disc
+ setdisc(disc)
+ flush_node(disc)
+ if pre then
+ flush_node_list(pre)
+ end
+ if post then
+ flush_node_list(post)
+ end
+ if ishead then
+ if replace then
+ if next then
+ setlink(replacetail,next)
+ end
+ return replace, replace
+ elseif next then
+ return next, next
+ else
+ -- return -- maybe warning
+ end
+ else
+ if replace then
+ if next then
+ setlink(replacetail,next)
+ end
+ setlink(prev,replace)
+ return head, replace
+ else
+ setlink(prev,next) -- checks for next anyway
+ return head, next
+ end
+ end
+end
+
+local function appenddisc(disc,list)
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ local posthead = list
+ local replacehead = copy_node_list(list)
+ if post then
+ setlink(posttail,posthead)
+ else
+ post = posthead
+ end
+ if replace then
+ setlink(replacetail,replacehead)
+ else
+ replace = replacehead
+ end
+ setdisc(disc,pre,post,replace)
+end
+
+local function markstoligature(head,start,stop,char)
+ if start == stop and getchar(start) == char then
+ return head, start
+ else
+ local prev = getprev(start)
+ local next = getnext(stop)
+ setprev(start)
+ setnext(stop)
+ local base = copy_no_components(start,copyinjection)
+ if head == start then
+ head = base
+ end
+ resetinjection(base)
+ setchar(base,char)
+ setsubtype(base,ligatureglyph_code)
+ set_components(base,start)
+ setlink(prev,base,next)
+ flush_components(start)
+ return head, base
+ end
+end
+
+-- Remark for Kai: (some arabic fonts do mark + mark = other mark and such)
+--
+-- The hasmarks is needed for ligatures of marks that are part of a ligature in
+-- which case we assume that we can delete the marks anyway (we can always become
+-- more clever if needed) .. in fact the whole logic here should be redone. We're
+-- in the not discfound branch then. We now have skiphash too so we can be more
+-- selective if needed (todo).
+
+-- we can have more granularity here but for now we only do a simple check
+
+local no_left_ligature_code = 1
+local no_right_ligature_code = 2
+local no_left_kern_code = 4
+local no_right_kern_code = 8
+
+local has_glyph_option = nuts.has_glyph_option
+
+-- in lmtx we need to check the components and can be slightly more clever
+
+local function inhibited(start,stop)
+ for n in nextnode, start do
+ -- we asume glyph nodes
+ if n == start then
+ if has_glyph_option(n,no_right_ligature_code) then
+ return true
+ end
+ elseif n == stop then
+ if has_glyph_option(n,no_left_ligature_code) then
+ return true
+ else
+ return false
+ end
+ elseif has_glyph_option(n,no_left_ligature_code) then
+ return true
+ elseif has_glyph_option(n,no_right_ligature_code) then
+ return true
+ end
+ end
+ return false
+end
+
+local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfound,hasmarks) -- brr head
+ if start == stop and getchar(start) == char then
+ resetinjection(start)
+ setchar(start,char)
+ return head, start
+ end
+ if inhibited(start,stop) then
+ return head, start
+ end
+ local prev = getprev(start)
+ local next = getnext(stop)
+ local comp = start
+ setprev(start)
+ setnext(stop)
+ local base = copy_no_components(start,copyinjection)
+ if start == head then
+ head = base
+ end
+ resetinjection(base)
+ setchar(base,char)
+ setoptions(base,getoptions(start) | getoptions(stop)) -- maybe only lig options
+ setsubtype(base,ligatureglyph_code)
+ set_components(base,comp)
+ setlink(prev,base,next)
+ if not discfound then
+ local deletemarks = not skiphash or hasmarks
+ local components = start -- not used
+ local baseindex = 0
+ local componentindex = 0
+ local head = base
+ local current = base
+ -- first we loop over the glyphs in start ... stop
+ while start do
+ local char = getchar(start)
+ if not marks[char] then
+ baseindex = baseindex + componentindex
+ componentindex = count_components(start,marks)
+ -- we can be more clever here: "not deletemarks or (skiphash and not skiphash[char])"
+ -- and such:
+ elseif not deletemarks then
+ -- we can get a loop when the font expects otherwise (i.e. unexpected deletemarks)
+ setligaindex(start,baseindex + getligaindex(start,componentindex))
+ if trace_marks then
+ logwarning("%s: keep ligature mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ end
+ local n = copy_node(start)
+ copyinjection(n,start) -- is this ok ? we position later anyway
+ head, current = insert_node_after(head,current,n) -- unlikely that mark has components
+ elseif trace_marks then
+ logwarning("%s: delete ligature mark %s",pref(dataset,sequence),gref(char))
+ end
+ start = getnext(start)
+ end
+ -- we can have one accent as part of a lookup and another following
+ local start = getnext(current)
+ while start do
+ local nxt, char = isnextchar(start,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ -- also something skiphash here?
+ if marks[char] then
+ setligaindex(start,baseindex + getligaindex(start,componentindex))
+ if trace_marks then
+ logwarning("%s: set ligature mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ end
+ start = nxt
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ flush_components(components)
+ else
+ -- discfound ... forget about marks .. probably no scripts that hyphenate and have marks
+ local discprev, discnext = getboth(discfound)
+ if discprev and discnext then
+ -- we assume normalization in context, and don't care about generic ... especially
+ -- \- can give problems as there we can have a negative char but that won't match
+ -- anyway
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(discfound,true)
+ if not replace then
+ -- looks like we never come here as it's not okay
+ local prev = getprev(base)
+ -- local comp = get_components(base) -- already set
+ local copied = copy_only_glyphs(comp)
+ if pre then
+ setlink(discprev,pre)
+ else
+ setnext(discprev) -- also blocks funny assignments
+ end
+ pre = comp -- is start
+ if post then
+ setlink(posttail,discnext)
+ setprev(post) -- nil anyway
+ else
+ post = discnext
+ setprev(discnext) -- also blocks funny assignments
+ end
+ setlink(prev,discfound,next)
+ setboth(base)
+ -- here components have a pointer so we can't free it!
+ set_components(base,copied)
+ replace = base
+ if forcediscretionaries then
+ setdisc(discfound,pre,post,replace,discretionarydisc_code)
+ else
+ setdisc(discfound,pre,post,replace)
+ end
+ base = prev
+ end
+ end
+ end
+ return head, base
+end
+
+local function multiple_glyphs(head,start,multiple,skiphash,what,stop) -- what to do with skiphash matches here
+ local nofmultiples = #multiple
+ if nofmultiples > 0 then
+ resetinjection(start)
+ setchar(start,multiple[1])
+ if nofmultiples > 1 then
+ local sn = getnext(start)
+ for k=2,nofmultiples do
+ -- untested:
+ --
+ -- while ignoremarks and marks[getchar(sn)] then
+ -- local sn = getnext(sn)
+ -- end
+ local n = copy_node(start) -- ignore components
+ resetinjection(n)
+ setchar(n,multiple[k])
+ insert_node_after(head,start,n)
+ start = n
+ end
+ if what == true then
+ -- we're ok
+ elseif what > 1 then
+ local m = multiple[nofmultiples]
+ for i=2,what do
+ local n = copy_node(start) -- ignore components
+ resetinjection(n)
+ setchar(n,m)
+ insert_node_after(head,start,n)
+ start = n
+ end
+ end
+ end
+ return head, start, true
+ else
+ if trace_multiples then
+ logprocess("no multiple for %s",gref(getchar(start)))
+ end
+ return head, start, false
+ end
+end
+
+local function get_alternative_glyph(start,alternatives,value)
+ local n = #alternatives
+ if n == 1 then
+ -- we could actually change that into a gsub and save some memory in the
+ -- font loader but it makes tracing more messy
+ return alternatives[1], trace_alternatives and "1 (only one present)"
+ elseif value == "random" then
+ local r = getrandom and getrandom("glyph",1,n) or random(1,n)
+ return alternatives[r], trace_alternatives and formatters["value %a, taking %a"](value,r)
+ elseif value == "first" then
+ return alternatives[1], trace_alternatives and formatters["value %a, taking %a"](value,1)
+ elseif value == "last" then
+ return alternatives[n], trace_alternatives and formatters["value %a, taking %a"](value,n)
+ end
+ value = value == true and 1 or tonumber(value)
+ if type(value) ~= "number" then
+ return alternatives[1], trace_alternatives and formatters["invalid value %s, taking %a"](value,1)
+ end
+ -- local a = alternatives[value]
+ -- if a then
+ -- -- some kind of hash
+ -- return a, trace_alternatives and formatters["value %a, taking %a"](value,a)
+ -- end
+ if value > n then
+ local defaultalt = otf.defaultnodealternate
+ if defaultalt == "first" then
+ return alternatives[n], trace_alternatives and formatters["invalid value %s, taking %a"](value,1)
+ elseif defaultalt == "last" then
+ return alternatives[1], trace_alternatives and formatters["invalid value %s, taking %a"](value,n)
+ else
+ return false, trace_alternatives and formatters["invalid value %a, %s"](value,"out of range")
+ end
+ elseif value == 0 then
+ return getchar(start), trace_alternatives and formatters["invalid value %a, %s"](value,"no change")
+ elseif value < 1 then
+ return alternatives[1], trace_alternatives and formatters["invalid value %a, taking %a"](value,1)
+ else
+ return alternatives[value], trace_alternatives and formatters["value %a, taking %a"](value,value)
+ end
+end
+
+-- handlers
+
+function handlers.gsub_single(head,start,dataset,sequence,replacement)
+ if trace_singles then
+ logprocess("%s: replacing %s by single %s",pref(dataset,sequence),gref(getchar(start)),gref(replacement))
+ end
+ resetinjection(start)
+ setchar(start,replacement)
+ return head, start, true
+end
+
+function handlers.gsub_alternate(head,start,dataset,sequence,alternative)
+ local kind = dataset[4]
+ local what = dataset[1]
+ local value = what == true and tfmdata.shared.features[kind] or what
+ local choice, comment = get_alternative_glyph(start,alternative,value)
+ if choice then
+ if trace_alternatives then
+ logprocess("%s: replacing %s by alternative %a to %s, %s",pref(dataset,sequence),gref(getchar(start)),gref(choice),comment)
+ end
+ resetinjection(start)
+ setchar(start,choice)
+ else
+ if trace_alternatives then
+ logwarning("%s: no variant %a for %s, %s",pref(dataset,sequence),value,gref(getchar(start)),comment)
+ end
+ end
+ return head, start, true
+end
+
+function handlers.gsub_multiple(head,start,dataset,sequence,multiple,rlmode,skiphash)
+ if trace_multiples then
+ logprocess("%s: replacing %s by multiple %s",pref(dataset,sequence),gref(getchar(start)),gref(multiple))
+ end
+ return multiple_glyphs(head,start,multiple,skiphash,dataset[1])
+end
+
+-- Don't we deal with disc otherwise now? I need to check if the next one can be
+-- simplified. Anyway, it can be way messier: marks that get removed as well as
+-- marks that are kept.
+
+function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skiphash)
+ local current = getnext(start)
+ if not current then
+ return head, start, false, nil
+ end
+ local stop = nil
+ local startchar = getchar(start)
+ if skiphash and skiphash[startchar] then
+ while current do
+ local nxt, char = isnextchar(current,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ local lg = ligature[char]
+ if lg then
+ stop = current
+ ligature = lg
+ current = nxt
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if stop then
+ local lig = ligature.ligature
+ if lig then
+ if trace_ligatures then
+ local stopchar = getchar(stop)
+ head, start = markstoligature(head,start,stop,lig)
+ logprocess("%s: replacing %s upto %s by ligature %s case 1",pref(dataset,sequence),gref(startchar),gref(stopchar),gref(getchar(start)))
+ else
+ head, start = markstoligature(head,start,stop,lig)
+ end
+ return head, start, true, false
+ else
+ -- ok, goto next lookup
+ end
+ end
+ else
+ local discfound = false
+ local hasmarks = marks[startchar]
+ while current do
+ local nxt, char, id = isnextchar(current,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ if skiphash and skiphash[char] then
+ current = nxt
+ else
+ local lg = ligature[char]
+ if lg then
+ if marks[char] then
+ hasmarks = true
+ end
+ stop = current -- needed for fake so outside then
+ ligature = lg
+ current = nxt
+ else
+ break
+ end
+ end
+ elseif char == false then
+ -- kind of weird
+ break
+ elseif id == disc_code then
+ discfound = current
+ break
+ else
+ break
+ end
+ end
+ -- of{f-}{}{f}e o{f-}{}{f}fe o{-}{}{ff}e (oe and ff ligature)
+ -- we can end up here when we have a start run .. testruns start at a disc but
+ -- so here we have the other case: char + disc
+ --
+ -- Challenge for Kai (latinmodern): \hyphenation{fii-f-f-iif} fiiffiif
+ --
+ if discfound then
+ -- don't assume marks in a disc and we don't run over a disc (for now)
+ local pre, post, replace = getdisc(discfound)
+ local match
+ if replace then
+ local nxt, char = isnextchar(replace,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char and ligature[char] then
+ match = true
+ end
+ end
+ if not match and pre then
+ local nxt, char = isnextchar(pre,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char and ligature[char] then
+ match = true
+ end
+ end
+ -- is this test ok:
+ if not match and not pre or not replace then
+ local nxt, char = isnextchar(getnext(discfound),currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char and ligature[char] then
+ match = true
+ end
+ end
+ if match then
+ -- we force a restart
+ local ishead = head == start
+ local prev = getprev(start)
+ if stop then
+ setnext(stop)
+ local copy = copy_node_list(start)
+ local tail = stop -- was: getprev(stop) -- Kai: needs checking on your samples
+ local liat = find_node_tail(copy)
+ if pre then
+ setlink(liat,pre)
+ end
+ if replace then
+ setlink(tail,replace)
+ end
+ pre = copy
+ replace = start
+ else
+ setnext(start)
+ local copy = copy_node(start)
+ if pre then
+ setlink(copy,pre)
+ end
+ if replace then
+ setlink(start,replace)
+ end
+ pre = copy
+ replace = start
+ end
+ setdisc(discfound,pre,post,replace)
+ if prev then
+ setlink(prev,discfound)
+ else
+ setprev(discfound)
+ head = discfound
+ end
+ start = discfound
+ return head, start, true, true
+ end
+ end
+ local lig = ligature.ligature
+ if lig then
+ if stop then
+ if trace_ligatures then
+ local stopchar = getchar(stop)
+ -- head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,discfound,hasmarks)
+ head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,false,hasmarks)
+ logprocess("%s: replacing %s upto %s by ligature %s case 2",pref(dataset,sequence),gref(startchar),gref(stopchar),gref(lig))
+ -- we can have a rare case of multiple disc in a lig but that makes no sense language wise but if really
+ -- needed we could backtrack if we're in a disc node
+ else
+ -- head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,discfound,hasmarks)
+ head, start = toligature(head,start,stop,lig,dataset,sequence,skiphash,false,hasmarks)
+ end
+ else
+ -- weird but happens (in some arabic font)
+ resetinjection(start)
+ setchar(start,lig)
+ if trace_ligatures then
+ logprocess("%s: replacing %s by (no real) ligature %s case 3",pref(dataset,sequence),gref(startchar),gref(lig))
+ end
+ end
+ return head, start, true, false
+ else
+ -- weird but happens, pseudo ligatures ... just the components
+ end
+ end
+ return head, start, false, false
+end
+
+function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
+ if has_glyph_option(start,no_right_kern_code) then
+ return head, start, false
+ else
+ local startchar = getchar(start)
+ local format = step.format
+ if format == "single" or type(kerns) == "table" then -- the table check can go
+ local dx, dy, w, h = setposition(0,start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s xy (%p,%p) and wh (%p,%p)",pref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
+ end
+ else
+ local k = (format == "move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s %p",pref(dataset,sequence),gref(startchar),format,k)
+ end
+ end
+ return head, start, true
+ end
+end
+
+function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
+ if has_glyph_option(start,no_right_kern_code) then
+ return head, start, false
+ else
+ local snext = getnext(start)
+ if not snext then
+ return head, start, false
+ else
+ local prev = start
+ while snext do
+ local nxt, nextchar = isnextchar(snext,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if nextchar then
+ if skiphash and skiphash[nextchar] then -- includes marks too when flag
+ prev = snext
+ snext = nxt
+ else
+ local krn = kerns[nextchar]
+ if not krn then
+ break
+ end
+ local format = step.format
+ if format == "pair" then
+ local a = krn[1]
+ local b = krn[2]
+ if a == true then
+ -- zero
+ elseif a then -- #a > 0
+ local x, y, w, h = setposition(1,start,factor,rlmode,a,injection)
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ end
+ if b == true then
+ -- zero
+ start = snext -- cf spec
+ elseif b then -- #b > 0
+ local x, y, w, h = setposition(2,snext,factor,rlmode,b,injection)
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting second of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ start = snext -- cf spec
+ elseif forcepairadvance then
+ start = snext -- for testing, not cf spec
+ end
+ return head, start, true
+ elseif krn ~= 0 then
+ local k = (format == "move" and setmove or setkern)(snext,factor,rlmode,krn,injection)
+ if trace_kerns then
+ logprocess("%s: inserting %s %p between %s and %s as %s",pref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar),injection or "injections")
+ end
+ return head, start, true
+ else -- can't happen
+ break
+ end
+ end
+ else
+ break
+ end
+ end
+ return head, start, false
+ end
+ end
+end
+
+--[[ldx--
+<p>We get hits on a mark, but we're not sure if the it has to be applied so
+we need to explicitly test for basechar, baselig and basemark entries.</p>
+--ldx]]--
+
+function handlers.gpos_mark2base(head,start,dataset,sequence,markanchors,rlmode,skiphash)
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local base = getprev(start) -- [glyph] [start=mark]
+ if base then
+ local prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if marks[basechar] then
+ -- todo: use prv
+ while base do
+ base = getprev(base)
+ if base then
+ prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],false,checkmarks)
+ if trace_marks then
+ logprocess("%s, bound %s, anchoring mark %s to basechar %s => (%p,%p)",
+ pref(dataset,sequence),bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ elseif trace_bugs then
+ -- onetimemessage(currentfont,basechar,"no base anchors",report_fonts)
+ logwarning("%s: mark %s is not anchored to %s",pref(dataset,sequence),gref(markchar),gref(basechar))
+ end
+ elseif trace_bugs then
+ logwarning("%s: nothing preceding, case %i",pref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: nothing preceding, case %i",pref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",pref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function handlers.gpos_mark2ligature(head,start,dataset,sequence,markanchors,rlmode,skiphash)
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local base = getprev(start) -- [glyph] [optional marks] [start=mark]
+ if base then
+ local prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if marks[basechar] then
+ -- todo: use prv
+ while base do
+ base = getprev(base)
+ if base then
+ prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local index = getligaindex(start)
+ ba = ba[index]
+ if ba then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],false,checkmarks)
+ if trace_marks then
+ logprocess("%s, index %s, bound %s, anchoring mark %s to baselig %s at index %s => (%p,%p)",
+ pref(dataset,sequence),index,bound,gref(markchar),gref(basechar),index,dx,dy)
+ end
+ return head, start, true
+ else
+ if trace_bugs then
+ logwarning("%s: no matching anchors for mark %s and baselig %s with index %a",pref(dataset,sequence),gref(markchar),gref(basechar),index)
+ end
+ end
+ end
+ elseif trace_bugs then
+ -- logwarning("%s: char %s is missing in font",pref(dataset,sequence),gref(basechar))
+ onetimemessage(currentfont,basechar,"no base anchors",report_fonts)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",pref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",pref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",pref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function handlers.gpos_mark2mark(head,start,dataset,sequence,markanchors,rlmode,skiphash)
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local base = getprev(start) -- [glyph] [basemark] [start=mark]
+ local slc = getligaindex(start)
+ if slc then -- a rather messy loop ... needs checking with husayni
+ while base do
+ local blc = getligaindex(base)
+ if blc and blc ~= slc then
+ base = getprev(base)
+ else
+ break
+ end
+ end
+ end
+ if base then
+ local nxt, basechar = isnextchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then -- subtype test can go
+ local ba = markanchors[1][basechar] -- slot 1 has been made copy of the class hash
+ if ba then
+ local ma = markanchors[2]
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],true,checkmarks)
+ if trace_marks then
+ logprocess("%s, bound %s, anchoring mark %s to basemark %s => (%p,%p)",
+ pref(dataset,sequence),bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",pref(dataset,sequence),gref(markchar))
+ end
+ return head, start, false
+end
+
+function handlers.gpos_cursive(head,start,dataset,sequence,exitanchors,rlmode,skiphash,step) -- to be checked
+ local startchar = getchar(start)
+ if marks[startchar] then
+ if trace_cursive then
+ logprocess("%s: ignoring cursive for mark %s",pref(dataset,sequence),gref(startchar))
+ end
+ else
+ local nxt = getnext(start)
+ while nxt do
+ local n, nextchar = isnextchar(nxt,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if not nextchar then
+ break
+ elseif marks[nextchar] then -- always sequence.flags[1]
+ nxt = n
+ else
+ local exit = exitanchors[3]
+ if exit then
+ local entry = exitanchors[1][nextchar]
+ if entry then
+ entry = entry[2]
+ if entry then
+ local r2lflag = sequence.flags[4] -- mentioned in the standard
+ local dx, dy, bound = setcursive(start,nxt,factor,rlmode,exit,entry,characters[startchar],characters[nextchar],r2lflag)
+ if trace_cursive then
+ logprocess("%s: moving %s to %s cursive (%p,%p) using bound %s in %s mode",pref(dataset,sequence),gref(startchar),gref(nextchar),dx,dy,bound,mref(rlmode))
+ end
+ return head, start, true
+ end
+ end
+ end
+ break
+ end
+ end
+ end
+ 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]]--
+
+local chainprocs = { }
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ if trace_steps == "silent" then
+ return
+ end
+ end
+ report_subchain(...)
+end
+
+local logwarning = report_subchain
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ if trace_steps == "silent" then
+ return
+ end
+ end
+ report_chain(...)
+end
+
+local logwarning = report_chain
+
+-- We could share functions but that would lead to extra function calls with many
+-- arguments, redundant tests and confusing messages.
+
+-- The reversesub is a special case, which is why we need to store the replacements
+-- in a bit weird way. There is no lookup and the replacement comes from the lookup
+-- itself. It is meant mostly for dealing with Urdu.
+
+local function reversesub(head,start,stop,dataset,sequence,replacements,rlmode,skiphash)
+ local char = getchar(start)
+ local replacement = replacements[char]
+ if replacement then
+ if trace_singles then
+ logprocess("%s: single reverse replacement of %s by %s",cref(dataset,sequence),gref(char),gref(replacement))
+ end
+ resetinjection(start)
+ setchar(start,replacement)
+ return head, start, true
+ else
+ return head, start, false
+ end
+end
+
+
+chainprocs.reversesub = reversesub
+
+--[[ldx--
+<p>This chain stuff is somewhat tricky since we can have a sequence of actions to be
+applied: single, alternate, multiple or ligature where ligature can be an invalid
+one in the sense that it will replace multiple by one but not neccessary one that
+looks like the combination (i.e. it is the counterpart of multiple then). For
+example, the following is valid:</p>
+
+<typing>
+<line>xxxabcdexxx [single a->A][multiple b->BCD][ligature cde->E] xxxABCDExxx</line>
+</typing>
+
+<p>Therefore we we don't really do the replacement here already unless we have the
+single lookup case. The efficiency of the replacements can be improved by deleting
+as less as needed but that would also make the code even more messy.</p>
+--ldx]]--
+
+--[[ldx--
+<p>Here we replace start by a single variant.</p>
+--ldx]]--
+
+-- To be done (example needed): what if > 1 steps
+
+-- this is messy: do we need this disc checking also in alternaties?
+
+local function reportzerosteps(dataset,sequence)
+ logwarning("%s: no steps",cref(dataset,sequence))
+end
+
+local function reportmoresteps(dataset,sequence)
+ logwarning("%s: more than 1 step",cref(dataset,sequence))
+end
+
+-- local function reportbadsteps(dataset,sequence)
+-- logwarning("%s: bad step, no proper return values",cref(dataset,sequence))
+-- end
+
+local function getmapping(dataset,sequence,currentlookup)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps == 0 then
+ reportzerosteps(dataset,sequence)
+ currentlookup.mapping = false
+ return false
+ else
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ local mapping = steps[1].coverage
+ currentlookup.mapping = mapping
+ currentlookup.format = steps[1].format
+ return mapping
+ end
+end
+
+function chainprocs.gsub_remove(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ if trace_chains then
+ logprocess("%s: removing character %s",cref(dataset,sequence,chainindex),gref(getchar(start)))
+ end
+ head, start = remove_node(head,start,true)
+ return head, getprev(start), true
+end
+
+function chainprocs.gsub_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local current = start
+ while current do
+ local nxt, currentchar = isnextchar(current,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if currentchar then
+ local replacement = mapping[currentchar]
+ if not replacement or replacement == "" then
+ if trace_bugs then
+ logwarning("%s: no single for %s",cref(dataset,sequence,chainindex),gref(currentchar))
+ end
+ else
+ if trace_singles then
+ logprocess("%s: replacing single %s by %s",cref(dataset,sequence,chainindex),gref(currentchar),gref(replacement))
+ end
+ resetinjection(current)
+ setchar(current,replacement)
+ end
+ return head, start, true
+ elseif currentchar == false then
+ -- can't happen
+ break
+ elseif current == stop then
+ break
+ else
+ current = nxt
+ end
+ end
+ end
+ return head, start, false
+end
+
+--[[ldx--
+<p>Here we replace start by new glyph. First we delete the rest of the match.</p>
+--ldx]]--
+
+-- char_1 mark_1 -> char_x mark_1 (ignore marks)
+-- char_1 mark_1 -> char_x
+
+-- to be checked: do we always have just one glyph?
+-- we can also have alternates for marks
+-- marks come last anyway
+-- are there cases where we need to delete the mark
+
+function chainprocs.gsub_alternate(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local kind = dataset[4]
+ local what = dataset[1]
+ local value = what == true and tfmdata.shared.features[kind] or what -- todo: optimize in ctx
+ local current = start
+ while current do
+ local nxt, currentchar = isnextchar(current,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if currentchar then
+ local alternatives = mapping[currentchar]
+ if alternatives then
+ local choice, comment = get_alternative_glyph(current,alternatives,value)
+ if choice then
+ if trace_alternatives then
+ logprocess("%s: replacing %s by alternative %a to %s, %s",cref(dataset,sequence),gref(currentchar),choice,gref(choice),comment)
+ end
+ resetinjection(start)
+ setchar(start,choice)
+ else
+ if trace_alternatives then
+ logwarning("%s: no variant %a for %s, %s",cref(dataset,sequence),value,gref(currentchar),comment)
+ end
+ end
+ end
+ return head, start, true
+ elseif currentchar == false then
+ -- can't happen
+ break
+ elseif current == stop then
+ break
+ else
+ current = nxt
+ end
+ end
+ end
+ return head, start, false
+end
+
+--[[ldx--
+<p>Here we replace start by a sequence of new glyphs.</p>
+--ldx]]--
+
+function chainprocs.gsub_multiple(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local startchar = getchar(start)
+ local replacement = mapping[startchar]
+ if not replacement or replacement == "" then
+ if trace_bugs then
+ logwarning("%s: no multiple for %s",cref(dataset,sequence),gref(startchar))
+ end
+ else
+ if trace_multiples then
+ logprocess("%s: replacing %s by multiple characters %s",cref(dataset,sequence),gref(startchar),gref(replacement))
+ end
+ return multiple_glyphs(head,start,replacement,skiphash,dataset[1],stop)
+ end
+ end
+ return head, start, false
+end
+
+--[[ldx--
+<p>When we replace ligatures we use a helper that handles the marks. I might change
+this function (move code inline and handle the marks by a separate function). We
+assume rather stupid ligatures (no complex disc nodes).</p>
+--ldx]]--
+
+-- compare to handlers.gsub_ligature which is more complex ... why
+
+function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local startchar = getchar(start)
+ local ligatures = mapping[startchar]
+ if not ligatures then
+ if trace_bugs then
+ logwarning("%s: no ligatures starting with %s",cref(dataset,sequence,chainindex),gref(startchar))
+ end
+ else
+ local hasmarks = marks[startchar]
+ local current = getnext(start)
+ local discfound = false
+ local last = stop
+ local nofreplacements = 1
+ while current do
+ -- todo: ischar ... can there really be disc nodes here?
+-- local id = getid(current)
+-- if id == disc_code then
+-- if not discfound then
+-- discfound = current
+-- end
+-- if current == stop then
+-- break -- okay? or before the disc
+-- else
+-- current = getnext(current)
+-- end
+-- else
+-- local schar = getchar(current)
+-- if skiphash and skiphash[schar] then -- marks
+-- -- if current == stop then -- maybe add this
+-- -- break
+-- -- else
+-- current = getnext(current)
+-- -- end
+-- else
+-- local lg = ligatures[schar]
+-- if lg then
+-- ligatures = lg
+-- last = current
+-- nofreplacements = nofreplacements + 1
+-- if marks[char] then
+-- hasmarks = true
+-- end
+-- if current == stop then
+-- break
+-- else
+-- current = getnext(current)
+-- end
+-- else
+-- break
+-- end
+-- end
+-- end
+ --
+ local nxt, schar, id = isnextchar(current,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if schar then
+ if skiphash and skiphash[schar] then -- marks
+ -- if current == stop then -- maybe add this
+ -- break
+ -- else
+ current = nxt
+ -- end
+ else
+ local lg = ligatures[schar]
+ if lg then
+ ligatures = lg
+ last = current
+ nofreplacements = nofreplacements + 1
+ if marks[char] then
+ hasmarks = true
+ end
+ if current == stop then
+ break
+ else
+ current = nxt
+ end
+ else
+ break
+ end
+ end
+ elseif id == disc_code then
+ if not discfound then
+ discfound = current
+ end
+ if current == stop then
+ break -- okay? or before the disc
+ else
+ current = nxt
+ end
+ else
+ break
+ end
+ --
+ end
+ local ligature = ligatures.ligature
+ if ligature then
+ if chainindex then
+ stop = last
+ end
+ if trace_ligatures then
+ if start == stop then
+ logprocess("%s: replacing character %s by ligature %s case 3",cref(dataset,sequence,chainindex),gref(startchar),gref(ligature))
+ else
+ logprocess("%s: replacing character %s upto %s by ligature %s case 4",cref(dataset,sequence,chainindex),gref(startchar),gref(getchar(stop)),gref(ligature))
+ end
+ end
+ head, start = toligature(head,start,stop,ligature,dataset,sequence,skiphash,discfound,hasmarks)
+ return head, start, true, nofreplacements, discfound
+ elseif trace_bugs then
+ if start == stop then
+ logwarning("%s: replacing character %s by ligature fails",cref(dataset,sequence,chainindex),gref(startchar))
+ else
+ logwarning("%s: replacing character %s upto %s by ligature fails",cref(dataset,sequence,chainindex),gref(startchar),gref(getchar(stop)))
+ end
+ end
+ end
+ end
+ return head, start, false, 0, false
+end
+
+function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ -- we actually should check no_left_kern_code with next
+ if not has_glyph_option(start,no_right_kern_code) then
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local startchar = getchar(start)
+ local kerns = mapping[startchar]
+ if kerns then
+ local format = currentlookup.format
+ if format == "single" then
+ local dx, dy, w, h = setposition(0,start,factor,rlmode,kerns) -- currentlookup.flags ?
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
+ end
+ else -- needs checking .. maybe no kerns format for single
+ local k = (format == "move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s %p",cref(dataset,sequence),gref(startchar),format,k)
+ end
+ end
+ return head, start, true
+ end
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex) -- todo: injections ?
+ -- we actually should check no_left_kern_code with next
+ if not has_glyph_option(start,no_right_kern_code) then
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local snext = getnext(start)
+ if snext then
+ local startchar = getchar(start)
+ local kerns = mapping[startchar] -- always 1 step
+ if kerns then
+ local prev = start
+ while snext do
+ local nxt, nextchar = isnextchar(snext,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if not nextchar then
+ break
+ elseif skiphash and skiphash[nextchar] then
+ prev = snext
+ snext = nxt
+ else
+ local krn = kerns[nextchar]
+ if not krn then
+ break
+ end
+ local format = currentlookup.format
+ if format == "pair" then
+ local a = krn[1]
+ local b = krn[2]
+ if a == true then
+ -- zero
+ elseif a then
+ local x, y, w, h = setposition(1,start,factor,rlmode,a,"injections") -- currentlookups flags?
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ if b == true then
+ -- zero
+ start = snext -- cf spec
+ elseif b then -- #b > 0
+ local x, y, w, h = setposition(2,snext,factor,rlmode,b,"injections")
+ if trace_kerns then
+ local startchar = getchar(start)
+ logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ start = snext -- cf spec
+ elseif forcepairadvance then
+ start = snext -- for testing, not cf spec
+ end
+ return head, start, true
+ elseif krn ~= 0 then
+ local k = (format == "move" and setmove or setkern)(snext,factor,rlmode,krn)
+ if trace_kerns then
+ logprocess("%s: inserting %s %p between %s and %s",cref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar))
+ end
+ return head, start, true
+ else
+ break
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_mark2base(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local markanchors = mapping[markchar] -- always 1 step
+ if markanchors then
+ local base = getprev(start) -- [glyph] [start=mark]
+ if base then
+ local prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if marks[basechar] then
+ -- todo: use prv
+ while base do
+ base = getprev(base)
+ if base then
+ local prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",pref(dataset,sequence),gref(markchar),2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],false,checkmarks)
+ if trace_marks then
+ logprocess("%s, bound %s, anchoring mark %s to basechar %s => (%p,%p)",
+ cref(dataset,sequence),bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",cref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no char, case %i",cref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s has no anchors",cref(dataset,sequence),gref(markchar))
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",cref(dataset,sequence),gref(markchar))
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_mark2ligature(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local markanchors = mapping[markchar] -- always 1 step
+ if markanchors then
+ local base = getprev(start) -- [glyph] [optional marks] [start=mark]
+ if base then
+ local prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if marks[basechar] then
+ -- todo: use prv
+ while base do
+ base = getprev(base)
+ if base then
+ local prv, basechar = isprevchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ if not marks[basechar] then
+ break
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",cref(dataset,sequence),markchar,1)
+ end
+ return head, start, false
+ end
+ else
+ if trace_bugs then
+ logwarning("%s: no base for mark %s, case %i",cref(dataset,sequence),markchar,2)
+ end
+ return head, start, false
+ end
+ end
+ end
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local index = getligaindex(start)
+ ba = ba[index]
+ if ba then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],false,checkmarks)
+ if trace_marks then
+ logprocess("%s, bound %s, anchoring mark %s to baselig %s at index %s => (%p,%p)",
+ cref(dataset,sequence),a or bound,gref(markchar),gref(basechar),index,dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s, prev node is no char, case %i",cref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s, prev node is no char, case %i",cref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s, mark %s has no anchors",cref(dataset,sequence),gref(markchar))
+ end
+ elseif trace_bugs then
+ logwarning("%s, mark %s is no mark",cref(dataset,sequence),gref(markchar))
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_mark2mark(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local markchar = getchar(start)
+ if marks[markchar] then
+ local markanchors = mapping[markchar] -- always 1 step
+ if markanchors then
+ local base = getprev(start) -- [glyph] [basemark] [start=mark]
+ local slc = getligaindex(start)
+ if slc then -- a rather messy loop ... needs checking with husayni
+ while base do
+ local blc = getligaindex(base)
+ if blc and blc ~= slc then
+ base = getprev(base)
+ else
+ break
+ end
+ end
+ end
+ if base then -- subtype test can go
+ local nxt, basechar = isnextchar(base,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if basechar then
+ local ba = markanchors[1][basechar]
+ if ba then
+ local ma = markanchors[2]
+ if ma then
+ local dx, dy, bound = setmark(start,base,factor,rlmode,ba,ma,characters[basechar],true,checkmarks)
+ if trace_marks then
+ logprocess("%s, bound %s, anchoring mark %s to basemark %s => (%p,%p)",
+ cref(dataset,sequence),bound,gref(markchar),gref(basechar),dx,dy)
+ end
+ return head, start, true
+ end
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no mark, case %i",cref(dataset,sequence),1)
+ end
+ elseif trace_bugs then
+ logwarning("%s: prev node is no mark, case %i",cref(dataset,sequence),2)
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s has no anchors",cref(dataset,sequence),gref(markchar))
+ end
+ elseif trace_bugs then
+ logwarning("%s: mark %s is no mark",cref(dataset,sequence),gref(markchar))
+ end
+ end
+ return head, start, false
+end
+
+function chainprocs.gpos_cursive(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ local mapping = currentlookup.mapping
+ if mapping == nil then
+ mapping = getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local startchar = getchar(start)
+ local exitanchors = mapping[startchar] -- always 1 step
+ if exitanchors then
+ if marks[startchar] then
+ if trace_cursive then
+ logprocess("%s: ignoring cursive for mark %s",pref(dataset,sequence),gref(startchar))
+ end
+ else
+ local nxt = getnext(start)
+ while nxt do
+ local n, nextchar = isnextchar(nxt,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if not nextchar then
+ break
+ elseif marks[nextchar] then
+ -- should not happen (maybe warning)
+ nxt = n
+ else
+ local exit = exitanchors[3]
+ if exit then
+ local entry = exitanchors[1][nextchar]
+ if entry then
+ entry = entry[2]
+ if entry then
+ local r2lflag = sequence.flags[4] -- mentioned in the standard
+ local dx, dy, bound = setcursive(start,nxt,factor,rlmode,exit,entry,characters[startchar],characters[nextchar],r2lflag)
+ if trace_cursive then
+ logprocess("%s: moving %s to %s cursive (%p,%p) using bound %s in %s mode",pref(dataset,sequence),gref(startchar),gref(nextchar),dx,dy,bound,mref(rlmode))
+ end
+ return head, start, true
+ end
+ end
+ elseif trace_bugs then
+ onetimemessage(currentfont,startchar,"no entry anchors",report_fonts)
+ end
+ break
+ end
+ end
+ end
+ elseif trace_cursive and trace_details then
+ logprocess("%s, cursive %s is already done",pref(dataset,sequence),gref(getchar(start)),alreadydone)
+ end
+ end
+ return head, start, false
+end
+
+-- what pointer to return, spec says stop
+-- to be discussed ... is bidi changer a space?
+-- elseif char == zwnj and sequence[n][32] then -- brrr
+
+local function show_skip(dataset,sequence,char,ck,class)
+ logwarning("%s: skipping char %s, class %a, rule %a, lookuptype %a",cref(dataset,sequence),gref(char),class,ck[1],ck[8] or ck[2])
+end
+
+-- A previous version had disc collapsing code in the (single sub) handler plus some
+-- checking in the main loop, but that left the pre/post sequences undone. The best
+-- solution is to add some checking there and backtrack when a replace/post matches
+-- but it takes a bit of work to figure out an efficient way (this is what the
+-- sweep* names refer to). I might look into that variant one day again as it can
+-- replace some other code too. In that approach we can have a special version for
+-- gub and pos which gains some speed. This method does the test and passes info to
+-- the handlers. Here collapsing is handled in the main loop which also makes code
+-- elsewhere simpler (i.e. no need for the other special runners and disc code in
+-- ligature building). I also experimented with pushing preceding glyphs sequences
+-- in the replace/pre fields beforehand which saves checking afterwards but at the
+-- cost of duplicate glyphs (memory) but it's too much overhead (runtime).
+--
+-- In the meantime Kai had moved the code from the single chain into a more general
+-- handler and this one (renamed to chaindisk) is used now. I optimized the code a
+-- bit and brought it in sycn with the other code. Hopefully I didn't introduce
+-- errors. Note: this somewhat complex approach is meant for fonts that implement
+-- (for instance) ligatures by character replacement which to some extend is not
+-- that suitable for hyphenation. I also use some helpers. This method passes some
+-- states but reparses the list. There is room for a bit of speed up but that will
+-- be done in the context version. (In fact a partial rewrite of all code can bring
+-- some more efficiency.)
+--
+-- I didn't test it with extremes but successive disc nodes still can give issues
+-- but in order to handle that we need more complex code which also slows down even
+-- more. The main loop variant could deal with that: test, collapse, backtrack.
+
+local userkern = nuts.pool and nuts.pool.newkern -- context
+
+do if not userkern then -- generic
+
+ local thekern = nuts.new("kern",1) -- userkern
+ local setkern = nuts.setkern -- not injections.setkern
+
+ userkern = function(k)
+ local n = copy_node(thekern)
+ setkern(n,k)
+ return n
+ end
+
+end end
+
+local function checked(head)
+ local current = head
+ while current do
+ if getid(current) == glue_code then
+ local kern = userkern(getwidth(current))
+ if head == current then
+ local next = getnext(current)
+ if next then
+ setlink(kern,next)
+ end
+ flush_node(current)
+ head = kern
+ current = next
+ else
+ local prev, next = getboth(current)
+ setlink(prev,kern,next)
+ flush_node(current)
+ current = next
+ end
+ else
+ current = getnext(current)
+ end
+ end
+ return head
+end
+
+local function setdiscchecked(d,pre,post,replace)
+ if pre then pre = checked(pre) end
+ if post then post = checked(post) end
+ if replace then replace = checked(replace) end
+ setdisc(d,pre,post,replace)
+end
+
+local noflags = { false, false, false, false }
+
+local function chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck)
+
+ local size = ck[5] - ck[4] + 1
+ local chainlookups = ck[6]
+ local done = false
+
+ -- current match
+ if chainlookups then
+ -- Lookups can be like { 1, false, 3 } or { false, 2 } or basically anything and
+ -- #lookups can be less than #current
+
+ if size == 1 then
+
+ -- if nofchainlookups > size then
+ -- -- bad rules
+ -- end
+
+ local chainlookup = chainlookups[1]
+ for j=1,#chainlookup do
+ local chainstep = chainlookup[j]
+ local chainkind = chainstep.type
+ local chainproc = chainprocs[chainkind]
+ if chainproc then
+ local ok
+ head, start, ok = chainproc(head,start,last,dataset,sequence,chainstep,rlmode,skiphash)
+ if ok then
+ done = true
+ end
+ else
+ logprocess("%s: %s is not yet supported (1)",cref(dataset,sequence),chainkind)
+ end
+ end
+
+ else
+
+ -- See LookupType 5: Contextual Substitution Subtable. Now it becomes messy. The
+ -- easiest case is where #current maps on #lookups i.e. one-to-one. But what if
+ -- we have a ligature. Cf the spec we then need to advance one character but we
+ -- really need to test it as there are fonts out there that are fuzzy and have
+ -- too many lookups:
+ --
+ -- U+1105 U+119E U+1105 U+119E : sourcehansansklight: script=hang ccmp=yes
+ --
+ -- Even worse are these family emoji shapes as they can have multiple lookups
+ -- per slot (probably only for gpos).
+
+ -- It's very unlikely that we will have skip classes here but still ... we seldom
+ -- enter this branch anyway.
+
+ local i = 1
+ local laststart = start
+ local nofchainlookups = #chainlookups -- useful?
+ while start do
+ if skiphash then -- hm, so we know we skip some
+ while start do
+ local nxt, char = isnextchar(start,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ if skiphash and skiphash[char] then
+ start = nxt
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ end
+ local chainlookup = chainlookups[i]
+ if chainlookup then
+ for j=1,#chainlookup do
+ local chainstep = chainlookup[j]
+ local chainkind = chainstep.type
+ local chainproc = chainprocs[chainkind]
+ if chainproc then
+ local ok, n
+ head, start, ok, n = chainproc(head,start,last,dataset,sequence,chainstep,rlmode,skiphash,i)
+ -- messy since last can be changed !
+ if ok then
+ done = true
+ if n and n > 1 and i + n > nofchainlookups then
+ -- this is a safeguard, we just ignore the rest of the lookups
+ i = size -- prevents an advance
+ break
+ end
+ end
+ else
+ -- actually an error
+ logprocess("%s: %s is not yet supported (2)",cref(dataset,sequence),chainkind)
+ end
+ end
+ else
+ -- we skip but we could also delete as option .. what does an empty lookup actually mean
+ -- in opentype ... anyway, we could map it onto gsub_remove if needed
+ end
+ i = i + 1
+ if i > size or not start then
+ break
+ elseif start then
+ laststart = start
+ start = getnext(start)
+ end
+ end
+ if not start then
+ start = laststart
+ end
+
+ end
+ else
+ -- todo: needs checking for holes in the replacements
+ local replacements = ck[7]
+ if replacements then
+ head, start, done = reversesub(head,start,last,dataset,sequence,replacements,rlmode,skiphash)
+ else
+ done = true
+ if trace_contexts then
+ logprocess("%s: skipping match",cref(dataset,sequence))
+ end
+ end
+ end
+ return head, start, done
+end
+
+local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
+
+ if not start then
+ return head, start, false
+ end
+
+ local startishead = start == head
+ local seq = ck[3]
+ local f = ck[4]
+ local l = ck[5]
+ local s = #seq
+ local done = false
+ local sweepnode = sweepnode
+ local sweeptype = sweeptype
+ local sweepoverflow = false
+ local checkdisc = getprev(head)
+ local keepdisc = not sweepnode
+ local lookaheaddisc = nil
+ local backtrackdisc = nil
+ local current = start
+ local last = start
+ local prev = getprev(start)
+ local hasglue = false
+
+ -- fishy: so we can overflow and then go on in the sweep?
+ -- todo : id can also be glue_code as we checked spaces
+
+ local i = f
+ while i <= l do
+ local id = getid(current)
+ if id == glyph_code then
+ i = i + 1
+ last = current
+ current = getnext(current)
+ elseif id == glue_code then
+ i = i + 1
+ last = current
+ current = getnext(current)
+ hasglue = true
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ lookaheaddisc = current
+ local replace = getreplace(current)
+ if not replace then
+ sweepoverflow = true
+ sweepnode = current
+ current = getnext(current)
+ else
+ -- we can use an iterator
+ while replace and i <= l do
+ if getid(replace) == glyph_code then
+ i = i + 1
+ end
+ replace = getnext(replace)
+ end
+ current = getnext(replace)
+ end
+ last = current
+ else
+ head, current = flattendisk(head,current)
+ end
+ else
+ last = current
+ current = getnext(current)
+ end
+ if current then
+ -- go on
+ elseif sweepoverflow then
+ -- we already are following up on sweepnode
+ break
+ elseif sweeptype == "post" or sweeptype == "replace" then
+ current = getnext(sweepnode)
+ if current then
+ sweeptype = nil
+ sweepoverflow = true
+ else
+ break
+ end
+ else
+ break -- added
+ end
+ end
+
+ if sweepoverflow then
+ local prev = current and getprev(current)
+ if not current or prev ~= sweepnode then
+ local head = getnext(sweepnode)
+ local tail = nil
+ if prev then
+ tail = prev
+ setprev(current,sweepnode)
+ else
+ tail = find_node_tail(head)
+ end
+ setnext(sweepnode,current)
+ setprev(head)
+ setnext(tail)
+ appenddisc(sweepnode,head)
+ end
+ end
+
+ if l < s then
+ local i = l
+ local t = sweeptype == "post" or sweeptype == "replace"
+ while current and i < s do
+ local id = getid(current)
+ if id == glyph_code then
+ i = i + 1
+ current = getnext(current)
+ elseif id == glue_code then
+ i = i + 1
+ current = getnext(current)
+ hasglue = true
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpre[current] ~= notmatchreplace[current] then
+ lookaheaddisc = current
+ end
+ -- we assume a simple text only replace (we could use nuts.count)
+ local replace = getreplace(current)
+ while replace and i < s do
+ if getid(replace) == glyph_code then
+ i = i + 1
+ end
+ replace = getnext(replace)
+ end
+ current = getnext(current)
+ elseif notmatchpre[current] ~= notmatchreplace[current] then
+ head, current = flattendisk(head,current)
+ else
+ current = getnext(current) -- HH
+ end
+ else
+ current = getnext(current)
+ end
+ if not current and t then
+ current = getnext(sweepnode)
+ if current then
+ sweeptype = nil
+ end
+ end
+ end
+ end
+
+ if f > 1 then
+ local current = prev
+ local i = f
+ local t = sweeptype == "pre" or sweeptype == "replace"
+ if not current and t and current == checkdisc then
+ current = getprev(sweepnode)
+ end
+ while current and i > 1 do -- missing getprev added / moved outside
+ local id = getid(current)
+ if id == glyph_code then
+ i = i - 1
+ elseif id == glue_code then
+ i = i - 1
+ hasglue = true
+ elseif id == disc_code then
+ if keepdisc then
+ keepdisc = false
+ if notmatchpost[current] ~= notmatchreplace[current] then
+ backtrackdisc = current
+ end
+ -- we assume a simple text only replace (we could use nuts.count)
+ local replace = getreplace(current)
+ while replace and i > 1 do
+ if getid(replace) == glyph_code then
+ i = i - 1
+ end
+ replace = getnext(replace)
+ end
+ elseif notmatchpost[current] ~= notmatchreplace[current] then
+ head, current = flattendisk(head,current)
+ end
+ end
+ current = getprev(current)
+ if t and current == checkdisc then
+ current = getprev(sweepnode)
+ end
+ end
+ end
+ local done = false
+
+ if lookaheaddisc then
+
+ local cf = start
+ local cl = getprev(lookaheaddisc)
+ local cprev = getprev(start)
+ local insertedmarks = 0
+
+ while cprev do
+ local nxt, char = isnextchar(cf,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char and marks[char] then
+ insertedmarks = insertedmarks + 1
+ cf = cprev
+ startishead = cf == head
+ cprev = getprev(cprev)
+ else
+ break
+ end
+ end
+ setlink(cprev,lookaheaddisc)
+ setprev(cf)
+ setnext(cl)
+ if startishead then
+ head = lookaheaddisc
+ end
+ local pre, post, replace = getdisc(lookaheaddisc)
+ local new = copy_node_list(cf) -- br, how often does that happen
+ local cnew = new
+ if pre then
+ setlink(find_node_tail(cf),pre)
+ end
+ if replace then
+ local tail = find_node_tail(new)
+ setlink(tail,replace)
+ end
+ for i=1,insertedmarks do
+ cnew = getnext(cnew)
+ end
+ cl = start
+ local clast = cnew
+ for i=f,l do
+ cl = getnext(cl)
+ clast = getnext(clast)
+ end
+ if not notmatchpre[lookaheaddisc] then
+ local ok = false
+ cf, start, ok = chainrun(cf,start,cl,dataset,sequence,rlmode,skiphash,ck)
+ if ok then
+ done = true
+ end
+ end
+ if not notmatchreplace[lookaheaddisc] then
+ local ok = false
+ new, cnew, ok = chainrun(new,cnew,clast,dataset,sequence,rlmode,skiphash,ck)
+ if ok then
+ done = true
+ end
+ end
+ if hasglue then
+ setdiscchecked(lookaheaddisc,cf,post,new)
+ else
+ setdisc(lookaheaddisc,cf,post,new)
+ end
+ start = getprev(lookaheaddisc)
+ sweephead[cf] = getnext(clast) or false
+ sweephead[new] = getnext(cl) or false
+
+ elseif backtrackdisc then
+
+ local cf = getnext(backtrackdisc)
+ local cl = start
+ local cnext = getnext(start)
+ local insertedmarks = 0
+
+ while cnext do
+ local nxt, char = isnextchar(cnext,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char and marks[char] then
+ insertedmarks = insertedmarks + 1
+ cl = cnext
+ cnext = nxt
+ else
+ break
+ end
+ end
+ setlink(backtrackdisc,cnext)
+ setprev(cf)
+ setnext(cl)
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(backtrackdisc,true)
+ local new = copy_node_list(cf)
+ local cnew = find_node_tail(new)
+ for i=1,insertedmarks do
+ cnew = getprev(cnew)
+ end
+ local clast = cnew
+ for i=f,l do
+ clast = getnext(clast)
+ end
+ if not notmatchpost[backtrackdisc] then
+ local ok = false
+ cf, start, ok = chainrun(cf,start,last,dataset,sequence,rlmode,skiphash,ck)
+ if ok then
+ done = true
+ end
+ end
+ if not notmatchreplace[backtrackdisc] then
+ local ok = false
+ new, cnew, ok = chainrun(new,cnew,clast,dataset,sequence,rlmode,skiphash,ck)
+ if ok then
+ done = true
+ end
+ end
+ if post then
+ setlink(posttail,cf)
+ else
+ post = cf
+ end
+ if replace then
+ setlink(replacetail,new)
+ else
+ replace = new
+ end
+ if hasglue then
+ setdiscchecked(backtrackdisc,pre,post,replace)
+ else
+ setdisc(backtrackdisc,pre,post,replace)
+ end
+ start = getprev(backtrackdisc)
+ sweephead[post] = getnext(clast) or false
+ sweephead[replace] = getnext(last) or false
+
+ else
+
+ local ok = false
+ head, start, ok = chainrun(head,start,last,dataset,sequence,rlmode,skiphash,ck)
+ if ok then
+ done = true
+ end
+
+ end
+
+ return head, start, done
+end
+
+local function chaintrac(head,start,dataset,sequence,rlmode,skiphash,ck,match,discseen,sweepnode)
+ local rule = ck[1]
+ local lookuptype = ck[8] or ck[2]
+ local nofseq = #ck[3]
+ local first = ck[4]
+ local last = ck[5]
+ local char = getchar(start)
+ logwarning("%s: rule %s %s at char %s for (%s,%s,%s) chars, lookuptype %a, %sdisc seen, %ssweeping",
+ cref(dataset,sequence),rule,match and "matches" or "nomatch",
+ gref(char),first-1,last-first+1,nofseq-last,lookuptype,
+ discseen and "" or "no ", sweepnode and "" or "not ")
+end
+
+-- The next one is quite optimized but still somewhat slow, fonts like ebgaramond
+-- are real torture tests because they have many steps with one context (having
+-- multiple contexts makes more sense) also because we (can) reduce them. Instead of
+-- a match boolean variable and check for that I decided to use a goto with labels
+-- instead. This is one of the cases where it makes the code more readable and we
+-- might even gain a bit performance.
+
+-- when we have less replacements (lookups) then current matches we can push too much into
+-- the previous disc .. such be it (<before><disc><current=fl><after> with only f done)
+
+local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,skiphash)
+ -- optimizing for rlmode gains nothing
+ local sweepnode = sweepnode
+ local sweeptype = sweeptype
+ local postreplace
+ local prereplace
+ local checkdisc
+ local discseen -- = false
+ if sweeptype then
+ if sweeptype == "replace" then
+ postreplace = true
+ prereplace = true
+ else
+ postreplace = sweeptype == "post"
+ prereplace = sweeptype == "pre"
+ end
+ checkdisc = getprev(head)
+ end
+ -- local currentfont = currentfont -- really ?
+ -- local currentscale = currentscale -- really ?
+ -- local currentxscale = currentxscale -- really ?
+ -- local currentyscale = currentyscale -- really ?
+
+ local skipped -- = false
+
+ local startprev,
+ startnext = getboth(start)
+ local done -- = false
+
+ -- we can have multiple hits and as we scan (currently) all we need to check
+ -- if we have a match ... contextchains have no real coverage table (with
+ -- unique entries)
+
+ -- 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)
+
+ local nofcontexts = contexts.n -- #contexts
+
+ local startchar = nofcontext == 1 or ischar(start,currentfont) -- already checked
+ for k=1,nofcontexts do -- does this disc mess work well with n > 1
+
+ local ck = contexts[k]
+ local seq = ck[3]
+ local f = ck[4] -- first current
+ if not startchar or not seq[f][startchar] then
+ -- report("no hit in %a at %i of %i contexts",sequence.type,k,nofcontexts)
+ goto next
+ end
+ local s = seq.n -- or #seq
+ local l = ck[5] -- last current
+ local current = start
+ local last = start
+
+ if s == 1 then
+ goto next
+ end
+
+ -- current match
+
+ if l > f then
+ -- before/current/after | before/current | current/after
+ local discfound -- = nil
+ local n = f + 1
+ last = startnext -- the second in current (first already matched)
+ while n <= l do
+ if postreplace and not last then
+ last = getnext(sweepnode)
+ sweeptype = nil
+ end
+ if last then
+ local nxt, char, id = isnextchar(last,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
+ last = nxt
+ elseif seq[n][char] then
+ if n < l then
+ last = nxt
+ end
+ n = n + 1
+ elseif discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
+ end
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
+ end
+ elseif id == disc_code then
+ -- elseif id == disc_code and (not discs or discs[last]) then
+ discseen = true
+ discfound = last
+ notmatchpre[last] = nil
+ notmatchpost[last] = true
+ notmatchreplace[last] = nil
+ local pre, post, replace = getdisc(last)
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ if n > l then
+ break
+ end
+ pre = getnext(pre)
+ else
+ notmatchpre[last] = true
+ break
+ end
+ end
+ if n <= l then
+ notmatchpre[last] = true
+ end
+ else
+ notmatchpre[last] = true
+ end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ if n > l then
+ break
+ end
+ replace = getnext(replace)
+ else
+ notmatchreplace[last] = true
+ if notmatchpre[last] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ -- why here again
+ if notmatchpre[last] then
+ goto next
+ end
+ end
+ -- maybe only if match
+ last = nxt
+ else
+ goto next
+ end
+ else
+ goto next
+ end
+ end
+ end
+
+ -- before
+
+ if f > 1 then
+ if startprev then
+ local prev = startprev
+ if prereplace and prev == checkdisc then
+ prev = getprev(sweepnode)
+ end
+ if prev then
+ local discfound -- = nil
+ local n = f - 1
+ while n >= 1 do
+ if prev then
+ local prv, char, id = isprevchar(prev,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
+ prev = prv
+ elseif seq[n][char] then
+ if n > 1 then
+ prev = prv
+ end
+ n = n - 1
+ elseif discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpost[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
+ end
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpost[discfound] then
+ goto next
+ end
+ else
+ goto next
+ end
+ break
+ elseif id == disc_code then
+ -- elseif id == disc_code and (not discs or discs[prev]) then
+ -- the special case: f i where i becomes dottless i ..
+ discseen = true
+ discfound = prev
+ notmatchpre[prev] = true
+ notmatchpost[prev] = nil
+ notmatchreplace[prev] = nil
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(prev,true)
+ -- weird test: needs checking
+ if pre ~= start and post ~= start and replace ~= start then
+ if post then
+ local n = n
+ while posttail do
+ if seq[n][getchar(posttail)] then
+ n = n - 1
+ if posttail == post or n < 1 then
+ break
+ else
+ posttail = getprev(posttail)
+ end
+ else
+ notmatchpost[prev] = true
+ break
+ end
+ end
+ if n >= 1 then
+ notmatchpost[prev] = true
+ end
+ else
+ notmatchpost[prev] = true
+ end
+ if replace then
+ -- we seldom enter this branch (e.g. on brill efficient)
+ while replacetail do
+ if seq[n][getchar(replacetail)] then
+ n = n - 1
+ if replacetail == replace or n < 1 then
+ break
+ else
+ replacetail = getprev(replacetail)
+ end
+ else
+ notmatchreplace[prev] = true
+ if notmatchpost[prev] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ else
+ -- notmatchreplace[prev] = true -- not according to Kai
+ end
+ end
+ -- prev = getprev(prev)
+ prev = prv
+ -- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ -- elseif seq[n][32] and spaces[prev] then
+ -- n = n - 1
+ -- prev = prv
+ elseif id == glue_code then
+ local sn = seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n = n - 1
+ prev = prv
+ else
+ goto next
+ end
+ elseif seq[n][0xFFFC] then
+ n = n - 1
+ prev = prv
+ else
+ goto next
+ end
+ else
+ goto next
+ end
+ end
+ else
+ goto next
+ end
+ else
+ goto next
+ end
+ end
+
+ -- after
+
+ if s > l then
+ local current = last and getnext(last)
+ if not current and postreplace then
+ current = getnext(sweepnode)
+ end
+ if current then
+ local discfound -- = nil
+ local n = l + 1
+ while n <= s do
+ if current then
+ local nxt, char, id = isnextchar(current,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ if skiphash and skiphash[char] then
+ skipped = true
+ if trace_skips then
+ show_skip(dataset,sequence,char,ck,classes[char])
+ end
+ current = nxt -- was absent
+ elseif seq[n][char] then
+ if n < s then -- new test
+ current = nxt -- was absent
+ end
+ n = n + 1
+ elseif discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
+ end
+ elseif char == false then
+ if discfound then
+ notmatchreplace[discfound] = true
+ if notmatchpre[discfound] then
+ goto next
+ else
+ break
+ end
+ else
+ goto next
+ end
+ elseif id == disc_code then
+ -- elseif id == disc_code and (not discs or discs[current]) then
+ discseen = true
+ discfound = current
+ notmatchpre[current] = nil
+ notmatchpost[current] = true
+ notmatchreplace[current] = nil
+ local pre, post, replace = getdisc(current)
+ -- no detailed checking here, todo ?
+ if pre then
+ local n = n
+ while pre do
+ if seq[n][getchar(pre)] then
+ n = n + 1
+ if n > s then
+ break
+ else
+ pre = getnext(pre)
+ end
+ else
+ notmatchpre[current] = true
+ break
+ end
+ end
+ if n <= s then
+ notmatchpre[current] = true
+ end
+ else
+ notmatchpre[current] = true
+ end
+ if replace then
+ -- so far we never entered this branch
+ while replace do
+ if seq[n][getchar(replace)] then
+ n = n + 1
+ if n > s then
+ break
+ else
+ replace = getnext(replace)
+ end
+ else
+ notmatchreplace[current] = true
+ if notmatchpre[current] then
+ goto next
+ else
+ break
+ end
+ end
+ end
+ else
+ -- notmatchreplace[current] = true -- not according to Kai
+ end
+ current = getnext(current)
+ elseif id == glue_code then
+ local sn = seq[n]
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n = n + 1
+ current = nxt
+ else
+ goto next
+ end
+ elseif seq[n][0xFFFC] then
+ n = n + 1
+ current = nxt
+ else
+ goto next
+ end
+ else
+ goto next
+ end
+ end
+ else
+ goto next
+ end
+ end
+
+ if trace_contexts then
+ chaintrac(head,start,dataset,sequence,rlmode,skipped and skiphash,ck,true,discseen,sweepnode)
+ end
+ if discseen or sweepnode then
+ head, start, done = chaindisk(head,start,dataset,sequence,rlmode,skipped and skiphash,ck)
+ else
+ head, start, done = chainrun(head,start,last,dataset,sequence,rlmode,skipped and skiphash,ck)
+ end
+ if done then
+ break
+ -- else
+ -- next context
+ end
+ ::next::
+ -- if trace_chains then
+ -- chaintrac(head,start,dataset,sequence,rlmode,skipped and skiphash,ck,false,discseen,sweepnode)
+ -- end
+ end
+ if discseen then
+ notmatchpre = { }
+ notmatchpost = { }
+ notmatchreplace = { }
+ -- notmatchpre = { a = 1, b = 1 } notmatchpre .a = nil notmatchpre .b = nil
+ -- notmatchpost = { a = 1, b = 1 } notmatchpost .a = nil notmatchpost .b = nil
+ -- notmatchreplace = { a = 1, b = 1 } notmatchreplace.a = nil notmatchreplace.b = nil
+ end
+ return head, start, done
+end
+
+handlers.gsub_context = handle_contextchain
+handlers.gsub_contextchain = handle_contextchain
+handlers.gsub_reversecontextchain = handle_contextchain
+handlers.gpos_contextchain = handle_contextchain
+handlers.gpos_context = handle_contextchain
+
+-- this needs testing
+
+local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash)
+ local steps = currentlookup.steps
+ local nofsteps = currentlookup.nofsteps
+ if nofsteps > 1 then
+ reportmoresteps(dataset,sequence)
+ end
+ -- probably wrong
+ local l = steps[1].coverage[getchar(start)]
+ if l then
+ return handle_contextchain(head,start,dataset,sequence,l,rlmode,skiphash)
+ else
+ return head, start, false
+ end
+end
+
+chainprocs.gsub_context = chained_contextchain
+chainprocs.gsub_contextchain = chained_contextchain
+chainprocs.gsub_reversecontextchain = chained_contextchain
+chainprocs.gpos_contextchain = chained_contextchain
+chainprocs.gpos_context = chained_contextchain
+
+------------------------------
+
+-- experiment (needs no handler in font-otc so not now):
+--
+-- function otf.registerchainproc(name,f)
+-- -- chainprocs[name] = f
+-- chainprocs[name] = function(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash)
+-- local done = currentlookup.nofsteps > 0
+-- if not done then
+-- reportzerosteps(dataset,sequence)
+-- else
+-- head, start, done = f(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash)
+-- if not head or not start then
+-- reportbadsteps(dataset,sequence)
+-- end
+-- end
+-- return head, start, done
+-- end
+-- end
+
+local missing = setmetatableindex("table")
+local logwarning = report_process
+local resolved = { } -- we only resolve a font,script,language pair once
+
+local function logprocess(...)
+ if trace_steps then
+ registermessage(...)
+ if trace_steps == "silent" then
+ return
+ end
+ end
+ report_process(...)
+end
+
+-- todo: pass all these 'locals' in a table
+
+local sequencelists = setmetatableindex(function(t,font)
+ local sequences = fontdata[font].resources.sequences
+ if not sequences or not next(sequences) then
+ sequences = false
+ end
+ t[font] = sequences
+ return sequences
+end)
+
+-- fonts.hashes.sequences = sequencelists
+
+do -- overcome local limit
+
+ local autofeatures = fonts.analyzers.features
+ local featuretypes = otf.tables.featuretypes
+ local defaultscript = otf.features.checkeddefaultscript
+ local defaultlanguage = otf.features.checkeddefaultlanguage
+
+ local wildcard = "*"
+ local default = "dflt"
+
+ local function initialize(sequence,script,language,enabled,autoscript,autolanguage)
+ local features = sequence.features
+ if features then
+ local order = sequence.order
+ if order then
+ local featuretype = featuretypes[sequence.type or "unknown"]
+ for i=1,#order do
+ local kind = order[i]
+ local valid = enabled[kind]
+ if valid then
+ local scripts = features[kind]
+ local languages = scripts and (
+ scripts[script] or
+ scripts[wildcard] or
+ (autoscript and defaultscript(featuretype,autoscript,scripts))
+ )
+ local enabled = languages and (
+ languages[language] or
+ languages[wildcard] or
+ (autolanguage and defaultlanguage(featuretype,autolanguage,languages))
+ )
+ if enabled then
+ return { valid, autofeatures[kind] or false, sequence, kind }
+ end
+ end
+ end
+ else
+ -- can't happen
+ end
+ end
+ return false
+ end
+
+ function otf.dataset(tfmdata,font) -- generic variant, overloaded in context
+ local shared = tfmdata.shared
+ local properties = tfmdata.properties
+ local language = properties.language or "dflt"
+ local script = properties.script or "dflt"
+ local enabled = shared.features
+ local autoscript = enabled and enabled.autoscript
+ local autolanguage = enabled and enabled.autolanguage
+ local res = resolved[font]
+ if not res then
+ res = { }
+ resolved[font] = res
+ end
+ local rs = res[script]
+ if not rs then
+ rs = { }
+ res[script] = rs
+ end
+ local rl = rs[language]
+ if not rl then
+ rl = {
+ -- indexed but we can also add specific data by key
+ }
+ rs[language] = rl
+ local sequences = tfmdata.resources.sequences
+ if sequences then
+ for s=1,#sequences do
+ local v = enabled and initialize(sequences[s],script,language,enabled,autoscript,autolanguage)
+ if v then
+ rl[#rl+1] = v
+ end
+ end
+ end
+ end
+ return rl
+ end
+
+end
+
+-- Functions like kernrun, comprun etc evolved over time and in the end look rather
+-- complex. It's a bit of a compromis between extensive copying and creating subruns.
+-- The logic has been improved a lot by Kai and Ivo who use complex fonts which
+-- really helped to identify border cases on the one hand and get insight in the diverse
+-- ways fonts implement features (not always that consistent and efficient). At the same
+-- time I tried to keep the code relatively efficient so that the overhead in runtime
+-- stays acceptable.
+
+local function report_disc(what,n)
+ report_run("%s: %s > %s",what,n,languages.serializediscretionary(n))
+end
+
+local function kernrun(disc,k_run,...)
+ --
+ -- we catch <font 1><disc font 2>
+ --
+ if trace_kernruns then
+ report_disc("kern",disc)
+ end
+ --
+ local prev, next = getboth(disc)
+ --
+ local nextstart = next
+ local done = false
+ --
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ --
+ local prevmarks = prev
+ --
+ -- can be optional, because why on earth do we get a disc after a mark (okay, maybe when a ccmp
+ -- has happened but then it should be in the disc so basically this test indicates an error)
+ --
+ while prevmarks do
+ local prv, char = isprevchar(prevmarks,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char and marks[char] then
+ prevmarks = prv
+ else
+ break
+ end
+ end
+ --
+ if prev and not ischar(prev,currentfont) then -- and (pre or replace) -- weak test
+ prev = false
+ end
+ if next and not ischar(next,currentfont) then -- and (post or replace) -- weak test
+ next = false
+ end
+ --
+ -- we need to get rid of this nest mess some day .. has to be done otherwise
+ --
+ if pre then
+ if k_run(pre,"injections",nil,...) then
+ done = true
+ end
+ if prev then
+ setlink(prev,pre)
+ if k_run(prevmarks,"preinjections",pre,...) then -- or prev?
+ done = true
+ end
+ setprev(pre)
+ setlink(prev,disc)
+ end
+ end
+ --
+ if post then
+ if k_run(post,"injections",nil,...) then
+ done = true
+ end
+ if next then
+ setlink(posttail,next)
+ if k_run(posttail,"postinjections",next,...) then
+ done = true
+ end
+ setnext(posttail)
+ setlink(disc,next)
+ end
+ end
+ --
+ if replace then
+ if k_run(replace,"injections",nil,...) then
+ done = true
+ end
+ if prev then
+ setlink(prev,replace)
+ if k_run(prevmarks,"replaceinjections",replace,...) then -- getnext(replace))
+ done = true
+ end
+ setprev(replace)
+ setlink(prev,disc)
+ end
+ if next then
+ setlink(replacetail,next)
+ if k_run(replacetail,"replaceinjections",next,...) then
+ done = true
+ end
+ setnext(replacetail)
+ setlink(disc,next)
+ end
+ elseif prev and next then
+ setlink(prev,next)
+ if k_run(prevmarks,"emptyinjections",next,...) then
+ done = true
+ end
+ setlink(prev,disc,next)
+ end
+ if done and trace_testruns then
+ report_disc("done",disc)
+ end
+ return nextstart, done
+end
+
+-- fonts like ebgaramond do ligatures this way (less efficient than e.g. dejavu which
+-- will do the testrun variant)
+
+local function comprun(disc,c_run,...) -- vararg faster than the whole list
+ if trace_compruns then
+ report_disc("comp",disc)
+ end
+ --
+ local pre, post, replace = getdisc(disc)
+ local renewed = false
+ --
+ if pre then
+ sweepnode = disc
+ sweeptype = "pre" -- in alternative code preinjections is used (also used then for properties, saves a variable)
+ local new, done = c_run(pre,...)
+ if done then
+ pre = new
+ renewed = true
+ end
+ end
+ --
+ if post then
+ sweepnode = disc
+ sweeptype = "post"
+ local new, done = c_run(post,...)
+ if done then
+ post = new
+ renewed = true
+ end
+ end
+ --
+ if replace then
+ sweepnode = disc
+ sweeptype = "replace"
+ local new, done = c_run(replace,...)
+ if done then
+ replace = new
+ renewed = true
+ end
+ end
+ --
+ sweepnode = nil
+ sweeptype = nil
+ if renewed then
+ if trace_testruns then
+ report_disc("done",disc)
+ end
+ setdisc(disc,pre,post,replace)
+ end
+ --
+ return getnext(disc), renewed
+end
+
+-- if we can hyphenate in a lig then unlikely a lig so we
+-- could have a option here to ignore lig
+
+local test_flatten_start = 2 -- must start at 2 according to Kai
+
+directives.register("otf.testrun.forceflatten", function(v)
+ test_flatten_start = v and 1 or 2
+end)
+
+local function testrun(disc,t_run,c_run,...)
+ if trace_testruns then
+ report_disc("test",disc)
+ end
+ local prev, next = getboth(disc)
+ if not next then
+ -- weird discretionary
+ return
+ end
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ local renewed = false
+ if post or replace then -- and prev then -- hm, we can start with a disc
+ if post then
+ setlink(posttail,next)
+ else
+ post = next
+ end
+ if replace then
+ setlink(replacetail,next)
+ else
+ replace = next
+ end
+ local d_post = t_run(post,next,...)
+ local d_replace = t_run(replace,next,...)
+ if d_post > 0 or d_replace > 0 then
+ local d = d_replace > d_post and d_replace or d_post
+ local head = getnext(disc) -- is: next
+ local tail = head
+ for i=test_flatten_start,d do
+ local nx = getnext(tail)
+ local id = getid(nx)
+ if id == disc_code then
+ head, tail = flattendisk(head,nx)
+ elseif id == glyph_code then
+ tail = nx
+ else
+ -- we can have overrun into a glue
+ break
+ end
+ end
+ next = getnext(tail)
+ setnext(tail)
+ setprev(head)
+ local new = copy_node_list(head)
+ if posttail then
+ setlink(posttail,head)
+ else
+ post = head
+ end
+ if replacetail then
+ setlink(replacetail,new)
+ else
+ replace = new
+ end
+ else
+ -- we stay inside the disc
+ if posttail then
+ setnext(posttail)
+ else
+ post = nil
+ end
+ if replacetail then
+ setnext(replacetail)
+ else
+ replace = nil
+ end
+ end
+ setlink(disc,next)
+ -- pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ end
+ --
+ -- like comprun
+ --
+ if trace_testruns then
+ report_disc("more",disc)
+ end
+ --
+ if pre then
+ sweepnode = disc
+ sweeptype = "pre"
+ local new, ok = c_run(pre,...)
+ if ok then
+ pre = new
+ renewed = true
+ end
+ end
+ --
+ if post then
+ sweepnode = disc
+ sweeptype = "post"
+ local new, ok = c_run(post,...)
+ if ok then
+ post = new
+ renewed = true
+ end
+ end
+ --
+ if replace then
+ sweepnode = disc
+ sweeptype = "replace"
+ local new, ok = c_run(replace,...)
+ if ok then
+ replace = new
+ renewed = true
+ end
+ end
+ --
+ sweepnode = nil
+ sweeptype = nil
+ if renewed then
+ setdisc(disc,pre,post,replace)
+ if trace_testruns then
+ report_disc("done",disc)
+ end
+ end
+ -- next can have changed (copied list)
+ return getnext(disc), renewed
+end
+
+-- 1{2{\oldstyle\discretionary{3}{4}{5}}6}7\par
+-- 1{2\discretionary{3{\oldstyle3}}{{\oldstyle4}4}{5{\oldstyle5}5}6}7\par
+
+local nesting = 0
+
+local function c_run_single(head,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ local done = false
+ local sweep = sweephead[head]
+ local start
+ if sweep then
+ start = sweep
+ -- sweephead[head] = nil
+ sweephead[head] = false
+ else
+ start = head
+ end
+ while start do
+ local nxt, char, id = isnextchar(start,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,skiphash,step)
+ if ok then
+ done = true
+ end
+ if start then
+ start = getnext(start)
+ end
+ else
+ start = nxt
+ end
+ elseif char == false then
+ return head, done
+ elseif sweep then
+ -- else we loose the rest
+ return head, done
+ else
+ -- in disc component ... really?
+ start = nxt
+ end
+ end
+ return head, done
+end
+
+local function t_run_single(start,stop,lookupcache)
+ local lastd = nil
+ while start ~= stop do
+ local nxt, char = isnextchar(start,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then -- hm, hyphens can match (tlig) so we need to really check
+ -- if we need more than ligatures we can outline the code and use functions
+ local s = nxt
+ local ss = nil
+ local sstop = s == stop
+ if not s then
+ s = ss
+ ss = nil
+ end
+ -- a bit weird: why multiple ... anyway we can't have a disc in a disc
+ -- how about post ... we can probably merge this into the while
+ while getid(s) == disc_code do
+ ss = getnext(s)
+ s = getreplace(s)
+ if not s then
+ s = ss
+ ss = nil
+ end
+ end
+ local l = nil
+ local d = 0
+ while s do
+ local nxt, char = isnextchar(s,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ local lg = lookupmatch[char]
+ if lg then
+ if sstop then
+ d = 1
+ elseif d > 0 then
+ d = d + 1
+ end
+ l = lg
+ s = nxt
+ sstop = s == stop
+ if not s then
+ s = ss
+ ss = nil
+ end
+ while getid(s) == disc_code do
+ ss = getnext(s)
+ s = getreplace(s)
+ if not s then
+ s = ss
+ ss = nil
+ end
+ end
+ lookupmatch = lg
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if l and l.ligature then -- so we test for ligature
+ lastd = d
+ end
+ end
+ if lastd then
+ return lastd
+ else
+ start = nxt
+ end
+ else
+ break
+ end
+ end
+ return 0
+end
+
+local function k_run_single(sub,injection,last,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ for n in nextnode, sub do -- only gpos
+ if n == last then
+ break
+ else
+ local nxt, char = isnextchar(n,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local h, d, ok = handler(sub,n,dataset,sequence,lookupmatch,rlmode,skiphash,step,injection)
+ if ok then
+ return true
+ end
+ end
+ end
+ end
+ end
+end
+
+local function c_run_multiple(head,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ local done = false
+ local sweep = sweephead[head]
+ local start
+ if sweep then
+ start = sweep
+ -- sweephead[head] = nil
+ sweephead[head] = false
+ else
+ start = head
+ end
+ while start do
+ local nxt, char = isnextchar(start,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ -- we could move all code inline but that makes things even more unreadable
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,skiphash,step)
+ if ok then
+ done = true
+ break
+ elseif not start then
+ -- don't ask why ... shouldn't happen
+ break
+ end
+ end
+ end
+ if start then
+ start = getnext(start)
+ end
+ elseif char == false then
+ -- whatever glyph
+ return head, done
+ elseif sweep then
+ -- else we loose the rest
+ return head, done
+ else
+ -- in disc component
+ start = nxt
+ end
+ end
+ return head, done
+end
+
+local function t_run_multiple(start,stop,steps,nofsteps)
+ local lastd = nil
+ while start ~= stop do
+ local startnext, char = isnextchar(start,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ -- if we need more than ligatures we can outline the code and use functions
+ local s = startnext
+ local ss = nil
+ local sstop = s == stop
+ if not s then
+ s = ss
+ ss = nil
+ end
+ while getid(s) == disc_code do
+ ss = getnext(s)
+ s = getreplace(s)
+ if not s then
+ s = ss
+ ss = nil
+ end
+ end
+ local l = nil
+ local d = 0
+ while s do
+ local nxt, char = isnextchar(s,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ local lg = lookupmatch[char]
+ if lg then
+ if sstop then
+ d = 1
+ elseif d > 0 then
+ d = d + 1
+ end
+ l = lg
+ s = nxt
+ sstop = s == stop
+ if not s then
+ s = ss
+ ss = nil
+ end
+ while getid(s) == disc_code do
+ ss = getnext(s)
+ s = getreplace(s)
+ if not s then
+ s = ss
+ ss = nil
+ end
+ end
+ lookupmatch = lg
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if l and l.ligature then
+ lastd = d
+ end
+ end
+ end
+ if lastd then
+ return lastd
+ else
+ start = startnext
+ end
+ else
+ break
+ end
+ end
+ return 0
+end
+
+local function k_run_multiple(sub,injection,last,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ for n in nextnode, sub do -- only gpos
+ if n == last then
+ break
+ else
+ local nxt, char = isnextchar(n,currentfont,currentdynamic,currentscale,currentxscale,currentyscale)
+ if char then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local h, d, ok = handler(sub,n,dataset,sequence,lookupmatch,rlmode,skiphash,step,injection) -- sub was head
+ if ok then
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local txtdirstate, pardirstate do -- this might change (no need for nxt in pardirstate)
+
+ local getdirection = nuts.getdirection
+
+ txtdirstate = function(start,stack,top,rlparmode)
+ local dir, pop = getdirection(start)
+ if pop then
+ if top == 1 then
+ return 0, rlparmode
+ else
+ top = top - 1
+ if stack[top] == righttoleft_code then
+ return top, -1
+ else
+ return top, 1
+ end
+ end
+ elseif dir == lefttoright_code then
+ top = top + 1
+ stack[top] = lefttoright_code
+ return top, 1
+ elseif dir == righttoleft_code then
+ top = top + 1
+ stack[top] = righttoleft_code
+ return top, -1
+ else
+ return top, rlparmode
+ end
+ end
+
+ pardirstate = function(start)
+ local dir = getdirection(start)
+ if dir == lefttoright_code then
+ return 1, 1
+ elseif dir == righttoleft_code then
+ return -1, -1
+ else
+ return 0, 0
+ end
+ end
+
+end
+
+-- These are non public helpers that can change without notice!
+
+otf.helpers = otf.helpers or { }
+otf.helpers.txtdirstate = txtdirstate
+otf.helpers.pardirstate = pardirstate
+
+-- This is the main loop. We run over the node list dealing with a specific font. The
+-- dynamic is a context specific thing. We could work on sub start-stop ranges instead
+-- but I wonder if there is that much speed gain (experiments showed that it made not
+-- much sense) and we need to keep track of directions anyway. Also at some point I
+-- want to play with font interactions and then we do need the full sweeps. Apart from
+-- optimizations the principles of processing the features hasn't changed much since
+-- the beginning.
+
+do
+
+ -- This is a measurable experimental speedup (only with hyphenated text and multiple
+ -- fonts per processor call), especially for fonts with lots of contextual lookups.
+
+ local fastdisc = true
+ local testdics = false
+
+ directives.register("otf.fastdisc",function(v) fastdisc = v end) -- normally enabled
+
+ -- using a merged combined hash as first test saves some 30% on ebgaramond and
+ -- about 15% on arabtype .. then moving the a test also saves a bit (even when
+ -- often a is not set at all so that one is a bit debatable
+
+ local otfdataset = nil -- todo: make an installer
+
+ local getfastdisc = { __index = function(t,k)
+ local v = usesfont(k,currentfont)
+ t[k] = v
+ return v
+ end }
+
+ local getfastspace = { __index = function(t,k)
+ -- we don't pass the id so that one can overload isspace
+ local v = isspace(k,threshold) or false
+ t[k] = v
+ return v
+ end }
+
+ function otf.featuresprocessor(head,font,dynamic,direction,n)
+
+ local sequences = sequencelists[font] -- temp hack
+
+ nesting = nesting + 1
+
+ if nesting == 1 then
+ currentfont = font
+ currentdynamic = dynamic
+ currentscale = false
+ currentxscale = false
+ currentyscale = false
+ tfmdata = fontdata[font]
+ descriptions = tfmdata.descriptions -- only needed in gref so we could pass node there instead
+ characters = tfmdata.characters -- but this branch is not entered that often anyway
+ local resources = tfmdata.resources
+ marks = resources.marks
+ classes = resources.classes
+ threshold,
+ factor = getthreshold(font)
+ checkmarks = tfmdata.properties.checkmarks
+
+ if not otfdataset then
+ otfdataset = otf.dataset
+ end
+
+ discs = fastdisc and n and n > 1 and setmetatable({},getfastdisc) -- maybe inline
+ spaces = setmetatable({},getfastspace)
+
+ elseif currentfont ~= font then
+
+ report_warning("nested call with a different font, level %s, quitting",nesting)
+ nesting = nesting - 1
+ return head, false
+
+ end
+
+ if trace_steps then
+ checkstep(head)
+ end
+
+ local initialrl = 0
+
+ if getid(head) == par_code and start_of_par(head) then
+ initialrl = pardirstate(head)
+ elseif direction == righttoleft_code then
+ initialrl = -1
+ end
+
+ local datasets = otfdataset(tfmdata,font,dynamic)
+ local dirstack = { nil } -- could move outside function but we can have local runs
+ sweephead = { }
+ -- sweephead = { a = 1, b = 1 } sweephead.a = nil sweephead.b = nil
+
+ -- Keeping track of the headnode is needed for devanagari. (I generalized it a bit
+ -- so that multiple cases are also covered.) We could prepend a temp node.
+
+ -- We don't goto the next node when a disc node is created so that we can then treat
+ -- the pre, post and replace. It's a bit of a hack but works out ok for most cases.
+
+ for s=1,#datasets do
+ local dataset = datasets[s]
+ local state = dataset[2]
+ local sequence = dataset[3] -- sequences[s] -- also dataset[5]
+ local rlparmode = initialrl
+ local topstack = 0
+ local typ = sequence.type
+ local gpossing = typ == "gpos_single" or typ == "gpos_pair" -- store in dataset
+ local forcetestrun = typ == "gsub_ligature" -- testrun is only for ligatures
+ local handler = handlers[typ] -- store in dataset
+ local steps = sequence.steps
+ local nofsteps = sequence.nofsteps
+ local skiphash = sequence.skiphash
+
+ if not steps then
+ -- This permits injection, watch the different arguments. Watch out, the arguments passed
+ -- are not frozen as we might extend or change this. Is this used at all apart from some
+ -- experiments?
+ local h, ok = handler(head,dataset,sequence,initialrl,font,dynamic) -- less arguments now
+ if h and h ~= head then
+ head = h
+ end
+ elseif typ == "gsub_reversecontextchain" then
+ --
+ -- This might need a check: if we have #before or #after > 0 then we might need to reverse
+ -- the before and after lists in the loader. But first I need to see a font that uses multiple
+ -- matches.
+ --
+ local start = find_node_tail(head)
+ local rlmode = 0 -- how important is this .. do we need to check for dir?
+ local merged = steps.merged
+ while start do
+ local prv, char, id = isprevchar(start,font,dynamic,state)
+ if char then
+ local m = merged[char]
+ if m then
+ currentscale, currentxscale, currentyscale = getscales(start)
+ for i=m[1],m[2] do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,skiphash,step)
+ if ok then
+ -- done = true
+ break
+ end
+ end
+ end
+ if start then
+ start = getprev(start)
+ end
+ else
+ start = prv
+ end
+ else
+ start = prv
+ end
+ end
+ else
+ local start = head
+ local rlmode = initialrl
+ if nofsteps == 1 then -- happens often
+ local step = steps[1]
+ local lookupcache = step.coverage
+ while start do
+ local nxt, char, id = isnextchar(start,font,dynamic,state) -- we can move the data/state checks here
+ if char then
+ if skiphash and skiphash[char] then -- we never needed it here but let's try
+ start = nxt
+ else
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ currentscale, currentxscale, currentyscale = getscales(start)
+ local ok, df
+ head, start, ok, df = handler(head,start,dataset,sequence,lookupmatch,rlmode,skiphash,step)
+ if df then
+ -- print("restart 1",typ)
+ elseif start then
+ start = getnext(start) -- can be a new start
+ end
+ else
+ start = nxt
+ end
+ end
+ elseif char == false or id == glue_code then
+ -- a different font|state or glue (happens often)
+ start = nxt
+ elseif id == disc_code then
+ if not discs or discs[start] == true then
+ local ok
+ if gpossing then
+ start, ok = kernrun(start,k_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ elseif forcetestrun then
+ start, ok = testrun(start,t_run_single,c_run_single,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ else
+ start, ok = comprun(start,c_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ end
+ -- if ok then
+ -- done = true
+ -- end
+ else
+ start = nxt
+ end
+ elseif id == math_code then
+ start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
+ start = nxt
+ -- elseif id == par_code and start_of_par(start) then
+ -- rlparmode, rlmode = pardirstate(start)
+ -- start = nxt
+ else
+ start = nxt
+ end
+ end
+ else
+ local merged = steps.merged
+ while start do
+ local nxt, char, id = isnextchar(start,font,dynamic,state)
+ if char then
+ if skiphash and skiphash[char] then -- we never needed it here but let's try
+ start = nxt
+ else
+ local m = merged[char]
+ if m then
+ currentscale, currentxscale, currentyscale = getscales(start)
+ local ok, df
+ for i=m[1],m[2] do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ -- we could move all code inline but that makes things even more unreadable
+-- local ok, df
+ head, start, ok, df = handler(head,start,dataset,sequence,lookupmatch,rlmode,skiphash,step)
+ if df then
+ break
+ elseif ok then
+ break
+ elseif not start then
+ -- don't ask why ... shouldn't happen
+ break
+ end
+ end
+ end
+ if df then
+ -- print("restart 2",typ)
+ elseif start then
+ start = getnext(start) -- can be a new next
+ end
+ else
+ start = nxt
+ end
+ end
+ elseif char == false or id == glue_code then
+ -- a different font|state or glue (happens often)
+ start = nxt
+ elseif id == disc_code then
+ if not discs or discs[start] == true then
+ local ok
+ if gpossing then
+ start, ok = kernrun(start,k_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ elseif forcetestrun then
+ start, ok = testrun(start,t_run_multiple,c_run_multiple,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ else
+ start, ok = comprun(start,c_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ end
+ else
+ start = nxt
+ end
+ elseif id == math_code then
+ start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
+ start = nxt
+ -- elseif id == par_code and start_of_par(start) then
+ -- rlparmode, rlmode = pardirstate(start)
+ -- start = nxt
+ else
+ start = nxt
+ end
+ end
+ end
+ end
+
+ if trace_steps then -- ?
+ registerstep(head)
+ end
+
+ end
+
+ nesting = nesting - 1
+
+ return head
+ end
+
+ -- This is not an official helper and used for tracing experiments. It can be changed as I like
+ -- at any moment. At some point it might be used in a module that can help font development.
+
+ function otf.datasetpositionprocessor(head,font,direction,dataset)
+
+ currentfont = font
+ currentdynamic = false
+ currentscale = false
+ currentxscale = false
+ currentyscale = false
+ tfmdata = fontdata[font]
+ descriptions = tfmdata.descriptions -- only needed in gref so we could pass node there instead
+ characters = tfmdata.characters -- but this branch is not entered that often anyway
+ local resources = tfmdata.resources
+ marks = resources.marks
+ classes = resources.classes
+ threshold,
+ factor = getthreshold(font)
+ checkmarks = tfmdata.properties.checkmarks
+
+ if type(dataset) == "number" then
+ dataset = otfdataset(tfmdata,font,0)[dataset]
+ end
+
+ local sequence = dataset[3] -- sequences[s] -- also dataset[5]
+ local typ = sequence.type
+ -- local gpossing = typ == "gpos_single" or typ == "gpos_pair" -- store in dataset
+
+ -- gpos_contextchain gpos_context
+
+ -- if not gpossing then
+ -- return head, false
+ -- end
+
+ local handler = handlers[typ] -- store in dataset
+ local steps = sequence.steps
+ local nofsteps = sequence.nofsteps
+
+ local done = false
+ local dirstack = { nil } -- could move outside function but we can have local runs (maybe a few more nils)
+ local start = head
+ local initialrl = (direction == righttoleft_code) and -1 or 0
+ local rlmode = initialrl
+ local rlparmode = initialrl
+ local topstack = 0
+ local merged = steps.merged
+
+ -- local matches = false
+ local position = 0
+
+ while start do
+ local nxt, char, id = isnextchar(start,currentfont,currentdynamic)
+ if char then
+ position = position + 1
+ local m = merged[char]
+ if m then
+ if skiphash and skiphash[char] then -- we never needed it here but let's try
+ start = nxt
+ else
+ for i=m[1],m[2] do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ currentscale, currentxscale, currentyscale = getscales(start)
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,skiphash,step)
+ if ok then
+ -- if matches then
+ -- matches[position] = i
+ -- else
+ -- matches = { [position] = i }
+ -- end
+ break
+ elseif not start then
+ break
+ end
+ end
+ end
+ if start then
+ start = getnext(start) -- start can be new
+ end
+ end
+ else
+ -- start = getnext(start)
+ start = nxt
+ end
+ elseif char == false or id == glue_code then
+ -- a different font|state or glue (happens often)
+ start = nxt
+ elseif id == math_code then
+ start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
+ start = nxt
+ -- elseif id == par_code and start_of_par(start) then
+ -- rlparmode, rlmode = pardirstate(start)
+ -- start = nxt
+ else
+ start = nxt
+ end
+ end
+
+ return head
+ end
+
+ -- end of experiment
+
+end
+
+-- so far
+
+local plugins = { }
+otf.plugins = plugins
+
+local report = logs.reporter("fonts")
+
+function otf.registerplugin(name,f)
+ if type(name) == "string" and type(f) == "function" then
+ plugins[name] = { name, f }
+ report()
+ report("plugin %a has been loaded, please be aware of possible side effects",name)
+ report()
+ if logs.pushtarget then
+ logs.pushtarget("log")
+ end
+ report("Plugins are not officially supported unless stated otherwise. This is because")
+ report("they bypass the regular font handling and therefore some features in ConTeXt")
+ report("(especially those related to fonts) might not work as expected or might not work")
+ report("at all. Some plugins are for testing and development only and might change")
+ report("whenever we feel the need for it.")
+ report()
+ if logs.poptarget then
+ logs.poptarget()
+ end
+ end
+end
+
+function otf.plugininitializer(tfmdata,value)
+ if type(value) == "string" then
+ tfmdata.shared.plugin = plugins[value]
+ end
+end
+
+function otf.pluginprocessor(head,font,dynamic,direction) -- n
+ local s = fontdata[font].shared
+ local p = s and s.plugin
+ if p then
+ if trace_plugins then
+ report_process("applying plugin %a",p[1])
+ end
+ return p[2](head,font,dynamic,direction)
+ else
+ return head, false
+ end
+end
+
+function otf.featuresinitializer(tfmdata,value)
+ -- nothing done here any more
+end
+
+registerotffeature {
+ name = "features",
+ description = "features",
+ default = true,
+ initializers = {
+ position = 1,
+ node = otf.featuresinitializer,
+ plug = otf.plugininitializer,
+ },
+ processors = {
+ node = otf.featuresprocessor,
+ plug = otf.pluginprocessor,
+ }
+}
+
+-- Moved here (up) a bit. This doesn't really belong in generic so it will
+-- move to a context module some day.
+
+local function markinitializer(tfmdata,value)
+ local properties = tfmdata.properties
+ properties.checkmarks = value
+end
+
+registerotffeature {
+ name = "checkmarks",
+ description = "check mark widths",
+ default = true,
+ initializers = {
+ node = markinitializer,
+ },
+}
+
+-- This can be used for extra handlers, but should be used with care! We implement one
+-- here but some more can be found in the osd (script devanagary) file. Now watch out:
+-- when a handler has steps, it is called as the other ones, but when we have no steps,
+-- we use a different call:
+--
+-- function(head,dataset,sequence,initialrl,font,dynamic)
+-- return head, done
+-- end
+--
+-- Also see (!!).
+
+otf.handlers = handlers
+
+if context then
+ return
+else
+ -- todo: move the following code someplace else
+end
+
+local setspacekerns = nodes.injections.setspacekerns if not setspacekerns then os.exit() end
+
+local tag = "kern"
+
+-- if fontfeatures then
+
+-- function handlers.trigger_space_kerns(head,dataset,sequence,initialrl,font,dynamic)
+-- local features = fontfeatures[font]
+-- local enabled = features and features.spacekern and features[tag]
+-- if enabled then
+-- setspacekerns(font,sequence)
+-- end
+-- return head, enabled
+-- end
+
+-- else -- generic (no hashes)
+
+ function handlers.trigger_space_kerns(head,dataset,sequence,initialrl,font,dynamic)
+ local shared = fontdata[font].shared
+ local features = shared and shared.features
+ local enabled = features and features.spacekern and features[tag]
+ if enabled then
+ setspacekerns(font,sequence)
+ end
+ return head, enabled
+ end
+
+-- end
+
+-- There are fonts out there that change the space but we don't do that kind of
+-- things in TeX.
+
+local function hasspacekerns(data)
+ local resources = data.resources
+ local sequences = resources.sequences
+ local validgpos = resources.features.gpos
+ if validgpos and sequences then
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local steps = sequence.steps
+ if steps and sequence.features[tag] then
+ local kind = sequence.type
+ if kind == "gpos_pair" or kind == "gpos_single" then
+ for i=1,#steps do
+ local step = steps[i]
+ local coverage = step.coverage
+ local rules = step.rules
+ if rules then
+ -- not now: analyze (simple) rules
+ elseif not coverage then
+ -- nothing to do
+ elseif kind == "gpos_single" then
+ -- maybe a message that we ignore
+ elseif kind == "gpos_pair" then
+ local format = step.format
+ if format == "move" or format == "kern" then
+ local kerns = coverage[32]
+ if kerns then
+ return true
+ end
+ for k, v in next, coverage do
+ if v[32] then
+ return true
+ end
+ end
+ elseif format == "pair" then
+ local kerns = coverage[32]
+ if kerns then
+ for k, v in next, kerns do
+ local one = v[1]
+ if one and one ~= true then
+ return true
+ end
+ end
+ end
+ for k, v in next, coverage do
+ local kern = v[32]
+ if kern then
+ local one = kern[1]
+ if one and one ~= true then
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ return false
+end
+
+otf.readers.registerextender {
+ name = "spacekerns",
+ action = function(data)
+ data.properties.hasspacekerns = hasspacekerns(data)
+ end
+}
+
+local function spaceinitializer(tfmdata,value) -- dynamic
+ local resources = tfmdata.resources
+ local spacekerns = resources and resources.spacekerns
+ if value and spacekerns == nil then
+ local rawdata = tfmdata.shared and tfmdata.shared.rawdata
+ local properties = rawdata.properties
+ if properties and properties.hasspacekerns then
+ local sequences = resources.sequences
+ local validgpos = resources.features.gpos
+ if validgpos and sequences then
+ local left = { }
+ local right = { }
+ local last = 0
+ local feat = nil
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local steps = sequence.steps
+ if steps then
+ -- we don't support space kerns in other features
+ local kern = sequence.features[tag]
+ if kern then
+ local kind = sequence.type
+ if kind == "gpos_pair" or kind == "gpos_single" then
+ if feat then
+ for script, languages in next, kern do
+ local f = feat[script]
+ if f then
+ for l in next, languages do
+ f[l] = true
+ end
+ else
+ feat[script] = languages
+ end
+ end
+ else
+ feat = kern
+ end
+ for i=1,#steps do
+ local step = steps[i]
+ local coverage = step.coverage
+ local rules = step.rules
+ if rules then
+ -- not now: analyze (simple) rules
+ elseif not coverage then
+ -- nothing to do
+ elseif kind == "gpos_single" then
+ -- makes no sense in TeX
+ elseif kind == "gpos_pair" then
+ local format = step.format
+ if format == "move" or format == "kern" then
+ local kerns = coverage[32]
+ if kerns then
+ for k, v in next, kerns do
+ right[k] = v
+ end
+ end
+ for k, v in next, coverage do
+ local kern = v[32]
+ if kern then
+ left[k] = kern
+ end
+ end
+ elseif format == "pair" then
+ local kerns = coverage[32]
+ if kerns then
+ for k, v in next, kerns do
+ local one = v[1]
+ if one and one ~= true then
+ right[k] = one[3]
+ end
+ end
+ end
+ for k, v in next, coverage do
+ local kern = v[32]
+ if kern then
+ local one = kern[1]
+ if one and one ~= true then
+ left[k] = one[3]
+ end
+ end
+ end
+ end
+ end
+ end
+ last = i
+ end
+ else
+ -- no steps ... needed for old one ... we could use the basekerns
+ -- instead
+ end
+ end
+ end
+ left = next(left) and left or false
+ right = next(right) and right or false
+ if left or right then
+ spacekerns = {
+ left = left,
+ right = right,
+ }
+ if last > 0 then
+ local triggersequence = {
+ -- no steps, see (!!)
+ features = { [tag] = feat or { dflt = { dflt = true, } } },
+ flags = noflags,
+ name = "trigger_space_kerns",
+ order = { tag },
+ type = "trigger_space_kerns",
+ left = left,
+ right = right,
+ }
+ insert(sequences,last,triggersequence)
+ end
+ end
+ end
+ end
+ resources.spacekerns = spacekerns
+ end
+ return spacekerns
+end
+
+registerotffeature {
+ name = "spacekern",
+ description = "space kern injection",
+ default = true,
+ initializers = {
+ node = spaceinitializer,
+ },
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-pre.mkxl b/Master/texmf-dist/tex/context/base/mkxl/font-pre.mkxl
new file mode 100644
index 00000000000..e6e6930e1a8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-pre.mkxl
@@ -0,0 +1,1025 @@
+%D \module
+%D [ file=font-pre,
+%D version=2012.01.04, % moved from font-ini
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Predefined,
+%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 Font Macros / Predefined}
+
+\unprotect
+
+%D A basic set of features is defined here.
+
+% beware, base mode + dynamics can give weird effects
+
+% frac : with numr dnom
+%
+% vkrn valt vert vrt2 vpal : when vertical
+%
+% rtlm rtla : in r2l runs
+% ltrm ltra : in l2r runs
+%
+% rvrn : variable fonts
+%
+% rtbd lfbd : opbd
+%
+% rkrf rphf vatu vjmo tjmo rclt psts pstf ljmo haln
+% pres pref nukt
+% abvs abvm blwm blws cjct blwf akhn (indic)
+% half
+% abvf cfar (khmer)
+%
+% ccmp locl calt clig liga rlig
+%
+% mkmk mark kern (palt pwid) curs (by choice but some fonts need it)
+%
+% init medi isol fina (unicode)
+% fin3 fin2 med2 : syriac
+%
+% cpsp : percentage spacing (todo)
+%
+% dtls flac :math
+
+\definefontfeature
+ [always]
+ [mode=node, % we had 'auto', but let's try 'node' for a while and see what the impact is
+ script=auto, % on speed; 'base' just doesn't play well with dynamics; some day we can even
+ autoscript=position,
+ autolanguage=position,
+ kern=yes, % consider skipping the base passes when no base mode is used
+ mark=yes,
+ mkmk=yes,
+ curs=yes]
+
+\definefontfeature
+ [default]
+ [always]
+ [liga=yes,
+% ccmp=yes, % maybe too
+% locl=yes, % maybe too
+% calt=yes, % maybe too
+% clig=yes, % maybe too
+% rlig=yes, % maybe too
+ tlig=yes,
+ trep=yes] % texligatures=yes,texquotes=yes
+
+\definefontfeature
+ [original] % a clone of default so we can revert
+ [default]
+
+\definefontfeature
+ [smallcaps]
+ [always]
+ [smcp=yes,
+ tlig=yes,
+ trep=yes] % texligatures=yes,texquotes=yes
+
+\definefontfeature
+ [oldstyle]
+ [always]
+ [onum=yes,
+ liga=yes,
+ tlig=yes,
+ trep=yes] % texligatures=yes,texquotes=yes
+
+\definefontfeature
+ [inlinenumbers]
+ [pnum=yes,
+ tnum=no]
+
+\definefontfeature
+ [tabularnumbers]
+ [tnum=yes,
+ pnum=no]
+
+\definefontfeature
+ [oldstylenumbers]
+ [onum=yes]
+
+\definefontfeature
+ [zero]
+ [zero=yes]
+
+% \definefontfeature
+% [newstyle]
+% [onum=no]
+
+\definefontfeature % == default unless redefined
+ [ligatures]
+ [always]
+ [liga=yes,
+ tlig=yes,
+ trep=yes]
+
+\definefontfeature
+ [letterspacing]
+ [liga=no,
+ rlig=no,
+ clig=no,
+ dlig=no,
+ ccmp=yes,
+ keepligatures=auto]
+
+\definefontfeature % can be used for type1 fonts
+ [complete]
+ [always]
+ [compose=yes,
+ liga=yes,
+% ccmp=yes,
+% locl=yes,
+% calt=yes,
+% clig=yes,
+% rlig=yes,
+ tlig=yes,
+ trep=yes]
+
+\definefontfeature
+ [none]
+ [mode=none,
+ features=no]
+
+\definefontfeature
+ [semitic-complete]
+ [mode=node,analyze=yes,language=dflt,ccmp=yes,
+ autoscript=position,autolanguage=position,
+ init=yes,medi=yes,fina=yes,isol=yes,
+ % fin2=yes,fin3=yes,med2=yes,
+ mark=yes,mkmk=yes,kern=yes,curs=yes,
+ liga=yes,dlig=yes,rlig=yes,clig=yes,calt=yes]
+
+\definefontfeature
+ [semitic-simple]
+ [mode=node,analyze=yes,language=dflt,ccmp=yes,
+ autoscript=position,autolanguage=position,
+ init=yes,medi=yes,fina=yes,isol=yes,
+ % fin2=yes,fin3=yes,med2=yes,
+ mark=yes,mkmk=yes,kern=yes,curs=yes,
+ rlig=yes,calt=yes]
+
+\definefontfeature
+ [arabic]
+ [semitic-complete]
+ [script=arab]
+
+\definefontfeature
+ [syriac]
+ [arabic]
+ [fin2=yes,fin3=yes,med2=yes]
+
+\definefontfeature
+ [reordercombining]
+ [reordercombining=yes]
+
+\definefontfeature
+ [hebrew]
+ [semitic-complete]
+ [script=hebr,
+ reordercombining=yes] % seems to work best with reasonable fonts
+
+\definefontfeature
+ [simplearabic]
+ [semitic-simple]
+ [script=arab]
+
+\definefontfeature
+ [simplehebrew]
+ [semitic-simple]
+ [script=hebr]
+
+% indic
+
+\definefontfeature
+ [indic-common]
+ [mode=node,
+ language=dflt,
+ % localized
+ locl=yes,
+ % positioning
+ kern=yes,
+ dist=yes,
+ % above/below base marks
+ abvm=yes,
+ blwm=yes,
+ % basic shaping
+ nukt=yes,
+ akhn=yes,
+ rphf=yes,
+ % presentation
+ pres=yes,
+ abvs=yes,
+ blws=yes,
+ psts=yes,
+ haln=yes,
+ calt=yes]
+
+\definefontfeature
+ [devanagari-one]
+ [indic-common]
+ [script=deva,
+ % basic shaping
+ rkrf=yes,
+ blwf=yes,
+ half=yes,
+ vatu=yes,
+ cjct=yes]
+
+\definefontfeature
+ [bengali-one]
+ [indic-common]
+ [script=beng,
+ % basic shaping
+ blwf=yes,
+ half=yes,
+ pstf=yes,
+ vatu=yes,
+ cjct=yes,
+ % presentation
+ init=yes]
+
+\definefontfeature
+ [gujarati-one]
+ [indic-common]
+ [script=gujr,
+ % basic shaping
+ rkrf=yes,
+ blwf=yes,
+ half=yes,
+ vatu=yes,
+ cjct=yes]
+
+\definefontfeature
+ [gurmukhi-one]
+ [indic-common]
+ [script=guru,
+ % basic shaping
+ blwf=yes,
+ half=yes,
+ pstf=yes,
+ vatu=yes,
+ cjct=yes]
+
+\definefontfeature
+ [kannada-one]
+ [indic-common]
+ [script=knda,
+ % basic shaping
+ pref=yes,
+ blwf=yes,
+ half=yes,
+ pstf=yes,
+ cjct=yes]
+
+\definefontfeature
+ [malayalam-one]
+ [indic-common]
+ [script=mlym,
+ % basic shaping
+ pref=yes,
+ blwf=yes,
+ half=yes,
+ pstf=yes,
+ cjct=yes]
+
+\definefontfeature
+ [oriya-one]
+ [indic-common]
+ [script=orya,
+ % basic shaping
+ blwf=yes,
+ pstf=yes,
+ cjct=yes]
+
+\definefontfeature
+ [tamil-one]
+ [indic-common]
+ [script=taml,
+ % basic shaping
+ pref=yes,
+ half=yes]
+
+\definefontfeature
+ [telugu-one]
+ [indic-common]
+ [script=telu,
+ % basic shaping
+ pref=yes,
+ blwf=yes,
+ half=yes,
+ pstf=yes,
+ cjct=yes]
+
+\definefontfeature [devanagari-two] [devanagari-one] [script=dev2]
+\definefontfeature [bengali-two] [bengali-one] [script=bng2]
+\definefontfeature [gujarati-two] [gujarati-one] [script=gjr2]
+\definefontfeature [gurmukhi-two] [gurmukhi-one] [script=gur2]
+\definefontfeature [kannada-two] [kannada-one] [script=knd2]
+\definefontfeature [malayalam-two] [malayalam-one] [script=mlm2]
+\definefontfeature [oriya-two] [oriya-one] [script=ory2]
+\definefontfeature [tamil-two] [tamil-one] [script=tml2]
+\definefontfeature [telugu-two] [telugu-one] [script=tel2]
+
+% mongolian
+
+\definefontfeature
+ [mongolian]
+ [default]
+ [script=mong,
+ init=yes,medi=yes,fina=yes,isol=yes,
+ rlig=yes,rclt=yes,calt=yes,
+ %dlig=yes,cswh=yes, % optional
+ mset]
+
+% tibetan
+
+\definefontfeature
+ [tibetan]
+ [always]
+ [script=tibt,
+ language=dflt,
+ locl=yes,
+ ccmp=yes,
+ abvs=yes,
+ blws=yes,
+ calt=yes,
+ liga=yes,
+ abvm=yes,
+ blwm=yes]
+
+% cjk
+
+\definefontfeature
+ [jamoforms]
+ [ljmo=yes,
+ tjmo=yes,
+ vjmo=yes]
+
+% \definefontfeature
+% [japanese]
+% [default]
+% [language=jan]
+
+% \definefontfeature
+% [simplified-chinese]
+% [default]
+% [language=zhs]
+
+% \definefontfeature
+% [traditional-chinese]
+% [default]
+% [language=zht]
+
+% \definefontfeature
+% [chinese]
+% [simplified-chinese]
+
+% \definefontfeature
+% [korean]
+% [default]
+% [language=kor]
+
+% symbols:
+
+\definefontfeature
+ [dingbats]
+ [mode=base,
+ goodies=dingbats,
+ unicoding=yes]
+
+% math:
+
+\definefontfeature
+ [mathematics]
+ [mode=base,
+ % mode=none, % better, maybe do this last
+ kern=yes,
+ % liga=yes, % makes no sense
+ % tlig=yes, % makes no sense
+ % trep=yes, % makes no sense
+ mathnolimitsmode={0,800}, % this looks okay on the average font
+ mathalternates=yes,
+ mathitalics=yes, % we pass them
+ mathdimensions=all,
+ % mathkerns=yes,
+ % staircase=yes,
+ compactmath=yes,
+ % mathgaps=yes,
+ language=dflt,
+ script=math]
+
+\definefontfeature
+ [oldmath]
+ [oldmath=yes]
+
+\ifdefined\mathnolimitsmode
+ \mathnolimitsmode\plusone % font driven (only opentype)
+\fi
+
+\mathitalicsmode\plusone % 1 : add to simple noad
+%mathitalicsmode\plusthree % 2 : add italic kerns for diagnostics
+
+% \adaptfontfeature[*math*][mathnolimitsmode=1000] % only subscript
+
+\definefontfeature
+ [mathematics-l2r]
+ [mathematics]
+ []
+
+\definefontfeature
+ [mathematics-r2l]
+ [mathematics]
+ [rtlm=yes,
+ locl=yes]
+
+\definefontfeature[virtualmath] [mathematics]
+\definefontfeature[virtualmath-l2r] [mathematics-l2r]
+\definefontfeature[virtualmath-r2l] [mathematics-r2l]
+
+\definefontfeature[math-text] [mathematics] [ssty=no]
+\definefontfeature[math-script] [mathematics] [ssty=1,mathsize=yes]
+\definefontfeature[math-scriptscript] [mathematics] [ssty=2,mathsize=yes]
+
+\definefontfeature[math-text-l2r] [mathematics-l2r] [ssty=no]
+\definefontfeature[math-script-l2r] [mathematics-l2r] [ssty=1,mathsize=yes]
+\definefontfeature[math-scriptscript-l2r] [mathematics-l2r] [ssty=2,mathsize=yes]
+
+\definefontfeature[math-text-r2l] [mathematics-r2l] [ssty=no]
+\definefontfeature[math-script-r2l] [mathematics-r2l] [ssty=1,mathsize=yes]
+\definefontfeature[math-scriptscript-r2l] [mathematics-r2l] [ssty=2,mathsize=yes]
+
+% this will go away: could be a mode in the engine
+
+\definefontfeature[math-nostack-text] [math-text] [nostackmath=yes]
+\definefontfeature[math-nostack-script] [math-script] [nostackmath=yes]
+\definefontfeature[math-nostack-scriptscript][math-scriptscript][nostackmath=yes]
+
+% \definefontfeature[mathtext] [math-text]
+% \definefontfeature[mathscript] [math-script]
+% \definefontfeature[mathscriptscript] [math-scriptscript]
+
+% \definefontfeature
+% [missing]
+% [missing=yes]
+
+%D Nice to have too:
+
+\definefontfeature
+ [quality]
+ [expansion=quality,
+ protrusion=quality]
+
+\definefontfeature
+ [fullprotrusion]
+ [protrusion=pure]
+
+\definefontfeature
+ [slanted]
+ [slant=.2]
+
+% \definefontfeature
+% [boldened]
+% [extend=1.2]
+
+%D Neat:
+
+% By eye:
+%
+% \definefontfeature[boldened-10][effect={width=0.10,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.125,extend=1.025,squeeze=0.99250}]
+% \definefontfeature[boldened-15][effect={width=0.15,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.250,extend=1.050,squeeze=0.98750}]
+% \definefontfeature[boldened-20][effect={width=0.20,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.375,extend=1.075,squeeze=0.98125}]
+% \definefontfeature[boldened-30][effect={width=0.30,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.500,extend=1.100,squeeze=0.97500}]
+%
+% By calculation:
+%
+% \definefontfeature[boldened-10][effect={width=0.10,delta=1.0,hdelta=0.02500,ddelta=0.02500,vshift=0.02500,extend=1.050,squeeze=0.99500}]
+% \definefontfeature[boldened-15][effect={width=0.15,delta=1.0,hdelta=0.05625,ddelta=0.05625,vshift=0.05625,extend=1.075,squeeze=0.99250}]
+% \definefontfeature[boldened-20][effect={width=0.20,delta=1.0,hdelta=0.10000,ddelta=0.10000,vshift=0.10000,extend=1.100,squeeze=0.99000}]
+% \definefontfeature[boldened-30][effect={width=0.30,delta=1.0,hdelta=0.22500,ddelta=0.22500,vshift=0.22500,extend=1.150,squeeze=0.98500}]
+%
+% So we can do this:
+
+\definefontfeature[boldened-10][effect={width=0.10,auto=yes}]
+\definefontfeature[boldened-15][effect={width=0.15,auto=yes}]
+\definefontfeature[boldened-20][effect={width=0.20,auto=yes}]
+\definefontfeature[boldened-25][effect={width=0.25,auto=yes}]
+\definefontfeature[boldened-30][effect={width=0.30,auto=yes}]
+
+\definefontfeature
+ [boldened]
+ [boldened-30]
+
+%D Emoji etc:
+
+\definefontfeature[bandw:overlay][ccmp=yes,dist=yes]
+\definefontfeature[color:overlay][ccmp=yes,dist=yes,colr=yes]
+%definefontfeature[bandw:svg] [ccmp=yes,dist=yes]
+\definefontfeature[color:svg] [ccmp=yes,dist=yes,svg=yes]
+%definefontfeature[bandw:bitmap] [ccmp=yes,dist=yes,sbix=yes]
+\definefontfeature[color:bitmap] [ccmp=yes,dist=yes,sbix=yes] % also cblc
+
+% Plus an automatic one:
+
+\definefontfeature[color] [ccmp=yes,dist=yes,color=auto]
+
+%D We define some colors that are used in tracing (for instance \OPENTYPE\
+%D features). We cannot yet inherit because no colors are predefined.
+
+\definecolor[font:init][r=.75]
+\definecolor[font:medi][g=.75]
+\definecolor[font:fina][b=.75]
+\definecolor[font:isol][r=.75,g=.75] % [y=.75]
+\definecolor[font:mark][r=.75,b=.75] % [m=.75]
+\definecolor[font:rest][b=.75,g=.75] % [c=.75]
+
+\definecolor[font:0] [s=1]
+\definecolor[font:1] [r=.75]
+\definecolor[font:2] [g=.75]
+\definecolor[font:3] [b=.75]
+\definecolor[font:4] [r=.75,g=.75]
+\definecolor[font:5] [r=.75,b=.75]
+\definecolor[font:6] [b=.75,g=.75]
+\definecolor[font:7] [r=.75]
+\definecolor[font:8] [g=.75]
+\definecolor[font:9] [b=.75]
+
+\definecolor[f:r:t][a=1,t=.25,r=1]
+\definecolor[f:g:t][a=1,t=.25,g=1]
+\definecolor[f:b:t][a=1,t=.25,b=1]
+\definecolor[f:c:t][a=1,t=.25,c=1]
+\definecolor[f:m:t][a=1,t=.25,m=1]
+\definecolor[f:y:t][a=1,t=.25,y=1]
+\definecolor[f:k:t][a=1,t=.25,s=0]
+\definecolor[f:s:t][a=1,t=.25,s=0]
+
+\definepalet % weird place
+ [layout]
+ [grid=trace:dr,
+ page=trace:dg,
+ profile=f:s:t,
+ one=f:y:t,
+ mix=f:b:t]
+
+%D Now we're up to some definitions.
+
+\definebodyfontenvironment
+ [\s!default]
+ [ \s!text=1.0,
+ \s!script=0.7,
+ \s!scriptscript=0.5,
+ \s!a=1.200,
+ \s!b=1.440,
+ \s!c=1.728,
+ \s!d=2.074,
+ *=\font_currentfontscale, % wildcard
+ \s!x=0.8,
+ \s!xx=0.6,
+ \v!big=1.2,
+ \v!small=0.8,
+ \c!interlinespace=,
+ \s!em=\v!slanted]
+
+\definebodyfontenvironment
+ [20.7pt]
+ [ \s!text=20.7pt,
+ \s!script=\!!fourteenpointfour,
+ \s!scriptscript=\!!twelvepoint,
+ \s!x=17.3pt,
+ \s!xx=\!!fourteenpointfour,
+ \v!big=20.7pt, % !!!!
+ \v!small=17.3pt]
+
+\definebodyfontenvironment
+ [17.3pt]
+ [ \s!text=17.3pt,
+ \s!script=\!!twelvepoint,
+ \s!scriptscript=\!!tenpoint,
+ \s!x=\!!fourteenpointfour,
+ \s!xx=\!!twelvepoint,
+ \v!big=20.7pt,
+ \v!small=\!!fourteenpointfour]
+
+\definebodyfontenvironment
+ [\!!fourteenpointfour]
+ [ \s!text=\!!fourteenpointfour,
+ \s!script=\!!elevenpoint,
+ \s!scriptscript=\!!ninepoint,
+ \s!x=\!!twelvepoint,
+ \s!xx=\!!tenpoint,
+ \v!big=17.3pt,
+ \v!small=\!!twelvepoint]
+
+\definebodyfontenvironment
+ [\!!twelvepoint]
+ [ \s!text=\!!twelvepoint,
+ \s!script=\!!ninepoint,
+ \s!scriptscript=\!!sevenpoint,
+ \s!x=\!!tenpoint,
+ \s!xx=\!!eightpoint,
+ \v!big=\!!fourteenpointfour,
+ \v!small=\!!tenpoint]
+
+\definebodyfontenvironment
+ [\!!elevenpoint]
+ [ \s!text=\!!elevenpoint,
+ \s!script=\!!eightpoint,
+ \s!scriptscript=\!!sixpoint,
+ \s!x=\!!ninepoint,
+ \s!xx=\!!sevenpoint,
+ \v!big=\!!twelvepoint,
+ \v!small=\!!ninepoint]
+
+\definebodyfontenvironment
+ [\!!tenpoint]
+ [ \s!text=\!!tenpoint,
+ \s!script=\!!sevenpoint,
+ \s!scriptscript=\!!fivepoint,
+ \s!x=\!!eightpoint,
+ \s!xx=\!!sixpoint,
+ \v!big=\!!twelvepoint,
+ \v!small=\!!eightpoint]
+
+\definebodyfontenvironment
+ [\!!ninepoint]
+ [ \s!text=\!!ninepoint,
+ \s!script=\!!sevenpoint,
+ \s!scriptscript=\!!fivepoint,
+ \s!x=\!!sevenpoint,
+ \s!xx=\!!fivepoint,
+ \v!big=\!!elevenpoint,
+ \v!small=\!!sevenpoint]
+
+\definebodyfontenvironment
+ [\!!eightpoint]
+ [ \s!text=\!!eightpoint,
+ \s!script=\!!sixpoint,
+ \s!scriptscript=\!!fivepoint,
+ \s!x=\!!sixpoint,
+ \s!xx=\!!fivepoint,
+ \v!big=\!!tenpoint,
+ \v!small=\!!sixpoint]
+
+\definebodyfontenvironment
+ [\!!sevenpoint]
+ [ \s!text=\!!sevenpoint,
+ \s!script=\!!sixpoint,
+ \s!scriptscript=\!!fivepoint,
+ \s!x=\!!sixpoint,
+ \s!xx=\!!fivepoint,
+ \v!big=\!!ninepoint,
+ \v!small=\!!fivepoint]
+
+\definebodyfontenvironment
+ [\!!sixpoint]
+ [ \s!text=\!!sixpoint,
+ \s!script=\!!fivepoint,
+ \s!scriptscript=\!!fivepoint,
+ \s!x=\!!fivepoint,
+ \s!xx=\!!fivepoint,
+ \v!big=\!!eightpoint,
+ \v!small=\!!fivepoint]
+
+\definebodyfontenvironment
+ [\!!fivepoint]
+ [ \s!text=\!!fivepoint,
+ \s!script=\!!fivepoint,
+ \s!scriptscript=\!!fivepoint,
+ \s!x=\!!fivepoint,
+ \s!xx=\!!fivepoint,
+ \v!big=\!!sevenpoint,
+ \v!small=\!!fivepoint]
+
+\definebodyfontenvironment
+ [\!!fourpoint]
+ [ \s!text=\!!fourpoint,
+ \s!script=\!!fourpoint,
+ \s!scriptscript=\!!fourpoint,
+ \s!x=\!!fourpoint,
+ \s!xx=\!!fourpoint,
+ \v!big=\!!sixpoint,
+ \v!small=\!!fourpoint]
+
+\definebodyfontswitch [fourteenpointfour] [\!!fourteenpointfour]
+\definebodyfontswitch [twelvepoint] [\!!twelvepoint]
+\definebodyfontswitch [elevenpoint] [\!!elevenpoint]
+\definebodyfontswitch [tenpoint] [\!!tenpoint]
+\definebodyfontswitch [ninepoint] [\!!ninepoint]
+\definebodyfontswitch [eightpoint] [\!!eightpoint]
+\definebodyfontswitch [sevenpoint] [\!!sevenpoint]
+\definebodyfontswitch [sixpoint] [\!!sixpoint]
+\definebodyfontswitch [fivepoint] [\!!fivepoint]
+\definebodyfontswitch [fourpoint] [\!!fourpoint]
+
+%D So far.
+
+\definefontstyle [\s!hw] [\s!hw]
+\definefontstyle [\s!cg] [\s!cg]
+
+\definefontstyle [\v!roman,\v!serif,\v!regular] [\s!rm]
+\definefontstyle [\v!sansserif,\v!sans,\v!support] [\s!ss]
+\definefontstyle [\v!teletype,\v!type,\v!mono] [\s!tt]
+\definefontstyle [\v!handwritten] [\s!hw]
+\definefontstyle [\v!calligraphic] [\s!cg]
+\definefontstyle [\v!math,\v!mathematics] [\s!mm]
+
+\definefontalternative[\s!tf]
+\definefontalternative[\s!bf]
+\definefontalternative[\s!it]
+\definefontalternative[\s!sl]
+\definefontalternative[\s!bs]
+\definefontalternative[\s!bi]
+\definefontalternative[\s!sc]
+
+\definefontsize[\s!a] \definefontsize[\s!b]
+\definefontsize[\s!c] \definefontsize[\s!d]
+
+\definealternativestyle [\v!mediaeval] [\os] []
+\definealternativestyle [\v!normal] [\tf] []
+\definealternativestyle [\v!bold] [\bf] []
+\definealternativestyle [\v!type] [\tt] []
+\definealternativestyle [\v!mono] [\tt] []
+\definealternativestyle [\v!slanted] [\sl] []
+\definealternativestyle [\v!italic] [\it] []
+\definealternativestyle [\v!boldslanted,\v!slantedbold] [\bs] []
+\definealternativestyle [\v!bolditalic,\v!italicbold] [\bi] []
+
+\definealternativestyle [\v!small,\v!smallnormal] [\setsmallbodyfont\tf] []
+\definealternativestyle [\v!smallbold] [\setsmallbodyfont\bf] []
+\definealternativestyle [\v!smalltype] [\setsmallbodyfont\tt] []
+\definealternativestyle [\v!smallitalic,\v!smallslanted] [\setsmallbodyfont\sl] []
+\definealternativestyle [\v!smallboldslanted,\v!smallslantedbold] [\setsmallbodyfont\bs] []
+\definealternativestyle [\v!smallbolditalic,\v!smallitalicbold] [\setsmallbodyfont\bi] []
+
+\definealternativestyle [\v!bigger] [\setbigbodyfont \tf] []
+\definealternativestyle [\v!smaller] [\setsmallbodyfont\tf] []
+
+\definealternativestyle [\v!sans,\v!sansserif] [\ss]
+\definealternativestyle [\v!roman,\v!serif,\v!regular] [\rm]
+\definealternativestyle [\v!handwritten] [\hw]
+\definealternativestyle [\v!calligraphic] [\cg]
+
+\definealternativestyle [\v!sansnormal] [\ss\tf] []
+\definealternativestyle [\v!sansbold] [\ss\bf] []
+\definealternativestyle [\v!serifnormal] [\rm\tf] []
+\definealternativestyle [\v!serifbold] [\rm\bf] []
+\definealternativestyle [\v!mononormal] [\tt\tf] []
+\definealternativestyle [\v!monobold] [\tt\bf] []
+
+\definealternativestyle [typeface] [\typeface] [] % no translation here (quite basic)
+\definealternativestyle [boldface] [\boldface] []
+\definealternativestyle [slantedface] [\slantedface] []
+\definealternativestyle [italicface] [\italicface] []
+\definealternativestyle [swapface] [\swapface] []
+
+\definealternativestyle [emphasize] [\em] [\em] % new
+
+% For Alan:
+
+\definealternativestyle
+ [\v!camel]
+ [{\setcharactercasing[\v!camel]}]
+ [{\setcharactercasing[\v!camel]}]
+
+% % maybe we need interface neutral as well (for use in cld):
+%
+% \letcscsname\mediaeval \csname\v!mediaeval \endcsname
+% \letcscsname\normal \csname\v!normal \endcsname
+% \letcscsname\bold \csname\v!bold \endcsname
+% \letcscsname\mono \csname\v!mono \endcsname
+% \letcscsname\slanted \csname\v!slanted \endcsname
+% \letcscsname\italic \csname\v!italic \endcsname
+% \letcscsname\boldslanted \csname\v!boldslanted \endcsname
+% \letcscsname\slantedbold \csname\v!slantedbold \endcsname
+% \letcscsname\bolditalic \csname\v!bolditalic \endcsname
+% \letcscsname\italicbold \csname\v!italicbold \endcsname
+%
+% \letcscsname\small \csname\v!small \endcsname
+% \letcscsname\smallnormal \csname\v!smallnormal \endcsname
+% \letcscsname\smallbold \csname\v!smallbold \endcsname
+% \letcscsname\smalltype \csname\v!smalltype \endcsname
+% \letcscsname\smallslanted \csname\v!smallslanted \endcsname
+% \letcscsname\smallboldslanted\csname\v!smallboldslanted\endcsname
+% \letcscsname\smallslantedbold\csname\v!smallslantedbold\endcsname
+% \letcscsname\smallbolditalic \csname\v!smallbolditalic \endcsname
+% \letcscsname\smallitalicbold \csname\v!smallitalicbold \endcsname
+%
+% \letcscsname\bigger \csname\v!bigger \endcsname
+% \letcscsname\smaller \csname\v!smaller \endcsname
+%
+% \letcscsname\sans \csname\v!sans \endcsname
+% \letcscsname\sansserif \csname\v!sansserif \endcsname
+% \letcscsname\sansbold \csname\v!sansbold \endcsname
+
+%D We can go on and on and on:
+%D
+%D \starttyping
+%D \setupbodyfontenvironment[default][p=0.8,q=0.6]
+%D \definefontsize[p]
+%D \definefontsize[q]
+%D \stoptyping
+
+%D Slow but handy:
+
+\definealternativestyle [\v!smallbodyfont] [\setsmallbodyfont] []
+\definealternativestyle [\v!bigbodyfont] [\setbigbodyfont] []
+
+%D We treat {\sc Small Caps} and \cap {Pseudo Caps} a bit different. We also provide
+%D an \WORD {uppercase} style.
+
+\definealternativestyle [\v!WORD] [{\setcharactercasing[\v!WORD ]}] [{\setcharactercasing[\v!WORD ]}]
+\definealternativestyle [\v!word] [{\setcharactercasing[\v!word ]}] [{\setcharactercasing[\v!word ]}]
+\definealternativestyle [\v!Word] [{\setcharactercasing[\v!Word ]}] [{\setcharactercasing[\v!Word ]}]
+\definealternativestyle [\v!Words] [{\setcharactercasing[\v!Words ]}] [{\setcharactercasing[\v!Words ]}]
+\definealternativestyle [\v!capital] [{\setcharactercasing[\v!capital]}] [{\setcharactercasing[\v!capital]}]
+\definealternativestyle [\v!Capital] [{\setcharactercasing[\v!Capital]}] [{\setcharactercasing[\v!Capital]}]
+\definealternativestyle [\v!mixed] [{\setcharactercasing[\v!mixed ]}] [{\setcharactercasing[\v!mixed ]}]
+
+\definealternativestyle [\v!cap] [{\setcharactercasing[\v!cap ]}] [{\setcharactercasing[\v!cap ]}]
+\definealternativestyle [\v!Cap] [{\setcharactercasing[\v!Cap ]}] [{\setcharactercasing[\v!Cap ]}]
+
+%D From now (2013-03-17) on we have:
+
+\definefontfeature[f:smallcaps][smcp=yes]
+\definefontfeature[f:oldstyle] [onum=yes]
+\definefontfeature[f:tabular] [tnum=yes]
+\definefontfeature[f:superiors][sups=yes]
+\definefontfeature[f:inferiors][subs=yes]
+\definefontfeature[f:fractions][frac=yes]
+\definefontfeature[f:kern] [kern=yes]
+\definefontfeature[f:kerns] [kern=yes]
+
+\definealternativestyle [\v!smallcaps] [\setsmallcaps] [\setsmallcaps]
+\definealternativestyle [\v!oldstyle] [\setoldstyle ] [\setoldstyle ]
+\definealternativestyle [\v!fractions] [\setfractions\resetbreakpoints] [\setfractions\resetbreakpoints]
+
+\permanent\protected\def\setsmallcaps{\doaddfeature{f:smallcaps}}
+\permanent\protected\def\setoldstyle {\doaddfeature{f:oldstyle}}
+\permanent\protected\def\settabular {\doaddfeature{f:tabular}}
+\permanent\protected\def\setsuperiors{\doaddfeature{f:superiors}}
+\permanent\protected\def\setfractions{\doaddfeature{f:fractions}}
+
+% \permanent\protected\def\frc#1#2%
+% {\dontleavehmode
+% \begingroup
+% \addff{frac}%
+% \resetbreakpoints
+% #1/#2%
+% \endgroup}
+
+%D \macros
+%D {uppercasing, lowercasing}
+
+\definefontfeature[lowercasing][lowercasing=yes]
+\definefontfeature[uppercasing][uppercasing=yes]
+
+\permanent\protected\def\uppercasing{\addff{uppercasing}}
+\permanent\protected\def\lowercasing{\addff{lowercasing}}
+
+%D \macros
+%D {tinyfont}
+%D
+%D By default we load the Computer Modern Roman fonts (but not yet at this moment)
+%D and activate the 12pt roman bodyfont. Sans serif and teletype are also available
+%D and can be called for by \type {\ss} and \type {\tt}. Loading takes place
+%D elsewhere. For tracing purposes we define:
+
+\definefont[tinyfont][file:dejavusansmono at 1ex]
+
+%D \macros
+%D {infofont}
+%D
+%D The second situation occurs when we enable the info mode, and put all kind of
+%D status information in the margin. We don't want huge switches to the main
+%D bodyfont and style, so here too we use a direct method.
+
+\pushoverloadmode
+
+\let\infofont \relax
+\let\infofontbold \relax
+\let\smallinfofont \relax
+\let\smallinfofontbold\relax
+
+\definefont[infofont] [file:dejavusansmono*none at 6pt]
+\definefont[infofontbold] [file:dejavusansmono-bold*none at 6pt]
+\definefont[smallinfofont] [file:dejavusansmono*none at 3pt]
+\definefont[smallinfofontbold][file:dejavusansmono-bold*none at 3pt]
+
+%D Optimization (later we overload in math). Also needed in order to get \type {\ss}
+%D properly defined.
+
+\permanent\protected\def\normaltf{\let\fontalternative\s!tf\font_helpers_synchronize_font}
+\permanent\protected\def\normalbf{\let\fontalternative\s!bf\font_helpers_synchronize_font}
+\permanent\protected\def\normalit{\let\fontalternative\s!it\font_helpers_synchronize_font}
+\permanent\protected\def\normalsl{\let\fontalternative\s!sl\font_helpers_synchronize_font}
+\permanent\protected\def\normalbi{\let\fontalternative\s!bi\font_helpers_synchronize_font}
+\permanent\protected\def\normalbs{\let\fontalternative\s!bs\font_helpers_synchronize_font}
+
+\let\tf\normaltf
+\let\bf\normalbf
+\let\it\normalit
+\let\sl\normalsl
+\let\bi\normalbi
+\let\bs\normalbs
+
+\permanent\protected\def\normalrm{\font_helpers_set_current_font_style{\s!rm}}
+\permanent\protected\def\normalss{\font_helpers_set_current_font_style{\s!ss}}
+\permanent\protected\def\normaltt{\font_helpers_set_current_font_style{\s!tt}}
+
+\let\rm\normalrm
+\let\ss\normalss
+\let\tt\normaltt
+
+\popoverloadmode
+
+% experiment:
+
+\startsetups experiment:fonts:compact
+ \settrue\c_font_compact
+
+% \definefontfeature[virtualmath] [mathematics] [compactmath=yes]
+% \definefontfeature[virtualmath-l2r] [mathematics-l2r][compactmath=yes]
+% \definefontfeature[virtualmath-r2l] [mathematics-r2l][compactmath=yes]
+
+% \definefontfeature[math-text] [mathematics] [compactmath=yes]
+% \definefontfeature[math-script] [mathematics] [compactmath=yes]
+% \definefontfeature[math-scriptscript] [mathematics] [compactmath=yes]
+% \definefontfeature[math-text-l2r] [mathematics-l2r][compactmath=yes]
+% \definefontfeature[math-script-l2r] [mathematics-l2r][compactmath=yes]
+% \definefontfeature[math-scriptscript-l2r][mathematics-l2r][compactmath=yes]
+% \definefontfeature[math-text-r2l] [mathematics-r2l][compactmath=yes]
+% \definefontfeature[math-script-r2l] [mathematics-r2l][compactmath=yes]
+% \definefontfeature[math-scriptscript-r2l][mathematics-r2l][compactmath=yes]
+\stopsetups
+
+\installtexexperiment
+ {fonts.compact}
+ {\directsetup{experiment:fonts:compact}}
+ {}
+
+\protect \endinput
+
+% LM math vs CM math (analysis by Taco):
+%
+% Computer Modern Roman : Donald Knuth
+% Latin Modern : LM Font Revision Team
+%
+% lmex10.tfm % identical
+% lmmi5.tfm % identical
+% lmmi6.tfm % identical
+% lmmi7.tfm % identical
+% lmmi8.tfm % identical
+% lmmi9.tfm % identical
+% lmmi10.tfm % identical
+% lmmi12.tfm % identical
+% lmmib10.tfm % identical
+% lmsy5.tfm % extra chars: 254,255 (octal)
+% lmsy6.tfm % extra chars: 254,255 (octal)
+% lmsy7.tfm % extra chars: 254,255 (octal)
+% lmsy8.tfm % extra chars: 254,255 (octal)
+% lmsy9.tfm % extra chars: 254,255 (octal)
+% lmsy10.tfm % extra chars: 254,255 (octal)
+% lmbsy10.tfm % extra chars: 254,255 (octal)
+%
+% From the 'AMS' set:
+%
+% lmmib5.tfm % identical
+% lmmib7.tfm % identical
+% lmbsy5.tfm % extra chars: 254,255 (octal)
+% lmbsy7.tfm % extra chars: 254,255 (octal)
+%
+% The two extra characters are:
+%
+% /lessorequalslant
+% /greaterorequalslant
+
+% \unprotect
+%
+% \definehighlight[\v!italic ][\c!command=\v!no,\c!style=\v!italic]
+% \definehighlight[\v!bold ][\c!command=\v!no,\c!style=\v!bold]
+% \definehighlight[\v!bolditalic][\c!command=\v!no,\c!style=\v!bolditalic]
+% \definehighlight[\v!mono] [\c!command=\v!no,\c!style=\v!mono]
+% \definehighlight[\v!monobold] [\c!command=\v!no,\c!style=\v!monobold]
+%
+% \definehighlight[important] [\c!command=\v!no,\c!style=\v!bold]
+% \definehighlight[unimportant] [\c!command=\v!no,\c!color=darkgray]
+% \definehighlight[warning] [\c!command=\v!no,\c!style=\v!bold,\c!color=darkblue]
+% \definehighlight[error] [\c!command=\v!no,\c!style=\v!bold,\c!color=darkred]
+%
+% \protect
+%
+% \starttext
+% \highlight[italic] {italic}
+% \highlight[bolditalic] {bolditalic}
+% \highlight[bold] {bold}
+% \highlight[mono] {mono}
+% \highlight[monobold] {monobold}
+% \highlight[important] {important}
+% \highlight[unimportant]{unimportant}
+% \highlight[warning] {warning}
+% \highlight[error] {error}
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-sel.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-sel.mklx
new file mode 100644
index 00000000000..a25b7fab7c5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-sel.mklx
@@ -0,0 +1,282 @@
+%D \module
+%D [ file=font-sel,
+%D version=2016.08.28,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Selectfont,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D license=GNU General Public License]
+
+\writestatus{loading}{ConTeXt User Module / Selectfont}
+
+\registerctxluafile{font-sel}{}
+
+\unprotect
+
+\installcorenamespace {selectfont}
+\installsimplecommandhandler \??selectfont {selectfont}
+
+\let\selectfont_index\!!zerocount
+
+\protected\def\selectfont_register[#style][#settings]%
+ {\begingroup
+ \edef\currentselectfont{\expandnamespacevalue\??fontshortstyle{#style}\s!rm}%
+ \checkselectfontparent
+ \setupcurrentselectfont[#settings]%
+ \edef\p_selectfont_preset{\selectfontparameter\c!preset}%
+ \ifempty\p_selectfont_preset \else
+ \processcommacommand[\p_selectfont_preset]\selectfont_preset_process
+ \setupcurrentselectfont[#settings]%
+ \fi
+ \font_helpers_process_alternative_list\clf_registerfontalternative
+ \setexpandedselectfontparameter\c!style{\expandnamespaceparameter\??fontshortstyle\selectfontparameter\c!style\s!rm}%
+ \xdef\selectfont_index{\clf_registerfontfamily
+ metadata {%
+ typeface {\selectfontparameter\c!label}%
+ style {\selectfontparameter\c!style}%
+ family {\selectfontparameter\c!name}%
+ }
+ options {%
+ designsize {\selectfontparameter\s!designsize}%
+ rscale {\selectfontparameter\s!rscale}%
+ goodies {\selectfontparameter\c!goodies}%
+ extras {\selectfontparameter\c!extras}%
+ features {\selectfontparameter\c!features}%
+ preset {\selectfontparameter\c!preset}%
+ range {\selectfontparameter\c!range}% fallback only
+ offset {\selectfontparameter\c!offset}% fallback only
+ check {\selectfontparameter\c!check}% fallback only
+ force {\selectfontparameter\c!force}% fallback only
+ }
+ userdata {%
+ \luaexpanded{#settings}%
+ }}%
+ \endgroup}
+
+%D \macros
+%D {definefontfamilypreset}
+
+\installcorenamespace {selectfontpreset}
+
+\permanent\tolerant\protected\def\definefontfamilypreset[#name]#spacer[#settings]%
+ {\defcsname\??selectfontpreset#name\endcsname{\setupcurrentselectfont[#settings]}%
+ \clf_definefontfamilypreset{#name}{\luaexpanded{#settings}}}
+
+\def\selectfont_preset_process#name%
+ {\ifcsname\??selectfontpreset#name\endcsname
+ \lastnamedcs
+ \else
+ % unknown preset
+ \fi}
+
+\definefontfamilypreset
+ [range:chinese]
+ [\c!range={cjkcompatibilityforms,
+ cjkcompatibilityideographs,
+ cjkcompatibilityideographssupplement,
+ cjkradicalssupplement,
+ cjkstrokes,
+ cjksymbolsandpunctuation,
+ cjkunifiedideographs,
+ cjkunifiedideographsextensiona,
+ cjkunifiedideographsextensionb,
+ halfwidthandfullwidthforms,
+ verticalforms,
+ bopomofo,
+ bopomofoextended}]
+
+\definefontfamilypreset
+ [range:japanese]
+ [\c!range={cjkcompatibilityforms,
+ cjkcompatibilityideographs,
+ cjkcompatibilityideographssupplement,
+ cjkradicalssupplement,
+ cjkstrokes,
+ cjksymbolsandpunctuation,
+ cjkunifiedideographs,
+ cjkunifiedideographsextensiona,
+ cjkunifiedideographsextensionb,
+ halfwidthandfullwidthforms,
+ verticalforms,
+ hiragana,
+ katakana}]
+
+\definefontfamilypreset
+ [range:korean]
+ [\c!range={cjkcompatibilityforms,
+ cjkcompatibilityideographs,
+ cjkcompatibilityideographssupplement,
+ cjkradicalssupplement,
+ cjkstrokes,
+ cjksymbolsandpunctuation,
+ cjkunifiedideographs,
+ cjkunifiedideographsextensiona,
+ cjkunifiedideographsextensionb,
+ halfwidthandfullwidthforms,
+ verticalforms,
+ hangulcompatibilityjamo,
+ hanguljamo,
+ hanguljamoextendeda,
+ hanguljamoextendedb,
+ hangulsyllables}]
+
+\definefontfamilypreset
+ [range:cyrillic]
+ [\c!range={cyrillic,
+ cyrillicextendeda,
+ cyrillicextendedb,
+ cyrillicsupplement}]
+
+\definefontfamilypreset
+ [range:greek]
+ [\c!range={greekandcoptic,
+ greekextended,
+ ancientgreeknumbers}]
+
+\definefontfamilypreset
+ [range:hebrew]
+ [\c!range={hebrew,
+ alphabeticpresentationforms}]
+
+\definefontfamilypreset [math:digitsnormal] [\c!range=digitsnormal]
+\definefontfamilypreset [math:digitsbold] [\c!range=digitsnormal,\c!offset=digitsbold,\s!tf=style:bold]
+
+\definefontfamilypreset [math:uppercasenormal] [\c!range=uppercasenormal]
+\definefontfamilypreset [math:uppercaseitalic] [\c!range=uppercasenormal,\c!offset=uppercaseitalic, \s!tf=style:italic]
+\definefontfamilypreset [math:uppercasebold] [\c!range=uppercasenormal,\c!offset=uppercasebold, \s!tf=style:bold]
+\definefontfamilypreset [math:uppercasebolditalic] [\c!range=uppercasenormal,\c!offset=uppercasebolditalic,\s!tf=style:bolditalic]
+
+\definefontfamilypreset [math:lowercasenormal] [\c!range=lowercasenormal]
+\definefontfamilypreset [math:lowercaseitalic] [\c!range=lowercasenormal,\c!offset=lowercaseitalic, \s!tf=style:italic]
+\definefontfamilypreset [math:lowercasebold] [\c!range=lowercasenormal,\c!offset=lowercasebold, \s!tf=style:bold]
+\definefontfamilypreset [math:lowercasebolditalic] [\c!range=lowercasenormal,\c!offset=lowercasebolditalic,\s!tf=style:bolditalic]
+
+\definefontfamilypreset [math:mathematicaloperators] [\c!range=mathematicaloperators]
+
+\definefontfamilypreset [math:lowercasegreeknormal] [\c!range=lowercasegreeknormal]
+\definefontfamilypreset [math:lowercasegreekitalic] [\c!range=lowercasegreeknormal,\c!offset=lowercasegreekitalic, \s!tf=style:italic]
+\definefontfamilypreset [math:lowercasegreekbold] [\c!range=lowercasegreeknormal,\c!offset=lowercasegreekbold, \s!tf=style:bold]
+\definefontfamilypreset [math:lowercasegreekbolditalic] [\c!range=lowercasegreeknormal,\c!offset=lowercasegreekbolditalic,\s!tf=style:bolditalic]
+
+\definefontfamilypreset [math:uppercasegreeknormal] [\c!range=uppercasegreeknormal]
+\definefontfamilypreset [math:uppercasegreekitalic] [\c!range=uppercasegreeknormal,\c!offset=uppercasegreekitalic, \s!tf=style:italic]
+\definefontfamilypreset [math:uppercasegreekbold] [\c!range=uppercasegreeknormal,\c!offset=uppercasegreekbold, \s!tf=style:bold]
+\definefontfamilypreset [math:uppercasegreekbolditalic] [\c!range=uppercasegreeknormal,\c!offset=uppercasegreekbolditalic,\s!tf=style:bolditalic]
+
+%D \macros
+%D {definefontfamily,definefallbackfamily}
+%D
+%D The \tex{definefontfamily} creates like \tex{definetypeface} a collection of font
+%D with different styles which can be later called with the \tex{setupbodyfont} command.
+%D
+%D The command takes three mandatory commands which are (a) the name of the fontclass,
+%D (b) the styles of the font and (c) the name of the font.
+%D
+%D \starttyping
+%D \definefontfamily [dejavu] [serif] [DejaVu Serif]
+%D \definefontfamily [dejavu] [sans] [DejaVu Sans]
+%D \definefontfamily [dejavu] [mono] [DejaVu Sans Mono]
+%D \definefontfamily [dejavu] [math] [XITS Math] [rscale=1.1]
+%D
+%D \definefontfamily [office] [serif] [Times New Roman]
+%D \definefontfamily [office] [sans] [Arial] [rscale=0.9]
+%D \definefontfamily [office] [mono] [Courier]
+%D \definefontfamily [office] [math] [TeX Gyre Termes Math]
+%D
+%D \definefontfamily [linux] [serif] [Linux Libertine O]
+%D \definefontfamily [linux] [sans] [Linux Biolinum O]
+%D \definefontfamily [linux] [mono] [Latin Modern Mono]
+%D \definefontfamily [linux] [math] [TeX Gyre Pagella Math] [rscale=0.9]
+%D
+%D \setupbodyfont[dejavu]
+%D
+%D \starttext
+%D
+%D \rm Serif \ss Sans \tt Mono \m{1+2=3}
+%D
+%D \switchtobodyfont[office]
+%D
+%D \rm Serif 123 \ss Sans \tt Mono \m{1+2=3}
+%D
+%D \switchtobodyfont[linux]
+%D
+%D \rm Serif 123 \ss Sans \tt Mono \m{1+2=3}
+%D
+%D \stoptext
+%D \stoptyping
+%D
+%D When a document contains different languages and the global font lacks some characters
+%D for one language, one could set a different font where these charcters are taken from.
+%D This fallback font (there can be more than one for a certain style) could be set with
+%D the \tex{definefallbackfamily} command which takes the same argument as
+%D the \tex{definefontfamily} command.
+%D
+%D \starttyping
+%D \definefallbackfamily [mainface] [serif] [DejaVu Serif] [range=cyrillic]
+%D \definefontfamily [mainface] [serif] [TeX Gyre Pagella]
+%D
+%D \setupbodyfont[mainface]
+%D
+%D \setuplanguage[en][patterns={us,ru}]
+%D
+%D \starttext
+%D
+%D \input knuth
+%D
+%D Ð¢Ñ€Ð°Ð´Ð¸Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÑиÑтематика лишайников оказываетÑÑ Ð²Ð¾ многом уÑловна и
+%D
+%D \stoptext
+%D \stoptyping
+%D
+%D Another feature of the module is the \type{designsize} key which allows one to enable
+%D optical sizes when they are a feature of the requested font.
+%D
+%D \starttyping
+%D \definefontfamily[mainface][serif][Latin Modern Roman][designsize=auto]
+%D
+%D \setupbodyfont[mainface]
+%D
+%D \starttext
+%D \scale[width=\textwidth]{\switchtobodyfont [6pt]\tf Regular, \it Italic \bf Bold and \bi BoldItalic}
+%D \scale[width=\textwidth]{\switchtobodyfont [8pt]\tf Regular, \it Italic \bf Bold and \bi BoldItalic}
+%D \scale[width=\textwidth]{\switchtobodyfont [10pt]\tf Regular, \it Italic \bf Bold and \bi BoldItalic}
+%D \scale[width=\textwidth]{\switchtobodyfont [12pt]\tf Regular, \it Italic \bf Bold and \bi BoldItalic}
+%D \scale[width=\textwidth]{\switchtobodyfont[17.3pt]\tf Regular, \it Italic \bf Bold and \bi BoldItalic}
+%D \stoptext
+%D \stoptyping
+
+% tf = … | * … | name:… | name:* … | file:… | file:* … | style:medium
+
+\permanent\tolerant\protected\def\definefontfamily[#typeface]#spacer[#style]#spacer[#family]#spacer[#settings]%
+ {\ifhastok={#settings}%
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},#settings]%
+ \else
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},\c!preset={#settings}]%
+ \fi
+ \clf_definefontfamily\selectfont_index\relax}
+
+\permanent\tolerant\def\definefallbackfamily[#typeface]#spacer[#style]#spacer[#family]#spacer[#settings]%
+ {\ifhastok={#settings}%
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},#settings]%
+ \else
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},\c!preset={#settings}]%
+ \fi
+ \clf_definefallbackfamily\selectfont_index\relax}
+
+\permanent\tolerant\protected\def\setupfontfamily[#style]#spacer[#settings]%
+ {\ifparameter#settings\or
+ \edef\currentselectfont{\expandnamespacevalue\??fontshortstyle{#style}\s!rm}%
+ \setupcurrentselectfont[#settings]%
+ \else
+ \let\currentselectfont\empty
+ \setupcurrentselectfont[#style]%
+ \fi}
+
+\setupselectfont
+ [ \c!features=\s!default,
+ \s!designsize=\s!default,
+ \s!rscale=\selectfontparameter\c!scale,
+ \c!scale=1]
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-set.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-set.mklx
new file mode 100644
index 00000000000..fd6a2f1ff51
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-set.mklx
@@ -0,0 +1,158 @@
+%D \module
+%D [ file=font-set,
+%D version=2011.01.13, % (copied fron font-ini)
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Initial Loading,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Font Macros / Initial Loading}
+
+\unprotect
+
+%D Defining fonts using \type {\definebodyfont} takes time, so we prefer to
+%D predefine at least the Computer Modern Roman fonts. However, loading all those
+%D fonts at definition time would take both time and space. But even worse, once
+%D fonts are loaded into memory, their encoding vector is fixed, which is a handicap
+%D when we want to distribute the compact \type {fmt} files. So what we want to do
+%D is defining fonts in a way that postpones the loading. We accomplish this by only
+%D loading the fonts when we switch to another bodyfont size. Among the other
+%D alternatives, such as loading the font at the moment of activation and redefining
+%D the activation macro afterwards, this proved to be the most efficient
+%D alternative.
+%D
+%D The next few macros take care of the one exeption on this scheme. When at format
+%D generation time we load the default font file, the one that defines the Computer
+%D Modern Fonts, we don't want the fonts metrics to end up in the format file, so we
+%D temporary prohibit loading. This means that at runtime we have to load the
+%D default bodyfont size just before we start typesetting.
+
+% \enablemode[lmmath]
+
+\let\m_font_fallback_name\empty
+
+% keep as reference:
+%
+% \def\font_preloads_reset_nullfont % this is needed because some macro packages (tikz) misuse \nullfont
+% {\dorecurse\plusseven{\fontdimen\recurselevel\nullfont\zeropoint}% keep en eye on this as:
+% \clf_resetnullfont % in luatex 0.70 this will also do the previous
+% \glet\font_preloads_reset_nullfont\relax}
+
+\def\font_preload_check_mode
+ {\doifelsemode{lmmath}
+ {\def\m_font_fallback_name{modern-designsize-virtual}}% this will stay
+ {\def\m_font_fallback_name{modern-designsize}}% % this might become 'modern'
+ \glet\font_preload_check_mode\relax}
+
+\def\font_preload_default_fonts
+ {\font_preloads_reset
+ \font_preload_check_mode
+ \setupbodyfont[\m_font_fallback_name,\fontstyle,\fontbody]%
+ \showmessage\m!fonts6{fallback \m_font_fallback_name\space \fontstyle\normalspace\normalizedbodyfontsize}}
+
+\def\font_preload_default_fonts_mm
+ {\font_preload_check_mode
+ \writestatus\m!fonts{preloading \m_font_fallback_name\space (math)}%
+ \definetypeface[\fontclass][\s!mm][\s!math][\m_font_fallback_name][\s!default]%
+ \showmessage\m!fonts6{fallback \m_font_fallback_name\space mm \normalizedbodyfontsize}}
+
+\def\font_preload_default_fonts_tt
+ {\font_preload_check_mode
+ \writestatus\m!fonts{preloading \m_font_fallback_name\space (mono)}%
+ \definetypeface[\fontclass][\s!tt][\s!mono][\m_font_fallback_name][\s!default]%
+ \showmessage\m!fonts6{fallback \m_font_fallback_name\space tt \normalizedbodyfontsize}}
+
+\def\font_preloads_reset
+ {\glet\font_preload_default_fonts \relax
+ %\glet\font_preload_default_fonts_tt\relax
+ %\glet\font_preload_default_fonts_mm\relax
+ \glet\font_preloads_zero_stage \relax
+ \glet\font_preloads_first_stage \relax
+ \glet\font_preloads_second_stage \relax
+ %\glet\font_preloads_third_stage \relax
+ \global\everyhbox\emptytoks
+ \global\everyvbox\emptytoks
+ % old: \font_preloads_reset_nullfont, new:
+ \clf_resetnullfont}
+
+\appendtoks
+ \font_preloads_reset
+\to \everystartnotext
+
+\def\font_preloads_reset_checked
+ {\glet\font_preload_default_fonts_tt\relax
+ \glet\font_preload_default_fonts_mm\relax
+ \glet\font_preloads_third_stage \relax
+% \glet\font_preloads_fourth_stage \relax
+ }
+
+\def\font_preloads_zero_stage_indeed
+ {\definedfont[\s!file:lmmono10-regular sa 1]}
+
+\protected\def\font_preloads_zero_stage
+ {\writestatus\m!fonts{beware: no fonts are loaded yet, using 'lm mono' in box}%
+ \glet\font_preloads_zero_stage\font_preloads_zero_stage_indeed
+ \font_preloads_zero_stage}
+
+\protected\def\font_preloads_first_stage % % *nofonts -> *preloadfonts
+ {\doifelsemode{*preloadfonts}
+ {\font_preload_default_fonts
+ \writestatus\m!fonts{preloading latin modern fonts (first stage)}}
+ {\writestatus\m!fonts{latin modern fonts are not preloaded}}}
+
+\protected\def\font_preloads_second_stage
+ {\writestatus\m!fonts{preloading latin modern fonts (second stage)}%
+ \font_preload_default_fonts}
+
+\protected\def\font_preloads_third_stage % always
+ {\ifempty\fontclass
+ \writestatus\m!fonts{preloading latin modern fonts (third stage)}%
+ \font_preload_default_fonts
+ \font_preloads_reset
+ \else
+ \font_preloads_reset
+ \push_macro_fontstyle
+ \ifcsname\??fontclass\fontclass\s!mm\s!features\endcsname \else
+ \font_preload_default_fonts_mm
+ \fi
+ \ifcsname\??fontclass\fontclass\s!tt\s!features\endcsname \else
+ \font_preload_default_fonts_tt
+ \fi
+ \pop_macro_fontstyle
+ \font_preloads_reset_checked % reset third, mm and tt
+ \setupbodyfont[\fontstyle]%
+ \fi}
+
+\protected\def\font_preloads_fourth_stage
+ {\begingroup
+ %ifzeropt\fontcharwd\font\number`!\relax
+ \setbox\scratchbox\hpack{\tf c o n t e x t}%
+ \ifzeropt\wd\scratchbox
+ \writeline
+ \writestatus\m!fonts{!! No bodyfont has been defined and no defaults have been}%
+ \writestatus\m!fonts{!! loaded (maybe due to a missing \string\starttext).}%
+ \writeline
+ \fi
+ \font_preloads_reset
+ \endgroup}
+
+\appendtoks
+ \everyhbox{\font_preloads_zero_stage}%
+ \everyvbox{\font_preloads_zero_stage}%
+\to \everydump
+
+\protected\def\font_preloads_at_every_job {\font_preloads_first_stage }
+\protected\def\font_preloads_at_start_text{\font_preloads_second_stage}
+\protected\def\font_preloads_at_stop_text {\font_preloads_fourth_stage}
+\protected\def\font_preloads_at_definition{\font_preloads_third_stage
+ \glet\font_preloads_at_definition\relax}
+
+% \protected\def\checkpreloadedbodyfont % no \let here
+% {\font_preloads_at_start_text}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-sol.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-sol.mklx
new file mode 100644
index 00000000000..8f3d3d712cb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-sol.mklx
@@ -0,0 +1,131 @@
+%D \module
+%D [ file=font-sol,
+%D version=2009.05.19,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Solutions,
+%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 Support / Splitters}
+
+% todo: pass color for tracing
+
+%D This module is specially made for the oriental \TEX\ project. The working is as
+%D follows (and tuned for fonts like Idris' Husayni. The following method came to
+%D my mind after a couple of Skype sessions with Idris while working on the rough
+%D edges of the Husayni font and playing with font dynamics.
+%D
+%D \startitemize[packed]
+%D
+%D \item We define a couple of features sets, some can have stylistics variants
+%D that result in the same words getting a different width. Normally this
+%D happens in a goodies file.
+%D
+%D \item We group such features in a solution set. A solutionset can be enabled
+%D by setting an attribute.
+%D
+%D \item For each paragraph we identify words that get this set applied. We replace
+%D these words by a user node that refers to the original.
+%D
+%D \item For each word we apply the features to a copy that we associate with this
+%D original word.
+%D
+%D \item At the end we have a paragraph (node list) with user nodes that point to a
+%D cache that has originals and processed variants.
+%D
+%D \item When the paragraph is broken into lines we optimize the spacing by
+%D substituting variants.
+%D
+%D \stopitemize
+%D
+%D This approach permits us to use a dedicated paragraph builder, one that treats
+%D the user nodes special and takes the alternatives into account.
+%D
+%D Currently we assume only one solution being active. Maybe some day I'll support
+%D a mixture. This is only one way of optimizing and after several experiments this
+%D one was chosen as testcase. It took quite some experiments (and time) to get thus
+%D far.
+%D
+%D The is experimental code for the Oriental \TEX\ project and aspects of it might
+%D change.
+%D
+%D \starttyping
+%D \setupfontsolutions[method={random,preroll},criterium=1,randomseed=101]
+%D
+%D \definefontsolution % actually only the last run needs to be done this way
+%D [FancyHusayni]
+%D [goodies=husayni,
+%D solution=experimental]
+%D
+%D \definedfont[husayni*husayni-default at 24pt]
+%D \setupinterlinespace[line=36pt]
+%D \righttoleft
+%D \enabletrackers[parbuilders.solutions.splitters.colors]
+%D \setfontsolution[FancyHusayni]
+%D alb alb alb \par
+%D \resetfontsolution
+%D \disabletrackers[parbuilders.solutions.splitters.colors]
+%D \stoptyping
+
+\registerctxluafile{font-sol}{}
+
+\unprotect
+
+\definesystemattribute[splitter][public]
+
+\installcorenamespace{fontsolution}
+
+\installcommandhandler \??fontsolution {fontsolution} \??fontsolution
+
+\aliased\let\setupfontsolutions\setupfontsolution
+
+\appendtoks
+ \clf_definefontsolution
+ {\currentfontsolution}%
+ {% these are frozen
+ goodies {\fontsolutionparameter\s!goodies}%
+ solution {\fontsolutionparameter\c!solution}%
+ less {\fontsolutionparameter\c!less}%
+ more {\fontsolutionparameter\c!more}%
+ }%
+ \relax
+\to \everydefinefontsolution
+
+\permanent\protected\def\setfontsolution[#solution]% just one
+ {\edef\currentfontsolution{#solution}%
+ \clf_setfontsolution
+ {\currentfontsolution}%
+ {%
+ method {\fontsolutionparameter\c!method}%
+ criterium {\fontsolutionparameter\c!criterium}%
+ % randomseed {\fontsolutionparameter\c!random}%
+ }%
+ \relax}
+
+\let\currentfontsolution\empty
+
+\permanent\protected\def\resetfontsolution % resets all
+ {\clf_resetfontsolution
+ \let\currentfontsolution\empty}
+
+\permanent\protected\def\startfontsolution % [#1]
+ {\pushmacro\currentfontsolution
+ \setfontsolution}
+
+\permanent\protected\def\stopfontsolution
+ {\ifhmode\par\fi
+ \clf_stopfontsolution
+ \popmacro\currentfontsolution}
+
+% We initialize this module at the \LUA\ end.
+%
+% \setupfontsolutions
+% [\c!method={\v!normal,preroll},
+% \c!criterium=0]
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-sty.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-sty.mklx
index 81884333bb1..503356a4a88 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-sty.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-sty.mklx
@@ -48,28 +48,27 @@
\setnewconstant \c_font_current_alternative_style_index \plusone
-\unexpanded\def\definealternativestyle
- {\dotripleempty\font_basics_define_alternative_style}
-
-\def\font_basics_define_alternative_style[#commands][#variantone][#varianttwo]%
+\permanent\tolerant\protected\def\definealternativestyle[#commands]#spacer[#variantone]#spacer[#varianttwo]%
{\processcommalist[#commands]{\font_basics_define_alternative_style_indeed{#variantone}{#varianttwo}}}
-\let\definestyle\definealternativestyle % later redefined
+% \let\definestyle\definealternativestyle % later redefined
\newconstant\c_fonts_basics_alternative_style_method
+% maybe permanent
+
\def\font_basics_define_alternative_style_indeed#variantone#varianttwo#command%
- {\setuvalue{\??alternativestyle#command}{\font_helpers_apply_alternative_style{#variantone}{#varianttwo}}%
+ {\protected\defcsname\??alternativestyle#command\endcsname{\font_helpers_apply_alternative_style{#variantone}{#varianttwo}}%
\ifcsname#command\endcsname
% no redefinition
\orelse\ifnum\c_fonts_basics_alternative_style_method=\plusone
- \ifthirdargument
- \setuevalue{#command}{\triggergroupedcommandcs\begincsname\??alternativestyle#command\endcsname}%
+ \ifparameter#command\or
+ \permanent\protected\edefcsname#command\endcsname{\triggergroupedcommandcs\begincsname\??alternativestyle#command\endcsname}%
\else
- \setuvalue{#command}{\triggergroupedcommand{#variantone}}%
+ \permanent\protected\defcsname#command\endcsname{\triggergroupedcommand{#variantone}}%
\fi
\else
- \setuvalue{#command}{\triggergroupedcommand{#variantone}}%
+ \permanent\protected\defcsname#command\endcsname{\triggergroupedcommand{#variantone}}%
\fi}
\def\font_helpers_apply_alternative_style
@@ -83,7 +82,7 @@
\expandafter\firstoftwoarguments
\fi}
-\def\applyalternativestyle#name% public
+\permanent\def\applyalternativestyle#name% public .. expandable? frozen?
{\begincsname\??alternativestyle#name\endcsname}
\appendtoks
@@ -146,9 +145,9 @@
\let\m_current_convert_font \empty
\let\m_current_convert_font_dt\empty
-\unexpanded\def\doconvertfont#specification% takes second argument / this command is obsolete
+\permanent\protected\def\doconvertfont#specification% takes second argument / this command is obsolete
{\edef\m_current_convert_font{#specification}%
- \ifx\m_current_convert_font\empty
+ \ifempty\m_current_convert_font
%\expandafter\firstofoneargument
\else
\expandafter\font_helpers_do_convert_font
@@ -174,37 +173,37 @@
%D \chapter{This is \TEX}
%D \stoptyping
-\unexpanded\def\dontconvertfont{\c_font_current_alternative_style_index\plustwo} % needs checking in usage
-\unexpanded\def\redoconvertfont{\c_font_current_alternative_style_index\plusone} % needs checking in usage
+\permanent\protected\def\dontconvertfont{\c_font_current_alternative_style_index\plustwo} % needs checking in usage
+\permanent\protected\def\redoconvertfont{\c_font_current_alternative_style_index\plusone} % needs checking in usage
%D The new one:
\setfalse\fontattributeisset
-\unexpanded\def\dousestyleparameter#value%
+\mutable\let\currentdetokenizedstyleparameter\empty
+
+\permanent\protected\def\dousestyleparameter#value%
{\edef\currentstyleparameter{#value}%
- \ifx\currentstyleparameter\empty\else
+ \ifempty\currentstyleparameter\else
\expandafter\dousecurrentstyleparameter
\fi}
-\unexpanded\def\dousestylehashparameter#hash#parameter%
+\permanent\protected\def\dousestylehashparameter#hash#parameter%
{\ifcsname#hash#parameter\endcsname
\expandafter\dousestyleparameter\lastnamedcs
\fi}
-\unexpanded\def\dousecurrentstyleparameter % empty check outside here
- {\edef\detokenizedstyleparameter{\detokenize\expandafter{\currentstyleparameter}}%
+\permanent\protected\def\dousecurrentstyleparameter % empty check outside here
+ {\edef\currentdetokenizedstyleparameter{\detokenize\expandafter{\currentstyleparameter}}%
\settrue\fontattributeisset % reset is done elsewhere
- \ifcsname\??alternativestyle\detokenizedstyleparameter\endcsname
+ \ifcsname\??alternativestyle\currentdetokenizedstyleparameter\endcsname
\lastnamedcs
- \orelse\ifcsname\detokenizedstyleparameter\endcsname
+ \orelse\ifcsname\currentdetokenizedstyleparameter\endcsname
\lastnamedcs
\else
\currentstyleparameter
\fi}
-\let\dosetfontattribute\dousestylehashparameter % for a while
-
%D New commands (not yet interfaced):
%D
%D \startbuffer
@@ -235,30 +234,30 @@
\letvalue{\??stylecheck\currentstyle}\relax
\edef\p_method{\styleparameter\c!method}%
\ifx\p_method\v!command
- \setuevalue{\e!start\currentstyle}{\font_styles_apply_start{\currentstyle}}%
- \setuevalue{\e!stop \currentstyle}{\font_styles_apply_stop}%
- \setuevalue {\currentstyle}{\font_styles_apply_grouped{\currentstyle}}% no longer groupedcommand here
+ \frozen\instance\setuevalue{\e!start\currentstyle}{\font_styles_apply_start{\currentstyle}}%
+ \frozen\instance\setuevalue{\e!stop \currentstyle}{\font_styles_apply_stop}%
+ \frozen\instance\setuevalue {\currentstyle}{\font_styles_apply_grouped{\currentstyle}}% no longer groupedcommand here
\fi
\to \everydefinestyle
-\unexpanded\def\font_styles_apply_start#name%
+\protected\def\font_styles_apply_start#name%
{\begingroup
\font_styles_use_defined{#name}}
-\unexpanded\def\font_styles_apply_stop
+\protected\def\font_styles_apply_stop
{\endgroup}
-\unexpanded\def\font_styles_apply_grouped#name% assumes that the next is { or \bgroup
+\protected\def\font_styles_apply_grouped#name% assumes that the next is { or \bgroup
{\bgroup
- \def\g_style{\font_styles_use_defined{#name}}%
- \afterassignment\g_style
+ \def\currentstyle{\font_styles_use_defined{#name}}%
+ \afterassignment\currentstyle
\let\nexttoken}
-\unexpanded\def\font_styles_use_defined#name%
+\protected\def\font_styles_use_defined#name%
{\edef\currentstyle{#name}%
\usestylestyleandcolor\c!style\c!color}
-\unexpanded\def\font_styles_use_generic#specification%
+\protected\def\font_styles_use_generic#specification%
{\let\currentstyle\s!unknown % reasonable generic tag
\letstyleparameter\c!style\empty
\letstyleparameter\c!color\empty
@@ -269,7 +268,7 @@
\installcorenamespace{styleargument}
-\unexpanded\def\style[#name]% as this is can be a switch we use groupedcommand
+\permanent\protected\def\style[#name]% as this is can be a switch we use groupedcommand % frozen?
{\csname\??styleargument
\ifcsname\??stylecheck#name\endcsname
2% defined as style
@@ -282,15 +281,9 @@
\fi
\endcsname{#name}}
-% \setvalue{\??styleargument1}#name%
-% {\groupedcommand{\begincsname#name\endcsname}{}}
-
\setvalue{\??styleargument1}#name%
{\expandafter\triggergroupedcommandcs\begincsname#name\endcsname}
-% \setvalue{\??styleargument2}#name%
-% {\groupedcommand{\font_styles_use_defined{#name}}{}} % or {\font_styles_apply_grouped{#name}}
-
\setvalue{\??styleargument2}#name%
{\triggergroupedcommand{\font_styles_use_defined{#name}}} % or {\font_styles_apply_grouped{#name}}
@@ -313,7 +306,7 @@
\installcorenamespace{styleenvironment}
-\unexpanded\def\startstyle[#name]%
+\permanent\protected\def\startstyle[#name]%
{\begingroup
\csname\??styleenvironment
\ifcsname\??stylecheck#name\endcsname
@@ -325,7 +318,7 @@
\fi
\endcsname{#name}}
-\unexpanded\def\stopstyle
+\permanent\protected\def\stopstyle
{\endgroup
\autoinsertnextspace} % will be configurable, maybe also in \definestartstop
@@ -355,11 +348,8 @@
\installcorenamespace{stylecollection}
-\unexpanded\def\definestylecollection
- {\dosingleargument\font_styles_define_style_collection}
-
-\def\font_styles_define_style_collection[#name]%
- {\iffirstargument
+\permanent\tolerant\protected\def\definestylecollection[#name]%
+ {\ifarguments\or
\setuvalue{#name}{\styleinstance[#name]}%
\def\font_styles_define_style_collection_a#style%
{\def\font_styles_define_style_collection_b#alternative{\undefinevalue{\??stylecollection#name:#style:#alternative}}%
@@ -369,32 +359,23 @@
\font_styles_define_style_collection_a\s!default
\fi}
+\let\font_styles_define_style_collection \relax
\let\font_styles_define_style_collection_a\relax
\let\font_styles_define_style_collection_b\relax
-\unexpanded\def\definestyleinstance
- {\doquadrupleargument\font_styles_define_style_instance}
-
-\def\font_styles_define_style_instance[#instance][#2][#3][#4]% [name] [rm|ss|tt|..] [sl|bf|...] [whatever]
- {\iffirstargument
+\permanent\tolerant\protected\def\definestyleinstance[#instance]#*[#2]#*[#3]#*[#4]% [name] [rm|ss|tt|..] [sl|bf|...] [whatever]
+ {\ifparameter#instance\or
+ \ifarguments\or\or
+ \letcsname\??stylecollection#instance::#2\endcsname\empty
+ \or
+ \defcsname\??stylecollection#instance::#2\endcsname{#3}%
+ \or
+ \defcsname\??stylecollection#instance:#2:#3\endcsname{#4}%
+ \fi
\ifcsname#instance\endcsname\else\font_styles_define_style_collection[#instance]\fi
- \fi
- \iffourthargument
- \setvalue{\??stylecollection#instance:#2:#3}{#4}%
- \orelse\ifthirdargument
- \setvalue{\??stylecollection#instance::#2}{#3}%
- \orelse\ifsecondargument
- \letvalueempty{\??stylecollection#instance::#2}%
- \fi}
-
-% \unexpanded\def\styleinstance[#instance]% will be made faster
-% {%\begingroup\normalexpanded{\noexpand\infofont[#1:\fontstyle:\fontalternative]}\endgroup
-% \executeifdefined{\??stylecollection#instance:\fontstyle:\fontalternative}%
-% {\executeifdefined{\??stylecollection#instance:\fontstyle:\s!default}%
-% {\executeifdefined{\??stylecollection#instance::\fontalternative}
-% {\getvalue {\??stylecollection#instance::\s!default}}}}}
+ \fi}
-\unexpanded\def\styleinstance[#instance]% maybe \lastnamedcs here too
+\permanent\protected\def\styleinstance[#instance]% maybe \lastnamedcs here too
{\csname\??stylecollection#instance:%
\ifcsname\??stylecollection#instance:\fontstyle:\fontalternative\endcsname
\fontstyle:\fontalternative
@@ -414,40 +395,40 @@
%D \mathematics {\utfchar{0x2229}\vsone{}}
%D \stoptyping
-\unexpanded\edef\vsone#character{#character\normalUchar"FE00 } % used
-\unexpanded\edef\vstwo#character{#character\normalUchar"FE01 } % not used but handy for testing
+\permanent\protected\edef\vsone#character{#character\normalUchar"FE00 } % used
+\permanent\protected\edef\vstwo#character{#character\normalUchar"FE01 } % not used but handy for testing
%D For historic reasons we keep the following around but they are no longer that
-%D relevant for \MKIV.
+%D relevant for \MKIV. But \unknown\ they will be dropped in \LMTX !
-\unexpanded\def\doattributes#1#2#3#4%
+\permanent\protected\def\doattributes#1#2#3#4%
{\begingroup % geen \bgroup, anders in mathmode lege \hbox
\dousestylehashparameter{#1}{#2}%
\dousecolorhashparameter{#1}{#3}%
#4%
\endgroup}
-\unexpanded\def\dostartattributes#1#2#3%
+\permanent\protected\def\dostartattributes#1#2#3%
{\begingroup % geen \bgroup, anders in mathmode lege \hbox
\dousestylehashparameter{#1}{#2}%
\dousecolorhashparameter{#1}{#3}}
-\let\dostopattributes\endgroup
+\aliased\let\dostopattributes\endgroup
%D New but it needs to be supported explicitly (as in natural tables).
\newconditional\c_font_styles_math
-\unexpanded\def\font_styles_math_reset
+\protected\def\font_styles_math_reset
{\setfalse\c_font_styles_math}
-\unexpanded\def\font_styles_math_start
+\protected\def\font_styles_math_start
{\ifconditional\c_font_styles_math
\startimath
\fi
\relax}
-\unexpanded\def\font_styles_math_stop
+\protected\def\font_styles_math_stop
{\relax
\ifconditional\c_font_styles_math
\stopimath
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-sym.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-sym.mklx
index 33f8a62da7b..c908ad849d3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-sym.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-sym.mklx
@@ -82,7 +82,9 @@
%D The next macro is used to map non latin fontnames on fonts. See \type
%D {font-uni} for an example of its use.
-\def\fontstylesuffix% why the \s!Regular ? see \getglyph
+% \frozen ...
+
+\permanent\def\fontstylesuffix% why the \s!Regular ? see \getglyph
{\ifx\fontalternative\s!tf \s!Regular \orelse
\ifx\fontalternative\s!bf \s!Bold \orelse
\ifx\fontalternative\s!sl \s!Slanted \orelse
@@ -92,7 +94,7 @@
\ifx\fontalternative\s!sc \s!Caps \else
\s!Regular \fi}
-\def\glyphfontfile#base% appends
+\permanent\def\glyphfontfile#base% appends
{#base%
\ifcsname\??fontfile#base\v_font_string_a\v_font_string_c\endcsname
\v_font_string_a\v_font_string_c
@@ -108,13 +110,13 @@
%D The next macro can be used to make decisions based on the shape:
-\def\doifelseitalic#yes#nop%
+\permanent\def\doifelseitalic#yes#nop%
{\ifx\fontalternative\s!sl#yes\orelse
\ifx\fontalternative\s!it#yes\orelse
\ifx\fontalternative\s!bs#yes\orelse
\ifx\fontalternative\s!bi#yes\else#nop\fi}
-\let\doifitalicelse\doifelseitalic
+\aliased\let\doifitalicelse\doifelseitalic
%D For an example of usage of the following command, see \type {cont-log.tex}.
%D
@@ -127,9 +129,11 @@
\installcorenamespace{symbolfont}
-\let\thedefinedfont\relax
+\mutable\let\skedsymbolfont \empty % for diagnostics
+\mutable\let\currentsymbolfont\empty
+\mutable\let\askedsymbolfont \empty
-\def\setscaledstyledsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
+\permanent\protected\def\setscaledstyledsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
{\edef\askedsymbolfont{\truefontname{\glyphfontfile{#3}} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
\lastnamedcs
@@ -137,7 +141,7 @@
\font_basics_define_symbolic_font
\fi}
-\def\setscaleddirectsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
+\permanent\protected\def\setscaleddirectsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
{\edef\askedsymbolfont{\truefontname{#3} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
\lastnamedcs
@@ -145,7 +149,7 @@
\font_basics_define_symbolic_font
\fi}
-\def\setstyledsymbolicfont#fontname% quite a slowdown, glyphfontfile
+\permanent\protected\def\setstyledsymbolicfont#fontname% quite a slowdown, glyphfontfile
{\edef\askedsymbolfont{\truefontname{\glyphfontfile{#fontname}} at \the\dimexpr\currentfontbodyscale\dimexpr\fontbody}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
\lastnamedcs
@@ -153,7 +157,7 @@
\font_basics_define_symbolic_font
\fi}
-\def\setdirectsymbolicfont#fontname%
+\permanent\protected\def\setdirectsymbolicfont#fontname%
{\edef\askedsymbolfont{\truefontname{#fontname} at \the\dimexpr\currentfontbodyscale\dimexpr\fontbody}%
\ifcsname\??symbolfont\askedsymbolfont\endcsname
\lastnamedcs
@@ -164,27 +168,26 @@
\def\font_basics_define_symbolic_font
{\definefont[currentsymbolfont][\askedsymbolfont]%
\currentsymbolfont
- \expandafter\glet\csname\??symbolfont\askedsymbolfont\endcsname\lastrawfontcall}
+ \gletcsname\??symbolfont\askedsymbolfont\endcsname\lastrawfontcall}
-\unexpanded\def\getnamedglyphstyled#fontname#character{{\setstyledsymbolicfont{#fontname}\clf_fontchar{#character}}}
-\unexpanded\def\getnamedglyphdirect#fontname#character{{\setdirectsymbolicfont{#fontname}\clf_fontchar{#character}}}
-\unexpanded\def\getglyphstyled #fontname#character{{\setstyledsymbolicfont{#fontname}\doifelsenumber{#character}\char\donothing#character}}
-\unexpanded\def\getglyphdirect #fontname#character{{\setdirectsymbolicfont{#fontname}\doifelsenumber{#character}\char\donothing#character}}
-\unexpanded\def\resolvedglyphstyled#fontname#character{{\setstyledsymbolicfont{#fontname}\clf_tochar{#character}}}
-\unexpanded\def\resolvedglyphdirect#fontname#character{{\setdirectsymbolicfont{#fontname}\clf_tochar{#character}}}
+\permanent\protected\def\getnamedglyphstyled#fontname#character{{\setstyledsymbolicfont{#fontname}\clf_fontchar{#character}}}
+\permanent\protected\def\getnamedglyphdirect#fontname#character{{\setdirectsymbolicfont{#fontname}\clf_fontchar{#character}}}
+\permanent\protected\def\getglyphstyled #fontname#character{{\setstyledsymbolicfont{#fontname}\doifelsenumber{#character}\char\donothing#character}}
+\permanent\protected\def\getglyphdirect #fontname#character{{\setdirectsymbolicfont{#fontname}\doifelsenumber{#character}\char\donothing#character}}
+\permanent\protected\def\resolvedglyphstyled#fontname#character{{\setstyledsymbolicfont{#fontname}\clf_tochar{#character}}}
+\permanent\protected\def\resolvedglyphdirect#fontname#character{{\setdirectsymbolicfont{#fontname}\clf_tochar{#character}}}
% this one is wrong:
-\unexpanded\def\getscaledglyph#scale#name#content%
+\permanent\protected\def\getscaledglyph#scale#name#content%
{{\setscaledstyledsymbolicfont\fontbody{#scale}{#name}\doifelsenumber{#content}\char\donothing#content}}
-\let\getglyph \getglyphstyled % old
-\let\getrawglyph \getglyphdirect % old
-\let\symbolicsizedfont\setscaledstyledsymbolicfont % old
-\let\symbolicfont \setstyledsymbolicfont % old
+\aliased\let\getglyph \getglyphstyled % old, soon obsolete
+\aliased\let\getrawglyph \getglyphdirect % old, soon obsolete
+\aliased\let\symbolicsizedfont\setscaledstyledsymbolicfont % old, soon obsolete
+\aliased\let\symbolicfont \setstyledsymbolicfont % old, soon obsolete
-\unexpanded\def\symbolicscaledfont{\setsscaledstyledsymbolicfont\fontbody}
-\unexpanded\def\symbolicscaledfont{\setscaledstyledsymbolicfont\fontbody}
+\permanent\protected\def\symbolicscaledfont{\setscaledstyledsymbolicfont\fontbody}
%D The last implementation of \type {\getglyph} permits definitions like:
%D
@@ -215,7 +218,9 @@
%D Every now and then we want to define a font directly, for instance when we
%D typeset title pages. The next macro saves some typing:
-\unexpanded\def\setfont% geen \font_helpers_set_font mogelijk
+\mutable\let\nextfont\relax % this one could be more private but this is okay
+
+\permanent\protected\def\setfont% geen \font_helpers_set_font mogelijk
{\afterassignment\font_basics_set_font\font\nextfont=}
\def\font_basics_set_font
@@ -231,7 +236,7 @@
%D \macros{doiffontcharelse}
-\unexpanded\def\doifelsefontchar#specification#unicode% this could be a direct lua call
+\permanent\protected\def\doifelsefontchar#specification#unicode% this could be a direct lua call
{\begingroup
\font_basics_define_font_without_parameters{thedefinedfont}{#specification}%
\iffontchar\font#unicode\relax
@@ -240,6 +245,6 @@
\endgroup\expandafter\secondoftwoarguments
\fi}
-\let\doiffontcharelse\doifelsefontchar
+\aliased\let\doiffontcharelse\doifelsefontchar
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt
new file mode 100644
index 00000000000..c960953a700
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-tex.lmt
@@ -0,0 +1,160 @@
+if not modules then modules = { } end modules ['font-mpf'] = {
+ 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 formatters = string.formatters
+local sortedhash = table.sortedhash
+
+local addcharacters = fonts.constructors.addcharacters
+local fontdata = fonts.hashes.identifiers
+
+local otf = fonts.handlers.otf
+local otfregister = otf.features.register
+
+----- getshapes = fonts.dropins.getshapes
+
+local register = fonts.collections.register
+local checkenabled = fonts.collections.checkenabled
+local newprivateslot = fonts.helpers.newprivateslot
+
+local currentfont = font.current
+
+-- hm, seems to gobble the first \char
+
+local makesetups = formatters["box:%s:%S"]
+
+local function makeglyphbox(char,spec)
+ token.expand_macro("makeglyphbox",true,spec.setups or tostring(char))
+ local b = tex.takebox("glyphbox")
+ spec.code = {
+ width = b.width,
+ height = b.height,
+ depth = b.depth,
+ objnum = tex.saveboxresource(b,nil,nil,true),
+ }
+end
+
+local function setboxglyphs(category,fontid,unicode,specification)
+ local box = specification.code
+ if unicode and box then
+ local tfmdata = fontdata[fontid]
+ local characters = tfmdata.characters
+ local newdata = {
+ width = box.width or 0,
+ height = box.height or 0,
+ depth = box.depth or 0,
+ unicode = unicode,
+ }
+ -- pass dimensions to lua
+ characters[unicode] = newdata
+ -- this also adapts newdata (add commands)
+ fonts.dropins.swapone("box",tfmdata,specification,unicode)
+ -- pass dimensions to tex
+ addcharacters(fontid, { characters = { [unicode] = newdata } })
+ return fontid, unicode
+ else
+ logs.report("box glyph", "invalid glyph box for %C",unicode)
+ end
+end
+
+local function setboxglyph(specification)
+ if specification then
+ local name = specification.name
+ local unicode = specification.unicode
+ local font = currentfont()
+ if not unicode and name then
+ unicode = newprivateslot(name)
+ specification.unicode = unicode
+ end
+ if unicode then
+ if not specification.setups then
+ specification.setups = name
+ end
+ -- we can actually delay font if needed
+ register(font,unicode,function(font,private)
+ makeglyphbox(unicode,specification)
+ return setboxglyphs(category,font,unicode,specification)
+ end)
+ checkenabled()
+ end
+ end
+end
+
+local boxes = table.setmetatableindex("table")
+
+function fonts.helpers.registerglyphbox(specification)
+ local category = specification.category
+ local whatever = specification.unicode or specification.name
+ if category and whatever then
+ boxes[category][whatever] = { action = makeglyphbox } -- always
+ end
+end
+
+local function initializebox(tfmdata,kind,value)
+ local boxes = boxes[value]
+ if value then
+ local font = tfmdata.properties.id
+ -- just preregister the list
+ for char, spec in sortedhash(boxes) do
+ spec.setups = makesetups(value,char)
+ if type(char) == "string" then
+ char = newprivateslot(name)
+ end
+ -- check if spec.code
+ register(font,char,function(font,char)
+ local action = spec.action
+ if type(action) == "function" then
+ action(char,spec)
+ end
+ return setboxglyphs(value,font,char,spec)
+ end)
+ end
+ checkenabled()
+ end
+end
+
+fonts.helpers.setboxglyphs = setboxglyphs
+fonts.helpers.setboxglyph = setboxglyph
+
+interfaces.implement {
+ name = "registerboxglyph", -- combine with next one
+ public = true,
+ protected = true,
+ actions = fonts.helpers.registerglyphbox,
+ arguments = { {
+ { "category" },
+ { "unicode", "integer" },
+ { "name" },
+ } },
+}
+
+interfaces.implement {
+ name = "setboxglyph",
+ public = true,
+ protected = true,
+ actions = setboxglyph,
+ arguments = { {
+ { "category" },
+ { "unicode", "integer" },
+ { "name" },
+ { "*" }
+ } },
+}
+
+fonts.handlers.otf.features.register {
+ name = "box",
+ description = "box glyphs",
+ manipulators = {
+ base = initializebox,
+ node = initializebox,
+ }
+}
+
+-- fonts.helpers.registerboxglyph { category = "demo", unicode = 103 }
+-- fonts.helpers.registerboxglyph { category = "demo", unicode = 104 }
+-- fonts.helpers.registerboxglyph { category = "demo", unicode = 105 }
+-- fonts.helpers.registerboxglyph { category = "demo", unicode = 106 }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-tex.mkxl b/Master/texmf-dist/tex/context/base/mkxl/font-tex.mkxl
new file mode 100644
index 00000000000..ae936be3190
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-tex.mkxl
@@ -0,0 +1,121 @@
+%D \module
+%D [ file=font-tex,
+%D version=2021.23.01,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=\TEX\ Glyphs,
+%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 Font Macros / TeX Glyphs}
+
+\registerctxluafile{font-tex}{autosuffix}
+
+%D This mechanism turns boxes into glyphs. Of course this assumes that the
+%D backend code supports it. It's an experiment and we can do similar things
+%D with \METAPOST. The interface is not frozen and might change and evolve.
+
+%D \starttyping
+%D \starttext
+%D
+%D \startsetups box:demo:103
+%D \externalfigure[t:/sources/cow-brown.pdf][height=12pt]
+%D \stopsetups
+%D
+%D \startsetups box:demo:104
+%D \externalfigure[t:/sources/cow-black.pdf][height=10pt]
+%D \stopsetups
+%D
+%D \startsetups box:demo:105
+%D \externalfigure[t:/sources/mill.png][height=12pt]
+%D \stopsetups
+%D
+%D \startsetups box:demo:106
+%D \externalfigure[t:/sources/hacker.jpg][height=12pt]
+%D \stopsetups
+%D
+%D \registerboxglyph category {demo} unicode 103 \relax % rather low level for now
+%D \registerboxglyph category {demo} unicode 104 \relax % rather low level for now
+%D \registerboxglyph category {demo} unicode 105 \relax % rather low level for now
+%D \registerboxglyph category {demo} unicode 106 \relax % rather low level for now
+%D
+%D \definefontfeature[whatever][box=demo]
+%D
+%D \definedfont[Serif*whatever]
+%D
+%D % \enabletrackers[fonts.collecting]
+%D
+%D \startTEXpage%[offset=0pt]
+%D %\hbox{g}%
+%D \hbox{\char103}%
+%D \hbox{\char104}%
+%D \stopTEXpage
+%D
+%D \startsetups box:demo:whatever
+%D \startMPcode
+%D picture p ; p := image (draw figure "t:/sources/hacker.jpg" ysized 10pt);
+%D fill boundingbox p enlarged .5pt randomized 2pt withcolor "darkgray" ;
+%D clip p to boundingbox p enlarged -1pt randomized 2pt ;
+%D draw p ;
+%D \stopMPcode
+%D \stopsetups
+%D
+%D % in current font!
+%D
+%D \iffontchar\font\privatecharactercode{demo:whatever}\else
+%D \setboxglyph {
+%D category {demo}
+%D name {demo:whatever}
+%D setups {box:demo:whatever}
+%D }%
+%D \fi
+%D
+%D \startTEXpage[offset=10pt]
+%D \char\privatecharactercode{demo:whatever}%
+%D \stopTEXpage
+%D
+%D \startTEXpage%[offset=0pt]
+%D \ruledhbox{\char103}
+%D \ruledhbox{\char104}
+%D \ruledhbox{\char105}
+%D \ruledhbox{\char106}
+%D \stopTEXpage
+%D
+%D \dorecurse{1000}{
+%D \char 103\relax \space
+%D \char 104\relax \space
+%D \char 105\relax \space
+%D \char 106\relax \space
+%D }
+%D
+%D \page
+%D
+%D \setupalign[verytolerant,flushleft]
+%D
+%D \dorecurse{100}{
+%D #1:
+%D \glyph yoffset -2pt `i\relax
+%D \glyph yoffset -3pt `j\relax\space
+%D }
+%D \stoptext
+%D \stoptyping
+
+\newbox\glyphbox
+
+% somehow makes the first \char disappear
+%
+% \permanent\protected\def\makeglyphbox#1%
+% {\setbox\glyphbox\hbox{\directsetup{#1}}}
+%
+% so we group:
+
+\permanent\protected\def\makeglyphbox#1%
+ {\begingroup
+ \global\setbox\glyphbox\hbox{\directsetup{#1}}%
+ \finalizeobjectbox\glyphbox
+ % \writestatus{glyphbox}{#1 => (\the\wd\glyphbox,\the\ht\glyphbox,\the\dp\glyphbox)}%
+ \endgroup}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-tra.mkxl b/Master/texmf-dist/tex/context/base/mkxl/font-tra.mkxl
new file mode 100644
index 00000000000..625e2fe0b87
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-tra.mkxl
@@ -0,0 +1,118 @@
+%D \module
+%D [ file=font-tra,
+%D version=2009.01.02, % or so
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Tracing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\writestatus{loading}{ConTeXt Font Macros / Tracing}
+
+%D just use fontid
+
+%D \macros
+%D {showbodyfont}
+%D
+%D One can call for a rather simple overview of a bodyfont and the relations between
+%D its alternative fonts.
+%D
+%D \showsetup{showbodyfont}
+%D
+%D The current bodyfont (here we omitted the argument) looks like:
+%D
+%D \showbodyfont
+%D
+%D The implementation is rather straightforward in using \type {\halign}.
+
+\fetchmodulecommand \showbodyfont \f!font_run
+
+%D \macros
+%D {showfontstrip, showminimalbaseline}
+%D
+%D The next command can come in handy when combining different fonts into a
+%D collection (typeface) and determining optimal baseline distances.
+%D
+%D \showfontstrip \blank \showminimalbaseline
+
+\fetchmodulecommand \showfontstrip \f!font_run
+\fetchmodulecommand \showminimalbaseline \f!font_run
+
+%D \macros
+%D {showkerning}
+%D
+%D A goody is:
+%D
+%D \showkerning{Can you guess what kerning is?}
+
+\fetchmodulecommand \showkerning \f!font_run
+
+%D \macros
+%D {showbodyfontenvironment,showfont,showfontstyle,showligatures}
+%D
+%D The current bodyfontenvironment is:
+%D
+%D \showbodyfontenvironment
+%D
+%D This overview is generated using:
+%D
+%D \showsetup{showbodyfontenvironment}
+
+\fetchmodulecommand \showbodyfontenvironment \f!font_run
+
+%D The following command generates a fontmap:
+%D
+%D \startbuffer
+%D \showfont[SansBold at 12pt]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \getbuffer
+
+\fetchmodulecommand \showfont \f!font_run
+\fetchmodulecommand \showfontstyle \f!font_run
+\fetchmodulecommand \showligature \f!font_run
+\fetchmodulecommand \showligatures \f!font_run
+\fetchmodulecommand \showcharratio \f!font_run
+\fetchmodulecommand \showfontparameters \f!font_run
+
+\permanent\protected\def\showchardata#1{\ctxcommand{showchardata("#1")}} % todo: direct implementor
+\permanent\protected\def\showfontdata {\ctxcommand{showfontparameters()}} % todo: direct implementor
+
+%D \macros
+%D {doiffontpresentelse}
+%D
+%D \starttyping
+%D \doiffontpresentelse{texnansi-lmr10}{YES}{NO}
+%D \doiffontpresentelse{adam-lindsay-modern-serif}{YES}{NO}
+%D \stoptyping
+
+\permanent\protected\def\doifelsefontpresent#1{\clf_doifelsefontpresent{#1}}
+
+\aliased\let\doiffontpresentelse\doifelsefontpresent
+
+%D The otf tracer code is now moved. If the individual commands are needed
+%D one can just load the module.
+
+\fetchmodulecommand \showotfcomposition \f!font_run
+\fetchmodulecommand \showotfcompositionlist \f!font_run
+\fetchmodulecommand \startotfsample \f!font_run
+\fetchmodulecommand \startotfcompositionlist \f!font_run
+
+% \permanent\protected\def\savefontdata[#1]% not yet in i-*.xml
+% {\begingroup
+% \getdummyparameters[#1]%
+% \clf_savefont {
+% filename {\dummyparameter\c!file}
+% fontname {\dummyparameter\c!name}
+% method {\dummyparameter\c!method}
+% }%
+% \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-uni.mkxl b/Master/texmf-dist/tex/context/base/mkxl/font-uni.mkxl
new file mode 100644
index 00000000000..390f17468ff
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-uni.mkxl
@@ -0,0 +1,27 @@
+%D \module
+%D [ file=font-uni,
+%D version=2008.11.03, % 1999.10.10,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=\UNICODE,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Font Macros / Unicode}
+
+%D In \MKIV\ we only provide the \type {\uchar} macro and implement it as just an
+%D \UTF\ converter. We expand it so best not use not use it for active characters.
+%D In practice this command is probably never used anyway but we keep if for old
+%D styles.
+
+\unprotect
+
+\permanent\def\uchar#1#2{\clf_uchar\numexpr#1\relax\numexpr#2\relax}
+
+\aliased\let\uc\uchar
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-unk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/font-unk.mkxl
new file mode 100644
index 00000000000..986a5c9bfa2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-unk.mkxl
@@ -0,0 +1,150 @@
+%D \module
+%D [ file=font-unk,
+%D version=1998.09.10,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Unknown Defaults,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module is rather important, because it enables us to define and call for not
+%D yet defined fonts in a way completely independant of real font names. First we
+%D map some meaningful names onto unknown filenames.
+
+\unprotect
+
+\definefontsynonym [Serif] [unknown]
+\definefontsynonym [SerifBold] [unknown]
+\definefontsynonym [SerifItalic] [unknown]
+\definefontsynonym [SerifSlanted] [unknown]
+\definefontsynonym [SerifBoldItalic] [unknown]
+\definefontsynonym [SerifBoldSlanted] [unknown]
+\definefontsynonym [SerifCaps] [unknown]
+
+\definefontsynonym [Sans] [unknown]
+\definefontsynonym [SansBold] [unknown]
+\definefontsynonym [SansItalic] [unknown]
+\definefontsynonym [SansSlanted] [unknown]
+\definefontsynonym [SansBoldItalic] [unknown]
+\definefontsynonym [SansBoldSlanted] [unknown]
+\definefontsynonym [SansCaps] [unknown]
+
+\definefontsynonym [Mono] [unknown]
+\definefontsynonym [MonoBold] [unknown]
+\definefontsynonym [MonoItalic] [unknown]
+\definefontsynonym [MonoSlanted] [unknown]
+\definefontsynonym [MonoBoldItalic] [unknown]
+\definefontsynonym [MonoBoldSlanted] [unknown]
+\definefontsynonym [MonoCaps] [unknown]
+
+\definefontsynonym [MathRoman] [unknown]
+\definefontsynonym [MathRomanL2R] [MathRoman]
+\definefontsynonym [MathRomanR2L] [MathRoman]
+\definefontsynonym [MathRomanBold] [MathRoman]
+\definefontsynonym [MathRomanBoldL2R] [MathRomanBold]
+\definefontsynonym [MathRomanBoldR2L] [MathRomanBold]
+
+\definefontsynonym [Handwriting] [unknown]
+\definefontsynonym [Calligraphic] [unknown]
+
+%D This permit us to define (use) fonts that refer to the default style (so, Bold
+%D may expand to SansBold or SerifBold, depending on the default style in the
+%D typeface). The \LUA\ call is used to set the current alternative in a
+%D non|-|interfering way. This make sure that the CurrentFont synonym (in font-sym)
+%D is working as expected (e.g.\ in MixedCaps). Yes, this is complicates stuff.
+
+\definefontsynonym[\s!Normal] [\noexpand\clf_tf\noexpand\v_font_string_d]
+\definefontsynonym[\s!Bold] [\noexpand\clf_bf\noexpand\v_font_string_d\noexpand\s!Bold]
+\definefontsynonym[\s!Italic] [\noexpand\clf_it\noexpand\v_font_string_d\noexpand\s!Italic]
+\definefontsynonym[\s!Slanted] [\noexpand\clf_sl\noexpand\v_font_string_d\noexpand\s!Slanted]
+\definefontsynonym[\s!BoldItalic] [\noexpand\clf_bi\noexpand\v_font_string_d\noexpand\s!BoldItalic]
+\definefontsynonym[\s!BoldSlanted][\noexpand\clf_bs\noexpand\v_font_string_d\noexpand\s!BoldSlanted]
+\definefontsynonym[\s!Caps] [\noexpand\clf_tf\noexpand\v_font_string_d\noexpand\s!Caps]
+
+%D Also handy:
+
+\definefontsynonym [Regular] [Serif]
+\definefontsynonym [RegularBold] [SerifBold]
+\definefontsynonym [RegularItalic] [SerifItalic]
+\definefontsynonym [RegularSlanted] [SerifSlanted]
+\definefontsynonym [RegularBoldItalic] [SerifBoldItalic]
+\definefontsynonym [RegularBoldSlanted] [SerifBoldSlanted]
+\definefontsynonym [RegularCaps] [SerifCaps]
+
+\definefontsynonym [Support] [Sans]
+\definefontsynonym [SupportBold] [SansBold]
+\definefontsynonym [SupportItalic] [SansItalic]
+\definefontsynonym [SupportSlanted] [SansSlanted]
+\definefontsynonym [SupportBoldItalic] [SansBoldItalic]
+\definefontsynonym [SupportBoldSlanted] [SansBoldSlanted]
+\definefontsynonym [SupportCaps] [SansCaps]
+
+%D Well, not that good an idea:
+
+\definefontsynonym [Roman] [Serif]
+\definefontsynonym [RomanBold] [SerifBold]
+\definefontsynonym [RomanItalic] [SerifItalic]
+\definefontsynonym [RomanSlanted] [SerifSlanted]
+\definefontsynonym [RomanBoldItalic] [SerifBoldItalic]
+\definefontsynonym [RomanBoldSlanted] [SerifBoldSlanted]
+\definefontsynonym [RomanCaps] [SerifCaps]
+
+\definefontsynonym [Type] [Mono]
+\definefontsynonym [TypeBold] [MonoBold]
+\definefontsynonym [TypeItalic] [MonoItalic]
+\definefontsynonym [TypeSlanted] [MonoSlanted]
+\definefontsynonym [TypeBoldItalic] [MonoBoldItalic]
+\definefontsynonym [TypeBoldSlanted] [MonoBoldSlanted]
+\definefontsynonym [TypeCaps] [MonoCaps]
+
+%D Next we define roman, sans and monospaced font sets.
+
+\definebodyfont [default] [rm]
+ [\s!tf=Serif sa 1,
+ \s!bf=SerifBold sa 1,
+ \s!it=SerifItalic sa 1,
+ \s!sl=SerifSlanted sa 1,
+ \s!bi=SerifBoldItalic sa 1,
+ \s!bs=SerifBoldSlanted sa 1,
+ \s!sc=SerifCaps sa 1]
+
+\definebodyfont [default] [ss]
+ [\s!tf=Sans sa 1,
+ \s!bf=SansBold sa 1,
+ \s!it=SansItalic sa 1,
+ \s!sl=SansSlanted sa 1,
+ \s!bi=SansBoldItalic sa 1,
+ \s!bs=SansBoldSlanted sa 1,
+ \s!sc=SansCaps sa 1]
+
+\definebodyfont [default] [tt]
+ [\s!tf=Mono sa 1,
+ \s!bf=MonoBold sa 1,
+ \s!it=MonoItalic sa 1,
+ \s!sl=MonoSlanted sa 1,
+ \s!bi=MonoBoldItalic sa 1,
+ \s!bs=MonoBoldSlanted sa 1,
+ \s!sc=MonoCaps sa 1]
+
+\definebodyfont [default] [mm]
+ [\s!mr =MathRoman mo 1,
+ \s!mrlr=MathRomanL2R mo 1,
+ \s!mrrl=MathRomanR2L mo 1,
+ \s!mb =MathRomanBold mo 1,
+ \s!mblr=MathRomanBoldL2R mo 1,
+ \s!mbrl=MathRomanBoldR2L mo 1]
+
+\definebodyfont [default] [hw]
+ [\s!tf=Handwriting sa 1]
+
+\definebodyfont [default] [cg]
+ [\s!tf=Calligraphy sa 1]
+
+%D These definitions come into action as soon as names are mapped onto real file
+%D names (or names that themselves are mapped).
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-var.mklx b/Master/texmf-dist/tex/context/base/mkxl/font-var.mklx
new file mode 100644
index 00000000000..421521f50f5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-var.mklx
@@ -0,0 +1,57 @@
+%D \module
+%D [ file=font-var,
+%D version=2011.01.13, % (copied fron font-ini)
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Common Variables,
+%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 Font Macros / Common Variables}
+
+\unprotect
+
+% some more will move here
+
+%D \macros
+%D {fontstyle,fontalternative,fontsize,fontbody}
+%D
+%D Within a bodyfont, fonts can come in different sizes. For instance \type {\tf} is
+%D accompanied by \type {\tfa}, \type {\tfb} etc. The first two characters denote
+%D the alternative, while the third character in these sequences represents the
+%D size. The actual size is saved in a macro. The styles, being roman (\type {\rm}),
+%D sans serif (\type {\ss}) etc. are also available.
+
+% fontclass % modern dejavu
+% fontbody % ... 10pt 11pt 12pt ...
+% fontstyle % rm ss tt mm hw cg ...
+% fontalternative % tf bf sl it bs bi sc ...
+% fontsize % a b c d ...
+% fontface % 0=normal 1=text 2=script 3=scriptscript 4=x 5=xx (math are temporary)
+
+\mutable\def\normalizedbodyfontsize{12pt}
+
+\immutable\def\defaultfontbody {\normalizedbodyfontsize}
+\immutable\let\defaultfontstyle \s!rm
+\immutable\let\defaultfontalternative\s!tf
+\immutable\let\defaultfontsize \empty
+\immutable\let\defaultfontface \!!zerocount
+
+\mutable\let\globalfontclass\empty
+\mutable\let\fontclass \empty
+\mutable\let\fontbody \defaultfontbody
+\mutable\let\fontstyle \defaultfontstyle
+\mutable\let\fontalternative\defaultfontalternative
+\mutable\let\fontsize \defaultfontsize
+\mutable\let\fontface \!!zerocount
+
+\installmacrostack\fontstyle
+
+% we can use an indirect mapping for fontclasses (map string onto numbers) and indeed this
+% is somewhat more efficient but also makes the code messy ... maybe some day ...
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-vfc.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-vfc.lmt
new file mode 100644
index 00000000000..9330bdea0b2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-vfc.lmt
@@ -0,0 +1,181 @@
+if not modules then modules = { } end modules ['font-vfc'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv and hand-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local select, type = select, type
+local insert = table.insert
+
+local fonts = fonts
+local helpers = fonts.helpers
+
+local setmetatableindex = table.setmetatableindex
+----- makeweak = table.makeweak
+
+-- Helpers dealing with virtual fonts: beware, these are final values so
+-- don't change the content of tables fetched from here!
+
+local push = { "push" }
+local pop = { "pop" }
+local dummy = { "comment" }
+
+function helpers.prependcommands(commands,...)
+ insert(commands,1,push)
+ for i=select("#",...),1,-1 do
+ local s = (select(i,...))
+ if s then
+ insert(commands,1,s)
+ end
+ end
+ insert(commands,pop)
+ return commands
+end
+
+function helpers.appendcommands(commands,...)
+ insert(commands,1,push)
+ insert(commands,pop)
+ for i=1,select("#",...) do
+ local s = (select(i,...))
+ if s then
+ insert(commands,s)
+ end
+ end
+ return commands
+end
+
+function helpers.prependcommandtable(commands,t)
+ insert(commands,1,push)
+ for i=#t,1,-1 do
+ local s = t[i]
+ if s then
+ insert(commands,1,s)
+ end
+ end
+ insert(commands,pop)
+ return commands
+end
+
+function helpers.appendcommandtable(commands,t)
+ insert(commands,1,push)
+ insert(commands,pop)
+ for i=1,#t do
+ local s = t[i]
+ if s then
+ insert(commands,s)
+ end
+ end
+ return commands
+end
+
+helpers.commands = utilities.storage.allocate {
+ char = setmetatableindex(function(t,k) local v = { "slot", 0, k } t[k] = v return v end),
+ right = setmetatableindex(function(t,k) local v = { "right", k } t[k] = v return v end),
+ left = setmetatableindex(function(t,k) local v = { "left", k } t[k] = v return v end),
+ down = setmetatableindex(function(t,k) local v = { "down", k } t[k] = v return v end),
+ up = setmetatableindex(function(t,k) local v = { "up", k } t[k] = v return v end),
+ push = push,
+ pop = pop,
+ dummy = dummy,
+}
+
+helpers.vfinjectors = {
+ -- backend specific: startcolor, stopcolor etc
+}
+
+-- maybe round()
+
+local defaultline = 16384
+
+helpers.vfspecials = {
+
+ backgrounds = setmetatableindex(function(t,h)
+ local v = setmetatableindex(function(t,d)
+ local v = setmetatableindex(function(t,w)
+ local v = { "frame", w, h, d, defaultline, true, true }
+ t[w] = v
+ return v
+ end)
+ t[d] = v
+ return v
+ end)
+ t[h] = v
+ return v
+ end),
+
+ outlines = setmetatableindex(function(t,h)
+ local v = setmetatableindex(function(t,d)
+ local v = setmetatableindex(function(t,w)
+ local v = { "frame", w, h, d, defaultline, false, true }
+ t[w] = v
+ return v
+ end)
+ t[d] = v
+ return v
+ end)
+ t[h] = v
+ return v
+ end),
+
+}
+
+-- In the past we only copied when we had something that got scaled but the problem
+-- is that we then run into issues when we extend a commands in the parent. This
+-- needs checking. When we go to glyph scaling, this can go away.
+--
+-- The alternative is to work with unscaled values and always do scaling at the
+-- TeX end. So, then we need accessors instead of tables and we also need to check
+-- all the context code: where do we access values?
+--
+-- On the other hand, in glyph scale mode we hardly do any scaling so we seldom
+-- call the next one.
+--
+-- What if we use named fields: then we can scale by field name.
+
+local scaled = {
+ right = true,
+ down = true,
+ left = true,
+ right = true,
+ offset = true,
+ rule = true,
+ char = false,
+ font = false,
+ slot = false,
+ use = false,
+ push = false,
+ pop = false,
+ lua = false,
+ -- obsolete
+ node = false,
+ -- additional ones are never scaled (color etc)
+}
+
+function helpers.scalecommands(list,hdelta,vdelta)
+ local n = #list
+ for i=1,n do
+ local key = list[i][1]
+ if scaled[list[i][1]] then
+ local result = { }
+ for i=1,n do
+ local cmd = list[i]
+ local key = ivc[1]
+ if key == "right" or key == "left" then
+ result[i] = { key, cmd[2]*hdelta }
+ elseif key == "down" or key == "up" then
+ result[i] = { key, cmd[2]*vdelta }
+ elseif key == "offset" or key == "rule" then
+ result[i] = { key, cmd[2]*hdelta, cmd[3]*vdelta }
+ -- elseif key == "frame" then
+ -- result[i] = cmd -- already scaled, for now
+ else
+ result[i] = cmd -- shared since in cache and untouched
+ end
+ end
+ return result
+ end
+ end
+ return list
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-vir.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-vir.lmt
new file mode 100644
index 00000000000..f60639d6ad8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/font-vir.lmt
@@ -0,0 +1,159 @@
+if not modules then modules = { } end modules ['font-vir'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is actually very experimental code but it has been so since we began with
+-- \LUATEX\ so \unknown. We keep it around because it's not that much code and
+-- because we have some demo's (in the test suite) that use it.
+
+local next, setmetatable, getmetatable = next, setmetatable, getmetatable
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local fastcopy = table.fastcopy
+
+local fonts = fonts
+local constructors = fonts.constructors
+local vf = constructors.handlers.vf
+vf.version = 1.000 -- same as tfm
+
+local definers = fonts.definers
+local methods = definers.methods
+
+local variants = allocate()
+local combinations = { }
+local combiner = { }
+local whatever = allocate()
+local helpers = allocate()
+local predefined = fonts.helpers.commands
+
+methods.variants = variants -- todo .. wrong namespace
+vf.combinations = combinations
+vf.combiner = combiner
+vf.whatever = whatever
+vf.helpers = helpers
+vf.predefined = predefined
+
+setmetatableindex(whatever, function(t,k) local v = { } t[k] = v return v end)
+
+local function checkparameters(g,f)
+ if f and g and not g.parameters and #g.fonts > 0 then
+ local p = { }
+ for k,v in next, f.parameters do
+ p[k] = v
+ end
+ g.parameters = p
+ setmetatable(p, getmetatable(f.parameters))
+ end
+end
+
+function methods.install(tag, rules)
+ vf.combinations[tag] = rules
+ variants[tag] = function(specification)
+ return vf.combine(specification,tag)
+ end
+end
+
+local function combine_load(g,name)
+ return constructors.readanddefine(name or g.specification.name,g.specification.size)
+end
+
+local function combine_assign(g, name, from, to, start, force)
+ local f, id = combine_load(g,name)
+ if f and id then
+ -- optimize for whole range, then just g = f
+ if not from then from, to = 0, 0xFF00 end
+ if not to then to = from end
+ if not start then start = from end
+ local fc = f.characters
+ local gc = g.characters
+ local fd = f.descriptions
+ local gd = g.descriptions
+ local hn = #g.fonts+1
+ g.fonts[hn] = { id = id } -- no need to be sparse
+ for i=from,to do
+ if fc[i] and (force or not gc[i]) then
+ gc[i] = fastcopy(fc[i],true) -- can be optimized
+ gc[i].commands = { { "slot", hn, start } }
+ gd[i] = fd[i]
+ end
+ start = start + 1
+ end
+ checkparameters(g,f)
+ end
+end
+
+local function combine_process(g,list)
+ if list then
+ for _,v in next, list do
+ (combiner.commands[v[1]] or nop)(g,v)
+ end
+ end
+end
+
+local function combine_names(g,name,force)
+ local f, id = constructors.readanddefine(name,g.specification.size)
+ if f and id then
+ local fc = f.characters
+ local gc = g.characters
+ local fd = f.descriptions
+ local gd = g.descriptions
+ g.fonts[#g.fonts+1] = { id = id } -- no need to be sparse
+ local hn = #g.fonts
+ for k, v in next, fc do
+ if force or not gc[k] then
+ gc[k] = fastcopy(v,true)
+ gc[k].commands = { { "slot", hn, k } }
+ gd[i] = fd[i]
+ end
+ end
+ checkparameters(g,f)
+ end
+end
+
+local combine_feature = function(g,v)
+ local key = v[2]
+ local value = v[3]
+ if key then
+ if value == nil then
+ value = true
+ end
+ local specification = g.specification
+ if specification then
+ local normalfeatures = specification.features.normal
+ if normalfeatures then
+ normalfeatures[key] = value -- otf?
+ end
+ end
+ end
+end
+
+combiner.commands = allocate {
+ ["initialize"] = function(g,v) combine_assign (g,g.properties.name) end,
+ ["include-method"] = function(g,v) combine_process (g,combinations[v[2]]) end, -- name
+ -- ["copy-parameters"] = function(g,v) combine_parameters(g,v[2]) end, -- name
+ ["copy-range"] = function(g,v) combine_assign (g,v[2],v[3],v[4],v[5],true) end, -- name, from-start, from-end, to-start
+ ["copy-char"] = function(g,v) combine_assign (g,v[2],v[3],v[3],v[4],true) end, -- name, from, to
+ ["fallback-range"] = function(g,v) combine_assign (g,v[2],v[3],v[4],v[5],false) end, -- name, from-start, from-end, to-start
+ ["fallback-char"] = function(g,v) combine_assign (g,v[2],v[3],v[3],v[4],false) end, -- name, from, to
+ ["copy-names"] = function(g,v) combine_names (g,v[2],true) end,
+ ["fallback-names"] = function(g,v) combine_names (g,v[2],false) end,
+ ["feature"] = combine_feature,
+}
+
+function vf.combine(specification,tag)
+ local g = {
+ name = specification.name,
+ properties = { },
+ fonts = { },
+ characters = { },
+ descriptions = { },
+ specification = fastcopy(specification),
+ }
+ combine_process(g,combinations[tag])
+ return g
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/good-mth.lmt b/Master/texmf-dist/tex/context/base/mkxl/good-mth.lmt
new file mode 100644
index 00000000000..87b6787df6a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/good-mth.lmt
@@ -0,0 +1,464 @@
+if not modules then modules = { } end modules ['good-mth'] = {
+ version = 1.000,
+ comment = "companion to font-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, next, tonumber, unpack = type, next, tonumber, unpack
+local ceil = math.ceil
+local match = string.match
+
+local fonts = fonts
+
+local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
+local report_goodies = logs.reporter("fonts","goodies")
+
+local registerotffeature = fonts.handlers.otf.features.register
+
+local fontgoodies = fonts.goodies or { }
+
+local fontcharacters = fonts.hashes.characters
+
+local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end)
+
+local report_math = logs.reporter("mathematics","initializing")
+
+local nuts = nodes.nuts
+
+local setlink = nuts.setlink
+
+local nodepool = nuts.pool
+
+local new_kern = nodepool.kern
+local new_glyph = nodepool.glyph
+local new_hlist = nodepool.hlist
+local new_vlist = nodepool.vlist
+
+local insert_node_after = nuts.insert_after
+
+local helpers = fonts.helpers
+local upcommand = helpers.commands.up
+local rightcommand = helpers.commands.right
+local charcommand = helpers.commands.char
+local prependcommands = helpers.prependcommands
+
+-- experiment, we have to load the definitions immediately as they precede
+-- the definition so they need to be initialized in the typescript
+
+local function withscriptcode(tfmdata,unicode,data,action)
+ if type(unicode) == "string" then
+ local p, u = match(unicode,"^(.-):(.-)$")
+ if u then
+ u = tonumber(u)
+ if u then
+ local slots = fonts.helpers.mathscriptslots(tfmdata,u)
+ if slots then
+ if p == "*" then
+ action(u,data)
+ for i=1,#slots do
+ action(slots[i],data)
+ end
+ else
+ p = tonumber(p)
+ if p then
+ action(slots[p],data)
+ end
+ end
+ end
+ end
+ end
+ else
+ action(unicode,data)
+ end
+end
+
+local function finalize(tfmdata,feature,value)
+-- if tfmdata.mathparameters then -- funny, cambria text has this
+ local goodies = tfmdata.goodies
+ if goodies then
+ local virtualized = mathematics.virtualized
+ for i=1,#goodies do
+ local goodie = goodies[i]
+ local mathematics = goodie.mathematics
+ local dimensions = mathematics and mathematics.dimensions
+ if dimensions then
+ if trace_defining then
+ report_math("overloading dimensions in %a @ %p",tfmdata.properties.fullname,tfmdata.parameters.size)
+ end
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local parameters = tfmdata.parameters
+ local factor = parameters.factor
+ local hfactor = parameters.hfactor
+ local vfactor = parameters.vfactor
+ --
+ tfmdata.type = "virtual"
+ tfmdata.properties.virtualized = true
+ --
+ local function overloadone(unicode,data)
+ local character = characters[unicode]
+ if not character then
+ local c = virtualized[unicode]
+ if c then
+ character = characters[c]
+ end
+ end
+ if character then
+ local width = data.width
+ local height = data.height
+ local depth = data.depth
+ if trace_defining and (width or height or depth) then
+ report_math("overloading dimensions of %C, width %p, height %p, depth %p",
+ unicode,width or 0,height or 0,depth or 0)
+ end
+ if width then character.width = width * hfactor end
+ if height then character.height = height * vfactor end
+ if depth then character.depth = depth * vfactor end
+ --
+ local xoffset = data.xoffset
+ local yoffset = data.yoffset
+ if xoffset == "llx" then
+ local d = descriptions[unicode]
+ if d then
+ xoffset = - d.boundingbox[1] * hfactor
+ character.width = character.width + xoffset
+ xoffset = rightcommand[xoffset]
+ else
+ xoffset = nil
+ end
+ elseif xoffset and xoffset ~= 0 then
+ xoffset = rightcommand[xoffset * hfactor]
+ else
+ xoffset = nil
+ end
+ if yoffset and yoffset ~= 0 then
+ yoffset = upcommand[yoffset * vfactor]
+ else
+ yoffset = nil
+ end
+ if xoffset or yoffset then
+ local commands = characters.commands
+ if commands then
+ prependcommands(commands,yoffset,xoffset)
+ else
+ local slot = charcommand[unicode]
+ if xoffset and yoffset then
+ character.commands = { xoffset, yoffset, slot }
+ elseif xoffset then
+ character.commands = { xoffset, slot }
+ else
+ character.commands = { yoffset, slot }
+ end
+ end
+ end
+ elseif trace_defining then
+ report_math("no overloading dimensions of %C, not in font",unicode)
+ end
+ end
+ local function overload(dimensions)
+ for unicode, data in next, dimensions do
+ withscriptcode(tfmdata,unicode,data,overloadone)
+ end
+ end
+ if value == nil then
+ value = { "default" }
+ end
+ if value == "all" or value == true then
+ for name, value in next, dimensions do
+ overload(value)
+ end
+ else
+ if type(value) == "string" then
+ value = utilities.parsers.settings_to_array(value)
+ end
+ if type(value) == "table" then
+ for i=1,#value do
+ local d = dimensions[value[i]]
+ if d then
+ overload(d)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+registerotffeature {
+ name = "mathdimensions",
+ description = "manipulate math dimensions",
+ -- default = true,
+ manipulators = {
+ base = finalize,
+ node = finalize,
+ }
+}
+
+local function initialize(goodies)
+ local mathgoodies = goodies.mathematics
+ if mathgoodies then
+ local virtuals = mathgoodies.virtuals
+ local mapfiles = mathgoodies.mapfiles
+ local maplines = mathgoodies.maplines
+ if virtuals then
+ for name, specification in next, virtuals do
+ -- beware, they are all constructed ... we should be more selective
+ mathematics.makefont(name,specification,goodies)
+ end
+ end
+ if mapfiles then
+ for i=1,#mapfiles do
+ fonts.mappings.loadfile(mapfiles[i]) -- todo: backend function
+ end
+ end
+ if maplines then
+ for i=1,#maplines do
+ fonts.mappings.loadline(maplines[i]) -- todo: backend function
+ end
+ end
+ end
+end
+
+fontgoodies.register("mathematics", initialize)
+
+-- local enabled = false directives.register("fontgoodies.mathkerning",function(v) enabled = v end)
+
+local function initialize(tfmdata)
+-- if enabled and tfmdata.mathparameters then -- funny, cambria text has this
+ if tfmdata.mathparameters then -- funny, cambria text has this
+ local goodies = tfmdata.goodies
+ if goodies then
+ local characters = tfmdata.characters
+ if characters[0x1D44E] then -- 119886
+ -- we have at least an italic a
+ for i=1,#goodies do
+ local mathgoodies = goodies[i].mathematics
+ if mathgoodies then
+ local kerns = mathgoodies.kerns
+ if kerns then
+ local function kernone(unicode,data)
+ local chardata = characters[unicode]
+ if chardata and (not chardata.mathkerns or data.force) then
+ chardata.mathkerns = data
+ end
+ end
+ for unicode, data in next, kerns do
+ withscriptcode(tfmdata,unicode,data,kernone)
+ end
+ return
+ end
+ end
+ end
+ else
+ return -- no proper math font anyway
+ end
+ end
+ end
+end
+
+registerotffeature {
+ name = "mathkerns",
+ description = "math kerns",
+ -- default = true,
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+-- math italics (not really needed)
+--
+-- it would be nice to have a \noitalics\font option
+
+local function initialize(tfmdata)
+ local goodies = tfmdata.goodies
+ if goodies then
+ local shared = tfmdata.shared
+ for i=1,#goodies do
+ local mathgoodies = goodies[i].mathematics
+ if mathgoodies then
+ local mathitalics = mathgoodies.italics
+ if mathitalics then
+ local properties = tfmdata.properties
+ if properties.setitalics then
+ mathitalics = mathitalics[file.nameonly(properties.name)] or mathitalics
+ if mathitalics then
+ if trace_goodies then
+ report_goodies("loading mathitalics for font %a",properties.name)
+ end
+ local corrections = mathitalics.corrections
+ local defaultfactor = mathitalics.defaultfactor
+ -- properties.mathitalic_defaultfactor = defaultfactor -- we inherit outer one anyway (name will change)
+ if corrections then
+ fontgoodies.registerpostprocessor(tfmdata, function(tfmdata) -- this is another tfmdata (a copy)
+ -- better make a helper so that we have less code being defined
+ local properties = tfmdata.properties
+ local parameters = tfmdata.parameters
+ local characters = tfmdata.characters
+ properties.mathitalic_defaultfactor = defaultfactor
+ properties.mathitalic_defaultvalue = defaultfactor * parameters.quad
+ if trace_goodies then
+ report_goodies("assigning mathitalics for font %a",properties.name)
+ end
+ local quad = parameters.quad
+ local hfactor = parameters.hfactor
+ for k, v in next, corrections do
+ local c = characters[k]
+ if c then
+ if v > -1 and v < 1 then
+ c.italic = v * quad
+ else
+ c.italic = v * hfactor
+ end
+ else
+ report_goodies("invalid mathitalics entry %U for font %a",k,properties.name)
+ end
+ end
+ end)
+ end
+ return -- maybe not as these can accumulate
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+registerotffeature {
+ name = "mathitalics",
+ description = "additional math italic corrections",
+ -- default = true,
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
+
+-- fontgoodies.register("mathitalics", initialize)
+
+local function mathradicalaction(n,h,v,font,mchar,echar)
+ local characters = fontcharacters[font]
+ local mchardata = characters[mchar]
+ local echardata = characters[echar]
+ local ewidth = echardata.width
+ local mwidth = mchardata.width
+ local delta = h - ewidth
+ local glyph = new_glyph(font,echar)
+ local head = glyph
+ if delta > 0 then
+ local count = ceil(delta/mwidth)
+ local kern = (delta - count * mwidth) / count
+ for i=1,count do
+ local k = new_kern(kern)
+ local g = new_glyph(font,mchar)
+ setlink(k,head)
+ setlink(g,k)
+ head = g
+ end
+ end
+ local height = mchardata.height
+ local list = new_hlist(head)
+ local kern = new_kern(height-v)
+ list = setlink(kern,list)
+ local list = new_vlist(kern)
+ insert_node_after(n,n,list)
+end
+
+local function mathhruleaction(n,h,v,font,bchar,mchar,echar)
+ local characters = fontcharacters[font]
+ local bchardata = characters[bchar]
+ local mchardata = characters[mchar]
+ local echardata = characters[echar]
+ local bwidth = bchardata.width
+ local mwidth = mchardata.width
+ local ewidth = echardata.width
+ local delta = h - ewidth - bwidth
+ local glyph = new_glyph(font,echar)
+ local head = glyph
+ if delta > 0 then
+ local count = ceil(delta/mwidth)
+ local kern = (delta - count * mwidth) / (count+1)
+ for i=1,count do
+ local k = new_kern(kern)
+ local g = new_glyph(font,mchar)
+ setlink(k,head)
+ setlink(g,k)
+ head = g
+ end
+ local k = new_kern(kern)
+ setlink(k,head)
+ head = k
+ end
+ local g = new_glyph(font,bchar)
+ setlink(g,head)
+ head = g
+ local height = mchardata.height
+ local list = new_hlist(head)
+ local kern = new_kern(height-v)
+ list = setlink(kern,list)
+ local list = new_vlist(kern)
+ insert_node_after(n,n,list)
+end
+
+local function initialize(tfmdata)
+ local goodies = tfmdata.goodies
+ if goodies then
+ local resources = tfmdata.resources
+ local ruledata = { }
+ for i=1,#goodies do
+ local mathematics = goodies[i].mathematics
+ if mathematics then
+ local rules = mathematics.rules
+ if rules then
+ for tag, name in next, rules do
+ ruledata[tag] = name
+ end
+ end
+ end
+ end
+ if next(ruledata) then
+ local characters = tfmdata.characters
+ local unicodes = resources.unicodes
+ if characters and unicodes then
+ local mathruleactions = resources.mathruleactions
+ if not mathruleactions then
+ mathruleactions = { }
+ resources.mathruleactions = mathruleactions
+ end
+ --
+ local mchar = unicodes[ruledata["radical.extender"] or false]
+ local echar = unicodes[ruledata["radical.end"] or false]
+ if mchar and echar then
+ mathruleactions.radicalaction = function(n,h,v,font)
+ mathradicalaction(n,h,v,font,mchar,echar)
+ end
+ end
+ --
+ local bchar = unicodes[ruledata["hrule.begin"] or false]
+ local mchar = unicodes[ruledata["hrule.extender"] or false]
+ local echar = unicodes[ruledata["hrule.end"] or false]
+ if bchar and mchar and echar then
+ mathruleactions.hruleaction = function(n,h,v,font)
+ mathhruleaction(n,h,v,font,bchar,mchar,echar)
+ end
+ end
+ -- not that nice but we need to register it at the tex end
+ -- context.enablemathrules("\\fontclass")
+ end
+ end
+ end
+end
+
+registerotffeature {
+ name = "mathrules",
+ description = "check math rules",
+ default = true,
+ initializers = {
+ base = initialize,
+ node = initialize,
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-epd.mkxl b/Master/texmf-dist/tex/context/base/mkxl/grph-epd.mkxl
new file mode 100644
index 00000000000..7ff9b86756e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-epd.mkxl
@@ -0,0 +1,93 @@
+%D \module
+%D [ file=grph-epd,
+%D version=2010.07.29,
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Merging Goodies,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Graphic Macros / Merging Goodies}
+
+\unprotect
+
+\registerctxluafile{grph-epd}{}
+
+% hm, this one is globally overloaded
+
+\mutable\let\mergedfigurereference\empty
+
+\defineoverlay[system:graphics:epdf][\directsetup{system:graphics:epdf}]
+
+\startsetups system:graphics:epdf
+ \clf_figure_mergegoodies{\externalfigureparameter\c!interaction}%
+ \reference[\mergedfigurereference]{}% todo: dest area
+\stopsetups
+
+\defineframed
+ [system_graphics_epdf]
+ [\c!frame=\v!off,
+ \c!offset=\v!overlay,
+ \c!background={\v!foreground,system:graphics:epdf}]
+
+\protected\def\grph_epdf_add_overlay
+ {\global\setbox\foundexternalfigure\vbox\bgroup % vpack ?
+ \system_graphics_epdf{\box\foundexternalfigure}%
+ \egroup}
+
+\appendtoks
+ \iflocation
+ \doif\figurefiletype{pdf}{\doifnot{\externalfigureparameter\c!interaction}\v!none\grph_epdf_add_overlay}%
+ \fi
+\to \externalfigurepostprocessors
+
+\defineframed
+ [epdfstampsymbol]
+ [\c!foregroundstyle=\v!mono,
+ \c!background=\c!color,
+ \c!rulethickness=.125\exheight,
+ \c!offset=.250\exheight,
+ \c!backgroundcolor=lightgray, % can be adapted before first usage
+ \c!framecolor=darkgray, % can be adapted before first usage
+ \c!corner=\v!round]
+
+\definesymbol[Stamped] [\epdfstampsymbol{Stamped}]
+
+\definesymbol[Approved] [\epdfstampsymbol{Approved}]
+\definesymbol[Experimental] [\epdfstampsymbol{Experimental}]
+\definesymbol[NotApproved] [\epdfstampsymbol{NotApproved}]
+\definesymbol[AsIs] [\epdfstampsymbol{AsIs}]
+\definesymbol[Expired] [\epdfstampsymbol{Expired}]
+\definesymbol[NotForPublicRelease] [\epdfstampsymbol{NotForPublicRelease}]
+\definesymbol[Confidential] [\epdfstampsymbol{Confidential}]
+\definesymbol[Final] [\epdfstampsymbol{Final}]
+\definesymbol[Sold] [\epdfstampsymbol{Sold}]
+\definesymbol[Departmental] [\epdfstampsymbol{Departmental}]
+\definesymbol[ForComment] [\epdfstampsymbol{ForComment}]
+\definesymbol[TopSecret] [\epdfstampsymbol{TopSecret}]
+\definesymbol[Draft] [\epdfstampsymbol{Draft}]
+\definesymbol[ForPublicRelease] [\epdfstampsymbol{ForPublicRelease}]
+
+\protect \endinput
+
+% /Properties << /xxxx 22 0 R >>
+% 21 0 obj << /Type /OCG /Name (xxxx) >> endobj
+% 22 0 obj << /OCGs [ 21 0 R ] /Type /OCMD >> endobj
+
+% \def\setepdflayer#1#2#3#4#5#6% x y w h (in bp) 0/1 destination
+% {\setlayer
+% [epdflinks]
+% [\c!x=#1bp,\c!y=#1\s!bp,\c!preset=\v!leftbottom]
+% {\button
+% [\c!width=#3\s!bp,\c!height=#4\s!bp,\c!offset=\v!overlay,\c!frame=\ifnum#5=1 on\else\v!off]%
+% {}[#6]}}
+
+% \def\setepdflayer#1#2#3#4#5#6% x y w h (in bp) 0/1 destination
+% {\setlayer
+% [epdflinks]
+% [\c!x=#1bp,\c!y=#1\s!bp,\c!preset=\v!leftbottom]
+% {\gotowdhtbox{#3\s!bp}{#4\s!bp}[#6]}}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-fig.mkxl b/Master/texmf-dist/tex/context/base/mkxl/grph-fig.mkxl
new file mode 100644
index 00000000000..92d2c7dc69a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-fig.mkxl
@@ -0,0 +1,367 @@
+%D \module
+%D [ file=grph-fig,
+%D version=2006.08.26, % overhaul of 1997.03.31
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Figure Inclusion,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% This is (yet) untested in LMTX!
+
+\unprotect
+
+%D Used in the styledesign manual:
+%
+% beware in mkiv we don't have the typeset- prefix
+%
+% \setbuffer[typeset-b]\endbuffer
+% \setbuffer[typeset-a]\endbuffer
+%
+% todo:
+%
+% \appendtoks \setbuffer[typeset-b]\endbuffer\to \everystarttext
+% \appendtoks \setbuffer[typeset-a]\endbuffer\to \everystarttext
+
+% we could use \typesetbuffer[*] to access the last one
+
+\newconstant\c_grph_buffers_mode
+
+\mutable\let\lasttypesetbuffer\empty
+
+\permanent\protected\def\typesetbuffer {\bgroup\setconstant\c_grph_buffers_mode\plusone \grph_buffers_typeset}
+\permanent\protected\def\typesetbufferonly{\bgroup\setconstant\c_grph_buffers_mode\zerocount\grph_buffers_typeset}
+
+\tolerant\permanent\protected\def\grph_buffers_typeset[#1]#*[#2]%
+ {\ifparameters
+ \grph_buffers_typeset_indeed\jobname\empty
+ \or
+ \ifhastok={#1}%
+ \grph_buffers_typeset_indeed\jobname{#1}%
+ \else
+ \grph_buffers_typeset_indeed{#1}\empty
+ \fi
+ \or
+ \grph_buffers_typeset_indeed{#1}{#2}%
+ \fi}
+
+\def\grph_buffers_typeset_indeed#1#2% we could use the via files
+ {\doifnot{#1}{*}{\xdef\lasttypesetbuffer{\clf_typesetbuffer{#1}}}%
+ \ifcase\c_grph_buffers_mode
+ % typesetonly
+ \or
+ \externalfigure[\lasttypesetbuffer][#2]%
+ \fi
+ \egroup}
+
+\tolerant\permanent\protected\def\runbuffer[#1]#*[#2]%
+ {\xdef\lasttypesetbuffer{\clf_runbuffer{#1}{#2}}}
+
+% For manuals and such:
+%
+% \definetypesetting [name] [options] [settings-a]
+%
+% \typesetfile [name] [file] [settings-b]
+% \typesetfile [file] [options] [settings-b]
+% \typesetfile [file] [settings-b]
+% \typesetfile [file]
+%
+% \enabletrackers[files.run]
+% \starttext
+% \typesetfile[oepsoeps.tex][width=10cm,frame=on]
+% \stoptext
+
+\installcorenamespace{typesettingfile}
+
+\tolerant\permanent\protected\def\definetypesetting[#1]#*[#2]#*[#3]% <name> options settings-a
+ {\ifparameter#1\or\setuvalue{\??typesettingfile#1}{\grph_typesetting_process_indeed{#2}{#3}}\fi}
+
+\tolerant\permanent\protected\def\typesetfile[#1]#*[#2]#*[#3]% <name> filename settings-b | filename options settings
+ {\ifcsname\??typesettingfile#1\endcsname
+ \lastnamedcs{#2}{#3}%
+ \orelse\ifparameter#3\or
+ \grph_typesetting_process_indeed{#2}{#3}{#1}{}%
+ \orelse\ifparameter#2\or % filename settings
+ \grph_typesetting_process_indeed{}{#2}{#1}{}%
+ \fi}
+
+\defineexternalfigure[typesetting] % so one can set a frame and such
+
+\def\grph_typesetting_process_indeed#1#2#3#4% options settings-a filename settings-b
+ {\begingroup
+ \edef\m_typesetting_name{\clf_runcontextjob{#3}{#1}}%
+ \ifempty\m_typesetting_name \else
+ \normalexpanded{\externalfigure[\m_typesetting_name][typesetting]}[#2,#4]%
+ \fi
+ \endgroup}
+
+%D Whatever ... hardly used ... but historic ... needs checking ... will probably
+%D become m-fig-nn.mkiv .. or I will extend it cq. clean it up when I needed it.
+%D After all, it's documented in old manuals.
+
+\newcount\c_grph_steps_reference
+\newdimen\d_grph_steps_x
+\newdimen\d_grph_steps_y
+\newbox \b_grph_steps_colorbar
+
+\ifdefined\referring\else \mutable\let\referring\relax \fi
+\ifdefined\marking \else \mutable\let\marking \relax \fi
+\ifdefined\remark \else \mutable\let\remark \relax \fi
+\ifdefined\colorbar \else \mutable\let\colorbar \relax \fi
+
+\tolerant\protected\def\grph_steps_place_figure#1#2#3#4[#5]%
+ {\hpack
+ {\setbox\scratchbox\hpack
+ {\useexternalfigure[\s!dummy][#2][#3,#5]%
+ \externalfigure[\s!dummy]}%
+ \grph_steps_calculate
+ \startpositioning
+ \enforced\let\referring\grph_steps_one_referring
+ \enforced\let\marking \grph_steps_one_marking
+ \enforced\let\remark \grph_steps_one_remark
+ \enforced\let\colorbar \grph_steps_one_colorbar
+ \position(0,0){\box\scratchbox}%
+ \linewidth\onepoint
+ \setuppositioning
+ [\c!unit=pt,%
+ \c!xscale=\withoutpt\the\d_grph_steps_x,%
+ \c!yscale=\withoutpt\the\d_grph_steps_y,%
+ \c!factor=1]%
+ \ignorespaces#4%
+ \enforced\let\referring\grph_steps_two_referring
+ \enforced\let\marking \grph_steps_two_marking
+ \enforced\let\remark \grph_steps_two_remark
+ \enforced\let\colorbar \grph_steps_two_colorbar
+ \ignorespaces#4\removeunwantedspaces % or just grab #4 unspaced
+ \stoppositioning
+ \ifvoid\b_grph_steps_colorbar\else\box\b_grph_steps_colorbar\fi}} % not really needed
+
+\protected\def\grph_steps_one_referring(#1,#2)#*(#3,#4)#*[#5]%
+ {\position(#1,#2){\grph_steps_goto(#3,#4){\externalfigureparameter\c!frames}[#5]}}
+
+\protected\def\grph_steps_one_marking(#1,#2)#*(#3,#4)#*[#5]%
+ {\position(#1,#2){\grph_steps_this_is(#3,#4){\externalfigureparameter\c!frames}[#5]}}
+
+\protected\def\grph_steps_one_remark (#-,#-)#*(#-,#-)#*[#-]#*#:#-{}% (x,y)(h,b)[...]{tekst}
+\protected\def\grph_steps_one_colorbar #-[#-]{}
+\protected\def\grph_steps_two_referring(#-,#-)#*(#-,#-)#*[#-]{}
+
+\let\grph_steps_two_marking\grph_steps_two_referring
+
+\protected\def\grph_steps_two_remark
+ {\grph_steps_comment\v!no}
+
+\protected\def\grph_steps_two_colorbar#1[#2]
+ {\begingroup
+ \global\setbox\b_grph_steps_colorbar\vpack % \vbox ?
+ {\forgetall
+ \processcommalist[#2]\grph_colorbar_make_step}%
+ \global\setbox\b_grph_steps_colorbar\vpack
+ {\hskip2\emwidth\box\b_grph_steps_colorbar}%
+ \global\wd\b_grph_steps_colorbar\zeropoint
+ \endgroup}
+
+\protected\def\grph_colorbar_make_step#1%
+ {\blackrule[\c!color=#1,\c!width=2\emwidth,\c!height=\exheight,\c!depth=\zeropoint]%
+ \endgraf}
+
+\permanent\protected\def\startfigure[#1]#*[#2]#*[#3]#:#4\stopfigure
+ {\doifelse{\externalfigureparameter\c!option}\v!test
+ {\grph_steps_test_figure{#1}{#2}{#3}{#4}%
+ \letexternalfigureparameter\c!frames\v!on}%
+ {\letexternalfigureparameter\c!frames\v!off}%
+ \setvalue{\??externalfigureinstance#1}%
+ {\grph_steps_place_figure{#1}{#2}{#3}{#4}}}
+
+\aliased\let\stopfigure\relax
+
+\ifdefined\referring \else \let\referring\relax \fi
+\ifdefined\marking \else \let\marking \relax \fi
+\ifdefined\remark \else \let\remark \relax \fi
+\ifdefined\colorbar \else \let\colorbar \relax \fi
+
+\protected\def\grph_steps_test_figure#1#2#3#4%
+ {\begingroup
+ \setbox\scratchbox\hpack
+ {\useexternalfigure[\s!dummy][#2][\c!wfactor=\v!max]%
+ \externalfigure[\s!dummy]}%
+ \let\referring\grph_steps_three_referring
+ \let\marking \grph_steps_three_marking
+ \let\remark \grph_steps_three_remark
+ \let\colorbar \grph_steps_three_colorbar
+ \c_grph_steps_reference\zerocount
+ \setbox\scratchboxone\vpack
+ {\hsize240\points
+ \startpositioning
+ \grph_steps_calculate
+ \position(0,0)
+ {\box\scratchbox}%
+ \position(0,0)
+ {\basegrid
+ [\c!nx=\externalfigureparameter\c!xmax,%
+ \c!dx=\withoutpt\the\d_grph_steps_x,%
+ \c!ny=\externalfigureparameter\c!ymax,%
+ \c!dy=\withoutpt\the\d_grph_steps_y,%
+ \c!xstep=1,%
+ \c!ystep=1,%
+ \c!scale=1,%
+ \c!offset=\v!no,%
+ \c!unit=pt]}%
+ \setuppositioning
+ [\c!unit=pt,%
+ \c!xscale=\withoutpt\the\d_grph_steps_x,%
+ \c!yscale=\withoutpt\the\d_grph_steps_y,%
+ \c!factor=1]%
+ \linewidth\onepoint
+ \ignorespaces#4\removeunwantedspaces % or just grab #4 unspaced
+ \stoppositioning
+ \vfill}%
+ \c_grph_steps_reference\zerocount
+ \enforced\let\referring\grph_steps_four_referring
+ \enforced\let\marking \grph_steps_four_marking
+ \enforced\let\remark \grph_steps_four_remark
+ \enforced\let\colorbar \grph_steps_four_colorbar
+ \setbox\scratchboxtwo\vbox % \vpack ?
+ {\forgetall
+ \begingroup
+ \tfa\doifelsenothing{#1}{#2}{#1}%
+ \endgroup
+ \blank
+ \tfxx#4%
+ \vfilll}%
+ \ifdim\ht\scratchboxone>\ht\scratchboxtwo
+ \ht\scratchboxtwo\ht\scratchboxone
+ \else
+ \ht\scratchboxone\ht\scratchboxtwo
+ \fi
+ \hpack
+ {\hskip3\emwidth
+ \tpack{\vskip12\points\box\scratchboxone\vskip6\points}%
+ \tpack{\vskip12\points\box\scratchboxtwo\vskip6\points}}%
+ \endgroup}
+
+\definesystemconstant{vwa}
+\definesystemconstant{vwb}
+
+\tolerant\protected\def\grph_steps_three_referring(#1,#2)#*(#3,#4)#*[#5]%
+ {\advance\c_grph_steps_reference\plusone
+ \position(#1,#2)
+ {\hbox{\the\c_grph_steps_reference}}%
+ \position(#1,#2)
+ {\gotosomeinternal\s!vwb{#5}\realfolio
+ {\grph_steps_marker(#3,#4)\v!on{\thisissomeinternal\s!vwa{#5}}}}}
+
+\protected\def\grph_steps_three_remark
+ {\grph_steps_comment\v!yes}
+
+\let\grph_steps_three_marking \grph_steps_three_referring
+\let\grph_steps_three_colorbar\grph_steps_one_colorbar
+
+\protected\def\grph_steps_four_referring{\grph_steps_text{\normalstartimath\rightarrow\normalstopimath}}
+\protected\def\grph_steps_four_marking {\grph_steps_text{\normalstartimath\leftarrow \normalstopimath}}
+
+\let\grph_steps_four_remark \grph_steps_one_remark
+\let\grph_steps_four_colorbar\grph_steps_one_colorbar
+
+% Helpers:
+
+\def\grph_steps_calculate
+ {\ifnum0\externalfigureparameter\c!xmax=\zerocount
+ \ifnum0\externalfigureparameter\c!ymax=\zerocount
+ \setexternalfigureparameter\c!ymax{24}%
+ \fi
+ \d_grph_steps_y\figureheight
+ \divide\d_grph_steps_y \externalfigureparameter\c!ymax
+ \d_grph_steps_x\d_grph_steps_y
+ \scratchdimen\figurewidth
+ \advance\scratchdimen\d_grph_steps_y
+ \divide \scratchdimen\d_grph_steps_y
+ \setexternalfigureparameter\c!xmax{\number\scratchdimen}%
+ \else
+ \d_grph_steps_x\figurewidth \divide\d_grph_steps_x \externalfigureparameter\c!xmax\relax
+ \d_grph_steps_y\figureheight \divide\d_grph_steps_y \externalfigureparameter\c!ymax\relax
+ \fi}
+
+\tolerant\def\grph_steps_comment#1(#2,#3)#*(#4,#5)#*[#6]#*#:#7% {kader}(x,y)(h,b)[...]{tekst}
+ {\position(#2,#3)%
+ {\setnostrut
+ \framed[\c!width=#4\d_grph_steps_x,\c!height=#5\d_grph_steps_y,\c!offset=\v!none,\c!frame=#1,#6]{#7}}}
+
+% \def\grph_steps_figure#1%
+% {\position(0,0){\getvalue{#1}}}
+
+\def\grph_steps_goto(#1,#2)#3[#4]% (h,b)kader[ref]
+ {\gotobox{\vpack{\grph_steps_area(#1,#2)#3{}}}[#4]}
+
+\tolerant\def\grph_steps_text#1(#2,#3)#*(#4,#5)#*[#6]%
+ {\advance\c_grph_steps_reference\plusone
+ \hbox % \hpack ?
+ {\quad
+ \thisissomeinternal\s!vwb{#6}%
+ \gotosomeinternal\s!vwa{#6}\realfolio{\hbox to 1.5\emwidth{\the\c_grph_steps_reference\hfill}}%
+ \quad#1 (#2,#3) (#4,#5) [#6]\hfill}%
+ \endgraf}
+
+\def\grph_steps_this_is(#1,#2)#3[#4]%
+ {\grph_steps_area(#1,#2){#3}{\dosetdirectpagereference{#4}}}
+
+\def\grph_steps_area(#1,#2)#3#4% (h,b){kader}{tekst}
+ {\bgroup
+ \setnostrut
+ \framed[\c!width=#1\d_grph_steps_x,\c!height=#2\d_grph_steps_y,\c!offset=\zeropoint,\c!frame=#3]{#4}%
+ \egroup}
+
+\def\grph_steps_marker(#1,#2)#3#4% (h,b){kader}{tekst}
+ {\framed[\c!width=#1\d_grph_steps_x,\c!height=#2\d_grph_steps_y,\c!offset=\v!none,\c!frame=#3]{#4}}
+
+\protect \endinput
+
+% \startbuffer
+% \definecolor [blue] [c=1,m=.38,y=0,k=.64]
+% \definecolor [yellow] [c=0,m=.28,y=1,k=.06]
+%
+% \definespotcolor [blue-100] [blue] [p=1]
+% \definespotcolor [yellow-100] [yellow] [p=1]
+%
+% \definemultitonecolor [combicolor] [blue=.12,yellow=.28] [c=.1,m=.1,y=.3,k=.1]
+%
+% \definemultitonecolor [combicolor-b] [blue=1] [c=1,m=.38,y=0,k=.64] % force multitone
+% \definemultitonecolor [combicolor-y] [yellow=1] [c=0,m=.28,y=1,k=.06] % force multitone
+%
+% \useexternalfigure[demo-a][mill.png] [object=no,width=.2\textwidth]
+% \useexternalfigure[demo-b][hacker-bw.jpg][object=no,width=.2\textwidth]
+%
+% \startbaselinecorrection \startcombination[4*1]
+% {\externalfigure[demo-a]} {no color}
+% {\externalfigure[demo-a][color=combicolor]} {indexed duotone}
+% {\externalfigure[demo-a][color=combicolor-b]} {spot color}
+% {\externalfigure[demo-a][color=combicolor-y]} {spot color}
+% \stopcombination \stopbaselinecorrection
+%
+% \startbaselinecorrection \startcombination[4*1]
+% {\externalfigure[demo-b]} {no color}
+% {\externalfigure[demo-b][color=combicolor]} {indexed duotone}
+% {\externalfigure[demo-b][color=combicolor-b]} {spot color}
+% {\externalfigure[demo-b][color=combicolor-y]} {spot color}
+% \stopcombination \stopbaselinecorrection
+%
+% \startbaselinecorrection \startcombination[4*1]
+% {\externalfigure[demo-a]} {no color}
+% {\externalfigure[demo-a][color=combicolor]} {indexed duotone}
+% {\externalfigure[demo-a][color=blue-100]} {spot color}
+% {\externalfigure[demo-a][color=yellow-100]} {spot color}
+% \stopcombination \stopbaselinecorrection
+%
+% \startbaselinecorrection \startcombination[4*1]
+% {\externalfigure[demo-b]} {no color}
+% {\externalfigure[demo-b][color=combicolor]} {indexed duotone}
+% {\externalfigure[demo-b][color=blue-100]} {spot color}
+% {\externalfigure[demo-b][color=yellow-100]} {spot color}
+% \stopcombination \stopbaselinecorrection
+% \stopbuffer
+%
+% \getbuffer \typebuffer
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-inc.lmt b/Master/texmf-dist/tex/context/base/mkxl/grph-inc.lmt
new file mode 100644
index 00000000000..4fa562cb8cd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-inc.lmt
@@ -0,0 +1,2160 @@
+if not modules then modules = { } end modules ['grph-inc'] = {
+ version = 1.001,
+ comment = "companion to grph-inc.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: in pdfe: pdfe.copyappearance(document,objnum)
+--
+-- local im = createimage { filename = fullname }
+-- local on = images.flushobject(im,document.__xrefs__[AP])
+
+-- todo: files are sometimes located twice
+-- todo: empty filename or only suffix always false (not found)
+-- lowercase types
+-- mps tex tmp svg
+-- partly qualified
+-- dimensions
+-- use metatables
+-- figures.boxnumber can go as we now can use names
+-- avoid push
+-- move some to command namespace
+
+--[[
+The ConTeXt figure inclusion mechanisms are among the oldest code
+in ConTeXt and evolved into a complex whole. One reason is that we
+deal with backend in an abstract way. What complicates matters is
+that we deal with internal graphics as well: TeX code, MetaPost code,
+etc. Later on figure databases were introduced, which resulted in
+a plug in model for locating images. On top of that runs a conversion
+mechanism (with caching) and resource logging.
+
+Porting that to Lua is not that trivial because quite some
+status information is kept between al these stages. Of course, image
+reuse also has some price, and so I decided to implement the graphics
+inclusion in several layers: detection, loading, inclusion, etc.
+
+Object sharing and scaling can happen at each stage, depending on the
+way the resource is dealt with.
+
+The TeX-Lua mix is suboptimal. This has to do with the fact that we cannot
+run TeX code from within Lua. Some more functionality will move to Lua.
+]]--
+
+-- todo: store loaded pages per pdf file someplace
+
+local tonumber, tostring, next, unpack = tonumber, tostring, next, unpack
+local format, lower, find, match, gsub = string.format, string.lower, string.find, string.match, string.gsub
+local longtostring = string.longtostring
+local contains = table.contains
+local sortedhash, sortedkeys = table.sortedhash, table.sortedkeys
+local concat, insert, remove = table.concat, table.insert, table.remove
+local todimen = string.todimen
+local collapsepath = file.collapsepath
+local formatters = string.formatters
+local odd = math.odd
+local isfile, isdir, modificationtime = lfs.isfile, lfs.isdir, lfs.modification
+
+local P, R, S, Cc, C, Cs, Ct, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.Cc, lpeg.C, lpeg.Cs, lpeg.Ct, lpeg.match
+
+local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_hash = utilities.parsers.settings_to_hash
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local replacetemplate = utilities.templates.replace
+
+local bpfactor = number.dimenfactors.bp
+
+images = images or { }
+local images = images
+
+local hasscheme = url.hasscheme
+local urlhashed = url.hashed
+
+local resolveprefix = resolvers.resolve
+
+local texgetbox = tex.getbox
+local texsetbox = tex.setbox
+
+local hpack = node.hpack
+
+local new_latelua = nodes.pool.latelua
+
+local context = context
+
+local implement = interfaces.implement
+local variables = interfaces.variables
+
+local codeinjections = backends.codeinjections
+local nodeinjections = backends.nodeinjections
+
+local trace_figures = false trackers.register ("graphics.locating", function(v) trace_figures = v end)
+local trace_bases = false trackers.register ("graphics.bases", function(v) trace_bases = v end)
+local trace_programs = false trackers.register ("graphics.programs", function(v) trace_programs = v end)
+local trace_conversion = false trackers.register ("graphics.conversion", function(v) trace_conversion = v end)
+local trace_inclusion = false trackers.register ("graphics.inclusion", function(v) trace_inclusion = v end)
+local trace_usage = false trackers.register ("graphics.usage", function(v) trace_usage = v end)
+
+local extra_check = false directives.register("graphics.extracheck", function(v) extra_check = v end)
+local auto_transform = true directives.register("graphics.autotransform", function(v) auto_transform = v end)
+
+local report = logs.reporter("graphics")
+local report_inclusion = logs.reporter("graphics","inclusion")
+
+local f_hash_part = formatters["%s->%s->%s->%s"]
+local f_hash_full = formatters["%s->%s->%s->%s->%s->%s->%s->%s"]
+
+local v_yes = variables.yes
+local v_global = variables["global"]
+local v_local = variables["local"]
+local v_default = variables.default
+local v_auto = variables.auto
+
+local maxdimen = tex.magicconstants.maxdimen -- 0x3FFFFFFF -- 2^30-1
+
+local ctx_doscalefigure = context.doscalefigure
+local ctx_relocateexternalfigure = context.relocateexternalfigure
+local ctx_startfoundexternalfigure = context.startfoundexternalfigure
+local ctx_stopfoundexternalfigure = context.stopfoundexternalfigure
+local ctx_dosetfigureobject = context.dosetfigureobject
+local ctx_doboxfigureobject = context.doboxfigureobject
+
+-- extensions
+
+function checkimage(figure)
+ if figure then
+ local width = figure.width or 0
+ local height = figure.height or 0
+ if width <= 0 or height <= 0 then
+ report_inclusion("image %a has bad dimensions (%p,%p), discarding",figure.filename or "?",width,height)
+ return false, "bad dimensions"
+ end
+ -- local xres = figure.xres
+ -- local yres = figure.yres
+ local changes = false
+ if height > width then
+ if height > maxdimen then
+ figure.height = maxdimen
+ figure.width = width * maxdimen/height
+ changed = true
+ end
+ elseif width > maxdimen then
+ figure.width = maxdimen
+ figure.height = height * maxdimen/width
+ changed = true
+ end
+ if changed then
+ report_inclusion("limiting natural dimensions of %a, old %p * %p, new %p * %p",
+ figure.filename,width,height,figure.width,figure.height)
+ end
+ if width >= maxdimen or height >= maxdimen then
+ report_inclusion("image %a is too large (%p,%p), discarding",
+ figure.filename,width,height)
+ return false, "dimensions too large"
+ end
+ return figure
+ end
+end
+
+-- This is a bit of abstraction. Fro a while we will follow the luatex image
+-- model.
+
+local imagekeys = {
+ -- only relevant ones (permitted in luatex)
+ "width", "height", "depth", "bbox",
+ "colordepth", "colorspace",
+ "filename", "filepath", "visiblefilename",
+ "imagetype", "stream",
+ "index", "objnum",
+ "pagebox", "page", "pages",
+ "rotation", "transform",
+ "xsize", "ysize", "xres", "yres",
+}
+
+local imagesizes = {
+ art = true, bleed = true, crop = true,
+ media = true, none = true, trim = true,
+}
+
+local imagetypes = { [0] =
+ "none",
+ "pdf", "png", "jpg", "jp2", "jbig2",
+ "stream",
+}
+
+imagetypes = table.swapped(imagetypes,imagetypes)
+
+images.keys = imagekeys
+images.types = imagetypes
+images.sizes = imagesizes
+
+local function createimage(specification)
+ return backends.codeinjections.newimage(specification)
+end
+
+local function copyimage(specification)
+ return backends.codeinjections.copyimage(specification)
+end
+
+local function scanimage(specification)
+ return backends.codeinjections.scanimage(specification)
+end
+
+local function embedimage(specification)
+ -- write the image to file
+ return backends.codeinjections.embedimage(specification)
+end
+
+local function wrapimage(specification)
+ -- create an image rule
+ return backends.codeinjections.wrapimage(specification)
+end
+
+images.create = createimage
+images.scan = scanimage
+images.copy = copyimage
+images.wrap = wrapimage
+images.embed = embedimage
+
+-- If really needed we can provide:
+--
+-- img = {
+-- new = createimage,
+-- scan = scanimage,
+-- copy = copyimage,
+-- node = wrapimage,
+-- write = function(specification) context(wrapimage(specification)) end,
+-- immediatewrite = embedimage,
+-- immediatewriteobject = function() end, -- not upported, experimental anyway
+-- boxes = function() return sortedkeys(imagesizes) end,
+-- fields = function() return imagekeys end,
+-- types = function() return { unpack(imagetypes,0,#imagetypes) } end,
+-- }
+
+-- end of copies / mapping
+
+local function imagetotable(imgtable)
+ if type(imgtable) == "table" then
+ return copy(imgtable)
+ end
+ local result = { }
+ for k=1,#imagekeys do
+ local key = imagekeys[k]
+ result[key] = imgtable[key]
+ end
+ return result
+end
+
+function images.serialize(i,...)
+ return table.serialize(imagetotable(i),...)
+end
+
+function images.print(i,...)
+ return table.print(imagetotable(i),...)
+end
+
+local function checkimagesize(size)
+ if size then
+ size = gsub(size,"box","")
+ return imagesizes[size] and size or "crop"
+ else
+ return "crop"
+ end
+end
+
+images.check = checkimage
+images.checksize = checkimagesize
+images.totable = imagetotable
+
+-- local indexed = { }
+--
+-- function images.ofindex(n)
+-- return indexed[n]
+-- end
+
+--- we can consider an grph-ini file
+
+figures = figures or { }
+local figures = figures
+
+figures.images = images
+figures.boxnumber = figures.boxnumber or 0
+figures.defaultsearch = true
+figures.defaultwidth = 0
+figures.defaultheight = 0
+figures.defaultdepth = 0
+figures.nofprocessed = 0
+figures.nofmissing = 0
+figures.preferquality = true -- quality over location
+
+local figures_loaded = allocate() figures.loaded = figures_loaded
+local figures_used = allocate() figures.used = figures_used
+local figures_found = allocate() figures.found = figures_found
+local figures_suffixes = allocate() figures.suffixes = figures_suffixes
+local figures_patterns = allocate() figures.patterns = figures_patterns
+local figures_resources = allocate() figures.resources = figures_resources
+
+local existers = allocate() figures.existers = existers
+local checkers = allocate() figures.checkers = checkers
+local includers = allocate() figures.includers = includers
+local remappers = allocate() figures.remappers = remappers
+local converters = allocate() figures.converters = converters
+local identifiers = allocate() figures.identifiers = identifiers
+local programs = allocate() figures.programs = programs
+
+local defaultformat = "pdf"
+local defaultprefix = "m_k_i_v_"
+
+figures.localpaths = allocate {
+ ".", "..", "../.."
+}
+
+figures.cachepaths = allocate {
+ prefix = "",
+ path = ".",
+ subpath = ".",
+}
+
+local figure_paths = allocate(table.copy(figures.localpaths))
+figures.paths = figure_paths
+
+local figures_order = allocate {
+ "pdf", "mps", "jpg", "png", "jp2", "jbig", "svg", "eps", "tif", "gif", "mov", "buffer", "tex", "cld", "auto",
+}
+
+local figures_formats = allocate { -- magic and order will move here
+ ["pdf"] = { list = { "pdf" } },
+ ["mps"] = { patterns = { "^mps$", "^%d+$" } }, -- we need to anchor
+ ["jpg"] = { list = { "jpg", "jpeg" } },
+ ["png"] = { list = { "png" } },
+ ["jp2"] = { list = { "jp2" } },
+ ["jbig"] = { list = { "jbig", "jbig2", "jb2" } },
+ ["svg"] = { list = { "svg", "svgz" } },
+ ["eps"] = { list = { "eps", "ai" } },
+ ["gif"] = { list = { "gif" } },
+ ["tif"] = { list = { "tif", "tiff" } },
+ ["mov"] = { list = { "mov", "flv", "mp4" } }, -- "avi" is not supported
+ ["buffer"] = { list = { "tmp", "buffer", "buf" } },
+ ["tex"] = { list = { "tex" } },
+ ["cld"] = { list = { "cld" } },
+ ["auto"] = { list = { "auto" } },
+}
+
+local figures_magics = allocate {
+ { format = "png", pattern = P("\137PNG\013\010\026\010") }, -- 89 50 4E 47 0D 0A 1A 0A,
+ { format = "jpg", pattern = P("\255\216\255") }, -- FF D8 FF
+ { format = "jp2", pattern = P("\000\000\000\012\106\080\032\032\013\010"), }, -- 00 00 00 0C 6A 50 20 20 0D 0A },
+ { format = "gif", pattern = P("GIF") },
+ { format = "pdf", pattern = (1 - P("%PDF"))^0 * P("%PDF") },
+}
+
+local figures_native = allocate {
+ pdf = true,
+ jpg = true,
+ jp2 = true,
+ png = true,
+}
+
+figures.formats = figures_formats -- frozen
+figures.magics = figures_magics -- frozen
+figures.order = figures_order -- frozen
+
+-- name checker
+
+local okay = P("m_k_i_v_")
+
+local pattern = (R("az","AZ") * P(":"))^-1 * ( -- a-z : | A-Z :
+ (okay + R("az","09") + S("_/") - P("_")^2)^1 * (P(".") * R("az")^1)^0 * P(-1) + -- a-z | single _ | /
+ (okay + R("az","09") + S("-/") - P("-")^2)^1 * (P(".") * R("az")^1)^0 * P(-1) + -- a-z | single - | /
+ (okay + R("AZ","09") + S("_/") - P("_")^2)^1 * (P(".") * R("AZ")^1)^0 * P(-1) + -- A-Z | single _ | /
+ (okay + R("AZ","09") + S("-/") - P("-")^2)^1 * (P(".") * R("AZ")^1)^0 * P(-1) -- A-Z | single - | /
+) * Cc(false) + Cc(true)
+
+function figures.badname(name)
+ if not name then
+ -- bad anyway
+ elseif not hasscheme(name) then
+ return lpegmatch(pattern,name)
+ else
+ return lpegmatch(pattern,file.basename(name))
+ end
+end
+
+logs.registerfinalactions(function()
+ local done = false
+ if trace_usage and figures.nofprocessed > 0 then
+ logs.startfilelogging(report,"names")
+ for _, data in sortedhash(figures_found) do
+ if done then
+ report()
+ else
+ done = true
+ end
+ report("asked : %s",data.askedname)
+ if data.found then
+ report("format : %s",data.format)
+ report("found : %s",data.foundname)
+ report("used : %s",data.fullname)
+ if data.badname then
+ report("comment : %s","bad name")
+ elseif data.comment then
+ report("comment : %s",data.comment)
+ end
+ else
+ report("comment : %s","not found")
+ end
+ end
+ logs.stopfilelogging()
+ end
+ if figures.nofmissing > 0 and logs.loggingerrors() then
+ logs.starterrorlogging(report,"missing figures")
+ for _, data in sortedhash(figures_found) do
+ report("%w%s",6,data.askedname)
+ end
+ logs.stoperrorlogging()
+ end
+end)
+
+-- We can set the order but only indirectly so that we can check for support.
+
+function figures.setorder(list) -- can be table or string
+ if type(list) == "string" then
+ list = settings_to_array(list)
+ end
+ if list and #list > 0 then
+ figures_order = allocate()
+ figures.order = figures_order
+ local done = { } -- just to be sure in case the list is generated
+ for i=1,#list do
+ local l = lower(list[i])
+ if figures_formats[l] and not done[l] then
+ figures_order[#figures_order+1] = l
+ done[l] = true
+ end
+ end
+ report_inclusion("lookup order % a",figures_order)
+ else
+ -- invalid list
+ end
+end
+
+local function guessfromstring(str)
+ if str then
+ for i=1,#figures_magics do
+ local pattern = figures_magics[i]
+ if lpegmatch(pattern.pattern,str) then
+ local format = pattern.format
+ if trace_figures then
+ report_inclusion("file %a has format %a",filename,format)
+ end
+ return format
+ end
+ end
+ end
+end
+
+figures.guessfromstring = guessfromstring
+
+function figures.guess(filename)
+ local f = io.open(filename,'rb')
+ if f then
+ local str = f:read(100)
+ f:close()
+ if str then
+ return guessfromstring(str)
+ end
+ end
+end
+
+local function setlookups() -- tobe redone .. just set locals
+ figures_suffixes = allocate()
+ figures_patterns = allocate()
+ for _, format in next, figures_order do
+ local data = figures_formats[format]
+ local list = data.list
+ if list then
+ for i=1,#list do
+ figures_suffixes[list[i]] = format -- hash
+ end
+ else
+ figures_suffixes[format] = format
+ end
+ local patterns = data.patterns
+ if patterns then
+ for i=1,#patterns do
+ figures_patterns[#figures_patterns+1] = { patterns[i], format } -- array
+ end
+ end
+ end
+ figures.suffixes = figures_suffixes
+ figures.patterns = figures_patterns
+end
+
+setlookups()
+
+figures.setlookups = setlookups
+
+function figures.registerresource(t)
+ local n = #figures_resources + 1
+ figures_resources[n] = t
+ return n
+end
+
+local function register(tag,what,target)
+ local data = figures_formats[target] -- resolver etc
+ if not data then
+ data = { }
+ figures_formats[target] = data
+ end
+ local d = data[tag] -- list or pattern
+ if d and not contains(d,what) then
+ d[#d+1] = what -- suffix or patternspec
+ else
+ data[tag] = { what }
+ end
+ if not contains(figures_order,target) then
+ figures_order[#figures_order+1] = target
+ end
+ setlookups()
+end
+
+function figures.registersuffix (suffix, target) register('list',suffix,target) end
+function figures.registerpattern(pattern,target) register('pattern',pattern,target) end
+
+implement { name = "registerfiguresuffix", actions = register, arguments = { "'list'", "string", "string" } }
+implement { name = "registerfigurepattern", actions = register, arguments = { "'pattern'", "string", "string" } }
+
+local last_locationset = last_locationset or nil
+local last_pathlist = last_pathlist or nil
+
+function figures.setpaths(locationset,pathlist)
+ if last_locationset == locationset and last_pathlist == pathlist then
+ -- this function can be called each graphic so we provide this optimization
+ return
+ end
+ local t, h = figure_paths, settings_to_hash(locationset)
+ if last_locationset ~= locationset then
+ -- change == reset (actually, a 'reset' would indeed reset
+ if h[v_local] then
+ t = table.fastcopy(figures.localpaths or { })
+ else
+ t = { }
+ end
+ figures.defaultsearch = h[v_default]
+ last_locationset = locationset
+ end
+ if h[v_global] then
+ local list = settings_to_array(pathlist)
+ for i=1,#list do
+ local s = list[i]
+ if not contains(t,s) then
+ t[#t+1] = s
+ end
+ end
+ end
+ figure_paths = t
+ last_pathlist = pathlist
+ figures.paths = figure_paths
+ if trace_figures then
+ report_inclusion("using locations %a",last_locationset)
+ report_inclusion("using paths % a",figure_paths)
+ end
+end
+
+implement { name = "setfigurepaths", actions = figures.setpaths, arguments = "2 strings" }
+
+-- check conversions and handle it here
+
+function figures.hash(data)
+ local status = data and data.status
+ return (status and status.hash or tostring(status.private)) or "nohash" -- the <img object>
+end
+
+-- interfacing to tex
+
+local function new() -- we could use metatables status -> used -> request but it needs testing
+ local request = {
+ name = false,
+ label = false,
+ format = false,
+ page = false,
+ width = false,
+ height = false,
+ preview = false,
+ ["repeat"] = false,
+ controls = false,
+ display = false,
+ mask = false,
+ conversion = false,
+ resolution = false,
+ color = false,
+ arguments = false,
+ cache = false,
+ prefix = false,
+ size = false,
+ }
+ local used = {
+ fullname = false,
+ format = false,
+ name = false,
+ path = false,
+ suffix = false,
+ width = false,
+ height = false,
+ }
+ local status = {
+ status = 0,
+ converted = false,
+ cached = false,
+ fullname = false,
+ format = false,
+ }
+ -- this needs checking because we might check for nil, the test case
+ -- is getfiguredimensions which then should return ~= 0
+ -- setmetatableindex(status, used)
+ -- setmetatableindex(used, request)
+ return {
+ request = request,
+ used = used,
+ status = status,
+ }
+end
+
+-- use table.insert|remove
+
+local lastfiguredata = nil -- will be topofstack or last so no { } (else problems with getfiguredimensions)
+local callstack = { }
+
+function figures.initialize(request)
+ local figuredata = new()
+ if request then
+ -- request.width/height are strings and are only used when no natural dimensions
+ -- can be determined; at some point the handlers might set them to numbers instead
+ local w = tonumber(request.width) or 0
+ local h = tonumber(request.height) or 0
+ local p = tonumber(request.page) or 0
+ request.width = w > 0 and w or nil
+ request.height = h > 0 and h or nil
+ --
+ request.page = p > 0 and p or 1
+ request.keepopen = p > 0
+ request.size = checkimagesize(request.size)
+ request.object = request.object == v_yes
+ request["repeat"] = request["repeat"] == v_yes
+ request.preview = request.preview == v_yes
+ request.cache = request.cache ~= "" and request.cache
+ request.prefix = request.prefix ~= "" and request.prefix
+ request.format = request.format ~= "" and request.format
+ request.compact = request.compact == v_yes
+ table.merge(figuredata.request,request)
+ end
+ return figuredata
+end
+
+function figures.push(request)
+ statistics.starttiming(figures)
+ local figuredata = figures.initialize(request) -- we could use table.sparse but we set them later anyway
+ insert(callstack,figuredata)
+ lastfiguredata = figuredata
+ return figuredata
+end
+
+function figures.pop()
+ remove(callstack)
+ lastfiguredata = callstack[#callstack] or lastfiguredata
+ statistics.stoptiming(figures)
+end
+
+function figures.current()
+ return callstack[#callstack] or lastfiguredata
+end
+
+local function get(category,tag,default)
+ local value = lastfiguredata and lastfiguredata[category]
+ value = value and value[tag]
+ if not value or value == "" or value == true then
+ return default or ""
+ else
+ return value
+ end
+end
+
+local function setdimensions(box)
+ local status = lastfiguredata and lastfiguredata.status
+ local used = lastfiguredata and lastfiguredata.used
+ if status and used then
+ local b = texgetbox(box)
+ local w = b.width
+ local h = b.height + b.depth
+ status.width = w
+ status.height = h
+ used.width = w
+ used.height = h
+ status.status = 10
+ end
+end
+
+figures.get = get
+figures.set = setdimensions
+
+implement { name = "figurestatus", actions = { get, context }, arguments = { "'status'", "string", "string" } }
+implement { name = "figurerequest", actions = { get, context }, arguments = { "'request'", "string", "string" } }
+implement { name = "figureused", actions = { get, context }, arguments = { "'used'", "string", "string" } }
+
+implement { name = "figurefilepath", public = true, actions = { get, file.dirname, context }, arguments = { "'used'", "'fullname'" } }
+implement { name = "figurefilename", public = true, actions = { get, file.nameonly, context }, arguments = { "'used'", "'fullname'" } }
+implement { name = "figurefiletype", public = true, actions = { get, file.extname, context }, arguments = { "'used'", "'fullname'" } }
+
+implement { name = "figuresetdimensions", actions = setdimensions, arguments = "integer" }
+
+-- todo: local path or cache path
+
+local function forbiddenname(filename)
+ if not filename or filename == "" then
+ return false
+ end
+ local expandedfullname = collapsepath(filename,true)
+ local expandedinputname = collapsepath(file.addsuffix(environment.jobfilename,environment.jobfilesuffix),true)
+ if expandedfullname == expandedinputname then
+ report_inclusion("skipping graphic with same name as input filename %a, enforce suffix",expandedinputname)
+ return true
+ end
+ local expandedoutputname = collapsepath(codeinjections.getoutputfilename(),true)
+ if expandedfullname == expandedoutputname then
+ report_inclusion("skipping graphic with same name as output filename %a, enforce suffix",expandedoutputname)
+ return true
+ end
+end
+
+local function rejected(specification)
+ if extra_check then
+ local fullname = specification.fullname
+ if fullname and figures_native[file.suffix(fullname)] and not figures.guess(fullname) then
+ specification.comment = "probably a bad file"
+ specification.found = false
+ specification.error = true
+ report_inclusion("file %a looks bad",fullname)
+ return true
+ end
+ end
+end
+
+local function wipe(str)
+ if str == "" or str == "default" or str == "unknown" then
+ return nil
+ else
+ return str
+ end
+end
+
+local function register(askedname,specification)
+ if not specification then
+ specification = { askedname = askedname, comment = "invalid specification" }
+ elseif forbiddenname(specification.fullname) then
+ specification = { askedname = askedname, comment = "forbidden name" }
+ elseif specification.internal then
+ -- no filecheck needed
+ specification.found = true
+ if trace_figures then
+ report_inclusion("format %a internally supported by engine",specification.format)
+ end
+ elseif not rejected(specification) then
+ local format = specification.format
+ if format then
+ local conversion = wipe(specification.conversion)
+ local resolution = wipe(specification.resolution)
+ local arguments = wipe(specification.arguments)
+ local newformat = conversion
+ if not newformat or newformat == "" then
+ newformat = defaultformat
+ end
+ if trace_conversion then
+ report_inclusion("checking conversion of %a, fullname %a, old format %a, new format %a, conversion %a, resolution %a, arguments %a",
+ askedname,
+ specification.fullname,
+ format,
+ newformat,
+ conversion or "default",
+ resolution or "default",
+ arguments or ""
+ )
+ end
+ -- begin of quick hack
+ local remapper = remappers[format]
+ if remapper then
+ remapper = remapper[conversion]
+ if remapper then
+ specification = remapper(specification) or specification
+ format = specification.format
+ newformat = format
+ conversion = nil
+ end
+ end
+ -- end of quick hack
+ local converter = (not remapper) and (newformat ~= format or resolution or arguments) and converters[format]
+ if converter then
+ local okay = converter[newformat]
+ if okay then
+ converter = okay
+ else
+ newformat = defaultformat
+ converter = converter[newformat]
+ end
+ elseif trace_conversion then
+ report_inclusion("no converter for %a to %a",format,newformat)
+ end
+ if converter then
+ -- todo: make this a function
+ --
+ -- todo: outline as helper function
+ --
+ local oldname = specification.fullname
+ local newpath = file.dirname(oldname)
+ local oldbase = file.basename(oldname)
+ --
+ -- problem: we can have weird filenames, like a.b.c (no suffix) and a.b.c.gif
+ -- so we cannot safely remove a suffix (unless we do that for known suffixes)
+ --
+ -- local newbase = file.removesuffix(oldbase) -- assumes a known suffix
+ --
+ -- so we now have (also see *):
+ --
+ local newbase = oldbase
+ --
+ local fc = specification.cache or figures.cachepaths.path
+ if fc and fc ~= "" and fc ~= "." then
+ newpath = gsub(fc,"%*",newpath) -- so cachedir can be "/data/cache/*"
+ else
+ newbase = defaultprefix .. newbase
+ end
+ local subpath = specification.subpath or figures.cachepaths.subpath
+ if subpath and subpath ~= "" and subpath ~= "." then
+ newpath = newpath .. "/" .. subpath
+ end
+ if not isdir(newpath) then
+ dir.makedirs(newpath)
+ if not file.is_writable(newpath) then
+ if trace_conversion then
+ report_inclusion("path %a is not writable, forcing conversion path %a",newpath,".")
+ end
+ newpath = "."
+ end
+ end
+ local prefix = specification.prefix or figures.cachepaths.prefix
+ if prefix and prefix ~= "" then
+ newbase = prefix .. newbase
+ end
+ local hash = ""
+ if resolution then
+ hash = hash .. "[r:" .. resolution .. "]"
+ end
+ if arguments then
+ hash = hash .. "[a:" .. arguments .. "]"
+ end
+ if hash ~= "" then
+ newbase = newbase .. "_" .. md5.hex(hash)
+ end
+ --
+ -- see *, we had:
+ --
+ -- local newbase = file.addsuffix(newbase,newformat)
+ --
+ -- but now have (result of Aditya's web image testing):
+ --
+ -- as a side effect we can now have multiple fetches with different
+ -- original figures_formats, not that it matters much (apart from older conversions
+ -- sticking around)
+ --
+ local newbase = newbase .. "." .. newformat
+ local newname = file.join(newpath,newbase)
+ oldname = collapsepath(oldname)
+ newname = collapsepath(newname)
+ local oldtime = modificationtime(oldname) or 0
+ local newtime = modificationtime(newname) or 0
+ if newtime == 0 or oldtime > newtime then
+ if trace_conversion then
+ report_inclusion("converting %a (%a) from %a to %a",askedname,oldname,format,newformat)
+ end
+ converter(oldname,newname,resolution or "", arguments or "")
+ else
+ if trace_conversion then
+ report_inclusion("no need to convert %a (%a) from %a to %a",askedname,oldname,format,newformat)
+ end
+ end
+ if io.exists(newname) and io.size(newname) > 0 then
+ specification.foundname = oldname
+ specification.fullname = newname
+ specification.prefix = prefix
+ specification.subpath = subpath
+ specification.converted = true
+ format = newformat
+ if not figures_suffixes[format] then
+ -- maybe the new format is lowres.png (saves entry in suffixes)
+ -- so let's do this extra check
+ local suffix = file.suffix(newformat)
+ if figures_suffixes[suffix] then
+ if trace_figures then
+ report_inclusion("using suffix %a as format for %a",suffix,format)
+ end
+ format = suffix
+ end
+ end
+ specification.format = format
+ elseif io.exists(oldname) then
+ report_inclusion("file %a is bugged",oldname)
+ if format and imagetypes[format] then
+ specification.fullname = oldname
+ end
+ specification.converted = false
+ specification.bugged = true
+ end
+ end
+ end
+ if format then
+ local found = figures_suffixes[format]
+ if not found then
+ specification.found = false
+ if trace_figures then
+ report_inclusion("format %a is not supported",format)
+ end
+ elseif imagetypes[format] then
+ specification.found = true
+ if trace_figures then
+ report_inclusion("format %a natively supported by backend",format)
+ end
+ else
+ specification.found = true -- else no foo.1 mps conversion
+ if trace_figures then
+ report_inclusion("format %a supported by output file format",format)
+ end
+ end
+ else
+ specification.askedname = askedname
+ specification.found = false
+ end
+ end
+ if specification.found then
+ specification.foundname = specification.foundname or specification.fullname
+ else
+ specification.foundname = nil
+ end
+ specification.badname = figures.badname(askedname)
+ local askedhash = f_hash_part(
+ askedname,
+ specification.conversion or "default",
+ specification.resolution or "default",
+ specification.arguments or ""
+ )
+ figures_found[askedhash] = specification
+ if not specification.found then
+ figures.nofmissing = figures.nofmissing + 1
+ end
+ return specification
+end
+
+local resolve_too = false -- true
+
+local internalschemes = {
+ file = true,
+ tree = true,
+ dirfile = true,
+ dirtree = true,
+}
+
+local function locate(request) -- name, format, cache
+ -- not resolvers.cleanpath(request.name) as it fails on a!b.pdf and b~c.pdf
+ -- todo: more restricted cleanpath
+ local askedname = request.name or ""
+ local askedcache = request.cache
+ local askedconversion = request.conversion
+ local askedresolution = request.resolution
+ local askedarguments = request.arguments
+ local askedhash = f_hash_part(
+ askedname,
+ askedconversion or "default",
+ askedresolution or "default",
+ askedarguments or ""
+ )
+ local foundname = figures_found[askedhash]
+ if foundname then
+ return foundname
+ end
+ --
+ --
+ local askedformat = request.format
+ if not askedformat or askedformat == "" or askedformat == "unknown" then
+ askedformat = file.suffix(askedname) or ""
+ elseif askedformat == v_auto then
+ if trace_figures then
+ report_inclusion("ignoring suffix of %a",askedname)
+ end
+ askedformat = ""
+ askedname = file.removesuffix(askedname)
+ end
+ -- protocol check
+ local hashed = urlhashed(askedname)
+ if not hashed then
+ -- go on
+ elseif internalschemes[hashed.scheme] then
+ local path = hashed.path
+ if path and path ~= "" then
+ askedname = path
+ end
+ else
+ local foundname = resolvers.findbinfile(askedname)
+ if not foundname or not isfile(foundname) then -- foundname can be dummy
+ if trace_figures then
+ report_inclusion("unknown url %a",askedname)
+ end
+ -- url not found
+ return register(askedname)
+ end
+ local guessedformat = figures.guess(foundname)
+ if askedformat ~= guessedformat then
+ if trace_figures then
+ report_inclusion("url %a has unknown format",askedname)
+ end
+ -- url found, but wrong format
+ return register(askedname)
+ else
+ if trace_figures then
+ report_inclusion("url %a is resolved to %a",askedname,foundname)
+ end
+ return register(askedname, {
+ askedname = askedname,
+ fullname = foundname,
+ format = askedformat,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+ end
+ end
+ -- we could use the hashed data instead
+ local askedpath = file.is_rootbased_path(askedname)
+ local askedbase = file.basename(askedname)
+ if askedformat ~= "" then
+ askedformat = lower(askedformat)
+ if trace_figures then
+ report_inclusion("forcing format %a",askedformat)
+ end
+ local format = figures_suffixes[askedformat]
+ if not format then
+ for i=1,#figures_patterns do
+ local pattern = figures_patterns[i]
+ if find(askedformat,pattern[1]) then
+ format = pattern[2]
+ if trace_figures then
+ report_inclusion("asked format %a matches %a",askedformat,pattern[1])
+ end
+ break
+ end
+ end
+ end
+ if format then
+ local foundname, quitscanning, forcedformat, internal = figures.exists(askedname,format,resolve_too) -- not askedformat
+ if foundname then
+ return register(askedname, {
+ askedname = askedname,
+ fullname = foundname, -- askedname,
+ format = forcedformat or format,
+ cache = askedcache,
+ -- foundname = foundname, -- no
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ internal = internal,
+ })
+ elseif quitscanning then
+ return register(askedname)
+ end
+ askedformat = format -- new per 2013-08-05
+ elseif trace_figures then
+ report_inclusion("unknown format %a",askedformat)
+ end
+ if askedpath then
+ -- path and type given, todo: strip pieces of path
+ local foundname, quitscanning, forcedformat = figures.exists(askedname,askedformat,resolve_too)
+ if foundname then
+ return register(askedname, {
+ askedname = askedname,
+ fullname = foundname, -- askedname,
+ format = forcedformat or askedformat,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+ end
+ else
+ -- type given
+ for i=1,#figure_paths do
+ local path = resolveprefix(figure_paths[i]) -- we resolve (e.g. jobfile:)
+ local check = path .. "/" .. askedname
+ -- we pass 'true' as it can be an url as well, as the type
+ -- is given we don't waste much time
+ local foundname, quitscanning, forcedformat = figures.exists(check,askedformat,resolve_too)
+ if foundname then
+ return register(check, {
+ askedname = askedname,
+ fullname = foundname, -- check,
+ format = askedformat,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+ end
+ end
+ if figures.defaultsearch then
+ local check = resolvers.findfile(askedname)
+ if check and check ~= "" then
+ return register(askedname, {
+ askedname = askedname,
+ fullname = check,
+ format = askedformat,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+ end
+ end
+ end
+ elseif askedpath then
+ if trace_figures then
+ report_inclusion("using rootbased path")
+ end
+ for i=1,#figures_order do
+ local format = figures_order[i]
+ local list = figures_formats[format].list or { format }
+ for j=1,#list do
+ local suffix = list[j]
+ local check = file.addsuffix(askedname,suffix)
+ local foundname, quitscanning, forcedformat = figures.exists(check,format,resolve_too)
+ if foundname then
+ return register(askedname, {
+ askedname = askedname,
+ fullname = foundname, -- check,
+ format = forcedformat or format,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+ end
+ end
+ end
+ else
+ if figures.preferquality then
+ if trace_figures then
+ report_inclusion("unknown format, quality preferred")
+ end
+ for j=1,#figures_order do
+ local format = figures_order[j]
+ local list = figures_formats[format].list or { format }
+ for k=1,#list do
+ local suffix = list[k]
+ -- local name = file.replacesuffix(askedbase,suffix)
+ local name = file.replacesuffix(askedname,suffix)
+ for i=1,#figure_paths do
+ local path = resolveprefix(figure_paths[i]) -- we resolve (e.g. jobfile:)
+ local check = path .. "/" .. name
+ local isfile = internalschemes[urlhashed(check).scheme]
+ if not isfile then
+ if trace_figures then
+ report_inclusion("warning: skipping path %a",path)
+ end
+ else
+ local foundname, quitscanning, forcedformat = figures.exists(check,format,resolve_too) -- true)
+ if foundname then
+ return register(askedname, {
+ askedname = askedname,
+ fullname = foundname, -- check
+ format = forcedformat or format,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments
+ })
+ end
+ end
+ end
+ end
+ end
+ else -- 'location'
+ if trace_figures then
+ report_inclusion("unknown format, using path strategy")
+ end
+ for i=1,#figure_paths do
+ local path = resolveprefix(figure_paths[i]) -- we resolve (e.g. jobfile:)
+ for j=1,#figures_order do
+ local format = figures_order[j]
+ local list = figures_formats[format].list or { format }
+ for k=1,#list do
+ local suffix = list[k]
+ local check = path .. "/" .. file.replacesuffix(askedbase,suffix)
+ local foundname, quitscanning, forcedformat = figures.exists(check,format,resolve_too)
+ if foundname then
+ return register(askedname, {
+ askedname = askedname,
+ fullname = foudname, -- check,
+ format = forcedformat or format,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+ end
+ end
+ end
+ end
+ end
+ if figures.defaultsearch then
+ if trace_figures then
+ report_inclusion("using default tex path")
+ end
+ for j=1,#figures_order do
+ local format = figures_order[j]
+ local list = figures_formats[format].list or { format }
+ for k=1,#list do
+ local suffix = list[k]
+ local check = resolvers.findfile(file.replacesuffix(askedname,suffix))
+ if check and check ~= "" then
+ return register(askedname, {
+ askedname = askedname,
+ fullname = check,
+ format = format,
+ cache = askedcache,
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+ end
+ end
+ end
+ end
+ end
+ return register(askedname, { -- these two are needed for hashing 'found'
+ conversion = askedconversion,
+ resolution = askedresolution,
+ arguments = askedarguments,
+ })
+end
+
+-- -- -- plugins -- -- --
+
+function identifiers.default(data)
+ local dr, du, ds = data.request, data.used, data.status
+ local l = locate(dr)
+ local foundname = l.foundname
+ local fullname = l.fullname or foundname
+ if fullname then
+ du.format = l.format or false
+ du.fullname = fullname -- can be cached
+ ds.fullname = foundname -- original
+ ds.format = l.format
+ ds.status = (l.bugged and 0) or (l.found and 10) or 0
+ end
+ return data
+end
+
+function figures.identify(data)
+ data = data or callstack[#callstack] or lastfiguredata
+ if data then
+ local list = identifiers.list -- defined at the end
+ for i=1,#list do
+ local identifier = list[i]
+ local data = identifier(data)
+-- if data and (not data.status and data.status.status > 0) then
+ if data and (not data.status and data.status.status > 0) then
+ break
+ end
+ end
+ end
+ return data
+end
+
+function figures.exists(askedname,format,resolve)
+ return (existers[format] or existers.generic)(askedname,resolve)
+end
+
+function figures.check(data)
+ data = data or callstack[#callstack] or lastfiguredata
+ return (checkers[data.status.format] or checkers.generic)(data)
+end
+
+local used_images = { }
+
+statistics.register("used graphics",function()
+ if trace_usage then
+ local filename = file.nameonly(environment.jobname) .. "-figures-usage.lua"
+ if next(figures_found) then
+ local found = { }
+ for _, data in sortedhash(figures_found) do
+ found[#found+1] = data
+ for k, v in next, data do
+ if v == false or v == "" then
+ data[k] = nil
+ end
+ end
+ end
+ for i=1,#used_images do
+ local u = used_images[i]
+ local s = u.status
+ if s then
+ s.status = nil -- doesn't say much here
+ if s.error then
+ u.used = { } -- better show that it's not used
+ end
+ end
+ for _, t in next, u do
+ for k, v in next, t do
+ if v == false or v == "" or k == "private" then
+ t[k] = nil
+ end
+ end
+ end
+ end
+ table.save(filename,{
+ found = found,
+ used = used_images,
+ } )
+ return format("log saved in '%s'",filename)
+ else
+ os.remove(filename)
+ end
+ end
+end)
+
+function figures.include(data)
+ data = data or callstack[#callstack] or lastfiguredata
+ if trace_usage then
+ used_images[#used_images+1] = data
+ end
+ return (includers[data.status.format] or includers.generic)(data)
+end
+
+function figures.scale(data) -- will become lua code
+ data = data or callstack[#callstack] or lastfiguredata
+ ctx_doscalefigure()
+ return data
+end
+
+function figures.done(data)
+ figures.nofprocessed = figures.nofprocessed + 1
+ data = data or callstack[#callstack] or lastfiguredata
+ local dr, du, ds, nr = data.request, data.used, data.status, figures.boxnumber
+ local box = texgetbox(nr)
+ ds.width = box.width
+ ds.height = box.height
+ -- somehow this fails on some of tacos files
+ -- ds.xscale = ds.width /(du.width or 1)
+ -- ds.yscale = ds.height/(du.height or 1)
+ -- du.width and du.height can be false
+ if du.width and du.height and du.width > 0 and du.height > 0 then
+ ds.xscale = ds.width /du.width
+ ds.yscale = ds.height/du.height
+ elseif du.xsize and du.ysize and du.xsize > 0 and du.ysize > 0 then
+ ds.xscale = ds.width /du.xsize
+ ds.yscale = ds.height/du.ysize
+ else
+ ds.xscale = 1
+ ds.yscale = 1
+ end
+ -- sort of redundant but can be limited
+ ds.page = ds.page or du.page or dr.page
+ return data
+end
+
+function figures.dummy(data)
+ data = data or callstack[#callstack] or lastfiguredata
+ local dr, du, nr = data.request, data.used, figures.boxnumber
+ local box = hpack(node.new("hlist")) -- we need to set the dir (luatex 0.60 buglet)
+ du.width = du.width or figures.defaultwidth
+ du.height = du.height or figures.defaultheight
+ du.depth = du.depth or figures.defaultdepth
+ box.width = du.width
+ box.height = du.height
+ box.depth = du.depth
+ texsetbox(nr,box) -- hm, should be global (to be checked for consistency)
+end
+
+-- -- -- generic -- -- --
+
+function existers.generic(askedname,resolve)
+ -- not findbinfile
+ local result
+ if hasscheme(askedname) then
+ result = resolvers.findbinfile(askedname)
+ elseif isfile(askedname) then
+ result = askedname
+ elseif resolve then
+ result = resolvers.findbinfile(askedname)
+ end
+ if not result or result == "" then
+ result = false
+ end
+ if trace_figures then
+ if result then
+ report_inclusion("%a resolved to %a",askedname,result)
+ else
+ report_inclusion("%a cannot be resolved",askedname)
+ end
+ end
+ return result
+end
+
+-- pdf : 0-3: 0 90 180 270
+-- jpeg: 0 unset 1-4: 0 90 180 270 5-8: flipped r/c
+
+local transforms = setmetatableindex (
+ {
+ ["orientation-1"] = 0, ["R0"] = 0,
+ ["orientation-2"] = 4, ["R0MH"] = 4,
+ ["orientation-3"] = 2, ["R180"] = 2,
+ ["orientation-4"] = 6, ["R0MV"] = 6,
+ ["orientation-5"] = 5, ["R270MH"] = 5,
+ ["orientation-6"] = 3, ["R90"] = 3,
+ ["orientation-7"] = 7, ["R90MH"] = 7,
+ ["orientation-8"] = 1, ["R270"] = 1,
+ },
+ function(t,k) -- transforms are 0 .. 7
+ local v = tonumber(k) or 0
+ if v < 0 or v > 7 then
+ v = 0
+ end
+ t[k] = v
+ return v
+ end
+)
+
+local function checktransform(figure,forced)
+ if auto_transform then
+
+ local orientation = (forced ~= "" and forced ~= v_auto and forced) or figure.orientation or 0
+ local transform = transforms["orientation-"..orientation]
+ figure.transform = transform
+ if odd(transform) then
+ return figure.height, figure.width
+ else
+ return figure.width, figure.height
+ end
+ end
+end
+
+local pagecount = { }
+
+function checkers.generic(data)
+ local dr, du, ds = data.request, data.used, data.status
+ local name = du.fullname or "unknown generic"
+ local page = du.page or dr.page
+ local size = dr.size or "crop"
+ local color = dr.color or "natural"
+ local mask = dr.mask or "none"
+ local conversion = dr.conversion
+ local resolution = dr.resolution
+ local arguments = dr.arguments
+ local scanimage = dr.scanimage or scanimage
+ local userpassword = dr.userpassword
+ local ownerpassword = dr.ownerpassword
+ if not conversion or conversion == "" then
+ conversion = "default"
+ end
+ if not resolution or resolution == "" then
+ resolution = "default"
+ end
+ if not arguments or arguments == "" then
+ arguments = "default"
+ end
+ local hash = f_hash_full(
+ name,
+ page,
+ size,
+ color,
+ mask,
+ conversion,
+ resolution,
+ arguments
+ )
+ --
+ local figure = figures_loaded[hash]
+ if figure == nil then
+ figure = createimage {
+ filename = name,
+ page = page,
+ pagebox = dr.size,
+ keepopen = dr.keepopen or false,
+ userpassword = userpassword,
+ ownerpassword = ownerpassword,
+ -- visiblefilename = "", -- this prohibits the full filename ending up in the file
+ }
+ codeinjections.setfigurecolorspace(data,figure)
+ codeinjections.setfiguremask(data,figure)
+ if figure then
+ -- new, bonus check (a bogus check in lmtx)
+ if page and page > 1 then
+ local f = scanimage {
+ filename = name,
+ userpassword = userpassword,
+ ownerpassword = ownerpassword,
+ }
+ if f and f.page and f.pages < page then
+ report_inclusion("no page %i in %a, using page 1",page,name)
+ page = 1
+ figure.page = page
+ end
+ end
+ -- till here
+ local f, comment = checkimage(scanimage(figure))
+ if not f then
+ ds.comment = comment
+ ds.found = false
+ ds.error = true
+ end
+ if figure.attr and not f.attr then
+ -- tricky as img doesn't allow it
+ f.attr = figure.attr
+ end
+ if dr.cmyk == v_yes then
+ f.enforcecmyk = true
+ elseif dr.cmyk == v_auto and attributes.colors.model == "cmyk" then
+ f.enforcecmyk = true
+ end
+ figure = f
+ end
+ local f, d = codeinjections.setfigurealternative(data,figure)
+ figure = f or figure
+ data = d or data
+ figures_loaded[hash] = figure
+ if trace_conversion then
+ report_inclusion("new graphic, using hash %a",hash)
+ end
+ else
+ if trace_conversion then
+ report_inclusion("existing graphic, using hash %a",hash)
+ end
+ end
+ if figure then
+ local width, height = checktransform(figure,dr.transform)
+ --
+ du.width = width
+ du.height = height
+ du.pages = figure.pages
+ du.depth = figure.depth or 0
+ du.colordepth = figure.colordepth or 0
+ du.xresolution = figure.xres or 0
+ du.yresolution = figure.yres or 0
+ du.xsize = figure.xsize or 0
+ du.ysize = figure.ysize or 0
+ du.rotation = figure.rotation or 0 -- in pdf multiples or 90% in jpeg 1
+ du.orientation = figure.orientation or 0 -- jpeg 1 2 3 4 (0=unset)
+ ds.private = figure
+ ds.hash = hash
+ end
+ return data
+end
+
+local nofimages = 0
+local pofimages = { }
+
+function figures.getrealpage(index)
+ return pofimages[index] or 0
+end
+
+local function updatepage(specification)
+ local n = specification.n
+ pofimages[n] = pofimages[n] or tex.count.realpageno -- so when reused we register the first one only
+end
+
+function includers.generic(data)
+ local dr, du, ds = data.request, data.used, data.status
+ -- here we set the 'natural dimensions'
+ dr.width = du.width
+ dr.height = du.height
+ local hash = figures.hash(data)
+ local figure = figures_used[hash]
+ -- figures.registerresource {
+ -- filename = du.fullname,
+ -- width = dr.width,
+ -- height = dr.height,
+ -- }
+ if figure == nil then
+ figure = ds.private -- the img object
+ if figure then
+ figure = (dr.copyimage or copyimage)(figure)
+ if figure then
+ figure.width = dr.width or figure.width
+ figure.height = dr.height or figure.height
+ end
+ end
+ figures_used[hash] = figure
+ end
+ if figure then
+ local nr = figures.boxnumber
+ nofimages = nofimages + 1
+ ds.pageindex = nofimages
+ local image = wrapimage(figure)
+ local pager = new_latelua { action = updatepage, n = nofimages }
+ image.next = pager
+ pager.prev = image
+ local box = hpack(image)
+ box.width = figure.width
+ box.height = figure.height
+ box.depth = 0
+ texsetbox(nr,box)
+ ds.objectnumber = figure.objnum
+ -- indexed[figure.index] = figure
+ ctx_relocateexternalfigure()
+ end
+ return data
+end
+
+-- -- -- nongeneric -- -- --
+
+local function checkers_nongeneric(data,command) -- todo: macros and context.*
+ local dr, du, ds = data.request, data.used, data.status
+ local name = du.fullname or "unknown nongeneric"
+ local hash = name
+ if dr.object then
+ -- hm, bugged ... waiting for an xform interface
+ if not objects.data["FIG"][hash] then
+ if type(command) == "function" then
+ command()
+ end
+ ctx_dosetfigureobject("FIG",hash)
+ end
+ ctx_doboxfigureobject("FIG",hash)
+ elseif type(command) == "function" then
+ command()
+ end
+ return data
+end
+
+local function includers_nongeneric(data)
+ return data
+end
+
+checkers.nongeneric = checkers_nongeneric
+includers.nongeneric = includers_nongeneric
+
+-- -- -- mov -- -- --
+
+function checkers.mov(data)
+ local dr, du, ds = data.request, data.used, data.status
+ local width = todimen(dr.width or figures.defaultwidth)
+ local height = todimen(dr.height or figures.defaultheight)
+ local foundname = du.fullname
+ dr.width, dr.height = width, height
+ du.width, du.height, du.foundname = width, height, foundname
+ if trace_inclusion then
+ report_inclusion("including movie %a, width %p, height %p",foundname,width,height)
+ end
+ -- we need to push the node.write in between ... we could make a shared helper for this
+ ctx_startfoundexternalfigure(width .. "sp",height .. "sp")
+ context(function()
+ nodeinjections.insertmovie {
+ width = width,
+ height = height,
+ factor = bpfactor,
+ ["repeat"] = dr["repeat"],
+ controls = dr.controls,
+ preview = dr.preview,
+ label = dr.label,
+ foundname = foundname,
+ }
+ end)
+ ctx_stopfoundexternalfigure()
+ return data
+end
+
+includers.mov = includers.nongeneric
+
+-- -- -- mps -- -- --
+
+internalschemes.mprun = true
+
+-- mprun.foo.1 mprun.6 mprun:foo.2
+
+local ctx_docheckfiguremprun = context.docheckfiguremprun
+local ctx_docheckfiguremps = context.docheckfiguremps
+
+local function internal(askedname)
+ local spec, mprun, mpnum = match(lower(askedname),"mprun([:%.]?)(.-)%.(%d+)")
+ -- mpnum = tonumber(mpnum) or 0 -- can be string or number, fed to context anyway
+ if spec ~= "" then
+ return mprun, mpnum
+ else
+ return "", mpnum
+ end
+end
+
+function existers.mps(askedname)
+ local mprun, mpnum = internal(askedname)
+ if mpnum then
+ return askedname, true, "mps", true
+ else
+ return existers.generic(askedname)
+ end
+end
+
+function checkers.mps(data)
+ local mprun, mpnum = internal(data.used.fullname)
+ if mpnum then
+ return checkers_nongeneric(data,function() ctx_docheckfiguremprun(mprun,mpnum) end)
+ else
+ return checkers_nongeneric(data,function() ctx_docheckfiguremps(data.used.fullname) end)
+ end
+end
+
+includers.mps = includers.nongeneric
+
+-- -- -- tex -- -- --
+
+local ctx_docheckfiguretex = context.docheckfiguretex
+
+function existers.tex(askedname)
+ askedname = resolvers.findfile(askedname)
+ return askedname ~= "" and askedname or false, true, "tex", true
+end
+
+function checkers.tex(data)
+ return checkers_nongeneric(data,function() ctx_docheckfiguretex(data.used.fullname) end)
+end
+
+includers.tex = includers.nongeneric
+
+-- -- -- buffer -- -- --
+
+local ctx_docheckfigurebuffer = context.docheckfigurebuffer
+
+function existers.buffer(askedname)
+ local name = file.nameonly(askedname)
+ local okay = buffers.exists(name)
+ return okay and name, true, "buffer", true -- always quit scanning
+end
+
+function checkers.buffer(data)
+ return checkers_nongeneric(data,function() ctx_docheckfigurebuffer(file.nameonly(data.used.fullname)) end)
+end
+
+includers.buffers = includers.nongeneric
+
+-- -- -- auto -- -- --
+
+function existers.auto(askedname)
+ local name = gsub(askedname, ".auto$", "")
+ local format = figures.guess(name)
+ -- if format then
+ -- report_inclusion("format guess %a for %a",format,name)
+ -- else
+ -- report_inclusion("format guess for %a is not possible",name)
+ -- end
+ return format and name, true, format
+end
+
+checkers.auto = checkers.generic
+includers.auto = includers.generic
+
+-- -- -- cld -- -- --
+
+local ctx_docheckfigurecld = context.docheckfigurecld
+
+function existers.cld(askedname)
+ askedname = resolvers.findfile(askedname)
+ return askedname ~= "" and askedname or false, true, "cld", true
+end
+
+function checkers.cld(data)
+ return checkers_nongeneric(data,function() ctx_docheckfigurecld(data.used.fullname) end)
+end
+
+includers.cld = includers.nongeneric
+
+-- -- -- converters -- -- --
+
+setmetatableindex(converters,"table")
+
+-- We keep this helper because it has been around for a while and therefore it can
+-- be a depedency in an existing workflow.
+
+function programs.makeoptions(options)
+ local to = type(options)
+ return (to == "table" and concat(options," ")) or (to == "string" and options) or ""
+end
+
+function programs.run(binary,argument,variables)
+ local found = nil
+ if type(binary) == "table" then
+ for i=1,#binary do
+ local b = binary[i]
+ found = os.which(b)
+ if found then
+ binary = b
+ break
+ end
+ end
+ if not found then
+ binary = concat(binary, " | ")
+ end
+ elseif binary then
+ found = os.which(match(binary,"[%S]+"))
+ end
+ if type(argument) == "table" then
+ argument = concat(argument," ") -- for old times sake
+ end
+ if not found then
+ report_inclusion("program %a is not installed",binary or "?")
+ elseif not argument or argument == "" then
+ report_inclusion("nothing to run, no arguments for program %a",binary)
+ else
+ -- no need to use the full found filename (found) .. we also don't quote the program
+ -- name any longer as in luatex there is too much messing with these names
+ local command = format([[%s %s]],binary,replacetemplate(longtostring(argument),variables))
+ if trace_conversion or trace_programs then
+ report_inclusion("running command: %s",command)
+ end
+ os.execute(command)
+ end
+end
+
+-- the rest of the code has been moved to grph-con.lua
+
+-- -- -- bases -- -- --
+
+local bases = allocate()
+figures.bases = bases
+
+local bases_list = nil -- index => { basename, fullname, xmlroot }
+local bases_used = nil -- [basename] => { basename, fullname, xmlroot } -- pointer to list
+local bases_found = nil
+local bases_enabled = false
+
+local function reset()
+ bases_list = allocate()
+ bases_used = allocate()
+ bases_found = allocate()
+ bases_enabled = false
+ bases.list = bases_list
+ bases.used = bases_used
+ bases.found = bases_found
+end
+
+reset()
+
+function bases.use(basename)
+ if basename == "reset" then
+ reset()
+ else
+ basename = file.addsuffix(basename,"xml")
+ if not bases_used[basename] then
+ local t = { basename, nil, nil }
+ bases_used[basename] = t
+ bases_list[#bases_list+1] = t
+ if not bases_enabled then
+ bases_enabled = true
+ xml.registerns("rlx","http://www.pragma-ade.com/schemas/rlx") -- we should be able to do this per xml file
+ end
+ if trace_bases then
+ report_inclusion("registering base %a",basename)
+ end
+ end
+ end
+end
+
+implement { name = "usefigurebase", actions = bases.use, arguments = "string" }
+
+local function bases_find(basename,askedlabel)
+ if trace_bases then
+ report_inclusion("checking for %a in base %a",askedlabel,basename)
+ end
+ basename = file.addsuffix(basename,"xml")
+ local t = bases_found[askedlabel]
+ if t == nil then
+ local base = bases_used[basename]
+ local page = 0
+ if base[2] == nil then
+ -- no yet located
+ for i=1,#figure_paths do
+ local path = resolveprefix(figure_paths[i]) -- we resolve (e.g. jobfile:)
+ local xmlfile = path .. "/" .. basename
+ if io.exists(xmlfile) then
+ base[2] = xmlfile
+ base[3] = xml.load(xmlfile)
+ if trace_bases then
+ report_inclusion("base %a loaded",xmlfile)
+ end
+ break
+ end
+ end
+ end
+ t = false
+ if base[2] and base[3] then -- rlx:library
+ for e in xml.collected(base[3],"/(*:library|figurelibrary)/*:figure/*:label") do
+ page = page + 1
+ if xml.text(e) == askedlabel then
+ t = {
+ base = file.replacesuffix(base[2],"pdf"),
+ format = "pdf",
+ name = xml.text(e,"../*:file"), -- to be checked
+ page = page,
+ }
+ bases_found[askedlabel] = t
+ if trace_bases then
+ report_inclusion("figure %a found in base %a",askedlabel,base[2])
+ end
+ return t
+ end
+ end
+ if trace_bases and not t then
+ report_inclusion("figure %a not found in base %a",askedlabel,base[2])
+ end
+ end
+ end
+ return t
+end
+
+-- we can access sequential or by name
+
+local function bases_locate(askedlabel)
+ for i=1,#bases_list do
+ local entry = bases_list[i]
+ local t = bases_find(entry[1],askedlabel,1,true)
+ if t then
+ return t
+ end
+ end
+ return false
+end
+
+function identifiers.base(data)
+ if bases_enabled then
+ local dr, du, ds = data.request, data.used, data.status
+ local fbl = bases_locate(dr.name or dr.label)
+ if fbl then
+ du.page = fbl.page
+ du.format = fbl.format
+ du.fullname = fbl.base
+ ds.fullname = fbl.name
+ ds.format = fbl.format
+ ds.page = fbl.page
+ ds.status = 10
+ end
+ end
+ return data
+end
+
+bases.locate = bases_locate
+bases.find = bases_find
+
+identifiers.list = {
+ identifiers.base,
+ identifiers.default
+}
+
+-- tracing
+
+statistics.register("graphics processing time", function()
+ local nofprocessed = figures.nofprocessed
+ if nofprocessed > 0 then
+ local nofnames, nofbadnames = 0, 0
+ for hash, data in next, figures_found do
+ nofnames = nofnames + 1
+ if data.badname then
+ nofbadnames = nofbadnames + 1
+ end
+ end
+ return format("%s seconds including tex, %s processed images, %s unique asked, %s bad names",
+ statistics.elapsedtime(figures),nofprocessed,nofnames,nofbadnames)
+ else
+ return nil
+ end
+end)
+
+-- helper
+
+function figures.applyratio(width,height,w,h) -- width and height are strings and w and h are numbers
+ if not width or width == "" then
+ if not height or height == "" then
+ return figures.defaultwidth, figures.defaultheight
+ else
+ height = todimen(height)
+ if w and h then
+ return height * w/h, height
+ else
+ return figures.defaultwidth, height
+ end
+ end
+ else
+ width = todimen(width)
+ if not height or height == "" then
+ if w and h then
+ return width, width * h/w
+ else
+ return width, figures.defaultheight
+ end
+ else
+ return width, todimen(height)
+ end
+ end
+end
+
+-- example of simple plugins:
+--
+-- figures.converters.png = {
+-- png = function(oldname,newname,resolution)
+-- local command = string.format('gm convert -depth 1 "%s" "%s"',oldname,newname)
+-- logs.report(string.format("running command %s",command))
+-- os.execute(command)
+-- end,
+-- }
+
+-- local n = "foo.pdf"
+-- local d = figures.getinfo(n)
+-- if d then
+-- for i=1,d.used.pages do
+-- local p = figures.getinfo(n,i)
+-- if p then
+-- local u = p.used
+-- print(u.width,u.height,u.orientation)
+-- end
+-- end
+-- end
+
+function figures.getinfo(name,page)
+ if type(name) == "string" then
+ name = { name = name, page = page }
+ end
+ if name.name then
+ local data = figures.push(name)
+ data = figures.identify(data)
+ if data.status and data.status.status > 0 then
+ data = figures.check(data)
+ end
+ figures.pop()
+ return data
+ end
+end
+
+function figures.getpdfinfo(name,page,metadata)
+ -- not that useful but as we have it for detailed inclusion we can as
+ -- we expose it
+ if type(name) ~= "table" then
+ name = { name = name, page = page, metadata = metadata }
+ end
+ return codeinjections.getinfo(name)
+end
+
+-- interfacing
+
+implement {
+ name = "figure_push",
+ scope = "private",
+ actions = figures.push,
+ arguments = {
+ {
+ { "name" },
+ { "label" },
+ { "page" },
+ { "file" },
+ { "size" },
+ { "object" },
+ { "prefix" },
+ { "cache" },
+ { "format" },
+ { "preset" },
+ { "controls" },
+ { "resources" },
+ { "preview" },
+ { "display" },
+ { "mask" },
+ { "conversion" },
+ { "resolution" },
+ { "color" },
+ { "cmyk" },
+ { "arguments" },
+ { "repeat" },
+ { "transform" },
+ { "compact" },
+ { "width", "dimen" },
+ { "height", "dimen" },
+ { "userpassword" },
+ { "ownerpassword" },
+ }
+ }
+}
+
+-- beware, we get a number passed by default
+
+implement { name = "figure_pop", scope = "private", actions = figures.pop }
+implement { name = "figure_done", scope = "private", actions = figures.done }
+implement { name = "figure_dummy", scope = "private", actions = figures.dummy }
+implement { name = "figure_identify", scope = "private", actions = figures.identify }
+implement { name = "figure_scale", scope = "private", actions = figures.scale }
+implement { name = "figure_check", scope = "private", actions = figures.check }
+implement { name = "figure_include", scope = "private", actions = figures.include }
+
+implement {
+ name = "setfigurelookuporder",
+ actions = figures.setorder,
+ arguments = "string"
+}
+
+implement {
+ name = "figure_reset",
+ scope = "private",
+ arguments = { "integer", "dimen", "dimen" },
+ actions = function(box,width,height)
+ figures.boxnumber = box
+ figures.defaultwidth = width
+ figures.defaultheight = height
+ end
+}
+
+-- require("util-lib-imp-gm")
+--
+-- figures.converters.tif.pdf = function(oldname,newname,resolution)
+-- logs.report("graphics","using gm library to convert %a",oldname)
+-- utilities.graphicmagick.convert {
+-- inputname = oldname,
+-- outputname = newname,
+-- }
+-- end
+--
+-- \externalfigure[t:/sources/hakker1b.tiff]
+
+-- something relatively new:
+
+local registered = { }
+
+local ctx_doexternalfigurerepeat = context.doexternalfigurerepeat
+
+implement {
+ name = "figure_register_page",
+ arguments = "3 strings",
+ actions = function(a,b,c)
+ registered[#registered+1] = { a, b, c }
+ context(#registered)
+ end
+}
+
+implement {
+ name = "figure_nof_registered_pages",
+ actions = function()
+ context(#registered)
+ end
+}
+
+implement {
+ name = "figure_flush_registered_pages",
+ arguments = "string",
+ actions = function(n)
+ local f = registered[tonumber(n)]
+ if f then
+ ctx_doexternalfigurerepeat(f[1],f[2],f[3],n)
+ end
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-inc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/grph-inc.mkxl
new file mode 100644
index 00000000000..3c2e8e5c1d9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-inc.mkxl
@@ -0,0 +1,1073 @@
+%D \module
+%D [ file=grph-inc, % moved from core-fig
+%D version=2006.08.26, % overhaul of 1997.03.31
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Figure Inclusion,
+%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.
+
+% \enabledirectives[graphics.conversion.eps.cleanup.ai]
+
+% \setupexternalfigures[directory=dirfile://./test/**]
+% \externalfigure[crappname(2).eps][frame=on]
+
+% todo: messages
+
+\writestatus{loading}{ConTeXt Graphic Macros / Figure Inclusion}
+
+\registerctxluafile{grph-img}{}
+\registerctxluafile{grph-inc}{autosuffix}
+\registerctxluafile{grph-bmp}{}
+\registerctxluafile{grph-chk}{}
+\registerctxluafile{grph-con}{}
+\registerctxluafile{grph-fil}{}
+%registerctxluafile{grph-mem}{} % obsolete
+\registerctxluafile{grph-u3d}{} % this will become a module
+%registerctxluafile{grph-swf}{} % this will become a module
+
+\unprotect
+
+%D Including graphics is complicated by the fact that we need to locate them first,
+%D optionally manipulate them and scale then next. Lookups are to be done as efficient
+%D as possible and inclusion of the data might happens only once. In \MKIV\ much of this
+%D is delegated to the \LUA\ end. There is not so much less code as in \MKII\ but it's
+%D more powerful, flexible, pluggable and some of the extended functionality has been
+%D moved from modules to the core. The overall functionality is rather stable and has
+%D not changed much over the years.
+
+\ifdefined\dotagfigure \else \aliased\let\dotagfigure\relax \fi
+
+\installcorenamespace{externalfigure}
+\installcorenamespace{externalfigureinstance}
+\installcorenamespace{externalfigurecollection}
+
+\installframedcommandhandler \??externalfigure {externalfigure} \??externalfigure
+
+\aliased\let\setupexternalfigures\setupexternalfigure
+
+\setupexternalfigures[% we really need the defaults
+ \c!method =,
+ \c!label =,
+ \c!size =,
+ \c!conversion =,
+ \c!resolution =,
+ \c!prefix =,
+ \c!cache =,
+ \c!page =\zerocount,
+ \c!file =,
+ \c!display =,
+ \c!mask =,
+ \c!preset =\v!yes,
+ \c!split =,
+ \c!color =,
+ \c!arguments =,
+ \c!symbol =\v!no,
+ \c!controls =\v!no,
+ \c!resources =,
+ \c!preview =\v!no,
+ \c!repeat =\v!no,
+ \c!foregroundcolor=,
+ \c!interaction =\v!none,
+ \c!hfactor =,
+ \c!wfactor =,
+ \c!factor =,
+ \c!defaultwidth =8\lineheight,
+ \c!defaultheight =6\lineheight,
+ \c!maxwidth =\externalfigureparameter\c!width,
+ \c!maxheight =\externalfigureparameter\c!height,
+ \c!xscale =,
+ \c!yscale =,
+ \c!scale =,
+ \c!sx =\externalfigureparameter\c!s,
+ \c!sy =\externalfigureparameter\c!s,
+ \c!s =1,
+ \c!width =,
+ \c!height =,
+ \c!lines =,
+ \c!grid =,
+ \c!bodyfont =\bodyfontsize,
+ \c!object =\v!yes,
+ \c!corner =\v!rectangular,
+ \c!frame =\v!off,
+ \c!option =,
+ \c!reset =\v!no,
+ \c!directory =,
+ \c!radius =.5\bodyfontsize,
+ \c!background =,
+ \c!splitcolor =\s!white,
+ \c!order =,
+ \c!equalwidth =,
+ \c!equalheight =,
+ \c!location ={\v!local,\v!global},
+ \c!frames =\v!off,
+ \c!ymax =24,
+ \c!xmax =,
+ \c!align =\v!none, % New, for Tacos extremely large graphics.
+ \c!crossreference =\v!no,
+ \c!transform =\v!auto,
+ \c!userpassword =,
+ \c!ownerpassword =,
+ \c!compact =,
+ \c!cmyk =,
+ ]
+
+%D Defining figures.
+
+\newcount\c_grph_include_nesting
+
+\newtoks \everyexternalfigureresets % for the moment still public
+\newtoks \everyexternalfigurechecks % for the moment still public
+
+% \useexternalfigure[alpha][cow]
+% \useexternalfigure[beta] [cow] [width=1cm]
+% \useexternalfigure[gamma][cow][alpha]
+% \useexternalfigure[delta][cow][alpha][width=2cm]
+%
+% full width : \externalfigure[cow] \par
+% 3cm width : \externalfigure[cow] [width=3cm] \par
+% full width : \externalfigure[alpha] \par
+% 1cm width : \externalfigure[beta] \par
+% full width : \externalfigure[gamma] \par
+% 2cm width : \externalfigure[delta] \par
+% 4cm width : \externalfigure[beta] [width=4cm] \par
+% 5cm width : \externalfigure[gamma][width=5cm] \par
+%
+% \defineexternalfigure[a][width=10cm]
+% \defineexternalfigure[b][width=5cm]
+% \externalfigure[cow][a]
+% \externalfigure[cow][b][height=8cm]
+%
+% \useexternalfigure[x][cow][width=10cm,height=1cm]
+% \externalfigure[x]
+% \externalfigure[x][width=3cm]
+%
+% [label] [filename]
+% [label] [filename] [parent]
+% [label] [filename] [parent] [settings]
+% [label] [filename] [settings]
+%
+% new: more convenient/efficient than
+%
+% \use..[a][a][setting] \externalfigure[b][a]
+%
+% is equivalent to:
+%
+% \def..[a][setting] \externalfigure[b][a]
+%
+% see x-res modules for usage:
+%
+% \defineexternalfigure[name][settings]
+
+%D Defining is persistent, i.e.\ when you redefine an instance, the already set
+%D parameters need to be set again or otherwise the old values will be used.
+%D
+%D New: \type {method=auto}: strips suffix and uses \quote {order} which is handy in
+%D some of four workflows where sources are used for web and print and where the web
+%D tools need a suffix (like gif) which we don't want as we want a high quality
+%D format.
+
+\newconditional\c_grph_include_trace_inheritance
+
+\installtextracker
+ {graphics.inheritance}
+ {\settrue \c_grph_include_trace_inheritance}
+ {\setfalse\c_grph_include_trace_inheritance}
+
+\installcorenamespace{externalfiguredefinition}
+
+\aliased\let\defineexternalfigures\defineexternalfigure
+
+% label file parent settings
+% label file settings
+% label file parent
+
+\permanent\tolerant\protected\def\useexternalfigure[#1]#*[#2]#*[#3]#*[#4]%
+ {\iftok{#1}\emptytoks
+ \iftok{#2}\emptytoks\else
+ \ifhastok={#3}%
+ \grph_include_use_indeed{#2}{#2}{#3}{#4}%
+ \else
+ \grph_include_use_indeed{#2}{#2}\empty{#4}%
+ \fi
+ \fi
+ \orelse\iftok{#2}\emptytoks
+ \ifhastok={#3}%
+ \grph_include_use_indeed{#1}{#1}\empty{#3}%
+ \else
+ \grph_include_use_indeed{#1}{#1}{#3}{#4}%
+ \fi
+ \else
+ \ifhastok={#3}%
+ \grph_include_use_indeed{#1}{#2}\empty{#3}
+ \else
+ \grph_include_use_indeed{#1}{#2}{#3}{#4}%
+ \fi
+ \fi}
+
+\def\grph_include_use_indeed#1#2#3#4%
+ {\dodoglobal\setvalue{\??externalfigureinstance#1}{\grph_include_setup{#2}{#3}{#4}}%
+ \grph_include_analyze_collection[#2][#4]}
+
+% inclusion
+
+\permanent\tolerant\protected\def\externalfigure[#1]#*[#2]#*[#3]%
+ {\ifhastok={#2}%
+ \grph_include_place[#1][][#2]%
+ \else
+ \grph_include_place[#1][#2][#3]%
+ \fi}
+
+% todo: chain them
+
+\def\grph_include_setup#1#2#3% name parent settings
+ {\edef\m_grph_include_name {#1}%
+ \edef\m_grph_include_parent{#2}%
+ \ifempty\m_grph_include_name \else
+ \let\p_grph_include_name\m_grph_include_name
+ \fi
+ \ifempty\m_grph_include_parent \else
+ \grph_include_inherit_from_parent\m_grph_include_parent
+ \fi
+ \setupcurrentexternalfigure[#3]}
+
+\def\grph_include_inherit_from_parent#1%
+ {\ifcsname\??externalfigure#1:\s!parent\endcsname
+ \let\currentexternalfigure#1%
+ \fi
+ \ifcsname\??externalfigureinstance#1\endcsname
+ \ifconditional\c_grph_include_trace_inheritance\writestatus\m!figures{inheriting from instance: #1}\fi
+ \csname\??externalfigureinstance#1\endcsname
+ \fi}
+
+\newtoks\t_grph_include_local_settings
+
+\appendtoks
+ \enforced\let\textunderscore\letterunderscore % {\string _} % space needed as _ is now letter in unprotected mode (probably no longer needed)
+ %
+ \dontcomplain
+ \restorecatcodes
+ \forgetall
+\to \t_grph_include_local_settings
+
+\def\grph_include_place_inherit
+ {\ifconditional\c_grph_include_trace_inheritance
+ \writestatus\m!figures{label: \p_grph_include_label, name: \p_grph_include_name, parent: \p_grph_include_parent}%
+ \fi
+ \ifempty\p_grph_include_parent
+ % nothing to be done
+ \orelse\ifx\p_grph_include_parent\p_grph_include_label
+ % redundant
+ \else
+ \grph_include_inherit_from_parent\p_grph_include_parent
+ \fi
+ \ifempty\p_grph_include_label
+ % nothing to be done
+ \else
+ \grph_include_inherit_from_parent\p_grph_include_label
+ \fi}
+
+\def\grph_include_place[#1][#2][#3]% [label][file][settings] | [file][settings] | [file][parent][settings]
+ {\bgroup
+ \advance\c_grph_include_nesting\plusone
+ \edef\currentexternalfigure{\the\c_grph_include_nesting}%
+ \checkexternalfigureparent % each inherits from the root
+ %
+ \the\everyexternalfigureresets
+ %
+ \edef\p_grph_include_label{#1}%
+ \let\p_grph_include_name\p_grph_include_label
+ \ifhastok={#2}%
+ % [label] [settings]
+ \let\p_grph_include_parent\p_grph_include_label
+ \grph_include_place_inherit
+ \setupcurrentexternalfigure[#2]%
+ \else
+ % [label] [parent] [settings]
+ \edef\p_grph_include_parent{#2}%
+ \ifempty\p_grph_include_parent
+ \let\p_grph_include_parent\p_grph_include_label
+ \fi
+ \grph_include_place_inherit
+ \setupcurrentexternalfigure[#3]%
+ \fi
+ %
+ \the\everyexternalfigurechecks
+ %
+ \the\t_grph_include_local_settings
+ %
+ \edef\p_width {\externalfigureparameter\c!width}%
+ \edef\p_height {\externalfigureparameter\c!height}%
+ \edef\p_label {\externalfigureparameter\c!label}%
+ \edef\p_reference{\externalfigureparameter\c!reference}%
+ %
+ \dostarttagged\t!image\empty
+ \clf_figure_push {
+ name {\p_grph_include_name}%
+ label {\ifempty\p_label\p_grph_include_label\else\p_label\fi}%
+ page {\externalfigureparameter\c!page}%
+ file {\externalfigureparameter\c!file}%
+ size {\externalfigureparameter\c!size}%
+ object {\externalfigureparameter\c!object}%
+ prefix {\externalfigureparameter\c!prefix}%
+ cache {\externalfigureparameter\c!cache}%
+ format {\externalfigureparameter\c!method}%
+ preset {\externalfigureparameter\c!prefix}%
+ controls {\externalfigureparameter\c!controls}%
+ resources {\externalfigureparameter\c!resources}%
+ preview {\externalfigureparameter\c!preview}%
+ display {\externalfigureparameter\c!display}%
+ mask {\externalfigureparameter\c!mask}%
+ conversion {\externalfigureparameter\c!conversion}%
+ resolution {\externalfigureparameter\c!resolution}%
+ color {\externalfigureparameter\c!color}% unprocessed raw key
+ cmyk {\externalfigureparameter\c!cmyk}% kind of special
+ arguments {\externalfigureparameter\c!arguments}% used for converters
+ repeat {\externalfigureparameter\c!repeat}%
+ transform {\externalfigureparameter\c!transform}%
+ compact {\externalfigureparameter\c!compact}% experiment, share fonts
+ userpassword {\externalfigureparameter\c!userpassword}%
+ ownerpassword{\externalfigureparameter\c!ownerpassword}%
+ \ifempty\p_width \else
+ width \dimexpr\p_width\relax
+ \fi
+ \ifempty\p_height \else
+ height \dimexpr\p_height\relax
+ \fi
+ }%\relax
+ \clf_figure_identify
+ \relax
+ \ifconditional\c_grph_include_test_only
+ \ifcase\figurestatus \else
+ \clf_figure_check
+ \clf_figure_dummy
+ \clf_figure_scale
+ \clf_figure_done
+ \fi
+ \grph_include_set_mode
+ \else
+ \ifcase\figurestatus
+ \clf_figure_dummy
+ \clf_figure_scale
+ \else
+ \clf_figure_check
+ \clf_figure_include
+ \clf_figure_scale
+ \fi
+ \clf_figure_done
+ \grph_include_set_mode
+ \grph_include_finalize
+ \fi
+ \clf_figure_pop
+ \dotagfigure
+ %
+ \scratchcounter\zerocount
+ \edef\p_crossreference{\externalfigureparameter\c!crossreference}%
+ \iflocation\iftrialtypesetting\else
+ \ifempty\p_crossreference
+ % nothing
+ \orelse\ifx\p_crossreference\v!no
+ % nothing
+ \orelse\ifx\p_crossreference\v!yes
+ \ifhastok={#2}%
+ \scratchcounter\clf_figure_register_page{#1}{}{#2}\relax
+ \else
+ \scratchcounter\clf_figure_register_page{#1}{#2}{#3}\relax
+ \fi
+ \else
+ \scratchcounter-\p_crossreference % passed by repeater
+ \fi
+ \fi\fi
+ \naturalvpack
+ attr \imageattribute \plustwo
+ \ifnum\scratchcounter>\zerocount
+ {\strc_references_cross_forward {ex:\number \scratchcounter}{\box\foundexternalfigure}}%
+ \orelse\ifnum\scratchcounter<\zerocount
+ {\strc_references_cross_backward{ex:\number-\scratchcounter}{\box\foundexternalfigure}}%
+ \else
+ {\box\foundexternalfigure}%
+ \fi
+ %
+ % \naturalvpack attr \imageattribute \plustwo \bgroup
+ % \ifcmpnum\scratchcounter\zerocount
+ % \strc_references_cross_backward{ex:\number-\scratchcounter}{\box\foundexternalfigure}%
+ % \or % equal
+ % \box\foundexternalfigure%
+ % \or % more
+ % \strc_references_cross_forward {ex:\number \scratchcounter}{\box\foundexternalfigure}%
+ % \fi
+ % \egroup
+ %
+ \dostoptagged
+ \egroup}
+
+%D Next we provide a cross referenced scale-up mechanism:
+
+\def\strc_references_cross_forward#1#2%
+ {\begingroup
+ \strc_references_set_simple_internal_reference{cross:b:#1}%
+ \naturalhpack
+ attr \destinationattribute\number\lastdestinationattribute
+ {\naturalhpack{\strc_references_flush_destination_nodes\directgotodumbbox{#2}[cross:f:#1]}}%
+ \endgroup}
+
+\def\strc_references_cross_backward#1#2%
+ {\begingroup
+ \strc_references_set_simple_internal_reference{cross:f:#1}%
+ \naturalhpack
+ attr \destinationattribute\number\lastdestinationattribute
+ {\naturalhpack{\strc_references_flush_destination_nodes\directgotodumbbox{#2}[cross:b:#1]}}%
+ \endgroup}
+
+\aliased\let\doexternalfigurerepeat\gobblefourarguments % called from lua end
+
+\permanent\tolerant\protected\def\placeregisteredexternalfigures[#1]%
+ {\page
+ \begingroup
+ \enforced\protected\def\doexternalfigurerepeat{\grph_include_place_registered_indeed{#1}}%
+ \dorecurse\clf_figure_nof_registered_pages
+ {\page
+ \clf_figure_flush_registered_pages\recurselevel
+ \page}%
+ \endgroup
+ \page}
+
+\protected\def\grph_include_place_registered_indeed#1#2#3#4#5% called from lua end
+ {\grph_include_place[#2][#3][#4,%
+ \c!hfactor=,\c!wfactor=,\c!factor=,%
+ \c!maxwidth=,\c!maxheight=,%
+ \c!xscale=,\c!yscale=,\c!scale=,%
+ \c!sx=,\c!sy=,\c!s=,%
+ \c!width=,\c!height=,%
+ \c!crossreference=#5,%
+ #1]}
+
+%D Scaling:
+
+\mutable\let\dowithfigure\relax % name might change (into a proper hook)
+
+\permanent\protected\def\doscalefigure % used at lua end
+ {\global\setbox\foundexternalfigure\vpack{\scale[\v!figure]{\dowithfigure{\box\foundexternalfigure}}}}
+
+\definescale % some day we will inherit
+ [\v!figure]
+ [\c!hfactor =\externalfigureparameter\c!hfactor,
+ \c!wfactor =\externalfigureparameter\c!wfactor,
+ \c!factor =\externalfigureparameter\c!factor,
+ \c!maxwidth =\externalfigureparameter\c!maxwidth,
+ \c!maxheight =\externalfigureparameter\c!maxheight,
+ \c!equalwidth =\externalfigureparameter\c!equalwidth,
+ \c!equalheight=\externalfigureparameter\c!equalheight,
+ \c!xscale =\externalfigureparameter\c!xscale,
+ \c!yscale =\externalfigureparameter\c!yscale,
+ \c!scale =\externalfigureparameter\c!scale,
+ \c!sx =\externalfigureparameter\c!sx,
+ \c!sy =\externalfigureparameter\c!sy,
+ \c!s =\externalfigureparameter\c!s,
+ \c!width =\externalfigureparameter\c!width,
+ \c!height =\externalfigureparameter\c!height,
+ \c!lines =\externalfigureparameter\c!lines]
+
+%D You can register additional suffixes with the following command:
+%D
+%D \starttyping
+%D \definegraphictypesynonym[jbig] [jb2]
+%D \definegraphictypesynonym[jbig2][jb2]
+%D \definegraphictypesynonym[jbg] [jb2]
+%D \stoptyping
+
+\permanent\tolerant\protected\def\definegraphictypesynonym[#1]#*[#2]%
+ {\clf_registerfiguresuffix{#1}{#2}}
+
+%D Additional paths can be installed with the regular setup command. The next
+%D macro picks up the list.
+
+\permanent\protected\def\setfigurepathlist
+ {\clf_setfigurepaths{\externalfigureparameter\c!location}{\externalfigureparameter\c!directory}}
+
+%D Variables:
+
+\newbox \foundexternalfigure
+\newtoks\externalfigurepostprocessors
+
+\permanent\def\figurestatus {\numexpr\clf_figurestatus{status}{0}\relax} % number: 0 = not found
+\permanent\def\figurewidth {\clf_figurestatus{width}{0}sp}
+\permanent\def\figureheight {\clf_figurestatus{height}{0}sp}
+\permanent\def\figurexscale {\clf_figurestatus{xscale}{1}}
+\permanent\def\figureyscale {\clf_figurestatus{yscale}{1}}
+\permanent\def\figurereference {\clf_figurestatus{reference}{}}
+
+\permanent\def\figuresize {\clf_figurerequest{size}{}}
+\permanent\def\figurelabel {\clf_figurerequest{label}{}}
+\permanent\def\figurefileoriginal {\clf_figurerequest{name}{}}
+\permanent\def\figurefilepage {\clf_figurerequest{page}{1}}
+\permanent\def\figurefileoptions {\clf_figurerequest{options}{}}
+\permanent\def\figurefileconversion{\clf_figurerequest{conversion}{}}
+\permanent\def\figurefileresolution{\clf_figurerequest{resolution}{}}
+\permanent\def\figurefilecolor {\clf_figurerequest{color}{}}
+\permanent\def\figurefilearguments {\clf_figurerequest{arguments}{}}
+\permanent\def\figurefilecache {\clf_figurerequest{cache}{}}
+\permanent\def\figurefileprefix {\clf_figurerequest{prefix}{}}
+
+\permanent\def\figurenaturalwidth {\clf_figureused{width}{\number\dimexpr\externalfigureparameter\c!defaultwidth\relax}sp}
+\permanent\def\figurenaturalheight {\clf_figureused{height}{\number\dimexpr\externalfigureparameter\c!defaultheight\relax}sp}
+\permanent\def\figurexresolution {\clf_figureused{xresolution}{0}}
+\permanent\def\figureyresolution {\clf_figureused{yresolution}{0}}
+\permanent\def\figureorientation {\clf_figureused{orientation}{1}}
+\permanent\def\figurerotation {\clf_figureused{rotation}{0}}
+\permanent\def\figurexsize {\clf_figureused{xsize}{0}}
+\permanent\def\figureysize {\clf_figureused{ysize}{0}}
+\permanent\def\figurecolordepth {\clf_figureused{colordepth}{0}}
+\permanent\def\figuredepth {\clf_figureused{depth}{0}}
+
+\permanent\def\figurefullname {\clf_figureused{fullname}{}}
+\permanent\def\noffigurepages {\clf_figureused{pages}{0}}
+
+
+% \permanent\def\figurefilepath {\clf_figurefilepath} % public in lua
+% \permanent\def\figurefilename {\clf_figurefilename} % public in lua
+% \permanent\def\figurefiletype {\clf_figurefiletype} % public in lua
+
+\permanent\let\naturalfigurewidth \figurenaturalwidth
+\permanent\let\naturalfigureheight \figurenaturalheight
+
+\aliased\let\figurescalewidth \figurewidth
+\aliased\let\figurescaleheight \figureheight
+\aliased\let\figurescalexscale \figurexscale
+\aliased\let\figurescaleyscale \figureyscale
+
+%D Abuse:
+%D
+%D \starttyping
+%D \externalfigure[rubish.pdf] \ifcase\figurestatus\relax \ctxlua{os.exit(999)} \fi
+%D \stoptyping
+
+%D Calculating:
+
+% \enabletrackers[figures.conversion]
+% \externalfigure[demo.svg]
+% \externalfigure[demo.svg][conversion=png]
+
+%D The following registers are used (if only to be downward compatible).
+
+\newconditional\c_grph_include_skip
+\newconditional\c_grph_include_test_only
+\newconditional\c_grph_include_level \setfalse\c_grph_include_level % true=background false=normal
+\newconditional\c_grph_include_flush \settrue \c_grph_include_flush % true=place false=ignore
+
+\newsystemmode\v!figure
+
+\def\grph_include_set_mode
+ {\ifcase\figurestatus
+ \globalresetsystemmode\v!figure % todo, also: \v!resource
+ \else
+ \globalsetsystemmode \v!figure % todo, also: \v!resource
+ \fi}
+
+\appendtoks
+ \clf_setfigurepaths
+ {\externalfigureparameter\c!location}%
+ {\externalfigureparameter\c!directory}%
+ \clf_figure_reset
+ \foundexternalfigure
+ \externalfigureparameter\c!defaultwidth
+ \externalfigureparameter\c!defaultheight
+ \relax
+\to \everyexternalfigureresets
+
+\appendtoks
+ \edef\p_option{\externalfigureparameter\c!option}%
+ \ifx\p_option\v!frame
+ \setfalse\c_grph_include_skip
+ \letexternalfigureparameter\c!frame\v!on
+ \orelse\ifx\p_option\v!empty
+ \settrue\c_grph_include_skip
+ \letexternalfigureparameter\c!frame\v!off
+ \else
+ \setfalse\c_grph_include_skip
+ \fi
+ % fake color in gray bitmaps, assumes that
+ % a transparent color is used
+ \edef\p_foregroundcolor{\externalfigureparameter\c!foregroundcolor}%
+ \ifempty\p_foregroundcolor \else
+ \setexternalfigureparameter\c!background{\v!foreground,\v!color}%
+ \letexternalfigureparameter\c!backgroundcolor\p_foregroundcolor
+ \fi
+\to \everyexternalfigurechecks
+
+%D Internal graphics are handled at the \TEX\ end:
+
+\def\grph_include_process_tex#1%
+ {\framed
+ [\c!strut=\v!no,\c!align=\v!normal,\c!frame=\v!off,
+ \c!offset=\v!overlay,\c!width=\v!fit,\c!height=\v!fit]
+ {\blank[\v!disable]#1\endgraf\removelastskip}} % disable should stay here!
+
+% used al lua end:
+
+\permanent\protected\def\docheckfigurebuffer #1{\global\setbox\foundexternalfigure\vpack{\grph_include_process_tex{\getbuffer[#1]}}}
+\permanent\protected\def\docheckfiguretex #1{\global\setbox\foundexternalfigure\vpack{\grph_include_process_tex{\input{#1}}}}
+\permanent\protected\def\docheckfigurecld #1{\global\setbox\foundexternalfigure\vbox {\cldprocessfile{#1}}}
+\permanent\protected\def\docheckfiguremps #1{\global\setbox\foundexternalfigure\vpack{\convertMPtoPDF{#1}11}}
+\permanent\protected\def\docheckfiguremprun #1#2{\global\setbox\foundexternalfigure\vpack{\useMPrun{#1}{#2}}}
+
+\permanent\protected\def\relocateexternalfigure
+ {\global\setbox\foundexternalfigure\vpack to \ht\foundexternalfigure\bgroup
+ %
+ % The \vss can (!) introduce 1 sp excess visible in xform which in itself
+ % is not that important but some don't like these cosmetic side effects, for
+ % instance we can get:
+ %
+ % vss : \vbox(845.1575+0.0)x597.23125, glue set 845.15747fil, direction TLT
+ % vskip : \vbox(845.1575+0.0)x597.23125, direction TLT
+ %
+ % or
+ %
+ % 1 0 0 1 0 0.00003 cm
+ % 1 0 0 1 0 0 cm
+ %
+ % This is a known property of using glue and can even depend on the architecture
+ % (float implementation). Anyway, let's for now use a skip. Of course this can
+ % shift the issue elsewhere, as vss is used a lot elsewhere.
+ %
+ % \vss
+ \vkern\ht\foundexternalfigure
+ %
+ \ht\foundexternalfigure\zeropoint
+ \dp\foundexternalfigure\zeropoint
+ \hpack to \wd\foundexternalfigure\bgroup
+ \box\foundexternalfigure
+ \hss
+ \egroup
+ \egroup}
+
+\permanent\protected\def\startfoundexternalfigure#1#2% ht wd
+ {\global\setbox\foundexternalfigure\vbox to #2\bgroup\vss\hbox to #1\bgroup}
+
+\permanent\protected\def\stopfoundexternalfigure
+ {\hss\egroup\egroup}
+
+\permanent\protected\def\emptyfoundexternalfigure % sort of obsolete
+ {\startfoundexternalfigure{\externalfigureparameter\c!defaultwidth}{\externalfigureparameter\c!defaultheight}%
+ \stopfoundexternalfigure}
+
+% \doifmodeelse{*\v!last}
+% {\settrue \c_grph_include_flush}
+% {\setfalse\c_grph_include_flush}%
+
+\def\grph_include_finalize
+ {\global\setbox\foundexternalfigure\vbox
+ {\ifcase\figurestatus
+ \letexternalfigureparameter\c!frame\v!on
+ \fi
+ \ifconditional\c_grph_include_flush
+ \ifconditional\c_grph_include_level % probably background
+ \ifconditional\c_grph_include_skip
+ % nothing
+ \fakebox\foundexternalfigure
+ \orelse\ifcase\figurestatus
+ % nothing
+ \else
+ \the\externalfigurepostprocessors
+ \box\foundexternalfigure
+ \fi
+ \else
+ \iftrialtypesetting \else \feedbackexternalfigure \fi
+ \settrue\c_grph_include_level
+ \ifconditional\c_grph_include_skip
+ \ifcase\figurestatus
+ \grph_include_replacement\figurelabel\figurefileoriginal{unknown}%
+ \else
+ \grph_include_replacement\figurelabel\figurefullname{skipped}%
+ \fi
+ \orelse\ifcase\figurestatus
+ \grph_include_replacement\figurelabel\figurefileoriginal{unknown}%
+ \else
+ \the\externalfigurepostprocessors
+ \edef\p_reset{\externalfigureparameter\c!reset}%
+ \ifx\p_reset\v!yes
+ \wd\foundexternalfigure\figurewidth
+ \ht\foundexternalfigure\figureheight
+ \dp\foundexternalfigure\zeropoint
+ \box\foundexternalfigure
+ \else
+ \letexternalfigureparameter\c!offset\v!overlay
+ \letexternalfigureparameter\c!width \figurewidth
+ \letexternalfigureparameter\c!height\figureheight
+ \inheritedexternalfigureframed{\box\foundexternalfigure}%
+ \fi
+ \fi
+ \fi
+ \else
+ % maybe also \the\externalfigurepostprocessors
+ \iftrialtypesetting \else \feedbackexternalfigure \fi
+ \fi}}
+
+\mutable\let\feedbackexternalfigure\relax % hook
+
+\permanent\protected\def\getfiguredimensions
+ {\dodoubleempty\grph_include_get_dimensions}
+
+\def\grph_include_get_dimensions[#1][#2]%
+ {\startnointerference
+ \settrue\c_grph_include_test_only
+ \externalfigure[#1][#2,\c!display=,\c!mask=,\c!object=\v!no]%
+ \stopnointerference}
+
+\permanent\protected\def\doifelsefigure#1%
+ {\getfiguredimensions[#1]% so data is available !
+ \ifcase\figurestatus
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\aliased\let\doiffigureelse\doifelsefigure
+
+% No placement, handy for preprocessing:
+
+\permanent\tolerant\protected\def\registerexternalfigure[#1]#*[#2]#*[#3]%
+ {\startnointerference
+ \c_grph_include_test_only
+ \setfalse\c_grph_include_flush % == test ?
+ \externalfigure[#1][#2][#3]% or
+ \externalfigure[#1][#2,\c!display=,\c!mask=,\c!object=\v!no]%
+ \stopnointerference}
+
+% Helpers will be replaced when xforms are accessible at the lua end but then
+% we need to do the object offset there too.
+
+\permanent\protected\def\dosetfigureobject#1#2%
+ {\setobject{#1}{#2}\vpack{\box\foundexternalfigure}}
+
+\permanent\protected\def\doboxfigureobject#1#2%
+ {\global\setbox\foundexternalfigure\vpack{\getobject{#1}{#2}}} % probably one vbox too many
+
+% Figure bases
+
+\permanent\protected\def\usefigurebase[#1]%
+ {\clf_usefigurebase{#1}}
+
+\appendtoks
+ \setfigurepathlist % the path may be used elsewhere too (as in x-res-04)
+\to \everysetupexternalfigure
+
+\appendtoks
+ \clf_setfigurelookuporder{\externalfigureparameter\c!order}%
+\to \everysetupexternalfigure
+
+\definecolor[missingfigurecolor][s=.8]
+
+\def\grph_include_replacement#1#2#3%
+ {\bgroup
+ \letexternalfigureparameter\c!width\figurewidth
+ \letexternalfigureparameter\c!height\figureheight
+ \letexternalfigureparameter\c!background\v!color
+ \setexternalfigureparameter\c!backgroundcolor{missingfigurecolor}%
+ \setexternalfigureparameter\c!align{\v!middle,\v!lohi}% we default to \v!none
+ \inheritedexternalfigureframed
+ {\tt\tfxx \nohyphens
+ name: \expanded{\verbatimstring{#1}}\\%
+ file: \expanded{\verbatimstring{#2}}\\%
+ state: \expanded{\verbatimstring{#3}}}%
+ \egroup}
+
+% maybe setuphandler
+
+\newconditional\c_grph_include_in_collection
+
+\newdimen\d_grph_include_collection_minwidth
+\newdimen\d_grph_include_collection_maxwidth
+\newdimen\d_grph_include_collection_minheight
+\newdimen\d_grph_include_collection_maxheight
+
+\def\grph_include_analyze_collection[#1][#2]%
+ {\ifconditional\c_grph_include_in_collection
+ \setfalse\c_grph_include_in_collection
+ \getfiguredimensions[#1][#2]%
+ \settrue\c_grph_include_in_collection
+ \scratchdimen\naturalfigurewidth
+ \ifdim\scratchdimen>\d_grph_include_collection_maxwidth \d_grph_include_collection_maxwidth \scratchdimen \fi
+ \ifdim\scratchdimen<\d_grph_include_collection_minwidth \d_grph_include_collection_minwidth \scratchdimen \fi
+ \scratchdimen\naturalfigureheight
+ \ifdim\scratchdimen>\d_grph_include_collection_maxheight \d_grph_include_collection_maxheight\scratchdimen \fi
+ \ifdim\scratchdimen<\d_grph_include_collection_minheight \d_grph_include_collection_minheight\scratchdimen \fi
+ \fi}
+
+\mutable\let\currentexternalfigurecollection\empty
+
+\permanent\protected\def\startexternalfigurecollection[#1]%
+ {\begingroup
+ \def\currentexternalfigurecollection{#1}%
+ \settrue\c_grph_include_in_collection
+ \d_grph_include_collection_minwidth \maxdimen
+ \d_grph_include_collection_maxwidth \zeropoint
+ \d_grph_include_collection_minheight\maxdimen
+ \d_grph_include_collection_maxheight\zeropoint}
+
+\permanent\protected\def\stopexternalfigurecollection
+ {\xdefcsname\??externalfigurecollection\currentexternalfigurecollection:\c!minwidth \endcsname{\the\d_grph_include_collection_minwidth }%
+ \xdefcsname\??externalfigurecollection\currentexternalfigurecollection:\c!maxwidth \endcsname{\the\d_grph_include_collection_maxwidth }%
+ \xdefcsname\??externalfigurecollection\currentexternalfigurecollection:\c!minheight\endcsname{\the\d_grph_include_collection_minheight}%
+ \xdefcsname\??externalfigurecollection\currentexternalfigurecollection:\c!maxheight\endcsname{\the\d_grph_include_collection_maxheight}%
+ \endgroup}
+
+\permanent\def\externalfigurecollectionparameter#1#2%
+ {\csname
+ \ifcsname\??externalfigurecollection#1:#2\endcsname
+ \??externalfigurecollection#1:#2%
+ \else
+ \s!empty
+ \fi
+ \endcsname}
+
+\permanent\def\externalfigurecollectionminwidth #1{\externalfigurecollectionparameter{#1}\c!minwidth }
+\permanent\def\externalfigurecollectionmaxwidth #1{\externalfigurecollectionparameter{#1}\c!maxwidth }
+\permanent\def\externalfigurecollectionminheight#1{\externalfigurecollectionparameter{#1}\c!minheight}
+\permanent\def\externalfigurecollectionmaxheight#1{\externalfigurecollectionparameter{#1}\c!maxheight}
+
+\aliased\let\efcparameter\externalfigurecollectionparameter % still needed ?
+\aliased\let\efcminwidth \externalfigurecollectionminwidth % still needed ?
+\aliased\let\efcmaxwidth \externalfigurecollectionmaxwidth % still needed ?
+\aliased\let\efcminheight\externalfigurecollectionminheight % still needed ?
+\aliased\let\efcmaxheight\externalfigurecollectionmaxheight % still needed ?
+
+% \startexternalfigurecollection[name]
+% \useexternalfigure[cow] [cow.pdf]
+% \useexternalfigure[mill][mill.png]
+% \stopexternalfigurecollection
+% \starttext
+% \bTABLE
+% \bTR
+% \bTD \externalfigure[cow] [height=\externalfigurecollectionmaxheight{name}] \eTD
+% \bTD \externalfigure[mill][height=\externalfigurecollectionmaxheight{name}] \eTD
+% \eTR
+% \eTABLE
+% \stoptext
+
+\permanent\protected\def\overlayfigure#1%
+ {\externalfigure[#1][\c!width=\d_overlay_width,\c!height=\d_overlay_height]}
+
+% Experimental (will become cleaner):
+
+\permanent\tolerant\protected\def\includesvgfile[#1]#*[#2]%
+ {\dontleavehmode\begingroup
+ \getdummyparameters[\c!offset=\zeropoint,#2]%
+ \clf_includesvgfile{#1}\dimexpr\dummyparameter\c!offset\relax
+ \endgroup}
+
+\permanent\tolerant\protected\def\includesvgbuffer[#1]#*[#2]%
+ {\dontleavehmode\begingroup
+ \getdummyparameters[\c!offset=\zeropoint,#2]%
+ \clf_includesvgbuffer{#1}\dimexpr\dummyparameter\c!offset\relax
+ \endgroup}
+
+% Bonus:
+
+\useexternalfigure
+ [\v!buffer]
+ [\jobname.buffer]
+ [\c!object=\v!no]
+
+% Another two:
+
+\defineexternalfigure
+ [\v!inline]
+ [\c!height=\lineheight]
+
+\definemeasure
+ [\v!combination]
+ [(\textwidth
+ -\effectiveleftskip
+ -\effectiverightskip
+ -\numexpr\combinationparameter\c!nx-\plusone\relax\dimexpr\combinationparameter\c!distance\relax
+ )/\combinationparameter\c!nx]
+
+\defineexternalfigure
+ [\v!combination]
+ [\c!width=\measure{\v!combination}]
+
+% \startcombination[nx=2,ny=1]
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% \stopcombination
+
+% \startcombination[nx=2,ny=1]
+% {\externalfigure[dummy][width=\measure{combination}]} {}
+% {\externalfigure[dummy][width=\measure{combination}]} {}
+% \stopcombination
+
+% \startcombination[nx=2,ny=2]
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% \stopcombination
+
+% \startcombination[nx=3,ny=1]
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% \stopcombination
+
+% \startcombination[nx=4,ny=1]
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% {\externalfigure[dummy][combination]} {}
+% \stopcombination
+
+\permanent\protected\def\inlinefigure[#1]%
+ {\dontleavehmode
+ \sbox{\externalfigure[#1][\v!inline]}}
+
+%D Needs to be done global:
+
+\definelayer[epdfcontent]
+
+\protect \endinput
+
+%D Moved here because this already old code is nowhere documents (so I need to check
+%D it:
+%
+% \starttyping
+% \starttext
+%
+% \startluaparameterset [u3d:myset:controls:1]
+% view = {
+% name = 'default',
+% bg = {1,1,1},
+% mag = 100,
+% coo = {0,0,0},
+% c2c = {0,0,1},
+% rot = {40,0,60},
+% roo = 6,
+% lights = 'CAD'
+% },
+% js = 'cloudq.js'
+% \stopluaparameterset
+%
+% \startluaparameterset [u3d:myset:controls:2]
+% views = {
+% {
+% name = 'AnglePositioning',
+% bg = {1,1,1},
+% azimuth = 45,
+% altitude = 45,
+% roo = 50,
+% aac = 2.5,
+% lights = 'Artwork'
+% },
+% {
+% name = 'RotationPositioning',
+% bg = {1,1,1},
+% rot = {0,45,45},
+% roo = 50,
+% aac = 2.5,
+% lights = 'Artwork'
+% },
+% {
+% name = 'VectorPositioning',
+% bg = {1,0,0},
+% c2c = {1,1,math.sqrt(2)},
+% roo = 50,
+% aac = 2.5,
+% lights = 'CAD'
+% },
+% {
+% name = 'PositionPositioning',
+% bg = {1,0,0},
+% pos = {1+25,1+25,1+50/math.sqrt(2)},
+% aac = 2.5,
+% lights = 'CAD'
+% },
+% {
+% name = 'ortho',
+% bg = {1,1,1},
+% mag = 300,
+% lights = 'CAD',
+% crossection = {}
+% }
+% },
+% view = {
+% name = 'default',
+% bg = {1,1,1},
+% c2c = {-1,-1,0},
+% roo = 50,
+% aac = 2.5,
+% roll = 45,
+% lights = 'CAD',
+% crossection = {
+% normal = {-1,-1,-1},
+% transparent = true
+% },
+% nodes = {
+% {
+% name = 'xlabel',
+% visible = false
+% },
+% {
+% name = 'ylabel',
+% opacity = 0.5
+% },
+% {
+% name = 'zlabel',
+% rendermode = 'Wireframe'
+% }
+% }
+% }
+% \stopluaparameterset
+%
+% \useexternalfigure
+% [cloudq]
+% [cloudq.u3d]
+% [width=0.7\textwidth,
+% height=.7\textwidth,
+% display=u3d:myset:display:1,
+% controls=u3d:myset:controls:1]
+%
+% \useexternalfigure
+% [axes]
+% [axes.u3d]
+% [width=0.7\textwidth,
+% height=.7\textwidth,
+% controls=u3d:myset:controls:1]
+%
+% \startluaparameterset[u3d:myset:display:2]
+% toolbar = true,
+% preview = 'cloudq.png'
+% \stopluaparameterset
+% \startluaparameterset[u3d:myset:display:3]
+% toolbar = true,
+% tree = false,
+% preview = 'axes.png'
+% \stopluaparameterset
+% \startluaparameterset[u3d:myset:display:4]
+% toolbar = true,
+% tree = false,
+% view = {
+% name = 'view',
+% bg = {0.1,0.1,0.1},
+% c2c = {-1,-1,0},
+% roo = 50,
+% aac = 2.5,
+% roll = 45,
+% lights = 'Red'
+% }
+% \stopluaparameterset
+% \startluaparameterset[u3d:myset:display:5]
+% toolbar = true,
+% tree = false,
+% view = 'ortho'
+% \stopluaparameterset
+%
+% \placefigure[here]{none}{\externalfigure[cloudq][frame=on,display=u3d:myset:display:2]}
+% \placefigure[here]{none}{\externalfigure[axes] [frame=on,display=u3d:myset:display:3]}
+% \placefigure[here]{none}{\externalfigure[axes] [frame=on,display=u3d:myset:display:4]}
+% \placefigure[here]{none}{\externalfigure[axes] [frame=on,display=u3d:myset:display:5,width=0.5\textwidth,height=.5\textwidth]}
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-pat.mkxl b/Master/texmf-dist/tex/context/base/mkxl/grph-pat.mkxl
new file mode 100644
index 00000000000..92fd5ad749a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-pat.mkxl
@@ -0,0 +1,119 @@
+%D \module
+%D [ file=grph-par,
+%D version=2016.07.08,
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Patterns,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This works ok in Okular and MuPDF but somehow xforms don't work in Acrobat
+%D (full nor reader). Also the basic offset is kind of unspecified. So \unknown\
+%D we're dealing with a fragile feature. So, don't rely on where the first (ulr)
+%D tile occurs.
+%D
+%D The two commands introduced here are not documented (yet).
+
+\writestatus{loading}{ConTeXt Graphic Macros / Patterns}
+
+\unprotect
+
+\registerctxluafile{grph-pat}{}
+
+\permanent\tolerant\protected\def\registerpattern[#1]#*[#2]%
+ {\begingroup
+ \letdummyparameter\c!name \s!dummy
+ \letdummyparameter\c!width \v!auto
+ \letdummyparameter\c!height \v!auto
+ \letdummyparameter\c!hoffset\zeropoint
+ \letdummyparameter\c!voffset\zeropoint
+ \unless\iftok{#2}\emptytoks
+ \setdummyparameter\c!name{#1}%
+ \getdummyparameters[#2]%
+ \orelse\ifhastok={#1}%
+ \getdummyparameters[#1]%
+ \else
+ \setdummyparameter\c!name{#1}%
+ \fi
+ \dowithnextboxcs\syst_boxes_registerpattern_indeed\hbox}
+
+\immutable\edef\v!auto_m{-\v!auto}
+
+\def\syst_boxes_registerpattern_indeed
+ {%\finalizeobjectbox\nextbox
+ \edef\p_width {\dummyparameter\c!width}%
+ \edef\p_height {\dummyparameter\c!height}%
+ \edef\p_hoffset{\dummyparameter\c!hoffset}%
+ \edef\p_voffset{\dummyparameter\c!voffset}%
+ \scratchwidth \dimexpr\ifx\p_width \v!auto\wd \nextbox\else\p_width \fi\relax
+ \scratchheight \dimexpr\ifx\p_height \v!auto\htdp\nextbox\else\p_height \fi\relax
+ \scratchhoffset\dimexpr\ifx\p_hoffset\v!auto\scratchwidth /2\orelse\ifx\p_hoffset\v!auto_m-\scratchwidth /2\else\p_hoffset\fi\relax
+ \scratchvoffset\dimexpr\ifx\p_voffset\v!auto\scratchheight/2\orelse\ifx\p_voffset\v!auto_m-\scratchheight/2\else\p_voffset\fi\relax
+ \clf_registerpattern
+ name {\dummyparameter\c!name}
+ number \nextbox
+ width \scratchwidth
+ height \scratchheight
+ hoffset \scratchhoffset
+ voffset \scratchvoffset
+ \relax
+ \endgroup}
+
+\permanent\tolerant\protected\def\applypattern[#1]#*[#2]%
+ {\hbox\bgroup
+ \letdummyparameter\c!name \s!dummy
+ \letdummyparameter\c!width \zeropoint
+ \letdummyparameter\c!height\zeropoint
+ \unless\iftok{#2}\emptytoks
+ \setdummyparameter\c!name{#1}%
+ \getdummyparameters[#2]%
+ \orelse\ifhastok={#1}%
+ \getdummyparameters[#1]%
+ \else
+ \setdummyparameter\c!name{#1}%
+ \fi
+ \clf_applypattern
+ name {\dummyparameter\c!name}
+ number \nextbox
+ width \dimexpr\dummyparameter\c!width\relax
+ height \dimexpr\dummyparameter\c!height\relax
+ \relax
+ \box\nextbox
+ \egroup}
+
+\protect
+
+\continueifinputfile{grph-pat.mkxl}
+
+\nopdfcompression
+
+\starttext
+
+ \registerpattern[demo]{It \darkred Works!}
+
+ \framed[offset=overlay]{\applypattern[demo][width=7cm,height=4cm]}
+
+ \blank
+
+ \registerpattern[name=more,hoffset=0bp,voffset=0pt]{\externalfigure[cow.pdf][width=1cm]}
+
+ \framed[offset=overlay]{\applypattern[name=more,width=7cm,height=4cm]}
+
+ \blank
+
+ \registerpattern[name=more,hoffset=auto,voffset=auto]{\externalfigure[cow.pdf][width=1cm]}
+
+ \framed[offset=overlay]{\applypattern[name=more,width=7cm,height=4cm]}
+
+ \blank
+
+ \registerpattern[name=more,hoffset=-auto,voffset=-auto]{\externalfigure[cow.pdf][width=1cm]}
+
+ \framed[offset=overlay]{\applypattern[name=more,width=7cm,height=4cm]}
+
+\stoptext
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-raw.mkxl b/Master/texmf-dist/tex/context/base/mkxl/grph-raw.mkxl
new file mode 100644
index 00000000000..66194551bfc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-raw.mkxl
@@ -0,0 +1,64 @@
+%D \module
+%D [ file=grph-raw,
+%D version=2006.08.26, % overhaul of 1997.03.31
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Raw Bitmaps,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Graphic Macros / Raw Bitmaps}
+
+%D \startluacode
+%D function document.TestBitmap(nx,ny)
+%D local random = math.random
+%D local maxbit = 2^24
+%D for i=1,nx do
+%D for i=1,ny do
+%D context("%06x",random(0,maxbit))
+%D end
+%D end
+%D end
+%D \stopluacode
+%D
+%D \def\TestBitmap#1#2{\ctxlua{document.TestBitmap(#1,#2)}}
+%D
+%D \blank
+%D
+%D \startMPcode
+%D draw textext("\bitmapimage[x=100,y=100]{\TestBitmap{100}{100}}") xsized 10cm ;
+%D \stopMPcode
+%D
+%D \blank
+%D
+%D \startMPcode
+%D draw textext("\bitmapimage[x=200,y=50]{\TestBitmap{50}{200}}") xsized 10cm ;
+%D \stopMPcode
+
+\registerctxluafile{grph-raw}{}
+
+\unprotect
+
+\permanent\protected\def\bitmapimage[#1]#2%
+ {\hbox\bgroup
+ \getdummyparameters[\c!color=rgb,\c!width=,\c!height=,\c!x=,\c!y=,#1]%
+ \clf_bitmapimage
+ data {#2}%
+ colorspace {\directdummyparameter\c!color}%
+ width {\directdummyparameter\c!width}%
+ height {\directdummyparameter\c!height}%
+ xresolution {\directdummyparameter\c!x}%
+ yresolution {\directdummyparameter\c!y}%
+ \relax
+ \egroup}
+
+\permanent\protected\def\startbitmapimage[#1]#2\stopbitmapimage
+ {\bitmapimage[#1]{#2}}
+
+\aliased\let\stopbitmapimage\relax
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt b/Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt
new file mode 100644
index 00000000000..d8da5f76054
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt
@@ -0,0 +1,124 @@
+if not modules then modules = { } end modules ['grph-rul'] = {
+ version = 1.001,
+ comment = "companion to grph-rul.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local attributes = attributes
+local nodes = nodes
+local context = context
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+local userrule = nuts.rules.userrule
+local outlinerule = nuts.pool.outlinerule
+local ruleactions = nuts.rules.ruleactions
+
+local setattrlist = nuts.setattrlist
+local setattr = nuts.setattr
+local tonode = nuts.tonode
+
+local getattribute = tex.getattribute
+
+local a_color = attributes.private('color')
+local a_transparency = attributes.private('transparency')
+local a_colormodel = attributes.private('colormodel')
+
+local floor = math.floor
+local getrandom = utilities.randomizer.get
+
+do
+
+ local function unsupported() end
+
+ ruleactions.mp = unsupported
+ ruleactions.fill = unsupported
+ ruleactions.draw = unsupported
+ ruleactions.stroke = unsupported
+ ruleactions.box = unsupported
+
+end
+
+interfaces.implement {
+ name = "frule",
+ arguments = { {
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "depth", "dimension" },
+ { "radius", "dimension" },
+ { "line", "dimension" },
+ { "type", "string" },
+ { "data", "string" },
+ { "name", "string" },
+ { "radius", "dimension" },
+ { "corner", "string" },
+ } } ,
+ actions = function(t)
+ local rule = userrule(t)
+ if t.type == "mp" then
+ t.ma = getattribute(a_colormodel) or 1
+ t.ca = getattribute(a_color)
+ t.ta = getattribute(a_transparency)
+ else
+ setattrlist(rule,true)
+ end
+ context(tonode(rule)) -- will become context.nodes.flush
+ end
+}
+
+interfaces.implement {
+ name = "outlinerule",
+ public = true,
+ protected = true,
+ arguments = { {
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "depth", "dimension" },
+ { "line", "dimension" },
+ } } ,
+ actions = function(t)
+ local rule = outlinerule(t.width,t.height,t.depth,t.line)
+ setattrlist(rule,true)
+ context(tonode(rule)) -- will become context.nodes.flush
+ end
+}
+
+interfaces.implement {
+ name = "framedoutline",
+ arguments = { "dimension", "dimension", "dimension", "dimension" },
+ actions = function(w,h,d,l)
+ local rule = outlinerule(w,h,d,l)
+ setattrlist(rule,true)
+ context(tonode(rule)) -- will become context.nodes.flush
+ end
+}
+
+interfaces.implement {
+ name = "fakeword",
+ arguments = { {
+ { "factor", "dimension" },
+ { "name", "string" }, -- can be type
+ { "min", "dimension" },
+ { "max", "dimension" },
+ { "n", "integer" },
+ } } ,
+ actions = function(t)
+ local factor = t.factor or 0
+ local amount = getrandom("fakeword",t.min,t.max)
+ local rule = userrule {
+ height = 1.25*factor,
+ depth = 0.25*factor,
+ width = floor(amount/10000) * 10000,
+ line = 0.10*factor,
+ ma = getattribute(a_colormodel) or 1,
+ ca = getattribute(a_color),
+ ta = getattribute(a_transparency),
+ type = "mp",
+ name = t.name,
+ }
+ setattrlist(rule,true)
+ context(tonode(rule))
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-rul.mkxl b/Master/texmf-dist/tex/context/base/mkxl/grph-rul.mkxl
new file mode 100644
index 00000000000..034e91734e3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-rul.mkxl
@@ -0,0 +1,89 @@
+%D \module
+%D [ file=grph-rul,
+%D version=2016.02.05, % from experiments
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Rule Trickery,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Graphic Macros / Rule Trickery}
+
+\registerctxluafile{grph-rul}{autosuffix}
+
+\unprotect
+
+\permanent\protected\def\frule{\relax\clf_frule} % will become a public implementer
+
+% just for fun:
+
+% \defineoverlay[normalframe]
+% [\frule
+% width \overlaywidth
+% height\overlayheight
+% line \overlaylinewidth
+% \relax]
+
+% \defineoverlay[ovalframe]
+% [\frule
+% width \overlaywidth
+% height \overlayheight
+% line \overlaylinewidth
+% radius \overlayradius
+% \relax]
+
+\protect \endinput
+
+% \starttext
+%
+% \testfeatureonce{25}{\dontleavehmode
+% \ruledhbox\bgroup
+% \red \frule width 2cm height 2cm depth 1cm radius 2mm line 2pt type fill\relax
+% \hskip-2cm
+% \green \frule width 2cm height 2cm depth 1cm radius 2mm line 2pt\relax
+% \egroup
+% \space}
+%
+% \blank
+%
+% \startuseMPgraphic{demoshape:back}
+% fill
+% unitcircle xysized (RuleWidth,RuleHeight+RuleDepth)
+% withcolor RuleColor ;
+% \stopuseMPgraphic
+%
+% \startuseMPgraphic{demoshape:fore}
+% draw
+% unitcircle xysized (RuleWidth,RuleHeight+RuleDepth)
+% withcolor RuleColor
+% withpen pencircle scaled RuleThickness ;
+% \stopuseMPgraphic
+%
+% \testfeatureonce{100}{\dontleavehmode
+% \ruledhbox\bgroup
+% \red \frule width 1cm height 3mm depth 1mm type mp line 2pt data {\includeMPgraphic{demoshape:back}}\relax
+% \hskip-1cm
+% \green \frule width 1cm height 3mm depth 1mm type mp line 2pt data {\includeMPgraphic{demoshape:fore}}\relax
+% \egroup
+% \space}
+%
+% \blank
+%
+% \dontleavehmode
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed {test}}}
+% \framed {test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=normalframe,frame=off]{test}}}
+% \framed[background=normalframe,frame=off]{test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[corner=round] {test}}}
+% \framed[corner=round] {test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=off] {test}}}
+% \framed[background=ovalframe,frame=off] {test}
+% \testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=on] {test}}}
+% \framed[background=ovalframe,frame=on] {test}
+%
+% \stoptext
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-trf.lmt b/Master/texmf-dist/tex/context/base/mkxl/grph-trf.lmt
new file mode 100644
index 00000000000..f68d6a6a807
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-trf.lmt
@@ -0,0 +1,126 @@
+if not modules then modules = { } end modules ['grph-trf'] = {
+ version = 1.001,
+ comment = "companion to grph-trf.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- see grph-trf-todo.lua for older preliminary code for the rest
+
+local sind, cosd, tand, abs = math.sind, math.cosd, math.tand, math.abs
+
+local setdimension = tex.setdimensionvalue
+
+local function analyzerotate(rotation,width,height,depth,total,notfit,obeydepth)
+ --
+ -- print(rotation,width,height,depth,notfit,obeydepth)
+ --
+ local sin = sind(rotation)
+ local cos = cosd(rotation)
+ local abssin = abs(sin)
+ local abscos = abs(cos)
+ local xsize = 0
+ local ysize = 0
+ local xposition = 0
+ local yposition = 0
+ local xoffset = 0
+ local yoffset = 0
+ local newwidth = width
+ local newheight = height
+ local newdepth = depth
+ -- print(sin,cos)
+ if sin > 0 then
+ if cos > 0 then
+ xsize = cos * width + sin * total
+ ysize = sin * width + cos * total
+ yposition = cos * total
+ if notfit then
+ xoffset = - sin * height
+ newwidth = sin * depth + cos * width
+ else
+ newwidth = xsize + xposition - xoffset
+ end
+ if obeydepth then
+ yoffset = cos * depth
+ end
+ newheight = ysize - yoffset
+ newdepth = yoffset
+ -- print("case 1, done")
+ else
+ xsize = abscos * width + sin * total
+ ysize = sin * width + abscos * total
+ xposition = abscos * width
+ if notfit then
+ xoffset = - xsize + sin * depth
+ end
+ if obeydepth then
+ yoffset = abscos * height
+ newwidth = abssin * total + abscos * width + xoffset
+ else
+ newwidth = xsize
+ end
+ newheight = ysize - yoffset
+ newdepth = yoffset
+ -- print("case 2, done")
+ end
+ else
+ if cos < 0 then
+ xsize = abscos * width + abssin * total
+ ysize = abssin * width + abscos * total
+ xposition = xsize
+ yposition = abssin * width
+ if notfit then
+ xoffset = - xsize + abssin * height
+ end
+ if obeydepth then
+ yoffset = ysize + cos * depth
+ end
+ newwidth = notfit and (abssin * height) or xsize
+ newheight = ysize - yoffset
+ newdepth = yoffset
+ -- print("case 3, done")
+ else
+ xsize = cos * width + abssin * total
+ ysize = abssin * width + cos * total
+ xposition = abssin * total
+ yposition = cos * total
+ if notfit then
+ xoffset = - abssin * depth
+ newwidth = xsize + xoffset
+ else
+ newwidth = xsize
+ end
+ if obeydepth then
+ yoffset = cos * depth
+ end
+ newheight = ysize - yoffset + sin * width
+ newdepth = yoffset - sin * width
+ -- print("case 4, done")
+ end
+ end
+ setdimension("d_grph_rotate_x_size", xsize)
+ setdimension("d_grph_rotate_y_size", ysize)
+ setdimension("d_grph_rotate_x_position", xposition)
+ setdimension("d_grph_rotate_y_position", yposition)
+ setdimension("d_grph_rotate_x_offset", xoffset)
+ setdimension("d_grph_rotate_y_offset", yoffset)
+ setdimension("d_grph_rotate_new_width", newwidth)
+ setdimension("d_grph_rotate_new_height", newheight)
+ setdimension("d_grph_rotate_new_depth", newdepth)
+end
+
+interfaces.implement {
+ name = "analyzerotate",
+ actions = analyzerotate,
+ arguments = {
+-- "integer",
+ "number",
+ "dimension",
+ "dimension",
+ "dimension",
+ "dimension",
+ "conditional",
+ "conditional",
+ },
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-trf.mkxl b/Master/texmf-dist/tex/context/base/mkxl/grph-trf.mkxl
new file mode 100644
index 00000000000..c7e0f5e2f21
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/grph-trf.mkxl
@@ -0,0 +1,1003 @@
+%D \module
+%D [ file=grph-trf,
+%D version=2006.08.26, % overhaul/split of 1997.03.31 core-fig
+%D title=\CONTEXT\ Graphic Macros,
+%D subtitle=Transformations,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Graphic Macros / Transformations}
+
+\unprotect
+
+%D We probably use too many dimens as the width calculations can go away. Some of
+%D this is an inheritance of limited backends (some supported fractions, some
+%D 1000's, some dimentions) so we calculate all of them. Nowadays scaling is always
+%D available so we could simplify the code. On the other hand, we now get some extra
+%D values for free.
+%D
+%D We could move the calculations to \LUA\ and clean up this lot anyway. On the
+%D other hand, there is some danger of messing up so it has a real low priority.
+
+\registerctxluafile{grph-trf}{autosuffix}
+
+% local:
+
+\newdimen\d_grph_scale_x_size
+\newdimen\d_grph_scale_y_size
+\newdimen\d_grph_scale_x_offset
+\newdimen\d_grph_scale_y_offset
+
+\newdimen\d_grph_scale_h_size
+\newdimen\d_grph_scale_v_size
+
+\newconditional\c_grph_scale_done
+\newconditional\c_grph_scale_scaling_done
+\newconditional\c_grph_scale_limit_factors \settrue\c_grph_scale_limit_factors
+
+\newconditional\c_grph_scale_swap_factor
+
+\newdimen\d_grph_scale_wd
+\newdimen\d_grph_scale_ht
+\newdimen\d_grph_scale_dp
+
+% global
+
+\newdimen\d_grph_scale_used_x_size
+\newdimen\d_grph_scale_used_y_size
+
+\newcount\c_grph_scale_used_x_scale
+\newcount\c_grph_scale_used_y_scale
+
+\let \m_grph_scale_used_x_scale\!!plusone
+\let \m_grph_scale_used_y_scale\!!plusone
+
+\newdimen\d_grph_scale_outer_v_size % we cannot manipulate any global vsize !
+
+% scratch:
+
+\let\m_grph_scale_temp \empty
+\let\m_grph_scale_temp_x\empty
+\let\m_grph_scale_temp_y\empty
+
+% public:
+
+\mutable\let\finalscaleboxxscale \!!plusone
+\mutable\let\finalscaleboxyscale \!!plusone
+\mutable\let\finalscaleboxwidth \!!zeropoint
+\mutable\let\finalscaleboxheight \!!zeropoint
+
+% we can let sx/sy win (first check)
+
+\installcorenamespace{scale}
+\installcorenamespace{scalegrid}
+\installcorenamespace{scalenorm}
+\installcorenamespace{scalefact}
+
+\installcommandhandler \??scale {scale} \??scale % we can have instances
+
+\setupscale
+ [\c!sx=\scaleparameter\c!s,
+ \c!sy=\scaleparameter\c!s,
+ \c!s=1,
+ %\c!scale=,
+ %\c!xscale=,
+ %\c!yscale=,
+ %\c!width=,
+ %\c!height=,
+ %\c!lines=,
+ %\c!factor=,
+ %\c!hfactor=,
+ %\c!wfactor=,
+ %\c!grid=,
+ %\c!equalwidth=,
+ %\c!equalheight=,
+ \c!maxwidth=\scaleparameter\c!width,
+ \c!maxheight=\scaleparameter\c!height]
+
+\permanent\tolerant\protected\def\scale[#1]#*[#2]%
+ {\bgroup
+ % this is quite common so we might make this a helper
+ \ifarguments
+ \let\currentscale\empty
+ \or
+ \ifhastok={#1}%
+ \let\currentscale\empty
+ \setupcurrentscale[#1]%
+ \else
+ \edef\currentscale{#1}%
+ \fi
+ \or
+ \edef\currentscale{#1}%
+ \setupcurrentscale[#2]%
+ \fi
+ %
+ \dowithnextboxcs\grph_scale_finish\hbox}
+
+\def\grph_scale_finish
+ {% todo: p_scale_
+ \edef\p_scale {\scaleparameter\c!scale }%
+ \edef\p_xscale {\scaleparameter\c!xscale }%
+ \edef\p_yscale {\scaleparameter\c!yscale }%
+ \edef\p_width {\scaleparameter\c!width }%
+ \edef\p_height {\scaleparameter\c!height }%
+ \edef\p_depth {\scaleparameter\c!depth }%
+ \edef\p_lines {\scaleparameter\c!lines }%
+ \edef\p_factor {\scaleparameter\c!factor }%
+ \edef\p_hfactor {\scaleparameter\c!hfactor }%
+ \edef\p_wfactor {\scaleparameter\c!wfactor }%
+ % \edef\p_grid {\scaleparameter\c!grid }% used once
+ \edef\p_maxwidth {\scaleparameter\c!maxwidth }%
+ \edef\p_maxheight {\scaleparameter\c!maxheight }%
+ \edef\p_sx {\scaleparameter\c!sx }%
+ \edef\p_sy {\scaleparameter\c!sy }%
+ \edef\p_equalwidth {\scaleparameter\c!equalwidth }%
+ \edef\p_equalheight{\scaleparameter\c!equalheight}%
+ %
+ \d_grph_scale_dp\dp\nextbox
+ \ifx\p_depth\v!no \ifzeropt\d_grph_scale_dp \else
+ \setbox\nextbox\naturalhpack{\raise\d_grph_scale_dp\box\nextbox}% new
+ \d_grph_scale_dp\dp\nextbox
+ \fi \fi
+ \d_grph_scale_wd\wd\nextbox
+ \d_grph_scale_ht\ht\nextbox
+ \d_grph_scale_dp\dp\nextbox
+ %
+ \glet\finalscaleboxxscale \!!plusone
+ \glet\finalscaleboxyscale \!!plusone
+ \xdef\finalscaleboxwidth {\the\d_grph_scale_wd}%
+ \xdef\finalscaleboxheight{\the\d_grph_scale_ht}%
+ %
+ \forgetall
+ \dontcomplain
+ %
+ \setfalse\c_grph_scale_done
+ \grph_scale_calculate
+ \ifconditional\c_grph_scale_done
+ \grph_scale_apply
+ \fi
+ \grph_scale_position
+ %
+ \box\nextbox
+ \egroup}
+
+\def\grph_scale_apply
+ {\d_grph_scale_wd\finalscaleboxxscale\d_grph_scale_wd
+ \d_grph_scale_ht\finalscaleboxyscale\d_grph_scale_ht
+ \d_grph_scale_dp\finalscaleboxyscale\d_grph_scale_dp
+ \ifdim\d_grph_scale_wd=\wd\nextbox
+ \ifdim\d_grph_scale_ht=\ht\nextbox
+ \ifdim\d_grph_scale_dp=\dp\nextbox
+ % \grph_scale_apply_nop
+ \else
+ \grph_scale_apply_yes
+ \fi
+ \else
+ \grph_scale_apply_yes
+ \fi
+ \else
+ \grph_scale_apply_yes
+ \fi}
+
+\def\grph_scale_apply_yes
+ {\setbox\nextbox\hcontainer
+ {\dostartscaling \finalscaleboxxscale \finalscaleboxyscale
+ \smashedbox\nextbox
+ \dostopscaling}%
+ \wd\nextbox\d_grph_scale_wd
+ \ht\nextbox\d_grph_scale_ht
+ \dp\nextbox\d_grph_scale_dp}
+
+\def\m_grph_scale_stamp_c{11}
+
+\def\grph_scale_calculate
+ {\ifdim\d_grph_scale_ht>\zeropoint \ifdim\d_grph_scale_wd>\zeropoint
+ \edef\m_grph_scale_stamp_a{\p_scale\p_xscale\p_yscale\p_factor\p_wfactor\p_hfactor\p_lines\p_width\p_height}%
+ \edef\m_grph_scale_stamp_b{\p_sx\p_sy}%
+ \ifempty\m_grph_scale_stamp_a
+ \ifx\m_grph_scale_stamp_b\m_grph_scale_stamp_c
+ % no scaling, don't change this (previous attempts failed anyway)
+ \insidefloattrue % trick
+ \grph_scale_calculations_yes
+ \else
+ \grph_scale_check_sx_sy
+ \grph_scale_calculations_nop
+ \fi
+ \else
+ \ifempty\m_grph_scale_stamp_b
+ % no need to check further
+ \else
+ \grph_scale_check_sx_sy
+ \fi
+ \grph_scale_calculations_yes
+ \fi
+ \fi \fi}
+
+\def\grph_scale_check_sx_sy
+ {\ifdim\p_sx\onepoint=\onepoint\else\edef\p_width {\the\dimexpr\p_sx\d_grph_scale_wd}\fi
+ \ifdim\p_sy\onepoint=\onepoint\else\edef\p_height{\the\dimexpr\p_sy\d_grph_scale_ht}\fi}
+
+\def\grph_scale_rounded#1%
+ {\thewithoutunit\dimexpr#1\points*100+32768\scaledpoint\relax}
+
+\def\grph_scale_calculations_nop
+ {\settrue\c_grph_scale_done
+ \xdef\finalscaleboxwidth {\the\dimexpr\p_sx\d_grph_scale_wd\relax}%
+ \xdef\finalscaleboxheight{\the\dimexpr\p_sy\d_grph_scale_ht\relax}%
+ \glet\finalscaleboxxscale\p_sx
+ \glet\finalscaleboxyscale\p_sy
+ \ifempty\finalscaleboxxscale\let\finalscaleboxxscale\!!plusone\fi
+ \ifempty\finalscaleboxyscale\let\finalscaleboxyscale\!!plusone\fi}
+
+\let\grph_scale_calculations_report\relax
+
+\def\grph_scale_calculations_yes
+ {\settrue\c_grph_scale_done
+ % initial values
+ \d_grph_scale_x_offset\zeropoint
+ \d_grph_scale_y_offset\zeropoint
+ \d_grph_scale_x_size \d_grph_scale_wd
+ \d_grph_scale_y_size \d_grph_scale_ht % alleen ht wordt geschaald!
+ % final values
+ \global\d_grph_scale_used_x_size \zeropoint % see note * (core-fig)
+ \global\d_grph_scale_used_y_size \zeropoint % see note * (core-fig)
+ \c_grph_scale_used_x_scale \plusone % see note * (core-fig)
+ \c_grph_scale_used_y_scale \plusone % see note * (core-fig)
+ \let\m_grph_scale_used_x_scale \!!plusone
+ \let\m_grph_scale_used_y_scale \!!plusone
+ % preparations
+ \setfalse\c_grph_scale_scaling_done
+ \grph_scale_check_parameters
+ % calculators
+ % beware, they operate in sequence, and calculate missing dimensions / messy
+ % grph_scale_by_nature % when? needed?
+ \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_factor \fi
+ \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_scale \fi
+ \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_dimension\fi
+ % used in actual scaling
+ \xdef\finalscaleboxwidth {\the\d_grph_scale_used_x_size}%
+ \xdef\finalscaleboxheight {\the\d_grph_scale_used_y_size}%
+ \glet\finalscaleboxxscale \m_grph_scale_used_x_scale
+ \glet\finalscaleboxyscale \m_grph_scale_used_y_scale
+ \grph_scale_calculations_report}
+
+\defcsname\??scalegrid\v!yes \endcsname{\getnoflines \d_grph_scale_used_y_size\edef\p_height{\the\noflines\lineheight}}
+\defcsname\??scalegrid\v!height \endcsname{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight+\strutdepth}}
+\defcsname\??scalegrid\v!depth \endcsname{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight-\strutdepth}}
+\defcsname\??scalegrid\v!halfline\endcsname{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\dimexpr\noflines\lineheight+.5\lineheight}}
+\defcsname\??scalegrid\v!fit \endcsname{\getrawnoflines\d_grph_scale_used_y_size\edef\p_height{\the\noflines\lineheight}}
+\letcsname\??scalegrid\empty \endcsname\donothing
+
+\def\grph_scale_check_parameters % resolve self referencing loops
+ {\ifempty\p_maxwidth \else \edef\p_maxwidth {\the\dimexpr\p_maxwidth }\fi
+ \ifempty\p_maxheight\else \edef\p_maxheight{\the\dimexpr\p_maxheight }\fi
+ \ifempty\p_lines \else \edef\p_height {\the\dimexpr\p_lines\lineheight}\fi
+ \begincsname\??scalegrid\scaleparameter\c!grid\endcsname}
+
+\def\grph_scale_by_nature % where ! ! ! ! !
+ {\ifempty\p_width \else \global\d_grph_scale_used_x_size\p_width \fi
+ \ifempty\p_height\else \global\d_grph_scale_used_y_size\p_height\fi
+ \ifempty\p_scale \else \c_grph_scale_used_x_scale\p_scale
+ \c_grph_scale_used_y_scale\p_scale \fi
+ \ifempty\p_xscale\else \c_grph_scale_used_x_scale\p_xscale\fi
+ \ifempty\p_yscale\else \c_grph_scale_used_y_scale\p_yscale\fi}
+
+% \defineexternalfigure[width-6][factor=auto,maxwidth=\textheight,maxheight=\textwidth]
+% \defineexternalfigure[width-7][factor=auto,maxwidth=\textwidth,maxheight=\textheight]
+% \placefigure{none}{\rotate[frame=on,offset=overlay]{\externalfigure[t:/sources/cow.pdf][width-6]}} \page
+% \placefigure{none}{\framed[frame=on,offset=overlay]{\externalfigure[t:/sources/cow.pdf][width-7]}}
+
+%D The \typpe {min} option makes sure that the smallest available space determines
+%D the max size (so we can get a bleed on the other axis):
+%D
+%D \startlinecorrection
+%D \startcombination[nx=2,ny=2,distance=4cm]
+%D {\externalfigure[hacker][factor=max,maxwidth=6cm,maxheight=6cm]} {}
+%D {\externalfigure[mill] [factor=max,maxwidth=6cm,maxheight=6cm]} {}
+%D {\externalfigure[hacker][factor=min,maxwidth=6cm,maxheight=6cm]} {}
+%D {\externalfigure[mill] [factor=min,maxwidth=6cm,maxheight=6cm]} {}
+%D \stopcombination
+%D \stoplinecorrection
+
+\def\m_grph_scale_factor_set{\v!min,\v!max,\v!fit,\v!broad,\v!auto} % can be an \edef
+
+\def\grph_scale_by_factor
+ {\doifelseinset\p_factor\m_grph_scale_factor_set
+ \grph_scale_by_factor_a
+ {\doifelseinset\p_hfactor\m_grph_scale_factor_set
+ \grph_scale_by_factor_b
+ {\doifelseinset\p_wfactor\m_grph_scale_factor_set
+ \grph_scale_by_factor_c
+ \grph_scale_by_factor_d}}}
+
+\def\grph_scale_by_factor_a
+ {\grph_scale_apply_size
+ \ifdim\d_grph_scale_x_size >\d_grph_scale_y_size
+ \grph_scale_calculate_norm \d_grph_scale_used_x_size\p_factor\p_maxwidth\hsize\d_grph_scale_h_size
+ \grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size
+ \d_grph_scale_used_y_size\m_grph_scale_used_x_scale\d_grph_scale_y_size
+ \else
+ \grph_scale_calculate_norm \d_grph_scale_used_y_size\p_factor\p_maxheight\d_grph_scale_outer_v_size\d_grph_scale_v_size
+ \grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size
+ \fi
+ \grph_scale_by_factor_indeed}
+
+\def\grph_scale_by_factor_b
+ {\grph_scale_apply_size
+ \grph_scale_calculate_norm \d_grph_scale_used_y_size\p_hfactor\p_maxheight\d_grph_scale_outer_v_size\d_grph_scale_v_size
+ \grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size
+ \grph_scale_by_factor_indeed}
+
+\def\grph_scale_by_factor_c
+ {\grph_scale_apply_size
+ \grph_scale_calculate_norm \d_grph_scale_used_x_size\p_wfactor\p_maxwidth\hsize\d_grph_scale_h_size
+ \grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size
+ \d_grph_scale_used_y_size\m_grph_scale_used_x_scale\d_grph_scale_y_size
+ \grph_scale_by_factor_indeed}
+
+\def\grph_scale_by_factor_d
+ {\grph_scale_calculate_norm\d_grph_scale_used_y_size\p_factor \p_height \textheight\d_grph_scale_v_size
+ \grph_scale_calculate_norm\d_grph_scale_used_y_size\p_hfactor\p_height \textheight\d_grph_scale_v_size
+ \grph_scale_calculate_norm\d_grph_scale_used_x_size\p_wfactor\p_width \hsize \hsize}
+
+\def\grph_scale_by_factor_indeed
+ {\grph_scale_calculate_fact\p_factor
+ \settrue\c_grph_scale_scaling_done
+ \ifconditional\c_grph_scale_limit_factors
+ \ifdim\d_grph_scale_used_x_size\ifconditional\c_grph_scale_swap_factor<\else>\fi\d_grph_scale_h_size
+ \global\d_grph_scale_used_y_size\zeropoint
+ \global\d_grph_scale_used_x_size\d_grph_scale_h_size
+ \orelse\ifdim\d_grph_scale_used_y_size\ifconditional\c_grph_scale_swap_factor<\else>\fi\d_grph_scale_v_size
+ \global\d_grph_scale_used_x_size\zeropoint
+ \global\d_grph_scale_used_y_size\d_grph_scale_v_size
+ \fi
+ \fi
+ \grph_scale_by_dimension}
+
+\def\grph_scale_by_scale
+ {\edef\m_grph_scale_temp{\p_scale\p_xscale\p_yscale}%
+ \ifempty\m_grph_scale_temp \else
+ \grph_scale_apply_scale\m_grph_scale_used_x_scale\p_xscale
+ \grph_scale_apply_scale\m_grph_scale_used_y_scale\p_yscale
+ % \global\d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size\relax % no global needed here
+ % \global\d_grph_scale_used_y_size\m_grph_scale_used_y_scale\d_grph_scale_y_size\relax % no global needed here
+ % wrong: we need to recalculate the scale
+ \global\d_grph_scale_used_x_size\zeropoint
+ \global\d_grph_scale_used_y_size\zeropoint
+ %
+ \ifempty\p_maxwidth
+ \ifempty\p_maxheight\orelse\ifdim\d_grph_scale_y_size>\p_maxheight\relax
+ \global\d_grph_scale_used_y_size\p_maxheight
+ \fi
+ \orelse\ifdim\d_grph_scale_x_size>\p_maxwidth\relax
+ \global\d_grph_scale_used_x_size\p_maxwidth
+ \fi
+ \fi}
+
+\def\grph_scale_by_dimension
+ {\ifdim\d_grph_scale_used_x_size>\zeropoint
+ \ifdim\d_grph_scale_used_y_size>\zeropoint
+ \grph_scale_by_dimension_a
+ \else
+ \grph_scale_by_dimension_b
+ \fi
+ \else
+ \ifdim\d_grph_scale_used_y_size>\zeropoint
+ \grph_scale_by_dimension_c
+ \else
+ \grph_scale_by_dimension_d
+ \fi
+ \fi}
+
+\def\grph_scale_by_dimension_a
+ {\grph_scale_by_dimension_indeed
+ {\grph_scale_calculate_scale\m_grph_scale_used_y_scale\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \grph_scale_calculate_scale\m_grph_scale_used_x_scale\d_grph_scale_used_x_size\d_grph_scale_x_size}%
+ {\grph_scale_calculate_scale\m_grph_scale_used_y_scale\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \grph_scale_calculate_scale\m_grph_scale_used_x_scale\d_grph_scale_used_x_size\d_grph_scale_x_size}%
+ {\grph_scale_calculate_scale\m_grph_scale_used_y_scale\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \grph_scale_calculate_scale\m_grph_scale_used_x_scale\d_grph_scale_used_x_size\d_grph_scale_x_size}}
+
+\def\grph_scale_by_dimension_b
+ {\grph_scale_by_dimension_indeed
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size
+ \d_grph_scale_used_y_size\m_grph_scale_used_x_scale\d_grph_scale_y_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size
+ \d_grph_scale_used_y_size\m_grph_scale_used_x_scale\d_grph_scale_y_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size
+ \d_grph_scale_used_y_size\m_grph_scale_used_x_scale\d_grph_scale_y_size}}
+
+\def\grph_scale_by_dimension_c
+ {\grph_scale_by_dimension_indeed % weird .. three same cases
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size}}
+
+\def\grph_scale_by_dimension_d
+ {\grph_scale_by_dimension_indeed
+ {\grph_scale_apply_scale\m_grph_scale_used_x_scale\p_xscale
+ \grph_scale_apply_scale\m_grph_scale_used_y_scale\p_yscale
+ \global\d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size
+ \global\d_grph_scale_used_y_size\m_grph_scale_used_y_scale\d_grph_scale_y_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size
+ \d_grph_scale_used_y_size\m_grph_scale_used_x_scale\d_grph_scale_y_size}%
+ {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size
+ \d_grph_scale_used_x_size\m_grph_scale_used_x_scale\d_grph_scale_x_size}}
+
+\def\grph_scale_by_dimension_indeed#1#2#3%
+ {#1\relax
+ \ifempty\p_maxwidth\orelse\ifdim\d_grph_scale_used_x_size>\p_maxwidth\relax
+ \global\d_grph_scale_used_x_size\p_maxwidth
+ #2\relax
+ \fi
+ \ifempty\p_maxheight\orelse\ifdim\d_grph_scale_used_y_size>\p_maxheight\relax
+ \global\d_grph_scale_used_y_size\p_maxheight
+ #3\relax
+ \fi}
+
+% we can use \lastnamedcs if we want to squeeze out some more
+
+\def\grph_scale_calculate_norm#1#2% todo: swap 1 and 2 and pass one less
+ {\csname\??scalenorm\ifcsname\??scalenorm#2\endcsname#2\else\s!unknown\fi\endcsname#1#2}
+
+\def\grph_scale_calculate_fact#1%
+ {\csname\??scalefact\ifcsname\??scalefact#1\endcsname#1\else\s!unknown\fi\endcsname}
+
+\defcsname\??scalenorm\v!max \endcsname#1#-#-#2#-{\global#1#2}
+\defcsname\??scalenorm\v!fit \endcsname#1#-#-#-#2{\global#1#2}
+\defcsname\??scalenorm\v!broad \endcsname#1#-#-#-#2{\global#1\dimexpr#2-4\externalfigureparameter\c!bodyfont\relax}
+\defcsname\??scalenorm\s!unknown\endcsname#1#2#-#-#-{\global#1\dimexpr#2\dimexpr\externalfigureparameter\c!bodyfont/10\relax\relax} % brr ex
+\defcsname\??scalenorm\v!auto \endcsname#1#-#2#-#-{\ifempty#2\else\global#1#2\fi}
+\defcsname\??scalenorm\empty \endcsname#1#-#2#-#-{\ifempty#2\else\global#1#2\fi}
+\defcsname\??scalenorm\s!default\endcsname#1#-#2#-#-{\ifempty#2\else\global#1#2\fi}
+
+\defcsname\??scalefact\v!min \endcsname{\global\settrue \c_grph_scale_swap_factor}
+\defcsname\??scalefact\s!unknown\endcsname{\global\setfalse\c_grph_scale_swap_factor}
+
+\defcsname\??scalenorm\v!min\endcsname#-#-#-#-#-% an ugly hack
+ {\d_grph_scale_used_x_size\hsize
+ \d_grph_scale_used_y_size\vsize}
+
+\def\grph_scale_calculate_scales#1#2%
+ {\edef\m_grph_scale_used_x_scale{\luaexpr{\number#1/\number#2}}%
+ \let\m_grph_scale_used_y_scale\m_grph_scale_used_x_scale}
+
+\def\grph_scale_calculate_scale#1#2#3%
+ {\edef#1{\luaexpr{\number#2/\number#3}}}
+
+\def\grph_scale_apply_scale#1#2% #1 = parameter / scale can be empty
+ {% no overflow
+ \edef#1{\luaexpr
+ {\number
+ \ifempty#2%
+ \ifempty\p_scale \plusthousand \else
+ \ifnum \p_scale=\zerocount \plusthousand \else
+ \p_scale \fi\fi
+ \orelse\ifnum#2=\zerocount
+ \ifempty\p_scale \plusthousand \else
+ \ifnum \p_scale=\zerocount \plusthousand \else
+ \p_scale \fi\fi
+ \else
+ #2%
+ \fi
+ /1000}}}
+
+\def\grph_scale_apply_size
+ {\ifempty\p_maxheight
+ \d_grph_scale_outer_v_size\textheight
+ \ifinner
+ \d_grph_scale_outer_v_size \vsize % \textheight =\vsize
+ \scratchdimen\vsize % \scratchdimen=\textheight
+ \orelse\ifinsidefloat
+ \d_grph_scale_outer_v_size \vsize % \textheight =\vsize
+ \scratchdimen\vsize % \scratchdimen=\textheight
+ \orelse\ifinpagebody
+ \d_grph_scale_outer_v_size \vsize % \textheight =\vsize
+ \scratchdimen\vsize % \scratchdimen=\textheight
+ \orelse\ifdim\pagegoal<\maxdimen
+ \ifdim\pagetotal<\pagegoal
+ \scratchdimen\dimexpr\pagegoal-\pagetotal\relax
+ \else
+ \scratchdimen\d_grph_scale_outer_v_size % \textheight
+ \fi
+ \else
+ \scratchdimen\d_grph_scale_outer_v_size % \textheight
+ \fi
+ \else
+ \scratchdimen\p_maxheight
+ \d_grph_scale_outer_v_size\scratchdimen
+ \fi
+ \ifempty\p_height
+ \d_grph_scale_v_size\scratchdimen
+ \else
+ \d_grph_scale_v_size\p_height
+ \fi
+ \ifempty\p_width
+ \d_grph_scale_h_size\hsize
+ \else
+ \d_grph_scale_h_size\p_width
+ \fi}
+
+% \startcombination
+% {\externalfigure[cow.pdf] [frame=on,height=3cm,equalwidth=6cm]} {a cow}
+% {\externalfigure[mill.png][frame=on,height=3cm,equalwidth=6cm]} {a mill}
+% \stopcombination
+
+\def\grph_scale_position
+ {\ifempty\p_equalwidth \else
+ \scratchdimen\p_equalwidth\relax
+ \ifdim\d_grph_scale_wd<\scratchdimen
+ \setbox\nextbox\naturalhpack to \scratchdimen{\hss\box\nextbox\hss}%
+ \fi
+ \fi
+ \ifempty\p_equalheight \else
+ \scratchdimen\p_equalheight\relax
+ \ifdim\d_grph_scale_ht<\scratchdimen
+ \setbox\nextbox\naturalvpack to \scratchdimen{\vss\box\nextbox\vss}%
+ \fi
+ \fi}
+
+\permanent\protected\def\fastscale#1%
+ {\ifnum#1=1000\relax
+ \expandafter\grph_scale_fast_nop
+ \else
+ \expandafter\grph_scale_fast_yes
+ \fi{#1}}
+
+\def\grph_scale_fast_nop#1%
+ {\hbox}
+
+\def\grph_scale_fast_yes#1%
+ {\edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1\onepoint/1000\relax}% brrr
+ \let\finalscaleboxyscale\finalscaleboxxscale
+ \dowithnextboxcs\grph_scale_fast_finish\hbox} % container ?
+
+\def\grph_scale_fast_finish
+ {\grph_scale_apply
+ \box\nextbox
+ \endgroup}
+
+\permanent\protected\def\fastsxsy#1#2%
+ {\bgroup
+ \edef\p_sx{#1}%
+ \edef\p_sy{#2}%
+ \dowithnextboxcs\grph_scale_fast_sx_xy_finish\hbox} % container?
+
+\def\grph_scale_fast_sx_xy_finish
+ {\grph_scale_check_sx_sy
+ \d_grph_scale_wd\wd\nextbox
+ \d_grph_scale_ht\ht\nextbox
+ \d_grph_scale_dp\dp\nextbox
+ \grph_scale_calculations_nop
+ \grph_scale_apply
+ \box\nextbox
+ \egroup}
+
+%D \macros
+%D {clip, setupclipping}
+%D
+%D Although related to figures, clipping can be applied to arbitrary content. We can
+%D use \METAPOST\ to provide a non rectangular clipping path.
+%D
+%D \starttyping
+%D \startMPclip{fun}
+%D clip currentpicture to fullcircle
+%D shifted (.5,.5) xscaled \width yscaled \height ;
+%D \stopMPclip
+%D \stoptyping
+%D
+%D We get a rectangular piece of the figure when we say:
+%D
+%D \starttyping
+%D \clip[x=2,y=1]{\externalfigure[photo]}
+%D \stoptyping
+%D
+%D When we want to clip to the oval we defined a few lines ago, we say:
+%D
+%D \starttyping
+%D \clip[nx=1,ny=1,x=1,y=1,mp=fun]{\externalfigure[photo]}
+%D \stoptyping
+%D
+%D The general characteristics of clipping can be set up with
+%D
+%D \showsetup{setupclipping}
+
+\installcorenamespace{clipping}
+
+\installdirectcommandhandler \??clipping {clipping}
+
+\permanent\tolerant\protected\def\clip[#1]% nb top->bottom left->right
+ {\bgroup
+ \ifparameter#1\or
+ \setupcurrentclipping[#1]%
+ \fi
+ \dowithnextboxcs\grph_clip_finish\hbox}
+
+\def\grph_clip_finish
+ {\doifelse{\clippingparameter\c!state}\v!start
+ \grph_clip_yes_finish
+ \grph_clip_nop_finish}
+
+\def\grph_clip_yes_finish
+ {\ifdim\clippingparameter\c!width>\zeropoint
+ \scratchwidth \clippingparameter\c!width
+ \scratchxoffset\clippingparameter\c!hoffset
+ \else
+ \scratchwidth\dimexpr\wd\nextbox/\clippingparameter\c!nx\relax
+ \scratchxoffset\dimexpr\clippingparameter\c!x\scratchwidth-\scratchwidth\relax
+ \scratchwidth\clippingparameter\c!sx\scratchwidth
+ \fi
+ \relax % sure
+ \ifdim\clippingparameter\c!height>\zeropoint
+ \scratchheight\clippingparameter\c!height
+ \scratchyoffset\dimexpr\ht\nextbox-\clippingparameter\c!voffset-\scratchheight\relax
+ \else
+ \scratchheight\dimexpr\ht\nextbox/\clippingparameter\c!ny\relax
+ \scratchyoffset\dimexpr-\clippingparameter\c!y\scratchheight-\clippingparameter\c!sy\scratchheight+\scratchheight\relax
+ \scratchheight\clippingparameter\c!sy\scratchheight
+ \advance\scratchyoffset \ht\nextbox
+ \fi
+ \setbox\nextbox\naturalhpack
+ {\advance\scratchxoffset -\clippingparameter\c!leftoffset \relax
+ \advance\scratchyoffset -\clippingparameter\c!bottomoffset\relax
+ \hskip-\scratchxoffset
+ \lower\scratchyoffset
+ \box\nextbox}%
+ \wd\nextbox\zeropoint
+ \ht\nextbox\zeropoint
+ \dp\nextbox\zeropoint
+ \setbox\nextbox\naturalhpack
+ {\advance\scratchwidth \dimexpr\clippingparameter\c!leftoffset +\clippingparameter\c!rightoffset\relax
+ \advance\scratchheight\dimexpr\clippingparameter\c!bottomoffset+\clippingparameter\c!topoffset \relax
+ \dostartclipping{\clippingparameter\c!mp}\scratchwidth\scratchheight
+ \box\nextbox
+ \dostopclipping}%
+ \setbox\nextbox\hcontainer
+ {\hskip-\clippingparameter\c!leftoffset
+ \lower \clippingparameter\c!bottomoffset
+ \box\nextbox}%
+ \wd\nextbox\scratchwidth
+ \ht\nextbox\scratchheight
+ \dp\nextbox\zeropoint
+ \box\nextbox
+ \egroup}
+
+\def\grph_clip_nop_finish
+ {\box\nextbox
+ \egroup}
+
+\setupclipping
+ [\c!state=\v!start,
+ \c!n=\plusone, % was \plustwo
+ \c!nx=\clippingparameter\c!n,\c!x=\plusone,\c!sx=\plusone,
+ \c!ny=\clippingparameter\c!n,\c!y=\plusone,\c!sy=\plusone,
+ \c!width=\zeropoint,
+ \c!height=\zeropoint,
+ \c!hoffset=\zeropoint,
+ \c!voffset=\zeropoint,
+ \c!offset=\zeropoint,
+ \c!leftoffset=\clippingparameter\c!offset,
+ \c!rightoffset=\clippingparameter\c!offset,
+ \c!topoffset=\clippingparameter\c!offset,
+ \c!bottomoffset=\clippingparameter\c!offset,
+ \c!mp=]
+
+%D \startbuffer
+%D \startuseMPgraphic{test}
+%D path p ; p := fullcircle scaled 4cm ;
+%D draw p withpen pencircle scaled 1cm ;
+%D setbounds currentpicture to boundingbox p ;
+%D \stopuseMPgraphic
+%D
+%D \hbox to \hsize \bgroup
+%D \hss
+%D \ruledhbox{\useMPgraphic{test}}%
+%D \hss
+%D \ruledhbox{\clip{\useMPgraphic{test}}}%
+%D \hss
+%D \egroup
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+%D Mirroring.
+
+\permanent\protected\def\mirror
+ {\bgroup
+ \dowithnextboxcs\grph_mirror_finish\hbox}
+
+\def\grph_mirror_finish
+ {\scratchdimen\wd\nextbox
+ % better use an hbox (if no \forgetall, leftskip etc may creep in)
+ %\setbox\nextbox\vbox{\forgetall\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
+ \setbox\nextbox\naturalhpack
+ {\dostartmirroring
+ \hskip-\wd\nextbox
+ \box\nextbox
+ \dostopmirroring}%
+ \wd\nextbox\scratchdimen
+ \box\nextbox
+ \egroup}
+
+%D A couple of examples, demonstrating how the depth is taken care of:
+%D
+%D \startbuffer
+%D test\rotate[frame=on, rotation=0] {gans}%
+%D test\rotate[frame=on, rotation=90] {gans}%
+%D test\rotate[frame=on, rotation=180]{gans}%
+%D test\rotate[frame=on, rotation=270]{gans}%
+%D test
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D When we rotate over arbitrary angles, we need to relocate the resulting box
+%D because rotation brings that box onto the negative axis. The calculations (mostly
+%D sin and cosine) need to be tuned for the way a box is packages (i.e. the refence
+%D point). A typical example of drawing, scribbling, and going back to the days of
+%D school math.
+%D
+%D We do a bit more calculations than needed, simply because that way it's easier to
+%D debug the code.
+
+\installcorenamespace {rotate}
+\installcorenamespace {rotatelocation}
+\installcorenamespace {rotatepreset}
+
+%D These are set at the \LUA\ end (it's a cheaper operation than setting a dimen
+%D register and these are actually kind of constants not used in further
+%D calculations):
+
+\mutable\dimendef\d_grph_rotate_x_size \zeropoint
+\mutable\dimendef\d_grph_rotate_y_size \zeropoint
+\mutable\dimendef\d_grph_rotate_x_offset \zeropoint
+\mutable\dimendef\d_grph_rotate_y_offset \zeropoint
+\mutable\dimendef\d_grph_rotate_x_position\zeropoint
+\mutable\dimendef\d_grph_rotate_y_position\zeropoint
+
+\mutable\dimendef\d_grph_rotate_new_width \zeropoint
+\mutable\dimendef\d_grph_rotate_new_height\zeropoint
+\mutable\dimendef\d_grph_rotate_new_depth \zeropoint
+
+%D These aren't:
+
+\newdimen\d_grph_rotate_used_height
+
+\newdimen\d_grph_rotate_width
+\newdimen\d_grph_rotate_height
+\newdimen\d_grph_rotate_depth
+
+\newdimen\d_grph_rotate_saved_width
+\newdimen\d_grph_rotate_saved_height
+\newdimen\d_grph_rotate_saved_depth
+
+\newconditional\c_grph_rotate_obey_depth
+\newconditional\c_grph_rotate_not_fit
+\newconditional\c_grph_rotate_center
+
+\installframedcommandhandler \??rotate {rotate} \??rotate
+
+\setuprotate
+ [\c!rotation=90,
+ \c!location=\v!normal,
+ \c!width=\v!fit,
+ \c!height=\v!fit,
+ \c!offset=\v!overlay,
+ \c!frame=\v!off]
+
+\let\p_rotation_location\empty
+\let\p_rotation_rotation\empty
+
+\permanent\tolerant\protected\def\rotate[#1]% \bgroup: \rotate kan argument zijn
+ {\bgroup
+ \ifparameter#1\or
+ \setupcurrentrotate[#1]%
+ \fi
+ \edef\p_rotation_location{\rotateparameter\c!location}%
+ \edef\p_rotation_rotation{\rotateparameter\c!rotation}%
+ \ifcsname\??rotatelocation\p_rotation_location\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\grph_rotate_default
+ \fi}
+
+\def\grph_rotate_framed
+ {\resetrotateparameter\c!location
+ \dowithnextboxcs\grph_rotate_finish\vbox
+ \inheritedrotateframed}
+
+\def\grph_rotate_normal
+ {\dowithnextboxcs\grph_rotate_finish\vbox}
+
+\def\grph_rotate_finish
+ {\grph_rotate_finish_indeed
+ \egroup}
+
+\def\grph_rotate_default
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \settrue \c_grph_rotate_obey_depth
+ \grph_rotate_framed}
+
+\letcsname\??rotatelocation\v!default\endcsname\grph_rotate_default
+
+\defcsname\??rotatelocation\v!depth\endcsname
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \settrue \c_grph_rotate_obey_depth
+ \grph_rotate_normal}
+
+\defcsname\??rotatelocation\v!fit\endcsname
+ {\settrue \c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \settrue \c_grph_rotate_obey_depth
+ \grph_rotate_normal}
+
+\defcsname\??rotatelocation\v!broad\endcsname
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \setfalse\c_grph_rotate_obey_depth
+ \grph_rotate_normal}
+
+\defcsname\??rotatelocation\v!high\endcsname
+ {\setfalse\c_grph_rotate_not_fit
+ \setfalse\c_grph_rotate_center
+ \setfalse\c_grph_rotate_obey_depth
+ \grph_rotate_framed}
+
+\defcsname\??rotatelocation\v!middle\endcsname
+ {\setfalse\c_grph_rotate_not_fit
+ \settrue \c_grph_rotate_center
+ \setfalse\c_grph_rotate_obey_depth % hm, depth ?
+ \grph_rotate_normal}
+
+\permanent\protected\def\dorotatebox#1% {angle} \hbox/\vbox/\vtop % a fast low level one
+ {\ifcase#1\relax
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\grph_rotate_box
+ \fi{#1}}
+
+\def\grph_rotate_box#1% {angle} \hbox/\vbox/\vtop
+ {\bgroup
+ \hbox\bgroup % compatibility hack
+ \edef\p_rotation_rotation{#1}%
+ \dowithnextboxcs\grph_rotate_finish_box}
+
+\def\grph_rotate_finish_box
+ {\setfalse\c_grph_rotate_not_fit % this is the same as broad but
+ \setfalse\c_grph_rotate_center % without the following grab as
+ \setfalse\c_grph_rotate_obey_depth % we call finish directly
+ \grph_rotate_finish_indeed
+ \egroup
+ \egroup}
+
+\def\grph_rotate_finish_indeed
+ {\naturalhpack\bgroup
+ \ifempty\p_rotation_rotation
+ \grph_rotate_finish_nop
+ \else
+ \grph_rotate_finish_yes
+ \fi
+ \egroup}
+
+\def\grph_rotate_finish_nop
+ {\boxcursor\box\nextbox}
+
+\defcsname\??rotatepreset\v!left\endcsname
+ {\edef\p_rotation_rotation{90}}
+
+\defcsname\??rotatepreset\v!right\endcsname
+ {\edef\p_rotation_rotation{270}}
+
+\defcsname\??rotatepreset\v!inner\endcsname
+ {\signalrightpage
+ \doifelserightpage{\def\p_rotation_rotation{270}}{\def\p_rotation_rotation{90}}}
+
+\defcsname\??rotatepreset\v!outer\endcsname
+ {\signalrightpage
+ \doifelserightpage{\def\p_rotation_rotation{90}}{\def\p_rotation_rotation{270}}}
+
+\letcsname\??rotatepreset\v!default\endcsname\empty
+
+\def\grph_rotate_finish_yes
+ {\begincsname\??rotatepreset\p_rotation_rotation\endcsname
+ \setbox\nextbox\naturalvpack{\box\nextbox}% not really needed
+ \dontcomplain
+ \ifconditional\c_grph_rotate_center
+ \d_grph_rotate_saved_width \wd\nextbox
+ \d_grph_rotate_saved_height\ht\nextbox
+ \d_grph_rotate_saved_depth \dp\nextbox
+ \setbox\nextbox\naturalhpack{\hskip-.5\wd\nextbox\lower.5\ht\nextbox\box\nextbox}%
+ \smashbox\nextbox
+ \fi
+ %
+ \d_grph_rotate_width \wd\nextbox
+ \d_grph_rotate_height\ht\nextbox
+ \d_grph_rotate_depth \dp\nextbox
+ %
+ \setbox\nextbox\naturalvpack{\naturalhpack{\raise\dp\nextbox\box\nextbox}}% can we do without
+ %
+ \d_grph_rotate_used_height\ht\nextbox
+ %
+ \clf_analyzerotate % rather accurate
+ \p_rotation_rotation\space
+ \d_grph_rotate_width
+ \d_grph_rotate_height
+ \d_grph_rotate_depth
+ \d_grph_rotate_used_height
+ \c_grph_rotate_not_fit
+ \c_grph_rotate_obey_depth
+ \relax
+ %
+ \setbox\nextbox\naturalvpack to \d_grph_rotate_y_size
+ {\vfilll
+ \hcontainer to \d_grph_rotate_x_size
+ {\dostartrotation\p_rotation_rotation
+ \wd\nextbox\zeropoint
+ \ht\nextbox\zeropoint
+ \box\nextbox
+ \dostoprotation
+ \hfill}%
+ \kern\d_grph_rotate_y_position}%
+ %
+ \setbox\nextbox\naturalhpack
+ {\kern\dimexpr\d_grph_rotate_x_position+\d_grph_rotate_x_offset\relax
+ \lower\d_grph_rotate_y_offset
+ \box\nextbox}%
+ %
+ \ifconditional\c_grph_rotate_center
+ \setbox\nextbox\naturalhpack{\hskip.5\d_grph_rotate_saved_width\lower-.5\d_grph_rotate_saved_height\box\nextbox}%
+ \wd\nextbox\d_grph_rotate_saved_width
+ \ht\nextbox\d_grph_rotate_saved_height
+ \dp\nextbox\d_grph_rotate_saved_depth
+ \else
+ \wd\nextbox\d_grph_rotate_new_width
+ \ht\nextbox\d_grph_rotate_new_height
+ \dp\nextbox\d_grph_rotate_new_depth
+ \fi
+ %
+ \boxcursor\box\nextbox}
+
+% \dostepwiserecurse{0}{360}{10}
+% {\startlinecorrection[blank]
+% \hbox
+% {\expanded{\setuprotate[rotation=\recurselevel]}%
+% \traceboxplacementtrue
+% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=depth] {\ruledhbox{\bfb (depth)}}}}%
+% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=fit] {\ruledhbox{\bfb (fit)}}}}%
+% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=broad] {\ruledhbox{\bfb (broad)}}}}%
+% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=normal]{\ruledhbox{\bfb (normal)}}}}%
+% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high] {\ruledhbox{\bfb (high)}}}}}
+% \stoplinecorrection}
+
+% \def\Test{\ruledhbox{%
+% \def\DemoX{\vl\kern.5\emwidth\vl}%
+% \kern\emwidth\ruledhpack{\green\rotate[rotation=20] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\blue \rotate[rotation=0] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\red \rotate[rotation=-20] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\green\rotate[rotation=200] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\blue \rotate[rotation=180] {\ruledhpack{\DemoX}}}%
+% \kern\emwidth\ruledhpack{\red \rotate[rotation=-200]{\ruledhpack{\DemoX}}}%
+% \kern\emwidth}}
+
+% \startTEXpage[offset=10pt,align=middle]
+% \setuprotate[location=fit] \Test \par {\infofont\setstrut\strut fit} \par
+% \setuprotate[location=depth] \Test \par {\infofont\setstrut\strut depth} \par
+% \setuprotate[location=broad] \Test \par {\infofont\setstrut\strut broad} \par
+% \setuprotate[location=high] \Test \par {\infofont\setstrut\strut high} \par
+% \setuprotate[location=middle] \Test \par {\infofont\setstrut\strut middle} \par
+% \setuprotate[location=default] \Test \par {\infofont\setstrut\strut default} \par
+% \stopTEXpage
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/hand-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/hand-ini.mkxl
index ca6922dddeb..3fd82f239b4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/hand-ini.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/hand-ini.mkxl
@@ -37,26 +37,27 @@
\unprotect
-%D New stuff.
+%D Probbaly not yet used by many.
-\unexpanded\def\setupfontexpansion {\dodoubleargument\font_expansion_setup }
-\unexpanded\def\setupfontprotrusion{\dodoubleargument\font_protrusion_setup}
-
-\def\font_expansion_setup [#1][#2]{\clf_setupfontexpansion {#1}{#2}}
-\def\font_protrusion_setup[#1][#2]{\clf_setupfontprotrusion{#1}{#2}}
+\permanent\tolerant\protected\def\setupfontexpansion [#1]#*[#2]{\clf_setupfontexpansion {#1}{#2}}
+\permanent\tolerant\protected\def\setupfontprotrusion[#1]#*[#2]{\clf_setupfontprotrusion{#1}{#2}}
% \setupfontprotrusion[quality-upright][vector=quality]
% \setupfontprotrusion[quality-slanted][vector=quality,right=1.5]
-\let\adjustspacing\relax \newcount\adjustspacing % a little bit protection
-\let\protrudechars\relax \newcount\protrudechars % a little bit protection
+\pushoverloadmode
+
+ \let\adjustspacing\relax \newcount\adjustspacing % a little bit protection
+ \let\protrudechars\relax \newcount\protrudechars % a little bit protection
-% at some point we can introduce extreme expansion, i.e. \normaladjustspacing\plustwo
+\popoverloadmode
+
+%D At some point we can introduce extreme expansion, i.e. \type {\normaladjustspacing\plustwo}.
% 0 = disabled
-% 1 = notused (thesis)
+% 1 = notused (thesis)
% 2 = glyph + kern
-% 3 = glyph only
+% 3 = glyph only (default)
\def\font_expansion_enable {\normaladjustspacing\plusthree}
\def\font_expansion_enable_k{\normaladjustspacing\plustwo}
@@ -74,9 +75,9 @@
%
% \let\fonthandling\empty
%
-% \unexpanded\def\startfonthandling #1{\fonthandlingerror\fonthandlingerror\gobbleuntil\stopfonthandling} % can't happen
-% \unexpanded\def\definefonthandling {\dotripleempty\dodefinefonthandling}
-% \unexpanded\def\setupfonthandling {\dodoubleempty\dosetupfonthandling }
+% \protected\def\startfonthandling #1{\fonthandlingerror\fonthandlingerror\gobbleuntil\stopfonthandling} % can't happen
+% \protected\def\definefonthandling {\dotripleempty\dodefinefonthandling}
+% \protected\def\setupfonthandling {\dodoubleempty\dosetupfonthandling }
% \def\dodefinefonthandling[#1][#2][#3]{\fonthandlingerror}
% \def\dosetupfonthandling [#1][#2]{\fonthandlingerror}
% \def\usehandling [#1]{\fonthandlingerror}
@@ -92,7 +93,7 @@
\adjustspacingshrink \expansionparameter\c!shrink\relax}%
\to \everydefineexpansion
-\defineexpansion
+\setupexpansion
[\c!step=1,
\c!stretch=40,
\c!shrink=20]
@@ -102,10 +103,11 @@
% [\c!stretch=50,
% \c!shrink=20]
-\unexpanded\def\setexpansion
- {\dosingleempty\font_expansion_set}
+\permanent\tolerant\protected\def\setexpansion[#1]{\begincsname\??expansion:#1\endcsname}
+
+%D New in \LMTX: can be used grouped.
-\unexpanded\def\font_expansion_set[#1]%
- {\begincsname\??expansion:#1\endcsname}
+\permanent\protected\def\noexpansion {\bitwiseflip\glyphoptions\noexpansioncode}
+\permanent\protected\def\noprotrusion{\bitwiseflip\glyphoptions\noprotrusioncode}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/java-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/java-ini.mkxl
new file mode 100644
index 00000000000..f0e260eeaa3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/java-ini.mkxl
@@ -0,0 +1,157 @@
+%D \module
+%D [ file=java-ini,
+%D version=1998.01.30,
+%D title=\CONTEXT\ JavaScript Macros,
+%D subtitle=Initialization,
+%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 JavaScript Macros / Initialization}
+
+\registerctxluafile{java-ini}{}
+
+\unprotect
+
+%D \macros
+%D {JS*}
+%D
+%D Because \JAVASCRIPT's are activated by the user, for instance by activating on a
+%D button, their support is closely related to the referencing mechanism.
+%D Integration takes place by
+%D
+%D \starttyping
+%D \goto{calculate total}[Sum()]
+%D \stoptyping
+%D
+%D The \type {()} classify this as a script. If they are absent, the keyword is
+%D treated as a normal reference. One can pass arguments to such a script by saying:
+%D
+%D \starttyping
+%D \goto{calculate total}[Sum(1.5,2.3)]
+%D \stoptyping
+
+%D \macros
+%D {startJScode}
+%D
+%D A piece of \JAVASCRIPT\ code is defined by saying:
+%D
+%D \starttyping
+%D \startJScode{name}
+%D name = 4 ;
+%D \stopJScode
+%D \stoptyping
+%D
+%D This assumes uses no preamble or presumes that the preamble is always loaded, the
+%D next definition also tells \CONTEXT\ to actually include the preamble needed.
+%D
+%D \starttyping
+%D \startJScode{uses} used {later}
+%D uses = 6 ;
+%D \stopJScode
+%D \stoptyping
+%D
+%D \macros
+%D {startJSpreamble}
+%D
+%D One can define insert \JAVASCRIPT\ code at the document level by using:
+%D
+%D \starttyping
+%D \startJSpreamble{oeps}
+%D oeps = 1 ;
+%D \stopJSpreamble
+%D \stoptyping
+%D
+%D which is the same as:
+%D
+%D \starttyping
+%D \startJSpreamble{now} used now
+%D now = 2 ;
+%D \stopJSpreamble
+%D \stoptyping
+%D
+%D while the next definition is only included when actually used.
+%D
+%D \starttyping
+%D \startJSpreamble{later} used later
+%D later = 3 ;
+%D \stopJSpreamble
+%D \stoptyping
+%D
+%D This command may be used more that once, but always before the first page is
+%D shipped out.
+%D
+%D \macros
+%D {setJSpreamble, addtoJSpreamble}
+%D
+%D In addition to the previous preamble definitions, we can set a preamble \quote
+%D {in||line} and add tokens to a preamble.
+%D
+%D \macros
+%D {useJSpreamblenow}
+%D
+%D This macro can be used to force inclusion of postponed \JAVASCRIPT\ preambles.
+
+\def\m_java_escape_u{\letterbackslash u}
+
+\permanent\protected\def\startJScode
+ {\begingroup
+ \obeylualines
+ \obeyluatokens
+ \enforced\let\u\m_java_escape_u
+ \java_start_code}
+
+\def\java_start_code#1\stopJScode
+ {\normalexpanded{\endgroup\clf_storejavascriptcode{#1}}}
+
+\aliased\let\stopJScode\relax
+
+\permanent\protected\def\startJSpreamble
+ {\begingroup
+ \obeylualines
+ \obeyluatokens
+ \enforced\let\u\m_java_escape_u
+ \java_start_preamble}
+
+\def\java_start_preamble#1\stopJSpreamble
+ {\normalexpanded{\endgroup\clf_storejavascriptpreamble{#1}}}
+
+\aliased\let\stopJSpreamble\relax
+
+\permanent\protected\def\setJSpreamble #1#2{\clf_setjavascriptpreamble {#1}{#2}}
+\permanent\protected\def\addtoJSpreamble#1#2{\clf_addtojavascriptpreamble{#1}{#2}}
+
+%D \macros
+%D {useJSscripts}
+%D
+%D In due time, users will build their collections of scripts, which can be used
+%D (loaded) when applicable. Although not all public, we will provide some general
+%D purpose scripts, collected in files with names like \type {java-...}. One can
+%D load these scripts with \type {\useJSscripts}, like:
+%D
+%D \starttyping
+%D \useJSscripts[fld]
+%D \stoptyping
+%D
+%D The not so complicated implementation of this macro is:
+
+\permanent\tolerant\protected\def\useJSscripts[#1]#*[#2]%
+ {\clf_usejavascriptscripts {#1}% two steps as this one calls tex code
+ \clf_usejavascriptpreamble{#2}}% so this one comes later
+
+\permanent\tolerant\protected\def\useJSpreamble[#1]%
+ {\clf_usejavascriptpreamble{#1}}% so this one comes later
+
+%D Here:
+
+\definefilesynonym[java-imp-fld.mkiv] [java-imp-fields.mkiv]
+\definefilesynonym[java-imp-stp.mkiv] [java-imp-steps.mkiv]
+\definefilesynonym[java-imp-fil.mkiv] [java-imp-print.mkiv]
+\definefilesynonym[java-imp-rhh.mkiv] [java-imp-highlight.mkiv]
+\definefilesynonym[java-imp-exa.mkiv] [java-imp-example.mkiv]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl
new file mode 100644
index 00000000000..85c1f3ac775
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-def.mkxl
@@ -0,0 +1,844 @@
+%D \module
+%D [ file=lang-def,
+%D version=2011.01.24, % merge of language files
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Languages Definitions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Language Macros / Definitions}
+
+%D See \type {lang-*.tex} for some historic notes.
+
+\unprotect
+
+% Germanic Languages: Danish, Faeroese, Icelandic, Norwegian,
+% Swedish, German, Yiddish, Afrikaans, Dutch, English, Flemush,
+% Frisian, Plattdeutsch
+
+\installlanguage
+ [\s!en]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!month,\space,\v!day,{,\space},\v!year},
+ \s!patterns=\s!us,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=3]
+
+\installlanguage
+ [\s!nl]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!de]
+ [\c!spacing=\v!packed,
+ \s!lefthyphenmin=3,
+ \s!righthyphenmin=3,
+ \c!leftsentence=\hbox{\endash\space},
+ \c!rightsentence=\hbox{\space\endash},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsinglesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!date={\v!day,{.\space},\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!da]
+ [\c!spacing=\v!packed,
+ \c!leftsentence={\hbox{\endash\enskip}},
+ \c!rightsentence={\hbox{\enskip\endash}},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsinglesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!date={\v!day,{.\space},\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!sv]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\hbox{\endash\space},
+ \c!rightsentence=\hbox{\space\endash},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\upperrightsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperrightdoubleninequote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!af]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!year,\space,\v!month,\space,\v!day}]
+
+\installlanguage
+ [\s!nb]
+ [\c!spacing=\v!packed,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=2,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!nn]
+ [\c!spacing=\v!packed,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=2,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
+
+\installlanguage [\s!no] [\s!nb]
+\installlanguage [\s!norwegian] [\s!nb]
+\installlanguage [\s!bokmal] [\s!nb]
+\installlanguage [\s!nynorsk] [\s!nn]
+
+\installlanguage % old german
+ [deo]
+ [\c!spacing=\v!packed,
+ \c!default=\s!de]
+
+\installlanguage
+ [de-de]
+ [\c!spacing=\v!packed,
+ \c!default=\s!de]
+
+\installlanguage
+ [de-at]
+ [\c!spacing=\v!packed,
+ \c!default=\s!de,
+ \c!leftquote=\leftguillemot,
+ \c!rightquote=\rightguillemot,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot]
+
+\installlanguage
+ [de-ch]
+ [\c!spacing=\v!packed,
+ \c!default=\s!de]
+
+%D And some alternative (but very real) english patterns:
+
+\installlanguage
+ [en-gb]
+ [\c!default=\s!en,
+ \s!patterns=\s!gb,
+ \s!lefthyphenmin=3,
+ \s!righthyphenmin=3,
+ % the reverse of american (or maybe the american did it the reverse)
+ \c!leftquote=\upperleftdoublesixquote,
+ \c!rightquote=\upperrightdoubleninequote,
+ \c!leftquotation=\upperleftsinglesixquote,
+ \c!rightquotation=\upperrightsingleninequote]
+
+\installlanguage
+ [en-us]
+ [\c!default=\s!en,
+ \s!patterns=\s!us]
+
+\installlanguage [\s!uk] [\s!en-\s!gb]
+\installlanguage [\s!us] [\s!en-\s!us]
+
+\installlanguage [usenglish] [\s!en-\s!us]
+\installlanguage [ukenglish] [\s!en-\s!gb]
+\installlanguage [english] [\s!en]
+\installlanguage [dutch] [\s!nl]
+\installlanguage [german] [\s!de]
+\installlanguage [danish] [\s!da]
+\installlanguage [swedish] [\s!sv]
+\installlanguage [afrikaans] [\s!af]
+
+% Slavic Languages: Belarussian, Russian, Ukrainian, Bulgarian,
+% Macedonian, Serbian, Croatian, Slovenian, Czech, Kushubian,
+% Lusatian/Sorbian/Wendish, Polish, Slovak, Albanian, Illyrian,
+% Armenian
+
+\installlanguage
+ [\s!pl]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,{.\space},\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!cs]
+ [\c!spacing=\v!packed,
+ \c!leftsentence={\nobreakspace\endash\thickglue\penalty\zerocount\relax},
+ \c!rightsentence=\c!leftsentence,
+ \c!leftsubsentence=\c!leftsentence,
+ \c!rightsubsentence=\c!rightsentence,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsinglesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!date={\v!day,{.\fourperemspace},\v!month,\space,\v!year},
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=3]
+
+\installlanguage
+ [\s!sk]
+ [\c!spacing=\v!packed,
+ \c!leftsentence={\nobreakspace\endash\thickglue\penalty\zerocount\relax},
+ \c!rightsentence=\c!leftsentence,
+ \c!leftsubsentence=\c!leftsentence,
+ \c!rightsubsentence=\c!rightsentence,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsinglesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!date={\v!day,{.\fourperemspace},\v!month,\space,\v!year},
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=3]
+
+\installlanguage
+ [\s!hr]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\hbox{\endash\space},
+ \c!rightsentence=\hbox{\space\endash},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!sl]
+ [\c!command=\v!no,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\hbox{\endash\space},
+ \c!rightsentence=\hbox{\space\endash},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\guilsingleright,
+ \c!rightquote=\guilsingleleft,
+ \c!leftquotation=\rightguillemot,
+ \c!rightquotation=\leftguillemot,
+ \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
+
+\installlanguage [\s!polish] [\s!pl]
+\installlanguage [\s!czech] [\s!cs]
+\installlanguage [\s!slovak] [\s!sk]
+\installlanguage [\s!croatian] [\s!hr]
+\installlanguage [\s!slovenian] [\s!sl]
+\installlanguage [slovene] [\s!sl] % both possible (mojca: still needed?)
+
+% Cyrillic Languages
+
+\installlanguage
+ [\s!ru]
+ [\s!lefthyphenmin=2,
+ \s!righthyphenmin=2,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\leftguillemot,
+ \c!rightsentence=\rightguillemot,
+ \c!leftsubsentence=\lowerleftdoubleninequote,
+ \c!rightsubsentence=\upperrightdoubleninequote,
+ \c!leftquote=\lowerleftdoubleninequote,
+ \c!rightquote=\upperrightdoubleninequote,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!ua]
+ [\s!lefthyphenmin=2,
+ \s!righthyphenmin=2,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\leftguillemot,
+ \c!rightsentence=\rightguillemot,
+ \c!leftsubsentence=\lowerleftdoubleninequote,
+ \c!rightsubsentence=\upperrightdoubleninequote,
+ \c!leftquote=\lowerleftdoubleninequote,
+ \c!rightquote=\upperrightdoubleninequote,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!date={\v!day,\space,\v!month,\space,\v!year},
+ \s!patterns=\s!uk]
+
+\installlanguage
+ [\s!be]
+ [\s!lefthyphenmin=2,
+ \s!righthyphenmin=2,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\leftguillemot,
+ \c!rightsentence=\rightguillemot,
+ \c!leftsubsentence=\lowerleftdoubleninequote,
+ \c!rightsubsentence=\upperrightdoublesixquote,
+ \c!leftquote=\lowerleftdoubleninequote,
+ \c!rightquote=\upperrightdoublesixquote,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+ \installlanguage
+ [\s!sr]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\hbox{\endash\space},
+ \c!rightsentence=\hbox{\space\endash},
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\upperrightsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperleftdoubleninequote,
+ \c!date={\v!day,{.},\space,\v!month,\space,\v!year}]
+
+\installlanguage
+ [\s!mk]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\endash,
+ \c!rightsentence=\endash,
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\upperleftsingleninequote,
+ \c!rightquote=\upperrightsinglesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage [\s!russian] [\s!ru]
+\installlanguage [\s!ukrainian] [\s!ua]
+\installlanguage [\s!belarussian][\s!be]
+\installlanguage [\s!serbian] [\s!sr]
+\installlanguage [\s!sr-latn] [\s!sr]
+\installlanguage [\s!sr-cyrl] [\s!sr]
+\installlanguage [\s!macedonian] [\s!mk]
+
+
+% Uralic Languages: Cheremiss, Estonian, Finnish, Karelian, Laap,
+% Mordvinian, Permian tongues, Hungarian, Ostyak, Vogul, Samoyed
+
+\installlanguage
+ [\s!fi]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!year,\space,\v!month,\space,\v!day}]
+
+\installlanguage
+ [\s!et]
+ [\c!default=\s!en,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\leftguillemot,
+ \c!rightquote=\rightguillemot,
+ \c!leftquotation=\lowerrightdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!time={h,{.},m},
+ \c!date={\v!day,.,\space,\v!month,\space,\v!year},
+ \s!patterns=\s!et]
+
+\installlanguage
+ [\s!hu]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!year,.,\space,\v!month,\space,\v!day,.}]
+
+\installlanguage [\s!finnish] [\s!fi]
+\installlanguage [\s!estonian] [\s!et]
+\installlanguage [\s!hungarian] [\s!hu]
+
+% Altaic Languages: Uigur, Uzbek, Azeri/Azerbaijani, Chuvash,
+% Turkish, Turkmen, Kazakh, Kazar, Kireghiz, Noghay, Talar,
+% Buryat, Kalmuck, Khalkha
+
+\installlanguage
+ [\s!tr]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!year,\space,\v!month,\space,\v!day}]
+
+\installlanguage
+ [\s!tk]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!year,\space,\v!month,\space,\v!day},
+ \s!patterns=\s!tk,
+ \s!lefthyphenmin=1,
+ \s!righthyphenmin=2]
+
+\installlanguage [\s!turkish] [\s!tr]
+\installlanguage [\s!turkmen] [\s!tk]
+
+% Anatolian Languages
+
+% Hebrew
+
+\installlanguage % same as arabic now .. someone needs to fix this
+ [\s!he]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,\space,\v!month,{،\space},\v!year}]
+
+\installlanguage % same as arabic now .. someone needs to fix this
+ [\s!yi]
+ [\s!he]
+
+\installlanguage [\s!hebrew] [\s!he]
+\installlanguage [\s!yiddish] [\s!yi]
+
+% Arabic Languages
+
+\installlanguage
+ [\s!ar]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,\space,\v!month,{،\space},\v!year}]
+
+\installlanguage [\s!arabic] [\s!ar]
+
+\installlanguage
+ [\s!pe]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\leftguillemot,
+ \c!rightquote=\rightguillemot,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage [\s!persian] [\s!pe]
+\installlanguage [\s!fa] [\s!pe] % these two are redundant but sometimes might
+\installlanguage [\s!farsi] [\s!fa] % sound more natural .. best set labels to 'pe'
+
+% Just aliases to "ar" for now
+
+\installlanguage[\s!ar-ae][\c!default=\s!ar] % U.A.E.
+\installlanguage[\s!ar-bh][\c!default=\s!ar] % Bahrain
+\installlanguage[\s!ar-eg][\c!default=\s!ar] % Egypt
+\installlanguage[\s!ar-in][\c!default=\s!ar] % India?
+\installlanguage[\s!ar-kw][\c!default=\s!ar] % Kuwait
+\installlanguage[\s!ar-ly][\c!default=\s!ar] % Libya
+\installlanguage[\s!ar-om][\c!default=\s!ar] % Oman
+\installlanguage[\s!ar-qa][\c!default=\s!ar] % Qatar
+\installlanguage[\s!ar-sa][\c!default=\s!ar] % Saudi Arabia
+\installlanguage[\s!ar-sd][\c!default=\s!ar] % Sudan
+\installlanguage[\s!ar-tn][\c!default=\s!ar] % Tunisia
+\installlanguage[\s!ar-ye][\c!default=\s!ar] % Yemen
+
+% Farsi (Persian)
+
+\installlanguage[\s!ar-ir][\c!default=\s!pe]
+%installlanguage[\s!pe-ir][\c!default=\s!pe]
+%installlanguage[\s!fa-ir][\c!default=\s!fa]
+
+% Syriac months
+
+\installlanguage[\s!ar-sy][\c!default=\s!ar] % Syria
+\installlanguage[\s!ar-iq][\c!default=\s!ar-sy] % Iraq
+\installlanguage[\s!ar-jo][\c!default=\s!ar-sy] % Jordan
+\installlanguage[\s!ar-lb][\c!default=\s!ar-sy] % Lebanon
+
+% Maghribi months
+
+\installlanguage[\s!ar-dz][\c!default=\s!ar] % Algeria
+\installlanguage[\s!ar-ma][\c!default=\s!ar] % Morocco
+
+% Artificial Languages: Esperanto
+
+\installlanguage
+ [\s!esperanto]
+ [%\c!spacing=\v!packed,
+ %\c!leftsentence=\emdash,
+ %\c!rightsentence=\emdash,
+ %\c!leftsubsentence=\emdash,
+ %\c!rightsubsentence=\emdash,
+ %\c!leftquote=\lowerleftdoubleninequote,
+ %\c!rightquote=\upperrightdoublesixquote,
+ %\c!leftquotation=\lowerleftdoubleninequote,
+ %\c!rightquotation=\upperrightdoublesixquote,
+ %\c!date={\v!year,~m.,\space,\v!month,\space,\v!day,~d.},
+ \s!patterns=eo,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=2]
+
+% Baltic Languages: Lettish/Latvian, Lietuvių/Lithuanian
+
+\installlanguage
+ [\s!lt]
+ [\c!command=\v!no,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\lowerleftdoubleninequote,
+ \c!rightquote=\upperrightdoublesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!date={\v!year,~m.,\space,\v!month,\space,\v!day,~d.},
+ \s!patterns=\s!lt,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=2]
+
+\installlanguage [\s!lithuanian] [\s!lt]
+
+% Celtic: Breton, Welsh, Irish, Manx, Scottish Gaelic
+
+% CJK: Chinese, Japanese, Korean
+
+\installlanguage
+ [\s!cn]
+ [\c!leftsentence=——,
+ \c!rightsentence=——,
+ \c!leftsubsentence=——,
+ \c!rightsubsentence=——,
+ \c!leftquote=‘,
+ \c!rightquote=’,
+ \c!leftquotation=“,
+ \c!rightquotation=â€,
+ \c!date={\v!year,å¹´,\space,\v!month,\v!day,æ—¥}]
+
+\installlanguage
+ [\s!ja]
+ [\c!leftsentence=——,
+ \c!rightsentence=——,
+ \c!leftsubsentence=——,
+ \c!rightsubsentence=——,
+ \c!leftquote=‘,
+ \c!rightquote=’,
+ \c!leftquotation=「,
+ \c!rightquotation=ã€,
+ \c!date={西暦,\v!year,年,\v!month,月,\v!day,日}]
+
+\installlanguage
+ [\s!kr]
+ [\c!leftsentence=——,
+ \c!rightsentence=——,
+ \c!leftsubsentence=——,
+ \c!rightsubsentence=——,
+ \c!leftquote=‘,
+ \c!rightquote=’,
+ \c!leftquotation=“,
+ \c!rightquotation=â€,
+ % \c!date={서기,\space,\v!year,\labeltext{\v!year},\space,\v!month,\labeltext{\v!month},\space,\v!day,\labeltext{\v!day}}]
+ \c!date={\v!year,\labeltext{\v!year},\space,\v!month,\labeltext{\v!month},\space,\v!day,\labeltext{\v!day}}]
+
+\installlanguage [\s!chinese] [\s!cn]
+\installlanguage [\s!japanese] [\s!ja]
+\installlanguage [\s!korean] [\s!kr]
+
+% Greek
+
+\installlanguage
+ [\s!gr]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=“,
+ \c!rightquote=â€,
+ \c!leftquotation=«,
+ \c!rightquotation=»,
+ \c!date={\v!day\space\v!month\space\v!year},
+ \s!patterns=\s!agr] % ok?
+
+\installlanguage [\s!greek] [\s!gr]
+
+\installlanguage
+ [\s!agr]
+ [\s!default=\s!gr,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote]
+
+\installlanguage [\s!ancientgreek] [\s!agr]
+
+% Indo-Iranian Languages: 34.
+
+% Italic Languages: Latin, Italian, Rhaeto-Romanic, Rumanian,
+% Sardian, Catalan, French, Ladino, Portuguese, Proven\c{c}al,
+% Spanish
+
+\installlanguage
+ [\s!fr]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\leftguillemot,
+ \c!rightquote=\rightguillemot,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!time={h,{\Uchar104 },m},% we need to cheat in order to get the h
+ \c!date={\v!day:mnem,\v!space,\v!month,\v!space,\v!year}]
+
+\installlanguage
+ [\s!es]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,{ de },\v!month,{ de },\v!year}]
+
+\installlanguage [sp] [\s!es] % old times context
+
+\installlanguage
+ [\s!ca]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+% Note GB left|/|right (sub)sentences are for \quote {incisi}.
+
+\installlanguage
+ [\s!it]
+ [\c!command=\v!no,
+ \c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\endash,
+ \c!rightsubsentence=\endash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!leftspeech=\leftguillemot,
+ \c!middlespeech=\leftguillemot,
+ \c!rightspeech=\rightguillemot,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage % the same as italian
+ [\s!la]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+\installlanguage % ancient latin
+ [\s!ala]
+ [\c!default=\s!la]
+
+\installlanguage
+ [\s!pt]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!year,\space,\v!month,\space,\v!day}]
+
+\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
+
+\installlanguage
+ [\s!ro]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\leftguillemot,
+ \c!rightquote=\rightguillemot,
+ \c!leftquotation=\lowerrightdoubleninequote,
+ \c!rightquotation=\upperleftdoublesixquote,
+ \c!date={\v!day,\space,\v!month,\space,\v!year}]
+
+%D For compatibility reasons we also define:
+
+\installlanguage [\s!french] [\s!fr]
+\installlanguage [\s!spanish] [\s!es]
+\installlanguage [\s!catalan] [\s!ca]
+\installlanguage [\s!italian] [\s!it]
+\installlanguage [\s!latin] [\s!la]
+\installlanguage [\s!portuguese] [\s!pt]
+\installlanguage [\s!romanian] [\s!ro]
+
+% Vietnamese Language
+
+\installlanguage
+ [\s!vi]
+ [\c!spacing=\v!packed,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\quoteleft,
+ \c!rightquote=\quoteright,
+ \c!leftquotation=\quotedblleft,
+ \c!rightquotation=\quotedblright,
+ \c!date={{ },dd,{/},mm,{/},yy}]
+
+\installlanguage [\s!vietnamese] [\s!vi]
+
+% Thai (teaser for Mojca)
+
+\installlanguage
+ [\s!th]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!month,\space,\v!day,{,\space},\v!year},
+ \s!patterns=\s!th,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=3]
+
+\installlanguage [\s!thai] [\s!th]
+
+%D Malayalam (needs to be checked)
+
+\installlanguage
+ [\s!ml]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\emdash,
+ \c!rightsentence=\emdash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!month,\space,\v!day,{,\space},\v!year},
+ \s!patterns=\s!ml,
+ \s!lefthyphenmin=2,
+ \s!righthyphenmin=3]
+
+\installlanguage [\s!malayalam] [\s!ml]
+
+%D Todo: generate this one from languages.data
+
+\installlanguage[nld][\s!nl]
+\installlanguage[deu][\s!de]
+\installlanguage[eng][\s!en]
+\installlanguage[fra][\s!fr]
+%installlanguage[grk][\s!agr]
+
+%D This might go:
+
+\installlanguage[cz][\s!cs]
+%installlanguage[fa][\s!fr] % for dutchies only
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-dis.lmt b/Master/texmf-dist/tex/context/base/mkxl/lang-dis.lmt
new file mode 100644
index 00000000000..263225691f0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-dis.lmt
@@ -0,0 +1,222 @@
+if not modules then modules = { } end modules ['lang-dis'] = {
+ version = 1.001,
+ comment = "companion to lang-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local concat = table.concat
+
+local tex = tex
+local nodes = nodes
+
+local tasks = nodes.tasks
+local nuts = nodes.nuts
+
+local enableaction = tasks.enableaction
+local setaction = tasks.setaction
+
+local setfield = nuts.setfield
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getattr = nuts.getattr
+local getsubtype = nuts.getsubtype
+local setsubtype = nuts.setsubtype
+local getchar = nuts.getchar
+local setchar = nuts.setchar
+local getdisc = nuts.getdisc
+local setdisc = nuts.setdisc
+local getlanguage = nuts.getlanguage
+local getboth = nuts.getboth
+local setlist = nuts.setlist
+local setlink = nuts.setlink
+local isglyph = nuts.isglyph
+
+local copy_node = nuts.copy
+local remove_node = nuts.remove
+local flush_list = nuts.flush_list
+local flush_node = nuts.flush_node
+
+local nextdisc = nuts.traversers.disc
+
+local new_disc = nuts.pool.disc
+
+local nodecodes = nodes.nodecodes
+local disccodes = nodes.disccodes
+
+local disc_code = nodecodes.disc
+local glyph_code = nodecodes.glyph
+
+local explicitdisc_code = disccodes.explicit
+
+local a_visualize = attributes.private("visualizediscretionary")
+local setattribute = tex.setattribute
+
+local getlanguagedata = languages.getdata
+local prehyphenchar = language.prehyphenchar
+local posthyphenchar = language.posthyphenchar
+
+local check_regular = true
+
+local setlistcolor = nodes.tracers.colors.setlist
+
+function languages.visualizediscretionaries(head)
+ for d in nextdisc, head do
+ if getattr(d,a_visualize) then
+ local pre, post, replace = getdisc(d)
+ if pre then
+ setlistcolor(pre,"darkred")
+ end
+ if post then
+ setlistcolor(post,"darkgreen")
+ end
+ if replace then
+ setlistcolor(replace,"darkblue")
+ end
+ end
+ end
+ return head
+end
+
+local enabled = false
+
+function languages.showdiscretionaries(v)
+ if v == false then
+ setattribute(a_visualize,unsetvalue)
+ else -- also nil
+ if not enabled then
+ enableaction("processors","languages.visualizediscretionaries")
+ enabled = true
+ end
+ setattribute(a_visualize,1)
+ end
+end
+
+interfaces.implement {
+ name = "showdiscretionaries",
+ actions = languages.showdiscretionaries
+}
+
+do
+
+ local toutf = nodes.listtoutf
+ local utfchar = utf.char
+ local f_disc = string.formatters["{%s}{%s}{%s}"]
+ local replace = lpeg.replacer( {
+ [utfchar(0x200C)] = "|",
+ [utfchar(0x200D)] = "|",
+ }, nil, true)
+
+ local function convert(list)
+ return list and replace(toutf(list)) or ""
+ end
+
+ function languages.serializediscretionary(d) -- will move to tracer
+ local pre, post, replace = getdisc(d)
+ return f_disc(convert(pre),convert(post),convert(replace))
+ end
+
+end
+
+-- --
+
+local wiped = 0
+
+local flatten_discretionaries = nuts.flatten_discretionaries -- todo in nodes
+
+-- if flatten_discretionaries then
+
+ function languages.flatten(head)
+ local h, n = flatten_discretionaries(head)
+ wiped = wiped + n
+ return h, n > 0
+ end
+
+-- else
+--
+-- local function wipe(head,delayed)
+-- local p, n = getboth(delayed)
+-- local _, _, h, _, _, t = getdisc(delayed,true)
+-- if p or n then
+-- if h then
+-- setlink(p,h)
+-- setlink(t,n)
+-- setfield(delayed,"replace")
+-- else
+-- setlink(p,n)
+-- end
+-- end
+-- if head == delayed then
+-- head = h
+-- end
+-- wiped = wiped + 1
+-- flush_node(delayed)
+-- return head
+-- end
+--
+-- function languages.flatten(head)
+-- local delayed = nil
+-- for d in nextdisc, head do
+-- if delayed then
+-- head = wipe(head,delayed)
+-- end
+-- delayed = d
+-- end
+-- if delayed then
+-- return wipe(head,delayed), true
+-- else
+-- return head, false
+-- end
+-- end
+--
+-- end
+
+function languages.nofflattened()
+ return wiped -- handy for testing
+end
+
+-- experiment: for now not in not in export mode!
+
+local flatten = languages.flatten
+
+nodes.handlers.flattenline = flatten
+
+function nodes.handlers.flatten(head,where)
+ if head and (where == "box" or where == "adjusted_hbox") then
+ return flatten(head)
+ end
+ return head
+end
+
+directives.register("hyphenator.flatten",function(v)
+ -- use with care
+ setaction("processors","nodes.handlers.flatten",v)
+ setaction("contributers","nodes.handlers.flattenline",v)
+end)
+
+-- moved here:
+
+function languages.explicithyphen(template)
+ local pre, post
+ local disc = new_disc()
+ if template then
+ local langdata = getlanguagedata(getlanguage(template))
+ local instance = langdata and langdata.instance
+ if instance then
+ local prechr = prehyphenchar(instance)
+ local postchr = posthyphenchar(instance)
+ if prechr >= 0 then
+ pre = copy_node(template)
+ setchar(pre,prechr)
+ end
+ if postchr >= 0 then
+ post = copy_node(template)
+ setchar(post,postchr)
+ end
+ end
+ end
+ setdisc(disc,pre,post,nil,explicitdisc_code,tex.exhyphenpenalty)
+ return disc
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-frd.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-frd.mkxl
new file mode 100644
index 00000000000..352e5016dec
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-frd.mkxl
@@ -0,0 +1,143 @@
+%D \module
+%D [ file=lang-frd,
+%D version=2004.01.15,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Language Frequency Table Data,
+%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.
+
+\endinput
+
+%D This is experimental work! Old stuff, whenever I need it I might
+%D do it in \LUA.
+
+% http://www.onzetaal.nl/advies/letterfreq.html
+
+\startcharactertable[nl]
+ \charfreq a 7.47
+ \charfreq b 1.58
+ \charfreq c 1.24
+ \charfreq d 5.93
+ \charfreq e 18.91
+ \charfreq f .81
+ \charfreq g 3.4
+ \charfreq h 2.38
+ \charfreq i 6.5
+ \charfreq j 1.46
+ \charfreq k 2.25
+ \charfreq l 3.57
+ \charfreq m 2.21
+ \charfreq n 10.03
+ \charfreq o 6.06
+ \charfreq p 1.57
+ \charfreq q .009
+ \charfreq r 6.41
+ \charfreq s 3.73
+ \charfreq t 6.79
+ \charfreq u 1.99
+ \charfreq v 2.85
+ \charfreq w 1.52
+ \charfreq x .04
+ \charfreq y .035
+ \charfreq z 1.39
+\stopcharactertable
+
+% http://caislab.icu.ac.kr/course/2001/spring/ice605/down/010306.pdf
+
+% \startcharactertable[en]
+% \charfreq a 8.2
+% \charfreq b 1.5
+% \charfreq c 2.8
+% \charfreq d 4.3
+% \charfreq e 12.7
+% \charfreq f 2.2
+% \charfreq g 2
+% \charfreq h 6.1
+% \charfreq i 7
+% \charfreq j .2
+% \charfreq k .8
+% \charfreq l 4
+% \charfreq m 2.4
+% \charfreq n 6.7
+% \charfreq o 7.5
+% \charfreq p 1.9
+% \charfreq q .1
+% \charfreq r 6
+% \charfreq s 6.3
+% \charfreq t 9.1
+% \charfreq u 2.8
+% \charfreq v 1
+% \charfreq w 2.3
+% \charfreq x .1
+% \charfreq y 2
+% \charfreq z .1
+% \stopcharactertable
+
+% http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm
+
+\startcharactertable[en]
+ \charfreq a 8.04
+ \charfreq b 1.54
+ \charfreq c 3.06
+ \charfreq d 3.99
+ \charfreq e 12.51
+ \charfreq f 2.3
+ \charfreq g 1.96
+ \charfreq h 5.49
+ \charfreq i 7.26
+ \charfreq j .16
+ \charfreq k .67
+ \charfreq l 4.14
+ \charfreq m 2.53
+ \charfreq n 7.09
+ \charfreq o 7.6
+ \charfreq p 2
+ \charfreq q .11
+ \charfreq r 6.12
+ \charfreq s 6.54
+ \charfreq t 9.25
+ \charfreq u 2.71
+ \charfreq v .99
+ \charfreq w 1.92
+ \charfreq x .19
+ \charfreq y 1.73
+ \charfreq z .09
+\stopcharactertable
+
+% http://www.blankenburg.de/gat/pages/fach/info/analyse2.htm
+
+\startcharactertable[de]
+ \charfreq a 6.47
+ \charfreq b 1.93
+ \charfreq c 2.68
+ \charfreq d 4.83
+ \charfreq e 17.48
+ \charfreq f 1.65
+ \charfreq g 3.06
+ \charfreq h 4.23
+ \charfreq i 7.73
+ \charfreq j .27
+ \charfreq k 1.46
+ \charfreq l 3.49
+ \charfreq m 2.58
+ \charfreq n 9.84
+ \charfreq o 2.98
+ \charfreq p .96
+ \charfreq q .02
+ \charfreq r 7.54
+ \charfreq s 6.83
+ \charfreq t 6.13
+ \charfreq u 4.17
+ \charfreq v .94
+ \charfreq w 1.48
+ \charfreq x .04
+ \charfreq y .08
+ \charfreq z 1.14
+\stopcharactertable
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-frq.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-frq.mkxl
new file mode 100644
index 00000000000..6b9853af574
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-frq.mkxl
@@ -0,0 +1,234 @@
+%D \module
+%D [ file=lang-frq,
+%D version=2004.01.15,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Frequency Tables,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\endinput
+
+\writestatus{loading}{ConTeXt Language Macros / Frequency Tables}
+
+%D Some day I might redo this \LUA. But anyway, who uses it. It's rather old code.
+
+\unprotect
+
+%M \usemodule[layout]
+
+%D \macros
+%D {charwidthmethod}
+%D
+%D This module implements a method for determining the width of an
+%D average character in a language. It uses the dimensions of the
+%D current fonts.
+%D
+%D \def\ShwChrWd#1#2#3%
+%D {\chardef\charwidthmethod#1\relax
+%D \mainlanguage[#2#3]\the\dimexpr(\averagecharwidth)}
+%D
+%D \starttabulate[|c|c|c|c|c|c|]
+%D \HL
+%D \NC \NC\bf0=amount\NC\bf1=.5em\NC2=ex\NC\bf3=frequency\NC\bf4=list\NC\NR
+%D \HL
+%D \NC\bf en\NC\ShwChrWd0en\NC\ShwChrWd1en\NC\ShwChrWd2en\NC\ShwChrWd3en\NC\ShwChrWd4en\NC\NR
+%D \NC\bf nl\NC\ShwChrWd0nl\NC\ShwChrWd1nl\NC\ShwChrWd2nl\NC\ShwChrWd3nl\NC\ShwChrWd4nl\NC\NR
+%D \NC\bf de\NC\ShwChrWd0de\NC\ShwChrWd1de\NC\ShwChrWd2de\NC\ShwChrWd3de\NC\ShwChrWd4de\NC\NR
+%D \HL
+%D \stoptabulate
+%D
+%D Method~1 ignores the widths and assumes that each character has a
+%D width of .5em, which is true for most monospaced fonts. Method~2
+%D takes the x as starting point, and assumes that it's height kind of
+%D matches its width. Method~3 is the best one, and determines the
+%D average width based on the language specific character table.
+%D Method~4 is a mixture between the first two methods: character
+%D specific widths applied to an equal distribution. Method~0 reports
+%D the total count, which normally is~100.
+
+\setnewconstant\charwidthmethod=3 % 0=amount 1=em 2=ex 3=frequency 4=flattened >4=ex
+
+%D \macros
+%D {charwidthlanguage}
+%D
+%D The language used for the calculations is defined as:
+
+\def\charwidthlanguage{\currentmainlanguage}
+
+%D \macros
+%D {charfreq}
+%D
+%D This method comes into action in the following macro:
+
+\def\charfreq#1 #2 % character fraction
+ {+(\ifcase\charwidthmethod
+ #2\dimexpr100\onepoint\relax
+ \or
+ #2\dimexpr\emwidth/2\relax
+ \or
+ #2\dimexpr\exheight\relax
+ \or
+ #2\fontcharwd\font`#1%
+ \or
+ \dimexpr100\fontcharwd\font`#1/\charactertsize\charwidthlanguage\relax % ugly hack
+ \else
+ #2\dimexpr\exheight\relax
+ \fi)}
+
+%D \macros
+%D {startcharactertable}
+%D
+%D A frequency table is defined with the following macro. The \type
+%D {charfreq} macro is used in this table.
+
+\installcorenamespace{frequencywidths}
+\installcorenamespace{frequencycounts}
+
+\aliased\let\stopcharactertable\relax
+
+\permanent\protected\def\startcharactertable[#1]#2\stopcharactertable % \dimexpr has fuzzy lookahead
+ {\startnointerference
+ \gdefcsname\??frequencywidths#1\endcsname{#2}% the width vector
+ \scratchcounter\zerocount \def\charfreq##1 ##2 {\advance\scratchcounter\plusone} #2%
+ \xdefcsname\??frequencycounts#1\endcsname{\the\scratchcounter}% the character count
+ \stopnointerference}
+
+%D \macros
+%D {charactertable,charactertsize}
+%D
+%D The table content as well as the number of entries can be fetched with
+%D the following two macros. The architecture of the table and calling
+%D macro permits a fully expandable application.
+
+\permanent\def\charactertable#1%
+ {\csname\??frequencywidths\ifcsname\??frequencywidths#1\endcsname#1\else\s!en\fi\endcsname}
+
+\permanent\def\charactertsize#1%
+ {\csname\??frequencycounts\ifcsname\??frequencycounts#1\endcsname#1\else\s!en\fi\endcsname}
+
+%D Although it is of hardly any use, you can inherit a character table:
+%D
+%D \starttyping
+%D \startcharactertable[cz] \charactertable{en} \stopcharactertable
+%D \stoptyping
+
+\startcharactertable[en]
+ % empty
+\stopcharactertable % kind of default
+
+%D \macros
+%D {averagecharwidth}
+%D
+%D This macro reports the average width for the current main
+%D language (\the \dimexpr (\averagecharwidth)).
+
+\permanent\def\averagecharwidth{\dimexpr(\zeropoint\charactertable\charwidthlanguage)/100\relax}
+
+\permanent\protected\def\showcharfreq
+ {\hbox\bgroup
+ \charwidthlanguage:%
+ \dostepwiserecurse\zerocount\plusfour\plusone
+ {\setconstant\charwidthmethod\recurselevel\relax
+ \enspace\recurselevel/\the\dimexpr(\averagecharwidth)}%
+ \egroup}
+
+%D Just for fun, we show a few frequency tables as graphic (\in {figure}
+%D [fig:charfreq]).
+%D
+%D \startbuffer
+%D \definepalet [charfreq] [en=darkred, nl=darkgreen, de=darkblue]
+%D
+%D \def\charfreq#1 #2 %
+%D {\startMPdrawing
+%D interim linejoin := butt ;
+%D a := ASCII "#1" ;
+%D if (a >= (ASCII "a")) and (a <= (ASCII "z")) :
+%D draw ((0,#2*.25cm)--origin--(0,#2*.5cm))
+%D shifted (a*4mm+o,0)
+%D withpen pencircle scaled .5mm
+%D withcolor c;
+%D fi ;
+%D \stopMPdrawing}
+%D
+%D \resetMPdrawing
+%D \startMPdrawing
+%D numeric a, o ; a := o := 0 ;
+%D color c ; c := .5white ;
+%D string s ; s := "" ;
+%D \stopMPdrawing
+%D
+%D \startMPdrawing o := 0mm ; c := \MPcolor{charfreq:en} ; \stopMPdrawing
+%D \charactertable{en}
+%D
+%D \startMPdrawing o := 1mm ; c := \MPcolor{charfreq:nl} ; \stopMPdrawing
+%D \charactertable{nl}
+%D
+%D \startMPdrawing o := 2mm ; c := \MPcolor{charfreq:de} ; \stopMPdrawing
+%D \charactertable{de}
+%D
+%D \startMPdrawing
+%D for a := ASCII "a" upto ASCII "z" :
+%D draw textext.bot("\strut\tttf " & char a) shifted (a*4mm+1mm,-1mm) ;
+%D endfor ;
+%D \stopMPdrawing
+%D
+%D \MPdrawingdonetrue \getMPdrawing \resetMPdrawing
+%D \stopbuffer
+%D
+%D \placefigure
+%D [here]
+%D [fig:charfreq]
+%D {The character distributions for English, Dutch and German.}
+%D {\getbuffer}
+%D
+%D A few samples of usage of this mechanism are shown below:
+%D
+%D \startbuffer
+%D {\mainlanguage[en]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blank}
+%D {\mainlanguage[nl]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blank}
+%D {\mainlanguage[de]\hsize65\averagecharwidth\mainlanguage[en]\input ward \blank}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D Although the widthts differ, the consequenes for breaking the paragraph
+%D into lines are minimal.
+
+%D \macros
+%D {freezeaveragecharacterwidth}
+%D
+%D This macro can be used to make sure that the width does not change during a
+%D page break when another font is used.
+
+\aliased\let\normalaveragecharacterwidth\averagecharacterwidth
+
+\permanent\def\freezeaveragecharacterwidth % global
+ {\enforced\xdef\averagecharacterwidth{\dimexpr\the\normalaveragecharacterwidth\relax}}
+
+%D Example:
+%D
+%D \starttyping
+%D \input lang-frq.mkiv
+%D \input lang-frd.mkiv
+%D
+%D \setupbodyfont
+%D [dejavu]
+%D
+%D \setemeasure{textwidth}{\the\dimexpr70\averagecharwidth}
+%D
+%D \setuplayout
+%D [width=\measure{textwidth}]
+%D
+%D \showframe
+%D
+%D \starttext
+%D \input ward
+%D \stoptext
+%D \stoptyping
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-hyp.lmt b/Master/texmf-dist/tex/context/base/mkxl/lang-hyp.lmt
new file mode 100644
index 00000000000..c356dbf3c47
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-hyp.lmt
@@ -0,0 +1,1806 @@
+if not modules then modules = { } end modules ['lang-hyp'] = {
+ version = 1.001,
+ comment = "companion to lang-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- In an automated workflow hypenation of long titles can be somewhat problematic
+-- especially when demands conflict. For that reason I played a bit with a Lua based
+-- variant of the traditional hyphenation machinery. This mechanism has been extended
+-- several times in projects, of which a good description can be found in TUGboat,
+-- Volume 27 (2006), No. 2 — Proceedings of EuroTEX2006: Automatic non-standard
+-- hyphenation in OpenOffice.org by László Németh.
+--
+-- Being the result of two days experimenting the following implementation is probably
+-- not completely okay yet. If there is demand I might add some more features and plugs.
+-- The performance is quite okay but can probably improved a bit, although this is not
+-- the most critital code. For instance, on a metafun manual run the overhead is about
+-- 0.3 seconds on 19 seconds which is not that bad.
+--
+-- In the procecess of wrapping up (for the ctx conference proceedings) I cleaned up
+-- and extended the code a bit. It can be used in production.
+--
+-- . a l g o r i t h m .
+-- 4l1g4
+-- l g o3
+-- 1g o
+-- 2i t h
+-- 4h1m
+-- ---------------------
+-- 4 1 4 3 2 0 4 1
+-- a l-g o-r i t h-m
+
+-- . a s s z o n n y a l .
+-- s1s z/sz=sz,1,3
+-- n1n y/ny=ny,1,3
+-- -----------------------
+-- 0 1 0 0 0 1 0 0 0/sz=sz,2,3,ny=ny,6,3
+-- a s-s z o n-n y a l/sz=sz,2,3,ny=ny,6,3
+--
+-- ab1cd/ef=gh,2,2 : acd - efd (pattern/replacement,start,length
+--
+-- todo : support hjcodes (<32 == length) like luatex does now (no need/demand so far)
+-- maybe : support hyphenation over range (can alsready be done using attributes/language)
+-- maybe : reset dictionary.hyphenated when a pattern is added and/or forced reset option
+-- todo : check subtypes (because they have subtle meanings in the line breaking)
+--
+-- word start (in tex engine):
+--
+-- boundary : yes when wordboundary
+-- hlist : when hyphenationbounds 1 or 3
+-- vlist : when hyphenationbounds 1 or 3
+-- rule : when hyphenationbounds 1 or 3
+-- dir : when hyphenationbounds 1 or 3
+-- whatsit : when hyphenationbounds 1 or 3
+-- glue : yes
+-- math : skipped
+-- glyph : exhyphenchar (one only) : yes (so no -- ---)
+-- otherwise : yes
+--
+-- word end (in tex engine):
+--
+-- boundary : yes
+-- glyph : yes when different language
+-- glue : yes
+-- penalty : yes
+-- kern : yes when not italic (for some historic reason)
+-- hlist : when hyphenationbounds 2 or 3
+-- vlist : when hyphenationbounds 2 or 3
+-- rule : when hyphenationbounds 2 or 3
+-- dir : when hyphenationbounds 2 or 3
+-- whatsit : when hyphenationbounds 2 or 3
+-- ins : when hyphenationbounds 2 or 3
+-- adjust : when hyphenationbounds 2 or 3
+
+local type, rawget, rawset, tonumber, next = type, rawget, rawset, tonumber, next
+
+local P, R, S, Cg, Cf, Ct, Cc, C, Carg, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.Cg, lpeg.Cf, lpeg.Ct, lpeg.Cc, lpeg.C, lpeg.Carg, lpeg.Cs
+local lpegmatch = lpeg.match
+
+local context = context
+
+local concat = table.concat
+local insert = table.insert
+local remove = table.remove
+local formatters = string.formatters
+local utfchar = utf.char
+local utfbyte = utf.byte
+
+if not characters then
+ require("char-ini")
+end
+
+local setmetatableindex = table.setmetatableindex
+
+-- \enabletrackers[hyphenator.steps=silent] will not write to the terminal
+
+local trace_steps = false trackers.register("hyphenator.steps", function(v) trace_steps = v end)
+local trace_visualize = false trackers.register("hyphenator.visualize",function(v) trace_visualize = v end)
+
+local report = logs.reporter("hyphenator")
+
+local implement = interfaces and interfaces.implement or function() end
+
+languages = languages or { }
+local hyphenators = languages.hyphenators or { }
+languages.hyphenators = hyphenators
+local traditional = hyphenators.traditional or { }
+hyphenators.traditional = traditional
+
+local dictionaries = setmetatableindex(function(t,k)
+ local v = {
+ patterns = { },
+ hyphenated = { },
+ specials = { },
+ exceptions = { },
+ loaded = false,
+ }
+ t[k] = v
+ return v
+end)
+
+hyphenators.dictionaries = dictionaries
+
+local character = lpeg.patterns.utf8character
+local digit = R("09")
+local weight = digit/tonumber + Cc(0)
+local fence = P(".")
+local hyphen = P("-")
+local space = P(" ")
+local char = character - space
+local validcharacter = (character - S("./"))
+local keycharacter = character - S("/")
+----- basepart = Ct( (Cc(0) * fence)^-1 * (weight * validcharacter)^1 * weight * (fence * Cc(0))^-1)
+local specpart = (P("/") * Cf ( Ct("") *
+ Cg ( Cc("before") * C((1-P("="))^1) * P("=") ) *
+ Cg ( Cc("after") * C((1-P(","))^1) ) *
+ ( P(",") *
+ Cg ( Cc("start") * ((1-P(","))^1/tonumber) * P(",") ) *
+ Cg ( Cc("length") * ((1-P(-1) )^1/tonumber) )
+ )^-1
+ , rawset))^-1
+
+local make_hashkey_p = Cs((digit/"" + keycharacter)^1)
+----- make_pattern_p = basepart * specpart
+local make_hashkey_e = Cs((hyphen/"" + keycharacter)^1)
+local make_pattern_e = Ct(P(char) * (hyphen * Cc(true) * P(char) + P(char) * Cc(false))^1) -- catch . and char after -
+
+-- local make_hashkey_c = Cs((digit + keycharacter/"")^1)
+-- local make_pattern_c = Ct((P(1)/tonumber)^1)
+
+-- local cache = setmetatableindex(function(t,k)
+-- local n = lpegmatch(make_hashkey_c,k)
+-- local v = lpegmatch(make_pattern_c,n)
+-- t[k] = v
+-- return v
+-- end)
+--
+-- local weight_n = digit + Cc("0")
+-- local basepart_n = Cs( (Cc("0") * fence)^-1 * (weight * validcharacter)^1 * weight * (fence * Cc("0"))^-1) / cache
+-- local make_pattern_n = basepart_n * specpart
+
+local make_pattern_c = Ct((P(1)/tonumber)^1)
+
+-- us + nl: 17664 entries -> 827 unique (saves some 3M)
+
+local cache = setmetatableindex(function(t,k)
+ local v = lpegmatch(make_pattern_c,k)
+ t[k] = v
+ return v
+end)
+
+local weight_n = digit + Cc("0")
+local fence_n = fence / "0"
+local char_n = validcharacter / ""
+local basepart_n = Cs(fence_n^-1 * (weight_n * char_n)^1 * weight_n * fence_n^-1) / cache
+local make_pattern_n = basepart_n * specpart
+
+local function register_pattern(patterns,specials,str,specification)
+ local k = lpegmatch(make_hashkey_p,str)
+ -- local v1, v2 = lpegmatch(make_pattern_p,str)
+ local v1, v2 = lpegmatch(make_pattern_n,str)
+ patterns[k] = v1 -- is this key still ok for complex patterns
+ if specification then
+ specials[k] = specification
+ elseif v2 then
+ specials[k] = v2
+ end
+end
+
+local function unregister_pattern(patterns,specials,str)
+ local k = lpegmatch(make_hashkey_p,str)
+ patterns[k] = nil
+ specials[k] = nil
+end
+
+local p_lower = lpeg.patterns.utf8lower
+
+local function register_exception(exceptions,str,specification)
+ local l = lpegmatch(p_lower,str)
+ local k = lpegmatch(make_hashkey_e,l)
+ local v = lpegmatch(make_pattern_e,l)
+ exceptions[k] = v
+end
+
+local p_pattern = ((Carg(1) * Carg(2) * C(char^1)) / register_pattern + 1)^1
+local p_exception = ((Carg(1) * C(char^1)) / register_exception + 1)^1
+local p_split = Ct(C(character)^1)
+
+function traditional.loadpatterns(language,filename)
+ local dictionary = dictionaries[language]
+ if not dictionary.loaded then
+ if not filename or filename == "" then
+ filename = "lang-" .. language
+ end
+ filename = file.addsuffix(filename,"lua")
+ local fullname = resolvers.findfile(filename)
+ if fullname and fullname ~= "" then
+ local specification = dofile(fullname)
+ if specification then
+ local patterns = specification.patterns
+ if patterns then
+ local data = patterns.data
+ if data and data ~= "" then
+ lpegmatch(p_pattern,data,1,dictionary.patterns,dictionary.specials)
+ end
+ end
+ local exceptions = specification.exceptions
+ if exceptions then
+ local data = exceptions.data
+ if data and data ~= "" then
+ lpegmatch(p_exception,data,1,dictionary.exceptions)
+ end
+ end
+ end
+ end
+ dictionary.loaded = true
+ end
+ return dictionary
+end
+
+local lcchars = characters.lcchars
+local uccodes = characters.uccodes
+local categories = characters.categories
+local nofwords = 0
+local nofhashed = 0
+
+local steps = nil
+local f_show = formatters["%w%s"]
+
+local function show_log()
+ if trace_steps == true then
+ report()
+ local w = #steps[1][1]
+ for i=1,#steps do
+ local s = steps[i]
+ report("%s%w%S %S",s[1],w - #s[1] + 3,s[2],s[3] or "")
+ end
+ report()
+ end
+end
+
+local function show_1(wsplit)
+ local u = concat(wsplit," ")
+ steps = { { f_show(0,u), f_show(0,u) } }
+end
+
+local function show_2(c,m,wsplit,done,i,spec)
+ local s = lpegmatch(p_split,c)
+ local t = { }
+ local n = #m
+ local w = #wsplit
+ for j=1,n do
+ t[#t+1] = m[j]
+ t[#t+1] = s[j]
+ end
+ local m = 2*i-2
+ local l = #t
+ local s = spec and table.sequenced(spec) or ""
+ if m == 0 then
+ steps[#steps+1] = { f_show(m, concat(t,"",2)), f_show(1,concat(done," ",2,#done),s) }
+ elseif i+1 == w then
+ steps[#steps+1] = { f_show(m-1,concat(t,"",1,#t-1)), f_show(1,concat(done," ",2,#done),s) }
+ else
+ steps[#steps+1] = { f_show(m-1,concat(t)), f_show(1,concat(done," ",2,#done),s) }
+ end
+end
+
+local function show_3(wsplit,done)
+ local t = { }
+ local h = { }
+ local n = #wsplit
+ for i=1,n do
+ local w = wsplit[i]
+ if i > 1 then
+ local d = done[i]
+ t[#t+1] = i > 2 and d % 2 == 1 and "-" or " "
+ h[#h+1] = d
+ end
+ t[#t+1] = w
+ h[#h+1] = w
+ end
+ steps[#steps+1] = { f_show(0,concat(h)), f_show(0,concat(t)) }
+ show_log()
+end
+
+local function show_4(wsplit,done)
+ steps = { { concat(wsplit," ") } }
+ show_log()
+end
+
+function traditional.lasttrace()
+ return steps
+end
+
+-- We could reuse the w table but as we cache the resolved words there is not much gain in
+-- that complication.
+--
+-- Beware: word can be a table and when n is passed to we can assume reuse so we need to
+-- honor that n then.
+--
+-- todo: a fast variant for tex ... less lookups (we could check is dictionary has changed)
+-- ... although due to caching the already done words, we don't do much here
+
+local function hyphenate(dictionary,word,n) -- odd is okay
+ nofwords = nofwords + 1
+ local hyphenated = dictionary.hyphenated
+ local isstring = type(word) == "string"
+ if isstring then
+ local done = hyphenated[word]
+ if done ~= nil then
+ return done
+ end
+ elseif n then
+ local done = hyphenated[concat(word,"",1,n)]
+ if done ~= nil then
+ return done
+ end
+ else
+ local done = hyphenated[concat(word)]
+ if done ~= nil then
+ return done
+ end
+ end
+ local key
+ if isstring then
+ key = word
+ word = lpegmatch(p_split,word)
+ if not n then
+ n = #word
+ end
+ else
+ if not n then
+ n = #word
+ end
+ key = concat(word,"",1,n)
+ end
+ local l = 1
+ local w = { "." }
+ -- local d = dictionary.codehash
+ for i=1,n do
+ local c = word[i]
+ -- l = l + (d[c] or 1)
+ l = l + 1
+ w[l] = lcchars[c] or c
+ end
+ l = l + 1
+ w[l] = "."
+ local c = concat(w,"",2,l-1)
+ --
+ local done = hyphenated[c]
+ if done ~= nil then
+ hyphenated[key] = done
+ nofhashed = nofhashed + 1
+ return done
+ end
+ --
+ local exceptions = dictionary.exceptions
+ local exception = exceptions[c]
+ if exception then
+ if trace_steps then
+ show_4(w,exception)
+ end
+ hyphenated[key] = exception
+ nofhashed = nofhashed + 1
+ return exception
+ end
+ --
+ if trace_steps then
+ show_1(w)
+ end
+ --
+ local specials = dictionary.specials
+ local patterns = dictionary.patterns
+ --
+ local spec
+ for i=1,l do
+ for j=i,l do
+ local c = concat(w,"",i,j)
+ local m = patterns[c]
+ if m then
+ local s = specials[c]
+ if not done then
+ done = { }
+ spec = nil
+ -- the string that we resolve has explicit fences (.) so done starts at
+ -- the first fence and runs upto the last one so we need one slot less
+ for i=1,l do
+ done[i] = 0
+ end
+ end
+ -- we run over the pattern that always has a (zero) value for each character
+ -- plus one more as we look at both sides
+ for k=1,#m do
+ local new = m[k]
+ if not new then
+ break
+ elseif new == true then
+ report("fatal error")
+ break
+ elseif new > 0 then
+ local pos = i + k - 1
+ local old = done[pos]
+ if not old then
+ -- break ?
+ elseif new > old then
+ done[pos] = new
+ if s then
+ local b = i + (s.start or 1) - 1
+ if b > 0 then
+ local e = b + (s.length or 2) - 1
+ if e > 0 then
+ if pos >= b and pos <= e then
+ if spec then
+ spec[pos] = { s, k - 1 }
+ else
+ spec = { [pos] = { s, k - 1 } }
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ if trace_steps and done then
+ show_2(c,m,w,done,i,s)
+ end
+ end
+ end
+ end
+ if trace_steps and done then
+ show_3(w,done)
+ end
+ if done then
+ local okay = false
+ for i=3,#done do
+ if done[i] % 2 == 1 then
+ done[i-2] = spec and spec[i] or true
+ okay = true
+ else
+ done[i-2] = false
+ end
+ end
+ if okay then
+ done[#done] = nil
+ done[#done] = nil
+ else
+ done = false
+ end
+ else
+ done = false
+ end
+ hyphenated[key] = done
+ nofhashed = nofhashed + 1
+ return done
+end
+
+function traditional.gettrace(language,word)
+ if not word or word == "" then
+ return
+ end
+ local dictionary = dictionaries[language]
+ if dictionary then
+ local hyphenated = dictionary.hyphenated
+ hyphenated[word] = nil
+ hyphenate(dictionary,word)
+ return steps
+ end
+end
+
+local methods = setmetatableindex(function(t,k) local v = hyphenate t[k] = v return v end)
+
+function traditional.installmethod(name,f)
+ if rawget(methods,name) then
+ report("overloading %a is not permitted",name)
+ else
+ methods[name] = f
+ end
+end
+
+local s_detail_1 = "-"
+local f_detail_2 = formatters["%s-%s"]
+local f_detail_3 = formatters["{%s}{%s}{}"]
+local f_detail_4 = formatters["{%s%s}{%s%s}{%s}"]
+
+function traditional.injecthyphens(dictionary,word,specification)
+ if not word then
+ return false
+ end
+ if not specification then
+ return word
+ end
+ local hyphens = hyphenate(dictionary,word)
+ if not hyphens then
+ return word
+ end
+
+ -- the following code is similar to code later on but here we have strings while there
+ -- we have hyphen specs
+
+ local word = lpegmatch(p_split,word)
+ local size = #word
+
+ local leftmin = specification.leftcharmin or 2
+ local rightmin = size - (specification.rightcharmin or leftmin)
+ local leftchar = specification.leftchar
+ local rightchar = specification.rightchar
+
+ local result = { }
+ local rsize = 0
+ local position = 1
+
+ while position <= size do
+ if position >= leftmin and position <= rightmin then
+ local hyphen = hyphens[position]
+ if not hyphen then
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ elseif hyphen == true then
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ rsize = rsize + 1
+ if leftchar and rightchar then
+ result[rsize] = f_detail_3(rightchar,leftchar)
+ else
+ result[rsize] = s_detail_1
+ end
+ position = position + 1
+ else
+ local o, h = hyphen[2]
+ if o then
+ h = hyphen[1]
+ else
+ h = hyphen
+ o = 1
+ end
+ local b = position - o + (h.start or 1)
+ local e = b + (h.length or 2) - 1
+ if b > 0 and e >= b then
+ for i=1,b-position do
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ end
+ rsize = rsize + 1
+ if leftchar and rightchar then
+ result[rsize] = f_detail_4(h.before,rightchar,leftchar,h.after,concat(word,"",b,e))
+ else
+ result[rsize] = f_detail_2(h.before,h.after)
+ end
+ position = e + 1
+ else
+ -- error
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ end
+ end
+ else
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ end
+ end
+ return concat(result)
+end
+
+do
+
+ local word = C((1-space)^1)
+ local spaces = space^1
+
+ local u_pattern = (Carg(1) * Carg(2) * word / unregister_pattern + spaces)^1
+ local r_pattern = (Carg(1) * Carg(2) * word * Carg(3) / register_pattern + spaces)^1
+ local e_pattern = (Carg(1) * word / register_exception + spaces)^1
+
+ function traditional.registerpattern(language,str,specification)
+ local dictionary = dictionaries[language]
+ if specification == false then
+ lpegmatch(u_pattern,str,1,dictionary.patterns,dictionary.specials)
+ -- unregister_pattern(dictionary.patterns,dictionary.specials,str)
+ else
+ lpegmatch(r_pattern,str,1,dictionary.patterns,dictionary.specials,type(specification) == "table" and specification or false)
+ -- register_pattern(dictionary.patterns,dictionary.specials,str,specification)
+ end
+ end
+
+ function traditional.registerexception(language,str)
+ lpegmatch(e_pattern,str,1,dictionaries[language].exceptions)
+ end
+
+end
+
+-- todo: unicodes or utfhash ?
+
+if context then
+
+ local nodecodes = nodes.nodecodes
+ local disccodes = nodes.disccodes
+
+ local glyph_code = nodecodes.glyph
+ local disc_code = nodecodes.disc
+ local math_code = nodecodes.math
+ local hlist_code = nodecodes.hlist
+
+ local automaticdisc_code = disccodes.automatic
+ local regulardisc_code = disccodes.regular
+
+ local nuts = nodes.nuts
+ local tonode = nodes.tonode
+ local nodepool = nuts.pool
+
+ local new_disc = nodepool.disc
+ local new_penalty = nodepool.penalty
+
+ local getfield = nuts.getfield
+ local getfont = nuts.getfont
+ local getid = nuts.getid
+ local getattr = nuts.getattr
+ local getnext = nuts.getnext
+ local getprev = nuts.getprev
+ local getsubtype = nuts.getsubtype
+ local getlist = nuts.getlist
+ local getlanguage = nuts.getlanguage
+ local getattrlist = nuts.getattrlist
+ local setattrlist = nuts.setattrlist
+ local isglyph = nuts.isglyph
+ local ischar = nuts.ischar
+
+ local setchar = nuts.setchar
+ local setdisc = nuts.setdisc
+ local setlink = nuts.setlink
+ local setprev = nuts.setprev
+ local setnext = nuts.setnext
+
+ local insert_before = nuts.insert_before
+ local insert_after = nuts.insert_after
+ local copy_node = nuts.copy
+ local copy_list = nuts.copy_list
+ local remove_node = nuts.remove
+ local end_of_math = nuts.end_of_math
+ local node_tail = nuts.tail
+
+ local nexthlist = nuts.traversers.hlist
+ local nextdisc = nuts.traversers.disc
+
+ local setcolor = nodes.tracers.colors.set
+
+ local variables = interfaces.variables
+ local v_reset = variables.reset
+ local v_yes = variables.yes
+ local v_word = variables.word
+ local v_all = variables.all
+
+ local settings_to_array = utilities.parsers.settings_to_array
+
+ local unsetvalue = attributes.unsetvalue
+ local texsetattribute = tex.setattribute
+
+ local prehyphenchar = language.prehyphenchar
+ local posthyphenchar = language.posthyphenchar
+ local preexhyphenchar = language.preexhyphenchar
+ local postexhyphenchar = language.postexhyphenchar
+
+ local a_hyphenation = attributes.private("hyphenation")
+
+ local interwordpenalty = 5000
+
+ function traditional.loadpatterns(language)
+ return dictionaries[language]
+ end
+
+ -- for the moment we use an independent data structure
+
+ setmetatableindex(dictionaries,function(t,k)
+ if type(k) == "string" then
+ -- this will force a load if not yet loaded (we need a nicer way) for the moment
+ -- that will do (nneeded for examples that register a pattern specification
+ languages.getnumber(k)
+ end
+ local specification = languages.getdata(k)
+ local dictionary = {
+ patterns = { },
+ exceptions = { },
+ hyphenated = { },
+ specials = { },
+ instance = false,
+ characters = { },
+ unicodes = { },
+ }
+ if specification then
+ local resources = specification.resources
+ if resources then
+ local characters = dictionary.characters or { }
+ local unicodes = dictionary.unicodes or { }
+ for i=1,#resources do
+ local r = resources[i]
+ if not r.in_dictionary then
+ r.in_dictionary = true
+ local patterns = r.patterns
+ if patterns then
+ local data = patterns.data
+ if data then
+ -- regular patterns
+ lpegmatch(p_pattern,data,1,dictionary.patterns,dictionary.specials)
+ end
+ local extra = patterns.extra
+ if extra then
+ -- special patterns
+ lpegmatch(p_pattern,extra,1,dictionary.patterns,dictionary.specials)
+ end
+ end
+ local exceptions = r.exceptions
+ if exceptions then
+ local data = exceptions.data
+ if data and data ~= "" then
+ lpegmatch(p_exception,data,1,dictionary.exceptions)
+ end
+ end
+ local usedchars = lpegmatch(p_split,patterns.characters)
+ for i=1,#usedchars do
+ local char = usedchars[i]
+ local code = utfbyte(char)
+ local upper = uccodes[code]
+ characters[char] = code
+ unicodes [code] = char
+ if type(upper) == "table" then
+ for i=1,#upper do
+ local u = upper[i]
+ unicodes[u] = utfchar(u)
+ end
+ else
+ unicodes[upper] = utfchar(upper)
+ end
+ end
+ end
+ end
+ dictionary.characters = characters
+ dictionary.unicodes = unicodes
+ setmetatableindex(characters,function(t,k) local v = k and utfbyte(k) t[k] = v return v end)
+ end
+ t[specification.number] = dictionary
+ dictionary.instance = specification.instance -- needed for hyphenchars
+ end
+ t[k] = dictionary
+ return dictionary
+ end)
+
+ -- Beware: left and right min doesn't mean that in a 1 mmm hsize there can be snippets
+ -- with less characters than either of them! This could be an option but such a narrow
+ -- hsize doesn't make sense anyway.
+
+ -- We assume that featuresets are defined global ... local definitions (also mid paragraph)
+ -- make not much sense anyway. For the moment we assume no predefined sets so we don't need
+ -- to store them. Nor do we need to hash them in order to save space ... no sane user will
+ -- define many of them.
+
+ local featuresets = hyphenators.featuresets or { }
+ hyphenators.featuresets = featuresets
+
+ storage.shared.noflanguagesfeaturesets = storage.shared.noflanguagesfeaturesets or 0
+
+ local noffeaturesets = storage.shared.noflanguagesfeaturesets
+
+ storage.register("languages/hyphenators/featuresets",featuresets,"languages.hyphenators.featuresets")
+
+ ----- hash = table.sequenced(featureset,",") -- no need now
+
+ local function register(name,featureset)
+ noffeaturesets = noffeaturesets + 1
+ featureset.attribute = noffeaturesets
+ featuresets[noffeaturesets] = featureset -- access by attribute
+ featuresets[name] = featureset -- access by name
+ storage.shared.noflanguagesfeaturesets = noffeaturesets
+ return noffeaturesets
+ end
+
+ local function makeset(...)
+ -- a bit overkill, supporting variants but who cares
+ local set = { }
+ for i=1,select("#",...) do
+ local list = select(i,...)
+ local kind = type(list)
+ local used = nil
+ if kind == "string" then
+ if list == v_all then
+ -- not ok ... now all get ignored
+ return setmetatableindex(function(t,k) local v = utfchar(k) t[k] = v return v end)
+ elseif list ~= "" then
+ used = lpegmatch(p_split,list)
+ set = set or { }
+ for i=1,#used do
+ local char = used[i]
+ set[utfbyte(char)] = char
+ end
+ end
+ elseif kind == "table" then
+ if next(list) then
+ set = set or { }
+ for byte, char in next, list do
+ set[byte] = char == true and utfchar(byte) or char
+ end
+ elseif #list > 0 then
+ set = set or { }
+ for i=1,#list do
+ local l = list[i]
+ if type(l) == "number" then
+ set[l] = utfchar(l)
+ else
+ set[utfbyte(l)] = l
+ end
+ end
+ end
+ end
+ end
+ return set
+ end
+
+ -- category pd (tex also sees --- and -- as hyphens but do we really want that
+
+ local defaulthyphens = {
+ [0x002D] = true, -- HYPHEN-MINUS
+ [0x00AD] = 0x002D, -- SOFT HYPHEN (active in ConTeXt)
+ -- [0x058A] = true, -- ARMENIAN HYPHEN
+ -- [0x1400] = true, -- CANADIAN SYLLABICS HYPHEN
+ -- [0x1806] = true, -- MONGOLIAN TODO SOFT HYPHEN
+ [0x2010] = true, -- HYPHEN
+ -- [0x2011] = true, -- NON-BREAKING HYPHEN
+ -- [0x2012] = true, -- FIGURE DASH
+ [0x2013] = true, -- EN DASH
+ [0x2014] = true, -- EM DASH
+ -- [0x2015] = true, -- HORIZONTAL BAR
+ -- [0x2027] = true, -- HYPHENATION POINT
+ -- [0x2E17] = true, -- DOUBLE OBLIQUE HYPHEN
+ -- [0x2E1A] = true, -- HYPHEN WITH DIAERESIS
+ -- [0x2E3A] = true, -- TWO-EM DASH
+ -- [0x2E3B] = true, -- THREE-EM DASH
+ -- [0x2E40] = true, -- DOUBLE HYPHEN
+ -- [0x301C] = true, -- WAVE DASH
+ -- [0x3030] = true, -- WAVY DASH
+ -- [0x30A0] = true, -- KATAKANA-HIRAGANA DOUBLE HYPHEN
+ -- [0xFE31] = true, -- PRESENTATION FORM FOR VERTICAL EM DASH
+ -- [0xFE32] = true, -- PRESENTATION FORM FOR VERTICAL EN DASH
+ -- [0xFE58] = true, -- SMALL EM DASH
+ -- [0xFE63] = true, -- SMALL HYPHEN-MINUS
+ -- [0xFF0D] = true, -- FULLWIDTH HYPHEN-MINUS
+ }
+
+ local defaultjoiners = {
+ [0x200C] = true, -- nzwj
+ [0x200D] = true, -- zwj
+ }
+
+ local function somehyphenchar(c)
+ c = tonumber(c)
+ return c ~= 0 and c or nil
+ end
+
+ local function definefeatures(name,featureset)
+ local extrachars = featureset.characters -- "[]()"
+ local hyphenchars = featureset.hyphens
+ local joinerchars = featureset.joiners
+ local alternative = featureset.alternative
+ local rightwordmin = tonumber(featureset.rightwordmin)
+ local charmin = tonumber(featureset.charmin) -- luatex now also has hyphenationmin
+ local leftcharmin = tonumber(featureset.leftcharmin)
+ local rightcharmin = tonumber(featureset.rightcharmin)
+ local leftchar = somehyphenchar(featureset.leftchar)
+ local rightchar = somehyphenchar(featureset.rightchar)
+ local rightchars = featureset.rightchars
+local rightedge = featureset.rightedge
+local autohyphen = v_yes -- featureset.autohyphen -- insert disc
+local hyphenonly = v_yes -- featureset.hyphenonly -- don't hyphenate around
+ rightchars = rightchars == v_word and true or tonumber(rightchars)
+ joinerchars = joinerchars == v_yes and defaultjoiners or joinerchars -- table
+ hyphenchars = hyphenchars == v_yes and defaulthyphens or hyphenchars -- table
+ -- not yet ok: extrachars have to be ignored so it cannot be all)
+ featureset.extrachars = makeset(joinerchars or "",extrachars or "")
+ featureset.hyphenchars = makeset(hyphenchars or "")
+ featureset.alternative = alternative or "hyphenate"
+ featureset.rightwordmin = rightwordmin and rightwordmin > 0 and rightwordmin or nil
+ featureset.charmin = charmin and charmin > 0 and charmin or nil
+ featureset.leftcharmin = leftcharmin and leftcharmin > 0 and leftcharmin or nil
+ featureset.rightcharmin = rightcharmin and rightcharmin > 0 and rightcharmin or nil
+ featureset.rightchars = rightchars
+ featureset.leftchar = leftchar
+ featureset.rightchar = rightchar
+ -- featureset.strict = rightedge == "tex"
+featureset.autohyphen = autohyphen == v_yes
+featureset.hyphenonly = hyphenonly == v_yes
+ return register(name,featureset)
+ end
+
+ local function setfeatures(n)
+ if not n or n == v_reset then
+ n = false
+ else
+ local f = featuresets[n]
+ if not f and type(n) == "string" then
+ local t = settings_to_array(n)
+ local s = { }
+ for i=1,#t do
+ local ti = t[i]
+ local fs = featuresets[ti]
+ if fs then
+ for k, v in next, fs do
+ s[k] = v
+ end
+ end
+ end
+ n = register(n,s)
+ else
+ n = f and f.attribute
+ end
+ end
+ texsetattribute(a_hyphenation,n or unsetvalue)
+ end
+
+ traditional.definefeatures = definefeatures
+ traditional.setfeatures = setfeatures
+
+ implement {
+ name = "definehyphenationfeatures",
+ actions = definefeatures,
+ arguments = {
+ "string",
+ {
+ { "characters" },
+ { "hyphens" },
+ { "joiners" },
+ { "rightchars" },
+ { "rightwordmin", "integer" },
+ { "charmin", "integer" },
+ { "leftcharmin", "integer" },
+ { "rightcharmin", "integer" },
+ { "leftchar", "integer" },
+ { "rightchar", "integer" },
+ { "alternative" },
+ { "rightedge" },
+ }
+ }
+ }
+
+ implement {
+ name = "sethyphenationfeatures",
+ actions = setfeatures,
+ arguments = "string"
+ }
+
+ implement {
+ name = "registerhyphenationpattern",
+ actions = traditional.registerpattern,
+ arguments = { "string", "string", "boolean" }
+ }
+
+ implement {
+ name = "registerhyphenationexception",
+ actions = traditional.registerexception,
+ arguments = "2 strings",
+ }
+
+ -- This is a relative large function with local variables and local functions. A previous
+ -- implementation had the functions outside but this is cleaner and as efficient. The test
+ -- runs 100 times over tufte.tex, knuth.tex, zapf.tex, ward.tex and darwin.tex in lower
+ -- and uppercase with a 1mm hsize.
+ --
+ -- language=0 language>0 4 | 3 * slower
+ --
+ -- tex 2.34 | 1.30 2.55 | 1.45 0.21 | 0.15
+ -- lua 2.42 | 1.38 3.30 | 1.84 0.88 | 0.46
+ --
+ -- Of course we have extra overhead (virtual Lua machine) but also we check attributes and
+ -- support specific local options). The test puts the typeset text in boxes and discards
+ -- it. If we also flush the runtime is 4.31|2.56 and 4.99|2.94 seconds so the relative
+ -- difference is (somehow) smaller. The test has 536 pages. There is a little bit of extra
+ -- overhead because we store the patterns in a different way.
+ --
+ -- As usual I will look for speedups. Some 0.01 seconds could be gained by sharing patterns
+ -- which is not impressive but it does save some 3M memory on this test. (Some optimizations
+ -- already brought the 3.30 seconds down to 3.14 but it all depends on aggressive caching.)
+
+ -- As we kick in the hyphenator before fonts get handled, we don't look at implicit (font)
+ -- kerns or ligatures.
+
+ local starttiming = statistics.starttiming
+ local stoptiming = statistics.stoptiming
+
+ -- local strictids = {
+ -- [nodecodes.hlist] = true,
+ -- [nodecodes.vlist] = true,
+ -- [nodecodes.rule] = true,
+ -- [nodecodes.dir] = true,
+ -- [nodecodes.whatsit] = true,
+ -- [nodecodes.ins] = true,
+ -- [nodecodes.adjust] = true,
+ --
+ -- [nodecodes.math] = true,
+ -- [nodecodes.disc] = true,
+ --
+ -- [nodecodes.accent] = true, -- never used in context
+ -- }
+
+ -- a lot of overhead when only one char
+
+ function traditional.hyphenate(head)
+
+ local first = head
+ local tail = nil
+ local last = nil
+ local current = first
+ local dictionary = nil
+ local instance = nil
+ local characters = nil
+ local unicodes = nil
+ local exhyphenchar = tex.exhyphenchar
+ local extrachars = nil
+ local hyphenchars = nil
+ local language = nil
+ local lastfont = nil
+ local start = nil
+ local stop = nil
+ local word = { } -- we reuse this table
+ local size = 0
+ local leftchar = false
+ local rightchar = false -- utfbyte("-")
+ local leftexchar = false
+ local rightexchar = false -- utfbyte("-")
+ local leftmin = 0
+ local rightmin = 0
+ local charmin = 1
+ local leftcharmin = nil
+ local rightcharmin = nil
+ ----- leftwordmin = nil
+ local rightwordmin = nil
+ local rightchars = nil
+ local leftchar = nil
+ local rightchar = nil
+ local attr = nil
+ local lastwordlast = nil
+ local hyphenated = hyphenate
+ ----- strict = nil
+ local exhyphenpenalty = tex.exhyphenpenalty
+ local hyphenpenalty = tex.hyphenpenalty
+ local autohyphen = false
+ local hyphenonly = false
+
+ -- We cannot use an 'enabled' boolean (false when no characters or extras) because we
+ -- can have plugins that set a characters metatable and so) ... it doesn't save much
+ -- anyway. Using (unicodes and unicodes[code]) and a nil table when no characters also
+ -- doesn't save much. So there not that much to gain for languages that don't hyphenate.
+ --
+ -- enabled = (unicodes and (next(unicodes) or getmetatable(unicodes)))
+ -- or (extrachars and next(extrachars))
+ --
+ -- This can be used to not add characters i.e. keep size 0 but then we need to check for
+ -- attributes that change it, which costs time too. Not much to gain there.
+
+ starttiming(traditional)
+
+ local function insertpenalty()
+ local p = new_penalty(interwordpenalty)
+ setattrlist(p,last)
+ if trace_visualize then
+ nuts.setvisual(p,"penalty")
+ end
+ last = getprev(last)
+ first, last = insert_after(first,last,p)
+ end
+
+ local function synchronizefeatureset(a)
+ local f = a and featuresets[a]
+ if f then
+ hyphenated = methods[f.alternative or "hyphenate"]
+ extrachars = f.extrachars
+ hyphenchars = f.hyphenchars
+ rightwordmin = f.rightwordmin
+ charmin = f.charmin
+ leftcharmin = f.leftcharmin
+ rightcharmin = f.rightcharmin
+ leftchar = f.leftchar
+ rightchar = f.rightchar
+ -- strict = f.strict and strictids
+ rightchars = f.rightchars
+ autohyphen = f.autohyphen
+ hyphenonly = f.hyphenonly
+ if rightwordmin and rightwordmin > 0 and lastwordlast ~= rightwordmin then
+ -- so we can change mid paragraph but it's kind of unpredictable then
+ if not tail then
+ tail = node_tail(first)
+ end
+ last = tail
+ local inword = false
+ local count = 0
+ while last and rightwordmin > 0 do
+ local id = getid(last)
+ if id == glyph_code then
+ count = count + 1
+ inword = true
+ if trace_visualize then
+ setcolor(last,"darkgreen")
+ end
+ elseif inword then
+ inword = false
+ rightwordmin = rightwordmin - 1
+ if rightchars == true then
+ if rightwordmin > 0 then
+ insertpenalty()
+ end
+ elseif rightchars and count <= rightchars then
+ insertpenalty()
+ end
+ end
+ last = getprev(last)
+ end
+ lastwordlast = rightwordmin
+ end
+ if not charmin or charmin == 0 then
+ charmin = 1
+ end
+ else
+ hyphenated = methods.hyphenate
+ extrachars = false
+ hyphenchars = false
+ rightwordmin = false
+ charmin = 1
+ leftcharmin = false
+ rightcharmin = false
+ leftchar = false
+ rightchar = false
+ -- strict = false
+ autohyphen = false
+ hyphenonly = false
+ end
+
+ return a
+ end
+
+ local function flush(hyphens) -- todo: no need for result
+
+ local rightmin = size - rightmin
+ local result = { }
+ local rsize = 0
+ local position = 1
+
+ -- todo: remember last dics and don't go back to before that (plus message) ...
+ -- for simplicity we also assume that we don't start with a dics node
+ --
+ -- there can be a conflict: if we backtrack then we can end up in another disc
+ -- and get out of sync (dup chars and so)
+
+ while position <= size do
+ if position >= leftmin and position <= rightmin then
+ local hyphen = hyphens[position]
+ if not hyphen then
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ elseif hyphen == true then
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ rsize = rsize + 1
+ result[rsize] = true
+ position = position + 1
+ else
+ local o, h = hyphen[2]
+ if o then
+ -- { hyphen, offset)
+ h = hyphen[1]
+ else
+ -- hyphen
+ h = hyphen
+ o = 1
+ end
+ local b = position - o + (h.start or 1)
+ local e = b + (h.length or 2) - 1
+ if b > 0 and e >= b then
+ for i=1,b-position do
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ end
+ rsize = rsize + 1
+ result[rsize] = {
+ h.before or "", -- pre
+ h.after or "", -- post
+ concat(word,"",b,e), -- replace
+ h.right, -- optional after pre
+ h.left, -- optional before post
+ }
+ position = e + 1
+ else
+ -- error
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ end
+ end
+ else
+ rsize = rsize + 1
+ result[rsize] = word[position]
+ position = position + 1
+ end
+ end
+
+ local function serialize(replacement,leftchar,rightchar)
+ if not replacement then
+ return
+ elseif replacement == true then
+ local glyph = copy_node(stop)
+ setchar(glyph,leftchar or rightchar)
+ return glyph
+ end
+ local head = nil
+ local current = nil
+ if leftchar then
+ head = copy_node(stop)
+ current = head
+ setchar(head,leftchar)
+ end
+ local rsize = #replacement
+ if rsize == 1 then
+ local glyph = copy_node(stop)
+ setchar(glyph,characters[replacement])
+ if head then
+ insert_after(current,current,glyph)
+ else
+ head = glyph
+ end
+ current = glyph
+ elseif rsize > 0 then
+ local list = lpegmatch(p_split,replacement) -- this is an utf split (could be cached)
+ for i=1,#list do
+ local glyph = copy_node(stop)
+ setchar(glyph,characters[list[i]])
+ if head then
+ insert_after(current,current,glyph)
+ else
+ head = glyph
+ end
+ current = glyph
+ end
+ end
+ if rightchar then
+ local glyph = copy_node(stop)
+ insert_after(current,current,glyph)
+ setchar(glyph,rightchar)
+ end
+ return head
+ end
+
+ local current = start
+ local attrnode = start -- will be different, just the first char
+
+ for i=1,rsize do
+ local r = result[i]
+ if r == true then
+ local disc = new_disc()
+ local pre = nil
+ local post = nil
+ if rightchar then
+ pre = serialize(true,rightchar)
+ end
+ if leftchar then
+ post = serialize(true,leftchar)
+ end
+ setdisc(disc,pre,post,nil,regulardisc_code,hyphenpenalty)
+ if attrnode then
+ setattrlist(disc,attrnode)
+ end
+ -- could be a replace as well
+ insert_before(first,current,disc)
+ elseif type(r) == "table" then
+ local disc = new_disc()
+ local pre = r[1]
+ local post = r[2]
+ local replace = r[3]
+ local right = r[4] ~= false and rightchar
+ local left = r[5] ~= false and leftchar
+ if pre then
+ if pre ~= "" then
+ pre = serialize(pre,false,right)
+ else
+ pre = nil
+ end
+ end
+ if post then
+ if post ~= "" then
+ post = serialize(post,left,false)
+ else
+ post = nil
+ end
+ end
+ if replace then
+ if replace ~= "" then
+ replace = serialize(replace)
+ else
+ replace = nil
+ end
+ end
+ -- maybe regular code
+ setdisc(disc,pre,post,replace,regulardisc_code,hyphenpenalty)
+ if attrnode then
+ setattrlist(disc,attrnode)
+ end
+ insert_before(first,current,disc)
+ else
+ setchar(current,characters[r])
+ if i < rsize then
+ current = getnext(current)
+ end
+ end
+ end
+ if current and current ~= stop then
+ local current = getnext(current)
+ local last = getnext(stop)
+ while current ~= last do
+ first, current = remove_node(first,current,true)
+ end
+ end
+
+ end
+
+ local function inject(leftchar,rightchar,code,attrnode)
+ if first ~= current then
+ local disc = new_disc()
+ first, current, glyph = remove_node(first,current)
+ first, current = insert_before(first,current,disc)
+ if trace_visualize then
+ setcolor(glyph,"darkred") -- these get checked
+ setcolor(disc,"darkgreen") -- in the colorizer
+ end
+ local pre = nil
+ local post = nil
+ local replace = glyph
+ if leftchar and leftchar > 0 then
+ post = copy_node(glyph)
+ setchar(post,leftchar)
+ end
+ pre = copy_node(glyph)
+ setchar(pre,rightchar and rightchar > 0 and rightchar or code)
+ setdisc(disc,pre,post,replace,automaticdisc_code,hyphenpenalty) -- ex ?
+ if attrnode then
+ setattrlist(disc,attrnode)
+ end
+ end
+ return current
+ end
+
+ local function injectseries(current,last,next,attrnode)
+ local disc = new_disc()
+ local start = current
+ first, current = insert_before(first,current,disc)
+ setprev(start)
+ setnext(last)
+ if next then
+ setlink(current,next)
+ else
+ setnext(current)
+ end
+ local pre = copy_list(start)
+ local post = nil
+ local replace = start
+ setdisc(disc,pre,post,replace,automaticdisc_code,hyphenpenalty) -- ex ?
+ if attrnode then
+ setattrlist(disc,attrnode)
+ end
+ return current
+ end
+
+ local a = getattr(first,a_hyphenation)
+ if a ~= attr then
+ attr = synchronizefeatureset(a)
+ end
+
+ -- The first attribute in a word determines the way a word gets hyphenated and if
+ -- relevant, other properties are also set then. We could optimize for silly one-char
+ -- cases but it has no priority as the code is still not that much slower than the
+ -- native hyphenator and this variant also provides room for extensions.
+
+ local skipping = false
+
+ -- In "word word word." the sequences "word" and "." can be a different font!
+
+ while current and current ~= last do -- and current
+ local code, id = isglyph(current)
+ if code then
+ if skipping then
+ current = getnext(current)
+ else
+ local lang = getlanguage(current)
+ local font = getfont(current)
+ if lang ~= language or font ~= lastfont then
+ if dictionary and size > charmin and leftmin + rightmin <= size then
+ -- only german has many words starting with an uppercase character
+ if categories[word[1]] == "lu" and getfield(start,"uchyph") < 0 then
+ -- skip
+ else
+ local hyphens = hyphenated(dictionary,word,size)
+ if hyphens then
+ flush(hyphens)
+ end
+ end
+ end
+ lastfont = font
+ if language ~= lang and lang > 0 then
+ --
+ dictionary = dictionaries[lang]
+ instance = dictionary.instance
+ characters = dictionary.characters
+ unicodes = dictionary.unicodes
+ --
+ local a = getattr(current,a_hyphenation)
+ attr = synchronizefeatureset(a)
+ leftchar = leftchar or (instance and posthyphenchar (instance)) -- we can make this more
+ rightchar = rightchar or (instance and prehyphenchar (instance)) -- efficient if needed
+ leftexchar = (instance and preexhyphenchar (instance))
+ rightexchar = (instance and postexhyphenchar(instance))
+ leftmin = leftcharmin or getfield(current,"lhmin")
+ rightmin = rightcharmin or getfield(current,"rhmin")
+ if not leftchar or leftchar < 0 then
+ leftchar = false
+ end
+ if not rightchar or rightchar < 0 then
+ rightchar = false
+ end
+ --
+ local char = unicodes[code] or (extrachars and extrachars[code])
+ if char then
+ word[1] = char
+ size = 1
+ start = current
+ else
+ size = 0
+ end
+ else
+ size = 0
+ end
+ language = lang
+ elseif language <= 0 then
+ --
+ elseif size > 0 then
+ local char = unicodes[code] or (extrachars and extrachars[code])
+ if char then
+ size = size + 1
+ word[size] = char
+ elseif dictionary then
+ if not hyphenonly or code ~= exhyphenchar then
+ if size > charmin and leftmin + rightmin <= size then
+ if categories[word[1]] == "lu" and getfield(start,"uchyph") < 0 then
+ -- skip
+ else
+ local hyphens = hyphenated(dictionary,word,size)
+ if hyphens then
+ flush(hyphens)
+ end
+ end
+ end
+ end
+ size = 0
+ if code == exhyphenchar then -- normally the -
+ local next = getnext(current)
+ local last = current
+ local font = getfont(current)
+ while next and ischar(next,font) == code do
+ last = next
+ next = getnext(next)
+ end
+ if not autohyphen then
+ current = last
+ elseif current == last then
+ current = inject(leftexchar,rightexchar,code,current)
+ else
+ current = injectseries(current,last,next,current)
+ end
+ if hyphenonly then
+ skipping = true
+ end
+ elseif hyphenchars then
+ local char = hyphenchars[code]
+ if char == true then
+ char = code
+ end
+ if char then
+ current = inject(leftchar and char or nil,rightchar and char or nil,char,current)
+ end
+ end
+ end
+ else
+ local a = getattr(current,a_hyphenation)
+ if a ~= attr then
+ attr = synchronizefeatureset(a) -- influences extrachars
+ leftchar = leftchar or (instance and posthyphenchar (instance)) -- we can make this more
+ rightchar = rightchar or (instance and prehyphenchar (instance)) -- efficient if needed
+ leftexchar = (instance and preexhyphenchar (instance))
+ rightexchar = (instance and postexhyphenchar(instance))
+ leftmin = leftcharmin or getfield(current,"lhmin")
+ rightmin = rightcharmin or getfield(current,"rhmin")
+ if not leftchar or leftchar < 0 then
+ leftchar = false
+ end
+ if not rightchar or rightchar < 0 then
+ rightchar = false
+ end
+ end
+ --
+ local char = unicodes[code] or (extrachars and extrachars[code])
+ if char then
+ word[1] = char
+ size = 1
+ start = current
+ end
+ end
+ stop = current
+ current = getnext(current)
+ end
+ else
+ if skipping then
+ skipping = false
+ end
+ if id == disc_code then
+ size = 0
+ current = getnext(current)
+ if hyphenonly then
+ skipping = true
+ end
+ -- elseif strict and strict[id] then
+ -- current = id == math_code and getnext(end_of_math(current)) or getnext(current)
+ -- size = 0
+ else
+ current = id == math_code and getnext(end_of_math(current)) or getnext(current)
+ end
+ if size > 0 then
+ if dictionary and size > charmin and leftmin + rightmin <= size then
+ if categories[word[1]] == "lu" and getfield(start,"uchyph") < 0 then
+ -- skip
+ else
+ local hyphens = hyphenated(dictionary,word,size)
+ if hyphens then
+ flush(hyphens)
+ end
+ end
+ end
+ size = 0
+ end
+ end
+ end
+ -- we can have quit due to last so we need to flush the last seen word, we could move
+ -- this in the loop and test for current but ... messy
+ if dictionary and size > charmin and leftmin + rightmin <= size then
+ if categories[word[1]] == "lu" and getfield(start,"uchyph") < 0 then
+ -- skip
+ else
+ local hyphens = hyphenated(dictionary,word,size)
+ if hyphens then
+ flush(hyphens)
+ end
+ end
+ end
+
+ stoptiming(traditional)
+
+ return head
+ end
+
+ statistics.register("hyphenation",function()
+ if nofwords > 0 or statistics.elapsed(traditional) > 0 then
+ return string.format("%s words hyphenated, %s unique, used time %s",
+ nofwords,nofhashed,statistics.elapsedseconds(traditional) or 0)
+ end
+ end)
+
+ local texmethod = "builders.kernel.hyphenation"
+ local oldmethod = texmethod
+ local newmethod = texmethod
+
+ -- local newmethod = "languages.hyphenators.traditional.hyphenate"
+ --
+ -- nodes.tasks.prependaction("processors","words",newmethod)
+ -- nodes.tasks.disableaction("processors",oldmethod)
+ --
+ -- nodes.tasks.replaceaction("processors","words",oldmethod,newmethod)
+
+ -- \enabledirectives[hyphenators.method=traditional]
+ -- \enabledirectives[hyphenators.method=builtin]
+
+ -- push / pop ? check first attribute
+
+ -- local replaceaction = nodes.tasks.replaceaction -- no longer overload this way (too many local switches)
+
+ local hyphenate = language.hyphenate
+ local hyphenating = nuts.hyphenating
+ local methods = { }
+ local usedmethod = false
+ local stack = { }
+
+ local original = hyphenating and
+ function(head)
+ return (hyphenating(head))
+ end
+ or
+ function(head)
+ hyphenate(tonode(head))
+ return head -- a nut
+ end
+
+ -- local has_language = language.has_language
+ --
+ -- local function original(head) -- kernel.hyphenation(head)
+ -- local h = tonode(head)
+ -- if has_language(h) then
+ -- hyphenate(h)
+ -- end
+ -- return head
+ -- end
+
+ local getcount = tex.getcount
+
+ hyphenators.methods = methods
+ local optimize = false
+
+ directives.register("hyphenator.optimize", function(v) optimize = v end)
+
+ function hyphenators.handler(head,groupcode)
+ if usedmethod then
+ if optimize and (groupcode == "hbox" or groupcode == "adjusted_hbox") then
+ if getcount("hyphenstate") > 0 then
+ forced = false
+ return usedmethod(head)
+ else
+ return head
+ end
+ else
+ return usedmethod(head)
+ end
+ else
+ return head
+ end
+ end
+
+ methods.tex = original
+ methods.original = original
+ methods.expanded = original -- was expanded before 1.005
+ methods.traditional = languages.hyphenators.traditional.hyphenate
+ methods.none = false -- function(head) return head, false end
+
+ usedmethod = original
+
+ local function setmethod(method)
+ usedmethod = type(method) == "string" and methods[method]
+ if usedmethod == nil then
+ usedmethod = methods.tex
+ end
+ end
+ local function pushmethod(method)
+ insert(stack,usedmethod)
+ usedmethod = type(method) == "string" and methods[method]
+ if usedmethod == nil then
+ usedmethod = methods.tex
+ end
+ end
+ local function popmethod()
+ usedmethod = remove(stack) or methods.tex
+ end
+
+ hyphenators.setmethod = setmethod
+ hyphenators.pushmethod = pushmethod
+ hyphenators.popmethod = popmethod
+
+ directives.register("hyphenators.method",setmethod)
+
+ function hyphenators.setup(specification)
+ local method = specification.method
+ if method then
+ setmethod(method)
+ end
+ end
+
+ implement { name = "sethyphenationmethod", actions = setmethod, arguments = "string" }
+ implement { name = "pushhyphenation", actions = pushmethod, arguments = "string" }
+ implement { name = "pophyphenation", actions = popmethod }
+
+ -- can become a runtime loaded one:
+
+ local context = context
+ local ctx_NC = context.NC
+ local ctx_NR = context.NR
+ local ctx_verbatim = context.verbatim
+
+ function hyphenators.showhyphenationtrace(language,word)
+ if not word or word == "" then
+ return
+ end
+ local saved = trace_steps
+ trace_steps = "silent"
+ local steps = traditional.gettrace(language,word)
+ trace_steps = saved
+ if steps then
+ local n = #steps
+ if n > 0 then
+ context.starttabulate { "|r|l|l|l|" }
+ for i=1,n do
+ local s = steps[i]
+ ctx_NC() if i > 1 and i < n then context(i-1) end
+ ctx_NC() ctx_verbatim(s[1])
+ ctx_NC() ctx_verbatim(s[2])
+ ctx_NC() ctx_verbatim(s[3])
+ ctx_NC()
+ ctx_NR()
+ end
+ context.stoptabulate()
+ end
+ end
+ end
+
+ implement {
+ name = "showhyphenationtrace",
+ actions = hyphenators.showhyphenationtrace,
+ arguments = "2 strings",
+ }
+
+ function nodes.stripdiscretionaries(head)
+ for l in nexthlist, head do
+ for d in nextdisc, getlist(l) do
+ remove_node(h,false,true)
+ end
+ end
+ return head
+ end
+
+
+else
+
+ -- traditional.loadpatterns("nl","lang-nl")
+ -- traditional.loadpatterns("de","lang-de")
+ -- traditional.loadpatterns("us","lang-us")
+
+ -- traditional.registerpattern("nl","e1ë", { start = 1, length = 2, before = "e", after = "e" } )
+ -- traditional.registerpattern("nl","oo7ë", { start = 2, length = 3, before = "o", after = "e" } )
+ -- traditional.registerpattern("de","qqxc9xkqq",{ start = 3, length = 4, before = "ab", after = "cd" } )
+
+ -- local specification = {
+ -- leftcharmin = 2,
+ -- rightcharmin = 2,
+ -- leftchar = "<",
+ -- rightchar = ">",
+ -- }
+
+ -- print("reëel", traditional.injecthyphens(dictionaries.nl,"reëel", specification),"r{e>}{<e}{eë}el")
+ -- print("reeëel", traditional.injecthyphens(dictionaries.nl,"reeëel", specification),"re{e>}{<e}{eë}el")
+ -- print("rooëel", traditional.injecthyphens(dictionaries.nl,"rooëel", specification),"r{o>}{<e}{ooë}el")
+
+ -- print( "qxcxkq", traditional.injecthyphens(dictionaries.de, "qxcxkq", specification),"")
+ -- print( "qqxcxkqq", traditional.injecthyphens(dictionaries.de, "qqxcxkqq", specification),"")
+ -- print( "qqqxcxkqqq", traditional.injecthyphens(dictionaries.de, "qqqxcxkqqq", specification),"")
+ -- print("qqqqxcxkqqqq",traditional.injecthyphens(dictionaries.de,"qqqqxcxkqqqq",specification),"")
+
+ -- print("kunstmatig", traditional.injecthyphens(dictionaries.nl,"kunstmatig", specification),"")
+ -- print("kunststofmatig", traditional.injecthyphens(dictionaries.nl,"kunststofmatig", specification),"")
+ -- print("kunst[stof]matig", traditional.injecthyphens(dictionaries.nl,"kunst[stof]matig", specification),"")
+
+ -- traditional.loadpatterns("us","lang-us")
+
+ -- local specification = {
+ -- leftcharmin = 2,
+ -- rightcharmin = 2,
+ -- leftchar = false,
+ -- rightchar = false,
+ -- }
+
+ -- trace_steps = true
+
+ -- print("components", traditional.injecthyphens(dictionaries.us,"components", specification),"")
+ -- print("single", traditional.injecthyphens(dictionaries.us,"single", specification),"sin-gle")
+ -- print("everyday", traditional.injecthyphens(dictionaries.us,"everyday", specification),"every-day")
+ -- print("associate", traditional.injecthyphens(dictionaries.us,"associate", specification),"as-so-ciate")
+ -- print("philanthropic", traditional.injecthyphens(dictionaries.us,"philanthropic", specification),"phil-an-thropic")
+ -- print("projects", traditional.injecthyphens(dictionaries.us,"projects", specification),"projects")
+ -- print("Associate", traditional.injecthyphens(dictionaries.us,"Associate", specification),"As-so-ciate")
+ -- print("Philanthropic", traditional.injecthyphens(dictionaries.us,"Philanthropic", specification),"Phil-an-thropic")
+ -- print("Projects", traditional.injecthyphens(dictionaries.us,"Projects", specification),"Projects")
+
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-hyp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-hyp.mkxl
new file mode 100644
index 00000000000..87423d6d365
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-hyp.mkxl
@@ -0,0 +1,262 @@
+%D \module
+%D [ file=lang-ini,
+%D version=2014.08.10,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Experimental Patterns,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is an experimental module. We often have to deal with titles that have
+%D conflicting demands:
+%D
+%D \startitemize
+%D \startitem They go into a dedicated space (often a graphic). \stopitem
+%D \startitem The words cannot be hyphenated. \stopitem
+%D \startitem But as an escape they can get hyphenated. \stopitem
+%D \startitem In that case we want at least an extra word on the last line. \stopitem
+%D \stopitemize
+%D
+%D These and maybe more cases can be dealt with using dedicated hyphenation
+%D mechanisms. At he same time we want to experiment with more extensive patterns
+%D as discussed in {\em TUGboat, Volume 27 (2006), No. 2—Proceedings of EuroTEX2006}.
+
+% lua: 5.341 5.354
+% tex: 5.174 5.262
+
+\writestatus{loading}{ConTeXt Language Macros / Initialization}
+
+\registerctxluafile{lang-dis}{autosuffix}
+\registerctxluafile{lang-hyp}{autosuffix}
+
+\unprotect
+
+\definesystemattribute[hyphenation][public]
+
+%D After a decade of playing with these things in \LUATEX|/|\MKIV\ it's time to
+%D finish the way we deal with discretionaries. Apart from the fact that they play a
+%D role in hyphenation they also need to be dealt with in fonts. Flattening, cleanup
+%D and such are now more or less default in \CONTEXT\ so we can simplify some of the
+%D code. We also use the new penalty mechanism.
+
+\newcount\compoundhyphenpenalty
+
+% \ifcase\contextlmtxmode
+% \hyphenpenaltymode\plusfour
+% \automatichyphenmode\plusone
+% \fi
+
+\hyphenpenalty 50 % hyphenator
+\automatichyphenpenalty 50 % -
+\explicithyphenpenalty 50 % \-
+\compoundhyphenpenalty 50
+\exceptionpenalty 1000
+
+%D This command can change! At some point we will keep the setting with the
+%D paragraph and then the \type {\par} can go.
+
+\installcorenamespace{hyphenation}
+\installcorenamespace{hyphenationfeatures}
+
+\installparameterhandler \??hyphenation {hyphenation}
+\installsetuphandler \??hyphenation {hyphenation}
+
+\setuphyphenation
+ [\c!method=\s!default,
+ \s!righthyphenchar=0, % number tzt g: etc
+ \s!lefthyphenchar=0] % number
+
+\appendtoks
+ \clf_sethyphenationmethod{\hyphenationparameter\c!method}%
+\to \everysetuphyphenation
+
+%D These are mostly meant for manuals:
+
+\permanent\protected\def\starthyphenation[#1]%
+ {\begingroup
+ \clf_pushhyphenation{#1}}
+
+\permanent\protected\def\stophyphenation
+ {\ifhmode\par\fi
+ \clf_pophyphenation
+ \endgroup}
+
+% This is a global setting, so we need to disable it when needed. However, as
+% we are (hopefully) compatible and attribute driven one can also just keep it
+% enabled.
+%
+% \setuphyphenation
+% [\c!method=\s!traditional] % no translations
+
+\permanent\tolerant\protected\def\definehyphenationfeatures[#1]#*[#2]%
+ {\begingroup
+ \letdummyparameter\c!characters \empty % maybe \s!characters
+ \letdummyparameter\c!hyphens \empty % maybe \s!hyphens
+ \letdummyparameter\c!joiners \empty % maybe \s!joiners
+ \letdummyparameter\c!rightwords \zerocount % maybe \s!rightwords
+ \letdummyparameter\s!lefthyphenmin \zerocount
+ \letdummyparameter\s!righthyphenmin \zerocount
+ \letdummyparameter\s!hyphenmin \zerocount
+ \letdummyparameter\s!lefthyphenchar \zerocount
+ \letdummyparameter\s!righthyphenchar\zerocount
+ \letdummyparameter\c!alternative \empty
+ \letdummyparameter\c!rightedge \empty
+ \letdummyparameter\c!rightchars \empty
+ \getdummyparameters[#2]%
+ \clf_definehyphenationfeatures
+ {#1}%
+ {
+ characters {\dummyparameter\c!characters}%
+ hyphens {\dummyparameter\c!hyphens}%
+ joiners {\dummyparameter\c!joiners}%
+ rightwordmin \numexpr\dummyparameter\c!rightwords\relax
+ rightchars {\dummyparameter\c!rightchars}%
+ charmin \numexpr\dummyparameter\s!hyphenmin\relax
+ leftcharmin \numexpr\dummyparameter\s!lefthyphenmin\relax
+ rightcharmin \numexpr\dummyparameter\s!righthyphenmin\relax
+ leftchar \numexpr\dummyparameter\s!lefthyphenchar\relax
+ rightchar \numexpr\dummyparameter\s!righthyphenchar\relax
+ alternative {\dummyparameter\c!alternative}%
+ rightedge {\dummyparameter\c!rightedge}%
+ % autohyphen {\dummyparameter\c!autohyphen}
+ % hyphenonly {\dummyparameter\c!hyphenonly}
+ }%
+ \relax
+ \endgroup}
+
+\permanent\protected\def\sethyphenationfeatures[#1]%
+ {\clf_sethyphenationfeatures{#1}}
+
+\permanent\protected\def\resethyphenationfeatures
+ {\attribute\hyphenationattribute\attributeunsetvalue}
+
+\resethyphenationfeatures
+
+% todo: \start ... \stop too
+
+\permanent\tolerant\protected\def\registerhyphenationpattern[#1]#*[#2]%
+ {\clf_registerhyphenationpattern\ifparameter#2\or{#1}{#2}\else{\currentlanguage}{#1}\fi\s!true\relax}
+
+\permanent\tolerant\protected\def\unregisterhyphenationpattern[#1]#*[#2]%
+ {\clf_registerhyphenationpattern\ifparameter#2\or{#1}{#2}\else{\currentlanguage}{#1}\fi\s!false\relax}
+
+\permanent\tolerant\protected\def\registerhyphenationexception[#1]#*[#2]%
+ {\clf_registerhyphenationexception\ifparameter#2\or{#1}{#2}\else{\currentlanguage}{#1}\fi\relax}
+
+\permanent\tolerant\protected\def\showhyphenationtrace[#1]#*[#2]%
+ {\begingroup
+ \tt
+ \clf_showhyphenationtrace\ifparameter#2\or{#1}{#2}\else{\currentlanguage}{#1}\fi\relax
+ \endgroup}
+
+% For old times sake:
+
+\permanent\protected\def\atleastoneword#1%
+ {\begingroup
+ \starthyphenation[traditional]% this might become default or a faster switch
+ \sethyphenationfeatures[words]%
+ #1\par
+ \stophyphenation
+ \endgroup}
+
+%D For me:
+
+\permanent\protected\def\showdiscretionaries
+ {\clf_showdiscretionaries}
+
+%D These are (at least now) not cummulative:
+
+\definehyphenationfeatures % just an example
+ [fences]
+ [\c!characters={[]()}]
+
+\definehyphenationfeatures
+ [words]
+ [\c!rightwords=1,
+ \s!lefthyphenmin=4,
+ \s!righthyphenmin=4]
+
+\definehyphenationfeatures
+ [default]
+ [%c!rightedge=\v!tex,
+ \c!hyphens=\v!yes,
+ \c!joiners=\v!yes]
+
+\definehyphenationfeatures
+ [strict]
+ [\c!rightedge=\s!tex]
+
+% \sethyphenationfeatures
+% [fences]
+
+% \sethyphenationfeatures
+% [default,fences]
+
+% \setuphyphenation % will be default
+% [method=expanded]
+
+\protect \endinput
+
+% \starttext
+%
+% \enabledirectives[hyphenators.method=traditional]
+%
+% % \dorecurse{1000}{\input tufte \par}
+%
+% \setupalign[verytolerant,flushleft]
+% \setuplayout[width=140pt] \showframe
+%
+% longword longword long word longword longwordword \blank
+%
+% \enabledirectives[hyphenators.rightwordsmin=1]
+%
+% longword longword long word longword longwordword\blank
+%
+% \disabledirectives[hyphenators.rightwordsmin]
+%
+% longword longword long word longword longwordword\blank
+%
+% \atleastoneword{longword longword long word longword longwordword}
+%
+% \enabledirectives[hyphenators.method=traditional]
+%
+% \stoptext
+
+% \startluacode
+% -- e1ë/e=e reëel re-eel
+% -- a1atje./a=t,1,3 omaatje oma-tje
+% -- schif1f/ff=f,5,2 Schiffahrt Schiff-fahrt
+%
+% languages.hyphenators.traditional.registerpattern("en","a1b", { start = 1, length = 2, before = "CD", after = "EF" } )
+% languages.hyphenators.traditional.registerpattern("en","e1ë", { start = 1, length = 2, before = "e", after = "e" } )
+% languages.hyphenators.traditional.registerpattern("en","oo1ë", { start = 2, length = 2, before = "o", after = "e" } )
+% languages.hyphenators.traditional.registerpattern("en","qqxc9xkqq",{ start = 3, length = 4, before = "ab", after = "cd" } ) -- replacement start length
+%
+% -- print("reëel", injecthyphens(dictionaries.nl,"reëel", 2,2))
+% -- print("reeëel", injecthyphens(dictionaries.nl,"reeëel", 2,2))
+% -- print("rooëel", injecthyphens(dictionaries.nl,"rooëel", 2,2))
+% -- print( "QXcXkQ", injecthyphens(dictionaries.de, "QXcXkQ", 2,2))
+% -- print( "QQXcXkQQ", injecthyphens(dictionaries.de, "QQXcXkQQ", 2,2))
+% -- print( "QQQXcXkQQQ", injecthyphens(dictionaries.de, "QQQXcXkQQQ", 2,2))
+% -- print("QQQQXcXkQQQQ",injecthyphens(dictionaries.de,"QQQQXcXkQQQQ",2,2))
+% --
+% -- print( "QQXcXkQQ QQXcXkQQ", injecthyphens(dictionaries.de, "QQXcXkQQ QQXcXkQQ", 2,2))
+% \stopluacode
+%
+% \starttext
+%
+% \blank
+%
+% xreëel rooëel \par xxabxx xxxabxxx \par
+%
+% \hsize1mm \lefthyphenmin2 \righthyphenmin2
+%
+% \blank Capacity \blank capacity \blank xyabxy \blank xreëel \blank rooëel \blank
+%
+% xy\discretionary{CD}{EF}{ab}xy % xxacceedxxx
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/lang-ini.lmt
new file mode 100644
index 00000000000..5f2dd1a55d3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-ini.lmt
@@ -0,0 +1,670 @@
+if not modules then modules = { } end modules ['lang-ini'] = {
+ version = 1.001,
+ comment = "companion to lang-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- needs a cleanup (share locals)
+-- discard language when redefined
+
+-- 002D : hyphen-minus (ascii)
+-- 2010 : hyphen
+-- 2011 : nonbreakable hyphen
+-- 2013 : endash (compound hyphen)
+
+--~ language:hyphenation(string) string = language:hyphenation() language:clear_hyphenation()
+
+-- todo: no foo:bar but foo(bar,...)
+
+local type, tonumber, next = type, tonumber, next
+local utfbyte = utf.byte
+local format, gsub, gmatch, find = string.format, string.gsub, string.gmatch, string.find
+local concat, sortedkeys, sortedpairs, keys, insert = table.concat, table.sortedkeys, table.sortedpairs, table.keys, table.insert
+local utfvalues, strip, utfcharacters = string.utfvalues, string.strip, utf.characters
+
+local context = context
+local commands = commands
+local implement = interfaces.implement
+
+local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_set = utilities.parsers.settings_to_set
+
+local trace_patterns = false trackers.register("languages.patterns", function(v) trace_patterns = v end)
+
+local report_initialization = logs.reporter("languages","initialization")
+
+local prehyphenchar = language.prehyphenchar -- global per language
+local posthyphenchar = language.posthyphenchar -- global per language
+local preexhyphenchar = language.preexhyphenchar -- global per language
+local postexhyphenchar = language.postexhyphenchar -- global per language
+----- lefthyphenmin = language.lefthyphenmin
+----- righthyphenmin = language.righthyphenmin
+local sethjcode = language.sethjcode
+local currentlanguage = language.current -- or function() return tex.normallanguage or tex.language end
+
+local uccodes = characters.uccodes
+local lccodes = characters.lccodes
+
+local new_language = language.new
+
+languages = languages or {}
+local languages = languages
+
+languages.version = 1.010
+
+languages.registered = languages.registered or { }
+local registered = languages.registered
+
+languages.associated = languages.associated or { }
+local associated = languages.associated
+
+languages.numbers = languages.numbers or { }
+local numbers = languages.numbers
+
+languages.data = languages.data or { }
+local data = languages.data
+
+storage.register("languages/registered",registered,"languages.registered")
+storage.register("languages/associated",associated,"languages.associated")
+storage.register("languages/numbers", numbers, "languages.numbers")
+storage.register("languages/data", data, "languages.data")
+
+local variables = interfaces.variables
+
+local v_reset = variables.reset
+local v_yes = variables.yes
+
+local nofloaded = 0
+
+local function resolve(tag)
+ local data, instance = registered[tag], nil
+ if data then
+ instance = data.instance
+ if not instance then
+ instance = new_language(data.number)
+ data.instance = instance
+ end
+ end
+ return data, instance
+end
+
+local function tolang(what) -- returns lang object
+ if not what then
+ what = currentlanguage()
+ end
+ local tag = numbers[what]
+ local data = tag and registered[tag] or registered[what]
+ if data then
+ local instance = data.instance -- .lang -- was this ok ?
+ if not instance then
+ instance = new_language(data.number)
+ data.instance = instance
+ end
+ return instance
+ end
+end
+
+function languages.getdata(tag) -- or number
+ if tag then
+ return registered[tag] or registered[numbers[tag]]
+ else
+ return registered[numbers[currentlanguage()]]
+ end
+end
+
+-- languages.tolang = tolang
+
+-- patterns=en
+-- patterns=en,de
+
+local function validdata(loaded,what,tag)
+ local dataset = loaded[what]
+ if dataset then
+ local data = dataset.data
+ if not data or data == "" then
+ -- nothing
+ elseif dataset.compression == "zlib" then
+ data = zlib.decompress(data)
+ if dataset.length and dataset.length ~= #data then
+ report_initialization("compression error in %a for language %a","patterns",what,tag)
+ end
+ return data
+ else
+ return data
+ end
+ end
+end
+
+-- languages.hjcounts[unicode].count
+
+-- hjcode: 0 not to be hyphenated
+-- 1--31 length
+-- 32 zero length
+-- > 32 hyphenated with length 1
+
+local function sethjcodes(instance,loaded,what,factor)
+ local l = loaded[what]
+ local c = l and l.characters
+ if c then
+ local hjcounts = factor and languages.hjcounts or false
+ --
+ local h = loaded.codehash
+ if not h then
+ h = { }
+ loaded.codehash = h
+ end
+ --
+ local function setcode(l)
+ local u = uccodes[l]
+ local s = l
+ if hjcounts then
+ local c = hjcounts[l]
+ if c then
+ c = c.count
+ if not c then
+ -- error, keep as 1
+ elseif c <= 0 then
+ -- counts as 0 i.e. ignored
+ s = 32
+ elseif c >= 31 then
+ -- counts as 31
+ s = 31
+ else
+ -- count c times
+ s = c
+ end
+ end
+ end
+ sethjcode(instance,l,s)
+ h[l] = s
+ if u ~= l and type(u) == "number" then
+ sethjcode(instance,u,s)
+ h[u] = lccodes[l]
+ end
+ end
+ --
+ local s = tex.savinghyphcodes
+ tex.savinghyphcodes = 0
+ if type(c) == "table" then
+ for l in next, c do
+ setcode(utfbyte(l))
+ end
+ else
+ for l in utfvalues(c) do
+ setcode(l)
+ end
+ end
+ tex.savinghyphcodes = s
+ end
+end
+
+-- 2'2 conflicts with 4' ... and luatex barks on it
+
+local P, R, Cs, Ct, lpegmatch, lpegpatterns = lpeg.P, lpeg.R, lpeg.Cs, lpeg.Ct, lpeg.match, lpeg.patterns
+
+local utfsplit = utf.split
+
+local space = lpegpatterns.space
+local whitespace = lpegpatterns.whitespace^1
+local nospace = lpegpatterns.utf8char - whitespace
+local digit = lpegpatterns.digit
+----- endofstring = #whitespace + P(-1)
+local endofstring = #whitespace
+
+local word = (digit/"")^0 * (digit/"" * endofstring + digit/" " + nospace)^1
+local anyword = (1-whitespace)^1
+local analyze = Ct((whitespace + Cs(word))^1)
+
+local function unique(tag,requested,loaded)
+ local nofloaded = #loaded
+ if nofloaded == 0 then
+ return ""
+ elseif nofloaded == 1 then
+ return loaded[1]
+ else
+ insert(loaded,1," ") -- no need then for special first word
+ -- insert(loaded, " ")
+ loaded = concat(loaded," ")
+ local t = lpegmatch(analyze,loaded) or { }
+ local h = { }
+ local b = { }
+ for i=1,#t do
+ local ti = t[i]
+ local hi = h[ti]
+ if not hi then
+ h[ti] = 1
+ elseif hi == 1 then
+ h[ti] = 2
+ b[#b+1] = utfsplit(ti," ")
+ end
+ end
+ -- sort
+ local nofbad = #b
+ if nofbad > 0 then
+ local word
+ for i=1,nofbad do
+ local bi = b[i]
+ local p = P(bi[1])
+ for i=2,#bi do
+ p = p * digit * P(bi[i])
+ end
+ if word then
+ word = word + p
+ else
+ word = p
+ end
+ report_initialization("language %a, patterns %a, discarding conflict (0-9)%{[0-9]}t(0-9)",tag,requested,bi)
+ end
+ t, h, b = nil, nil, nil -- permit gc
+ local someword = digit^0 * word * digit^0 * endofstring / ""
+ -- local strip = Cs(someword^-1 * (someword + anyword + whitespace)^1)
+ local strip = Cs((someword + anyword + whitespace)^1)
+ return lpegmatch(strip,loaded) or loaded
+ else
+ return loaded
+ end
+ end
+end
+
+local shared = false
+
+local function loaddefinitions(tag,specification)
+ statistics.starttiming(languages)
+ local data, instance = resolve(tag)
+ local requested = specification.patterns or ""
+ local definitions = settings_to_array(requested)
+ if #definitions > 0 then
+ if trace_patterns then
+ report_initialization("pattern specification for language %a: %s",tag,specification.patterns)
+ end
+ local ploaded = instance:patterns()
+ local eloaded = instance:hyphenation()
+ if not ploaded or ploaded == "" then
+ ploaded = { }
+ else
+ ploaded = { ploaded }
+ end
+ if not eloaded or eloaded == "" then
+ eloaded = { }
+ else
+ eloaded = { eloaded }
+ end
+ local dataused = data.used
+ local ok = false
+ local resources = data.resources or { }
+ data.resources = resources
+ if not shared then
+ local found = resolvers.findfile("lang-exc.lua")
+ if found then
+ shared = dofile(found)
+ if type(shared) == "table" then
+ shared = concat(shared," ")
+ else
+ shared = true
+ end
+ else
+ shared = true
+ end
+ end
+ for i=1,#definitions do
+ local definition = definitions[i]
+ if definition == "" then
+ -- error
+ elseif definition == v_reset then
+ if trace_patterns then
+ report_initialization("clearing patterns for language %a",tag)
+ end
+ instance:clear_patterns()
+ instance:clear_hyphenation()
+ ploaded = { }
+ eloaded = { }
+ elseif not dataused[definition] then
+ dataused[definition] = definition
+ local filename = "lang-" .. definition .. ".lua"
+ local fullname = resolvers.findfile(filename) or ""
+ if fullname == "" then
+ fullname = resolvers.findfile(filename .. ".gz") or ""
+ end
+ if fullname ~= "" then
+ if trace_patterns then
+ report_initialization("loading definition %a for language %a from %a",definition,tag,fullname)
+ end
+ local suffix, gzipped = gzip.suffix(fullname)
+ local loaded = table.load(fullname,gzipped and gzip.load)
+ if loaded then -- todo: version test
+ ok, nofloaded = true, nofloaded + 1
+ sethjcodes(instance,loaded,"patterns",specification.factor)
+ sethjcodes(instance,loaded,"exceptions",specification.factor)
+ local p = validdata(loaded,"patterns",tag)
+ local e = validdata(loaded,"exceptions",tag)
+ if p and p ~= "" then
+ ploaded[#ploaded+1] = p
+ end
+ if e and e ~= "" then
+ eloaded[#eloaded+1] = e
+ end
+ resources[#resources+1] = loaded -- so we can use them otherwise
+ else
+ report_initialization("invalid definition %a for language %a in %a",definition,tag,filename)
+ end
+ elseif trace_patterns then
+ report_initialization("invalid definition %a for language %a in %a",definition,tag,filename)
+ end
+ elseif trace_patterns then
+ report_initialization("definition %a for language %a already loaded",definition,tag)
+ end
+ end
+ if #ploaded > 0 then
+ -- why not always clear
+ instance:clear_patterns()
+ instance:patterns(unique(tag,requested,ploaded))
+ end
+ if #eloaded > 0 then
+ -- why not always clear
+ instance:clear_hyphenation()
+ instance:hyphenation(concat(eloaded," "))
+ end
+ if type(shared) == "string" then
+ instance:hyphenation(shared)
+ end
+ return ok
+ elseif trace_patterns then
+ report_initialization("no definitions for language %a",tag)
+ end
+ statistics.stoptiming(languages)
+end
+
+storage.shared.noflanguages = storage.shared.noflanguages or 0
+
+local noflanguages = storage.shared.noflanguages
+
+function languages.define(tag,parent)
+ noflanguages = noflanguages + 1
+ if trace_patterns then
+ report_initialization("assigning number %a to %a",noflanguages,tag)
+ end
+ numbers[noflanguages] = tag
+ registered[tag] = {
+ tag = tag,
+ parent = parent or "",
+ patterns = "",
+ loaded = false,
+ used = { },
+ dirty = true,
+ number = noflanguages,
+ instance = nil, -- luatex data structure
+ synonyms = { },
+ }
+ storage.shared.noflanguages = noflanguages
+end
+
+function languages.setsynonym(synonym,tag) -- convenience function
+ local l = registered[tag]
+ if l then
+ l.synonyms[synonym] = true -- maybe some day more info
+ end
+end
+
+function languages.installed(separator)
+ return concat(sortedkeys(registered),separator or ",")
+end
+
+function languages.current(n)
+ return numbers[n and tonumber(n) or currentlanguage()]
+end
+
+function languages.associate(tag,script,language) -- not yet used
+ associated[tag] = { script, language }
+end
+
+function languages.association(tag) -- not yet used
+ if not tag then
+ tag = numbers[currentlanguage()]
+ elseif type(tag) == "number" then
+ tag = numbers[tag]
+ end
+ local lat = tag and associated[tag]
+ if lat then
+ return lat[1], lat[2]
+ end
+end
+
+function languages.loadable(tag,defaultlanguage) -- hack
+ local l = registered[tag] -- no synonyms
+ if l and resolvers.findfile("lang-"..l.patterns..".lua") then
+ return true
+ else
+ return false
+ end
+end
+
+-- a bit messy, we will do all language setting in lua as we can now assign
+-- and 'patterns' will go away here.
+
+function languages.unload(tag)
+ local l = registered[tag]
+ if l then
+ l.dirty = true
+ end
+end
+
+if environment.initex then
+
+ function languages.getnumber()
+ return 0
+ end
+
+else
+
+ function languages.getnumber(tag,default,patterns,factor)
+ local l = registered[tag]
+ if l then
+ if l.dirty then
+ l.factor = factor == v_yes and true or false
+ if trace_patterns then
+ report_initialization("checking patterns for %a with default %a",tag,default)
+ end
+ -- patterns is already resolved to parent patterns if applicable
+ if patterns and patterns ~= "" then
+ if l.patterns ~= patterns then
+ l.patterns = patterns
+ if trace_patterns then
+ report_initialization("loading patterns for %a using specification %a",tag,patterns)
+ end
+ loaddefinitions(tag,l)
+ else
+ -- unchanged
+ end
+ elseif l.patterns == "" then
+ l.patterns = tag
+ if trace_patterns then
+ report_initialization("loading patterns for %a using tag",tag)
+ end
+ local ok = loaddefinitions(tag,l)
+ if not ok and tag ~= default then
+ l.patterns = default
+ if trace_patterns then
+ report_initialization("loading patterns for %a using default",tag)
+ end
+ loaddefinitions(tag,l)
+ end
+ end
+ l.loaded = true
+ l.dirty = false
+ end
+ return l.number
+ else
+ return 0
+ end
+ end
+
+ numbers[0] = "null"
+
+ registered.null = {
+ number = 0,
+ instance = new_language(0),
+ }
+
+end
+
+-- not that usefull, global values
+
+function languages.prehyphenchar (what) return prehyphenchar (tolang(what)) end
+function languages.posthyphenchar (what) return posthyphenchar (tolang(what)) end
+function languages.preexhyphenchar (what) return preexhyphenchar (tolang(what)) end
+function languages.postexhyphenchar(what) return postexhyphenchar(tolang(what)) end
+-------- languages.lefthyphenmin (what) return lefthyphenmin (tolang(what)) end
+-------- languages.righthyphenmin (what) return righthyphenmin (tolang(what)) end
+
+-- e['implementer']= 'imple{m}{-}{-}menter'
+-- e['manual'] = 'man{}{}{}'
+-- e['as'] = 'a-s'
+-- e['user-friendly'] = 'user=friend-ly'
+-- e['exceptionally-friendly'] = 'excep-tionally=friend-ly'
+
+local invalid = { "{", "}", "-" }
+
+local function collecthjcodes(data,str)
+ local found = data.extras and data.extras.characters or { }
+ for s in utfcharacters(str) do
+ if not found[s] then
+ found[s] = true
+ end
+ end
+ for i=1,#invalid do -- less checks this way
+ local c = invalid[i]
+ if found[c] then
+ found[c] = nil
+ end
+ end
+ data.extras = { characters = found }
+ sethjcodes(data.instance,data,"extras",data.factor)
+end
+
+function languages.loadwords(tag,filename)
+ local data, instance = resolve(tag)
+ if data then
+ statistics.starttiming(languages)
+ local str = io.loaddata(filename) or ""
+ collecthjcodes(data,str)
+ instance:hyphenation(str)
+ statistics.stoptiming(languages)
+ end
+end
+
+
+function languages.setexceptions(tag,str)
+ local data, instance = resolve(tag)
+ if data then
+ str = strip(str) -- we need to strip leading spaces
+ collecthjcodes(data,str)
+ instance:hyphenation(str)
+ end
+end
+
+function languages.hyphenate(tag,str)
+ -- todo: does this still work?
+ local data, instance = resolve(tag)
+ if data then
+ return instance:hyphenate(str)
+ else
+ return str
+ end
+end
+
+-- hyphenation.define ("zerolanguage")
+-- hyphenation.loadpatterns ("zerolanguage") -- else bug
+-- hyphenation.loadexceptions("zerolanguage") -- else bug
+
+languages.logger = languages.logger or { }
+
+function languages.logger.report()
+ local result, r = { }, 0
+ for tag, l in sortedpairs(registered) do
+ if l.loaded then
+ r = r + 1
+ result[r] = format("%s:%s:%s",tag,l.parent,l.number)
+ end
+ end
+ return r > 0 and concat(result," ") or "none"
+end
+
+-- must happen at the tex end .. will use lang-def.lua
+
+languages.associate('en','latn','eng')
+languages.associate('uk','latn','eng')
+languages.associate('nl','latn','nld')
+languages.associate('de','latn','deu')
+languages.associate('fr','latn','fra')
+
+statistics.register("loaded patterns", function()
+ local result = languages.logger.report()
+ if result ~= "none" then
+ -- return result
+ return format("%s, load time: %s",result,statistics.elapsedtime(languages))
+ end
+end)
+
+-- statistics.register("language load time", function()
+-- -- often zero so we can merge that in the above
+-- return statistics.elapsedseconds(languages, format(", nofpatterns: %s",nofloaded))
+-- end)
+
+-- interface
+
+implement {
+ name = "languagenumber",
+ actions = { languages.getnumber, context },
+ arguments = "4 strings"
+}
+
+implement {
+ name = "installedlanguages",
+ actions = { languages.installed, context },
+}
+
+implement {
+ name = "definelanguage",
+ actions = languages.define,
+ arguments = "2 strings"
+}
+
+implement {
+ name = "setlanguagesynonym",
+ actions = languages.setsynonym,
+ arguments = "2 strings"
+}
+
+implement {
+ name = "unloadlanguage",
+ actions = languages.unload,
+ arguments = "string"
+}
+
+implement {
+ name = "setlanguageexceptions",
+ actions = languages.setexceptions,
+ arguments = "2 strings"
+}
+
+implement {
+ name = "currentprehyphenchar",
+ actions = function()
+ local c = prehyphenchar(tolang())
+ if c and c > 0 then
+ context.char(c)
+ end
+ end
+}
+
+implement {
+ name = "currentposthyphenchar",
+ actions = function()
+ local c = posthyphenchar(tolang())
+ if c and c > 0 then
+ context.char(c)
+ end
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-ini.mkxl
index 8bcba01d8d0..5df975c661f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-ini.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-ini.mkxl
@@ -11,8 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D This module needs a further cleanup (real split between ii/iv).
-
% \cldcontext{languages.numbers[tex.count.mainlanguagenumber]}
%D This module implements multi||language support of \CONTEXT, which should not be
@@ -22,7 +20,7 @@
\writestatus{loading}{ConTeXt Language Macros / Initialization}
-\registerctxluafile{lang-ini}{}
+\registerctxluafile{lang-ini}{autosuffix}
\registerctxluafile{lang-def}{}
\registerctxluafile{lang-cnt}{}
@@ -41,7 +39,7 @@
%D zero has no patterns, first of all because I like to start numbering at one. It
%D may come in handy for special purposes as well.
-\normallanguage\zerocount \def\loadedlanguage{1}
+\normallanguage\zerocount
%D \macros
%D {currentlanguage, setupcurrentlanguage}
@@ -60,8 +58,9 @@
%D \startmode[*nl] dutch \stopmode}
%D \stoptyping
-\let\currentlanguage \empty
-\let\currentmainlanguage\empty
+\mutable\let\askedlanguage \empty
+\mutable\let\currentlanguage \empty
+\mutable\let\currentmainlanguage\empty
%D \macros
%D {defaultlanguage,languageparameter,specificlanguageparameter}
@@ -72,16 +71,16 @@
\installcorenamespace{language}
\installcorenamespace{languagelinked}
-\def\currentusedlanguage{\currentlanguage}
+\mutable\def\currentusedlanguage{\currentlanguage}
-\def\defaultlanguage#1%
+\permanent\def\defaultlanguage#1%
{\ifcsname\??language#1\s!default\endcsname
\expandafter\defaultlanguage\lastnamedcs
\else
#1%
\fi}
-\def\languageparameter#1%
+\permanent\def\languageparameter#1%
{\ifcsname\??language\currentlanguage#1\endcsname
\lastnamedcs
\orelse\ifcsname\??language\currentlanguage\s!default\endcsname
@@ -90,7 +89,7 @@
\lastnamedcs
\fi}
-\def\specificlanguageparameter#1#2%
+\permanent\def\specificlanguageparameter#1#2%
{\ifcsname\??language#1#2\endcsname
\lastnamedcs
\orelse\ifcsname\??language#1\s!default\endcsname
@@ -99,7 +98,7 @@
\lastnamedcs
\fi}
-\def\mainlanguageparameter#1%
+\permanent\def\mainlanguageparameter#1%
{\ifcsname\??language\currentmainlanguage#1\endcsname
\lastnamedcs
\orelse\ifcsname\??language\currentmainlanguage\s!default\endcsname
@@ -108,9 +107,9 @@
\lastnamedcs
\fi}
-\let\usedlanguageparameter\languageparameter
+\aliased\let\usedlanguageparameter\languageparameter
-\def\askedlanguageparameter#1% assumes \currentusedlanguage being set
+\permanent\def\askedlanguageparameter#1% assumes \currentusedlanguage being set
{\ifcsname\??language\currentusedlanguage#1\endcsname
\lastnamedcs
\orelse\ifcsname\??language\currentusedlanguage\s!default\endcsname
@@ -119,35 +118,35 @@
\lastnamedcs
\fi}
-\unexpanded\def\setusedlanguage#1%
+\permanent\protected\def\setusedlanguage#1%
{\edef\currentusedlanguage{\reallanguagetag{#1}}%
- \ifx\currentusedlanguage\empty
+ \ifempty\currentusedlanguage
\let\currentusedlanguage \currentlanguage
- \let\usedlanguageparameter\languageparameter
+ \enforced\let\usedlanguageparameter\languageparameter
\orelse\ifx\currentusedlanguage\v!global
\let\currentusedlanguage \currentmainlanguage
- \let\usedlanguageparameter\mainlanguageparameter
+ \enforced\let\usedlanguageparameter\mainlanguageparameter
\orelse\ifx\currentusedlanguage\v!local
\let\currentusedlanguage \currentlanguage
- \let\usedlanguageparameter\languageparameter
+ \enforced\let\usedlanguageparameter\languageparameter
\else
- \let\usedlanguageparameter\askedlanguageparameter
+ \enforced\let\usedlanguageparameter\askedlanguageparameter
\fi}
-\unexpanded\def\setupcurrentlanguage[#1]%
+\permanent\protected\def\setupcurrentlanguage[#1]%
{\setcurrentlanguage\currentmainlanguage{#1}}
-\unexpanded\def\setcurrentlanguage#1#2% sets modes: **id (currentmain) *id (current)
- {\edef\xaskedlanguage{#1}% otherwise clash with \askedlanguage
- \ifx\xaskedlanguage\empty \else
- \ifx\currentmainlanguage\empty\else\resetsystemmode{\systemmodeprefix\currentmainlanguage}\fi
- \let\currentmainlanguage\xaskedlanguage
+\permanent\protected\def\setcurrentlanguage#1#2% sets modes: **id (currentmain) *id (current)
+ {\edef\p_askedlanguage{#1}% otherwise clash with \askedlanguage
+ \ifempty\p_askedlanguage \else
+ \ifempty\currentmainlanguage\else\resetsystemmode{\systemmodeprefix\currentmainlanguage}\fi
+ \let\currentmainlanguage\p_askedlanguage
\setsystemmode{\systemmodeprefix\currentmainlanguage}%
\fi
- \edef\xaskedlanguage{#2}%
- \ifx\xaskedlanguage\empty \else
- \ifx\currentlanguage\empty\else\resetsystemmode\currentlanguage\fi
- \let\currentlanguage\xaskedlanguage
+ \edef\p_askedlanguage{#2}%
+ \ifempty\p_askedlanguage \else
+ \ifempty\currentlanguage\else\resetsystemmode\currentlanguage\fi
+ \let\currentlanguage\p_askedlanguage
\setsystemmode\currentlanguage
\fi}
@@ -176,63 +175,50 @@
\newtoks \everysetuplanguage
-\def\installedlanguages{\clf_installedlanguages}
+\aliased\let\installedlanguages\clf_installedlanguages % no need for \clf_
-\unexpanded\def\doifelselanguage#1%
+\permanent\protected\def\doifelselanguage#1%
{\ifcsname\??language#1\c!state\endcsname
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\doiflanguageelse\doifelselanguage
+\aliased\let\doiflanguageelse\doifelselanguage
-\def\reallanguagetag#1%
+\permanent\def\reallanguagetag#1%
{\ifcsname\??languagelinked#1\endcsname\lastnamedcs\else#1\fi}
% \language[#1] gave unwanted side effect of loading language specifics
-\unexpanded\def\installlanguage
- {\dodoubleargument\lang_basics_install}
-
-% \def\lang_basics_install[#1][#2]%
-% {\doifelseassignment{#2}
-% {\doifelselanguage{#1}
-% {\getparameters[\??language#1][#2]}
-% {\setvalue{\??languagelinked#1}{#1}%
-% \lang_basics_install_indeed{#1}{#1}%
-% \getparameters[\??language#1][\c!state=\v!start,#2]}%
-% \edef\currentsetuplanguage{#1}%
-% \clf_definelanguage{#1}{\specificlanguageparameter{#1}\s!default}%
-% \the\everysetuplanguage}
-% {\setvalue{\??languagelinked#1}{#2}%
-% \clf_setlanguagesynonym{#1}{#2}%
-% \lang_basics_install_indeed{#1}{#2}}}
-
-\def\lang_basics_install[#1][#2]%
+\mutable\let\currentsetuplanguage\empty
+
+\permanent\tolerant\protected\def\installlanguage[#1]#*[#2]%
{\ifcondition\validassignment{#2}%
\doifelselanguage{#1}
{\getparameters[\??language#1][#2]}
- {\setvalue{\??languagelinked#1}{#1}%
- \lang_basics_install_indeed{#1}{#1}%
- \getparameters[\??language#1][\c!state=\v!start,#2]}%
+ {\defcsname\??languagelinked#1\endcsname{#1}%
+ \getparameters[\??language#1][\c!state=\v!start,#2]%
+ \lang_basics_install_indeed{#1}{#1}}%
\edef\currentsetuplanguage{#1}%
\clf_definelanguage{#1}{\specificlanguageparameter{#1}\s!default}%
\the\everysetuplanguage
\else
- \setvalue{\??languagelinked#1}{#2}%
+ \defcsname\??languagelinked#1\endcsname{#2}%
\clf_setlanguagesynonym{#1}{#2}%
\lang_basics_install_indeed{#1}{#2}%
\fi}
\def\lang_basics_install_indeed#1#2%
- {\ifcsname#1\endcsname\else\setuvalue{#1}{\lang_basics_set_current[#2]}\fi}
+ {\ifcstok{\specificlanguageparameter{#1}\c!command}\v!no\orelse\ifcsname#1\endcsname\else
+ \frozen\instance\protected\defcsname#1\endcsname{\lang_basics_set_current[#2]}%
+ \fi}
%D When the second argument is a language identifier, a synonym is created. This
%D feature is present because we used dutch mnemonics in the dutch version, but
%D nowadays conform a standard.
-\unexpanded\def\doifelsepatterns#1%
+\permanent\protected\def\doifelsepatterns#1%
{\begingroup % will change
\lang_basics_set_current[#1]%
\ifnum\normallanguage>\zerocount
@@ -241,7 +227,7 @@
\endgroup\expandafter\secondoftwoarguments
\fi}
-\let\doifpatternselse\doifelsepatterns
+\aliased\let\doifpatternselse\doifelsepatterns
%D \macros
%D {setuplanguage}
@@ -252,27 +238,26 @@
%D
%D Beware, this command can only be used when a language is installed.
-\unexpanded\def\setuplanguage
- {\dodoubleempty\lang_basics_setup}
-
\ifdefined\lang_basics_synchronize \else
\let\lang_basics_synchronize\relax % be nice for setups till we have one
\fi
\installmacrostack\currentlanguage
-\def\lang_basics_setup[#1][#2]%
- {\ifsecondargument
+\permanent\tolerant\protected\def\setuplanguage[#1]#*[#2]%
+ {\ifarguments
+ % only synchronize
+ \or
+ \let\currentsetuplanguage\currentlanguage
+ \getparameters[\??language\currentsetuplanguage][#1]%
+ \the\everysetuplanguage
+ \or
\push_macro_currentlanguage % can be default
\edef\currentsetuplanguage{\reallanguagetag{#1}}%
\getparameters[\??language\currentsetuplanguage][#2]%
\the\everysetuplanguage
\pop_macro_currentlanguage
%\doif\currentsetuplanguage\currentlanguage we can have influenced inheritance (default)
- \else
- \let\currentsetuplanguage\currentlanguage
- \getparameters[\??language\currentsetuplanguage][#1]%
- \the\everysetuplanguage
\fi
\lang_basics_synchronize}
@@ -311,7 +296,7 @@
\c!time={h,:,m},
\c!date={\v!year,\ ,\v!month,\ ,\v!day},
\c!text=Ag,
- \s!font=] % \v!auto : experimental !
+ \c!font=] % \v!auto : experimental !
% to be tested:
%
@@ -330,8 +315,8 @@
%D
%D Just to make things easy we can ask for the current date specification by saying:
-\def\currentdatespecification{\languageparameter\c!date}
-\def\currenttimespecification{\languageparameter\c!time}
+\permanent\def\currentdatespecification{\languageparameter\c!date}
+\permanent\def\currenttimespecification{\languageparameter\c!time}
%D Carefull reading of these macros shows that it's legal to say
%D
@@ -374,7 +359,7 @@
\appendtoks
% we need to reassign the number because new patterns can be defined later on
% so let's hope not that many \setups happen during a run
- \expandafter\glet\csname\??languagenumbers\currentlanguage\endcsname\undefined
+ \gletcsname\??languagenumbers\currentlanguage\endcsname\undefined
\to \everysetuplanguage
\def\lang_basics_synchronize_yes
@@ -409,28 +394,69 @@
\newcount\hyphenstate
\newcount\hyphenminoffset
-\unexpanded\def\lesshyphens
+% This is the old implementation: a hack that sets the min values, because we want
+% to keep the language set:
+%
+% \protected\def\nohyphens % nicer for url's
+% {\ifrelax\dohyphens
+% \protected\edef\dohyphens
+% {\hyphenminoffset\the\hyphenminoffset\relax
+% \lang_basics_synchronize_min_max}%
+% \fi
+% \hyphenminoffset\plusthousand
+% \lang_basics_synchronize_min_max}
+%
+% \let\dohyphens\relax
+
+% But this one is nicer because we do keep the language set as well as don't mess
+% with the min values (it's more efficient too). We might get some more bits in
+% this mode (engine specific).
+
+\exhyphenchar 45 % to permit breaking at explicit hyphens
+
+% \uchyph\plusone :
+
+% \chardef \completehyphenationmodecode \numexpr
+\permanent \integerdef \completehyphenationmodecode \numexpr
+ \normalhyphenationmodecode % \discretionary
+ + \automatichyphenationmodecode % -
+ + \explicithyphenationmodecode % \-
+ + \syllablehyphenationmodecode % pattern driven
+ + \uppercasehyphenationmodecode % replaces \uchyph
+ + \compoundhyphenationmodecode % replaces \compoundhyphenmode
+ % \strictstarthyphenationmodecode % replaces \hyphenationbounds (strict = original tex)
+ % \strictendhyphenationmodecode % replaces \hyphenationbounds (strict = original tex)
+ + \automaticpenaltyhyphenationmodecode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
+ + \explicitpenaltyhyphenationmodecode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
+ + \permitgluehyphenationmodecode % turn glue into kern in \discretionary
+ + \permitallhyphenationmodecode % okay, let's be even more tolerant
+ + \permitmathreplacehyphenationmodecode % and again we're more permissive
+\relax
+
+\permanent\protected\def\dohyphens{\hyphenationmode\completehyphenationmodecode}
+\permanent\protected\def\nohyphens{\hyphenationmode\zerocount}
+
+\permanent\protected\def\usehyphensparameter#1%
+ {\edef\p_hyphens{#1\c!hyphens}%
+ \ifx\p_hyhens\v!no
+ \nohyphens
+ \fi}
+
+\dohyphens
+
+%D The rest stays the same as in mkiv:
+
+\permanent\protected\def\lesshyphens
{\advance\hyphenminoffset\plusone
\lang_basics_synchronize_min_max}
-\unexpanded\def\morehyphens
+\permanent\protected\def\morehyphens
{\ifcase\hyphenminoffset \else
\advance\hyphenminoffset\minusone
\fi
\lang_basics_synchronize_min_max}
-\unexpanded\def\nohyphens % nicer for url's
- {\ifx\dohyphens\relax
- \unexpanded\edef\dohyphens
- {\hyphenminoffset\the\hyphenminoffset\relax
- \lang_basics_synchronize_min_max}%
- \fi
- \hyphenminoffset\plusthousand
- \lang_basics_synchronize_min_max}
-
-\let\dohyphens\relax
-
-\unexpanded\def\lang_basics_synchronize_min_max % maybe store this at the lua end
+\protected\def\lang_basics_synchronize_min_max % maybe store this at the lua end
{% these values are stored along with glyph nodes
\lefthyphenmin \numexpr0\languageparameter\s!lefthyphenmin +\hyphenminoffset\relax
\righthyphenmin\numexpr0\languageparameter\s!righthyphenmin+\hyphenminoffset\relax
@@ -443,7 +469,7 @@
\lang_basics_synchronize_min_max
\to \everylanguage
-\unexpanded\def\unhyphenated
+\permanent\protected\def\unhyphenated
{\groupedcommand{\lefthyphenmin\maxdimen}\donothing}
% \appendtoks
@@ -452,9 +478,11 @@
%D You can setup the default language to reset settings.
+\mutable\let\currentlanguagesetups\empty
+
\appendtoks
\edef\currentlanguagesetups{\languageparameter\c!setups}%
- \ifx\currentlanguagesetups\empty \else
+ \ifempty\currentlanguagesetups \else
\setups[\currentlanguagesetups]%
\fi
\to \everylanguage
@@ -483,16 +511,16 @@
% new experimental feature
-\unexpanded\def\setuplanguages
+\permanent\protected\def\setuplanguages
{\setuplanguage[\s!default]}
-% \setuplanguages[\s!font=\v!auto]
-% \setuplanguage[\s!default][\s!font=\v!auto]
-% \setuplanguage[nl][\s!font=\v!auto]
+% \setuplanguages[\c!font=\v!auto]
+% \setuplanguage[\s!default][\c!font=\v!auto]
+% \setuplanguage[nl][\c!font=\v!auto]
\appendtoks
- \edef\p_language_font{\languageparameter\s!font}%
- \ifx\p_language_font\empty
+ \edef\p_language_font{\languageparameter\c!font}%
+ \ifempty\p_language_font
\orelse\ifx\p_language_font\v!auto
\doaddfeature\currentlanguage
\else
@@ -511,38 +539,42 @@
\fi
\fi}
-\unexpanded\def\uselanguageparameter#1%
+\permanent\protected\def\uselanguageparameter#1%
{\edef\askedlanguage{#1\c!language}%
- \ifx\askedlanguage\empty\else\lang_basics_switch_asked\fi}
+ \ifempty\askedlanguage\else\lang_basics_switch_asked\fi}
-\unexpanded\def\douselanguageparameter#1% fast setter
+\permanent\protected\def\douselanguageparameter#1% fast setter
{\edef\askedlanguage{#1}%
- \ifx\askedlanguage\empty\else\lang_basics_switch_asked\fi}
+ \ifempty\askedlanguage\else\lang_basics_switch_asked\fi}
-\unexpanded\def\lang_basics_set_current[#1]%
+\protected\def\lang_basics_set_current[#1]%
{\edef\askedlanguage{#1}%
- \ifx\askedlanguage\empty\else\lang_basics_switch_asked\fi}
+ \ifempty\askedlanguage\else\lang_basics_switch_asked\fi}
+
+\pushoverloadmode
+
+ \permanent\protected\def\language
+ {\doifelsenextoptionalcs\lang_basics_set_current\normallanguage}
-\unexpanded\def\language
- {\doifelsenextoptionalcs\lang_basics_set_current\normallanguage}
+ \aliased\let\setlanguage\language % we make these synonyms
-\let\setlanguage\language % we make these synonyms
+ \aliased\let\patterns\gobbleoneargument
-\let\patterns\gobbleoneargument
+\popoverloadmode
\newcount\mainlanguagenumber
%D Beware: you might need to use \type {\dontleavehmode} outside and|/|or \type {\par}
%D inside the group!
-\unexpanded\def\startlanguage
+\permanent\protected\def\startlanguage
{\begingroup\language}
-\let\stoplanguage\endgroup
+\permanent\let\stoplanguage\endgroup
-\unexpanded\def\mainlanguage[#1]%
+\permanent\protected\def\mainlanguage[#1]%
{\edef\askedlanguage{#1}%
- \ifx\askedlanguage\empty
+ \ifempty\askedlanguage
\orelse\ifcsname\??languagelinked\askedlanguage\endcsname
%\edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
\edef\askedlanguage{\lastnamedcs}%
@@ -564,10 +596,10 @@
%D Used at all?
-\def\splitsequence#1#2%
+\permanent\def\splitsequence#1#2%
{\doifelse{#1}\v!no{#2}{\doifelse{#1}\v!yes{\languageparameter\c!limittext}{#1}}}
-\def\splitsymbol#1%
+\permanent\def\splitsymbol#1%
{\splitsequence{#1}{\languageparameter\c!limittext}}
%D Just like with subsentence boundary symbols, quotes placement depends on the
@@ -678,53 +710,78 @@
%D \stoptable
%D \protect
-\unexpanded\def\nopatterns{\normallanguage\minusone}
+\permanent\protected\def\nopatterns{\normallanguage\minusone}
%D We default to the language belonging to the interface. This is one of the few
%D places outside the interface modules where \type {\startinterface} is used.
\setupcurrentlanguage[\s!en]
-\unexpanded\def\initializemainlanguage
+\permanent\protected\def\initializemainlanguage
{\mainlanguage[\currentlanguage]%
\showmessage\m!languages9\currentlanguage}
%D New:
-\let\stopexceptions\relax
+\permanent\let\stopexceptions\relax
-\unexpanded\def\startexceptions
- {\dosingleempty\lang_basics_start_exceptions}
-
-\def\lang_basics_start_exceptions[#1]#2\stopexceptions % multilingual or not?
+\tolerant\permanent\protected\def\startexceptions[#1]#:#2\stopexceptions
{\begingroup
\edef\askedlanguage{\reallanguagetag{#1}}%
- \ifx\askedlanguage\empty
+ \ifempty\askedlanguage
\let\askedlanguage\currentlanguage
\fi
\clf_setlanguageexceptions{\askedlanguage}{#2}%
\endgroup}
-\unexpanded\def\hyphenation
- {\clf_setlanguageexceptions{\currentlanguage}}
+\pushoverloadmode
-%D For the moment here:
+\permanent\protected\def\hyphenation
+ {\clf_setlanguageexceptions{\currentlanguage}}
-\uchyph 1 % also treat uppercase
-\exhyphenchar 45 % to permit breaking at explicit hyphens
+\popoverloadmode
%D New:
-\unexpanded\def\traceddiscretionary#1#2#3%
- {\dontleavehmode
- \discretionary{\darkred#1}{\darkgreen#2}{\darkblue#3}}
+\permanent\protected\def\traceddiscretionary#1#%
+ {\dontleavehmode\lang_basics_traced_discretionary{#1}}
+
+\protected\def\lang_basics_traced_discretionary#1#2#3#4%
+ {\normaldiscretionary#1{\darkred#2}{\darkgreen#3}{\darkblue#4}}
-\unexpanded\def\samplediscretionary
+\installtextracker
+ {discretionaries}
+ {\enforced\let\discretionary\traceddiscretionary}
+ {\enforced\let\discretionary\normaldiscretionary}
+
+\permanent\protected\def\samplediscretionary
{\traceddiscretionary
{pre\clf_currentprehyphenchar}%
{\clf_currentposthyphenchar post}%
{replace}}
-% todo: make this configurable
+%D A typical \LMTX\ feature:
+%D
+%D \starttyping
+%D whatever\par
+%D {\nokerning whatever}\par
+%D efficient ff fi\par
+%D {\noligaturing efficient ff fi}\par
+%D {\nokerning\noligaturing efficient ff fi}\par
+%D {e{\noligaturing ffi}cient}\par
+%D {ef{\noleftligaturing f}icient ff fi}\par
+%D {ef{\norightligaturing f}icient ff fi}\par
+%D \stoptyping
+
+\immutable\chardef\nokerningcode \numexpr\noleftkerncode +\norightkerncode \relax
+\immutable\chardef\noligaturingcode\numexpr\noleftligaturecode+\norightligaturecode\relax
+
+\permanent\protected\def\nokerning {\bitwiseflip\glyphoptions\nokerningcode}
+\permanent\protected\def\noligaturing{\bitwiseflip\glyphoptions\noligaturingcode}
+
+\permanent\protected\def\noleftkerning {\bitwiseflip\glyphoptions\noleftkerncode}
+\permanent\protected\def\noleftligaturing {\bitwiseflip\glyphoptions\noleftligaturecode}
+\permanent\protected\def\norightkerning {\bitwiseflip\glyphoptions\norightkerncode}
+\permanent\protected\def\norightligaturing{\bitwiseflip\glyphoptions\norightligaturecode}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-lab.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-lab.mkxl
index a527224e9dc..369049ed162 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lang-lab.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-lab.mkxl
@@ -21,7 +21,7 @@
%D Left-overs:
\ifdefined\sixperemspace \else
- \def\sixperemspace{\normalUchar"2006}
+ \permanent\def\sixperemspace{\normalUchar"2006}
\fi
%D In this module we deal with language dependant labels and prefixes, like in {\em
@@ -60,96 +60,106 @@
\installcorenamespace{label}
-\let\currentlabelcategory\empty
+% \let\currentlabelcategory\empty
-\unexpanded\def\definelabelclass
- {\dodoubleempty\lang_labels_define_class}
-
-\def\lang_labels_define_class[#1][#2]%
+\permanent\tolerant\protected\def\definelabelclass[#1]#*[#2]%
{\normalexpanded
{\lang_labels_define_class_indeed
{#1}%
- {\ifsecondargument#2\else\zerocount\fi}%
- \expandafter\noexpand\csname dogetupsome#1text\endcsname
- \expandafter\noexpand\csname #1language\endcsname
- \expandafter\noexpand\csname dodogetupsome#1text\endcsname
- \expandafter\noexpand\csname left#1text\endcsname
- \expandafter\noexpand\csname right#1text\endcsname
- \expandafter\noexpand\csname #1texts\endcsname
- \expandafter\noexpand\csname #1text\endcsname}}
+ {\ifchknum#2\or#2\else\zerocount\fi}%
+ \expandafter\noexpand\csname lang_labels_#1_text_1\endcsname
+ \expandafter\noexpand\csname #1language\endcsname
+ \expandafter\noexpand\csname lang_labels_#1_text_2\endcsname
+ \expandafter\noexpand\csname left#1text\endcsname
+ \expandafter\noexpand\csname right#1text\endcsname
+ \expandafter\noexpand\csname #1texts\endcsname
+ \expandafter\noexpand\csname #1text\endcsname}}
% hm, not interfaced
-\let\thetextprefix\empty
+\mutable\let\thetextprefix\empty
+
+\mutable\let\currenttextprefixclass\s!unknown
+\mutable\let\currenttextprefixname \empty
+\mutable\let\currenttextprefixtag \s!unknown
-\unexpanded\def\lang_labels_define_class_indeed#1#2#3#4#5#6#7#8#9%
- {\setuvalue{setup#1text}{\protecttextprefixes#2\def\currenttextprefixclass{#1}\dodoubleempty\lang_labels_text_prefix_setup}%
- \setuvalue{preset#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dodoubleempty\lang_labels_text_prefix_setup}%
- \setuvalue{copy#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dodoubleempty\lang_labels_text_prefix_copy}%
- \setuvalue{start#1text}{\protecttextprefixes1\def\currenttextprefixclass{#1}\dotripleempty\lang_labels_text_prefix_start[#1]}%
- \letvalue{stop#1text}\relax
- \def#4{\reallanguagetag{\defaultlanguage\currentmainlanguage}}%
+\protected\def\lang_labels_define_class_indeed#1#2#3#4#5#6#7#8#9%
+ {\permanent\instance\protected\defcsname setup#1text\endcsname{\protecttextprefixes#2\def\currenttextprefixclass{#1}\lang_labels_text_prefix_setup}%
+ \permanent\instance\protected\defcsname preset#1text\endcsname{\protecttextprefixes 1\def\currenttextprefixclass{#1}\lang_labels_text_prefix_setup}%
+ \permanent\instance\protected\defcsname copy#1text\endcsname{\protecttextprefixes 1\def\currenttextprefixclass{#1}\lang_labels_text_prefix_copy }%
+ \permanent\instance\protected\defcsname start#1text\endcsname{\protecttextprefixes 1\def\currenttextprefixclass{#1}\lang_labels_text_prefix_start[#1]}%
+ \permanent\instance \letcsname stop#1text\endcsname \relax
+ \permanent\instance\def#4{\reallanguagetag{\defaultlanguage\currentmainlanguage}}%
\ifnum#2=\plustwo % used for math and tags
- \def#3{#5#4}%
- \def#5##1##2% ##1=language
- {\ifcsname\??label\currentlabelcategory#1:##1:##2\endcsname
- \lastnamedcs
- \orelse\ifcsname\??label#1:##1:##2\endcsname
+ \instance\def#3{#5#4}%
+% \instance\def#5##1##2% ##1=language
+% {\ifcsname\??label\currentlabelcategory#1:##1:##2\endcsname
+% \lastnamedcs
+% \orelse\ifcsname\??label#1:##1:##2\endcsname
+% \lastnamedcs
+% \orelse\ifcsname\??language##1\s!default\endcsname
+% \expandafter#5\lastnamedcs{##2}%
+% \orelse\ifcsname\??label\currentlabelcategory#1:##2\endcsname
+% \lastnamedcs
+% \orelse\ifcsname\??label#1:##2\endcsname
+% \lastnamedcs
+% \orelse\ifcsname\??label\currentlabelcategory#1:\s!en:##2\endcsname
+% \lastnamedcs
+% \orelse\ifcsname\??label#1:\s!en:##2\endcsname
+% \lastnamedcs
+% \else
+% ##2%
+% \fi}%
+ \instance\def#5##1##2% ##1=language
+ {\ifcsname\??label#1:##1:##2\endcsname
\lastnamedcs
- % \orelse\ifcsname\??language#4\s!default\endcsname
- % \expandafter#5\csname\??language#4\s!default\endcsname{##2}%
\orelse\ifcsname\??language##1\s!default\endcsname
- %\expandafter#5\csname\??language##1\s!default\endcsname{##2}%
\expandafter#5\lastnamedcs{##2}%
- \orelse\ifcsname\??label\currentlabelcategory#1:##2\endcsname
- \lastnamedcs
\orelse\ifcsname\??label#1:##2\endcsname
\lastnamedcs
- \orelse\ifcsname\??label\currentlabelcategory#1:\s!en:##2\endcsname
- \lastnamedcs
\orelse\ifcsname\??label#1:\s!en:##2\endcsname
\lastnamedcs
\else
##2%
\fi}%
- \let#6\gobbleoneargument
- \let#7\gobbleoneargument
- \let#8\gobbletwoarguments
- \let#9#3%
+ \permanent\instance\let#6\gobbleoneargument
+ \permanent\instance\let#7\gobbleoneargument
+ \permanent\instance\let#8\gobbletwoarguments
+ \permanent\instance\let#9#3%
\else
- \unexpanded\def#3{#5#4}%
- \unexpanded\def#5##1##2%
+ \instance\protected\def#3{#5#4}%
+ \instance\protected\def#5##1##2%
{\ifcsname\??label#1:##1:##2\endcsname
- %\expandafter\let\expandafter\thetextprefix\csname\??label#1:##1:##2\endcsname
- \expandafter\let\expandafter\thetextprefix\lastnamedcs
+ \enforced\expandafter\let\expandafter\thetextprefix\lastnamedcs
\orelse\ifcsname\??language#4\s!default\endcsname
- %\expandafter#5\csname\??language#4\s!default\endcsname{##2}%
\expandafter#5\lastnamedcs{##2}%
\orelse\ifcsname\??label#1:##2\endcsname
- %\expandafter\let\expandafter\thetextprefix\csname\??label#1:##2\endcsname
- \expandafter\let\expandafter\thetextprefix\lastnamedcs
+ \enforced\expandafter\let\expandafter\thetextprefix\lastnamedcs
\orelse\ifcsname\??label#1:\s!en:##2\endcsname
- %\expandafter\let\expandafter\thetextprefix\csname\??label#1:\s!en:##2\endcsname
- \expandafter\let\expandafter\thetextprefix\lastnamedcs
+ \enforced\expandafter\let\expandafter\thetextprefix\lastnamedcs
\else
- \let\thetextprefix\dummytextprefix
+ \enforced\let\thetextprefix\dummytextprefix
\fi}%
- \unexpanded\def#6##1{#3{##1}\expandafter\flushleftlabelclass \thetextprefix}%
- \unexpanded\def#7##1{#3{##1}\expandafter\flushrightlabelclass\thetextprefix}%
- \unexpanded\def#8##1{#3{##1}\expandafter\flushbothlabelclass \thetextprefix}% #2
- \unexpanded\def#9##1{#3{##1}\expandafter\flushleftlabelclass \thetextprefix}%
+ \permanent \instance\protected\def#6##1{#3{##1}\expandafter\firstoftwoarguments \thetextprefix}% \flushleftlabelclass
+ \permanent\instance\protected\def#7##1{#3{##1}\expandafter\secondoftwoarguments \thetextprefix}% \flushrightlabelclass
+ \permanent\instance\protected\def#8##1{#3{##1}\expandafter\lang_labels_flush_both\thetextprefix}% \flushbothlabelclass #2
+ \permanent\instance\protected\def#9##1{#3{##1}\expandafter\firstoftwoarguments \thetextprefix}% \flushleftlabelclass
\fi
\appendtoks
- \let#6\firstofoneargument % to be checked
- \let#7\firstofoneargument % to be checked
- \let#8\firstofoneargument % to be checked
- \let#9\firstofoneargument % to be checked
+ \enforced\permanent\instance\let#6\firstofoneargument % to be checked
+ \enforced\permanent\instance\let#7\firstofoneargument % to be checked
+ \enforced\permanent\instance\let#8\firstofoneargument % to be checked
+ \enforced\permanent\instance\let#9\firstofoneargument % to be checked
\to \everysimplifycommands}
-\let\flushleftlabelclass \firstoftwoarguments
-\let\flushrightlabelclass\secondoftwoarguments
-\def\flushbothlabelclass #1#2#3{#1#3#2}
-\def\dummytextprefix {\empty\empty}
+% why not lang_* ?
+
+% \let\flushleftlabelclass \firstoftwoarguments
+% \let\flushrightlabelclass\secondoftwoarguments
+
+\permanent\def\lang_labels_flush_both#1#2#3{#1#3#2}
+
+\permanent\def\dummytextprefix{\empty\empty}
%D \macros
%D {headtext, labeltext, leftlabeltext, rightlabeltext, labeltexts}
@@ -165,34 +175,30 @@
%D These macros enable us to automatically define head and label texts without
%D replacing predefined ones. They are internal macros.
-\appendtoks \let\labellanguage\currentlanguage \to \everycurrentdate
+\appendtoks \enforced\let\labellanguage\currentlanguage \to \everycurrentdate
\newconstant\protecttextprefixes
-\let\currenttextprefixtag \s!unknown
-\let\currenttextprefixclass\s!unknown
-
-\def\lang_labels_text_prefix_start[#1][#2][#3]% class language name
- {\ifthirdargument
- \edef\currenttextprefixtag{\reallanguagetag{#2}}%
- \edef\currenttextprefixname{#3}%
- \else
+\tolerant\def\lang_labels_text_prefix_start[#1]#*[#2]#*[#3]% class language name
+ {\ifarguments\or\or
\edef\currenttextprefixtag{\reallanguagetag\currentmainlanguage}%
\edef\currenttextprefixname{#2}%
+ \else
+ \edef\currenttextprefixtag{\reallanguagetag{#2}}%
+ \edef\currenttextprefixname{#3}%
\fi
\grabuntil{stop#1text}\lang_labels_text_prefix_start_indeed}
\def\lang_labels_text_prefix_start_indeed#1% text (not special checking done here yet, only for long texts anyway)
- {\expandafter\edef\csname\??label\currenttextprefixclass:\currenttextprefixtag:\currenttextprefixname\endcsname%
- {{\clf_strip{#1}}\empty}}
+ {\edefcsname\??label\currenttextprefixclass:\currenttextprefixtag:\currenttextprefixname\endcsname{{\clf_strip{#1}}\empty}}
-\def\lang_labels_text_prefix_setup[#1][#2]%
- {\ifsecondargument
- \edef\currenttextprefixtag{\reallanguagetag{#1}}%
- \processcommalist[#2]\lang_labels_text_prefix_setup_indeed
- \else
+\tolerant\def\lang_labels_text_prefix_setup[#1]#*[#2]%
+ {\ifarguments\or
\edef\currenttextprefixtag{\reallanguagetag\currentmainlanguage}%
\processcommalist[#1]\lang_labels_text_prefix_setup_indeed
+ \else
+ \edef\currenttextprefixtag{\reallanguagetag{#1}}%
+ \processcommalist[#2]\lang_labels_text_prefix_setup_indeed
\fi}
\def\lang_labels_text_prefix_setup_indeed#1%
@@ -220,27 +226,12 @@
\let\m_lang_labels_left \empty
\let\m_lang_labels_right\empty
-% \def\lang_labels_text_prefix_assign_yes#1[#2,#3,#4]%
-% {\def\m_lang_labels_left {#2}% no longer an edef ... else \Word undefined expansion issues
-% \def\m_lang_labels_right{#3}% no longer an edef ... else \Word undefined expansion issues
-% \ifx\m_lang_labels_right\empty
-% \ifx\m_lang_labels_left\empty
-% \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{\empty\empty}%
-% \else
-% \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}\empty}%
-% \fi
-% \else
-% \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{{#2}{#3}}%
-% \fi}
-%
-% how we love obscure efficicency ...
-
\def\lang_labels_text_prefix_assign_yes#1[#2,#3,#4]%
{\def\m_lang_labels_left {#2}% no longer an edef ... else \Word undefined expansion issues
\def\m_lang_labels_right{#3}% no longer an edef ... else \Word undefined expansion issues
- \expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1%
- \ifx\m_lang_labels_right\empty
- \ifx\m_lang_labels_left\empty
+ \defcsname\??label\currenttextprefixclass:\currenttextprefixtag:#1%
+ \ifempty\m_lang_labels_right
+ \ifempty\m_lang_labels_left
\endcsname{\empty\empty}%
\else
\endcsname{{#2}\empty}%
@@ -253,19 +244,19 @@
{}
\def\lang_labels_text_prefix_assign_dumb#1[#2,#3]%
- {\expandafter\def\csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{#2}}
+ {\defcsname\??label\currenttextprefixclass:\currenttextprefixtag:#1\endcsname{#2}}
-\unexpanded\def\setlabeltextpair#1#2#3#4#5% a fast one for usage at the Lua end
+\permanent\protected\def\setlabeltextpair#1#2#3#4#5% a fast one for usage at the Lua end
{%\writestatus{!!!!}{#1:\reallanguagetag{#2}:#3}%
- \expandafter\def\csname\??label#1:\reallanguagetag{#2}:#3\endcsname{{#4}{#5}}} % class tag key left right
+ \defcsname\??label#1:\reallanguagetag{#2}:#3\endcsname{{#4}{#5}}} % class tag key left right
-\def\lang_labels_text_prefix_copy[#1][#2]%
- {\ifsecondargument
- \edef\currenttextprefixtag{\reallanguagetag{#1}}%
- \processcommalist[#2]\lang_labels_text_prefix_copy_indeed
- \else
+\tolerant\def\lang_labels_text_prefix_copy[#1]#*[#2]%
+ {\ifarguments\or
\edef\currenttextprefixtag{\reallanguagetag\currentmainlanguage}%
\processcommalist[#1]\lang_labels_text_prefix_copy_indeed
+ \else
+ \edef\currenttextprefixtag{\reallanguagetag{#1}}%
+ \processcommalist[#2]\lang_labels_text_prefix_copy_indeed
\fi}
\def\lang_labels_text_prefix_copy_indeed#1%
@@ -279,10 +270,10 @@
% \csname\??label\currenttextprefixclass:\currenttextprefixtag:#1\expandafter\endcsname
% \csname\??label\currenttextprefixclass:\currenttextprefixtag:#2\endcsname}
%
-% this delays the aliasing so that we can switch maillanguage in between
+% this delays the aliasing so that we can switch mainlanguage in between
\def\lang_labels_text_prefix_copy_pair_indeed#1[#2,#3]%
- {\expandafter\edef\csname\??label\currenttextprefixclass:#1\endcsname
+ {\edefcsname\??label\currenttextprefixclass:#1\endcsname
{{\noexpand\csname\??label\currenttextprefixclass:\noexpand\reallanguagetag\noexpand\currentmainlanguage:#2\endcsname}{}}}
\definelabelclass [head] [0] % titles
@@ -313,10 +304,7 @@
\installcorenamespace{translation}
-\unexpanded\def\translate
- {\dosingleempty\lang_translate}
-
-\def\lang_translate[#1]%
+\permanent\tolerant\protected\def\translate[#1]%
{\getparameters[\??translation][#1]%
\ifcsname\??translation\currentlanguage\endcsname
\lastnamedcs
@@ -343,7 +331,9 @@
%D \assigntranslation[en=something,nl=iets]\to\command
%D \stoptyping
-\unexpanded\def\assigntranslation[#1]\to#2% bad, this \to
+% nicer is \edef\command{\translated[...]} ... todo
+
+\permanent\protected\def\assigntranslation[#1]\to#2% bad, this \to
{\getparameters[\??translation][#1]%
\edef#2{\begincsname\??translation\currentlanguage\endcsname}}
@@ -367,10 +357,7 @@
%D \getbuffer
%D \stoplines
-\unexpanded\def\commalistsentence
- {\dodoubleempty\typo_helpers_concat_comma_list}
-
-\def\typo_helpers_concat_comma_list[#1][#2]%
+\permanent\tolerant\protected\def\commalistsentence[#1]#*[#2]%
{\clf_concatcommalist
text {#1}%
separators {#2}%
@@ -385,6 +372,6 @@
%D Goodie (handy at \LUA\ end):
-\unexpanded\def\LABELTEXT#1{\WORD{\labeltext{#1}}} % only for simple cases!
+\permanent\protected\def\LABELTEXT#1{\WORD{\labeltext{#1}}} % only for simple cases!
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-mis.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-mis.mkxl
new file mode 100644
index 00000000000..7b6c9085736
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-mis.mkxl
@@ -0,0 +1,586 @@
+%D \module
+%D [ file=lang-mis,
+%D version=1997.03.20, % used to be supp-lan.tex
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Compounds,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This one will be updated stepwise to \LMTX. See lang-mis.mkiv for previous
+%D implementations and removed code.
+
+\writestatus{loading}{ConTeXt Language Macros / Compounds}
+
+%D More or less replaced.
+
+%D \gdef\starttest#1\stoptest{\starttabulate[|l|l|p|]#1\stoptabulate}
+%D \gdef\test #1{\NC\detokenize{#1}\NC\hyphenatedword{#1}\NC#1\NC\NR}
+
+\unprotect
+
+%D One of \TEX's strong points in building paragraphs is the way hyphenations are
+%D handled. Although for real good hyphenation of non||english languages some
+%D extensions to the program are needed, fairly good results can be reached with the
+%D standard mechanisms and an additional macro, at least in Dutch.
+%D
+%D \CONTEXT\ originates in the wish to typeset educational materials, especially in
+%D a technical environment. In production oriented environments, a lot of compound
+%D words are used. Because the Dutch language poses no limits on combining words, we
+%D often favor putting dashes between those words, because it facilitates reading,
+%D at least for those who are not that accustomed to it.
+%D
+%D In \TEX\ compound words, separated by a hyphen, are not hyphenated at all. In
+%D spite of the multiple pass paragraph typesetting this can lead to parts of words
+%D sticking into the margin. The solution lays in saying \type
+%D {spoelwater||terugwinunit} instead of \type {spoelwater-terugwinunit}. By using a
+%D one character command like \type {|}, delimited by the same character \type {|},
+%D we get ourselves both a decent visualization (in \TEXEDIT\ and colored verbatim
+%D we color these commands yellow) and an efficient way of combining words.
+%D
+%D The sequence \type{||} simply leads to two words connected by a hyphen. Because
+%D we want to distinguish such a hyphen from the one inserted when \TEX\ hyphenates
+%D a word, we use a bit longer one.
+%D
+%D \hyphenation {spoel-wa-ter te-rug-win-unit}
+%D
+%D \starttest
+%D \test {spoelwater||terugwinunit}
+%D \stoptest
+%D
+%D As we already said, the \type{|} is a command. This commands accepts an optional
+%D argument before it's delimiter, which is also a \type{|}.
+%D
+%D \hyphenation {po-ly-meer che-mie}
+%D
+%D \starttest
+%D \test {polymeer|*|chemie}
+%D \stoptest
+%D
+%D Arguments like \type{*} are not interpreted and inserted directly, in contrary to
+%D arguments like:
+%D
+%D \starttest
+%D \test {polymeer|~|chemie}
+%D \test {|(|polymeer|)|chemie}
+%D \test {polymeer|(|chemie|)| }
+%D \stoptest
+%D
+%D Although such situations seldom occur |<|we typeset thousands of pages before we
+%D encountered one that forced us to enhance this mechanism|>| we also have to take
+%D care of comma's.
+%D
+%D \hyphenation {uit-stel-len}
+%D
+%D \starttest
+%D \test {op||, in|| en uitstellen}
+%D \stoptest
+%D
+%D The next special case (concerning quotes) was brought to my attention by Piet
+%D Tutelaers, one of the driving forces behind rebuilding hyphenation patterns for
+%D the dutch language.\footnote{In 1996 the spelling of the dutch language has been
+%D slightly reformed which made this topic actual again.} We'll also take care of
+%D this case.
+%D
+%D \starttest
+%D \test {AOW|'|er}
+%D \test {cd|'|tje}
+%D \test {ex|-|PTT|'|er}
+%D \test {rock|-|'n|-|roller}
+%D \stoptest
+%D
+%D Tobias Burnus pointed out that I should also support something like
+%D
+%D \starttest
+%D \test {well|_|known}
+%D \stoptest
+%D
+%D to stress the compoundness of hyphenated words.
+%D
+%D Of course we also have to take care of the special case:
+%D
+%D \starttest
+%D \test {text||color and ||font}
+%D \stoptest
+
+%D \macros
+%D {installdiscretionaries}
+%D
+%D The mechanism described here is one of the older inner parts of \CONTEXT. The
+%D most recent extensions concerns some special cases as well as the possibility to
+%D install other characters as delimiters. The prefered way of specifying compound
+%D words is using \type{||}, which is installed by:
+%D
+%D \starttyping
+%D \installdiscretionary | -
+%D \stoptyping
+%D
+%D Some alternative definitions are:
+%D
+%D \startbuffer
+%D \installdiscretionary * -
+%D \installdiscretionary + -
+%D \installdiscretionary / -
+%D \installdiscretionary ~ -
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D after which we can say:
+%D
+%D \start \getbuffer
+%D \starttest
+%D \test {test**test**test}
+%D \test {test++test++test}
+%D \test {test//test//test}
+%D \test {test~~test~~test}
+%D \stoptest
+%D \stop
+
+%D \macros
+%D {compoundhyphen}
+%D
+%D Now let's go to the macros. First we define some variables. In the main \CONTEXT\
+%D modules these can be tuned by a setup command. Watch the (maybe) better looking
+%D compound hyphen.
+
+% hm why ex
+
+\ifdefined\compoundhyphen \else
+ \permanent\protected\def\compoundhyphen{\hbox{-\kern-.10775\emwidth-}} % .25\exheight
+\fi
+
+%D The last two variables are needed for subsentences |<|like this one|>| which we
+%D did not yet mention. We want to enable breaking but at the same time don't want
+%D compound characters like |-| or || to be separated from the words. \TEX\ hackers
+%D will recognise the next two macro's:
+
+\ifdefined\prewordbreak \else \permanent\protected\def\prewordbreak {\penalty\plustenthousand\hskip\zeropoint\relax} \fi
+\ifdefined\postwordbreak\else \permanent\protected\def\postwordbreak {\penalty\zerocount \hskip\zeropoint\relax} \fi
+\ifdefined\hspaceamount \else \def\hspaceamount#1#2{.16667\emwidth} \fi % will be overloaded
+
+%frozen\protected\def\permithyphenation{\ifhmode\prewordbreak\fi} % doesn't remove spaces
+\permanent\protected\def\permithyphenation{\ifhmode\wordboundary\fi} % doesn't remove spaces
+
+%D \macros
+%D {beginofsubsentence,endofsubsentence,
+%D beginofsubsentencespacing,endofsubsentencespacing}
+%D
+%D In the previous macros we provided two hooks which can be used to support nested
+%D sub||sentences. In \CONTEXT\ these hooks are used to insert a small space when
+%D needed.
+
+%D The following piece of code is a torture test compound handling. The \type
+%D {\relax} before the \type {\ifmmode} is needed because of the alignment scanner
+%D (in \ETEX\ this problem is not present because there a protected macro is not
+%D expanded. Thanks to Tobias Burnus for providing this example.
+%D
+%D \startformula
+%D \left|f(x_n)-{1\over2}\right| =
+%D {\cases{|{1\over2}-x_n| &for $0\le x_n < {1\over2}$\cr
+%D |x_n-{1\over2}| &for ${1\over2}<x_n\le1$ \cr}}
+%D \stopformula
+
+\installcorenamespace{discretionaryaction}
+\installcorenamespace{discretionarytext}
+\installcorenamespace{discretionarymath}
+\installcorenamespace{discretionaryboth}
+\installcorenamespace{discretionarymode}
+
+\permanent\protected\def\installdiscretionary#1#2%
+ {\edefcsname\??discretionarymath\detokenize{#1}\endcsname{\detokenize{#1}}% ?
+ \defcsname \??discretionarytext\detokenize{#1}\endcsname{#2}%
+ \defcsname \??discretionaryboth\detokenize{#1}\endcsname{\lang_discretionaries_command#1}%
+ \scratchcounter\expandafter`\detokenize{#1}%
+ \expandafter\uedcatcodecommand\expandafter\ctxcatcodes\expandafter\scratchcounter\csname\??discretionaryboth\detokenize{#1}\endcsname}
+
+\permanent\protected\def\handlemathmodediscretionary#1{\ifcsname\??discretionarymath\detokenize{#1}\endcsname\lastnamedcs}
+\permanent\protected\def\handletextmodediscretionary#1{\ifcsname\??discretionarytext\detokenize{#1}\endcsname\lastnamedcs}
+
+\permanent\protected\def\installdiscretionaries#1#2{\writestatus\m!system{use \string \installdiscretionary}} % obsolete
+
+\setnewconstant\discretionarymode\plusone
+
+\permanent\protected\def\ignorediscretionaries{\discretionarymode\zerocount}
+\permanent\protected\def\obeydiscretionaries {\discretionarymode\plusone}
+
+\def\lang_discretionaries_command
+ {% if direct if, we need \relax for lookahead in math mode
+ \csname\??discretionarymode
+ \ifcase\discretionarymode
+ n%
+ \orelse\ifmmode
+ m%
+ \else
+ t%
+ \fi
+ \endcsname}
+
+\setvalue{\??discretionarymode n}#1%
+ {\detokenize{#1}}
+
+%D The macro \type{\lang_discretionaries_check_before} takes care of loners like
+%D \type{||word}, while it counterpart \type {\lang_discretionaries_check_after} is
+%D responsible for handling the comma.
+
+\newsignal\d_lang_discretionaries_breakpoint % todo: never consulted so maybe obsolete
+
+\newconditional\punctafterdiscretionary
+\newconditional\spaceafterdiscretionary
+
+\def\lang_discretionaries_check_before %is used grouped
+ {\ifvmode
+ \dontleavehmode
+ \fi
+ \ifhmode
+ %\begingroup
+ %\setbox\scratchbox\lastbox
+ %\ifzeropt\wd\scratchbox
+ % \box\scratchbox\relax
+ % \endgroup
+ % \let\postwordbreak\prewordbreak
+ %\else
+ % \box\scratchbox\relax
+ % \endgroup
+ %\fi
+ \fi}
+
+\def\lang_discretionaries_check_after
+ {\setfalse\punctafterdiscretionary
+ \setfalse\spaceafterdiscretionary
+ \ifx\blankspace\nexttoken \settrue \spaceafterdiscretionary \orelse
+ \ifx\space \nexttoken \settrue \spaceafterdiscretionary \orelse
+ \ifx .\nexttoken \settrue \punctafterdiscretionary \orelse
+ \ifx ,\nexttoken \settrue \punctafterdiscretionary \orelse
+ \ifx :\nexttoken \settrue \punctafterdiscretionary \orelse
+ \ifx ;\nexttoken \settrue \punctafterdiscretionary \fi}
+
+\letvalue{\??discretionarymode m}\handlemathmodediscretionary
+
+\setvalue{\??discretionarymode t}#1%
+ {\bgroup
+ \let\nextnextnext\egroup
+ \def\next##1#1%
+ {\def\next{\activedododotextmodediscretionary#1{##1}}%
+ \futurelet\nexttoken\next}%
+ \next}
+
+\let\lang_discretionaries_token \relax
+\let\lang_discretionaries_action\relax
+
+\permanent\protected\def\activedododotextmodediscretionary#1#2%
+ {\edef\lang_discretionaries_token{\detokenize{#2}}%
+ \def\lang_discretionaries_action{\handletextmodediscretionary{#1}}%
+ \lang_discretionaries_check_after
+ \ifempty\lang_discretionaries_token
+ \ifx#1\nexttoken % takes care of ||| and +++ and ......
+ \ifcsname\??discretionaryaction\string#1\endcsname
+ \lastnamedcs
+ \orelse\ifconditional\spaceafterdiscretionary
+ %\prewordbreak\hbox{\string#1}\relax
+ \wordboundary\hbox{\string#1}\relax
+ \orelse\ifconditional\punctafterdiscretionary
+ %\prewordbreak\hbox{\string#1}\relax
+ \wordboundary\hbox{\string#1}\wordboundary
+ \else
+ %\prewordbreak\hbox{\string#1}\prewordbreak
+ \wordboundary\hbox{\string#1}\wordboundary
+ \fi
+ \def\nextnextnext{\afterassignment\egroup\let\next=}%
+ \else
+ \lang_discretionaries_check_before
+ % the next line has been changed (20050203)
+ % \prewordbreak\hbox{\lang_discretionaries_action\nexttoken}\postwordbreak
+ % but an hbox blocks a possible \discretionary
+ \ifcsname\??discretionaryaction\endcsname
+ \lastnamedcs
+ \orelse\ifconditional\spaceafterdiscretionary
+ %\prewordbreak\lang_discretionaries_action\relax
+ \wordboundary\lang_discretionaries_action\relax
+ \orelse\ifconditional\punctafterdiscretionary
+ %\prewordbreak\lang_discretionaries_action\relax
+ \wordboundary\lang_discretionaries_action\relax
+ \else
+ %\prewordbreak\lang_discretionaries_action\prewordbreak
+ \wordboundary\lang_discretionaries_action\wordboundary
+ \fi
+ \fi
+ \orelse\ifcsname\??discretionaryaction\lang_discretionaries_token\endcsname
+ \lastnamedcs
+ \else
+ \lang_discretionaries_check_before
+ \ifconditional\spaceafterdiscretionary
+ %\prewordbreak\hbox{#2}\relax
+ \wordboundary\hbox{#2}\relax
+ \orelse\ifconditional\punctafterdiscretionary
+ %\prewordbreak\hbox{#2}\relax
+ \wordboundary\hbox{#2}\relax
+ \else
+ %\prewordbreak\discretionary{\hbox{#2}}{}{\hbox{#2}}\postwordbreak
+ \wordboundary\discretionary{\hbox{#2}}{}{\hbox{#2}}\wordboundary
+ %\discretionary options \plusthree{\hbox{#2}}{}{\hbox{#2}}%
+ \fi
+ \fi
+ \nextnextnext}
+
+%D \macros
+%D {directdiscretionary}
+%D
+%D In those situations where the nature of characters is less predictable, we can
+%D use the more direct approach:
+
+\permanent\protected\def\directdiscretionary
+ {\csname\??discretionarymode
+ \ifcase\discretionarymode
+ n%
+ \else
+ d%
+ \fi
+ \endcsname}
+
+\permanent\protected\def\indirectdiscretionary
+ {\csname\??discretionarymode
+ \ifcase\discretionarymode
+ n%
+ \else
+ i%
+ \fi
+ \endcsname}
+
+\setuvalue{\??discretionarymode d}#1%
+ {\edef\lang_discretionaries_token{\detokenize{#1}}%
+ \let\lang_discretionaries_action\compoundhyphen
+ \ifcsname\??discretionaryaction\lang_discretionaries_token\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\indirectdiscretionary
+ \fi{#1}}
+
+\setuvalue{\??discretionarymode i}#1%
+ %{\prewordbreak\discretionary{\hbox{#1}}{}{\hbox{#1}}\postwordbreak}
+ {\wordboundary\discretionary{\hbox{#1}}{}{\hbox{#1}}\wordboundary}
+ %{\discretionary options \plusthree{\hbox{#1}}{}{\hbox{#1}}}
+
+\permanent\protected\def\definetextmodediscretionary #1
+ {\defcsname\??discretionaryaction\detokenize{#1}\endcsname}
+
+% \start \hsize 1mm
+% test |||test test|||, test\blank
+% test test|-|, test|-| and test|-|test\blank
+% test test|_|, test|_| and test|_|test\blank
+% test cd|'|tje\blank
+% test |(|test test|)|, test\blank
+% test test test|x|, test\blank
+% test|~|test
+% test|^|test
+% \stop
+
+% x\discretionary{1}{2}{3}xxxxxxx
+% xxxxxxx\discretionary{1}{2}{3}x
+%
+% xxx3xxx
+% xxx1<newline>2xxx
+
+\def\lang_discretionaries_hyphen_like#1#2%
+ {\ifconditional\spaceafterdiscretionary
+ %prewordbreak\hbox{#1}\relax
+ \wordboundary\hbox{#1}\relax
+ \orelse\ifconditional\punctafterdiscretionary
+ %prewordbreak\hbox{#1}\relax
+ \wordboundary\hbox{#1}\relax
+ \else
+ %\prewordbreak#2\postwordbreak % was prewordbreak
+ \wordboundary#2\wordboundary
+ \fi}
+
+\definetextmodediscretionary {}
+ {\lang_discretionaries_hyphen_like\textmodehyphen\textmodehyphendiscretionary}
+
+\definetextmodediscretionary -
+ {\lang_discretionaries_hyphen_like\normalhyphen\normalhyphendiscretionary}
+
+\definetextmodediscretionary _
+ {\lang_discretionaries_hyphen_like\composedhyphen\composedhyphendiscretionary}
+
+\definetextmodediscretionary )
+ {\lang_discretionaries_hyphen_like{)}{\discretionary{-)}{}{)}}}
+
+\definetextmodediscretionary (
+ {\ifdim\lastskip>\zeropoint
+ %(\prewordbreak
+ (\wordboundary
+ \else
+ %\prewordbreak\discretionary{}{(-}{(}\prewordbreak
+ \wordboundary\discretionary{}{(-}{(}\wordboundary
+ %\discretionary options \plusthree{}{(-}{(}%
+ \fi}
+
+\definetextmodediscretionary ~
+ %{\prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak}
+ {\wordboundary\discretionary{-}{}{\thinspace}\wordboundary}
+ %{\discretionary options \plusthree{-}{}{\thinspace}}
+
+\definetextmodediscretionary '
+ %{\prewordbreak\discretionary{-}{}{'}\postwordbreak}
+ {\wordboundary\discretionary{-}{}{'}\wordboundary}
+ %{\discretionary options \plusthree{-}{}{'}}
+
+\definetextmodediscretionary ^
+ %{\prewordbreak\discretionary{\hbox{\normalstartimath|\normalstopimath}}{}{\hbox{\normalstartimath|\normalstopimath}}%
+ % \postwordbreak} % bugged
+ {\wordboundary
+ \discretionary{\hbox{\normalstartimath|\normalstopimath}}{}{\hbox{\normalstartimath|\normalstopimath}}%
+ \wordboundary} % bugged
+ %{\discretionary options \plusthree{\hbox{\normalstartimath|\normalstopimath}}{}{\hbox{\normalstartimath|\normalstopimath}}}
+
+\definetextmodediscretionary <
+ %{\beginofsubsentence\prewordbreak\beginofsubsentencespacing
+ {\beginofsubsentence\wordboundary\beginofsubsentencespacing
+ \aftergroup\ignorespaces} % tricky, we need to go over the \nextnextnext
+
+\definetextmodediscretionary >
+ {\removeunwantedspaces
+ %\endofsubsentencespacing\prewordbreak\endofsubsentence}
+ \endofsubsentencespacing\wordboundary\endofsubsentence}
+
+\definetextmodediscretionary =
+ {\removeunwantedspaces
+ %\prewordbreak\midsentence\prewordbreak
+ \wordboundary\midsentence\wordboundary
+ \aftergroup\ignorespaces}
+
+% french
+
+%definetextmodediscretionary : {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{:}:}
+%definetextmodediscretionary ; {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{;};}
+%definetextmodediscretionary ? {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{?}?}
+%definetextmodediscretionary ! {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{!}!}
+
+\definetextmodediscretionary : {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{:}:}
+\definetextmodediscretionary ; {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{;};}
+\definetextmodediscretionary ? {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{?}?}
+\definetextmodediscretionary ! {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{!}!}
+
+%definetextmodediscretionary * {\prewordbreak\discretionary{-}{}{\kern.05\emwidth}\prewordbreak}
+\definetextmodediscretionary * {\wordboundary\discretionary{-}{}{\kern.05\emwidth}\wordboundary}
+
+% spanish
+
+%definetextmodediscretionary ?? {\prewordbreak\questiondown}
+%definetextmodediscretionary !! {\prewordbreak\exclamdown}
+
+\definetextmodediscretionary ?? {\wordboundary\questiondown}
+\definetextmodediscretionary !! {\wordboundary\exclamdown}
+
+%D \installdiscretionary | +
+%D \installdiscretionary + =
+
+\permanent\protected\def\defaultdiscretionaryhyphen{\compoundhyphen}
+
+\installdiscretionary | \defaultdiscretionaryhyphen % installs in ctx and prt will fall back on it
+
+%D \macros
+%D {fakecompoundhyphen}
+%D
+%D In headers and footers as well as in active pieces of text we need a dirty hack.
+%D Try to imagine what is needed to savely break the next text across a line and at
+%D the same time make the words interactive.
+%D
+%D \starttyping
+%D \goto{Some||Long||Word}
+%D \stoptyping
+
+\permanent\protected\def\fakecompoundhyphen
+ {\enforced\permanent\protected\def\|{\mathortext\vert\lang_compounds_fake_hyphen}}
+
+\def\lang_compounds_fake_hyphen
+ {\enforced\permanent\protected\def##1|%
+ {\doifelsenothing{##1}\compoundhyphen{##1}%
+ \kern\d_lang_discretionaries_breakpoint
+ \allowbreak}}
+
+%D \macros
+%D {midworddiscretionary}
+%D
+%D If needed, one can add a discretionary hyphen using \type
+%D {\midworddiscretionary}. This macro does the same as \PLAIN\ \TEX's \type {\-},
+%D but, like the ones implemented earlier, this one also looks ahead for spaces and
+%D grouping tokens.
+
+\permanent\protected\def\midworddiscretionary
+ {\futurelet\nexttoken\lang_discretionaries_mid_word}
+
+\def\lang_discretionaries_mid_word
+ {\ifx\nexttoken\blankspace\orelse
+ \ifx\nexttoken\bgroup \orelse
+ \ifx\nexttoken\egroup \orelse
+ \discretionary{-}{}{}%
+ \fi}
+
+% \aliased\let\ignorecompoundcharacter\relax
+
+%D \macros
+%D {disablediscretionaries,disablecompoundcharacter}
+%D
+%D Occasionally we need to disable this mechanism. For the moment we assume that
+%D \type {|} is used.
+
+\aliased\let\disablediscretionaries \ignorediscretionaries
+%aliased\let\disablecompoundcharacters\ignorecompoundcharacter
+
+%D \macros
+%D {normalcompound}
+%D
+%D Handy in for instance XML. (Kind of obsolete)
+
+\ifdefined\normalcompound \else \aliased\let\normalcompound=| \fi
+
+%D \macros
+%D {compound}
+%D
+%D We will overload the already active \type {|} so we have to save its meaning in
+%D order to be able to use this handy macro.
+%D
+%D \starttyping
+%D so test\compound{}test can be used instead of test||test
+%D \stoptyping
+
+\bgroup
+
+ \catcode\barasciicode\activecatcode
+
+ \permanent\protected\gdef\compound#1{|#1|}
+
+ \doglobal \appendtoks
+ \enforced\permanent\protected\def|#1|{\ifx#1\empty\empty-\else#1\fi}%
+ \to \everysimplifycommands
+
+\egroup
+
+%D Here we hook some code into the clean up mechanism needed for verbatim data.
+
+\appendtoks
+ %disablecompoundcharacters
+ \disablediscretionaries
+\to \everycleanupfeatures
+
+%D Here:
+%D
+%D \startbuffer
+%D {\red somelongword}{\blue \compounddiscretionary}{\green somelongword}
+%D \stopbuffer
+%D
+%D \typebuffer \blank {\hsize3mm\getbuffer\par} \blank
+
+\permanent\protected\def\compounddiscretionary
+ {\discretionary
+ options \plusthree
+ {\ifnum\prehyphenchar >\zerocount\char\prehyphenchar \fi}%
+ {\ifnum\posthyphenchar>\zerocount\char\posthyphenchar\fi}%
+ {\ifnum\posthyphenchar>\zerocount\char\posthyphenchar\fi}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-rep.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-rep.mkxl
new file mode 100644
index 00000000000..36e48424249
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-rep.mkxl
@@ -0,0 +1,74 @@
+%D \module
+%D [ file=lang-rep,
+%D version=2013.04.28,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Substitution,
+%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 As I needed an example of messing with nodes for the bacho\TEX\ tutorial
+%D I cooked up this. In the end I decided to stick to a simpler example and
+%D just finished this off in case someone really needs it.
+
+\writestatus{loading}{ConTeXt Language Macros / Replacements}
+
+\unprotect
+
+\registerctxluafile{lang-rep}{}
+
+\definesystemattribute[replacements][public,global]
+
+%D \startluacode
+%D
+%D -- todo: other nodes (prelude to more experiments with auto dropped caps)
+%D
+%D languages.replacements.add("basics", {
+%D ["aap"] = "monkey",
+%D ["noot"] = "nut",
+%D ["never"] = "forever",
+%D ["newer"] = "cooler",
+%D ["new"] = "cool",
+%D -- ["special"] = "veryspe{>>>}{<<<}{=}cial",
+%D })
+%D
+%D \stopluacode
+%D
+%D \replaceword[more][this][that]
+%D \replaceword[more][crap][support]
+%D \replaceword[more][---][—]
+%D \replaceword[basics][special][veryspe{>>>}{<<<}{=}cial]
+%D
+%D \starttyping
+%D \start \setreplacements[basics] What the heck, it's now or never, isn't it new? \par \stop
+%D \start \setreplacements[more] Do we --- {\it really} --- need this kind of crap? \par \stop
+%D \start \setreplacements[basics] All kinds of special thingies! \par \stop
+%D \start \setreplacements[basics] \hsize1mm special \par \stop
+%D \stoptyping
+
+\permanent\protected\def\setreplacements[#1]%
+ {\clf_setreplacements{#1}}
+
+\permanent\protected\def\resetreplacements
+ {\c_attr_replacements\attributeunsetvalue}
+
+\permanent\tolerant\protected\def\replaceword[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or
+ \clf_addreplacementslist{#1}{#2}%
+ \or
+ \clf_addreplacements{#1}{#2}{#3}%
+ \fi}
+
+\appendtoks
+ \resetreplacements
+\to \everyresettypesetting
+
+\appendtoks
+ \resetreplacements
+\to \everyinitializeverbatim
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-spa.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-spa.mkxl
new file mode 100644
index 00000000000..3e4972acbe8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-spa.mkxl
@@ -0,0 +1,74 @@
+%D \module
+%D [ file=lang-spa,
+%D version=2002.04.17,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Spacing,
+%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 Language Macros / Spacing}
+
+%D This module was created in the process of enhancing support for French (with the
+%D help of Daniel Flipo).
+%D
+%D This will (or already has) become obsolete!
+
+\unprotect
+
+\definehspace [\s!fr] [quotation] [\flexiblespaceamount{.8}{.3}{.8}]
+\definehspace [\s!fr] [sentence] [\fixedspaceamount{1}]
+
+%definehspace [\s!fr] [quote] [\flexiblespaceamount{.8}{.3}{.8}]
+%definehspace [\s!fr] [speech] [\flexiblespaceamount{.8}{.3}{.8}]
+
+\definehspace [\s!fr] [interquotation] [\zeropoint]
+\definehspace [\s!fr] [intersentence] [\zeropoint]
+
+\definehspace [\string :] [\zeropoint]
+\definehspace [\string ;] [\zeropoint]
+\definehspace [\string !] [\zeropoint]
+\definehspace [\string ?] [\zeropoint]
+
+\definehspace [\s!fr] [\string :] [\spaceamount]
+\definehspace [\s!fr] [\string ;] [.16667em]
+\definehspace [\s!fr] [\string !] [.16667em]
+\definehspace [\s!fr] [\string ?] [.16667em]
+
+%D Alternative discretionary handlers:
+
+%definetextmodediscretionary : {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentlanguage{:}:}
+%definetextmodediscretionary ; {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentlanguage{;};}
+%definetextmodediscretionary ? {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentlanguage{?}?}
+%definetextmodediscretionary ! {\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentlanguage{!}!}
+
+\definetextmodediscretionary : {\removeunwantedspaces\wordboundary\kern\hspaceamount\currentlanguage{:}:}
+\definetextmodediscretionary ; {\removeunwantedspaces\wordboundary\kern\hspaceamount\currentlanguage{;};}
+\definetextmodediscretionary ? {\removeunwantedspaces\wordboundary\kern\hspaceamount\currentlanguage{?}?}
+\definetextmodediscretionary ! {\removeunwantedspaces\wordboundary\kern\hspaceamount\currentlanguage{!}!}
+
+%D \startbuffer
+%D \mainlanguage[en] \quotation{test \quotation{test} test}\par
+%D \mainlanguage[nl] \quotation{test \quotation{test} test}\par
+%D \mainlanguage[fr] \quotation{test \quotation{test} test}\par
+%D
+%D \mainlanguage[en] \quotation{\quotation{test} test}\par
+%D \mainlanguage[nl] \quotation{\quotation{test} test}\par
+%D \mainlanguage[fr] \quotation{\quotation{test} test}\par
+%D
+%D \mainlanguage[en] |<|test |<|test|>| test|>| \par
+%D \mainlanguage[nl] |<|test |<|test|>| test|>| \par
+%D \mainlanguage[fr] |<|test |<|test|>| test|>| \par
+%D
+%D \mainlanguage[en] |<||<|test|>| test|>| \par
+%D \mainlanguage[nl] |<||<|test|>| test|>| \par
+%D \mainlanguage[fr] |<||<|test|>| test|>| \par
+%D \stopbuffer
+%D
+%D \typebuffer {\getbuffer}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-tra.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-tra.mkxl
new file mode 100644
index 00000000000..b087832e04b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-tra.mkxl
@@ -0,0 +1,95 @@
+%D \module
+%D [ file=lang-tra,
+%D version=2020.10.31,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Transliteration,
+%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 Language Macros / Transliteration}
+
+\registerctxluafile{lang-tra}{}
+
+\unprotect
+
+\definesystemattribute[transliteration][public,global]
+
+\installcorenamespace {transliteration}
+
+\permanent\tolerant\protected\def\definetransliteration[#1]#*[#2]%
+ {\clf_definedtransliteration{#1}{#2}}
+
+\permanent\protected\def\settransliteration[#1]%
+ {\clf_settransliteration{#1}}
+
+\permanent\protected\def\starttransliteration[#1]%
+ {\begingroup
+ \clf_settransliteration{#1}}
+
+\permanent\protected\def\stoptransliteration
+ {\endgroup}
+
+\permanent\protected\def\resettransliteration
+ {\c_attr_transliteration\attributeunsetvalue}
+
+\appendtoks
+ \resettransliteration
+\to \everyinitializeverbatim
+
+\protect \endinput
+
+% \setupbodyfont[dejavu]
+%
+% \input lang-tra.mkiv
+%
+% \definetransliteration[serbian][serbian to latin]
+%
+% \starttext
+%
+% \settransliteration[serbian to latin]
+%
+% \startchapter[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \start
+% \settransliteration[serbian to latin]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stop
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stopchapter
+%
+% \resettransliteration
+%
+% \startchapter[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \start
+% \settransliteration[serbian to latin]
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stop
+% ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ
+% \stopchapter
+%
+% \definehead[ChapterA][chapter]
+% \definehead[ChapterB][chapter]
+%
+% \startsetups s-to-l
+% \settransliteration[serbian to latin]
+% \red
+% \stopsetups
+%
+% % maybe we need a setups key for this
+% % hm, \definesetups [xxx] [aa,bb,cc]
+%
+% \setuphead[ChapterB][commandbefore=\setups{s-to-l}]
+%
+% \startChapterA[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% \stopChapterA
+%
+% \startChapterB[title={ÐБВ ГДЕ ЖЗИЙ КЛМÐОП РСТУ ФХЦЧ ШЩЪЬ ЮЯ}]
+% \stopChapterB
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-url.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-url.mkxl
new file mode 100644
index 00000000000..04a55fcf93f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-url.mkxl
@@ -0,0 +1,167 @@
+%D \module
+%D [ file=lang-url,
+%D version=2008.01.22, % used to be lang-mis
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Language Options,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{lang-url}{}
+
+\unprotect
+
+%D Traditionally this code is in the language namespace as
+%D hyphenation relates to languages.
+
+%D \macros
+%D {hyphenatedurl}
+%D
+%D For those who want to put full \URL's in a text, we offer
+%D
+%D \startbuffer
+%D \hyphenatedurl{http://optimist.optimist/optimist/optimist.optimist#optimist}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D which breaks at the appropriate places. Watch the \type{#}
+%D hack.
+%D
+%D When passed as argument, like in \type {\goto}, one needs
+%D to substitute a \type {\\} for each \type{#}.
+%D
+%D \startbuffer
+%D \hyphenatedurl{http://this.is.a.rather/strange/reference#indeed}
+%D \stopbuffer
+%D
+%D \typebuffer
+
+\newtoks\everyhyphenatedurl
+
+\appendtoks
+ \resetfontfeature
+ \resetcharacterspacing
+ %
+ \enforced\let\&\letterampersand
+ \enforced\let\#\letterhash
+ \enforced\let\~\lettertilde
+ \enforced\let\\\letterbackslash
+ \enforced\let\$\letterdollar
+ \enforced\let\^\letterhat
+ \enforced\let\_\letterunderscore
+ \enforced\let\{\letterleftbrace
+ \enforced\let\}\letterrightbrace
+ \enforced\let\|\letterbar
+ \enforced\let~=\lettertilde
+ \enforced\let|=\letterbar
+ \enforced\let\Ux\eUx
+\to \everyhyphenatedurl
+
+\mutable\let\hyphenatedurlseparator \empty % \periodcentered
+\mutable\let\hyphenatedurldiscretionary\empty
+
+\setnewconstant\hyphenatedurllefthyphenmin \plusthree
+\setnewconstant\hyphenatedurlrighthyphenmin\plusthree
+
+\def\lang_url_more{\penalty\plustenthousand\hskip\scratchskipone\penalty\plustenthousand}
+\def\lang_url_less{\penalty\plustenthousand\hskip\scratchskiptwo\penalty\plustenthousand}
+\def\lang_url_trac{\penalty\plustenthousand\hsmash{\darkred\vl}\penalty\plustenthousand}
+
+\def\lang_url_a#1{\lang_url_more\char#1\lang_url_show\discretionary{}{\hyphenatedurlseparator}{}}
+\def\lang_url_b#1{\lang_url_more\discretionary{\hyphenatedurlseparator}{}{}\lang_url_show\char#1\relax}
+\def\lang_url_d {\lang_url_more\discretionary{\lang_url_show}{\lang_url_show}{\lang_url_show}}
+\def\lang_url_l#1{\lang_url_less\char#1\relax}
+\def\lang_url_c#1{\lang_url_more\char#1\relax}
+\def\lang_url_L#1{\lang_url_less\char#1\relax}
+\def\lang_url_C#1{\lang_url_more\char#1\relax}
+
+\permanent\protected\def\showhyphenatedurlbreaks % for old times sake
+ {\let\lang_url_show\lang_url_trac}
+
+\installtextracker
+ {languages.url}
+ {\let\lang_url_show\lang_url_trac}
+ {\let\lang_url_show\relax}
+
+\let\lang_url_show\relax
+
+\permanent\protected\def\sethyphenatedurlnormal#1{\clf_sethyphenatedurlcharacters{#1}{\v!normal}}
+\permanent\protected\def\sethyphenatedurlbefore#1{\clf_sethyphenatedurlcharacters{#1}{\v!before}}
+\permanent\protected\def\sethyphenatedurlafter #1{\clf_sethyphenatedurlcharacters{#1}{\v!after }}
+
+% \sethyphenatedurlafter{ABCDEF}
+
+\permanent\protected\def\hyphenatedurl#1%
+ {\dontleavehmode
+ \begingroup
+ \the\everyhyphenatedurl
+ \normallanguage\zerocount % \nohyphens in mkiv
+ \scratchskipone\zeropoint\s!plus\dimexpr\emwidth/12\s!minus\dimexpr\emwidth/24\relax % 1.00pt @ 12pt
+ \scratchskiptwo\zeropoint\s!plus\dimexpr\emwidth/48\s!minus\dimexpr\emwidth/96\relax % 0.25pt @ 12pt
+ \unprotect
+ \normalexpanded{\noexpand\clf_hyphenatedurl
+ {\noexpand\detokenize{#1}}%
+ \hyphenatedurllefthyphenmin
+ \hyphenatedurlrighthyphenmin
+ {\hyphenatedurldiscretionary}%
+ }%
+ \protect
+ \endgroup}
+
+%D \macros
+%D {hyphenatedfilename}
+%D
+%D For the moment we treat filenames in a similar way,
+%D
+%D \starttyping
+%D \hyphenatedfilename{here/there/filename.suffix}
+%D \stoptyping
+
+\ifdefined\hyphenatedfilename \else \aliased\let\hyphenatedfilename\hyphenatedurl \fi
+
+% \def\test#1%
+% {\dontleavehmode
+% \begingroup
+% \tttf
+% \hyphenatedurl {%
+% \letterampersand #1\letterampersand #1\letterampersand #1\letterampersand #1\letterampersand
+% \letterhash #1\letterhash #1\letterpercent #1\letterslash #1\letterampersand
+% }%
+% \endgroup}
+
+% \dorecurse{100}{\test{a} \test{ab} \test{abc} \test{abcd} \test{abcde} \test{abcdef}}
+
+\protect \endinput
+
+% \setuppapersize[A7]
+%
+% \protected\def\WhateverA#1%
+% {\dontleavehmode
+% \begingroup
+% \prehyphenchar"B7\relax
+% \setbox\scratchbox\hbox{\tttf#1}%
+% \prehyphenchar`-\relax
+% \unhbox\scratchbox
+% \endgroup}
+%
+% \protected\def\WhateverB#1%
+% {\dontleavehmode
+% \begingroup
+% \tttf
+% \prehyphenchar\minusone
+% % \localrightbox{\llap{_}}%
+% \localrightbox{\llap{\smash{\lower1.5ex\hbox{\char"2192}}}}%
+% \setbox\scratchbox\hbox{#1}%
+% \prehyphenchar`-\relax
+% \unhbox\scratchbox
+% \endgroup}
+%
+% \begingroup \hsize1cm
+% \WhateverA{thisisaboringandverylongcommand}\par
+% \WhateverB{thisisaboringandverylongcommand}\par
+% \endgroup
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl
new file mode 100644
index 00000000000..ba1cfc5710d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lang-wrd.mkxl
@@ -0,0 +1,69 @@
+%D \module
+%D [ file=lang-wrd,
+%D version=2006.XX.XX,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Checking,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Experimental.
+
+\writestatus{loading}{ConTeXt Language Macros / Checking}
+
+\registerctxluafile{lang-wrd}{}
+
+\unprotect
+
+% \loadspellchecklist[en][words-en.txt]
+% \loadspellchecklist[us][words-en.txt]
+% \loadspellchecklist[nl][words-nl.txt]
+% \setupspellchecking[state=start,method=1]
+%
+% \setupspellchecking[state=start,method=2]
+% ...
+% \typefile{\jobname.words}
+%
+% beware, maybe some day we will honour grouping
+%
+% 1: spell checking
+% 2: word counting
+% 3: language coloring
+
+\installcorenamespace{spell}
+
+\installdirectcommandhandler \??spell {spellchecking}
+
+\appendtoks
+ \ifcstok{\directspellcheckingparameter\c!state}\v!start
+ \clf_enablespellchecking
+ method {\directspellcheckingparameter\c!method}%
+ list {\directspellcheckingparameter\c!list}%
+ \relax
+ \else
+ \clf_disablespellchecking
+ \fi
+\to \everysetupspellchecking
+
+\permanent\tolerant\protected\def\loadspellchecklist[#1]#*[#2]% can be public implementor
+ {\clf_loadspellchecklist{#1}{#2}}
+
+\setupspellchecking
+ [\c!state=\v!stop,
+ \c!method=1,
+ \c!list=]
+
+\definecolor[word:yes] [g=.75]
+\definecolor[word:no] [r=.75]
+
+%definecolor[word:unset] [s=.75]
+\definecolor[word:en] [b=.75]
+\definecolor[word:de] [r=.75]
+\definecolor[word:nl] [g=.75]
+\definecolor[word:unknown][r=.75,g=.75]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/layo-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/layo-ini.lmt
new file mode 100644
index 00000000000..1570075d9a1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/layo-ini.lmt
@@ -0,0 +1,115 @@
+if not modules then modules = { } end modules ['layo-ini'] = {
+ version = 1.001,
+ comment = "companion to layo-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- We need to share information between the TeX and Lua end about the typographical
+-- model. This happens here. This code might move.
+
+local texgetcount = tex.getcount
+local conditionals = tex.conditionals
+
+layouts = {
+ status = { },
+}
+
+local status = layouts.status
+
+function status.leftorrightpageaction(left,right)
+ if left == nil then
+ left, right = false, true
+ end
+ if not conditionals.layoutisdoublesided then
+ return left, right
+ elseif conditionals.layoutissinglesided then
+ return left, right
+ elseif texgetcount("pagenoshift") % 2 == 0 then
+ if texgetcount("realpageno") % 2 == 0 then
+ return right, left
+ else
+ return left, right
+ end
+ else
+ if texgetcount("realpageno") % 2 == 0 then
+ return left, right
+ else
+ return right, left
+ end
+ end
+end
+
+function status.isleftpage(r)
+ if not conditionals.layoutisdoublesided then
+ return false
+ elseif conditionals.layoutissinglesided then
+ return false
+ elseif texgetcount("pagenoshift") % 2 == 0 then
+ return (r or texgetcount("realpageno")) % 2 == 0
+ else
+ return not (r or texgetcount("realpageno")) % 2 == 0
+ end
+end
+
+-- Instead of making these these driver specific we make them generic. We can even consider
+-- to make these registers at the tex end.
+
+local canvas = {
+ pagespec = "default", -- v_default
+ paperwidth = 0,
+ paperheight = 0,
+ topoffset = 0,
+ leftoffset = 0,
+ height = 0,
+ width = 0,
+ cropoffset = 0,
+ bleedoffset = 0,
+ trimoffset = 0,
+ artoffset = 0,
+ doublesided = false,
+ marked = false,
+ copies = false,
+}
+
+function layouts.setupcanvas(specification)
+ local paperheight = specification.paperheight or canvas.paperheight
+ local paperwidth = specification.paperwidth or canvas.paperwidth
+ local cropoffset = specification.cropoffset or 0
+ local trimoffset = cropoffset - (specification.trimoffset or 0)
+ local bleedoffset = trimoffset - (specification.bleedoffset or 0)
+ local artoffset = bleedoffset - (specification.artoffset or 0)
+ --
+ canvas.paperheight = paperheight
+ canvas.paperwidth = paperwidth
+ canvas.cropoffset = cropoffset
+ canvas.trimoffset = trimoffset
+ canvas.bleedoffset = bleedoffset
+ canvas.artoffset = artoffset
+ --
+ canvas.pagespec = specification.mode or pagespec
+ canvas.topoffset = specification.topoffset or 0
+ canvas.leftoffset = specification.leftoffset or 0
+ canvas.height = specification.height or paperheight
+ canvas.width = specification.width or paperwidth
+ canvas.marked = specification.print
+ --
+ local copies = specification.copies
+ if type(copies) == "number" and copies < 2 then
+ canvas.copies = false
+ end
+ --
+ local doublesided = specification.doublesided
+ if doublesided ~= nil then
+ canvas.doublesided = doublesided
+ end
+end
+
+function layouts.getpagedimensions()
+ return canvas.paperwidth, canvas.paperheight
+end
+
+function layouts.getcanvas()
+ return canvas
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/layo-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/layo-ini.mkxl
new file mode 100644
index 00000000000..73b7e978e16
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/layo-ini.mkxl
@@ -0,0 +1,30 @@
+%D \module
+%D [ file=layo-ini,
+%D version=2011.02.18,
+%D title=\CONTEXT\ Layout Macros,
+%D subtitle=Initialization,
+%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 Layout Macros / Initialization}
+
+%D This module deals with the basic variables etc. for layout and code from other
+%D modules will move here. This will make the dependencies somewhat cleaner.
+
+\unprotect
+
+%D We need to check this in case a smaller format is loaded.
+
+\ifdefined\layoutisdoublesided \else \newconditional\layoutisdoublesided \fi
+\ifdefined\layoutissinglesided \else \newconditional\layoutissinglesided \fi
+\ifdefined\pagenoshift \else \newcount \pagenoshift \fi
+\ifdefined\realpageno \else \newcount \realpageno \fi
+
+\registerctxluafile{layo-ini}{autosuffix}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-curl.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-curl.lmt
index b307397948c..b307397948c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-curl.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-curl.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-ghostscript.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-ghostscript.lmt
index b129a58c143..b129a58c143 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-ghostscript.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-ghostscript.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-graphicsmagick.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-graphicsmagick.lmt
index 6f5d1d967fd..6f5d1d967fd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-graphicsmagick.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-graphicsmagick.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.lmt b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.lmt
new file mode 100644
index 00000000000..f8e4a990715
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.lmt
@@ -0,0 +1,58 @@
+if not modules then modules = { } end modules ['libs-imp-kpse'] = {
+ version = 1.001,
+ comment = "companion to luat-imp-kpse.mkxl",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is an experiment. It might make sense to have this available in case I want
+-- more runners to use LuaMetaTeX in which case (as with mtxrun using LuaTeX) we
+-- need to load kpse.
+
+local libname = "kpse"
+local libfile = (os.platform == "win64" and "kpathsea*w64")
+ or (os.platform == "win32" and "kpathsea*w32")
+ or "libkpathsea"
+local libkpse = resolvers.libraries.validoptional(libname)
+
+if package.loaded[libname] then
+ return package.loaded[libname]
+end
+
+-- This is a variant that loaded directly:
+
+-- kpse = libkpse -- the library will issue warnings anyway
+--
+-- resolvers.libraries.optionalloaded(libname,libfile) -- no need to chedk if true
+
+-- This variant delays loading and has a bit more protection:
+
+local function okay()
+ if libkpse and resolvers.libraries.optionalloaded(libname,libfile) then
+ okay = function() return true end
+ else
+ okay = function() return false end
+ end
+ return okay()
+end
+
+local kpse = { }
+
+for k, v in next, libkpse do
+ kpse[k] = function(...) if okay() then return v(...) end end
+end
+
+-- We properly register the module:
+
+package.loaded[libname] = kpse
+
+optional.loaded.kpse = kpse
+
+-- A simple test:
+
+-- kpse.set_program_name("pdftex")
+-- print("find file:",kpse.find_file("oeps.tex"))
+-- print("find file:",kpse.find_file("context.mkii"))
+
+return kpse
diff --git a/Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.mkxl b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.mkxl
new file mode 100644
index 00000000000..f76c9902904
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-kpse.mkxl
@@ -0,0 +1,38 @@
+%D \module
+%D [ file=libs-imp-kpse,
+%D version=2020.05.19,
+%D title=\CONTEXT\ System Modules,
+%D subtitle=KPSE File Searching,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is not really a module. It's more some left over from an experiment. Who
+%D know when it comes in handy; probably never in a real run, but I might want to
+%D make a \LUAMETATEX\ plain format one day, just for the fun of it.
+
+% \registerctxluafile{libs-imp-kpse}{autosuffix}
+
+\continueifinputfile{libs-imp-kpse.mkxl}
+
+\starttext
+
+\startTEXpage
+ \startluacode
+ local kpse = require("libs-imp-kpse")
+
+ kpse.set_program_name("pdftex")
+
+ local name = "context.mkii"
+
+ context("%s: %s",name,kpse.find_file(name))
+ \stopluacode
+\stopTEXpage
+
+\stoptext
+
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-mujs.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-mujs.lmt
index 264c8e53126..264c8e53126 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-mujs.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-mujs.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-mujs.mkxl b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-mujs.mkxl
index 0f278dff5b2..a8fe5801f39 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-mujs.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-mujs.mkxl
@@ -21,7 +21,7 @@
\expandafter \endinput
\fi
-\registerctxluafile{libs-imp-mujs}{}
+\registerctxluafile{libs-imp-mujs}{autosuffix}
\unprotect
@@ -29,7 +29,7 @@
\let\stopecmacode\relax
-\normalprotected\def\startecmacode % \stopecmacode
+\protected\def\startecmacode % \stopecmacode
{\begingroup
\obeylualines
\obeyluatokens
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-mysql.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-mysql.lmt
index 3e938a6de48..3e938a6de48 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-mysql.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-mysql.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-postgress.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-postgress.lmt
index 629079b01a5..629079b01a5 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-postgress.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-postgress.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-sqlite.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-sqlite.lmt
index 5d38986f347..5d38986f347 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-sqlite.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-sqlite.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-zint.lua b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-zint.lmt
index 2c346ae7d5f..2c346ae7d5f 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-zint.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-zint.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-zint.mkxl b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-zint.mkxl
index 72ce8157efe..b2adf05ad82 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-imp-zint.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-imp-zint.mkxl
@@ -22,13 +22,13 @@
%D There is a bit more code than needed as we want to be able to
%D feed names.
-\registerctxluafile{libs-imp-zint}{}
+\registerctxluafile{libs-imp-zint}{autosuffix}
\unprotect
\definefont[usedzintfont][dejavusansmono at 10bp]
-\unexpanded\def\barcode[#1]% [alternative=,text=]
+\permanent\protected\def\barcode[#1]% [alternative=,text=]
{\bgroup
\usedzintfont
\getdummyparameters
diff --git a/Master/texmf-dist/tex/context/base/mkiv/libs-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/libs-ini.mkxl
index 18163beed12..d77046fbffe 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/libs-ini.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/libs-ini.mkxl
@@ -11,21 +11,22 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{libs-ini}{}
+\registerctxluafile{libs-ini}{} % shared with mkiv
-\registerctxluafile{libs-imp-curl}{}
-\registerctxluafile{libs-imp-ghostscript}{}
-\registerctxluafile{libs-imp-graphicsmagick}{}
+\registerctxluafile{libs-imp-curl}{autosuffix}
+\registerctxluafile{libs-imp-ghostscript}{autosuffix}
+\registerctxluafile{libs-imp-graphicsmagick}{autosuffix}
% These are loaded on demand:
-% \registerctxluafile{libs-imp-mysql}{}
-% \registerctxluafile{libs-imp-sqlite}{}
-% \registerctxluafile{libs-imp-postgress}{}
+% \registerctxluafile{libs-imp-mysql}{autosuffix}
+% \registerctxluafile{libs-imp-sqlite}{autosuffix}
+% \registerctxluafile{libs-imp-postgress}{autosuffix}
+% \registerctxluafile{libs-imp-kpse}{autosuffix}
\unprotect
-% \unexpanded\def\uselibrary[#1]%
+% \permanent\protected\def\uselibrary[#1]%
% {\clf_uselibrary{#1}}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt
new file mode 100644
index 00000000000..86bcd4ad5dd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-ano.lmt
@@ -0,0 +1,1401 @@
+if not modules then modules = { } end modules ['lpdf-ano'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- when using rotation: \disabledirectives[refences.sharelinks] (maybe flag links)
+
+-- todo: /AA << WC << ... >> >> : WillClose actions etc
+
+-- internal references are indicated by a number (and turned into <autoprefix><number>)
+-- we only flush internal destinations that are referred
+
+local next, tostring, tonumber, rawget, type = next, tostring, tonumber, rawget, type
+local rep, format, find = string.rep, string.format, string.find
+local min = math.min
+local lpegmatch = lpeg.match
+local formatters = string.formatters
+local sortedkeys, concat = table.sortedkeys, table.concat
+
+local backends, lpdf = backends, lpdf
+
+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 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)
+
+local report_references = logs.reporter("backend","references")
+local report_destinations = logs.reporter("backend","destinations")
+local report_bookmarks = logs.reporter("backend","bookmarks")
+
+local variables = interfaces.variables
+local v_auto = variables.auto
+local v_page = variables.page
+local v_name = variables.name
+
+local factor = number.dimenfactors.bp
+
+local settings_to_array = utilities.parsers.settings_to_array
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+
+local nodeinjections = backends.pdf.nodeinjections
+local codeinjections = backends.pdf.codeinjections
+local registrations = backends.pdf.registrations
+
+local javascriptcode = interactions.javascripts.code
+
+local references = structures.references
+local bookmarks = structures.bookmarks
+
+local flaginternals = references.flaginternals
+local usedinternals = references.usedinternals
+local usedviews = references.usedviews
+
+local runners = references.runners
+local specials = references.specials
+local handlers = references.handlers
+local executers = references.executers
+
+local nodepool = nodes.pool
+
+local new_latelua = nodepool.latelua
+
+local texgetcount = tex.getcount
+
+local jobpositions = job.positions
+local getpos = jobpositions.getpos
+local gethpos = jobpositions.gethpos
+local getvpos = jobpositions.getvpos
+
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfreference = lpdf.reference
+local pdfunicode = lpdf.unicode
+local pdfconstant = lpdf.constant
+local pdfnull = lpdf.null
+local pdfaddtocatalog = lpdf.addtocatalog
+local pdfaddtonames = lpdf.addtonames
+local pdfaddtopageattributes = lpdf.addtopageattributes
+local pdfrectangle = lpdf.rectangle
+
+local pdfflushobject
+local pdfshareobjectreference
+local pdfreserveobject
+local pdfpagereference
+local pdfdelayedobject
+local pdfregisterannotation
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+ pdfshareobjectreference = lpdf.shareobjectreference
+ pdfreserveobject = lpdf.reserveobject
+ pdfpagereference = lpdf.pagereference
+ pdfdelayedobject = lpdf.delayedobject
+ pdfregisterannotation = lpdf.registerannotation
+end)
+
+-- todo: 3dview
+
+----- pdf_annot = pdfconstant("Annot")
+local pdf_uri = pdfconstant("URI")
+local pdf_gotor = pdfconstant("GoToR")
+local pdf_goto = pdfconstant("GoTo")
+local pdf_launch = pdfconstant("Launch")
+local pdf_javascript = pdfconstant("JavaScript")
+local pdf_link = pdfconstant("Link")
+local pdf_n = pdfconstant("N")
+local pdf_t = pdfconstant("T")
+local pdf_fit = pdfconstant("Fit")
+local pdf_named = pdfconstant("Named")
+
+local autoprefix = "#"
+local usedautoprefixes = { }
+
+local function registerautoprefix(name)
+ local internal = autoprefix .. name
+ if usedautoprefixes[internal] == nil then
+ usedautoprefixes[internal] = false
+ end
+ return internal
+end
+
+local function useautoprefix(name)
+ local internal = autoprefix .. name
+ usedautoprefixes[internal] = true
+ return internal
+end
+
+local function checkautoprefixes(destinations)
+ for k, v in next, usedautoprefixes do
+ if not v then
+ if trace_destinations then
+ report_destinations("flushing unused autoprefix %a",k)
+ end
+ destinations[k] = nil
+ end
+ end
+end
+
+local maxslice = 32 -- could be made configureable ... 64 is also ok
+
+local function pdfmakenametree(list,apply)
+ if not next(list) then
+ return
+ end
+ local slices = { }
+ local sorted = sortedkeys(list)
+ local size = #sorted
+ local maxslice = maxslice
+ if size <= 1.5*maxslice then
+ maxslice = size
+ end
+ for i=1,size,maxslice do
+ local amount = min(i+maxslice-1,size)
+ local names = pdfarray { }
+ local n = 0
+ for j=i,amount do
+ local name = sorted[j]
+ local target = list[name]
+ n = n + 1 ; names[n] = tostring(name)
+ n = n + 1 ; names[n] = apply and apply(target) or target
+ end
+ local first = sorted[i]
+ local last = sorted[amount]
+ local limits = pdfarray {
+ first,
+ last,
+ }
+ local d = pdfdictionary {
+ Names = names,
+ Limits = limits,
+ }
+ slices[#slices+1] = {
+ reference = pdfreference(pdfflushobject(d)),
+ limits = limits,
+ }
+ end
+ local function collectkids(slices,first,last)
+ local f = slices[first]
+ local l = slices[last]
+ if f and l then
+ local k = pdfarray()
+ local n = 0
+ local d = pdfdictionary {
+ Kids = k,
+ Limits = pdfarray {
+ f.limits[1],
+ l.limits[2],
+ },
+ }
+ for i=first,last do
+ n = n + 1 ; k[n] = slices[i].reference
+ end
+ return d
+ end
+ end
+ if #slices == 1 then
+ return slices[1].reference
+ else
+ while true do
+ local size = #slices
+ if size > maxslice then
+ local temp = { }
+ local n = 0
+ for i=1,size,maxslice do
+ local kids = collectkids(slices,i,min(i+maxslice-1,size))
+ if kids then
+ n = n + 1
+ temp[n] = {
+ reference = pdfreference(pdfflushobject(kids)),
+ limits = kids.Limits,
+ }
+ else
+ -- error
+ end
+ end
+ slices = temp
+ else
+ local kids = collectkids(slices,1,size)
+ if kids then
+ return pdfreference(pdfflushobject(kids))
+ else
+ -- error
+ return
+ end
+ end
+ end
+ end
+end
+
+lpdf.makenametree = pdfmakenametree
+
+-- Bah, I hate this kind of features .. anyway, as we have delayed resolving we
+-- only support a document-wide setup and it has to be set before the first one
+-- is used. Also, we default to a non-intrusive gray and the outline is kept
+-- thin without dashing lines. This is as far as I'm prepared to go. This way
+-- it can also be used as a debug feature.
+
+local pdf_border_style = pdfarray { 0, 0, 0 } -- radius radius linewidth
+local pdf_border_color = nil
+local set_border = false
+
+local function pdfborder()
+ set_border = true
+ return pdf_border_style, pdf_border_color
+end
+
+lpdf.border = pdfborder
+
+directives.register("references.border",function(v)
+ if v and not set_border then
+ if type(v) == "string" then
+ local m = attributes.list[attributes.private('color')] or { }
+ local c = m and m[v]
+ local v = c and attributes.colors.value(c)
+ if v then
+ local r = v[3]
+ local g = v[4]
+ local b = v[5]
+ -- if r == g and g == b then
+ -- pdf_border_color = pdfarray { r } -- reduced, not not ... bugged viewers
+ -- else
+ pdf_border_color = pdfarray { r, g, b } -- always rgb
+ -- end
+ end
+ end
+ if not pdf_border_color then
+ pdf_border_color = pdfarray { .6, .6, .6 } -- no reduce to { 0.6 } as there are buggy viewers out there
+ end
+ pdf_border_style = pdfarray { 0, 0, .5 } -- < 0.5 is not show by acrobat (at least not in my version)
+ end
+end)
+
+-- the used and flag code here is somewhat messy in the sense
+-- that it belongs in strc-ref but at the same time depends on
+-- the backend so we keep it here
+
+-- the caching is somewhat memory intense on the one hand but
+-- it saves many small temporary tables so it might pay off
+
+local pagedestinations = setmetatableindex(function(t,k)
+ k = tonumber(k)
+ if not k or k <= 0 then
+ return pdfnull()
+ end
+ local v = rawget(t,k)
+ if v then
+ -- report_references("page number expected, got %s: %a",type(k),k)
+ return v
+ end
+ local v = k > 0 and pdfarray {
+ pdfreference(pdfpagereference(k)),
+ pdf_fit,
+ } or pdfnull()
+ t[k] = v
+ return v
+end)
+
+local pagereferences = setmetatableindex(function(t,k)
+ k = tonumber(k)
+ if not k or k <= 0 then
+ return nil
+ end
+ local v = rawget(t,k)
+ if v then
+ return v
+ end
+ local v = pdfdictionary { -- can be cached
+ S = pdf_goto,
+ D = pagedestinations[k],
+ }
+ t[k] = v
+ return v
+end)
+
+local defaultdestination = pdfarray { 0, pdf_fit }
+
+-- fit is default (see lpdf-nod)
+
+local destinations = { }
+local reported = setmetatableindex("table")
+
+local function pdfregisterdestination(name,reference)
+ local d = destinations[name]
+ if d then
+ if not reported[name][reference] then
+ report_destinations("ignoring duplicate destination %a with reference %a",name,reference)
+ reported[name][reference] = true
+ end
+ else
+ destinations[name] = reference
+ end
+end
+
+lpdf.registerdestination = pdfregisterdestination
+
+logs.registerfinalactions(function()
+ if log_destinations and next(destinations) then
+ local report = logs.startfilelogging("references","used destinations")
+ local n = 0
+ for destination, pagenumber in table.sortedhash(destinations) do
+ report("% 4i : %-5s : %s",pagenumber,usedviews[destination] or defaultview,destination)
+ n = n + 1
+ end
+ logs.stopfilelogging()
+ report_destinations("%s destinations saved in log file",n)
+ end
+end)
+
+local function pdfdestinationspecification()
+ if next(destinations) then -- safeguard
+ checkautoprefixes(destinations)
+ local r = pdfmakenametree(destinations,pdfreference)
+ if r then
+ pdfaddtonames("Dests",r)
+ end
+ if not log_destinations then
+ destinations = nil
+ end
+ end
+end
+
+lpdf.destinationspecification = pdfdestinationspecification
+
+lpdf.registerdocumentfinalizer(pdfdestinationspecification,"collect destinations")
+
+-- todo
+
+local destinations = { }
+
+local f_xyz = formatters["<< /D [ %i 0 R /XYZ %.6N %.6N null ] >>"]
+local f_fit = formatters["<< /D [ %i 0 R /Fit ] >>"]
+local f_fitb = formatters["<< /D [ %i 0 R /FitB ] >>"]
+local f_fith = formatters["<< /D [ %i 0 R /FitH %.6N ] >>"]
+local f_fitv = formatters["<< /D [ %i 0 R /FitV %.6N ] >>"]
+local f_fitbh = formatters["<< /D [ %i 0 R /FitBH %.6N ] >>"]
+local f_fitbv = formatters["<< /D [ %i 0 R /FitBV %.6N ] >>"]
+local f_fitr = formatters["<< /D [ %i 0 R /FitR %.6N %.6N %.6N %.6N ] >>"]
+
+local v_standard = variables.standard
+local v_frame = variables.frame
+local v_width = variables.width
+local v_minwidth = variables.minwidth
+local v_height = variables.height
+local v_minheight = variables.minheight
+local v_fit = variables.fit
+local v_tight = variables.tight
+
+-- nicer is to create dictionaries and set properties but it's a bit overkill
+
+-- The problem with the following settings is that they are guesses: we never know
+-- if a box is part of something larger that needs to be in view, or that we are
+-- dealing with a vbox or vtop so the used h/d values cannot be trusted in a tight
+-- view. Of course some decent additional offset would be nice so maybe i'll add
+-- that some day. I never use anything else than 'fit' anyway as I think that the
+-- document should fit the device (and vice versa). In fact, with todays swipe
+-- and finger zooming this whole view is rather useless and as with any zooming
+-- one looses the overview and keeps zooming.
+
+-- todo: scaling
+
+-- local destinationactions = {
+-- [v_standard] = function(r,w,h,d) return f_xyz (r,gethpos()*factor,(getvpos()+h)*factor) end, -- local left,top with no zoom
+-- [v_frame] = function(r,w,h,d) return f_fitr (r,pdfrectangle(w,h,d)) end, -- fit rectangle in window
+-- [v_width] = function(r,w,h,d) return f_fith (r,(getvpos()+h)*factor) end, -- top coordinate, fit width of page in window
+-- [v_minwidth] = function(r,w,h,d) return f_fitbh(r,(getvpos()+h)*factor) end, -- top coordinate, fit width of content in window
+-- [v_height] = function(r,w,h,d) return f_fitv (r,gethpos()*factor) end, -- left coordinate, fit height of page in window
+-- [v_minheight] = function(r,w,h,d) return f_fitbv(r,gethpos()*factor) end, -- left coordinate, fit height of content in window [v_fit] = f_fit, -- fit page in window
+-- [v_tight] = f_fitb, -- fit content in window
+-- [v_fit] = f_fit,
+-- }
+
+local destinationactions = {
+ [v_standard] = function(r,w,h,d,o) -- local left,top with no zoom
+ local tx, ty = getpos()
+ return f_xyz(r,tx*factor,(ty+h+2*o)*factor) -- we can assume margins
+ end,
+ [v_frame] = function(r,w,h,d,o) -- fit rectangle in window
+ return f_fitr(r,pdfrectangle(w,h,d,o))
+ end,
+ [v_width] = function(r,w,h,d,o) -- top coordinate, fit width of page in window
+ return f_fith(r,(getvpos()+h+o)*factor)
+ end,
+ [v_minwidth] = function(r,w,h,d,o) -- top coordinate, fit width of content in window
+ return f_fitbh(r,(getvpos()+h+o)*factor)
+ end,
+ [v_height] = function(r,w,h,d,o) -- left coordinate, fit height of page in window
+ return f_fitv(r,(gethpos())*factor)
+ end,
+ [v_minheight] = function(r,w,h,d,o) -- left coordinate, fit height of content in window
+ return f_fitbv(r,(gethpos())*factor)
+ end,
+ [v_tight] = f_fitb, -- fit content in window
+ [v_fit] = f_fit, -- fit content in window
+}
+
+local mapping = {
+ [v_standard] = v_standard, xyz = v_standard,
+ [v_frame] = v_frame, fitr = v_frame,
+ [v_width] = v_width, fith = v_width,
+ [v_minwidth] = v_minwidth, fitbh = v_minwidth,
+ [v_height] = v_height, fitv = v_height,
+ [v_minheight] = v_minheight, fitbv = v_minheight,
+ [v_fit] = v_fit, fit = v_fit,
+ [v_tight] = v_tight, fitb = v_tight,
+}
+
+local defaultview = v_fit
+local defaultaction = destinationactions[defaultview]
+local offset = 0 -- 65536*5
+
+directives.register("destinations.offset", function(v)
+ offset = string.todimen(v) or 0
+end)
+
+-- A complication is that we need to use named destinations when we have views so we
+-- end up with a mix. A previous versions just output multiple destinations but now
+-- that we moved all to here we can be more sparse.
+
+local pagedestinations = setmetatableindex(function(t,k) -- not the same as the one above!
+ local v = pdfdelayedobject(f_fit(k))
+ t[k] = v
+ return v
+end)
+
+local function flushdestination(specification)
+ local names = specification.names
+ local view = specification.view
+ local r = pdfpagereference(texgetcount("realpageno"))
+ if (references.innermethod ~= v_name) and (view == defaultview or not view or view == "") then
+ r = pagedestinations[r]
+ else
+ local action = view and destinationactions[view] or defaultaction
+ r = pdfdelayedobject(action(r,specification.width,specification.height,specification.depth,offset))
+ end
+ for n=1,#names do
+ local name = names[n]
+ if name then
+ pdfregisterdestination(name,r)
+ end
+ end
+end
+
+function nodeinjections.destination(width,height,depth,names,view)
+ -- todo check if begin end node / was comment
+ view = view and mapping[view] or defaultview
+ if trace_destinations then
+ report_destinations("width %p, height %p, depth %p, names %|t, view %a",width,height,depth,names,view)
+ end
+ local method = references.innermethod
+ local noview = view == defaultview
+ local doview = false
+ -- we could save some aut's by using a name when given but it doesn't pay off apart
+ -- from making the code messy and tracing hard .. we only save some destinations
+ -- which we already share anyway
+ if method == v_page then
+ for n=1,#names do
+ local name = names[n]
+ local used = usedviews[name]
+ if used and used ~= true then
+ -- already done, maybe a warning
+ elseif type(name) == "number" then
+ -- if noview then
+ -- usedviews[name] = view
+ -- names[n] = false
+ -- else
+ usedviews[name] = view
+ names[n] = false
+ -- end
+ else
+ usedviews[name] = view
+ 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
+ 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
+ usedviews[name] = view
+ names[n] = registerautoprefix(name)
+ doview = true
+ else
+ names[n] = false
+ end
+ end
+ else
+ usedviews[name] = view
+ doview = true
+ end
+ end
+ end
+ if doview then
+ return new_latelua {
+ action = flushdestination,
+ width = width,
+ height = height,
+ depth = depth,
+ names = names,
+ view = view,
+ }
+ end
+end
+
+-- we could share dictionaries ... todo
+
+local function pdflinkpage(page)
+ return pagereferences[page]
+end
+
+local function pdflinkinternal(internal,page)
+ -- local method = references.innermethod
+ if internal then
+ flaginternals[internal] = true -- for bookmarks and so
+ local used = usedinternals[internal]
+ if used == defaultview or used == true then
+ return pagereferences[page]
+ else
+ if type(internal) ~= "string" then
+ internal = useautoprefix(internal)
+ end
+ return pdfdictionary {
+ S = pdf_goto,
+ D = internal,
+ }
+ end
+ else
+ return pagereferences[page]
+ end
+end
+
+local function pdflinkname(destination,internal,page)
+ local method = references.innermethod
+ if method == v_auto then
+ local used = defaultview
+ if internal then
+ flaginternals[internal] = true -- for bookmarks and so
+ used = usedinternals[internal] or defaultview
+ end
+ if used == defaultview then -- or used == true then
+ return pagereferences[page]
+ else
+ return pdfdictionary {
+ S = pdf_goto,
+ D = destination,
+ }
+ end
+ elseif method == v_name then
+ -- flaginternals[internal] = true -- for bookmarks and so
+ return pdfdictionary {
+ S = pdf_goto,
+ D = destination,
+ }
+ else
+ return pagereferences[page]
+ end
+end
+
+-- annotations
+
+local function pdffilelink(filename,destination,page,actions)
+ if not filename or filename == "" or file.basename(filename) == tex.jobname then
+ return false
+ 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
+
+local function pdfurllink(url,destination,page)
+ if not url or url == "" then
+ return false
+ end
+ if untex_urls then
+ url = untex(url) -- last minute cleanup of \* and spaces
+ end
+ if destination and destination ~= "" then
+ url = url .. "#" .. destination
+ end
+ return pdfdictionary {
+ S = pdf_uri,
+ URI = url,
+ }
+end
+
+local function pdflaunch(program,parameters)
+ if not program or program == "" then
+ return false
+ end
+ return pdfdictionary {
+ S = pdf_launch,
+ F = program,
+ D = ".",
+ P = parameters ~= "" and parameters or nil
+ }
+end
+
+local function pdfjavascript(name,arguments)
+ local script = javascriptcode(name,arguments) -- make into object (hash)
+ if script then
+ return pdfdictionary {
+ S = pdf_javascript,
+ JS = script,
+ }
+ end
+end
+
+local function pdfaction(actions)
+ local nofactions = #actions
+ if nofactions > 0 then
+ local a = actions[1]
+ local action = runners[a.kind]
+ if action then
+ action = action(a,actions)
+ end
+ if action then
+ local first = action
+ for i=2,nofactions do
+ local a = actions[i]
+ local what = runners[a.kind]
+ if what then
+ what = what(a,actions)
+ end
+ if action == what then
+ -- ignore this one, else we get a loop
+ elseif what then
+ action.Next = what
+ action = what
+ else
+ -- error
+ return nil
+ end
+ end
+ return first, actions.n or #actions
+ end
+ end
+end
+
+lpdf.action = pdfaction
+
+function codeinjections.prerollreference(actions) -- share can become option
+ if actions then
+ local main, n = pdfaction(actions)
+ if main then
+ local bs, bc = pdfborder()
+ main = pdfdictionary {
+ Subtype = pdf_link,
+ -- Border = bs,
+ Border = pdfshareobjectreference(bs),
+ C = bc,
+ H = (not actions.highlight and pdf_n) or nil,
+ A = pdfshareobjectreference(main),
+ F = 4, -- print (mandate in pdf/a)
+ }
+ return main("A"), n
+ end
+ end
+end
+
+-- local function use_normal_annotations()
+--
+-- local function reference(width,height,depth,prerolled) -- keep this one
+-- if prerolled then
+-- if trace_references then
+-- report_references("width %p, height %p, depth %p, prerolled %a",width,height,depth,prerolled)
+-- end
+-- return pdfannotation_node(width,height,depth,prerolled)
+-- end
+-- end
+--
+-- local function finishreference()
+-- end
+--
+-- return reference, finishreference
+--
+-- end
+
+-- eventually we can do this for special refs only
+
+local hashed = { }
+local nofunique = 0
+local nofused = 0
+local nofspecial = 0
+local share = true
+
+local f_annot = formatters["<< /Type /Annot %s /Rect [ %.6N %.6N %.6N %.6N ] >>"]
+local f_quadp = formatters["<< /Type /Annot %s /QuadPoints [ %s ] /Rect [ %.6N %.6N %.6N %.6N ] >>"]
+
+directives.register("references.sharelinks", function(v)
+ share = v
+end)
+
+setmetatableindex(hashed,function(t,k)
+ local v = pdfdelayedobject(k)
+ if share then
+ t[k] = v
+ end
+ nofunique = nofunique + 1
+ return v
+end)
+
+local function toquadpoints(paths)
+ local t, n = { }, 0
+ for i=1,#paths do
+ local path = paths[i]
+ local size = #path
+ for j=1,size do
+ local p = path[j]
+ n = n + 1 ; t[n] = p[1]
+ n = n + 1 ; t[n] = p[2]
+ end
+ local m = size % 4
+ if m > 0 then
+ local p = path[size]
+ for j=size+1,m do
+ n = n + 1 ; t[n] = p[1]
+ n = n + 1 ; t[n] = p[2]
+ end
+ end
+ end
+ return concat(t," ")
+end
+
+local function finishreference(specification)
+ local prerolled = specification.prerolled
+ local quadpoints = specification.mesh
+ local llx, lly,
+ urx, ury = pdfrectangle(specification.width,specification.height,specification.depth)
+ local specifier = nil
+ if quadpoints and #quadpoints > 0 then
+ specifier = f_quadp(prerolled,toquadpoints(quadpoints),llx,lly,urx,ury)
+ else
+ specifier = f_annot(prerolled,llx,lly,urx,ury)
+ end
+ nofused = nofused + 1
+ return pdfregisterannotation(hashed[specifier])
+end
+
+local function finishannotation(specification)
+ local prerolled = specification.prerolled
+ local objref = specification.objref
+ if type(prerolled) == "function" then
+ prerolled = prerolled()
+ end
+ local annot = f_annot(prerolled,pdfrectangle(specification.width,specification.height,specification.depth))
+ if objref then
+ pdfdelayedobject(annot,objref)
+ else
+ objref = pdfdelayedobject(annot)
+ end
+ nofspecial = nofspecial + 1
+ return pdfregisterannotation(objref)
+end
+
+function nodeinjections.reference(width,height,depth,prerolled,mesh)
+ if prerolled then
+ if trace_references then
+ report_references("link: width %p, height %p, depth %p, prerolled %a",width,height,depth,prerolled)
+ end
+ return new_latelua {
+ action = finishreference,
+ width = width,
+ height = height,
+ depth = depth,
+ prerolled = prerolled,
+ mesh = mesh,
+ }
+ end
+end
+
+function nodeinjections.annotation(width,height,depth,prerolled,objref)
+ if prerolled then
+ if trace_references then
+ report_references("special: width %p, height %p, depth %p, prerolled %a",width,height,depth,
+ type(prerolled) == "string" and prerolled or "-")
+ end
+ return new_latelua {
+ action = finishannotation,
+ width = width,
+ height = height,
+ depth = depth,
+ prerolled = prerolled,
+ objref = objref or false,
+ }
+ end
+end
+
+-- beware, we register during a latelua sweep so we have to make sure that
+-- we finalize after that (also in a latelua for the moment as we have no
+-- callback yet)
+
+local annotations = nil
+
+function lpdf.registerannotation(n)
+ if annotations then
+ annotations[#annotations+1] = pdfreference(n)
+ else
+ annotations = pdfarray { pdfreference(n) } -- no need to use lpdf.array cum suis
+ end
+end
+
+pdfregisterannotation = lpdf.registerannotation
+
+function lpdf.annotationspecification()
+ if annotations then
+ local r = pdfdelayedobject(tostring(annotations)) -- delayed so okay in latelua
+ if r then
+ pdfaddtopageattributes("Annots",pdfreference(r))
+ end
+ annotations = nil
+ end
+end
+
+lpdf.registerpagefinalizer(lpdf.annotationspecification,"finalize annotations")
+
+statistics.register("pdf annotations", function()
+ if nofused > 0 or nofspecial > 0 then
+ return format("%s links (%s unique), %s special",nofused,nofunique,nofspecial)
+ else
+ return nil
+ end
+end)
+
+-- runners and specials
+
+local splitter = lpeg.splitat(",",true)
+
+runners["inner"] = function(var,actions)
+ local internal = false
+ local name = nil
+ local method = references.innermethod
+ local vi = var.i
+ local page = var.r
+ if vi then
+ local vir = vi.references
+ if vir then
+ -- todo: no need for it when we have a real reference ... although we need
+ -- this mess for prefixes anyway
+ local reference = vir.reference
+ if reference and reference ~= "" then
+ reference = lpegmatch(splitter,reference) or reference
+ var.inner = reference
+ local prefix = var.p
+ if prefix and prefix ~= "" then
+ var.prefix = prefix
+ name = prefix .. ":" .. reference
+ else
+ name = reference
+ end
+ end
+ internal = vir.internal
+ if internal then
+ flaginternals[internal] = true
+ end
+ end
+ end
+ if name then
+ return pdflinkname(name,internal,page)
+ elseif internal then
+ return pdflinkinternal(internal,page)
+ elseif page then
+ return pdflinkpage(page)
+ else
+ -- real bad
+ end
+end
+
+runners["inner with arguments"] = function(var,actions)
+ report_references("todo: inner with arguments")
+ return false
+end
+
+runners["outer"] = function(var,actions)
+ local file, url = references.checkedfileorurl(var.outer,var.outer)
+ if file then
+ return pdffilelink(file,var.arguments,nil,actions)
+ elseif url then
+ return pdfurllink(url,var.arguments,nil,actions)
+ end
+end
+
+runners["outer with inner"] = function(var,actions)
+ return pdffilelink(references.checkedfile(var.outer),var.inner,var.r,actions)
+end
+
+runners["special outer with operation"] = function(var,actions)
+ local handler = specials[var.special]
+ return handler and handler(var,actions)
+end
+
+runners["special outer"] = function(var,actions)
+ report_references("todo: special outer")
+ return false
+end
+
+runners["special"] = function(var,actions)
+ local handler = specials[var.special]
+ return handler and handler(var,actions)
+end
+
+runners["outer with inner with arguments"] = function(var,actions)
+ report_references("todo: outer with inner with arguments")
+ return false
+end
+
+runners["outer with special and operation and arguments"] = function(var,actions)
+ report_references("todo: outer with special and operation and arguments")
+ return false
+end
+
+runners["outer with special"] = function(var,actions)
+ report_references("todo: outer with special")
+ return false
+end
+
+runners["outer with special and operation"] = function(var,actions)
+ report_references("todo: outer with special and operation")
+ return false
+end
+
+runners["special operation"] = runners["special"]
+runners["special operation with arguments"] = runners["special"]
+
+local reported = { }
+
+function specials.internal(var,actions) -- better resolve in strc-ref
+ local o = var.operation
+ local i = o and tonumber(o)
+ local v = i and references.internals[i]
+ if v then
+ flaginternals[i] = true -- also done in pdflinkinternal
+ return pdflinkinternal(i,v.references.realpage)
+ end
+ local v = i or o or "<unset>"
+ if not reported[v] then
+ report_references("no internal reference %a",v)
+ reported[v] = true
+ end
+end
+
+-- realpage already resolved
+
+specials.i = specials.internal
+
+local pages = references.pages
+
+function specials.page(var,actions)
+ local file = var.f
+ if file then
+ return pdffilelink(references.checkedfile(file),nil,var.operation,actions)
+ else
+ local p = var.r
+ if not p then -- todo: call special from reference code
+ p = pages[var.operation]
+ if type(p) == "function" then -- double
+ p = p()
+ else
+ p = references.realpageofpage(tonumber(p))
+ end
+ end
+ return pdflinkpage(p or var.operation)
+ end
+end
+
+function specials.realpage(var,actions)
+ local file = var.f
+ if file then
+ return pdffilelink(references.checkedfile(file),nil,var.operation,actions)
+ else
+ return pdflinkpage(var.operation)
+ end
+end
+
+function specials.userpage(var,actions)
+ local file = var.f
+ if file then
+ return pdffilelink(references.checkedfile(file),nil,var.operation,actions)
+ else
+ local p = var.r
+ if not p then -- todo: call special from reference code
+ p = var.operation
+ if p then -- no function and special check here. only numbers
+ p = references.realpageofpage(tonumber(p))
+ end
+ -- if p then
+ -- var.r = p
+ -- end
+ end
+ return pdflinkpage(p or var.operation)
+ end
+end
+
+function specials.deltapage(var,actions)
+ local p = tonumber(var.operation)
+ if p then
+ p = references.checkedrealpage(p + texgetcount("realpageno"))
+ return pdflinkpage(p)
+ end
+end
+
+-- sections
+
+function specials.section(var,actions)
+ -- a bit duplicate
+ local sectionname = var.arguments
+ local destination = var.operation
+ local internal = structures.sections.internalreference(sectionname,destination)
+ if internal then
+ var.special = "internal"
+ var.operation = internal
+ var.arguments = nil
+ return specials.internal(var,actions)
+ end
+end
+
+-- todo, do this in references namespace ordered instead (this is an experiment)
+
+local splitter = lpeg.splitat(":")
+
+function specials.order(var,actions) -- references.specials !
+ local operation = var.operation
+ if operation then
+ local kind, name, n = lpegmatch(splitter,operation)
+ local order = structures.lists.ordered[kind]
+ order = order and order[name]
+ local v = order[tonumber(n)]
+ local r = v and v.references.realpage
+ if r then
+ var.operation = r -- brrr, but test anyway
+ return specials.page(var,actions)
+ end
+ end
+end
+
+function specials.url(var,actions)
+ return pdfurllink(references.checkedurl(var.operation),var.arguments,nil,actions)
+end
+
+function specials.file(var,actions)
+ return pdffilelink(references.checkedfile(var.operation),var.arguments,nil,actions)
+end
+
+function specials.fileorurl(var,actions)
+ local file, url = references.checkedfileorurl(var.operation,var.operation)
+ if file then
+ return pdffilelink(file,var.arguments,nil,actions)
+ elseif url then
+ return pdfurllink(url,var.arguments,nil,actions)
+ end
+end
+
+function specials.program(var,content)
+ local program = references.checkedprogram(var.operation)
+ return pdflaunch(program,var.arguments)
+end
+
+function specials.javascript(var)
+ return pdfjavascript(var.operation,var.arguments)
+end
+
+specials.JS = specials.javascript
+
+executers.importform = pdfdictionary { S = pdf_named, N = pdfconstant("AcroForm:ImportFDF") }
+executers.exportform = pdfdictionary { S = pdf_named, N = pdfconstant("AcroForm:ExportFDF") }
+executers.first = pdfdictionary { S = pdf_named, N = pdfconstant("FirstPage") }
+executers.previous = pdfdictionary { S = pdf_named, N = pdfconstant("PrevPage") }
+executers.next = pdfdictionary { S = pdf_named, N = pdfconstant("NextPage") }
+executers.last = pdfdictionary { S = pdf_named, N = pdfconstant("LastPage") }
+executers.backward = pdfdictionary { S = pdf_named, N = pdfconstant("GoBack") }
+executers.forward = pdfdictionary { S = pdf_named, N = pdfconstant("GoForward") }
+executers.print = pdfdictionary { S = pdf_named, N = pdfconstant("Print") }
+executers.exit = pdfdictionary { S = pdf_named, N = pdfconstant("Quit") }
+executers.close = pdfdictionary { S = pdf_named, N = pdfconstant("Close") }
+executers.save = pdfdictionary { S = pdf_named, N = pdfconstant("Save") }
+executers.savenamed = pdfdictionary { S = pdf_named, N = pdfconstant("SaveAs") }
+executers.opennamed = pdfdictionary { S = pdf_named, N = pdfconstant("Open") }
+executers.help = pdfdictionary { S = pdf_named, N = pdfconstant("HelpUserGuide") }
+executers.toggle = pdfdictionary { S = pdf_named, N = pdfconstant("FullScreen") }
+executers.search = pdfdictionary { S = pdf_named, N = pdfconstant("Find") }
+executers.searchagain = pdfdictionary { S = pdf_named, N = pdfconstant("FindAgain") }
+executers.gotopage = pdfdictionary { S = pdf_named, N = pdfconstant("GoToPage") }
+executers.query = pdfdictionary { S = pdf_named, N = pdfconstant("AcroSrch:Query") }
+executers.queryagain = pdfdictionary { S = pdf_named, N = pdfconstant("AcroSrch:NextHit") }
+executers.fitwidth = pdfdictionary { S = pdf_named, N = pdfconstant("FitWidth") }
+executers.fitheight = pdfdictionary { S = pdf_named, N = pdfconstant("FitHeight") }
+
+local function fieldset(arguments)
+ -- [\dogetfieldset{#1}]
+ return nil
+end
+
+function executers.resetform(arguments)
+ arguments = (type(arguments) == "table" and arguments) or settings_to_array(arguments)
+ return pdfdictionary {
+ S = pdfconstant("ResetForm"),
+ Field = fieldset(arguments[1])
+ }
+end
+
+local formmethod = "post" -- "get" "post"
+local formformat = "xml" -- "xml" "html" "fdf"
+
+-- bit 3 = html bit 6 = xml bit 4 = get
+
+local flags = {
+ get = {
+ html = 12, fdf = 8, xml = 40,
+ },
+ post = {
+ html = 4, fdf = 0, xml = 32,
+ }
+}
+
+function executers.submitform(arguments)
+ arguments = (type(arguments) == "table" and arguments) or settings_to_array(arguments)
+ local flag = flags[formmethod] or flags.post
+ flag = (flag and (flag[formformat] or flag.xml)) or 32 -- default: post, xml
+ return pdfdictionary {
+ S = pdfconstant("SubmitForm"),
+ F = arguments[1],
+ Field = fieldset(arguments[2]),
+ Flags = flag,
+ -- \PDFsubmitfiller
+ }
+end
+
+local pdf_hide = pdfconstant("Hide")
+
+function executers.hide(arguments)
+ return pdfdictionary {
+ S = pdf_hide,
+ H = true,
+ T = arguments,
+ }
+end
+
+function executers.show(arguments)
+ return pdfdictionary {
+ S = pdf_hide,
+ H = false,
+ T = arguments,
+ }
+end
+
+local pdf_movie = pdfconstant("Movie")
+local pdf_start = pdfconstant("Start")
+local pdf_stop = pdfconstant("Stop")
+local pdf_resume = pdfconstant("Resume")
+local pdf_pause = pdfconstant("Pause")
+
+local function movie_or_sound(operation,arguments)
+ arguments = (type(arguments) == "table" and arguments) or settings_to_array(arguments)
+ return pdfdictionary {
+ S = pdf_movie,
+ T = format("movie %s",arguments[1] or "noname"),
+ Operation = operation,
+ }
+end
+
+function executers.startmovie (arguments) return movie_or_sound(pdf_start ,arguments) end
+function executers.stopmovie (arguments) return movie_or_sound(pdf_stop ,arguments) end
+function executers.resumemovie(arguments) return movie_or_sound(pdf_resume,arguments) end
+function executers.pausemovie (arguments) return movie_or_sound(pdf_pause ,arguments) end
+
+function executers.startsound (arguments) return movie_or_sound(pdf_start ,arguments) end
+function executers.stopsound (arguments) return movie_or_sound(pdf_stop ,arguments) end
+function executers.resumesound(arguments) return movie_or_sound(pdf_resume,arguments) end
+function executers.pausesound (arguments) return movie_or_sound(pdf_pause ,arguments) end
+
+function specials.action(var)
+ local operation = var.operation
+ if var.operation and operation ~= "" then
+ local e = executers[operation]
+ if type(e) == "table" then
+ return e
+ elseif type(e) == "function" then
+ return e(var.arguments)
+ end
+ end
+end
+
+local function build(levels,start,parent,method,nested)
+ local startlevel = levels[start].level
+ local noflevels = #levels
+ local i = start
+ local n = 0
+ local child, entry, m, prev, first, last, f, l
+ while i and i <= noflevels do
+ local current = levels[i]
+ if current.usedpage == false then
+ -- safeguard
+ i = i + 1
+ else
+ local level = current.level
+ local title = current.title
+ local reference = current.reference
+ local opened = current.opened
+ local reftype = type(reference)
+ local block = nil
+ local variant = "unknown"
+ if reftype == "table" then
+ -- we're okay
+ variant = "list"
+ block = reference.block
+ realpage = reference.realpage
+ elseif reftype == "string" then
+ local resolved = references.identify("",reference)
+ realpage = resolved and structures.references.setreferencerealpage(resolved) or 0
+ if realpage > 0 then
+ variant = "realpage"
+ realpage = realpage
+ reference = structures.pages.collected[realpage]
+ block = reference and reference.block
+ end
+ elseif reftype == "number" then
+ if reference > 0 then
+ variant = "realpage"
+ realpage = reference
+ reference = structures.pages.collected[realpage]
+ block = reference and reference.block
+ end
+ else
+ -- error
+ end
+ current.block = block
+ if variant == "unknown" then
+ -- error, ignore
+ i = i + 1
+ -- elseif (level < startlevel) or (i > 1 and block ~= levels[i-1].reference.block) then
+ elseif (level < startlevel) or (i > 1 and block ~= levels[i-1].block) then
+ if nested then -- could be an option but otherwise we quit too soon
+ if entry then
+ pdfflushobject(child,entry)
+ else
+ report_bookmarks("error 1")
+ end
+ return i, n, first, last
+ else
+ report_bookmarks("confusing level change at level %a around %a",level,title)
+ startlevel = level
+ end
+ end
+ if level == startlevel then
+ if trace_bookmarks then
+ report_bookmarks("%3i %w%s %s",realpage,(level-1)*2,(opened and "+") or "-",title)
+ end
+ local prev = child
+ child = pdfreserveobject()
+ if entry then
+ entry.Next = child and pdfreference(child)
+ pdfflushobject(prev,entry)
+ end
+ local action = nil
+ if variant == "list" then
+ action = pdflinkinternal(reference.internal,reference.realpage)
+ elseif variant == "realpage" then
+ action = pagereferences[realpage]
+ else
+ -- hm, what to do
+ end
+ entry = pdfdictionary {
+ Title = pdfunicode(title),
+ Parent = parent,
+ Prev = prev and pdfreference(prev),
+ A = action,
+ }
+ -- entry.Dest = pdflinkinternal(reference.internal,reference.realpage)
+ if not first then
+ first, last = child, child
+ end
+ prev = child
+ last = prev
+ n = n + 1
+ i = i + 1
+ elseif i < noflevels and level > startlevel then
+ i, m, f, l = build(levels,i,pdfreference(child),method,true)
+ if entry then
+ entry.Count = (opened and m) or -m
+ if m > 0 then
+ entry.First = pdfreference(f)
+ entry.Last = pdfreference(l)
+ end
+ else
+ report_bookmarks("error 2")
+ end
+ else
+ -- missing intermediate level but ok
+ i, m, f, l = build(levels,i,pdfreference(child),method,true)
+ if entry then
+ entry.Count = (opened and m) or -m
+ if m > 0 then
+ entry.First = pdfreference(f)
+ entry.Last = pdfreference(l)
+ end
+ pdfflushobject(child,entry)
+ else
+ report_bookmarks("error 3")
+ end
+ return i, n, first, last
+ end
+ end
+ end
+ pdfflushobject(child,entry)
+ return nil, n, first, last
+end
+
+function codeinjections.addbookmarks(levels,method)
+ if levels and #levels > 0 then
+ local parent = pdfreserveobject()
+ local _, m, first, last = build(levels,1,pdfreference(parent),method or "internal",false)
+ local dict = pdfdictionary {
+ Type = pdfconstant("Outlines"),
+ First = pdfreference(first),
+ Last = pdfreference(last),
+ Count = m,
+ }
+ pdfflushobject(parent,dict)
+ pdfaddtocatalog("Outlines",lpdf.reference(parent))
+ end
+end
+
+-- this could also be hooked into the frontend finalizer
+
+lpdf.registerdocumentfinalizer(function() bookmarks.place() end,1,"bookmarks") -- hm, why indirect call
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-aux.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-aux.lmt
new file mode 100644
index 00000000000..91636ad04e0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-aux.lmt
@@ -0,0 +1,153 @@
+if not modules then modules = { } end modules ['lpdf-aux'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local tonumber = tonumber
+local format, concat = string.format, table.concat
+local utfchar, utfbyte, char = utf.char, utf.byte, string.char
+local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
+local P, C, R, S, Cc, Cs, V = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc, lpeg.Cs, lpeg.V
+local rshift = bit32.rshift
+
+lpdf = lpdf or { }
+
+-- tosixteen --
+
+local cache = table.setmetatableindex(function(t,k) -- can be made weak
+ local v = utfbyte(k)
+ if v < 0x10000 then
+ v = format("%04x",v)
+ else
+ v = v - 0x10000
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
+ end
+ t[k] = v
+ return v
+end)
+
+local unified = Cs(Cc("<feff") * (lpegpatterns.utf8character/cache)^1 * Cc(">"))
+
+function lpdf.tosixteen(str) -- an lpeg might be faster (no table)
+ if not str or str == "" then
+ return "<feff>" -- not () as we want an indication that it's unicode
+ else
+ return lpegmatch(unified,str)
+ end
+end
+
+-- fromsixteen --
+
+-- local zero = S(" \n\r\t") + P("\\ ")
+-- local one = C(4)
+-- local two = P("d") * R("89","af") * C(2) * C(4)
+--
+-- local pattern = P { "start",
+-- start = V("wrapped") + V("unwrapped") + V("original"),
+-- original = Cs(P(1)^0),
+-- wrapped = P("<") * V("unwrapped") * P(">") * P(-1),
+-- unwrapped = P("feff")
+-- * Cs( (
+-- zero / ""
+-- + two / function(a,b)
+-- a = (tonumber(a,16) - 0xD800) * 1024
+-- b = (tonumber(b,16) - 0xDC00)
+-- return utfchar(a+b)
+-- end
+-- + one / function(a)
+-- return utfchar(tonumber(a,16))
+-- end
+-- )^1 ) * P(-1)
+-- }
+--
+-- function lpdf.fromsixteen(s)
+-- return lpegmatch(pattern,s) or s
+-- end
+
+local more = 0
+
+local pattern = C(4) / function(s) -- needs checking !
+ local now = tonumber(s,16)
+ if more > 0 then
+ now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000
+ more = 0
+ return utfchar(now)
+ elseif now >= 0xD800 and now <= 0xDBFF then
+ more = now
+ return "" -- else the c's end up in the stream
+ else
+ return utfchar(now)
+ end
+end
+
+local pattern = P(true) / function() more = 0 end * Cs(pattern^0)
+
+function lpdf.fromsixteen(str)
+ if not str or str == "" then
+ return ""
+ else
+ return lpegmatch(pattern,str)
+ end
+end
+
+-- frombytes --
+
+local b_pattern = Cs((P("\\")/"" * (
+ S("()")
+ + S("nrtbf")/ { n = "\n", r = "\r", t = "\t", b = "\b", f = "\f" }
+ + lpegpatterns.octdigit^-3 / function(s) return char(tonumber(s,8)) end)
++ P(1))^0)
+
+local u_pattern = lpegpatterns.utfbom_16_be * lpegpatterns.utf16_to_utf8_be -- official
+ + lpegpatterns.utfbom_16_le * lpegpatterns.utf16_to_utf8_le -- we've seen these
+
+local h_pattern = lpegpatterns.hextobytes
+
+local zero = S(" \n\r\t") + P("\\ ")
+local one = C(4)
+local two = P("d") * R("89","af") * C(2) * C(4)
+
+local x_pattern = P { "start",
+ start = V("wrapped") + V("unwrapped") + V("original"),
+ original = Cs(P(1)^0),
+ wrapped = P("<") * V("unwrapped") * P(">") * P(-1),
+ unwrapped = P("feff")
+ * Cs( (
+ zero / ""
+ + two / function(a,b)
+ a = (tonumber(a,16) - 0xD800) * 1024
+ b = (tonumber(b,16) - 0xDC00)
+ return utfchar(a+b)
+ end
+ + one / function(a)
+ return utfchar(tonumber(a,16))
+ end
+ )^1 ) * P(-1)
+}
+
+function lpdf.frombytes(s,hex)
+ if not s or s == "" then
+ return ""
+ end
+ if hex then
+ local x = lpegmatch(x_pattern,s)
+ if x then
+ return x
+ end
+ local h = lpegmatch(h_pattern,s)
+ if h then
+ return h
+ end
+ else
+ local u = lpegmatch(u_pattern,s)
+ if u then
+ return u
+ end
+ end
+ return lpegmatch(b_pattern,s)
+end
+
+-- done --
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-col.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-col.lmt
new file mode 100644
index 00000000000..ea60e0551d8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-col.lmt
@@ -0,0 +1,837 @@
+if not modules then modules = { } end modules ['lpdf-col'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, next, tostring, tonumber = type, next, tostring, tonumber
+local char, byte, format, gsub, rep, gmatch = string.char, string.byte, string.format, string.gsub, string.rep, string.gmatch
+local settings_to_array, settings_to_numbers = utilities.parsers.settings_to_array, utilities.parsers.settings_to_numbers
+local concat = table.concat
+local round = math.round
+local formatters = string.formatters
+
+local backends, lpdf, nodes = backends, lpdf, nodes
+
+local allocate = utilities.storage.allocate
+
+local nodeinjections = backends.pdf.nodeinjections
+local codeinjections = backends.pdf.codeinjections
+local registrations = backends.pdf.registrations
+
+local nodepool = nodes.nuts.pool
+local register = nodepool.register
+local setstate = nodepool.setstate
+
+local pdfconstant = lpdf.constant
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfreference = lpdf.reference
+local pdfverbose = lpdf.verbose
+
+local pdfflushobject
+local pdfdelayedobject
+local pdfflushstreamobject
+local pdfshareobjectreference
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+ pdfdelayedobject = lpdf.delayedobject
+ pdfflushstreamobject = lpdf.flushstreamobject
+ pdfshareobjectreference = lpdf.shareobjectreference
+end)
+
+local addtopageattributes = lpdf.addtopageattributes
+local adddocumentcolorspace = lpdf.adddocumentcolorspace
+local adddocumentextgstate = lpdf.adddocumentextgstate
+
+local colors = attributes.colors
+local registercolor = colors.register
+local colorsvalue = colors.value
+local forcedmodel = colors.forcedmodel
+local getpagecolormodel = colors.getpagecolormodel
+local colortoattributes = colors.toattributes
+
+local transparencies = attributes.transparencies
+local registertransparancy = transparencies.register
+local transparenciesvalue = transparencies.value
+local transparencytoattribute = transparencies.toattribute
+
+local unsetvalue = attributes.unsetvalue
+
+local setmetatableindex = table.setmetatableindex
+
+local c_transparency = pdfconstant("Transparency")
+
+local f_gray = formatters["%.3N g %.3N G"]
+local f_rgb = formatters["%.3N %.3N %.3N rg %.3N %.3N %.3N RG"]
+local f_cmyk = formatters["%.3N %.3N %.3N %.3N k %.3N %.3N %.3N %.3N K"]
+local f_spot = formatters["/%s cs /%s CS %s SCN %s scn"]
+local f_tr = formatters["Tr%s"]
+local f_cm = formatters["q %.6N %.6N %.6N %.6N %.6N %.6N cm"]
+local f_effect = formatters["%s Tc %s w %s Tr"] -- %.6N ?
+local f_tr_gs = formatters["/Tr%s gs"]
+local f_num_1 = formatters["%.3N %.3N"]
+local f_num_2 = formatters["%.3N %.3N"]
+local f_num_3 = formatters["%.3N %.3N %.3N"]
+local f_num_4 = formatters["%.3N %.3N %.3N %.3N"]
+
+local report_color = logs.reporter("colors","backend")
+
+-- page groups (might move to lpdf-ini.lua)
+
+local colorspaceconstants = allocate { -- v_none is ignored
+ gray = pdfconstant("DeviceGray"),
+ rgb = pdfconstant("DeviceRGB"),
+ cmyk = pdfconstant("DeviceCMYK"),
+ all = pdfconstant("DeviceRGB"), -- brr
+}
+
+local transparencygroups = { }
+
+lpdf.colorspaceconstants = colorspaceconstants
+lpdf.transparencygroups = transparencygroups
+
+setmetatableindex(transparencygroups, function(transparencygroups,colormodel)
+ local cs = colorspaceconstants[colormodel]
+ if cs then
+ local d = pdfdictionary {
+ S = c_transparency,
+ CS = cs,
+ I = true,
+ }
+ -- local g = pdfreference(pdfflushobject(tostring(d)))
+ local g = pdfreference(pdfdelayedobject(tostring(d)))
+ transparencygroups[colormodel] = g
+ return g
+ else
+ transparencygroups[colormodel] = false
+ return false
+ end
+end)
+
+local function addpagegroup()
+ local model = getpagecolormodel()
+ if model then
+ local g = transparencygroups[model]
+ if g then
+ addtopageattributes("Group",g)
+ end
+ end
+end
+
+lpdf.registerpagefinalizer(addpagegroup,3,"pagegroup")
+
+-- injection code (needs a bit reordering)
+
+-- color injection
+
+function nodeinjections.rgbcolor(r,g,b)
+ return register(setstate(f_rgb(r,g,b,r,g,b)))
+end
+
+function nodeinjections.cmykcolor(c,m,y,k)
+ return register(setstate(f_cmyk(c,m,y,k,c,m,y,k)))
+end
+
+function nodeinjections.graycolor(s) -- caching 0/1 does not pay off
+ return register(setstate(f_gray(s,s)))
+end
+
+function nodeinjections.spotcolor(n,f,d,p)
+ if type(p) == "string" then
+ p = gsub(p,","," ") -- brr misuse of spot
+ end
+ return register(setstate(f_spot(n,n,p,p)))
+end
+
+function nodeinjections.transparency(n)
+ return register(setstate(f_tr_gs(n)))
+end
+
+-- a bit weird but let's keep it here for a while
+
+local effects = {
+ normal = 0,
+ inner = 0,
+ outer = 1,
+ both = 2,
+ hidden = 3,
+}
+
+local bp = number.dimenfactors.bp
+
+function nodeinjections.effect(effect,stretch,rulethickness)
+ -- always, no zero test (removed)
+ rulethickness = bp * rulethickness
+ effect = effects[effect] or effects['normal']
+ return register(setstate(f_effect(stretch,rulethickness,effect))) -- watch order
+end
+
+-- spot- and indexcolors
+
+local pdf_separation = pdfconstant("Separation")
+local pdf_indexed = pdfconstant("Indexed")
+local pdf_device_n = pdfconstant("DeviceN")
+local pdf_device_rgb = pdfconstant("DeviceRGB")
+local pdf_device_cmyk = pdfconstant("DeviceCMYK")
+local pdf_device_gray = pdfconstant("DeviceGray")
+local pdf_extgstate = pdfconstant("ExtGState")
+
+local pdf_rgb_range = pdfarray { 0, 1, 0, 1, 0, 1 }
+local pdf_cmyk_range = pdfarray { 0, 1, 0, 1, 0, 1, 0, 1 }
+local pdf_gray_range = pdfarray { 0, 1 }
+
+local f_rgb_function = formatters["dup %s mul exch dup %s mul exch %s mul"]
+local f_cmyk_function = formatters["dup %s mul exch dup %s mul exch dup %s mul exch %s mul"]
+local f_gray_function = formatters["%s mul"]
+
+local documentcolorspaces = pdfdictionary()
+
+local spotcolorhash = { } -- not needed
+local spotcolornames = { }
+local indexcolorhash = { }
+local delayedindexcolors = { }
+
+function registrations.spotcolorname(name,e)
+ spotcolornames[name] = e or name
+end
+
+function registrations.getspotcolorreference(name)
+ return spotcolorhash[name]
+end
+
+-- beware: xpdf/okular/evince cannot handle the spot->process shade
+
+-- This should become delayed i.e. only flush when used; in that case we need
+-- need to store the specification and then flush them when accesssomespotcolor
+-- is called. At this moment we assume that splotcolors that get defined are
+-- also used which keeps the overhad small anyway. Tricky for mp ...
+
+local processcolors
+
+local function registersomespotcolor(name,noffractions,names,p,colorspace,range,funct)
+ noffractions = tonumber(noffractions) or 1 -- to be checked
+ if noffractions == 0 then
+ -- can't happen
+ elseif noffractions == 1 then
+ local dictionary = pdfdictionary {
+ FunctionType = 4,
+ Domain = { 0, 1 },
+ Range = range,
+ }
+ local calculations = pdfflushstreamobject(format("{ %s }",funct),dictionary)
+ -- local calculations = pdfobject {
+ -- type = "stream",
+ -- immediate = true,
+ -- string = format("{ %s }",funct),
+ -- attr = dictionary(),
+ -- }
+ local array = pdfarray {
+ pdf_separation,
+ pdfconstant(spotcolornames[name] or name),
+ colorspace,
+ pdfreference(calculations),
+ }
+ local m = pdfflushobject(array)
+ local mr = pdfreference(m)
+ spotcolorhash[name] = m
+ documentcolorspaces[name] = mr
+ adddocumentcolorspace(name,mr)
+ else
+ local cnames = pdfarray()
+ local domain = pdfarray()
+ local colorants = pdfdictionary()
+ for n in gmatch(names,"[^,]+") do
+ local name = spotcolornames[n] or n
+ -- the cmyk names assume that they are indeed these colors
+ if n == "cyan" then
+ name = "Cyan"
+ elseif n == "magenta" then
+ name = "Magenta"
+ elseif n == "yellow" then
+ name = "Yellow"
+ elseif n == "black" then
+ name = "Black"
+ else
+ local sn = spotcolorhash[name] or spotcolorhash[n]
+ if not sn then
+ report_color("defining %a as colorant",name)
+ colors.definespotcolor("",name,"p=1",true)
+ sn = spotcolorhash[name] or spotcolorhash[n]
+ end
+ if sn then
+ colorants[name] = pdfreference(sn)
+ else
+ -- maybe some day generate colorants (spot colors for multi) automatically
+ report_color("unknown colorant %a, using black instead",name or n)
+ name = "Black"
+ end
+ end
+ cnames[#cnames+1] = pdfconstant(name)
+ domain[#domain+1] = 0
+ domain[#domain+1] = 1
+ end
+ if not processcolors then
+ local specification = pdfdictionary {
+ ColorSpace = pdfconstant("DeviceCMYK"),
+ Components = pdfarray {
+ pdfconstant("Cyan"),
+ pdfconstant("Magenta"),
+ pdfconstant("Yellow"),
+ pdfconstant("Black")
+ }
+ }
+ processcolors = pdfreference(pdfflushobject(specification))
+ end
+ local dictionary = pdfdictionary {
+ FunctionType = 4,
+ Domain = domain,
+ Range = range,
+ }
+ local calculation = pdfflushstreamobject(format("{ %s %s }",rep("pop ",noffractions),funct),dictionary)
+ local channels = pdfdictionary {
+ Subtype = pdfconstant("NChannel"),
+ Colorants = colorants,
+ Process = processcolors,
+ }
+ local array = pdfarray {
+ pdf_device_n,
+ cnames,
+ colorspace,
+ pdfreference(calculation),
+ pdfshareobjectreference(tostring(channels)), -- optional but needed for shades
+ }
+ local m = pdfflushobject(array)
+ local mr = pdfreference(m)
+ spotcolorhash[name] = m
+ documentcolorspaces[name] = mr
+ adddocumentcolorspace(name,mr)
+ end
+end
+
+-- wrong name
+
+local function registersomeindexcolor(name,noffractions,names,p,colorspace,range,funct)
+ noffractions = tonumber(noffractions) or 1 -- to be checked
+ local cnames = pdfarray()
+ local domain = pdfarray()
+ local names = settings_to_array(#names == 0 and name or names)
+ local values = settings_to_numbers(p)
+ names [#names +1] = "None"
+ values[#values+1] = 1
+ -- check for #names == #values
+ for i=1,#names do
+ local name = names[i]
+ local spot = spotcolornames[name]
+ cnames[#cnames+1] = pdfconstant(spot ~= "" and spot or name)
+ domain[#domain+1] = 0
+ domain[#domain+1] = 1
+ end
+ local dictionary = pdfdictionary {
+ FunctionType = 4,
+ Domain = domain,
+ Range = range,
+ }
+ local n = pdfflushstreamobject(format("{ %s %s }",rep("exch pop ",noffractions),funct),dictionary) -- exch pop
+ local a = pdfarray {
+ pdf_device_n,
+ cnames,
+ colorspace,
+ pdfreference(n),
+ }
+ local vector = { }
+ local set = { }
+ local n = #values
+ for i=255,0,-1 do
+ for j=1,n do
+ set[j] = format("%02X",round(values[j]*i))
+ end
+ vector[#vector+1] = concat(set)
+ end
+ vector = pdfverbose { "<", concat(vector, " "), ">" }
+ local n = pdfflushobject(pdfarray{ pdf_indexed, a, 255, vector })
+ adddocumentcolorspace(format("%s_indexed",name),pdfreference(n))
+ return n
+end
+
+-- actually, names (parent) is the hash
+
+local function delayindexcolor(name,names,func)
+ local hash = (names ~= "" and names) or name
+ delayedindexcolors[hash] = func
+end
+
+local function indexcolorref(name) -- actually, names (parent) is the hash
+ local parent = colors.spotcolorparent(name)
+ local data = indexcolorhash[name]
+ if data == nil then
+ local delayedindexcolor = delayedindexcolors[parent]
+ if type(delayedindexcolor) == "function" then
+ data = delayedindexcolor()
+ delayedindexcolors[parent] = true
+ end
+ indexcolorhash[parent] = data or false
+ end
+ return data
+end
+
+function registrations.rgbspotcolor(name,noffractions,names,p,r,g,b)
+ if noffractions == 1 then
+ registersomespotcolor(name,noffractions,names,p,pdf_device_rgb,pdf_rgb_range,f_rgb_function(r,g,b))
+ else
+ registersomespotcolor(name,noffractions,names,p,pdf_device_rgb,pdf_rgb_range,f_num_3(r,g,b))
+ end
+ delayindexcolor(name,names,function()
+ return registersomeindexcolor(name,noffractions,names,p,pdf_device_rgb,pdf_rgb_range,f_rgb_function(r,g,b))
+ end)
+end
+
+function registrations.cmykspotcolor(name,noffractions,names,p,c,m,y,k)
+ if noffractions == 1 then
+ registersomespotcolor(name,noffractions,names,p,pdf_device_cmyk,pdf_cmyk_range,f_cmyk_function(c,m,y,k))
+ else
+ registersomespotcolor(name,noffractions,names,p,pdf_device_cmyk,pdf_cmyk_range,f_num_4(c,m,y,k))
+ end
+ delayindexcolor(name,names,function()
+ return registersomeindexcolor(name,noffractions,names,p,pdf_device_cmyk,pdf_cmyk_range,f_cmyk_function(c,m,y,k))
+ end)
+end
+
+function registrations.grayspotcolor(name,noffractions,names,p,s)
+ if noffractions == 1 then
+ registersomespotcolor(name,noffractions,names,p,pdf_device_gray,pdf_gray_range,f_gray_function(s))
+ else
+ registersomespotcolor(name,noffractions,names,p,pdf_device_gray,pdf_gray_range,f_num_1(s))
+ end
+ delayindexcolor(name,names,function()
+ return registersomeindexcolor(name,noffractions,names,p,pdf_device_gray,pdf_gray_range,f_gray_function(s))
+ end)
+end
+
+function registrations.rgbindexcolor(name,noffractions,names,p,r,g,b)
+ registersomeindexcolor(name,noffractions,names,p,pdf_device_rgb,pdf_rgb_range,f_rgb_function(r,g,b))
+end
+
+function registrations.cmykindexcolor(name,noffractions,names,p,c,m,y,k)
+ registersomeindexcolor(name,noffractions,names,p,pdf_device_cmyk,pdf_cmyk_range,f_cmyk_function(c,m,y,k))
+end
+
+function registrations.grayindexcolor(name,noffractions,names,p,s)
+ registersomeindexcolor(name,noffractions,names,p,pdf_device_gray,pdf_gray_range,f_gray_function(s))
+end
+
+function codeinjections.setfigurecolorspace(data,figure)
+ local color = data.request.color
+ if color then -- != v_default
+ local ref = indexcolorref(color)
+ if ref then
+ figure.colorspace = ref
+ data.used.color = color
+ data.used.colorref = ref
+ end
+ end
+end
+
+-- transparency
+
+local pdftransparencies = { [0] =
+ pdfconstant("Normal"),
+ pdfconstant("Normal"),
+ pdfconstant("Multiply"),
+ pdfconstant("Screen"),
+ pdfconstant("Overlay"),
+ pdfconstant("SoftLight"),
+ pdfconstant("HardLight"),
+ pdfconstant("ColorDodge"),
+ pdfconstant("ColorBurn"),
+ pdfconstant("Darken"),
+ pdfconstant("Lighten"),
+ pdfconstant("Difference"),
+ pdfconstant("Exclusion"),
+ pdfconstant("Hue"),
+ pdfconstant("Saturation"),
+ pdfconstant("Color"),
+ pdfconstant("Luminosity"),
+ pdfconstant("Compatible"), -- obsolete; 'Normal' is used in this case
+}
+
+local documenttransparencies = { }
+local transparencyhash = { } -- share objects
+
+local done, signaled = false, false
+
+function registrations.transparency(n,a,t)
+ if not done then
+ local d = pdfdictionary {
+ Type = pdf_extgstate,
+ ca = 1,
+ CA = 1,
+ BM = pdftransparencies[1],
+ AIS = false,
+ }
+ local m = pdfflushobject(d)
+ local mr = pdfreference(m)
+ transparencyhash[0] = m
+ documenttransparencies[0] = mr
+ adddocumentextgstate("Tr0",mr)
+ done = true
+ end
+ if n > 0 and not transparencyhash[n] then
+ local d = pdfdictionary {
+ Type = pdf_extgstate,
+ ca = tonumber(t),
+ CA = tonumber(t),
+ BM = pdftransparencies[tonumber(a)] or pdftransparencies[0],
+ AIS = false,
+ }
+ local m = pdfflushobject(d)
+ local mr = pdfreference(m)
+ transparencyhash[n] = m
+ documenttransparencies[n] = mr
+ adddocumentextgstate(f_tr(n),mr)
+ end
+end
+
+statistics.register("page group warning", function()
+ if done then
+ local model = getpagecolormodel()
+ if model and not transparencygroups[model] then
+ return "transparencies are used but no pagecolormodel is set"
+ end
+ end
+end)
+
+-- Literals needed to inject code in the mp stream, we cannot use attributes there
+-- since literals may have qQ's, much may go away once we have mplib code in place.
+--
+-- This module assumes that some functions are defined in the colors namespace
+-- which most likely will be loaded later.
+
+local function lpdfcolor(model,ca,default) -- todo: use gray when no color
+ if colors.supported then
+ local cv = colorsvalue(ca)
+ if cv then
+ if model == 1 then
+ model = cv[1]
+ end
+ model = forcedmodel(model)
+ if model == 2 then
+ local s = cv[2]
+ return f_gray(s,s)
+ elseif model == 3 then
+ local r = cv[3]
+ local g = cv[4]
+ local b = cv[5]
+ return f_rgb(r,g,b,r,g,b)
+ elseif model == 4 then
+ local c = cv[6]
+ local m = cv[7]
+ local y = cv[8]
+ local k = cv[9]
+ return f_cmyk(c,m,y,k,c,m,y,k)
+ else
+ local n = cv[10]
+ local f = cv[11]
+ local d = cv[12]
+ local p = cv[13]
+ if type(p) == "string" then
+ p = gsub(p,","," ") -- brr misuse of spot
+ end
+ return f_spot(n,n,p,p)
+ end
+ else
+ return f_gray(default or 0,default or 0)
+ end
+ else
+ return ""
+ end
+end
+
+lpdf.color = lpdfcolor
+
+interfaces.implement {
+ name = "lpdf_color",
+ actions = { lpdfcolor, context },
+ arguments = "integer"
+}
+
+function lpdf.colorspec(model,ca,default)
+ if ca and ca > 0 then
+ local cv = colors.value(ca)
+ if cv then
+ if model == 1 then
+ model = cv[1]
+ end
+ if model == 2 then
+ return pdfarray { cv[2] }
+ elseif model == 3 then
+ return pdfarray { cv[3],cv[4],cv[5] }
+ elseif model == 4 then
+ return pdfarray { cv[6],cv[7],cv[8],cv[9] }
+ elseif model == 5 then
+ return pdfarray { cv[13] }
+ end
+ end
+ end
+ if default then
+ return default
+ end
+end
+
+function lpdf.pdfcolor(attribute) -- bonus, for pgf and friends
+ return lpdfcolor(1,attribute)
+end
+
+function lpdf.transparency(ct,default) -- kind of overlaps with transparencycode
+ -- beware, we need this hack because normally transparencies are not
+ -- yet registered and therefore the number is not not known ... we
+ -- might use the attribute number itself in the future
+ if transparencies.supported then
+ local ct = transparenciesvalue(ct)
+ if ct then
+ return f_tr_gs(registertransparancy(nil,ct[1],ct[2],true))
+ else
+ return f_tr_gs(0)
+ end
+ else
+ return ""
+ end
+end
+
+function lpdf.colorvalue(model,ca,default)
+ local cv = colorsvalue(ca)
+ if cv then
+ if model == 1 then
+ model = cv[1]
+ end
+ model = forcedmodel(model)
+ if model == 2 then
+ return f_num_1(cv[2])
+ elseif model == 3 then
+ return f_num_3(cv[3],cv[4],cv[5])
+ elseif model == 4 then
+ return f_num_4(cv[6],cv[7],cv[8],cv[9])
+ else
+ return f_num_1(cv[13])
+ end
+ else
+ return f_num_1(default or 0)
+ end
+end
+
+function lpdf.colorvalues(model,ca,default)
+ local cv = colorsvalue(ca)
+ if cv then
+ if model == 1 then
+ model = cv[1]
+ end
+ model = forcedmodel(model)
+ if model == 2 then
+ return cv[2]
+ elseif model == 3 then
+ return cv[3], cv[4], cv[5]
+ elseif model == 4 then
+ return cv[6], cv[7], cv[8], cv[9]
+ elseif model == 5 then
+ return cv[13]
+ end
+ else
+ return default or 0
+ end
+end
+
+function lpdf.transparencyvalue(ta,default)
+ local tv = transparenciesvalue(ta)
+ if tv then
+ return tv[2]
+ else
+ return default or 1
+ end
+end
+
+function lpdf.colorspace(model,ca)
+ local cv = colorsvalue(ca)
+ if cv then
+ if model == 1 then
+ model = cv[1]
+ end
+ model = forcedmodel(model)
+ if model == 2 then
+ return "DeviceGray"
+ elseif model == 3 then
+ return "DeviceRGB"
+ elseif model == 4 then
+ return "DeviceCMYK"
+ end
+ end
+ return "DeviceGRAY"
+end
+
+-- by registering we getconversion for free (ok, at the cost of overhead)
+
+local intransparency = false
+local pdfcolor = lpdf.color
+
+function lpdf.rgbcode(model,r,g,b)
+ if colors.supported then
+ return pdfcolor(model,registercolor(nil,'rgb',r,g,b))
+ else
+ return ""
+ end
+end
+
+function lpdf.cmykcode(model,c,m,y,k)
+ if colors.supported then
+ return pdfcolor(model,registercolor(nil,'cmyk',c,m,y,k))
+ else
+ return ""
+ end
+end
+
+function lpdf.graycode(model,s)
+ if colors.supported then
+ return pdfcolor(model,registercolor(nil,'gray',s))
+ else
+ return ""
+ end
+end
+
+function lpdf.spotcode(model,n,f,d,p)
+ if colors.supported then
+ return pdfcolor(model,registercolor(nil,'spot',n,f,d,p)) -- incorrect
+ else
+ return ""
+ end
+end
+
+function lpdf.transparencycode(a,t)
+ if transparencies.supported then
+ intransparency = true
+ return f_tr_gs(registertransparancy(nil,a,t,true)) -- true forces resource
+ else
+ return ""
+ end
+end
+
+function lpdf.finishtransparencycode()
+ if transparencies.supported and intransparency then
+ intransparency = false
+ return f_tr_gs(0) -- we happen to know this -)
+ else
+ return ""
+ end
+end
+
+do
+
+ local pdfprint, pdfcolor, pdftransparency
+
+ updaters.register("backend.update.lpdf",function()
+ pdfprint = lpdf.print
+ pdfcolor = lpdf.color
+ pdftransparency = lpdf.transparency
+ end)
+
+ local c_cache = setmetatableindex(function(t,m)
+ -- We inherit the outer transparency.
+ local v = setmetatableindex(function(t,c)
+ local p = "q " .. pdfcolor(m,c)
+ t[c] = p
+ return p
+ end)
+ t[m] = v
+ return v
+ end)
+
+ local t_cache = setmetatableindex(function(t,transparency)
+ local p = pdftransparency(transparency)
+ local v = setmetatableindex(function(t,colormodel)
+ local v = setmetatableindex(function(t,color)
+ local v = "q " .. pdfcolor(colormodel,color) .. " " .. p
+ t[color] = v
+ return v
+ end)
+ t[colormodel] = v
+ return v
+ end)
+ t[transparency] = v
+ return v
+ end)
+
+ updaters.register("backend.update.lpdf",function()
+
+ local vfinjectors = fonts.helpers.vfinjectors
+
+ vfinjectors.pdf = function(pos_h,pos_v,packet)
+ pdfprint(packet[2],packet[3])
+ end
+
+ vfinjectors.startcolor = function(pos_h,pos_v,packet)
+ local color = type(packet) == "table" and packet[2] or packet
+ if color then
+ local m, c = colortoattributes(color)
+ local t = transparencytoattribute(color)
+ if t and t ~= unsetvalue then
+ pdfprint("page", t_cache[t][m][c]) -- "q " .. pdfcolor(m,c) .. " " .. pdftransparency(t)
+ else
+ pdfprint("page", c_cache[m][c]) -- "q " .. pdfcolor(m,c))
+ end
+ else
+ pdfprint("page", "q")
+ end
+ end
+
+ vfinjectors.stopcolor = function()
+ -- pdfprint("text", "Q")
+ pdfprint("page", "Q")
+ end
+
+ end)
+
+end
+
+-- These generate the in-stream color commands:
+
+do
+
+ local color = lpdf.color
+ local transparency = lpdf.transparency
+
+ local fonts = { }
+ lpdf.fonts = fonts
+
+ fonts.color_indirect = function(c,t)
+ if c and t then
+ return color(1,c) .. " " .. transparency(t)
+ elseif c then
+ return color(1,c)
+ elseif t then
+ return transparency(t)
+ else
+ return false
+ end
+ end
+
+ local colors = attributes.colors
+ local rgbtocmyk = colors.rgbtocmyk
+
+ local f_cmyk = formatters["%.3N %.3f %.3N %.3N k"]
+ local f_rgb = formatters["%.3N %.3f %.3N rg"]
+ local f_gray = formatters["%.3N g"]
+
+ fonts.color_direct = function(r,g,b)
+ local m = colors.model
+ if r == g and g == b then
+ return f_gray(r)
+ elseif m == "cmyk" then
+ return f_cmyk(rgbtocmyk(r,g,b))
+ else
+ return f_rgb(r,g,b)
+ end
+ end
+
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-emb.lua b/Master/texmf-dist/tex/context/base/mkxl/lpdf-emb.lmt
index 4ffcfd8a846..4337e5931dd 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-emb.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-emb.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['lpdf-ini'] = {
version = 1.001,
+ optimize = true,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -47,9 +48,16 @@ local pdfarray = lpdf.array
local pdfconstant = lpdf.constant
local pdfstring = lpdf.string
local pdfreference = lpdf.reference
-local pdfreserveobject = lpdf.reserveobject
-local pdfflushobject = lpdf.flushobject
-local pdfflushstreamobject = lpdf.flushstreamobject
+
+local pdfreserveobject
+local pdfflushobject
+local pdfflushstreamobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfreserveobject = lpdf.reserveobject
+ pdfflushobject = lpdf.flushobject
+ pdfflushstreamobject = lpdf.flushstreamobject
+end)
local report_fonts = logs.reporter("backend","fonts")
@@ -70,6 +78,7 @@ local readstring = utilities.files.readstring
local openfile = utilities.files.open
local closefile = utilities.files.close
+local getmapentry = fonts.mappings.getentry
-- needs checking: signed vs unsigned
@@ -299,63 +308,6 @@ end
end
--- Map file mess.
-
-local loadmapfile, loadmapline, getmapentry do
-
- -- We only need to pick up the filename and optionally the enc file
- -- as we only use them for old school virtual math fonts. We might as
- -- we drop this completely.
-
- local find, match, splitlines = string.find, string.match, string.splitlines
-
-
- local mappings = { }
-
- loadmapline = function(n)
- if trace_fonts then
- report_fonts("mapline: %s",n)
- end
- local name, fullname, encfile, pfbfile = match(n,"(%S+)%s+(%S+).-<(.-%.enc).-<(.-%.pfb)")
- if name then
- mappings[name] = { fullname, encfile, pfbfile }
- end
- end
-
- loadmapfile = function(n)
- local okay, data = resolvers.loadbinfile(n,"map")
- if okay and data then
- data = splitlines(data)
- for i=1,#data do
- local d = data[i]
- if d ~= "" and not find(d,"^[#%%]") then
- loadmapline(d)
- end
- end
- end
- end
-
- getmapentry = function(n)
- local n = file.nameonly(n)
- local m = mappings[n]
- if m then
- local encfile = m[2]
- local encoding = fonts.encodings.load(encfile)
- if not encoding then
- return
- end
- local pfbfile = resolvers.findfile(m[3],"pfb")
- if not pfbfile or pfbfile == "" then
- return
- end
- return encoding, pfbfile, encfile
- end
- end
-
- lpdf.getmapentry = getmapentry
-
-end
-
-- The three writers: opentype, truetype and type1.
local mainwriters = { }
@@ -1552,12 +1504,16 @@ do
local f_stream = formatters["%.6N 0 d0 %s"]
local f_stream_c = formatters["%.6N 0 0 0 0 0 d1 %s"]
local f_stream_d = formatters["%.6N 0 d0 1 0 0 1 0 %.6N cm %s"]
+ -- local f_stream_s = formatters["%.6N 0 0 %.6N 0 0 cm /%s Do"]
-- A type 3 font has at most 256 characters and Acrobat also wants a zero slot
-- to be filled. We can share a mandate zero slot character. We also need to
-- make sure that we use bytes as index in the page stream as well as in the
-- tounicode vector.
+ -- All this type three magic is a tribute to Don Knuth who uses bitmap fonts in
+ -- his books.
+
local c_notdef = nil
local r_notdef = nil
local w_notdef = nil
@@ -1590,6 +1546,12 @@ do
local used = setmetatableindex("table")
+ -- function lpdf.registerfontmethod(name,f)
+ -- if f and not methods[name] then
+ -- methods[name] = f
+ -- end
+ -- end
+
function methods.pdf(filename,details)
local properties = details.properties
local pdfshapes = properties.indexdata[1]
@@ -1612,9 +1574,8 @@ do
local name = f_glyph(nofglyphs)
local stream = nil
if fixdepth then
- local depth = data.depth or 0
- local height = data.height or 0
- if depth ~= 0 or height ~= 0 then
+ local depth = data.depth or 0
+ if depth ~= 0 then
local d = data.dropin.descriptions[data.index]
local b = d.boundingbox
local l = b[1]
@@ -1622,13 +1583,13 @@ do
local w = r - l
local scale = w / d.width
local x = l
- local y = - b[4] - b[2] - d.depth
+ -- local y = - b[4] - b[2] - (d.depth or 0)
+ local y = - (d.depth or 0)
local scale = w / (image.width * bpfactor)
stream = f_image_c_xy(scale,scale,x,y,name)
- else
- stream = f_image_c(name)
end
- else
+ end
+ if not stream then
stream = f_image_c(name)
end
useddoc[glyph] = image
@@ -1649,6 +1610,37 @@ do
end
end
+ -- box inclusion (todo: we can share identical glyphs if needed but the gain
+ -- is minimal especially when we use compact font mode)
+
+ function methods.box(filename,details)
+ local properties = details.properties
+ local boxes = properties.indexdata[1]
+ local xforms = pdfdictionary()
+ local nofglyphs = 0
+ local scale = 10 * details.parameters.size/details.parameters.designsize
+ local units = details.parameters.units
+ local function boxtopdf(image,data) -- image == glyph
+ nofglyphs = nofglyphs + 1
+ local scale = units / scale -- e.g. 1000 / 12
+ local width = (data.width or 0) * bpfactor * scale
+ local depth = - (data.depth or 0) * bpfactor * scale
+ local name = f_glyph(nofglyphs)
+ local stream = f_image_c_xy(scale,scale,0,depth,name)
+ image.embedded_name = name
+ image.embedded_stream = stream
+ image.embedded_reference = pdfreference(image.objnum)
+ xforms[name] = image.embedded_reference
+ return f_image_w(width,stream), width
+ end
+ local function wrapup()
+ end
+ local function getresources()
+ return pdfdictionary { XObject = xforms }
+ end
+ return boxes, 1/units, boxtopdf, wrapup, getresources
+ end
+
-- mps inclusion
local decompress = gzip.decompress
@@ -1666,12 +1658,18 @@ do
local factor = units * bpfactor / scale
local fixdepth = mpshapes.fixdepth
local usecolor = mpshapes.usecolor
- local specification = mpshapes.specification
+ local specification = mpshapes.specification or { }
local shapedefinitions = mpshapes.shapes
local instance = mpshapes.instance
--
simplemprun(instance,"begingroup;",true,true)
setparameterset("mpsfont",specification)
+ specification.scale = specification.scale or scale
+ specification.parameters = parameters
+ specification.properties = properties
+ specification.parentdata = details.fontdata.parentdata
+ -------------.characters = details.fontdata.characters
+ -------------.descriptions = details.fontdata.descriptions
if shapedefinitions then
local preamble = shapedefinitions.parameters.preamble
if preamble then
@@ -1684,7 +1682,7 @@ do
if decompress then
mp = decompress(mp)
end
- local pdf = simplemprun(instance,mp,true) -- can be sped up, minifun
+ local pdf = simplemprun(instance,mp,true)
local width = width * factor
if usecolor then
return f_stream_c(width,pdf), width
@@ -1701,6 +1699,11 @@ do
local function resetmps()
setparameterset("mpsfont")
simplemprun(instance,"endgroup;",true,true)
+ specification.parameters = nil
+ specification.properties = nil
+ specification.parentdata = nil
+ -------------.characters = nil
+ -------------.descriptions = nil
end
--
local function getresources()
@@ -1824,7 +1827,7 @@ do
mainwriters["type3"] = function(details)
local properties = details.properties
- local basefontname = details.basefontname or properties.name
+ local basefontname = properties.basefontname or details.basefontname or properties.name -- messy
local askedmethod = properties.method or "pk"
local method = methods[askedmethod] or methods.pk
if not method then
@@ -2203,22 +2206,28 @@ end)
-- this is temporary
-local done = false
-
-updaters.register("backend.update.pdf",function()
- if not done then
- function pdf.getfontobjnum (k) return objects[k] end
- function pdf.getfontname (k) return names [k] end
- function pdf.includechar () end -- maybe, when we need it
- function pdf.includefont () end -- maybe, when we need it
- function pdf.includecharlist () end -- maybe, when we need it
- function pdf.setomitcidset (v) includecidset = not toboolean(v) end
- function pdf.setomitcharset () end -- we don't need that in lmtx
- function pdf.setsuppressoptionalinfo() end -- we don't need that in lmtx
- function pdf.mapfile (n) loadmapfile(n) end
- function pdf.mapline (n) loadmapline(n) end
- -- this will change
+function lpdf.setomitcidset(v)
+ -- dummy: no longer needed
+ includecidset = not toboolean(v)
+end
+
+function lpdf.setomitcharset(v)
+ -- dummy
+end
+
+function lpdf.getfontobjectnumber(k)
+ return objects[k]
+end
+
+function lpdf.getfontname(k)
+ return names[k]
+end
+
+-- local done = false -- todo:
+
+-- updaters.register("backend.update",function()
+-- if not done then
lpdf.registerdocumentfinalizer(lpdf.flushfonts,1,"wrapping up fonts")
- done = true
- end
-end)
+-- done = true
+-- end
+-- end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-enc.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-enc.lmt
new file mode 100644
index 00000000000..090fb15cd5d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-enc.lmt
@@ -0,0 +1,157 @@
+if not modules then modules = { } end modules ['lpdf-enc'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- delayed loading
+
+local pdfconstant = lpdf.constant
+
+return lpdf.dictionary {
+ Type = pdfconstant("Encoding"),
+ Differences = lpdf.array {
+ 24,
+ pdfconstant("breve"),
+ pdfconstant("caron"),
+ pdfconstant("circumflex"),
+ pdfconstant("dotaccent"),
+ pdfconstant("hungarumlaut"),
+ pdfconstant("ogonek"),
+ pdfconstant("ring"),
+ pdfconstant("tilde"),
+ 39,
+ pdfconstant("quotesingle"),
+ 96,
+ pdfconstant("grave"),
+ 128,
+ pdfconstant("bullet"),
+ pdfconstant("dagger"),
+ pdfconstant("daggerdbl"),
+ pdfconstant("ellipsis"),
+ pdfconstant("emdash"),
+ pdfconstant("endash"),
+ pdfconstant("florin"),
+ pdfconstant("fraction"),
+ pdfconstant("guilsinglleft"),
+ pdfconstant("guilsinglright"),
+ pdfconstant("minus"),
+ pdfconstant("perthousand"),
+ pdfconstant("quotedblbase"),
+ pdfconstant("quotedblleft"),
+ pdfconstant("quotedblright"),
+ pdfconstant("quoteleft"),
+ pdfconstant("quoteright"),
+ pdfconstant("quotesinglbase"),
+ pdfconstant("trademark"),
+ pdfconstant("fi"),
+ pdfconstant("fl"),
+ pdfconstant("Lslash"),
+ pdfconstant("OE"),
+ pdfconstant("Scaron"),
+ pdfconstant("Ydieresis"),
+ pdfconstant("Zcaron"),
+ pdfconstant("dotlessi"),
+ pdfconstant("lslash"),
+ pdfconstant("oe"),
+ pdfconstant("scaron"),
+ pdfconstant("zcaron"),
+ 160,
+ pdfconstant("Euro"),
+ 164,
+ pdfconstant("currency"),
+ 166,
+ pdfconstant("brokenbar"),
+ 168,
+ pdfconstant("dieresis"),
+ pdfconstant("copyright"),
+ pdfconstant("ordfeminine"),
+ 172,
+ pdfconstant("logicalnot"),
+ pdfconstant(".notdef"),
+ pdfconstant("registered"),
+ pdfconstant("macron"),
+ pdfconstant("degree"),
+ pdfconstant("plusminus"),
+ pdfconstant("twosuperior"),
+ pdfconstant("threesuperior"),
+ pdfconstant("acute"),
+ pdfconstant("mu"),
+ 183,
+ pdfconstant("periodcentered"),
+ pdfconstant("cedilla"),
+ pdfconstant("onesuperior"),
+ pdfconstant("ordmasculine"),
+ 188,
+ pdfconstant("onequarter"),
+ pdfconstant("onehalf"),
+ pdfconstant("threequarters"),
+ 192,
+ pdfconstant("Agrave"),
+ pdfconstant("Aacute"),
+ pdfconstant("Acircumflex"),
+ pdfconstant("Atilde"),
+ pdfconstant("Adieresis"),
+ pdfconstant("Aring"),
+ pdfconstant("AE"),
+ pdfconstant("Ccedilla"),
+ pdfconstant("Egrave"),
+ pdfconstant("Eacute"),
+ pdfconstant("Ecircumflex"),
+ pdfconstant("Edieresis"),
+ pdfconstant("Igrave"),
+ pdfconstant("Iacute"),
+ pdfconstant("Icircumflex"),
+ pdfconstant("Idieresis"),
+ pdfconstant("Eth"),
+ pdfconstant("Ntilde"),
+ pdfconstant("Ograve"),
+ pdfconstant("Oacute"),
+ pdfconstant("Ocircumflex"),
+ pdfconstant("Otilde"),
+ pdfconstant("Odieresis"),
+ pdfconstant("multiply"),
+ pdfconstant("Oslash"),
+ pdfconstant("Ugrave"),
+ pdfconstant("Uacute"),
+ pdfconstant("Ucircumflex"),
+ pdfconstant("Udieresis"),
+ pdfconstant("Yacute"),
+ pdfconstant("Thorn"),
+ pdfconstant("germandbls"),
+ pdfconstant("agrave"),
+ pdfconstant("aacute"),
+ pdfconstant("acircumflex"),
+ pdfconstant("atilde"),
+ pdfconstant("adieresis"),
+ pdfconstant("aring"),
+ pdfconstant("ae"),
+ pdfconstant("ccedilla"),
+ pdfconstant("egrave"),
+ pdfconstant("eacute"),
+ pdfconstant("ecircumflex"),
+ pdfconstant("edieresis"),
+ pdfconstant("igrave"),
+ pdfconstant("iacute"),
+ pdfconstant("icircumflex"),
+ pdfconstant("idieresis"),
+ pdfconstant("eth"),
+ pdfconstant("ntilde"),
+ pdfconstant("ograve"),
+ pdfconstant("oacute"),
+ pdfconstant("ocircumflex"),
+ pdfconstant("otilde"),
+ pdfconstant("odieresis"),
+ pdfconstant("divide"),
+ pdfconstant("oslash"),
+ pdfconstant("ugrave"),
+ pdfconstant("uacute"),
+ pdfconstant("ucircumflex"),
+ pdfconstant("udieresis"),
+ pdfconstant("yacute"),
+ pdfconstant("thorn"),
+ pdfconstant("ydieresis"),
+ },
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-epa.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-epa.lmt
new file mode 100644
index 00000000000..b37e9c0432a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-epa.lmt
@@ -0,0 +1,1107 @@
+if not modules then modules = { } end modules ['lpdf-epa'] = {
+ version = 1.001,
+ comment = "companion to lpdf-epa.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Links can also have quadpoint
+
+-- embedded files ... not bound to a page
+
+local type, tonumber, next = type, tonumber, next
+local format, gsub, lower, find = string.format, string.gsub, string.lower, string.find
+local formatters = string.formatters
+local concat, merged = table.concat, table.merged
+local abs = math.abs
+local expandname = file.expandname
+local allocate = utilities.storage.allocate
+local bor, band = bit32.bor, bit32.band
+local isfile = lfs.isfile
+
+local trace_links = false trackers.register("figures.links", function(v) trace_links = v end)
+local trace_comments = false trackers.register("figures.comments", function(v) trace_comments = v end)
+local trace_fields = false trackers.register("figures.fields", function(v) trace_fields = v end)
+local trace_outlines = false trackers.register("figures.outlines", function(v) trace_outlines = v end)
+
+local report_link = logs.reporter("backend","link")
+local report_comment = logs.reporter("backend","comment")
+local report_field = logs.reporter("backend","field")
+local report_outline = logs.reporter("backend","outline")
+
+local lpdf = lpdf
+local backends = backends
+local context = context
+
+local nodeinjections = backends.pdf.nodeinjections
+
+local setmacro = tokens.setters.macro
+
+local pdfarray = lpdf.array
+local pdfdictionary = lpdf.dictionary
+local pdfconstant = lpdf.constant
+local pdfreference = lpdf.reference
+
+local pdfreserveobject
+local pdfgetpos
+
+updaters.register("backend.update.lpdf",function()
+ pdfreserveobject = lpdf.reserveobject
+ pdfgetpos = lpdf.getpos
+end)
+
+local pdfcopyboolean = lpdf.copyboolean
+local pdfcopyunicode = lpdf.copyunicode
+local pdfcopyarray = lpdf.copyarray
+local pdfcopydictionary = lpdf.copydictionary
+local pdfcopynumber = lpdf.copynumber
+local pdfcopyinteger = lpdf.copyinteger
+local pdfcopystring = lpdf.copystring
+local pdfcopyconstant = lpdf.copyconstant
+
+local createimage = images.create
+local embedimage = images.embed
+
+local hpack_node = nodes.hpack
+
+local loadpdffile = lpdf.epdf.load
+
+local nameonly = file.nameonly
+
+local variables = interfaces.variables
+local codeinjections = backends.pdf.codeinjections
+----- urlescaper = lpegpatterns.urlescaper
+----- utftohigh = lpegpatterns.utftohigh
+local escapetex = characters.filters.utf.private.escape
+
+local bookmarks = structures.bookmarks
+
+local maxdimen = 0x3FFFFFFF -- 2^30-1
+
+local bpfactor = number.dimenfactors.bp
+
+local layerspec = {
+ "epdfcontent"
+}
+
+local getpos = function() getpos = backends.codeinjections.getpos return getpos() end
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local jobembedded = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.embedded = jobembedded
+
+local function initializer()
+ tobesaved = jobembedded.tobesaved
+ collected = jobembedded.collected
+end
+
+job.register('job.embedded.collected',tobesaved,initializer)
+
+local function validdocument(specification)
+ if figures and not specification then
+ specification = figures and figures.current()
+ specification = specification and specification.status
+ end
+ if specification then
+ local fullname = specification.fullname
+ local expanded = lower(expandname(fullname))
+ -- we could add a check for duplicate page insertion
+ tobesaved[expanded] = true
+ --- but that is messy anyway so we forget about it
+ return specification, fullname, loadpdffile(fullname) -- costs time
+ end
+end
+
+local function getmediasize(specification,pagedata)
+ local xscale = specification.xscale or 1
+ local yscale = specification.yscale or 1
+ ----- size = specification.size or "crop" -- todo
+ local mediabox = pagedata.MediaBox
+ local llx = mediabox[1]
+ local lly = mediabox[2]
+ local urx = mediabox[3]
+ local ury = mediabox[4]
+ local width = xscale * (urx - llx) -- \\overlaywidth, \\overlayheight
+ local height = yscale * (ury - lly) -- \\overlaywidth, \\overlayheight
+ return llx, lly, urx, ury, width, height, xscale, yscale
+end
+
+local function getdimensions(annotation,llx,lly,xscale,yscale,width,height,report)
+ local rectangle = annotation.Rect
+ local a_llx = rectangle[1]
+ local a_lly = rectangle[2]
+ local a_urx = rectangle[3]
+ local a_ury = rectangle[4]
+ local x = xscale * (a_llx - llx)
+ local y = yscale * (a_lly - lly)
+ local w = xscale * (a_urx - a_llx)
+ local h = yscale * (a_ury - a_lly)
+ if w > width or h > height or w < 0 or h < 0 or abs(x) > (maxdimen/2) or abs(y) > (maxdimen/2) then
+ report("broken rectangle [%.6F %.6F %.6F %.6F] (max: %.6F)",a_llx,a_lly,a_urx,a_ury,maxdimen/2)
+ return
+ end
+ return x, y, w, h, a_llx, a_lly, a_urx, a_ury
+end
+
+local layerused = false
+
+-- local function initializelayer(height,width)
+-- if not layerused then
+-- context.definelayer(layerspec, { height = height .. "bp", width = width .. "bp" })
+-- layerused = true
+-- end
+-- end
+
+local function initializelayer(height,width)
+-- if not layerused then
+ context.setuplayer(layerspec, { height = height .. "bp", width = width .. "bp" })
+ layerused = true
+-- end
+end
+
+function codeinjections.flushmergelayer()
+ if layerused then
+ context.flushlayer(layerspec)
+ layerused = false
+ end
+end
+
+local f_namespace = formatters["lpdf-epa-%s-"]
+
+local function makenamespace(filename)
+ filename = gsub(lower(nameonly(filename)),"[^%a%d]+","-")
+ return f_namespace(filename)
+end
+
+local function add_link(x,y,w,h,destination,what)
+ x = x .. "bp"
+ y = y .. "bp"
+ w = w .. "bp"
+ h = h .. "bp"
+ if trace_links then
+ report_link("destination %a, type %a, dx %s, dy %s, wd %s, ht %s",destination,what,x,y,w,h)
+ end
+ local locationspec = { -- predefining saves time
+ x = x,
+ y = y,
+ preset = "leftbottom",
+ }
+ local buttonspec = {
+ width = w,
+ height = h,
+ offset = variables.overlay,
+ frame = trace_links and variables.on or variables.off,
+ }
+ context.setlayer (
+ layerspec,
+ locationspec,
+ function() context.button ( buttonspec, "", { destination } ) end
+ -- context.nested.button(buttonspec, "", { destination }) -- time this
+ )
+end
+
+local function link_goto(x,y,w,h,document,annotation,pagedata,namespace)
+ local a = annotation.A
+ if a then
+ local destination = a.D -- [ 18 0 R /Fit ]
+ local what = "page"
+ if type(destination) == "string" then
+ local destinations = document.destinations
+ local wanted = destinations[destination]
+ destination = wanted and wanted.D -- is this ok? isn't it destination already a string?
+ if destination then what = "named" end
+ end
+ local pagedata = destination and destination[1]
+ if pagedata then
+ local destinationpage = pagedata.number
+ if destinationpage then
+ add_link(x,y,w,h,namespace .. destinationpage,what)
+ end
+ end
+ end
+end
+
+local function link_uri(x,y,w,h,document,annotation)
+ local url = annotation.A.URI
+ if url then
+ -- url = lpegmatch(urlescaper,url)
+ -- url = lpegmatch(utftohigh,url)
+ url = escapetex(url)
+ add_link(x,y,w,h,formatters["url(%s)"](url),"url")
+ end
+end
+
+-- The rules in PDF on what a 'file specification' is, is in fact quite elaborate
+-- (see section 3.10 in the 1.7 reference) so we need to test for string as well
+-- as a table. TH/20140916
+
+-- When embedded is set then files need to have page references which is seldom the
+-- case but you can generate them with context:
+--
+-- \setupinteraction[state=start,page={page,page}]
+--
+-- see tests/mkiv/interaction/cross[1|2|3].tex for an example
+
+local embedded = false directives.register("figures.embedded", function(v) embedded = v end)
+local reported = { }
+
+local function link_file(x,y,w,h,document,annotation)
+ local a = annotation.A
+ if a then
+ local filename = a.F
+ if type(filename) == "table" then
+ filename = filename.F
+ end
+ if filename then
+ filename = escapetex(filename)
+ local destination = a.D
+ if not destination then
+ add_link(x,y,w,h,formatters["file(%s)"](filename),"file")
+ elseif type(destination) == "string" then
+ add_link(x,y,w,h,formatters["%s::%s"](filename,destination),"file (named)")
+ else
+ -- hm, zero offset so maybe: destination + 1
+ destination = tonumber(destination[1]) -- array
+ if destination then
+ destination = destination + 1
+ local loaded = collected[lower(expandname(filename))]
+ if embedded and loaded then
+ add_link(x,y,w,h,makenamespace(filename) .. destination,what)
+ else
+ if loaded and not reported[filename] then
+ report_link("reference to an also loaded file %a, consider using directive: figures.embedded",filename)
+ reported[filename] = true
+ end
+ add_link(x,y,w,h,formatters["%s::page(%s)"](filename,destination),"file (page)")
+ end
+ else
+ add_link(x,y,w,h,formatters["file(%s)"](filename),"file")
+ end
+ end
+ end
+ end
+end
+
+-- maybe handler per subtype and then one loop but then what about order ...
+
+function codeinjections.mergereferences(specification)
+ local specification, fullname, document = validdocument(specification)
+ if not document then
+ return ""
+ end
+ local pagenumber = specification.page or 1
+ local pagedata = document.pages[pagenumber]
+ local annotations = pagedata and pagedata.Annots
+ local namespace = makenamespace(fullname)
+ local reference = namespace .. pagenumber
+ if annotations and #annotations > 0 then
+ local llx, lly, urx, ury, width, height, xscale, yscale = getmediasize(specification,pagedata,xscale,yscale)
+ initializelayer(height,width)
+ for i=1,#annotations do
+ local annotation = annotations[i]
+ if annotation then
+ if annotation.Subtype == "Link" then
+ local a = annotation.A
+ if not a then
+ local d = annotation.Dest
+ if d then
+ annotation.A = { S = "GoTo", D = d } -- no need for a dict
+ end
+ end
+ if not a then
+ report_link("missing link annotation")
+ else
+ local x, y, w, h = getdimensions(annotation,llx,lly,xscale,yscale,width,height,report_link)
+ if x then
+ local linktype = a.S
+ if linktype == "GoTo" then
+ link_goto(x,y,w,h,document,annotation,pagedata,namespace)
+ elseif linktype == "GoToR" then
+ link_file(x,y,w,h,document,annotation)
+ elseif linktype == "URI" then
+ link_uri(x,y,w,h,document,annotation)
+ elseif trace_links then
+ report_link("unsupported link annotation %a",linktype)
+ end
+ end
+ end
+ end
+ elseif trace_links then
+ report_link("broken annotation, index %a",i)
+ end
+ end
+ end
+ -- moved outside previous test
+ setmacro("mergedfigurereference",reference,"global")
+ if trace_links then
+ report_link("setting figure reference to %a",reference)
+ end
+ specification.reference = reference
+ return namespace
+end
+
+function codeinjections.mergeviewerlayers(specification)
+ -- todo: parse included page for layers .. or only for whole document inclusion
+ if true then
+ return
+ end
+ local specification, fullname, document = validdocument(specification)
+ if not document then
+ return ""
+ end
+ local namespace = makenamespace(fullname)
+ local layers = document.layers
+ if layers then
+ for i=1,#layers do
+ local layer = layers[i]
+ if layer then
+ local tag = namespace .. gsub(layer," ",":")
+ local title = tag
+ if trace_links then
+ report_link("using layer %a",tag)
+ end
+ attributes.viewerlayers.define { -- also does some cleaning
+ tag = tag, -- todo: #3A or so
+ title = title,
+ visible = variables.start,
+ editable = variables.yes,
+ printable = variables.yes,
+ }
+ codeinjections.useviewerlayer(tag)
+ elseif trace_links then
+ report_link("broken layer, index %a",i)
+ end
+ end
+ end
+end
+
+-- It took a bit of puzzling and playing around to come to the following
+-- implementation. In the end it looks simple but as usual it takes a while
+-- to see what the specification (and implementation) boils down to. Lots of
+-- shared properties and such. The scaling took some trial and error as
+-- viewers differ. I had to extend some low level helpers to make it more
+-- comfortable. Hm, the specification is somewhat incomplete as some fields
+-- are permitted even if not mentioned so in the end we can share more code.
+--
+-- If all works ok, we can get rid of some copies which saves time and space.
+
+local commentlike = {
+ Text = "text",
+ FreeText = "freetext",
+ Line = "line",
+ Square = "shape",
+ Circle = "shape",
+ Polygon = "poly",
+ PolyLine = "poly",
+ Highlight = "markup",
+ Underline = "markup",
+ Squiggly = "markup",
+ StrikeOut = "markup",
+ Caret = "text",
+ Stamp = "stamp",
+ Ink = "ink",
+ Popup = "popup",
+}
+
+local function copyBS(v) -- dict can be shared
+ if v then
+ -- return pdfdictionary {
+ -- Type = copypdfconstant(V.Type),
+ -- W = copypdfnumber (V.W),
+ -- S = copypdfstring (V.S),
+ -- D = copypdfarray (V.D),
+ -- }
+ return copypdfdictionary(v)
+ end
+end
+
+local function copyBE(v) -- dict can be shared
+ if v then
+ -- return pdfdictionary {
+ -- S = copypdfstring(V.S),
+ -- I = copypdfnumber(V.I),
+ -- }
+ return copypdfdictionary(v)
+ end
+end
+
+local function copyBorder(v) -- dict can be shared
+ if v then
+ -- todo
+ return copypdfarray(v)
+ end
+end
+
+local function copyPopup(v,references)
+ if v then
+ local p = references[v]
+ if p then
+ return pdfreference(p)
+ end
+ end
+end
+
+local function copyParent(v,references)
+ if v then
+ local p = references[v]
+ if p then
+ return pdfreference(p)
+ end
+ end
+end
+
+local function copyIRT(v,references)
+ if v then
+ local p = references[v]
+ if p then
+ return pdfreference(p)
+ end
+ end
+end
+
+local function copyC(v)
+ if v then
+ -- todo: check color space
+ return pdfcopyarray(v)
+ end
+end
+
+local function finalizer(d,xscale,yscale,a_llx,a_ury)
+ local q = d.QuadPoints or d.Vertices or d.CL
+ if q then
+ return function()
+ local h, v = pdfgetpos() -- already scaled
+ for i=1,#q,2 do
+ q[i] = xscale * q[i] + (h*bpfactor - xscale * a_llx)
+ q[i+1] = yscale * q[i+1] + (v*bpfactor - yscale * a_ury)
+ end
+ return d()
+ end
+ end
+ q = d.InkList or d.Path
+ if q then
+ return function()
+ local h, v = pdfgetpos() -- already scaled
+ for i=1,#q do
+ local q = q[i]
+ for i=1,#q,2 do
+ q[i] = xscale * q[i] + (h*bpfactor - xscale * a_llx)
+ q[i+1] = yscale * q[i+1] + (v*bpfactor - yscale * a_ury)
+ end
+ end
+ return d()
+ end
+ end
+ return d()
+end
+
+local validstamps = {
+ Approved = true,
+ Experimental = true,
+ NotApproved = true,
+ AsIs = true,
+ Expired = true,
+ NotForPublicRelease = true,
+ Confidential = true,
+ Final = true,
+ Sold = true,
+ Departmental = true,
+ ForComment = true,
+ TopSecret = true,
+ Draft = true,
+ ForPublicRelease = true,
+}
+
+-- todo: we can use runlocal instead of steps
+
+local function validStamp(v)
+ local name = "Stamped" -- fallback
+ if v then
+ local ok = validstamps[v]
+ if ok then
+ name = ok
+ else
+ for k in next, validstamps do
+ if find(v,k.."$") then
+ name = k
+ validstamps[v] = k
+ break
+ end
+ end
+ end
+ end
+ -- we temporary return to \TEX:
+ context.predefinesymbol { name }
+ context.step()
+ -- beware, an error is not reported
+ return pdfconstant(name), codeinjections.analyzenormalsymbol(name)
+end
+
+local annotationflags = lpdf.flags.annotations
+
+local function copyF(v,lock) -- todo: bxor 24
+ if lock then
+ v = bor(v or 0,annotationflags.ReadOnly + annotationflags.Locked + annotationflags.LockedContents)
+ end
+ if v then
+ return pdfcopyinteger(v)
+ end
+end
+
+-- Speed is not really an issue so we don't optimize this code too much. In the end (after
+-- testing we end up with less code that we started with.
+
+function codeinjections.mergecomments(specification)
+ local specification, fullname, document = validdocument(specification)
+ if not document then
+ return ""
+ end
+ local pagenumber = specification.page or 1
+ local pagedata = document.pages[pagenumber]
+ local annotations = pagedata and pagedata.Annots
+ if annotations and #annotations > 0 then
+ local llx, lly, urx, ury, width, height, xscale, yscale = getmediasize(specification,pagedata,xscale,yscale)
+ initializelayer(height,width)
+ --
+ local lockflags = specification.lock -- todo: proper parameter
+ local references = { }
+ local usedpopups = { }
+ for i=1,#annotations do
+ local annotation = annotations[i]
+ if annotation then
+ local subtype = annotation.Subtype
+ if commentlike[subtype] then
+ references[annotation] = pdfreserveobject()
+ local p = annotation.Popup
+ if p then
+ usedpopups[p] = true
+ end
+ end
+ end
+ end
+ --
+ for i=1,#annotations do
+ -- we keep the order
+ local annotation = annotations[i]
+ if annotation then
+ local reference = references[annotation]
+ if reference then
+ local subtype = annotation.Subtype
+ local kind = commentlike[subtype]
+ if kind ~= "popup" or usedpopups[annotation] then
+ local x, y, w, h, a_llx, a_lly, a_urx, a_ury = getdimensions(annotation,llx,lly,xscale,yscale,width,height,report_comment)
+ if x then
+ local voffset = h
+ local dictionary = pdfdictionary {
+ Subtype = pdfconstant (subtype),
+ -- common (skipped: P AP AS OC AF BM StructParent)
+ Contents = pdfcopyunicode(annotation.Contents),
+ NM = pdfcopystring (annotation.NM),
+ M = pdfcopystring (annotation.M),
+ F = copyF (annotation.F,lockflags),
+ C = copyC (annotation.C),
+ ca = pdfcopynumber (annotation.ca),
+ CA = pdfcopynumber (annotation.CA),
+ Lang = pdfcopystring (annotation.Lang),
+ -- also common
+ CreationDate = pdfcopystring (annotation.CreationDate),
+ T = pdfcopyunicode(annotation.T),
+ Subj = pdfcopyunicode(annotation.Subj),
+ -- border
+ Border = pdfcopyarray (annotation.Border),
+ BS = copyBS (annotation.BS),
+ BE = copyBE (annotation.BE),
+ -- sort of common
+ Popup = copyPopup (annotation.Popup,references),
+ RC = pdfcopyunicode(annotation.RC) -- string or stream
+ }
+ if kind == "markup" then
+ dictionary.IRT = copyIRT (annotation.IRT,references)
+ dictionary.RT = pdfconstant (annotation.RT)
+ dictionary.IT = pdfcopyconstant (annotation.IT)
+ dictionary.QuadPoints = pdfcopyarray (annotation.QuadPoints)
+ -- dictionary.RD = pdfcopyarray (annotation.RD)
+ elseif kind == "text" then
+ -- somehow F fails to view : /F 24 : bit4=nozoom bit5=norotate
+ dictionary.F = nil
+ dictionary.Open = pdfcopyboolean (annotation.Open)
+ dictionary.Name = pdfcopyunicode (annotation.Name)
+ dictionary.State = pdfcopystring (annotation.State)
+ dictionary.StateModel = pdfcopystring (annotation.StateModel)
+ dictionary.IT = pdfcopyconstant (annotation.IT)
+ dictionary.QuadPoints = pdfcopyarray (annotation.QuadPoints)
+ dictionary.RD = pdfcopyarray (annotation.RD) -- caret
+ dictionary.Sy = pdfcopyconstant (annotation.Sy) -- caret
+ voffset = 0
+ elseif kind == "freetext" then
+ dictionary.DA = pdfcopystring (annotation.DA)
+ dictionary.Q = pdfcopyinteger (annotation.Q)
+ dictionary.DS = pdfcopystring (annotation.DS)
+ dictionary.CL = pdfcopyarray (annotation.CL)
+ dictionary.IT = pdfcopyconstant (annotation.IT)
+ dictionary.LE = pdfcopyconstant (annotation.LE)
+ -- dictionary.RC = pdfcopystring (annotation.RC)
+ elseif kind == "line" then
+ dictionary.LE = pdfcopyarray (annotation.LE)
+ dictionary.IC = pdfcopyarray (annotation.IC)
+ dictionary.LL = pdfcopynumber (annotation.LL)
+ dictionary.LLE = pdfcopynumber (annotation.LLE)
+ dictionary.Cap = pdfcopyboolean (annotation.Cap)
+ dictionary.IT = pdfcopyconstant (annotation.IT)
+ dictionary.LLO = pdfcopynumber (annotation.LLO)
+ dictionary.CP = pdfcopyconstant (annotation.CP)
+ dictionary.Measure = pdfcopydictionary(annotation.Measure) -- names
+ dictionary.CO = pdfcopyarray (annotation.CO)
+ voffset = 0
+ elseif kind == "shape" then
+ dictionary.IC = pdfcopyarray (annotation.IC)
+ -- dictionary.RD = pdfcopyarray (annotation.RD)
+ voffset = 0
+ elseif kind == "stamp" then
+ local name, appearance = validStamp(annotation.Name)
+ dictionary.Name = name
+ dictionary.AP = appearance
+ voffset = 0
+ elseif kind == "ink" then
+ dictionary.InkList = pdfcopyarray (annotation.InkList)
+ elseif kind == "poly" then
+ dictionary.Vertices = pdfcopyarray (annotation.Vertices)
+ -- dictionary.LE = pdfcopyarray (annotation.LE) -- todo: names in array
+ dictionary.IC = pdfcopyarray (annotation.IC)
+ dictionary.IT = pdfcopyconstant (annotation.IT)
+ dictionary.Measure = pdfcopydictionary(annotation.Measure)
+ dictionary.Path = pdfcopyarray (annotation.Path)
+ -- dictionary.RD = pdfcopyarray (annotation.RD)
+ elseif kind == "popup" then
+ dictionary.Open = pdfcopyboolean (annotation.Open)
+ dictionary.Parent = copyParent (annotation.Parent,references)
+ voffset = 0
+ end
+ if dictionary then
+ local locationspec = {
+ x = x .. "bp",
+ y = y .. "bp",
+ voffset = voffset .. "bp",
+ preset = "leftbottom",
+ }
+ local finalize = finalizer(dictionary,xscale,yscale,a_llx,a_ury)
+ context.setlayer(layerspec,locationspec,function()
+ context(hpack_node(nodeinjections.annotation(w/bpfactor,h/bpfactor,0,finalize,reference)))
+ end)
+ end
+ end
+ else
+ -- report_comment("skipping annotation, index %a",i)
+ end
+ end
+ elseif trace_comments then
+ report_comment("broken annotation, index %a",i)
+ end
+ end
+ end
+ return namespace
+end
+
+local widgetflags = lpdf.flags.widgets
+
+local function flagstoset(flag,flags)
+ local t = { }
+ if flags then
+ for k, v in next, flags do
+ if band(flag,v) ~= 0 then
+ t[k] = true
+ end
+ end
+ end
+ return t
+end
+
+-- BS : border style dict
+-- R : rotation 0 90 180 270
+-- BG : background array
+-- CA : caption string
+-- RC : roll over caption
+-- AC : down caption
+-- I/RI/IX : icon streams
+-- IF : fit dictionary
+-- TP : text position number
+
+-- Opt : array of texts
+-- TI : top index
+
+-- V : value
+-- DV : default value
+-- DS : default string
+-- RV : rich
+-- Q : quadding (0=left 1=middle 2=right)
+
+function codeinjections.mergefields(specification)
+ local specification, fullname, document = validdocument(specification)
+ if not document then
+ return ""
+ end
+ local pagenumber = specification.page or 1
+ local pagedata = document.pages[pagenumber]
+ local annotations = pagedata and pagedata.Annots
+ if annotations and #annotations > 0 then
+ local llx, lly, urx, ury, width, height, xscale, yscale = getmediasize(specification,pagedata,xscale,yscale)
+ initializelayer(height,width)
+ --
+ for i=1,#annotations do
+ -- we keep the order
+ local annotation = annotations[i]
+ if annotation then
+ local subtype = annotation.Subtype
+ if subtype == "Widget" then
+ local parent = annotation.Parent or { }
+ local name = annotation.T or parent.T
+ local what = annotation.FT or parent.FT
+ if name and what then
+ local x, y, w, h, a_llx, a_lly, a_urx, a_ury = getdimensions(annotation,llx,lly,xscale,yscale,width,height,report_field)
+ if x then
+ x = x .. "bp"
+ y = y .. "bp"
+ local W, H = w, h
+ w = w .. "bp"
+ h = h .. "bp"
+ if trace_fields then
+ report_field("field %a, type %a, dx %s, dy %s, wd %s, ht %s",name,what,x,y,w,h)
+ end
+ local locationspec = {
+ x = x,
+ y = y,
+ preset = "leftbottom",
+ }
+ --
+ local aflags = flagstoset(annotation.F or parent.F, annotationflags)
+ local wflags = flagstoset(annotation.Ff or parent.Ff, widgetflags)
+ if what == "Tx" then
+ -- DA DV F FT MaxLen MK Q T V | AA OC
+ if wflags.MultiLine then
+ wflags.MultiLine = nil
+ what = "text"
+ else
+ what = "line"
+ end
+ -- via context
+ local fieldspec = {
+ width = w,
+ height = h,
+ offset = variables.overlay,
+ frame = trace_links and variables.on or variables.off,
+ n = annotation.MaxLen or (parent and parent.MaxLen),
+ type = what,
+ option = concat(merged(aflags,wflags),","),
+ }
+ context.setlayer (layerspec,locationspec,function()
+ context.definefieldbody ( { name } , fieldspec )
+ context.fieldbody ( { name } )
+ end)
+ --
+ elseif what == "Btn" then
+ if wflags.Radio or wflags.RadiosInUnison then
+ -- AP AS DA F Ff FT H MK T V | AA OC
+ wflags.Radio = nil
+ wflags.RadiosInUnison = nil
+ what = "radio"
+ elseif wflags.PushButton then
+ -- AP DA F Ff FT H MK T | AA OC
+ --
+ -- Push buttons only have an appearance and some associated
+ -- actions so they are not worth copying.
+ --
+ wflags.PushButton = nil
+ what = "push"
+ else
+ -- AP AS DA F Ff FT H MK T V | OC AA
+ what = "check"
+ -- direct
+ local AP = annotation.AP or (parent and parent.AP)
+ if AP then
+ local a = document.__xrefs__[AP]
+ if a and pdfe.copyappearance then
+ local o = pdfe.copyappearance(document,a)
+ if o then
+ AP = pdfreference(o)
+ end
+ end
+ end
+ local dictionary = pdfdictionary {
+ Subtype = pdfconstant("Widget"),
+ FT = pdfconstant("Btn"),
+ T = pdfcopyunicode(annotation.T or parent.T),
+ F = pdfcopyinteger(annotation.F or parent.F),
+ Ff = pdfcopyinteger(annotation.Ff or parent.Ff),
+ AS = pdfcopyconstant(annotation.AS or (parent and parent.AS)),
+ AP = AP and pdfreference(AP),
+ }
+ local finalize = dictionary()
+ context.setlayer(layerspec,locationspec,function()
+ context(hpack_node(nodeinjections.annotation(W/bpfactor,H/bpfactor,0,finalize)))
+ end)
+ --
+ end
+ elseif what == "Ch" then
+ -- F Ff FT Opt T | AA OC (rest follows)
+ if wflags.PopUp then
+ wflags.PopUp = nil
+ if wflags.Edit then
+ wflags.Edit = nil
+ what = "combo"
+ else
+ what = "popup"
+ end
+ else
+ what = "choice"
+ end
+ elseif what == "Sig" then
+ what = "signature"
+ else
+ what = nil
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+-- Beware, bookmarks can be in pdfdoc encoding or in unicode. However, in mkiv we
+-- write out the strings in unicode (hex). When we read them in, we check for a bom
+-- and convert to utf.
+
+function codeinjections.getbookmarks(filename)
+
+ -- The first version built a nested tree and flattened that afterwards ... but I decided
+ -- to keep it simple and flat.
+
+ local list = bookmarks.extras.get(filename)
+
+ if list then
+ return list
+ else
+ list = { }
+ end
+
+ local document = nil
+
+ if isfile(filename) then
+ document = loadpdffile(filename)
+ else
+ report_outline("unknown file %a",filename)
+ bookmarks.extras.register(filename,list)
+ return list
+ end
+
+ local outlines = document.Catalog.Outlines
+ local pages = document.pages
+ local nofpages = document.nofpages
+ local destinations = document.destinations
+
+ -- I need to check this destination analyzer with the one in annotations .. best share
+ -- code (and not it's inconsistent). On the todo list ...
+
+ local function setdestination(current,entry)
+ local destination = nil
+ local action = current.A
+ if action then
+ local subtype = action.S
+ if subtype == "GoTo" then
+ destination = action.D
+ local kind = type(destination)
+ if kind == "string" then
+ entry.destination = destination
+ destination = destinations[destination]
+ local pagedata = destination and destination[1]
+ if pagedata then
+ entry.realpage = pagedata.number
+ end
+ elseif kind == "table" then
+ local pageref = #destination
+ if pageref then
+ local pagedata = pages[pageref]
+ if pagedata then
+ entry.realpage = pagedata.number
+ end
+ end
+ end
+ -- elseif subtype then
+ -- report("unsupported bookmark action %a",subtype)
+ end
+ else
+ local destination = current.Dest
+ if destination then
+ if type(destination) == "string" then
+ local wanted = destinations[destination]
+ destination = wanted and wanted.D
+ if destination then
+ entry.destination = destination
+ end
+ else
+ local pagedata = destination and destination[1]
+ if pagedata and pagedata.Type == "Page" then
+ entry.realpage = pagedata.number
+ -- else
+ -- report("unsupported bookmark destination (no page)")
+ end
+ end
+ end
+ end
+ end
+
+ local function traverse(current,depth)
+ while current do
+ -- local title = current.Title
+ local title = current("Title") -- can be pdfdoc or unicode
+ if title then
+ local entry = {
+ level = depth,
+ title = title,
+ }
+ list[#list+1] = entry
+ setdestination(current,entry)
+ if trace_outlines then
+ report_outline("%w%s",2*depth,title)
+ end
+ end
+ local first = current.First
+ if first then
+ local current = first
+ while current do
+ local title = current.Title
+ if title and trace_outlines then
+ report_outline("%w%s",2*depth,title)
+ end
+ local entry = {
+ level = depth,
+ title = title,
+ }
+ setdestination(current,entry)
+ list[#list+1] = entry
+ traverse(current.First,depth+1)
+ current = current.Next
+ end
+ end
+ current = current.Next
+ end
+ end
+
+ if outlines then
+ if trace_outlines then
+ report_outline("outline of %a:",document.filename)
+ report_outline()
+ end
+ traverse(outlines,0)
+ if trace_outlines then
+ report_outline()
+ end
+ elseif trace_outlines then
+ report_outline("no outline in %a",document.filename)
+ end
+
+ bookmarks.extras.register(filename,list)
+
+ return list
+
+end
+
+function codeinjections.mergebookmarks(specification)
+ -- codeinjections.getbookmarks(document)
+ if not specification then
+ specification = figures and figures.current()
+ specification = specification and specification.status
+ end
+ if specification then
+ local fullname = specification.fullname
+ local bookmarks = backends.codeinjections.getbookmarks(fullname)
+ local realpage = tonumber(specification.page) or 1
+ for i=1,#bookmarks do
+ local b = bookmarks[i]
+ if not b.usedpage then
+ if b.realpage == realpage then
+ if trace_options then
+ report_outline("using %a at page %a of file %a",b.title,realpage,fullname)
+ end
+ b.usedpage = true
+ b.section = structures.sections.currentsectionindex()
+ b.pageindex = specification.pageindex
+ end
+ end
+ end
+ end
+end
+
+-- A bit more than a placeholder but in the same perspective as
+-- inclusion of comments and fields:
+--
+-- getinfo{ filename = "tt.pdf", metadata = true }
+-- getinfo{ filename = "tt.pdf", page = 1, metadata = "xml" }
+-- getinfo("tt.pdf")
+
+function codeinjections.getinfo(specification)
+ if type(specification) == "string" then
+ specification = { filename = specification }
+ end
+ local filename = specification.filename
+ if type(filename) == "string" and isfile(filename) then
+ local pdffile = loadpdffile(filename)
+ if pdffile then
+ local pagenumber = specification.page or 1
+ local metadata = specification.metadata
+ local catalog = pdffile.Catalog
+ local info = pdffile.Info
+ local pages = pdffile.pages
+ local nofpages = pdffile.nofpages
+ if metadata then
+ local m = catalog.Metadata
+ if m then
+ m = m()
+ if metadata == "xml" then
+ metadata = xml.convert(m)
+ else
+ metadata = m
+ end
+ else
+ metadata = nil
+ end
+ else
+ metadata = nil
+ end
+ if pagenumber > nofpages then
+ pagenumber = nofpages
+ end
+ local nobox = { 0, 0, 0, 0 }
+ local crop = nobox
+ local media = nobox
+ local page = pages[pagenumber]
+ if page then
+ crop = page.CropBox or nobox
+ media = page.MediaBox or crop or nobox
+ end
+ local bbox = crop or media or nobox
+ return {
+ filename = filename,
+ pdfversion = tonumber(catalog.Version),
+ nofpages = nofpages,
+ title = info.Title,
+ creator = info.Creator,
+ producer = info.Producer,
+ creationdate = info.CreationDate,
+ modification = info.ModDate,
+ metadata = metadata,
+ width = bbox[4] - bbox[2],
+ height = bbox[3] - bbox[1],
+ cropbox = { crop[1], crop[2], crop[3], crop[4] }, -- we need access
+ mediabox = { media[1], media[2], media[3], media[4] } , -- we need access
+ }
+ end
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-fld.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-fld.lmt
new file mode 100644
index 00000000000..eacbb085d88
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-fld.lmt
@@ -0,0 +1,1501 @@
+if not modules then modules = { } end modules ['lpdf-fld'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- TURN OFF: preferences -> forms -> highlight -> etc
+
+-- The problem with widgets is that so far each version of acrobat has some
+-- rendering problem. I tried to keep up with this but it makes no sense to do so as
+-- one cannot rely on the viewer not changing. Especially Btn fields are tricky as
+-- their appearences need to be synchronized in the case of children but e.g.
+-- acrobat 10 does not retain the state and forces a check symbol. If you make a
+-- file in acrobat then it has MK entries that seem to overload the already present
+-- appearance streams (they're probably only meant for printing) as it looks like
+-- the viewer has some fallback on (auto generated) MK behaviour built in. So ...
+-- hard to test. Unfortunately not even the default appearance is generated. This
+-- will probably be solved at some point.
+--
+-- Also, for some reason the viewer does not always show custom appearances when
+-- fields are being rolled over or clicked upon, and circles or checks pop up when
+-- you don't expect them. I fear that this kind of instability eventually will kill
+-- pdf forms. After all, the manual says: "individual annotation handlers may ignore
+-- this entry and provide their own appearances" and one might wonder what
+-- 'individual' means here, but effectively this renders the whole concept of
+-- appearances useless.
+--
+-- Okay, here is one observation. A pdf file contains objects and one might consider
+-- each one to be a static entity when read in. However, acrobat starts rendering
+-- and seems to manipulate (appearance streams) of objects in place (this is visible
+-- when the file is saved again). And, combined with some other caching and hashing,
+-- this might give side effects for shared objects. So, it seems that for some cases
+-- one can best be not too clever and not share but duplicate information. Of course
+-- this defeats the whole purpose of these objects. Of course I can be wrong.
+--
+-- A rarther weird side effect of the viewer is that the highlighting of fields
+-- obscures values, unless you uses one of the BS variants, and this makes custum
+-- appearances rather useless as there is no way to control this apart from changing
+-- the viewer preferences. It could of course be a bug but it would be nice if the
+-- highlighting was at least transparent. I have no clue why the built in shapes
+-- work ok (some xform based appearances are generated) while equally valid other
+-- xforms fail. It looks like acrobat appearances come on top (being refered to in
+-- the MK) while custom ones are behind the highlight rectangle. One can disable the
+-- "Show border hover color for fields" option in the preferences. If you load
+-- java-imp-rhh this side effect gets disabled and you get what you expect (it took
+-- me a while to figure out this hack).
+--
+-- When highlighting is enabled, those default symbols flash up, so it looks like we
+-- have some inteference between this setting and custom appearances.
+--
+-- Anyhow, the NeedAppearances is really needed in order to get a rendering for
+-- printing especially when highlighting (those colorfull foregrounds) is on.
+
+local tostring, tonumber, next = tostring, tonumber, next
+local gmatch, lower, format, formatters = string.gmatch, string.lower, string.format, string.formatters
+local lpegmatch = lpeg.match
+local bpfactor, todimen = number.dimenfactors.bp, string.todimen
+local sortedhash = table.sortedhash
+local trace_fields = false trackers.register("backends.fields", function(v) trace_fields = v end)
+
+local report_fields = logs.reporter("backend","fields")
+
+local backends, lpdf = backends, lpdf
+
+local variables = interfaces.variables
+local context = context
+
+local references = structures.references
+local settings_to_array = utilities.parsers.settings_to_array
+
+local pdfbackend = backends.pdf
+
+local nodeinjections = pdfbackend.nodeinjections
+local codeinjections = pdfbackend.codeinjections
+local registrations = pdfbackend.registrations
+
+local registeredsymbol = codeinjections.registeredsymbol
+
+local pdfstream = lpdf.stream
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfreference = lpdf.reference
+local pdfunicode = lpdf.unicode
+local pdfstring = lpdf.string
+local pdfconstant = lpdf.constant
+local pdfaction = lpdf.action
+
+local pdfflushobject
+local pdfshareobjectreference
+local pdfshareobject
+local pdfreserveobject
+local pdfpagereference
+local pdfmajorversion
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+ pdfshareobjectreference = lpdf.shareobjectreference
+ pdfshareobject = lpdf.shareobject
+ pdfreserveobject = lpdf.reserveobject
+ pdfpagereference = lpdf.pagereference
+ pdfmajorversion = lpdf.majorversion
+end)
+
+local pdfcolor = lpdf.color
+local pdfcolorvalues = lpdf.colorvalues
+local pdflayerreference = lpdf.layerreference
+
+local hpack_node = node.hpack
+
+local submitoutputformat = 0 -- 0=unknown 1=HTML 2=FDF 3=XML => not yet used, needs to be checked
+
+local pdf_widget = pdfconstant("Widget")
+local pdf_tx = pdfconstant("Tx")
+local pdf_sig = pdfconstant("Sig")
+local pdf_ch = pdfconstant("Ch")
+local pdf_btn = pdfconstant("Btn")
+local pdf_yes = pdfconstant("Yes")
+local pdf_off = pdfconstant("Off")
+local pdf_p = pdfconstant("P") -- None Invert Outline Push
+local pdf_n = pdfconstant("N") -- None Invert Outline Push
+--
+local pdf_no_rect = pdfarray { 0, 0, 0, 0 }
+
+local splitter = lpeg.splitat("=>")
+
+local formats = {
+ html = 1, fdf = 2, xml = 3,
+}
+
+function codeinjections.setformsmethod(name)
+ submitoutputformat = formats[lower(name)] or formats.xml
+end
+
+local flag = { -- /Ff
+ ReadOnly = 0x00000001, -- 2^ 0
+ Required = 0x00000002, -- 2^ 1
+ NoExport = 0x00000004, -- 2^ 2
+ MultiLine = 0x00001000, -- 2^12
+ Password = 0x00002000, -- 2^13
+ NoToggleToOff = 0x00004000, -- 2^14
+ Radio = 0x00008000, -- 2^15
+ PushButton = 0x00010000, -- 2^16
+ PopUp = 0x00020000, -- 2^17
+ Edit = 0x00040000, -- 2^18
+ Sort = 0x00080000, -- 2^19
+ FileSelect = 0x00100000, -- 2^20
+ DoNotSpellCheck = 0x00400000, -- 2^22
+ DoNotScroll = 0x00800000, -- 2^23
+ Comb = 0x01000000, -- 2^24
+ RichText = 0x02000000, -- 2^25
+ RadiosInUnison = 0x02000000, -- 2^25
+ CommitOnSelChange = 0x04000000, -- 2^26
+}
+
+local plus = { -- /F
+ Invisible = 0x00000001, -- 2^0
+ Hidden = 0x00000002, -- 2^1
+ Printable = 0x00000004, -- 2^2
+ Print = 0x00000004, -- 2^2
+ NoZoom = 0x00000008, -- 2^3
+ NoRotate = 0x00000010, -- 2^4
+ NoView = 0x00000020, -- 2^5
+ ReadOnly = 0x00000040, -- 2^6
+ Locked = 0x00000080, -- 2^7
+ ToggleNoView = 0x00000100, -- 2^8
+ LockedContents = 0x00000200, -- 2^9
+ AutoView = 0x00000100, -- 2^8
+}
+
+-- todo: check what is interfaced
+
+flag.readonly = flag.ReadOnly
+flag.required = flag.Required
+flag.protected = flag.Password
+flag.sorted = flag.Sort
+flag.unavailable = flag.NoExport
+flag.nocheck = flag.DoNotSpellCheck
+flag.fixed = flag.DoNotScroll
+flag.file = flag.FileSelect
+
+plus.hidden = plus.Hidden
+plus.printable = plus.Printable
+plus.auto = plus.AutoView
+
+lpdf.flags.widgets = flag
+lpdf.flags.annotations = plus
+
+-- some day .. lpeg with function or table
+
+local function fieldflag(specification) -- /Ff
+ local o, n = specification.option, 0
+ if o and o ~= "" then
+ for f in gmatch(o,"[^, ]+") do
+ n = n + (flag[f] or 0)
+ end
+ end
+ return n
+end
+
+local function fieldplus(specification) -- /F
+ local o, n = specification.option, 0
+ if o and o ~= "" then
+ for p in gmatch(o,"[^, ]+") do
+ n = n + (plus[p] or 0)
+ end
+ end
+-- n = n + 4
+ return n
+end
+
+-- keep:
+--
+-- local function checked(what)
+-- local set, bug = references.identify("",what)
+-- if not bug and #set > 0 then
+-- local r, n = pdfaction(set)
+-- return pdfshareobjectreference(r)
+-- end
+-- end
+--
+-- local function fieldactions(specification) -- share actions
+-- local d, a = { }, nil
+-- a = specification.mousedown
+-- or specification.clickin if a and a ~= "" then d.D = checked(a) end
+-- a = specification.mouseup
+-- or specification.clickout if a and a ~= "" then d.U = checked(a) end
+-- a = specification.regionin if a and a ~= "" then d.E = checked(a) end -- Enter
+-- a = specification.regionout if a and a ~= "" then d.X = checked(a) end -- eXit
+-- a = specification.afterkey if a and a ~= "" then d.K = checked(a) end
+-- a = specification.format if a and a ~= "" then d.F = checked(a) end
+-- a = specification.validate if a and a ~= "" then d.V = checked(a) end
+-- a = specification.calculate if a and a ~= "" then d.C = checked(a) end
+-- a = specification.focusin if a and a ~= "" then d.Fo = checked(a) end
+-- a = specification.focusout if a and a ~= "" then d.Bl = checked(a) end
+-- a = specification.openpage if a and a ~= "" then d.PO = checked(a) end
+-- a = specification.closepage if a and a ~= "" then d.PC = checked(a) end
+-- -- a = specification.visiblepage if a and a ~= "" then d.PV = checked(a) end
+-- -- a = specification.invisiblepage if a and a ~= "" then d.PI = checked(a) end
+-- return next(d) and pdfdictionary(d)
+-- end
+
+local mapping = {
+ mousedown = "D", clickin = "D",
+ mouseup = "U", clickout = "U",
+ regionin = "E",
+ regionout = "X",
+ afterkey = "K",
+ format = "F",
+ validate = "V",
+ calculate = "C",
+ focusin = "Fo",
+ focusout = "Bl",
+ openpage = "PO",
+ closepage = "PC",
+ -- visiblepage = "PV",
+ -- invisiblepage = "PI",
+}
+
+local function fieldactions(specification) -- share actions
+ local d = nil
+ for key, target in sortedhash(mapping) do -- sort so that we can compare pdf
+ local code = specification[key]
+ if code and code ~= "" then
+ -- local a = checked(code)
+ local set, bug = references.identify("",code)
+ if not bug and #set > 0 then
+ local a = pdfaction(set) -- r, n
+ if a then
+ local r = pdfshareobjectreference(a)
+ if d then
+ d[target] = r
+ else
+ d = pdfdictionary { [target] = r }
+ end
+ else
+ report_fields("invalid field action %a, case %s",code,2)
+ end
+ else
+ report_fields("invalid field action %a, case %s",code,1)
+ end
+ end
+ end
+ -- if d then
+ -- d = pdfshareobjectreference(d) -- not much overlap or maybe only some patterns
+ -- end
+ return d
+end
+
+-- fonts and color
+
+local pdfdocencodingvector, pdfdocencodingcapsule
+
+-- The pdf doc encoding vector is needed in order to trigger propper unicode. Interesting is that when
+-- a glyph is not in the vector, it is still visible as it is taken from some other font. Messy.
+
+-- To be checked: only when text/line fields.
+
+local function checkpdfdocencoding()
+ report_fields("adding pdfdoc encoding vector")
+ local encoding = dofile(resolvers.findfile("lpdf-enc.lmt")) -- no checking, fatal if not present
+ pdfdocencodingvector = pdfreference(pdfflushobject(encoding))
+ local capsule = pdfdictionary {
+ PDFDocEncoding = pdfdocencodingvector
+ }
+ pdfdocencodingcapsule = pdfreference(pdfflushobject(capsule))
+ checkpdfdocencoding = function() end
+end
+
+local fontnames = {
+ rm = {
+ tf = "Times-Roman",
+ bf = "Times-Bold",
+ it = "Times-Italic",
+ sl = "Times-Italic",
+ bi = "Times-BoldItalic",
+ bs = "Times-BoldItalic",
+ },
+ ss = {
+ tf = "Helvetica",
+ bf = "Helvetica-Bold",
+ it = "Helvetica-Oblique",
+ sl = "Helvetica-Oblique",
+ bi = "Helvetica-BoldOblique",
+ bs = "Helvetica-BoldOblique",
+ },
+ tt = {
+ tf = "Courier",
+ bf = "Courier-Bold",
+ it = "Courier-Oblique",
+ sl = "Courier-Oblique",
+ bi = "Courier-BoldOblique",
+ bs = "Courier-BoldOblique",
+ },
+ symbol = {
+ dingbats = "ZapfDingbats",
+ }
+}
+
+local usedfonts = { }
+
+local function fieldsurrounding(specification)
+ local fontsize = specification.fontsize or "12pt"
+ local fontstyle = specification.fontstyle or "rm"
+ local fontalternative = specification.fontalternative or "tf"
+ local colorvalue = tonumber(specification.colorvalue)
+ local s = fontnames[fontstyle]
+ if not s then
+ fontstyle, s = "rm", fontnames.rm
+ end
+ local a = s[fontalternative]
+ if not a then
+ alternative, a = "tf", s.tf
+ end
+ local tag = fontstyle .. fontalternative
+ fontsize = todimen(fontsize)
+ fontsize = fontsize and (bpfactor * fontsize) or 12
+ fontraise = 0.1 * fontsize -- todo: figure out what the natural one is and compensate for strutdp
+ local fontcode = formatters["%0.4F Tf %0.4F Ts"](fontsize,fontraise)
+ -- we could test for colorvalue being 1 (black) and omit it then
+ local colorcode = pdfcolor(3,colorvalue) -- we force an rgb color space
+ if trace_fields then
+ report_fields("using font, style %a, alternative %a, size %p, tag %a, code %a",fontstyle,fontalternative,fontsize,tag,fontcode)
+ report_fields("using color, value %a, code %a",colorvalue,colorcode)
+ end
+ local stream = pdfstream {
+ pdfconstant(tag),
+ formatters["%s %s"](fontcode,colorcode)
+ }
+ usedfonts[tag] = a -- the name
+ -- move up with "x.y Ts"
+ return tostring(stream)
+end
+
+-- Can we use any font?
+
+codeinjections.fieldsurrounding = fieldsurrounding
+
+local function registerfonts()
+ if next(usedfonts) then
+ checkpdfdocencoding() -- already done
+ local pdffontlist = pdfdictionary()
+ local pdffonttype = pdfconstant("Font")
+ local pdffontsubtype = pdfconstant("Type1")
+ for tag, name in sortedhash(usedfonts) do
+ local f = pdfdictionary {
+ Type = pdffonttype,
+ Subtype = pdffontsubtype,
+ Name = pdfconstant(tag),
+ BaseFont = pdfconstant(name),
+ Encoding = pdfdocencodingvector,
+ }
+ pdffontlist[tag] = pdfreference(pdfflushobject(f))
+ end
+ return pdffontlist
+ end
+end
+
+-- symbols
+
+local function fieldappearances(specification)
+ -- todo: caching
+ local values = specification.values
+ local default = specification.default -- todo
+ if not values then
+ -- error
+ return
+ end
+ local v = settings_to_array(values)
+ local n, r, d
+ if #v == 1 then
+ n, r, d = v[1], v[1], v[1]
+ elseif #v == 2 then
+ n, r, d = v[1], v[1], v[2]
+ else
+ n, r, d = v[1], v[2], v[3]
+ end
+ local appearance = pdfdictionary {
+ N = registeredsymbol(n),
+ R = registeredsymbol(r),
+ D = registeredsymbol(d),
+ }
+ return pdfshareobjectreference(appearance)
+-- return pdfreference(pdfflushobject(appearance))
+end
+
+-- The rendering part of form support has always been crappy and didn't really
+-- improve over time. Did bugs become features? Who knows. Why provide for instance
+-- control over appearance and then ignore it when the mouse clicks someplace else.
+-- Strangely enough a lot of effort went into JavaScript support while basic
+-- appearance control of checkboxes stayed poor. I found this link when googling for
+-- conformation after the n^th time looking into this behaviour:
+--
+-- https://stackoverflow.com/questions/15479855/pdf-appearance-streams-checkbox-not-shown-correctly-after-focus-lost
+--
+-- ... "In particular check boxes, therefore, whenever not interacting with the user, shall
+-- be displayed using their normal captions, not their appearances."
+--
+-- So: don't use check boxes. In fact, even radio buttons can have these funny "flash some
+-- funny symbol" side effect when clocking on them. I tried all combinations if /H and /AP
+-- and /AS and ... Because (afaiks) the acrobat interface assumes that one uses dingbats no
+-- one really cared about getting custom appeances done well. This erratic behaviour might
+-- as well be the reason why no open source viewer ever bothered implementing forms. It's
+-- probably also why most forms out there look kind of bad.
+
+local function fieldstates_precheck(specification)
+ local values = specification.values
+ local default = specification.default
+ if not values or values == "" then
+ return
+ end
+ local yes = settings_to_array(values)[1]
+ local yesshown, yesvalue = lpegmatch(splitter,yes)
+ if not (yesshown and yesvalue) then
+ yesshown = yes
+ end
+ return default == settings_to_array(yesshown)[1] and pdf_yes or pdf_off
+end
+
+local function fieldstates_check(specification)
+ -- we don't use Opt here (too messy for radio buttons)
+ local values = specification.values
+ local default = specification.default
+ if not values or values == "" then
+ -- error
+ return
+ end
+ local v = settings_to_array(values)
+ local yes, off, yesn, yesr, yesd, offn, offr, offd
+ if #v == 1 then
+ yes, off = v[1], v[1]
+ else
+ yes, off = v[1], v[2]
+ end
+ local yesshown, yesvalue = lpegmatch(splitter,yes)
+ if not (yesshown and yesvalue) then
+ yesshown = yes, yes
+ end
+ yes = settings_to_array(yesshown)
+ local offshown, offvalue = lpegmatch(splitter,off)
+ if not (offshown and offvalue) then
+ offshown = off, off
+ end
+ off = settings_to_array(offshown)
+ if #yes == 1 then
+ yesn, yesr, yesd = yes[1], yes[1], yes[1]
+ elseif #yes == 2 then
+ yesn, yesr, yesd = yes[1], yes[1], yes[2]
+ else
+ yesn, yesr, yesd = yes[1], yes[2], yes[3]
+ end
+ if #off == 1 then
+ offn, offr, offd = off[1], off[1], off[1]
+ elseif #off == 2 then
+ offn, offr, offd = off[1], off[1], off[2]
+ else
+ offn, offr, offd = off[1], off[2], off[3]
+ end
+ if not yesvalue then
+ yesvalue = yesdefault or yesn
+ end
+ if not offvalue then
+ offvalue = offn
+ end
+ if default == yesn then
+ default = pdf_yes
+ yesvalue = yesvalue == yesn and "Yes" or "Off"
+ else
+ default = pdf_off
+ yesvalue = "Off"
+ end
+ local appearance
+ -- if false then
+ if true then
+ -- needs testing
+ appearance = pdfdictionary { -- maybe also cache components
+ N = pdfshareobjectreference(pdfdictionary { Yes = registeredsymbol(yesn), Off = registeredsymbol(offn) }),
+ R = pdfshareobjectreference(pdfdictionary { Yes = registeredsymbol(yesr), Off = registeredsymbol(offr) }),
+ D = pdfshareobjectreference(pdfdictionary { Yes = registeredsymbol(yesd), Off = registeredsymbol(offd) }),
+ }
+ else
+ appearance = pdfdictionary { -- maybe also cache components
+ N = pdfdictionary { Yes = registeredsymbol(yesn), Off = registeredsymbol(offn) },
+ R = pdfdictionary { Yes = registeredsymbol(yesr), Off = registeredsymbol(offr) },
+ D = pdfdictionary { Yes = registeredsymbol(yesd), Off = registeredsymbol(offd) }
+ }
+ end
+ local appearanceref = pdfshareobjectreference(appearance)
+ -- local appearanceref = pdfreference(pdfflushobject(appearance))
+ return appearanceref, default, yesvalue
+end
+
+-- It looks like there is always a (MK related) symbol used and that the appearances
+-- are only used as ornaments behind a symbol. So, contrary to what we did when
+-- widgets showed up, we now limit ourself to more dumb definitions. Especially when
+-- highlighting is enabled weird interferences happen. So, we play safe (some nice
+-- code has been removed that worked well till recently).
+
+local function fieldstates_radio(specification,name,parent)
+ local values = values or specification.values
+ local default = default or parent.default -- specification.default
+ if not values or values == "" then
+ -- error
+ return
+ end
+ local v = settings_to_array(values)
+ local yes, off, yesn, yesr, yesd, offn, offr, offd
+ if #v == 1 then
+ yes, off = v[1], v[1]
+ else
+ yes, off = v[1], v[2]
+ end
+ -- yes keys might be the same in the three appearances within a field
+ -- but can best be different among fields ... don't ask why
+ local yessymbols, yesvalue = lpegmatch(splitter,yes) -- n,r,d=>x
+ if not (yessymbols and yesvalue) then
+ yessymbols = yes
+ end
+ if not yesvalue then
+ yesvalue = name
+ end
+ yessymbols = settings_to_array(yessymbols)
+ if #yessymbols == 1 then
+ yesn = yessymbols[1]
+ yesr = yesn
+ yesd = yesr
+ elseif #yessymbols == 2 then
+ yesn = yessymbols[1]
+ yesr = yessymbols[2]
+ yesd = yesr
+ else
+ yesn = yessymbols[1]
+ yesr = yessymbols[2]
+ yesd = yessymbols[3]
+ end
+ -- we don't care about names, as all will be /Off
+ local offsymbols = lpegmatch(splitter,off) or off
+ offsymbols = settings_to_array(offsymbols)
+ if #offsymbols == 1 then
+ offn = offsymbols[1]
+ offr = offn
+ offd = offr
+ elseif #offsymbols == 2 then
+ offn = offsymbols[1]
+ offr = offsymbols[2]
+ offd = offr
+ else
+ offn = offsymbols[1]
+ offr = offsymbols[2]
+ offd = offsymbols[3]
+ end
+ if default == name then
+ default = pdfconstant(name)
+ else
+ default = pdf_off
+ end
+ --
+ local appearance
+ if false then -- needs testing
+ appearance = pdfdictionary { -- maybe also cache components
+ N = pdfshareobjectreference(pdfdictionary { [name] = registeredsymbol(yesn), Off = registeredsymbol(offn) }),
+ R = pdfshareobjectreference(pdfdictionary { [name] = registeredsymbol(yesr), Off = registeredsymbol(offr) }),
+ D = pdfshareobjectreference(pdfdictionary { [name] = registeredsymbol(yesd), Off = registeredsymbol(offd) }),
+ }
+ else
+ appearance = pdfdictionary { -- maybe also cache components
+ N = pdfdictionary { [name] = registeredsymbol(yesn), Off = registeredsymbol(offn) },
+ R = pdfdictionary { [name] = registeredsymbol(yesr), Off = registeredsymbol(offr) },
+ D = pdfdictionary { [name] = registeredsymbol(yesd), Off = registeredsymbol(offd) }
+ }
+ end
+ local appearanceref = pdfshareobjectreference(appearance) -- pdfreference(pdfflushobject(appearance))
+ return appearanceref, default, yesvalue
+end
+
+local function fielddefault(field,pdf_yes)
+ local default = field.default
+ if not default or default == "" then
+ local values = settings_to_array(field.values)
+ default = values[1]
+ end
+ if not default or default == "" then
+ return pdf_off
+ else
+ return pdf_yes or pdfconstant(default)
+ end
+end
+
+local function fieldoptions(specification)
+ local values = specification.values
+ local default = specification.default
+ if values then
+ local v = settings_to_array(values)
+ for i=1,#v do
+ local vi = v[i]
+ local shown, value = lpegmatch(splitter,vi)
+ if shown and value then
+ v[i] = pdfarray { pdfunicode(value), shown }
+ else
+ v[i] = pdfunicode(v[i])
+ end
+ end
+ return pdfarray(v)
+ end
+end
+
+local mapping = {
+ -- acrobat compliant (messy, probably some pdfdoc encoding interference here)
+ check = "4", -- 0x34
+ circle = "l", -- 0x6C
+ cross = "8", -- 0x38
+ diamond = "u", -- 0x75
+ square = "n", -- 0x6E
+ star = "H", -- 0x48
+}
+
+local function todingbat(n)
+ if n and n ~= "" then
+ return mapping[n] or ""
+ end
+end
+
+local function fieldrendering(specification)
+ local bvalue = tonumber(specification.backgroundcolorvalue)
+ local fvalue = tonumber(specification.framecolorvalue)
+ local svalue = specification.fontsymbol
+ if bvalue or fvalue or (svalue and svalue ~= "") then
+ return pdfdictionary {
+ BG = bvalue and pdfarray { pdfcolorvalues(3,bvalue) } or nil, -- or zero_bg,
+ BC = fvalue and pdfarray { pdfcolorvalues(3,fvalue) } or nil, -- or zero_bc,
+ CA = svalue and pdfstring (svalue) or nil,
+ }
+ end
+end
+
+-- layers
+
+local function fieldlayer(specification) -- we can move this in line
+ local layer = specification.layer
+ return (layer and pdflayerreference(layer)) or nil
+end
+
+-- defining
+
+local fields, radios, clones, fieldsets, calculationset = { }, { }, { }, { }, nil
+
+local xfdftemplate = [[
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xfdf xmlns='http://ns.adobe.com/xfdf/'>
+ <f href='%s.pdf'/>
+ <fields>
+%s
+ </fields>
+</xfdf>
+]]
+
+function codeinjections.exportformdata(name)
+ local result = { }
+ for k, v in sortedhash(fields) do
+ result[#result+1] = formatters[" <field name='%s'><value>%s</value></field>"](v.name or k,v.default or "")
+ end
+ local base = file.basename(tex.jobname)
+ local xfdf = format(xfdftemplate,base,table.concat(result,"\n"))
+ if not name or name == "" then
+ name = base
+ end
+ io.savedata(file.addsuffix(name,"xfdf"),xfdf)
+end
+
+function codeinjections.definefieldset(tag,list)
+ fieldsets[tag] = list
+end
+
+function codeinjections.getfieldset(tag)
+ return fieldsets[tag]
+end
+
+local function fieldsetlist(tag)
+ if tag then
+ local ft = fieldsets[tag]
+ if ft then
+ local a = pdfarray()
+ for name in gmatch(list,"[^, ]+") do
+ local f = field[name]
+ if f and f.pobj then
+ a[#a+1] = pdfreference(f.pobj)
+ end
+ end
+ return a
+ end
+ end
+end
+
+function codeinjections.setfieldcalculationset(tag)
+ calculationset = tag
+end
+
+interfaces.implement {
+ name = "setfieldcalculationset",
+ actions = codeinjections.setfieldcalculationset,
+ arguments = "string",
+}
+
+local function predefinesymbols(specification)
+ local values = specification.values
+ if values then
+ local symbols = settings_to_array(values)
+ for i=1,#symbols do
+ local symbol = symbols[i]
+ local a, b = lpegmatch(splitter,symbol)
+ codeinjections.presetsymbol(a or symbol)
+ end
+ end
+end
+
+function codeinjections.getdefaultfieldvalue(name)
+ local f = fields[name]
+ if f then
+ local values = f.values
+ local default = f.default
+ if not default or default == "" then
+ local symbols = settings_to_array(values)
+ local symbol = symbols[1]
+ if symbol then
+ local a, b = lpegmatch(splitter,symbol) -- splits at =>
+ default = a or symbol
+ end
+ end
+ return default
+ end
+end
+
+function codeinjections.definefield(specification)
+ local n = specification.name
+ local f = fields[n]
+ if not f then
+ local fieldtype = specification.type
+ if not fieldtype then
+ if trace_fields then
+ report_fields("invalid definition for %a, unknown type",n)
+ end
+ elseif fieldtype == "radio" then
+ local values = specification.values
+ if values and values ~= "" then
+ values = settings_to_array(values)
+ for v=1,#values do
+ radios[values[v]] = { parent = n }
+ end
+ fields[n] = specification
+ if trace_fields then
+ report_fields("defining %a as type %a",n,"radio")
+ end
+ elseif trace_fields then
+ report_fields("invalid definition of radio %a, missing values",n)
+ end
+ elseif fieldtype == "sub" then
+ -- not in main field list !
+ local radio = radios[n]
+ if radio then
+ -- merge specification
+ for key, value in next, specification do
+ radio[key] = value
+ end
+ if trace_fields then
+ local p = radios[n] and radios[n].parent
+ report_fields("defining %a as type sub of radio %a",n,p)
+ end
+ elseif trace_fields then
+ report_fields("invalid definition of radio sub %a, no parent given",n)
+ end
+ predefinesymbols(specification)
+ elseif fieldtype == "text" or fieldtype == "line" then
+ fields[n] = specification
+ if trace_fields then
+ report_fields("defining %a as type %a",n,fieldtype)
+ end
+ if specification.values ~= "" and specification.default == "" then
+ specification.default, specification.values = specification.values, nil
+ end
+ else
+ fields[n] = specification
+ if trace_fields then
+ report_fields("defining %a as type %a",n,fieldtype)
+ end
+ predefinesymbols(specification)
+ end
+ elseif trace_fields then
+ report_fields("invalid definition for %a, already defined",n)
+ end
+end
+
+function codeinjections.clonefield(specification) -- obsolete
+ local p = specification.parent
+ local c = specification.children
+ local v = specification.alternative
+ if not p or not c then
+ if trace_fields then
+ report_fields("invalid clone, children %a, parent %a, alternative %a",c,p,v)
+ end
+ return
+ end
+ local x = fields[p] or radios[p]
+ if not x then
+ if trace_fields then
+ report_fields("invalid clone, unknown parent %a",p)
+ end
+ return
+ end
+ for n in gmatch(c,"[^, ]+") do
+ local f, r, c = fields[n], radios[n], clones[n]
+ if f or r or c then
+ if trace_fields then
+ report_fields("already cloned, child %a, parent %a, alternative %a",n,p,v)
+ end
+ else
+ if trace_fields then
+ report_fields("cloning, child %a, parent %a, alternative %a",n,p,v)
+ end
+ clones[n] = specification
+ predefinesymbols(specification)
+ end
+ end
+end
+
+function codeinjections.getfieldcategory(name)
+ local f = fields[name] or radios[name] or clones[name]
+ if f then
+ local g = f.category
+ if not g or g == "" then
+ local v, p, t = f.alternative, f.parent, f.type
+ if v == "clone" or v == "copy" then
+ f = fields[p] or radios[p]
+ g = f and f.category
+ elseif t == "sub" then
+ f = fields[p]
+ g = f and f.category
+ end
+ end
+ return g
+ end
+end
+
+--
+
+function codeinjections.validfieldcategory(name)
+ return fields[name] or radios[name] or clones[name]
+end
+
+function codeinjections.validfieldset(name)
+ return fieldsets[tag]
+end
+
+function codeinjections.validfield(name)
+ return fields[name]
+end
+
+--
+
+local alignments = {
+ flushleft = 0, right = 0,
+ center = 1, middle = 1,
+ flushright = 2, left = 2,
+}
+
+local function fieldalignment(specification)
+ return alignments[specification.align] or 0
+end
+
+local function enhance(specification,option)
+ local so = specification.option
+ if so and so ~= "" then
+ specification.option = so .. "," .. option
+ else
+ specification.option = option
+ end
+ return specification
+end
+
+-- finish (if we also collect parents we can inline the kids which is
+-- more efficient ... but hardly anyone used widgets so ...)
+
+local collected = pdfarray()
+local forceencoding = false
+
+-- todo : check #opt
+
+local function finishfields()
+ local sometext = forceencoding
+ local somefont = next(usedfonts)
+ for name, field in sortedhash(fields) do
+ local kids = field.kids
+ if kids then
+ pdfflushobject(field.kidsnum,kids)
+ end
+ local opt = field.opt
+ if opt then
+ pdfflushobject(field.optnum,opt)
+ end
+ local type = field.type
+ if not sometext and (type == "text" or type == "line") then
+ sometext = true
+ end
+ end
+ for name, field in sortedhash(radios) do
+ local kids = field.kids
+ if kids then
+ pdfflushobject(field.kidsnum,kids)
+ end
+ local opt = field.opt
+ if opt then
+ pdfflushobject(field.optnum,opt)
+ end
+ end
+ if #collected > 0 then
+ local acroform = pdfdictionary {
+ NeedAppearances = pdfmajorversion() == 1 or nil,
+ Fields = pdfreference(pdfflushobject(collected)),
+ CO = fieldsetlist(calculationset),
+ }
+ if sometext or somefont then
+ checkpdfdocencoding()
+ if sometext then
+ usedfonts.tttf = fontnames.tt.tf
+ acroform.DA = "/tttf 12 Tf 0 g"
+ end
+ acroform.DR = pdfdictionary {
+ Font = registerfonts(),
+ Encoding = pdfdocencodingcapsule,
+ }
+ end
+ -- maybe:
+ -- if sometext then
+ -- checkpdfdocencoding()
+ -- if sometext then
+ -- usedfonts.tttf = fontnames.tt.tf
+ -- acroform.DA = "/tttf 12 Tf 0 g"
+ -- end
+ -- acroform.DR = pdfdictionary {
+ -- Font = registerfonts(),
+ -- Encoding = pdfdocencodingcapsule,
+ -- }
+ -- elseif somefont then
+ -- acroform.DR = pdfdictionary {
+ -- Font = registerfonts(),
+ -- }
+ -- end
+ lpdf.addtocatalog("AcroForm",pdfreference(pdfflushobject(acroform)))
+ end
+end
+
+lpdf.registerdocumentfinalizer(finishfields,"form fields")
+
+local methods = { }
+
+function nodeinjections.typesetfield(name,specification)
+ local field = fields[name] or radios[name] or clones[name]
+ if not field then
+ report_fields( "unknown child %a",name)
+ -- unknown field
+ return
+ end
+ local alternative, parent = field.alternative, field.parent
+ if alternative == "copy" or alternative == "clone" then -- only in clones
+ field = fields[parent] or radios[parent]
+ end
+ local method = methods[field.type]
+ if method then
+ return method(name,specification,alternative)
+ else
+ report_fields( "unknown method %a for child %a",field.type,name)
+ end
+end
+
+local function save_parent(field,specification,d)
+ local kidsnum = pdfreserveobject()
+ d.Kids = pdfreference(kidsnum)
+ field.kidsnum = kidsnum
+ field.kids = pdfarray()
+-- if d.Opt then
+-- local optnum = pdfreserveobject()
+-- d.Opt = pdfreference(optnum)
+-- field.optnum = optnum
+-- field.opt = pdfarray()
+-- end
+ local pnum = pdfflushobject(d)
+ field.pobj = pnum
+ collected[#collected+1] = pdfreference(pnum)
+end
+
+local function save_kid(field,specification,d,optname)
+ local kn = pdfreserveobject()
+ field.kids[#field.kids+1] = pdfreference(kn)
+-- if optname then
+-- local opt = field.opt
+-- if opt then
+-- opt[#opt+1] = optname
+-- end
+-- end
+ local width = specification.width or 0
+ local height = specification.height or 0
+ local depth = specification.depth or 0
+ local box = hpack_node(nodeinjections.annotation(width,height,depth,d(),kn))
+ -- redundant
+ box.width = width
+ box.height = height
+ box.depth = depth
+ return box
+end
+
+local function makelineparent(field,specification)
+ local text = pdfunicode(field.default)
+ local length = tonumber(specification.length or 0) or 0
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ T = pdfunicode(specification.title),
+ F = fieldplus(specification),
+ Ff = fieldflag(specification),
+ OC = fieldlayer(specification),
+ DA = fieldsurrounding(specification),
+ AA = fieldactions(specification),
+ FT = pdf_tx,
+ Q = fieldalignment(specification),
+ MaxLen = length == 0 and 1000 or length,
+ DV = text,
+ V = text,
+ }
+ save_parent(field,specification,d)
+end
+
+local function makelinechild(name,specification)
+ local field = clones[name]
+ local parent = nil
+ if field then
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("forcing parent text %a",parent.name)
+ end
+ makelineparent(parent,specification)
+ end
+ else
+ parent = fields[name]
+ field = parent
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("using parent text %a",name)
+ end
+ makelineparent(parent,specification)
+ end
+ end
+ if trace_fields then
+ report_fields("using child text %a",name)
+ end
+ -- we could save a little by not setting some key/value when it's the
+ -- same as parent but it would cost more memory to keep track of it
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ Parent = pdfreference(parent.pobj),
+ F = fieldplus(specification),
+ OC = fieldlayer(specification),
+ DA = fieldsurrounding(specification),
+ AA = fieldactions(specification),
+ MK = fieldrendering(specification),
+ Q = fieldalignment(specification),
+ }
+ return save_kid(parent,specification,d)
+end
+
+function methods.line(name,specification)
+ return makelinechild(name,specification)
+end
+
+function methods.text(name,specification)
+ return makelinechild(name,enhance(specification,"MultiLine"))
+end
+
+-- copy of line ... probably also needs a /Lock
+
+local function makesignatureparent(field,specification)
+ local text = pdfunicode(field.default)
+ local length = tonumber(specification.length or 0) or 0
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ T = pdfunicode(specification.title),
+ F = fieldplus(specification),
+ Ff = fieldflag(specification),
+ OC = fieldlayer(specification),
+ DA = fieldsurrounding(specification),
+ AA = fieldactions(specification),
+ FT = pdf_sig,
+ Q = fieldalignment(specification),
+ MaxLen = length == 0 and 1000 or length,
+ DV = text,
+ V = text,
+ }
+ save_parent(field,specification,d)
+end
+
+local function makesignaturechild(name,specification)
+ local field = clones[name]
+ local parent = nil
+ if field then
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("forcing parent signature %a",parent.name)
+ end
+ makesignatureparent(parent,specification)
+ end
+ else
+ parent = fields[name]
+ field = parent
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("using parent text %a",name)
+ end
+ makesignatureparent(parent,specification)
+ end
+ end
+ if trace_fields then
+ report_fields("using child text %a",name)
+ end
+ -- we could save a little by not setting some key/value when it's the
+ -- same as parent but it would cost more memory to keep track of it
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ Parent = pdfreference(parent.pobj),
+ F = fieldplus(specification),
+ OC = fieldlayer(specification),
+ DA = fieldsurrounding(specification),
+ AA = fieldactions(specification),
+ MK = fieldrendering(specification),
+ Q = fieldalignment(specification),
+ }
+ return save_kid(parent,specification,d)
+end
+
+function methods.signature(name,specification)
+ return makesignaturechild(name,specification)
+end
+--
+
+local function makechoiceparent(field,specification)
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ T = pdfunicode(specification.title),
+ F = fieldplus(specification),
+ Ff = fieldflag(specification),
+ OC = fieldlayer(specification),
+ AA = fieldactions(specification),
+ FT = pdf_ch,
+ Opt = fieldoptions(field), -- todo
+ }
+ save_parent(field,specification,d)
+end
+
+local function makechoicechild(name,specification)
+ local field = clones[name]
+ local parent = nil
+ if field then
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("forcing parent choice %a",parent.name)
+ end
+ makechoiceparent(parent,specification,extras)
+ end
+ else
+ parent = fields[name]
+ field = parent
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("using parent choice %a",name)
+ end
+ makechoiceparent(parent,specification,extras)
+ end
+ end
+ if trace_fields then
+ report_fields("using child choice %a",name)
+ end
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ Parent = pdfreference(parent.pobj),
+ F = fieldplus(specification),
+ OC = fieldlayer(specification),
+ AA = fieldactions(specification),
+ }
+ return save_kid(parent,specification,d) -- do opt here
+end
+
+function methods.choice(name,specification)
+ return makechoicechild(name,specification)
+end
+
+function methods.popup(name,specification)
+ return makechoicechild(name,enhance(specification,"PopUp"))
+end
+
+function methods.combo(name,specification)
+ return makechoicechild(name,enhance(specification,"PopUp,Edit"))
+end
+
+local function makecheckparent(field,specification)
+ local default = fieldstates_precheck(field)
+ local d = pdfdictionary {
+ T = pdfunicode(specification.title), -- todo: when tracing use a string
+ F = fieldplus(specification),
+ Ff = fieldflag(specification),
+ OC = fieldlayer(specification),
+ AA = fieldactions(specification), -- can be shared
+ FT = pdf_btn,
+ V = fielddefault(field,default),
+ }
+ save_parent(field,specification,d)
+end
+
+local function makecheckchild(name,specification)
+ local field = clones[name]
+ local parent = nil
+ if field then
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("forcing parent check %a",parent.name)
+ end
+ makecheckparent(parent,specification,extras)
+ end
+ else
+ parent = fields[name]
+ field = parent
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("using parent check %a",name)
+ end
+ makecheckparent(parent,specification,extras)
+ end
+ end
+ if trace_fields then
+ report_fields("using child check %a",name)
+ end
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ Parent = pdfreference(parent.pobj),
+ F = fieldplus(specification),
+ OC = fieldlayer(specification),
+ AA = fieldactions(specification), -- can be shared
+ H = pdf_n,
+ }
+ local fontsymbol = specification.fontsymbol
+ if fontsymbol and fontsymbol ~= "" then
+ specification.fontsymbol = todingbat(fontsymbol)
+ specification.fontstyle = "symbol"
+ specification.fontalternative = "dingbats"
+ d.DA = fieldsurrounding(specification)
+ d.MK = fieldrendering(specification)
+ return save_kid(parent,specification,d)
+ else
+ local appearance, default, value = fieldstates_check(field)
+ d.AS = default
+ d.AP = appearance
+ return save_kid(parent,specification,d)
+ end
+end
+
+function methods.check(name,specification)
+ return makecheckchild(name,specification)
+end
+
+local function makepushparent(field,specification) -- check if we can share with the previous
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ T = pdfunicode(specification.title),
+ F = fieldplus(specification),
+ Ff = fieldflag(specification),
+ OC = fieldlayer(specification),
+ AA = fieldactions(specification), -- can be shared
+ FT = pdf_btn,
+ AP = fieldappearances(field),
+ H = pdf_p,
+ }
+ save_parent(field,specification,d)
+end
+
+local function makepushchild(name,specification)
+ local field, parent = clones[name], nil
+ if field then
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("forcing parent push %a",parent.name)
+ end
+ makepushparent(parent,specification)
+ end
+ else
+ parent = fields[name]
+ field = parent
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("using parent push %a",name)
+ end
+ makepushparent(parent,specification)
+ end
+ end
+ if trace_fields then
+ report_fields("using child push %a",name)
+ end
+ local fontsymbol = specification.fontsymbol
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ Parent = pdfreference(field.pobj),
+ F = fieldplus(specification),
+ OC = fieldlayer(specification),
+ AA = fieldactions(specification), -- can be shared
+ H = pdf_p,
+ }
+ if fontsymbol and fontsymbol ~= "" then
+ specification.fontsymbol = todingbat(fontsymbol)
+ specification.fontstyle = "symbol"
+ specification.fontalternative = "dingbats"
+ d.DA = fieldsurrounding(specification)
+ d.MK = fieldrendering(specification)
+ else
+ d.AP = fieldappearances(field)
+ end
+ return save_kid(parent,specification,d)
+end
+
+function methods.push(name,specification)
+ return makepushchild(name,enhance(specification,"PushButton"))
+end
+
+local function makeradioparent(field,specification)
+ specification = enhance(specification,"Radio,RadiosInUnison,Print,NoToggleToOff")
+ local d = pdfdictionary {
+ T = field.name,
+ FT = pdf_btn,
+ -- F = fieldplus(specification),
+ Ff = fieldflag(specification),
+ -- H = pdf_n,
+ V = fielddefault(field),
+ }
+ save_parent(field,specification,d)
+end
+
+-- local function makeradiochild(name,specification)
+-- local field = clones[name]
+-- local parent = nil
+-- local pname = nil
+-- if field then
+-- pname = field.parent
+-- field = radios[pname]
+-- parent = fields[pname]
+-- if not parent.pobj then
+-- if trace_fields then
+-- report_fields("forcing parent radio %a",parent.name)
+-- end
+-- makeradioparent(parent,parent)
+-- end
+-- else
+-- field = radios[name]
+-- if not field then
+-- report_fields("there is some problem with field %a",name)
+-- return nil
+-- end
+-- pname = field.parent
+-- parent = fields[pname]
+-- if not parent.pobj then
+-- if trace_fields then
+-- report_fields("using parent radio %a",name)
+-- end
+-- makeradioparent(parent,parent)
+-- end
+-- end
+-- if trace_fields then
+-- report_fields("using child radio %a with values %a and default %a",name,field.values,field.default)
+-- end
+-- local fontsymbol = specification.fontsymbol
+-- -- fontsymbol = "circle"
+-- local d = pdfdictionary {
+-- Subtype = pdf_widget,
+-- Parent = pdfreference(parent.pobj),
+-- F = fieldplus(specification),
+-- OC = fieldlayer(specification),
+-- AA = fieldactions(specification),
+-- H = pdf_n,
+-- -- H = pdf_p,
+-- -- P = pdfpagereference(true),
+-- }
+-- if fontsymbol and fontsymbol ~= "" then
+-- specification.fontsymbol = todingbat(fontsymbol)
+-- specification.fontstyle = "symbol"
+-- specification.fontalternative = "dingbats"
+-- d.DA = fieldsurrounding(specification)
+-- d.MK = fieldrendering(specification)
+-- return save_kid(parent,specification,d) -- todo: what if no value
+-- else
+-- local appearance, default, value = fieldstates_radio(field,name,fields[pname])
+-- d.AP = appearance
+-- d.AS = default -- /Whatever
+-- return save_kid(parent,specification,d,value)
+-- end
+-- end
+
+local function makeradiochild(name,specification)
+ local field, parent = clones[name], nil
+ if field then
+ field = radios[field.parent]
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("forcing parent radio %a",parent.name)
+ end
+ makeradioparent(parent,parent)
+ end
+ else
+ field = radios[name]
+ if not field then
+ report_fields("there is some problem with field %a",name)
+ return nil
+ end
+ parent = fields[field.parent]
+ if not parent.pobj then
+ if trace_fields then
+ report_fields("using parent radio %a",name)
+ end
+ makeradioparent(parent,parent)
+ end
+ end
+ if trace_fields then
+ report_fields("using child radio %a with values %a and default %a",name,field.values,field.default)
+ end
+ local fontsymbol = specification.fontsymbol
+ -- fontsymbol = "circle"
+ local d = pdfdictionary {
+ Subtype = pdf_widget,
+ Parent = pdfreference(parent.pobj),
+ F = fieldplus(specification),
+ OC = fieldlayer(specification),
+ AA = fieldactions(specification),
+ H = pdf_n,
+ }
+ if fontsymbol and fontsymbol ~= "" then
+ specification.fontsymbol = todingbat(fontsymbol)
+ specification.fontstyle = "symbol"
+ specification.fontalternative = "dingbats"
+ d.DA = fieldsurrounding(specification)
+ d.MK = fieldrendering(specification)
+ end
+ local appearance, default, value = fieldstates_radio(field,name,fields[field.parent])
+ d.AP = appearance
+ d.AS = default -- /Whatever
+-- d.MK = pdfdictionary { BC = pdfarray {0}, BG = pdfarray { 1 } }
+d.BS = pdfdictionary { S = pdfconstant("I"), W = 1 }
+ return save_kid(parent,specification,d,value)
+end
+
+function methods.sub(name,specification)
+ return makeradiochild(name,enhance(specification,"Radio,RadiosInUnison"))
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-fmt.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-fmt.lmt
new file mode 100644
index 00000000000..c6a3f25ff5e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-fmt.lmt
@@ -0,0 +1,1020 @@
+if not modules then modules = { } end modules ['lpdf-fmt'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Peter Rolf and Hans Hagen",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- Thanks to Luigi and Steffen for testing.
+
+-- context --directives="backend.format=PDF/X-1a:2001" --trackers=backend.format yourfile
+
+local tonumber = tonumber
+local lower, gmatch, format, find = string.lower, string.gmatch, string.format, string.find
+local concat, serialize, sortedhash = table.concat, table.serialize, table.sortedhash
+
+local trace_format = false trackers.register("backend.format", function(v) trace_format = v end)
+local trace_variables = false trackers.register("backend.variables", function(v) trace_variables = v end)
+
+local report_backend = logs.reporter("backend","profiles")
+
+local backends, lpdf = backends, lpdf
+
+local codeinjections = backends.pdf.codeinjections
+
+local variables = interfaces.variables
+local viewerlayers = attributes.viewerlayers
+local colors = attributes.colors
+local transparencies = attributes.transparencies
+
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfconstant = lpdf.constant
+local pdfreference = lpdf.reference
+local pdfflushobject = lpdf.flushobject
+local pdfstring = lpdf.string
+local pdfverbose = lpdf.verbose
+local pdfflushstreamfileobject = lpdf.flushstreamfileobject
+
+local addtoinfo = lpdf.addtoinfo
+local injectxmpinfo = lpdf.injectxmpinfo
+local insertxmpinfo = lpdf.insertxmpinfo
+
+local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_hash = utilities.parsers.settings_to_hash
+
+--[[
+ Comments by Peter:
+
+ output intent : only one profile per color space (and device class)
+ default color space : (theoretically) several profiles per color space possible
+
+ The default color space profiles define the current gamuts (part of/all the
+ colors we have in the document), while the output intent profile declares the
+ gamut of the output devices (the colors that we get normally a printer or
+ monitor).
+
+ Example:
+
+ I have two RGB pictures (both 'painted' in /DeviceRGB) and I declare sRGB as
+ default color space for one picture and AdobeRGB for the other. As output
+ intent I use ISO_coated_v2_eci.icc.
+
+ If I had more than one output intent profile for the combination CMYK/printer I
+ can't decide which one to use. But it is no problem to use several default color
+ space profiles for the same color space as it's just a different color
+ transformation. The relation between picture and profile is clear.
+]]--
+
+local channels = {
+ gray = 1,
+ grey = 1,
+ rgb = 3,
+ cmyk = 4,
+}
+
+local prefixes = {
+ gray = "DefaultGray",
+ grey = "DefaultGray",
+ rgb = "DefaultRGB",
+ cmyk = "DefaultCMYK",
+}
+
+local formatspecification = nil
+local formatname = nil
+
+-- * correspondent document wide flags (write once) needed for permission tests
+
+-- defaults as mt
+
+local formats = utilities.storage.allocate {
+ version = {
+ external_icc_profiles = 1.4, -- 'p' in name; URL reference of output intent
+ jbig2_compression = 1.4,
+ jpeg2000_compression = 1.5, -- not supported yet
+ nchannel_colorspace = 1.6, -- 'n' in name; n-channel colorspace support
+ open_prepress_interface = 1.3, -- 'g' in name; reference to external graphics
+ optional_content = 1.5,
+ transparency = 1.4,
+ object_compression = 1.5,
+ attachments = 1.7,
+ },
+ default = {
+ pdf_version = 1.7, -- todo: block tex primitive
+ format_name = "default",
+ xmp_file = "lpdf-pdx.xml",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ nchannel_colorspace = true, -- unknown
+ internal_icc_profiles = true, -- controls profile inclusion
+ external_icc_profiles = true, -- controls profile inclusion
+ include_intents = true,
+ open_prepress_interface = true, -- unknown
+ optional_content = true, -- todo: block at lua level
+ transparency = true, -- todo: block at lua level
+ jbig2_compression = true, -- todo: block at lua level (dropped anyway)
+ jpeg2000_compression = true, -- todo: block at lua level (dropped anyway)
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = true,
+ inject_metadata = function()
+ -- nothing
+ end
+ },
+ data = {
+ ["pdf/x-1a:2001"] = {
+ pdf_version = 1.3,
+ format_name = "PDF/X-1a:2001",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ spot_colors = true,
+ internal_icc_profiles = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ addtoinfo("GTS_PDFXVersion","PDF/X-1a:2001")
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfxid='http://www.npes.org/pdfx/ns/id/'><pdfxid:GTS_PDFXVersion>PDF/X-1a:2001</pdfxid:GTS_PDFXVersion></rdf:Description>",false)
+ end
+ },
+ ["pdf/x-1a:2003"] = {
+ pdf_version = 1.4,
+ format_name = "PDF/X-1a:2003",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ spot_colors = true,
+ internal_icc_profiles = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ addtoinfo("GTS_PDFXVersion","PDF/X-1a:2003")
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfxid='http://www.npes.org/pdfx/ns/id/'><pdfxid:GTS_PDFXVersion>PDF/X-1a:2003</pdfxid:GTS_PDFXVersion></rdf:Description>",false)
+ end
+ },
+ ["pdf/x-3:2002"] = {
+ pdf_version = 1.3,
+ format_name = "PDF/X-3:2002",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ calibrated_rgb_colors = true,
+ spot_colors = true,
+ cielab_colors = true,
+ internal_icc_profiles = true,
+ include_intents = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ addtoinfo("GTS_PDFXVersion","PDF/X-3:2002")
+ end
+ },
+ ["pdf/x-3:2003"] = {
+ pdf_version = 1.4,
+ format_name = "PDF/X-3:2003",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ calibrated_rgb_colors = true,
+ spot_colors = true,
+ cielab_colors = true,
+ internal_icc_profiles = true,
+ include_intents = true,
+ jbig2_compression = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ addtoinfo("GTS_PDFXVersion","PDF/X-3:2003")
+ end
+ },
+ ["pdf/x-4"] = {
+ pdf_version = 1.6,
+ format_name = "PDF/X-4",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ calibrated_rgb_colors = true,
+ spot_colors = true,
+ cielab_colors = true,
+ internal_icc_profiles = true,
+ include_intents = true,
+ optional_content = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfxid='http://www.npes.org/pdfx/ns/id/'><pdfxid:GTS_PDFXVersion>PDF/X-4</pdfxid:GTS_PDFXVersion></rdf:Description>",false)
+ insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:VersionID>1</xmpMM:VersionID>",false)
+ insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:RenditionClass>default</xmpMM:RenditionClass>",false)
+ end
+ },
+ ["pdf/x-4p"] = {
+ pdf_version = 1.6,
+ format_name = "PDF/X-4p",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ calibrated_rgb_colors = true,
+ spot_colors = true,
+ cielab_colors = true,
+ internal_icc_profiles = true,
+ external_icc_profiles = true,
+ include_intents = true,
+ optional_content = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfxid='http://www.npes.org/pdfx/ns/id/'><pdfxid:GTS_PDFXVersion>PDF/X-4p</pdfxid:GTS_PDFXVersion></rdf:Description>",false)
+ insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:VersionID>1</xmpMM:VersionID>",false)
+ insertxmpinfo("xml://rdf:Description/xmpMM:InstanceID","<xmpMM:RenditionClass>default</xmpMM:RenditionClass>",false)
+ end
+ },
+ ["pdf/x-5g"] = {
+ pdf_version = 1.6,
+ format_name = "PDF/X-5g",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ calibrated_rgb_colors = true,
+ spot_colors = true,
+ cielab_colors = true,
+ internal_icc_profiles = true,
+ include_intents = true,
+ open_prepress_interface = true,
+ optional_content = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ -- todo
+ end
+ },
+ ["pdf/x-5pg"] = {
+ pdf_version = 1.6,
+ format_name = "PDF/X-5pg",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ calibrated_rgb_colors = true,
+ spot_colors = true,
+ cielab_colors = true,
+ internal_icc_profiles = true,
+ external_icc_profiles = true,
+ include_intents = true,
+ open_prepress_interface = true,
+ optional_content = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ -- todo
+ end
+ },
+ ["pdf/x-5n"] = {
+ pdf_version = 1.6,
+ format_name = "PDF/X-5n",
+ xmp_file = "lpdf-pdx.xml",
+ gts_flag = "GTS_PDFX",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ calibrated_rgb_colors = true,
+ spot_colors = true,
+ cielab_colors = true,
+ internal_icc_profiles = true,
+ include_intents = true,
+ optional_content = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ nchannel_colorspace = true,
+ object_compression = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ -- todo
+ end
+ },
+ ["pdf/a-1a:2005"] = {
+ pdf_version = 1.4,
+ format_name = "pdf/a-1a:2005",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true, -- new: forms are allowed (with limitations); no JS, other restrictions are unknown (TODO)
+ tagging = true, -- new: the only difference to PDF/A-1b
+ internal_icc_profiles = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>1</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ ["pdf/a-1b:2005"] = {
+ pdf_version = 1.4,
+ format_name = "pdf/a-1b:2005",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ internal_icc_profiles = true,
+ include_cidsets = true,
+ include_charsets = true,
+ attachments = false,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>1</pdfaid:part><pdfaid:conformance>B</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ -- Only PDF/A Attachments are allowed but we don't check the attachments
+ -- for any quality: they are just blobs.
+ ["pdf/a-2a"] = {
+ pdf_version = 1.7,
+ format_name = "pdf/a-2a",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = true,
+ internal_icc_profiles = true,
+ transparency = true, -- new
+ jbig2_compression = true,
+ jpeg2000_compression = true, -- new
+ object_compression = true, -- new
+ include_cidsets = false,
+ include_charsets = false,
+ attachments = true, -- new
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>2</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ ["pdf/a-2b"] = {
+ pdf_version = 1.7,
+ format_name = "pdf/a-2b",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = false,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = false,
+ include_charsets = false,
+ attachments = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>2</pdfaid:part><pdfaid:conformance>B</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ -- This is like the b variant, but it requires Unicode mapping of fonts
+ -- which we do anyway.
+ ["pdf/a-2u"] = {
+ pdf_version = 1.7,
+ format_name = "pdf/a-2u",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = false,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = false,
+ include_charsets = false,
+ attachments = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>2</pdfaid:part><pdfaid:conformance>U</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ -- Any type of attachment is allowed but we don't check the quality
+ -- of them.
+ ["pdf/a-3a"] = {
+ pdf_version = 1.7,
+ format_name = "pdf/a-3a",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = true,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = false,
+ include_charsets = false,
+ attachments = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ ["pdf/a-3b"] = {
+ pdf_version = 1.7,
+ format_name = "pdf/a-3b",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = false,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = false,
+ include_charsets = false,
+ attachments = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>B</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ ["pdf/a-3u"] = {
+ pdf_version = 1.7,
+ format_name = "pdf/a-3u",
+ xmp_file = "lpdf-pda.xml",
+ gts_flag = "GTS_PDFA1",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = false,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = false,
+ include_charsets = false,
+ attachments = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>U</pdfaid:conformance></rdf:Description>",false)
+ end
+ },
+ ["pdf/ua-1"] = { -- based on PDF/A-3a, but no 'gts_flag'
+ pdf_version = 1.7,
+ format_name = "pdf/ua-1",
+ xmp_file = "lpdf-pua.xml",
+ gray_scale = true,
+ cmyk_colors = true,
+ rgb_colors = true,
+ spot_colors = true,
+ calibrated_rgb_colors = true, -- unknown
+ cielab_colors = true, -- unknown
+ include_intents = true,
+ forms = true,
+ tagging = true,
+ internal_icc_profiles = true,
+ transparency = true,
+ jbig2_compression = true,
+ jpeg2000_compression = true,
+ object_compression = true,
+ include_cidsets = true,
+ include_charsets = true, --- really ?
+ attachments = true,
+ inject_metadata = function()
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
+ injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfuaid='http://www.aiim.org/pdfua/ns/id/'><pdfuaid:part>1</pdfuaid:part></rdf:Description>",false)
+ end
+ },
+ }
+}
+
+lpdf.formats = formats -- it does not hurt to have this one visible
+
+local filenames = {
+ "colorprofiles.xml",
+ "colorprofiles.lua",
+}
+
+local function locatefile(filename)
+ local fullname = resolvers.findfile(filename,"icc",1,true)
+ if not fullname or fullname == "" then
+ fullname = resolvers.finders.byscheme("loc",filename) -- could be specific to the project
+ end
+ return fullname or ""
+end
+
+local function loadprofile(name,filename)
+ local profile = false
+ local databases = filename and filename ~= "" and settings_to_array(filename) or filenames
+ for i=1,#databases do
+ local filename = locatefile(databases[i])
+ if filename and filename ~= "" then
+ local suffix = file.suffix(filename)
+ local lname = lower(name)
+ if suffix == "xml" then
+ local xmldata = xml.load(filename) -- no need for caching it
+ if xmldata then
+ profile = xml.filter(xmldata,format('xml://profiles/profile/(info|filename)[lower(text())=="%s"]/../table()',lname))
+ end
+ elseif suffix == "lua" then
+ local luadata = loadfile(filename)
+ luadata = ludata and luadata()
+ if luadata then
+ profile = luadata[name] or luadata[lname] -- hashed
+ if not profile then
+ for i=1,#luadata do
+ local li = luadata[i]
+ if lower(li.info) == lname then -- indexed
+ profile = li
+ break
+ end
+ end
+ end
+ end
+ end
+ if profile then
+ if next(profile) then
+ report_backend("profile specification %a loaded from %a",name,filename)
+ return profile
+ elseif trace_format then
+ report_backend("profile specification %a loaded from %a but empty",name,filename)
+ end
+ return false
+ end
+ end
+ end
+ report_backend("profile specification %a not found in %a",name,concat(filenames, ", "))
+end
+
+local function urls(url)
+ if not url or url == "" then
+ return nil
+ else
+ local u = pdfarray()
+ for url in gmatch(url,"([^, ]+)") do
+ if find(url,"^http") then
+ u[#u+1] = pdfdictionary {
+ FS = pdfconstant("URL"),
+ F = pdfstring(url),
+ }
+ end
+ end
+ return u
+ end
+end
+
+local function profilename(filename)
+ return lower(file.basename(filename))
+end
+
+local internalprofiles = { }
+
+local function handleinternalprofile(s,include)
+ local filename, colorspace = s.filename or "", s.colorspace or ""
+ if filename == "" or colorspace == "" then
+ report_backend("error in internal profile specification: %s",serialize(s,false))
+ else
+ local tag = profilename(filename)
+ local profile = internalprofiles[tag]
+ if not profile then
+ local colorspace = lower(colorspace)
+ if include then
+ -- local fullname = resolvers.findctxfile(filename) or ""
+ local fullname = locatefile(filename)
+ local channel = channels[colorspace] or nil
+ if fullname == "" then
+ report_backend("error, couldn't locate profile %a",filename)
+ elseif not channel then
+ report_backend("error, couldn't resolve channel entry for colorspace %a",colorspace)
+ else
+ profile = pdfflushstreamfileobject(fullname,pdfdictionary{ N = channel },false) -- uncompressed
+ internalprofiles[tag] = profile
+ if trace_format then
+ report_backend("including %a color profile from %a",colorspace,fullname)
+ end
+ end
+ else
+ internalprofiles[tag] = true
+ if trace_format then
+ report_backend("not including %a color profile %a",colorspace,filename)
+ end
+ end
+ end
+ return profile
+ end
+end
+
+local externalprofiles = { }
+
+local function handleexternalprofile(s,include) -- specification (include ignored here)
+ local name, url, filename, checksum, version, colorspace =
+ s.info or s.filename or "", s.url or "", s.filename or "", s.checksum or "", s.version or "", s.colorspace or ""
+ if false then -- somehow leads to invalid pdf
+ local iccprofile = colors.iccprofile(filename)
+ if iccprofile then
+ name = name ~= "" and name or iccprofile.tags.desc.cleaned or ""
+ url = url ~= "" and url or iccprofile.tags.dmnd.cleaned or ""
+ checksum = checksum ~= "" and checksum or file.checksum(iccprofile.fullname) or ""
+ version = version ~= "" and version or iccprofile.header.version or ""
+ colorspace = colorspace ~= "" and colorspace or iccprofile.header.colorspace or ""
+ end
+ -- table.print(iccprofile)
+ end
+ if name == "" or url == "" or checksum == "" or version == "" or colorspace == "" or filename == "" then
+ local profile = handleinternalprofile(s)
+ if profile then
+ report_backend("incomplete external profile specification, falling back to internal")
+ else
+ report_backend("error in external profile specification: %s",serialize(s,false))
+ end
+ else
+ local tag = profilename(filename)
+ local profile = externalprofiles[tag]
+ if not profile then
+ local d = pdfdictionary {
+ ProfileName = name, -- not file name!
+ ProfileCS = colorspace,
+ URLs = urls(url), -- array containing at least one URL
+ CheckSum = pdfverbose { "<", lower(checksum), ">" }, -- 16byte MD5 hash
+ ICCVersion = pdfverbose { "<", version, ">" }, -- bytes 8..11 from the header of the ICC profile, as a hex string
+ }
+ profile = pdfflushobject(d)
+ externalprofiles[tag] = profile
+ end
+ return profile
+ end
+end
+
+local loadeddefaults = { }
+
+local function handledefaultprofile(s,spec) -- specification
+ local filename, colorspace = s.filename or "", lower(s.colorspace or "")
+ if filename == "" or colorspace == "" then
+ report_backend("error in default profile specification: %s",serialize(s,false))
+ elseif not loadeddefaults[colorspace] then
+ local tag = profilename(filename)
+ local n = internalprofiles[tag] -- or externalprofiles[tag]
+ if n == true then -- not internalized
+ report_backend("no default profile %a for colorspace %a",filename,colorspace)
+ elseif n then
+ local a = pdfarray {
+ pdfconstant("ICCBased"),
+ pdfreference(n),
+ }
+ -- used in page /Resources, so this must be inserted at runtime
+ lpdf.adddocumentcolorspace(prefixes[colorspace],pdfreference(pdfflushobject(a)))
+ loadeddefaults[colorspace] = true
+ report_backend("setting %a as default %a color space",filename,colorspace)
+ else
+ report_backend("no default profile %a for colorspace %a",filename,colorspace)
+ end
+ elseif trace_format then
+ report_backend("a default %a colorspace is already in use",colorspace)
+ end
+end
+
+local loadedintents = { }
+local intents = pdfarray()
+
+local function handleoutputintent(s,spec)
+ local url = s.url or ""
+ local filename = s.filename or ""
+ local name = s.info or filename
+ local id = s.id or ""
+ local outputcondition = s.outputcondition or ""
+ local info = s.info or ""
+ if name == "" or id == "" then
+ report_backend("error in output intent specification: %s",serialize(s,false))
+ elseif not loadedintents[name] then
+ local tag = profilename(filename)
+ local internal, external = internalprofiles[tag], externalprofiles[tag]
+ if internal or external then
+ local d = {
+ Type = pdfconstant("OutputIntent"),
+ S = pdfconstant(spec.gts_flag or "GTS_PDFX"),
+ OutputConditionIdentifier = id,
+ RegistryName = url,
+ OutputCondition = outputcondition,
+ Info = info,
+ }
+ if internal and internal ~= true then
+ d.DestOutputProfile = pdfreference(internal)
+ elseif external and external ~= true then
+ d.DestOutputProfileRef = pdfreference(external)
+ else
+ report_backend("omitting reference to profile for intent %a",name)
+ end
+ intents[#intents+1] = pdfreference(pdfflushobject(pdfdictionary(d)))
+ if trace_format then
+ report_backend("setting output intent to %a with id %a for entry %a",name,id,#intents)
+ end
+ else
+ report_backend("invalid output intent %a",name)
+ end
+ loadedintents[name] = true
+ elseif trace_format then
+ report_backend("an output intent with name %a is already in use",name)
+ end
+end
+
+local function handleiccprofile(message,spec,name,filename,how,options,alwaysinclude,gts_flag)
+ if name and name ~= "" then
+ local list = settings_to_array(name)
+ for i=1,#list do
+ local name = list[i]
+ local profile = loadprofile(name,filename)
+ if trace_format then
+ report_backend("handling %s %a",message,name)
+ end
+ if profile then
+ if formatspecification.cmyk_colors then
+ profile.colorspace = profile.colorspace or "CMYK"
+ else
+ profile.colorspace = profile.colorspace or "RGB"
+ end
+ local external = formatspecification.external_icc_profiles
+ local internal = formatspecification.internal_icc_profiles
+ local include = formatspecification.include_intents
+ local always, never = options[variables.always], options[variables.never]
+ if always or alwaysinclude then
+ if trace_format then
+ report_backend("forcing internal profiles") -- can make preflight unhappy
+ end
+ -- internal, external = true, false
+ internal, external = not never, false
+ elseif never then
+ if trace_format then
+ report_backend("forcing external profiles") -- can make preflight unhappy
+ end
+ internal, external = false, true
+ end
+ if external then
+ if trace_format then
+ report_backend("handling external profiles cf. %a",name)
+ end
+ handleexternalprofile(profile,false)
+ else
+ if trace_format then
+ report_backend("handling internal profiles cf. %a",name)
+ end
+ if internal then
+ handleinternalprofile(profile,always or include)
+ else
+ report_backend("no profile inclusion for %a",formatname)
+ end
+ end
+ how(profile,spec)
+ elseif trace_format then
+ report_backend("unknown profile %a",name)
+ end
+ end
+ end
+end
+
+local function flushoutputintents()
+ if #intents > 0 then
+ lpdf.addtocatalog("OutputIntents",pdfreference(pdfflushobject(intents)))
+ end
+end
+
+lpdf.registerdocumentfinalizer(flushoutputintents,2,"output intents")
+
+function codeinjections.setformat(s)
+ local format = s.format or ""
+ local level = tonumber(s.level)
+ local intent = s.intent or ""
+ local profile = s.profile or ""
+ local option = s.option or ""
+ local filename = s.file or ""
+ if format ~= "" then
+ local spec = formats.data[lower(format)]
+ if spec then
+ formatspecification = spec
+ formatname = spec.format_name
+ report_backend("setting format to %a",formatname)
+ local xmp_file = formatspecification.xmp_file or ""
+ if xmp_file == "" then
+ -- weird error
+ else
+ codeinjections.setxmpfile(xmp_file)
+ end
+ if not level then
+ level = 3 -- good compromise, default anyway
+ end
+ local pdf_version = spec.pdf_version * 10
+ local inject_metadata = spec.inject_metadata
+ local majorversion = math.floor(math.div(pdf_version,10))
+ local minorversion = math.floor(math.mod(pdf_version,10))
+ local objectcompression = spec.object_compression and pdf_version >= 15
+ local compresslevel = level or lpdf.compresslevel() -- keep default
+ local objectcompresslevel = (objectcompression and (level or lpdf.objectcompresslevel())) or 0
+ lpdf.setcompression(compresslevel,objectcompresslevel)
+ lpdf.setversion(majorversion,minorversion)
+ if objectcompression then
+ report_backend("forcing pdf version %s.%s, compression level %s, object compression level %s",
+ majorversion,minorversion,compresslevel,objectcompresslevel)
+ elseif compresslevel > 0 then
+ report_backend("forcing pdf version %s.%s, compression level %s, object compression disabled",
+ majorversion,minorversion,compresslevel)
+ else
+ report_backend("forcing pdf version %s.%s, compression disabled",
+ majorversion,minorversion)
+ end
+ --
+ -- cid sets can always omitted now, but those validators still complain so let's
+ -- for a while keep it (for luigi):
+ --
+ lpdf.setomitcidset (formatspecification.include_cidsets == false and 1 or 0) -- why a number
+ lpdf.setomitcharset(formatspecification.include_charsets == false and 1 or 0) -- why a number
+ --
+ -- maybe block by pdf version
+ --
+ codeinjections.settaggingsupport(formatspecification.tagging)
+ codeinjections.setattachmentsupport(formatspecification.attachments)
+ --
+ -- context.setupcolors { -- not this way
+ -- cmyk = spec.cmyk_colors and variables.yes or variables.no,
+ -- rgb = spec.rgb_colors and variables.yes or variables.no,
+ -- }
+ --
+ colors.forcesupport(
+ spec.gray_scale or false,
+ spec.rgb_colors or false,
+ spec.cmyk_colors or false,
+ spec.spot_colors or false,
+ spec.nchannel_colorspace or false
+ )
+ transparencies.forcesupport(
+ spec.transparency or false
+ )
+ viewerlayers.forcesupport(
+ spec.optional_content or false
+ )
+ viewerlayers.setfeatures(
+ spec.has_order or false -- new
+ )
+ --
+ -- spec.jbig2_compression : todo, block in image inclusion
+ -- spec.jpeg2000_compression : todo, block in image inclusion
+ --
+ if type(inject_metadata) == "function" then
+ inject_metadata()
+ end
+ local options = settings_to_hash(option)
+ handleiccprofile("color profile",spec,profile,filename,handledefaultprofile,options,true)
+ handleiccprofile("output intent",spec,intent,filename,handleoutputintent,options,false)
+ if trace_variables then
+ for k, v in sortedhash(formats.default) do
+ local v = formatspecification[k]
+ if type(v) ~= "function" then
+ report_backend("%a = %a",k,v or false)
+ end
+ end
+ end
+ function codeinjections.setformat(noname)
+ if trace_format then
+ report_backend("error, format is already set to %a, ignoring %a",formatname,noname.format)
+ end
+ end
+ else
+ report_backend("error, format %a is not supported",format)
+ end
+ elseif level then
+ lpdf.setcompression(level,level)
+ else
+ -- we ignore this as we hook it in \everysetupbackend
+ end
+end
+
+directives.register("backend.format", function(v) -- table !
+ local tv = type(v)
+ if tv == "table" then
+ codeinjections.setformat(v)
+ elseif tv == "string" then
+ codeinjections.setformat { format = v }
+ end
+end)
+
+interfaces.implement {
+ name = "setformat",
+ actions = codeinjections.setformat,
+ arguments = { { "*" } }
+}
+
+function codeinjections.getformatoption(key)
+ return formatspecification and formatspecification[key]
+end
+
+-- function codeinjections.getformatspecification()
+-- return formatspecification
+-- end
+
+function codeinjections.supportedformats()
+ local t = { }
+ for k, v in sortedhash(formats.data) do
+ t[#t+1] = k
+ end
+ return t
+end
+
+-- The following is somewhat cleaner but then we need to flag that there are
+-- color spaces set so that the page flusher does not optimize the (at that
+-- moment) still empty array away. So, next(d_colorspaces) should then become
+-- a different test, i.e. also on flag. I'll add that when we need more forward
+-- referencing.
+--
+-- local function embedprofile = handledefaultprofile
+--
+-- local function flushembeddedprofiles()
+-- for colorspace, filename in next, defaults do
+-- embedprofile(colorspace,filename)
+-- end
+-- end
+--
+-- local function handledefaultprofile(s)
+-- defaults[lower(s.colorspace)] = s.filename
+-- end
+--
+-- lpdf.registerdocumentfinalizer(flushembeddedprofiles,1,"embedded color profiles")
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-fnt.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-fnt.lmt
new file mode 100644
index 00000000000..ee16303b060
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-fnt.lmt
@@ -0,0 +1,194 @@
+if not modules then modules = { } end modules ['lpdf-fnt'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is experimental code.
+
+local match, gmatch = string.match, string.gmatch
+local tonumber, rawget = tonumber, rawget
+
+local pdfe = lpdf.epdf
+local pdfreference = lpdf.reference
+
+local pdfreserveobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfreserveobject = lpdf.reserveobject
+end)
+
+local tobemerged = { }
+local trace_merge = false trackers.register("graphics.fonts",function(v) trace_merge = v end)
+local report_merge = logs.reporter("graphics","fonts")
+
+local function register(usedname,cleanname)
+ local cleanname = cleanname or fonts.names.cleanname(usedname)
+ local fontid = fonts.definers.internal { name = cleanname }
+ if fontid then
+ local objref = pdfreserveobject()
+ if trace_merge then
+ report_merge("registering %a with name %a, id %a and object %a",usedname,cleanname,fontid,objref)
+ end
+ return {
+ id = fontid,
+ reference = objref,
+ indices = { },
+ cleanname = cleanname,
+ }
+ end
+ return false
+end
+
+function lpdf.registerfont(usedname,cleanname)
+ local v = register(usedname,cleanname)
+ tobemerged[usedname] = v
+ return v
+end
+
+table.setmetatableindex(tobemerged,function(t,k)
+ return lpdf.registerfont(k)
+end)
+
+local function finalizefont(v)
+ local indextoslot = fonts.helpers.indextoslot
+ if v then
+ local id = v.id
+ local n = 0
+ for i in next, v.indices do
+ local u = indextoslot(id,i)
+ n = n + 1
+ end
+ v.n = n
+ end
+end
+
+statistics.register("merged fonts", function()
+ if next(tobemerged) then
+ local t = { }
+ for k, v in table.sortedhash(tobemerged) do
+ t[#t+1] = string.formatters["%s (+%i)"](k,v.n)
+ end
+ return table.concat(t," ")
+ end
+end)
+
+function lpdf.finalizefonts()
+ for k, v in next, tobemerged do
+ finalizefont(v)
+ end
+end
+
+callback.register("font_descriptor_objnum_provider",function(name)
+ local m = rawget(tobemerged,name)
+ if m then
+ -- finalizefont(m)
+ local r = m.reference or 0
+ if trace_merge then
+ report_merge("using object %a for font descriptor of %a",r,name)
+ end
+ return r
+ end
+ return 0
+end)
+
+local function getunicodes1(str,indices)
+ for s in gmatch(str,"beginbfrange%s*(.-)%s*endbfrange") do
+ for first, last, offset in gmatch(s,"<([^>]+)>%s+<([^>]+)>%s+<([^>]+)>") do
+ for i=tonumber(first,16),tonumber(last,16) do
+ indices[i] = true
+ end
+ end
+ end
+ for s in gmatch(str,"beginbfchar%s*(.-)%s*endbfchar") do
+ for old, new in gmatch(s,"<([^>]+)>%s+<([^>]+)>") do
+ indices[tonumber(old,16)] = true
+ end
+ end
+end
+
+local function getunicodes2(widths,indices)
+ for i=1,#widths,2 do
+ local start = widths[i]
+ local count = #widths[i+1]
+ if start and count then
+ for i=start,start+count-1 do
+ indices[i] = true
+ end
+ end
+ end
+end
+
+local function checkedfonts(pdfdoc,xref,copied,page)
+ local list = page.Resources.Font
+ local done = { }
+ for k, somefont in pdfe.expanded(list) do
+ if somefont.Subtype == "Type0" and somefont.Encoding == "Identity-H" then
+ local descendants = somefont.DescendantFonts
+ if descendants then
+ for i=1,#descendants do
+ local d = descendants[i]
+ if d then
+ local subtype = d.Subtype
+ if subtype == "CIDFontType0" or subtype == "CIDFontType2" then
+ local basefont = somefont.BaseFont
+ if basefont then
+ local fontname = match(basefont,"^[A-Z]+%+(.+)$")
+ local fontdata = tobemerged[fontname]
+ if fontdata then
+ local descriptor = d.FontDescriptor
+ if descriptor then
+ local okay = false
+ local widths = d.W
+ if widths then
+ getunicodes2(widths,fontdata.indices)
+ okay = true
+ else
+ local tounicode = somefont.ToUnicode
+ if tounicode then
+ getunicodes1(tounicode(),fontdata.indices)
+ okay = true
+ end
+ end
+ if okay then
+ local r = xref[descriptor]
+ done[r] = fontdata.reference
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ return next(done) and done
+end
+
+function lpdf.epdf.plugin(pdfdoc,xref,copied,page) -- needs checking
+ local done = checkedfonts(pdfdoc,xref,copied,page)
+ if done then
+ return {
+ FontDescriptor = function(xref,copied,object,key,value,copyobject)
+ local r = value[3]
+ local d = done[r]
+ if d then
+ return pdfreference(d)
+ else
+ return copyobject(xref,copied,object,key,value)
+ end
+ end
+ }
+ end
+end
+
+lpdf.registerdocumentfinalizer(lpdf.finalizefonts)
+
+-- already defined in font-ocl but the context variatn will go here
+--
+-- function lpdf.vfimage(wd,ht,dp,data,name)
+-- return { "image", { filename = name, width = wd, height = ht, depth = dp } }
+-- end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-grp.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-grp.lmt
new file mode 100644
index 00000000000..6adbe8c3c91
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-grp.lmt
@@ -0,0 +1,302 @@
+if not modules then modules = { } end modules ['lpdf-grp'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, tonumber = type, tonumber
+local formatters, gsub = string.formatters, string.gsub
+local concat = table.concat
+local round = math.round
+
+local backends, lpdf = backends, lpdf
+
+local nodeinjections = backends.pdf.nodeinjections
+
+local colors = attributes.colors
+local basepoints = number.dimenfactors.bp
+
+local nodeinjections = backends.pdf.nodeinjections
+local codeinjections = backends.pdf.codeinjections
+local registrations = backends.pdf.registrations
+
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfconstant = lpdf.constant
+local pdfboolean = lpdf.boolean
+local pdfreference = lpdf.reference
+
+local pdfflushobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+end)
+
+local createimage = images.create
+local wrapimage = images.wrap
+local embedimage = images.embed
+
+-- can also be done indirectly:
+--
+-- 12 : << /AntiAlias false /ColorSpace 8 0 R /Coords [ 0.0 0.0 1.0 0.0 ] /Domain [ 0.0 1.0 ] /Extend [ true true ] /Function 22 0 R /ShadingType 2 >>
+-- 22 : << /Bounds [ ] /Domain [ 0.0 1.0 ] /Encode [ 0.0 1.0 ] /FunctionType 3 /Functions [ 31 0 R ] >>
+-- 31 : << /C0 [ 1.0 0.0 ] /C1 [ 0.0 1.0 ] /Domain [ 0.0 1.0 ] /FunctionType 2 /N 1.0 >>
+
+local function shade(stype,name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+ local func = nil
+ --
+ -- domain has to be consistently added in all dictionaries here otherwise
+ -- acrobat fails with a drawing error
+ --
+ domain = pdfarray(domain)
+ n = tonumber(n)
+ --
+ if steps then
+ local list = pdfarray()
+ local bounds = pdfarray()
+ local encode = pdfarray()
+ for i=1,steps do
+ if i < steps then
+ bounds[i] = fractions[i] or 1
+ end
+ encode[2*i-1] = 0
+ encode[2*i] = 1
+ list [i] = pdfdictionary {
+ FunctionType = 2,
+ Domain = domain,
+ C0 = pdfarray(color_a[i]),
+ C1 = pdfarray(color_b[i]),
+ N = n,
+ }
+ end
+ func = pdfdictionary {
+ FunctionType = 3,
+ Bounds = bounds,
+ Encode = encode,
+ Functions = list,
+ Domain = domain,
+ }
+ else
+ func = pdfdictionary {
+ FunctionType = 2,
+ Domain = domain,
+ C0 = pdfarray(color_a),
+ C1 = pdfarray(color_b),
+ N = n,
+ }
+ end
+ separation = separation and registrations.getspotcolorreference(separation)
+ local s = pdfdictionary {
+ ShadingType = stype,
+ ColorSpace = separation and pdfreference(separation) or pdfconstant(colorspace),
+ Domain = domain,
+ Function = pdfreference(pdfflushobject(func)),
+ Coords = pdfarray(coordinates),
+ Extend = pdfarray { true, true },
+ AntiAlias = pdfboolean(true),
+ }
+ lpdf.adddocumentshade(name,pdfreference(pdfflushobject(s)))
+end
+
+function lpdf.circularshade(name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+ shade(3,name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+end
+
+function lpdf.linearshade(name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+ shade(2,name,domain,color_a,color_b,n,colorspace,coordinates,separation,steps,fractions)
+end
+
+-- inline bitmaps but xform'd
+--
+-- we could derive the colorspace if we strip the data
+-- and divide by x*y
+
+local template = "q BI %s ID %s > EI Q"
+local factor = 72/300
+
+function nodeinjections.injectbitmap(t)
+ -- encoding is ascii hex, no checking here
+ local xresolution, yresolution = t.xresolution or 0, t.yresolution or 0
+ if xresolution == 0 or yresolution == 0 then
+ return -- fatal error
+ end
+ local colorspace = t.colorspace
+ if colorspace ~= "rgb" and colorspace ~= "cmyk" and colorspace ~= "gray" then
+ -- not that efficient but ok
+ local d = gsub(t.data,"[^0-9a-f]","")
+ local b = math.round(#d / (xresolution * yresolution))
+ if b == 2 then
+ colorspace = "gray"
+ elseif b == 6 then
+ colorspace = "rgb"
+ elseif b == 8 then
+ colorspace = "cmyk"
+ end
+ end
+ colorspace = lpdf.colorspaceconstants[colorspace]
+ if not colorspace then
+ return -- fatal error
+ end
+ local d = pdfdictionary {
+ W = xresolution,
+ H = yresolution,
+ CS = colorspace,
+ BPC = 8,
+ F = pdfconstant("AHx"),
+ -- CS = nil,
+ -- BPC = 1,
+ -- IM = true,
+ }
+ -- for some reasons it only works well if we take a 1bp boundingbox
+ local urx, ury = 1/basepoints, 1/basepoints
+ -- urx = (xresolution/300)/basepoints
+ -- ury = (yresolution/300)/basepoints
+ local width, height = t.width or 0, t.height or 0
+ if width == 0 and height == 0 then
+ width = factor * xresolution / basepoints
+ height = factor * yresolution / basepoints
+ elseif width == 0 then
+ width = height * xresolution / yresolution
+ elseif height == 0 then
+ height = width * yresolution / xresolution
+ end
+ local a = pdfdictionary {
+ BBox = pdfarray { 0, 0, urx * basepoints, ury * basepoints }
+ }
+ local image = createimage {
+ stream = formatters[template](d(),t.data),
+ width = width,
+ height = height,
+ bbox = { 0, 0, urx, ury },
+ attr = a(),
+ nobbox = true,
+ }
+ return wrapimage(image)
+end
+
+-- general graphic helpers
+
+function codeinjections.setfigurealternative(data,figure)
+ local request = data.request
+ local display = request.display
+ if display and display ~= "" then
+ local nested = figures.push {
+ name = display,
+ page = request.page,
+ size = request.size,
+ prefix = request.prefix,
+ cache = request.cache,
+ width = request.width,
+ height = request.height,
+ }
+ figures.identify()
+ local displayfigure = figures.check()
+ if displayfigure then
+ -- figure.aform = true
+ embedimage(figure)
+ local a = pdfarray {
+ pdfdictionary {
+ Image = pdfreference(figure.objnum),
+ DefaultForPrinting = true,
+ }
+ }
+ local d = pdfdictionary {
+ Alternates = pdfreference(pdfflushobject(a)),
+ }
+ displayfigure.attr = d()
+ figures.pop()
+ return displayfigure, nested
+ else
+ figures.pop()
+ end
+ end
+end
+
+function codeinjections.getpreviewfigure(request)
+ local figure = figures.initialize(request)
+ if not figure then
+ return
+ end
+ figure = figures.identify(figure)
+ if not (figure and figure.status and figure.status.fullname) then
+ return
+ end
+ figure = figures.check(figure)
+ if not (figure and figure.status and figure.status.fullname) then
+ return
+ end
+ local image = figure.status.private
+ if image then
+ embedimage(image)
+ end
+ return figure
+end
+
+function codeinjections.setfiguremask(data,figure) -- mark
+ local request = data.request
+ local mask = request.mask
+ if mask and mask ~= "" then
+ figures.push {
+ name = mask,
+ page = request.page,
+ size = request.size,
+ prefix = request.prefix,
+ cache = request.cache,
+ width = request.width,
+ height = request.height,
+ }
+ mask = figures.identify()
+ mask = figures.check(mask)
+ if mask then
+ local image = mask.status.private
+ if image then
+ figures.include(mask)
+ embedimage(image)
+ local d = pdfdictionary {
+ Interpolate = false,
+ SMask = pdfreference(mask.status.objectnumber),
+ }
+ figure.attr = d()
+ end
+ end
+ figures.pop()
+ end
+end
+
+-- experimental (q Q is not really needed)
+
+local saveboxresource = tex.boxresources.save
+local nofpatterns = 0
+local f_pattern = formatters["q /Pattern cs /%s scn 0 0 %.6N %.6N re f Q"]
+
+function lpdf.registerpattern(specification)
+ nofpatterns = nofpatterns + 1
+ local d = pdfdictionary {
+ Type = pdfconstant("Pattern"),
+ PatternType = 1,
+ PaintType = 1,
+ TilingType = 2,
+ XStep = (specification.width or 10) * basepoints,
+ YStep = (specification.height or 10) * basepoints,
+ Matrix = {
+ 1, 0, 0, 1,
+ (specification.hoffset or 0) * basepoints,
+ (specification.voffset or 0) * basepoints,
+ },
+ }
+
+ local resources = lpdf.collectedresources{ patterns = false }
+ local attributes = d()
+ local onlybounds = 1
+ local patternobj = saveboxresource(specification.number,attributes,resources,true,onlybounds)
+ lpdf.adddocumentpattern("Pt" .. nofpatterns,lpdf.reference(patternobj ))
+ return nofpatterns
+end
+
+function lpdf.patternstream(n,width,height)
+ return f_pattern("Pt" .. n,width*basepoints,height*basepoints)
+end
+
+backends.pdf.codeinjections.registerpattern = lpdf.registerpattern
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-img.lua b/Master/texmf-dist/tex/context/base/mkxl/lpdf-img.lmt
index 17305a1cfa6..50034c36025 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-img.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-img.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['lpdf-img'] = {
version = 1.001,
+ optimize = true,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -42,12 +43,18 @@ local pdfdictionary = lpdf.dictionary
local pdfarray = lpdf.array
local pdfconstant = lpdf.constant
local pdfstring = lpdf.string
-local pdfflushstreamobject = lpdf.flushstreamobject
local pdfreference = lpdf.reference
local pdfverbose = lpdf.verbose
-local pdfmajorversion = lpdf.majorversion
-local pdfminorversion = lpdf.minorversion
+local pdfflushstreamobject
+local pdfmajorversion
+local pdfminorversion
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushstreamobject = lpdf.flushstreamobject
+ pdfmajorversion = lpdf.majorversion
+ pdfminorversion = lpdf.minorversion
+end)
local createimage = images.create
@@ -1338,3 +1345,7 @@ end
-- end
-- return true
-- end
+
+backends.pdf.codeinjections.jpg = lpdf.injectors.jpg
+backends.pdf.codeinjections.jp2 = lpdf.injectors.jp2
+backends.pdf.codeinjections.png = lpdf.injectors.png
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-ini.lmt
new file mode 100644
index 00000000000..27625606aa6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-ini.lmt
@@ -0,0 +1,1363 @@
+if not modules then modules = { } end modules ['lpdf-ini'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- beware of "too many locals" here
+
+local setmetatable, getmetatable, type, next, tostring, tonumber, rawset = setmetatable, getmetatable, type, next, tostring, tonumber, rawset
+local char, byte, format, gsub, concat, match, sub, gmatch = string.char, string.byte, string.format, string.gsub, table.concat, string.match, string.sub, string.gmatch
+local utfchar, utfbyte, utfvalues = utf.char, utf.byte, utf.values
+local sind, cosd, max, min = math.sind, math.cosd, math.max, math.min
+local sort, sortedhash = table.sort, table.sortedhash
+local P, C, R, S, Cc, Cs, V = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc, lpeg.Cs, lpeg.V
+local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
+local formatters = string.formatters
+local isboolean = string.is_boolean
+local rshift = bit32.rshift
+
+local report_objects = logs.reporter("backend","objects")
+local report_finalizing = logs.reporter("backend","finalizing")
+local report_blocked = logs.reporter("backend","blocked")
+
+local implement = interfaces.implement
+
+local context = context
+
+-- In ConTeXt MkIV we use utf8 exclusively so all strings get mapped onto a hex
+-- encoded utf16 string type between <>. We could probably save some bytes by using
+-- strings between () but then we end up with escaped ()\ too.
+
+pdf = type(pdf) == "table" and pdf or { }
+local factor = number.dimenfactors.bp
+
+local codeinjections = { }
+local nodeinjections = { }
+
+local backends = backends
+
+local pdfbackend = {
+ comment = "backend for directly generating pdf output",
+ nodeinjections = nodeinjections,
+ codeinjections = codeinjections,
+ registrations = { },
+ tables = { },
+}
+
+backends.pdf = pdfbackend
+
+lpdf = lpdf or { }
+local lpdf = lpdf
+lpdf.flags = lpdf.flags or { } -- will be filled later
+
+table.setmetatableindex(lpdf, function(t,k)
+ report_blocked("function %a is not accessible",k)
+ os.exit()
+end)
+
+local trace_finalizers = false trackers.register("backend.finalizers", function(v) trace_finalizers = v end)
+local trace_resources = false trackers.register("backend.resources", function(v) trace_resources = v end)
+
+local pdfreserveobject
+local pdfimmediateobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfreserveobject = lpdf.reserveobject
+ pdfimmediateobject = lpdf.immediateobject
+end)
+
+do
+
+ updaters.register("backend.update.lpdf",function()
+ job.positions.registerhandlers {
+ getpos = drivers.getpos,
+ getrpos = drivers.getrpos,
+ gethpos = drivers.gethpos,
+ getvpos = drivers.getvpos,
+ }
+ lpdf.getpos = drivers.getpos
+ end)
+
+ local pdfgetmatrix, pdfhasmatrix, pdfgetpos
+
+ updaters.register("backend.update.lpdf",function()
+ pdfgetmatrix = lpdf.getmatrix
+ pdfhasmatrix = lpdf.hasmatrix
+ pdfgetpos = lpdf.getpos
+ end)
+
+ -- local function transform(llx,lly,urx,ury,rx,sx,sy,ry)
+ -- local x1 = llx * rx + lly * sy
+ -- local y1 = llx * sx + lly * ry
+ -- local x2 = llx * rx + ury * sy
+ -- local y2 = llx * sx + ury * ry
+ -- local x3 = urx * rx + lly * sy
+ -- local y3 = urx * sx + lly * ry
+ -- local x4 = urx * rx + ury * sy
+ -- local y4 = urx * sx + ury * ry
+ -- llx = min(x1,x2,x3,x4);
+ -- lly = min(y1,y2,y3,y4);
+ -- urx = max(x1,x2,x3,x4);
+ -- ury = max(y1,y2,y3,y4);
+ -- return llx, lly, urx, ury
+ -- end
+ --
+ -- function lpdf.transform(llx,lly,urx,ury) -- not yet used so unchecked
+ -- if pdfhasmatrix() then
+ -- local sx, rx, ry, sy = pdfgetmatrix()
+ -- local w, h = urx - llx, ury - lly
+ -- return llx, lly, llx + sy*w - ry*h, lly + sx*h - rx*w
+ -- -- return transform(llx,lly,urx,ury,sx,rx,ry,sy)
+ -- else
+ -- return llx, lly, urx, ury
+ -- end
+ -- end
+
+ -- funny values for tx and ty
+
+ function lpdf.rectangle(width,height,depth,offset)
+ local tx, ty = pdfgetpos()
+ if offset then
+ tx = tx - offset
+ ty = ty + offset
+ width = width + 2*offset
+ height = height + offset
+ depth = depth + offset
+ end
+ if pdfhasmatrix() then
+ local rx, sx, sy, ry = pdfgetmatrix()
+ return
+ factor * tx,
+ factor * (ty - ry*depth + sx*width),
+ factor * (tx + rx*width - sy*height),
+ factor * (ty + ry*height - sx*width)
+ else
+ return
+ factor * tx,
+ factor * (ty - depth),
+ factor * (tx + width),
+ factor * (ty + height)
+ end
+ end
+
+end
+
+-- we could use a hash of predefined unicodes
+
+-- local function tosixteen(str) -- an lpeg might be faster (no table)
+-- if not str or str == "" then
+-- return "<feff>" -- not () as we want an indication that it's unicode
+-- else
+-- local r, n = { "<feff" }, 1
+-- for b in utfvalues(str) do
+-- n = n + 1
+-- if b < 0x10000 then
+-- r[n] = format("%04x",b)
+-- else
+-- r[n] = format("%04x%04x",rshift(b,10),b%1024+0xDC00)
+-- end
+-- end
+-- n = n + 1
+-- r[n] = ">"
+-- return concat(r)
+-- end
+-- end
+
+local tosixteen, fromsixteen, topdfdoc, frompdfdoc, toeight, fromeight
+
+do
+
+ local cache = table.setmetatableindex(function(t,k) -- can be made weak
+ local v = utfbyte(k)
+ if v < 0x10000 then
+ v = format("%04x",v)
+ else
+ v = v - 0x10000
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
+ -- v = format("%04x%04x",rshift(v-0x10000,10)+0xD800,v%1024+0xDC00)
+ end
+ t[k] = v
+ return v
+ end)
+
+ local unified = Cs(Cc("<feff") * (lpeg.patterns.utf8character/cache)^1 * Cc(">"))
+
+ tosixteen = function(str) -- an lpeg might be faster (no table)
+ if not str or str == "" then
+ return "<feff>" -- not () as we want an indication that it's unicode
+ else
+ return lpegmatch(unified,str)
+ end
+ end
+
+ local more = 0
+
+ local pattern = C(4) / function(s) -- needs checking !
+ local now = tonumber(s,16)
+ if more > 0 then
+ now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000
+ more = 0
+ return utfchar(now)
+ elseif now >= 0xD800 and now <= 0xDBFF then
+ more = now
+ return "" -- else the c's end up in the stream
+ else
+ return utfchar(now)
+ end
+ end
+
+ local pattern = P(true) / function() more = 0 end * Cs(pattern^0)
+
+ fromsixteen = function(str)
+ if not str or str == "" then
+ return ""
+ else
+ return lpegmatch(pattern,str)
+ end
+ end
+
+ local toregime = regimes.toregime
+ local fromregime = regimes.fromregime
+ local escaped = Cs(Cc("(") * (S("\\()\n\r\t\b\f")/"\\%0" + P(1))^0 * Cc(")"))
+
+ topdfdoc = function(str,default)
+ if not str or str == "" then
+ return ""
+ else
+ return lpegmatch(escaped,toregime("pdfdoc",str,default)) -- could be combined if needed
+ end
+ end
+
+ frompdfdoc = function(str)
+ if not str or str == "" then
+ return ""
+ else
+ return fromregime("pdfdoc",str)
+ end
+ end
+
+ if not toregime then topdfdoc = function(s) return s end end
+ if not fromregime then frompdfdoc = function(s) return s end end
+
+ toeight = function(str)
+ if not str or str == "" then
+ return "()"
+ else
+ return lpegmatch(escaped,str)
+ end
+ end
+
+ local b_pattern = Cs((P("\\")/"" * (
+ S("()")
+ + S("nrtbf") / { n = "\n", r = "\r", t = "\t", b = "\b", f = "\f" }
+ + lpegpatterns.octdigit^-3 / function(s) return char(tonumber(s,8)) end)
+ + P(1))^0)
+
+ fromeight = function(str)
+ if not str or str == "" then
+ return ""
+ else
+ return lpegmatch(unescape,str)
+ end
+ end
+
+ local u_pattern = lpegpatterns.utfbom_16_be * lpegpatterns.utf16_to_utf8_be -- official
+ + lpegpatterns.utfbom_16_le * lpegpatterns.utf16_to_utf8_le -- we've seen these
+
+ local h_pattern = lpegpatterns.hextobytes
+
+ local zero = S(" \n\r\t") + P("\\ ")
+ local one = C(4)
+ local two = P("d") * R("89","af") * C(2) * C(4)
+
+ local x_pattern = P { "start",
+ start = V("wrapped") + V("unwrapped") + V("original"),
+ original = Cs(P(1)^0),
+ wrapped = P("<") * V("unwrapped") * P(">") * P(-1),
+ unwrapped = P("feff")
+ * Cs( (
+ zero / ""
+ + two / function(a,b)
+ a = (tonumber(a,16) - 0xD800) * 1024
+ b = (tonumber(b,16) - 0xDC00)
+ return utfchar(a+b)
+ end
+ + one / function(a)
+ return utfchar(tonumber(a,16))
+ end
+ )^1 ) * P(-1)
+ }
+
+ function lpdf.frombytes(s,hex)
+ if not s or s == "" then
+ return ""
+ end
+ if hex then
+ local x = lpegmatch(x_pattern,s)
+ if x then
+ return x
+ end
+ local h = lpegmatch(h_pattern,s)
+ if h then
+ return h
+ end
+ else
+ local u = lpegmatch(u_pattern,s)
+ if u then
+ return u
+ end
+ end
+ return lpegmatch(b_pattern,s)
+ end
+
+ lpdf.tosixteen = tosixteen
+ lpdf.toeight = toeight
+ lpdf.topdfdoc = topdfdoc
+ lpdf.fromsixteen = fromsixteen
+ lpdf.fromeight = fromeight
+ lpdf.frompdfdoc = frompdfdoc
+
+end
+
+local tostring_a, tostring_d
+
+do
+
+ local f_key_null = formatters["/%s null"]
+ local f_key_value = formatters["/%s %s"]
+ -- local f_key_dictionary = formatters["/%s << % t >>"]
+ -- local f_dictionary = formatters["<< % t >>"]
+ local f_key_dictionary = formatters["/%s << %s >>"]
+ local f_dictionary = formatters["<< %s >>"]
+ -- local f_key_array = formatters["/%s [ % t ]"]
+ -- local f_array = formatters["[ % t ]"]
+ local f_key_array = formatters["/%s [ %s ]"]
+ local f_array = formatters["[ %s ]"]
+ local f_key_number = formatters["/%s %N"] -- always with max 9 digits and integer is possible
+ local f_tonumber = formatters["%N"] -- always with max 9 digits and integer is possible
+
+ tostring_d = function(t,contentonly,key)
+ if next(t) then
+ local r = { }
+ local n = 0
+ local e
+ for k, v in next, t do
+ if k == "__extra__" then
+ e = v
+ elseif k == "__stream__" then
+ -- do nothing (yet)
+ else
+ n = n + 1
+ r[n] = k
+ end
+ end
+ if n > 1 then
+ sort(r)
+ end
+ for i=1,n do
+ local k = r[i]
+ local v = t[k]
+ local tv = type(v)
+ -- mostly tables
+ if tv == "table" then
+ -- local mv = getmetatable(v)
+ -- if mv and mv.__lpdftype then
+ if v.__lpdftype__ then
+ -- if v == t then
+ -- report_objects("ignoring circular reference in dictionary")
+ -- r[i] = f_key_null(k)
+ -- else
+ r[i] = f_key_value(k,tostring(v))
+ -- end
+ elseif v[1] then
+ r[i] = f_key_value(k,tostring_a(v))
+ else
+ r[i] = f_key_value(k,tostring_d(v))
+ end
+ elseif tv == "string" then
+ r[i] = f_key_value(k,toeight(v))
+ elseif tv == "number" then
+ r[i] = f_key_number(k,v)
+ else
+ r[i] = f_key_value(k,tostring(v))
+ end
+ end
+ if e then
+ r[n+1] = e
+ end
+ r = concat(r," ")
+ if contentonly then
+ return r
+ elseif key then
+ return f_key_dictionary(key,r)
+ else
+ return f_dictionary(r)
+ end
+ elseif contentonly then
+ return ""
+ else
+ return "<< >>"
+ end
+ end
+
+ tostring_a = function(t,contentonly,key)
+ local tn = #t
+ if tn ~= 0 then
+ local r = { }
+ for k=1,tn do
+ local v = t[k]
+ local tv = type(v)
+ -- mostly numbers and tables
+ if tv == "number" then
+ r[k] = f_tonumber(v)
+ elseif tv == "table" then
+ -- local mv = getmetatable(v)
+ -- if mv and mv.__lpdftype then
+ if v.__lpdftype__ then
+ -- if v == t then
+ -- report_objects("ignoring circular reference in array")
+ -- r[k] = "null"
+ -- else
+ r[k] = tostring(v)
+ -- end
+ elseif v[1] then
+ r[k] = tostring_a(v)
+ else
+ r[k] = tostring_d(v)
+ end
+ elseif tv == "string" then
+ r[k] = toeight(v)
+ else
+ r[k] = tostring(v)
+ end
+ end
+ local e = t.__extra__
+ if e then
+ r[tn+1] = e
+ end
+ r = concat(r," ")
+ if contentonly then
+ return r
+ elseif key then
+ return f_key_array(key,r)
+ else
+ return f_array(r)
+ end
+ elseif contentonly then
+ return ""
+ else
+ return "[ ]"
+ end
+ end
+
+end
+
+local f_tonumber = formatters["%N"]
+
+local tostring_x = function(t) return concat(t," ") end
+local tostring_s = function(t) return toeight(t[1]) end
+local tostring_p = function(t) return topdfdoc(t[1],t[2]) end
+local tostring_u = function(t) return tosixteen(t[1]) end
+----- tostring_n = function(t) return tostring(t[1]) end -- tostring not needed
+local tostring_n = function(t) return f_tonumber(t[1]) end -- tostring not needed
+local tostring_c = function(t) return t[1] end -- already prefixed (hashed)
+local tostring_z = function() return "null" end
+local tostring_t = function() return "true" end
+local tostring_f = function() return "false" end
+local tostring_r = function(t) local n = t[1] return n and n > 0 and (n .. " 0 R") or "null" end
+
+local tostring_v = function(t)
+ local s = t[1]
+ if type(s) == "table" then
+ return concat(s)
+ else
+ return s
+ end
+end
+
+local tostring_l = function(t)
+ local s = t[1]
+ if not s or s == "" then
+ return "()"
+ elseif t[2] then
+ return "<" .. s .. ">"
+ else
+ return "(" .. s .. ")"
+ end
+end
+
+local function value_x(t) return t end
+local function value_s(t) return t[1] end
+local function value_p(t) return t[1] end
+local function value_u(t) return t[1] end
+local function value_n(t) return t[1] end
+local function value_c(t) return sub(t[1],2) end
+local function value_d(t) return tostring_d(t,true) end
+local function value_a(t) return tostring_a(t,true) end
+local function value_z() return nil end
+local function value_t(t) return t.value or true end
+local function value_f(t) return t.value or false end
+local function value_r(t) return t[1] or 0 end -- null
+local function value_v(t) return t[1] end
+local function value_l(t) return t[1] end
+
+local function add_to_d(t,v)
+ local k = type(v)
+ if k == "string" then
+ if t.__extra__ then
+ t.__extra__ = t.__extra__ .. " " .. v
+ else
+ t.__extra__ = v
+ end
+ elseif k == "table" then
+ for k, v in next, v do
+ t[k] = v
+ end
+ end
+ return t
+end
+
+local function add_to_a(t,v)
+ local k = type(v)
+ if k == "string" then
+ if t.__extra__ then
+ t.__extra__ = t.__extra__ .. " " .. v
+ else
+ t.__extra__ = v
+ end
+ elseif k == "table" then
+ local n = #t
+ for i=1,#v do
+ n = n + 1
+ t[n] = v[i]
+ end
+ end
+ return t
+end
+
+local function add_x(t,k,v) rawset(t,k,tostring(v)) end
+
+local mt_x = { __index = { __lpdftype__ = "stream" }, __tostring = tostring_x, __call = value_x, __newindex = add_x }
+local mt_d = { __index = { __lpdftype__ = "dictionary" }, __tostring = tostring_d, __call = value_d, __add = add_to_d }
+local mt_a = { __index = { __lpdftype__ = "array" }, __tostring = tostring_a, __call = value_a, __add = add_to_a }
+local mt_u = { __index = { __lpdftype__ = "unicode" }, __tostring = tostring_u, __call = value_u }
+local mt_s = { __index = { __lpdftype__ = "string" }, __tostring = tostring_s, __call = value_s }
+local mt_p = { __index = { __lpdftype__ = "docstring" }, __tostring = tostring_p, __call = value_p }
+local mt_n = { __index = { __lpdftype__ = "number" }, __tostring = tostring_n, __call = value_n }
+local mt_c = { __index = { __lpdftype__ = "constant" }, __tostring = tostring_c, __call = value_c }
+local mt_z = { __index = { __lpdftype__ = "null" }, __tostring = tostring_z, __call = value_z }
+local mt_t = { __index = { __lpdftype__ = "true" }, __tostring = tostring_t, __call = value_t }
+local mt_f = { __index = { __lpdftype__ = "false" }, __tostring = tostring_f, __call = value_f }
+local mt_r = { __index = { __lpdftype__ = "reference" }, __tostring = tostring_r, __call = value_r }
+local mt_v = { __index = { __lpdftype__ = "verbose" }, __tostring = tostring_v, __call = value_v }
+local mt_l = { __index = { __lpdftype__ = "literal" }, __tostring = tostring_l, __call = value_l }
+
+local function pdfstream(t) -- we need to add attributes
+ if t then
+ local tt = type(t)
+ if tt == "table" then
+ for i=1,#t do
+ t[i] = tostring(t[i])
+ end
+ elseif tt == "string" then
+ t = { t }
+ else
+ t = { tostring(t) }
+ end
+ end
+ return setmetatable(t or { },mt_x)
+end
+
+local function pdfdictionary(t)
+ return setmetatable(t or { },mt_d)
+end
+
+local function pdfarray(t)
+ if type(t) == "string" then
+ return setmetatable({ t },mt_a)
+ else
+ return setmetatable(t or { },mt_a)
+ end
+end
+
+local function pdfstring(str,default)
+ return setmetatable({ str or default or "" },mt_s)
+end
+
+local function pdfdocstring(str,default,defaultchar)
+ return setmetatable({ str or default or "", defaultchar or " " },mt_p)
+end
+
+local function pdfunicode(str,default)
+ return setmetatable({ str or default or "" },mt_u) -- could be a string
+end
+
+local function pdfliteral(str,hex) -- can also produce a hex <> instead of () literal
+ return setmetatable({ str, hex },mt_l)
+end
+
+local pdfnumber, pdfconstant
+
+do
+
+ local cache = { } -- can be weak
+
+ pdfnumber = function(n,default) -- 0-10
+ if not n then
+ n = default
+ end
+ local c = cache[n]
+ if not c then
+ c = setmetatable({ n },mt_n)
+ -- cache[n] = c -- too many numbers
+ end
+ return c
+ end
+
+ for i=-1,9 do cache[i] = pdfnumber(i) end
+
+ local replacer = S("\0\t\n\r\f ()[]{}/%%#\\") / {
+ ["\00"]="#00",
+ ["\09"]="#09",
+ ["\10"]="#0a",
+ ["\12"]="#0c",
+ ["\13"]="#0d",
+ [ " " ]="#20",
+ [ "#" ]="#23",
+ [ "%" ]="#25",
+ [ "(" ]="#28",
+ [ ")" ]="#29",
+ [ "/" ]="#2f",
+ [ "[" ]="#5b",
+ [ "\\"]="#5c",
+ [ "]" ]="#5d",
+ [ "{" ]="#7b",
+ [ "}" ]="#7d",
+ } + P(1)
+
+ local escaped = Cs(Cc("/") * replacer^0)
+
+ local cache = table.setmetatableindex(function(t,k)
+ local v = setmetatable({ lpegmatch(escaped,k) }, mt_c)
+ t[k] = v
+ return v
+ end)
+
+ pdfconstant = function(str,default)
+ if not str then
+ str = default or "none"
+ end
+ return cache[str]
+ end
+
+ local escaped = Cs(replacer^0)
+
+ function lpdf.escaped(str)
+ return lpegmatch(escaped,str) or str
+ end
+
+end
+
+local pdfnull, pdfboolean, pdfreference, pdfverbose
+
+do
+
+ local p_null = { } setmetatable(p_null, mt_z)
+ local p_true = { } setmetatable(p_true, mt_t)
+ local p_false = { } setmetatable(p_false,mt_f)
+
+ pdfnull = function()
+ return p_null
+ end
+
+ pdfboolean = function(b,default)
+ if type(b) == "boolean" then
+ return b and p_true or p_false
+ else
+ return default and p_true or p_false
+ end
+ end
+
+ -- print(pdfboolean(false),pdfboolean(false,false),pdfboolean(false,true))
+ -- print(pdfboolean(true),pdfboolean(true,false),pdfboolean(true,true))
+ -- print(pdfboolean(nil,true),pdfboolean(nil,false))
+
+ local r_zero = setmetatable({ 0 },mt_r)
+
+ pdfreference = function(r) -- maybe make a weak table
+ if r and r ~= 0 then
+ return setmetatable({ r },mt_r)
+ else
+ return r_zero
+ end
+ end
+
+ local v_zero = setmetatable({ 0 },mt_v)
+ local v_empty = setmetatable({ "" },mt_v)
+
+ pdfverbose = function(t) -- maybe check for type
+ if t == 0 then
+ return v_zero
+ elseif t == "" then
+ return v_empty
+ else
+ return setmetatable({ t },mt_v)
+ end
+ end
+
+end
+
+lpdf.stream = pdfstream -- THIS WILL PROBABLY CHANGE
+lpdf.dictionary = pdfdictionary
+lpdf.array = pdfarray
+lpdf.docstring = pdfdocstring
+lpdf.string = pdfstring
+lpdf.unicode = pdfunicode
+lpdf.number = pdfnumber
+lpdf.constant = pdfconstant
+lpdf.null = pdfnull
+lpdf.boolean = pdfboolean
+lpdf.reference = pdfreference
+lpdf.verbose = pdfverbose
+lpdf.literal = pdfliteral
+
+-- three priority levels, default=2
+
+local pagefinalizers = { { }, { }, { } }
+local documentfinalizers = { { }, { }, { } }
+
+local pageresources, pageattributes, pagesattributes
+
+local function resetpageproperties()
+ pageresources = pdfdictionary()
+ pageattributes = pdfdictionary()
+ pagesattributes = pdfdictionary()
+end
+
+function lpdf.getpageproperties()
+ return {
+ pageresources = pageresources,
+ pageattributes = pageattributes,
+ pagesattributes = pagesattributes,
+ }
+end
+
+resetpageproperties()
+
+local function addtopageresources (k,v) pageresources [k] = v end
+local function addtopageattributes (k,v) pageattributes [k] = v end
+local function addtopagesattributes(k,v) pagesattributes[k] = v end
+
+lpdf.addtopageresources = addtopageresources
+lpdf.addtopageattributes = addtopageattributes
+lpdf.addtopagesattributes = addtopagesattributes
+
+local function set(where,what,f,when,comment)
+ if type(when) == "string" then
+ when, comment = 2, when
+ elseif not when then
+ when = 2
+ end
+ local w = where[when]
+ w[#w+1] = { f, comment }
+ if trace_finalizers then
+ report_finalizing("%s set: [%s,%s]",what,when,#w)
+ end
+end
+
+local function run(where,what)
+ if trace_finalizers then
+ report_finalizing("start backend, category %a, n %a",what,#where)
+ end
+ for i=1,#where do
+ local w = where[i]
+ for j=1,#w do
+ local wj = w[j]
+ if trace_finalizers then
+ report_finalizing("%s finalizer: [%s,%s] %s",what,i,j,wj[2] or "")
+ end
+ wj[1]()
+ end
+ end
+ if trace_finalizers then
+ report_finalizing("stop finalizing")
+ end
+end
+
+local function registerpagefinalizer(f,when,comment)
+ set(pagefinalizers,"page",f,when,comment)
+end
+
+local function registerdocumentfinalizer(f,when,comment)
+ set(documentfinalizers,"document",f,when,comment)
+end
+
+lpdf.registerpagefinalizer = registerpagefinalizer
+lpdf.registerdocumentfinalizer = registerdocumentfinalizer
+
+function lpdf.finalizepage(shipout)
+ if shipout and not environment.initex then
+ -- resetpageproperties() -- maybe better before
+ run(pagefinalizers,"page")
+ resetpageproperties() -- maybe better before
+ end
+end
+
+function lpdf.finalizedocument()
+ if not environment.initex then
+ run(documentfinalizers,"document")
+ function lpdf.finalizedocument()
+ -- report_finalizing("serious error: the document is finalized multiple times")
+ function lpdf.finalizedocument() end
+ end
+ end
+end
+
+callbacks.register("finish_pdfpage", lpdf.finalizepage)
+callbacks.register("finish_pdffile", lpdf.finalizedocument)
+
+do
+
+ -- some minimal tracing, handy for checking the order
+
+ local function trace_set(what,key)
+ if trace_resources then
+ report_finalizing("setting key %a in %a",key,what)
+ end
+ end
+
+ local function trace_flush(what)
+ if trace_resources then
+ report_finalizing("flushing %a",what)
+ end
+ end
+
+ lpdf.protectresources = true
+
+ local catalog = pdfdictionary { Type = pdfconstant("Catalog") } -- nicer, but when we assign we nil the Type
+ local info = pdfdictionary { Type = pdfconstant("Info") } -- nicer, but when we assign we nil the Type
+ ----- names = pdfdictionary { Type = pdfconstant("Names") } -- nicer, but when we assign we nil the Type
+
+ local function checkcatalog()
+ if not environment.initex then
+ trace_flush("catalog")
+ return true
+ end
+ end
+
+ local function checkinfo()
+ if not environment.initex then
+ trace_flush("info")
+ if lpdf.majorversion() > 1 then
+ for k, v in next, info do
+ if k == "CreationDate" or k == "ModDate" then
+ -- mandate >= 2.0
+ else
+ info[k] = nil
+ end
+ end
+ end
+ return true
+ end
+ end
+
+ local function flushcatalog()
+ if checkcatalog() then
+ catalog.Type = nil
+-- pdfsetcatalog(catalog())
+ end
+ end
+
+ local function flushinfo()
+ if checkinfo() then
+ info.Type = nil
+ end
+ end
+
+ function lpdf.getcatalog()
+ if checkcatalog() then
+ catalog.Type = pdfconstant("Catalog")
+ return pdfreference(pdfimmediateobject(tostring(catalog)))
+ end
+ end
+
+ function lpdf.getinfo()
+ if checkinfo() then
+ return pdfreference(pdfimmediateobject(tostring(info)))
+ end
+ end
+
+ function lpdf.addtocatalog(k,v)
+ if not (lpdf.protectresources and catalog[k]) then
+ trace_set("catalog",k)
+ catalog[k] = v
+ end
+ end
+
+ function lpdf.addtoinfo(k,v)
+ if not (lpdf.protectresources and info[k]) then
+ trace_set("info",k)
+ info[k] = v
+ end
+ end
+
+ local names = pdfdictionary {
+ -- Type = pdfconstant("Names")
+ }
+
+ local function flushnames()
+ if next(names) and not environment.initex then
+ names.Type = pdfconstant("Names")
+ trace_flush("names")
+ lpdf.addtocatalog("Names",pdfreference(pdfimmediateobject(tostring(names))))
+ end
+ end
+
+ function lpdf.addtonames(k,v)
+ if not (lpdf.protectresources and names[k]) then
+ trace_set("names", k)
+ names [k] = v
+ end
+ end
+
+ local r_extgstates, r_colorspaces, r_patterns, r_shades
+ local d_extgstates, d_colorspaces, d_patterns, d_shades
+ local p_extgstates, p_colorspaces, p_patterns, p_shades
+
+ local function checkextgstates () if d_extgstates then addtopageresources("ExtGState", p_extgstates ) end end
+ local function checkcolorspaces() if d_colorspaces then addtopageresources("ColorSpace",p_colorspaces) end end
+ local function checkpatterns () if d_patterns then addtopageresources("Pattern", p_patterns ) end end
+ local function checkshades () if d_shades then addtopageresources("Shading", p_shades ) end end
+
+ local function flushextgstates () if d_extgstates then trace_flush("extgstates") pdfimmediateobject(r_extgstates, tostring(d_extgstates )) end end
+ local function flushcolorspaces() if d_colorspaces then trace_flush("colorspaces") pdfimmediateobject(r_colorspaces,tostring(d_colorspaces)) end end
+ local function flushpatterns () if d_patterns then trace_flush("patterns") pdfimmediateobject(r_patterns, tostring(d_patterns )) end end
+ local function flushshades () if d_shades then trace_flush("shades") pdfimmediateobject(r_shades, tostring(d_shades )) end end
+
+ -- patterns are special as they need resources to so we can get recursive references and in that case
+ -- acrobat doesn't show anything (other viewers handle it well)
+ --
+ -- todo: share them
+ -- todo: force when not yet set
+
+ local pdfgetfontobjectnumber
+
+ updaters.register("backend.update.lpdf",function()
+ pdfgetfontobjectnumber = lpdf.getfontobjectnumber
+ end)
+
+ local f_font = formatters["%s%d"]
+
+ function lpdf.collectedresources(options)
+ local ExtGState = d_extgstates and next(d_extgstates ) and p_extgstates
+ local ColorSpace = d_colorspaces and next(d_colorspaces) and p_colorspaces
+ local Pattern = d_patterns and next(d_patterns ) and p_patterns
+ local Shading = d_shades and next(d_shades ) and p_shades
+ local Font
+ if options and options.patterns == false then
+ Pattern = nil
+ end
+ local fonts = options and options.fonts
+ if fonts and next(fonts) then
+ local prefix = options.fontprefix or "F"
+ Font = pdfdictionary { }
+ for k, v in sortedhash(fonts) do
+ Font[f_font(prefix,v)] = pdfreference(pdfgetfontobjectnumber(k))
+ end
+ end
+ if ExtGState or ColorSpace or Pattern or Shading or Font then
+ local collected = pdfdictionary {
+ ExtGState = ExtGState,
+ ColorSpace = ColorSpace,
+ Pattern = Pattern,
+ Shading = Shading,
+ Font = Font,
+ }
+ if options and options.serialize == false then
+ return collected
+ else
+ return collected()
+ end
+ elseif options and options.notempty then
+ return nil
+ elseif options and options.serialize == false then
+ return pdfdictionary { }
+ else
+ return ""
+ end
+ end
+
+ function lpdf.adddocumentextgstate (k,v)
+ if not d_extgstates then
+ r_extgstates = pdfreserveobject()
+ d_extgstates = pdfdictionary()
+ p_extgstates = pdfreference(r_extgstates)
+ end
+ d_extgstates[k] = v
+ end
+
+ function lpdf.adddocumentcolorspace(k,v)
+ if not d_colorspaces then
+ r_colorspaces = pdfreserveobject()
+ d_colorspaces = pdfdictionary()
+ p_colorspaces = pdfreference(r_colorspaces)
+ end
+ d_colorspaces[k] = v
+ end
+
+ function lpdf.adddocumentpattern(k,v)
+ if not d_patterns then
+ r_patterns = pdfreserveobject()
+ d_patterns = pdfdictionary()
+ p_patterns = pdfreference(r_patterns)
+ end
+ d_patterns[k] = v
+ end
+
+ function lpdf.adddocumentshade(k,v)
+ if not d_shades then
+ r_shades = pdfreserveobject()
+ d_shades = pdfdictionary()
+ p_shades = pdfreference(r_shades)
+ end
+ d_shades[k] = v
+ end
+
+ registerdocumentfinalizer(flushextgstates,3,"extended graphic states")
+ registerdocumentfinalizer(flushcolorspaces,3,"color spaces")
+ registerdocumentfinalizer(flushpatterns,3,"patterns")
+ registerdocumentfinalizer(flushshades,3,"shades")
+
+ registerdocumentfinalizer(flushnames,3,"names") -- before catalog
+ registerdocumentfinalizer(flushcatalog,3,"catalog")
+ registerdocumentfinalizer(flushinfo,3,"info")
+
+ registerpagefinalizer(checkextgstates,3,"extended graphic states")
+ registerpagefinalizer(checkcolorspaces,3,"color spaces")
+ registerpagefinalizer(checkpatterns,3,"patterns")
+ registerpagefinalizer(checkshades,3,"shades")
+
+end
+
+-- in strc-bkm: lpdf.registerdocumentfinalizer(function() structures.bookmarks.place() end,1)
+
+function lpdf.rotationcm(a)
+ local s = sind(a)
+ local c = cosd(a)
+ return format("%.6F %.6F %.6F %.6F 0 0 cm",c,s,-s,c)
+end
+
+-- ! -> universaltime
+
+do
+
+ -- It's a bit of a historical mess here.
+
+ local osdate, ostime, ostimezone = os.date, os.time, os.timezone
+
+ local metadata = nil
+ local timestamp = osdate("%Y-%m-%dT%X") .. ostimezone(true)
+
+ function lpdf.getmetadata()
+ if not metadata then
+ local contextversion = environment.version
+ local luatexversion = format("%1.2f",LUATEXVERSION)
+ local luatexfunctionality = tostring(LUATEXFUNCTIONALITY)
+ metadata = {
+ producer = format("LuaTeX-%s",luatexversion),
+ creator = format("LuaTeX %s %s + ConTeXt LMTX %s",luatexversion,luatexfunctionality,contextversion),
+ luatexversion = luatexversion,
+ contextversion = contextversion,
+ luatexfunctionality = luatexfunctionality,
+ luaversion = tostring(LUAVERSION),
+ platform = os.platform,
+ time = timestamp,
+ }
+ end
+ return metadata
+ end
+
+ function lpdf.settime(n)
+ if n then
+ n = converters.totime(n)
+ if n then
+ converters.settime(n)
+ timestamp = osdate("%Y-%m-%dT%X") .. ostimezone(true) -- probably not ok
+ end
+ end
+ if metadata then
+ metadata.time = timestamp
+ end
+ return timestamp
+ end
+
+ lpdf.settime(tonumber(resolvers.variable("start_time")) or tonumber(resolvers.variable("SOURCE_DATE_EPOCH"))) -- bah
+
+ function lpdf.pdftimestamp(str)
+ local t = type(str)
+ if t == "string" then
+ local Y, M, D, h, m, s, Zs, Zh, Zm = match(str,"^(%d%d%d%d)%-(%d%d)%-(%d%d)T(%d%d):(%d%d):(%d%d)([%+%-])(%d%d):(%d%d)$")
+ return Y and format("D:%s%s%s%s%s%s%s%s'%s'",Y,M,D,h,m,s,Zs,Zh,Zm)
+ else
+ return osdate("D:%Y%m%d%H%M%S",t == "number" and str or ostime()) -- maybe "!D..." : universal time
+ end
+ end
+
+ function lpdf.id(date)
+ local banner = environment.jobname or tex.jobname or "unknown"
+ if not date then
+ return banner
+ else
+ return format("%s | %s",banner,timestamp)
+ end
+ end
+
+end
+
+-- return nil is nicer in test prints
+
+function lpdf.checkedkey(t,key,variant)
+ local pn = t and t[key]
+ if pn ~= nil then
+ local tn = type(pn)
+ if tn == variant then
+ if variant == "string" then
+ if pn ~= "" then
+ return pn
+ end
+ elseif variant == "table" then
+ if next(pn) then
+ return pn
+ end
+ else
+ return pn
+ end
+ elseif tn == "string" then
+ if variant == "number" then
+ return tonumber(pn)
+ elseif variant == "boolean" then
+ return isboolean(pn,nil,true)
+ end
+ end
+ end
+ -- return nil
+end
+
+function lpdf.checkedvalue(value,variant) -- code not shared
+ if value ~= nil then
+ local tv = type(value)
+ if tv == variant then
+ if variant == "string" then
+ if value ~= "" then
+ return value
+ end
+ elseif variant == "table" then
+ if next(value) then
+ return value
+ end
+ else
+ return value
+ end
+ elseif tv == "string" then
+ if variant == "number" then
+ return tonumber(value)
+ elseif variant == "boolean" then
+ return isboolean(value,nil,true)
+ end
+ end
+ end
+end
+
+function lpdf.limited(n,min,max,default)
+ if not n then
+ return default
+ else
+ n = tonumber(n)
+ if not n then
+ return default
+ elseif n > max then
+ return max
+ elseif n < min then
+ return min
+ else
+ return n
+ end
+ end
+end
+
+-- The next variant of ActualText is what Taco and I could come up with
+-- eventually. As of September 2013 Acrobat copies okay, Sumatra copies a
+-- question mark, pdftotext injects an extra space and Okular adds a
+-- newline plus space.
+
+-- return formatters["BT /Span << /ActualText (CONTEXT) >> BDC [<feff>] TJ % t EMC ET"](code)
+
+do
+
+ local f_actual_text_p = formatters["BT /Span << /ActualText <feff%s> >> BDC %s EMC ET"]
+ local f_actual_text_b = formatters["BT /Span << /ActualText <feff%s> >> BDC"]
+ local s_actual_text_e = "EMC ET"
+ local f_actual_text_b_not = formatters["/Span << /ActualText <feff%s> >> BDC"]
+ local s_actual_text_e_not = "EMC"
+ local f_actual_text = formatters["/Span <</ActualText %s >> BDC"]
+
+ local context = context
+ local pdfdirect = nodes.pool.directliteral -- we can use nuts.write deep down
+ local tounicode = fonts.mappings.tounicode
+
+ function codeinjections.unicodetoactualtext(unicode,pdfcode)
+ return f_actual_text_p(type(unicode) == "string" and unicode or tounicode(unicode),pdfcode)
+ end
+
+ function codeinjections.startunicodetoactualtext(unicode)
+ return f_actual_text_b(type(unicode) == "string" and unicode or tounicode(unicode))
+ end
+
+ function codeinjections.stopunicodetoactualtext()
+ return s_actual_text_e
+ end
+
+ function codeinjections.startunicodetoactualtextdirect(unicode)
+ return f_actual_text_b_not(type(unicode) == "string" and unicode or tounicode(unicode))
+ end
+
+ function codeinjections.stopunicodetoactualtextdirect()
+ return s_actual_text_e_not
+ end
+
+ implement {
+ name = "startactualtext",
+ arguments = "string",
+ actions = function(str)
+ context(pdfdirect(f_actual_text(tosixteen(str))))
+ end
+ }
+
+ implement {
+ name = "stopactualtext",
+ actions = function()
+ context(pdfdirect("EMC"))
+ end
+ }
+
+ local setstate = nodes.nuts.pool.setstate
+
+ function nodeinjections.startalternate(str)
+ return setstate(f_actual_text(tosixteen(str)))
+ end
+
+ function nodeinjections.stopalternate()
+ return setstate("EMC")
+ end
+
+
+end
+
+-- interface
+
+implement { name = "lpdf_collectedresources", actions = { lpdf.collectedresources, context } }
+implement { name = "lpdf_addtocatalog", arguments = "2 strings", actions = lpdf.addtocatalog }
+implement { name = "lpdf_addtoinfo", arguments = "2 strings", actions = function(a,b,c) lpdf.addtoinfo(a,b,c) end } -- gets adapted
+implement { name = "lpdf_addtonames", arguments = "2 strings", actions = lpdf.addtonames }
+implement { name = "lpdf_addtopageattributes", arguments = "2 strings", actions = lpdf.addtopageattributes }
+implement { name = "lpdf_addtopagesattributes", arguments = "2 strings", actions = lpdf.addtopagesattributes }
+implement { name = "lpdf_addtopageresources", arguments = "2 strings", actions = lpdf.addtopageresources }
+implement { name = "lpdf_adddocumentextgstate", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentextgstate (a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentcolorspace", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentcolorspace(a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentpattern", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentpattern (a,pdfverbose(b)) end }
+implement { name = "lpdf_adddocumentshade", arguments = "2 strings", actions = function(a,b) lpdf.adddocumentshade (a,pdfverbose(b)) end }
+
+-- more helpers: copy from lepd to lpdf
+
+function lpdf.copyconstant(v)
+ if v ~= nil then
+ return pdfconstant(v)
+ end
+end
+
+function lpdf.copyboolean(v)
+ if v ~= nil then
+ return pdfboolean(v)
+ end
+end
+
+function lpdf.copyunicode(v)
+ if v then
+ return pdfunicode(v)
+ end
+end
+
+function lpdf.copyarray(a)
+ if a then
+ local t = pdfarray()
+ for i=1,#a do
+ t[i] = a(i)
+ end
+ return t
+ end
+end
+
+function lpdf.copydictionary(d)
+ if d then
+ local t = pdfdictionary()
+ for k, v in next, d do
+ t[k] = d(k)
+ end
+ return t
+ end
+end
+
+function lpdf.copynumber(v)
+ return v
+end
+
+function lpdf.copyinteger(v)
+ return v -- maybe checking or round ?
+end
+
+function lpdf.copyfloat(v)
+ return v
+end
+
+function lpdf.copystring(v)
+ if v then
+ return pdfstring(v)
+ end
+end
+
+do
+
+ -- This is obsolete but old viewers might still use it as directive
+ -- for what to send to a postscript printer.
+
+ local a_procset, d_procset
+
+ function lpdf.procset(dict)
+ if not a_procset then
+ a_procset = pdfarray {
+ pdfconstant("PDF"),
+ pdfconstant("Text"),
+ pdfconstant("ImageB"),
+ pdfconstant("ImageC"),
+ pdfconstant("ImageI"),
+ }
+ a_procset = pdfreference(pdfimmediateobject(tostring(a_procset)))
+ end
+ if dict then
+ if not d_procset then
+ d_procset = pdfdictionary {
+ ProcSet = a_procset
+ }
+ d_procset = pdfreference(pdfimmediateobject(tostring(d_procset)))
+ end
+ return d_procset
+ else
+ return a_procset
+ end
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-lmt.lua b/Master/texmf-dist/tex/context/base/mkxl/lpdf-lmt.lmt
index 3966143b4cd..fbc002a9327 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-lmt.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-lmt.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['lpdf-lmt'] = {
version = 1.001,
+ optimize = true,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -31,7 +32,7 @@ if not modules then modules = { } end modules ['lpdf-lmt'] = {
-- the next interface is suboptimal and will change at some time. At that moment I will
-- also optimize and extend.
-local type, next, unpack, tonumber = type, next, unpack, tonumber
+local type, next, unpack, tonumber, rawget = type, next, unpack, tonumber, rawget
local char, rep, find = string.char, string.rep, string.find
local formatters, splitupstring = string.formatters, string.splitup
local band, extract = bit32.band, bit32.extract
@@ -39,46 +40,69 @@ local concat, sortedhash = table.concat, table.sortedhash
local setmetatableindex = table.setmetatableindex
local loaddata = io.loaddata
-local bpfactor <const> = number.dimenfactors.bp
+local bpfactor = number.dimenfactors.bp
-local md5HEX = md5.HEX
+-- local md5HEX = md5.HEX
local osuuid = os.uuid
local zlibcompress = (xzip or zlib).compress
local nuts = nodes.nuts
local tonut = nodes.tonut
-local getdata = nuts.getdata
-local getsubtype = nuts.getsubtype
-local getwhd = nuts.getwhd
-local flushlist = nuts.flush_list
-
-local pdfincludeimage = lpdf.includeimage
-local pdfgetfontname = lpdf.getfontname
-local pdfgetfontobjnumber = lpdf.getfontobjnumber
-
-local pdfreserveobject = lpdf.reserveobject
-local pdfpagereference = lpdf.pagereference
-local pdfflushobject = lpdf.flushobject
local pdfreference = lpdf.reference
local pdfdictionary = lpdf.dictionary
local pdfarray = lpdf.array
local pdfconstant = lpdf.constant
-local pdfflushstreamobject = lpdf.flushstreamobject
local pdfliteral = lpdf.literal -- not to be confused with a whatsit!
-local pdf_pages = pdfconstant("Pages")
-local pdf_page = pdfconstant("Page")
-local pdf_xobject = pdfconstant("XObject")
-local pdf_form = pdfconstant("Form")
+local pdfreserveobject
+local pdfpagereference
+local pdfflushobject
+local pdfsharedobject
+local pdfflushstreamobject
+local pdfdeferredobject
+local pdfimmediateobject
+
+local pdfgetfontname
+local pdfgetfontobjectnumber
+
+local pdfgetpagereference
+
+updaters.register("backend.update.lpdf",function()
+ pdfreserveobject = lpdf.reserveobject
+ pdfpagereference = lpdf.pagereference
+ pdfflushobject = lpdf.flushobject
+ pdfsharedobject = lpdf.shareobjectreference
+ pdfflushstreamobject = lpdf.flushstreamobject
+ pdfdeferredobject = lpdf.deferredobject
+ pdfimmediateobject = lpdf.immediateobject
+ --
+ pdfgetfontname = lpdf.getfontname
+ pdfgetfontobjectnumber = lpdf.getfontobjectnumber
+ --
+ pdfgetpagereference = lpdf.getpagereference
+end)
+
+local pdf_pages = pdfconstant("Pages")
+local pdf_page = pdfconstant("Page")
+local pdf_xobject = pdfconstant("XObject")
+local pdf_form = pdfconstant("Form")
+
+local fonthashes = fonts.hashes
+local characters = fonthashes.characters
+local descriptions = fonthashes.descriptions
+local parameters = fonthashes.parameters
+local properties = fonthashes.properties
+
+local report = logs.reporter("backend")
+local report_objects = logs.reporter("backend","objects")
-local fonthashes = fonts.hashes
-local characters = fonthashes.characters
-local descriptions = fonthashes.descriptions
-local parameters = fonthashes.parameters
-local properties = fonthashes.properties
+local trace_objects = false trackers.register("backend.objects", function(v) trace_objects = v end)
+local trace_details = false trackers.register("backend.details", function(v) trace_details = v end)
-local report = logs.reporter("backend")
+-- we collect them:
+
+local flushers = { }
-- used variables
@@ -86,13 +110,14 @@ local pdf_h, pdf_v
local need_tm, need_tf, cur_tmrx, cur_factor, cur_f, cur_e
local need_width, need_mode, done_width, done_mode
local mode
-local f_pdf_cur, f_pdf, fs_cur, fs, f_cur
+local f_pdf_cur, f_pdf, fs_cur, fs, f_cur, f_x_scale, f_y_scale
local tj_delta, cw
local usedfonts, usedxforms, usedximages, usedxgroups
local getxformname, getximagename
local boundingbox, shippingmode, objectnumber
local tmrx, tmry, tmsx, tmsy, tmtx, tmty
local cmrx, cmry, cmsx, cmsy, cmtx, cmty
+local tmef
local function usefont(t,k) -- a bit redundant hash
local v = pdfgetfontname(k)
@@ -108,6 +133,7 @@ local function reset_variables(specification)
tmrx, tmry = 1.0, 1.0
tmsx, tmsy = 0.0, 0.0
tmtx, tmty = 0.0, 0.0
+ tmef = 1.0
need_tm = false
need_tf = false
need_width = 0
@@ -123,6 +149,8 @@ local function reset_variables(specification)
f_pdf = 0 -- nullfont
fs_cur = 0
fs = 0
+ f_x_scale = 1.0
+ f_y_scale = 1.0
cur_factor = 0
cur_f = false
cur_e = false
@@ -153,15 +181,15 @@ local fontproperties
local usedcharacters = setmetatableindex("table")
local pdfcharacters
-local horizontalmode = true
------ widefontmode = true
-local scalefactor = 1
-local threshold = 655360
-local tjfactor <const> = 100 / 65536
+local horizontalmode = true
+local scalefactor = 1
+local threshold = 655360
+local thresfactor = 100
+local tjfactor = 100 / 65536
lpdf.usedcharacters = usedcharacters
-local function updatefontstate(font)
+function flushers.updatefontstate(font)
fontcharacters = characters[font]
fontdescriptions = descriptions[font]
fontparameters = parameters[font]
@@ -170,10 +198,19 @@ local function updatefontstate(font)
local designsize = fontparameters.designsize or size
pdfcharacters = usedcharacters[font]
horizontalmode = fontparameters.writingmode ~= "vertical"
- -- widefontmode = fontproperties.encodingbytes == 2
scalefactor = (designsize/size) * tjfactor
+ --
local fthreshold = fontproperties.threshold
- threshold = (fthreshold and (size * fthreshold / 100)) or 655360
+ threshold = (fthreshold and (size * fthreshold / 100)) or 655360
+ -- when we bolden the threshold should be smaller .. a hack .. i need to redo all this
+ if (fontparameters.extendfactor or 1) == 1 then
+ -- we're probably okay
+ elseif fontparameters.hshift or fontparameters.vshift then
+ -- we could be okay
+ else
+ -- some vf magic going on
+ threshold = threshold / 5
+ end
end
-- helpers
@@ -367,8 +404,7 @@ local function pdf_goto_fontmode()
end
-- characters
-
-local flushcharacter do
+do
local round = math.round
@@ -377,24 +413,57 @@ local flushcharacter do
-- for it so
local naturalwidth = nil
+ local hshift = false
+ local vshift = false
+
+ -- local naturalwidths = setmetatableindex(function(t,font)
+ -- local d = descriptions[font]
+ -- local c = characters[font]
+ -- local f = parameters[font].hfactor or parameters[font].factor
+ -- local v = setmetatableindex(function(t,char)
+ -- local w
+ -- local e = d and d[char]
+ -- if e then
+ -- w = e.width
+ -- if w then
+ -- w = w * f
+ -- end
+ -- end
+ -- if not w then
+ -- e = c and c[char]
+ -- if e then
+ -- w = e.width or 0
+ -- end
+ -- end
+ -- if not w then
+ -- w = 0
+ -- end
+ -- t[char] = w
+ -- return w
+ -- end)
+ -- t[font] = v
+ -- return v
+ -- end)
+
+ -- when changing this, check math: compact-001.tex (rule width)
local naturalwidths = setmetatableindex(function(t,font)
local d = descriptions[font]
local c = characters[font]
- local f = parameters[font].hfactor
+ local f = parameters[font].hfactor or parameters[font].factor
local v = setmetatableindex(function(t,char)
- local e = d and d[char]
local w
+ local e = c and c[char]
if e then
- w = e.width
- if w then
- w = w * f
- end
+ w = e.width or 0
end
if not w then
- e = c[char]
+ e = d and d[char]
if e then
- w = e.width or 0
+ w = e.width
+ if w then
+ w = w * f
+ end
end
end
if not w then
@@ -407,7 +476,7 @@ local flushcharacter do
return v
end)
- local function setup_fontparameters(font,factor,f,e)
+ local function setup_fontparameters(font,factor,f,e,sx,sy)
local slant = fontparameters.slantfactor or 0
local extend = fontparameters.extendfactor or 1
local squeeze = fontparameters.squeezefactor or 1
@@ -416,6 +485,7 @@ local flushcharacter do
if e then
extend = extend * e
end
+ tmef = expand
tmrx = expand * extend
tmsy = slant
tmry = squeeze
@@ -427,6 +497,8 @@ local flushcharacter do
cur_f = f
cur_e = e
tj_delta = 0
+ f_x_scale = 1.0
+ f_y_scale = 1.0
fs = fontparameters.size * bpfactor
if f then
fs = fs * f
@@ -436,63 +508,34 @@ local flushcharacter do
fs = fs * 1000 / fontparameters.units -- can we avoid this ?
end
--
+ f_x_scale = sx
+ if f_x_scale ~= 1.0 then
+ tmrx = tmrx * f_x_scale
+ end
+ f_y_scale = sy
+ if f_y_scale ~= 1.0 then
+ tmry = tmry * f_y_scale
+ end
+ --
naturalwidth = naturalwidths[font]
+ --
+ hshift = fontparameters.hshift
+ vshift = fontparameters.vshift
end
- -- This only saves a little on hz because there we switch a lot of
- -- instances.
-
- -- local lastslant, lastextend, lastsqueeze, lastformat, lastsize, lastwidth, lastmode, lastused, lastfont
-
- -- local function setup_fontparameters(font,factor,f,e)
- -- if font ~= lastfont then
- -- lastslant = fontparameters.slantfactor or 0
- -- lastextend = fontparameters.extendfactor or 1
- -- lastsqueeze = fontparameters.squeezefactor or 1
- -- lastformat = fontproperties.format
- -- lastsize = fontparameters.size * bpfactor
- -- if format == "opentype" or format == "type1" then
- -- lastsize = lastsize * 1000 / fontparameters.units -- can we avoid this ?
- -- end
- -- lastwidth = fontparameters.width
- -- lastmode = fontparameters.mode
- -- lastused = usedfonts[font] -- cache
- -- lastfont = font
- -- end
- -- local expand = 1 + factor / 1000000
- -- if e then
- -- tmrx = expand * lastextend * e
- -- else
- -- tmrx = expand * lastextend
- -- end
- -- tmsy = lastslant
- -- tmry = lastsqueeze
- -- need_width = lastwidth
- -- need_mode = lastmode
- -- f_cur = lastfont
- -- f_pdf = lastused
- -- cur_factor = factor
- -- cur_f = f
- -- cur_e = e
- -- tj_delta = 0
- -- if f then
- -- fs = lastsize * f
- -- else
- -- fs = lastsize
- -- end
- -- end
-
local f_width = formatters["%.6N w"]
local f_mode = formatters["%i Tr"] -- can be hash
local f_font = formatters["/F%i %.6N Tf"] -- can be hash
- local s_width <const> = "0 w"
- local s_mode <const> = "0 Tr"
+ local s_width = "0 w"
+ local s_mode = "0 Tr"
+
+ local width_factor = 72.27 / 72000.0
local function set_font()
-- if need_width and need_width ~= 0 then
if need_width ~= 0 then
- b = b + 1 ; buffer[b] = f_width(bpfactor * need_width / 1000)
+ b = b + 1 ; buffer[b] = f_width(width_factor*need_width)
done_width = true
elseif done_width then
b = b + 1 ; buffer[b] = s_width
@@ -546,17 +589,24 @@ local flushcharacter do
return v
end)
- local trace_threshold = false trackers.register("backends.pdf.threshold", function(v) trace_threshold = v end)
+ -- local trace_threshold = false trackers.register("backends.pdf.threshold", function(v) trace_threshold = v end)
+
+ -- local f_skip = formatters["%.2N"]
- flushcharacter = function(current,pos_h,pos_v,pos_r,font,char,data,f,e,factor) -- ,naturalwidth,width)
- if need_tf or font ~= f_cur or f_pdf ~= f_pdf_cur or fs ~= fs_cur or mode == "page" then
+ -- I will redo this mess ... we no longer have the mkiv pdf generator that we used in
+ -- luatex (a precursor to lmtx and also for comparison) but only in lmtx now so ...
+ -- time to move on I guess.
+
+ flushers.character = function(current,pos_h,pos_v,pos_r,font,char,data,f,e,factor,sx,sy) -- ,naturalwidth,width)
+ if sx ~= f_x_scale or sy ~= f_y_scale or need_tf or font ~= f_cur or f_pdf ~= f_pdf_cur or fs ~= fs_cur or mode == "page" then
pdf_goto_textmode()
- setup_fontparameters(font,factor,f,e)
+ setup_fontparameters(font,factor,f,e,sx,sy)
set_font()
elseif cur_tmrx ~= tmrx or cur_factor ~= factor or cur_f ~= f or cur_e ~= e then
- setup_fontparameters(font,factor,f,e)
+ setup_fontparameters(font,factor,f,e,sx,sy)
need_tm = true
end
+
local move = calc_pdfpos(pos_h,pos_v)
-- if trace_threshold then
@@ -582,6 +632,10 @@ local flushcharacter do
end
end
end
+
+ if hshift then pos_h = pos_h + hshift end
+ if vshift then pos_v = pos_v - vshift end
+
if need_tm then
pdf_goto_textmode()
set_textmatrix(pos_h,pos_v)
@@ -589,7 +643,7 @@ local flushcharacter do
move = calc_pdfpos(pos_h,pos_v)
end
if move then
- local d = tj_delta * scalefactor
+ local d = tj_delta * scalefactor / f_x_scale
if d <= -0.5 or d >= 0.5 then
if mode == "char" then
end_charmode()
@@ -604,7 +658,7 @@ local flushcharacter do
begin_charmode()
end
- cw = cw + naturalwidth[char] * tmrx
+ cw = cw + naturalwidth[char] * tmef * f_x_scale
local index = data.index or char
@@ -616,7 +670,7 @@ local flushcharacter do
end
- flushfontchar = function(font,char,data)
+ flushers.fontchar = function(font,char,data)
local dummy = usedfonts[font]
local index = data.index or char
if not pdfcharacters[index] then
@@ -631,22 +685,22 @@ end
local flushliteral do
- local nodeproperties <const> = nodes.properties.data
- local literalvalues <const> = nodes.literalvalues
-
- local originliteral_code <const> = literalvalues.origin
- local pageliteral_code <const> = literalvalues.page
- local alwaysliteral_code <const> = literalvalues.always
- local rawliteral_code <const> = literalvalues.raw
- local textliteral_code <const> = literalvalues.text
- local fontliteral_code <const> = literalvalues.font
-
- flushliteral = function(current,pos_h,pos_v,mode,str)
- if mode then
- if not str then
- mode, str = originliteral_code, mode
- elseif mode == "mode" then
- mode = literalvalues[str]
+ local nodeproperties = nodes.properties.data
+ local literalvalues = nodes.literalvalues
+
+ local originliteral_code = literalvalues.origin
+ local pageliteral_code = literalvalues.page
+ local alwaysliteral_code = literalvalues.always
+ local rawliteral_code = literalvalues.raw
+ local textliteral_code = literalvalues.text
+ local fontliteral_code = literalvalues.font
+
+ flushliteral = function(current,pos_h,pos_v)
+ local p = nodeproperties[current]
+ if p then
+ local str = p.data
+ if str and str ~= "" then
+ local mode = p.mode
if mode == originliteral_code then
pdf_goto_pagemode()
pdf_set_pos(pos_h,pos_v)
@@ -656,29 +710,34 @@ local flushliteral do
pdf_goto_textmode()
elseif mode == fontliteral_code then
pdf_goto_fontmode()
- elseif mode == alwaysliteral_code then
+ elseif mode == alwaysliteral_code then -- aka direct
pdf_end_string_nl()
need_tm = true
elseif mode == rawliteral_code then
pdf_end_string_nl()
+ else
+ report("invalid literal mode %a when flushing %a",mode,str)
+ return
end
- return
- else
- mode = literalvalues[mode]
+ b = b + 1 ; buffer[b] = str
end
+ end
+ end
+
+ flushers.literal = flushliteral
+
+ function lpdf.print(mode,str)
+ -- This only works inside objects, don't change this to flush
+ -- in between. It's different from luatex but okay.
+ if str then
+ mode = literalvalues[mode]
else
- local p = nodeproperties[current]
- if p then
- str = p.data
- mode = p.mode
- else
- str, mode = getdata(current)
- end
+ mode, str = originliteral_code, mode
end
if str and str ~= "" then
if mode == originliteral_code then
pdf_goto_pagemode()
- pdf_set_pos(pos_h,pos_v)
+ -- pdf_set_pos(pdf_h,pdf_v)
elseif mode == pageliteral_code then
pdf_goto_pagemode()
elseif mode == textliteral_code then
@@ -691,59 +750,25 @@ local flushliteral do
elseif mode == rawliteral_code then
pdf_end_string_nl()
else
- report("check literal")
- pdf_goto_pagemode()
- pdf_set_pos(pos_h,pos_v)
+ report("invalid literal mode %a when flushing %a",mode,str)
+ return
end
b = b + 1 ; buffer[b] = str
end
end
- updaters.register("backend.update.pdf",function()
- function pdf.print(mode,str)
- if str then
- mode = literalvalues[mode]
- else
- mode, str = originliteral_code, mode
- end
- if str and str ~= "" then
- if mode == originliteral_code then
- pdf_goto_pagemode()
- -- pdf_set_pos(pdf_h,pdf_v)
- elseif mode == pageliteral_code then
- pdf_goto_pagemode()
- elseif mode == textliteral_code then
- pdf_goto_textmode()
- elseif mode == fontliteral_code then
- pdf_goto_fontmode()
- elseif mode == alwaysliteral_code then
- pdf_end_string_nl()
- need_tm = true
- elseif mode == rawliteral_code then
- pdf_end_string_nl()
- else
- pdf_goto_pagemode()
- -- pdf_set_pos(pdf_h,pdf_v)
- end
- b = b + 1 ; buffer[b] = str
- end
- end
- end)
-
end
-- grouping & orientation
-local flushsave, flushrestore, flushsetmatrix do
+do
local matrices = { }
local positions = { }
local nofpositions = 0
local nofmatrices = 0
- local f_matrix = formatters["%s 0 0 cm"]
-
- flushsave = function(current,pos_h,pos_v)
+ local flushsave = function(current,pos_h,pos_v)
nofpositions = nofpositions + 1
positions[nofpositions] = { pos_h, pos_v, nofmatrices }
pdf_goto_pagemode()
@@ -751,7 +776,7 @@ local flushsave, flushrestore, flushsetmatrix do
b = b + 1 ; buffer[b] = "q"
end
- flushrestore = function(current,pos_h,pos_v)
+ local flushrestore = function(current,pos_h,pos_v)
if nofpositions < 1 then
return
end
@@ -767,70 +792,86 @@ local flushsave, flushrestore, flushsetmatrix do
nofpositions = nofpositions - 1
end
- local function pdf_set_matrix(str,pos_h,pos_v)
- if shippingmode == "page" then
- local rx, sx, sy, ry = splitupstring(str," ")
- if rx and ry and sx and ry then
- rx, sx, sy, ry = tonumber(rx), tonumber(sx), tonumber(sy), tonumber(ry)
- local tx = pos_h * (1 - rx) - pos_v * sy
- local ty = pos_v * (1 - ry) - pos_h * sx
- if nofmatrices > 1 then
- local t = matrices[nofmatrices]
- local r_x, s_x, s_y, r_y, te, tf = t[1], t[2], t[3], t[4], t[5], t[6]
- rx, sx = rx * r_x + sx * s_y, rx * s_x + sx * r_y
- sy, ry = sy * r_x + ry * s_y, sy * s_x + ry * r_y
- tx, ty = tx * r_x + ty * s_y, tx * s_x + ty * r_y
- end
- nofmatrices = nofmatrices + 1
- matrices[nofmatrices] = { rx, sx, sy, ry, tx, ty }
- end
- end
- end
-
local nodeproperties = nodes.properties.data
- flushsetmatrix = function(current,pos_h,pos_v)
- local str
- if type(current) == "string" then
- str = current
- else
- local p = nodeproperties[current]
- if p then
- str = p.matrix
- else
- str = getdata(current) -- for the moment
+ local s_matrix_0 = "1 0 0 1 0 0 cm"
+ local f_matrix_2 = formatters["%.6N 0 0 %.6N 0 0 cm"]
+ local f_matrix_4 = formatters["%.6N %.6N %.6N %.6N 0 0 cm"]
+
+ local flushsetmatrix = function(current,pos_h,pos_v)
+ local p = nodeproperties[current]
+ if p then
+ local m = p.matrix
+ if m then
+ local rx, sx, sy, ry = unpack(m)
+ local s
+ if not rx then
+ rx = 1
+ elseif rx == 0 then
+ rx = 0.0001
+ end
+ if not ry then
+ ry = 1
+ elseif ry == 0 then
+ ry = 0.0001
+ end
+ if not sx then
+ sx = 0
+ end
+ if not sy then
+ sy = 0
+ end
+ --
+ if sx == 0 and sy == 0 then
+ if rx == 1 and ry == 1 then
+ s = s_matrix_0
+ else
+ s = f_matrix_2(rx,ry)
+ end
+ else
+ s = f_matrix_4(rx,sx,sy,ry)
+ end
+ --
+ if shippingmode == "page" then
+ local tx = pos_h * (1 - rx) - pos_v * sy
+ local ty = pos_v * (1 - ry) - pos_h * sx
+ if nofmatrices > 0 then
+ local t = matrices[nofmatrices]
+ local r_x, s_x, s_y, r_y, te, tf = t[1], t[2], t[3], t[4], t[5], t[6]
+ rx, sx = rx * r_x + sx * s_y, rx * s_x + sx * r_y
+ sy, ry = sy * r_x + ry * s_y, sy * s_x + ry * r_y
+ tx, ty = tx * r_x + ty * s_y, tx * s_x + ty * r_y
+ end
+ nofmatrices = nofmatrices + 1
+ matrices[nofmatrices] = { rx, sx, sy, ry, tx, ty }
+ end
+ --
+ pdf_goto_pagemode()
+ pdf_set_pos(pos_h,pos_v)
+ --
+ b = b + 1
+ buffer[b] = s
end
end
- if str and str ~= "" then
- pdf_set_matrix(str,pos_h,pos_v)
- pdf_goto_pagemode()
- pdf_set_pos(pos_h,pos_v)
- b = b + 1 ; buffer[b] = f_matrix(str)
- end
end
- do
+ flushers.setmatrix = flushsetmatrix
+ flushers.save = flushsave
+ flushers.restore = flushrestore
- local function hasmatrix()
- return nofmatrices > 0
- end
+ function lpdf.hasmatrix()
+ return nofmatrices > 0
+ end
- local function getmatrix()
- if nofmatrices > 0 then
- return unpack(matrices[nofmatrices])
- else
- return 1, 0, 0, 1, 0, 0
- end
+ function lpdf.getmatrix()
+ if nofmatrices > 0 then
+ return unpack(matrices[nofmatrices])
+ else
+ return 1, 0, 0, 1, 0, 0
end
-
- updaters.register("backend.update.pdf",function()
- pdf.hasmatrix = hasmatrix
- pdf.getmatrix = getmatrix
- end)
-
end
- pushorientation = function(orientation,pos_h,pos_v,pos_r)
+ flushers.pushorientation = function(orientation,pos_h,pos_v,pos_r)
pdf_goto_pagemode()
pdf_set_pos(pos_h,pos_v)
b = b + 1 ; buffer[b] = "q"
@@ -843,26 +884,77 @@ local flushsave, flushrestore, flushsetmatrix do
end
end
- poporientation = function(orientation,pos_h,pos_v,pos_r)
+ flushers.poporientation = function(orientation,pos_h,pos_v,pos_r)
pdf_goto_pagemode()
pdf_set_pos(pos_h,pos_v)
b = b + 1 ; buffer[b] = "Q"
end
- -- pushorientation = function(orientation,pos_h,pos_v,pos_r)
- -- flushsave(false,pos_h,pos_v)
- -- if orientation == 1 then
- -- flushsetmatrix("0 -1 1 0",pos_h,pos_v)
- -- elseif orientation == 2 then
- -- flushsetmatrix("-1 0 0 -1",pos_h,pos_v)
- -- elseif orientation == 3 then
- -- flushsetmatrix("0 1 -1 0",pos_h,pos_v)
- -- end
- -- end
+ --
- -- poporientation = function(orientation,pos_h,pos_v,pos_r)
- -- flushrestore(false,pos_h,pos_v)
- -- end
+ flushers.startmatrix = function(current,pos_h,pos_v)
+ flushsave(current,pos_h,pos_v)
+ flushsetmatrix(current,pos_h,pos_v)
+ end
+
+ flushers.stopmatrix = function(current,pos_h,pos_v)
+ flushrestore(current,pos_h,pos_v)
+ end
+
+ flushers.startscaling = function(current,pos_h,pos_v)
+ flushsave(current,pos_h,pos_v)
+ flushsetmatrix(current,pos_h,pos_v)
+ end
+
+ flushers.stopscaling = function(current,pos_h,pos_v)
+ flushrestore(current,pos_h,pos_v)
+ end
+
+ flushers.startrotation = function(current,pos_h,pos_v)
+ flushsave(current,pos_h,pos_v)
+ flushsetmatrix(current,pos_h,pos_v)
+ end
+
+ flushers.stoprotation = function(current,pos_h,pos_v)
+ flushrestore(current,pos_h,pos_v)
+ end
+
+ flushers.startmirroring = function(current,pos_h,pos_v)
+ flushsave(current,pos_h,pos_v)
+ flushsetmatrix(current,pos_h,pos_v)
+ end
+
+ flushers.stopmirroring = function(current,pos_h,pos_v)
+ flushrestore(current,pos_h,pos_v)
+ end
+
+ flushers.startclipping = function(current,pos_h,pos_v)
+ flushsave(current,pos_h,pos_v)
+ -- lpdf.print("origin",formatters["0 w %s W n"](nodeproperties[current].path))
+ pdf_goto_pagemode()
+ b = b + 1 ; buffer[b] = formatters["0 w %s W n"](nodeproperties[current].path)
+ end
+
+ flushers.stopclipping = function(current,pos_h,pos_v)
+ flushrestore(current,pos_h,pos_v)
+ end
+
+end
+
+do
+
+ local nodeproperties = nodes.properties.data
+
+ flushers.setstate = function(current,pos_h,pos_v)
+ local p = nodeproperties[current]
+ if p then
+ local d = p.data
+ if d and d ~= "" then
+ pdf_goto_pagemode()
+ b = b + 1 ; buffer[b] = d
+ end
+ end
+ end
end
@@ -871,40 +963,48 @@ end
local flushedxforms = { } -- actually box resources but can also be direct
local localconverter = nil -- will be set
-local flushrule, flushsimplerule, flushimage, flushgroup do
+local flushimage do
- local rulecodes = nodes.rulecodes
- local newrule = nodes.pool.rule
+ local rulecodes = nodes.rulecodes
+ local newrule = nodes.pool.rule
- local setprop = nuts.setprop
- local getprop = nuts.getprop
+ local setprop = nuts.setprop
+ local getprop = nuts.getprop
- local normalrule_code <const> = rulecodes.normal
- local boxrule_code <const> = rulecodes.box
- local imagerule_code <const> = rulecodes.image
- local emptyrule_code <const> = rulecodes.empty
- local userrule_code <const> = rulecodes.user
- local overrule_code <const> = rulecodes.over
- local underrule_code <const> = rulecodes.under
- local fractionrule_code <const> = rulecodes.fraction
- local radicalrule_code <const> = rulecodes.radical
- local outlinerule_code <const> = rulecodes.outline
+ local getwhd = nuts.getwhd
+ local flushlist = nuts.flush_list
+ local getdata = nuts.getdata
- local rule_callback = callbacks.functions.process_rule
+ local normalrule_code = rulecodes.normal
+ local boxrule_code = rulecodes.box
+ local imagerule_code = rulecodes.image
+ local emptyrule_code = rulecodes.empty
+ local userrule_code = rulecodes.user
+ local overrule_code = rulecodes.over
+ local underrule_code = rulecodes.under
+ local fractionrule_code = rulecodes.fraction
+ local radicalrule_code = rulecodes.radical
+ local outlinerule_code = rulecodes.outline
+
+ local processrule = nodes.rules.process
local f_fm = formatters["/Fm%d Do"]
local f_im = formatters["/Im%d Do"]
local f_gr = formatters["/Gp%d Do"]
- local s_b <const> = "q"
- local s_e <const> = "Q"
+ local s_b = "q"
+ local s_e = "Q"
+
+ local f_v = formatters["[] 0 d 0 J %.6N w 0 0 m %.6N 0 l S"]
+ local f_h = formatters["[] 0 d 0 J %.6N w 0 0 m 0 %.6N l S"]
- local f_v = formatters["[] 0 d 0 J %.6N w 0 0 m %.6N 0 l S"]
- local f_h = formatters["[] 0 d 0 J %.6N w 0 0 m 0 %.6N l S"]
+ local f_f = formatters["0 0 %.6N %.6N re f"]
+ local f_o = formatters["[] 0 d 0 J 0 0 %.6N %.6N re S"]
+ local f_w = formatters["[] 0 d 0 J %.6N w 0 0 %.6N %.6N re S"]
- local f_f = formatters["0 0 %.6N %.6N re f"]
- local f_o = formatters["[] 0 d 0 J 0 0 %.6N %.6N re S"]
- local f_w = formatters["[] 0 d 0 J %.6N w 0 0 %.6N %.6N re S"]
+ local f_b = formatters["%.6N w 0 %.6N %.6N %.6N re f"]
+ local f_x = formatters["[] 0 d 0 J %.6N w %.6N %.6N %.6N %.6N re S"]
+ local f_y = formatters["[] 0 d 0 J %.6N w %.6N %.6N %.6N %.6N re S %.6N 0 m %.6N 0 l S"]
-- Historically the index is an object which is kind of bad.
@@ -919,9 +1019,7 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
end
end
- updaters.register("backend.update.pdf",function()
- pdf.getxformname = getxformname
- end)
+ lpdf.getxformname = getxformname
local function saveboxresource(box,attributes,resources,immediate,kind,margin)
n = n + 1
@@ -989,7 +1087,8 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
end
end
- updaters.register("backend.update.tex",function()
+ -- updaters.register("backend.update.tex",function()
+ updaters.register("backend.update.lpdf",function()
tex.saveboxresource = saveboxresource
tex.useboxresource = useboxresource
tex.getboxresourcedimensions = getboxresourcedimensions
@@ -1036,17 +1135,16 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
-- place image also used in vf but we can use a different one if we need it
- local imagetypes = images.types -- pdf png jpg jp2 jbig2 stream memstream
+ local imagetypes = images.types -- pdf png jpg jp2 jbig2 stream
local img_none = imagetypes.none
local img_pdf = imagetypes.pdf
local img_stream = imagetypes.stream
- local img_memstream = imagetypes.memstream
- local one_bp <const> = 65536 * bpfactor
+ local one_bp = 65536 * bpfactor
local imageresources, n = { }, 0
- getximagename = function(index)
+ getximagename = function(index) -- not used
local l = imageresources[index]
if l then
return l.name
@@ -1055,10 +1153,6 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
end
end
- updaters.register("backend.update.pdf",function()
- pdf.getximagename = getximagename
- end)
-
-- Groups are flushed immediately but we can decide to make them into a
-- specific whatsit ... but not now. We could hash them if needed when
-- we use lot sof them in mp ... but not now.
@@ -1067,7 +1161,7 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
local groups = 0
local group = nil
- flushgroup = function(content,bbox)
+ local flushgroup = function(content,bbox)
if not group then
group = pdfdictionary {
Type = pdfconstant("Group"),
@@ -1088,10 +1182,17 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
return f_gr(groups)
end
+ flushers.group = flushgroup
lpdf.flushgroup = flushgroup -- todo: access via driver in mlib-pps
-- end of experiment
+ local pdfincludeimage
+
+ updaters.register("backend.update.lpdf",function()
+ pdfincludeimage = lpdf.includeimage
+ end)
+
local function flushpdfximage(current,pos_h,pos_v,pos_r,size_h,size_v)
local width,
@@ -1118,7 +1219,7 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
-- tricky: xsize and ysize swapped
- if kind == img_pdf or kind == img_stream or kind == img_memstream then
+ if kind == img_pdf or kind == img_stream then
rx, ry, tx, ty = 1/xsize, 1/ysize, xorigin/xsize, yorigin/ysize
else
-- if kind == img_png then
@@ -1233,10 +1334,16 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
b = b + 1 ; buffer[b] = s_e
end
+ flushers.image = flushimage
+
-- For the moment we need this hack because the engine checks the 'image'
-- command in virtual fonts (so we use lua instead).
+ --
+ -- These will be replaced by a new more advanced one ... some day ... or
+ -- never because the next are like the other engines and compensate for
+ -- small sizes which is needed for inaccurate viewers.
- flushrule = function(current,pos_h,pos_v,pos_r,size_h,size_v,subtype)
+ flushers.rule = function(current,pos_h,pos_v,pos_r,size_h,size_v,subtype)
if subtype == emptyrule_code then
return
@@ -1249,7 +1356,7 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
pdf_goto_pagemode()
b = b + 1 ; buffer[b] = s_b
pdf_set_pos_temp(pos_h,pos_v)
- rule_callback(current,size_h,size_v,pos_r) -- so we pass direction
+ processrule(current,size_h,size_v,pos_r) -- so we pass direction
b = b + 1 ; buffer[b] = s_e
return
end
@@ -1292,7 +1399,7 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
end
- flushsimplerule = function(pos_h,pos_v,pos_r,size_h,size_v)
+ flushers.simplerule = function(pos_h,pos_v,pos_r,size_h,size_v)
pdf_goto_pagemode()
b = b + 1 ; buffer[b] = s_b
@@ -1316,6 +1423,37 @@ local flushrule, flushsimplerule, flushimage, flushgroup do
b = b + 1 ; buffer[b] = s_e
end
+ flushers.specialrule = function(pos_h,pos_v,pos_r,width,height,depth,line,outline,baseline)
+ pdf_goto_pagemode()
+
+ b = b + 1 ; buffer[b] = s_b
+
+ local width = bpfactor * width
+ local height = bpfactor * height
+ local depth = bpfactor * depth
+ local total = height + depth
+ local line = bpfactor * line
+ local half = line / 2
+ local rule
+
+ if outline then
+ local d = -depth + half
+ local w = width - line
+ local t = total - line
+ if baseline then
+ rule = f_y(line,half,d,w,t,half,w)
+ else
+ rule = f_x(line,half,d,w,t)
+ end
+ else
+ rule = f_b(line,-depth,width,total)
+ end
+ pdf_set_pos_temp(pos_h,pos_v)
+
+ b = b + 1 ; buffer[b] = rule
+ b = b + 1 ; buffer[b] = s_e
+ end
+
end
--- basics
@@ -1575,7 +1713,7 @@ local finalize do
if next(usedfonts) then
fonts = pdfdictionary { }
for k, v in next, usedfonts do
- fonts[f_font(v)] = pdfreference(pdfgetfontobjnumber(k)) -- we can overload for testing
+ fonts[f_font(v)] = pdfreference(pdfgetfontobjectnumber(k)) -- we can overload for testing
end
end
@@ -1585,7 +1723,6 @@ local finalize do
if next(usedxforms) or next(usedximages) or next(usedxgroups) then
xforms = pdfdictionary { }
for k in sortedhash(usedxforms) do
- -- xforms[f_form(k)] = pdfreference(k)
xforms[f_form(getxformname(k))] = pdfreference(k)
end
for k, v in sortedhash(usedximages) do
@@ -1612,26 +1749,21 @@ local finalize do
pageresources.XObject = xforms
pageresources.ProcSet = lpdf.procset()
- local xorigin, yorigin, relocated = backends.codeinjections.getpageorigin() -- for now here
-
local bbox = pdfarray {
- (boundingbox[1] + xorigin) * bpfactor,
- (boundingbox[2] + yorigin) * bpfactor,
- (boundingbox[3] + xorigin) * bpfactor,
- (boundingbox[4] + yorigin) * bpfactor,
+ boundingbox[1] * bpfactor,
+ boundingbox[2] * bpfactor,
+ boundingbox[3] * bpfactor,
+ boundingbox[4] * bpfactor,
}
- if relocated then
- content = formatters["1 0 0 1 %.6N %.6N cm\n%s"](bbox[1],bbox[2],content)
- end
-
local contentsobj = pdfflushstreamobject(content,false,false)
pageattributes.Type = pdf_page
pageattributes.Contents = pdfreference(contentsobj)
pageattributes.Resources = pageresources
-- pageattributes.Resources = pdfreference(pdfflushobject(pageresources))
- pageattributes.MediaBox = bbox
+ -- pageattributes.MediaBox = bbox
+ pageattributes.MediaBox = pdfsharedobject(bbox)
pageattributes.Parent = nil -- precalculate
pageattributes.Group = nil -- todo
@@ -1641,11 +1773,15 @@ local finalize do
lpdf.finalizepage(true)
- if relocated then
- if pageattributes.TrimBox then pageattributes.TrimBox = box end
- if pageattributes.CropBox then pageattributes.CropBox = box end
- if pageattributes.BleedBox then pageattributes.BleedBox = box end
- end
+ local TrimBox = pageattributes.TrimBox
+ local CropBox = pageattributes.CropBox
+ local BleedBox = pageattributes.BleedBox
+
+ -- Indirect objects don't work in all viewers.
+
+ if TrimBox then pageattributes.TrimBox = pdfsharedobject(TrimBox ) end
+ if CropBox then pageattributes.CropBox = pdfsharedobject(CropBox ) end
+ if BleedBox then pageattributes.BleedBox = pdfsharedobject(BleedBox) end
else
@@ -1681,6 +1817,7 @@ local finalize do
}
end
if xformtype == 0 or xformtype == 2 or xformtype == 3 then
+ -- can be shared too
wrapper.Matrix = pdfarray { 1, 0, 0, 1, 0, 0 }
end
@@ -1703,7 +1840,6 @@ local finalize do
wrapper.Resources = next(boxresources) and boxresources or nil
wrapper.ProcSet = lpdf.procset()
- -- pdfflushstreamobject(content,wrapper,false,objectnumber)
pdfflushstreamobject(content,wrapper,false,specification.objnum)
end
@@ -1730,15 +1866,6 @@ local finalize do
end
-updaters.register("backend.update.pdf",function()
- job.positions.registerhandlers {
- getpos = drivers.getpos,
- getrpos = drivers.getrpos,
- gethpos = drivers.gethpos,
- getvpos = drivers.getvpos,
- }
-end)
-
updaters.register("backend.update",function()
local saveboxresource = tex.boxresources.save
--
@@ -1791,50 +1918,56 @@ local f_stream_b_d_u = formatters["%i 0 obj\010<< %s /Length %i >>\010stream\010
local f_stream_b_d_c = formatters["%i 0 obj\010<< %s /Filter /FlateDecode /Length %i >>\010stream\010"]
local f_stream_b_d_r = formatters["%i 0 obj\010<< %s >>\010stream\010"]
------ s_object_e <const> = "\010endobj\010"
-local s_stream_e <const> = "\010endstream\010endobj\010"
+----- s_object_e = "\010endobj\010"
+local s_stream_e = "\010endstream\010endobj\010"
do
- local function setinfo() end -- we get it
- local function setcatalog() end -- we get it
+ -- Versions can be set but normally are managed by the official standards. When possible
+ -- reading and writing should look at these values.
- local function settrailerid(v)
- trailerid = v or false
+ function lpdf.setversion(major,minor)
+ majorversion = tonumber(major) or majorversion
+ minorversion = tonumber(minor) or minorversion
end
- local function setmajorversion(v) majorversion = tonumber(v) or majorversion end
- local function setminorversion(v) minorversion = tonumber(v) or minorversion end
+ function lpdf.getversion(major,minor)
+ return majorversion, minorversion
+ end
- local function getmajorversion(v) return majorversion end
- local function getminorversion(v) return minorversion end
+ function lpdf.majorversion() return majorversion end
+ function lpdf.minorversion() return minorversion end
- local function setcompresslevel (v) compress = v and v ~= 0 and true or false end
- local function setobjcompresslevel(v) objectstream = v and v ~= 0 and true or false end
+ -- It makes no sense to support levels so we only enable and disable and stick to level 3
+ -- which is both fast and efficient.
- local function getcompresslevel (v) return compress and 3 or 0 end
- local function getobjcompresslevel(v) return objectstream and 1 or 0 end
+ local frozen = false
+ local clevel = 3
+ local olevel = 1
- local function setpageresources () end -- needs to be sorted out
- local function setpageattributes () end
- local function setpagesattributes() end
+ function lpdf.setcompression(level,objectlevel,freeze)
+ if not frozen then
+ compress = level and level ~= 0 and true or false
+ objectstream = objectlevel and objectlevel ~= 0 and true or false
+ frozen = freeze
+ end
+ end
- updaters.register("backend.update.pdf",function()
- pdf.setinfo = setinfo
- pdf.setcatalog = setcatalog
- pdf.settrailerid = settrailerid
- pdf.setmajorversion = setmajorversion
- pdf.setminorversion = setminorversion
- pdf.getmajorversion = getmajorversion
- pdf.getminorversion = getminorversion
- pdf.setcompresslevel = setcompresslevel
- pdf.setobjcompresslevel = setobjcompresslevel
- pdf.getcompresslevel = getcompresslevel
- pdf.getobjcompresslevel = getobjcompresslevel
- pdf.setpageresources = setpageresources
- pdf.setpageattributes = setpageattributes
- pdf.setpagesattributes = setpagesattributes
- end)
+ function lpdf.getcompression()
+ return compress and olevel or 0, objectstream and clevel or 0
+ end
+
+ function lpdf.compresslevel()
+ return compress and olevel or 0
+ end
+
+ function lpdf.objectcompresslevel()
+ return objectstream and clevel or 0
+ end
+
+ if environment.arguments.nocompression then
+ lpdf.setcompression(0,0,true)
+ end
end
@@ -1845,8 +1978,8 @@ local addtocache, flushcache, cache do
local coffset = 0
local indices = { }
- local maxsize <const> = 32 * 1024 -- uncompressed
- local maxcount <const> = 0xFF
+ local maxsize = 32 * 1024 -- uncompressed
+ local maxcount = 0xFF
addtocache = function(n,str)
local size = #str
@@ -1912,26 +2045,174 @@ local addtocache, flushcache, cache do
end
-local function pdfreserveobj()
- nofobjects = nofobjects + 1
- objects[nofobjects] = false
- return nofobjects
+do
+
+ local names = { }
+ local cache = { }
+ local nofpages = 0
+
+ local texgetcount = tex.getcount
+
+ function lpdf.reserveobject(name)
+ nofobjects = nofobjects + 1
+ objects[nofobjects] = false
+ if name then
+ names[name] = nofobjects
+ if trace_objects then
+ report_objects("reserving number %a under name %a",nofobjects,name)
+ end
+ elseif trace_objects then
+ report_objects("reserving number %a",nofobjects)
+ end
+ return nofobjects
+ end
+
+ function lpdf.pagereference(n,complete) -- true | false | nil | n [true,false]
+ if nofpages == 0 then
+ nofpages = structures.pages.nofpages
+ if nofpages == 0 then
+ nofpages = 1
+ end
+ end
+ if n == true or not n then
+ complete = n
+ n = texgetcount("realpageno")
+ end
+ local r = n > nofpages and pdfgetpagereference(nofpages) or pdfgetpagereference(n)
+ return complete and pdfreference(r) or r
+ end
+
+ function lpdf.nofpages()
+ return structures.pages.nofpages
+ end
+
+ function lpdf.object(...)
+ pdfdeferredobject(...)
+ end
+
+ function lpdf.delayedobject(data,n)
+ if n then
+ pdfdeferredobject(n,data)
+ else
+ n = pdfdeferredobject(data)
+ end
+-- pdfreferenceobject(n)
+ return n
+ end
+
+ function lpdf.flushobject(name,data)
+ if data then
+ local named = names[name]
+ if named then
+ if not trace_objects then
+ elseif trace_details then
+ report_objects("flushing data to reserved object with name %a, data: %S",name,data)
+ else
+ report_objects("flushing data to reserved object with name %a",name)
+ end
+ return pdfimmediateobject(named,tostring(data))
+ else
+ if not trace_objects then
+ elseif trace_details then
+ report_objects("flushing data to reserved object with number %s, data: %S",name,data)
+ else
+ report_objects("flushing data to reserved object with number %s",name)
+ end
+ return pdfimmediateobject(name,tostring(data))
+ end
+ else
+ if trace_objects and trace_details then
+ report_objects("flushing data: %S",name)
+ end
+ return pdfimmediateobject(tostring(name))
+ end
+ end
+
+ function lpdf.flushstreamobject(data,dict,compressed,objnum) -- default compressed
+ if trace_objects then
+ report_objects("flushing stream object of %s bytes",#data)
+ end
+ local dtype = type(dict)
+ local kind = compressed == "raw" and "raw" or "stream"
+ local nolength = nil
+ if compressed == "raw" then
+ compressed = nil
+ nolength = true
+ -- data = string.formatters["<< %s >>stream\n%s\nendstream"](attr,data)
+ end
+ return pdfdeferredobject {
+ objnum = objnum,
+ immediate = true,
+ nolength = nolength,
+ compresslevel = compressed == false and 0 or nil,
+ type = "stream",
+ string = data,
+ attr = (dtype == "string" and dict) or (dtype == "table" and dict()) or nil,
+ }
+ end
+
+ function lpdf.flushstreamfileobject(filename,dict,compressed,objnum) -- default compressed
+ if trace_objects then
+ report_objects("flushing stream file object %a",filename)
+ end
+ local dtype = type(dict)
+ return pdfdeferredobject {
+ objnum = objnum,
+ immediate = true,
+ compresslevel = compressed == false and 0 or nil,
+ type = "stream",
+ file = filename,
+ attr = (dtype == "string" and dict) or (dtype == "table" and dict()) or nil,
+ }
+ end
+
+ local shareobjectcache, shareobjectreferencecache = { }, { }
+
+ function lpdf.shareobject(content)
+ if content == nil then
+ -- invalid object not created
+ else
+ content = tostring(content)
+ local o = shareobjectcache[content]
+ if not o then
+ o = pdfimmediateobject(content)
+ shareobjectcache[content] = o
+ end
+ return o
+ end
+ end
+
+ function lpdf.shareobjectreference(content)
+ if content == nil then
+ -- invalid object not created
+ else
+ content = tostring(content)
+ local r = shareobjectreferencecache[content]
+ if not r then
+ local o = shareobjectcache[content]
+ if not o then
+ o = pdfimmediateobject(content)
+ shareobjectcache[content] = o
+ end
+ r = pdfreference(o)
+ shareobjectreferencecache[content] = r
+ end
+ return r
+ end
+ end
+
end
local pages = table.setmetatableindex(function(t,k)
- local v = pdfreserveobj()
+ local v = pdfreserveobject()
t[k] = v
return v
end)
-local function getpageref(n)
+function lpdf.getpagereference(n)
return pages[n]
end
-local function refobj()
- -- not needed, as we have auto-delay
-end
-
local function flushnormalobj(data,n)
if not n then
nofobjects = nofobjects + 1
@@ -2031,24 +2312,7 @@ flushdeferred = function() -- was forward defined
end
end
--- n = pdf.obj([n,] objtext)
--- n = pdf.obj([n,] "file", filename)
--- n = pdf.obj([n,] "stream", streamtext [, attrtext])
--- n = pdf.obj([n,] "streamfile", filename [, attrtext])
---
--- n = pdf.obj {
--- type = <string>, -- raw|stream
--- immediate = <boolean>,
--- objnum = <number>,
--- attr = <string>,
--- compresslevel = <number>,
--- objcompression = <boolean>,
--- file = <string>,
--- string = <string>,
--- nolength = <boolean>,
--- }
-
-local function obj(a,b,c,d)
+function lpdf.immediateobject(a,b,c,d)
local kind --, immediate
local objnum, data, attr, filename
local compresslevel, objcompression, nolength
@@ -2120,15 +2384,7 @@ local function obj(a,b,c,d)
return objnum
end
-updaters.register("backend.update.pdf",function()
- pdf.reserveobj = pdfreserveobj
- pdf.getpageref = getpageref
- pdf.refobj = refobj
- pdf.flushstreamobj = flushstreamobj
- pdf.flushnormalobj = flushnormalobj
- pdf.obj = obj
- pdf.immediateobj = obj
-end)
+lpdf.deferredobject = lpdf.immediateobject
-- In lua 5.4 the methods are now moved one metalevel deeper so we need to get them
-- from mt.__index instead. (I did get that at first.) It makes for a slightly (imo)
@@ -2145,7 +2401,7 @@ local openfile, closefile do
local f_link = formatters["%010i 00000 f\013\010"]
local f_first = formatters["%010i 65535 f\013\010"]
- local f_pdf = formatters["%%PDF-%i.%i\010"]
+ local f_pdf_tag = formatters["%%PDF-%i.%i\010"]
local f_xref = formatters["xref\0100 %i\010"]
local f_trailer_id = formatters["trailer\010<< %s /ID [ <%s> <%s> ] >>\010startxref\010%i\010%%%%EOF"]
local f_trailer_no = formatters["trailer\010<< %s >>\010startxref\010%i\010%%%%EOF"]
@@ -2153,6 +2409,9 @@ local openfile, closefile do
local inmemory = false
local close = false
+ local update = false
+
+ -- local removefile = os.remove
openfile = function(filename)
if inmemory then
@@ -2160,12 +2419,16 @@ local openfile, closefile do
f = { }
flush = function(f,s)
n = n + 1 f[n] = s
+ -- offset = offset + #s
end
close = function(f)
f = concat(f)
io.savedata(filename,f)
f = false
end
+ update = function(f,s)
+ f[1] = s
+ end
-- local n = 0
-- f = {
-- write = function(self,s)
@@ -2187,32 +2450,38 @@ local openfile, closefile do
local m = getmetatable(f)
flush = m.write or m.__index.write
close = m.close or m.__index.close
+ update = function(f,s)
+ f:seek("set",0)
+ f:write(s)
+ end
end
- local v = f_pdf(majorversion,minorversion)
+ local v = f_pdf_tag(majorversion,minorversion)
-- local b = "%\xCC\xD5\xC1\xD4\xC5\xD8\xD0\xC4\xC6\010" -- LUATEXPDF (+128)
local b = "%\xC3\xCF\xCE\xD4\xC5\xD8\xD4\xD0\xC4\xC6\010" -- CONTEXTPDF (+128)
flush(f,v)
flush(f,b)
- offset = #v + #b
+ offset = offset + #v + #b
end
closefile = function(abort)
if abort then
- f:close()
- f = io.open(abort,"wb")
- if f then
- local name = resolvers.findfile("context-lmtx-error.pdf")
- if name then
- local data = io.loaddata(name)
- if data then
- f:write(data)
- f:close()
- return
+ close(f)
+ if not environment.arguments.nodummy then
+ f = io.open(abort,"wb")
+ if f then
+ local name = resolvers.findfile("context-lmtx-error.pdf")
+ if name then
+ local data = io.loaddata(name)
+ if data then
+ f:write(data)
+ f:close()
+ return
+ end
end
+ f:close()
end
- f:close()
- removefile(abort)
end
+ os.remove(abort)
else
local xrefoffset = offset
local lastfree = 0
@@ -2220,9 +2489,9 @@ local openfile, closefile do
local catalog = lpdf.getcatalog()
local info = lpdf.getinfo()
if trailerid == true then
- trailerid = md5HEX(osuuid())
+ trailerid = md5.HEX(osuuid())
elseif trailerid and #trailerid > 32 then
- trailerid = md5HEX(trailerid)
+ trailerid = md5.HEX(trailerid)
else
trailerid = false
end
@@ -2395,7 +2664,8 @@ local openfile, closefile do
flush(f,f_trailer_no(trailer(),xrefoffset))
end
end
- f:close()
+ update(f,f_pdf_tag(majorversion,minorversion))
+ close(f)
end
io.flush()
closefile = function() end
@@ -2406,7 +2676,7 @@ end
-- For the moment we overload it here, although back-fil.lua eventually will
-- be merged with back-pdf as it's pdf specific, or maybe back-imp-pdf or so.
-updaters.register("backend.update.pdf",function()
+do -- updaters.register("backend.update.pdf",function()
-- We overload img but at some point it will even go away, so we just
-- reimplement what we need in context. This will change completely i.e.
@@ -2414,7 +2684,7 @@ updaters.register("backend.update.pdf",function()
local codeinjections = backends.pdf.codeinjections
- local imagetypes = images.types -- pdf png jpg jp2 jbig2 stream memstream
+ local imagetypes = images.types -- pdf png jpg jp2 jbig2 stream
local img_none = imagetypes.none
local rulecodes = nodes.rulecodes
@@ -2426,8 +2696,8 @@ updaters.register("backend.update.pdf",function()
local lastindex = 0
local indices = { }
- local bpfactor <const> = number.dimenfactors.bp
- local imagerule_code <const> = rulecodes.image
+ local bpfactor = number.dimenfactors.bp
+ local imagerule_code = rulecodes.image
function codeinjections.newimage(specification)
return specification
@@ -2526,7 +2796,7 @@ updaters.register("backend.update.pdf",function()
return n
end
- function pdf.includeimage(index)
+ function lpdf.includeimage(index)
local specification = indices[index]
if specification then
local bbox = specification.bbox
@@ -2535,7 +2805,7 @@ updaters.register("backend.update.pdf",function()
local xsize = bbox[3] - xorigin -- we need the original ones, not the 'rotated' ones
local ysize = bbox[4] - yorigin -- we need the original ones, not the 'rotated' ones
local transform = specification.transform or 0
- local objnum = specification.objnum or pdfreserveobj()
+ local objnum = specification.objnum or pdfreserveobject()
local groupref = nil
local kind = specification.kind or specification.type or img_none -- determines scaling type
return
@@ -2548,19 +2818,28 @@ updaters.register("backend.update.pdf",function()
end
end
-end)
+end -- )
-updaters.register("backend.update.lpdf",function()
+do -- updaters.register("backend.update.lpdf",function()
-- todo: an md5 or sha2 hash can save space
-- todo: make a type 3 font instead
-- todo: move to lpdf namespace
- local pdfimage = lpdf.epdf.image
- local newpdf = pdfimage.new
- local openpdf = pdfimage.open
- local closepdf = pdfimage.close
- local copypage = pdfimage.copy
+ local pdfimage
+ local newpdf
+ local openpdf
+ local closepdf
+ local copypage
+
+
+ updaters.register("backend.update.lpdf",function()
+ pdfimage = lpdf.epdf.image
+ newpdf = pdfimage.new
+ openpdf = pdfimage.open
+ closepdf = pdfimage.close
+ copypage = pdfimage.copy
+ end)
local embedimage = images.embed
@@ -2591,7 +2870,6 @@ updaters.register("backend.update.lpdf",function()
index = image.index
topdf[id] = index
end
- -- pdf.print or pdf.literal
flushimage(index,wd,ht,dp,pos_h,pos_v)
end
@@ -2629,7 +2907,7 @@ updaters.register("backend.update.lpdf",function()
flushimage(index,wd,ht,dp,pos_h,pos_v)
end
- local function pdfvfimage(wd,ht,dp,data,name)
+ function lpdf.pdfvfimage(wd,ht,dp,data,name)
if type(data) == "number" then
return { "lua", function(font,char,pos_h,pos_v)
vfimage_n(name,data,wd,ht,dp,pos_h,pos_v)
@@ -2642,18 +2920,12 @@ updaters.register("backend.update.lpdf",function()
end
end
- lpdf.vfimage = pdfvfimage
-
-end)
+end -- )
-- The driver.
do
- local isfile = lfs.isfile
- local removefile = os.remove
- local renamefile = os.rename
- -- local copyfile = file.copy
-- local addsuffix = file.addsuffix
local texgetbox = tex.getbox
@@ -2670,19 +2942,15 @@ do
local function prepare(driver)
if not environment.initex then
-- install new functions in pdf namespace
- updaters.apply("backend.update.pdf")
+-- updaters.apply("backend.update.pdf")
-- install new functions in lpdf namespace
updaters.apply("backend.update.lpdf")
-- adapt existing shortcuts to lpdf namespace
- updaters.apply("backend.update.tex")
- -- adapt existing shortcuts to tex namespace
+-- updaters.apply("backend.update.tex")
+-- -- adapt existing shortcuts to tex namespace
updaters.apply("backend.update")
--
- -- if rawget(pdf,"setforcefile") then
- -- pdf.setforcefile(false) -- default anyway
- -- end
- --
- pdfname = file.addsuffix(tex.jobname,"pdf")
+ pdfname = tex.jobname .. ".pdf"
openfile(pdfname)
--
luatex.registerstopactions(1,function()
@@ -2700,10 +2968,12 @@ do
-- --
lpdf.registerdocumentfinalizer(wrapup,nil,"wrapping up")
--
+ statistics.register("result saved in file", function()
+ local outputfilename = environment.outputfilename or environment.jobname or tex.jobname or "<unset>"
+ return string.format("%s.%s, compresslevel %s, objectcompresslevel %s",outputfilename,"pdf",lpdf.getcompression())
+ end)
+ --
end
- --
- environment.lmtxmode = CONTEXTLMTXMODE
- --
converter = drivers.converters.lmtx
useddriver = driver
end
@@ -2732,23 +3002,7 @@ do
drivers.install {
name = "pdf",
- flushers = {
- character = flushcharacter,
- fontchar = flushfontchar,
- rule = flushrule,
- simplerule = flushsimplerule,
- pushorientation = pushorientation,
- poporientation = poporientation,
- --
- literal = flushliteral,
- setmatrix = flushsetmatrix,
- save = flushsave,
- restore = flushrestore,
- image = flushimage,
- group = flushgroup,
- --
- updatefontstate = updatefontstate,
- },
+ flushers = flushers,
actions = {
prepare = prepare,
wrapup = wrapup,
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-mis.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-mis.lmt
new file mode 100644
index 00000000000..afb149d8af7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-mis.lmt
@@ -0,0 +1,639 @@
+if not modules then modules = { } end modules ['lpdf-mis'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Although we moved most pdf handling to the lua end, we didn't change
+-- the overall approach. For instance we share all resources i.e. we
+-- don't make subsets for each xform or page. The current approach is
+-- quite efficient. A big difference between MkII and MkIV is that we
+-- now use forward references. In this respect the MkII code shows that
+-- it evolved over a long period, when backends didn't provide forward
+-- referencing and references had to be tracked in multiple passes. Of
+-- course there are a couple of more changes.
+
+local next, tostring, type = next, tostring, type
+local format, gsub, formatters = string.format, string.gsub, string.formatters
+local concat, flattened = table.concat, table.flattened
+local settings_to_array = utilities.parsers.settings_to_array
+
+local backends, lpdf, nodes = backends, lpdf, nodes
+
+local nodeinjections = backends.pdf.nodeinjections
+local codeinjections = backends.pdf.codeinjections
+local registrations = backends.pdf.registrations
+
+local getpagedimensions = layouts.getpagedimensions
+local getcanvas = layouts.getcanvas
+
+local nuts = nodes.nuts
+local copy_node = nuts.copy
+
+local nodepool = nuts.pool
+local setstate = nodepool.setstate
+local register = nodepool.register
+
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfconstant = lpdf.constant
+local pdfreference = lpdf.reference
+local pdfunicode = lpdf.unicode
+local pdfverbose = lpdf.verbose
+local pdfstring = lpdf.string
+local pdfaction = lpdf.action
+
+local pdfflushobject
+local pdfflushstreamobject
+local pdfminorversion
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+ pdfflushstreamobject = lpdf.flushstreamobject
+ pdfminorversion = lpdf.minorversion
+end)
+
+local formattedtimestamp = lpdf.pdftimestamp
+local adddocumentextgstate = lpdf.adddocumentextgstate
+local addtocatalog = lpdf.addtocatalog
+local addtoinfo = lpdf.addtoinfo
+local addtopageattributes = lpdf.addtopageattributes
+local addtonames = lpdf.addtonames
+
+local pdfgetmetadata = lpdf.getmetadata
+
+local texset = tex.set
+
+local variables = interfaces.variables
+
+local v_stop = variables.stop
+local v_none = variables.none
+local v_max = variables.max
+local v_bookmark = variables.bookmark
+local v_fit = variables.fit
+local v_doublesided = variables.doublesided
+local v_singlesided = variables.singlesided
+local v_default = variables.default
+local v_auto = variables.auto
+local v_fixed = variables.fixed
+local v_landscape = variables.landscape
+local v_portrait = variables.portrait
+local v_page = variables.page
+local v_paper = variables.paper
+local v_attachment = variables.attachment
+local v_layer = variables.layer
+local v_lefttoright = variables.lefttoright
+local v_righttoleft = variables.righttoleft
+local v_title = variables.title
+local v_nomenubar = variables.nomenubar
+
+local positive = register(setstate("/GSpositive gs"))
+local negative = register(setstate("/GSnegative gs"))
+local overprint = register(setstate("/GSoverprint gs"))
+local knockout = register(setstate("/GSknockout gs"))
+
+local omitextraboxes = false
+
+directives.register("backend.omitextraboxes", function(v) omitextraboxes = v end)
+
+local function initializenegative()
+ local a = pdfarray { 0, 1 }
+ local g = pdfconstant("ExtGState")
+ local d = pdfdictionary {
+ FunctionType = 4,
+ Range = a,
+ Domain = a,
+ }
+ local negative = pdfdictionary { Type = g, TR = pdfreference(pdfflushstreamobject("{ 1 exch sub }",d)) } -- can be shared
+ local positive = pdfdictionary { Type = g, TR = pdfconstant("Identity") }
+ adddocumentextgstate("GSnegative", pdfreference(pdfflushobject(negative)))
+ adddocumentextgstate("GSpositive", pdfreference(pdfflushobject(positive)))
+ initializenegative = nil
+end
+
+local function initializeoverprint()
+ local g = pdfconstant("ExtGState")
+ local knockout = pdfdictionary { Type = g, OP = false, OPM = 0 }
+ local overprint = pdfdictionary { Type = g, OP = true, OPM = 1 }
+ adddocumentextgstate("GSknockout", pdfreference(pdfflushobject(knockout)))
+ adddocumentextgstate("GSoverprint", pdfreference(pdfflushobject(overprint)))
+ initializeoverprint = nil
+end
+
+function nodeinjections.overprint()
+ if initializeoverprint then initializeoverprint() end
+ return copy_node(overprint)
+end
+function nodeinjections.knockout ()
+ if initializeoverprint then initializeoverprint() end
+ return copy_node(knockout)
+end
+
+function nodeinjections.positive()
+ if initializenegative then initializenegative() end
+ return copy_node(positive)
+end
+function nodeinjections.negative()
+ if initializenegative then initializenegative() end
+ return copy_node(negative)
+end
+
+-- function codeinjections.addtransparencygroup()
+-- -- png: /CS /DeviceRGB /I true
+-- local d = pdfdictionary {
+-- S = pdfconstant("Transparency"),
+-- I = true,
+-- K = true,
+-- }
+-- lpdf.registerpagefinalizer(function() addtopageattributes("Group",d) end) -- hm
+-- end
+
+-- actions (todo: store and update when changed)
+
+local openpage, closepage, opendocument, closedocument
+
+function codeinjections.registerdocumentopenaction(open)
+ opendocument = open
+end
+
+function codeinjections.registerdocumentcloseaction(close)
+ closedocument = close
+end
+
+function codeinjections.registerpageopenaction(open)
+ openpage = open
+end
+
+function codeinjections.registerpagecloseaction(close)
+ closepage = close
+end
+
+local function flushdocumentactions()
+ if opendocument then
+ addtocatalog("OpenAction",pdfaction(opendocument))
+ end
+ if closedocument then
+ addtocatalog("CloseAction",pdfaction(closedocument))
+ end
+end
+
+local function flushpageactions()
+ if openpage or closepage then
+ local d = pdfdictionary()
+ if openpage then
+ d.O = pdfaction(openpage)
+ end
+ if closepage then
+ d.C = pdfaction(closepage)
+ end
+ addtopageattributes("AA",d)
+ end
+end
+
+lpdf.registerpagefinalizer (flushpageactions, "page actions")
+lpdf.registerdocumentfinalizer(flushdocumentactions,"document actions")
+
+--- info : this can change and move elsewhere
+
+local identity = { }
+
+function codeinjections.setupidentity(specification)
+ for k, v in next, specification do
+ if v ~= "" then
+ identity[k] = v
+ end
+ end
+end
+
+function codeinjections.getidentityvariable(name)
+ return identity[name]
+end
+
+local done = false -- using "setupidentity = function() end" fails as the meaning is frozen in register
+
+local function setupidentity()
+ if not done then
+ local metadata = pdfgetmetadata()
+ local creator = metadata.creator
+ local version = metadata.contextversion
+ local time = metadata.time
+ local jobname = environment.jobname or tex.jobname or "unknown"
+ --
+ local title = identity.title
+ if not title or title == "" then
+ title = tex.jobname
+ end
+ addtoinfo("Title", pdfunicode(title), title)
+ local subtitle = identity.subtitle or ""
+ if subtitle ~= "" then
+ addtoinfo("Subject", pdfunicode(subtitle), subtitle)
+ end
+ local author = identity.author or ""
+ if author ~= "" then
+ addtoinfo("Author", pdfunicode(author), author) -- '/Author' in /Info, 'Creator' in XMP
+ end
+ addtoinfo("Creator", pdfunicode(creator), creator)
+ addtoinfo("CreationDate", pdfstring(formattedtimestamp(time)))
+ local date = identity.date or ""
+ local pdfdate = date and formattedtimestamp(date)
+ if pdfdate then
+ addtoinfo("ModDate", pdfstring(pdfdate), date)
+ else
+ -- users should enter the date in 2010-01-19T23:27:50+01:00 format
+ -- and if not provided that way we use the creation time instead
+ addtoinfo("ModDate", pdfstring(formattedtimestamp(time)),time)
+ end
+ local keywords = identity.keywords or ""
+ if keywords ~= "" then
+ keywords = concat(settings_to_array(keywords), " ")
+ addtoinfo("Keywords", pdfunicode(keywords), keywords)
+ end
+ local id = lpdf.id()
+ addtoinfo("ID", pdfstring(id), id) -- needed for pdf/x
+ --
+ 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.Support","contextgarden.net")
+ addtoinfo("TeX.Support","tug.org")
+ --
+ done = true
+ else
+ -- no need for a message
+ end
+end
+
+lpdf.registerpagefinalizer(setupidentity,"identity")
+
+-- or when we want to be able to set things after pag e1:
+--
+-- lpdf.registerdocumentfinalizer(setupidentity,1,"identity")
+
+local function flushjavascripts()
+ local t = interactions.javascripts.flushpreambles()
+ if #t > 0 then
+ local a = pdfarray()
+ local pdf_javascript = pdfconstant("JavaScript")
+ for i=1,#t do
+ local ti = t[i]
+ local name = ti[1]
+ local script = ti[2]
+ local j = pdfdictionary {
+ S = pdf_javascript,
+ JS = pdfreference(pdfflushstreamobject(script)),
+ }
+ a[#a+1] = pdfstring(name)
+ a[#a+1] = pdfreference(pdfflushobject(j))
+ end
+ addtonames("JavaScript",pdfreference(pdfflushobject(pdfdictionary{ Names = a })))
+ end
+end
+
+lpdf.registerdocumentfinalizer(flushjavascripts,"javascripts")
+
+-- -- --
+
+local plusspecs = {
+ [v_max] = {
+ mode = "FullScreen",
+ },
+ [v_bookmark] = {
+ mode = "UseOutlines",
+ },
+ [v_attachment] = {
+ mode = "UseAttachments",
+ },
+ [v_layer] = {
+ mode = "UseOC",
+ },
+ [v_fit] = {
+ fit = true,
+ },
+ [v_doublesided] = {
+ layout = "TwoColumnRight",
+ },
+ [v_fixed] = {
+ fixed = true,
+ },
+ [v_landscape] = {
+ duplex = "DuplexFlipShortEdge",
+ },
+ [v_portrait] = {
+ duplex = "DuplexFlipLongEdge",
+ },
+ [v_page] = {
+ duplex = "Simplex" ,
+ },
+ [v_paper] = {
+ paper = true,
+ },
+ [v_title] ={
+ title = true,
+ },
+ [v_lefttoright] ={
+ direction = "L2R",
+ },
+ [v_righttoleft] ={
+ direction = "R2L",
+ },
+ [v_nomenubar] ={
+ nomenubar = true,
+ },
+}
+
+local pagespecs = {
+ --
+ [v_max] = plusspecs[v_max],
+ [v_bookmark] = plusspecs[v_bookmark],
+ [v_attachment] = plusspecs[v_attachment],
+ [v_layer] = plusspecs[v_layer],
+ [v_lefttoright] = plusspecs[v_lefttoright],
+ [v_righttoleft] = plusspecs[v_righttoleft],
+ [v_title] = plusspecs[v_title],
+ --
+ [v_none] = {
+ },
+ [v_fit] = {
+ mode = "UseNone",
+ fit = true,
+ },
+ [v_doublesided] = {
+ mode = "UseNone",
+ layout = "TwoColumnRight",
+ fit = true,
+ },
+ [v_singlesided] = {
+ mode = "UseNone"
+ },
+ [v_default] = {
+ mode = "UseNone",
+ layout = "auto",
+ },
+ [v_auto] = {
+ mode = "UseNone",
+ layout = "auto",
+ },
+ [v_fixed] = {
+ mode = "UseNone",
+ layout = "auto",
+ fixed = true, -- noscale
+ },
+ [v_landscape] = {
+ mode = "UseNone",
+ layout = "auto",
+ fixed = true,
+ duplex = "DuplexFlipShortEdge",
+ },
+ [v_portrait] = {
+ mode = "UseNone",
+ layout = "auto",
+ fixed = true,
+ duplex = "DuplexFlipLongEdge",
+ },
+ [v_page] = {
+ mode = "UseNone",
+ layout = "auto",
+ fixed = true,
+ duplex = "Simplex",
+ },
+ [v_paper] = {
+ mode = "UseNone",
+ layout = "auto",
+ fixed = true,
+ duplex = "Simplex",
+ paper = true,
+ },
+ [v_nomenubar] = {
+ mode = "UseNone",
+ layout = "auto",
+ nomenubar = true,
+ },
+}
+
+local function documentspecification()
+ local canvas = getcanvas()
+
+ -- move this to layo-ini ?
+
+ local pagespec = canvas.pagespec
+ if not pagespec or pagespec == "" then
+ pagespec = v_default
+ end
+ local settings = settings_to_array(pagespec)
+ -- so the first one detemines the defaults
+ local first = settings[1]
+ local defaults = pagespecs[first]
+ local spec = defaults or pagespecs[v_default]
+ -- successive keys can modify this
+ if spec.layout == "auto" then
+ if canvas.doublesided then
+ local s = pagespecs[v_doublesided] -- to be checked voor interfaces
+ for k, v in next, s do
+ spec[k] = v
+ end
+ else
+ spec.layout = false
+ end
+ end
+ -- we start at 2 when we have a valid first default set
+ for i=defaults and 2 or 1,#settings do
+ local s = plusspecs[settings[i]]
+ if s then
+ for k, v in next, s do
+ spec[k] = v
+ end
+ end
+ end
+
+ -- maybe interfaces.variables
+ local layout = spec.layout
+ local mode = spec.mode
+ local fit = spec.fit
+ local fixed = spec.fixed
+ local duplex = spec.duplex
+ local paper = spec.paper
+ local title = spec.title
+ local direction = spec.direction
+ local nomenubar = spec.nomenubar
+ if layout then
+ addtocatalog("PageLayout",pdfconstant(layout))
+ end
+ if mode then
+ addtocatalog("PageMode",pdfconstant(mode))
+ end
+ local prints = nil
+ local marked = canvas.marked
+ local copies = canvas.copies
+ if marked then
+ local pages = structures.pages
+ local marked = pages.allmarked(marked)
+ local nofmarked = marked and #marked or 0
+ if nofmarked > 0 then
+ -- the spec is wrong in saying that numbering starts at 1 which of course makes
+ -- sense as most real documents start with page 0 .. sigh
+ for i=1,#marked do marked[i] = marked[i] - 1 end
+ prints = pdfarray(flattened(pages.toranges(marked)))
+ end
+ end
+ if fit or fixed or duplex or copies or paper or prints or title or direction or nomenubar then
+ addtocatalog("ViewerPreferences",pdfdictionary {
+ FitWindow = fit and true or nil,
+ PrintScaling = fixed and pdfconstant("None") or nil,
+ Duplex = duplex and pdfconstant(duplex) or nil,
+ NumCopies = copies and copies or nil,
+ PickTrayByPDFSize = paper and true or nil,
+ PrintPageRange = prints or nil,
+ DisplayDocTitle = title and true or nil,
+ Direction = direction and pdfconstant(direction) or nil,
+ HideMenubar = nomenubar and true or nil,
+ })
+ end
+ addtoinfo ("Trapped", pdfconstant("False")) -- '/Trapped' in /Info, 'Trapped' in XMP
+ addtocatalog("Version", pdfconstant(format("1.%s",pdfminorversion())))
+ addtocatalog("Lang", pdfstring(tokens.getters.macro("currentmainlanguage")))
+end
+
+-- temp hack: the mediabox is not under our control and has a precision of 5 digits
+
+local factor = number.dimenfactors.bp
+local f_value = formatters["%.6N"]
+
+local function boxvalue(n) -- we could share them
+ return pdfverbose(f_value(factor * n))
+end
+
+local function pagespecification()
+ local canvas = getcanvas()
+ local paperwidth = canvas.paperwidth
+ local paperheight = canvas.paperheight
+ local leftoffset = canvas.leftoffset
+ local topoffset = canvas.topoffset
+ --
+ local llx = leftoffset
+ local urx = canvas.width - leftoffset
+ local lly = paperheight + topoffset - canvas.height
+ local ury = paperheight - topoffset
+ -- boxes can be cached
+ local function extrabox(WhatBox,offset,always)
+ if offset ~= 0 or always then
+ addtopageattributes(WhatBox, pdfarray {
+ boxvalue(llx + offset),
+ boxvalue(lly + offset),
+ boxvalue(urx - offset),
+ boxvalue(ury - offset),
+ })
+ end
+ end
+ if omitextraboxes then
+ -- only useful for testing / comparing
+ else
+ extrabox("CropBox",canvas.cropoffset,true) -- mandate for rendering
+ extrabox("TrimBox",canvas.trimoffset,true) -- mandate for pdf/x
+ extrabox("BleedBox",canvas.bleedoffset) -- optional
+ -- extrabox("ArtBox",canvas.artoffset) -- optional .. unclear what this is meant to do
+ end
+end
+
+lpdf.registerpagefinalizer(pagespecification,"page specification")
+lpdf.registerdocumentfinalizer(documentspecification,"document specification")
+
+-- Page Label support ...
+--
+-- In principle we can also support /P (prefix) as we can just use the verbose form
+-- and we can then forget about the /St (start) as we don't care about those few
+-- extra bytes due to lack of collapsing. Anyhow, for that we need a stupid prefix
+-- variant and that's not on the agenda now.
+
+local map = {
+ numbers = "D",
+ Romannumerals = "R",
+ romannumerals = "r",
+ Characters = "A",
+ characters = "a",
+}
+
+-- local function featurecreep()
+-- local pages, lastconversion, list = structures.pages.tobesaved, nil, pdfarray()
+-- local getstructureset = structures.sets.get
+-- for i=1,#pages do
+-- local p = pages[i]
+-- if not p then
+-- return -- fatal error
+-- else
+-- local numberdata = p.numberdata
+-- if numberdata then
+-- local conversionset = numberdata.conversionset
+-- if conversionset then
+-- local conversion = getstructureset("structure:conversions",p.block,conversionset,1,"numbers")
+-- if conversion ~= lastconversion then
+-- lastconversion = conversion
+-- list[#list+1] = i - 1 -- pdf starts numbering at 0
+-- list[#list+1] = pdfdictionary { S = pdfconstant(map[conversion] or map.numbers) }
+-- end
+-- end
+-- end
+-- if not lastconversion then
+-- lastconversion = "numbers"
+-- list[#list+1] = i - 1 -- pdf starts numbering at 0
+-- list[#list+1] = pdfdictionary { S = pdfconstant(map.numbers) }
+-- end
+-- end
+-- end
+-- addtocatalog("PageLabels", pdfdictionary { Nums = list })
+-- end
+
+local function featurecreep()
+ local pages = structures.pages.tobesaved
+ local list = pdfarray()
+ local getset = structures.sets.get
+ local stopped = false
+ local oldlabel = nil
+ local olconversion = nil
+ for i=1,#pages do
+ local p = pages[i]
+ if not p then
+ return -- fatal error
+ end
+ local label = p.viewerprefix or ""
+ if p.status == v_stop then
+ if not stopped then
+ list[#list+1] = i - 1 -- pdf starts numbering at 0
+ list[#list+1] = pdfdictionary {
+ P = pdfunicode(label),
+ }
+ stopped = true
+ end
+ oldlabel = nil
+ oldconversion = nil
+ stopped = false
+ else
+ local numberdata = p.numberdata
+ local conversion = nil
+ local number = p.number
+ if numberdata then
+ local conversionset = numberdata.conversionset
+ if conversionset then
+ conversion = getset("structure:conversions",p.block,conversionset,1,"numbers")
+ end
+ end
+ conversion = conversion and map[conversion] or map.numbers
+ if number == 1 or oldlabel ~= label or oldconversion ~= conversion then
+ list[#list+1] = i - 1 -- pdf starts numbering at 0
+ list[#list+1] = pdfdictionary {
+ S = pdfconstant(conversion),
+ St = number,
+ P = label ~= "" and pdfunicode(label) or nil,
+ }
+ end
+ oldlabel = label
+ oldconversion = conversion
+ stopped = false
+ end
+ end
+ addtocatalog("PageLabels", pdfdictionary { Nums = list })
+end
+
+lpdf.registerdocumentfinalizer(featurecreep,"featurecreep")
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-mov.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-mov.lmt
new file mode 100644
index 00000000000..42ba6fb008f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-mov.lmt
@@ -0,0 +1,68 @@
+if not modules then modules = { } end modules ['lpdf-mov'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format = string.format
+
+local lpdf = lpdf
+local context = context
+
+local nodeinjections = backends.pdf.nodeinjections
+local pdfconstant = lpdf.constant
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfborder = lpdf.border
+local write_node = node.write
+
+function nodeinjections.insertmovie(specification)
+ -- managed in figure inclusion: width, height, factor, repeat, controls, preview, label, foundname
+ local width = specification.width
+ local height = specification.height
+ local factor = specification.factor or number.dimenfactors.bp
+ local moviedict = pdfdictionary {
+ F = specification.foundname,
+ Aspect = pdfarray { factor * width, factor * height },
+ Poster = (specification.preview and true) or false,
+ }
+ local controldict = pdfdictionary {
+ ShowControls = (specification.controls and true) or false,
+ Mode = (specification["repeat"] and pdfconstant("Repeat")) or nil,
+ }
+ local bs, bc = pdfborder()
+ local action = pdfdictionary {
+ Subtype = pdfconstant("Movie"),
+ Border = bs,
+ C = bc,
+ T = format("movie %s",specification.label),
+ Movie = moviedict,
+ A = controldict,
+ }
+ write_node(nodeinjections.annotation(width,height,0,action())) -- test: context(...)
+end
+
+function nodeinjections.insertsound(specification)
+ -- managed in interaction: repeat, label, foundname
+ local soundclip = interactions.soundclips.soundclip(specification.label)
+ if soundclip then
+ local controldict = pdfdictionary {
+ Mode = (specification["repeat"] and pdfconstant("Repeat")) or nil
+ }
+ local sounddict = pdfdictionary {
+ F = soundclip.filename
+ }
+ local bs, bc = pdfborder()
+ local action = pdfdictionary {
+ Subtype = pdfconstant("Movie"),
+ Border = bs,
+ C = bc,
+ T = format("sound %s",specification.label),
+ Movie = sounddict,
+ A = controldict,
+ }
+ write_node(nodeinjections.annotation(0,0,0,action())) -- test: context(...)
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt
new file mode 100644
index 00000000000..7fb14ada262
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-pde.lmt
@@ -0,0 +1,1211 @@
+if not modules then modules = { } end modules ['lpdf-epd'] = {
+ version = 1.001,
+ comment = "companion to lpdf-epa.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+ history = "this one replaces the poppler/pdfe binding",
+}
+
+-- \enabledirectives[graphics.pdf.uselua]
+-- \enabledirectives[graphics.pdf.recompress]
+-- \enabledirectives[graphics.pdf.stripmarked]
+
+-- maximum integer : +2^32
+-- maximum real : +2^15
+-- minimum real : 1/(2^16)
+
+-- get_flagged : does that still work
+
+-- ppdoc_permissions (ppdoc *pdf);
+
+-- PPSTRING_ENCODED 1 << 0
+-- PPSTRING_DECODED 1 << 1
+-- PPSTRING_EXEC 1 << 2 postscript only
+-- PPSTRING_PLAIN 0
+-- PPSTRING_BASE16 1 << 3
+-- PPSTRING_BASE85 1 << 4
+-- PPSTRING_UTF16BE 1 << 5
+-- PPSTRING_UTF16LE 1 << 6
+
+-- PPDOC_ALLOW_PRINT 1 << 2 printing
+-- PPDOC_ALLOW_MODIFY 1 << 3 filling form fields, signing, creating template pages
+-- PPDOC_ALLOW_COPY 1 << 4 copying, copying for accessibility
+-- PPDOC_ALLOW_ANNOTS 1 << 5 filling form fields, copying, signing
+-- PPDOC_ALLOW_EXTRACT 1 << 9 contents copying for accessibility
+-- PPDOC_ALLOW_ASSEMBLY 1 << 10 no effect
+-- PPDOC_ALLOW_PRINT_HIRES 1 << 11 no effect
+
+-- PPCRYPT_NONE 0 no encryption, go ahead
+-- PPCRYPT_DONE 1 encryption present but password succeeded, go ahead
+-- PPCRYPT_PASS -1 encryption present, need non-empty password
+-- PPCRYPT_FAIL -2 invalid or unsupported encryption (eg. undocumented in pdf spec)
+
+local setmetatable, type, next = setmetatable, type, next
+local tostring, tonumber, unpack = tostring, tonumber, unpack
+local char, byte, find = string.char, string.byte, string.find
+local abs = math.abs
+local concat, swapped, sortedhash, sortedkeys = table.concat, table.swapped, table.sortedhash, table.sortedkeys
+local utfchar = string.char
+local setmetatableindex = table.setmetatableindex
+local ioopen = io.open
+
+local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
+local P, C, S, R, Ct, Cc, V, Carg, Cs, Cf, Cg = lpeg.P, lpeg.C, lpeg.S, lpeg.R, lpeg.Ct, lpeg.Cc, lpeg.V, lpeg.Carg, lpeg.Cs, lpeg.Cf, lpeg.Cg
+
+if not lpdf then
+ require("lpdf-aux")
+end
+
+if not (number and number.dimenfactors) then
+ require("util-dim")
+end
+
+local pdfe = pdfe
+ lpdf = lpdf or { }
+local lpdf = lpdf
+local lpdf_epdf = { }
+ lpdf.epdf = lpdf_epdf
+
+local pdfopen = pdfe.open
+local pdfopenfile = pdfe.openfile
+local pdfnew = pdfe.new
+local pdfclose = pdfe.close
+
+local getcatalog = pdfe.getcatalog
+local getinfo = pdfe.getinfo
+local gettrailer = pdfe.gettrailer
+local getnofpages = pdfe.getnofpages
+local getversion = pdfe.getversion
+local getbox = pdfe.getbox
+local getstatus = pdfe.getstatus
+local unencrypt = pdfe.unencrypt
+
+local dictionarytotable = pdfe.dictionarytotable
+local arraytotable = pdfe.arraytotable
+local pagestotable = pdfe.pagestotable
+local readwholestream = pdfe.readwholestream
+
+local getfromreference = pdfe.getfromreference
+
+local report_epdf = logs.reporter("epdf")
+
+local allocate = utilities.storage.allocate
+
+local bpfactor = number.dimenfactors.bp
+
+local objectcodes = { [0] =
+ "none",
+ "null",
+ "bool",
+ "integer",
+ "number",
+ "name",
+ "string",
+ "array",
+ "dictionary",
+ "stream",
+ "reference",
+}
+
+local encryptioncodes = {
+ [0] = "notencrypted",
+ [1] = "unencrypted",
+ [-1] = "protected",
+ [-2] = "failure",
+}
+
+objectcodes = allocate(swapped(objectcodes,objectcodes))
+encryptioncodes = allocate(swapped(encryptioncodes,encryptioncodes))
+
+pdfe.objectcodes = objectcodes
+pdfe.encryptioncodes = encryptioncodes
+
+local null_object_code = objectcodes.null
+local reference_object_code = objectcodes.reference
+
+local none_object_code = objectcodes.none
+local null_object_code = objectcodes.null
+local bool_object_code = objectcodes.bool
+local integer_object_code = objectcodes.integer
+local number_object_code = objectcodes.number
+local name_object_code = objectcodes.name
+local string_object_code = objectcodes.string
+local array_object_code = objectcodes.array
+local dictionary_object_code = objectcodes.dictionary
+local stream_object_code = objectcodes.stream
+local reference_object_code = objectcodes.reference
+
+local checked_access
+local get_flagged -- from pdfe -> lpdf
+
+if lpdf.dictionary then
+
+ -- we're in context
+
+ local pdfdictionary = lpdf.dictionary
+ local pdfarray = lpdf.array
+ local pdfconstant = lpdf.constant
+ local pdfstring = lpdf.string
+ local pdfunicode = lpdf.unicode
+
+ get_flagged = function(t,f,k)
+ local tk = t[k] -- triggers resolve
+ local fk = f[k]
+ if not fk then
+ return tk
+ elseif fk == "name" then
+ return pdfconstant(tk)
+ elseif fk == "array" then
+ return pdfarray(tk)
+ elseif fk == "dictionary" then
+ return pdfarray(tk)
+ elseif fk == "rawtext" then
+ return pdfstring(tk)
+ elseif fk == "unicode" then
+ return pdfunicode(tk)
+ else
+ return tk
+ end
+ end
+
+else
+
+ get_flagged = function(t,f,k)
+ return t[k]
+ end
+
+end
+
+-- We need to convert the string from utf16 although there is no way to
+-- check if we have a regular string starting with a bom. So, we have
+-- na dilemma here: a pdf doc encoded string can be invalid utf.
+
+-- <hex encoded> : implicit 0 appended if odd
+-- (byte encoded) : \( \) \\ escaped
+--
+-- <FE><FF> : utf16be
+--
+-- \r \r \t \b \f \( \) \\ \NNN and \<newline> : append next line
+--
+-- the getString function gives back bytes so we don't need to worry about
+-- the hex aspect.
+
+local some_dictionary
+local some_array
+local some_stream
+local some_reference
+
+local some_string = lpdf.frombytes
+
+local function get_value(document,t,key)
+ if not key then
+ return
+ end
+ local value = t[key]
+ if not value then
+ return
+ end
+ if type(value) ~= "table" then
+ return value
+ end
+ -- we can assume names to be simple and strings to be tables
+ local kind = value[1]
+ if kind == name_object_code then
+ return value[2]
+ elseif kind == string_object_code then
+ return some_string(value[2],value[3])
+ elseif kind == array_object_code then
+ return some_array(value[2],document)
+ elseif kind == dictionary_object_code then
+ return some_dictionary(value[2],document)
+ elseif kind == stream_object_code then
+ return some_stream(value,document)
+ elseif kind == reference_object_code then
+ return some_reference(value,document)
+ end
+ return value
+end
+
+some_dictionary = function (d,document)
+ local f = dictionarytotable(d,true)
+ local t = setmetatable({ __raw__ = f, __type__ = dictionary_object_code }, {
+ __index = function(t,k)
+ return get_value(document,f,k)
+ end,
+ __call = function(t,k)
+ return get_flagged(t,f,k)
+ end,
+ } )
+ return t, "dictionary"
+end
+
+some_array = function (a,document)
+ local f = arraytotable(a,true)
+ local n = #f
+ local t = setmetatable({ __raw__ = f, __type__ = array_object_code, n = n }, {
+ __index = function(t,k)
+ return get_value(document,f,k)
+ end,
+ __call = function(t,k)
+ return get_flagged(t,f,k)
+ end,
+ __len = function(t,k)
+ return n
+ end,
+ } )
+ return t, "array"
+end
+
+some_stream = function(s,d,document)
+ local f = dictionarytotable(d,true)
+ local t = setmetatable({ __raw__ = f, __type__ = stream_object_code }, {
+ __index = function(t,k)
+ return get_value(document,f,k)
+ end,
+ __call = function(t,raw)
+ if raw == false then
+ return readwholestream(s,false) -- original
+ else
+ return readwholestream(s,true) -- uncompressed
+ end
+ end,
+ } )
+ return t, "stream"
+end
+
+some_reference = function(r,document)
+ local objnum = r[3]
+ local cached = document.__cache__[objnum]
+ if not cached then
+ local kind, object, b, c = getfromreference(r[2])
+ if kind == dictionary_object_code then
+ cached = some_dictionary(object,document)
+ elseif kind == array_object_code then
+ cached = some_array(object,document)
+ elseif kind == stream_object_code then
+ cached = some_stream(object,b,document)
+ else
+ cached = { kind, object, b, c }
+ -- really cache this?
+ end
+ document.__cache__[objnum] = cached
+ document.__xrefs__[cached] = objnum
+ end
+ return cached
+end
+
+local resolvers = { }
+lpdf_epdf.resolvers = resolvers
+
+local function resolve(document,k)
+ local resolver = resolvers[k]
+ if resolver then
+ local entry = resolver(document)
+ document[k] = entry
+ return entry
+ end
+end
+
+local function getnames(document,n,target) -- direct
+ if n then
+ local Names = n.Names
+ if Names then
+ if not target then
+ target = { }
+ end
+ for i=1,#Names,2 do
+ target[Names[i]] = Names[i+1]
+ end
+ else
+ local Kids = n.Kids
+ if Kids then
+ for i=1,#Kids do
+ target = getnames(document,Kids[i],target)
+ end
+ end
+ end
+ return target
+ end
+end
+
+local function getkids(document,n,target) -- direct
+ if n then
+ local Kids = n.Kids
+ if Kids then
+ for i=1,#Kids do
+ target = getkids(document,Kids[i],target)
+ end
+ elseif target then
+ target[#target+1] = n
+ else
+ target = { n }
+ end
+ return target
+ end
+end
+
+function resolvers.destinations(document)
+ local Names = document.Catalog.Names
+ return getnames(document,Names and Names.Dests)
+end
+
+function resolvers.javascripts(document)
+ local Names = document.Catalog.Names
+ return getnames(document,Names and Names.JavaScript)
+end
+
+function resolvers.widgets(document)
+ local Names = document.Catalog.AcroForm
+ return Names and Names.Fields
+end
+
+function resolvers.embeddedfiles(document)
+ local Names = document.Catalog.Names
+ return getnames(document,Names and Names.EmbeddedFiles)
+end
+
+-- /OCProperties <<
+-- /OCGs [ 15 0 R 17 0 R 19 0 R 21 0 R 23 0 R 25 0 R 27 0 R ]
+-- /D <<
+-- /Order [ 15 0 R 17 0 R 19 0 R 21 0 R 23 0 R 25 0 R 27 0 R ]
+-- /ON [ 15 0 R 17 0 R 19 0 R 21 0 R 23 0 R 25 0 R 27 0 R ]
+-- /OFF [ ]
+-- >>
+-- >>
+
+function resolvers.layers(document)
+ local properties = document.Catalog.OCProperties
+ if properties then
+ local layers = properties.OCGs
+ if layers then
+ local t = { }
+ for i=1,#layers do
+ local layer = layers[i]
+ t[i] = layer.Name
+ end
+ -- t.n = n
+ return t
+ end
+ end
+end
+
+function resolvers.structure(document)
+ -- this might become a tree
+ return document.Catalog.StructTreeRoot
+end
+
+function resolvers.pages(document)
+ local __data__ = document.__data__
+ local __xrefs__ = document.__xrefs__
+ local __cache__ = document.__cache__
+ --
+ local nofpages = document.nofpages
+ local pages = { }
+ local rawpages = pagestotable(__data__)
+ document.pages = pages
+ --
+ for pagenumber=1,nofpages do
+ local rawpagedata = rawpages[pagenumber]
+ if rawpagedata then
+ local pagereference = rawpagedata[3]
+ local pageobject = rawpagedata[1]
+ local pagedata = some_dictionary(pageobject,document)
+ if pagedata and pageobject then
+ pagedata.number = pagenumber
+ pagedata.MediaBox = getbox(pageobject,"MediaBox")
+ pagedata.CropBox = getbox(pageobject,"CropBox")
+ pagedata.BleedBox = getbox(pageobject,"BleedBox")
+ pagedata.ArtBox = getbox(pageobject,"ArtBox")
+ pagedata.TrimBox = getbox(pageobject,"TrimBox")
+ pages[pagenumber] = pagedata
+ __xrefs__[pagedata] = pagereference
+ __cache__[pagereference] = pagedata
+ else
+ report_epdf("missing pagedata for page %i, case %i",pagenumber,1)
+ end
+ else
+ report_epdf("missing pagedata for page %i, case %i",pagenumber,2)
+ end
+ end
+ --
+ -- pages.n = nofpages
+ --
+ return pages
+end
+
+local loaded = { }
+local nofloaded = 0
+
+function lpdf_epdf.load(filename,userpassword,ownerpassword,fromstring)
+ local document = loaded[filename]
+ if not document then
+ statistics.starttiming(lpdf_epdf)
+ local __data__
+ local __file__
+ if fromstring then
+ __data__ = pdfnew(filename,#filename)
+ elseif pdfopenfile then
+ __data__ = pdfopenfile(ioopen(filename,"rb"))
+ else
+ __data__ = pdfopen(filename)
+ end
+ if __data__ then
+ if userpassword and getstatus(__data__) < 0 then
+ unencrypt(__data__,userpassword,nil)
+ end
+ if ownerpassword and getstatus(__data__) < 0 then
+ unencrypt(__data__,nil,ownerpassword)
+ end
+ if getstatus(__data__) < 0 then
+ report_epdf("the document is encrypted, provide proper passwords",getstatus(__data__))
+ __data__ = false
+ end
+ if __data__ then
+ document = {
+ filename = filename,
+ nofcopied = 0,
+ copied = { },
+ __cache__ = { },
+ __xrefs__ = { },
+ __fonts__ = { },
+ __copied__ = { },
+ __data__ = __data__,
+ }
+ document.Catalog = some_dictionary(getcatalog(__data__),document)
+ document.Info = some_dictionary(getinfo(__data__),document)
+ document.Trailer = some_dictionary(gettrailer(__data__),document)
+ --
+ setmetatableindex(document,resolve)
+ --
+ document.majorversion, document.minorversion = getversion(__data__)
+ --
+ document.nofpages = getnofpages(__data__)
+ else
+ document = false
+ end
+ else
+ document = false
+ end
+ loaded[filename] = document
+ loaded[document] = document
+ statistics.stoptiming(lpdf_epdf)
+ -- print(statistics.elapsedtime(lpdf_epdf))
+ end
+ if document then
+ nofloaded = nofloaded + 1
+ end
+ return document or nil
+end
+
+function lpdf_epdf.unload(filename)
+ if type(filename) == "table" then
+ filename = filename.filename
+ end
+ if type(filename) == "string" then
+ local document = loaded[filename]
+ if document then
+ loaded[document] = nil
+ loaded[filename] = nil
+ pdfclose(document.__data__)
+ end
+ end
+end
+
+-- for k, v in expanded(t) do
+
+local function expanded(t)
+ local function iterator(raw,k)
+ local k, v = next(raw,k)
+ if v then
+ return k, t[k]
+ end
+ end
+ return iterator, t.__raw__, nil
+end
+
+---------.expand = expand
+lpdf_epdf.expanded = expanded
+
+-- we could resolve the text stream in one pass if we directly handle the
+-- font but why should we complicate things
+
+local spaces = lpegpatterns.whitespace^1
+local optspaces = lpegpatterns.whitespace^0
+local comment = P("%") * (1 - lpegpatterns.newline)^0
+local numchar = P("\\")/"" * (R("09")^3/function(s) return char(tonumber(s,8)) end)
+ + P("\\") * P(1)
+local key = P("/") * C(R("AZ","az","09","__")^1)
+local number = Ct(Cc("number") * (lpegpatterns.number/tonumber))
+local keyword = Ct(Cc("name") * key)
+local operator = C((R("AZ","az")+P("*")+P("'")+P('"'))^1)
+
+local grammar = P { "start",
+ start = (comment + keyword + number + V("dictionary") + V("array") + V("hexstring") + V("decstring") + spaces)^1,
+ keyvalue = key * optspaces * V("start"),
+ array = Ct(Cc("array") * P("[") * Ct(V("start")^1) * P("]")),
+ dictionary = Ct(Cc("dict") * P("<<") * Ct(V("keyvalue")^1) * P(">>")),
+ hexstring = Ct(Cc("hex") * P("<") * Cs(( 1-P(">"))^1) * P(">")),
+ decstring = Ct(Cc("dec") * P("(") * Cs((numchar+1-(P")"))^1) * P(")")), -- untested
+}
+
+local operation = Ct(grammar^1 * operator)
+local parser = Ct((operation + P(1))^1)
+
+-- todo: speed this one up
+
+local numchar = P("\\") * (R("09")^3 + P(1))
+local number = lpegpatterns.number
+local keyword = P("/") * R("AZ","az","09","__")^1
+local operator = (R("AZ","az")+P("*")+P("'")+P('"'))^1
+
+local skipstart = P("BDC") + P("BMC") + P("DP") + P("MP")
+local skipstop = P("EMC")
+local skipkeep = P("/ActualText")
+
+local grammar = P { "skip",
+ start = keyword + number + V("dictionary") + V("array") + V("hexstring") + V("decstring") + spaces,
+ keyvalue = optspaces * (keyword * optspaces * V("start") * optspaces)^1,
+ xeyvalue = optspaces * ((keyword - skipkeep) * optspaces * V("start") * optspaces)^1,
+ array = P("[") * V("start")^0 * P("]"),
+ dictionary = P("<<") * V("keyvalue")^0 * P(">>"),
+ xictionary = P("<<") * V("xeyvalue")^0 * P(">>"),
+ hexstring = P("<") * ( 1-P(">"))^0 * P(">"),
+ decstring = P("(") * (numchar+1-(P")"))^0 * P(")"),
+ skip = (optspaces * ( keyword * optspaces * V("xictionary") * optspaces * skipstart + skipstop) / "")
+ + V("start")
+ + operator
+}
+
+local stripper = Cs((grammar + P(1))^1)
+
+function lpdf_epdf.parsecontent(str)
+ return lpegmatch(parser,str)
+end
+
+function lpdf_epdf.stripcontent(str)
+ if find(str,"EMC") then
+ return lpegmatch(stripper,str)
+ else
+ return str
+ end
+end
+
+-- beginbfrange : <start> <stop> <firstcode>
+-- <start> <stop> [ <firstsequence> <firstsequence> <firstsequence> ]
+-- beginbfchar : <code> <newcodes>
+
+local fromsixteen = lpdf.fromsixteen -- maybe inline the lpeg ... but not worth it
+
+local function f_bfchar(t,a,b)
+ t[tonumber(a,16)] = fromsixteen(b)
+end
+
+local function f_bfrange_1(t,a,b,c)
+ print("todo 1",a,b,c)
+ -- c is string
+ -- todo t[tonumber(a,16)] = fromsixteen(b)
+end
+
+local function f_bfrange_2(t,a,b,c)
+ print("todo 2",a,b,c)
+ -- c is table
+ -- todo t[tonumber(a,16)] = fromsixteen(b)
+end
+
+local optionals = spaces^0
+local hexstring = optionals * P("<") * C((1-P(">"))^1) * P(">")
+local bfchar = Carg(1) * hexstring * hexstring / f_bfchar
+local bfrange = Carg(1) * hexstring * hexstring * hexstring / f_bfrange_1
+ + Carg(1) * hexstring * hexstring * optionals * P("[") * Ct(hexstring^1) * optionals * P("]") / f_bfrange_2
+local fromunicode = (
+ P("beginbfchar" ) * bfchar ^1 * optionals * P("endbfchar" ) +
+ P("beginbfrange") * bfrange^1 * optionals * P("endbfrange") +
+ spaces +
+ P(1)
+)^1 * Carg(1)
+
+local function analyzefonts(document,resources) -- unfinished, see mtx-pdf for better code
+ local fonts = document.__fonts__
+ if resources then
+ local fontlist = resources.Font
+ if fontlist then
+ for id, data in expanded(fontlist) do
+ if not fonts[id] then
+ -- a quick hack ... I will look into it more detail if I find a real
+ -- -application for it
+ local tounicode = data.ToUnicode()
+ if tounicode then
+ tounicode = lpegmatch(fromunicode,tounicode,1,{})
+ end
+ fonts[id] = {
+ tounicode = type(tounicode) == "table" and tounicode or { }
+ }
+ setmetatableindex(fonts[id],"self")
+ end
+ end
+ end
+ end
+ return fonts
+end
+
+lpdf_epdf.analyzefonts = analyzefonts
+
+local more = 0
+local unic = nil -- cheaper than passing each time as Carg(1)
+
+local p_hex_to_utf = C(4) / function(s) -- needs checking !
+ local now = tonumber(s,16)
+ if more > 0 then
+ now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 -- the 0x10000 smells wrong
+ more = 0
+ return unic[now] or utfchar(now)
+ elseif now >= 0xD800 and now <= 0xDBFF then
+ more = now
+ -- return ""
+ else
+ return unic[now] or utfchar(now)
+ end
+end
+
+local p_dec_to_utf = C(1) / function(s) -- needs checking !
+ local now = byte(s)
+ return unic[now] or utfchar(now)
+end
+
+local p_hex_to_utf = P(true) / function() more = 0 end * Cs(p_hex_to_utf^1)
+local p_dec_to_utf = P(true) / function() more = 0 end * Cs(p_dec_to_utf^1)
+
+function lpdf_epdf.getpagecontent(document,pagenumber)
+
+ local page = document.pages[pagenumber]
+
+ if not page then
+ return
+ end
+
+ local fonts = analyzefonts(document,page.Resources)
+
+ local content = page.Contents() or ""
+ local list = lpegmatch(parser,content)
+ local font = nil
+ -- local unic = nil
+
+ for i=1,#list do
+ local entry = list[i]
+ local size = #entry
+ local operator = entry[size]
+ if operator == "Tf" then
+ font = fonts[entry[1][2]]
+ unic = font and font.tounicode or { }
+ elseif operator == "TJ" then
+ local data = entry[1] -- { "array", { ... } }
+ local list = data[2] -- { { ... }, { ... } }
+ for i=1,#list do
+ local li = list[i]
+-- if type(li) == "table" then
+ local kind = li[1]
+ if kind == "hex" then
+ list[i] = lpegmatch(p_hex_to_utf,li[2])
+ elseif kind == "string" then
+ list[i] = lpegmatch(p_dec_to_utf,li[2])
+ else
+ list[i] = li[2] -- kern
+ end
+-- else
+-- -- kern
+-- end
+ end
+ elseif operator == "Tj" or operator == "'" or operator == '"' then
+ -- { string, Tj } { string, ' } { n, m, string, " }
+ local data = entry[size-1]
+ local list = data[2]
+ local kind = list[1]
+ if kind == "hex" then
+ list[2] = lpegmatch(p_hex_to_utf,li[2])
+ elseif kind == "string" then
+ list[2] = lpegmatch(p_dec_to_utf,li[2])
+ end
+ end
+ end
+
+ unic = nil -- can be collected
+
+ return list
+
+end
+
+-- This is also an experiment. When I really need it I can improve it, for instance
+-- with proper position calculating. It might be usefull for some search or so.
+
+local softhyphen = utfchar(0xAD) .. "$"
+local linefactor = 1.3
+
+function lpdf_epdf.contenttotext(document,list) -- maybe signal fonts
+ local last_y = 0
+ local last_f = 0
+ local text = { }
+ local last = 0
+
+ for i=1,#list do
+ local entry = list[i]
+ local size = #entry
+ local operator = entry[size]
+ if operator == "Tf" then
+ last_f = entry[2][2] -- size
+ elseif operator == "TJ" then
+ local data = entry[1] -- { "array", { ... } }
+ local list = data[2] -- { { ... }, { ... } }
+ for i=1,#list do
+ local li = list[i]
+ local kind = type(li)
+ if kind == "string" then
+ last = last + 1
+ text[last] = li
+ elseif kind == "number" and li < -50 then
+ last = last + 1
+ text[last] = " "
+ end
+ end
+ elseif operator == "Tj" then
+ last = last + 1
+ local li = entry[size-1]
+ local kind = type(li)
+ if kind == "string" then
+ last = last + 1
+ text[last] = li
+ end
+ elseif operator == "cm" or operator == "Tm" then
+ local data = entry
+ local ty = entry[6][2]
+ local dy = abs(last_y - ty)
+ if dy > linefactor*last_f then
+ if last > 0 then
+ if find(text[last],softhyphen,1,true) then
+ -- ignore
+ else
+ last = last + 1
+ text[last] = "\n"
+ end
+ end
+ end
+ last_y = ty
+ end
+ end
+
+ return concat(text)
+end
+
+function lpdf_epdf.getstructure(document,list) -- just a test
+ local depth = 0
+ for i=1,#list do
+ local entry = list[i]
+ local size = #entry
+ local operator = entry[size]
+ if operator == "BDC" then
+ report_epdf("%w%s : %s",depth,entry[1] or "?",entry[2] and entry[2].MCID or "?")
+ depth = depth + 1
+ elseif operator == "EMC" then
+ depth = depth - 1
+ elseif operator == "TJ" then
+ local list = entry[1]
+ for i=1,#list do
+ local li = list[i]
+ if type(li) == "string" then
+ report_epdf("%w > %s",depth,li)
+ elseif li < -50 then
+ report_epdf("%w >",depth,li)
+ end
+ end
+ elseif operator == "Tj" then
+ report_epdf("%w > %s",depth,entry[size-1])
+ end
+ end
+end
+
+if images then do
+
+ -- This can be made a bit faster (just get raw data and pass it) but I will
+ -- do that later. In the end the benefit is probably neglectable.
+
+ local recompress = false
+ local stripmarked = false
+
+ local copydictionary = nil
+ local copyarray = nil
+
+ local pdfreference = lpdf.reference
+ local pdfconstant = lpdf.constant
+ local pdfarray = lpdf.array
+ local pdfdictionary = lpdf.dictionary
+ local pdfnull = lpdf.null
+ local pdfliteral = lpdf.literal
+
+ local pdfreserveobject
+ local shareobjectreference
+ local pdfflushobject
+ local pdfflushstreamobject
+
+ updaters.register("backend.update.lpdf",function()
+ pdfreserveobject = lpdf.reserveobject
+ shareobjectreference = lpdf.shareobjectreference
+ pdfflushobject = lpdf.flushobject
+ pdfflushstreamobject = lpdf.flushstreamobject
+ end)
+
+ local report = logs.reporter("backend","xobjects")
+
+ local factor = 65536 / (7200/7227) -- 1/number.dimenfactors.bp
+
+ local createimage = images.create
+
+ directives.register("graphics.pdf.recompress", function(v) recompress = v end)
+ directives.register("graphics.pdf.stripmarked", function(v) stripmarked = v end)
+
+ local function scaledbbox(b)
+ return { b[1]*factor, b[2]*factor, b[3]*factor, b[4]*factor }
+ end
+
+ local codecs = {
+ ASCIIHexDecode = true,
+ ASCII85Decode = true,
+ RunLengthDecode = true,
+ FlateDecode = true,
+ LZWDecode = true,
+ }
+
+ local function deepcopyobject(xref,copied,value)
+ -- no need for tables, just nested loop with obj
+ local objnum = xref[value]
+ if objnum then
+ local usednum = copied[objnum]
+ if usednum then
+ -- report("%s object %i is reused",kind,objnum)
+ else
+ usednum = pdfreserveobject()
+ copied[objnum] = usednum
+ local entry = value
+ local kind = entry.__type__
+ if kind == array_object_code then
+ local a = copyarray(xref,copied,entry)
+ pdfflushobject(usednum,tostring(a))
+ elseif kind == dictionary_object_code then
+ local d = copydictionary(xref,copied,entry)
+ pdfflushobject(usednum,tostring(d))
+ elseif kind == stream_object_code then
+ local d = copydictionary(xref,copied,entry)
+ local filter = d.Filter
+ if filter and codecs[filter] and recompress then
+ -- recompress
+ d.Filter = nil
+ d.Length = nil
+ d.DecodeParms = nil -- relates to filter
+ d.DL = nil -- needed?
+ local s = entry() -- get uncompressed stream
+ pdfflushstreamobject(s,d,true,usednum) -- compress stream
+ else
+ -- keep as-is, even Length which indicates the
+ -- decompressed length
+ local s = entry(false) -- get compressed stream
+ -- pdfflushstreamobject(s,d,false,usednum,true) -- don't compress stream
+ pdfflushstreamobject(s,d,"raw",usednum) -- don't compress stream
+ end
+ else
+ local t = type(value)
+ if t == "string" then
+ value = pdfconstant(value)
+ elseif t == "table" then
+ local kind = value[1]
+ local entry = value[2]
+ if kind == name_object_code then
+ value = pdfconstant(entry)
+ elseif kind == string_object_code then
+ value = pdfliteral(entry,value[3])
+ elseif kind == null_object_code then
+ value = pdfnull()
+ elseif kind == reference_object_code then
+ value = deepcopyobject(xref,copied,entry)
+ elseif entry == nil then
+ value = pdfnull()
+ else
+ value = tostring(entry)
+ end
+ end
+ pdfflushobject(usednum,value)
+ end
+ end
+ return pdfreference(usednum)
+ elseif kind == stream_object_code then
+ report("stream not done: %s", objectcodes[kind] or "?")
+ else
+ report("object not done: %s", objectcodes[kind] or "?")
+ end
+ end
+
+ local function copyobject(xref,copied,object,key,value)
+ if not value then
+ value = object.__raw__[key]
+ end
+ local t = type(value)
+ if t == "string" then
+ return pdfconstant(value)
+ elseif t ~= "table" then
+ return value
+ end
+ local kind = value[1]
+ if kind == name_object_code then
+ return pdfconstant(value[2])
+ elseif kind == string_object_code then
+ return pdfliteral(value[2],value[3])
+ elseif kind == array_object_code then
+ return copyarray(xref,copied,object[key])
+ elseif kind == dictionary_object_code then
+ return copydictionary(xref,copied,object[key])
+ elseif kind == null_object_code then
+ return pdfnull()
+ elseif kind == reference_object_code then
+ -- expand
+ return deepcopyobject(xref,copied,object[key])
+ else
+ report("weird: %s", objecttypes[kind] or "?")
+ end
+ end
+
+ copyarray = function (xref,copied,object)
+ local target = pdfarray()
+ local source = object.__raw__
+ for i=1,#source do
+ target[i] = copyobject(xref,copied,object,i,source[i])
+ end
+ return target
+ end
+
+ local plugins = nil
+
+ -- Sorting the hash slows down upto 5% bit but it is still as fast as the C
+ -- code. We could loop over the index instead but sorting might be nicer in
+ -- the end.
+
+ copydictionary = function (xref,copied,object)
+ local target = pdfdictionary()
+ local source = object.__raw__
+ -- for key, value in next, source do
+ for key, value in sortedhash(source) do
+ if plugins then
+ local p = plugins[key]
+ if p then
+ target[key] = p(xref,copied,object,key,value,copyobject) -- maybe a table of methods
+ else
+ target[key] = copyobject(xref,copied,object,key,value)
+ end
+ else
+ target[key] = copyobject(xref,copied,object,key,value)
+ end
+ end
+ return target
+ end
+
+ -- local function copyresources(pdfdoc,xref,copied,pagedata)
+ -- local Resources = pagedata.Resources
+ -- if Resources then
+ -- local r = pdfreserveobject()
+ -- local d = copydictionary(xref,copied,Resources)
+ -- pdfflushobject(r,tostring(d))
+ -- return pdfreference(r)
+ -- end
+ -- end
+
+ local function copyresources(pdfdoc,xref,copied,pagedata)
+ local Resources = pagedata.Resources
+ --
+ -- -- This needs testing:
+ --
+ -- if not Resources then
+ -- local Parent = page.Parent
+ -- while (Parent and (Parent.__type__ == dictionary_object_code or Parent.__type__ == reference_object_code) do
+ -- Resources = Parent.Resources
+ -- if Resources then
+ -- break
+ -- end
+ -- Parent = Parent.Parent
+ -- end
+ -- end
+ if Resources then
+ local d = copydictionary(xref,copied,Resources)
+ return shareobjectreference(d)
+ end
+ end
+
+ local openpdf = lpdf_epdf.load
+ local closepdf = lpdf_epdf.unload
+
+ -- todo: keep track of already open files
+
+ local function newpdf(str,userpassword,ownerpassword)
+ return openpdf(str,userpassword,ownerpassword,true)
+ end
+
+ local sizes = {
+ crop = "CropBox",
+ media = "MediaBox",
+ bleed = "BleedBox",
+ art = "ArtBox",
+ trim = "TrimBox",
+ }
+
+ local function querypdf(pdfdoc,pagenumber,size)
+ if pdfdoc then
+ if not pagenumber then
+ pagenumber = 1
+ end
+ local root = pdfdoc.Catalog
+ local page = pdfdoc.pages[pagenumber]
+ if page then
+ local sizetag = sizes[size or "crop"] or sizes.crop
+ local mediabox = page.MediaBox or { 0, 0, 0, 0 }
+ local cropbox = page[sizetag] or mediabox
+ return {
+ filename = pdfdoc.filename,
+ pagenumber = pagenumber,
+ nofpages = pdfdoc.nofpages,
+ boundingbox = scaledbbox(cropbox),
+ cropbox = cropbox,
+ mediabox = mediabox,
+ bleedbox = page.BleedBox or cropbox,
+ trimbox = page.TrimBox or cropbox,
+ artbox = page.ArtBox or cropbox,
+ rotation = page.Rotate or 0,
+ xsize = cropbox[3] - cropbox[1],
+ ysize = cropbox[4] - cropbox[2],
+ }
+ end
+ end
+ end
+
+ local function copypage(pdfdoc,pagenumber,attributes,compact,width,height,attr)
+ if pdfdoc then
+ local root = pdfdoc.Catalog
+ local page = pdfdoc.pages[pagenumber or 1]
+ local pageinfo = querypdf(pdfdoc,pagenumber)
+ local contents = page.Contents
+ if contents then
+ local xref = pdfdoc.__xrefs__
+ local copied = pdfdoc.__copied__
+ if compact and lpdf_epdf.plugin then
+ plugins = lpdf_epdf.plugin(pdfdoc,xref,copied,page)
+ end
+ local xobject = pdfdictionary {
+ Type = pdfconstant("XObject"),
+ Subtype = pdfconstant("Form"),
+ FormType = 1,
+ Group = copyobject(xref,copied,page,"Group"),
+ LastModified = copyobject(xref,copied,page,"LastModified"),
+ Metadata = copyobject(xref,copied,page,"Metadata"),
+ PieceInfo = copyobject(xref,copied,page,"PieceInfo"),
+ Resources = copyresources(pdfdoc,xref,copied,page),
+ SeparationInfo = copyobject(xref,copied,page,"SeparationInfo"),
+ } + attr
+ if attributes then
+ for k, v in expanded(attributes) do
+ page[k] = v -- maybe nested
+ end
+ end
+ local content = ""
+ local nolength = nil
+ local ctype = contents.__type__
+ -- we always recompress because image object streams can not be
+ -- influenced (yet)
+ if ctype == stream_object_code then
+ if stripmarked then
+ content = contents() -- uncompressed
+ local stripped = lpdf_epdf.stripcontent(content)
+ if stripped ~= content then
+ -- report("%i bytes stripped on page %i",#content-#stripped,pagenumber or 1)
+ content = stripped
+ end
+ elseif recompress then
+ content = contents() -- uncompressed
+ else
+ local Filter = copyobject(xref,copied,contents,"Filter")
+ local Length = copyobject(xref,copied,contents,"Length")
+ if Length and Filter then
+ nolength = true
+ xobject.Length = Length
+ xobject.Filter = Filter
+ content = contents(false) -- uncompressed
+ else
+ content = contents() -- uncompressed
+ end
+ end
+ elseif ctype == array_object_code then
+ content = { }
+ for i=1,#contents do
+ content[i] = contents[i]() -- uncompressed
+ end
+ content = concat(content," ")
+ end
+ -- still not nice: we double wrap now
+ plugins = nil
+ local rotation = pageinfo.rotation
+ local boundingbox = pageinfo.boundingbox
+ local transform = nil
+ if rotation == 90 then
+ transform = 3
+ elseif rotation == 180 then
+ transform = 2
+ elseif rotation == 270 then
+ transform = 1
+ elseif rotation > 1 and rotation < 4 then
+ transform = rotation
+ end
+ xobject.BBox = pdfarray {
+ boundingbox[1] * bpfactor,
+ boundingbox[2] * bpfactor,
+ boundingbox[3] * bpfactor,
+ boundingbox[4] * bpfactor,
+ }
+ -- maybe like bitmaps
+ return createimage { -- beware: can be a img.new or a dummy
+ bbox = boundingbox,
+ transform = transform,
+ nolength = nolength,
+ nobbox = true,
+ notype = true,
+ stream = content, -- todo: no compress, pass directly also length, filter etc
+ attr = xobject(),
+ kind = images.types.stream,
+ }
+ else
+ -- maybe report an error
+ end
+ end
+ end
+
+ lpdf_epdf.image = {
+ open = openpdf,
+ close = closepdf,
+ new = newpdf,
+ query = querypdf,
+ copy = copypage,
+ }
+
+-- lpdf.injectors.pdf = function(specification)
+-- local d = lpdf_epdf.load(specification.filename)
+-- print(d)
+-- end
+
+
+end end
+
+-- local d = lpdf_epdf.load("e:/tmp/oeps.pdf")
+-- inspect(d)
+-- inspect(d.Catalog.Lang)
+-- inspect(d.Catalog.OCProperties.D.AS[1].Event)
+-- inspect(d.Catalog.Metadata())
+-- inspect(d.Catalog.Pages.Kids[1])
+-- inspect(d.layers)
+-- inspect(d.pages)
+-- inspect(d.destinations)
+-- inspect(lpdf_epdf.getpagecontent(d,1))
+-- inspect(lpdf_epdf.contenttotext(document,lpdf_epdf.getpagecontent(d,1)))
+-- inspect(lpdf_epdf.getstructure(document,lpdf_epdf.getpagecontent(d,1)))
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-ren.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-ren.lmt
new file mode 100644
index 00000000000..3794250d9ea
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-ren.lmt
@@ -0,0 +1,399 @@
+if not modules then modules = { } end modules ['lpdf-ren'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- rendering
+
+local tostring, tonumber, next = tostring, tonumber, next
+local concat = table.concat
+local formatters = string.formatters
+local settings_to_array = utilities.parsers.settings_to_array
+local getrandom = utilities.randomizer.get
+
+local backends, lpdf, nodes, node = backends, lpdf, nodes, node
+
+local nodeinjections = backends.pdf.nodeinjections
+local codeinjections = backends.pdf.codeinjections
+local registrations = backends.pdf.registrations
+local viewerlayers = attributes.viewerlayers
+
+local references = structures.references
+
+references.executers = references.executers or { }
+local executers = references.executers
+
+local variables = interfaces.variables
+
+local v_no = variables.no
+local v_yes = variables.yes
+local v_start = variables.start
+local v_stop = variables.stop
+local v_reset = variables.reset
+local v_auto = variables.auto
+local v_random = variables.random
+
+local pdfconstant = lpdf.constant
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfreference = lpdf.reference
+
+local pdfflushobject
+local pdfreserveobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+ pdfreserveobject = lpdf.reserveobject
+end)
+
+local addtopageattributes = lpdf.addtopageattributes
+local addtopageresources = lpdf.addtopageresources
+local addtocatalog = lpdf.addtocatalog
+
+local escaped = lpdf.escaped
+
+local nuts = nodes.nuts
+local copy_node = nuts.copy
+
+local nodepool = nuts.pool
+local register = nodepool.register
+local setstate = nodepool.setstate
+
+local pdf_ocg = pdfconstant("OCG")
+local pdf_ocmd = pdfconstant("OCMD")
+local pdf_off = pdfconstant("OFF")
+local pdf_on = pdfconstant("ON")
+local pdf_view = pdfconstant("View")
+local pdf_design = pdfconstant("Design")
+local pdf_toggle = pdfconstant("Toggle")
+local pdf_setocgstate = pdfconstant("SetOCGState")
+
+local pdf_print = {
+ [v_yes] = pdfdictionary { PrintState = pdf_on },
+ [v_no ] = pdfdictionary { PrintState = pdf_off },
+}
+
+local pdf_intent = {
+ [v_yes] = pdf_view,
+ [v_no] = pdf_design,
+}
+
+local pdf_export = {
+ [v_yes] = pdf_on,
+ [v_no] = pdf_off,
+}
+
+-- We can have references to layers before they are places, for instance from
+-- hide and vide actions. This is why we need to be able to force usage of layers
+-- at several moments.
+
+-- management
+
+local pdfln, pdfld = { }, { }
+local textlayers, hidelayers, videlayers = pdfarray(), pdfarray(), pdfarray()
+local pagelayers, pagelayersreference, cache = nil, nil, { }
+local alphabetic = { }
+
+local escapednames = table.setmetatableindex(function(t,k)
+ local v = escaped(k)
+ t[k] = v
+ return v
+end)
+
+local specifications = { }
+local initialized = { }
+
+function codeinjections.defineviewerlayer(specification)
+ if viewerlayers.supported and textlayers then
+ local tag = specification.tag
+ if not specifications[tag] then
+ specifications[tag] = specification
+ end
+ end
+end
+
+local function useviewerlayer(name) -- move up so that we can use it as local
+ if not environment.initex and not initialized[name] then
+ local specification = specifications[name]
+ if specification then
+ specifications[name] = nil -- or not
+ initialized [name] = true
+ if not pagelayers then
+ pagelayers = pdfdictionary()
+ pagelayersreference = pdfreserveobject()
+ end
+ local tag = specification.tag
+ -- todo: reserve
+ local nn = pdfreserveobject()
+ local nr = pdfreference(nn)
+ local nd = pdfdictionary {
+ Type = pdf_ocg,
+ Name = specification.title or "unknown",
+ Usage = {
+ Intent = pdf_intent[specification.editable or v_yes], -- disable layer hiding by user (useless)
+ Print = pdf_print [specification.printable or v_yes], -- printable or not
+ Export = pdf_export[specification.export or v_yes], -- export or not
+ },
+ }
+ cache[#cache+1] = { nn, nd }
+ pdfln[tag] = nr -- was n
+ local dn = pdfreserveobject()
+ local dr = pdfreference(dn)
+ local dd = pdfdictionary {
+ Type = pdf_ocmd,
+ OCGs = pdfarray { nr },
+ }
+ cache[#cache+1] = { dn, dd }
+ pdfld[tag] = dr
+ textlayers[#textlayers+1] = nr
+ alphabetic[tag] = nr
+ if specification.visible == v_start then
+ videlayers[#videlayers+1] = nr
+ else
+ hidelayers[#hidelayers+1] = nr
+ end
+ pagelayers[escapednames[tag]] = dr -- check
+ else
+ -- todo: message
+ end
+ end
+end
+
+codeinjections.useviewerlayer = useviewerlayer
+
+local function layerreference(name)
+ local r = pdfln[name]
+ if r then
+ return r
+ else
+ useviewerlayer(name)
+ return pdfln[name]
+ end
+end
+
+lpdf.layerreference = layerreference -- also triggered when a hide or vide happens
+
+local function flushtextlayers()
+ if viewerlayers.supported then
+ if pagelayers then
+ pdfflushobject(pagelayersreference,pagelayers)
+ end
+ for i=1,#cache do
+ local ci = cache[i]
+ pdfflushobject(ci[1],ci[2])
+ end
+ if textlayers and #textlayers > 0 then -- we can group them if needed, like: layout
+ local sortedlayers = { }
+ for k, v in table.sortedhash(alphabetic) do
+ sortedlayers[#sortedlayers+1] = v -- maybe do a proper numeric sort as well
+ end
+ local d = pdfdictionary {
+ OCGs = textlayers,
+ D = pdfdictionary {
+ Name = "Document",
+ -- Order = (viewerlayers.hasorder and textlayers) or nil,
+ Order = (viewerlayers.hasorder and sortedlayers) or nil,
+ ON = videlayers,
+ OFF = hidelayers,
+ BaseState = pdf_on,
+ AS = pdfarray {
+ pdfdictionary {
+ Category = pdfarray { pdfconstant("Print") },
+ Event = pdfconstant("Print"),
+ OCGs = (viewerlayers.hasorder and sortedlayers) or nil,
+ }
+ },
+ },
+ }
+ addtocatalog("OCProperties",d)
+ textlayers = nil
+ end
+ end
+end
+
+local function flushpagelayers() -- we can share these
+ if pagelayers then
+ addtopageresources("Properties",pdfreference(pagelayersreference)) -- we could cache this
+ end
+end
+
+lpdf.registerpagefinalizer (flushpagelayers,"layers")
+lpdf.registerdocumentfinalizer(flushtextlayers,"layers")
+
+local function setlayer(what,arguments)
+ -- maybe just a gmatch of even better, earlier in lpeg
+ arguments = (type(arguments) == "table" and arguments) or settings_to_array(arguments)
+ local state = pdfarray { what }
+ for i=1,#arguments do
+ local p = layerreference(arguments[i])
+ if p then
+ state[#state+1] = p
+ end
+ end
+ return pdfdictionary {
+ S = pdf_setocgstate,
+ State = state,
+ }
+end
+
+function executers.hidelayer (arguments) return setlayer(pdf_off, arguments) end
+function executers.videlayer (arguments) return setlayer(pdf_on, arguments) end
+function executers.togglelayer(arguments) return setlayer(pdf_toggle,arguments) end
+
+-- injection
+
+local f_bdc = formatters["/OC /%s BDC"]
+local s_emc = "EMC"
+
+function codeinjections.startlayer(name) -- used in mp
+ if not name then
+ name = "unknown"
+ end
+ useviewerlayer(name)
+ return f_bdc(escapednames[name])
+end
+
+function codeinjections.stoplayer(name) -- used in mp
+ return s_emc
+end
+
+local cache = { }
+local stop = nil
+
+function nodeinjections.startlayer(name)
+ local c = cache[name]
+ if not c then
+ useviewerlayer(name)
+ c = register(setstate(f_bdc(escapednames[name])))
+ cache[name] = c
+ end
+ return copy_node(c)
+end
+
+function nodeinjections.stoplayer()
+ if not stop then
+ stop = register(setstate(s_emc))
+ end
+ return copy_node(stop)
+end
+
+-- experimental stacker code (slow, can be optimized): !!!! TEST CODE !!!!
+
+local values = viewerlayers.values
+local startlayer = codeinjections.startlayer
+local stoplayer = codeinjections.stoplayer
+
+function nodeinjections.startstackedlayer(s,t,first,last)
+ local r = { }
+ for i=first,last do
+ r[#r+1] = startlayer(values[t[i]])
+ end
+ r = concat(r," ")
+ return setstate(r)
+end
+
+function nodeinjections.stopstackedlayer(s,t,first,last)
+ local r = { }
+ for i=last,first,-1 do
+ r[#r+1] = stoplayer()
+ end
+ r = concat(r," ")
+ return setstate(r)
+end
+
+function nodeinjections.changestackedlayer(s,t1,first1,last1,t2,first2,last2)
+ local r = { }
+ for i=last1,first1,-1 do
+ r[#r+1] = stoplayer()
+ end
+ for i=first2,last2 do
+ r[#r+1] = startlayer(values[t2[i]])
+ end
+ r = concat(r," ")
+ return setstate(r)
+end
+
+-- transitions
+
+local pagetransitions = {
+ {"split","in","vertical"}, {"split","in","horizontal"},
+ {"split","out","vertical"}, {"split","out","horizontal"},
+ {"blinds","horizontal"}, {"blinds","vertical"},
+ {"box","in"}, {"box","out"},
+ {"wipe","east"}, {"wipe","west"}, {"wipe","north"}, {"wipe","south"},
+ {"dissolve"},
+ {"glitter","east"}, {"glitter","south"},
+ {"fly","in","east"}, {"fly","in","west"}, {"fly","in","north"}, {"fly","in","south"},
+ {"fly","out","east"}, {"fly","out","west"}, {"fly","out","north"}, {"fly","out","south"},
+ {"push","east"}, {"push","west"}, {"push","north"}, {"push","south"},
+ {"cover","east"}, {"cover","west"}, {"cover","north"}, {"cover","south"},
+ {"uncover","east"}, {"uncover","west"}, {"uncover","north"}, {"uncover","south"},
+ {"fade"},
+}
+
+local mapping = {
+ split = { "S" , pdfconstant("Split") },
+ blinds = { "S" , pdfconstant("Blinds") },
+ box = { "S" , pdfconstant("Box") },
+ wipe = { "S" , pdfconstant("Wipe") },
+ dissolve = { "S" , pdfconstant("Dissolve") },
+ glitter = { "S" , pdfconstant("Glitter") },
+ replace = { "S" , pdfconstant("R") },
+ fly = { "S" , pdfconstant("Fly") },
+ push = { "S" , pdfconstant("Push") },
+ cover = { "S" , pdfconstant("Cover") },
+ uncover = { "S" , pdfconstant("Uncover") },
+ fade = { "S" , pdfconstant("Fade") },
+ horizontal = { "Dm" , pdfconstant("H") },
+ vertical = { "Dm" , pdfconstant("V") },
+ ["in"] = { "M" , pdfconstant("I") },
+ out = { "M" , pdfconstant("O") },
+ east = { "Di" , 0 },
+ north = { "Di" , 90 },
+ west = { "Di" , 180 },
+ south = { "Di" , 270 },
+}
+
+local last = 0
+
+-- n: number, "stop", "reset", "random", "a,b,c" delay: number, "none"
+
+function codeinjections.setpagetransition(specification)
+ local n, delay = specification.n, specification.delay
+ if not n or n == "" then
+ return -- let's forget about it
+ elseif n == v_auto then
+ if last >= #pagetransitions then
+ last = 0
+ end
+ n = last + 1
+ elseif n == v_stop then
+ return
+ elseif n == v_reset then
+ last = 0
+ return
+ elseif n == v_random then
+ n = getrandom("transition",1,#pagetransitions)
+ else
+ n = tonumber(n)
+ end
+ local t = n and pagetransitions[n] or pagetransitions[1]
+ if not t then
+ t = settings_to_array(n)
+ end
+ if t and #t > 0 then
+ local d = pdfdictionary()
+ for i=1,#t do
+ local m = mapping[t[i]]
+ d[m[1]] = m[2]
+ end
+ delay = tonumber(delay)
+ if delay and delay > 0 then
+ addtopageattributes("Dur",delay)
+ end
+ addtopageattributes("Trans",d)
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-res.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-res.lmt
new file mode 100644
index 00000000000..d3c591343fc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-res.lmt
@@ -0,0 +1,41 @@
+if not modules then modules = { } end modules ['lpdf-res'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local codeinjections = backends.codeinjections
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+
+local setwhd = nuts.setwhd
+local setlist = nuts.setlist
+
+local new_hlist = nuts.pool.hlist
+
+local boxresources = tex.boxresources
+local saveboxresource = boxresources.save
+local useboxresource = boxresources.use
+local getboxresourcedimensions = boxresources.getdimensions
+
+local pdfcollectedresources = lpdf.collectedresources
+
+function codeinjections.registerboxresource(n,offset)
+ local r = saveboxresource(n,nil,pdfcollectedresources(),true,0,offset or 0) -- direct, todo: accept functions as attr/resources
+ return r
+end
+
+function codeinjections.restoreboxresource(index)
+ local hbox = new_hlist()
+ local list, wd, ht, dp = useboxresource(index)
+ setlist(hbox,tonut(list))
+ setwhd(hbox,wd,ht,dp)
+ return hbox -- so we return a nut !
+end
+
+function codeinjections.boxresourcedimensions(index)
+ return getboxresourcedimensions(index)
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt
new file mode 100644
index 00000000000..efcc6207372
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-rul.lmt
@@ -0,0 +1,388 @@
+if not modules then modules = { } end modules ['lpdf-rul'] = {
+ version = 1.001,
+ comment = "companion to grph-rul.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local tonumber, next, type = tonumber, next, type
+local concat = table.concat
+
+local attributes = attributes
+local nodes = nodes
+
+local bpfactor = number.dimenfactors.bp
+
+local nuts = nodes.nuts
+local ruleactions = nuts.rules.ruleactions
+
+local getwhd = nuts.getwhd
+
+local lefttoright_code = nodes.dirvalues.lefttoright
+
+local mpcolor = attributes.colors.mpcolor
+
+local trace_mp = false trackers.register("rules.mp", function(v) trace_mp = v end)
+
+local report_mp = logs.reporter("rules","mp")
+
+local floor = math.floor
+local getrandom = utilities.randomizer.get
+local formatters = string.formatters
+
+-- This is very pdf specific. Maybe move some to lpdf-rul.lua some day.
+
+local pdfprint ; pdfprint = function(...) pdfprint = lpdf.print return pdfprint(...) end
+
+-- updaters.register("backend.update",function() pdfprint = lpdf.print end)
+
+do
+
+ local simplemetapost = metapost.simple
+ local cachesize = 0
+ local maxcachesize = 256*1024
+ local cachethreshold = 1024
+ local caching = false -- otherwise random issues so we need a dedicated randomizer first
+
+ -- local maxcachesize = 8*1024
+ -- local cachethreshold = 1024/2
+
+ local cache = table.setmetatableindex(function(t,k)
+ local v = simplemetapost("rulefun",k) -- w, h, d
+ cachesize = cachesize + #v
+ if cachesize > maxcachesize then
+ -- print("old",cachesize)
+ for k, v in next, t do
+ local n = #v
+ if n > cachethreshold then
+ t[k] = nil
+ cachesize = cachesize - n
+ end
+ end
+ -- print("new",cachesize)
+ end
+ -- print(cachesize,maxcachesize,cachethreshold,#v)
+ t[k] = v
+ return v
+ end)
+
+ local replacer = utilities.templates.replacer
+
+ -- todo: RuleColor -> just string ?
+
+ local predefined = {
+ ["fake:word"] = replacer [[
+FakeWord(%width%,%height%,%depth%,%line%,%color%);
+ ]],
+ ["fake:rule"] = replacer[[
+%initializations%
+FakeRule(%width%,%height%,%depth%,%line%,%color%);
+ ]],
+ ["fake:rest"] = replacer [[
+RuleDirection := "%direction%" ;
+RuleOption := "%option%" ;
+RuleWidth := %width% ;
+RuleHeight := %height% ;
+RuleDepth := %depth% ;
+RuleH := %h% ;
+RuleV := %v% ;
+RuleThickness := %line% ;
+RuleFactor := %factor% ;
+RuleOffset := %offset% ;
+def RuleColor = %color% enddef ;
+%data%;
+ ]]
+ }
+
+ local initialized = false ;
+
+ local rule_mp = function(p,h,v,i,n)
+ local name = p.name or "fake:rest"
+ local code = (predefined[name] or predefined["fake:rest"]) {
+ data = p.data or "",
+ width = p.width * bpfactor,
+ height = p.height * bpfactor,
+ depth = p.depth * bpfactor,
+ factor = (p.factor or 0) * bpfactor, -- needs checking
+ offset = p.offset or 0,
+ line = (p.line or 65536) * bpfactor,
+ color = mpcolor(p.ma,p.ca,p.ta),
+ option = p.option or "",
+ direction = p.direction or lefttoright_code,
+ h = h * bpfactor,
+ v = v * bpfactor,
+ }
+ if not initialized then
+ initialized = true
+ simplemetapost("rulefun",formatters["randomseed := %s;"](getrandom("rulefun",0,4095)))
+ end
+ -- we enable extensions but we could also consider to delegate colors
+ -- to the node finalizer
+ local pdf = caching and cache[code] or simplemetapost("rulefun",code,true)
+ if trace_mp then
+ report_mp("code: %s",code)
+ report_mp("pdf : %s",pdf)
+ end
+ if pdf and pdf ~= "" then
+ pdfprint("direct",pdf)
+ end
+ end
+
+ updaters.register("backend.update.lpdf",function()
+ ruleactions.mp = rule_mp
+ end)
+
+end
+
+do
+
+ -- This is the old oval method that we keep it for compatibility reasons. Of
+ -- course one can use mp instead. It could be improved but at the cost of more
+ -- code than I'm willing to add for something hardly used.
+
+ local function round(p,kind)
+ local method = tonumber(p.corner) or 0
+ if method < 0 or method > 27 then
+ method = 0
+ end
+ local width = p.width or 0
+ local height = p.height or 0
+ local depth = p.depth or 0
+ local total = height + depth
+ local radius = p.radius or 655360
+ local line = p.line or 65536
+ local how = (method > 8 or kind ~= "fill") and "S" or "f"
+ local half = line / 2
+ local xmin = half * bpfactor
+ local xmax = ( width - half) * bpfactor
+ local ymax = ( height - half) * bpfactor
+ local ymin = (-depth + half) * bpfactor
+ local full = ( radius + half)
+ local xxmin = full * bpfactor
+ local xxmax = ( width - full) * bpfactor
+ local yymax = ( height - full) * bpfactor
+ local yymin = (-depth + full) * bpfactor
+ line = line * bpfactor
+ if xxmin <= xxmax and yymin <= yymax then
+ local list = nil
+ if method == 0 then
+ list = {
+ "q", line, "w", xxmin, ymin, "m", xxmax, ymin, "l", xmax, ymin, xmax, yymin, "y",
+ xmax, yymax, "l", xmax, ymax, xxmax, ymax, "y", xxmin, ymax, "l", xmin, ymax,
+ xmin, yymax, "y", xmin, yymin, "l", xmin, ymin, xxmin, ymin, "y", "h", how, "Q",
+ }
+ elseif method == 1 then
+ list = {
+ "q", line, "w", xxmin, ymin, "m", xxmax, ymin, "l", xmax, ymin, xmax, yymin, "y",
+ xmax, ymax, "l", xmin, ymax, "l", xmin, yymin, "l", xmin, ymin, xxmin, ymin, "y",
+ "h", how, "Q",
+ }
+ elseif method == 2 then
+ list = {
+ "q", line, "w", xxmin, ymin, "m", xmax, ymin, "l", xmax, ymax, "l", xxmin, ymax,
+ "l", xmin, ymax, xmin, yymax, "y", xmin, yymin, "l", xmin, ymin, xxmin, ymin,
+ "y", "h", how, "Q",
+ }
+ elseif method == 3 then
+ list = {
+ "q", line, "w", xmin, ymin, "m", xmax, ymin, "l", xmax, yymax, "l", xmax, ymax,
+ xxmax, ymax, "y", xxmin, ymax, "l", xmin, ymax, xmin, yymax, "y", xmin, ymin,
+ "l", "h", how, "Q",
+ }
+
+ elseif method == 4 then
+ list = {
+ "q", line, "w", xmin, ymin, "m", xxmax, ymin, "l", xmax, ymin, xmax, yymin, "y",
+ xmax, yymax, "l", xmax, ymax, xxmax, ymax, "y", xmin, ymax, "l", xmin, ymin, "l",
+ "h", how, "Q",
+ }
+ elseif method == 5 then
+ list = {
+ "q", line, "w", xmin, ymin, "m", xmax, ymin, "l", xmax, yymax, "l", xmax, ymax,
+ xxmax, ymax, "y", xmin, ymax, "l", xmin, ymin, "l", "h", how, "Q",
+ }
+ elseif method == 6 then
+ list = {
+ "q", line, "w", xmin, ymin, "m", xxmax, ymin, "l", xmax, ymin, xmax, yymin, "y",
+ xmax, ymax, "l", xmin, ymax, "l", xmin, ymin, "l", "h", how, "Q",
+ }
+ elseif method == 7 then
+ list = {
+ "q", line, "w", xxmin, ymin, "m", xmax, ymin, "l", xmax, ymax, "l", xmin, ymax,
+ "l", xmin, yymin, "l", xmin, ymin, xxmin, ymin, "y", "h", how, "Q",
+ }
+ elseif method == 8 then
+ list = {
+ "q", line, "w", xmin, ymin, "m", xmax, ymin, "l", xmax, ymax, "l", xxmin, ymax,
+ "l", xmin, ymax, xmin, yymax, "y", xmin, ymin, "l", "h", how, "Q",
+ }
+ elseif method == 9 then
+ list = {
+ "q", line, "w", xmin, ymax, "m", xmin, yymin, "l", xmin, ymin, xxmin, ymin, "y",
+ xxmax, ymin, "l", xmax, ymin, xmax, yymin, "y", xmax, ymax, "l", how, "Q",
+ }
+ elseif method == 10 then
+ list = {
+ "q", line, "w", xmax, ymax, "m", xxmin, ymax, "l", xmin, ymax, xmin, yymax, "y",
+ xmin, yymin, "l", xmin, ymin, xxmin, ymin, "y", xmax, ymin, "l", how, "Q",
+ }
+ elseif method == 11 then
+ list = {
+ "q", line, "w", xmax, ymin, "m", xmax, yymax, "l", xmax, ymax, xxmax, ymax, "y",
+ xxmin, ymax, "l", xmin, ymax, xmin, yymax, "y", xmin, ymin, "l", how, "Q",
+ }
+ elseif method == 12 then
+ list = {
+ "q", line, "w", xmin, ymax, "m", xxmax, ymax, "l", xmax, ymax, xmax, yymax, "y",
+ xmax, yymin, "l", xmax, ymin, xxmax, ymin, "y", xmin, ymin, "l", how, "Q",
+ }
+ elseif method == 13 then
+ list = {
+ "q", line, "w", xmin, ymax, "m", xxmax, ymax, "l", xmax, ymax, xmax, yymax, "y",
+ xmax, ymin, "l", how, "Q",
+ }
+ elseif method == 14 then
+ list = {
+ "q", line, "w", xmax, ymax, "m", xmax, yymin, "l", xmax, ymin, xxmax, ymin, "y",
+ xmin, ymin, "l", how, "Q",
+ }
+ elseif method == 15 then
+ list = {
+ "q", line, "w", xmax, ymin, "m", xxmin, ymin, "l", xmin, ymin, xmin, yymin, "y",
+ xmin, ymax, "l", how, "Q",
+ }
+ elseif method == 16 then
+ list = {
+ "q", line, "w", xmin, ymin, "m", xmin, yymax, "l", xmin, ymax, xxmin, ymax, "y",
+ xmax, ymax, "l", how, "Q",
+ }
+ elseif method == 17 then
+ list = {
+ "q", line, "w", xxmax, ymax, "m", xmax, ymax, xmax, yymax, "y", how, "Q",
+ }
+ elseif method == 18 then
+ list = {
+ "q", line, "w", xmax, yymin, "m", xmax, ymin, xxmax, ymin, "y", how, "Q",
+ }
+ elseif method == 19 then
+ list = {
+ "q", line, "w", xxmin, ymin, "m", xmin, ymin, xmin, yymin, "y", how, "Q",
+ }
+ elseif method == 20 then
+ list = {
+ "q", line, "w", xmin, yymax, "m", xmin, ymax, xxmin, ymax, "y", how, "Q",
+ }
+ elseif method == 21 then
+ list = {
+ "q", line, "w", xxmax, ymax, "m", xmax, ymax, xmax, yymax, "y", xmin, yymax, "m",
+ xmin, ymax, xxmin, ymax, "y", how, "Q",
+ }
+ elseif method == 22 then
+ list = {
+ "q", line, "w", xxmax, ymax, "m", xmax, ymax, xmax, yymax, "y", xmax, yymin, "m",
+ xmax, ymin, xxmax, ymin, "y", how, "Q",
+ }
+ elseif method == 23 then
+ list = {
+ "q", line, "w", xmax, yymin, "m", xmax, ymin, xxmax, ymin, "y", xxmin, ymin, "m",
+ xmin, ymin, xmin, yymin, "y", how, "Q",
+ }
+ elseif method == 24 then
+ list = {
+ "q", line, "w", xxmin, ymin, "m", xmin, ymin, xmin, yymin, "y", xmin, yymax, "m",
+ xmin, ymax, xxmin, ymax, "y", how, "Q",
+ }
+ elseif method == 25 then
+ list = {
+ "q", line, "w", xxmax, ymax, "m", xmax, ymax, xmax, yymax, "y", xmax, yymin, "m",
+ xmax, ymin, xxmax, ymin, "y", xxmin, ymin, "m", xmin, ymin, xmin, yymin, "y",
+ xmin, yymax, "m", xmin, ymax, xxmin, ymax, "y", how, "Q",
+ }
+ elseif method == 26 then
+ list = {
+ "q", line, "w", xmax, yymin, "m", xmax, ymin, xxmax, ymin, "y", xmin, yymax, "m",
+ xmin, ymax, xxmin, ymax, "y", how, "Q",
+ }
+
+ elseif method == 27 then
+ list = {
+ "q", line, "w", xxmax, ymax, "m", xmax, ymax, xmax, yymax, "y", xxmin, ymin, "m",
+ xmin, ymin, xmin, yymin, "y", how, "Q",
+ }
+ end
+ pdfprint("direct",concat(list," "))
+ end
+ end
+
+ local f_rectangle = formatters["%.6N w %.6N %.6N %.6N %.6N re %s"]
+ local f_baselined = formatters["%.6N w %.6N %.6N %.6N %.6N re s %.6N %.6N m %.6N %.6N l s"]
+ local f_dashlined = formatters["%.6N w %.6N %.6N %.6N %.6N re s [%.6N %.6N] 2 d %.6N %.6N m %.6N %.6N l s"]
+ local f_radtangle = formatters[
+[[%.6N w %.6N %.6N m
+%.6N %.6N l %.6N %.6N %.6N %.6N y
+%.6N %.6N l %.6N %.6N %.6N %.6N y
+%.6N %.6N l %.6N %.6N %.6N %.6N y
+%.6N %.6N l %.6N %.6N %.6N %.6N y
+h %s]]
+ ]
+
+ local rule_any = function(p,h,v,i,n)
+ if p.corner then
+ return round(p,i)
+ else
+ local l = (p.line or 65536)*bpfactor
+ local r = p and (p.radius or 0)*bpfactor or 0
+ local w = h * bpfactor
+ local h = v * bpfactor
+ local m = nil
+ local t = i == "fill" and "f" or "s"
+ local o = l / 2
+ if r > 0 then
+ w = w - o
+ h = h - o
+ m = f_radtangle(l, r,o, w-r,o, w,o,w,r, w,h-r, w,h,w-r,h, r,h, o,h,o,h-r, o,r, o,o,r,o, t)
+ else
+ w = w - l
+ h = h - l
+ m = f_rectangle(l,o,o,w,h,t)
+ end
+ pdfprint("direct",m)
+ end
+ end
+
+ local function rule_box(p,h,v,i,n)
+ local w, h, d = getwhd(n)
+ local line = p.line or 65536
+ local l = line *bpfactor
+ local w = w * bpfactor
+ local h = h * bpfactor
+ local d = d * bpfactor
+ local o = l / 2
+ if (d >= 0 and h >= 0) or (d <= 0 and h <= 0) then
+ local dashed = tonumber(p.dashed)
+ if dashed and dashed > 5*line then
+ dashed = dashed * bpfactor
+ local delta = (w - 2*dashed*floor(w/(2*dashed)))/2
+ pdfprint("direct",f_dashlined(l,o,o,w-l,h+d-l,dashed,dashed,delta,d,w-delta,d))
+ else
+ pdfprint("direct",f_baselined(l,o,o,w-l,h+d-l,0,d,w,d))
+ end
+ else
+ pdfprint("direct",f_rectangle(l,o,o,w-l,h+d-l))
+ end
+ end
+
+ updaters.register("backend.update.lpdf",function()
+ ruleactions.fill = rule_any
+ ruleactions.draw = rule_any
+ ruleactions.stroke = rule_any
+ ruleactions.box = rule_box
+ end)
+
+end
+
+
+ ruleactions.mp = unsupported
+
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-tag.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-tag.lmt
new file mode 100644
index 00000000000..44a84ea59bb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-tag.lmt
@@ -0,0 +1,743 @@
+if not modules then modules = { } end modules ['lpdf-tag'] = {
+ version = 1.001,
+ comment = "companion to lpdf-tag.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, type = next, type
+local format, match, gmatch = string.format, string.match, string.gmatch
+local concat, sortedhash = table.concat, table.sortedhash
+local lpegmatch, P, S, C = lpeg.match, lpeg.P, lpeg.S, lpeg.C
+local settings_to_hash = utilities.parsers.settings_to_hash
+local formatters = string.formatters
+
+local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end)
+local trace_info = false trackers.register("structures.tags.info", function(v) trace_info = v end)
+
+local report_tags = logs.reporter("backend","tags")
+
+local backends = backends
+local lpdf = lpdf
+local nodes = nodes
+
+local nodeinjections = backends.pdf.nodeinjections
+local codeinjections = backends.pdf.codeinjections
+
+local enableaction = nodes.tasks.enableaction
+local disableaction = nodes.tasks.disableaction
+
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfboolean = lpdf.boolean
+local pdfconstant = lpdf.constant
+local pdfreference = lpdf.reference
+local pdfunicode = lpdf.unicode
+local pdfmakenametree = lpdf.makenametree
+
+local addtocatalog = lpdf.addtocatalog
+local addtopageattributes = lpdf.addtopageattributes
+
+local pdfflushobject
+local pdfreserveobject
+local pdfpagereference
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+ pdfreserveobject = lpdf.reserveobject
+ pdfpagereference = lpdf.pagereference
+end)
+
+local texgetcount = tex.getcount
+
+local nodecodes = nodes.nodecodes
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glyph_code = nodecodes.glyph
+
+local a_tagged = attributes.private('tagged')
+local a_image = attributes.private('image')
+
+local nuts = nodes.nuts
+
+local nodepool = nuts.pool
+local setstate = nodepool.setstate
+local register = nodepool.register
+
+local getid = nuts.getid
+local getattr = nuts.getattr
+local getprev = nuts.getprev
+local getnext = nuts.getnext
+local getlist = nuts.getlist
+local getchar = nuts.getchar
+
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+
+local copy_node = nuts.copy
+local tosequence = nuts.tosequence
+
+local nextnode = nuts.traversers.node
+
+local structure_kids -- delayed
+local structure_ref -- delayed
+local parent_ref -- delayed
+local root -- delayed
+local names = { }
+local tree = { }
+local elements = { }
+
+local structurestags = structures.tags
+local taglist = structurestags.taglist
+local specifications = structurestags.specifications
+local usedlabels = structurestags.labels
+local properties = structurestags.properties
+local usewithcare = structurestags.usewithcare
+
+local usedmapping = { }
+
+----- tagsplitter = structurestags.patterns.splitter
+
+local embeddedtags = false -- true will id all, for tracing, otherwise table
+local f_tagid = formatters["%s-%04i"]
+local embeddedfilelist = pdfarray() -- /AF crap
+
+-- for testing, not that it was ever used:
+
+directives.register("structures.tags.embed",function(v)
+ if type(v) == "string" then
+ if type(embeddedtags) ~= "table" then
+ embeddedtags = { }
+ end
+ for s in gmatch(v,"([^, ]+)") do
+ embeddedtags[s] = true
+ end
+ elseif v and not embeddedtags then
+ embeddedtags = true
+ end
+end)
+
+-- for old times sake, not that it was ever used:
+
+directives.register("structures.tags.embedmath",function(v)
+ if not v then
+ -- only enable
+ elseif embeddedtags == true then
+ -- already all tagged
+ elseif embeddedtags then
+ embeddedtags.math = true
+ else
+ embeddedtags = { math = true }
+ end
+end)
+
+function codeinjections.maptag(original,target,kind)
+ mapping[original] = { target, kind or "inline" }
+end
+
+-- mostly the same as the annotations tree
+
+local function finishstructure()
+ if root and #structure_kids > 0 then
+ local nums = pdfarray()
+ local n = 0
+ for i=1,#tree do
+ n = n + 1 ; nums[n] = i - 1
+ n = n + 1 ; nums[n] = pdfreference(pdfflushobject(tree[i]))
+ end
+ local parenttree = pdfdictionary {
+ Nums = nums
+ }
+ local idtree = pdfmakenametree(names)
+ --
+ local rolemap = pdfdictionary()
+ for k, v in next, usedmapping do
+ k = usedlabels[k] or k
+ local p = properties[k]
+ rolemap[k] = pdfconstant(p and p.pdf or "Span") -- or "Div"
+ end
+ local structuretree = pdfdictionary {
+ Type = pdfconstant("StructTreeRoot"),
+ K = pdfreference(pdfflushobject(structure_kids)),
+ ParentTree = pdfreference(pdfflushobject(parent_ref,parenttree)),
+ IDTree = idtree,
+ RoleMap = rolemap, -- sorted ?
+ }
+ pdfflushobject(structure_ref,structuretree)
+ addtocatalog("StructTreeRoot",pdfreference(structure_ref))
+ --
+ if lpdf.majorversion() == 1 then
+ local markinfo = pdfdictionary {
+ Marked = pdfboolean(true) or nil,
+ -- UserProperties = pdfboolean(true), -- maybe some day
+ -- Suspects = pdfboolean(true) or nil,
+ -- AF = #embeddedfilelist > 0 and pdfreference(pdfflushobject(embeddedfilelist)) or nil,
+ }
+ addtocatalog("MarkInfo",pdfreference(pdfflushobject(markinfo)))
+ end
+ --
+ for fulltag, element in sortedhash(elements) do -- sorting is easier on comparing pdf
+ pdfflushobject(element.knum,element.kids)
+ end
+ end
+end
+
+lpdf.registerdocumentfinalizer(finishstructure,"document structure")
+
+local index, pageref, pagenum, list = 0, nil, 0, nil
+
+local pdf_mcr = pdfconstant("MCR")
+local pdf_struct_element = pdfconstant("StructElem")
+local pdf_s = pdfconstant("S")
+
+local function initializepage()
+ index = 0
+ pagenum = texgetcount("realpageno")
+ pageref = pdfreference(pdfpagereference(pagenum))
+ list = pdfarray()
+ tree[pagenum] = list -- we can flush after done, todo
+end
+
+local function finishpage()
+ -- flush what can be flushed
+ addtopageattributes("StructParents",pagenum-1)
+ -- there might be more
+ addtopageattributes("Tabs",s)
+end
+
+-- here we can flush and free elements that are finished
+
+local pdf_userproperties = pdfconstant("UserProperties")
+
+-- /O /Table
+-- /Headers [ ]
+
+local function makeattribute(t)
+ if t and next(t) then
+ local properties = pdfarray()
+ for k, v in sortedhash(t) do -- easier on comparing pdf
+ properties[#properties+1] = pdfdictionary {
+ N = pdfunicode(k),
+ V = pdfunicode(v),
+ }
+ end
+ return pdfdictionary {
+ O = pdf_userproperties,
+ P = properties,
+ }
+ end
+end
+
+local function makeelement(fulltag,parent)
+ local specification = specifications[fulltag]
+ local tagname = specification.tagname
+ local tagnameused = tagname
+ local attributes = nil
+ if tagname == "ignore" then
+ return false
+ elseif tagname == "mstackertop" or tagname == "mstackerbot" or tagname == "mstackermid"then
+ -- TODO
+ return true
+ elseif tagname == "tabulatecell" then
+ local d = structurestags.gettabulatecell(fulltag)
+ if d and d.kind == 1 then
+ tagnameused = "tabulateheadcell"
+ end
+ elseif tagname == "tablecell" then
+ -- will become a plugin model
+ local d = structurestags.gettablecell(fulltag)
+ if d then
+ if d.kind == 1 then
+ tagnameused = "tableheadcell"
+ end
+ local rows = d.rows or 1
+ local cols = d.columns or 1
+ if rows > 1 or cols > 1 then
+ attributes = pdfdictionary {
+ O = pdfconstant("Table"),
+ RowSpan = rows > 1 and rows or nil,
+ ColSpan = cols > 1 and cols or nil,
+ }
+ end
+
+ end
+ end
+ --
+ local detail = specification.detail
+ local userdata = specification.userdata
+ --
+ usedmapping[tagname] = true
+ --
+ -- specification.attribute is unique
+ --
+ local id = nil
+ local af = nil
+ if embeddedtags then
+ local tagindex = specification.tagindex
+ if embeddedtags == true or embeddedtags[tagname] then
+ id = f_tagid(tagname,tagindex)
+ af = job.fileobjreferences.collected[id]
+ if af then
+ local r = pdfreference(af)
+ af = pdfarray { r }
+ -- embeddedfilelist[#embeddedfilelist+1] = r
+ end
+ end
+ end
+ --
+ local k = pdfarray()
+ local r = pdfreserveobject()
+ local t = usedlabels[tagnameused] or tagnameused
+ -- local a = nil
+ local d = pdfdictionary {
+ Type = pdf_struct_element,
+ S = pdfconstant(t),
+ ID = id,
+ T = detail and detail or nil,
+ P = parent.pref,
+ Pg = pageref,
+ K = pdfreference(r),
+ -- A = a and makeattribute(a) or nil,
+ A = attributes,
+ -- Alt = " Who cares ",
+ -- ActualText = " Hi Hans ",
+ AF = af,
+ }
+ local s = pdfreference(pdfflushobject(d))
+ if id and names then
+ names[id] = s
+ end
+ local kids = parent.kids
+ kids[#kids+1] = s
+ local e = {
+ tag = t,
+ pref = s,
+ kids = k,
+ knum = r,
+ pnum = pagenum
+ }
+ elements[fulltag] = e
+ return e
+end
+
+local f_BDC = formatters["/%s <</MCID %s>> BDC"]
+
+local function makecontent(parent,id,specification)
+ local tag = parent.tag
+ local kids = parent.kids
+ local last = index
+ if id == "image" then
+ local list = specification.taglist
+ local data = usewithcare.images[list[#list]]
+ local label = data and data.label
+ local d = pdfdictionary {
+ Type = pdf_mcr,
+ Pg = pageref,
+ MCID = last,
+ Alt = pdfunicode(label ~= "" and label or "image"),
+ }
+ kids[#kids+1] = d
+ elseif pagenum == parent.pnum then
+ kids[#kids+1] = last
+ else
+ local d = pdfdictionary {
+ Type = pdf_mcr,
+ Pg = pageref,
+ MCID = last,
+ }
+ -- kids[#kids+1] = pdfreference(pdfflushobject(d))
+ kids[#kids+1] = d
+ end
+ --
+ index = index + 1
+ list[index] = parent.pref -- page related list
+ --
+ return f_BDC(tag,last)
+end
+
+local function makeignore(specification)
+ return "/Artifact BMC"
+end
+
+-- no need to adapt head, as we always operate on lists
+
+local EMCliteral = nil
+local visualize = nil
+
+function nodeinjections.addtags(head)
+
+ if not EMCliteral then
+ EMCliteral = register(setstate("EMC"))
+ end
+
+ local last = nil
+ local ranges = { }
+ local range = nil
+
+ if not root then
+ structure_kids = pdfarray()
+ structure_ref = pdfreserveobject()
+ parent_ref = pdfreserveobject()
+ root = { pref = pdfreference(structure_ref), kids = structure_kids }
+ names = pdfarray()
+ end
+
+ local function collectranges(head,list)
+ for n, id in nextnode, head do
+ if id == glyph_code then
+ -- maybe also disc
+if getchar(n) ~= 0 then
+ local at = getattr(n,a_tagged) or false -- false: pagebody or so, so artifact
+ -- if not at then
+ -- range = nil
+ -- elseif ...
+ if last ~= at then
+ range = { at, "glyph", n, n, list } -- attr id start stop list
+ ranges[#ranges+1] = range
+ last = at
+ elseif range then
+ range[4] = n -- stop
+ end
+end
+ elseif id == hlist_code or id == vlist_code then
+ local at = getattr(n,a_image)
+ if at then
+ local at = getattr(n,a_tagged) or false -- false: pagebody or so, so artifact
+ -- if not at then
+ -- range = nil
+ -- else
+ ranges[#ranges+1] = { at, "image", n, n, list } -- attr id start stop list
+ -- end
+ last = nil
+ else
+ local list = getlist(n)
+ if list then
+ collectranges(list,n)
+ end
+ end
+ end
+ end
+ end
+
+ initializepage()
+
+ collectranges(head)
+
+-- inspect(taglist)
+-- inspect(ranges)
+
+ if trace_tags then
+ for i=1,#ranges do
+ local range = ranges[i]
+ local attr = range[1]
+ local id = range[2]
+ local start = range[3]
+ local stop = range[4]
+ local tags = taglist[attr]
+ if tags then -- not ok ... only first lines
+ report_tags("%s => %s : %05i % t",tosequence(start,start),tosequence(stop,stop),attr,tags.taglist)
+ end
+ end
+ end
+
+ local top = nil
+ local noftop = 0
+
+ local function inject(start,stop,list,literal,left,right)
+ local prev = getprev(start)
+ if prev then
+ setlink(prev,literal)
+ end
+ if left then
+ setlink(literal,left,start)
+ else
+ setlink(literal,start)
+ end
+ if list and not prev then
+ setlist(list,literal)
+ end
+ local literal = copy_node(EMCliteral)
+ -- use insert instead:
+ local next = getnext(stop)
+ if next then
+ setlink(literal,next)
+ end
+ if right then
+ setlink(stop,right,literal)
+ else
+ setlink(stop,literal)
+ end
+ end
+
+ for i=1,#ranges do
+
+ local range = ranges[i]
+ local attr = range[1]
+ local id = range[2]
+ local start = range[3]
+ local stop = range[4]
+ local list = range[5]
+
+ if attr then
+
+ local specification = taglist[attr]
+ local taglist = specification.taglist
+ local noftags = #taglist
+ local common = 0
+ local literal = nil
+ local ignore = false
+
+ if top then
+ for i=1,noftags >= noftop and noftop or noftags do
+ if top[i] == taglist[i] then
+ common = i
+ else
+ break
+ end
+ end
+ end
+
+ local prev = common > 0 and elements[taglist[common]] or root
+
+ for j=common+1,noftags do
+ local tag = taglist[j]
+ local prv = elements[tag] or makeelement(tag,prev)
+ if prv == false then
+ -- ignore this one
+ prev = false
+ ignore = true
+ break
+ elseif prv == true then
+ -- skip this one
+ else
+ prev = prv
+ end
+ end
+ if prev then
+ literal = setstate(makecontent(prev,id,specification))
+ elseif ignore then
+ literal = setstate(makeignore(specification))
+ else
+ -- maybe also ignore or maybe better: comment or so
+ end
+
+ if literal then
+ local left,right
+ if trace_info then
+ local name = specification.tagname
+ if name then
+ if not visualize then
+ visualize = nodes.visualizers.register("tags")
+ end
+ left = visualize(name)
+ right = visualize()
+ end
+ end
+ inject(start,stop,list,literal,left,right)
+ end
+
+ top = taglist
+ noftop = noftags
+
+ else
+
+ local literal = setstate(makeignore(specification))
+
+ inject(start,stop,list,literal)
+
+ end
+
+ end
+
+ finishpage()
+
+ return head
+
+end
+
+-- variant: more structure but funny collapsing in viewer
+
+-- function nodeinjections.addtags(head)
+--
+-- local last, ranges, range = nil, { }, nil
+--
+-- local function collectranges(head,list)
+-- for n, id in nextnode, head do
+-- if id == glyph_code then
+-- local at = getattr(n,a_tagged)
+-- if not at then
+-- range = nil
+-- elseif last ~= at then
+-- range = { at, "glyph", n, n, list } -- attr id start stop list
+-- ranges[#ranges+1] = range
+-- last = at
+-- elseif range then
+-- range[4] = n -- stop
+-- end
+-- elseif id == hlist_code or id == vlist_code then
+-- local at = getattr(n,a_image)
+-- if at then
+-- local at = getattr(n,a_tagged)
+-- if not at then
+-- range = nil
+-- else
+-- ranges[#ranges+1] = { at, "image", n, n, list } -- attr id start stop list
+-- end
+-- last = nil
+-- else
+-- local nl = getlist(n)
+-- collectranges(nl,n)
+-- end
+-- end
+-- end
+-- end
+--
+-- initializepage()
+--
+-- collectranges(head)
+--
+-- if trace_tags then
+-- for i=1,#ranges do
+-- local range = ranges[i]
+-- local attr = range[1]
+-- local id = range[2]
+-- local start = range[3]
+-- local stop = range[4]
+-- local tags = taglist[attr]
+-- if tags then -- not ok ... only first lines
+-- report_tags("%s => %s : %05i % t",tosequence(start,start),tosequence(stop,stop),attr,tags.taglist)
+-- end
+-- end
+-- end
+--
+-- local top = nil
+-- local noftop = 0
+-- local last = nil
+--
+-- for i=1,#ranges do
+-- local range = ranges[i]
+-- local attr = range[1]
+-- local id = range[2]
+-- local start = range[3]
+-- local stop = range[4]
+-- local list = range[5]
+-- local specification = taglist[attr]
+-- local taglist = specification.taglist
+-- local noftags = #taglist
+-- local tag = nil
+-- local common = 0
+-- -- local prev = root
+--
+-- if top then
+-- for i=1,noftags >= noftop and noftop or noftags do
+-- if top[i] == taglist[i] then
+-- common = i
+-- else
+-- break
+-- end
+-- end
+-- end
+--
+-- local result = { }
+-- local r = noftop - common
+-- if r > 0 then
+-- for i=1,r do
+-- result[i] = "EMC"
+-- end
+-- end
+--
+-- local prev = common > 0 and elements[taglist[common]] or root
+--
+-- for j=common+1,noftags do
+-- local tag = taglist[j]
+-- local prv = elements[tag] or makeelement(tag,prev)
+-- -- if prv == false then
+-- -- -- ignore this one
+-- -- prev = false
+-- -- break
+-- -- elseif prv == true then
+-- -- -- skip this one
+-- -- else
+-- prev = prv
+-- r = r + 1
+-- result[r] = makecontent(prev,id)
+-- -- end
+-- end
+--
+-- if r > 0 then
+-- local literal = setstate(concat(result,"\n"))
+-- -- use insert instead:
+-- local literal = setstate(result)
+-- local prev = getprev(start)
+-- if prev then
+-- setlink(prev,literal)
+-- end
+-- setlink(literal,start)
+-- if list and getlist(list) == start then
+-- setlist(list,literal)
+-- end
+-- end
+--
+-- top = taglist
+-- noftop = noftags
+-- last = stop
+--
+-- end
+--
+-- if last and noftop > 0 then
+-- local result = { }
+-- for i=1,noftop do
+-- result[i] = "EMC"
+-- end
+-- local literal = setstate(concat(result,"\n"))
+-- -- use insert instead:
+-- local next = getnext(last)
+-- if next then
+-- setlink(literal,next)
+-- end
+-- setlink(last,literal)
+-- end
+--
+-- finishpage()
+--
+-- return head
+--
+-- end
+
+-- this belongs elsewhere (export is not pdf related)
+
+local permitted = true
+local enabled = false
+
+function codeinjections.settaggingsupport(option)
+ if option == false then
+ if enabled then
+ disableaction("shipouts","structures.tags.handler")
+ disableaction("shipouts","nodes.handlers.accessibility") -- maybe not this one
+ disableaction("math","noads.handlers.tags")
+ enabled = false
+ end
+ if permitted then
+ if trace_tags then
+ report_tags("blocking structure tags")
+ end
+ permitted = false
+ end
+ end
+end
+
+function codeinjections.enabletags()
+ if permitted and not enabled then
+ structures.tags.handler = nodeinjections.addtags
+ enableaction("shipouts","structures.tags.handler")
+ enableaction("shipouts","nodes.handlers.accessibility")
+ enableaction("math","noads.handlers.tags")
+ -- maybe also textblock
+ if trace_tags then
+ report_tags("enabling structure tags")
+ end
+ enabled = true
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-u3d.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-u3d.lmt
new file mode 100644
index 00000000000..6e02fde3044
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-u3d.lmt
@@ -0,0 +1,495 @@
+if not modules then modules = { } end modules ['lpdf-u3d'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- The following code is based on a working prototype provided
+-- by Michael Vidiassov. It is rewritten using the lpdf library
+-- and different checking is used. The macro calls are adapted
+-- (and will eventually be removed). The user interface needs
+-- an overhaul. There are some messy leftovers that will be
+-- removed in future versions.
+
+-- For some reason no one really tested this code so at some
+-- point we will end up with a reimplementation. For instance
+-- it makes sense to add the same activation code as with swf.
+
+local tonumber = tonumber
+local formatters, find = string.formatters, string.find
+local cos, sin, sqrt, pi, atan2, abs = math.cos, math.sin, math.sqrt, math.pi, math.atan2, math.abs
+
+local backends, lpdf = backends, lpdf
+
+local nodeinjections = backends.pdf.nodeinjections
+
+local pdfconstant = lpdf.constant
+local pdfboolean = lpdf.boolean
+local pdfunicode = lpdf.unicode
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfnull = lpdf.null
+local pdfreference = lpdf.reference
+
+local pdfflushstreamobject
+local pdfflushstreamfileobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushstreamobject = lpdf.flushstreamobject
+ pdfflushstreamfileobject = lpdf.flushstreamfileobject
+end)
+
+local checkedkey = lpdf.checkedkey
+local limited = lpdf.limited
+
+local embedimage = images.embed
+
+local schemes = table.tohash {
+ "Artwork", "None", "White", "Day", "Night", "Hard",
+ "Primary", "Blue", "Red", "Cube", "CAD", "Headlamp",
+}
+
+local modes = table.tohash {
+ "Solid", "SolidWireframe", "Transparent", "TransparentWireframe", "BoundingBox",
+ "TransparentBoundingBox", "TransparentBoundingBoxOutline", "Wireframe",
+ "ShadedWireframe", "HiddenWireframe", "Vertices", "ShadedVertices", "Illustration",
+ "SolidOutline", "ShadedIllustration",
+}
+
+local function normalize(x, y, z)
+ local modulo = sqrt(x*x + y*y + z*z);
+ if modulo ~= 0 then
+ return x/modulo, y/modulo, z/modulo
+ else
+ return x, y, z
+ end
+end
+
+local function rotate(vect_x,vect_y,vect_z, tet, axis_x,axis_y,axis_z)
+ -- rotate vect by tet about axis counterclockwise
+ local c, s = cos(tet*pi/180), sin(tet*pi/180)
+ local r = 1 - c
+ local n = sqrt(axis_x*axis_x+axis_y*axis_y+axis_z*axis_z)
+ axis_x, axis_y, axis_z = axis_x/n, axis_y/n, axis_z/n
+ return
+ (axis_x*axis_x*r+c )*vect_x + (axis_x*axis_y*r-axis_z*s)*vect_y + (axis_x*axis_z*r+axis_y*s)*vect_z,
+ (axis_x*axis_y*r+axis_z*s)*vect_x + (axis_y*axis_y*r+c )*vect_y + (axis_y*axis_z*r-axis_x*s)*vect_z,
+ (axis_x*axis_z*r-axis_y*s)*vect_x + (axis_y*axis_z*r+axis_x*s)*vect_y + (axis_z*axis_z*r+c )*vect_z
+end
+
+local function make3dview(view)
+
+ local name = view.name
+ local name = pdfunicode(name ~= "" and name or "unknown view")
+
+ local viewdict = pdfdictionary {
+ Type = pdfconstant("3DView"),
+ XN = name,
+ IN = name,
+ NR = true,
+ }
+
+ local bg = checkedkey(view,"bg","table")
+ if bg then
+ viewdict.BG = pdfdictionary {
+ Type = pdfconstant("3DBG"),
+ C = pdfarray { limited(bg[1],1,1,1), limited(bg[2],1,1,1), limited(bg[3],1,1,1) },
+ }
+ end
+
+ local lights = checkedkey(view,"lights","string")
+ if lights and schemes[lights] then
+ viewdict.LS = pdfdictionary {
+ Type = pdfconstant("3DLightingScheme"),
+ Subtype = pdfconstant(lights),
+ }
+ end
+
+ -- camera position is taken from 3d model
+
+ local u3dview = checkedkey(view, "u3dview", "string")
+ if u3dview then
+ viewdict.MS = pdfconstant("U3D")
+ viewdict.U3DPath = u3dview
+ end
+
+ -- position the camera as given
+
+ local c2c = checkedkey(view, "c2c", "table")
+ local coo = checkedkey(view, "coo", "table")
+ local roo = checkedkey(view, "roo", "number")
+ local azimuth = checkedkey(view, "azimuth", "number")
+ local altitude = checkedkey(view, "altitude", "number")
+
+ if c2c or coo or roo or azimuth or altitude then
+
+ local pos = checkedkey(view, "pos", "table")
+ local dir = checkedkey(view, "dir", "table")
+ local upv = checkedkey(view, "upv", "table")
+ local roll = checkedkey(view, "roll", "table")
+
+ local coo_x, coo_y, coo_z = 0, 0, 0
+ local dir_x, dir_y, dir_z = 0, 0, 0
+ local trans_x, trans_y, trans_z = 0, 0, 0
+ local left_x, left_y, left_z = 0, 0, 0
+ local up_x, up_y, up_z = 0, 0, 0
+
+ -- point camera is aimed at
+
+ if coo then
+ coo_x, coo_y, coo_z = tonumber(coo[1]) or 0, tonumber(coo[2]) or 0, tonumber(coo[3]) or 0
+ end
+
+ -- distance from camera to target
+
+ if roo then
+ roo = abs(roo)
+ end
+ if not roo or roo == 0 then
+ roo = 0.000000000000000001
+ end
+
+ -- set it via camera position
+
+ if pos then
+ dir_x = coo_x - (tonumber(pos[1]) or 0)
+ dir_y = coo_y - (tonumber(pos[2]) or 0)
+ dir_z = coo_z - (tonumber(pos[3]) or 0)
+ if not roo then
+ roo = sqrt(dir_x*dir_x + dir_y*dir_y + dir_z*dir_z)
+ end
+ if dir_x == 0 and dir_y == 0 and dir_z == 0 then dir_y = 1 end
+ dir_x, dir_y, dir_z = normalize(dir_x,dir_y,dir_z)
+ end
+
+ -- set it directly
+
+ if dir then
+ dir_x, dir_y, dir_z = tonumber(dir[1] or 0), tonumber(dir[2] or 0), tonumber(dir[3] or 0)
+ if dir_x == 0 and dir_y == 0 and dir_z == 0 then dir_y = 1 end
+ dir_x, dir_y, dir_z = normalize(dir_x,dir_y,dir_z)
+ end
+
+ -- set it movie15 style with vector from target to camera
+
+ if c2c then
+ dir_x, dir_y, dir_z = - tonumber(c2c[1] or 0), - tonumber(c2c[2] or 0), - tonumber(c2c[3] or 0)
+ if dir_x == 0 and dir_y == 0 and dir_z == 0 then dir_y = 1 end
+ dir_x, dir_y, dir_z = normalize(dir_x,dir_y,dir_z)
+ end
+
+ -- set it with azimuth and altitutde
+
+ if altitude or azimuth then
+ dir_x, dir_y, dir_z = -1, 0, 0
+ if altitude then dir_x, dir_y, dir_z = rotate(dir_x,dir_y,dir_z, -altitude, 0,1,0) end
+ if azimuth then dir_x, dir_y, dir_z = rotate(dir_x,dir_y,dir_z, azimuth, 0,0,1) end
+ end
+
+ -- set it with rotation like in MathGL
+
+ if rot then
+ if dir_x == 0 and dir_y == 0 and dir_z == 0 then dir_z = -1 end
+ dir_x,dir_y,dir_z = rotate(dir_x,dir_y,dir_z, tonumber(rot[1]) or 0, 1,0,0)
+ dir_x,dir_y,dir_z = rotate(dir_x,dir_y,dir_z, tonumber(rot[2]) or 0, 0,1,0)
+ dir_x,dir_y,dir_z = rotate(dir_x,dir_y,dir_z, tonumber(rot[3]) or 0, 0,0,1)
+ end
+
+ -- set it with default movie15 orientation looking up y axis
+
+ if dir_x == 0 and dir_y == 0 and dir_z == 0 then dir_y = 1 end
+
+ -- left-vector
+ -- up-vector
+
+ if upv then
+ up_x, up_y, up_z = tonumber(upv[1]) or 0, tonumber(upv[2]) or 0, tonumber(upv[3]) or 0
+ else
+ -- set default up-vector
+ if abs(dir_x) == 0 and abs(dir_y) == 0 then
+ if dir_z < 0 then
+ up_y = 1 -- top view
+ else
+ up_y = -1 -- bottom view
+ end
+ else
+ -- other camera positions than top and bottom, up-vector = up_world - (up_world dot dir) dir
+ up_x, up_y, up_z = - dir_z*dir_x, - dir_z*dir_y, - dir_z*dir_z + 1
+ end
+ end
+
+ -- normalize up-vector
+
+ up_x, up_y, up_z = normalize(up_x,up_y,up_z)
+
+ -- left vector = up x dir
+
+ left_x, left_y, left_z = dir_z*up_y - dir_y*up_z, dir_x*up_z - dir_z*up_x, dir_y*up_x - dir_x*up_y
+
+ -- normalize left vector
+
+ left_x, left_y, left_z = normalize(left_x,left_y,left_z)
+
+ -- apply camera roll
+
+ if roll then
+ local sinroll = sin((roll/180.0)*pi)
+ local cosroll = cos((roll/180.0)*pi)
+ left_x = left_x*cosroll + up_x*sinroll
+ left_y = left_y*cosroll + up_y*sinroll
+ left_z = left_z*cosroll + up_z*sinroll
+ up_x = up_x*cosroll + left_x*sinroll
+ up_y = up_y*cosroll + left_y*sinroll
+ up_z = up_z*cosroll + left_z*sinroll
+ end
+
+ -- translation vector
+
+ trans_x, trans_y, trans_z = coo_x - roo*dir_x, coo_y - roo*dir_y, coo_z - roo*dir_z
+
+ viewdict.MS = pdfconstant("M")
+ viewdict.CO = roo
+ viewdict.C2W = pdfarray {
+ left_x, left_y, left_z,
+ up_x, up_y, up_z,
+ dir_x, dir_y, dir_z,
+ trans_x, trans_y, trans_z,
+ }
+
+ end
+
+ local aac = tonumber(view.aac) -- perspective projection
+ local mag = tonumber(view.mag) -- ortho projection
+
+ if aac and aac > 0 and aac < 180 then
+ viewdict.P = pdfdictionary {
+ Subtype = pdfconstant("P"),
+ PS = pdfconstant("Min"),
+ FOV = aac,
+ }
+ elseif mag and mag > 0 then
+ viewdict.P = pdfdictionary {
+ Subtype = pdfconstant("O"),
+ OS = mag,
+ }
+ end
+
+ local mode = modes[view.rendermode]
+ if mode then
+ pdfdictionary {
+ Type = pdfconstant("3DRenderMode"),
+ Subtype = pdfconstant(mode),
+ }
+ end
+
+ -- crosssection
+
+ local crosssection = checkedkey(view,"crosssection","table")
+ if crosssection then
+ local crossdict = pdfdictionary {
+ Type = pdfconstant("3DCrossSection")
+ }
+
+ local c = checkedkey(crosssection,"point","table") or checkedkey(crosssection,"center","table")
+ if c then
+ crossdict.C = pdfarray { tonumber(c[1]) or 0, tonumber(c[2]) or 0, tonumber(c[3]) or 0 }
+ end
+
+ local normal = checkedkey(crosssection,"normal","table")
+ if normal then
+ local x, y, z = tonumber(normal[1] or 0), tonumber(normal[2] or 0), tonumber(normal[3] or 0)
+ if sqrt(x*x + y*y + z*z) == 0 then
+ x, y, z = 1, 0, 0
+ end
+ crossdict.O = pdfarray {
+ pdfnull,
+ atan2(-z,sqrt(x*x + y*y))*180/pi,
+ atan2(y,x)*180/pi,
+ }
+ end
+
+ local orient = checkedkey(crosssection,"orient","table")
+ if orient then
+ crossdict.O = pdfarray {
+ tonumber(orient[1]) or 1,
+ tonumber(orient[2]) or 0,
+ tonumber(orient[3]) or 0,
+ }
+ end
+
+ crossdict.IV = cross.intersection or false
+ crossdict.ST = cross.transparent or false
+
+ viewdict.SA = next(crossdict) and pdfarray { crossdict } -- maybe test if # > 1
+ end
+
+ local nodes = checkedkey(view,"nodes","table")
+ if nodes then
+ local nodelist = pdfarray()
+ for i=1,#nodes do
+ local node = checkedkey(nodes,i,"table")
+ if node then
+ local position = checkedkey(node,"position","table")
+ nodelist[#nodelist+1] = pdfdictionary {
+ Type = pdfconstant("3DNode"),
+ N = node.name or ("node_" .. i), -- pdfunicode ?
+ M = position and #position == 12 and pdfarray(position),
+ V = node.visible or true,
+ O = node.opacity or 0,
+ RM = pdfdictionary {
+ Type = pdfconstant("3DRenderMode"),
+ Subtype = pdfconstant(node.rendermode or "Solid"),
+ },
+ }
+ end
+ end
+ viewdict.NA = nodelist
+ end
+
+ return viewdict
+
+end
+
+local stored_js, stored_3d, stored_pr, streams = { }, { }, { }, { }
+
+local f_image = formatters["q /GS gs %.6N 0 0 %.6N 0 0 cm /IM Do Q"]
+
+local function insert3d(spec) -- width, height, factor, display, controls, label, foundname
+
+ local width, height, factor = spec.width, spec.height, spec.factor or number.dimenfactors.bp
+ local display, controls, label, foundname = spec.display, spec.controls, spec.label, spec.foundname
+
+ local param = (display and parametersets[display]) or { }
+ local streamparam = (controls and parametersets[controls]) or { }
+ local name = "3D Artwork " .. (param.name or label or "Unknown")
+
+ local activationdict = pdfdictionary {
+ TB = pdfboolean(param.toolbar,true),
+ NP = pdfboolean(param.tree,false),
+ }
+
+ local stream = streams[label]
+ if not stream then
+
+ local subtype, subdata = "U3D", io.loaddata(foundname) or ""
+ if find(subdata,"^PRC") then
+ subtype = "PRC"
+ elseif find(subdata,"^U3D") then
+ subtype = "U3D"
+ elseif file.suffix(foundname) == "prc" then
+ subtype = "PRC"
+ end
+
+ local attr = pdfdictionary {
+ Type = pdfconstant("3D"),
+ Subtype = pdfconstant(subtype),
+ }
+ local streamviews = checkedkey(streamparam, "views", "table")
+ if streamviews then
+ local list = pdfarray()
+ for i=1,#streamviews do
+ local v = checkedkey(streamviews, i, "table")
+ if v then
+ list[#list+1] = make3dview(v)
+ end
+ end
+ attr.VA = list
+ end
+ if checkedkey(streamparam, "view", "table") then
+ attr.DV = make3dview(streamparam.view)
+ elseif checkedkey(streamparam, "view", "string") then
+ attr.DV = streamparam.view
+ end
+ local js = checkedkey(streamparam, "js", "string")
+ if js then
+ local jsref = stored_js[js]
+ if not jsref then
+ jsref = pdfflushstreamfileobject(js)
+ stored_js[js] = jsref
+ end
+ attr.OnInstantiate = pdfreference(jsref)
+ end
+ stored_3d[label] = pdfflushstreamfileobject(foundname,attr)
+ stream = 1
+ else
+ stream = stream + 1
+ end
+ streams[label] = stream
+
+ local name = pdfunicode(name)
+
+ local annot = pdfdictionary {
+ Subtype = pdfconstant("3D"),
+ T = name,
+ Contents = name,
+ NM = name,
+ ["3DD"] = pdfreference(stored_3d[label]),
+ ["3DA"] = activationdict,
+ }
+ if checkedkey(param,"view","table") then
+ annot["3DV"] = make3dview(param.view)
+ elseif checkedkey(param,"view","string") then
+ annot["3DV"] = param.view
+ end
+
+ local preview = checkedkey(param,"preview","string")
+ if preview then
+ activationdict.A = pdfconstant("XA")
+ local tag = formatters["%s:%s:%s"](label,stream,preview)
+ local ref = stored_pr[tag]
+ if not ref then
+ local figure = embedimage {
+ filename = preview,
+ width = width,
+ height = height
+ }
+ ref = figure.objnum
+ stored_pr[tag] = ref
+ end
+ if ref then -- see back-pdf ** .. here we have a local /IM !
+ local pw = pdfdictionary {
+ Type = pdfconstant("XObject"),
+ Subtype = pdfconstant("Form"),
+ FormType = 1,
+ BBox = pdfarray { 0, 0, pdfnumber(factor*width), pdfnumber(factor*height) },
+ Matrix = pdfarray { 1, 0, 0, 1, 0, 0 },
+ ProcSet = lpdf.procset(),
+ Resources = pdfdictionary {
+ XObject = pdfdictionary {
+ IM = pdfreference(ref)
+ }
+ },
+ ExtGState = pdfdictionary {
+ GS = pdfdictionary {
+ Type = pdfconstant("ExtGState"),
+ CA = 1,
+ ca = 1,
+ }
+ },
+ }
+ local pwd = pdfflushstreamobject(f_image(factor*width,factor*height),pw)
+ annot.AP = pdfdictionary {
+ N = pdfreference(pwd)
+ }
+ end
+ return annot, figure, ref
+ else
+ activationdict.A = pdfconstant("PV")
+ return annot, nil, nil
+ end
+end
+
+function nodeinjections.insertu3d(spec)
+ local annotation, preview, ref = insert3d { -- just spec
+ foundname = spec.foundname,
+ width = spec.width,
+ height = spec.height,
+ factor = spec.factor,
+ display = spec.display,
+ controls = spec.controls,
+ label = spec.label,
+ }
+ node.write(nodeinjections.annotation(spec.width,spec.height,0,annotation()))
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt
new file mode 100644
index 00000000000..268ca119e02
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-wid.lmt
@@ -0,0 +1,789 @@
+if not modules then modules = { } end modules ['lpdf-wid'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- It's about time to give up on media in pdf and admit that pdf lost it to html.
+-- First we had movies and sound, quite easy to deal with, but obsolete now. Then we
+-- had renditions but they turned out to be unreliable from the start and look
+-- obsolete too or at least they are bound to the (obsolete) flash technology for
+-- rendering. They were already complex constructs. Now we have rich media which
+-- instead of providing a robust future proof framework for general media types
+-- again seems to depend on viewers built in (yes, also kind of obsolete) flash
+-- technology, and we cannot expect this non-open technology to show up in open
+-- browsers. So, in the end we can best just use links to external resources to be
+-- future proof. Just look at the viewer preferences pane to see how fragile support
+-- is. Interestingly u3d support is kind of built in, while e.g. mp4 support relies
+-- on wrapping in swf. We used to stay ahead of the pack with support of the fancy
+-- pdf features but it backfires and is not worth the trouble. And yes, for control
+-- (even simple like starting and stopping videos) one has to revert to JavaScript,
+-- the other fragile bit. And, now that adobe quits flash in 2020 we're without any
+-- video anyway. Also, it won't play on all platforms and devices so let's wait for
+-- html5 media in pdf then.
+
+local tonumber, next = tonumber, next
+local gmatch, gsub, find, lower = string.gmatch, string.gsub, string.find, string.lower
+local filenameonly, basefilename, filesuffix, addfilesuffix = file.nameonly, file.basename, file.suffix, file.addsuffix
+local isfile, modificationtime = lfs.isfile, lfs.modification
+local stripstring = string.strip
+local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_hash = utilities.parsers.settings_to_hash
+local sortedhash, sortedkeys = table.sortedhash, table.sortedkeys
+
+local report_media = logs.reporter("backend","media")
+local report_attachment = logs.reporter("backend","attachment")
+
+local backends = backends
+local lpdf = lpdf
+local nodes = nodes
+local context = context
+
+local texgetcount = tex.getcount
+
+local nodeinjections = backends.pdf.nodeinjections
+local codeinjections = backends.pdf.codeinjections
+local registrations = backends.pdf.registrations
+
+local executers = structures.references.executers
+local variables = interfaces.variables
+
+local v_hidden = variables.hidden
+local v_auto = variables.auto
+local v_embed = variables.embed
+local v_max = variables.max
+local v_yes = variables.yes
+
+local pdfconstant = lpdf.constant
+local pdfnull = lpdf.null
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfreference = lpdf.reference
+local pdfunicode = lpdf.unicode
+local pdfstring = lpdf.string
+local pdfboolean = lpdf.boolean
+local pdfaction = lpdf.action
+local pdfborder = lpdf.border
+
+local pdftransparencyvalue = lpdf.transparencyvalue
+local pdfcolorvalues = lpdf.colorvalues
+
+local pdfflushobject
+local pdfflushstreamobject
+local pdfflushstreamfileobject
+local pdfreserveobject
+local pdfpagereference
+local pdfshareobjectreference
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushobject = lpdf.flushobject
+ pdfflushstreamobject = lpdf.flushstreamobject
+ pdfflushstreamfileobject = lpdf.flushstreamfileobject
+ pdfreserveobject = lpdf.reserveobject
+ pdfpagereference = lpdf.pagereference
+ pdfshareobjectreference = lpdf.shareobjectreference
+end)
+
+
+local hpack_node = node.hpack
+local write_node = node.write -- test context(...) instead
+
+-- symbols
+
+local presets = { } -- xforms
+
+local function registersymbol(name,n)
+ presets[name] = pdfreference(n)
+end
+
+local function registeredsymbol(name)
+ return presets[name]
+end
+
+local function presetsymbol(symbol)
+ if not presets[symbol] then
+ context.predefinesymbol { symbol }
+ end
+end
+
+local function presetsymbollist(list)
+ if list then
+ for symbol in gmatch(list,"[^, ]+") do
+ presetsymbol(symbol)
+ end
+ end
+end
+
+codeinjections.registersymbol = registersymbol
+codeinjections.registeredsymbol = registeredsymbol
+codeinjections.presetsymbol = presetsymbol
+codeinjections.presetsymbollist = presetsymbollist
+
+-- comments
+
+-- local symbols = {
+-- Addition = pdfconstant("NewParagraph"),
+-- Attachment = pdfconstant("Attachment"),
+-- Balloon = pdfconstant("Comment"),
+-- Check = pdfconstant("Check Mark"),
+-- CheckMark = pdfconstant("Check Mark"),
+-- Circle = pdfconstant("Circle"),
+-- Cross = pdfconstant("Cross"),
+-- CrossHairs = pdfconstant("Cross Hairs"),
+-- Graph = pdfconstant("Graph"),
+-- InsertText = pdfconstant("Insert Text"),
+-- New = pdfconstant("Insert"),
+-- Paperclip = pdfconstant("Paperclip"),
+-- RightArrow = pdfconstant("Right Arrow"),
+-- RightPointer = pdfconstant("Right Pointer"),
+-- Star = pdfconstant("Star"),
+-- Tag = pdfconstant("Tag"),
+-- Text = pdfconstant("Note"),
+-- TextNote = pdfconstant("Text Note"),
+-- UpArrow = pdfconstant("Up Arrow"),
+-- UpLeftArrow = pdfconstant("Up-Left Arrow"),
+-- }
+
+local attachment_symbols = {
+ Graph = pdfconstant("Graph"),
+ Paperclip = pdfconstant("Paperclip"),
+ Pushpin = pdfconstant("PushPin"),
+}
+
+attachment_symbols.PushPin = attachment_symbols.Pushpin
+attachment_symbols.Default = attachment_symbols.Pushpin
+
+function lpdf.attachmentsymbols()
+ return sortedkeys(comment_symbols)
+end
+
+local comment_symbols = {
+ Comment = pdfconstant("Comment"),
+ Help = pdfconstant("Help"),
+ Insert = pdfconstant("Insert"),
+ Key = pdfconstant("Key"),
+ Newparagraph = pdfconstant("NewParagraph"),
+ Note = pdfconstant("Note"),
+ Paragraph = pdfconstant("Paragraph"),
+}
+
+comment_symbols.NewParagraph = Newparagraph
+comment_symbols.Default = Note
+
+function lpdf.commentsymbols()
+ return sortedkeys(comment_symbols)
+end
+
+local function analyzesymbol(symbol,collection)
+ if not symbol or symbol == "" then
+ return collection and collection.Default, nil
+ elseif collection and collection[symbol] then
+ return collection[symbol], nil
+ else
+ local setn, setr, setd
+ local set = settings_to_array(symbol)
+ if #set == 1 then
+ setn, setr, setd = set[1], set[1], set[1]
+ elseif #set == 2 then
+ setn, setr, setd = set[1], set[1], set[2]
+ else
+ setn, setr, setd = set[1], set[2], set[3]
+ end
+ local appearance = pdfdictionary {
+ N = setn and registeredsymbol(setn),
+ R = setr and registeredsymbol(setr),
+ D = setd and registeredsymbol(setd),
+ }
+ local appearanceref = pdfshareobjectreference(appearance)
+ return nil, appearanceref
+ end
+end
+
+local function analyzenormalsymbol(symbol)
+ local appearance = pdfdictionary {
+ N = registeredsymbol(symbol),
+ }
+ local appearanceref = pdfshareobjectreference(appearance)
+ return appearanceref
+end
+
+codeinjections.analyzesymbol = analyzesymbol
+codeinjections.analyzenormalsymbol = analyzenormalsymbol
+
+local function analyzelayer(layer)
+ -- todo: (specification.layer ~= "" and pdfreference(specification.layer)) or nil, -- todo: ref to layer
+end
+
+local function analyzecolor(colorvalue,colormodel)
+ local cvalue = colorvalue and tonumber(colorvalue)
+ local cmodel = colormodel and tonumber(colormodel) or 3
+ return cvalue and pdfarray { pdfcolorvalues(cmodel,cvalue) } or nil
+end
+
+local function analyzetransparency(transparencyvalue)
+ local tvalue = transparencyvalue and tonumber(transparencyvalue)
+ return tvalue and pdftransparencyvalue(tvalue) or nil
+end
+
+-- Attachments
+
+local nofattachments = 0
+local attachments = { }
+local filestreams = { }
+local referenced = { }
+local ignorereferenced = true -- fuzzy pdf spec .. twice in attachment list, can become an option
+local tobesavedobjrefs = utilities.storage.allocate()
+local collectedobjrefs = utilities.storage.allocate()
+local permitted = true
+local enabled = true
+
+function codeinjections.setattachmentsupport(option)
+ if option == false then
+ permitted = false
+ enabled = false
+ end
+end
+
+local fileobjreferences = {
+ collected = collectedobjrefs,
+ tobesaved = tobesavedobjrefs,
+}
+
+job.fileobjreferences = fileobjreferences
+
+local function initializer()
+ collectedobjrefs = job.fileobjreferences.collected or { }
+ tobesavedobjrefs = job.fileobjreferences.tobesaved or { }
+end
+
+job.register('job.fileobjreferences.collected', tobesavedobjrefs, initializer)
+
+local function flushembeddedfiles()
+ if enabled and next(filestreams) then
+ local e = pdfarray()
+ local f = pdfarray()
+ for tag, reference in sortedhash(filestreams) do
+ if not reference then
+ report_attachment("unreferenced file, tag %a",tag)
+ elseif referenced[tag] == "hidden" then
+ e[#e+1] = pdfstring(tag)
+ e[#e+1] = reference -- already a reference
+ f[#f+1] = reference -- collect all file description references
+ else
+ -- messy spec ... when annot not in named else twice in menu list acrobat
+ f[#f+1] = reference
+ end
+ end
+ if #e > 0 then
+ lpdf.addtonames("EmbeddedFiles",pdfreference(pdfflushobject(pdfdictionary{ Names = e })))
+ end
+ if #f > 0 then -- PDF/A-2|3: all associated files must have a relationship to the PDF document (global or part)
+ lpdf.addtocatalog("AF", pdfreference(pdfflushobject(f))) -- global (Catalog)
+ end
+ end
+end
+
+lpdf.registerdocumentfinalizer(flushembeddedfiles,"embeddedfiles")
+
+function codeinjections.embedfile(specification)
+ if enabled then
+ local data = specification.data
+ local filename = specification.file
+ local name = specification.name or ""
+ local title = specification.title or ""
+ local hash = specification.hash or filename
+ local keepdir = specification.keepdir -- can change
+ local usedname = specification.usedname
+ local filetype = specification.filetype
+ local compress = specification.compress
+ local mimetype = specification.mimetype or specification.mime
+ if filename == "" then
+ filename = nil
+ end
+ if compress == nil then
+ compress = true
+ end
+ if data then
+ local r = filestreams[hash]
+ if r == false then
+ return nil
+ elseif r then
+ return r
+ elseif not filename then
+ filename = specification.tag
+ if not filename or filename == "" then
+ filename = specification.registered
+ end
+ if not filename or filename == "" then
+ filename = hash
+ end
+ end
+ else
+ if not filename then
+ return nil
+ end
+ local r = filestreams[hash]
+ if r == false then
+ return nil
+ elseif r then
+ return r
+ else
+ local foundname = resolvers.findbinfile(filename) or ""
+ if foundname == "" or not isfile(foundname) then
+ filestreams[filename] = false
+ return nil
+ else
+ specification.foundname = foundname
+ end
+ end
+ end
+ -- needs to be cleaned up:
+ usedname = usedname ~= "" and usedname or filename or name
+ local basename = keepdir == true and usedname or basefilename(usedname)
+ local basename = gsub(basename,"%./","")
+ local savename = name ~= "" and name or basename
+ local foundname = specification.foundname or filename
+ if not filetype or filetype == "" then
+ filetype = name and (filename and filesuffix(filename)) or "txt"
+ end
+ savename = addfilesuffix(savename,filetype) -- type is mandate for proper working in viewer
+ local a = pdfdictionary {
+ Type = pdfconstant("EmbeddedFile"),
+ Subtype = mimetype and mimetype ~= "" and pdfconstant(mimetype) or nil,
+ }
+ local f
+ if data then
+ f = pdfflushstreamobject(data,a)
+ specification.data = true -- signal that still data but already flushed
+ else
+ local attributes = lfs.attributes(foundname)
+ local modification = modificationtime(foundname)
+ a.Params = {
+ Size = attributes.size,
+ ModDate = lpdf.pdftimestamp(modification),
+ }
+ f = pdfflushstreamfileobject(foundname,a,compress)
+ end
+ local d = pdfdictionary {
+ Type = pdfconstant("Filespec"),
+ F = pdfstring(savename),
+ -- UF = pdfstring(savename),
+ UF = pdfunicode(savename),
+ EF = pdfdictionary { F = pdfreference(f) },
+ Desc = title ~= "" and pdfunicode(title) or nil,
+ AFRelationship = pdfconstant("Unspecified"), -- Supplement, Data, Source, Alternative, Data
+ }
+ local r = pdfreference(pdfflushobject(d))
+ filestreams[hash] = r
+ return r
+ end
+end
+
+function nodeinjections.attachfile(specification)
+ if enabled then
+ local registered = specification.registered or "<unset>"
+ local data = specification.data
+ local hash
+ local filename
+ if data then
+ hash = md5.HEX(data)
+ else
+ filename = specification.file
+ if not filename or filename == "" then
+ report_attachment("no file specified, using registered %a instead",registered)
+ filename = registered
+ specification.file = registered
+ end
+ local foundname = resolvers.findbinfile(filename) or ""
+ if foundname == "" or not isfile(foundname) then
+ report_attachment("invalid filename %a, ignoring registered %a",filename,registered)
+ return nil
+ else
+ specification.foundname = foundname
+ end
+ hash = filename
+ end
+ specification.hash = hash
+ nofattachments = nofattachments + 1
+ local registered = specification.registered or ""
+ local title = specification.title or ""
+ local subtitle = specification.subtitle or ""
+ local author = specification.author or ""
+ local onlyname = filename and filenameonly(filename) or ""
+ if registered == "" then
+ registered = filename
+ end
+ if author == "" and title ~= "" then
+ author = title
+ title = onlyname or ""
+ end
+ if author == "" then
+ author = onlyname or "<unknown>"
+ end
+ if title == "" then
+ title = registered
+ end
+ if title == "" and filename then
+ title = onlyname
+ end
+ local aref = attachments[registered]
+ if not aref then
+ aref = codeinjections.embedfile(specification)
+ attachments[registered] = aref
+ end
+ local reference = specification.reference
+ if reference and aref then
+ tobesavedobjrefs[reference] = aref[1]
+ end
+ if not aref then
+ report_attachment("skipping attachment, registered %a",registered)
+ -- already reported
+ elseif specification.method == v_hidden then
+ referenced[hash] = "hidden"
+ else
+ referenced[hash] = "annotation"
+ local name, appearance = analyzesymbol(specification.symbol,attachment_symbols)
+ local flags = specification.flags or 0 -- to keep it expandable
+ local d = pdfdictionary {
+ Subtype = pdfconstant("FileAttachment"),
+ FS = aref,
+ Contents = pdfunicode(title),
+ Name = name,
+ NM = pdfstring("attachment:"..nofattachments),
+ T = author ~= "" and pdfunicode(author) or nil,
+ Subj = subtitle ~= "" and pdfunicode(subtitle) or nil,
+ C = analyzecolor(specification.colorvalue,specification.colormodel),
+ CA = analyzetransparency(specification.transparencyvalue),
+ AP = appearance,
+ OC = analyzelayer(specification.layer),
+ -- F = pdfnull(), -- another rediculous need to satisfy validation
+ F = bit32.band(bit32.bor(flags,4),(1023-1-2-32-256)), -- set 3, clear 1,2,6,9; PDF 32000-1, p385
+ }
+ local width = specification.width or 0
+ local height = specification.height or 0
+ local depth = specification.depth or 0
+ local box = hpack_node(nodeinjections.annotation(width,height,depth,d()))
+ box.width = width
+ box.height = height
+ box.depth = depth
+ return box
+ end
+ end
+end
+
+function codeinjections.attachmentid(filename) -- not used in context
+ return filestreams[filename]
+end
+
+-- Comments
+
+local nofcomments = 0
+local usepopupcomments = false
+
+local defaultattributes = {
+ ["xmlns"] = "http://www.w3.org/1999/xhtml",
+ ["xmlns:xfa"] = "http://www.xfa.org/schema/xfa-data/1.0/",
+ ["xfa:contentType"] = "text/html",
+ ["xfa:APIVersion"] = "Acrobat:8.0.0",
+ ["xfa:spec"] = "2.4",
+}
+
+local function checkcontent(text,option)
+ if option and option.xml then
+ local root = xml.convert(text)
+ if root and not root.er then
+ xml.checkbom(root)
+ local body = xml.first(root,"/body")
+ if body then
+ local at = body.at
+ for k, v in next, defaultattributes do
+ if not at[k] then
+ at[k] = v
+ end
+ end
+ -- local content = xml.textonly(root)
+ local richcontent = xml.tostring(root)
+ return nil, pdfunicode(richcontent)
+ end
+ end
+ end
+ return pdfunicode(text)
+end
+
+function nodeinjections.comment(specification) -- brrr: seems to be done twice
+ nofcomments = nofcomments + 1
+ local text = specification.data or ""
+ if specification.space ~= v_yes then
+ text = stripstring(text)
+ text = gsub(text,"[\n\r] *","\n")
+ end
+ text = gsub(text,"\r","\n")
+ local name, appearance = analyzesymbol(specification.symbol,comment_symbols)
+ local tag = specification.tag or "" -- this is somewhat messy as recent
+ local title = specification.title or "" -- versions of acrobat see the title
+ local subtitle = specification.subtitle or "" -- as author
+ local author = specification.author or ""
+ local option = settings_to_hash(specification.option or "")
+ if author ~= "" then
+ if subtitle == "" then
+ subtitle = title
+ elseif title ~= "" then
+ subtitle = subtitle .. ", " .. title
+ end
+ title = author
+ end
+ if title == "" then
+ title = tag
+ end
+ local content, richcontent = checkcontent(text,option)
+ local d = pdfdictionary {
+ Subtype = pdfconstant("Text"),
+ Open = option[v_max] and pdfboolean(true) or nil,
+ Contents = content,
+ RC = richcontent,
+ T = title ~= "" and pdfunicode(title) or nil,
+ Subj = subtitle ~= "" and pdfunicode(subtitle) or nil,
+ C = analyzecolor(specification.colorvalue,specification.colormodel),
+ CA = analyzetransparency(specification.transparencyvalue),
+ OC = analyzelayer(specification.layer),
+ Name = name,
+ NM = pdfstring("comment:"..nofcomments),
+ AP = appearance,
+ }
+ local width = specification.width or 0
+ local height = specification.height or 0
+ local depth = specification.depth or 0
+ local box
+ if usepopupcomments then
+ -- rather useless as we can hide/vide
+ local nd = pdfreserveobject()
+ local nc = pdfreserveobject()
+ local c = pdfdictionary {
+ Subtype = pdfconstant("Popup"),
+ Parent = pdfreference(nd),
+ }
+ d.Popup = pdfreference(nc)
+ box = hpack_node(
+ nodeinjections.annotation(0,0,0,d(),nd),
+ nodeinjections.annotation(width,height,depth,c(),nc)
+ )
+ else
+ box = hpack_node(nodeinjections.annotation(width,height,depth,d()))
+ end
+ box.width = width -- redundant
+ box.height = height -- redundant
+ box.depth = depth -- redundant
+ return box
+end
+
+-- rendering stuff
+--
+-- object_1 -> <</Type /Rendition /S /MR /C << /Type /MediaClip ... >> >>
+-- object_2 -> <</Type /Rendition /S /MR /C << /Type /MediaClip ... >> >>
+-- rendering -> <</Type /Rendition /S /MS [objref_1 objref_2]>>
+--
+-- we only work foreward here (currently)
+-- annotation is to be packed at the tex end
+
+-- aiff audio/aiff
+-- au audio/basic
+-- avi video/avi
+-- mid audio/midi
+-- mov video/quicktime
+-- mp3 audio/x-mp3 (mpeg)
+-- mp4 audio/mp4
+-- mp4 video/mp4
+-- mpeg video/mpeg
+-- smil application/smil
+-- swf application/x-shockwave-flash
+
+-- P media play parameters (evt /BE for controls etc
+-- A boolean (audio)
+-- C boolean (captions)
+-- O boolean (overdubs)
+-- S boolean (subtitles)
+-- PL pdfconstant("ADBE_MCI"),
+
+-- F = flags,
+-- T = title,
+-- Contents = rubish,
+-- AP = irrelevant,
+
+-- sound is different, no window (or zero) so we need to collect them and
+-- force them if not set
+
+local ms, mu, mf = { }, { }, { }
+
+local function delayed(label)
+ local a = pdfreserveobject()
+ mu[label] = a
+ return pdfreference(a)
+end
+
+local function insertrenderingwindow(specification)
+ local label = specification.label
+ -- local openpage = specification.openpage
+ -- local closepage = specification.closepage
+ if specification.option == v_auto then
+ if openpageaction then
+ -- \handlereferenceactions{\v!StartRendering{#2}}
+ end
+ if closepageaction then
+ -- \handlereferenceactions{\v!StopRendering {#2}}
+ end
+ end
+ local actions = nil
+ if openpage or closepage then
+ actions = pdfdictionary {
+ PO = (openpage and lpdfaction(openpage )) or nil,
+ PC = (closepage and lpdfaction(closepage)) or nil,
+ }
+ end
+ local page = tonumber(specification.page) or texgetcount("realpageno") -- todo
+ local r = mu[label] or pdfreserveobject() -- why the reserve here?
+ local a = pdfdictionary {
+ S = pdfconstant("Rendition"),
+ R = mf[label],
+ OP = 0,
+ AN = pdfreference(r),
+ }
+ local bs, bc = pdfborder()
+ local d = pdfdictionary {
+ Subtype = pdfconstant("Screen"),
+ P = pdfreference(pdfpagereference(page)),
+ A = a, -- needed in order to make the annotation clickable (i.e. don't bark)
+ Border = bs,
+ C = bc,
+ AA = actions,
+ }
+ local width = specification.width or 0
+ local height = specification.height or 0
+ if height == 0 or width == 0 then
+ -- todo: sound needs no window
+ end
+ write_node(nodeinjections.annotation(width,height,0,d(),r)) -- save ref
+ return pdfreference(r)
+end
+
+-- some dictionaries can have a MH (must honor) or BE (best effort) capsule
+
+local function insertrendering(specification)
+ local label = specification.label
+ local option = settings_to_hash(specification.option)
+ if not mf[label] then
+ local filename = specification.filename
+ local isurl = find(filename,"://",1,true)
+ local mimetype = specification.mimetype or specification.mime
+ -- local start = pdfdictionary {
+ -- Type = pdfconstant("MediaOffset"),
+ -- S = pdfconstant("T"), -- time
+ -- T = pdfdictionary { -- time
+ -- Type = pdfconstant("Timespan"),
+ -- S = pdfconstant("S"),
+ -- V = 3, -- time in seconds
+ -- },
+ -- }
+ -- local start = pdfdictionary {
+ -- Type = pdfconstant("MediaOffset"),
+ -- S = pdfconstant("F"), -- frame
+ -- F = 100 -- framenumber
+ -- }
+ -- local start = pdfdictionary {
+ -- Type = pdfconstant("MediaOffset"),
+ -- S = pdfconstant("M"), -- mark
+ -- M = "somemark",
+ -- }
+ -- local parameters = pdfdictionary {
+ -- BE = pdfdictionary {
+ -- B = start,
+ -- }
+ -- }
+ -- local parameters = pdfdictionary {
+ -- Type = pdfconstant(MediaPermissions),
+ -- TF = pdfstring("TEMPALWAYS") }, -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS
+ -- }
+ local descriptor = pdfdictionary {
+ Type = pdfconstant("Filespec"),
+ F = filename,
+ }
+ if isurl then
+ descriptor.FS = pdfconstant("URL")
+ elseif option[v_embed] then
+ descriptor.EF = codeinjections.embedfile {
+ file = filename,
+ mimetype = mimetype, -- yes or no
+ compress = false,
+ }
+ end
+ local clip = pdfdictionary {
+ Type = pdfconstant("MediaClip"),
+ S = pdfconstant("MCD"),
+ N = label,
+ CT = mimetype,
+ Alt = pdfarray { "", "file not found" }, -- language id + message
+ D = pdfreference(pdfflushobject(descriptor)),
+ -- P = pdfreference(pdfflushobject(parameters)),
+ }
+ local rendition = pdfdictionary {
+ Type = pdfconstant("Rendition"),
+ S = pdfconstant("MR"),
+ N = label,
+ C = pdfreference(pdfflushobject(clip)),
+ }
+ mf[label] = pdfreference(pdfflushobject(rendition))
+ end
+end
+
+local function insertrenderingobject(specification) -- todo
+ local label = specification.label
+ if not mf[label] then
+ report_media("unknown medium, label %a",label)
+ local clip = pdfdictionary { -- does not work that well one level up
+ Type = pdfconstant("MediaClip"),
+ S = pdfconstant("MCD"),
+ N = label,
+ D = pdfreference(unknown), -- not label but objectname, hm .. todo?
+ }
+ local rendition = pdfdictionary {
+ Type = pdfconstant("Rendition"),
+ S = pdfconstant("MR"),
+ N = label,
+ C = pdfreference(pdfflushobject(clip)),
+ }
+ mf[label] = pdfreference(pdfflushobject(rendition))
+ end
+end
+
+function codeinjections.processrendering(label)
+ local specification = interactions.renderings.rendering(label)
+ if not specification then
+ -- error
+ elseif specification.type == "external" then
+ insertrendering(specification)
+ else
+ insertrenderingobject(specification)
+ end
+end
+
+function codeinjections.insertrenderingwindow(specification)
+ local label = specification.label
+ codeinjections.processrendering(label)
+ ms[label] = insertrenderingwindow(specification)
+end
+
+local function set(operation,arguments)
+ codeinjections.processrendering(arguments)
+ return pdfdictionary {
+ S = pdfconstant("Rendition"),
+ OP = operation,
+ R = mf[arguments],
+ AN = ms[arguments] or delayed(arguments),
+ }
+end
+
+function executers.startrendering (arguments) return set(0,arguments) end
+function executers.stoprendering (arguments) return set(1,arguments) end
+function executers.pauserendering (arguments) return set(2,arguments) end
+function executers.resumerendering(arguments) return set(3,arguments) end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt b/Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt
new file mode 100644
index 00000000000..313488a3945
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lpdf-xmp.lmt
@@ -0,0 +1,311 @@
+if not modules then modules = { } end modules ['lpdf-xmp'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+ comment = "with help from Peter Rolf",
+}
+
+local tostring, type = tostring, type
+local format, gsub = string.format, string.gsub
+local utfchar = utf.char
+local xmlfillin = xml.fillin
+local md5HEX = md5.HEX
+
+local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp = v end)
+local trace_info = false trackers.register("backend.info", function(v) trace_info = v end)
+
+local report_xmp = logs.reporter("backend","xmp")
+local report_info = logs.reporter("backend","info")
+
+local backends, lpdf = backends, lpdf
+
+local codeinjections = backends.pdf.codeinjections -- normally it is registered
+
+local pdfdictionary = lpdf.dictionary
+local pdfconstant = lpdf.constant
+local pdfreference = lpdf.reference
+
+local pdfgetmetadata = lpdf.getmetadata
+
+local pdfflushstreamobject
+
+updaters.register("backend.update.lpdf",function()
+ pdfflushstreamobject = lpdf.flushstreamobject
+end)
+
+-- The XMP packet wrapper is kind of fixed, see page 10 of XMPSpecificationsPart1.pdf from
+-- XMP-Toolkit-SDK-CC201607.zip. So we hardcode the id.
+
+local xpacket = format ( [[
+<?xpacket begin="%s" id="W5M0MpCehiHzreSzNTczkc9d"?>
+
+%%s
+
+<?xpacket end="w"?>]], utfchar(0xFEFF) )
+
+local mapping = {
+ -- user defined keys (pdfx:)
+ ["ConTeXt.Jobname"] = { "context", "rdf:Description/pdfx:ConTeXt.Jobname" },
+ ["ConTeXt.Time"] = { "date", "rdf:Description/pdfx:ConTeXt.Time" },
+ ["ConTeXt.Url"] = { "context", "rdf:Description/pdfx:ConTeXt.Url" },
+ ["ConTeXt.Support"] = { "context", "rdf:Description/pdfx:ConTeXt.Support" },
+ ["ConTeXt.Version"] = { "context", "rdf:Description/pdfx:ConTeXt.Version" },
+ ["ConTeXt.LMTX"] = { "context", "rdf:Description/pdfx:ConTeXt.LMTX" },
+ ["TeX.Support"] = { "metadata","rdf:Description/pdfx:TeX.Support" },
+ ["LuaTeX.Version"] = { "metadata","rdf:Description/pdfx:LuaTeX.Version" },
+ ["LuaTeX.Functionality"] = { "metadata","rdf:Description/pdfx:LuaTeX.Functionality" },
+ ["LuaTeX.LuaVersion"] = { "metadata","rdf:Description/pdfx:LuaTeX.LuaVersion" },
+ ["LuaTeX.Platform"] = { "metadata","rdf:Description/pdfx:LuaTeX.Platform" },
+ ["ID"] = { "id", "rdf:Description/pdfx:ID" }, -- has date
+ -- Adobe PDF schema
+ ["Keywords"] = { "metadata","rdf:Description/pdf:Keywords" },
+ ["Producer"] = { "metadata","rdf:Description/pdf:Producer" },
+ -- ["Trapped"] = { "pdf", "rdf:Description/pdf:Trapped" }, -- '/False' in /Info, but 'False' in XMP
+ -- Dublin Core schema
+ ["Author"] = { "metadata","rdf:Description/dc:creator/rdf:Seq/rdf:li" },
+ ["Format"] = { "metadata","rdf:Description/dc:format" }, -- optional, but nice to have
+ ["Subject"] = { "metadata","rdf:Description/dc:description/rdf:Alt/rdf:li" },
+ ["Title"] = { "metadata","rdf:Description/dc:title/rdf:Alt/rdf:li" },
+ -- XMP Basic schema
+ ["CreateDate"] = { "date", "rdf:Description/xmp:CreateDate" },
+ ["CreationDate"] = { "date", "rdf:Description/xmp:CreationDate" }, -- dummy
+ ["Creator"] = { "metadata","rdf:Description/xmp:CreatorTool" },
+ ["MetadataDate"] = { "date", "rdf:Description/xmp:MetadataDate" },
+ ["ModDate"] = { "date", "rdf:Description/xmp:ModDate" }, -- dummy
+ ["ModifyDate"] = { "date", "rdf:Description/xmp:ModifyDate" },
+ -- XMP Media Management schema
+ ["DocumentID"] = { "id", "rdf:Description/xmpMM:DocumentID" }, -- uuid
+ ["InstanceID"] = { "id", "rdf:Description/xmpMM:InstanceID" }, -- uuid
+ ["RenditionClass"] = { "pdf", "rdf:Description/xmpMM:RenditionClass" }, -- PDF/X-4
+ ["VersionID"] = { "pdf", "rdf:Description/xmpMM:VersionID" }, -- PDF/X-4
+ -- additional entries
+ -- PDF/X
+ ["GTS_PDFXVersion"] = { "pdf", "rdf:Description/pdfxid:GTS_PDFXVersion" },
+ -- optional entries
+ -- all what is visible in the 'document properties --> additional metadata' window
+ -- XMP Rights Management schema (optional)
+ ["Marked"] = { "pdf", "rdf:Description/xmpRights:Marked" },
+ -- ["Owner"] = { "metadata", "rdf:Description/xmpRights:Owner/rdf:Bag/rdf:li" }, -- maybe useful (not visible)
+ -- ["UsageTerms"] = { "metadata", "rdf:Description/xmpRights:UsageTerms" }, -- maybe useful (not visible)
+ ["WebStatement"] = { "metadata", "rdf:Description/xmpRights:WebStatement" },
+ -- Photoshop PDF schema (optional)
+ ["AuthorsPosition"] = { "metadata", "rdf:Description/photoshop:AuthorsPosition" },
+ ["Copyright"] = { "metadata", "rdf:Description/photoshop:Copyright" },
+ ["CaptionWriter"] = { "metadata", "rdf:Description/photoshop:CaptionWriter" },
+}
+
+local included = backends.included
+local lpdfid = lpdf.id
+
+function lpdf.id() -- overload of ini
+ return lpdfid(included.date)
+end
+
+local trailerid = nil
+local dates = nil
+
+local function update()
+ if trailer_id then
+ local b = toboolean(trailer_id) or trailer_id == ""
+ if b then
+ trailer_id = "This file is processed by ConTeXt and LuaTeX."
+ else
+ trailer_id = tostring(trailer_id)
+ end
+ local h = md5HEX(trailer_id)
+ if b then
+ report_info("using frozen trailer id")
+ else
+ report_info("using hashed trailer id %a (%a)",trailer_id,h)
+ end
+ trailerid = format("[<%s> <%s>]",h,h)
+ end
+ --
+ local t = type(dates)
+ if t == "number" or t == "string" then
+ local d = converters.totime(dates)
+ if d then
+ included.date = true
+ included.id = "fake"
+ report_info("forced date/time information %a will be used",lpdf.settime(d))
+ trailerid = false
+ elseif t == "string" then
+ dates = toboolean(dates)
+ included.date = dates
+ if dates ~= false then
+ included.id = true
+ else
+ report_info("no date/time but fake id information will be added")
+ trailerid = true
+ included.id = "fake"
+ end
+ end
+ end
+end
+
+lpdf.registerdocumentfinalizer(update,"trailer id and dates",1)
+
+directives.register("backend.trailerid", function(v) trailerid = v end)
+directives.register("backend.date", function(v) dates = v end)
+
+local function permitdetail(what)
+ local m = mapping[what]
+ if m then
+ return included[m[1]] and m[2]
+ else
+ return included[what] and true or false
+ end
+end
+
+lpdf.permitdetail = permitdetail
+
+-- maybe some day we will load the xmp file at runtime
+
+local xmp, xmpfile, xmpname = nil, nil, "lpdf-pdx.xml"
+
+local function setxmpfile(name)
+ if xmp then
+ report_xmp("discarding loaded file %a",xmpfile)
+ xmp = nil
+ end
+ xmpfile = name ~= "" and name
+end
+
+codeinjections.setxmpfile = setxmpfile
+
+interfaces.implement {
+ name = "setxmpfile",
+ arguments = "string",
+ actions = setxmpfile
+}
+
+local function valid_xmp()
+ if not xmp then
+ -- local xmpfile = xmpfile or resolvers.findfile(xmpname) or ""
+ if xmpfile and xmpfile ~= "" then
+ xmpfile = resolvers.findfile(xmpfile) or ""
+ end
+ if not xmpfile or xmpfile == "" then
+ xmpfile = resolvers.findfile(xmpname) or ""
+ end
+ if xmpfile ~= "" then
+ report_xmp("using file %a",xmpfile)
+ end
+ local xmpdata = xmpfile ~= "" and io.loaddata(xmpfile) or ""
+ xmp = xml.convert(xmpdata)
+ end
+ return xmp
+end
+
+function lpdf.addxmpinfo(tag,value,check)
+ local pattern = permitdetail(tag)
+ if type(pattern) == "string" then
+ xmlfillin(xmp or valid_xmp(),pattern,value,check)
+ end
+end
+
+-- redefined
+
+local pdfaddtoinfo = lpdf.addtoinfo
+local pdfaddxmpinfo = lpdf.addxmpinfo
+
+function lpdf.addtoinfo(tag,pdfvalue,strvalue)
+ local pattern = permitdetail(tag)
+ if pattern then
+ pdfaddtoinfo(tag,pdfvalue)
+ end
+ if type(pattern) == "string" then
+ local value = strvalue or gsub(tostring(pdfvalue),"^%((.*)%)$","%1") -- hack
+ if trace_info then
+ report_info("set %a to %a",tag,value)
+ end
+ xmlfillin(xmp or valid_xmp(),pattern,value,check)
+ end
+end
+
+local pdfaddtoinfo = lpdf.addtoinfo -- used later
+
+-- for the do-it-yourselvers
+
+function lpdf.insertxmpinfo(pattern,whatever,prepend)
+ xml.insert(xmp or valid_xmp(),pattern,whatever,prepend)
+end
+
+function lpdf.injectxmpinfo(pattern,whatever,prepend)
+ xml.inject(xmp or valid_xmp(),pattern,whatever,prepend)
+end
+
+-- flushing
+
+local add_xmp_blob = true directives.register("backend.xmp",function(v) add_xmp_blob = v end)
+
+local function flushxmpinfo()
+ commands.pushrandomseed()
+ commands.setrandomseed(os.time())
+
+ local documentid = "no unique document id here"
+ local instanceid = "no unique instance id here"
+ local metadata = pdfgetmetadata()
+ local time = metadata.time
+ local producer = metadata.producer
+ local creator = metadata.creator
+
+ if included.id ~= "fake" then
+ documentid = "uuid:" .. os.uuid()
+ instanceid = "uuid:" .. os.uuid()
+ end
+
+ pdfaddtoinfo("Producer",producer)
+ pdfaddtoinfo("Creator",creator)
+ pdfaddtoinfo("CreationDate",time)
+ pdfaddtoinfo("ModDate",time)
+
+ if add_xmp_blob then
+
+ pdfaddxmpinfo("DocumentID",documentid)
+ pdfaddxmpinfo("InstanceID",instanceid)
+ pdfaddxmpinfo("Producer",producer)
+ pdfaddxmpinfo("CreatorTool",creator)
+ pdfaddxmpinfo("CreateDate",time)
+ pdfaddxmpinfo("ModifyDate",time)
+ pdfaddxmpinfo("MetadataDate",time)
+ pdfaddxmpinfo("LuaTeX.Version",metadata.luatexversion)
+ pdfaddxmpinfo("LuaTeX.Functionality",metadata.luatexfunctionality)
+ pdfaddxmpinfo("LuaTeX.LuaVersion",metadata.luaversion)
+ pdfaddxmpinfo("LuaTeX.Platform",metadata.platform)
+
+ local blob = xml.tostring(xml.first(xmp or valid_xmp(),"/x:xmpmeta"))
+ local md = pdfdictionary {
+ Subtype = pdfconstant("XML"),
+ Type = pdfconstant("Metadata"),
+ }
+ if trace_xmp then
+ report_xmp("data flushed, see log file")
+ logs.pushtarget("logfile")
+ report_xmp("start xmp blob")
+ logs.newline()
+ logs.writer(blob)
+ logs.newline()
+ report_xmp("stop xmp blob")
+ logs.poptarget()
+ end
+ blob = format(xpacket,blob)
+ if not verbose and lpdf.compresslevel() > 0 then
+ blob = gsub(blob,">%s+<","><")
+ end
+ local r = pdfflushstreamobject(blob,md,false) -- uncompressed
+ lpdf.addtocatalog("Metadata",pdfreference(r))
+ end
+
+ commands.poprandomseed() -- hack
+end
+
+-- this will be enabled when we can inhibit compression for a stream at the lua end
+
+lpdf.registerdocumentfinalizer(flushxmpinfo,1,"metadata")
+
+directives.register("backend.verbosexmp", function(v)
+ verbose = v
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-bas.mkxl b/Master/texmf-dist/tex/context/base/mkxl/luat-bas.mkxl
new file mode 100644
index 00000000000..0add4ce6926
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-bas.mkxl
@@ -0,0 +1,52 @@
+%D \module
+%D [ file=luat-bas, % moved from luat-lib,
+%D version=2006.09.11,
+%D title=\CONTEXT\ Lua Macros,
+%D subtitle=Basic \LUA\ Libraries,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Lua Macros / Basic Lua Libraries}
+
+\registerctxluafile{l-bit32} {} % before sandbox
+\registerctxluafile{l-lua} {} % before sandbox
+\registerctxluafile{l-macro} {}
+\registerctxluafile{l-sandbox} {}
+\registerctxluafile{l-package} {}
+\registerctxluafile{l-lpeg} {}
+\registerctxluafile{l-function}{}
+\registerctxluafile{l-string} {}
+\registerctxluafile{l-table} {}
+\registerctxluafile{l-boolean} {}
+\registerctxluafile{l-number} {}
+\registerctxluafile{l-math} {}
+%registerctxluafile{l-aux} {}
+\registerctxluafile{l-io} {}
+\registerctxluafile{l-os} {}
+\registerctxluafile{l-file} {}
+\registerctxluafile{l-gzip} {}
+\registerctxluafile{l-md5} {}
+\registerctxluafile{l-sha} {}
+\registerctxluafile{l-dir} {}
+\registerctxluafile{l-unicode} {optimize}
+%registerctxluafile{l-utils} {}
+\registerctxluafile{l-url} {}
+\registerctxluafile{l-set} {}
+
+\registerctxluafile{l-macro-imp-optimize}{}
+
+% \registerctxluafile{socket}{}
+% \registerctxluafile{ltn12} {}
+% \registerctxluafile{mime} {}
+% \registerctxluafile{http} {}
+% \registerctxluafile{url} {}
+% \registerctxluafile{tp} {}
+% \registerctxluafile{ftp} {}
+% %registerctxluafile{smtp} {}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt b/Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt
new file mode 100644
index 00000000000..744d12e279a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-cbk.lmt
@@ -0,0 +1,287 @@
+if not modules then modules = { } end modules ['luat-cbk'] = {
+ 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 insert, remove, concat = table.insert, table.remove, table.concat
+local find, format = string.find, string.format
+local collectgarbage, type, next = collectgarbage, type, next
+local round = math.round
+local sortedhash, 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 = 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]]--
+
+local trace_callbacks = false trackers.register("system.callbacks", function(v) trace_callbacks = v end)
+local trace_calls = false -- only used when analyzing performance and initializations
+local trace_checking = false trackers.register("memory.checking", function(v) trace_checking = v end)
+
+local report_system = logs.reporter("system")
+local report_callbacks = logs.reporter("system","callbacks")
+local report_memory = logs.reporter("system","memory")
+
+local register_callback = callback.register
+local find_callback = callback.find
+local list_callbacks = callback.list
+local register_usercall = false
+local original_register = register_callback
+
+local frozen = { }
+local stack = { }
+local list = callbacks.list
+local permit_overloads = false
+local block_overloads = false
+
+--[[ldx--
+<p>By now most callbacks are frozen and most provide a way to plug in your own code. For instance
+all node list handlers provide before/after namespaces and the file handling code can be extended
+by adding schemes and if needed I can add more hooks. So there is no real need to overload a core
+callback function. It might be ok for quick and dirty testing but anyway you're on your own if
+you permanently overload callback functions.</p>
+--ldx]]--
+
+-- This might become a configuration file only option when it gets abused too much.
+
+directives.register("system.callbacks.permitoverloads", function(v)
+ if block_overloads or permit_overloads then
+ -- once bad news, always bad news
+ elseif v then
+ permit_overloads = { }
+ report_system()
+ report_system("The callback system has been brought in an unprotected state. As a result of directly")
+ report_system("setting of callbacks subsystems of ConTeXt can stop working. There is no support for")
+ report_system("bugs resulting from this state. It's better to use the official extension mechanisms.")
+ report_system()
+ end
+end)
+
+sandbox.initializer {
+ category = "functions",
+ action = function()
+ block_overloads = true
+ end
+}
+
+if not list then -- otherwise counters get reset
+
+ list = utilities.storage.allocate(list_callbacks())
+
+ local supported = { }
+
+ for k in next, list do
+ list[k] = 0
+ supported[k] = true
+ end
+
+ callbacks.list = list
+ callbacks.supported = supported
+
+end
+
+local delayed = tohash {
+ "buildpage_filter",
+}
+
+if trace_calls then
+
+ local functions = { }
+
+ register_callback = function(name,func)
+ if type(func) == "function" then
+ if functions[name] then
+ functions[name] = func
+ return find_callback(name)
+ else
+ functions[name] = func
+ local cnuf = function(...)
+ list[name] = list[name] + 1
+ return functions[name](...)
+ end
+ return original_register(name,cnuf)
+ end
+ else
+ return original_register(name,func)
+ end
+ end
+
+end
+
+-- temporary, not public:
+
+callbacks.functions = { }
+
+-- till here
+
+local reported = { }
+
+local function register_usercall(what,name,func)
+ if list[name] then
+ if trace_callbacks or not reported[name] then
+ report_system()
+ report_system("disabling core code by %s user function into callback '%s' (reported only once)",what,name)
+ report_system()
+ reported[name] = true
+ end
+ permit_overloads[name] = true
+ return original_register(name,function(...)
+ if trace_callbacks then
+ report_callbacks("calling user function from '%s'",name)
+ end
+ return func(...)
+ end)
+ else
+ report_callbacks("not %s function into invalid callback '%s'",name)
+ return nil, format("unknown callback '%s'",name)
+ end
+end
+
+local function frozen_callback(name)
+ report_callbacks("not %s frozen %a","registering",name)
+ return nil, format("callback '%s' is frozen",name) -- no formatter yet
+end
+
+local function state(name)
+ local f = find_callback(name)
+ if f == false then
+ return "disabled"
+ elseif f then
+ return "enabled"
+ else
+ return "undefined"
+ end
+end
+
+function callbacks.known(name)
+ return list[name]
+end
+
+function callbacks.report()
+ for name, _ in sortedhash(list) do
+ local str = frozen[name]
+ if str then
+ report_callbacks("%s: %s -> %s",state(name),name,str)
+ else
+ report_callbacks("%s: %s",state(name),name)
+ end
+ end
+end
+
+function callbacks.freeze(name,freeze)
+ if not permit_overloads then
+ freeze = type(freeze) == "string" and freeze
+ if find(name,"*",1,true) then
+ local pattern = name
+ for name, _ in next, list do
+ if find(name,pattern) then
+ frozen[name] = freeze or frozen[name] or "frozen"
+ end
+ end
+ else
+ frozen[name] = freeze or frozen[name] or "frozen"
+ end
+ end
+end
+
+function callbacks.register(name,func,freeze)
+ if frozen[name] then
+ if permit_overloads then
+ return register_usercall("registering",name,func)
+ else
+ return frozen_callback(name)
+ end
+ elseif freeze then
+ frozen[name] = type(freeze) == "string" and freeze or "registered"
+ end
+ if delayed[name] and environment.initex then
+ return nil
+ end
+ return register_callback(name,func)
+end
+
+function callback.register(name,func) -- original
+ if not frozen[name] then
+ return register_callback(name,func)
+ elseif permit_overloads then
+ return register_usercall("registering",name,func)
+ else
+ return frozen_callback(name)
+ end
+end
+
+function callbacks.push(name,func)
+ if not frozen[name] or permit_overloads then
+ local sn = stack[name]
+ if not sn then
+ sn = { }
+ stack[name] = sn
+ end
+ insert(sn,find_callback(name))
+ if permit_overloads then
+ register_usercall("pushing",name,func)
+ else
+ register_callback(name,func)
+ end
+ else
+ report_callbacks("not %s frozen %a","pushing",name)
+ end
+end
+
+function callbacks.pop(name)
+ if not frozen[name] or permit_overloads then
+ local sn = stack[name]
+ if not sn or #sn == 0 then
+ -- some error
+ register_callback(name,nil) -- ! really needed
+ else
+ -- this fails: register_callback(name, remove(stack[name]))
+ local func = remove(sn)
+ register_callback(name,func)
+ end
+ end
+end
+
+if trace_calls then
+ statistics.register("callback details", function()
+ local t = { } -- todo: pass function to register and quit at nil
+ for name, n in sortedhash(list) do
+ if n > 0 then
+ t[#t+1] = format("%s -> %s",name,n)
+ end
+ end
+ return concat(t," ")
+ end)
+end
+
+statistics.register("callbacks overloaded by user", function()
+ if permit_overloads then
+ return concat(sortedkeys(permit_overloads)," ")
+ end
+end)
+
+-- this will move to a module
+
+commands = commands or { }
+
+function commands.showcallbacks()
+ local NC, NR, verbatim = context.NC, context.NR, context.type
+ context.starttabulate { "|l|l|p|" }
+ for name, _ in sortedhash(list) do
+ NC() verbatim(name) NC() verbatim(state(name)) NC() context(frozen[name] or "") NC() NR()
+ end
+ context.stoptabulate()
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-cod.lmt b/Master/texmf-dist/tex/context/base/mkxl/luat-cod.lmt
new file mode 100644
index 00000000000..49d90777df6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-cod.lmt
@@ -0,0 +1,308 @@
+if not modules then modules = { } end modules ['luat-cod'] = {
+ version = 1.001,
+ comment = "companion to luat-cod.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, loadfile, tonumber = type, loadfile, tonumber
+local match, gsub, find, format, gmatch = string.match, string.gsub, string.find, string.format, string.gmatch
+
+local texconfig, lua = texconfig, lua
+
+-- maybe pick up from commandline:
+--
+-- texconfig.interaction: 0=batchmode 1=nonstopmode 2=scrollmode 3=errornonstopmode 4=normal
+
+-- some basic housekeeping
+
+texconfig.kpse_init = false -- not needed in lmtx
+texconfig.shell_escape = 't' -- not needed in lmtx
+
+texconfig.max_in_open = 2000
+texconfig.nest_size = 10000
+texconfig.param_size = 100000
+texconfig.save_size = 500000
+texconfig.stack_size = 100000
+texconfig.buffer_size = 10000000
+texconfig.token_size = 10000000
+texconfig.node_size = 50000000
+
+texconfig.max_print_line = 100000
+texconfig.max_strings = 500000
+texconfig.max_pool = 10000000
+
+texconfig.hash_extra = 200000
+
+texconfig.expand_depth = 10000
+texconfig.function_size = 32768
+texconfig.properties_size = 10000
+texconfig.error_line = 250
+texconfig.half_error_line = 125
+
+texconfig.level_max = 500
+texconfig.level_chr = 46 -- period
+
+-- registering bytecode chunks
+
+local bytedata = lua.bytedata or { }
+local bytedone = lua.bytedone or { }
+
+---.bytecode = bytecode
+lua.bytedata = bytedata
+lua.bytedone = bytedone
+
+local setbytecode = lua.setbytecode
+----- getbytecode = lua.getbytecode
+
+lua.firstbytecode = 501
+lua.lastbytecode = lua.lastbytecode or (lua.firstbytecode - 1) -- as we load ourselves again ... maybe return earlier
+
+function lua.registeredcodes()
+ return lua.lastbytecode - lua.firstbytecode + 1
+end
+
+-- no file.* and utilities.parsers.* functions yet
+
+local strip = false if arg then for i=-1,#arg do if arg[i] == "--c:strip" then strip = true break end end end
+
+function lua.registercode(filename,options)
+ local barename = gsub(filename,"%.[%a%d]+$","")
+ local basename = match(barename,"^.+[/\\](.-)$") or barename
+ if not bytedone[basename] then
+ local opts = { }
+ if type(options) == "string" and options ~= "" then
+ for s in gmatch(options,"([a-z]+)") do
+ opts[s] = true
+ end
+ end
+ if barename == filename then
+ filename = filename .. (opts.autosuffix and ".lmt" or ".lua")
+ end
+ local code = environment.luafilechunk(filename,false,opts.optimize)
+ if code then
+ bytedone[basename] = true
+ if environment.initex and not opts.initexonly then
+ local n = lua.lastbytecode + 1
+ bytedata[n] = { name = barename, options = opts }
+ if strip or opts.strip then
+ setbytecode(n,code,true)
+ else
+ setbytecode(n,code)
+ end
+ lua.lastbytecode = n
+ end
+ elseif environment.initex then
+ texio.write_nl(format("\nerror loading file: %s (aborting)",filename))
+ os.exit()
+ end
+ end
+end
+
+local finalizers = { }
+
+function lua.registerfinalizer(f,comment)
+ comment = comment or "unknown"
+ if type(f) == "function" then
+ finalizers[#finalizers+1] = { action = f, comment = comment }
+ else
+ print(format("\nfatal error: invalid finalizer, action: %s\n",comment))
+ os.exit()
+ end
+end
+
+function lua.finalize(logger)
+ for i=1,#finalizers do
+ local finalizer = finalizers[i]
+ finalizer.action()
+ if logger then
+ logger("finalize action: %s",finalizer.comment)
+ end
+ end
+end
+
+-- A first start with environments. This will be overloaded later.
+
+environment = environment or { }
+local environment = environment
+
+-- no string.unquoted yet
+
+local sourcefile = gsub(arg and arg[1] or "","^\"(.*)\"$","%1")
+local sourcepath = find(sourcefile,"/",1,true) and gsub(sourcefile,"/[^/]+$","") or ""
+local targetpath = "."
+
+-- delayed (via metatable):
+--
+-- environment.jobname = tex.jobname
+-- environment.version = tostring(tex.toks.contextversiontoks)
+
+-- traditionally the revision has been a one character string and only
+-- pdftex went beyond "9" but anyway we test for it
+
+if LUATEXENGINE == nil then
+ LUATEXENGINE = status.luatex_engine and string.lower(status.luatex_engine) or "luametatex"
+end
+
+if LUATEXVERSION == nil then
+ LUATEXVERSION = status.luatex_version/100 + tonumber(status.luatex_revision)/10000
+end
+
+if CONTEXTLMTXMODE == nil then
+ CONTEXTLMTXMODE = 1
+end
+
+if LUATEXFUNCTIONALITY == nil then
+ LUATEXFUNCTIONALITY = status.development_id or 6346
+end
+
+if LUATEXFORMATID == nil then
+ LUATEXFORMATID = status.format_id or 0
+end
+
+if JITSUPPORTED == nil then
+ JITSUPPORTED = false
+end
+
+if INITEXMODE == nil then
+ INITEXMODE = status.run_state == 0 -- initializing updating production
+end
+
+environment.luatexengine = LUATEXENGINE
+environment.luatexversion = LUATEXVERSION
+environment.luatexfunctionality = LUATEXFUNCTIONALITY
+environment.jitsupported = JITSUPPORTED
+environment.initex = INITEXMODE
+environment.initexmode = INITEXMODE
+
+-- if INITEXMODE then
+-- -- we have about that amount so we preallocate then which gives less
+-- -- reallocations (we're talking tiny record so no real gain)
+-- lua.setbytecode(1024,nil)
+-- -- but we don't want to lie about the amount either so ...
+-- end
+
+if not environment.luafilechunk then
+
+ function environment.luafilechunk(filename)
+ local fullname = filename
+ if sourcepath ~= "" then
+ fullname = sourcepath .. "/" .. filename
+ end
+ if not lfs.isfile(fullname) then
+ fullname = gsub(fullname,"mkxl","mkiv")
+ end
+ local data = loadfile(fullname)
+ texio.write("terminal_and_logfile","<",data and "+ " or "- ",fullname,">")
+ if data then
+-- package.loaded[gsub(filename,"%..-$"] =
+ data()
+ end
+ return data
+ end
+
+end
+
+if not environment.engineflags then -- raw flags
+
+ local engineflags = { }
+
+ for i=-10,#arg do
+ local a = arg[i]
+ if a then
+ local flag, content = match(a,"^%-%-([^=]+)=?(.-)$")
+ if flag then
+ engineflags[flag] = content or ""
+ end
+ end
+ end
+
+ environment.engineflags = engineflags
+
+end
+
+-- We need a few premature callbacks in the format generator. We
+-- also do this when the format is loaded as otherwise we get
+-- a kpse error when disabled. This is an engine issue that will
+-- be sorted out in due time.
+
+-- print("!!!!!!!!!!!!!!!!!!!!!!",lfs.isfile) os.exit()
+
+if not lfs.isfile then
+
+ local attributes = lfs.attributes
+
+ function lfs.isdir(name)
+ return attributes(name,"mode") == "directory"
+ end
+
+ function lfs.isfile(name)
+ local a = attributes(name,"mode")
+ return a == "file" or a == "link" or nil
+ end
+
+end
+
+local isfile = lfs.isfile
+
+local function source_file(name)
+ local fullname = sourcepath .. "/" .. name
+ if isfile(fullname) then
+ return fullname
+ end
+ fullname = fullname .. ".tex"
+ if isfile(fullname) then
+ return fullname
+ end
+ if isfile(name) then
+ return name
+ end
+ name = name .. ".tex"
+ if isfile(name) then
+ return name
+ end
+ return nil
+end
+
+local function target_file(name)
+ return targetpath .. "/" .. name
+end
+
+local function find_log_file(name)
+ return target_file(name)
+end
+
+local function find_data_file(name)
+ return source_file(name)
+end
+
+local function open_data_file(name)
+ local fullname = source_file(name)
+ if fullname then
+ local f = io.open(fullname,'rb')
+ return {
+ reader = function()
+ return f:read("*line")
+ end
+ }
+ else
+ return false
+ end
+end
+
+callback.register('find_log_file', find_log_file)
+callback.register('find_data_file' , find_data_file )
+callback.register('open_data_file' , open_data_file )
+
+callback.register("trace_memory", function(what,success)
+ success = success and "succeeded" or "failed"
+ if logs then
+ logs.report("tex memory","bumping category %a %s, details: %s",
+ what,success,table.sequenced(status["get"..what.."state"]()))
+ elseif texio then
+ texio.write_nl(format("bumping tex '%s' memory %s",
+ what,success))
+ end
+ -- os.exit()
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl b/Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl
new file mode 100644
index 00000000000..ed4a1398119
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-cod.mkxl
@@ -0,0 +1,48 @@
+%D \module
+%D [ file=luat-cod,
+%D version=2005.05.26,
+%D title=\CONTEXT\ Lua Macros,
+%D subtitle=Code,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% \writestatus{loading}{ConTeXt Lua Macros / Code}
+
+\unprotect
+
+\newif\ifproductionrun
+
+\permanent\let\ctxdirectlua \directlua
+\permanent\def\ctxsprint #1{\directlua{tex.sprint(tex.ctxcatcodes,#1)}} % saves tokens
+\permanent\def\ctxwrite #1{\directlua{tex.write(#1)}} % saves tokens
+\permanent\def\ctxcommand #1{\directlua{commands.#1}} % saves tokens
+\permanent\def\ctxdirectcommand#1{\directlua{commands.#1}} % saves tokens
+\permanent\def\ctxreport #1{\directlua{logs.writer[[#1]]}}
+
+%D Take your choice \unknown
+
+\aliased\let\ctxlua \ctxdirectlua
+\aliased\let\luacode \ctxdirectlua
+\aliased\let\directluacode\ctxdirectlua
+
+%D Reporting the version of \LUA\ that we use is done as follows:
+
+\permanent\def\luaversion{\ctxwrite{LUAVERSION}}
+
+\permanent\def\registerctxluafile#1#2{\ctxlua{lua.registercode("#1","#2")}}
+\permanent\def\ctxloadluafile #1{\ctxlua{lua.registercode("#1")}}
+
+\registerctxluafile{luat-cod.lmt}{autosuffix}
+
+\toksapp \everydump {%
+ \permanent\let\ctxlatelua \latelua
+ \permanent\def\ctxlatecommand#1{\latelua{commands.#1}}%
+ \aliased\let\lateluacode \ctxlatelua
+} % no \appendtoks yet
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-fio.lmt b/Master/texmf-dist/tex/context/base/mkxl/luat-fio.lmt
new file mode 100644
index 00000000000..c70ed54e4aa
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-fio.lmt
@@ -0,0 +1,107 @@
+if not modules then modules = { } end modules ['luat-fio'] = {
+ 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 format = string.format
+local concat = table.concat
+
+texconfig.kpse_init = false -- can go away
+texconfig.shell_escape = 't' -- can go away
+texconfig.max_print_line = 100000 -- can go away
+texconfig.max_in_open = 1000 -- can go away
+
+if not resolvers.initialized() then
+
+ resolvers.reset()
+
+ -- we now load the file database as we might need files other than
+ -- tex and lua file on the given path
+
+ resolvers.load()
+
+ if callback then
+
+ local findbinfile = resolvers.findbinfile
+ local findtexfile = resolvers.findtexfile
+ local opentexfile = resolvers.opentexfile
+ local register = callbacks.register
+
+ local ioflush = io.flush
+ local ioread = io.read
+ local writenl = texio.write_nl
+
+ local function terminal()
+ writenl("\ntex console > ")
+ ioflush()
+ local line = ioread()
+ writenl("")
+ ioflush()
+ return line
+ end
+
+ -- local function find_data_file(name)
+ -- if not name or name == "" then
+ -- return "context terminal"
+ -- else
+ -- return findbinfile(name,"tex")
+ -- end
+ -- end
+ --
+ -- local function open_data_file(name)
+ -- if not name or name == "" or name == "context terminal" then
+ -- return {
+ -- reader = terminal,
+ -- noflines = 1,
+ -- filename = name,
+ -- }
+ -- else
+ -- name = opentexfile(name)
+ -- return name ~= "" and name or false
+ -- end
+ -- end
+
+ local function open_data_file(name)
+ if not name or name == "" then
+ return {
+ reader = terminal,
+ noflines = 1,
+ filename = "context terminal"
+ }
+ else
+ local fullname = findbinfile(name,"tex")
+ if fullname then
+ return opentexfile(fullname)
+ else
+ return false
+ end
+ end
+ end
+
+ local function find_any_file(name)
+ return name
+ end
+
+ register('find_log_file' , find_any_file, true)
+ register('find_format_file', find_any_file, true)
+ -- register('find_data_file' , find_data_file, true)
+ register('open_data_file' , open_data_file, true)
+
+ end
+
+end
+
+statistics.register("resource resolver", function()
+ local scandata = resolvers.scandata()
+ return format("loadtime %s seconds, %s scans with scantime %s seconds, %s shared scans, %s found files, scanned paths: %s",
+ resolvers.loadtime(),
+ scandata.n,
+ scandata.time,
+ scandata.shared,
+ #resolvers.foundintrees(),
+ #scandata.paths > 0 and concat(scandata.paths," ") or "<none>"
+ )
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt
new file mode 100644
index 00000000000..3bfd191b981
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-ini.lmt
@@ -0,0 +1,46 @@
+if not modules then modules = { } end modules ['luat-ini'] = {
+ 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"
+}
+
+--[[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]]--
+
+userdata = userdata or { } -- for users (e.g. functions etc)
+thirddata = thirddata or { } -- only for third party modules
+moduledata = moduledata or { } -- only for development team
+documentdata = documentdata or { } -- for users (e.g. raw data)
+parametersets = parametersets or { } -- for special purposes
+
+table.setmetatableindex(moduledata,"table")
+table.setmetatableindex(thirddata, "table")
+
+if not global then
+ global = _G
+end
+
+LUATEXVERSION = status.luatex_version/100
+ + tonumber(status.luatex_revision)/10000
+
+LUATEXENGINE = status.luatex_engine and string.lower(status.luatex_engine)
+ or (string.find(status.banner,"LuajitTeX",1,true) and "luajittex" or "luatex")
+
+LUATEXFUNCTIONALITY = status.development_id or 6346
+
+LUATEXFORMATID = status.format_id or 0
+
+JITSUPPORTED = LUATEXENGINE == "luajittex" or jit
+
+INITEXMODE = status.ini_version
+
+CONTEXTLMTXMODE = 1
+
+function os.setlocale()
+ -- no need for a message
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/luat-ini.mkxl
new file mode 100644
index 00000000000..9a78c3934c4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-ini.mkxl
@@ -0,0 +1,299 @@
+%D \module
+%D [ file=luat-ini,
+%D version=2005.08.11,
+%D title=\CONTEXT\ Lua Macros,
+%D subtitle=Initialization,
+%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 Lua Macros / Initialization}
+
+\unprotect
+
+%D Loading lua code can be done using \type {startup.lua}. The following method uses
+%D the \TEX\ input file locator of kpse. At least we need to use that way of loading
+%D when we haven't yet define our own code, which we keep outside the format. We
+%D will keep code outside \TEX\ files as much as possible. The solutions evolved
+%D with the engine but one can find some history in the \MKIV\ files and articles.
+
+%ifdefined\setnaturalcatcodes \else \let\setnaturalcatcodes\relax \fi
+\ifdefined\obeylualines \else \let\obeylualines \relax \fi
+\ifdefined\obeyluatokens \else \let\obeyluatokens \relax \fi
+
+%D A few more goodies:
+
+\aliased\let\stoplua \relax % tex catcodes
+\aliased\let\stopluacode\relax % lua catcodes
+
+%D In the meantime the \LUATEX\ interface has become stable but we still
+%D see traces of old here (needs checking).
+
+\permanent\protected\def\startlua % \stoplua
+ {\begingroup
+ \obeylualines
+ \luat_start_lua_indeed}
+
+\def\luat_start_lua_indeed#1\stoplua
+ {\normalexpanded{\endgroup\noexpand\directlua{#1}}}
+
+\permanent\protected\def\startluacode % \stopluacode
+ {\begingroup
+ \obeylualines
+ \obeyluatokens
+ \luat_start_lua_code_indeed}
+
+\def\luat_start_lua_code_indeed#1\stopluacode
+ %{\normalexpanded{\endgroup\noexpand\directlua{#1}}}
+ {\directlua{#1\beginlocalcontrol\endgroup\endlocalcontrol}}
+
+%D Some delayed definitions:
+
+\ifdefined\obeylines \else \let\obeylines \relax \fi
+\ifdefined\obeyedline \else \let\obeyedline \relax \fi
+\ifdefined\obeyspaces \else \let\obeyspaces \relax \fi
+\ifdefined\obeyedspace \else \let\obeyedspace \relax \fi
+
+\aliased\let\obeylualines\relax % not used, will go away
+
+\newtoks\everyluacode
+
+%D It is nicer for checking with \type {s-system-macros} if we have some meaning:
+
+\pushoverloadmode
+ \let\-\explicitdiscretionary
+\popoverloadmode
+
+\ifdefined\n \else \mutable\def\n{n} \fi \ifdefined\r \else \mutable\def\r{r} \fi
+\ifdefined\f \else \mutable\def\f{f} \fi \ifdefined\t \else \mutable\def\t{t} \fi
+\ifdefined\a \else \mutable\def\a{a} \fi \ifdefined\b \else \mutable\def\b{b} \fi
+\ifdefined\v \else \mutable\def\v{v} \fi \ifdefined\s \else \mutable\def\s{s} \fi
+
+\ifdefined\+ \else \mutable\def\+{+} \fi \ifdefined\- \else \mutable\def\-{-} \fi
+
+\ifdefined\? \else \mutable\def\?{?} \fi \ifdefined\! \else \mutable\def\!{!} \fi % bonus
+
+\ifdefined\1 \else \mutable\def\1{1} \fi \ifdefined\2 \else \mutable\def\2{2} \fi
+\ifdefined\3 \else \mutable\def\3{3} \fi \ifdefined\4 \else \mutable\def\4{4} \fi
+\ifdefined\5 \else \mutable\def\5{5} \fi \ifdefined\6 \else \mutable\def\6{6} \fi
+\ifdefined\7 \else \mutable\def\7{7} \fi \ifdefined\8 \else \mutable\def\8{8} \fi
+\ifdefined\9 \else \mutable\def\9{9} \fi \ifdefined\0 \else \mutable\def\0{0} \fi
+
+\immutable\edef\lua_letter_backslash{\string\\}
+\immutable\edef\lua_letter_bar {\string\|} \immutable\edef\lua_letter_dash {\string\-}
+\immutable\edef\lua_letter_lparent {\string\(} \immutable\edef\lua_letter_rparent {\string\)}
+\immutable\edef\lua_letter_lbrace {\string\{} \immutable\edef\lua_letter_rbrace {\string\}}
+\immutable\edef\lua_letter_squote {\string\'} \immutable\edef\lua_letter_dquote {\string\"}
+\immutable\edef\lua_letter_n {\string\n} \immutable\edef\lua_letter_r {\string\r}
+\immutable\edef\lua_letter_f {\string\f} \immutable\edef\lua_letter_t {\string\t}
+\immutable\edef\lua_letter_a {\string\a} \immutable\edef\lua_letter_b {\string\b}
+\immutable\edef\lua_letter_v {\string\v} \immutable\edef\lua_letter_s {\string\s}
+\immutable\edef\lua_letter_one {\string\1} \immutable\edef\lua_letter_two {\string\2}
+\immutable\edef\lua_letter_three {\string\3} \immutable\edef\lua_letter_four {\string\4}
+\immutable\edef\lua_letter_five {\string\5} \immutable\edef\lua_letter_six {\string\6}
+\immutable\edef\lua_letter_seven {\string\7} \immutable\edef\lua_letter_eight {\string\8}
+\immutable\edef\lua_letter_nine {\string\9} \immutable\edef\lua_letter_zero {\string\0}
+
+\everyluacode {% \appendtoks
+ \enforced\let\\\lua_letter_backslash
+ \enforced\let\|\lua_letter_bar \enforced\let\-\lua_letter_dash
+ \enforced\let\(\lua_letter_lparent \enforced\let\)\lua_letter_rparent
+ \enforced\let\{\lua_letter_lbrace \enforced\let\}\lua_letter_rbrace
+ \enforced\let\'\lua_letter_squote \enforced\let\"\lua_letter_dquote
+ \enforced\let\n\lua_letter_n \enforced\let\r\lua_letter_r
+ \enforced\let\f\lua_letter_f \enforced\let\t\lua_letter_t
+ \enforced\let\a\lua_letter_a \enforced\let\b\lua_letter_b
+ \enforced\let\v\lua_letter_v \enforced\let\s\lua_letter_s
+ \enforced\let\1\lua_letter_one \enforced\let\2\lua_letter_two
+ \enforced\let\3\lua_letter_three \enforced\let\4\lua_letter_four
+ \enforced\let\5\lua_letter_five \enforced\let\6\lua_letter_six
+ \enforced\let\7\lua_letter_seven \enforced\let\8\lua_letter_eight
+ \enforced\let\9\lua_letter_nine \enforced\let\0\lua_letter_zero
+} % \to \everyluacode
+
+\permanent\protected\def\obeyluatokens
+ {\setcatcodetable\luacatcodes
+ \the\everyluacode}
+
+\immutable\edef\luamajorversion{\ctxwrite{LUAMINORVERSION}}
+\immutable\edef\luaminorversion{\ctxwrite{LUAMAJORVERSION}}
+
+%D We need a way to pass strings safely to \LUA\ without the need for tricky
+%D escaping. Compare:
+%D
+%D \starttyping
+%D \ctxlua {something("anything tricky can go here")}
+%D \ctxlua {something([\luastringsep[anything tricky can go here]\luastringsep])}
+%D \stoptyping
+
+\def\luastringsep{===} % this permits \typefile{self} otherwise nested b/e sep problems
+
+\edef\!!bs{[\luastringsep[} % later redefined as mutable
+\edef\!!es{]\luastringsep]}
+
+%D We have a the following available as primitive so there is no need for it:
+%D
+%D \starttyping
+%D \edef\luaescapestring#1{\!!bs#1\!!es}
+%D \stoptyping
+
+\permanent\protected\def\setdocumentfilename #1#2{\clf_setdocumentfilename\numexpr#1\relax{#2}}
+\permanent \def\getdocumentfilename #1{\clf_getdocumentfilename\numexpr#1\relax}
+\permanent\protected\def\setdocumentargument #1#2{\clf_setdocumentargument{#1}{#2}}
+\permanent \def\getdocumentargument #1{\clf_getdocumentargument{#1}{}}
+\permanent\protected\def\setdocumentargumentdefault#1#2{\clf_setdocumentdefaultargument{#1}{#2}}
+\permanent \def\getdocumentargumentdefault#1#2{\clf_getdocumentargument{#1}{#2}}
+
+% seldom used so no need for speedy variants:
+
+\permanent\def\doifelsedocumentargument #1{\doifelsesomething{\clf_getdocumentargument{#1}}}
+\permanent\def\doifdocumentargument #1{\doifsomething {\clf_getdocumentargument{#1}}}
+\permanent\def\doifnotdocumentargument #1{\doifnothing {\clf_getdocumentargument{#1}}}
+\permanent\def\doifelsedocumentfilename #1{\doifelsesomething{\clf_getdocumentfilename\numexpr#1\relax}}
+\permanent\def\doifdocumentfilename #1{\doifsomething {\clf_getdocumentfilename\numexpr#1\relax}}
+\permanent\def\doifnotdocumentfilename #1{\doifnothing {\clf_getdocumentfilename\numexpr#1\relax}}
+
+\aliased\let\doifdocumentargumentelse\doifelsedocumentargument
+\aliased\let\doifdocumentfilenameelse\doifelsedocumentfilename
+
+%D A handy helper:
+
+\permanent\def\luaexpanded#1{\luaescapestring\expandafter{\normalexpanded{#1}}}
+
+%D Experimental:
+
+\permanent\protected\def\startluaparameterset[#1]% \stopluaparameterset
+ {\begingroup
+ \obeylualines
+ \obeyluatokens
+ \luat_start_lua_parameter_set{#1}}
+
+\def\luat_start_lua_parameter_set#1#2\stopluaparameterset
+ {\ctxlua{parametersets["#1"]={#2}}%
+ \endgroup}
+
+\aliased\let\stopluaparameterset\relax
+
+\permanent\def\luaparameterset#1#2{\ctxlua{parametersets["#1"]={#2} context("#1")}}
+
+% todo: \mergeparameterset
+
+% usage:
+%
+% \startluaparameterset [u3d:myset:display:1]
+% toolbar=false,
+% tree=true
+% \stopluaparameterset
+%
+% option=u3d:myset:display:1
+%
+% or:
+%
+% option=\luaparameterset{u3d:myset:display:1}{toolbar=false,tree=true}
+
+%D A Handy helper:
+
+\permanent\def\luaconditional#1{\ifcase#1tru\else fals\fi e}
+
+%D Goodie:
+%D
+%D \starttyping
+%D \ctxluacode{context("%0.5f",1/3)}
+%D \stoptyping
+
+\permanent\protected\def\ctxluacode
+ {\begingroup
+ \obeylualines
+ \obeyluatokens
+ \catcode\leftbraceasciicode \plusone
+ \catcode\rightbraceasciicode\plustwo
+ \afterassignment\luat_lua_code
+ \scratchtoks=}
+
+% Hm, are we sure that the \* commands work out okay here? We could probably
+% use \setcatcodetable\luacatcodes instead of \obeyluatokens now.
+
+\def\luat_lua_code
+ {\normalexpanded{\endgroup\noexpand\directlua\expandafter{\the\scratchtoks}}} % \zerocount is default
+
+% \startctxfunction MyFunctionA
+% context(" A1 ")
+% \stopctxfunction
+%
+% \startctxfunctiondefinition MyFunctionB
+% context(" B2 ")
+% \stopctxfunctiondefinition
+%
+% \starttext
+% \dorecurse{10000}{\ctxfunction{MyFunctionA}} \page
+% \dorecurse{10000}{\MyFunctionB} \page
+% \dorecurse{10000}{\ctxlua{context(" C3 ")}} \page
+% \stoptext
+
+\installsystemnamespace{ctxfunction}
+
+\permanent\protected\def\startctxfunctiondefinition #1 % \stopctxfunctiondefinition
+ {\begingroup \obeylualines \obeyluatokens \luat_start_lua_function_definition_indeed{#1}}
+
+\installsystemnamespace{luafunction}
+
+\def\luat_start_lua_function_definition_indeed#1#2\stopctxfunctiondefinition
+ {\endgroup
+ \expandafter\chardef\csname\??luafunction#1\endcsname\ctxcommand{ctxfunction(\!!bs#2\!!es)}\relax
+ \edefcsname#1\endcsname{\noexpand\luafunction\csname\??luafunction#1\endcsname}}
+
+\permanent\protected\def\setctxluafunction#1#2% experiment
+ {\expandafter\chardef\csname\??luafunction#1\endcsname#2\relax
+ \edefcsname#1\endcsname{\noexpand\luafunction\csname\??luafunction#1\endcsname}}
+
+\aliased\let\stopctxfunctiondefinition\relax
+
+\permanent\protected\def\startctxfunction #1 % \stopctxfunction
+ {\begingroup \obeylualines \obeyluatokens \luat_start_lua_function_indeed{#1}}
+
+\def\luat_start_lua_function_indeed#1#2\stopctxfunction
+ {\endgroup\edefcsname\??ctxfunction#1\endcsname{\noexpand\luafunction\ctxcommand{ctxfunction(\!!bs#2\!!es)}\relax}}
+
+\aliased\let\stopctxfunction\relax
+
+\permanent\def\ctxfunction#1%
+ {\begincsname\??ctxfunction#1\endcsname}
+
+%D In theory this is faster due to the call not being wrapped in a function but in
+%D practice the speedup can't be noticed. The actions called for often have lots of
+%D lookups so an extra one doesn't matter much. The kind of calls differs a lot per
+%D document and often there are other ways to optimize a style. For instance we can
+%D gain a lot when defining a font, but when a frozen definition is used that gain
+%D gets completely lost. For some calls (take list writers) it can get worse if only
+%D because readability gets worse and passing is already efficient due to selective
+%D flushing, while with the token scanners one has to scan all of them.
+
+% \startctxfunctiondefinition foo commands.foo() \stopctxfunctiondefinition
+%
+% \installctxfunction\foo{commands.foo}
+
+\permanent\protected\def\installctxfunction#1#2% expandable
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction(\!!bs#2\!!es,true)}\relax}
+
+\permanent\protected\def\installctxscanner#1#2% expandable
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name",\!!bs#2\!!es,true)}\relax}
+
+\permanent\protected\def\installprotectedctxfunction#1#2% protected
+ {\edef\m_syst_name{\csstring#1}%
+ \global\protected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction(\!!bs#2\!!es,true)}\relax}
+
+\permanent\protected\def\installprotectedctxscanner#1#2% protected
+ {\edef\m_syst_name{\csstring#1}%
+ \global\protected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name",\!!bs#2\!!es,true)}\relax}
+
+\permanent\protected\def\resetctxscanner#1%
+ {\edef\m_syst_name{\csstring#1}%
+ \gletcsname\m_syst_name\endcsname\relax}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl b/Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl
new file mode 100644
index 00000000000..61f9ccfd0fd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-lib.mkxl
@@ -0,0 +1,104 @@
+%D \module
+%D [ file=luat-lib,
+%D version=2006.09.11,
+%D title=\CONTEXT\ Lua Macros,
+%D subtitle=Libraries,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Lua Macros / Libraries}
+
+\registerctxluafile{util-str}{}
+\registerctxluafile{util-tab}{}
+\registerctxluafile{util-fil}{optimize}
+\registerctxluafile{util-sac}{optimize}
+\registerctxluafile{util-sto}{} % could also be done in trac-deb.mkiv
+\registerctxluafile{util-pck}{}
+\registerctxluafile{util-prs}{}
+\registerctxluafile{util-fmt}{}
+\registerctxluafile{util-dim}{}
+
+\registerctxluafile{trac-set}{}
+\registerctxluafile{luat-log}{autosuffix}
+\registerctxluafile{trac-inf}{autosuffix}
+\registerctxluafile{util-lua}{}
+\registerctxluafile{util-deb}{} % could also be done in trac-deb.mkiv
+
+\registerctxluafile{util-tpl}{} % needs tracker
+\registerctxluafile{util-seq}{}
+
+\registerctxluafile{util-sta}{}
+
+\registerctxluafile{util-sbx}{} % needs tracker and templates
+
+\registerctxluafile{util-soc-imp-reset} {}
+\registerctxluafile{util-soc-imp-socket} {}
+\registerctxluafile{util-soc-imp-ltn12} {}
+\registerctxluafile{util-soc-imp-mime} {}
+\registerctxluafile{util-soc-imp-url} {}
+\registerctxluafile{util-soc-imp-headers}{}
+\registerctxluafile{util-soc-imp-http} {}
+\registerctxluafile{util-soc-imp-tp} {}
+
+\registerctxluafile{util-zip}{}
+
+\registerctxluafile{data-ini}{}
+\registerctxluafile{data-exp}{}
+\registerctxluafile{data-env}{}
+\registerctxluafile{data-tmp}{}
+\registerctxluafile{data-met}{}
+\registerctxluafile{data-res}{}
+\registerctxluafile{data-inp}{}
+\registerctxluafile{data-out}{}
+\registerctxluafile{data-fil}{} % opener gets overloaded in data-tex
+
+\registerctxluafile{data-pre}{} % after data-res
+\registerctxluafile{data-bin}{} % before data-tex
+\registerctxluafile{data-tex}{} % after data-pre
+\registerctxluafile{data-vir}{}
+\registerctxluafile{data-zip}{}
+%registerctxluafile{data-crl}{}
+\registerctxluafile{data-sch}{}
+\registerctxluafile{data-tre}{}
+\registerctxluafile{data-lua}{}
+\registerctxluafile{data-ctx}{}
+\registerctxluafile{data-con}{}
+\registerctxluafile{data-use}{}
+\registerctxluafile{data-aux}{}
+
+\registerctxluafile{luat-cbk}{autosuffix}
+\registerctxluafile{luat-run}{}
+\registerctxluafile{luat-fio}{autosuffix}
+\registerctxluafile{luat-cnf}{}
+\registerctxluafile{luat-lua}{}
+\registerctxluafile{luat-sto}{}
+\registerctxluafile{luat-ini}{autosuffix}
+\registerctxluafile{util-env}{}
+\registerctxluafile{luat-env}{}
+\registerctxluafile{luat-exe}{} % simplified
+\registerctxluafile{luat-iop}{} % simplified
+%registerctxluafile{luat-bwc}{}
+\registerctxluafile{trac-lmx}{} % might become l-lmx or luat-lmx
+\registerctxluafile{luat-mac}{}
+%registerctxluafile{luat-prp}{} % for the moment of not much use
+
+\registerctxluafile{lxml-tab}{}
+\registerctxluafile{lxml-lpt}{}
+\registerctxluafile{lxml-xml}{}
+\registerctxluafile{lxml-aux}{}
+\registerctxluafile{lxml-mis}{}
+
+% \pushoverloadmode
+%
+% \ifdefined\writestatus \else \protected\def\writestatus#1#2{\ctxlua{logs.status([==[#1]==],[==[#2]==])}} \fi
+% \ifdefined\writestring \else \protected\def\writestring #1{\ctxlua{logs.writer([==[#1]==],"\string\n")}} \fi
+% \ifdefined\writeline \else \protected\def\writeline {\ctxlua{logs.newline()}} \fi
+%
+% \popoverloadmode
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-log.lmt b/Master/texmf-dist/tex/context/base/mkxl/luat-log.lmt
new file mode 100644
index 00000000000..522f4ac4ff6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-log.lmt
@@ -0,0 +1,739 @@
+if not modules then modules = { } end modules ['luat-log'] = {
+ version = 1.001,
+ comment = "companion to trac-log.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- In fact all writes could go through lua and we could write the console and
+-- terminal handler in lua then. Ok, maybe it's slower then, so a no-go.
+
+-- This used to be combined in trac-log but as we also split between mkiv and lmtx
+-- we now have dedicated files. A side effect is a smaller format and a smaller
+-- mtxrun.
+--
+-- We use different targets: "terminal" "logfile", "both" and have no number
+-- channel.
+
+local next, type, select, print = next, type, select, print
+local format, gmatch, find = string.format, string.gmatch, string.find
+local concat, insert, remove = table.concat, table.insert, table.remove
+local topattern = string.topattern
+local utfchar = utf.char
+local datetime = os.date
+local openfile = io.open
+
+local write_nl = texio.write_nl
+local write = texio.write
+
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+local settings_to_hash = utilities.parsers.settings_to_hash
+local sortedkeys = table.sortedkeys
+
+-- variant is set now
+
+local variant = "default"
+----- variant = "ansi"
+
+logs = logs or { }
+local logs = logs
+
+-- we extend the formatters:
+
+formatters.add (
+ formatters, "unichr",
+ [["U+" .. format("%%05X",%s) .. " (" .. utfchar(%s) .. ")"]]
+)
+
+formatters.add (
+ formatters, "chruni",
+ [[utfchar(%s) .. " (U+" .. format("%%05X",%s) .. ")"]]
+)
+
+-- basic loggers
+
+local function ignore() end
+
+setmetatableindex(logs, function(t,k) t[k] = ignore ; return ignore end)
+
+local report, subreport, status, settarget, setformats, settranslations
+
+local direct, subdirect, writer, pushtarget, poptarget, setlogfile, settimedlog, setprocessor, setformatters, newline
+
+-- we use formatters but best check for % then because for simple messages but
+-- we don't want this overhead for single messages (not that there are that
+-- many; we could have a special weak table)
+
+local function ansisupported(specification)
+ if specification ~= "ansi" and specification ~= "ansilog" then
+ return false
+ elseif os and os.enableansi then
+ return os.enableansi()
+ else
+ return false
+ end
+end
+
+do
+
+ if arg and ansisupported then
+ -- we're don't have environment.arguments yet
+ for k, v in next, arg do -- k can be negative !
+ if v == "--ansi" or v == "--c:ansi" then
+ if ansisupported("ansi") then
+ variant = "ansi"
+ end
+ break
+ elseif v == "--ansilog" or v == "--c:ansilog" then
+ if ansisupported("ansilog") then
+ variant = "ansilog"
+ end
+ break
+ end
+ end
+ end
+
+ local whereto = "both"
+ local target = nil
+ local targets = nil
+
+ local formats = table.setmetatableindex("self")
+ local translations = table.setmetatableindex("self")
+
+ local report_yes, subreport_yes, direct_yes, subdirect_yes, status_yes
+ local report_nop, subreport_nop, direct_nop, subdirect_nop, status_nop
+
+ local variants = {
+ default = {
+ formats = {
+ report_yes = formatters["%-15s > %s\n"],
+ report_nop = formatters["%-15s >\n"],
+ direct_yes = formatters["%-15s > %s"],
+ direct_nop = formatters["%-15s >"],
+ subreport_yes = formatters["%-15s > %s > %s\n"],
+ subreport_nop = formatters["%-15s > %s >\n"],
+ subdirect_yes = formatters["%-15s > %s > %s"],
+ subdirect_nop = formatters["%-15s > %s >"],
+ status_yes = formatters["%-15s : %s\n"],
+ status_nop = formatters["%-15s :\n"],
+ },
+ targets = setmetatableindex( {
+ logfile = "logfile",
+ log = "logfile",
+ file = "logfile",
+ console = "terminal",
+ terminal = "terminal",
+ both = "terminal_and_logfile",
+ }, function(t,k) t[k] = "terminal_and_logfile" end),
+ },
+ ansi = {
+ formats = {
+ report_yes = formatters["%-15s > %s\n"],
+ report_nop = formatters["%-15s >\n"],
+ direct_yes = formatters["%-15s > %s"],
+ direct_nop = formatters["%-15s >"],
+ subreport_yes = formatters["%-15s > %s > %s\n"],
+ subreport_nop = formatters["%-15s > %s >\n"],
+ subdirect_yes = formatters["%-15s > %s > %s"],
+ subdirect_nop = formatters["%-15s > %s >"],
+ status_yes = formatters["%-15s : %s\n"],
+ status_nop = formatters["%-15s :\n"],
+ },
+ targets = setmetatableindex( {
+ logfile = false,
+ log = false,
+ file = false,
+ console = "terminal",
+ terminal = "terminal",
+ both = "terminal",
+ }, function(t,k) t[k] = "terminal" end),
+ }
+ }
+
+ variants.ansilog = {
+ formats = variants.ansi.formats,
+ targets = variants.default.targets,
+ }
+
+ logs.flush = io.flush
+
+ writer = function(...)
+ if target then
+ write_nl(target,...)
+ end
+ end
+
+ newline = function()
+ if target then
+ write_nl(target,"\n")
+ end
+ end
+
+ report = function(a,b,c,...)
+ if not target then
+ -- ignore
+ elseif c ~= nil then
+ write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
+ elseif b then
+ write_nl(target,report_yes(translations[a],formats[b]))
+ elseif a then
+ write_nl(target,report_nop(translations[a]))
+ else
+ write_nl(target,"\n")
+ end
+ end
+
+ direct = function(a,b,c,...)
+ if not target then
+ return ""
+ elseif c ~= nil then
+ return direct_yes(translations[a],formatters[formats[b]](c,...))
+ elseif b then
+ return direct_yes(translations[a],formats[b])
+ elseif a then
+ return direct_nop(translations[a])
+ else
+ return ""
+ end
+ end
+
+ subreport = function(a,s,b,c,...)
+ if not target then
+ -- ignore
+ elseif c ~= nil then
+ write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
+ elseif b then
+ write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
+ elseif a then
+ write_nl(target,subreport_nop(translations[a],translations[s]))
+ else
+ write_nl(target,"\n")
+ end
+ end
+
+ subdirect = function(a,s,b,c,...)
+ if not target then
+ return ""
+ elseif c ~= nil then
+ return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
+ elseif b then
+ return subdirect_yes(translations[a],translations[s],formats[b])
+ elseif a then
+ return subdirect_nop(translations[a],translations[s])
+ else
+ return ""
+ end
+ end
+
+ status = function(a,b,c,...)
+ if not target then
+ -- ignore
+ elseif c ~= nil then
+ write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
+ elseif b then
+ write_nl(target,status_yes(translations[a],formats[b]))
+ elseif a then
+ write_nl(target,status_nop(translations[a]))
+ else
+ write_nl(target,"\n")
+ end
+ end
+
+ settarget = function(askedwhereto)
+ whereto = askedwhereto or whereto or "both"
+ target = targets[whereto]
+ if not target then
+ whereto = "both"
+ target = targets[whereto]
+ end
+ if target == "terminal" or target == "terminal_and_logfile" then
+ logs.flush = io.flush
+ else
+ logs.flush = ignore
+ end
+ end
+
+ local stack = { }
+
+ pushtarget = function(newtarget)
+ insert(stack,target)
+ settarget(newtarget)
+ end
+
+ poptarget = function()
+ if #stack > 0 then
+ settarget(remove(stack))
+ end
+ end
+
+ setformats = function(f)
+ formats = f
+ end
+
+ settranslations = function(t)
+ translations = t
+ end
+
+ setprocessor = function(f)
+ local writeline = write_nl
+ write_nl = function(target,...)
+ if target then
+ writeline(target,f(...))
+ end
+ end
+ end
+
+ setformatters = function(specification)
+ local t = nil
+ local f = nil
+ local d = variants.default
+ if not specification then
+ --
+ elseif type(specification) == "table" then
+ t = specification.targets
+ f = specification.formats or specification
+ else
+ if not ansisupported(specification) then
+ specification = "default"
+ end
+ local v = variants[specification]
+ if v then
+ t = v.targets
+ f = v.formats
+ variant = specification
+ end
+ end
+ targets = t or d.targets
+ target = targets[whereto]
+ if f then
+ d = d.formats
+ else
+ f = d.formats
+ d = f
+ end
+ setmetatableindex(f,d)
+ report_yes = f.report_yes
+ report_nop = f.report_nop
+ subreport_yes = f.subreport_yes
+ subreport_nop = f.subreport_nop
+ direct_yes = f.direct_yes
+ direct_nop = f.direct_nop
+ subdirect_yes = f.subdirect_yes
+ subdirect_nop = f.subdirect_nop
+ status_yes = f.status_yes
+ status_nop = f.status_nop
+ settarget(whereto)
+ end
+
+ setformatters(variant)
+
+ setlogfile = ignore
+ settimedlog = ignore
+
+end
+
+logs.report = report
+logs.subreport = subreport
+logs.status = status
+logs.settarget = settarget
+logs.pushtarget = pushtarget
+logs.poptarget = poptarget
+logs.setformats = setformats
+logs.settranslations = settranslations
+
+logs.setlogfile = setlogfile
+logs.settimedlog = settimedlog
+logs.setprocessor = setprocessor
+logs.setformatters = setformatters
+
+logs.direct = direct
+logs.subdirect = subdirect
+logs.writer = writer
+logs.newline = newline
+
+local data = { }
+local states = nil
+local force = false
+
+function logs.reporter(category,subcategory)
+ local logger = data[category]
+ if not logger then
+ local state = states == true
+ if not state and type(states) == "table" then
+ for c, _ in next, states do
+ if find(category,c) then
+ state = true
+ break
+ end
+ end
+ end
+ logger = {
+ reporters = { },
+ state = state,
+ }
+ data[category] = logger
+ end
+ local reporter = logger.reporters[subcategory or "default"]
+ if not reporter then
+ if subcategory then
+ reporter = function(...)
+ if force or not logger.state then
+ subreport(category,subcategory,...)
+ end
+ end
+ logger.reporters[subcategory] = reporter
+ else
+ local tag = category
+ reporter = function(...)
+ if force or not logger.state then
+ report(category,...)
+ end
+ end
+ logger.reporters.default = reporter
+ end
+ end
+ return reporter
+end
+
+logs.new = logs.reporter -- for old times sake
+
+-- context specicific: this ends up in the macro stream
+
+local ctxreport = logs.writer
+
+function logs.setmessenger(m)
+ ctxreport = m
+end
+
+function logs.messenger(category,subcategory)
+ -- we need to avoid catcode mess (todo: fast context)
+ if subcategory then
+ return function(...)
+ ctxreport(subdirect(category,subcategory,...))
+ end
+ else
+ return function(...)
+ ctxreport(direct(category,...))
+ end
+ end
+end
+
+-- so far
+
+local function setblocked(category,value) -- v.state == value == true : disable
+ if category == true or category == "all" then
+ -- lock all
+ category, value = "*", true
+ elseif category == false then
+ -- unlock all
+ category, value = "*", false
+ elseif value == nil then
+ -- lock selective
+ value = true
+ end
+ if category == "*" then
+ states = value
+ for k, v in next, data do
+ v.state = value
+ end
+ else
+ alllocked = false
+ states = settings_to_hash(category,type(states)=="table" and states or nil)
+ for c in next, states do
+ local v = data[c]
+ if v then
+ v.state = value
+ else
+ c = topattern(c,true,true)
+ for k, v in next, data do
+ if find(k,c) then
+ v.state = value
+ end
+ end
+ end
+ end
+ end
+end
+
+function logs.disable(category,value)
+ setblocked(category,value == nil and true or value)
+end
+
+function logs.enable(category)
+ setblocked(category,false)
+end
+
+function logs.categories()
+ return sortedkeys(data)
+end
+
+function logs.show()
+ local n, c, s, max = 0, 0, 0, 0
+ for category, v in table.sortedpairs(data) do
+ n = n + 1
+ local state = v.state
+ local reporters = v.reporters
+ local nc = #category
+ if nc > c then
+ c = nc
+ end
+ for subcategory, _ in next, reporters do
+ local ns = #subcategory
+ if ns > c then
+ s = ns
+ end
+ local m = nc + ns
+ if m > max then
+ max = m
+ end
+ end
+ local subcategories = concat(sortedkeys(reporters),", ")
+ if state == true then
+ state = "disabled"
+ elseif state == false then
+ state = "enabled"
+ else
+ state = "unknown"
+ end
+ -- no new here
+ report("logging","category %a, subcategories %a, state %a",category,subcategories,state)
+ end
+ report("logging","categories: %s, max category: %s, max subcategory: %s, max combined: %s",n,c,s,max)
+end
+
+local delayed_reporters = { }
+
+setmetatableindex(delayed_reporters,function(t,k)
+ local v = logs.reporter(k.name)
+ t[k] = v
+ return v
+end)
+
+function utilities.setters.report(setter,...)
+ delayed_reporters[setter](...)
+end
+
+directives.register("logs.blocked", function(v)
+ setblocked(v,true)
+end)
+
+directives.register("logs.target", function(v)
+ settarget(v)
+end)
+
+do
+
+ local report = logs.reporter("pages") -- not needed but saves checking when we grep for it
+ local texgetcount = tex and tex.getcount
+
+ local real, user, sub = 0, 0, 0
+
+ function logs.start_page_number()
+ real = texgetcount("realpageno")
+ user = texgetcount("userpageno")
+ sub = texgetcount("subpageno")
+ end
+
+ local timing = false
+ local usage = false
+ local lasttime = nil
+
+ logs.private = {
+ enablepagetiming = function()
+ usage = true
+ end,
+ getpagetiming = function()
+ return type(usage) == "table" and usage
+ end,
+ }
+
+ trackers.register("pages.timing", function() timing = "" end)
+
+ function logs.stop_page_number() -- the first page can includes the initialization so we omit this in average
+ if timing or usage then
+ local elapsed = statistics.currenttime(statistics)
+ local average, page
+ if not lasttime or real < 2 then
+ average = elapsed
+ page = elapsed
+ else
+ average = elapsed / (real - 1)
+ page = elapsed - lasttime
+ end
+ lasttime = elapsed
+ if timing then
+ timing = formatters[", total %0.03f, page %0.03f, average %0.03f"](elapsed,page,average)
+ end
+ if usage then
+ usage = {
+ page = {
+ real = real,
+ user = user,
+ sub = sub,
+ },
+ time = {
+ elapsed = elapsed,
+ page = page,
+ average = average,
+ }
+ }
+ end
+ end
+ if real <= 0 then
+ report("flushing page%s",timing)
+ elseif user <= 0 then
+ report("flushing realpage %s%s",real,timing)
+ elseif sub <= 0 then
+ report("flushing realpage %s, userpage %s%s",real,user,timing)
+ else
+ report("flushing realpage %s, userpage %s, subpage %s%s",real,user,sub,timing)
+ end
+ logs.flush()
+ end
+
+end
+
+-- we don't have show_open and show_close callbacks yet
+
+do
+ local texerror = tex and tex.error or print
+ local formatters = string.formatters
+
+ function logs.texerrormessage(fmt,first,...) -- for the moment we put this function here
+ texerror(first and formatters[fmt](first,...) or fmt)
+ end
+
+end
+
+-- this is somewhat slower but prevents out-of-order messages when print is mixed
+-- with texio.write
+
+-- io.stdout:setvbuf('no')
+-- io.stderr:setvbuf('no')
+
+-- windows: > nul 2>&1
+-- unix : > null 2>&1
+
+if package.helpers.report then
+ package.helpers.report = logs.reporter("package loader") -- when used outside mtxrun
+end
+
+do
+
+ local finalactions = { }
+ local fatalerrors = { }
+ local possiblefatal = { }
+ local loggingerrors = false
+
+ function logs.loggingerrors()
+ return loggingerrors
+ end
+
+ directives.register("logs.errors",function(v)
+ loggingerrors = v
+ if type(v) == "string" then
+ fatalerrors = settings_to_hash(v)
+ else
+ fatalerrors = { }
+ end
+ end)
+
+ function logs.registerfinalactions(...)
+ insert(finalactions,...) -- so we can force an order if needed
+ end
+
+ local what = nil
+ local report = nil
+ local state = nil
+ local target = nil
+
+ local function startlogging(t,r,w,s)
+ target = t
+ state = force
+ force = true
+ report = type(r) == "function" and r or logs.reporter(r)
+ what = w
+ pushtarget(target)
+ newline()
+ if s then
+ report("start %s: %s",what,s)
+ else
+ report("start %s",what or "")
+ end
+ if target == "logfile" then
+ newline()
+ end
+ return report
+ end
+
+ local function stoplogging()
+ if target == "logfile" then
+ newline()
+ end
+ report("stop %s",what or "")
+ if target == "logfile" then
+ newline()
+ end
+ poptarget()
+ state = oldstate
+ end
+
+ function logs.startfilelogging(...)
+ return startlogging("logfile", ...)
+ end
+
+ logs.stopfilelogging = stoplogging
+
+ local done = false
+
+ function logs.starterrorlogging(r,w,...)
+ if not done then
+ pushtarget("terminal")
+ newline()
+ logs.report("error logging","start possible issues")
+ poptarget()
+ done = true
+ end
+ if fatalerrors[w] then
+ possiblefatal[w] = true
+ end
+ return startlogging("terminal",r,w,...)
+ end
+
+ logs.stoperrorlogging = stoplogging
+
+ function logs.finalactions()
+ if #finalactions > 0 then
+ for i=1,#finalactions do
+ finalactions[i]()
+ end
+ if done then
+ pushtarget("terminal")
+ newline()
+ logs.report("error logging","stop possible issues")
+ poptarget()
+ end
+ return next(possiblefatal) and sortedkeys(possiblefatal) or false
+ end
+ end
+
+end
+
+-- just in case we load from context
+
+local dummy = function() end
+
+function logs.application(t)
+ return {
+ name = t.name or tex.jobname,
+ banner = t.banner,
+ report = logs.reporter(t.name),
+ moreinfo = dummy,
+ export = dummy,
+ help = dummy,
+ identify = dummy,
+ version = dummy,
+ }
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-soc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/luat-soc.mkxl
new file mode 100644
index 00000000000..b2ce7048395
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-soc.mkxl
@@ -0,0 +1,52 @@
+%D \module
+%D [ file=luat-soc,
+%D version=2018.08.05,
+%D title=\CONTEXT\ Lua Macros,
+%D subtitle=Socket Libraries,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Lua Macros / Socket Libraries}
+
+%D In \LUATEX\ we provide the socket library that is more or less the standard one
+%D for \LUA. It has been around for a while and seems to be pretty stable. The
+%D binary module is copmpiled into \LUATEX\ and the accompanying .lua files are
+%D preloaded. These files are mostly written by Diego Nehab, Andre Carregal, Javier
+%D Guerra, and Fabio Mascarenhas with contributions from Diego Nehab, Mike Pall,
+%D David Burgess, Leonardo Godinho, Thomas Harning Jr., and Gary NG. The originals
+%D are part of and copyrighted by the Kepler project.
+%D
+%D Here we reload a slightly reworked version of these \type {.lua} files. We keep
+%D the same (documented) interface but streamlined some fo the code. No more
+%D modules, no more pre 5.2 \LUA, etc. Also, as it loads into the \CONTEXT
+%D ecosystem, we plug in some logging. (and maybe tracing in the future). As we
+%D don't support serial ports in \LUATEX, related code has been dropped.
+%D
+%D The files are reformatted so that we can more easilly add additional features
+%D and|/|or tracing options. Any error introduced there is our fault! The url module
+%D might be replaced by the one in \CONTEXT. When we need mbox a suitable variant
+%D will be provided.
+
+%D Currently we preload the related \LUA\ code in \LUATEX, but that might change at
+%D some point. We're prepared for that.
+
+% \registerctxluafile{util-soc-imp-reset} {}
+%
+% \registerctxluafile{util-soc-imp-socket} {}
+% % registerctxluafile{util-soc-imp-copas} {}
+% \registerctxluafile{util-soc-imp-ltn12} {}
+% % registerctxluafile{util-soc-imp-mbox} {}
+% \registerctxluafile{util-soc-imp-mime} {}
+% \registerctxluafile{util-soc-imp-url} {}
+% \registerctxluafile{util-soc-imp-headers}{}
+% \registerctxluafile{util-soc-imp-http} {}
+% \registerctxluafile{util-soc-imp-tp} {}
+% % registerctxluafile{util-soc-imp-ftp} {}
+% % registerctxluafile{util-soc-imp-smtp} {}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-usr.lmt b/Master/texmf-dist/tex/context/base/mkxl/luat-usr.lmt
new file mode 100644
index 00000000000..4b876b93539
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-usr.lmt
@@ -0,0 +1,177 @@
+if not modules then modules = { } end modules ['luat-usr'] = {
+ 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 global = global
+
+local moduledata = moduledata
+local thirddata = thirddata
+local userdata = userdata
+local documentdata = documentdata
+
+local context = context
+local tostring = tostring
+local tonumber = tonumber
+local print = print
+
+local string = string
+local table = table
+local lpeg = lpeg
+local math = math
+local io = io
+local os = os
+local lpeg = lpeg
+
+local setmetatableindex = table.setmetatableindex
+local load = load
+local xpcall = xpcall
+local instance_banner = string.formatters["=[instance: %s]"] -- the = controls the lua error / see: lobject.c
+local tex_errormessage = context.errmessage
+
+local implement = interfaces.implement
+local reporter = logs.reporter
+
+local report_instance = reporter("lua instance")
+local report_script = reporter("lua script")
+local report_thread = reporter("lua thread")
+local newline = logs.newline
+
+lua.numbers = lua.numbers or { }
+lua.messages = lua.messages or { }
+
+local numbers = lua.numbers
+local messages = lua.messages
+
+storage.register("lua/numbers", numbers, "lua.numbers" )
+storage.register("lua/messages", messages, "lua.messages")
+
+-- First we implement a pure lua version of directlua and a persistent
+-- variant of it:
+
+local function runscript(code)
+ local done, message = loadstring(code)
+ if done then
+ done()
+ else
+ newline()
+ report_script("error : %s",message or "unknown")
+ report_script()
+ report_script("code : %s",code)
+ newline()
+ end
+end
+
+local threads = setmetatableindex(function(t,k)
+ local v = setmetatableindex({},global)
+ t[k] = v
+ return v
+end)
+
+local function runthread(name,code)
+ if not code or code == "" then
+ threads[name] = nil
+ else
+ local thread = threads[name]
+ local done, message = loadstring(code,nil,nil,thread)
+ if done then
+ done()
+ else
+ newline()
+ report_thread("thread: %s",name)
+ report_thread("error : %s",message or "unknown")
+ report_thread()
+ report_thread("code : %s",code)
+ newline()
+ end
+ end
+end
+
+interfaces.implement {
+ name = "luascript",
+ actions = runscript,
+ public = true,
+ protected = true,
+ arguments = "string"
+}
+
+interfaces.implement {
+ name = "luathread",
+ actions = runthread,
+ public = true,
+ protected = true,
+ arguments = "2 strings",
+}
+
+local function registername(name,message)
+ if not name or name == "" then
+ report_instance("no valid name given")
+ return
+ end
+ if not message or message == "" then
+ message = name
+ end
+ local lnn = numbers[name]
+ if not lnn then
+ lnn = #messages + 1
+ messages[lnn] = message
+ numbers[name] = lnn
+ end
+ local report = reporter("lua instance",message)
+ local proxy = {
+ -- we can access all via:
+ global = global, -- or maybe just a metatable
+ -- some protected data
+ moduledata = setmetatableindex(moduledata),
+ thirddata = setmetatableindex(thirddata),
+ -- less protected data
+ userdata = userdata,
+ documentdata = documentdata,
+ -- always there fast
+ context = context,
+ --
+ tostring = tostring,
+ tonumber = tonumber,
+ -- standard lua modules
+ string = string,
+ table = table,
+ lpeg = lpeg,
+ math = math,
+ io = io,
+ os = os,
+ lpeg = lpeg,
+ --
+ print = print,
+ report = report,
+ }
+ return function(code)
+ local code, message = load(code,nil,nil,proxy)
+ if not code then
+ report_instance("error: %s",message or code)
+ elseif not xpcall(code,report) then
+ tex_errormessage("hit return to continue or quit this run")
+ end
+ end
+end
+
+lua.registername = registername
+
+implement {
+ name = "registernamedlua",
+ arguments = "3 strings",
+ actions = function(name,message,csname)
+ if csname and csname ~= "" then
+ implement {
+ name = csname,
+ arguments = "string",
+ actions = registername(name,message) or report,
+ scope = "private",
+ }
+ else
+ report_instance("unvalid csname for %a",message or name or "?")
+ end
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/luat-usr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/luat-usr.mkxl
new file mode 100644
index 00000000000..199d22b8e6f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/luat-usr.mkxl
@@ -0,0 +1,121 @@
+%D \module
+%D [ file=luat-usr,
+%D version=2005.08.11,% moved from luat-ini
+%D title=\CONTEXT\ Lua Macros,
+%D subtitle=Initialization,
+%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 Lua Macros / Userspace}
+
+\unprotect
+
+\registerctxluafile{luat-usr}{autosuffix}
+
+%D A few goodies:
+%D
+%D \startbuffer
+%D \luascript { context("foo 1:") context(i) }
+%D \luathread {test} { i = 10 context("bar 1:") context(i) }
+%D \luathread {test} { context("bar 2:") context(i) }
+%D \luathread {test} {}
+%D \luathread {test} { context("bar 3:") context(i) }
+%D \luascript { context("foo 2:") context(i) }
+%D \stopbuffer
+%D
+%D \typebuffer \startlines \getbuffer \stoplines
+
+% \luascript % defined at the lua end
+% \luathread % defined at the lua end
+
+%D \macros
+%D {definenamedlua}
+%D
+%D We provide an interface for defining instances. We don't have the definers yet
+%D so we do it low level:
+
+\def\s!lua {lua}
+\def\s!code {code}
+\def\s!data {data}
+\def\s!start{start}
+\def\s!stop {stop}
+
+%D Beware: because \type {\expanded} is een convert command, the error message will
+%D show \type{<inserted text>} as part of the message.
+
+\installsystemnamespace{luacode}
+
+\permanent\tolerant\protected\def\definenamedlua[#1]#*[#2]%
+ {\ifarguments \orelse \ifcsname\??luacode#1\endcsname \else
+ \bgroup
+ %
+ \edef\m_syst_lua_name{lua_code_#1}%
+ %
+ \clf_registernamedlua{#1}{#2}{\m_syst_lua_name}%
+ %
+ \frozen\instance\protected\xdefcsname\s!start#1\s!code\endcsname
+ {\begingroup
+ \obeylualines
+ \obeyluatokens
+ \csname\??luacode#1\endcsname}%
+ %
+ \aliased\gletcsname\s!stop#1\s!code\endcsname\relax
+ %
+ \normalexpanded{\xdefcsname\??luacode#1\endcsname##1\csname\s!stop#1\s!code\endcsname}%
+ {\noexpand\expandafter\endgroup
+ \noexpand\expandafter
+ \expandafter\noexpand\csname clf_\m_syst_lua_name\endcsname
+ \noexpand\expandafter{\noexpand\normalexpanded{##1}}}%
+ \frozen\instance\gletcsname#1\s!code\expandafter\endcsname\csname clf_\m_syst_lua_name\endcsname
+ \egroup
+ \fi}
+
+%D We predefine a few.
+
+% \definenamedlua[module][module instance] % not needed
+
+\appendtoks
+ \definenamedlua[user] [private user]
+ \definenamedlua[third] [third party module]
+ \definenamedlua[isolated][isolated]
+\to \everyjob
+
+%D In practice this works out as follows:
+%D
+%D \startbuffer
+%D \startluacode
+%D context("LUA")
+%D \stopluacode
+%D
+%D \startusercode
+%D global.context("USER 1")
+%D context.par()
+%D context("USER 2")
+%D context.par()
+%D if characters then
+%D context("ACCESS directly")
+%D elseif global.characters then
+%D context("ACCESS via global")
+%D else
+%D context("NO ACCESS at all")
+%D end
+%D context.par()
+%D if bogus then
+%D context("ACCESS directly")
+%D elseif global.bogus then
+%D context("ACCESS via global")
+%D else
+%D context("NO ACCESS at all")
+%D end
+%D context.par()
+%D \stopusercode
+%D \stopbuffer
+%D
+%D \typebuffer
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lxml-css.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lxml-css.mkxl
new file mode 100644
index 00000000000..325516e16fc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lxml-css.mkxl
@@ -0,0 +1,76 @@
+%D \module
+%D [ file=lxml-css,
+%D version=2010.01.28,
+%D title=\CONTEXT\ Modules,
+%D subtitle=Css Helpers,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{lxml-css}{}
+
+\unprotect
+
+\permanent\def\ctxmodulecss#1{\ctxlua{moduledata.css.#1}}
+
+% No stable interface yet.
+
+% \edef\CellPadding{\xmlatt{#1}{cellpadding}}
+% \ifempty\CellPadding
+% \edef\CellPadding{.25ex}
+% \else
+% \edef\CellPadding{\cssgetsinglepadding{\xmlatt{#1}{cellpadding}}}
+% \fi
+%
+% \starttexdefinition cssgetsinglepadding #1
+% \ctxlua {
+% context((moduledata.css.padding(
+% "#1",
+% \number\dimexpr0.1ex,
+% \number\dimexpr0.01\hsize,
+% \number\dimexpr1ex,
+% \number\dimexpr1em
+% ))) % returns 4 values therefore ()
+% }sp
+% \stoptexdefinition
+
+% \startxmlsetups html:settings
+% \xmlsetsetup{#1}{p}{html:p}
+% \stopxmlsetups
+%
+% \xmlmapvalue{ctx-before} {one} {\page BEFORE\par}
+% \xmlmapvalue{ctx-after} {two} {\par AFTER\page}
+% \xmlmapvalue{text-decoration}{underline}{U}
+% \xmlmapvalue{text-decoration}{overline} {O}
+%
+% \startxmlsetups html:p
+% \testfeatureonce{100000}{
+% \edef\foo{\xmlcssstylevalue{#1}{ctx-before}\xmlcssstylevalue{#1}{ctx-after}}
+% }
+% \page {\tttf style="\xmlatt{#1}{style}"} : \elapsedtime\ s \page
+% \xmlvalue{ctx-before}{\xmlcssstylevalue{#1}{ctx-before}}{}
+% \xmlflush{#1}
+% (\xmlcssstylevalue{#1}{text-decoration})
+% (\xmlcssmappedstylevalue{#1}{text-decoration}{text-decoration})
+% \xmlvalue{ctx-after} {\xmlcssstylevalue{#1}{ctx-after}}{}
+% \stopxmlsetups
+%
+% \startbuffer[temp]
+% <body>
+% <p style='ctx-before: one; text-decoration: underline overline; ctx-after: two;'>foo 1</p>
+% <p>foo 2</p>
+% </body>
+% \stopbuffer
+%
+% \xmlregistersetup{html:settings}
+% \xmlprocessbuffer{main}{temp}{}
+
+% \xmlcssstylevalue % defined at lua end
+% \xmlcssmappedstylevalue % defined at lua end
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lxml-ctx.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lxml-ctx.mkxl
new file mode 100644
index 00000000000..f4b2edc798f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lxml-ctx.mkxl
@@ -0,0 +1,58 @@
+%D \module
+%D [ file=lxml-ctx,
+%D version=2007.08.17,
+%D title=\CONTEXT\ \XML\ Support,
+%D subtitle=Initialization,
+%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 Experimental. This might change! Also, it might become a module
+%D instead if core code.
+
+\writestatus{loading}{ConTeXt XML Support / Goodies}
+
+\registerctxluafile{lxml-ctx}{}
+
+\unprotect
+
+\settrue \xmllshowbuffer
+\setfalse\xmllshowtitle
+\settrue \xmllshowwarning
+
+\definehead
+ [lshowtitle]
+ [subsubsubsubsubject]
+
+\setuphead
+ [lshowtitle]
+ [\c!style=\tta]
+
+\permanent\protected\def\xmllshow#1%
+ {\ctxlua{xml.ctx.tshow {
+ pattern = \!!bs\detokenize{#1}\!!es,
+ \ifconditional\xmllshowtitle
+ title = "lshowtitle",
+ \fi
+ \ifconditional\xmllshowwarning
+ warning = true,
+ \fi
+ } }}
+
+\permanent\protected\def\xmllshowbuffer#1#2#3%
+ {\ctxlua{xml.ctx.tshow {
+ pattern = \!!bs\detokenize{#2}\!!es,
+ \ifconditional\xmllshowbuffer
+ xmlroot = "#1",
+ attribute = "#3",
+ \fi
+ \ifconditional\xmllshowwarning
+ warning = true,
+ \fi
+ } }}
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl
new file mode 100644
index 00000000000..01d0f883f96
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lxml-ini.mkxl
@@ -0,0 +1,448 @@
+%D \module
+%D [ file=lxml-ini,
+%D version=2007.08.17,
+%D title=\CONTEXT\ \XML\ Support,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Todo: auto apply setups (manage at lua end)
+%D Todo: manuak: \xmlinclusion \xmlinclusions
+
+\writestatus{loading}{ConTeXt XML Support / Initialization}
+
+%registerctxluafile{lxml-tab}{} % loader
+%registerctxluafile{lxml-lpt}{} % parser
+%registerctxluafile{lxml-xml}{} % xml finalizers
+%registerctxluafile{lxml-aux}{} % extras using parser
+%registerctxluafile{lxml-mis}{} % extras independent of parser
+\registerctxluafile{lxml-ent}{} % entity hacks
+\registerctxluafile{lxml-tex}{} % tex finalizers
+\registerctxluafile{lxml-dir}{} % ctx hacks
+\registerctxluafile{lxml-ini}{} % interface
+
+\unprotect
+
+% todo: { } mandate so that we can alias
+
+% undocumented:
+
+\permanent\def\ctxlxml#1{\ctxlua{lxml.#1}}
+
+% for now indirect .. this will change when we have updated luatex (scan_argument)
+
+\permanent\def\xmlconcat #1#2#3{\clf_xmlconcat {#1}{#2}{\detokenize{#3}}}
+\permanent\def\xmlconcatrange #1#2#3#4#5{\clf_xmlconcatrange{#1}{#2}{#3}{#4}{\detokenize{#5}}}
+
+%D Maybe I should add \type {\protected} here:
+
+\permanent\def\xmlloadfile #1#2{\clf_xmlloadfile {#1}{#2}{\directxmlparameter\c!compress}}
+\permanent\def\xmlloadbuffer#1#2{\clf_xmlloadbuffer{#1}{#2}{\directxmlparameter\c!compress}}
+\permanent\def\xmlloaddata #1#2{\clf_xmlloaddata {#1}{#2}{\directxmlparameter\c!compress}}
+
+\aliased\let\xmlload\xmlloadfile
+
+%D These are defined at the \LUA\ end:
+
+% \xmlall \xmlatt \xmlattdef \xmlattribute \xmlattributedef \xmlbadinclusions
+% \xmlchainatt \xmlchainattdef \xmlchecknamespace \xmlcommand \xmlcontext \xmlcount
+% \xmldelete \xmldirect \xmldirectives \xmldirectivesafter \xmldirectivesbefore
+% \xmldisplayverbatim \xmlelement \xmlfilter \xmlfilterlist \xmlfirst \xmlflush
+% \xmlflushcontext \xmlflushlinewise \xmlflushpure \xmlflushspacewise \xmlflushtext
+% \xmlfunction \xmlinclude \xmlincludeoptions \xmlinclusion \xmlinclusionbase
+% \xmlinclusions \xmlindex \xmlinlineverbatim \xmllast \xmllastatt \xmllastmatch
+% \xmllastpar \xmlloaddirectives \xmlmain \xmlmatch \xmlname \xmlnamespace
+% \xmlnonspace \xmlpar \xmlparam \xmlpath \xmlpopmatch \xmlpos \xmlpure
+% \xmlpushmatch \xmlraw \xmlrefatt \xmlregisterns \xmlremapname \xmlremapnamespace
+% \xmlsave \xmlsetatt \xmlsetattribute \xmlsetpar \xmlsetparam \xmlsetsetup
+% \xmlsnippet \xmlstrip \xmlstripanywhere \xmlstripnolines \xmlstripped
+% \xmlstrippednolines \xmltag \xmltext \xmltobuffer \xmltobuffertextonly
+% \xmltobufferverbose \xmltofile \xmltoparameters \xmlverbatim
+
+\aliased\let\xmlposition\xmlindex
+
+\permanent\protected\def\xmlinfo#1{\hbox{\ttxx[\xmlname{#1}]}}
+\permanent\protected\def\xmlshow#1{\startpacked\ttx\xmlverbatim{#1}\stoppacked}
+
+% the next one is handy for mode runs because it enforces a consistent
+% #1 indexing (needed when using \xmltext{main:123}{...} like calls
+
+%let\xmladdindex \clf_xmladdindex
+
+% we need to pass the last argument as function, so
+
+\permanent\protected\def\xmlsetfunction#1#2#3{\ctxcommand{xmlsetfunction("#1",\!!bs#2\!!es,#3)}}
+
+% goodie:
+
+\immutable\def\xmltempbuffername{xml-temp}
+
+\permanent\protected\def\prettyprintbuffer#1#2% only used here
+ {\ifdefined\scitebuffer
+ \scitebuffer[#2][#1]%
+ \else
+ \typebuffer[#1][\c!option=#2]%
+ \fi}
+
+\permanent\protected\def\xmlprettyprint#1#2%
+ {\xmltobufferverbose{#1}{.}{\xmltempbuffername}%
+ \prettyprintbuffer\xmltempbuffername{#2}}
+
+\permanent\protected\def\xmlprettyprinttext#1#2%
+ {\xmltobuffertextonly{#1}{.}{\xmltempbuffername}%
+ \prettyprintbuffer\xmltempbuffername{#2}}
+
+\permanent\protected\def\inlineprettyprintbuffer#1#2% only used here
+ {\ifdefined\sciteinlinebuffer
+ \sciteinlinebuffer[#2][#1]%
+ \else
+ \typeinlinebuffer[#1][\c!option=#2]%
+ \fi}
+
+\permanent\protected\def\xmlinlineprettyprint#1#2%
+ {\xmltobufferverbose{#1}{.}{\xmltempbuffername}%
+ \inlineprettyprintbuffer\xmltempbuffername{#2}}
+
+\permanent\protected\def\xmlinlineprettyprinttext#1#2%
+ {\xmltobuffertextonly{#1}{.}{\xmltempbuffername}%
+ \inlineprettyprintbuffer\xmltempbuffername{#2}}
+
+% kind of special:
+
+\aliased\let\xmlstartraw\clf_xmlstartraw
+\aliased\let\xmlstopraw \clf_xmlstopraw
+
+\aliased\let\startxmlraw\clf_xmlstartraw
+\aliased\let\stopxmlraw \clf_xmlstopraw
+
+% These are expandable and defined at the \LUA\ end:
+
+% \xmldoif \xmldoifnot \xmldoifelse \xmldoiftext \xmldoifnottext \xmldoifelsetext
+% \xmldoifatt \xmldoifnotatt \xmldoifelseatt \xmldoifempty \xmldoifnotempty
+% \xmldoifelseempty \xmldoifselfempty \xmldoifnotselfempty \xmldoifelseselfempty
+
+\aliased\let\xmldoiftextelse \xmldoifelsetext
+\aliased\let\xmldoifemptyelse \xmldoifelseempty
+\aliased\let\xmldoifselfemptyelse \xmldoifelseselfempty
+
+% \startxmlsetups xml:include
+% \xmlinclude{main}{include}{filename|href}
+% \stopxmlsetups
+%
+% \xmlprependsetup{xml:include}
+
+% \let\xmlgrab\xmlsetsetup % obsolete
+% \let\xmlself\s!unknown % obsolete
+
+\aliased\let\xmlsetup\setupwithargumentswapped
+\aliased\let\xmls \setupwithargumentswapped % hardly any faster
+\aliased\let\xmlw \setupwithargument % hardly any faster
+
+% todo: 1:xml:whatever always before 3:xml:something
+
+\permanent\protected\def\xmlprependsetup #1{\clf_xmlprependsetup{*}{#1}}
+\permanent\protected\def\xmlappendsetup #1{\clf_xmlappendsetup {*}{#1}}
+\permanent\protected\def\xmlbeforesetup #1#2{\clf_xmlbeforesetup {*}{#1}{#2}}
+\permanent\protected\def\xmlaftersetup #1#2{\clf_xmlaftersetup {*}{#1}{#2}}
+\permanent\protected\def\xmlremovesetup #1{\clf_xmlremovesetup {*}{#1}}
+\permanent\protected\def\xmlresetsetups {\clf_xmlresetsetups {*}}
+
+\permanent\protected\def\xmlprependdocumentsetup #1#2{\clf_xmlprependsetup{#1}{#2}}
+\permanent\protected\def\xmlappenddocumentsetup #1#2{\clf_xmlappendsetup {#1}{#2}}
+\permanent\protected\def\xmlbeforedocumentsetup #1#2#3{\clf_xmlbeforesetup {#1}{#2}{#3}}
+\permanent\protected\def\xmlafterdocumentsetup #1#2#3{\clf_xmlaftersetup {#1}{#2}{#3}}
+\permanent\protected\def\xmlremovedocumentsetup #1#2{\clf_xmlremovesetup {#1}{#2}}
+\permanent\protected\def\xmlresetdocumentsetups #1{\clf_xmlresetsetups {#1}}
+
+\permanent\protected\def\xmlflushsetups #1{\clf_xmlflushsetups {#1}{*}{}} % #1 == id where to apply *
+\permanent\protected\def\xmlflushdocumentsetups #1#2{\clf_xmlflushsetups {#1}{*}{#2}} % #1 == id where to apply * and #2
+
+\aliased\let\xmlregistersetup \xmlappendsetup
+\aliased\let\xmlregisterdocumentsetup\xmlappenddocumentsetup
+
+\mutable\def\xmldocument{main}
+
+\permanent\protected\def\xmlregisteredsetups
+ {\xmlstarttiming
+ \xmlflushsetups\xmldocument
+ \xmldefaulttotext\xmldocument % after include
+ \xmlstoptiming}
+
+\permanent\protected\def\xmlregistereddocumentsetups#1#2% id setups
+ {\xmlstarttiming
+ % todo: test for duplicates !
+ \xmlflushdocumentsetups{#1}{#2}%
+ \xmldefaulttotext{#1}% after include
+ \xmlstoptiming}
+
+\permanent\protected\def\xmlstarttiming{\clf_xmlstarttiming} % undocumented
+\permanent\protected\def\xmlstoptiming {\clf_xmlstoptiming} % undocumented
+
+\def\lxml_process#1#2#3#4#5% flag \loader id name what initializersetup
+ {\begingroup
+ \edef\xmldocument{#3}% #2 can be \xmldocument and set as such
+ %xmlpushdocument{#3}%
+ #2{#3}{#4}%
+ \setcatcodetable\notcatcodes
+ \doifelsenothing{#5}%
+ {\xmlsetup{#3}{xml:process}}%
+ {\xmlsetup{#3}{#5}}%
+ %xmlpopdocument
+ \endgroup}
+
+\permanent\protected\def\xmlprocessfile {\lxml_process\plusone \xmlload}
+\permanent\protected\def\xmlprocessdata {\lxml_process\zerocount\xmlloaddata}
+\permanent\protected\def\xmlprocessbuffer{\lxml_process\zerocount\xmlloadbuffer}
+\aliased \let\xmlprocess \xmlprocessfile
+
+\startxmlsetups xml:flush
+ \xmlflush{#1}
+\stopxmlsetups
+
+\startxmlsetups xml:process
+ \xmlregistereddocumentsetups{#1}{#1}
+ \xmlmain{#1}
+\stopxmlsetups
+
+\permanent\protected\def\xmlloadonly#1#2#3%
+ {\xmlload{#1}{#2}%
+ \xmlregistereddocumentsetups{#1}{#3}}
+
+% replaced by concat
+%
+% \protected\def\xmlconnect#1#2#3% inefficient
+% {\scratchcounter\xmlcount{#1}{#2}\relax
+% \ifcase\scratchcounter \or
+% \xmlall{#1}{#2}%
+% \else
+% \dorecurse \scratchcounter
+% {\ifnum\recurselevel>\plusone#3\fi
+% \xmlidx{#1}{#2}\recurselevel}%
+% \fi}
+
+\permanent\protected\def\xmlcdataobeyedline {\obeyedline}
+\permanent\protected\def\xmlcdataobeyedspace{\strut\obeyedspace}
+\permanent\protected\def\xmlcdatabefore {\begingroup\tt}
+\permanent\protected\def\xmlcdataafter {\endgroup}
+
+% verbatim (dodo:pre/post whitespace, maybe splot verbatim and
+% cdata commands), experimental:
+%
+% \xmlsetfunction{main}{verbatim}{lxml.displayverbatim}
+% \xmlsetfunction{main}{verb} {lxml.inlineverbatim}
+
+% we use an xml: namespace so one has to define a suitable verbatim, say
+%
+% \definetyping[xml:verbatim][typing]
+%
+% this is experimental!
+
+\permanent\tolerant\protected\def\startxmldisplayverbatim[#1]%
+ {\startpacked
+ \edef\currenttyping{#1}%
+ \ifempty\currenttyping
+ \let\currenttyping\v!typing
+ \else % maybe test for existence
+ \edef\currenttyping{xml:\currenttyping}%
+ \fi
+ \enforced\protected\def\stopxmldisplayverbatim
+ {\endofverbatimlines
+ \stoppacked}%
+ \doinitializeverbatim
+ \beginofverbatimlines}
+
+\aliased\let\stopxmldisplayverbatim\relax
+
+\permanent\tolerant\protected\def\startxmlinlineverbatim[#1]%
+ {\begingroup
+ \edef\currenttype{#1}%
+ \ifempty\currenttype
+ \let\currenttype\v!type
+ \else % maybe test for existence
+ \edef\currenttype{xml:\currenttype}%
+ \fi
+ \enforced\let\stopxmlinlineverbatim\endgroup
+ \doinitializeverbatim}
+
+\aliased\let\stopxmlinlineverbatim\relax
+
+% processing instructions
+
+\permanent\protected\def\xmlinstalldirective#1#2%
+ {\clf_xmlinstalldirective{#1}{\csstring#2}}
+
+% an example:
+
+% <?context-tex-directive bgroup ?>
+
+\appendtoks
+ \xmlinstalldirective{tex}{xmltexcommand}%
+\to \everyjob
+
+\permanent\def\xmltexcommand#1{\begincsname#1\endcsname}
+
+% \def\xmlcontextdirective#1% kind class key value
+% {\executeifdefined{xml#1directive}\gobblethreearguments}
+
+% setting up xml:
+%
+% \setupxml[\c!default=] % mkiv only == text
+% \setupxml[\c!default=\v!none] % mkiv only, undefined -> hidden
+% \setupxml[\c!default=\v!text] % mkiv only, undefined -> text
+
+% \def\xmlctxdirective#1#2#3{\doif{#1}{clue}{\doif{#2}{page}}{\page[#3]}}
+
+\newconstant\xmlprocessingmode % 0=unset, 1=text, 2=hidden
+
+\installcorenamespace{xml}
+\installcorenamespace{xmldefaults}
+\installcorenamespace{xmlmapvalue}
+
+\installdirectcommandhandler \??xml {xml}
+
+\letvalue{\??xmldefaults\v!normal}\zerocount
+\letvalue{\??xmldefaults\v!none }\zerocount
+\letvalue{\??xmldefaults\v!text }\plusone
+\letvalue{\??xmldefaults\v!hidden}\plustwo
+
+\permanent\protected\def\xmldefaulttotext
+ {\ifcase\xmlprocessingmode
+ \expandafter\gobbleoneargument % 0 (none)
+ \or
+ \expandafter\clf_xmlsetcommandtotext % 1 (normal)
+ \or
+ \expandafter\clf_xmlsetcommandtonone % 2 (hidden)
+ \else
+ \expandafter\gobbleoneargument % (none)
+ \fi}
+
+\appendtoks
+ \xmlprocessingmode\executeifdefined{\??xmldefaults\directxmlparameter\c!default}\plusone
+\to \everysetupxml
+
+\setupxml
+ [\c!default=, % flush all
+ \c!compress=\v!no, % strip comment
+ \c!entities=\v!no] % load big entity file
+
+\appendtoks
+ \doif{\directxmlparameter\c!entities}\v!yes\clf_xmlloadentities
+\to \everysetupxml
+
+\permanent\def\xmlmapvalue #1#2#3{\setvalue{\??xmlmapvalue#1:#2}{#3}} % keep #3 to grab spaces
+\permanent\def\xmldoifelsevalue #1#2{\ifcsname\??xmlmapvalue#1:#2\endcsname\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
+
+\permanent\def\xmlvalue#1#2% #3
+ {\ifcsname\??xmlmapvalue#1:#2\endcsname
+ \expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\permanent\def\xmlmappedvalue#1#2#3%
+ {\ifcsname\??xmlmapvalue#1:#2\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??xmlmapvalue#1:#3\expandafter\endcsname
+ \fi}
+
+\aliased\let\xmldoifvalueelse\xmldoifelsevalue
+
+\aliased\let\xmlmapval\xmlmapvalue
+\aliased\let\xmlval \xmlvalue
+
+%D Experimental:
+
+\permanent\def\xmlgetindex #1{\clf_xmlgetindex {\xmldocument}{#1}}
+\permanent\def\xmlwithindex #1#2{\clf_xmlwithindex{\xmldocument}{#1}{#2}}
+\permanent\def\xmlreference #1#2{\string\xmlwithindex{#1}{#2}}
+
+%D Entities:
+%D
+%D \starttyping
+%D \xmlsetentity{tex}{\TEX{}} % {} needed
+%D \stoptyping
+
+\permanent\protected\def\xmlsetentity#1#2{\clf_xmlsetentity{#1}{\detokenize{#2}}}
+\permanent\protected\def\xmltexentity#1#2{\clf_xmltexentity{#1}{\detokenize{#2}}}
+
+%D The following might change (or even disappear) so we keep it undocumented.
+
+\setnewconstant\xmlautoentities\plusone % 0=off, 1=upper, 2=upper,lower
+
+\permanent\protected\def\xmle
+ {\ifcase\xmlautoentities
+ \expandafter\lxml_e_none
+ \or
+ \expandafter\lxml_e_upper
+ \or
+ \expandafter\lxml_e_upperlower
+ \else
+ \expandafter\lxml_e_none
+ \fi}
+
+\def\lxml_e_none#1#2% safe
+ {#1}
+
+\def\lxml_e_upper#1#2% can be abbreviation
+ {\ifcsname#2\endcsname
+ \csname#2\expandafter\endcsname
+ \else
+ #1%
+ \fi}
+
+\def\lxml_e_upperlower#1#2% can be anything, so unsafe
+ {\ifcsname#2\endcsname
+ \csname#2\expandafter\endcsname
+ \orelse\ifcsname#1\endcsname
+ \csname#1\expandafter\endcsname
+ \else
+ #1%
+ \fi}
+
+%D We keep these around as there are also MP, LUA and TEX variants but they are not
+%D the same as in \MKII.
+
+\permanent\tolerant\protected\def\processXMLbuffer[#1]{\xmlprocessbuffer{temp}{#1}{}}
+\permanent \protected\def\processXMLfile #1{\xmlprocessfile {temp}{#1}{}}
+\permanent \protected\def\XMLdata #1{\xmlprocessdata {temp}{#1}{}}
+
+\aliased\let\processxmlbuffer\processXMLbuffer
+\aliased\let\processxmlfile \processXMLfile
+\aliased\let\xmldata \XMLdata
+
+\permanent\protected\def\xmlsetinjectors [#1]{\clf_xmlsetinjectors{#1}}
+\permanent\protected\def\xmlresetinjectors {\clf_xmlresetinjectors{}}
+
+% \def\xmlinjector#1{\executeifdefined{#1}\donothing}
+
+\permanent\def\xmlinjector#1{\fastsetup{xml:directive:injector:#1}}
+
+\startsetups xml:directive:injector:page
+ \page
+\stopsetups
+
+\startsetups xml:directive:injector:column
+ \column
+\stopsetups
+
+\startsetups xml:directive:injector:blank
+ \blank
+\stopsetups
+
+\startsetups xml:directive:injector:noline
+ \vskip-\lineheight
+\stopsetups
+
+\aliased\let\xmlapplyselectors\clf_xmlapplyselectors
+
+% In the\MKIV\ file there is some commented code wrt handing entities with active
+% characters ... very old and obsolete.
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/lxml-sor.mkxl b/Master/texmf-dist/tex/context/base/mkxl/lxml-sor.mkxl
new file mode 100644
index 00000000000..798047e0423
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/lxml-sor.mkxl
@@ -0,0 +1,99 @@
+%D \module
+%D [ file=lxml-sor,
+%D version=2009.08.24,
+%D title=\CONTEXT\ \XML\ Support,
+%D subtitle=Sorting,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D THIS IS VERY EXPERIMENTAL!
+
+\writestatus{loading}{ConTeXt XML Support / Sorting}
+
+\registerctxluafile{lxml-sor}{}
+
+\unprotect
+
+%D The flusher is unexpandable so that it can be used in tables (noalign
+%D interferences).
+
+% todo: public implementors
+
+\permanent\protected\def\xmlresetsorter #1{\ctxlxml{sorters.reset("#1")}}
+\permanent\protected\def\xmladdsortentry#1#2#3{\ctxlxml{sorters.add("#1","#2",\!!bs#3\!!es)}}
+\permanent\protected\def\xmlshowsorter #1{\ctxlxml{sorters.show("#1")}}
+\permanent \def\xmlflushsorter #1#2{\ctxlxml{sorters.flush("#1","#2")}}
+\permanent\protected\def\xmlsortentries #1{\ctxlxml{sorters.sort("#1")}}
+
+\protect \endinput
+
+\startbuffer[test]
+<demo>
+ <entry>
+ <category>one</category>
+ <key>alpha</key>
+ <content>alpha indeed</content>
+ </entry>
+ <entry>
+ <category>one</category>
+ <key>gamma</key>
+ <content>gamma indeed</content>
+ </entry>
+ <entry>
+ <category>one</category>
+ <key>beta</key>
+ <content>beta indeed</content>
+ </entry>
+ <entry>
+ <category>two</category>
+ <key>alpha</key>
+ <content>alpha again</content>
+ </entry>
+ <entry>
+ <category>two</category>
+ <key>gamma</key>
+ <content>gamma again</content>
+ </entry>
+ <entry>
+ <category>two</category>
+ <key>beta</key>
+ <content>beta again</content>
+ </entry>
+</demo>
+\stopbuffer
+
+\startxmlsetups xml:mysetups
+ \xmlsetsetup{\xmldocument}{demo|entry|content}{xml:*}
+\stopxmlsetups
+
+\xmlregistersetup{xml:mysetups}
+
+\startxmlsetups xml:demo
+ \xmlresetsorter{demo}
+ \xmlfilter{#1}{entry/command(xml:entry:getkeys)}
+ \blank sortkeys: \blank\xmlshowsorter{demo}\blank
+ \xmlsortentries{demo}
+ \xmlflushsorter{demo}{xml:entry:flush}
+\stopxmlsetups
+
+\startxmlsetups xml:entry:getkeys
+ \xmladdsortentry{demo}{#1}{\xmltext{#1}{category}}
+ \xmladdsortentry{demo}{#1}{\xmltext{#1}{key|entry}}
+\stopxmlsetups
+
+\startxmlsetups xml:entry:flush
+ \xmltext{#1}{content}\par
+\stopxmlsetups
+
+\startxmlsetups xml:entry
+ \xmltext{#1}{content}\par
+\stopxmlsetups
+
+\starttext
+ \xmlprocessbuffer{main}{test}{}
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/m-mkivmkxl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/m-mkivmkxl.mkxl
new file mode 100644
index 00000000000..9aea14eb21f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/m-mkivmkxl.mkxl
@@ -0,0 +1,3 @@
+% mkiv spacing before figure
+
+% \let\checkprevdepth\baselinecorrection
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx b/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx
new file mode 100644
index 00000000000..9d86566302b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-acc.mklx
@@ -0,0 +1,153 @@
+%D \module
+%D [ file=math-acc,
+%D version=2013.07.31,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Accents,
+%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 Math Macros / Accents}
+
+% There are probably errors ... too distracted by amazing (piano) music videos running
+% on top of scite ... so: experimental code.
+
+\unprotect
+
+% This module permits overloading of accents so that we can do fancy things. The
+% implementation is similar to stackers. By default accenst are defined in a simple
+% way. Contrary to extensibles accents cannot grow indefinitely. Alas the
+% implementation of accents is different too, in the sense that they are
+% prepositioned i.e. are already raised. (In my opinion for no real reason as they
+% need to adapt anyway).
+%
+% $ \ruledhbox{$H$} \hat{H} \ruledhbox{$\widehat{H}$} \widehat{H} $
+%
+% One alternative is:
+%
+% \definemathoverextensible [top] [hoed] ["FE302]
+% \definemathoverextensible [top] [slang] ["FE303]
+%
+% $ \hoed{H} \ruledhbox{$\hoed{H}$} \ruledhbox{$\hoed{\tf H}$} \slang{H} $
+%
+% But that nills the italic correction (and I'm in nood to mess with that again).
+%
+% \definemathaccents [myaccents] [color=darkred]
+% \definemathtopaccent [myaccents] [mywidehat] ["0302]
+%
+% $ \hat{H} \widehat{H} \mywidehat{H} $
+
+%D Older implementations are kept in the \MKII\ and \MKIV\ modules for educational
+%D purposes.
+
+\installcorenamespace{mathaccents}
+
+\installcommandhandler \??mathaccents {mathaccents} \??mathaccents
+
+\setupmathaccents
+ [\c!top=,
+ \c!bottom=,
+ \c!mathstyle=,
+ \c!color=,
+ \c!define=\v!yes] % not used
+
+\definemathaccents
+ [\v!both]
+
+\definemathaccents
+ [\v!top]
+ [\v!both]
+
+\definemathaccents
+ [\v!bottom]
+ [\v!both]
+
+\permanent\tolerant\protected\def\definemathtopaccent[#1]#*[#2]#*[#3]% class name top
+ {\ifparameter#3\or
+ \frozen\instance\setuevalue{#2}{\math_accents_make_double {#1}\plusone{\number#3}\zerocount}%
+ \else
+ \frozen\instance\setuevalue{#1}{\math_accents_make_double\noexpand\currentmathaccents\plusone{\number#2}\zerocount}%
+ \fi}
+
+\permanent\tolerant\protected\def\definemathbottomaccent[#1]#*[#2]#*[#3]% class name bottom
+ {\ifparameter#3\or
+ \frozen\instance\setuevalue{#2}{\math_accents_make_double {#1}\plustwo\zerocount{\number#3}}%
+ \else
+ \frozen\instance\setuevalue{#1}{\math_accents_make_double\noexpand\currentmathaccents\plustwo\zerocount{\number#2}}%
+ \fi}
+
+\permanent\tolerant\protected\def\definemathdoubleaccent[#1]#*[#2]#*[#3]#*[#4]% class name top bottom
+ {\ifparameter#4\or
+ \frozen\instance\setuevalue{#2}{\math_accents_make_double {#1}\plusthree{\number#3}{\number#4}}%
+ \else
+ \frozen\instance\setuevalue{#1}{\math_accents_make_double\noexpand\currentmathaccents\plusthree{\number#2}{\number#3}}%
+ \fi}
+
+\let\math_accents_color_pop\donothing
+
+\def\math_accents_color_push_yes
+ {\pushcolor[\p_math_accent_color]%
+ \let\math_accents_color_pop\popcolor}
+
+\def\math_accents_color_push_nop
+ {\let\math_accents_color_pop\donothing}
+
+\protected\def\math_accents_make_double#class#kind#top#bottom#content%
+ {\begingroup
+ \edef\currentmathaccents {#class}%
+ \edef\p_math_accent_color{\mathaccentsparameter\c!color}%
+ \startusemathstyleparameter\mathaccentsparameter
+ \ifempty\p_math_accent_color
+ \math_accents_color_push_nop
+ \else
+ \math_accents_color_push_yes
+ \fi
+ \ifcase#kind\or
+ \Umathaccent \fam\zerocount#top
+ \or
+ \Umathaccent bottom \fam\zerocount#bottom
+ \or
+ \Umathaccent both \fam\zerocount#top
+ \fam\zerocount#bottom
+ \fi
+ {\math_accents_color_pop#content}%
+ \stopusemathstyleparameter
+ \endgroup}
+
+%D Relative new:
+
+\newconditional\c_math_accents_auto_dotless \settrue\c_math_accents_auto_dotless % cf opentype math
+
+\aliased\let\normalgrave\grave \permanent\protected\def\dotlessgrave#1{\normalgrave{\mathdotless#1}}
+\aliased\let\normalddot \ddot \permanent\protected\def\dotlessddot #1{\normalddot {\mathdotless#1}}
+\aliased\let\normalbar \bar \permanent\protected\def\dotlessbar #1{\normalbar {\mathdotless#1}}
+\aliased\let\normalacute\acute \permanent\protected\def\dotlessacute#1{\normalacute{\mathdotless#1}}
+\aliased\let\normalhat \hat \permanent\protected\def\dotlesshat #1{\normalhat {\mathdotless#1}}
+\aliased\let\normalcheck\check \permanent\protected\def\dotlesscheck#1{\normalcheck{\mathdotless#1}}
+\aliased\let\normalbreve\breve \permanent\protected\def\dotlessbreve#1{\normalbreve{\mathdotless#1}}
+\aliased\let\normaldot \dot \permanent\protected\def\dotlessdot #1{\normaldot {\mathdotless#1}}
+\aliased\let\normalring \ring \permanent\protected\def\dotlessring #1{\normalring {\mathdotless#1}}
+\aliased\let\normaltilde\tilde \permanent\protected\def\dotlesstilde#1{\normaltilde{\mathdotless#1}}
+\aliased\let\normaldddot\dddot \permanent\protected\def\dotlessdddot#1{\normaldddot{\mathdotless#1}}
+
+\def\math_accents_auto_dotless#1#2{\ifconditional\c_math_accents_auto_dotless\expandafter#2\else\expandafter#1\fi}
+
+\permanent\protected\def\grave {\math_accents_auto_dotless\normalgrave \dotlessgrave }
+\permanent\protected\def\ddot {\math_accents_auto_dotless\normalddot \dotlessddot }
+\permanent\protected\def\bar {\math_accents_auto_dotless\normalbar \dotlessbar }
+\permanent\protected\def\acute {\math_accents_auto_dotless\normalacute \dotlessacute }
+\permanent\protected\def\hat {\math_accents_auto_dotless\normalhat \dotlesshat }
+\permanent\protected\def\check {\math_accents_auto_dotless\normalcheck \dotlesscheck }
+\permanent\protected\def\breve {\math_accents_auto_dotless\normalbreve \dotlessbreve }
+\permanent\protected\def\dot {\math_accents_auto_dotless\normaldot \dotlessdot }
+\permanent\protected\def\ring {\math_accents_auto_dotless\normalring \dotlessring }
+\permanent\protected\def\tilde {\math_accents_auto_dotless\normaltilde \dotlesstilde }
+\permanent\protected\def\dddot {\math_accents_auto_dotless\normaldddot \dotlessdddot }
+
+\aliased\let\mathring\ring % for a while
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-act.lmt b/Master/texmf-dist/tex/context/base/mkxl/math-act.lmt
new file mode 100644
index 00000000000..9da79976484
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-act.lmt
@@ -0,0 +1,478 @@
+if not modules then modules = { } end modules ['math-act'] = {
+ version = 1.001,
+ comment = "companion to math-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Here we tweak some font properties (if needed). The commented sections
+-- have been removed (no longer viable) but can be found in the .lua variant.
+
+local type, next = type, next
+local fastcopy, insert, remove = table.fastcopy, table.insert, table.remove
+local formatters = string.formatters
+
+local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end)
+local trace_collecting = false trackers.register("math.collecting", function(v) trace_collecting = v end)
+
+local report_math = logs.reporter("mathematics","initializing")
+
+local context = context
+local commands = commands
+local mathematics = mathematics
+local texsetdimen = tex.setdimen
+local abs = math.abs
+
+local helpers = fonts.helpers
+local upcommand = helpers.commands.up
+local rightcommand = helpers.commands.right
+local charcommand = helpers.commands.char
+local prependcommands = helpers.prependcommands
+
+local sequencers = utilities.sequencers
+local appendgroup = sequencers.appendgroup
+local appendaction = sequencers.appendaction
+
+local fontchars = fonts.hashes.characters
+local fontproperties = fonts.hashes.properties
+
+local mathfontparameteractions = sequencers.new {
+ name = "mathparameters",
+ arguments = "target,original",
+}
+
+appendgroup("mathparameters","before") -- user
+appendgroup("mathparameters","system") -- private
+appendgroup("mathparameters","after" ) -- user
+
+function fonts.constructors.assignmathparameters(original,target)
+ local runner = mathfontparameteractions.runner
+ if runner then
+ runner(original,target)
+ end
+end
+
+function mathematics.initializeparameters(target,original)
+ local mathparameters = original.mathparameters
+ if mathparameters and next(mathparameters) then
+ mathparameters = mathematics.dimensions(mathparameters)
+ if not mathparameters.SpaceBeforeScript then
+ mathparameters.SpaceBeforeScript = mathparameters.SpaceAfterScript
+ end
+ target.mathparameters = mathparameters
+ end
+end
+
+sequencers.appendaction("mathparameters","system","mathematics.initializeparameters")
+
+local how = {
+ -- RadicalKernBeforeDegree = "horizontal",
+ -- RadicalKernAfterDegree = "horizontal",
+ ScriptPercentScaleDown = "unscaled",
+ ScriptScriptPercentScaleDown = "unscaled",
+ RadicalDegreeBottomRaisePercent = "unscaled",
+ NoLimitSupFactor = "unscaled",
+ NoLimitSubFactor = "unscaled",
+}
+
+function mathematics.scaleparameters(target,original)
+ if not target.properties.math_is_scaled then
+ local mathparameters = target.mathparameters
+ if mathparameters and next(mathparameters) then
+ local parameters = target.parameters
+ local factor = parameters.factor
+ local hfactor = parameters.hfactor
+ local vfactor = parameters.vfactor
+ for name, value in next, mathparameters do
+ local h = how[name]
+ if h == "unscaled" then
+ -- kept
+ elseif h == "horizontal" then
+ value = value * hfactor
+ elseif h == "vertical"then
+ value = value * vfactor
+ else
+ value = value * factor
+ end
+ mathparameters[name] = value
+ end
+ end
+ target.properties.math_is_scaled = true
+ end
+end
+
+-- AccentBaseHeight vs FlattenedAccentBaseHeight
+
+function mathematics.checkaccentbaseheight(target,original)
+ local mathparameters = target.mathparameters
+ if mathparameters and mathparameters.AccentBaseHeight == 0 then
+ mathparameters.AccentBaseHeight = target.parameters.x_height -- needs checking
+ end
+end
+
+function mathematics.checkprivateparameters(target,original)
+ local mathparameters = target.mathparameters
+ if mathparameters then
+ local parameters = target.parameters
+ local properties = target.properties
+ if parameters then
+ local size = parameters.size
+ if size then
+ if not mathparameters.FractionDelimiterSize then
+ mathparameters.FractionDelimiterSize = 1.01 * size
+ end
+ if not mathparameters.FractionDelimiterDisplayStyleSize then
+ mathparameters.FractionDelimiterDisplayStyleSize = 2.40 * size
+ end
+ elseif properties then
+ report_math("invalid parameters in font %a",properties.fullname or "?")
+ else
+ report_math("invalid parameters in font")
+ end
+ elseif properties then
+ report_math("no parameters in font %a",properties.fullname or "?")
+ else
+ report_math("no parameters and properties in font")
+ end
+ end
+end
+
+function mathematics.overloadparameters(target,original)
+ local mathparameters = target.mathparameters
+ if mathparameters and next(mathparameters) then
+ local goodies = target.goodies
+ if goodies then
+ for i=1,#goodies do
+ local goodie = goodies[i]
+ local mathematics = goodie.mathematics
+ local parameters = mathematics and mathematics.parameters
+ if parameters then
+ if trace_defining then
+ report_math("overloading math parameters in %a @ %p",target.properties.fullname,target.parameters.size)
+ end
+ for name, value in next, parameters do
+ local tvalue = type(value)
+ if tvalue == "string" then
+ report_math("comment for math parameter %a: %s",name,value)
+ else
+ local oldvalue = mathparameters[name]
+ local newvalue = oldvalue
+ if oldvalue then
+ if tvalue == "number" then
+ newvalue = value
+ elseif tvalue == "function" then
+ newvalue = value(oldvalue,target,original)
+ elseif not tvalue then
+ newvalue = nil
+ end
+ if trace_defining and oldvalue ~= newvalue then
+ report_math("overloading math parameter %a: %S => %S",name,oldvalue,newvalue)
+ end
+ else
+ report_math("invalid math parameter %a",name)
+ end
+ mathparameters[name] = newvalue
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+local function applytweaks(when,target,original)
+ local goodies = original.goodies
+ if goodies then
+ for i=1,#goodies do
+ local goodie = goodies[i]
+ local mathematics = goodie.mathematics
+ local tweaks = mathematics and mathematics.tweaks
+ if type(tweaks) == "table" then
+ tweaks = tweaks[when]
+ if type(tweaks) == "table" then
+ if trace_defining then
+ report_math("tweaking math of %a @ %p (%s)",target.properties.fullname,target.parameters.size,when)
+ end
+ for i=1,#tweaks do
+ local tweak= tweaks[i]
+ local tvalue = type(tweak)
+ if tvalue == "function" then
+ tweak(target,original)
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+function mathematics.tweakbeforecopyingfont(target,original)
+ local mathparameters = target.mathparameters -- why not hasmath
+ if mathparameters then
+ applytweaks("beforecopying",target,original)
+ end
+end
+
+function mathematics.tweakaftercopyingfont(target,original)
+ local mathparameters = target.mathparameters -- why not hasmath
+ if mathparameters then
+ applytweaks("aftercopying",target,original)
+ end
+end
+
+sequencers.appendaction("mathparameters","system","mathematics.scaleparameters")
+sequencers.appendaction("mathparameters","system","mathematics.checkaccentbaseheight") -- should go in lfg instead
+sequencers.appendaction("mathparameters","system","mathematics.checkprivateparameters") -- after scaling !
+sequencers.appendaction("mathparameters","system","mathematics.overloadparameters")
+
+sequencers.appendaction("beforecopyingcharacters","system","mathematics.tweakbeforecopyingfont")
+sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweakaftercopyingfont")
+
+-- no, it's a feature now (see good-mth):
+--
+-- sequencers.appendaction("aftercopyingcharacters", "system","mathematics.overloaddimensions")
+
+-- a couple of predefined tweaks:
+
+local tweaks = { }
+mathematics.tweaks = tweaks
+
+-- helpers
+
+local setmetatableindex = table.setmetatableindex
+
+local getfontoffamily = tex.getfontoffamily
+
+local fontcharacters = fonts.hashes.characters
+local extensibles = utilities.storage.allocate()
+fonts.hashes.extensibles = extensibles
+
+local chardata = characters.data
+local extensibles = mathematics.extensibles
+
+-- we use numbers at the tex end (otherwise we could stick to chars)
+
+local e_left = extensibles.left
+local e_right = extensibles.right
+local e_horizontal = extensibles.horizontal
+local e_mixed = extensibles.mixed
+local e_unknown = extensibles.unknown
+
+local unknown = { e_unknown, false, false }
+
+local function extensiblecode(font,unicode)
+ local characters = fontcharacters[font]
+ local character = characters[unicode]
+ if not character then
+ return unknown
+ end
+ local first = character.next
+ local code = unicode
+ local next = first
+ while next do
+ code = next
+ character = characters[next]
+ next = character.next
+ end
+ local char = chardata[unicode]
+ if not char then
+ return unknown
+ end
+ if character.horiz_variants then
+ if character.vert_variants then
+ return { e_mixed, code, character }
+ else
+ local m = char.mathextensible
+ local e = m and extensibles[m]
+ return e and { e, code, character } or unknown
+ end
+ elseif character.vert_variants then
+ local m = char.mathextensible
+ local e = m and extensibles[m]
+ return e and { e, code, character } or unknown
+ elseif first then
+ -- assume accent (they seldom stretch .. sizes)
+ local m = char.mathextensible or char.mathstretch
+ local e = m and extensibles[m]
+ return e and { e, code, character } or unknown
+ else
+ return unknown
+ end
+end
+
+setmetatableindex(extensibles,function(extensibles,font)
+ local codes = { }
+ setmetatableindex(codes, function(codes,unicode)
+ local status = extensiblecode(font,unicode)
+ codes[unicode] = status
+ return status
+ end)
+ extensibles[font] = codes
+ return codes
+end)
+
+local function extensiblecode(family,unicode)
+ return extensibles[getfontoffamily(family or 0)][unicode][1]
+end
+
+-- left : [head] ...
+-- right : ... [head]
+-- horizontal : [head] ... [head]
+--
+-- abs(right["start"] - right["end"]) | right.advance | characters[right.glyph].width
+
+local function horizontalcode(family,unicode)
+ local font = getfontoffamily(family or 0)
+ local data = extensibles[font][unicode]
+ local kind = data[1]
+ local loffset = 0
+ local roffset = 0
+ if kind == e_left then
+ local charlist = data[3].horiz_variants
+ if charlist then
+ local left = charlist[1]
+ loffset = abs((left["start"] or 0) - (left["end"] or 0))
+ end
+ elseif kind == e_right then
+ local charlist = data[3].horiz_variants
+ if charlist then
+ local right = charlist[#charlist]
+ roffset = abs((right["start"] or 0) - (right["end"] or 0))
+ end
+ elseif kind == e_horizontal then
+ local charlist = data[3].horiz_variants
+ if charlist then
+ local left = charlist[1]
+ local right = charlist[#charlist]
+ loffset = abs((left ["start"] or 0) - (left ["end"] or 0))
+ roffset = abs((right["start"] or 0) - (right["end"] or 0))
+ end
+ end
+ return kind, loffset, roffset
+end
+
+mathematics.extensiblecode = extensiblecode
+mathematics.horizontalcode = horizontalcode
+
+interfaces.implement {
+ name = "extensiblecode",
+ arguments = { "integer", "integer" },
+ actions = { extensiblecode, context }
+}
+
+interfaces.implement {
+ name = "horizontalcode",
+ arguments = { "integer", "integer" },
+ actions = function(family,unicode)
+ local kind, loffset, roffset = horizontalcode(family,unicode)
+ texsetdimen("scratchleftoffset", loffset)
+ texsetdimen("scratchrightoffset",roffset)
+ context(kind)
+ end
+}
+
+
+local stack = { }
+
+function mathematics.registerfallbackid(n,id,name)
+ if trace_collecting then
+ report_math("resolved fallback font %i, name %a, id %a, used %a",
+ n,name,id,fontproperties[id].fontname)
+ end
+ stack[#stack][n] = id
+end
+
+interfaces.implement { -- will be shared with text
+ name = "registerfontfallbackid",
+ arguments = { "integer", "integer", "string" },
+ actions = mathematics.registerfallbackid,
+}
+
+function mathematics.resolvefallbacks(target,specification,fallbacks)
+ local definitions = fonts.collections.definitions[fallbacks]
+ if definitions then
+ local size = specification.size -- target.size
+ local list = { }
+ insert(stack,list)
+ context.pushcatcodes("prt") -- context.unprotect()
+ for i=1,#definitions do
+ local definition = definitions[i]
+ local name = definition.font
+ local features = definition.features or ""
+ local size = size * (definition.rscale or 1)
+ context.font_fallbacks_register_math(i,name,features,size)
+ if trace_collecting then
+ report_math("registering fallback font %i, name %a, size %a, features %a",i,name,size,features)
+ end
+ end
+ context.popcatcodes()
+ end
+end
+
+function mathematics.finishfallbacks(target,specification,fallbacks)
+ local list = remove(stack)
+ if list and #list > 0 then
+ local definitions = fonts.collections.definitions[fallbacks]
+ if definitions and #definitions > 0 then
+ if trace_collecting then
+ report_math("adding fallback characters to font %a",specification.hash)
+ end
+ local definedfont = fonts.definers.internal
+ local copiedglyph = fonts.handlers.vf.math.copy_glyph
+ local fonts = target.fonts
+ local size = specification.size -- target.size
+ local characters = target.characters
+ if not fonts then
+ fonts = { }
+ target.fonts = fonts
+ end
+ if #fonts == 0 then
+ fonts[1] = { id = 0, size = size } -- self, will be resolved later
+ end
+ local done = { }
+ for i=1,#definitions do
+ local definition = definitions[i]
+ local name = definition.font
+ local start = definition.start
+ local stop = definition.stop
+ local gaps = definition.gaps
+ local check = definition.check
+ local force = definition.force
+ local rscale = definition.rscale or 1
+ local offset = definition.offset or start
+ local id = list[i]
+ if id then
+ local index = #fonts + 1
+ fonts[index] = { id = id, size = size }
+ local chars = fontchars[id]
+ local function remap(unic,unicode,gap)
+ if check and not chars[unicode] then
+ return
+ end
+ if force or (not done[unic] and not characters[unic]) then
+ if trace_collecting then
+ report_math("replacing math character %C by %C using vector %a and font id %a for %a%s%s",
+ unic,unicode,fallbacks,id,fontproperties[id].fontname,check and ", checked",gap and ", gap plugged")
+ end
+ characters[unic] = copiedglyph(target,characters,chars,unicode,index)
+ done[unic] = true
+ end
+ end
+ local step = offset - start
+ for unicode = start, stop do
+ remap(unicode + step,unicode,false)
+ end
+ if gaps then
+ for unic, unicode in next, gaps do
+ remap(unic,unicode,true)
+ remap(unicode,unicode,true)
+ end
+ end
+ end
+ end
+ elseif trace_collecting then
+ report_math("no fallback characters added to font %a",specification.hash)
+ end
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl
new file mode 100644
index 00000000000..2007ed83ccf
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl
@@ -0,0 +1,1964 @@
+%D \module
+%D [ file=math-ali,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Math Alignments,
+%D author={Hans Hagen, Taco Hoekwater \& Aditya Mahajan},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Math Macros / Math Alignments}
+
+\unprotect
+
+%D The code here has been moved from other files. Beware: the \MKII\ and \MKIV\ code
+%D is not gathered in files with the same name. In the meantime this code has been
+%D adapted to \MKIV\ but more is possible. The code is somewhat complicated by the
+%D fact that alignments are tricky with rspect to tagging.
+
+% export:
+%
+% alignment : ok
+% cases :
+% matrix : ok
+% substack :
+
+%D \macros
+%D {definemathalignment, setupmathalignment, startmathalignment}
+%D
+%D Modules may provide additional alignment features. The following kind of plain
+%D mechanisms are provided by the core.
+
+\newtoks\t_math_align_a
+\newtoks\t_math_align_b
+\newtoks\t_math_align_c
+
+\newskip\d_math_eqalign_distance
+\newskip\d_math_eqalign_rulethickness
+
+\protected\def\math_eqalign_distance
+ {\relax
+ \ifdim\d_math_eqalign_distance>\zeropoint
+ % \hskip\d_math_eqalign_distance
+ \tabskip\d_math_eqalign_distance
+ \fi
+ \mathalignmentparameter\c!separator
+ \relax}
+
+\mutable\def\displayopenupvalue{.25\bodyfontsize}
+
+\def\math_build_eqalign
+ {\scratchtoks\emptytoks
+ \d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
+ \scratchcounterone\mathalignmentparameter\c!m
+ \scratchcountertwo\mathalignmentparameter\c!n
+ \etoksapp\scratchtoks{\the\t_math_align_a}%
+ \scratchcounter\plusone
+ \dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
+ {\ifnum\scratchcounter=\scratchcountertwo
+ \scratchcounter\plusone
+ \etoksapp\scratchtoks{\math_eqalign_distance}%
+ \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
+ \else
+ \advance\scratchcounter\plusone
+ \fi
+ \etoksapp\scratchtoks{\the\t_math_align_b}}%
+ \etoksapp\scratchtoks{\the\t_math_align_c}}
+
+\def\math_math_in_eqalign#1%
+ {\startforceddisplaymath
+ \tabskip\zeropoint
+ \everycr\emptytoks
+ {{}#1{}}%
+ \stopforceddisplaymath}
+
+\def\math_text_in_eqalign#1%
+ {\startimath
+ \tabskip\zeropoint
+ \everycr\emptytoks
+ #1%
+ \stopimath}
+
+\permanent\protected\def\eqalign#1% why no halign here, probably because of displaywidth
+ {\emptyhbox % why no \dontleavehmode
+ \mskip\thinmuskip
+ \vcenter
+ {\math_openup\displayopenupvalue % was: \openup\jot
+ \mathsurround\zeropoint
+ \ialign{%
+ \strut
+ \hfil
+ \startforceddisplaymath{\alignmark\alignmark}\stopforceddisplaymath
+ \aligntab
+ \startforceddisplaymath{{}\alignmark\alignmark{}}\stopforceddisplaymath
+ \hfil\crcr
+ #1\crcr}%
+ }%
+ \mskip\thinmuskip}
+
+% preamble is scanned for tabskips so we need the span to prevent an error message
+
+\setnewconstant\eqalignmode\plusone
+
+% use zeroskipplusfill
+
+\def\math_prepare_r_eqalign_no
+ {\t_math_align_a
+ {\strut
+ \tabskip\zeropoint
+ \alignmark\alignmark % for picking up the number
+ \aligntab
+ \math_first_in_eqalign
+ \hfil
+ \math_left_of_eqalign
+ \span
+ \math_math_in_eqalign{\alignmark\alignmark}%
+ \math_right_of_eqalign
+ \tabskip\zeropoint}%
+ \t_math_align_b
+ {\aligntab
+ \math_next_in_eqalign
+ \math_left_of_eqalign
+ \span
+ \math_math_in_eqalign{\alignmark\alignmark}%
+ \math_right_of_eqalign
+ \tabskip\zeropoint}%
+ \ifnum\mathraggedstatus=\plusone
+ \t_math_align_c
+ {\hfil
+ \aligntab
+ \span
+ \math_text_in_eqalign{\alignmark\alignmark}%
+ \tabskip\zeropoint}%
+ \orelse\ifnum\mathraggedstatus=\plusthree
+ \t_math_align_c
+ {\hfil
+ \tabskip\zeropoint\s!plus 1\s!fill
+ \aligntab
+ \span
+ \math_text_in_eqalign{\alignmark\alignmark}%
+ \tabskip\zeropoint}%
+ \else
+ \t_math_align_c
+ {\hfil
+ \tabskip\centering
+ \aligntab
+ \span
+ \llap{\math_text_in_eqalign{\alignmark\alignmark}}%
+ \tabskip\zeropoint}%
+ \fi
+ \math_build_eqalign
+ \the\mathdisplayaligntweaks
+ \tabskip\centering}
+
+\def\math_prepare_l_eqalign_no % \checkeddisplaymath
+ {\t_math_align_a
+ {\strut
+ \tabskip\zeropoint
+ \alignmark\alignmark % for picking up the number
+ \aligntab
+ \math_first_in_eqalign
+ \hfil
+ \math_left_of_eqalign
+ \span
+ \math_math_in_eqalign{\alignmark\alignmark}%
+ \math_right_of_eqalign
+ \tabskip\zeropoint}%
+ \t_math_align_b
+ {\aligntab
+ \math_next_in_eqalign
+ \math_left_of_eqalign
+ \span
+ \math_math_in_eqalign{\alignmark\alignmark}%
+ \math_right_of_eqalign
+ \tabskip\zeropoint}%
+ \ifnum\mathraggedstatus=\plusone
+ \t_math_align_c
+ {\hfil
+ \aligntab
+ \kern-\displaywidth
+ \span
+ \rlap{\math_text_in_eqalign{\alignmark\alignmark}}%
+ \tabskip\displaywidth}%
+ \orelse\ifnum\mathraggedstatus=\plusthree
+ \t_math_align_c
+ {\hfil
+ \tabskip\zeropoint\s!plus 1\s!fill
+ \aligntab
+ \kern-\displaywidth
+ \span
+ \math_rlap{\math_text_in_eqalign{\alignmark\alignmark}}%
+ \tabskip\displaywidth}%
+ \else
+ \t_math_align_c
+ {\hfil
+ \tabskip\centering
+ \aligntab
+ \kern-\displaywidth
+ \span
+ \rlap{\math_text_in_eqalign{\alignmark\alignmark}}%
+ \tabskip\displaywidth}%
+ \fi
+ \math_build_eqalign
+ \the\mathdisplayaligntweaks
+ \tabskip\centering}
+
+\def\math_halign_checked
+ {\halign \ifcase\eqalignmode \or to \checkeddisplaywidth \fi}
+
+\def\math_both_eqalign_no_normal#1#2%
+ {\ifmmode
+ \the\mathdisplayaligntweaks
+ \vcenter\bgroup
+ \enforced\let\math_finish_eqalign_no\egroup
+ \else
+ \enforced\let\math_finish_eqalign_no\relax
+ \fi
+ #1%
+ \math_halign_checked\expandafter\bgroup\the\scratchtoks\crcr#2\crcr\egroup
+ \math_finish_eqalign_no}
+
+\installcorenamespace {mathalignlocation}
+
+\defcsname\??mathalignlocation\v!top \endcsname{\let\math_alignment_halign_method\halign\tpack}
+\defcsname\??mathalignlocation\v!bottom\endcsname{\let\math_alignment_halign_method\halign\vpack}
+\defcsname\??mathalignlocation\v!center\endcsname{\let\math_alignment_halign_method\halign\vcenter}
+
+\let\math_alignment_halign_method\relax
+
+\def\math_both_eqalign_no_aligned#1%
+ {\let\math_alignment_halign_method\math_halign_checked
+ \ifmmode
+ \the\mathdisplayaligntweaks
+ \global\mathnumberstatus\plusone
+ \ifcase\mathraggedstatus
+ \def\math_finish_eqalign_no{\crcr\egroup}%
+ \else % we're in a mathbox
+ \ifcsname\??mathalignlocation\mathalignmentparameter\c!location\endcsname
+ \lastnamedcs % top|bottom|center as suggested by HM
+ \else
+ \vcenter
+ \fi
+ \bgroup
+ \def\math_finish_eqalign_no{\crcr\egroup\egroup}%
+ \fi
+ \fi
+ #1%
+ \math_alignment_halign_method\expandafter\bgroup\the\scratchtoks\crcr}
+
+\def\math_rlap#1%
+ {\setbox\scratchbox\hbox{#1}%
+ \ifdim\wd\scratchbox>\d_math_number_correction
+ \global\d_math_number_correction\wd\scratchbox
+ \fi
+ \box\scratchbox
+ \global\mathnumberstatus\plustwo}
+
+\def\math_handle_eqalign_no_r_normal {\math_both_eqalign_no_normal \math_prepare_r_eqalign_no}
+\def\math_handle_eqalign_no_l_normal {\math_both_eqalign_no_normal \math_prepare_l_eqalign_no}
+\def\math_handle_eqalign_no_r_aligned{\math_both_eqalign_no_aligned\math_prepare_r_eqalign_no}
+\def\math_handle_eqalign_no_l_aligned{\math_both_eqalign_no_aligned\math_prepare_l_eqalign_no}
+\def\math_finish_eqalign_no {\crcr\egroup}
+
+\aliased\let\reqalignno\relax % just in case someone used that
+\aliased\let\leqalignno\relax % just in case someone used that
+\aliased\let\eqalignno \relax % just in case someone used that
+
+%D Here we implement the user interface part. We start with basic math alignments:
+
+\newcount \c_math_eqalign_column
+\newconditional\c_math_eqalign_first
+
+\newtoks \everymathalignment
+\newtoks \everymathalignmentdone
+
+\permanent\tolerant\protected\def\math_alignment_NN[#1]#*[#2]%
+ {\aligntab
+ \strc_formulas_place_number_nested{#1}{#2}}
+
+\permanent\tolerant\protected\def\math_alignment_NR[#1]#*[#2]%
+ {\aligntab
+ \dostoptagged % finish cell
+ \strc_formulas_place_number_nested{#1}{#2}%
+ \math_number_right_of_eqalign
+ \global\settrue\c_math_eqalign_first
+ \crcr
+ \noalign{\dostoptagged}} % finish row
+
+\permanent\protected\def\math_alignment_NC
+ {\relax
+ \ifconditional\c_math_eqalign_first
+ \ifx\p_math_alignment_number\v!auto
+ \strc_formulas_place_number_nested{+}{}%
+ \fi
+ \global\setfalse\c_math_eqalign_first
+ \fi
+ \math_number_left_of_eqalign
+ \aligntab}
+
+\permanent\protected\def\math_alignment_EQ
+ {\NC=}
+
+\noaligned\tolerant\protected\def\math_common_TB[#1]%
+ {\noalign{\blank[#1]}}
+
+\installmacrostack\NC % maybe more to shared table definitions
+\installmacrostack\NN % maybe more to shared table definitions
+\installmacrostack\EQ % maybe more to shared table definitions
+\installmacrostack\NR % maybe more to shared table definitions
+\installmacrostack\BC % maybe more to shared table definitions
+\installmacrostack\EC % maybe more to shared table definitions
+\installmacrostack\TB % maybe more to shared table definitions
+
+\appendtoks
+ \push_macro_NC
+ \push_macro_NN
+ \push_macro_EQ
+ \push_macro_NR
+ \push_macro_TB
+ \enforced\let\NC\math_alignment_NC
+ \enforced\let\NN\math_alignment_NN
+ \enforced\let\EQ\math_alignment_EQ
+ \enforced\let\NR\math_alignment_NR
+ \enforced\let\TB\math_common_TB
+ \global\settrue\c_math_eqalign_first
+\to \everymathalignment
+
+\appendtoks
+ \pop_macro_TB
+ \pop_macro_NR
+ \pop_macro_EQ
+ \pop_macro_NN
+ \pop_macro_NC
+\to \everymathalignmentdone
+
+\let\math_alignment_snap_start\relax
+\let\math_alignment_snap_stop \relax
+
+% % experimental:
+%
+% \def\math_alignment_snap_start
+% {\ifgridsnapping
+% \edef\p_math_alignment_grid{\mathalignmentparameter\c!grid}%
+% \ifx\p_math_alignment_grid\v!no\else
+% \snaptogrid[\p_math_alignment_grid]\vbox\bgroup
+% \fi
+% \fi}
+%
+% \def\math_alignment_snap_stop
+% {\ifgridsnapping
+% \ifx\p_math_alignment_grid\v!no\else
+% \egroup
+% \fi
+% \fi}
+%
+% % doesn't work well, so:
+
+\let\math_alignment_snap_start\relax
+\let\math_alignment_snap_stop \relax
+
+% end of experimental
+
+\newconditional\c_math_alignment_auto_number
+
+% \begingroup not permitted ($$...assignments...\halign... ).. check in luametatex
+
+\permanent\tolerant\protected\def\math_alignment_start[#1]#*[#2]%
+ {\edef\currentmathalignment{#1}%
+ \ifarguments\or\or
+ \setupmathalignment[#1][#2]% bad! ungrouped
+ \fi
+ \math_alignment_snap_start
+ \the\everymathalignment
+ \c_math_eqalign_column\zerocount
+ \edef\p_math_alignment_number{\mathalignmentparameter\c!number}%
+ \processcommacommand
+ [\mathalignmentparameter\c!align]%
+ {\advance\c_math_eqalign_column\plusone\math_eqalign_set_column}% takes argument
+ \global\c_math_eqalign_column\plusone
+ \dostarttagged\t!math\empty
+ \dostarttagged\t!mtable\currentmathalignment
+ \numberedeqalign}
+
+\def\math_alignment_stop % can be protected
+ {\math_finish_eqalign_no
+ \dostoptagged
+ \dostoptagged
+ \the\everymathalignmentdone
+ \math_alignment_snap_stop}
+
+\installcorenamespace{mathalignment}
+\installcorenamespace{mathalignmentvariant}
+
+\installcommandhandler \??mathalignment {mathalignment} \??mathalignment
+
+\appendtoks
+ \frozen\instance\setuevalue{\e!start\currentmathalignment}{\math_alignment_start[\currentmathalignment]}%
+ \frozen\instance\setvalue {\e!stop \currentmathalignment}{\math_alignment_stop}%
+\to \everydefinemathalignment
+
+\setupmathalignment
+ [\c!n=2,
+ \c!m=1,
+ \c!distance=\emwidth,
+ \c!grid=\v!math]
+
+\definemathalignment[align] % default case (this is what amstex users expect)
+\definemathalignment[\v!mathalignment] % prefered case (this is cleaner, less clashing)
+
+% special case.. in case one mistypes ..
+
+\ifdefined \startalignment
+
+ \pushoverloadmode
+
+ \aliased\let\align_math_normal_start\startalign
+ \aliased\let\align_math_normal_stop \stopalign
+
+ \aliased\let\align_text_normal_start\startalignment
+ \aliased\let\align_text_normal_stop \stopalignment
+
+ \permanent\overloaded\protected\def\startalign
+ {\ifmmode
+ \enforced\let\stopalign\align_math_normal_stop % cannot be a protected def ... lookahead in align
+ \expandafter\align_math_normal_start
+ \orelse\ifinformula
+ \enforced\let\stopalign\align_math_normal_stop
+ \expandafter\align_math_normal_start
+ \else
+ \enforced\let\stopalign\align_text_normal_stop
+ \expandafter\align_text_normal_start
+ \fi}
+
+ \aliased\let\stopalign\relax
+
+ \permanent\overloaded\protected\def\startalignment
+ {\ifmmode
+ \enforced\let\stopalignment\align_math_normal_stop % cannot be a protected def ... lookahead in align
+ \expandafter\align_math_normal_start
+ \orelse\ifinformula
+ \enforced\let\stopalignment\align_math_normal_stop % cannot be a protected def ... lookahead in align
+ \expandafter\align_math_normal_start
+ \else
+ \enforced\let\stopalignment\align_text_normal_stop
+ \expandafter\align_text_normal_start
+ \fi}
+
+ \aliased\let\stopalignment\relax
+
+ \pushoverloadmode
+
+\fi
+
+%
+
+\permanent\protected\def\numberedeqalign
+ {\doifelse{\formulaparameter\c!location}\v!left
+ \math_handle_eqalign_no_l_aligned
+ \math_handle_eqalign_no_r_aligned}
+
+\def\math_first_in_eqalign
+ {\global\c_math_eqalign_column\plusone
+ \dostarttagged\t!mtablerow \empty
+ \dostarttagged\t!mtablecell\empty}
+
+\def\math_next_in_eqalign
+ {\global\advance\c_math_eqalign_column\plusone
+ \dostoptagged % finish cell
+ \dostarttagged\t!mtablecell\empty}
+
+\def\math_left_of_eqalign
+ {\ifcsname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname
+ \ifcase\lastnamedcs \or \relax \or \hfill \or \hfill \fi
+ \fi}
+
+\def\math_right_of_eqalign
+ {\ifcsname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname
+ \ifcase\lastnamedcs \or \hfill \or \relax \or \hfill \fi
+ \fi}
+
+\newconditional\c_math_alignment_local_number % not used but when true puts in front (todo)
+
+\def\math_number_right_of_eqalign
+ {\ifcase\wd\b_strc_formulas_number\else
+ \ifconditional\c_math_alignment_local_number
+ \ifcase\c_strc_math_number_location\or\or
+ \box\b_strc_formulas_number
+ \fi
+ \else
+ \box\b_strc_formulas_number
+ \fi
+ \fi}
+
+\def\math_number_left_of_eqalign
+ {\ifcase\wd\b_strc_formulas_number\else
+ \ifconditional\c_math_alignment_local_number
+ \ifcase\c_strc_math_number_location\or
+ \box\b_strc_formulas_number
+ \fi
+ \fi
+ \fi}
+
+\def\math_eqalign_set_column#1% we could just add to the preamble (as with other alignments)
+ {\expandafter\chardef\csname\??mathalignmentvariant\number\c_math_eqalign_column\expandafter\expandafter\expandafter\endcsname
+ \ifcsname\??mathalignmentvariant#1\endcsname\lastnamedcs\else\zerocount\fi\relax}
+
+\letvalue{\??mathalignmentvariant\v!normal}\zerocount
+\letvalue{\??mathalignmentvariant\v!left }\plusone
+\letvalue{\??mathalignmentvariant\v!right }\plustwo
+\letvalue{\??mathalignmentvariant\v!middle}\plusthree
+
+\permanent\protected\def\math_align_NR_generic[#1][#2]%
+ {\strc_formulas_place_number_nested{#1}{#2}\crcr}
+
+%D \starttyping
+%D \placeformula[eqn0]\startformula \startalign[n=1] a\NR \stopalign \stopformula See \in[eqn0]
+%D \placeformula[eqn1]\startformula \startalign[n=1] a\NR \stopalign \stopformula See \in[eqn1]
+%D \placeformula \startformula \startalign[n=1] a\NR[eqn2] \stopalign \stopformula See \in[eqn2]
+%D \placeformula[eqn3]\startformula \startalign[n=1] a\NR[+] \stopalign \stopformula See \in[eqn3]
+%D \stoptyping
+
+%D \startbuffer
+%D \placeformula \startformula \eqalignno {
+%D a &= b & \formulanumber \cr
+%D c &= d \cr
+%D &= e \cr
+%D &= f & \formulanumber
+%D } \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula \startalign
+%D \NC a \EQ b \NR[+]
+%D \NC c \EQ d \NR
+%D \NC \EQ f \NR[for:demo-a-1]
+%D \NC \EQ g \NR[for:demo-a-2][a]
+%D \NC \EQ h \NR[for:demo-a-3][b]
+%D \NC \EQ i \NR
+%D \stopalign \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula \startalign
+%D \NC a \EQ b \NR[+]
+%D \NC c \EQ d \NR
+%D \NC \EQ f \NR
+%D \NC \EQ g \NR
+%D \NC \EQ h \NR
+%D \NC \EQ i \NR[+]
+%D \stopalign \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula \startalign
+%D \NC a \NC \eq b \NR[+]
+%D \NC c \NC \neq d \NR
+%D \NC \NC \neq f \NR[for:demo-b-1]
+%D \NC \NC \geq g \NR[for:demo-b-2][a]
+%D \NC \NC \leq h \NR[for:demo-b-3][b]
+%D \NC \NC \neq i \NR
+%D \stopalign \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula \startalign[n=3,align={left,middle,right}]
+%D \NC l \NC = \NC r \NR
+%D \NC left \NC = \NC right \NR
+%D \stopalign \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula \startalign[n=3,align={right,middle,left}]
+%D \NC l \NC = \NC r \NR
+%D \NC left \NC = \NC right \NR
+%D \stopalign \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula \startalign[n=3,align={middle,middle,middle}]
+%D \NC l \NC = \NC r \NR
+%D \NC left \NC = \NC right \NR
+%D \stopalign \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula
+%D \startformula
+%D \startalign[n=3,align={middle,middle,middle}]
+%D \NC a \NC = \NC b \NR[+]
+%D \NC 2a \NC = \NC 2b \NR
+%D \stopalign
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula
+%D \startformulas
+%D \setupmathalignment[n=3,align={middle,middle,middle}]%
+%D \startformula
+%D \startalign
+%D \NC a \NC = \NC b \NR[+]
+%D \NC 2a \NC = \NC 2b \NR
+%D \stopalign
+%D \stopformula
+%D \startformula
+%D \startalign
+%D \NC a \NC = \NC b \NR[+]
+%D \NC 2a \NC = \NC 2b \NR
+%D \stopalign
+%D \stopformula
+%D \stopformulas
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula
+%D \startformulas
+%D \dorecurse{5}{\startformula
+%D \startalign[n=3,align={middle,middle,middle}]
+%D \NC a \NC = \NC b \NR[+]
+%D \NC 2a \NC = \NC 2b \NR
+%D \stopalign
+%D \stopformula}
+%D \stopformulas
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+%D \macros
+%D {definemathcases, setupmathcases, startmathcases}
+%D
+%D Another wish \unknown
+
+\installcorenamespace{mathcases}
+
+\installcommandhandler \??mathcases {mathcases} \??mathcases
+
+\setupmathcases
+ [\c!distance=\emwidth,
+ \c!strut=\v!yes, % new
+ \c!numberdistance=2.5\emwidth,
+ \c!left={\left\{\mskip\thinmuskip},
+ \c!right={\right.}]
+
+\appendtoks
+ \frozen\instance\protected\edefcsname\e!start\currentmathcases\endcsname{\math_cases_start[\currentmathcases]}%
+ \frozen\instance \defcsname \e!stop \currentmathcases\endcsname{\math_cases_stop}%
+\to \everydefinemathcases
+
+\permanent\protected\def\math_cases_NC_zero
+ {\math_cases_NC}
+
+\permanent\protected\def\math_cases_MC_zero
+ {\math_cases_NC
+ \ifmmode\else
+ \startimath
+ \enforced\let\math_cases_end_math\stopimath
+ \fi}
+
+\let\math_cases_end_math\relax
+
+\permanent\protected\def\math_cases_NR_zero
+ {\unskip
+ \math_cases_end_math
+ \aligntab
+ \global\enforced\let\math_cases_NC\math_cases_NC_first
+ \dodirectdoubleempty\math_cases_NR}
+
+\permanent\protected\def\math_cases_NC_first
+ {\global\enforced\let\math_cases_NC\math_cases_NC_second}
+
+\permanent\protected\def\math_cases_NC_second
+ {\math_cases_end_math\aligntab}
+
+\let\math_cases_NR\math_align_NR_generic
+
+\installmacrostack\math_cases_NC
+
+\let\math_cases_strut\relax
+
+\permanent\tolerant\protected\def\math_cases_start[#1]#*[#2]%
+ {\begingroup
+ \edef\currentmathcases{#1}%
+ \ifarguments\or\or
+ \setupcurrentmathcases[#2]%
+ \fi
+ \edef\p_strut{\mathcasesparameter\c!strut}%
+ \ifx\p_strut\v!yes
+ \enforced\let\math_cases_strut\strut
+ \else
+ \enforced\let\math_cases_strut\relax
+ \fi
+ \mathcasesparameter\c!left
+ \vcenter\bgroup
+ \push_macro_math_cases_NC
+ % \enforced\let\endmath\relax
+ \enforced\let\NC\math_cases_NC_zero
+ \enforced\let\MC\math_cases_MC_zero
+ \enforced\let\NR\math_cases_NR_zero
+ \enforced\let\TB\math_common_TB
+ \global\enforced\let\math_cases_NC\math_cases_NC_first
+ \normalbaselines
+ \mathsurround\zeropoint
+ \everycr\emptytoks
+ \tabskip\zeropoint
+ \global\c_math_eqalign_column\plusone
+ \halign\bgroup
+ \startimath
+ \mathcasesparameter\c!style
+ \alignmark\alignmark
+ \stopimath
+ \hfil
+ \aligntab
+ \hskip\mathcasesparameter\c!distance\relax
+ \pop_macro_math_cases_NC
+ \math_cases_strut % looks better
+ \alignmark\alignmark
+ \hfil
+ \aligntab
+ \hskip\mathcasesparameter\c!numberdistance\relax
+ % \let\formuladistance\!!zeropoint
+ \span\math_text_in_eqalign{\alignmark\alignmark}%
+ \crcr} % todo: number
+
+% When we have just protected we get an extra row but we can no flag
+% this as a proper alignment related command which means that uit gets
+% expanded.
+
+\noaligned\permanent\protected\def\math_cases_stop
+ {\crcr
+ \egroup
+ \pop_macro_math_cases_NC
+ \egroup
+ \mathcasesparameter\c!right
+ \endgroup}
+
+\definemathcases[cases]
+\definemathcases[\v!mathcases]
+
+%D \startbuffer
+%D \placeformula \startformula \startcases
+%D \NC 2 \NC $ y > 0 $ \NR
+%D \NC 7 \NC $ x = 7 $ \NR[+]
+%D \NC 4 \NC otherwise \NR
+%D \stopcases \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula x \startcases
+%D \NC 2 \NC $ y > 0 $ \NR[+]
+%D \NC 7 \NC $ x = 7 $ \NR
+%D \NC 4 \NC otherwise \NR
+%D \stopcases \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula \startcases
+%D \NC 2 \NC $ y > 0 $ \NR
+%D \NC 7 \NC $ x = 7 $ \NR
+%D \NC 4 \NC otherwise \NR
+%D \stopcases \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \placeformula \startformula x \startcases
+%D \NC 2 \NC $ y > 0 $ \NR
+%D \NC 7 \NC $ x = 7 $ \NR
+%D \NC 4 \NC otherwise \NR
+%D \stopcases \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+%D \macros
+%D {definemathmatrix, setupmathmatrix, startmathmatrix}
+%D
+%D Yet another one \unknown. This time we implement the lot a bit
+%D different which is a side effect of getting the tagging right. In
+%D retrospect the main alignment could be done this way but \unknown
+
+\installcorenamespace{mathmatrix}
+
+\installcommandhandler \??mathmatrix {mathmatrix} \??mathmatrix
+
+\setupmathmatrix
+ [\c!distance=\emwidth,
+ \c!left=,
+ \c!right=,
+ \c!align=\v!middle,
+ \c!rulecolor=,
+ \c!rulethickness=\linewidth]
+
+\appendtoks
+ \frozen\instance\protected\edefcsname\e!start\currentmathmatrix\endcsname{\math_matrix_start[\currentmathmatrix]}%
+ % \noaligned\protected should work here:
+ \frozen\instance \defcsname \e!stop \currentmathmatrix\endcsname{\math_matrix_stop}% no u else lookahead problem
+\to \everydefinemathmatrix
+
+\def\math_matrix_start_table
+ {\global\c_math_eqalign_column\zerocount
+ \dostarttagged\t!math\empty
+ \dostarttagged\t!mtable\empty}
+
+\def\math_matrix_stop_table
+ {\dostoptagged
+ \dostoptagged}
+
+% \def\math_matrix_start_row
+% {\noalign{\global\c_math_eqalign_column\zerocount}%
+% \dostarttagged\t!mtablerow\empty}
+%
+% \def\math_matrix_stop_row
+% {\dostoptagged}
+
+\def\math_matrix_start_row
+ {\beginlocalcontrol
+ \global\c_math_eqalign_column\zerocount
+ \dostarttagged\t!mtablerow\empty
+ \endlocalcontrol}
+
+\def\math_matrix_stop_row
+ {\beginlocalcontrol
+ \dostoptagged
+ \endlocalcontrol}
+
+\protected\def\math_matrix_start_cell
+ {\dostarttagged\t!mtablecell\empty
+ \hss
+ \math_left_of_eqalign
+ \startimath
+ \math_matrix_set_style
+ \tabskip\zeropoint
+ \everycr\emptytoks}
+
+\protected\def\math_matrix_stop_cell
+ {\stopimath
+ \math_right_of_eqalign
+ \hss
+ \dostoptagged}
+
+% We could construct a preamble with alignment and such embedded but the number
+% of matrices with many rows is normally so low that it doesn't pay of at all.
+
+\protected\def\math_matrix_distance
+ {\relax
+ \ifdim\d_math_eqalign_distance>\zeropoint
+ \hskip\d_math_eqalign_distance
+ \fi
+ \relax}
+
+\def\math_matrix_preamble
+ {\math_matrix_strut
+ \global\advance\c_math_eqalign_column\plusone
+ \math_matrix_start_cell
+ \alignmark\alignmark
+ \math_matrix_stop_cell
+ \aligntab
+ \aligntab
+ \math_matrix_distance
+ \global\advance\c_math_eqalign_column\plusone
+ \math_matrix_start_cell
+ \alignmark\alignmark
+ \math_matrix_stop_cell}
+
+\newconditional\c_math_matrix_first
+
+\permanent\protected\def\math_matrix_NR
+ {\aligntab\omit
+ \math_matrix_stop_row
+ \math_matrix_pickup
+ \crcr
+ \math_matrix_start_row}
+
+\permanent\protected\def\math_matrix_NC
+ {\ifconditional\c_math_matrix_first
+ \expandafter\math_matrix_NC_yes
+ \else
+ \expandafter\math_matrix_NC_nop
+ \fi}
+
+\permanent\protected\def\math_matrix_pickup{\global\settrue \c_math_matrix_first}
+\permanent\protected\def\math_matrix_NC_yes{\global\setfalse\c_math_matrix_first}
+\permanent\protected\def\math_matrix_NC_nop{\aligntab} % avoids lookahead
+
+% \def\math_matrix_stop_wrapup
+% {\crcr
+% \strut
+% \crcr
+% \noalign{\vskip-\struthtdp}}
+
+\def\math_matrix_check_rule_step#1%
+ {\doifelsenumber{#1}
+ {\scratchdimen#1\d_math_eqalign_rulethickness}
+ {\edef\p_rulecolor{#1}}}
+
+\def\math_matrix_check_rule[#1]%
+ {\d_math_eqalign_rulethickness\mathmatrixparameter\c!rulethickness\relax
+ \scratchdimen\d_math_eqalign_rulethickness
+ \edef\p_rulecolor{\mathmatrixparameter\c!rulecolor}%
+ \iftok{#1}\emptytoks\else
+ \rawprocesscommalist[#1]\math_matrix_check_rule_step
+ \fi
+ \ifempty\p_rulecolor\else
+ \dousecolorparameter\p_rulecolor
+ \fi}
+
+\noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*%
+ {\noalign\bgroup
+ \math_matrix_check_rule[#1]%
+ \divide\scratchdimen\plustwo
+ \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+ \egroup}
+
+\permanent\tolerant\protected\def\math_matrix_VL[#1]#*%
+ {\NC
+ \math_matrix_check_rule[#1]%
+ \divide\d_math_eqalign_distance\plustwo
+ \hskip-\d_math_eqalign_distance
+ \autorule\s!width\scratchdimen\relax
+ \hskip-\d_math_eqalign_distance
+ \NC}
+
+\newtoks\everymathmatrix
+
+\appendtoks
+ \enforced\let\NR\math_matrix_NR
+ \enforced\let\NC\math_matrix_NC
+ \enforced\let\MC\math_matrix_NC
+ \enforced\let\HL\math_matrix_HL
+ \enforced\let\VL\math_matrix_VL
+ \enforced\let\TB\math_common_TB
+\to \everymathmatrix
+
+\def\math_matrix_start_processing
+ {\dontleavehmode
+ \bgroup
+ \tabskip\zeropoint
+ \math_matrix_pickup
+ \the\everymathmatrix
+ %
+ % \enforced\let\endmath\relax
+ %
+ \setbox\nextbox\vbox\bgroup
+ \math_matrix_start_table
+ \halign \bgroup
+ % preamble
+ \span\math_matrix_preamble
+ % done
+ \crcr
+ \math_matrix_start_row}
+
+\def\math_matrix_stop_processing
+ {%\math_matrix_stop_wrapup % optional
+ \math_matrix_stop_row
+ \egroup
+ \math_matrix_stop_table
+ \egroup
+ \mathmatrixleft
+ \math_matrix_finish_nextbox
+ \mathmatrixright
+ \egroup}
+
+\let\math_matrix_strut \strut
+\let\math_matrix_set_style\relax
+
+\def\math_matrix_check_settings
+ {\edef\p_strut{\mathmatrixparameter\c!strut}%
+ \ifx\p_strut\v!no
+ \enforced\let\math_matrix_strut\relax
+ \else
+ \enforced\let\math_matrix_strut\strut
+ \ifx\p_strut\v!yes\else
+ \spacing\p_strut
+ \fi
+ \fi
+ \d_math_eqalign_distance\mathmatrixparameter\c!distance\relax
+ % \d_math_eqalign_rulethickness\mathmatrixparameter\c!rulethickness\relax
+ % \edef\p_rulecolor{\mathmatrixparameter\c!rulecolor}
+ \edef\math_matrix_set_style{\mathmatrixparameter\c!style}}
+
+\def\math_matrix_set_defaults
+ {\normalbaselines % hm, spacing ?
+ \mathsurround\zeropoint
+ \tabskip\zeropoint}
+
+\def\math_matrix_set_columns_step
+ {\advance\c_math_eqalign_column\plusone
+ %\c_math_matrix_columns\c_math_eqalign_column
+ \math_eqalign_set_column}
+
+\def\math_matrix_set_columns
+ {\c_math_eqalign_column\zerocount
+ \rawprocesscommacommand[\mathmatrixparameter\c!align]\math_matrix_set_columns_step}
+
+\newcount\c_math_eqalign_column_saved
+
+% \installglobalmacrostack\c_math_matrix_first
+
+\tolerant\protected\def\math_matrix_start[#1]#*[#2]%
+ {\begingroup
+ \globalpushmacro\c_math_matrix_first % hm, does that work?
+ \c_math_eqalign_column_saved\c_math_eqalign_column
+ \globalpushmacro\c_math_eqalign_first
+ \edef\currentmathmatrix{#1}%
+ \setupcurrentmathmatrix[#2]%
+ \math_matrix_check_settings
+ \math_matrix_set_defaults
+ \math_matrix_set_columns
+ \math_matrix_start_processing}
+
+\def\math_matrix_stop
+ {\math_matrix_stop_processing
+ \globalpushmacro\c_math_eqalign_first
+ \global\c_math_eqalign_column\c_math_eqalign_column_saved
+ \globalpopmacro\c_math_matrix_first
+ \endgroup}
+
+% vcenter:
+%
+% delta = (height(v) + depth(v))/2
+% axis = math_axis_size(cur_size)
+% height(v) = delta + axis
+% depth(v) = delta - axis
+
+\installcorenamespace{mathmatrixalignlocation}
+
+\mutable\let\mathmatrixleft \empty % experimental hook
+\mutable\let\mathmatrixright\empty % experimental hook
+
+\setvalue{\??mathmatrixalignlocation\v!top }{\raise\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\mathstyle\relax}
+\setvalue{\??mathmatrixalignlocation\v!high }{\raise\dimexpr(\nextboxdp-\nextboxht)/2\relax}
+\setvalue{\??mathmatrixalignlocation\v!center}{\relax}
+\setvalue{\??mathmatrixalignlocation\v!lohi} {\relax}
+\setvalue{\??mathmatrixalignlocation\v!normal}{\relax}
+\setvalue{\??mathmatrixalignlocation\v!bottom}{\lower\dimexpr(\nextboxdp-\nextboxht)/2 +\mathaxisheight\mathstyle\relax}
+\setvalue{\??mathmatrixalignlocation\v!low }{\lower\dimexpr(\nextboxdp-\nextboxht)/2\relax}
+
+\def\math_matrix_finish_nextbox
+ {\begincsname\??mathmatrixalignlocation\mathmatrixparameter\c!location\endcsname\hbox\bgroup
+ \normalstartimath
+ \mathmatrixparameter\c!left
+ \vcenter{\box\nextbox}%
+ \mathmatrixparameter\c!right
+ \normalstopimath
+ \egroup}
+
+\definemathmatrix[matrix]
+\definemathmatrix[\v!mathmatrix]
+
+%D \startbuffer
+%D \placeformula \startformula[-] \startmatrix
+%D \NC 1 \NC x \NC a \NR
+%D \NC 2 \NC y \NC b \NR
+%D \NC 3 \NC z \NC c \NR
+%D \stopmatrix \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \definemathmatrix[bmatrix][left={\left[\mskip\thinmuskip},right={\mskip\thinmuskip\right]},strut=1.25]
+%D
+%D \startbuffer
+%D \placeformula \startformula[-] \startbmatrix
+%D \NC 1 \NC x \NC a \NR
+%D \NC 2 \NC y \NC b \NR
+%D \NC 3 \NC z \NC c \NR
+%D \stopbmatrix \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D Taco added some code (dedicated to Aditya Mahajan) that gives more
+%D control over aligments:
+
+%D \startbuffer
+%D \startformula
+%D \startmatrix
+%D \NC a + x \NC = \NC a + d \NR
+%D \NC y \NC = \NC d \NR
+%D \stopmatrix
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+%D \startbuffer
+%D \startformula
+%D \startmatrix [distance=3pt,align={right,left}]
+%D \NC a + x \NC = a + d \NR
+%D \NC y \NC = d \NR
+%D \stopmatrix
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+%D \startbuffer
+%D \startformula
+%D \startmatrix [left=\left(,right=\right)]
+%D \NC a + x \NR
+%D \NC y \NR
+%D \stopmatrix
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D A bit more complex code:
+%D
+%D \startbuffer
+%D \startformula
+%D \text{Let }{\cal R} = \bigcup_{P_{X_1},P_{X_2}}
+%D \left\{ (R_1, R_2) :
+%D \startmatrix[distance=1em,align={left,left,right}]
+%D \NC R_1 \NC < I(X_1 ; Y \mid X_2) \NC R_1 \NR
+%D \NC \hfill Q_2 \NC < I(X_2 ; Y \mid X_1) \NC R_2 \NR
+%D \NC R_1 + R_2 \NC < I(X_1 ; Y) \NC R_1 + R_2 \NR
+%D \stopmatrix
+%D \right\}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+%D \macros
+%D {startmatrices}
+%D
+%D Just a handy keystroke safer:
+
+\permanent\protected\def\startmatrices
+ {\begingroup
+ \setupmathmatrix}
+
+\permanent\protected\def\stopmatrices
+ {\endgroup}
+
+%D \startbuffer
+%D \startformula
+%D \startmatrix[left={\left(},right={\right)}]
+%D \NC A \NC B \NR \NC C \NC D \NR
+%D \stopmatrix
+%D =
+%D \startmatrix[left={\left(},right={\right)},location=low]
+%D \NC A \NC B \NR \NC C \NC D \NR
+%D \stopmatrix
+%D =
+%D \startmatrix[left={\left(},right={\right)},location=high]
+%D \NC A \NC B \NR \NC C \NC D \NR
+%D \stopmatrix
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \startformula
+%D \startmatrices[left={\left(},right={\right)}]
+%D \startmatrix
+%D \NC A \NC B \NR \NC C \NC D \NR
+%D \stopmatrix
+%D =
+%D \startmatrix[location=bottom]
+%D \NC A \NC B \NR \NC C \NC D \NR
+%D \stopmatrix
+%D =
+%D \startmatrix[location=top]
+%D \NC A \NC B \NR \NC C \NC D \NR
+%D \stopmatrix
+%D \stopmatrices
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer % does not run well: \getbuffer
+
+%D Handy for the \type {m-matrix} module:
+
+\permanent\tolerant\protected\def\startnamedmatrix[#1]#*[#2]%
+ {\begingroup
+ \edef\currentmathmatrix{#1}%
+ \setupcurrentmathmatrix[#2]%
+ \math_matrix_start[\currentmathmatrix]}
+
+\noaligned\permanent\protected\def\stopnamedmatrix
+ {\math_matrix_stop
+ \endgroup}
+
+%D The following code is derived from Aditya's simplematrix prototype but
+%D adapted to regular mathmatrices (which saves some code so it can go into
+%D the core):
+
+\def\math_matrix_simple_row#1%
+ {\rawprocesscommalist[#1]\math_matrix_simple_col
+ \toksapp\scratchtoks{\NR}}
+
+\def\math_matrix_simple_col#1%
+ {\toksapp\scratchtoks{\NC#1}}
+
+\permanent\tolerant\protected\def\math_matrix_simple[#1]#*[#2]#:#3%
+ {\begingroup
+ \edef\currentmathmatrix{#1}%
+ \setupcurrentmathmatrix[#2]%
+ \scratchtoks\emptytoks
+ \processlist[];\math_matrix_simple_row[#3]%
+ \math_matrix_start[\currentmathmatrix]%
+ \the\scratchtoks
+ \math_matrix_stop
+ \endgroup}
+
+%D We hook it into the normal mathmatrix code:
+
+\appendtoks
+ \edef\p_simplecommand{\mathmatrixparameter\c!simplecommand}%
+ \ifempty\p_simplecommand\else
+ \frozen\instance\setuevalue{\p_simplecommand}{\math_matrix_simple[\currentmathmatrix]}%
+ \fi
+\to \everydefinemathmatrix
+
+%D And predefine some matrices:
+
+\definemathmatrix[matrix:parentheses][\c!left={\left(\mskip\thinmuskip},\c!right={\mskip\thinmuskip\right)},\c!align=\v!middle]
+\definemathmatrix[matrix:brackets] [\c!left={\left[\mskip\thinmuskip},\c!right={\mskip\thinmuskip\right]},\c!align=\v!middle]
+\definemathmatrix[matrix:bars] [\c!left={\left|\mskip\thinmuskip},\c!right={\mskip\thinmuskip\right|},\c!align=\v!middle]
+
+\definemathmatrix[thematrix][matrix:parentheses][\c!simplecommand=thematrix]
+
+%D \startbuffer
+%D \startformula
+%D \thematrix{1,2,3,4;5,6,7,8;9,10,11,12}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D \startformula
+%D \startthematrix
+%D \NC 1\NC 2\NC 3\NC 4\NR
+%D \NC 5\NC 6\NC 7\NC 8\NR
+%D \NC 9\NC10\NC11\NC12\NR
+%D \stopthematrix
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+%D \macros
+%D {startintertext}
+%D
+%D Preliminary feature:
+%D
+%D {\em example code}
+%D
+%D The intertext commands have to be expandable (in aligment lookahead) so
+%D we cannot use \type {\protected}.
+
+\permanent\def\startintertext#1\stopintertext
+ {\noalign{\math_intertext{#1}}}
+
+\permanent\let\stopintertext\relax
+
+\permanent\def\intertext#1%
+ {\noalign{\math_intertext{#1}}}
+
+\protected\def\math_intertext#1%
+ {\penalty\postdisplaypenalty
+ \afterdisplayspace
+ \vbox{\forgetall\noindent#1\par}%
+ \penalty\predisplaypenalty
+ \beforedisplayspace}
+
+%D \macros
+%D {substack}
+%D
+%D Preliminary code:
+%D
+%D \startbuffer
+%D \startformula
+%D \sum_{%
+%D \startsubstack
+%D i = 1 \NR
+%D i \neq n \NR
+%D i \neq m
+%D \stopsubstack
+%D }a_i
+%D \stopformula
+%D \stopbuffer
+%D
+%D \getbuffer which was typed as \typebuffer
+%D
+%D Notice that these macros give the correct spacing for
+%D subscripts. Compare for example
+%D
+%D \startbuffer
+%D \startformula
+%D \sum_{\startsubstack a \NR b \NR \stopsubstack}
+%D \text{ and }
+%D \sum_{\scriptstyle a \atop \scriptstyle}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer which gives \getbuffer
+
+% no tagging yet : how is it supposed to be coded?
+
+\permanent\protected\def\startsubstack
+ {\begingroup
+ \vcenter\bgroup
+ \baselineskip\mathstacktotal
+ \lineskip\mathstackvgap
+ \lineskiplimit\lineskip
+ \mathsurround\zeropoint
+ \everycr\emptytoks
+ \enforced\let\NC\relax
+ \enforced\let\MC\relax
+ \enforced\let\NR\crcr
+ \halign\bgroup\hfil\normalstartimath\scriptstyle\alignmark\alignmark\normalstopimath\hfil\crcr}
+
+\noaligned\permanent\protected\def\stopsubstack
+ {\crcr
+ \egroup
+ \egroup
+ \endgroup}
+
+% %D \macros
+% %D {bordermatrix}
+% %D
+% %D In \PLAIN\ \TEX\ the width of a parenthesis is stored in
+% %D the \DIMENSION\ \type{\mathparentwd}. This value is derived from
+% %D the width of \type{\tenrm B}, so let's take care of it now:
+%
+% \ifdefined\mathparentwd \else \newdimen\mathparentwd \fi
+%
+% \let\normalbordermatrix\bordermatrix % move that code to here instead
+%
+% \protected\def\bordermatrix
+% {\begingroup
+% \setbox\scratchbox\hbox{\mr\char"239C}%
+% \global\mathparentwd\wd\scratchbox
+% \endgroup
+% \normalbordermatrix}
+%
+% \def\bordermatrix
+% {\begingroup
+% \mr
+% \global\mathparentwd\fontcharwd\font"239C\relax
+% \endgroup
+% \normalbordermatrix}
+
+%D \macros{overset, underset}
+%D
+%D The macros \type{\overset} and \type{\underset} are provided by
+%D \AMS\ packages in \LATEX. These macro allows you to place a symbol
+%D above or below another symbol, irrespective of whether the other
+%D symbol is a relation or something else, and without influencing the
+%D spacing. For most cases there is a better way to do such things
+%D (declaring a math command with limop option, or using accents), but
+%D occasionally these macros can be useful, for example:
+%D
+%D \startbuffer
+%D \startformula
+%D \overset{*}{X} \underset{*}{X}
+%D \stopformula
+%D \stopbuffer
+%D \typebuffer \getbuffer
+%D
+%D Use these macros sparingly. Remember, \TEX\ was designed for
+%D mathematics, so there is usually a proper method for typesetting
+%D common math notation.
+%D
+%D These macros are a cleaner version of \type {\binrel@} and
+%D \type {\binrel@@} macros in \AMSTEX\ packages.
+
+\def\math_binrel_apply#1%
+ {\begingroup
+ \setbox\scratchbox\hbox
+ {\thinmuskip 0mu
+ \medmuskip -1mu
+ \thickmuskip -1mu
+ \setbox\scratchbox\hbox{\normalstartimath#1\mathsurround\zeropoint\normalstopimath}%
+ \kern-\wd\scratchbox
+ \normalstartimath{}#1{}\mathsurround\zeropoint\normalstopimath}%
+ \ifdim\wd\scratchbox<\zeropoint
+ \endgroup
+ \expandafter\mathbin
+ \orelse\ifdim\wd\scratchbox>\zeropoint
+ \endgroup
+ \doubleexpandafter\mathrel
+ \else
+ \endgroup
+ \doubleexpandafter\firstofoneargument
+ \fi}
+
+\permanent\protected\def\overset#1#2%
+ {\math_binrel_apply{#2}{\mathop{\kern\zeropoint#2}\limits\normalsuperscript{#1}}}
+
+\permanent\protected\def\underset#1#2%
+ {\math_binrel_apply{#2}{\mathop{\kern\zeropoint#2}\limits\normalsubscript {#1}}}
+
+%D The following code comes from \type {math-str.mkiv}.
+%D
+%D Here we implement a basic math alignment mechanism. Numbers are also handled. The macros
+%D \type {\startinnermath} and \type {\stopinnermath} can be overloaded in specialized
+%D modules.
+
+\installcorenamespace{mathinnerstart}
+\installcorenamespace{mathinnerstop}
+
+% \protected\def\startinnermath{\csname\??mathinnerstart\formulaparameter\c!align\endcsname}
+% \protected\def\stopinnermath {\csname\??mathinnerstop \formulaparameter\c!align\endcsname}
+
+\permanent\protected\def\startinnermath{\expandnamespaceparameter\??mathinnerstart\formulaparameter\c!align\v!normal}
+\permanent\protected\def\stopinnermath {\expandnamespaceparameter\??mathinnerstop \formulaparameter\c!align\v!normal}
+
+\permanent\protected\def\mathinnerstrut
+ {\doif{\formulaparameter\c!strut}\v!yes\strut}
+
+\permanent\protected\def\defineinnermathhandler#1#2#3%
+ {\defcsname\??mathinnerstart#1\endcsname{#2}%
+ \defcsname\??mathinnerstop #1\endcsname{#3}}
+
+\installtextracker
+ {formulas.boxes}
+ {\enforced\let\math_hbox\ruledhbox}
+ {\enforced\let\math_hbox\hbox}
+
+\let\math_hbox\hbox
+
+\newconstant\mathraggedstatus % normal left center right
+\newconstant\mathnumberstatus % nothing normal shift_right
+
+\newdimen\d_math_number_correction
+
+\def\math_box_llapped_math_no
+ {\ifcase\mathraggedstatus\or
+ \box\b_strc_formulas_number
+ \or
+ \llap{\box\b_strc_formulas_number}%
+ \or
+ \llap{\box\b_strc_formulas_number}%
+ \fi}
+
+\def\math_box_rlapped_math_no
+ {\ifcase\mathraggedstatus\or
+ \rlap{\box\b_strc_formulas_number}%
+ \or
+ \rlap{\box\b_strc_formulas_number}%
+ \or
+ \box\b_strc_formulas_number
+ \fi}
+
+\newconditional\c_strc_math_has_number
+\newconditional\c_strc_math_display_overflow
+\newconstant \c_strc_math_number_location
+\newdimen \d_strc_math_number_width
+\newdimen \d_strc_math_display_width
+\newbox \b_strc_math_display
+\newconstant \c_strc_formulas_frame_mode
+\newdimen \d_strc_math_indent
+\newconditional\c_strc_math_indent
+
+\newdimen\d_strc_math_framed_width
+
+\setvalue{\??formulaoption\v!frame}%
+ {\edef\p_frame{\formulaparameter\c!frame}%
+ \ifx\p_frame\v!number
+ \c_strc_formulas_frame_mode\plustwo % inside frame
+ \else
+ \c_strc_formulas_frame_mode\plusone % outside frame
+ \fi}
+
+% mode: 0=no frame | 1=number inside frame | 2=number outside frame
+
+\def\strc_math_flush_aligned
+ {\ifcase\c_strc_math_vertical
+ \ifcase\mathraggedstatus\or\hfill\or\hfill\fi
+ \box\b_strc_math_display
+ \ifcase\mathraggedstatus\or\or\hfill\or\hfill\fi
+ \else
+ \ifconditional\c_strc_math_indent
+ \ifzeropt\d_strc_math_indent\else
+ \hangafter\plusone
+ \hangindent\d_strc_math_indent
+ \fi
+ \fi
+ \edef\p_interlinespace{\formulaparameter\c!interlinespace}%
+ \ifempty\p_interlinespace\else\baselineskip\p_interlinespace\fi
+ \global\d_strc_math_indent\zeropoint
+ \ifcase\mathraggedstatus\or\raggedleft\or\raggedcenter\or\raggedright\fi
+ \unhbox\b_strc_math_display
+ \fi}
+
+\def\strc_math_flush_box_normal
+ {\ifcase\c_strc_math_vertical
+ \hbox to \displaywidth\bgroup
+ \strc_math_flush_aligned
+ \egroup
+ \else
+ \strc_math_flush_aligned
+ \fi}
+
+\def\strc_math_flush_box_framed_common
+ {\d_strc_math_framed_width\displaywidth
+ \setformulaframedparameter\c!align{\formulaparameter\c!align}%
+ \letformulaframedparameter\c!strut\v!no
+ \d_framed_formula\ht\b_strc_math_display
+ \ifcase\mathraggedstatus\or\hfill\or\hfill \fi
+ \inheritedformulaframedframed{\box\b_strc_math_display}%
+ \ifcase\mathraggedstatus\or \or\hfill\or\hfill\fi}
+
+\def\strc_math_flush_box_framed_display
+ {\let\currentformulaframed\currentformula
+ \letformulaframedparameter\c!location\v!formula
+ \setformulaframedparameter\c!width{\d_strc_math_framed_width}%
+ \strc_math_flush_box_framed_common}
+
+\def\strc_math_flush_box_framed_fit_inline
+ {\let\currentformulaframed\currentformula
+ \letformulaframedparameter\c!location\empty
+ \letformulaframedparameter\c!width\v!fit
+ \strc_math_flush_box_framed_common}
+
+\def\strc_math_flush_box_framed_fit_display
+ {\let\currentformulaframed\currentformula
+ \letformulaframedparameter\c!location\v!formula
+ \letformulaframedparameter\c!width\v!fit
+ \strc_math_flush_box_framed_common}
+
+% combiners
+
+\def\strc_math_flush_box
+ {\ifcase\c_strc_formulas_frame_mode
+ \strc_math_flush_box_normal
+ \else
+ \strc_math_flush_box_framed_display
+ \fi}
+
+\def\strc_math_number_right_normal
+ {\strc_math_flush_aligned
+ \hss % hss makes room for number
+ \math_box_llapped_math_no}
+
+\def\strc_math_number_left_normal
+ {\math_box_rlapped_math_no
+ \strc_math_flush_aligned
+ \hss} % hss makes room for number
+
+\def\strc_math_number_right_normal_outside
+ {\ifconditional\c_strc_formulas_tight
+ \strc_math_flush_box_framed_fit_display
+ \else
+ \strc_math_flush_box_framed_display
+ \fi
+ \hss % hss makes room for number
+ \math_box_llapped_math_no}
+
+\def\strc_math_number_left_normal_outside
+ {\math_box_rlapped_math_no
+ \hss % hss makes room for number
+ \ifconditional\c_strc_formulas_tight
+ \strc_math_flush_box_framed_fit_display
+ \else
+ \strc_math_flush_box_framed_display
+ \fi}
+
+\def\strc_math_number_right_normal_inside
+ {\setbox\b_strc_math_display\hpack to \dimexpr\displaywidth-\d_framed_locator_lo-\d_framed_locator_ro\relax\bgroup
+ \strc_math_flush_aligned
+ \hss
+ \math_box_llapped_math_no
+ \egroup
+ \strc_math_flush_box_framed_fit_inline}
+
+\def\strc_math_number_left_normal_inside
+ {\setbox\b_strc_math_display\hpack to \dimexpr\displaywidth-\d_framed_locator_lo-\d_framed_locator_ro\relax\bgroup
+ \math_box_rlapped_math_no
+ \hss
+ \strc_math_flush_aligned
+ \egroup
+ \strc_math_flush_box_framed_fit_inline}
+
+\def\strc_math_number_right_overflow
+ {\vpack\bgroup
+ \strc_math_flush_box
+ \par
+ \hpack to \displaywidth\bgroup
+ \hss
+ \math_box_llapped_math_no
+ \egroup
+ \egroup}
+
+\def\strc_math_number_left_overflow
+ {\vpack\bgroup
+ \hpack to \displaywidth\bgroup
+ \math_box_rlapped_math_no
+ \hss
+ \egroup
+ \strc_math_flush_box
+ \egroup}
+
+\def\strc_math_number_right_overflow_outside
+ {\vpack\bgroup
+ \strc_math_flush_box_framed_fit_inline
+ %\hskip\zeropoint % nicely breaks the line without introducing funny vertical spacing ... why o why
+ \hpack to \displaywidth\bgroup
+ \hss
+ \math_box_llapped_math_no
+ \egroup
+ \egroup}
+
+\def\strc_math_number_left_overflow_outside
+ {\vpack\bgroup
+ \hpack to \dimexpr\displaywidth-\d_framed_locator_lo\relax\bgroup
+ \math_box_rlapped_math_no
+ \hss
+ \egroup
+ \hskip\zeropoint % nicely breaks the line without introducing funny vertical spacing ... why o why
+ \strc_math_flush_box_framed_fit_inline
+ \egroup}
+
+\def\strc_math_number_right_overflow_inside
+ {\setbox\b_strc_math_display\vpack\bgroup
+ \box\b_strc_math_display
+ \hpack to \displaywidth\bgroup
+ \hss
+ \math_box_llapped_math_no
+ \hskip\d_framed_locator_ro
+ \egroup
+ \egroup
+ \strc_math_flush_box_framed_fit_inline}
+
+\def\strc_math_number_left_overflow_inside
+ {\setbox\b_strc_math_display\vpack\bgroup
+ \hpack to \displaywidth\bgroup
+ % \hskip\d_framed_locator_lo
+ \math_box_rlapped_math_no
+ \hss
+ \egroup
+ \box\b_strc_math_display
+ \egroup
+ \strc_math_flush_box_framed_fit_inline}
+
+% checkers
+
+\def\strc_math_number_check
+ {\d_strc_math_display_width\wd\b_strc_math_display
+ \ifconditional\c_strc_formulas_tight
+ \ifdim\d_strc_math_display_width>\displaywidth
+ \settrue\c_strc_math_display_overflow
+ \else
+ \displaywidth\d_strc_math_display_width
+ \setfalse\c_strc_math_display_overflow
+ \fi
+ \else
+ \ifdim\d_strc_math_display_width>\displaywidth
+ \settrue\c_strc_math_display_overflow
+ \else
+ \setfalse\c_strc_math_display_overflow
+ \fi
+ \fi}
+
+\def\strc_math_number_check_outside
+ {\d_strc_math_display_width\naturalwd\b_strc_math_display
+ \ifdim\dimexpr\d_strc_math_display_width+\d_framed_locator_lo+\d_framed_locator_ro\relax>\displaywidth
+ \settrue\c_strc_math_display_overflow
+ \else
+ \setfalse\c_strc_math_display_overflow
+ \fi
+ % still ok?
+ \ifnum\mathraggedstatus=\plustwo
+ \d_strc_math_framed_width\dimexpr\displaywidth-2\wd\b_strc_formulas_number\relax
+ \else
+ \d_strc_math_framed_width\dimexpr\displaywidth- \wd\b_strc_formulas_number\relax
+ \fi}
+
+\let\strc_math_number_check_inside\strc_math_number_check_outside
+
+% offsets
+
+\def\strc_math_number_check_offsets
+ {\begingroup
+ \setbox\scratchbox\hbox
+ {\inheritedformulaframedframed
+ {\pack_framed_locator_set_lo\pack_framed_locator_set_ro}}%
+ \endgroup}
+
+% tracing
+
+\def\strc_math_traced_state_yes
+ {\llap{\setbox\scratchbox\hbox{\infofont
+ \ifcase\mathraggedstatus unset\or right\or middle\or left\fi
+ \space
+ \ifcase\c_strc_formulas_frame_mode no\or out\or in\fi
+ \space
+ \ifconditional\c_strc_math_display_overflow overflow\else fit\fi
+ \quad}\ht\scratchbox\zeropoint\dp\scratchbox\zeropoint\box\scratchbox}}
+
+\let\strc_math_traced_state\relax
+
+\installtextracker
+ {formulas.framed}
+ {\let\strc_math_traced_state\strc_math_traced_state_yes}
+ {\let\strc_math_traced_state\relax}
+
+% packaging
+
+\protected\def\strc_math_box_start#1%
+ {\hsize\displaywidth % \checkeddisplaymath
+ \global\mathnumberstatus\plusone
+ \mathraggedstatus#1\relax
+ %
+ \global\d_math_number_correction\zeropoint
+ %
+ \edef\p_location{\formulaparameter\c!location}%
+ \useformulacolorparameter\c!color
+ \c_strc_math_number_location\ifx\p_location\v!left\plusone\orelse\ifx\p_location\v!right\plustwo\else\zerocount\fi
+ %
+ %\strc_formulas_place_number % not here as we can have inner alignment numbers
+ \dontcomplain
+ \setbox\b_strc_math_display\math_hbox\bgroup % \checkeddisplaymath
+ \mathinnerstrut
+ \startforceddisplaymath}
+
+\def\strc_math_flush_number_no
+ {\ifcase\c_strc_math_vertical
+ \ifconditional\c_strc_math_display_overflow
+ \ifcase\c_strc_formulas_frame_mode
+ \strc_math_flush_box_normal
+ \else
+ \strc_math_flush_box_framed_fit_inline
+ \fi
+ \else
+ \ifcase\c_strc_formulas_frame_mode
+ %\ifconditional\c_strc_formulas_tight
+ % \strc_math_flush_box_normal
+ %\else
+ \strc_math_flush_box_normal
+ %\fi
+ \else
+ \ifconditional\c_strc_formulas_tight
+ \strc_math_flush_box_framed_fit_inline
+ \else
+ \strc_math_flush_box_framed_display
+ \fi
+ \fi
+ \fi
+ \else
+ \strc_math_flush_box
+ \fi}
+
+\def\strc_math_flush_number_left
+ {\ifcase\c_strc_math_vertical
+ \ifconditional\c_strc_math_display_overflow
+ \ifcase\c_strc_formulas_frame_mode
+ \strc_math_number_left_overflow
+ \or
+ \strc_math_number_left_overflow_outside
+ \or
+ \strc_math_number_left_overflow_inside
+ \fi
+ \else
+ \ifcase\c_strc_formulas_frame_mode
+ \strc_math_number_left_normal
+ \or
+ \strc_math_number_left_normal_outside
+ \or
+ \strc_math_number_left_normal_inside
+ \fi
+ \fi
+ \else
+ \box\b_strc_formulas_number
+ \hfill
+ \strc_math_flush_aligned
+ \fi}
+
+\def\strc_math_flush_number_right
+ {\ifcase\c_strc_math_vertical
+ \ifconditional\c_strc_math_display_overflow
+ \ifcase\c_strc_formulas_frame_mode
+ \strc_math_number_right_overflow
+ \or
+ \strc_math_number_right_overflow_outside
+ \or
+ \strc_math_number_right_overflow_inside
+ \fi
+ \else
+ \ifcase\c_strc_formulas_frame_mode
+ \strc_math_number_right_normal
+ \or
+ \strc_math_number_right_normal_outside
+ \or
+ \strc_math_number_right_normal_inside
+ \fi
+ \fi
+ \else
+ \strc_math_flush_aligned
+ \hfill
+ \box\b_strc_formulas_number
+ \fi}
+
+\protected\def\strc_math_box_stop
+ {\stopforceddisplaymath
+ \egroup
+ % check number
+ \d_strc_math_number_width\wd\b_strc_formulas_number
+ %
+ \ifcase\mathnumberstatus
+ \setfalse\c_strc_math_has_number
+ \or\ifzeropt\d_strc_math_number_width
+ \setfalse\c_strc_math_has_number
+ \else
+ \settrue\c_strc_math_has_number
+ \fi\fi
+ % preroll left and right offsets
+ \ifcase\c_strc_formulas_frame_mode
+ % no frame
+ \else
+ \strc_math_number_check_offsets
+ \fi
+ \ifcase\c_strc_formulas_frame_mode
+ \strc_math_number_check
+ \or
+ \strc_math_number_check_outside
+ \else
+ \strc_math_number_check_inside
+ \fi
+ \noindent % \noindentation % not \dontleavehmode
+ \hskip\d_strc_formulas_display_margin_left % was kern but that doesn't indent
+ \strc_math_traced_state
+ \ifcase\c_strc_math_vertical
+ \hbox to \displaywidth \bgroup
+ \or
+ \vbox \bgroup \hsize\displaywidth
+ \or
+ \bgroup \hsize\displaywidth
+ \fi
+ \ifcase\mathnumberstatus
+ \strc_math_flush_box
+ \or % status 1
+ \ifcase\c_strc_math_number_location
+ \strc_math_flush_box
+ \or % number left
+ \ifzeropt\wd\b_strc_formulas_number
+ \strc_math_flush_number_no
+ \else
+ \strc_math_flush_number_left
+ \fi
+ \else % number right
+ \ifzeropt\wd\b_strc_formulas_number
+ \strc_math_flush_number_no
+ \else
+ \strc_math_flush_number_right
+ \fi
+ \fi
+ \or % status 2
+ \hskip\d_math_number_correction % probably no longer used
+ \strc_math_flush_box
+ \hss
+ \else
+ \strc_math_flush_box
+ \fi
+ \ifcase\c_strc_math_vertical
+ \or
+ \or
+ \par
+ \fi
+ \egroup}
+
+\defineinnermathhandler\v!left {\strc_math_box_start\plusone }{\strc_math_box_stop}
+\defineinnermathhandler\v!middle {\strc_math_box_start\plustwo }{\strc_math_box_stop}
+\defineinnermathhandler\v!right {\strc_math_box_start\plusthree}{\strc_math_box_stop}
+\defineinnermathhandler\v!flushleft {\strc_math_box_start\plusthree}{\strc_math_box_stop}
+\defineinnermathhandler\v!center {\strc_math_box_start\plustwo }{\strc_math_box_stop}
+\defineinnermathhandler\v!flushright{\strc_math_box_start\plusone }{\strc_math_box_stop}
+\defineinnermathhandler\v!normal {\strc_math_box_start\plustwo }{\strc_math_box_stop}
+
+%D Some inline math tweak.
+
+\appendtoks
+ \ifcase\mathnestinglevel\or
+ % 4=disable 6=only when no spaces
+ \mathsurroundskip\mathematicsparameter\c!textdistance\relax
+ \ifzeropt\mathsurroundskip
+ \ifzeropt\gluestretch\mathsurroundskip
+ \ifzeropt\glueshrink\mathsurroundskip
+ \mathsurroundmode\plussix
+ \else
+ \mathsurroundskip\zeropoint
+ \mathsurroundmode\plusfour
+ \fi
+ \else
+ \mathsurroundmode\plussix
+ \fi
+ \else
+ \mathsurroundmode\plussix
+ \fi
+ \else
+ \mathsurroundmode\plusfour
+ \mathsurroundskip\zeropoint
+ \fi
+\to \everymathematics
+
+\setupmathematics
+ [\c!textdistance=\zeropoint]
+
+%D This is an experiment. No fancy spacing and alignments here. If we ever
+%D go that route it might result in incompatible rendering.
+
+\permanent\protected\def\startsplitformula
+ {\ifhmode
+ \par
+ \fi
+ \begingroup
+ \beforedisplayspace
+ % subset of \everydisplay:
+ \c_attr_mathmode\plusone
+ \settrue \indisplaymath
+ % end of subset
+ \informulatrue}
+
+\permanent\protected\def\stopsplitformula
+ {\afterdisplayspace
+ \endgroup}
+
+\protect \endinput
+
+% \placeformula \startformula[-] \startmatrix
+% \NC 1 \NC x \NC a \NR
+% \NC 2 \NC y \NC b \NR
+% \NC 3 \NC z \NC c \NR
+% \stopmatrix \stopformula
+
+% \definemathmatrix[bordermatrix][left={\left[\mskip\thinmuskip},right={\mskip\thinmuskip\right]}]
+
+% \placeformula \startformula[-] \startbordermatrix
+% \NC 1 \NC x \NC a \NR
+% \NC 2 \NC y \NC b \NR
+% \NC 3 \NC z \NC c \NR
+% \stopbordermatrix \stopformula
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl
new file mode 100644
index 00000000000..1f3da649d1d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-def.mkxl
@@ -0,0 +1,172 @@
+ %D \module
+%D [ file=math-tex,
+%D version=2001.04.12,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Definitions,
+%D author={Hans Hagen, Taco Hoekwater \& Aditya Mahajan},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Math Macros / Definitions}
+
+\unprotect
+
+\pushoverloadmode % cap etc
+
+\startluacode
+ mathematics.define(\number\defaultmathfamily)
+ -- mathematics.xml.registerentities()
+\stopluacode
+
+\popoverloadmode
+
+\activatemathcharacters
+
+%D The \mfunction macro is an alternative for \hbox with a controlable font
+%D switch.
+
+\definemathcommand [arccos] [nolop] {\mfunctionlabeltext{arccos}}
+\definemathcommand [arcsin] [nolop] {\mfunctionlabeltext{arcsin}}
+\definemathcommand [arctan] [nolop] {\mfunctionlabeltext{arctan}}
+\definemathcommand [arccosh] [nolop] {\mfunctionlabeltext{arccosh}}
+\definemathcommand [arcsinh] [nolop] {\mfunctionlabeltext{arcsinh}}
+\definemathcommand [arctanh] [nolop] {\mfunctionlabeltext{arctanh}}
+\definemathcommand [acos] [nolop] {\mfunctionlabeltext{acos}}
+\definemathcommand [asin] [nolop] {\mfunctionlabeltext{asin}}
+\definemathcommand [atan] [nolop] {\mfunctionlabeltext{atan}}
+\definemathcommand [arg] [nolop] {\mfunctionlabeltext{arg}}
+\definemathcommand [cosh] [nolop] {\mfunctionlabeltext{cosh}}
+\definemathcommand [cos] [nolop] {\mfunctionlabeltext{cos}}
+\definemathcommand [coth] [nolop] {\mfunctionlabeltext{coth}}
+\definemathcommand [cot] [nolop] {\mfunctionlabeltext{cot}}
+\definemathcommand [csc] [nolop] {\mfunctionlabeltext{csc}}
+\definemathcommand [deg] [nolop] {\mfunctionlabeltext{deg}}
+\definemathcommand [det] [limop] {\mfunctionlabeltext{det}}
+\definemathcommand [dim] [nolop] {\mfunctionlabeltext{dim}}
+\definemathcommand [exp] [nolop] {\mfunctionlabeltext{exp}}
+\definemathcommand [gcd] [limop] {\mfunctionlabeltext{gcd}}
+\definemathcommand [hom] [nolop] {\mfunctionlabeltext{hom}}
+\definemathcommand [inf] [limop] {\mfunctionlabeltext{inf}}
+\definemathcommand [injlim] [limop] {\mfunctionlabeltext{injlim}}
+\definemathcommand [ker] [nolop] {\mfunctionlabeltext{ker}}
+\definemathcommand [lg] [nolop] {\mfunctionlabeltext{lg}}
+\definemathcommand [liminf] [limop] {\mfunctionlabeltext{liminf}}
+\definemathcommand [limsup] [limop] {\mfunctionlabeltext{limsup}}
+\definemathcommand [lim] [limop] {\mfunctionlabeltext{lim}}
+\definemathcommand [ln] [nolop] {\mfunctionlabeltext{ln}}
+\definemathcommand [log] [nolop] {\mfunctionlabeltext{log}}
+\definemathcommand [median] [limop] {\mfunctionlabeltext{median}}
+\definemathcommand [max] [limop] {\mfunctionlabeltext{max}}
+\definemathcommand [min] [limop] {\mfunctionlabeltext{min}}
+\definemathcommand [mod] [limop] {\mfunctionlabeltext{mod}}
+%definemathcommand [div] [limop] {\mfunctionlabeltext{div}} % overloads \div symbol
+\definemathcommand [projlim] [limop] {\mfunctionlabeltext{projlim}}
+\definemathcommand [Pr] [limop] {\mfunctionlabeltext{Pr}}
+\definemathcommand [sec] [nolop] {\mfunctionlabeltext{sec}}
+\definemathcommand [sinh] [nolop] {\mfunctionlabeltext{sinh}}
+\definemathcommand [sin] [nolop] {\mfunctionlabeltext{sin}}
+\definemathcommand [sup] [limop] {\mfunctionlabeltext{sup}}
+\definemathcommand [tanh] [nolop] {\mfunctionlabeltext{tanh}}
+\definemathcommand [tan] [nolop] {\mfunctionlabeltext{tan}}
+\definemathcommand [diff] {\mfunctionlabeltext{diff}}
+
+\aliased\let\normalmatharg\arg % todo: maybe automatically
+
+%D This needs checking:
+
+\permanent\protected\def\setoperatorlimits#1#2% operator limits
+ {\savenormalmeaning{#1}%
+ %frozen\protected\expandafter\def\expandafter#1\expandafter{\csname normal\csstring#1\endcsname#2}}
+ \frozen\protected\edef#1{\expandafter\noexpand\csname\s!normal\csstring#1\endcsname\noexpand#2}}
+
+\pushoverloadmode
+
+\setoperatorlimits \int \intlimits
+\setoperatorlimits \iint \intlimits
+\setoperatorlimits \iiint \intlimits
+\setoperatorlimits \oint \intlimits
+\setoperatorlimits \oiint \intlimits
+\setoperatorlimits \oiiint \intlimits
+\setoperatorlimits \intclockwise \intlimits
+\setoperatorlimits \ointclockwise \intlimits
+\setoperatorlimits \ointctrclockwise \intlimits
+
+\popoverloadmode
+
+%D \macros
+%D {centercolon, colonminus, minuscolon, colonequals, equalscolon,
+%D colonapprox, approxcolon, colonsim, simcolon, coloncolon,
+%D coloncolonminus, minuscoloncolon, coloncolonequals,
+%D equalscoloncolon, coloncolonapprox, approxcoloncolon,
+%D colonsim, simcoloncolon}
+%D
+%D The following colon related definitions are provided by Aditya
+%D Mahajan who derived them from \type {mathtools.sty} and \type
+%D {colonequals.sty}. This will be redone as part of the overhaul
+%D and font updates.
+%D
+%D In $a := b$ the colon is not vertically centered with the equal
+%D to. Also the distance between colon and equal to is a bit large.
+%D So, we define a vertically centered colon \tex {centercolon} and
+%D a few macros for colon and double colon relation symbols.
+%D
+%D \startlines
+%D \formula {A \centercolon B}
+%D \formula {A \colonminus B}
+%D \formula {A \minuscolon B}
+%D \formula {A \colonequals B}
+%D \formula {A \equalscolon B}
+%D \formula {A \colonapprox B}
+%D \formula {A \approxcolon B}
+%D \formula {A \colonsim B}
+%D \formula {A \simcolon B}
+%D \formula {A \coloncolon B}
+%D \formula {A \coloncolonminus B}
+%D \formula {A \minuscoloncolon B}
+%D \formula {A \coloncolonequals B}
+%D \formula {A \equalscoloncolon B}
+%D \formula {A \coloncolonapprox B}
+%D \formula {A \approxcoloncolon B}
+%D \formula {A \colonsim B}
+%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.
+
+\pushoverloadmode
+
+\definemathcommand [colonsep] {\mkern-1.2mu}
+\definemathcommand [doublecolonsep] {\mkern-0.9mu}
+
+\definemathcommand [centercolon] [rel] {\mathstylevcenteredhbox\colon}
+\definemathcommand [colonminus] [rel] {\centercolon\colonsep\mathrel{-}}
+%definemathcommand [minuscolon] [rel] {\mathrel{-}\colonsep\centercolon} % native char
+%definemathcommand [colonequals] [rel] {\centercolon\colonsep=} % native char
+%definemathcommand [equalscolon] [rel] {=\centercolon\colonsep} % native char
+\definemathcommand [colonapprox] [rel] {\centercolon\colonsep\approx}
+\definemathcommand [approxcolon] [rel] {\approx\centercolon\colonsep}
+\definemathcommand [colonsim] [rel] {\centercolon\colonsep\sim}
+\definemathcommand [simcolon] [rel] {\sim\centercolon\colonsep}
+
+\definemathcommand [coloncolon] [rel] {\centercolon\doublecolonsep\centercolon}
+\definemathcommand [coloncolonminus] [rel] {\coloncolon\colonsep\mathrel{-}}
+\definemathcommand [minuscoloncolon] [rel] {\mathrel{-}\colonsep\coloncolon}
+\definemathcommand [coloncolonequals] [rel] {\coloncolon\colonsep=} % native char
+\definemathcommand [equalscoloncolon] [rel] {=\coloncolon\colonsep}
+\definemathcommand [coloncolonapprox] [rel] {\coloncolon\colonsep\approx}
+\definemathcommand [approxcoloncolon] [rel] {\approx\coloncolon\colonsep}
+\definemathcommand [coloncolonsim] [rel] {\coloncolon\colonsep\sim}
+\definemathcommand [simcoloncolon] [rel] {\sim\coloncolon\colonsep}
+
+\popoverloadmode
+
+% \appendtoks
+% \def\over{\primitive\over}%
+% \to \everymathematics
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-del.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-del.mkxl
new file mode 100644
index 00000000000..07e6d794874
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-del.mkxl
@@ -0,0 +1,164 @@
+%D \module
+%D [ file=math-del,
+%D version=2007.07.19,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Delimiters,
+%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 Math Macros / Delimiters}
+
+\unprotect
+
+%D Old code that will be redone:
+%D
+%D \macros
+%D {checkdelimiters, fakeleftdelimiter, fakerightdelimiter}
+%D
+%D Handy for non matching situations (as with mathml):
+%D
+%D \starttyping
+%D \checkdelimiters{... bla bla ...}
+%D \fakeleftdelimiter
+%D ... bla bla ...
+%D \fakerightdelimiter
+%D \stoptyping
+
+% Actually we can do better now with lua hacks.
+
+\newcount\c_math_delimiter_nesting
+
+\permanent\protected\def\leftfakedelimiter {\advance\c_math_delimiter_nesting\minusone\gobbleoneargument}
+\permanent\protected\def\rightfakedelimiter{\advance\c_math_delimiter_nesting\plusone \gobbleoneargument}
+
+\permanent\protected\def\checkdelimiters#1%
+ {\c_math_delimiter_nesting\zerocount
+ \setbox\scratchbox\hbox\bgroup
+ \let\left \leftfakedelimiter
+ \let\right\rightfakedelimiter
+ \normalstartimath#1\expandafter\normalstopimath\expandafter
+ \egroup
+ \expandafter\c_math_delimiter_nesting\the\c_math_delimiter_nesting\relax}
+
+\permanent\protected\def\fakeleftdelimiter {\ifnum\c_math_delimiter_nesting>\zerocount\left .\fi}
+\permanent\protected\def\fakerightdelimiter{\ifnum\c_math_delimiter_nesting<\zerocount\right.\fi}
+
+%D The following macros are used in the MathML interpreter, so there is a good
+%D change of them never being documented for other usage.
+
+\aliased\let\normalordelimiter\secondoftwoarguments
+\aliased\let\normalorfiller \firstoftwoarguments
+
+\permanent\protected\def\enabledelimiter {\enforced\let\normalordelimiter\secondoftwoarguments}
+\permanent\protected\def\disabledelimiter{\enforced\let\normalordelimiter\firstoftwoarguments}
+
+\permanent\protected\def\enablefiller {\enforced\let\normalorfiller\secondoftwoarguments}
+\permanent\protected\def\disablefiller {\enforced\let\normalorfiller\firstoftwoarguments}
+
+\permanent\protected\def\mathopnolimits#1{\mathop{\mathrm#1}\nolimits} % was \rm, which follows text fonts (used in mml parser, check!)
+\permanent\protected\def\mathopdolimits#1{\mathop{\mathrm#1}} % was \rm, which follows text fonts (used in mml parser, check!)
+
+% A new experiment:
+
+% Hm, we already have \definemathextensible so we need to preserve that one. We now
+% use \definemathdelimiter.
+
+\installcorenamespace {mathdelimiter}
+
+\installcommandhandler \??mathdelimiter {mathdelimiter} \??mathdelimiter
+
+\aliased\let\setupmathdelimiters\setupmathdelimiter
+
+\setupmathdelimiters
+ [\c!symbol=0,
+ \c!define=\v!yes,
+ \c!factor=1.5,
+ \c!axis=\v!yes,
+ % \c!exact=\v!yes
+ \c!height=\exheight,
+ \c!depth=\exheight]
+
+\appendtoks
+ \ifcstok{\mathdelimiterparameter\c!define}\v!yes
+ \frozen\instance\setuevalue\currentmathdelimiter{\mathdelimiter[\currentmathdelimiter]}%
+ \fi
+\to \everydefinemathdelimiter
+
+\permanent\tolerant\protected\def\mathdelimiter[#1]#*[#2]%
+ {\mathop
+ {\edef\currentmathdelimiter{#1}%
+ \iftok{#2}\emptytoks
+ \edef\p_factor{\mathdelimiterparameter\c!factor}%
+ \orelse\ifhastok={#2}%
+ \setupcurrentmathdelimiter[#2]%
+ \edef\p_factor{\mathdelimiterparameter\c!factor}%
+ \else
+ \edef\p_factor{#2}%
+ \fi
+ \edef\p_exact{\mathdelimiterparameter\c!exact}%
+ \edef\p_axis {\mathdelimiterparameter\c!axis}%
+ \edef\p_leftoffset{\mathdelimiterparameter\c!leftoffset}%
+ \edef\p_rightoffset{\mathdelimiterparameter\c!rightoffset}%
+ \ifempty\p_leftoffset\else
+ \mskip\p_leftoffset
+ \fi
+ \Uvextensible
+ \ifx\p_exact\v!yes exact \fi
+ \ifx\p_axis \v!yes axis \fi
+ height \p_factor\dimexpr\mathdelimiterparameter\c!height\relax
+ depth \p_factor\dimexpr\mathdelimiterparameter\c!depth \relax
+ \Udelimiter\zerocount\zerocount\mathdelimiterparameter\c!symbol
+ \relax
+ \ifempty\p_rightoffset\else
+ \mskip\p_rightoffset
+ \fi}}
+
+\definemathdelimiter[integral][\c!symbol="222B]
+
+% \setupmathdelimiter[integral][rightoffset=-3mu,exact=yes,factor=2]
+%
+% \let\inlineint \int
+% \let\displayint\integral
+%
+% \protected\def\int{\ifmmode\inlineordisplaymath\inlineint\displayint\else\normalint\fi}
+%
+% \startlines
+% \ruledhbox{$\integral f\frac{1}{2}$}
+% \ruledhbox{$\integral[factor=1] f\frac{1}{2}$}
+% \ruledhbox{$\integral[factor=3] f\frac{1}{2}$}
+% \ruledhbox{$\int f\frac{1}{2}$}
+% \stoplines
+
+\permanent\protected\def\autointegral#1#2#3%
+ {\ifmmode
+ \setbox\nextbox\mathstylehbox{#3}%
+ \scratchdimen\ifdim\nextboxht>\nextboxdp\nextboxht\else\nextboxdp\fi
+ \mathlimop{%
+ \Uvextensible
+ height \scratchdimen
+ depth \scratchdimen
+ exact%
+ axis%
+ \Udelimiter \plusfour \zerocount "222B%
+ }%
+ \limits % nolimits needs more work: kerning and so
+ \normalsuperscript{#1}%
+ \normalsubscript{#2}%
+ \box\nextbox
+ \else
+ \char"222B\relax
+ \fi}
+
+% \startformula
+% a =
+% \autointegral{t}{b}1 +
+% \autointegral{t}{b}{\frac{\frac{3}{4}}{\frac{1}{2}}} +
+% \autointegral{t}{b}{\frac{\frac{\frac{\frac{1}{2}}{2}}{2}}{2}}
+% \stopformula
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-dis.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-dis.mkxl
new file mode 100644
index 00000000000..5b70970f3cc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-dis.mkxl
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=math-ali,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Display,
+%D author={Hans Hagen, Taco Hoekwater \& Aditya Mahajan},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Math Macros / Display}
+
+\unprotect
+
+% display spacing code will move here
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl
new file mode 100644
index 00000000000..8aa0e62a8cb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-fen.mkxl
@@ -0,0 +1,841 @@
+%D \module
+%D [ file=math-fen,
+%D version=2012.02.18,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Fences,
+%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 Math Macros / Fences}
+
+\unprotect
+
+% maybe always "method=auto" for:
+%
+% \switchtobodyfont[cambria]
+% \ruledhbox{$f(x)$}
+% \ruledhbox{\mathdelimitersmode6$f\left(x\right)$}
+% \ruledhbox{\mathdelimitersmode7$f\left(x\right)$}
+% \ruledhbox{$f\left(\frac{1}{x}\right)$}
+
+% todo: mathstyle
+
+% \definemathfence [fancybracket] [bracket] [command=yes,color=blue]
+%
+% test $|x|$ test \par
+% test $||x||$ test (okay) \par
+% test $a\left|\frac{1}{b}\right|c$ test \par
+% test $a\left||\frac{1}{b}\right||c$ test (not okay) \par
+%
+% \setupmathfences [color=red]
+%
+% test $a\fenced[bar]{\frac{1}{b}}c$ test \par
+% test $a\fenced[doublebar]{\frac{1}{b}}c$ test \par
+% test $a\fenced[bracket]{\frac{1}{b}}c$ test \par
+% test $a\fancybracket{\frac{1}{b}}c$ test \par
+
+\installcorenamespace{mathfences}
+
+\installcommandhandler \??mathfences {mathfence} \??mathfences
+
+\aliased\let\setupmathfences\setupmathfence
+
+\setupmathfences
+ [\c!method=, % maybe always \v!auto
+ \c!left=,
+ \c!right=,
+ \c!middle=,
+ \c!mathstyle=,
+ \c!color=,
+ \c!command=,
+ \c!mathclass=,
+ \c!factor=\v!auto]
+
+\appendtoks
+ \edef\p_command{\mathfenceparameter\c!command}%
+ \ifx\p_command\v!yes
+ \setuevalue\currentmathfence{\math_fenced_fenced[\currentmathfence]}%
+ \fi
+\to \everydefinemathfence
+
+% we need the direct use of \Udelimiter because of { etc
+
+%D So we can do:
+%D
+%D \starttyping
+%D $ a + \fenced[bar][size=1] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=2] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=3] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=4] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=big] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=Big] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=bigg]{\frac {b} {c}} + d $
+%D $ a + \fenced[bar][size=Bigg]{\frac {b} {c}} + d $
+%D $ a + \fenced[bar][factor=1] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][factor=2] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar][factor=4] {\frac {b} {c}} + d $
+%D $ a + \fenced[bar] {\frac {b} {c}} + d $
+%D \stoptyping
+
+\newconditional\c_math_fenced_mirror \settrue \c_math_fenced_mirror
+\newconditional\c_math_fenced_sized \setfalse\c_math_fenced_sized
+
+\installcorenamespace {mathfencesize}
+
+\setvalue{\??mathfencesize big}{1}
+\setvalue{\??mathfencesize Big}{2}
+\setvalue{\??mathfencesize bigg}{3}
+\setvalue{\??mathfencesize Bigg}{4}
+
+\def\math_fenced_force_size#1#2%
+ {\c_attr_mathsize\numexpr
+ #1*\plushundred
+ +\ifcsname\??mathfencesize#2\endcsname\lastnamedcs\else#2\fi
+ \relax}
+
+\protected\def\math_fenced_inject#1#2#3#4%
+ {\ifx#1\empty
+ #2.%
+ \else
+ \edef\p_mathclass{\mathfenceparameter\c!mathclass}%
+ \ifconditional\c_math_fenced_sized
+ \let\p_factor\v!fixed
+ \else
+ \edef\p_factor{\mathfenceparameter\c!factor}%
+ \fi
+ \ifempty\p_factor
+ \ifempty\p_mathclass
+ #2%
+ \else
+ #3%
+ \s!class\p_mathclass
+ \fi
+ \orelse\ifx\p_factor\v!auto
+ \ifempty\p_mathclass
+ #2%
+ \else
+ #3%
+ \s!class\p_mathclass
+ \fi
+ \orelse\ifx\p_factor\v!none
+ #3%
+ \s!height\zeropoint % redundant with "exact"
+ \s!depth\zeropoint % redundant with "exact"
+ \ifempty\p_mathclass\else
+ \s!class\p_mathclass
+ \fi
+ \s!axis
+ \s!exact % new
+ % #2%
+ \else
+ %\scratchdimen\ifx\p_factor\v!fixed\scaledpoint\else\dimexpr\p_factor\bodyfontsize/2\relax\fi
+ \scratchdimen\ifx\p_factor\v!fixed\zeropoint\else\dimexpr\p_factor\bodyfontsize/2\relax\fi
+ #3%
+ \s!height\scratchdimen
+ \s!depth\scratchdimen
+ \ifempty\p_mathclass\else
+ \s!class\p_mathclass
+ \fi
+ \s!axis
+ \s!exact
+ \fi
+ \Udelimiter#4\fam#1\relax
+ \fi}
+
+\permanent\def\math_fenced_left
+ {\edef\p_left
+ {\ifconditional\c_math_fenced_mirror
+ \ifconditional\c_math_right_to_left
+ \mathfenceparameter\c!right
+ \else
+ \mathfenceparameter\c!left
+ \fi
+ \else
+ \mathfenceparameter\c!left
+ \fi}%
+ \math_fenced_color_push
+ \math_fenced_inject\p_left\normalleft\Uleft\plusfour
+ \math_fenced_color_pop}
+
+\permanent\def\math_fenced_middle
+ {\edef\p_middle{\mathfenceparameter\c!middle}%
+ \mskip\thinmuskip
+ \math_fenced_color_push
+ \math_fenced_inject\p_middle\normalmiddle\Umiddle\plusfour
+ \math_fenced_color_pop
+ \mskip\thinmuskip}
+
+\permanent\def\math_fenced_right
+ {\edef\p_right
+ {\ifconditional\c_math_fenced_mirror
+ \ifconditional\c_math_right_to_left
+ \mathfenceparameter\c!left
+ \else
+ \mathfenceparameter\c!right
+ \fi
+ \else
+ \mathfenceparameter\c!right
+ \fi}%
+ \math_fenced_color_push
+ \math_fenced_inject\p_right\normalright\Uright\plusfive
+ \math_fenced_color_pop}
+
+\def\math_fenced_color_do_push{\pushcolor[\p_math_fenced_color]}
+\let\math_fenced_color_do_pop \popcolor
+
+\let\math_fenced_color_push\donothing
+\let\math_fenced_color_pop \donothing
+
+\aliased\let\fence \relax
+\aliased\let\fenced\relax
+
+\newcount\c_math_fenced_nesting
+
+\protected\def\math_fenced_fenced_common
+ {\startusemathstyleparameter\mathfenceparameter
+ \enforced\let\fence\math_fenced_middle
+ \edef\p_math_fenced_color{\mathfenceparameter\c!color}%
+ \ifempty\p_math_fenced_color
+ \let\math_fenced_color_push\donothing
+ \let\math_fenced_color_pop \donothing
+ \else
+ \let\math_fenced_color_push\math_fenced_color_do_push
+ \let\math_fenced_color_pop \math_fenced_color_do_pop
+ \fi}
+
+\protected\def\math_fenced_fenced_start#1%
+ {\advance\c_math_fenced_nesting\plusone
+ \begingroup
+ \edef\currentmathfence{#1}%
+ \math_fenced_fenced_common
+ \math_fenced_left}
+
+\protected\def\math_fenced_fenced_stop#1%
+ {\edef\currentmathfence{#1}%
+ \math_fenced_right
+ \stopusemathstyleparameter
+ \endgroup
+ \advance\c_math_fenced_nesting\minusone}
+
+\tolerant\protected\def\math_fenced_fenced[#1]#*[#2]%
+ {\advance\c_math_fenced_nesting\plusone
+ \begingroup
+ \edef\currentmathfence{#1}%
+% under test:
+\c_attr_mathsize\attributeunsetvalue
+\letmathfenceparameter\c!size\empty
+\letmathfenceparameter\c!factor\v!auto
+% so far
+ \ifparameter#2\or\setupcurrentmathfence[#2]\fi
+ \math_fenced_fenced_common
+ \edef\p_size{\mathfenceparameter\c!size}%
+ \ifempty\p_size
+ \expandafter\math_fenced_fenced_indeed_adapt
+ \else
+ \expandafter\math_fenced_fenced_indeed_fixed
+ \fi}
+
+\protected\def\math_fenced_fenced_indeed_finish
+ {\stopusemathstyleparameter
+ \endgroup
+ \advance\c_math_fenced_nesting\minusone}
+
+\protected\def\math_fenced_fenced_indeed_fixed#1%
+ {\math_fenced_force_size\bigmathdelimitervariant\p_size
+ \settrue\c_math_fenced_sized
+ \math_fenced_left
+ \setfalse\c_math_fenced_sized
+ #1%
+ \settrue\c_math_fenced_sized
+ \math_fenced_right
+ \setfalse\c_math_fenced_sized
+ \math_fenced_fenced_indeed_finish}
+
+\protected\def\math_fenced_fenced_indeed_adapt#1%
+ {\setfalse\c_math_fenced_sized
+ \math_fenced_left
+ #1%
+ \setfalse\c_math_fenced_sized
+ \math_fenced_right
+ \math_fenced_fenced_indeed_finish}
+
+\appendtoks
+ \enforced\let\fenced\math_fenced_fenced
+\to \everymathematics
+
+% todo: | in mathmode letter
+%
+% \appendtoks
+% \let\bar\letterbar
+% \to \everymathematics
+%
+% but then we don't have it in embedded text too so ...
+
+\definemathfence [parenthesis] [\c!left="0028,\c!right="0029]
+\definemathfence [bracket] [\c!left="005B,\c!right="005D]
+\definemathfence [brace] [\c!left="007B,\c!right="007D]
+\definemathfence [bar] [\c!left="007C,\c!right="007C]
+\definemathfence [doublebar] [\c!left="2016,\c!right="2016]
+\definemathfence [triplebar] [\c!left="2980,\c!right="2980]
+\definemathfence [angle] [\c!left="27E8,\c!right="27E9]
+\definemathfence [doubleangle] [\c!left="27EA,\c!right="27EB]
+\definemathfence [solidus] [\c!left="2044,\c!right="2044]
+\definemathfence [ceiling] [\c!left="2308,\c!right="2309]
+\definemathfence [floor] [\c!left="230A,\c!right="230B]
+\definemathfence [moustache] [\c!left="23B0,\c!right="23B1]
+\definemathfence [uppercorner] [\c!left="231C,\c!right="231D]
+\definemathfence [lowercorner] [\c!left="231E,\c!right="231F]
+\definemathfence [group] [\c!left="27EE,\c!right="27EF]
+\definemathfence [openbracket] [\c!left="27E6,\c!right="27E7]
+
+\definemathfence [nothing]
+
+\definemathfence [mirrored] % \v!mirrored
+
+\definemathfence [mirroredparenthesis] [mirrored] [\c!right="0028,\c!left="0029]
+\definemathfence [mirroredbracket] [mirrored] [\c!right="005B,\c!left="005D]
+\definemathfence [mirroredbrace] [mirrored] [\c!right="007B,\c!left="007D]
+\definemathfence [mirroredbar] [mirrored] [\c!right="007C,\c!left="007C]
+\definemathfence [mirroreddoublebar] [mirrored] [\c!right="2016,\c!left="2016]
+\definemathfence [mirroredtriplebar] [mirrored] [\c!right="2980,\c!left="2980]
+\definemathfence [mirroredangle] [mirrored] [\c!right="27E8,\c!left="27E9]
+\definemathfence [mirroreddoubleangle] [mirrored] [\c!right="27EA,\c!left="27EB]
+\definemathfence [mirroredsolidus] [mirrored] [\c!right="2044,\c!left="2044]
+\definemathfence [mirroredceiling] [mirrored] [\c!right="2308,\c!left="2309]
+\definemathfence [mirroredfloor] [mirrored] [\c!right="230A,\c!left="230B]
+\definemathfence [mirroredmoustache] [mirrored] [\c!right="23B0,\c!left="23B1]
+\definemathfence [mirroreduppercorner] [mirrored] [\c!right="231C,\c!left="231D]
+\definemathfence [mirroredlowercorner] [mirrored] [\c!right="231E,\c!left="231F]
+\definemathfence [mirroredgroup] [mirrored] [\c!right="27EE,\c!left="27EF]
+\definemathfence [mirroredopenbracket] [mirrored] [\c!right="27E6,\c!left="27E7]
+
+\definemathfence [mirrorednothing] [mirrored]
+
+%D A bonus:
+
+\pushoverloadmode
+
+\immutable\protected\def\Lparenthesis {\math_fenced_fenced_start{parenthesis}} \immutable\protected\def\Rparenthesis {\math_fenced_fenced_stop {parenthesis}}
+\immutable\protected\def\Lbracket {\math_fenced_fenced_start{bracket}} \immutable\protected\def\Rbracket {\math_fenced_fenced_stop {bracket}}
+\immutable\protected\def\Lbrace {\math_fenced_fenced_start{brace}} \immutable\protected\def\Rbrace {\math_fenced_fenced_stop {brace}}
+\immutable\protected\def\Langle {\math_fenced_fenced_start{angle}} \immutable\protected\def\Rangle {\math_fenced_fenced_stop {angle}}
+\immutable\protected\def\Ldoubleangle {\math_fenced_fenced_start{doubleangle}} \immutable\protected\def\Rdoubleangle {\math_fenced_fenced_stop {doubleangle}}
+\immutable\protected\def\Lbar {\math_fenced_fenced_start{bar}} \immutable\protected\def\Rbar {\math_fenced_fenced_stop {bar}}
+\immutable\protected\def\Ldoublebar {\math_fenced_fenced_start{doublebar}} \immutable\protected\def\Rdoublebar {\math_fenced_fenced_stop {doublebar}}
+\immutable\protected\def\Ltriplebar {\math_fenced_fenced_start{triplebar}} \immutable\protected\def\Rtriplebar {\math_fenced_fenced_stop {triplebar}}
+\immutable\protected\def\Lsolidus {\math_fenced_fenced_start{solidus}} \immutable\protected\def\Rsolidus {\math_fenced_fenced_stop {solidus}}
+\immutable\protected\def\Lfloor {\math_fenced_fenced_start{floor}} \immutable\protected\def\Rfloor {\math_fenced_fenced_stop {floor}}
+\immutable\protected\def\Lceiling {\math_fenced_fenced_start{ceiling}} \immutable\protected\def\Rceiling {\math_fenced_fenced_stop {ceiling}}
+\immutable\protected\def\Lmoustache {\math_fenced_fenced_start{moustache}} \immutable\protected\def\Rmoustache {\math_fenced_fenced_stop {moustache}}
+\immutable\protected\def\Luppercorner {\math_fenced_fenced_start{uppercorner}} \immutable\protected\def\Ruppercorner {\math_fenced_fenced_stop {uppercorner}}
+\immutable\protected\def\Llowercorner {\math_fenced_fenced_start{lowercorner}} \immutable\protected\def\Rlowercorner {\math_fenced_fenced_stop {lowercorner}}
+\immutable\protected\def\Lgroup {\math_fenced_fenced_start{group}} \immutable\protected\def\Rgroup {\math_fenced_fenced_stop {group}}
+\immutable\protected\def\Lopenbracket {\math_fenced_fenced_start{openbracket}} \immutable\protected\def\Ropenbracket {\math_fenced_fenced_stop {openbracket}}
+\immutable\protected\def\Lnothing {\math_fenced_fenced_start{nothing}} \immutable\protected\def\Rnothing {\math_fenced_fenced_stop {nothing}}
+
+\immutable\protected\def\Lparenthesismirrored {\math_fenced_fenced_stop {mirroredparenthesis}} \immutable\protected\def\Rparenthesismirrored {\math_fenced_fenced_start{mirroredparenthesis}}
+\immutable\protected\def\Lbracketmirrored {\math_fenced_fenced_stop {mirroredbracket}} \immutable\protected\def\Rbracketmirrored {\math_fenced_fenced_start{mirroredbracket}}
+\immutable\protected\def\Lbracemirrored {\math_fenced_fenced_stop {mirroredbrace}} \immutable\protected\def\Rbracemirrored {\math_fenced_fenced_start{mirroredbrace}}
+\immutable\protected\def\Langlemirrored {\math_fenced_fenced_stop {mirroredangle}} \immutable\protected\def\Ranglemirrored {\math_fenced_fenced_start{mirroredangle}}
+\immutable\protected\def\Ldoubleanglemirrored {\math_fenced_fenced_stop {mirroreddoubleangle}} \immutable\protected\def\Rdoubleanglemirrored {\math_fenced_fenced_start{mirroreddoubleangle}}
+\immutable\protected\def\Lbarmirrored {\math_fenced_fenced_stop {mirroredbar}} \immutable\protected\def\Rbarmirrored {\math_fenced_fenced_start{mirroredbar}}
+\immutable\protected\def\Ldoublebarmirrored {\math_fenced_fenced_stop {mirroreddoublebar}} \immutable\protected\def\Rdoublebarmirrored {\math_fenced_fenced_start{mirroreddoublebar}}
+\immutable\protected\def\Ltriplebarmirrored {\math_fenced_fenced_stop {mirroredtriplebar}} \immutable\protected\def\Rtriplebarmirrored {\math_fenced_fenced_start{mirroredtriplebar}}
+\immutable\protected\def\Lsolidusmirrored {\math_fenced_fenced_stop {mirroredsolidus}} \immutable\protected\def\Rsolidusmirrored {\math_fenced_fenced_start{mirroredsolidus}}
+\immutable\protected\def\Lfloormirrored {\math_fenced_fenced_stop {mirroredfloor}} \immutable\protected\def\Rfloormirrored {\math_fenced_fenced_start{mirroredfloor}}
+\immutable\protected\def\Lceilingmirrored {\math_fenced_fenced_stop {mirroredceiling}} \immutable\protected\def\Rceilingmirrored {\math_fenced_fenced_start{mirroredceiling}}
+\immutable\protected\def\Lmoustachemirrored {\math_fenced_fenced_stop {mirroredmoustache}} \immutable\protected\def\Rmoustachemirrored {\math_fenced_fenced_start{mirroredmoustache}}
+\immutable\protected\def\Luppercornermirrored {\math_fenced_fenced_stop {mirroreduppercorner}} \immutable\protected\def\Ruppercornermirrored {\math_fenced_fenced_start{mirroreduppercorner}}
+\immutable\protected\def\Llowercornermirrored {\math_fenced_fenced_stop {mirroredlowercorner}} \immutable\protected\def\Rlowercornermirrored {\math_fenced_fenced_start{mirroredlowercorner}}
+\immutable\protected\def\Lgroupmirrored {\math_fenced_fenced_stop {mirroredgroup}} \immutable\protected\def\Rgroupmirrored {\math_fenced_fenced_start{mirroredgroup}}
+\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]
+
+\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}}
+\immutable\protected\def\Lrointerval {\math_fenced_fenced_start{rightopeninterval}}
+
+\immutable\protected\def\Rinterval {\math_fenced_fenced_stop {interval}}
+\immutable\protected\def\Rointerval {\math_fenced_fenced_stop {openinterval}}
+\immutable\protected\def\Rlointerval {\math_fenced_fenced_stop {leftopeninterval}}
+\immutable\protected\def\Rrointerval {\math_fenced_fenced_stop {rightopeninterval}}
+
+% \startformula
+% \left{ \frac{1}{a} \right}
+% \left[ \frac{1}{b} \right]
+% \left( \frac{1}{c} \right)
+% \left< \frac{1}{d} \right>
+% \left| \frac{1}{e} \right|
+% \stopformula
+
+\popoverloadmode
+
+\installcorenamespace{mathleft}
+\installcorenamespace{mathright}
+\installcorenamespace{mathmiddle}
+
+\pushoverloadmode
+
+\protected\def\left {\afterassignment\math_left \let\nexttoken}
+\protected\def\right {\afterassignment\math_right \let\nexttoken}
+\protected\def\middle{\afterassignment\math_middle\let\nexttoken}
+
+\popoverloadmode
+
+\let\leftorright\relax
+
+\newconditional\c_math_fenced_done
+\newconditional\c_math_fenced_unknown \settrue\c_math_fenced_unknown
+
+\permanent\protected\def\installmathfencepair#1#2#3#4%
+ {\letcsname\??mathleft \normalmeaning#1\endcsname#2%
+ \letcsname\??mathright\normalmeaning#3\endcsname#4}
+
+\def\math_unknown_left {\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalleft \nexttoken\fi}
+\def\math_unknown_right {\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalright \nexttoken\fi}
+\def\math_unknown_middle{\setfalse\c_math_fenced_done\ifconditional\c_math_fenced_unknown\normalmiddle\nexttoken\fi}
+
+\letvalue{\??mathleft \s!unknown}\math_unknown_left
+\letvalue{\??mathright \s!unknown}\math_unknown_right
+\letvalue{\??mathmiddle\s!unknown}\math_unknown_middle
+
+\def\math_left
+ {\settrue\c_math_fenced_done
+ \ifcsname\??mathleft\normalmeaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_left
+ \fi}
+
+\def\math_right
+ {\settrue\c_math_fenced_done
+ \ifcsname\??mathright\normalmeaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_right
+ \fi}
+
+\def\math_middle
+ {\settrue\c_math_fenced_done
+ \ifcsname\??mathmiddle\normalmeaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_middle
+ \fi}
+
+\permanent\protected\def\lfence#1%
+ {\settrue\c_math_fenced_done
+ \let\nexttoken#1%
+ \ifcsname\??mathleft\normalmeaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_left
+ \fi}
+
+\permanent\protected\def\rfence#1%
+ {\settrue\c_math_fenced_done
+ \let\nexttoken#1%
+ \ifcsname\??mathright\normalmeaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_right
+ \fi}
+
+\permanent\protected\def\mfence#1%
+ {\settrue\c_math_fenced_done
+ \let\nexttoken#1%
+ \ifcsname\??mathmiddle\normalmeaning\nexttoken\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\math_unknown_middle
+ \fi}
+
+\normalexpanded{\installmathfencepair {|\detokenize {|}} \Ldoublebar {|\detokenize {|}} \Rdoublebar}
+\normalexpanded{\installmathfencepair {|\detokenize{||}} \Ltriplebar {|\detokenize{||}} \Rtriplebar}
+
+\installmathfencepair \bgroup \Lbrace \egroup \Rbrace
+\installmathfencepair \egroup \Rbracemirrored \bgroup \Lbracemirrored
+
+\installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace % as we escape in mp textexts
+
+\installmathfencepair . \Lnothing . \Rnothing
+\installmathfencepair . \Rnothingmirrored . \Lnothingmirrored
+
+\installmathfencepair [ \Lbracket ] \Rbracket
+\installmathfencepair ] \Rbracketmirrored [ \Lbracketmirrored
+
+\installmathfencepair ( \Lparenthesis ) \Rparenthesis
+\installmathfencepair ) \Rparenthesismirrored ( \Lparenthesismirrored
+
+\installmathfencepair < \Langle > \Rangle
+\installmathfencepair > \Ranglemirrored < \Langlemirrored
+
+\installmathfencepair / \Lsolidus / \Rsolidus
+%installmathfencepair / \Rsolidusmirrored / \Lsolidusmirrored
+
+\installmathfencepair | \Lbar | \Rbar
+%installmathfencepair | \Rbarmirrored | \Lbarmirrored
+
+\installmathfencepair ⌊ \Lfloor ⌋ \Rfloor
+\installmathfencepair ⌋ \Rfloormirrored ⌊ \Lfloormirrored
+\installmathfencepair ⌈ \Lceiling ⌉ \Rceiling
+\installmathfencepair ⌉ \Rceilingmirrored ⌈ \Lceilingmirrored
+
+\installmathfencepair ⟨ \Langle ⟩ \Rangle
+\installmathfencepair ⟩ \Ranglemirrored ⟨ \Langlemirrored
+
+\installmathfencepair ⟪ \Ldoubleangle ⟫ \Rdoubleangle
+\installmathfencepair ⟫ \Rdoubleanglemirrored ⟪ \Ldoubleanglemirrored
+
+\installmathfencepair ‖ \Ldoublebar ‖ \Rdoublebar
+%installmathfencepair ‖ \Rdoublebarmirrored ‖ \Ldoublebarmirrored
+
+\installmathfencepair ⦀ \Ltriplebar ⦀ \Rtriplebar
+%installmathfencepair ⦀ \Rtriplebarmirrored ⦀ \Ltriplebarmirrored
+
+% \installmathfencepair { \Lbrace } \Rbrace
+% \installmathfencepair } \Rbracemirrored { \Lbracemirrored
+
+\installmathfencepair ⦗ \Linterval ⦘ \Rinterval
+
+\appendtoks
+ \ignorediscretionaries % so $\mtext{a|b}$ works, this is ok because it's an \hbox
+\to \everymathematics
+
+% We unofficial support some synonyms as we need them for some fuzzy web related math.
+
+% The names in char-def.lua (historic mess):
+
+\pushoverloadmode
+
+\aliased\let\lbrack \lbracket
+\aliased\let\rbrack \rbracket
+\aliased\let\lceiling \lceil
+\aliased\let\rceiling \rceil
+\aliased\let\lparenthesis\lparent
+\aliased\let\rparenthesis\rparent
+\aliased\let\lparen \lparent
+\aliased\let\rparen \rparent
+
+% Just defined:
+
+\aliased\let\Lceil \Lceiling
+\aliased\let\Rceil \Rceiling
+\aliased\let\Lparent\Lparenthesis
+\aliased\let\Rparent\Rparenthesis
+\aliased\let\Lparen \Lparenthesis
+\aliased\let\Rparen \Rparenthesis
+
+\installmathfencepair \lbrace \Lbrace \rbrace \Rbrace
+\installmathfencepair \lbracket \Lbracket \rbracket \Rbracket
+\installmathfencepair \lbrack \Lbracket \rbracket \Rbracket
+\installmathfencepair \lparenthesis \Lparenthesis \rparenthesis \Rparenthesis
+\installmathfencepair \lparent \Lparenthesis \rparent \Rparenthesis
+\installmathfencepair \lparen \Lparenthesis \rparen \Rparenthesis
+\installmathfencepair \langle \Langle \rangle \Rangle
+\installmathfencepair \llangle \Ldoubleangle \rrangle \Rdoubleangle
+%installmathfencepair \lbar \Lbar \rbar \Rbar
+\installmathfencepair \lVert \Ldoublebar \rVert \Rdoublebar
+\installmathfencepair \vert \Lbar \vert \Rbar
+\installmathfencepair \solidus \Lsolidus \solidus \Rsolidus
+\installmathfencepair \lfloor \Lfloor \rfloor \Rfloor
+\installmathfencepair \lceiling \Lceiling \rceiling \Rceiling
+\installmathfencepair \lceil \Lceiling \rceil \Rceiling
+
+\installmathfencepair \ulcorner \Luppercorner \urcorner \Ruppercorner
+\installmathfencepair \llcorner \Llowercorner \lrcorner \Rlowercorner
+\installmathfencepair \lmoustache \Lmoustache \rmoustache \Rmoustache
+\installmathfencepair \llbracket \Lopenbracket \rrbracket \Ropenbracket
+\installmathfencepair \lgroup \Lgroup \rgroup \Rgroup
+
+\installmathfencepair \linterval \Linterval \rinterval \Rinterval
+%installmathfencepair \linterv \Linterval \rinterv \Rinterval
+\installmathfencepair \lointerval \Linterval \rointerval \Rinterval
+\installmathfencepair \llointerval \Llointerval \rlointerval \Rlointerval
+\installmathfencepair \lrointerval \Lrointerval \rrointerval \Rrointerval
+
+\aliased\let\textlbar\lbar \aliased\let\mathlbar\Lbar
+\aliased\let\textrbar\lbar \aliased\let\mathrbar\Rbar
+
+\immutable\protected\def\lbar{\mathortext\mathlbar\textlbar}
+\immutable\protected\def\rbar{\mathortext\mathrbar\textrbar}
+
+% \setupmathfences[color=darkgreen]
+
+\permanent\protected\def\{{\mathortext\lbrace \letterleftbrace } % or maybe a chardef
+\permanent\protected\def\}{\mathortext\rbrace \letterrightbrace } % or maybe a chardef
+\permanent\protected\def\[{\mathortext\lbracket \letterleftbracket } % or maybe a chardef
+\permanent\protected\def\]{\mathortext\rbracket \letterrightbracket } % or maybe a chardef
+\permanent\protected\def\({\mathortext\lparenthesis\letterleftparenthesis } % or maybe a chardef
+\permanent\protected\def\){\mathortext\rparenthesis\letterrightparenthesis} % or maybe a chardef
+\permanent\protected\def\|{\mathortext\vert \letterbar } % or maybe a chardef
+%permanent\protected\def\/{\mathortext\solidus \letterslash } % or maybe a chardef
+
+\installmathfencepair \{ \Lbrace \} \Rbrace
+\installmathfencepair \[ \Lbracket \] \Rbracket
+\installmathfencepair \( \Lparenthesis \) \Rparenthesis
+\installmathfencepair \< \Langle \> \Rangle
+\installmathfencepair \| \Lbar \| \Rbar
+
+\popoverloadmode
+
+%D As we have overloaded \type {\left} and \type {\right} we also need a more
+%D clever version of the following:
+
+% methods:
+%
+% 1: none
+% 2: lua
+% 3: tex
+
+% variants:
+%
+% 1: step 1
+% 2: step 2
+% 3: htdp * 1.33^n
+% 4: size * 1.33^n
+
+\setnewconstant\bigmathdelimitermethod \plustwo % \plusone
+\setnewconstant\bigmathdelimitervariant\plusthree
+
+\appendtoks
+ \bigmathdelimitermethod \mathfenceparameter\c!method\relax
+ \bigmathdelimitervariant\mathfenceparameter\c!alternative\relax
+\to \everysetupmathfence
+
+\setupmathfence[\c!method=1,\c!alternative=2]
+
+% \protected\def\plainbigdelimiters % traditional method
+% {\bigmathdelimitermethod\plustwo}
+%
+% \plainbigdelimiters % is default for the moment but not so nice
+
+\installcorenamespace{mathbig}
+
+\setvalue{\??mathbig1}{0.85}
+\setvalue{\??mathbig2}{1.15}
+\setvalue{\??mathbig3}{1.45}
+\setvalue{\??mathbig4}{1.75}
+
+\permanent\protected\def\choosemathbig#1#2% so we accept \big{||} as well
+ {{\naturalhbox\bgroup
+ \startimath
+ \ifcase\bigmathdelimitermethod
+ \math_fenced_step#2\relax
+ \or
+ \math_fenced_force_size\bigmathdelimitervariant{#1}\relax
+ \math_fenced_step#2\relax
+ \else
+ \math_fenced_step#2{\vpack to\csname\??mathbig#1\endcsname\bodyfontsize{}}%
+ \fi
+ \nulldelimiterspace\zeropoint\relax
+ \mathsurround\zeropoint
+ \stopimath
+ \egroup}}
+
+% needs testing:
+%
+% \protected\def\choosemathbig#1#2% so we accept \big{||} as well
+% {{\naturalhbox\bgroup
+% \startimath
+% \ifcase\bigmathdelimitermethod
+% \Uvextensible#2\relax
+% \or
+% \math_fenced_force_size\bigmathdelimitervariant{#1}\relax
+% \Uvextensible#2\relax
+% \else
+% \scratchdimen.5\dimexpr\csname\??mathbig\number#1\endcsname\bodyfontsize+1.1\exheight\relax
+% \Uvextensible\s!axis \s!depth \scratchdimen \s!height \scratchdimen #2\relax
+% \fi
+% \nulldelimiterspace\zeropoint\relax
+% \mathsurround\zeropoint
+% \stopimath
+% \egroup}}
+
+\def\math_fenced_step#1#2%
+ {\setfalse\c_math_fenced_unknown
+ \setfalse\c_math_fenced_done
+ \left#1\relax
+ \ifconditional\c_math_fenced_done
+ #2%
+ \right.\relax
+ \else
+ \left.\relax
+ #2%
+ \setfalse\c_math_fenced_done
+ \right#1\relax
+ \ifconditional\c_math_fenced_done
+ \else
+ \right.\relax
+ \fi
+ \fi}
+
+\permanent\protected\def\mathdelimiterstep#1#2%
+ {\begingroup
+ \math_fenced_force_size\plusone{#1}%
+ \math_fenced_step#2\relax
+ \endgroup}
+
+\definemathcommand [big] {\choosemathbig1}
+\definemathcommand [Big] {\choosemathbig2}
+\definemathcommand [bigg] {\choosemathbig3}
+\definemathcommand [Bigg] {\choosemathbig4}
+
+\definemathcommand [bigl] [open] [one] {\big}
+\definemathcommand [bigm] [rel] [one] {\big}
+\definemathcommand [bigr] [close] [one] {\big}
+\definemathcommand [Bigl] [open] [one] {\Big}
+\definemathcommand [Bigm] [rel] [one] {\Big}
+\definemathcommand [Bigr] [close] [one] {\Big}
+\definemathcommand [biggl] [open] [one] {\bigg}
+\definemathcommand [biggm] [rel] [one] {\bigg}
+\definemathcommand [biggr] [close] [one] {\bigg}
+\definemathcommand [Biggl] [open] [one] {\Bigg}
+\definemathcommand [Biggm] [rel] [one] {\Bigg}
+\definemathcommand [Biggr] [close] [one] {\Bigg}
+
+% \definemathfence [integral] [\c!left="222B]
+%
+% \protected\def\Lintegral {\math_fenced_fenced_start{integral}}
+% \protected\def\Rintegral {\math_fenced_fenced_stop {integral}}
+%
+% \installmathfencepair \lintegral \Lintegral \rintegral \Rintegral
+%
+% \left\lintegral
+% \vrule height 3cm depth 3cm
+% \right\rintegral
+
+%definemathfence [fancybracket] [bracket] [command=yes,color=red]
+
+% experimental accents:
+%
+% \definemathoverextensible [top] [hoed] ["FE302]
+% \definemathoverextensible [top] [slang] ["FE303]
+
+%D The nested fences recovery code is needed for mathml and the original
+%D code can still be found in the mkiv file.
+
+\definesystemattribute[mathautofence][public]
+
+\let\math_fences_normal_left \left
+\let\math_fences_normal_right \right
+\let\math_fences_normal_middle\middle
+\let\math_fences_normal_both \leftorright
+
+\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}
+\protected\def\math_fences_auto_middle#1{\c_attr_mathautofence\plusthree#1\c_attr_mathautofence\attributeunsetvalue}
+\protected\def\math_fences_auto_both #1{\c_attr_mathautofence\plusfour #1\c_attr_mathautofence\attributeunsetvalue}
+
+\permanent\let\autofenceopen \math_fences_auto_left % for testing
+\permanent\let\autofenceclose \math_fences_auto_right % for testing
+\permanent\let\autofenceleft \math_fences_auto_left % for testing
+\permanent\let\autofenceright \math_fences_auto_right % for testing
+\permanent\let\autofencemiddle\math_fences_auto_middle % for testing
+\permanent\let\autofenceboth \math_fences_auto_both % for testing
+
+% fences are used not that often (i.e. no performance issue) so we can use a state
+% instead of \let ... also some state variable can come in handy in the future
+
+\newconditional\c_math_fences_auto
+
+\permanent\protected\def\enableautofences
+ {\clf_enableautofences
+ \glet\clf_enableautofences\relax % onlyonce anyway
+ \enforced\permanent\protected\gdef\enableautofences{\settrue\c_math_fences_auto}%
+ \enableautofences}
+
+\permanent\protected\def\disableautofences
+ {\setfalse\c_math_fences_auto}
+
+\protected\def\math_fences_used_left
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_left
+ \else
+ \expandafter\math_fences_normal_left
+ \fi}
+
+\protected\def\math_fences_used_right
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_right
+ \else
+ \expandafter\math_fences_normal_right
+ \fi}
+
+\protected\def\math_fences_used_middle
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_middle
+ \else
+ \expandafter\math_fences_normal_middle
+ \fi}
+
+\protected\def\math_fences_used_both
+ {\ifconditional\c_math_fences_auto
+ \expandafter\math_fences_auto_both
+ \else
+ \expandafter\math_fences_normal_both
+ \fi}
+
+\permanent\let\left \math_fences_used_left
+\permanent\let\right \math_fences_used_right
+\permanent\let\middle \math_fences_used_middle
+\permanent\let\leftorright\math_fences_used_both
+
+% wrappers
+
+\permanent\protected\def\startcheckedfences
+ {\begingroup
+ \enableautofences}
+
+\permanent\protected\def\stopcheckedfences
+ {\endgroup}
+
+% \appendtoks
+ % maybe: safeguard against overloading
+ %
+ % \let\left \math_fences_used_left
+ % \let\right \math_fences_used_right
+ % \let\middle \math_fences_used_middle
+ % \let\leftorright\math_fences_used_both
+% \to \everymathematics
+
+\appendtoks
+ \ifempty\currentmathfence
+ \doifelse{\mathfenceparameter\c!state}\v!auto\enableautofences\disableautofences
+ \fi
+\to \everysetupmathfence
+
+\newconstant\c_math_fences_delimiters_mode \c_math_fences_delimiters_mode"16 % \numexpr"02+"04+"10\relax
+
+%permanent\protected\def\enableautofencemode {\mathdelimitersmode\plussix} % the shift (1) is too fragile
+\permanent\protected\def\enableautofencemode {\mathdelimitersmode\c_math_fences_delimiters_mode}
+\permanent\protected\def\disableautofencemode{\mathdelimitersmode\zerocount}
+
+\appendtoks
+ \ifempty\currentmathfence
+ \doifelse{\mathfenceparameter\c!method}\v!auto\enableautofencemode\disableautofencemode
+ \fi
+\to \everysetupmathfence
+
+% some day default: \setupmathfences[\c!state=\v!auto]
+
+%D The next characters were used for constructing nicer extensibles but
+%D nowadays we have real characters.
+
+\immutable\Umathchardef\braceld\zerocount \defaultmathfamily "FF07A
+\immutable\Umathchardef\bracerd\zerocount \defaultmathfamily "FF07B
+\immutable\Umathchardef\bracelu\zerocount \defaultmathfamily "FF07C
+\immutable\Umathchardef\braceru\zerocount \defaultmathfamily "FF07D
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-for.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-for.mkxl
new file mode 100644
index 00000000000..e6ea402de99
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-for.mkxl
@@ -0,0 +1,47 @@
+%D \module
+%D [ file=strc-mat,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Math Numbering,
+%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 Structure Macros / Math Formulas}
+
+%D This module only provides the code for defining formulas and
+%D fetching parameters. The action takes place later.
+
+\unprotect
+
+%D \macros
+%D {setupformulas,setupsubformulas,setupformulaframed}
+
+\installcorenamespace{formula}
+\installcorenamespace{subformula}
+\installcorenamespace{formulaframed}
+\installcorenamespace{formulaoption}
+
+\installcommandhandler \??formula {formula} \??formula
+\installcommandhandler \??subformula {subformula} \??subformula % maybe just setuphandler (no childs used yet)
+\installframedcommandhandler \??formulaframed {formulaframed} \??formulaframed
+
+\aliased\let\setupformulas \setupformula
+\aliased\let\setupsubformulas\setupsubformula
+
+\appendtoks
+ \normalexpanded{\defineformulaframed[\currentformula][\currentformulaparent]}%
+\to \everydefineformula
+
+\def\strc_formulas_option#1%
+ {\ifcsname\??formulaoption#1\endcsname
+ \lastnamedcs
+ \else
+ \font_basics_switchtobodyfont{#1}% for old time sake, might go away, only pt so maybe dimension and small test
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl
new file mode 100644
index 00000000000..8295195b5d6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-frc.mkxl
@@ -0,0 +1,833 @@
+%D \module
+%D [ file=math-frc,
+%D version=2013.04.06, % 2007.07.19,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Fractions,
+%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 Math Macros / Fractions}
+
+\unprotect
+
+%D I need to check it all again as there was a bug in luatex with dimensions that could
+%D resulted in side effects that made me mess with spacing.
+
+\permanent\protected\def\topstrut{\vrule\s!width\zeropoint\s!height\strutht\s!depth\zeropoint\relax}
+\permanent\protected\def\botstrut{\vrule\s!width\zeropoint\s!height\zeropoint\s!depth\strutdp\relax}
+
+\permanent\protected\def\mathtopstrut{\setbox\scratchbox\mathstylehbox{(}\vrule\s!width\zeropoint\s!height\ht\scratchbox\s!depth\zeropoint\relax}
+\permanent\protected\def\mathbotstrut{\setbox\scratchbox\mathstylehbox{(}\vrule\s!width\zeropoint\s!height\zeropoint\s!depth\dp\scratchbox\relax}
+
+%D This module is reimplemented in \MKIV\ style.
+
+\registerctxluafile{math-frc}{}
+
+%D \macros
+%D {frac, xfrac, xxfrac}
+%D
+%D This is another one Tobias asked for. It replaces the primitive \type
+%D {\over}. We also take the opportunity to handle math style restoring,
+%D which makes sure units and chemicals come out ok. The \type {\frac}
+%D macro kind of replaces the awkward \type {\over} primitive. Say that
+%D we have the following formulas:
+%D
+%D \startbuffer[sample]
+%D test $\frac {1}{2}$ test $$1 + \frac {1}{2} = 1.5$$
+%D test $\xfrac {1}{2}$ test $$1 + \xfrac {1}{2} = 1.5$$
+%D test $\xxfrac{1}{2}$ test $$1 + \xxfrac{1}{2} = 1.5$$
+%D \stopbuffer
+%D
+%D \typebuffer[sample]
+%D
+%D With the most straightforward definitions, we get:
+%D
+%D \startbuffer[code]
+%D \def\dofrac#1#2#3{\relax\mathematics{{{#1{#2}}\over{#1{#3}}}}}
+%D
+%D \def\frac {\dofrac\mathstyle}
+%D \def\xfrac {\dofrac\scriptstyle}
+%D \def\xxfrac{\dofrac\scriptscriptstyle}
+%D \stopbuffer
+%D
+%D \typebuffer[code] \getbuffer[code,sample]
+%D
+%D Since this does not work well, we can try:
+%D
+%D \startbuffer[code]
+%D \def\xfrac #1#2{\hbox{$\dofrac\scriptstyle {#1}{#2}$}}
+%D \def\xxfrac#1#2{\hbox{$\dofrac\scriptscriptstyle{#1}{#2}$}}
+%D \stopbuffer
+%D
+%D \typebuffer[code] \getbuffer[code,sample]
+%D
+%D This for sure looks better than:
+%D
+%D \startbuffer[code]
+%D \def\xfrac #1#2{{\scriptstyle \dofrac\relax{#1}{#2}}}
+%D \def\xxfrac#1#2{{\scriptscriptstyle\dofrac\relax{#1}{#2}}}
+%D \stopbuffer
+%D
+%D \typebuffer[code] \getbuffer[code,sample]
+%D
+%D So we stick to the next definitions (watch the local overloading of
+%D \type {\xfrac}).
+%D
+%D In the meantime, in \LUATEX, we have better control over styles so the
+%D following macros are different from the \MKII\ ones.
+
+% obsolete, is now c!mathstyle
+%
+% 0=auto, 1=displaystyle, 2=textstyle, 3=scriptstyle, 4=scriptscriptstyle, 5=mathstyle
+%
+% $\mathfracmode0 \frac{1}{2}$
+% $\mathfracmode1 \frac{1}{2}$
+% $\mathfracmode2 \frac{1}{2}$
+% $\mathfracmode3 \frac{1}{2}$
+% $\mathfracmode4 \frac{1}{2}$
+% $\mathfracmode5 \frac{1}{2}$
+%
+% we keep the constant for a while
+
+\setnewconstant\mathfracmode\zerocount
+
+\installcorenamespace{mathfractions}
+\installcorenamespace{mathfractionstyle}
+\installcorenamespace{mathfractionalternative}
+
+\installcommandhandler \??mathfractions {mathfraction} \??mathfractions
+
+\aliased\let\setupmathfractions\setupmathfraction
+
+% color only applies to rule, use regular color for rest
+
+\setupmathfractions
+ [\c!mathstyle=,
+ \c!alternative=\v!inner,
+ \c!margin=\zeropoint,
+ \c!rulethickness=.25\exheight,
+ \c!left=0x2E,
+ \c!right=0x2E,
+ \c!strut=\v!yes,
+ \c!topdistance=,
+ \c!bottomdistance=,
+ \c!rule=\v!auto]
+
+\appendtoks
+ \instance\frozen\protected\edefcsname\currentmathfraction\endcsname{\math_frac{\currentmathfraction}}%
+\to \everydefinemathfraction
+
+% Sometimes users want control over the distances:
+
+\let\math_fraction_set_distance\relax
+
+\appendtoks
+ \math_fraction_set_distance
+\to \everymathematics
+
+% why only displaystyle .. a bit weak
+
+\protected\def\math_fraction_set_distance_top
+ {\Umathfractionnumup \displaystyle\m_math_fraction_distance_top
+ \relax}
+
+\protected\def\math_fraction_set_distance_bot
+ {\Umathfractiondenomdown\displaystyle\m_math_fraction_distance_bot
+ \relax}
+
+\protected\def\math_fraction_set_distance_all
+ {\Umathfractionnumup \displaystyle\m_math_fraction_distance_top
+ \Umathfractiondenomdown\displaystyle\m_math_fraction_distance_bot
+ \relax}
+
+\appendtoks
+ \ifempty\currentmathfraction
+ \edef\m_math_fraction_distance_top{\mathfractionparameter\c!topdistance}%
+ \edef\m_math_fraction_distance_bot{\mathfractionparameter\c!bottomdistance}%
+ \ifempty\m_math_fraction_distance_top
+ \ifempty\m_math_fraction_distance_bot
+ \let\math_fraction_set_distance\relax
+ \else
+ \let\math_fraction_set_distance\math_fraction_set_distance_bot
+ \fi
+ \else
+ \ifempty\m_math_fraction_distance_bot
+ \let\math_fraction_set_distance\math_fraction_set_distance_top
+ \else
+ \let\math_fraction_set_distance\math_fraction_set_distance_all
+ \fi
+ \fi
+ \fi
+\to \everysetupmathfraction
+
+% So far for control.
+
+\installcorenamespace{mathfractionstrut}
+
+\def\math_frac_no_strut
+ {\enforced\let\m_fractions_strut_top\relax
+ \enforced\let\m_fractions_strut_bot\relax}
+
+\setvalue{\??mathfractionstrut\v!yes}%
+ {\enforced\let\m_fractions_strut_top\mathstrut
+ \enforced\let\m_fractions_strut_bot\mathstrut}
+
+\setvalue{\??mathfractionstrut\v!math}%
+ {\enforced\let\m_fractions_strut_top\mathstrut
+ \enforced\let\m_fractions_strut_bot\mathstrut}
+
+\letvalue{\??mathfractionstrut\v!no}\math_frac_no_strut
+
+\setvalue{\??mathfractionstrut\v!tight}%
+ {\enforced\let\m_fractions_strut_top\mathbotstrut % indeed swapped name
+ \enforced\let\m_fractions_strut_bot\mathtopstrut} % indeed swapped name
+
+\math_frac_no_strut
+
+\newdimen\d_math_fraction_margin
+
+\protected\def\math_frac#1%
+ {\begingroup
+ \edef\currentmathfraction{#1}%
+ %
+ \edef\p_math_fraction_fences{\mathfractionparameter\c!fences}%
+ \ifempty\p_math_fraction_fences \else
+ \math_fenced_fenced_start\p_math_fraction_fences
+ \fi
+ %
+ \d_math_fraction_margin\mathfractionparameter\c!margin
+ %
+ \edef\p_math_fractions_color{\mathfractionparameter\c!color}%
+ %
+ \edef\p_math_fractions_strut{\mathfractionparameter\c!strut}%
+ \ifcsname\??mathfractionstrut\p_math_fractions_strut\endcsname
+ \lastnamedcs
+ \else
+ \math_frac_no_strut
+ \fi
+ %
+ \ifempty\p_math_fractions_color
+ \expandafter\math_frac_normal
+ \else
+ \expandafter\math_frac_colored
+ \fi}
+
+\protected\def\math_frac_wrapup
+ {\ifempty\p_math_fraction_fences \else
+ \math_fenced_fenced_stop\p_math_fraction_fences
+ \fi
+ \endgroup}
+
+\protected\def\math_frac_colored#1#2%
+ {\savecolor
+ \colo_helpers_activate\p_math_fractions_color
+ \math_frac_normal{\restorecolor#1}{\restorecolor#2}}
+
+\protected\def\math_frac_normal
+ {\expandnamespaceparameter\??mathfractionalternative\mathfractionparameter\c!alternative\v!inner}
+
+% we use utfchar anyway so we can as well do all at the lua end
+
+\def\math_frac_no_delim{0x2E}
+
+\def\math_frac_command
+ {\clf_mathfraction
+ {\mathfractionparameter\c!rule}%
+ \ifempty\p_math_fraction_fences
+ \mathfractionparameter\c!left \space
+ \mathfractionparameter\c!right\space
+ \else
+ \math_frac_no_delim\space
+ \math_frac_no_delim\space
+ \fi
+ \dimexpr\mathfractionparameter\c!rulethickness\relax
+ \relax}
+
+% Having a \withmarginornot{#1}{#2} makes not much sense nor do 4 tests or 4 redundant
+% kerns (longer node lists plus possible interference). A split in normal and margin
+% also makes testing easier. When left and right margins are needed we might merge the
+% variants again. After all, these are not real installers.
+
+% the denominator is in cramped!
+
+\setvalue{\??mathfractionalternative\v!inner}%
+ {\ifcase\d_math_fraction_margin
+ \expandafter\math_fraction_inner_normal
+ \else
+ \expandafter\math_fraction_inner_margin
+ \fi}
+
+\setvalue{\??mathfractionalternative\v!outer}%
+ {\ifcase\d_math_fraction_margin
+ \expandafter\math_fraction_outer_normal
+ \else
+ \expandafter\math_fraction_outer_margin
+ \fi}
+
+\setvalue{\??mathfractionalternative\v!both}%
+ {\ifcase\d_math_fraction_margin
+ \expandafter\math_fraction_both_normal
+ \else
+ \expandafter\math_fraction_both_margin
+ \fi}
+
+% todo: store first state and reuse second time
+
+% \def\math_fraction_inner_normal#1#2%
+% {\Ustack{%
+% {%
+% {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}}%
+% \math_frac_command
+% {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}}%
+% }%
+% }%
+% \math_frac_wrapup}
+%
+% \def\math_fraction_outer_normal#1#2%
+% {\Ustack{%
+% \usemathstyleparameter\mathfractionparameter
+% {%
+% {\m_fractions_strut_top#1}%
+% \math_frac_command
+% {\m_fractions_strut_bot#2}%
+% }%
+% }%
+% \math_frac_wrapup}
+%
+% \def\math_fraction_both_normal#1#2%
+% {\Ustack{%
+% \usemathstyleparameter\mathfractionparameter
+% {%
+% {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1}%
+% \math_frac_command
+% {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2}%
+% }%
+% }%
+% \math_frac_wrapup}
+%
+% \def\math_fraction_inner_margin#1#2%
+% {\Ustack{%
+% {%
+% {\kern\d_math_fraction_margin
+% \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}%
+% \kern\d_math_fraction_margin}%
+% \math_frac_command
+% {\kern\d_math_fraction_margin
+% \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}%
+% \kern\d_math_fraction_margin}%
+% }%
+% }%
+% \math_frac_wrapup}
+%
+% \def\math_fraction_outer_margin#1#2%
+% {\Ustack{%
+% \usemathstyleparameter\mathfractionparameter
+% {%
+% {\kern\d_math_fraction_margin
+% \m_fractions_strut_top#1%
+% \kern\d_math_fraction_margin}%
+% \math_frac_command
+% {\kern\d_math_fraction_margin
+% \m_fractions_strut_bot#2%
+% \kern\d_math_fraction_margin}%
+% }%
+% }%
+% \math_frac_wrapup}
+%
+% \def\math_fraction_both_margin#1#2%
+% {\Ustack{%
+% \usemathstyleparameter\mathfractionparameter
+% {%
+% {\kern\d_math_fraction_margin
+% \usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1%
+% \kern\d_math_fraction_margin}%
+% \math_frac_command
+% {\kern\d_math_fraction_margin
+% \usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2%
+% \kern\d_math_fraction_margin}%
+% }%
+% }%
+% \math_frac_wrapup}
+
+\def\math_frac_command_u
+ {\clf_umathfraction
+ {\mathfractionparameter\c!rule}%
+ \ifempty\p_math_fraction_fences
+ \mathfractionparameter\c!left \space
+ \mathfractionparameter\c!right\space
+ \else
+ \math_frac_no_delim\space
+ \math_frac_no_delim\space
+ \fi
+ \dimexpr\mathfractionparameter\c!rulethickness\relax
+ \relax}
+
+\def\math_fraction_inner_normal#1#2%
+ {\Ustack{% forces num style
+ \math_frac_command_u
+ {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}}%
+ {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}}%
+ }%
+ \math_frac_wrapup}
+
+\def\math_fraction_outer_normal#1#2%
+ {\Ustack{% forces num style
+ \usemathstyleparameter\mathfractionparameter
+ \math_frac_command_u
+ {\m_fractions_strut_top#1}%
+ {\m_fractions_strut_bot#2}%
+ }%
+ \math_frac_wrapup}
+
+\def\math_fraction_both_normal#1#2%
+ {\Ustack{% forces num style
+ \usemathstyleparameter\mathfractionparameter
+ \math_frac_command_u
+ {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1}%
+ {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2}%
+ }%
+ \math_frac_wrapup}
+
+\def\math_fraction_inner_margin#1#2%
+ {\Ustack{%
+ {%
+ \math_frac_command_u
+ {\kern\d_math_fraction_margin
+ \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}%
+ \kern\d_math_fraction_margin}%
+ {\kern\d_math_fraction_margin
+ \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}%
+ \kern\d_math_fraction_margin}%
+ }%
+ }%
+ \math_frac_wrapup}
+
+\def\math_fraction_outer_margin#1#2%
+ {\Ustack{%
+ \usemathstyleparameter\mathfractionparameter
+ {%
+ \math_frac_command_u
+ {\kern\d_math_fraction_margin
+ \m_fractions_strut_top#1%
+ \kern\d_math_fraction_margin}%
+ {\kern\d_math_fraction_margin
+ \m_fractions_strut_bot#2%
+ \kern\d_math_fraction_margin}%
+ }%
+ }%
+ \math_frac_wrapup}
+
+\def\math_fraction_both_margin#1#2%
+ {\Ustack{%
+ \usemathstyleparameter\mathfractionparameter
+ {%
+ \math_frac_command_u
+ {\kern\d_math_fraction_margin
+ \usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1%
+ \kern\d_math_fraction_margin}%
+ {\kern\d_math_fraction_margin
+ \usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2%
+ \kern\d_math_fraction_margin}%
+ }%
+ }%
+ \math_frac_wrapup}
+
+\definemathfraction[xfrac] [\c!alternative=\v!inner,\c!mathstyle=\s!script]
+\definemathfraction[xxfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
+
+\aliased\let\normalxfrac\xfrac
+
+\permanent\protected\def\xfrac#1#2{\normalxfrac{\enforced\let\xfrac\xxfrac#1}{\enforced\let\xfrac\xxfrac#2}}
+
+%D Spacing (sensitive for definition of \triggermathstyle:
+
+% \ifcase\contextlmtxmode
+
+\permanent\protected\def\nomathfractiongaps {\normalexpanded{\math_no_fraction_gaps \mathstyletrigger\mathstyle}} % maybe collect settings
+\permanent\protected\def\overlaymathfractiongaps{\normalexpanded{\math_overlay_fraction_gaps\mathstyletrigger\mathstyle}} % maybe collect settings
+
+\protected\def\math_no_fraction_gaps#1%
+ {\Umathfractionnumup #1\zeropoint
+ \Umathfractiondenomdown#1\zeropoint}
+
+\protected\def\math_overlay_fraction_gaps#1%
+ {\Umathfractionnumup #1\zeropoint
+ \Umathfractionnumvgap #1\zeropoint
+ %Umathfractionrule #1\zeropoint
+ \Umathfractiondenomvgap#1\zeropoint
+ \Umathfractiondenomdown#1\zeropoint}
+
+% \else
+
+% \protected\def\math_no_fraction_gaps
+% {\Umathfractionnumup \mathstyle\zeropoint
+% \Umathfractiondenomdown\mathstyle\zeropoint}
+%
+% \protected\def\math_overlay_fraction_gaps
+% {\Umathfractionnumup \mathstyle\zeropoint
+% \Umathfractionnumvgap \mathstyle\zeropoint
+% %Umathfractionrule \mathstyle\zeropoint
+% \Umathfractiondenomvgap\mathstyle\zeropoint
+% \Umathfractiondenomdown\mathstyle\zeropoint}
+
+% \fi
+
+\installcorenamespace{mathfractiondistance}
+
+\letvalue{\??mathfractiondistance\v!none }\nomathfractiongaps
+\letvalue{\??mathfractiondistance\v!no }\nomathfractiongaps
+\letvalue{\??mathfractiondistance\v!overlay}\overlaymathfractiongaps
+
+\setupmathfractions
+ [\c!distance=\v!none]
+
+\appendtoks
+ \edef\p_distance{\rootmathfractionparameter\c!distance}%
+ \ifempty\p_distance\else
+ \ifcsname\??mathfractiondistance\p_distance\endcsname
+ \lastnamedcs
+ \fi
+ \fi
+\to \everymathematics
+
+% theshold is new!
+
+\let\math_fraction_set_threshold_inline \relax
+\let\math_fraction_set_threshold_display\relax
+
+\appendtoks
+ \math_fraction_set_threshold_inline
+ \math_fraction_set_threshold_display
+\to \everymathematics
+
+\appendtoks
+ \ifempty\currentmathfraction
+ \edef\p_threshold{\mathfractionparameter\c!inlinethreshold}%
+ \ifempty\p_threshold
+ \let\math_fraction_set_threshold_inline\relax
+ \orelse\ifx\p_threshold\v!auto
+ \let\math_fraction_set_threshold_inline\relax
+ \else
+ \let\math_fraction_set_threshold_inline\math_fraction_set_theshold_inline
+ \fi
+ \edef\p_threshold{\mathfractionparameter\c!displaythreshold}%
+ \ifempty\p_threshold
+ \let\math_fraction_set_threshold_display\relax
+ \orelse\ifx\p_threshold\v!auto
+ \let\math_fraction_set_threshold_display\relax
+ \else
+ \let\math_fraction_set_threshold_display\math_fraction_set_theshold_display
+ \fi
+ \fi
+\to \everysetupmathfraction
+
+\def\math_fraction_set_theshold_inline
+ {\edef\p_threshold{\mathfractionparameter\c!inlinethreshold}%
+ \Umathfractiondelsize\textstyle \p_threshold\dimexpr\textface\relax
+ \Umathfractiondelsize\scriptstyle \p_threshold\dimexpr\scriptface\relax
+ \Umathfractiondelsize\scriptscriptstyle\p_threshold\dimexpr\scriptscriptface\relax}
+
+\def\math_fraction_set_theshold_display
+ {\edef\p_threshold{\mathfractionparameter\c!displaythreshold}%
+ \Umathfractiondelsize\displaystyle \p_threshold\dimexpr\textface\relax}
+
+%D \macros
+%D {dfrac, tfrac, frac, dbinom, tbinom, binom}
+%D
+%D \startbuffer
+%D $\dfrac {1}{2} \tfrac {1}{2} \frac {1}{2}$
+%D $\dbinom{1}{2} \tbinom{1}{2} \binom{1}{2}$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \getbuffer
+
+% $$
+% {{a}\over{b}} +
+% {{a}\overwithdelims(){b}} +
+% {{a}\atopwithdelims(){b}} +
+% {{a}\abovewithdelims()\zeropoint{b}} +
+% \left({{a}\over{b}}\right)
+% $$
+
+% \dorecurse {10} { % weird
+% $$ {{a}\abovewithdelims()#1pt{b}} $$
+% }
+
+\definemathfraction[i:frac] [\c!alternative=\v!inner,\c!mathstyle=] % was script and then small but nothing needed
+\definemathfraction[i:tfrac][\c!alternative=\v!inner,\c!mathstyle=\s!text] % was script (before luatex fix)
+\definemathfraction[i:sfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
+\definemathfraction[i:dfrac][\c!alternative=\v!inner,\c!mathstyle=\s!display]
+
+\definemathfraction[d:frac] [\c!alternative=\v!inner,\c!mathstyle=\s!cramped] % was cramped,text
+\definemathfraction[d:tfrac][\c!alternative=\v!both ,\c!mathstyle={\s!cramped,\s!text}] % was cramped,script (before luatex fix)
+\definemathfraction[d:sfrac][\c!alternative=\v!both ,\c!mathstyle={\s!cramped,\s!scriptscript}]
+\definemathfraction[d:dfrac][\c!alternative=\v!inner,\c!mathstyle=\s!display]
+
+%D \protected\def\ShowMathFractions#1#2%
+%D {\dontleavehmode
+%D \begingroup
+%D \showmathstruts
+%D \mathematics{x+\tfrac{#1}{#2}+1+\frac{#1}{#2}+2+\sfrac{#1}{#2}+g}%
+%D \endgroup}
+%D
+%D The default \type {tfrac}, \type {frac} and \type \sfrac} look like this:
+%D
+%D \blank
+%D \ShowMathFractions{a}{a}\par
+%D \ShowMathFractions{1}{x}\par
+%D \ShowMathFractions{a}{b}\par
+%D \ShowMathFractions{1}{b}\par
+%D \blank
+
+\permanent\protected\def\frac {\csname\inlineordisplaymath id:frac\endcsname}
+\permanent\protected\def\tfrac{\csname\inlineordisplaymath id:tfrac\endcsname}
+\permanent\protected\def\sfrac{\csname\inlineordisplaymath id:sfrac\endcsname}
+\permanent\protected\def\dfrac{\csname\inlineordisplaymath id:dfrac\endcsname}
+
+\definemathfraction[ams] [\c!strut=\v!no,\c!alternative=\v!outer]
+\definemathfraction[i:ams:frac][ams][\c!mathstyle={\s!cramped,\s!text}]
+\definemathfraction[d:ams:frac][ams][\c!mathstyle={\s!cramped,\s!display}]
+
+\permanent\protected\def\ctxfrac{\csname\inlineordisplaymath id:frac\endcsname}
+\permanent\protected\def\amsfrac{\csname\inlineordisplaymath id:ams:frac\endcsname}
+
+% \appendtoks
+% \doifelse{\mathfractionparameter\c!option}{ams}%
+% {\let\frac\amsfrac}%
+% {\let\frac\ctxfrac}%
+% \to \everysetupmathfraction
+
+\appendtoks
+ \doifelse{\mathematicsparameter\c!fractions}{ams}%
+ {\enforced\let\frac\amsfrac}%
+ {\enforced\let\frac\ctxfrac}%
+\to \everysetupmathematics
+
+% \definemathfraction[ddfrac][\c!mathstyle=\s!display]
+% \definemathfraction[ttfrac][\c!mathstyle=\s!text]
+% \definemathfraction[ssfrac][\c!mathstyle=\s!script]
+
+% \protected\def\binom #1#2{{\Ustack {{#1}\normalabovewithdelims()\zeropoint{#2}}}}
+% \protected\def\dbinom#1#2{{\displaystyle{{#1}\normalabovewithdelims()\zeropoint{#2}}}}
+% \protected\def\tbinom#1#2{{\textstyle {{#1}\normalabovewithdelims()\zeropoint{#2}}}}
+
+\definemathfraction
+ [binom]
+ [\c!alternative=\v!outer,
+ \c!rule=\v!no,
+ \c!left=0x28,
+ \c!right=0x29,
+ \c!mathstyle=\s!auto]
+
+\definemathfraction
+ [dbinom]
+ [binom]
+ [\c!mathstyle=\s!display]
+
+\definemathfraction
+ [tbinom]
+ [binom]
+ [\c!mathstyle=\s!text]
+
+%D \macros
+%D {cfrac}
+%D
+%D \startbuffer
+%D $\cfrac{12}{3} \cfrac[l]{12}{3} \cfrac[c]{12}{3} \cfrac[r]{12}{3}$
+%D $\cfrac{1}{23} \cfrac[l]{1}{23} \cfrac[c]{1}{23} \cfrac[r]{1}{23}$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+%D
+%D Now we can align every combination we want:
+%D
+%D \startbuffer
+%D $\cfrac{12}{3} \cfrac[l]{12}{3} \cfrac[c]{12}{3} \cfrac[r]{12}{3}$
+%D $\cfrac{1}{23} \cfrac[l]{1}{23} \cfrac[c]{1}{23} \cfrac[r]{1}{23}$
+%D $\cfrac[cl]{12}{3} \cfrac[cc]{12}{3} \cfrac[cr]{12}{3}$
+%D $\cfrac[lc]{1}{23} \cfrac[cc]{1}{23} \cfrac[rc]{1}{23}$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+
+\permanent\protected\def\cfrac
+ {\doifelsenextoptionalcs\math_cfrac_yes\math_cfrac_nop}
+
+\def\math_cfrac_nop {\math_cfrac_indeed[cc]}
+\def\math_cfrac_yes[#1]{\math_cfrac_indeed[#1cc]}
+
+\def\math_cfrac_indeed[#1#2#3]#4#5%
+ {{\displaystyle
+ \frac
+ {\strut
+ \ifx r#1\hfill\fi#4\ifx l#1\hfill\fi}%
+ {\ifx r#2\hfill\fi#5\ifx l#2\hfill\fi}%
+ \kern-\nulldelimiterspace}}
+
+%D \macros
+%D {splitfrac, splitdfrac}
+%D
+%D Occasionally one needs to typeset multi||line fractions.
+%D These commands use \tex{genfrac} to create such fractions.
+%D
+%D \startbuffer
+%D \startformula
+%D a=\frac{
+%D \splitfrac{xy + xy + xy + xy + xy}
+%D {+ xy + xy + xy + xy}
+%D }
+%D {z}
+%D =\frac{
+%D \splitdfrac{xy + xy + xy + xy + xy}
+%D {+ xy + xy + xy + xy}
+%D }
+%D {z}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D These macros are based on Michael J.~Downes posting on
+%D comp.text.tex on 2001/12/06 but adapted a bit.
+
+\permanent\protected\def\splitfrac #1#2{{\textstyle {{\textstyle#1\quad\hfill}\normalabove\zeropoint{\textstyle\hfill\quad\mathstrut#2}}}}
+\permanent\protected\def\splitdfrac#1#2{{\displaystyle{{ #1\quad\hfill}\normalabove\zeropoint{ \hfill\quad\mathstrut#2}}}}
+
+%D For testing:
+
+% \protected\def\ShowMathFractions#1#2%
+% {\mathematics{x+\tfrac{#1}{#2}+1+\frac{#1}{#2}+2+\sfrac{#1}{#2}+g}}
+
+%D More fracking (for Alan):
+
+\protected\def\math_frac_colored_vulgar#1#2%
+ {\savecolor
+ \colo_helpers_activate\p_math_fractions_color
+ {\restorecolor#1}\Uskewed/{\restorecolor#2}}
+
+\protected\def\math_frac_normal_vulgar#1#2%
+ {{#1}\Uskewed/{#2}}
+
+\permanent\protected\def\vfrac#1#2%
+ {\bgroup
+ \edef\p_math_fractions_color{\namedmathfractionparameter\s!vfrac\c!color}%
+ \ifempty\p_math_fractions_color
+ \expandafter\math_frac_normal_vulgar
+ \else
+ \expandafter\math_frac_colored_vulgar
+ \fi
+ {#1}%
+ {#2}%
+ \egroup}
+
+\appendtoks
+ \edef\p_hfactor{\namedmathfractionparameter\s!vfrac\c!hfactor}%
+ \edef\p_vfactor{\namedmathfractionparameter\s!vfrac\c!vfactor}%
+ \Umathskewedfractionhgap\textstyle \p_hfactor\fontemwidth \mathstylefont\textstyle
+ \Umathskewedfractionhgap\scriptstyle \p_hfactor\fontemwidth \mathstylefont\scriptstyle
+ \Umathskewedfractionhgap\scriptscriptstyle\p_hfactor\fontemwidth \mathstylefont\scriptscriptstyle
+ \Umathskewedfractionvgap\textstyle \p_vfactor\fontexheight\mathstylefont\textstyle
+ \Umathskewedfractionvgap\scriptstyle \p_vfactor\fontexheight\mathstylefont\scriptstyle
+ \Umathskewedfractionvgap\scriptscriptstyle\p_vfactor\fontexheight\mathstylefont\scriptscriptstyle
+\to \everysetupmathfraction
+
+\setupmathfraction
+ [\s!vfrac]
+ [\c!hfactor=.2,
+ \c!vfactor=.1]
+
+\protect \endinput
+
+% I have no clue what \mthfrac and \mthsqrt are supposed to do but
+% I guess that it can be done with tweaking luatex's math parameters.
+% Otherwise I'll write something from scratch.
+
+% \def\math_stylebuilders_frac#1#2#3#4#5#6#7%
+% {\begingroup
+% \mathsurround\zeropoint
+% \setbox0\hbox{$#1 #6$}%
+% \setbox2\hbox{$#1 #7$}%
+% \dimen0\wd\ifdim\wd2>\wd0 2\else 0\fi
+% \setbox4\hbox to \dimen0{\leaders\hbox{#4}\hss#5}%
+% \mathord{\vcenter{{\offinterlineskip
+% \hbox to \dimen0{\hss\box0\hss}%
+% \kern\ht4%
+% \hbox to \dimen0{\hss\copy4\hss}%
+% \kern\ht4%
+% \hbox to \dimen0{\hss\box2\hss}}}}%
+% \endgroup}
+%
+% \def\math_stylebuilders_sqrt#1#2#3#4#5%
+% {\begingroup
+% \mathsurround\zeropoint
+% \setbox0\hbox{$#1 #5$}%
+% \ht0\dimexpr1.05\ht0+\onepoint\relax
+% \dp0\dimexpr1.05\dp0+\onepoint\relax
+% \setbox4\hbox to \wd0{\mr#2\leaders\hbox{#3}\hfill#4}%
+% \delimitershortfall\zeropoint
+% \nulldelimiterspace\zeropoint
+% \setbox2\hbox{$\left\delimiter"0270370 \vrule \s!height\ht0 \s!depth \dp0 \s!width\zeropoint\right.$}% is this the right code point?
+% \mathord{\vcenter{\hbox{\copy2\rlap{\raise\dimexpr\ht2-\ht4\relax\copy4}\copy0}}}%
+% \endgroup}
+%
+% \def\mthfrac#1#2#3#4#5{\mathchoice
+% {\math_stylebuilders_frac\displaystyle \textface {#1}{#2}{#3}{#4}{#5}}%
+% {\math_stylebuilders_frac\textstyle \textface {#1}{#2}{#3}{#4}{#5}}%
+% {\math_stylebuilders_frac\scriptstyle \scriptface {#1}{#2}{#3}{#4}{#5}}%
+% {\math_stylebuilders_frac\scriptscriptstyle\scriptscriptface{#1}{#2}{#3}{#4}{#5}}}
+%
+% \def\mthsqrt#1#2#3{\mathchoice
+% {\math_stylebuilders_sqrt\displaystyle \textface{#1}{#2}{#3}}%
+% {\math_stylebuilders_sqrt\textstyle \textface{#1}{#2}{#3}}%
+% {\math_stylebuilders_sqrt\scriptstyle \textface{#1}{#2}{#3}}%
+% {\math_stylebuilders_sqrt\scriptscriptstyle\textface{#1}{#2}{#3}}}
+
+% \protected\def\mthfrac#1#2#3{[mthfrac: #1 #2 #3]}
+% \protected\def\mthsqrt#1#2#3{[mthsqrt: #1 #2 #3]}
+
+% used for prototyping \Uskewed
+%
+% \protected\def\skewedfractiona#1#2{%
+% \raise
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\scriptstyle#1\hskip\dimexpr\Umathskewedfractionhgap\scriptstyle/2\relax$%
+% \egroup
+% \hbox to \zeropoint\bgroup
+% \hss$\textstyle/$\hss
+% \egroup
+% \lower
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\hskip\dimexpr\Umathskewedfractionhgap\scriptstyle/2\relax\scriptstyle#2$%
+% \egroup
+% }
+%
+% \protected\def\skewedfractionb#1#2{%
+% \raise
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\scriptstyle#1\hskip\dimexpr\Umathskewedfractionhgap\textstyle/2\relax$%
+% \egroup
+% \hbox to \zeropoint\bgroup
+% \hss$\textstyle/$\hss
+% \egroup
+% \lower
+% \Umathskewedfractionvgap\textstyle
+% \hbox\bgroup
+% $\hskip\dimexpr\Umathskewedfractionhgap\textstyle/2\relax\scriptstyle#2$%
+% \egroup
+% }
+%
+% $\skewedfractiona{1}{2}$
+% $\skewedfractionb{1}{2}$
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-inc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-inc.mkxl
new file mode 100644
index 00000000000..4db75e37e11
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-inc.mkxl
@@ -0,0 +1,69 @@
+%D \module
+%D [ file=math-inc,
+%D version=2018.06.23,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=XML inclusion,
+%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 Math Macros / XML inclusion}
+
+\registerctxluafile{math-inc}{}
+
+%D I had some doubt about including this in \CONTEXT\ but it might serve some users
+%D anyway. It's always the question to what extent one can be really roundtrip. I
+%D might improve it when I need it.
+
+% Talking about creating from a source ... June Lee's transcription of
+% Close to You by Jacob Collier is an amazing example:
+%
+% https://www.youtube.com/watch?v=hdBVN-HMuqI
+
+\unprotect
+
+\definesymbol[mmlattachment][{\infofont\darkred mml}]
+\definesymbol[mmlcomment] [{\infofont\darkblue mml}]
+
+\permanent\protected\def\lxml_add_mml_blob#1#2%
+ {\relax
+ \clf_xmlformulatobuffer\number\c_strc_formulas_n{temp-xml-export}%
+ #2%
+ [\c!symbol=#1,%
+ \c!space=\v!yes,%
+ \c!buffer=temp-xml-export,%
+ \c!name={formula-\number\c_strc_formulas_n.xml}]%
+ \relax}
+
+\permanent\protected\def\xmlattachmml
+ {\iftrialtypesetting\orelse\ifexporting\iflocation
+ \dostarttagged\t!ignore\empty
+ \lxml_add_mml_blob{mmlattachment}\attachment
+ \dostoptagged
+ \fi\fi}
+
+\permanent\protected\def\xmlcommentmml
+ {\iftrialtypesetting\orelse\ifexporting\iflocation
+ \dostarttagged\t!ignore\empty
+ \lxml_add_mml_blob{mmlcomment}\comment
+ \dostoptagged
+ \fi\fi}
+
+%D This kind of feature creep is not yet configurable, nor documented.
+
+\permanent\protected\def\xmladdmmlsource
+ {\iftrialtypesetting\orelse\ifexporting\iflocation
+ \dostarttagged\t!ignore\empty
+ \inleftmargin{%
+ \lxml_add_mml_blob{mmlattachment}\attachment
+ \quad
+ \lxml_add_mml_blob{mmlcomment}\comment
+ }%
+ \dostoptagged
+ \fi\fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl
new file mode 100644
index 00000000000..9f541c3512b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-ini.mkxl
@@ -0,0 +1,3022 @@
+%D \module
+%D [ file=math-ini,
+%D version=2008.01.02,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Initializations,
+%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 Math Macros / Initializations}
+
+% todo: hpack as we skip math anyway
+%
+% todo: 0x2061 : function application
+% todo: 0x2062 : invisible times
+% todo: 0x2063 : invisible comma
+
+% a bit tricky way to set ... no (pseudo) registers but math hash values:
+%
+% \normalexpanded{\Umathlimitabovevgap\displaystyle=40\dimexpr\the\Umathlimitabovevgap\displaystyle\relax}
+
+% Todo in luatex maincontrol.w: also accept a number here:
+%
+% case set_math_param_cmd:
+% p = cur_chr;
+% get_token();
+% if (cur_cmd != math_style_cmd) {
+%
+% plus two new math styles: larger/smaller
+%
+% \protected\def\Umathshow#1%
+% {\hbox{\infofont(\string#1:\the#1\textstyle,\the#1\scriptstyle,\the#1\scriptscriptstyle)}}
+
+%D This module provides namespaces for math fonts, thereby permitting mixed usage of
+%D math fonts. Although not strictly needed, we also provide a family name mapping
+%D mechanism as used in the (original) AMS math definition files, but here these
+%D names can recursively be remapped and if needed, dynamically be changed. We've
+%D tried to minimize the number of definition commands and use plain \TEX\
+%D definitions as fallback. We've tried to follow a couple of conventions from plain
+%D and AMS math in order to achieve backward compatinility. We also kept an eye on
+%D future usage of these modules in the perspective of MathML and unicode fonts.
+
+%D There is a subtle issue with grouping: the \type {\begingroup} method will not
+%D restore a changed mathstyle so best avoid that one. However, there are cases where
+%D we really need to use such grouping.
+
+% Weird, these fail, maybe amp is solved in a later state from char noads (needs a
+% fix in luatex):
+%
+% $\char"26$
+% $\a$
+% $\string&$
+
+% mathop applied to characters centers it vertically
+
+\unprotect
+
+%D We move these definitions into the format:
+
+% test [[\char948 \cldcontext{utf.char(948)}]]
+% test $[[\char948 \cldcontext{utf.char(948)}]]$
+
+\registerctxluafile{math-ini}{}
+\registerctxluafile{math-dim}{}
+\registerctxluafile{math-act}{autosuffix}
+\registerctxluafile{math-ext}{}
+\registerctxluafile{math-vfu}{autosuffix}
+\registerctxluafile{math-ttv}{}
+\registerctxluafile{math-map}{optimize}
+\registerctxluafile{math-ren}{}
+\registerctxluafile{math-noa}{autosuffix,optimize}
+\registerctxluafile{math-tag}{autosuffix}
+\registerctxluafile{math-fbk}{}
+\registerctxluafile{math-dir}{}
+\registerctxluafile{math-spa}{}
+
+%D A starter:
+%D
+%D \startbuffer
+%D \mathsurround 10pt
+%D \mathsurroundskip30pt
+%D x $x + \ruledhbox{$x$} + x$ x
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \start \blank \getbuffer \blank \stop
+
+\newcount\mathnestinglevel
+
+\appendtoks
+ \advance\mathnestinglevel\plusone
+\to \everymathematics
+
+%D A few compatibility helpers:
+
+\permanent\def\Umathbotaccent{\Umathaccent \s!bottom }
+\permanent\def\Umathtopaccent{\Umathaccent \s!top }
+\permanent\def\Umathaccents {\Umathaccent \s!both } % strange highlighting
+
+\ifdefined\Umathcharclass \else
+ \permanent\def\Umathcharclass{\numexpr\cldcontext{tex.getmathcode(token.scan_int())[1]}\relax}
+ \permanent\def\Umathcharfam {\numexpr\cldcontext{tex.getmathcode(token.scan_int())[2]}\relax}
+ \permanent\def\Umathcharslot {\numexpr\cldcontext{tex.getmathcode(token.scan_int())[3]}\relax}
+\fi
+
+%D The attributes that we will use (todo: pack some into one but uglier code):
+
+\definesystemattribute[mathalphabet] [public]
+\definesystemattribute[mathsize] [public]
+\definesystemattribute[mathpunctuation][public]
+\definesystemattribute[mathgreek] [public] % will become generic
+\definesystemattribute[mathalternate] [public]
+\definesystemattribute[mathrendering] [public]
+\definesystemattribute[mathcategory] [public]
+\definesystemattribute[mathmode] [public]
+\definesystemattribute[mathitalics] [public]
+\definesystemattribute[mathkernpairs] [public]
+\definesystemattribute[mathbidi] [public]
+\definesystemattribute[mathdomain] [public]
+\definesystemattribute[mathcollapsing] [public]
+\definesystemattribute[mathunstack] [public]
+
+\definesystemattribute[displaymath] [public]
+
+\mathflattenmode 31
+
+\ifdefined\ordlimits\else
+ \let\ordlimits\limits
+\fi
+
+\appendtoks
+ \c_attr_mathmode\plusone
+\to \everydisplay
+
+\appendtoks
+ \c_attr_mathmode \plusone
+ \c_attr_displaymath\plusone
+\to \everybeforedisplayformula
+
+\defaultmathfamily \zerocount % 255
+
+\permanent\protected\def\resetmathattributes{\clf_resetmathattributes}
+
+% handy
+
+\newconditional\indisplaymath
+
+\appendtoks
+ \setfalse\indisplaymath
+\to \everymath
+
+\appendtoks
+ \settrue\indisplaymath
+\to \everydisplay
+
+\permanent\def\inlineordisplaymath{\ifconditional\indisplaymath\expandafter\secondoftwoarguments\else\expandafter\firstoftwoarguments\fi}
+
+\permanent\protected\def\forcedisplaymath
+ {\ifmmode
+ \displaystyle
+ \settrue\indisplaymath
+ \fi}
+
+\permanent\protected\def\startforceddisplaymath
+ {\startimath
+ \displaystyle
+ \begingroup
+ \settrue\indisplaymath}
+
+\permanent\protected\def\stopforceddisplaymath
+ {\endgroup
+ \stopimath}
+
+\permanent\protected\def\startpickupmath % for the moment private
+ {\ifconditional\indisplaymath
+ \startforceddisplaymath
+ \enforced\let\stoppickupmath\stopforceddisplaymath
+ \else
+ \startimath
+ \enforced\let\stoppickupmath\stopimath
+ \fi}
+
+\aliased\let\stoppickupmath\relax
+
+% \protected\def\rawmathcharacter#1% slow but only for tracing
+% {\begingroup
+% \ifmmode
+% \resetmathattributes\Uchar#1%
+% \else
+% \startimath\resetmathattributes\Uchar#1\stopimath
+% \fi
+% \endgroup}
+
+\permanent\protected\def\rawmathematics#1% slow but only for tracing
+ {\begingroup
+ \ifmmode
+ \clf_resetmathattributes#1%
+ \else
+ \startimath\clf_resetmathattributes#1\stopimath
+ \fi
+ \endgroup}
+
+%D Some measures (maybe spac-mth):
+
+% \def\mathskipsmall {\mskip\thinmuskip}
+% \def\mathskipmedium{\mskip\medmuskip}
+% \def\mathskipbig {\mskip\thickmuskip}
+
+%D \macros
+%D {setupmathematics}
+%D
+%D Configuration for integrals. (If needed we can speed this up and make it
+%D installable; no processaction is needed then).
+
+\installcorenamespace{mathematics}
+
+\installswitchcommandhandler \??mathematics {mathematics} \??mathematics
+
+\installmacrostack\currentmathematics
+
+% \permanent\protected\def\startmathematics % no grouping, if ever then also an optional second
+% {\doifelsenextoptionalcs\math_mathematics_start_yes\math_mathematics_start_nop}
+%
+% \protected\def\math_mathematics_start_yes[#1]%
+% {\push_macro_currentmathematics
+% \edef\currentmathematics{#1}% check for valid
+% \the\everyswitchmathematics}
+%
+% \protected\def\math_mathematics_start_nop
+% {\push_macro_currentmathematics
+% \let\currentmathematics\empty
+% \the\everyswitchmathematics}
+
+\permanent\protected\tolerant\def\startmathematics[#1]% no grouping, if ever then also an optional second
+ {\push_macro_currentmathematics
+ \edef\currentmathematics{#1}% check for valid
+ \the\everyswitchmathematics}
+
+\permanent\protected\def\stopmathematics
+ {\pop_macro_currentmathematics
+ \the\everyswitchmathematics} % only needed at level zero
+
+\definemathematics[\v!default] % not needed, but nicer when nesting back to normal
+
+% Now we redefine \type {\mathematics} and \type {\m}:
+
+\pushoverloadmode
+
+ \permanent\protected\def\mathematics{\doifelsenextoptionalcs\math_m_yes\math_m_nop}
+
+ \aliased\let\m \mathematics % we keep the simple versions
+ \aliased\let\math\mathematics % we keep the simple versions
+
+\popoverloadmode
+
+\def\math_m_yes
+ {\relax
+ \ifmmode
+ \expandafter\math_m_yes_math
+ \else
+ \expandafter\math_m_yes_text
+ \fi}
+
+\def\math_m_yes_math[#1]#2%
+ {#2}
+
+\def\math_m_yes_text[#1]%
+ {\begingroup
+ \ifcondition\validassignment{#1}%
+ \setupcurrentmathematics[#1]%
+ \else
+ \edef\currentmathematics{#1}% check for valid
+ \fi
+ \edef\p_openup{\mathematicsparameter\c!openup}%
+ \ifx\p_openup\v!yes
+ \expandafter\math_m_yes_text_openedup
+ \else
+ \expandafter\math_m_yes_text_normal
+ \fi}
+
+\def\math_m_yes_text_openedup#1%
+ {\setbox\scratchbox\hbox\bgroup
+ \the\everyswitchmathematics\relax
+ \normalstartimath
+ #1%
+ \normalstopimath
+ \egroup
+ \ifdim\ht\scratchbox>\strutht
+ \math_inline_openup_start_yes
+ \orelse\ifdim\dp\scratchbox>\strutdp
+ \math_inline_openup_start_yes
+ \else
+ \math_inline_openup_start_nop
+ \fi
+ \unhbox\scratchbox % \normalstartimath#1\normalstopimath
+ \math_inline_openup_stop
+ \endgroup}
+
+\def\math_m_yes_text_normal#1%
+ {\the\everyswitchmathematics\relax
+ \normalstartimath
+ #1%
+ \normalstopimath
+ \endgroup}
+
+\def\math_m_nop#1%
+ {\relax
+ \ifmmode
+ #1%
+ \else
+ \normalstartimath
+ #1%
+ \normalstopimath
+ \fi}
+
+% e.g.: \definemathematics[i:mp][setups=i:tight,openup=yes]
+
+\immutable\mugluespecdef\defaultthickmuskip 5mu plus 5mu
+\immutable\mugluespecdef\defaultmedmuskip 4mu plus 2mu minus 4mu
+\immutable\mugluespecdef\defaultthinmuskip 3mu
+
+\immutable\mugluespecdef\halfthickmuskip 2.5mu plus 2.5mu
+\immutable\mugluespecdef\halfmedmuskip 2.0mu plus 1.0mu minus 2.0mu
+\immutable\mugluespecdef\halfthinmuskip 1.5mu
+
+\immutable\mugluespecdef\hairmuskip .15mu
+
+\immutable\integerdef \defaultrelpenalty 500
+\immutable\integerdef \defaultbinoppenalty 700
+\immutable\integerdef \defaultprerelpenalty -100
+\immutable\integerdef \defaultprebinoppenalty -100
+
+% we need to control these otherwise:
+%
+% \prerelpenalty \defaultprerelpenalty
+% \prebinoppenalty\defaultprebinoppenalty
+
+\startsetups math:spacing:default
+ \thickmuskip \defaultthickmuskip
+ \medmuskip \defaultmedmuskip
+ \thinmuskip \defaultthinmuskip
+ \relpenalty \defaultrelpenalty
+ \binoppenalty \defaultbinoppenalty
+ \prebinoppenalty\maxdimen
+ \prerelpenalty \maxdimen
+\stopsetups
+
+\startsetups math:spacing:split
+ \thickmuskip \defaultthickmuskip
+ \medmuskip \defaultmedmuskip
+ \thinmuskip \defaultthinmuskip
+ \relpenalty \defaultrelpenalty
+ \binoppenalty \defaultbinoppenalty
+ \prebinoppenalty\defaultprebinoppenalty
+ \prerelpenalty \defaultprerelpenalty
+\stopsetups
+
+\startsetups math:spacing:half
+ \thickmuskip \halfthickmuskip
+ \medmuskip \halfmedmuskip
+ \thinmuskip \halfthinmuskip
+ \relpenalty \defaultrelpenalty
+ \binoppenalty \defaultbinoppenalty
+ \prebinoppenalty\maxdimen
+ \prerelpenalty \maxdimen
+\stopsetups
+
+\startsetups math:spacing:tight
+ \ifcase\raggedstatus
+ \thickmuskip \halfthickmuskip
+ \medmuskip \halfmedmuskip
+ \thinmuskip \halfthinmuskip
+ \else
+ \thickmuskip 1\halfthickmuskip
+ \medmuskip 1\halfmedmuskip
+ \thinmuskip 1\halfthinmuskip
+ \fi
+ \relpenalty \defaultrelpenalty
+ \binoppenalty \maxdimen
+ \prebinoppenalty\maxdimen
+ \prerelpenalty \maxdimen
+\stopsetups
+
+\startsetups math:spacing:fixed
+ \ifcase\raggedstatus
+ \thickmuskip \halfthickmuskip
+ \medmuskip \halfmedmuskip
+ \thinmuskip \halfthinmuskip
+ \else
+ \thickmuskip 1\halfthickmuskip
+ \medmuskip 1\halfmedmuskip
+ \thinmuskip 1\halfthinmuskip
+ \fi
+ \relpenalty \maxdimen
+ \binoppenalty \maxdimen
+ \prebinoppenalty\maxdimen
+ \prerelpenalty \maxdimen
+\stopsetups
+
+% \dorecurse{80}{test \m[i:tight]{\red \fakeformula} test }
+
+\definemathematics[i:default][\c!setups=math:spacing:equal]
+\definemathematics[i:half] [\c!setups=math:spacing:half]
+\definemathematics[i:tight] [\c!setups=math:spacing:tight]
+\definemathematics[i:fixed] [\c!setups=math:spacing:fixed]
+
+% Normally the next is applied to only one character.
+%
+% $ABC$ $\cal ABC$ $\mathaltcal ABC$
+
+% todo: only in mmode
+% these commands are semi-public but should not be used directly (lua names wil change)
+
+\permanent\protected\def\setmathattribute #1#2{\ifmmode\clf_setmathattribute{#1}{#2}\fi}
+\permanent\protected\def\setmathalphabet #1{\ifmmode\clf_setmathalphabet{#1}\fi}
+\permanent\protected\def\setmathfontstyle #1{\ifmmode\clf_setmathstyle{#1}\fi}
+\permanent\protected\def\setmathfontalternate#1{\ifmmode\clf_setmathalternate\defaultmathfamily{#1}\fi}
+
+\installcorenamespace{mathstylealternative} % might become a setuphandler
+
+\permanent\protected\def\setmathfontstylealternate#1%
+ {\ifcsname\??mathstylealternative\fontclass:#1\endcsname
+ \expandafter\setmathfontalternate\lastnamedcs
+ \orelse\ifcsname\??mathstylealternative#1\endcsname
+ \expandafter\setmathfontalternate\lastnamedcs
+ \fi}
+
+\permanent\tolerant\protected\def\setupmathrendering[#1]#*[#2]% the name might change
+ {\ifparameter#2\or
+ \getparameters[\??mathstylealternative#1:][#2]%
+ \else
+ \getparameters[\??mathstylealternative][#1]%
+ \fi}
+
+\appendtoks
+ \edef\p_stylealternative{\mathematicsparameter\c!stylealternative}%
+ \ifempty\p_stylealternative\else
+ \clf_presetmathalternate\defaultmathfamily{\p_stylealternative}%
+ \fi
+\to \everymathematics
+
+% if there were many features we could have a feature pass over math nodes but it makes no
+% sense now so we have commands to deal with it
+
+% \enabletrackers[math.alternates]
+% \setupbodyfont[lucidaot]
+%
+% \startTEXpage
+% \setupmathematics[stylealternative={reset}]$x+\mathcal A$\par
+% \setupmathematics[stylealternative={reset,calligraphic}]$x+\mathcal A$\par
+% \setupmathematics[stylealternative={reset,italic}]$x+\mathcal A$\par
+% \setupmathematics[stylealternative={reset,calligraphic,italic}]$x+\mathcal A$
+% \stopTEXpage
+
+% no longer needed now we have enforce so the next few lines will go
+
+% \pushoverloadmode
+% \enforced\let\dotlessi\dotlessi
+% \enforced\let\dotlessj\dotlessj
+% \popoverloadmode
+
+\permanent\protected\def\mathaltcalligraphic{\setmathfontalternate{calligraphic}\cal} % set via goody file
+\permanent\protected\def\mathaltitalic {\setmathfontalternate{italic}} % set via goody file
+\permanent\protected\def\mathslashedzero {\begingroup\setmathfontalternate{zero}∅\endgroup} % set via goody file or automatic
+\permanent\protected\def\mathdotless {\setmathfontalternate{dotless}} % set via goody file or automatic
+\permanent\protected\def\mathdotlessi {\begingroup\mathdotless i\endgroup}
+\permanent\protected\def\mathdotlessj {\begingroup\mathdotless j\endgroup}
+
+\aliased\let\mathaltcal\mathaltcalligraphic
+\aliased\let\mathaltit \mathaltitalic
+
+%aliased\let\textslashedzero\slashedzero \permanent\protected\def\autoslashedzero{\mathortext\mathslashedzero\textslashedzero}
+\aliased\let\textdotlessi \dotlessi \permanent\protected\def\autodotlessi {\mathortext\mathdotlessi \textdotlessi}
+\aliased\let\textdotlessj \dotlessj \permanent\protected\def\autodotlessj {\mathortext\mathdotlessj \textdotlessj}
+
+\appendtoks
+ %enforced\let\slashedzero\autoslashedzero
+ \enforced\let\dotlessi\autodotlessi
+ \enforced\let\dotlessj\autodotlessj
+\to \everymathematics
+
+\aliased\let\setmathfontalternative \setmathfontalternate
+\aliased\let\setmathfontstylealternative\setmathfontstylealternate
+\aliased\let\mathalternate \setmathfontalternate
+
+\permanent\protected\def\mathupright {\setmathattribute\s!regular\s!tf\setmathfontstylealternate\s!tf}
+\permanent\protected\def\mathitalic {\setmathattribute\s!regular\s!it\setmathfontstylealternate\s!it}
+\permanent\protected\def\mathscript {\setmathalphabet \s!script \setmathfontstylealternate\s!script}
+\permanent\protected\def\mathfraktur {\setmathalphabet \s!fraktur \setmathfontstylealternate\s!fraktur}
+\permanent\protected\def\mathblackboard{\setmathalphabet \s!blackboard \setmathfontstylealternate\s!blackboard}
+
+\permanent\protected\def\mathrm {\setmathattribute\s!rm\s!tf \setmathfontstylealternate\s!tf}
+\permanent\protected\def\mathss {\setmathattribute\s!ss\s!tf \setmathfontstylealternate\s!tf}
+\permanent\protected\def\mathtt {\setmathattribute\s!tt\s!tf \setmathfontstylealternate\s!tf}
+
+\permanent\protected\def\mathtf {\setmathfontstyle\s!tf \setmathfontstylealternate\s!tf}
+\permanent\protected\def\mathsl {\setmathfontstyle\s!it \setmathfontstylealternate\s!it} % no sl
+\permanent\protected\def\mathit {\setmathfontstyle\s!it \setmathfontstylealternate\s!it}
+
+\permanent\protected\def\mathbf {\setmathfontstyle\s!bf \setmathfontstylealternate\s!bf}
+\permanent\protected\def\mathbs {\setmathfontstyle\s!bi \setmathfontstylealternate\s!bi} % no sl
+\permanent\protected\def\mathbi {\setmathfontstyle\s!bi \setmathfontstylealternate\s!bi}
+
+\aliased\let\mathdefault\mathitalic
+
+\appendtoks
+ \edef\p_default{\mathematicsparameter\c!default}%
+ \ifx\p_default\v!normal
+ \enforced\let\mathdefault\mathupright
+ \else
+ \enforced\let\mathdefault\mathitalic
+ \fi
+\to \everysetupmathematics
+
+\setupmathematics
+ [\c!default=\v!italic]
+
+\aliased\let\tfmath\mathtf % maybe a grouped command
+\aliased\let\slmath\mathsl
+\aliased\let\itmath\mathit
+
+\aliased\let\bfmath\mathbf
+\aliased\let\bsmath\mathbs
+\aliased\let\bimath\mathbi
+
+\aliased\let\Bbb\mathblackboard
+
+\permanent\protected\def\frak {\ifmmode\expandafter\mathfraktur \fi}
+\permanent\protected\def\cal {\ifmmode\expandafter\mathscript \fi}
+\permanent\protected\def\bbd {\ifmmode\expandafter\mathblackboard\fi}
+\permanent\protected\def\blackboard{\ifmmode\expandafter\mathblackboard\fi}
+\permanent\protected\def\fraktur {\ifmmode\expandafter\mathfraktur \fi}
+\permanent\protected\def\gothic {\ifmmode\expandafter\mathfraktur \fi}
+
+\permanent\protected\def\mathcal #1{{\mathscript #1}} % for AMS compatibility
+\permanent\protected\def\mathfrak#1{{\mathfraktur #1}} % for AMS compatibility
+\permanent\protected\def\mathbb #1{{\mathblackboard#1}} % for AMS compatibility
+
+\ifdefined\normaltf \else \permanent\let\normaltf\tf \fi \permanent\protected\def\tf{\ifmmode\mathtf\else\normaltf\fi}
+\ifdefined\normalbf \else \permanent\let\normalbf\bf \fi \permanent\protected\def\bf{\ifmmode\mathbf\else\normalbf\fi}
+\ifdefined\normalit \else \permanent\let\normalit\it \fi \permanent\protected\def\it{\ifmmode\mathit\else\normalit\fi}
+\ifdefined\normalsl \else \permanent\let\normalsl\sl \fi \permanent\protected\def\sl{\ifmmode\mathsl\else\normalsl\fi}
+\ifdefined\normalbi \else \permanent\let\normalbi\bi \fi \permanent\protected\def\bi{\ifmmode\mathbi\else\normalbi\fi}
+\ifdefined\normalbs \else \permanent\let\normalbs\bs \fi \permanent\protected\def\bs{\ifmmode\mathbs\else\normalbs\fi}
+
+\permanent\protected\def\rm{\ifmmode\mathrm\else\normalrm\fi}
+\permanent\protected\def\ss{\ifmmode\mathss\else\normalss\fi}
+\permanent\protected\def\tt{\ifmmode\mathtt\else\normaltt\fi}
+
+\ifdefined\mr \else \let\mr\relax \fi % hm ... permanent
+\ifdefined\mb \else \let\mb\relax \fi % hm ... permanent
+
+% 1: $\setmathattribute{ss}{bf}3$
+% 2: $\setmathattribute{ss}{bf}\setmathfontstylealternate{bf}3$
+% 3: $\setmathattribute{ss}{bf}\setmathfontstyle{bf}3$
+% 4: $\setmathattribute{ss}{bf}\setmathfontstyle{bf}\setmathfontstylealternate{bf}3$
+% 5: $e=mc^2 \quad \mb e=mc^2$
+
+\prependtoks
+ \mathdefault
+\to \everymathematics
+
+%D We could set the rendering attribute at the \LUA\ end but as there can be many
+%D small math snippets we keep track of the state at the \TEX\ end (mapping is
+%D export safe).
+%D
+%D \starttyping
+%D \startformula
+%D \reals {\mathbf R} \utfchar{"0211D} \utfchar{"1D411}
+%D \stopformula
+%D
+%D \setupmathematics
+%D [symbolset=blackboard-to-bold]
+%D
+%D \startformula
+%D \reals {\mathbf R} \utfchar{"0211D} \utfchar{"1D411}
+%D \stopformula
+%D \stoptyping
+
+\newcount\c_math_renderings_attribute
+
+\appendtoks
+ \c_math_renderings_attribute\clf_mathrenderset{\mathematicsparameter\c!symbolset}\relax
+\to \everysetupmathematics % only in mathematics
+
+\appendtoks
+ \ifcase\c_math_renderings_attribute\else
+ \c_attr_mathrendering\c_math_renderings_attribute
+ \fi
+\to \everymathematics
+
+\setupmathematics
+ [\c!symbolset=]
+
+%D \macros
+%D {boldsymbol}
+%D
+%D To be done.
+
+\mutable\let\mathboldsymbol\relax % yet unsupported, will be
+
+\permanent\protected\def\boldsymbol
+ {\mathortext\mathboldsymbol\bold}
+
+%D Helpers
+
+\permanent\def\utfmathclass #1{\clf_utfmathclass {#1}}
+\permanent\def\utfmathstretch#1{\clf_utfmathstretch{#1}}
+\permanent\def\utfmathcommand#1{\clf_utfmathcommand{#1}}
+\permanent\def\utfmathfiller #1{\clf_utfmathfiller {#1}}
+
+\permanent\def\utfmathcommandabove #1{\clf_utfmathcommandabove {#1}}
+\permanent\def\utfmathcommandbelow #1{\clf_utfmathcommandbelow {#1}}
+\permanent\def\utfmathcommandfiller#1{\clf_utfmathcommandfiller{#1}}
+
+\permanent\protected\def\doifelseutfmathaccent#1{\clf_doifelseutfmathaccent{#1}}
+\permanent\protected\def\doifelseutfmathabove #1{\clf_doifelseutfmathabove {#1}}
+\permanent\protected\def\doifelseutfmathbelow #1{\clf_doifelseutfmathbelow {#1}}
+\permanent\protected\def\doifelseutfmathfiller#1{\clf_doifelseutfmathfiller{#1}}
+\permanent\protected\def\doifelseutfmathlimop #1{\clf_doifelseutfmathlimop {#1}}
+
+\aliased\let\doifutfmathaccentelse \doifelseutfmathaccent
+\aliased\let\doifutfmathaboveelse \doifelseutfmathabove
+\aliased\let\doifutfmathbelowelse \doifelseutfmathbelow
+\aliased\let\doifutfmathfillerelse \doifelseutfmathfiller
+\aliased\let\doifutfmathlimopelse \doifelseutfmathlimop
+
+%D Not used that much:
+
+\installcorenamespace{mathcodecommand}
+
+\permanent\protected\def\mathlimop#1{\mathop{#1}} %no \limits
+\permanent\protected\def\mathbox #1{\dontleavehmode\hbox\Ustartmath\mathsurround\zeropoint#1\Ustopmath}
+\permanent\protected\def\mathnolop#1{\mathop{#1}\nolimits}
+
+\aliased\let\mathnothing\firstofoneunexpanded
+\aliased\let\mathalpha \firstofoneunexpanded
+
+\setnewconstant\mathordcode \zerocount \letvalue{\??mathcodecommand ord}\mathord
+\setnewconstant\mathopcode \plusone \letvalue{\??mathcodecommand op}\mathop
+\setnewconstant\mathbincode \plustwo \letvalue{\??mathcodecommand bin}\mathbin
+\setnewconstant\mathrelcode \plusthree \letvalue{\??mathcodecommand rel}\mathrel
+\setnewconstant\mathopencode \plusfour \letvalue{\??mathcodecommand open}\mathopen
+\setnewconstant\mathclosecode \plusfive \letvalue{\??mathcodecommand close}\mathclose
+\setnewconstant\mathpunctcode \plussix \letvalue{\??mathcodecommand punct}\mathpunct
+\setnewconstant\mathalphacode \plusseven \letvalue{\??mathcodecommand alpha}\mathalpha
+\setnewconstant\mathinnercode \zerocount \letvalue{\??mathcodecommand inner}\mathinner
+\setnewconstant\mathnothingcode \zerocount \letvalue{\??mathcodecommand nothing}\mathnothing
+\setnewconstant\mathlimopcode \plusone \letvalue{\??mathcodecommand limop}\mathlimop
+\setnewconstant\mathnolopcode \plusone \letvalue{\??mathcodecommand nolop}\mathnolop
+\setnewconstant\mathboxcode \zerocount \letvalue{\??mathcodecommand box}\mathbox
+\setnewconstant\mathchoicecode \zerocount %letvalue{\??mathcodecommand choice}\mathnothing
+
+\setnewconstant\mathaccentcode \pluseight
+\setnewconstant\mathradicalcode \plusnine
+
+\permanent \def\mathcodenumber #1{\the\csname math#1code\endcsname}
+\permanent\protected\def\mathcodecommand#1{\csname\??mathcodecommand#1\endcsname}
+\permanent \def\mathcodechecked#1{\ifcsname math#1code\endcsname\lastnamedcs\else#1\fi}
+
+% \startlines
+% $\mathopnolimits{\rm d}x$
+% $\mathopnolimits{\kern\zeropoint \rm d}x$
+% $\mathcodecommand{nolop}{\rm d}x$
+% $\mathcodecommand{nolop}{\kern\zeropoint\rm d}x$
+% \blank
+% $\mathcodecommand{nolop}{\mr d}x$
+% $\mathcodecommand{nolop}{\kern\zeropoint\mr d}x$
+% $\mathop{\kern\zeropoint\mr d}x$
+% $\mathopnolimits{\kern\zeropoint d}x$
+% \stoplines
+
+\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
+ \frozen\protected\defcsname\??mathcommand#1\endcsname##1{\mathcodecommand{#2}{#4{##1}}}%
+ \orelse\ifx\scratchstringone\v!two
+ \frozen\protected\defcsname\??mathcommand#1\endcsname##1##2{\mathcodecommand{#2}{#4{##1}{##2}}}%
+ \else
+ \frozen\protected\defcsname\??mathcommand#1\endcsname{\mathcodecommand{#2}{#4}}%
+ \fi
+ \orelse\ifparameter#2\or
+ \frozen\protected\defcsname\??mathcommand#1\endcsname{\mathcodecommand{#2}{#4}}%
+ \else
+ \frozen\protected\defcsname\??mathcommand#1\endcsname{\mathcodecommand{nothing}{#4}}%
+ \fi
+ \ifparameter#1\or % safeguard
+ \letcsname#1\expandafter\endcsname\csname\??mathcommand#1\endcsname
+ \fi}
+
+\permanent\protected\def\mathcommand#1%
+ {\begincsname\??mathcommand#1\endcsname}
+
+%D Let's define a few comands here:
+
+%definemathcommand [mathstrut] {\vphantom{(}}
+%definemathcommand [joinrel] {\mathrel{\mkern-3mu}}
+\definemathcommand [joinrel] [rel] {\mkern-3mu}
+
+\immutable\chardef\c_math_strut"28
+
+% \protected\def\math_strut_htdp#1%
+% {\s!height\fontcharht#1\c_math_strut
+% \s!depth \fontchardp#1\c_math_strut}
+%
+% now we need this (kind of inefficient):
+
+\protected\def\math_strut_htdp#1% nasty!
+ {\s!height\dimexpr\mathscale#1\fontcharht#1\c_math_strut/\glyphscale\relax
+ \s!depth \dimexpr\mathscale#1\fontchardp#1\c_math_strut/\glyphscale\relax}
+
+\protected\def\math_strut_normal
+ {\vrule
+ \s!width \zeropoint
+ \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
+ \relax}
+
+\protected\def\math_strut_visual
+ {\hskip-.01\emwidth
+ \vrule
+ \s!width .02\emwidth
+ \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
+ \relax
+ \hskip-.01\emwidth}
+
+\permanent\protected\def\showmathstruts % let's not overload \math_strut_normal
+ {\enforced\let\math_strut\math_strut_visual}
+
+\let\math_strut\math_strut_normal
+
+% \protected\def\mathstrut{\mathcodecommand{nothing}{\math_strut}}
+
+\pushoverloadmode
+
+ \definemathcommand [mathstrut] {\math_strut}
+
+\popoverloadmode
+
+%D We could have a arg variant \unknown\ but not now.
+
+\permanent\protected\def\mathopwithlimits#1#2{\mathop{#1{#2}}\limits}
+\permanent\protected\def\stackrel #1#2{\mathrel{\mathop{#2}\limits^{#1}}}
+
+%D Moved from font-ini.mkiv:
+%D
+%D \macros
+%D {mf,mbox,enablembox,mathop}
+%D
+%D Todo:
+
+\permanent\protected\def\mf{\begincsname\fontalternative\endcsname} % todo: \frozen
+
+% \let\normalmathop\mathop % already defined
+
+% no longer needed as we no longer switch fonts
+%
+% \protected\def\mathop
+% {\normalmathop
+% \bgroup
+% % no: \let\rm\mf
+% \afterassignment\math_op\let\nexttoken=}
+%
+% \def\math_op{\ifx\nexttoken\bgroup\else\nexttoken\egroup\fi}
+
+% this one too: \letvalue{\??mathcodecommand op}\mathop ?
+
+\permanent\protected\def\normalmbox
+ {\normalhbox\bgroup
+ \usemathematicsstyleandcolor\c!textstyle\c!textcolor % new
+ \dowithnextboxcs\math_mbox_finish\normalhbox}
+
+\def\math_mbox_finish
+ {\flushnextbox
+ \egroup}
+
+\permanent\protected\def\mbox % we cannot add \dontleavehmode ... else no \setbox0\mbox possible
+ {\ifmmode\normalmbox\else\normalhbox\fi}
+
+\permanent\protected\def\enablembox
+ {\toksapp\everymathematics{\math_enable_mbox}}
+
+\permanent\def\math_enable_mbox % brrrr
+ {\enforced\let\hbox\mbox}
+
+\permanent\protected\def\snappedmath#1% sort of \struttedbox
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\normalhbox\bgroup
+ \startimath#1\stopimath
+ \egroup
+ \ht\scratchbox\strutht
+ \dp\scratchbox\strutdp
+ \box\scratchbox
+ \endgroup}
+
+\permanent\protected\def\mtext#1%
+ {\text{\usemathematicsstyleandcolor\c!textstyle\c!textcolor#1}}
+
+%D The next hack is needed needed for sine, cosine etc.
+
+\aliased\let\mathfunction\firstofoneunexpanded
+
+\let\math_tags_function \firstofoneunexpanded
+\let\math_tags_functionlabeltext\mathlabeltext
+
+\let\math_tags_mo\firstofoneunexpanded
+\let\math_tags_mi\firstofoneunexpanded
+
+\protected\def\math_tags_mn#1{\begingroup\mathupright\math_set_o_both#1\endgroup}
+\protected\def\math_tags_ms#1{\begingroup\mathupright\math_set_p_both#1\endgroup} % why not just \text
+
+% Once this is stable we can store the number at the tex end which is
+% faster. Functions getnumbers >= 1000.
+
+% \setupmathematics[functionstyle=normal] % will give ligatures and kerning
+
+\setupmathematics
+ [\c!textstyle=, % rm ss etc i.e. known alternatives, otherwise math
+ \c!textcolor=,
+ \c!functionstyle=, % rm ss etc i.e. known alternatives, otherwise math
+ \c!functioncolor=]
+
+\protected\def\math_mfunction_styled
+ {\begingroup
+ \usemathematicscolorparameter\c!functioncolor
+ \edef\p_functionstyle{\mathematicsparameter\c!functionstyle}%
+ \ifempty\p_functionstyle
+ \expandafter\math_mfunction_styled_none
+ \orelse\ifcsname\??alternativestyle\p_functionstyle\endcsname
+ \expandafter\math_mfunction_styled_text
+ \else
+ \expandafter\math_mfunction_styled_math
+ \fi}
+
+\protected\def\math_mfunction_styled_text#1%
+ %{\mathoptext{\csname\??alternativestyle\p_functionstyle\endcsname#1}%
+ {\expandafter\mathoptext\expandafter{\lastnamedcs#1}%
+ \endgroup}
+
+\protected\def\math_mfunction_styled_math#1%
+ {\p_functionstyle
+ #1%
+ \endgroup}
+
+\protected\def\math_mfunction_styled_none#1%
+ {\mathupright
+ #1%
+ \endgroup}
+
+\permanent\protected\def\mfunction#1%
+ {\begingroup
+ \math_tags_mfunctiontxt{#1}\c_apply_function
+ \math_mfunction_styled{#1}%
+ \endgroup}
+
+\permanent\protected\def\mfunctionlabeltext#1%
+ {\begingroup
+ \math_tags_mfunctionlab{#1}\c_apply_function
+ \math_mfunction_styled{\mathlabeltext{#1}}%
+ \endgroup}
+
+\let\math_tags_mfunctiontxt\gobbletwoarguments
+\let\math_tags_mfunctionlab\gobbletwoarguments
+
+\permanent\protected\def\math_tags_mo_indeed#1{\begingroup \c_attr_mathcategory\plusone #1\endgroup}
+\permanent\protected\def\math_tags_mi_indeed#1{\begingroup \c_attr_mathcategory\plustwo #1\endgroup}
+\permanent\protected\def\math_tags_mn_indeed#1{\begingroup\mathupright\c_attr_mathcategory\plusthree\math_set_o_both#1\endgroup}
+\permanent\protected\def\math_tags_ms_indeed#1{\begingroup\mathupright\c_attr_mathcategory\plusfour \math_set_p_both#1\endgroup} % todo: mathoptext
+
+\newconditional\c_apply_function
+
+\permanent\protected\def\math_tags_apply#1#2%
+ {\begingroup
+ \settrue\c_apply_function
+ #1%
+ \endgroup
+ \begingroup
+ % todo: auto ()
+ #2%
+ \endgroup}
+
+\ifdefined\apply \else \aliased\let\apply\relax \fi
+
+\mutable\let\mo\relax
+\mutable\let\mi\relax
+\mutable\let\mn\relax
+\mutable\let\ms\relax
+
+\appendtoks
+ \enforced\let\math_tags_mfunctiontxt\clf_tagmfunctiontxt
+ \enforced\let\math_tags_mfunctionlab\clf_tagmfunctionlab
+ \enforced\let\math_tags_mo \math_tags_mo_indeed
+ \enforced\let\math_tags_mi \math_tags_mi_indeed
+ \enforced\let\math_tags_mn \math_tags_mn_indeed
+ \enforced\let\math_tags_ms \math_tags_ms_indeed
+\to \everyenableelements
+
+\appendtoks
+ \enforced\let\mo \math_tags_mo
+ \enforced\let\mi \math_tags_mi
+ \enforced\let\mn \math_tags_mn
+ \enforced\let\ms \math_tags_ms
+ \enforced\let\apply\math_tags_apply
+\to\everymathematics
+
+% \def\mlimitsfunction #1{\mathlimopcomm{{\mr#1}}
+% \def\mnolimitsfunction#1{\mathnolopcomm{{\mr#1}}
+
+% %D Taco posted this solution as response to a mail by Olivier, so let's integrate
+% %D it here.
+%
+% \def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option
+%
+% \protected\def\math_function_style_opnolimits #1{\mathop{\mscaledtext{#1}}\nolimits}
+% \protected\def\math_function_style_mfunction #1{\mscaledtext{\math_tags_function{#1}}}
+% \protected\def\math_function_style_mfunctionlabeltext#1{\mscaledtext{\math_tags_functionlabeltext{#1}}}
+%
+% \protected\def\setmathfunctionstyle#1% rm ss tt (can be made faster if needed)
+% {\doifsomething{#1}
+% {\def\currentmscaledstyle{#1}%
+% \let\mathopnolimits \math_function_style_opnolimits
+% \let\mfunction \math_function_style_mfunction
+% \let\mfunctionlabeltext\math_function_style_mfunctionlabeltext}}
+
+\mutable\def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option
+
+\permanent\protected\def\mscaledtext#1%
+ {\mathchoice
+ {\hbox{\csname\currentmscaledstyle\endcsname\tf #1}}
+ {\hbox{\csname\currentmscaledstyle\endcsname\tf #1}}
+ {\hbox{\csname\currentmscaledstyle\endcsname\tfx #1}}
+ {\hbox{\csname\currentmscaledstyle\endcsname\tfxx#1}}}
+
+\permanent\protected\def\setmathfunctionstyle#1%
+ {\setupmathematics[\c!functionstyle=#1]} % for old times sake
+
+%D Usage:
+%D
+%D \starttyping
+%D \setmathfunctionstyle\fontstyle % or {rm} or {ss} or ..
+%D \rm test $\sin{(x^{\sin(x^{\sin(x)})})}$ test
+%D \ss test $\sin{(x^{\sin(x^{\sin(x)})})}$ test
+%D \tt test $\sin{(x^{\sin(x^{\sin(x)})})}$ test
+%D \stoptyping
+
+%D \macros
+%D {nonknuthmode, donknuthmode}
+%D
+%D The underscore is frequently used in manuals but unfortunately \TEX\ prefers
+%D it to be a math specific character. And since computer modern fonts didn't
+%D have an underscore, one had to use commands to fake one. Nowadays we do
+%D have underscores in latin modern, and since all other fonts have them, we
+%D decided to get away from the restriction to use the underscore character in
+%D text mode.
+%D
+%D \starttyping
+%D \def\test#1{#1}
+%D
+%D \nonknuthmode $x_2$ x_2 \test{$x_2$} \test{x_2}
+%D
+%D \donknuthmode $x_2$ x_2 \test{$x_2$} \test{x_2}
+%D \stoptyping
+%D
+%D The result is as expected: the first line typesets ok, while the second
+%D one triggers an error message.
+
+\setnewconstant\activemathcharcode "8000
+
+\newtoks\activatedmathcharacters
+
+\permanent\protected\def\activatemathcharacter#1%
+ {\appendtoks
+ \global\mathcode#1=\activemathcharcode
+ \to \activatedmathcharacters}
+
+\permanent\def\activatemathcharacters
+ {\the\activatedmathcharacters}
+
+% beware, not runtime, so has to happen at format generation
+
+\activatemathcharacter\circumflexasciicode
+\activatemathcharacter\underscoreasciicode
+\activatemathcharacter\ampersandasciicode
+
+\permanent\def\normalmathaligntab{&} % \let\normalmathaligntab\aligntab does to work well in a let to & (a def works ok)
+
+\appendtoks
+ \edef\p_ampersand{\mathematicsparameter\s!ampersand}%
+ \ifx\p_ampersand\v!normal
+ \enforced\let\specialmathaligntab\normalmathaligntab
+ \else
+ \enforced\let\specialmathaligntab\mathampersand
+ \fi
+\to \everysetupmathematics
+
+%D A simplified version of this code is:
+%D
+%D \starttyping
+%D \catcode"26=12
+%D
+%D \bgroup
+%D \global\mathcode"26="8000
+%D
+%D \catcode"26=4
+%D
+%D \xdef\normalmathaligntab{&}
+%D
+%D \catcode"26=13
+%D
+%D \global\everymath{\def&{\normalmathaligntab}}
+%D \egroup
+%D \stoptyping
+%D
+%D The following works okay:
+%D
+%D \starttyping
+%D A & B
+%D \stoptyping
+%D
+%D As does:
+%D
+%D \starttyping
+%D $A \Umathchar"2"0"26 B$
+%D \stoptyping
+%D
+%D But the next code:
+%D
+%D \starttyping
+%D $A \char"26 B$
+%D \stoptyping
+%D
+%D fails with: \type{Misplaced alignment tab character &} and here is the
+%D reason.
+%D
+%D When we have a letter or other category a check happens for an active
+%D character and when it has one then it gets expanded and fed back into the
+%D scanner (sort of).
+%D
+%D A \type {\char} is also fed back as raw character and again when it's letter
+%D of other goes through the same process.
+%D
+%D This means that we cannot have a definition like:
+%D
+%D \starttyping
+%D \def\AND{\char"26\relax}
+%D \stoptyping
+%D
+%D that can be used in math mode, which is why the cweb macros do:
+%D
+%D \starttyping
+%D \def\AND{\def\AND{\mathchar"2026\relax}\AND}
+%D \stoptyping
+%D
+%D Maybe we need an option to treat chars like chars.
+
+% \activatemathcharacter\primeasciicode
+
+% not used:
+%
+% \mathcode\spaceasciicode\activemathcharcode
+%
+% not used:
+%
+% \bgroup
+% \catcode\underscoreasciicode\activecatcode
+% \doglobal\appendtoks
+% \mathcode\underscoreasciicode\activemathcharcode
+% \let_\activemathunderscore
+% \to \everymathematics
+% \egroup
+
+% Here follows some plain legacy: primes.
+%
+% The \let\prime\math_prime_indeed might become an obsolete as we have \doubleprime
+% and \tripleprime and collapsing can nicely handle the script then.
+%
+% Collapsing to 0x2033 and 0x2034 happens elsewhere.
+%
+% \switchtobodyfont[modern]
+% \switchtobodyfont[cambria]
+% \switchtobodyfont[xits]
+% \switchtobodyfont[minion]
+% \setupbodyfont[dejavu]
+%
+% \startbuffer
+% \def\SampleLine#1{%
+% \NC#1
+% \NC\switchtobodyfont[#1]$f^2$ % 1
+% \NC\switchtobodyfont[#1]$f\prime^2$ % 2
+% \NC\switchtobodyfont[#1]$f\prime\prime^2$ % 3
+% \NC\switchtobodyfont[#1]$f\prime\prime\prime^2$ % 4
+% \NC\switchtobodyfont[#1]$f{\prime}^2$ % 5
+% \NC\switchtobodyfont[#1]$f{\prime\prime}^2$ % 6
+% \NC\switchtobodyfont[#1]$f{\prime\prime\prime}^2$ % 7
+% \NC\switchtobodyfont[#1]$f'(x)$ % 8
+% \NC\switchtobodyfont[#1]$f''(x)$ % 9
+% \NC\switchtobodyfont[#1]$f'''(x)$ % 10
+% \NC\NR
+% }
+%
+% \starttabulate[|Tl|Tc|Tc|Tc|Tc|Tc|Tc|Tc|Tc|Tc|Tc|]
+% \NC\NC1\NC2\NC3\NC4\NC5\NC6\NC7\NC8\NC9\NC10\NC\NR
+% \SampleLine{modern}
+% \SampleLine{cambria}
+% \SampleLine{xits}
+% \SampleLine{minion}
+% \stoptabulate
+% \stopbuffer
+%
+% \typebuffer \getbuffer
+
+% most math fonts have messed up primes, just test this: $\prime^{\prime^{\prime}}$
+
+{ \catcode\circumflexasciicode\othercatcode \immutable\glet\othercircumflextoken ^ }
+{ \catcode\circumflexasciicode\superscriptcatcode \immutable\glet\superscriptcircumflextoken^ }
+
+\ifdefined \prime \else
+ \Umathchardef\prime "0 "0 "2032
+\fi
+
+% \let\math_prime_indeed_normal\prime
+%
+% \appendtoks
+% \let\math_prime_indeed_normal\prime % gets defined later
+% \let\mathfontprime\prime % for tracing
+% \let\prime\math_prime_indeed % so this is needed
+% \to \everydump
+%
+% \protected\def\math_prime_indeed
+% {\iffontchar\textfont\zerocount"FE325\relax
+% ^\bgroup
+% \expandafter\math_prime_indeed_virtual % virtual mess (using funny signal)
+% \else
+% % \expandafter\math_prime_indeed_normal % gets collapsed
+% \expandafter\math_prime_indeed_crapped % gets collapsed
+% \fi}
+%
+% \def\math_prime_indeed_crapped
+% {{^{\math_prime_indeed_normal}}}
+%
+% % \let\prime\math_prime_indeed
+%
+% \def\math_prime_indeed_virtual
+% {\math_prime_indeed_normal
+% \futurelet\nexttoken\math_prime_indeed_choice}
+%
+% \installcorenamespace{mathprime}
+%
+% \def\math_prime_indeed_choice
+% {\csname\??mathprime
+% \ifx '\nexttoken a\else
+% \ifx \math_prime_indeed_normal\nexttoken a\else
+% \ifx \prime\nexttoken a\else
+% \ifx\superscriptcircumflextoken\nexttoken b\else
+% \ifx\othercircumflextoken \nexttoken b\else
+% c\fi\fi\fi\fi\fi
+% \endcsname}
+%
+% \setvalue{\??mathprime a}#1{\math_prime_indeed_virtual}
+% \setvalue{\??mathprime b}#1#2{#2\egroup}
+% \setvalue{\??mathprime c}{\egroup}
+%
+% \let\activemathprime\math_prime_indeed
+%
+% \bgroup
+%
+% \catcode\primeasciicode\activecatcode
+%
+% \global\everymathematics\expandafter{\the\everymathematics\let'\math_prime_indeed} % todo: do this at the lua end
+%
+% \egroup
+
+% $\char26$ gives an error because it expands to an active character that
+% then becomes an & which is then seen as an alignment character; anyway,
+% even when we switch like this the different meaning only happens when
+% we're in math mode which can be delayed till we're in a cell
+
+\bgroup
+
+ \catcode\underscoreasciicode\activecatcode
+ \catcode\circumflexasciicode\activecatcode
+ \catcode\ampersandasciicode \activecatcode
+
+ \aliased\glet\specialmathaligntab\normalmathaligntab
+
+ \permanent\protected\gdef\obeymathcatcodes{%
+ \enforced\let _\normalsubscript
+ \enforced\let ^\normalsuperscript
+ \enforced\def &\specialmathaligntab
+ }
+
+ \doglobal\appendtoks
+ \enforced\let _\normalsubscript
+ \enforced\let ^\normalsuperscript
+ \enforced\let &\specialmathaligntab
+ \to \everymathematics
+
+ % \permanent\protected\gdef\normalmathampersands
+ % {\let\specialmathaligntab\mathampersand}
+
+\egroup
+
+\newtoks\everydonknuthmode
+\newtoks\everynonknuthmode
+
+\newconditional \knuthmode
+
+\aliased\let\nonknuthmode\relax % no longer needed in MkIV
+\aliased\let\donknuthmode\relax % no longer needed in MkIV
+
+% \def\nonknuthmode
+% {\pushcatcodetable
+% \setcatcodetable\ctxcatcodes
+% \the\everynonknuthmode
+% \let\nonknuthmode\relax
+% \popcatcodetable}
+%
+% \def\donknuthmode
+% {\pushcatcodetable
+% \setcatcodetable\ctxcatcodes
+% \the\everydonknuthmode
+% \popcatcodetable}
+%
+% \bgroup
+%
+% \catcode\underscoreasciicode\activecatcode
+% \catcode\circumflexasciicode\activecatcode
+% \catcode\ampersandasciicode \activecatcode
+%
+% \global \everynonknuthmode {\appendtoks
+% \let_\normalsubscript
+% \let^\normalsuperscript
+% \let&\normalmathaligntab % use \def when it's \aligntab
+% \to \everymathematics}
+%
+% \egroup
+%
+% \appendtoks
+% \setfalse\knuthmode
+% \catcode\underscoreasciicode\othercatcode
+% \catcode\circumflexasciicode\othercatcode
+% \catcode\ampersandasciicode \othercatcode
+% \to \everynonknuthmode
+%
+% \appendtoks
+% \settrue\knuthmode
+% \catcode\underscoreasciicode\subscriptcatcode
+% \catcode\circumflexasciicode\superscriptcatcode
+% \catcode\ampersandasciicode \alignmentcatcode
+% \to \everydonknuthmode
+%
+% \appendtoks
+% \startextendcatcodetable\ctxcatcodes
+% \catcode\underscoreasciicode\othercatcode
+% \catcode\circumflexasciicode\othercatcode
+% \catcode\ampersandasciicode \othercatcode
+% \stopextendcatcodetable
+% \to \everynonknuthmode
+%
+% \appendtoks
+% \startextendcatcodetable\ctxcatcodes
+% \catcode\underscoreasciicode\subscriptcatcode
+% \catcode\circumflexasciicode\superscriptcatcode
+% \catcode\ampersandasciicode \alignmentcatcode
+% \stopextendcatcodetable
+% \to \everydonknuthmode
+
+%D Even more drastic (this code will move as nonknuthmode is default now)
+
+% \protected\def\enableasciimode
+% {\ctxlua{resolvers.macros.enablecomment()}%
+% \glet\enableasciimode\relax}
+%
+% \protected\def\asciimode
+% {\catcodetable\txtcatcodes
+% \enableasciimode
+% \nonknuthmode}
+%
+% \protected\def\startasciimode
+% {\pushcatcodetable
+% \catcodetable\txtcatcodes
+% \enableasciimode
+% \nonknuthmode}
+%
+% \protected\def\stopasciimode
+% {\popcatcodetable
+% \ifconditional\knuthmode\else\donknuthmode\fi}
+
+\permanent\protected\def\enableasciimode
+ {\clf_enableasciimode} % relaxes itself
+
+\permanent\protected\def\asciimode
+ {\catcodetable\txtcatcodes
+ \clf_enableasciimode}
+
+\permanent\protected\def\startasciimode
+ {\pushcatcodetable
+ \catcodetable\txtcatcodes
+ \clf_enableasciimode}
+
+\permanent\protected\def\stopasciimode
+ {\popcatcodetable}
+
+%D Needed for unicode:
+
+\permanent\def\nulloperator{\mathortext{\mathop{\emptyhbox}}{\emptyhbox}}
+
+%D Memory saver:
+
+\def\math_basics_check_compact
+ {\doifelse{\mathematicsparameter\c!compact}\v!yes
+ \enabledirectives\disabledirectives[math.virtual.optional]}
+
+\appendtoks
+ \ifempty\currentmathematics
+ \math_basics_check_compact % less tracing
+ \fi
+\to \everysetupmathematics
+
+\setupmathematics
+ [\c!compact=\v!no]
+
+% \enabletrackers[typesetters.directions.math]
+
+%D Right||to||left typesetting in math is supported by the \type {align} parameter
+%D with as option the \type {bidi} parameter. Of course support for special symbols
+%D like square roots depends on the font as well. We probably need to mirror a few
+%D more characters.
+%D
+%D \startbuffer
+%D \removeunwantedspaces
+%D \m{ ( 1 = 1) }\quad
+%D \m{ (123 = 123) }\quad
+%D \m{ a ( 1 = 1) b }\quad
+%D \m{ a (123 = 123) b }\quad
+%D \m{ x = 123 y + (1 / \sqrt {x}) }
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \starttabulate[|T|T||]
+%D \HL
+%D \NC align \NC bidi \NC \NC \NR
+%D \HL
+%D \NC l2r \NC no \NC \setupmathematics[bidi=no] \getbuffer \NC \NR
+%D \NC l2r \NC yes \NC \setupmathematics[bidi=yes] \getbuffer \NC \NR
+%D \NC r2l \NC no \NC \setupmathematics[align=r2l,bidi=no] \getbuffer \NC \NR
+%D \NC r2l \NC yes \NC \setupmathematics[align=r2l,bidi=yes] \getbuffer \NC \NR
+%D \HL
+%D \stoptabulate
+
+% We will use proper constants when we go numbers instead of XXX.
+
+\newconditional\c_math_right_to_left
+
+\installcorenamespace{mathaligndirection}
+
+\setvalue{\??mathaligndirection r2l}{\settrue\c_math_right_to_left}
+\setvalue{\??mathaligndirection\v!righttoleft}{\settrue\c_math_right_to_left}
+
+\appendtoks
+ \ifcsname\??mathaligndirection\mathematicsparameter\c!align\endcsname
+ \lastnamedcs
+ \else
+ \setfalse\c_math_right_to_left
+ \fi
+\to \everyswitchmathematics
+
+\protected\def\math_basics_synchronize_direction
+ {\mathdirection\ifconditional\c_math_right_to_left\directionrighttoleft\else\directionlefttoright\fi}
+
+% Not \everymathematics as it comes too late and I'm not in the mood for a mixed mode
+% kludge now (should be a property of beginmath nodes and passed to callbacks).
+
+\appendtoks
+ \math_basics_synchronize_direction
+\to \everyswitchmathematics
+
+% experimental (needed for an article)
+
+\installcorenamespace {mathbidi}
+
+\newcount\c_math_bidi
+
+\def\math_bidi_enable {\clf_setmathdirection\plusone \relax\c_math_bidi\plusone}
+\def\math_bidi_disable{\clf_setmathdirection\zerocount\relax\c_math_bidi\attributeunsetvalue}
+
+\letvalue{\??mathbidi\v!yes}\math_bidi_enable
+\letvalue{\??mathbidi\v!no }\math_bidi_disable
+
+\appendtoks
+ \edef\p_bidi{\mathematicsparameter\c!bidi}% still needed ?
+ \ifcsname\??mathbidi\p_bidi\endcsname\lastnamedcs\else\math_bidi_disable\fi
+\to \everysetupmathematics
+
+\appendtoks
+ \c_attr_mathbidi\ifconditional\c_math_right_to_left\c_math_bidi\else\attributeunsetvalue\fi
+\to \everyswitchmathematics
+
+%D Delayed: greek.
+%D
+%D \starttyping
+%D \usetypescript[cambria]\setupbodyfont[cambria]
+%D \startTEXpage
+%D $\alpha \mathgreekupright \alpha \mathgreekitalic \alpha$
+%D \stopTEXpage
+%D \stoptyping
+
+% [lc uc] normal (upright) = 2, italic = 3, none = 0/1
+
+% We can move the setting to the lua end and use abstract numbers instead
+% if funny ones here.
+
+\installcorenamespace{mathgreek}
+
+\newconstant\c_math_greek_attribute
+
+\setvalue{\??mathgreek\v!none }{1}
+\setvalue{\??mathgreek\v!normal}{2}
+\setvalue{\??mathgreek\v!italic}{3}
+
+% \appendtoks
+% \edef\p_sygreek{\mathematicsparameter\s!sygreek}%
+% \edef\p_lcgreek{\mathematicsparameter\s!lcgreek}%
+% \edef\p_ucgreek{\mathematicsparameter\s!ucgreek}%
+% \c_math_greek_attribute"% hex digits
+% \csname\??mathgreek\ifcsname\??mathgreek\p_sygreek\endcsname\p_sygreek\else\v!none\fi\endcsname
+% \csname\??mathgreek\ifcsname\??mathgreek\p_lcgreek\endcsname\p_lcgreek\else\v!none\fi\endcsname
+% \csname\??mathgreek\ifcsname\??mathgreek\p_ucgreek\endcsname\p_ucgreek\else\v!none\fi\endcsname
+% \relax
+% \ifcase\c_math_greek_attribute
+% \c_math_greek_attribute\attributeunsetvalue
+% \fi
+% \to \everyswitchmathematics
+
+\appendtoks
+ \edef\p_sygreek{\mathematicsparameter\s!sygreek}% still needed ?
+ \edef\p_lcgreek{\mathematicsparameter\s!lcgreek}% still needed ?
+ \edef\p_ucgreek{\mathematicsparameter\s!ucgreek}% still needed ?
+ \c_math_greek_attribute"% hex digits
+ \ifcsname\??mathgreek\p_sygreek\endcsname\lastnamedcs\else1\fi
+ \ifcsname\??mathgreek\p_lcgreek\endcsname\lastnamedcs\else1\fi
+ \ifcsname\??mathgreek\p_ucgreek\endcsname\lastnamedcs\else1\fi
+ \relax
+ \ifcase\c_math_greek_attribute
+ \c_math_greek_attribute\attributeunsetvalue
+ \fi
+\to \everyswitchmathematics
+
+% only used local
+
+\permanent\protected\def\mathgreekupright{\c_attr_mathgreek"222\relax}
+\permanent\protected\def\mathgreekitalic {\c_attr_mathgreek"333\relax}
+\permanent\protected\def\mathgreekdefault{\c_attr_mathgreek"000\relax}
+
+\aliased\let\mathgreeknormal\mathgreekupright
+\aliased\let\mathgreeknone \mathgreekdefault
+
+\appendtoks
+ \c_attr_mathgreek\c_math_greek_attribute
+\to \everymathematics
+
+\setupmathematics
+ [\s!sygreek=\v!normal,
+ \s!lcgreek=\v!italic,
+ \s!ucgreek=\v!normal] % was: none
+
+%D Math collapsing (ligatures)
+
+\installcorenamespace{mathcollapsing}
+
+\setnewconstant\c_math_collapsing_attribute\attributeunsetvalue
+
+\letvalue{\??mathcollapsing 1}\plusone % specials
+\letvalue{\??mathcollapsing 2}\plustwo % specials + mathlist
+\letvalue{\??mathcollapsing 3}\plusthree % mathlist + specials
+\letvalue{\??mathcollapsing\v!none }\attributeunsetvalue
+\letvalue{\??mathcollapsing\v!reset}\attributeunsetvalue
+
+\def\math_collapsing_initialize
+ {\ifnum\c_math_collapsing_attribute=\attributeunsetvalue \else
+ \clf_initializemathcollapsing % one time
+ \glet\math_collapsing_initialize\relax
+ \fi}
+
+\appendtoks
+ \edef\p_collapsing{\mathematicsparameter\s!collapsing}%
+ \c_math_collapsing_attribute
+ \ifcsname\??mathcollapsing\p_collapsing\endcsname\lastnamedcs\else\attributeunsetvalue\fi
+ \relax
+\to \everyswitchmathematics % only in mathematics
+
+\appendtoks
+ \math_collapsing_initialize
+ \c_attr_mathcollapsing\c_math_collapsing_attribute
+\to \everymathematics
+
+\setupmathematics
+ [\s!collapsing=1] % so that we at least do primes
+
+%D Math italics (experiment)
+
+%D We need keys but what names to use and because we have hardcoded solution
+%D we can stick to numbers.
+
+\installcorenamespace{mathitalics}
+
+\setnewconstant\c_math_italics_attribute\attributeunsetvalue
+
+\letvalue{\??mathitalics 1}\plusone % fontitalics
+\letvalue{\??mathitalics 2}\plustwo % fontdata
+\letvalue{\??mathitalics 3}\plusthree % quad based
+\letvalue{\??mathitalics 4}\plusfour % combination of 1 and 3
+\letvalue{\??mathitalics\v!none }\attributeunsetvalue
+\letvalue{\??mathitalics\v!reset}\attributeunsetvalue
+
+\def\math_italics_initialize
+ {\ifnum\c_math_italics_attribute=\attributeunsetvalue \else
+ \clf_initializemathitalics % one time
+ \glet\math_italics_initialize\relax
+ \fi}
+
+\appendtoks
+ \edef\p_italics{\mathematicsparameter\s!italics}%
+ \c_math_italics_attribute
+ \ifcsname\??mathitalics\p_italics\endcsname\lastnamedcs\else\attributeunsetvalue\fi
+ \relax
+ % \math_italics_initialize
+\to \everyswitchmathematics % only in mathematics
+
+\appendtoks
+ \math_italics_initialize
+ \c_attr_mathitalics\c_math_italics_attribute
+\to \everymathematics
+
+% \setupmathematics % done later
+% [\s!italics=3] % 4 is probably better
+
+% looks nicer but can generate bogus csnames
+%
+% \setvalue{\??mathitalics1}{\math_italics_initialize\c_math_italics_attribute\plusone } % fontitalics
+% \setvalue{\??mathitalics2}{\math_italics_initialize\c_math_italics_attribute\plustwo } % fontdata
+% \setvalue{\??mathitalics3}{\math_italics_initialize\c_math_italics_attribute\plusthree} % quad based
+% \setvalue{\??mathitalics4}{\math_italics_initialize\c_math_italics_attribute\plusfour } % combination of 1 and 3
+%
+% \appendtoks
+% \c_math_italics_attribute\attributeunsetvalue
+% \csname\??mathitalics\mathematicsparameter\s!italics\endcsname
+% \to \everyswitchmathematics % only in mathematics
+
+%D Math kerns (experiment)
+
+\installcorenamespace{mathkernpairs}
+
+\setnewconstant\c_math_kernpairs_attribute\attributeunsetvalue % no real need for an extra constant
+
+\def\math_kernpairs_initialize
+ {\ifnum\c_math_kernpairs_attribute=\attributeunsetvalue \else
+ \clf_initializemathkernpairs % one time
+ \glet\math_kernpairs_initialize\relax
+ \fi}
+
+\appendtoks
+ \edef\p_kernpairs{\mathematicsparameter\s!kernpairs}%
+ \c_math_kernpairs_attribute\ifx\p_kernpairs\v!yes\plusone\else\attributeunsetvalue\fi\relax
+\to \everyswitchmathematics % only in mathematics
+
+\appendtoks
+ \math_kernpairs_initialize
+ \c_attr_mathkernpairs\c_math_kernpairs_attribute
+\to \everymathematics
+
+\setupmathematics
+ [\s!kernpairs=\v!no]
+
+%D \macros
+%D {enablemathpunctuation,disablemathpunctuation}
+%D
+%D \startbuffer
+%D \enablemathpunctuation$(1,2) (1, 2) (1{,}2) \hbox{foo, not bar}$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \blank{\getbuffer}\blank
+
+% \newconditional\automathpunctuation
+%
+% \protected\def\enablemathpunctuation {\settrue \automathpunctuation}
+% \protected\def\disablemathpunctuation{\setfalse\automathpunctuation}
+%
+% \appendtoks
+% \doifelse{\mathematicsparameter\v!autopunctuation}\v!yes\settrue\setfalse\automathpunctuation
+% \to \everyswitchmathematics
+%
+% \setupmathematics
+% [\v!autopunctuation=\v!no]
+%
+% \def\math_punctuation_next{\ifx\nexttoken\blankspace\signalcharacter\fi}
+%
+% \protected\def\math_punctuation_comma {\textcomma \futurelet\nexttoken\math_punctuation_next}
+% \protected\def\math_punctuation_period{\textperiod\futurelet\nexttoken\math_punctuation_next}
+%
+% \setnewconstant\c_math_comma "002C
+% \setnewconstant\c_math_period "002E
+% \setnewconstant\c_math_special"8000
+%
+% \bgroup
+%
+% \catcode\c_math_comma \activecatcode
+% \catcode\c_math_period\activecatcode
+%
+% \protected\gdef\math_punctuation_initialize_indeed
+% {\mathcode\c_math_comma \c_math_special
+% \mathcode\c_math_period\c_math_special
+% \let,\math_punctuation_comma
+% \let.\math_punctuation_period
+% \c_attr_mathpunctuation\plustwo}
+%
+% \protected\gdef\math_punctuation_initialize_yes
+% {\c_attr_mathpunctuation\plustwo}
+%
+% \protected\gdef\math_punctuation_initialize_nop
+% {\c_attr_mathpunctuation\plusone}
+%
+% \egroup
+%
+% \appendtoks
+% \ifconditional\automathpunctuation
+% \math_punctuation_initialize_indeed
+% \math_punctuation_initialize_yes
+% \let\enablemathpunctuation \math_punctuation_initialize_yes
+% \let\disablemathpunctuation\math_punctuation_initialize_nop
+% \fi
+% \to \everymathematics
+
+% Later I will look again into a \LUATEX\ based solution. It only makes sense
+% to delegate to \LUA\ when we have more variants and need analysis (experimental
+% trickery removed for a while).
+
+% \def\math_punctuation_comma_next {\ifx\nexttoken\blankspace\mathpunct\else\mathord\fi{\textcomma }}
+% \def\math_punctuation_period_next{\ifx\nexttoken\blankspace\mathpunct\else\mathord\fi{\textperiod}}
+%
+% \protected\def\math_punctuation_nop_comma {\mathpunct{\textcomma}}
+% \protected\def\math_punctuation_nop_period{\mathord{\textperiod}}
+%
+% \protected\def\math_punctuation_all_comma {\futurelet\nexttoken\math_punctuation_comma_next}
+% \protected\def\math_punctuation_all_period{\futurelet\nexttoken\math_punctuation_period_next}
+%
+% \let\math_punctuation_yes_comma \math_punctuation_all_comma
+% \let\math_punctuation_yes_period\math_punctuation_nop_period
+%
+% The next one is more efficient as it produces more flat noad lists for numbers.
+
+\setnewconstant\c_math_comma "002C
+\setnewconstant\c_math_period "002E
+%setnewconstant\c_math_colon "003A
+\setnewconstant\c_math_semicolon"003B
+\setnewconstant\c_math_special "8000
+
+% todo: use \Umathclass\c_math_comma\mathpunctcode etc for temporary switching
+
+\def\math_set_o_comma {\Umathcode\c_math_comma \mathordcode \zerocount\c_math_comma}
+\def\math_set_p_comma {\Umathcode\c_math_comma \mathpunctcode\zerocount\c_math_comma}
+\def\math_set_o_period {\Umathcode\c_math_period \mathordcode \zerocount\c_math_period}
+\def\math_set_p_period {\Umathcode\c_math_period \mathpunctcode\zerocount\c_math_period}
+\def\math_set_o_semicolon{\Umathcode\c_math_semicolon\mathordcode \zerocount\c_math_semicolon}
+\def\math_set_p_semicolon{\Umathcode\c_math_semicolon\mathpunctcode\zerocount\c_math_semicolon}
+
+\edef\math_set_o_both {\math_set_o_period\math_set_o_comma}
+\edef\math_set_p_both {\math_set_p_period\math_set_p_comma}
+
+\protected\def\math_punctuation_nop_comma {\begingroup\math_set_p_comma ,\endgroup}
+\protected\def\math_punctuation_nop_period {\begingroup\math_set_o_period .\endgroup}
+\protected\def\math_punctuation_nop_semicolon{\begingroup\math_set_p_semicolon;\endgroup}
+
+% todo: use new lookahead stuff
+
+\protected\def\math_punctuation_all_comma {\futurelet\nexttoken\math_punctuation_comma_next}
+\protected\def\math_punctuation_all_period {\futurelet\nexttoken\math_punctuation_period_next}
+\protected\def\math_punctuation_all_semicolon{\futurelet\nexttoken\math_punctuation_semicolon_next}
+
+ \let\math_punctuation_yes_comma \math_punctuation_all_comma
+ \let\math_punctuation_yes_period \math_punctuation_nop_period
+ \let\math_punctuation_yes_semicolon\math_punctuation_all_semicolon
+
+\def\math_punctuation_comma_next {\begingroup\Umathcode\c_math_comma \ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_comma ,\endgroup}
+\def\math_punctuation_period_next {\begingroup\Umathcode\c_math_period \ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_period .\endgroup}
+\def\math_punctuation_semicolon_next{\begingroup\Umathcode\c_math_semicolon\ifx\nexttoken\blankspace\mathordcode\else\mathordcode\fi\zerocount\c_math_semicolon;\endgroup}
+
+\installcorenamespace {mathautopunctuation}
+
+\bgroup
+
+ \catcode\c_math_comma \activecatcode
+ \catcode\c_math_period \activecatcode
+ \catcode\c_math_semicolon\activecatcode
+
+ \setgvalue{\??mathautopunctuation\v!no}%
+ {\let,\math_punctuation_nop_comma
+ \let.\math_punctuation_nop_period
+ \let;\math_punctuation_nop_semicolon}
+
+ % more efficient list:
+ %
+ % \setgvalue{\??mathautopunctuation\v!no}%
+ % {\Umathcode\c_math_period\mathordcode \zerocount\c_math_period
+ % \Umathcode\c_math_comma \mathpunctcode\zerocount\c_math_comma }
+
+ \setgvalue{\??mathautopunctuation\v!yes}%
+ {\let,\math_punctuation_yes_comma
+ \let.\math_punctuation_yes_period
+ \let;\math_punctuation_nop_semicolon}
+
+ \setgvalue{\??mathautopunctuation\v!all}%
+ {\let,\math_punctuation_all_comma
+ \let.\math_punctuation_all_period
+ \let;\math_punctuation_nop_semicolon}
+
+ \setgvalue{\??mathautopunctuation comma}%
+ {\let,\math_punctuation_yes_comma
+ \let.\math_punctuation_yes_period
+ \let;\math_punctuation_nop_semicolon}
+
+ \setgvalue{\??mathautopunctuation\v!yes\string,semicolon}%
+ {\let,\math_punctuation_yes_comma
+ \let.\math_punctuation_yes_period
+ \let;\math_punctuation_yes_semicolon}
+
+ \setgvalue{\??mathautopunctuation comma\string,semicolon}%
+ {\let,\math_punctuation_yes_comma
+ \let.\math_punctuation_yes_period
+ \let;\math_punctuation_yes_semicolon}
+
+ \setgvalue{\??mathautopunctuation\v!all\string,semicolon}%
+ {\let,\math_punctuation_all_comma
+ \let.\math_punctuation_all_period
+ \let;\math_punctuation_all_semicolon}
+
+\egroup
+
+% \appendtoks
+% \global\mathcode\c_math_comma \c_math_special
+% \global\mathcode\c_math_period \c_math_special
+% \global\mathcode\c_math_semicolon\c_math_special
+% \to \everyjob
+
+% \activatemathcharacter\c_math_comma
+% \activatemathcharacter\c_math_period
+% \activatemathcharacter\c_math_semicolon
+
+\appendtoks
+ \mathcode\c_math_comma \c_math_special
+ \mathcode\c_math_period \c_math_special
+ \mathcode\c_math_semicolon\c_math_special
+ \begincsname\??mathautopunctuation\mathematicsparameter\v!autopunctuation\endcsname
+\to \everymathematics
+
+\appendtoks
+ \ifcsname\??mathautopunctuation\mathematicsparameter\v!autopunctuation\endcsname \else
+ \letmathematicsparameter\v!autopunctuation\v!no
+ \fi
+\to \everysetupmathematics
+
+\permanent\protected\def\enablemathpunctuation {\csname\??mathautopunctuation\v!no \endcsname}
+\permanent\protected\def\disablemathpunctuation{\csname\??mathautopunctuation\v!yes\endcsname}
+
+\setupmathematics
+ [\v!autopunctuation=\v!no] % no | yes | all | comma | yes,semicolon | all,semicolon
+
+%D The consequences of setting this are as follows:
+%D
+%D \def\TestA#1#2#3%
+%D {\ifnum#1=0 \type{#2}\else\setupmathematics[autopunctuation={#2}]$#3$\fi}
+%D \def\TestB#1#2%
+%D {\NC \TestA{#1}{no} {#2}
+%D \NC \TestA{#1}{yes} {#2}
+%D \NC \TestA{#1}{yes,semicolon}{#2}
+%D \NC \TestA{#1}{all} {#2}
+%D \NC \TestA{#1}{all,semicolon}{#2}
+%D \NC \NR}
+%D \starttabulate[|c|c|c|c|c|]
+%D \TestB{0}{}
+%D \TestB{1}{(1,2)=(1, 2)}
+%D \TestB{1}{(1.2)=(1. 2)}
+%D \TestB{1}{(1;2)=(1; 2)}
+%D \stoptabulate
+
+%D \macros
+%D {mathstyle}
+%D
+%D If one want to be sure that something is typeset in the appropriate style, \type
+%D {\mathstyle} can be used:
+%D
+%D \starttyping
+%D \mathstyle{something}
+%D \stoptyping
+
+% \def\mathstyle#1%
+% {\mathchoice
+% {\displaystyle #1}%
+% {\textstyle #1}%
+% {\scriptstyle #1}%
+% {\scriptscriptstyle#1}}
+%
+% We now have a primitive operation for this. As the macro overloads a new
+% primitive introduced in \LUATEX, we need to use \type {\normalmathstyle} when we
+% consult the current math style.
+%
+% \let \mathstyle \Ustack % spoils cramped
+%
+% \let \mathstyle \firstofoneargument
+%
+% 0 = display
+% 1 = crampeddisplay
+% 2 = text
+% 3 = crampedtext
+% 4 = script
+% 5 = crampedscript
+% 6 = scriptscript
+% 7 = crampedscriptscript
+
+\permanent\def\uncramped#1%
+ {{\ifmathstyle
+ \or \displaystyle \or
+ \or \textstyle \or
+ \or \scriptstyle \or
+ \or \scriptscriptstyle \fi
+ #1}}
+
+\permanent\def\cramped#1%
+ {{\ifmathstyle
+ \crampeddisplaystyle \or \or % 0 -> 1
+ \crampedtextstyle \or \or % 2 -> 3
+ \crampedscriptstyle \or \or % 4 -> 5
+ \crampedscriptscriptstyle \fi % 6 -> 7
+ #1}}
+
+\permanent\def\triggermathstyle#1{\Ustyle\numexpr#1\relax}
+%permanent\def\mathstyletrigger#1{\numexpr#1\relax}
+\permanent\let\mathstyletrigger \firstofoneargument
+
+\permanent\def\triggeredmathstyleparameter#1% to bypass the relax
+ {\ifcase\numexpr\normalmathstyle\relax
+ #1\displaystyle \or % 0
+ #1\crampeddisplaystyle \or % 1
+ #1\textstyle \or % 2
+ #1\crampedtextstyle \or % 3
+ #1\scriptstyle \or % 4
+ #1\crampedscriptstyle \or % 5
+ #1\scriptscriptstyle \or % 6
+ #1\crampedscriptscriptstyle \else
+ % error
+ \fi}
+
+\permanent\def\mathstylefont#1% #1 is number (\normalmathstyle)
+ {\ifcase\numexpr#1\relax
+ \textfont \or
+ \textfont \or
+ \textfont \or
+ \textfont \or
+ \scriptfont \or
+ \scriptfont \or
+ \scriptscriptfont \or
+ \scriptscriptfont \else
+ \textfont
+ \fi\fam} % was \zerocount
+
+\permanent\def\somemathstylefont#1% #1 is number (\normalmathstyle)
+ {\ifcase\numexpr#1\relax
+ \textfont \or
+ \textfont \or
+ \textfont \or
+ \textfont \or
+ \scriptfont \or
+ \scriptfont \or
+ \scriptscriptfont \or
+ \scriptscriptfont \else
+ \textfont
+ \fi}
+
+\permanent\def\mathsmallstylefont#1% #1 is number (\normalmathstyle)
+ {\ifcase\numexpr#1\relax
+ \scriptfont \or
+ \scriptfont \or
+ \scriptfont \or
+ \scriptfont \or
+ \scriptscriptfont \or
+ \scriptscriptfont \or
+ \scriptscriptfont \or
+ \scriptscriptfont \else
+ \scriptfont
+ \fi\fam} % was \zerocount
+
+\permanent\def\mathstyleface#1% #1 is number (\normalmathstyle)
+ {\ifcase\numexpr#1\relax
+ \textface \or
+ \textface \or
+ \textface \or
+ \textface \or
+ \scriptface \or
+ \scriptface \or
+ \scriptscriptface \or
+ \scriptscriptface \else
+ \textface
+ \fi}
+
+\permanent\def\mathsmallstyleface#1% #1 is number (\normalmathstyle)
+ {\ifcase\numexpr#1\relax
+ \scriptface \or
+ \scriptface \or
+ \scriptface \or
+ \scriptface \or
+ \scriptscriptface \or
+ \scriptscriptface \or
+ \scriptscriptface \or
+ \scriptscriptface \else
+ \scriptface
+ \fi}
+
+\permanent\def\mathstylecommand#1#2#3%
+ {\ifcase\numexpr\normalmathstyle\relax
+ \expandafter#1\or
+ \expandafter#1\or
+ \expandafter#1\or
+ \expandafter#1\or
+ \expandafter#2\or
+ \expandafter#2\or
+ \expandafter#3\or
+ \expandafter#3\else
+ \expandafter#1\fi}
+
+% \permanent\def\textstyleface#1% #1 is number (\normalmathstyle)
+% {\ifcase\numexpr#1\relax
+% \tf \or
+% \tf \or
+% \tf \or
+% \tf \or
+% \tfx \or
+% \tfx \or
+% \tfxx \or
+% \tfxx \else
+% \tf
+% \fi}
+
+\permanent\protected\def\verbosemathstyle#1% #1 is number (\normalmathstyle)
+ {{\normalexpanded{\relax\darkgray\ttxx[\number#1:\ifcase\numexpr#1\relax
+ display\or % 0
+ crampeddisplay\or % 1
+ text\or % 2
+ crampedtext\or % 3
+ script\or % 4
+ crampedscript\or % 5
+ scriptscript\or % 6
+ crampedscriptscript\else % 7
+ unknown\fi]}}}
+
+\permanent\protected\def\showmathstyle{\verbosemathstyle\normalmathstyle}
+
+%D Handy too:
+
+\permanent\def\mathcharwd{\fontcharwd\mathstylefont\normalmathstyle}
+\permanent\def\mathcharht{\fontcharht\mathstylefont\normalmathstyle}
+\permanent\def\mathchardp{\fontchardp\mathstylefont\normalmathstyle}
+
+%D Some dimension fun:
+
+\aliased \let\mathexheight \exheight % also in math-ini.mkiv
+\permanent\def\mathemwidth {\Umathquad\normalmathstyle} % also in math-ini.mkiv
+
+%D A plain inheritance:
+
+\permanent\def\mathpalette#1#2%
+ {\mathchoice
+ {#1\displaystyle {#2}}%
+ {#1\textstyle {#2}}%
+ {#1\scriptstyle {#2}}%
+ {#1\scriptscriptstyle{#2}}}
+
+%D \macros
+%D {cramedllap, crampedrlap, crampedclap}
+%D
+%D In many cases, one wants to use the \tex {clap} macro in math mode while using
+%D subscripts. Normally, subscripts are in cramped mode, and these macros allow you
+%D to go to cramped mode. For example:
+%D
+%D \startbuffer
+%D \startformula
+%D \sum_{a^2 < b^2 < c^2} \quad
+%D \sum_{\clap{a^2 < b^2 < c^2}} \quad
+%D \sum_{\crampedclap{a^2 < b^2 < c^2}}
+%D \stopformula
+%D \stopbuffer
+%D
+%D \start
+%D \typebuffer
+%D \switchtobodyfont[24pt]
+%D \getbuffer
+%D \stop
+%D
+%D This used to be in \type {supp-math.mkxl}:
+
+\permanent\protected\def\crampedllap#1{\llap{\cramped#1}}
+\permanent\protected\def\crampedrlap#1{\rlap{\cramped#1}}
+\permanent\protected\def\crampedclap#1{\clap{\cramped#1}}
+
+%D Often we can use:
+%D
+%D \startbuffer
+%D $x^{\mathstylehbox{x^{\mathstylehbox{x}}}}$
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+% to be tested: {#1} but it could have side effects
+
+% \protected\def\mathstylehbox#1% sensitive for: a \over b => {a\over b} or \frac{a}{b}
+% {\normalexpanded{\hbox\bgroup
+% \startimath\triggermathstyle\normalmathstyle}\mathsurround\zeropoint#1\stopimath\egroup}
+
+\permanent\protected\def\mathstylehbox#1#% sensitive for: a \over b => {a\over b} or \frac{a}{b}
+ {\math_style_hbox{#1}}
+
+\protected\def\math_style_hbox#1#2% sensitive for: a \over b => {a\over b} or \frac{a}{b}
+ {\normalexpanded{\hbox#1\bgroup
+ \startimath\triggermathstyle\normalmathstyle}\mathsurround\zeropoint#2\stopimath\egroup}
+
+\permanent\protected\def\mathstylevbox#1%
+ {\normalexpanded{\vbox\bgroup
+ \startimath\triggermathstyle\normalmathstyle}\mathsurround\zeropoint#1\stopimath\egroup}
+
+\permanent\protected\def\mathstylevcenter#1%
+ {\normalexpanded{\vcenter\bgroup
+ \startimath\triggermathstyle\normalmathstyle}\mathsurround\zeropoint#1\stopimath\egroup}
+
+\permanent\protected\def\mathstylevcenteredhbox#1%
+ {\normalexpanded{\vcenter\bgroup\hbox\bgroup
+ \startimath\triggermathstyle\normalmathstyle}\mathsurround\zeropoint#1\stopimath\egroup\egroup}
+
+\permanent\protected\def\mathstylevcenteredvbox#1%
+ {\normalexpanded{\vcenter\bgroup\vbox\bgroup
+ \startimath\triggermathstyle\normalmathstyle}\mathsurround\zeropoint#1\stopimath\egroup\egroup}
+
+\permanent\protected\def\setmathsmalltextbox#1#2#%
+ {\normalizebodyfontsize\m_math_text_choice_face{\mathsmallstyleface\normalmathstyle}%
+ \setbox#1#2\bgroup
+ \font_basics_switchtobodyfont\m_math_text_choice_face
+ \let\next}
+
+\permanent\protected\def\setmathtextbox#1#2#%
+ {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+ \setbox#1#2\bgroup
+ \font_basics_switchtobodyfont\m_math_text_choice_face
+ \let\next}
+
+%D Here is the new mechanism ... it might replace some of the above but we will do
+%D that stepwise. Keep in mind that cramped only affects superscripts and even then,
+%D only when in a smaller size than normal.
+%D
+%D \def\TestMe#1%
+%D {\NC \ttbf #1
+%D \NC \ruledhbox{$\setupmathstyle[#1]x + x_j^2 + x_i^{e^2} + \frac{1}{x}$}
+%D \NC \ruledhbox{$\setupmathstyle[#1,small]x + x_j^2 + x_i^{e^2} + \frac{1}{x}$}
+%D \NC \NR}
+%D
+%D \starttabulate[|l|r|l|]
+%D \HL
+%D \NC \NC \NC \ttbf ...,small \NC \NR
+%D \HL
+%D \TestMe{text} \TestMe{text,cramped}
+%D \TestMe{script} \TestMe{script,cramped}
+%D \TestMe{scriptscript} \TestMe{scriptscript,cramped}
+%D \TestMe{display} \TestMe{display,cramped}
+%D \HL
+%D \stoptabulate
+
+\permanent\def\triggerdisplaystyle
+ {\ifmathstyle
+ \displaystyle \or
+ \crampeddisplaystyle \or
+ \displaystyle \or
+ \crampeddisplaystyle \or
+ \displaystyle \or
+ \crampeddisplaystyle \or
+ \displaystyle \or
+ \crampeddisplaystyle \or
+ \fi}
+
+\permanent\def\triggertextstyle
+ {\ifmathstyle
+ \textstyle \or
+ \crampedtextstyle \or
+ \textstyle \or
+ \crampedtextstyle \or
+ \textstyle \or
+ \crampedtextstyle \or
+ \textstyle \or
+ \crampedtextstyle \else
+ \fi}
+
+\permanent\def\triggerscriptstyle
+ {\ifmathstyle
+ \scriptstyle \or
+ \crampedscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \or
+ \fi}
+
+\permanent\def\triggerscriptscriptstyle
+ {\ifmathstyle
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \fi}
+
+\permanent\def\triggeruncrampedstyle
+ {\ifmathstyle
+ \or \displaystyle \or
+ \or \textstyle \or
+ \or \scriptstyle \or
+ \or \scriptscriptstyle \fi}
+
+\permanent\def\triggercrampedstyle
+ {\ifmathstyle
+ \crampeddisplaystyle \or \or
+ \crampedtextstyle \or \or
+ \crampedscriptstyle \or \or
+ \crampedscriptscriptstyle \fi}
+
+\permanent\def\triggersmallstyle
+ {\ifmathstyle
+ \scriptstyle \or
+ \crampedscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \fi}
+
+\permanent\def\triggeruncrampedsmallstyle
+ {\ifmathstyle
+ \scriptstyle \or
+ \scriptstyle \or
+ \scriptstyle \or
+ \scriptstyle \or
+ \scriptscriptstyle \or
+ \scriptscriptstyle \or
+ \scriptscriptstyle \or
+ \scriptscriptstyle \or
+ \fi}
+
+\permanent\def\triggercrampedsmallstyle
+ {\ifmathstyle
+ \crampedscriptstyle \or
+ \crampedscriptstyle \or
+ \crampedscriptstyle \or
+ \crampedscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \crampedscriptscriptstyle \or
+ \fi}
+
+\permanent\def\triggerbigstyle
+ {\ifmathstyle
+ \displaystyle \or
+ \crampeddisplaystyle \or
+ \textstyle \or
+ \crampedtextstyle \or
+ \textstyle \or
+ \crampedtextstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \or
+ \fi}
+
+\permanent\def\triggeruncrampedbigstyle
+ {\ifmathstyle
+ \displaystyle \or
+ \displaystyle \or
+ \textstyle \or
+ \textstyle \or
+ \textstyle \or
+ \textstyle \or
+ \scriptstyle \or
+ \scriptstyle \or
+ \fi}
+
+\permanent\def\triggercrampedbigstyle
+ {\ifmathstyle
+ \crampeddisplaystyle \or
+ \crampeddisplaystyle \or
+ \crampedtextstyle \or
+ \crampedtextstyle \or
+ \crampedtextstyle \or
+ \crampedtextstyle \or
+ \crampedscriptstyle \or
+ \crampedscriptstyle \or
+ \fi}
+
+\newcount\c_math_saved_style
+
+\permanent\protected\def\pushmathstyle % assumes begingroup .. endgroup
+ {\c_math_saved_style\mathstyle}
+
+\permanent\protected\def\popmathstyle
+ {\ifnum\mathstyle=\c_math_saved_style\else
+ \triggermathstyle\c_math_saved_style
+ \fi}
+
+\installcorenamespace{mathstylecommand}
+\installcorenamespace{mathstylecache}
+
+\newconstant\c_math_styles_state_style
+\newconstant\c_math_styles_state_cramped
+\newconstant\c_math_styles_state_size
+
+\def\math_style_add_to_cache_choice {%
+ \ifcase\c_math_styles_state_size
+ \ifcase\c_math_styles_state_style
+ \ifcase\c_math_styles_state_cramped
+ \relax \or
+ \noexpand\triggeruncrampedstyle \or
+ \noexpand\triggercrampedstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerdisplaystyle \or
+ \displaystyle \or
+ \crampeddisplaystyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggertextstyle \or
+ \textstyle \or
+ \crampedtextstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerscriptscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \fi
+ \fi
+ \or % small
+ \ifcase\c_math_styles_state_style
+ \ifcase\c_math_styles_state_cramped
+ \noexpand\triggersmallstyle \or
+ \noexpand\triggeruncrampedsmallstyle \or
+ \noexpand\triggercrampedsmallstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerscriptscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerscriptscriptstyle \or
+ \scriptscriptstyle \or
+ \crampedscriptscriptstyle \fi
+ \fi
+ \or % large
+ \ifcase\c_math_styles_state_style
+ \ifcase\c_math_styles_state_cramped
+ \noexpand\triggerbigstyle \or
+ \noexpand\triggeruncrampedbigstyle \or
+ \noexpand\triggercrampedbigstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerdisplaystyle \or
+ \displaystyle \or
+ \crampeddisplaystyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggertextstyle \or
+ \textstyle \or
+ \crampedtextstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggertextstyle \or
+ \textstyle \or
+ \crampedtextstyle \fi
+ \or\ifcase\c_math_styles_state_cramped
+ \noexpand\triggerscriptstyle \or
+ \scriptstyle \or
+ \crampedscriptstyle \fi
+ \fi
+ \fi
+}
+
+\permanent\tolerant\protected\def\setmathstyle[#1]#;#=% so we accept [] and {}
+ {\edef\m_math_style_asked{#1#2}%
+ \ifempty\m_math_style_asked \else
+ \math_style_set_indeed
+ \fi}
+
+\permanent\def\installmathstyle#1#2%
+ {\ifcsname\??mathstylecommand#1\endcsname \else
+ \setvalue{\??mathstylecommand#1}{#2}%
+ \fi}
+
+\def\math_style_collect#1%
+ {\csname\??mathstylecommand#1\endcsname}
+
+\setvalue{\??mathstylecommand\s!display }{\c_math_styles_state_style \plusone}
+\setvalue{\??mathstylecommand\s!text }{\c_math_styles_state_style \plustwo}
+\setvalue{\??mathstylecommand\s!script }{\c_math_styles_state_style \plusthree}
+\setvalue{\??mathstylecommand\s!scriptscript}{\c_math_styles_state_style \plusfour}
+
+\setvalue{\??mathstylecommand\s!uncramped }{\c_math_styles_state_cramped\plusone}
+\setvalue{\??mathstylecommand\s!cramped }{\c_math_styles_state_cramped\plustwo}
+\setvalue{\??mathstylecommand\v!normal }{\c_math_styles_state_cramped\plusone}
+\setvalue{\??mathstylecommand\v!packed }{\c_math_styles_state_cramped\plustwo}
+
+\setvalue{\??mathstylecommand\v!small }{\c_math_styles_state_size \plusone}
+\setvalue{\??mathstylecommand\v!big }{\c_math_styles_state_size \plustwo}
+
+\permanent\protected\def\setupmathstyle[#1]%
+ {\edef\m_math_style_asked{#1}%
+ \ifempty\m_math_style_asked \else
+ \math_style_set_indeed
+ \fi}
+
+\permanent\protected\def\usemathstyleparameter#1% faster local variant
+ {\edef\m_math_style_asked{#1\c!mathstyle}%
+ \ifempty\m_math_style_asked \else
+ \math_style_set_indeed
+ \fi}
+
+%D \startbuffer
+%D \definemathstyle[mystyle][scriptscript]
+%D
+%D $text\startmathstyle[mystyle]scriptscript\stopmathstyle text$
+%D \stopbuffer
+%D
+%D \typebuffer \blank \start \getbuffer \stop \blank
+
+\installcorenamespace {mathstyle}
+
+\permanent\tolerant\protected\def\definemathstyle[#1]#*[#2]%
+ {\c_math_styles_state_style \zerocount
+ \c_math_styles_state_cramped\zerocount
+ \c_math_styles_state_size \zerocount
+ \rawprocesscommacommand[#2]\math_style_collect
+ \letcsname\??mathstyle#1\normalexpanded{\endcsname\math_style_add_to_cache_choice}}
+
+\def\math_style_set_indeed
+ {\ifcsname\??mathstyle\m_math_style_asked\endcsname
+ \lastnamedcs
+ \else
+ \math_style_set_mathstyle_mathstyle
+ \fi}
+
+\def\math_style_set_mathstyle_mathstyle
+ {\ifcsname\??mathstylecache\m_math_style_asked\endcsname
+ \lastnamedcs
+ \else
+ \math_style_set_mathstyle_mathstylecache
+ \fi}
+
+\def\math_style_set_mathstyle_mathstylecache
+ {\c_math_styles_state_style \zerocount
+ \c_math_styles_state_cramped\zerocount
+ \c_math_styles_state_size \zerocount
+ \rawprocesscommacommand[\m_math_style_asked]\math_style_collect
+ \gletcsname\??mathstylecache\m_math_style_asked\normalexpanded{\endcsname\math_style_add_to_cache_choice}%
+ \csname\??mathstylecache\m_math_style_asked\endcsname}
+
+\letvalue{\??mathstyle \??mathstyle }\math_style_set_mathstyle_mathstyle % still needed?
+\letvalue{\??mathstylecache\??mathstylecache}\math_style_set_mathstyle_mathstylecache % still needed?
+
+%D \startbuffer
+%D $x\begingroup\setupmathstyle[script]x\endgroup x$
+%D $x{\setupmathstyle[script]x}x$
+%D $x\startmathstyle[script]x\stopmathstyle x$
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\permanent\protected\def\startmathstyle[#1]%
+ {\edef\m_math_style_asked{#1}%
+ \ifempty\m_math_style_asked
+ \enforced\aliased\let\stopmathstyle\relax
+ \else
+ \bgroup
+ \math_style_set_indeed
+ \enforced\aliased\let\stopmathstyle\egroup
+ \fi}
+
+\aliased\let\stopmathstyle\relax
+
+\permanent\protected\def\startusemathstyleparameter#1%
+ {\edef\m_math_style_asked{#1\c!mathstyle}%
+ \ifempty\m_math_style_asked
+ \enforced\let\stopusemathstyleparameter\relax
+ \else
+ \bgroup
+ \math_style_set_indeed
+ \enforced\let\stopusemathstyleparameter\egroup
+ \fi}
+
+\aliased\let\stopusemathstyleparameter\relax
+
+%D Something similar can be used in the (re|)|definition of \type {\text}. This
+%D version is a variation on the one in the math module (see \type{m-math} and|/|or
+%D \type {m-newmat}).
+
+\let\m_math_text_choice_face\relax
+
+% if needed we can get rid of the normalize (predo in font code)
+
+% \def\math_text_choice_font#1#2#%
+% {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+% \hbox#2\bgroup
+% \font_basics_switchtobodyfont\m_math_text_choice_face
+% #1%
+% \let\next}
+
+% \def\math_text_choice_word#1#2#%
+% {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+% \hbox#2\bgroup
+% \font_basics_switchtobodyfont\m_math_text_choice_face
+% #1%
+% \nospacing % \normalnospaces\plusone
+% \let\next}
+
+%D We accept a low level box specification so that one can make helpers:
+%D
+%D \startbuffer
+%D \startformula
+%D \startalign[m=2,align={middle}]
+%D \NC \text to 6cm{One\hfill} \NC a = 1 \NR
+%D \NC \text to 6cm{One Two\hfill} \NC b = 2 \NR
+%D \NC \text to 6cm{One Two Three\hfill} \NC c = 3 \NR
+%D \stopalign
+%D \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\def\math_text_choice_font#1#2#%
+ {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+ \hbox#2\bgroup
+ \bgroup
+ \aftergroup\hss
+ \aftergroup\egroup
+ \hss
+ \font_basics_switchtobodyfont\m_math_text_choice_face
+ #1%
+ \let\next}
+
+\def\math_text_choice_word#1#2#%
+ {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+ \hbox#2\bgroup
+ \bgroup
+ \aftergroup\hss
+ \aftergroup\egroup
+ \hss
+ \font_basics_switchtobodyfont\m_math_text_choice_face
+ #1%
+ \nospacing % \normalnospaces\plusone
+ \let\next}
+
+% \ruledhbox{$\mathtext{abc ffi}$}
+% \ruledhbox{$\mathword{abc ffi}$}
+
+% I need to decide:
+%
+%mathscriptboxmode \zerocount % no kerning
+%mathscriptboxmode \plusone % lists
+\mathscriptboxmode \plustwo % lists and boxes
+\mathscriptcharmode \plusone % lists and boxes
+%mathscriptboxmode \plusthree % lists and boxes with \boundary=1 (also for testing and demo)
+\mathrulethicknessmode\plusone % adaptive
+
+\permanent\protected\def\mathtext {\mathortext{\math_text_choice_font\relax}\hbox}
+\permanent\protected\def\mathword {\mathortext{\math_text_choice_word\relax}\hbox}
+
+\permanent\protected\def\mathtexttf{\mathortext{\math_text_choice_font\tf}\hbox}
+\permanent\protected\def\mathtextit{\mathortext{\math_text_choice_font\it}\hbox}
+\permanent\protected\def\mathtextsl{\mathortext{\math_text_choice_font\sl}\hbox}
+\permanent\protected\def\mathtextbf{\mathortext{\math_text_choice_font\bf}\hbox}
+\permanent\protected\def\mathtextbi{\mathortext{\math_text_choice_font\bi}\hbox}
+\permanent\protected\def\mathtextbs{\mathortext{\math_text_choice_font\bs}\hbox}
+
+\permanent\protected\def\mathwordtf{\mathortext{\math_text_choice_word\tf}\hbox}
+\permanent\protected\def\mathwordit{\mathortext{\math_text_choice_word\it}\hbox}
+\permanent\protected\def\mathwordsl{\mathortext{\math_text_choice_word\sl}\hbox}
+\permanent\protected\def\mathwordbf{\mathortext{\math_text_choice_word\bf}\hbox}
+\permanent\protected\def\mathwordbi{\mathortext{\math_text_choice_word\bi}\hbox}
+\permanent\protected\def\mathwordbs{\mathortext{\math_text_choice_word\bs}\hbox}
+
+%D Safeguard against redefinitions:
+
+\appendtoks
+ \enforced\let\_\normalunderscore % is textunderscore or fakeunderscore
+\to \everymathematics
+
+%D Because we may overload \type {\text} in other (structuring) macros, we say:
+
+\appendtoks
+ \enforced\let\text\mathtext
+\to \everymathematics
+
+%D The next code is derived from plain \TEX. The names will change!
+
+\newcount\interdisplaylinepenalty \interdisplaylinepenalty\plushundred
+
+% Actually, not using an if saves one macro so there is no penalty
+% for splitting up this macro.
+%
+% \newif\ifdt@p
+%
+% \def\displ@y
+% {\global\dt@ptrue
+% \math_openup\displayopenupvalue % was \openup\jot
+% \everycr
+% {\noalign
+% {\ifdt@p
+% \global\dt@pfalse
+% \ifdim\prevdepth>-\thousandpoint
+% \vskip-\lineskiplimit
+% \vskip\normallineskiplimit
+% \fi
+% \else
+% \penalty\interdisplaylinepenalty
+% \fi}}}
+
+\newtoks\mathdisplayaligntweaks
+
+% this can become an option:
+
+\let\math_display_align_hack_indeed\relax
+
+\protected\def\math_display_align_hack % I don't like the global, maybe we should push and pop
+ {\glet\math_display_align_hack_indeed\math_display_align_hack_remove_skip
+ \math_openup\displayopenupvalue % was \math_openup\jot
+ \everycr{\noalign{\math_display_align_hack_indeed}}}
+
+\def\math_display_align_hack_remove_skip
+ {\ifdim\prevdepth>-\thousandpoint
+ \vskip\dimexpr-\lineskiplimit+\normallineskiplimit\relax
+ \fi
+ \glet\math_display_align_hack_indeed\math_display_align_hack_insert_penalty}
+
+\def\math_display_align_hack_insert_penalty
+ {\penalty\interdisplaylinepenalty}
+
+\appendtoks
+ \math_display_align_hack
+\to \mathdisplayaligntweaks
+
+%D Text in math:
+
+\permanent\protected\def\mathortext
+ {\ifmmode
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+% \defineactivecharacter _ {\mathortext{_}{\_}} text_text $a^2$
+
+% force text mode, will be overloaded later
+
+\ifdefined\text\else \aliased\let\text\hbox \fi
+
+% \protected\def\mathoptext#1{\mathop{\text{#1}}}
+
+\permanent\protected\def\mathoptext
+ {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
+ %\showmathstyle
+ \dowithnextbox
+ {\mathop{\box\nextbox}}%
+ \hbox\bgroup\font_basics_switchtobodyfont\m_math_text_choice_face\let\next}
+
+% new:
+
+% \startsetups math:morespacing
+% \Umathordordspacing\textstyle 1mu plus .5mu minus .25mu\relax
+% \stopsetups
+%
+% \setupmathematics
+% [setups=math:morespacing]
+
+\appendtoks
+ \edef\p_setups{\mathematicsparameter\c!setups}%
+ \ifempty\p_setups\else
+ \directsetup\p_setups
+ \fi
+\to \everyswitchmathematics
+
+% new:
+
+\permanent\protected\def\smallmathsymbol#1%
+ {\mathematics{\mathbin{\normalexpanded{\raise.15\exheight\hbox{\normalstartimath
+ \triggermathstyle{\the\numexpr\normalmathstyle+2\relax}#1%
+ \normalstopimath}}}}}
+
+% this should be a primitive:
+
+\permanent\def\mathextensiblecode#1#2{\clf_extensiblecode\numexpr#1\relax\numexpr#2\relax}
+\permanent\def\mathhorizontalcode#1#2{\clf_horizontalcode\numexpr#1\relax\numexpr#2\relax}
+
+% experimental:
+
+%D \starttyping
+%D \enabletrackers[math.openedup]
+%D
+%D \dorecurse{10}{\dorecurse{#1}{whatever }}
+%D
+%D \startitemize[packed]
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \stopitemize
+%D \startitemize[packed,columns]
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \stopitemize
+%D
+%D \dorecurse{5}{\dorecurse{#1}{whatever }\openedupimath{\frac{1}{2}} }
+%D
+%D \startitemize[packed,columns]
+%D \startitem whatever \openedupimath{1+2} whatever
+%D \startitem whatever \openedupimath{1+2} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{1+2} whatever
+%D \startitem whatever \openedupimath{1+2} whatever
+%D \stopitemize
+%D
+%D \dorecurse{5}{\dorecurse{#1}{whatever }\openedupimath{1+2} }
+%D
+%D \startitemize[packed]
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \startitem whatever \openedupimath{\frac{1}{2}} whatever
+%D \stopitemize
+%D
+%D \dorecurse{10}{whatever }
+%D \dorecurse {5}{\dorecurse{#1}{whatever }\openedupimath{\frac{1}{2}} }
+%D \dorecurse{10}{whatever }
+%D \stoptyping
+
+\def\m_math_inline_openup_ht{\dimexpr\ifinsidecolumns\strutdp\else\lineheight\fi/\plusfour\relax}
+\def\m_math_inline_openup_dp{\dimexpr\ifinsidecolumns\strutdp\else\lineheight\fi/\plusfour\relax}
+
+% \def\m_math_inline_openup_ht{\dimexpr\lineheight/\ifinsidecolumns\pluseight\else\plusfour\fi\relax}
+% \def\m_math_inline_openup_dp{\dimexpr\lineheight/\ifinsidecolumns\pluseight\else\plusfour\fi\relax}
+
+\installtextracker
+ {math.openedup}
+ {\let\math_inline_openup_start_yes\math_inline_openup_traced_start}
+ {\let\math_inline_openup_start_yes\math_inline_openup_normal_start}
+
+\protected\def\math_inline_openup_normal_start
+ {\scratchheight\dimexpr\ht\scratchbox+\m_math_inline_openup_ht\relax
+ \scratchdepth \dimexpr\dp\scratchbox+\m_math_inline_openup_dp\relax
+ \vrule\s!width\zeropoint\s!height\scratchheight\s!depth\scratchdepth\relax
+ \begingroup
+ \let\math_inline_openup_stop\math_inline_openup_normal_stop}
+
+\protected\def\math_inline_openup_normal_stop
+ {\endgroup
+ \vrule\s!width\zeropoint\s!height\scratchheight\s!depth\scratchdepth\relax}
+
+\protected\def\math_inline_openup_traced_start
+ {\scratchtopoffset \ht\scratchbox
+ \scratchbottomoffset\dp\scratchbox
+ \scratchheight \dimexpr\scratchtopoffset +\m_math_inline_openup_ht\relax
+ \scratchdepth \dimexpr\scratchbottomoffset+\m_math_inline_openup_dp\relax
+ \vrule\s!width\zeropoint\s!height\scratchheight\s!depth\scratchdepth\relax
+ \begingroup
+ \dousecolorparameter{darkred}%
+ \vrule\s!width\emwidth\s!height\scratchheight\s!depth-\scratchtopoffset\relax
+ \endgroup
+ \kern-\emwidth
+ \begingroup
+ \let\math_inline_openup_stop\math_inline_openup_traced_stop}
+
+\protected\def\math_inline_openup_traced_stop
+ {\endgroup
+ \kern-\emwidth
+ \begingroup
+ \dousecolorparameter{darkblue}%
+ \vrule\s!width\emwidth\s!height-\scratchbottomoffset\s!depth\scratchdepth\relax
+ \endgroup
+ \vrule\s!width\zeropoint\s!height\scratchheight\s!depth\scratchdepth\relax}
+
+\let\math_inline_openup_start_yes\math_inline_openup_normal_start
+\let\math_inline_openup_stop \relax
+
+\def\math_inline_openup_start_nop
+ {\let\math_inline_openup_stop\relax}
+
+\permanent\protected\def\openedupimath
+ {\dontleavehmode
+ \begingroup
+ \ifmmode
+ \expandafter\openedupimath_math
+ \else
+ \expandafter\openedupimath_text
+ \fi}
+
+\protected\def\openedupimath_math#1%
+ {\setbox\scratchbox\mathstylehbox{#1}%
+ \ifdim\ht\scratchbox>\strutht
+ \math_inline_openup_start_yes
+ \orelse\ifdim\dp\scratchbox>\strutdp
+ \math_inline_openup_start_yes
+ \else
+ \math_inline_openup_start_nop
+ \fi
+ #1%
+ \math_inline_openup_stop
+ \endgroup}
+
+\protected\def\openedupimath_text#1%
+ {\setbox\scratchbox\hbox{\startimath#1\stopimath}%
+ \ifdim\ht\scratchbox>\strutht
+ \math_inline_openup_start_yes
+ \orelse\ifdim\dp\scratchbox>\strutdp
+ \math_inline_openup_start_yes
+ \else
+ \math_inline_openup_start_nop
+ \fi
+ \startimath
+ #1%
+ \stopimath
+ \math_inline_openup_stop
+ \endgroup}
+
+% Also handy, especially for units:
+%
+% 0x002B=plus 0x2212=minus 0x2013=endash
+
+\permanent\protected\def\mathplus {+}
+\permanent\protected\def\mathminus {\ifmmode –\orelse\iffontchar\font`−−\else –\fi}
+\permanent\protected\def\mathplusminus{±}
+
+%D The \type {\displaywidth} is only known inside a display formula, so we need to catch
+%D it when still zero.
+
+\permanent\def\checkeddisplaywidth % hsize if zero
+ {\dimexpr
+ \ifzeropt\displaywidth
+ \hsize
+ \else
+ \displaywidth
+ \fi
+ \relax}
+
+\permanent\def\maximizeddisplaywidth % larger than zero but within hsize
+ {\dimexpr
+ \ifzeropt\displaywidth
+ \hsize
+ \orelse\ifdim\displaywidth>\hsize
+ \hsize
+ \else
+ \displaywidth
+ \fi
+ \relax}
+
+%D Experiment: (todo: same switch as italic, using \type {\everyswitchmathematics}).
+
+\newcount\c_math_domain_attribute
+
+\def\math_domain_initialize
+ {\ifnum\c_math_domain_attribute=\attributeunsetvalue \else
+ \clf_initializemathdomain % one time
+ \glet\math_domain_initialize\relax
+ \fi}
+
+\appendtoks
+ \edef\p_domain{\mathematicsparameter\c!domain}%
+ \ifempty\p_domain
+ \c_math_domain_attribute\attributeunsetvalue
+ \else
+ \c_math_domain_attribute\clf_getmathdomain\p_domain\relax
+ \math_domain_initialize
+ \fi
+\to \everyswitchmathematics % only in mathematics
+
+\appendtoks
+ \c_attr_mathdomain\c_math_domain_attribute
+\to \everymathematics
+
+\setupmathematics
+ [\s!italics=3] % for the moment only this one makes sense .. still experimental
+
+%D For special purposed we set this one:
+
+\installcorenamespace{mathrules}
+
+\permanent\protected\def\enablemathrules{\letgvalue{\??mathrules\fontclass}\plusone}
+
+\appendtoks
+ \mathrulesmode\ifcsname\??mathrules\fontclass\endcsname
+ \lastnamedcs
+ \else
+ \zerocount
+ \fi
+ \mathrulesfam\zerocount
+\to \everymathematics
+
+%D Maybe:
+
+% \starttabulate[|||c|c|]
+% \BC positive \BC negative \BC text \BC math \NC \NR
+% \NC \tex {f1} \tex {hairspace} \tex{,} \NC \tex {b1} \tex {neghairspace} \NC {\darkred\vl}\f1{\darkblue\vl} \NC ${\darkred\vl}\f1{\darkblue\vl}$ \NC \NR
+% \NC \tex {f2} \tex {thinspace} \tex{:} \NC \tex {b2} \tex {negthinspace} \tex{!} \NC {\darkred\vl}\f2{\darkblue\vl} \NC ${\darkred\vl}\f2{\darkblue\vl}$ \NC \NR
+% \NC \tex {f3} \tex {medspace} \tex{;} \NC \tex {b3} \tex {negmedspace} \NC {\darkred\vl}\f3{\darkblue\vl} \NC ${\darkred\vl}\f3{\darkblue\vl}$ \NC \NR
+% \NC \tex {f4} \tex {thickspace} \NC \tex {b4} \tex {negthickspace} \NC {\darkred\vl}\f4{\darkblue\vl} \NC ${\darkred\vl}\f4{\darkblue\vl}$ \NC \NR
+% \NC \tex {f5} \tex {enspace} \NC \tex {b5} \NC {\darkred\vl}\f5{\darkblue\vl} \NC ${\darkred\vl}\f5{\darkblue\vl}$ \NC \NR
+% \NC \tex {f6} \tex {emspace} \NC \tex {b6} \NC {\darkred\vl}\f6{\darkblue\vl} \NC ${\darkred\vl}\f6{\darkblue\vl}$ \NC \NR
+% \stoptabulate
+
+% \protected\def\negenspace{\kern-.5\emwidth}
+% \protected\def\negemspace{\kern- \emwidth}
+%
+% \protected\def\math_f#1%
+% {\ifcase#1\or
+% \hairspace
+% \or
+% \thinspace
+% \or
+% \medspace
+% \or
+% \thickspace
+% \or
+% \enspace
+% \or
+% \emspace
+% \fi}
+%
+% \protected\def\math_b#1%
+% {\ifcase#1\or
+% \neghairspace
+% \or
+% \negthinspace
+% \or
+% \negmedspace
+% \or
+% \negthickspace
+% \or
+% \negenspace
+% \or
+% \negemspace
+% \fi}
+%
+% \appendtoks
+% \let\f\math_f
+% \let\b\math_b
+% \to \everymathematics
+
+%D Experiment
+
+\permanent\protected\def\math_scripts_stack
+ {\c_attr_mathunstack\attributeunsetvalue}
+
+\permanent\protected\def\math_scripts_unstack
+ {\clf_enablescriptunstacking
+ \c_attr_mathunstack\plusone}
+
+\ifdefined\stackscripts \else \aliased\let\stackscripts \relax \fi
+\ifdefined\unstackscripts \else \aliased\let\unstackscripts\relax \fi
+
+\appendtoks
+ \enforced\let\stackscripts \math_scripts_stack
+ \enforced\let\unstackscripts\math_scripts_unstack
+\to \everymathematics
+
+%D Expensive (tracing and inject) but a primitive (using factors) is tricky as we
+%D want this frozen support.
+
+% \def\math_openup_parameter#1#2%
+% {\ifzeropt#1\displaystyle \orelse\ifdim#1\displaystyle =\maxdimen\else\frozen#1\displaystyle #2#1\displaystyle \fi
+% \ifzeropt#1\crampeddisplaystyle \orelse\ifdim#1\crampeddisplaystyle =\maxdimen\else\frozen#1\crampeddisplaystyle #2#1\crampeddisplaystyle \fi
+% \ifzeropt#1\textstyle \orelse\ifdim#1\textstyle =\maxdimen\else\frozen#1\textstyle #2#1\textstyle \fi
+% \ifzeropt#1\crampedtextstyle \orelse\ifdim#1\crampedtextstyle =\maxdimen\else\frozen#1\crampedtextstyle #2#1\crampedtextstyle \fi
+% \ifzeropt#1\scriptstyle \orelse\ifdim#1\scriptstyle =\maxdimen\else\frozen#1\scriptstyle #2#1\scriptstyle \fi
+% \ifzeropt#1\crampedscriptstyle \orelse\ifdim#1\crampedscriptstyle =\maxdimen\else\frozen#1\crampedscriptstyle #2#1\crampedscriptstyle \fi
+% \ifzeropt#1\scriptscriptstyle \orelse\ifdim#1\scriptscriptstyle =\maxdimen\else\frozen#1\scriptscriptstyle #2#1\scriptscriptstyle \fi
+% \ifzeropt#1\crampedscriptscriptstyle\orelse\ifdim#1\crampedscriptscriptstyle=\maxdimen\else\frozen#1\crampedscriptscriptstyle#2#1\crampedscriptscriptstyle\fi}
+
+% \def\mdim#1#2%
+% {\ifcase\ifzeropt#1#2\plusone\orelse\ifdim#1#2=\maxdimen\plusone\else\zerocount\fi}
+%
+% \def\mdim
+% {\afterassignment\mmdim\scratchdimen}
+%
+% \def\mmdim
+% {\ifcase\ifzeropt\scratchdimen\plusone\orelse\ifdim\scratchdimen=\maxdimen\plusone\else\zerocount\fi}
+%
+% \def\math_openup_parameter#1#2%
+% {\ifcondition\mdim#1\displaystyle \frozen#1\displaystyle #2\dimexpr#1\displaystyle \relax\fi
+% \ifcondition\mdim#1\crampeddisplaystyle \frozen#1\crampeddisplaystyle #2\dimexpr#1\crampeddisplaystyle \relax\fi
+% \ifcondition\mdim#1\textstyle \frozen#1\textstyle #2\dimexpr#1\textstyle \relax\fi
+% \ifcondition\mdim#1\crampedtextstyle \frozen#1\crampedtextstyle #2\dimexpr#1\crampedtextstyle \relax\fi
+% \ifcondition\mdim#1\scriptstyle \frozen#1\scriptstyle #2\dimexpr#1\scriptstyle \relax\fi
+% \ifcondition\mdim#1\crampedscriptstyle \frozen#1\crampedscriptstyle #2\dimexpr#1\crampedscriptstyle \relax\fi
+% \ifcondition\mdim#1\scriptscriptstyle \frozen#1\scriptscriptstyle #2\dimexpr#1\scriptscriptstyle \relax\fi
+% \ifcondition\mdim#1\crampedscriptscriptstyle\frozen#1\crampedscriptscriptstyle#2\dimexpr#1\crampedscriptscriptstyle\relax\fi}
+
+% \ifmathparameter : 0=zero, 1=set, 2=unset (les stracing clutter this way)
+
+%D New stuff:
+%D
+%D \starttyping
+%D $\mathopenupparameter\Umathradicalvgap{10.5}\sqrt[3]{x}$
+%D \stoptyping
+
+\permanent\protected\def\mathopenupparameter#1#2%
+ {\ifmathparameter#1\displaystyle \or\frozen#1\displaystyle #2#1\displaystyle \fi
+ \ifmathparameter#1\crampeddisplaystyle \or\frozen#1\crampeddisplaystyle #2#1\crampeddisplaystyle \fi
+ \ifmathparameter#1\textstyle \or\frozen#1\textstyle #2#1\textstyle \fi
+ \ifmathparameter#1\crampedtextstyle \or\frozen#1\crampedtextstyle #2#1\crampedtextstyle \fi
+ \ifmathparameter#1\scriptstyle \or\frozen#1\scriptstyle #2#1\scriptstyle \fi
+ \ifmathparameter#1\crampedscriptstyle \or\frozen#1\crampedscriptstyle #2#1\crampedscriptstyle \fi
+ \ifmathparameter#1\scriptscriptstyle \or\frozen#1\scriptscriptstyle #2#1\scriptscriptstyle \fi
+ \ifmathparameter#1\crampedscriptscriptstyle\or\frozen#1\crampedscriptscriptstyle#2#1\crampedscriptscriptstyle\fi}
+
+%D New stuff:
+%D
+%D \startbuffer
+%D $x\mathopen {!}+123+\mathclose {!}x$
+%D $x\tomathopen ! +123+\tomathclose ! x$
+%D $x\mathclose {!}+123+\mathopen {!}x$
+%D $x\tomathclose ! +123+\tomathopen ! x$
+%D $x ! +123+ ! x$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+
+\permanent\protected\def\tomathord {\Umathclass\zerocount}
+\permanent\protected\def\tomathop {\Umathclass\plusone } % \mathinfix
+\permanent\protected\def\tomathbin {\Umathclass\plustwo }
+\permanent\protected\def\tomathrel {\Umathclass\plusthree}
+\permanent\protected\def\tomathopen {\Umathclass\plusfour } % \mathprefix
+\permanent\protected\def\tomathclose{\Umathclass\plusfive } % \mathsuffix
+\permanent\protected\def\tomathpunct{\Umathclass\plussix }
+
+%D Prescripts. These work in \CONTEXT\ because we have the super- and subscript
+%D triggers enabled as active characters but when we would have
+%D
+%D \starttyping
+%D \catcode\underscoreasciicode\subscriptcatcode
+%D \catcode\circumflexasciicode\superscriptcatcode
+%D \stoptyping
+%D
+%D we also need the next line to disable character escaping via \type {^} in
+%D math mode:
+%D
+%D \startbuffer
+%D \blank \hbox{
+%D \ruledhbox{${\tf X} ^1 _2 ^^3 __4$}
+%D \ruledhbox{${\tf X} ^1 $}
+%D \ruledhbox{${\tf X} _2 $}
+%D \ruledhbox{${\tf X} ^^3 $}
+%D \ruledhbox{${\tf X} __4$}
+%D \ruledhbox{${\tf X} ^1 _2 $}
+%D \ruledhbox{${\tf X} ^1 ^^3 $}
+%D \ruledhbox{${\tf X} ^1 __4$}
+%D \ruledhbox{${\tf X} _2 ^^3 $}
+%D \ruledhbox{${\tf X} _2 __4$}
+%D \ruledhbox{${\tf X} ^1 _2 ^^3 $}
+%D \ruledhbox{${\tf X} ^1 _2 __4$}
+%D \ruledhbox{${\tf X} _2 ^^3 $}
+%D \ruledhbox{${\tf X} _2 ^^3 __4$}
+%D \ruledhbox{${\tf X} ^^3 __4$}
+%D } \blank
+%D
+%D \typebuffer \getbuffer
+
+\normalsupmarkmode\plusone % 2 also disable ^[^+] in text mode
+
+\protect \endinput
+
+% % not used (yet)
+%
+% \newtoks \everystartimath
+% \newtoks \everystopimath
+%
+% \protected\def\startimath{\Ustartmath\the\everystartimath}
+% \protected\def\stopimath {\the\everystopimath\Ustopmath}
+%
+% \protected\def\m%
+% {\relax
+% \ifmmode\expandafter\math_m_stay\else\expandafter\math_m_math\fi}
+%
+% \protected\def\math_m_math#1%
+% {\startimath#1\stopimath}
+%
+% \let\math_m_stay\firstofoneargument
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-inl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-inl.mkxl
new file mode 100644
index 00000000000..2c7284458a5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-inl.mkxl
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=math-inl,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Inline,
+%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 Math Macros / Inline}
+
+\unprotect
+
+% The \MKII\ math grid snapping code has gone. A pity as it was rather effective
+% and worked quite well (for a couple of projects where it was demanded). Other code
+% might show up / move here.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-int.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-int.mkxl
new file mode 100644
index 00000000000..a8dcd3c9525
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-int.mkxl
@@ -0,0 +1,141 @@
+%D \module
+%D [ file=math-int,
+%D version=2007.07.19,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Scripts,
+%D author={Hans Hagen \& Taco Hoekwater \& Aditya Mahajan},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Math Macros / Integrals}
+
+% todo: int and sum etc can be stackers
+
+\unprotect
+
+%D \startbuffer
+%D $\int _a^b f(x) dx $ and also
+%D $\iint _a^b f(x,y) dxdy$,
+%D $\iiint _a^b f(x,y) dxdy$,
+%D \startformula
+%D \int _a^b f(x) dx \quad
+%D \iint _a^b f(x) dx \quad
+%D \iiint _a^b f(x) dx \quad
+%D \stopformula
+%D \stopbuffer
+%D
+%D Default: \getbuffer
+%D
+%D Displaylimits: \setupmathematics[integral=displaylimits] \getbuffer
+%D
+%D Limits: \setupmathematics[integral=limits] \getbuffer
+
+%D Adapted to mkiv by HH from code by AM.
+
+\installcorenamespace{mathintegral}
+
+\newconstant\mathintlimitmode
+
+\permanent\def\intlimits % also used elsewhere
+ {\ifcase\mathintlimitmode
+ \nolimits
+ \or
+ \displaylimits
+ \or
+ \limits
+ \or
+ \ifnum\attribute\mathmodeattribute=\plusone
+ \limits
+ \else
+ \nolimits
+ \fi
+ \else
+ % none
+ \fi}
+
+\letvalue{\??mathintegral nolimits}\zerocount
+\letvalue{\??mathintegral displaylimits}\plusone
+\letvalue{\??mathintegral limits}\plustwo
+\letvalue{\??mathintegral autolimits}\plusthree
+\letvalue{\??mathintegral none}\plusfour
+
+\appendtoks
+ \mathintlimitmode\executeifdefined{\??mathintegral\mathematicsparameter\s!integral}\zerocount
+\to \everyswitchmathematics
+
+\setupmathematics
+% [\v!integral=nolimits]
+ [\v!integral=autolimits]
+
+%D The following code is used for fallbacks and might become obsolete once
+%D we have enough \OPENTYPE\ math fonts.
+
+% \def\math_repeated_integal_i
+% {\int}
+
+% \def\math_repeated_integal_ii
+% {\math_repeated_integal_i
+% \math_repeated_integral_kern
+% \math_repeated_integal_i
+% \math_repeat_integral_finish
+% \intlimits}
+
+% \def\math_repeated_integal_iii
+% {\math_repeated_integal_i
+% \math_repeated_integral_kern
+% \math_repeated_integal_ii}
+%
+% \def\math_repeated_integal_iiii
+% {\math_repeated_integal_i
+% \math_repeated_integral_kern
+% \math_repeated_integal_iii}
+%
+% \protected\def\math_repeat_integral#1%
+% {\let\math_repeat_integral_finish\donothing
+% \iffontchar\textfont\zerocount#1\relax
+% \expandafter\math_repeat_integral_real
+% \else
+% \expandafter\math_repeat_integral_fake
+% \fi}
+%
+% \def\math_repeat_integral_fake#1#2%
+% {\let\math_repeat_integral_fake_symbol#2%
+% \futurelet\next\math_repeat_integral_fake_indeed}
+%
+% \def\math_repeat_integral_real#1#2%
+% {#1}
+%
+% \definemathcommand [iint] {\math_repeat_integral{"0222C}\normalint \math_repeated_integal_ii } % double
+% \definemathcommand [iiint] {\math_repeat_integral{"0222D}\normaliint \math_repeated_integal_iii } % tripple
+% \definemathcommand [iiiint] {\math_repeat_integral{"FFFFF}\normaliiint\math_repeated_integal_iiii} % quadruple
+%
+% \def\math_repeated_integral_kern
+% {\mkern-6mu\mathchoice{\mkern-3mu}{}{}{}}
+%
+% \def\math_repeat_integral_fake_indeed
+% {\ifx\next\limits
+% \math_repeated_integral_correction
+% \orelse\ifx\next\displaylimits
+% \math_repeated_integral_correction
+% \orelse\ifx\next\nolimits
+% % nothing
+% \orelse\ifcase\mathintlimitmode
+% % nothing
+% \else
+% \math_repeated_integral_correction
+% \fi
+% \math_repeat_integral_fake_symbol}
+%
+% \def\math_repeated_integral_correction
+% {\mkern-7mu\mathchoice{\mkern-2mu}{}{}{}%
+% \mathop\bgroup\mkern7mu\mathchoice{\mkern2mu}{}{}{}\let\math_repeat_integral_finish\egroup}
+%
+% %D If the \type{\limits} option is used after \type {\iint}, use \type
+% %D {\mathop} and fudge the left hand space a bit to make the subscript
+% %D visually centered.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-mis.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-mis.mkxl
new file mode 100644
index 00000000000..a824c593332
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-mis.mkxl
@@ -0,0 +1,60 @@
+%D \module
+%D [ file=math-mis,
+%D version=2013.04.06, % 2007.07.19,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Miscellaneous,
+%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 Math Macros / Miscellaneous}
+
+\unprotect
+
+%D This file contains left-overs moved from other files. It's mostly old stuff
+%D that we keep around for compatbility reasons.
+
+%D \macros
+%D {qedsymbol}
+%D
+%D [HH] The general Quod Erat Demonstrandum symbol is defined in such a way that
+%D we can configure it. Because this symbol is also used in text mode, we make it
+%D a normal text symbol with special behavior.
+
+\permanent\protected\def\qedsymbol#1%
+ {\ifhmode
+ \unskip\nobreakspace\hfill#1\par
+ \orelse\ifmmode
+ #1\relax % leading \eqno removed
+ \else
+ \dontleavehmode\emptyhbox\hfill#1\par
+ \fi}
+
+\definesymbol [qed] [\qedsymbol{\mathematics{\square}}]
+
+%D \macros
+%D {QED}
+%D
+%D [HH] For compatbility reasons we also provide the \type {\QED} command. In case
+%D this command is overloaded, we still have the symbol available. \symbol[qed]
+
+\permanent\protected\def\QED{\symbol[qed]}
+
+%D \macros
+%D {boxed}
+%D
+%D [HH] Another macro that users might expect (slightly adapted):
+
+\permanent\protected\def\boxed % maybe obsolete
+ {\ifmmode\expandafter\mframed\else\expandafter\framed\fi}
+
+%D Something low level for scientific calculator notation:
+
+\permanent\protected\def\scinot#1#2%
+ {#1\times10^{#2}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt b/Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt
new file mode 100644
index 00000000000..118ab18267a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-noa.lmt
@@ -0,0 +1,2412 @@
+if not modules then modules = { } end modules ['math-noa'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to math-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- beware: this is experimental code and there will be a more generic (attribute value
+-- driven) interface too but for the moment this is ok (sometime in 2015-2016 i will
+-- start cleaning up as by then the bigger picture is clear and code has been used for
+-- years; the main handlers will get some extensions)
+--
+-- we will also make dedicated processors (faster)
+--
+-- beware: names will change as we wil make noads.xxx.handler i.e. xxx
+-- subnamespaces
+
+-- 20D6 -> 2190
+-- 20D7 -> 2192
+
+-- todo: most is mathchar_code so we can have simple dedicated loops
+
+-- nota bene: uunderdelimiter uoverdelimiter etc are radicals (we have 5 types)
+
+local next, tonumber = next, tonumber
+local utfchar, utfbyte = utf.char, utf.byte
+local formatters, gmatch = string.formatters, string.gmatch
+local sortedhash = table.sortedhash
+local insert, remove = table.insert, table.remove
+local div, round = math.div, math.round
+local bor, band = bit32.bor, bit32.band
+
+local fonts = fonts
+local nodes = nodes
+local node = node
+local mathematics = mathematics
+local context = context
+
+local otf = fonts.handlers.otf
+local otffeatures = fonts.constructors.features.otf
+local registerotffeature = otffeatures.register
+
+local privateattribute = attributes.private
+local registertracker = trackers.register
+local registerdirective = directives.register
+local logreporter = logs.reporter
+local setmetatableindex = table.setmetatableindex
+
+local colortracers = nodes.tracers.colors
+
+local trace_remapping = false registertracker("math.remapping", function(v) trace_remapping = v end)
+local trace_processing = false registertracker("math.processing", function(v) trace_processing = v end)
+local trace_analyzing = false registertracker("math.analyzing", function(v) trace_analyzing = v end)
+local trace_normalizing = false registertracker("math.normalizing", function(v) trace_normalizing = v end)
+local trace_collapsing = false registertracker("math.collapsing", function(v) trace_collapsing = v end)
+local trace_fixing = false registertracker("math.fixing", function(v) trace_foxing = v end)
+local trace_patching = false registertracker("math.patching", function(v) trace_patching = v end)
+local trace_goodies = false registertracker("math.goodies", function(v) trace_goodies = v end)
+local trace_variants = false registertracker("math.variants", function(v) trace_variants = v end)
+local trace_alternates = false registertracker("math.alternates", function(v) trace_alternates = v end)
+local trace_italics = false registertracker("math.italics", function(v) trace_italics = v end)
+local trace_kernpairs = false registertracker("math.kernpairs", function(v) trace_kernpairs = v end)
+local trace_domains = false registertracker("math.domains", function(v) trace_domains = v end)
+local trace_families = false registertracker("math.families", function(v) trace_families = v end)
+local trace_fences = false registertracker("math.fences", function(v) trace_fences = v end)
+local trace_unstacking = false registertracker("math.unstack", function(v) trace_unstacking = v end)
+
+local check_coverage = true registerdirective("math.checkcoverage", function(v) check_coverage = v end)
+
+local report_processing = logreporter("mathematics","processing")
+local report_remapping = logreporter("mathematics","remapping")
+local report_normalizing = logreporter("mathematics","normalizing")
+local report_collapsing = logreporter("mathematics","collapsing")
+local report_fixing = logreporter("mathematics","fixing")
+local report_patching = logreporter("mathematics","patching")
+local report_goodies = logreporter("mathematics","goodies")
+local report_variants = logreporter("mathematics","variants")
+local report_alternates = logreporter("mathematics","alternates")
+local report_italics = logreporter("mathematics","italics")
+local report_kernpairs = logreporter("mathematics","kernpairs")
+local report_domains = logreporter("mathematics","domains")
+local report_families = logreporter("mathematics","families")
+local report_fences = logreporter("mathematics","fences")
+local report_unstacking = logreporter("mathematics","unstack")
+
+local a_mathrendering = privateattribute("mathrendering")
+local a_exportstatus = privateattribute("exportstatus")
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+local tonut = nuts.tonut
+local nutstring = nuts.tostring
+
+local setfield = nuts.setfield
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setchar = nuts.setchar
+local setfam = nuts.setfam
+local setsubtype = nuts.setsubtype
+local setattr = nuts.setattr
+local setattrlist = nuts.setattrlist
+local setwidth = nuts.setwidth
+local setheight = nuts.setheight
+local setdepth = nuts.setdepth
+
+local getfield = nuts.getfield
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local getfont = nuts.getfont
+local getfam = nuts.getfam
+local getattr = nuts.getattr
+local getattrs = nuts.getattrs
+local getlist = nuts.getlist
+local getwidth = nuts.getwidth
+local getheight = nuts.getheight
+local getdepth = nuts.getdepth
+
+local getnucleus = nuts.getnucleus
+local getsub = nuts.getsub
+local getsup = nuts.getsup
+local getsubpre = nuts.getsubpre
+local getsuppre = nuts.getsuppre
+
+local setnucleus = nuts.setnucleus
+local setsub = nuts.setsub
+local setsup = nuts.setsup
+local setsubpre = nuts.setsubpre
+local setsuppre = nuts.setsuppre
+
+local flush_node = nuts.flush
+local copy_node = nuts.copy
+local slide_nodes = nuts.slide
+local set_visual = nuts.setvisual
+
+local mlist_to_hlist = nuts.mlist_to_hlist
+
+local new_kern = nodepool.kern
+local new_submlist = nodepool.submlist
+local new_noad = nodepool.noad
+local new_delimiter = nodepool.delimiter
+local new_fence = nodepool.fence
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontcharacters = fonthashes.characters
+local fontitalics = fonthashes.italics
+
+local variables = interfaces.variables
+local texsetattribute = tex.setattribute
+local texgetattribute = tex.getattribute
+local getfontoffamily = tex.getfontoffamily
+local unsetvalue = attributes.unsetvalue
+local implement = interfaces.implement
+
+local v_reset = variables.reset
+
+local chardata = characters.data
+
+noads = noads or { } -- todo: only here
+local noads = noads
+
+noads.processors = noads.processors or { }
+local processors = noads.processors
+
+noads.handlers = noads.handlers or { }
+local handlers = noads.handlers
+
+local tasks = nodes.tasks
+local enableaction = tasks.enableaction
+local setaction = tasks.setaction
+
+local nodecodes = nodes.nodecodes
+local noadcodes = nodes.noadcodes
+local fencecodes = nodes.fencecodes
+
+local ordnoad_code = noadcodes.ord
+local opdisplaylimitsnoad_code = noadcodes.opdisplaylimits
+local oplimitsnoad_code = noadcodes.oplimits
+local opnolimitsnoad_code = noadcodes.opnolimits
+local binnoad_code = noadcodes.bin
+local relnode_code = noadcodes.rel
+local opennoad_code = noadcodes.open
+local closenoad_code = noadcodes.close
+local punctnoad_code = noadcodes.punct
+local innernoad_code = noadcodes.inner
+local undernoad_code = noadcodes.under
+local overnoad_code = noadcodes.over
+local vcenternoad_code = noadcodes.vcenter
+local ordlimitsnoad_code = noadcodes.ordlimits or oplimitsnoad_code
+
+local noad_code = nodecodes.noad -- attr nucleus sub sup
+local accent_code = nodecodes.accent -- attr nucleus sub sup accent
+local radical_code = nodecodes.radical -- attr nucleus sub sup left degree
+local fraction_code = nodecodes.fraction -- attr nucleus sub sup left right
+local subbox_code = nodecodes.subbox -- attr list
+local submlist_code = nodecodes.submlist -- attr list
+local mathchar_code = nodecodes.mathchar -- attr fam char
+local mathtextchar_code = nodecodes.mathtextchar -- attr fam char
+local delimiter_code = nodecodes.delimiter -- attr small_fam small_char large_fam large_char
+----- style_code = nodecodes.style -- attr style
+----- parameter_code = nodecodes.parameter -- attr style
+local math_choice = nodecodes.choice -- attr display text script scriptscript
+local fence_code = nodecodes.fence -- attr subtype
+
+local leftfence_code = fencecodes.left
+local middlefence_code = fencecodes.middle
+local rightfence_code = fencecodes.right
+
+-- local mathclasses = mathematics.classes
+-- local fenceclasses = {
+-- [leftfence_code] = mathclasses.open,
+-- [middlefence_code] = mathclasses.middle,
+-- [rightfence_code] = mathclasses.close,
+-- }
+
+-- this initial stuff is tricky as we can have removed and new nodes with the same address
+-- the only way out is a free-per-page list of nodes (not bad anyway)
+
+-- local gf = getfield local gt = setmetatableindex("number") getfield = function(n,f) gt[f] = gt[f] + 1 return gf(n,f) end mathematics.GETFIELD = gt
+-- local sf = setfield local st = setmetatableindex("number") setfield = function(n,f,v) st[f] = st[f] + 1 sf(n,f,v) end mathematics.SETFIELD = st
+
+local function process(start,what,n,parent)
+
+ if n then
+ n = n + 1
+ else
+ n = 0
+ end
+ --
+ local initial = start
+ --
+ slide_nodes(start) -- we still miss a prev in noads -- fences test code
+ --
+ while start do
+ local id = getid(start)
+ if trace_processing then
+ if id == noad_code then
+ report_processing("%w%S, class %a",n*2,nutstring(start),noadcodes[getsubtype(start)])
+ elseif id == mathchar_code then
+ local char = getchar(start)
+ local font = getfont(start)
+ local fam = getfam(start)
+ report_processing("%w%S, family %a, font %a, char %a, shape %c",n*2,nutstring(start),fam,font,char,char)
+ else
+ report_processing("%w%S",n*2,nutstring(start))
+ end
+ end
+ local proc = what[id]
+ if proc then
+ -- report_processing("start processing")
+ local done, newstart, newinitial = proc(start,what,n,parent) -- prev is bugged: or getprev(start)
+ if newinitial then
+ initial = newinitial -- temp hack .. we will make all return head
+ if newstart then
+ start = newstart
+ -- report_processing("stop processing (new start)")
+ else
+ -- report_processing("quit processing (done)")
+ break
+ end
+ else
+ if newstart then
+ start = newstart
+ -- report_processing("stop processing (new start)")
+ else
+ -- report_processing("stop processing")
+ end
+ end
+ elseif id == noad_code then
+ -- single characters are like this
+ local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list
+ noad = getsup (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsub (start) if noad then process(noad,what,n,start) end -- list
+ if getsubpre then
+ noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list
+ end
+ elseif id == mathchar_code or id == mathtextchar_code or id == delimiter_code then
+ break
+ elseif id == subbox_code or id == submlist_code then
+ local noad = getlist(start) if noad then process(noad,what,n,start) end -- list (not getlist !)
+ elseif id == fraction_code then
+ local noad = getfield(start,"num") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"denom") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter
+ noad = getfield(start,"right") if noad then process(noad,what,n,start) end -- delimiter
+ elseif id == math_choice then
+ local noad = getfield(start,"display") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"text") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"script") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"scriptscript") if noad then process(noad,what,n,start) end -- list
+ elseif id == fence_code then
+ local noad = getfield(start,"delimiter") if noad then process(noad,what,n,start) end -- delimiter
+ elseif id == radical_code then
+ local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list
+ noad = getsup (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsub (start) if noad then process(noad,what,n,start) end -- list
+ if getsubpre then
+ noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list
+ end
+ noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter
+ noad = getfield(start,"degree") if noad then process(noad,what,n,start) end -- list
+ elseif id == accent_code then
+ local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list
+ noad = getsup (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsub (start) if noad then process(noad,what,n,start) end -- list
+ if getsubpre then
+ noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list
+ noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list
+ end
+ noad = getfield(start,"accent") if noad then process(noad,what,n,start) end -- list
+ noad = getfield(start,"bot_accent") if noad then process(noad,what,n,start) end -- list
+ -- elseif id == style_code then
+ -- -- has a next
+ -- elseif id == parameter_code then
+ -- -- has a next
+ -- else
+ -- -- glue, penalty, etc
+ end
+ start = getnext(start)
+ end
+ if not parent then
+ return initial -- only first level -- for now
+ end
+end
+
+local function processnested(current,what,n)
+ local noad = nil
+ local id = getid(current)
+ if id == noad_code then
+ noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list
+ noad = getsup (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsub (current) if noad then process(noad,what,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list
+ end
+ elseif id == subbox_code or id == submlist_code then
+ noad = getlist(current) if noad then process(noad,what,n,current) end -- list (not getlist !)
+ elseif id == fraction_code then
+ noad = getfield(current,"num") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"denom") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"left") if noad then process(noad,what,n,current) end -- delimiter
+ noad = getfield(current,"right") if noad then process(noad,what,n,current) end -- delimiter
+ elseif id == math_choice then
+ noad = getfield(current,"display") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"text") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"script") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"scriptscript") if noad then process(noad,what,n,current) end -- list
+ elseif id == fence_code then
+ noad = getfield(current,"delimiter") if noad then process(noad,what,n,current) end -- delimiter
+ elseif id == radical_code then
+ noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list
+ noad = getsup (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsub (current) if noad then process(noad,what,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list
+ end
+ noad = getfield(current,"left") if noad then process(noad,what,n,current) end -- delimiter
+ noad = getfield(current,"degree") if noad then process(noad,what,n,current) end -- list
+ elseif id == accent_code then
+ noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list
+ noad = getsup (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsub (current) if noad then process(noad,what,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list
+ end
+ noad = getfield(current,"accent") if noad then process(noad,what,n,current) end -- list
+ noad = getfield(current,"bot_accent") if noad then process(noad,what,n,current) end -- list
+ end
+end
+
+local function processstep(current,process,n,id)
+ local noad = nil
+ local id = id or getid(current)
+ if id == noad_code then
+ noad = getnucleus(current) if noad then process(noad,n,current) end -- list
+ noad = getsup (current) if noad then process(noad,n,current) end -- list
+ noad = getsub (current) if noad then process(noad,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,n,current) end -- list
+ end
+ elseif id == subbox_code or id == submlist_code then
+ noad = getlist(current) if noad then process(noad,n,current) end -- list (not getlist !)
+ elseif id == fraction_code then
+ noad = getfield(current,"num") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"denom") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"left") if noad then process(noad,n,current) end -- delimiter
+ noad = getfield(current,"right") if noad then process(noad,n,current) end -- delimiter
+ elseif id == math_choice then
+ noad = getfield(current,"display") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"text") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"script") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"scriptscript") if noad then process(noad,n,current) end -- list
+ elseif id == fence_code then
+ noad = getfield(current,"delimiter") if noad then process(noad,n,current) end -- delimiter
+ elseif id == radical_code then
+ noad = getnucleus(current) if noad then process(noad,n,current) end -- list
+ noad = getsup (current) if noad then process(noad,n,current) end -- list
+ noad = getsub (current) if noad then process(noad,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,n,current) end -- list
+ end
+ noad = getfield(current,"left") if noad then process(noad,n,current) end -- delimiter
+ noad = getfield(current,"degree") if noad then process(noad,n,current) end -- list
+ elseif id == accent_code then
+ noad = getnucleus(current) if noad then process(noad,n,current) end -- list
+ noad = getsup (current) if noad then process(noad,n,current) end -- list
+ noad = getsub (current) if noad then process(noad,n,current) end -- list
+ if getsubpre then
+ noad = getsuppre (current) if noad then process(noad,n,current) end -- list
+ noad = getsubpre (current) if noad then process(noad,n,current) end -- list
+ end
+ noad = getfield(current,"accent") if noad then process(noad,n,current) end -- list
+ noad = getfield(current,"bot_accent") if noad then process(noad,n,current) end -- list
+ end
+end
+
+local function processnoads(head,actions,banner)
+ if trace_processing then
+ report_processing("start %a",banner)
+ head = process(head,actions)
+ report_processing("stop %a",banner)
+ else
+ head = process(head,actions)
+ end
+ return head
+end
+
+noads.process = processnoads
+noads.processnested = processnested
+noads.processouter = process
+
+-- experiment (when not present fall back to fam 0) -- needs documentation
+
+local unknowns = { }
+local checked = { } -- simple case
+local tracked = false trackers.register("fonts.missing", function(v) tracked = v end)
+local cached = setmetatableindex("table") -- complex case
+
+local function errorchar(font,char)
+ local done = unknowns[char]
+ if done then
+ unknowns[char] = done + 1
+ else
+ unknowns[char] = 1
+ end
+ if tracked then
+ -- slower as we check each font too and we always replace as math has
+ -- more demands than text
+ local fake = cached[font][char]
+ if fake then
+ return fake
+ else
+ local kind, fake = fonts.checkers.placeholder(font,char)
+ if not fake or kind ~= "char" then
+ fake = 0x3F
+ end
+ cached[font][char] = fake
+ return fake
+ end
+ else
+ -- only simple checking, report at the end so one should take
+ -- action anyway ... we can miss a few checks but that is ok
+ -- as there is at least one reported
+ if not checked[char] then
+ if trace_normalizing then
+ report_normalizing("character %C is not available",char)
+ end
+ checked[char] = true
+ end
+ return 0x3F
+ end
+end
+
+-- 0-2 regular
+-- 3-5 bold
+-- 6-8 pseudobold
+
+-- this could best be integrated in the remapper, and if we run into problems, we
+-- might as well do this
+
+do
+
+ local families = { }
+ local a_mathfamily = privateattribute("mathfamily")
+ local boldmap = mathematics.boldmap
+
+ local familymap = { [0] =
+ "regular",
+ "regular",
+ "regular",
+ "bold",
+ "bold",
+ "bold",
+ "pseudobold",
+ "pseudobold",
+ "pseudobold",
+ }
+
+ families[fraction_code] = function(pointer,what,n,parent)
+ local a = getattr(pointer,a_mathfamily)
+ if a and a >= 0 then
+ if a > 0 then
+ setattr(pointer,a_mathfamily,0)
+ if a > 5 then
+ a = a - 3
+ end
+ end
+ setfam(pointer,a)
+ end
+ processnested(pointer,families,n+1)
+ end
+
+ families[noad_code] = function(pointer,what,n,parent)
+ local a = getattr(pointer,a_mathfamily)
+ if a and a >= 0 then
+ if a > 0 then
+ setattr(pointer,a_mathfamily,0)
+ if a > 5 then
+ a = a - 3
+ end
+ end
+ setfam(pointer,a)
+ end
+ processnested(pointer,families,n+1)
+ end
+
+ families[mathchar_code] = function(pointer)
+ if getfam(pointer) == 0 then
+ local a = getattr(pointer,a_mathfamily)
+ if a and a > 0 then
+ setattr(pointer,a_mathfamily,0)
+ if a > 5 then
+ local char = getchar(pointer)
+ local bold = boldmap[char]
+ local newa = a - 3
+ if not bold then
+ if trace_families then
+ report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ end
+ setfam(pointer,newa)
+ elseif not fontcharacters[getfontoffamily(newa)][bold] then
+ if trace_families then
+ report_families("no bold character for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ end
+ if newa > 3 then
+ setfam(pointer,newa-3)
+ end
+ else
+ setattr(pointer,a_exportstatus,char)
+ setchar(pointer,bold)
+ if trace_families then
+ report_families("replacing %C by bold %C, family %s with remap %s becomes %s with remap %s",char,bold,a,familymap[a],newa,familymap[newa])
+ end
+ setfam(pointer,newa)
+ end
+ else
+ local char = getchar(pointer)
+ if not fontcharacters[getfontoffamily(a)][char] then
+ if trace_families then
+ report_families("no bold replacement for %C",char)
+ end
+ else
+ if trace_families then
+ report_families("family of %C becomes %s with remap %s",char,a,familymap[a])
+ end
+ setfam(pointer,a)
+ end
+ end
+ end
+ end
+ end
+ families[delimiter_code] = function(pointer)
+ if getfield(pointer,"small_fam") == 0 then
+ local a = getattr(pointer,a_mathfamily)
+ if a and a > 0 then
+ setattr(pointer,a_mathfamily,0)
+ if a > 5 then
+ -- no bold delimiters in unicode
+ a = a - 3
+ end
+ local char = getfield(pointer,"small_char")
+ local okay = fontcharacters[getfontoffamily(a)][char]
+ if okay then
+ setfield(pointer,"small_fam",a)
+ elseif a > 2 then
+ setfield(pointer,"small_fam",a-3)
+ end
+ local char = getfield(pointer,"large_char")
+ local okay = fontcharacters[getfontoffamily(a)][char]
+ if okay then
+ setfield(pointer,"large_fam",a)
+ elseif a > 2 then
+ setfield(pointer,"large_fam",a-3)
+ end
+ else
+ setfield(pointer,"small_fam",0)
+ setfield(pointer,"large_fam",0)
+ end
+ end
+ end
+
+ -- will become:
+
+ -- families[delimiter_code] = function(pointer)
+ -- if getfam(pointer) == 0 then
+ -- local a = getattr(pointer,a_mathfamily)
+ -- if a and a > 0 then
+ -- setattr(pointer,a_mathfamily,0)
+ -- if a > 5 then
+ -- -- no bold delimiters in unicode
+ -- a = a - 3
+ -- end
+ -- local char = getchar(pointer)
+ -- local okay = fontcharacters[getfontoffamily(a)][char]
+ -- if okay then
+ -- setfam(pointer,a)
+ -- elseif a > 2 then
+ -- setfam(pointer,a-3)
+ -- end
+ -- else
+ -- setfam(pointer,0)
+ -- end
+ -- end
+ -- end
+
+ families[mathtextchar_code] = families[mathchar_code]
+
+ function handlers.families(head,style,penalties)
+ processnoads(head,families,"families")
+ return true -- not needed
+ end
+
+end
+
+-- character remapping
+
+do
+
+ local a_mathalphabet = privateattribute("mathalphabet")
+ local a_mathgreek = privateattribute("mathgreek")
+
+ local relocate = { }
+
+ local remapalphabets = mathematics.remapalphabets
+ local fallbackstyleattr = mathematics.fallbackstyleattr
+ local setnodecolor = colortracers.set
+
+ local function report_remap(tag,id,old,new,extra)
+ if new then
+ report_remapping("remapping %s in font (%s,%s) from %C to %C%s",
+ tag,id,fontdata[id].properties.fontname or "",old,new,extra)
+ else
+ -- error !
+ report_remapping("remapping %s in font (%s,%s) from %C to ?",
+ tag,id,fontdata[id].properties.fontname or "",old)
+ end
+ end
+
+ local function checked(pointer)
+ local char = getchar(pointer)
+ local font = getfont(pointer)
+ local data = fontcharacters[font]
+ if not data[char] then
+ local specials = characters.data[char].specials
+ if specials and (specials[1] == "char" or specials[1] == "font") then
+ local newchar = specials[#specials]
+ if trace_remapping then
+ report_remap("fallback",font,char,newchar)
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:isol")
+ end
+ setattr(pointer,a_exportstatus,char) -- testcase: exponentiale
+ setchar(pointer,newchar)
+ return true
+ end
+ end
+ end
+
+ -- We can optimize this if we really think that math is a bottleneck which it never
+ -- really is. Beware: the font is the text font in the family, so we only check the
+ -- text font here.
+
+ relocate[mathchar_code] = function(pointer)
+ local g = getattr(pointer,a_mathgreek) or 0
+ local a = getattr(pointer,a_mathalphabet) or 0
+ -- local g, a = getattrs(pointer,a_mathgreek,a_mathalphabet)
+ -- if not a then a = 0 end
+ -- if not g then g = 0 end
+ local char = getchar(pointer)
+ local font = getfont(pointer)
+ local characters = fontcharacters[font]
+ if a > 0 or g > 0 then
+ if a > 0 then
+ -- not really critital but we could use properties
+ setattr(pointer,a_mathgreek,0)
+ end
+ if g > 0 then
+ -- not really critital but we could use properties
+ setattr(pointer,a_mathalphabet,0)
+ end
+ local newchar = remapalphabets(char,a,g)
+ if newchar then
+ local newchardata = characters[newchar]
+ if newchardata then
+ if trace_remapping then
+ report_remap("char",font,char,newchar,newchardata.commands and " (virtual)" or "")
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:isol")
+ end
+ setchar(pointer,newchar)
+ return true
+ else
+ local fallback = fallbackstyleattr(a)
+ if fallback then
+ local newchar = remapalphabets(char,fallback,g)
+ if newchar then
+ if characters[newchar] then
+ if trace_remapping then
+ report_remap("char",font,char,newchar," (fallback remapping used)")
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:isol")
+ end
+ setchar(pointer,newchar)
+ return true
+ elseif trace_remapping then
+ report_remap("char",font,char,newchar," fails (no fallback character)")
+ end
+ elseif trace_remapping then
+ report_remap("char",font,char,newchar," fails (no fallback remap character)")
+ end
+ elseif trace_remapping then
+ report_remap("char",font,char,newchar," fails (no fallback style)")
+ end
+ end
+ elseif trace_remapping then
+ local chardata = characters[char]
+ if chardata and chardata.commands then
+ report_remap("char",font,char,char," (virtual)")
+ end
+ end
+ end
+ if not characters[char] then
+ local fam = getfam(pointer)
+ local fnt = getfontoffamily(fam,1)
+ setchar(pointer,errorchar(font,char))
+ if font ~= fnt then
+ errorchar(fnt,char)
+ errorchar(getfontoffamily(fam,2),char)
+ end
+ end
+ if trace_analyzing then
+ setnodecolor(pointer,"font:medi")
+ end
+ if check_coverage then
+ return checked(pointer)
+ end
+ end
+
+ relocate[mathtextchar_code] = function(pointer)
+ if trace_analyzing then
+ setnodecolor(pointer,"font:init")
+ end
+ end
+
+ relocate[delimiter_code] = function(pointer)
+ if trace_analyzing then
+ setnodecolor(pointer,"font:fina")
+ end
+ end
+
+ function handlers.relocate(head,style,penalties)
+ processnoads(head,relocate,"relocate")
+ return true -- not needed
+ end
+
+end
+
+-- rendering (beware, not exported)
+
+do
+
+ local render = { }
+
+ local rendersets = mathematics.renderings.numbers or { } -- store
+
+ render[mathchar_code] = function(pointer)
+ local attr = getattr(pointer,a_mathrendering)
+ if attr and attr > 0 then
+ local char = getchar(pointer)
+ local renderset = rendersets[attr]
+ if renderset then
+ local newchar = renderset[char]
+ if newchar then
+ local font = getfont(pointer)
+ local characters = fontcharacters[font]
+ if characters and characters[newchar] then
+ setchar(pointer,newchar)
+ setattr(pointer,a_exportstatus,char)
+ end
+ end
+ end
+ end
+ end
+
+ function handlers.render(head,style,penalties)
+ processnoads(head,render,"render")
+ return true -- not needed
+ end
+
+end
+
+-- some resize options (this works ok because the content is
+-- empty and no larger next will be forced)
+--
+-- beware: we don't use \delcode but \Udelcode and as such have
+-- no large_fam; also, we need to check for subtype and/or
+-- small_fam not being 0 because \. sits in 0,0 by default
+--
+-- todo: just replace the character by an ord noad
+-- and remove the right delimiter as well
+
+do
+
+ local a_mathsize = privateattribute("mathsize") -- this might move into other fence code
+ local resize = { }
+
+ resize[fence_code] = function(pointer)
+ local subtype = getsubtype(pointer)
+ if subtype == leftfence_code or subtype == rightfence_code then
+ local a = getattr(pointer,a_mathsize)
+ if a and a > 0 then
+ local method = div(a,100)
+ local size = a % 100
+ setattr(pointer,a_mathsize,0)
+ local delimiter = getfield(pointer,"delimiter")
+ local chr = getchar(delimiter)
+ if chr > 0 then
+ local fam = getfam(delimiter)
+ local id = getfontoffamily(fam)
+ if id > 0 then
+ local data = fontdata[id]
+ local char = mathematics.big(data,chr,size,method)
+ local ht = getheight(pointer)
+ local dp = getdepth(pointer)
+ if ht == 1 or dp == 1 then -- 1 scaled point is a signal
+ local chardata = data.characters[char]
+ if ht == 1 then
+ setheight(pointer,chardata.height)
+ end
+ if dp == 1 then
+ setdepth(pointer,chardata.depth)
+ end
+ end
+ if trace_fences then
+ report_fences("replacing %C by %C using method %a and size %a",chr,char,method,size)
+ end
+ setchar(delimiter,char)
+ end
+ end
+ end
+ end
+ end
+
+ function handlers.resize(head,style,penalties)
+ processnoads(head,resize,"resize")
+ return true -- not needed
+ end
+
+end
+
+-- still not perfect:
+
+do
+
+ local a_autofence = privateattribute("mathautofence")
+ local autofences = { }
+ local dummyfencechar = 0x2E
+
+ local function makefence(what,char)
+ local d = new_delimiter() -- todo: attr
+ local f = new_fence() -- todo: attr
+ if char then
+ local sym = getnucleus(char)
+ local chr = getchar(sym)
+ local fam = getfam(sym)
+ if chr == dummyfencechar then
+ chr = 0
+ end
+ setchar(d,chr)
+ setfam(d,fam)
+ flush_node(sym)
+ end
+ setattrlist(d,char)
+ setattrlist(f,char)
+ setsubtype(f,what)
+ setfield(f,"delimiter",d)
+ setfield(f,"class",-1) -- tex itself does this, so not fenceclasses[what]
+ return f
+ end
+
+ local function show(where,pointer)
+ print("")
+ local i = 0
+ for n in nuts.traverse(pointer) do
+ i = i + 1
+ print(i,where,nuts.tonode(n))
+ end
+ print("")
+ end
+
+ local function makelist(middle,noad,f_o,o_next,c_prev,f_c)
+-- report_fences(
+-- "middle %s, noad %s, open %s, opennext %s, closeprev %s, close %s",
+-- middle or "?",
+-- noad or "?",
+-- f_o or "?",
+-- o_next or "?",
+-- c_prev or "?",
+-- f_c or "?"
+-- )
+ local list = new_submlist()
+ setsubtype(noad,innernoad_code)
+ setnucleus(noad,list)
+ setlist(list,f_o)
+ setlink(f_o,o_next) -- prev of list is nil
+ setlink(c_prev,f_c) -- next of list is nil
+-- show("list",f_o)
+ if middle and next(middle) then
+ local prev = f_o
+ local current = o_next
+ while current ~= f_c do
+ local midl = middle[current]
+ local next = getnext(current)
+ if midl then
+ local fence = makefence(middlefence_code,current)
+ setnucleus(current)
+ flush_node(current)
+ middle[current] = nil
+ -- replace_node
+ setlink(prev,fence,next)
+ prev = fence
+ else
+ prev = current
+ end
+ current = next
+ end
+ end
+ return noad
+ end
+
+ -- relinking is now somewhat overdone
+
+ local function convert_both(open,close,middle)
+ local o_next = getnext(open)
+ if o_next == close then
+ return close
+ else
+ local c_prev, c_next = getboth(close)
+ local f_o = makefence(leftfence_code,open)
+ local f_c = makefence(rightfence_code,close)
+ makelist(middle,open,f_o,o_next,c_prev,f_c)
+ setnucleus(close)
+ flush_node(close)
+ -- open is now a list
+ setlink(open,c_next)
+ return open
+ end
+ end
+
+ local function convert_open(open,last,middle) -- last is really last (final case)
+ local f_o = makefence(leftfence_code,open)
+ local f_c = makefence(rightfence_code)
+ local o_next = getnext(open)
+ makelist(middle,open,f_o,o_next,last,nil)
+ -- open is now a list
+ setlink(open,l_next)
+ return open
+ end
+
+ local function convert_close(first,close,middle)
+ local f_o = makefence(leftfence_code)
+ local f_c = makefence(rightfence_code,close)
+ local c_prev = getprev(close)
+ local f_next = getnext(first)
+ makelist(middle, close, f_o,f_next,c_prev,f_c)
+ -- close is now a list
+ if c_prev ~= first then
+ setlink(first,close)
+ end
+ return close
+ end
+
+ local stacks = setmetatableindex("table")
+
+ -- 1=open 2=close 3=middle 4=both
+
+ local function processfences(pointer,n,parent)
+ local current = pointer
+ local last = pointer
+ local start = pointer
+ local done = false
+ local initial = pointer
+ local stack = nil
+ local middle = nil -- todo: use properties
+ while current do
+-- show("before",pointer)
+ local id = getid(current)
+ if id == noad_code then
+ local a = getattr(current,a_autofence)
+ if a and a > 0 then
+ local stack = stacks[n]
+ setattr(current,a_autofence,0) -- hm, better use a property
+ local level = #stack
+ if a == 1 then
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"open","open")
+ end
+ insert(stack,current)
+ elseif a == 2 then
+ local open = remove(stack)
+ if open then
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"close","both")
+ end
+ current = convert_both(open,current,middle)
+ elseif current == start then
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"close","skip")
+ end
+ else
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"close","close")
+ end
+ current = convert_close(initial,current,middle)
+ if not parent then
+ initial = current
+ end
+ end
+ elseif a == 3 then
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"middle","middle")
+ end
+ if middle then
+ middle[current] = last
+ else
+ middle = { [current] = last }
+ end
+ elseif a == 4 then
+ if not stack or #stack == 0 then
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"both","open")
+ end
+ insert(stack,current)
+ else
+ local open = remove(stack)
+ if open then
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"both","both")
+ end
+ current = convert_both(open,current,middle)
+ elseif current == start then
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"both","skip")
+ end
+ else
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,level,"both","close")
+ end
+ current = convert_close(initial,current,middle)
+ if not parent then
+ initial = current
+ end
+ end
+ end
+ end
+ done = true
+ else
+ processstep(current,processfences,n+1,id)
+ end
+ else
+ -- next at current level
+ processstep(current,processfences,n,id)
+ end
+-- show("after",pointer)
+ last = current
+ current = getnext(current)
+ end
+ if done then
+ local stack = stacks[n]
+ local s = #stack
+ if s > 0 then
+ for i=1,s do
+ local open = remove(stack)
+ if trace_fences then
+ report_fences("%2i: level %i, handling %s, action %s",n,#stack,"flush","open")
+ end
+ last = convert_open(open,last,middle)
+ end
+-- show("done",pointer)
+ end
+ end
+ end
+
+ -- we can have a first changed node .. an option is to have a leading dummy node in math
+ -- lists like the par node as it can save a lot of mess
+
+ local enabled = false
+
+ implement {
+ name = "enableautofences",
+ onlyonce = true,
+ actions = function()
+ enableaction("math","noads.handlers.autofences")
+ enabled = true
+ end
+ }
+
+ function handlers.autofences(head,style,penalties)
+ if enabled then -- tex.modes.c_math_fences_auto
+ -- inspect(nodes.totree(head))
+ processfences(head,1)
+ -- inspect(nodes.totree(head))
+ end
+ end
+
+end
+
+-- normalize scripts
+
+do
+
+ local unscript = { } noads.processors.unscript = unscript
+ local superscripts = characters.superscripts
+ local subscripts = characters.subscripts
+ local fractions = characters.fractions
+ local replaced = { }
+
+ local function replace(pointer,what,n,parent)
+ pointer = parent -- we're following the parent list (chars trigger this)
+ local next = getnext(pointer)
+ local start_super, stop_super, start_sub, stop_sub
+ local mode = "unset"
+ while next and getid(next) == noad_code do
+ local nextnucleus = getnucleus(next)
+ if nextnucleus and getid(nextnucleus) == mathchar_code and not getsub(next) and not getsup(next) then
+ local char = getchar(nextnucleus)
+ local s = superscripts[char]
+ if s then
+ if not start_super then
+ start_super = next
+ mode = "super"
+ elseif mode == "sub" then
+ break
+ end
+ stop_super = next
+ next = getnext(next)
+ setchar(nextnucleus,s)
+ replaced[char] = (replaced[char] or 0) + 1
+ if trace_normalizing then
+ report_normalizing("superscript %C becomes %C",char,s)
+ end
+ else
+ local s = subscripts[char]
+ if s then
+ if not start_sub then
+ start_sub = next
+ mode = "sub"
+ elseif mode == "super" then
+ break
+ end
+ stop_sub = next
+ next = getnext(next)
+ setchar(nextnucleus,s)
+ replaced[char] = (replaced[char] or 0) + 1
+ if trace_normalizing then
+ report_normalizing("subscript %C becomes %C",char,s)
+ end
+ else
+ break
+ end
+ end
+ else
+ break
+ end
+ end
+ if start_super then
+ if start_super == stop_super then
+ setsup(pointer,getnucleus(start_super))
+ else
+ local list = new_submlist() -- todo attr
+ setlist(list,start_super)
+ setsup(pointer,list)
+ end
+ if mode == "super" then
+ setnext(pointer,getnext(stop_super))
+ end
+ setnext(stop_super)
+ end
+ if start_sub then
+
+-- if mode == "sub" then
+-- local sup = getsup(pointer)
+-- if sup and not getsub(pointer) then
+-- local nxt = getnext(pointer)
+-- local new = new_noad(pointer)
+-- setnucleus(new,new_submlist())
+-- setlink(pointer,new,nxt)
+-- pointer = new
+-- end
+-- end
+
+ if start_sub == stop_sub then
+ setsub(pointer,getnucleus(start_sub))
+ else
+ local list = new_submlist() -- todo attr
+ setlist(list,start_sub)
+ setsub(pointer,list)
+ end
+ if mode == "sub" then
+ setnext(pointer,getnext(stop_sub))
+ end
+ setnext(stop_sub)
+ end
+ -- we could return stop
+ end
+
+ unscript[mathchar_code] = replace -- not noads as we need to recurse
+
+ function handlers.unscript(head,style,penalties)
+ processnoads(head,unscript,"unscript")
+ return true -- not needed
+ end
+
+end
+
+do
+
+ local unstack = { } noads.processors.unstack = unstack
+ local enabled = false
+ local a_unstack = privateattribute("mathunstack")
+
+ unstack[noad_code] = function(pointer)
+ if getattr(pointer,a_unstack) then
+ local sup = getsup(pointer)
+ local sub = getsub(pointer)
+ if sup and sub then
+ -- if trace_unstacking then
+ -- report_unstacking() -- todo ... what to show ...
+ -- end
+ local nxt = getnext(pointer)
+ local new = new_noad(pointer)
+ setnucleus(new,new_submlist())
+ setsub(pointer)
+ setsub(new,sub)
+ setlink(pointer,new,nxt)
+ end
+ end
+ end
+
+ function handlers.unstack(head,style,penalties)
+ if enabled then
+ processnoads(head,unstack,"unstack")
+ return true -- not needed
+ end
+ end
+
+ implement {
+ name = "enablescriptunstacking",
+ onlyonce = true,
+ actions = function()
+ enableaction("math","noads.handlers.unstack")
+ enabled = true
+ end
+ }
+
+end
+
+do
+
+ local function collected(list)
+ if list and next(list) then
+ local n, t = 0, { }
+ for k, v in sortedhash(list) do
+ n = n + 1
+ t[n] = formatters["%C"](k)
+ end
+ return formatters["% t (n=%s)"](t,n)
+ end
+ end
+
+ statistics.register("math script replacements", function()
+ return collected(replaced)
+ end)
+
+ statistics.register("unknown math characters", function()
+ return collected(unknowns)
+ end)
+
+end
+
+-- math alternates: (in xits lgf: $ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$)
+-- math alternates: (in lucidaot lgf: $ABC \mathalternate{italic} ABC$)
+
+-- todo: set alternate for specific symbols
+-- todo: no need to do this when already loaded
+-- todo: use a fonts.hashes.mathalternates
+
+do
+
+ local last = 0
+
+ local known = setmetatableindex(function(t,k)
+ local v = bor(0,2^last)
+ t[k] = v
+ last = last + 1
+ return v
+ end)
+
+ local defaults = {
+ dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
+ -- zero = { feature = 'zero', value = 1, comment = "Slashed or Dotted Zero" }, -- in no math font (yet)
+ }
+
+ local function initializemathalternates(tfmdata)
+ local goodies = tfmdata.goodies
+ local autolist = defaults -- table.copy(defaults)
+
+ local function setthem(newalternates)
+ local resources = tfmdata.resources -- was tfmdata.shared
+ local mathalternates = resources.mathalternates
+ local alternates, attributes, registered, presets
+ if mathalternates then
+ alternates = mathalternates.alternates
+ attributes = mathalternates.attributes
+ registered = mathalternates.registered
+ else
+ alternates, attributes, registered = { }, { }, { }
+ mathalternates = {
+ attributes = attributes,
+ alternates = alternates,
+ registered = registered,
+ presets = { },
+ resets = { },
+ hashes = setmetatableindex("table")
+ }
+ resources.mathalternates = mathalternates
+ end
+ --
+ for name, data in sortedhash(newalternates) do
+ if alternates[name] then
+ -- ignore
+ else
+ local attr = known[name]
+ attributes[attr] = data
+ alternates[name] = attr
+ registered[#registered+1] = attr
+ end
+ end
+ end
+
+ if goodies then
+ local done = { }
+ for i=1,#goodies do
+ -- first one counts
+ -- we can consider sharing the attributes ... todo (only once scan)
+ local mathgoodies = goodies[i].mathematics
+ local alternates = mathgoodies and mathgoodies.alternates
+ if alternates then
+ if trace_goodies then
+ report_goodies("loading alternates for font %a",tfmdata.properties.name)
+ end
+ for k, v in next, autolist do
+ if not alternates[k] then
+ alternates[k] = v
+ end
+ end
+ setthem(alternates)
+ return
+ end
+ end
+ end
+
+ if trace_goodies then
+ report_goodies("loading default alternates for font %a",tfmdata.properties.name)
+ end
+ setthem(autolist)
+
+ end
+
+ registerotffeature {
+ name = "mathalternates",
+ description = "additional math alternative shapes",
+ initializers = {
+ base = initializemathalternates,
+ node = initializemathalternates,
+ }
+ }
+
+ -- local getalternate = otf.getalternate (runtime new method so ...)
+
+ -- todo: not shared but copies ... one never knows
+
+ local a_mathalternate = privateattribute("mathalternate")
+ local alternate = { } -- processors.alternate = alternate
+ local fontdata = fonts.hashes.identifiers
+ local fontresources = fonts.hashes.resources
+
+ local function getalternate(fam,tag,current)
+ local resources = fontresources[getfontoffamily(fam)]
+ local attribute = unsetvalue
+ if resources then
+ local mathalternates = resources.mathalternates
+ if mathalternates then
+ local presets = mathalternates.presets
+ if presets then
+ local resets = mathalternates.resets
+ attribute = presets[tag]
+ if not attribute then
+ attribute = 0
+ local alternates = mathalternates.alternates
+ for s in gmatch(tag,"[^, ]+") do
+ if s == v_reset then
+ resets[tag] = true
+ current = unsetvalue
+ else
+ local a = alternates[s] -- or known[s]
+ if a then
+ attribute = bor(attribute,a)
+ end
+ end
+ end
+ if attribute == 0 then
+ attribute = unsetvalue
+ end
+ presets[tag] = attribute
+ elseif resets[tag] then
+ current = unsetvalue
+ end
+ end
+ end
+ end
+ if attribute > 0 and current and current > 0 then
+ return bor(current,attribute)
+ else
+ return attribute
+ end
+ end
+
+ local function presetalternate(fam,tag)
+ texsetattribute(a_mathalternate,getalternate(fam,tag))
+ end
+
+ implement {
+ name = "presetmathalternate",
+ actions = presetalternate,
+ arguments = { "integer", "string" }
+ }
+
+ local function setalternate(fam,tag)
+ local a = texgetattribute(a_mathalternate)
+ local v = getalternate(fam,tag,a)
+ texsetattribute(a_mathalternate,v)
+ end
+
+ implement {
+ name = "setmathalternate",
+ actions = setalternate,
+ arguments = { "integer", "string" }
+ }
+
+ alternate[mathchar_code] = function(pointer) -- slow
+ local a = getattr(pointer,a_mathalternate)
+ if a and a > 0 then
+ setattr(pointer,a_mathalternate,0)
+ local fontid = getfont(pointer)
+ local resources = fontresources[fontid]
+ if resources then
+ local mathalternates = resources.mathalternates
+ if mathalternates then
+ local attributes = mathalternates.attributes
+ local registered = mathalternates.registered
+ local hashes = mathalternates.hashes
+ for i=1,#registered do
+ local r = registered[i]
+ if band(a,r) ~= 0 then
+ local char = getchar(pointer)
+ local alt = hashes[i][char]
+ if alt == nil then
+ local what = attributes[r]
+ alt = otf.getalternate(fontdata[fontid],char,what.feature,what.value) or false
+ if alt == char then
+ alt = false
+ end
+ hashes[i][char] = alt
+ end
+ if alt then
+ if trace_alternates then
+ local what = attributes[r]
+ report_alternates("alternate %a, value %a, replacing glyph %U by glyph %U",
+ tostring(what.feature),tostring(what.value),getchar(pointer),alt)
+ end
+ setchar(pointer,alt)
+ break
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ function handlers.alternates(head,style,penalties)
+ processnoads(head,alternate,"alternate")
+ return true -- not needed
+ end
+
+end
+
+-- italics: we assume that only characters matter
+--
+-- = we check for correction first because accessing nodes is slower
+-- = the actual glyph is not that important (we can control it with numbers)
+
+-- Italic correction in luatex math is (was) a mess. There are all kind of assumptions based on
+-- old fonts and new fonts. Eventually there should be a flag that can signal to ignore all
+-- those heuristics. We want to deal with it ourselves also in the perspective of mixed math
+-- and text. Also, for a while in context we had to deal with a mix of virtual math fonts and
+-- real ones.
+
+-- in opentype the italic correction of a limop is added to the width and luatex does
+-- some juggling that we want to avoid but we need to do something here (in fact, we could
+-- better fix the width of the character)
+
+do
+
+ local a_mathitalics = privateattribute("mathitalics")
+
+ local italics = { }
+ local default_factor = 1/20
+
+ local setcolor = colortracers.set
+ local resetcolor = colortracers.reset
+ local italic_kern = new_kern
+
+ local c_positive_d = "trace:dg"
+ local c_negative_d = "trace:dr"
+
+ local function insert_kern(current,kern)
+ local sub = new_submlist() -- todo: attr
+ local noad = new_noad() -- todo: attr
+ setlist(sub,kern)
+ setnext(kern,noad)
+ setnucleus(noad,current)
+ return sub
+ end
+
+ registertracker("math.italics.visualize", function(v)
+ if v then
+ italic_kern = function(k)
+ local n = new_kern(k) -- todo: attr
+ set_visual(n,"italic")
+ return n
+ end
+ else
+ italic_kern = new_kern
+ end
+ end)
+
+ local function getcorrection(method,font,char) -- -- or character.italic -- (this one is for tex)
+
+ local visual = chardata[char].visual
+
+ if method == 1 then
+ -- check on state
+ local italics = fontitalics[font]
+ if italics then
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ end
+ elseif method == 2 then
+ -- no check
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ elseif method == 3 then
+ -- check on visual
+ if visual == "it" or visual == "bi" then
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ end
+ elseif method == 4 then
+ -- combination of 1 and 3
+ local italics = fontitalics[font]
+ if italics and (visual == "it" or visual == "bi") then
+ local character = fontcharacters[font][char]
+ if character then
+ local correction = character.italic
+ if correction and correction ~= 0 then
+ return correction, visual
+ end
+ end
+ end
+ end
+
+ end
+
+ italics[mathchar_code] = function(pointer,what,n,parent)
+ local method = getattr(pointer,a_mathitalics)
+ if method and method > 0 and method < 100 then
+ local char = getchar(pointer)
+ local font = getfont(pointer)
+ local correction, visual = getcorrection(method,font,char)
+ if correction and correction ~= 0 then
+ local next_noad = getnext(parent)
+ if not next_noad then
+ if n == 1 then
+ -- only at the outer level .. will become an option (always,endonly,none)
+ if trace_italics then
+ report_italics("method %a, flagging italic correction %p between %C and end math",method,correction,char)
+ end
+ if correction > 0 then
+ correction = correction + 100
+ else
+ correction = correction - 100
+ end
+ correction = round(correction)
+ setattr(pointer,a_mathitalics,correction)
+ setattr(parent,a_mathitalics,correction)
+ return -- so no reset later on
+ end
+ end
+ end
+ end
+ setattr(pointer,a_mathitalics,unsetvalue)
+ end
+
+ function handlers.italics(head,style,penalties)
+ processnoads(head,italics,"italics")
+ return true -- not needed
+ end
+
+ local enable = function()
+ enableaction("math", "noads.handlers.italics")
+ if trace_italics then
+ report_italics("enabling math italics")
+ end
+ -- we enable math (unless already enabled elsewhere)
+ typesetters.italics.enablemath()
+ enable = false
+ end
+
+ -- best do this only on math mode (less overhead)
+
+ function mathematics.setitalics(name)
+ if enable then
+ enable()
+ end
+ texsetattribute(a_mathitalics,name and name ~= v_reset and tonumber(name) or unsetvalue) -- maybe also v_none
+ end
+
+ function mathematics.getitalics(name)
+ if enable then
+ enable()
+ end
+ context(name and name ~= v_reset and tonumber(name) or unsetvalue)
+ end
+
+ function mathematics.resetitalics()
+ texsetattribute(a_mathitalics,unsetvalue)
+ end
+
+ implement {
+ name = "initializemathitalics",
+ actions = enable,
+ onlyonce = true,
+ }
+
+ implement {
+ name = "setmathitalics",
+ actions = mathematics.setitalics,
+ arguments = "string",
+ }
+
+ implement {
+ name = "getmathitalics",
+ actions = mathematics.getitalics,
+ arguments = "string",
+ }
+
+ implement {
+ name = "resetmathitalics",
+ actions = mathematics.resetitalics
+ }
+
+end
+
+do
+
+ -- math kerns (experiment) in goodies:
+ --
+ -- mathematics = {
+ -- kernpairs = {
+ -- [0x1D44E] = {
+ -- [0x1D44F] = 400, -- ð‘Žð‘
+ -- }
+ -- },
+ -- }
+
+ local a_kernpairs = privateattribute("mathkernpairs")
+ local kernpairs = { }
+
+ local function enable()
+ enableaction("math", "noads.handlers.kernpairs")
+ if trace_kernpairs then
+ report_kernpairs("enabling math kern pairs")
+ end
+ enable = false
+ end
+
+ implement {
+ name = "initializemathkernpairs",
+ actions = enable,
+ onlyonce = true,
+ }
+
+ local hash = setmetatableindex(function(t,font)
+ local g = fontdata[font].goodies
+ local m = g and g[1] and g[1].mathematics
+ local k = m and m.kernpairs
+ t[font] = k
+ return k
+ end)
+
+ -- no correction after prime because that moved to a superscript
+
+ kernpairs[mathchar_code] = function(pointer,what,n,parent)
+ if getattr(pointer,a_kernpairs) == 1 then
+ local font = getfont(pointer)
+ local list = hash[font]
+ if list then
+ local first = getchar(pointer)
+ local found = list[first]
+ if found then
+ local next = getnext(parent)
+ if next and getid(next) == noad_code then
+ pointer = getnucleus(next)
+ if pointer then
+ if getfont(pointer) == font then
+ local second = getchar(pointer)
+ local kern = found[second]
+ if kern then
+ kern = kern * fonts.hashes.parameters[font].hfactor
+ if trace_kernpairs then
+ report_kernpairs("adding %p kerning between %C and %C",kern,first,second)
+ end
+ setlink(parent,new_kern(kern),getnext(parent)) -- todo: attr
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ function handlers.kernpairs(head,style,penalties)
+ processnoads(head,kernpairs,"kernpairs")
+ return true -- not needed
+ end
+
+end
+
+-- primes and such
+
+do
+
+ -- is validpair stil needed?
+
+ local a_mathcollapsing = privateattribute("mathcollapsing")
+ local collapse = { }
+ local mathlists = characters.mathlists
+ local validpair = {
+ [ordnoad_code] = true,
+ [opdisplaylimitsnoad_code] = true,
+ [oplimitsnoad_code] = true,
+ [opnolimitsnoad_code] = true,
+ [binnoad_code] = true, -- new
+ [relnode_code] = true,
+ [opennoad_code] = true, -- new
+ [closenoad_code] = true, -- new
+ [punctnoad_code] = true, -- new
+ [innernoad_code] = false,
+ [undernoad_code] = false,
+ [overnoad_code] = false,
+ [vcenternoad_code] = false,
+ [ordlimitsnoad_code] = true,
+ }
+
+ local reported = setmetatableindex("table")
+
+ collapse[mathchar_code] = function(pointer,what,n,parent)
+
+ if parent and mathlists[getchar(pointer)] then
+ local found, last, lucleus, lsup, lsub, category
+ local tree = mathlists
+ local current = parent
+ while current and validpair[getsubtype(current)] do
+ local nucleus = getnucleus(current) -- == pointer
+ local sub = getsub(current)
+ local sup = getsup(current)
+ local char = getchar(nucleus)
+ if char then
+ local match = tree[char]
+ if match then
+ local method = getattr(current,a_mathcollapsing)
+ if method and method > 0 and method <= 3 then
+ local specials = match.specials
+ local mathlist = match.mathlist
+ local ligature
+ if method == 1 then
+ ligature = specials
+ elseif method == 2 then
+ ligature = specials or mathlist
+ else -- 3
+ ligature = mathlist or specials
+ end
+ if ligature then
+ category = mathlist and "mathlist" or "specials"
+ found = ligature
+ last = current
+ lucleus = nucleus
+ lsup = sup
+ lsub = sub
+ end
+ tree = match
+ if sub or sup then
+ break
+ else
+ current = getnext(current)
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if found and last and lucleus then
+ local id = getfont(lucleus)
+ local characters = fontcharacters[id]
+ local replace = characters and characters[found]
+ if not replace then
+ if not reported[id][found] then
+ reported[id][found] = true
+ report_collapsing("%s ligature %C from %s","ignoring",found,category)
+ end
+ elseif trace_collapsing then
+ report_collapsing("%s ligature %C from %s","creating",found,category)
+ end
+ setchar(pointer,found)
+ local l = getnext(last)
+ local c = getnext(parent)
+ if lsub then
+ setsub(parent,lsub)
+ setsub(last)
+ end
+ if lsup then
+ setsup(parent,lsup)
+ setsup(last)
+ end
+ while c ~= l do
+ local n = getnext(c)
+ flush_node(c)
+ c = n
+ end
+ setlink(parent,l)
+ end
+ end
+ end
+
+ function noads.handlers.collapse(head,style,penalties)
+ processnoads(head,collapse,"collapse")
+ return true -- not needed
+ end
+
+ local enable = function()
+ enableaction("math", "noads.handlers.collapse")
+ if trace_collapsing then
+ report_collapsing("enabling math collapsing")
+ end
+ enable = false
+ end
+
+ implement {
+ name = "initializemathcollapsing",
+ actions = enable,
+ onlyonce = true,
+ }
+
+end
+
+do
+ -- inner under over vcenter
+
+ local fixscripts = { }
+ local movesub = {
+ -- primes
+ [0x2032] = 0xFE932,
+ [0x2033] = 0xFE933,
+ [0x2034] = 0xFE934,
+ [0x2057] = 0xFE957,
+ -- reverse primes
+ [0x2035] = 0xFE935,
+ [0x2036] = 0xFE936,
+ [0x2037] = 0xFE937,
+ }
+
+ mathematics.virtualize(movesub)
+
+ local options_supported = tokens.defined("Unosuperscript")
+
+ local function fixsupscript(parent,current,current_char,new_char)
+ if new_char ~= current_char and new_char ~= true then
+ setchar(current,new_char)
+ if trace_fixing then
+ report_fixing("fixing subscript, replacing superscript %U by %U",current_char,new_char)
+ end
+ else
+ if trace_fixing then
+ report_fixing("fixing subscript, superscript %U",current_char)
+ end
+ end
+ if options_supported then
+ setfield(parent,"options",0x08+0x22)
+ end
+ end
+
+ -- local function movesubscript(parent,current_nucleus,oldchar,newchar)
+ -- local prev = getprev(parent)
+ -- if prev and getid(prev) == noad_code then
+ -- local psup = getsup(prev)
+ -- local psub = getsub(prev)
+ -- if not psup and not psub then
+ -- fixsupscript(prev,current_nucleus,oldchar,newchar)
+ -- local nucleus = getnucleus(parent)
+ -- local sub = getsub(parent)
+ -- setsup(prev,nucleus)
+ -- setsub(prev,sub)
+ -- local dummy = copy_node(nucleus)
+ -- setchar(dummy,0)
+ -- setnucleus(parent,dummy)
+ -- setsub(parent)
+ -- elseif not psup then
+ -- fixsupscript(prev,current_nucleus,oldchar,newchar)
+ -- local nucleus = getnucleus(parent)
+ -- setsup(prev,nucleus)
+ -- local dummy = copy_node(nucleus)
+ -- setchar(dummy,0)
+ -- setnucleus(parent,dummy)
+ -- end
+ -- end
+ -- end
+
+ local function move_none_none(parent,prev,nuc,oldchar,newchar)
+ fixsupscript(prev,nuc,oldchar,newchar)
+ local sub = getsub(parent)
+ setsup(prev,nuc)
+ setsub(prev,sub)
+ local dummy = copy_node(nuc)
+ setchar(dummy,0)
+ setnucleus(parent,dummy)
+ setsub(parent)
+ end
+
+ local function move_none_psub(parent,prev,nuc,oldchar,newchar)
+ fixsupscript(prev,nuc,oldchar,newchar)
+ setsup(prev,nuc)
+ local dummy = copy_node(nuc)
+ setchar(dummy,0)
+ setnucleus(parent,dummy)
+ end
+
+ fixscripts[mathchar_code] = function(pointer,what,n,parent,nested) -- todo: switch to turn in on and off
+ if parent then
+ local oldchar = getchar(pointer)
+ local newchar = movesub[oldchar]
+ if newchar then
+ local nuc = getnucleus(parent)
+ if pointer == nuc then
+ local sub = getsub(pointer)
+ local sup = getsup(pointer)
+ if sub then
+ if sup then
+ -- print("[char] sub sup")
+ else
+ -- print("[char] sub ---")
+ end
+ elseif sup then
+ -- print("[char] --- sup")
+ else
+ local prev = getprev(parent)
+ if prev and getid(prev) == noad_code then
+ local psub = getsub(prev)
+ local psup = getsup(prev)
+ if psub then
+ if psup then
+ -- print("sub sup [char] --- ---")
+ else
+ -- print("sub --- [char] --- ---")
+ move_none_psub(parent,prev,nuc,oldchar,newchar)
+ end
+ elseif psup then
+ -- print("--- sup [char] --- ---")
+ else
+ -- print("[char] --- ---")
+ move_none_none(parent,prev,nuc,oldchar,newchar)
+ end
+ else
+ -- print("no prev [char]")
+ end
+ end
+ else
+ -- print("[char]")
+ end
+ end
+ end
+ end
+
+ function noads.handlers.fixscripts(head,style,penalties)
+ processnoads(head,fixscripts,"fixscripts")
+ return true -- not needed
+ end
+
+end
+
+-- variants
+
+do
+
+ local variants = { }
+ local validvariants = { -- fast check on valid
+ [0x2229] = 0xFE00, [0x222A] = 0xFE00,
+ [0x2268] = 0xFE00, [0x2269] = 0xFE00,
+ [0x2272] = 0xFE00, [0x2273] = 0xFE00,
+ [0x228A] = 0xFE00, [0x228B] = 0xFE00,
+ [0x2293] = 0xFE00, [0x2294] = 0xFE00,
+ [0x2295] = 0xFE00,
+ [0x2297] = 0xFE00,
+ [0x229C] = 0xFE00,
+ [0x22DA] = 0xFE00, [0x22DB] = 0xFE00,
+ [0x2A3C] = 0xFE00, [0x2A3D] = 0xFE00,
+ [0x2A9D] = 0xFE00, [0x2A9E] = 0xFE00,
+ [0x2AAC] = 0xFE00, [0x2AAD] = 0xFE00,
+ [0x2ACB] = 0xFE00, [0x2ACC] = 0xFE00,
+ }
+
+ variants[mathchar_code] = function(pointer,what,n,parent) -- also set export value
+ local char = getchar(pointer)
+ local selector = validvariants[char]
+ if selector then
+ local next = getnext(parent)
+ if next and getid(next) == noad_code then
+ local nucleus = getnucleus(next)
+ if nucleus and getid(nucleus) == mathchar_code and getchar(nucleus) == selector then
+ local variant
+ local tfmdata = fontdata[getfont(pointer)]
+ local mathvariants = tfmdata.resources.variants -- and variantdata
+ if mathvariants then
+ mathvariants = mathvariants[selector]
+ if mathvariants then
+ variant = mathvariants[char]
+ end
+ end
+ if variant then
+ setchar(pointer,variant)
+ setattr(pointer,a_exportstatus,char) -- we don't export the variant as it's visual markup
+ if trace_variants then
+ report_variants("variant (%U,%U) replaced by %U",char,selector,variant)
+ end
+ else
+ if trace_variants then
+ report_variants("no variant (%U,%U)",char,selector)
+ end
+ end
+ setprev(next,pointer)
+ setnext(parent,getnext(next))
+ flush_node(next)
+ end
+ end
+ end
+ end
+
+ function handlers.variants(head,style,penalties)
+ processnoads(head,variants,"unicode variant")
+ return true -- not needed
+ end
+
+end
+
+-- for manuals
+
+do
+
+ local classes = { }
+ local colors = {
+ [relnode_code] = "trace:dr",
+ [ordnoad_code] = "trace:db",
+ [binnoad_code] = "trace:dg",
+ [opennoad_code] = "trace:dm",
+ [closenoad_code] = "trace:dm",
+ [punctnoad_code] = "trace:dc",
+ -- [opdisplaylimitsnoad_code] = "",
+ -- [oplimitsnoad_code] = "",
+ -- [opnolimitsnoad_code] = "",
+ -- [ordlimitsnoad_code] = "",
+ -- [innernoad_code = "",
+ -- [undernoad_code] = "",
+ -- [overnoad_code] = "",
+ -- [vcenternoad_code] = "",
+ }
+
+ local setcolor = colortracers.set
+ local resetcolor = colortracers.reset
+
+ classes[mathchar_code] = function(pointer,what,n,parent)
+ local color = colors[getsubtype(parent)]
+ if color then
+ setcolor(pointer,color)
+ else
+ resetcolor(pointer)
+ end
+ end
+
+ function handlers.classes(head,style,penalties)
+ processnoads(head,classes,"classes")
+ return true -- not needed
+ end
+
+ registertracker("math.classes",function(v)
+ setaction("math","noads.handlers.classes",v)
+ end)
+
+end
+
+-- experimental
+
+do
+
+ -- mathematics.registerdomain {
+ -- name = "foo",
+ -- parents = { "bar" },
+ -- characters = {
+ -- [0x123] = { char = 0x234, class = binary },
+ -- },
+ -- }
+
+ local domains = { }
+ local categories = { }
+ local numbers = { }
+ local a_mathdomain = privateattribute("mathdomain")
+ mathematics.domains = categories
+ local permitted = {
+ ordinary = ordnoad_code,
+ binary = binnoad_code,
+ relation = relnode_code,
+ punctuation = punctnoad_code,
+ inner = innernoad_code,
+ }
+
+ function mathematics.registerdomain(data)
+ local name = data.name
+ if not name then
+ return
+ end
+ local attr = #numbers + 1
+ categories[name] = data
+ numbers[attr] = data
+ data.attribute = attr
+ -- we delay hashing
+ return attr
+ end
+
+ local enable
+
+ enable = function()
+ enableaction("math", "noads.handlers.domains")
+ if trace_domains then
+ report_domains("enabling math domains")
+ end
+ enable = false
+ end
+
+ function mathematics.setdomain(name)
+ if enable then
+ enable()
+ end
+ local data = name and name ~= v_reset and categories[name]
+ texsetattribute(a_mathdomain,data and data.attribute or unsetvalue)
+ end
+
+ function mathematics.getdomain(name)
+ if enable then
+ enable()
+ end
+ local data = name and name ~= v_reset and categories[name]
+ context(data and data.attribute or unsetvalue)
+ end
+
+ implement {
+ name = "initializemathdomain",
+ actions = enable,
+ onlyonce = true,
+ }
+
+ implement {
+ name = "setmathdomain",
+ arguments = "string",
+ actions = mathematics.setdomain,
+ }
+
+ implement {
+ name = "getmathdomain",
+ arguments = "string",
+ actions = mathematics.getdomain,
+ }
+
+ local function makehash(data)
+ local hash = { }
+ local parents = data.parents
+ if parents then
+ local function merge(name)
+ if name then
+ local c = categories[name]
+ if c then
+ local hash = c.hash
+ if not hash then
+ hash = makehash(c)
+ end
+ for k, v in next, hash do
+ hash[k] = v
+ end
+ end
+ end
+ end
+ if type(parents) == "string" then
+ merge(parents)
+ elseif type(parents) == "table" then
+ for i=1,#parents do
+ merge(parents[i])
+ end
+ end
+ end
+ local characters = data.characters
+ if characters then
+ for k, v in next, characters do
+ -- local chr = n.char
+ local cls = v.class
+ if cls then
+ v.code = permitted[cls]
+ else
+ -- invalid class
+ end
+ hash[k] = v
+ end
+ end
+ data.hash = hash
+ return hash
+ end
+
+ domains[mathchar_code] = function(pointer,what,n,parent)
+ local attr = getattr(pointer,a_mathdomain)
+ if attr then
+ local domain = numbers[attr]
+ if domain then
+ local hash = domain.hash
+ if not hash then
+ hash = makehash(domain)
+ end
+ local char = getchar(pointer)
+ local okay = hash[char]
+ if okay then
+ local chr = okay.char
+ local cls = okay.code
+ if chr and chr ~= char then
+ setchar(pointer,chr)
+ end
+ if cls and cls ~= getsubtype(parent) then
+ setsubtype(parent,cls)
+ end
+ end
+ end
+ end
+ end
+
+ function handlers.domains(head,style,penalties)
+ processnoads(head,domains,"domains")
+ return true -- not needed
+ end
+
+end
+
+-- just for me
+
+function handlers.showtree(head,style,penalties)
+ inspect(nodes.totree(tonut(head)))
+end
+
+registertracker("math.showtree",function(v)
+ setaction("math","noads.handlers.showtree",v)
+end)
+
+-- also for me
+
+do
+
+ local applyvisuals = nuts.applyvisuals
+ local visual = false
+
+ function handlers.makeup(head)
+ applyvisuals(head,visual)
+ end
+
+ registertracker("math.makeup",function(v)
+ visual = v
+ setaction("math","noads.handlers.makeup",v)
+ end)
+
+end
+
+-- the normal builder
+
+do
+
+ local force_penalties = false
+
+ -- registertracker("math.penalties",function(v)
+ -- force_penalties = v
+ -- end)
+
+ function builders.kernel.mlist_to_hlist(head,style,penalties)
+ return mlist_to_hlist(head,style,force_penalties or penalties)
+ end
+
+ -- function builders.kernel.mlist_to_hlist(head,style,penalties)
+ -- local h = mlist_to_hlist(head,style,force_penalties or penalties)
+ -- inspect(nodes.totree(h,true,true,true))
+ -- return h
+ -- end
+
+ implement {
+ name = "setmathpenalties",
+ arguments = "integer",
+ actions = function(p)
+ force_penalties = p > 0
+ end,
+ }
+
+end
+
+local actions = tasks.actions("math") -- head, style, penalties
+
+local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
+
+function processors.mlist_to_hlist(head,style,penalties)
+ starttiming(noads)
+ head = actions(head,style,penalties)
+ stoptiming(noads)
+ return head
+end
+
+callbacks.register('mlist_to_hlist',processors.mlist_to_hlist,"preprocessing math list")
+
+-- tracing
+
+statistics.register("math processing time", function()
+ return statistics.elapsedseconds(noads)
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-pln.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-pln.mkxl
new file mode 100644
index 00000000000..81008f37b22
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-pln.mkxl
@@ -0,0 +1,237 @@
+%D \module
+%D [ file=math-pln,
+%D version=2001.11.16,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Plain Helpers,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Here we collect some Plain \TEX\ leftovers.
+
+\writestatus{loading}{ConTeXt Math Macros / Plain Helpers}
+
+\unprotect
+
+% we need proper unicode:
+
+\def\relbar{\mathrel{\smash-}} % - has the same height as + .. no clue what this refers to
+
+% might change
+
+\permanent\protected\def\hrulefill{\leaders\hrule\hfill}
+%protected\def\dotfill {\cleaders\hbox{\normalstartimath\mathsurround\zeropoint\mkern1.5mu.\mkern1.5mu\normalstopimath}\hfill}
+
+% will move
+
+\permanent\def\oalign#1%
+ {\leavevmode % plain tex uses this
+ \vtop
+ {\baselineskip\zeroskip
+ \lineskip.25\exheight
+ \ialign{\alignmark\alignmark\crcr#1\crcr}}}
+
+\permanent\def\ooalign % chars over each other
+ {\lineskiplimit-\maxdimen
+ \oalign}
+
+% needs checking
+
+\permanent\protected\def\choose{\atopwithdelims()}
+\permanent\protected\def\brack {\atopwithdelims[]}
+\permanent\protected\def\brace {\atopwithdelims\{\}}
+
+% needs checking
+
+\permanent\protected\def\buildrel#1\over#2%
+ {\mathrel{\mathop{\kern\zeropoint#2}\limits^{#1}}}
+
+\permanent\protected\def\bmod
+ {\nonscript
+ \mskip-\medmuskip
+ \mkern5mu
+ \mfunction{mod}%
+ \penalty900
+ \mkern5mu
+ \nonscript
+ \mskip-\medmuskip}
+
+\permanent\protected\def\pmod#1%
+ {\allowbreak
+ \mkern18mu
+ (\mfunction{mod}\mskip\medmuskip#1)}
+
+\permanent\protected\def\cases#1%
+ {\left\{%
+ \mskip\thinmuskip
+ \vcenter
+ {\normalbaselines
+ \mathsurround\zeropoint
+ \ialign{%
+ \normalstartimath\alignmark\alignmark\hfil\normalstopimath
+ \aligntab
+ \quad\alignmark\alignmark\hfil
+ \crcr
+ #1%
+ \crcr}}%
+ \right.}
+
+\permanent\protected\def\matrix#1%
+ {\emptyhbox
+ \mskip\thinmuskip
+ \vcenter
+ {\normalbaselines
+ \mathsurround\zeropoint
+ \ialign{%
+ \hfil\normalstartimath\alignmark\alignmark\normalstopimath\hfil
+ \aligntab
+ \aligntab
+ \quad\hfil\normalstartimath\alignmark\alignmark\normalstopimath\hfil
+ \crcr
+ \mathstrut
+ \crcr
+ \noalign{\kern-\baselineskip}
+ #1\crcr
+ \mathstrut
+ \crcr
+ \noalign{\kern-\baselineskip}}}%
+ \mskip\thinmuskip}
+
+\permanent\protected\def\pmatrix#1%
+ {\left(\matrix{#1}\right)}
+
+\permanent\protected\def\math_openup
+ {\afterassignment\math_openup_indeed\scratchdimen}
+
+\aliased\let\math_closeup\relax
+
+\def\math_openup_indeed
+ {\enforced\permanent\protected\edef\math_closeup
+ {\lineskip \the\lineskip
+ \baselineskip \the\baselineskip
+ \lineskiplimit\the\lineskiplimit
+ \relax}%
+ \advance \lineskip \scratchdimen
+ \advance \baselineskip \scratchdimen
+ \advance \lineskiplimit \scratchdimen}
+
+\permanent\protected\def\openup {\math_openup } % the low level ones are used elsewhere
+\permanent\protected\def\closeup{\math_closeup} % the low level ones are used elsewhere
+
+\permanent\protected\def\displaylines#1%
+ {\the\mathdisplayaligntweaks
+ \tabskip\zeroskip
+ \halign
+ {\hbox to \displaywidth{%
+ \normalstartimath\tabskip\zeroskip\everycr\emptytoks\hfil\displaystyle\alignmark\alignmark\hfil\normalstopimath}\crcr
+ #1\crcr}}
+
+%D This comes from plain but I gave it a \CONTEXT\ touch:
+
+\permanent\def\math_border_NC_indeed
+ {\enforced\global\def\math_border_NC{\aligntab}}
+
+\aliased\let\math_border_NC\math_border_NC_indeed
+
+\permanent\def\math_border_NR
+ {\enforced\global\let\math_border_NC\math_border_NC_indeed
+ \cr}
+
+\protected\def\math_border_matrix#1#2#3% adapted plain
+ {\begingroup
+ %
+ \setbox\scratchbox\hbox\bgroup
+ \mr B%
+ \egroup
+ \scratchdimenone\wd\scratchbox
+ %
+ \scratchdimentwo.2\bodyfontsize
+ %
+ \mathsurround\zeropoint
+ %
+ \enforced\def\NC{\math_border_NC}%
+ \enforced\def\NR{\math_border_NR}%
+ %
+ \gdef\m_math_border_matrix
+ {\kern\scratchdimentwo
+ \glet\m_math_border_matrix\relax}%
+ %
+ \setbox\scratchboxone\vbox\bgroup
+ \everycr{\noalign\bgroup\m_math_border_matrix\egroup}%
+ \tabskip \zeroskip
+ \halign{% \ialign resets everycr
+ \startimath\alignmark\alignmark\stopimath
+ \hfil
+ \kern\dimexpr\scratchdimentwo+\scratchdimenone\relax
+ \aligntab
+ \thinspace
+ \hfil
+ \startimath\alignmark\alignmark\stopimath
+ \hfil
+ \aligntab
+ \aligntab
+ \quad
+ \hfil
+ \startimath\alignmark\alignmark\stopimath
+ \hfil
+ \crcr
+ \omit
+ \strut
+ \hfil
+ \crcr
+ \noalign{\kern-\baselineskip}%
+ #3\crcr
+ \omit
+ \strut
+ \cr}%
+ \egroup
+ \setbox\scratchboxtwo\vbox\bgroup
+ \unvcopy\scratchboxone
+ \global\setbox\globalscratchbox\lastbox
+ \egroup
+ \setbox\scratchboxtwo\hbox\bgroup
+ \unhbox\globalscratchbox
+ \unskip
+ \global\setbox\globalscratchbox\lastbox
+ \egroup
+ \setbox\scratchboxtwo\hbox\bgroup
+ \startimath
+ \kern\dimexpr\wd\globalscratchbox-\scratchdimenone\relax
+ \left#1\relax
+ \kern-\wd\globalscratchbox
+ \global\setbox\globalscratchbox\vbox\bgroup
+ \box\globalscratchbox
+ \kern\scratchdimentwo
+ \egroup
+ \vcenter\bgroup
+ \kern-\ht\globalscratchbox
+ \unvbox\scratchboxone
+ \kern-\baselineskip
+ \egroup
+ \thinspace
+ \right#2\relax
+ \stopimath
+ \egroup
+ \null
+ \thickspace
+ \vbox\bgroup
+ \kern\ht\globalscratchbox
+ \box\scratchboxtwo
+ \egroup
+ %
+ \endgroup}
+
+\permanent\protected\def\bordermatrix {\math_border_matrix()}
+\permanent\protected\def\bbordermatrix{\math_border_matrix[]}
+
+\permanent\protected\def\startbordermatrix #1\stopbordermatrix {\math_border_matrix(){#1}}
+\permanent\protected\def\startbbordermatrix#1\stopbbordermatrix{\math_border_matrix[]{#1}}
+
+\permanent\let\stopbordermatrix \relax
+\permanent\let\stopbbordermatrix\relax
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx b/Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx
new file mode 100644
index 00000000000..8906efdc85a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-rad.mklx
@@ -0,0 +1,271 @@
+%D \module
+%D [ file=math-rad,
+%D version=2013.07.13,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Radicals,
+%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 Math Macros / Radicals}
+
+\unprotect
+
+%D \starttyping
+%D $\sqrt[3]{10}$
+%D \stoptyping
+%D
+%D This root command will be overloaded later:
+
+%D Old stuff:
+
+% \def\rootradical{\Uroot \defaultmathfamily "221A } % can be done in char-def
+% \def\surdradical{\Uradical \defaultmathfamily "221A } % can be done in char-def
+
+\permanent\protected\def\root#1\of{\rootradical{#1}} % #2
+
+\protected\def\sqrt{\doifelsenextoptionalcs\rootwithdegree\rootwithoutdegree} % will be redefined
+
+\permanent\protected\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird
+ {\normalexpanded{\rootradical
+ {\normalunexpanded{#1}}%
+ {\noexpand\triggermathstyle{\number\normalmathstyle}%
+ \normalunexpanded{#2}}}}
+
+% experimental new keyword: (maybe keywords should come after the symbol)
+%
+% \permanent\protected\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird
+% {\Uroot style \normalmathstyle "0 "221A {#1}{#2}}
+
+\permanent\protected\def\rootwithdegree[#1]{\rootradical{#1}}
+\permanent\protected\def\rootwithoutdegree {\rootradical {}}
+
+%D Even older stuff:
+
+% % is now a ordinary character
+%
+% \let\normalsurd\surd % \Uradical "0 "221A
+% \permanent\protected\def\surd{\normalsurd{}}
+
+%D The real thing. If needed one can control matters with one of the many
+%D \type {\Umath...} parameters.
+%D
+%D \starttyping
+%D \def\R {\Umathradicaldegreeafter\textstyle0pt}
+%D \def\RR{\Umathradicaldegreeafter\textstyle\dimexpr
+%D \Umathradicaldegreeafter\textstyle+.1em\relax}
+%D \def\RRR{\frozen\Umathradicaldegreeafter\textstyle\dimexpr
+%D \Umathradicaldegreeafter\textstyle+.2em\relax}
+%D
+%D $ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
+%D $ \sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D
+%D \def\R {\Umathradicaldegreeafter\textstyle
+%D 0pt}
+%D \def\RR {\Umathradicaldegreeafter\textstyle
+%D 0.95\Umathradicaldegreeafter\textstyle}
+%D \def\RRR{\frozen\Umathradicaldegreeafter\textstyle
+%D 0.9\Umathradicaldegreeafter\textstyle}
+%D
+%D $ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
+%D $ \sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D
+%D \def\RR {\mathopenupparameter\Umathradicaldegreeafter{.1}}
+%D
+%D $ \sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par
+%D $ \sqrt[3]{5} {\RR\sqrt[3]{5}} \sqrt[3]{5} $\par
+%D \stoptyping
+
+\installcorenamespace{mathradical}
+\installcorenamespace{mathradicalalternative}
+
+\installcommandhandler \??mathradical {mathradical} \??mathradical
+
+\setupmathradical
+ [\c!alternative=\v!normal,
+ \c!mpoffset=.25\exheight]
+
+\appendtoks
+ \frozen\protected\instance\edefcsname\currentmathradical\endcsname{\math_radical_handle{\currentmathradical}}
+\to \everydefinemathradical
+
+\mutable\let\currentmathradical \empty
+\mutable\let\currentmathradicaldegree\empty
+
+\tolerant\protected\def\math_radical_handle#tag#*[#degree]#:#body%
+ {\begingroup
+ \edef\currentmathradical{#tag}%
+ \edef\currentmathradicaldegree{#degree}%
+ \ifempty\currentmathradicaldegree
+ \let\currentmathradicaldegree\m_math_no_degree
+ \fi
+ \math_radical_alternative{#body}%
+ \endgroup}
+
+\def\m_math_no_degree{{}}
+
+\def\math_radical_alternative{\csname\??mathradicalalternative\mathradicalparameter\c!alternative\endcsname}
+
+\setvalue{\??mathradicalalternative\v!default}% #body%
+ {\rootradical{\currentmathradicaldegree}} % {#body}}
+
+\setvalue{\??mathradicalalternative\v!normal}#body%
+ {\edef\p_color{\mathradicalparameter\c!color}%
+ \ifempty\p_color
+ \styledrootradical{\currentmathradicaldegree}{#body}% {} really needed as \rootradical expands first
+ \orelse\ifempty\currentmathradicaldegree
+ \pushcolor[\p_color]%
+ \styledrootradical{\currentmathradicaldegree}%
+ {\popcolor#body}%
+ \else
+ \pushcolor[\p_color]%
+ \styledrootradical{\popcolor\currentmathradicaldegree\pushcolor[\p_color]}%
+ {\popcolor#body}%
+ \fi}
+
+\startMPextensions
+ vardef math_radical_simple(expr w,h,d,o) =
+ (-h/2-o,h/2-o) --
+ (-h/4-o,-d-o) --
+ (-o,h+o) --
+ (w+o,h+o) --
+ (w+o,h-h/10+o)
+ enddef ;
+\stopMPextensions
+
+\startuniqueMPgraphic{minifun::math:radical:default}%{...}
+ draw
+ math_radical_simple(OverlayWidth,OverlayHeight,OverlayDepth,OverlayOffset)
+ % withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
+ withpen pencircle scaled OverlayLineWidth
+ % dashed evenly
+ withcolor OverlayLineColor ;
+\stopuniqueMPgraphic
+
+% todo: spacing .. this is just an experiment (article driven)
+
+\setvalue{\??mathradicalalternative\v!mp}#body% we could use dowithnextbox
+ {\begingroup
+ \scratchoffset\mathradicalparameter\c!mpoffset
+ \setbox\nextbox\mathstylehbox{#body}%
+ % we use the \overlay variables as these are passes anyway and
+ % it's more efficient than using parameters
+ \d_overlay_width \wd\nextbox
+ \d_overlay_height \ht\nextbox
+ \d_overlay_depth \dp\nextbox
+ \d_overlay_offset \scratchoffset
+ \d_overlay_linewidth\the\dimexpr\triggeredmathstyleparameter\Umathfractionrule
+ %
+ \edef\overlaylinecolor{\mathradicalparameter\c!color}%
+ %
+ \edef\p_mp{\mathradicalparameter\c!mp}%
+ %
+ \setbox\scratchbox\hpack\bgroup % todo: tag this box as sqrt
+ \uniqueMPgraphic
+ {\p_mp}%
+ %{...}%
+ \egroup
+ \scratchdimen \wd\scratchbox
+ \scratchtopoffset \dimexpr\scratchoffset+\dp\nextbox\relax
+ \scratchbottomoffset\dimexpr\scratchoffset+\ht\nextbox/2\relax
+ \hpack to \scratchdimen{\hss\box\nextbox\hskip\scratchoffset}%
+ \hskip-\scratchdimen
+ \lower\dimexpr\scratchtopoffset\box\scratchbox%
+ \ifx\currentmathradicaldegree\empty \else
+ \setbox\scratchbox\mathstylehbox{\scriptscriptstyle\currentmathradicaldegree\hss}%
+ \wd\scratchbox\scratchdimen
+ \hskip-\scratchdimen
+ \raise\dimexpr\scratchbottomoffset\box\scratchbox
+ \fi
+ \endgroup}
+
+\definemathradical[sqrt][mp=minifun::math:radical:default]
+
+% \setupmathradical[sqrt][alternative=normal,color=darkblue]
+% \setupmathradical[sqrt][alternative=mp,color=darkgreen]
+
+%D Because I wanted to illustrate some more fun stuff another mechanism
+%D is provided as well ... let's put some dangerous tools in the hand of
+%D math jugglers like Aditya.
+
+\installcorenamespace{mathornament}
+\installcorenamespace{mathornamentalternative}
+
+\installcommandhandler \??mathornament {mathornament} \??mathornament
+
+\setupmathornament
+ [\c!alternative=\v!mp, % currently mp only .. maybe some day layer too
+ \c!mpoffset=.25\exheight]
+
+\appendtoks
+ \frozen\instance\setuevalue{\currentmathornament}{\math_ornament_handle{\currentmathornament}}%
+\to \everydefinemathornament
+
+\protected\def\math_ornament_handle#tag#body%
+ {\begingroup
+ \edef\currentmathornament{#tag}%
+ \csname\??mathornamentalternative\mathornamentparameter\c!alternative\endcsname{#body}%
+ \endgroup}
+
+\setvalue{\??mathornamentalternative\v!mp}#body% we could use dowithnextbox
+ {\begingroup
+ \scratchoffset\mathornamentparameter\c!mpoffset
+ \setbox\nextbox\mathstylehbox{#body}%
+ \d_overlay_width \wd\nextbox
+ \d_overlay_height \ht\nextbox
+ \d_overlay_depth \dp\nextbox
+ \d_overlay_offset \scratchoffset
+ \d_overlay_linewidth\linewidth
+ \edef\overlaylinecolor{\mathornamentparameter\c!color}%
+ \edef\p_mp{\mathornamentparameter\c!mp}%
+ % the width of the graphic determines the width of the final result
+ \setbox\scratchbox\hpack{\uniqueMPgraphic{\p_mp}}% todo: add code key + tag
+ \hpack to \wd\scratchbox{\hss\box\nextbox\hss}%
+ \hskip-\wd\scratchbox
+ \box\scratchbox
+ \endgroup}
+
+% \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 ;
+% 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 [mathhat] [mp=math:ornament:hat]
+%
+% \dorecurse{8}{$\mathhat{\blackrule[width=#1ex,color=gray]}$ }
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-scr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-scr.mkxl
new file mode 100644
index 00000000000..555f549f133
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-scr.mkxl
@@ -0,0 +1,58 @@
+%D \module
+%D [ file=math-scr,
+%D version=2007.07.19,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Scripts,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Math Macros / Scripts}
+
+\unprotect
+
+%D These macros were first needed by Frits (Gajes) Spijkers (of the Math4All project
+%D that we participate in), and used for typesetting the minus sign that is keyed
+%D into scientific calculators. We use the monospaced signs, that we also define as
+%D symbol, so that they can be overloaded. We can probably do it nicer now (in lmtx).
+
+\def\math_scripts_raised_symbol#1%
+ {\mathchoice
+ {\math_scripts_raised_symbol_indeed5\tf {#1}}%
+ {\math_scripts_raised_symbol_indeed5\tf {#1}}%
+ {\math_scripts_raised_symbol_indeed4\tx {#1}}%
+ {\math_scripts_raised_symbol_indeed3\txx{#1}}}
+
+\def\math_scripts_raised_symbol_indeed#1#2#3%
+ {\mathord{{#2\raise.#1ex\hbox{#2\symbol[#3]}}}}
+
+\def\math_scripts_raised_number#1%
+ {\mathchoice
+ {\math_scripts_raised_number_indeed\tf {#1}}%
+ {\math_scripts_raised_number_indeed\tf {#1}}%
+ {\math_scripts_raised_number_indeed\tx {#1}}%
+ {\math_scripts_raised_number_indeed\txx{#1}}}
+
+\def\math_scripts_raised_number_indeed#1#2%
+ {\setbox\scratchbox\hbox{0}%
+ \mathord{\hbox to \wd\scratchbox{\hss#1\symbol[#2]\hss}}}
+
+\definesymbol[positive] [\getglyph{Mono}{+}]
+\definesymbol[negative] [\getglyph{Mono}{-}]
+\definesymbol[zeroamount][\getglyph{Mono}{-}]
+
+\permanent\protected\def\negative {\math_scripts_raised_symbol{negative}}
+\permanent\protected\def\positive {\math_scripts_raised_symbol{positive}}
+\permanent\protected\def\zeroamount{\math_scripts_raised_number{zeroamount}}
+
+%D How negative such a symbol looks is demonstrated in: $\negative 10^{\negative
+%D 10^{\negative 10}}$.
+
+% \setuptextformulas % why here
+% [\c!size=\v!normal]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx b/Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx
new file mode 100644
index 00000000000..944185c23c4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-stc.mklx
@@ -0,0 +1,1379 @@
+%D \module
+%D [ file=math-stc,
+%D version=2012.12.29,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Stackers,
+%D comment=This replaces math-arr and friends,
+%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 Math Macros / Stackers}
+
+\unprotect
+
+%D WARNING: If the code here changes, the export needs to be checked! Stackers are
+%D rather special because the order in mathml matters, so we flush in [base under
+%D over] order. We also do some analysis at the \TEX\ end (passing the right
+%D variant). It's easy in the export to deal with it but in the pdf stream less
+%D trivial as we don't actually analyze there.
+%D
+%D At some point the \MKII\ arrow mechanism has been converted to \MKIV, but we kept
+%D most of the logic. We now have a more generic variant dealing with extensibles.
+%D There are a few demands than we need to meet:
+%D
+%D \startitemize
+%D \startitem
+%D The width of the extensible need to adapt itself automatically.
+%D \stopitem
+%D \startitem
+%D We need to be able to control horizontal and vertical offsets.
+%D \stopitem
+%D \startitem
+%D We best have a math as well as a text variant (which is handy for chemistry).
+%D \stopitem
+%D \startitem
+%D For historic reasons we need to deal with optional arguments in a special
+%D (reverse) way.
+%D \stopitem
+%D \startitem
+%D We need alternatives for extensibles on top, in the middle and at the bottom.
+%D \stopitem
+%D \stopitemize
+%D
+%D After I had experimented a bit with virtual characters for two headed arrows I
+%D discussed the issue with the Gyre folks and we came to the conclusion that it
+%D made sense to have real extensibles instead of constructing them out of snippets.
+%D After all, \OPENTYPE\ math provides for it. So, in December 2013 beta versions of
+%D Latin Modern and Gyre fonts came available that had these! Because we still want
+%D to support the traditional Latin Modern Virtual math font those were extended
+%D with a couple of virtual extensibles as well.
+%D
+%D {\em For the moment we still have some mess here: we can deal with known
+%D dimensions, but fillers (like \type {\rightarrowfil} don't work with \OPENTYPE\
+%D extensibles yet because there is no way to let them stretch like leaders. At some
+%D point \LUATEX\ might provide a auto||fit||to||encapsulated||box and if not I will
+%D cook up a \LUA\ based variant.}
+%D
+%D We could mess with something like \type {$mid\limits^{top}_{bottom}$} but we like
+%D a bit more control. At some point we need to add some hacks to get exports
+%D working well.
+%D
+%D In the end we have a more flexible mechanism which also handles text variants.
+
+%D When wrapping up some math developments I decided to add mp support here as well.
+%D A nice evening job with Joe Bonamassa performing live on the big screen (real
+%D nice bluray's). See meta-imp-mat.mkiv for examples.
+
+% possible improvements:
+%
+% - we could skip the left/right offsets when offset=normal, this saves some access time
+% at the lua end and some checking: use \mathhorizontalcode or \mathextensiblecode
+% but in practice arrows etc are not used that often
+
+\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
+
+% \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
+ \Umathchar \fam \zerocount \scratchunicode
+ \fi
+ \hss}}
+
+\def\math_stackers_regular
+ {\mathstylehbox{\usemathstackerscolorparameter\c!color
+ \hskip\d_math_stackers_offset_l
+ \Umathaccent\fam\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\fam\zerocount\scratchunicode
+ {\hskip\dimexpr\hsize-\d_math_stackers_offset_l-\d_math_stackers_offset_r}%
+ \hskip\d_math_stackers_offset_r
+ }}
+
+% these delimiters are a unuseable as they don't center for small arguments:
+%
+% $\Umathaccent 0 0 "2190{x}$ \par $\Umathaccent 0 0 "27F8{x}$\par
+% $\Udelimiterunder 0 "2190{x}$ \par $\Udelimiterunder 0 "27F8{x}$\par
+
+\setvalue{\??mathextensiblefallbacks}%
+ {\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.
+%D
+%D Because we have quite some control over positioning, we have somewhat extensive
+%D tracing built in.
+
+\let\math_stackers_top \relax
+\let\math_stackers_middle\relax
+\let\math_stackers_bottom\relax
+\let\math_stackers_skip \hskip
+
+\installtextracker
+ {math.stackers.texts}
+ {\let\math_stackers_top \filledhboxb
+ \let\math_stackers_middle\filledhboxr
+ \let\math_stackers_bottom\filledhboxg
+ \let\math_stackers_skip \math_stackers_skip_indeed}
+ {\let\math_stackers_top \relax
+ \let\math_stackers_middle\relax
+ \let\math_stackers_bottom\relax
+ \let\math_stackers_skip \hskip}
+
+\def\math_stackers_skip_indeed#amount%
+ {\filledhboxk{\unsetteststrut\strut\hskip#amount}} % \dontshowstruts
+
+\let\math_stackers_start_tagged_mid\relax
+\let\math_stackers_start_tagged_top\relax
+\let\math_stackers_start_tagged_bot\relax
+\let\math_stackers_stop_tagged \relax
+
+\appendtoks
+ \def\math_stackers_start_tagged_mid{\dostarttagged\t!mstackermid\empty\hbox\bgroup}%
+ \def\math_stackers_start_tagged_top{\dostarttagged\t!mstackertop\empty\hbox\bgroup}%
+ \def\math_stackers_start_tagged_bot{\dostarttagged\t!mstackerbot\empty\hbox\bgroup}%
+ \def\math_stackers_stop_tagged {\egroup\dostoptagged}%
+\to \everysetuptagging
+
+%D We define a full featured command handler.
+
+\installcorenamespace {mathstackers}
+
+\installcommandhandler \??mathstackers {mathstackers} \??mathstackers
+
+\setupmathstackers
+ [%c!alternative=\v!text, % text | mathematics
+ \c!left=,
+ \c!right=,
+ \c!mathclass=\s!rel,
+ \c!alternative=\v!normal,
+ \c!voffset=.25\mathexheight,
+ \c!hoffset=\zeropoint,
+ \c!topoffset=\zeropoint, % for manual italic correction
+ \c!distance=\mathstackersparameter\c!voffset, % distance between symbol and base (can be different from voffset)
+ \c!minheight=\mathexheight,
+ \c!mindepth=\zeropoint,
+ \c!minwidth=.5\mathemwidth,
+ \c!order=\v!normal,
+ \c!strut=,
+ \c!color=, % todo: when I need it
+ \c!topcommand=,
+ \c!middlecommand=,
+ \c!bottomcommand=,
+ \c!offset=\v!normal, % normal | min | max
+ \c!location=\v!top] % none | normal | small | medium | big
+
+%D We assume that the middle characters (that can be an extensible) to sit on
+%D top of the baseline by default.
+
+\installcorenamespace {mathstackerslocation}
+\installcorenamespace {mathstackersalternative}
+
+\letvalue{\??mathstackerslocation\v!top }\plusone % on top of baseline
+\letvalue{\??mathstackerslocation\v!high }\plustwo % 25 % down
+\letvalue{\??mathstackerslocation\v!middle }\plusthree % centered
+\letvalue{\??mathstackerslocation\v!low }\plusfour % 75 % down
+\letvalue{\??mathstackerslocation\v!bottom }\plusfive % below baseline
+\letvalue{\??mathstackerslocation }\zerocount
+
+%D First we implement the helper that deals with an extensible in the middle and
+%D top and|/|or bottom texts:
+
+\let\m_math_stackers_text_top \empty
+\let\m_math_stackers_text_bottom\empty
+\let\m_math_stackers_text_middle\empty
+
+\def\math_stackers_flushtext#command#text%
+ {\ifdim\scratchleftoffset >\zeropoint\math_stackers_skip\scratchleftoffset \fi
+ \ifx\p_strut\v!no \else
+ \strut
+ \fi
+ \mathstackersparameter#command#text%
+ \ifdim\scratchrightoffset>\zeropoint\math_stackers_skip\scratchrightoffset\fi}
+
+\def\math_stackers_toptext {\math_stackers_flushtext\c!topcommand \m_math_stackers_text_top }
+\def\math_stackers_bottomtext{\math_stackers_flushtext\c!bottomcommand\m_math_stackers_text_bottom}
+\def\math_stackers_middletext{\math_stackers_flushtext\c!middlecommand\m_math_stackers_text_middle}
+
+\def\math_stackers_content
+ {\ifcase\scratchcounter
+ \math_stackers_fallback
+ \or % left
+ \math_stackers_regular
+ \or % right
+ \math_stackers_regular
+ \or % horizontal
+ \math_stackers_regular
+ \else
+ \math_stackers_fallback
+ \fi}
+
+% no checking, we assume sane use
+
+\letvalue{\??mathstackersalternative\v!normal }\math_stackers_content
+\letvalue{\??mathstackersalternative\v!default}\math_stackers_content
+
+\setupmathstackers
+ [\c!mp=math:stacker:\number\scratchunicode,
+ \c!mpheight=\mathcharht\scratchunicode,
+ \c!mpdepth=\mathchardp\scratchunicode,
+ \c!mpoffset=.25\mathexheight]
+
+\setvalue{\??mathstackersalternative\v!mp}%
+ {\normalexpanded{\math_stackers_mp_box
+ {\the\dimexpr\mathstackersparameter\c!mpheight}%
+ {\the\dimexpr\mathstackersparameter\c!mpdepth}%
+ {\the\dimexpr\mathstackersparameter\c!mpoffset}%
+ {\the\dimexpr\triggeredmathstyleparameter\Umathfractionrule}%
+ {\the\dimexpr\triggeredmathstyleparameter\Umathaxis}%
+ {\the\mathexheight}%
+ {\the\mathemwidth}%
+ }}
+
+\protected\def\math_stackers_mp_box#1#2#3#4#5#6#7%
+ {\hpack\bgroup % todo: add code key + tag
+ % we can speed up \mathexheight expansion a bit
+ \d_overlay_width \scratchwidth
+ \d_overlay_height #1\relax
+ \d_overlay_depth #2\relax
+ \d_overlay_offset #3\relax
+ \d_overlay_linewidth#4\relax
+ \edef\overlaylinecolor{\mathstackersparameter\c!color}%
+ \edef\p_mp{\mathstackersparameter\c!mp}%
+ \uniqueMPgraphic{\p_mp}{axis=#5,ex=#6,em=#7}%
+ \egroup}
+
+\def\math_stackers_check_unicode#codepoint%
+ {\scratchunicode#codepoint\relax
+ \scratchhoffset\mathstackersparameter\c!hoffset\relax
+ \scratchvoffset\mathstackersparameter\c!voffset\relax
+ \scratchcounter\mathhorizontalcode\fam\scratchunicode\relax % also sets \leftscratchoffset and \rightscratchoffset
+ \ifx\p_offset\v!max
+ % heads/tails + hoffset
+ \orelse\ifx\p_offset\v!min
+ % heads/tails - hoffset
+ \advance\scratchleftoffset -\scratchhoffset
+ \advance\scratchrightoffset-\scratchhoffset
+ \else % \v!normal
+ % hoffset
+ \scratchleftoffset\zeropoint
+ \scratchrightoffset\zeropoint
+ \fi
+ \ifdim\scratchleftoffset<\zeropoint
+ \scratchleftoffset\zeropoint
+ \fi
+ \ifdim\scratchrightoffset<\zeropoint
+ \scratchrightoffset\zeropoint
+ \fi}
+
+\def\math_stackers_normalize_three
+ {\scratchheight\ht\scratchboxthree
+ \scratchdepth \dp\scratchboxthree
+ \scratchtopoffset \scratchheight
+ \scratchbottomoffset\scratchdepth
+ \scratchdimen\mathstackersparameter\c!minheight\relax
+ \ifdim\scratchheight<\scratchdimen
+ \scratchheight\scratchdimen
+ \ht\scratchboxthree\scratchheight
+ \fi
+ \scratchdimen\mathstackersparameter\c!mindepth\relax
+ \ifdim\scratchdepth<\scratchdimen
+ \scratchdepth\scratchdimen
+ \dp\scratchboxthree\scratchdepth
+ \fi
+ \advance\scratchtopoffset -\scratchheight
+ \advance\scratchbottomoffset-\scratchdepth
+ \ifdim\scratchtopoffset<\zeropoint
+ \scratchtopoffset\zeropoint
+ \fi
+ \ifdim\scratchbottomoffset<\zeropoint
+ \scratchbottomoffset\zeropoint
+ \fi}
+
+\protected\def\math_stackers_triplet#method#category#codepoint#toptext#bottomtext%
+ {\begingroup
+ \edef\currentmathstackers{#category}%
+ \mathstackersparameter\c!left\relax
+ \dostarttagged\t!mstacker\currentmathstackers
+ \ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
+ {\edef\p_offset {\mathstackersparameter\c!offset}%
+ \edef\p_location {\mathstackersparameter\c!location}%
+ \edef\p_strut {\mathstackersparameter\c!strut}%
+ \edef\p_alternative{\mathstackersparameter\c!alternative}%
+ \edef\m_math_stackers_text_top {#toptext}%
+ \edef\m_math_stackers_text_bottom{#bottomtext}%
+ \ifparameter#bottomtext\or
+ \edef\p_order{\mathstackersparameter\c!order}%
+ \ifx\p_order\v!reverse
+ \swapmacros\m_math_stackers_text_top\m_math_stackers_text_bottom
+ \fi
+ \fi
+ \scratchleftoffset \zeropoint
+ \scratchrightoffset\zeropoint
+ \ifcase#method\relax
+ \math_stackers_check_unicode{#codepoint}%
+ \else
+ \edef\m_math_stackers_text_middle{#codepoint}%
+ \fi
+ \ifempty\m_math_stackers_text_top
+ \setbox\scratchboxone\emptyhbox
+ \else
+ \setmathsmalltextbox\scratchboxone\hbox{\math_stackers_toptext}%
+ \fi
+ \ifempty\m_math_stackers_text_bottom
+ \setbox\scratchboxtwo\emptyhbox
+ \else
+ \setmathsmalltextbox\scratchboxtwo\hbox{\math_stackers_bottomtext}%
+ \fi
+ %
+ \ifcase#method\relax
+ % e.g. extensible
+ %\scratchwidth\wd
+ % \ifdim\wd\scratchboxone>\wd\scratchboxtwo
+ % \scratchboxone
+ % \else
+ % \scratchboxtwo
+ % \fi
+ %\relax
+ \scratchwidth\mathcharwd\scratchunicode
+ \ifdim\wd\scratchboxone>\scratchwidth
+ \scratchwidth\wd\scratchboxone
+ \orelse\ifdim\wd\scratchboxtwo>\scratchwidth
+ \scratchwidth\wd\scratchboxtwo
+ \fi
+ \else
+ \ifempty\m_math_stackers_text_middle
+ \setbox\scratchboxthree\emptyhbox
+ \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
+ \fi
+ %
+ \scratchdimen\mathstackersparameter\c!minwidth\relax
+ \ifdim\scratchwidth<\scratchdimen
+ \scratchwidth\scratchdimen
+ \fi
+ \advance\scratchwidth2\scratchhoffset
+ %
+ \ifcase#method\relax
+ \dostarttagged\t!mstackermid\empty
+ \setbox\scratchboxthree\csname\??mathstackersalternative\p_alternative\endcsname
+ \dostoptagged
+ \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
+ %
+ \ifcsname\??mathstackerslocation\p_location\endcsname
+ \ifcase\csname\??mathstackerslocation\p_location\endcsname\relax
+ \scratchdistance\zeropoint
+ \or % top
+ \scratchdistance\zeropoint
+ \or % high
+ \scratchdistance.25\htdp\scratchboxthree
+ \or % centered
+ \scratchdistance.5\htdp\scratchboxthree
+ \or % low
+ \scratchdistance.75\htdp\scratchboxthree
+ \or % bottom
+ \scratchdistance\htdp\scratchboxthree
+ \else
+ \scratchdistance\zeropoint
+ \fi
+ \else
+ \scratchdistance\p_location\htdp\scratchboxthree
+ \fi
+ %
+ \ifzeropt\scratchdistance\else
+ \setbox\scratchboxthree\hpack{\lower\scratchdistance\box\scratchboxthree}%
+ \fi
+ %
+ \math_stackers_normalize_three
+ % analysis
+ \ifdim\htdp\scratchboxtwo>\zeropoint
+ \ifdim\htdp\scratchboxone>\zeropoint
+ \dosettagproperty\s!subtype\t!munderover
+ \else
+ \dosettagproperty\s!subtype\t!munder
+ \fi
+ \else
+ \ifdim\htdp\scratchboxone>\zeropoint
+ \dosettagproperty\s!subtype\t!mover
+ \else
+ % brrr
+ \fi
+ \fi
+ % base
+ \math_stackers_start_tagged_mid
+ \math_stackers_middle\bgroup
+ \box\scratchboxthree
+ \egroup
+ \math_stackers_stop_tagged
+ % under
+ \ifdim\htdp\scratchboxtwo>\zeropoint
+ \math_stackers_start_tagged_bot
+ \scratchoffset\scratchvoffset
+ \kern-\scratchwidth
+ \math_stackers_bottom\bgroup
+ \lower\dimexpr\ht\scratchboxtwo+\scratchdepth+\scratchoffset+\scratchbottomoffset\relax
+ \box\scratchboxtwo
+ \egroup
+ \math_stackers_stop_tagged
+ \fi
+ % over
+ \ifdim\htdp\scratchboxone>\zeropoint
+ \math_stackers_start_tagged_top
+ \scratchoffset\scratchvoffset
+ \kern-\scratchwidth
+ \math_stackers_top\bgroup
+ \raise\dimexpr\dp\scratchboxone+\scratchheight+\scratchoffset+\scratchtopoffset\relax
+ \box\scratchboxone
+ \egroup
+ \math_stackers_stop_tagged
+ \fi
+ %
+ }%
+ \dostoptagged
+ \mathstackersparameter\c!right\relax
+ \endgroup}
+ %\math_stackers_stop_group}
+
+\permanent\tolerant\protected\def\definemathextensible[#1]#*[#2]#*[#3]% category name unicode
+ {\ifarguments\or\or
+ \frozen\setuevalue{#1}{\math_stackers_auto_normal\noexpand\currentmathstackers{\number#2}}%
+ \or
+ \frozen\setuevalue{#2}{\math_stackers_auto_normal{#1}{\number#3}}%
+ \fi}
+
+\tolerant\protected\def\math_stackers_auto_normal#1#2#*[#3]#:#=#*#=%
+ {\begingroup
+ \scratchcounter#2\relax
+ \edef\currentmathstackers{\ifparameter#3\or#3\else#1\fi}%
+ \math_stackers_triplet\zerocount\currentmathstackers\scratchcounter{#4}{#5}%
+ \endgroup}
+
+%D A few direct accessors (in the meantime we redefined \mathextensible so we renamed the
+%D following):
+
+\permanent\tolerant\protected\def\directmathextensible[#category]%
+ {\begingroup
+ \math_stackers_handle_extensible{\ifparameter#category\or#category\else\v!mathematics\fi}} % will be defined later on
+
+\permanent\tolerant\protected\def\directtextextensible[#category]%
+ {\begingroup
+ \math_stackers_handle_extensible{\ifparameter#category\or#category\else\v!text\fi}} % will be defined later on
+
+\aliased\let\mathstacker\directmathextensible
+\aliased\let\textstacker\directtextextensible
+
+\def\math_stackers_handle_extensible#category#codepoint#toptext#bottomtext%
+ {\math_stackers_triplet\zerocount{#category}{#codepoint}{#toptext}{#bottomtext}%
+ \endgroup}
+
+%D The next one deals with under and over extensibles (arrows mostly):
+
+\installcorenamespace {mathclasses}
+
+\letvalue{\??mathclasses }\mathord
+\letvalue{\??mathclasses rel}\mathrel
+\letvalue{\??mathclasses ord}\mathord
+
+\def\math_class_by_parameter#1%
+ {\normalexpanded{\noexpand\math_class_by_parameter_indeed{#1\c!mathclass}}}
+
+\def\math_class_by_parameter_indeed#1%
+ {\csname\??mathclasses\ifcsname\??mathclasses#1\endcsname#1\fi\endcsname}
+
+% 1 0 name n 0 | 0 1 name n 0 | 1 1 name n n
+
+\let\math_stackers_stop_group\endgroup
+
+\protected\def\math_stackers_start_group#category%
+ {\begingroup
+ \edef\currentmathstackers{#category}%
+ \edef\p_limits{\mathstackersparameter\c!mathlimits}%
+ \ifx\p_limits\v!yes
+ \def\math_stackers_stop_group{\egroup\endgroup\ordlimits}%
+ \mathop\bgroup
+ \else
+ \let\math_stackers_stop_group\endgroup
+ \fi}
+
+\newconstant\c_math_stackers_top
+\newconstant\c_math_stackers_bottom
+\newconstant\c_math_stackers_codepoint
+\newconstant\c_math_stackers_extracode
+\newdimen \d_math_stackers_offset_l
+\newdimen \d_math_stackers_offset_r
+
+\setupmathstackers[lt=\zeropoint,rt=\zeropoint,lb=\zeropoint,rb=\zeropoint]
+
+\tolerant\protected\def\math_stackers_make_double#top#bottom#category#codepoint#codeextra#spacer[#settings]#:#text%
+ {\math_stackers_start_group{#category}%
+ \c_math_stackers_top #top\relax
+ \c_math_stackers_bottom #bottom\relax
+ \c_math_stackers_codepoint#codepoint\relax
+ \c_math_stackers_extracode#codeextra\relax
+ \ifparameter#settings\or
+ \setupcurrentmathstackers[#settings]%
+ \fi
+ \mathstackersparameter\c!left\relax
+ \dostarttagged\t!mstacker\currentmathstackers
+ \ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
+ {\edef\m_math_stackers_text_middle {#text}%
+ %
+ \edef\p_offset {\mathstackersparameter\c!offset}%
+ \edef\p_location {\mathstackersparameter\c!location}%
+ \edef\p_strut {\mathstackersparameter\c!strut}%
+ \edef\p_alternative{\mathstackersparameter\c!alternative}%
+ %
+ \scratchleftoffset \zeropoint
+ \scratchrightoffset\zeropoint
+ %
+ \math_stackers_check_unicode\c_math_stackers_codepoint
+ %
+ \ifempty\math_stackers_middle
+ \setbox\scratchboxthree\emptyhbox
+ \else
+ \setmathtextbox\scratchboxthree\hbox{\math_stackers_middletext}%
+ \fi
+ \scratchwidth\wd\scratchboxthree
+ %
+ \scratchdimen\mathstackersparameter\c!minwidth\relax
+ \ifdim\scratchwidth<\scratchdimen
+ \scratchwidth\scratchdimen
+ \fi
+ \advance\scratchwidth2\scratchhoffset
+ %
+ %\scratchunicode\c_math_stackers_codepoint
+ \ifcase\c_math_stackers_bottom
+ \d_math_stackers_offset_l\mathstackersparameter{lt}%
+ \d_math_stackers_offset_r\mathstackersparameter{rt}%
+ \orelse\ifcase\c_math_stackers_top
+ \d_math_stackers_offset_l\mathstackersparameter{lb}%
+ \d_math_stackers_offset_r\mathstackersparameter{rb}%
+ \else
+ \d_math_stackers_offset_l\mathstackersparameter{lt}%
+ \d_math_stackers_offset_r\mathstackersparameter{rt}%
+ \fi
+ \setbox\scratchboxtwo\csname\??mathstackersalternative\p_alternative\endcsname
+ \setbox\scratchboxthree\hpack to \scratchwidth{\hss\box\scratchboxthree\hss}%
+ %
+ \ifcase\c_math_stackers_extracode\else
+ \scratchunicode\c_math_stackers_extracode
+ \d_math_stackers_offset_l\mathstackersparameter{lb}%
+ \d_math_stackers_offset_r\mathstackersparameter{rb}%
+ \setbox\scratchboxone\csname\??mathstackersalternative\p_alternative\endcsname
+ \fi
+ %
+ \math_stackers_normalize_three
+ % analysis
+ \ifcase\c_math_stackers_bottom
+ \ifcase\c_math_stackers_top
+ \dosettagproperty\s!subtype\t!munderover
+ \else
+ \dosettagproperty\s!subtype\t!mover
+ \fi
+ \else
+ \ifcase\c_math_stackers_top
+ \dosettagproperty\s!subtype\t!munder
+ \else
+ % brrr
+ \fi
+ \fi
+ % base
+ \math_stackers_start_tagged_mid
+ \math_stackers_middle\bgroup
+ \box\scratchboxthree
+ \egroup
+ \math_stackers_stop_tagged
+ %
+ \ifdim\htdp\scratchboxtwo>\zeropoint
+ \ifcase\c_math_stackers_bottom\else
+ \kern-\scratchwidth
+ % under
+ \math_stackers_start_tagged_bot
+ \math_stackers_bottom\bgroup
+ \lower\dimexpr
+ \scratchdepth
+ +\ht\scratchboxtwo
+ +\mathstackersparameter\c!distance % was \c!voffset
+ \relax
+ \ifcase\c_math_stackers_top
+ \box\scratchboxtwo
+ \else
+ \box\scratchboxone
+ \fi
+ \egroup
+ \math_stackers_stop_tagged
+ \fi
+ \ifcase\c_math_stackers_top\else
+ \kern-\scratchwidth
+ % over
+ \math_stackers_start_tagged_top
+ \math_stackers_top\bgroup
+ \raise\dimexpr
+ \scratchheight
+ +\dp\scratchboxtwo % new
+ +\mathstackersparameter\c!distance % was \c!voffset
+ \relax
+ \box\scratchboxtwo
+ \egroup
+ \math_stackers_stop_tagged
+ \fi
+ \fi}%
+ \dostoptagged
+ \mathstackersparameter\c!right\relax
+ \math_stackers_stop_group}
+
+\permanent\tolerant\protected\def\definemathoverextensible[#1]#*[#2]#*[#3]%
+ {\ifparameter#3\or
+ \frozen\setuevalue{#2}{\math_stackers_make_double\plusone \zerocount{#1}{\number#3}{0}}%
+ \else
+ \frozen\setuevalue{#1}{\math_stackers_make_double\plusone \zerocount\noexpand\currentmathstackers{\number#2}{0}}%
+ \fi}
+
+\permanent\tolerant\protected\def\definemathunderextensible[#1]#*[#2]#*[#3]%
+ {\ifparameter#3\or
+ \frozen\setuevalue{#2}{\math_stackers_make_double\zerocount\plusone{#1}{\number#3}{0}}%
+ \else
+ \frozen\setuevalue{#1}{\math_stackers_make_double\zerocount\plusone\noexpand\currentmathstackers{\number#2}{0}}%
+ \fi}
+
+\permanent\tolerant\protected\def\definemathdoubleextensible[#1]#*[#2]#*[#3]#*[#4]%
+ {\ifparameter#4\or
+ \frozen\setuevalue{#2}{\math_stackers_make_double\plusone \plusone{#1}{\number#3}{\number#4}}%
+ \else
+ \frozen\setuevalue{#1}{\math_stackers_make_double\plusone \plusone\noexpand\currentmathstackers{\number#2}{\number#3}}%
+ \fi}
+
+\permanent\tolerant\protected\def\definemathover[#category]#spacer[#command]#spacer[#topcode]%
+ {\frozen\setuvalue{#command}{\math_stackers_handle_direct\plusone\zerocount{#category}{#topcode}{0}}}
+
+\permanent\tolerant\protected\def\definemathunder[#category]#spacer[#command]#spacer[#bottomcode]%
+ {\frozen\setuvalue{#command}{\math_stackers_handle_direct\zerocount\plusone{#category}{#bottomcode}{0}}}
+
+\permanent\tolerant\protected\def\definemathdouble[#category]#spacer[#command]#spacer[#topcode]#spacer[#bottomcode]%
+ {\frozen\setuvalue{#command}{\math_stackers_handle_direct\plusone\plusone{#category}{#topcode}{#bottomcode}}}
+
+\permanent\tolerant\protected\def\mathover[#category]#spacer[#settings]#:#topcode#text%
+ {\begingroup
+ \edef\currentmathstackers{\ifparameter#category\or#category\else\v!top\fi}%
+ \ifparameter#settings\or
+ \setupcurrentmathstackers[#settings]%
+ \fi
+ \math_stackers_make_double\plusone\zerocount
+ {\currentmathstackers}%
+ {#topcode}%
+ {0}%
+ {#text}%
+ \endgroup}
+
+\permanent\tolerant\protected\def\mathunder[#category]#spacer[#settings]#:#bottomcode#text%
+ {\begingroup
+ \edef\currentmathstackers{\ifparameter#category\or#category\else\v!bottom\fi}%
+ \ifparameter#settings\or
+ \setupcurrentmathstackers[#settings]%
+ \fi
+ \math_stackers_make_double\zerocount\plusone
+ {\currentmathstackers}%
+ {#bottomcode}%
+ {0}%
+ {#text}%
+ \endgroup}
+
+\permanent\tolerant\protected\def\mathdouble[#category]#spacer[#settings]#:#topcode#bottomcode#text%
+ {\begingroup
+ \edef\currentmathstackers{\ifparameter#category\or#category\else\v!both\fi}%
+ \ifparameter#settings\or
+ \setupcurrentmathstackers[#settings]%
+ \fi
+ \math_stackers_make_double\plusone\plusone
+ {\currentmathstackers}%
+ {#topcode}%
+ {#bottomcode}%
+ {#text}%
+ \endgroup}
+
+\def\math_stackers_handle_direct#top#bottom#category#topcode#bottomcode#text%
+ {\begingroup
+ \math_stackers_make_double#top#bottom{#category}{#topcode}{#bottomcode}{#text}%
+ \endgroup}
+
+%D A relative new one is a combination of accents and text (as needed in mathml):
+
+\protected\def\math_stackers_make_double_text#where#category#codepoint#text#extra%
+ {\math_stackers_start_group{#category}%
+ \mathstackersparameter\c!left\relax
+ \dostarttagged\t!mstacker\currentmathstackers
+ \ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
+ {\edef\currentmathstackers{#category}%
+ %
+ \edef\p_offset {\mathstackersparameter\c!offset}%
+ \edef\p_location {\mathstackersparameter\c!location}%
+ \edef\p_strut {\mathstackersparameter\c!strut}%
+ \edef\p_alternative{\mathstackersparameter\c!alternative}%
+ %
+ \scratchleftoffset \zeropoint
+ \scratchrightoffset\zeropoint
+ %
+ \edef\m_math_stackers_text_middle{#text}%
+ \math_stackers_check_unicode{#codepoint}%
+ \scratchunicode#codepoint\relax
+ %
+ \ifempty\math_stackers_middle
+ \setbox\scratchboxthree\emptyhbox
+ \else
+ \setmathtextbox\scratchboxthree\hbox{\math_stackers_middletext}%
+ \fi
+ %
+ \ifcase#where\relax
+ \edef\m_math_stackers_text_top{#extra}%
+ \ifempty\math_stackers_top
+ \setbox\scratchboxone\emptyhbox
+ \else
+ \setmathsmalltextbox\scratchboxone\hbox{\math_stackers_toptext}%
+ \fi
+ \else
+ \edef\m_math_stackers_text_bottom{#extra}%
+ \ifempty\math_stackers_bottom
+ \setbox\scratchboxone\emptyhbox
+ \else
+ \setmathsmalltextbox\scratchboxone\hbox{\math_stackers_bottomtext}%
+ \fi
+ \fi
+ %
+ \scratchwidth\wd
+ \ifdim\wd\scratchboxone>\wd\scratchboxthree
+ \scratchboxone
+ \else
+ \scratchboxthree
+ \fi
+ \relax
+ \scratchdimen\mathstackersparameter\c!minwidth\relax
+ \ifdim\scratchwidth<\scratchdimen
+ \scratchwidth\scratchdimen
+ \fi
+ \advance\scratchwidth2\scratchhoffset
+ %
+ \ifdim\wd\scratchboxone<\scratchwidth
+ \setbox\scratchboxone\hpack to \scratchwidth{\hss\unhbox\scratchboxone\hss}%
+ \fi
+ \ifdim\wd\scratchboxthree<\scratchwidth
+ \setbox\scratchboxthree\hpack to \scratchwidth{\hss\unhbox\scratchboxthree\hss}%
+ \fi
+ %
+ \math_stackers_normalize_three
+ % analysis
+ \dosettagproperty\s!subtype\t!munderover
+ % base
+ \math_stackers_start_tagged_mid
+ \math_stackers_middle\bgroup
+ \box\scratchboxthree
+ \egroup
+ \math_stackers_stop_tagged
+ %
+ \setbox\scratchboxtwo\csname\??mathstackersalternative\p_alternative\endcsname
+ \kern-\scratchwidth
+ \ifcase#where\relax
+ % under
+ \math_stackers_start_tagged_bot
+ \math_stackers_bottom\bgroup
+ \lower\dimexpr
+ \scratchdepth
+ +\ht\scratchboxtwo
+ +\mathstackersparameter\c!distance
+ \relax
+ \box\scratchboxtwo % accent
+ \egroup
+ \math_stackers_stop_tagged
+ \kern-\scratchwidth
+ % over
+ \math_stackers_start_tagged_top
+ \math_stackers_top\bgroup
+ \raise\dimexpr
+ \scratchheight
+ +\dp\scratchboxone
+ +\mathstackersparameter\c!voffset
+ \relax
+ \box\scratchboxone % toptext
+ \egroup
+ \math_stackers_stop_tagged
+ \else
+ % under
+ \math_stackers_start_tagged_bot
+ \math_stackers_bottom\bgroup
+ \lower\dimexpr
+ \scratchdepth
+ +\ht\scratchboxone
+ +\mathstackersparameter\c!voffset
+ \relax
+ \box\scratchboxone % bottext
+ \egroup
+ \math_stackers_stop_tagged
+ \kern-\scratchwidth
+ % over
+ \math_stackers_start_tagged_top
+ \math_stackers_top\bgroup
+ \raise\dimexpr
+ \scratchheight
+ +\dp\scratchboxtwo % new
+ +\mathstackersparameter\c!distance
+ \relax
+ \box\scratchboxtwo % accent
+ \egroup
+ \math_stackers_stop_tagged
+ \fi
+ }%
+ \dostoptagged
+ \mathstackersparameter\c!right\relax
+ \math_stackers_stop_group}
+
+\permanent\tolerant\protected\def\definemathovertextextensible[#1]#*[#2]#*[#3]%
+ {\ifparameter#3\or
+ \frozen\setuevalue{#2}{\math_stackers_make_double_text\plusone{#1}{\number#3}}%
+ \else
+ \frozen\setuevalue{#1}{\math_stackers_make_double_text\plusone\noexpand\currentmathstackers{\number#2}}%
+ \fi}
+
+\permanent\tolerant\protected\def\definemathundertextextensible[#1]#*[#2]#*[#3]%
+ {\ifparameter#3\or
+ \frozen\setuevalue{#2}{\math_stackers_make_double_text\zerocount{#1}{\number#3}}%
+ \else
+ \frozen\setuevalue{#1}{\math_stackers_make_double_text\zerocount\noexpand\currentmathstackers{\number#2}}%
+ \fi}
+
+\permanent\tolerant\protected\def\mathovertext[#category]%
+ {\begingroup
+ \math_stackers_direct_double_text\plusone {\ifarguments#category\or#category\else\v!top\fi}}
+
+\permanent\tolerant\protected\def\mathundertext[#category]%
+ {\begingroup
+ \math_stackers_direct_double_text\zerocount{\ifarguments#category\or#category\else\v!bottom\fi}}
+
+\def\math_stackers_direct_double_text#where#category#codepoint#text#extra%%
+ {\math_stackers_make_double_text#where{#category}{#codepoint}{#text}{#extra}%
+ \endgroup}
+
+%D Here is a bonus macro that takes three texts. It can be used to get consistent
+%D mixed usage.
+
+\permanent\tolerant\protected\def\mathtriplet[#category]#:#middletext#toptext#bottomtext%
+ {\begingroup
+ \math_stackers_triplet\plusone{\ifarguments#category\or#category\else\currentmathstackers\fi}{#middletext}{#toptext}{#bottomtext}%
+ \endgroup}
+
+\permanent\tolerant\protected\def\definemathtriplet[#1]#*[#2]#*[#3]% category name default
+ {\ifarguments\or
+ \frozen\setuevalue{#1}{\math_stackers_auto_triplet_nop[\noexpand\currentmathstackers]}%
+ \or
+ \frozen\setuevalue{#2}{\math_stackers_auto_triplet_nop[#1]}%
+ \or
+ \frozen\setuevalue{#2}{\math_stackers_auto_triplet_yes[#1][#3]}%
+ \fi}
+
+\tolerant\protected\def\math_stackers_auto_triplet_yes[#1][#2]#*[#3]#:#=#*#=% [#2]% #2 gobble spaces
+ {\begingroup
+ \edef\currentmathstackers{#1}%
+ \def \m_math_stackers_text_middle{#2}%
+ \ifarguments#3\or\edef\currentmathstackers{#3}\fi
+ \math_stackers_triplet\plusone\currentmathstackers\m_math_stackers_text_middle{#4}{#5}%
+ \endgroup}
+
+\tolerant\protected\def\math_stackers_auto_triplet_nop[#1]#*[#2]#:#=#*#=#*#=% [#2]% #2 gobble spaces%
+ {\begingroup
+ \edef\currentmathstackers{#1}%
+ \ifarguments#2\or\edef\currentmathstackers{#2}\fi
+ \math_stackers_triplet\plusone\currentmathstackers{#3}{#4}{#5}%
+ \endgroup}
+
+%D Definitions:
+
+\definemathstackers
+ [\v!mathematics]
+ [\c!topcommand=\mathematics,
+ \c!middlecommand=\mathematics,
+ \c!bottomcommand=\mathematics]
+
+\definemathstackers
+ [\s!math]
+ [\v!mathematics]
+
+\definemathstackers
+ [\v!text]
+ [\v!mathematics]
+ [\c!topcommand=,
+ \c!middlecommand=\mathematics,
+ \c!bottomcommand=]
+
+\definemathstackers
+ [\v!reverse]
+ [\v!mathematics]
+ [\c!order=\v!reverse]
+
+\definemathstackers
+ [\v!both]
+ [\v!mathematics]
+ [\c!location=\v!top, % ?
+ \c!strut=\v!no,
+ \c!middlecommand=\mathematics,
+ \c!hoffset=\zeropoint]
+
+\definemathstackers
+ [\v!top]
+ [\v!both]
+
+\definemathstackers
+ [\v!bottom]
+ [\v!both]
+
+\definemathstackers
+ [\v!vfenced]
+ [\v!both]
+ [\c!mathclass=\s!ord,
+ \c!mathlimits=\v!yes]
+
+% these are needed for mathml:
+
+% \setupmathstackers
+% [\v!both]
+% [\c!hoffset=1pt,
+% \c!voffset=1pt]
+
+\definemathstackers
+ [\v!bothtext]
+ [\v!both]
+ [\c!strut=\v!yes]
+
+% These are compatibity definitions, math only.
+
+% todo: top= bottom= middle= is nicer (compare math-fen)
+
+%D We save a few definitions that we automatically got from the \type {char-def.lua}
+%D database.
+
+% Be careful in choosing what accents you take (the code below uses a combining
+% one):
+%
+% \startbuffer
+% % $\Umathaccent top 0 0 "20D7 {example}$
+% % $\Umathaccent top fixed 0 0 "20D7 {example}$
+% $\Umathaccent 0 0 "20D7 {example}$
+% $\Umathaccent fixed 0 0 "20D7 {example}$
+% $\Umathaccent bottom 0 0 "20D7 {example}$
+% $\Umathaccent bottom fixed 0 0 "20D7 {example}$
+% $\Umathaccent both 0 0 "20D7
+% 0 0 "20D7 {example}$
+% $\Umathaccent both fixed 0 0 "20D7
+% fixed 0 0 "20D7 {example}$
+% $\Umathaccent both 0 0 "20D7
+% fixed 0 0 "20D7 {example}$
+% $\Umathaccent both fixed 0 0 "20D7
+% 0 0 "20D7 {example}$
+% \stopbuffer
+%
+% \setupbodyfont[modern] \getbuffer
+% \setupbodyfont[xits] \getbuffer
+% \setupbodyfont[cambria] \getbuffer
+
+\immutable\protected\def\normaldoublebrace {\Umathaccents 0 \defaultmathfamily "23DE 0 \defaultmathfamily "23DF }
+\immutable\protected\def\normaldoubleparent{\Umathaccents 0 \defaultmathfamily "23DC 0 \defaultmathfamily "23DD }
+
+% let's keep this
+
+\aliased\let\normaloverbrace \overbrace
+\aliased\let\normalunderbrace \underbrace
+\aliased\let\normaloverparent \overparent
+\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
+
+%D Here come the new ones:
+
+\definemathstackers [\v!none] [\v!mathematics] [\c!hoffset=\zeropoint]
+\definemathstackers [\v!normal] [\v!mathematics] [\c!hoffset=0.5\mathemwidth] % the default
+\definemathstackers [\v!small] [\v!mathematics] [\c!hoffset=1\mathemwidth]
+\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] [xequal] ["003D]
+\definemathextensible [\v!reverse] [xleftarrow] ["2190] % ["27F5]
+\definemathextensible [\v!reverse] [xrightarrow] ["2192] % ["27F6]
+\definemathextensible [\v!reverse] [xleftrightarrow] ["27F7]
+\definemathextensible [\v!reverse] [xLeftarrow] ["27F8]
+\definemathextensible [\v!reverse] [xRightarrow] ["27F9]
+\definemathextensible [\v!reverse] [xLeftrightarrow] ["27FA]
+\definemathextensible [\v!reverse] [xtwoheadleftarrow] ["219E]
+\definemathextensible [\v!reverse] [xtwoheadrightarrow] ["21A0]
+\definemathextensible [\v!reverse] [xmapsto] ["21A6]
+\definemathextensible [\v!reverse] [xhookleftarrow] ["21A9]
+\definemathextensible [\v!reverse] [xhookrightarrow] ["21AA]
+\definemathextensible [\v!reverse] [xleftharpoondown] ["21BD]
+\definemathextensible [\v!reverse] [xleftharpoonup] ["21BC]
+\definemathextensible [\v!reverse] [xrightharpoondown] ["21C1]
+\definemathextensible [\v!reverse] [xrightharpoonup] ["21C0]
+\definemathextensible [\v!reverse] [xrightoverleftarrow] ["21C4]
+\definemathextensible [\v!reverse] [xleftrightharpoons] ["21CB]
+\definemathextensible [\v!reverse] [xrightleftharpoons] ["21CC]
+\definemathextensible [\v!reverse] [xtriplerel] ["2261]
+
+\definemathextensible [\v!mathematics] [mrel] ["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] [mtwoheadleftarrow] ["219E]
+\definemathextensible [\v!mathematics] [mtwoheadrightarrow] ["21A0]
+\definemathextensible [\v!mathematics] [mmapsto] ["21A6]
+\definemathextensible [\v!mathematics] [mhookleftarrow] ["21A9]
+\definemathextensible [\v!mathematics] [mhookrightarrow] ["21AA]
+\definemathextensible [\v!mathematics] [mleftharpoondown] ["21BD]
+\definemathextensible [\v!mathematics] [mleftharpoonup] ["21BC]
+\definemathextensible [\v!mathematics] [mrightharpoondown] ["21C1]
+\definemathextensible [\v!mathematics] [mrightharpoonup] ["21C0]
+\definemathextensible [\v!mathematics] [mrightoverleftarrow] ["21C4]
+\definemathextensible [\v!mathematics] [mleftrightharpoons] ["21CB]
+\definemathextensible [\v!mathematics] [mrightleftharpoons] ["21CC]
+\definemathextensible [\v!mathematics] [mtriplerel] ["2261]
+
+\definemathextensible [\v!mathematics] [eleftarrowfill] ["2190] % ["27F5]
+\definemathextensible [\v!mathematics] [erightarrowfill] ["2192] % ["27F6]
+\definemathextensible [\v!mathematics] [eleftrightarrowfill] ["27F7]
+\definemathextensible [\v!mathematics] [etwoheadrightarrowfill] ["27F9]
+\definemathextensible [\v!mathematics] [eleftharpoondownfill] ["21BD]
+\definemathextensible [\v!mathematics] [eleftharpoonupfill] ["21BC]
+\definemathextensible [\v!mathematics] [erightharpoondownfill] ["21C1]
+\definemathextensible [\v!mathematics] [erightharpoonupfill] ["21C0]
+
+\definemathextensible [\v!mathematics] [eoverbarfill] ["FE33E]
+\definemathextensible [\v!mathematics] [eunderbarfill] ["FE33F]
+\definemathextensible [\v!mathematics] [eoverbracefill] ["FE3DE]
+\definemathextensible [\v!mathematics] [eunderbracefill] ["FE3DF]
+\definemathextensible [\v!mathematics] [eoverparentfill] ["FE3DC]
+\definemathextensible [\v!mathematics] [eunderparentfill] ["FE3DD]
+\definemathextensible [\v!mathematics] [eoverbracketfill] ["FE3B4]
+\definemathextensible [\v!mathematics] [eunderbracketfill] ["FE3B5]
+
+\definemathextensible [\v!text] [trel] ["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] [ttwoheadleftarrow] ["219E]
+\definemathextensible [\v!text] [ttwoheadrightarrow] ["21A0]
+\definemathextensible [\v!text] [thookleftarrow] ["21A9]
+\definemathextensible [\v!text] [thookrightarrow] ["21AA]
+\definemathextensible [\v!text] [tleftharpoondown] ["21BD]
+\definemathextensible [\v!text] [tleftharpoonup] ["21BC]
+\definemathextensible [\v!text] [trightharpoondown] ["21C1]
+\definemathextensible [\v!text] [trightharpoonup] ["21C0]
+\definemathextensible [\v!text] [trightoverleftarrow] ["21C4]
+\definemathextensible [\v!text] [tleftrightharpoons] ["21CB]
+\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]
+
+\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] [underleftharpoondown] ["21BD]
+\definemathunderextensible [\v!bottom] [underleftharpoonup] ["21BC]
+\definemathunderextensible [\v!bottom] [underrightharpoondown] ["21C1]
+\definemathunderextensible [\v!bottom] [underrightharpoonup] ["21C0]
+
+%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
+%D accents. It is a bit unfortunate that the opportunity to move math to new
+%D technologies happened outside the tex domain (and/or some aspects were kept while
+%D in fact they were side effects of limitations of traditional fonts). From the
+%D unicode aware tex engines' implementation point of view things could have been
+%D done a bit nicer but then: the community didn't seem to care too much and just
+%D has to follow now.
+%D
+%D Anyhow, we use a character based approach so that at least we get unicode stuff
+%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.
+
+% alternatively we can move the original to FE*
+
+\definemathoverextensible [\v!vfenced] [overbar] ["FE33E] % ["203E]
+\definemathunderextensible [\v!vfenced] [underbar] ["FE33F] % ["203E]
+\definemathdoubleextensible [\v!vfenced] [doublebar] ["FE33E] ["FE33F]
+
+\definemathoverextensible [\v!vfenced] [overbrace] ["FE3DE] % ["023DE]
+\definemathunderextensible [\v!vfenced] [underbrace] ["FE3DF] % ["023DF]
+\definemathdoubleextensible [\v!vfenced] [doublebrace] ["FE3DE] ["FE3DF]
+
+\definemathoverextensible [\v!vfenced] [overparent] ["FE3DC] % ["023DC]
+\definemathunderextensible [\v!vfenced] [underparent] ["FE3DD] % ["023DD]
+\definemathdoubleextensible [\v!vfenced] [doubleparent] ["FE3DC] ["FE3DD]
+
+\definemathoverextensible [\v!vfenced] [overbracket] ["FE3B4] % ["023B4]
+\definemathunderextensible [\v!vfenced] [underbracket] ["FE3B5] % ["023B5]
+\definemathdoubleextensible [\v!vfenced] [doublebracket] ["FE3B4] ["FE3B5]
+
+% \protected\def\mathopwithlimits#1#2{\mathop{#1{#2}}\limits}
+
+%D For mathml:
+
+\definemathdoubleextensible [\v!both] [overbarunderbar] ["FE33E] ["FE33F]
+\definemathdoubleextensible [\v!both] [overbraceunderbrace] ["FE3DE] ["FE3DF]
+\definemathdoubleextensible [\v!both] [overparentunderparent] ["FE3DC] ["FE3DD]
+\definemathdoubleextensible [\v!both] [overbracketunderbracket] ["FE3B4] ["FE3B5]
+
+\definemathovertextextensible [\v!bothtext] [overbartext] ["FE33E]
+\definemathundertextextensible [\v!bothtext] [underbartext] ["FE33F]
+\definemathovertextextensible [\v!bothtext] [overbracetext] ["FE3DE]
+\definemathundertextextensible [\v!bothtext] [underbracetext] ["FE3DF]
+\definemathovertextextensible [\v!bothtext] [overparenttext] ["FE3DC]
+\definemathundertextextensible [\v!bothtext] [underparenttext] ["FE3DD]
+\definemathovertextextensible [\v!bothtext] [overbrackettext] ["FE3B4]
+\definemathundertextextensible [\v!bothtext] [underbrackettext] ["FE3B5]
+
+%D Some bonus ones (for the moment here):
+
+\definemathstackers
+ [\v!chemistry]
+ [\c!offset=\v!max,
+ \c!left=\enspace,
+ \c!right=\enspace,
+ \c!hoffset=.5\mathemwidth]
+
+\definemathextensible [\v!chemistry] [cleftarrow] ["2190]
+\definemathextensible [\v!chemistry] [crightarrow] ["2192]
+\definemathextensible [\v!chemistry] [crightoverleftarrow] ["21C4]
+
+% for the moment:
+
+\def\math_stackers_hacked_fill#1#2#3%
+ {\mathematics
+ {\begingroup
+ \mathsurround\zeropoint
+ \thickmuskip \zeromuskip
+ \medmuskip \zeromuskip
+ \thinmuskip \zeromuskip
+ #1%
+ \mkern-7\onemuskip
+ \cleaders\mathstylehbox{\mkern-2\onemuskip#2\mkern-2\onemuskip}\hfill
+ \mkern-7\onemuskip
+ #3%
+ \endgroup}}
+
+% These will be defined in char-def as well once we have \leaders<number>
+
+\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 \ctxdoublearrowfillleftend\ctxdoublearrowfillmiddlepart\ctxdoublearrowfillrightend}
+\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\protected\def\singlebond{{\xrel}} % or \def\singlebond{{\xrel[2]}}
+% \permanent\protected\def\doublebond{{\xequal}}
+% \permanent\protected\def\triplebond{{\xtriplerel}}
+
+%D For the moment (needs checking):
+
+\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?
+
+%defineextensiblefiller [barfill] ["203E] % yet undefined
+\defineextensiblefiller [relfill] ["002D]
+\defineextensiblefiller [equalfill] ["003D]
+\defineextensiblefiller [leftarrowfill] ["2190]
+\defineextensiblefiller [rightarrowfill] ["2192]
+\defineextensiblefiller [twoheadleftarrowfill] ["219E]
+\defineextensiblefiller [twoheadrightarrowfill] ["21A0]
+\defineextensiblefiller [mapstofill] ["21A6]
+%defineextensiblefiller [hookleftarrowfill] ["21A9]
+%defineextensiblefiller [hookrightarrowfill] ["21AA]
+\defineextensiblefiller [leftharpoondownfill] ["21BD]
+\defineextensiblefiller [leftharpoonupfill] ["21BC]
+\defineextensiblefiller [rightharpoondownfill] ["21C1]
+\defineextensiblefiller [rightharpoonupfill] ["21C0]
+\defineextensiblefiller [rightoverleftarrowfill] ["21C4]
+%defineextensiblefiller [leftrightharpoonsfill] ["21CB] % yet undefined
+%defineextensiblefiller [rightleftharpoonsfill] ["21CC] % yet undefined
+\defineextensiblefiller [triplerelfill] ["2261]
+\defineextensiblefiller [leftrightarrowfill] ["27F7]
+\defineextensiblefiller [Leftarrowfill] ["27F8]
+\defineextensiblefiller [Rightarrowfill] ["27F9]
+\defineextensiblefiller [Leftrightarrowfill] ["27FA]
+%\defineextensiblefiller[Rightleftarrowfill] [.....]
+
+% These are fishy ... we need to check this because now these commands relax (there
+% are some entries in char-def.)
+%
+% %definemathoverextensible [overbarfill] ["FE33E]
+% %definemathunderextensible [underbarfill] ["FE33F]
+% \definemathoverextensible [overbracefill] ["FE3DE]
+% \definemathunderextensible [underbracefill] ["FE3DF]
+% \definemathoverextensible [overparentfill] ["FE3DC]
+% \definemathunderextensible [underparentfill] ["FE3DD]
+% \definemathoverextensible [overbracketfill] ["FE3B4]
+% \definemathunderextensible [underbracketfill] ["FE3B5]
+%
+% %defineextensiblefiller [overbarfill] ["FE33E]
+% %defineextensiblefiller [underbarfill] ["FE33F]
+% \defineextensiblefiller [overbracefill] ["FE3DE]
+% \defineextensiblefiller [underbracefill] ["FE3DF]
+% \defineextensiblefiller [overparentfill] ["FE3DC]
+% \defineextensiblefiller [underparentfill] ["FE3DD]
+% \defineextensiblefiller [overbracketfill] ["FE3B4]
+% \defineextensiblefiller [underbracketfill] ["FE3B5]
+
+%D Extra:
+
+\permanent\protected\edef\singlebond{\mathematics{\mathsurround\zeropoint\char\number"002D\relax}}
+\permanent\protected\edef\doublebond{\mathematics{\mathsurround\zeropoint\char\number"003D\relax}}
+\permanent\protected\edef\triplebond{\mathematics{\mathsurround\zeropoint\char\number"2261\relax}}
+
+% \mathchardef\singlebond"002D
+% \mathchardef\doublebond"003D
+% \mathchardef\triplebond"2261
+
+%D Also handy:
+
+\permanent\tolerant\protected\def\definemathunstacked[#1]#*[#2]#*[#3]% category name unicode
+ {\ifarguments\or\or
+ \frozen\setuevalue{#1}{\math_stackers_unstacked_normal\noexpand\currentmathstackers{\number#2}}%
+ \else
+ \frozen\setuevalue{#2}{\math_stackers_unstacked_normal{#1}{\number#3}}%
+ \fi}
+
+\protected\def\math_stackers_unstacked_normal#category#codepoint%
+ {\begingroup
+ \edef\currentmathstackers{#category}%
+ \edef\p_moffset{\mathstackersparameter\c!moffset}%
+ \ifempty\p_moffset \else
+ \mskip\p_moffset\relax
+ \fi
+ \ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
+ {\usemathstackerscolorparameter\c!color
+ \Umathchar\zerocount\defaultmathfamily#codepoint}%
+ \ifempty\p_moffset \else
+ \mskip\p_moffset\relax
+ \fi
+ \endgroup}
+
+\definemathstackers [\v!wide] [\c!moffset=\thickmuskip,\c!mathclass=\s!rel]
+
+\definemathunstacked [\v!wide] [And] ["0026] % \mathrel{\;&\;}
+\definemathunstacked [\v!wide] [impliedby] ["27F8] % \mathrel{\;\Longleftarrow\;}
+\definemathunstacked [\v!wide] [implies] ["27F9] % \mathrel{\;\Longrightarrow\;}
+\definemathunstacked [\v!wide] [iff] ["27FA] % \mathrel{\;\Longleftrightarrow\;}
+
+% New (an example of using \mathexheight):
+
+\definemathstackers
+ [\v!symbol]
+ [\c!voffset=-.3\mathexheight,
+ \c!hoffset=\zeropoint,
+ \c!mathclass=ord,
+ \c!topoffset=.4\mathemwidth, % poor man's italic correction
+ \c!middlecommand=\mathematics]
+
+\definemathover[\v!symbol][interiorset]["2218]
+
+\protect \endinput
+
+% \mathrel{\mathop{\hbox to \dimen0{\hss\copy4\hss}}
+% \limits\normalsuperscript{\box0}\normalsubscript{\box2}}%
+
+% $\Uoverdelimiter \defaultmathfamily "2194 {xxxx}$
+% $\Uunderdelimiter\defaultmathfamily "2194 {xxxx}$
+% $\Udelimiterover \defaultmathfamily "2194 {xxxx}$
+% $\Udelimiterunder\defaultmathfamily "2194 {xxxx}$
+% $\Udelimiterover \defaultmathfamily "219A {\Udelimiterunder \defaultmathfamily "219B {xxxx}}$
+
+% $a \mathrel{\mathop{\filledhboxr{mid}}}\limits^{\filledhboxg{\strut top}}_{\filledhboxb{\strut bottom}} b$
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-tag.lmt b/Master/texmf-dist/tex/context/base/mkxl/math-tag.lmt
new file mode 100644
index 00000000000..eb58b5450d5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-tag.lmt
@@ -0,0 +1,596 @@
+if not modules then modules = { } end modules ['math-tag'] = {
+ version = 1.001,
+ comment = "companion to math-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: have a local list with local tags that then get appended
+-- todo: use tex.getmathcodes (no table)
+
+-- use lpeg matchers
+
+local find, match = string.find, string.match
+local insert, remove, concat = table.insert, table.remove, table.concat
+
+local attributes = attributes
+local nodes = nodes
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getchar = nuts.getchar
+local getfont = nuts.getfont
+local getlist = nuts.getlist
+local getfield = nuts.getfield
+local getdisc = nuts.getdisc
+local getsubtype = nuts.getsubtype
+local getattr = nuts.getattr
+local getattrlist = nuts.getattrlist
+local setattr = nuts.setattr
+----- getcomponents = nuts.getcomponents -- not really needed
+local getwidth = nuts.getwidth
+
+local getnucleus = nuts.getnucleus
+local getsub = nuts.getsub
+local getsup = nuts.getsup
+
+local set_attributes = nuts.setattributes
+
+local nextnode = nuts.traversers.node
+
+local nodecodes = nodes.nodecodes
+
+local noad_code = nodecodes.noad -- attr nucleus sub sup
+local accent_code = nodecodes.accent -- attr nucleus sub sup accent
+local radical_code = nodecodes.radical -- attr nucleus sub sup left degree
+local fraction_code = nodecodes.fraction -- attr nucleus sub sup left right
+local subbox_code = nodecodes.subbox -- attr list
+local submlist_code = nodecodes.submlist -- attr list
+local mathchar_code = nodecodes.mathchar -- attr fam char
+local mathtextchar_code = nodecodes.mathtextchar -- attr fam char
+local delimiter_code = nodecodes.delimiter -- attr small_fam small_char large_fam large_char
+local style_code = nodecodes.style -- attr style
+local choice_code = nodecodes.choice -- attr display text script scriptscript
+local fence_code = nodecodes.fence -- attr subtype
+
+local accentcodes = nodes.accentcodes
+local fencecodes = nodes.fencecodes
+
+local fixedtopaccent_code = accentcodes.fixedtop
+local fixedbottomaccent_code = accentcodes.fixedbottom
+local fixedbothaccent_code = accentcodes.fixedboth
+
+local leftfence_code = fencecodes.left
+local middlefence_code = fencecodes.middle
+local rightfence_code = fencecodes.right
+
+local kerncodes = nodes.kerncodes
+
+local fontkern_code = kerncodes.fontkern
+local italickern_code = kerncodes.italickern
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local glue_code = nodecodes.glue
+local kern_code = nodecodes.kern
+local math_code = nodecodes.math
+
+local processnoads = noads.process
+
+local a_tagged = attributes.private('tagged')
+local a_mathcategory = attributes.private('mathcategory')
+local a_mathmode = attributes.private('mathmode')
+
+local tags = structures.tags
+
+local start_tagged = tags.start
+local restart_tagged = tags.restart
+local stop_tagged = tags.stop
+local taglist = tags.taglist
+
+local chardata = characters.data
+
+local getmathcodes = tex.getmathcodes
+local mathcodes = mathematics.codes
+local ordinary_mathcode = mathcodes.ordinary
+local variable_mathcode = mathcodes.variable
+
+local fromunicode16 = fonts.mappings.fromunicode16
+local fontcharacters = fonts.hashes.characters
+
+local report_tags = logs.reporter("structure","tags")
+
+local process
+
+local function processsubsup(start)
+ -- At some point we might need to add an attribute signaling the
+ -- super- and subscripts because TeX and MathML use a different
+ -- order. The mrows are needed to keep mn's separated.
+ local nucleus = getnucleus(start)
+ local sup = getsup(start)
+ local sub = getsub(start)
+ if sub then
+ if sup then
+ setattr(start,a_tagged,start_tagged("msubsup"))
+ -- start_tagged("mrow")
+ process(nucleus)
+ -- stop_tagged()
+ start_tagged("mrow", { subscript = true })
+ process(sub)
+ stop_tagged()
+ start_tagged("mrow", { superscript = true })
+ process(sup)
+ stop_tagged()
+ stop_tagged()
+ else
+ setattr(start,a_tagged,start_tagged("msub"))
+ -- start_tagged("mrow")
+ process(nucleus)
+ -- stop_tagged()
+ start_tagged("mrow")
+ process(sub)
+ stop_tagged()
+ stop_tagged()
+ end
+ elseif sup then
+ setattr(start,a_tagged,start_tagged("msup"))
+ -- start_tagged("mrow")
+ process(nucleus)
+ -- stop_tagged()
+ start_tagged("mrow")
+ process(sup)
+ stop_tagged()
+ stop_tagged()
+ else
+ process(nucleus)
+ end
+end
+
+-- todo: check function here and keep attribute the same
+
+-- todo: variants -> original
+
+local actionstack = { }
+local fencesstack = { }
+
+-- glyph nodes and such can happen in under and over stuff
+
+-- local function getunicode(n) -- instead of getchar
+-- local char = getchar(n)
+-- -- local font = getfontoffamily(getfield(n,"fam"))
+-- local font = getfont(n)
+-- local data = fontcharacters[font][char]
+-- return data.unicode or char
+-- end
+
+local function getunicode(n) -- instead of getchar
+ -- local char, font = isglyph(n) -- no, we have a mathchar
+ local char, font = getchar(n), getfont(n)
+ local data = fontcharacters[font][char]
+ return data.unicode or char -- can be a table but unlikely for math characters
+end
+
+-------------------
+
+local content = { }
+local found = false
+
+content[mathchar_code] = function() found = true end
+
+local function hascontent(head)
+ found = false
+ processnoads(head,content,"content")
+ return found
+end
+
+--------------------
+
+-- todo: use properties
+
+-- local function showtag(n,id,old)
+-- local attr = getattr(n,a_tagged)
+-- local curr = tags.current()
+-- report_tags("%s, node %s, attr %s:%s (%s), top %s (%s)",
+-- old and "before" or "after ",
+-- nodecodes[id],
+-- getattrlist(n),
+-- attr or "?",attr and taglist[attr].tagname or "?",
+-- curr or "?",curr and taglist[curr].tagname or "?"
+-- )
+-- end
+
+process = function(start) -- we cannot use the processor as we have no finalizers (yet)
+ local mtexttag = nil
+ while start do
+ local id = getid(start)
+-- showtag(start,id,true)
+ if id == glyph_code or id == disc_code then
+ if not mtexttag then
+ mtexttag = start_tagged("mtext")
+ end
+ setattr(start,a_tagged,mtexttag)
+ elseif mtexttag and id == kern_code and (getsubtype(start) == fontkern_code or getsubtype(start) == italickern_code) then -- italickern
+ setattr(start,a_tagged,mtexttag)
+ else
+ if mtexttag then
+ stop_tagged()
+ mtexttag = nil
+ end
+ if id == mathchar_code then
+ local char = getchar(start)
+ local code = getmathcodes(char)
+ local tag
+ if code == ordinary_mathcode or code == variable_mathcode then
+ local ch = chardata[char]
+ local mc = ch and ch.mathclass
+ if mc == "number" then
+ tag = "mn"
+ elseif mc == "variable" or not mc then -- variable is default
+ tag = "mi"
+ else
+ tag = "mo"
+ end
+ else
+ tag = "mo"
+ end
+ local a = getattr(start,a_mathcategory)
+ if a then
+ setattr(start,a_tagged,start_tagged(tag,{ mathcategory = a }))
+ else
+ setattr(start,a_tagged,start_tagged(tag)) -- todo: a_mathcategory
+ end
+ stop_tagged()
+ -- showtag(start,id,false)
+ break -- okay?
+ elseif id == mathtextchar_code then -- or id == glyph_code
+ -- check for code
+ local a = getattr(start,a_mathcategory)
+ if a then
+ setattr(start,a_tagged,start_tagged("ms",{ mathcategory = a })) -- mtext
+ else
+ setattr(start,a_tagged,start_tagged("ms")) -- mtext
+ end
+ stop_tagged()
+ -- showtag(start,id,false)
+ break
+ elseif id == delimiter_code then
+ -- check for code
+ setattr(start,a_tagged,start_tagged("mo"))
+ stop_tagged()
+ -- showtag(start,id,false)
+ break
+ elseif id == style_code then
+ -- has a next
+ elseif id == noad_code then
+ -- setattr(start,a_tagged,tags.current())
+ processsubsup(start)
+ elseif id == subbox_code or id == hlist_code or id == vlist_code then
+ -- keep an eye on subbox_code and see what ends up in there
+ local attr = getattr(start,a_tagged)
+ if not attr then
+ -- just skip
+ else
+ local specification = taglist[attr]
+ if specification then
+ local tag = specification.tagname
+ if tag == "formulacaption" then
+ -- skip
+ elseif tag == "mstacker" then
+ local list = getlist(start)
+ if list then
+ process(list)
+ end
+ else
+ if tag ~= "mstackertop" and tag ~= "mstackermid" and tag ~= "mstackerbot" then
+ tag = "mtext"
+ end
+ local text = start_tagged(tag)
+ setattr(start,a_tagged,text)
+ local list = getlist(start)
+ if not list then
+ -- empty list
+ elseif not attr then
+ -- box comes from strange place
+ set_attributes(list,a_tagged,text) -- only the first node ?
+ else
+ -- Beware, the first node in list is the actual list so we definitely
+ -- need to nest. This approach is a hack, maybe I'll make a proper
+ -- nesting feature to deal with this at another level. Here we just
+ -- fake structure by enforcing the inner one.
+ --
+ -- todo: have a local list with local tags that then get appended
+ --
+ local tagdata = specification.taglist
+ local common = #tagdata + 1
+ local function runner(list,depth) -- quite inefficient
+ local cache = { } -- we can have nested unboxed mess so best local to runner
+ local keep = nil
+ -- local keep = { } -- win case we might need to move keep outside
+ for n, id, subtype in nextnode, list do
+ local mth = id == math_code and subtype
+ if mth == 0 then -- hm left_code
+ -- insert(keep,text)
+ keep = text
+ text = start_tagged("mrow")
+ common = common + 1
+ end
+ local aa = getattr(n,a_tagged)
+ if aa then
+ local ac = cache[aa]
+ if not ac then
+ local tagdata = taglist[aa].taglist
+ local extra = #tagdata
+ if common <= extra then
+ for i=common,extra do
+ ac = restart_tagged(tagdata[i]) -- can be made faster
+ end
+ for i=common,extra do
+ stop_tagged() -- can be made faster
+ end
+ else
+ ac = text
+ end
+ cache[aa] = ac
+ end
+ setattr(n,a_tagged,ac)
+ else
+ setattr(n,a_tagged,text)
+ end
+ if id == hlist_code or id == vlist_code then
+ runner(getlist(n),depth+1)
+ elseif id == glyph_code then
+ -- this should not be needed
+ -- local components = getcomponents(n) -- unlikely set
+ -- if components then
+ -- runner(getcomponent,depth+1)
+ -- end
+ elseif id == disc_code then
+ -- this should not be needed
+ local pre, post, replace = getdisc(n)
+ if pre then
+ runner(pre,depth+1)
+ end
+ if post then
+ runner(post,depth+1)
+ end
+ if replace then
+ runner(replace,depth+1)
+ end
+ end
+ if mth == 1 then
+ stop_tagged()
+ -- text = remove(keep)
+ text = keep
+ common = common - 1
+ end
+ end
+ end
+ runner(list,0)
+ end
+ stop_tagged()
+ end
+ end
+ end
+ elseif id == submlist_code then -- normally a hbox
+ local list = getlist(start)
+ if list then
+ local attr = getattr(start,a_tagged)
+ local last = attr and taglist[attr]
+ if last then
+ local tag = last.tagname
+ local detail = last.detail
+ if tag == "maction" then
+ if detail == "" then
+ setattr(start,a_tagged,start_tagged("mrow"))
+ process(list)
+ stop_tagged()
+ elseif actionstack[#actionstack] == action then
+ setattr(start,a_tagged,start_tagged("mrow"))
+ process(list)
+ stop_tagged()
+ else
+ insert(actionstack,action)
+ setattr(start,a_tagged,start_tagged("mrow",{ detail = action }))
+ process(list)
+ stop_tagged()
+ remove(actionstack)
+ end
+ elseif tag == "mstacker" then -- or tag == "mstackertop" or tag == "mstackermid" or tag == "mstackerbot" then
+ -- looks like it gets processed twice
+ -- do we still end up here ?
+ setattr(start,a_tagged,restart_tagged(attr)) -- so we just reuse the attribute
+ process(list)
+ stop_tagged()
+ else
+ setattr(start,a_tagged,start_tagged("mrow"))
+ process(list)
+ stop_tagged()
+ end
+ else -- never happens, we're always document
+ setattr(start,a_tagged,start_tagged("mrow"))
+ process(list)
+ stop_tagged()
+ end
+ end
+ elseif id == fraction_code then
+ local num = getfield(start,"num")
+ local denom = getfield(start,"denom")
+ local left = getfield(start,"left")
+ local right = getfield(start,"right")
+ if left then
+ setattr(left,a_tagged,start_tagged("mo"))
+ process(left)
+ stop_tagged()
+ end
+ setattr(start,a_tagged,start_tagged("mfrac"))
+ process(num)
+ process(denom)
+ stop_tagged()
+ if right then
+ setattr(right,a_tagged,start_tagged("mo"))
+ process(right)
+ stop_tagged()
+ end
+ elseif id == choice_code then
+ local display = getfield(start,"display")
+ local text = getfield(start,"text")
+ local script = getfield(start,"script")
+ local scriptscript = getfield(start,"scriptscript")
+ if display then
+ process(display)
+ end
+ if text then
+ process(text)
+ end
+ if script then
+ process(script)
+ end
+ if scriptscript then
+ process(scriptscript)
+ end
+ elseif id == fence_code then
+ local subtype = getsubtype(start)
+ local delim = getfield(start,"delimiter")
+ if subtype == leftfence_code then
+ -- left
+ local properties = { }
+ insert(fencesstack,properties)
+ setattr(start,a_tagged,start_tagged("mfenced",properties)) -- needs checking
+ if delim then
+ start_tagged("ignore")
+ local chr = getchar(delim)
+ if chr ~= 0 then
+ properties.left = chr
+ end
+ process(delim)
+ stop_tagged()
+ end
+ start_tagged("mrow") -- begin of subsequence
+ elseif subtype == middlefence_code then
+ -- middle
+ if delim then
+ start_tagged("ignore")
+ local top = fencesstack[#fencesstack]
+ local chr = getchar(delim)
+ if chr ~= 0 then
+ local mid = top.middle
+ if mid then
+ mid[#mid+1] = chr
+ else
+ top.middle = { chr }
+ end
+ end
+ process(delim)
+ stop_tagged()
+ end
+ stop_tagged() -- end of subsequence
+ start_tagged("mrow") -- begin of subsequence
+ elseif subtype == rightfence_code then
+ local properties = remove(fencesstack)
+ if not properties then
+ report_tags("missing right fence")
+ properties = { }
+ end
+ if delim then
+ start_tagged("ignore")
+ local chr = getchar(delim)
+ if chr ~= 0 then
+ properties.right = chr
+ end
+ process(delim)
+ stop_tagged()
+ end
+ stop_tagged() -- end of subsequence
+ stop_tagged()
+ else
+ -- can't happen
+ end
+ elseif id == radical_code then
+ local left = getfield(start,"left")
+ local degree = getfield(start,"degree")
+ if left then
+ start_tagged("ignore")
+ process(left) -- root symbol, ignored
+ stop_tagged()
+ end
+ if degree and hascontent(degree) then
+ setattr(start,a_tagged,start_tagged("mroot"))
+ processsubsup(start)
+ process(degree)
+ stop_tagged()
+ else
+ setattr(start,a_tagged,start_tagged("msqrt"))
+ processsubsup(start)
+ stop_tagged()
+ end
+ elseif id == accent_code then
+ local subtype = getsubtype(start)
+ local accent = getfield(start,"accent")
+ local bot_accent = getfield(start,"bot_accent")
+ if bot_accent then
+ if accent then
+ setattr(start,a_tagged,start_tagged("munderover", {
+ accent = true,
+ top = getunicode(accent),
+ bottom = getunicode(bot_accent),
+ topfixed = subtype == fixedtopaccent_code or subtype == fixedbothaccent_code,
+ bottomfixed = subtype == fixedbottomaccent_code or subtype == fixedbothaccent_code,
+ }))
+ processsubsup(start)
+ process(bot_accent)
+ process(accent)
+ stop_tagged()
+ else
+ setattr(start,a_tagged,start_tagged("munder", {
+ accent = true,
+ bottom = getunicode(bot_accent),
+ bottomfixed = subtype == fixedbottomaccent_code or subtype == fixedbothaccent_code,
+ }))
+ processsubsup(start)
+ process(bot_accent)
+ stop_tagged()
+ end
+ elseif accent then
+ setattr(start,a_tagged,start_tagged("mover", {
+ accent = true,
+ top = getunicode(accent),
+ topfixed = subtype == fixedtopaccent_code or subtype == fixedbothaccent_code,
+ }))
+ processsubsup(start)
+ process(accent)
+ stop_tagged()
+ else
+ processsubsup(start)
+ end
+ elseif id == glue_code then
+ -- setattr(start,a_tagged,start_tagged("mspace",{ width = getwidth(start) }))
+ setattr(start,a_tagged,start_tagged("mspace"))
+ stop_tagged()
+ else
+ setattr(start,a_tagged,start_tagged("merror", { detail = nodecodes[i] }))
+ stop_tagged()
+ end
+ end
+-- showtag(start,id,false)
+ start = getnext(start)
+ end
+ if mtexttag then
+ stop_tagged()
+ end
+end
+
+function noads.handlers.tags(head,style,penalties)
+ start_tagged("math", { mode = (getattr(head,a_mathmode) == 1) and "display" or "inline" })
+ setattr(head,a_tagged,start_tagged("mrow"))
+-- showtag(head,getid(head),true)
+ process(head)
+-- showtag(head,getid(head),false)
+ stop_tagged()
+ stop_tagged()
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-toy.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-toy.mkxl
new file mode 100644
index 00000000000..510872e3b62
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-toy.mkxl
@@ -0,0 +1,54 @@
+%D \module
+%D [ file=math-toy,
+%D version=2020.08.31,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Toy math,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Math Macros / Toy}
+
+\unprotect
+
+%D Just an example:
+%D
+%D \starttyping
+%D \enabletrackers[math.toysymbol]
+%D
+%D \definemathtoysymbol[Plus] [bin][+]
+%D \definemathtoysymbol[Minus][bin][-]
+%D \definemathtoysymbol[Equal][rel][=]
+%D
+%D $\dorecurse{199}{x_{#1} \ifodd#1\relax\Plus\else\Minus\fi} x_{200} \Equal n$ \blank
+%D \stoptyping
+
+\permanent\tolerant\protected\def\definemathtoysymbol[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or\or
+ \setuevalue{#1}{\math_toy_define_symbol_indeed{\mathcodechecked{#2}}{#3}}%
+ \fi}
+
+\protected\def\math_toy_define_symbol_traced#1#2%
+ {\normalexpanded{\discretionary class #1 %
+ {$\Ustyle\number\mathstyle \darkred #2$}%
+ {$\Ustyle\number\mathstyle \darkblue #2$}%
+ {$\Ustyle\number\mathstyle \darkgreen #2$}}}
+
+\protected\def\math_toy_define_symbol_normal#1#2%
+ {\normalexpanded{\discretionary class #1 %
+ {$\Ustyle\number\mathstyle #2$}%
+ {$\Ustyle\number\mathstyle #2$}%
+ {$\Ustyle\number\mathstyle #2$}}}
+
+\installtextracker
+ {math.toysymbol}
+ {\let\math_toy_define_symbol_indeed\math_toy_define_symbol_traced}
+ {\let\math_toy_define_symbol_indeed\math_toy_define_symbol_normal}
+
+\let\math_toy_define_symbol_indeed\math_toy_define_symbol_normal
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt b/Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt
new file mode 100644
index 00000000000..6584b0158d5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/math-vfu.lmt
@@ -0,0 +1,1153 @@
+if not modules then modules = { } end modules ['math-vfu'] = {
+ version = 1.001,
+ comment = "companion to math-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- 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.
+-- This mechanism will eventually disappear.
+
+-- 20D6 -> 2190
+-- 20D7 -> 2192
+
+local type, next, tonumber = type, next, tonumber
+local max = math.max
+local fastcopy = table.copy
+
+local fonts, nodes, mathematics = fonts, nodes, mathematics
+
+local trace_virtual = false trackers.register("math.virtual", function(v) trace_virtual = v end)
+local trace_timings = false trackers.register("math.timings", function(v) trace_timings = v end)
+
+local add_optional = false directives.register("math.virtual.optional",function(v) add_optional = v end)
+
+local report_virtual = logs.reporter("fonts","virtual math")
+
+local allocate = utilities.storage.allocate
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local chardata = characters.data
+
+local mathencodings = allocate()
+fonts.encodings.math = mathencodings -- better is then: fonts.encodings.vectors
+local vfmath = allocate()
+fonts.handlers.vf.math = vfmath
+
+local helpers = fonts.helpers
+local vfcommands = helpers.commands
+local rightcommand = vfcommands.right
+local leftcommand = vfcommands.left
+local downcommand = vfcommands.down
+local upcommand = vfcommands.up
+local push = vfcommands.push
+local pop = vfcommands.pop
+
+local shared = { }
+
+-- local back = { "slot", 1, 0x2215 }
+--
+-- local function negate(main,characters,id,size,unicode,basecode)
+-- if not characters[unicode] then
+-- local basechar = characters[basecode]
+-- if basechar then
+-- local ht, wd = basechar.height, basechar.width
+-- characters[unicode] = {
+-- width = wd,
+-- height = ht,
+-- depth = basechar.depth,
+-- italic = basechar.italic,
+-- kerns = basechar.kerns,
+-- commands = {
+-- { "slot", 1, basecode },
+-- push,
+-- downcommand[ht/5],
+-- leftcommand[wd/2],
+-- back,
+-- push,
+-- }
+-- }
+-- end
+-- end
+-- end
+--
+-- \Umathchardef\braceld="0 "1 "FF07A
+-- \Umathchardef\bracerd="0 "1 "FF07B
+-- \Umathchardef\bracelu="0 "1 "FF07C
+-- \Umathchardef\braceru="0 "1 "FF07D
+
+local function brace(main,characters,id,size,unicode,first,rule,left,right,rule,last)
+ if not characters[unicode] then
+ characters[unicode] = {
+ horiz_variants = {
+ { extender = 0, glyph = first },
+ { extender = 1, glyph = rule },
+ { extender = 0, glyph = left },
+ { extender = 0, glyph = right },
+ { extender = 1, glyph = rule },
+ { extender = 0, glyph = last },
+ }
+ }
+ 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.horiz_variants = {
+ { 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 function parent(main,characters,id,size,unicode,first,rule,last)
+ if not characters[unicode] then
+ characters[unicode] = {
+ horiz_variants = {
+ { extender = 0, glyph = first },
+ { extender = 1, glyph = rule },
+ { extender = 0, glyph = last },
+ }
+ }
+ end
+end
+
+local step = 0.2 -- 0.1 is nicer but gives larger files
+
+local function make(main,characters,id,size,n,m)
+ local old = 0xFF000 + n
+ local c = characters[old]
+ if c then
+ local upslot = 0xFF100 + n
+ local dnslot = 0xFF200 + n
+ local uprule = 0xFF300 + m
+ local dnrule = 0xFF400 + m
+ local xu = main.parameters.x_height + 0.3*size
+ local xd = 0.3*size
+ local w = c.width or 0
+ local h = c.height or 0
+ local d = c.depth or 0
+ local thickness = h - d
+ local rulewidth = step*size -- we could use an overlap
+ local slot = { "slot", id, old }
+ local rule = { "rule", thickness, rulewidth }
+ local up = upcommand[xu]
+ local dn = downcommand[xd]
+ local ht = xu + 3*thickness
+ local dp = 0
+ if not characters[uprule] then
+ characters[uprule] = {
+ width = rulewidth,
+ height = ht,
+ depth = dp,
+ commands = { push, up, rule, pop },
+ }
+ end
+ characters[upslot] = {
+ width = w,
+ height = ht,
+ depth = dp,
+ commands = { push, up, slot, pop },
+ }
+ local ht = 0
+ local dp = xd + 3*thickness
+ if not characters[dnrule] then
+ characters[dnrule] = {
+ width = rulewidth,
+ height = ht,
+ depth = dp,
+ commands = { push, dn, rule, pop }
+ }
+ end
+ characters[dnslot] = {
+ width = w,
+ height = ht,
+ depth = dp,
+ commands = { push, dn, slot, pop },
+ }
+ end
+end
+
+local function clipped(main,characters,id,size,unicode,original) -- push/pop needed?
+ local minus = characters[original]
+ if minus then
+ local mu = size/18
+ local step = 3*mu
+ local width = minus.width
+ if width > step then
+ width = width - step
+ step = step / 2
+ else
+ width = width / 2
+ step = width
+ end
+ characters[unicode] = {
+ width = width,
+ height = minus.height,
+ depth = minus.depth,
+ commands = {
+ push,
+ leftcommand[step],
+ { "slot", id, original },
+ pop,
+ }
+ }
+ end
+end
+
+local function raise(main,characters,id,size,unicode,private,n,id_of_smaller) -- this is a real fake mess
+ local raised = fonts.hashes.characters[main.fonts[id_of_smaller].id][private] -- characters[private]
+ if raised then
+ local up = 0.85 * main.parameters.x_height
+ local slot = { "slot", id_of_smaller, private }
+ local commands = {
+ push, upcommand[up], slot,
+ }
+ for i=2,n do
+ commands[#commands+1] = slot
+ end
+ commands[#commands+1] = pop
+ characters[unicode] = {
+ width = n * raised.width,
+ height = (raised.height or 0) + up,
+ depth = (raised.depth or 0) - up,
+ italic = raised.italic,
+ commands = commands,
+ }
+ end
+end
+
+local function dots(main,characters,id,size,unicode)
+ local c = characters[0x002E]
+ if c then
+ local w = c.width
+ local h = c.height
+ local d = c.depth
+ local mu = size/18
+ local right3mu = rightcommand[3*mu]
+ local right1mu = rightcommand[1*mu]
+ local up1size = upcommand[.1*size]
+ local up4size = upcommand[.4*size]
+ local up7size = upcommand[.7*size]
+ local right2muw = rightcommand[2*mu + w]
+ local slot = { "slot", id, 0x002E }
+ if unicode == 0x22EF then
+ local c = characters[0x022C5]
+ if c then
+ local width = c.width
+ local height = c.height
+ local depth = c.depth
+ local slot = { "slot", id, 0x022C5 }
+ characters[unicode] = {
+ width = 3*width + 2*3*mu,
+ height = height,
+ depth = depth,
+ commands = {
+ push, slot, right3mu, slot, right3mu, slot, pop,
+ }
+ }
+ end
+ elseif unicode == 0x22EE then
+ -- weird height !
+ characters[unicode] = {
+ width = w,
+ height = h+(1.4)*size,
+ depth = 0,
+ commands = {
+ push, push, slot, pop, up4size, push, slot, pop, up4size, slot, pop,
+ }
+ }
+ elseif unicode == 0x22F1 then
+ characters[unicode] = {
+ width = 3*w + 6*size/18,
+ height = 1.5*size,
+ depth = 0,
+ commands = {
+ push,
+ right1mu,
+ push, up7size, slot, pop,
+ right2muw,
+ push, up4size, slot, pop,
+ right2muw,
+ push, up1size, slot, pop,
+ right1mu,
+ pop
+ }
+ }
+ elseif unicode == 0x22F0 then
+ characters[unicode] = {
+ width = 3*w + 6*size/18,
+ height = 1.5*size,
+ depth = 0,
+ commands = {
+ push,
+ right1mu,
+ push, up1size, slot, pop,
+ right2muw,
+ push, up4size, slot, pop,
+ right2muw,
+ push, up7size, slot, pop,
+ right1mu,
+ pop
+ }
+ }
+ else
+ characters[unicode] = {
+ width = 3*w + 2*3*mu,
+ height = h,
+ depth = d,
+ commands = {
+ push, slot, right3mu, slot, right3mu, slot, pop,
+ }
+ }
+ end
+ end
+end
+
+local function vertbar(main,characters,id,size,parent,scale,unicode)
+ local cp = characters[parent]
+ if cp then
+ local sc = scale * size
+ local pc = { "slot", id, parent }
+ characters[unicode] = {
+ width = cp.width,
+ height = cp.height + sc,
+ depth = cp.depth + sc,
+ next = cp.next, -- can be extensible
+ commands = {
+ push, upcommand [sc], pc, pop,
+ push, downcommand[sc], pc, pop,
+ pc,
+ },
+ }
+ cp.next = unicode
+ end
+end
+
+local function jointwo(main,characters,id,size,unicode,u1,d12,u2,what)
+ local c1 = characters[u1]
+ local c2 = characters[u2]
+ if c1 and c2 then
+ local w1 = c1.width
+ local w2 = c2.width
+ local mu = size/18
+ characters[unicode] = {
+ width = w1 + w2 - d12 * mu,
+ height = max(c1.height or 0, c2.height or 0),
+ depth = max(c1.depth or 0, c2.depth or 0),
+ commands = {
+ { "slot", id, u1 },
+ leftcommand[d12*mu],
+ { "slot", id, u2 },
+ },
+ }
+ end
+end
+
+local function jointhree(main,characters,id,size,unicode,u1,d12,u2,d23,u3)
+ 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
+ local mu = size/18
+ characters[unicode] = {
+ width = w1 + w2 + w3 - d12*mu - d23*mu,
+ 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 = {
+ { "slot", id, u1 },
+ leftcommand[d12*mu],
+ { "slot", id, u2 },
+ leftcommand[d23*mu],
+ { "slot", id, u3 },
+ }
+ }
+ end
+end
+
+local function stack(main,characters,id,size,unicode,u1,d12,u2)
+ local c1 = characters[u1]
+ if not c1 then
+ return
+ end
+ local c2 = characters[u2]
+ if not c2 then
+ return
+ end
+ local w1 = c1.width or 0
+ local h1 = c1.height or 0
+ local d1 = c1.depth or 0
+ local w2 = c2.width or 0
+ local h2 = c2.height or 0
+ local d2 = c2.depth or 0
+ local mu = size/18
+ characters[unicode] = {
+ width = w1,
+ height = h1 + h2 + d12,
+ depth = d1,
+ commands = {
+ { "slot", id, u1 },
+ leftcommand[w1/2 + w2/2],
+ downcommand[-h1 + d2 -d12*mu],
+ { "slot", id, u2 },
+ }
+ }
+end
+
+local function repeated(main,characters,id,size,unicode,u,n,private,fraction) -- math-fbk.lua
+ local c = characters[u]
+ if c then
+ local width = c.width
+ local italic = fraction*width -- c.italic or 0 -- larger ones have funny italics
+ local tc = { "slot", id, u }
+ local tr = leftcommand[italic] -- see hack elsewhere
+ local commands = { }
+ for i=1,n-1 do
+ commands[#commands+1] = tc
+ commands[#commands+1] = tr
+ end
+ commands[#commands+1] = tc
+ local next = c.next
+ if next then
+ repeated(main,characters,id,size,private,next,n,private+1,fraction)
+ next = private
+ end
+ characters[unicode] = {
+ width = width + (n-1)*(width-italic),
+ height = c.height,
+ depth = c.depth,
+ italic = italic,
+ commands = commands,
+ next = next,
+ }
+ end
+end
+
+local function cloned(main,characters,id,size,source,target)
+ local data = characters[source]
+ if data then
+ characters[target] = data
+ return true
+ end
+end
+
+-- we use the fact that context defines the smallest sizes first .. a real dirty and ugly hack
+
+local data_of_smaller = nil
+local size_of_smaller = 0
+
+function vfmath.addmissing(main,id,size)
+
+ local id_of_smaller = nil
+
+ if size < size_of_smaller or size_of_smaller == 0 then
+ data_of_smaller = main.fonts[id]
+ id_of_smaller = id
+ else
+ id_of_smaller = #main.fonts + 1
+ main.fonts[id_of_smaller] = data_of_smaller
+ end
+
+ -- here id is the index in fonts (normally 14 or so) and that slot points to self
+
+ local characters = main.characters
+ local shared = main.shared
+ local variables = main.goodies.mathematics and main.goodies.mathematics.variables or { }
+ local joinrelfactor = variables.joinrelfactor or 3
+
+ for i=0x7A,0x7D do
+ make(main,characters,id,size,i,1)
+ end
+
+ brace (main,characters,id,size,0x23DE,0xFF17A,0xFF301,0xFF17D,0xFF17C,0xFF301,0xFF17B)
+ brace (main,characters,id,size,0x23DF,0xFF27C,0xFF401,0xFF27B,0xFF27A,0xFF401,0xFF27D)
+
+ parent (main,characters,id,size,0x23DC,0xFF17A,0xFF301,0xFF17B)
+ parent (main,characters,id,size,0x23DD,0xFF27C,0xFF401,0xFF27D)
+
+ -- negate (main,characters,id,size,0x2260,0x003D)
+ dots (main,characters,id,size,0x2026) -- ldots
+ dots (main,characters,id,size,0x22EE) -- vdots
+ dots (main,characters,id,size,0x22EF) -- cdots
+ dots (main,characters,id,size,0x22F1) -- ddots
+ dots (main,characters,id,size,0x22F0) -- udots
+
+ vertbar (main,characters,id,size,0x0007C,0.10,0xFF601) -- big : 0.85 bodyfontsize
+ vertbar (main,characters,id,size,0xFF601,0.30,0xFF602) -- Big : 1.15 bodyfontsize
+ vertbar (main,characters,id,size,0xFF602,0.30,0xFF603) -- bigg : 1.45 bodyfontsize
+ vertbar (main,characters,id,size,0xFF603,0.30,0xFF604) -- Bigg : 1.75 bodyfontsize
+ vertbar (main,characters,id,size,0x02016,0.10,0xFF605)
+ vertbar (main,characters,id,size,0xFF605,0.30,0xFF606)
+ vertbar (main,characters,id,size,0xFF606,0.30,0xFF607)
+ vertbar (main,characters,id,size,0xFF607,0.30,0xFF608)
+
+ clipped (main,characters,id,size,0xFF501,0x0002D) -- minus
+ clipped (main,characters,id,size,0xFF502,0x02190) -- lefthead
+ clipped (main,characters,id,size,0xFF503,0x02192) -- righthead
+ clipped (main,characters,id,size,0xFF504,0xFE321) -- mapsto
+ clipped (main,characters,id,size,0xFF505,0xFE322) -- lhook
+ clipped (main,characters,id,size,0xFF506,0xFE323) -- rhook
+ clipped (main,characters,id,size,0xFF507,0xFE324) -- mapsfrom
+ clipped (main,characters,id,size,0xFF508,0x021D0) -- double lefthead
+ clipped (main,characters,id,size,0xFF509,0x021D2) -- double righthead
+ clipped (main,characters,id,size,0xFF50A,0x0003D) -- equal
+ clipped (main,characters,id,size,0xFF50B,0x0219E) -- lefttwohead
+ clipped (main,characters,id,size,0xFF50C,0x021A0) -- righttwohead
+ clipped (main,characters,id,size,0xFF50D,0xFF350) -- lr arrow combi snippet
+ clipped (main,characters,id,size,0xFF50E,0xFF351) -- lr arrow combi snippet
+ clipped (main,characters,id,size,0xFF50F,0xFF352) -- lr arrow combi snippet
+ clipped (main,characters,id,size,0xFF510,0x02261) -- equiv
+
+ extension(main,characters,id,size,0x2190,0xFF502,0xFF501,0xFF501) -- \leftarrow
+ extension(main,characters,id,size,0x2192,0xFF501,0xFF501,0xFF503) -- \rightarrow
+
+ extension(main,characters,id,size,0x002D,0xFF501,0xFF501,0xFF501) -- \rel
+ extension(main,characters,id,size,0x003D,0xFF50A,0xFF50A,0xFF50A) -- \equal
+ extension(main,characters,id,size,0x2261,0xFF510,0xFF510,0xFF510) -- \equiv
+
+ jointwo (main,characters,id,size,0x21A6,0xFE321,0,0x02192) -- \mapstochar\rightarrow
+ jointwo (main,characters,id,size,0x21A9,0x02190,joinrelfactor,0xFE323) -- \leftarrow\joinrel\rhook
+ jointwo (main,characters,id,size,0x21AA,0xFE322,joinrelfactor,0x02192) -- \lhook\joinrel\rightarrow
+ jointwo (main,characters,id,size,0x27F5,0x02190,joinrelfactor,0x0002D) -- \leftarrow\joinrel\relbar
+ jointwo (main,characters,id,size,0x27F6,0x0002D,joinrelfactor,0x02192,2) -- \relbar\joinrel\rightarrow
+ jointwo (main,characters,id,size,0x27F7,0x02190,joinrelfactor,0x02192) -- \leftarrow\joinrel\rightarrow
+ jointwo (main,characters,id,size,0x27F8,0x021D0,joinrelfactor,0x0003D) -- \Leftarrow\joinrel\Relbar
+ jointwo (main,characters,id,size,0x27F9,0x0003D,joinrelfactor,0x021D2) -- \Relbar\joinrel\Rightarrow
+ jointwo (main,characters,id,size,0x27FA,0x021D0,joinrelfactor,0x021D2) -- \Leftarrow\joinrel\Rightarrow
+ jointhree(main,characters,id,size,0x27FB,0x02190,joinrelfactor,0x0002D,0,0xFE324) -- \leftarrow\joinrel\relbar\mapsfromchar
+ jointhree(main,characters,id,size,0x27FC,0xFE321,0,0x0002D,joinrelfactor,0x02192) -- \mapstochar\relbar\joinrel\rightarrow
+
+ extension(main,characters,id,size,0x21A6,0xFF504,0xFF501,0xFF503) -- \mapstochar\rightarrow
+ extension(main,characters,id,size,0x21A9,0xFF502,0xFF501,0xFF506) -- \leftarrow\joinrel\rhook
+ extension(main,characters,id,size,0x21AA,0xFF505,0xFF501,0xFF503) -- \lhook\joinrel\rightarrow
+ extension(main,characters,id,size,0x27F5,0xFF502,0xFF501,0xFF501) -- \leftarrow\joinrel\relbar
+ extension(main,characters,id,size,0x27F6,0xFF501,0xFF501,0xFF503) -- \relbar\joinrel\rightarrow
+ extension(main,characters,id,size,0x27F7,0xFF502,0xFF501,0xFF503) -- \leftarrow\joinrel\rightarrow
+ extension(main,characters,id,size,0x27F8,0xFF508,0xFF50A,0xFF50A) -- \Leftarrow\joinrel\Relbar
+ extension(main,characters,id,size,0x27F9,0xFF50A,0xFF50A,0xFF509) -- \Relbar\joinrel\Rightarrow
+ extension(main,characters,id,size,0x27FA,0xFF508,0xFF50A,0xFF509) -- \Leftarrow\joinrel\Rightarrow
+ extension(main,characters,id,size,0x27FB,0xFF502,0xFF501,0xFF507) -- \leftarrow\joinrel\relbar\mapsfromchar
+ extension(main,characters,id,size,0x27FC,0xFF504,0xFF501,0xFF503) -- \mapstochar\relbar\joinrel\rightarrow
+
+ extension(main,characters,id,size,0x219E,0xFF50B,0xFF501,0xFF501) -- \twoheadleftarrow\joinrel\relbar
+ extension(main,characters,id,size,0x21A0,0xFF501,0xFF501,0xFF50C) -- \relbar\joinrel\twoheadrightarrow
+ extension(main,characters,id,size,0x21C4,0xFF50D,0xFF50E,0xFF50F) -- leftoverright
+
+ -- 21CB leftrightharpoon
+ -- 21CC rightleftharpoon
+
+ stack(main,characters,id,size,0x2259,0x0003D,3,0x02227) -- \buildrel\wedge\over=
+
+ jointwo(main,characters,id,size,0x22C8,0x022B3,joinrelfactor,0x022B2) -- \mathrel\triangleright\joinrel\mathrel\triangleleft (4 looks better than 3)
+ jointwo(main,characters,id,size,0x22A7,0x0007C,joinrelfactor,0x0003D) -- \mathrel|\joinrel=
+ jointwo(main,characters,id,size,0x2260,0x00338,0,0x0003D) -- \not\equal
+ jointwo(main,characters,id,size,0x2284,0x00338,0,0x02282) -- \not\subset
+ jointwo(main,characters,id,size,0x2285,0x00338,0,0x02283) -- \not\supset
+ jointwo(main,characters,id,size,0x2209,0x00338,0,0x02208) -- \not\in
+ jointwo(main,characters,id,size,0x2254,0x03A,0,0x03D) -- := (≔)
+
+ repeated(main,characters,id,size,0x222C,0x222B,2,0xFF800,1/3)
+ repeated(main,characters,id,size,0x222D,0x222B,3,0xFF810,1/3)
+
+ if cloned(main,characters,id,size,0x2032,0xFE325) then
+ raise(main,characters,id,size,0x2032,0xFE325,1,id_of_smaller) -- prime
+ raise(main,characters,id,size,0x2033,0xFE325,2,id_of_smaller) -- double prime
+ raise(main,characters,id,size,0x2034,0xFE325,3,id_of_smaller) -- triple prime
+ -- to satisfy the prime resolver
+ characters[0xFE932] = characters[0x2032]
+ characters[0xFE933] = characters[0x2033]
+ characters[0xFE934] = characters[0x2034]
+ end
+
+ -- there are more (needs discussion first):
+
+ -- characters[0x20D6] = characters[0x2190]
+ -- characters[0x20D7] = characters[0x2192]
+
+ characters[0x02B9] = characters[0x2032] -- we're nice
+
+ data_of_smaller = main.fonts[id]
+ size_of_smaller = size
+
+end
+
+local unique = 0 -- testcase: \startTEXpage \math{!\text{-}\text{-}\text{-}} \stopTEXpage
+
+local reported = { }
+local reverse = { } -- index -> unicode
+
+setmetatableindex(reverse, function(t,name)
+ if trace_virtual then
+ report_virtual("initializing math vector %a",name)
+ end
+ local m = mathencodings[name]
+ local r = { }
+ for u, i in next, m do
+ r[i] = u
+ end
+ reverse[name] = r
+ return r
+end)
+
+local function copy_glyph(main,target,original,unicode,slot)
+ local addprivate = fonts.helpers.addprivate
+ local olddata = original[unicode]
+ if olddata then
+ local newdata = {
+ width = olddata.width,
+ height = olddata.height,
+ depth = olddata.depth,
+ italic = olddata.italic,
+ kerns = olddata.kerns,
+ tounicode = olddata.tounicode,
+ commands = { { "slot", slot, unicode } },
+ }
+ local glyphdata = newdata
+ local nextglyph = olddata.next
+ while nextglyph do
+ local oldnextdata = original[nextglyph]
+ if oldnextdata then
+ local newnextdata = {
+ width = oldnextdata.width,
+ height = oldnextdata.height,
+ depth = oldnextdata.depth,
+ tounicode = olddata.tounicode,
+ commands = { { "slot", slot, nextglyph } },
+ }
+ local newnextglyph = addprivate(main,formatters["M-N-%H"](nextglyph),newnextdata)
+ newdata.next = newnextglyph
+ local nextnextglyph = oldnextdata.next
+ if nextnextglyph == nextglyph then
+ break
+ else
+ olddata = oldnextdata
+ newdata = newnextdata
+ nextglyph = nextnextglyph
+ end
+ else
+ break -- safeguard (when testing stuff)
+ end
+ end
+ local hv = olddata.horiz_variants
+ if hv then
+ hv = fastcopy(hv)
+ newdata.horiz_variants = hv
+ for i=1,#hv do
+ local hvi = hv[i]
+ local oldglyph = hvi.glyph
+ local olddata = original[oldglyph]
+ local newdata = {
+ width = olddata.width,
+ height = olddata.height,
+ depth = olddata.depth,
+ tounicode = olddata.tounicode,
+ commands = { { "slot", slot, oldglyph } },
+ }
+ hvi.glyph = addprivate(main,formatters["M-H-%H"](oldglyph),newdata)
+ end
+ end
+ local vv = olddata.vert_variants
+ if vv then
+ vv = fastcopy(vv)
+ newdata.vert_variants = vv
+ for i=1,#vv do
+ local vvi = vv[i]
+ local oldglyph = vvi.glyph
+ local olddata = original[oldglyph]
+ local newdata = {
+ width = olddata.width,
+ height = olddata.height,
+ depth = olddata.depth,
+ tounicode = olddata.tounicode,
+ commands = { { "slot", slot, oldglyph } },
+ }
+ vvi.glyph = addprivate(main,formatters["M-V-%H"](oldglyph),newdata)
+ end
+ end
+ return newdata
+ end
+end
+
+vfmath.copy_glyph = copy_glyph
+
+-- It's time to get rid of this type 1 mess ... take iwona: uppercase /A .. Z but
+-- lowercase /a.math ... /z.math ... anyway, we now follow a slightly different
+-- route: use the "order" field. I can probably make it a bit leaner but it's not
+-- worth spending much time on now.
+
+function vfmath.define(specification,set,goodies)
+ local name = specification.name -- symbolic name
+ local size = specification.size -- given size
+ local loaded = { }
+ local fontlist = { }
+ local names = { }
+ local main = nil
+ 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 ssname = ss.name
+ if add_optional and ss.optional then
+ if trace_virtual then
+ report_virtual("loading font %a subfont %s with name %a at %p is skipped",name,s,ssname,size)
+ end
+ else
+ if ss.features then
+ ssname = ssname .. "*" .. ss.features
+ end
+ if ss.main then
+ main = s
+ end
+ local alreadyloaded = names[ssname] -- for px we load one twice (saves .04 sec)
+ local f, id
+ if alreadyloaded then
+ f, id = alreadyloaded.f, alreadyloaded.id
+ if trace_virtual then
+ report_virtual("loading font %a subfont %s with name %a is reused",name,s,ssname)
+ end
+ else
+ f, id = fonts.constructors.readanddefine(ssname,size)
+ names[ssname] = { f = f, id = id }
+ end
+ if not f or id == 0 then
+ report_virtual("loading font %a subfont %s with name %a at %p is skipped, not found",name,s,ssname,size)
+ else
+ n = n + 1
+ okset[n] = ss
+ loaded[n] = f
+ fontlist[n] = { id = id, size = size }
+ if not shared[s] then
+ shared[n] = { }
+ end
+ if trace_virtual then
+ report_virtual("loading font %a subfont %s with name %a at %p as id %s using encoding %a",name,s,ssname,size,id,ss.vector)
+ end
+ end
+ end
+ end
+ -- beware, loaded[1] is already passed to tex (we need to make a simple copy then .. todo)
+ local parent = loaded[1] or { } -- a text font
+ local characters = { }
+ local parameters = { }
+ local mathparameters = { }
+ local descriptions = { }
+ local metadata = { }
+ local properties = {
+ hasitalics = true,
+ hasmath = true,
+ }
+ local goodies = { }
+ local main = {
+ metadata = metadata,
+ properties = properties,
+ characters = characters,
+ descriptions = descriptions,
+ parameters = parameters,
+ mathparameters = mathparameters,
+ fonts = fontlist,
+ goodies = goodies,
+ --
+ fullname = properties.fullname,
+ nomath = false,
+ }
+ --
+ for key, value in next, parent do
+ if type(value) ~= "table" then
+ main[key] = value
+ end
+ end
+ --
+ if parent.characters then
+ for unicode, character in next, parent.characters do
+ characters[unicode] = character
+ end
+ else
+ report_virtual("font %a has no characters",name)
+ end
+ --
+ if parent.parameters then
+ for key, value in next, parent.parameters do
+ parameters[key] = value
+ end
+ else
+ report_virtual("font %a has no parameters",name)
+ end
+ --
+ local description = { name = "<unset>" }
+ setmetatableindex(descriptions,function() return description end)
+ --
+ if parent.properties then
+ setmetatableindex(properties,parent.properties)
+ end
+ --
+ if parent.goodies then
+ setmetatableindex(goodies,parent.goodies)
+ end
+ --
+ local fullname = properties.fullname -- parent via mt
+ if fullname then
+ unique = unique + 1
+ properties.fullname = fullname .. "-" .. unique
+ end
+ --
+ if not parameters.x_height then
+ parameters.x_height = 0
+ end
+ --
+ local already_reported = false
+ local parameters_done = false
+ for s=1,n do
+ local ss, fs = okset[s], loaded[s]
+ if not fs then
+ -- skip, error
+ elseif add_optional and ss.optional then
+ -- skip, redundant
+ else
+ local newparameters = fs.parameters
+ local newmathparameters = fs.mathparameters
+ if newmathparameters then
+ if not parameters_done or ss.parameters then
+ mathparameters = newmathparameters
+ parameters_done = true
+ end
+ elseif not newparameters then
+ report_virtual("no parameters set in font %a",name)
+ elseif ss.extension then
+ mathparameters.math_x_height = newparameters.x_height or 0 -- math_x_height : height of x
+ mathparameters.default_rule_thickness = newparameters[ 8] or 0 -- default_rule_thickness : thickness of \over bars
+ mathparameters.big_op_spacing1 = newparameters[ 9] or 0 -- big_op_spacing1 : minimum clearance above a displayed op
+ mathparameters.big_op_spacing2 = newparameters[10] or 0 -- big_op_spacing2 : minimum clearance below a displayed op
+ mathparameters.big_op_spacing3 = newparameters[11] or 0 -- big_op_spacing3 : minimum baselineskip above displayed op
+ mathparameters.big_op_spacing4 = newparameters[12] or 0 -- big_op_spacing4 : minimum baselineskip below displayed op
+ mathparameters.big_op_spacing5 = newparameters[13] or 0 -- big_op_spacing5 : padding above and below displayed limits
+ -- report_virtual("loading and virtualizing font %a at size %p, setting ex parameters",name,size)
+ elseif ss.parameters then
+ mathparameters.x_height = newparameters.x_height or mathparameters.x_height
+ mathparameters.x_height = mathparameters.x_height or fp.x_height or 0 -- x_height : height of x
+ mathparameters.num1 = newparameters[ 8] or 0 -- num1 : numerator shift-up in display styles
+ mathparameters.num2 = newparameters[ 9] or 0 -- num2 : numerator shift-up in non-display, non-\atop
+ mathparameters.num3 = newparameters[10] or 0 -- num3 : numerator shift-up in non-display \atop
+ mathparameters.denom1 = newparameters[11] or 0 -- denom1 : denominator shift-down in display styles
+ mathparameters.denom2 = newparameters[12] or 0 -- denom2 : denominator shift-down in non-display styles
+ mathparameters.sup1 = newparameters[13] or 0 -- sup1 : superscript shift-up in uncramped display style
+ mathparameters.sup2 = newparameters[14] or 0 -- sup2 : superscript shift-up in uncramped non-display
+ mathparameters.sup3 = newparameters[15] or 0 -- sup3 : superscript shift-up in cramped styles
+ mathparameters.sub1 = newparameters[16] or 0 -- sub1 : subscript shift-down if superscript is absent
+ mathparameters.sub2 = newparameters[17] or 0 -- sub2 : subscript shift-down if superscript is present
+ mathparameters.sup_drop = newparameters[18] or 0 -- sup_drop : superscript baseline below top of large box
+ mathparameters.sub_drop = newparameters[19] or 0 -- sub_drop : subscript baseline below bottom of large box
+ mathparameters.delim1 = newparameters[20] or 0 -- delim1 : size of \atopwithdelims delimiters in display styles
+ mathparameters.delim2 = newparameters[21] or 0 -- delim2 : size of \atopwithdelims delimiters in non-displays
+ mathparameters.axis_height = newparameters[22] or 0 -- axis_height : height of fraction lines above the baseline
+ -- report_virtual("loading and virtualizing font %a at size %p, setting sy parameters",name,size)
+ end
+ if ss.overlay then
+ local fc = fs.characters
+ local first = ss.first
+ if first then
+ local last = ss.last or first
+ for unicode = first, last do
+ characters[unicode] = copy_glyph(main,characters,fc,unicode,s)
+ end
+ else
+ for unicode, data in next, fc do
+ characters[unicode] = copy_glyph(main,characters,fc,unicode,s)
+ end
+ end
+ else
+ local vectorname = ss.vector
+ if vectorname then
+ local offset = 0xFF000 -- todo: -- private
+ local vector = mathencodings[vectorname]
+ local rotcev = reverse[vectorname]
+ local isextension = ss.extension
+ if vector and rotcev then
+ local fc = fs.characters
+ local fd = fs.descriptions
+ local si = shared[s]
+ local fontname = fs.properties.name or "unknown"
+ local skewchar = ss.skewchar
+ local backmap = ss.backmap
+ -- we need to know the original order because the loader has made a
+ -- unicode font of it and weird glyphnames have spoiled that a bit
+ if backmap then
+ backmap = { }
+ for unicode, character in next, fc do
+ backmap[character.order or character.index or unicode] = unicode
+ end
+ end
+ for unicode, i in next, vector do
+ -- So, here we can have an extra remapping (compared to mkiv).
+ local index = backmap and backmap[i] or i
+ local fci = fc[index]
+ if not fci then
+ local rf = reported[fontname]
+ if not rf then rf = { } reported[fontname] = rf end
+ local rv = rf[vectorname]
+ if not rv then rv = { } rf[vectorname] = rv end
+ local ru = rv[unicode]
+ if not ru then
+ if trace_virtual then
+ local d = chardata[unicode].description
+ if index then
+ report_virtual("character %C has no index %H in vector %a for font %a (%S)",unicode,index,vectorname,fontname,d)
+ else
+ report_virtual("character %C has no entry in vector %a for font %a (%S)",unicode,vectorname,fontname,d)
+ end
+ elseif not already_reported then
+ report_virtual("the mapping is incomplete for %a at %p",name,size)
+ already_reported = true
+ end
+ rv[unicode] = true
+ end
+ else
+ local ref = si[index]
+ if not ref then
+ ref = { { 'slot', s, index } }
+ si[index] = ref
+ end
+ local kerns = fci.kerns
+ local width = fci.width
+ local italic = fci.italic
+-- if trace_virtual then
+-- report_virtual("character %C uses index %H in vector %a for font %a, %s, %s",
+-- unicode,index,vectorname,fontname,
+-- kerns and "adding kerns" or "no kerns",
+-- kerns and "adding italic" or "no italic"
+-- )
+-- end
+ if italic and italic > 0 then
+ -- int_a^b
+ if isextension then
+ width = width + italic -- for obscure reasons the integral as a width + italic correction
+ end
+ end
+ if kerns then
+ local krn = { }
+ for k, v in next, kerns do -- kerns is sparse
+ local rk = rotcev[k]
+ if rk then
+ krn[rk] = v -- kerns[k]
+ end
+ end
+ if not next(krn) then
+ krn = nil
+ end
+ local t = {
+ width = width,
+ height = fci.height,
+ depth = fci.depth,
+ italic = italic,
+ kerns = krn,
+ commands = ref,
+ }
+ if skewchar then
+ local k = kerns[skewchar]
+ if k then
+ t.top_accent = width/2 + k
+ end
+ end
+ characters[unicode] = t
+ else
+ characters[unicode] = {
+ width = width,
+ height = fci.height,
+ depth = fci.depth,
+ italic = italic,
+ commands = ref,
+ }
+ end
+ end
+ end
+ if isextension then
+ -- todo: if multiple ex, then 256 offsets per instance
+ local extension = mathencodings["large-to-small"]
+ local variants_done = fs.variants_done
+ for index, fci in next, fc do -- the raw ex file
+ if type(index) == "number" then
+ local ref = si[index]
+ if not ref then
+ ref = { { 'slot', s, index } }
+ si[index] = ref
+ end
+ local italic = fci.italic
+ local t = {
+ width = fci.width,
+ height = fci.height,
+ depth = fci.depth,
+ italic = italic,
+ commands = ref,
+ }
+ local n = fci.next
+ if n then
+ t.next = offset + n
+ elseif variants_done then
+ local vv = fci.vert_variants
+ if vv then
+ t.vert_variants = vv
+ end
+ local hv = fci.horiz_variants
+ if hv then
+ t.horiz_variants = hv
+ end
+ else
+ local vv = fci.vert_variants
+ if vv then
+ for i=1,#vv do
+ local vvi = vv[i]
+ vvi.glyph = vvi.glyph + offset
+ end
+ t.vert_variants = vv
+ end
+ local hv = fci.horiz_variants
+ if hv then
+ for i=1,#hv do
+ local hvi = hv[i]
+ hvi.glyph = hvi.glyph + offset
+ end
+ t.horiz_variants = hv
+ end
+ end
+ characters[offset + index] = t
+ end
+ end
+ fs.variants_done = true
+ for unicode, index in next, extension do
+ local cu = characters[unicode]
+ if cu then
+ cu.next = offset + index
+ else
+ local fci = fc[index]
+ if not fci then
+ -- do nothing
+ else
+ -- probably never entered
+ local ref = si[index]
+ if not ref then
+ ref = { { 'slot', s, index } }
+ si[index] = ref
+ end
+ local kerns = fci.kerns
+ if kerns then
+ local krn = { }
+ -- for k=1,#kerns do
+ -- krn[offset + k] = kerns[k]
+ -- end
+ for k, v in next, kerns do -- is kerns sparse?
+ krn[offset + k] = v
+ end
+ characters[unicode] = {
+ width = fci.width,
+ height = fci.height,
+ depth = fci.depth,
+ italic = fci.italic,
+ commands = ref,
+ kerns = krn,
+ next = offset + index,
+ }
+ else
+ characters[unicode] = {
+ width = fci.width,
+ height = fci.height,
+ depth = fci.depth,
+ italic = fci.italic,
+ commands = ref,
+ next = offset + index,
+ }
+ end
+ end
+ end
+ end
+ end
+ else
+ report_virtual("error in loading %a, problematic vector %a",name,vectorname)
+ end
+ end
+ end
+ mathematics.extras.copy(main) --not needed here (yet)
+ end
+ end
+-- inspect(characters[0x1D465])
+-- inspect(fonts.encodings.math["tex-it"])
+-- inspect(fontlist)
+ --
+ main.mathparameters = mathparameters -- still traditional ones
+ -- This should change (some day) as it's the only place where we look forward,
+ -- so better is to also reserve the id already which then involves some more
+ -- management (so not now).
+ fontlist[#fontlist+1] = {
+ -- id = font.nextid(),
+ id = 0, -- self
+ size = size,
+ }
+ vfmath.addmissing(main,#fontlist,size)
+ --
+ mathematics.addfallbacks(main)
+ --
+ main.properties.math_is_scaled = true -- signal
+ fonts.constructors.assignmathparameters(main,main)
+ --
+ main.MathConstants = main.mathparameters -- we directly pass it to TeX (bypasses the scaler) so this is needed
+ --
+ 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
+ --
+ main.oldmath = true
+ return main
+end
+
+function mathematics.makefont(name,set,goodies)
+ fonts.definers.methods.variants[name] = function(specification)
+ return vfmath.define(specification,set,goodies)
+ end
+end
+
+-- helpers
+
+function vfmath.setletters(font_encoding, name, uppercase, lowercase)
+ local enc = font_encoding[name]
+ for i = 0,25 do
+ enc[uppercase+i] = i + 0x41
+ enc[lowercase+i] = i + 0x61
+ end
+end
+
+function vfmath.setdigits(font_encoding, name, digits)
+ local enc = font_encoding[name]
+ for i = 0,9 do
+ enc[digits+i] = i + 0x30
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-blb.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-blb.mkxl
new file mode 100644
index 00000000000..247d3a34e3f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-blb.mkxl
@@ -0,0 +1,53 @@
+%D \module
+%D [ file=meta-blb,
+%D version=2018.04.12,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Blobs,
+%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}{MetaPost Graphics / Blobs}
+
+\registerctxluafile{meta-blb}{}
+
+\unprotect
+
+\permanent\protected\def\MPLIBgetblobscaledcm#1#2#3#4#5#6#7#8#9%
+ {\clf_mpgetblob\MPtextbox#1\relax
+ \setbox\MPbox\hpack\bgroup
+ \dotransformnextbox{#2}{#3}{#4}{#5}{#6}{#7}%
+ \vpack to \zeropoint\bgroup
+ \vss
+ \hpack to \zeropoint \bgroup
+ % \fastsxsy{#8}{#9}{\raise\dp\MPtextbox\box\MPtextbox}%
+ \fastsxsy{#8}{#9}{\box\MPtextbox}%
+ \hss
+ \egroup
+ \egroup
+ \egroup
+ \smashbox\MPbox
+ \box\MPbox}
+
+%D An example of usage:
+
+\definefontfeature[followtext][liga=no]
+
+\permanent\protected\def\MPLIBfollowtext#1#2%
+ {\begingroup
+ \scratchcounter#1\relax
+ \setbox\scratchbox\hbox{\addff{followtext}#2}%
+ \clf_MPLIBconvertfollowtext\scratchcounter\scratchbox
+ \endgroup}
+
+%D New:
+
+\newtoks\mpblobtext
+
+\permanent\protected\mpblobtext{\global\setbox\mptextbox\vbox{\clf_mpblobtext}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-fig.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-fig.mkxl
new file mode 100644
index 00000000000..b8a22f6feff
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-fig.mkxl
@@ -0,0 +1,69 @@
+%D \module
+%D [ file=meta-fig,
+%D version=2000.09.07,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Stand Alone Graphics,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{MetaPost Graphics / Stand Alone Graphics}
+
+\unprotect
+
+%D This module implements a method for defining stand||alone||graphics, that is,
+%D each graphic gets is own page. Because graphics are wrapped in a \type {\framed},
+%D you can add overlays to the graphic directly, and since the whole \CONTEXT\
+%D machinery is available, you can also add page backgrounds.
+%D
+%D \starttyping
+%D \setupMPpage
+%D [offset=1pt,
+%D background=color,
+%D backgroundcolor=green]
+%D
+%D \startMPpage
+%D fill fullcircle scaled 10cm withcolor red ;
+%D \stopMPpage
+%D
+%D \startMPpage
+%D fill fullsquare rotated 45 scaled 8cm withcolor blue ;
+%D \stopMPpage
+%D \stoptyping
+%D
+%D Although this is hardly of any use, you can mix these definitions with the text
+%D flow, since all settings are kept local. The page is clipped to the image size.
+
+\definefittingpage
+ [MPpage]
+ [\c!align=,
+ \c!command=\meta_process_graphic_command,
+ \c!instance=]
+
+\permanent\protected\def\setupMPpage
+ {\setupfittingpage[MPpage]}
+
+\protected\def\meta_process_graphic_command
+ {\meta_process_graphic_instance{\fittingpageparameter\c!instance}}
+
+%D \macros
+%D {MPfigure}
+%D
+%D A bit out of place, here but nevertheless:
+
+\permanent\protected\def\MPfigure#1#2% test for dup figure, can be replaced by a textext
+ {\bgroup
+ \getfiguredimensions[#1]% [\c!object=\v!no] already set
+ \startMPcode
+ draw externalfigure "#1"
+ xsized \the\dimexpr\figurewidth \relax\space % must be points
+ ysized \the\dimexpr\figureheight\relax\space % must be points
+ #2 ;
+ \stopMPcode
+ \egroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-fnt.lmt b/Master/texmf-dist/tex/context/base/mkxl/meta-fnt.lmt
new file mode 100644
index 00000000000..91acd9c0268
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-fnt.lmt
@@ -0,0 +1,150 @@
+if not modules then modules = { } end modules ['meta-fnt'] = {
+ version = 1.001,
+ comment = "companion to meta-fnt.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This was one of the demo modules that never was used for real so the \MKIV\
+-- variant has been replaced by one using the newer \LMTX\ interface, but only
+-- because we want to be (sort of) compatible. Instead of doing the work at the
+-- \LUA\ end we do it at the \TEX end.
+
+metapost.fonts = metapost.fonts or { }
+
+function metapost.fonts.define(specification)
+ local fontname = specification.fontname
+ local filename = specification.filename
+ local fontsize = specification.size
+ context.definemetafont (
+ { fontname },
+ { filename },
+ { size and { "at " .. size .. " sp" } or "" }
+ )
+end
+
+-- metapost.fonts.define {
+-- fontname = "bidi",
+-- filename = "bidi-symbols.mp",
+-- }
+
+-- okay, let's for the moment put this here:
+
+local tonumber = tonumber
+local find = string.find
+
+local context = context
+
+local fastserialize = table.fastserialize
+local settings_to_hash = utilities.parsers.settings_to_hash
+local settings_to_array = utilities.parsers.settings_to_array
+
+local addcharacters = fonts.constructors.addcharacters
+local fontdata = fonts.hashes.identifiers
+
+-- This is a prelude to a more advance mechanism: when we are in mp we can construct the
+-- whole composed character there.
+
+function fonts.helpers.combineglyphs(fnt, specification)
+ local hash = fastserialize(specification)
+ local fontid = fnt or font.current()
+ local tfmdata = fontdata[fontid]
+ local combhash = tfmdata.combhash or { }
+ local unicode = combhash[hash]
+ if not unicode then
+ local t = { }
+ local h = 0
+ local d = 0
+ local w = 0
+ local o = 0
+ local characters = tfmdata.characters
+ for i=1,#specification do
+ local s = specification[i]
+ local l = find(s,"=") and settings_to_hash(s)
+ local n = tonumber(l and l.unicode or s) or tonumber(s)
+ if n then
+ local data = characters[n]
+ if data then
+ local bb = data.boundingbox
+ if bb then
+ local llx = bb[1]
+ local lly = bb[2]
+ local urx = bb[3]
+ local ury = bb[4]
+ if ury > h then
+ h = ury
+ elseif - ury > d then
+ d = - ury
+ end
+ if - lly > d then
+ d = - lly
+ elseif lly > h then
+ h = lly
+ end
+ if llx < o then
+ o = llx
+ end
+ -- could be an extension to the "offset" command
+ local c = l and l.color
+ if c then
+ t[#t+1] = { "startcolor", c }
+ end
+ t[#t+1] = { "offset", 0, 0, n }
+ if c then
+ t[#t+1] = { "stopcolor" }
+ end
+ -- t[#t+1] = { "push" }
+ -- if c then
+ -- t[#t+1] = { "startcolor", c }
+ -- end
+ -- t[#t+1] = { "right", 0 }
+ -- t[#t+1] = { "char", n }
+ -- if c then
+ -- t[#t+1] = { "stopcolor" }
+ -- end
+ -- t[#t+1] = { "pop" }
+ if urx > w then
+ w = urx
+ end
+ else
+ local ht = data.height or 0 if ht > h then h = ht end
+ local dp = data.depth or 0 if dp > d then d = dp end
+ local wd = data.width or 0 if wd > w then w = wd end
+ t[#t+1] = { "char", n }
+ end
+ end
+ end
+ end
+ for i=1,#t do
+-- if t[i][1] == "right" then
+ if t[i][1] == "offset" then
+ t[i][2] = -o
+-- t[i][2] = o
+ end
+ end
+ -- cheat one: we get a private slot
+ unicode = fonts.helpers.addprivate(tfmdata,nil,{
+ commands = t,
+ width = w - o,
+ height = h,
+ depth = d,
+ })
+ -- cheat two: we overload it later
+ addcharacters(fontid,{ characters = { [unicode] = characters[unicode] } })
+ tfmdata.combhash = combhash
+ combhash[hash] = unicode
+ end
+ return unicode
+end
+
+interfaces.implement {
+ name = "combineglyphs",
+ public = true,
+ arguments = "string",
+ actions = function(list)
+ local list = settings_to_array(list)
+ local unicode = fonts.helpers.combineglyphs(font.current(),list)
+ context(unicode)
+ end,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-fnt.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-fnt.mkxl
new file mode 100644
index 00000000000..45d1db2988e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-fnt.mkxl
@@ -0,0 +1,44 @@
+%D \module
+%D [ file=meta-fnt,
+%D version=2013.09.06,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Fonts,
+%D author=Hans Hagen,
+%D date=\ currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{MetaPost Graphics / Fonts}
+
+\registerctxluafile{meta-fnt}{autosuffix}
+\registerctxluafile{font-mpf}{autosuffix}
+
+\unprotect
+
+%D Contrary to the \MKIV\ variant we dont' use the \LUA\ call but the \LUA\ call
+%D uses this here:
+
+\permanent\tolerant\protected\def\definemetafont[#1]#*[#2]#*[#3]%
+ {\doonlyonce{#2}{%
+ \definefontfeature[metafont-#2][metapost=#2]
+ \startMPcalculation{simplefun} input "#2" ; \stopMPcalculation
+ }%
+ \definefont[#1][Mono*metafont-#2 #3]}
+
+%D Demo:
+%D
+%D \starttyping
+%D \setupbodyfont[dejavu]
+%D \starttext
+%D \showglyphs
+%D \startTEXpage[offset=10pt]
+%D \definemetafont[MyDemoA][demo-symbols][at 10pt]\MyDemoA\char9754
+%D \definemetafont[MyDemoB][demo-symbols][at 30pt]\MyDemoB\char9754
+%D \stopTEXpage
+%D \stoptext
+%D \stoptyping
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-fun.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-fun.mkxl
new file mode 100644
index 00000000000..e30660392f1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-fun.mkxl
@@ -0,0 +1,25 @@
+%D \module
+%D [ file=meta-fun,
+%D version=2009.06.02,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Goodies,
+%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}{MetaPost Graphics / Goodies}
+
+\registerctxluafile{meta-fun}{}
+
+\unprotect
+
+%D Just a few handy helpers:
+
+\ifdefined\MPtoks\else \newtoks\MPtoks \fi
+\ifdefined\MPbox \else \newbox \MPbox \fi
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-grd.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-grd.mkxl
new file mode 100644
index 00000000000..009149e46ed
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-grd.mkxl
@@ -0,0 +1,105 @@
+%D \module
+%D [ file=meta-grd,
+%D version=2012.06.28,
+%D title=\METAPOST\ Graphics,
+%D subtitle=grids,
+%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}{MetaPost Graphics / Grids}
+
+\unprotect
+
+%D This used to be a \TEX\ method, and a rather old one too. We keep it around but
+%D in a more modern way.
+%D
+%D \startbuffer
+%D \basegrid
+%D [nx=8,ny=5,
+%D dx=.5,dy=.25,
+%D unit=cm,scale=2,factor=1,
+%D offset=1ex,xstep=2,ystep=1,
+%D align=middle,style=\tt\tx]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \placefigure
+%D {An example of a grid.}
+%D {\getbuffer}
+
+\startuseMPgraphic{meta:grd:basegrid}
+ begingroup ;
+
+ save sc, dx, dy, wd, ht, ox, oy, ax, ay ;
+
+ sc = \directdummyparameter\c!factor*\directdummyparameter\c!scale ;
+ dx = \MPdpar\directdummyparameter\c!dx*sc ;
+ dy = \MPdpar\directdummyparameter\c!dy*sc ;
+ wd = \directdummyparameter\c!nx*dx ;
+ ht = \directdummyparameter\c!ny*dy ;
+ ox = \MPdpar\directdummyparameter\c!xoffset\relax ;
+ oy = \MPdpar\directdummyparameter\c!yoffset\relax ;
+
+ if "\directdummyparameter\c!align" = "\v!middle" :
+ ax = \MPdpar\directdummyparameter\c!dx/2
+ ay = \MPdpar\directdummyparameter\c!dy/2
+ else :
+ ax = 0 ;
+ ay = 0 ;
+ fi ;
+
+ draw image (
+ for i=0 step dx until wd : draw (i,0) -- (i,ht) ; endfor ;
+ for i=0 step dy until ht : draw (0,i) -- (wd,i) ; endfor ;
+ )
+ withpen pencircle scaled \MPdpar\directdummyparameter\c!rulethickness\space
+ withcolor "\directdummyparameter\c!rulecolor" ;
+
+ draw image (
+ if \directdummyparameter\c!xstep > 0 :
+ for i=1 step \directdummyparameter\c!xstep until \directdummyparameter\c!nx :
+ draw thetextext.bot(decimal i,(i*dx-ax,oy));
+ endfor ;
+ fi ;
+ if \directdummyparameter\c!ystep > 0 :
+ for i=1 step \directdummyparameter\c!ystep until \directdummyparameter\c!ny :
+ draw thetextext.lft(decimal i,(ox,i*dy-ay)) ;
+ endfor ;
+ fi ;
+ )
+ withcolor "\directdummyparameter\c!color" ;
+
+ endgroup ;
+\stopuseMPgraphic
+
+\permanent\tolerant\protected\def\basegrid[#1]%
+ {\dontleavehmode
+ \hbox\bgroup
+ \getdummyparameters
+ [\c!nx=10,\c!ny=10,%
+ \c!dx=.5,\c!dy=.5,%
+ \c!xstep=0,\c!ystep=0,%
+ \c!unit=\s!cm,\c!scale=1,\c!factor=1,%
+ \c!offset=.25\exheight,%
+ \c!xoffset=\directdummyparameter\c!offset,%
+ \c!yoffset=\directdummyparameter\c!offset,%
+ \c!align=,%
+ \c!color=\currentcolorname,%
+ \c!rulecolor=\currentcolorname,%
+ \c!rulethickness=\linewidth,%
+ #1]%
+ \usedummystyleandcolor\c!style\c!color
+ \setexpandeddummyparameter\c!dx{\directdummyparameter\c!dx\directdummyparameter\c!unit}%
+ \setexpandeddummyparameter\c!dy{\directdummyparameter\c!dy\directdummyparameter\c!unit}%
+ \useMPgraphic{meta:grd:basegrid}%
+ \egroup}
+
+\aliased\let\grid\basegrid
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-imp-clock.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-clock.mkxl
new file mode 100644
index 00000000000..0612113ea42
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-clock.mkxl
@@ -0,0 +1,141 @@
+%D \module
+%D [ file=meta-imp-clock,
+%D version=2021.01.21,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Demo Clock Font,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is just a demo of defining a font in \METAPOST. The rendering as well as definitions
+%D are delayed till we actually need the glyph. A crazy examples made in crazy times.
+
+\startMPcalculation{simplefun}
+
+ % the 0 in getparameterdefault makes sure we convert to a number
+
+ picture DemoClocks[];
+
+ vardef ClockCircle =
+ image(draw fullcircle scaled 10 ;)
+ enddef ;
+
+ vardef ClockPoints =
+ image (
+ for i=1 upto 12 :
+ draw (0,5) rotated ((360 * i) / 12) withpen pencircle scaled 1 ;
+ endfor ;
+ )
+ enddef ;
+
+ vardef ClockTicks =
+ image (
+ for i=1 upto 12 :
+ draw ((0,4.5)--(0,5.5)) rotated ((360 * i) / 12) ;
+ endfor ;
+ )
+ enddef ;
+
+ vardef ClockCenter =
+ image (
+ draw origin withpen pencircle scaled 1 ;
+ )
+ enddef ;
+
+ vardef ClockHour =
+ image(
+ draw (origin -- (0,4)) rotated (
+ - 360 * (getparameterdefault "mpsfont" "hour" 0) / 12
+ - 360 * (getparameterdefault "mpsfont" "minute" 0) / (60 * 12)
+
+ ) )
+ enddef ;
+
+ vardef ClockMinute =
+ image(
+ draw (origin -- (0,5)) rotated (
+ - 360 * (getparameterdefault "mpsfont" "minute" 0) / 60
+ )
+ )
+ enddef ;
+
+ vardef DemoClock =
+ composeglyph(DemoClocks) ;
+ enddef ;
+
+ lmt_registerglyphs [
+ name = "clock",
+ units = 10,
+ width = 10,
+ height = 10,
+ depth = 0,
+ ] ;
+
+ lmt_registerglyph [
+ category = "clock",
+ ] ;
+
+\stopMPcalculation
+
+% \startluacode
+% metapost.metafonts.clock = { }
+% \stopluacode
+
+\continueifinputfile{meta-imp-clock.mkxl}
+
+% \enableexperiments[fonts.compact]
+
+\nopdfcompression
+
+\setuplayout[tight]
+
+\setupbodyfont[dejavu]
+
+\definefontfeature[clock][metapost=clock,metafont=clock]
+
+\definefont[ClockFont][Serif*clock]
+
+\starttext
+
+\unexpanded\def\MyClock#1#2%
+ {\begingroup
+ \ClockFont
+ \iffontchar\font\privatecharactercode{CLOCK:#1:#2}\else
+ % We could move this out to a helper \MyClockMake{#1}{#2} but normally
+ % it's efficient enough. (If we trace a lot it matters more.)
+ \setmetaglyph {
+ category {clock}
+ name {CLOCK:#1:#2}
+ code {DemoClock}
+ hour {#1}
+ minute {#2}
+ shapes {
+ { shape {ClockCircle} color {darkred} }
+ { shape {ClockTicks} color {middlegray} }
+ % { shape {ClockBullets} color {middlegray} }
+ { shape {ClockHour} color {darkgreen} }
+ { shape {ClockMinute} color {darkblue} }
+ { shape {ClockCenter} color {middlegray} }
+ }
+ }%
+ \fi
+ \setalternate{\twodigits{#1}:\twodigits{#2}}% cut'n'paste in acrobat
+ \privatecharacter{CLOCK:#1:#2}%
+ \endgroup}
+
+\dorecurse{8}{
+ \begingroup
+ \glyphxscale \numexpr 1000+#100\relax
+ \glyphyscale \glyphxscale
+ \veryraggedright
+ \dostepwiserecurse{0}{60}{1}{
+ \MyClock{3}{##1}\hskip\zeropoint plus \onepoint\allowbreak% space
+ }
+ \blank
+ \endgroup
+}
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-imp-demo.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-demo.mkxl
new file mode 100644
index 00000000000..b89a4771bec
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-demo.mkxl
@@ -0,0 +1,233 @@
+%D \module
+%D [ file=meta-imp-demo,
+%D version=2021.01.21,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Demo Font,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is just a demo of defining a font in \METAPOST. The rendering as well as definitions
+%D are delayed till we actually need the glyph.
+
+\startMPcalculation{simplefun}
+
+ picture DemoSnippets[];
+
+ vardef DemoCircle = image(fill fullcircle scaled 10 ;) enddef ;
+ vardef DemoCenter = image(fill fullcircle scaled 3 ;) enddef ;
+
+ vardef DemoLeft = image(fill fullcircle scaled 3 shifted (-5, 0) ;) enddef ;
+ vardef DemoRight = image(fill fullcircle scaled 3 shifted ( 5, 0) ;) enddef ;
+ vardef DemoUp = image(fill fullcircle scaled 3 shifted ( 0, 5) ;) enddef ;
+ vardef DemoDown = image(fill fullcircle scaled 3 shifted ( 0,-5) ;) enddef ;
+ vardef DemoLowerLeft = image(fill fullcircle scaled 3 shifted (-5,-5) ;) enddef ;
+ vardef DemoLowerRight = image(fill fullcircle scaled 3 shifted ( 5,-5) ;) enddef ;
+ vardef DemoUpperRight = image(fill fullcircle scaled 3 shifted ( 5, 5) ;) enddef ;
+ vardef DemoUpperLeft = image(fill fullcircle scaled 3 shifted (-5, 5) ;) enddef ;
+
+ vardef DemoGlyph =
+ composeglyph(DemoSnippets) ;
+ enddef ;
+
+ lmt_registerglyphs [
+ name = "demo",
+ units = 10,
+ width = 10,
+ height = 10,
+ depth = 0,
+ ] ;
+
+ % we need to set up some basics (signals to the backend and such) at definition
+ % time so we just force a bogus shape (zero)
+
+ lmt_registerglyph [
+ category = "demo",
+ ] ;
+
+\stopMPcalculation
+
+\startluacode
+
+metapost.metafonts.demo = {
+ [utf.byte("g")] = {
+ code = "DemoGlyph",
+ shapes = {
+ { shape = "DemoCircle", color = "gray" },
+ { shape = "DemoLeft", color = "cyan" },
+ { shape = "DemoUp", color = "magenta" },
+ { shape = "DemoCenter", color = "yellow" },
+ }
+ },
+ [utf.byte("h")] = {
+ code = "DemoGlyph",
+ shapes = {
+ { shape = "DemoCircle", color = "gray" },
+ { shape = "DemoRight", color = "red" },
+ { shape = "DemoDown", color = "green" },
+ { shape = "DemoCenter", color = "blue" },
+ }
+ },
+ [19] = {
+ code = "DemoGlyph",
+ shapes = {
+ { shape = "DemoCircle", color = "gray" },
+ { shape = "DemoUp", color = "darkgray" },
+ { shape = "DemoDown", color = "darkgray" },
+ { shape = "DemoLeft", color = "darkgray" },
+ { shape = "DemoRight", color = "darkgray" },
+ { shape = "DemoCenter", color = "darkgray" },
+ }
+ },
+ ["weirdsymbol"] = {
+ code = "DemoGlyph",
+ shapes = {
+ { shape = "DemoCircle", color = "middlegray" },
+ { shape = "DemoUp", color = "red" },
+ { shape = "DemoDown", color = "green" },
+ { shape = "DemoLeft", color = "blue" },
+ { shape = "DemoRight", color = "magenta" },
+ { shape = "DemoCenter", color = "yellow" },
+ }
+ },
+ ["weirdersymbol"] = {
+ code = "DemoGlyph",
+ shapes = {
+ -- { shape = "DemoCircle", color = "gray" },
+ { shape = "DemoCenter", color = "darkgray" },
+ { shape = "DemoLowerLeft", color = "red" },
+ { shape = "DemoLowerRight", color = "green" },
+ { shape = "DemoUpperRight", color = "blue" },
+ { shape = "DemoUpperLeft", color = "yellow" },
+ { shape = "DemoUp", color = "darkred" },
+ { shape = "DemoDown", color = "darkgreen" },
+ { shape = "DemoLeft", color = "darkblue" },
+ { shape = "DemoRight", color = "darkmagenta" },
+ }
+ }
+}
+
+\stopluacode
+
+\continueifinputfile{meta-imp-demo.mkxl}
+
+\setuplayout[tight]
+
+\setupbodyfont[dejavu]
+
+\definefontfeature[demo][metapost=demo,metafont=demo]
+
+\definefont[DemoA][Serif*demo]
+\definefont[DemoB][Serif*demo sa .5]
+\definefont[DemoC][Serif*demo sa .25]
+
+\starttext
+
+ \startbuffer
+ x\ruledhbox{gh}%
+ x\ruledhbox{\char19}%
+ x\privatecharacter{weirdsymbol}%
+ x\privatecharacter{weirdersymbol}%
+ x%
+ \stopbuffer
+
+ \startTEXpage[offset=2pt]
+ \DemoA\getbuffer\par
+ \DemoB\getbuffer\quad\DemoC\getbuffer\par
+ \stopTEXpage
+
+ {\DemoA\ctxlua{fonts.helpers.setmetaglyph {
+ category = "demo",
+ name = "whatever",
+ code = "DemoGlyph",
+ shapes = {
+ { shape = "DemoCenter", color = "darkgray" },
+ { shape = "DemoLowerLeft", color = "darkred" },
+ { shape = "DemoLowerRight", color = "darkgreen" },
+ { shape = "DemoUpperRight", color = "darkblue" },
+ { shape = "DemoUpperLeft", color = "darkyellow" },
+ { shape = "DemoUp", color = "red" },
+ { shape = "DemoDown", color = "green" },
+ { shape = "DemoLeft", color = "blue" },
+ { shape = "DemoRight", color = "magenta" },
+ }
+ }}}
+
+ {\DemoA\setmetaglyph {
+ category {demo}
+ name {forever}
+ code {DemoGlyph}
+ shapes {
+ { shape {DemoCenter} color {middlegray} }
+ { shape {DemoLowerLeft} color {darkgray} }
+ { shape {DemoLowerRight} color {darkgray} }
+ { shape {DemoUpperRight} color {darkgray} }
+ { shape {DemoUpperLeft} color {darkgray} }
+ { shape {DemoUp} color {lightgray} }
+ { shape {DemoDown} color {lightgray} }
+ { shape {DemoLeft} color {lightgray} }
+ { shape {DemoRight} color {lightgray} }
+ }
+ }}
+
+ \startTEXpage[offset=2pt]
+ \DemoA
+ \privatecharacter{whatever}
+ \privatecharacter{forever}
+ \stopTEXpage
+
+ \DemoA\setupinterlinespace \dorecurse{10}{\dorecurse{1000}{g h }\par}\page
+ \DemoB\setupinterlinespace \dorecurse{20}{\dorecurse{1000}{g h }\par}\page
+ \DemoC\setupinterlinespace \dorecurse{30}{\dorecurse{1000}{g h }\par}\page
+
+ \unexpanded\def\MyChar#1%
+ {\begingroup
+ \DemoA
+ \iffontchar\font\privatecharactercode{forever-#1}\else
+ \setmetaglyph {
+ category {demo}
+ name {forever-#1}
+ code {DemoGlyph}
+ shapes {
+ { shape {DemoCenter} color {middlegray} }
+ { shape {DemoLowerLeft} color {dark#1} }
+ { shape {DemoLowerRight} color {dark#1} }
+ { shape {DemoUpperRight} color {dark#1} }
+ { shape {DemoUpperLeft} color {dark#1} }
+ { shape {DemoUp} color {light#1} }
+ { shape {DemoDown} color {light#1} }
+ { shape {DemoLeft} color {light#1} }
+ { shape {DemoRight} color {light#1} }
+ }
+ }%
+ \fi
+ \privatecharacter{forever-#1}%
+ \endgroup}
+
+ \dontcomplain
+
+ \dorecurse{1000}{%
+ \MyChar{red}\space
+ \MyChar{green}\space
+ \MyChar{blue}\space
+ \MyChar{yellow}\space
+ }
+
+ \page
+
+ \start
+ \glyphxscale 1200
+ \glyphyscale 800
+ \dorecurse{1000}{%
+ \MyChar{red}\allowbreak
+ \MyChar{green}\allowbreak
+ \MyChar{blue}\allowbreak
+ \MyChar{yellow}\allowbreak
+ }
+ \stop
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-imp-experiments.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-experiments.mkxl
new file mode 100644
index 00000000000..644a8fff031
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-experiments.mkxl
@@ -0,0 +1,358 @@
+%D \module
+%D [ file=meta-imp-experiments,
+%D version=2020.03.18,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Experimental Graphics,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This library implements some experimental functionality that eventually
+%D might end up someplace else.
+
+\startluacode
+
+ -- I decided to play with this kind of graphics after I read an article in a Dutch
+ -- popular science journal. It was an article about virusus in the mids of the time
+ -- when covid raged, so it also was a distraction.
+
+ -- This is a typical case of first prototyping it in Lua using the 'context' command
+ -- to generate MetaPost code and when that worked okay do it the following way. The
+ -- way data is passed is a bit messy.
+
+ do
+
+ local function sum(t)
+ local n = 0
+ for i=1,#t do
+ n = n + t[i]
+ end
+ return n
+ end
+
+ local function checked(data)
+ if data then
+ local n = #data
+ for i=1,n do
+ data[i][i] = 0
+ end
+ for i=1,n do
+ local di = data[i]
+ for j=i+1,n do
+ local dj = data[j]
+ local dji = dj[i]
+ if not dji then
+ dji = 0
+ dj[i] = 0
+ end
+ di[j] = dji
+ end
+ end
+ return data
+ else
+ return { }
+ end
+ end
+
+ local data, list = nil, nil
+
+ function mp.lmt_overlap_prepare()
+ data = checked(metapost.getparameter { "data" })
+ list = { }
+ for i=1,#data do
+ list[i] = sum(data[i])
+ end
+ end
+
+ function mp.lmt_overlap_reset()
+ data = nil
+ list = nil
+ end
+
+ function mp.lmt_overlap_n()
+ return #list
+ end
+
+ function mp.lmt_overlap_data(i, j)
+ if j then
+ return data[i][j]
+ else
+ return list[i]
+ end
+ end
+
+ local injectstring = mp.inject.string
+
+ function mp.lmt_overlap_text(i, j)
+ injectstring(data[i][j] or "")
+ end
+
+ function mp.lmt_overlap_label(i)
+ local labels = metapost.getparameter { "labels" }
+ injectstring(labels and labels[i] or "")
+ end
+
+ function mp.lmt_overlap_color(i)
+ local colors = metapost.getparameter { "colors" }
+ injectstring(colors and colors[i] or "darkgray")
+ end
+
+ function mp.lmt_overlap_total()
+ return sum(list)
+ end
+
+ end
+\stopluacode
+
+\startMPextensions
+
+presetparameters "overlap" [
+ options = "paths,lines",
+ gap = 4,
+ subgap = 2,
+ offset = 8,
+ color = "darkgray",
+ alternative = "circular",
+ colors = {
+ "darkred",
+ "darkgreen",
+ "darkblue",
+ "darkyellow",
+ "darkmagenta",
+ "darkcyan"
+ },
+] ;
+
+def lmt_overlap = applyparameters "overlap" "lmt_do_overlap" enddef ;
+
+vardef lmt_do_overlap_circular =
+
+ astep := 360 / steps ;
+
+ p := fullcircle scaled steps ;
+ r := origin -- (2*steps,0) ;
+
+ start := 0 ;
+ stop := 0 ;
+ for i=1 upto n:
+ stop := start + lua.mp.lmt_overlap_data(i) ;
+ first := start ;
+ last := stop ;
+ for j=1 upto n:
+ if i <> j :
+ last := first + lua.mp.lmt_overlap_data(i,j) ;
+ a := p intersectionpoint (r rotated (first * astep + 0.1)) ; % the 0.1 is somehow needed, why
+ b := p intersectionpoint (r rotated (last * astep - 0.1)) ; % the 0.1 is somehow needed, why
+ qq[i][j] := (p cutafter b) cutbefore a ;
+ first := last + subgap ;
+ fi ;
+ endfor ;
+ start := stop + gap + (n - 1) * subgap ;
+ endfor ;
+
+ if hasoption "options" "paths" :
+
+ for i=1 upto n :
+ for j=1 upto n :
+ if i <> j :
+ q := qq[i][j] ;
+ freelabeloffset := getparameter "offset" ;
+ freelabel(lua.mp.lmt_overlap_text(i,j), point .5 along q, origin) ;
+ if i < j :
+ s := qq[j][i] ;
+ a := point length(q) of q ;
+ b := point 0 of s ;
+ c := point length(s) of s ;
+ d := point 0 of q ;
+ q := q & a .. controls origin and origin .. b & s & c .. controls origin and origin .. d -- cycle ;
+ fill q withcolor lua.mp.lmt_overlap_color(i) withtransparency (1,.8) ;
+ fi ;
+ fi ;
+ endfor ;
+ endfor ;
+
+ fi ;
+
+ if hasoption "options" "lines" :
+
+ start := 0 ;
+ stop := 0 ;
+ for i=1 upto n:
+ stop := start + lua.mp.lmt_overlap_data(i) + (n - 2) * subgap ;
+ a := p intersectionpoint (r rotated (start * astep)) ;
+ b := p intersectionpoint (r rotated (stop * astep)) ;
+ q := (p cutbefore a) cutafter b ;
+ freelabeloffset := getparameterdefault "textoffset" (4 * getparameter "offset") ;
+ freelabel(lua.mp.lmt_overlap_label(i), point .5 along q, origin) ;
+ draw q withcolor white withpen pencircle scaled 5 ;
+ draw q withcolor getparameter "color" withpen pencircle scaled 5 ;
+ start := stop + gap + subgap ;
+ endfor ;
+
+ fi ;
+
+enddef ;
+
+vardef lmt_do_overlap_linear =
+ astep := 1 ; % 1.25
+
+ p := origin -- (astep * steps,0) ;
+ r := origin -- (0,astep * steps) ;
+
+ start := 0 ;
+ stop := 0 ;
+ for i=1 upto n:
+ stop := start + lua.mp.lmt_overlap_data(i) ;
+ first := start ;
+ last := stop ;
+ for j=1 upto n:
+ if i <> j :
+ last := first + lua.mp.lmt_overlap_data(i,j) ;
+ qq[i][j] := (first * astep,0) -- (last * astep,0) ;
+ first := last + subgap ;
+ fi ;
+ endfor ;
+ start := stop + gap + (n - 1) * subgap ;
+ endfor ;
+
+ if hasoption "options" "paths" :
+
+ for i=1 upto n :
+ for j=1 upto n :
+ if i < j :
+ qq[i][j] := qq[i][j] { up } .. { down } qq[j][i] { up } .. { down} cycle ;
+ fill qq[i][j] withcolor lua.mp.lmt_overlap_color(i) withtransparency (1,.8) ;
+ fi ;
+ endfor ;
+ endfor ;
+
+ for i=1 upto n :
+ for j=1 upto n :
+ if i < j :
+ t := thelabel(lua.mp.lmt_overlap_text(i,j), (center topboundary qq[i][j]) ) ;
+ fill boundingbox t enlarged (ExHeight/2) withcolor white ;
+ draw t ;
+ fi ;
+ endfor ;
+ endfor ;
+
+ fi ;
+
+ if hasoption "options" "lines" :
+
+ start := 0 ;
+ stop := 0 ;
+ for i=1 upto n:
+ stop := start + lua.mp.lmt_overlap_data(i) + (n - 2) * subgap ;
+ q := (start * astep,0) -- (stop * astep,0) ;
+ freelabeloffset := getparameterdefault "textoffset" (4 * getparameter "offset") ;
+ label.bot(lua.mp.lmt_overlap_label(i), (point .5 along q) shifted (0,- freelabeloffset/4)) ;
+ draw q withcolor white withpen pencircle scaled 5 ;
+ draw q withcolor getparameter "color" withpen pencircle scaled 5 ;
+ start := stop + gap + subgap ;
+ endfor ;
+
+ fi ;
+
+enddef ;
+
+vardef lmt_do_overlap =
+ image (
+
+ pushparameters "overlap" ;
+
+ save p, q, r, s, qq, a, b, c, d, t, n, gap, subgap, steps, astep, start, stop, first, last ;
+ path p, q, r, s, qq[][] ;
+ pair a, b, c, d ;
+ picture t ;
+ numeric n, gap, subgap, steps, astep, start, stop, first, last ;
+ save freelabeloffset; freelabeloffset := 8 ;
+ interim linecap := butt;
+ interim linejoin := squared;
+
+ lua.mp.lmt_overlap_prepare() ;
+
+ n := lua.mp.lmt_overlap_n();
+ gap := getparameter "gap" ;
+ subgap := getparameter "subgap" ;
+ steps := lua.mp.lmt_overlap_total() + (n * gap) + n * (n - 1) * subgap ;
+
+ if ((getparameter "alternative") = "linear") or ((getparameter "alternative") = "line") :
+ lmt_do_overlap_linear ;
+ else :
+ lmt_do_overlap_circular ;
+ fi ;
+
+ lua.mp.lmt_overlap_reset() ;
+
+ popparameters ;
+ )
+enddef ;
+
+\stopMPextensions
+
+\continueifinputfile{meta-imp-experiments.mkxl}
+
+% \useMPlibrary[experiments]
+
+\usemodule[article-basic]
+
+\starttext
+
+% todo: datafile: { data = { }, labels = { } }
+
+% % data = {
+% % { 0, 10, 30, 10, 20 },
+% % { 10, 0, 10, 20, 10 },
+% % { 30, 10, 0, 5, 15 },
+% % { 10, 20, 5, 0, 5 },
+% % { 20, 10, 15, 5, 0 }
+% % },
+% % data = {
+% % { 0 },
+% % { 10, 0 },
+% % { 30, 10, 0 },
+% % { 10, 20, 5, 0 },
+% % { 20, 10, 15, 5, 0 }
+% % },
+% data = {
+% { },
+% { 10 },
+% { 30, 10 },
+% { 10, 20, 5 },
+% { 20, 10, 15, 5 }
+% },
+
+\startbuffer
+\startMPcode{doublefun}
+ draw lmt_overlap [
+ alternative = "circular",
+ data = { { }, { 10 }, { 30, 10 }, { 10, 20, 5 }, { 20, 10, 15, 5 } },
+ labels = { "one", "two", "three", "four", "five" }
+ ] ;
+\stopMPcode
+\stopbuffer
+
+\startlinecorrection[blank]
+ \getbuffer
+\stoplinecorrection
+
+\startbuffer
+\startMPcode{doublefun}
+ draw lmt_overlap [
+ alternative = "linear",
+ data = { { }, { 10 }, { 30, 10 }, { 10, 20, 5 }, { 20, 10, 15, 5 } },
+ labels = { "one", "two", "three", "four", "five" }
+ ] ;
+\stopMPcode
+\stopbuffer
+
+\startlinecorrection[blank]
+ \getbuffer
+\stoplinecorrection
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-gamesymbols.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-gamesymbols.mkxl
index d79e59f69f4..d79e59f69f4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-gamesymbols.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-gamesymbols.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-imp-punk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-punk.mkxl
new file mode 100644
index 00000000000..b03977f39b3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-punk.mkxl
@@ -0,0 +1,272 @@
+%D \module
+%D [ file=meta-imp-punk,
+%D version=2020.01.16,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Punk,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% This file is a merge of the original punk files by Donald Knuth, who
+% added this comment:
+%
+% Font inspired by Gerard and Marjan Unger's lectures, Feb 1985
+%
+% The regular punk files are part of TeXLive and in metafont format. All
+% errors introduced are ours. We also changed the encoding to unicode. In
+% due time we might add a few more more characters. We still need to
+% improve some of the metrics which involves a bit of trial and error. The
+% font just covers basic latin shapes but in ConTeXt MkIV we add virtual
+% composed shapes. There is a module m-punk.tex that implements this. This
+% derivate is also used in mk.tex (mk.pdf) which is one of our tests for
+% LuaTeX. We published an article on it in the MAPS (NTG magazine).
+%
+% 2008, mkiv variant: Taco Hoekwater & Hans Hagen
+% 2020, lmtx variant: Hans Hagen (playground)
+
+\startMPcalculation{simplefun}
+
+ picture PunkShapes[][];
+
+ numeric PunkId ; PunkId := 0 ;
+ numeric PunkBase ; PunkBase := 0 ;
+ string PunkName ; PunkName := "punk" ;
+ numeric PunkUsed ; PunkUsed := 0 ;
+ numeric PunkSlant ; PunkSlant := 0 ;
+ numeric PunkWeight ; PunkWeight := 1 ;
+ numeric PunkSqueeze ; PunkSqueeze := 1 ;
+ numeric PunkExtend ; PunkExtend := 1 ;
+ numeric PunkVariants ; PunkVariants := 0 ;
+
+ numeric PunkRatio ; PunkRatio := 2/3 ;
+ numeric PunkScale ; PunkScale := 20 ; % when zero we use the knuth values
+ numeric PunkN ; PunkN := 0 ;
+
+ def beginpunkchar(expr c, n, hor, ver) =
+ begingroup ;
+ save uc, w, h, d, hdev, vdev ;
+ hdev := hor * dev ; % modify horizontal amounts of deviation
+ vdev := ver * dev ; % modify vertical amounts of deviation
+ uc := if string c : utfnum(c) else : c fi ;
+ h := if PunkScale > 0 : PunkN else : n fi / PunkSqueeze ;
+ w := n * PunkExtend ;
+ d := 0 ;
+ clearxy ;
+ clearit ;
+ enddef ;
+
+ def endpunkchar =
+ if PunkSlant <> 0 :
+ currentpicture := currentpicture slanted PunkSlant ;
+ fi ;
+ save llx, lly, uly ;
+ llx := xpart llcorner currentpicture ;
+ lly := ypart llcorner currentpicture ;
+ uly := ypart ulcorner currentpicture ;
+
+ currentpicture := currentpicture shifted (- llx + 1, 0);
+ w := bbwidth(currentpicture) + 2 ;
+ h := uly ;
+ d := if lly < 0 : - lly else : 0 fi ;
+
+ PunkUsed := if PunkBase > 0 : PunkBase else : uc fi;
+ PunkShapes[PunkId][PunkUsed] := currentpicture ;
+ lmt_registerglyph [
+ category = PunkName,
+ unicode = PunkUsed,
+ tounicode = uc,
+ width = w,
+ height = h,
+ depth = d,
+ code = "draw PunkShapes[" & decimal PunkId & "][" & decimal PunkUsed & "]",
+ ] ;
+ if PunkBase > 0 :
+ PunkBase := PunkBase + 1 ;
+ fi ;
+ endgroup ;
+ enddef ;
+
+ def initialize_punk_upper =
+ PunkN := PunkScale ;
+ dev := 1 ;
+ enddef ;
+
+ def initialize_punk_lower =
+ PunkN := PunkScale * PunkRatio ;
+ dev := .5 ;
+ enddef ;
+
+ def revert_punk_lower =
+ PunkN := PunkScale ;
+ dev := 1 ;
+ enddef ;
+
+ def beginpunkfont =
+
+ begingroup ;
+
+ save dev;
+
+ save u ; u := 1 ;
+
+ PunkBase := 0 ;
+
+ pen linepen ; linepen := pencircle scaled (PunkWeight * u) ;
+ pen dotpen ; dotpen := linepen scaled 2 slanted -PunkSlant ;
+
+ pickup linepen ;
+
+ save pp ; vardef pp expr z =
+ z + (hdev * normaldeviate, vdev * normaldeviate)
+ enddef ;
+
+ save pd ; def pd expr z =
+ drawdot z withpen dotpen ;
+ enddef ;
+
+ PunkId := PunkId + 1 ;
+
+ lmt_registerglyphs [
+ name = PunkName, % todo: when we do name = name we get ['"name"'] = name
+ units = 25,
+ width = 25,
+ height = 25,
+ depth = 0,
+ usecolor = true,
+ ] ;
+
+ def endchar = endpunkchar enddef ;
+
+ enddef ;
+
+ def endpunkfont =
+ endgroup;
+ enddef ;
+
+ % We started out with immediate:
+
+ % def MakePunkFont (expr name, filename, slant, weight, squeeze, extend) =
+ % begingroup ;
+ % save PunkName, PunkFileName, PunkSlant, PunkWeight, PunkSqueeze, PunkExend, PunkVariants ;
+ % string PunkName, PunkFileName ;
+ % PunkFileName := filename ;
+ % PunkName := name ;
+ % PunkSlant := slant ;
+ % PunkWeight := weight ;
+ % PunkSqueeze := squeeze ;
+ % PunkExtend := extend ;
+ % PunkVariants := 0 ;
+ % beginpunkfont ;
+ % loadfile(PunkFileName) ;
+ % endpunkfont ;
+ % endgroup ;
+ % enddef ;
+ %
+ % MakePunkFont("punk", "punkfont-characters.mp", 1, 0 ) ;
+ % MakePunkFont("punkbold", "punkfont-characters.mp", 2, 0 ) ;
+ % MakePunkFont("punkslanted", "punkfont-characters.mp", 1, 0.15) ;
+ % MakePunkFont("punkboldslanted", "punkfont-characters.mp", 2, 0.15) ;
+
+ % And ended up with delayed:
+
+ def punkpreroll =
+ begingroup ;
+ save PunkName, PunkFileName, PunkSlant, PunkWeight, PunkSqueeze, PunkExtend, PunkVariants ;
+ string PunkName, PunkFileName ;
+ PunkName := getparameterdefault "mpsfont" "name" "punk" ;
+ PunkFileName := getparameterdefault "mpsfont" "filename" "punkfont-characters.mp" ;
+ PunkSlant := scantokens(getparameterdefault "mpsfont" "slant" "0") ;
+ PunkWeight := scantokens(getparameterdefault "mpsfont" "weight" "1") ;
+ PunkSqueeze := scantokens(getparameterdefault "mpsfont" "squeeze" "1") ;
+ PunkExtend := scantokens(getparameterdefault "mpsfont" "extend" "1") ;
+ PunkVariants := scantokens(getparameterdefault "mpsfont" "variants" "0");
+ beginpunkfont ;
+ loadfile(PunkFileName) ;
+ if PunkVariants > 0 :
+ PunkBase := 57344 ; % 0xE000 ; 0xF0000 ;
+ for i=1 upto PunkVariants :
+ loadfile(PunkFileName) ;
+ endfor ;
+ fi ;
+ endpunkfont ;
+ endgroup ;
+ enddef ;
+
+\stopMPcalculation
+
+% Are these names okay? If so it can go into the core.
+
+\permanent\protected\def\enablerandomvariants{\setcharactercasing[randomvariant]}
+\permanent\protected\def\randomvariants {\groupedcommand\enablerandomvariants\donothing}
+\permanent\protected\def\startrandomvariants {\begingroup\enablerandomvariants}
+\permanent\protected\def\stoprandomvariants {\endgroup}
+
+\definefontfeature [punk] [metapost={category=punk,preroll=punkpreroll}]
+\definefontfeature [punkrandom] [metapost={category=punk,preroll=punkpreroll,variants=10}]
+\definefontfeature [punkbold] [metapost={category=punk,preroll=punkpreroll,weight=2}]
+\definefontfeature [punkslanted] [metapost={category=punk,preroll=punkpreroll,slant=.15}]
+\definefontfeature [punkboldslanted] [metapost={category=punk,preroll=punkpreroll,slant=.15,weight=2}]
+\definefontfeature [punkveryslanted] [metapost={category=punk,preroll=punkpreroll,slant=-.15}]
+\definefontfeature [punksqueezed] [metapost={category=punk,preroll=punkpreroll,squeeze=.5}]
+\definefontfeature [punkextended] [metapost={category=punk,preroll=punkpreroll,extend=1.3}]
+
+\continueifinputfile{meta-imp-punk.mkxl}
+
+% immediate:
+%
+% \definefontfeature [punk] [metapost=punk]
+% \definefontfeature [punkbold] [metapost=punkbold]
+% \definefontfeature [punkslanted] [metapost=punkslanted]
+% \definefontfeature [punkboldslanted] [metapost=punkboldslanted]
+
+% delayed:
+
+% name=punk
+% filename=punkfont-characters.mp
+
+\setupbodyfont[dejavu]
+
+\definefont[PunkA][Serif*punk]
+\definefont[PunkB][Serif*punkbold]
+\definefont[PunkC][Serif*punkslanted]
+\definefont[PunkD][Serif*punkboldslanted]
+\definefont[PunkE][Serif*punkveryslanted]
+\definefont[PunkF][Serif*punkrandom]
+\definefont[PunkG][Serif*punksqueezed]
+\definefont[PunkH][Serif*punkextended]
+
+\starttext
+
+\startTEXpage[offset=10pt,width=30cm]
+ % \showglyphs
+ {\darkcyan \PunkA \samplefile{tufte} \par}
+ {\darkmagenta \PunkB \samplefile{tufte} \par}
+ {\darkred \PunkC \samplefile{tufte} \par}
+ {\darkgreen \PunkD \samplefile{tufte} \par}
+ {\darkblue \PunkE \samplefile{tufte} \par}
+ {\darkyellow \PunkF \enablerandomvariants \samplefile{tufte} \par}
+ {\darkgray \PunkG \samplefile{tufte} \par}
+ {\darkorange \PunkH \samplefile{tufte} \par}
+\stopTEXpage
+
+\startTEXpage[offset=10pt,width=20cm]
+ \PunkF \enablerandomvariants
+ \dostepwiserecurse{1}{2000}{1}{\glyphscale#1\relax f }
+\stopTEXpage
+
+% \setupbodyfont[dejavu] % one first needs to load a bodyfont !
+
+\setupbodyfont[punk]
+
+\startTEXpage[offset=10pt,width=20cm]
+ {\darkcyan \tf \samplefile{zapf} \par}
+ {\darkmagenta \bf \samplefile{zapf} \par}
+ {\darkred \sl \samplefile{zapf} \par}
+ {\darkgreen \bs \samplefile{zapf} \par}
+\stopTEXpage
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-symbols.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-symbols.mkxl
index f88fd6f8787..f88fd6f8787 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-symbols.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-symbols.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-threesix.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-threesix.mkxl
index 277aa85f717..56a400b45c0 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-imp-threesix.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-threesix.mkxl
@@ -1,10 +1,23 @@
-% not yet a module
+%D \module
+%D [ file=meta-imp-threesix,
+%D version=2019.00.00,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Don Knuths ThreeSix font,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The design of the font is if course by Don Knuth and can be found in facs9b.ps. I
+%D wish I was clever enough to understand all the good stuff in there.
\startluacode
- local gsub, utfbyte = string.gsub, utf.byte
-
- -- The font from DEK's facs9b.ps (I wish I was clever enough to understand all the good
- -- stuff in there):
+ local unpack = unpack
+ local concat = table.concat
+ local gsub, gmatch, utfbyte = string.gsub, string.gmatch, utf.byte
local font36 = {
["0"] = [[00111100 01111110 11000011 11000011 11000011 11000011 01111110 00111100]],
@@ -65,8 +78,9 @@
preamble = "InitializeThreeSix;",
}
for u, v in table.sortedhash(font36) do
+ local data = remap(v)
local ny = 8
- local nx = (#v - ny + 1) // ny
+ local nx = ((#v + 1) // ny) - 1
local height = ny * 1.1 - 0.1
local width = nx * 1.1 - 0.1
fonts.dropins.registerglyph {
@@ -74,93 +88,18 @@
unicode = utfbyte(u),
width = width,
height = height,
- code = f_code(remap(v)),
+ code = f_code(data),
}
end
end
-
MP.registerthreesix("fontthreesix")
\stopluacode
-% \startMPcalculation{simplefun}
-% def InitializeThreeSix =
-% save Y, N, L, S ; save dx, dy, nx, ny ;
-% save shape, fillcolor, mypen, random, currentpen, spread, hoffset ;
-% string shape, fillcolor, mypen ; boolean random ; pen currentpen ;
-% dx := 11/10 ;
-% dy := - 11/10 ;
-% nx := - dx ;
-% ny := 0 ;
-% shape := getparameterdefault "mpsfont" "shape" "circle" ;
-% random := hasoption "mpsfont" "random" "true" ;
-% fillcolor := getparameterdefault "mpsfont" "color" "" ;
-% mypen := getparameterdefault "mpsfont" "pen" "" ;
-% spread := getparameterdefault "mpsfont" "spread" 0 ;
-% hoffset := 12 * spread / 2 ;
-% currentpen := pencircle
-% if mypen = "fancy" :
-% xscaled 1/20 yscaled 2/20 rotated 45
-% else :
-% scaled 1/20
-% fi ;
-% if shape == "square" :
-% def S =
-% unitsquare if random : randomized 1/10 fi
-% shifted (nx,ny)
-% enddef ;
-% elseif shape = "diamond" :
-% def S =
-% unitdiamond if random : randomized 1/10 fi
-% shifted (nx,ny)
-% enddef ;
-% else :
-% def S =
-% unitcircle if random : randomizedcontrols 1/20 fi
-% shifted (nx,ny)
-% enddef ;
-% fi ;
-% def N =
-% nx := nx + dx ;
-% draw S ;
-% enddef ;
-% if fillcolor = "random" :
-% def Y =
-% nx := nx + dx ;
-% fillup S withcolor white randomized (2/3,2/3,2/3) ;
-% enddef ;
-% elseif fillcolor = "" :
-% def Y =
-% nx := nx + dx ;
-% fillup S ;
-% enddef ;
-% else :
-% def Y =
-% nx := nx + dx ;
-% fillup S withcolor fillcolor ;
-% enddef ;
-% fi ;
-% def L =
-% nx := - dx ;
-% ny := ny + dy ;
-% enddef ;
-% enddef ;
-%
-% vardef ThreeSix (text code) =
-% InitializeThreeSix ;
-% draw image (code) shifted (hoffset,-ny) ;
-% enddef ;
-% \stopMPcalculation
-
\startMPcalculation{simplefun}
def InitializeThreeSix =
save Y, N, L, S ;
- % save dx, dy, nx, ny ;
save shape, fillcolor, mypen, random, threesixpen, spread, hoffset ;
string shape, fillcolor, mypen ; boolean random ; pen threesixpen ;
- % dx := 11/10 ;
- % dy := - 11/10 ;
- % nx := - dx ;
- % ny := 0 ;
shape := getparameterdefault "mpsfont" "shape" "circle" ;
random := hasoption "mpsfont" "random" "true" ;
fillcolor := getparameterdefault "mpsfont" "color" "" ;
@@ -189,10 +128,17 @@
shifted (nx,ny)
enddef ;
fi ;
- def N =
- nx := nx + dx ;
- draw S ;
- enddef ;
+ if fillcolor = "" :
+ def N =
+ nx := nx + dx ;
+ draw S ;
+ enddef ;
+ else :
+ def N =
+ nx := nx + dx ;
+ draw S withcolor "lightgray" ;
+ enddef ;
+ fi ;
if fillcolor = "random" :
def Y =
nx := nx + dx ;
@@ -250,4 +196,51 @@
\definefont[DEKFontC][Serif*fontthreesix-initial]
\definefont[DEKFontD][Serif*fontthreesix-tweak]
-\endinput
+\continueifinputfile{meta-imp-threesix.mkxl}
+
+\starttext
+
+\definefontfeature % color, with some spread
+ [fontthreesix-color]
+ [default]
+ [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]
+
+% Or course:
+
+\startTEXpage
+ \DEKFontA TEX
+\stopTEXpage
+
+\startTEXpage
+ \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):
+
+% \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
+
+\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
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-imp-txt.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-txt.mkxl
new file mode 100644
index 00000000000..c7586264ec3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-imp-txt.mkxl
@@ -0,0 +1,277 @@
+%D \module
+%D [ file=meta-txt,
+%D version=2000.07.06,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Text Tricks,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D See comments in the \MKIV\ module. This is an upgraded version for \LMTX,
+%D where we can so some things nicer.
+
+\unprotect
+
+%D Text in shapes. Here we use the option to prune a parshape when a new paragraph
+%D is seen. It's an experimental feature so I need to keep an eye on how it evolves.
+%D This time we combine \TEX, \METAPOST\ and \LUA, so we do't need a temporary file
+%D to communicate from \METAPOST\ to \TEX. We just store information in \LUA\ tables.
+
+\ifdefined\startshapetext \else
+ \writestatus{system}{something is wrong here}
+\fi
+
+%D Following:
+
+% \doifundefined{RotFont}{\definefont[RotFont][RegularBold*default]}
+%
+% \unexpanded\def\getfollowtoken#1%
+% {\hbox\bgroup
+% \strut
+% \ctxlua{mp.follow_text(#1)}%
+% \egroup}
+
+\definefontfeature[mp:tp][liga=no]
+
+% if unknown RotPath : path RotPath ; RotPath := origin ; fi ;
+% if unknown TraceRot : boolean TraceRot ; TraceRot := false ; fi ;
+% if unknown ExtraRot : numeric ExtraRot ; ExtraRot := 0 ; fi ;
+% if al < len[n]:
+% RotPath := RotPath scaled ((len[n]+ExtraRot)/al) ;
+% al := arclength RotPath ;
+% fi ;
+% if TraceRot :
+% draw RotPath withpen pencircle scaled 1pt withcolor blue ;
+% fi ;
+% if TraceRot :
+% draw boundingbox currentpicture withpen pencircle scaled .25pt withcolor blue ;
+% fi ;
+
+\protected\def\dofollowtokens#1#2%
+ {\dontleavehmode
+ \vpack\bgroup
+ \forgetall
+ \dontcomplain
+ \addff{mp:tp}%
+ \startMPcode
+ \includeMPgraphic{followtokens}
+ draw lmt_followtext [ path = RotPath, text = "#2", spread = #1 ] ;
+ \stopMPcode
+ \egroup}
+
+\protected\def\followtokens {\dofollowtokens{true}}
+\protected\def\followtokenscentered{\dofollowtokens{false}}
+
+%D Fuzzy counters:
+
+\startuseMPgraphic{fuzzycount}
+ begingroup
+ save height, span, drift, d, cp ;
+ height := 3/ 5 * LineHeight ;
+ span := 1/ 3 * height ;
+ drift := 1/10 * height ;
+ pickup pencircle scaled (1/12 * height) ;
+ def d = (uniformdeviate drift) enddef ;
+ for i := 1 upto \MPvar{n} :
+ draw
+ if (i mod 5)=0 : ((-d - 4.5span,d) -- (d -0.5span,height - d))
+ else : ((-d, d) -- (d, height - d)) fi
+ shifted (span*i,d-drift) ;
+ endfor;
+ picture cp ; cp := currentpicture ; % for readability
+ setbounds currentpicture to
+ (llcorner cp shifted (0,-ypart llcorner cp) --
+ lrcorner cp shifted (0,-ypart lrcorner cp) --
+ urcorner cp --
+ ulcorner cp -- cycle) ;
+ endgroup ;
+\stopuseMPgraphic
+
+\setupMPvariables
+ [fuzzycount]
+ [n=10]
+
+\protected\def\fuzzycount#1%
+ {\dontleavehmode\bgroup
+ \tx
+ \useMPgraphic{fuzzycount}{n=#1}%
+ \egroup}
+
+\defineconversion[fuzzy][\fuzzycount]
+
+%D English rules:
+
+\setupMPvariables
+ [EnglishRule]
+ [height=1ex,
+ width=\localhsize,
+ color=darkgray]
+
+\defineblank
+ [EnglishRule]
+ [medium]
+
+\startuniqueMPgraphic{EnglishRule}{height,width,color}
+ x1 = 0 ; x3 = \MPvar{width} ; x2 = x4 = .5x3 ;
+ y1 = y3 = 0 ; y2 = -y4 = \MPvar{height} / 2 ;
+ fill z1 .. z2 .. z3 & z3 .. z4 .. z1 & cycle withcolor \MPvar{color} ;
+\stopuniqueMPgraphic
+
+\protected\def\EnglishRule
+ {\startlinecorrection[EnglishRule]%
+ \setlocalhsize
+ \noindentation
+ \reuseMPgraphic{EnglishRule}%
+ \stoplinecorrection}
+
+%D Tight text (for old times sake): the following macro returns a tight bound
+%D character sequence.
+%D
+%D \useMPlibrary[txt]
+%D
+%D \startlinecorrection
+%D \TightText{\ss\bf 123}{0cm}{3cm}{red}
+%D \stoplinecorrection
+
+\protected\def\TightText#1#2#3#4%
+ {\hpack
+ {\startMPcode
+ picture p ; p := image (graphictext "#1" withfillcolor red) ;
+ draw p xsized #2 ysized #3 withcolor \MPcolor{#4} ;
+ \stopMPcode}}
+
+\protected\def\TightText#1#2#3#4%
+ {\dontleavehmode
+ \startMPcode
+ draw outlinetext.f ("#1") (\iftok{#4}\emptytoks \else withcolor \MPcolor{#4} \fi)
+ \iftok{#2}\emptytoks \else xsized #2 \fi
+ \iftok{#3}\emptytoks \else ysized #3 \fi
+ ;
+ \stopMPcode}
+
+\protect
+
+\continueifinputfile{meta-imp-txt.mkxl}
+
+\setupbodyfont[pagella,10pt]
+
+% \useMPlibrary[txt]
+
+\starttext
+
+%D Shapes:
+
+\startuseMPgraphic{test 1}
+ path p ; p := fullcircle scaled 6cm ;
+
+ build_parshape(p,BodyFontSize/2,0,0,LineHeight,StrutHeight,StrutDepth,StrutHeight) ;
+
+ draw p withpen pencircle scaled 1pt ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{test 2}
+ path p ; p := fullsquare rotated 45 scaled 5cm ;
+
+ build_parshape(p,BodyFontSize/2,0,0,LineHeight,StrutHeight,StrutDepth,StrutHeight) ;
+
+ draw p withpen pencircle scaled 1pt ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{test 3}
+ numeric w, h ; w := h := 6cm ;
+ path p ; p := (.5w,h) -- (0,h) -- (0,0) -- (w,0) &
+ (w,0) .. (.75w,.5h) .. (w,h) & (w,h) -- cycle ;
+
+ build_parshape(p,BodyFontSize/2,0,0,LineHeight,StrutHeight,StrutDepth,StrutHeight) ;
+
+ draw p withpen pencircle scaled 1pt ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{test 4}
+ numeric w, h, o, d ;
+
+ def shape = (o,o) -- (w-o,o) & (w-o,o) .. (.75w-o,.5h) ..
+ (w-2o,h-o) & (w-2o,h-o) -- (o,h-o) -- cycle
+ enddef ;
+
+ d := BodyFontSize/2;
+
+ w := h := 6cm ; o := d ; path p ; p := shape ;
+ w := h := 6cm ; o := 0 ; path q ; q := shape ;
+
+ build_parshape(p,q,d,d,LineHeight,StrutHeight,StrutDepth,StrutHeight) ;
+
+ draw q withpen pencircle scaled 1pt ;
+\stopuseMPgraphic
+
+\defineoverlay[test 1][\useMPgraphic{test 1}]
+\defineoverlay[test 2][\useMPgraphic{test 2}]
+\defineoverlay[test 3][\useMPgraphic{test 3}]
+\defineoverlay[test 4][\useMPgraphic{test 4}]
+
+\startbuffer
+\startshapetext[test 1,test 2,test 3,test 4]
+ \setupalign[verytolerant,stretch,normal]%
+ \samplefile{douglas} % Douglas R. Hofstadter
+\stopshapetext
+\startTEXpage[offset=10pt]
+ \startcombination[2*2]
+ {\framed[offset=overlay,frame=off,background=test 1]{\getshapetext}} {test 1}
+ {\framed[offset=overlay,frame=off,background=test 2]{\getshapetext}} {test 2}
+ {\framed[offset=overlay,frame=off,background=test 3]{\getshapetext}} {test 3}
+ {\framed[offset=overlay,frame=off,background=test 4]{\getshapetext}} {test 4}
+ \stopcombination
+\stopTEXpage
+\stopbuffer
+
+\getbuffer
+
+\startMPextensions
+ boolean trace_parshape ; trace_parshape := true ;
+\stopMPextensions
+
+\getbuffer
+
+%D Fuzzycount (maybe handy):
+
+\startitemize[fuzzy,nostopper]
+ \startitem This is real fuzzy. \stopitem
+ \startitem But it can be even more fuzzier. \stopitem
+ \startitem And how about this. \stopitem
+\stopitemize
+
+\EnglishRule
+
+\startitemize[continue,broad]
+ \startitem This is real fuzzy. \stopitem
+ \startitem But it can be even more fuzzier. \stopitem
+ \startitem And how about this. \stopitem
+\stopitemize
+
+%D Tight text (manual stuff):
+
+\ruledhbox{\TightText{oeps wat doet dit}{10cm}{1cm}{red}} \blank
+\ruledhbox{\TightText{oeps wat doet dit}{10cm}{} {green}} \blank
+\ruledhbox{\TightText{oeps wat doet dit}{} {1cm}{blue}} \blank
+\ruledhbox{\TightText{oeps wat doet dit}{} {} {}} \blank
+
+%D Old fashioned:
+
+\startuseMPgraphic{followtokens}
+ path RotPath ; RotPath := reverse halfcircle xyscaled 3cm ;
+ draw RotPath ;
+\stopuseMPgraphic
+
+\startTEXpage
+ \followtokens{{\hskip1em}some text{\hskip1em}}
+\stopTEXpage
+
+\startTEXpage
+ \followtokenscentered{{\hskip1em}some text{\hskip1em}}
+\stopTEXpage
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/meta-ini.lmt
new file mode 100644
index 00000000000..ed7b2264f5d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-ini.lmt
@@ -0,0 +1,161 @@
+if not modules then modules = { } end modules ['meta-ini'] = {
+ version = 1.001,
+ comment = "companion to meta-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local tonumber = tonumber
+local format = string.format
+local concat = table.concat
+local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
+local P, Cs, R, S, C, Cc = lpeg.P, lpeg.Cs, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc
+
+metapost = metapost or { }
+local metapost = metapost
+local context = context
+
+local colorhash = attributes.list[attributes.private('color')]
+local textype = tex.type
+local MPcolor = context.MPcolor
+
+do
+
+ local dimenorname =
+ lpegpatterns.validdimen / function(s)
+ context("\\the\\dimexpr %s",s)
+ end
+ + (C(lpegpatterns.float) + Cc(1)) * lpegpatterns.space^0 * P("\\") * C(lpegpatterns.letter^1) / function(f,s)
+ local t = textype(s)
+ if t == "dimen" then
+ context("\\the\\dimexpr %s\\%s\\relax",f,s)
+ elseif t == "count" then
+ context("\\the\\numexpr \\%s * %s\\relax",s,f) -- <n>\scratchcounter is not permitted
+ end
+ end
+
+ local splitter = lpeg.splitat("::",true)
+
+ interfaces.implement {
+ name = "prepareMPvariable",
+ arguments = "string",
+ actions = function(v)
+ if v == "" then
+ -- MPcolor("black")
+ context("black")
+ else
+ local typ, var = lpegmatch(splitter,v)
+ if not var then
+ -- parse
+ if colorhash[v] then
+ -- MPcolor(v)
+ context("%q",var)
+ elseif tonumber(v) then
+ context(v)
+ elseif not lpegmatch(dimenorname,v) then
+ context("\\number %s",v) -- 0.4 ...
+ end
+ elseif typ == "d" then -- to be documented
+ -- dimension
+ context("\\the\\dimexpr %s\\relax",var)
+ elseif typ == "n" then -- to be documented
+ -- number
+ context("\\the\\numexpr %s\\relax",var)
+ elseif typ == "s" then -- to be documented
+ -- string
+ -- context(var)
+ context("%q",var)
+ elseif typ == "c" then -- to be documented
+ -- color
+ -- MPcolor(var)
+ context("%q",var)
+ else
+ context(var)
+ end
+ end
+ end
+ }
+
+end
+
+do
+
+ local ctx_mathematics = context.mathematics
+
+ -- function metapost.formatnumber(f,n) -- just lua format
+ -- f = gsub(f,"@(%d)","%%.%1")
+ -- f = gsub(f,"@","%%")
+ -- f = format(f,tonumber(n) or 0)
+ -- f = gsub(f,"e([%+%-%d]+)",function(s)
+ -- return format("\\times10^{%s}",tonumber(s) or s) -- strips leading zeros
+ -- end)
+ -- context.mathematics(f)
+ -- end
+
+ -- formatters["\\times10^{%N}"](s) -- strips leading zeros too
+
+ local one = Cs((P("@")/"%%." * (R("09")^1) + P("@")/"%%" + 1)^0)
+ local two = Cs((P("e")/"" * ((S("+-")^0 * R("09")^1) / function(s)
+ -- return format("\\times10^{%s}",tonumber(s) or s)
+ return "\\times10^{" .. (tonumber(s) or s) .."}"
+ end) + 1)^1)
+
+ -- local two = Cs((P("e")/"" * ((S("+-")^0 * R("09")^1) / formatters["\\times10^{%N}"]) + 1)^1)
+
+ function metapost.formatnumber(fmt,n) -- just lua format
+ ctx_mathematics(lpegmatch(two,format(lpegmatch(one,fmt),n)))
+ end
+
+end
+
+do
+
+ -- this is an old pass-data-to-tex mechanism
+
+ local ctx_printtable = context.printtable
+
+ local data = false
+
+ function mp.mf_start_saving_data(n)
+ data = { }
+ end
+
+ function mp.mf_stop_saving_data()
+ if data then
+ -- nothing
+ end
+ end
+
+ function mp.mf_finish_saving_data()
+ if data then
+ -- nothing
+ end
+ end
+
+ function mp.mf_save_data(str)
+ if data then
+ data[#data+1] = str
+ end
+ end
+
+ local function getdata()
+ if data then
+ ctx_printtable(data,"\r")
+ end
+ end
+
+ interfaces.implement {
+ name = "getMPdata",
+ public = true,
+ protected = true,
+ actions = getdata,
+ }
+
+ interfaces.implement {
+ name = "rawMPdata",
+ public = true,
+ actions = getdata,
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-ini.mkxl
index e08aa560a71..823d369f0af 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-ini.mkxl
@@ -11,6 +11,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D Some lmtx upgrading work needs to be done here.
+%D
+%D For real \METAFUN\ magic see \type {https://art-aleatoire.com/}.
+
% initializations:
%
% - pass settings from tex to mp (delayed expansion)
@@ -58,7 +62,7 @@
\writestatus{loading}{MetaPost Graphics / Initializations}
-\registerctxluafile{meta-ini}{}
+\registerctxluafile{meta-ini}{autosuffix}
\unprotect
@@ -68,9 +72,9 @@
\restoreendofline % see interferences-001.tex
\to \everyMPgraphic
-\def\MPruntimefile {mprun}
-\def\currentMPformat {metafun}
-\def\defaultMPinstance{metafun}
+\mutable \def\MPruntimefile {mprun}
+\mutable \def\currentMPformat {metafun}
+\immutable\def\defaultMPinstance{metafun}
\installcorenamespace{mpinstance}
\installcorenamespace{mpinclusions}
@@ -80,80 +84,70 @@
\installcorenamespace{mpclip}
\newtoks \t_meta_initializations % tex, each
-\def \t_meta_inclusions {\csname\??mpinclusions \currentMPinstance\endcsname} % token register
-\def \t_meta_definitions {\csname\??mpdefinitions\currentMPinstance\endcsname} % token register
+
+\permanent\def\t_meta_inclusions {\csname\??mpinclusions \currentMPinstance\endcsname} % token register
+\permanent\def\t_meta_definitions{\csname\??mpdefinitions\currentMPinstance\endcsname} % token register
%D The next command is, of course, dedicated to Mojca, who needs it for gnuplot.
%D Anyway, the whole multiple engine mechanism is to keep her gnuplot from
%D interfering.
-\unexpanded\def\startMPdefinitions
- {\dosinglegroupempty\meta_start_definitions}
-
-\def\meta_start_definitions#1#2\stopMPdefinitions
+\permanent\tolerant\protected\def\startMPdefinitions#=#:#2\stopMPdefinitions
{\let\m_meta_saved_instance\currentMPinstance
\edef\currentMPinstance{#1}%
- \ifx\currentMPinstance\empty
+ \ifempty\currentMPinstance
\let\currentMPinstance\defaultMPinstance
\fi
\gtoksapp\t_meta_definitions{#2}%
\let\currentMPinstance\m_meta_saved_instance}
-\let\stopMPdefinitions\relax
+\aliased\let\stopMPdefinitions\relax
-\unexpanded\def\startMPextensions
- {\dosinglegroupempty\meta_start_extensions}
-
-\def\meta_start_extensions#1#2\stopMPextensions % we could use buffers instead
+\permanent\tolerant\protected\def\startMPextensions#=#:#2\stopMPextensions % we could use buffers instead
{\clf_setmpextensions{#1}{#2}}
-\let\stopMPextensions\relax
+\aliased\let\stopMPextensions\relax
-\unexpanded\def\startMPinitializations#1\stopMPinitializations % for all instances, when enabled
+\permanent\protected\def\startMPinitializations#1\stopMPinitializations % for all instances, when enabled
{\gtoksapp\t_meta_initializations{#1}}
-\let\stopMPinitializations\relax
-
-\unexpanded\def\startMPinclusions
- {\dosingleempty\meta_start_inclusions}
-
-\unexpanded\def\meta_start_inclusions[#1]%
- {\edef\m_meta_option{#1}%
- \dosinglegroupempty\meta_start_inclusions_indeed}
+\aliased\let\stopMPinitializations\relax
-\def\meta_start_inclusions_indeed#1#2\stopMPinclusions
- {\let\m_meta_saved_instance\currentMPinstance
- \edef\currentMPinstance{#1}%
- \ifx\currentMPinstance\empty
+\permanent\tolerant\protected\def\startMPinclusions[#1]#*#=#:#3\stopMPinclusions
+ {\let\m_meta_saved_instance\currentMPinstance % \pushmacro
+ \edef\currentMPinstance{#2}%
+ \ifempty\currentMPinstance
\let\currentMPinstance\defaultMPinstance
\fi
- \ifx\m_meta_option\!!plustoken \else
+ \iftok{#1}{+}\else
\global\t_meta_inclusions\emptytoks
\fi
- \gtoksapp\t_meta_inclusions{#2}%
- \let\currentMPinstance\m_meta_saved_instance}
-
-\let\stopMPinclusions\relax
+ \gtoksapp\t_meta_inclusions{#3}%
+ \let\currentMPinstance\m_meta_saved_instance} % \popmacro
-\unexpanded\def\MPinclusions
- {\dosingleempty\meta_inclusions}
+\aliased\let\stopMPinclusions\relax
-\def\meta_inclusions[#1]%
- {\edef\m_meta_option{#1}%
- \dosinglegroupempty\meta_inclusions_indeed}
+% The next was broken since we added instances so it will go away!
-\def\meta_inclusions_indeed#1#2%
+\permanent\tolerant\protected\def\MPinclusions[#1]#:#*#=#:#*#=%
{\let\m_meta_saved_instance\currentMPinstance
- \edef\currentMPinstance{#1}%
- \ifx\currentMPinstance\empty
- \let\currentMPinstance\defaultMPinstance
- \fi
- \ifx\m_meta_option\!!plustoken \else
+ \iftok{#1}{+}\else
\global\t_meta_inclusions\emptytoks
\fi
- \gtoksapp\t_meta_inclusions{#2}%
+ \ifparameter#3\or
+ \edef\currentMPinstance{#2}%
+ \ifempty\currentMPinstance
+ \let\currentMPinstance\defaultMPinstance
+ \fi
+ \gtoksapp\t_meta_inclusions{#3}%
+ \else
+ \let\currentMPinstance\defaultMPinstance
+ \gtoksapp\t_meta_inclusions{#2}%
+ \fi
\let\currentMPinstance\m_meta_saved_instance}
+% so far
+
\installcommandhandler \??mpinstance {MPinstance} \??mpinstance
\setupMPinstance
@@ -175,7 +169,7 @@
\t_meta_inclusions \emptytoks % in case we redefine
\to \everydefineMPinstance
-\unexpanded\def\resetMPinstance[#1]%
+\permanent\protected\def\resetMPinstance[#1]%
{\writestatus\m!metapost{reset will be implemented when needed}}
\def\meta_analyze_graphicname[#1]%
@@ -192,9 +186,9 @@
{\let\meta_show_properties\meta_show_properties_indeed}
{\let\meta_show_properties\donothing}
-\unexpanded\def\meta_analyze_graphicname_indeed[#1::#2::#3]% instance ::
+\protected\def\meta_analyze_graphicname_indeed[#1::#2::#3]% instance ::
{\edef\currentMPgraphicname{#2}%
- \ifx\currentMPgraphicname\empty
+ \ifempty\currentMPgraphicname
\edef\currentMPgraphicname{#1}%
\let\currentMPinstance\defaultMPinstance
\orelse\ifcsname\??mpdefinitions#1\endcsname
@@ -205,9 +199,9 @@
\edef\currentMPformat{\MPinstanceparameter\s!format}%
\meta_show_properties}
-\def\currentMPgraphicname{\s!unknown}
-\def\currentMPinstance {\defaultMPinstance}
-\def\currentMPformat {\currentMPinstance}
+\mutable\def\currentMPgraphicname{\s!unknown}
+\mutable\def\currentMPinstance {\defaultMPinstance}
+\mutable\def\currentMPformat {\currentMPinstance}
\defineMPinstance[metafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes]
\defineMPinstance[minifun] [\s!format=minifun,\s!extensions=\v!yes,\s!initializations=\v!yes]
@@ -238,7 +232,7 @@
\def\meta_end_graphic_group
{\endgroup}
-\def\MPaskedfigure{false}
+\mutable\def\MPaskedfigure{false}
\def\meta_flush_current_initializations
{\ifconditional\c_meta_include_initializations
@@ -262,7 +256,7 @@
\setfalse\c_meta_include_initializations
\fi
\edef\p_setups{\MPinstanceparameter\c!setups}%
- \ifx\p_setups\empty \else
+ \ifempty\p_setups \else
\setups[\p_setups]%
\fi
\useMPinstancestyleparameter\c!textstyle}
@@ -287,15 +281,15 @@
\meta_relocate_graphic
\popMPboundingbox}
-\unexpanded\def\meta_process_graphic_instance#1%
+\protected\def\meta_process_graphic_instance#1%
{\edef\currentMPinstance{#1}%
- \ifx\currentMPinstance\empty
+ \ifempty\currentMPinstance
\let\currentMPinstance\defaultMPinstance
\fi
\edef\currentMPformat{\MPinstanceparameter\s!format}%
\meta_process_graphic}
-\unexpanded\def\meta_process_graphic#1% todo: extensions and inclusions outside beginfig
+\protected\def\meta_process_graphic#1% todo: extensions and inclusions outside beginfig
{\meta_start_current_graphic
\forgetall
\edef\p_extensions{\MPinstanceparameter\s!extensions}%
@@ -320,7 +314,10 @@
\let\meta_process_graphic_figure_start\relax
\let\meta_process_graphic_figure_stop \relax
-\unexpanded\def\processMPfigurefile#1% special case: obeys beginfig .. endfig and makes pages
+\let\normal_meta_process_graphic_start\relax
+\let\normal_meta_process_graphic_stop \relax
+
+\permanent\protected\def\processMPfigurefile#1% special case: obeys beginfig .. endfig and makes pages
{\begingroup
\let\normal_meta_process_graphic_start\meta_process_graphic_start
\let\normal_meta_process_graphic_stop \meta_process_graphic_stop
@@ -339,7 +336,7 @@
% \csname\??mpgraphic#1\endcsname ; % ; is safeguard
% \fi}
%
-% \unexpanded\def\meta_enable_include % public
+% \protected\def\meta_enable_include % public
% {\let\meta_handle_use_graphic \thirdofthreearguments
% \let\meta_handle_reusable_graphic\thirdofthreearguments}
%
@@ -354,7 +351,7 @@
% so we cannot overload unless we let back to the original meanings each graphic
% ... a better solution is:
-\def\includeMPgraphic#1% gets expanded !
+\permanent\def\includeMPgraphic#1% gets expanded !
{\ifcsname\??mpgraphic#1\endcsname
\doubleexpandafter\fourthoffourarguments\lastnamedcs ; % ; is safeguard
\fi}
@@ -365,58 +362,64 @@
\newif\ifMPdrawingdone \MPdrawingdonefalse
-\unexpanded\def\finalizeMPdrawing
+\permanent\protected\def\finalizeMPdrawing
{\MPdrawingdonetrue}
-\let\MPdrawingdata\empty
+\mutable\let\MPdrawingdata\empty
-\unexpanded\def\resetMPdrawing
+\permanent\protected\def\resetMPdrawing
{\glet\MPdrawingdata\empty
\global\MPdrawingdonefalse}
-\unexpanded\def\pushMPdrawing
+\permanent\protected\def\pushMPdrawing
{\globalpushmacro\MPdrawingdata
\glet\MPdrawingdata\empty}
-\unexpanded\def\popMPdrawing
+\permanent\protected\def\popMPdrawing
{\globalpopmacro\MPdrawingdata}
-\unexpanded\def\getMPdrawing
+\permanent\protected\def\getMPdrawing
{\ifMPdrawingdone
\expandafter\meta_process_graphic\expandafter{\MPdrawingdata}% is this expansion still needed?
\fi}
-\def\startMPdrawing
- {\dosingleempty\meta_start_drawing}
+\permanent\tolerant\def\startMPdrawing[#1]% todo: use pickup #:
+ {\meta_start_drawing{#1}}
-\def\meta_start_drawing[#1]#2\stopMPdrawing % to be redone, this ascii stuff
+\def\meta_start_drawing#1#2\stopMPdrawing
{\relax
\bgroup
\meta_enable_include
- \doifelse{#1}{-}{\convertargument#2\to\asciia}{\def\asciia{#2}}%
- \xdef\MPdrawingdata{\MPdrawingdata\asciia}%
+ \doifelse{#1}{-}
+ {\xdef\MPdrawingdata{\MPdrawingdata\detokenize{#2}}}%
+ {\xdef\MPdrawingdata{\MPdrawingdata#2}}%
\egroup}
-\let\stopMPdrawing\relax
+\aliased\let\stopMPdrawing\relax
-\def\MPdrawing#1%
+\permanent\def\MPdrawing#1%
{\relax
\bgroup
\meta_enable_include
\xdef\MPdrawingdata{\MPdrawingdata#1}%
\egroup}
-\unexpanded\def\startMPclip#1#2\stopMPclip % todo: store at the lua end or just store less
- {\setgvalue{\??mpclip#1}{#2}}
+\permanent\protected\def\startMPclip#1#2\stopMPclip % todo: store at the lua end or just store less
+ {\gdefcsname\??mpclip#1\endcsname{#2}}
+
+\aliased\let\stopMPclip\relax
+
+\mutable\def\width {0 } % left-over
+\mutable\def\height{0 } % left-over
-\let\stopMPclip\relax
+\mutable\let\currentMPclip\empty
-\unexpanded\def\meta_grab_clip_path#1#2#3%
+\protected\def\meta_grab_clip_path#1#2#3%
{\begingroup
\d_overlay_width #2\relax
\d_overlay_height#3\relax
- \edef\width {\the\d_overlay_width \space}%
- \edef\height{\the\d_overlay_height\space}%
+ \edef\width {\the\d_overlay_width \space}% hm
+ \edef\height{\the\d_overlay_height\space}% hm
\edef\currentMPclip{#1}%
\ifcsname\??mpclip\currentMPclip\endcsname
\meta_grab_clip_path_yes
@@ -449,7 +452,7 @@
%D Since we want labels to follow the document settings, we also set the font
%D related variables.
-\unexpanded\def\MPfontsizehskip#1%
+\permanent\protected\def\MPfontsizehskip#1%
{\dontleavehmode
\begingroup
\definedfont[#1]%
@@ -492,63 +495,56 @@
\newbox\b_meta_variable_box
-\let \currentmpvariableclass \empty
+\mutable\let \currentmpvariableclass \empty % public
+
\let \m_meta_current_variable \empty
\let \m_meta_current_variable_template\empty
-\installcorenamespace{graphicvariable}
+% \installcorenamespace{graphicvariable} % already set
\def\meta_prepare_variable_default{\MPcolor{black}} % just to be sure we use a color but ...
-\unexpanded\def\setupMPvariables
- {\dodoubleempty\meta_setup_variables}
-
-\def\meta_setup_variables[#1][#2]%
- {\ifsecondargument
- \getrawparameters[\??graphicvariable#1:][#2]%
- \else
+\permanent\tolerant\protected\def\setupMPvariables[#1]#*[#2]%
+ {\ifarguments
+ \or
\getrawparameters[\??graphicvariable:][#1]%
+ \else
+ \getrawparameters[\??graphicvariable#1:][#2]%
\fi}
-\unexpanded\def\presetMPvariable
- {\dodoubleargument\meta_preset_variable}
-
-\def\meta_preset_variable[#1][#2=#3]%
+\permanent\tolerant\protected\def\presetMPvariable[#1]#*[#2=#3]%
{\ifcsname\??graphicvariable#1:#2\endcsname \else
- \setvalue{\??graphicvariable#1:#2}{#3}%
+ \defcsname\??graphicvariable#1:#2\endcsname{#3}%
\fi}
-\def\MPrawvar#1#2% no checking
+\permanent\def\MPrawvar#1#2% no checking
{\begincsname\??graphicvariable#1:#2\endcsname}
-\def\MPvariable#1% todo: could be a framed chain
+\permanent\def\MPvariable#1% todo: could be a framed chain
{\begincsname\??graphicvariable\currentmpvariableclass:#1\endcsname}
-\unexpanded\def\useMPvariables
- {\dodoubleargument\meta_use_variables}
-
-\def\meta_use_variables[#1][#2]%
+\permanent\tolerant\protected\def\useMPvariables[#1]#*[#2]%
{\edef\currentmpvariableclass{#1}%
\meta_prepare_variables{#2}}
-\unexpanded\def\meta_prepare_variables#1%
+\protected\def\meta_prepare_variables#1%
{\processcommalist[#1]\meta_prepare_variable}
-\unexpanded\def\meta_prepare_variable#1%
+\protected\def\meta_prepare_variable#1%
{\edef\m_meta_current_variable_template
{\??graphicvariable\currentmpvariableclass:#1}%
\edef\m_meta_current_variable
{\begincsname\m_meta_current_variable_template\endcsname}%
- \ifx\m_meta_current_variable\empty
+ \ifempty\m_meta_current_variable
\expandafter\meta_prepare_variable_nop
\else
\expandafter\meta_prepare_variable_yes
\fi}
-\unexpanded\def\meta_prepare_instance_variables
+\protected\def\meta_prepare_instance_variables
{\expandafter\processcommalist\expandafter[\m_meta_instance_variables]\meta_prepare_instance_variable}
-\unexpanded\def\meta_prepare_instance_variable#1%
+\protected\def\meta_prepare_instance_variable#1%
{\edef\m_meta_current_variable_template
{\??graphicvariable\currentmpvariableclass:#1}%
\edef\m_meta_current_variable
@@ -557,37 +553,37 @@
\else
\begincsname\??graphicvariable\currentMPgraphicname:#1\endcsname
\fi}%
- \ifx\m_meta_current_variable\empty
+ \ifempty\m_meta_current_variable
\expandafter\meta_prepare_variable_nop
\else
\expandafter\meta_prepare_variable_yes
\fi}
\def\meta_prepare_variable_nop
- {\expandafter \let\csname\m_meta_current_variable_template\endcsname\meta_prepare_variable_default}
+ {\expandafter\letcsname\m_meta_current_variable_template\endcsname\meta_prepare_variable_default}
\def\meta_prepare_variable_color % we use the attribute so we dont' go through namedcolor (why not)
- {\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\MPcolor\m_meta_current_variable}}
+ {\expandafter\edefcsname\m_meta_current_variable_template\endcsname{\MPcolor\m_meta_current_variable}}
\def\meta_prepare_variable_number
- {\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\number\m_meta_current_variable}}% also accepts 0.number
+ {\expandafter\edefcsname\m_meta_current_variable_template\endcsname{\number\m_meta_current_variable}}% also accepts 0.number
\def\meta_prepare_variable_dimension
- {\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\the\dimexpr\m_meta_current_variable}}
+ {\expandafter\edefcsname\m_meta_current_variable_template\endcsname{\the\dimexpr\m_meta_current_variable}}
\def\meta_prepare_variable_yes
{\ifchkdim\m_meta_current_variable\or
\meta_prepare_variable_dimension
- \else\ifchknum\m_meta_current_variable\or
+ \orelse\ifchknum\m_meta_current_variable\or
\meta_prepare_variable_number
\else
\doifelsecolor\m_meta_current_variable
\meta_prepare_variable_color
\meta_prepare_variable_dimension
- \fi\fi}
+ \fi}
-\let\MPvar \MPvariable
-\let\setMPvariables\setupMPvariables
+\aliased\let\MPvar \MPvariable
+\aliased\let\setMPvariables\setupMPvariables
%D \macros
%D {startuniqueMPgraphic, uniqueMPgraphic}
@@ -608,7 +604,9 @@
%D \stopuniqueMPgraphic
%D \stoptyping
-\def\overlaystamp % watch the \MPcolor, since colors can be redefined
+% todo: frozen or not?
+
+\permanent\def\overlaystamp % watch the \MPcolor, since colors can be redefined
{\the\d_overlay_width :%
\the\d_overlay_height :%
\the\d_overlay_depth :%
@@ -638,39 +636,39 @@
% hm, isn't this already done elsewhere?
-\unexpanded\def\meta_obey_box_depth
+\protected\def\meta_obey_box_depth
{\setbox\b_meta_graphic\hpack\bgroup
\raise\MPlly\box\b_meta_graphic
\egroup}
-\unexpanded\def\meta_ignore_box_depth
+\protected\def\meta_ignore_box_depth
{\normalexpanded
- {\meta_obey_box_depth % hence the \unexpanded
+ {\meta_obey_box_depth % hence the \protected
\wd\b_meta_graphic\the\wd\b_meta_graphic
\ht\b_meta_graphic\the\ht\b_meta_graphic
\dp\b_meta_graphic\the\dp\b_meta_graphic}}
-\unexpanded\def\meta_obey_box_origin
+\protected\def\meta_obey_box_origin
{\setbox\b_meta_graphic\hpack\bgroup
\kern\MPllx\raise\MPlly\box\b_meta_graphic
\egroup}
-\unexpanded\def\obeyMPboxdepth {\let\meta_relocate_box\meta_obey_box_depth}
-\unexpanded\def\ignoreMPboxdepth{\let\meta_relocate_box\meta_ignore_box_depth}
-\unexpanded\def\obeyMPboxorigin {\let\meta_relocate_box\meta_obey_box_origin}
-\unexpanded\def\normalMPboxdepth{\let\meta_relocate_box\relax}
+\permanent\protected\def\obeyMPboxdepth {\let\meta_relocate_box\meta_obey_box_depth}
+\permanent\protected\def\ignoreMPboxdepth{\let\meta_relocate_box\meta_ignore_box_depth}
+\permanent\protected\def\obeyMPboxorigin {\let\meta_relocate_box\meta_obey_box_origin}
+\permanent\protected\def\normalMPboxdepth{\let\meta_relocate_box\relax}
\let\meta_relocate_box\relax
-\unexpanded\def\meta_place_graphic % the converter also displaces so in fact we revert
+\protected\def\meta_place_graphic % the converter also displaces so in fact we revert
{\meta_relocate_box
\box\b_meta_graphic}
-\unexpanded\def\meta_reuse_box#1#2#3#4#5% space delimiting would save some tokens
+\protected\def\meta_reuse_box#1#2#3#4#5% space delimiting would save some tokens
{\MPllx#2\MPlly#3\MPurx#4\MPury#5%
- \hpack{\forcecolorhack\getobject{MP}{#1}}} % else no proper color intent
+ \hpack container{\forcecolorhack\getobject{MP}{#1}}} % else no proper color intent
-\unexpanded\def\meta_use_box
+\protected\def\meta_use_box
{\setunreferencedobject{MP}}
\def\meta_handle_unique_graphic#1#2#3% when there are too many, we can store data at the lua end, although,
@@ -683,26 +681,25 @@
\meta_enable_include % redundant
\global\advance\c_meta_object_counter\plusone
\meta_use_box{\number\c_meta_object_counter}\hpack{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
- \setxvalue{\??mpgraphic\overlaystamp:#1}{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
+ \xdefcsname\??mpgraphic\overlaystamp:#1\endcsname{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
\csname\??mpgraphic\overlaystamp:#1\endcsname\empty
\fi
\endgroup}
-\unexpanded\def\startuniqueMPgraphic
+% todo: we partially expand
+
+\permanent\protected\def\startuniqueMPgraphic
{\dodoublegroupempty\meta_start_unique_graphic}
-\let\stopuniqueMPgraphic\relax
+\aliased\let\stopuniqueMPgraphic\relax
\def\meta_start_unique_graphic#1%
{\normalexpanded{\meta_start_unique_graphic_indeed{#1}}}
-\unexpanded\def\meta_start_unique_graphic_indeed#1#2#3\stopuniqueMPgraphic
- {\setgvalue{\??mpgraphic#1}{\meta_handle_unique_graphic{#1}{#2}{#3}}}
-
-\unexpanded\def\uniqueMPgraphic
- {\dodoublegroupempty\meta_unique_graphic}
+\permanent\protected\def\meta_start_unique_graphic_indeed#1#2#3\stopuniqueMPgraphic
+ {\gdefcsname\??mpgraphic#1\endcsname{\meta_handle_unique_graphic{#1}{#2}{#3}}}
-\def\meta_unique_graphic#1#2%
+\permanent\tolerant\protected\def\uniqueMPgraphic#=#*#=%
{\meta_begin_graphic_group{#1}%
\setupMPvariables[#1][#2]%
\begincsname\??mpgraphic#1\endcsname\empty
@@ -712,64 +709,63 @@
{\begingroup
\edef\currentmpvariableclass{#1}%
\edef\m_meta_instance_variables{#2}%
- \ifx\m_meta_instance_variables\empty \else
+ \ifempty\m_meta_instance_variables \else
\meta_prepare_instance_variables
\fi
\meta_enable_include % redundant
\meta_process_graphic{#3}%
\endgroup}
-\unexpanded\def\startuseMPgraphic
+\permanent\protected\def\startuseMPgraphic % todo, modernize
{\dodoublegroupempty\meta_start_use_graphic}
-\let\stopuseMPgraphic\relax
+\aliased\let\stopuseMPgraphic\relax
\def\meta_start_use_graphic#1%
{\normalexpanded{\meta_start_use_graphic_indeed{#1}}}
-\unexpanded\def\meta_start_use_graphic_indeed#1#2#3\stopuseMPgraphic
- {\setgvalue{\??mpgraphic#1}{\meta_handle_use_graphic{#1}{#2}{#3}}}
+\protected\def\meta_start_use_graphic_indeed#1#2#3\stopuseMPgraphic
+ {\gdefcsname\??mpgraphic#1\endcsname{\meta_handle_use_graphic{#1}{#2}{#3}}}
-\unexpanded\def\startusableMPgraphic % redundant but handy
+\permanent\protected\def\startusableMPgraphic % redundant but handy % todo, modernize
{\dodoublegroupempty\meta_start_usable_graphic}
-\let\stopusableMPgraphic\relax
+\aliased\let\stopusableMPgraphic\relax
\def\meta_start_usable_graphic#1%
{\normalexpanded{\meta_start_usable_graphic_indeed{#1}}}
-\unexpanded\def\meta_start_usable_graphic_indeed#1#2#3\stopusableMPgraphic
- {\setgvalue{\??mpgraphic#1}{\meta_handle_use_graphic{#1}{#2}{#3}}}
+\protected\def\meta_start_usable_graphic_indeed#1#2#3\stopusableMPgraphic
+ {\gdefcsname\??mpgraphic#1\endcsname{\meta_handle_use_graphic{#1}{#2}{#3}}}
\def\meta_handle_reusable_graphic#1#2#3%
{\begingroup
\edef\currentmpvariableclass{#1}%
\edef\m_meta_instance_variables{#2}%
- \ifx\m_meta_instance_variables\empty \else
+ \ifempty\m_meta_instance_variables \else
\meta_prepare_instance_variables
\fi
\meta_enable_include % redundant
\global\advance\c_meta_object_counter\plusone
\meta_use_box{\number\c_meta_object_counter}\hpack{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
- \setxvalue{\??mpgraphic#1}{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
+ \xdefcsname\??mpgraphic#1\endcsname{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}%
\csname\??mpgraphic#1\endcsname\empty
\endgroup}
-\unexpanded\def\startreusableMPgraphic
+\permanent\protected\def\startreusableMPgraphic % todo, modernize
{\dodoublegroupempty\meta_start_reusable_graphic}
-\let\stopreusableMPgraphic\relax
+\aliased\let\stopreusableMPgraphic\relax
\def\meta_start_reusable_graphic#1%
{\normalexpanded{\meta_start_reusable_graphic_indeed{#1}}}
-\unexpanded\def\meta_start_reusable_graphic_indeed#1#2#3\stopreusableMPgraphic
- {\setgvalue{\??mpgraphic#1}{\meta_handle_reusable_graphic{#1}{#2}{#3}}}
+\protected\def\meta_start_reusable_graphic_indeed#1#2#3\stopreusableMPgraphic
+ {\gdefcsname\??mpgraphic#1\endcsname{\meta_handle_reusable_graphic{#1}{#2}{#3}}}
-\unexpanded\def\useMPgraphic
- {\dodoublegroupempty\meta_use_graphic}
+\mutable\let\usedMPgraphicname\empty
-\def\meta_use_graphic#1#2%
+\permanent\tolerant\protected\def\useMPgraphic#=#*#=%
{\meta_begin_graphic_group{#1}%
\ifcsname\??mpgraphic#1\endcsname
\edef\usedMPgraphicname{#1}%
@@ -778,7 +774,7 @@
\else
\let\usedMPgraphicname\empty
\fi
- \ifx\usedMPgraphicname\empty
+ \ifempty\usedMPgraphicname
% message
\else
\doifsomething{#2}{\setupMPvariables[\usedMPgraphicname][#2]}%
@@ -786,8 +782,8 @@
\fi
\meta_end_graphic_group}
-\let\reuseMPgraphic \useMPgraphic % we can save a setup here if needed
-\let\reusableMPgraphic\reuseMPgraphic % we can save a setup here if needed
+\aliased\let\reuseMPgraphic \useMPgraphic % we can save a setup here if needed
+\aliased\let\reusableMPgraphic\reuseMPgraphic % we can save a setup here if needed
%D \macros
%D {startuniqueMPpagegraphic,uniqueMPpagegraphic}
@@ -796,7 +792,7 @@
\def\m_meta_page_prefix{\doifelseoddpage oe}
-\def\overlaypagestamp
+\permanent\def\overlaypagestamp
{\m_meta_page_prefix :%
\the\d_overlay_width :%
\the\d_overlay_height :%
@@ -806,24 +802,21 @@
\MPcolor\overlaycolor :%
\MPcolor\overlaylinecolor}
-\unexpanded\def\startuniqueMPpagegraphic
+\permanent\tolerant\protected\def\startuniqueMPpagegraphic % todo the modern way
{\dodoublegroupempty\meta_start_unique_page_graphic}
-\let\stopuniqueMPpagegraphic\relax
+\aliased\let\stopuniqueMPpagegraphic\relax
\def\meta_start_unique_page_graphic#1%
{\normalexpanded{\meta_start_unique_page_graphic_indeed{#1}}}
-\unexpanded\def\meta_start_unique_page_graphic_indeed#1#2#3\stopuniqueMPpagegraphic % inefficient, double storage
- {\setgvalue{\??mpgraphic o:#1}{\meta_handle_unique_graphic{o:#1}{#2}{#3}}% % but these also keep the state
- \setgvalue{\??mpgraphic e:#1}{\meta_handle_unique_graphic{e:#1}{#2}{#3}}} % and meaning will be redefined
-
-\unexpanded\def\uniqueMPpagegraphic
- {\dodoublegroupempty\meta_unique_page_graphic}
+\protected\def\meta_start_unique_page_graphic_indeed#1#2#3\stopuniqueMPpagegraphic % inefficient, double storage
+ {\gdefcsname\??mpgraphic o:#1\endcsname{\meta_handle_unique_graphic{o:#1}{#2}{#3}}% % but these also keep the state
+ \gdefcsname\??mpgraphic e:#1\endcsname{\meta_handle_unique_graphic{e:#1}{#2}{#3}}} % and meaning will be redefined
-\def\meta_unique_page_graphic#1#2%
+\permanent\tolerant\protected\def\uniqueMPpagegraphic#=#=%
{\meta_begin_graphic_group{#1}%
- \let\overlaystamp\overlaypagestamp
+ \enforced\let\overlaystamp\overlaypagestamp
\setupMPvariables[\m_meta_page_prefix:#1][#2]% prefix is new here
\csname\??mpgraphic\m_meta_page_prefix:#1\endcsname\empty
\meta_end_graphic_group}
@@ -840,37 +833,28 @@
%D Since we need to feed \METAPOST\ with expanded dimensions, we introduce a
%D dedicated expansion engine. We redefine \type {\extendMPoverlaystamp} to
-\unexpanded\def\extendMPoverlaystamp#1%
+\permanent\protected\def\extendMPoverlaystamp#1%
{\processcommalist[#1]\meta_extend_overlay_stamp}
\def\meta_extend_overlay_stamp#1%
{\meta_prepare_instance_variable{#1}%
- \edef\overlaystamp{\overlaystamp:\MPvariable{#1}}}
+ \enforced\permanent\edef\overlaystamp{\overlaystamp:\MPvariable{#1}}}
-\unexpanded\def\getMPdata {\clf_getMPdata}
- \let\rawMPdata \clf_getMPdata
-
-\unexpanded\def\getMPstored{\clf_getMPstored}
- \let\rawMPstored \clf_getMPstored
+% \getMPdata % define at the lua end
+% \rawMPdata % define at the lua end
%D We need this trick because we need to make sure that the tex scanner sees
%D newlines and does not quit. Also, we do need to flush the buffer under a normal
%D catcode regime in order to expand embedded tex macros. As usual with buffers,
%D \type {#1} can be a list.
-\unexpanded\def\processMPbuffer
- {\dosingleempty\meta_process_buffer}
-
-\def\meta_process_buffer[#1]%
+\permanent\tolerant\protected\def\processMPbuffer[#1]%
{\meta_begin_graphic_group{#1}%
\meta_process_graphic{\clf_feedback{\currentMPgraphicname}}%
\meta_end_graphic_group}
-\unexpanded\def\runMPbuffer
- {\dosingleempty\meta_run_buffer}
-
-\def\meta_run_buffer[#1]% processing only
- {\startnointerference\meta_process_buffer[#1]\stopnointerference}
+\permanent\tolerant\protected\def\runMPbuffer[#1]%
+ {\startnointerference\processMPbuffer[#1]\stopnointerference}
%D \macros
%D {startMPenvironment, resetMPenvironment}
@@ -878,12 +862,12 @@
%D In order to synchronize the main \TEX\ run and the runs local to \METAPOST,
%D environments can be passed.
-\unexpanded\def\startMPenvironment
+\permanent\protected\def\startMPenvironment
{\begingroup
- \catcode\endoflineasciicode \ignorecatcode
- \dosingleempty\meta_start_environment}
+ \catcode\endoflineasciicode\ignorecatcode
+ \meta_start_environment}
-\def\meta_start_environment[#1]#2\stopMPenvironment
+\tolerant\def\meta_start_environment[#1]#:#2\stopMPenvironment
{\endgroup
\edef\m_meta_option{#1}
\ifx\m_meta_option\s!reset
@@ -895,12 +879,12 @@
\fi
\clf_mptexset{\detokenize{#2}}}
-\let\stopMPenvironment\relax
+\aliased\let\stopMPenvironment\relax
-\unexpanded\def\resetMPenvironment
+\permanent\protected\def\resetMPenvironment
{\clf_mptexreset}
-\unexpanded\def\useMPenvironmentbuffer[#1]%
+\permanent\protected\def\useMPenvironmentbuffer[#1]%
{\clf_mptexsetfrombuffer{#1}}
%D This command takes \type {[reset]} as optional argument.
@@ -917,56 +901,35 @@
%D
%D The most simple case:
-\unexpanded\def\startMPcode
- {\dosinglegroupempty\meta_start_code}
-
-\let\stopMPcode\relax
-
-\def\meta_start_code
- {\iffirstargument
- \expandafter\meta_start_code_instance
- \else
- \expandafter\meta_start_code_standard
- \fi}
-
-\def\meta_start_code_instance#1#2\stopMPcode
+\permanent\tolerant\protected\def\startMPcode#=#:#2\stopMPcode
{\begingroup
\edef\currentMPinstance{#1}%
+ \ifempty\currentMPinstance
+ \let\currentMPinstance\defaultMPinstance
+ \fi
\let\currentMPgraphicname\empty
\edef\currentMPformat{\MPinstanceparameter\s!format}%
\meta_enable_include
\meta_process_graphic{#2}%
\endgroup}
-\def\meta_start_code_standard#1#2\stopMPcode
- {\begingroup
- \let\currentMPinstance\defaultMPinstance
- \let\currentMPgraphicname\empty
- \edef\currentMPformat{\MPinstanceparameter\s!format}%
- \meta_process_graphic{#2}%
- \endgroup}
+\aliased\let\stopMPcode\relax
-\unexpanded\def\MPcode
- {\dodoublegroupempty\meta_code}
+%D This one is not optimized because it's only used for small snippets, if it
+%D is used at all.
-\def\meta_code
- {\ifsecondargument
- \expandafter\meta_code_instance
+\permanent\tolerant\protected\def\MPcode#=#:#*#=%
+ {\ifparameter#1\or
+ \meta_begin_graphic_group{#1}%
+ \meta_enable_include
+ \meta_process_graphic{#2}%
+ \meta_end_graphic_group
\else
- \expandafter\meta_code_standard
+ \let\currentMPinstance\defaultMPinstance
+ \meta_enable_include
+ \meta_process_graphic{#1}%
\fi}
-\def\meta_code_instance#1#2%
- {\meta_begin_graphic_group{#1}%
- \meta_enable_include
- \meta_process_graphic{#2}%
- \meta_end_graphic_group}
-
-\def\meta_code_standard#1#2%
- {\let\currentMPinstance\defaultMPinstance
- \meta_enable_include
- \meta_process_graphic{#1}}
-
% a bit nasty (also needed for compatibility:
% \startMPrun input mp-www.mp ; \stopMPrun
@@ -975,27 +938,18 @@
% \startMPrun{mprun} input mp-www.mp ; \stopMPrun % instance
% \externalfigure[mprun.4][width=10cm,height=8cm]
-\let\MPruninstance\defaultMPinstance
+\mutable\let\MPruninstance\defaultMPinstance
-\unexpanded\def\useMPrun#1#2% name n
+\permanent\protected\def\useMPrun#1#2% name n
{\begingroup
\def\MPaskedfigure{#2}%
- \doifelsenothing{#1}
- {\useMPgraphic{mprun}}%
- {\useMPgraphic{#1}}%
+ \normalexpanded{\useMPgraphic{\iftok{#1}\emptytoks mprun\else#1\fi}}%
\endgroup}
-\unexpanded\def\startMPrun
- {\dosinglegroupempty\meta_start_run}
+\permanent\tolerant\protected\def\startMPrun#=#:#2\stopMPrun
+ {\normalexpanded{\startuseMPgraphic{\iftok{#1}\emptytoks mprun\else#1\fi}}#2\stopuseMPgraphic}
-\def\meta_start_run#1#2\stopMPrun
- {\iffirstargument
- \startuseMPgraphic{#1}#2\stopuseMPgraphic
- \else
- \startuseMPgraphic{mprun}#2\stopuseMPgraphic
- \fi}
-
-\let\stopMPrun\relax
+\aliased\let\stopMPrun\relax
%D The \type {\resetMPenvironment} is a quick way to erase
%D the token list.
@@ -1022,7 +976,7 @@
%D Loading specific \METAPOST\ related definitions is
%D accomplished by:
-\unexpanded\def\useMPlibrary[#1]{\clf_useMPlibrary{#1}}
+\permanent\protected\def\useMPlibrary[#1]{\clf_useMPlibrary{#1}}
%D \macros
%D {setMPtext, MPtext, MPstring, MPbetex}
@@ -1039,90 +993,33 @@
\installcorenamespace{mptext}
-\unexpanded\def\setMPtext#1#2% todo : #1 must be made : safe
- {\defconvertedargument\ascii{#2}%
- \dodoglobal\letvalue{\??mptext#1}\ascii}
-
-\def\MPtext #1{\begincsname\??mptext#1\endcsname\empty}
-\def\MPstring#1{"\begincsname\??mptext#1\endcsname\empty"}
-\def\MPbetex #1{btex \begincsname\??mptext#1\endcsname\space etex}
+\permanent\protected\def\setMPtext#1#2{\dodoglobal\edefcsname\??mptext#1\endcsname{\detokenize{#2}}}
+\permanent \def\MPtext #1{\begincsname\??mptext#1\endcsname\empty}
+\permanent \def\MPstring #1{"\begincsname\??mptext#1\endcsname\empty"}
+\permanent \def\MPbetex #1{btex \begincsname\??mptext#1\endcsname\space etex}
%D In order to communicate conveniently with the \TEX\ engine, we introduce some
%D typesetting variables.
% \setupcolors[state=stop,conversion=never] % quite tricky ... type mismatch
-% \startMPextensions
-% color OverlayColor,OverlayLineColor;
-% \stopMPextensions
-
\startMPinitializations
CurrentLayout:="\currentlayout";
\stopMPinitializations
-% \startMPinitializations
-% OverlayWidth:=\overlaywidth;
-% OverlayHeight:=\overlayheight;
-% OverlayDepth:=\overlaydepth;
-% OverlayLineWidth:=\overlaylinewidth;
-% OverlayOffset:=\overlayoffset;
-% \stopMPinitializations
-
%D A dirty trick, ** in colo-ini.lua (mpcolor). We cannot use a vardef, because
%D that fails with spot colors.
\startMPinitializations
- def OverlayLineColor=\ifx\overlaylinecolor\empty black \else\MPcolor{\overlaylinecolor} \fi enddef;
- def OverlayColor =\ifx\overlaycolor \empty black \else\MPcolor{\overlaycolor} \fi enddef;
+ def OverlayLineColor=\ifempty\overlaylinecolor black \else\MPcolor{\overlaylinecolor} \fi enddef;
+ def OverlayColor =\ifempty\overlaycolor black \else\MPcolor{\overlaycolor} \fi enddef;
\stopMPinitializations
-% \newcount\c_overlay_colormodel
-% \newcount\c_overlay_color
-% \newcount\c_overlay_transparency
-% \newcount\c_overlay_linecolor
-% \newcount\c_overlay_linetransparency
-
-% \appendtoks
-% \c_overlay_colormodel \attribute\colormodelattribute
-% \c_overlay_color \colo_helpers_inherited_current_ca\overlaycolor
-% \c_overlay_transparency \colo_helpers_inherited_current_ta\overlaycolor
-% \c_overlay_linecolor \colo_helpers_inherited_current_ca\overlaylinecolor
-% \c_overlay_linetransparency\colo_helpers_inherited_current_ta\overlaylinecolor
-% \to \everyMPgraphic
-
-% \startMPinitializations
-% BaseLineSkip:=\the\baselineskip;
-% LineHeight:=\the\baselineskip;
-% BodyFontSize:=\the\bodyfontsize;
-% %
-% TopSkip:=\the\topskip;
-% StrutHeight:=\strutheight;
-% StrutDepth:=\strutdepth;
-% %
-% CurrentWidth:=\the\hsize;
-% CurrentHeight:=\the\vsize;
-% HSize:=\the\hsize ;
-% VSize:=\the\vsize ;
-% %
-% EmWidth:=\the\emwidth;
-% ExHeight:=\the\exheight;
-% \stopMPinitializations
-
\appendtoks
\disablediscretionaries
%\disablecompoundcharacters
\to \everyMPgraphic
-% \appendtoks % before color, inefficient, replace by low level copy
-% \doregistercolor{currentcolor}\currentcolorname
-% \to \everyMPgraphic
-
-% \color[green]{abc \startMPcode
-% fill fullcircle scaled 3cm withoutcolor;
-% fill fullcircle scaled 2cm withcolor \MPcolor{currentcolor} ;
-% fill fullcircle scaled 1cm withcolor \MPcolor{red} ;
-% \stopMPcode def}
-
\appendtoks
\baselineskip1\baselineskip
\lineheight 1\lineheight
@@ -1130,11 +1027,11 @@
\to \everyMPgraphic
\appendtoks
- \let \# \letterhash
- \let \_ \letterunderscore
- \let \& \letterampersand
- \let \{ \letteropenbrace
- \let \} \letterclosebrace
+ \enforced\let\#\letterhash
+ \enforced\let\_\letterunderscore
+ \enforced\let\&\letterampersand
+ \enforced\let\{\letteropenbrace
+ \enforced\let\}\letterclosebrace
\to \everyMPgraphic
%D \macros
@@ -1159,14 +1056,6 @@
enddef ;
\stopMPextensions
-% \startMPextensions
-% PageFraction := 1 ;
-% \stopMPextensions
-
-% \startMPinitializations
-% PageFraction := if \lastpage>1: (\realfolio-1)/(\lastpage-1) else: 1 fi ;
-% \stopMPinitializations
-
\startMPdefinitions {metapost}
if unknown context_bare : input mp-bare.mpiv ; fi ;
\stopMPdefinitions
@@ -1196,13 +1085,13 @@
%D You won't believe me if I tell you what funny side effects can occur. One took me
%D over a day to uncover when processing the screen version of the \METAFUN\ manual.
-\def\doifelseMPgraphic#1%
+\permanent\def\doifelseMPgraphic#1%
{\ifcsname\??mpgraphic #1\endcsname\expandafter\firstoftwoarguments \orelse
\ifcsname\??mpgraphic o:#1\endcsname\expandafter\firstoftwoarguments \orelse
\ifcsname\??mpgraphic e:#1\endcsname\expandafter\firstoftwoarguments \else
\expandafter\secondoftwoarguments\fi}
-\let\doifMPgraphicelse\doifelseMPgraphic
+\aliased\let\doifMPgraphicelse\doifelseMPgraphic
%D New:
@@ -1276,31 +1165,26 @@
%D
%D \typebuffer \getbuffer
-\unexpanded\def\startstaticMPfigure#1#2\stopstaticMPfigure
+\permanent\protected\def\startstaticMPfigure#1#2\stopstaticMPfigure
{\startreusableMPgraphic{\??mpstaticgraphic#1}#2\stopreusableMPgraphic}
-\unexpanded\def\startstaticMPgraphic
- {\dodoublegroupempty\meta_start_static_graphic}
-
-\def\meta_start_static_graphic#1#2#3\stopstaticMPgraphic
+\permanent\tolerant\protected\def\startstaticMPgraphic#=#:#=#:#3\stopstaticMPgraphic
{\startreusableMPgraphic{\??mpstaticgraphic#1}{#2}#3\stopreusableMPgraphic}
-\let\stopstaticMPfigure \relax
-\let\stopstaticMPgraphic\relax
+\aliased\let\stopstaticMPfigure \relax
+\aliased\let\stopstaticMPgraphic\relax
-\unexpanded\def\usestaticMPfigure
- {\dodoubleempty\meta_use_static_figure}
-
-\def\meta_use_static_figure[#1][#2]%
- {\ifsecondargument
- \scale[#2]{\reuseMPgraphic{\??mpstaticgraphic#1}}%
- \else
+\permanent\tolerant\protected\def\usestaticMPfigure[#1]#*[#2]%
+ {\ifarguments\or
\reuseMPgraphic{\??mpstaticgraphic#1}%
+ \else
+ \scale[#2]{\reuseMPgraphic{\??mpstaticgraphic#1}}%
\fi}
%D Goody for preventing overflows:
-\def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax}
+%frozen\def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax}
+\permanent\def\MPdivten[#1]{\thewithoutunit\dimexpr#1pt/10\relax}
%D There is no way to distinguish the black color that you get when you issue a
%D \type {draw} without color specification from a color that has an explicit black
@@ -1341,8 +1225,8 @@
\appendtoks
\clf_mpsetoutercolor
\MPcolormethod\space
- \attribute\colormodelattribute\space
- \attribute\colorattribute\space
+ \c_attr_colormodel\space
+ \c_attr_color\space
\dogetattribute{transparency}\relax
\to \everyMPgraphic
@@ -1374,34 +1258,25 @@
%D $(x,y) = (\MPrunset{point}{,})$
%D \stoptyping
-\def\MPrunvar #1{\clf_mprunvar{#1}} \let\mprunvar\MPrunvar
-\def\MPruntab#1#2{\clf_mpruntab{#1}#2\relax} \let\mpruntab\MPruntab % #2 is number
-\def\MPrunset#1#2{\clf_mprunset{#1}{#2}} \let\mprunset\MPrunset
+\permanent\def\MPrunvar #1{\clf_mprunvar{#1}} \aliased\let\mprunvar\MPrunvar
+\permanent\def\MPruntab#1#2{\clf_mpruntab{#1}#2\relax} \aliased\let\mpruntab\MPruntab % #2 is number
+\permanent\def\MPrunset#1#2{\clf_mprunset{#1}{#2}} \aliased\let\mprunset\MPrunset
\prependtoks \clf_mppushvariables \to \everybeforepagebody
\appendtoks \clf_mppopvariables \to \everyafterpagebody
-\let\MPpushvariables\clf_mppushvariables
-\let\MPpopvariables \clf_mppopvariables
+\aliased\let\MPpushvariables\clf_mppushvariables
+\aliased\let\MPpopvariables \clf_mppopvariables
%D We also provide an outputless run:
-\unexpanded\def\startMPcalculation
+\permanent\tolerant\protected\def\startMPcalculation#=#:#2\stopMPcalculation
{\begingroup
\setbox\nextbox\hpack\bgroup
- \dosinglegroupempty\meta_start_calculation}
-
-\let\stopMPcalculation\relax
-
-\def\meta_start_calculation
- {\iffirstargument
- \expandafter\meta_start_calculation_instance
- \else
- \expandafter\meta_start_calculation_standard
- \fi}
-
-\def\meta_start_calculation_instance#1#2\stopMPcalculation
- {\edef\currentMPinstance{#1}%
+ \edef\currentMPinstance{#1}%
+ \ifempty\currentMPinstance
+ \let\currentMPinstance\defaultMPinstance
+ \fi
\let\currentMPgraphicname\empty
\edef\currentMPformat{\MPinstanceparameter\s!format}%
\meta_enable_include
@@ -1409,13 +1284,7 @@
\egroup
\endgroup}
-\def\meta_start_calculation_standard#1#2\stopMPcalculation
- {\let\currentMPinstance\defaultMPinstance
- \let\currentMPgraphicname\empty
- \edef\currentMPformat{\MPinstanceparameter\s!format}%
- \meta_process_graphic{#2;draw origin}%
- \egroup
- \endgroup}
+\aliased\let\stopMPcalculation\relax
%D \macros
%D {setupMPgraphics}
@@ -1437,28 +1306,30 @@
\setupMPgraphics
[\c!color=\v!local]
-%D This can save some runtime: rename the mpy file from a first run (when stable) to
-%D another file and reuse it. One can also use the original filename, but a copy is
-%D often better.
-%D
-%D \starttyping
-%D \setupMPgraphics
-%D [mpy=\jobname.mpy]
-%D \stoptyping
-
-\appendtoks
- \edef\p_mpy{\directMPgraphicsparameter{mpy}}%
- \ifx\p_mpy\empty \else
- \let\MPdataMPYfile\p_mpy
- \clf_registermpyfile{\p_mpy}%
- \fi
-\to \everysetupMPgraphics
+% %D This can save some runtime: rename the mpy file from a first run (when stable) to
+% %D another file and reuse it. One can also use the original filename, but a copy is
+% %D often better.
+% %D
+% %D \starttyping
+% %D \setupMPgraphics
+% %D [mpy=\jobname.mpy]
+% %D \stoptyping
+%
+% \mutable\let\MPdataMPYfile\empty
+%
+% \appendtoks
+% \edef\p_mpy{\directMPgraphicsparameter{mpy}}%
+% \ifempty\p_mpy \else
+% \let\MPdataMPYfile\p_mpy
+% \clf_registermpyfile{\p_mpy}%
+% \fi
+% \to \everysetupMPgraphics
%D Some more helpers (see \type {meta-grd.mkiv} for an example of usage):
-\def\MPdpar#1#2{\the\dimexpr#1#2\relax\empty}
-\def\MPnpar#1#2{\the\numexpr#1#2\relax\empty}
-\def\MPspar#1#2{"#1#2"}
+\permanent\def\MPdpar#1#2{\the\dimexpr#1#2\relax\empty}
+\permanent\def\MPnpar#1#2{\the\numexpr#1#2\relax\empty}
+\permanent\def\MPspar#1#2{"#1#2"}
%D Done.
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-lua.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-lua.mkxl
new file mode 100644
index 00000000000..e06677d5eef
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-lua.mkxl
@@ -0,0 +1,95 @@
+%D \module
+%D [ file=meta-lua,
+%D version=2012.07.23,
+%D title=\METAPOST\ Integrated Graphics,
+%D subtitle=Templates,
+%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 Don't use this code yet. I use it in some experimental rendering of graphics
+%D based on output from database queries. It's not that pretty but will be
+%D considered when the (similar) lmx code is redone. Also, dropping the print
+%D variant makes it nicer. This experiment is part of playing with several template
+%D mechanisms. (Also see trac-lmx.)
+%D
+%D Note for myself: see if the (bar)chart code use in q2p can use this kind of
+%D magic. Basically we then need a channel to data.
+
+\writestatus{loading}{MetaPost Library Graphics / Templates}
+
+\registerctxluafile{meta-lua}{}
+
+\continueifinputfile{meta-lua.mkiv}
+
+\starttext
+
+% conforming btex ... etex
+
+\startbuffer[test-a]
+ blua for i=1,100,5 do elua
+ draw fullcircle scaled (blua p(i) elua * cm) withcolor green withpen pencircle scaled 4 ;
+ blua end elua
+
+ blua for i=1,100,10 do elua
+ draw fullcircle scaled (blua p(i) elua * cm) withcolor red withpen pencircle scaled 2 ;
+ blua end elua
+\stopbuffer
+
+\startMPpage[offset=10pt]
+ input "mpstemplate://buffer?name=test-a" ;
+\stopMPpage
+
+% conforming lmx
+
+\startbuffer[test-b]
+ <?lua for i=1,100,5 do ?>
+ draw fullcircle scaled (<?lua p(i) ?> * cm) withcolor green withpen pencircle scaled 4 ;
+ <?lua end ?>
+
+ <?lua for i=1,100,10 do ?>
+ draw fullcircle scaled (<?lua p(i) ?> * cm) withcolor red withpen pencircle scaled 2 ;
+ <?lua end ?>
+\stopbuffer
+
+\startMPpage[offset=10pt]
+ input "mpstemplate://buffer?name=test-b" ;
+\stopMPpage
+
+\startMPpage[offset=10pt]
+ picture p[] ; % we can't input nested
+ input "mpstemplate://buffer?name=test-a&method=metapost" ;
+ p[1] := currentpicture ; currentpicture := nullpicture ;
+ input "mpstemplate://buffer?name=test-b&method=xml" ;
+ p[2] := currentpicture ; currentpicture := nullpicture ;
+ draw p[1] ysized 3cm ;
+ draw p[2] ysized 4cm shifted (4cm,0) ;
+\stopMPpage
+
+% a mixture (using a wrapped input)
+
+\startMPpage[offset=10pt]
+ draw image (loadfile("mpstemplate://buffer?name=test-a&method=metapost")) ysized 3cm shifted (4cm,0cm) ;
+ draw image (loadfile("mpstemplate://buffer?name=test-b&method=xml")) ysized 3cm shifted (0cm,4cm) ;
+ draw loadimage ("mpstemplate://buffer?name=test-a&method=metapost") ysized 4cm shifted (4cm,4cm) ;
+ draw loadimage ("mpstemplate://buffer?name=test-b&method=xml") ysized 4cm shifted (0cm,0cm) ;
+\stopMPpage
+
+% conforming myself
+
+\startluacode
+ context.startMPpage { offset = "10pt" }
+ for i=1,100,5 do
+ context("draw fullcircle scaled (%s * cm) withcolor green withpen pencircle scaled 4 ;",i)
+ end
+ for i=1,100,10 do
+ context("draw fullcircle scaled (%s * cm) withcolor red withpen pencircle scaled 2 ;",i)
+ end
+ context.stopMPpage()
+\stopluacode
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-mac.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-mac.mkxl
index 3bf38b4c826..76b7396ae9e 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-mac.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-mac.mkxl
@@ -13,40 +13,16 @@
\unprotect
-\unexpanded\def\defineMPparameterset[#1]{\clf_lmt_parameters_define{#1}}
-\unexpanded\def\presetMPparameters [#1]{\clf_lmt_parameters_preset{#1}}
-\unexpanded\def\resetMPparameters [#1]{\clf_lmt_parameters_reset {#1}}
+\permanent\protected\def\defineMPparameterset[#1]{\clf_lmt_parameters_define{#1}}
+\permanent\protected\def\presetMPparameters [#1]{\clf_lmt_parameters_preset{#1}}
+\permanent\protected\def\resetMPparameters [#1]{\clf_lmt_parameters_reset {#1}}
-% \unexpanded\def\useMPgraphic
-% {\doifnextoptionalelse\meta_use_MP_graphic_yes\meta_use_MP_graphic_nop}
-
-% \def\meta_use_MP_graphic_nop
-% {\dodoublegroupempty\meta_use_graphic}
-
-% \def\meta_use_MP_graphic_yes
-% {\dodoubleempty\meta_use_graphic_new}
-
-% \def\meta_use_graphic_new[#1][#2]%
-% {\begingroup
-% % If really needed weh can use grouplevel but normally these graphics are
-% % not nested.
-% \clf_lmt_parameters_preset{#1}[#2]%
-% \meta_use_graphic{#1}{}%
-% \clf_lmt_parameters_reset{#1}%
-% \endgroup}
-
-\unexpanded\def\useMPmacro
- {\dotripleempty\meta_use_macro}
-
-\def\meta_use_macro[#1][#2][#3]%
- {\ifthirdargument
- \meta_begin_graphic_group{#1}%
+\permanent\tolerant\protected\def\useMPmacro[#1]#*[#2]#*[#3]%
+ {\ifarguments\or
+ \let\currentMPinstance\defaultMPinstance
\meta_enable_include
- \clf_lmt_parameters_preset{#2}[#3]%
- \meta_process_graphic{lmt_#2;}%
- \clf_lmt_parameters_reset{#2}%
- \meta_end_graphic_group
- \else\ifsecondargument
+ \meta_process_graphic{lmt_#1;}%
+ \or
\doifelseassignment{#2}
{\let\currentMPinstance\defaultMPinstance
\meta_enable_include
@@ -57,10 +33,13 @@
\meta_enable_include
\meta_process_graphic{lmt_#1;}%
\meta_end_graphic_group}%
- \else
- \let\currentMPinstance\defaultMPinstance
+ \or
+ \meta_begin_graphic_group{#1}%
\meta_enable_include
- \meta_process_graphic{lmt_#1;}%
- \fi\fi}
+ \clf_lmt_parameters_preset{#2}[#3]%
+ \meta_process_graphic{lmt_#2;}%
+ \clf_lmt_parameters_reset{#2}%
+ \meta_end_graphic_group
+ \fi}
\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-nod.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-nod.mkxl
new file mode 100644
index 00000000000..0fbfefde0c8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-nod.mkxl
@@ -0,0 +1,248 @@
+%D \module
+%D [ file=meta-nod,
+%D version=2016.11.23,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Nodes,
+%D author={Alan Braslau and Hans Hagen},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{meta-nod}{}
+
+\unprotect
+
+\defineMPinstance
+ [nodes]
+ [\s!format=metafun,
+ \s!extensions=\v!yes,
+ \s!initializations=\v!yes,
+ \c!method=\s!double]
+
+\defineframed
+ [node]
+ [\c!frame=\v!off]
+
+\defineframed
+ [smallnode]
+ [node]
+ [\c!foregroundstyle=\small]
+
+% \startMPdefinitions{nodes}
+% loadmodule "node" ;
+% \stopMPdefinitions
+
+\protect
+
+%D This module provides a simple \TEX\ layer on top of the nodes library that is
+%D preloaded in \METAFUN. More information can be found in the manual and article.
+%D
+%D We strongly advice to use the \METAPOST\ interface and only provide this \TEX\
+%D variant as proof of concept. There are no plans to extend this module because we
+%D see no advantage in using a \TEX\ interface over a \METAPOST\ one.
+%D
+%D \startbuffer
+%D \startnodes
+%D \placenode[0,0]{A}
+%D \placenode[1,0]{B}
+%D \connectnodes [0,1] [option=doublearrow]
+%D \stopnodes
+%D
+%D \startnodes[dx=2cm,rotation=45]
+%D \placenode[0,0]{A}
+%D \placenode[1,0]{B}
+%D \placenode[1,1]{C}
+%D \placenode[0,1]{D}
+%D \connectnodes [0,2] [option=doublearrow,label=a,offset=.05]
+%D \connectnodes [1,3] [option=doublearrows]
+%D \stopnodes
+%D
+%D \startnodes[dx=2cm,dy=2cm]
+%D \nodeMPcode{ahlength := 12pt ; ahangle := 30 ; ahvariant := 1 ;}
+%D \mpcode{ahlength := 12pt ; ahangle := 30 ; ahvariant := 1 ;}
+%D \placenode[0,1]{\node{A}}
+%D \placenode[1,1]{\node{B}}
+%D \placenode[0,0]{\node{C}}
+%D \placenode[1,0]{\node{D}}
+%D \connectnodes [0,3] [option=arrow,label={ }]
+%D \connectnodes [1,2] [option=arrow]
+%D \stopnodes
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startlinecorrection \getbuffer \stoplinecorrection
+
+\unprotect
+
+\installcorenamespace{metanodes}
+\installcorenamespace{metanodesoption}
+\installcorenamespace{metanodesalternative}
+\installcorenamespace{metanodesposition}
+
+% todo: maybe instances
+
+\installparameterhandler \??metanodes {metanodes}
+\installsetuphandler \??metanodes {metanodes}
+
+\setupmetanodes
+ [\c!option =,
+ \c!alternative =,
+ \c!offset =0,
+ \c!position =,
+ \c!label =,
+ \c!dx =2\emwidth,
+ \c!dy =2\emwidth,
+ \c!rotation =90,
+ \c!rulethickness =.5pt,
+ \c!command =]
+
+\newtoks\t_every_meta_nodes
+\newtoks\t_meta_nodes
+
+%D Hm, we started out simple but it now quickly becomes the usual mess of \TEX,
+%D \METAPOST\ and \LUA. Hard to understand.
+
+\newcount\c_meta_nodes_n
+
+\aliased\let\stopnodes\relax
+
+\permanent\tolerant\protected\def\startnodes[#1]#:#2\stopnodes
+ {\hpack\bgroup
+ \setupcurrentmetanodes[#1]%
+ \edef\p_meta_option{\metanodesparameter\c!option}%
+ \edef\p_meta_alternative{\metanodesparameter\c!alternative}%
+ \the\t_every_meta_nodes
+ \c_meta_nodes_n\zerocount
+ \t_meta_nodes\emptytoks
+ #2\removeunwantedspaces
+ % for alan, will be commented:
+ \writestatus{metanodes}{\detokenize\expandafter{\the\t_meta_nodes}}%
+ \clf_grph_nodes_initialize
+ \startMPcode
+ mfun_node_init(%
+ \the\dimexpr\metanodesparameter\c!dx\relax,%
+ \the\dimexpr\metanodesparameter\c!dy\relax,%
+ \metanodesparameter\c!rotation%
+ ) ;
+ \the\t_meta_nodes ;
+ mfun_node_flush ;
+ \stopMPcode
+ \clf_grph_nodes_reset
+ \egroup}
+
+\permanent\tolerant\protected\def\grph_nodes_node[#1]#*[#2]%
+ {\grph_nodes_node_indeed[#1][#2]}
+
+\def\grph_nodes_node_indeed[#1,#2][#3]#4%
+ {\begingroup
+ \setupcurrentmetanodes[#3]%
+ \edef\p_label{#4}%
+ \edef\p_reference{\metanodesparameter\c!reference}%
+ \ifempty\p_reference\else
+ \clf_grph_nodes_register{\p_reference}\c_meta_nodes_n\relax
+ \fi
+ \normalexpanded{\endgroup\noexpand\etoksapp\t_meta_nodes{%
+ mfun_node_make(\number#1,\number#2%
+ \ifempty\p_label
+ ,""%
+ \else
+ ,"\metanodesparameter\c!command{\p_label}"%
+ \fi
+ );%
+ }}%
+ \advance\c_meta_nodes_n\plusone}
+
+\aliased\let\placenode\relax
+
+\appendtoks
+ \enforced\let\placenode\grph_nodes_node
+\to \t_every_meta_nodes
+
+\permanent\tolerant\protected\def\grph_nodes_fromto[#1]#*[#2]%
+ {\grph_nodes_fromto_indeed[#1][#2]}% get rid of {n,m} % todo: we can use #_ or so
+
+\letvalue{\??metanodesposition }\empty
+\setvalue{\??metanodesposition top}{.top}
+\setvalue{\??metanodesposition bottom}{.bot}
+\setvalue{\??metanodesposition left}{.lft}
+\setvalue{\??metanodesposition right}{.rt}
+\setvalue{\??metanodesposition upperleft}{.ulft}
+\setvalue{\??metanodesposition topleft}{.ulft}
+\setvalue{\??metanodesposition lefttop}{.ulft}
+\setvalue{\??metanodesposition upperright}{.urt}
+\setvalue{\??metanodesposition topright}{.urt}
+\setvalue{\??metanodesposition righttop}{.urt}
+\setvalue{\??metanodesposition lowerleft}{.llft}
+\setvalue{\??metanodesposition bottomleft}{.llft}
+\setvalue{\??metanodesposition leftbottom}{.llft}
+\setvalue{\??metanodesposition lowerright}{.lrt}
+\setvalue{\??metanodesposition bottomright}{.lrt}
+\setvalue{\??metanodesposition rightbottom}{.lrt}
+
+\def\grph_nodes_fromto_indeed[#1,#2][#3]% we can't group because etoksapp doesn't like that
+ {\begingroup
+ \setupcurrentmetanodes[#3]%
+ \edef\p_label {\metanodesparameter\c!label}%
+ \edef\p_rulethickness{\metanodesparameter\c!rulethickness}%
+ \edef\p_command {\metanodesparameter\c!command}% better get an error early
+ \normalexpanded{\endgroup\noexpand\etoksapp\t_meta_nodes{%
+ \ifcsname\??metanodesalternative\metanodesparameter\c!alternative\endcsname
+ \lastnamedcs
+ \else
+ \csname\??metanodesalternative\endcsname
+ \fi
+ \space
+ mfun_nodes_fromto\begincsname\??metanodesposition\metanodesparameter\c!position\endcsname(%
+ \metanodesparameter\c!offset,%
+ % \number#1,\number#2%
+ \clf_grph_nodes_resolve{#1},\clf_grph_nodes_resolve{#2}%
+ \ifempty\p_label
+ ,""%
+ \else
+ ,"\ifempty\p_command\p_label\else\p_command{\p_label}\fi"%
+ \fi
+ )%
+ \space
+ \ifcsname\??metanodesoption\metanodesparameter\c!option\endcsname
+ \lastnamedcs
+ \else
+ \csname\??metanodesoption\endcsname
+ \fi
+ \space
+ \ifempty\p_rulethickness \else
+ withpen pencircle scaled \the\dimexpr\p_rulethickness\relax
+ \fi
+ ;%
+ }}}
+
+\setvalue{\??metanodesalternative }{draw}
+\setvalue{\??metanodesalternative arrow}{drawarrow}
+\setvalue{\??metanodesalternative doublearrow}{drawdblarrow}
+\setvalue{\??metanodesalternative doublearrows}{drawdoublearrows}
+
+\setvalue{\??metanodesoption }{}
+\setvalue{\??metanodesoption dashed}{dashed evenly}
+\setvalue{\??metanodesoption dotted}{dashed withdots scaled .5}
+
+\aliased\let\connectnodes\relax
+
+\appendtoks
+ \enforced\let\connectnodes\grph_nodes_fromto
+\to \t_every_meta_nodes
+
+\permanent\protected\def\grph_nodes_code#1%
+ {\etoksapp\t_meta_nodes{#1}}
+
+\aliased\let\mpcode \relax
+\aliased\let\nodeMPcode\relax
+
+\appendtoks
+ \enforced\let\nodeMPcode\grph_nodes_code
+ \enforced\let\mpcode \grph_nodes_code
+\to \t_every_meta_nodes
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-pag.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-pag.mkxl
index 86de11eeb5c..86de11eeb5c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/meta-pag.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-pag.mkxl
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-pdf.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-pdf.mkxl
new file mode 100644
index 00000000000..d53ff7780f6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-pdf.mkxl
@@ -0,0 +1,95 @@
+%D \module
+%D [ file=meta-pdf,
+%D version=2006.06.07,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Conversion to \PDF,
+%D author=Hans Hagen \& others (see text),
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{meta-pdf}{}
+
+\writestatus{loading}{MetaPost Graphics / MPS to PDF}
+
+\unprotect
+
+%D \macros
+%D {convertMPtoPDF}
+%D
+%D The next set of macros implements \METAPOST\ to \PDF\ conversion. The traditional
+%D method is in the MkII files and the older \MKIV\ method is kept in meta-pdh
+%D files. The main conversion command is still the same but the scale parameters are
+%D ignored in \MKIV:
+%D
+%D \starttyping
+%D \convertMPtoPDF {filename} {x scale} {y scale}
+%D \stoptyping
+%D
+%D Much code has gone due to the fact that we now use pre and post scripts and no
+%D specials. This also means that you should use a modern \METAPOST\ or reprocess
+%D graphics. The color control flags are also gone as we now integrate into the
+%D regular colorspace handling (i.e.\ no longer independent configurations.)
+
+\permanent\def\PDFMPformoffset{\ifdefined\objectoffset\objectoffset\else\zeropoint\fi} % obsolete, will go
+
+\mutable\let\MPfilename\empty
+
+\permanent\protected\def\convertMPtoPDF#1#2#3% scaling no longer supported at this level (so #2 & #3 are ignored)
+ {\dostarttagged\t!mpgraphic\empty
+ \naturalvpack attr \imageattribute 1 \bgroup
+ \message{[MP to PDF]}%
+ \xdef\MPfilename{#1}%
+ \resetMPboundingbox
+ \forgetall
+ \offinterlineskip
+ \setbox\MPbox\vpack\bgroup
+ \clf_convertmpstopdf{\MPfilename}%
+ \removeunwantedspaces % not that needed
+ \egroup
+ \finalizeMPbox
+ \box\MPbox
+ \egroup
+ \dostoptagged}
+
+\protect \endinput
+
+%D Test code:
+%D
+%D \startbuffer
+%D \startMPcode
+%D fill fullcircle scaled 3cm withcolor red ;
+%D fill fullcircle scaled 2cm withcolor green ;
+%D fill fullcircle scaled 1cm withcolor blue ;
+%D currentpicture := currentpicture shifted (-4cm,0) ;
+%D fill fullcircle scaled 3cm withcolor cmyk(0,0,1,0) ;
+%D fill fullcircle scaled 2cm withcolor cmyk(0,1,0,0) ;
+%D fill fullcircle scaled 1cm withcolor cmyk(0,0,1,0) ;
+%D currentpicture := currentpicture shifted (-4cm,0) ;
+%D draw fullcircle scaled 3cm dashed evenly ;
+%D draw fullcircle scaled 2cm dashed withdots ;
+%D draw origin withpen pencircle scaled 3mm;
+%D currentpicture := currentpicture shifted (-4cm,0) ;
+%D fill fullcircle scaled 2cm shifted (-.5cm,+.5cm) withcolor transparent(1,.5,red);
+%D fill fullcircle scaled 2cm shifted (-.5cm,-.5cm) withcolor transparent(1,.5,red);
+%D fill fullcircle scaled 2cm shifted (+.5cm,+.5cm) withcolor transparent(1,.5,green);
+%D fill fullcircle scaled 2cm shifted (+.5cm,-.5cm) withcolor transparent(1,.5,cmyk(1,0,1,.5));
+%D currentpicture := currentpicture shifted (12cm,-4cm) ;
+%D draw "o e p s" infont defaultfont scaled 2 shifted (-1cm,0) ;
+%D currentpicture := currentpicture shifted (-4cm,0) ;
+%D % bug: shift
+%D draw fullcircle scaled 3cm withpen pencircle yscaled 3mm xscaled 2mm rotated 30 ;
+%D draw fullcircle scaled 2cm withpen pencircle yscaled 3mm xscaled 2mm rotated 20 withcolor red ;
+%D filldraw fullcircle scaled 1cm withpen pencircle yscaled 3mm xscaled 2mm rotated 10 withcolor green ;
+%D currentpicture := currentpicture shifted (-4cm,0) ;
+%D % shade cannot handle shift
+%D circular_shade(fullcircle scaled 3cm,0,.2red,.9green) ;
+%D circular_shade(fullcircle scaled 3cm shifted(+4cm,0),0,cmyk(1,0,0,0),cmyk(0,1,0,0)) ;
+%D filldraw boundingbox currentpicture enlarged -3cm withpen pencircle scaled 1pt withcolor .5white ;
+%D \stopMPcode
+%D \stopbuffer
+%D
+%D \typebuffer \startlinecorrection \getbuffer \stoplinecorrection
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-pdh.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-pdh.mkxl
new file mode 100644
index 00000000000..e2d0e15b62c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-pdh.mkxl
@@ -0,0 +1,716 @@
+%D \module
+%D [ file=meta-pdf,
+%D version=2006.06.07,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Conversion to \PDF,
+%D author=Hans Hagen \& others (see text),
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\endinput
+
+%D Formerly known as supp-pdf.tex and supp-mpe.tex and meta-pdf.mkiv.
+%D
+%D Beware: this file is not used but kept for historic purposed! Never
+%D mix this one into mkiv again as it uses other variables.
+
+% \useMPgraphic{1}
+% \testfeatureonce{250}{\setbox0\hbox{\convertMPtoPDF{test-mps-mpgraph.1}{1}{1}}}
+%
+% 8.4 : mkii, direct parsing by tex
+% 11.8 : mkiv, dirty conversion (10.8 with dirty tricks)
+% 14.5 : mkiv, clean conversion
+% 7.4 : mkiv, simulated clean direct lua from mp
+% 0.3 : time taken by tex to handle converted code
+%
+% timings may differ now that we revamped the backend
+
+\registerctxluafile{meta-pdf}{}
+
+%D We will clean up the color mess later.
+
+\writestatus{loading}{MetaPost Graphics / MPS to PDF}
+
+\unprotect
+
+%D First we define a handy constant:
+
+\bgroup \catcode\commentasciicode\othercatcode \xdef\letterpercent{\string%} \egroup
+
+%D \macros
+%D {convertMPtoPDF}
+%D
+%D The next set of macros implements \METAPOST\ to \PDF\
+%D conversion. The traditional method is in the MkII file.
+%D
+%D The main conversion command is:
+%D
+%D \starttyping
+%D \convertMPtoPDF {filename} {x scale} {y scale}
+%D \stoptyping
+%D
+%D The dimensions are derived from the bounding box. So we
+%D only have to say:
+%D
+%D \starttyping
+%D \convertMPtoPDF{mp-pra-1.eps}{1}{1}
+%D \convertMPtoPDF{mp-pra-1.eps}{.5}{.5}
+%D \stoptyping
+
+%D \macros
+%D {makeMPintoPDFobject,lastPDFMPobject}
+%D
+%D For experts there are a few more options. When attributes
+%D are to be added, the code must be embedded in an object
+%D accompanied with the appropriate directives. One can
+%D influence this process with \type {\makeMPintoPDFobject}.
+%D
+%D This option defaults to~0, because \CONTEXT\ takes care
+%D of objects at another level, which saves some bytes.
+%D
+%D \starttabulate[|l|l|p|]
+%D \NC 0 \NC never \NC don't use an object \NC\NR
+%D \NC 1 \NC always \NC always use an object \NC\NR
+%D \NC 2 \NC optional \NC use object when needed \NC\NR
+%D \stoptabulate
+%D
+%D The last object number used is avaliable in the macro
+%D \type {\lastPDFMPobject}.
+
+\ifdefined\makeMPintoPDFobject \else \newconstant\makeMPintoPDFobject \fi
+\ifdefined\everyMPtoPDFconversion \else \newtoks \everyMPtoPDFconversion \fi
+
+\let\lastPDFMPobject \!!zerocount
+\let\currentPDFresources\empty
+\let\setMPextensions \relax
+
+\def\PDFMPformoffset{\ifdefined\objectoffset\objectoffset\else\zeropoint\fi}
+
+\def\resetMPvariables#1#2#3%
+ {\glet\MPwidth \!!zeropoint
+ \glet\MPheight \!!zeropoint
+ \glet\MPllx \!!zerocount
+ \glet\MPlly \!!zerocount
+ \glet\MPurx \!!zerocount
+ \glet\MPury \!!zerocount
+ \xdef\MPxscale {#2}\ifempty\MPxscale\let\MPxscale\!!plusone\fi
+ \xdef\MPyscale {#3}\ifempty\MPyscale\let\MPyscale\!!plusone\fi
+ \xdef\MPfilename {#1}}
+
+%D The main macro:
+
+\def\convertMPtoPDF#1#2#3% watch the transparency reset
+ {\resetMPvariables{#1}{#2}{#3}%
+ \vpack\bgroup
+ \forgetall
+ \offinterlineskip
+ \setbox\scratchbox\vpack\bgroup
+ \setnormalcatcodes % we can be in verbatim or so
+ \message{[MP to PDF]}%
+ \startMPresources
+ \pdfliteral{\letterpercent\space mps begin}%
+ \pdfliteral{q 1 0 0 1 0 0 cm}%
+ \ctxlua{metapost.mptopdf.convertmpstopdf("\MPfilename")}\removeunwantedspaces
+ \pdfliteral{Q}%
+ \pdfliteral{\letterpercent\space mps end}%
+ \stopMPresources
+ \egroup
+ \setbox\scratchbox\hpack\bgroup
+ \hskip-\MPllx\onebasepoint
+ \raise-\MPlly\onebasepoint
+ \box\scratchbox
+ \egroup
+ \setbox\scratchbox\vpack to \MPheight\bgroup
+ \vfill
+ \hsize\MPwidth
+ \smashbox\scratchbox
+ \box\scratchbox
+ \egroup
+ \wd\scratchbox\MPwidth
+ \ht\scratchbox\MPheight
+ \dopackageMPgraphic\scratchbox
+ \egroup}
+
+\let\processMPtoPDFfile\convertMPtoPDF
+
+%D A common hook.
+
+\let\MPfshowcommand\empty
+
+%D Objects.
+
+\def\dopackageMPgraphic#1% #1 = boxregister
+ {\ifcase\makeMPintoPDFobject\or\or\ifempty\currentPDFresources\else
+ % an existing value of 2 signals object support (set elsewhere)
+ \makeMPintoPDFobject\plusone
+ \fi\fi
+ \ifcase\makeMPintoPDFobject
+ \box#1%
+ \or
+ \scratchdimen\PDFMPformoffset\relax
+ \ifdim\scratchdimen>\zeropoint % compensate for error
+ \setbox#1\vpack spread 2\scratchdimen
+ {\forgetall\vss\hpack spread 2\scratchdimen{\hss\box#1\hss}\vss}%
+ \fi
+ \setMPPDFobject{\currentPDFresources}{#1}%
+ \ifdim\scratchdimen>\zeropoint % compensate for error
+ \vpack to \MPheight
+ {\forgetall\vss\hpack to \MPwidth{\hss\getMPPDFobject\hss}\vss}%
+ \else
+ \getMPPDFobject
+ \fi
+ \glet\currentPDFresources\empty
+ \else
+ \box#1%
+ \fi}
+
+\def\setMPPDFobject#1#2% resources boxnumber
+ {\ifdefined\everyPDFxform\the\everyPDFxform\fi
+ \immediate\saveboxresource resources{#1}#2%
+ \edef\getMPPDFobject{\noexpand\useboxresource\the\lastsavedboxresourceindex}}
+
+\let\getMPPDFobject\relax
+
+%D \macros
+%D {deleteMPgraphic,
+%D startMPresources,
+%D stopMPresources}
+
+\ifdefined\deleteMPgraphic \else
+ \def\deleteMPgraphic#1{}
+\fi
+
+\ifdefined\startMPresources \else
+ \let\startMPresources\relax
+ \let\stopMPresources\relax
+\fi
+
+%D We implement extensions by using the \METAPOST\ special
+%D mechanism. Opposite to \TEX's specials, the \METAPOST\ ones
+%D are flushed before or after the graphic data, but thereby
+%D are no longer connected to a position.
+%D
+%D We implement specials by overloading the \type {fill}
+%D operator. By counting the fills, we can let the converter
+%D treat the appropriate fill in a special way. The
+%D specification of the speciality can have two forms,
+%D determined by the setting of a boolean variable:
+%D
+%D \starttyping
+%D _inline_specials_ := false ; % comment like code (default)
+%D _inline_specials_ := true ; % command like code
+%D \stoptyping
+%D
+%D When the specification is embedded as comment, it looks
+%D like:
+%D
+%D \starttyping
+%D %%MetaPostSpecial <size> <data> <number> <identifier>
+%D \stoptyping
+%D
+%D The in||line alternative is more tuned for \POSTSCRIPT,
+%D since it permits us to define a macro \type {special}.
+%D
+%D \starttyping
+%D inline : <data> <number> <identifier> <size> special
+%D \stoptyping
+%D
+%D The \type {identifier} determines what to do, and the data
+%D can be used to accomplish this. A type~2 shading function
+%D has identifier~2. Alltogether, the number of parameters is
+%D specified in \type {size}. The \type {number} is the number
+%D of the fill that needs the special treatment. For a type~2
+%D and~3 shaded fill, the datablock contains the following
+
+%D data:
+%D
+%D \starttyping
+%D from to n inner_r g b x y outer_r g b x y
+%D from to n inner_r g b x y radius outer_r g b x y radius
+%D \stoptyping
+
+\newconditional\manyMPspecials \settrue\manyMPspecials
+
+%D In case of \PDF, we need to prepare resourcs.
+
+\newtoks\MPstartresources
+\newtoks\MPstopresources
+
+\def\startMPresources
+ {\the\MPstartresources}
+
+\def\stopMPresources
+ {\the\MPstopresources}
+
+%D Some day we may consider collecting local resources.
+
+\appendtoks
+ \glet\currentPDFresources\empty % kind of redundant
+\to \MPstartresources
+
+% \appendtoks
+% \collectPDFresources
+% \glet\currentPDFresources\collectedPDFresources
+% \to \MPstopresources
+
+\appendtoksonce
+ \the\everyPDFxform
+\to \MPstopresources
+
+%D Special number~1 is dedicated to \CMYK\ support. If you
+%D want to know why: look at this:
+%D
+%D \startbuffer[mp]
+%D fill fullcircle xyscaled (3cm,1cm) withcolor \MPcolor{test} ;
+%D \stopbuffer
+%D
+%D \startbuffer[cmyk]
+%D \startcombination[4*1]
+%D {\definecolor[test][c=1,y=.3,k=.3] \processMPbuffer[mp]} {c=1 y=.3 k=.3}
+%D {\definecolor[test][c=.9,y=.15] \processMPbuffer[mp]} {c=.9 y=.15}
+%D {\definecolor[test][c=.25,y=.8] \processMPbuffer[mp]} {c=.25 y=.8}
+%D {\definecolor[test][c=.45,y=.1] \processMPbuffer[mp]} {c=.45 y=.1}
+%D \stopcombination
+%D \stopbuffer
+%D
+%D \placefigure
+%D {\CMYK\ support disabled,
+%D conversion to \RGB.}
+%D {\setupcolors[cmyk=nee,state=start]\getbuffer[cmyk]}
+%D
+%D \placefigure
+%D {\CMYK\ support enabled,
+%D no support in \METAPOST.}
+%D {\setupcolors[cmyk=ja,mpcmyk=nee,state=start]\getbuffer[cmyk]}
+%D
+%D \placefigure
+%D {\CMYK\ support enabled,
+%D no conversion to \RGB,
+%D support in \METAPOST}
+%D {\setupcolors[cmyk=ja,state=start]\getbuffer[cmyk]}
+
+% \let\revokeMPtransparencyspecial\relax
+
+%D Transparency support used specials 60 (rgb) and 61
+%D (cmyk).
+%D
+%D \startbuffer
+%D u := 2cm ; path p ; p := fullcircle scaled u shifted (u/4,0);
+%D
+%D fill p rotated 90 withcolor transparent(1,.5,yellow) ;
+%D fill p rotated 210 withcolor transparent(1,.5,green) ;
+%D fill p rotated 330 withcolor transparent(1,.5,blue) ;
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startlinecorrection \processMPbuffer \stoplinecorrection
+%D
+%D One can also communicate colors between \CONTEXT\ and
+%D \METAPOST:
+%D
+%D \startbuffer
+%D \definecolor[tcyan] [c=1,k=.2,t=.5]
+%D \definecolor[tmagenta][m=1,k=.2,t=.5]
+%D \definecolor[tyellow] [y=1,k=.2,t=.5]
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D \startbuffer
+%D u := 2cm ; path p ; p := fullcircle scaled u shifted (u/4,0);
+%D
+%D fill p rotated 90 withcolor \MPcolor{tcyan} ;
+%D fill p rotated 210 withcolor \MPcolor{tmagenta} ;
+%D fill p rotated 330 withcolor \MPcolor{tyellow} ;
+%D \stopbuffer
+%D
+%D \startlinecorrection \processMPbuffer \stoplinecorrection
+
+%D Shading is an example of a more advanced graphic feature,
+%D but users will seldom encounter those complications. Here
+%D we only show a few simple examples, but many other
+%D alternatives are possible by setting up the functions built
+%D in \PDF\ in the appropriate way.
+%D
+%D Shading has to do with interpolation between two or more
+%D points or user supplied ranges. In \PDF, the specifications
+%D of a shade has to be encapsulated in objects and passed on
+%D as resources. This is a \PDF\ level 1.3. feature. One can
+%D simulate three dimensional shades as well and define simple
+%D functions using a limited set of \POSTSCRIPT\ primitives.
+%D Given the power of \METAPOST\ and these \PDF\ features, we
+%D can achieve superb graphic effects.
+%D
+%D Since everything is hidden in \TEX\ and \METAPOST\ graphics,
+%D we can stick to high level \CONTEXT\ command, as shown in
+%D the following exmples.
+%D
+%D \startbuffer
+%D \startuniqueMPgraphic{CircularShade}
+%D path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
+%D circular_shade(p,0,.2red,.9red) ;
+%D \stopuniqueMPgraphic
+%D
+%D \startuniqueMPgraphic{LinearShade}
+%D path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
+%D linear_shade(p,0,.2blue,.9blue) ;
+%D \stopuniqueMPgraphic
+%D
+%D \startuniqueMPgraphic{DuotoneShade}
+%D path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
+%D linear_shade(p,2,.5green,.5red) ;
+%D \stopuniqueMPgraphic
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+%D
+%D These graphics can be hooked into the overlay mechanism,
+%D which is available in many commands.
+%D
+%D \startbuffer
+%D \defineoverlay[demo 1][\uniqueMPgraphic{CircularShade}]
+%D \defineoverlay[demo 2][\uniqueMPgraphic {LinearShade}]
+%D \defineoverlay[demo 3][\uniqueMPgraphic {DuotoneShade}]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+%D
+%D These backgrounds can for instance be applied to \type
+%D {\framed}:
+%D
+%D \startbuffer
+%D \setupframed[width=3cm,height=2cm,frame=off]
+%D \startcombination[3*1]
+%D {\framed[backgroundachtergrond=demo 1]{\bfd \white Demo 1}} {}
+%D {\framed[backgroundachtergrond=demo 2]{\bfd \white Demo 2}} {}
+%D {\framed[backgroundachtergrond=demo 3]{\bfd \white Demo 3}} {}
+%D \stopcombination
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D There are a few more alternatives, determined by the second
+%D parameter passed to \type {circular_shade} and alike.
+%D
+%D \def\SomeShade#1#2#3#4#5%
+%D {\startuniqueMPgraphic{Shade-#1}
+%D width := OverlayWidth ;
+%D height := OverlayHeight ;
+%D path p ; p := unitsquare xscaled width yscaled height ;
+%D #2_shade(p,#3,#4,#5) ;
+%D \stopuniqueMPgraphic
+%D \defineoverlay[Shade-#1][\uniqueMPgraphic{Shade-#1}]%
+%D \framed[backgroundachtergrond=Shade-#1,width=2cm,height=2cm,frame=off]{}}
+%D
+%D \startlinecorrection
+%D \startcombination[5*1]
+%D {\SomeShade{10}{circular}{0}{.3blue}{.9blue}} {circular 0}
+%D {\SomeShade{11}{circular}{1}{.3blue}{.9blue}} {circular 1}
+%D {\SomeShade{12}{circular}{2}{.3blue}{.9blue}} {circular 2}
+%D {\SomeShade{13}{circular}{3}{.3blue}{.9blue}} {circular 3}
+%D {\SomeShade{14}{circular}{4}{.3blue}{.9blue}} {circular 4}
+%D \stopcombination
+%D \stoplinecorrection
+%D
+%D \blank
+%D
+%D \startlinecorrection
+%D \startcombination[5*1]
+%D {\SomeShade{20}{circular}{0}{.9green}{.3green}} {circular 0}
+%D {\SomeShade{21}{circular}{1}{.9green}{.3green}} {circular 1}
+%D {\SomeShade{22}{circular}{2}{.9green}{.3green}} {circular 2}
+%D {\SomeShade{23}{circular}{3}{.9green}{.3green}} {circular 3}
+%D {\SomeShade{24}{circular}{4}{.9green}{.3green}} {circular 4}
+%D \stopcombination
+%D \stoplinecorrection
+%D
+%D \blank
+%D
+%D \startlinecorrection
+%D \startcombination[4*1]
+%D {\SomeShade{30}{linear}{0}{.3red}{.9red}} {linear 0}
+%D {\SomeShade{31}{linear}{1}{.3red}{.9red}} {linear 1}
+%D {\SomeShade{32}{linear}{2}{.3red}{.9red}} {linear 2}
+%D {\SomeShade{33}{linear}{3}{.3red}{.9red}} {linear 3}
+%D \stopcombination
+%D \stoplinecorrection
+%D
+%D These macros closely cooperate with the \METAPOST\ module
+%D \type {mp-spec.mp}, which is part of the \CONTEXT\
+%D distribution.
+%D
+%D The low level (\PDF) implementation is based on the \TEX\
+%D based \METAPOST\ to \PDF\ converter. Shading is supported
+%D by overloading the \type {fill} operator as implemented
+%D earlier. In \PDF\ type~2 and~3 shading functions are
+%D specified in terms of:
+%D
+%D \starttabulate[|Tl|l|]
+%D \NC /Domain \NC sort of meeting range \NC \NR
+%D \NC /C0 \NC inner shade \NC \NR
+%D \NC /C1 \NC outer shade \NC \NR
+%D \NC /N \NC smaller values, bigger inner circles \NC \NR
+%D \stoptabulate
+
+% \newcount\currentPDFshade % 0 % global (document wide) counter
+%
+% \def\dosetMPsomePDFshade#1#2%
+% {\immediate\pdfobj
+% {<</FunctionType 2
+% /Domain [\gMPs1 \gMPs2]
+% /C0 [\MPshadeA]
+% /C1 [\MPshadeB]
+% /N \gMPs3>>}%
+% \immediate\pdfobj
+% {<</ShadingType #1
+% /ColorSpace /\MPresolvedspace
+% /Function \the\pdflastobj\space 0 R
+% /Coords [\MPshadeC]
+% /Extend [true true]>>}%
+% \global\advance\currentPDFshade \plusone
+% \ctxlua{lpdf.adddocumentshade("Sh\the\currentPDFshade",lpdf.reference(\the\pdflastobj))}%
+% \setxvalue{\@@MPSK#2}{\noexpand\dohandleMPshade{\the\currentPDFshade}}}
+%
+% \def\dosetMPlinearshade {\dosetMPsomePDFshade2}% #1
+% \def\dosetMPcircularshade{\dosetMPsomePDFshade3}% #1
+%
+% \defineMPspecial{30}
+% {\normalexpanded{\noexpand\resolveMPrgbcolor{\gMPs4}{\gMPs5}{\gMPs6}}\to\MPshadeA
+% \normalexpanded{\noexpand\resolveMPrgbcolor{\gMPs{9}}{\gMPs{10}}{\gMPs{11}}}\to\MPshadeB
+% \edef\MPshadeC{\gMPs7 \gMPs8 \gMPs{12} \gMPs{13}}%
+% \dosetMPlinearshade{\gMPs{14}}}
+%
+% \defineMPspecial{31}
+% {\normalexpanded{\noexpand\resolveMPrgbcolor{\gMPs4}{\gMPs5}{\gMPs6}}\to\MPshadeA
+% \normalexpanded{\noexpand\resolveMPrgbcolor{\gMPs{10}}{\gMPs{11}}{\gMPs{12}}}\to\MPshadeB
+% \edef\MPshadeC{\gMPs7 \gMPs8 \gMPs9 \gMPs{13} \gMPs{14} \gMPs{15}}%
+% \dosetMPcircularshade{\gMPs{16}}}
+%
+% \defineMPspecial{32}
+% {\normalexpanded{\noexpand\resolveMPcmykcolor{\gMPs4}{\gMPs5}{\gMPs6}{\gMPs7}}\to\MPshadeA
+% \normalexpanded{\noexpand\resolveMPcmykcolor{\gMPs{10}}{\gMPs{11}}{\gMPs{12}}{\gMPs{13}}}\to\MPshadeB
+% \edef\MPshadeC{\gMPs8 \gMPs9 \gMPs{14} \gMPs{15}}%
+% \dosetMPlinearshade{\gMPs{16}}}
+%
+% \defineMPspecial{33}
+% {\normalexpanded{\noexpand\resolveMPcmykcolor{\gMPs4}{\gMPs5}{\gMPs6}{\gMPs7}}\to\MPshadeA
+% \normalexpanded{\noexpand\resolveMPcmykcolor{\gMPs{11}}{\gMPs{12}}{\gMPs{13}}{\gMPs{14}}}\to\MPshadeB
+% \edef\MPshadeC{\gMPs8 \gMPs9 \gMPs{10} \gMPs{15} \gMPs{16} \gMPs{17}}%
+% \dosetMPcircularshade{\gMPs{18}}}
+%
+% \defineMPspecial{34}
+% {\normalexpanded{\noexpand\resolveMPspotcolor{\gMPs4}{\gMPs5}{\gMPs6}{\gMPs7}}\to\MPshadeA
+% \normalexpanded{\noexpand\resolveMPspotcolor{\gMPs{10}}{\gMPs{11}}{\gMPs{12}}{\gMPs{13}}}\to\MPshadeB
+% \edef\MPshadeC{\gMPs8 \gMPs9 \gMPs{14} \gMPs{15}}%
+% \dosetMPlinearshade{\gMPs{16}}}
+%
+% \defineMPspecial{35}
+% {\normalexpanded{\noexpand\resolveMPcmykcolor{\gMPs4}{\gMPs5}{\gMPs6}{\gMPs7}}\to\MPshadeA
+% \normalexpanded{\noexpand\resolveMPcmykcolor{\gMPs{11}}{\gMPs{12}}{\gMPs{13}}{\gMPs{14}}}\to\MPshadeB
+% \edef\MPshadeC{\gMPs8 \gMPs9 \gMPs{10} \gMPs{15} \gMPs{16} \gMPs{17}}%
+% \dosetMPcircularshade{\gMPs{18}}}
+%
+% \newconditional\ignoreMPpath
+%
+% \def\dohandleMPshade#1%
+% {\revokeMPtransparencyspecial
+% \settrue\ignoreMPpath
+% \def\extraMPpathcode{/Sh#1 sh Q}%
+% \pdfliteral{q /Pattern cs}}
+%
+% \defineMPspecial{10}
+% {\setxvalue{\@@MPSK\gMPs8}%
+% {\noexpand\handleMPfigurespecial{\gMPs1}{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}{\gMPs6}{\gMPs7}{\gMPs8}}}
+%
+% \def\handleMPfigurespecial#1#2#3#4#5#6#7#8% todo : combine with ext fig
+% {\letgvalueempty{\@@MPSK#8}%
+% \vbox to \zeropoint
+% {\vss
+% \hbox to \zeropoint
+% {\ifcase\pdfoutput\or % will be hooked into the special driver
+% \doiffileelse{#7}
+% {\doifundefinedelse{mps:x:#7}
+% {\immediate\pdfximage\s!width\onebasepoint\s!height\onebasepoint{#7}%
+% \setxvalue{mps:x:#7}{\pdfrefximage\the\pdflastximage}}%
+% {\message{[reusing figure #7]}}%
+% \pdfliteral{q #1 #2 #3 #4 #5 #6 cm}%
+% \rlap{\getvalue{mps:x:#7}}%
+% \pdfliteral{Q}}
+% {\message{[unknown figure #7]}}%
+% \fi
+% \hss}}}
+
+%D An example of using both special features is the
+%D following.
+%D
+%D \starttyping
+%D \startMPpage
+%D externalfigure "hakker1b.png" scaled 22cm rotated 10 shifted (-2cm,0cm);
+%D externalfigure "hakker1b.png" scaled 10cm rotated -10 ;
+%D externalfigure "hakker1b.png" scaled 7cm rotated 45 shifted (8cm,12cm) ;
+%D path p ; p := unitcircle xscaled 15cm yscaled 20cm;
+%D path q ; q := p rotatedaround(center p,90) ;
+%D path r ; r := buildcycle(p,q) ; clip currentpicture to r ;
+%D path s ; s := boundingbox currentpicture enlarged 5mm ;
+%D picture c ; c := currentpicture ; currentpicture := nullpicture ;
+%D circular_shade(s,0,.2red,.9red) ;
+%D addto currentpicture also c ;
+%D \stopMPpage
+%D \stoptyping
+
+% \defineMPspecial{20}
+% {\setxvalue{\@@MPSK\gMPs6}%
+% {\noexpand\handleMPhyperlink{\gMPs1}{\gMPs2}{\gMPs3}{\gMPs4}{\gMPs5}{\gMPs6}}}
+%
+% \def\handleMPhyperlink#1#2#3#4#5#6%
+% {\letgvalueempty{\@@MPSK#6}%
+% \setbox\scratchbox\hbox
+% {\setbox\scratchbox\emptyhbox
+% \wd\scratchbox\dimexpr-#1\onebasepoint+#3\onebasepoint\relax
+% \ht\scratchbox\dimexpr-#2\onebasepoint+#4\onebasepoint\relax
+% \gotobox{\box\scratchbox}[#5]}%
+% \setbox\scratchbox\hbox
+% {\hskip\dimexpr\MPxoffset\onebasepoint+#1\onebasepoint\relax
+% \raise\dimexpr\MPyoffset\onebasepoint+#2\onebasepoint\relax
+% \box\scratchbox}%
+% \smashbox\scratchbox
+% \box\scratchbox}
+
+%D This special (number 50) passes positions to a tex file.
+%D This method uses a two||pass approach an (mis|)|used the
+%D context positioning macros. In \type {core-pos} we will
+%D implement the low level submacro needed.
+%D
+%D \startbuffer
+%D \definelayer[test]
+%D
+%D \setlayer
+%D [test]
+%D [x=\MPx{somepos-1},y=\MPy{somepos-1}]
+%D {Whatever we want here!}
+%D
+%D \setlayer
+%D [test]
+%D [x=\MPx{somepos-2},y=\MPy{somepos-2}]
+%D {Whatever we need there!}
+%D
+%D \startuseMPgraphic{oeps}
+%D draw fullcircle scaled 6cm withcolor red ;
+%D register ("somepos-1",1cm,2cm,center currentpicture) ;
+%D register ("somepos-2",4cm,3cm,(-1cm,-2cm)) ;
+%D \stopuseMPgraphic
+%D
+%D \framed[background=test,offset=overlay]{\useMPgraphic{oeps}}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Here the width and height are not realy used, but one can
+%D imagine situations where tex has to work with values
+%D calculated by \METAPOST.
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D Later we will implement a more convenient macro:
+%D
+%D \starttyping
+%D \setMPlayer [test] [somepos-1] {Whatever we want here!}
+%D \setMPlayer [test] [somepos-2] {Whatever we need there!}
+%D \stoptyping
+
+\startMPinitializations
+ mp_shade_version := 2 ;
+\stopMPinitializations
+
+%D This is done much cleaner in \MPLIB.
+
+\def\MPStextext#1#2#3#4#5% if we clean up this plugin model, we can
+ {\def\MPtextdata{#3}% % delegate the splitter to lua + redesign
+ \def\MPtextsize{#2}%
+ \def\lastMPmoveX{#4}%
+ \def\lastMPmoveY{#5}%
+ \defconvertedcommand\MPtextdata\MPtextdata % no edef
+ \splitstring\MPtextdata\at::::\to\MPtexttag\and\MPtextnumber
+ \executeifdefined{handleMPtext\MPtexttag}
+ {\setbox\scratchbox\hbox % text
+ {\font\temp=#1\space at #2\onebasepoint
+ \let\c\char
+ \temp
+ \MPfshowcommand{#3}}%
+ \setbox\scratchbox\hpack
+ {\hskip#4\onebasepoint
+ \raise#5\onebasepoint
+ \box\scratchbox}%
+ \smashbox\scratchbox
+ \box\scratchbox}}
+
+We save the special variables on a stack. It's not that fast, but it make
+implementing the special more convenient.
+
+%D The boundingbox.
+
+\def\MPSboundingbox#1#2#3#4%
+ {\xdef\MPllx {#1}\xdef\MPlly{#2}\xdef\MPurx{#3}\xdef\MPury{#4}%
+ \xdef\MPwidth {\the\dimexpr#3\onebasepoint-#1\onebasepoint\relax}%
+ \xdef\MPheight{\the\dimexpr#4\onebasepoint-#2\onebasepoint\relax}}
+
+\MPSboundingbox0000
+
+%D Test code:
+
+% \startMPcode
+% fill fullcircle scaled 3cm withcolor red ;
+% fill fullcircle scaled 2cm withcolor green ;
+% fill fullcircle scaled 1cm withcolor blue ;
+% currentpicture := currentpicture shifted (-4cm,0) ;
+% fill fullcircle scaled 3cm withcolor cmyk(0,0,1,0) ;
+% fill fullcircle scaled 2cm withcolor cmyk(0,1,0,0) ;
+% fill fullcircle scaled 1cm withcolor cmyk(0,0,1,0) ;
+% currentpicture := currentpicture shifted (-4cm,0) ;
+% draw fullcircle scaled 3cm dashed evenly ;
+% draw fullcircle scaled 2cm dashed withdots ;
+% draw origin withpen pencircle scaled 3mm;
+% currentpicture := currentpicture shifted (-4cm,0) ;
+% fill fullcircle scaled 2cm shifted (-.5cm,+.5cm) withcolor transparent(1,.5,red);
+% fill fullcircle scaled 2cm shifted (-.5cm,-.5cm) withcolor transparent(1,.5,red);
+% fill fullcircle scaled 2cm shifted (+.5cm,+.5cm) withcolor transparent(1,.5,green);
+% fill fullcircle scaled 2cm shifted (+.5cm,-.5cm) withcolor transparent(1,.5,cmyk(1,0,1,.5));
+% currentpicture := currentpicture shifted (12cm,-4cm) ;
+% draw "o e p s" infont defaultfont scaled 2 shifted (-1cm,0) ;
+% currentpicture := currentpicture shifted (-4cm,0) ;
+% % bug: shift
+% draw fullcircle scaled 3cm withpen pencircle yscaled 3mm xscaled 2mm rotated 30 ;
+% draw fullcircle scaled 2cm withpen pencircle yscaled 3mm xscaled 2mm rotated 20 withcolor red ;
+% filldraw fullcircle scaled 1cm withpen pencircle yscaled 3mm xscaled 2mm rotated 10 withcolor green ;
+% currentpicture := currentpicture shifted (-4cm,0) ;
+% % shade cannot handle shift
+% circular_shade(fullcircle scaled 3cm,0,.2red,.9green) ;
+% circular_shade(fullcircle scaled 3cm shifted(+4cm,0),0,cmyk(1,0,0,0),cmyk(0,1,0,0)) ;
+% filldraw boundingbox currentpicture enlarged -3cm withpen pencircle scaled 1pt withcolor .5white ;
+% \stopMPcode
+
+% We cannot use attributes for switching colors in mp literals because
+% grouping (qQ) interferes.
+
+% \def\dohandleMPshade#1%
+% {\revokeMPtransparencyspecial
+% \settrue\ignoreMPpath
+% \def\extraMPpathcode{/#1 sh Q}%
+% \pdfliteral{q /Pattern cs}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/meta-tex.mkxl b/Master/texmf-dist/tex/context/base/mkxl/meta-tex.mkxl
new file mode 100644
index 00000000000..5937ce4083f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-tex.mkxl
@@ -0,0 +1,235 @@
+%D \module
+%D [ file=meta-tex,
+%D version=2006.06.07,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=\METAPOST\ fast text insertion,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{meta-tex}{}
+
+\unprotect
+
+% Ok, we support this in MkIV because Mojca kept the pressure on. It
+% looks a bit like a hack. But in fact this method is obsolete and
+% eventually might go away.
+
+\installcorenamespace{graphictextext}
+\installcorenamespace{graphictexdepth}
+\installcorenamespace{graphictexarguments}
+
+\permanent\protected\def\startTeXtexts#1\stopTeXtexts
+ {#1}
+
+\aliased\let\stopTeXtexts\relax
+
+\permanent\tolerant\protected\def\TeXtext[#1]#:#2#3% contrary to mkii we don't process yet but we do expand
+ {\setxvalue{\??graphictextext#2}{\meta_textext_indeed{#1}{#3}}}
+
+\protected\def\meta_textext_indeed#1#2%
+ {\begingroup
+ \setbox\nextbox\hbox{#2}%
+ \ifcsname\??graphictexdepth#1\endcsname
+ \lastnamedcs
+ \else
+ \syst_boxes_lower_nextbox_dp
+ \fi
+ \box\nextbox
+ \endgroup}
+
+\permanent\def\getTeXtext#1%
+ {\begincsname\??graphictextext#1\endcsname}
+
+\letvalue{\??graphictexdepth d}\syst_boxes_lower_nextbox_dp
+\letvalue{\??graphictexdepth \s!depth}\syst_boxes_lower_nextbox_dp
+\letvalue{\??graphictexdepth n}\donothing
+\letvalue{\??graphictexdepth\s!nodepth}\donothing
+
+% old hackery, slightly modernized
+
+\permanent\protected\def\definetextext[#1]%
+ {\tolerant\defcsname\??graphictexarguments#1\endcsname}
+
+\permanent\tolerant\def\sometxt[#1]#*[#2]%
+ {\ifarguments
+ \expandafter\meta_some_txt_a
+ \or
+ \expandafter\meta_some_txt_b
+ \or
+ \expandafter\meta_some_txt_c
+ \or
+ \fi{#1}{#2}}
+
+\def\meta_some_txt_a#1#2#3{textext.drt("\clf_metapostescaped{#3}")}
+\def\meta_some_txt_b#1#2#3{textext.drt("\mpsometxt{#1}{\clf_metapostescaped{#3}}")}
+\def\meta_some_txt_c#1#2#3{textext.drt("\mpsometxt{#1}[#2]{\clf_metapostescaped{#3}}")}
+
+\permanent\protected\def\mpsometxt#1%
+ {\begincsname\??graphictexarguments#1\endcsname}
+
+% \definetextext[framed]{\framed}
+%
+% \startMPcode
+% draw \sometxt[framed]{black} rotated 45 ;
+% \stopMPcode
+%
+% But Mojca wanted more! Two arguments.
+%
+% \definetextext[framed]{\framed}
+%
+% \startMPcode
+% draw \sometxt{This is for} rotated 45 ;
+% draw \sometxt[framed][foregroundstyle=bold]{Mojca's};
+% draw \sometxt[framed]{eyes only!} rotated -45 ;
+% \stopMPcode
+%
+% \definetextext[framed][#1]#2{\framed[width=4cm]{\switchtobodyfont[#1]#2}}
+% \definetextext[simple]{\framed[width=8cm]}
+%
+% \starttext
+%
+% \startMPcode
+% draw \sometxt{This is for} rotated 45 ;
+% draw \sometxt[framed][ss,16pt] {Mojca's};
+% draw \sometxt[framed]{eyes only!} rotated -45 ;
+% draw \sometxt[simple]{Quotes "indeed" work!} rotated 180 ;
+% \stopMPcode
+%
+% \stoptext
+%
+% a lua one:
+%
+% \protected\def\definetextext[#1]#2{\setvalue{@@st@@#1}{#2}}
+%
+% \def\sometxt #1#{\dosometxt{#1}} % grab optional [args]
+% \def\dosometxt #1#2{\ctxlua{metapost.sometxt(\!!bs#1\!!es,\!!bs#2\!!es)}}
+%
+% \def\sometxta #1{textext.drt("#1")}
+% \def\sometxtb #1#2{textext.drt("\getvalue{@@st@@#1}{#2}")}
+% \def\sometxtc #1#2#3{textext.drt("\getvalue{@@st@@#1}{\switchtobodyfont[#2]#3}")}
+
+% Best use the mp macro instead since it provides positioning.
+%
+% \startuseMPgraphic{testgraphic}
+% draw \sometxt{\ruledhbox{\strut hans hagen}} scaled 3;
+% % draw textext.drt("\ruledhbox{\strut hans hagen}") scaled 3;
+% % draw textext.dlft("\ruledhbox{\strut hans hagen}") scaled 3;
+% % draw textext.lft("\ruledhbox{\strut hans hagen}") scaled 3;
+% draw llcorner currentpicture -- urcorner currentpicture withcolor yellow;
+% draw lrcorner currentpicture -- ulcorner currentpicture withcolor yellow;
+% draw boundingbox currentpicture withcolor blue ;
+% draw origin withcolor red withpen pencircle scaled 1pt;
+% \stopuseMPgraphic
+%
+% {\showstruts\useMPgraphic{testgraphic}}
+
+\permanent\protected\def\MPexponent #1#2{\mathematics{#1\times10^{#2}}}
+\permanent\protected\def\MPformatted #1#2{\clf_metapostformatted{#1}{#2}}
+\permanent\protected\def\MPgraphformat#1#2{\clf_metapostgraphformat{#1}{#2}}
+
+%D Some new fun (but exprimental for a while):
+
+\permanent\protected\def\MPLIBoutlinetext#1#2#3% index kind text
+ {\begingroup
+ \setbox\scratchbox\hbox{#3}%
+ \clf_MPLIBconvertoutlinetext\numexpr#1\relax{#2}\scratchbox
+ \endgroup}
+
+%D For now here. We don't do the whole thing, because then one can as
+%D well just export to pdf. We assume consistent integration.
+
+\definefontsynonym[serif-normal-normal] [\s!Serif]
+\definefontsynonym[serif-normal-italic] [\s!SerifItalic]
+\definefontsynonym[serif-normal-oblique][\s!SerifSlanted]
+\definefontsynonym[serif-bold-normal] [\s!SerifBold]
+\definefontsynonym[serif-bold-italic] [\s!SerifBoldItalic]
+\definefontsynonym[serif-bold-oblique] [\s!SerifBoldSlanted]
+
+\definefontsynonym[sans-normal-normal] [\s!Sans]
+\definefontsynonym[sans-normal-italic] [\s!SansItalic]
+\definefontsynonym[sans-normal-oblique] [\s!SansSlanted]
+\definefontsynonym[sans-bold-normal] [\s!SansBold]
+\definefontsynonym[sans-bold-italic] [\s!SansBoldItalic]
+\definefontsynonym[sans-bold-oblique] [\s!SansBoldSlanted]
+
+\definefontsynonym[mono-normal-normal] [\s!Mono]
+\definefontsynonym[mono-normal-italic] [\s!MonoItalic]
+\definefontsynonym[mono-normal-oblique] [\s!MonoSlanted]
+\definefontsynonym[mono-bold-normal] [\s!MonoBold]
+\definefontsynonym[mono-bold-italic] [\s!MonoBoldItalic]
+\definefontsynonym[mono-bold-oblique] [\s!MonoBoldSlanted]
+
+\installcorenamespace {svgfamily}
+
+\setvalue{\??svgfamily }{serif}
+\setvalue{\??svgfamily serif}{serif}
+\setvalue{\??svgfamily sans}{sans}
+\setvalue{\??svgfamily mono}{mono}
+
+%D This can't change because otherwise \type {\scale[width=4cm]{graphic}} fails.
+
+\permanent\protected\def\svgscaled#1%
+ {\fastsxsy{#1}{#1}\svgnormal}
+
+\permanent\protected\def\svgnormal#1#2#3#4% family weight style text
+ {\bgroup
+ \edef\p_family{#1}%
+ \ifempty\p_family\else
+ \edef\p_font{\ifcsname\??svgfamily#1\endcsname\lastnamedcs\else#1\fi-#2-#3}%
+ \predefinedfont[\s!spec:\p_font*\s!default\space @ 10bp]%
+ \fi
+ #4%
+ \egroup}
+
+\permanent\protected\def\svgcolored#1#2#3#4% r g b text
+ {\colored[r=#1,g=#2,b=#3]{#4}}
+
+% \permanent\protected\def\svgplaced#1#2#3#4% dx dy width text
+% {\doifelsenothing{#3}%
+% {\hpack}%
+% {\hpack to #3}%
+% {\raise#2\onebasepoint\hbox{\kern#1\onebasepoint\relax#4}}}
+
+\permanent\protected\def\svgplaced#1#2#3#4% dx dy width text
+ {\doifelsenothing{#3}%
+ {\hpack}%
+ {\hpack to #3}%
+ {\offsetbox[\c!y=#2]\hbox{\kern#1\relax#4}}}
+
+\newdimen\grph_svg_scratchwidth % maybe \startsvgpos etc
+
+\permanent\protected\def\svgposchar#1#2#3% dx dy char
+ {\setbox\scratchbox\hpack\bgroup
+ \raise#2\onebasepoint\hbox\bgroup
+ \kern\dimexpr#1\onebasepoint-\grph_svg_scratchwidth\relax
+ \char#3\relax
+ \egroup
+ \egroup
+ \advance\grph_svg_scratchwidth\wd\scratchbox
+ \box\scratchbox}
+
+\permanent\protected\def\svgchar#1% char
+ {\char#1\relax}
+
+\definelayer[svgmps][\c!method=\v!fit]
+
+\permanent\protected\def\svgstartlayer
+ {\resetlayer[svgmps]%
+ \setlayer[svgmps]\bgroup}
+
+\permanent\protected\def\svgstoplayer
+ {\egroup
+ \flushlayer[svgmps]}
+
+\permanent\protected\def\svgsetlayer#1#2%
+ {\setlayer[svgmps][\c!x=#1\onebasepoint,\c!y=#2\onebasepoint]} % {#3}
+
+\permanent\protected\def\svghashed#1%
+ {\clf_svghashed#1\relax}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-pag.mkiv b/Master/texmf-dist/tex/context/base/mkxl/meta-xml.mkxl
index 970939dcf76..bd93bda8c5b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-pag.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkxl/meta-xml.mkxl
@@ -1,8 +1,8 @@
%D \module
-%D [ file=node-pag,
-%D version=2008.09.30,
-%D title=\CONTEXT\ Node Macros,
-%D subtitle=Page Building,
+%D [ file=meta-xml,
+%D version=2002.11.27,
+%D title=\METAPOST\ Graphics,
+%D subtitle=XML Hacks,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
@@ -11,10 +11,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{ConTeXt Node Macros / Page Building}
+\writestatus{loading}{MetaPost Graphics / XML Hacks}
\unprotect
-\registerctxluafile{node-pag}{}
+% not needed in mkiv
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-cnt.lua b/Master/texmf-dist/tex/context/base/mkxl/mlib-cnt.lmt
index 761eac6551a..bddcb33b854 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-cnt.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-cnt.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['mlib-cnt'] = {
version = 1.001,
+ optimize = true,
comment = "companion to mlib-ctx.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -52,7 +53,8 @@ local bor = bit32.bor -- it's really time to ditch support for luajit
local starttiming = statistics.starttiming
local stoptiming = statistics.stoptiming
-local elapsedtime = statistics.elapsedtime
+local resettiming = statistics.resettiming
+local elapsedtiming = statistics.elapsed
local formatters = string.formatters
local setmetatableindex = table.setmetatableindex
@@ -249,6 +251,7 @@ end
function mp.lmt_contours_start()
+ resettiming("lmt_contours")
starttiming("lmt_contours")
nofcontours = nofcontours + 1
@@ -545,14 +548,12 @@ end
function mp.lmt_contours_stop()
local p = getparameterset()
- local e = stoptiming("lmt_contours")
+ stoptiming("lmt_contours")
setcache(p)
p.result = nil
local f = p["function"]
local l = p.functions
- report("index %i, %0.3f seconds for: %s",
- nofcontours, e, "[ " .. concat(l or { f } ," ] [ ") .. " ]"
- )
+ report("index %i, %0.3f seconds for: %s", nofcontours, elapsedtiming("lmt_contours"), "[ " .. concat(l or { f } ," ] [ ") .. " ]")
end
function mp.lmt_contours_bitmap_set()
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.lmt
new file mode 100644
index 00000000000..2569a6066b2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.lmt
@@ -0,0 +1,420 @@
+if not modules then modules = { } end modules ['mlib-ctx'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local type, tostring = type, tostring
+local format, concat = string.format, table.concat
+local settings_to_hash = utilities.parsers.settings_to_hash
+local formatters = string.formatters
+
+local report_metapost = logs.reporter ("metapost")
+local status_metapost = logs.messenger("metapost")
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local trace_graphic = false
+
+trackers.register("metapost.graphics",
+ function(v) trace_graphic = v end
+);
+
+local mplib = mplib
+
+metapost = metapost or { }
+local metapost = metapost
+local context = context
+
+local setters = tokens.setters
+local setmacro = setters.macro
+local implement = interfaces.implement
+
+local v_no = interfaces.variables.no
+
+local extensiondata = metapost.extensiondata or storage.allocate { }
+metapost.extensiondata = extensiondata
+
+storage.register("metapost/extensiondata",extensiondata,"metapost.extensiondata")
+
+function metapost.setextensions(instances,data)
+ if data and data ~= "" then
+ extensiondata[#extensiondata+1] = {
+ usedinall = not instances or instances == "",
+ instances = settings_to_hash(instances or ""),
+ extensions = data,
+ }
+ end
+end
+
+function metapost.getextensions(instance,state)
+ if state and state == v_no then
+ return ""
+ else
+ local t = { }
+ for i=1,#extensiondata do
+ local e = extensiondata[i]
+ local status = e.instances[instance]
+ if (status ~= true) and (e.usedinall or status) then
+ t[#t+1] = e.extensions
+ e.instances[instance] = true
+ end
+ end
+ return concat(t," ")
+ end
+end
+
+implement {
+ name = "setmpextensions",
+ actions = metapost.setextensions,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "getmpextensions",
+ actions = { metapost.getextensions, context } ,
+ arguments = "string"
+}
+
+local patterns = {
+ "meta-imp-%s.mkxl",
+ "meta-imp-%s.mkiv",
+ "meta-imp-%s.tex",
+ -- obsolete:
+ "meta-%s.mkiv",
+ "meta-%s.tex"
+}
+
+local function action(name,foundname)
+ commands.loadlibrary(name,foundname,false)
+ status_metapost("library %a is loaded",name)
+end
+
+local function failure(name)
+ report_metapost("library %a is unknown or invalid",name)
+end
+
+implement {
+ name = "useMPlibrary",
+ arguments = "string",
+ actions = function(name)
+ resolvers.uselibrary {
+ name = name,
+ patterns = patterns,
+ action = action,
+ failure = failure,
+ onlyonce = true,
+ }
+ end
+}
+
+-- metapost.variables = { } -- to be stacked
+
+implement {
+ name = "mprunvar",
+ arguments = "string",
+ actions = function(name)
+ local value = metapost.variables[name]
+ if value ~= nil then
+ local tvalue = type(value)
+ if tvalue == "table" then
+ context(concat(value," "))
+ elseif tvalue == "number" or tvalue == "boolean" then
+ context(tostring(value))
+ elseif tvalue == "string" then
+ context(value)
+ end
+ end
+ end
+}
+
+implement {
+ name = "mpruntab",
+ arguments = { "string", "integer" },
+ actions = function(name,n)
+ local value = metapost.variables[name]
+ if value ~= nil then
+ local tvalue = type(value)
+ if tvalue == "table" then
+ context(value[n])
+ elseif tvalue == "number" or tvalue == "boolean" then
+ context(tostring(value))
+ elseif tvalue == "string" then
+ context(value)
+ end
+ end
+ end
+}
+
+implement {
+ name = "mprunset",
+ arguments = "2 strings",
+ actions = function(name,connector)
+ local value = metapost.variables[name]
+ if value ~= nil then
+ local tvalue = type(value)
+ if tvalue == "table" then
+ context(concat(value,connector))
+ elseif tvalue == "number" or tvalue == "boolean" then
+ context(tostring(value))
+ elseif tvalue == "string" then
+ context(value)
+ end
+ end
+ end
+}
+
+-- we need to move more from pps to here as pps is the plugin .. the order is a mess
+-- or just move the scanners to pps
+
+function metapost.graphic(specification)
+ metapost.pushformat(specification)
+ metapost.graphic_base_pass(specification)
+ metapost.popformat()
+end
+
+function metapost.startgraphic(t)
+ if not t then
+ t = { }
+ end
+ if not t.instance then
+ t.instance = metapost.defaultinstance
+ end
+ if not t.format then
+ t.format = metapost.defaultformat
+ end
+ if not t.method then
+ t.method = metapost.defaultmethod
+ end
+ t.data = { }
+ return t
+end
+
+function metapost.stopgraphic(t)
+ if t then
+ t.data = concat(t.data or { },"\n")
+ if trace_graphic then
+ report_metapost("\n"..t.data.."\n")
+ end
+ metapost.graphic(t)
+ end
+end
+
+function metapost.tographic(t,f,s,...)
+ local d = t.data
+ d[#d+1] = s and formatters[f](s,...) or f
+end
+
+implement {
+ name = "mpgraphic",
+ actions = metapost.graphic,
+ arguments = {
+ {
+ { "instance" },
+ { "format" },
+ { "data" },
+ { "initializations" },
+ { "extensions" },
+ { "inclusions" },
+ { "definitions" },
+ { "figure" },
+ { "method" },
+ { "namespace" },
+ }
+ }
+}
+
+implement {
+ name = "mpsetoutercolor",
+ actions = function(...) metapost.setoutercolor(...) end, -- not yet implemented
+ arguments = { "integer", "integer", "integer", "integer" }
+}
+
+-- this has to become a codeinjection
+
+function metapost.getclippath(specification) -- why not a special instance for this
+ local mpx = metapost.pushformat(specification)
+ local data = specification.data or ""
+ if mpx and data ~= "" then
+ starttiming(metapost)
+ starttiming(metapost.exectime)
+ local result = mpx:execute ( format ( "%s;%s;beginfig(1);%s;%s;endfig;",
+ specification.extensions or "",
+ specification.inclusions or "",
+ specification.initializations or "",
+ data
+ ) )
+ stoptiming(metapost.exectime)
+ if result.status > 0 then
+ report_metapost("%s: %s", result.status, result.error or result.term or result.log)
+ result = nil
+ else
+ result = metapost.filterclippath(result)
+ end
+ stoptiming(metapost)
+ metapost.popformat()
+ return result
+ else
+ metapost.popformat()
+ end
+end
+
+function metapost.filterclippath(result)
+ if result then
+ local figures = result.fig
+ if figures and #figures > 0 then
+ local figure = figures[1]
+ local objects = figure:objects()
+ if objects then
+ local lastclippath
+ for o=1,#objects do
+ local object = objects[o]
+ if object.type == "start_clip" then
+ lastclippath = object.path
+ end
+ end
+ return lastclippath
+ end
+ end
+ end
+end
+
+function metapost.theclippath(...)
+ local result = metapost.getclippath(...)
+ if result then -- we could just print the table
+ return concat(metapost.flushnormalpath(result)," ")
+ else
+ return ""
+ end
+end
+
+implement {
+ name = "mpsetclippath",
+ actions = function(specification)
+ local p = specification.data and metapost.theclippath(specification)
+ if not p or p == "" then
+ local b = number.dimenfactors.bp
+ local w = b * (specification.width or 0)
+ local h = b * (specification.height or 0)
+ p = formatters["0 0 m %.6N 0 l %.6N %.6N l 0 %.6N l"](w,w,h,h)
+ end
+ setmacro("MPclippath",p,"global")
+ end,
+ arguments = {
+ {
+ { "instance" },
+ { "format" },
+ { "data" },
+ { "initializations" },
+ { "useextensions" },
+ { "inclusions" },
+ { "method" },
+ { "namespace" },
+ { "width", "dimension" },
+ { "height", "dimension" },
+ },
+ }
+}
+
+statistics.register("metapost", function()
+ local n = metapost.nofruns
+ if n and n > 0 then
+ local elapsedtime = statistics.elapsedtime
+ local elapsed = statistics.elapsed
+ local runs, stats = metapost.nofscriptruns()
+ local instances,
+ memory = metapost.getstatistics(true)
+ return format("%s seconds, loading: %s, execution: %s, n: %s, average: %s, instances: %i, luacalls: %s, memory: %0.3f M",
+ elapsedtime(metapost), elapsedtime(mplib), elapsedtime(metapost.exectime), n,
+ elapsedtime((elapsed(metapost) + elapsed(mplib) + elapsed(metapost.exectime)) / n),
+ instances, stats and stats or runs, memory/(1024*1024))
+ else
+ return nil
+ end
+end)
+
+-- only used in graphictexts
+
+metapost.tex = metapost.tex or { }
+local mptex = metapost.tex
+
+local environments = { }
+
+function mptex.set(str)
+ environments[#environments+1] = str
+end
+
+function mptex.setfrombuffer(name)
+ environments[#environments+1] = buffers.getcontent(name)
+end
+
+function mptex.get()
+ return concat(environments,"\n")
+end
+
+function mptex.reset()
+ environments = { }
+end
+
+implement {
+ name = "mppushvariables",
+ actions = metapost.pushvariables,
+}
+
+implement {
+ name = "mppopvariables",
+ actions = metapost.popvariables,
+}
+
+implement {
+ name = "mptexset",
+ arguments = "string",
+ actions = mptex.set
+}
+
+implement {
+ name = "mptexsetfrombuffer",
+ arguments = "string",
+ actions = mptex.setfrombuffer
+}
+
+implement {
+ name = "mptexget",
+ actions = { mptex.get, context }
+}
+
+implement {
+ name = "mptexreset",
+ actions = mptex.reset
+}
+
+-- moved from mlib-lua:
+
+mp = mp or { -- system namespace
+ set = { },
+ get = { },
+ aux = { },
+ scan = { },
+ skip = { },
+ inject = { },
+}
+
+MP = MP or { } -- user namespace
+
+-- We had this:
+--
+-- table.setmetatablecall(mp,function(t,k) mpprint(k) end)
+--
+-- but the next one is more interesting because we cannot use calls like:
+--
+-- lua.mp.somedefdname("foo")
+--
+-- which is due to expansion of somedefdname during suffix creation. So:
+--
+-- lua.mp("somedefdname","foo")
+
+table.setmetatablecall(mp,function(t,k,...) return t[k](...) end)
+table.setmetatablecall(MP,function(t,k,...) return t[k](...) end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.mkxl
new file mode 100644
index 00000000000..fb069b6ea88
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-ctx.mkxl
@@ -0,0 +1,34 @@
+%D \module
+%D [ file=mlib-ctx,
+%D version=2008.03.25,
+%D title=\METAPOST\ Integrated Graphics,
+%D subtitle=Basics,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{MetaPost Library Graphics / Initializations}
+
+\installcorenamespace{graphicvariable}
+
+\registerctxluafile{mlib-fio}{autosuffix}
+\registerctxluafile{mlib-run}{autosuffix}
+\registerctxluafile{mlib-ctx}{autosuffix}
+\registerctxluafile{mlib-lua}{autosuffix}
+\registerctxluafile{mlib-mpf}{autosuffix}
+\registerctxluafile{mlib-scn}{autosuffix}
+\registerctxluafile{mlib-mat}{autosuffix}
+\registerctxluafile{mlib-ran}{autosuffix}
+\registerctxluafile{mlib-lmp}{autosuffix}
+\registerctxluafile{mlib-int}{autosuffix}
+\registerctxluafile{mlib-lmt}{autosuffix}
+\registerctxluafile{mlib-cnt}{autosuffix,optimize}
+\registerctxluafile{mlib-svg}{autosuffix,optimize}
+
+\unprotect
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-fio.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-fio.lmt
new file mode 100644
index 00000000000..9de61affef7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-fio.lmt
@@ -0,0 +1,289 @@
+if not modules then modules = { } end modules ['mlib-fio'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local type = type
+local find = string.find
+local concat = table.concat
+local suffix, addsuffix = file.suffix, file.addsuffix
+
+local findfile = resolvers.findfile
+local new_instance = mplib.new
+
+local trace_terminal = false trackers.register("metapost.terminal", function(v) trace_terminal = v end)
+
+local report_metapost = logs.reporter("metapost")
+local report_terminal = logs.reporter("metapost","terminal")
+local report_logger = logs.reporter("metapost","log")
+local report_error = logs.reporter("metapost","error")
+
+mplib.realtimelogging = false
+
+local l, nl, dl = { }, 0, false
+local t, nt, dt = { }, 0, false
+local e, ne, de = { }, 0, false
+
+local function logger(target,str)
+ if target == 1 then
+ -- log
+ elseif target == 2 or target == 3 then
+ -- term
+ if str == "\n" then
+ mplib.realtimelogging = true
+ if nl > 0 then
+ report_logger(concat(l,"",1,nl))
+ nl, dl = 0, false
+ elseif not dl then
+ report_logger("")
+ dl = true
+ end
+ else
+ nl = nl + 1
+ l[nl] = str
+ end
+ elseif target == 4 then
+ report_error(str)
+ end
+end
+
+local finders = { }
+mplib.finders = finders -- also used in meta-lua.lua
+
+local function validftype(ftype)
+ if ftype == "mp" then
+ return "mp"
+ else
+ return nil
+ end
+end
+
+-- We can have a list!
+
+local suffixlist = { "mpxl", "mpiv", "mp" } -- no "mf"
+
+local function findmpfile(name,ftype)
+ local validtyp = validftype(ftype)
+ local fullname = findfile(name,validtyp)
+ if fullname and fullname ~= "" then
+ return fullname
+ elseif suffix(name) == "" then
+ for i=1,#suffixlist do
+ fullname = findfile(addsuffix(name,suffixlist[i]),validtyp)
+ if fullname and fullname ~= "" then
+ return fullname
+ end
+ end
+ end
+ return nil
+end
+
+finders.file = function(specification,name,mode,kind)
+ if mode == "r" then
+ return findmpfile(name,kind)
+ elseif file.is_writable(name) then
+ return name
+ else
+ return nil
+ end
+end
+
+local function finder(name,mode,kind) -- fake message for mpost.map and metafun.mpvi
+ local specification = url.hashed(name)
+ local finder = finders[specification.scheme] or finders.file
+ local found = finder(specification,name,mode,validftype(ftype))
+ return found
+end
+
+local findtexfile = resolvers.findtexfile
+local opentexfile = resolvers.opentexfile
+local splitlines = string.splitlines
+
+local function writetoterminal(terminaldata,maxterm,d)
+ local t = type(d)
+ local n = 0
+ if t == "string" then
+ d = splitlines(d)
+ n = #d
+ for i=1,#d do
+ maxterm = maxterm + 1
+ terminaldata[maxterm] = d[i]
+ end
+ elseif t == "table" then
+ for i=1,#d do
+ local l = d[i]
+ if not l then
+ -- just ignore
+ elseif find(l,"[\n\r]") then
+ local s = splitlines(l)
+ local m = #s
+ for i=1,m do
+ maxterm = maxterm + 1
+ terminaldata[maxterm] = s[i]
+ end
+ n = n + m
+ else
+ maxterm = maxterm + 1
+ terminaldata[maxterm] = d[i]
+ n = 1
+ end
+ end
+ end
+ if trace_terminal then
+ report_metapost("writing %i lines, in cache %s",n,maxterm)
+ end
+ return maxterm
+end
+
+local function readfromterminal(terminaldata,maxterm,nowterm)
+ if nowterm >= maxterm then
+ terminaldata[nowterm] = false
+ maxterm = 0
+ nowterm = 0
+ if trace_terminal then
+ report_metapost("resetting, maxcache %i",#terminaldata)
+ end
+ return maxterm, nowterm, nil
+ else
+ if nowterm > 0 then
+ terminaldata[nowterm] = false
+ end
+ nowterm = nowterm + 1
+ local s = terminaldata[nowterm]
+ if trace_terminal then
+ report_metapost("reading line %i: %s",nowterm,s)
+ end
+ return maxterm, nowterm, s
+ end
+end
+
+local function fileopener()
+
+ -- these can go into the table itself
+
+ local terminaldata = { }
+ local maxterm = 0
+ local nowterm = 0
+
+ local terminal = {
+ name = "terminal",
+ close = function()
+ -- terminal = { }
+ -- maxterm = 0
+ -- nowterm = 0
+ end,
+ reader = function()
+ local line
+ maxterm, nowterm, line = readfromterminal(terminaldata,maxterm,nowterm)
+ return line
+ end,
+ writer = function(d)
+ maxterm = writetoterminal(terminaldata,maxterm,d)
+ end,
+ }
+
+ return function(name,mode,kind)
+ if name == "terminal" then
+ -- report_metapost("opening terminal")
+ return terminal
+ elseif mode == "w" then
+ -- we need an extra check here for permissions
+ local f = io.open(name,"wb")
+ if f then
+ -- report_metapost("opening file %a for writing",full)
+ return {
+ name = full,
+ writer = function(s) return f:write(s) end, -- io.write(f,s)
+ close = function() f:close() end,
+ }
+ end
+ else
+ local full = findtexfile(name,validftype(ftype))
+ if full then
+ -- report_metapost("opening file %a for reading",full)
+ return opentexfile(full)
+ end
+ end
+ end
+
+end
+
+local overloadmode = "warning"
+
+directives.register("metapost.overloadmode",function(v)
+ if v == "warning" or v == "error" then
+ overloadmode = v
+ else
+ overloadmode= false
+ end
+end)
+
+local propertycodes = {
+ [-3] = "mutable",
+ [ 1] = "primitive",
+ [ 2] = "permanent",
+ [ 3] = "immutable",
+}
+
+mplib.propertycodes = propertycodes
+
+local report = logs.reporter("metafun", "log")
+
+local function overload(property,name)
+ if overloadmode and property >= 0 then
+ -- turn of warning after format is loaded
+ local code = propertycodes[property] or "unknown"
+ report("overloading %s %a",code, name)
+ -- no overload permitted
+ if overloadmode == "error" then
+ luatex.abort()
+ end
+ return false
+ else
+ -- overload permitted
+ return true
+ end
+end
+
+local showcontext = mplib.showcontext
+
+local function handleerror(instance, message, helpinfo, interaction)
+ report()
+ report("error: %s", message)
+ report()
+ showcontext(instance)
+ report()
+ report(helpinfo)
+ report()
+ if interaction == 5 then
+ -- todo
+-- luatex.abort()
+ end
+end
+
+local function handlewarning(instance, message)
+ report()
+ report("warning: %s", message)
+ report()
+end
+
+function mplib.new(specification)
+ local instance
+ local openfile = fileopener()
+ specification.find_file = finder
+ specification.run_logger = logger
+ specification.run_overload = overload
+ specification.run_error = function(...) handleerror (instance,...) end
+ specification.run_warning = function(...) handlewarning(instance,...) end
+ specification.open_file = openfile
+ specification.interaction = "silent"
+ specification.job_name = tex.jobname -- mandate in order to get something back
+ specification.halt_on_error = true
+ instance = new_instance(specification)
+ return instance, openfile("terminal")
+end
+
+mplib.finder = finder
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-int.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-int.lmt
new file mode 100644
index 00000000000..a936e55924e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-int.lmt
@@ -0,0 +1,160 @@
+if not modules then modules = { } end modules ['mlib-int'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local factor = number.dimenfactors.bp
+local mpstring = mp.string
+local mpboolean = mp.boolean
+local getdimen = tex.getdimen
+local getcount = tex.getcount
+local getmacro = tokens.getters.macro
+local get = tex.get
+local emwidths = fonts.hashes.emwidths
+local exheights = fonts.hashes.exheights
+
+local registerscript = metapost.registerscript
+
+local on_right_page = structures.pages.on_right
+local is_odd_page = structures.pages.is_odd
+local in_body_page = structures.pages.in_body
+local page_fraction = structures.pages.fraction
+local layout_has_changed = structures.pages.has_changed
+
+local function defaultcolormodel() -- can be helper
+ local colormethod = getcount("MPcolormethod")
+ return (colormethod == 0 or colormethod == 1) and 1 or 3
+end
+
+do
+
+ local t = os.date("*t") -- maybe this should be a very early on global
+
+ -- If we want to do a vardef then we first need to catch an endgroup and
+ -- that then fails because we have a variable sitting there, so they need
+ -- to be def's at the mp end.
+
+ local assignment_code = metapost.codes.assignment
+
+ local mpscannext = mp.scan.next
+ local mpscaninteger = mp.scan.integer
+
+ local function item(name)
+ local n = mpscannext(true) -- keep
+ if n == assignment_code then
+ mpscannext()
+ t[name] = mpscaninteger()
+ else
+ return t[name]
+ end
+ end
+
+ registerscript("year", function() return item("year") end)
+ registerscript("month", function() return item("month") end)
+ registerscript("day", function() return item("day") end)
+ registerscript("hour", function() return item("hour") end)
+ registerscript("minute", function() return item("min") end)
+ registerscript("second", function() return item("sec") end)
+
+end
+
+registerscript("PaperHeight", function() return getdimen("paperheight") * factor end)
+registerscript("PaperWidth", function() return getdimen("paperwidth") * factor end)
+registerscript("PrintPaperHeight", function() return getdimen("printpaperheight") * factor end)
+registerscript("PrintPaperWidth", function() return getdimen("printpaperwidth") * factor end)
+registerscript("TopSpace", function() return getdimen("topspace") * factor end)
+registerscript("BottomSpace", function() return getdimen("bottomspace") * factor end)
+registerscript("BackSpace", function() return getdimen("backspace") * factor end)
+registerscript("CutSpace", function() return getdimen("cutspace") * factor end)
+registerscript("MakeupHeight", function() return getdimen("makeupheight") * factor end)
+registerscript("MakeupWidth", function() return getdimen("makeupwidth") * factor end)
+registerscript("TopHeight", function() return getdimen("topheight") * factor end)
+registerscript("TopDistance", function() return getdimen("topdistance") * factor end)
+registerscript("HeaderHeight", function() return getdimen("headerheight") * factor end)
+registerscript("HeaderDistance", function() return getdimen("headerdistance") * factor end)
+registerscript("TextHeight", function() return getdimen("textheight") * factor end)
+registerscript("FooterDistance", function() return getdimen("footerdistance") * factor end)
+registerscript("FooterHeight", function() return getdimen("footerheight") * factor end)
+registerscript("BottomDistance", function() return getdimen("bottomdistance") * factor end)
+registerscript("BottomHeight", function() return getdimen("bottomheight") * factor end)
+registerscript("LeftEdgeWidth", function() return getdimen("leftedgewidth") * factor end)
+registerscript("LeftEdgeDistance", function() return getdimen("leftedgedistance") * factor end)
+registerscript("LeftMarginWidth", function() return getdimen("leftmarginwidth") * factor end)
+registerscript("LeftMarginDistance", function() return getdimen("leftmargindistance") * factor end)
+registerscript("TextWidth", function() return getdimen("textwidth") * factor end)
+registerscript("RightMarginDistance", function() return getdimen("rightmargindistance") * factor end)
+registerscript("RightMarginWidth", function() return getdimen("rightmarginwidth") * factor end)
+registerscript("RightEdgeDistance", function() return getdimen("rightedgedistance") * factor end)
+registerscript("RightEdgeWidth", function() return getdimen("rightedgewidth") * factor end)
+registerscript("InnerMarginDistance", function() return getdimen("innermargindistance") * factor end)
+registerscript("InnerMarginWidth", function() return getdimen("innermarginwidth") * factor end)
+registerscript("OuterMarginDistance", function() return getdimen("outermargindistance") * factor end)
+registerscript("OuterMarginWidth", function() return getdimen("outermarginwidth") * factor end)
+registerscript("InnerEdgeDistance", function() return getdimen("inneredgedistance") * factor end)
+registerscript("InnerEdgeWidth", function() return getdimen("inneredgewidth") * factor end)
+registerscript("OuterEdgeDistance", function() return getdimen("outeredgedistance") * factor end)
+registerscript("OuterEdgeWidth", function() return getdimen("outeredgewidth") * factor end)
+registerscript("PageOffset", function() return getdimen("pagebackgroundoffset") * factor end)
+registerscript("PageDepth", function() return getdimen("pagebackgrounddepth") * factor end)
+registerscript("LayoutColumns", function() return getcount("layoutcolumns") end)
+registerscript("LayoutColumnDistance", function() return getdimen("layoutcolumndistance") * factor end)
+registerscript("LayoutColumnWidth", function() return getdimen("layoutcolumnwidth") * factor end)
+registerscript("SpineWidth", function() return getdimen("spinewidth") * factor end)
+registerscript("PaperBleed", function() return getdimen("paperbleed") * factor end)
+
+registerscript("RealPageNumber", function() return getcount("realpageno") end)
+registerscript("LastPageNumber", function() return getcount("lastpageno") end)
+
+registerscript("PageNumber", function() return getcount("pageno") end)
+registerscript("NOfPages", function() return getcount("lastpageno") end)
+
+registerscript("SubPageNumber", function() return getcount("subpageno") end)
+registerscript("NOfSubPages", function() return getcount("lastsubpageno") end)
+
+registerscript("CurrentColumn", function() return getcount("mofcolumns") end)
+registerscript("NOfColumns", function() return getcount("nofcolumns") end)
+
+registerscript("BaseLineSkip", function() return get ("baselineskip",true) * factor end)
+registerscript("LineHeight", function() return getdimen("lineheight") * factor end)
+registerscript("BodyFontSize", function() return getdimen("bodyfontsize") * factor end)
+
+registerscript("TopSkip", function() return get ("topskip",true) * factor end)
+registerscript("StrutHeight", function() return getdimen("strutht") * factor end)
+registerscript("StrutDepth", function() return getdimen("strutdp") * factor end)
+
+registerscript("PageNumber", function() return getcount("pageno") end)
+registerscript("RealPageNumber", function() return getcount("realpageno") end)
+registerscript("NOfPages", function() return getcount("lastpageno") end)
+
+registerscript("CurrentWidth", function() return get ("hsize") * factor end)
+registerscript("CurrentHeight", function() return get ("vsize") * factor end)
+
+registerscript("EmWidth", function() return emwidths [false] * factor end)
+registerscript("ExHeight", function() return exheights[false] * factor end)
+
+registerscript("HSize", function() return get ("hsize") * factor end)
+registerscript("VSize", function() return get ("vsize") * factor end)
+registerscript("LastPageNumber", function() return getcount("lastpageno") end)
+
+registerscript("OverlayWidth", function() return getdimen("d_overlay_width") * factor end)
+registerscript("OverlayHeight", function() return getdimen("d_overlay_height") * factor end)
+registerscript("OverlayDepth", function() return getdimen("d_overlay_depth") * factor end)
+registerscript("OverlayLineWidth", function() return getdimen("d_overlay_linewidth") * factor end)
+registerscript("OverlayOffset", function() return getdimen("d_overlay_offset") * factor end)
+registerscript("OverlayRegion", function() mpstring(getmacro("m_overlay_region")) end)
+--------------("CurrentLayout", function() mpstring(getmacro("currentlayout")) end)
+
+-- should be direct
+--
+-- registerscript("PageFraction", page_fraction)
+
+registerscript("PageFraction", function() return mpboolean(page_fraction ()) end)
+registerscript("OnRightPage", function() return mpboolean(on_right_page ()) end)
+registerscript("OnOddPage", function() return mpboolean(is_odd_page ()) end)
+registerscript("InPageBody", function() return mpboolean(in_body_page ()) end)
+registerscript("LayoutHasChanged", function() return mpboolean(layout_has_changed()) end)
+
+registerscript("defaultcolormodel", defaultcolormodel)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-lmp.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-lmp.lmt
new file mode 100644
index 00000000000..2b3e910babd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-lmp.lmt
@@ -0,0 +1,104 @@
+if not modules then modules = { } end modules ['mlib-lmp'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- path relates stuff ... todo: use a stack (or numeric index to list)
+
+local type = type
+
+local aux = mp.aux
+local mpnumeric = aux.numeric
+local mppair = aux.pair
+
+local registerscript = metapost.registerscript
+
+local scan = mp.scan
+local get = mp.get
+local scannumber = scan.number
+local scanstring = scan.string
+local scanpath = scan.path
+local scanproperty = scan.property
+local gethashentry = get.hashentry
+
+local p = nil
+local n = 0
+
+registerscript("pathreset", function()
+ p = nil
+ n = 0
+end)
+
+registerscript("pathlengthof", function()
+ p = scanpath()
+ n = p and #p or 1
+ mpnumeric(n)
+end)
+
+registerscript("pathpointof", function()
+ local i = scannumber()
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[1],pi[2])
+ end
+end)
+
+registerscript("pathleftof", function()
+ local i = scannumber()
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[5],pi[6])
+ end
+end)
+
+registerscript("pathrightof", function()
+ local i = scannumber()
+ if i > 0 and i <= n then
+ local pn
+ if i == 1 then
+ pn = p[2] or p[1]
+ else
+ pn = p[i+1] or p[1]
+ end
+ mppair(pn[3],pn[4])
+ end
+end)
+
+local report = logs.reporter("metapost", "log")
+local codes = metapost.codes
+local types = metapost.types
+local procodes = mplib.propertycodes
+
+registerscript("showproperty", function()
+ local k, s, p, d = scanproperty()
+ if k then
+ report("name %a, property %a, command %a, detail %a",s,procodes[p] or "-",codes[k] or "-",types[d] or "-")
+ end
+end)
+
+registerscript("showhashentry", function()
+ local s = scanstring()
+ if s then
+ local k, p, d = gethashentry(s)
+ if k then
+ report("name %a, property %a, command %a, detail %a",s,procodes[p] or "-",codes[k] or "-",types[d] or "-")
+ end
+ end
+end)
+
+local getmacro = tokens.getters.macro
+local mpgnamespace = getmacro("??graphicvariable")
+
+local scanmpstring = mp.scan.string
+
+local injectnumeric = mp.inject.numeric
+local injectstring = mp.inject.string
+
+-- registerscript("mpv_numeric", function() injectnumeric (getmacro(mpgnamespace .. getmacro("currentmpvariableclass") .. ":" .. scanmpstring())) end)
+-- registerscript("mpv_dimension", function() return getmacro(mpgnamespace .. getmacro("currentmpvariableclass") .. ":" .. scanmpstring()) end)
+-- registerscript("mpv_string", function() injectstring (getmacro(mpgnamespace .. getmacro("currentmpvariableclass") .. ":" .. scanmpstring())) end)
+
+registerscript("mpvar", function() return getmacro(mpgnamespace .. getmacro("currentmpvariableclass") .. ":" .. scanmpstring(), true) end) -- Isn't it already edef'd?
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-lmt.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-lmt.lmt
new file mode 100644
index 00000000000..b7c869c3bac
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-lmt.lmt
@@ -0,0 +1,199 @@
+if not modules then modules = { } end modules ['mlib-lmt'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- todo: check for possible inject usage
+
+local type = type
+local round = math.round
+
+local aux = mp.aux
+local mpdirect = aux.direct
+local mppath = mp.path
+
+local scan = mp.scan
+local scannumeric = scan.numeric
+local scanpath = scan.path
+
+local injectpath = mp.inject.path
+local injectcolor = mp.inject.color
+
+local getparameter = metapost.getparameter
+local registerscript = metapost.registerscript
+
+function mp.lmt_function_x(xmin,xmax,xstep,code,shape) -- experimental
+ local code = "return function(x) return " .. code .. " end"
+ local action = load(code)
+ local points = { }
+ local nofpoints = 0
+ if action then
+ action = action()
+ end
+ if shape == "steps" then
+ local halfx = xstep / 2
+ local lastx = xmin
+ local lasty = action(xmin)
+ for xi = xmin, xmax, xstep do
+ local yi = action(xi)
+ local xx = lastx + halfx
+ nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, lasty }
+ nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, yi }
+ lastx = xi
+ lasty = yi
+ end
+ if points[nofpoints][1] ~= xmax then
+ local yi = action(xmax)
+ local xx = lastx + halfx
+ nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, lasty }
+ nofpoints = nofpoints + 1 ; points[nofpoints] = { xx, yi }
+ lastx = xi
+ lasty = yi
+ end
+ else
+ for xi = xmin, xmax, xstep do
+ nofpoints = nofpoints + 1 ; points[nofpoints] = { xi, action(xi) }
+ end
+ if points[nofpoints][1] ~= xmax then
+ nofpoints = nofpoints + 1 ; points[nofpoints] = { xmax, action(xmax) }
+ end
+ end
+ mppath(points,shape == "curve" and ".." or "--",false)
+end
+
+function mp.lmt_mesh_set()
+ local mesh = getparameter { "mesh", "paths" }
+ structures.references.currentset.mesh = mesh
+end
+
+function mp.lmt_mesh_update()
+ local mesh = getparameter { "paths" } or getparameter { "mesh", "paths" }
+ mesh[scannumeric()] = scanpath(true)
+end
+
+-- moved here
+
+function mp.lmt_svg_include()
+ local labelfile = metapost.getparameter { "labelfile" }
+ if labelfile and labelfile ~= "" then
+ local labels = table.load(labelfile) -- todo: same path as svg file
+ if type(labels) == "table" then
+ for i=1,#labels do
+ metapost.remaptext(labels[i])
+ end
+ end
+ end
+ local fontname = metapost.getparameter { "fontname" }
+ if fontname and fontname ~= "" then
+ local unicode = metapost.getparameter { "unicode" }
+ if unicode then
+ mpdirect (
+ metapost.svgglyphtomp(fontname,math.round(unicode))
+ )
+ end
+ return
+ end
+ local colorfile = metapost.getparameter { "colormap" }
+ local colormap = false
+ if colorfile and colorfile ~= "" then
+ colormap = metapost.svgcolorremapper(colorfile)
+ end
+ local filename = metapost.getparameter { "filename" }
+ if filename and filename ~= "" then
+ mpdirect ( metapost.svgtomp {
+ data = io.loaddata(filename),
+ remap = true,
+ colormap = colormap,
+ id = filename,
+ } )
+ else
+ local buffer = metapost.getparameter { "buffer" }
+ if buffer then
+ mpdirect ( metapost.svgtomp {
+ data = buffers.getcontent(buffer),
+ -- remap = true,
+ colormap = colormap,
+ id = buffer or "buffer",
+ } )
+ else
+ local code = metapost.getparameter { "code" }
+ if code then
+ mpdirect ( metapost.svgtomp {
+ data = code,
+ colormap = colormap,
+ id = "code",
+ } )
+ end
+ end
+ end
+end
+
+registerscript("remaptext", function()
+ local parameters = metapost.scanparameters()
+ if parameters and parameters.label then
+ metapost.remaptext(parameters)
+ end
+end)
+
+do
+
+ local dropins = fonts.dropins
+ local registerglyph = dropins.registerglyph
+ local registerglyphs = dropins.registerglyphs
+
+ registerscript("registerglyph", function() registerglyph (metapost.getparameterset("mpsglyph")) end)
+ registerscript("registerglyphs",function() registerglyphs(metapost.getparameterset("mpsglyphs")) end)
+
+end
+
+todecimal = xdecimal and xdecimal.new or tonumber -- bonus
+
+-- mail on list by Mikael Sundqvist and Taco's analysis of near duplicate points (2021/02/11+)
+
+registerscript("scrutenized", function()
+ local p = scanpath()
+ local d = 10^scannumeric()
+ for i=1,#p do
+ local pi = p[i]
+ pi[1] = round(pi[1] * d) / d
+ pi[2] = round(pi[2] * d) / d
+ end
+ local x1 = round(p[1][1])
+ local y1 = round(p[1][2])
+ local n = 1
+ local m = #p
+ local t = { p[1], cycle = p.cycle }
+ for i=2,m-1 do
+ local pi = p[i]
+ local x2 = r(pi[1])
+ local y2 = r(pi[2])
+ if x1 ~= x2 or y1 ~= y2 then
+ n = n + 1
+ t[n] = p[i]
+ x1 = x2
+ y1 = y2
+ end
+ end
+ local x1 = r(p[1][1])
+ local y1 = r(p[1][2])
+ local x2 = r(p[m][1])
+ local y2 = r(p[m][2])
+ if x1 ~= x2 or y1 ~= y2 then
+ n = n + 1
+ t[n] = p[m]
+ end
+ mp.path(t)
+ -- injectpath(t)
+end)
+
+-- A goodie, mostly a side effect of updating the metafun manual.
+
+
+local labtorgb = attributes.colors.labtorgb
+
+registerscript("labtorgb", function()
+ injectcolor(labtorgb(scannumeric(),scannumeric(),scannumeric()))
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-lua.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-lua.lmt
new file mode 100644
index 00000000000..068d17f32f9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-lua.lmt
@@ -0,0 +1,210 @@
+if not modules then modules = { } end modules ['mlib-lua'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local type = type
+local insert, remove = table.insert, table.remove
+
+local trace = false trackers.register("metapost.instance",function(v) trace = v end)
+
+local report = logs.reporter("metapost","instance")
+
+local codes = mplib.getcodes()
+local types = mplib.gettypes()
+
+-- for k,v in next, mplib do if type(v) == "function" then local f = v mplib[k] = function(...) print(k) return v(...) end end end
+
+table.hashed(codes)
+table.hashed(types)
+
+metapost.codes = codes
+metapost.types = types
+
+local scan = mp.scan
+local skip = mp.skip
+local get = mp.get
+local inject = mp.inject
+
+local currentmpx = nil
+local stack = { }
+
+local function reports(s) report("%a scan %s", tostring(currentmpx),s) end -- temporary, till we're okay
+local function reporti(s) report("%a inject %s",tostring(currentmpx),s) end -- temporary, till we're okay
+
+local scan_next = mplib.scan_next
+local scan_expression = mplib.scan_expression
+local scan_token = mplib.scan_token
+local scan_symbol = mplib.scan_symbol
+local scan_property = mplib.scan_property
+local scan_numeric = mplib.scan_numeric
+local scan_integer = mplib.scan_integer
+local scan_boolean = mplib.scan_boolean
+local scan_string = mplib.scan_string
+local scan_pair = mplib.scan_pair
+local scan_color = mplib.scan_color
+local scan_cmykcolor = mplib.scan_cmykcolor
+local scan_transform = mplib.scan_transform
+local scan_path = mplib.scan_path
+local scan_pen = mplib.scan_pen
+
+local skip_token = mplib.skip_token
+
+local get_hashentry = mplib.gethashentry
+
+scan.next = function(k) if trace then reporti("next") end return scan_next (currentmpx,k) end
+scan.expression = function(k) if trace then reporti("expression") end return scan_expression(currentmpx,k) end
+scan.token = function(k) if trace then reporti("token") end return scan_token (currentmpx,k) end
+scan.symbol = function(k,e) if trace then reporti("symbol") end return scan_symbol (currentmpx,k,e) end
+scan.property = function(k) if trace then reporti("property") end return scan_property (currentmpx,k) end
+scan.numeric = function() if trace then reporti("numeric") end return scan_numeric (currentmpx) end
+scan.integer = function() if trace then reporti("integer") end return scan_integer (currentmpx) end
+scan.boolean = function() if trace then reporti("boolean") end return scan_boolean (currentmpx) end
+scan.string = function() if trace then reporti("string") end return scan_string (currentmpx) end
+scan.pair = function(t) if trace then reporti("pair") end return scan_pair (currentmpx,t) end
+scan.color = function(t) if trace then reporti("color") end return scan_color (currentmpx,t) end
+scan.cmykcolor = function(t) if trace then reporti("cmykcolor") end return scan_cmykcolor (currentmpx,t) end
+scan.transform = function(t) if trace then reporti("transform") end return scan_transform (currentmpx,t) end
+scan.path = function(t) if trace then reporti("path") end return scan_path (currentmpx,t) end
+scan.pen = function(t) if trace then reporti("pen") end return scan_pen (currentmpx,t) end
+
+skip.token = function(t) return skip_token (currentmpx,t) end
+
+get.hashentry = function(n) return get_hashentry (currentmpx,n) end
+
+local solvepath = mplib.solvepath
+local getstatus = mplib.getstatus
+
+mp.solve = function(...)
+ return solvepath(currentmpx,...)
+end
+
+local inject_path = mplib.inject_path
+local inject_numeric = mplib.inject_numeric
+local inject_pair = mplib.inject_pair
+local inject_boolean = mplib.inject_boolean
+local inject_integer = mplib.inject_integer
+local inject_string = mplib.inject_string
+local inject_color = mplib.inject_color
+local inject_cmykcolor = mplib.inject_cmykcolor
+local inject_transform = mplib.inject_transform
+local inject_whatever = mplib.inject_whatever
+
+
+------.path = function(t,cycle,curled) if trace then reporti("path") end return inject_path (currentmpx,t,cycle,curled) end
+inject.numeric = function(n) if trace then reporti("numeric") end return inject_numeric (currentmpx,n) end
+inject.pair = function(x,y) if trace then reporti("pair") end return inject_pair (currentmpx,x,y) end
+inject.boolean = function(b) if trace then reporti("boolean") end return inject_boolean (currentmpx,b) end
+inject.integer = function(i) if trace then reporti("integer") end return inject_integer (currentmpx,i) end
+inject.string = function(s) if trace then reporti("string") end return inject_string (currentmpx,s) end
+inject.color = function(r,g,b) if trace then reporti("color") end return inject_color (currentmpx,r,g,b) end
+inject.cmykcolor = function(c,m,y,k) if trace then reporti("cmykcolor") end return inject_cmykcolor(currentmpx,c,m,y,k) end
+inject.transform = function(x,y,xx,xy,yx,yy) if trace then reporti("transform") end return inject_transform(currentmpx,x,y,xx,xy,yx,yy) end
+inject.whatever = function(...) if trace then reporti("whatever") end return inject_whatever (currentmpx,...) end
+
+inject.triplet = inject.color
+inject.quadruplet = inject.cmykcolor
+
+local function same(p,n)
+ local f = p[1]
+ local l = p[n]
+ local nf = #f
+ local nl = #l
+ if nf == nl then
+ for i=1,nf do
+ if f[i] ~= l[i] then
+ return false
+ end
+ end
+ return true
+ end
+ return false
+end
+
+-- local p = mp.scan.path()
+-- mp.inject.path(p,true,true)
+
+function inject.path(p,close,connector)
+ local curled = false
+ local n = #p
+ if p.close or p.cycle then
+ close = true
+ end
+ if n > 1 then
+ -- [ ../true | --/false | nil/auto ]
+ if connector == nil or connector == "auto" then
+ connector = #p[1] > 2
+ end
+ if connector == false or connector == "--" then
+ curled = true
+ elseif connector == true or connector == ".." then
+ if close and not same(p,n) then
+ p[n+1] = p[1]
+ end
+ end
+ end
+ if trace then reporti("path") end
+ return inject_path(currentmpx,p,close,curled)
+end
+
+-- bonus:
+
+scan .number = scan .numeric
+inject.number = inject.numeric
+
+table.setmetatablecall(inject,function(t,...)
+ inject_whatever(currentmpx,...)
+end)
+
+-- experiment
+
+function mp.autoinject(m)
+ local t = type(m)
+ if t == "table" then
+ local n = #t
+ if n == 2 then
+ inject_pair(currentmpx,m)
+ elseif n == 3 then
+ inject_color(currentmpx,m)
+ elseif n == 4 then
+ inject_cmykcolor(currentmpx,m)
+ elseif n == 6 then
+ inject_transform(currentmpx,m)
+ end
+ elseif t == "number" then
+ inject_numeric(currentmpx,m)
+ elseif t == "string" then
+ inject_string(currentmpx,m)
+ elseif t == "boolean" then
+ inject_boolean(currentmpx,m)
+ end
+end
+
+function metapost.pushscriptrunner(mpx)
+ if trace then
+ report("%a => %a",tostring(currentmpx),tostring(mpx))
+ end
+ insert(stack,currentmpx)
+ currentmpx = mpx
+end
+
+function metapost.popscriptrunner()
+ local mpx = remove(stack)
+ if trace then
+ report("%a <= %a",tostring(mpx),tostring(currentmpx))
+ end
+ currentmpx = mpx
+end
+
+function metapost.currentmpx()
+ return currentmpx
+end
+
+-- mplib.getstates(): zero is "normal"
+
+function metapost.currentmpxstatus()
+ return getstatus(currentmpx) or 0
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-mat.lua b/Master/texmf-dist/tex/context/base/mkxl/mlib-mat.lmt
index 6c82a4658b5..3a63b32c784 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-mat.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-mat.lmt
@@ -7,13 +7,15 @@ if not modules then modules = { } end modules ['mlib-mat'] = {
}
local scanners = mp.scan
-local registerscript = metapost.registerscript
+local injectors = mp.inject
local scannumeric = scanners.numeric
local scanpair = scanners.pair
local scancolor = scanners.color
-local mppair = mp.pair
+local mppair = injectors.pair or mp.pair
+
+local registerscript = metapost.registerscript
local m = xmath
local c = xcomplex
@@ -115,8 +117,8 @@ local c_erfcx = c.erfcx registerscript("c_erfcx", function() return mppair(c_
local c_erfi = c.erfi registerscript("c_erfi", function() return mppair(c_topair(c_erfi (c_new(scanpair())))) end)
local c_dawson = c.dawson registerscript("c_dawson", function() return mppair(c_topair(c_dawson(c_new(scanpair())))) end)
-local c_voigt = c.voigt
-local c_voigt_hwhm = c.voigt_hwhm
+local c_voigt = c.voigt
+local c_voigt_hwhm = c.voigt_hwhm
registerscript("c_voigt", function()
return mppair(c_topair(c_voigt(c_new(scanpair()),c_new(scanpair()),c_new(scanpair()))))
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-mpf.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-mpf.lmt
new file mode 100644
index 00000000000..f24d7fde09c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-mpf.lmt
@@ -0,0 +1,1260 @@
+if not modules then modules = { } end modules ['mlib-mpf'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- moved from mlib-lua:
+
+local type, tostring, tonumber, select, loadstring = type, tostring, tonumber, select, loadstring
+local find, match, gsub, gmatch = string.find, string.match, string.gsub, string.gmatch
+local concat = table.concat
+
+local formatters = string.formatters
+local lpegmatch = lpeg.match
+local lpegpatterns = lpeg.patterns
+
+local P, S, Ct, Cs, Cc, C = lpeg.P, lpeg.S, lpeg.Ct, lpeg.Cs, lpeg.Cc, lpeg.C
+
+local report_luarun = logs.reporter("metapost","lua")
+local report_script = logs.reporter("metapost","script")
+local report_message = logs.reporter("metapost")
+
+local trace_luarun = false trackers.register("metapost.lua", function(v) trace_luarun = v end)
+local trace_script = false trackers.register("metapost.script",function(v) trace_script = v end)
+
+local be_tolerant = true directives.register("metapost.lua.tolerant", function(v) be_tolerant = v end)
+
+local set = mp.set
+local get = mp.get
+local aux = mp.aux
+local scan = mp.scan
+local skip = mp.skip
+local inject = mp.inject
+
+do
+
+ -- serializers
+
+ local f_integer = formatters["%i"]
+ local f_numeric = formatters["%F"]
+
+ -- no %n as that can produce -e notation and that is not so nice for scaled butmaybe we
+ -- should then switch between ... i.e. make a push/pop for the formatters here ... not now.
+
+ local f_integer = formatters["%i"]
+ local f_numeric = formatters["%F"]
+ local f_pair = formatters["(%F,%F)"]
+ local f_ctrl = formatters["(%F,%F) .. controls (%F,%F) and (%F,%F)"]
+ local f_triplet = formatters["(%F,%F,%F)"]
+ local f_quadruple = formatters["(%F,%F,%F,%F)"]
+ local f_transform = formatters["totransform(%F,%F,%F,%F,%F,%F)"]
+ local f_pen = formatters["(pencircle transformed totransform(%F,%F,%F,%F,%F,%F))"]
+
+ local f_points = formatters["%p"]
+ local f_pair_pt = formatters["(%p,%p)"]
+ local f_ctrl_pt = formatters["(%p,%p) .. controls (%p,%p) and (%p,%p)"]
+ local f_triplet_pt = formatters["(%p,%p,%p)"]
+ local f_quadruple_pt = formatters["(%p,%p,%p,%p)"]
+
+ local r = P('%') / "percent"
+ + P('"') / "dquote"
+ + P('\n') / "crlf"
+ -- + P(' ') / "space"
+ local a = Cc("&")
+ local q = Cc('"')
+ local p = Cs(q * (r * a)^-1 * (a * r * (P(-1) + a) + P(1))^0 * q)
+
+ mp.cleaned = function(s) return lpegmatch(p,s) or s end
+
+ -- management
+
+ -- sometimes we gain (e.g. .5 sec on the sync test)
+
+ local cache = table.makeweak()
+
+ local runscripts = { }
+ local runnames = { }
+ local nofscripts = 0
+
+ function metapost.registerscript(name,f)
+ nofscripts = nofscripts + 1
+ if f then
+ runscripts[nofscripts] = f
+ runnames[name] = nofscripts
+ else
+ runscripts[nofscripts] = name
+ end
+ if trace_script then
+ report_script("registering script %a as %i",name,nofscripts)
+ end
+ return nofscripts
+ end
+
+ function metapost.scriptindex(name)
+ local index = runnames[name] or 0
+ if trace_script then
+ report_script("fetching scriptindex %i of %a",index,name)
+ end
+ return index
+ end
+
+ -- The gbuffer sharing and such is not really needed now but make a dent when
+ -- we have a high volume of simpel calls (loops) so we keep it around for a
+ -- while.
+
+ local nesting = 0
+ local runs = 0
+ local gbuffer = { }
+ local buffer = gbuffer
+ local n = 0
+
+ local function mpdirect1(a)
+ n = n + 1 buffer[n] = a
+ end
+ local function mpdirect2(a,b)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ end
+ local function mpdirect3(a,b,c)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ end
+ local function mpdirect4(a,b,c,d)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ n = n + 1 buffer[n] = d
+ end
+ local function mpdirect5(a,b,c,d,e)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ n = n + 1 buffer[n] = d
+ n = n + 1 buffer[n] = e
+ end
+
+ local function mpflush(separator)
+ buffer[1] = concat(buffer,separator or "",1,n)
+ n = 1
+ end
+
+ function metapost.runscript(code)
+ nesting = nesting + 1
+ runs = runs + 1
+
+ local index = type(code) == "number"
+ local f
+ local result
+
+ if index then
+ f = runscripts[code]
+ if not f then
+ report_luarun("%i: bad index: %s",nesting,code)
+ elseif trace_luarun then
+ report_luarun("%i: index: %i",nesting,code)
+ end
+ else
+ if trace_luarun then
+ report_luarun("%i: code: %s",nesting,code)
+ end
+ f = cache[code]
+ if not f then
+ f = loadstring("return " .. code)
+ if f then
+ cache[code] = f
+ elseif be_tolerant then
+ f = loadstring(code)
+ if f then
+ cache[code] = f
+ end
+ end
+ end
+ end
+
+ -- returning nil is more efficient and a signal not to scan in mp
+
+ if f then
+
+ local lbuffer, ln
+
+ if nesting == 1 then
+ buffer = gbuffer
+ n = 0
+ else
+ lbuffer = buffer
+ ln = n
+ buffer = { }
+ n = 0
+ end
+
+ result = f()
+ if result then
+ local t = type(result)
+ -- we can consider to use the injector for tables but then we need to
+ -- check if concatination is expected so best keep this!
+ if t == "number" or t == "boolean" then
+ -- native types
+ elseif t == "string" or t == "table" then
+ -- (concatenated) passed to scantokens
+ else
+ -- scantokens
+ result = tostring(result)
+ end
+ if trace_luarun then
+ report_luarun("%i: %s result: %s",nesting,t,result)
+ end
+ elseif n == 0 then
+ -- result = ""
+ result = nil -- no scantokens done then
+ if trace_luarun then
+ report_luarun("%i: no buffered result",nesting)
+ end
+ elseif n == 1 then
+ result = buffer[1]
+ if trace_luarun then
+ report_luarun("%i: 1 buffered result: %s",nesting,result)
+ end
+ else
+ -- the space is why we sometimes have collectors
+ if nesting == 1 then
+ -- if we had no space we could pass result directly in lmtx
+ result = concat(buffer," ",1,n)
+ if n > 500 or #result > 10000 then
+ gbuffer = { } -- newtable(20,0)
+ lbuffer = gbuffer
+ end
+ else
+ -- if we had no space we could pass result directly in lmtx
+ result = concat(buffer," ")
+ end
+ if trace_luarun then
+ report_luarun("%i: %i buffered results: %s",nesting,n,result)
+ end
+ end
+
+ if nesting == 1 then
+ n = 0
+ else
+ buffer = lbuffer
+ n = ln
+ end
+
+ else
+ report_luarun("%i: no result, invalid code: %s",nesting,code)
+ result = ""
+ end
+
+ nesting = nesting - 1
+
+ return result
+ end
+
+ function metapost.nofscriptruns()
+ local c = mplib.getcallbackstate()
+ return c.count, string.format(
+ "%s (file: %s, text: %s, script: %s, log: %s)",
+ c.count, c.file, c.text, c.script, c.log
+ )
+ end
+
+ -- writers
+
+ local function mpp(value)
+ n = n + 1
+ local t = type(value)
+ if t == "number" then
+ buffer[n] = f_numeric(value)
+ elseif t == "string" then
+ buffer[n] = value
+ elseif t == "table" then
+ if #t == 6 then
+ buffer[n] = "totransform(" .. concat(value,",") .. ")"
+ else
+ buffer[n] = "(" .. concat(value,",") .. ")"
+ end
+ else -- boolean or whatever
+ buffer[n] = tostring(value)
+ end
+ end
+
+ local function mpprint(first,second,...)
+ if second == nil then
+ if first ~= nil then
+ mpp(first)
+ end
+ else
+ for i=1,select("#",first,second,...) do
+ local value = (select(i,first,second,...))
+ if value ~= nil then
+ mpp(value)
+ end
+ end
+ end
+ end
+
+ local function mpp(value)
+ n = n + 1
+ local t = type(value)
+ if t == "number" then
+ buffer[n] = f_numeric(value)
+ elseif t == "string" then
+ buffer[n] = lpegmatch(p,value)
+ elseif t == "table" then
+ if #t > 4 then
+ buffer[n] = ""
+ else
+ buffer[n] = "(" .. concat(value,",") .. ")"
+ end
+ else -- boolean or whatever
+ buffer[n] = tostring(value)
+ end
+ end
+
+ local function mpvprint(first,second,...) -- variable print
+ if second == nil then
+ if first ~= nil then
+ mpp(first)
+ end
+ else
+ for i=1,select("#",first,second,...) do
+ local value = (select(i,first,second,...))
+ if value ~= nil then
+ mpp(value)
+ end
+ end
+ end
+ end
+
+ local function mpstring(value)
+ n = n + 1
+ buffer[n] = lpegmatch(p,value)
+ end
+
+ local function mpboolean(b)
+ n = n + 1
+ buffer[n] = b and "true" or "false"
+ end
+
+ local function mpnumeric(f)
+ n = n + 1
+ if not f or f == 0 then
+ buffer[n] = "0"
+ else
+ buffer[n] = f_numeric(f)
+ end
+ end
+
+ local function mpinteger(i)
+ n = n + 1
+ -- buffer[n] = i and f_integer(i) or "0"
+ buffer[n] = i or "0"
+ end
+
+ local function mppoints(i)
+ n = n + 1
+ if not i or i == 0 then
+ buffer[n] = "0pt"
+ else
+ buffer[n] = f_points(i)
+ end
+ end
+
+ local function mppair(x,y)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_pair(x[1],x[2])
+ else
+ buffer[n] = f_pair(x,y)
+ end
+ end
+
+ local function mppairpoints(x,y)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_pair_pt(x[1],x[2])
+ else
+ buffer[n] = f_pair_pt(x,y)
+ end
+ end
+
+ local function mptriplet(x,y,z)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_triplet(x[1],x[2],x[3])
+ else
+ buffer[n] = f_triplet(x,y,z)
+ end
+ end
+
+ local function mptripletpoints(x,y,z)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_triplet_pt(x[1],x[2],x[3])
+ else
+ buffer[n] = f_triplet_pt(x,y,z)
+ end
+ end
+
+ local function mpquadruple(w,x,y,z)
+ n = n + 1
+ if type(w) == "table" then
+ buffer[n] = f_quadruple(w[1],w[2],w[3],w[4])
+ else
+ buffer[n] = f_quadruple(w,x,y,z)
+ end
+ end
+
+ local function mpquadruplepoints(w,x,y,z)
+ n = n + 1
+ if type(w) == "table" then
+ buffer[n] = f_quadruple_pt(w[1],w[2],w[3],w[4])
+ else
+ buffer[n] = f_quadruple_pt(w,x,y,z)
+ end
+ end
+
+ local function mptransform(x,y,xx,xy,yx,yy)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_transform(x[1],x[2],x[3],x[4],x[5],x[6])
+ else
+ buffer[n] = f_transform(x,y,xx,xy,yx,yy)
+ end
+ end
+
+ local function mpcolor(c,m,y,k)
+ n = n + 1
+ if type(c) == "table" then
+ local l = #c
+ if l == 4 then
+ buffer[n] = f_quadruple(c[1],c[2],c[3],c[4])
+ elseif l == 3 then
+ buffer[n] = f_triplet(c[1],c[2],c[3])
+ else
+ buffer[n] = f_numeric(c[1])
+ end
+ else
+ if k then
+ buffer[n] = f_quadruple(c,m,y,k)
+ elseif y then
+ buffer[n] = f_triplet(c,m,y)
+ else
+ buffer[n] = f_numeric(c)
+ end
+ end
+ end
+
+ -- we have three kind of connectors:
+ --
+ -- .. ... -- (true)
+
+ local function mp_path(f2,f6,t,connector,cycle)
+ if type(t) == "table" then
+ local tn = #t
+ if tn == 1 then
+ local t1 = t[1]
+ n = n + 1
+ if t.pen then
+ buffer[n] = f_pen(unpack(t1))
+ else
+ buffer[n] = f2(t1[1],t1[2])
+ end
+ elseif tn > 0 then
+ if connector == true or connector == nil then
+ connector = ".."
+ elseif connector == false then
+ connector = "--"
+ end
+ if cycle == nil then
+ cycle = t.cycle
+ if cycle == nil then
+ cycle = true
+ end
+ end
+ local six = connector == ".." -- otherwise we use whatever gets asked for
+ local controls = connector -- whatever
+ local a = t[1]
+ local b = t[2]
+ n = n + 1
+ buffer[n] = "("
+ n = n + 1
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ for i=2,tn-1 do
+ a = b
+ b = t[i+1]
+ n = n + 1
+ buffer[n] = connector
+ n = n + 1
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ end
+ n = n + 1
+ buffer[n] = connector
+ a = b
+ b = t[1]
+ n = n + 1
+ if cycle then
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ n = n + 1
+ buffer[n] = connector
+ n = n + 1
+ buffer[n] = "cycle"
+ else
+ buffer[n] = f2(a[1],a[2])
+ end
+ n = n + 1
+ buffer[n] = ")"
+ end
+ end
+ end
+
+ local function mppath(...)
+ mp_path(f_pair,f_ctrl,...)
+ end
+
+ local function mppathpoints(...)
+ mp_path(f_pair_pt,f_ctrl_pt,...)
+ end
+
+ local function mpsize(t)
+ n = n + 1
+ buffer[n] = type(t) == "table" and f_numeric(#t) or "0"
+ end
+
+ local replacer = lpeg.replacer("@","%%")
+
+ local function mpfprint(fmt,...)
+ n = n + 1
+ if not find(fmt,"%",1,true) then
+ fmt = lpegmatch(replacer,fmt)
+ end
+ buffer[n] = formatters[fmt](...)
+ end
+
+ local function mpquoted(fmt,s,...)
+ if s then
+ n = n + 1
+ if not find(fmt,"%",1,true) then
+ fmt = lpegmatch(replacer,fmt)
+ end
+ -- buffer[n] = '"' .. formatters[fmt](s,...) .. '"'
+ buffer[n] = lpegmatch(p,formatters[fmt](s,...))
+ elseif fmt then
+ n = n + 1
+ -- buffer[n] = '"' .. fmt .. '"'
+ buffer[n] = lpegmatch(p,fmt)
+ else
+ -- something is wrong
+ end
+ end
+
+ aux.direct = mpdirect1
+ aux.direct1 = mpdirect1
+ aux.direct2 = mpdirect2
+ aux.direct3 = mpdirect3
+ aux.direct4 = mpdirect4
+ aux.flush = mpflush
+
+ aux.print = mpprint
+ aux.vprint = mpvprint
+ aux.boolean = mpboolean
+ aux.string = mpstring
+ aux.numeric = mpnumeric
+ aux.number = mpnumeric
+ aux.integer = mpinteger
+ aux.points = mppoints
+ aux.pair = mppair
+ aux.pairpoints = mppairpoints
+ aux.triplet = mptriplet
+ aux.tripletpoints = mptripletpoints
+ aux.quadruple = mpquadruple
+ aux.quadruplepoints = mpquadruplepoints
+ aux.path = mppath
+ aux.pathpoints = mppathpoints
+ aux.size = mpsize
+ aux.fprint = mpfprint
+ aux.quoted = mpquoted
+ aux.transform = mptransform
+ aux.color = mpcolor
+
+ -- for the moment
+
+ local function mpdraw(lines,list) -- n * 4
+ if list then
+ local c = #lines
+ for i=1,c do
+ local ci = lines[i]
+ local ni = #ci
+ n = n + 1 buffer[n] = i < c and "d(" or "D("
+ for j=1,ni,2 do
+ local l = j + 1
+ n = n + 1 buffer[n] = ci[j]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = ci[l]
+ n = n + 1 buffer[n] = l < ni and ")--(" or ");"
+ end
+ end
+ else
+ local l = #lines
+ local m = l - 4
+ for i=1,l,4 do
+ n = n + 1 buffer[n] = i < m and "d(" or "D("
+ n = n + 1 buffer[n] = lines[i]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+1]
+ n = n + 1 buffer[n] = ")--("
+ n = n + 1 buffer[n] = lines[i+2]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+3]
+ n = n + 1 buffer[n] = ");"
+ end
+ end
+ end
+
+ local function mpfill(lines,list)
+ if list then
+ local c = #lines
+ for i=1,c do
+ local ci = lines[i]
+ local ni = #ci
+ n = n + 1 buffer[n] = i < c and "f(" or "F("
+ for j=1,ni,2 do
+ local l = j + 1
+ n = n + 1 buffer[n] = ci[j]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = ci[l]
+ n = n + 1 buffer[n] = l < ni and ")--(" or ")--C;"
+ end
+ end
+ else
+ local l = #lines
+ local m = l - 4
+ for i=1,l,4 do
+ n = n + 1 buffer[n] = i < m and "f(" or "F("
+ n = n + 1 buffer[n] = lines[i]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+1]
+ n = n + 1 buffer[n] = ")--("
+ n = n + 1 buffer[n] = lines[i+2]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+3]
+ n = n + 1 buffer[n] = ")--C;"
+ end
+ end
+ end
+
+ aux.draw = mpdraw
+ aux.fill = mpfill
+
+ for k, v in next, aux do mp[k] = v end
+
+end
+
+do
+
+ -- Another experimental feature:
+
+ local mpnumeric = mp.numeric
+ local scanstring = scan.string
+ local scriptindex = metapost.scriptindex
+
+ function mp.mf_script_index(name)
+ local index = scriptindex(name)
+ -- report_script("method %i, name %a, index %i",1,name,index)
+ mpnumeric(index)
+ end
+
+ -- once bootstrapped ... (needs pushed mpx instances)
+
+ metapost.registerscript("scriptindex",function()
+ local name = scanstring()
+ local index = scriptindex(name)
+ -- report_script("method %i, name %a, index %i",2,name,index)
+ mpnumeric(index)
+ end)
+
+end
+
+-- the next will move to mlib-lmp.lua
+
+do
+
+ local mpnamedcolor = attributes.colors.mpnamedcolor
+ local mpprint = aux.print
+ local scanstring = scan.string
+
+ mp.mf_named_color = function(str)
+ mpprint(mpnamedcolor(str))
+ end
+
+ -- todo: we can inject but currently we always get a string back so then
+ -- we need to deal with it upstream in the color module ... not now
+
+ metapost.registerscript("namedcolor",function()
+ mpprint(mpnamedcolor(scanstring()))
+ end)
+
+end
+
+function mp.n(t) -- used ?
+ return type(t) == "table" and #t or 0
+end
+
+do
+
+ -- experiment: names can change
+
+ local mppath = aux.path
+ local mpsize = aux.size
+
+ local whitespace = lpegpatterns.whitespace
+ local newline = lpegpatterns.newline
+ local setsep = newline^2
+ local comment = (S("#%") + P("--")) * (1-newline)^0 * (whitespace - setsep)^0
+ local value = (1-whitespace)^1 / tonumber
+ local entry = Ct( value * whitespace * value)
+ local set = Ct((entry * (whitespace-setsep)^0 * comment^0)^1)
+ local series = Ct((set * whitespace^0)^1)
+
+ local pattern = whitespace^0 * series
+
+ local datasets = { }
+ mp.datasets = datasets
+
+ function mp.dataset(str)
+ return lpegmatch(pattern,str)
+ end
+
+ function datasets.load(tag,filename)
+ if not filename then
+ tag, filename = file.basename(tag), tag
+ end
+ local data = lpegmatch(pattern,io.loaddata(filename) or "")
+ datasets[tag] = {
+ data = data,
+ line = function(n) mppath(data[n or 1]) end,
+ size = function() mpsize(data) end,
+ }
+ end
+
+ table.setmetatablecall(datasets,function(t,k,f,...)
+ local d = datasets[k]
+ local t = type(d)
+ if t == "table" then
+ d = d[f]
+ if type(d) == "function" then
+ d(...)
+ else
+ mpvprint(...)
+ end
+ elseif t == "function" then
+ d(f,...)
+ end
+ end)
+
+end
+
+-- \startluacode
+-- local str = [[
+-- 10 20 20 20
+-- 30 40 40 60
+-- 50 10
+--
+-- 10 10 20 30
+-- 30 50 40 50
+-- 50 20 -- the last one
+--
+-- 10 20 % comment
+-- 20 10
+-- 30 40 # comment
+-- 40 20
+-- 50 10
+-- ]]
+--
+-- MP.myset = mp.dataset(str)
+--
+-- inspect(MP.myset)
+-- \stopluacode
+--
+-- \startMPpage
+-- color c[] ; c[1] := red ; c[2] := green ; c[3] := blue ;
+-- for i=1 upto lua("mp.print(mp.n(MP.myset))") :
+-- draw lua("mp.path(MP.myset[" & decimal i & "])") withcolor c[i] ;
+-- endfor ;
+-- \stopMPpage
+
+-- texts:
+
+do
+
+ local mptriplet = mp.triplet
+
+ local bpfactor = number.dimenfactors.bp
+ local textexts = nil
+ local mptriplet = mp.triplet
+ local nbdimensions = nodes.boxes.dimensions
+
+ function mp.mf_tt_initialize(tt)
+ textexts = tt
+ end
+
+ function mp.mf_tt_dimensions(n)
+ local box = textexts and textexts[n]
+ if box then
+ -- could be made faster with nuts but not critical
+ mptriplet(box.width*bpfactor,box.height*bpfactor,box.depth*bpfactor)
+ else
+ mptriplet(0,0,0)
+ end
+ end
+
+ function mp.mf_tb_dimensions(category,name)
+ local w, h, d = nbdimensions(category,name)
+ mptriplet(w*bpfactor,h*bpfactor,d*bpfactor)
+ end
+
+ function mp.report(a,b,c,...)
+ if c then
+ report_message("%s : %s",a,formatters[(gsub(b,"@","%%"))](c,...))
+ elseif b then
+ report_message("%s : %s",a,b)
+ elseif a then
+ report_message("%s : %s","message",a)
+ end
+ end
+
+end
+
+do
+
+ local mpprint = aux.print
+ local modes = tex.modes
+ local systemmodes = tex.systemmodes
+
+ function mp.mode(s)
+ mpprint(modes[s] and true or false)
+ end
+
+ function mp.systemmode(s)
+ mpprint(systemmodes[s] and true or false)
+ end
+
+ mp.processingmode = mp.mode
+
+end
+
+-- for alan's nodes:
+
+do
+
+ local mpprint = aux.print
+ local mpquoted = aux.quoted
+
+ function mp.isarray(str)
+ mpprint(find(str,"%d") and true or false)
+ end
+
+ function mp.prefix(str)
+ mpquoted(match(str,"^(.-)[%d%[]") or str)
+ end
+
+ -- function mp.dimension(str)
+ -- local n = 0
+ -- for s in gmatch(str,"%[?%-?%d+%]?") do --todo: lpeg
+ -- n = n + 1
+ -- end
+ -- mpprint(n)
+ -- end
+
+ mp.dimension = lpeg.counter(P("[") * lpegpatterns.integer * P("]") + lpegpatterns.integer,mpprint)
+
+ -- faster and okay as we don't have many variables but probably only
+ -- basename makes sense and even then it's not called that often
+
+ -- local hash = table.setmetatableindex(function(t,k)
+ -- local v = find(k,"%d") and true or false
+ -- t[k] = v
+ -- return v
+ -- end)
+ --
+ -- function mp.isarray(str)
+ -- mpprint(hash[str])
+ -- end
+ --
+ -- local hash = table.setmetatableindex(function(t,k)
+ -- local v = '"' .. (match(k,"^(.-)%d") or k) .. '"'
+ -- t[k] = v
+ -- return v
+ -- end)
+ --
+ -- function mp.prefix(str)
+ -- mpprint(hash[str])
+ -- end
+
+end
+
+do
+
+ local scanstring = scan.string
+ local scannumeric = scan.numeric
+ local skiptoken = skip.token
+
+ local injectstring = inject.string
+ local injectnumeric = inject.numeric
+
+ local registerscript = metapost.registerscript
+
+ local comma_code = metapost.codes.comma
+
+ local getmacro = tokens.getters.macro
+ local setmacro = tokens.setters.macro
+
+ local getdimen = tex.getdimen
+ local getcount = tex.getcount
+ local gettoks = tex.gettoks
+ local setdimen = tex.setdimen
+ local setcount = tex.setcount
+ local settoks = tex.settoks
+
+ local bpfactor = number.dimenfactors.bp
+
+ -- more helpers
+
+ registerscript("getmacro", function() injectstring (getmacro(scanstring())) end)
+ registerscript("getdimen", function() injectnumeric(getdimen(scanstring())*bpfactor) end)
+ registerscript("getcount", function() injectnumeric(getcount(scanstring())) end)
+ registerscript("gettoks", function() injectstring (gettoks (scanstring())) end)
+
+ registerscript("setmacro", function() setmacro(scanstring(),scanstring()) end)
+ registerscript("setdimen", function() setdimen(scanstring(),scannumeric()/bpfactor) end)
+ registerscript("setcount", function() setcount(scanstring(),scannumeric()) end)
+ registerscript("settoks", function() settoks (scanstring(),scanstring()) end)
+
+ registerscript("setglobalmacro", function() setmacro(scanstring(),scanstring(),"global") end)
+ registerscript("setglobaldimen", function() setdimen("global",scanstring(),scannumeric()/bpfactor) end)
+ registerscript("setglobalcount", function() setcount("global",scanstring(),scannumeric()) end)
+ registerscript("setglobaltoks", function() settoks ("global",scanstring(),scanstring()) end)
+
+
+ local utfnum = utf.byte
+ local utflen = utf.len
+ local utfsub = utf.sub
+
+ registerscript("utfnum", function()
+ injectnumeric(utfnum(scanstring()))
+ end)
+
+ registerscript("utflen", function()
+ injectnumeric(utflen(scanstring()))
+ end)
+
+ registerscript("utfsub", function() -- we have an optional third argument so we explicitly scan a text argument
+ injectstring(utfsub(scanstring(),skiptoken(comma_code) and scannumeric(),skiptoken(comma_code) and scannumeric()))
+ end)
+
+end
+
+-- position fun
+
+do
+
+ local mpprint = mp.print
+ local mpfprint = mp.fprint
+ local mpquoted = mp.quoted
+ local jobpositions = job.positions
+ local getwhd = jobpositions.whd
+ local getxy = jobpositions.xy
+ local getposition = jobpositions.position
+ local getpage = jobpositions.page
+ local getregion = jobpositions.region
+ local getmacro = tokens.getters.macro
+
+ function mp.positionpath(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",0,-d,w,-d,w,h,0,h)
+ else
+ mpprint("(origin--cycle)")
+ end
+ end
+
+ function mp.positioncurve(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("((%p,%p)..(%p,%p)..(%p,%p)..(%p,%p)..cycle)",0,-d,w,-d,w,h,0,h)
+ else
+ mpprint("(origin--cycle)")
+ end
+ end
+
+ function mp.positionbox(name)
+ local p, x, y, w, h, d = getposition(name)
+ if p then
+ mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",x,y-d,x+w,y-d,x+w,y+h,x,y+h)
+ else
+ mpprint("(%p,%p)",x,y)
+ end
+ end
+
+ function mp.positionxy(name)
+ local x, y = getxy(name)
+ if x then
+ mpfprint("(%p,%p)",x,y)
+ else
+ mpprint("origin")
+ end
+ end
+
+ function mp.positionpage(name)
+ mpfprint("%i",getpage(name) or 0)
+ end
+
+ function mp.positionregion(name)
+ local r = getregion(name)
+ if r then
+ mpquoted(r)
+ else
+ mpquoted("unknown")
+ end
+ end
+
+ function mp.positionwhd(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("(%p,%p,%p)",w,h,d)
+ else
+ mpprint("(0,0,0)")
+ end
+ end
+
+ function mp.positionpxy(name)
+ local p, x, y = getposition(name)
+ if p then
+ mpfprint("(%p,%p,%p)",p,x,y)
+ else
+ mpprint("(0,0,0)")
+ end
+ end
+
+ function mp.positionanchor()
+ mpquoted(getmacro("MPanchorid"))
+ end
+
+end
+
+do
+
+ -- local mppair = mp.pair
+ --
+ -- function mp.textextanchor(s)
+ -- local x, y = match(s,"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
+ -- if x and y then
+ -- x = tonumber(x)
+ -- y = tonumber(y)
+ -- end
+ -- mppair(x or 0,y or 0)
+ -- end
+
+ local injectpair = inject.pair
+ local scanstring = scan.string
+
+ metapost.registerscript("textextanchor", function()
+ local x, y = match(scanstring(),"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
+ if x and y then
+ x = tonumber(x)
+ y = tonumber(y)
+ end
+ injectpair(x or 0,y or 0)
+ end)
+
+end
+
+do
+
+ local mpprint = mp.print
+ local mpquoted = mp.quoted
+ local getmacro = tokens.getters.macro
+
+ function mp.texvar(name)
+ mpprint(getmacro(metapost.namespace .. name))
+ end
+
+ function mp.texstr(name)
+ mpquoted(getmacro(metapost.namespace .. name))
+ end
+
+end
+
+do
+
+ local mpprint = aux.print
+ local mpvprint = aux.vprint
+
+ local hashes = { }
+
+ function mp.newhash(name)
+ if name then
+ hashes[name] = { }
+ else
+ for i=1,#hashes+1 do
+ if not hashes[i] then
+ hashes[i] = { }
+ mpvprint(i)
+ return
+ end
+ end
+ end
+ end
+
+ function mp.disposehash(n)
+ if tonumber(n) then
+ hashes[n] = false
+ else
+ hashes[n] = nil
+ end
+ end
+
+ function mp.inhash(n,key)
+ local h = hashes[n]
+ mpvprint(h and h[key] and true or false)
+ end
+
+ function mp.tohash(n,key,value)
+ local h = hashes[n]
+ if h then
+ if value == nil then
+ h[key] = true
+ else
+ h[key] = value
+ end
+ end
+ end
+
+ function mp.fromhash(n,key)
+ local h = hashes[n]
+ mpvprint(h and h[key] or false)
+ end
+
+ interfaces.implement {
+ name = "MPfromhash",
+ arguments = "2 strings",
+ actions = function(name,key)
+ local h = hashes[name] or hashes[tonumber(name)]
+ if h then
+ local v = h[key] or h[tonumber(key)]
+ if v then
+ context(v)
+ end
+ end
+ end
+ }
+
+end
+
+do
+
+ -- a bit overkill: just a find(str,"mf_object=") can be enough
+ --
+ -- todo : share with mlib-pps.lua metapost,isobject
+
+ local mpboolean = aux.boolean
+
+ local p1 = P("mf_object=")
+ local p2 = lpegpatterns.eol * p1
+ local pattern = (1-p2)^0 * p2 + p1
+
+ function mp.isobject(str)
+ mpboolean(pattern and str ~= "" and lpegmatch(pattern,str))
+ end
+
+end
+
+function mp.flatten(t)
+ local tn = #t
+
+ local t1 = t[1]
+ local t2 = t[2]
+ local t3 = t[3]
+ local t4 = t[4]
+
+ for i=1,tn-5,2 do
+ local t5 = t[i+4]
+ local t6 = t[i+5]
+ if t1 == t3 and t3 == t5 and ((t2 <= t4 and t4 <= t6) or (t6 <= t4 and t4 <= t2)) then
+ t[i+3] = t2
+ t4 = t2
+ t[i] = false
+ t[i+1] = false
+ elseif t2 == t4 and t4 == t6 and ((t1 <= t3 and t3 <= t5) or (t5 <= t3 and t3 <= t1)) then
+ t[i+2] = t1
+ t3 = t1
+ t[i] = false
+ t[i+1] = false
+ end
+ t1 = t3
+ t2 = t4
+ t3 = t5
+ t4 = t6
+ end
+
+ -- remove duplicates
+
+ local t1 = t[1]
+ local t2 = t[2]
+ for i=1,tn-2,2 do
+ local t3 = t[i+2]
+ local t4 = t[i+3]
+ if t1 == t3 and t2 == t4 then
+ t[i] = false
+ t[i+1] = false
+ end
+ t1 = t3
+ t2 = t4
+ end
+
+ -- move coordinates
+
+ local m = 0
+ for i=1,tn,2 do
+ if t[i] then
+ m = m + 1 t[m] = t[i]
+ m = m + 1 t[m] = t[i+1]
+ end
+ end
+
+ -- prune the table (not gc'd)
+
+ for i=tn,m+1,-1 do
+ t[i] = nil
+ end
+
+ -- safeguard so that we have at least one segment
+
+ if m == 2 then
+ t[3] = t[1]
+ t[4] = t[2]
+ end
+
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-pdf.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-pdf.lmt
new file mode 100644
index 00000000000..c383d52ded1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-pdf.lmt
@@ -0,0 +1,742 @@
+if not modules then modules = { } end modules ['mlib-pdf'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local gsub = string.gsub
+local concat, insert, remove = table.concat, table.insert, table.remove
+local abs, sqrt, round = math.abs, math.sqrt, math.round
+local setmetatable, rawset, tostring, tonumber, type = setmetatable, rawset, tostring, tonumber, type
+local P, S, C, Ct, Cc, Cg, Cf, Carg = lpeg.P, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.Cg, lpeg.Cf, lpeg.Carg
+local lpegmatch = lpeg.match
+local formatters = string.formatters
+
+local report_metapost = logs.reporter("metapost")
+
+local trace_variables = false trackers.register("metapost.variables",function(v) trace_variables = v end)
+
+local mplib = mplib
+local context = context
+
+local allocate = utilities.storage.allocate
+
+local copy_node = node.copy
+local write_node = node.write
+
+local pen_info = mplib.pen_info
+local getfields = mplib.getfields or mplib.fields -- todo: in lmtx get them once and then use gettype
+
+local save_table = false
+local force_stroke = false
+
+metapost = metapost or { }
+local metapost = metapost
+
+metapost.flushers = metapost.flushers or { }
+local pdfflusher = { }
+metapost.flushers.pdf = pdfflusher
+
+metapost.n = 0
+
+local mpsliteral = nodes.pool.originliteral
+
+local f_f = formatters["%.6N"]
+local f_m = formatters["%.6N %.6N m"]
+local f_c = formatters["%.6N %.6N %.6N %.6N %.6N %.6N c"]
+local f_l = formatters["%.6N %.6N l"]
+local f_cm = formatters["%.6N %.6N %.6N %.6N %.6N %.6N cm"]
+local f_M = formatters["%.6N M"]
+local f_j = formatters["%i j"]
+local f_J = formatters["%i J"]
+local f_d = formatters["[%s] %.6N d"]
+local f_w = formatters["%.6N w"]
+
+directives.register("metapost.savetable",function(v)
+ if type(v) == "string" then
+ save_table = file.addsuffix(v,"mpl")
+ elseif v then
+ save_table = file.addsuffix(environment.jobname .. "-graphic","mpl")
+ else
+ save_table = false
+ end
+end)
+
+trackers.register("metapost.forcestroke",function(v)
+ force_stroke = v
+end)
+
+-- Because in MKiV we always have two passes, we save the objects. When an extra
+-- mp run is done (due to for instance texts identifier in the parse pass), we
+-- get a new result table and the stored objects are forgotten. Otherwise they
+-- are reused.
+
+local function getobjects(result,figure,index)
+ return figure:objects()
+end
+
+function metapost.convert(specification,result)
+ local flusher = specification.flusher
+ local askedfig = specification.askedfig
+ if save_table then
+ table.save(save_table,metapost.totable(result,1)) -- direct
+ end
+ metapost.flush(specification,result)
+ return true -- done
+end
+
+function pdfflusher.tocomment(message)
+ if message then
+ return formatters["%% mps graphic %s: %s"](metapost.n,message)
+ else
+ return formatters["%% mps graphic %s"](metapost.n)
+ end
+end
+
+function pdfflusher.startfigure(n,llx,lly,urx,ury,message)
+ metapost.n = metapost.n + 1
+ context.startMPLIBtoPDF(f_f(llx),f_f(lly),f_f(urx),f_f(ury))
+end
+
+function pdfflusher.stopfigure(message)
+ context.stopMPLIBtoPDF()
+end
+
+function pdfflusher.flushfigure(pdfliterals) -- table
+ if #pdfliterals > 0 then
+ pdfliterals = concat(pdfliterals,"\n")
+ context(mpsliteral(pdfliterals))
+ end
+end
+
+function pdfflusher.textfigure(font,size,text,width,height,depth) -- we could save the factor
+ text = gsub(text,".","\\hbox{%1}") -- kerning happens in metapost (i have to check if this is true for mplib)
+ context.MPtextext(font,size,text,0,-number.dimenfactors.bp*depth)
+end
+
+local bend_tolerance = 131/65536
+
+local rx, sx, sy, ry, tx, ty, divider = 1, 0, 0, 1, 0, 0, 1
+
+local function pen_characteristics(object)
+ local t = pen_info(object)
+ rx, ry, sx, sy, tx, ty = t.rx, t.ry, t.sx, t.sy, t.tx, t.ty
+ divider = sx*sy - rx*ry
+ return not (sx == 1 and rx == 0 and ry == 0 and sy == 1 and tx == 0 and ty == 0), t.width
+end
+
+local function mpconcat(px, py) -- no tx, ty here / we can move this one inline if needed
+ return (sy*px-ry*py)/divider,(sx*py-rx*px)/divider
+end
+
+local function curved(ith,pth)
+ local d = pth.left_x - ith.right_x
+ if abs(ith.right_x - ith.x_coord - d) <= bend_tolerance and abs(pth.x_coord - pth.left_x - d) <= bend_tolerance then
+ d = pth.left_y - ith.right_y
+ if abs(ith.right_y - ith.y_coord - d) <= bend_tolerance and abs(pth.y_coord - pth.left_y - d) <= bend_tolerance then
+ return false
+ end
+ end
+ return true
+end
+
+local function flushnormalpath(path, t, open)
+ local pth, ith, nt
+ local length = #path
+ if t then
+ nt = #t
+ else
+ t = { }
+ nt = 0
+ end
+ for i=1,length do
+ nt = nt + 1
+ pth = path[i]
+ if not ith then
+ t[nt] = f_m(pth.x_coord,pth.y_coord)
+-- elseif curved(ith,pth) then
+elseif pth.curved then
+ t[nt] = f_c(ith.right_x,ith.right_y,pth.left_x,pth.left_y,pth.x_coord,pth.y_coord)
+ else
+ t[nt] = f_l(pth.x_coord,pth.y_coord)
+ end
+ ith = pth
+ end
+ if not open then
+ nt = nt + 1
+ local one = path[1]
+-- if curved(pth,one) then
+if one.curved then
+ t[nt] = f_c(pth.right_x,pth.right_y,one.left_x,one.left_y,one.x_coord,one.y_coord)
+ else
+ t[nt] = f_l(one.x_coord,one.y_coord)
+ end
+ elseif length == 1 then
+ -- special case .. draw point
+ local one = path[1]
+ nt = nt + 1
+ t[nt] = f_l(one.x_coord,one.y_coord)
+ end
+ return t
+end
+
+local function flushconcatpath(path, t, open)
+ local pth, ith, nt
+ local length = #path
+ if t then
+ nt = #t
+ else
+ t = { }
+ nt = 0
+ end
+ nt = nt + 1
+ t[nt] = f_cm(sx,rx,ry,sy,tx,ty)
+ for i=1,length do
+ nt = nt + 1
+ pth = path[i]
+ if not ith then
+ t[nt] = f_m(mpconcat(pth.x_coord,pth.y_coord))
+-- elseif curved(ith,pth) then
+elseif pth.curved then
+ local a, b = mpconcat(ith.right_x,ith.right_y)
+ local c, d = mpconcat(pth.left_x,pth.left_y)
+ t[nt] = f_c(a,b,c,d,mpconcat(pth.x_coord,pth.y_coord))
+ else
+ t[nt] = f_l(mpconcat(pth.x_coord, pth.y_coord))
+ end
+ ith = pth
+ end
+ if not open then
+ nt = nt + 1
+ local one = path[1]
+-- if curved(pth,one) then
+if one.curved then
+ local a, b = mpconcat(pth.right_x,pth.right_y)
+ local c, d = mpconcat(one.left_x,one.left_y)
+ t[nt] = f_c(a,b,c,d,mpconcat(one.x_coord, one.y_coord))
+ else
+ t[nt] = f_l(mpconcat(one.x_coord,one.y_coord))
+ end
+ elseif length == 1 then
+ -- special case .. draw point
+ nt = nt + 1
+ local one = path[1]
+ t[nt] = f_l(mpconcat(one.x_coord,one.y_coord))
+ end
+ return t
+end
+
+local function toboundingbox(path)
+ local size = #path
+ if size == 4 then
+ local pth = path[1]
+ local x = pth.x_coord
+ local y = pth.y_coord
+ local llx, lly, urx, ury = x, y, x, y
+ for i=2,size do
+ pth = path[i]
+ x = pth.x_coord
+ y = pth.y_coord
+ if x < llx then
+ llx = x
+ elseif x > urx then
+ urx = x
+ end
+ if y < lly then
+ lly = y
+ elseif y > ury then
+ ury = y
+ end
+ end
+ return { llx, lly, urx, ury }
+ else
+ return { 0, 0, 0, 0 }
+ end
+end
+
+metapost.flushnormalpath = flushnormalpath
+
+-- The flusher is pdf based, if another backend is used, we need to overload the
+-- flusher; this is beta code, the organization will change (already upgraded in
+-- sync with mplib)
+--
+-- We can avoid the before table but I like symmetry. There is of course a small
+-- performance penalty, but so is passing extra arguments (result, flusher, after)
+-- and returning stuff.
+--
+-- This variable stuff will change in lmtx.
+
+local ignore = function() end
+
+local space = P(" ")
+local equal = P("=")
+local key = C((1-equal)^1) * equal
+local newline = S("\n\r")^1
+local number = (((1-space-newline)^1) / tonumber) * (space^0)
+
+local p_number = number
+local p_string = C((1-newline)^0)
+local p_boolean = P("false") * Cc(false) + P("true") * Cc(true)
+local p_set = Ct(number^1)
+local p_path = Ct(Ct(number * number^-5)^1)
+
+local variable =
+ P("1:") * p_number
+ + P("2:") * p_string
+ + P("3:") * p_boolean
+ + S("4568") * P(":") * p_set
+ + P("7:") * p_path
+
+local pattern_tab = Cf ( Carg(1) * (Cg(variable * newline^0)^0), rawset)
+
+local variable =
+ P("1:") * p_number
+ + P("2:") * p_string
+ + P("3:") * p_boolean
+ + S("4568") * P(":") * number^1
+ + P("7:") * (number * number^-5)^1
+
+local pattern_lst = (variable * newline^0)^0
+
+metapost.variables = { } -- currently across instances
+metapost.properties = { } -- to be stacked
+
+function metapost.untagvariable(str,variables) -- will be redone
+ if variables == false then
+ return lpegmatch(pattern_lst,str)
+ else
+ return lpegmatch(pattern_tab,str,1,variables or { })
+ end
+end
+
+-- function metapost.processspecial(str)
+-- lpegmatch(pattern_key,object.prescript,1,variables)
+-- end
+
+-- function metapost.processspecial(str)
+-- local code = loadstring(str)
+-- if code then
+-- if trace_variables then
+-- report_metapost("executing special code: %s",str)
+-- end
+-- code()
+-- else
+-- report_metapost("invalid special code: %s",str)
+-- end
+-- end
+
+local stack = { }
+
+local function pushproperties(figure)
+ -- maybe there will be getters in lmtx
+ local boundingbox = figure:boundingbox()
+ local slot = figure:charcode() or 0
+ local properties = {
+ llx = boundingbox[1],
+ lly = boundingbox[2],
+ urx = boundingbox[3],
+ ury = boundingbox[4],
+ slot = slot,
+ width = figure:width(),
+ height = figure:height(),
+ depth = figure:depth(),
+ italic = figure:italcorr(), -- figure:italic() in lmtx
+ number = slot,
+ }
+ insert(stack,properties)
+ metapost.properties = properties
+ return properties
+end
+
+local function popproperties()
+ metapost.properties = remove(stack)
+end
+
+function metapost.flush(specification,result)
+ if result then
+ local flusher = specification.flusher
+ local askedfig = specification.askedfig
+ local incontext = specification.incontext
+ local figures = result.fig
+ if figures then
+ flusher = flusher or pdfflusher
+ local resetplugins = metapost.resetplugins or ignore -- before figure
+ local processplugins = metapost.processplugins or ignore -- each object
+ local synchronizeplugins = metapost.synchronizeplugins or ignore
+ local pluginactions = metapost.pluginactions or ignore -- before / after
+ local startfigure = flusher.startfigure
+ local stopfigure = flusher.stopfigure
+ local flushfigure = flusher.flushfigure
+ local textfigure = flusher.textfigure
+ -- local processspecial = flusher.processspecial or metapost.processspecial
+ local tocomment = flusher.tocomment
+ for index=1,#figures do
+ local figure = figures[index]
+ local properties = pushproperties(figure)
+ if askedfig == "direct" or askedfig == "all" or askedfig == properties.number then
+ local objects = getobjects(result,figure,index)
+ local result = { }
+ local miterlimit = -1
+ local linecap = -1
+ local linejoin = -1
+ local dashed = false
+ local linewidth = false
+ local llx = properties.llx
+ local lly = properties.lly
+ local urx = properties.urx
+ local ury = properties.ury
+ if urx < llx then
+ -- invalid
+ startfigure(properties.number,0,0,0,0,"invalid",figure)
+ if tocomment then
+ result[#result+1] = tocomment("invalid")
+ end
+ stopfigure()
+ else
+
+ -- we need to be indirect if we want the one-pass solution
+
+ local groupstack = { }
+
+ local function processfigure()
+ if tocomment then
+ result[#result+1] = tocomment("begin")
+ end
+ result[#result+1] = "q"
+ if objects then
+ -- resetplugins(result) -- we should move the colorinitializer here
+ local savedpath = nil
+ local savedhtap = nil
+ for o=1,#objects do
+ local object = objects[o]
+ local objecttype = object.type
+ if objecttype == "fill" or objecttype == "outline" then
+ -- we use an indirect table as we want to overload
+ -- entries but this is not possible in userdata
+ --
+ -- can be optimized if no path
+ --
+ local original = object
+ local object = { }
+ setmetatable(object, {
+ __index = original
+ })
+ local before,
+ after = processplugins(object)
+ local evenodd = false
+ local collect = false
+ local both = false
+ local flush = false
+ local postscript = object.postscript
+ if not object.istext then
+ if postscript == "evenodd" then
+ evenodd = true
+ elseif postscript == "collect" then
+ collect = true
+ elseif postscript == "flush" then
+ flush = true
+ elseif postscript == "both" then
+ both = true
+ elseif postscript == "eoboth" then
+ evenodd = true
+ both = true
+ end
+ end
+ --
+ if flush and not savedpath then
+ -- forget about it
+ elseif collect then
+ if not savedpath then
+ savedpath = { object.path or false }
+ savedhtap = { object.htap or false }
+ else
+ savedpath[#savedpath+1] = object.path or false
+ savedhtap[#savedhtap+1] = object.htap or false
+ end
+ else
+ local objecttype = object.type -- can have changed
+ if before then
+ result = pluginactions(before,result,flushfigure)
+ end
+ local ml = object.miterlimit
+ if ml and ml ~= miterlimit then
+ miterlimit = ml
+ result[#result+1] = f_M(ml)
+ end
+ local lj = object.linejoin
+ if lj and lj ~= linejoin then
+ linejoin = lj
+ result[#result+1] = f_j(lj)
+ end
+ local lc = object.linecap
+ if lc and lc ~= linecap then
+ linecap = lc
+ result[#result+1] = f_J(lc)
+ end
+ if both then
+ if dashed ~= false then -- was just dashed test
+ result[#result+1] = "[] 0 d"
+ dashed = false
+ end
+ else
+ local dl = object.dash
+ if dl then
+ local d = f_d(concat(dl.dashes or {}," "),dl.offset)
+ if d ~= dashed then
+ dashed = d
+ result[#result+1] = d
+ end
+ elseif dashed ~= false then -- was just dashed test
+ result[#result+1] = "[] 0 d"
+ dashed = false
+ end
+ end
+ local path = object.path -- newpath
+ local transformed = false
+ local penwidth = 1
+ local open = path and path[1].left_type and path[#path].right_type -- at this moment only "end_point"
+ local pen = object.pen
+ if pen then
+ if pen.type == "elliptical" then
+ transformed, penwidth = pen_characteristics(original) -- boolean, value
+ if penwidth ~= linewidth then
+ result[#result+1] = f_w(penwidth)
+ linewidth = penwidth
+ end
+ if objecttype == "fill" then
+ objecttype = "both"
+ end
+ else -- calculated by mplib itself
+ objecttype = "fill"
+ end
+ end
+ if transformed then
+ result[#result+1] = "q"
+ end
+ if path then
+ if savedpath then
+ for i=1,#savedpath do
+ local path = savedpath[i]
+ if transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ end
+ savedpath = nil
+ end
+ if flush then
+ -- ignore this path
+ elseif transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ if force_stroke then
+ result[#result+1] = open and "S" or "h S"
+ elseif objecttype == "fill" then
+ result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
+ elseif objecttype == "outline" then
+ if both then
+ result[#result+1] = evenodd and "h B*" or "h B" -- B* = eo
+ else
+ result[#result+1] = open and "S" or "h S"
+ end
+ elseif objecttype == "both" then
+ result[#result+1] = evenodd and "h B*" or "h B" -- B* = eo -- b includes closepath
+ end
+ end
+ if transformed then
+ result[#result+1] = "Q"
+ end
+ local path = object.htap
+ if path then
+ if transformed then
+ result[#result+1] = "q"
+ end
+ if savedhtap then
+ for i=1,#savedhtap do
+ local path = savedhtap[i]
+ if transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ end
+ savedhtap = nil
+ evenodd = true
+ end
+ if transformed then
+ flushconcatpath(path,result,open)
+ else
+ flushnormalpath(path,result,open)
+ end
+ if force_stroke then
+ result[#result+1] = open and "S" or "h S"
+ elseif objecttype == "fill" then
+ result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
+ elseif objecttype == "outline" then
+ result[#result+1] = open and "S" or "h S"
+ elseif objecttype == "both" then
+ result[#result+1] = evenodd and "h B*" or "h B" -- B* = eo -- b includes closepath
+ end
+ if transformed then
+ result[#result+1] = "Q"
+ end
+ end
+ if after then
+ result = pluginactions(after,result,flushfigure)
+ end
+ end
+ if object.grouped then
+ -- can be qQ'd so changes can end up in groups
+ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
+ end
+ elseif objecttype == "start_clip" then
+ local evenodd = not object.istext and object.postscript == "evenodd"
+ result[#result+1] = "q"
+ flushnormalpath(object.path,result,false)
+ result[#result+1] = evenodd and "W* n" or "W n"
+ elseif objecttype == "stop_clip" then
+ result[#result+1] = "Q"
+ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
+ elseif objecttype == "start_bounds" or objecttype == "stop_bounds" then
+ -- skip
+ elseif objecttype == "start_group" then
+ if lpdf.flushgroup then
+ local before, after = processplugins(object)
+ if before then
+ result[#result+1] = "q"
+ result = pluginactions(before,result,flushfigure)
+ insert(groupstack, {
+ after = after,
+ result = result,
+ bbox = toboundingbox(object.path),
+ })
+ result = { }
+ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
+ else
+ insert(groupstack,false)
+ end
+ else
+ insert(groupstack,false)
+ end
+ elseif objecttype == "stop_group" then
+ local data = remove(groupstack)
+ if data then
+ local reference = lpdf.flushgroup(concat(result,"\r"),data.bbox)
+ result = data.result
+ result[#result+1] = reference
+ result = pluginactions(data.after,result,flushfigure)
+ result[#result+1] = "Q"
+ miterlimit, linecap, linejoin, dashed, linewidth = -1, -1, -1, "", false
+ end
+ -- if objecttype == "text" then
+ -- result[#result+1] = "q"
+ -- local ot = object.transform -- 3,4,5,6,1,2
+ -- result[#result+1] = f_cm(ot[3],ot[4],ot[5],ot[6],ot[1],ot[2])
+ -- flushfigure(result) -- flush accumulated literals
+ -- result = { }
+ -- textfigure(object.font,object.dsize,object.text,object.width,object.height,object.depth)
+ -- result[#result+1] = "Q"
+ -- elseif objecttype == "special" then
+ -- if processspecial then
+ -- processspecial(object.prescript)
+ -- end
+ -- else
+ else
+ -- error
+ end
+ end
+ end
+ result[#result+1] = "Q"
+ if tocomment then
+ result[#result+1] = tocomment("end")
+ end
+ flushfigure(result)
+ end
+ startfigure(properties.number,llx,lly,urx,ury,"begin",figure)
+ if incontext then
+ context(function() processfigure() end)
+ else
+ processfigure()
+ end
+ stopfigure("end")
+ end
+ if askedfig ~= "all" then
+ break
+ end
+ end
+ popproperties()
+ end
+ resetplugins(result) -- we should move the colorinitializer here
+ end
+ end
+end
+
+-- tracing:
+
+do
+
+ local result = { }
+
+ local flusher = {
+ startfigure = function()
+ result = { }
+ context.startnointerference()
+ end,
+ flushfigure = function(literals)
+ local n = #result
+ for i=1,#literals do
+ result[n+i] = literals[i]
+ end
+ end,
+ stopfigure = function()
+ context.stopnointerference()
+ end
+ }
+
+ local specification = {
+ flusher = flusher,
+ -- incontext = true,
+ }
+
+ function metapost.pdfliterals(result)
+ metapost.flush(specification,result)
+ return result
+ end
+
+end
+
+function metapost.totable(result,askedfig)
+ local askedfig = askedfig or 1
+ local figure = result and result.fig and result.fig[1]
+ if figure then
+ local results = { }
+ local objects = getobjects(result,figure,askedfig)
+ for o=1,#objects do
+ local object = objects[o]
+ local result = { }
+ local fields = getfields(object) -- hm, is this the whole list, if so, we can get it once
+ for f=1,#fields do
+ local field = fields[f]
+ result[field] = object[field]
+ end
+ results[o] = result
+ end
+ local boundingbox = figure:boundingbox()
+ return {
+ boundingbox = {
+ llx = boundingbox[1],
+ lly = boundingbox[2],
+ urx = boundingbox[3],
+ ury = boundingbox[4],
+ },
+ objects = results
+ }
+ else
+ return nil
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mlib-pdf.mkxl
index 763e7ecdd46..6ded235145c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-pdf.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-pdf.mkxl
@@ -15,7 +15,7 @@
%D We use bit more code that needed because we want to limit the amount of boxing.
-\registerctxluafile{mlib-pdf}{}
+\registerctxluafile{mlib-pdf}{autosuffix}
%D Some code is shared between MPLIB and MPS. The following variables are also
%D available for introspection and other purposes.
@@ -30,7 +30,7 @@
\ifdefined\MPbox \else \newbox \MPbox \fi
-\unexpanded\def\setMPboundingbox#1#2#3#4% at some point we might pass them as base or scaled points
+\permanent\protected\def\setMPboundingbox#1#2#3#4% at some point we might pass them as base or scaled points
{\global\MPllx #1\onebasepoint
\global\MPlly #2\onebasepoint
\global\MPurx #3\onebasepoint
@@ -38,7 +38,7 @@
\global\MPwidth \dimexpr\MPurx-\MPllx\relax
\global\MPheight\dimexpr\MPury-\MPlly\relax}
-\unexpanded\def\resetMPboundingbox
+\permanent\protected\def\resetMPboundingbox
{\global\MPwidth \zeropoint
\global\MPheight\zeropoint
\global\MPllx \zeropoint
@@ -46,10 +46,10 @@
\global\MPurx \zeropoint
\global\MPury \zeropoint}
-\let\popMPboundingbox\relax
+\aliased\let\popMPboundingbox\relax
-\unexpanded\def\pushMPboundingbox
- {\edef\popMPboundingbox
+\permanent\protected\def\pushMPboundingbox
+ {\enforced\permanent\protected\edef\popMPboundingbox
{\global\MPwidth \the\MPwidth
\global\MPheight\the\MPheight
\global\MPllx \the\MPllx
@@ -60,14 +60,14 @@
% we need to combine these
-\unexpanded\def\repositionMPboxindeed
+\permanent\protected\def\repositionMPboxindeed
{\setbox\MPbox\hpack\bgroup
\kern-\MPllx
\raise-\MPlly
\box\MPbox
\egroup}
-\unexpanded\def\repositionMPbox
+\permanent\protected\def\repositionMPbox
{\ifzeropt\MPllx
\ifzeropt\MPlly
% okay
@@ -78,20 +78,9 @@
\repositionMPboxindeed
\fi}
-\unexpanded\def\finalizeMPbox
- {\repositionMPbox
- \setbox\MPbox\vpack to \MPheight\bgroup
- \vfill
- \hsize\MPwidth
- \smashbox\MPbox
- \box\MPbox
- \egroup
- \wd\MPbox\MPwidth
- \ht\MPbox\MPheight}
-
% combined
-\unexpanded\def\finalizeMPbox
+\permanent\protected\def\finalizeMPbox
{\boxxoffset\MPbox-\MPllx\relax
\boxyoffset\MPbox\dimexpr\boxyoffset\MPbox-\MPheight-\MPlly\relax
\wd\MPbox\MPwidth
@@ -99,9 +88,7 @@
% MPLIB specific:
-\def\MPLIBtoPDF{\clf_mpflushliteral} % expanded
-
-\unexpanded\def\startMPLIBtoPDF#1#2#3#4%
+\permanent\protected\def\startMPLIBtoPDF#1#2#3#4%
{\meta_process_graphic_figure_start
\dostarttagged\t!mpgraphic\empty
\naturalhpack attr \imageattribute \plusone \bgroup
@@ -111,7 +98,7 @@
% \forgetall % already done elsewhere
\noindent} % forces the proper cm in the backend
-\unexpanded\def\stopMPLIBtoPDF
+\permanent\protected\def\stopMPLIBtoPDF
{\egroup
\finalizeMPbox
\box\MPbox
@@ -119,9 +106,6 @@
\dostoptagged
\meta_process_graphic_figure_stop}
-\def\MPLIBflushreset % This can (will) move to the Lua end.
- {\clf_mpflushreset}
-
%D Kind of special:
%
% test.mp:
@@ -136,19 +120,21 @@
% \directMPgraphic{input "test.mp" ;}
% \stoptext
-\let\normalstartMPLIBtoPDF\startMPLIBtoPDF
-\let\normalstopMPLIBtoPDF \stopMPLIBtoPDF
+\aliased\let\normalstartMPLIBtoPDF\startMPLIBtoPDF
+\aliased\let\normalstopMPLIBtoPDF \stopMPLIBtoPDF
+
+\permanent\protected\def\directstartMPLIBtoPDF{\startTEXpage\normalstartMPLIBtoPDF}
+\permanent\protected\def\directstopMPLIBtoPDF {\normalstopMPLIBtoPDF\stopTEXpage}
-\unexpanded\def\directstartMPLIBtoPDF{\startTEXpage\normalstartMPLIBtoPDF}
-\unexpanded\def\directstopMPLIBtoPDF {\normalstopMPLIBtoPDF\stopTEXpage}
+% can become \permanent\protected\def\directMPgraphic#=#*#=% but best test first
-\unexpanded\def\directMPgraphic
+\permanent\protected\def\directMPgraphic
{\dodoublegroupempty\mlib_direct_graphic}
\def\mlib_direct_graphic#1#2% makes pages (todo: make boxes)
{\meta_begin_graphic_group{#1}%
- \let\startMPLIBtoPDF\directstartMPLIBtoPDF
- \let\stopMPLIBtoPDF \directstopMPLIBtoPDF
+ \enforced\let\startMPLIBtoPDF\directstartMPLIBtoPDF
+ \enforced\let\stopMPLIBtoPDF \directstopMPLIBtoPDF
\meta_start_current_graphic
\forgetall
\edef\p_extensions{\MPinstanceparameter\s!extensions}%
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-pps.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-pps.lmt
new file mode 100644
index 00000000000..32f23c39d27
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-pps.lmt
@@ -0,0 +1,1647 @@
+if not modules then modules = { } end modules ['mlib-pps'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local format, gmatch, match, split, gsub = string.format, string.gmatch, string.match, string.split, string.gsub
+local tonumber, type, unpack, next, select = tonumber, type, unpack, next, select
+local round, sqrt, min, max = math.round, math.sqrt, math.min, math.max
+local insert, remove, concat = table.insert, table.remove, table.concat
+local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg
+local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter
+local formatters = string.formatters
+local exists, savedata = io.exists, io.savedata
+
+local mplib = mplib
+local metapost = metapost
+local lpdf = lpdf
+local context = context
+
+local scan = mp.scan
+local inject = mp.inject
+
+local mpscanstring = scan.string
+local mpscannumeric = scan.numeric
+
+local injecttriplet = inject.triplet
+
+local registerscript = metapost.registerscript
+
+local implement = interfaces.implement
+local setmacro = interfaces.setmacro
+
+local texsetbox = tex.setbox
+local textakebox = tex.takebox -- or: nodes.takebox
+local texrunlocal = tex.runlocal
+local copy_list = node.copy_list
+local flush_list = node.flush_list
+local setmetatableindex = table.setmetatableindex
+local sortedhash = table.sortedhash
+
+local new_hlist = nodes.pool.hlist
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local trace_runs = false trackers.register("metapost.runs", function(v) trace_runs = v end)
+local trace_textexts = false trackers.register("metapost.textexts", function(v) trace_textexts = v end)
+local trace_scripts = false trackers.register("metapost.scripts", function(v) trace_scripts = v end)
+local trace_btexetex = false trackers.register("metapost.btexetex", function(v) trace_btexetex = v end)
+
+local report_metapost = logs.reporter("metapost")
+local report_textexts = logs.reporter("metapost","textexts")
+local report_scripts = logs.reporter("metapost","scripts")
+
+local colors = attributes.colors
+local defineprocesscolor = colors.defineprocesscolor
+local definespotcolor = colors.definespotcolor
+local definemultitonecolor = colors.definemultitonecolor
+local colorvalue = colors.value
+
+local transparencies = attributes.transparencies
+local registertransparency = transparencies.register
+local transparencyvalue = transparencies.value
+
+local rgbtocmyk = colors.rgbtocmyk -- or function() return 0,0,0,1 end
+local cmyktorgb = colors.cmyktorgb -- or function() return 0,0,0 end
+local rgbtogray = colors.rgbtogray -- or function() return 0 end
+local cmyktogray = colors.cmyktogray -- or function() return 0 end
+
+local nooutercolor = "0 g 0 G"
+local nooutertransparency = "/Tr0 gs" -- only when set
+local outercolormode = 0
+local outercolormodel = 1
+local outercolor = nooutercolor
+local outertransparency = nooutertransparency
+local innercolor = nooutercolor
+local innertransparency = nooutertransparency
+
+local pdfcolor = lpdf.color
+local pdftransparency = lpdf.transparency
+
+function metapost.setoutercolor(mode,colormodel,colorattribute,transparencyattribute)
+ -- has always to be called before conversion
+ -- todo: transparency (not in the mood now)
+ outercolormode = mode
+ outercolormodel = colormodel
+ if mode == 1 or mode == 3 then
+ -- inherit from outer (registered color)
+ outercolor = pdfcolor(colormodel,colorattribute) or nooutercolor
+ outertransparency = pdftransparency(transparencyattribute) or nooutertransparency
+ elseif mode == 2 then
+ -- stand alone (see m-punk.tex)
+ outercolor = ""
+ outertransparency = ""
+ else -- 0
+ outercolor = nooutercolor
+ outertransparency = nooutertransparency
+ end
+ innercolor = outercolor
+ innertransparency = outertransparency -- not yet used
+end
+
+-- todo: get this from the lpdf module
+
+local f_f = formatters["%.6N"]
+local f_f3 = formatters["%.3N"]
+local f_gray = formatters["%.3N g %.3N G"]
+local f_rgb = formatters["%.3N %.3N %.3N rg %.3N %.3N %.3N RG"]
+local f_cmyk = formatters["%.3N %.3N %.3N %.3N k %.3N %.3N %.3N %.3N K"]
+local f_cm_b = formatters["q %.6N %.6N %.6N %.6N %.6N %.6N cm"]
+local f_scn = formatters["%.3N"]
+
+local f_shade = formatters["MpSh%s"]
+local f_spot = formatters["/%s cs /%s CS %s SCN %s scn"]
+local s_cm_e = "Q"
+
+local function checked_color_pair(color,...)
+ if not color then
+ return innercolor, outercolor
+ end
+ if outercolormode == 3 then
+ innercolor = color(...)
+ return innercolor, innercolor
+ else
+ return color(...), outercolor
+ end
+end
+
+function metapost.colorinitializer()
+ innercolor = outercolor
+ innertransparency = outertransparency
+ return outercolor, outertransparency
+end
+
+--~
+
+local specificationsplitter = tsplitat(" ")
+local colorsplitter = tsplitter(":",tonumber) -- no need for :
+local domainsplitter = tsplitter(" ",tonumber)
+local centersplitter = domainsplitter
+local coordinatesplitter = domainsplitter
+
+-- thanks to taco's reading of the postscript manual:
+--
+-- x' = sx * x + ry * y + tx
+-- y' = rx * x + sy * y + ty
+
+local nofshades = 0 -- todo: hash resources, start at 1000 in order not to clash with older
+
+local function normalize(ca,cb)
+ if #cb == 1 then
+ if #ca == 4 then
+ cb[1], cb[2], cb[3], cb[4] = 0, 0, 0, 1-cb[1]
+ else
+ cb[1], cb[2], cb[3] = cb[1], cb[1], cb[1]
+ end
+ elseif #cb == 3 then
+ if #ca == 4 then
+ cb[1], cb[2], cb[3], cb[4] = rgbtocmyk(cb[1],cb[2],cb[3])
+ else
+ cb[1], cb[2], cb[3] = cmyktorgb(cb[1],cb[2],cb[3],cb[4])
+ end
+ end
+end
+
+
+local commasplitter = tsplitat(",")
+
+local function checkandconvertspot(n_a,f_a,c_a,v_a,n_b,f_b,c_b,v_b)
+ -- must be the same but we don't check
+ local name = f_shade(nofshades)
+ local ca = lpegmatch(commasplitter,v_a)
+ local cb = lpegmatch(commasplitter,v_b)
+ if #ca == 0 or #cb == 0 then
+ return { 0 }, { 1 }, "DeviceGray", name
+ else
+ for i=1,#ca do ca[i] = tonumber(ca[i]) or 0 end
+ for i=1,#cb do cb[i] = tonumber(cb[i]) or 1 end
+ --~ spotcolorconverter(n_a,f_a,c_a,v_a) -- not really needed
+ return ca, cb, n_a or n_b, name
+ end
+end
+
+local function checkandconvert(ca,cb,model)
+ local name = f_shade(nofshades)
+ if not ca or not cb or type(ca) == "string" then
+ return { 0 }, { 1 }, "DeviceGray", name
+ else
+ if #ca > #cb then
+ normalize(ca,cb)
+ elseif #ca < #cb then
+ normalize(cb,ca)
+ end
+ if not model then
+ model = colors.currentnamedmodel()
+ end
+ if model == "all" then
+ model= (#ca == 4 and "cmyk") or (#ca == 3 and "rgb") or "gray"
+ end
+ if model == "rgb" then
+ if #ca == 4 then
+ ca = { cmyktorgb(ca[1],ca[2],ca[3],ca[4]) }
+ cb = { cmyktorgb(cb[1],cb[2],cb[3],cb[4]) }
+ elseif #ca == 1 then
+ local a = 1 - ca[1]
+ local b = 1 - cb[1]
+ ca = { a, a, a }
+ cb = { b, b, b }
+ end
+ return ca, cb, "DeviceRGB", name, model
+ elseif model == "cmyk" then
+ if #ca == 3 then
+ ca = { rgbtocmyk(ca[1],ca[2],ca[3]) }
+ cb = { rgbtocmyk(cb[1],cb[2],cb[3]) }
+ elseif #ca == 1 then
+ ca = { 0, 0, 0, ca[1] }
+ cb = { 0, 0, 0, ca[1] }
+ end
+ return ca, cb, "DeviceCMYK", name, model
+ else
+ if #ca == 4 then
+ ca = { cmyktogray(ca[1],ca[2],ca[3],ca[4]) }
+ cb = { cmyktogray(cb[1],cb[2],cb[3],cb[4]) }
+ elseif #ca == 3 then
+ ca = { rgbtogray(ca[1],ca[2],ca[3]) }
+ cb = { rgbtogray(cb[1],cb[2],cb[3]) }
+ end
+ -- backend specific (will be renamed)
+ return ca, cb, "DeviceGray", name, model
+ end
+ end
+end
+
+-- We keep textexts in a shared list (as it's easier that way and we also had that in
+-- the beginning). Each graphic gets its own (1 based) subtable so that we can also
+-- handle multiple conversions in one go which is needed when we process mp files
+-- directly.
+
+local stack = { } -- quick hack, we will pass topofstack around
+local top = nil
+local nofruns = 0 -- askedfig: "all", "first", number
+
+local function preset(t,k)
+ -- references to textexts by mp index
+ local v = {
+ textrial = 0,
+ texfinal = 0,
+ texslots = { },
+ texorder = { },
+ texhash = { },
+ }
+ t[k] = v
+ return v
+end
+
+local function startjob(plugmode,kind,mpx)
+ insert(stack,top)
+ top = {
+ textexts = { }, -- all boxes, optionally with a different color
+ texstrings = { },
+ texregimes = { },
+ mapstrings = { },
+ mapindices = { },
+ mapmoves = { },
+ texlast = 0,
+ texdata = setmetatableindex({},preset), -- references to textexts in order or usage
+ plugmode = plugmode, -- some day we can then skip all pre/postscripts
+ extradata = mpx and metapost.getextradata(mpx),
+ }
+ if trace_runs then
+ report_metapost("starting %s run at level %i in %s mode",
+ kind,#stack+1,plugmode and "plug" or "normal")
+ end
+ return top
+end
+
+local function stopjob()
+ if top then
+ for slot, content in next, top.textexts do
+ if content then
+ flush_list(content)
+ if trace_textexts then
+ report_textexts("freeing text %s",slot)
+ end
+ end
+ end
+ if trace_runs then
+ report_metapost("stopping run at level %i",#stack+1)
+ end
+ top = remove(stack)
+ return top
+ end
+end
+
+function metapost.getjobdata()
+ return top
+end
+
+-- end of new
+
+local settext = function(box,slot,str)
+ if top then
+ -- if trace_textexts then
+ -- report_textexts("getting text %s from box %s",slot,box)
+ -- end
+ top.textexts[slot] = textakebox(box)
+ end
+end
+
+local gettext = function(box,slot)
+ if top then
+ texsetbox(box,top.textexts[slot])
+ top.textexts[slot] = false
+ -- if trace_textexts then
+ -- report_textexts("putting text %s in box %s",slot,box)
+ -- end
+ end
+end
+
+metapost.settext = settext
+metapost.gettext = gettext
+
+implement { name = "mpsettext", actions = settext, arguments = { "integer", "integer" } } -- box slot
+implement { name = "mpgettext", actions = gettext, arguments = { "integer", "integer" } } -- box slot
+
+-- rather generic pdf, so use this elsewhere too it no longer pays
+-- off to distinguish between outline and fill (we now have both
+-- too, e.g. in arrows)
+
+metapost.reducetogray = true
+
+local models = { }
+
+function models.all(cr)
+ local n = #cr
+ if n == 0 then
+ return checked_color_pair()
+ elseif metapost.reducetogray then
+ if n == 1 then
+ local s = cr[1]
+ return checked_color_pair(f_gray,s,s)
+ elseif n == 3 then
+ local r = cr[1]
+ local g = cr[2]
+ local b = cr[3]
+ if r == g and g == b then
+ return checked_color_pair(f_gray,r,r)
+ else
+ return checked_color_pair(f_rgb,r,g,b,r,g,b)
+ end
+ else
+ local c = cr[1]
+ local m = cr[2]
+ local y = cr[3]
+ local k = cr[4]
+ if c == m and m == y and y == 0 then
+ k = 1 - k
+ return checked_color_pair(f_gray,k,k)
+ else
+ return checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
+ end
+ end
+ elseif n == 1 then
+ local s = cr[1]
+ return checked_color_pair(f_gray,s,s)
+ elseif n == 3 then
+ local r = cr[1]
+ local g = cr[2]
+ local b = cr[3]
+ return checked_color_pair(f_rgb,r,g,b,r,g,b)
+ else
+ local c = cr[1]
+ local m = cr[2]
+ local y = cr[3]
+ local k = cr[4]
+ return checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
+ end
+end
+
+function models.rgb(cr)
+ local n = #cr
+ if n == 0 then
+ return checked_color_pair()
+ elseif metapost.reducetogray then
+ if n == 1 then
+ local s = cr[1]
+ checked_color_pair(f_gray,s,s)
+ elseif n == 3 then
+ local r = cr[1]
+ local g = cr[2]
+ local b = cr[3]
+ if r == g and g == b then
+ return checked_color_pair(f_gray,r,r)
+ else
+ return checked_color_pair(f_rgb,r,g,b,r,g,b)
+ end
+ else
+ local c = cr[1]
+ local m = cr[2]
+ local y = cr[3]
+ local k = cr[4]
+ if c == m and m == y and y == 0 then
+ k = 1 - k
+ return checked_color_pair(f_gray,k,k)
+ else
+ local r, g, b = cmyktorgb(c,m,y,k)
+ return checked_color_pair(f_rgb,r,g,b,r,g,b)
+ end
+ end
+ elseif n == 1 then
+ local s = cr[1]
+ return checked_color_pair(f_gray,s,s)
+ else
+ local r = cr[1]
+ local g = cr[2]
+ local b = cr[3]
+ local r, g, b
+ if n == 3 then
+ r, g, b = cmyktorgb(r,g,b,cr[4])
+ end
+ return checked_color_pair(f_rgb,r,g,b,r,g,b)
+ end
+end
+
+function models.cmyk(cr)
+ local n = #cr
+ if n == 0 then
+ return checked_color_pair()
+ elseif metapost.reducetogray then
+ if n == 1 then
+ local s = cr[1]
+ return checked_color_pair(f_gray,s,s)
+ elseif n == 3 then
+ local r = cr[1]
+ local g = cr[2]
+ local b = cr[3]
+ if r == g and g == b then
+ return checked_color_pair(f_gray,r,r)
+ else
+ local c, m, y, k = rgbtocmyk(r,g,b)
+ return checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
+ end
+ else
+ local c = cr[1]
+ local m = cr[2]
+ local y = cr[3]
+ local k = cr[4]
+ if c == m and m == y and y == 0 then
+ k = 1 - k
+ return checked_color_pair(f_gray,k,k)
+ else
+ return checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
+ end
+ end
+ elseif n == 1 then
+ local s = cr[1]
+ return checked_color_pair(f_gray,s,s)
+ else
+ local c = cr[1]
+ local m = cr[2]
+ local y = cr[3]
+ local k = cr[4]
+ if n == 3 then
+ if c == m and m == y then
+ k, c, m, y = 1 - c, 0, 0, 0
+ else
+ c, m, y, k = rgbtocmyk(c,m,y)
+ end
+ end
+ return checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
+ end
+end
+
+function models.gray(cr)
+ local n = #cr
+ local s = 0
+ if n == 0 then
+ return checked_color_pair()
+ elseif n == 4 then
+ s = cmyktogray(cr[1],cr[2],cr[3],cr[4])
+ elseif n == 3 then
+ s = rgbtogray(cr[1],cr[2],cr[3])
+ else
+ s = cr[1]
+ end
+ return checked_color_pair(f_gray,s,s)
+end
+
+models[1] = models.all
+models[2] = models.gray
+models[3] = models.rgb
+models[4] = models.cmyk
+
+setmetatableindex(models, function(t,k)
+ local v = models.gray
+ t[k] = v
+ return v
+end)
+
+local function colorconverter(cs)
+ return models[outercolormodel](cs)
+end
+
+local factor = 65536*(7227/7200)
+
+implement {
+ name = "mpsetsxsy",
+ arguments = { "dimen", "dimen", "dimen" },
+ actions = function(wd,ht,dp)
+ local hd = ht + dp
+ setmacro("mlib_sx",wd ~= 0 and factor/wd or 0)
+ setmacro("mlib_sy",hd ~= 0 and factor/hd or 0)
+ end
+}
+
+local function sxsy(wd,ht,dp) -- helper for text
+ local hd = ht + dp
+ return (wd ~= 0 and factor/wd) or 0, (hd ~= 0 and factor/hd) or 0
+end
+
+metapost.sxsy = sxsy
+
+-- for stock mp we need to declare the booleans first
+
+local do_begin_fig = "; beginfig(1) ; "
+local do_end_fig = "; endfig ;"
+local do_safeguard = ";"
+
+function metapost.preparetextextsdata()
+ local textexts = top.textexts
+ local collected = { }
+ for k, data in sortedhash(top.texdata) do -- sort is nicer in trace
+ local texorder = data.texorder
+ for n=1,#texorder do
+ local box = textexts[texorder[n]]
+ if box then
+ collected[n] = box
+ else
+ break
+ end
+ end
+ end
+ mp.mf_tt_initialize(collected)
+end
+
+local runmetapost = metapost.run
+
+local function checkaskedfig(askedfig) -- return askedfig, wrappit
+ if not askedfig then
+ return "direct", true
+ elseif askedfig == "all" then
+ return "all", false
+ elseif askedfig == "direct" then
+ return "all", true
+ else
+ askedfig = tonumber(askedfig)
+ if askedfig then
+ return askedfig, false
+ else
+ return "direct", true
+ end
+ end
+end
+
+-- This one is called from the \TEX\ end so the specification is different
+-- from the specification to metapost,run cum suis! The definitions and
+-- extension used to be handled here but are now delegated to the format
+-- initializers because we need to accumulate them for nested instances (a
+-- side effect of going single pass).
+
+function metapost.graphic_base_pass(specification)
+ local mpx = specification.mpx -- mandate
+ local top = startjob(true,"base",mpx)
+ local data = specification.data or ""
+ local inclusions = specification.inclusions or ""
+ local initializations = specification.initializations or ""
+ local askedfig,
+ wrappit = checkaskedfig(specification.figure)
+ nofruns = nofruns + 1
+ top.askedfig = askedfig
+ top.wrappit = wrappit
+ top.nofruns = nofruns
+ metapost.namespace = specification.namespace or ""
+ top.mpx = mpx
+ top.data = data
+ top.initializations = initializations
+ if trace_runs then
+ report_metapost("running job %s, asked figure %a",nofruns,askedfig)
+ end
+ runmetapost {
+ mpx = mpx,
+ askedfig = askedfig,
+ incontext = true,
+ data = {
+ inclusions,
+ wrappit and do_begin_fig or "",
+ initializations,
+ do_safeguard,
+ data,
+ wrappit and do_end_fig or "",
+ },
+ }
+ context(stopjob)
+end
+
+local function oldschool(mpx, data, trial_run, flusher, was_multi_pass, is_extra_pass, askedfig, incontext)
+ metapost.process {
+ mpx = mpx,
+ flusher = flusher,
+ askedfig = askedfig,
+ useplugins = incontext,
+ incontext = incontext,
+ data = data,
+ }
+end
+
+function metapost.process(specification,...)
+ if type(specification) ~= "table" then
+ oldschool(specification,...)
+ else
+ startjob(specification.incontext or specification.useplugins,"process",false)
+ runmetapost(specification)
+ stopjob()
+ end
+end
+
+-- -- the new plugin handler -- --
+
+local sequencers = utilities.sequencers
+local appendgroup = sequencers.appendgroup
+local appendaction = sequencers.appendaction
+
+local resetteractions = sequencers.new { arguments = "t" }
+local processoractions = sequencers.new { arguments = "object,prescript,before,after" }
+
+appendgroup(resetteractions, "system")
+appendgroup(processoractions,"system")
+
+-- later entries come first
+
+local scriptsplitter = Ct ( Ct (
+ C((1-S("= "))^1) * S("= ")^1 * C((1-S("\n\r"))^0) * S("\n\r")^0
+)^0 )
+
+local function splitprescript(script)
+ local hash = lpegmatch(scriptsplitter,script)
+ for i=#hash,1,-1 do
+ local h = hash[i]
+ if h == "reset" then
+ for k, v in next, hash do
+ if type(k) ~= "number" then
+ hash[k] = nil
+ end
+ end
+ else
+ hash[h[1]] = h[2]
+ end
+ end
+ if trace_scripts then
+ report_scripts(table.serialize(hash,"prescript"))
+ end
+ return hash
+end
+
+metapost.splitprescript = splitprescript
+
+-- -- not used:
+--
+-- local function splitpostscript(script)
+-- local hash = lpegmatch(scriptsplitter,script)
+-- for i=1,#hash do
+-- local h = hash[i]
+-- hash[h[1]] = h[2]
+-- end
+-- if trace_scripts then
+-- report_scripts(table.serialize(hash,"postscript"))
+-- end
+-- return hash
+-- end
+
+function metapost.pluginactions(what,t,flushfigure) -- before/after object, depending on what
+ if top and top.plugmode then -- hm, what about other features
+ for i=1,#what do
+ local wi = what[i]
+ if type(wi) == "function" then
+ -- assume injection
+ flushfigure(t) -- to be checked: too many 0 g 0 G
+ t = { }
+ wi()
+ else
+ t[#t+1] = wi
+ end
+ end
+ return t
+ end
+end
+
+function metapost.resetplugins(t) -- intialize plugins, before figure
+ if top and top.plugmode then
+ outercolormodel = colors.currentmodel() -- currently overloads the one set at the tex end
+ resetteractions.runner(t)
+ end
+end
+
+function metapost.processplugins(object) -- each object (second pass)
+ if top and top.plugmode then
+ local prescript = object.prescript -- specifications
+ if prescript and #prescript > 0 then
+ local before = { }
+ local after = { }
+ processoractions.runner(object,splitprescript(prescript) or { },before,after)
+ return #before > 0 and before, #after > 0 and after
+ else
+ local c = object.color
+ if c and #c > 0 then
+ local b, a = colorconverter(c)
+ return { b }, { a }
+ end
+ end
+ end
+end
+
+-- helpers
+
+local basepoints = number.dimenfactors["bp"]
+
+local function cm(object)
+ local op = object.path
+ if op then
+ local first = op[1]
+ local second = op[2]
+ local fourth = op[4]
+ if fourth then
+ local tx = first.x_coord
+ local ty = first.y_coord
+ local sx = second.x_coord - tx
+ local sy = fourth.y_coord - ty
+ local rx = second.y_coord - ty
+ local ry = fourth.x_coord - tx
+ if sx == 0 then sx = 0.00001 end
+ if sy == 0 then sy = 0.00001 end
+ return sx, rx, ry, sy, tx, ty
+ end
+ end
+ return 1, 0, 0, 1, 0, 0 -- weird case
+end
+
+metapost.cm = cm
+
+-- color
+
+local function cl_reset(t)
+ t[#t+1] = metapost.colorinitializer() -- only color
+end
+
+-- text
+
+local tx_reset, tx_process do
+
+ local eol = S("\n\r")^1
+ local cleaner = Cs((P("@@")/"@" + P("@")/"%%" + P(1))^0)
+ local splitter = Ct(
+ ( (
+ P("s:") * C((1-eol)^1)
+ + P("n:") * ((1-eol)^1/tonumber)
+ + P("b:") * ((1-eol)^1/toboolean)
+ ) * eol^0 )^0)
+
+ local function applyformat(s)
+ local t = lpegmatch(splitter,s)
+ if #t == 1 then
+ return s
+ else
+ local f = lpegmatch(cleaner,t[1])
+ return formatters[f](unpack(t,2))
+ end
+ end
+
+ local fmt = formatters["%s %s %s % t"]
+ ----- pat = tsplitat(":")
+ local pat = lpeg.tsplitter(":",tonumber) -- so that %F can do its work
+
+ local f_gray_yes = formatters["s=%.3N,a=%i,t=%.3N"]
+ local f_gray_nop = formatters["s=%.3N"]
+ local f_rgb_yes = formatters["r=%.3N,g=%.3N,b=%.3N,a=%.3N,t=%.3N"]
+ local f_rgb_nop = formatters["r=%.3N,g=%.3N,b=%.3N"]
+ local f_cmyk_yes = formatters["c=%.3N,m=%.3N,y=%.3N,k=%.3N,a=%.3N,t=%.3N"]
+ local f_cmyk_nop = formatters["c=%.3N,m=%.3N,y=%.3N,k=%.3N"]
+
+ local ctx_MPLIBsetNtext = context.MPLIBsetNtextX
+ local ctx_MPLIBsetCtext = context.MPLIBsetCtextX
+ local ctx_MPLIBsettext = context.MPLIBsettextX
+
+ local bp = number.dimenfactors.bp
+
+ local mp_index = 0
+ local mp_target = 0
+ local mp_c = nil
+ local mp_a = nil
+ local mp_t = nil
+
+ local function processtext()
+ local mp_text = top.texstrings[mp_index]
+ local mp_regime = top.texregimes[mp_index]
+ if mp_regime and tonumber(mp_regime) >= 0 then
+ mp_text = function()
+ context.sprint(mp_regime,top.texstrings[mp_index] or "")
+ end
+ end
+ if not mp_text then
+ report_textexts("missing text for index %a",mp_index)
+ elseif not mp_c then
+ ctx_MPLIBsetNtext(mp_target,mp_text)
+ elseif #mp_c == 1 then
+ if mp_a and mp_t then
+ ctx_MPLIBsetCtext(mp_target,f_gray_yes(mp_c[1],mp_a,mp_t),mp_text)
+ else
+ ctx_MPLIBsetCtext(mp_target,f_gray_nop(mp_c[1]),mp_text)
+ end
+ elseif #mp_c == 3 then
+ if mp_a and mp_t then
+ ctx_MPLIBsetCtext(mp_target,f_rgb_yes(mp_c[1],mp_c[2],mp_c[3],mp_a,mp_t),mp_text)
+ else
+ ctx_MPLIBsetCtext(mp_target,f_rgb_nop(mp_c[1],mp_c[2],mp_c[3]),mp_text)
+ end
+ elseif #mp_c == 4 then
+ if mp_a and mp_t then
+ ctx_MPLIBsetCtext(mp_target,f_cmyk_yes(mp_c[1],mp_c[2],mp_c[3],mp_c[4],mp_a,mp_t),mp_text)
+ else
+ ctx_MPLIBsetCtext(mp_target,f_cmyk_nop(mp_c[1],mp_c[2],mp_c[3],mp_c[4]),mp_text)
+ end
+ else
+ -- can't happen
+ ctx_MPLIBsetNtext(mp_target,mp_text)
+ end
+ end
+
+ local madetext = nil
+
+ local function mf_some_text(index,str,regime)
+ mp_target = index
+ mp_index = index
+ mp_c = nil
+ mp_a = nil
+ mp_t = nil
+ top.texstrings[mp_index] = str
+ top.texregimes[mp_index] = regime or -1
+ texrunlocal("mptexttoks")
+ local box = textakebox("mptextbox")
+ top.textexts[mp_target] = box
+ injecttriplet(bp*box.width,bp*box.height,bp*box.depth)
+ madetext = nil
+ end
+
+ local function mf_made_text(index)
+ mf_some_text(index,madetext,catcodes.numbers.ctxcatcodes) -- btex/etex ..
+ end
+
+ registerscript("sometextext", function() mf_some_text(mpscannumeric(),mpscanstring(),mpscannumeric()) end)
+ registerscript("madetextext", function() mf_made_text(mpscannumeric()) end)
+
+ -- a label can be anything, also something mp doesn't like in strings
+ -- so we return an index instead
+
+ function metapost.processing()
+ return top and true or false
+ end
+
+ function metapost.remaptext(replacement)
+ if top then
+ local mapstrings = top.mapstrings
+ local mapindices = top.mapindices
+ local label = replacement.label
+ local index = 0
+ if label then
+ local found = mapstrings[label]
+ if found then
+ setmetatableindex(found,replacement)
+ index = found.index
+ else
+ index = #mapindices + 1
+ replacement.index = index
+ mapindices[index] = replacement
+ mapstrings[label] = replacement
+ end
+ end
+ return index
+ else
+ return 0
+ end
+ end
+
+ function metapost.remappedtext(what)
+ return top and (top.mapstrings[what] or top.mapindices[tonumber(what)])
+ end
+
+ function mp.mf_map_move(index)
+ mp.triplet(top.mapmoves[index])
+ end
+
+ function mp.mf_map_text(index,str,regime)
+ local map = top.mapindices[tonumber(str)]
+ if type(map) == "table" then
+ local text = map.text
+ local overload = map.overload
+ local offset = 0
+ local width = 0
+ local where = nil
+ --
+ mp_index = index
+ -- the image text
+ if overload then
+ top.texstrings[mp_index] = map.template or map.label or "error"
+ top.texregimes[mp_index] = regime or -1
+ texrunlocal("mptexttoks")
+ local box = textakebox("mptextbox") or new_hlist()
+ width = bp * box.width
+ where = overload.where
+ end
+ -- the real text
+ top.texstrings[mp_index] = overload and overload.text or text or "error"
+ top.texregimes[mp_index] = regime or -1
+ texrunlocal("mptexttoks")
+ local box = textakebox("mptextbox") or new_hlist()
+ local twd = bp * box.width
+ local tht = bp * box.height
+ local tdp = bp * box.depth
+ -- the check
+ if where then
+ local scale = 1 -- / (map.scale or 1)
+ if where == "l" or where == "left" then
+ offset = scale * (twd - width)
+ elseif where == "m" or where == "middle" then
+ offset = scale * (twd - width) / 2
+ end
+ end
+ -- the result
+ top.textexts[mp_index] = box
+ top.mapmoves[mp_index] = { offset, map.dx or 0, map.dy or 0 }
+ --
+ mp.triplet(twd,tht,tdp)
+ madetext = nil
+ return
+ else
+ map = type(map) == "string" and map or str
+ return mf_some_text(index,context.escape(map) or map)
+ end
+ end
+
+ -- This is a bit messy. In regular metapost it's a kind of immediate replacement
+ -- so embedded btex ... etex is not really working as one would expect. We now have
+ -- a mix: it's immediate when we are at the outer level (rawmadetext) and indirect
+ -- (with the danger of stuff that doesn't work well in strings) when we are for
+ -- instance in a macro definition (rawtextext (pass back string)) ... of course one
+ -- should use textext so this is just a catch. When not in lmtx it's never immediate.
+
+ local reported = false
+ local alwayswrap = false -- CONTEXTLMTXMODE <= 1 -- was always nil due to typo
+
+ function metapost.maketext(s,mode)
+ if not reported then
+ reported = true
+ report_metapost("use 'textext(.....)' instead of 'btex ..... etex'")
+ end
+ if mode and mode == 1 then
+ if trace_btexetex then
+ report_metapost("ignoring verbatimtex: [[%s]]",s)
+ end
+ elseif alwayswrap then
+ if trace_btexetex then
+ report_metapost("rewrapping btex ... etex [[%s]]",s)
+ end
+ return 'rawtextext("' .. gsub(s,'"','"&ditto&"') .. '")' -- nullpicture
+ elseif metapost.currentmpxstatus() ~= 0 then
+ if trace_btexetex then
+ report_metapost("rewrapping btex ... etex at the outer level [[%s]]",s)
+ end
+ return 'rawtextext("' .. gsub(s,'"','"&ditto&"') .. '")' -- nullpicture
+ else
+ if trace_btexetex then
+ report_metapost("handling btex ... etex: [[%s]]",s)
+ end
+ -- madetext = utilities.strings.collapse(s)
+ madetext = s
+ return "rawmadetext" -- is assuming immediate processing
+ end
+ end
+
+ function mp.mf_formatted_text(index,fmt,...)
+ local t = { }
+ for i=1,select("#",...) do
+ local ti = select(i,...)
+ if type(ti) ~= "table" then
+ t[#t+1] = ti
+ end
+ end
+ local f = lpegmatch(cleaner,fmt)
+ local s = formatters[f](unpack(t)) or ""
+ mf_some_text(index,s)
+ end
+
+ interfaces.implement {
+ name = "mptexttoks",
+ actions = processtext,
+ }
+
+ tx_reset = function()
+ if top then
+ top.texhash = { }
+ top.texlast = 0
+ end
+ end
+
+ tx_process = function(object,prescript,before,after)
+ local data = top.texdata[metapost.properties.number] -- the current figure number, messy
+ local index = tonumber(prescript.tx_index)
+ if index then
+ if trace_textexts then
+ report_textexts("using index %a",index)
+ end
+ --
+ mp_c = object.color
+ if #mp_c == 0 then
+ local txc = prescript.tx_color
+ if txc then
+ mp_c = lpegmatch(pat,txc)
+ end
+ end
+ mp_a = tonumber(prescript.tr_alternative)
+ mp_t = tonumber(prescript.tr_transparency)
+ --
+ mp_index = index
+ mp_target = top.texlast - 1
+ top.texlast = mp_target
+ --
+ local mp_text = top.texstrings[mp_index]
+ local mp_hash = prescript.tx_cache
+ local box
+ if mp_hash == "no" then
+ texrunlocal("mptexttoks")
+ box = textakebox("mptextbox")
+ else
+ local cache = data.texhash
+ if mp_hash then
+ mp_hash = tonumber(mp_hash)
+ end
+ if mp_hash then
+ local extradata = top.extradata
+ if extradata then
+ cache = extradata.globalcache
+ if not cache then
+ cache = { }
+ extradata.globalcache = cache
+ end
+ if trace_runs then
+ if cache[mp_hash] then
+ report_textexts("reusing global entry %i",mp_hash)
+ else
+ report_textexts("storing global entry %i",mp_hash)
+ end
+ end
+ else
+ mp_hash = nil
+ end
+ end
+ if not mp_hash then
+ mp_hash = fmt(mp_text,mp_a or "-",mp_t or "-",mp_c or "-")
+ end
+ box = cache[mp_hash]
+ if box then
+ box = copy_list(box)
+ else
+ texrunlocal("mptexttoks")
+ box = textakebox("mptextbox")
+ cache[mp_hash] = box
+ end
+ end
+ top.textexts[mp_target] = box
+ --
+ if box then
+ -- we need to freeze the variables outside the function
+ local sx, rx, ry, sy, tx, ty = cm(object)
+ local target = mp_target
+ before[#before+1] = function()
+ context.MPLIBgettextscaledcm(target,
+ f_f(sx), -- bah ... %s no longer checks
+ f_f(rx), -- bah ... %s no longer checks
+ f_f(ry), -- bah ... %s no longer checks
+ f_f(sy), -- bah ... %s no longer checks
+ f_f(tx), -- bah ... %s no longer checks
+ f_f(ty), -- bah ... %s no longer checks
+ sxsy(box.width,box.height,box.depth))
+ end
+ else
+ before[#before+1] = function()
+ report_textexts("unknown %s",index)
+ end
+ end
+ if not trace_textexts then
+ object.path = false -- else: keep it
+ end
+ object.color = false
+ object.grouped = true
+ object.istext = true
+ end
+ end
+
+end
+
+-- we could probably redo normal textexts in the next way but as it's rather optimized
+-- we keep away from that (at least for now)
+
+local function bx_process(object,prescript,before,after)
+ local bx_category = prescript.bx_category
+ local bx_name = prescript.bx_name
+ if bx_category and bx_name then
+ if trace_textexts then
+ report_textexts("category %a, name %a",bx_category,bx_name)
+ end
+ local sx, rx, ry, sy, tx, ty = cm(object) -- needs to be frozen outside the function
+ local wd, ht, dp = nodes.boxes.dimensions(bx_category,bx_name)
+ before[#before+1] = function()
+ context.MPLIBgetboxscaledcm(bx_category,bx_name,
+ f_f(sx), -- bah ... %s no longer checks
+ f_f(rx), -- bah ... %s no longer checks
+ f_f(ry), -- bah ... %s no longer checks
+ f_f(sy), -- bah ... %s no longer checks
+ f_f(tx), -- bah ... %s no longer checks
+ f_f(ty), -- bah ... %s no longer checks
+ sxsy(wd,ht,dp))
+ end
+ if not trace_textexts then
+ object.path = false -- else: keep it
+ end
+ object.color = false
+ object.grouped = true
+ object.istext = true
+ end
+end
+
+-- graphics (we use the given index because pictures can be reused)
+
+
+local gt_reset, gt_process do
+
+ local graphics = { }
+
+
+ local mp_index = 0
+ local mp_str = ""
+
+ function mp.mf_graphic_text(index,str)
+ if not graphics[index] then
+ mp_index = index
+ mp_str = str
+ texrunlocal("mpgraphictexttoks")
+ end
+ end
+
+ interfaces.implement {
+ name = "mpgraphictexttoks",
+ actions = function()
+ context.MPLIBgraphictext(mp_index,mp_str)
+ end,
+ }
+
+end
+
+-- shades
+
+local function sh_process(object,prescript,before,after)
+ local sh_type = prescript.sh_type
+ if sh_type then
+ nofshades = nofshades + 1
+ local domain = lpegmatch(domainsplitter,prescript.sh_domain or "0 1")
+ local centera = lpegmatch(centersplitter,prescript.sh_center_a or "0 0")
+ local centerb = lpegmatch(centersplitter,prescript.sh_center_b or "0 0")
+ local transform = toboolean(prescript.sh_transform or "yes",true)
+ -- compensation for scaling
+ local sx = 1
+ local sy = 1
+ local sr = 1
+ local dx = 0
+ local dy = 0
+ if transform then
+ local first = lpegmatch(coordinatesplitter,prescript.sh_first or "0 0")
+ local setx = lpegmatch(coordinatesplitter,prescript.sh_set_x or "0 0")
+ local sety = lpegmatch(coordinatesplitter,prescript.sh_set_y or "0 0")
+
+ local x = setx[1] -- point that has different x
+ local y = sety[1] -- point that has different y
+
+ if x == 0 or y == 0 then
+ -- forget about it
+ else
+ local path = object.path
+ local path1x = path[1].x_coord
+ local path1y = path[1].y_coord
+ local path2x = path[x].x_coord
+ local path2y = path[y].y_coord
+
+ local dxa = path2x - path1x
+ local dya = path2y - path1y
+ local dxb = setx[2] - first[1]
+ local dyb = sety[2] - first[2]
+
+ if dxa == 0 or dya == 0 or dxb == 0 or dyb == 0 then
+ -- forget about it
+ else
+ sx = dxa / dxb ; if sx < 0 then sx = - sx end -- yes or no
+ sy = dya / dyb ; if sy < 0 then sy = - sy end -- yes or no
+
+ sr = sqrt(sx^2 + sy^2)
+
+ dx = path1x - sx*first[1]
+ dy = path1y - sy*first[2]
+ end
+ end
+ end
+
+ local steps = tonumber(prescript.sh_step) or 1
+ local sh_color_a = prescript.sh_color_a_1 or prescript.sh_color_a or "1"
+ local sh_color_b = prescript.sh_color_b_1 or prescript.sh_color_b or "1" -- sh_color_b_<sh_steps>
+ local ca, cb, colorspace, name, model, separation, fractions
+ if prescript.sh_color == "into" and prescript.sp_name then
+ -- some spotcolor
+ local value_a, components_a, fractions_a, name_a
+ local value_b, components_b, fractions_b, name_b
+ for i=1,#prescript do
+ -- { "sh_color_a", "1" },
+ -- { "sh_color", "into" },
+ -- { "sh_radius_b", "0" },
+ -- { "sh_radius_a", "141.73225" },
+ -- { "sh_center_b", "425.19676 141.73225" },
+ -- { "sh_center_a", "425.19676 0" },
+ -- { "sh_factor", "1" },
+ local tag = prescript[i][1]
+ if not name_a and tag == "sh_color_a" then
+ value_a = prescript[i-5][2]
+ components_a = prescript[i-4][2]
+ fractions_a = prescript[i-3][2]
+ name_a = prescript[i-2][2]
+ elseif not name_b and tag == "sh_color_b" then
+ value_b = prescript[i-5][2]
+ components_b = prescript[i-4][2]
+ fractions_b = prescript[i-3][2]
+ name_b = prescript[i-2][2]
+ end
+ if name_a and name_b then
+ break
+ end
+ end
+ ca, cb, separation, name = checkandconvertspot(
+ name_a,fractions_a,components_a,value_a,
+ name_b,fractions_b,components_b,value_b
+ )
+ else
+ local colora = lpegmatch(colorsplitter,sh_color_a)
+ local colorb = lpegmatch(colorsplitter,sh_color_b)
+ ca, cb, colorspace, name, model = checkandconvert(colora,colorb)
+ -- test:
+ if steps > 1 then
+ ca = { ca }
+ cb = { cb }
+ fractions = { tonumber(prescript[formatters["sh_fraction_%i"](1)]) or 0 }
+ for i=2,steps do
+ local colora = lpegmatch(colorsplitter,prescript[formatters["sh_color_a_%i"](i)])
+ local colorb = lpegmatch(colorsplitter,prescript[formatters["sh_color_b_%i"](i)])
+ ca[i], cb[i] = checkandconvert(colora,colorb,model)
+ fractions[i] = tonumber(prescript[formatters["sh_fraction_%i"](i)]) or (i/steps)
+ end
+ end
+ end
+ if not ca or not cb then
+ ca, cb, colorspace, name = checkandconvert()
+ steps = 1
+ end
+ if sh_type == "linear" then
+ local coordinates = { dx + sx*centera[1], dy + sy*centera[2], dx + sx*centerb[1], dy + sy*centerb[2] }
+ lpdf.linearshade(name,domain,ca,cb,1,colorspace,coordinates,separation,steps>1 and steps,fractions) -- backend specific (will be renamed)
+ elseif sh_type == "circular" then
+ local factor = tonumber(prescript.sh_factor) or 1
+ local radiusa = factor * tonumber(prescript.sh_radius_a)
+ local radiusb = factor * tonumber(prescript.sh_radius_b)
+ local coordinates = { dx + sx*centera[1], dy + sy*centera[2], sr*radiusa, dx + sx*centerb[1], dy + sy*centerb[2], sr*radiusb }
+ lpdf.circularshade(name,domain,ca,cb,1,colorspace,coordinates,separation,steps>1 and steps,fractions) -- backend specific (will be renamed)
+ else
+ -- fatal error
+ end
+ before[#before+1] = "q /Pattern cs"
+ after [#after+1] = formatters["W n /%s sh Q"](name)
+ -- false, not nil, else mt triggered
+ object.colored = false -- hm, not object.color ?
+ object.type = false
+ object.grouped = true
+ end
+end
+
+-- bitmaps
+
+local function bm_process(object,prescript,before,after)
+ local bm_xresolution = prescript.bm_xresolution
+ if bm_xresolution then
+ before[#before+1] = f_cm_b(cm(object))
+ before[#before+1] = function()
+ figures.bitmapimage {
+ xresolution = tonumber(bm_xresolution),
+ yresolution = tonumber(prescript.bm_yresolution),
+ width = 1/basepoints,
+ height = 1/basepoints,
+ data = object.postscript
+ }
+ end
+ before[#before+1] = s_cm_e
+ object.path = false
+ object.color = false
+ object.grouped = true
+ end
+end
+
+-- positions
+
+local function ps_process(object,prescript,before,after)
+ local ps_label = prescript.ps_label
+ if ps_label then
+ local op = object.path
+ local first = op[1]
+ local third = op[3]
+ local x = first.x_coord
+ local y = first.y_coord
+ local w = third.x_coord - x
+ local h = third.y_coord - y
+ local properties = metapost.properties
+ x = x - properties.llx
+ y = properties.ury - y
+ before[#before+1] = function()
+ context.MPLIBpositionwhd(ps_label,x,y,w,h)
+ end
+ object.path = false
+ end
+end
+
+-- figures
+
+-- local sx, rx, ry, sy, tx, ty = cm(object)
+-- sxsy(box.width,box.height,box.depth))
+
+function mp.mf_external_figure(filename)
+ local f = figures.getinfo(filename)
+ local w = 0
+ local h = 0
+ if f then
+ local u = f.used
+ if u and u.fullname then
+ w = u.width or 0
+ h = u.height or 0
+ end
+ else
+ report_metapost("external figure %a not found",filename)
+ end
+ mp.triplet(w/65536,h/65536,0)
+end
+
+local function fg_process(object,prescript,before,after)
+ local fg_name = prescript.fg_name
+ if fg_name then
+ before[#before+1] = f_cm_b(cm(object)) -- beware: does not use the cm stack
+ before[#before+1] = function()
+ context.MPLIBfigure(fg_name,prescript.fg_mask or "")
+ end
+ before[#before+1] = s_cm_e
+ object.path = false
+ object.grouped = true
+ end
+end
+
+-- color and transparency
+
+local value = Cs ( (
+ (Carg(1) * C((1-P(","))^1)) / function(a,b) return f_f3(a * tonumber(b)) end
+ + P(","))^1
+)
+
+-- should be codeinjections
+
+local t_list = attributes.list[attributes.private('transparency')]
+local c_list = attributes.list[attributes.private('color')]
+
+local remappers = {
+ [1] = formatters["s=%s"],
+ [3] = formatters["r=%s,g=%s,b=%s"],
+ [4] = formatters["c=%s,m=%s,y=%s,k=%s"],
+}
+
+local processlast = 0
+local processhash = setmetatableindex(function(t,k)
+ processlast = processlast + 1
+ local v = formatters["mp_%s"](processlast)
+ defineprocesscolor(v,k,true,true)
+ t[k] = v
+ return v
+end)
+
+local function checked_transparency(alternative,transparency,before,after)
+ alternative = tonumber(alternative) or 1
+ transparency = tonumber(transparency) or 0
+ before[#before+1] = formatters["/Tr%s gs"](registertransparency(nil,alternative,transparency,true))
+ after [#after +1] = "/Tr0 gs" -- outertransparency
+end
+
+local function tr_process(object,prescript,before,after)
+ -- before can be shortcut to t
+ local tr_alternative = prescript.tr_alternative
+ if tr_alternative then
+ checked_transparency(tr_alternative,prescript.tr_transparency,before,after)
+ end
+ local cs = object.color
+ if cs and #cs > 0 then
+ local c_b, c_a
+ local sp_type = prescript.sp_type
+ if not sp_type then
+ c_b, c_a = colorconverter(cs)
+ else
+ local sp_name = prescript.sp_name or "black"
+ if sp_type == "spot" then
+ local sp_value = prescript.sp_value or "1"
+ local components = split(sp_value,":")
+ local specification = remappers[#components]
+ if specification then
+ specification = specification(unpack(components))
+ else
+ specification = "s=0"
+ end
+ local sp_spec = processhash[specification]
+ definespotcolor(sp_name,sp_spec,"p=1",true)
+ sp_type = "named"
+ elseif sp_type == "multitone" then -- (fractions of a multitone) don't work well in mupdf
+ local sp_value = prescript.sp_value or "1"
+ local sp_specs = { }
+ local sp_list = split(sp_value," ")
+ for i=1,#sp_list do
+ local sp_value = sp_list[i]
+ local components = split(sp_value,":")
+ local specification = remappers[#components]
+ if specification then
+ specification = specification(unpack(components))
+ else
+ specification = "s=0"
+ end
+ local sp_spec = processhash[specification]
+ sp_specs[i] = formatters["%s=1"](sp_spec)
+ end
+ sp_specs = concat(sp_specs,",")
+ definemultitonecolor(sp_name,sp_specs,"","")
+ sp_type = "named"
+ end
+ if sp_type == "named" then
+ -- we might move this to another namespace .. also, named can be a spotcolor
+ -- so we need to check for that too ... also we need to resolve indirect
+ -- colors so we might need the second pass for this (draw dots with \MPcolor)
+ if not tr_alternative then
+ -- todo: sp_name is not yet registered at this time
+ local t = t_list[sp_name] -- string or attribute
+ local v = t and transparencyvalue(t)
+ if v then
+ checked_transparency(v[1],v[2],before,after)
+ end
+ end
+ local c = c_list[sp_name] -- string or attribute
+ local v = c and colorvalue(c)
+ if v then
+ -- all=1 gray=2 rgb=3 cmyk=4
+ local colorspace = v[1]
+ local factor = cs[1]
+ if colorspace == 2 then
+ local s = factor * v[2]
+ c_b, c_a = checked_color_pair(f_gray,s,s)
+ elseif colorspace == 3 then
+ local r = factor * v[3]
+ local g = factor * v[4]
+ local b = factor * v[5]
+ c_b, c_a = checked_color_pair(f_rgb,r,g,b,r,g,b)
+ elseif colorspace == 4 or colorspace == 1 then
+ local c = factor * v[6]
+ local m = factor * v[7]
+ local y = factor * v[8]
+ local k = factor * v[9]
+ c_b, c_a = checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
+ elseif colorspace == 5 then
+ -- not all viewers show the fractions ok
+ local name = v[10]
+ local value = split(v[13],",")
+ if factor ~= 1 then
+ for i=1,#value do
+ value[i] = f_scn(factor * (tonumber(value[i]) or 1))
+ end
+ end
+ value = concat(value," ")
+ c_b, c_a = checked_color_pair(f_spot,name,name,value,value)
+ else
+ local s = factor *v[2]
+ c_b, c_a = checked_color_pair(f_gray,s,s)
+ end
+ end
+ end
+ end
+ if c_a and c_b then
+ before[#before+1] = c_b
+ after [#after +1] = c_a
+ end
+ end
+end
+
+-- layers (nasty: we need to keep the 'grouping' right
+
+local function la_process(object,prescript,before,after)
+ local la_name = prescript.la_name
+ if la_name then
+ before[#before+1] = backends.codeinjections.startlayer(la_name)
+ insert(after,1,backends.codeinjections.stoplayer())
+ end
+end
+
+-- groups
+
+local function gr_process(object,prescript,before,after)
+ local gr_state = prescript.gr_state
+ if not gr_state then
+ return
+ elseif gr_state == "start" then
+ local gr_type = utilities.parsers.settings_to_set(prescript.gr_type)
+ local path = object.path
+ local p1 = path[1]
+ local p2 = path[2]
+ local p3 = path[3]
+ local p4 = path[4]
+ local llx = min(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord)
+ local lly = min(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord)
+ local urx = max(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord)
+ local ury = max(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord)
+ before[#before+1] = function()
+ context.MPLIBstartgroup(
+ gr_type.isolated and 1 or 0,
+ gr_type.knockout and 1 or 0,
+ llx, lly, urx, ury
+ )
+ end
+ elseif gr_state == "stop" then
+ after[#after+1] = function()
+ context.MPLIBstopgroup()
+ end
+ end
+ object.path = false
+ object.color = false
+ object.grouped = true
+end
+
+-- outlines
+
+local ot_reset, ot_process do
+
+ local outlinetexts = { } -- also in top data
+
+ ot_reset = function ()
+ outlinetexts = { }
+ end
+
+ local mp_index = 0
+ local mp_kind = ""
+ local mp_str = ""
+
+ function mp.mf_outline_text(index,str,kind)
+ if not outlinetexts[index] then
+ mp_index = index
+ mp_kind = kind
+ mp_str = str
+ texrunlocal("mpoutlinetoks")
+ end
+ end
+
+ interfaces.implement {
+ name = "mpoutlinetoks",
+ actions = function()
+ context.MPLIBoutlinetext(mp_index,mp_kind,mp_str)
+ end,
+ }
+
+ implement {
+ name = "MPLIBconvertoutlinetext",
+ arguments = { "integer", "string", "integer" },
+ actions = function(index,kind,box)
+ local boxtomp = fonts.metapost.boxtomp
+ if boxtomp then
+ outlinetexts[index] = boxtomp(box,kind)
+ else
+ outlinetexts[index] = ""
+ end
+ end
+ }
+
+ function mp.mf_get_outline_text(index) -- maybe we need a more private namespace
+ mp.print(outlinetexts[index] or "draw origin;")
+ end
+
+end
+
+-- mf_object=<string>
+
+local p1 = P("mf_object=")
+local p2 = lpeg.patterns.eol * p1
+local pattern = (1-p2)^0 * p2 + p1
+
+function metapost.isobject(str)
+ return pattern and str ~= "" and lpegmatch(p,str) and true or false
+end
+
+local function installplugin(specification)
+ local reset = specification.reset
+ local process = specification.process
+ local object = specification.object
+ if reset then
+ appendaction(resetteractions,"system",reset)
+ end
+ if process then
+ appendaction(processoractions,"system",process)
+ end
+end
+
+metapost.installplugin = installplugin
+
+-- definitions
+
+installplugin { name = "outline", reset = ot_reset, process = ot_process }
+installplugin { name = "color", reset = cl_reset, process = cl_process }
+installplugin { name = "text", reset = tx_reset, process = tx_process }
+installplugin { name = "group", reset = gr_reset, process = gr_process }
+installplugin { name = "graphictext", reset = gt_reset, process = gt_process }
+installplugin { name = "shade", reset = sh_reset, process = sh_process }
+installplugin { name = "bitmap", reset = bm_reset, process = bm_process }
+installplugin { name = "box", reset = bx_reset, process = bx_process }
+installplugin { name = "position", reset = ps_reset, process = ps_process }
+installplugin { name = "figure", reset = fg_reset, process = fg_process }
+installplugin { name = "layer", reset = la_reset, process = la_process }
+installplugin { name = "transparency", reset = tr_reset, process = tr_process }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-pps.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mlib-pps.mkxl
new file mode 100644
index 00000000000..2fa721445e8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-pps.mkxl
@@ -0,0 +1,228 @@
+%D \module
+%D [ file=mlib-pps,
+%D version=2008.03.25,
+%D title=\METAPOST\ Integrated Graphics,
+%D subtitle=Basics,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: remove MPenvironment code
+
+\unprotect
+
+\registerctxluafile{mlib-pps}{autosuffix}
+
+%D Todo: catch nested graphics like external figures with dummies.
+
+% todo: figure out why this is shifted
+%
+% \setupbodyfont[palatino]
+%
+% \starttext
+% \startMPpage
+% draw textext("123") ;
+% \stopMPpage
+% \stoptext
+%
+% A slightly larger picture works ok so maybe there is some kind
+% of interference with the page builder.
+
+\newbox \MPtextbox
+\newtoks\everyMPLIBsettext % not used
+
+\permanent\protected\def\mlib_flush_environment
+ {%\writestatus\m!metapost{flushing environment}%
+ \clf_mptexget
+ \enforced\let\MPLIBflushenvironment\relax}% MPenvironments are depricated}
+
+\aliased\let\MPLIBflushenvironment\mlib_flush_environment
+
+\permanent\protected\def\MPLIBsetNtext#1% #2% box text
+ {\MPLIBflushenvironment
+ \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup % text
+ \meta_set_current_color
+ \enforced\let\MPLIBflushenvironment\mlib_flush_environment
+ \let\next} % gobble open brace
+
+\permanent\protected\def\MPLIBsetCtext#1#2% #3% box colorspec text
+ {\MPLIBflushenvironment
+ \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup % text
+ \directcolored[#2]%
+ \meta_set_current_color % so, textcolor wins !
+ \enforced\let\MPLIBflushenvironment\mlib_flush_environment
+ \let\next} % gobble open brace
+
+\aliased\let\MPLIBsettext\MPLIBsetNtext
+
+\permanent\protected\def\MPLIBsetNtextX#1% #2% box text
+ {\MPLIBflushenvironment
+ \hbox\bgroup % text
+ \meta_set_current_color
+ \enforced\let\MPLIBflushenvironment\mlib_flush_environment
+ \let\next}
+
+\permanent\protected\def\MPLIBsetCtextX#1#2% #3% box colorspec text
+ {\MPLIBflushenvironment
+ \hbox\bgroup % text
+ \directcolored[#2]%
+ \meta_set_current_color % so, textcolor wins !
+ \enforced\let\MPLIBflushenvironment\mlib_flush_environment
+ \let\next}
+
+\aliased\let\MPLIBsettextX\MPLIBsetNtextX
+
+\permanent\permanent\protected\def\MPLIBgettextscaled#1#2#3% why a copy .. can be used more often
+ {\clf_mpgettext\MPtextbox #1%
+ \vpack to \zeropoint
+ {\vss
+ %\hpack to \zeropoint \s!container
+ \hcontainer to \zeropoint
+ {\scale
+ [\c!sx=#2,\c!sy=#3]%
+ {\raise\dp\MPtextbox\box\MPtextbox}\forcecolorhack\hss}}}
+
+\let\mlib_sx\!!zerocount % set at the lua end
+\let\mlib_sy\!!zerocount % set at the lua end
+
+\permanent\protected\def\MPLIBfigure#1#2%
+ {\setbox\scratchbox\hpack{\externalfigure[#1][\c!mask=#2]}%
+ \clf_mpsetsxsy\wd\scratchbox\ht\scratchbox\zeropoint
+ \vpack to \zeropoint
+ {\vss
+ \hpack to \zeropoint
+ {\fastsxsy{\mlib_sx}{\mlib_sy}{\box\scratchbox}\hss}}}
+
+% horrible (we could inline scale and matrix code):
+
+\permanent\protected\def\MPLIBgettextscaledcm#1#2#3#4#5#6#7#8#9% 2-7: sx,rx,ry,sy,tx,ty
+ {\clf_mpgettext\MPtextbox #1%
+ \setbox\MPbox\hpack\bgroup
+ \dotransformnextbox{#2}{#3}{#4}{#5}{#6}{#7}% does push pop ... will be changed to proper lua call (avoid small numbers)
+ \vpack to \zeropoint\bgroup
+ \vss
+ %\hpack to \zeropoint \s!container \bgroup
+ \hcontainer to \zeropoint \bgroup
+ % \scale[\c!sx=#8,\c!sy=#9]{\raise\dp\MPtextbox\box\MPtextbox}%
+ % \scale[\c!sx=#8,\c!sy=#9,\c!depth=\v!no]{\box\MPtextbox}%
+ \fastsxsy{#8}{#9}{\raise\dp\MPtextbox\box\MPtextbox}%
+ % This gives: LuaTeX warning: Misplaced \pdfrestore .. don't ask me why.
+ % but I'll retry it some day soon.
+ % \dostartscaling{#8}{#9}%
+ % \raise\dp\MPtextbox\box\MPtextbox
+ % \dostopscaling
+ \forcecolorhack % can go away ... already in the scale macro
+ \hss
+ \egroup
+ \egroup
+ \egroup
+ \smashbox\MPbox
+ \box\MPbox}
+
+% \putnextboxincache{hans}{1}\hbox{foo}
+%
+% \startMPcode
+% draw boundingbox rawtexbox("hans",1) ;
+% draw rawtexbox("hans",1) ;
+% \stopMPcode
+
+\permanent\protected\def\MPLIBgetboxscaledcm#1#2%
+ {\begingroup
+ \copyboxfromcache{#1}{#2}\MPtextbox % can be \clf_
+ \mlib_get_box_scaled_cm_next}
+
+\protected\def\mlib_get_box_scaled_cm_next#1#2#3#4#5#6#7#8% 1-6: sx,rx,ry,sy,tx,ty
+ {\setbox\MPbox\hpack\bgroup
+ \dotransformnextbox{#1}{#2}{#3}{#4}{#5}{#6}%
+ \vpack to \zeropoint\bgroup
+ \vss
+ \hpack to \zeropoint \bgroup
+ \fastsxsy{#7}{#8}{\raise\dp\MPtextbox\box\MPtextbox}%
+ \hss
+ \egroup
+ \egroup
+ \egroup
+ \smashbox\MPbox
+ \box\MPbox
+ \endgroup}
+
+\permanent\protected\def\MPLIBgraphictext#1% use at mp end
+ {\startTEXpage[\c!scale=10000]#1\stopTEXpage}
+
+%D \startbuffer
+%D \definelayer[test]
+%D
+%D \setlayerframed
+%D [test]
+%D [x=\MPx{somepos-1},y=\MPy{somepos-1}]
+%D [width=\MPw{somepos-1},height=\MPh{somepos-1}]
+%D {Whatever we want here!}
+%D
+%D \setlayerframed
+%D [test]
+%D [x=\MPx{somepos-2},y=\MPy{somepos-2}]
+%D [width=\MPw{somepos-2},height=\MPh{somepos-2}]
+%D {Whatever we need there!}
+%D
+%D \startuseMPgraphic{oeps}
+%D draw fullcircle scaled 6cm withcolor red ;
+%D register ("somepos-1",5cm,1cm,center currentpicture) ;
+%D register ("somepos-2",4cm,3cm,(-1cm,-2cm)) ;
+%D \stopuseMPgraphic
+%D
+%D \framed[background=test,offset=overlay]{\useMPgraphic{oeps}}
+%D \stopbuffer
+%D
+%D \typebuffer \startlinecorrection \getbuffer \stoplinecorrection
+
+\permanent\protected\def\MPLIBpositionwhd#1#2#3#4#5% bp !
+ {\dosavepositionwhd{#1}\zerocount{#2\onebasepoint}{#3\onebasepoint}{#4\onebasepoint}{#5\onebasepoint}\zeropoint}
+
+\def\mlib_stop_group#1#2#3#4#5#6% some day this might happen elsewhere
+ {\egroup
+ \setbox\scratchbox\hpack{\kern\onebasepoint\box\scratchbox}% weird correction
+ \wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint+2\onebasepoint\relax
+ \ht\scratchbox #6\onebasepoint
+ \dp\scratchbox-#4\onebasepoint
+ \setbox\scratchbox\hpack\bgroup
+ \kern-#3\onebasepoint
+ \box\scratchbox
+ \egroup
+ \saveboxresource
+ attr {/Group << /S /Transparency /I \ifnum#1=1 true \else false \fi /K \ifnum#2=1 true \else false \fi >>}
+ resources {\pdfbackendcurrentresources}
+ \scratchbox
+ \setbox\scratchbox\hpack\bgroup
+ \kern#3\onebasepoint
+ \kern-\onebasepoint
+ \useboxresource\lastsavedboxresourceindex
+ \egroup
+ \wd\scratchbox\zeropoint
+ \ht\scratchbox\zeropoint
+ \dp\scratchbox\zeropoint
+ \box\scratchbox
+ \endgroup}
+
+\aliased\let\MPLIBstopgroup\relax
+
+\permanent\protected\def\MPLIBstartgroup#1#2#3#4#5#6% isolated 0/1, knockout 0/1 llx lly urx ury
+ {\begingroup
+ \setbox\scratchbox\hpack\bgroup
+ \enforced\permanent\protected\def\MPLIBstopgroup{\mlib_stop_group{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+% For now here ... will be cleaned up:
+
+\newtoks\mptexttoks
+\newbox \mptextbox
+\newtoks\mpoutlinetoks
+\newtoks\mpgraphictexttoks
+
+\mptexttoks {\global\setbox\mptextbox\hbox{\clf_mptexttoks}}
+\mpoutlinetoks {\global\setbox\mptextbox\vbox{\clf_mpoutlinetoks}}
+\mpgraphictexttoks{\global\setbox\mptextbox\vbox{\clf_mpgraphictexttoks}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-ran.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-ran.lmt
new file mode 100644
index 00000000000..a6d4fbe5bff
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-ran.lmt
@@ -0,0 +1,237 @@
+if not modules then modules = { } end modules ['mlib-ran'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local next = next
+local ceil, floor, random, sqrt, cos, sin, pi, max, min = math.ceil, math.floor, math.random, math.sqrt, math.cos, math.sin, math.pi, math.min, math.max
+local remove = table.remove
+
+-- Below is a bit of rainy saturday afternoon hobyism, while listening to Judith
+-- Owens redisCOVERed (came there via Leland Sklar who I have on a few live blurays;
+-- and who is also on YT). (Also nice: https://www.youtube.com/watch?v=GXqasIRaxlA)
+
+-- When Aditya pointed me to an article on mazes I ended up at poison distributions
+-- which to me looks nicer than what I normally do, fill a grid and then randomize
+-- the resulting positions. With some hooks this can be used for interesting patterns
+-- too. A few links:
+--
+-- https://bost.ocks.org/mike/algorithms/#maze-generation
+-- https://extremelearning.com.au/
+-- https://www.jasondavies.com/maps/random-points/
+-- http://devmag.org.za/2009/05/03/poisson-disk-sampling
+
+-- The next function is quite close to what us discribed in the poisson-disk-sampling
+-- link mentioned before. One can either use a one dimensional grid array or a two
+-- dimensional one. The example code uses some classes dealing with points. In the
+-- process I added some more control.
+
+-- we could do without the samplepoints list
+
+local function poisson(width, height, mindist, newpointscount, initialx, initialy)
+ local starttime = os.clock()
+ local cellsize = mindist / sqrt(2)
+ local nofwidth = ceil(width // cellsize)
+ local nofheight = ceil(height // cellsize)
+ local grid = lua.newtable(nofwidth,0) -- table.setmetatableindex("table")
+ local firstx = initialx or random() * width
+ local firsty = initialy or random() * height
+ local firstpoint = { firstx, firsty, 1 }
+ -- local samplepoints = { firstpoint }
+ local processlist = { firstpoint }
+ local nofprocesslist = 1
+ local nofsamplepoints = 1
+ local twopi = 2 * pi
+
+ for i=1,nofwidth do
+ local g = lua.newindex(nofheight,false)
+ grid[i] = g
+ end
+
+ local x = floor(firstx // cellsize) + 1 -- lua indices
+ local y = floor(firsty // cellsize) + 1 -- lua indices
+
+ x = max(1, min(x, width - 1))
+ y = max(1, min(y, height - 1))
+
+ grid[x][y] = firstpoint
+
+ -- The website shows graphic for this 5*5 grid snippet, if we use a one dimentional
+ -- array then we could have one loop; a first version used a metatable trick so we
+ -- had grid[i+gx][j+gy] but we no we also return the grid, so ... we now just check.
+
+ -- There is no need for the samplepoints list as we can get that from the grid but
+ -- instead we can store the index with the grid.
+
+ while nofprocesslist > 0 do
+ local point = remove(processlist,random(1,nofprocesslist))
+ nofprocesslist = nofprocesslist - 1
+ for i=1,newpointscount do -- we start at 1
+ local radius = mindist * (random() + 1)
+ local angle = twopi * random()
+ local nx = point[1] + radius * cos(angle)
+ local ny = point[2] + radius * sin(angle)
+ if nx > 1 and ny > 1 and nx <= width and ny <= height then -- lua indices
+ local gx = floor(nx // cellsize)
+ local gy = floor(ny // cellsize)
+ -- the 5x5 cells around the point
+ for i=-2,2 do
+ for j=-2,2 do
+ local cell = grid[i + gx]
+ if cell then
+ cell = cell[j + gy]
+ if cell and sqrt((cell[1] - nx)^2 + (cell[2] - ny)^2) < mindist then
+ goto next
+ end
+ end
+ end
+ end
+ -- local newpoint = { nx, ny }
+ nofprocesslist = nofprocesslist + 1
+ nofsamplepoints = nofsamplepoints + 1
+ local newpoint = { nx, ny, nofsamplepoints }
+ processlist [nofprocesslist] = newpoint
+ -- samplepoints[nofsamplepoints] = newpoint
+ grid[gx][gy] = newpoint
+ end
+ ::next::
+ end
+ end
+
+ return {
+ count = nofsamplepoints,
+ -- points = samplepoints,
+ grid = grid,
+ time = os.clock() - starttime,
+ }
+end
+
+-- For now:
+
+local randomizers = utilities.randomizers or { }
+utilities.randomizers = randomizers
+randomizers.poisson = poisson
+
+-- The MetaFun interface:
+
+local formatters = string.formatters
+local concat = table.concat
+
+local f_macro = formatters["%s(%N,%N);"]
+
+local f_macros = {
+ [2] = formatters["%s(%N,%N);"],
+ [3] = formatters["%s(%N,%N,%i);"],
+ [4] = formatters["%s(%N,%N,%i,%i);"],
+}
+
+local function grid_to_mp(t,f,n)
+ local grid = t.grid
+ local count = t.count
+ local result = { }
+ local r = 0
+ local macro = f or "draw"
+ local runner = f_macros[n or 2] or f_macros[2]
+ for i=1,#grid do
+ local g = grid[i]
+ if g then
+ for j=1,#g do
+ local v = g[j]
+ if v then
+ r = r + 1
+ result[r] = runner(macro,v[1],v[2],v[3],count)
+ end
+ end
+ end
+ end
+ return concat(result, " ")
+end
+
+local getparameter = metapost.getparameter
+
+local function lmt_poisson()
+ local initialx = getparameter { "initialx" }
+ local initialy = getparameter { "initialy" }
+ local width = getparameter { "width" }
+ local height = getparameter { "height" }
+ local distance = getparameter { "distance" }
+ local count = getparameter { "count" }
+
+ local result = poisson (
+ width, height, distance, count,
+ initialx > 0 and initialx or false,
+ initialy > 0 and initialy or false
+ )
+
+ if result then
+ logs.report("poisson","w=%N, h=%N, d=%N, c=%N, n=%i, runtime %.3f",
+ width, height, distance, count, result.count, result.time
+ )
+ end
+
+ return result
+end
+
+function mp.lmt_poisson_generate()
+ local result = lmt_poisson()
+ if result then
+ return grid_to_mp (
+ result,
+ getparameter { "macro" },
+ getparameter { "arguments" }
+ )
+ end
+end
+
+-- -- some playing around showed no benefit
+--
+-- function points_to_mp(t,f)
+-- local points = t.points
+-- local count = t.count
+-- local result = { }
+-- local r = 0
+-- local macro = f or "draw"
+-- local runner = f_macros[n or 2] or f_macros[2]
+-- for i=1,count do
+-- local v = points[i]
+-- r = r + 1
+-- result[r] = runner(macro,v[1],v[2],v[3],count)
+-- end
+-- return concat(result, " ")
+-- end
+--
+-- local result = false
+-- local i, j, n = 0, 0, 0
+--
+-- function mp.lmt_poison_start()
+-- result = lmt_poisson()
+-- end
+--
+-- function mp.lmt_poisson_stop()
+-- result = false
+-- end
+--
+-- function mp.lmt_poisson_count()
+-- return result and result.count or 0
+-- end
+--
+-- function mp.lmt_poisson_get(i)
+-- if result then
+-- return mp.pair(result.points[i])
+-- end
+-- end
+--
+-- function mp.lmt_poisson_generate()
+-- mp.lmt_poisson_start()
+-- if result then
+-- return grid_to_mp (
+-- result,
+-- getparameter { "macro" },
+-- getparameter { "arguments" }
+-- )
+-- end
+-- mp.lmt_poisson_stop()
+-- end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt b/Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt
new file mode 100644
index 00000000000..eacb148cc6c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-run.lmt
@@ -0,0 +1,722 @@
+if not modules then modules = { } end modules ['mlib-run'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ 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
+
+-- 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
+
+local emptystring = string.is_empty
+
+local trace_graphics = false trackers.register("metapost.graphics", function(v) trace_graphics = v end)
+local trace_tracingall = false trackers.register("metapost.tracingall", function(v) trace_tracingall = v end)
+
+local report_metapost = logs.reporter("metapost")
+local texerrormessage = logs.texerrormessage
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local formatters = string.formatters
+
+local mplib = mplib
+metapost = metapost or { }
+local metapost = metapost
+
+metapost.showlog = false
+metapost.lastlog = ""
+metapost.texerrors = false
+metapost.exectime = metapost.exectime or { } -- hack
+metapost.nofruns = 0
+
+local mpxformats = { }
+local nofformats = 0
+local mpxpreambles = { }
+local mpxterminals = { }
+local mpxextradata = { }
+
+-- The flatten hack is needed because the library currently barks on \n\n and the
+-- collapse because mp cannot handle snippets due to grouping issues.
+
+-- todo: pass tables to executempx instead of preparing beforehand,
+-- as it's more efficient for the terminal
+
+local function flatten(source,target)
+ for i=1,#source do
+ local d = source[i]
+ if type(d) == "table" then
+ flatten(d,target)
+ elseif d and d ~= "" then
+ target[#target+1] = d
+ end
+ end
+ return target
+end
+
+local function prepareddata(data)
+ if data and data ~= "" then
+ if type(data) == "table" then
+ data = flatten(data,{ })
+ data = #data > 1 and concat(data,"\n") or data[1]
+ end
+ return data
+ end
+end
+
+-- local function executempx(mpx,data)
+-- local terminal = mpxterminals[mpx]
+-- if terminal then
+-- terminal.writer(data)
+-- data = ""
+-- elseif type(data) == "table" then
+-- data = prepareddata(data,collapse)
+-- end
+-- metapost.nofruns = metapost.nofruns + 1
+-- return mpx:execute(data)
+-- end
+
+local function executempx(mpx,data)
+ local terminal = mpxterminals[mpx]
+ if terminal then
+ terminal.writer(data)
+ data = nil
+ elseif type(data) == "table" then
+ data = prepareddata(data,collapse)
+ end
+ metapost.nofruns = metapost.nofruns + 1
+ return mpx:execute(data)
+end
+
+directives.register("mplib.texerrors", function(v) metapost.texerrors = v end)
+trackers.register ("metapost.showlog", function(v) metapost.showlog = v end)
+
+function metapost.resetlastlog()
+ metapost.lastlog = ""
+end
+
+local new_instance = mplib.new
+local find_file = mplib.finder
+
+function metapost.reporterror(result)
+ if not result then
+ report_metapost("error: no result object returned")
+ return true
+ elseif result.status == 0 then
+ return false
+ elseif mplib.realtimelogging then
+ return false -- we already reported
+ else
+ local t = result.term
+ local e = result.error
+ local l = result.log
+ local report = metapost.texerrors and texerrormessage or report_metapost
+ if t and t ~= "" then
+ report("mp error: %s",striplines(t))
+ end
+ if e == "" or e == "no-error" then
+ e = nil
+ end
+ if e then
+ report("mp error: %s",striplines(e))
+ end
+ if not t and not e and l then
+ metapost.lastlog = metapost.lastlog .. "\n" .. l
+ report_metapost("log: %s",l)
+ else
+ report_metapost("error: unknown, no error, terminal or log messages")
+ end
+ return true
+ end
+end
+
+local f_preamble = formatters [ [[
+ boolean mplib ; mplib := true ;
+ let dump = endinput ;
+ input "%s" ;
+ randomseed:=%s;
+]] ]
+
+local methods = {
+ double = "double",
+ scaled = "scaled",
+ -- binary = "binary",
+ binary = "double",
+ decimal = "decimal",
+ default = "scaled",
+}
+
+function metapost.runscript(code)
+ return ""
+end
+
+function metapost.scripterror(str)
+ report_metapost("script error: %s",str)
+end
+
+-- todo: random_seed
+
+local seed = nil
+
+function metapost.load(name,method)
+ starttiming(mplib)
+ if not seed then
+ seed = job.getrandomseed()
+ if seed <= 1 then
+ seed = seed % 1000
+ elseif seed > 4095 then
+ seed = seed % 4096
+ end
+ end
+ method = method and methods[method] or "scaled"
+ local mpx, terminal = new_instance {
+-- noninteractive = true;
+-- ini_version = true,
+ math_mode = method,
+ run_script = metapost.runscript,
+ script_error = metapost.scripterror,
+ make_text = metapost.maketext,
+ extensions = 1,
+ -- random_seed = seed,
+ utf8_mode = true,
+ text_mode = true,
+ }
+ report_metapost("initializing number mode %a",method)
+ local result
+ if not mpx then
+ result = { status = 99, error = "out of memory"}
+ else
+ mpxterminals[mpx] = terminal
+ -- pushing permits advanced features
+ metapost.pushscriptrunner(mpx)
+ result = executempx(mpx,f_preamble(file.addsuffix(name,"mp"),seed))
+ metapost.popscriptrunner()
+ end
+ stoptiming(mplib)
+ metapost.reporterror(result)
+ return mpx, result
+end
+
+function metapost.checkformat(mpsinput,method)
+ local mpsinput = mpsinput or "metafun"
+ local foundfile = ""
+ if file.suffix(mpsinput) ~= "" then
+ foundfile = find_file(mpsinput) or ""
+ end
+ -- if foundfile == "" then
+ -- foundfile = find_file(file.replacesuffix(mpsinput,"mpvi")) or ""
+ -- end
+ if foundfile == "" then
+ foundfile = find_file(file.replacesuffix(mpsinput,"mpxl")) or ""
+ end
+ if foundfile == "" then
+ foundfile = find_file(file.replacesuffix(mpsinput,"mpiv")) or ""
+ end
+ if foundfile == "" then
+ foundfile = find_file(file.replacesuffix(mpsinput,"mp")) or ""
+ end
+ if foundfile == "" then
+ report_metapost("loading %a fails, format not found",mpsinput)
+ else
+ report_metapost("loading %a as %a using method %a",mpsinput,foundfile,method or "default")
+ local mpx, result = metapost.load(foundfile,method)
+ if mpx then
+ return mpx
+ else
+ report_metapost("error in loading %a",mpsinput)
+ metapost.reporterror(result)
+ end
+ end
+end
+
+function metapost.unload(mpx)
+ starttiming(mplib)
+ if mpx then
+ mpx:finish()
+ end
+ stoptiming(mplib)
+end
+
+metapost.defaultformat = "metafun"
+metapost.defaultinstance = "metafun"
+metapost.defaultmethod = "default"
+
+function metapost.getextradata(mpx)
+ return mpxextradata[mpx]
+end
+
+function metapost.pushformat(specification,f,m) -- was: instance, name, method
+ if type(specification) ~= "table" then
+ specification = {
+ instance = specification,
+ format = f,
+ method = m,
+ }
+ end
+ local instance = specification.instance
+ local format = specification.format
+ local method = specification.method
+ local definitions = specification.definitions
+ local extensions = specification.extensions
+ local preamble = nil
+ if not instance or instance == "" then
+ instance = metapost.defaultinstance
+ specification.instance = instance
+ end
+ if not format or format == "" then
+ format = metapost.defaultformat
+ specification.format = format
+ end
+ if not method or method == "" then
+ method = metapost.defaultmethod
+ specification.method = method
+ end
+ if definitions and definitions ~= "" then
+ preamble = definitions
+ end
+ if extensions and extensions ~= "" then
+ if preamble then
+ preamble = preamble .. "\n" .. extensions
+ else
+ preamble = extensions
+ end
+ end
+ nofformats = nofformats + 1
+ local usedinstance = instance .. ":" .. nofformats
+ local mpx = mpxformats [usedinstance]
+ local mpp = mpxpreambles[instance] or ""
+ -- report_metapost("push instance %a (%S)",usedinstance,mpx)
+ if preamble then
+ preamble = prepareddata(preamble)
+ mpp = mpp .. "\n" .. preamble
+ mpxpreambles[instance] = mpp
+ end
+ if not mpx then
+ report_metapost("initializing instance %a using format %a and method %a",usedinstance,format,method)
+ mpx = metapost.checkformat(format,method)
+ mpxformats [usedinstance] = mpx
+ mpxextradata[mpx] = { }
+ if mpp ~= "" then
+ preamble = mpp
+ end
+ end
+ if preamble then
+ metapost.pushscriptrunner(mpx)
+ executempx(mpx,preamble)
+ metapost.popscriptrunner()
+ end
+ specification.mpx = mpx
+ return mpx
+end
+
+-- luatex.wrapup(function()
+-- for k, mpx in next, mpxformats do
+-- mpx:finish()
+-- end
+-- end)
+
+function metapost.popformat()
+ nofformats = nofformats - 1
+end
+
+function metapost.reset(mpx)
+ if not mpx then
+ -- nothing
+ elseif type(mpx) == "string" then
+ if mpxformats[mpx] then
+ local instance = mpxformats[mpx]
+ instance:finish()
+ mpxterminals[mpx] = nil
+ mpxextradata[mpx] = nil
+ mpxformats [mpx] = nil
+ end
+ else
+ for name, instance in next, mpxformats do
+ if instance == mpx then
+ mpx:finish()
+ mpxterminals[mpx] = nil
+ mpxextradata[mpx] = nil
+ mpxformats [mpx] = nil
+ break
+ end
+ end
+ end
+end
+
+local mp_tra = { }
+local mp_tag = 0
+
+-- key/values
+
+do
+
+ local stack, top = { }, nil
+
+ function metapost.setvariable(k,v)
+ if top then
+ top[k] = v
+ else
+ metapost.variables[k] = v
+ end
+ end
+
+ function metapost.pushvariable(k)
+ local t = { }
+ if top then
+ insert(stack,top)
+ top[k] = t
+ else
+ metapost.variables[k] = t
+ end
+ top = t
+ end
+
+ function metapost.popvariable()
+ top = remove(stack)
+ end
+
+ local stack = { }
+
+ function metapost.pushvariables()
+ insert(stack,metapost.variables)
+ metapost.variables = { }
+ end
+
+ function metapost.popvariables()
+ metapost.variables = remove(stack) or metapost.variables
+ end
+
+end
+
+
+if not metapost.process then
+
+ function metapost.process(specification)
+ metapost.run(specification)
+ end
+
+end
+
+-- run, process, convert and flush all work with a specification with the
+-- following (often optional) fields
+--
+-- mpx string or mp object
+-- data string or table of strings
+-- flusher table with flush methods
+-- askedfig string ("all" etc) or number
+-- incontext boolean
+-- plugmode boolean
+
+local function makebeginbanner(specification)
+ return formatters["%% begin graphic: n=%s\n\n"](metapost.n)
+end
+
+local function makeendbanner(specification)
+ return "\n% end graphic\n\n"
+end
+
+function metapost.run(specification)
+ local mpx = specification.mpx
+ local data = specification.data
+ local converted = false
+ local result = { }
+ local mpxdone = type(mpx) == "string"
+ if mpxdone then
+ mpx = metapost.pushformat { instance = mpx, format = mpx }
+ end
+ if mpx and data then
+ local tra = nil
+ starttiming(metapost) -- why not at the outer level ...
+ metapost.variables = { } -- todo also push / pop
+ metapost.pushscriptrunner(mpx)
+ if trace_graphics then
+ tra = mp_tra[mpx]
+ if not tra then
+ mp_tag = mp_tag + 1
+ local jobname = tex.jobname
+ tra = {
+ inp = io.open(formatters["%s-mplib-run-%03i.mp"] (jobname,mp_tag),"w"),
+ log = io.open(formatters["%s-mplib-run-%03i.log"](jobname,mp_tag),"w"),
+ }
+ mp_tra[mpx] = tra
+ end
+ local banner = makebeginbanner(specification)
+ tra.inp:write(banner)
+ tra.log:write(banner)
+ end
+ local function process(d,i)
+ if d then
+ if trace_graphics then
+ if i then
+ tra.inp:write(formatters["\n%% begin snippet %s\n"](i))
+ end
+ if type(d) == "table" then
+ for i=1,#d do
+ tra.inp:write(d[i])
+ end
+ else
+ tra.inp:write(d)
+ end
+ if i then
+ tra.inp:write(formatters["\n%% end snippet %s\n"](i))
+ end
+ end
+ starttiming(metapost.exectime)
+ result = executempx(mpx,d)
+ stoptiming(metapost.exectime)
+ if trace_graphics and result then
+ local str = result.log or result.error
+ if str and str ~= "" then
+ tra.log:write(str)
+ end
+ end
+ if not metapost.reporterror(result) then
+ if metapost.showlog then
+ -- make function and overload in lmtx
+ local str = result.term ~= "" and result.term or "no terminal output"
+ if not emptystring(str) then
+ metapost.lastlog = metapost.lastlog .. "\n" .. str
+ report_metapost("log: %s",str)
+ end
+ end
+ if result.fig then
+ converted = metapost.convert(specification,result)
+ end
+ end
+ elseif i then
+ report_metapost("error: invalid graphic component %s",i)
+ else
+ report_metapost("error: invalid graphic")
+ end
+ end
+
+-- local data = prepareddata(data)
+ if type(data) == "table" then
+ if trace_tracingall then
+ executempx(mpx,"tracingall;")
+ end
+ process(data)
+-- for i=1,#data do
+-- process(data[i],i)
+-- end
+ else
+ if trace_tracingall then
+ data = "tracingall;" .. data
+ end
+ process(data)
+ end
+ if trace_graphics then
+ local banner = makeendbanner(specification)
+ tra.inp:write(banner)
+ tra.log:write(banner)
+ end
+ stoptiming(metapost)
+ metapost.popscriptrunner()
+ end
+ if mpxdone then
+ metapost.popformat()
+ end
+ return converted, result
+end
+
+if not metapost.convert then
+
+ function metapost.convert()
+ report_metapost('warning: no converter set')
+ end
+
+end
+
+-- This will be redone as we no longer output svg of ps!
+
+-- function metapost.directrun(formatname,filename,outputformat,astable,mpdata)
+-- local fullname = file.addsuffix(filename,"mp")
+-- local data = mpdata or io.loaddata(fullname)
+-- if outputformat ~= "svg" then
+-- outputformat = "mps"
+-- end
+-- if not data then
+-- report_metapost("unknown file %a",filename)
+-- else
+-- local mpx = metapost.checkformat(formatname)
+-- if not mpx then
+-- report_metapost("unknown format %a",formatname)
+-- else
+-- report_metapost("processing %a",(mpdata and (filename or "data")) or fullname)
+-- local result = executempx(mpx,data)
+-- if not result then
+-- report_metapost("error: no result object returned")
+-- elseif result.status > 0 then
+-- report_metapost("error: %s",(result.term or "no-term") .. "\n" .. (result.error or "no-error"))
+-- else
+-- if metapost.showlog then
+-- metapost.lastlog = metapost.lastlog .. "\n" .. result.term
+-- report_metapost("info: %s",result.term or "no-term")
+-- end
+-- local figures = result.fig
+-- if figures then
+-- local sorted = table.sortedkeys(figures)
+-- if astable then
+-- local result = { }
+-- report_metapost("storing %s figures in table",#sorted)
+-- for k=1,#sorted do
+-- local v = sorted[k]
+-- if outputformat == "mps" then
+-- result[v] = figures[v]:postscript()
+-- else
+-- result[v] = figures[v]:svg() -- (3) for prologues
+-- end
+-- end
+-- return result
+-- else
+-- local basename = file.removesuffix(file.basename(filename))
+-- for k=1,#sorted do
+-- local v = sorted[k]
+-- local output
+-- if outputformat == "mps" then
+-- output = figures[v]:postscript()
+-- else
+-- output = figures[v]:svg() -- (3) for prologues
+-- end
+-- local outname = formatters["%s-%s.%s"](basename,v,outputformat)
+-- report_metapost("saving %s bytes in %a",#output,outname)
+-- io.savedata(outname,output)
+-- end
+-- return #sorted
+-- end
+-- end
+-- end
+-- end
+-- end
+-- end
+
+function metapost.directrun(formatname,filename,outputformat,astable,mpdata)
+ report_metapost("producing postscript and svg is no longer supported")
+end
+
+do
+
+ local result = { }
+ local width = 0
+ local height = 0
+ local depth = 0
+ local bbox = { 0, 0, 0, 0 }
+
+ local flusher = {
+ startfigure = function(n,llx,lly,urx,ury)
+ result = { }
+ width = urx - llx
+ height = ury
+ depth = -lly
+ bbox = { llx, lly, urx, ury }
+ end,
+ flushfigure = function(t)
+ local r = #result
+ for i=1,#t do
+ r = r + 1
+ result[r] = t[i]
+ end
+ end,
+ stopfigure = function()
+ end,
+ }
+
+ -- make table variant:
+
+ function metapost.simple(instance,code,useextensions,dontwrap)
+ -- can we pickup the instance ?
+ local mpx = metapost.pushformat {
+ instance = instance or "simplefun",
+ format = "metafun", -- or: minifun
+ method = "double",
+ }
+-- if not code then
+-- code = ""
+-- end
+ metapost.process {
+ mpx = mpx,
+ flusher = flusher,
+ askedfig = 1,
+ useplugins = useextensions,
+ data = dontwrap and { code } or { "beginfig(1);", code, "endfig;" },
+ incontext = false,
+ }
+ metapost.popformat()
+ if result then
+ local stream = concat(result," ")
+ result = { } -- nil -- cleanup .. weird, we can have a dangling q
+ return stream, width, height, depth, bbox
+ else
+ return "", 0, 0, 0, { 0, 0, 0, 0 }
+ end
+ end
+
+end
+
+local getstatistics = mplib.getstatistics
+
+function metapost.getstatistics(memonly)
+ if memonly then
+ local n, m = 0, 0
+ for name, mpx in next, mpxformats do
+ n = n + 1
+ m = m + getstatistics(mpx).memory
+ end
+ return n, m
+ else
+ local t = { }
+ for name, mpx in next, mpxformats do
+ t[name] = getstatistics(mpx)
+ end
+ return t
+ end
+end
+
+local gethashentries = mplib.gethashentries
+
+function metapost.gethashentries(name,full)
+ if name then
+ local mpx = mpxformats[name] or mpxformats[name .. ":1"]
+ if mpx then
+ return gethashentries(mpx,full)
+ end
+ else
+ local t = { }
+ for name, mpx in next, mpxformats do
+ t[name] = gethashtokens(mpx,full)
+ end
+ return t
+ end
+end
+
+local gethashtokens = mplib.gethashtokens
+
+function metapost.getinstancenames()
+ return sortedkeys(mpxformats)
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-scn.lua b/Master/texmf-dist/tex/context/base/mkxl/mlib-scn.lmt
index 709961543bf..e68abf5873c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-scn.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-scn.lmt
@@ -26,30 +26,26 @@ if not modules then modules = { } end modules ['mlib-scn'] = {
-- endfor ;
-- popparameters;
-local type, next, rawget, getmetatable = type, next, rawget, getmetatable
+local type, next, rawget, getmetatable, tonumber = type, next, rawget, getmetatable, tonumber
local byte, gmatch = string.byte, string.gmatch
local insert, remove = table.insert, table.remove
local mplib = mplib
local metapost = metapost
-local codes = mplib.codes()
-local types = mplib.types()
-
-table.hashed(codes)
-table.hashed(types)
-
-metapost.codes = codes
-metapost.types = types
+local codes = metapost.codes
+local types = metapost.types
local setmetatableindex = table.setmetatableindex
local scanners = mp.scan
+local injectors = mp.inject
local scannext = scanners.next
local scanexpression = scanners.expression
local scantoken = scanners.token
local scansymbol = scanners.symbol
+local scanproperty = scanners.property
local scannumeric = scanners.numeric
local scannumber = scanners.number
local scaninteger = scanners.integer
@@ -63,35 +59,33 @@ local scanpath = scanners.path
local scanpen = scanners.pen
local mpprint = mp.print
-local mpnumeric = mp.numeric
-local mpstring = mp.string
-local mpquoted = mp.quoted
-local mpboolean = mp.boolean
-local mppair = mp.pair
-local mppath = mp.path
-local mptriplet = mp.triplet
-local mpquadruple = mp.quadruple
-local mptransform = mp.transform
-local mpvalue = mp.value
+local injectnumeric = injectors.numeric
+local injectstring = injectors.string
+local injectboolean = injectors.boolean
+local injectpair = injectors.pair
+local injecttriplet = injectors.color
+local injectquadruple = injectors.cmykcolor
+local injecttransform = injectors.transform
+local injectpath = injectors.path
local report = logs.reporter("metapost")
-local semicolon_code <const> = codes.semicolon
-local equals_code <const> = codes.equals
-local comma_code <const> = codes.comma
-local colon_code <const> = codes.colon
-local leftbrace_code <const> = codes.leftbrace
-local rightbrace_code <const> = codes.rightbrace
-local leftbracket_code <const> = codes.leftbracket
-local rightbracket_code <const> = codes.rightbracket
-local leftdelimiter_code <const> = codes.leftdelimiter
-local rightdelimiter_code <const> = codes.rightdelimiter
-local numeric_code <const> = codes.numeric
-local string_code <const> = codes.string
-local capsule_code <const> = codes.capsule
-local nullary_code <const> = codes.nullary
-local tag_code <const> = codes.tag
-local definedmacro_code <const> = codes.definedmacro
+local semicolon_code = codes.semicolon
+local equals_code = codes.equals
+local comma_code = codes.comma
+local colon_code = codes.colon
+local leftbrace_code = codes.leftbrace
+local rightbrace_code = codes.rightbrace
+local leftbracket_code = codes.leftbracket
+local rightbracket_code = codes.rightbracket
+local leftdelimiter_code = codes.leftdelimiter
+local rightdelimiter_code = codes.rightdelimiter
+local numeric_code = codes.numeric
+local string_code = codes.string
+local capsule_code = codes.capsule
+local nullary_code = codes.nullary
+local tag_code = codes.tag
+local definedmacro_code = codes.definedmacro
local typescanners = nil
local tokenscanners = nil
@@ -289,6 +283,9 @@ local function applyparameters()
namespaces = saved
end
+local knownparameters = { }
+metapost.knownparameters = knownparameters
+
local function presetparameters()
local namespace = scanstring()
local parent = nil
@@ -297,6 +294,9 @@ local function presetparameters()
parent = presets[scanstring()]
end
local p = get_parameters()
+ for k in next, p do
+ knownparameters[k] = true
+ end
if parent then
setmetatableindex(p,parent)
end
@@ -315,6 +315,10 @@ local function collectnames()
n = n + 1 l[n] = scanstring(1)
elseif t == nullary_code then
n = n + 1 l[n] = scanboolean(1)
+ elseif t == leftbracket_code then
+ scantoken() -- leftbacket
+ n = n + 1 l[n] = scaninteger(1)
+ scantoken() -- rightbacket
elseif t == leftdelimiter_code or t == tag_code or t == capsule_code then
t = scanexpression(true)
n = n + 1 l[n] = (typescanners[t] or scanexpression)()
@@ -328,26 +332,26 @@ end
local function get(v)
local t = type(v)
if t == "number" then
- return mpnumeric(v)
+ return injectnumeric(v)
elseif t == "boolean" then
- return mpboolean(v)
+ return injectboolean(v)
elseif t == "string" then
- return mpquoted(v)
+ return injectstring(v)
elseif t == "table" then
local n = #v
if type(v[1]) == "table" then
- return mppath(v) -- cycle ?
+ return injectpath(v)
elseif n == 2 then
- return mppair(v)
+ return injectpair(v)
elseif n == 3 then
- return mptriplet(v)
+ return injecttriplet(v)
elseif n == 4 then
- return mpquadruple(v)
+ return injectquadruple(v)
elseif n == 6 then
- return mptransform(v)
+ return injecttransform(v)
end
end
- return mpnumeric(0)
+ return injectnumeric(0)
end
local stack = { }
@@ -386,16 +390,16 @@ local function getparameter()
if type(l) == "number" then
vl = v[1]
if vl == nil then
- return mpnumeric(0)
+ return injectnumeric(0)
end
else
- return mpnumeric(0)
+ return injectnumeric(0)
end
end
v = vl
end
if v == nil then
- return mpnumeric(0)
+ return injectnumeric(0)
else
return get(v)
end
@@ -411,18 +415,18 @@ local function hasparameter()
if type(l) == "number" then
vl = rawget(v,1)
if vl == nil then
- return mpboolean(false)
+ return injectboolean(false)
end
else
- return mpboolean(false)
+ return injectboolean(false)
end
end
v = vl
end
if v == nil then
- return mpboolean(false)
+ return injectboolean(false)
else
- return mpboolean(true)
+ return injectboolean(true)
end
end
@@ -435,7 +439,7 @@ local function hasoption()
local l = list[i]
local vl = v[l]
if vl == nil then
- return mpboolean(false)
+ return injectboolean(false)
end
v = vl
end
@@ -446,18 +450,18 @@ local function hasoption()
-- no caching .. slow anyway
local o = list[n]
if v == o then
- return mpboolean(true)
+ return injectboolean(true)
end
for vv in gmatch(v,"[^%s,]+") do
for oo in gmatch(o,"[^%s,]+") do
if vv == oo then
- return mpboolean(true)
+ return injectboolean(true)
end
end
end
end
end
- return mpboolean(false)
+ return injectboolean(false)
end
local function getparameterdefault()
@@ -474,8 +478,16 @@ local function getparameterdefault()
end
end
if vl == nil then
- return mpnumeric(0)
+ return injectnumeric(0)
else
+ if type(vl) == "string" then
+ local td = type(list[n])
+ if td == "number" then
+ vl = tonumber(vl)
+ elseif td == "boolean" then
+ vl = vl == "true"
+ end
+ end
return get(vl)
end
else
@@ -502,17 +514,17 @@ local function getparameterdefault()
local l = list[i]
local vl = v[l]
if vl == nil then
- return mpnumeric(0)
+ return injectnumeric(0)
end
v = vl
end
if v == nil then
- return mpnumeric(0)
+ return injectnumeric(0)
else
return get(v)
end
end
- return mpnumeric(0)
+ return injectnumeric(0)
else
return get(last)
end
@@ -523,6 +535,14 @@ local function getparameterdefault()
if v == nil then
return get(list[n])
else
+ if type(v) == "string" then
+ local td = type(list[n])
+ if td == "number" then
+ v = tonumber(v)
+ elseif td == "boolean" then
+ v = v == "true"
+ end
+ end
return get(v)
end
end
@@ -537,7 +557,7 @@ local function getparametercount()
break
end
end
- return mpnumeric(type(v) == "table" and #v or 0)
+ return injectnumeric(type(v) == "table" and #v or 0)
end
local function getmaxparametercount()
@@ -568,7 +588,7 @@ local function getmaxparametercount()
end
end
- return mpnumeric(n)
+ return injectnumeric(n)
end
local validconnectors = {
@@ -599,9 +619,9 @@ local function getparameterpath()
end
end
if type(v) == "table" then
- return mppath(v,connector,close)
+ return injectpath(v,connector,close)
else
- return mppair(0,0)
+ return injectpair(0,0)
end
end
@@ -615,9 +635,9 @@ local function getparameterpen()
end
end
if type(v) == "table" then
- return mppath(v,"..",true)
+ return injectpath(v,"..",true)
else
- return mppair(0,0)
+ return injectpair(0,0)
end
end
@@ -637,9 +657,9 @@ local function getparametertext()
end
end
if type(v) == "string" then
- return mpquoted("\\strut " .. v)
+ return injectstring("\\strut " .. v)
else
- return mpquoted("")
+ return injectstring("")
end
end
@@ -673,21 +693,23 @@ function metapost.scanparameters()
return get_parameters()
end
-metapost.registerscript("getparameters", getparameters)
-metapost.registerscript("applyparameters", applyparameters)
-metapost.registerscript("presetparameters", presetparameters)
-metapost.registerscript("hasparameter", hasparameter)
-metapost.registerscript("hasoption", hasoption)
-metapost.registerscript("getparameter", getparameter)
-metapost.registerscript("getparameterdefault", getparameterdefault)
-metapost.registerscript("getparametercount", getparametercount)
-metapost.registerscript("getmaxparametercount",getmaxparametercount)
-metapost.registerscript("getparameterpath", getparameterpath)
-metapost.registerscript("getparameterpen", getparameterpen)
-metapost.registerscript("getparametertext", getparametertext)
---------.registerscript("getparameteroption", getparameteroption)
-metapost.registerscript("pushparameters", pushparameters)
-metapost.registerscript("popparameters", popparameters)
+local registerscript = metapost.registerscript
+
+registerscript("getparameters", getparameters)
+registerscript("applyparameters", applyparameters)
+registerscript("presetparameters", presetparameters)
+registerscript("hasparameter", hasparameter)
+registerscript("hasoption", hasoption)
+registerscript("getparameter", getparameter)
+registerscript("getparameterdefault", getparameterdefault)
+registerscript("getparametercount", getparametercount)
+registerscript("getmaxparametercount",getmaxparametercount)
+registerscript("getparameterpath", getparameterpath)
+registerscript("getparameterpen", getparameterpen)
+registerscript("getparametertext", getparametertext)
+--------------("getparameteroption", getparameteroption)
+registerscript("pushparameters", pushparameters)
+registerscript("popparameters", popparameters)
function metapost.getparameter(list)
local n = #list
@@ -713,7 +735,7 @@ end
-- goodies
-metapost.registerscript("definecolor", function()
+registerscript("definecolor", function()
scantoken() -- we scan the semicolon
local s = get_parameters()
attributes.colors.defineprocesscolordirect(s)
@@ -732,9 +754,9 @@ local scandimension = scanners.dimension
local definitions = { }
-local bpfactor <const> = number.dimenfactors.bp
-local comma <const> = byte(",")
-local close <const> = byte("]")
+local bpfactor = number.dimenfactors.bp
+local comma = byte(",")
+local close = byte("]")
local scanrest = function() return scanvalue(comma,close) or "" end
local scandimension = function() return scandimension() * bpfactor end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mlib-svg.lua b/Master/texmf-dist/tex/context/base/mkxl/mlib-svg.lmt
index 3d15840a7b6..dca2b6d191d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mlib-svg.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/mlib-svg.lmt
@@ -1,5 +1,6 @@
if not modules then modules = { } end modules ['mlib-svg'] = {
version = 1.001,
+ optimize = true,
comment = "companion to mlib-ctx.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -80,9 +81,9 @@ local rawget, rawset, type, tonumber, tostring, next, setmetatable = rawget, raw
local P, S, R, C, Ct, Cs, Cc, Cp, Cg, Cf, Carg = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.Cc, lpeg.Cp, lpeg.Cg, lpeg.Cf, lpeg.Carg
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
-local sqrt = math.sqrt
+local sqrt, abs = math.sqrt, math.abs
local concat, setmetatableindex, sortedhash = table.concat, table.setmetatableindex, table.sortedhash
-local gmatch, gsub, find, match, rep = string.gmatch, string.gsub, string.find, string.match, string.rep
+local gmatch, gsub, find, match = string.gmatch, string.gsub, string.find, string.match
local formatters, fullstrip = string.formatters, string.fullstrip
local utfsplit, utfbyte = utf.split, utf.byte
@@ -122,14 +123,8 @@ local trace = false trackers.register("metapost.svg", function(v)
local trace_text = false trackers.register("metapost.svg.text", function(v) trace_text = v end)
local trace_path = false trackers.register("metapost.svg.path", function(v) trace_path = v end)
local trace_result = false trackers.register("metapost.svg.result", function(v) trace_result = v end)
-
-local pathtracer = {
- ["stroke"] = "darkred",
- ["stroke-opacity"] = ".5",
- ["stroke-width"] = ".5",
- ["fill"] = "darkgray",
- ["fill-opacity"] = ".75",
-}
+local trace_colors = false trackers.register("metapost.svg.colors", function(v) trace_colors = v end)
+local trace_fonts = false trackers.register("metapost.svg.fonts", function(v) trace_fonts = v end)
-- This is just an experiment. Todo: reset hash etc. Also implement
-- an option handler.
@@ -299,7 +294,7 @@ local p_digit = lpegpatterns.digit
local p_hexdigit = lpegpatterns.hexdigit
local p_space = lpegpatterns.whitespace
-local factors = {
+local factors = {
["pt"] = 1.25,
["mm"] = 3.543307,
["cm"] = 35.43307,
@@ -310,76 +305,88 @@ local factors = {
["ex"] = 8 * 1.25,
}
+metapost.svgfactors = factors
+
local percentage_r = 1/100
local percentage_x = percentage_r
local percentage_y = percentage_r
--- incredible: we can find .123.456 => 0.123 0.456 ...
-
-local p_command_x = C(S("Hh"))
-local p_command_y = C(S("Vv"))
-local p_command_xy = C(S("CcLlMmQqSsTt"))
-local p_command_a = C(S("Aa"))
-local p_command = C(S("Zz"))
-
-local p_optseparator = S("\t\n\r ,")^0
-local p_separator = S("\t\n\r ,")^1
-local p_number = (S("+-")^0 * (p_digit^0 * P(".") * p_digit^1 + p_digit^1 * P(".") + p_digit^1))
- * (P("e") * S("+-")^0 * p_digit^1)^-1
-
-local function convert (n) n = tonumber(n) return n end
-local function convert_r (n,u) n = tonumber(n) if u == true then return percentage_r * n elseif u then return u * n else return n end end
-local function convert_x (n,u) n = tonumber(n) if u == true then return percentage_x * n elseif u then return u * n else return n end end
-local function convert_y (n,u) n = tonumber(n) if u == true then return percentage_y * n elseif u then return u * n else return n end end
-local function convert_vx(n,u) n = tonumber(n) if u == true then return percentage_x * n elseif u then return u * n else return n end end
-local function convert_vy(n,u) n = - tonumber(n) if u == true then return percentage_y * n elseif u then return u * n else return n end end
-
-local p_unit = (P("p") * S("txc") + P("e") * S("xm") + S("mc") * P("m") + P("in")) / factors
-local p_percent = P("%") * Cc(true)
-
-local c_number_n = C(p_number)
-local c_number_u = C(p_number) * (p_unit + p_percent)^-1
-
-local p_number_n = c_number_n / convert
-local p_number_x = c_number_u / convert_x
-local p_number_vx = c_number_u / convert_vx
-local p_number_y = c_number_u / convert_y
-local p_number_vy = c_number_u / convert_vy
-local p_number_r = c_number_u / convert_r
-
-local function asnumber (s) return s and lpegmatch(p_number, s) or 0 end
-local function asnumber_r (s) return s and lpegmatch(p_number_r, s) or 0 end
-local function asnumber_x (s) return s and lpegmatch(p_number_x, s) or 0 end
-local function asnumber_y (s) return s and lpegmatch(p_number_y, s) or 0 end
-local function asnumber_vx(s) return s and lpegmatch(p_number_vx,s) or 0 end
-local function asnumber_vy(s) return s and lpegmatch(p_number_vy,s) or 0 end
-
-local p_number_vx_t = Ct { (p_number_vx + p_separator)^1 }
-local p_number_vy_t = Ct { (p_number_vy + p_separator)^1 }
-
-local zerotable = { 0 }
-
-local function asnumber_vx_t(s) return s and lpegmatch(p_number_vx_t,s) or zerotable end
-local function asnumber_vy_t(s) return s and lpegmatch(p_number_vy_t,s) or zerotable end
-
-local p_numbersep = p_number_n + p_separator
-local p_numbers = p_optseparator * P("(") * p_numbersep^0 * p_optseparator * P(")")
-local p_fournumbers = p_numbersep^4
-local p_path = Ct ( (
- p_command_xy * (p_optseparator * p_number_vx *
- p_optseparator * p_number_vy )^1
- + p_command_x * (p_optseparator * p_number_vx )^1
- + p_command_y * (p_optseparator * p_number_vy )^1
- + p_command_a * (p_optseparator * p_number_vx *
- p_optseparator * p_number_vy *
- p_optseparator * p_number_r *
- p_optseparator * p_number_n * -- flags
- p_optseparator * p_number_n * -- flags
- p_optseparator * p_number_vx *
- p_optseparator * p_number_vy )^1
- + p_command
- + p_separator
-)^1 )
+local asnumber, asnumber_r, asnumber_x, asnumber_y, asnumber_vx, asnumber_vy
+local asnumber_vx_t, asnumber_vy_t
+local p_number, p_separator, p_optseparator, p_numbers, p_fournumbers, p_path
+local p_number_n, p_number_x, p_number_vx, p_number_y, p_number_vy, p_number_r
+
+do
+
+ -- incredible: we can find .123.456 => 0.123 0.456 ...
+
+ local p_command_x = C(S("Hh"))
+ local p_command_y = C(S("Vv"))
+ local p_command_xy = C(S("CcLlMmQqSsTt"))
+ local p_command_a = C(S("Aa"))
+ local p_command = C(S("Zz"))
+
+ p_optseparator = S("\t\n\r ,")^0
+ p_separator = S("\t\n\r ,")^1
+ p_number = (S("+-")^0 * (p_digit^0 * P(".") * p_digit^1 + p_digit^1 * P(".") + p_digit^1))
+ * (P("e") * S("+-")^0 * p_digit^1)^-1
+
+ local function convert (n) n = tonumber(n) return n end
+ local function convert_r (n,u) n = tonumber(n) if u == true then return percentage_r * n elseif u then return u * n else return n end end
+ local function convert_x (n,u) n = tonumber(n) if u == true then return percentage_x * n elseif u then return u * n else return n end end
+ local function convert_y (n,u) n = tonumber(n) if u == true then return percentage_y * n elseif u then return u * n else return n end end
+ local function convert_vx(n,u) n = tonumber(n) if u == true then return percentage_x * n elseif u then return u * n else return n end end
+ local function convert_vy(n,u) n = - tonumber(n) if u == true then return percentage_y * n elseif u then return u * n else return n end end
+
+ local p_unit = (P("p") * S("txc") + P("e") * S("xm") + S("mc") * P("m") + P("in")) / factors
+ local p_percent = P("%") * Cc(true)
+
+ local c_number_n = C(p_number)
+ local c_number_u = C(p_number) * (p_unit + p_percent)^-1
+
+ p_number_n = c_number_n / convert
+ p_number_x = c_number_u / convert_x
+ p_number_vx = c_number_u / convert_vx
+ p_number_y = c_number_u / convert_y
+ p_number_vy = c_number_u / convert_vy
+ p_number_r = c_number_u / convert_r
+
+ asnumber = function(s) return s and lpegmatch(p_number, s) or 0 end
+ asnumber_r = function(s) return s and lpegmatch(p_number_r, s) or 0 end
+ asnumber_x = function(s) return s and lpegmatch(p_number_x, s) or 0 end
+ asnumber_y = function(s) return s and lpegmatch(p_number_y, s) or 0 end
+ asnumber_vx = function(s) return s and lpegmatch(p_number_vx,s) or 0 end
+ asnumber_vy = function(s) return s and lpegmatch(p_number_vy,s) or 0 end
+
+ local p_number_vx_t = Ct { (p_number_vx + p_separator)^1 }
+ local p_number_vy_t = Ct { (p_number_vy + p_separator)^1 }
+
+ local zerotable = { 0 }
+
+ asnumber_vx_t = function(s) return s and lpegmatch(p_number_vx_t,s) or zerotable end
+ asnumber_vy_t = function(s) return s and lpegmatch(p_number_vy_t,s) or zerotable end
+
+ local p_numbersep = p_number_n + p_separator
+ p_numbers = p_optseparator * P("(") * p_numbersep^0 * p_optseparator * P(")")
+ p_fournumbers = p_numbersep^4
+ p_path = Ct ( (
+ p_command_xy * (p_optseparator * p_number_vx *
+ p_optseparator * p_number_vy )^1
+ + p_command_x * (p_optseparator * p_number_vx )^1
+ + p_command_y * (p_optseparator * p_number_vy )^1
+ + p_command_a * (p_optseparator * p_number_vx *
+ p_optseparator * p_number_vy *
+ p_optseparator * p_number_r *
+ p_optseparator * p_number_n * -- flags
+ p_optseparator * p_number_n * -- flags
+ p_optseparator * p_number_vx *
+ p_optseparator * p_number_vy )^1
+ + p_command
+ + p_separator
+ )^1 )
+
+
+end
-- We can actually use the svg color definitions from the tex end but maybe a user
-- doesn't want those replace the normal definitions.
@@ -428,7 +435,7 @@ end
-- todo: cache colors per image / remapper
-local colorcomponents, withcolor, thecolor do
+local colorcomponents, withcolor, thecolor, usedcolors do
local svgcolors = {
aliceblue = 0xF0F8FF, antiquewhite = 0xFAEBD7, aqua = 0x00FFFF, aquamarine = 0x7FFFD4,
@@ -476,7 +483,7 @@ local colorcomponents, withcolor, thecolor do
local f_rgba = formatters['withcolor svgcolor(%.3N,%.3N,%.3N) withtransparency (1,%.3N)']
local f_graya = formatters['withcolor svggray(%.3N) withtransparency (1,%.3N)']
local f_name = formatters['withcolor "%s"']
- local f_svgcolor = formatters['svgcolor(%.3N,%.3N,%.3N)']
+ local f_svgrgb = formatters['svgcolor(%.3N,%.3N,%.3N)']
local f_svgcmyk = formatters['svgcmyk(%.3N,%.3N,%.3N,%.3N)']
local f_svggray = formatters['svggray(%.3N)']
local f_svgname = formatters['"%s"']
@@ -510,7 +517,7 @@ local colorcomponents, withcolor, thecolor do
* p_separator^0 * p_absolute^0
* p_right
- local colors = attributes.colors
+ local colors = attributes.colors
local colorvalues = colors.values
local colorindex = attributes.list[attributes.private('color')]
local hsvtorgb = colors.hsvtorgb
@@ -519,13 +526,18 @@ local colorcomponents, withcolor, thecolor do
local p_splitcolor =
P("#") * C(p_hexdigit*p_hexdigit)^1 / function(r,g,b)
- return "rgb",
- tonumber(r or 0, 16) / 255 or 0,
- tonumber(g or 0, 16) / 255 or 0,
- tonumber(b or 0, 16) / 255 or 0
+ if not r then
+ return "gray", 0
+ elseif not (g and b) then
+ return "gray", tonumber(r or "0", 16) / 255 or 0
+ else
+ return "rgb",
+ tonumber(r or "0", 16) / 255 or 0,
+ tonumber(g or "0", 16) / 255 or 0,
+ tonumber(b or "0", 16) / 255 or 0
+ end
end
- +
- P("rgb") * p_a
+ + P("rgb") * p_a
* p_left * (p_fraction + p_separator)^-3 * (p_absolute + p_separator)^0 * p_right / function(r,g,b,a)
return "rgb", r or 0, g or 0, b or 0, a or false
end
@@ -559,7 +571,6 @@ local colorcomponents, withcolor, thecolor do
end
end
-
local function registeredcolor(name)
local color = colorindex[name]
if color then
@@ -580,6 +591,9 @@ local colorcomponents, withcolor, thecolor do
-- we can have a fast check for #000000
local function validcolor(color)
+ if usedcolors then
+ usedcolors[color] = usedcolors[color] + 1
+ end
if colormap then
local c = colormap[color]
local t = type(c)
@@ -1356,6 +1370,14 @@ do
-- ["vkern"] = true,
}
+ local pathtracer = {
+ ["stroke"] = "darkred",
+ ["stroke-opacity"] = ".5",
+ ["stroke-width"] = ".5",
+ ["fill"] = "darkgray",
+ ["fill-opacity"] = ".75",
+ }
+
local function handlechains(c)
if tags[c.tg] then
local at = c.at
@@ -1760,7 +1782,8 @@ do
end
end
- local uselevel = 0
+ local uselevel = 0
+ local bodyfontscale = 1
function handlers.use(c)
local at = c.at
@@ -1817,12 +1840,19 @@ do
local f_do_fill = f_do_fill_c
local f_eo_fill = f_eo_fill_c
local f_no_fill = f_no_fill_c
- local s_clip_start = 'draw image ('
- local f_clip_stop_c = formatters[') ; clip currentpicture to (%s..cycle) ;']
- local f_clip_stop_l = formatters[') ; clip currentpicture to (%s--cycle) ;']
+-- local s_clip_start = 'draw image ('
+-- local f_clip_stop_c = formatters[') ; clip currentpicture to (%s..cycle) ;']
+-- local f_clip_stop_l = formatters[') ; clip currentpicture to (%s--cycle) ;']
+-- local f_clip_stop = f_clip_stop_c
+-- local f_eoclip_stop_c = formatters[') ; eoclip currentpicture to (%s..cycle) ;']
+-- local f_eoclip_stop_l = formatters[') ; eoclip currentpicture to (%s--cycle) ;']
+-- local f_eoclip_stop = f_eoclip_stop_c
+ local s_clip_start = 'save p ; picture p ; p := image ('
+ local f_clip_stop_c = formatters[') ; clip p to (%s..cycle) ; draw p ;']
+ local f_clip_stop_l = formatters[') ; clip p to (%s--cycle) ; draw p ;']
local f_clip_stop = f_clip_stop_c
- local f_eoclip_stop_c = formatters[') ; eoclip currentpicture to (%s..cycle) ;']
- local f_eoclip_stop_l = formatters[') ; eoclip currentpicture to (%s--cycle) ;']
+ local f_eoclip_stop_c = formatters[') ; eoclip p to (%s..cycle) ; draw p ;']
+ local f_eoclip_stop_l = formatters[') ; eoclip p to (%s--cycle) ; draw p ;']
local f_eoclip_stop = f_eoclip_stop_c
-- could be shared and then beginobject | endobject
@@ -1920,7 +1950,7 @@ do
--
-- todo: combine more (offset+scale+rotation)
- local function makemarker(where,c,x1,y1,x2,y2,x3,y3)
+ local function makemarker(where,c,x1,y1,x2,y2,x3,y3,parentat)
local at = c.at
local refx = rawget(at,"refX")
local refy = rawget(at,"refY")
@@ -1929,8 +1959,8 @@ do
local view = rawget(at,"viewBox")
local orient = rawget(at,"orient")
-- local ratio = rawget(at,"preserveAspectRatio")
- local units = at["markerUnits"]
- local height = at["markerHeight"]
+ local units = asnumber(at["markerUnits"] or parentat["stroke-width"]) or 1
+
local angx = 0
local angy = 0
local angle = 0
@@ -1938,38 +1968,33 @@ do
if where == "beg" then
if orient == "auto" then -- unchecked
-- no angle
- angx = x2 - x3
- angy = y2 - y3
+ angx = abs(x2 - x3)
+ angy = abs(y2 - y3)
elseif orient == "auto-start-reverse" then -- checked
-- points to start
- angx = x3 - x2
- angy = y3 - y2
+ angx = -abs(x2 - x3)
+ angy = -abs(y2 - y3)
elseif orient then -- unchecked
angle = asnumber_r(orient)
end
elseif where == "end" then
- if orient == "auto" then -- unchecked
- -- no angle ?
- angx = x1 - x2
- angy = y1 - y2
- elseif orient == "auto-start-reverse" then -- unchecked
- -- points to end
- angx = x2 - x1
- angy = y2 - y1
+ -- funny standard .. bug turned feature?
+ if orient == "auto" or orient == "auto-start-reverse" then
+ angx = abs(x1 - x2)
+ angy = abs(y1 - y2)
elseif orient then -- unchecked
angle = asnumber_r(orient)
end
elseif orient then -- unchecked
angle = asnumber_r(orient)
end
-
-- what wins: viewbox or w/h
refx = asnumber_x(refx)
refy = asnumber_y(refy)
- width = width and asnumber_x(width) or 3 -- defaults
- height = height and asnumber_y(height) or 3 -- defaults
+ width = (width and asnumber_x(width) or 3) * units
+ height = (height and asnumber_y(height) or 3) * units
local x = 0
local y = 0
@@ -2058,27 +2083,29 @@ do
end
- local function addmarkers(list,begmarker,midmarker,endmarker)
+ -- do we need to metatable the attributes here?
+
+ local function addmarkers(list,begmarker,midmarker,endmarker,at)
local n = #list
if n > 3 then
if begmarker then
local m = locate(begmarker)
if m then
- makemarker("beg",m,false,false,list[1],list[2],list[3],list[4])
+ makemarker("beg",m,false,false,list[1],list[2],list[3],list[4],at)
end
end
if midmarker then
local m = locate(midmarker)
if m then
for i=3,n-2,2 do
- makemarker("mid",m,list[i-2],list[i-1],list[i],list[i+1],list[i+2],list[i+3])
+ makemarker("mid",m,list[i-2],list[i-1],list[i],list[i+1],list[i+2],list[i+3],at)
end
end
end
if endmarker then
local m = locate(endmarker)
if m then
- makemarker("end",m,list[n-3],list[n-2],list[n-1],list[n],false,false)
+ makemarker("end",m,list[n-3],list[n-2],list[n-1],list[n],false,false,at)
end
end
else
@@ -2148,7 +2175,7 @@ do
r = r + 1 ; result[r] = etransform or ";"
--
if list then
- addmarkers(list,begmarker,midmarker,endmarker)
+ addmarkers(list,begmarker,midmarker,endmarker,at)
end
--
if wrapup then
@@ -2285,7 +2312,6 @@ do
local btransform, etransform = handletransform(at)
local cpath = handleclippath(at)
-
if cpath then
r = r + 1 ; result[r] = s_clip_start
end
@@ -2380,7 +2406,7 @@ do
r = r + 1 ; result[r] = ";"
end
if list then
- addmarkers(list,begmarker,midmarker,endmarker)
+ addmarkers(list,begmarker,midmarker,endmarker,at)
end
r = r + 1 ; result[r] = etransform or ") ;"
end
@@ -2532,7 +2558,8 @@ do
local f_styled = formatters["\\svgstyled{%s}{%s}{%s}{%s}"]
local f_colored = formatters["\\svgcolored{%.3N}{%.3N}{%.3N}{"]
- local f_placed = formatters["\\svgplaced{%.3N}{%.3N}{}{"]
+-- local f_placed = formatters["\\svgplaced{%.3N}{%.3N}{}{"]
+local f_placed = formatters["\\svgplaced{%s}{%s}{}{"]
local f_poschar = formatters["\\svgposchar{%.3N}{%.3N}{%s}"]
local f_char = formatters["\\svgchar{%s}"]
@@ -2601,20 +2628,32 @@ do
--
ax = ax and asnumber_vx(ax) or x
ay = ay and asnumber_vy(ay) or y
- dx = dx and asnumber_vx(dx) or 0
- dy = dy and asnumber_vy(dy) or 0
+ --
+local d_x = dx and asnumber_vx(dx) or 0
+local d_y = dy and asnumber_vy(dy) or 0
--
if v_family then v_family = cssfamily(v_family) end
if v_style then v_style = cssstyle (v_style) end
if v_weight then v_weight = cssweight(v_weight) end
- if v_size then v_size = csssize (v_size,factors) end
+ if v_size then v_size = csssize (v_size,factors) or tonumber(v_size) end
+ --
+ if not v_family then v_family = family end
+ if not v_weight then v_weight = "normal" end
+ if not v_style then v_style = "normal" end
+ --
+ if v_family then
+ v_family = fonts.names.cleanname(v_family)
+ v_family = checkedfamily(v_family)
+ end
+ --
+ usedfonts[v_family][v_weight][v_style] = true
--
ax = ax - x
ay = ay - y
--
local elayered = ax ~= 0 or ay ~= 0 or false
- local eplaced = dx ~= 0 or dy ~= 0 or false
-
+-- local eplaced = dx ~= 0 or dy ~= 0 or false
+local eplaced = d_x ~= 0 or d_y ~= 0 or false
local usedsize, usedscaled
if elayered then
@@ -2628,30 +2667,30 @@ do
usedsize = v_size or size
usedscale = (usedsize / defaultsize) / scale
end
- --
- -- print("element ",c.tg)
- -- print(" layered ",elayered)
- -- print(" font size ",v_size)
- -- print(" parent size ",size)
- -- print(" parent scale",scale)
- -- print(" used size ",usedsize)
- -- print(" used scale ",usedscale)
+usedscale = (10 / bodyfontscale) * usedscale
--
if eplaced then
+if dx then
+ if not find(dx,"%a") then
+ dx = dx .. "bp"
+ elseif find(dx,"e") then
+ dx = formatters["%s\\dimexpr %s\\relax"](usedscale,dx)
+ end
+else
+ dx = "0pt"
+end
+if dy then
+ if not find(dy,"%a") then
+ dy = dy .. "bp"
+ elseif find(dy,"e") then
+ dy = formatters["%s\\dimexpr %s\\relax"](usedscale,dy)
+ end
+else
+ dy = "0pt"
+end
t[#t+1] = f_placed(dx,dy)
end
--
- if not v_family then v_family = family end
- if not v_weight then v_weight = "normal" end
- if not v_style then v_style = "normal" end
- --
- if v_family then
- v_family = fonts.names.cleanname(v_family)
- v_family = checkedfamily(v_family)
- end
- --
- usedfonts[v_family][v_weight][v_style] = true
- --
-- if usedscale == 1 then
-- t[#t+1] = f_normal( v_family,v_weight,v_style)
-- else
@@ -2659,6 +2698,18 @@ do
-- end
t[#t+1] = "{"
--
+ if trace_fonts then
+ report("element : %s",c.tg)
+ report(" font family : %s",v_family)
+ report(" font weight : %s",v_weight)
+ report(" font style : %s",v_style)
+ report(" parent size : %s",size)
+ report(" parent scale : %s",scale)
+ report(" used size : %s",usedsize)
+ report(" used scale : %s",usedscale)
+ report(" layered : %l",elayered)
+ end
+ --
local ecolored = v_fill and v_fill ~= "" or false
if ecolored then
-- todo cmyk
@@ -2736,9 +2787,15 @@ do
local x = rawget(at,"x")
local y = rawget(at,"y")
+-- local dx = rawget(at,"dx")
+-- local dy = rawget(at,"dy")
+
local tx = asnumber_vx_t(x)
local ty = asnumber_vy_t(y)
+-- dx = dx and asnumber_vx(dx) or 0
+-- dy = dy and asnumber_vy(dy) or 0
+
x = tx[1] or 0 -- catch bad x/y spec
y = ty[1] or 0 -- catch bad x/y spec
@@ -2749,6 +2806,8 @@ do
local color, opacity, invisible = fillproperties(v_fill,at)
local anchor = anchors[at["text-anchor"] or "start"] or "drt"
local r = metapost.remappedtext(only)
+-- x = x + dx
+-- y = y + dy
if r then
if x == 0 and y == 0 then
only = f_mapped_simple_svg(r.index)
@@ -2822,7 +2881,7 @@ do
end
function handlers.svg(c,x,y,w,h,noclip,notransform,normalize)
- local at = c.at
+ local at = c.at
local wrapupviewport
local bhacked
@@ -2833,6 +2892,8 @@ do
local btransform, etransform, transform = handletransform(at)
+bodyfontscale = tex.getdimen("bodyfontsize") / 65536
+
if trace then
report("view: %s, xpct %N, ypct %N","before",percentage_x,percentage_y)
end
@@ -2949,6 +3010,7 @@ do
tagstyles = { }
classstyles = { }
colormap = specification.colormap
+ usedcolors = trace_colors and setmetatableindex("number") or false
for s in xmlcollected(c,"style") do -- can also be in a def, so let's play safe
handlestyle(c)
end
@@ -2968,6 +3030,9 @@ do
if trace_result then
report("result graphic:\n %\n t",result)
end
+ if usedcolors and next(usedcolors) then
+ report("graphic %a uses colors: %s",specification.id or "unknown",table.sequenced(usedcolors))
+ end
mps = concat(result," ")
root = false
result = false
diff --git a/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mult-aux.mkxl
index 3fed8c26e68..40667e17d85 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/mult-aux.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/mult-aux.mkxl
@@ -21,7 +21,7 @@
\unprotect
-\edef\??empty{\Uchar25} \letvalue{\Uchar25}\empty % hex 19
+\immutable\edef\??empty{\Uchar25} \immutable\letvalue{\Uchar25}\empty % hex 19
% \edef\s!parent{\Uchar29} % inlining  is ugly, a tiny bit faster, but neglectable on a run
@@ -82,83 +82,154 @@
% \testfeatureonce{100000}{\mult_interfaces_get_parameters{bla} [a=111,b=222,c=333]}% 1.529s
% \testfeatureonce{100000}{\def\m_mult_interfaces_namespace{bla}\mult_interfaces_get_parameters_indeed[a=111,b=222,c=333]}% 1.466s
-\let\m_mult_interfaces_namespace\empty
-
-\def\mult_interfaces_get_parameters#1[#2%
- {\if\noexpand#2]%
- \expandafter\gobbleoneargument
- \else
- \def\m_mult_interfaces_namespace{#1}%
- \expandafter\mult_interfaces_get_parameters_indeed
- \fi#2}
-
-\def\mult_interfaces_get_parameters_indeed#1]% namespace already set
- {\mult_interfaces_get_parameters_item#1,],^^^^0004}
+% KEEP THIS:
+%
+% \let\m_mult_interfaces_namespace\empty
+%
+% \def\mult_interfaces_get_parameters#1[#2%
+% {\if\noexpand#2]%
+% \expandafter\gobbleoneargument
+% \else
+% \def\m_mult_interfaces_namespace{#1}%
+% \expandafter\mult_interfaces_get_parameters_indeed
+% \fi#2}
+%
+% \def\mult_interfaces_get_parameters_indeed#1]% namespace already set
+% {\mult_interfaces_get_parameters_item#1,],^^^^0004}
+%
+% \def\mult_interfaces_get_parameters_item#1,#2% #2 takes space before ,
+% {\if,#1,% dirty trick for testing #1=empty
+% \expandafter\mult_interfaces_get_parameters_item
+% \orelse\if]#1%
+% \expandafter\gobbleoneargument
+% \else
+% \mult_interfaces_get_parameters_assign#1==\empty^^^^0004%
+% % \expandafter\mult_interfaces_get_parameters_item % saves skipping when at end
+% \fi#2}
+%
+% \def\mult_interfaces_get_parameters_error#1#2% #3%
+% {\mult_interfaces_get_parameters_error_indeed{#1}{#2}%
+% \gobbleoneargument}
+%
+% \def\mult_interfaces_get_parameters_error_indeed#1#2%
+% {\showassignerror{#2}{\the\inputlineno\space(#1)}}
+%
+% \def\mult_interfaces_get_parameters_assign#1=#2=#3#0^^^^0004%
+% {\ifx\empty#1\empty
+% \expandafter\mult_interfaces_get_parameters_error
+% \orelse\ifx#3\empty
+% \expandafter\mult_interfaces_get_parameters_error
+% \else
+% \expandafter\mult_interfaces_adef % assignment def
+% \fi
+% \m_mult_interfaces_namespace{#1}{#2}%
+% \doubleexpandafter\mult_interfaces_get_parameters_item}
+%
+% \startinterface english
+%
+% % some 10% faster
+%
+% \let\mult_interfaces_get_parameters_error\undefined
+%
+% \def\mult_interfaces_get_parameters_error_one#0\csname#2#3\endcsname#0%
+% {\mult_interfaces_get_parameters_error_indeed{#2}{#3}\iftrue}
+%
+% \def\mult_interfaces_get_parameters_error_two#0\csname#2#3\endcsname#0%
+% {\mult_interfaces_get_parameters_error_indeed{#2}{#3}}
+%
+% \def\mult_interfaces_get_parameters_assign#1=#2=#3#0^^^^0004%
+% {\ifx\empty#1\empty
+% \mult_interfaces_get_parameters_error_one
+% \orelse\ifx#3\empty
+% \mult_interfaces_get_parameters_error_two
+% \else
+% \defcsname\m_mult_interfaces_namespace#1\endcsname{#2}%
+% \fi
+% \doubleexpandafter\mult_interfaces_get_parameters_item}
+%
+% \stopinterface
+%
+% \newif\ifassignment
+%
+% \def\mult_check_for_assignment_indeed#0=#2#0^^^^0004%
+% {\if#2^^^^0003\assignmentfalse\else\assignmenttrue\fi}
+%
+% \def\mult_check_for_assignment_indeed_begin_#0=#2#0^^^^0004%
+% {\if#2^^^^0003}
+%
+% \def\mult_check_for_assignment#1%
+% {\expandafter\mult_check_for_assignment_indeed\detokenize{#1}=^^^^0003^^^^0003^^^^0004}
+%
+% % End of experimental code.
-\def\mult_interfaces_get_parameters_item#1,#2% #2 takes space before ,
- {\if,#1,% dirty trick for testing #1=empty
- \expandafter\mult_interfaces_get_parameters_item
- \orelse\if]#1%
- \expandafter\gobbleoneargument
- \else
- \mult_interfaces_get_parameters_assign#1==\empty^^^^0004%
- % \expandafter\mult_interfaces_get_parameters_item % saves skipping when at end
- \fi#2}
+%D We keep the above as reference, but from now on experiment with the following
+%D implementation. In principle this one is faster, but because normally we don't
+%D have that many assignments it doesn't get noticed. For instance, the \LUAMETATEX\
+%D manual does less than 6000 assignments and the payoff starts around a tenfold of
+%D that. But \unknown\ it's less tracing, so that's another benefit.
-\def\mult_interfaces_get_parameters_error#1#2% #3%
- {\mult_interfaces_get_parameters_error_indeed{#1}{#2}%
- \gobbleoneargument}
+%D Watch out: we accept that a \[k=v,,k=v] will generate a case where a key can become
+%D a comma and trigger a warning but we intercept that elsewhere. The alternative is
+%D to skip to the comma first which takes more time.
-\def\mult_interfaces_get_parameters_error_indeed#1#2%
- {\showassignerror{#2}{\the\inputlineno\space(#1)}}
+\let\m_mult_interfaces_namespace\empty
-\def\mult_interfaces_get_parameters_assign#1=#2=#3#4^^^^0004%
- {\ifx\empty#1\empty
- \expandafter\mult_interfaces_get_parameters_error
- \orelse\ifx#3\empty
- \expandafter\mult_interfaces_get_parameters_error
- \else
- \expandafter\mult_interfaces_adef % assignment def
- \fi
- \m_mult_interfaces_namespace{#1}{#2}%
- \doubleexpandafter\mult_interfaces_get_parameters_item}
+\def\mult_interfaces_get_parameters#1[%
+ {\def\m_mult_interfaces_namespace{#1}%
+ \futureexpandis]\gobbleoneargument\mult_interfaces_get_parameters_indeed}
-\startinterface english
+\def\mult_interfaces_get_parameters_indeed#1]%
+ {\mult_interfaces_get_parameters_item#1\ignorearguments\ignorearguments}
- % some 10% faster
+\def\mult_interfaces_get_parameters_item#*#1,%
+ {\ifarguments \else
+ \mult_interfaces_get_parameters_item_okay#1,\ignorearguments
+ \expandafter\mult_interfaces_get_parameters_item
+ \fi}
- \let\mult_interfaces_get_parameters_error\undefined
+\def\mult_interfaces_get_parameters_item_okay#1=#2,%
+ {\ifarguments
+ % done
+ \or
+ \mult_interfaces_get_parameters_item_error
+ \else
+ \mult_interfaces_adef\m_mult_interfaces_namespace{#1}{#2}%
+ \fi}
- \def\mult_interfaces_get_parameters_error_one#1\csname#2#3\endcsname#4%
- {\mult_interfaces_get_parameters_error_indeed{#2}{#3}\iftrue}
+\def\mult_interfaces_get_parameters_item_error#-#-#-#1#2%
+ {\if,#2\else\mult_interfaces_get_parameters_error_indeed{#1}{#2}\fi}
- \def\mult_interfaces_get_parameters_error_two#1\csname#2#3\endcsname#4%
- {\mult_interfaces_get_parameters_error_indeed{#2}{#3}}
+\startinterface english
- \def\mult_interfaces_get_parameters_assign#1=#2=#3#4^^^^0004%
- {\ifx\empty#1\empty
- \mult_interfaces_get_parameters_error_one
- \orelse\ifx#3\empty
- \mult_interfaces_get_parameters_error_two
+ \def\mult_interfaces_get_parameters_item_okay#1=#2,%
+ {\ifarguments
+ % done
+ \or
+ \mult_interfaces_get_parameters_item_error
\else
- \expandafter\def\csname\m_mult_interfaces_namespace#1\endcsname{#2}%
- \fi
- \doubleexpandafter\mult_interfaces_get_parameters_item}
+ \defcsname\m_mult_interfaces_namespace#1\endcsname{#2}%
+ \fi}
+
+ \def\mult_interfaces_get_parameters_item_error#-\defcsname#1#2\endcsname#-%
+ {\if,#2\else\mult_interfaces_get_parameters_error_indeed{#1}{#2}\fi}
\stopinterface
-\newif\ifassignment
+%D Used?
-\def\mult_check_for_assignment_indeed#1=#2#3^^^^0004%
- {\if#2^^^^0003\assignmentfalse\else\assignmenttrue\fi}
+\def\mult_check_for_assignment_indeed#-=#1#-^^^^0004%
+ {\if#1^^^^0003\assignmentfalse\else\assignmenttrue\fi}
-\def\mult_check_for_assignment_indeed_begin_#1=#2#3^^^^0004%
- {\if#2^^^^0003}
+\def\mult_check_for_assignment_indeed_begin_#-=#1#-^^^^0004%
+ {\if#1^^^^0003}
\def\mult_check_for_assignment#1%
{\expandafter\mult_check_for_assignment_indeed\detokenize{#1}=^^^^0003^^^^0003^^^^0004}
-% End of experimental code.
+%D Beware, zero arguments is an assignment!
+
+\def\mult_aux_no_assignment_indeed#1=#2]{\ifcase\ifarguments\plusone\or\zerocount\else\plusone\fi}
+\def\mult_aux_no_assignment#1]{\mult_aux_no_assignment_indeed#1\ignorearguments\relax}
%D This can give wrong results when we pass e.g. \type{\c!format}, so either we need
%D to use the \type {\k!} ones, but these are not defined in the english interface
@@ -166,28 +237,21 @@
%D and that only the high level setup commands are used with language specific
%D interfaces.
-% \unexpanded\def\mult_interfaces_let #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_lete#1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
-% \unexpanded\def\mult_interfaces_def #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_edef#1#2{\expandafter\edef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_gdef#1#2{\expandafter\gdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-% \unexpanded\def\mult_interfaces_xdef#1#2{\expandafter\xdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
-
% \startinterface english
- \unexpanded\def\mult_interfaces_let #1#2{\expandafter \let\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_lete#1#2{\expandafter \let\csname#1#2\endcsname\empty}
- \unexpanded\def\mult_interfaces_def #1#2{\expandafter \def\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_edef#1#2{\expandafter\edef\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_gdef#1#2{\expandafter\gdef\csname#1#2\endcsname}
- \unexpanded\def\mult_interfaces_xdef#1#2{\expandafter\xdef\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_let #1#2{\letcsname#1#2\endcsname}
+ \protected\def\mult_interfaces_lete#1#2{\letcsname#1#2\endcsname\empty}
+ \protected\def\mult_interfaces_def #1#2{\defcsname#1#2\endcsname}
+ \protected\def\mult_interfaces_edef#1#2{\edefcsname#1#2\endcsname}
+ \protected\def\mult_interfaces_gdef#1#2{\gdefcsname#1#2\endcsname}
+ \protected\def\mult_interfaces_xdef#1#2{\xdefcsname#1#2\endcsname}
% \stopinterface
%D Do, we only interface the assignment definition:
-\unexpanded\def\mult_interfaces_adef#1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\protected\def\mult_interfaces_adef#1#2{\defcsname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
\startinterface english
- \unexpanded\def\mult_interfaces_adef#1#2{\expandafter \def\csname#1#2\endcsname}
+ \protected\def\mult_interfaces_adef#1#2{\defcsname#1#2\endcsname}
\stopinterface
% the commented detokenized variant that backtracks ... needs testing usage first
@@ -206,55 +270,53 @@
\def\mult_interfaces_detokenize{\expandafter\expandafter\expandafter\detokenize\expandafter\expandafter\expandafter}
-\unexpanded\def\mult_interfaces_install_parameter_handler#1#2#3#4#5#6#7#8#9% inlining \csname*\endcsname is more efficient (#3 and #6 only)
- {\ifx#2\relax\let#2\empty\fi % it is hardly faster but produces less expansion tracing
- \def#3##1{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}%
- \def#4##1##2{\ifcsname##1:##2\endcsname##1:##2\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
- %\def#5##1##2{\ifx##1\relax\??empty\else#4{##1}{##2}\fi}% is {} needed around ##1 ?
- %\def#5##1##2{\ifx##1\relax\??empty\else#4##1{##2}\fi}% is {} needed around ##1 ?
- \def#5##1##2{\ifx##1\relax^^^^0019\else#4##1{##2}\fi}% is {} needed around ##1 ?
- \def#6##1##2{\csname\ifcsname#1##1:##2\endcsname#1##1:##2\else\expandafter#5\csname#1##1:\s!parent\endcsname{##2}\fi\endcsname}%
- \def#7##1{\detokenize\expandafter\expandafter\expandafter{\csname#1#2:##1\endcsname}}% always root, no backtrack
- \def#8##1{\begincsname#1#2:##1\endcsname}
- \def#9##1##2{\expandafter\let\expandafter##1\csname\ifcsname#1#2:##2\endcsname#1#2:##2\else\expandafter#5\csname#1#2:\s!parent\endcsname{##2}\fi\endcsname}}
-
-\unexpanded\def\installparameterhandler#1#2%
- {\normalexpanded
+\protected\def\mult_interfaces_install_parameter_handler#1#2#3#4#5#6#7#8#9%
+ {\frozen\def#3##1{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}%
+ \frozen\def#4##1##2{\ifcsname##1:##2\endcsname##1:##2\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
+ \frozen\edef#5##1##2{\noexpand\ifrelax##1\??empty\noexpand\else\noexpand#4##1{##2}\noexpand\fi}% is {} needed around ##1 ?
+ \frozen\def#6##1##2{\csname\ifcsname#1##1:##2\endcsname#1##1:##2\else\expandafter#5\csname#1##1:\s!parent\endcsname{##2}\fi\endcsname}%
+ \frozen\def#7##1{\detokenize\expandafter\expandafter\expandafter{\csname#1#2:##1\endcsname}}% always root, no backtrack
+ \frozen\def#8##1{\begincsname#1#2:##1\endcsname}%
+ % TODO
+ \frozen\def#9##1##2{\expandafter\let\expandafter##1\csname\ifcsname#1#2:##2\endcsname#1#2:##2\else\expandafter#5\csname#1#2:\s!parent\endcsname{##2}\fi\endcsname}}
+
+\permanent\protected\def\installparameterhandler#1#2%
+ {\mutable\letcsname current#2\endcsname\empty
+ \normalexpanded
{\mult_interfaces_install_parameter_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname current#2\endcsname
\expandafter\noexpand\csname #2parameter\endcsname
- \expandafter\noexpand\csname do#2parameter\endcsname % or : #2_parameter
- \expandafter\noexpand\csname do#2parentparameter\endcsname % or : #2_parent_parameter
+ \expandafter\noexpand\csname do#2parameter\endcsname % or: #2_parameter
+ \expandafter\noexpand\csname do#2parentparameter\endcsname % or: #2_parent_parameter
\expandafter\noexpand\csname named#2parameter\endcsname
\expandafter\noexpand\csname detokenized#2parameter\endcsname
\expandafter\noexpand\csname direct#2parameter\endcsname
\expandafter\noexpand\csname letfrom#2parameter\endcsname}} % strict#2parameter is gone
-\unexpanded\def\mult_interfaces_install_root_parameter_handler#1#2#3%
- {\def#2##1{\detokenize\expandafter\expandafter\expandafter{\csname#1:##1\endcsname}}% always root
- \def#3##1{\begincsname#1:##1\endcsname}}
+\protected\def\mult_interfaces_install_root_parameter_handler#1#2#3%
+ {\frozen\def#2##1{\detokenize\expandafter\expandafter\expandafter{\csname#1:##1\endcsname}}% always root
+ \frozen\def#3##1{\begincsname#1:##1\endcsname}}
-\unexpanded\def\installrootparameterhandler#1#2%
+\permanent\protected\def\installrootparameterhandler#1#2%
{\normalexpanded
{\mult_interfaces_install_root_parameter_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname detokenizedroot#2parameter\endcsname
\expandafter\noexpand\csname root#2parameter\endcsname}}
-\unexpanded\def\mult_interfaces_install_parameter_hash_handler#1#2#3#4#5#6#7#8#9%
- {\ifx#2\relax\let#2\empty\fi
- \def#3##1{#1#4{#1#2}{##1}:}% leading #1 was missing .. is this one used?
- \def#4##1##2{\ifcsname##1:##2\endcsname##1\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
- %\def#5##1##2{\ifx##1\relax\else#4{##1}{##2}\fi}%
- \def#5##1##2{\ifx##1\relax\else#4##1{##2}\fi}%
- \def#6{#1#2:}%
- \def#7##1{#1##1:}%
- \def#8{\ifx#2\empty\orelse\ifcsname#1#2:\s!parent\endcsname\else\expandafter\let\csname#1#2:\s!parent\endcsname#1\fi}%
- \unexpanded\def#9##1{\expandafter\edef\csname#1##1:\s!parent\endcsname{#1#2}}}
-
-\unexpanded\def\installparameterhashhandler#1#2%
- {\expandafter\let\csname#2namespace\endcsname#1%
+\protected\def\mult_interfaces_install_parameter_hash_handler#1#2#3#4#5#6#7#8#9%
+ {\frozen\def#3##1{#1#4{#1#2}{##1}:}% leading #1 was missing .. is this one used?
+ \frozen\def#4##1##2{\ifcsname##1:##2\endcsname##1\else\expandafter#5\csname##1:\s!parent\endcsname{##2}\fi}%
+ \frozen\def#5##1##2{\ifrelax##1\else#4##1{##2}\fi}%
+ \frozen\def#6{#1#2:}%
+ \frozen\def#7##1{#1##1:}%
+ \frozen\def#8{\ifempty#2\orelse\ifcsname#1#2:\s!parent\endcsname\else\letcsname#1#2:\s!parent\endcsname#1\fi}%
+ \frozen\protected\def#9##1{\edefcsname#1##1:\s!parent\endcsname{#1#2}}}
+
+\permanent\protected\def\installparameterhashhandler#1#2%
+ {\mutable\letcsname current#2\endcsname\empty
+ \immutable\letcsname#2namespace\endcsname#1%
\normalexpanded
{\mult_interfaces_install_parameter_hash_handler
{\noexpand#1}% \??aa
@@ -271,24 +333,17 @@
% todo: inline the def/let
-% \unexpanded\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
-% {\ifx#2\relax\let#2\empty\fi
-% \unexpanded\def#3{\mult_interfaces_def {#1#2:}}% ##1 {##2} (braces are mandate)
-% \unexpanded\def#4{\mult_interfaces_edef{#1#2:}}% ##1 {##2} (braces are mandate)
-% \unexpanded\def#5{\mult_interfaces_let {#1#2:}}% ##1 ##2
-% \unexpanded\def#6{\mult_interfaces_lete{#1#2:}}}% ##1
-%
% \startinterface english
- \unexpanded\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
- {\ifx#2\relax\let#2\empty\fi
- \unexpanded\def#3##1{\expandafter \def\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
- \unexpanded\def#4##1{\expandafter\edef\csname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
- \unexpanded\def#5##1{\expandafter \let\csname#1#2:##1\endcsname}% ##1 ##2
- \unexpanded\def#6##1{\expandafter \let\csname#1#2:##1\endcsname\empty}}% ##1
+ \protected\def\mult_interfaces_install_parameter_set_handler#1#2#3#4#5#6%
+ {\frozen\protected\def#3##1{\defcsname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
+ \frozen\protected\def#4##1{\edefcsname#1#2:##1\endcsname}% ##1 {##2} (braces are mandate)
+ \frozen\protected\def#5##1{\letcsname#1#2:##1\endcsname}% ##1 ##2
+ \frozen\protected\def#6##1{\letcsname#1#2:##1\endcsname\empty}}% ##1
% \stopinterface
-\unexpanded\def\installparametersethandler#1#2%
- {\normalexpanded
+\permanent\protected\def\installparametersethandler#1#2%
+ {\mutable\letcsname current#2\endcsname\empty
+ \normalexpanded
{\mult_interfaces_install_parameter_set_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname current#2\endcsname
@@ -297,26 +352,26 @@
\expandafter\noexpand\csname let#2parameter\endcsname
\expandafter\noexpand\csname reset#2parameter\endcsname}}
-\let\dousecurrentstyleparameter\relax
-\let\dousecurrentcolorparameter\relax
+\mutable\let\dousecurrentstyleparameter\relax
+\mutable\let\dousecurrentcolorparameter\relax
-\let\currentstyleparameter\empty
-\let\currentcolorparameter\empty
+\mutable\let\currentstyleparameter\empty
+\mutable\let\currentcolorparameter\empty
-\unexpanded\def\mult_interfaces_install_style_and_color_handler#1#2#3#4%
- {\unexpanded\def#2##1##2% style color
+\protected\def\mult_interfaces_install_style_and_color_handler#1#2#3#4%
+ {\frozen\protected\def#2##1##2% style color
{\edef\currentstyleparameter{#1{##1}}% this name is public (can also set color e.g. in underline)
- \ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi
+ \ifempty\currentstyleparameter\else\dousecurrentstyleparameter\fi
\edef\currentcolorparameter{#1{##2}}% this name is public (so we do this after the style switch)
- \ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}%
- \unexpanded\def#3##1% style
+ \ifempty\currentcolorparameter\else\dousecurrentcolorparameter\fi}%
+ \frozen\protected\def#3##1% style
{\edef\currentstyleparameter{#1{##1}}% this name is public
- \ifx\currentstyleparameter\empty\else\dousecurrentstyleparameter\fi}%
- \unexpanded\def#4##1% color
+ \ifempty\currentstyleparameter\else\dousecurrentstyleparameter\fi}%
+ \frozen\protected\def#4##1% color
{\edef\currentcolorparameter{#1{##1}}% this name is public
- \ifx\currentcolorparameter\empty\else\dousecurrentcolorparameter\fi}}
+ \ifempty\currentcolorparameter\else\dousecurrentcolorparameter\fi}}
-\unexpanded\def\installstyleandcolorhandler#1#2%
+\permanent\protected\def\installstyleandcolorhandler#1#2%
{\normalexpanded
{\mult_interfaces_install_style_and_color_handler
\expandafter\noexpand\csname #2parameter\endcsname
@@ -324,150 +379,140 @@
\expandafter\noexpand\csname use#2styleparameter\endcsname
\expandafter\noexpand\csname use#2colorparameter\endcsname}}
-\let\definehandlerparent\empty
-
-% \def\mult_check_for_parent#1#2#3#4%
-% {\ifcsname#1#4:\s!parent\endcsname \else \ifx#4\empty \else
-% \writestatus\m!system{error: invalid parent #4 for #3, #4 defined too (best check it)}%
-% \expandafter\edef\csname#1#4:\s!parent\endcsname{#2}%
-% \fi \fi}
-
\def\mult_check_for_parent#1#2#3#4%
{\ifcsname#1#4:\s!parent\endcsname\orelse\ifx#4\empty\else
\writestatus\m!system{error: invalid parent #4 for #3, #4 defined too (best check it)}%
- \expandafter\edef\csname#1#4:\s!parent\endcsname{#2}%
+ \edefcsname#1#4:\s!parent\endcsname{#2}%
\fi}
-%def\mult_interfaces_chain#1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\space\fi}
-%def\getparentchain #1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\fi}
-%def\getcurrentparentchain#1#2{\ifcsname#1#2:\s!chain\endcsname\csname#1#2:\s!chain\endcsname\fi}
+ \def\mult_interfaces_chain#1#2{\ifcsname#1#2:\s!chain\endcsname\lastnamedcs\space\fi}
+\permanent\def\getparentchain #1#2{\begincsname#1#2:\s!chain\endcsname}
+\permanent\def\getcurrentparentchain#1#2{\begincsname#1#2:\s!chain\endcsname}
-\def\mult_interfaces_chain#1#2{\ifcsname#1#2:\s!chain\endcsname\lastnamedcs\space\fi}
-\def\getparentchain #1#2{\begincsname#1#2:\s!chain\endcsname}
-\def\getcurrentparentchain#1#2{\begincsname#1#2:\s!chain\endcsname}
+% we could have a \setcurrent... macro and then always make them a frozen
+% but it might have a little impact on performance ... something to leave
+% to when we're done with the transition (it's kind of massive)
-\unexpanded\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% why is \expanded still needed in clones
- {\ifx#4\relax\let#4\empty\fi % see \defineregister
- \unexpanded\def#2{\dotripleempty#5}%
+\protected\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8% why is \expanded still needed in clones
+ {\newtoks#5%
\newtoks#6%
- \newtoks#7%
- \unexpanded\def#5[##1][##2][##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child]
- {\let#9#4%
- \edef#4{##1}%
- \ifthirdargument
- \the#6% predefine
- \edef#8{##2}%
- \mult_check_for_parent{#1}{#3}#4#8%
- \expandafter\edef\csname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}%
- \expandafter\edef\csname#1#4:\s!parent\endcsname{#1##2}%
- \mult_interfaces_get_parameters{#1#4:}[##3]%
- \orelse\ifsecondargument
- \the#6% predefine
- \ifcondition\expandafter\mult_check_for_assignment_indeed_begin_\detokenize{##2}=^^^^0003^^^^0003^^^^0004%
- \edef#8{##2}%
- \mult_check_for_parent{#1}{#3}#4#8%
- \expandafter\edef\csname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}%
- \expandafter\edef\csname#1#4:\s!parent\endcsname{#1##2}%
- \else
- \let#8\empty
- \expandafter\edef\csname#1#4:\s!chain\endcsname{##1}%
- \expandafter\edef\csname#1#4:\s!parent\endcsname{#3}%
+ \frozen\tolerant\protected\def#2[##1]##*[##2]##*[##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child]
+ {\let#8#4%
+ % watch out: no \edef#4{##1} before the ifarguments because #1 can have macros
+ \ifarguments
+ \let#4\empty
+ \the#5% predefine
+ \let#7\empty
+ \letcsname#1#4:\s!chain\endcsname\empty
+ \edefcsname#1#4:\s!parent\endcsname{#3}%
+ \or
+ \edef#4{##1}%
+ \the#5% predefine
+ \let#7\empty
+ \edefcsname#1#4:\s!chain\endcsname{##1}%
+ \edefcsname#1#4:\s!parent\endcsname{#3}%
+ \or
+ \edef#4{##1}%
+ \the#5% predefine
+ \relax
+ \ifhastok={##2}%
+ \let#7\empty
+ \edefcsname#1#4:\s!chain\endcsname{##1}%
+ \edefcsname#1#4:\s!parent\endcsname{#3}%
\mult_interfaces_get_parameters{#1#4:}[##2]%
+ \else
+ \edef#7{##2}%
+ \ifempty#7%
+ \edefcsname#1#4:\s!chain\endcsname{##1}%
+ \edefcsname#1#4:\s!parent\endcsname{#3}%
+ \else
+ \mult_check_for_parent{#1}{#3}#4#7%
+ \edefcsname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}%
+ \edefcsname#1#4:\s!parent\endcsname{#1##2}%
+ \fi
\fi
- \else
- \the#6% predefine
- \let#8\empty
- \expandafter\edef\csname#1#4:\s!chain\endcsname{##1}%
- \expandafter\edef\csname#1#4:\s!parent\endcsname{#3}%
+ \or
+ \edef#4{##1}%
+ \the#5% predefine
+ \edef#7{##2}%
+ \mult_check_for_parent{#1}{#3}#4#7%
+ \edefcsname#1#4:\s!chain\endcsname{\mult_interfaces_chain#1{##2}##1}%
+ \edefcsname#1#4:\s!parent\endcsname{#1##2}%
+ \mult_interfaces_get_parameters{#1#4:}[##3]%
\fi
- \the#7%
- \let#4#9}}
+ \the#6%
+ \let#4#8}}
-\unexpanded\def\installdefinehandler#1#2#3%
- {\normalexpanded
+\permanent\protected\def\installdefinehandler#1#2#3%
+ {\mutable\letcsname current#2\endcsname\empty
+ \mutable\letcsname current#2parent\endcsname\empty
+ \normalexpanded
{\mult_interfaces_install_define_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname define#2\endcsname
{\noexpand#3}% root
\expandafter\noexpand\csname current#2\endcsname
- \expandafter\noexpand\csname define_#2\endcsname % semi-public
\expandafter\noexpand\csname everypreset#2\endcsname
\expandafter\noexpand\csname everydefine#2\endcsname
\expandafter\noexpand\csname current#2parent\endcsname
\expandafter\noexpand\csname saved_defined_#2\endcsname}}
-\unexpanded\def\mult_interfaces_install_setup_handler#1#2#3#4#5#6#7#8#9%
- {\ifx#3\relax\let#3\empty\fi
- \unexpanded\def#2{\dodoubleempty#4}%
- \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
- \newtoks#5%
- \newtoks#8%
- \unexpanded\def#4[##1][##2]% maybe helper
- {\let#7#3%
- \ifsecondargument
- \def#9####1% we will have a simple one as well
+\protected\def\mult_interfaces_install_setup_handler#1#2#3#4#5#6#7#8%
+ {\newtoks#4%
+ \newtoks#7%
+ \frozen\protected\def#5{\mult_interfaces_get_parameters{#1#3:}}% no every ! don't change it
+ \frozen\tolerant\protected\def#2[##1]##*[##2]% maybe helper
+ {\let#6#3%
+ \ifnum\lastarguments=\plustwo
+ \def#8####1% we will have a simple one as well
{\edef#3{####1}%
\mult_interfaces_get_parameters{#1#3:}[##2]%
- \the#5}%
- \processcommalist[##1]#9%
+ \the#4}%
+ \processcommalist[##1]#8%
\else
\let#3\empty
\mult_interfaces_get_parameters{#1:}[##1]%
- \the#5%
+ \the#4%
\fi
- \let#3#7%
- \the#8}}
+ \let#3#6%
+ \the#7}}
-\unexpanded\def\installsetuphandler#1#2%
- {\normalexpanded
+\permanent\protected\def\installsetuphandler#1#2%
+ {\mutable\letcsname current#2\endcsname\empty
+ \normalexpanded
{\mult_interfaces_install_setup_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname current#2\endcsname
- \expandafter\noexpand\csname setup_#2\endcsname % semi-public
\expandafter\noexpand\csname everysetup#2\endcsname
\expandafter\noexpand\csname setupcurrent#2\endcsname
\expandafter\noexpand\csname saved_setup_current#2\endcsname
\expandafter\noexpand\csname everysetup#2root\endcsname
\expandafter\noexpand\csname nested_setup_current#2\endcsname}}
-\let\doingrootsetupnamed\plusone % \setuplayout[name][key=value]
-\let\doingrootsetuproot \plustwo % \setuplayout [key=value]
-\let\doingrootsetnamed \plusthree % \setuplayout[name]
-\let\doingrootsetroot \plusfour % \setuplayout
+\aliased\let\doingrootsetupnamed\plusone % \setuplayout[name][key=value]
+\aliased\let\doingrootsetuproot \plustwo % \setuplayout [key=value]
+\aliased\let\doingrootsetnamed \plusthree % \setuplayout[name]
+\aliased\let\doingrootsetroot \plusfour % \setuplayout
-\unexpanded\def\mult_interfaces_install_switch_setup_handler_a#1#2#3#4#5%
- {\ifx#3\relax\let#3\empty\fi
- \unexpanded\def#2{\dodoubleempty#4}%
- \unexpanded\def#5{\mult_interfaces_get_parameters{#1#3:}}}
+\protected\def\mult_interfaces_install_switch_setup_handler_a#1#2#3%
+ {\frozen\protected\def#3{\mult_interfaces_get_parameters{#1#2:}}}
-\unexpanded\def\mult_interfaces_install_switch_setup_handler_b#1#2#3#4#5#6#7#8#9%
+\protected\def\mult_interfaces_install_switch_setup_handler_b#1#2#3#4#5#6#7#8#9%
{\newtoks#5%
\newconstant#2%
\newtoks#8%
\newtoks#9%
- \ifx#6\relax\let#6\empty\fi
- \unexpanded\def#4[##1][##2]% maybe helper
- {\ifsecondargument % no commalist here
- % \setuplayout[whatever][key=value]
- \let#7#3%
- \let#6#3%
- \edef#3{##1}%
- #2\doingrootsetupnamed
- \mult_interfaces_get_parameters{#1#3:}[##2]%
+ \frozen\tolerant\protected\def#4[##1]##*[##2]% maybe helper
+ {\ifarguments
+ % \setuplayout
+ \let#6#3% % previous becomes current
+ \let#3\empty % current becomes empty
+ #2\doingrootsetroot
\the#5%
- \ifx#3#6\the#8\fi % only switchsetups if previous == current
- \let#3#7%
- \orelse\iffirstargument
- % \mult_check_for_assignment{##1}%
- \ifcondition\expandafter\mult_check_for_assignment_indeed_begin_\detokenize{##1}=^^^^0003^^^^0003^^^^0004%
- % \setuplayout[whatever]
- \let#6#3% % previous becomes current
- \edef#3{##1}% this will catch reset so one needs to test for it
- #2\doingrootsetnamed
- \the#5% % we can check for previous vs current
- \the#8% switchsetups
- \else
+ \the#8% switchsetups
+ \or
+ \ifhastok={##1}%
% \setuplayout[key=value]
\let#7#3%
\let#6#3%
@@ -477,112 +522,131 @@
\the#5%
\the#8% switchsetups
\let#3#7%
+ \else
+ % \setuplayout[whatever]
+ \let#6#3% % previous becomes current
+ \edef#3{##1}% this will catch reset so one needs to test for it
+ \ifempty#3%
+ \let#7#6%
+ #2\doingrootsetuproot
+ \the#5%
+ \the#8% switchsetups
+ \let#3#7%
+ \else
+ #2\doingrootsetnamed
+ \the#5% % we can check for previous vs current
+ \the#8% switchsetups
+ \fi
\fi
- \else
- % \setuplayout
- \let#6#3% % previous becomes current
- \let#3\empty % current becomes empty
- #2\doingrootsetroot
+ \or
+ % \setuplayout[whatever][key=value]
+ \let#7#3%
+ \let#6#3%
+ \edef#3{##1}%
+ #2\doingrootsetupnamed
+ \mult_interfaces_get_parameters{#1#3:}[##2]%
\the#5%
- \the#8% switchsetups
+ \ifx#3#6\the#8\fi % only switchsetups if previous == current
+ \let#3#7%
\fi
#2\zerocount % mode is always zero at the end
\the#9}}
-\unexpanded\def\installswitchsetuphandler#1#2%
- {\normalexpanded
+\permanent\protected\def\installswitchsetuphandler#1#2%
+ {\mutable\letcsname current#2\endcsname\empty
+ \mutable\letcsname previous#2\endcsname\empty
+ \normalexpanded
{\mult_interfaces_install_switch_setup_handler_a
{\noexpand#1}% \??aa
- \expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname current#2\endcsname
- \expandafter\noexpand\csname setup_#2\endcsname % semi-public
\expandafter\noexpand\csname setupcurrent#2\endcsname
\mult_interfaces_install_switch_setup_handler_b
{\noexpand#1}% \??aa
\expandafter\noexpand\csname #2setupmode\endcsname
\expandafter\noexpand\csname current#2\endcsname
- \expandafter\noexpand\csname setup_#2\endcsname % semi-public
+ \expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname everysetup#2\endcsname
\expandafter\noexpand\csname previous#2\endcsname
\expandafter\noexpand\csname saved_setup_current#2\endcsname
\expandafter\noexpand\csname everyswitch#2\endcsname
\expandafter\noexpand\csname everysetup#2root\endcsname}}
-\unexpanded\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8#9%
- {\ifx#3\relax\let#3\empty\fi
- \unexpanded\def#2{\dotripleempty#4}%
- \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}%
- \newtoks#5%
- \def#4[##1][##2][##3]%
- {\let#8#3%
- \ifthirdargument
- \def#9####1%
- {\edef#3{####1}%
- \expandafter\def\csname#1#3:\s!parent\endcsname{#1##2}%
- \mult_interfaces_get_parameters{#1#3:}[##3]% always sets parent
- \the#5}%
- \processcommalist[##1]#9%
- \orelse\ifsecondargument
- \def#9####1%
- {\edef#3{####1}%
- #7% checks parent and sets if needed
- \mult_interfaces_get_parameters{#1#3:}[##2]%
- \the#5}%
- \processcommalist[##1]#9%
- \else
+\protected\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8%
+ {\newtoks#4%
+ \frozen\protected\def#5{\mult_interfaces_get_parameters{#1#3:}}%
+ \frozen\tolerant\protected\def#2[##1]##*[##2]##*[##3]%
+ {\let#7#3%
+ \ifarguments
\let#3\empty
- \mult_interfaces_get_parameters{#1:}[##1]%
\the#5%
+ \or
+ \let#3\empty
+ \mult_interfaces_get_parameters{#1:}[##1]%
+ \the#4%
+ \or
+ \def#8####1%
+ {\edef#3{####1}%
+ #6% checks parent and sets if needed
+ \mult_interfaces_get_parameters{#1#3:}[##2]%
+ \the#4}%
+ \processcommalist[##1]#8%
+ \or
+ \def#8####1%
+ {\edef#3{####1}%
+ \defcsname#1#3:\s!parent\endcsname{#1##2}%
+ \mult_interfaces_get_parameters{#1#3:}[##3]% always sets parent
+ \the#4}%
+ \processcommalist[##1]#8%
\fi
- \let#3#8}}
+ \let#3#7}}
-\unexpanded\def\installautosetuphandler#1#2%
- {\normalexpanded
+\permanent\protected\def\installautosetuphandler#1#2%
+ {\mutable\letcsname current#2\endcsname\empty
+ \normalexpanded
{\mult_interfaces_install_auto_setup_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname setup#2\endcsname
\expandafter\noexpand\csname current#2\endcsname
- \expandafter\noexpand\csname setup_#2\endcsname % semi-public
\expandafter\noexpand\csname everysetup#2\endcsname
\expandafter\noexpand\csname setupcurrent#2\endcsname
\expandafter\noexpand\csname check#2parent\endcsname
\expandafter\noexpand\csname saved_setup_current#2\endcsname
\expandafter\noexpand\csname nested_setup_current#2\endcsname}}
-\unexpanded\def\installbasicparameterhandler#1#2%
+\permanent\protected\def\installbasicparameterhandler#1#2%
{\installparameterhandler {#1}{#2}%
\installparameterhashhandler{#1}{#2}%
\installparametersethandler {#1}{#2}%
\installrootparameterhandler{#1}{#2}}
-\unexpanded\def\installbasicautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
+\permanent\protected\def\installbasicautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installautosetuphandler {#1}{#2}}
-\unexpanded\def\installstylisticautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
+\permanent\protected\def\installstylisticautosetuphandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installautosetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installcommandhandler#1#2#3% \??self name \??parent (can be \??self)
+\permanent\protected\def\installcommandhandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installdefinehandler {#1}{#2}{#3}%
\installsetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installswitchcommandhandler#1#2#3% \??self name \??parent (can be \??self)
+\permanent\protected\def\installswitchcommandhandler#1#2#3% \??self name \??parent (can be \??self)
{\installbasicparameterhandler{#1}{#2}%
\installdefinehandler {#1}{#2}{#3}%
\installswitchsetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installautocommandhandler#1#2#3% automatically defined cloned setups
+\permanent\protected\def\installautocommandhandler#1#2#3% automatically defined cloned setups
{\installbasicparameterhandler{#1}{#2}%
\installdefinehandler {#1}{#2}{#3}%
\installautosetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
-\unexpanded\def\installsimplecommandhandler#1#2#3% no define (experiment) - use \check*parent when defining
+\permanent\protected\def\installsimplecommandhandler#1#2#3% no define (experiment) - use \check*parent when defining
{\installbasicparameterhandler{#1}{#2}%
\installsetuphandler {#1}{#2}%
\installstyleandcolorhandler {#1}{#2}}
@@ -598,15 +662,14 @@
%D We don't need colons for such simple cases.
-\unexpanded\def\mult_interfaces_install_direct_parameter_handler#1#2#3#4#5%
-%%{\def#3##1{\csname\ifcsname#1##1\endcsname#1##1\else\s!empty\fi\endcsname}%
- {\def#3##1{\begincsname#1##1\endcsname}%
- \def#4##1{\detokenize\expandafter\expandafter\expandafter{\csname#1##1\endcsname}}%
- % \def#4##1{\mult_interfaces_detokenize{\csname\ifcsname#1#2:##1\endcsname#1#2:##1\else\expandafter#5\csname#1#2:\s!parent\endcsname{##1}\fi\endcsname}}%
- \def#5##1{\begincsname#1##1\endcsname}}
+\protected\def\mult_interfaces_install_direct_parameter_handler#1#2#3#4#5%
+ {\frozen\def#3##1{\begincsname#1##1\endcsname}%
+ \frozen\def#4##1{\detokenize\expandafter\expandafter\expandafter{\csname#1##1\endcsname}}%
+ \frozen\def#5##1{\begincsname#1##1\endcsname}}
-\unexpanded\def\installdirectparameterhandler#1#2%
- {\normalexpanded
+\permanent\protected\def\installdirectparameterhandler#1#2%
+ {\mutable\letcsname current#2\endcsname\empty
+ \normalexpanded
{\mult_interfaces_install_direct_parameter_handler
{\noexpand#1}%
\expandafter\noexpand\csname current#2\endcsname
@@ -614,36 +677,28 @@
\expandafter\noexpand\csname detokenized#2parameter\endcsname
\expandafter\noexpand\csname direct#2parameter\endcsname}}
-\unexpanded\def\mult_interfaces_install_direct_setup_handler#1#2#3#4#5%
- {\unexpanded\def#2{\dosingleempty#3}%
- \newtoks#5%
- \def#3[##1]{\mult_interfaces_get_parameters#1[##1]\the#5}%
- \def#4{\mult_interfaces_get_parameters#1}}
+\protected\def\mult_interfaces_install_direct_setup_handler#1#2#3#4%
+ {\newtoks#4%
+ \frozen\protected\def#2[##1]{\ifarguments\or\mult_interfaces_get_parameters#1[##1]\fi\the#4}%
+ \frozen\def#3{\mult_interfaces_get_parameters#1}}
-\unexpanded\def\installdirectsetuphandler#1#2%
+\permanent\protected\def\installdirectsetuphandler#1#2%
{\normalexpanded
{\mult_interfaces_install_direct_setup_handler
{\noexpand#1}% \??aa
\expandafter\noexpand\csname setup#2\endcsname
- \expandafter\noexpand\csname setup_#2\endcsname % semi-public
\expandafter\noexpand\csname setupcurrent#2\endcsname % no \every (we use 'current' for consistency)
\expandafter\noexpand\csname everysetup#2\endcsname}}
-% \unexpanded\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
-% {\unexpanded\def#2{\mult_interfaces_def #1}%
-% \unexpanded\def#3{\mult_interfaces_edef#1}%
-% \unexpanded\def#4{\mult_interfaces_let #1}%
-% \unexpanded\def#5{\mult_interfaces_let #1\empty}}%
-
% \startinterface english
- \unexpanded\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
- {\unexpanded\def#2##1{\expandafter \def\csname#1##1\endcsname}%
- \unexpanded\def#3##1{\expandafter\edef\csname#1##1\endcsname}%
- \unexpanded\def#4##1{\expandafter \let\csname#1##1\endcsname}%
- \unexpanded\def#5##1{\expandafter \let\csname#1##1\endcsname\empty}}%
+ \protected\def\mult_interfaces_install_direct_parameter_set_handler#1#2#3#4#5%
+ {\frozen\protected\def#2##1{\defcsname#1##1\endcsname}%
+ \frozen\protected\def#3##1{\edefcsname#1##1\endcsname}%
+ \frozen\protected\def#4##1{\letcsname#1##1\endcsname}%
+ \frozen\protected\def#5##1{\letcsname#1##1\endcsname\empty}}%
% \stopinterface
-\unexpanded\def\installdirectparametersethandler#1#2%
+\permanent\protected\def\installdirectparametersethandler#1#2%
{\normalexpanded
{\mult_interfaces_install_direct_parameter_set_handler
{\noexpand#1}% \??aa
@@ -652,18 +707,18 @@
\expandafter\noexpand\csname let#2parameter\endcsname
\expandafter\noexpand\csname reset#2parameter\endcsname}}
-\let\installdirectstyleandcolorhandler\installstyleandcolorhandler
+\aliased\let\installdirectstyleandcolorhandler\installstyleandcolorhandler
-\unexpanded\def\installdirectcommandhandler#1#2%
+\permanent\protected\def\installdirectcommandhandler#1#2%
{\installdirectparameterhandler {#1}{#2}%
\installdirectsetuphandler {#1}{#2}%
\installdirectparametersethandler {#1}{#2}%
\installdirectstyleandcolorhandler{#1}{#2}}
-\unexpanded\def\installsetuponlycommandhandler#1#2%
- {\installdirectparameterhandler{#1}{#2}%
- \installdirectsetuphandler {#1}{#2}%
- }% maybe \installdirectparametersethandler {#1}{#2}%
+\permanent\protected\def\installsetuponlycommandhandler#1#2%
+ {\installdirectparameterhandler {#1}{#2}%
+ \installdirectsetuphandler {#1}{#2}%
+ \installdirectparametersethandler{#1}{#2}}
% Experiment:
@@ -688,64 +743,52 @@
% yes:\twoparameter{alpha}\par
% yes:\twoparameter{beta}\par
-\unexpanded\def\relateparameterhandlers#1#2#3#4% {from} {instance} {to} {instance}
- {\expandafter\edef\csname\csname#1namespace\endcsname#2:\s!parent\endcsname{\csname#3namespace\endcsname#4}}
+\permanent\protected\def\relateparameterhandlers#1#2#3#4% {from} {instance} {to} {instance}
+ {\immutable\edefcsname\csname#1namespace\endcsname#2:\s!parent\endcsname{\csname#3namespace\endcsname#4}}
-\unexpanded\def\relateparameterhandlersbyns#1#2#3#4% {from} {instance} {to} {instance}
- {\expandafter\edef\csname#1#2:\s!parent\endcsname{#3#4}}
+\permanent\protected\def\relateparameterhandlersbyns#1#2#3#4% {from} {instance} {to} {instance}
+ {\edefcsname#1#2:\s!parent\endcsname{#3#4}}
%D Here is another experiment:
-\unexpanded\def\installactionhandler#1%
- {\normalexpanded
- {\mult_interfaces_install_action_handler
- {#1}%
- \expandafter\noexpand\csname current#1\endcsname
- \expandafter\noexpand\csname setupcurrent#1\endcsname
- \expandafter\noexpand\csname #1_action\endcsname}}
-
-% \unexpanded\def\mult_interfaces_install_action_handler#1#2#3#4%
-% {\unexpanded\expandafter\def\csname#1\endcsname{\dodoubleempty#4}%
-% \unexpanded\def#4[##1][##2]%
-% {\begingroup
-% \ifsecondargument
-% \edef#2{##1}%
-% #3[##2]%
-% \else\iffirstargument
-% \doifelseassignment{##1}
-% {\let#2\empty
-% #3[##1]}%
-% {\edef#2{##1}}%
-% \else
-% \let#2\empty
-% \fi\fi
-% \directsetup{handler:action:#1}%
-% \endgroup}}
-
-\unexpanded\def\mult_interfaces_install_action_handler#1#2#3#4%
- {\unexpanded\expandafter\def\csname#1\endcsname{\dodoubleempty#4}%
- \unexpanded\def#4[##1][##2]%
+\protected\def\mult_interfaces_install_action_handler#1#2#3%
+ {\frozen\tolerant\protected\defcsname#1\endcsname[##1]##*[##2]%
{\begingroup
- \ifsecondargument
- \edef#2{##1}%
- #3[##2]%
- \orelse\iffirstargument
- \ifcondition\expandafter\mult_check_for_assignment_indeed_begin_\detokenize{##1}=^^^^0003^^^^0003^^^^0004%
- \edef#2{##1}%
- \else
+ \ifarguments
+ \let#2\empty
+ \or
+ %\ifcondition\expandafter\mult_check_for_assignment_indeed_begin_\detokenize{##1}=^^^^0003^^^^0003^^^^0004%
+ % \ifcondition\mult_aux_no_assignment_indeed##1\ignorearguments
+ % \edef#2{##1}%
+ % \else
+ % \let#2\empty
+ % #3[##1]%
+ % \fi
+ \ifhastok={##1}%
\let#2\empty
#3[##1]%
+ \else
+ \edef#2{##1}%
\fi
- \else
- \let#2\empty
+ \or
+ \edef#2{##1}%
+ #3[##2]%
\fi
\directsetup{handler:action:#1}%
\endgroup}}
+\permanent\protected\def\installactionhandler#1%
+ {\mutable\letcsname current#1\endcsname\empty
+ \normalexpanded
+ {\mult_interfaces_install_action_handler
+ {#1}%
+ \expandafter\noexpand\csname current#1\endcsname
+ \expandafter\noexpand\csname setupcurrent#1\endcsname}}
+
% First we had, in tune with the regular system variables:
%
% \starttyping
-% \unexpanded\def\installnamespace#1{\setvalue{????#1}{@@@@#1}}
+% \protected\def\installnamespace#1{\setvalue{????#1}{@@@@#1}}
% \stoptyping
%
% The following variant is nicer and in principle faster but that gets unnoticed
@@ -769,30 +812,23 @@
\newcount\c_mult_interfaces_n_of_namespaces
-%def\v_interfaces_prefix_template{\number \c_mult_interfaces_n_of_namespaces>}
-%def\v_interfaces_prefix_template{\characters\c_mult_interfaces_n_of_namespaces>}
-
-%def\v_interfaces_prefix_template % consistently %03i>
-% {\ifnum\c_mult_interfaces_n_of_namespaces<\plusten00\else\ifnum\c_mult_interfaces_n_of_namespaces<\plushundred0\fi\fi
-% \number\c_mult_interfaces_n_of_namespaces>}
-
\def\v_interfaces_prefix_template
{\number\c_mult_interfaces_n_of_namespaces>}
-\unexpanded\def\installnamespace#1% for modules and users
+\permanent\protected\def\installnamespace#1% for modules and users
{\ifcsname ????#1\endcsname
\writestatus\m!system{duplicate user namespace '#1'}\wait
\else
\global\advance\c_mult_interfaces_n_of_namespaces\plusone
- \expandafter\edef\csname ????#1\endcsname{\v_interfaces_prefix_template}%
+ \immutable\edefcsname ????#1\endcsname{\v_interfaces_prefix_template}%
\fi}
-\unexpanded\def\installcorenamespace#1%
+\permanent\protected\def\installcorenamespace#1%
{\ifcsname ??#1\endcsname
\writestatus\m!system{duplicate core namespace '#1'}\wait
\else
\global\advance\c_mult_interfaces_n_of_namespaces\plusone
- \expandafter\edef\csname ??#1\endcsname{\v_interfaces_prefix_template}%
+ \immutable\edefcsname ??#1\endcsname{\v_interfaces_prefix_template}%
\clf_registernamespace\c_mult_interfaces_n_of_namespaces{#1}%
\fi}
@@ -812,20 +848,19 @@
\letvalue\??dummy\empty
- \def\dummyparameter #1{\begincsname\??dummy#1\endcsname}
- \def\directdummyparameter #1{\begincsname\??dummy#1\endcsname}
-\unexpanded\def\setdummyparameter #1{\expandafter\def\csname\??dummy#1\endcsname}
-\unexpanded\def\setexpandeddummyparameter#1{\expandafter\edef\csname\??dummy#1\endcsname}
-\unexpanded\def\letdummyparameter #1{\expandafter\let\csname\??dummy#1\endcsname}
+\permanent \def\dummyparameter #1{\begincsname\??dummy#1\endcsname}
+\permanent \def\directdummyparameter #1{\begincsname\??dummy#1\endcsname}
+\permanent\protected\def\setdummyparameter #1{\defcsname\??dummy#1\endcsname}
+\permanent\protected\def\setexpandeddummyparameter#1{\edefcsname\??dummy#1\endcsname}
+\permanent\protected\def\letdummyparameter #1{\letcsname\??dummy#1\endcsname}
-% \unexpanded\def\getdummyparameters
-% {\mult_interfaces_get_parameters\??dummy}
+\edef\mult_interfaces_dummy{\??dummy} % nor immutable
-\unexpanded\def\getdummyparameters[#1%
+\permanent\protected\def\getdummyparameters[#1%
{\if\noexpand#1]%
\expandafter\gobbleoneargument
\else
- \let\m_mult_interfaces_namespace\??dummy
+ \let\m_mult_interfaces_namespace\mult_interfaces_dummy
\expandafter\mult_interfaces_get_parameters_indeed
\fi#1}
@@ -876,13 +911,10 @@
%
% This is a user (module) command:
-\unexpanded\def\definenamespace
- {\dodoubleargument\mult_interfaces_define_name_space}
-
-\def\mult_interfaces_define_name_space[#1][#2]% namespace settings
+\permanent\tolerant\protected\def\definenamespace[#1]#*[#2]% namespace settings
{\clf_definenamespace{#1}{#2}}
-\def\listnamespaces
+\permanent\protected\def\listnamespaces
{\clf_listnamespaces}
%D Helper:
@@ -891,61 +923,52 @@
%D \showparentchain{@@am}{left}
%D \stoptyping
-\unexpanded\def\showparentchain#1#2%
+\permanent\protected\def\showparentchain#1#2%
{\writestatus\m!system{chain: [ \mult_interfaces_show_parent_chain{#1#2}]}}
-% \def\mult_interfaces_show_parent_chain#1%
-% {#1 => %
-% \ifcsname#1:\s!parent\endcsname
-% \expandafter\mult_interfaces_show_parent_chain\csname#1:\s!parent\endcsname
-% \fi}
-
\def\mult_interfaces_show_parent_chain#1%
{#1 => %
\ifcsname#1:\s!parent\endcsname
- %\expandafter\mult_interfaces_show_parent_chain\csname#1:\s!parent\endcsname
\expandafter\mult_interfaces_show_parent_chain\lastnamedcs
\fi}
%D Another helper (needs to be applied):
-\unexpanded\def\doifelsecommandhandler#1#2% namespace name
+\permanent\protected\def\doifelsecommandhandler#1#2% namespace name
{\ifcsname#1#2:\s!parent\endcsname
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\doifcommandhandlerelse\doifelsecommandhandler
+\aliased\let\doifcommandhandlerelse\doifelsecommandhandler
-\unexpanded\def\doifcommandhandler#1#2% namespace name
+\permanent\protected\def\doifcommandhandler#1#2% namespace name
{\ifcsname#1#2:\s!parent\endcsname
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotcommandhandler#1#2% namespace name
+\permanent\protected\def\doifnotcommandhandler#1#2% namespace name
{\ifcsname#1#2:\s!parent\endcsname
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\let\doifcommandhandlerelse\doifelsecommandhandler
-
% another set of (fast) helpers (grep for usage):
-\def\expandnamespaceparameter#1#2#3% \??xx \getp \c!xx \v!yy
+\permanent\def\expandnamespaceparameter#1#2#3% \??xx \getp \c!xx \v!yy
{\csname#1\ifcsname#1\expandafter\expandafter\expandafter\mult_aux_expand_namespace_parameter#2#3}
\def\mult_aux_expand_namespace_parameter#1#2% \cs \v!yy
{#1\endcsname#1\else#2\fi\endcsname}
-\def\expandnamespacemacro#1#2#3% \??xx \some_edefed_cs \c!yy
+\permanent\def\expandnamespacemacro#1#2#3% \??xx \some_edefed_cs \c!yy
{\csname#1\ifcsname#1#2\endcsname#2\else#3\fi\endcsname}
-\def\expandnamespacevalue#1#2% \??xx {...} \c!yy == optimized \expandcheckedcsname
+\permanent\def\expandnamespacevalue#1#2% \??xx {...} \c!yy == optimized \expandcheckedcsname
{\csname#1\ifcsname#1\normalexpanded{\noexpand\syst_helpers_expand_checked_value{#2}}}
\def\syst_helpers_expand_checked_value#1#2%
@@ -971,37 +994,32 @@
% many assignments and mechanism that do are also slow; the advantage is mostly nicer
% in tracing
-\def\s!simple{simple}
-\def\s!single{single}
-\def\s!double{double}
-\def\s!triple{triple}
+\mutable\let\c_mult_set\relax
-\let\c_mult_set\relax
-
-\unexpanded\def\mult_interfaces_install_definition_set#1#2#3#4#5#6#7%
+\protected\def\mult_interfaces_install_definition_set#1#2#3#4#5#6#7%
{\newcount#3%
\let#6\empty
- \unexpanded\def#2%
+ \protected\def#2%
{\expandafter\let\expandafter\c_mult_set\csname #1_t_#6\endcsname
- \ifx\c_mult_set\relax
+ \ifrelax\c_mult_set
\expandafter\newtoks\c_mult_set
- \expandafter\let\csname #1_t_#6\endcsname\c_mult_set
+ \letcsname#1_t_#6\endcsname\c_mult_set
\fi}
- \unexpanded\def#4##1%
+ \frozen\protected\def#4##1%
{\pushmacro#6%
\advance#3\plusone
\edef#6{##1}%
\unprotect}%
- \unexpanded\def#5%
+ \frozen\protected\def#5%
{\protect
\advance#3\minusone
\popmacro#6}%
- \unexpanded\def#7##1%
+ \frozen\protected\def#7##1%
{\edef#6{##1}%
#2%
\the\c_mult_set\relax}}
-\unexpanded\def\installdefinitionset#1#2%
+\permanent\protected\def\installdefinitionset#1#2%
{\normalexpanded
{\mult_interfaces_install_definition_set
{\noexpand#1}% \??aa
@@ -1012,22 +1030,18 @@
\expandafter\noexpand\csname current#2\endcsname
\expandafter\noexpand\csname use#2\endcsname}}
-\unexpanded\def\mult_interfaces_install_definition_set_member#1#2#3#4#5#6#7#8#9% no everysetups etc
+\protected\def\mult_interfaces_install_definition_set_member#1#2#3#4#5#6#7#8#9% no everysetups etc
{\let#5#2%
- \unexpanded\def#2%
+ \frozen\protected\def#2%
{\ifcase#4\relax\expandafter#5\else\expandafter#6\fi}%
- \unexpanded\def#6%
- {\dodoubleempty#7}%
- \unexpanded\def#7[##1][##2]%
- {\ifsecondargument
- %#3\c_mult_set\expandafter{\the\c_mult_set#9[##1][##2]}%
- #3\toksapp\c_mult_set{#9[##1][##2]}%
- \orelse\iffirstargument
- %#3\c_mult_set\expandafter{\the\c_mult_set#8[##1]}%
- #3\toksapp\c_mult_set{#8[##1]}%
+ \tolerant\protected\def#6[##1]##*[##2]%
+ {\ifarguments\or
+ #3\toksapp\c_mult_set{#7[##1]}%
+ \or
+ #3\toksapp\c_mult_set{#8[##1][##2]}%
\fi}}
-\unexpanded\def\installdefinitionsetmember#1#2#3#4%
+\permanent\protected\def\installdefinitionsetmember#1#2#3#4%
{\normalexpanded
{\mult_interfaces_install_definition_set_member
{\noexpand#3}% \??aa
@@ -1036,63 +1050,55 @@
\expandafter\noexpand\csname #2_nesting_depth\endcsname
\expandafter\noexpand\csname normal_setup_#4\endcsname
\expandafter\noexpand\csname delayed_setup_#4\endcsname
- \expandafter\noexpand\csname do_delayed_setup_#4\endcsname
\expandafter\noexpand\csname setup#4_\s!single\endcsname
\expandafter\noexpand\csname setup#4_\s!double\endcsname}}
%D Another experiment:
-\unexpanded\def\mult_interfaces_install_parent_injector#1#2#3#4%
- {\unexpanded\def#4##1%
- {\ifx#3\empty
- \expandafter\def\csname#1#2:\s!parent\endcsname{#1##1}%
+\protected\def\mult_interfaces_install_parent_injector#1#2#3#4%
+ {\frozen\protected\def#4##1%
+ {\ifempty#3%
+ \defcsname#1#2:\s!parent\endcsname{#1##1}%
\fi}}
-\unexpanded\def\installparentinjector#1#2%
+\permanent\protected\def\installparentinjector#1#2%
{\normalexpanded{\mult_interfaces_install_parent_injector
{\noexpand#1}%
\expandafter\noexpand\csname current#2\endcsname
\expandafter\noexpand\csname current#2parent\endcsname
\expandafter\noexpand\csname inject#2parent\endcsname}}
-% Faster but not used that much to make a dent in performance. But, because it's
-% cleaner anyway and also gives less tracing, we apply it a few times.
-
-\unexpanded\def\syst_helpers_install_macro_stack#1#2#3%
- {\xdef\m_syst_helpers_push_macro{\csstring#1}%
- \ifcsname#3\m_syst_helpers_push_macro\endcsname\else
- \expandafter\newcount\csname#3\m_syst_helpers_push_macro\endcsname
- \expandafter\edef\csname push_macro_\m_syst_helpers_push_macro\endcsname
- {\noexpand\expandafter\glet
- \noexpand\csname\m_syst_helpers_push_macro\noexpand\the\csname#3\m_syst_helpers_push_macro\endcsname\endcsname
- \noexpand#1%
- \global\advance\csname#3\m_syst_helpers_push_macro\endcsname\plusone}%
- \expandafter\edef\csname pop_macro_\m_syst_helpers_push_macro\endcsname
- {\global\advance\csname#3\m_syst_helpers_push_macro\endcsname\minusone
- \noexpand\expandafter#2%
- \noexpand\expandafter\noexpand#1%
- \noexpand\csname\m_syst_helpers_push_macro\noexpand\the\csname#3\m_syst_helpers_push_macro\endcsname\endcsname}%
- \fi}
+% The \LUA\ based variant is twice as fast as the above but as said, we don't use
+% this one that often. It's more about less tracing than speed here.
+
+\permanent\protected\def\installmacrostack#1%
+ {\ifdefined#1\else\mutable\let#1\empty\fi
+ \protected\gdefcsname push_macro_\csstring#1\endcsname{\localpushmacro#1}%
+ \protected\gdefcsname pop_macro_\csstring#1\endcsname{\localpopmacro #1}}
+
+\permanent\protected\def\installglobalmacrostack#1%
+ {\ifdefined#1\else\mutable\glet#1\empty\fi
+ \protected\gdefcsname push_macro_\csstring#1\endcsname{\globalpushmacro#1}%
+ \protected\gdefcsname pop_macro_\csstring#1\endcsname{\globalpopmacro #1}}
-\unexpanded\def\installmacrostack #1{\syst_helpers_install_macro_stack#1\let \??localpushedmacro }
-\unexpanded\def\installglobalmacrostack#1{\syst_helpers_install_macro_stack#1\glet\??globalpushedmacro}
+% \showmacrostack can be used to see if there are different entries
% \unprotect
%
% \installcorenamespace {test} \installcommandhandler \??test {test} \??test
-% \unexpanded\def\TestMeA[#1]%
+% \protected\def\TestMeA[#1]%
% {\edef\currenttest{#1}
% \edef\p_before{\testparameter\c!before}%
-% \ifx\p_before\empty \relax \else \relax \fi}
-% \unexpanded\def\TestMeB[#1]%
+% \ifempty\p_before \relax \else \relax \fi}
+% \protected\def\TestMeB[#1]%
% {\edef\currenttest{#1}
% \doifelsenothing{\testparameter\c!before}\relax\relax}
-% \unexpanded\def\TestMeC[#1]%
+% \protected\def\TestMeC[#1]%
% {\edef\currenttest{#1}
-% \expandafter\expandafter\expandafter\ifx\testparameter\c!before\empty \relax \else \relax \fi}
-% \unexpanded\def\TestMeD[#1]%
+% \expandafter\expandafter\expandafter\ifempty\testparameter\c!before \relax \else \relax \fi}
+% \protected\def\TestMeD[#1]%
% {\edef\currenttest{#1}
-% \doubleexpandafter\ifx\testparameter\c!before\empty \relax \else \relax \fi}
+% \doubleexpandafter\ifempty\testparameter\c!before \relax \else \relax \fi}
%
% \protect
%
@@ -1108,7 +1114,7 @@
% only gain a few milliseconds:
%
% \starttyping
-% \unexpanded\def\foo#1{[foo:#1]}
+% \protected\def\foo#1{[foo:#1]}
%
% \installcommalistprocessor {foo} \foo
% \installcommalistprocessorcommand \processfoolist \foo
@@ -1125,7 +1131,7 @@
% \processfoolist[{x,y,z}]\par
% \processcommalist[{x,y,z}]\foo\blank
%
-% \unexpanded\def\foo#1{}
+% \protected\def\foo#1{}
%
% \testfeatureonce{400000}{\processfoolist [fixed,middle,bar]} \elapsedtime\quad
%%\testfeatureonce{400000}{\commalistprocessor{foo}[fixed,middle,bar]} \elapsedtime\quad
@@ -1141,30 +1147,26 @@
\installcorenamespace{commalistprocessornext}
\installcorenamespace{commalistprocessoraction}
-\unexpanded\def\installcommalistprocessor#1#2% 5 macro names overhead
- {\unexpanded\expandafter\edef\csname\??commalistprocessor#1\endcsname[%
- % {\noexpand\futureexpandis]%
- % \noexpand\gobbleoneargument
- % \csname\??commalistprocessorpickup#1\endcsname}
- %\unexpanded\expandafter\edef\csname\??commalistprocessorpickup#1\endcsname
+\permanent\protected\def\installcommalistprocessor#1#2% 5 macro names overhead
+ {\protected\edefcsname\??commalistprocessor#1\endcsname[%
{\csname\??commalistprocessorwrap#1\endcsname\relax}% \relax preserves {}
- \unexpanded\expandafter\edef\csname\??commalistprocessorwrap#1\endcsname##1]%
+ \protected\edefcsname\??commalistprocessorwrap#1\endcsname##1]%
{\csname\??commalistprocessorfirst#1\endcsname##1,]}
- \unexpanded\expandafter\edef\csname\??commalistprocessorfirst#1\endcsname\relax
+ \protected\edefcsname\??commalistprocessorfirst#1\endcsname\relax
{\csname\??commalistprocessornext#1\endcsname}%
- \unexpanded\expandafter\edef\csname\??commalistprocessornext#1\endcsname
+ \protected\edefcsname\??commalistprocessornext#1\endcsname
{\noexpand\futureexpandis]%
\noexpand\gobbleoneargument
\csname\??commalistprocessoraction#1\endcsname}
- \unexpanded\expandafter\edef\csname\??commalistprocessoraction#1\endcsname##1,%
+ \protected\edefcsname\??commalistprocessoraction#1\endcsname##1,%
{\noexpand#2{##1}%
\csname\??commalistprocessornext#1\endcsname}}
-\unexpanded\def\installcommalistprocessorcommand#1#2% \processor \action
+\permanent\protected\def\installcommalistprocessorcommand#1#2% \processor \action
{\edef\p_name{\csstring#2}%
\installcommalistprocessor\p_name{#2}%
\expandafter\let\expandafter#1\csname\??commalistprocessor\p_name\endcsname}
-\unexpanded\def\commalistprocessor#1{\csname\??commalistprocessor#1\endcsname}
+\permanent\protected\def\commalistprocessor#1{\csname\??commalistprocessor#1\endcsname}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mult-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mult-def.mkxl
new file mode 100644
index 00000000000..13e22dadebf
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mult-def.mkxl
@@ -0,0 +1,32 @@
+%D \module
+%D [ file=mult-def,
+%D version=2008.10.22,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=Definitions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\installcorenamespace{multilingual}
+
+\immutable\setvalue{\??multilingual czech}{cs}
+\immutable\setvalue{\??multilingual german}{de}
+\immutable\setvalue{\??multilingual english}{en}
+\immutable\setvalue{\??multilingual french}{fr}
+\immutable\setvalue{\??multilingual italian}{it}
+\immutable\setvalue{\??multilingual dutch}{nl}
+\immutable\setvalue{\??multilingual persian}{pe}
+\immutable\setvalue{\??multilingual romanian}{ro}
+
+\permanent\def\userinterfacetag{\ifcsname\??multilingual\currentinterface\endcsname\lastnamedcs\else en\fi}
+\permanent\def\userresponsestag{\ifcsname\??multilingual\currentresponses\endcsname\lastnamedcs\else en\fi}
+
+\clf_setuserinterface{\userinterfacetag}{\userresponsestag}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mult-dim.mklx b/Master/texmf-dist/tex/context/base/mkxl/mult-dim.mklx
new file mode 100644
index 00000000000..0526b3775a1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mult-dim.mklx
@@ -0,0 +1,156 @@
+%D \module
+%D [ file=core-gen,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=General,
+%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 / General}
+
+% we could write a proper parser now in lua
+
+\unprotect
+
+%D \macros
+%D {assigndimension,assignalfadimension}
+%D
+%D The following commands are used to process keyword based dimension setters.
+%D
+%D \starttyping
+%D \assigndimension
+%D {<value>|small|medium|big|-small|-medium|-big|none}
+%D {\dimension}
+%D {value small}
+%D {value medium}
+%D {value big}
+%D \stoptyping
+%D
+%D The given keyword determines the result.
+
+\installcorenamespace{dimensionnormal}
+
+\def\assign_dimension_direct#value#dimension#small#medium#big{#dimension=#value\relax}
+
+\immutable\setvalue{\??dimensionnormal \v!none }#value#dimension#small#medium#big{#dimension\zeropoint}
+\immutable\setvalue{\??dimensionnormal \empty }#value#dimension#small#medium#big{#dimension\zeropoint}
+\immutable\setvalue{\??dimensionnormal \v!small }#value#dimension#small#medium#big{#dimension=#small\relax}
+\immutable\setvalue{\??dimensionnormal \v!medium}#value#dimension#small#medium#big{#dimension=#medium\relax}
+\immutable\setvalue{\??dimensionnormal \v!big }#value#dimension#small#medium#big{#dimension=#big\relax}
+\immutable\setvalue{\??dimensionnormal-\v!small }#value#dimension#small#medium#big{#dimension=-#small\relax}
+\immutable\setvalue{\??dimensionnormal-\v!medium}#value#dimension#small#medium#big{#dimension=-#medium\relax}
+\immutable\setvalue{\??dimensionnormal-\v!big }#value#dimension#small#medium#big{#dimension=-#big\relax}
+\immutable\letvalue{\??dimensionnormal\s!unknown}\assign_dimension_direct
+
+\permanent\protected\def\assigndimension#value%
+ {\ifcsname\??dimensionnormal#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_dimension_direct
+ \fi{#value}}
+
+%D The next variant assigns to a macro instead of a dimension.
+%D
+%D \starttyping
+%D \assignalfadimension
+%D {<value>|small|medium|big|none}
+%D {\macro}
+%D {value small}
+%D {value medium}
+%D {value big}
+%D \stoptyping
+%D
+%D This one is used for factors.
+
+\installcorenamespace{dimensionalfa}
+
+\def\assign_alpha_dimension_direct#value#macro#small#medium#big{\edef#macro{#value}}
+
+\immutable\setvalue{\??dimensionalfa\v!none }#value#macro#small#medium#big{\let #macro\!!zerocount}
+\immutable\setvalue{\??dimensionalfa\v!small }#value#macro#small#medium#big{\edef#macro{#small}}
+\immutable\setvalue{\??dimensionalfa\v!medium }#value#macro#small#medium#big{\edef#macro{#medium}}
+\immutable\setvalue{\??dimensionalfa\v!big }#value#macro#small#medium#big{\edef#macro{#big}}
+\immutable\letvalue{\??dimensionalfa\s!unknown}\assign_alpha_dimension_direct
+
+\permanent\protected\def\assignalfadimension#value%
+ {\ifcsname\??dimensionalfa#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_alpha_dimension_direct
+ \fi
+ {#value}}
+
+%D \macros
+%D {assignvalue}
+%D
+%D A variant that does not assume dimenions ios the following:
+%D
+%D \starttyping
+%D \assignvalue
+%D {<value>|small|medium|big}
+%D {\macro}
+%D {value small}
+%D {value medium}
+%D {value big}
+%D \stoptyping
+
+\installcorenamespace{dimensionvalue}
+
+\def\assign_value_direct#value#macro#small#medium#big{\edef#macro{#value}}
+
+\immutable\setvalue{\??dimensionvalue\v!small }#value#macro#small#medium#big{\edef#macro{#small}}
+\immutable\setvalue{\??dimensionvalue\v!medium }#value#macro#small#medium#big{\edef#macro{#medium}}
+\immutable\setvalue{\??dimensionvalue\v!big }#value#macro#small#medium#big{\edef#macro{#big}}
+\immutable\letvalue{\??dimensionvalue\s!unknown}\assign_value_direct
+
+\permanent\protected\def\assignvalue#value%
+ {\ifcsname\??dimensionvalue#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_value_direct
+ \fi{#value}}
+
+%D \macros
+%D {assignwidth}
+%D
+%D This one is used a few times.
+%D
+%D \starttyping
+%D \assignwidth
+%D {<value>|fit|broad}
+%D {\dimension}
+%D {text}
+%D {extra}
+%D \stoptyping
+
+\installcorenamespace{dimensionwidth}
+
+\newbox\b_assign_width
+
+\def\assign_width_direct#value#dimension#content#extra{#dimension=#value\relax}
+
+% line is like fit but can be used later as signal for ...
+
+\immutable\setvalue{\??dimensionwidth }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width
+ \setbox\b_assign_width\emptybox}
+\immutable\setvalue{\??dimensionwidth\v!fit }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width
+ \setbox\b_assign_width\emptybox}
+\immutable\setvalue{\??dimensionwidth\v!broad }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\dimexpr\wd\b_assign_width+#extra\relax
+ \setbox\b_assign_width\emptybox}
+\immutable\setvalue{\??dimensionwidth\v!line }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width
+ \setbox\b_assign_width\emptybox}
+\immutable\letvalue{\??dimensionwidth\s!unknown}\assign_width_direct
+
+\permanent\protected\def\assignwidth#value%
+ {\ifcsname\??dimensionwidth#value\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\assign_width_direct
+ \fi{#value}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mult-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/mult-ini.lmt
new file mode 100644
index 00000000000..7c60d5b33af
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mult-ini.lmt
@@ -0,0 +1,389 @@
+if not modules then modules = { } end modules ['mult-ini'] = {
+ version = 1.001,
+ comment = "companion to mult-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format, gmatch, match, find, sub = string.format, string.gmatch, string.match, string.find, string.sub
+local lpegmatch = lpeg.match
+local serialize, concat = table.serialize, table.concat
+local rawget, type, tonumber, next = rawget, type, tonumber, next
+
+local context = context
+local commands = commands
+local implement = interfaces.implement
+
+local allocate = utilities.storage.allocate
+local mark = utilities.storage.mark
+local prtcatcodes = catcodes.numbers.prtcatcodes
+local vrbcatcodes = catcodes.numbers.vrbcatcodes
+local contextsprint = context.sprint
+local setmetatableindex = table.setmetatableindex
+local formatters = string.formatters
+
+local report_interface = logs.reporter("interface","initialization")
+
+interfaces = interfaces or { }
+interfaces.constants = mark(interfaces.constants or { })
+interfaces.variables = mark(interfaces.variables or { })
+interfaces.elements = mark(interfaces.elements or { })
+interfaces.formats = mark(interfaces.formats or { })
+interfaces.translations = mark(interfaces.translations or { })
+interfaces.setupstrings = mark(interfaces.setupstrings or { })
+interfaces.corenamespaces = mark(interfaces.corenamespaces or { })
+interfaces.usednamespaces = mark(interfaces.usednamespaces or { })
+
+local registerstorage = storage.register
+local sharedstorage = storage.shared
+
+local constants = interfaces.constants
+local variables = interfaces.variables
+local elements = interfaces.elements
+local formats = interfaces.formats
+local translations = interfaces.translations
+local setupstrings = interfaces.setupstrings
+local corenamespaces = interfaces.corenamespaces
+local usednamespaces = interfaces.usednamespaces
+local reporters = { } -- just an optimization
+
+local setmacro = tokens.setters.macro
+
+registerstorage("interfaces/constants", constants, "interfaces.constants")
+registerstorage("interfaces/variables", variables, "interfaces.variables")
+registerstorage("interfaces/elements", elements, "interfaces.elements")
+registerstorage("interfaces/formats", formats, "interfaces.formats")
+registerstorage("interfaces/translations", translations, "interfaces.translations")
+registerstorage("interfaces/setupstrings", setupstrings, "interfaces.setupstrings")
+registerstorage("interfaces/corenamespaces", corenamespaces, "interfaces.corenamespaces")
+registerstorage("interfaces/usednamespaces", usednamespaces, "interfaces.usednamespaces")
+
+interfaces.interfaces = {
+ "cs", "de", "en", "fr", "it", "nl", "ro", "pe",
+}
+
+sharedstorage.currentinterface = sharedstorage.currentinterface or "en"
+sharedstorage.currentresponse = sharedstorage.currentresponse or "en"
+
+local currentinterface = sharedstorage.currentinterface
+local currentresponse = sharedstorage.currentresponse
+
+interfaces.currentinterface = currentinterface
+interfaces.currentresponse = currentresponse
+
+local complete = allocate()
+interfaces.complete = complete
+
+local function resolve(t,k) -- one access needed to get loaded (not stored!)
+ report_interface("loading interface definitions from 'mult-def.lua'")
+ complete = dofile(resolvers.findfile("mult-def.lua"))
+ report_interface("loading interface messages from 'mult-mes.lua'")
+ complete.messages = dofile(resolvers.findfile("mult-mes.lua"))
+ interfaces.complete = complete
+ return rawget(complete,k)
+end
+
+setmetatableindex(complete, resolve)
+
+local function valueiskey(t,k) -- will be helper
+ t[k] = k
+ return k
+end
+
+setmetatableindex(variables, valueiskey)
+setmetatableindex(constants, valueiskey)
+setmetatableindex(elements, valueiskey)
+setmetatableindex(formats, valueiskey)
+setmetatableindex(translations, valueiskey)
+setmetatableindex(setupstrings, valueiskey)
+
+function interfaces.registernamespace(n,namespace)
+ corenamespaces[n] = namespace
+ usednamespaces[namespace] = n
+end
+
+function interfaces.getnamespace(n)
+ return usednamespaces[n] .. ">"
+end
+
+if documentdata then
+
+ local prefix, getmacro
+
+ function documentdata.variable(name)
+ if not prefix then
+ prefix = usednamespaces.variables .. ">document:"
+ end
+ if not getmacro then
+ getmacro = tokens.getters.macro
+ end
+ return getmacro(prefix..name)
+ end
+
+end
+
+local function resolve(t,k)
+ local v = logs.reporter(k)
+ t[k] = v
+ return v
+end
+
+setmetatableindex(reporters,resolve)
+
+for category, _ in next, translations do
+ -- We pre-create reporters for already defined messages
+ -- because otherwise listing is incomplete and we want
+ -- to use that for checking so delaying makes not much
+ -- sense there.
+ local r = reporters[category]
+end
+
+-- adding messages
+
+local function add(target,tag,values)
+ local t = target[tag]
+ if not f then
+ target[tag] = values
+ else
+ for k, v in next, values do
+ if f[k] then
+ -- error
+ else
+ f[k] = v
+ end
+ end
+ end
+end
+
+function interfaces.settranslation(tag,values)
+ add(translations,tag,values)
+end
+
+function interfaces.setformat(tag,values)
+ add(formats,tag,values)
+end
+
+local function getsetupstring(tag)
+ return setupstrings[tag] or tag
+end
+
+interfaces.getsetupstring = getsetupstring
+
+-- the old method:
+
+local replacer = lpeg.replacer { { "--", "%%a" } }
+
+local function fulltag(category,tag)
+ return formatters["%s:%s"](category,lpegmatch(replacer,tag))
+end
+
+function interfaces.setmessages(category,str)
+ for tag, message in gmatch(str,"(%S+) *: *(.-) *[\n\r]") do
+ if tag == "title" then
+ translations[tag] = translations[tag] or tag
+ else
+ formats[fulltag(category,tag)] = lpegmatch(replacer,message)
+ end
+ end
+end
+
+function interfaces.setmessage(category,tag,message)
+ formats[fulltag(category,tag)] = lpegmatch(replacer,message)
+end
+
+function interfaces.getmessage(category,tag,default)
+ return formats[fulltag(category,tag)] or default or "unknown message"
+end
+
+function interfaces.doifelsemessage(category,tag)
+ return rawget(formats,fulltag(category,tag))
+end
+
+local splitter = lpeg.splitat(",")
+
+function interfaces.showmessage(category,tag,arguments)
+ local r = reporters[category]
+ local f = formats[fulltag(category,tag)]
+ local t = type(arguments)
+ if t == "string" and #arguments > 0 then
+ r(f,lpegmatch(splitter,arguments))
+ elseif t == "table" then
+ r(f,unpack(arguments))
+ elseif arguments then
+ r(f,arguments)
+ else
+ r(f)
+ end
+end
+
+-- till here
+
+function interfaces.setvariable(variable,given)
+ variables[given] = variable
+end
+
+function interfaces.setconstant(constant,given)
+ constants[given] = constant
+end
+
+function interfaces.setelement(element,given)
+ elements[given] = element
+end
+
+-- the real thing:
+
+logs.setmessenger(context.verbatim.ctxreport)
+
+interfaces.cachedsetups = interfaces.cachedsetups or { }
+interfaces.hashedsetups = interfaces.hashedsetups or { }
+
+local cachedsetups = interfaces.cachedsetups
+local hashedsetups = interfaces.hashedsetups
+
+storage.register("interfaces/cachedsetups", cachedsetups, "interfaces.cachedsetups")
+storage.register("interfaces/hashedsetups", hashedsetups, "interfaces.hashedsetups")
+
+function interfaces.cachesetup(t)
+ local hash = serialize(t)
+ local done = hashedsetups[hash]
+ if done then
+ return cachedsetups[done]
+ else
+ done = #cachedsetups + 1
+ cachedsetups[done] = t
+ hashedsetups[hash] = done
+ return t
+ end
+end
+
+function interfaces.interfacedcommand(name)
+ local command = complete.commands[name]
+ return command and command[currentinterface] or name
+end
+
+-- interface
+
+function interfaces.writestatus(category,message)
+ reporters[category](message) -- could also be a setmetatablecall
+end
+
+function interfaces.message(str)
+ texio.write(str) -- overloaded
+end
+
+implement { name = "registernamespace", actions = interfaces.registernamespace, arguments = { "integer", "string" } }
+implement { name = "setinterfaceconstant", actions = interfaces.setconstant, arguments = "2 strings" }
+implement { name = "setinterfacevariable", actions = interfaces.setvariable, arguments = "2 strings" }
+implement { name = "setinterfaceelement", actions = interfaces.setelement, arguments = "2 strings" }
+implement { name = "setinterfacemessage", actions = interfaces.setmessage, arguments = "3 strings" }
+implement { name = "setinterfacemessages", actions = interfaces.setmessages, arguments = "2 strings" }
+
+implement {
+ name = "showmessage",
+ public = true,
+ protected = true,
+ arguments = "3 arguments" ,
+ actions = interfaces.showmessage,
+}
+
+implement {
+ name = "doifelsemessage",
+ public = true,
+ protected = true,
+ arguments = "2 arguments",
+ actions = { interfaces.doifelsemessage, commands.doifelse },
+}
+
+implement {
+ name = "getmessage",
+ public = true,
+ protected = true,
+ arguments = "3 arguments",
+ actions = function(...)
+ setmacro("currentmessagetext", interfaces.getmessage(...))
+ end,
+}
+
+implement {
+ name = "writestatus",
+ overload = true,
+ public = true,
+ protected = true,
+ arguments = "2 arguments",
+ actions = interfaces.writestatus,
+}
+
+implement {
+ name = "message",
+ overload = true,
+ public = true,
+ protected = true,
+ arguments = "string",
+ actions = interfaces.message,
+}
+
+local function gss(s)
+ contextsprint(vrbcatcodes,getsetupstring(s))
+end
+
+implement { -- will be overloaded
+ name = "getsetupstring",
+ public = true,
+ -- protected = true,
+ arguments = "string",
+ actions = gss,
+}
+
+implement {
+ name = "rawsetupstring",
+ public = true,
+ arguments = "string",
+ actions = gss,
+}
+
+
+local function showassignerror(namespace,key,line)
+ -- if key and key ~= "" and key ~= "," then
+ local ns, instance = match(namespace,"^(%d+)[^%a]+(%a*)")
+ if ns then
+ namespace = corenamespaces[tonumber(ns)] or ns
+ end
+ -- injected in the stream for timing:
+ if instance and instance ~= "" then
+ context.writestatus("setup",formatters["error in line %a, namespace %a, instance %a, key %a"](line,namespace,instance,key))
+ else
+ context.writestatus("setup",formatters["error in line %a, namespace %a, key %a"](line,namespace,key))
+ end
+ -- end
+end
+
+implement {
+ name = "showassignerror",
+ actions = showassignerror,
+ arguments = { "string", "string", "integer" },
+}
+
+-- a simple helper
+
+local settings_to_hash = utilities.parsers.settings_to_hash
+
+local makesparse = function(t)
+ for k, v in next, t do
+ if not v or v == "" then
+ t[k] = nil
+ end
+ end
+ return t
+end
+
+function interfaces.checkedspecification(specification)
+ local kind = type(specification)
+ if kind == "table" then
+ return makesparse(specification)
+ elseif kind == "string" and specification ~= "" then
+ return makesparse(settings_to_hash(specification))
+ else
+ return { }
+ end
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mult-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mult-ini.mkxl
new file mode 100644
index 00000000000..17f63ef93b9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mult-ini.mkxl
@@ -0,0 +1,804 @@
+%D \module
+%D [ file=mult-ini,
+%D version=2008.10.22, % 1996.06.01,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module is a stripped down version of \type {mult-ini.tex}, which we keep
+%D around as \type {mult-kep.tex} for sentimental reasons. There you will find some
+%D more historic information.
+
+\writestatus{loading}{ConTeXt Multilingual Macros / Initialization}
+
+\unprotect
+
+\registerctxluafile{mult-ini}{autosuffix}
+\registerctxluafile{mult-fmt}{initexonly}
+
+%D \macros
+%D [constanten,variabelen,commands]
+%D {v!,c!,k!,s!,e!,m!,l!,r!,f!,p!,x!,y!}
+%D
+%D In the system modules we introduced some prefixed constants, variables (both
+%D macros) and registers. Apart from a tremendous saving in terms of memory and a
+%D gain in speed we use from now on prefixes when possible for just another reason:
+%D consistency and multi||linguality. Systematically using prefixed macros enables
+%D us to implement a multi||lingual user interface. Redefining these next set of
+%D prefixes therefore can have desastrous results.
+%D
+%D \startlinecorrection
+%D \starttable[|c|c|c|]
+%D \HL
+%D \NC \bf prefix \NC \bf meaning \NC \bf application \NC\SR
+%D \HL
+%D \NC \type{\c!prefix!} \NC c! \NC constant (direct) \NC\FR
+%D \NC \type{\k!prefix!} \NC k! \NC constant (indirect) \NC\FR
+%D \NC \type{\e!prefix!} \NC e! \NC element \NC\MR
+%D \NC \type{\f!prefix!} \NC f! \NC file \NC\MR
+%D \NC \type{\m!prefix!} \NC m! \NC age \NC\MR
+%D \NC \type{\s!prefix!} \NC s! \NC system \NC\MR
+%D \NC \type{\v!prefix!} \NC v! \NC variable \NC\MR
+%D \HL
+%D \stoptable
+%D \stoplinecorrection
+%D
+%D In the single||lingual version we used \type {!}, \type {!!}, \type {!!!} and
+%D \type {!!!!}. In the meantime some of these are obsolete (we had some 12
+%D originally).
+
+\immutable\def\c!prefix!{c!}
+\immutable\def\k!prefix!{k!}
+\immutable\def\e!prefix!{e!}
+\immutable\def\f!prefix!{f!} % for the moment we keep this one
+\immutable\def\m!prefix!{m!}
+\immutable\def\s!prefix!{s!}
+\immutable\def\v!prefix!{v!}
+\immutable\def\t!prefix!{t!}
+
+%D \macros
+%D [constants,variables,commands]
+%D {@@,??}
+%D
+%D Variables generated by the system can be recognized on their prefix \type {@@}.
+%D They are composed of a command (class) specific tag, which can be recognized on
+%D \type {??}, and a system constant, which has the prefix \type {c!}. We'll se some
+%D more of this.
+
+\immutable\def\??prefix {??}
+\immutable\def\@@prefix {@@}
+
+%D Just to be complete we repeat some of the already defined system constants here.
+%D Maybe their prefix \type {\s!} now falls into place.
+
+\def\s!next {next} \def\s!default {default}
+\def\s!dummy {dummy} \def\s!unknown {unknown}
+
+\def\s!do {do} \def\s!dodo {dodo}
+
+\def\s!complex {complex} \def\s!start {start}
+\def\s!simple {simple} \def\s!stop {stop}
+
+\def\s!true {true}
+\def\s!false {false}
+
+%D The word \type {height} takes 6~token memory cells. The control sequence \type
+%D {\height} on the other hand uses only one. Knowing this, we can improve the
+%D performance of \TEX, both is terms of speed and memory usage, by using control
+%D sequences instead of the words written in full.
+%D
+%D Where in the \ASCII\ file the second lines takes nine extra characters, \TEX\
+%D saves us 13~tokens.
+%D
+%D \starttyping
+%D \hrule width 10pt height 2pt depth 1pt
+%D \hrule \s!width 10pt \s!height 2pt \s!depth 1pt
+%D \stoptyping
+%D
+%D One condition is that we have defined \type {\s!height}, \type {\s!width} and
+%D \type {\s!depth} as respectively \type {height}, \type {width} and \type {depth}.
+%D Using this scheme therefore only makes sense when a token sequence is used more
+%D than once. Savings like this should of course be implemented in english, just
+%D because \TEX\ is english.
+
+\def\s!width {width}
+\def\s!height {height}
+\def\s!depth {depth}
+\def\s!spread {spread}
+\def\s!plus {plus}
+\def\s!minus {minus}
+\def\s!to {to}
+
+\def\s!fil {fil}
+\def\s!fill {fill}
+\def\s!filll {filll}
+
+\def\s!attr {attr}
+\def\s!axis {axis}
+\def\s!both {both}
+\def\s!bottom {bottom}
+\def\s!left {left}
+\def\s!options {options}
+\def\s!orientation{orientation}
+\def\s!reverse {reverse}
+\def\s!right {right}
+\def\s!top {top}
+\def\s!xmove {xmove}
+\def\s!xoffset {xoffset}
+\def\s!ymove {ymove}
+\def\s!yoffset {yoffset}
+
+%D \macros
+
+%D {defineinterfaceconstant,
+%D defineinterfacevariable,
+%D defineinterfaceelement,
+%D definesystemvariable,
+%D definesystemconstant,
+%D definemessageconstant,
+%D definefileconstant}
+%D
+%D The first part of this module is dedicated to dealing with multi||lingual
+%D constants and variables. When \CONTEXT\ grew bigger and bigger in terms of bytes
+%D and used string space, we switched to predefined constants. At the cost of more
+%D hash table entries, the macros not only becase more compact, they became much
+%D faster too. Maybe an even bigger advantage was that mispelling could no longer
+%D lead to problems. Even a multi||lingual interface became possible.
+%D
+%D Constants |<|we'll introduce the concept of variables later on|>| are preceded by
+%D a type specific prefix, followed by a \type {!}. To force consistency, we provide
+%D a few commands for defining such constants.
+%D
+%D \starttyping
+%D \defineinterfaceconstant {name} {meaning}
+%D \defineinterfacevariable {name} {meaning}
+%D \defineinterfaceelement {name} {meaning}
+%D \stoptyping
+%D
+%D Which is the same as:
+%D
+%D \starttyping
+%D \def\c!name{meaning}
+%D \def\v!name{meaning}
+%D \def\e!name{meaning}
+%D \stoptyping
+
+%permanent\protected\def\defineinterfaceconstant#1#2{\immutable\defcsname\c!prefix!#1\endcsname{#2}}
+\permanent\protected\def\defineinterfacevariable#1#2{\immutable\defcsname\v!prefix!#1\endcsname{#2}}
+\permanent\protected\def\defineinterfaceelement #1#2{\immutable\defcsname\e!prefix!#1\endcsname{#2}}
+
+%D Next come some interface independant constants:
+%D
+%D \starttyping
+%D \definefileconstant {name} {meaning}
+%D \stoptyping
+
+\permanent\protected\def\definefileconstant#1#2{\immutable\defcsname\f!prefix!#1\endcsname{#2}}
+
+%D And finaly we have the one argument, space saving constants
+%D
+%D \starttyping
+%D \definesystemconstant {name}
+%D \definemessageconstant {name}
+%D \stoptyping
+
+\permanent\protected\def\definesystemconstant #1{\immutable\defcsname\s!prefix!#1\endcsname{#1}}
+\permanent\protected\def\definemessageconstant#1{\immutable\defcsname\m!prefix!#1\endcsname{#1}}
+
+%D For now here:
+
+\permanent\protected\def\definetagconstant #1{\immutable\defcsname\t!prefix!#1\endcsname{#1}}
+\permanent\protected\def\aliastagconstant #1#2{\aliased \letcsname\t!prefix!#1\expandafter\endcsname\csname\t!prefix!#2\endcsname}
+
+%D In a parameter driven system, some parameters are shared by more system
+%D components. In \CONTEXT\ we can distinguish parameters by a unique prefix. Such a
+%D prefix is defined with:
+%D
+%D \starttyping
+%D \definesystemvariable {name}
+%D \stoptyping
+
+\permanent\protected\def\definesystemvariable#1{\immutable\edefcsname\??prefix#1\endcsname{\@@prefix#1}}
+
+\definesystemvariable{ms}
+
+%D \macros
+%D {selectinterface,
+%D defaultinterface, currentinterface, currentresponses}
+%D
+%D With \type {\selectinterface} we specify the language we are going to use. The
+%D system asks for the language wanted, and defaults to \type {\currentinterface}
+%D when we just give \type {enter}. By default the message system uses the current
+%D interface language, but \type {\currentresponses} can specify another language
+%D too.
+%D
+%D Because we want to generate formats directly too, we do not ask for interface
+%D specifications when these are already defined (like in cont-nl.tex and alike).
+
+\ifdefined\defaultinterface
+
+ \permanent\protected\def\selectinterface
+ {\writestatus{interface}{defining \currentinterface\space interface}%
+ %writeline
+ \writestatus{interface}{using \currentresponses\space messages}%
+ %\writeline
+ \enforced\permanent\let\selectinterface\relax}
+
+\else
+
+ \immutable\def\defaultinterface{english}
+
+ \permanent\overloaded\protected\def\selectinterface
+ {\enforced\permanent\protected\def\selectinterface##1##2%
+ {\bgroup
+ \endlinechar\minusone
+ \global\read16 to ##1
+ \egroup
+ \doifnothing\currentinterface{\let##1=##2}%
+ \doifundefined{\s!prefix!##1}{\let##1=##2}}%
+ \selectinterface\currentinterface\defaultinterface
+ \writestatus{interface}{defining \currentinterface\space interface}%
+ %\writeline
+ \selectinterface\currentresponses\currentinterface
+ \writestatus{interface}{using \currentresponses\space messages}%
+ %\writeline
+ \enforced\permanent\let\selectinterface\relax}
+
+\fi
+
+\ifdefined\currentinterface \else \aliased\let\currentinterface\defaultinterface \fi
+\ifdefined\currentresponses \else \aliased\let\currentresponses\defaultinterface \fi
+
+%D \macros
+%D {startinterface}
+%D
+%D Sometimes we want to define things only for specific interface languages. This
+%D can be done by means of the selector:
+%D
+%D \starttyping
+%D \startinterface language
+%D
+%D language specific definitions & commands
+%D
+%D \stopinterface
+%D \stoptyping
+
+\permanent\protected\def\startinterface #1
+ {\doifnot{#1}{all}{\doifnotinset\currentinterface{#1}{\gobbleuntil\stopinterface}}}
+
+\aliased\let\stopinterface\relax
+
+%D \macros
+%D {startmessages,
+%D getmessage,
+%D showmessage,
+%D makemessage}
+%D
+%D A package as large as \CONTEXT\ can hardly function without a decent message
+%D mechanism. Due to its multi||lingual interface, the message subsystem has to be
+%D multi||lingual too. A major drawback of this feature is that we have to code
+%D messages. As a result, the source becomes less self documented. On the other
+%D hand, consistency will improve.
+%D
+%D Because the overhead in terms of entries in the (already exhausted) hash table
+%D has to be minimal, messages are packed in libraries. We can extract a message
+%D from such a library in three ways:
+%D
+%D \starttyping
+%D \getmessage {library} {tag}
+%D \showmessage {library} {tag} {data}
+%D \makemessage {library} {tag} {data}
+%D \stoptyping
+%D
+%D The first command gets the message \type {tag} from the \type {library}
+%D specified. The other commands take an extra argument: a list of items to be
+%D inserted in the message text. While \type {\showmessage} shows the message at the
+%D terminal, the other commands generate the message as text. Before we explain the
+%D \type {data} argument, we give an example of a library.
+%D
+%D \starttyping
+%D \startmessages english library: alfa
+%D title: something
+%D 1: first message
+%D 2: second (--) message --
+%D \stopmessages
+%D \stoptyping
+%D
+%D The first message is a simple one and can be shown with:
+%D
+%D \starttyping
+%D \showmessage {alfa} {1} {}
+%D \stoptyping
+%D
+%D The second message on the other hand needs some extra data:
+%D
+%D \starttyping
+%D \showmessage {alfa} {2} {and last,to you}
+%D \stoptyping
+%D
+%D This message is shown as:
+%D
+%D \starttyping
+%D something : second (and last) message to you
+%D \stoptyping
+%D
+%D As we can see, the title entry is shown with the message. The data fields are
+%D comma separated and are specified in the message text by \type {--}.
+%D
+%D It is not required to define all messages in a library at once. We can add
+%D messages to a library in the following way:
+%D
+%D \starttyping
+%D \startmessages english library: alfa
+%D 10: tenth message
+%D \stopmessages
+%D \stoptyping
+%D
+%D Because such definitions can take place in different modules, the system gives a
+%D warning when a tag occurs more than once. The first occurrence takes preference
+%D over later ones, so we had better use a save offset, as shown in the example. As
+%D we can see, the title field is specified only the first time!
+%D
+%D Because we want to check for duplicate tags, the macros are a bit more
+%D complicated than neccessary. The \NEWLINE\ token is used as message separator.
+%D
+%D For internal purposes one can use \type {\setmessagetext}, which puts the message
+%D text asked for in \type {\currentmessagetext}.
+%D
+%D These will become obsolete:
+
+\permanent\protected\def\startmessages #1 library: #2 %
+ {\begingroup
+ \ifcsname\m!prefix!#2\endcsname\else\immutable\setgvalue{\m!prefix!#2}{#2}\fi
+ \catcode\endoflineasciicode\othercatcode
+ \doifelseinset{#1}{\currentresponses,all}\mult_messages_start_yes\mult_messages_start_nop{#2}}
+
+\def\mult_messages_start_yes#1#2\stopmessages
+ {\clf_setinterfacemessages{#1}{#2}%
+ \endgroup}
+
+\def\mult_messages_start_nop#1#2\stopmessages
+ {\endgroup}
+
+\aliased\let\stopmessages\relax
+
+\mutable\let\currentmessagetext\empty
+
+\permanent\protected\def\setinterfacemessage#1#2#3%
+ {\ifcsname\m!prefix!#1\endcsname\else\immutable\gdefcsname\m!prefix!#1\endcsname{#1}\fi
+ \clf_setinterfacemessage{#1}{#2}{#3}}
+
+% \getmessage % {tag} {index} -> \currentmessagetext
+% \doifelsemessage % {tag} {index}
+% \showmessage % {tag} {index} {detail}
+% \writestatus % {tag} {string}
+% \message % {string}
+
+\aliased\let\doifmessageelse\doifelsemessage
+
+\permanent\protected\def\inlinemessage #1{\dontleavehmode{\tttf#1}}
+\permanent\protected\def\displaymessage#1{\blank\inlinemessage{#1}\blank}
+
+% \getsetupstring % {tag} defined at the lua end
+% \rawsetupstring % {tag} defined at the lua end
+
+%D For old times sake:
+
+\aliased\let\showwarning\showmessage
+
+%D \macros
+%D {dosetvalue,dosetevalue,dosetgvalue,dosetxvalue,docopyvalue,doresetvalue} % dogetvalue
+%D
+%D We already defined these auxiliary macros in the system modules. Starting with
+%D this module however, we have to take multi||linguality a bit more serious.
+%D
+%D In due time, when we exclusively use the parameter handler code, we can drop the
+%D backmapping (\type{\c!k...}) and make \type {\c!c...} similar to \type {\v!...}.
+%D In that case we can simply the following setters.
+
+\pushoverloadmode
+
+\permanent\protected\def\doletvalue #1#2{\letcsname #1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\permanent\protected\def\dosetvalue #1#2{\defcsname #1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\permanent\protected\def\dosetevalue #1#2{\edefcsname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\permanent\protected\def\dosetgvalue #1#2{\gdefcsname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\permanent\protected\def\dosetxvalue #1#2{\xdefcsname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname}
+\permanent\protected\def\doresetvalue #1#2{\letcsname #1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
+\permanent\protected\def\doignorevalue#1#2#3{\letcsname #1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty}
+
+\permanent\protected\def\docopyvalue#1#2#3%
+ {\ifcsname\k!prefix!#3\endcsname
+ \defcsname#1\csname\k!prefix!#3\endcsname\expandafter\endcsname\expandafter
+ {\csname#2\csname\k!prefix!#3\endcsname\endcsname}%
+ \else
+ \defcsname#1#3\expandafter\endcsname\expandafter
+ {\csname#2#3\endcsname}%
+ \fi}
+
+\startinterface english
+
+ \permanent\protected\def\doletvalue #1#2{\letcsname #1#2\endcsname}
+ \permanent\protected\def\dosetvalue #1#2{\defcsname #1#2\endcsname}
+ \permanent\protected\def\dosetevalue #1#2{\edefcsname#1#2\endcsname}
+ \permanent\protected\def\dosetgvalue #1#2{\gdefcsname#1#2\endcsname}
+ \permanent\protected\def\dosetxvalue #1#2{\xdefcsname#1#2\endcsname}
+ \permanent\protected\def\doresetvalue #1#2{\letcsname #1#2\endcsname\empty}
+ \permanent\protected\def\doignorevalue#1#2#3{\letcsname #1#2\endcsname\empty}
+
+ \permanent\protected\def\docopyvalue#1#2#3%
+ {\defcsname#1#3\expandafter\endcsname\expandafter
+ {\csname#2#3\endcsname}}
+
+\stopinterface
+
+\popoverloadmode
+
+%D We can now redefine some messages that will be introduced in the multi||lingual
+%D system module.
+
+\permanent\protected\def\showassignerror #1#2{\showmessage\m!check1{#1,#2}}
+\permanent\protected\def\showargumenterror#1#2{\showmessage\m!check2{#1,#2}}
+\permanent\protected\def\showdefinederror #1#2{\showmessage\m!check3{#1,#2}}
+
+%D \CONTEXT\ is a parameter driven package. This means that users instruct the
+%D system by means of variables, values and keywords. These instructions take the
+%D form:
+%D
+%D \starttyping
+%D \setupsomething[some variable=some value, another one=a keyword]
+%D \stoptyping
+%D
+%D or by keyword only:
+%D
+%D \starttyping
+%D \dosomething[this way,that way,no way]
+%D \stoptyping
+%D
+%D Because the same variables can occur in more than one setup command, we have to
+%D be able to distinguish them. This is achieved by assigning them a unique prefix.
+%D
+%D Imagine a setup command for boxed text, that enables us to specify the height and
+%D width of the box. Behide the scenes the command
+%D
+%D \starttyping
+%D \setupbox [width=12cm, height=3cm]
+%D \stoptyping
+%D
+%D results in something like
+%D
+%D \starttyping
+%D \<box><width> {12cm}
+%D \<box><height> {3cm}
+%D \stoptyping
+%D
+%D while a similar command for specifying the page dimensions
+%D of an \cap {A4} page results in:
+%D
+%D \starttyping
+%D \<page><width> {21.0cm}
+%D \<page><height> {27.9cm}
+%D \stoptyping
+%D
+%D The prefixes \type {<box>} and \type {<page>} are hidden from users and can
+%D therefore be language independant. Variables on the other hand, differ for each
+%D language:
+%D
+%D \starttyping
+%D \<box><color> {<blue>}
+%D \<box><kleur> {<blauw>}
+%D \<box><couleur> {<blue>}
+%D \stoptyping
+%D
+%D In this example we can see that the assigned values or keywords are language
+%D dependant too. This will be a complication when defining multi||lingual setup
+%D files.
+%D
+%D A third phenomena is that variables and values can have a similar meaning.
+%D
+%D \starttyping
+%D \<pagenumber><location> {<left>}
+%D \<skip><left> {12cm}
+%D \stoptyping
+%D
+%D A (minor) complication is that where in english we use \type {<left>}, in dutch
+%D we find both \type {<links>} and \type {<linker>}. This means that when we use
+%D some sort of translation table, we have to distinguish between the variables at
+%D the left side and the fixed values at the right.
+%D
+%D The same goes for commands that are composed of different user supplied and/or
+%D language specific elements. In english we can use:
+%D
+%D \starttyping
+%D \<empty><figure>
+%D \<empty><intermezzo>
+%D \stoptyping
+%D
+%D But in dutch we have the following:
+%D
+%D \starttyping
+%D \<lege><figuur>
+%D \<leeg><intermezzo>
+%D \stoptyping
+%D
+%D These subtle differences automatically lead to a solution where variables,
+%D values, elements and other components have a similar logical name (used in
+%D macro's) but a different meaning (supplied by the user).
+%D
+%D Our solution is one in which the whole system is programmed in terms of
+%D identifiers with language specific meanings. In such an implementation, each
+%D fixed variable is available as:
+%D
+%D \starttyping
+%D \<prefix><variable>
+%D \stoptyping
+%D
+%D This means that for instance:
+%D
+%D \starttyping
+%D \setupbox[width=12cm]
+%D \stoptyping
+%D
+%D expands to something like:
+%D
+%D \starttyping
+%D \def\boxwidth{12cm}
+%D \stoptyping
+%D
+%D because we don't want to recode the source, a setup command in another language
+%D has to expand to this variable, so:
+%D
+%D \starttyping
+%D \setupblock[width=12cm]
+%D \stoptyping
+%D
+%D has to result in the definition of \type {\boxwidth} too. This method enables us
+%D to build compact, fast and readable code.
+%D
+%D An alternative method, which we considered using, uses a more indirect way. In
+%D this case, both calls generate a different variable:
+%D
+%D \starttyping
+%D \def\boxwidth {12cm}
+%D \def\boxbreedte {12cm}
+%D \stoptyping
+%D
+%D And because we don't want to recode those megabytes of already developed code,
+%D this variable has to be called with something like:
+%D
+%D \starttyping
+%D \valueof\box\width
+%D \stoptyping
+%D
+%D where \type {\valueof} takes care of the translation of \type {width} or \type
+%D {breedte} to \type {width} and combining this with \type {box} to \type
+%D {\boxwidth}.
+%D
+%D One advantage of this other scheme is that, within certain limits, we can
+%D implement an interface that can be switched to another language at will, while
+%D the current approach fixes the interface at startup. There are, by the way, other
+%D reasons too for not choosing this scheme. Switching user generated commands is
+%D for instance impossible and a dual interface would therefore give a strange mix
+%D of languages.
+%D
+%D Now let's work out the first scheme. Although the left hand of the assignment is
+%D a variable from the users point of view, it is a constant in terms of the system.
+%D Both \type {width} and \type {breedte} expand to \type {width} because in the
+%D source we only encounter \type {width}. Such system constants are presented as
+%D
+%D \starttyping
+%D \c!width
+%D \stoptyping
+%D
+%D This constant is always equivalent to \type {width}. As we can see, we use \type
+%D {c!} to mark this one as constant. Its dutch counterpart is:
+%D
+%D \starttyping
+%D breedte
+%D \stoptyping
+%D
+%D When we interpret a setup command each variable is translated to it's \type{c!}
+%D counterpart. This means that \type {breedte} and \type{width} expand to \type
+%D {breedte} and \type {\c!width} which both expand to \type {width}. That way user
+%D variables become system constants.
+%D
+%D The interpretation is done by means of a general setup command \type
+%D {\getparameters} that we introduced in the system module. Let us define some
+%D simple setup command:
+%D
+%D \starttyping
+%D \protected\def\setupbox[#1]%
+%D {\getparameters[\??bx][#1]}
+%D \stoptyping
+%D
+%D This command can be used as:
+%D
+%D \starttyping
+%D \setupbox [width=3cm, height=1cm]
+%D \stoptyping
+%D
+%D Afterwards we have two variables \type {\@@bxwidth} and \type {\@@bxheight} which
+%D have the values \type {3cm} and \type {1cm} assigned. These variables are a
+%D combinatiom of the setup prefix \type {\??bx}, which expands to \type {@@bx} and
+%D the translated user supplied variables \type {width} and \type {height} or \type
+%D {breedte} and \type {hoogte}, depending on the actual language. In dutch we just
+%D say:
+%D
+%D \starttyping
+%D \stelblokin [breedte=3cm,hoogte=1cm]
+%D \stoptyping
+%D
+%D and get ourselves \type {\@@bxwidth} and \type {\@@bxheight} too. In the source
+%D of \CONTEXT, we can recognize constants and variables on their leading \type
+%D {c!}, \type {v!} etc., prefixes on \type {??} and composed variables on \type
+%D {@@}.
+%D
+%D We already saw that user supplied keywords need some special treatment too. This
+%D time we don't translate the keyword, but instead use in the source a variable
+%D which meaning depends on the interface language.
+%D
+%D \starttyping
+%D \v!left
+%D \stoptyping
+%D
+%D Which can be used in macro's like:
+%D
+%D \starttyping
+%D \processaction
+%D [\@@bxlocation]
+%D [ \v!left=>\dosomethingontheleft,
+%D \v!middle=>\dosomthinginthemiddle,
+%D \v!right=>\dosomethingontheright]
+%D \stoptyping
+%D
+%D Because variables like \type {\@@bxlocation} can have a lot of meanings,
+%D including tricky expandable tokens, we cannot translate this meaning when we
+%D compare. This means that \type {\@@bxlocation} can be \type {left} of \type
+%D {links} of whatever meaning suits the language. But because \type {\v!left} also
+%D has a meaning that suits the language, we are able to compare.
+%D
+%D Although we know it sounds confusing we want to state two important
+%D characteristics of the interface as described:
+%D
+%D \startnarrower \em
+%D user variables become system constants
+%D \stopnarrower
+%D
+%D and
+%D
+%D \startnarrower \em
+%D user constants (keywords) become system variables
+%D \stopnarrower
+%D
+%D The \type {\c!internal} is a left over from the time that the user interface
+%D documents were not using a specification alongside a keyword specification but
+%D used a shared file in which case we need to go in both directions.
+
+% temporary mkiv hack (we can best just store the whole table in memory)
+
+\permanent\overloaded\protected\def\setinterfaceconstant#1#2%
+ {\clf_setinterfaceconstant{#1}{#2}%
+ \immutable\defcsname\c!prefix!#1\endcsname{#1}}
+
+\permanent\overloaded\protected\def\setinterfacevariable#1#2%
+ {\clf_setinterfacevariable{#1}{#2}%
+ \immutable\defcsname\v!prefix!#1\endcsname{#2}}
+
+%D \macros
+%D {defineinterfaceconstant}
+%D
+%D Next we redefine a previously defined macro to take care of interface translation
+%D too. It's a bit redundant, because in these situations we could use the
+%D c||version, but for documentation purposes the x||alternative comes in handy.
+
+\permanent\overloaded\protected\def\defineinterfaceconstant#1#2%
+ {\immutable\defcsname\c!prefix!#1\endcsname{#2}}
+
+%D \macros
+%D {startelements}
+%D
+%D Due to the object oriented nature of \CONTEXT, we also need to define the
+%D elements that are used to build commands.
+%D
+%D Such elements sometimes are the same in different languages, but mostly they
+%D differ. Things can get even confusing when we look at for instance the setup
+%D commands. In english we say \type{\setup<something>}, but in dutch we have: \type
+%D {\stel<iets>in}. Such split elements are no problem, because we just define two
+%D elements. When no second part is needed, we use a \type {-}:
+
+\permanent\overloaded\protected\def\setinterfaceelement#1#2%
+ {\clf_setinterfaceelement{#1}{#2}%
+ \ifcsname\e!prefix!#1\endcsname
+ \doifnotvalue{\e!prefix!#1}{#2}{\enforced\immutable\setvalue{\e!prefix!#1}{#2}}%
+ \else
+ \enforced\immutable\setvalue{\e!prefix!#1}{#2}%
+ \fi}
+
+\permanent\protected\def\setinterfacecommand#1#2% \frozen ? \permanent ?
+ {\doifnot{#1}{#2}% todo: let when already defined
+ {\defcsname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}}}
+
+%D We just ignore these:
+
+\permanent\protected\def\startvariables{\gobbleuntil\stopvariables} \aliased\let\stopvariables\relax
+\permanent\protected\def\startconstants{\gobbleuntil\stopconstants} \aliased\let\stopconstants\relax
+\permanent\protected\def\startelements {\gobbleuntil\stopelements } \aliased\let\stopelements \relax
+\permanent\protected\def\startcommands {\gobbleuntil\stopcommands } \aliased\let\stopcommands \relax
+
+%D For at the \LUA\ end (experiment):
+
+% \def\ui_c#1#2{\immutable\gdefcsname\c!prefix!#1\endcsname{#1}%
+% \immutable\gdefcsname\k!prefix!#2\endcsname{#1}} % backmapping from non english
+% \def\ui_s #1{\immutable\gdefcsname\c!prefix!#1\endcsname{#1}%
+% \immutable\gdefcsname\k!prefix!#1\endcsname{#1}} % backmapping from non english
+% \def\ui_v#1#2{\immutable\gdefcsname\v!prefix!#1\endcsname{#2}}
+% \def\ui_e#1#2{\immutable\gdefcsname\e!prefix!#1\endcsname{#2}}
+% \def\ui_a#1#2{\frozen\protected\def#2{#1}} % will go away
+%
+% \startinterface english
+%
+% \def\ui_c#1#2{\immutable\gdefcsname\c!prefix!#1\endcsname{#1}}
+% \def\ui_s #1{\immutable\gdefcsname\c!prefix!#1\endcsname{#1}}
+%
+% \stopinterface
+
+%D So much for the basic multi||lingual interface commands. The macro's can be
+%D enhanced with more testing facilities, but for the moment they suffice.
+
+% use \Uchar
+
+\ifdefined\zwnj \else \immutable\edef\zwnj{\directlua{utf.char(\number"200C)}} \fi % needed for cont-pe % maybe to char-utf.mkiv
+\ifdefined\zwj \else \immutable\edef\zwj {\directlua{utf.char(\number"200D)}} \fi % needed for cont-pe % maybe to char-utf.mkiv
+
+%D \macros
+%D {contextversion, contextversionnumber, contextversionno,
+%D contextbanner, showcontextbanner, formatversion}
+%D
+%D Out of convenience we define the banners here. This might move to the \LUA\ end.
+
+\pushoverloadmode
+
+\permanent\overloaded\def\contextbanner
+ {ConTeXt \space
+ ver: \contextversion \space \contextmark \space \space
+ fmt: \formatversion \space \space
+ int: \currentinterface/\currentresponses}
+
+\permanent\overloaded\protected\def\showcontextbanner
+ {\writestatus\m!system\empty
+ \writestatus\m!system\contextbanner
+ \writestatus\m!system\empty}
+
+\immutable\overloaded\edef\formatversion
+ {\the\normalyear.\the\normalmonth.\the\normalday}
+
+\newcount\contextversionno
+
+\ifdefined\contextversion \else
+ \immutable\edef\contextversion{\the\normalyear.\the\normalmonth.\the\normalday\space 00:00}
+\fi
+
+\permanent\overloaded\protected\def \contextversionnumber #1.#2.#3 #4:#5\relax{#1#2#3}
+ \contextversionno \expandafter\contextversionnumber\contextversion\relax
+\immutable\overloaded \edef\contextversionnumber {\the\contextversionno\space\contextmark}
+
+\popoverloadmode
+
+%D \macros
+%D {everydump}
+%D
+%D This one is only used when we generate the format.
+
+% \ifdefined\everydump \else
+% \newtoks\everydump
+% \def\dump{\the\everydump\global\everydump\emptytoks\glet\dump\relax\normaldump}
+% \fi
+
+% \appendtoks \showcontextbanner \to \everydump
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mult-prm.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mult-prm.mkxl
new file mode 100644
index 00000000000..2ec763c3943
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mult-prm.mkxl
@@ -0,0 +1,117 @@
+%D \module
+%D [ file=mult-prm,
+%D version=2011.09.18, % actually older
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=Primitives,
+%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 therefore
+%C copyrighted by \PRAGMA. See mreadme.pdf for details.
+
+%D This file is only a helper for generating files that can be used in an
+%D editor for syntax highlighting.
+
+% local all = table.load("mult-prm.lua")
+% local tex = table.tohash(all.tex)
+% for k, v in next, all do
+% if k ~= "tex" then
+% local h = table.tohash(v)
+% for k, v in next, h do
+% tex[k] = nil
+% end
+% all[k] = table.sortedkeys(h)
+% end
+% end
+% all.tex = table.sortedkeys(tex)
+% print((string.gsub(table.serialize(all,true),' "','\n "')))
+
+\startluacode
+
+ context.starttext()
+
+ local missing = {
+ tex = {
+ -- todo: differenced between luatex and luametatex
+ },
+ etex = {
+ -- todo: differenced between luatex and luametatex
+ },
+ luatex = {
+ -- todo: differenced between luatex and luametatex
+ },
+ pdftex = { -- maybe not complete
+ "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",
+ "pdfmapfile", "pdfmapline", "pdfmajorversion", "pdfminorversion", "pdfnames",
+ "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfrecompress",
+ "pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr",
+ "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources",
+ "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode",
+ "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen",
+ "pdfrandomseed", "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",
+ "pdfomitcidset", "pdfomitcharset",
+ },
+ aleph = { -- we don't bother
+ "Alephminorversion", "Alephrevision", "Alephversion",
+ },
+ omega = { -- we don't bother
+ "Omegaminorversion", "Omegarevision", "Omegaversion",
+ },
+ xetex = { -- we don't bother
+ "XeTeXversion",
+ },
+ -- plain = {
+ -- "TeX",
+ -- "bgroup", "egroup", "endgraf", "space", "empty", "null",
+ -- "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newhelp", "newread", "newwrite", "newfam", "newlanguage", "newinsert", "newif",
+ -- "maxdimen", "magstephalf", "magstep",
+ -- "frenchspacing", "nonfrenchspacing", "normalbaselines", "obeylines", "obeyspaces", "raggedright", "ttraggedright",
+ -- "thinspace", "negthinspace", "enspace", "enskip", "quad", "qquad",
+ -- "smallskip", "medskip", "bigskip", "removelastskip", "topglue", "vglue", "hglue",
+ -- "break", "nobreak", "allowbreak", "filbreak", "goodbreak", "smallbreak", "medbreak", "bigbreak",
+ -- "line", "leftline", "rightline", "centerline", "rlap", "llap", "underbar", "strutbox", "strut",
+ -- "cases", "matrix", "pmatrix", "bordermatrix", "eqalign", "displaylines", "eqalignno", "leqalignno",
+ -- "pageno", "folio", "tracingall", "showhyphens", "fmtname", "fmtversion",
+ -- "hphantom", "vphantom", "phantom", "smash",
+ -- },
+ }
+
+ local primitives = {
+ tex = table.sorted( table.merged( missing.tex , tex.extraprimitives("core","tex") ) ),
+ etex = table.sorted( table.merged( missing.etex , tex.extraprimitives("etex") ) ),
+ pdftex = table.sorted( table.merged( missing.pdftex, { } ) ),
+ luatex = table.sorted( table.merged( missing.luatex, tex.extraprimitives("luatex") ) ),
+ aleph = table.sorted( table.merged( missing.aleph , { } ) ),
+ omega = table.sorted( table.merged( missing.omega , { } ) ),
+ xetex = table.sorted( table.merged( missing.xetex , { } ) ),
+ }
+
+ -- table.remove(primitives.tex,1) -- get rid of \-
+
+ io.savedata("mult-prm.lua",table.serialize(primitives,true,{ reduce = true, inline = false }))
+
+ context.stoptext()
+
+\stopluacode
diff --git a/Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl b/Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl
new file mode 100644
index 00000000000..3e1d32a916d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/mult-sys.mkxl
@@ -0,0 +1,607 @@
+%D \module
+%D [ file=mult-sys,
+%D version=1996.06.01,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=System,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D In boring module we define a lot of obscure but useful system constants.
+%D By doing so we save lots of memory while at the same time we prevent
+%D ourself making typing errors.
+
+\writestatus{loading}{ConTeXt Multilingual Macros / System}
+
+\unprotect
+
+%D This file is mostly the same as the \MKII\ variant but we keep extending
+%D \MKIV, so it was bout time to have a dedicated variant.
+%D
+%D The constants are grouped in such a way that there is a minimal change of
+%D conflicts.
+%D
+%D \starttyping
+%D \definesystemconstants {word}
+%D \definemessageconstant {word}
+%D \stoptyping
+%D
+%D This commands generate \type{\s!word} and \type{\m!word}.
+
+\definesystemconstant {hans}
+\definesystemconstant {taco}
+\definesystemconstant {wolfgang}
+
+%D First we define some system constants used for both the multi||lingual
+%D interface and multi||linguag typesetting.
+
+% definesystemconstant {slovene}
+% definesystemconstant {cz}
+% definesystemconstant {vn}
+
+\definesystemconstant {afrikaans} \definesystemconstant {af}
+\definesystemconstant {ancientgreek} \definesystemconstant {agr}
+\definesystemconstant {ancientlatin} \definesystemconstant {ala}
+\definesystemconstant {arabic} \definesystemconstant {ar}
+\definesystemconstant {belarussian} \definesystemconstant {be}
+\definesystemconstant {bokmal} \definesystemconstant {nb}
+\definesystemconstant {catalan} \definesystemconstant {ca}
+\definesystemconstant {chinese} \definesystemconstant {cn}
+\definesystemconstant {croatian} \definesystemconstant {hr}
+\definesystemconstant {czech} \definesystemconstant {cs}
+\definesystemconstant {danish} \definesystemconstant {da}
+\definesystemconstant {dutch} \definesystemconstant {nl}
+\definesystemconstant {english} \definesystemconstant {en}
+\definesystemconstant {estonian} \definesystemconstant {et}
+\definesystemconstant {esperanto} % \definesystemconstant {eo}
+\definesystemconstant {farsi} \definesystemconstant {fa} % just persian
+\definesystemconstant {finnish} \definesystemconstant {fi}
+\definesystemconstant {french} \definesystemconstant {fr}
+\definesystemconstant {gbenglish} \definesystemconstant {gb}
+\definesystemconstant {german} \definesystemconstant {de}
+\definesystemconstant {greek} \definesystemconstant {gr}
+\definesystemconstant {hebrew} \definesystemconstant {he}
+\definesystemconstant {yiddish} \definesystemconstant {yi}
+\definesystemconstant {hungarian} \definesystemconstant {hu}
+\definesystemconstant {italian} \definesystemconstant {it}
+\definesystemconstant {japanese} \definesystemconstant {ja}
+\definesystemconstant {korean} \definesystemconstant {kr}
+\definesystemconstant {latin} \definesystemconstant {la}
+\definesystemconstant {lithuanian} \definesystemconstant {lt}
+\definesystemconstant {malayalam} \definesystemconstant {ml}
+\definesystemconstant {macedonian} \definesystemconstant {mk}
+\definesystemconstant {norwegian} \definesystemconstant {no}
+\definesystemconstant {nynorsk} \definesystemconstant {nn}
+\definesystemconstant {persian} \definesystemconstant {pe}
+\definesystemconstant {polish} \definesystemconstant {pl}
+\definesystemconstant {portuguese} \definesystemconstant {pt}
+\definesystemconstant {romanian} \definesystemconstant {ro}
+\definesystemconstant {russian} \definesystemconstant {ru}
+\definesystemconstant {slovak} \definesystemconstant {sk}
+\definesystemconstant {slovenian} \definesystemconstant {sl}
+\definesystemconstant {serbian} \definesystemconstant {sr}
+\definesystemconstant {spanish} \definesystemconstant {es}
+\definesystemconstant {swedish} \definesystemconstant {sv}
+\definesystemconstant {thai} \definesystemconstant {th} % mojca mentioned it at BT2013 but we need more info
+\definesystemconstant {turkish} \definesystemconstant {tr}
+\definesystemconstant {turkmen} \definesystemconstant {tk}
+\definesystemconstant {ukenglish} \definesystemconstant {uk}
+\definesystemconstant {ukrainian} \definesystemconstant {ua}
+\definesystemconstant {usenglish} \definesystemconstant {us}
+\definesystemconstant {vietnamese} \definesystemconstant {vi}
+
+%D Left|-|overs:
+
+\defineinterfaceconstant {HL} {HL}
+\defineinterfaceconstant {VL} {VL}
+\defineinterfaceconstant {NL} {NL}
+
+%D For proper \UNICODE\ support we need a few font related constants.
+
+\definesystemconstant {action}
+\definesystemconstant {all}
+\definesystemconstant {ampersand}
+\definesystemconstant {ascii}
+\definesystemconstant {attribute}
+\definesystemconstant {attr}
+\definesystemconstant {author}
+\definesystemconstant {auto}
+\definesystemconstant {axis}
+\definesystemconstant {exact}
+\definesystemconstant {a}
+\definesystemconstant {bf}
+\definesystemconstant {big}
+\definesystemconstant {binary}
+\definesystemconstant {bi}
+\definesystemconstant {blackboard}
+\definesystemconstant {black}
+\definesystemconstant {BoldItalic}
+\definesystemconstant {BoldSlanted}
+\definesystemconstant {Bold}
+\definesystemconstant {bold}
+\definesystemconstant {both}
+\definesystemconstant {bottomfloat}
+\definesystemconstant {bottom}
+\definesystemconstant {box}
+\definesystemconstant {bp}
+\definesystemconstant {bs}
+\definesystemconstant {b}
+\definesystemconstant {calligraphy}
+\definesystemconstant {Calligraphy}
+\definesystemconstant {Caps}
+\definesystemconstant {casual}
+\definesystemconstant {Casual}
+\definesystemconstant {catcodes}
+\definesystemconstant {catcodetable}
+\definesystemconstant {cc}
+\definesystemconstant {cg}
+\definesystemconstant {chain}
+\definesystemconstant {check}
+\definesystemconstant {child}
+\definesystemconstant {cite}
+\definesystemconstant {class}
+\definesystemconstant {clone}
+\definesystemconstant {cmyk}
+\definesystemconstant {cm}
+\definesystemconstant {code}
+\definesystemconstant {collapsing}
+\definesystemconstant {command}
+\definesystemconstant {compare}
+\definesystemconstant {complex}
+\definesystemconstant {container}
+\definesystemconstant {counter}
+\definesystemconstant {cramped}
+\definesystemconstant {current}
+\definesystemconstant {c}
+\definesystemconstant {data}
+\definesystemconstant {dd}
+\definesystemconstant {decimal}
+\definesystemconstant {DefaultFont}
+\definesystemconstant {default}
+\definesystemconstant {depth}
+\definesystemconstant {designsize}
+\definesystemconstant {direction}
+\definesystemconstant {display}
+\definesystemconstant {document}
+\definesystemconstant {dodo}
+\definesystemconstant {done}
+\definesystemconstant {double}
+\definesystemconstant {do}
+\definesystemconstant {dtp}
+\definesystemconstant {dummy}
+\definesystemconstant {d}
+\definesystemconstant {edge}
+\definesystemconstant {effect}
+\definesystemconstant {empty}
+\definesystemconstant {em}
+\definesystemconstant {environment}
+\definesystemconstant {extensions}
+\definesystemconstant {external}
+\definesystemconstant {ex}
+\definesystemconstant {e}
+\definesystemconstant {fallbacks}
+\definesystemconstant {fallback}
+\definesystemconstant {false}
+\definesystemconstant {fax}
+\definesystemconstant {features}
+\definesystemconstant {file}
+\definesystemconstant {filll}
+\definesystemconstant {fill}
+\definesystemconstant {fil}
+\definesystemconstant {first}
+\definesystemconstant {float}
+\definesystemconstant {font}
+\definesystemconstant {forget}
+\definesystemconstant {format}
+\definesystemconstant {fraktur}
+\definesystemconstant {full}
+\definesystemconstant {f}
+\definesystemconstant {global}
+\definesystemconstant {goodies}
+\definesystemconstant {gray}
+\definesystemconstant {handler}
+\definesystemconstant {handwriting}
+\definesystemconstant {Handwriting}
+\definesystemconstant {hascaption}
+\definesystemconstant {haslevel}
+\definesystemconstant {hasnumber}
+\definesystemconstant {hasparent}
+\definesystemconstant {hassuffix}
+\definesystemconstant {hastitle}
+\definesystemconstant {head}
+\definesystemconstant {height}
+\definesystemconstant {hw}
+\definesystemconstant {hyphenmin}
+\definesystemconstant {indeed}
+\definesystemconstant {initializations}
+\definesystemconstant {insert} % maybe insertclass
+\definesystemconstant {integral}
+\definesystemconstant {internal}
+\definesystemconstant {in}
+\definesystemconstant {italics}
+\definesystemconstant {Italic}
+\definesystemconstant {italic}
+%definesystemconstant {it}
+\definesystemconstant {itemgroupcolumns}
+\definesystemconstant {kernpairs}
+\definesystemconstant {language}
+\definesystemconstant {lcgreek}
+\definesystemconstant {lefthyphenchar}
+\definesystemconstant {lefthyphenmin}
+\definesystemconstant {leftpage}
+\definesystemconstant {left}
+\definesystemconstant {level}
+\definesystemconstant {ligatures}
+\definesystemconstant {line}
+\definesystemconstant {link}
+\definesystemconstant {list}
+\definesystemconstant {local}
+\definesystemconstant {lua}
+\definesystemconstant {mapping}
+\definesystemconstant {map}
+\definesystemconstant {margintext}
+\definesystemconstant {margin}
+\definesystemconstant {marker}
+\definesystemconstant {MathBold} % not used
+\definesystemconstant {MathRomanBold}
+\definesystemconstant {MathRoman}
+\definesystemconstant {math}
+\definesystemconstant {Math} % not used
+\definesystemconstant {mblr}
+\definesystemconstant {mbrl}
+\definesystemconstant {mb}
+\definesystemconstant {middle}
+\definesystemconstant {minus}
+\definesystemconstant {mixedcolumn}
+\definesystemconstant {mi} % maybe some day a special default vector
+\definesystemconstant {mkii}
+\definesystemconstant {mkiv}
+\definesystemconstant {mm}
+\definesystemconstant {mnem} % kind of generic short tag
+\definesystemconstant {mode}
+\definesystemconstant {MonoBoldItalic}
+\definesystemconstant {MonoBoldSlanted}
+\definesystemconstant {MonoBold}
+\definesystemconstant {MonoCaps}
+\definesystemconstant {MonoItalic}
+\definesystemconstant {MonoSlanted}
+\definesystemconstant {Mono}
+\definesystemconstant {mono}
+\definesystemconstant {mrlr}
+\definesystemconstant {mrrl}
+\definesystemconstant {mr}
+\definesystemconstant {multi}
+\definesystemconstant {name}
+\definesystemconstant {next}
+\definesystemconstant {nocite}
+\definesystemconstant {nodepth}
+\definesystemconstant {noheight}
+\definesystemconstant {nomath}
+\definesystemconstant {none}
+\definesystemconstant {normal}
+\definesystemconstant {Normal}
+\definesystemconstant {nowidth}
+\definesystemconstant {numbering}
+\definesystemconstant {number}
+\definesystemconstant {options}
+\definesystemconstant {ord}
+\definesystemconstant {orientation}
+\definesystemconstant {otr}
+\definesystemconstant {pagefloat}
+\definesystemconstant {page}
+\definesystemconstant {paragraph}
+\definesystemconstant {parent}
+\definesystemconstant {patterns}
+\definesystemconstant {pc}
+\definesystemconstant {pickup}
+\definesystemconstant {plural}
+\definesystemconstant {plus}
+%definesystemconstant {pt}
+\definesystemconstant {realpage}
+\definesystemconstant {register}
+\definesystemconstant {Regular}
+\definesystemconstant {regular}
+\definesystemconstant {rel}
+\definesystemconstant {reset}
+\definesystemconstant {reverse}
+\definesystemconstant {rgb}
+\definesystemconstant {righthyphenchar}
+\definesystemconstant {righthyphenmin}
+\definesystemconstant {rightpage}
+\definesystemconstant {right}
+\definesystemconstant {rm}
+\definesystemconstant {rname}
+\definesystemconstant {rscale}
+\definesystemconstant {SansBoldItalic}
+\definesystemconstant {SansBoldSlanted}
+\definesystemconstant {SansBold}
+\definesystemconstant {SansCaps}
+\definesystemconstant {SansItalic}
+\definesystemconstant {SansSlanted}
+\definesystemconstant {Sans}
+\definesystemconstant {sans}
+\definesystemconstant {scriptscript}
+\definesystemconstant {script}
+\definesystemconstant {sc}
+\definesystemconstant {second}
+\definesystemconstant {section}
+\definesystemconstant {SerifBoldItalic}
+\definesystemconstant {SerifBoldSlanted}
+\definesystemconstant {SerifBold}
+\definesystemconstant {SerifCaps}
+\definesystemconstant {SerifItalic}
+\definesystemconstant {SerifSlanted}
+\definesystemconstant {Serif}
+\definesystemconstant {serif}
+\definesystemconstant {setups}
+\definesystemconstant {setup}
+\definesystemconstant {set}
+\definesystemconstant {themaintextcolor}
+\definesystemconstant {simple}
+\definesystemconstant {Simple}
+\definesystemconstant {single}
+\definesystemconstant {singular}
+\definesystemconstant {size}
+\definesystemconstant {slanted}
+\definesystemconstant {Slanted}
+%definesystemconstant {sl}
+\definesystemconstant {smallcaps}
+\definesystemconstant {small}
+\definesystemconstant {somewhere}
+\definesystemconstant {special}
+\definesystemconstant {spec}
+\definesystemconstant {spot}
+\definesystemconstant {spread}
+\definesystemconstant {sp}
+\definesystemconstant {ss}
+\definesystemconstant {start}
+\definesystemconstant {stop}
+\definesystemconstant {subpage}
+\definesystemconstant {subtype}
+\definesystemconstant {sub}
+\definesystemconstant {Support}
+\definesystemconstant {sygreek}
+\definesystemconstant {symbol}
+\definesystemconstant {system} % not yet interfaces messages
+\definesystemconstant {text}
+\definesystemconstant {tex}
+\definesystemconstant {tf}
+\definesystemconstant {third}
+\definesystemconstant {topfloat}
+\definesystemconstant {top}
+\definesystemconstant {to}
+\definesystemconstant {traditional}
+\definesystemconstant {triple}
+\definesystemconstant {true}
+\definesystemconstant {tt}
+\definesystemconstant {Type}
+\definesystemconstant {ucgreek}
+\definesystemconstant {uncramped}
+\definesystemconstant {unexpanded}
+\definesystemconstant {Unicode}
+\definesystemconstant {unknown}
+\definesystemconstant {userdata}
+\definesystemconstant {userpage}
+\definesystemconstant {user}
+\definesystemconstant {vfrac}
+\definesystemconstant {white}
+\definesystemconstant {width}
+\definesystemconstant {xml}
+\definesystemconstant {xmove}
+\definesystemconstant {xoffset}
+\definesystemconstant {xx}
+\definesystemconstant {x}
+\definesystemconstant {ymove}
+\definesystemconstant {yoffset}
+
+%D As the name of their define command states, the next set of constants is used in
+%D the message macro's.
+
+\definemessageconstant {backend}
+\definemessageconstant {check}
+\definemessageconstant {chemicals}
+\definemessageconstant {colors}
+\definemessageconstant {columns}
+\definemessageconstant {fields}
+\definemessageconstant {figures}
+\definemessageconstant {files}
+\definemessageconstant {floatblocks}
+\definemessageconstant {fonts}
+\definemessageconstant {handlings}
+\definemessageconstant {interactions}
+\definemessageconstant {javascripts}
+\definemessageconstant {languages}
+\definemessageconstant {layouts}
+\definemessageconstant {lua}
+\definemessageconstant {metapost}
+\definemessageconstant {publications}
+\definemessageconstant {references}
+\definemessageconstant {regimes}
+\definemessageconstant {structures}
+\definemessageconstant {symbols}
+\definemessageconstant {system}
+\definemessageconstant {textblocks}
+\definemessageconstant {verbatims}
+\definemessageconstant {versions}
+
+%D When we use numbers and dimensions the same applies as with the keywords like
+%D \type {width} and \type {plus} mentioned earlier.
+
+\immutable\def\!!ten {10}
+\immutable\def\!!twelve {12}
+\immutable\def\!!hundred {100}
+\immutable\def\!!thousand {1000}
+\immutable\def\!!tenthousand {10000}
+\immutable\def\!!maxcard {65536}
+\immutable\def\!!medcard {32768}
+
+\immutable\def\!!zeropoint {0pt}
+\immutable\def\!!onepoint {1pt}
+\immutable\def\!!twopoint {2pt}
+\immutable\def\!!threepoint {3pt}
+\immutable\def\!!fourpoint {4pt}
+\immutable\def\!!fivepoint {5pt}
+\immutable\def\!!sixpoint {6pt}
+\immutable\def\!!sevenpoint {7pt}
+\immutable\def\!!eightpoint {8pt}
+\immutable\def\!!ninepoint {9pt}
+\immutable\def\!!tenpoint {10pt}
+\immutable\def\!!elevenpoint {11pt}
+\immutable\def\!!twelvepoint {12pt}
+\immutable\def\!!fourteenpointfour {14.4pt}
+
+\immutable\def\!!plustoken {+} % todo: \??plustoken
+\immutable\def\!!minustoken {-} % todo: \??minustoken
+
+\immutable\def\__unknown__ {\string\\//} % unlikely value
+
+%D Variables are composed of a command specific tag and a user supplied variable
+%D (system constant). The tag \type {du} for instance is available as \type {\??du}
+%D and expands to \type {@@du} in composed variables.
+
+\definesystemvariable {du} % dummy, will stay
+
+% bibl:
+
+\definesystemvariable {pv} % PublicationVariable
+\definesystemvariable {pb} % PuBlication
+
+% needs checking (namespaces now)
+
+\definesystemvariable {fw} % simpleFonts by Wolfgang
+
+% old pragma
+
+\definesystemvariable {kt} % KonTakten
+\definesystemvariable {kw} % KontaktWaarde
+\definesystemvariable {st} % STickers
+\definesystemvariable {km} % KenMerk
+
+% mkii
+
+\definesystemvariable {xf} % XML File (xtag)
+\definesystemvariable {xp} % XML Processing (xtag, so still needed)
+\definesystemvariable {fo} % xml FO (xtag)
+\definesystemvariable {fx} % FoXet
+
+% mkiv
+
+%D Next we define some language independant one letter variables and keywords. We can
+%D actually make these system variables.
+
+\defineinterfaceconstant {x} {x}
+\defineinterfaceconstant {y} {y}
+\defineinterfaceconstant {w} {w}
+\defineinterfaceconstant {h} {h}
+\defineinterfaceconstant {s} {s}
+\defineinterfaceconstant {t} {t}
+
+\defineinterfaceconstant {a} {a} % can go
+\defineinterfaceconstant {b} {b} % can go
+\defineinterfaceconstant {c} {c} % can go
+\defineinterfaceconstant {d} {d} % can go
+\defineinterfaceconstant {e} {e} % can go
+\defineinterfaceconstant {f} {f} % can go
+
+%defineinterfaceconstant {s} {s}
+\defineinterfaceconstant {r} {r}
+\defineinterfaceconstant {g} {g}
+%defineinterfaceconstant {b} {b}
+%defineinterfaceconstant {c} {c}
+\defineinterfaceconstant {m} {m}
+%defineinterfaceconstant {y} {y}
+\defineinterfaceconstant {k} {k}
+%defineinterfaceconstant {a} {a} % alternative
+%defineinterfaceconstant {t} {t} % transparency
+\defineinterfaceconstant {p} {p} % percentage
+%defineinterfaceconstant {h} {h}
+%defineinterfaceconstant {s} {s}
+\defineinterfaceconstant {v} {v}
+
+\defineinterfaceconstant {rgb} {rgb}
+\defineinterfaceconstant {cmyk} {cmyk}
+\defineinterfaceconstant {mp} {mp}
+
+\defineinterfacevariable {rgb} {rgb}
+\defineinterfacevariable {cmyk} {cmyk}
+\defineinterfacevariable {mp} {mp}
+
+\defineinterfacevariable {s} {s}
+
+\defineinterfacevariable {a} {a}
+\defineinterfacevariable {b} {b}
+\defineinterfacevariable {c} {c}
+\defineinterfacevariable {d} {d}
+
+%D Special purpose variables:
+
+\immutable\def\v!oddeven#1{\ifodd#1\v!odd\else\v!even\fi}
+
+%D The names of files and their extensions are fixed. \CONTEXT\ uses as less
+%D files as possible. Utility files can be recognized by the first two
+%D characters of the extension: \type {tu}.
+
+%definefileconstant {utilityfilename} {texutil}
+%definefileconstant {blockextension} {tub}
+%definefileconstant {figureextension} {tuf}
+%definefileconstant {inputextension} {tui}
+%definefileconstant {outputextension} {tuo} % tup for previous run
+%definefileconstant {optionextension} {top}
+%definefileconstant {temporaryextension} {tmp}
+%definefileconstant {patternsextension} {pat}
+%definefileconstant {hyphensextension} {hyp}
+%definefileconstant {fontmapextension} {map}
+\definefileconstant {bibextension} {bbl}
+
+%D These files are loaded at start||up. They may contain system specific setups (or
+%D calls to other files), old macro's, to garantee compatibility and new macro's noy
+%D yet present in the format.
+
+\definefileconstant {sysfilename} {cont-sys.mkxl}
+\definefileconstant {newfilename} {cont-new.mkxl}
+\definefileconstant {locfilename} {cont-loc.mkxl}
+\definefileconstant {expfilename} {cont-exp.mkxl}
+\definefileconstant {fntfilename} {cont-fnt.mkxl} % not yet used
+\definefileconstant {gdsfilename} {cont-fnt.lfg} % not yet used
+
+%D The setup files for the language, font, color and special subsystems have a common
+%D prefix. This means that we have at most three characters for unique filenames.
+
+\definefileconstant {colo_run} {s-colors-show}
+\definefileconstant {font_run} {s-fonts-show}
+\definefileconstant {page_run} {s-layout-show}
+\definefileconstant {symb_run} {s-symbols-show}
+\definefileconstant {publ_tra} {s-publications-show}
+
+%D For figure inclusion we need(ed):
+
+%defineinterfaceconstant {tif} {tif}
+%defineinterfaceconstant {eps} {eps}
+%defineinterfaceconstant {mps} {mps}
+%defineinterfaceconstant {jpg} {jpg}
+%defineinterfaceconstant {pdf} {pdf}
+%defineinterfaceconstant {png} {png}
+%defineinterfaceconstant {avi} {avi}
+%defineinterfaceconstant {mov} {mov}
+%defineinterfaceconstant {svg} {svg}
+\defineinterfaceconstant {tex} {tex} % Also gone?
+%defineinterfaceconstant {tmp} {tmp}
+%defineinterfaceconstant {cld} {cld}
+
+%D A careful reader will have noticed that in the module \type {mult-ini} we defined
+%D \type {\selectinterface}. We were not yet able to actually select an interface,
+%D because we still had to define the constants and variables. Now we've done so,
+%D selection is permitted.
+
+\selectinterface
+
+%D Ok, here are some more, because we've got ourselves some extensions to \CONTEXT.
+
+\definemessageconstant {addresses}
+\definemessageconstant {documents}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-acc.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-acc.lmt
new file mode 100644
index 00000000000..2c3302a3ea7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-acc.lmt
@@ -0,0 +1,112 @@
+if not modules then modules = { } end modules ['node-acc'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- see mkiv lua module for some experimental unused code
+
+local nodes, node = nodes, node
+
+local tasks = nodes.tasks
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+local tonode = nodes.tonode
+
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getattr = nuts.getattr
+local getlist = nuts.getlist
+local getchar = nuts.getchar
+local getnext = nuts.getnext
+
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setchar = nuts.setchar
+local setsubtype = nuts.setsubtype
+local getwidth = nuts.getwidth
+local setwidth = nuts.setwidth
+
+local nextglyph = nuts.traversers.glyph
+local nextnode = nuts.traversers.node
+
+local copy_node = nuts.copy
+local insert_after = nuts.insert_after
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+
+local glue_code = nodecodes.glue
+local glyph_code = nodecodes.glyph
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local userskip_code = gluecodes.user
+local spaceskip_code = gluecodes.spaceskip
+local xspaceskip_code = gluecodes.xspaceskip
+
+local a_characters = attributes.private("characters")
+
+local nofreplaced = 0
+
+-- todo: nbsp etc
+-- todo: collapse kerns (not needed, backend does this)
+-- todo: maybe cache as we now create many nodes
+-- todo: check for subtype related to spacing (13/14 but most seems to be user anyway)
+
+local trace = false trackers.register("backend.spaces", function(v) trace = v end)
+local slot = nil
+
+local function injectspaces(head)
+ -- This can become two fast loops or we just move this to the backend where we can
+ -- also check for spaces (it actually is rather old code that relates to tagging
+ -- and so, which was implemented rather early in the mkiv saga).
+ local p, p_id
+ local n = head
+ while n do
+ local id = getid(n)
+ if id == glue_code then
+ if p and getid(p) == glyph_code then
+ local s = getsubtype(n)
+ if s == spaceskip_code or s == xspaceskip_code then
+ local g = copy_node(p)
+ local a = getattr(n,a_characters)
+ setchar(g,slot)
+ setlink(p,g,n)
+ setwidth(n,getwidth(n) - getwidth(g))
+ if a then
+ setattr(g,a_characters,a)
+ end
+ setattr(n,a_characters,0)
+ nofreplaced = nofreplaced + 1
+ end
+ end
+ elseif id == hlist_code or id == vlist_code then
+ injectspaces(getlist(n),slot)
+ end
+ p_id = id
+ p = n
+ n = getnext(n)
+ end
+ return head
+end
+
+nodes.handlers.accessibility = function(head)
+ if trace then
+ if not slot then
+ slot = fonts.helpers.privateslot("visualspace")
+ end
+ else
+ slot = 32
+ end
+ return injectspaces(head,slot)
+end
+
+statistics.register("inserted spaces in output",function()
+ if nofreplaced > 0 then
+ return nofreplaced
+ end
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-aux.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-aux.lmt
new file mode 100644
index 00000000000..d952ec41b51
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-aux.lmt
@@ -0,0 +1,396 @@
+if not modules then modules = { } end modules ['node-aux'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: n1 .. n2 : __concat metatable
+
+local type, tostring = type, tostring
+
+local nodes = nodes
+local context = context
+
+local utfvalues = utf.values
+
+local nodecodes = nodes.nodecodes
+
+local glyph_code = nodecodes.glyph
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local attributelist_code = nodecodes.attributelist -- temporary
+local par_code = nodecodes.par
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+local vianuts = nuts.vianuts
+
+local getbox = nuts.getbox
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local getattr = nuts.getattr
+local getboth = nuts.getboth
+local getprev = nuts.getprev
+local getwidth = nuts.getwidth
+local setwidth = nuts.setwidth
+local getboxglue = nuts.getboxglue
+local setboxglue = nuts.setboxglue
+
+local setfield = nuts.setfield
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setattrlist = nuts.setattrlist
+
+local traversers = nuts.traversers
+local nextnode = traversers.node
+local nextglyph = traversers.glyph
+
+local flush_node = nuts.flush
+local flush_list = nuts.flush_list
+local hpack_nodes = nuts.hpack
+local unset_attribute = nuts.unset_attribute
+local first_glyph = nuts.first_glyph
+local copy_node = nuts.copy
+local find_tail = nuts.tail
+local getbox = nuts.getbox
+local count = nuts.count
+local isglyph = nuts.isglyph
+
+local nodepool = nuts.pool
+local new_glue = nodepool.glue
+local new_glyph = nodepool.glyph
+
+local unsetvalue = attributes.unsetvalue
+
+local current_font = font.current
+
+local texsetbox = tex.setbox
+
+local report_error = logs.reporter("node-aux:error")
+
+local function takebox(id)
+ local box = getbox(id)
+ if box then
+ local list = getlist(box)
+ setlist(box,nil)
+ local copy = copy_node(box)
+ if list then
+ setlist(copy,list)
+ end
+ texsetbox(id,false)
+ return copy
+ end
+end
+
+function nodes.takebox(id)
+ local b = takebox(id)
+ if b then
+ return tonode(b)
+ end
+end
+
+local splitbox = tex.splitbox
+nodes.splitbox = splitbox
+
+function nuts.splitbox(id,height)
+ return tonut(splitbox(id,height))
+end
+
+-- function nodes.takelist(n)
+-- -- when we need it
+-- end
+
+function nuts.takelist(n)
+ local l = getlist(n)
+ setlist(n)
+ flush_node(n)
+ return l
+end
+
+nuts.takebox = takebox
+tex.takebox = nodes.takebox -- sometimes more clear
+
+-- so far
+
+local function repackhlist(list,...)
+ local temp, b = hpack_nodes(list,...)
+ list = getlist(temp)
+ setlist(temp)
+ flush_node(temp)
+ return list, b
+end
+
+nuts.repackhlist = repackhlist
+
+function nodes.repackhlist(list,...)
+ local list, b = repackhlist(tonut(list),...)
+ return tonode(list), b
+end
+
+local function set_attributes(head,attr,value)
+ for n, id in nextnode, head do
+ setattr(n,attr,value)
+ if id == hlist_node or id == vlist_node then
+ set_attributes(getlist(n),attr,value)
+ end
+ end
+end
+
+local function set_unset_attributes(head,attr,value)
+ for n, id in nextnode, head do
+ if not getattr(n,attr) then
+ setattr(n,attr,value)
+ end
+ if id == hlist_code or id == vlist_code then
+ set_unset_attributes(getlist(n),attr,value)
+ end
+ end
+end
+
+local function unset_attributes(head,attr)
+ for n, id in nextnode, head do
+ setattr(n,attr,unsetvalue)
+ if id == hlist_code or id == vlist_code then
+ unset_attributes(getlist(n),attr)
+ end
+ end
+end
+
+-- for old times sake
+
+nuts.setattribute = nuts.setattr nodes.setattribute = nodes.setattr
+nuts.getattribute = nuts.getattr nodes.getattribute = nodes.getattr
+nuts.unsetattribute = nuts.unset_attribute nodes.unsetattribute = nodes.unset_attribute
+nuts.has_attribute = nuts.has_attribute nodes.has_attribute = nodes.has_attribute
+nuts.firstglyph = nuts.first_glyph nodes.firstglyph = nodes.first_glyph
+
+nuts.setattributes = set_attributes nodes.setattributes = vianuts(set_attributes)
+nuts.setunsetattributes = set_unset_attributes nodes.setunsetattributes = vianuts(set_unset_attributes)
+nuts.unsetattributes = unset_attributes nodes.unsetattributes = vianuts(unset_attributes)
+
+function nuts.firstcharacter(n,untagged) -- tagged == subtype > 255
+ if untagged then
+ return first_glyph(n)
+ else
+ for g in nextglyph ,n do
+ return g
+ end
+ end
+end
+
+local function firstcharinbox(n)
+ local l = getlist(getbox(n))
+ if l then
+ for g, c in nextglyph, l do
+ return c
+ end
+ end
+ return 0
+end
+
+nuts .firstcharinbox = firstcharinbox
+nodes.firstcharinbox = firstcharinbox -- hm, ok ?
+nodes.firstcharacter = vianuts(firstcharacter)
+
+interfaces.implement {
+ name = "buildtextaccent",
+ arguments = "integer",
+ actions = function(n) -- Is this crap really used? Or was it an experiment?
+ local char = firstcharinbox(n)
+ if char > 0 then
+ -- context.accent(false,char)
+ context([[\accent%s\relax]],char)
+ end
+ end
+}
+
+-- this depends on fonts, so we have a funny dependency ... will be
+-- sorted out .. we could make tonodes a plugin into this
+
+local function tonodes(str,fnt,attr) -- (str,template_glyph) -- moved from blob-ini
+ if not str or str == "" then
+ return
+ end
+ local head, tail, space, fnt, template = nil, nil, nil, nil, nil
+ if not fnt then
+ fnt = current_font()
+ elseif type(fnt) ~= "number" and getid(fnt) == glyph_code then -- so it has to be a real node
+ fnt, template = nil, tonut(fnt)
+ end
+ for s in utfvalues(str) do
+ local n
+ if s == 32 then
+ if space then
+ n = copy_node(space)
+ elseif fonts then -- depedency
+ local parameters = fonts.hashes.identifiers[fnt].parameters
+ space = new_glue(parameters.space,parameters.space_stretch,parameters.space_shrink)
+ n = space
+ end
+ elseif template then
+ n = copy_node(template)
+ setvalue(n,"char",s)
+ else
+ n = new_glyph(fnt,s)
+ end
+ if attr then -- normally false when template
+ setattrlist(n,attr)
+ end
+ if head then
+ setlink(tail,n)
+ else
+ head = n
+ end
+ tail = n
+ end
+ return head, tail
+end
+
+nuts.tonodes = tonodes
+
+nodes.tonodes = function(str,fnt,attr)
+ local head, tail = tonodes(str,fnt,attr)
+ return tonode(head), tonode(tail)
+end
+
+local function link(list,currentfont,currentattr,head,tail) -- an oldie, might be replaced
+ for i=1,#list do
+ local n = list[i]
+ if n then
+ local tn = type(n)
+ if tn == "string" then
+ if #tn > 0 then
+ if not currentfont then
+ currentfont = current_font()
+ end
+ local h, t = tonodes(n,currentfont,currentattr)
+ if not h then
+ -- skip
+ elseif not head then
+ head, tail = h, t
+ else
+ setnext(tail,h)
+ setprev(h,t)
+ tail = t
+ end
+ end
+ elseif tn == "table" then
+ if #tn > 0 then
+ if not currentfont then
+ currentfont = current_font()
+ end
+ head, tail = link(n,currentfont,currentattr,head,tail)
+ end
+ elseif not head then
+ head = n
+ tail = find_tail(n)
+ elseif getid(n) == attributelist_code then
+ -- weird case
+ report_error("weird node type in list at index %s:",i)
+ for i=1,#list do
+ local l = list[i]
+ report_error("%3i: %s %S",i,getid(l) == attributelist_code and "!" or ">",l)
+ end
+ os.exit()
+ else
+ setlink(tail,n)
+ if getnext(n) then
+ tail = find_tail(n)
+ else
+ tail = n
+ end
+ end
+ else
+ -- permitting nil is convenient
+ end
+ end
+ return head, tail
+end
+
+nuts.link = link
+
+nodes.link = function(list,currentfont,currentattr,head,tail)
+ local head, tail = link(list,currentfont,currentattr,tonut(head),tonut(tail))
+ return tonode(head), tonode(tail)
+end
+
+local function locate(start,wantedid,wantedsubtype)
+ for n, id, subtype in nextnode, start do
+ if id == wantedid then
+ if not wantedsubtype or subtype == wantedsubtype then
+ return n
+ end
+ elseif id == hlist_code or id == vlist_code then
+ local found = locate(getlist(n),wantedid,wantedsubtype)
+ if found then
+ return found
+ end
+ end
+ end
+end
+
+nuts.locate = locate
+
+function nodes.locate(start,wantedid,wantedsubtype)
+ local found = locate(tonut(start),wantedid,wantedsubtype)
+ return found and tonode(found)
+end
+
+local function rehpack(n,width)
+ local head = getlist(n)
+ local size = width or getwidth(n)
+ local temp = hpack_nodes(head,size,"exactly")
+ setwidth(n,size)
+ local set, order, sign = getboxglue(temp)
+ setboxglue(n,set,order,sign)
+ setlist(temp)
+ flush_node(temp)
+ return n
+end
+
+nuts.rehpack = rehpack
+
+function nodes.rehpack(n,...)
+ rehpack(tonut(n),...)
+end
+
+do
+
+ local parcodes = nodes.parcodes
+ local hmodepar_code = parcodes.hmode_par
+ local vmodepar_code = parcodes.vmode_par
+
+ local getnest = tex.getnest
+ local getsubtype = nuts.getsubtype
+
+ function nuts.setparproperty(action,...)
+ local tail = tonut(getnest().tail)
+ while tail do
+ if getid(tail) == par_code then
+ local s = getsubtype(tail)
+ if s == hmodepar_code or s == vmodepar_code then
+ return action(tail,...)
+ else
+ -- something is wrong here
+ end
+ end
+ tail = getprev(tail)
+ end
+ end
+
+ local getsubtype = nodes.getsubtype
+
+ function nodes.start_of_par(n)
+ local s = getsubtype(n)
+ return s == hmodepar_code or s == vmodepar_code
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-bck.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-bck.lmt
new file mode 100644
index 00000000000..9dff3ac40cb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-bck.lmt
@@ -0,0 +1,294 @@
+if not modules then modules = { } end modules ['node-bck'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to node-bck.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- beware, this one takes quite some runtime, so we need a status flag
+-- maybe some page related state
+
+-- todo: done (or just get rid of done altogether) ... saves no purpose
+-- any longer
+
+local attributes, nodes, node = attributes, nodes, node
+
+local enableaction = nodes.tasks.enableaction
+
+local nodecodes = nodes.nodecodes
+local listcodes = nodes.listcodes
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local alignmentlist_code = listcodes.alignment
+local celllist_code = listcodes.cell
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getattr = nuts.getattr
+local getsubtype = nuts.getsubtype
+local getwhd = nuts.getwhd
+local getwidth = nuts.getwidth
+local getprop = nuts.getprop
+
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setattributelist = nuts.setattributelist
+local setprop = nuts.setprop
+
+local takebox = nuts.takebox
+local findtail = nuts.tail
+
+local nextnode = nuts.traversers.node
+local nexthlist = nuts.traversers.hlist
+local nextlist = nuts.traversers.list
+
+local flush_node_list = nuts.flush_list
+
+local new_rule = nodepool.rule
+local new_kern = nodepool.kern
+local new_hlist = nodepool.hlist
+
+local privateattributes = attributes.private
+local unsetvalue = attributes.unsetvalue
+
+local linefillers = nodes.linefillers
+
+local a_background = privateattributes("background")
+local a_alignbackground = privateattributes("alignbackground")
+local a_linefiller = privateattributes("linefiller")
+local a_ruled = privateattributes("ruled")
+
+local trace_alignment = false
+local report_alignment = logs.reporter("backgrounds","alignment")
+
+trackers.register("backgrounds.alignments",function(v) trace_alignment = v end)
+
+-- We can't use listbuilders with where=alignment because at that stage we have
+-- unset boxes. Also, post_linebreak is unsuitable for nested processing as we
+-- get the same stuff many times (wrapped again and again).
+--
+-- After many experiments with different callbacks the shipout is still the best
+-- place but then we need to store some settings longer or save them with the node.
+-- For color only we can get away with it with an extra attribute flagging a row
+-- but for more complex stuff we can better do as we do here now.
+
+local overshoot = math.floor(65781/5) -- could be an option per table (just also store it)
+
+local function colored_a(current,list,template,id)
+ local width, height, depth = getwhd(current)
+ local total = height + depth
+ if width > 0 and total > 0 then
+ local rule = nil
+ --
+ local a = getattr(template,a_linefiller)
+ if a then
+ local d = linefillers.data[a%1000]
+ if d then
+ rule = linefillers.filler(template,d,width,height,depth)
+ end
+ end
+ --
+ if not rule then
+ rule = new_rule(width,height,depth)
+ setattributelist(rule,template)
+ end
+ local back = new_kern(-((id == vlist_code and total) or width))
+ return setlink(rule,back,list)
+ end
+end
+
+local function colored_b(current,list,template,id,indent)
+ local width, height, depth = getwhd(current)
+ local total = height + depth
+ if width > 0 and total > 0 then
+ local fore = (indent ~= 0) and new_kern(indent)
+ local rule = nil
+ --
+ local a = getattr(template,a_linefiller)
+ if a then
+ local d = linefillers.data[a%1000]
+ if d then
+ rule = linefillers.filler(template,d,width-indent,height,depth)
+ end
+ end
+ --
+ if not rule then
+ rule = new_rule(width-indent,height+overshoot,depth+overshoot)
+ setattributelist(rule,template)
+ end
+ if overshoot == 0 then
+ local back = new_kern(-((id == vlist_code and total) or width))
+ return setlink(fore,rule,back,list)
+ else
+ rule = new_hlist(rule)
+ return setlink(fore,rule,list)
+ end
+ end
+end
+
+local templates = { }
+local currentrow = 0
+local enabled = false
+local alignments = false
+
+local function add_alignbackgrounds(head,list)
+ for current, id, subtype, list in nextlist, list do
+ if list and id == hlist_code and subtype == celllist_code then
+ for template in nexthlist, list do
+ local background = getattr(template,a_alignbackground)
+ if background then
+ local list = colored_a(current,list,template)
+ if list then
+ setlist(current,list)
+ end
+ setattr(template,a_alignbackground,unsetvalue) -- or property
+ end
+ break
+ end
+ end
+ end
+ local template = getprop(head,"alignmentchecked")
+ if template then
+ list = colored_b(head,list,template[1],hlist_code,template[2])
+ flush_node_list(template)
+ templates[currentrow] = false
+ return list
+ end
+end
+
+local function add_backgrounds(head,id,list)
+ if list then
+ for current, id, subtype, list in nextlist, list do
+ if list then
+ if alignments and subtype == alignmentlist_code then
+ local l = add_alignbackgrounds(current,list)
+ if l then
+ list = l
+ setlist(current,list)
+ end
+ end
+ local l = add_backgrounds(current,id,list)
+ if l then
+ list = l
+ setlist(current,l)
+ end
+ end
+ end
+ end
+ if id == hlist_code or id == vlist_code then
+ local background = getattr(head,a_background)
+ if background then
+ list = colored_a(head,list,head,id)
+ -- not needed
+ setattr(head,a_background,unsetvalue) -- or property -- todo
+ return list
+ end
+ end
+end
+
+function nodes.handlers.backgrounds(head)
+ add_backgrounds(head,getid(head),getlist(head))
+ return head
+end
+
+function nodes.handlers.backgroundspage(head,where)
+ if head and where == "alignment" then
+ for n in nexthlist, head do
+ local p = getprop(n,"alignmentchecked")
+ if not p and getsubtype(n) == alignmentlist_code then
+ currentrow = currentrow + 1
+ local template = templates[currentrow]
+ if trace_alignment then
+ report_alignment("%03i %s %s",currentrow,"page",template and "+" or "-")
+ end
+ setprop(n,"alignmentchecked",template)
+ end
+ end
+ end
+ return head
+end
+
+function nodes.handlers.backgroundsvbox(head,where)
+ if head and where == "vbox" then
+ local list = getlist(head)
+ if list then
+ for n in nexthlist, list do
+ local p = getprop(n,"alignmentchecked")
+ if not p and getsubtype(n) == alignmentlist_code then
+ currentrow = currentrow + 1
+ local template = templates[currentrow]
+ if trace_alignment then
+ report_alignment("%03i %s %s",currentrow,"vbox",template and "+" or "-")
+ end
+ setprop(n,"alignmentchecked",template)
+ end
+ end
+ end
+ end
+ return head
+end
+
+-- interfaces.implement {
+-- name = "enablebackgroundboxes",
+-- onlyonce = true,
+-- actions = enableaction,
+-- arguments = { "'shipouts'", "'nodes.handlers.backgrounds'" }
+-- }
+--
+-- doing it in the shipout works as well but this is nicer
+
+local function enable(alignmentstoo)
+ if not enabled then
+ enabled = true
+ enableaction("shipouts","nodes.handlers.backgrounds")
+ end
+ if not alignments and alignmentstoo then
+ alignments = true
+ enableaction("vboxbuilders","nodes.handlers.backgroundsvbox")
+ enableaction("mvlbuilders", "nodes.handlers.backgroundspage")
+ end
+end
+
+interfaces.implement {
+ name = "enablebackgroundboxes",
+ onlyonce = true,
+ actions = enable,
+}
+
+interfaces.implement {
+ name = "enablebackgroundalign",
+ onlyonce = true,
+ actions = function()
+ enable(true)
+ end,
+}
+
+interfaces.implement {
+ name = "setbackgroundrowdata",
+ arguments = { "integer", "integer", "dimension" },
+ actions = function(row,box,indent)
+ row = row -1 -- better here than in tex
+ if box == 0 then
+ templates[row] = false
+ else
+ templates[row] = { takebox(box), indent }
+ end
+ end,
+}
+
+interfaces.implement {
+ name = "resetbackgroundrowdata",
+ actions = function()
+ currentrow = 0
+ end,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-bck.mkxl b/Master/texmf-dist/tex/context/base/mkxl/node-bck.mkxl
new file mode 100644
index 00000000000..b456313df3b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-bck.mkxl
@@ -0,0 +1,80 @@
+%D \module
+%D [ file=node-bck,
+%D version=2009.06.08,
+%D title=\CONTEXT\ Node Macros,
+%D subtitle=Backgrounds,
+%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 Support / Backgrounds}
+
+%D This is first attempt to replacing backgrounds in a few tables
+%D mechanisms. When used more frequently, we can store the color
+%D spec in the attribute.
+
+\unprotect
+
+\registerctxluafile{node-bck}{autosuffix,optimize}
+
+% \backgroundvbox[green] {\input tufte } \par
+% \backgroundvbox[blue] {\input ward } \par
+% \backgroundvbox[red] {\input knuth } \par
+% \backgroundhbox[yellow]{\rotate[rotation=45]{hello world}} \par
+
+\permanent\def\colorattr#1%
+ {\ifcsname\??colorattribute\currentcolorprefix#1\endcsname
+ \node_backgrounds_thecolorattr{\currentcolorprefix#1}%
+ \orelse\ifcsname\??colorattribute#1\endcsname
+ \node_backgrounds_thecolorattr{#1}%
+ \fi}
+
+\def\node_backgrounds_thecolorattr#1%
+ {attr \colormodelattribute \c_attr_colormodel
+ attr \colorattribute \lastnamedcs
+ attr \transparencyattribute \rawtransparencyattribute{#1} } % can be optimized
+
+\permanent\def\thecolorattr#1%
+ {attr \colormodelattribute \c_attr_colormodel
+ attr \colorattribute \csname\??colorattribute#1\endcsname
+ attr \transparencyattribute \rawtransparencyattribute{#1} } % can be optimized
+
+\permanent\def\backgroundcolorattr#1%
+ {\ifcsname\??colorattribute\currentcolorprefix#1\endcsname
+ \node_backgrounds_thebackgroundcolorattr{\currentcolorprefix#1}%
+ \orelse\ifcsname\??colorattribute#1\endcsname
+ \node_backgrounds_thebackgroundcolorattr{#1}%
+ \fi}
+
+\permanent\def\thebackgroundcolorattr#1%
+ {attr \backgroundattribute \plusone
+ attr \colormodelattribute \c_attr_colormodel
+ attr \colorattribute \csname\??colorattribute#1\endcsname
+ attr \transparencyattribute \rawtransparencyattribute{#1} } % can be optimized
+
+\def\node_backgrounds_thebackgroundcolorattr#1%
+ {attr \backgroundattribute \plusone
+ attr \colormodelattribute \c_attr_colormodel
+ attr \colorattribute \lastnamedcs
+ attr \transparencyattribute \rawtransparencyattribute{#1} } % can be optimized
+
+\permanent\def\thealignbackgroundcolorattr#1%
+ {attr \alignbackgroundattribute \plusone
+ attr \colormodelattribute \c_attr_colormodel
+ attr \colorattribute \csname\??colorattribute#1\endcsname
+ attr \transparencyattribute \rawtransparencyattribute{#1} } % can be optimized
+
+\permanent\protected\def\backgroundhbox{\node_backgrounds_boxes_add\hbox}
+\permanent\protected\def\backgroundvbox{\node_backgrounds_boxes_add\vbox}
+\permanent\protected\def\backgroundvtop{\node_backgrounds_boxes_add\vtop}
+\permanent\protected\def\backgroundline{\dontleavehmode\node_backgrounds_boxes_add\hbox}
+
+\def\node_backgrounds_boxes_add#1[#2]%
+ {\clf_enablebackgroundboxes
+ #1\backgroundcolorattr{#2}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-cmp.lua b/Master/texmf-dist/tex/context/base/mkxl/node-cmp.lmt
index e13e93d1f14..21fd700f093 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/node-cmp.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-cmp.lmt
@@ -1,3 +1,14 @@
+if not modules then modules = { } end modules ['node-cmp'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is a LuaTeX compatibility module. The code below is no longer
+-- present in node-met or node-aux. These functions are rarely used.
+
if node.count then
return
end
@@ -181,7 +192,6 @@ end
local uses_font = direct.uses_font
local has_glyph = direct.has_glyph
local protrusion_skippable = direct.protrusion_skippable
-local prepend_prevdepth = direct.prepend_prevdepth
local make_extensible = direct.make_extensible
function node.uses_font(n,f)
@@ -196,11 +206,6 @@ function node.protrusion_skippable(n)
return protrusion_skippable(todirect(n))
end
-function node.prepend_prevdepth(n)
- local n, d = prepend_prevdepth(todirect(n))
- return tonode(n), d
-end
-
function node.make_extensible(...)
local n = make_extensible(...)
return n and tonode(n) or nil
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-ext.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-ext.lmt
new file mode 100644
index 00000000000..2f909cd3d1a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-ext.lmt
@@ -0,0 +1,650 @@
+if not modules then modules = { } end modules ['back-out'] = {
+ version = 1.001,
+ comment = "companion to back-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, unpack, rawset = type, unpack, type
+local loadstring = loadstring
+local sind, cosd, abs = math.sind, math.cosd, math.abs
+local insert, remove = table.insert, table.remove
+
+local context = context
+local implement = interfaces.implement
+
+local allocate = utilities.storage.allocate
+
+local formatters = string.formatters
+
+local get = token.get_index -- getters
+local scanners = tokens.scanners
+local scaninteger = scanners.integer
+local scanstring = scanners.string
+local scankeyword = scanners.keyword
+local scantokenlist = scanners.tokenlist
+local scannumber = scanners.number
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+local copynut = nuts.copy
+local nutpool = nuts.pool
+local nodepool = nodes.pool
+
+local nodeproperties = nodes.properties.data
+
+local register = nutpool.register
+local newnut = nuts.new
+local tonode = nodes.tonode
+
+-- Whatsits are a generic node type with very few fields. We use them to implement
+-- whatever we like. Some are good old tex whatsits but many are specific to the
+-- macro package. They are part of the backend.
+
+backends = backends or { }
+local backends = backends
+
+local whatsit_code = nodes.nodecodes.whatsit
+local whatsitcodes = allocate { }
+nodes.whatsitcodes = whatsitcodes
+local lastwhatsit = 0
+
+nodes.subtypes.whatsit = whatsitcodes
+
+local function registerwhatsit(name)
+ lastwhatsit = lastwhatsit + 1
+ whatsitcodes[lastwhatsit] = name
+ whatsitcodes[name] = lastwhatsit
+ return lastwhatsit
+end
+
+local function registerwhatsitnode(name)
+ return register(newnut(whatsit_code,registerwhatsit(name)))
+end
+
+-- We only have a subset of literals. In fact, we try to avoid literals.
+
+do
+
+ local literalvalues = allocate { }
+ nodes.literalvalues = literalvalues
+ local lastliteral = 0
+ local literalnode = registerwhatsitnode("literal")
+
+ local function registerliteral(name,alias)
+ lastliteral = lastliteral + 1
+ literalvalues[lastliteral] = name
+ literalvalues[name] = lastliteral
+ if alias then
+ literalvalues[alias] = lastliteral
+ end
+ return lastliteral
+ end
+
+ local originliteral_code = registerliteral("origin")
+ local pageliteral_code = registerliteral("page")
+ local directliteral_code = registerliteral("always","direct")
+ local rawliteral_code = registerliteral("raw")
+ local textliteral_code = registerliteral("text") -- not to be used
+ local fontliteral_code = registerliteral("font") -- not to be used
+
+ function nutpool.originliteral(str) local t = copynut(literalnode) nodeproperties[t] = { data = str, mode = originliteral_code } return t end
+ function nutpool.pageliteral (str) local t = copynut(literalnode) nodeproperties[t] = { data = str, mode = pageliteral_code } return t end
+ function nutpool.directliteral(str) local t = copynut(literalnode) nodeproperties[t] = { data = str, mode = directliteral_code } return t end
+ function nutpool.rawliteral (str) local t = copynut(literalnode) nodeproperties[t] = { data = str, mode = rawliteral_code } return t end
+
+ local pdfliterals = {
+ [originliteral_code] = originliteral_code, [literalvalues[originliteral_code]] = originliteral_code,
+ [pageliteral_code] = pageliteral_code, [literalvalues[pageliteral_code]] = pageliteral_code,
+ [directliteral_code] = directliteral_code, [literalvalues[directliteral_code]] = directliteral_code,
+ [rawliteral_code] = rawliteral_code, [literalvalues[rawliteral_code]] = rawliteral_code,
+ }
+
+ function nutpool.literal(mode,str)
+ local t = copynut(literalnode)
+ if str then
+ nodeproperties[t] = { data = str, mode = pdfliterals[mode] or pageliteral_code }
+ else
+ nodeproperties[t] = { data = mode, mode = pageliteral_code }
+ end
+ return t
+ end
+
+end
+
+-- The latelua node is just another whatsit and we handle the \LUA\ code with
+-- other \LUA\ code, contrary to \LUATEX\ where it's a native node.
+
+do
+
+ local getdata = nuts.getdata
+ local serialize = token.serialize
+
+ local lateluanode = registerwhatsitnode("latelua")
+ local noflatelua = 0
+
+ function nutpool.latelua(code)
+ local n = copynut(lateluanode)
+ nodeproperties[n] = { data = code }
+ return n
+ end
+
+ function backends.latelua(current,pos_h,pos_v) -- todo: pass pos_h and pos_v (more efficient in lmtx)
+ local p = nodeproperties[current]
+ if p then
+ data = p.data
+ else
+ data = getdata(current)
+ end
+ noflatelua = noflatelua + 1
+ local kind = type(data)
+ if kind == "table" then
+ data.action(data.specification or data)
+ elseif kind == "function" then
+ data()
+ else
+ if kind ~= "string" then
+ data = serialize(data)
+ end
+ if #data ~= "" then
+ local code = loadstring(data)
+ if code then
+ code()
+ end
+ end
+ end
+ end
+
+ function backends.getcallbackstate()
+ return { count = noflatelua }
+ end
+
+ implement {
+ name = "latelua",
+ public = true,
+ protected = true,
+ actions = function()
+ local node = copynut(lateluanode)
+ local name = "latelua"
+ if scankeyword("name") then
+ name = scanstring()
+ end
+ local data = scantokenlist()
+ nodeproperties[node] = { name = name, data = data }
+ return context(tonode(node))
+ end,
+ }
+
+end
+
+-- This can be anything. Dealing with these nodes is done via properties, as with
+-- the other whatsits.
+
+do
+
+ local usernode = registerwhatsitnode("userdefined")
+
+ local userids = allocate()
+ local lastid = 0
+
+ setmetatable(userids, {
+ __index = function(t,k)
+ if type(k) == "string" then
+ lastid = lastid + 1
+ rawset(userids,lastid,k)
+ rawset(userids,k,lastid)
+ return lastid
+ else
+ rawset(userids,k,k)
+ return k
+ end
+ end,
+ __call = function(t,k)
+ return t[k]
+ end
+ } )
+
+ function nutpool.userdefined(id,data)
+ local n = copynut(usernode)
+ nodeproperties[n] = { id = id, data = data }
+ return n
+ end
+
+ nutpool .usernode = nutpool.userdefined
+ nutpool .userids = userids
+ nodepool.userids = userids
+
+end
+
+-- This one is only used by generic packages.
+
+do
+
+ local saveposnode = registerwhatsitnode("savepos")
+
+ function nutpool.savepos()
+ return copynut(saveposnode)
+ end
+
+end
+
+do
+
+ local savenode = registerwhatsitnode("save")
+ local restorenode = registerwhatsitnode("restore")
+ local setmatrixnode = registerwhatsitnode("setmatrix")
+
+ local stack = { }
+ local restore = true -- false
+
+ -- these are old school nodes
+
+ function nutpool.save()
+ return copynut(savenode)
+ end
+
+ function nutpool.restore()
+ return copynut(restorenode)
+ end
+
+ function nutpool.setmatrix(rx,sx,sy,ry,tx,ty)
+ local t = copynut(setmatrixnode)
+ nodeproperties[t] = { matrix = { rx, sx, sy, ry, tx, ty } }
+ return t
+ end
+
+ -- common
+
+ local function stopcommon(n)
+ local top = remove(stack)
+ if top == false then
+ return -- not wrapped
+ elseif top == true then
+ return copynut(n)
+ elseif top then
+ local t = copynut(n)
+ nodeproperties[t] = { matrix = { unpack(top) } }
+ return t
+ else
+ return -- nesting error
+ end
+ end
+
+ -- matrix
+
+ local startmatrixnode = registerwhatsitnode("startmatrix")
+ local stopmatrixnode = registerwhatsitnode("stopmatrix")
+
+ local function startmatrix(rx, sx, sy, ry)
+ if rx == 1 and sx == 0 and sy == 0 and ry == 1 then
+ insert(stack,false)
+ else
+ local t = copynut(startmatrixnode)
+ nodeproperties[t] = { matrix = { rx, sx, sy, ry } }
+ insert(stack,store and { -rx, -sx, -sy, -ry } or true)
+ return t
+ end
+ end
+
+ local function stopmatrix()
+ return stopcommon(stopmatrixnode)
+ end
+
+ implement {
+ name = "startmatrix",
+ actions = function()
+ local rx, sx, sy, ry = 1, 0, 0, 1
+ while true do
+ if scankeyword("rx") then rx = scannumber()
+ elseif scankeyword("ry") then ry = scannumber()
+ elseif scankeyword("sx") then sx = scannumber()
+ elseif scankeyword("sy") then sy = scannumber()
+ else break end
+ end
+ local t = startmatrix(rx,sx,sy,ry)
+ if t then
+ context(tonode(t))
+ end
+ end,
+ }
+
+ implement {
+ name = "stopmatrix",
+ actions = function()
+ local t = stopmatrix(n)
+ if t then
+ context(tonode(t))
+ end
+ end,
+ }
+
+ -- scale
+
+ local startscalingnode = registerwhatsitnode("startscaling")
+ local stopscalingnode = registerwhatsitnode("stopscaling")
+
+ local function startscaling(rx, ry) -- at the tex end we use sx and sy instead of rx and ry
+ if rx == 1 and ry == 1 then
+ insert(stack,false)
+ else
+ if rx == 0 then
+ rx = 0.0001
+ end
+ if ry == 0 then
+ ry = 0.0001
+ end
+ local t = copynut(startscalingnode)
+ nodeproperties[t] = { matrix = { rx, 0, 0, ry } }
+ insert(stack,restore and { 1/rx, 0, 0, 1/ry } or true)
+ return t
+ end
+ end
+
+ local function stopscaling() -- at the tex end we use sx and sy instead of rx and ry
+ return stopcommon(stopscalingnode)
+ end
+
+ implement {
+ name = "startscaling",
+ actions = function()
+ local rx, ry = 1, 1
+ while true do
+ if scankeyword("rx") then
+ rx = scannumber()
+ elseif scankeyword("ry") then
+ ry = scannumber()
+ else
+ break
+ end
+ end
+ local t = startscaling(rx,ry)
+ if t then
+ context(tonode(t))
+ end
+ end,
+ }
+
+ implement {
+ name = "stopscaling",
+ actions = function()
+ local t = stopscaling(n)
+ if t then
+ context(tonode(t))
+ end
+ end,
+ }
+
+ -- rotate
+
+ local startrotationnode = registerwhatsitnode("startrotation")
+ local stoprotationnode = registerwhatsitnode("stoprotation")
+
+ local function startrotation(a)
+ if a == 0 then
+ insert(stack,false)
+ else
+ local s, c = sind(a), cosd(a)
+ if abs(s) < 0.000001 then
+ s = 0 -- otherwise funny -0.00000
+ end
+ if abs(c) < 0.000001 then
+ c = 0 -- otherwise funny -0.00000
+ end
+ local t = copynut(startrotationnode)
+ nodeproperties[t] = { matrix = { c, s, -s, c } }
+ insert(stack,restore and { c, -s, s, c } or true)
+ return t
+ end
+ end
+
+ local function stoprotation()
+ return stopcommon(stoprotationnode)
+ end
+
+ nutpool.startrotation = startrotation
+
+ implement {
+ name = "startrotation",
+ actions = function()
+ local n = scannumber()
+ local t = startrotation(n)
+ if t then
+ context(tonode(t))
+ end
+ end,
+ }
+
+ implement {
+ name = "stoprotation",
+ actions = function()
+ local t = stoprotation()
+ if t then
+ context(tonode(t))
+ end
+ end,
+ }
+
+ -- mirror
+
+ local startmirroringnode = registerwhatsitnode("startmirroring")
+ local stopmirroringnode = registerwhatsitnode("stopmirroring")
+
+ local function startmirroring()
+ local t = copynut(startmirroringnode)
+ nodeproperties[t] = { matrix = { -1, 0, 0, 1 } }
+ return t
+ end
+
+ local function stopmirroring()
+ local t = copynut(stopmirroringnode)
+ nodeproperties[t] = { matrix = { -1, 0, 0, 1 } }
+ return t
+ end
+
+ implement {
+ name = "startmirroring",
+ actions = function()
+ context(tonode(startmirroring()))
+ end,
+ }
+
+ implement {
+ name = "stopmirroring",
+ actions = function()
+ context(tonode(stopmirroring()))
+ end,
+ }
+
+ -- clip
+
+ local startclippingnode = registerwhatsitnode("startclipping")
+ local stopclippingnode = registerwhatsitnode("stopclipping")
+
+ local function startclipping(path)
+ local t = copynut(startclippingnode)
+ nodeproperties[t] = { path = path }
+ return t
+ end
+
+ local function stopclipping()
+ return copynut(stopclippingnode)
+ end
+
+ implement {
+ name = "startclipping",
+ actions = function()
+ context(tonode(startclipping(scanstring())))
+ end
+ }
+
+ implement {
+ name = "stopclipping",
+ actions = function()
+ context(tonode(stopclipping()))
+ end,
+ }
+
+end
+
+-- The (delayed and immediate) write operations are emulated in \LUA\ and presented
+-- as primitives at the \TEX\ end.
+
+do
+
+ local logwriter = logs.writer
+ local openfile = io.open
+ local flushio = io.flush
+ local serialize = token.serialize
+
+ local opennode = registerwhatsitnode("open")
+ local writenode = registerwhatsitnode("write")
+ local closenode = registerwhatsitnode("close")
+ local channels = { }
+ local immediate_code = tex.flagcodes.immediate
+
+ function backends.openout(n)
+ local p = nodeproperties[n]
+ if p then
+ local handle = openfile(p.filename,"wb") or false
+ if handle then
+ channels[p.channel] = handle
+ else
+ -- error
+ end
+ end
+ end
+
+ function backends.writeout(n)
+ local p = nodeproperties[n]
+ if p then
+ local handle = channels[p.channel]
+ local content = serialize(p.data)
+ if handle then
+ handle:write(content,"\n")
+ else
+ logwriter(content,"\n")
+ end
+ end
+ end
+
+ function backends.closeout(n)
+ local p = nodeproperties[n]
+ if p then
+ local channel = p.channel
+ local handle = channels[channel]
+ if handle then
+ handle:close()
+ channels[channel] = false
+ flushio()
+ else
+ -- error
+ end
+ end
+ end
+
+ local function immediately(prefix)
+ return prefix and (prefix & immediate_code) ~= 0
+ end
+
+ implement {
+ name = "openout",
+ public = true,
+ usage = "value",
+ actions = function(prefix)
+ local channel = scaninteger()
+ scankeyword("=") -- hack
+ local filename = scanstring()
+ if not immediately(prefix) then
+ local n = copynut(opennode)
+ nodeproperties[n] = { channel = channel, filename = filename } -- action = "open"
+ return context(tonode(n))
+ elseif not channels[channel] then
+ local handle = openfile(filename,"wb") or false
+ if handle then
+ channels[channel] = handle
+ else
+ -- error
+ end
+ end
+ end,
+ }
+
+ implement {
+ name = "write",
+ public = true,
+ usage = "value",
+ actions = function(prefix)
+ local channel = scaninteger()
+ if not immediately(prefix) then
+ local t = scantokenlist()
+ local n = copynut(writenode)
+ nodeproperties[n] = { channel = channel, data = t } -- action = "write"
+ return context(tonode(n))
+ else
+ local content = scanstring()
+ local handle = channels[channel]
+ if handle then
+ handle:write(content,"\n")
+ else
+ logwriter(content,"\n")
+ end
+ end
+ end,
+ }
+
+ implement {
+ name = "closeout",
+ public = true,
+ usage = "value",
+ actions = function(prefix)
+ local channel = scaninteger()
+ if not immediately(prefix) then
+ local n = copynut(closenode)
+ nodeproperties[n] = { channel = channel } -- action = "close"
+ return context(tonode(n))
+ else
+ local handle = channels[channel]
+ if handle then
+ handle:close()
+ channels[channel] = false
+ flushio()
+ else
+ -- error
+ end
+ end
+ end,
+ }
+
+ -- why ...
+
+ local open_command = get(token.create("openout"))
+ local write_command = get(token.create("write"))
+ local close_command = get(token.create("closeout"))
+
+end
+
+-- states: these get injected independent of grouping
+
+do
+
+ local setstatenode = registerwhatsitnode("setstate")
+
+ function nutpool.setstate(data)
+ local n = copynut(setstatenode)
+ nodeproperties[n] = { data = data }
+ return n
+ end
+
+end
+
+-- We don't support specials so we make them dummies.
+
+do
+ implement {
+ name = "special",
+ actions = scanstring,
+ public = true,
+ protected = true,
+ }
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-fin.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-fin.lmt
new file mode 100644
index 00000000000..2ca7491a1b2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-fin.lmt
@@ -0,0 +1,939 @@
+if not modules then modules = { } end modules ['node-fin'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to node-fin.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
+-- local functions, only slightly slower
+--
+-- leaders are also triggers ... see colo-ext for an example (negate a box)
+
+local next, type, format = next, type, string.format
+local setmetatableindex = table.setmetatableindex
+
+local attributes, nodes, node = attributes, nodes, node
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getleader = nuts.getleader
+local getattr = nuts.getattr
+local getattrs = nuts.getattrs
+local getwidth = nuts.getwidth
+local getwhd = nuts.getwhd
+local getorientation = nuts.getorientation
+local has_dimensions = nuts.has_dimensions
+local getbox = nuts.getbox
+
+local setlist = nuts.setlist
+local setleader = nuts.setleader
+
+local copy_node = nuts.copy
+local find_tail = nuts.tail
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+
+local nextnode = nuts.traversers.node
+local nextcontent = nuts.traversers.content
+
+local nodecodes = nodes.nodecodes
+local rulecodes = nodes.rulecodes
+
+local boxrule_code = rulecodes.box
+local imagerule_code = rulecodes.image
+local emptyrule_code = rulecodes.empty
+
+local container_code = nodes.listcodes.container
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local glue_code = nodecodes.glue
+local rule_code = nodecodes.rule
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local texlists = tex.lists
+local texgetnest = tex.getnest
+
+local states = attributes.states
+local numbers = attributes.numbers
+local a_trigger = attributes.private('trigger')
+local triggering = false
+
+local implement = interfaces.implement
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+local loadstripped = utilities.lua.loadstripped
+local unsetvalue = attributes.unsetvalue
+
+-- these two will be like trackers
+
+function states.enabletriggering () triggering = true end
+function states.disabletriggering() triggering = false end
+
+implement { name = "enablestatetriggering", actions = states.enabletriggering }
+implement { name = "disablestatetriggering", actions = states.disabletriggering }
+
+nodes.plugindata = nil
+
+-- inheritance: -0x7FFFFFFF -- we can best use nil and skip !
+
+local template = [[
+local plugin = nodes.plugindata
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+local namespace = plugin.namespace
+local attribute = namespace.attribute or attributes.numbers[plugin.name]
+local processor = plugin.processor
+local initializer = plugin.initializer
+local resolver = plugin.resolver
+local finalizer = plugin.finalizer
+local flusher = plugin.flusher
+if not processor then
+ return function(head)
+ return head
+ end
+elseif initializer or finalizer or resolver then
+ return function(head)
+ starttiming(attributes)
+ local used, inheritance
+ if resolver then
+ inheritance = resolver()
+ end
+ if initializer then
+ initializer(namespace,attribute,head)
+ end
+ head = processor(namespace,attribute,head,inheritance)
+ if finalizer then
+ head, used = finalizer(namespace,attribute,head)
+ if used and flusher then
+ head = flusher(namespace,attribute,head,used)
+ end
+ end
+ stoptiming(attributes)
+ return head
+ end
+else
+ return function(head)
+ starttiming(attributes)
+ head = processor(namespace,attribute,head)
+ stoptiming(attributes)
+ return head
+ end
+end
+nodes.plugindata = nil
+]]
+
+function nodes.installattributehandler(plugin)
+ nodes.plugindata = plugin
+ return loadstripped(template)()
+end
+
+-- the injectors
+
+local nsdata, nsnone, nslistwise, nsforced, nsselector, nstrigger
+local current, current_selector = 0, 0 -- nb, stack has a local current !
+local nsbegin, nsend, nsreset
+
+function states.initialize(namespace,attribute,head)
+ nsdata = namespace.data
+ nsnone = namespace.none
+ nsforced = namespace.forced
+ nsselector = namespace.selector
+ nslistwise = namespace.listwise
+ nstrigger = triggering and namespace.triggering and a_trigger
+ current = 0
+ current_selector = 0
+ nsstep = namespace.resolve_step
+ if nsstep then
+ nsreset = namespace.resolve_reset
+ nsbegin = namespace.resolve_begin
+ nsend = namespace.resolve_end
+ nspush = namespace.push
+ nspop = namespace.pop
+ end
+end
+
+function states.finalize(namespace,attribute,head) -- is this one ok?
+ if current > 0 and nsnone then
+ local id = getid(head)
+ if id == hlist_code or id == vlist_code then
+ local content = getlist(head)
+ if content then
+-- local list = insert_node_before(content,content,copy_node(nsnone)) -- two return values
+ local list = insert_node_after(content,find_tail(content),copy_node(nsnone)) -- two return values
+ if list ~= content then
+ setlist(head,list)
+ end
+ end
+ else
+-- head = insert_node_before(head,head,copy_node(nsnone))
+ head = insert_node_after(find_tail(head),head,copy_node(nsnone))
+ end
+ return head, true
+ end
+ return head, false
+end
+
+-- we need to deal with literals too (reset as well as oval)
+
+local function process(attribute,head,inheritance,default) -- one attribute
+ local check = false
+ local leader = nil
+ for stack, id, subtype, content in nextcontent, head do
+ if id == glyph_code or id == disc_code then
+ check = true
+ elseif id == glue_code then
+ check = true
+ leader = content
+ elseif id == hlist_code or id == vlist_code then
+ -- tricky checking
+ local outer
+ if subtype == container_code then
+ check = true
+current = 0
+ end
+ if getorientation(stack) then
+ outer = getattr(stack,attribute)
+ if outer then
+ if default and outer == inheritance then
+ if current ~= default then
+ head = insert_node_before(head,stack,copy_node(nsdata[default]))
+ current = default
+ end
+ elseif current ~= outer then
+ head = insert_node_before(head,stack,copy_node(nsdata[c]))
+ current = outer
+ end
+ elseif default and inheritance then
+ if current ~= default then
+ head = insert_node_before(head,stack,copy_node(nsdata[default]))
+ current = default
+ end
+ elseif current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ current = 0
+ end
+ end
+ -- begin nested --
+ local list
+ if nstrigger and getattr(stack,nstrigger) then
+ if not outer then
+ outer = getattr(stack,attribute)
+ end
+ if outer ~= inheritance then
+ list = process(attribute,content,inheritance,outer)
+ else
+ list = process(attribute,content,inheritance,default)
+ end
+ else
+ list = process(attribute,content,inheritance,default)
+ end
+ if content ~= list then
+ setlist(stack,list)
+ end
+ -- end nested --
+ elseif id == rule_code then
+ check = has_dimensions(stack)
+ end
+ -- much faster this way than using a check() and nested() function
+ if check then
+ local c = getattr(stack,attribute)
+ if c then
+ if default and c == inheritance then
+ if current ~= default then
+ head = insert_node_before(head,stack,copy_node(nsdata[default]))
+ current = default
+ end
+ elseif current ~= c then
+ head = insert_node_before(head,stack,copy_node(nsdata[c]))
+ current = c
+ end
+ if leader then
+ local savedcurrent = current
+ local ci = getid(leader)
+ if ci == hlist_code or ci == vlist_code then
+ -- else we reset inside a box unneeded, okay, the downside is
+ -- that we trigger color in each repeated box, so there is room
+ -- for improvement here
+ current = 0
+ end
+ -- begin nested --
+ local list
+ if nstrigger and getattr(stack,nstrigger) then
+ local outer = getattr(stack,attribute)
+ if outer ~= inheritance then
+ list = process(attribute,leader,inheritance,outer)
+ else
+ list = process(attribute,leader,inheritance,default)
+ end
+ else
+ list = process(attribute,leader,inheritance,default)
+ end
+ if leader ~= list then
+ setleader(stack,list)
+ end
+ -- end nested --
+ current = savedcurrent
+ leader = false
+ end
+ elseif default and inheritance then
+ if current ~= default then
+ head = insert_node_before(head,stack,copy_node(nsdata[default]))
+ current = default
+ end
+ elseif current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ current = 0
+ end
+ check = false
+ end
+ end
+ return head
+end
+
+states.process = function(namespace,attribute,head,default)
+ return process(attribute,head,default)
+end
+
+local function simple(attribute,head)
+ local check = false
+ local leader = nil
+ for stack, id, subtype, content in nextcontent, head do
+ if id == glyph_code or id == disc_code then
+ check = true
+ elseif id == glue_code then
+ check = true
+ leader = content
+ elseif id == hlist_code or id == vlist_code then
+ if subtype == container_code then
+ check = true
+current = 0
+ end
+ if getorientation(stack) then
+ local outer = getattr(stack,attribute)
+ if outer then
+ if current ~= outer then
+ if current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ end
+ head = insert_node_before(head,stack,copy_node(nsdata[c]))
+ current = outer
+ end
+ elseif current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ current = 0
+ end
+ end
+ local list = simple(attribute,content)
+ if content ~= list then
+ setlist(stack,list)
+ end
+ elseif id == rule_code then
+ check = has_dimensions(stack)
+ end
+ if check then
+ local c = getattr(stack,attribute)
+ if c then
+ if current ~= c then
+ if current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ end
+ head = insert_node_before(head,stack,copy_node(nsdata[c]))
+ current = c
+ end
+ if leader then
+ local savedcurrent = current
+ local ci = getid(leader)
+ if ci == hlist_code or ci == vlist_code then
+ current = 0
+ end
+ local list = simple(attribute,leader)
+ if leader ~= list then
+ setleader(stack,list)
+ end
+ current = savedcurrent
+ leader = false
+ end
+ elseif current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ current = 0
+ end
+ check = false
+ end
+ end
+ return head
+end
+
+states.simple = function(namespace,attribute,head,default)
+ return simple(attribute,head,default)
+end
+
+-- we can force a selector, e.g. document wide color spaces, saves a little
+-- watch out, we need to check both the selector state (like colorspace) and
+-- the main state (like color), otherwise we get into troubles when a selector
+-- state changes while the main state stays the same (like two glyphs following
+-- each other with the same color but different color spaces e.g. \showcolor)
+
+-- local function selective(attribute,head,inheritance,default) -- two attributes
+-- local check = false
+-- local leader = nil
+-- for stack, id, subtype, content in nextcontent, head do
+-- if id == glyph_code or id == disc_code then
+-- check = true
+-- elseif id == glue_code then
+-- check = true
+-- leader = content -- getleader(stack)
+-- elseif id == hlist_code or id == vlist_code then
+-- -- tricky checking
+-- if subtype == container_code then
+-- check = true
+-- current = 0
+-- end
+-- local outer
+-- if getorientation(stack) then
+-- outer = getattr(stack,attribute)
+-- if outer then
+-- if default and outer == inheritance then
+-- if current ~= default then
+-- local data = nsdata[default]
+-- head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector]))
+-- current = default
+-- end
+-- else
+-- local s = getattr(stack,nsselector)
+-- -- local s = nsforced or getattr(stack,nsselector)
+-- if current ~= outer or current_selector ~= s then
+-- local data = nsdata[outer]
+-- head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector]))
+-- current = outer
+-- current_selector = s
+-- end
+-- end
+-- elseif default and inheritance then
+-- if current ~= default then
+-- local data = nsdata[default]
+-- head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector]))
+-- current = default
+-- end
+-- elseif current > 0 then
+-- head = insert_node_before(head,stack,copy_node(nsnone))
+-- current, current_selector = 0, 0
+-- end
+-- end
+-- -- begin nested
+-- local list
+-- if nstrigger and getattr(stack,nstrigger) then
+-- if not outer then
+-- outer = getattr(stack,attribute)
+-- end
+-- if outer ~= inheritance then
+-- list = selective(attribute,content,inheritance,outer)
+-- else
+-- list = selective(attribute,content,inheritance,default)
+-- end
+-- else
+-- list = selective(attribute,content,inheritance,default)
+-- end
+-- if content ~= list then
+-- setlist(stack,list)
+-- end
+-- -- end nested
+-- elseif id == rule_code then
+-- if subtype == boxrule_code or subtype == imagerule_code or subtype == emptyrule_code then
+-- -- so no redundant color stuff (only here, layers for instance should obey)
+-- check = false
+-- else
+-- check = has_dimensions(stack)
+-- end
+-- end
+-- if check then
+-- local c = getattr(stack,attribute)
+-- if c then
+-- if default and c == inheritance then
+-- if current ~= default then
+-- local data = nsdata[default]
+-- head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector]))
+-- current = default
+-- end
+-- else
+-- local s = getattr(stack,nsselector)
+-- -- local s = nsforced or getattr(stack,nsselector)
+-- if current ~= c or current_selector ~= s then
+-- local data = nsdata[c]
+-- head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector]))
+-- current = c
+-- current_selector = s
+-- end
+-- end
+-- if leader then
+-- -- begin nested
+-- local list
+-- if nstrigger and getattr(stack,nstrigger) then
+-- local outer = getattr(stack,attribute)
+-- if outer ~= inheritance then
+-- list = selective(attribute,leader,inheritance,outer)
+-- else
+-- list = selective(attribute,leader,inheritance,default)
+-- end
+-- else
+-- list = selective(attribute,leader,inheritance,default)
+-- end
+-- if leader ~= list then
+-- setleader(stack,list)
+-- end
+-- -- end nested
+-- leader = false
+-- end
+-- elseif default and inheritance then
+-- if current ~= default then
+-- local data = nsdata[default]
+-- head = insert_node_before(head,stack,copy_node(data[nsforced or getattr(stack,nsselector) or nsselector]))
+-- current = default
+-- end
+-- elseif current > 0 then
+-- head = insert_node_before(head,stack,copy_node(nsnone))
+-- current, current_selector = 0, 0
+-- end
+-- check = false
+-- end
+-- end
+-- return head
+-- end
+
+local function selective(attribute,head,inheritance,default) -- two attributes
+ local check = false
+ local leader = nil
+ for stack, id, subtype, content in nextcontent, head do
+ if id == glyph_code or id == disc_code then
+ check = true
+ elseif id == glue_code then
+ check = true
+ leader = content -- getleader(stack)
+ elseif id == hlist_code or id == vlist_code then
+ -- tricky checking
+ if subtype == container_code then
+ check = true
+current = 0
+ end
+ local outer, s
+ if getorientation(stack) then
+ outer, s = getattrs(stack,attribute,nsselector)
+ if outer then
+ if default and outer == inheritance then
+ if current ~= default then
+ local data = nsdata[default]
+ head = insert_node_before(head,stack,copy_node(data[nsforced or nsselector]))
+ current = default
+ end
+ elseif current ~= outer or current_selector ~= s then
+ local data = nsdata[outer]
+ head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector]))
+ current = outer
+ current_selector = s
+ end
+ elseif default and inheritance then
+ if current ~= default then
+ local data = nsdata[default]
+ head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector]))
+ current = default
+ end
+ elseif current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ current, current_selector = 0, 0
+ end
+ end
+ -- begin nested
+ local list
+ if nstrigger and getattr(stack,nstrigger) then
+ if not outer then
+ outer = getattr(stack,attribute)
+ end
+ if outer ~= inheritance then
+ list = selective(attribute,content,inheritance,outer)
+ else
+ list = selective(attribute,content,inheritance,default)
+ end
+ else
+ list = selective(attribute,content,inheritance,default)
+ end
+ if content ~= list then
+ setlist(stack,list)
+ end
+ -- end nested
+ elseif id == rule_code then
+ if subtype == boxrule_code or subtype == imagerule_code or subtype == emptyrule_code then
+ -- so no redundant color stuff (only here, layers for instance should obey)
+ check = false
+ else
+ check = has_dimensions(stack)
+ end
+ end
+ if check then
+ local c, s = getattrs(stack,attribute,nsselector)
+ if c then
+ if default and c == inheritance then
+ if current ~= default then
+ local data = nsdata[default]
+ head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector]))
+ current = default
+ end
+ elseif current ~= c or current_selector ~= s then
+ local data = nsdata[c]
+ head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector]))
+ current = c
+ current_selector = s
+ end
+ if leader then
+ -- begin nested
+ local list
+ if nstrigger and getattr(stack,nstrigger) then
+ local outer = getattr(stack,attribute)
+ if outer ~= inheritance then
+ list = selective(attribute,leader,inheritance,outer)
+ else
+ list = selective(attribute,leader,inheritance,default)
+ end
+ else
+ list = selective(attribute,leader,inheritance,default)
+ end
+ if leader ~= list then
+ setleader(stack,list)
+ end
+ -- end nested
+ leader = false
+ end
+ elseif default and inheritance then
+ if current ~= default then
+ local data = nsdata[default]
+ head = insert_node_before(head,stack,copy_node(data[nsforced or s or nsselector]))
+ current = default
+ end
+ elseif current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ current, current_selector = 0, 0
+ end
+ check = false
+ end
+ end
+ return head
+end
+
+states.selective = function(namespace,attribute,head,default)
+ return selective(attribute,head,default)
+end
+
+-- Ideally the next one should be merged with the previous but keeping it separate is
+-- safer. We deal with two situations: efficient boxwise (layoutareas) and mixed layers
+-- (as used in the stepper). In the stepper we cannot use the box branch as it involves
+-- paragraph lines and then gets mixed up. A messy business (esp since we want to be
+-- efficient).
+--
+-- Todo: make a better stacker. Keep track (in attribute) about nesting level. Not
+-- entirely trivial and a generic solution is nicer (compares to the exporter).
+
+local function stacked(attribute,head,default) -- no triggering, no inheritance, but list-wise
+ local stack = head
+ local current = default or 0
+ local depth = 0
+ local check = false
+ local leader = false
+ while stack do
+ local id = getid(stack)
+ if id == glyph_code then
+ check = true
+ elseif id == glue_code then
+ leader = getleader(stack)
+ if leader then
+ check = true
+ end
+ elseif id == hlist_code or id == vlist_code then
+ local content = getlist(stack)
+ if content then
+ -- the problem is that broken lines gets the attribute which can be a later one
+ local list
+ if subtype == container_code then
+ check = true
+current = 0
+ end
+ if nslistwise then
+ local a = getattr(stack,attribute)
+ if a and current ~= a and nslistwise[a] then -- viewerlayer / needs checking, see below
+ local p = current
+ current = a
+ head = insert_node_before(head,stack,copy_node(nsdata[a]))
+ list = stacked(attribute,content,current) -- two return values
+ head, stack = insert_node_after(head,stack,copy_node(nsnone))
+ current = p
+ else
+ list = stacked(attribute,content,current)
+ end
+ else
+ list = stacked(attribute,content,current)
+ end
+ if content ~= list then
+ setlist(stack,list) -- only if ok
+ end
+ end
+ elseif id == rule_code then
+ check = has_dimensions(stack)
+ end
+ if check then
+ local a = getattr(stack,attribute)
+ if a then
+ if current ~= a then
+ head = insert_node_before(head,stack,copy_node(nsdata[a]))
+ depth = depth + 1
+ current = a
+ end
+ if leader then
+ local content = getlist(leader)
+ if content then
+ local list = stacked(attribute,content,current)
+ if leader ~= list then
+ setleader(stack,list) -- only if ok
+ end
+ end
+ leader = false
+ end
+ elseif default > 0 then
+ --
+ elseif current > 0 then
+ head = insert_node_before(head,stack,copy_node(nsnone))
+ depth = depth - 1
+ current = 0
+ end
+ check = false
+ end
+ stack = getnext(stack)
+ end
+ while depth > 0 do
+ head = insert_node_after(head,stack,copy_node(nsnone))
+ depth = depth - 1
+ end
+ return head
+end
+
+states.stacked = function(namespace,attribute,head,default)
+ return stacked(attribute,head,default)
+end
+
+-- experimental
+
+-- local function stacker(attribute,head,default) -- no triggering, no inheritance, but list-wise
+--
+-- -- nsbegin()
+-- local stacked = false
+--
+-- local current = head
+-- local previous = head
+-- local attrib = default or unsetvalue
+-- local check = false
+-- local leader = false
+--
+-- while current do
+-- local id = getid(current)
+-- if id == glyph_code then
+-- check = true
+-- elseif id == glue_code then
+-- leader = getleader(current)
+-- if leader then
+-- check = true
+-- end
+-- elseif id == hlist_code or id == vlist_code then
+-- local content = getlist(current)
+-- if content then
+-- local list
+-- if subtype == container_code then
+-- check = true
+-- current = 0
+-- end
+-- if nslistwise then
+-- local a = getattr(current,attribute)
+-- if a and attrib ~= a and nslistwise[a] then -- viewerlayer
+-- head = insert_node_before(head,current,copy_node(nsdata[a]))
+-- list = stacker(attribute,content,a)
+-- if list ~= content then
+-- setlist(current,list)
+-- end
+-- head, current = insert_node_after(head,current,copy_node(nsnone))
+-- else
+-- list = stacker(attribute,content,attrib)
+-- if list ~= content then
+-- setlist(current,list)
+-- end
+-- end
+-- else
+-- list = stacker(attribute,content,default)
+-- if list ~= content then
+-- setlist(current,list)
+-- end
+-- end
+-- end
+-- elseif id == rule_code then
+-- check = has_dimensions(current)
+-- end
+--
+-- if check then
+-- local a = getattr(current,attribute) or unsetvalue
+-- if a ~= attrib then
+-- if not stacked then
+-- stacked = true
+-- nsbegin()
+-- end
+-- local n = nsstep(a)
+-- if n then
+-- head = insert_node_before(head,current,n) -- a
+-- end
+-- attrib = a
+-- if leader then
+-- -- tricky as a leader has to be a list so we cannot inject before
+-- -- local list = stacker(attribute,leader,attrib)
+-- -- leader = false
+--
+-- local content = getlist(leader)
+-- if content then
+-- local list = stacker(attribute,leader,attrib)
+-- if leader ~= list then
+-- setleader(current,list)
+-- end
+-- end
+--
+-- leader = false
+-- end
+-- end
+-- check = false
+-- end
+--
+-- previous = current
+-- current = getnext(current)
+-- end
+--
+-- if stacked then
+-- local n = nsend()
+-- while n do
+-- head = insert_node_after(head,previous,n)
+-- n = nsend()
+-- end
+-- end
+--
+-- return head
+-- end
+
+local function stacker(attribute,head,default) -- no triggering, no inheritance, but list-wise
+
+ -- nsbegin()
+ local stacked = false
+
+ local current = head
+ local previous = head
+ local attrib = default or unsetvalue
+ local check = false
+ local leader = false
+
+ for current, id, subtype, content in nextcontent, head do
+ if id == glyph_code then
+ check = true
+ elseif id == glue_code then
+ leader = content
+ check = true
+ elseif id == hlist_code or id == vlist_code then
+ local list
+ if subtype == container_code then
+ check = true
+-- attrib = default or unsetvalue -- or just umsetvalue
+ end
+ if nslistwise then
+ local a = getattr(current,attribute)
+ if a and attrib ~= a and nslistwise[a] then -- viewerlayer
+ head = insert_node_before(head,current,copy_node(nsdata[a]))
+ list = stacker(attribute,content,a)
+ if list ~= content then
+ setlist(current,list)
+ end
+ head, current = insert_node_after(head,current,copy_node(nsnone))
+ else
+ list = stacker(attribute,content,attrib)
+ if list ~= content then
+ setlist(current,list)
+ end
+ end
+ else
+ list = stacker(attribute,content,default)
+ if list ~= content then
+ setlist(current,list)
+ end
+ end
+ elseif id == rule_code then
+ if subtype == boxrule_code or subtype == imagerule_code or subtype == emptyrule_code then
+ -- so no redundant color stuff (only here, layers for instance should obey)
+ check = false
+ else
+ check = has_dimensions(current)
+ end
+ end
+
+ if check then
+ local a = getattr(current,attribute) or unsetvalue
+ if a ~= attrib then
+ if not stacked then
+ stacked = true
+ nsbegin()
+ end
+ local n = nsstep(a)
+ if n then
+ head = insert_node_before(head,current,n) -- a
+ end
+ attrib = a
+ if leader then
+ -- tricky as a leader has to be a list so we cannot inject before
+ -- local list = stacker(attribute,leader,attrib)
+ -- leader = false
+
+ local content = getlist(leader)
+ if content then
+ local list = stacker(attribute,leader,attrib)
+ if leader ~= list then
+ setleader(current,list)
+ end
+ end
+
+ leader = false
+ end
+ end
+ check = false
+ end
+
+ previous = current
+ end
+
+ if stacked then
+ local n = nsend()
+ while n do
+ head = insert_node_after(head,previous,n)
+ n = nsend()
+ end
+ end
+
+ return head
+end
+
+states.stacker = function(namespace,attribute,head,default)
+ local head = stacker(attribute,head,default)
+ nsreset()
+ return head
+end
+
+-- -- --
+
+statistics.register("attribute processing time", function()
+ return statistics.elapsedseconds(attributes,"front- and backend")
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-fin.mkxl b/Master/texmf-dist/tex/context/base/mkxl/node-fin.mkxl
new file mode 100644
index 00000000000..6840c85ab53
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-fin.mkxl
@@ -0,0 +1,78 @@
+%D \module
+%D [ file=attr-ini,
+%D version=2007.06.06, % probably a bit older
+%D title=\CONTEXT\ Node Macros,
+%D subtitle=Finalizing,
+%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 Support / Finalizing}
+
+\unprotect
+
+\registerctxluafile{node-shp}{autosuffix,optimize}
+\registerctxluafile{node-fin}{autosuffix,optimize}
+
+\permanent\protected\def\finalizeobjectbox #1{\clf_finalizebox#1\relax}
+\permanent\protected\def\finalizeshipoutbox#1{\clf_finalizebox#1\relax}
+
+% Experimental (for Aditya), not in mkxl, if we need it, it has to be more
+% clever.
+
+% \permanent\protected\def\cleanupbox#1{\clf_cleanupbox#1\relax}
+
+% Tricky stuff: this might become obsolete. It is about time to check this out
+% now (after more than a decade)! The few times that we need this we can better
+% copy some of the sensitive attributes (mostly color).
+
+\definesystemattribute[trigger][public]
+
+\newcount\c_syst_attr_trigger
+
+\permanent\edef\startinheritattributes{\c_attr_trigger\plusone}
+\permanent\edef\stopinheritattributes {\c_attr_trigger\attributeunsetvalue}
+
+\permanent\def\syst_attr_trigger_copy_yes{\afterassignment\syst_attr_trigger_copy_indeed\c_syst_attr_trigger}
+\permanent\def\syst_attr_trigger_dump_yes{\afterassignment\syst_attr_trigger_dump_indeed\c_syst_attr_trigger}
+
+\def\syst_attr_trigger_copy_indeed
+ {\ifvbox\c_syst_attr_trigger
+ \vpack attr \triggerattribute \plusone {\unvcopy\c_syst_attr_trigger}%
+ \else
+ \hpack attr \triggerattribute \plusone {\unhcopy\c_syst_attr_trigger}%
+ \fi}
+
+\def\syst_attr_trigger_dump_indeed
+ {\ifvbox\c_syst_attr_trigger
+ \vpack attr \triggerattribute \plusone {\unvbox\c_syst_attr_trigger}%
+ \else
+ \hpack attr \triggerattribute \plusone {\unhbox\c_syst_attr_trigger}%
+ \fi}
+
+\permanent\protected\def\enableattributeinheritance
+ {\clf_enablestatetriggering
+ \enforced\let\attributedcopy\syst_attr_trigger_copy_yes
+ \enforced\let\attributedbox \syst_attr_trigger_dump_yes}
+
+\permanent\protected\def\disableattributeinheritance
+ {\clf_disablestatetriggering
+ \enforced\let\attributedcopy\copy
+ \enforced\let\attributedbox \box}
+
+\disableattributeinheritance
+
+\installtexdirective
+ {attributes.inheritance}
+ {\enableattributeinheritance}
+ {\disableattributeinheritance}
+
+% \appendtoks
+% \enableattributeinheritance % might become default
+% \to\everyjob
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-fnt.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-fnt.lmt
new file mode 100644
index 00000000000..c96bdde3d1e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-fnt.lmt
@@ -0,0 +1,550 @@
+if not modules then modules = { } end modules ['node-fnt'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+if not context then os.exit() end -- generic function in node-dum
+
+local next, type = next, type
+local concat, keys = table.concat, table.keys
+
+local nodes, node, fonts = nodes, node, fonts
+
+local trace_characters = false trackers.register("nodes.characters", function(v) trace_characters = v end)
+local trace_fontrun = false trackers.register("nodes.fontrun", function(v) trace_fontrun = v end)
+local trace_variants = false trackers.register("nodes.variants", function(v) trace_variants = v end)
+
+-- bad namespace for directives
+
+local force_discrun = true directives.register("nodes.discrun", function(v) force_discrun = v end)
+local force_boundaryrun = true directives.register("nodes.boundaryrun", function(v) force_boundaryrun = v end)
+local force_basepass = true directives.register("nodes.basepass", function(v) force_basepass = v end)
+local keep_redundant = false directives.register("nodes.keepredundant",function(v) keep_redundant = v end)
+
+local report_fonts = logs.reporter("fonts","processing")
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontvariants = fonthashes.variants
+local fontmodes = fonthashes.modes
+
+local otf = fonts.handlers.otf
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local nodecodes = nodes.nodecodes
+local boundarycodes = nodes.boundarycodes
+
+local handlers = nodes.handlers
+
+local nuts = nodes.nuts
+
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getreplace = nuts.getreplace
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getdata = nuts.getdata
+local getglyphdata = nuts.getglyphdata
+
+local setchar = nuts.setchar
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+
+local isglyph = nuts.isglyph -- unchecked
+local ischar = nuts.ischar -- checked
+
+local nextboundary = nuts.traversers.boundary
+local nextdisc = nuts.traversers.disc
+local nextchar = nuts.traversers.char
+
+local flush_node = nuts.flush
+
+local disc_code = nodecodes.disc
+local boundary_code = nodecodes.boundary
+
+local wordboundary_code = boundarycodes.word
+
+local protect_glyphs = nuts.protect_glyphs
+local unprotect_glyphs = nuts.unprotect_glyphs
+
+local setmetatableindex = table.setmetatableindex
+
+-- some tests with using an array of dynamics[id] and processes[id] demonstrated
+-- that there was nothing to gain (unless we also optimize other parts)
+--
+-- maybe getting rid of the intermediate shared can save some time
+
+local run = 0
+
+local setfontdynamics = { }
+local fontprocesses = { }
+
+setmetatableindex(setfontdynamics, function(t,font)
+ local tfmdata = fontdata[font]
+ local shared = tfmdata.shared
+ local f = shared and shared.dynamics and otf.setdynamics or false
+ if f then
+ local v = { }
+ t[font] = v
+ setmetatableindex(v,function(t,k)
+ local v = f(font,k)
+ t[k] = v
+ return v
+ end)
+ return v
+ else
+ t[font] = false
+ return false
+ end
+end)
+
+setmetatableindex(fontprocesses, function(t,font)
+ local tfmdata = fontdata[font]
+ local shared = tfmdata.shared -- we need to check shared, only when same features
+ local processes = shared and shared.processes
+ if processes and #processes > 0 then
+ t[font] = processes
+ return processes
+ else
+ t[font] = false
+ return false
+ end
+end)
+
+fonts.hashes.setdynamics = setfontdynamics
+fonts.hashes.processes = fontprocesses
+
+-- if we forget about basemode we don't need to test too much here and we can consider running
+-- over sub-ranges .. this involves a bit more initializations but who cares .. in that case we
+-- also need to use the stop criterium (we already use head too) ... we cannot use traverse
+-- then, so i'll test it on some local clone first ... the only pitfall is changed directions
+-- inside a run which means that we need to keep track of this which in turn complicates matters
+-- in a way i don't like
+
+-- we need to deal with the basemode fonts here and can only run over ranges as we otherwise get
+-- luatex craches due to all kind of asserts in the disc/lig builder
+
+-- there is no gain in merging used (dynamic 0) and dynamics apart from a bit less code
+
+local ligaturing = nuts.ligaturing
+local kerning = nuts.kerning
+
+local function start_trace(head)
+ run = run + 1
+ report_fonts()
+ report_fonts("checking node list, run %s",run)
+ report_fonts()
+ local n = head
+ while n do
+ local char, id = isglyph(n)
+ if char then
+ local font = id
+ local dynamic = getglyphdata(n) or 0
+ report_fonts("font %03i, dynamic %03i, glyph %C",font,dynamic,char)
+ elseif id == disc_code then
+ report_fonts("[disc] %s",nodes.listtoutf(n,true,false,n))
+ elseif id == boundary_code then
+ report_fonts("[boundary] %i:%i",getsubtype(n),getdata(n))
+ else
+ report_fonts("[%s]",nodecodes[id])
+ end
+ n = getnext(n)
+ end
+end
+
+local function stop_trace(u,usedfonts,d,dynamicfonts,b,basefonts,r,redundant)
+ report_fonts()
+ report_fonts("statics : %s",u > 0 and concat(keys(usedfonts)," ") or "none")
+ report_fonts("dynamics: %s",d > 0 and concat(keys(dynamicfonts)," ") or "none")
+ report_fonts("built-in: %s",b > 0 and b or "none")
+ report_fonts("removed : %s",r > 0 and r or "none")
+ report_fonts()
+end
+
+do
+
+ local usedfonts
+ local dynamicfonts
+ local basefonts -- could be reused
+ local basefont
+ local prevfont
+ local prevdynamic
+ local variants
+ local redundant -- could be reused
+ local firstnone
+ local lastfont
+ local lastproc
+ local lastnone
+
+ local d, u, b, r
+
+ local function protectnone()
+ protect_glyphs(firstnone,lastnone)
+ firstnone = nil
+ end
+
+ local function setnone(n)
+ if firstnone then
+ protectnone()
+ end
+ if basefont then
+ basefont[2] = getprev(n)
+ basefont = false
+ end
+ if not firstnone then
+ firstnone = n
+ end
+ lastnone = n
+ end
+
+ local function setbase(n)
+ if firstnone then
+ protectnone()
+ end
+ if force_basepass then
+ if basefont then
+ basefont[2] = getprev(n)
+ end
+ b = b + 1
+ basefont = { n, false }
+ basefonts[b] = basefont
+ end
+ end
+
+ local function setnode(n,font,dynamic) -- we could use prevfont and prevdynamic when we set then first
+ if firstnone then
+ protectnone()
+ end
+ if basefont then
+ basefont[2] = getprev(n)
+ basefont = false
+ end
+ if dynamic > 0 then
+ local used = dynamicfonts[font]
+ if not used then
+ used = { }
+ dynamicfonts[font] = used
+ end
+ if not used[dynamic] then
+ local fd = setfontdynamics[font]
+ if fd then
+ used[dynamic] = fd[dynamic]
+ d = d + 1
+ end
+ end
+ else
+ local used = usedfonts[font]
+ if not used then
+ lastfont = font
+ lastproc = fontprocesses[font]
+ if lastproc then
+ usedfonts[font] = lastproc
+ u = u + 1
+ end
+ end
+ end
+ end
+
+ function handlers.characters(head,groupcode,size,packtype,direction)
+ -- either next or not, but definitely no already processed list
+ starttiming(nodes)
+
+ usedfonts = { }
+ dynamicfonts = { }
+ basefonts = { }
+ basefont = nil
+ prevfont = nil
+ prevdynamic = 0
+ variants = nil
+ redundant = nil
+ firstnone = nil
+ lastfont = nil
+ lastproc = nil
+ lastnone = nil
+
+ local fontmode = nil -- base none or other
+
+ d, u, b, r = 0, 0, 0, 0
+
+ if trace_fontrun then
+ start_trace(head)
+ end
+
+ -- There is no gain in checking for a single glyph and then having a fast path. On the
+ -- metafun manual (with some 2500 single char lists) the difference is just noise.
+
+ for n, char, font, dynamic in nextchar, head do
+
+ if font ~= prevfont then
+ prevfont = font
+ fontmode = fontmodes[font]
+ if fontmode == "none" then
+ prevdynamic = 0
+ variants = false
+ setnone(n)
+ elseif fontmode == "base" then
+ prevdynamic = 0
+ variants = false
+ setbase(n)
+ else
+ -- local dynamic = getglyphdata(n) or 0 -- zero dynamic is reserved for fonts in context
+ prevdynamic = dynamic
+ variants = fontvariants[font]
+ setnode(n,font,dynamic)
+ end
+ elseif fontmode == "node" then
+ local dynamic = getglyphdata(n) or 0 -- zero dynamic is reserved for fonts in context
+ if dynamic ~= prevdynamic then
+ prevdynamic = dynamic
+ variants = fontvariants[font]
+ setnode(n,font,dynamic)
+ end
+ elseif firstnone then
+ lastnone = n
+ end
+
+ if variants then
+ if (char >= 0xFE00 and char <= 0xFE0F) or (char >= 0xE0100 and char <= 0xE01EF) then
+ -- if variants and char >= 0xFE00 then
+ -- if char < 0xFE0F or (char >= 0xE0100 and char <= 0xE01EF) then
+ local hash = variants[char]
+ if hash then
+ local p = getprev(n)
+ if p then
+ local char = ischar(p) -- checked
+ local variant = hash[char]
+ if variant then
+ if trace_variants then
+ report_fonts("replacing %C by %C",char,variant)
+ end
+ setchar(p,variant)
+ if redundant then
+ r = r + 1
+ redundant[r] = n
+ else
+ r = 1
+ redundant = { n }
+ end
+ end
+ end
+ elseif keep_redundant then
+ -- go on, can be used for tracing
+ elseif redundant then
+ r = r + 1
+ redundant[r] = n
+ else
+ r = 1
+ redundant = { n }
+ end
+ end
+ end
+
+ end
+
+ if firstnone then
+ protectnone()
+ end
+
+ if force_boundaryrun then
+
+ -- we can inject wordboundaries and then let the hyphenator do its work
+ -- but we need to get rid of those nodes in order to build ligatures
+ -- and kern (a rather context thing)
+
+ for b, subtype in nextboundary, head do
+ if subtype == wordboundary_code then
+ if redundant then
+ r = r + 1
+ redundant[r] = b
+ else
+ r = 1
+ redundant = { b }
+ end
+ end
+ end
+
+ end
+
+ if redundant then
+ for i=1,r do
+ local r = redundant[i]
+ local p, n = getboth(r)
+ if r == head then
+ head = n
+ setprev(n)
+ else
+ setlink(p,n)
+ end
+ if b > 0 then
+ for i=1,b do
+ local bi = basefonts[i]
+ local b1 = bi[1]
+ local b2 = bi[2]
+ if b1 == b2 then
+ if b1 == r then
+ bi[1] = false
+ bi[2] = false
+ end
+ elseif b1 == r then
+ bi[1] = n
+ elseif b2 == r then
+ bi[2] = p
+ end
+ end
+ end
+ flush_node(r)
+ end
+ end
+
+ if force_discrun then
+ -- basefont is not supported in disc only runs ... it would mean a lot of
+ -- ranges .. we could try to run basemode as a separate processor run but not
+ -- for now (we can consider it when the new node code is tested
+ for disc in nextdisc, head do
+ -- doing only replace is good enough because pre and post are normally used
+ -- for hyphens and these come from fonts that part of the hyphenated word
+ local r = getreplace(disc)
+ if r then
+ local prevfont = nil
+ local prevdynamic = nil
+ local none = false
+ firstnone = nil
+ basefont = nil
+ for n, char, font, dynamic in nextchar, r do
+ -- local dynamic = getglyphdata(n) or 0 -- zero dynamic is reserved for fonts in context
+ if font ~= prevfont or dynamic ~= prevdynamic then
+ prevfont = font
+ prevdynamic = dynamic
+ local fontmode = fontmodes[font]
+ if fontmode == "none" then
+ setnone(n)
+ elseif fontmode == "base" then
+ -- so the replace gets an extra treatment ... so be it
+ setbase(n)
+ else
+ setnode(n,font,dynamic)
+ end
+ elseif firstnone then
+ -- lastnone = n
+ lastnone = nil
+ end
+ -- we assume one font for now (and if there are more and we get into issues then
+ -- we can always remove the break)
+ break
+ end
+ if firstnone then
+ protectnone()
+ end
+ end
+ end
+
+ end
+
+ if trace_fontrun then
+ stop_trace(u,usedfonts,d,dynamicfonts,b,basefonts,r,redundant)
+ end
+
+ -- in context we always have at least 2 processors
+ if u == 0 then
+ -- skip
+ elseif u == 1 then
+ for i=1,#lastproc do
+ head = lastproc[i](head,lastfont,0,direction)
+ end
+ else
+ for font, processors in next, usedfonts do -- unordered
+ for i=1,#processors do
+ head = processors[i](head,font,0,direction,u) -- u triggers disc optimizer
+ end
+ end
+ end
+ if d == 0 then
+ -- skip
+ elseif d == 1 then
+ local font, dynamics = next(dynamicfonts)
+ for dynamic, processors in next, dynamics do -- unordered, dynamic can switch in between
+ for i=1,#processors do
+ head = processors[i](head,font,dynamic,direction)
+ end
+ end
+ else
+ for font, dynamics in next, dynamicfonts do
+ for dynamic, processors in next, dynamics do -- unordered, dynamic can switch in between
+ for i=1,#processors do
+ head = processors[i](head,font,dynamic,direction,d) -- d triggers disc optimizer
+ end
+ end
+ end
+ end
+ if b == 0 then
+ -- skip
+ elseif b == 1 then
+ -- only one font
+ local range = basefonts[1]
+ local start = range[1]
+ local stop = range[2]
+ if (start or stop) and (start ~= stop) then
+ local front = head == start
+ if stop then
+ start = ligaturing(start,stop)
+ start = kerning(start,stop)
+ elseif start then -- safeguard
+ start = ligaturing(start)
+ start = kerning(start)
+ end
+ if front and head ~= start then
+ head = start
+ end
+ end
+ else
+ -- multiple fonts
+ for i=1,b do
+ local range = basefonts[i]
+ local start = range[1]
+ local stop = range[2]
+ if start then -- and start ~= stop but that seldom happens
+ local front = head == start
+ local prev = getprev(start)
+ local next = getnext(stop)
+ if stop then
+ start, stop = ligaturing(start,stop)
+ start, stop = kerning(start,stop)
+ else
+ start = ligaturing(start)
+ start = kerning(start)
+ end
+ -- is done automatically
+ if prev then
+ setlink(prev,start)
+ end
+ if next then
+ setlink(stop,next)
+ end
+ -- till here
+ if front and head ~= start then
+ head = start
+ end
+ end
+ end
+ end
+
+ stoptiming(nodes)
+
+ if trace_characters then
+ nodes.report(head)
+ end
+
+ return head
+ end
+
+end
+
+handlers.protectglyphs = protect_glyphs
+handlers.unprotectglyphs = unprotect_glyphs
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-gcm.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-gcm.lmt
new file mode 100644
index 00000000000..7f2a7bded8a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-gcm.lmt
@@ -0,0 +1,114 @@
+if not modules then modules = { } end modules ['node-gmc'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, tostring = type, tostring
+
+local nodes = nodes
+local ligature_code = nodes.glyphcodes.ligature
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getsubtype = nuts.getsubtype
+local copy_node = nuts.copy
+local flush_list = nuts.flush_list
+local count = nuts.count
+local isglyph = nuts.isglyph
+local getprop = nuts.getprop
+local setprop = nuts.setprop
+
+local fastcopy = table.fastcopy
+
+local report_error = logs.reporter("node-aux:error")
+
+local function set_components(base,list)
+ local t = { }
+ local n = 0
+ local l = list
+ while list do
+ local char = isglyph(list)
+ if char then
+ n = n + 1
+ t[n] = char
+ end
+ list = getnext(list)
+ end
+ -- not yet as we need them
+ --
+ -- flush_list(l)
+ --
+ setprop(base,"components",n > 0 and t or false)
+end
+
+local function get_components(base)
+ return getprop(base,"components")
+end
+
+local function copy_no_components(base)
+ local copy = copy_node(base)
+ setprop(copy,"components",false) -- no metatable lookup!
+ return copy
+end
+
+local function copy_only_glyphs(base)
+ local t = getprop(base,"components") -- also metatable
+ if t then
+ return fastcopy(t)
+ end
+end
+
+local function do_count(t,marks)
+ local n = 0
+ if t then
+ for i=1,#t do
+ local c = t[i]
+ if type(c) == "table" then
+ n = n + do_count(t,marks)
+ elseif not marks[c] then
+ n = n + 1
+ else
+ --marks don't count
+ end
+ end
+ end
+ return n
+end
+
+-- start is a mark and we need to keep that one
+
+local done = false
+
+local function count_components(base,marks)
+ local char = isglyph(base)
+ if char then
+ if getsubtype(base) == ligature_code then
+ if not done then
+ logs.report("fonts","!")
+ logs.report("fonts","! check count_components with mkiv !")
+ logs.report("fonts","!")
+ done = true
+ end
+ local t = getprop(base,"components")
+ if t then
+ return do_count(t,marks)
+ end
+ elseif not marks[char] then
+ return 1
+ end
+ end
+ return 0
+end
+
+nuts.set_components = set_components
+nuts.get_components = get_components
+nuts.copy_only_glyphs = copy_only_glyphs
+nuts.copy_no_components = copy_no_components
+nuts.count_components = count_components
+nuts.flush_components = flush_list
+
+nuts.setcomponents = function() report_error("unsupported: %a","setcomponents") end
+nuts.getcomponents = function() report_error("unsupported: %a","getcomponents") end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt
new file mode 100644
index 00000000000..4ba4b4000a1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-ini.lmt
@@ -0,0 +1,200 @@
+if not modules then modules = { } end modules ['node-ini'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+--[[ldx--
+<p>Most of the code that had accumulated here is now separated in modules.</p>
+--ldx]]--
+
+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]]--
+
+nodes = nodes or { }
+local nodes = nodes
+nodes.handlers = nodes.handlers or { }
+
+local mark = utilities.storage.mark
+local allocate = utilities.storage.allocate
+local formatcolumns = utilities.formatters.formatcolumns
+
+local getsubtypes = node.subtypes
+local getvalues = node.values
+
+tex.magicconstants = { -- we use tex.constants for something else
+ running = -1073741824, -- null_flag
+ maxdimen = 1073741823, -- max_dimen
+ trueinch = 4736286,
+}
+
+local listcodes = mark(getsubtypes("list"))
+local rulecodes = mark(getsubtypes("rule"))
+local dircodes = mark(getsubtypes("dir"))
+local glyphcodes = mark(getsubtypes("glyph"))
+local disccodes = mark(getsubtypes("disc"))
+local gluecodes = mark(getsubtypes("glue"))
+local boundarycodes = mark(getsubtypes("boundary"))
+local penaltycodes = mark(getsubtypes("penalty"))
+local kerncodes = mark(getsubtypes("kern"))
+local mathcodes = mark(getsubtypes("math"))
+local noadcodes = mark(getsubtypes("noad"))
+local radicalcodes = mark(getsubtypes("radical"))
+local accentcodes = mark(getsubtypes("accent"))
+local fencecodes = mark(getsubtypes("fence"))
+----- fractioncodes = mark(getsubtypes("fraction"))
+local parcodes = mark(getsubtypes("par"))
+
+local fillvalues = mark(getvalues("fill"))
+local dirvalues = mark(getvalues("dir"))
+
+local function simplified(t)
+ local r = { }
+ for k, v in next, t do
+ r[k] = gsub(v,"_","")
+ end
+ 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 nodecodes = simplified(node.types())
+
+gluecodes = allocate(swapped(gluecodes,gluecodes))
+dircodes = allocate(swapped(dircodes,dircodes))
+boundarycodes = allocate(swapped(boundarycodes,boundarycodes))
+noadcodes = allocate(swapped(noadcodes,noadcodes))
+radicalcodes = allocate(swapped(radicalcodes,radicalcodes))
+nodecodes = allocate(swapped(nodecodes,nodecodes))
+listcodes = allocate(swapped(listcodes,listcodes))
+glyphcodes = allocate(swapped(glyphcodes,glyphcodes))
+kerncodes = allocate(swapped(kerncodes,kerncodes))
+penaltycodes = allocate(swapped(penaltycodes,penaltycodes))
+mathcodes = allocate(swapped(mathcodes,mathcodes))
+disccodes = allocate(swapped(disccodes,disccodes))
+accentcodes = allocate(swapped(accentcodes,accentcodes))
+fencecodes = allocate(swapped(fencecodes,fencecodes))
+parcodes = allocate(swapped(parcodes,parcodes))
+rulecodes = allocate(swapped(rulecodes,rulecodes))
+noadoptions = allocate(swapped(noadoptions,noadoptions))
+
+dirvalues = allocate(swapped(dirvalues,dirvalues))
+fillvalues = allocate(swapped(fillvalues,fillvalues))
+
+nodes.gluecodes = gluecodes
+nodes.dircodes = dircodes
+nodes.boundarycodes = boundarycodes
+nodes.noadcodes = noadcodes
+nodes.listcodes = listcodes
+nodes.glyphcodes = glyphcodes
+nodes.kerncodes = kerncodes
+nodes.penaltycodes = penaltycodes
+nodes.mathcodes = mathcodes
+nodes.disccodes = disccodes
+nodes.accentcodes = accentcodes
+nodes.radicalcodes = radicalcodes
+nodes.fencecodes = fencecodes
+nodes.parcodes = parcodes
+nodes.rulecodes = rulecodes
+
+nodes.noadoptions = noadoptions
+nodes.fillvalues = fillvalues
+nodes.fillcodes = fillvalues -- for now
+nodes.dirvalues = dirvalues
+
+nodes.nodecodes = nodecodes
+
+local subtypes = allocate {
+ glue = gluecodes,
+ dir = dircodes,
+ boundary = boundarycodes,
+ noad = noadcodes,
+ glyph = glyphcodes,
+ kern = kerncodes,
+ penalty = penaltycodes,
+ math = mathcodes,
+ disc = disccodes,
+ accent = accentcodes,
+ radical = radicalcodes,
+ fence = fencecodes,
+ par = parcodes,
+ rule = rulecodes,
+
+ vlist = listcodes,
+ hlist = listcodes,
+
+ -- list = listcodes,
+
+ -- parameter = parametercodes,
+ -- user = usercodes,
+}
+
+for k, v in table.sortedhash(subtypes) do
+ local i = nodecodes[k]
+ if i and not subtypes[i] then
+ subtypes[i] = v
+ end
+end
+
+nodes.subtypes = subtypes
+
+-- a few more friendly aliases:
+
+nodes.skipcodes = gluecodes
+nodes.directioncodes = dircodes
+nodes.discretionarycodes = disccodes
+
+nodes.directionvalues = dirvalues
+
+glyphcodes.glyph = glyphcodes.character
+
+gluecodes.parfillrightskip = gluecodes.parfillrightskip or gluecodes.parfillskip
+gluecodes.parfillskip = gluecodes.parfillskip or gluecodes.parfillrightskip
+
+listcodes.row = listcodes.alignment
+listcodes.column = listcodes.alignment
+
+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
+
+for i=0,nodecodes.glyph do
+ texsetintegervalue(nodecodes[i] .. "nodecode",i,"immutable")
+end
+for i=0,#gluecodes do
+ texsetintegervalue(gluecodes[i] .. "subtypecode",i,"immutable")
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/node-ini.mkxl
new file mode 100644
index 00000000000..b3f17e04159
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-ini.mkxl
@@ -0,0 +1,56 @@
+%D \module
+%D [ file=node-ini,
+%D version=2006.08.20,
+%D title=\CONTEXT\ Node Macros,
+%D subtitle=Initialization,
+%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 Support / Initialization}
+
+\unprotect
+
+\newcount\filterstate \filterstate\plusone % hm, public
+
+\registerctxluafile{node-cmp}{autosuffix}
+\registerctxluafile{node-ini}{autosuffix}
+\registerctxluafile{node-met}{autosuffix}
+\registerctxluafile{node-nut}{autosuffix}
+\registerctxluafile{node-res}{autosuffix}
+\registerctxluafile{node-ext}{autosuffix}
+%registerctxluafile{node-ppt}{} % experimental, not used so probably useless
+\registerctxluafile{node-aux}{autosuffix}
+\registerctxluafile{node-gcm}{autosuffix}
+\registerctxluafile{node-tst}{}
+\registerctxluafile{node-tra}{autosuffix}
+\registerctxluafile{node-snp}{autosuffix}
+\registerctxluafile{node-tsk}{}
+\registerctxluafile{node-tex}{autosuffix}
+\registerctxluafile{node-dir}{} % experimental, not yet (and maybe never) used
+\registerctxluafile{node-pro}{autosuffix}
+\registerctxluafile{node-ser}{autosuffix}
+\registerctxluafile{node-acc}{autosuffix} % experimental
+%registerctxluafile{node-prp}{} % makes no sense (yet)
+\registerctxluafile{node-scn}{autosuffix}
+\registerctxluafile{node-syn}{autosuffix}
+\registerctxluafile{node-par}{autosuffix}
+
+%D This might go away (needs checking anyway, very old code):
+
+\newcount\c_node_tracers_show_box % box number
+
+\permanent\protected\def\shownextnodes{\afterassignment\node_tracers_show_next\c_node_tracers_show_box}
+\permanent\protected\def\showflatnodes{\afterassignment\node_tracers_show_flat\c_node_tracers_show_box}
+
+\def\node_tracers_show_next{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_node_tracers_show_box,false,true))}}
+\def\node_tracers_show_flat{\ctxlua{texio.write_nl('log',nodes.serializebox(\number\c_node_tracers_show_box,true, true))}}
+
+\permanent\protected\def\visualizenextnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,false,true)}}}
+\permanent\protected\def\visualizeflatnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,true,true)}}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-met.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-met.lmt
new file mode 100644
index 00000000000..a3f02d7093a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-met.lmt
@@ -0,0 +1,633 @@
+if not modules then modules = { } end modules ['node-MET'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is an experimental module. Don't use nuts for generic code, at least not till
+-- the regular code is proven stable. No support otherwise.
+
+-- luatex: todo: copylist should return h, t
+-- todo: see if using insert_before and insert_after makes sense here
+
+-- This file is a side effect of the \LUATEX\ speed optimization project of Luigi
+-- Scarso and me. As \CONTEXT\ spends over half its time in \LUA, we though that
+-- using \LUAJIT\ could improve performance. We've published some of our experiences
+-- elsewhere, but to summarize: \LUAJITTEX\ benefits a lot from the faster virtual
+-- machine, but when jit is turned of we loose some again. We experimented with
+-- ffi (without messing up the \CONTEXT\ code too much) but there we also lost more
+-- than we gained (mostly due to lack of compatible userdata support: it's all or
+-- nothing). This made us decide to look into the \LUA||\TEX\ interfacing and by
+-- profiling and careful looking at the (of course then still beta source code) we
+-- could come up with some improvements. The first showed up in 0.75 and we've more
+-- on the agenda for 0.80. Although some interfaces could be sped up significantly
+-- in practice we're only talking of 5||10\% on a \CONTEXT\ run and maybe more when
+-- complex and extensive node list manipulations happens (we're talking of hundreds
+-- of millions cross boundary calls then for documents of hundreds pages). One of the
+-- changes in the \CONTEXT\ code base is that we went from indexed access to nodes to
+-- function calls (in principle faster weren't it that the accessors need to do more
+-- checking which makes them slower) and from there to optimizing these calls as well
+-- as providing fast variants for well defined situations. At first optimizations were
+-- put in a separate \type {node.fast} table although some improvements could be
+-- ported to the main node functions. Because we got the feeling that more gain was
+-- possible (especially when using more complex fonts and \MKIV\ functionality) we
+-- eventually abandoned this approach and dropped the \type {fast} table in favour of
+-- another hack. In the process we had done lots of profiling and testing so we knew
+-- where time was wasted,
+--
+-- As lots of testing and experimenting was part of this project, I could not have
+-- done without stacks of new \CD s and \DVD s. This time Porcupine Tree, No-Man
+-- and Archive were came to rescue.
+--
+-- It all started with testing performance of:
+--
+-- node.getfield = metatable.__index
+-- node.setfield = metatable.__newindex
+
+local type, select = type, select
+local setmetatableindex = table.setmetatableindex
+
+-- First we get the metatable of a node:
+
+local metatable = nil
+
+do
+ local glyph = node.new("glyph",0)
+ metatable = getmetatable(glyph)
+ node.free(glyph)
+end
+
+-- statistics.tracefunction(node, "node", "getfield","setfield")
+-- statistics.tracefunction(node.direct,"node.direct","getfield","setfield")
+
+-- We start with some helpers and provide all relevant basic functions in the
+-- node namespace as well.
+
+nodes = nodes or { }
+local nodes = nodes
+
+local nodecodes = nodes.nodecodes
+
+nodes.tostring = node.tostring or tostring
+nodes.copy = node.copy
+nodes.copy_node = node.copy
+nodes.copy_list = node.copy_list
+nodes.delete = node.delete
+nodes.dimensions = node.dimensions
+nodes.rangedimensions = node.rangedimensions
+nodes.end_of_math = node.end_of_math
+nodes.flush = node.flush_node
+nodes.flush_node = node.flush_node
+nodes.flush_list = node.flush_list
+nodes.free = node.free
+nodes.insert_after = node.insert_after
+nodes.insert_before = node.insert_before
+nodes.hpack = node.hpack
+nodes.new = node.new
+nodes.tail = node.tail
+nodes.traverse = node.traverse
+nodes.traverse_id = node.traverse_id
+nodes.traverse_char = node.traverse_char
+nodes.traverse_glyph = node.traverse_glyph
+nodes.traverse_list = node.traverse_list
+nodes.slide = node.slide
+nodes.vpack = node.vpack
+nodes.fields = node.fields
+nodes.is_node = node.is_node
+nodes.setglue = node.setglue
+nodes.uses_font = node.uses_font
+
+nodes.first_glyph = node.first_glyph
+nodes.has_glyph = node.has_glyph or node.first_glyph
+
+nodes.current_attributes = node.current_attributes or node.current_attr
+nodes.has_field = node.has_field
+nodes.last_node = node.last_node
+nodes.usedlist = node.usedlist
+nodes.protrusion_skippable = node.protrusion_skippable
+nodes.check_discretionaries = node.check_discretionaries
+nodes.write = node.write
+nodes.flatten_discretionaries = node.flatten_discretionaries
+
+nodes.count = node.count
+nodes.length = node.length
+
+nodes.has_attribute = node.has_attribute
+nodes.set_attribute = node.set_attribute
+nodes.find_attribute = node.find_attribute
+nodes.unset_attribute = node.unset_attribute
+
+nodes.protect_glyph = node.protect_glyph
+nodes.protect_glyphs = node.protect_glyphs
+nodes.unprotect_glyph = node.unprotect_glyph
+nodes.unprotect_glyphs = node.unprotect_glyphs
+nodes.kerning = node.kerning
+nodes.ligaturing = node.ligaturing
+nodes.hyphenating = node.hyphenating
+nodes.mlist_to_hlist = node.mlist_to_hlist
+
+nodes.effective_glue = node.effective_glue
+nodes.getglue = node.getglue
+nodes.setglue = node.setglue
+nodes.is_zero_glue = node.is_zero_glue
+
+nodes.tonode = function(n) return n end
+nodes.tonut = function(n) return n end
+
+-- These are never used in \CONTEXT, only as a gimmick in node operators
+-- so we keep them around.
+--
+-- Fro nwo I keep them in \LMTX\ but they will go away!
+
+local n_getfield = node.getfield
+local n_getattr = node.get_attribute
+
+local n_setfield = node.setfield
+local n_setattr = n_setfield
+
+nodes.getfield = n_getfield
+nodes.setfield = n_setfield
+nodes.getattr = n_getattr
+nodes.setattr = n_setattr
+nodes.takeattr = nodes.unset_attribute
+
+local function n_getid (n) return n_getfield(n,"id") end
+local function n_getsubtype(n) return n_getfield(n,"subtype") end
+
+nodes.getid = n_getid
+nodes.getsubtype = n_getsubtype
+
+local function n_getchar(n) return n_getfield(n,"char") end
+local function n_setchar(n,c) return n_setfield(n,"char",c) end
+local function n_getfont(n) return n_getfield(n,"font") end
+local function n_setfont(n,f) return n_setfield(n,"font",f) end
+
+nodes.getchar = n_getchar
+nodes.setchar = n_setchar
+nodes.getfont = n_getfont
+nodes.setfont = n_setfont
+
+local function n_getlist (n) return n_getfield(n,"list") end
+local function n_setlist (n,l) return n_setfield(n,"list",l) end
+local function n_getleader(n) return n_getfield(n,"leader") end
+local function n_setleader(n,l) return n_setfield(n,"leader",l) end
+
+nodes.getlist = n_getlist
+nodes.setlist = n_setlist
+nodes.getleader = n_getleader
+nodes.setleader = n_setleader
+
+local function n_getnext(n) return n_getfield(n,"next") end
+local function n_setnext(n,nn) return n_setfield(n,"next",nn) end
+local function n_getprev(n) return n_getfield(n,"prev") end
+local function n_setprev(n,pp) return n_setfield(n,"prev",pp) end
+local function n_getboth(n) return n_getfield(n,"prev"), n_getfield(n,"next") end
+local function n_setboth(n,pp,nn) return n_setfield(n,"prev",pp), n_setfield(n,"next",nn) end
+
+nodes.getnext = n_getnext
+nodes.setnext = n_setnext
+nodes.getprev = n_getprev
+nodes.setprev = n_setprev
+nodes.getboth = n_getboth
+nodes.setboth = n_setboth
+
+local function n_setlink(...)
+ -- not that fast but not used often anyway
+ local h = nil
+ for i=1,select("#",...) do
+ local n = select(i,...)
+ if not n then
+ -- go on
+ elseif h then
+ n_setfield(h,"next",n)
+ n_setfield(n,"prev",h)
+ else
+ h = n
+ end
+ end
+ return h
+end
+
+nodes.setlink = n_setlink
+
+nodes.getbox = node.getbox or tex.getbox
+nodes.setbox = node.setbox or tex.setbox
+
+local n_flush_node = nodes.flush
+local n_copy_node = nodes.copy
+local n_copy_list = nodes.copy_list
+local n_find_tail = nodes.tail
+local n_insert_after = nodes.insert_after
+local n_insert_before = nodes.insert_before
+local n_slide = nodes.slide
+
+local n_remove_node = node.remove -- not yet nodes.remove
+
+local function remove(head,current,free_too)
+ local t = current
+ head, current = n_remove_node(head,current)
+ if not t then
+ -- forget about it
+ elseif free_too then
+ n_flush_node(t)
+ t = nil
+ else
+ n_setboth(t)
+ end
+ return head, current, t
+end
+
+nodes.remove = remove
+
+function nodes.delete(head,current)
+ return remove(head,current,true)
+end
+
+-- local h, c = nodes.replace(head,current,new)
+-- local c = nodes.replace(false,current,new)
+-- local c = nodes.replace(current,new)
+--
+-- todo: check for new.next and find tail
+
+function nodes.replace(head,current,new) -- no head returned if false
+ if not new then
+ head, current, new = false, head, current
+-- current, new = head, current
+ end
+ local prev = n_getprev(current)
+ local next = n_getnext(current)
+ if next then
+ n_setlink(new,next)
+ end
+ if prev then
+ n_setlink(prev,new)
+ end
+ if head then
+ if head == current then
+ head = new
+ end
+ n_flush_node(current)
+ return head, new
+ else
+ n_flush_node(current)
+ return new
+ end
+end
+
+-- nodes.countall : see node-nut.lua
+
+function nodes.append(head,current,...)
+ for i=1,select("#",...) do
+ head, current = n_insert_after(head,current,(select(i,...)))
+ end
+ return head, current
+end
+
+function nodes.prepend(head,current,...)
+ for i=1,select("#",...) do
+ head, current = n_insert_before(head,current,(select(i,...)))
+ end
+ return head, current
+end
+
+function nodes.linked(...)
+ local head, last
+ for i=1,select("#",...) do
+ local next = select(i,...)
+ if next then
+ if head then
+ n_setlink(last,next)
+ else
+ head = next
+ end
+ last = n_find_tail(next) -- we could skip the last one
+ end
+ end
+ return head
+end
+
+function nodes.concat(list) -- consider tail instead of slide
+ local head, tail
+ for i=1,#list do
+ local li = list[i]
+ if li then
+ if head then
+ n_setlink(tail,li)
+ else
+ head = li
+ end
+ tail = n_slide(li)
+ end
+ end
+ return head, tail
+end
+
+function nodes.reference(n)
+ return n and tonut(n) or "<none>"
+end
+
+-- Here starts an experiment with metatables. Of course this only works with nodes
+-- wrapped in userdata with a metatable.
+--
+-- Nodes are kind of special in the sense that you need to keep an eye on creation
+-- and destruction. This is quite natural if you consider that changing the content
+-- of a node would also change any copy (or alias). As there are too many pitfalls
+-- we don't have this kind of support built in \LUATEX, which means that macro
+-- packages are free to provide their own. One can even use local variants.
+--
+-- n1 .. n2 : append nodes, no copies
+-- n1 * 5 : append 4 copies of nodes
+-- 5 + n1 : strip first 5 nodes
+-- n1 - 5 : strip last 5 nodes
+-- n1 + n2 : inject n2 after first of n1
+-- n1 - n2 : inject n2 before last of n1
+-- n1^2 : two copies of nodes (keep orginal)
+-- - n1 : reverse nodes
+-- n1/f : apply function to nodes
+
+-- local s = nodes.typesetters.tonodes
+--
+-- local function w(lst)
+-- context.dontleavehmode()
+-- context(lst)
+-- context.par()
+-- end
+--
+-- local n1 = s("a")
+-- local n2 = s("b")
+-- local n3 = s("c")
+-- local n4 = s("d")
+-- local n5 = s("e")
+-- local n6 = s("f")
+-- local n7 = s("g")
+--
+-- local n0 = n1 .. (n2 * 10).. n3 .. (5 * n4) .. n5 .. ( 5 * n6 ) .. n7 / function(n) n.char = string.byte("!") return n end
+--
+-- w(#n0)
+--
+-- w(n0)
+--
+-- local n1 = s("a") * 10
+-- local n2 = s("b") * 10
+--
+-- local n0 = ((5 + n1) .. (n2 - 5) )
+-- local n0 = - n0
+--
+-- local n0 = nil .. n0^3 .. nil
+--
+-- w(n0)
+--
+-- w ( s("a") + s("b") ) w ( s("a") + 4*s("b") ) w ( 4*s("a") + s("b") ) w ( 4*s("a") + 4*s("b") )
+-- w ( s("a") - s("b") ) w ( s("a") - 4*s("b") ) w ( 4*s("a") - s("b") ) w ( 4*s("a") - 4*s("b") )
+
+local n_remove_node = nodes.remove
+
+metatable.__concat = function(n1,n2) -- todo: accept nut on one end
+ if not n1 then
+ return n2
+ elseif not n2 then
+ return n1
+ elseif n1 == n2 then
+ -- or abort
+ return n2 -- or n2 * 2
+ else
+ local tail = n_find_tail(n1)
+ n_setlink(tail,n2)
+ return n1
+ end
+end
+
+metatable.__mul = function(n,multiplier)
+ if type(multiplier) ~= "number" then
+ n, multiplier = multiplier, n
+ end
+ if multiplier <= 1 then
+ return n
+ elseif n_getnext(n) then
+ local head
+ for i=2,multiplier do
+ local h = n_copy_list(n)
+ if head then
+ local t = n_find_tail(h)
+ n_setlink(t,head)
+ end
+ head = h
+ end
+ local t = n_find_tail(n)
+ n_setlink(t,head)
+ else
+ local head
+ for i=2,multiplier do
+ local c = n_copy_node(n)
+ if head then
+ n_setlink(c,head)
+ end
+ head = c
+ end
+ n_setlink(n,head)
+ end
+ return n
+end
+
+metatable.__sub = function(first,second)
+ if type(second) == "number" then
+ local tail = n_find_tail(first)
+ for i=1,second do
+ local prev = n_getprev(tail)
+ n_flush_node(tail) -- can become flushlist/flushnode
+ if prev then
+ tail = prev
+ else
+ return nil
+ end
+ end
+ if tail then
+ n_setnext(tail)
+ return first
+ else
+ return nil
+ end
+ else
+ -- aaaaa - bbb => aaaabbba
+ local firsttail = n_find_tail(first)
+ local prev = n_getprev(firsttail)
+ if prev then
+ local secondtail = n_find_tail(second)
+ n_setlink(secondtail,firsttail)
+ n_setlink(prev,second)
+ return first
+ else
+ local secondtail = n_find_tail(second)
+ n_setlink(secondtail,first)
+ return second
+ end
+ end
+end
+
+metatable.__add = function(first,second)
+ if type(first) == "number" then
+ local head = second
+ for i=1,first do
+ local second = n_getnext(head)
+ n_flush_node(head) -- can become flushlist/flushnode
+ if second then
+ head = second
+ else
+ return nil
+ end
+ end
+ if head then
+ n_setprev(head)
+ return head
+ else
+ return nil
+ end
+ else
+ -- aaaaa + bbb => abbbaaaa
+ local next = n_getnext(first)
+ if next then
+ local secondtail = n_find_tail(second)
+ n_setlink(first,second)
+ n_setlink(secondtail,next)
+ else
+ n_setlink(first,second)
+ end
+ return first
+ end
+end
+
+metatable.__len = function(current)
+ local length = 0
+ while current do
+ current = n_getnext(current)
+ length = length + 1
+ end
+ return length
+end
+
+metatable.__div = function(list,action)
+ return action(list) or list -- always a value
+end
+
+metatable.__pow = function(n,multiplier)
+ local tail = n
+ local head = nil
+ if n_getnext(n) then
+ if multiplier == 1 then
+ head = n_copy_list(n)
+ else
+ for i=1,multiplier do
+ local h = n_copy_list(n)
+ if head then
+ local t = n_find_tail(h)
+ n_setlink(t,head)
+ end
+ head = h
+ end
+ end
+ else
+ if multiplier == 1 then
+ head = n_copy_node(n)
+ else
+ for i=2,multiplier do
+ local c = n_copy_node(n)
+ if head then
+ n_setlink(head,c)
+ end
+ head = c
+ end
+ end
+ end
+ -- todo: tracing
+ return head
+end
+
+metatable.__unm = function(head)
+ local last = head
+ local first = head
+ local current = n_getnext(head)
+ while current do
+ local next = n_getnext(current)
+ n_setlink(current,first)
+ first = current
+ current = next
+ end
+ n_setprev(first)
+ n_setnext(last)
+ return first
+end
+
+-- see node-nut.lua for more info on going nuts
+
+-- if not gonuts then
+--
+-- local nuts = { }
+-- nodes.nuts = nuts
+--
+-- local function dummy(f) return f end
+--
+-- nodes.vianuts = dummy
+-- nodes.vianodes = dummy
+--
+-- for k, v in next, nodes do
+-- if type(v) == "function" then
+-- nuts[k] = v
+-- end
+-- end
+--
+-- end
+
+-- also handy
+
+local tonode = nodes.tonode
+local whatsit_code = nodecodes.whatsit
+local getfields = node.fields
+local sort = table.sort
+local whatsitkeys = { }
+local keys = { whatsit = whatsitkeys }
+local messyhack = table.tohash { -- temporary solution
+ nodecodes.attributelist,
+ nodecodes.attribute,
+ nodecodes.action, -- hm
+}
+
+setmetatableindex(keys,function(t,k)
+ local v = (k == "attributelist" or k == nodecodes.attributelist) and { } or getfields(k)
+ if messyhack[k] then
+ for i=1,#v do
+ if v[i] == "subtype" then
+ remove(v,i)
+ break
+ end
+ end
+ end
+ if v[ 0] then v[#v+1] = "next" v[ 0] = nil end
+ if v[-1] then v[#v+1] = "prev" v[-1] = nil end
+ sort(v)
+ t[k] = v
+ return v
+end)
+
+setmetatableindex(whatsitkeys,function(t,k)
+ local v = getfields(whatsit_code,k)
+ if v[ 0] then v[#v+1] = "next" v[ 0] = nil end
+ if v[-1] then v[#v+1] = "prev" v[-1] = nil end
+ sort(v)
+ t[k] = v
+ return v
+end)
+
+local function nodefields(n)
+ n = tonode(n)
+ local id = n.id
+ if id == whatsit_code then
+ return whatsitkeys[n.subtype]
+ else
+ return keys[id]
+ end
+end
+
+nodes.keys = keys -- [id][subtype]
+nodes.fields = nodefields -- (n)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-mig.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-mig.lmt
new file mode 100644
index 00000000000..c1991350935
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-mig.lmt
@@ -0,0 +1,134 @@
+if not modules then modules = { } end modules ['node-mig'] = {
+ version = 1.001,
+ comment = "companion to node-mig.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: insert_after
+
+local format = string.format
+
+local trace_migrations = false trackers.register("nodes.migrations", function(v) trace_migrations = v end)
+
+local report_nodes = logs.reporter("nodes","migrations")
+
+local attributes = attributes
+local nodes = nodes
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getpost = nuts.getpost
+local getprop = nuts.getprop
+
+local setprop = nuts.setprop
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setpost = nuts.setpost
+
+local count = nuts.count
+local migrate = nuts.migrate
+
+local nodecodes = nodes.nodecodes
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local insert_code = nodecodes.ins
+local mark_code = nodecodes.mark
+
+local a_migrated = attributes.private("migrated")
+
+local migrate_inserts = false
+local migrate_marks = false
+local t_inserts = 0
+local t_marks = 0
+local t_sweeps = 0
+
+local trialtypesetting = context.trialtypesetting
+
+function nodes.handlers.migrate(head,where)
+ if head and not trialtypesetting() and where == "alignment" then
+ if trace_migrations then
+ report_nodes("migration sweep %a",where)
+ end
+ local current = head
+ while current do
+ local id = getid(current)
+ if (id == vlist_code or id == hlist_code or id == insert_code) and not getprop(current,"migrated") then
+ setprop(current,"migrated",true)
+ local list = getlist(current)
+ if list then
+ t_sweeps = t_sweeps + 1
+ local h, first, last = migrate(list,migrate_inserts,migrate_marks)
+ if first then
+ if trace_migrations then
+ local ni = count(insert_code,first)
+ local nm = count(mark_code,first)
+ t_inserts = t_inserts + ni
+ t_marks = t_marks + nm
+ report_nodes("sweep %a, container %a, %s inserts and %s marks migrated outwards during %a",
+ t_sweeps,nodecodes[id],ni,nm,where)
+
+ end
+ local p, t = getpost(current)
+ if p then
+ setlink(t,first)
+ else
+ setpost(current,first)
+ end
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ end
+ return head
+end
+
+statistics.register("node migrations", function()
+ if trace_migrations and t_sweeps > 0 then
+ return format("%s sweeps, %s inserts moved, %s marks moved",t_sweeps,t_inserts,t_marks)
+ end
+end)
+
+-- Since we started with mkiv we had it as experiment but it is about time
+-- to have a more formal interface .. it's still optional due to possible
+-- side effects.
+
+local enableaction = nodes.tasks.enableaction
+local disableaction = nodes.tasks.disableaction
+local texsetcount = tex.setcount
+
+local migrations = { }
+nodes.migrations = migrations
+local enabled = false
+
+local function check()
+ if migrate_marks or migrate_inserts then
+ if not enabled then
+ enableaction("mvlbuilders", "nodes.handlers.migrate")
+ enabled = true
+ texsetcount("automigrationmode",3)
+ end
+ else
+ if enabled then
+ disableaction("mvlbuilders", "nodes.handlers.migrate")
+ enabled = false
+ texsetcount("automigrationmode",0)
+ end
+ end
+end
+
+function migrations.setmarks(v)
+ migrate_marks = v
+ check()
+end
+
+function migrations.setinserts(v)
+ migrate_inserts = v
+ check()
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-mig.mkxl b/Master/texmf-dist/tex/context/base/mkxl/node-mig.mkxl
new file mode 100644
index 00000000000..420140e6fd9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-mig.mkxl
@@ -0,0 +1,44 @@
+%D \module
+%D [ file=node-mig,
+%D version=2010.01.19,
+%D title=\CONTEXT\ Node Macros,
+%D subtitle=Inserts,
+%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 Support / Migrations}
+
+%D \starttyping
+%D \automigrateinserts
+%D
+%D \hbox{\vbox{x\footnote{1}x\footnote{2}x\footnote{3}x}}
+%D \vbox{x\footnote{4}x}
+%D \hbox{\vbox{x\footnote{5}x}}
+%D
+%D \hbox{x}
+%D \hbox{x\footnote{6}x}
+%D \hbox{x}
+%D
+%D \starttabulate
+%D \NC test \NC test \footnote{test} \input tufte \NC \NR
+%D \NC test \NC test \footnote{test} \input tufte \NC \NR
+%D \NC test \NC test \footnote{test} \input tufte \NC \NR
+%D \NC test \NC test \footnote{test} \input tufte \NC \NR
+%D \NC test \NC test \footnote{test} \input tufte \NC \NR
+%D \NC test \NC test \footnote{test} \input tufte \NC \NR
+%D \stoptabulate
+%D \stoptyping
+
+\unprotect
+
+\registerctxluafile{node-mig}{autosuffix}
+
+\aliased\let\automigrateinserts\donothing
+\aliased\let\automigratemarks \donothing
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-nut.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-nut.lmt
new file mode 100644
index 00000000000..7ef087178cd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-nut.lmt
@@ -0,0 +1,601 @@
+if not modules then modules = { } end modules ['node-nut'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Some comments anbout going nuts can be found in the mkiv file with the
+-- suffix "lua", including some timing and musings. We copy the direct table
+-- (1) because that's what we did while things evolved and (2) because we
+-- also add some more helpers.
+
+local type, rawget = type, rawget
+
+local nodes = nodes
+local direct = node.direct
+
+local fastcopy = table.fastcopy
+
+local nodecodes = nodes.nodecodes
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glyph_code = nodecodes.glyph
+
+local tonode = direct.tonode
+local tonut = direct.todirect
+
+local is_node = direct.is_node
+local is_nut = direct.is_direct
+
+local d_remove_node = direct.remove
+local d_flush_node = direct.flush_node
+local d_getnext = direct.getnext
+local d_getprev = direct.getprev
+local d_getid = direct.getid
+local d_getlist = direct.getlist
+local d_find_tail = direct.tail
+local d_insert_after = direct.insert_after
+local d_insert_before = direct.insert_before
+local d_slide = direct.slide
+local d_traverse = direct.traverse
+local d_setlink = direct.setlink
+local d_getboth = direct.getboth
+
+local nuts = {
+ check_discretionaries = direct.check_discretionaries,
+ copy = direct.copy,
+ copy_list = direct.copy_list,
+ copy_node = direct.copy,
+ copy_only = direct.copy_only or direct.copy,
+ count = direct.count,
+ current_attributes = direct.current_attributes,
+ delete = direct.delete,
+ dimensions = direct.dimensions,
+ naturalhsize = direct.naturalhsize,
+ naturalwidth = direct.naturalwidth,
+ effective_glue = direct.effective_glue,
+ end_of_math = direct.end_of_math,
+ exchange = direct.exchange,
+ find_attribute = direct.find_attribute,
+ first_glyph = direct.first_glyph,
+ flatten_discretionaries = direct.flatten_discretionaries,
+ flush = d_flush_node,
+ flush_components = direct.flush_components,
+ flush_list = direct.flush_list,
+ flush_node = direct.flush_node,
+ free = direct.free,
+ getsynctexfields = direct.get_synctex_fields,
+ getattr = direct.get_attribute,
+ getattrs = direct.get_attributes,
+ getattributelist = direct.getattributelist,
+ getattrlist = direct.getattributelist,
+ getboth = d_getboth,
+ getbox = direct.getbox,
+ getboxglue = direct.getglue,
+ getchar = direct.getchar,
+ getcomponents = direct.getcomponents,
+ getdata = direct.getdata,
+ getdepth = direct.getdepth,
+ getdir = direct.getdir,
+ getdirection = direct.getdirection,
+ getdisc = direct.getdisc,
+ getdiscretionary = direct.getdisc,
+ getexpansion = direct.getexpansion,
+ getfam = direct.getfam,
+ getfield = direct.getfield,
+ getfont = direct.getfont,
+ getglue = direct.getglue,
+ getglyphdata = direct.getglyphdata,
+ getheight = direct.getheight,
+ getid = d_getid,
+ getkern = direct.getkern,
+ getlang = direct.getlanguage,-- will become obsolete
+ getlanguage = direct.getlanguage,
+ getleader = direct.getleader,
+ getlist = d_getlist,
+ getnext = d_getnext,
+ getnormalizedline = direct.getnormalizedline,
+ getnucleus = direct.getnucleus,
+ getoffsets = direct.getoffsets,
+ -- getxyoffsets = direct.getxyoffsets,
+ getscale = direct.getscale,
+ getscales = direct.getscales,
+ getxscale = direct.getxscale,
+ getyscale = direct.getyscale,
+ xscaled = direct.xscaled,
+ yscaled = direct.yscaled,
+ getxyscales = direct.getxyscales,
+ getorientation = direct.getorientation,
+ getoptions = direct.getoptions,
+ getpenalty = direct.getpenalty,
+ getpost = direct.getpost,
+ getpre = direct.getpre,
+ getprev = d_getprev,
+ getreplace = direct.getreplace,
+ getruledata = direct.getdata, -- obsolete when we have the split
+ getscript = direct.setscript,
+ getshift = direct.getshift,
+ getstate = direct.getstate,
+ getsub = direct.getsub,
+ getsubpre = direct.getsubpre,
+ getsubtype = direct.getsubtype,
+ getsup = direct.getsup,
+ getsuppre = direct.getsuppre,
+ getsurround = direct.getkern,
+ gettotal = direct.gettotal,
+ getvalue = direct.getdata, -- obsolete
+ getwhd = direct.getwhd,
+ getwidth = direct.getwidth,
+ has_attribute = direct.has_attribute,
+ has_dimensions = direct.has_dimensions,
+ has_field = direct.has_field,
+ has_glyph = direct.has_glyph or direct.first_glyph,
+ hpack = direct.hpack,
+ hyphenating = direct.hyphenating,
+ insert_after = d_insert_after,
+ insert_before = d_insert_before,
+ is_direct = is_direct,
+ is_node = is_node,
+ is_nut = direct.is_direct,
+ is_zero_glue = direct.is_zero_glue,
+ ischar = direct.is_char,
+ isprevchar = direct.is_prev_char,
+ isnextchar = direct.is_next_char,
+ isprevglyph = direct.is_prev_glyph,
+ isnextglyph = direct.is_next_glyph,
+ isglyph = direct.is_glyph,
+ kerning = direct.kerning,
+ last_node = direct.last_node,
+ length = direct.length,
+ ligaturing = direct.ligaturing,
+ migrate = direct.migrate,
+ mlist_to_hlist = direct.mlist_to_hlist,
+ new = direct.new,
+ protect_glyph = direct.protect_glyph,
+ protect_glyphs = direct.protect_glyphs,
+ protrusion_skippable = direct.protrusion_skippable,
+ rangedimensions = direct.rangedimensions,
+ getglyphdimensions = direct.getglyphdimensions,
+ getkerndimension = direct.getkerndimension,
+ remove = d_remove_node,
+ reverse = direct.reverse,
+ set_attribute = direct.set_attribute,
+ addmargins = direct.addmargins,
+ addxymargins = direct.addxymargins,
+ setattr = direct.set_attribute,
+ setattrs = direct.set_attributes,
+ setattributelist = direct.setattributelist,
+ setattrlist = direct.setattributelist,
+ setboth = direct.setboth,
+ setbox = direct.setbox,
+ setboxglue = direct.setglue,
+ setchar = direct.setchar,
+ setcomponents = direct.setcomponents,
+ setdata = direct.setdata,
+ setdepth = direct.setdepth,
+ setdir = direct.setdir,
+ setdirection = direct.setdirection,
+ setdisc = direct.setdisc,
+ setdiscretionary = direct.setdisc,
+ setexpansion = direct.setexpansion,
+ setfam = direct.setfam,
+ setfield = direct.setfield,
+ setfont = direct.setfont,
+ setglue = direct.setglue,
+ setglyphdata = direct.setglyphdata,
+ setheight = direct.setheight,
+ setkern = direct.setkern,
+ setlang = direct.setlanguage,
+ setlanguage = direct.setlanguage,
+ setleader = direct.setleader,
+ setlink = d_setlink,
+ setlist = direct.setlist,
+ setnext = direct.setnext,
+ setnucleus = direct.setnucleus,
+ setscale = direct.setscale or direct.setscales,
+ setscales = direct.setscales,
+ setoffsets = direct.setoffsets,
+ addxoffset = direct.addxoffset,
+ addyoffset = direct.addyoffset,
+ setorientation = direct.setorientation,
+ setoptions = direct.setoptions,
+ setpenalty = direct.setpenalty,
+ setpost = direct.setpost,
+ setpre = direct.setpre,
+ setprev = direct.setprev,
+ setreplace = direct.setreplace,
+ setruledata = direct.setdata, -- obsolete when we have the split
+ setscript = direct.getscript,
+ setshift = direct.setshift,
+ setsplit = direct.setsplit,
+ setstate = direct.setstate,
+ setsub = direct.setsub,
+ setsubpre = direct.setsubpre,
+ setsubtype = direct.setsubtype,
+ setsup = direct.setsup,
+ setsuppre = direct.setsuppre,
+ setsurround = direct.setkern,
+ setsynctexfields = direct.set_synctex_fields,
+ setvalue = direct.setdata, -- obsolete
+ setwhd = direct.setwhd,
+ setwidth = direct.setwidth,
+ slide = d_slide,
+ start_of_par = direct.start_of_par,
+ tail = d_find_tail,
+ takeattr = direct.unset_attribute, -- ?
+ tonode = tonode,
+ tonut = tonut,
+ tostring = direct.tostring,
+ traverse = d_traverse,
+ traverse_char = direct.traverse_char,
+ traverse_glyph = direct.traverse_glyph,
+ traverse_id = direct.traverse_id,
+ traverse_list = direct.traverse_list,
+ traverse_content = direct.traverse_content,
+ unprotect_glyph = direct.unprotect_glyph,
+ unprotect_glyphs = direct.unprotect_glyphs,
+ unset_attribute = direct.unset_attribute,
+ unset_attributes = direct.unset_attributes,
+ usedlist = direct.usedlist,
+ uses_font = direct.uses_font,
+ vpack = direct.vpack,
+ write = direct.write,
+ append = direct.append,
+ has_glyph_option = direct.has_glyph_option,
+ show = direct.show,
+}
+
+nodes.nuts = nuts
+
+nodes.is_node = is_node
+nodes.is_direct = is_nut
+nodes.is_nut = is_nut
+
+nodes.tonode = tonode
+nodes.tonut = tonut
+
+function nuts.delete(head,current)
+ return d_remove_node(head,current,true)
+end
+
+function nuts.replace(head,current,new) -- no head returned if false
+ if not new then
+ head, current, new = false, head, current
+ end
+ local prev, next = d_getboth(current)
+ if prev or next then
+ d_setlink(prev,new,next)
+ end
+ if head then
+ if head == current then
+ head = new
+ end
+ d_flush_node(current)
+ return head, new
+ else
+ d_flush_node(current)
+ return new
+ end
+end
+
+local function countall(stack,flat)
+ local n = 0
+ while stack do
+ local id = d_getid(stack)
+ if not flat and id == hlist_code or id == vlist_code then
+ local list = d_getlist(stack)
+ if list then
+ n = n + 1 + countall(list) -- self counts too
+ else
+ n = n + 1
+ end
+ else
+ n = n + 1
+ end
+ stack = d_getnext(stack)
+ end
+ return n
+end
+
+nuts.countall = countall
+
+function nodes.countall(stack,flat)
+ return countall(tonut(stack),flat)
+end
+
+function nuts.append(head,current,...)
+ for i=1,select("#",...) do
+ head, current = d_insert_after(head,current,(select(i,...)))
+ end
+ return head, current
+end
+
+function nuts.prepend(head,current,...)
+ for i=1,select("#",...) do
+ head, current = d_insert_before(head,current,(select(i,...)))
+ end
+ return head, current
+end
+
+function nuts.linked(...) -- slides !
+ local head, last
+ for i=1,select("#",...) do
+ local next = select(i,...)
+ if next then
+ if head then
+ d_setlink(last,next)
+ else
+ head = next
+ end
+ last = d_find_tail(next) -- we could skip the last one
+ end
+ end
+ return head
+end
+
+function nuts.concat(list) -- consider tail instead of slide
+ local head, tail
+ for i=1,#list do
+ local li = list[i]
+ if li then
+ if head then
+ d_setlink(tail,li)
+ else
+ head = li
+ end
+ tail = d_slide(li)
+ end
+ end
+ return head, tail
+end
+
+function nuts.reference(n)
+ return n or "<none>"
+end
+
+function nuts.vianuts (f) return function(n,...) return tonode(f(tonut (n),...)) end end
+function nuts.vianodes(f) return function(n,...) return tonut (f(tonode(n),...)) end end
+
+nodes.vianuts = nuts.vianuts
+nodes.vianodes = nuts.vianodes
+
+function nodes.insert_list_after(h,c,n)
+ local t = n_tail(n)
+ if c then
+ local cn = n_getnext(c)
+ if cn then
+ -- no setboth here yet
+ n_setfield(t,"next",cn)
+ n_setfield(cn,"prev",t)
+ else
+ n_setfield(t,"next",nil)
+ end
+ n_setfield(c,"next",n)
+ n_setfield(n,"prev",c)
+ return h, n
+ end
+ return n, t
+end
+
+function nuts.insert_list_after(h,c,n)
+ local t = d_tail(n)
+ if c then
+ local cn = d_getnext(c)
+ if cn then
+ d_setlink(t,cn)
+ else
+ d_setnext(t)
+ end
+ d_setlink(c,n)
+ return h, n
+ end
+ return n, t
+end
+
+-- test code only
+
+-- collectranges and mix
+
+local report = logs.reporter("sliding")
+
+local function message(detail,head,current,previous)
+ report("error: %s, current: %s:%s, previous: %s:%s, list: %s, text: %s",
+ detail,
+ nodecodes[d_getid(current)],
+ current,
+ nodecodes[d_getid(previous)],
+ previous,
+ nodes.idstostring(head),
+ nodes.listtoutf(head)
+ )
+ utilities.debugger.showtraceback(report)
+end
+
+local function warn()
+ report()
+ report("warning: the slide tracer is enabled")
+ report()
+ warn = false
+end
+
+local function tracedslide(head)
+ if head then
+ if warn then
+ warn()
+ end
+ local next = d_getnext(head)
+ if next then
+ local prev = head
+ for n in d_traverse(next) do
+ local p = d_getprev(n)
+ if not p then
+ message("unset",head,n,prev)
+ -- break
+ elseif p ~= prev then
+ message("wrong",head,n,prev)
+ -- break
+ end
+ prev = n
+ end
+ end
+ return d_slide(head)
+ end
+end
+
+local function nestedtracedslide(head,level) -- no sliding !
+ if head then
+ if warn then
+ warn()
+ end
+ local id = d_getid(head)
+ local next = d_getnext(head)
+ if next then
+ report("%whead:%s",level or 0,nodecodes[id])
+ local prev = head
+ for n in d_traverse(next) do
+ local p = d_getprev(n)
+ if not p then
+ message("unset",head,n,prev)
+ -- break
+ elseif p ~= prev then
+ message("wrong",head,n,prev)
+ -- break
+ end
+ prev = n
+ local id = d_getid(n)
+ if id == hlist_code or id == vlist_code then
+ nestedtracedslide(d_getlist(n),(level or 0) + 1)
+ end
+ end
+ elseif id == hlist_code or id == vlist_code then
+ report("%wlist:%s",level or 0,nodecodes[id])
+ nestedtracedslide(d_getlist(head),(level or 0) + 1)
+ end
+ -- return d_slide(head)
+ end
+end
+
+local function untracedslide(head)
+ if head then
+ if warn then
+ warn()
+ end
+ local next = d_getnext(head)
+ if next then
+ local prev = head
+ for n in d_traverse(next) do
+ local p = d_getprev(n)
+ if not p then
+ return "unset", d_getid(n)
+ elseif p ~= prev then
+ return "wrong", d_getid(n)
+ end
+ prev = n
+ end
+ end
+ return d_slide(head)
+ end
+end
+
+nuts.tracedslide = tracedslide
+nuts.untracedslide = untracedslide
+nuts.nestedtracedslide = nestedtracedslide
+
+-- this might move
+
+local propertydata = direct.get_properties_table(true)
+
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+
+nodes.properties = {
+ data = propertydata,
+}
+
+-- experimental code with respect to copying attributes has been removed
+-- as it doesn't pay of (most attributes are only accessed once anyway)
+
+function nuts.getprop(n,k)
+ local p = propertydata[n]
+ if p then
+ if k then
+ return p[k]
+ else
+ return p
+ end
+ end
+end
+
+function nuts.rawprop(n,k)
+ local p = rawget(propertydata,n)
+ if p then
+ if k then
+ return p[k]
+ else
+ return p
+ end
+ end
+end
+
+function nuts.setprop(n,k,v)
+ local p = propertydata[n]
+ if p then
+ p[k] = v
+ else
+ propertydata[n] = { [k] = v }
+ end
+end
+
+function nuts.theprop(n)
+ local p = propertydata[n]
+ if not p then
+ p = { }
+ propertydata[n] = p
+ end
+ return p
+end
+
+
+function nuts.isdone(n,k)
+ local p = propertydata[n]
+ if not p then
+ propertydata[n] = { [k] = true }
+ return false
+ end
+ local v = p[k]
+ if v == nil then
+ propertydata[n] = { [k] = true }
+ return false
+ end
+ return v
+end
+
+function nuts.copy_properties(source,target,what)
+ local newprops = propertydata[source]
+ if not newprops then
+ -- nothing to copy
+ return
+ end
+ if what then
+ -- copy one category
+ newprops = rawget(source,what)
+ if newprops then
+ newprops = fastcopy(newprops)
+ local p = rawget(propertydata,target)
+ if p then
+ p[what] = newprops
+ else
+ propertydata[target] = {
+ [what] = newprops,
+ }
+ end
+ end
+ else
+ -- copy all properties
+ newprops = fastcopy(newprops)
+ propertydata[target] = newprops
+ end
+ return newprops -- for checking
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-par.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-par.lmt
new file mode 100644
index 00000000000..125c1b687c1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-par.lmt
@@ -0,0 +1,101 @@
+if not modules then modules = { } end modules ['node-par'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local sequencers = utilities.sequencers
+
+-- This is called a lot! I'm a bit reluctant with this one because it is
+-- sensitive for order. In many other callbacks ther eis no action at the
+-- tex end but here ... Anyway, it has been around for a while now (2019)
+-- and so far I had no need for extensive usage so we're okay.
+
+do
+
+ local actions = nodes.tasks.actions("everypar")
+
+ local function everypar(head)
+ starttiming(builders)
+ head = actions(head)
+ stoptiming(builders)
+ return head
+ end
+
+ callbacks.register("insert_par",everypar,"after paragraph start")
+
+end
+
+-- Originally this one was meant to deal with the indentation (like turn a box into
+-- a skip or prevent it) but that never really was used. The return value still
+-- detemines if an indentation box or skip is injected. Will I change that?
+
+do
+
+ local actions = sequencers.new {
+ name = "paragraph",
+ arguments = "mode,indented,context",
+ returnvalues = "indented",
+ results = "indented",
+ }
+
+ sequencers.appendgroup(actions,"before") -- user
+ sequencers.appendgroup(actions,"system") -- private
+ sequencers.appendgroup(actions,"after" ) -- user
+
+ local function paragraph(mode,indented,context) -- context used to be the cmd code
+ local runner = actions.runner
+ if runner then
+ starttiming(builders)
+ indented = runner(mode,indented,context)
+ stoptiming(builders)
+ end
+ return indented
+ end
+
+ callbacks.register("begin_paragraph",paragraph,"before paragraph start")
+
+end
+
+-- This one is a playground for some old metafun gimmicks that I want to improve
+-- while I'm updating the manual to lmtx. but it might also be useful for other
+-- purposes. It fits in the category obscure and probably takes while to stabelize
+-- (if it stays at all). Again, this is one that has the danger of interference,
+-- so when it finally got an action handler it only got a system one.
+
+do
+
+ local actions = sequencers.new {
+ name = "paragraphcontext",
+ arguments = "context",
+ returnvalues = "ignore",
+ results = "ignore",
+ }
+
+ ----------.appendgroup(actions,"before") -- user
+ sequencers.appendgroup(actions,"system") -- private
+ ----------.appendgroup(actions,"after" ) -- user
+
+ local function parcontext(parcontext)
+ local runner = actions.runner
+ if runner then
+ starttiming(builders)
+ local ignore = runner(parcontext)
+ stoptiming(builders)
+ return ignore
+ end
+ end
+
+ callbacks.register("paragraph_context",parcontext,"when the context is dealt with")
+
+end
+
+-- This means that we now have most callbacks in use, even the ones that I'm not sure
+-- about. It also means that with the above enabled we might have performance now at
+-- its worst. I can optimize this a little but it's not worth the effort (and added
+-- complication).
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-pro.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-pro.lmt
new file mode 100644
index 00000000000..e736f2b76b6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-pro.lmt
@@ -0,0 +1,219 @@
+if not modules then modules = { } end modules ['node-pro'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local trace_callbacks = false trackers .register("nodes.callbacks", function(v) trace_callbacks = v end)
+local force_processors = false directives.register("nodes.processors.force", function(v) force_processors = v end)
+
+local report_nodes = logs.reporter("nodes","processors")
+
+local nodes = nodes
+local tasks = nodes.tasks
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+
+nodes.processors = nodes.processors or { }
+local processors = nodes.processors
+
+-- vbox: grouptype: vbox vtop output split_off split_keep | box_type: exactly|aditional
+-- hbox: grouptype: hbox adjusted_hbox(=hbox_in_vmode) | box_type: exactly|aditional
+
+local actions = tasks.actions("processors")
+
+do
+
+ local isglyph = nuts.isglyph
+ local getnext = nuts.getnext
+
+ local utfchar = utf.char
+ local concat = table.concat
+
+ local n = 0
+
+ local function reconstruct(head) -- we probably have a better one
+ local t, n, h = { }, 0, head
+ while h do
+ n = n + 1
+ local char, id = isglyph(h)
+ if char then -- todo: disc etc
+ t[n] = utfchar(char)
+ else
+ t[n] = "[]"
+ end
+ h = getnext(h)
+ end
+ return concat(t)
+ end
+
+ function processors.tracer(what,head,groupcode,before,after,show)
+ if not groupcode then
+ groupcode = "unknown"
+ elseif groupcode == "" then
+ groupcode = "mvl"
+ end
+ n = n + 1
+ if show then
+ report_nodes("%s: location %a, group %a, # before %a, # after %s, stream: %s",what,n,groupcode,before,after,reconstruct(head))
+ else
+ report_nodes("%s: location %a, group %a, # before %a, # after %s",what,n,groupcode,before,after)
+ end
+ end
+
+end
+
+processors.enabled = true -- this will become a proper state (like trackers)
+
+do
+
+ -- local has_glyph = nodes.has_glyph
+ local count_nodes = nodes.countall
+
+ local texget = tex.get
+
+ local tracer = processors.tracer
+
+ -- We've set \hlistcallbackmode=1 so glyph checking happens at the other end!
+
+ local function pre_linebreak_filter(head,groupcode)
+ -- local found = force_processors or has_glyph(head)
+ -- if found then
+ if trace_callbacks then
+ local before = count_nodes(head,true)
+ head = actions(head,groupcode)
+ local after = count_nodes(head,true)
+ tracer("pre_linebreak",head,groupcode,before,after,true)
+ else
+ head = actions(head,groupcode)
+ end
+ -- elseif trace_callbacks then
+ -- local n = count_nodes(head,false)
+ -- tracer("pre_linebreak",head,groupcode,n,n)
+ -- end
+ return head
+ end
+
+ local function hpack_filter(head,groupcode,size,packtype,direction,attributes)
+ -- local found = force_processors or has_glyph(head)
+ -- if found then
+ --
+ -- yes or no or maybe an option
+ --
+ if not direction then
+ direction = texget("textdir")
+ end
+ --
+ if trace_callbacks then
+ local before = count_nodes(head,true)
+ head = actions(head,groupcode,size,packtype,direction,attributes)
+ local after = count_nodes(head,true)
+ tracer("hpack",head,groupcode,before,after,true)
+ else
+ head = actions(head,groupcode,size,packtype,direction,attributes)
+ end
+ -- elseif trace_callbacks then
+ -- local n = count_nodes(head,false)
+ -- tracer("hpack",head,groupcode,n,n)
+ -- end
+ return head
+ end
+
+ processors.pre_linebreak_filter = pre_linebreak_filter
+ processors.hpack_filter = hpack_filter
+
+ do
+
+ local hpack = nodes.hpack
+
+ function nodes.fullhpack(head,...)
+ return hpack((hpack_filter(head)),...)
+ end
+
+ end
+
+ do
+
+ local hpack = nuts.hpack
+
+ function nuts.fullhpack(head,...)
+ return hpack(tonut(hpack_filter(tonode(head))),...)
+ end
+
+ end
+
+ callbacks.register('pre_linebreak_filter', pre_linebreak_filter, "horizontal manipulations (before par break)")
+ callbacks.register('hpack_filter' , hpack_filter, "horizontal manipulations (before hbox creation)")
+
+end
+
+do
+ -- Beware, these are packaged boxes so no first_glyph test needed. Maybe some day I'll add a hash
+ -- with valid groupcodes. Watch out, much can pass twice, for instance vadjust passes two times,
+
+ local actions = tasks.actions("finalizers") -- head, where
+ local count_nodes = nodes.countall
+
+ local tracer = processors.tracer
+
+ local function post_linebreak_filter(head,groupcode)
+ if trace_callbacks then
+ local before = count_nodes(head,true)
+ head = actions(head,groupcode)
+ local after = count_nodes(head,true)
+ tracer("post_linebreak",head,groupcode,before,after,true)
+ else
+ head = actions(head,groupcode)
+ end
+ return head
+ end
+
+ processors.post_linebreak_filter = post_linebreak_filter
+
+ callbacks.register("post_linebreak_filter", post_linebreak_filter,"horizontal manipulations (after par break)")
+
+end
+
+do
+
+ ----- texnest = tex.nest
+ local getnest = tex.getnest
+
+ local getlist = nuts.getlist
+ local setlist = nuts.setlist
+ local getsubtype = nuts.getsubtype
+
+ local linelist_code = nodes.listcodes.line
+
+ local actions = tasks.actions("contributers")
+
+ function processors.contribute_filter(groupcode)
+ if groupcode == "box" then -- "pre_box"
+ local whatever = getnest()
+ if whatever then
+ local line = whatever.tail
+ if line then
+ line = tonut(line)
+ if getsubtype(line) == linelist_code then
+ local head = getlist(line)
+ if head then
+ local result = actions(head,groupcode,line)
+ if result and result ~= head then
+ setlist(line,result)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ callbacks.register("contribute_filter", processors.contribute_filter,"things done with lines")
+
+end
+
+statistics.register("h-node processing time", function()
+ return statistics.elapsedseconds(nodes,"including kernel") -- hm, ok here?
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt
new file mode 100644
index 00000000000..c02a37dd107
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-ref.lmt
@@ -0,0 +1,831 @@
+if not modules then modules = { } end modules ['node-ref'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to node-ref.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- We supported pdf right from the start and in mkii this has resulted in
+-- extensive control over the links. Nowadays pdftex provides a lot more
+-- control over margins but as mkii supports multiple backends we stuck to
+-- our own mechanisms. In mkiv again we implement our own handling. Eventually
+-- we will even disable the pdf primitives.
+
+-- helper, will end up in luatex
+
+-- is grouplevel still used?
+
+local tonumber = tonumber
+local concat = table.concat
+
+local attributes, nodes, node = attributes, nodes, node
+
+local allocate = utilities.storage.allocate, utilities.storage.mark
+local mark = utilities.storage.allocate, utilities.storage.mark
+
+local nodeinjections = backends.nodeinjections
+local codeinjections = backends.codeinjections
+
+local cleanupreferences = false
+local cleanupdestinations = true
+
+local transparencies = attributes.transparencies
+local colors = attributes.colors
+local references = structures.references
+local enableaction = nodes.tasks.enableaction
+
+local trace_references = false trackers.register("nodes.references", function(v) trace_references = v end)
+local trace_destinations = false trackers.register("nodes.destinations", function(v) trace_destinations = v end)
+local trace_areas = false trackers.register("nodes.areas", function(v) trace_areas = v end)
+local show_references = false trackers.register("nodes.references.show", function(v) show_references = tonumber(v) or (v and 2.25 or false) end)
+local show_destinations = false trackers.register("nodes.destinations.show", function(v) show_destinations = tonumber(v) or (v and 2.00 or false) end)
+
+local report_reference = logs.reporter("backend","references")
+local report_destination = logs.reporter("backend","destinations")
+local report_area = logs.reporter("backend","areas")
+
+local texsetcount = tex.setcount
+----- texsetattribute = tex.setattribute
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getwidth = nuts.getwidth
+local setwidth = nuts.setwidth
+local getheight = nuts.getheight
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getsubtype = nuts.getsubtype
+local getwhd = nuts.getwhd
+local getdirection = nuts.getdirection
+local setshift = nuts.setshift
+local getboxglue = nuts.getboxglue
+
+local hpack_list = nuts.hpack
+local vpack_list = nuts.vpack
+local getdimensions = nuts.dimensions
+local getrangedimensions = nuts.rangedimensions
+local traverse = nuts.traverse
+local find_node_tail = nuts.tail
+local start_of_par = nuts.start_of_par
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+local listcodes = nodes.listcodes
+
+local dirvalues = nodes.dirvalues
+local lefttoright_code = dirvalues.lefttoright
+local righttoleft_code = dirvalues.righttoleft
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glue_code = nodecodes.glue
+local glyph_code = nodecodes.glyph
+local rule_code = nodecodes.rule
+local dir_code = nodecodes.dir
+local par_code = nodecodes.par
+
+local leftskip_code = gluecodes.leftskip
+local rightskip_code = gluecodes.rightskip
+local parfillleftskip_code = gluecodes.parfillleftskip
+local parfillskip_code = gluecodes.parfillskip
+
+----- linelist_code = listcodes.line
+
+local new_rule = nodepool.rule
+local new_kern = nodepool.kern
+local new_hlist = nodepool.hlist
+
+local flush_node = nuts.flush
+
+local tosequence = nodes.tosequence
+
+local implement = interfaces.implement
+
+-- Normally a (destination) area is a box or a simple stretch if nodes but when it is
+-- a paragraph we have a problem: we cannot calculate the height well. This happens
+-- with footnotes or content broken across a page.
+
+-- skip is somewhat messy
+-- when we have a line line we can look at the next line and make a shape
+-- see dimensions: this is tricky with split off boxes like inserts
+-- where we can end up with a first and last spanning lines so maybe
+-- we need to do vlists differently
+-- no need for dir here if we inject in the right spot as then we can
+-- pick up the dir elsewhere (in lmtx)
+
+local inject_areas do
+
+ local function hlist_dimensions(start,stop,parent)
+ local last = stop and getnext(stop)
+ if parent then
+ return getrangedimensions(parent,start,last)
+ else
+ return getdimensions(start,last)
+ end
+ end
+
+ local function vlist_dimensions(start,stop) -- also needs the stretch and so
+ local temp
+ if stop then
+ temp = getnext(stop)
+ setnext(stop,nil)
+ end
+ local v = vpack_list(start) -- use helper but happens seldom anyway so ...
+ local w, h, d = getwhd(v)
+ setlist(v) -- not needed
+ flush_node(v)
+ if temp then
+ setnext(stop,temp)
+ end
+ return w, h, d
+ end
+
+ -- not ok when vlist at mvl level
+
+ local function dimensions(parent,start,stop) -- in principle we could move some to the caller
+ if start == stop then
+ local id = getid(start)
+ if id == hlist_code or id == vlist_code or id == rule_code or id == glyph_code then
+ local sw, sh, sd = getwhd(start)
+ local pw, ph, pd = getwhd(parent)
+ local ht = sh == 0 and ph or sh -- changed
+ local dp = sd == 0 and pd or sd -- changed
+ if trace_areas then
+ report_area("dimensions taken of %a (%p,%p,%p) with parent (%p,%p,%p) -> (%p,%p,%p)",
+ nodecodes[id],sw,sh,sd,pw,ph,pd,sw,ht,dp)
+ end
+ return sw, ht, dp
+ else
+ if trace_areas then
+ report_area("dimensions calculated of %a",nodecodes[id])
+ end
+ return hlist_dimensions(start,stop) -- one node only so simple
+ end
+ elseif parent then
+ -- todo: if no prev and no next and parent
+ -- todo: we need a a list_dimensions for a vlist
+ if getid(parent) == vlist_code then
+ --
+ -- we can as well calculate here because we only have kerns and glue
+ --
+ local last = stop and getnext(stop)
+ local first = nil
+ local last = nil
+ local current = start
+ local noflines = 0
+ while current do -- can be loop
+ local id = getid(current)
+ if id == hlist_code or id == vlist_code or id == rule_code then
+ if noflines == 0 then
+ first = current
+ noflines = 1
+ else
+ noflines = noflines + 1
+ end
+ last = current
+ end
+ if current == stop then
+ break
+ else
+ current = getnext(current)
+ end
+ end
+ if noflines > 1 then
+ if trace_areas then
+ report_area("dimensions taken of vlist")
+ end
+ local w, h, d = vlist_dimensions(first,last,parent)
+ local ht = getheight(first)
+ return w, ht, d + h - ht, first
+ elseif first then
+ if trace_areas then
+ report_area("dimensions taken of first line in vlist")
+ end
+ local w, h, d = getwhd(first)
+ return w, h, d, first
+ else
+ if trace_areas then
+ report_area("dimensions taken of vlist (probably wrong)")
+ end
+ return hlist_dimensions(start,stop,parent)
+ end
+ else
+ if trace_areas then
+ report_area("dimensions taken of range starting with %a using parent",nodecodes[getid(start)])
+ end
+ return hlist_dimensions(start,stop,parent)
+ end
+ else
+ if trace_areas then
+ report_area("dimensions taken of range starting with %a",nodecodes[getid(start)])
+ end
+ return hlist_dimensions(start,stop)
+ end
+ end
+
+ -- Setting these once and not passign them each nested call is faster and this injector is
+ -- actually one of the more costly calls in a run (when we have lots of references to
+ -- check) and it's also a bti less code.
+
+ local attribute, make, stack, done
+
+ local function inject_range(head,first,last,reference,parent,pardir,txtdir)
+ local width, height, depth, line = dimensions(parent,first,last)
+ if txtdir == righttoleft_code then
+ width = - width
+ elseif txtdir == lefttoright_code then
+ -- go on
+ elseif pardir == righttoleft_code then
+ width = - width
+ end
+ local result, resolved = make(width,height,depth,reference)
+ if result and resolved then
+ if line then
+ -- special case, we only treat the first line in a vlist
+ local l = getlist(line)
+ if trace_areas then
+ report_area("%s: %i : %s %s %s => w=%p, h=%p, d=%p","line",
+ reference,pardir or "?",txtdir or "?",
+ tosequence(l,nil,true),width,height,depth)
+ end
+ setlist(line,result)
+ setlink(result,l)
+ return head, last
+ elseif head == first then
+ if trace_areas then
+ report_area("%s: %i : %s %s %s => w=%p, h=%p, d=%p","head",
+ reference,pardir or "?",txtdir or "?",
+ tosequence(first,last,true),width,height,depth)
+ end
+ setlink(result,first)
+ return result, last
+ else
+ if trace_areas then
+ report_area("%s: %i : %s %s %s => w=%p, h=%p, d=%p","middle",
+ reference,pardir or "?",txtdir or "?",
+ tosequence(first,last,true),width,height,depth)
+ end
+ if first == last and getid(parent) == vlist_code and getid(first) == hlist_code then
+ if trace_areas then
+ -- think of a button without \dontleavehmode in the mvl
+ report_area("compensating for link in vlist")
+ end
+ setlink(result,getlist(first))
+ setlist(first,result)
+ else
+ setlink(getprev(first),result,first)
+ end
+ return head, last
+ end
+ else
+ return head, last
+ end
+ end
+
+ -- Somehow this one no longer got used. See node-ref.lua for the implementation.
+ --
+ -- local function inject_list(id,current,reference,pardir,txtdir)
+ -- end
+
+ local function inject(head,skip,parent,pardir,txtdir)
+ local first, last, firstdir, reference
+ local current = head
+ while current do
+ local id = getid(current)
+ if id == hlist_code or id == vlist_code then
+ local r = getattr(current,attribute)
+ -- test \goto{test}[page(2)] test \gotobox{test}[page(2)]
+ -- test \goto{\TeX}[page(2)] test \gotobox{\hbox {x} \hbox {x}}[page(2)]
+ if r then
+ if not reference then
+ reference = r
+ first = current
+ last = current
+ firstdir = txtdir
+ elseif r == reference then
+ -- same link
+ last = current
+ elseif (done[reference] or 0) == 0 then
+ if not skip or r > skip then -- maybe no > test
+ head, current = inject_range(head,first,last,reference,parent,pardir,firstdir)
+ reference = nil
+ first = nil
+ last = nil
+ firstdir = nil
+ end
+ else
+ reference = r
+ first = current
+ last = current
+ firstdir = txtdir
+ end
+ done[r] = (done[r] or 0) + 1
+ end
+ local list = getlist(current)
+ if list then
+ local h
+ h, pardir, txtdir = inject(list,r or skip or 0,current,pardir,txtdir)
+ if h ~= current then
+ setlist(current,h)
+ end
+ end
+ if r then
+ done[r] = done[r] - 1
+ end
+ goto NEXT
+ elseif id == dir_code then
+ local direction, pop = getdirection(current)
+ txtdir = not pop and direction -- we might need a stack
+ goto NEXT
+ elseif id == par_code then
+ if start_of_par(current) then
+ pardir = getdirection(current)
+ end
+ goto NEXT
+ elseif id == glue_code then
+ local subtype = getsubtype(current)
+ if subtype == leftskip_code or subtype == parfillleftskip_code then
+ goto NEXT
+ elseif subtype == rightskip_code or subtype == parfillskip_code then
+ if reference and (done[reference] or 0) == 0 then
+ head, current = inject_range(head,first,last,reference,parent,pardir,firstdir)
+ reference = nil
+ first = nil
+ last = nil
+ firstdir = nil
+ end
+ goto NEXT
+ end
+ end
+ do
+ local r = getattr(current,attribute)
+ if not r then
+ -- just go on, can be kerns
+ elseif not reference then
+ reference = r
+ first = current
+ last = current
+ firstdir = txtdir
+ elseif r == reference then
+ last = current
+ elseif (done[reference] or 0) == 0 then -- or (id == glue_code and getsubtype(current) == right_skip_code) then
+ if not skip or r > skip then -- maybe no > test
+ head, current = inject_range(head,first,last,reference,parent,pardir,firstdir)
+ reference = nil
+ first = nil
+ last = nil
+ firstdir = nil
+ else
+-- print("!!!!!!!!")
+ end
+ else
+ -- todo: safeguard when we have a glyph or dics or ... so we might as well
+ -- then scan for all possibel content nodes
+ reference = r
+ first = current
+ last = current
+ firstdir = txtdir
+ end
+ end
+ ::NEXT::
+ current = getnext(current)
+ end
+ if reference and (done[reference] or 0) == 0 then
+ head = inject_range(head,first,last,reference,parent,pardir,firstdir)
+ end
+ return head, pardir, txtdir
+ end
+
+ inject_areas = function(head,a,m,s,d)
+ attribute = a
+ make = m
+ stack = s
+ done = d
+ return (inject(head))
+ end
+
+end
+
+-- tracing: todo: use predefined colors
+
+local colorize, justadd do
+
+ local u_transparency = nil
+ local u_colors = { }
+ local force_gray = true
+
+ local register_color = colors.register
+
+ local setcoloring = nuts.colors.set
+
+ local function addstring(what,str,shift) --todo make a pluggable helper (in font-ctx)
+ if str then
+ local typesetters = nuts.typesetters
+ if typesetters then
+ local hashes = fonts.hashes
+ local infofont = fonts.infofont()
+ local emwidth = hashes.emwidths [infofont]
+ local exheight = hashes.exheights[infofont]
+ if what == "reference" then
+ str = str .. " "
+ shift = - (shift or 2.25) * exheight
+ else
+ str = str .. " "
+ shift = (shift or 2) * exheight
+ end
+ local text = typesetters.tohpack(str,infofont)
+ local rule = new_rule(emwidth/5,4*exheight,3*exheight)
+ setshift(text,shift)
+ return hpack_list(setlink(text,rule))
+ end
+ end
+ end
+
+ colorize = function(width,height,depth,n,reference,what,sr,offset)
+ if force_gray then
+ n = 0
+ end
+ u_transparency = u_transparency or transparencies.register(nil,2,.65)
+ local ucolor = u_colors[n]
+ if not ucolor then
+ if n == 1 then
+ u_color = register_color(nil,'rgb',.75,0,0)
+ elseif n == 2 then
+ u_color = register_color(nil,'rgb',0,.75,0)
+ elseif n == 3 then
+ u_color = register_color(nil,'rgb',0,0,.75)
+ else
+ n = 0
+ u_color = register_color(nil,'gray',.5)
+ end
+ u_colors[n] = u_color
+ end
+ if width == 0 then
+ -- probably a strut as placeholder
+ report_area("%s %s has no %s dimensions, width %p, height %p, depth %p",what,reference,"horizontal",width,height,depth)
+ width = 65536
+ end
+ if height + depth <= 0 then
+ report_area("%s %s has no %s dimensions, width %p, height %p, depth %p",what,reference,"vertical",width,height,depth)
+ height = 65536/2
+ depth = height
+ end
+ local rule = setcoloring(new_rule(width,height,depth),1,u_color,u_transparency) -- gray color model
+ if width < 0 then
+ local kern = new_kern(width)
+ setwidth(rule,-width)
+ setnext(kern,rule)
+ setprev(rule,kern)
+ return kern
+ elseif sr and sr ~= "" then
+ local text = addstring(what,sr,shift)
+ if text then
+ local kern = new_kern(-getwidth(text))
+ setlink(kern,text,rule)
+ return kern
+ end
+ end
+ return rule
+ end
+
+ justadd = function(what,sr,shift,current) -- needs testing
+ if sr and sr ~= "" then
+ local text = addstring(what,sr,shift)
+ if text then
+ local kern = new_kern(-getwidth(text))
+ setlink(kern,text,current)
+ return new_hlist(kern)
+ end
+ end
+ end
+
+end
+
+local nofreferences = 0
+
+do
+
+ local stack = { }
+ local done = { }
+ local attribute = attributes.private('reference')
+ local topofstack = 0
+
+ nodes.references = {
+ attribute = attribute,
+ stack = stack,
+ done = done,
+ }
+
+ -- todo: get rid of n (n is just a number, can be used for tracing, obsolete)
+
+ local function setreference(h,d,r) -- h and d can be nil
+ topofstack = topofstack + 1
+ -- the preroll permits us to determine samepage (but delayed also has some advantages)
+ -- so some part of the backend work is already done here
+ stack[topofstack] = { r, h or false, d or false, codeinjections.prerollreference(r) }
+ -- texsetattribute(attribute,topofstack) -- todo -> at tex end
+ texsetcount("lastreferenceattribute",topofstack)
+ end
+
+ function references.get(n) -- not public so functionality can change
+ local sn = stack[n]
+ return sn and sn[1]
+ end
+
+ local function makereference(width,height,depth,reference) -- height and depth are of parent
+ local sr = stack[reference]
+ if sr then
+ if trace_references then
+ report_reference("resolving attribute %a",reference)
+ end
+ local resolved = sr[1]
+ local ht = sr[2]
+ local dp = sr[3]
+ local set = sr[4]
+ local n = sr[5]
+ -- logs.report("temp","child: ht=%p dp=%p, parent: ht=%p dp=%p",ht,dp,height,depth)
+ if ht then
+ if height < ht then height = ht end
+ if depth < dp then depth = dp end
+ end
+ -- logs.report("temp","used: ht=%p dp=%p",height,depth)
+ local annot = nodeinjections.reference(width,height,depth,set,resolved.mesh)
+ if annot then
+ annot = tonut(annot) -- todo
+ nofreferences = nofreferences + 1
+ local result, current, texts
+ if show_references then
+ local d = resolved
+ if d then
+ local r = d.reference
+ local p = d.prefix
+ if r then
+ if p then
+ texts = p .. "|" .. r
+ else
+ texts = r
+ end
+ else
+ -- t[#t+1] = d.internal or "?"
+ end
+ end
+ end
+ if trace_references then
+ local step = 65536
+ result = new_hlist(colorize(width,height-step,depth-step,2,reference,"reference",texts,show_references)) -- step subtracted so that we can see seperate links
+ current = result
+ elseif texts then
+ texts = justadd("reference",texts,show_references,current)
+ if texts then
+ current = texts
+ end
+ end
+ if current then
+ setlink(current,annot)
+ else
+ result = annot
+ end
+ references.registerpage(n)
+ result = new_hlist(result)
+ if cleanupreferences then stack[reference] = nil end
+ return result, resolved
+ elseif trace_references then
+ report_reference("unable to resolve annotation %a",reference)
+ end
+ elseif trace_references then
+ report_reference("unable to resolve attribute %a",reference)
+ end
+ end
+
+ function nodes.references.handler(head)
+ if head and topofstack > 0 then
+ return inject_areas(head,attribute,makereference,stack,done)
+ else
+ return head
+ end
+ end
+
+ function references.inject(prefix,reference,specification) -- todo: use currentreference is possible
+ local set, bug = references.identify(prefix,reference)
+ if bug or #set == 0 then
+ -- unknown ref, just don't set it and issue an error
+ else
+ set.highlight = specification.highlight
+ set.newwindow = specification.newwindow
+ set.layer = specification.layer
+ setreference(specification.height,specification.depth,set) -- sets attribute / todo: for set[*].error
+ end
+ end
+
+ -- function references.injectinternal(internal,specification)
+ -- references.inject("","internal("..internal..")",specification)
+ -- if bug or #set == 0 then
+ -- -- unknown ref, just don't set it and issue an error
+ -- else
+ -- -- nil prefix when ""
+ -- -- check
+ -- set.highlight = specification.highlight
+ -- set.newwindow = specification.newwindow
+ -- set.layer = specification.layer
+ -- setreference(specification.height,specification.depth,set) -- sets attribute / todo: for set[*].error
+ -- end
+ -- end
+
+ function references.injectcurrentset(h,d) -- used inside doifelse
+ local currentset = references.currentset
+ if currentset then
+ setreference(h,d,currentset) -- sets attribute / todo: for set[*].error
+ end
+ end
+
+end
+
+local nofdestinations = 0
+
+do
+
+ local stack = { }
+ local done = { }
+ local attribute = attributes.private('destination')
+ local topofstack = 0
+
+ nodes.destinations = {
+ attribute = attribute,
+ stack = stack,
+ done = done,
+ }
+
+ local function setdestination(n,h,d,name,view) -- n = grouplevel, name == table
+ topofstack = topofstack + 1
+ stack[topofstack] = { n, h, d, name, view }
+ return topofstack
+ end
+
+ local function makedestination(width,height,depth,reference)
+ local sr = stack[reference]
+ if sr then
+ if trace_destinations then
+ report_destination("resolving attribute %a",reference)
+ end
+ local resolved = sr[1]
+ local ht = sr[2]
+ local dp = sr[3]
+ local name = sr[4]
+ local view = sr[5]
+ if ht then
+ if height < ht then height = ht end
+ if depth < dp then depth = dp end
+ end
+ local result, current, texts
+ if show_destinations then
+ if name and #name > 0 then
+ local t = { }
+ for i=1,#name do
+ local s = name[i]
+ if type(s) == "number" then
+ local d = references.internals[s]
+ if d then
+ d = d.references
+ local r = d.reference
+ local p = d.usedprefix
+ if r then
+ if p then
+ t[#t+1] = p .. "|" .. r
+ else
+ t[#t+1] = r
+ end
+ else
+ -- t[#t+1] = d.internal or "?"
+ end
+ end
+ else
+ -- in fact we have a prefix:name here
+ end
+ end
+ if #t > 0 then
+ texts = concat(t," & ")
+ end
+ end
+ end
+ if trace_destinations then
+ local step = 0
+ if width == 0 then
+ step = 4*65536
+ width, height, depth = 5*step, 5*step, 0
+ end
+ local rule = new_hlist(colorize(width,height,depth,3,reference,"destination",texts,show_destinations))
+ if not result then
+ result, current = rule, rule
+ else
+ setlink(current,rule)
+ current = rule
+ end
+ width, height = width - step, height - step
+ elseif texts then
+ texts = justadd("destination",texts,show_destinations,current)
+ if texts then
+ current = texts
+ end
+ end
+ nofdestinations = nofdestinations + 1
+ local annot = nodeinjections.destination(width,height,depth,name,view)
+ if annot then
+ annot = tonut(annot) -- obsolete soon
+ if result then
+ setlink(current,annot)
+ else
+ result = annot
+ end
+ current = find_node_tail(annot)
+ end
+ if result then
+ result = new_hlist(result)
+ end
+ if cleanupdestinations then stack[reference] = nil end
+ return result, resolved
+ elseif trace_destinations then
+ report_destination("unable to resolve attribute %a",reference)
+ end
+ end
+
+ function nodes.destinations.handler(head)
+ if head and topofstack > 0 then
+ return inject_areas(head,attribute,makedestination,stack,done)
+ else
+ return head
+ end
+ end
+
+ -- will move
+
+ function references.mark(reference,h,d,view)
+ return setdestination(tex.currentgrouplevel,h,d,reference,view)
+ end
+
+end
+
+implement {
+ name = "injectreference",
+ actions = references.inject,
+ arguments = {
+ "string",
+ "string",
+ {
+ { "highlight", "boolean" },
+ { "newwindow", "boolean" },
+ { "layer" },
+ { "height", "dimen" },
+ { "depth", "dimen" },
+ { "view" },
+ }
+ }
+}
+
+-- implement {
+-- name = "injectinternalreference",
+-- actions = references.injectinternal,
+-- arguments = {
+-- "integer",
+-- {
+-- { "highlight", "boolean" },
+-- { "newwindow", "boolean" },
+-- { "layer" },
+-- { "height", "dimen" },
+-- { "depth", "dimen" },
+-- { "view" },
+-- }
+-- }
+-- }
+
+implement {
+ name = "injectcurrentreference",
+ actions = references.injectcurrentset,
+}
+
+implement {
+ name = "injectcurrentreferencehtdp",
+ actions = references.injectcurrentset,
+ arguments = { "dimen", "dimen" },
+}
+
+statistics.register("interactive elements", function()
+ if nofreferences > 0 or nofdestinations > 0 then
+ return string.format("%s references, %s destinations",nofreferences,nofdestinations)
+ else
+ return nil
+ end
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-res.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-res.lmt
new file mode 100644
index 00000000000..fbb1d1fe235
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-res.lmt
@@ -0,0 +1,563 @@
+if not modules then modules = { } end modules ['node-res'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, next, rawset = type, next, rawset
+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")
+
+nodes.pool = nodes.pool or { }
+local nodepool = nodes.pool
+
+local gluecodes = nodes.gluecodes
+local kerncodes = nodes.kerncodes
+local rulecodes = nodes.rulecodes
+local nodecodes = nodes.nodecodes
+local boundarycodes = nodes.boundarycodes
+local usercodes = nodes.usercodes
+
+local nodeproperties = nodes.properties.data
+
+local glyph_code = nodecodes.glyph
+local rule_code = nodecodes.rule
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local gluespec_code = nodecodes.gluespec
+
+local currentfont = font.current
+local texgetcount = tex.getcount
+
+local allocate = utilities.storage.allocate
+
+local reserved = { }
+local nofreserved = 0
+
+-- nuts overload
+
+local nuts = nodes.nuts
+local nutpool = { }
+nuts.pool = nutpool
+
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+
+local getbox = nuts.getbox
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getglue = nuts.getglue
+
+local setfield = nuts.setfield
+local setchar = nuts.setchar
+local setlist = nuts.setlist
+local setwhd = nuts.setwhd
+local setglue = nuts.setglue
+local setdisc = nuts.setdisc
+local setfont = nuts.setfont
+local setkern = nuts.setkern
+local setpenalty = nuts.setpenalty
+local setdir = nuts.setdir
+local setdirection = nuts.setdirection
+local setshift = nuts.setshift
+local setwidth = nuts.setwidth
+local setsubtype = nuts.setsubtype
+local setleader = nuts.setleader
+
+local setdata = nuts.setdata
+local setruledata = nuts.setruledata
+local setvalue = nuts.setvalue
+
+local copy_nut = nuts.copy_only or nuts.copy
+local new_nut = nuts.new
+local flush_nut = nuts.flush
+
+-- at some point we could have a dual set (the overhead of tonut is not much larger than
+-- metatable associations at the lua/c end esp if we also take assignments into account
+
+-- table.setmetatableindex(nodepool,function(t,k,v)
+-- -- report_nodes("defining nodepool[%s] instance",k)
+-- local f = nutpool[k]
+-- local v = function(...)
+-- return tonode(f(...))
+-- end
+-- t[k] = v
+-- return v
+-- end)
+--
+-- -- we delay one step because that permits us a forward reference
+-- -- e.g. in pdfsetmatrix
+
+table.setmetatableindex(nodepool,function(t,k,v)
+ -- report_nodes("defining nodepool[%s] instance",k)
+ local v = function(...)
+ local f = nutpool[k]
+ local v = function(...)
+ return tonode(f(...))
+ end
+ t[k] = v
+ return v(...)
+ end
+ t[k] = v
+ return v
+end)
+
+local function register_nut(n)
+ nofreserved = nofreserved + 1
+ reserved[nofreserved] = n
+ return n
+end
+
+local function register_node(n)
+ nofreserved = nofreserved + 1
+ if type(n) == "number" then -- isnut(n)
+ reserved[nofreserved] = n
+ else
+ reserved[nofreserved] = tonut(n)
+ end
+ return n
+end
+
+nodepool.register = register_node
+nutpool.register = register_node -- could be register_nut
+
+-- so far
+
+local disc = register_nut(new_nut(nodecodes.disc))
+local kern = register_nut(new_nut(kern_code,kerncodes.userkern))
+local fontkern = register_nut(new_nut(kern_code,kerncodes.fontkern))
+local italickern = register_nut(new_nut(kern_code,kerncodes.italiccorrection))
+local penalty = register_nut(new_nut(nodecodes.penalty))
+local glue = register_nut(new_nut(glue_code))
+local gluespec = register_nut(new_nut(gluespec_code))
+local glyph = register_nut(new_nut(glyph_code,0))
+
+local textdir = register_nut(new_nut(nodecodes.dir))
+
+local left_margin_kern = register_nut(new_nut(kern_code,kerncodes.leftmargincode))
+local right_margin_kern = register_nut(new_nut(kern_code,kerncodes.rightmargincode))
+
+local lineskip = register_nut(new_nut(glue_code,gluecodes.lineskip))
+local baselineskip = register_nut(new_nut(glue_code,gluecodes.baselineskip))
+local leftskip = register_nut(new_nut(glue_code,gluecodes.leftskip))
+local rightskip = register_nut(new_nut(glue_code,gluecodes.rightskip))
+local lefthangskip = register_nut(new_nut(glue_code,gluecodes.lefthangskip))
+local righthangskip = register_nut(new_nut(glue_code,gluecodes.righthangskip))
+local indentskip = register_nut(new_nut(glue_code,gluecodes.indentskip))
+local correctionskip = register_nut(new_nut(glue_code,gluecodes.correctionskip))
+
+local temp = register_nut(new_nut(nodecodes.temp,0))
+
+local noad = register_nut(new_nut(nodecodes.noad))
+local delimiter = register_nut(new_nut(nodecodes.delimiter))
+local fence = register_nut(new_nut(nodecodes.fence))
+local submlist = register_nut(new_nut(nodecodes.submlist))
+local accent = register_nut(new_nut(nodecodes.accent))
+local radical = register_nut(new_nut(nodecodes.radical))
+local fraction = register_nut(new_nut(nodecodes.fraction))
+local subbox = register_nut(new_nut(nodecodes.subbox))
+local mathchar = register_nut(new_nut(nodecodes.mathchar))
+local mathtextchar = register_nut(new_nut(nodecodes.mathtextchar))
+local choice = register_nut(new_nut(nodecodes.choice))
+
+local boundary = register_nut(new_nut(nodecodes.boundary,boundarycodes.user))
+local wordboundary = register_nut(new_nut(nodecodes.boundary,boundarycodes.word))
+
+local cleader = register_nut(copy_nut(glue)) setsubtype(cleader,gluecodes.cleaders) setglue(cleader,0,65536,0,2,0)
+
+-- the dir field needs to be set otherwise crash:
+
+local lefttoright_code = nodes.dirvalues.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)
+local userrule = register_nut(new_nut(rule_code,rulecodes.user)) -- setdirection(rule, lefttoright_code)
+local outlinerule = register_nut(new_nut(rule_code,rulecodes.outline)) -- setdirection(rule, lefttoright_code)
+local hlist = register_nut(new_nut(nodecodes.hlist)) setdirection(hlist,lefttoright_code)
+local vlist = register_nut(new_nut(nodecodes.vlist)) setdirection(vlist,lefttoright_code)
+
+function nutpool.glyph(fnt,chr)
+ local n = copy_nut(glyph)
+ if fnt then
+ setfont(n,fnt == true and currentfont() or fnt,chr)
+ elseif chr then
+ setchar(n,chr)
+ end
+ return n
+end
+
+function nutpool.penalty(p)
+ local n = copy_nut(penalty)
+ if p and p ~= 0 then
+ setpenalty(n,p)
+ end
+ return n
+end
+
+function nutpool.kern(k)
+ local n = copy_nut(kern)
+ if k and k ~= 0 then
+ setkern(n,k)
+ end
+ return n
+end
+
+function nutpool.boundary(v)
+ local n = copy_nut(boundary)
+ if v and v ~= 0 then
+ setvalue(n,v)
+ end
+ return n
+end
+
+function nutpool.wordboundary(v)
+ local n = copy_nut(wordboundary)
+ if v and v ~= 0 then
+ setvalue(n,v)
+ end
+ return n
+end
+
+function nutpool.fontkern(k)
+ local n = copy_nut(fontkern)
+ if k and k ~= 0 then
+ setkern(n,k)
+ end
+ return n
+end
+
+function nutpool.italickern(k)
+ local n = copy_nut(italickern)
+ if k and k ~= 0 then
+ setkern(n,k)
+ end
+ return n
+end
+
+function nutpool.gluespec(width,stretch,shrink,stretch_order,shrink_order)
+ local n = copy_nut(gluespec)
+ if width or stretch or shrink or stretch_order or shrink_order then
+ setglue(n,width,stretch,shrink,stretch_order,shrink_order)
+ end
+ return n
+end
+
+local function someskip(skip,width,stretch,shrink,stretch_order,shrink_order)
+ -- maybe setglue
+ local n = copy_nut(skip)
+ if width or stretch or shrink or stretch_order or shrink_order then
+ setglue(n,width,stretch,shrink,stretch_order,shrink_order)
+ end
+ return n
+end
+
+function nutpool.stretch(a,b)
+ -- width stretch shrink stretch_order shrink_order
+ local n = copy_nut(glue)
+ if not b then
+ a, b = 1, a or 1
+ end
+ setglue(n,0,a,0,b,0)
+ return n
+end
+
+function nutpool.shrink(a,b)
+ local n = copy_nut(glue)
+ if not b then
+ a, b = 1, a or 1
+ end
+ setglue(n,0,0,a,0,0,b)
+ return n
+end
+
+function nutpool.glue(width,stretch,shrink,stretch_order,shrink_order)
+ return someskip(glue,width,stretch,shrink,stretch_order,shrink_order)
+end
+
+function nutpool.negatedglue(glue)
+ local n = copy_nut(glue)
+ local width, stretch, shrink = getglue(n)
+ setglue(n,-width,-stretch,-shrink)
+ return n
+end
+
+function nutpool.leftskip(width,stretch,shrink,stretch_order,shrink_order)
+ return someskip(leftskip,width,stretch,shrink,stretch_order,shrink_order)
+end
+
+function nutpool.rightskip(width,stretch,shrink,stretch_order,shrink_order)
+ return someskip(rightskip,width,stretch,shrink,stretch_order,shrink_order)
+end
+
+function nutpool.lefthangskip(width,stretch,shrink,stretch_order,shrink_order)
+ return someskip(lefthangskip,width,stretch,shrink,stretch_order,shrink_order)
+end
+
+function nutpool.righthangskip(width,stretch,shrink,stretch_order,shrink_order)
+ return someskip(righthangskip,width,stretch,shrink,stretch_order,shrink_order)
+end
+
+function nutpool.indentskip(width,stretch,shrink,stretch_order,shrink_order)
+ return someskip(indentskip,width,stretch,shrink,stretch_order,shrink_order)
+end
+
+function nutpool.lineskip(width,stretch,shrink,stretch_order,shrink_order)
+ return someskip(lineskip,width,stretch,shrink,stretch_order,shrink_order)
+end
+
+function nutpool.baselineskip(width,stretch,shrink)
+ return someskip(baselineskip,width,stretch,shrink)
+end
+
+function nutpool.disc(pre,post,replace)
+ local d = copy_nut(disc)
+ if pre or post or replace then
+ setdisc(d,pre,post,replace)
+ end
+ return d
+end
+
+function nutpool.direction(dir,swap)
+ local t = copy_nut(textdir)
+ if not dir then
+ -- just a l2r start node
+ elseif swap then
+ setdirection(t,dir,true)
+ else
+ setdirection(t,dir,false)
+ end
+ return t
+end
+
+function nutpool.rule(width,height,depth) -- w/h/d == nil will let them adapt
+ local n = copy_nut(rule)
+ if width or height or depth then
+ setwhd(n,width,height,depth)
+ end
+ return n
+end
+
+function nutpool.emptyrule(width,height,depth) -- w/h/d == nil will let them adapt
+ local n = copy_nut(emptyrule)
+ if width or height or depth then
+ setwhd(n,width,height,depth)
+ end
+ return n
+end
+
+function nutpool.userrule(width,height,depth) -- w/h/d == nil will let them adapt
+ local n = copy_nut(userrule)
+ if width or height or depth then
+ setwhd(n,width,height,depth)
+ end
+ return n
+end
+
+function nutpool.outlinerule(width,height,depth,line) -- w/h/d == nil will let them adapt
+ local n = copy_nut(outlinerule)
+ if width or height or depth then
+ setwhd(n,width,height,depth)
+ end
+ if line then
+ setruledata(n,line)
+ end
+ return n
+end
+
+function nutpool.leader(width,list)
+ local n = copy_nut(cleader)
+ if width then
+ setwidth(n,width)
+ end
+ if list then
+ setleader(n,list)
+ end
+ return n
+end
+
+function nutpool.leftmarginkern(glyph,width)
+ local n = copy_nut(left_margin_kern)
+ if not glyph then
+ report_nodes("invalid pointer to left margin glyph node")
+ elseif getid(glyph) ~= glyph_code then
+ report_nodes("invalid node type %a for %s margin glyph node",nodecodes[glyph],"left")
+ else
+ setfield(n,"glyph",glyph)
+ end
+ if width and width ~= 0 then
+ setwidth(n,width)
+ end
+ return n
+end
+
+function nutpool.rightmarginkern(glyph,width)
+ local n = copy_nut(right_margin_kern)
+ if not glyph then
+ report_nodes("invalid pointer to right margin glyph node")
+ elseif getid(glyph) ~= glyph_code then
+ report_nodes("invalid node type %a for %s margin glyph node",nodecodes[p],"right")
+ else
+ setfield(n,"glyph",glyph)
+ end
+ if width and width ~= 0 then
+ setwidth(n,width)
+ end
+ return n
+end
+
+function nutpool.temp()
+ return copy_nut(temp)
+end
+
+function nutpool.noad() return copy_nut(noad) end
+function nutpool.delimiter() return copy_nut(delimiter) end nutpool.delim = nutpool.delimiter
+function nutpool.fence() return copy_nut(fence) end
+function nutpool.submlist() return copy_nut(submlist) end
+function nutpool.noad() return copy_nut(noad) end
+function nutpool.fence() return copy_nut(fence) end
+function nutpool.accent() return copy_nut(accent) end
+function nutpool.radical() return copy_nut(radical) end
+function nutpool.fraction() return copy_nut(fraction) end
+function nutpool.subbox() return copy_nut(subbox) end
+function nutpool.mathchar() return copy_nut(mathchar) end
+function nutpool.mathtextchar() return copy_nut(mathtextchar) end
+function nutpool.choice() return copy_nut(choice) end
+
+local function new_hlist(list,width,height,depth,shift)
+ local n = copy_nut(hlist)
+ if list then
+ setlist(n,list)
+ end
+ if width or height or depth then
+ setwhd(n,width,height,depth)
+ end
+ if shift and shift ~= 0 then
+ setshift(n,shift)
+ end
+ return n
+end
+
+local function new_vlist(list,width,height,depth,shift)
+ local n = copy_nut(vlist)
+ if list then
+ setlist(n,list)
+ end
+ if width or height or depth then
+ setwhd(n,width,height,depth)
+ end
+ if shift and shift ~= 0 then
+ setshift(n,shift)
+ end
+ return n
+end
+
+nutpool.hlist = new_hlist
+nutpool.vlist = new_vlist
+
+function nodepool.hlist(list,width,height,depth,shift)
+ return tonode(new_hlist(list and tonut(list),width,height,depth,shift))
+end
+
+function nodepool.vlist(list,width,height,depth,shift)
+ return tonode(new_vlist(list and tonut(list),width,height,depth,shift))
+end
+
+function nutpool.usernode(id,data)
+ local n = copy_nut(user_node)
+ nodeproperties[n] = {
+ id = id,
+ data = data,
+ }
+ return n
+end
+
+-- housekeeping
+
+local function cleanup(nofboxes) -- todo
+ local tracers = nodes.tracers
+ if tracers and tracers.steppers then -- to be resolved
+ tracers.steppers.reset() -- todo: make a registration subsystem
+ end
+ local nl = 0
+ local nr = nofreserved
+ for i=1,nofreserved do
+ local ri = reserved[i]
+ flush_nut(reserved[i])
+ end
+ if nofboxes then
+ for i=0,nofboxes do
+ local l = getbox(i)
+ if l then
+ flush_nut(l) -- also list ?
+ nl = nl + 1
+ end
+ end
+ end
+ reserved = { }
+ nofreserved = 0
+ return nr, nl, nofboxes -- can be nil
+end
+
+local usage = node.inuse
+local stock = node.instock
+
+nutpool .cleanup = cleanup
+nodepool.cleanup = cleanup
+
+nutpool .usage = usage
+nodepool.usage = usage
+
+nutpool .stock = stock
+nodepool.stock = stock
+
+-- end
+
+statistics.register("cleaned up reserved nodes", function()
+ return format("%s nodes, %s lists of %s", cleanup(texgetcount("c_syst_last_allocated_box")))
+end) -- \topofboxstack
+
+statistics.register("node memory usage", function() -- comes after cleanup !
+ local used = usage()
+ if next(used) then
+ local t, n = { }, 0
+ for k, v in table.sortedhash(used) do
+ n = n + 1 ; t[n] = format("%s %s",v,k)
+ end
+ return table.concat(t,", ")
+ end
+end)
+
+lua.registerfinalizer(cleanup, "cleanup reserved nodes")
+
+do
+
+ local glyph = glyph
+ local traverse_id = nuts.traverse_id
+
+ local traversers = table.setmetatableindex(function(t,k)
+ local v = traverse_id(type(k) == "number" and k or nodecodes[k],glyph)
+ t[k] = v
+ return v
+ end)
+
+ -- these are special:
+
+ traversers.node = nuts.traverse (glyph)
+ traversers.char = nuts.traverse_char (glyph)
+ traversers.glyph = nuts.traverse_glyph (glyph)
+ traversers.list = nuts.traverse_list (glyph)
+ traversers.content = nuts.traverse_content(glyph)
+
+ nuts.traversers = traversers
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-rul.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-rul.lmt
new file mode 100644
index 00000000000..a95c5272d36
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-rul.lmt
@@ -0,0 +1,725 @@
+if not modules then modules = { } end modules ['node-rul'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to node-rul.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- this will go to an auxiliary module
+-- beware: rules now have a dir field
+--
+-- todo: make robust for layers ... order matters
+
+-- todo: collect successive bit and pieces and combine them
+--
+-- path s ; s := shaped(p) ; % p[] has rectangles
+-- fill s withcolor .5white ;
+-- draw boundingbox s withcolor yellow;
+
+local tonumber = tonumber
+
+local context = context
+local attributes = attributes
+local nodes = nodes
+local properties = nodes.properties.data
+
+local enableaction = nodes.tasks.enableaction
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setlink = nuts.setlink
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getdirection = nuts.getdirection
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local setattrs = nuts.setattrs
+local getfont = nuts.getfont
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local setwhd = nuts.setwhd
+local setattrlist = nuts.setattrlist
+local setshift = nuts.setshift
+local getwidth = nuts.getwidth
+local setwidth = nuts.setwidth
+local setoffsets = nuts.setoffsets
+local setfield = nuts.setfield
+local getruledata = nuts.getruledata
+
+local isglyph = nuts.isglyph
+
+local flushlist = nuts.flush_list
+local effective_glue = nuts.effective_glue
+local insert_node_after = nuts.insert_after
+local insert_node_before = nuts.insert_before
+local find_tail = nuts.tail
+local setglue = nuts.setglue
+local getrangedimensions = nuts.rangedimensions
+local hpack_nodes = nuts.hpack
+local copy_list = nuts.copy_list
+
+local nextlist = nuts.traversers.list
+local nextglue = nuts.traversers.glue
+
+local nodecodes = nodes.nodecodes
+local rulecodes = nodes.rulecodes
+local gluecodes = nodes.gluecodes
+local listcodes = nodes.listcodes
+
+local glyph_code = nodecodes.glyph
+local par_code = nodecodes.par
+local dir_code = nodecodes.dir
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+
+local indentlist_code = listcodes.indent
+local linelist_code = listcodes.line
+
+local leftskip_code = gluecodes.leftskip
+local rightskip_code = gluecodes.rightskip
+local parfillleftskip_code = gluecodes.parfillleftskip
+local parfillrightskip_code = gluecodes.parfillrightskip
+local indentskip_code = gluecodes.indentskip
+
+local nodepool = nuts.pool
+
+local new_rule = nodepool.rule
+local new_userrule = nodepool.userrule
+local new_kern = nodepool.kern
+local new_leader = nodepool.leader
+
+local n_tostring = nodes.idstostring
+local n_tosequence = nodes.tosequence
+
+local variables = interfaces.variables
+local implement = interfaces.implement
+
+local privateattributes = attributes.private
+
+local a_ruled = privateattributes('ruled')
+local a_runningtext = privateattributes('runningtext')
+local a_color = privateattributes('color')
+local a_transparency = privateattributes('transparency')
+local a_colormodel = privateattributes('colormodel')
+local a_linefiller = privateattributes("linefiller")
+local a_viewerlayer = privateattributes("viewerlayer")
+
+local v_both = variables.both
+local v_left = variables.left
+local v_right = variables.right
+local v_local = variables["local"]
+local v_yes = variables.yes
+local v_foreground = variables.foreground
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontresources = fonthashes.resources
+
+local dimenfactor = fonts.helpers.dimenfactor
+local splitdimen = number.splitdimen
+local setmetatableindex = table.setmetatableindex
+
+local magicconstants = tex.magicconstants
+local running = magicconstants.running
+
+local striprange = nuts.striprange
+local processwords = nuts.processwords
+
+local setcoloring = nuts.colors.set
+
+local rules = nodes.rules or { }
+nodes.rules = rules
+rules.data = rules.data or { }
+
+local nutrules = nuts.rules or { }
+nuts.rules = nutrules -- not that many
+
+storage.register("nodes/rules/data", rules.data, "nodes.rules.data")
+
+local data = rules.data
+
+-- we implement user rules here as it takes less code this way
+
+local function usernutrule(t,noattributes)
+ local r = new_userrule(t.width or 0,t.height or 0,t.depth or 0)
+ if noattributes == false or noattributes == nil then
+ -- avoid fuzzy ones
+ else
+ setattrlist(r,true)
+ end
+ properties[r] = t
+ return r
+end
+
+nutrules.userrule = usernutrule
+
+local function userrule(t,noattributes)
+ return tonode(usernutrule(t,noattributes))
+end
+
+rules.userrule = userrule
+local ruleactions = { }
+
+rules .ruleactions = ruleactions
+nutrules.ruleactions = ruleactions -- convenient
+
+local function mathaction(n,h,v,what)
+ local font = getruledata(n)
+ local actions = fontresources[font].mathruleactions
+ if actions then
+ local action = actions[what]
+ if action then
+ action(n,h,v,font)
+ end
+ end
+end
+
+local function mathradical(n,h,v)
+ mathaction(n,h,v,"radicalaction")
+end
+
+local function mathrule(n,h,v)
+ mathaction(n,h,v,"hruleaction")
+end
+
+local x
+
+local function useraction(n,h,v)
+ local p = properties[n]
+ if p then
+ local i = p.type or "draw"
+ local a = ruleactions[i]
+ if a then
+ a(p,h,v,i,n)
+ end
+ end
+end
+
+local subtypeactions = {
+ [rulecodes.user] = useraction,
+ [rulecodes.over] = mathrule,
+ [rulecodes.under] = mathrule,
+ [rulecodes.fraction] = mathrule,
+ [rulecodes.radical] = mathradical,
+}
+
+function rules.process(n,h,v)
+ local n = tonut(n) -- already a nut
+ local s = getsubtype(n)
+ local a = subtypeactions[s]
+ if a then
+ a(n,h,v)
+ end
+end
+
+--
+
+local trace_ruled = false trackers.register("nodes.rules", function(v) trace_ruled = v end)
+local report_ruled = logs.reporter("nodes","rules")
+
+function rules.define(settings)
+ local nofdata = #data + 1
+ data[nofdata] = settings
+ local text = settings.text
+ if text then
+ local b = nuts.takebox(text)
+ if b then
+ nodepool.register(b)
+ settings.text = getlist(b)
+ else
+ settings.text = nil
+ end
+ end
+ return nofdata
+end
+
+local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but acceptable for this purpose
+ local font = nil
+ local char, id = isglyph(f)
+ if char then
+ font = id
+ elseif id == hlist_code then
+ font = getattr(f,a_runningtext)
+ end
+ if not font then
+ -- saveguard ... we need to deal with rules and so (math)
+ return head
+ end
+ local r, m
+ if strip then
+ if trace_ruled then
+ local before = n_tosequence(f,l,true)
+ f, l = striprange(f,l)
+ local after = n_tosequence(f,l,true)
+ report_ruled("range stripper, before %a, after %a",before,after)
+ else
+ f, l = striprange(f,l)
+ end
+ end
+ if not f then
+ return head
+ end
+ local wd, ht, dp = getrangedimensions(parent,f,getnext(l))
+ local method = d.method
+ local empty = d.empty == v_yes
+ local offset = d.offset
+ local dy = d.dy
+ local order = d.order
+ local max = d.max
+ local mp = d.mp
+ local rulethickness = d.rulethickness
+ local unit = d.unit
+ local ma = d.ma
+ local ca = d.ca
+ local ta = d.ta
+ local colorspace = ma > 0 and ma or getattr(f,a_colormodel) or 1
+ local color = ca > 0 and ca or getattr(f,a_color)
+ local transparency = ta > 0 and ta or getattr(f,a_transparency)
+ local foreground = order == v_foreground
+ local layer = getattr(f,a_viewerlayer)
+ local e = dimenfactor(unit,font) -- what if no glyph node
+ local rt = tonumber(rulethickness)
+ if rt then
+ rulethickness = e * rulethickness / 2
+ else
+ local n, u = splitdimen(rulethickness)
+ if n and u then -- we need to intercept ex and em and % and ...
+ rulethickness = n * dimenfactor(u,fontdata[font]) / 2
+ else
+ rulethickness = 1/5
+ end
+ end
+ --
+ if level > max then
+ level = max
+ end
+ if method == 0 then -- center
+ offset = 2*offset
+ m = (offset+(level-1)*dy)*e/2 + rulethickness/2
+ else
+ m = 0
+ end
+
+ local function inject(r,wd,ht,dp)
+ if layer then
+ setattr(r,a_viewerlayer,layer)
+ end
+ if empty then
+ head = insert_node_before(head,f,r)
+ setlink(r,getnext(l))
+ setprev(f)
+ setnext(l)
+ flushlist(f)
+ else
+ local k = new_kern(-wd)
+ if foreground then
+ insert_node_after(head,l,k)
+ insert_node_after(head,k,r)
+ l = r
+ else
+ head = insert_node_before(head,f,r)
+ insert_node_after(head,r,k)
+ end
+ end
+ if trace_ruled then
+ report_ruled("level %a, width %p, height %p, depth %p, nodes %a, text %a",
+ level,wd,ht,dp,n_tostring(f,l),n_tosequence(f,l,true))
+ end
+ end
+
+ if mp and mp ~= "" then
+ local r = usernutrule {
+ width = wd,
+ height = ht,
+ depth = dp,
+ type = "mp",
+ factor = e,
+ offset = offset,
+ line = rulethickness,
+ data = mp,
+ ma = colorspace,
+ ca = color,
+ ta = transparency,
+ }
+ inject(r,wd,ht,dp)
+ else
+ local tx = d.text
+ if tx then
+ local l = copy_list(tx)
+ if d["repeat"] == v_yes then
+ l = new_leader(wd,l)
+ setattrlist(l,tx)
+ end
+ l = hpack_nodes(l,wd,"exactly")
+ inject(l,wd,ht,dp)
+ else
+ for i=1,level do
+ local hd = (offset+(i-1)*dy)*e - m
+ local ht = hd + rulethickness
+ local dp = -hd + rulethickness
+ inject(setcoloring(new_rule(wd,ht,dp),colorspace,color,transparency),wd,ht,dp)
+ end
+ end
+ end
+ return head
+end
+
+rules.handler = function(head)
+ return processwords(a_ruled,data,flush_ruled,head)
+end
+
+function rules.enable()
+ enableaction("shipouts","nodes.rules.handler")
+end
+
+local trace_shifted = false trackers.register("nodes.shifting", function(v) trace_shifted = v end)
+
+local report_shifted = logs.reporter("nodes","shifting")
+
+local a_shifted = attributes.private('shifted')
+
+local shifts = nodes.shifts or { }
+nodes.shifts = shifts
+shifts.data = shifts.data or { }
+
+storage.register("nodes/shifts/data", shifts.data, "nodes.shifts.data")
+
+local data = shifts.data
+
+function shifts.define(settings)
+ local nofdata = #data + 1
+ data[nofdata] = settings
+ return nofdata
+end
+
+local function flush_shifted(head,first,last,data,level,parent,strip) -- not that fast but acceptable for this purpose
+ if true then
+ first, last = striprange(first,last)
+ end
+ local prev = getprev(first)
+ local next = getnext(last)
+ setprev(first)
+ setnext(last)
+ local width, height, depth = getrangedimensions(parent,first,next)
+ local list = hpack_nodes(first,width,"exactly") -- we can use a simple pack
+ if first == head then
+ head = list
+ end
+ if prev then
+ setlink(prev,list)
+ end
+ if next then
+ setlink(list,next)
+ end
+ local raise = data.dy * dimenfactor(data.unit,fontdata[getfont(first)])
+ setshift(list,raise)
+ setwhd(list,width,height,depth)
+ if trace_shifted then
+ report_shifted("width %p, nodes %a, text %a",width,n_tostring(first,last),n_tosequence(first,last,true))
+ end
+ return head
+end
+
+shifts.handler = function(head)
+ return processwords(a_shifted,data,flush_shifted,head)
+end
+
+function shifts.enable()
+ enableaction("shipouts","nodes.shifts.handler")
+end
+
+-- linefillers
+
+local linefillers = nodes.linefillers or { }
+nodes.linefillers = linefillers
+linefillers.data = linefillers.data or { }
+
+storage.register("nodes/linefillers/data", linefillers.data, "nodes.linefillers.data")
+
+local data = linefillers.data
+
+function linefillers.define(settings)
+ local nofdata = #data + 1
+ data[nofdata] = settings
+ return nofdata
+end
+
+local function linefiller(current,data,width,location)
+ local height = data.height
+ local depth = data.depth
+ local mp = data.mp
+ local ma = data.ma
+ local ca = data.ca
+ local ta = data.ta
+ if mp and mp ~= "" then
+ return usernutrule {
+ width = width,
+ height = height,
+ depth = depth,
+ type = "mp",
+ line = data.rulethickness,
+ data = mp,
+ ma = ma,
+ ca = ca,
+ ta = ta,
+ option = location,
+ direction = getdirection(current),
+ }
+ else
+ return setcoloring(new_rule(width,height,depth),ma,ca,ta)
+ end
+end
+
+function linefillers.filler(current,data,width,height,depth)
+ if width and width > 0 then
+ local height = height or data.height or 0
+ local depth = depth or data.depth or 0
+ if (height + depth) ~= 0 then
+ local mp = data.mp
+ local ma = data.ma
+ local ca = data.ca
+ local ta = data.ta
+ if mp and mp ~= "" then
+ return usernutrule {
+ width = width,
+ height = height,
+ depth = depth,
+ type = "mp",
+ line = data.rulethickness,
+ data = mp,
+ ma = ma,
+ ca = ca,
+ ta = ta,
+ option = location,
+ direction = getdirection(current),
+ }
+ else
+ return setcoloring(new_rule(width,height,depth),ma,ca,ta)
+ end
+ end
+ end
+end
+
+local function getskips(list) -- this could be a helper
+ local ls = nil
+ local rs = nil
+ local is = nil
+ local pl = nil
+ local pr = nil
+ local ok = false
+ for n, subtype in nextglue, list do
+ if subtype == rightskip_code then
+ rs = n
+ elseif subtype == parfillrightskip_code then
+ pr = n
+ elseif subtype == leftskip_code then
+ ls = n
+ elseif subtype == indentskip_code then
+ is = n
+ elseif subtype == parfillleftskip_code then
+ pl = n
+ end
+ end
+ return is, ls, pl, pr, rs
+end
+
+function linefillers.handler(head)
+ -- we have a normalized line ..
+ for current, id, subtype, list in nextlist, head do
+ if subtype == linelist_code and list then
+ local a = getattr(current,a_linefiller)
+ if a then
+ local class = a % 1000
+ local data = data[class]
+ if data then
+ local location = data.location
+ local scope = data.scope
+ local distance = data.distance
+ local threshold = data.threshold
+ local leftlocal = false
+ local rightlocal = false
+ --
+ if scope == v_right then
+ leftlocal = true
+ elseif scope == v_left then
+ rightlocal = true
+ elseif scope == v_local then
+ leftlocal = true
+ rightlocal = true
+ end
+ --
+ local is, ls, pl, pr, rs = getskips(list)
+ if ls and rs then
+ if location == v_left or location == v_both then
+ local indentation = is and getwidth(is) or 0
+ local leftfixed = ls and getwidth(ls) or 0
+ local lefttotal = ls and effective_glue(ls,current) or 0
+ local width = lefttotal - (leftlocal and leftfixed or 0) + indentation - distance
+ if width > threshold then
+ if is then
+ setwidth(is,0)
+ end
+ setglue(ls,leftlocal and getwidth(ls) or nil)
+ if distance > 0 then
+ insert_node_after(list,ls,new_kern(distance))
+ end
+ insert_node_after(list,ls,linefiller(current,data,width,"left"))
+ end
+ end
+ --
+ if location == v_right or location == v_both then
+ local rightfixed = rs and getwidth(rs) or 0
+ local righttotal = rs and effective_glue(rs,current) or 0
+ local parfixed = pr and getwidth(pr) or 0
+ local partotal = pr and effective_glue(pr,current) or 0
+ local width = righttotal - (rightlocal and rightfixed or 0) + partotal - distance
+ if width > threshold then
+ if pr then
+ setglue(pr)
+ end
+ setglue(rs,rightlocal and getwidth(rs) or nil)
+ if distance > 0 then
+ insert_node_before(list,rs,new_kern(distance))
+ end
+ insert_node_before(list,rs,linefiller(current,data,width,"right"))
+ end
+ end
+ else
+ -- error, not a properly normalized line
+ end
+ end
+ end
+ end
+ end
+ return head
+end
+
+local enable = false
+
+function linefillers.enable()
+ if not enable then
+ -- we could now nil it
+ enableaction("finalizers","nodes.linefillers.handler")
+ enable = true
+ end
+end
+
+-- interface
+
+implement {
+ name = "definerule",
+ actions = { rules.define, context },
+ arguments = {
+ {
+ { "continue" },
+ { "unit" },
+ { "order" },
+ { "method", "integer" },
+ { "offset", "number" },
+ { "rulethickness" },
+ { "dy", "number" },
+ { "max", "number" },
+ { "ma", "integer" },
+ { "ca", "integer" },
+ { "ta", "integer" },
+ { "mp" },
+ { "empty" },
+ { "text", "integer" },
+ { "repeat" },
+ }
+ }
+}
+
+implement {
+ name = "enablerules",
+ onlyonce = true,
+ actions = rules.enable
+}
+
+implement {
+ name = "defineshift",
+ actions = { shifts.define, context },
+ arguments = {
+ {
+ { "continue" },
+ { "unit" },
+ { "method", "integer" },
+ { "dy", "number" },
+ }
+ }
+}
+
+implement {
+ name = "enableshifts",
+ onlyonce = true,
+ actions = shifts.enable
+}
+
+implement {
+ name = "definelinefiller",
+ actions = { linefillers.define, context },
+ arguments = {
+ {
+ { "method", "integer" },
+ { "location", "string" },
+ { "scope", "string" },
+ { "mp", "string" },
+ { "ma", "integer" },
+ { "ca", "integer" },
+ { "ta", "integer" },
+ { "depth", "dimension" },
+ { "height", "dimension" },
+ { "distance", "dimension" },
+ { "threshold", "dimension" },
+ { "rulethickness", "dimension" },
+ }
+ }
+}
+
+implement {
+ name = "enablelinefillers",
+ onlyonce = true,
+ actions = linefillers.enable
+}
+
+-- We add a bonus feature here (experiment):
+
+interfaces.implement {
+ name = "autorule",
+ arguments = {
+ {
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "depth", "dimension" },
+ { "xoffset", "dimension" },
+ { "yoffset", "dimension" },
+ { "left", "dimension" },
+ { "right", "dimension" },
+ },
+ },
+ actions = function(t)
+ local n = new_rule(
+ t.width or running,
+ t.height or running,
+ t.depth or running
+ )
+ setattrlist(n,true)
+ setoffsets(n,t.xoffset,t.yoffset) -- ,t.left, t.right
+ local l = t.left
+ local r = t.right
+ if l then
+ setfield(n,"left",l)
+ end
+ if r then
+ setfield(n,"right",r)
+ end
+ context(tonode(n))
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-rul.mkxl b/Master/texmf-dist/tex/context/base/mkxl/node-rul.mkxl
new file mode 100644
index 00000000000..2b55561d85d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-rul.mkxl
@@ -0,0 +1,610 @@
+%D \module
+%D [ file=node-rul,
+%D version=2009.11.03, % 1995.10.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Bars,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: ex and and em traveling with attribute
+% todo: this will move to typo-rul + ctxcommands
+
+\writestatus{loading}{ConTeXt Core Macros / Bars}
+
+%D \macros
+%D {underbar,underbars,
+%D overbar,overbars,
+%D overstrike,overstrikes,
+%D setupbar}
+%D
+%D In the rare case that we need undelined words, for instance because all font
+%D alternatives are already in use, one can use \type {\underbar} and \type
+%D {\overstrike} and their plural forms.
+%D
+%D \startbuffer
+%D \underbars {drawing \underbar{bars} under words is a typewriter leftover}
+%D \overstrikes {striking words makes them \overstrike {unreadable} but
+%D sometimes even \overbar {top lines} come into view.}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D The formal definitions are:
+%D
+%D \showsetup{underbar}
+%D \showsetup{underbars}
+%D \showsetup{overbar}
+%D \showsetup{overbars}
+%D \showsetup{overstrike}
+%D \showsetup{overstrikes}
+%D
+%D \showsetup{setupbars}
+%D
+%D Units can be any normal \TEX\ unit:
+%D
+%D \startbuffer
+%D \setupbars[unit=mm,rulethickness=1] bar\startbar[underbar]foo\stopbar bar\blank
+%D \setupbars[unit=ex,rulethickness=1] bar\startbar[underbar]foo\stopbar bar\blank
+%D \setupbars[unit=pt,rulethickness=1] bar\startbar[underbar]foo\stopbar bar\blank
+%D \setupbars[unit=pt,rulethickness=10pt] bar\startbar[underbar]foo\stopbar bar
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
+%D
+%D As with many early usage of \LUA\ in \MKIV\ this mechanism explores a way
+%D to deal with local settings at the \TEX\ end and remembering parameters
+%D at the \LUA\ end. We might do things differently now, but as settings normally
+%D don't change that often, we're not in a hurry to do that now. The problem at
+%D the \LUA\ end is that we don't know when to clean up.
+
+\unprotect
+
+%definesystemattribute[ruled]
+%definesystemattribute[shifted]
+
+\registerctxluafile{node-rul}{autosuffix,optimize}
+
+\installcorenamespace{bar}
+\installcorenamespace{barindex}
+\installcorenamespace{barattribute}
+\installcorenamespace{barstack}
+
+\installcommandhandler \??bar {bar} \??bar
+
+\newtoks\t_node_rules_checklist
+
+\mutable\let\c_node_rules_index\relax % temporary synonym (can be shared)
+\mutable\let\p_node_rules_color\empty
+
+\aliased\let\setupbars\setupbar
+
+\appendtoks
+ \ifempty\currentbar
+ \the\t_node_rules_checklist
+ \else
+ \node_rules_define
+ \fi
+\to \everysetupbar
+
+\appendtoks
+ \ifcsname\??barindex\currentbar\endcsname
+ \lastnamedcs\zerocount
+ \else
+ \expandafter\newcount\csname\??barindex\currentbar\endcsname
+ \fi
+ % \normalexpanded{\t_node_rules_checklist{\node_rules_redefine{\currentbar}\the\t_node_rules_checklist}}%
+ \normalexpanded{\t_node_rules_checklist{\the\t_node_rules_checklist\relax\node_rules_redefine{\currentbar}}}%
+ % \etoksapp\t_node_rules_checklist{\node_rules_redefine{\currentbar}}%
+ \node_rules_define
+ \frozen\instance\setuevalue\currentbar{\node_rules_direct{\currentbar}}%
+\to \everydefinebar
+
+\newbox\b_node_rules
+
+\protected\def\node_rules_define
+ {\edef\p_node_rules_color{\barparameter\c!color}%
+ \edef\p_node_text{\barparameter\c!text}%
+ \ifempty\p_node_text\else
+ \setbox\b_node_rules\hbox{\p_node_text}%
+ \fi
+ \expandafter\integerdef\csname\??barattribute\currentbar\endcsname
+ \clf_definerule
+ continue {\barparameter\c!continue}%
+ unit {\barparameter\c!unit}%
+ order {\barparameter\c!order}%
+ rulethickness {\barparameter\c!rulethickness}%
+ method \barparameter\c!method
+ max \barparameter\c!max\space % number
+ mp {\includeMPgraphic{\barparameter\c!mp}}
+ ma \c_attr_colormodel
+ ca \rawcolorattribute\p_node_rules_color
+ ta \rawtransparencyattribute\p_node_rules_color
+ offset \barparameter\c!offset\space % number
+ dy \barparameter\c!dy\space % number
+ empty {\barparameter\c!empty}%
+ \ifempty\p_node_text\else
+ % not that useful and efficient, more for testing something
+ text \b_node_rules
+ repeat {\barparameter\c!repeat}%
+ \fi
+ \relax
+ \relax}
+
+\protected\def\node_rules_redefine#1%
+ {\def\currentbar{#1}\node_rules_define}
+
+\protected\def\node_rules_direct#1%
+ {\groupedcommand
+ {\node_rules_set{#1}\barparameter\c!left}%
+ {\relax\barparameter\c!right}}
+
+\permanent\protected\def\inlinebar[#1]%
+ {\node_rules_direct{#1}}
+
+% \protected\def\inlinecurrentbar
+% {\node_rules_direct{\currentbar}}
+
+% store in properties
+
+\permanent\protected\def\node_rules_set#1% maybe reverse the 1000 (also maybe use more attributes instead of settings)
+ {\edef\currentbar{#1}%
+ \usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor
+ % maybe: \usebarstyleandcolor\c!textgroundstyle\c!textcolor
+ % todo: move this to lua .. we callout anyway
+ \expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname
+ \advance\c_node_rules_index\plusone
+ \clf_enablerules % will be relaxed
+ \c_attr_ruled\numexpr
+ \plusthousand*\c_node_rules_index
+ % optimizing this one needs testing
+ +\csname\??barattribute#1\ifcsname\??bar#1:\number\c_node_rules_index\s!parent\endcsname:\number\c_node_rules_index\fi\endcsname
+ \relax}
+
+\permanent\protected\def\resetbar
+ {\c_attr_ruled\attributeunsetvalue}
+
+\permanent\protected\def\nobar
+ {\groupedcommand
+ {\resetbar\barparameter\c!left}%
+ {\relax\barparameter\c!right}}
+
+\permanent\protected\def\startbar[#1]%
+ {\begingroup
+ \node_rules_set{#1}%
+ \ignorespaces
+ \barparameter\c!left}
+
+\permanent\protected\def\stopbar
+ {\removeunwantedspaces
+ \barparameter\c!right
+ \endgroup}
+
+\permanent\protected\def\setbar[#1]%
+ {\node_rules_set{#1}}
+
+\aliased\let\directsetbar\node_rules_set
+
+% ungrouped
+
+\newcount\c_node_rules_nesting % todo: same as colors
+
+\permanent\protected\def\pushbar[#1]%
+ {\global\advance\c_node_rules_nesting\plusone
+ \edefcsname\??barstack\number\c_node_rules_nesting\endcsname{\c_attr_ruled\the\c_attr_ruled}%
+ \node_rules_set{#1}}
+
+\permanent\protected\def\popbar
+ {\csname\??barstack\number\c_node_rules_nesting\endcsname
+ \global\advance\c_node_rules_nesting\minusone}
+
+\setupbars
+ [\c!method=0, % new: 0=center nested, 1=stack nested
+ \c!continue=\v!no,
+ \c!empty=, % new: yes = hide text
+ \c!offset=0, % upwards, replaces: topoffset bottomoffset
+ \c!dy=0,
+ \c!max=3,
+ \c!style=,
+ \c!rulethickness=.1,
+ \c!order=\v!foreground,
+ \c!unit=ex, % so now we are relative
+ \c!color=] % replaces: rulecolor
+
+% \definebar[touchbar] [\c!method=0,\c!dy=-0.4,\c!offset=-0.0]
+% \definebar[touchbars] [touchbar] [\c!continue=\v!yes]
+
+\pushoverloadmode
+
+\aliased\let\normalmathoverbar \overbar
+\aliased\let\normalmathunderbar \underbar
+%aliased\let\normalmathoverstrike \overstrike
+%aliased\let\normalmathunderstrike\understrike
+
+\definebar[\v!overbar] [\c!method=1,\c!dy=0.4,\c!offset=1.8,\c!continue=\v!yes]
+\definebar[\v!underbar] [\c!method=1,\c!dy=-0.4,\c!offset=-0.3,\c!continue=\v!yes]
+\definebar[\v!overstrike][\c!method=0,\c!dy=0.4,\c!offset=0.5,\c!continue=\v!yes]
+
+\definebar
+ [\v!understrike]
+ [\c!method=0,
+ \c!offset=1.375,
+ \c!rulethickness=2.5,
+ \c!continue=\v!yes,
+ \c!order=\v!background,
+ \c!color=lightgray]
+
+\definebar[\v!overbars] [\v!overbar] [\c!continue=\v!no]
+\definebar[\v!underbars] [\v!underbar] [\c!continue=\v!no]
+\definebar[\v!overstrikes] [\v!overstrike] [\c!continue=\v!no]
+\definebar[\v!understrikes][\v!understrike][\c!continue=\v!no]
+
+\definebar
+ [\v!hiddenbar]
+ [\v!underbar]
+ [\c!continue=\v!yes,
+ \c!empty=\v!yes,
+ \c!left=\zwj,
+ \c!right=\zwj]
+
+% \setupbar[\v!overstrike][continue=all]
+
+% we want these always so ...
+
+\ifdefined\normalmathunderbar
+ \enforced\permanent\expandafter\let\expandafter\normaltextunderbar\csname\v!underbar\endcsname
+ \enforced\permanent\protected\def\underbar{\mathortext\normalmathunderbar\normaltextunderbar}
+\else
+ \enforced\permanent\expandafter\let\expandafter\underbar\csname\v!underbar\endcsname
+\fi
+
+\ifdefined\normalmathoverbar
+ \enforced\permanent\expandafter\let\expandafter\normaltextoverbar\csname\v!overbar\endcsname
+ \enforced\permanent\protected\def\overbar{\mathortext\normalmathoverbar\normaltextoverbar}
+\else
+ \enforced\permanent\expandafter\let\expandafter\overbar\csname\v!overbar\endcsname
+\fi
+
+% \ifdefined\normalmathunderstrike
+% \enforced\permanent\expandafter\let\expandafter\normaltextunderstrike\csname\v!understrike\endcsname
+% \enforced\permanent\protected\def\understrike{\mathortext\normalmathunderstrike\normaltextunderstrike}
+% \else
+% \enforced\permanent\expandafter\let\expandafter\understrike\csname\v!understrike\endcsname
+% \fi
+%
+% \ifdefined\normalmathoverstrike
+% \enforced\permanent\expandafter\let\expandafter\normaltextoverstrike\csname\v!overstrike\endcsname
+% \enforced\permanent\protected\def\overstrike{\mathortext\normalmathoverstrike \normaltextoverstrike}
+% \else
+% \enforced\permanent\expandafter\let\expandafter\overstrike\csname\v!overstrike\endcsname
+% \fi
+
+\enforced\permanent\expandafter\let\expandafter\overstrikes\csname\v!overstrikes\endcsname
+\enforced\permanent\expandafter\let\expandafter\underbars \csname\v!underbars \endcsname
+\enforced\permanent\expandafter\let\expandafter\overbars \csname\v!overbars \endcsname
+
+\enforced\permanent\protected\def\setupunderbar[#1]% too incompatible for the moment
+ {}
+
+\popoverloadmode
+
+%D An experimental new feature:
+%D
+%D \startbuffer
+%D test {\red\underrandoms{test me}} and \underrandom{test} or \underrandom{grep} \blank
+%D test {\red\underdashes {test me}} and \underdash {test} or \underdash {grep} \blank
+%D test {\red\underdots {test me}} and \underdot {test} or \underdot {grep} \blank
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\startuseMPgraphic{rules:under:random}
+ draw
+ ((0,RuleDepth) ... (RuleWidth,RuleDepth)) randomized (4*RuleThickness)
+ shifted (0,RuleFactor*RuleOffset)
+ withpen pencircle scaled RuleThickness
+ withcolor RuleColor ;
+ setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{rules:under:dash}
+ draw
+ ((0,RuleDepth) -- (RuleWidth,RuleDepth))
+ shifted (0,RuleFactor*RuleOffset)
+ dashed dashpattern(on RuleFactor/2 off RuleFactor/2)
+ withpen pencircle scaled RuleThickness
+ withcolor RuleColor ;
+ setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{rules:under:dots}
+ path p ; p := (0,RuleDepth) -- (RuleWidth,RuleDepth) ;
+ numeric l ; l := arclength(p);
+ l := l mod RuleThickness/4;
+ draw
+ p
+ shifted (l,RuleFactor*RuleOffset)
+ dashed dashpattern(off 2RuleThickness+l on 0 off 2RuleThickness)
+ withpen pencircle scaled 2RuleThickness
+ withcolor RuleColor ;
+ setbounds currentpicture to unitsquare xysized(RuleWidth,RuleHeight) ;
+\stopuseMPgraphic
+
+\definebar
+ [undergraphic]
+ [\c!mp=rules:under:dash,
+ \c!offset=-.2,
+ \c!order=\v!background]
+
+\definebar[underrandom] [undergraphic][\c!mp=rules:under:random]
+\definebar[underrandoms][underrandom] [\c!continue=\v!yes]
+
+\definebar[underdash] [undergraphic][\c!mp=rules:under:dash]
+\definebar[underdashes] [underdash] [\c!continue=\v!yes]
+
+\definebar[underdot] [undergraphic][\c!mp=rules:under:dots]
+\definebar[underdots] [underdot] [\c!continue=\v!yes]
+
+%D This will move: (a bit duplicated)
+
+\installcorenamespace{shift}
+\installcorenamespace{shiftindex}
+\installcorenamespace{shiftattribute}
+
+\installcommandhandler \??shift {shift} \??shift
+
+\newtoks\t_node_shifts_checklist
+
+\mutable\let\c_node_shifts_index\relax % temporary synonym (can be shared)
+
+\let\setupshifts\setupshift
+
+\appendtoks
+ \ifempty\currentshift
+ \the\t_node_shifts_checklist
+ \else
+ \node_shifts_define
+ \fi
+\to \everysetupshift
+
+\appendtoks
+ \ifcsname\??shiftindex\currentshift\endcsname
+ \lastnamedcs\zerocount
+ \else
+ \expandafter\newcount\csname\??shiftindex\currentshift\endcsname
+ \fi
+ \normalexpanded{\t_node_shifts_checklist{\the\t_node_shifts_checklist\node_shifts_redefine{\currentshift}}}% order ?
+ \node_shifts_define
+ \frozen\instance\setuevalue\currentshift{\node_shifts_direct{\currentshift}}%
+\to \everydefineshift
+
+\protected\def\node_shifts_define
+ {\setevalue{\??shiftattribute\currentshift}{\number
+ \clf_defineshift
+ continue {\shiftparameter\c!continue}%
+ unit {\shiftparameter\c!unit}%
+ method \shiftparameter\c!method
+ dy \shiftparameter\c!dy % number
+ \relax}}
+
+\protected\def\node_shifts_redefine#1%
+ {\def\currentshift{#1}\node_shifts_define}
+
+\protected\def\node_shifts_set#1% todo: check parent ! todo: move attr etc to lua
+ {\def\currentshift{#1}%
+ \expandafter\let\expandafter\c_node_shifts_index\csname\??shiftindex#1\endcsname
+ \advance\c_node_shifts_index\plusone
+ \clf_enableshifts % will be relaxed
+ \c_attr_shifted\numexpr
+ \plusthousand*\c_node_shifts_index
+ +\csname\??shiftattribute#1\ifcsname\??shift#1:\number\c_node_shifts_index\s!parent\endcsname:\number\c_node_shifts_index\fi\endcsname
+ \relax
+ \useshiftstyleandcolor\c!style\c!color
+ \dosetupisolatedalign{\shiftparameter\c!align}} % weird feature that i probably needed once
+
+\permanent\protected\def\startshift[#1]%
+ {\begingroup
+ \node_shifts_set{#1}%
+ \ignorespaces}
+
+\permanent\protected\def\stopshift
+ {\removeunwantedspaces
+ \endgroup}
+
+\protected\def\node_shifts_direct#1%
+ {\groupedcommand
+ {\begingroup\dostartisolation\begingroup\node_shifts_set{#1}\ignorespaces}
+ {\removeunwantedspaces\endgroup\dostopisolation\endgroup}}
+
+\setupshifts
+ [\c!method=0,
+ \c!continue=\v!no,
+ \c!dy=0,
+ \c!unit=ex,
+ \c!align=,
+ \c!style=,
+ \c!color=]
+
+\defineshift [\v!shiftup] [\c!method=0,\c!dy=-1,\c!unit=ex,\c!continue=\v!yes,\c!style=\txx,\c!color=]
+\defineshift [\v!shiftdown] [\c!method=1,\c!dy=.3,\c!unit=ex,\c!continue=\v!yes,\c!style=\txx,\c!color=]
+
+% we want these always so ...
+
+\expandafter\let\expandafter\shiftup \csname\v!shiftup \endcsname
+\expandafter\let\expandafter\shiftdown \csname\v!shiftdown \endcsname
+
+% This is a weird helper.. these might go away:
+
+\permanent\protected\def\dostartisolation{\signalcharacter}
+\permanent\protected\def\dostopisolation {\signalcharacter}
+\permanent\protected\def\doisolator {\signalcharacter}
+
+\permanent\protected\def\dosetupisolatedalign#1%
+ {\doisolator
+ \setupalign[#1]\relax}
+
+\permanent\protected\def\doisolatedgroupedalign#1#2%
+ {\groupedcommand
+ {\begingroup\dostartisolation\begingroup#1}
+ {#2\endgroup\dostopisolation\endgroup}}
+
+%D More rules.
+
+% The following code rocks and was written with the Toto Live in Poland bluray
+% in loop mode on my 5.1 surround development setup (the Toto lineup with Simon
+% Phillips on drums). The Amsterdam concert is equally energizing.
+
+\installcorenamespace{linefiller}
+\installcorenamespace{linefillerindex}
+\installcorenamespace{linefillerattribute}
+
+\installcommandhandler \??linefiller {linefiller} \??linefiller
+
+\definesystemattribute[linefiller][public]
+
+\newtoks\t_node_linefiller_checklist
+
+\mutable\let\c_node_linefiller_index\relax % temporary synonym (can be shared)
+
+\aliased\let\setuplinefillers\setuplinefiller
+
+\appendtoks
+ \ifempty\currentlinefiller
+ \the\t_node_linefiller_checklist
+ \else
+ \node_linefiller_define
+ \fi
+\to \everysetuplinefiller
+
+\appendtoks
+ \ifcsname\??linefillerindex\currentlinefiller\endcsname
+ \lastnamedcs\zerocount
+ \else
+ \expandafter\newcount\csname\??linefillerindex\currentlinefiller\endcsname
+ \fi
+ \etoksapp\t_node_linefiller_checklist{\t_node_linefiller_checklist\node_linefiller_redefine{\currentlinefiller}}%
+ \node_linefiller_define
+\to \everydefinelinefiller
+
+\protected\def\node_linefiller_define
+ {\edef\p_node_rules_color{\linefillerparameter\c!color}%
+ \expandafter\integerdef\csname\??linefillerattribute\currentlinefiller\endcsname
+ \clf_definelinefiller
+ %method \linefillerparameter\c!method
+ location {\linefillerparameter\c!location}%
+ scope {\linefillerparameter\c!scope}%
+ mp {\includeMPgraphic{\linefillerparameter\c!mp}}%
+ ma \c_attr_colormodel
+ ca \rawcolorattribute\p_node_rules_color
+ ta \rawtransparencyattribute\p_node_rules_color
+ height \dimexpr\linefillerparameter\c!height\relax
+ depth \dimexpr\linefillerparameter\c!depth\relax
+ distance \dimexpr\linefillerparameter\c!distance\relax
+ threshold \dimexpr\linefillerparameter\c!threshold\relax
+ rulethickness \dimexpr\linefillerparameter\c!rulethickness\relax
+ \relax
+ \relax}
+
+\protected\def\node_linefiller_redefine#1%
+ {\def\currentlinefiller{#1}\node_linefiller_define}
+
+\protected\def\node_linefiller_set#1% todo: check parent ! todo: move attr etc to lua
+ {\def\currentlinefiller{#1}%
+ \expandafter\let\expandafter\c_node_linefiller_index\csname\??linefillerindex#1\endcsname
+ \advance\c_node_linefiller_index\plusone
+ \clf_enablelinefillers
+ \c_attr_linefiller\numexpr
+ \plusthousand*\c_node_linefiller_index
+ +\csname\??linefillerattribute#1\ifcsname\??linefiller#1:\number\c_node_linefiller_index\s!parent\endcsname:\number\c_node_linefiller_index\fi\endcsname
+ \relax}
+
+\permanent\tolerant\protected\def\startlinefiller[#1]#*[#2]%
+ {\begingroup
+ \par
+ \def\currentlinefiller{#1}%
+ \ifparameter#2\or
+ % we need to update settings
+ \setuplinefiller[#1][#2]% no \setupcurrentlinefiller as we need to update settings
+ \fi
+ \node_linefiller_set{#1}%
+ \linefillerparameter\c!before
+ \usealignparameter\linefillerparameter
+ \uselinefillerstyleandcolor\c!textstyle\c!textcolor} % bars have foregroundcolor
+
+\permanent\protected\def\stoplinefiller
+ {\par
+ \linefillerparameter\c!after
+ \endgroup}
+
+\permanent\protected\def\setlinefiller[#1]%
+ {\node_linefiller_set{#1}}
+
+\setuplinefillers
+ [%c!method=0,
+ %c!mp=,
+ \c!location=\v!both,
+ \c!scope=\v!local,
+ \c!distance=\zeropoint,
+ \c!threshold=\zeropoint,
+ \c!rulethickness=\linewidth,
+ \c!height=\linewidth,
+ \c!depth=\zeropoint,
+ %\c!textcolor=,
+ %\c!textstyle=,
+ %\c!align=,
+ %\c!before=,
+ %\c!after=,
+ \c!color=]
+
+\definelinefiller
+ [filler]
+ [\c!height=.75\exheight,
+ %\c!mp=rules:filler:demo,
+ %\c!threshold=.25\emwidth,
+ \c!distance=.25\emwidth,
+ \c!rulethickness=.25\exheight]
+
+%D Bonus:
+%D
+%D \starttyping
+%D \startuseMPgraphic{foo}
+%D fill unitsquare
+%D xyscaled (RuleWidth,RuleHeight+RuleDepth) enlarged (ExHeight/4,ExHeight/8)
+%D shifted (-ExHeight/8,ExHeight/16)
+%D withcolor RuleColor ;
+%D \stopuseMPgraphic
+%D
+%D \definelinefiller[foo][mp=foo,color=darkred]
+%D
+%D \linefillerhbox[foo]{OEPS}
+%D \stoptyping
+
+\protected\def\node_backgrounds_filler_box#1#2[#3]%
+ {\bgroup
+ \clf_enablebackgroundboxes
+ \dowithnextbox{%
+ \node_linefiller_set{#3}% already sets the attribute
+ #1%
+ attr \backgroundattribute \plusone
+ % attr \linefillerattribute \the\c_attr_linefiller
+ {\box\nextbox}%
+ \egroup}%
+ #2}
+
+\permanent\protected\def\linefillerhbox{\node_backgrounds_filler_box\hpack\hbox}
+\permanent\protected\def\linefillervbox{\node_backgrounds_filler_box\vpack\vbox}
+\permanent\protected\def\linefillervtop{\node_backgrounds_filler_box\tpack\vtop}
+
+%D Bonus:
+
+\permanent\protected\def\autorule{\clf_autorule} % todo: public implementor
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-scn.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-scn.lmt
new file mode 100644
index 00000000000..0ec1ba387c9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-scn.lmt
@@ -0,0 +1,314 @@
+if not modules then modules = { } end modules ['node-scn'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local floor = math.floor
+
+local attributes = attributes
+local nodes = nodes
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getattr = nuts.getattr
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+
+local end_of_math = nuts.end_of_math
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+local kerncodes = nodes.kerncodes
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local rule_code = nodecodes.rule
+local boundary_code = nodecodes.boundary
+local dir_code = nodecodes.dir
+local math_code = nodecodes.math
+local glue_code = nodecodes.glue
+local penalty_code = nodecodes.penalty
+local kern_code = nodecodes.kern
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local userskip_code = gluecodes.userskip
+local spaceskip_code = gluecodes.spaceskip
+local xspaceskip_code = gluecodes.xspaceskip
+local leaders_code = gluecodes.leaders
+
+local fontkern_code = kerncodes.fontkern
+
+local variables = interfaces.variables
+
+local privateattributes = attributes.private
+
+local a_runningtext = privateattributes('runningtext')
+
+local v_yes = variables.yes
+local v_all = variables.all
+
+local function striprange(first,last) -- todo: dir
+ if first and last then -- just to be sure
+ if first == last then
+ return first, last
+ end
+ while first and first ~= last do
+ local id = getid(first)
+ if id == glyph_code or id == disc_code or id == dir_code or id == boundary_code then -- or id == rule_code
+ break
+ else
+ first = getnext(first)
+ end
+ end
+ if not first then
+ return nil, nil
+ elseif first == last then
+ return first, last
+ end
+ while last and last ~= first do
+ local id = getid(last)
+ if id == glyph_code or id == disc_code or id == dir_code or id == boundary_code then -- or id == rule_code
+ break
+ else
+ local prev = getprev(last) -- luatex < 0.70 has italic correction kern not prev'd
+ if prev then
+ last = prev
+ else
+ break
+ end
+ end
+ end
+ if not last then
+ return nil, nil
+ end
+ end
+ return first, last
+end
+
+nuts.striprange = striprange
+
+-- todo: order and maybe other dimensions
+
+-- we can use this one elsewhere too
+--
+-- todo: functions: word, sentence
+--
+-- glyph rule unset whatsit glue margin_kern kern math disc
+
+-- we assume {glyphruns} and no funny extra kerning, ok, maybe we need
+-- a dummy character as start and end; anyway we only collect glyphs
+--
+-- this one needs to take layers into account (i.e. we need a list of
+-- critical attributes)
+
+-- omkeren class en level -> scheelt functie call in analyze
+
+-- todo: switching inside math
+
+-- handlers
+
+local function processwords(attribute,data,flush,head,parent,skip) -- we have hlistdir and local dir
+ local n = head
+ if n then
+ local f, l, a, d, i, class
+ local continue, leaders, done, strip, level = false, false, false, true, -1
+ while n do
+ local id = getid(n)
+ if id == glyph_code or id == rule_code or (id == hlist_code and getattr(n,a_runningtext)) then
+ local aa = getattr(n,attribute)
+ if aa and aa ~= skip then
+ if aa == a then
+ if not f then -- ?
+ f = n
+ end
+ l = n
+ else
+ -- possible extensions: when in same class then keep spanning
+ local newlevel, newclass = floor(aa/1000), aa%1000 -- will be configurable
+ -- strip = not continue or level == 1 -- 0
+ if f then
+ if class == newclass then -- and newlevel > level then
+ head, done = flush(head,f,l,d,level,parent,false), true
+ else
+ head, done = flush(head,f,l,d,level,parent,strip), true
+ end
+ end
+ f, l, a = n, n, aa
+ level, class = newlevel, newclass
+ d = data[class]
+ if d then
+ local c = d.continue
+ leaders = c == v_all
+ continue = leaders or c == v_yes
+ else
+ continue = true
+ end
+ end
+ else
+ if f then
+ head, done = flush(head,f,l,d,level,parent,strip), true
+ end
+ f, l, a = nil, nil, nil
+ end
+ if id == hlist_code then
+ local list = getlist(n)
+ if list then
+ setlist(n,(processwords(attribute,data,flush,list,n,aa))) -- watch ()
+ end
+ end
+ elseif id == disc_code or id == boundary_code then
+ if f then
+ l = n
+ end
+ elseif id == kern_code and getsubtype(n) == fontkern_code then
+ if f then
+ l = n
+ end
+ elseif id == math_code then
+ -- otherwise not consistent: a $b$ c vs a $b+c$ d etc
+ -- we need a special (optional) go over math variant
+ if f then
+ head, done = flush(head,f,l,d,level,parent,strip), true
+ f, l, a = nil, nil, nil
+ end
+ elseif id == hlist_code or id == vlist_code then
+ if f then
+ head, done = flush(head,f,l,d,level,parent,strip), true
+ f, l, a = nil, nil, nil
+ end
+ local list = getlist(n)
+ if list then
+ setlist(n,(processwords(attribute,data,flush,list,n,skip))) -- watch ()
+ end
+ elseif id == dir_code then -- only changes in dir, we assume proper boundaries
+ if f then
+ l = n
+ end
+ elseif f then
+ if continue then
+ if id == penalty_code then
+ l = n
+ -- elseif id == kern_code then
+ -- l = n
+ elseif id == glue_code then
+ -- catch \underbar{a} \underbar{a} (subtype test is needed)
+ local subtype = getsubtype(n)
+ if getattr(n,attribute) and (subtype == userskip_code or subtype == spaceskip_code or subtype == xspaceskip_code or (leaders and subtype >= leaders_code)) then
+ l = n
+ else
+ head, done = flush(head,f,l,d,level,parent,strip), true
+ f, l, a = nil, nil, nil
+ end
+ end
+ else
+ head, done = flush(head,f,l,d,level,parent,strip), true
+ f, l, a = nil, nil, nil
+ end
+ end
+ n = getnext(n)
+ end
+ if f then
+ head, done = flush(head,f,l,d,level,parent,strip), true
+ end
+ return head, true -- todo: done
+ else
+ return head, false
+ end
+end
+
+nuts.processwords = function(attribute,data,flush,head,parent) -- we have hlistdir and local dir
+ return processwords(attribute,data,flush,head,parent)
+end
+
+-- works on lines !
+-- todo: stack because skip can change when nested
+
+local function processranges(attribute,flush,head,parent,depth,skip)
+ local n = head
+ if n then
+ local f, l, a
+ local done = false
+ while n do
+ local id = getid(n)
+ if id == glyph_code or id == rule_code then
+ local aa = getattr(n,attribute)
+-- if aa and (not skip or aa ~= skip) then
+ if aa then
+ if aa == a then
+ if not f then
+ f = n
+ end
+ l = n
+ else
+ if f then
+ head, done = flush(head,f,l,a,parent,depth), true
+ end
+ f, l, a = n, n, aa
+ end
+ else
+ if f then
+ head, done = flush(head,f,l,a,parent,depth), true
+ end
+ f, l, a = nil, nil, nil
+ end
+ elseif id == disc_code or id == boundary_code then
+ if f then
+ l = n
+ else
+ -- weird
+ end
+ elseif id == kern_code and getsubtype(n) == fontkern_code then
+ if f then
+ l = n
+ end
+ -- elseif id == penalty_code then
+ elseif id == glue_code then
+ -- todo: leaders
+ elseif id == hlist_code or id == vlist_code then
+ local aa = getattr(n,attribute)
+-- if aa and (not skip or aa ~= skip) then
+ if aa then
+ if aa == a then
+ if not f then
+ f = n
+ end
+ l = n
+ else
+ if f then
+ head, done = flush(head,f,l,a,parent,depth), true
+ end
+ f, l, a = n, n, aa
+ end
+ else
+ if f then
+ head, done = flush(head,f,l,a,parent,depth), true
+ end
+ f, l, a = nil, nil, nil
+ end
+ local list = getlist(n)
+ if list then
+ setlist(n,(processranges(attribute,flush,list,n,depth+1,aa)))
+ end
+ end
+ n = getnext(n)
+ end
+ if f then
+ head, done = flush(head,f,l,a,parent,depth), true
+ end
+ return head, done
+ else
+ return head, false
+ end
+end
+
+nuts.processranges = function(attribute,flush,head,parent) -- we have hlistdir and local dir
+ return processranges(attribute,flush,head,parent,0)
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-ser.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-ser.lmt
new file mode 100644
index 00000000000..8fcbb31e473
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-ser.lmt
@@ -0,0 +1,284 @@
+if not modules then modules = { } end modules ['node-ser'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, tostring = type, tostring
+local concat, tohash, sortedkeys, sortedhash, printtable, serialize = table.concat, table.tohash, table.sortedkeys, table.sortedhash, table.print, table.serialize
+local formatters, format, rep = string.formatters, string.format, string.rep
+
+local allocate = utilities.storage.allocate
+
+local context = context
+local nodes = nodes
+local node = node
+
+local getfields = node.fields
+
+local is_node = nodes.is_node
+
+local nodecodes = nodes.nodecodes
+local subtypes = nodes.subtypes
+
+local tonode = nodes.tonode
+local tonut = nodes.tonut
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local f_char = formatters["%U"]
+local f_attr = formatters["<attribute : %i>"]
+local f_recurse = formatters["<recursive : %i>"]
+
+-- flat : don't use next, but indexes
+-- verbose : also add type
+
+local canbezero = {
+ integer = true,
+ dimension = true,
+ number = true,
+}
+
+local canbelist = {
+ attribute = "<attribute>",
+ node = "<node>",
+ token = "<token>",
+ attribute_list = "<attributes>",
+ node_list = "<nodes>",
+ token_list = "<tokens>",
+}
+
+local canbeignored = {
+ prev = "<node>"
+}
+
+local canbechar = {
+ char = true,
+ small_char = true,
+ large_char = true,
+}
+
+local fieldtypes = table.setmetatableindex(function(t,k)
+ local v = getfields(k,true) or false
+ t[k] = v
+ return v
+end)
+
+nodes.fieldtypes = fieldtypes
+
+local function astable(n)
+ n = tonode(n)
+ if n then
+ local fields = fieldtypes[n.id]
+ if fields then
+ local result = { }
+ for field, fieldtype in sortedhash(fields) do
+ local value = n[field]
+ if value then
+ if canbeignored[field] then
+ value = nil
+ elseif canbezero[fieldtype] and value == 0 then
+ value = nil
+ elseif canbelist[fieldtype] then
+ value = canbelist[fieldtype]
+ end
+ if value then
+ result[field] = value
+ end
+ end
+ end
+ local id = n.id
+ if id then
+ id = nodecodes[id]
+ result.id = id
+ local subtype = n.subtype
+ if subtype then
+ local subtypes = subtypes[id]
+ if subtypes then
+ result.subtype = subtypes[subtype]
+ end
+ end
+ end
+ return result
+ end
+ end
+end
+
+nodes.astable = astable
+
+setinspector("node",function(v) if is_node(v) then printtable(astable(v),tostring(v)) return true end end)
+
+local function to_table(n,flat,verbose,noattributes,done)
+ local d = tonut(n)
+ if done[d] then
+ return f_recurse(d)
+ else
+ done[d] = true
+ local fields = fieldtypes[n.id]
+ if fields then
+ local result = { }
+ for field, fieldtype in sortedhash(fields) do
+ local value = n[field]
+ if value then
+ if fieldtype == "attribute_list" or fieldtype == "attribute" then
+ if noattributes then
+ result[value] = canbeignored[value]
+ else
+ result[value] = to_table(value,flat,verbose,noattributes,done)
+ end
+ elseif canbeignored[field] then
+ result[value] = canbeignored[value]
+ elseif not verbose and canbezero[fieldtype] and value == 0 then
+ value = nil
+ elseif canbelist[fieldtype] then
+ if flat then
+ result[value] = canbelist[value]
+ else
+ result[value] = to_table(value,flat,verbose,noattributes,done)
+ end
+ end
+ if value then
+ result[field] = value
+ end
+ end
+ end
+ if verbose then
+ local id = result.id
+ if id then
+ id = nodecodes[id]
+ result.id = id
+ local subtype = result.subtype
+ if subtype then
+ local subtypes = subtypes[id]
+ if subtypes then
+ result.subtype = subtypes[subtype]
+ end
+ end
+ end
+ for k, v in next, canbechar do
+ local v = result[k]
+ if v then
+ result[k] = f_char(v)
+ end
+ end
+ end
+ return result
+ end
+ end
+end
+
+local function totable(n,flat,verbose,noattributes) -- nicest: n,true,true,true
+ if n then
+ local d = { }
+ if flat then
+ local t, tn = { }, 0
+ while n do
+ tn = tn + 1
+ local nt = to_table(n,flat,verbose,noattributes,d)
+ t[tn] = nt
+ nt.next = nil
+ nt.prev = nil
+ n = n.next
+ end
+ done = nil
+ return t
+ else
+ local t = to_table(n,flat,verbose,noattributes,d)
+ local n = n.next
+ if n then
+ t.next = totable(n,flat,verbose,noattributes,d)
+ end
+ return t
+ end
+ else
+ return { }
+ end
+end
+
+nodes.totable = function(n,...) return totable(tonode(n),...) end
+nodes.totree = function(n) return totable(tonode(n),true,true,true) end -- no attributes, todo: attributes in k,v list
+
+local function key(k)
+ return ((type(k) == "number") and "["..k.."]") or k
+end
+
+function nodes.serialize(root,flat,verbose,noattributes,name)
+ return serialize(totable(tonode(root),flat,verbose,noattributes),name)
+end
+
+function nodes.serializebox(n,flat,verbose,noattributes,name)
+ return serialize(totable(tex.box[n],flat,verbose,noattributes),name)
+end
+
+function nodes.visualizebox(n,flat,verbose,noattributes,name)
+ context.tocontext(totable(tex.box[n],flat,verbose,noattributes),name)
+end
+
+function nodes.list(head,n) -- name might change to nodes.type -- to be checked .. will move to module anyway
+ head = tonode(head)
+ if not n then
+ context.starttyping(true)
+ end
+ while head do
+ local id = head.id
+ context(rep(" ",n or 0) .. tostring(head) .. "\n")
+ if id == hlist_code or id == vlist_code then
+ nodes.list(head.list,(n or 0)+1)
+ end
+ head = head.next
+ end
+ if not n then
+ context.stoptyping(true)
+ end
+end
+
+function nodes.print(head,n)
+ head = tonode(head)
+ while head do
+ local id = head.id
+ logs.writer(string.formatters["%w%S"],n or 0,head)
+ if id == hlist_code or id == vlist_code then
+ nodes.print(head.list,(n or 0)+1)
+ end
+ head = head.next
+ end
+end
+
+-- quick hack, nicer is to have a proper expand per node type already prepared
+
+local function apply(n,action)
+ while n do
+ action(n)
+ local id = n.id
+ if id == hlist_code or id == vlist_code then
+ apply(n.list,action)
+ end
+ n = n.next
+ end
+end
+
+nodes.apply = apply
+
+local nuts = nodes.nuts
+local getid = nuts.getid
+local getlist = nuts.getlist
+local getnext = nuts.getnext
+
+local function apply(n,action)
+ while n do
+ action(n)
+ local id = getid(n)
+ if id == hlist_code or id == vlist_code then
+ local list = getlist(n,action)
+ if list then
+ apply(list,action)
+ end
+ end
+ n = getnext(n)
+ end
+end
+
+nuts.apply = apply
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-shp.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-shp.lmt
new file mode 100644
index 00000000000..64508ecc746
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-shp.lmt
@@ -0,0 +1,115 @@
+if not modules then modules = { } end modules ['node-shp'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, type = next, type
+local format = string.format
+local setmetatableindex = table.setmetatableindex
+
+local nodes = nodes
+local tasks = nodes.tasks
+local handlers = nodes.handlers
+
+local nodecodes = nodes.nodecodes
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local nextnode = nuts.traversers.node
+local getlist = nuts.getlist
+local getbox = nuts.getbox
+
+local implement = interfaces.implement
+
+local actions = tasks.actions("shipouts")
+
+function handlers.finalizebox(box)
+ actions(getbox(box)) -- nut
+end
+
+handlers.cleanuppage = nuts.flatten_discretionaries
+
+-- interface
+
+implement {
+ name = "finalizebox",
+ arguments = "integer",
+ actions = handlers.finalizebox,
+}
+
+-- just in case we want to optimize lookups:
+
+local frequencies = { }
+
+nodes.tracers.frequencies = frequencies
+
+local data = { }
+local done = false
+
+setmetatableindex(data,function(t,k)
+ local v = { }
+ setmetatableindex(v,function(t,k)
+ local v = { }
+ t[k] = v
+ setmetatableindex(v,function(t,k)
+ t[k] = 0
+ return 0
+ end)
+ return v
+ end)
+ t[k] = v
+ return v
+end)
+
+local function count(head,data,subcategory)
+ -- no components, pre, post, replace .. can maybe an option .. but
+ -- we use this for optimization so it makes sense to look the the
+ -- main node only
+ for n, id in nextnode, tonut(head) do
+ local dn = data[nodecodes[id]] -- we could use id and then later convert to nodecodes
+ dn[subcategory] = dn[subcategory] + 1
+ if id == hlist_code or id == vlist_code then
+ count(getlist(n),data,subcategory)
+ end
+ end
+end
+
+local function register(category,subcategory)
+ return function(head)
+ done = true
+ count(head,data[category],subcategory)
+ return head, false
+ end
+end
+
+frequencies.register = register
+frequencies.filename = nil
+
+trackers.register("nodes.frequencies",function(v)
+ if type(v) == "string" then
+ frequencies.filename = v
+ end
+ handlers.frequencies_shipouts_before = register("shipouts", "begin")
+ handlers.frequencies_shipouts_after = register("shipouts", "end")
+ handlers.frequencies_processors_before = register("processors", "begin")
+ handlers.frequencies_processors_after = register("processors", "end")
+ tasks.prependaction("shipouts", "before", "nodes.handlers.frequencies_shipouts_before")
+ tasks.appendaction ("shipouts", "after", "nodes.handlers.frequencies_shipouts_after")
+ tasks.prependaction("processors", "before", "nodes.handlers.frequencies_processors_before")
+ tasks.appendaction ("processors", "after", "nodes.handlers.frequencies_processors_after")
+end)
+
+statistics.register("node frequencies", function()
+ if done then
+ local filename = frequencies.filename or (tex.jobname .. "-frequencies.lua")
+ io.savedata(filename,table.serialize(data,true))
+ return format("saved in %q",filename)
+ end
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-snp.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-snp.lmt
new file mode 100644
index 00000000000..8c0237a5c7d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-snp.lmt
@@ -0,0 +1,69 @@
+if not modules then modules = { } end modules ['node-snp'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+if not nodes then
+ nodes = { } -- also loaded in mtx-timing
+end
+
+local snapshots = { }
+nodes.snapshots = snapshots
+
+local status = status
+
+local nodeusage = nodes.pool and nodes.pool.usage
+local nodestock = nodes.pool and nodes.pool.stock
+local clock = os.gettimeofday or os.clock -- should go in environment
+local lasttime = clock()
+local samples = { }
+
+function snapshots.takesample(comment)
+ if nodeusage then
+ local c = clock()
+ samples[#samples+1] = {
+ nodes = nodeusage(),
+ stock = nodestock(),
+ texcallbacks = status.getcallbackstate(),
+ mpcallbacks = mplib.getcallbackstate(),
+ backendcallbacks = backends.getcallbackstate(),
+ luavariables = status.getluastate(),
+ texvariables = status.gettexstate(),
+ comment = comment,
+ variables = {
+ lasttime = c,
+ elapsed = c - lasttime,
+ },
+ memories = {
+ pool = status.getpoolstate(),
+ hash = status.gethashstate(),
+ lookup = status.getlookupstate(),
+ node = status.getnodestate(),
+ token = status.gettokenstate(),
+ buffer = status.getbufferstate(),
+ input = status.getinputstate(),
+ file = status.getfilestate(),
+ nest = status.getneststate(),
+ parameter = status.getparameterstate(),
+ save = status.getsavestate(),
+ expand = status.getexpandstate(),
+ read = status.getreadstate(),
+ font = status.getfontstate(),
+ language = status.getlanguagestate(),
+ mark = status.getmarkstate(),
+ sparse = status.getsparsestate(),
+ },
+ }
+ end
+end
+
+function snapshots.getsamples()
+ return samples -- one return value !
+end
+
+function snapshots.resetsamples()
+ samples = { }
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-syn.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-syn.lmt
new file mode 100644
index 00000000000..ce5f0d2ddf4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-syn.lmt
@@ -0,0 +1,782 @@
+if not modules then modules = { } end modules ['node-syn'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Because we have these fields in some node that are used by synctex, and because
+-- some users seem to like that feature, I decided to implement a variant that might
+-- work out better for ConTeXt. This is experimental code. I don't use it myself so
+-- it will take a while to mature. There will be some helpers that one can use in
+-- more complex situations like included xml files. Currently (somewhere else) we
+-- take care of valid files, that is: we prohibit access to files in the tree
+-- because we don't want users to mess up styles.
+--
+-- It is unclear how the output gets interpreted but by reverse engineering (and
+-- stripping) the file generated by generic synctex, I got there eventually. For
+-- instance, we only need to be able to go back to a place where text is entered,
+-- but still we need all that redundant box wrapping. Anyway, I was able to get a
+-- minimal output and cross my fingers that the parser used in editors is not
+-- changed in fundamental ways.
+--
+-- I only tested SumatraPDF with SciTE, for which one needs to configure in the
+-- viewer:
+--
+-- InverseSearchCmdLine = c:\data\system\scite\wscite\scite.exe "%f" "-goto:%l" $
+--
+-- In fact, a way more powerful implementation would have been not to add a library
+-- to a viewer, but letthe viewer call an external program:
+--
+-- InverseSearchCmdLine = mtxrun.exe --script synctex --edit --name="%f" --line="%l" $
+--
+-- which would (re)launch the editor in the right spot. That way we can really
+-- tune well to the macro package used and also avoid the fuzzy heuristics of
+-- the library.
+--
+-- Unfortunately syntex always removes the files at the end and not at the start
+-- (this happens in synctexterminate) so we need to work around that by using an
+-- intermediate file. This is no big deal in context (which has a runner) but
+-- definitely not nice.
+--
+-- The visualizer code is only needed for testing so we don't use fancy colors or
+-- provide more detail. After all we're only interested in rendered source text
+-- anyway. We try to play safe which sometimes means that we'd better no go
+-- somewhere than go someplace wrong.
+--
+-- A previous version had a mode for exporting boxes and such but I removed that
+-- as it made no sense. Also, collecting output in a table was not faster than
+-- directly piping to the file, probably because the amount is not that large. We
+-- keep some left-overs commented.
+--
+-- A significate reduction in file size can be realized when reusing the same
+-- values. Actually that triggered the current approach in ConTeXt. In the latest
+-- synctex parser vertical positions can be repeated by an "=" sign but for some
+-- reason only for that field. It's probably trivial to do that for all of "w h d v
+-- h" but it currently not the case so I'll delay that till all are supported. (We
+-- could benefit a lot from such a repetition scheme but not much from a "v" alone
+-- which -alas- indicates that synctex is still mostly a latex targeted story.)
+--
+-- It's kind of hard to fight the parser because it really wants to go to some file
+-- but maybe some day I can figure it out. Some untagged text (in the pdf) somehow
+-- gets seen as part of the last box. Anonymous content is simply not part of the
+-- concept. Using a dummy name doesn't help either as the editor gets a signal to
+-- open that dummy. Even an empty filename doesn't work.
+--
+-- We output really simple and compact code, like:
+--
+-- SyncTeX Version:1
+-- Input:1:e:/tmp/oeps.tex
+-- Input:2:c:/data/develop/context/sources/klein.tex
+-- Output:pdf
+-- Magnification:1000
+-- Unit:1
+-- X Offset:0
+-- Y Offset:0
+-- Content:
+-- !160
+-- {1
+-- h0,0:0,0,0,0,0
+-- v0,0:0,55380990:39158276,55380990,0
+-- h2,1:4661756,9176901:27969941,655360,327680
+-- h2,2:4661756,10125967:26048041,655360,327680
+-- h2,3:30962888,10125967:1668809,655360,327680
+-- h2,3:4661756,11075033:23142527,655360,327680
+-- h2,4:28046650,11075033:4585047,655360,327680
+-- h2,4:4661756,12024099:22913954,655360,327680
+-- h2,5:27908377,12024099:4723320,655360,327680
+-- h2,5:4661756,12973165:22918783,655360,327680
+-- h2,6:27884864,12973165:4746833,655360,327680
+-- h2,6:4661756,13922231:18320732,655360,327680
+-- ]
+-- !533
+-- }1
+-- Input:3:c:/data/develop/context/sources/ward.tex
+-- !57
+-- {2
+-- h0,0:0,0,0,0,0
+-- v0,0:0,55380990:39158276,55380990,0
+-- h3,1:4661756,9176901:18813145,655360,327680
+-- h3,2:23713999,9176901:8917698,655360,327680
+-- h3,2:4661756,10125967:10512978,655360,327680
+-- h3,3:15457206,10125967:17174491,655360,327680
+-- h3,3:4661756,11075033:3571223,655360,327680
+-- h3,4:8459505,11075033:19885281,655360,327680
+-- h3,5:28571312,11075033:4060385,655360,327680
+-- h3,5:4661756,12024099:15344870,655360,327680
+-- ]
+-- !441
+-- }2
+-- !8
+-- Postamble:
+-- Count:22
+-- !23
+-- Post scriptum:
+--
+-- But for some reason, when the pdf file has some extra content (like page numbers)
+-- the main document is consulted. Bah. It would be nice to have a mode for *only*
+-- looking at marked areas. It somehow works not but maybe depends on the parser.
+--
+-- Supporting reuseable objects makes not much sense as these are often graphics or
+-- ornamental. They can not have hyperlinks etc (at least not without some hackery
+-- which I'm not willing to do) so basically they are sort of useless for text.
+--
+-- Some generic (more clever code) has been removed as I don't see things change
+-- that much.
+
+local type, rawset = type, rawset
+local concat = table.concat
+local formatters = string.formatters
+local replacesuffix, suffixonly, nameonly = file.replacesuffix, file.suffix, file.nameonly
+local openfile, renamefile, removefile = io.open, os.rename, os.remove
+
+local report_system = logs.reporter("system")
+
+local tex = tex
+local texget = tex.get
+
+local nuts = nodes.nuts
+
+local getid = nuts.getid
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getnext = nuts.getnext
+local getwhd = nuts.getwhd
+local getwidth = nuts.getwidth
+local getsubtype = nuts.getsubtype
+
+local nodecodes = nodes.nodecodes
+local kerncodes = nodes.kerncodes
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local glue_code = nodecodes.glue
+local penalty_code = nodecodes.penalty
+local kern_code = nodecodes.kern
+----- rule_code = nodecodes.rule
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local dir_code = nodecodes.dir
+local fontkern_code = kerncodes.fontkern
+
+local cancel_code = nodes.dircodes.cancel
+
+local insert_before = nuts.insert_before
+local insert_after = nuts.insert_after
+
+local nodepool = nuts.pool
+local new_latelua = nodepool.latelua
+local new_rule = nodepool.rule
+local new_kern = nodepool.kern
+
+local getdimensions = nuts.dimensions
+local getrangedimensions = nuts.rangedimensions
+
+local getsynctexfields = nuts.getsynctexfields or nuts.get_synctex_fields
+local forcesynctextag = tex.forcesynctextag or tex.force_synctex_tag
+local forcesynctexline = tex.forcesynctexline or tex.force_synctex_line
+local getsynctexline = tex.getsynctexline or tex.get_synctex_line
+local setsynctexmode = tex.setsynctexmode or tex.set_synctex_mode
+
+local foundintree = resolvers.foundintree
+
+local getpagedimensions = layouts.getpagedimensions
+
+local eol = "\010"
+
+----- f_glue = formatters["g%i,%i:%i,%i\010"]
+----- f_glyph = formatters["x%i,%i:%i,%i\010"]
+----- f_kern = formatters["k%i,%i:%i,%i:%i\010"]
+----- f_rule = formatters["r%i,%i:%i,%i:%i,%i,%i\010"]
+----- f_form = formatters["f%i,%i,%i\010"]
+local z_hlist = "[0,0:0,0:0,0,0\010"
+local z_vlist = "(0,0:0,0:0,0,0\010"
+----- z_xform = "<0,0:0,0,0\010" -- or so
+local s_hlist = "]\010"
+local s_vlist = ")\010"
+----- s_xform = ">\010"
+local f_hlist_1 = formatters["h%i,%i:%i,%i:%i,%i,%i\010"]
+local f_hlist_2 = formatters["h%i,%i:%i,%s:%i,%i,%i\010"]
+local f_vlist_1 = formatters["v%i,%i:%i,%i:%i,%i,%i\010"]
+local f_vlist_2 = formatters["v%i,%i:%i,%s:%i,%i,%i\010"]
+
+local synctex = luatex.synctex or { }
+luatex.synctex = synctex
+
+local getpos ; getpos = function() getpos = job.positions.getpos return getpos() end
+
+-- status stuff
+
+local enabled = false
+local paused = 0
+local used = false
+local never = false
+
+-- the file name stuff
+
+local noftags = 0
+local stnums = { }
+local nofblocked = 0
+local blockedfilenames = { }
+local blockedsuffixes = {
+ mkii = true,
+ mkiv = true,
+ mkvi = true,
+ mkxl = true,
+ mklx = true,
+ mkix = true,
+ mkxi = true,
+ -- lfg = true,
+}
+
+local sttags = table.setmetatableindex(function(t,name)
+ if blockedsuffixes[suffixonly(name)] then
+ -- Just so that I don't get the ones on my development tree.
+ nofblocked = nofblocked + 1
+ return 0
+ elseif blockedfilenames[nameonly(name)] then
+ -- So we can block specific files.
+ nofblocked = nofblocked + 1
+ return 0
+ elseif foundintree(name) then
+ -- One shouldn't edit styles etc this way.
+ nofblocked = nofblocked + 1
+ return 0
+ else
+ noftags = noftags + 1
+ t[name] = noftags
+ stnums[noftags] = name
+ return noftags
+ end
+end)
+
+function synctex.blockfilename(name)
+ blockedfilenames[nameonly(name)] = name
+end
+
+function synctex.setfilename(name,line)
+ if paused == 0 and name then
+ forcesynctextag(sttags[name])
+ if line then
+ forcesynctexline(line)
+ end
+ end
+end
+
+function synctex.resetfilename()
+ if paused == 0 then
+ forcesynctextag(0)
+ forcesynctexline(0)
+ end
+end
+
+do
+
+ local nesting = 0
+ local ignored = false
+
+ function synctex.pushline()
+ nesting = nesting + 1
+ if nesting == 1 then
+ local l = getsynctexline()
+ ignored = l and l > 0
+ if not ignored then
+ forcesynctexline(texget("inputlineno"))
+ end
+ end
+ end
+
+ function synctex.popline()
+ if nesting == 1 then
+ if not ignored then
+ forcesynctexline()
+ ignored = false
+ end
+ end
+ nesting = nesting - 1
+ end
+
+end
+
+-- the node stuff
+
+local filehandle = nil
+local nofsheets = 0
+local nofobjects = 0
+local last = 0
+local filesdone = 0
+local tmpfile = false
+local logfile = false
+
+local function writeanchor()
+ local size = filehandle:seek("end")
+ filehandle:write("!",size-last,eol)
+ last = size
+end
+
+local function writefiles()
+ local total = #stnums
+ if filesdone < total then
+ for i=filesdone+1,total do
+ filehandle:write("Input:",i,":",stnums[i],eol)
+ end
+ filesdone = total
+ end
+end
+
+local function makenames()
+ logfile = replacesuffix(tex.jobname,"synctex")
+ tmpfile = replacesuffix(logfile,"syncctx")
+end
+
+local function flushpreamble()
+ makenames()
+ filehandle = openfile(tmpfile,"wb")
+ if filehandle then
+ filehandle:write("SyncTeX Version:1",eol)
+ writefiles()
+ filehandle:write("Output:pdf",eol)
+ filehandle:write("Magnification:1000",eol)
+ filehandle:write("Unit:1",eol)
+ filehandle:write("X Offset:0",eol)
+ filehandle:write("Y Offset:0",eol)
+ filehandle:write("Content:",eol)
+ flushpreamble = function()
+ writefiles()
+ return filehandle
+ end
+ else
+ enabled = false
+ end
+ return filehandle
+end
+
+function synctex.wrapup()
+ if tmpfile then
+ renamefile(tmpfile,logfile)
+ tmpfile = nil
+ end
+end
+
+local function flushpostamble()
+ if not filehandle then
+ return
+ end
+ writeanchor()
+ filehandle:write("Postamble:",eol)
+ filehandle:write("Count:",nofobjects,eol)
+ writeanchor()
+ filehandle:write("Post scriptum:",eol)
+ filehandle:close()
+ enabled = false
+end
+
+local x_hlist do
+
+ local function doaction_1(t,l,w,h,d)
+ local pagewidth, pageheight = getpagedimensions()
+ local x, y = getpos()
+ filehandle:write(f_hlist_1(t,l,x,pageheight-y,w,h,d))
+ nofobjects = nofobjects + 1
+ end
+
+ local lasty = false
+
+ local function doaction_2(t,l,w,h,d)
+ local pagewidth, pageheight = getpagedimensions()
+ local x, y = getpos()
+ y = pageheight - y
+ filehandle:write(f_hlist_2(t,l,x,y == lasty and "=" or y,w,h,d))
+ lasty = y
+ nofobjects = nofobjects + 1
+ end
+
+ local doaction = doaction_1
+
+ x_hlist = function(head,current,t,l,w,h,d)
+ if filehandle then
+ return insert_before(head,current,new_latelua(function() doaction(t,l,w,h,d) end))
+ else
+ return head
+ end
+ end
+
+ directives.register("system.synctex.compression", function(v)
+ doaction = tonumber(v) == 2 and doaction_2 or doaction_1
+ end)
+
+end
+
+-- color is already handled so no colors
+
+local collect = nil
+local fulltrace = false
+local trace = false
+local height = 10 * 65536
+local depth = 5 * 65536
+local traceheight = 32768
+local tracedepth = 32768
+
+trackers.register("system.synctex.visualize", function(v)
+ trace = v
+ fulltrace = v == "real"
+end)
+
+local function inject(head,first,last,tag,line)
+ local w, h, d = getdimensions(first,getnext(last))
+ if h < height then
+ h = height
+ end
+ if d < depth then
+ d = depth
+ end
+ if trace then
+ head = insert_before(head,first,new_rule(w,fulltrace and h or traceheight,fulltrace and d or tracedepth))
+ head = insert_before(head,first,new_kern(-w))
+ end
+ head = x_hlist(head,first,tag,line,w,h,d)
+ return head
+end
+
+local function collect_min(head)
+ local current = head
+ while current do
+ local id = getid(current)
+ if id == glyph_code then
+ local first = current
+ local last = current
+ local tag = 0
+ local line = 0
+ while true do
+ if id == glyph_code then
+ local tc, lc = getsynctexfields(current)
+ if tc and tc > 0 then
+ tag = tc
+ line = lc
+ end
+ last = current
+ elseif id == disc_code or (id == kern_code and getsubtype(current) == fontkern_code) then
+ last = current
+ else
+ if tag > 0 then
+ head = inject(head,first,last,tag,line)
+ end
+ break
+ end
+ current = getnext(current)
+ if current then
+ id = getid(current)
+ else
+ if tag > 0 then
+ head = inject(head,first,last,tag,line)
+ end
+ return head
+ end
+ end
+ end
+ -- pick up (as id can have changed)
+ if id == hlist_code or id == vlist_code then
+ local list = getlist(current)
+ if list then
+ local l = collect(list)
+ if l ~= list then
+ setlist(current,l)
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ return head
+end
+
+local function inject(parent,head,first,last,tag,line)
+ local w, h, d = getrangedimensions(parent,first,getnext(last))
+ if h < height then
+ h = height
+ end
+ if d < depth then
+ d = depth
+ end
+ if trace then
+ head = insert_before(head,first,new_rule(w,fulltrace and h or traceheight,fulltrace and d or tracedepth))
+ head = insert_before(head,first,new_kern(-w))
+ end
+ head = x_hlist(head,first,tag,line,w,h,d)
+ return head
+end
+
+local function collect_max(head,parent)
+ local current = head
+ while current do
+ local id = getid(current)
+ if id == glyph_code then
+ local first = current
+ local last = current
+ local tag = 0
+ local line = 0
+ while true do
+ if id == glyph_code then
+ local tc, lc = getsynctexfields(current)
+ if tc and tc > 0 then
+ if tag > 0 and (tag ~= tc or line ~= lc) then
+ head = inject(parent,head,first,last,tag,line)
+ first = current
+ end
+ tag = tc
+ line = lc
+ last = current
+ else
+ if tag > 0 then
+ head = inject(parent,head,first,last,tag,line)
+ tag = 0
+ end
+ first = nil
+ last = nil
+ end
+ elseif id == disc_code then
+ if not first then
+ first = current
+ end
+ last = current
+ elseif id == kern_code and getsubtype(current) == fontkern_code then
+ if first then
+ last = current
+ end
+ elseif id == glue_code then
+ if tag > 0 then
+ local tc, lc = getsynctexfields(current)
+ if tc and tc > 0 then
+ if tag ~= tc or line ~= lc then
+ head = inject(parent,head,first,last,tag,line)
+ tag = 0
+ break
+ end
+ else
+ head = inject(parent,head,first,last,tag,line)
+ tag = 0
+ break
+ end
+ else
+ tag = 0
+ break
+ end
+ id = nil -- so no test later on
+ elseif id == penalty_code then
+ -- go on (and be nice for math)
+ else
+ if tag > 0 then
+ head = inject(parent,head,first,last,tag,line)
+ tag = 0
+ end
+ break
+ end
+ current = getnext(current)
+ if current then
+ id = getid(current)
+ else
+ if tag > 0 then
+ head = inject(parent,head,first,last,tag,line)
+ end
+ return head
+ end
+ end
+ end
+ -- pick up (as id can have changed)
+ if id == hlist_code or id == vlist_code then
+ local list = getlist(current)
+ if list then
+ local l = collect(list,current)
+ if l and l ~= list then
+ setlist(current,l)
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ return head
+end
+
+collect = collect_max
+
+function synctex.collect(head,where)
+ if enabled and where ~= "object" then
+ return collect(head,head)
+ else
+ return head
+ end
+end
+
+-- also no solution for bad first file resolving in sumatra
+
+function synctex.start()
+ if enabled then
+ nofsheets = nofsheets + 1 -- could be realpageno
+ if flushpreamble() then
+ writeanchor()
+ filehandle:write("{",nofsheets,eol)
+ -- this seems to work:
+ local pagewidth, pageheight = getpagedimensions()
+ filehandle:write(z_hlist)
+ filehandle:write(f_vlist_1(0,0,0,pageheight,pagewidth,pageheight,0))
+ end
+ end
+end
+
+function synctex.stop()
+ if enabled then
+ -- filehandle:write(s_vlist,s_hlist)
+ filehandle:write(s_hlist)
+ writeanchor()
+ filehandle:write("}",nofsheets,eol)
+ nofobjects = nofobjects + 2
+ end
+end
+
+local enablers = { }
+local disablers = { }
+
+function synctex.registerenabler(f)
+ enablers[#enablers+1] = f
+end
+
+function synctex.registerdisabler(f)
+ disablers[#disablers+1] = f
+end
+
+function synctex.enable()
+ if not never and not enabled then
+ enabled = true
+ setsynctexmode(3) -- we want details
+ if not used then
+ nodes.tasks.enableaction("shipouts","luatex.synctex.collect")
+ report_system("synctex functionality is enabled, expect 5-10 pct runtime overhead!")
+ used = true
+ end
+ for i=1,#enablers do
+ enablers[i](true)
+ end
+ end
+end
+
+function synctex.disable()
+ if enabled then
+ setsynctexmode(0)
+ report_system("synctex functionality is disabled!")
+ enabled = false
+ for i=1,#disablers do
+ disablers[i](false)
+ end
+ end
+end
+
+function synctex.finish()
+ if enabled then
+ flushpostamble()
+ else
+ makenames()
+ removefile(logfile)
+ removefile(tmpfile)
+ end
+end
+
+local filename = nil
+
+function synctex.pause()
+ paused = paused + 1
+ if enabled and paused == 1 then
+ setsynctexmode(0)
+ end
+end
+
+function synctex.resume()
+ if enabled and paused == 1 then
+ setsynctexmode(3)
+ end
+ paused = paused - 1
+end
+
+-- not the best place
+
+luatex.registerstopactions(synctex.finish)
+
+statistics.register("synctex tracing",function()
+ if used then
+ return string.format("%i referenced files, %i files ignored, %i objects flushed, logfile: %s",
+ noftags,nofblocked,nofobjects,logfile)
+ end
+end)
+
+local implement = interfaces.implement
+local variables = interfaces.variables
+
+function synctex.setup(t)
+ if t.state == variables.never then
+ synctex.disable() -- just in case
+ never = true
+ return
+ end
+ if t.method == variables.max then
+ collect = collect_max
+ else
+ collect = collect_min
+ end
+ if t.state == variables.start then
+ synctex.enable()
+ else
+ synctex.disable()
+ end
+end
+
+implement {
+ name = "synctexblockfilename",
+ arguments = "string",
+ actions = synctex.blockfilename,
+}
+
+implement {
+ name = "synctexsetfilename",
+ arguments = "string",
+ actions = synctex.setfilename,
+}
+
+implement {
+ name = "synctexresetfilename",
+ actions = synctex.resetfilename,
+}
+
+implement {
+ name = "setupsynctex",
+ actions = synctex.setup,
+ arguments = {
+ {
+ { "state" },
+ { "method" },
+ },
+ },
+}
+
+implement {
+ name = "synctexpause",
+ actions = synctex.pause,
+}
+
+implement {
+ name = "synctexresume",
+ actions = synctex.resume,
+}
+
+implement {
+ name = "synctexpushline",
+ actions = synctex.pushline,
+}
+
+implement {
+ name = "synctexpopline",
+ actions = synctex.popline,
+}
+
+implement {
+ name = "synctexdisable",
+ actions = synctex.disable,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-tex.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-tex.lmt
new file mode 100644
index 00000000000..aae084740dc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-tex.lmt
@@ -0,0 +1,39 @@
+if not modules then modules = { } end modules ['node-tex'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+builders = builders or { }
+local kernel = builders.kernel or { }
+builders.kernel = kernel
+
+local nuts = nodes.nuts
+
+local hyphenate = language.hyphenate
+
+local hyphenating = nuts.hyphenating
+local ligaturing = nuts.ligaturing
+local kerning = nuts.kerning
+
+function kernel.hyphenation(head)
+ return (hyphenate(head)) -- nodes !
+end
+
+function kernel.hyphenating(head)
+ return (hyphenating(head))
+end
+
+function kernel.ligaturing(head)
+ return (ligaturing(head))
+end
+
+function kernel.kerning(head)
+ return (kerning(head))
+end
+
+callbacks.register('hyphenate' , false, "normal hyphenation routine, called elsewhere")
+callbacks.register('ligaturing', false, "normal ligaturing routine, called elsewhere")
+callbacks.register('kerning' , false, "normal kerning routine, called elsewhere")
diff --git a/Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt b/Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt
new file mode 100644
index 00000000000..6060522bec4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/node-tra.lmt
@@ -0,0 +1,739 @@
+if not modules then modules = { } end modules ['node-tra'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+--[[ldx--
+<p>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 next = next
+local utfchar = utf.char
+local format, match, gmatch, concat, rep = string.format, string.match, string.gmatch, table.concat, string.rep
+local lpegmatch = lpeg.match
+local clock = os.gettimeofday or os.clock -- should go in environment
+
+local report_nodes = logs.reporter("nodes","tracing")
+
+local nodes, node, context = nodes, node, context
+
+local texgetattribute = tex.getattribute
+
+local tracers = nodes.tracers or { }
+nodes.tracers = tracers
+
+local tasks = nodes.tasks or { }
+nodes.tasks = tasks
+
+local handlers = nodes.handlers or {}
+nodes.handlers = handlers
+
+local injections = nodes.injections or { }
+nodes.injections = injections
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local getdisc = nuts.getdisc
+local setattr = nuts.setattr
+local setattrs = nuts.setattrs
+local getglue = nuts.getglue
+local isglyph = nuts.isglyph
+local getdirection = nuts.getdirection
+local getwidth = nuts.getwidth
+
+local flush_list = nuts.flush_list
+local count_nodes = nuts.countall
+local used_nodes = nuts.usedlist
+
+local nextnode = nuts.traversers.node
+local nextglyph = nuts.traversers.glyph
+
+local shownodes = nuts.show
+
+local d_tostring = nuts.tostring
+
+local nutpool = nuts.pool
+local new_rule = nutpool.rule
+
+local nodecodes = nodes.nodecodes
+local whatsitcodes = nodes.whatsitcodes
+local fillcodes = nodes.fillcodes
+
+local subtypes = nodes.subtypes
+
+local glyph_code = nodecodes.glyph
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local disc_code = nodecodes.disc
+local glue_code = nodecodes.glue
+local kern_code = nodecodes.kern
+local rule_code = nodecodes.rule
+local dir_code = nodecodes.dir
+local par_code = nodecodes.par
+local whatsit_code = nodecodes.whatsit
+
+local dimenfactors = number.dimenfactors
+local formatters = string.formatters
+
+local start_of_par = nuts.start_of_par
+
+-- this will be reorganized:
+
+function nodes.showlist(head, message)
+ if message then
+ report_nodes(message)
+ end
+ for n in nextnode, tonut(head) do
+ report_nodes(d_tostring(n))
+ end
+end
+
+function nodes.handlers.checkglyphs(head,message)
+ local h = tonut(head) -- tonut needed?
+ local t = { }
+ local n = 0
+ local f = formatters["%U:%s"]
+ for g, char, font in nextglyph, h do
+ n = n + 1
+ t[n] = f(char,getsubtype(g))
+ end
+ if n == 0 then
+ -- nothing to report
+ elseif message and message ~= "" then
+ report_nodes("%s, %s glyphs: % t",message,n,t)
+ else
+ report_nodes("%s glyphs: % t",n,t)
+ end
+ return false
+end
+
+local fontcharacters -- = fonts.hashes.descriptions
+
+local function tosequence(start,stop,compact)
+ if start then
+ if not fontcharacters then
+ fontcharacters = fonts.hashes.descriptions
+ if not fontcharacters then
+ return "[no char data]"
+ end
+ end
+ local f_sequence = formatters["U+%04X:%s"]
+ local f_subrange = formatters["[[ %s ][ %s ][ %s ]]"]
+ start = tonut(start)
+ stop = stop and tonut(stop)
+ local t = { }
+ local n = 0
+ while start do
+ local c, id = isglyph(start)
+ if c then
+ local u = fontcharacters[id][c] -- id == font id
+ u = u and u.unicode or c
+ if type(u) == "table" then
+ local tt = { }
+ for i=1,#u do
+ local c = u[i]
+ tt[i] = compact and utfchar(c) or f_sequence(c,utfchar(c))
+ end
+ n = n + 1 ; t[n] = "(" .. concat(tt," ") .. ")"
+ else
+ n = n + 1 ; t[n] = compact and utfchar(c) or f_sequence(c,utfchar(c))
+ end
+ elseif id == disc_code then
+ local pre, post, replace = getdisc(start)
+ t[#t+1] = f_subrange(pre and tosequence(pre),post and tosequence(post),replace and tosequence(replace))
+ elseif id == rule_code then
+ n = n + 1 ; t[n] = compact and "|" or nodecodes[id] or "?"
+ elseif id == dir_code then
+ local d, p = getdirection(start)
+ n = n + 1 ; t[n] = "[<" .. (p and "-" or "+") .. d .. ">]" -- todo l2r etc
+ elseif id == par_code and start_of_par(current) then
+ n = n + 1 ; t[n] = "[<" .. getdirection(start) .. ">]" -- todo l2r etc
+ elseif compact then
+ n = n + 1 ; t[n] = "[]"
+ else
+ n = n + 1 ; t[n] = nodecodes[id]
+ end
+ if start == stop then
+ break
+ else
+ start = getnext(start)
+ end
+ end
+ if compact then
+ return concat(t)
+ else
+ return concat(t," ")
+ end
+ else
+ return "[empty]"
+ end
+end
+
+nodes.tosequence = tosequence
+nuts .tosequence = tosequence
+
+function nodes.report(t)
+ report_nodes("output %a, %s nodes",tex.getoutputactive(),count_nodes(t))
+end
+
+function nodes.packlist(head)
+ local t = { }
+ for n in nextnode, tonut(head) do
+ t[#t+1] = d_tostring(n)
+ end
+ return t
+end
+
+function nodes.idstostring(head,tail)
+ head = tonut(head)
+ tail = tail and tonut(tail)
+ local t = { }
+ local last_id = nil
+ local last_n = 0
+ local f_two = formatters["[%s*%s]"]
+ local f_one = formatters["[%s]"]
+ for n, id, subtype in nextnode, head do
+ if id == whatsit_code then
+ id = whatsitcodes[subtype]
+ else
+ id = nodecodes[id]
+ end
+ if not last_id then
+ last_id = id
+ last_n = 1
+ elseif last_id == id then
+ last_n = last_n + 1
+ else
+ if last_n > 1 then
+ t[#t+1] = f_two(last_n,last_id)
+ else
+ t[#t+1] = f_one(last_id)
+ end
+ last_id = id
+ last_n = 1
+ end
+ if n == tail then
+ break
+ end
+ end
+ if not last_id then
+ t[#t+1] = "no nodes"
+ else
+ if last_n > 1 then
+ t[#t+1] = f_two(last_n,last_id)
+ else
+ t[#t+1] = f_one(last_id)
+ end
+ end
+ return concat(t," ")
+end
+
+function nodes.idsandsubtypes(head)
+ local h = tonut(head)
+ local t = { }
+ local f = formatters["%s:%s"]
+ for n, id, subtype in nextnode, h do
+ local c = nodecodes[id]
+ if subtype then
+ t[#t+1] = f(c,subtypes[id][subtype])
+ else
+ t[#t+1] = c
+ end
+ end
+ return concat(t, " ")
+end
+
+-- function nodes.xidstostring(head,tail) -- only for special tracing of backlinks
+-- head = tonut(head)
+-- tail = tonut(tail)
+-- local n = head
+-- while n.next do
+-- n = n.next
+-- end
+-- local t, last_id, last_n = { }, nil, 0
+-- while n do
+-- local id = n.id
+-- if not last_id then
+-- last_id, last_n = id, 1
+-- elseif last_id == id then
+-- last_n = last_n + 1
+-- else
+-- if last_n > 1 then
+-- t[#t+1] = formatters["[%s*%s]"](last_n,nodecodes[last_id] or "?")
+-- else
+-- t[#t+1] = formatters["[%s]"](nodecodes[last_id] or "?")
+-- end
+-- last_id, last_n = id, 1
+-- end
+-- if n == head then
+-- break
+-- end
+-- n = getprev(n)
+-- end
+-- if not last_id then
+-- t[#t+1] = "no nodes"
+-- elseif last_n > 1 then
+-- t[#t+1] = formatters["[%s*%s]"](last_n,nodecodes[last_id] or "?")
+-- else
+-- t[#t+1] = formatters["[%s]"](nodecodes[last_id] or "?")
+-- end
+-- return table.concat(table.reversed(t)," ")
+-- end
+
+local function showsimplelist(h,depth,n)
+ h = h and tonut(h)
+ while h do
+ report_nodes("% w%s",n,d_tostring(h))
+ if not depth or n < depth then
+ local id = getid(h)
+ if id == hlist_code or id == vlist_code then
+ showsimplelist(getlist(h),depth,n+1)
+ end
+ end
+ h = getnext(h)
+ end
+end
+
+nodes.showsimplelist = function(h,depth) showsimplelist(h,depth,0) end
+
+local function listtoutf(h,joiner,textonly,last,nodisc)
+ local w = { }
+ local n = 0
+ local g = formatters["<%i>"]
+ local d = formatters["[%s|%s|%s]"]
+ while h do
+ local c, id = isglyph(h)
+ if c then
+ n = n + 1 ; w[n] = c >= 0 and utfchar(c) or g(c)
+ if joiner then
+ n = n + 1 ; w[n] = joiner
+ end
+ elseif id == disc_code then
+ local pre, pos, rep = getdisc(h)
+ if not nodisc then
+ n = n + 1 ; w[n] = d(
+ pre and listtoutf(pre,joiner,textonly) or "",
+ pos and listtoutf(pos,joiner,textonly) or "",
+ rep and listtoutf(rep,joiner,textonly) or ""
+ )
+ elseif rep then
+ n = n + 1 ; w[n] = listtoutf(rep,joiner,textonly) or ""
+ end
+ if joiner then
+ n = n + 1 ; w[n] = joiner
+ end
+ elseif textonly then
+ if id == glue_code then
+ if getwidth(h) > 0 then
+ n = n + 1 ; w[n] = " "
+ end
+ elseif id == hlist_code or id == vlist_code then
+ n = n + 1 ; w[n] = "["
+ n = n + 1 ; w[n] = listtoutf(getlist(h),joiner,textonly,last,nodisc)
+ n = n + 1 ; w[n] = "]"
+ end
+ else
+ n = n + 1 ; w[n] = "[-]"
+ end
+ if h == last then
+ break
+ else
+ h = getnext(h)
+ end
+ end
+ return concat(w,"",1,(w[n] == joiner) and (n-1) or n)
+end
+
+function nodes.listtoutf(h,joiner,textonly,last,nodisc)
+ if h then
+ local joiner = joiner == true and utfchar(0x200C) or joiner -- zwnj
+ return listtoutf(tonut(h),joiner,textonly,last and tonut(last),nodisc)
+ else
+ return ""
+ end
+end
+
+local what = { [0] = "unknown", "line", "box", "indent", "row", "cell" }
+
+local function showboxes(n,symbol,depth)
+ depth = depth or 0
+ symbol = symbol or "."
+ for n, id, subtype in nextnode, tonut(n) do
+ if id == hlist_code or id == vlist_code then
+ report_nodes(rep(symbol,depth) .. what[subtype] or subtype)
+ showboxes(getlist(n),symbol,depth+1)
+ end
+ end
+end
+
+nodes.showboxes = showboxes
+
+local ptfactor = dimenfactors.pt
+local bpfactor = dimenfactors.bp
+local stripper = lpeg.patterns.stripzeros
+
+local f_f_f = formatters["%0.5Fpt plus %0.5F%s minus %0.5F%s"]
+local f_f_m = formatters["%0.5Fpt plus %0.5F%s minus %0.5Fpt"]
+local f_p_f = formatters["%0.5Fpt plus %0.5Fpt minus %0.5F%s"]
+local f_p_m = formatters["%0.5Fpt plus %0.5Fpt minus %0.5Fpt"]
+local f_f_z = formatters["%0.5Fpt plus %0.5F%s"]
+local f_p_z = formatters["%0.5Fpt plus %0.5Fpt"]
+local f_z_f = formatters["%0.5Fpt minus %0.5F%s"]
+local f_z_m = formatters["%0.5Fpt minus %0.5Fpt"]
+local f_z_z = formatters["%0.5Fpt"]
+
+local tonut = nodes.tonut
+
+local function nodetodimen(n)
+ n = tonut(n)
+ local id = getid(n)
+ if id == kern_code then
+ local width = getwidth(n)
+ if width == 0 then
+ return "0pt"
+ else
+ return f_z_z(width)
+ end
+ elseif id ~= glue_code then
+ return "0pt"
+ end
+ local width, stretch, shrink, stretch_order, shrink_order = getglue(n)
+ stretch = stretch / 65536
+ shrink = shrink / 65536
+ width = width / 65536
+ if stretch_order ~= 0 then
+ if shrink_order ~= 0 then
+ return f_f_f(width,stretch,fillcodes[stretch_order],shrink,fillcodes[shrink_order])
+ elseif shrink ~= 0 then
+ return f_f_m(width,stretch,fillcodes[stretch_order],shrink)
+ else
+ return f_f_z(width,stretch,fillcodes[stretch_order])
+ end
+ elseif shrink_order ~= 0 then
+ if stretch ~= 0 then
+ return f_p_f(width,stretch,shrink,fillcodes[shrink_order])
+ else
+ return f_z_f(width,shrink,fillcodes[shrink_order])
+ end
+ elseif stretch ~= 0 then
+ if shrink ~= 0 then
+ return f_p_m(width,stretch,shrink)
+ else
+ return f_p_z(width,stretch)
+ end
+ elseif shrink ~= 0 then
+ return f_z_m(width,shrink)
+ elseif width == 0 then
+ return "0pt"
+ else
+ return f_z_z(width)
+ end
+end
+
+
+-- number.todimen(123)
+-- number.todimen(123,"cm")
+-- number.todimen(123,false,"%F))
+
+local f_pt = formatters["%p"]
+local f_un = formatters["%F%s"]
+
+dimenfactors[""] = dimenfactors.pt
+
+local function numbertodimen(d,unit,fmt)
+ if not d or d == 0 then
+ if fmt then
+ return formatters[fmt](0,unit or "pt")
+ elseif unit then
+ return 0 .. unit
+ else
+ return "0pt"
+ end
+ elseif fmt then
+ if not unit then
+ unit = "pt"
+ end
+ return formatters[fmt](d*dimenfactors[unit],unit)
+ elseif not unit or unit == "pt" then
+ return f_pt(d)
+ else
+ return f_un(d*dimenfactors[unit],unit)
+ end
+end
+
+number.todimen = numbertodimen
+nodes .todimen = nodetodimen
+
+function number.topoints (n,fmt) return numbertodimen(n,"pt",fmt) end
+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
+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
+function number.todidots (n,fmt) return numbertodimen(n,"dd",fmt) end
+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 nodes.topoints (n,fmt) return nodetodimen(n,"pt",fmt) end
+function nodes.toinches (n,fmt) return nodetodimen(n,"in",fmt) end
+function nodes.tocentimeters (n,fmt) return nodetodimen(n,"cm",fmt) end
+function nodes.tomillimeters (n,fmt) return nodetodimen(n,"mm",fmt) end
+function nodes.toscaledpoints(n,fmt) return nodetodimen(n,"sp",fmt) end
+function nodes.toscaledpoints(n) return n .. "sp" end
+function nodes.tobasepoints (n,fmt) return nodetodimen(n,"bp",fmt) end
+function nodes.topicas (n,fmt) return nodetodimen(n "pc",fmt) end
+function nodes.todidots (n,fmt) return nodetodimen(n,"dd",fmt) end
+function nodes.tociceros (n,fmt) return nodetodimen(n,"cc",fmt) end
+-------- nodes.tonewdidots (n,fmt) return nodetodimen(n,"nd",fmt) end
+-------- nodes.tonewciceros (n,fmt) return nodetodimen(n,"nc",fmt) end
+
+-- stop redefinition
+
+local points = function(n)
+ if not n or n == 0 then
+ return "0pt"
+ elseif type(n) == "number" then
+ return lpegmatch(stripper,format("%.5fpt",n*ptfactor)) -- faster than formatter
+ else
+ return numbertodimen(n,"pt") -- also deals with nodes
+ end
+end
+
+local basepoints = function(n)
+ if not n or n == 0 then
+ return "0bp"
+ elseif type(n) == "number" then
+ return lpegmatch(stripper,format("%.5fbp",n*bpfactor)) -- faster than formatter
+ else
+ return numbertodimen(n,"bp") -- also deals with nodes
+ end
+end
+
+local pts = function(n)
+ if not n or n == 0 then
+ return "0pt"
+ elseif type(n) == "number" then
+ return format("%.5fpt",n*ptfactor) -- faster than formatter
+ else
+ return numbertodimen(n,"pt") -- also deals with nodes
+ end
+end
+
+local nopts = function(n)
+ if not n or n == 0 then
+ return "0"
+ else
+ return format("%.5f",n*ptfactor) -- faster than formatter
+ end
+end
+
+number.points = points
+number.basepoints = basepoints
+number.pts = pts
+number.nopts = nopts
+
+nodes.points = function(n) return numbertodimen(n,"pt") end
+nodes.basepoints = function(n) return numbertodimen(n,"bp") end
+nodes.pts = function(n) return numbertodimen(n,"pt") end
+nodes.nopts = function(n) return format("%.5f",n*ptfactor) end
+
+local colors = { }
+tracers.colors = colors
+
+local unsetvalue = attributes.unsetvalue
+
+local a_color = attributes.private('color')
+local a_colormodel = attributes.private('colormodel')
+local m_color = attributes.list[a_color] or { }
+
+function colors.set(n,c,s,t) -- also unsets !
+ local mc = m_color[c]
+ local nn = tonut(n)
+ if mc then
+ local mm = s or texgetattribute(a_colormodel)
+ if mm <= 0 then
+ mm = 1
+ end
+ -- only here t is dealt with
+ if t then
+ setattrs(nn,a_colormodel,mm,a_color,mc,a_transparency,m_transparency[t] or unsetvalue)
+ else
+ setattrs(nn,a_colormodel,mm,a_color,mc)
+ end
+ else
+ setattr(nn,a_color,unsetvalue)
+ end
+ return n
+end
+
+function colors.setlist(n,c,s,t)
+ local nn = tonut(n)
+ local mc = m_color[c] or unsetvalue
+ local mm = s or texgetattribute(a_colormodel)
+ if mm <= 0 then
+ mm = 1
+ end
+ if t then
+ t = m_transparency[t] or unsetvalue
+ while nn do
+ setattrs(nn,a_colormodel,mm,a_color,mc,a_transparency,t)
+ nn = getnext(nn)
+ end
+ else
+ while nn do
+ setattrs(nn,a_colormodel,mm,a_color,mc)
+ nn = getnext(nn)
+ end
+ end
+ return n
+end
+
+function colors.reset(n)
+ setattr(tonut(n),a_color,unsetvalue)
+ return n
+end
+
+-- maybe
+
+local transparencies = { }
+tracers.transparencies = transparencies
+
+local a_transparency = attributes.private('transparency')
+local m_transparency = attributes.list[a_transparency] or { }
+
+function transparencies.set(n,t)
+ setattr(tonut(n),a_transparency,m_transparency[t] or unsetvalue)
+ return n
+end
+
+function transparencies.setlist(n,c,s)
+ local nn = tonut(n)
+ local mt = m_transparency[c] or unsetvalue
+ while nn do
+ setattr(nn,a_transparency,mt)
+ nn = getnext(nn)
+ end
+ return n
+end
+
+function transparencies.reset(n)
+ setattr(n,a_transparency,unsetvalue)
+ return n
+end
+
+-- for the moment here
+
+local visualizers = nodes.visualizers or { }
+nodes.visualizers = visualizers
+
+function visualizers.handler(head)
+ return head, false
+end
+
+-- we could cache attribute lists and set attr (copy will increment count) .. todo ..
+-- although tracers are used seldom
+
+local function setproperties(n,c,s)
+ local nn = tonut(n)
+ local mm = texgetattribute(a_colormodel)
+ setattr(nn,a_colormodel,mm > 0 and mm or 1)
+ setattr(nn,a_color,m_color[c])
+ setattr(nn,a_transparency,m_transparency[c])
+ return n
+end
+
+tracers.setproperties = setproperties
+
+-- setting attrlist entries instead of attr for successive entries doesn't
+-- speed up much (this function is only used in tracers anyway)
+
+function tracers.setlist(n,c,s)
+ local nn = tonut(n)
+ local mc = m_color[c]
+ local mt = m_transparency[c]
+ local mm = texgetattribute(a_colormodel)
+ if mm <= 0 then
+ mm = 1
+ end
+ while nn do
+ setattr(nn,a_colormodel,mm)
+ setattr(nn,a_color,mc)
+ setattr(nn,a_transparency,mt)
+ nn = getnext(nn)
+ end
+ return n
+end
+
+function tracers.resetproperties(n)
+ local nn = tonut(n)
+ setattr(nn,a_color,unsetvalue)
+ setattr(nn,a_transparency,unsetvalue)
+ return n
+end
+
+-- this one returns a nut
+
+local nodestracerpool = { }
+local nutstracerpool = { }
+
+tracers.pool = {
+ nodes = nodestracerpool,
+ nuts = nutstracerpool,
+}
+
+table.setmetatableindex(nodestracerpool,function(t,k,v)
+ local f = nutstracerpool[k]
+ local v = function(...)
+ return tonode(f(...))
+ end
+ t[k] = v
+ return v
+end)
+
+function nutstracerpool.rule(w,h,d,c,s)
+ return setproperties(new_rule(w,h,d),c,s)
+end
+
+tracers.rule = nodestracerpool.rule -- for a while
+
+-- local function show(head,n,message)
+-- print("START",message or "")
+-- local i = 0
+-- for current in traverse(head) do
+-- local prev = getprev(current)
+-- local next = getnext(current)
+-- i = i + 1
+-- print(i, prev and nodecodes[getid(prev)],nodecodes[getid(current)],next and nodecodes[getid(next)])
+-- if i == n then
+-- break
+-- end
+-- end
+-- print("STOP", message or "")
+-- end
+
+function nodes.handlers.show(n)
+ if n then
+ shownodes(tonut(n))
+ else
+ -- maybe a message
+ end
+ return n
+end
+
+trackers.register("fonts.result.show", function(v)
+ nodes.tasks.setaction("processors","nodes.handlers.show",v)
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/norm-ctx.mkxl b/Master/texmf-dist/tex/context/base/mkxl/norm-ctx.mkxl
new file mode 100644
index 00000000000..5cee04935b6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/norm-ctx.mkxl
@@ -0,0 +1,87 @@
+%D \module
+%D [ file=norm-ctx,
+%D version=2009.03.19,
+%D title=\CONTEXT\ Normal Macros,
+%D subtitle=\CONTEXT,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D A few more might end up here (like the weird ones in syst-ini).
+
+\let\normalreqno\normaleqno
+
+% more friendly in setups:
+
+\aliased\let\ordordspacing \Umathordordspacing
+\aliased\let\ordopspacing \Umathordopspacing
+\aliased\let\ordbinspacing \Umathordbinspacing
+\aliased\let\ordrelspacing \Umathordrelspacing
+\aliased\let\ordopenspacing \Umathordopenspacing
+\aliased\let\ordclosespacing \Umathordclosespacing
+\aliased\let\ordpunctspacing \Umathordpunctspacing
+\aliased\let\ordinnerspacing \Umathordinnerspacing
+\aliased\let\opordspacing \Umathopordspacing
+\aliased\let\opopspacing \Umathopopspacing
+\aliased\let\opbinspacing \Umathopbinspacing
+\aliased\let\oprelspacing \Umathoprelspacing
+\aliased\let\opopenspacing \Umathopopenspacing
+\aliased\let\opclosespacing \Umathopclosespacing
+\aliased\let\oppunctspacing \Umathoppunctspacing
+\aliased\let\opinnerspacing \Umathopinnerspacing
+\aliased\let\binordspacing \Umathbinordspacing
+\aliased\let\binopspacing \Umathbinopspacing
+\aliased\let\binbinspacing \Umathbinbinspacing
+\aliased\let\binrelspacing \Umathbinrelspacing
+\aliased\let\binopenspacing \Umathbinopenspacing
+\aliased\let\binclosespacing \Umathbinclosespacing
+\aliased\let\binpunctspacing \Umathbinpunctspacing
+\aliased\let\bininnerspacing \Umathbininnerspacing
+\aliased\let\relordspacing \Umathrelordspacing
+\aliased\let\relopspacing \Umathrelopspacing
+\aliased\let\relbinspacing \Umathrelbinspacing
+\aliased\let\relrelspacing \Umathrelrelspacing
+\aliased\let\relopenspacing \Umathrelopenspacing
+\aliased\let\relclosespacing \Umathrelclosespacing
+\aliased\let\relpunctspacing \Umathrelpunctspacing
+\aliased\let\relinnerspacing \Umathrelinnerspacing
+\aliased\let\openordspacing \Umathopenordspacing
+\aliased\let\openopspacing \Umathopenopspacing
+\aliased\let\openbinspacing \Umathopenbinspacing
+\aliased\let\openrelspacing \Umathopenrelspacing
+\aliased\let\openopenspacing \Umathopenopenspacing
+\aliased\let\openclosespacing \Umathopenclosespacing
+\aliased\let\openpunctspacing \Umathopenpunctspacing
+\aliased\let\openinnerspacing \Umathopeninnerspacing
+\aliased\let\closeordspacing \Umathcloseordspacing
+\aliased\let\closeopspacing \Umathcloseopspacing
+\aliased\let\closebinspacing \Umathclosebinspacing
+\aliased\let\closerelspacing \Umathcloserelspacing
+\aliased\let\closeopenspacing \Umathcloseopenspacing
+\aliased\let\closeclosespacing\Umathcloseclosespacing
+\aliased\let\closepunctspacing\Umathclosepunctspacing
+\aliased\let\closeinnerspacing\Umathcloseinnerspacing
+\aliased\let\punctordspacing \Umathpunctordspacing
+\aliased\let\punctopspacing \Umathpunctopspacing
+\aliased\let\punctbinspacing \Umathpunctbinspacing
+\aliased\let\punctrelspacing \Umathpunctrelspacing
+\aliased\let\punctopenspacing \Umathpunctopenspacing
+\aliased\let\punctclosespacing\Umathpunctclosespacing
+\aliased\let\punctpunctspacing\Umathpunctpunctspacing
+\aliased\let\punctinnerspacing\Umathpunctinnerspacing
+\aliased\let\innerordspacing \Umathinnerordspacing
+\aliased\let\inneropspacing \Umathinneropspacing
+\aliased\let\innerbinspacing \Umathinnerbinspacing
+\aliased\let\innerrelspacing \Umathinnerrelspacing
+\aliased\let\inneropenspacing \Umathinneropenspacing
+\aliased\let\innerclosespacing\Umathinnerclosespacing
+\aliased\let\innerpunctspacing\Umathinnerpunctspacing
+\aliased\let\innerinnerspacing\Umathinnerinnerspacing
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-bar.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-bar.mkxl
new file mode 100644
index 00000000000..c6a11153165
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-bar.mkxl
@@ -0,0 +1,94 @@
+%D \module
+%D [ file=pack-bar,
+%D version=2009.06.26,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=Bars,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / Bars}
+
+
+\unprotect
+
+%D This code has been moved from scrn-int to here (was some old experimental code).
+%D It could be in scrn-bar but it's static. In the meantime the interface has been
+%D adapted to a key|/|value one.
+%D
+%D \startbuffer
+%D \dorecurse{10}{
+%D \ruledhbox{\horizontalpositionbar[n=#1,min=1,max=10,text=!,color=red]}
+%D \par
+%D }
+%D \stopbuffer
+%D
+%D \typebuffer \stoplinecorrection \getbuffer \stoplinecorrection
+%D
+%D \startbuffer
+%D \dorecurse{10}{
+%D \ruledhbox{\horizontalgrowingbar[n=#1,min=1,max=10,text=!,color=red]}
+%D \par
+%D }
+%D \stopbuffer
+%D
+%D \typebuffer \stoplinecorrection \getbuffer \stoplinecorrection
+
+\installcorenamespace{positionbar}
+
+\installsimplecommandhandler \??positionbar {positionbar} \??positionbar
+
+\setuppositionbar
+ [\c!min=\plusone,
+ \c!max=\plusone,
+ \c!n=\plusone
+ \c!text=?,
+ \c!width=\emwidth,
+ \c!height=\strutheight,
+ \c!depth=\strutdepth]
+
+\permanent\protected\def\horizontalpositionbar[#1]%
+ {\hbox to \hsize
+ {\setuppositionbar[#1]%
+ \usepositionbarstyleandcolor\c!style\c!color
+ \hskip\zeropoint\s!plus \positionbarparameter\c!n \s!fill
+ \hskip\zeropoint\s!plus-\positionbarparameter\c!min\s!fill
+ \positionbarparameter\c!text\relax
+ \hskip\zeropoint\s!plus \positionbarparameter\c!max\s!fill
+ \hskip\zeropoint\s!plus-\positionbarparameter\c!n \s!fill}}
+
+\permanent\protected\def\verticalpositionbar[#1]%
+ {\vbox to \vsize
+ {\hsize\positionbarparameter\c!width
+ \setuppositionbar[#1]%
+ \usepositionbarstyleandcolor\c!style\c!color
+ \vskip\zeropoint\s!plus \positionbarparameter\c!n \s!fill
+ \vskip\zeropoint\s!plus-\positionbarparameter\c!min\s!fill
+ \positionbarparameter\c!text\relax
+ \vskip\zeropoint\s!plus \positionbarparameter\c!max\s!fill
+ \vskip\zeropoint\s!plus-\positionbarparameter\c!n \s!fill}}
+
+\permanent\protected\def\horizontalgrowingbar[#1]%
+ {\hpack to \hsize
+ {\setuppositionbar[#1]%
+ \usepositionbarstyleandcolor\c!style\c!color
+ \vrule\s!width\zeropoint\s!height\positionbarparameter\c!height\s!depth\positionbarparameter\c!depth
+ \leaders\vrule\hskip\zeropoint\s!plus\numexpr\positionbarparameter\c!n-\positionbarparameter\c!min+\plusone\relax\s!fill
+ \hskip\zeropoint\s!plus \positionbarparameter\c!max\s!fill
+ \hskip\zeropoint\s!plus-\positionbarparameter\c!n \s!fill}}
+
+\permanent\protected\def\verticalgrowingbar[#1]%
+ {\vpack to \vsize
+ {\hsize\positionbarparameter\c!width
+ \setuppositionbar[#1]%
+ \usepositionbarstyleandcolor\c!style\c!color
+ \hrule\s!width\positionbarparameter\c!width\s!height\zeropoint\s!depth\zeropoint
+ \leaders\hrule\vskip\zeropoint\s!plus\numexpr\positionbarparameter\c!n-\positionbarparameter\c!min+\plusone\relax\s!fill
+ \vskip\zeropoint\s!plus \positionbarparameter\c!max\s!fill
+ \vskip\zeropoint\s!plus-\positionbarparameter\c!n \s!fill}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-bck.mklx b/Master/texmf-dist/tex/context/base/mkxl/pack-bck.mklx
new file mode 100644
index 00000000000..3c15beb5f4f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-bck.mklx
@@ -0,0 +1,245 @@
+%D \module
+%D [ file=pack-bck, % moved from pack-rul,
+%D version=20111115, % 1998.10.16,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=Simple Backgrounds,
+%D author=Hans Hagen \& Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / Simple Backgrounds}
+
+%D The code here is already pretty old and is used for simple backgrounds. As it is
+%D still used WS adapted the code to the new command handler methods so that it gets
+%D a second life. So it made sense to mkvi as well. Some more code is moved here
+%D too.
+
+%D \macros
+%D {setupbackground,startbackground,background}
+%D
+%D The section deals with backgrounds in the running text. This means that texts is
+%D to be collected and split over pages. To show what can be done, we provide this
+%D part of the documentation with some gray background and a red frame. Both the
+%D background and frame can have all characteristics of \type {\framed}.
+%D
+%D \starttyping
+%D \setupbackground
+%D [backgroundoffset=4pt,
+%D background=color,
+%D frame=on,
+%D framecolor=red,
+%D leftoffset=2pt]
+%D \stoptyping
+%D
+%D The implementation is not that sophisticated, but suffices. The main problem with
+%D this kind of functionality is to get the spacing all right.
+%D
+%D Specifying the background is more or less the same as
+%D specifying a framed box.
+%D
+%D \showsetup{setupbackground}
+%D
+%D {\em This mechanism is sort of obsolete and textbackgrounds should be used
+%D instead.}
+
+\unprotect
+
+\installcorenamespace {background}
+
+\installframedcommandhandler \??background {background} \??background
+
+% The mode is not that public an dmostlu an initial mode:
+%
+% 0 : no split
+% 1 : no split, honoring leftskip (messy)
+% 2 : split
+% 3 : split, honoring leftskip (messy)
+%
+% While processing the modes will change from 3->1 or 2->0. Don't depend on the
+% mode being public currently as it could become a key.
+
+\setnewconstant\backgroundsplitmode\plusthree
+
+\appendtoks
+ \frozen\setuevalue{\e!start\currentbackground}{\pack_backgrounds_start [\currentbackground]}%
+ \frozen\setuevalue{\e!stop \currentbackground}{\pack_backgrounds_stop }%
+ \frozen\setuevalue {\currentbackground}{\pack_backgrounds_direct[\currentbackground]}%
+\to \everydefinebackground
+
+\protected\def\pack_backgrounds_start[#tag]%
+ {\endgraf
+ \begingroup
+ \def\currentbackground{#tag}%
+ \doifelse{\backgroundparameter\c!state}\v!start
+ \pack_backgrounds_start_indeed
+ \pack_backgrounds_start_ignore}
+
+\tolerant\def\pack_backgrounds_start_indeed[#settings]%
+ {\setupcurrentbackground[#settings,\c!state=\v!start,\c!offset=\v!overlay]%
+ \let\pack_backgrounds_stop\pack_backgrounds_stop_indeed
+ \setbox\scratchboxone\vbox\bgroup
+ \strut
+ \vskip-2\lineheight
+ \strut
+ \blank[\v!disable]
+ \leftskip \backgroundparameter\c!leftoffset
+ \rightskip\backgroundparameter\c!rightoffset}
+
+\tolerant\def\pack_backgrounds_start_ignore[#settings]%
+ {\let\pack_backgrounds_stop\pack_backgrounds_stop_ignore}
+
+\let\pack_backgrounds_stop\relax
+
+\protected\def\pack_backgrounds_stop_indeed % we shoul duse the fast background variant of framed
+ {\endgraf
+ \removelastskip
+ \strut
+ \vskip-2\lineheight
+ \strut
+ % safeguard added
+ \ifdim\dimexpr\pagetotal+2\lineheight\relax>\pagegoal
+ \page
+ \fi
+ % till here
+ \egroup
+ \scratchdistance\leftskip % new **
+ \forgetall
+ \ifinsidefloat
+ \backgroundsplitmode\zerocount
+ \fi
+ \ifcase\backgroundsplitmode
+ \inheritedbackgroundframed{\box\scratchboxone}%
+ \or
+ \hskip\scratchdistance
+ \inheritedbackgroundframed{\box\scratchboxone}%
+ \else
+ \splitmaxdepth\boxmaxdepth
+ \splittopskip\topskip
+ \doloop
+ {\ifzeropt\pagetotal % empty page
+ \scratchdimen\textheight
+ \backgroundsplitmode\plusone % split to max height
+ \else
+ \setbox\scratchdimentwo\vbox{\backgroundparameter\c!before}%
+ \scratchdimen\dimexpr\pagegoal-\ht\scratchdimentwo-\pagetotal\relax
+ \backgroundsplitmode\plustwo % split to partial height
+ \fi
+ \ifdim\scratchdimen<\zeropoint
+ \scratchdimen\pagegoal
+ \fi
+ \advance\scratchdimen\dimexpr
+ -\backgroundparameter\c!topoffset
+ -\backgroundparameter\c!bottomoffset
+ \relax
+ \ifdim\scratchdimen>2\lineheight\relax % reasonable, will be configurable
+ \ifdim\ht\scratchboxone>\scratchdimen % larger than page
+ \setbox\scratchdimentwo\vsplit\scratchboxone to \scratchdimen
+ \else
+ \setbox\scratchdimentwo\box\scratchboxone
+ \backgroundsplitmode\zerocount % no split
+ \fi
+ \setbox\scratchdimentwo\vbox \ifcase\backgroundsplitmode\or to \textheight \fi % max split
+ {\vskip\backgroundparameter\c!topoffset
+ \unvcopy\scratchdimentwo
+ \prevdepth\dp\scratchdimentwo
+ \obeydepth
+ \vskip\backgroundparameter\c!bottomoffset
+ \vfill}
+ \backgroundparameter\c!before
+ \ifcase\backgroundsplitmode\or\or % partial split
+ \ifdim\pagegoal<\maxdimen
+ \pagegoal=1.2\pagegoal % be a bit more tolerant
+ \fi
+ \fi
+ \startlinecorrection
+ \ifnum\backgroundsplitmode=\plusthree
+ \hskip\scratchdistance % new **
+ \fi
+ \inheritedbackgroundframed{\box\scratchdimentwo}%
+ \stoplinecorrection
+ \ifcase\backgroundsplitmode % no split
+ \backgroundparameter\c!after
+ \else % some split
+ \page_otr_fill_and_eject_page % no \page !
+ \fi
+ \else
+ \page
+ \fi
+ \ifdim\ht\scratchboxone>\zeropoint \else
+ \exitloop
+ \fi}%
+ \fi
+ \endgroup
+ \endgraf}
+
+\protected\def\pack_backgrounds_stop_ignore
+ {\endgroup
+ \endgraf}
+
+\protected\def\pack_backgrounds_direct[#tag]%
+ {\begingroup
+ \def\currentbackground{#tag}%
+ \doifelse{\backgroundparameter\c!state}\c!start
+ \pack_backgrounds_direct_indeed
+ \pack_backgrounds_direct_ignore}
+
+\def\pack_backgrounds_direct_indeed
+ {\dowithnextboxcs\pack_backgrounds_direct_finish\vbox}
+
+\def\pack_backgrounds_direct_finish
+ {\setupcurrentbackground[\c!offset=\v!overlay]%
+ \inheritedbackgroundframed{\flushnextbox}%
+ \endgroup}
+
+\def\pack_backgrounds_direct_ignore
+ {\endgroup}
+
+\definebackground[\v!background]
+
+\ifdefined\startbackground \else
+ \permanent\expandafter\let\expandafter\startbackground\csname\e!start\v!background\endcsname
+ \permanent\expandafter\let\expandafter\stopbackground \csname\e!stop \v!background\endcsname
+ \permanent\expandafter\let\expandafter\background \csname \v!background\endcsname
+\fi
+
+\setupbackground
+ [\c!leftoffset=.5\bodyfontsize,
+ \c!rightoffset=\backgroundparameter\c!leftoffset,
+ \c!topoffset=\zeropoint,
+ \c!bottomoffset=\backgroundparameter\c!topoffset,
+ \c!state=\v!start,
+ \c!radius=.5\bodyfontsize,
+ \c!corner=\v!rectangular,
+ \c!frame=\v!off,
+ \c!depth=\zeropoint,
+ % \c!color=,
+ \c!background=\v!color,
+ \c!backgroundcolor=lightgray,
+ \c!before=,
+ \c!after=]
+
+%D \startbuffer
+%D \setupbackground[state=start,frame=on]
+%D
+%D \startbackground
+%D \input ward
+%D \stopbackground
+%D
+%D \background{\input ward\par}
+%D
+%D \setupbackground[state=stop]
+%D
+%D \startbackground
+%D \input ward
+%D \stopbackground
+%D
+%D \background{\input ward\par}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl
new file mode 100644
index 00000000000..77b0bbc69c8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-box.mkxl
@@ -0,0 +1,1121 @@
+%D \module
+%D [ file=pack-box,
+%D version=2002.04.12,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=Boxes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / Boxes}
+
+%D This module contains all kind of macros for moving content around. Many
+%D macros here come from other modules, but depencies made it more clear
+%D to isolate them. We invite users to document the macros. They can be
+%D handy shortcuts for otherwise complex tasks.
+
+\unprotect
+
+%D We need to set the size, else we get dimensions depending on the content,
+%D which in itself is ok, but can lead to loops due to rounding errors (happened
+%D in demo-obv).
+
+% \definelayer[\v!text-2][\c!position=\v!yes,\c!region=,\c!width=\d_overlay_width,\c!height=\d_overlay_height]
+% \definelayer[\v!text-1][\c!position=\v!yes,\c!region=,\c!width=\d_overlay_width,\c!height=\d_overlay_height]
+% \definelayer[\v!text+1][\c!position=\v!yes,\c!region=,\c!width=\d_overlay_width,\c!height=\d_overlay_height]
+% \definelayer[\v!text+2][\c!position=\v!yes,\c!region=,\c!width=\d_overlay_width,\c!height=\d_overlay_height]
+
+\definelayer[\v!text-2][\c!position=\v!yes,\c!region=,\c!width=\textwidth,\c!height=\textheight]
+\definelayer[\v!text-1][\c!position=\v!yes,\c!region=,\c!width=\textwidth,\c!height=\textheight]
+\definelayer[\v!text+1][\c!position=\v!yes,\c!region=,\c!width=\textwidth,\c!height=\textheight]
+\definelayer[\v!text+2][\c!position=\v!yes,\c!region=,\c!width=\textwidth,\c!height=\textheight]
+
+\permanent\protected\def\internaltextoverlay#1% will become more generic and installable
+ {\startoverlay % i.e. probably an overlay by itself
+ {\positionregionoverlay\textanchor{\v!text#1}}% see later
+ {\composedlayer {\v!text#1}}%
+ \stopoverlay}
+
+\defineoverlay[\v!text-2][\internaltextoverlay{-2}]
+\defineoverlay[\v!text-1][\internaltextoverlay{-1}]
+\defineoverlay[\v!text+1][\internaltextoverlay{+1}]
+\defineoverlay[\v!text+2][\internaltextoverlay{+2}]
+
+\installcorenamespace {anchor}
+
+% produces a box too
+%
+% \anchor[text-1][preset=lefttop][framed settings]{HELLO WORLD}
+
+\mutable\let\currentanchor\empty
+
+\permanent\tolerant\protected\def\defineanchor[#1]#*[#2]#*[#3]#*[#4]% name targetlayer layersetting framedsetting
+ {\setvalue{\??anchor#1}{\pack_anchors_process_defined{#2}{#3}{#4}}}
+
+\let\pack_anchors_process_defined_indeed\gobbletwooptionals
+
+\def\pack_anchors_process_defined#1#2#3% brrr
+ {\tolerant\def\pack_anchors_process_defined_indeed[##1]##*[##2]%
+ {\ifarguments
+ \def\next{\pack_anchors_process_indeed{#1}{#2}{#3}}%
+ \or
+ \def\next{\pack_anchors_process_indeed{#1}{#2,##1}{#2,##1}}%
+ \or
+ \def\next{\pack_anchors_process_indeed{#1}{#2,##1}{#3,##2}}%
+ \fi
+ \next}% picks up a box
+ \pack_anchors_process_defined_indeed}
+
+\permanent\protected\def\anchor[#1]%
+ {\begingroup
+ \edef\currentanchor{#1}%
+ \ifcsname\??anchor\currentanchor\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\pack_anchor_notdefined
+ \fi}
+
+\tolerant\def\pack_anchor_notdefined[#1]#*[#2]%
+ {\ifarguments
+ \expandafter\gobbletwoarguments
+ \or
+ \expandafter\pack_anchor_notdefined_one
+ \else
+ \expandafter\pack_anchor_notdefined_two
+ \fi{#1}{#2}}
+
+\def\pack_anchor_notdefined_one #1#2{\dowithnextbox{\pack_anchors_process_finish\currentanchor{#1}{#1}}\vbox}
+\def\pack_anchor_notdefined_two #1#2{\dowithnextbox{\pack_anchors_process_finish\currentanchor{#1}{#2}}\vbox}
+\def\pack_anchors_process_indeed#1#2#3{\dowithnextbox{\pack_anchors_process_finish {#1}{#2}{#3}}\vbox}
+
+\newbox \b_pack_anchors
+\newdimen\d_pack_anchors_width
+\newdimen\d_pack_anchors_height
+\newdimen\d_pack_anchors_depth
+
+% \definelayer[anchor]
+
+\newcount\c_pack_anchors_n
+\newtoks \t_pack_anchors_flush
+
+\protected\def\pack_anchors_register#1#2%
+ {\global\advance\c_pack_anchors_n\plusone
+ \pagereference[\v!layer:\v!anchor:\number\c_pack_anchors_n]%
+ \putboxincache\v!anchor{\number\c_pack_anchors_n}\b_pack_anchors
+% \xtoksapp\t_pack_anchors_flush{\pack_anchors_flush{\number\c_pack_anchors_n}{#1}{#2}}%
+ \doglobal\appendetoks
+ \pack_anchors_flush{\number\c_pack_anchors_n}{#1}{#2}%
+ \to \t_pack_anchors_flush
+ \glet\pack_anchors_flush_all\pack_anchors_flush_all_indeed}
+
+\protected\def\pack_anchors_flush#1#2#3%
+ {\doifelseboxincache\v!anchor{#1}
+ {\doifelsereferencefound{\v!layer:\v!anchor:#1}
+ {\ifnum\currentreferencerealpage=\realpageno\relax
+ \setlayer[#2][#3,\c!position=\v!no]{\directboxfromcache\v!anchor{#1}}%
+ \else
+ \donetrue
+ \fi
+ }\donetrue}%
+ \donetrue}%
+
+\protected\def\pack_anchors_flush_all_indeed
+ {\donefalse
+ \the\t_pack_anchors_flush
+ \ifdone\else
+ \global\t_pack_anchors_flush\emptytoks
+ \glet\pack_anchors_flush_all\relax
+ \fi}
+
+\let\pack_anchors_flush_all\relax
+
+\appendtoks
+ \pack_anchors_flush_all
+\to \everybeforepagebody
+
+\def\pack_anchors_process_finish#1#2#3% brrr: we need to apply offset only once .. a bit messy
+ {\checkpositionoverlays
+ \setbox\b_pack_anchors\box\nextbox
+ \framed % could be a predefined framed but used seldom
+ [\c!offset=\v!overlay,\c!frame=\v!off,#3]
+ {\pack_anchors_register{#1}{#2}%
+ \novrule % hm, not needed as we frame the size (but kind of default)
+ \s!width \wd\b_pack_anchors
+ \s!height\ht\b_pack_anchors
+ \s!depth \dp\b_pack_anchors}%
+ \endgroup}
+
+% \setlayeranchored[text-1][preset=lefttop]{HELLO WORLD} produces a simple (empty) hbox
+% synchronizes per page
+
+\permanent\tolerant\protected\def\setlayeranchored[#1]#*[#2]%
+ {\begingroup
+ \ifarguments
+ \dowithnextbox
+ {\endgroup}%
+ \else
+ \dowithnextbox
+ {\checkpositionoverlays
+ \setbox\b_pack_anchors\box\nextbox
+ \dontleavehmode\hpack{\pack_anchors_register{#1}{#2}}%
+ \endgroup}%
+ \fi
+ \hbox}
+
+% collectors
+
+\installcorenamespace{collectorbox}
+\installcorenamespace{collector}
+
+\installcommandhandler \??collector {collector} \??collector
+
+\setupcollector
+ [\c!state=\v!start,
+ \c!x=\zeropoint,
+ \c!y=\zeropoint,
+ \c!offset=\zeropoint,
+ \c!rotation=, % geen 0 !
+ \c!hoffset=\zeropoint,
+ \c!voffset=\zeropoint,
+ \c!location=rb,
+ \c!corner=]
+
+\appendtoks
+ \ifcsname\??collectorbox\currentcollector\endcsname \else
+ \expandafter\newbox\csname\??collectorbox\currentcollector\endcsname
+ \fi
+\to \everydefinecollector
+
+\permanent\protected\def\resetcollector[#1]%
+ {\ifcsname\??collectorbox#1\endcsname
+ \global\setbox\lastnamedcs\emptybox
+ \fi}
+
+\newconditional\c_pack_boxes_collector_valid_box
+
+\mutable\let\b_pack_boxes_collector\scratchbox
+
+\def\pack_boxes_collector_check_box#1%
+ {\edef\currentcollector{#1}%
+ \ifcsname\??collectorbox\currentcollector\endcsname
+ \settrue\c_pack_boxes_collector_valid_box
+ \expandafter\let\expandafter\b_pack_boxes_collector\lastnamedcs
+ \else
+ \setfalse\c_pack_boxes_collector_valid_box
+ \writestatus{collector}{unknown collector \currentcollector}%
+ \fi}
+
+\permanent\tolerant\protected\def\setcollector[#1]#*[#2]% todo: keep reference point
+ {\bgroup
+ \pack_boxes_collector_check_box{#1}%
+ \ifconditional\c_pack_boxes_collector_valid_box
+ \setupcurrentcollector[#2]%
+ \expandafter\pack_boxes_collector_yes
+ \else
+ \expandafter\pack_boxes_collector_nop
+ \fi}
+
+\def\pack_boxes_collector_yes
+ {\forgetall
+ \dontcomplain
+ \dowithnextboxcs\pack_boxes_collector_finish\hbox}
+
+\let\pack_boxes_collector_nop\egroup
+
+\installcorenamespace{collectorcorners}
+
+\setvalue{\??collectorcorners\v!middle}%
+ {\ifdim\d_pack_layers_x_size>\zeropoint
+ \advance\d_pack_layers_x_position.5\d_pack_layers_x_size
+ \fi
+ \ifdim\d_pack_layers_y_size>\zeropoint
+ \advance\d_pack_layers_y_position.5\d_pack_layers_y_size
+ \fi}
+
+\setvalue{\??collectorcorners\v!bottom}%
+ {\ifdim\d_pack_layers_y_size>\zeropoint
+ \advance\d_pack_layers_y_position-\d_pack_layers_y_size
+ \d_pack_layers_y_position-\d_pack_layers_y_position
+ \fi}
+
+\setvalue{\??collectorcorners\v!right}%
+ {\ifdim\d_pack_layers_x_size>\zeropoint
+ \advance\d_pack_layers_x_position-\d_pack_layers_x_size
+ \d_pack_layers_x_position-\d_pack_layers_x_position
+ \fi}
+
+\def\pack_boxes_collector_check_corner#1%
+ {\ifcsname\??collectorcorners#1\endcsname
+ \lastnamedcs
+ \fi}
+
+\def\pack_boxes_collector_finish
+ {\edef\p_collector_rotation{\collectorparameter\c!rotation}%
+ \edef\p_collector_corner {\collectorparameter\c!corner}%
+ \ifempty\p_collector_rotation \else
+ \setbox\nextbox\hpack
+ {\rotate
+ [\c!location=\v!high,
+ \c!rotation=\p_collector_rotation]
+ {\box\nextbox}}%
+ \fi
+ \d_pack_layers_x_size\wd\b_pack_boxes_collector
+ \d_pack_layers_y_size\htdp\b_pack_boxes_collector
+ \d_pack_layers_x_position\dimexpr\collectorparameter\c!x+\collectorparameter\c!hoffset\relax
+ \d_pack_layers_y_position\dimexpr\collectorparameter\c!y+\collectorparameter\c!voffset\relax
+ \rawprocesscommacommand[\p_collector_corner]\pack_boxes_collector_check_corner
+ \setbox\nextbox\hpack
+ {\alignedbox[\collectorparameter\c!location]\vpack{\box\nextbox}}%
+ \boxmaxdepth\zeropoint % really needed, nice example
+ \global\advance\boxhdisplacement\d_pack_layers_x_position
+ \ifdim\boxhdisplacement<\zeropoint
+ \global\setbox\b_pack_boxes_collector\hpack
+ {\kern-\boxhdisplacement
+ \box\b_pack_boxes_collector}%
+ \fi
+ \global\advance\boxvdisplacement\d_pack_layers_y_position
+ \ifdim\boxvdisplacement<\zeropoint
+ \global\setbox\b_pack_boxes_collector\hpack
+ {\lower-\boxvdisplacement
+ \box\b_pack_boxes_collector}%
+ \fi
+ \d_pack_layers_x_size\wd\b_pack_boxes_collector
+ \d_pack_layers_y_size\htdp\b_pack_boxes_collector
+ \global\setbox\b_pack_boxes_collector\hpack
+ {\box\b_pack_boxes_collector
+ \kern\dimexpr
+ -\d_pack_layers_x_size
+ +\d_pack_layers_x_position
+ \ifdim\boxhdisplacement<\zeropoint
+ -\boxhdisplacement
+ \fi
+ \relax
+ \lower\d_pack_layers_y_position\hpack
+ {\ifdim\boxvdisplacement<\zeropoint
+ \lower-\boxvdisplacement
+ \fi
+ \box\nextbox}}%
+ % combine height and depth into depth only (later flushed as height)
+ \global\setbox\b_pack_boxes_collector\hpack
+ {\lower\ht\b_pack_boxes_collector\box\b_pack_boxes_collector}%
+ % just to be sure
+ \ifdim\wd\b_pack_boxes_collector<\d_pack_layers_x_size
+ \wd\b_pack_boxes_collector\d_pack_layers_x_size
+ \fi
+ \egroup}
+
+\permanent\protected\def\flushcollector[#1]%
+ {\bgroup
+ \pack_boxes_collector_check_box{#1}%
+ \ifconditional\c_pack_boxes_collector_valid_box
+ \edef\p_collector_state{\collectorparameter\c!state}%
+ \ifx\p_collector_state\v!stop \else
+ \vpack{\hpack{\raise
+ \dp\b_pack_boxes_collector
+ \ifx\p_collector_state\v!repeat\copy\else\box\fi\b_pack_boxes_collector}}%
+ \fi
+ \fi
+ \egroup}
+
+\permanent\protected\def\composedcollector#1% no [], handy as argument
+ {\flushcollector[#1]}
+
+\permanent\tolerant\protected\def\adaptcollector[#1]#*[#2]% % a typical case where \global\wd looks better in the code
+ {\begingroup
+ \pack_boxes_collector_check_box{#1}%
+ \ifconditional\c_pack_boxes_collector_valid_box
+ \letcollectorparameter\c!hoffset\zeropoint
+ \letcollectorparameter\c!voffset\zeropoint
+ \setupcurrentcollector[#2]%
+ \global\wd\b_pack_boxes_collector\dimexpr\wd\b_pack_boxes_collector+\collectorparameter\c!hoffset\relax
+ \global\ht\b_pack_boxes_collector\dimexpr\ht\b_pack_boxes_collector+\collectorparameter\c!voffset\relax
+ \fi
+ \endgroup}
+
+%\definecollector[test]
+%\setcollector[test]
+% [location=rb]
+% {\externalfigure[koe][frame=on,width=3cm]}
+%\setcollector[test]
+% [corner={right,bottom},location={left,top}]
+% {\framed{gans}}
+%\composedcollector{test}
+
+\definecollector
+ [caption]
+
+\permanent\tolerant\protected\def\collectedtext[#1]#*[#2]% for captions
+ {\pack_boxes_collector_text[#1][#2]}
+
+\def\pack_boxes_collector_text[#1][#2]#3% #3 is mandate so no tolerant here, so still two step
+ {\bgroup
+ \dowithnextbox
+ {\setcollector
+ [caption]
+ {\box\nextbox}%
+ \setcollector
+ [caption][#1]%
+ {\letdummyparameter\c!style\empty
+ \letdummyparameter\c!color\empty
+ \getdummyparameters[#2]%
+ \dousestyleparameter{\directdummyparameter\c!style}%
+ \setupinterlinespace
+ \normalexpanded{\framed[\c!foregroundcolor=\directdummyparameter\c!color,\c!foregroundstyle=\directdummyparameter\c!style},\c!frame=\v!overlay,#2]{#3}}%
+ \composedcollector{caption}%
+ \egroup}%
+ \hbox}
+
+% \collectedtext
+% [corner={right,bottom},location={left,top}]
+% [background=color,backgroundcolor=white,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \collectedtext
+% [rotation=90,corner={right,bottom},location={right,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \collectedtext
+% [rotation=90,corner={left,bottom},location={left,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+
+\installcorenamespace {layeredtext}
+\installcorenamespace {layeredtextlayer}
+\installcorenamespace {layeredtextframed}
+
+\installsimpleframedcommandhandler \??layeredtext {layeredtext} \??layeredtext
+
+\newdimen\d_pack_layeredtexts_width
+\newdimen\d_pack_layeredtexts_height
+
+\definelayer % private
+ [\??layeredtextlayer]
+
+\setuplayer % private
+ [\??layeredtextlayer]
+ [\c!width=\d_pack_layeredtexts_width,
+ \c!height=\d_pack_layeredtexts_height]
+
+\defineframed % private
+ [\??layeredtextframed]
+ [\c!offset=\v!overlay,
+ \c!frame=\v!off,
+ \c!background={\v!foreground,\??layeredtextlayer},
+ \c!width=\d_pack_layeredtexts_width,
+ \c!height=\d_pack_layeredtexts_height]
+
+\setuplayeredtext % public (the attached data, usually small stuff, not the main thing)
+ [\c!frame=\v!overlay,
+ \c!color=,
+ \c!style=,
+ \c!foregroundcolor=\layeredtextparameter\c!color,
+ \c!foregroundstyle=\layeredtextparameter\c!style]
+
+\permanent\tolerant\protected\def\placelayeredtext[#1]#*[#2]#*[#3]#4% tag layersettings content(framed)settings content
+ {\bgroup
+ \edef\currentlayeredtext{#1}%
+ \checklayeredtextparent % bonus
+ \setupcurrentlayeredtext[#3]%
+ \dowithnextbox
+ {\d_pack_layeredtexts_width \wd\nextbox
+ \d_pack_layeredtexts_height\ht\nextbox
+ \begingroup % preserve \nextbox
+ \setlayer
+ [\??layeredtextlayer]%
+ [#2]%
+ {\setfalse\fontattributeisset
+ \uselayeredtextstyleparameter\c!style
+ \ifconditional\fontattributeisset
+ \setupinterlinespace
+ \fi
+ \inheritedlayeredtextframed{#4}}%
+ \endgroup
+ \placeframed[\??layeredtextframed]{\flushnextbox}%
+ \egroup}%
+ \hbox}
+
+\permanent\protected\def\layeredtext
+ {\placelayeredtext[]}
+
+% \layeredtext
+% [corner={right,bottom},location={left,top}]
+% [background=color,backgroundcolor=white,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \layeredtext
+% [rotation=90,corner={right,bottom},location={right,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+%
+% \layeredtext
+% [rotation=90,corner={left,bottom},location={left,top}]
+% [frame=on,offset=0pt]
+% {gans}
+% {\externalfigure[koe][width=3cm]}
+
+\permanent\tolerant\protected\def\ornamenttext[#1]#*[#2]% takes another argument
+ {\bgroup
+ \doifelseassignment{#1}
+ {\letdummyparameter\c!alternative\v!a
+ \getdummyparameters[#1]%
+ \doifelse{\directdummyparameter\c!alternative}\v!a
+ {\egroup\collectedtext}%
+ {\egroup\layeredtext }%
+ [#1][#2]}%
+ {\egroup\csname#1\endcsname}}
+
+\permanent\tolerant\protected\def\defineornament[#1]#*[#2]#*[#3]%
+ {\protected\frozen\instance\defcsname#1\endcsname{\ornamenttext[#2][#3]}}
+
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={right,top},
+% hoffset=-.25ex]
+% [frame=on,background=color,backgroundcolor=red,offset=0pt]
+%
+% \ruledhbox{\affiliation{gans}{\externalfigure[koe][width=3cm]}}
+%
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={right,top},
+% hoffset=-.25ex,alternative=b]
+% [frame=on,background=color,backgroundcolor=red,offset=0pt]
+%
+% \ruledhbox{\affiliation{gans}{\externalfigure[koe][width=3cm]}}
+%
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={left,top},
+% hoffset=.25ex,voffset=.25ex,alternative=a]
+% [background=color,style=\ss\tfxx,backgroundcolor=white,offset=0pt]
+%
+% \affiliation{photo}{\externalfigure[molen][width=3cm]}
+%
+% \defineornament
+% [affiliation]
+% [rotation=90,corner={right,bottom},location={left,top},
+% hoffset=.25ex,voffset=.25ex,alternative=b]
+% [background=color,style=\ss\tfxx,backgroundcolor=white,offset=0pt]
+%
+% \affiliation{drawing}{\externalfigure[hakker][width=3cm]}
+
+\newcount\c_pack_boxes_bleeds
+
+\installcorenamespace {bleeding}
+
+\installdirectcommandhandler \??bleeding {bleeding} % \??bleeding
+
+\setupbleeding
+ [\c!location=l,
+ \c!stretch=\v!yes,
+ \c!width=3cm,
+ \c!height=3cm,
+ \c!offset=2mm,
+ \c!page=\v!no,
+ \c!voffset=\scratchoffset, % is set to \bleedingparameter\c!offset
+ \c!hoffset=\scratchoffset] % which often saves one resolve
+
+\permanent\def\bleedwidth {\the\hsize} % these are global !
+\permanent\def\bleedheight{\the\vsize} % these are global !
+
+\newconditional\c_pack_boxes_l
+\newconditional\c_pack_boxes_r
+\newconditional\c_pack_boxes_t
+\newconditional\c_pack_boxes_b
+
+\installcorenamespace{bleedinglocation}
+
+\setvalue{\??bleedinglocation t}{\settrue\c_pack_boxes_t\scratchhoffset\zeropoint}
+\setvalue{\??bleedinglocation b}{\settrue\c_pack_boxes_b\scratchhoffset\zeropoint}
+\setvalue{\??bleedinglocation l}{\settrue\c_pack_boxes_l\scratchvoffset\zeropoint}
+\setvalue{\??bleedinglocation r}{\settrue\c_pack_boxes_r\scratchvoffset\zeropoint}
+\setvalue{\??bleedinglocation bl}{\settrue\c_pack_boxes_l\settrue\c_pack_boxes_b}
+\setvalue{\??bleedinglocation lb}{\settrue\c_pack_boxes_l\settrue\c_pack_boxes_b}
+\setvalue{\??bleedinglocation br}{\settrue\c_pack_boxes_r\settrue\c_pack_boxes_b}
+\setvalue{\??bleedinglocation rb}{\settrue\c_pack_boxes_r\settrue\c_pack_boxes_b}
+\setvalue{\??bleedinglocation tl}{\settrue\c_pack_boxes_l\settrue\c_pack_boxes_t}
+\setvalue{\??bleedinglocation lt}{\settrue\c_pack_boxes_l\settrue\c_pack_boxes_t}
+\setvalue{\??bleedinglocation tr}{\settrue\c_pack_boxes_r\settrue\c_pack_boxes_t}
+\setvalue{\??bleedinglocation rt}{\settrue\c_pack_boxes_r\settrue\c_pack_boxes_t}
+
+\mutable\let\currentbleedposition\empty
+\mutable\let\currentpageposition \empty
+
+\permanent\tolerant\protected\def\bleed[#1]%
+ {\hbox\bgroup
+ \global\advance\c_pack_boxes_bleeds\plusone
+ %
+ \enforced\permanent\xdef\bleedwidth {\the\hsize}%
+ \enforced\permanent\xdef\bleedheight{\the\vsize}%
+ %
+ \edef\currentbleedposition{bleed:\number\c_pack_boxes_bleeds}%
+ \edef\currentpageposition {page:0}% todo: per page
+ %
+ \setupcurrentbleeding[#1]%
+ %
+ \scratchwidth \bleedingparameter\c!width
+ \scratchheight \bleedingparameter\c!height
+ \scratchoffset \bleedingparameter\c!offset
+ \scratchhoffset\bleedingparameter\c!hoffset
+ \scratchvoffset\bleedingparameter\c!voffset
+ %
+ \setfalse\c_pack_boxes_l % left
+ \setfalse\c_pack_boxes_r % right
+ \setfalse\c_pack_boxes_t % top
+ \setfalse\c_pack_boxes_b % bottom
+ %
+ \csname\??bleedinglocation\bleedingparameter\c!location\endcsname
+ %
+ \doifelse{\bleedingparameter\c!stretch}\v!yes\donetrue\donefalse
+ %
+ \enforced\permanent\xdef\bleedwidth{\the\dimexpr
+ \ifdone
+ \ifconditional\c_pack_boxes_l
+ \scratchwidth+\MPx\currentbleedposition-\MPx\currentpageposition
+ \orelse\ifconditional\c_pack_boxes_r
+ \paperwidth -\MPx\currentbleedposition+\MPx\currentpageposition % not checked
+ \else
+ \scratchwidth
+ \fi
+ \else
+ \scratchwidth
+ \fi+\scratchhoffset
+ \relax}%
+ \enforced\permanent\xdef\bleedheight{\the\dimexpr
+ \ifdone
+ \ifconditional\c_pack_boxes_t
+ \paperheight -\MPy\currentbleedposition+\MPy\currentpageposition % not checked
+ \orelse\ifconditional\c_pack_boxes_b
+ \scratchheight+\MPy\currentbleedposition-\MPy\currentpageposition + \MPh\currentbleedposition % not checked (\MPh added)
+ \else
+ \scratchheight
+ \fi
+ \else
+ \scratchheight
+ \fi+\scratchvoffset
+ \relax}%
+ \dowithnextboxcontentcs\pack_boxes_bleed_settings\pack_boxes_bleed_finish\hbox}
+
+\def\pack_boxes_bleed_settings
+ {\hsize\bleedwidth
+ \vsize\bleedheight}
+
+\def\pack_boxes_bleed_finish
+ {\doif{\bleedingparameter\c!page}\v!yes
+ {\setbox\nextbox\topskippedbox{\box\nextbox}}%
+ \setbox\nextbox\hpack to \scratchwidth
+ {\ifconditional\c_pack_boxes_l\hss\fi
+ \box\nextbox
+ \ifconditional\c_pack_boxes_r\hss\fi}%
+ \ifconditional\c_pack_boxes_b
+ \setbox\nextbox\hpack
+ {\lower\bleedheight\hpack{\raise\scratchheight\box\nextbox}}%
+ \fi
+ \wd\nextbox\scratchwidth
+ \ht\nextbox\scratchheight
+ \dp\nextbox\zeropoint
+ \ifdone
+ \hpos\currentbleedposition{\box\nextbox}%
+ \else
+ \box\nextbox
+ \fi
+ \egroup}
+
+\defineexternalfigure
+ [bleed] % should be \v!bleed
+ [\c!width=\bleedwidth,
+ \c!height=\bleedheight]
+
+% \placefigure[left]{none}
+% {\bleed[width=5cm,height=3cm,location=lt]{\externalfigure[koe][bleed]}}
+%
+% \input tufte
+%
+% \placefigure[left]{none}
+% {\bleed[width=5cm,height=3cm,location=l]{\externalfigure[koe][bleed]}}
+%
+% \input tufte
+%
+% \placefigure[right]{none}
+% {\bleed[width=5cm,height=3cm,location=r]{\externalfigure[koe][bleed]}}
+%
+% \input tufte
+%
+% \placefigure
+% [top,none]
+% {} % no caption
+% {\bleed
+% [hoffset=-\backspace,
+% voffset=3mm,
+% width=0cm,
+% height=6\lineheight,
+% page=yes, % correct for topskip
+% location=lt]
+% {\externalfigure[koe][bleed][frame=on]}}
+
+% \setlayerframed[layer id][layer settings][framed setting]{data}
+% \setlayerframed[layer id][combined settings]{data}
+
+% tricky: offsets apply to both the layer and the framed; it makes sense to
+% only apply the offset to ...
+
+\permanent\tolerant\protected\def\setlayerframed[#1]#*[#2]#*[#3]
+ {\ifarguments
+ % error
+ \or
+ \expandafter\pack_layers_set_framed_s
+ \or
+ \expandafter\pack_layers_set_framed_d
+ \or
+ \expandafter\pack_layers_set_framed_t
+ \fi[#1][#2][#3]}
+
+\def\pack_layers_set_framed_s[#1][#2][#3]%
+ {\setlayer[#1][\c!width=\wd\nextbox,\c!height=\ht\nextbox,\c!offset=\zeropoint]%
+ \normalframedwithsettings[\c!location=\v!normal]} % different kind of location
+
+\def\pack_layers_set_framed_d[#1][#2][#3]%
+ {\setlayer[#1][\c!width=\wd\nextbox,\c!height=\ht\nextbox,#2,\c!offset=\zeropoint]%
+ \normalframedwithsettings[\c!location=\v!normal,#2]} % different kind of location
+
+\def\pack_layers_set_framed_t[#1][#2][#3]%
+ {\setlayer[#1][#2]%
+ \normalframedwithsettings[#3]}
+
+\permanent\tolerant\protected\def\setlayertext[#1]#*[#2]#*[#3]%
+ {\bgroup
+ \letdummyparameter\c!align\empty
+ \letdummyparameter\c!width\hsize
+ \letdummyparameter\c!color\empty
+ \letdummyparameter\c!style\empty
+ \getdummyparameters[#3]%
+ \dowithnextboxcontent
+ {\forgetall
+ \hsize\directdummyparameter\c!width
+ \usealignparameter\directdummyparameter
+ \dousestyleparameter{\directdummyparameter\c!style}}
+ {\setlayer[#1][#2]{\strut\dousecolorparameter{\directdummyparameter\c!color}\flushnextbox}% maybe expand the color
+ \egroup}%
+ \vtop}
+
+% \setupbackgrounds
+% [page]
+% [background=pagefigures]
+%
+% \definelayer
+% [pagefigures]
+% [x=-2mm,
+% y=-2mm,
+% width=\paperwidth,
+% height=\paperheight]
+%
+% \definelayerpreset [lefttop] [corner={left,top},location={right,bottom}]
+% \definelayerpreset [righttop] [corner={right,top},location={left,bottom}]
+% \definelayerpreset [leftbottom] [corner={left,bottom},location={right,top}]
+% \definelayerpreset [rightbottom] [corner={right,bottom},location={left,top}]
+% \definelayerpreset [middle] [corner=middle,location=middle]
+%
+% \setlayer[pagefigures][preset=lefttop]
+% \setlayer[pagefigures][preset=righttop]
+% \setlayer[pagefigures][preset=leftbottom]
+% \setlayer[pagefigures][preset=rightbottom]
+
+\definelayerpreset
+ [\v!left\v!top]
+ [\c!corner={\v!left,\v!top},\c!location={\v!right,\v!bottom}]
+
+\definelayerpreset
+ [\v!right\v!top]
+ [\c!corner={\v!right,\v!top},\c!location={\v!left,\v!bottom}]
+
+\definelayerpreset
+ [\v!left\v!bottom]
+ [\c!corner={\v!left,\v!bottom},\c!location={\v!right,\v!top}]
+
+\definelayerpreset
+ [\v!right\v!bottom]
+ [\c!corner={\v!right,\v!bottom},\c!location={\v!left,\v!top}]
+
+\definelayerpreset
+ [\v!middle]
+ [\c!corner=\v!middle,\c!location=\v!middle]
+
+\definelayerpreset
+ [\v!middle\v!top]
+ [\c!location=\v!bottom,\c!corner=\v!top,\c!dx=.5\layerwidth]
+
+\definelayerpreset
+ [\v!middle\v!bottom]
+ [\c!location=\v!top,\c!corner=\v!bottom,\c!dx=.5\layerwidth]
+
+\definelayerpreset
+ [\v!middle\v!left]
+ [\c!location=\v!right,\c!corner=\v!left,\c!dy=.5\layerheight]
+
+\definelayerpreset
+ [\v!middle\v!right]
+ [\c!location=\v!left,\c!corner=\v!right,\c!dy=.5\layerheight]
+
+% left and right hanging:
+
+\definelayerpreset
+ [\v!left\v!top\v!left]
+ [\c!location={\v!left,\v!bottom},\c!corner={\v!left,\v!top}]
+
+\definelayerpreset
+ [\v!right\v!top\v!right]
+ [\c!location={\v!right,\v!bottom},\c!corner={\v!right,\v!top}]
+
+\installcorenamespace{alignedboxes}
+
+\permanent\tolerant\protected\def\alignedbox[#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\pack_boxes_aligned_finish}
+\permanent\tolerant\protected\def\aligned [#1]{\bgroup\serializecommalist[#1]\dowithnextboxcs\pack_boxes_aligned_finish\hbox}
+
+\def\pack_boxes_aligned_finish
+ {\ifcsname\??alignedboxes\serializedcommalist\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\middlebox
+ \fi{\flushnextbox}%
+ \egroup}
+
+\letcsname\??alignedboxes \endcsname\middlebox
+\letcsname\??alignedboxes\v!middle \endcsname\middlebox
+\letcsname\??alignedboxes\v!middle\v!middle\endcsname\middlebox
+\letcsname\??alignedboxes\v!left \endcsname\leftbox
+\letcsname\??alignedboxes\v!left \v!top \endcsname\lefttopbox
+\letcsname\??alignedboxes\v!left \v!bottom\endcsname\leftbottombox
+\letcsname\??alignedboxes\v!right \endcsname\rightbox
+\letcsname\??alignedboxes\v!right \v!top \endcsname\righttopbox
+\letcsname\??alignedboxes\v!right \v!bottom\endcsname\rightbottombox
+\letcsname\??alignedboxes\v!bottom \endcsname\bottombox
+\letcsname\??alignedboxes\v!bottom\v!left \endcsname\bottomleftbox
+\letcsname\??alignedboxes\v!bottom\v!right \endcsname\bottomrightbox
+\letcsname\??alignedboxes\v!top \endcsname\topbox
+\letcsname\??alignedboxes\v!top \v!left \endcsname\topleftbox
+\letcsname\??alignedboxes\v!top \v!right \endcsname\toprightbox
+\letcsname\??alignedboxes\v!line \endcsname\baselinemiddlebox % \v!grid is taken
+\letcsname\??alignedboxes\v!line \v!left \endcsname\baselineleftbox
+\letcsname\??alignedboxes\v!line \v!middle\endcsname\baselinemiddlebox
+\letcsname\??alignedboxes\v!line \v!right \endcsname\baselinerightbox
+\letcsname\??alignedboxes c\endcsname\middlebox
+\letcsname\??alignedboxes l\endcsname\leftbox
+\letcsname\??alignedboxes r\endcsname\rightbox
+\letcsname\??alignedboxes b\endcsname\bottombox
+\letcsname\??alignedboxes t\endcsname\topbox
+\letcsname\??alignedboxes lt\endcsname\lefttopbox
+\letcsname\??alignedboxes lb\endcsname\leftbottombox
+\letcsname\??alignedboxes rt\endcsname\righttopbox
+\letcsname\??alignedboxes rb\endcsname\rightbottombox
+\letcsname\??alignedboxes tl\endcsname\topleftbox
+\letcsname\??alignedboxes bl\endcsname\bottomleftbox
+\letcsname\??alignedboxes tr\endcsname\toprightbox
+\letcsname\??alignedboxes br\endcsname\bottomrightbox
+\letcsname\??alignedboxes m\endcsname\middlebox
+\letcsname\??alignedboxes g\endcsname\baselinemiddlebox
+\letcsname\??alignedboxes gl\endcsname\baselineleftbox
+\letcsname\??alignedboxes gc\endcsname\baselinemiddlebox
+\letcsname\??alignedboxes gr\endcsname\baselinerightbox
+
+% left/right/top/bottomoffset -> dimensions change
+% x/y | method=fixed -> dimensions don't change
+
+\installcorenamespace{offsetbox}
+
+\installautocommandhandler \??offsetbox {offsetbox} \??offsetbox
+
+\setupoffsetbox
+ [\c!x=\zeropoint,
+ \c!y=\zeropoint,
+ \c!width=\wd\nextbox,
+ \c!height=\ht\nextbox,
+ \c!depth=\dp\nextbox,
+ \c!location=,
+ \c!leftoffset=\zeropoint,
+ \c!rightoffset=\zeropoint,
+ \c!topoffset=\zeropoint,
+ \c!bottomoffset=\zeropoint,
+ \c!method=]
+
+\aliased\let\setupoffset\setupoffsetbox
+
+\permanent\tolerant\protected\def\offsetbox[#1]%
+ {\bgroup
+ \pack_boxes_offset_check[#1]%
+ \dowithnextboxcs\pack_boxes_offsetfinish}
+
+\permanent\tolerant\protected\def\offset[#1]%
+ {\bgroup
+ \pack_boxes_offset_check[#1]%
+ \dowithnextboxcs\pack_boxes_offsetfinish\hbox}
+
+\newcount\c_pack_boxes_offset_level
+
+\def\pack_boxes_offset_check
+ {\advance\c_pack_boxes_offset_level\plusone
+ \edef\currentoffsetbox{\the\c_pack_boxes_offset_level}%
+ \checkoffsetboxparent
+ \setupcurrentoffsetbox}
+
+\def\pack_boxes_offsetfinish
+ {\donefalse
+ \scratchxposition \offsetboxparameter\c!x
+ \scratchyposition \offsetboxparameter\c!y
+ \scratchleftoffset \offsetboxparameter\c!leftoffset
+ \scratchrightoffset \offsetboxparameter\c!rightoffset
+ \scratchtopoffset \offsetboxparameter\c!topoffset
+ \scratchbottomoffset\offsetboxparameter\c!bottomoffset
+ \relax % really needed
+ \ifzeropt\scratchleftoffset \else\donetrue\fi
+ \ifzeropt\scratchrightoffset \else\donetrue\fi
+ \ifzeropt\scratchtopoffset \else\donetrue\fi
+ \ifzeropt\scratchbottomoffset\else\donetrue\fi
+ \ifdone
+ \edef\p_method{\offsetboxparameter\c!method}%
+ \ifx\p_method\v!fixed % new
+ \ifzeropt\scratchleftoffset
+ \ifzeropt\scratchrightoffset \else
+ \scratchxposition-\scratchrightoffset
+ \scratchrightoffset\zeropoint
+ \fi
+ \else
+ \scratchxposition\scratchleftoffset
+ \scratchleftoffset\zeropoint
+ \fi
+ \ifzeropt\scratchtopoffset
+ \ifzeropt\scratchbottomoffset \else
+ \scratchyposition-\scratchbottomoffset
+ \scratchbottomoffset\zeropoint
+ \fi
+ \else
+ \scratchyposition\scratchtopoffset
+ \scratchtopoffset\zeropoint
+ \fi
+ \donefalse
+ \fi
+ \fi
+ \ifdone
+ \setbox\nextbox\vpack
+ {\forgetall % already done
+ \offinterlineskip
+ \kern\scratchtopoffset
+ \hpack
+ {\kern\scratchleftoffset
+ \box\nextbox
+ \kern\scratchrightoffset}%
+ \kern\scratchbottomoffset}%
+ \ht\nextbox\htdp\nextbox
+ \dp\nextbox\zeropoint
+ \fi
+ \scratchwidth \offsetboxparameter\c!width
+ \scratchheight\offsetboxparameter\c!height
+ \scratchdepth \offsetboxparameter\c!depth
+ \edef\p_location{\offsetboxparameter\c!location}%
+ \setbox\nextbox\hpack
+ {\kern\scratchxposition
+ \lower\scratchyposition\hpack
+ {\ifempty\p_location
+ \box\nextbox
+ \else
+ \alignedbox[\p_location]\hpack{\box\nextbox}%
+ \fi}}%
+ \wd\nextbox\scratchwidth
+ \ht\nextbox\scratchheight
+ \dp\nextbox\scratchdepth
+ \box\nextbox
+ \egroup}
+
+%D \starttyping
+%D \framed[offset=overlay]{\offset[leftoffset=1cm]
+%D {\framed[offset=overlay]{\offset[rightoffset=1cm]
+%D {\externalfigure[koe][width=1cm]}}}}
+%D
+%D \blank
+%D
+%D \framed[offset=overlay]{\offset[leftoffset=1cm] {\externalfigure[koe][width=5cm]}} \blank
+%D \framed[offset=overlay]{\offset[rightoffset=1cm] {\externalfigure[koe][width=5cm]}} \blank
+%D \framed[offset=overlay]{\offset[topoffset=1cm] {\externalfigure[koe][width=5cm]}} \blank
+%D \framed[offset=overlay]{\offset[bottomoffset=1cm]{\externalfigure[koe][width=5cm]}} \blank
+%D \stoptyping
+
+% \useMPlibrary[pre] \setupbackgrounds[page][background=pagegrid]
+%
+% \placefigure[left,none]{}{\offset[leftoffset=1cm] {\externalfigure[cow][width=3cm]}} \input tufte
+% \placefigure[left,none]{}{\offset[rightoffset=1cm] {\externalfigure[cow][width=3cm]}} \input tufte
+% \placefigure[left,none]{}{\offset[topoffset=1cm] {\externalfigure[cow][width=3cm]}} \input tufte
+% \placefigure[left,none]{}{\offset[bottomoffset=1cm]{\externalfigure[cow][width=3cm]}} \input tufte
+
+% Some old code:
+%
+% \ltabbed{\romannumerals{3}}{\romannumerals{1}} test \endgraf
+% \ltabbed{\romannumerals{3}}{\romannumerals{2}} test \endgraf
+% \ltabbed{\romannumerals{3}}{\romannumerals{3}} test \endgraf
+%
+% \rtabbed{\romannumerals{3}}{\romannumerals{1}} test \endgraf
+% \rtabbed{\romannumerals{3}}{\romannumerals{2}} test \endgraf
+% \rtabbed{\romannumerals{3}}{\romannumerals{3}} test \endgraf
+%
+% \ctabbed{\romannumerals{3}}{\romannumerals{1}} test \endgraf
+% \ctabbed{\romannumerals{3}}{\romannumerals{2}} test \endgraf
+% \ctabbed{\romannumerals{3}}{\romannumerals{3}} test \endgraf
+
+\def\pack_boxes_tabbed#1#2#3#4%
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\hpack{#3}%
+ \hpack to \wd\scratchbox{#1#4#2}%
+ \endgroup}
+
+\permanent\protected\def\ltabbed{\pack_boxes_tabbed\relax\hss}
+\permanent\protected\def\rtabbed{\pack_boxes_tabbed\hss \relax}
+\permanent\protected\def\ctabbed{\pack_boxes_tabbed\hss \hss}
+
+\aliased\let\mtabbed\ctabbed
+
+% to be documented
+
+\permanent\protected\def\phantombox[#1]% == \framed[\c!empty=\v!yes,\c!offset=\v!overlay,#1]{}
+ {\hpack\bgroup
+ \letdummyparameter\c!width \zeropoint
+ \letdummyparameter\c!height\zeropoint
+ \letdummyparameter\c!depth \zeropoint
+ \getdummyparameters[#1]%
+ \setbox\scratchbox\emptyhbox
+ \wd\scratchbox\directdummyparameter\c!width
+ \ht\scratchbox\directdummyparameter\c!height
+ \dp\scratchbox\directdummyparameter\c!depth
+ \box\scratchbox
+ \egroup}
+
+% \backgroundimage{1}{\hsize}{\vsize}{\externalfigure[cow][\c!width=3cm]}
+
+% \framed[offset=overlay,width=6cm,height=3cm]{\backgroundimage {1}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+% \framed[offset=overlay,width=6cm,height=3cm]{\backgroundimage {2}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+% \framed[offset=overlay,width=6cm,height=3cm]{\backgroundimage {3}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+
+% \framed[offset=overlay,width=4cm,height=2cm]{\backgroundimagefill{1}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+% \framed[offset=overlay,width=4cm,height=2cm]{\backgroundimagefill{2}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+% \framed[offset=overlay,width=4cm,height=2cm]{\backgroundimagefill{3}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+% \framed[offset=overlay,width=2cm,height=4cm]{\backgroundimagefill{1}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+% \framed[offset=overlay,width=2cm,height=4cm]{\backgroundimagefill{2}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+% \framed[offset=overlay,width=2cm,height=4cm]{\backgroundimagefill{3}{\hsize}{\vsize}{\externalfigure[cow][width=1cm]}}
+%
+% \framed[offset=overlay,width=4cm,height=2cm]{\backgroundimagefill{1}{\hsize}{\vsize}{\externalfigure[mill]}}
+% \framed[offset=overlay,width=4cm,height=2cm]{\backgroundimagefill{2}{\hsize}{\vsize}{\externalfigure[mill]}}
+% \framed[offset=overlay,width=4cm,height=2cm]{\backgroundimagefill{3}{\hsize}{\vsize}{\externalfigure[mill]}}
+% \framed[offset=overlay,width=2cm,height=4cm]{\backgroundimagefill{1}{\hsize}{\vsize}{\externalfigure[mill]}}
+% \framed[offset=overlay,width=2cm,height=4cm]{\backgroundimagefill{2}{\hsize}{\vsize}{\externalfigure[mill]}}
+% \framed[offset=overlay,width=2cm,height=4cm]{\backgroundimagefill{3}{\hsize}{\vsize}{\externalfigure[mill]}}
+
+\permanent\protected\def\backgroundimage#1#2#3% repeat hsize vsize
+ {\bgroup
+ \forgetall
+ \scratchcounter#1\relax
+ \scratchwidth #2\relax
+ \scratchheight #3\relax
+ \dowithnextboxcs\pack_boxes_background_image\hbox}
+
+\def\pack_boxes_background_image
+ {\offinterlineskip
+ \ifcase\scratchcounter
+ % just one
+ \else
+ \scratchdimen\scratchwidth \divide\scratchdimen\wd\nextbox\scratchnx\scratchdimen\advance\scratchnx\plusone\relax
+ \scratchdimen\scratchheight\divide\scratchdimen\ht\nextbox\scratchny\scratchdimen\advance\scratchny\plusone\relax
+ % to be considered: methods
+ \ifcase\scratchcounter
+ \or % x and y
+ \setbox\nextbox\hpack{\dorecurse\scratchnx{\copy\nextbox}}%
+ \setbox\nextbox\vpack{\dorecurse\scratchny{\copy\nextbox\endgraf}}%
+ \or % x
+ \setbox\nextbox\hpack{\dorecurse\scratchnx{\copy\nextbox}}%
+ \or % y
+ \setbox\nextbox\vpack{\dorecurse\scratchny{\copy\nextbox\endgraf}}%
+ \fi
+ \fi
+ \ifdim\wd\nextbox>\scratchwidth
+ \setbox\nextbox\hpack to \scratchwidth{\hss\box\nextbox\hss}%
+ \setbox\nextbox\hpack{\normalexpanded{\clip[\c!width=\the\scratchwidth,\c!height=\the\ht\nextbox]{\box\nextbox}}}%
+ \fi
+ \ifdim\ht\nextbox>\scratchheight
+ \setbox\nextbox\vpack to \scratchheight{\vss\box\nextbox\vss}%
+ \setbox\nextbox\hpack{\normalexpanded{\clip[\c!width=\the\wd\nextbox,\c!height=\the\scratchheight]{\box\nextbox}}}%
+ \fi
+ \box\nextbox
+ \egroup}
+
+\permanent\protected\def\backgroundimagefill#1#2#3% repeat hsize vsize
+ {\bgroup
+ \forgetall
+ \scratchcounter#1\relax
+ \scratchwidth #2\relax
+ \scratchheight #3\relax
+ \dowithnextboxcs\pack_boxes_background_image_fill\hbox}
+
+\def\pack_boxes_background_image_fill
+ {\offinterlineskip
+ \setbox\nextbox\hpack\bgroup
+ \ifdim\scratchwidth>\scratchheight
+ \scale[\c!width=\the\scratchwidth]{\box\nextbox}%
+ \else
+ \scale[\c!height=\the\scratchheight]{\box\nextbox}%
+ \fi
+ \egroup
+ \ifdim\wd\nextbox>\scratchwidth
+ \setbox\nextbox\hpack to \scratchwidth
+ {\ifcase\scratchcounter
+ \hss\box\nextbox\hss
+ \or
+ \box\nextbox\hss
+ \or
+ \hss\box\nextbox
+ \else
+ \hss\box\nextbox\hss
+ \fi}%
+ \setbox\nextbox\hpack
+ {\normalexpanded{\clip[\c!width=\the\scratchwidth,\c!height=\the\ht\nextbox]{\box\nextbox}}}%
+ \fi
+ \ifdim\ht\nextbox>\scratchheight
+ \setbox\nextbox\vpack to \scratchheight
+ {\ifcase\scratchcounter
+ \vss\box\nextbox\vss
+ \or
+ \box\nextbox\vss
+ \or
+ \vss\box\nextbox
+ \else
+ \vss\box\nextbox\vss
+ \fi}%
+ \setbox\nextbox\hpack
+ {\normalexpanded{\clip[\c!width=\the\wd\nextbox,\c!height=\the\scratchheight]{\box\nextbox}}}%
+ \fi
+ \box\nextbox
+ \egroup}
+
+\permanent\protected\def\overlayimage#1%
+ {\vpack to \overlayheight\bgroup
+ \vss
+ \hpack to \overlaywidth\bgroup
+ \hss
+ \externalfigure[#1][\c!factor=\v!min,\c!equalwidth=\overlaywidth,\c!equalheight=\overlayheight]%
+ \hss
+ \egroup
+ \vss
+ \egroup}
+
+\permanent\protected\def\clippedoverlayimage#1%
+ {\clip
+ [\c!width=\overlaywidth,\c!height=\overlayheight]
+ {\overlayimage{#1}}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl
new file mode 100644
index 00000000000..44cfc9a4fa2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-com.mkxl
@@ -0,0 +1,990 @@
+%D \module
+%D [ file=pack-com, % used to be in core-mis,
+%D version=20120111,
+%D title=\CONTEXT\ Packing Macros,
+%D subtitle=Combinations,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / Combinations}
+
+\unprotect
+
+% \startfloatcombination will be redone ... we can decouple the floatcontent
+% and caption and pass them to combinations so that we get better fit when the
+% caption is wider than the float, testcase:
+%
+% \startfloatcombination [2*2]
+% \placefigure[local]{alpha}{\externalfigure[cow.pdf][width=1cm]}%
+% \placefigure[local]{beta} {\externalfigure[cow.pdf][width=2cm]}%
+% \placefigure[local]{gamma}{\externalfigure[cow.pdf][width=3cm]}
+% \placefigure[local]{delta}{\externalfigure[cow.pdf][width=4cm]}
+% \stopfloatcombination
+
+%D We could of course map combinations onto one of the table mechanisms but as it
+%D has served us well for ages we keep this one. The code has been cleaned up a bit
+%D and mkiv'd.
+%D
+%D Okay ... I might luafy this one eventually.
+
+% \startcombination {alpha} {a} {beta} {b} \stopcombination
+% \startcombination[2*1] {alpha} {a} {beta} {b} \stopcombination
+% \startcombination[1*2] {alpha} {a} {beta} {b} \stopcombination
+% \startcombination[2] {alpha} {a} {beta} {b} \stopcombination
+% \startcombination[2] \combination {alpha} {a} \combination{beta} {b} \stopcombination
+
+%D We do support some structure but the order matters and currently it's only window
+%D dressing:
+
+%D \starttyping
+%D \let\startcontent\bgroup
+%D \let\stopcontent \egroup
+%D \let\startcaption\bgroup
+%D \let\stopcaption \egroup
+%D \stoptyping
+%D
+%D Of course we should have started with more structure as it would simply the code.
+%D
+%D \starttyping
+%D \startcombination
+%D \startcontent
+%D \externalfigure[cow]
+%D \stopcontent
+%D \startcaption
+%D Some cow.
+%D \stopcaption
+%D \startcontent
+%D \externalfigure[cow]
+%D \stopcontent
+%D \startcaption
+%D The same cow.
+%D \stopcaption
+%D \stopcombination
+%D \stoptyping
+
+\ifdefined\dotagcombination \else \aliased\let\dotagcombination\relax \fi
+
+\newsystemmode{combination}
+
+\appendtoks
+ \globalresetsystemmode{combination}%
+\to \everyinsidefloat
+
+\newcount\c_pack_combinations_nesting % local
+
+\newcount\c_pack_combinations_x % global
+\newcount\c_pack_combinations_y % global
+\newcount\c_pack_combinations_max % global
+
+\newdimen\d_pack_combinations_ht % global
+
+\newbox \b_pack_combinations_captions % global % can go
+\newbox \b_pack_combinations_temp % global % can go
+\newbox \b_pack_combinations_content % local
+\newbox \b_pack_combinations_caption % local
+
+\installcorenamespace{combination}
+
+\installcommandhandler \??combination {combination} \??combination
+
+\initializeboxstack{\??combination captions}
+\initializeboxstack{\??combination temp}
+
+\newcount\c_pack_combinations_x_saved
+\newcount\c_pack_combinations_y_saved
+\newcount\c_pack_combinations_max_saved
+
+\newdimen\d_pack_combinations_ht_saved
+
+\newbox \b_pack_combinations_captions_saved
+\newbox \b_pack_combinations_temp_saved
+\newbox \b_pack_combinations_content_saved
+\newbox \b_pack_combinations_caption_saved
+
+\setfalse\c_strc_constructions_define_commands
+
+\def\pack_combinations_push
+ {\advance\c_pack_combinations_nesting\plusone
+ \ifnum\c_pack_combinations_nesting>\plusone
+ \c_pack_combinations_x_saved \c_pack_combinations_x
+ \c_pack_combinations_y_saved \c_pack_combinations_y
+ \c_pack_combinations_max_saved\c_pack_combinations_max
+ \d_pack_combinations_ht_saved \d_pack_combinations_ht
+ \setbox\b_pack_combinations_captions_saved\box\b_pack_combinations_captions
+ \setbox\b_pack_combinations_temp_saved \box\b_pack_combinations_temp
+ \setbox\b_pack_combinations_content_saved \box\b_pack_combinations_content
+ \setbox\b_pack_combinations_caption_saved \box\b_pack_combinations_caption
+ \else
+ \globalsetsystemmode{combination}% why global
+ \fi}
+
+\def\pack_combinations_pop
+ {\ifnum\c_pack_combinations_nesting>\plusone
+ \global\c_pack_combinations_x \c_pack_combinations_x_saved
+ \global\c_pack_combinations_y \c_pack_combinations_y_saved
+ \global\c_pack_combinations_max\c_pack_combinations_max_saved
+ \global\d_pack_combinations_ht \d_pack_combinations_ht_saved
+ \global\setbox\b_pack_combinations_captions\box\b_pack_combinations_captions_saved
+ \global\setbox\b_pack_combinations_temp \box\b_pack_combinations_temp_saved
+ \setbox\b_pack_combinations_content \box\b_pack_combinations_content_saved
+ \setbox\b_pack_combinations_caption \box\b_pack_combinations_caption_saved
+ \else
+ \globalresetsystemmode{combination}% why global
+ \fi
+ \advance\c_pack_combinations_nesting\minusone}
+
+\definelabel
+ [\v!combination] % handy for configuring
+ [\c!numberconversion=\v!character,
+ \c!text=]
+
+\settrue\c_strc_constructions_define_commands
+
+\setupcombination
+ [\c!width=\v!fit,
+ \c!height=\v!fit,
+ \c!distance=\emwidth,
+ \c!location=\v!bottom, % can be something {top,left}
+ \c!before=\blank,
+ \c!after=,
+ \c!inbetween={\blank[\v!medium]},
+ %\c!style=,
+ %\c!color=,
+ \c!nx=2, % new
+ \c!ny=1, % new
+ \c!align=\v!middle]
+
+\let\setupcombinations\setupcombination % for the moment (we might distinguish)
+
+\installcorenamespace{combinationlocation}
+\installcorenamespace{combinationalternative}
+
+\appendtoks
+ \setfalse\c_strc_constructions_define_commands
+ \normalexpanded
+ {\definelabel
+ [\v!combination:\currentcombination]%
+ [\v!combination\ifempty\currentcombinationparent\else:\currentcombinationparent\fi]}%
+ [\s!counter=\currentcombination,\c!levels=1]%
+ \settrue\c_strc_constructions_define_commands
+\to \everydefinecombination
+
+\setvalue{\??combinationlocation\v!left }{\let\m_pack_combinations_leftfiller\relax}
+\setvalue{\??combinationlocation\v!right }{\let\m_pack_combinations_rightfiller\relax}
+\setvalue{\??combinationlocation\v!top }{\let\m_pack_combinations_valigner\depthonlybox}
+\setvalue{\??combinationlocation\v!middle}{\let\m_pack_combinations_valigner\halfwaybox}
+
+\def\pack_combinations_location_reset
+ {\let\m_pack_combinations_rightfiller\hfil
+ \let\m_pack_combinations_leftfiller \hfil
+ \let\m_pack_combinations_valigner \firstofoneargument}
+
+\pack_combinations_location_reset
+
+\def\pack_combinations_location_step#1%
+ {\csname\??combinationlocation#1\endcsname}
+
+% formally ok:
+%
+% \protected\def\stopcombination
+% {\egroup
+% \egroup}
+%
+% more robust:
+%
+% \protected\def\stopcombination
+% {{}{}{}{}{}{}{}{}% catches (at most 4) missing entries
+% \egroup
+% \egroup}
+%
+% even better:
+%
+% \protected\def\stopcombination
+% {\bgroup
+% \scratchtoks{{}}%
+% \dorecurse\c_pack_combinations_y
+% {\toksapp{{}{}}}%
+% \expandafter\egroup\the\scratchtoks
+% \egroup
+% \dostoptagged
+% \egroup}
+%
+% faster
+
+\ifdefined\startcontent \else \aliased\let\startcontent\relax \fi
+\ifdefined\stopcontent \else \aliased\let\stopcontent \relax \fi
+\ifdefined\startcaption \else \aliased\let\startcaption\relax \fi
+\ifdefined\stopcaption \else \aliased\let\stopcaption \relax \fi
+
+\protected\def\pack_common_content_start{\bgroup\ignorespaces}
+\protected\def\pack_common_content_stop {\removeunwantedspaces\egroup}
+\protected\def\pack_common_caption_start{\bgroup\ignorespaces}
+\protected\def\pack_common_caption_stop {\removeunwantedspaces\egroup}
+
+\newtoks\everycombination
+
+\aliased\let\combination\empty
+
+\let\p_nx_ny\empty
+
+\permanent\protected\def\stopcombination
+ {\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_y}% brr
+ \dostoptagged
+ \egroup
+ \pack_combinations_pop
+ \egroup}
+
+\permanent\tolerant\protected\def\startcombination[#1]#*[#2]% can be simplified
+ {\bgroup % so we can grab a group
+ \pack_combinations_push
+ \edef\currentcombination{#1}%
+ \edef\p_nx_ny{#2}%
+ %
+ \ifempty\p_nx_ny
+ \ifcondition\validassignment{#1}%
+ \let\currentcombination\empty
+ \setupcurrentcombination[#1]%
+ \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}%
+ \else
+ \doifelseinstring{*}\currentcombination
+ {\edef\p_nx_ny{\currentcombination*\plusone*}%
+ \let\currentcombination\empty}
+ {\doifelsenumber\currentcombination
+ {\edef\p_nx_ny{\currentcombination*\plusone*}%
+ \let\currentcombination\empty}
+ {\edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}}}%
+ \fi
+ \else
+ \ifcondition\validassignment{#2}%
+ \setupcurrentcombination[#2]%
+ \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}%
+ \else
+ \edef\p_nx_ny{\p_nx_ny*\plusone*}%
+ \fi
+ \fi
+ %
+% test first:
+%
+% \ifempty\p_nx_ny
+% \ifhastok={#1}%
+% \let\currentcombination\empty
+% \setupcurrentcombination[#1]%
+% \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}%
+% \orelse\ifhastok*{\currentcombination}%
+% \edef\p_nx_ny{\currentcombination*\plusone*}%
+% \let\currentcombination\empty
+% \orelse\ifchknum\currentcombination\or
+% \edef\p_nx_ny{\currentcombination*\plusone*}%
+% \let\currentcombination\empty
+% \else
+% \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}%
+% \fi
+% \orelse\ifhastok={#2}%
+% \setupcurrentcombination[#2]%
+% \edef\p_nx_ny{\combinationparameter\c!nx*\combinationparameter\c!ny*}%
+% \else
+% \edef\p_nx_ny{\p_nx_ny*\plusone*}%
+% \fi
+ %
+ \forgetall
+ %
+ \the\everycombination
+ %
+ \enforced\let\startcontent\pack_common_content_start
+ \enforced\let\stopcontent \pack_common_content_stop
+ \enforced\let\startcaption\pack_common_caption_start
+ \enforced\let\stopcaption \pack_common_caption_stop
+ %
+ \edef\p_height {\combinationparameter\c!height}%
+ \edef\p_width {\combinationparameter\c!width}%
+ \edef\p_location{\combinationparameter\c!location}%
+ \edef\p_distance{\combinationparameter\c!distance}%
+ %
+ \pack_combinations_location_reset
+ \rawprocesscommacommand[\p_location]\pack_combinations_location_step
+ %
+ \dostarttaggedchained\t!combination\currentcombination\??combination
+ \vbox \ifx\p_height\v!fit\else to \p_height \fi \bgroup
+ \enforced\let\combination\empty % permits \combination{}{} handy for cld
+ \normalexpanded{\pack_combinations_start_indeed[\p_nx_ny]}}
+
+\let\pack_combinations_check_x_y\relax
+
+\protected\def\pack_combinations_start_indeed[#1*#2*#3]%
+ {\global\c_pack_combinations_x#1\relax
+ \global\c_pack_combinations_y#2\relax
+ \setexpandedcombinationparameter\c!nx{\the\c_pack_combinations_x}% in case we access it
+ \setexpandedcombinationparameter\c!ny{\the\c_pack_combinations_y}% in case we access it
+ \pack_combinations_check_x_y
+ \dotagcombination
+ \global\setbox\b_pack_combinations_captions\emptybox
+ \global\c_pack_combinations_max\c_pack_combinations_x
+ \multiply\c_pack_combinations_y\c_pack_combinations_x
+ \tabskip\zeropoint
+ \halign \ifx\p_width\v!fit\else to \p_width \fi \bgroup % repetitive preamble
+ \aligntab
+ \m_pack_combinations_leftfiller
+ \alignmark\alignmark
+ \m_pack_combinations_rightfiller
+ \aligntab
+ \tabskip\zeropoint \s!plus 1fill % \fillskip
+ \alignmark\alignmark
+ \cr
+ \pack_combinations_pickup}
+
+%D I've first considered using a constructor directly but it's more overhead and
+%D some settings conflict with already used combination settings so instead we plug
+%D in labels. This also permits extensions later on.
+
+\appendtoks
+ \edef\p_pack_combinations_alternative{\combinationparameter\c!alternative}%
+\to \everydefinecombination
+
+\def\pack_combinations_pickup
+ {\dostarttagged\t!combinationpair\empty % better make this text
+ \dostarttagged\t!combinationcontent\empty
+ \expandafterpars\pack_combinations_pickup_content_indeed}
+
+\def\pack_combinations_pickup_content_indeed
+ {\dowithnextboxcs\pack_combinations_pickup_content\hbox}
+
+\def\pack_combinations_pickup_content % we want to add struts but still ignore an empty box
+ {\dostoptagged
+ \setbox\b_pack_combinations_content\box\nextbox
+ \dostarttagged\t!combinationcaption\empty
+ \expandnamespacemacro\??combinationalternative\p_pack_combinations_alternative\v!text}
+
+\setvalue{\??combinationalternative\v!text}%
+ {\expandafterpars\pack_combinations_alternative_text_indeed}
+
+\setvalue{\??combinationalternative\v!label}%
+ {\expandafterpars\pack_combinations_alternative_label_indeed}
+
+\def\pack_combinations_alternative_text_indeed
+ {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
+ \afterassignment\pack_combinations_caption_first
+ \let\nexttoken=}
+
+\def\pack_combinations_alternative_label_indeed
+ {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
+ \hsize\wd\b_pack_combinations_content
+ \usealignparameter\combinationparameter
+ \usecombinationstyleandcolor\c!style\c!color
+ \begstrut
+ \normalexpanded{\strc_labels_command[\v!combination\ifempty\currentcombination\else:\currentcombination\fi]}%
+ \endstrut
+ \egroup}
+
+\appendtoks
+ \edef\p_pack_combinations_alternative{\combinationparameter\c!alternative}%
+ \ifx\p_pack_combinations_alternative\v!label
+ \edef\p_continue{\combinationparameter\c!continue}%
+ \ifx\p_continue\v!yes \else
+ \normalexpanded{\strc_labels_reset{\v!combination\ifempty\currentcombination\else:\currentcombination\fi}{1}}%
+ \fi
+ \fi
+\to \everycombination
+
+\def\pack_combinations_pickup_caption
+ {\dostoptagged
+ \dostoptagged
+ \setbox\b_pack_combinations_caption\box\nextbox
+ \pack_combinations_pickup_package_pair}
+
+\def\pack_combinations_caption_first
+ {\futurelet\nexttoken\pack_combinations_caption_second}
+
+\def\pack_combinations_caption_second
+ {\ifx\nexttoken\egroup
+ % the caption is empty
+ \orelse\ifx\nexttoken\stopcaption
+ % the caption is empty (new per 2014-05-24)
+ \else
+ % todo: \p_pack_combinations_alternative\v!none: no style, strut etc
+ \hsize\wd\b_pack_combinations_content
+ \usealignparameter\combinationparameter
+ \usecombinationstyleandcolor\c!style\c!color
+ \bgroup
+ \aftergroup\endstrut
+ \aftergroup\egroup
+ \begstrut
+ \fi}
+
+\def\pack_combinations_pickup_package_pair % we need to store the caption row
+ {\vbox
+ {\forgetall
+ \m_pack_combinations_valigner{\box\b_pack_combinations_content}%
+ % we need to save the caption for a next alignment line
+ \pack_combinations_save_caption}%
+ \ifnum\c_pack_combinations_y>\plusone
+ \global\advance\c_pack_combinations_y\minusone
+ \global\advance\c_pack_combinations_x\minusone
+ \ifcase\c_pack_combinations_x
+ \doubleexpandafter\pack_combinations_pickup_package_pair_a
+ \else
+ \doubleexpandafter\pack_combinations_pickup_package_pair_b
+ \fi
+ \else
+ \singleexpandafter\pack_combinations_pickup_package_pair_c
+ \fi}
+
+\def\pack_combinations_pickup_package_pair_a
+ {\cr
+ \pack_combinations_flush_captions
+ \noalign
+ {\forgetall
+ \global\setbox\b_pack_combinations_captions\emptybox
+ \nointerlineskip
+ \combinationparameter\c!after
+ \combinationparameter\c!before
+ \vss
+ \nointerlineskip}%
+ \global\c_pack_combinations_x\c_pack_combinations_max
+ \pack_combinations_pickup}
+
+\def\pack_combinations_pickup_package_pair_b
+ {\aligntab
+ \aligntab
+ \aligntab
+ \kern\p_distance
+ \aligntab
+ \pack_combinations_pickup}
+
+\def\pack_combinations_pickup_package_pair_c
+ {\cr
+ \pack_combinations_flush_captions
+ \egroup}
+
+\installcorenamespace{combinationcaption}
+
+\def\pack_combinations_save_caption
+ {\ifdim\htdp\b_pack_combinations_caption>\d_pack_combinations_ht
+ \global\d_pack_combinations_ht\htdp\b_pack_combinations_caption
+ \fi
+ \savebox{\??combinationcaption:\number\c_pack_combinations_nesting}{\number\c_pack_combinations_x}{\box\b_pack_combinations_caption}}
+
+\let\pack_combinations_flush_captions_indeed\relax
+
+\def\pack_combinations_flush_captions
+ {\noalign
+ {\ifdim\d_pack_combinations_ht>\zeropoint
+ \nointerlineskip % indeed
+ \combinationparameter\c!inbetween
+ \global\c_pack_combinations_x\c_pack_combinations_max
+ \glet\pack_combinations_flush_captions_indeed\pack_combinations_flush_captions_yes
+ \else
+ \glet\pack_combinations_flush_captions_indeed\pack_combinations_flush_captions_nop
+ \fi}%
+ \pack_combinations_flush_captions_indeed
+ \crcr}
+
+\def\pack_combinations_flush_captions_yes
+ {\vpack to \d_pack_combinations_ht\bgroup
+ \foundbox{\??combinationcaption:\number\c_pack_combinations_nesting}{\number\c_pack_combinations_x}%
+ \vss
+ \egroup
+ \global\advance\c_pack_combinations_x\minusone
+ \ifnum\c_pack_combinations_x>\zerocount % \c_pack_combinations_max
+ \expandafter\pack_combinations_flush_captions_yes_followup
+ \else
+ \global\d_pack_combinations_ht\zeropoint
+ \initializeboxstack{\??combinationcaption:\number-\c_pack_combinations_nesting}%
+ \fi}
+
+\let\pack_combinations_flush_captions_nop\donothing
+
+\def\pack_combinations_flush_captions_yes_followup
+ {\aligntab
+ \aligntab
+ \aligntab
+ \aligntab
+ \pack_combinations_flush_captions_indeed}
+
+%D \macros
+%D {startfloatcombination}
+%D
+%D \setupexternalfigures[directory={../sample}]
+%D \startbuffer
+%D \placefigure
+%D [left,none]
+%D {}
+%D {\startfloatcombination[2*2]
+%D \placefigure{alpha}{\externalfigure[cow.pdf][width=1cm]}
+%D \placefigure{beta} {\externalfigure[cow.pdf][width=2cm]}
+%D \placefigure{gamma}{\externalfigure[cow.pdf][width=3cm]}
+%D \placefigure{delta}{\externalfigure[cow.pdf][width=4cm]}
+%D \stopfloatcombination}
+%D
+%D \input tufte
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\protected\def\pack_combinations_float_hack_a#1%
+ {\strc_floats_build_box_separate_split{#1}%
+ \box\b_strc_floats_separate_content}
+
+\protected\def\pack_combinations_float_hack_b#1%
+ {\box\b_strc_floats_separate_caption}
+
+\permanent\tolerant\protected\def\startfloatcombination[#1]#*[#2]%
+ {\ifinsidefloat\else\dontleavehmode\fi % tricky, floatcombinations fail to align well otherwise
+ \vbox\bgroup
+ \strc_floats_build_box_separate_set
+ %\insidecolumnstrue % trick, forces no centering, todo: proper switch/feature
+ \postcenterfloatmethod\zerocount
+ \forcelocalfloats
+ \enforced\permanent\protected\def\stopfloatcombination{\pack_combinations_stop_float{#1}}}
+
+\aliased\let\stopfloatcombination\relax
+
+\def\pack_combinations_float_check_x_y
+ {\ifnum\numexpr\c_pack_combinations_x*\c_pack_combinations_y\relax<\noflocalfloats\relax
+ \global\c_pack_combinations_x\noflocalfloats
+ \global\c_pack_combinations_y\plusone
+ \fi
+ \let\pack_combinations_check_x_y\relax}%
+
+\def\pack_combinations_stop_float#1%
+ {\scratchtoks\emptytoks
+ \dorecurse\noflocalfloats
+ {\appendetoks
+ {\pack_combinations_float_hack_a{\recurselevel}}%
+ {\pack_combinations_float_hack_b{\recurselevel}}%
+ \to\scratchtoks}% brrr
+ \let\pack_combinations_check_x_y\pack_combinations_float_check_x_y
+ \expanded{\startcombination[#1]\the\scratchtoks}\stopcombination
+ \resetlocalfloats
+ \egroup}
+
+%D \macros
+%D {definepairedbox, setuppairedbox, placepairedbox}
+%D
+%D Paired boxes, formally called legends, but from now on a legend is just an
+%D instance, are primarily meant for typesetting some text alongside an
+%D illustration. Although there is quite some variation possible, the functionality
+%D is kept simple, if only because in most cases such pairs are typeset sober.
+%D
+%D The location specification accepts a pair, where the first keyword specifies the
+%D arrangement, and the second one the alignment. The first key of the location pair
+%D is one of \type {left}, \type {right}, \type {top} or \type {bottom}, while the
+%D second key can also be \type {middle}.
+%D
+%D The first box is just collected in an horizontal box, but the second one is a
+%D vertical box that gets passed the bodyfont and alignment settings.
+%D
+%D In many cases the table builders can be used instead, but as this mechanism is a
+%D traditional \CONTEXT\ one we keep it around.
+
+%D \macros
+%D {setuplegend, placelegend}
+%D
+%D It makes sense to typeset a legend to a figure in \TEX\ and not in a drawing
+%D package. The macro \type {\placelegend} combines a figure (or something else) and
+%D its legend. This command is just a paired box.
+%D
+%D The legend is placed according to \type {location}, being \type {bottom} or \type
+%D {right}. The macro macro is used as follows.
+%D
+%D \starttyping
+%D \placefigure
+%D {whow}
+%D {\placelegend
+%D {\externalfigure[cow]}
+%D {\starttabulate
+%D \NC 1 \NC head \NC \NR
+%D \NC 2 \NC legs \NC \NR
+%D \NC 3 \NC tail \NC \NR
+%D \stoptabulate}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend
+%D {\externalfigure[cow]}
+%D {\starttabulate[|l|l|l|l|]
+%D \NC 1 \NC head \NC 3 \NC tail \NC \NR
+%D \NC 2 \NC legs \NC \NC \NC \NR
+%D \stoptabulate}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2]
+%D {\externalfigure[cow]}
+%D {\starttabulate
+%D \NC 1 \NC head \NC \NR
+%D \NC 2 \NC legs \NC \NR
+%D \NC 3 \NC tail \NC \NR
+%D \stoptabulate}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2]
+%D {\externalfigure[cow]}
+%D {head \par legs \par tail}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2]
+%D {\externalfigure[cow]}
+%D {\startitemize[packed]
+%D \item head \item legs \item tail \item belly \item horns
+%D \stopitemize}}
+%D
+%D \placefigure
+%D {whow}
+%D {\placelegend[n=2,width=.8\hsize]
+%D {\externalfigure[cow]}
+%D {\startitemize[packed]
+%D \item head \item legs \item tail \item belly \item horns
+%D \stopitemize}}
+%D
+%D \def\MytTestTwo#1#2%
+%D {\placefigure
+%D {whow}
+%D {\placelegend[location={#1,#2}]
+%D {\externalfigure[cow]}
+%D {\starttabulate
+%D \NC 1 \NC head \NC \NR
+%D \NC 2 \NC legs \NC \NR
+%D \NC 3 \NC tail \NC \NR
+%D \stoptabulate}}}
+%D
+%D \def\MytTestOne#1{\processcommalist[left,right,top,bottom]{\MytTestTwo{#1}}}
+%D
+%D \processcommalist[left,right,top,bottom,middle]\MytTestOne
+%D \stoptyping
+%D
+%D More structure is also possible (the order matters!):
+%D
+%D \starttyping
+%D \startplacefigure[title=whow]
+%D \startplacelegend[location={bottom,middle},color=red]
+%D \startcontent
+%D \externalfigure[cow]
+%D \stopcontent
+%D \startcaption
+%D \starttabulate[|l|l|]
+%D \NC 1 \NC head \NC \NR
+%D \NC 2 \NC legs \NC \NR
+%D \NC 3 \NC tail \NC \NR
+%D \stoptabulate
+%D \stopcaption
+%D \stopplacelegend
+%D \stopplacefigure
+%D \stoptyping
+
+% todo: natural size
+
+\newsystemmode{pairedbox}
+
+\appendtoks
+ \globalresetsystemmode{pairedbox}%
+\to \everyinsidefloat
+
+\installcorenamespace {pairedbox}
+
+\installcommandhandler \??pairedbox {pairedbox} \??pairedbox
+
+\setuppairedbox
+ [\c!n=1,
+ \c!distance=\bodyfontsize,
+ %\c!before=,
+ %\c!after=,
+ %\c!color=,
+ %\c!style=,
+ \c!inbetween={\blank[\v!medium]},
+ \c!width=\hsize,
+ \c!height=\vsize,
+ \c!maxwidth=\textwidth, % \makeupwidth,
+ \c!maxheight=\textheight, % \makeupheight,
+ %\c!bodyfont=,
+ %\c!align=,
+ \c!location=\v!bottom]
+
+% watch the hsize/vsize tricks
+
+\newbox \b_pack_pairedboxes_first
+\newbox \b_pack_pairedboxes_second
+\newdimen\s_pack_pairedboxes_size
+
+\appendtoks
+ \frozen\instance\setuevalue{\e!setup\currentpairedbox\e!endsetup}{\setuppairedbox [\currentpairedbox]}%
+ \frozen\instance\setuevalue{\e!place\currentpairedbox }{\placepairedbox [\currentpairedbox]}% one argument is mandate anyway
+ \frozen\instance\setuevalue{\e!start\e!place\currentpairedbox }{\startplacepairedbox[\currentpairedbox]}% one argument is mandate anyway
+ \frozen\instance\setuevalue{\e!stop\e!place \currentpairedbox }{\stopplacepairedbox }%
+\to \everydefinepairedbox
+
+\permanent\tolerant\protected\def\startplacepairedbox[#1]#*[#2]%
+ {\bgroup
+ \edef\currentpairedbox{#1}%
+ \setupcurrentpairedbox[#2]%
+ \pairedboxparameter\c!before
+ \bgroup
+ \edef\p_location{\pairedboxparameter\c!location}%
+ \edef\p_n {\pairedboxparameter\c!n}%
+ %
+ \enforced\let\startcontent\pack_common_content_start
+ \enforced\let\stopcontent \pack_common_content_stop
+ \enforced\let\startcaption\pack_common_caption_start
+ \enforced\let\stopcaption \pack_common_caption_stop
+ %
+ \globalsetsystemmode{pairedbox}%
+ \pack_pairedboxes_before
+ \expandafterpars\pack_pairedboxes_first_pickup}
+
+\permanent\protected\def\stopplacepairedbox{} % we just pick up two boxes
+
+\aliased\let\placepairedbox\startplacepairedbox % we just pick up two boxes
+
+\def\pack_pairedboxes_first_pickup
+ {\dowithnextboxcs\pack_pairedboxes_first\hbox
+ \bgroup
+ \let\next=}
+
+\def\pack_pairedboxes_first
+ {\pack_pairedboxes_between
+ \expandafterpars\pack_pairedboxes_second_pickup}
+
+\def\pack_pairedboxes_second_pickup
+ {\dowithnextboxcs\pack_pairedboxes_second\vbox
+ \bgroup
+ \pack_pairedboxes_inside_second
+ \let\next=}
+
+\def\pack_pairedboxes_second
+ {\pack_pairedboxes_after
+ \egroup
+ \pairedboxparameter\c!after
+ \egroup}
+
+\newconditional\c_pack_pairedboxes_horizontal \settrue\c_pack_pairedboxes_horizontal
+
+\installcorenamespace{pairedboxnature}
+\installcorenamespace{pairedboxalign}
+
+\let\pack_pairedboxes_flush \relax
+\let\pack_pairedboxes_fill_top \relax
+\let\pack_pairedboxes_fill_bottom\relax
+
+\defcsname\??pairedboxnature\v!left\endcsname
+ {\settrue\c_pack_pairedboxes_horizontal
+ \let\pack_pairedboxes_flush\pack_pairedboxes_flush_left}
+
+\defcsname\??pairedboxnature\v!right\endcsname
+ {\settrue\c_pack_pairedboxes_horizontal
+ \let\pack_pairedboxes_flush\pack_pairedboxes_flush_right}
+
+\defcsname\??pairedboxnature\v!top\endcsname
+ {\setfalse\c_pack_pairedboxes_horizontal
+ \let\pack_pairedboxes_fill_top\relax
+ \let\pack_pairedboxes_fill_bottom\vss
+ \let\pack_pairedboxes_flush\pack_pairedboxes_flush_top}
+
+\defcsname\??pairedboxnature\v!bottom\endcsname
+ {\setfalse\c_pack_pairedboxes_horizontal
+ \let\pack_pairedboxes_fill_top\vss
+ \let\pack_pairedboxes_fill_bottom\relax
+ \let\pack_pairedboxes_flush\pack_pairedboxes_flush_bottom}
+
+\def\pack_pairedboxes_flush_left
+ {\box\b_pack_pairedboxes_second
+ \kern\pairedboxparameter\c!distance
+ \box\b_pack_pairedboxes_first}
+
+\def\pack_pairedboxes_flush_right
+ {\box\b_pack_pairedboxes_first
+ \kern\pairedboxparameter\c!distance
+ \box\b_pack_pairedboxes_second}
+
+\def\pack_pairedboxes_flush_top
+ {\box\b_pack_pairedboxes_second
+ \endgraf
+ \nointerlineskip
+ \pairedboxparameter\c!inbetween
+ \box\b_pack_pairedboxes_first}
+
+\def\pack_pairedboxes_flush_bottom
+ {\box\b_pack_pairedboxes_first
+ \endgraf
+ \nointerlineskip
+ \pairedboxparameter\c!inbetween
+ \box\b_pack_pairedboxes_second}
+
+\let\pack_pairedboxes_align_l\relax
+\let\pack_pairedboxes_align_r\relax
+\let\pack_pairedboxes_align_t\relax
+\let\pack_pairedboxes_align_b\relax
+
+\defcsname\??pairedboxalign\v!left\endcsname % 0
+ {\let\pack_pairedboxes_align_l\relax
+ \let\pack_pairedboxes_align_r\hss
+ \let\pack_pairedboxes_align_t\relax
+ \let\pack_pairedboxes_align_b\relax}
+
+\defcsname\??pairedboxalign\v!right\endcsname % 1
+ {\let\pack_pairedboxes_align_l\hss
+ \let\pack_pairedboxes_align_r\relax
+ \let\pack_pairedboxes_align_t\relax
+ \let\pack_pairedboxes_align_b\relax}
+
+\defcsname\??pairedboxalign\v!high\endcsname % 2
+ {\let\pack_pairedboxes_align_l\relax
+ \let\pack_pairedboxes_align_r\relax
+ \let\pack_pairedboxes_align_t\relax
+ \let\pack_pairedboxes_align_b\vss}
+
+\defcsname\??pairedboxalign\v!low\endcsname % 3
+ {\let\pack_pairedboxes_align_l\relax
+ \let\pack_pairedboxes_align_r\relax
+ \let\pack_pairedboxes_align_t\vss
+ \let\pack_pairedboxes_align_b\relax}
+
+\defcsname\??pairedboxalign\v!middle\endcsname % 4
+ {\let\pack_pairedboxes_align_l\hss
+ \let\pack_pairedboxes_align_r\hss
+ \let\pack_pairedboxes_align_t\vss
+ \let\pack_pairedboxes_align_b\vss}
+
+\defcsname\??pairedboxalign\v!bottom\endcsname{\csname\??pairedboxalign\v!low \endcsname}
+\defcsname\??pairedboxalign \v!top\endcsname{\csname\??pairedboxalign\v!high\endcsname}
+
+\def\pack_pairedbox_valign#1{\setbox#1\vpack to \s_pack_pairedboxes_size{\pack_pairedboxes_align_t\box#1\pack_pairedboxes_align_b}}
+\def\pack_pairedbox_halign#1{\setbox#1\hpack to \s_pack_pairedboxes_size{\pack_pairedboxes_align_l\box#1\pack_pairedboxes_align_r}}
+
+\def\pack_pairedboxes_before
+ {\ifempty\p_location
+ \csname\??pairedboxnature\v!left \endcsname
+ \csname\??pairedboxalign \v!middle\endcsname
+ \else
+ \getfromcommacommand[\p_location][1]%
+ \csname\??pairedboxnature
+ \ifcsname\??pairedboxnature\commalistelement\endcsname\commalistelement\else\v!left\fi
+ \endcsname
+ \getfromcommacommand[\p_location][2]%
+ \csname\??pairedboxalign
+ \ifcsname\??pairedboxalign\commalistelement\endcsname\commalistelement\else\v!middle\fi
+ \endcsname
+ \fi}
+
+\def\pack_pairedboxes_between
+ {\usebodyfontparameter\pairedboxparameter
+ \setbox\b_pack_pairedboxes_first\box\nextbox
+ \ifconditional\c_pack_pairedboxes_horizontal
+ \pack_pairedboxes_between_horizontal
+ \else
+ \pack_pairedboxes_between_vertical
+ \fi
+ \ifnum\p_n>\plusone
+ \setrigidcolumnhsize\hsize{\pairedboxparameter\c!distance}\p_n
+ \fi}
+
+\def\pack_pairedboxes_between_horizontal
+ {\scratchdistance\pairedboxparameter\c!distance
+ \scratchwidth\pairedboxparameter\c!maxwidth\relax
+ \setlocalhsize
+ \hsize\dimexpr\availablehsize-\wd\b_pack_pairedboxes_first-\scratchdistance\relax
+ \hsize\pairedboxparameter\c!width\relax % can be \hsize
+ \scratchdimen\dimexpr\wd\b_pack_pairedboxes_first+\scratchdistance\relax
+ \ifdim\dimexpr\hsize+\scratchdimen\relax>\scratchwidth
+ \hsize\dimexpr\scratchwidth-\scratchdimen\relax
+ \fi}
+
+\def\pack_pairedboxes_between_vertical
+ {\scratchwidth\pairedboxparameter\c!maxwidth\relax
+ \hsize\wd\b_pack_pairedboxes_first
+ \hsize\pairedboxparameter\c!width\relax % can be \hsize
+ \ifdim\hsize>\scratchwidth\relax
+ \hsize\scratchwidth
+ \fi}
+
+\def\pack_pairedboxes_after
+ {\setbox\b_pack_pairedboxes_second\vpack
+ {\ifnum\p_n>\plusone
+ \rigidcolumnbalance\nextbox
+ \else
+ \box\nextbox
+ \fi}%
+ \ifconditional\c_pack_pairedboxes_horizontal
+ \pack_pairedboxes_pack_horizontal
+ \else
+ \pack_pairedboxes_pack_vertical
+ \fi}
+
+\def\pack_pairedboxes_pack_horizontal
+ {\dontleavehmode\hbox\bgroup
+ \forgetall
+ \s_pack_pairedboxes_size\ht
+ \ifdim\ht\b_pack_pairedboxes_first>\ht\b_pack_pairedboxes_second
+ \b_pack_pairedboxes_first
+ \else
+ \b_pack_pairedboxes_second
+ \fi
+ \vsize\s_pack_pairedboxes_size
+ \ifdim\s_pack_pairedboxes_size<\pairedboxparameter\c!height\relax % can be \vsize
+ \s_pack_pairedboxes_size\pairedboxparameter\c!height
+ \fi
+ \ifdim\s_pack_pairedboxes_size>\pairedboxparameter\c!maxheight\relax
+ \s_pack_pairedboxes_size\pairedboxparameter\c!maxheight
+ \fi
+ \pack_pairedbox_valign\b_pack_pairedboxes_first
+ \pack_pairedbox_valign\b_pack_pairedboxes_second
+ \pack_pairedboxes_flush
+ \egroup}
+
+\def\pack_pairedboxes_pack_vertical
+ {\dontleavehmode\vpack\bgroup
+ \forgetall
+ \s_pack_pairedboxes_size\wd
+ \ifdim\wd\b_pack_pairedboxes_first>\wd\b_pack_pairedboxes_second
+ \b_pack_pairedboxes_first
+ \else
+ \b_pack_pairedboxes_second
+ \fi
+ \pack_pairedbox_halign\b_pack_pairedboxes_first
+ \pack_pairedbox_halign\b_pack_pairedboxes_second
+ \s_pack_pairedboxes_size\ht\b_pack_pairedboxes_second
+ \vsize\s_pack_pairedboxes_size
+ \ifdim\ht\b_pack_pairedboxes_second<\pairedboxparameter\c!height\relax % can be \vsize
+ \s_pack_pairedboxes_size\pairedboxparameter\c!height\relax % \relax needed
+ \fi
+ \ifdim\s_pack_pairedboxes_size>\pairedboxparameter\c!maxheight\relax % todo: totale hoogte
+ \s_pack_pairedboxes_size\pairedboxparameter\c!maxheight\relax % \relax needed
+ \fi
+ \ifdim\s_pack_pairedboxes_size>\ht\b_pack_pairedboxes_second
+ \setbox\b_pack_pairedboxes_second\vpack to \s_pack_pairedboxes_size
+ {\pack_pairedboxes_fill_top
+ \box\b_pack_pairedboxes_second
+ \pack_pairedboxes_fill_bottom}% \kern\zeropoint
+ \fi
+ \pack_pairedboxes_flush
+ \egroup}
+
+\def\pack_pairedboxes_inside_second
+ {\forgetall
+ \setupalign[\pairedboxparameter\c!align]%
+ \usepairedboxstyleandcolor\c!style\c!color
+ \tolerantTABLEbreaktrue % hm.
+ \blank[\v!disable]% use fast one
+ \everypar{\begstrut}} % also flushers here (see bTABLE)
+
+\definepairedbox[\v!legend]
+
+\permanent\protected\def\placeontopofeachother{\bgroup\dowithnextboxcs\pack_topofeachother_one\hbox}
+\permanent\protected\def\placesidebyside {\bgroup\dowithnextboxcs\pack_sidebyside_one \hbox}
+
+\def\pack_topofeachother_one{\bgroup\setbox\scratchboxone\box\nextbox\dowithnextboxcs\pack_topofeachother_two\hbox}
+\def\pack_sidebyside_one {\bgroup\setbox\scratchboxone\box\nextbox\dowithnextboxcs\pack_sidebyside_two \hbox}
+
+\def\pack_topofeachother_two{\setbox\scratchboxtwo\box\nextbox
+ \halign{\hss\alignmark\alignmark\hss\cr\box\scratchboxone\cr\box\scratchboxtwo\cr}%
+ \egroup\egroup}
+\def\pack_sidebyside_two {\setbox\scratchboxtwo\box\nextbox
+ \valign{\vss\alignmark\alignmark\vss\cr\box\scratchboxone\cr\box\scratchboxtwo\cr}%
+ \egroup\egroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-cut.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-cut.mkxl
new file mode 100644
index 00000000000..0cd06ed43e8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-cut.mkxl
@@ -0,0 +1,164 @@
+%D \module
+%D [ file=pack-cut, % comes from core-vis/trac-vis
+%D version=1996.06.01,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=Cut boxes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D \macros
+%D {makecutbox, cuthbox, cutvbox, cutvtop}
+%D
+%D Although mainly used for marking the page, these macros can also serve local use.
+%D
+%D \startbuffer
+%D \setbox0=\vbox{a real \crlf vertical box} \makecutbox0
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This marked \type{\vbox} shows up as:
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D The alternative macros are used as:
+%D
+%D \startbuffer
+%D \cuthbox{a made cut box}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This is typeset as:
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D By setting the next macros one can influence the length of the marks as well as
+%D the horizontal and vertical divisions.
+
+\newdimen\d_pack_cutmarks_width
+\newdimen\d_pack_cutmarks_height
+\newdimen\d_pack_cutmarks_depth
+
+\newcount\horizontalcutmarks \horizontalcutmarks \plustwo
+\newcount\verticalcutmarks \verticalcutmarks \plustwo
+\newcount\cutmarkoffset \cutmarkoffset \plusone
+
+\mutable\let\cutmarksymbol \relax
+\mutable\let\cutmarktoptext \empty
+\mutable\let\cutmarkbottomtext \empty
+\mutable\let\cutmarkhoffset \empty
+\mutable\let\cutmarkvoffset \empty
+\mutable\def\cutmarklength {2\bodyfontsize}
+\mutable\def\cutmarkrulethickness{\onepoint}
+
+\permanent\protected\def\horizontalcuts
+ {\hpack to \d_pack_cutmarks_width
+ {\dorecurse\horizontalcutmarks{\vrule\s!width\cutmarkrulethickness\s!height\cutmarklength\hfill}%
+ \unskip}}
+
+\permanent\protected\def\verticalcuts
+ {\vpack to \dimexpr\d_pack_cutmarks_height+\d_pack_cutmarks_depth\relax
+ {\hsize\cutmarklength
+ \dorecurse\verticalcutmarks{\vrule\s!height\cutmarkrulethickness\s!width\hsize\vfill}%
+ \unskip}}
+
+\permanent\protected\def\baselinecuts
+ {\ifdim\d_pack_cutmarks_depth>\zeropoint
+ \vpack to \dimexpr\d_pack_cutmarks_height+\d_pack_cutmarks_depth\relax
+ {\hsize\dimexpr\cutmarklength/2\relax
+ \vskip\zeropoint\s!plus\d_pack_cutmarks_height
+ \vrule\s!height\cutmarkrulethickness\s!width\hsize
+ \vskip\zeropoint\s!plus\d_pack_cutmarks_depth}%
+ \fi}
+
+\permanent\protected\def\cutmarksymbols#1%
+ {\hpack to \d_pack_cutmarks_width
+ {\setbox\scratchbox\hbox to \cutmarklength
+ {\hss\infofont\cutmarksymbol\hss}%
+ \hss
+ \vpack to \cutmarklength
+ {\scratchdimen\dimexpr\cutmarklength/2\relax
+ \scratchskip \ifempty\cutmarkhoffset\cutmarkoffset\scratchdimen\else\cutmarkhoffset\fi
+ \vss
+ \hbox to \d_pack_cutmarks_width
+ {\llap{\copy\scratchbox\hskip\scratchskip}%
+ \hskip\scratchdimen\hss
+ \infofont#1%
+ \hss\hskip\scratchdimen
+ \rlap{\hskip\scratchskip\copy\scratchbox}}%
+ \vss}%
+ \hss}}
+
+\permanent\protected\def\makecutbox#1%
+ {\bgroup
+ \d_pack_cutmarks_height\ht#1%
+ \d_pack_cutmarks_depth \dp#1%
+ \d_pack_cutmarks_width \wd#1%
+ \setbox#1\hpack
+ {\dontcomplain
+ \forgetall
+ \boxmaxdepth\maxdimen
+ \offinterlineskip
+ \scratchdimen\dimexpr\cutmarklength/2\relax
+ \hsize\d_pack_cutmarks_width
+ \setbox\scratchbox\vpack
+ {\setbox\scratchbox\hpack{\horizontalcuts}%
+ \scratchskip\ifempty\cutmarkvoffset\cutmarkoffset\scratchdimen\else\cutmarkvoffset\fi
+ \tlap{\copy\scratchbox\vskip\scratchskip}%
+ \hpack to \d_pack_cutmarks_width
+ {\scratchskip\ifempty\cutmarkhoffset\cutmarkoffset\scratchdimen\else\cutmarkhoffset\fi
+ \setbox\scratchbox\hpack{\verticalcuts}%
+ \llap{\copy\scratchbox\hskip\scratchskip}%
+ \ifdim\d_pack_cutmarks_depth=\zeropoint
+ \hfill
+ \else
+ \bgroup
+ \setbox\scratchbox\hpack{\baselinecuts}%
+ \llap{\copy\scratchbox\hskip\scratchskip}%
+ \hfill
+ \rlap{\hskip\scratchskip\copy\scratchbox}%
+ \egroup
+ \fi
+ \rlap{\hskip\scratchskip\copy\scratchbox}}%
+ \blap{\vskip\scratchskip\copy\scratchbox}}%
+ \ht\scratchbox\d_pack_cutmarks_height
+ \dp\scratchbox\d_pack_cutmarks_depth
+ \wd\scratchbox\zeropoint
+ \startcolor[\defaulttextcolor]%
+ \box\scratchbox
+ \ifrelax\cutmarksymbol \else
+ \setbox\scratchbox\vpack
+ {\scratchskip\ifempty\cutmarkvoffset\cutmarkoffset\scratchdimen\else\cutmarkvoffset\fi
+ \vskip-\dimexpr\scratchskip+\cutmarklength\relax
+ \hpack{\cutmarksymbols\cutmarktoptext}%
+ \vskip\dimexpr\scratchskip+\d_pack_cutmarks_height+\d_pack_cutmarks_depth+\scratchskip\relax
+ \hpack{\cutmarksymbols\cutmarkbottomtext}}%
+ \ht\scratchbox\d_pack_cutmarks_height
+ \dp\scratchbox\d_pack_cutmarks_depth
+ \wd\scratchbox\zeropoint
+ \box\scratchbox
+ \fi
+ \stopcolor
+ \box#1}%
+ \wd#1\d_pack_cutmarks_width
+ \ht#1\d_pack_cutmarks_height
+ \dp#1\d_pack_cutmarks_depth
+ \egroup}
+
+\permanent\protected\def\cuthbox{\hpack\bgroup\dowithnextbox{\makecutbox\nextbox\flushnextbox\egroup}\hbox}
+\permanent\protected\def\cutvbox{\vpack\bgroup\dowithnextbox{\makecutbox\nextbox\flushnextbox\egroup}\vbox}
+\permanent\protected\def\cutvtop{\tpack\bgroup\dowithnextbox{\makecutbox\nextbox\flushnextbox\egroup}\vtop}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-fen.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-fen.mkxl
new file mode 100644
index 00000000000..fc9817f92f3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-fen.mkxl
@@ -0,0 +1,81 @@
+%D \module
+%D [ file=pack-fen,
+%D version=2011.07.21,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle= Fences for Ruled Content,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / Fences for Ruled Content}
+
+%D \startbuffer
+%D \useMPlibrary[meta-imp-hooks.mkiv]
+%D
+%D \framed[frame=off,bottomframe=righthook]{Bottom right hook}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+
+\unprotect
+
+\permanent\protected\def\installleftframerenderer#1#2%
+ {\defcsname\??framedleft\v!on#1\endcsname{\whateverleftframe{#2}}%
+ \letcsname\??framedleft\v!off#1\expandafter\endcsname\csname\??framedleft\v!on#1\endcsname}
+
+\permanent\protected\def\installrightframerenderer#1#2%
+ {\defcsname\??framedright\v!on#1\endcsname{\whateverrightframe{#2}}%
+ \letcsname\??framedright\v!off#1\expandafter\endcsname\csname\??framedright\v!on#1\endcsname}
+
+\permanent\protected\def\installtopframerenderer#1#2%
+ {\defcsname\??framedtop\v!on#1\endcsname{\whatevertopframe{#2}}%
+ \letcsname\??framedtop\v!off#1\expandafter\endcsname\csname\??framedtop\v!on#1\endcsname}
+
+\permanent\protected\def\installbottomframerenderer#1#2%
+ {\defcsname\??framedbottom\v!on#1\endcsname{\whateverbottomframe{#2}}%
+ \letcsname\??framedbottom\v!off#1\expandafter\endcsname\csname\??framedbottom\v!on#1\endcsname}
+
+\newbox\b_framed_rendered
+
+\permanent\protected\def\whateverleftframe#1%
+ {\pack_framed_overlay_initialize_indeed
+ \setbox\b_framed_rendered\vpack to \d_overlay_height{\vss#1\vss}%
+ \setbox\b_framed_rendered\hpack to \zeropoint{\box\b_framed_rendered\hss}%
+ \ht\b_framed_rendered\zeropoint
+ \dp\b_framed_rendered\zeropoint
+ \box\b_framed_rendered}
+
+\permanent\protected\def\whateverrightframe#1%
+ {\pack_framed_overlay_initialize_indeed
+ \setbox\b_framed_rendered\vpack to \d_overlay_height{\vss#1\vss}%
+ \setbox\b_framed_rendered\hpack to \zeropoint{\hss\box\b_framed_rendered}%
+ \ht\b_framed_rendered\zeropoint
+ \dp\b_framed_rendered\zeropoint
+ \box\b_framed_rendered}
+
+\permanent\protected\def\whatevertopframe#1%
+ {\pack_framed_overlay_initialize_indeed
+ \setbox\b_framed_rendered\hpack to \d_overlay_width{\hss#1\hss}%
+ \setbox\b_framed_rendered\vpack to \zeropoint{\box\b_framed_rendered\vss}%
+ \ht\b_framed_rendered\zeropoint
+ \dp\b_framed_rendered\zeropoint
+ \box\b_framed_rendered
+ \nointerlineskip}
+
+\permanent\protected\def\whateverbottomframe#1%
+ {\pack_framed_overlay_initialize_indeed
+ \setbox\b_framed_rendered\hpack to \d_overlay_width{\hss#1\hss}%
+ \setbox\b_framed_rendered\vpack to \zeropoint{\vss\box\b_framed_rendered}%
+ \ht\b_framed_rendered\zeropoint
+ \dp\b_framed_rendered\zeropoint
+ \box\b_framed_rendered}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-lyr.mkxl
index 43460092e7e..3c0352bf3d1 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-lyr.mkxl
@@ -32,18 +32,19 @@
\ifdefined\defineoverlay \else \message{loaded to early} \wait \fi
-\unexpanded\def\defineoverlay
- {\dotripleempty\pack_framed_define_overlay}
+\pushoverloadmode
-\def\pack_framed_define_overlay[#1][#2][#3]% overlay [layer] content
- {\ifthirdargument
+\permanent\overloaded\tolerant\protected\def\defineoverlay[#1]#*[#2]#*[#3]% overlay [layer] content
+ {\ifnum\lastarguments=\plusthree
%\writestatus{BEWARE}{This (overlay definition) has changed!}% temp
- \def\pack_framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\setlayer[#2]{\executedefinedoverlay{##1}{#3}}}}%
+ \def\pack_framed_define_overlay_indeed##1{\defcsname\??overlay##1\endcsname{\setlayer[#2]{\executedefinedoverlay{##1}{#3}}}}%
\else
- \def\pack_framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\executedefinedoverlay{##1}{#2}}}%
+ \def\pack_framed_define_overlay_indeed##1{\defcsname\??overlay##1\endcsname{\executedefinedoverlay{##1}{#2}}}%
\fi
\processcommalist[#1]\pack_framed_define_overlay_indeed}
+\popoverloadmode
+
%D We use the command handler code. The previous, more direct parameter handling was
%D 25\% faster when no parameters were passed when adding content to a layer.
%D However, when we pass for instance a preset, the new methos is some 10\% faster
@@ -94,7 +95,7 @@
\c!sy=1,
\c!region=\layeranchor]
-\def\layeranchor{\currentlayer:\the\realpageno}
+\permanent\def\layeranchor{\currentlayer:\the\realpageno}
\let\p_pack_layers_doublesided\empty
\let\p_pack_layers_state \empty
@@ -130,7 +131,7 @@
\newconditional\c_pack_layers_trace
\newcount \c_pack_layers_current_data
-\newbox\b_layers
+\newbox\b_layers \pushoverloadmode \mutable\let\b_layers\b_layers \popoverloadmode
\newdimen\d_pack_layers_x_size
\newdimen\d_pack_layers_y_size
@@ -142,11 +143,11 @@
\newdimen\layerwidth
\newdimen\layerheight
-\let\lastlayerxpos\!!zeropoint
-\let\lastlayerypos\!!zeropoint
-\let\lastlayerwd \!!zeropoint
-\let\lastlayerht \!!zeropoint
-\let\lastlayerdp \!!zeropoint
+\mutable\let\lastlayerxpos\!!zeropoint
+\mutable\let\lastlayerypos\!!zeropoint
+\mutable\let\lastlayerwd \!!zeropoint
+\mutable\let\lastlayerht \!!zeropoint
+\mutable\let\lastlayerdp \!!zeropoint
\appendtoks
\edef\p_pack_layers_doublesided{\layerparameter\c!doublesided}%
@@ -178,7 +179,7 @@
\global\setbox\lastnamedcs\emptybox
\fi}
-\def\resetlayer[#1]%
+\permanent\protected\def\resetlayer[#1]%
{\pack_layers_reset_box{#1}%
\pack_layers_reset_box{\v!left #1}%
\pack_layers_reset_box{\v!right#1}%
@@ -195,37 +196,36 @@
%D \setlayer [identifier] [optional parameters] {data}
%D \stoptyping
-\def\setcurrentlayerdimensions
- {\dodoubleempty\pack_layers_set_current_dimensions}
+\mutable\let\currentlayerwidth \empty
+\mutable\let\currentlayerheight\empty
-\def\pack_layers_set_current_dimensions[#1][#2]% name left|right
+\permanent\tolerant\protected\def\setcurrentlayerdimensions[#1]#*[#2]% name left|right
{\edef\currentlayerwidth {\thelayerwidth {#2#1}}%
\edef\currentlayerheight{\thelayerheight{#2#1}}}
-\def\thelayerwidth #1{\the\ifcsname\??layerbox#1\endcsname\wd\lastnamedcs\else\zeropoint\fi}
-\def\thelayerheight#1{\the\ifcsname\??layerbox#1\endcsname\ht\lastnamedcs\else\zeropoint\fi}
-
-\unexpanded\def\setlayer
- {\dotripleempty\pack_layers_set}
+\permanent\def\thelayerwidth #1{\the\ifcsname\??layerbox#1\endcsname\wd\lastnamedcs\else\zeropoint\fi}
+\permanent\def\thelayerheight#1{\the\ifcsname\??layerbox#1\endcsname\ht\lastnamedcs\else\zeropoint\fi}
-\def\pack_layers_set[#1][#2][#3]% #4 == box do \fi is ok
+\permanent\tolerant\protected\def\setlayer[#1]#*[#2]#*[#3]% #4 == box do \fi is ok
{\bgroup
+ \nofarguments\lastarguments
\checkpositionoverlays % otherwise funny regions
\edef\currentlayer{#1}%
\edef\p_pack_layers_state{\layerparameter\c!state}%
\ifx\p_pack_layers_state\v!stop
\dowithnextboxcs\egroup\hbox % no pack ?
- \orelse\ifthirdargument
- \pack_layers_set_indeed[#1][#2][#3]%
+ \orelse\ifnum\nofarguments=\plusthree
+ \edef\m_pack_layers_target{#2}%
+ \pack_layers_set_indeed{#3}%
+ \orelse\ifhastok={#2}%
+ \let\m_pack_layers_target\empty
+ \pack_layers_set_indeed{#2}%
\else
- \ifcondition\validassignment{#2}%
- \pack_layers_set_indeed[#1][][#2]%
- \else
- \pack_layers_set_indeed[#1][#2][]%
- \fi
+ \edef\m_pack_layers_target{#2}%
+ \pack_layers_set_indeed\empty
\fi}
-\def\pack_layers_set_indeed[#1][#2][#3]% #2 = links/rechts
+\def\pack_layers_set_indeed#1%
{\page_backgrounds_recalculate % brrr
\global\advance\c_pack_layers_current_data\plusone
\forgetall
@@ -235,8 +235,7 @@
\settrue\c_pack_layers_trace
\traceboxplacementtrue
\fi
- \edef\m_pack_layers_target{#2}%
- \dowithnextbox{\pack_layers_set_finish{#3}}\hbox}
+ \dowithnextbox{\pack_layers_set_finish{#1}}\hbox}
\def\pack_layers_set_finish#1%
{\ifcsname\??layerbox\currentlayer\endcsname % can move up
@@ -295,13 +294,16 @@
\doifinset\v!middle\p_pack_layers_corner\pack_layers_set_middle_positions
\edef\m_pack_layers_page{\layerparameter\c!page}}
-\unexpanded\def\definelayerpreset
- {\dodoubleargument\pack_layers_define_preset}
+\permanent\tolerant\protected\def\definelayerpreset[#1]#*[#2]%
+ {\ifarguments\or
+ \letcsname\??layerpreset#1\endcsname\empty
+ \orelse\ifhastok={#2}%
+ \defcsname\??layerpreset#1\endcsname{\setupcurrentlayer[#2]}%
+ \else
+ \defcsname\??layerpreset#1\endcsname{\csname\??layerpreset#2\endcsname}%
+ \fi}
-\def\pack_layers_define_preset[#1][#2]%
- {\doifelseassignment{#2}
- {\setvalue{\??layerpreset#1}{\setupcurrentlayer[#2]}}
- {\setvalue{\??layerpreset#1}{\csname\??layerpreset#2\endcsname}}}
+\mutable\integerdef\b_layers_page\zerocount
\def\pack_layers_set_content#1%
{\layerwidth \layerparameter\c!width % global (local later)
@@ -342,7 +344,7 @@
\let\p_pack_layers_height \zeropoint
\let\p_pack_layers_position\v!yes
\fi
- \ifx\p_pack_layers_rotation\empty \else
+ \ifempty\p_pack_layers_rotation \else
% use direct call
\setbox\nextbox\hpack
{\rotate[\c!location=\v!high,\c!rotation=\layerparameter\c!rotation]{\box\nextbox}}%
@@ -359,30 +361,30 @@
\pack_layers_set_last_position_nop
\fi
%
- \ifx\m_pack_layers_page\empty \else % is expanded
+ \ifempty\m_pack_layers_page \else % is expanded
\edef\m_pack_layers_page{:\m_pack_layers_page}%
\ifcsname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname \else
\expandafter\newbox\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
\fi
\fi
- \chardef\layerpagebox\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
- \ifvoid\layerpagebox
- \gsetboxllx\layerpagebox\zeropoint
- \gsetboxlly\layerpagebox\zeropoint
+ \integerdef\b_layers_page\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
+ \ifvoid\b_layers_page
+ \gsetboxllx\b_layers_page\zeropoint
+ \gsetboxlly\b_layers_page\zeropoint
\fi
- \global\setbox\layerpagebox\vpack %to \layerparameter\c!height % new, otherwise no negative y possible
+ \global\setbox\b_layers_page\vpack %to \layerparameter\c!height % new, otherwise no negative y possible
{\offinterlineskip
- \ifvoid\layerpagebox
- \let\lastlayerwidth \zeropoint
- \let\lastlayerheight\zeropoint
+ \ifvoid\b_layers_page
+ \scratchwidth \zeropoint
+ \scratchheight\zeropoint
\else
- \edef\lastlayerwidth {\the\wd\layerpagebox}%
- \edef\lastlayerheight{\the\ht\layerpagebox}%
- \ht\layerpagebox\zeropoint
- \dp\layerpagebox\zeropoint
- \wd\layerpagebox\zeropoint
+ \scratchwidth \wd\b_layers_page
+ \scratchheight\ht\b_layers_page
+ \ht\b_layers_page\zeropoint
+ \dp\b_layers_page\zeropoint
+ \wd\b_layers_page\zeropoint
\ifx\p_pack_layers_direction\v!reverse\else
- \box\layerpagebox
+ \box\b_layers_page
\fi
\fi
% don't move
@@ -409,18 +411,18 @@
\fi
% ll registration
\scratchdimen\dimexpr\d_pack_layers_x_position+\d_pack_layers_x_offset\relax
- \ifdim\scratchdimen<\getboxllx\layerpagebox
- \gsetboxllx\layerpagebox\scratchdimen
+ \ifdim\scratchdimen<\getboxllx\b_layers_page
+ \gsetboxllx\b_layers_page\scratchdimen
\fi
\advance\scratchdimen\wd\nextbox
- \wd\nextbox\ifdim\scratchdimen>\lastlayerwidth \scratchdimen \else \lastlayerwidth \fi
+ \wd\nextbox\ifdim\scratchdimen>\scratchwidth \scratchdimen \else \scratchwidth \fi
\scratchdimen\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
- \ifdim\scratchdimen<\getboxlly\layerpagebox
- \gsetboxlly\layerpagebox\scratchdimen
+ \ifdim\scratchdimen<\getboxlly\b_layers_page
+ \gsetboxlly\b_layers_page\scratchdimen
\fi
% ll compensation
\advance\scratchdimen\dimexpr\ht\nextbox+\dp\nextbox\relax
- \ht\nextbox\ifdim\scratchdimen>\lastlayerheight \scratchdimen \else \lastlayerheight \fi
+ \ht\nextbox\ifdim\scratchdimen>\scratchheight \scratchdimen \else \scratchheight \fi
\dp\nextbox\zeropoint
% placement
\hsize\p_pack_layers_width
@@ -431,12 +433,12 @@
% or maybe instead of the \vskip
% \raise-\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
\box\nextbox
- \ifvoid\layerpagebox
+ \ifvoid\b_layers_page
% already flushed
\else
% the reverse case % check !
\vskip-\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
- \box\layerpagebox
+ \box\b_layers_page
\fi
\egroup}%
% when position is true, the layerbox holds the compensation and needs
@@ -477,7 +479,7 @@
%D \macros
%D {doifelselayerdata}
-\def\doifelselayerdata#1%
+\permanent\def\doifelselayerdata#1%
{\ifcsname\??layerbox#1\endcsname
%\ifvoid\csname\??layerbox#1\endcsname
\ifvoid\lastnamedcs
@@ -489,7 +491,7 @@
\expandafter\secondoftwoarguments
\fi}
-\let\doiflayerdataelse\doifelselayerdata
+\aliased\let\doiflayerdataelse\doifelselayerdata
%D \macros
%D {flushlayer}
@@ -500,7 +502,7 @@
% todo: setups before flush, handy hook
-\unexpanded\def\flushlayer[#1]% quite core, so optimized (todo: check for void)
+\permanent\protected\def\flushlayer[#1]% quite core, so optimized (todo: check for void)
{\begingroup
\forgetall
\edef\currentlayer{#1}%
@@ -529,21 +531,10 @@
\fi
\endgroup}
-% \def\pack_layers_flush_single
-% {\startoverlay
-% {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}%
-% {\ifcsname\??layerbox \currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\fi}%
-% \stopoverlay}
-%
-% \def\pack_layers_flush_double#1%
-% {\startoverlay
-% {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}%
-% {\ifcsname\??layerbox \currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount {\currentlayer:\the\realpageno}\fi}%
-% {\ifcsname\??layerbox#1\currentlayer \endcsname\pack_layers_flush_indeed\plusone {#1\currentlayer }\fi}%
-% {\ifcsname\??layerbox#1\currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount{#1\currentlayer:\the\realpageno}\fi}%
-% \stopoverlay}
+% optimized
-% optimized:
+\mutable\integerdef\b_layer_one\zerocount
+\mutable\integerdef\b_layer_two\zerocount
\def\pack_layers_flush_single
{\ifcsname\??layerbox\currentlayer\endcsname
@@ -555,10 +546,10 @@
\fi
\fi
\else
- \chardef\b_layer_one\lastnamedcs
+ \chardef\b_layer_one\lastnamedcs % will be \integerdef
\ifcsname\??layerbox\currentlayer:\the\realpageno\endcsname
\ifvoid\lastnamedcs\else
- \chardef\b_layer_two\lastnamedcs
+ \chardef\b_layer_two\lastnamedcs % will be \integerdef
\startoverlay
{\pack_layers_flush_indeed\plusone \currentlayer \b_layer_one}%
{\pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\b_layer_two}%
@@ -606,7 +597,6 @@
\let\pack_layers_top_fill \relax
\let\pack_layers_bottom_fill\vss
-%def\pack_layers_flush_indeed#1#2%
\def\pack_layers_flush_indeed#1#2#3%
{\begingroup % already grouped
\offinterlineskip
@@ -670,8 +660,7 @@
% \edef\p_pack_layers_position{\layerparameter\c!position}% local
\ifx\p_pack_layers_position\v!yes
\edef\p_pack_layers_region{\layerparameter\c!region}%
- \ifx\p_pack_layers_region\empty
- \else
+ \ifempty\p_pack_layers_region\else
\anch_mark_tagged_box\nextbox\p_pack_layers_region % was \layeranchor
\fi
\fi
@@ -706,9 +695,9 @@
%D This is a handy shortcut, which saves a couple of braces when we use it as
%D parameter. This name also suits better to other layering commands.
-\unexpanded\def\composedlayer#1{\flushlayer[#1]}
+\permanent\protected\def\composedlayer#1{\flushlayer[#1]}
-\unexpanded\def\tightlayer[#1]%
+\permanent\protected\def\tightlayer[#1]%
{\hpack
{\def\currentlayer{#1}% todo: left/right
\setbox\nextbox\emptybox
@@ -716,7 +705,7 @@
\d_overlay_height\layerparameter\c!height
\composedlayer{#1}}}
-\let\placelayer\flushlayer
+\aliased\let\placelayer\flushlayer
%D \macros
%D {setMPlayer}
@@ -748,21 +737,15 @@
%D {\useMPgraphic{oeps}}
%D \stoptyping
-\unexpanded\def\setMPlayer
- {\dotripleempty\pack_layers_set_MP}
+\mutable\def\MPlayerwidth {\hsize}
+\mutable\def\MPlayerheight{\vsize}
-\def\MPlayerwidth {\hsize}
-\def\MPlayerheight{\vsize}
-
-\def\pack_layers_set_MP[#1][#2][#3]%
+\permanent\tolerant\protected\def\setMPlayer[#1]#*[#2]#*[#3]%
{\edef\MPlayerwidth {\MPw{#2}}%
\edef\MPlayerheight{\MPh{#2}}%
\setlayer[#1][\c!x=\MPx{#2},\c!y=\MPy{#2},\c!position=\v!no,#3]}
-\unexpanded\def\getMPlayer
- {\dodoubleempty\pack_layers_get_MP}
-
-\def\pack_layers_get_MP[#1][#2]%
+\permanent\tolerant\protected\def\getMPlayer[#1]#*[#2]%
{\framed[\c!background={\v!foreground,#1},\c!frame=\v!off,\c!offset=\v!overlay,#2]} % takes argument
%D Watch out, a redefinition:
@@ -779,9 +762,11 @@
[\c!width=\innermakeupwidth,
\c!height=\textheight]
-\let\normalsettextpagecontent\settextpagecontent % will be overloaded in page-spr
+\aliased\let\normalsettextpagecontent\settextpagecontent % will be overloaded in page-spr
+
+\overloaded\aliased\let\normalsettextpagecontent\settextpagecontent % will be overloaded in page-spr
-\unexpanded\def\settextpagecontent#1#2#3% #2 and #3 will disappear
+\permanent\overloaded\protected\def\settextpagecontent#1#2#3% #2 and #3 will disappear
{\doifelselayerdata{OTRTEXT}
{\setbox#1\hpack to \makeupwidth
{\startoverlay
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-mis.mklx b/Master/texmf-dist/tex/context/base/mkxl/pack-mis.mklx
new file mode 100644
index 00000000000..5c63f533c6b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-mis.mklx
@@ -0,0 +1,112 @@
+%D \module
+%D [ file=pack-mis, % moved from e.g. core-mis
+%D version=1998.01.29,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Miscelaneous,
+%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 Packing Macros / Misc Commands}
+
+\unprotect
+
+% a quite old mechanism already (but inheritance added)
+%
+% \defineplacement[name][settings]
+% \setupplacement [name][settings]
+% \placement [name][settings]
+% \place<name> [settings]
+
+\installcorenamespace{placement}
+
+\installcommandhandler \??placement {placement} \??placement
+
+\appendtoks
+ \frozen\instance\setuevalue{\e!place\currentplacement}{\pack_placement{\currentplacement}}%
+\to \everydefineplacement
+
+\setupplacement
+ [\c!left=\hss,
+ \c!right=\hss,
+ \c!linecorrection=\v!off,
+ \c!depthcorrection=\v!off,
+ \c!grid=\v!middle,
+ %\c!before=,
+ %\c!after=,
+ \c!margin=\v!standard]
+
+\permanent\protected\def\placement[#tag]%
+ {\pack_placement{#tag}}
+
+\protected\def\pack_placement#tag%
+ {\bgroup
+ \edef\currentplacement{#tag}%
+ \doifelsenextoptionalcs\pack_placement_yes\pack_placement_nop}
+
+\def\pack_placement_yes[#settings]%
+ {\setupcurrentplacement[#settings]%
+ \pack_placement_nop}
+
+\def\pack_placement_nop
+ {\dowithnextboxcontentcs\forgetall\pack_placement_flush\vbox}
+
+\def\pack_placement_flush
+ {\setlocalhsize
+ \placementparameter\c!before
+ \begingroup
+ \disableparpositions
+ \setbox\nextbox\hbox to \localhsize
+ {\placementparameter\c!left
+ \flushnextbox
+ \placementparameter\c!right}%
+ %\ifinsidefloat \else
+ % \page_backgrounds_add_local_to_box\nextbox
+ %\fi
+\flushnotes % new per 2014-05-29 : todo: move them up in the mvl
+ \ifgridsnapping
+ \pack_placement_flush_grid_yes
+ \else
+ \pack_placement_flush_grid_nop
+ \fi
+ \endgroup
+ \placementparameter\c!after
+ \egroup}
+
+\def\pack_placement_flush_grid_yes
+ {\edef\p_grid{\placementparameter\c!grid}%
+ \ifempty\p_grid
+ \let\p_grid\v!middle
+ \fi
+ \pack_placement_flush_grid_noindent
+ \snaptogrid[\p_grid]\hbox{\box\nextbox}}
+
+\def\pack_placement_flush_grid_nop
+ {\edef\p_linecorrection {\placementparameter\c!linecorrection}%
+ \edef\p_depthcorrection{\placementparameter\c!depthcorrection}%
+ \ifx\p_linecorrection\v!on
+ \startbaselinecorrection
+ \fi
+ \pack_placement_flush_grid_noindent
+ \box\nextbox
+ \ifx\p_depthcorrection\v!on
+ \baselinecorrection
+ \fi
+ \ifx\p_linecorrection\v!on
+ \stopbaselinecorrection
+ \fi}
+
+\def\pack_placement_flush_grid_noindent
+ {\edef\p_margin{\placementparameter\c!margin}%
+ \ifx\p_margin\v!standard
+ \noindent
+ \orelse\ifx\p_margin\v!yes
+ \noindent
+ \fi}
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-mrl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-mrl.mkxl
new file mode 100644
index 00000000000..8bbeeb7985e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-mrl.mkxl
@@ -0,0 +1,845 @@
+%D \module
+%D [ file=pack-mrl, % was pack-rul/core-rul,
+%D version=1998.10.16,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=More Rules,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / More Rules}
+
+%D The (re)implementation of margin rules has been moved elsewhere.
+
+\unprotect
+
+%D \macros
+%D {setupblackrules,blackrule}
+%D
+%D The graphic capabilities of \TEX\ do not go beyond simple filled rules, except of
+%D course when using specials or, in \MKIV, manipulate node lists. Let's start with
+%D a warning: using this commands is far more slower than using the \TEX\ primitives
+%D \type {\hrule} and \type {\vrule}, but they save us some tokens. The
+%D characteristics of these rule drawing command can be set by:
+%D
+%D \showsetup{setupblackrules}
+%D
+%D The simple command draws only one rule. Its optional argument can be used to
+%D specify the dimensions. By setting the width, height or depth to \type {max}, one
+%D gets the natural dimensions.
+%D
+%D \showsetup{blackrule}
+
+\installcorenamespace{blackrules}
+
+\installsimplecommandhandler \??blackrules {blackrules} \??blackrules
+
+\permanent\protected\def\blackrule
+ {\hpack\bgroup
+ \doifelsenextoptionalcs\pack_black_rule_pickup\pack_black_rule_indeed}
+
+\def\pack_black_rule_pickup[#1]%
+ {\setupcurrentblackrules[#1]%
+ \pack_black_rule_indeed}
+
+\def\pack_black_rule_indeed
+ {\edef\p_width {\directblackrulesparameter\c!width }%
+ \edef\p_height{\directblackrulesparameter\c!height}%
+ \edef\p_depth {\directblackrulesparameter\c!depth }%
+ \ifx\p_height\v!max
+ \setstrut
+ \orelse\ifx\p_depth\v!max
+ \setstrut
+ \fi
+ \useblackrulesstyleandcolor\c!style\c!color
+ \ifcsname\??blackruletype\directblackrulesparameter\c!type\endcsname
+ \lastnamedcs
+ \else
+ \vrule
+ \fi
+ \ifx\p_width \v!max\s!width \emwidth\orelse\ifempty\p_width \else\s!width \p_width \fi
+ \ifx\p_height\v!max\s!height\strutht\orelse\ifempty\p_height\else\s!height\p_height\fi
+ \ifx\p_depth \v!max\s!depth \strutdp\orelse\ifempty\p_depth \else\s!depth \p_depth \fi
+ \egroup}
+
+\setupblackrules
+ [\c!width=\emwidth,
+ \c!height=\exheight,
+ \c!depth=\zeropoint,
+ \c!color=]
+
+%D \macros
+%D {blackrules}
+%D
+%D One can call for a sequence of black rules, if needed equally spaced over the
+%D given width.
+%D
+%D \showsetup{blackrules}
+%D
+%D The two alternative calls are therefore:
+%D
+%D \startbuffer
+%D Tell me, is this according to the \blackrules[n=6]?
+%D These \blackrules[alternativevariant=b,n=10,distance=.2em,width=4cm] are quite clear.
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or:
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D We could of course have implemented this macro using \type {\leaders}, but this
+%D would probably have taken more tokens.
+
+\permanent\tolerant\protected\def\blackrules[#1]% probably never used
+ {\hpack\bgroup
+ \ifarguments\or\setupcurrentblackrules[#1]\fi
+ \scratchwidth \directblackrulesparameter\c!width
+ \scratchheight \directblackrulesparameter\c!height
+ \scratchdepth \directblackrulesparameter\c!depth
+ \scratchdistance\directblackrulesparameter\c!distance
+ \scratchcounter \directblackrulesparameter\c!n
+ \edef\p_alternative{\blackrulesparameter\c!alternative}%
+ \ifx\p_alternative\c!b % why not just check distance
+ \ifnum\scratchcounter=\plusone
+ \scratchdistance\zeropoint
+ \else
+ \scratchwidth\dimexpr(\scratchwidth-\scratchcounter\scratchdistance+\scratchdistance)/\scratchcounter\relax
+ \fi
+ \fi
+ \useblackrulesstyleandcolor\c!style\c!color
+ % a typical case of where we can use a simple loop or even a leaders
+ \dorecurse\scratchcounter\pack_black_rules_step
+ \unskip
+ \egroup}
+
+\def\pack_black_rules_step
+ {\ifcsname\??blackruletype\directblackrulesparameter\c!type\endcsname
+ \lastnamedcs
+ \else
+ \vrule
+ \fi
+ \s!width \scratchwidth
+ \s!height\scratchheight
+ \s!depth \scratchdepth
+ \relax
+ \ifzeropt\scratchdistance\else
+ \hskip\scratchdistance
+ \fi}
+
+\installcorenamespace{blackruletype}
+
+\setvalue{\??blackruletype mp}%
+ {\frule
+ type {mp}%
+ data {\includeMPgraphic{\directblackrulesparameter\c!mp}}
+ line \dimexpr\directblackrulesparameter\c!rulethickness\relax
+ }
+
+\letvalue{\??blackruletype\s!no }\novrule
+%letvalue{\??blackruletype\s!yes}\vrule
+
+\setupblackrules
+ [\c!n=3,
+ \c!rulethickness=\linewidth,
+ \c!alternative=\c!a,
+ \c!distance=.25\emwidth,
+ \c!color=]
+
+%D \macros
+%D {vl, hl}
+%D
+%D The command \type {\vl} draws a vertical rule \vl\ with strut dimensions,
+%D multiplied with the factor specified in the optional argument. The height and
+%D depth are clipped \vl [3] to the baselinedistance. Its horizontal counterpart
+%D \type {\hl} draws a horizontal rule \hl\ with a width of 1em, multiplied with the
+%D optional factor. The horizontal rule is drawn on top of the baseline.
+%D
+%D \showsetup{vl}
+%D \showsetup{hl}
+
+\protected\def\pack_rule_vl_indeed#1#2#3%
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\hbox
+ {\vrule
+ \s!width #1\linewidth
+ \s!height#2\strutht
+ \s!depth #3\strutdp}%
+ \dp\scratchbox\strutdp
+ \ht\scratchbox\strutht
+ \box\scratchbox
+ \endgroup}
+
+\permanent\tolerant\protected\def\vl[#1]%
+ {\pack_rule_vl_indeed{#1}{#1}{#1}}
+
+\permanent\tolerant\protected\def\hl[#1]%
+ {\dontleavehmode
+ \hbox
+ {\vrule
+ \s!width #1\emwidth
+ \s!height\linewidth
+ \s!depth \zeropoint}}
+
+% \let\dovlwdhtdp\pack_rule_vl_indeed % used elsewhere .. not any more
+
+%D \macros
+%D {hairline, thinrule, thinrules, setupthinrules}
+%D
+%D Drawing thin lines can of course easily be accomplished by the \TEX\
+%D primitives \type{\hrule} and \type{\vrule}. The next few macros however
+%D free us from some specifications.
+%D
+%D \startbuffer
+%D some text
+%D
+%D \hairline
+%D
+%D some more text
+%D
+%D \thinrule
+%D
+%D more and more text
+%D
+%D hi \thinrule\ there
+%D
+%D and then the final text
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D becomes
+%D
+%D \startexample
+%D \getbuffer
+%D \stopexample
+%D
+%D So we've got
+%D
+%D \showsetup{hairline}
+%D \showsetup{thinrule}
+%D
+%D Both can be set up with:
+%D
+%D \showsetup{setupthinrules}
+%D
+%D We also have
+%D
+%D \showsetup{thinrules}
+%D
+%D which looks like: \thinrules[n=2]
+
+\installcorenamespace{thinrules}
+\installcorenamespace{thinrulealternatives}
+
+\installdirectcommandhandler \??thinrules {thinrules}
+
+\setupthinrules
+ [\c!interlinespace=\v!small,
+ \c!n=3,
+ \c!before=,
+ \c!inbetween={\blank[\v!white]},
+ \c!after=,
+ \c!color=,
+ \c!height=.5\linewidth,
+ \c!depth=.5\linewidth,
+ \c!frame=\v!on, % compatible with textbackgrounds
+ \c!alternative=\v!b,
+ \c!backgroundcolor=,
+ \c!background=,
+ \c!rulethickness=\linewidth]
+
+\letvalue{\??thinrulealternatives\v!a }\zerocount
+\letvalue{\??thinrulealternatives\v!b }\plusone
+\letvalue{\??thinrulealternatives\v!c }\plustwo
+\letvalue{\??thinrulealternatives\v!none}\zerocount
+
+\newconstant\c_pack_thinrules_type
+
+\permanent\protected\def\thinrule
+ {\strut
+ \bgroup
+ \edef\p_height {\directthinrulesparameter\c!height}%
+ \edef\p_depth {\directthinrulesparameter\c!depth}%
+ \edef\p_background{\directthinrulesparameter\c!background}%
+ \edef\p_frame {\directthinrulesparameter\c!frame}%
+ \linewidth\dimexpr\directthinrulesparameter\c!rulethickness/\plustwo\relax
+ \ifzeropt\linewidth
+ \c_pack_thinrules_type\zerocount
+ \orelse\ifx\p_frame\v!on
+ \c_pack_thinrules_type\expandnamespaceparameter\??thinrulealternatives\directthinrulesparameter\c!alternative\v!b\relax
+ \else
+ \c_pack_thinrules_type\zerocount
+ \fi
+ \ifnum\c_pack_thinrules_type=\plusone
+ \ifx\p_height\v!max
+ \scratchheight\strutht
+ \else
+ \setdimensionwithunit\scratchheight\p_height\strutht
+ \fi
+ \ifx\p_depth\v!max
+ \scratchdepth\strutdp
+ \else
+ \setdimensionwithunit\scratchdepth\p_depth\strutdp
+ \fi
+ \else
+ \scratchheight\strutht
+ \scratchdepth \strutdp
+ \fi
+ \ifx\p_background\v!color
+ \startcolor[\directthinrulesparameter\c!backgroundcolor]%
+ \ifnum\c_pack_thinrules_type=\plustwo % prevent overshoot due to rounding
+ \leaders
+ \hrule
+ \s!height\dimexpr\scratchheight-\linewidth\relax
+ \s!depth \dimexpr\scratchdepth -\linewidth\relax
+ \hfill
+ \else
+ \leaders
+ \hrule
+ \s!height\scratchheight
+ \s!depth \scratchdepth
+ \hfill
+ \fi
+ \stopcolor
+ \ifcase\c_pack_thinrules_type
+ % no rule
+ \or
+ \startcolor[\directthinrulesparameter\c!color]%
+ \hfillneg
+ \leaders
+ \hrule
+ \s!height\linewidth
+ \s!depth \linewidth
+ \hfill
+ \stopcolor
+ \or
+ \startcolor[\directthinrulesparameter\c!color]%
+ \hfillneg
+ \leaders
+ \hrule
+ \s!height\dimexpr-\scratchdepth+\linewidth\relax
+ \s!depth \scratchdepth
+ \hfill
+ \hfillneg
+ \leaders
+ \hrule
+ \s!height\scratchheight
+ \s!depth \dimexpr-\scratchheight+\linewidth\relax
+ \hfill
+ \stopcolor
+ \fi
+ \else
+ \ifcase\c_pack_thinrules_type
+ % no rule
+ \else
+ \startcolor[\directthinrulesparameter\c!color]%
+ \leaders
+ \hrule
+ \s!height\scratchheight
+ \s!depth \scratchdepth
+ \hfill
+ \stopcolor
+ \fi
+ \fi
+ \strut
+ \carryoverpar\egroup}
+
+\permanent\protected\def\hairline % can be overloaded
+ {\endgraf
+ \thinrule
+ \endgraf}
+
+\permanent\tolerant\protected\def\thinrules[#1]%
+ {\bgroup
+ \setupcurrentthinrules[#1]%
+ \scratchcounter\directthinrulesparameter\c!n\relax
+ \ifcase\scratchcounter
+ % nothing, not even before/after
+ \let\p_after\relax
+ \else
+ \assignvalue{\directthinrulesparameter\c!interlinespace}\m_pack_thinrules_interlinespace{1.0}{1.5}{2.0}%
+ \spacing\m_pack_thinrules_interlinespace
+ \edef\p_after {\directthinrulesparameter\c!after}%
+ \edef\p_inbetween{\directthinrulesparameter\c!inbetween}%
+ \directthinrulesparameter\c!before
+ \ifcase\scratchcounter\or
+ \thinrule
+ \else
+ \dorecurse\scratchcounter
+ {\ifnum\recurselevel=\scratchcounter \directvspacing\v!samepage \else % \penalty500
+ \ifnum\recurselevel=\plustwo \directvspacing\v!samepage \fi\fi % \penalty500
+ \thinrule
+ \ifnum\recurselevel<\scratchcounter\relax
+ % test needed, else messed up whitespace
+ \ifempty\p_inbetween
+ \softbreak % \ifhmode \hskip \parfillskip \break \fi
+ \else
+ \endgraf
+ \nowhitespace
+ \p_inbetween
+ \fi
+ \fi}%
+ \fi
+ \fi
+ \ifempty\p_after
+ \carryoverpar\egroup
+ \else
+ \p_after\egroup
+ \fi{}}
+
+%D A couple of examples are given below.
+%D
+%D \startbuffer
+%D \setupthinrules[n=3,inbetween=,color=gray]
+%D
+%D test test \thinrules\ test test \par
+%D test test \thinrules [color=green] test test \par
+%D test test \thinrules [height=max, depth=max] test test \par
+%D
+%D \setupthinrules[height=.9,depth=.9]
+%D
+%D test test \thinrules\ test test \par
+%D test test \thinrules [alternativevariant=b] test test \par
+%D test test \thinrules [alternativevariant=c] test test \par
+%D test test \thinrules [alternativevariant=c,inbetween=\vskip2ex] test test \par
+%D \stopbuffer
+%D
+%D \typebuffer {\getbuffer}
+%D
+%D There are a couple of alternative ways to visualize rules using backgrounds. At
+%D first sight these may look strange, but they make sense in educational settings.
+%D The alternatives are more or less compatible with the more advanced \METAPOST\
+%D based implementation.
+%D
+%D \startbuffer[a]
+%D \setupthinrules
+%D [n=2,
+%D backgroundcolor=gray ,
+%D rulethickness=1pt,
+%D colorkleur=donkerblauw,
+%D after=\blank,
+%D before=\blank]
+%D \stopbuffer
+%D
+%D \typebuffer[a]
+%D
+%D \startbuffer[b]
+%D \thinrules[alternativevariant=a]
+%D \thinrules[alternativevariant=b]
+%D \thinrules[alternativevariant=c]
+%D \stopbuffer
+%D
+%D \typebuffer[b] \getbuffer[a,b]
+%D
+%D \startbuffer[b]
+%D \thinrules[alternativevariant=a,background=color]
+%D \thinrules[alternativevariant=b,background=color]
+%D \thinrules[alternativevariant=c,background=color]
+%D \stopbuffer
+%D
+%D \typebuffer[b] \getbuffer[a,b]
+%D
+%D \startbuffer[b]
+%D \thinrules[alternativevariant=a,height=.8,depth=.8,background=color]
+%D \thinrules[alternativevariant=b,height=.8,depth=.8,background=color]
+%D \thinrules[alternativevariant=c,height=.8,depth=.8,background=color]
+%D \stopbuffer
+%D
+%D \typebuffer[b] \getbuffer[a,b]
+
+%D \macros
+%D {textrule, starttextrule, setuptextrules}
+%D
+%D Putting rules before and after a paragraph is very space sensitive, but the
+%D next command handles that quite well. It comes in two disguises:
+%D
+%D \startbuffer
+%D \textrule[top]{fragments}
+%D \input reich
+%D \textrule
+%D \stopbuffer
+%D
+%D \start \typebuffer \getbuffer \stop
+%D
+%D \startbuffer
+%D \setuptextrules
+%D [width=90pt,distance=12pt,rulecolor=blue,
+%D bodyfont=small,style=\sc,color=red]
+%D
+%D \starttextrule{Ship Building Tools}
+%D \nl \setuptolerance[tolerant] \input materie
+%D \stoptextrule
+%D \stopbuffer
+%D
+%D \bgroup \typebuffer \getbuffer \egroup
+%D
+%D \startbuffer
+%D \setuptextrules
+%D [location=inmargin,
+%D bodyfont=small,style=slantedbold]
+%D
+%D \starttextrule{wonderful}
+%D \input tufte
+%D \stoptextrule
+%D \stopbuffer
+%D
+%D \bgroup \typebuffer \getbuffer \egroup
+%D
+%D The formal definition of these commands is:
+%D
+%D \showsetup{textrule}
+%D \showsetup{starttextrule}
+%D \showsetup{setuptextrules}
+%D
+%D The implementation looks a bit complicated due to the optional arguments.
+
+\installcorenamespace{textrules}
+\installcorenamespace{textrulealternatives}
+
+\installdirectcommandhandler \??textrules {textrules}
+
+\setuptextrules
+ [\c!location=\v!left,
+ \c!before=\blank,
+ \c!after=\blank,
+ \c!inbetween=,
+ \c!width=2\emwidth,
+ \c!style=\v!bold,
+ \c!color=,
+ \c!rulecolor=,
+ \c!bodyfont=,
+ \c!depthcorrection=\v!on,
+ \c!rulethickness=\linewidth,
+ \c!distance=.5\emwidth]
+
+% can be done nicer with futureexpandis
+
+\permanent\tolerant\protected\def\textrule[#1]%
+ {\ifarguments
+ \expandafter\pack_textrule_nop
+ \else
+ \expandafter\pack_textrule_yes
+ \fi[#1]}
+
+\def\pack_textrule_yes[#1]%
+ {\expandnamespacevalue\??textrulealternatives{#1}\v!bottom}
+
+% \tolerant\def\pack_textrule_nop[#1]#:#=%
+% {\ifparameter#2\or
+% \expandafter\pack_textrule_nop_indeed_yes
+% \else
+% \expandafter\pack_textrule_nop_indeed_nop
+% \fi[#1]{#2}}
+
+\def\pack_textrule_nop[#1]%
+ {\doifelsenextbgroupcs\pack_textrule_nop_indeed_yes\pack_textrule_nop_indeed_nop}
+
+\def\pack_textrule_nop_indeed_yes{\csname\??textrulealternatives\v!top \endcsname}
+\def\pack_textrule_nop_indeed_nop{\csname\??textrulealternatives\v!bottom\endcsname\empty}
+
+%D\startbuffer
+%D\showstruts
+%D
+%D\setupwhitespace[none]
+%D
+%D\textrule[top]{test} xxxxx\smash{\strut} \textrule[bottom]{test}
+%D\textrule[top]{test} xxxxx\strut \textrule[bottom]{test}
+%D
+%D\setupwhitespace[big]
+%D
+%D\textrule[top]{test} xxxxx\smash{\strut} \textrule[bottom]{test}
+%D\textrule[top]{test} xxxxx\strut \textrule[bottom]{test}
+%D\stoptyping
+%D
+%D \typebuffer \start \getbuffer \stop
+
+\setvalue{\??textrulealternatives\v!top}#1%
+ {\page[\v!preference] % interferes
+ \directtextrulesparameter\c!before\relax
+ \blank[\v!samepage,\v!nowhite]%
+ \pack_textrule_with_text_yes{#1}%
+ \blank[\v!samepage,\v!nowhite]%
+ \directtextrulesparameter\c!inbetween\relax
+ \endgraf}
+
+\setvalue{\??textrulealternatives\v!bottom}#1%
+ {\blank[\v!samepage,\v!nowhite]%
+ \pack_textrule_following{#1}%
+ \blank[\v!samepage,\v!nowhite]%
+ \directtextrulesparameter\c!after\relax
+ \page[\v!preference]}
+
+\setvalue{\??textrulealternatives\v!middle}#1%
+ {\blank[\v!samepage,\v!nowhite]%
+ \directtextrulesparameter\c!inbetween\relax
+ \pack_textrule_following{#1}%
+ \blank[\v!samepage,\v!nowhite]%
+ \directtextrulesparameter\c!inbetween\relax
+ \page[\v!preference]}
+
+\def\pack_textrule_with_text_yes#1%
+ {\noindent % this will force side floats to be calculated
+ \bgroup
+ \setbox\scratchbox\hpack to \availablehsize
+ {\scratchwidth \directtextrulesparameter\c!rulethickness\relax
+ \scratchheight\dimexpr .5\exheight+.5\scratchwidth\relax
+ \scratchdepth \dimexpr-.5\exheight+.5\scratchwidth\relax
+ \doifsomething{#1}
+ {\doifelse{\directtextrulesparameter\c!location}\v!inmargin
+ {\llap
+ {\usetextrulesstyleandcolor\c!style\c!color
+ #1%
+ \hskip\leftmargindistance}}
+ {\color[\directtextrulesparameter\c!rulecolor]
+ {\vrule
+ \s!height\scratchheight
+ \s!depth \scratchdepth
+ \s!width \directtextrulesparameter\c!width}%
+ \hbox spread 2\dimexpr\directtextrulesparameter\c!distance\relax
+ {\hss
+ \usetextrulesstyleandcolor\c!style\c!color
+ \strut#1%
+ \hss}}}%
+ \color[\directtextrulesparameter\c!rulecolor]
+ {\leaders\hrule
+ \s!height\scratchheight
+ \s!depth \scratchdepth
+ \hfill}}%
+ \ht\scratchbox\strutht
+ \dp\scratchbox\strutdp
+ \box\scratchbox
+ %\carryoverpar
+ \egroup}
+
+\def\pack_textrule_with_text_nop#1%
+ {\ifhmode
+ \endgraf
+ \fi
+ \doifelse{\directtextrulesparameter\c!depthcorrection}\v!on
+ \pack_textrule_correct_depth_yes
+ \pack_textrule_correct_depth_nop
+ \nointerlineskip
+ \noindent\naturalvpack % was \dontleavehmode
+ {\color[\directtextrulesparameter\c!rulecolor]
+ {\hrule
+ \s!depth \directtextrulesparameter\c!rulethickness
+ \s!height\zeropoint
+ \s!width \availablehsize}}}
+
+\def\pack_textrule_correct_depth_yes
+ {\vskip\dimexpr
+ \strutdp +.5\exheight
+ \ifdim\prevdepth>\strutdp\else
+ \ifdim\prevdepth>\zeropoint
+ -\prevdepth
+ \fi
+ \fi
+ \relax
+ \relax}
+
+\def\pack_textrule_correct_depth_nop
+ {\vskip\dimexpr
+ \strutdp +.5\exheight
+ \relax
+ \relax}
+
+\def\pack_textrule_following#1%
+ {\doifelsenothing{#1}
+ \pack_textrule_with_text_nop
+ \pack_textrule_with_text_yes
+ {#1}%
+ \ifvmode
+ \prevdepth\zeropoint
+ \fi}
+
+%D The grouped commands also supports bodyfont switching:
+
+\permanent\protected\def\starttextrule#1%
+ {\bgroup
+ \def\pack_textrule_nop_indeed_nop{\csname\??textrulealternatives\v!middle\endcsname}%
+ %\let\pack_textrule_nop_indeed_yes\pack_textrule_nop_indeed_nop % needs checking
+ \csname\??textrulealternatives\v!top\endcsname{#1}%
+ \bgroup
+ \usebodyfontparameter\directtextrulesparameter}
+
+\permanent\protected\def\stoptextrule
+ {\par
+ \egroup
+ \csname\??textrulealternatives\v!bottom\endcsname\empty
+ \egroup}
+
+%D \macros
+%D {fillinrules, setupfillinrules}
+%D
+%D The next few commands do not really deserve a place in a core module, because
+%D they deal with specific typography. Nevertheless I decided to make them part of
+%D the core, because they permit us to make questionaires. Let's start with some
+%D examples.
+%D
+%D \fillinrules[n=2,width=fit]{first}
+%D \fillinrules[n=2,width=broad]{first}
+%D \fillinrules[n=2,width=3cm]{first}
+%D \fillinrules[n=2,width=3cm,distance=.5em,separator=:]{first}
+%D \fillinrules[n=2]{first}{last}
+%D \fillintext{first}{last} \input reich \par
+%D
+%D The main command is \type{\fillinrules}. This command takes one and an optional
+%D second argument and sets a paragraph with empty visualized lines.
+%D
+%D \showsetup{fillinrules}
+%D \showsetup{setupfillinrules}
+
+\installcorenamespace{fillinrules}
+
+\installdirectcommandhandler \??fillinrules {fillinrules}
+
+\setupfillinrules
+ [\c!width=\v!broad,
+ \c!distance=\emwidth,
+ \c!before=\blank,
+ \c!after=\blank,
+ \c!n=\plusone,
+ \c!interlinespace=\v!small,
+ \c!separator=,
+ \c!style=,
+ \c!color=]
+
+\def\pack_fillinrules_rule_indeed{\thinrules}
+
+\permanent\tolerant\protected\def\fillinrules[#1]#:#=#*#=%
+ {\endgraf
+ \begingroup
+ \setupcurrentfillinrules[#1]%
+ \directfillinrulesparameter\c!before
+ \setupcurrentthinrules
+ [\c!n=\directfillinrulesparameter\c!n,
+ \c!interlinespace=\directfillinrulesparameter\c!interlinespace,
+ \c!before=,
+ \c!after=]%
+ \scratchdistance\directfillinrulesparameter\c!distance\relax
+ \noindent
+ \iftok{#2}\emptytoks\else
+ \edef\p_width{\directfillinrulesparameter\c!width}%
+ \ifx\p_width\v!fit
+ \scratchdistance\zeropoint
+ \hbox
+ \orelse\ifx\p_width\v!broad
+ \hbox
+ \else
+ \hbox to \directfillinrulesparameter\c!width
+ \fi
+ \bgroup
+ \usefillinrulesstyleandcolor\c!style\c!color
+ \strut
+ #2%
+ \hfill\directfillinrulesparameter\c!separator
+ \hskip\scratchdistance
+ \egroup
+ \fi
+ \setupwhitespace[\v!big]%
+ \ignorespaces
+ \pack_fillinrules_rule_indeed
+ \iftok{#3}\emptytoks\else
+ \kern\scratchdistance
+ \usefillinrulesstyleandcolor\c!style\c!color
+ #3%
+ \strut
+ \fi
+ \endgraf
+ \directfillinrulesparameter\c!after
+ \endgroup}
+
+%D \macros
+%D {fillintext}
+%D
+%D To provide compatible layouts when texts and lines are mixed, one can typeset
+%D a paragraph by using the command \type {\fillintext}.
+%D
+%D \showsetup{fillintext}
+
+\permanent\tolerant\protected\def\fillintext[#1]#:#=#*#=%
+ {\endgraf
+ \begingroup
+ \def\pack_fillinrules_rule_indeed{\unhbox\nextbox\unskip}% hm, needs checking
+ \dowithnextbox{\fillinrules[#1]{#2}{\hfill#3}}%
+ \hbox\bgroup\enforced\let\par\egroup\ignorespaces} % bah, i will drop this compatibility hack
+
+%D \macros
+%D {fillinline, setupfillinlines}
+%D
+%D Another member of the family takes care of putting a (often small) rule after
+%D a piece of text, like
+%D
+%D \startbuffer
+%D \fillinline \input reich \par
+%D \fillinline[margin=0cm] \input reich \par
+%D \stopbuffer
+%D
+%D \startexample
+%D \getbuffer
+%D \stopexample
+%D
+%D which was typeset by saying:
+%D
+%D \typebuffer
+%D
+%D The two commands that take care of this are:
+%D
+%D \showsetup{fillinline}
+%D \showsetup{setupfillinlines}
+%D
+%D Contrary to older implementations we now use the wrapper.
+
+\installcorenamespace{fillinlines}
+
+\installdirectcommandhandler \??fillinlines {fillinlines}
+
+\setupfillinlines
+ [\c!width=8\emwidth, % was 3cm
+ \c!margin=\directfillinlinesparameter\c!width,
+ \c!rulethickness=\linewidth,
+ \c!color=,
+ \c!distance=\emwidth,
+ \c!before=\blank,
+ \c!after=\blank]
+
+\protected\def\pack_fillinline_before#1%
+ {}
+
+\protected\def\pack_fillinline_after#1%
+ {\begingroup
+ \setupcurrentfillinlines[#1]%
+ \ifhmode\unskip\hfill\fi
+ \scratchdistance\directfillinlinesparameter\c!distance
+ \scratchheight\dimexpr\directfillinlinesparameter\c!rulethickness/\plustwo\relax
+ \scratchwidth \dimexpr\directfillinlinesparameter\c!width-\scratchdistance\relax
+ \ifdim\scratchwidth>\directfillinlinesparameter\c!margin\else
+ \expandafter\rlap
+ \fi
+ {\kern\scratchdistance
+ \blackrule
+ [\c!color=\directfillinlinesparameter\c!color,
+ \c!width=\scratchwidth,
+ \c!height=\scratchheight,
+ \c!depth=\scratchheight]}%
+ \frozen\advance\rightskip \directfillinlinesparameter\c!margin\relax
+ \frozen\parfillskip\zeropoint\relax
+ \endgroup}
+
+\permanent\tolerant\protected\def\fillinline[#1]%
+ {\registerparwrapper
+ {fillinline}%
+ {\pack_fillinline_before{#1}}%
+ {\pack_fillinline_after {#1}%
+ \unregisterparwrapper{fillinline}}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt b/Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt
new file mode 100644
index 00000000000..f021339b472
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-obj.lmt
@@ -0,0 +1,305 @@
+if not modules then modules = { } end modules ['pack-obj'] = {
+ version = 1.001,
+ comment = "companion to pack-obj.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+--[[ldx--
+<p>We save object references in the main utility table. jobobjects are
+reusable components.</p>
+--ldx]]--
+
+local context = context
+local codeinjections = backends.codeinjections
+local ctx_doifelse = commands.doifelse
+
+local report = logs.reporter("objects")
+local trace = false trackers.register("objects",function(v) trace = v end)
+
+local nuts = nodes.nuts
+
+local setlink = nuts.setlink
+local getlist = nuts.getlist
+local setbox = nuts.setbox
+
+local new_latelua = nuts.pool.latelua
+
+local settexdimen = tokens.setters.dimen
+
+local getcount = tex.getcount
+
+local implement = interfaces.implement
+local setmacro = interfaces.setmacro
+
+local allocate = utilities.storage.allocate
+
+local collected = allocate()
+local tobesaved = allocate()
+
+local jobobjects = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.objects = jobobjects
+
+local function initializer()
+ collected = jobobjects.collected
+ tobesaved = jobobjects.tobesaved
+end
+
+job.register('job.objects.collected', tobesaved, initializer, nil)
+
+local function saveobject(tag,number,page)
+ local data = { number, page }
+ tobesaved[tag] = data
+ collected[tag] = data
+end
+
+local function saveobjectspec(specification)
+ local tag = specification.tag
+ local data = { specification.number, specification.page }
+ tobesaved[tag] = data
+ collected[tag] = data
+end
+
+local function setobject(tag,number,page)
+ collected[tag] = { number, page }
+end
+
+local function getobject(tag)
+ return collected[tag] or tobesaved[tag]
+end
+
+local function getobjectnumber(tag,default)
+ local o = collected[tag] or tobesaved[tag]
+ return o and o[1] or default
+end
+
+local function getobjectpage(tag,default)
+ local o = collected[tag] or tobesaved[tag]
+ return o and o[2] or default
+end
+
+jobobjects.save = saveobject
+jobobjects.set = setobject
+jobobjects.get = getobject
+jobobjects.number = getobjectnumber
+jobobjects.page = getobjectpage
+
+-- implement {
+-- name = "saveobject",
+-- actions = saveobject
+-- }
+--
+-- implement {
+-- name = "setobject",
+-- actions = setobject,
+-- arguments = { "string", "integer", "integer" }
+-- }
+--
+-- implement {
+-- name = "objectnumber",
+-- actions = { getobjectnumber, context },
+-- arguments = "2 strings",
+-- }
+--
+-- implement {
+-- name = "objectpage",
+-- actions = { getobjectpage, context },
+-- arguments = "2 strings",
+-- }
+--
+-- implement {
+-- name = "doifelseobjectreferencefound",
+-- actions = { getobject, commands.doifelse },
+-- arguments = "string"
+-- }
+
+-- if false then
+-- -- we can flush the inline ref ourselves now if we want
+-- local flush = new_latelua("pdf.flushxform("..index..")")
+-- flush.next = list
+-- next.prev = flush
+-- end
+
+local data = table.setmetatableindex("table")
+
+objects = {
+ data = data,
+ n = 0,
+}
+
+local objects = objects
+
+function objects.register(ns,id,b,referenced,offset,mode)
+ local n = objects.n + 1
+ objects.n = n
+ nodes.handlers.finalizebox(b)
+ if mode == 0 then
+ -- tex
+ data[ns][id] = {
+ codeinjections.registerboxresource(b), -- a box number
+ offset,
+ referenced or false,
+ mode,
+ }
+ else
+ -- box (backend)
+ data[ns][id] = {
+ codeinjections.registerboxresource(b,offset), -- a box number
+ false,
+ referenced,
+ mode,
+ }
+ end
+ if trace then
+ report("registering object %a (n=%i)",id,n)
+ end
+end
+
+function objects.restore(ns,id) -- why not just pass a box number here too (ok, we also set offset)
+ local d = data[ns][id]
+ if d then
+ local index = d[1]
+ local offset = d[2]
+ local status = d[3]
+ local mode = d[4]
+ local hbox = codeinjections.restoreboxresource(index) -- a nut !
+ if status then
+ local list = getlist(hbox)
+ local page = new_latelua {
+ action = saveobjectspec,
+ tag = ns .. "::" .. id,
+ number = index,
+ page = getcount("realpageno"),
+ }
+ -- list is a rule
+ setlink(list,page)
+ end
+ setbox("objectbox",hbox)
+ settexdimen("objectoff",offset or 0)
+ else
+ setbox("objectbox",nil)
+ settexdimen("objectoff",0) -- for good old times
+ end
+ if trace then
+ report("restoring object %a",id)
+ end
+end
+
+function objects.dimensions(index)
+ local d = data[ns][id]
+ if d then
+ return codeinjections.boxresourcedimensions(d[1])
+ else
+ return 0, 0, 0, 0
+ end
+end
+
+function objects.reference(ns,id)
+ local d = data[ns][id]
+ if d then
+ return d[1]
+ else
+ return getobjectnumber(ns .."::" .. id,0)
+ end
+end
+
+function objects.page(ns,id)
+ return getobjectpage(ns .."::" .. id,getcount("realpageno"))
+end
+
+function objects.found(ns,id)
+ return data[ns][id]
+end
+
+implement {
+ name = "registerreferencedobject",
+ arguments = { "string", "string", "integer", true, "dimension", "integer" },
+ actions = objects.register,
+}
+
+implement {
+ name = "registerobject",
+ arguments = { "string", "string", "integer", false, "dimension", "integer" },
+ actions = objects.register,
+}
+
+implement {
+ name = "restoreobject",
+ arguments = "2 strings",
+ actions = objects.restore,
+}
+
+implement {
+ name = "doifelseobjectfound",
+ arguments = "2 arguments",
+ public = true,
+ protected = true,
+ actions = function(ns,id)
+ ctx_doifelse(data[ns][id])
+ -- ctx_doifelse(objects.reference(ns,id))
+ end,
+}
+
+implement {
+ name = "doifelseobjectreferencefound",
+ arguments = "2 arguments",
+ public = true,
+ protected = true,
+ actions = function(ns,id)
+ -- ctx_doifelse(data[ns][id])
+ ctx_doifelse(objects.reference(ns,id))
+ end,
+}
+
+implement {
+ name = "getobjectreference",
+ arguments = { "argument", "argument", "csname" },
+ public = true,
+ protected = true,
+ actions = function(ns,id,target)
+ setmacro(target,objects.reference(ns,id),"global")
+ end
+}
+
+implement {
+ name = "getobjectreferencepage",
+ arguments = { "argument", "argument", "csname" },
+ public = true,
+ protected = true,
+ actions = function(ns,id,target)
+ setmacro(target,objects.page(ns,id),"global")
+ end
+}
+
+implement {
+ name = "getobjectdimensions",
+ arguments = "2 arguments",
+ public = true,
+ protected = true,
+ actions = function(ns,id)
+ local object = data[ns][id]
+ local w, h, d, o = 0, 0, 0, 0
+ if object then
+ w, h, d, o = codeinjections.boxresourcedimensions(object[1])
+ end
+ settexdimen("objectwd",w or 0)
+ settexdimen("objectht",h or 0)
+ settexdimen("objectdp",d or 0)
+ settexdimen("objectoff",o or #objects > 2 and object[2] or 0)
+ end
+}
+
+-- for the moment here:
+
+implement {
+ name = "registerbackendsymbol",
+ arguments = { "string", "integer" },
+ actions = function(...)
+ codeinjections.registersymbol(...)
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-obj.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-obj.mkxl
new file mode 100644
index 00000000000..04fc90a5853
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-obj.mkxl
@@ -0,0 +1,168 @@
+%D \module
+%D [ file=pack-obj,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=Objects,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / Objects}
+
+\unprotect
+
+\registerctxluafile{pack-obj}{autosuffix}
+
+%D \macros
+%D {setobject,getobject,ifinobject}
+%D
+%D Boxes can be considered reuable objects. Traditionally once passed to the \DVI\
+%D file, such objects cannot be reused. In \PDF\ however, reusing is possible and
+%D sometimes even a necessity. Therefore, \CONTEXT\ supports reusable objects and
+%D \LUATEX\ has native support for so called box resources.
+%D
+%D The first application of objects in \CONTEXT\ concerned \METAPOST\ graphics and
+%D fill||in form fields. Reusing resources can save lots of bytes and sometimes also
+%D runtime.
+%D
+%D \starttyping
+%D \setobject{class}{name}\somebox{}
+%D \getobject{class}{name}
+%D \stoptyping
+%D
+%D Here \type {\somebox} can be whatever box specification suits \TEX. Although the
+%D implementation in \MKIV\ is somewhat different the principles have not changed.
+
+\installcorenamespace {objects}
+
+\newif \ifinobject
+\newbox \objectbox
+
+\mutable\def\objectoffset{1cm}
+
+\newdimen\objectoff \permanent\def\objectmargin{\the\objectoff}
+\newdimen\objectwd \permanent\def\objectwidth {\the\objectwd}
+\newdimen\objectht \permanent\def\objectheight{\the\objectht}
+\newdimen\objectdp \permanent\def\objectdepth {\the\objectdp}
+
+%D If I have time I will use the unreferenced variant for e.g. mp reuse. This can be
+%D rewritten in \LUA\ anyway.
+
+\permanent\protected\def\setreferencedobject #1#2{\begingroup\synctexpause\objectoff\objectoffset\inobjecttrue\dowithnextbox{\pack_objects_set_yes{#1}{#2}}}
+\permanent\protected\def\settightreferencedobject #1#2{\begingroup\synctexpause\objectoff\zeropoint \inobjecttrue\dowithnextbox{\pack_objects_set_yes{#1}{#2}}}
+\permanent\protected\def\setunreferencedobject #1#2{\begingroup\synctexpause\objectoff\objectoffset\inobjecttrue\dowithnextbox{\pack_objects_set_nop{#1}{#2}}}
+\permanent\protected\def\settightunreferencedobject#1#2{\begingroup\synctexpause\objectoff\zeropoint \inobjecttrue\dowithnextbox{\pack_objects_set_nop{#1}{#2}}}
+
+\aliased\let\setobject \setreferencedobject
+\aliased\let\settightobject\settightreferencedobject
+
+%D We can get subtle differences in boundingboxes but both methods work ok.
+
+\newconstant\c_pack_objects_offset_mode % 0=tex 1=box
+
+\protected\def\pack_objects_set_yes#1#2%
+ {\ifcase\c_pack_objects_offset_mode
+ \ifzeropt\objectoff
+ \pack_objects_package_nop\nextbox
+ \else
+ \pack_objects_package_yes\nextbox
+ \fi
+ \else
+ \pack_objects_package_nop\nextbox
+ \fi
+ \clf_registerreferencedobject{#1}{#2}\objectbox\objectoff\c_pack_objects_offset_mode
+ \synctexresume
+ \endgroup}
+
+\protected\def\pack_objects_set_nop#1#2%
+ {\ifcase\c_pack_objects_offset_mode
+ \ifzeropt\objectoff
+ \pack_objects_package_nop\nextbox
+ \else
+ \pack_objects_package_yes\nextbox
+ \fi
+ \else
+ \pack_objects_package_nop\nextbox
+ \fi
+ \clf_registerobject{#1}{#2}\objectbox\objectoff\c_pack_objects_offset_mode
+ \synctexresume
+ \endgroup}
+
+\def\pack_objects_package_nop#1% we pack because otherwise \ruledhbox is still tight
+ {\setbox\objectbox\hpack{\box#1}}
+
+\def\pack_objects_package_yes#1%
+ {\objectwd\dimexpr\wd#1+2\objectoff\relax
+ \objectht\dimexpr\ht#1+ \objectoff\relax
+ \objectdp\dimexpr\dp#1+ \objectoff\relax
+ \setbox\objectbox\hpack
+ {\hskip\objectoff
+ \box#1}%
+ \wd\objectbox\objectwd
+ \ht\objectbox\objectht
+ \dp\objectbox\objectdp}
+
+\permanent\protected\def\getobject#1#2%
+ {\begingroup
+ \synctexpause
+ \clf_restoreobject{#1}{#2}%
+ \ifzeropt\objectoff\else
+ \objectoff-\objectoff
+ \pack_objects_package_yes\objectbox
+ \fi
+ \box\objectbox
+ \synctexresume
+ \endgroup}
+
+%D If needed one can ask for the dimensions of an object with:
+%D
+%D \starttyping
+%D \getobjectdimensions{class}{name}
+%D \stoptyping
+%D
+%D The results are reported in \type {\objectwidth}, \type {\objectheight} and \type
+%D {\objectdepth} as well as \type {\objectoffset}.
+
+% \getobjectdimensions #1#2 % defined at the lua end
+
+%D \macros
+%D {doifobjectfoundelse,doifobjectreferencefoundelse}
+%D
+%D To prevent redundant definition of objects, one can use the next tests:
+%D
+%D \starttyping
+%D \doifobjectfoundelse{class}{object}{do then}{do else}
+%D \doifobjectreferencefoundelse{class}{object}{do then}{do else}
+%D \stoptyping
+
+\immutable\def\defaultobjectreference{0}
+\immutable\def\defaultobjectpage {\realfolio}
+
+% \getobjectreference {#1}{#2\csname % define at the lua end
+% \getobjectreferencepage {#1}{#2\csname % define at the lua end
+% \doifelseobjectfound {#1}{#2} % defined atthe lua end
+% \doifelseobjectreferencefound {#1}{#2} % defined atthe lua end
+
+\aliased\let\dogetobjectreference \getobjectreference % for now, will go away
+\aliased\let\dogetobjectreferencepage\getobjectreferencepage % for now, will go away
+
+\aliased\let\doifobjectfoundelse \doifelseobjectfound
+\aliased\let\doifobjectreferencefoundelse\doifelseobjectreferencefound
+
+%D For the moment here:
+
+\mutable\let\lastpredefinedsymbol\empty % some day we can do more at the lua end
+
+\permanent\protected\def\predefinesymbol[#1]%
+ {\begingroup
+ \xdef\lastpredefinedsymbol{#1}%
+ \settightobject{SYM}{#1}\hbox{\symbol[#1]}% to be checked ... maybe only fitting
+ \getobjectreference{SYM}{#1}\m_back_object_reference
+ \clf_registerbackendsymbol{#1}\m_back_object_reference\relax
+ \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-ori.lua b/Master/texmf-dist/tex/context/base/mkxl/pack-ori.lmt
index a786b19ef13..a786b19ef13 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-ori.lua
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-ori.lmt
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-ori.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-ori.mkxl
index 061768f94f9..4365db3ac66 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-ori.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-ori.mkxl
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Packaging Macros / Anchoring}
-\registerctxluafile{pack-ori}{}
+\registerctxluafile{pack-ori}{autosuffix}
\unprotect
@@ -54,7 +54,7 @@
%D There will be some more helpers here.
-\def\theorientation#1%
+\permanent\def\theorientation#1%
{\numexpr
\ifcsname\??orientations#1\endcsname
\lastnamedcs
@@ -63,7 +63,7 @@
\fi
\relax}
-\def\autoorientation#1%
+\permanent\def\autoorientation#1%
{\numexpr
\ifcsname\??orientations#1\endcsname
\lastnamedcs
@@ -72,11 +72,20 @@
\fi
\relax}
+%D The \type {\immediateassignment} and \type {\immediateassigned} primitives are
+%D kind of obsolete and might be dropped (if not already) from \LUAMETATEX. Local
+%D scanning is, although it is a bit slower, more general. We didn't really need and
+%D use these primitives in \CONTEXT\ anyway, apart from some playing around with
+%D some full expansion, which made no sense in the end so it was dropped. When
+%D things get that hairy it's often a good reason to look into \LUA\ variants.
+
\def\auto_orientation#1%
- {\immediateassignment\global\expandafter\chardef\csname\??orientations#1\endcsname\stringtoorientation{#1}%
+ %{\immediateassignment\global\expandafter\chardef\csname\??orientations#1\endcsname\stringtoorientation{#1}% % quite fast
+ {\beginlocalcontrol\global\expandafter\chardef\csname\??orientations#1\endcsname\stringtoorientation{#1}\endlocalcontrol % good enough
+ %{\localcontrolled{\global\expandafter\chardef\csname\??orientations#1\endcsname\stringtoorientation{#1}}% % a bit slower
\csname\??orientations#1\endcsname}
-\unexpanded\def\doifelseorientation#1%
+\permanent\protected\def\doifelseorientation#1%
{\ifcsname\??orientations#1\endcsname
\expandafter\firstoftwoarguments
\else
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-pos.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-pos.mkxl
new file mode 100644
index 00000000000..aee22081fdd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-pos.mkxl
@@ -0,0 +1,160 @@
+%D \module
+%D [ file=pack-pos,
+%D version=2010.11.17 % real old code, updated a bit
+%D title=\CONTEXT\ Packaging Macros,
+%D subtitle=Positioning,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Packaging Macros / Positioning}
+
+\unprotect
+
+% An old but still usefull mechanism:
+%
+% \ruledvbox{\startpositioning
+% \position(1,1){test}
+% \position[xstep=relative](1,1){test}
+% \position[ystep=relative](3,-1){test}
+% \position(10,10){test}
+% \stoppositioning}
+%
+% watch out: rather global
+
+\installcorenamespace {positioning}
+
+\installcommandhandler \??positioning {positioning} \??positioning
+
+\setuppositioning
+ [\c!state=\v!start,
+ \c!unit=\s!cm,
+ \c!factor=\plusone,
+ \c!scale =\plusone,
+ \c!xfactor=\positioningparameter\c!factor,
+ \c!yfactor=\positioningparameter\c!factor,
+ \c!xscale=\positioningparameter\c!scale,
+ \c!yscale=\positioningparameter\c!scale,
+ \c!xstep=\v!absolute,
+ \c!ystep=\v!absolute,
+ \c!xoffset=\zeropoint,
+ \c!yoffset=\zeropoint]
+
+\newdimen\d_pack_positioning_x_position
+\newdimen\d_pack_positioning_y_position
+\newdimen\d_pack_positioning_x_dimension
+\newdimen\d_pack_positioning_y_dimension
+\newdimen\d_pack_positioning_x_offset
+\newdimen\d_pack_positioning_y_offset
+
+\newbox\b_pack_positioning
+
+\permanent\tolerant\protected\def\startpositioning[#1]#*[#2]%
+ {\bgroup
+ \ifparameters
+ \let\currentpositioning\empty
+ \or
+ \ifhastok={#1}%
+ \let\currentpositioning\empty
+ \setupcurrentpositioning[#1]%
+ \else
+ \edef\currentpositioning{#1}%
+ \fi
+ \or
+ \edef\currentpositioning{#1}%
+ \setupcurrentpositioning[#2]%
+ \fi
+ \d_pack_positioning_x_position \zeropoint
+ \d_pack_positioning_y_position \zeropoint
+ \d_pack_positioning_x_dimension\zeropoint
+ \d_pack_positioning_y_dimension\zeropoint
+ \d_pack_positioning_x_offset \zeropoint
+ \d_pack_positioning_y_offset \zeropoint
+ \hfuzz\paperwidth
+ \vfuzz\paperheight
+ \setbox\b_pack_positioning\hbox\bgroup
+ \ignorespaces}
+
+\permanent\protected\def\stoppositioning
+ {\removeunwantedspaces
+ \doifnot{\positioningparameter\c!offset}\v!yes
+ {\global\d_pack_positioning_x_offset\zeropoint
+ \global\d_pack_positioning_y_offset\zeropoint}%
+ \global\advance\d_pack_positioning_x_dimension\d_pack_positioning_x_offset
+ \global\advance\d_pack_positioning_y_dimension\d_pack_positioning_y_offset
+ \egroup
+ \vbox to \d_pack_positioning_y_dimension
+ {\vskip\d_pack_positioning_y_offset
+ \hbox to \d_pack_positioning_x_dimension
+ {\hskip\d_pack_positioning_x_offset
+ \box\b_pack_positioning
+ \hfill}
+ \vfill}%
+ \egroup}
+
+\protected\def\pack_positioning_calculate#1#2#3#4#5#6#7#8#9%
+ {\setdimensionwithunit\scratchdimen{#1}{\positioningparameter\c!unit}%
+ \scratchdimen\positioningparameter#8\scratchdimen
+ \scratchdimen\positioningparameter#9\scratchdimen
+ \advance\scratchdimen\positioningparameter#4\relax
+ % == \scratchdimen\dimexpr#8\dimexpr#9\scratchdimen\relax+#4\relax
+ \doif{\positioningparameter#2}\v!relative
+ {\advance\scratchdimen#3%
+ \letpositioningparameter#4\zeropoint}%
+ #3\scratchdimen
+ \doifnot{\positioningparameter\c!state}\v!overlay
+ {\scratchdimen\dimexpr#5\nextbox+#3\relax
+ \ifdim #3<-#7\relax \global#7-#3\relax \fi
+ \ifdim\scratchdimen> #6\relax \global#6\scratchdimen\fi}}
+
+\permanent\tolerant\protected\def\position[#1]#:(#2,#3)%
+ {\bgroup
+ \ifparameter#1\or
+ \setupcurrentpositioning[#1]%
+ \fi
+ \removeunwantedspaces
+ \dowithnextbox{\pack_positioning_position_indeed{#2}{#3}}\hbox}
+
+\def\pack_positioning_position_indeed#1#2%
+ {\dontcomplain
+ \pack_positioning_calculate
+ {#1}%
+ \c!xstep
+ \d_pack_positioning_x_position
+ \c!xoffset
+ \wd
+ \d_pack_positioning_x_dimension
+ \d_pack_positioning_x_offset
+ \c!xscale
+ \c!xfactor
+ \pack_positioning_calculate
+ {#2}%
+ \c!ystep
+ \d_pack_positioning_y_position
+ \c!yoffset
+ \htdp
+ \d_pack_positioning_y_dimension
+ \d_pack_positioning_y_offset
+ \c!yscale
+ \c!yfactor
+ \vbox to \zeropoint
+ {\offinterlineskip % else we get an empty line
+ \vskip\d_pack_positioning_y_position
+ \hbox to \zeropoint
+ {\hskip\d_pack_positioning_x_position
+ \box\nextbox
+ \hss}
+ \vss}%
+ \normalexpanded
+ {\egroup
+ \d_pack_positioning_x_position\the\d_pack_positioning_x_position
+ \d_pack_positioning_y_position\the\d_pack_positioning_y_position
+ \setexpandedpositioningparameter\c!xoffset{\the\dimexpr\positioningparameter\c!xoffset}%
+ \setexpandedpositioningparameter\c!yoffset{\the\dimexpr\positioningparameter\c!yoffset}}%
+ \ignorespaces}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt b/Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt
new file mode 100644
index 00000000000..d99f0a78e2c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-rul.lmt
@@ -0,0 +1,258 @@
+if not modules then modules = { } end modules ['pack-rul'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to pack-rul.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ 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$}
+-- \framed[align={lohi,middle}]{$ $}
+-- \framed[align={lohi,middle}]{\hbox{ }}
+-- \framed[align={lohi,middle}]{\hbox{}}
+-- \framed[align={lohi,middle}]{$\hskip2pt$}
+
+local type = type
+
+local context = context
+
+local nodecodes = nodes.nodecodes
+local listcodes = nodes.listcodes
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local boxlist_code = listcodes.box
+local linelist_code = listcodes.line
+local equationlist_code = listcodes.equation
+
+local texsetdimen = tex.setdimen
+local texsetcount = tex.setcount
+
+local implement = interfaces.implement
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getwhd = nuts.getwhd
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getbox = nuts.getbox
+local getdirection = nuts.getdirection
+local setshift = nuts.setshift
+local setwidth = nuts.setwidth
+local getwidth = nuts.getwidth
+local setboxglue = nuts.setboxglue
+local getboxglue = nuts.getboxglue
+
+local hpack = nuts.hpack
+local getdimensions = nuts.dimensions
+local naturalhsize = nuts.naturalhsize
+local flush_node = nuts.flush
+
+local traversers = nuts.traversers
+local nexthlist = traversers.hlist
+local nextvlist = traversers.vlist
+local nextlist = traversers.list
+
+local checkformath = false
+
+directives.register("framed.checkmath",function(v) checkformath = v end) -- experiment
+
+-- beware: dir nodes and pseudostruts can end up on lines of their own
+
+local function doreshapeframedbox(n)
+ local box = getbox(n)
+ local noflines = 0
+ local nofnonzero = 0
+ local firstheight = nil
+ local lastdepth = nil
+ local lastlinelength = 0
+ local minwidth = 0
+ local maxwidth = 0
+ local totalwidth = 0
+ local averagewidth = 0
+ local boxwidth = getwidth(box)
+ -- if boxwidth ~= 0 and getsubtype(box) == vlist_code then
+ if boxwidth ~= 0 then
+ local list = getlist(box)
+ if list then
+ local hdone = false
+ for n, id, subtype, list in nextlist, list do -- no dir etc needed
+ local width, height, depth = getwhd(n)
+ if not firstheight then
+ firstheight = height
+ end
+ lastdepth = depth
+ noflines = noflines + 1
+ if list then
+ if id == hlist_code then
+ if subtype == boxlist_code or subtype == linelist_code then
+ -- the fast one also returns compensation (plus node)
+ local w, c, n = naturalhsize(list)
+ if n then
+ -- can become an option in framed: strict
+ w = w - c
+ else
+ -- print("no compensation found")
+ end
+ lastlinelength = w
+ else
+ lastlinelength = width
+ end
+ hdone = true
+ else
+ lastlinelength = width
+ -- vdone = true
+ end
+ if lastlinelength > maxwidth then
+ maxwidth = lastlinelength
+ end
+ if lastlinelength < minwidth or minwidth == 0 then
+ minwidth = lastlinelength
+ end
+ if lastlinelength > 0 then
+ nofnonzero = nofnonzero + 1
+ end
+ totalwidth = totalwidth + lastlinelength
+ end
+ end
+ if not firstheight then
+ -- done)
+ elseif maxwidth ~= 0 then
+ if hdone then
+ for h, id, subtype, list in nextlist, list do
+ if list and id == hlist_code then
+ -- called a lot so maybe a simple case is needed
+ if subtype == boxlist_code or subtype == linelist_code then
+ -- getdirection is irrelevant here so it will go
+ -- somehow a parfillskip also can get influenced
+ local p = hpack(list,maxwidth,'exactly',getdirection(h)) -- multiple return value
+ local set, order, sign = getboxglue(p)
+ setboxglue(h,set,order,sign)
+ setlist(p)
+ flush_node(p)
+ elseif checkformath and subtype == equationlist_code then
+ -- display formulas use a shift
+ if nofnonzero == 1 then
+ setshift(h,0)
+ end
+ end
+ setwidth(h,maxwidth)
+ end
+ end
+ end
+ -- if vdone then
+ -- for v in nextvlist, list do
+ -- local width = getwidth(n)
+ -- if width > maxwidth then
+ -- setwidth(v,maxwidth)
+ -- end
+ -- end
+ -- end
+ setwidth(box,maxwidth)
+ averagewidth = noflines > 0 and totalwidth/noflines or 0
+ else -- e.g. empty math {$ $} or \hbox{} or ...
+ setwidth(box,0)
+ end
+ end
+ end
+ texsetcount("global","framednoflines",noflines)
+ texsetdimen("global","framedfirstheight",firstheight or 0) -- also signal
+ texsetdimen("global","framedlastdepth",lastdepth or 0)
+ texsetdimen("global","framedminwidth",minwidth)
+ texsetdimen("global","framedmaxwidth",maxwidth)
+ texsetdimen("global","framedaveragewidth",averagewidth)
+end
+
+local function doanalyzeframedbox(n) -- traverse_list
+ local box = getbox(n)
+ local noflines = 0
+ local firstheight = nil
+ local lastdepth = nil
+ if getwidth(box) ~= 0 then
+ local list = getlist(box)
+ if list then
+ for n in nexthlist, list do
+ local width, height, depth = getwhd(n)
+ if not firstheight then
+ firstheight = height
+ end
+ lastdepth = depth
+ noflines = noflines + 1
+ end
+ for n in nextvlist, list do
+ local width, height, depth = getwhd(n)
+ if not firstheight then
+ firstheight = height
+ end
+ lastdepth = depth
+ noflines = noflines + 1
+ end
+ end
+ end
+ texsetcount("global","framednoflines",noflines)
+ texsetdimen("global","framedfirstheight",firstheight or 0)
+ texsetdimen("global","framedlastdepth",lastdepth or 0)
+end
+
+implement { name = "doreshapeframedbox", actions = doreshapeframedbox, arguments = "integer" }
+implement { name = "doanalyzeframedbox", actions = doanalyzeframedbox, arguments = "integer" }
+
+local function maxboxwidth(box)
+ local boxwidth = getwidth(box)
+ if boxwidth == 0 then
+ return 0
+ end
+ local list = getlist(box)
+ if not list then
+ return 0
+ end
+ if getid(box) == hlist_code then
+ return boxwidth
+ end
+ local lastlinelength = 0
+ local maxwidth = 0
+ for n, subtype in nexthlist, list do -- no dir etc needed
+ local l = getlist(n)
+ if l then
+ if subtype == boxlist_code or subtype == linelist_code then
+ lastlinelength = getdimensions(l)
+ else
+ lastlinelength = getwidth(n)
+ end
+ if lastlinelength > maxwidth then
+ maxwidth = lastlinelength
+ end
+ end
+ end
+ for n, subtype in nextvlist, list do -- no dir etc needed
+ local l = getlist(n)
+ if l then
+ lastlinelength = getwidth(n)
+ if lastlinelength > maxwidth then
+ maxwidth = lastlinelength
+ end
+ end
+ end
+ return maxwidth
+end
+
+nodes.maxboxwidth = maxboxwidth
+
+implement {
+ name = "themaxboxwidth",
+ public = true,
+ actions = function(n) context("%rsp",maxboxwidth(getbox(n))) end, -- r = rounded
+ arguments = "integer"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkxl b/Master/texmf-dist/tex/context/base/mkxl/pack-rul.mkxl
index 8fd23fbb1b7..b6a22d89492 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/pack-rul.mkxl
@@ -18,7 +18,7 @@
%D packaging and expansion we also keep tracing reasonable. For instance, multiple
%D stacked backgrounds can slow down a run if not optimized this way.
-\registerctxluafile{pack-rul}{optimize}
+\registerctxluafile{pack-rul}{autosuffix,optimize}
\unprotect
@@ -37,10 +37,7 @@
\newdimen\linewidth
-\unexpanded\def\setuplinewidth
- {\dosingleargument\pack_framed_setup_line_width}
-
-\def\pack_framed_setup_line_width[#1]%
+\permanent\tolerant\protected\def\setuplinewidth[#1]%
{\assigndimension{#1}\linewidth{.2\points}{.4\points}{.6\points}}
%D The parameter handler:
@@ -56,24 +53,24 @@
\installcommandhandler \??framed {framed} \??framed
-\let\pack_framed_framedparameter \framedparameter
-\let\pack_framed_framedparameterhash\framedparameterhash
-\let\pack_framed_setupcurrentframed \setupcurrentframed
+\aliased\let\pack_framed_framedparameter \framedparameter
+\aliased\let\pack_framed_framedparameterhash\framedparameterhash
+\aliased\let\pack_framed_setupcurrentframed \setupcurrentframed
\def\pack_framed_initialize
- {\let\framedparameter \pack_framed_framedparameter
- \let\framedparameterhash\pack_framed_framedparameterhash
- \let\setupcurrentframed \pack_framed_setupcurrentframed
+ {\enforced\let\framedparameter \pack_framed_framedparameter
+ \enforced\let\framedparameterhash\pack_framed_framedparameterhash
+ \enforced\let\setupcurrentframed \pack_framed_setupcurrentframed
\inframedtrue}
%D A helper:
-\def\frameddimension#1{\the\dimexpr\framedparameter{#1}\relax}
+\permanent\def\frameddimension#1{\the\dimexpr\framedparameter{#1}\relax}
%D Inheritance:
-\def\installinheritedframed#1%
- {\normalexpanded{\doinstallinheritedframed
+\permanent\protected\def\installinheritedframed#1%
+ {\normalexpanded{\mult_interfaces_install_inherited_framed
\expandafter\noexpand\csname current#1\endcsname
\expandafter\noexpand\csname #1parameter\endcsname
\expandafter\noexpand\csname #1parameterhash\endcsname
@@ -84,37 +81,36 @@
\expandafter\noexpand\csname inherited#1framed\endcsname
\expandafter\noexpand\csname inherited#1framedbox\endcsname}} % new
-\unexpanded\def\doinstallinheritedframed#1#2#3#4#5#6#7#8#9%
- {\def#5##1##2{\ifx##1\relax#6{##2}\else#4{##1}{##2}\fi}%
- %\def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\s!empty\fi}% root
- \def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\??empty\fi}% root
- \unexpanded\def#8%
+\protected\def\mult_interfaces_install_inherited_framed#1#2#3#4#5#6#7#8#9%
+ {\enforced\frozen\def#5##1##2{\ifrelax##1#6{##2}\else#4{##1}{##2}\fi}%
+ \enforced\frozen\def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\??empty\fi}% root
+ \frozen\instance\protected\def#8%
{\bgroup
\bgroup
\inframedtrue
- \let\currentframed #1%
- \let\framedparameter #2%
- \let\framedparameterhash#3%
- \let\setupcurrentframed #7%
+ \enforced\let\currentframed #1%
+ \enforced\let\framedparameter #2%
+ \enforced\let\framedparameterhash#3%
+ \enforced\let\setupcurrentframed #7%
\pack_framed_process_indeed}%
- \unexpanded\def#9%
+ \frozen\instance\protected\def#9%
{\bgroup
\inframedtrue
- \let\currentframed #1%
- \let\framedparameter #2%
- \let\framedparameterhash#3%
- \let\setupcurrentframed #7%
+ \enforced\let\currentframed #1%
+ \enforced\let\framedparameter #2%
+ \enforced\let\framedparameterhash#3%
+ \enforced\let\setupcurrentframed #7%
\pack_framed_process_box_indeed}}
-\unexpanded\def\installframedcommandhandler#1#2#3%
+\permanent\protected\def\installframedcommandhandler#1#2#3%
{\installcommandhandler{#1}{#2}{#3}%
\installinheritedframed{#2}}
-\unexpanded\def\installframedautocommandhandler#1#2#3%
+\permanent\protected\def\installframedautocommandhandler#1#2#3%
{\installautocommandhandler{#1}{#2}{#3}%
\installinheritedframed{#2}}
-\unexpanded\def\installsimpleframedcommandhandler#1#2#3%
+\permanent\protected\def\installsimpleframedcommandhandler#1#2#3%
{\installsimplecommandhandler{#1}{#2}{#3}%
\installinheritedframed{#2}}
@@ -192,11 +188,11 @@
\c!toffset=\zeropoint,
\c!boffset=\zeropoint]
-\unexpanded\def\definesimplifiedframed[#1]% no settings
+\permanent\protected\def\definesimplifiedframed[#1]% no settings
{\defineframed[#1][\??simplifiedframed]%
- \expandafter\let\csname#1\endcsname\undefined}
+ \enforced\letcsname#1\endcsname\undefined}
-\expandafter\let\csname\??simplifiedframed\endcsname\undefined
+\letcsname\??simplifiedframed\endcsname\undefined
%D We will communicate through module specific variables, current framed
%D parameters and some reserved dimension registers.
@@ -204,7 +200,7 @@
\newdimen\d_framed_target_wd
\newdimen\d_framed_target_ht
\newdimen\d_framed_target_dp
-\newdimen\d_framed_linewidth \let\ruledlinewidth\d_framed_linewidth % needed at lua end
+\newdimen\d_framed_linewidth \aliased\let\ruledlinewidth\d_framed_linewidth % needed at lua end
\let\p_framed_frame \empty % \framedparameter\c!frame
\let\p_framed_backgroundoffset\empty
@@ -345,7 +341,7 @@
\def\pack_framed_background_box_color
{\edef\p_framed_backgroundcolor{\framedparameter\c!backgroundcolor}%
- \ifx\p_framed_backgroundcolor\empty \else
+ \ifempty\p_framed_backgroundcolor \else
\doifcolor\p_framed_backgroundcolor\pack_framed_background_box_color_indeed
\fi}
@@ -408,16 +404,6 @@
%D
%D The resulting box is lowered to the right depth.
-%def\overlaywidth {\the\hsize\space} % We preset the variables
-%def\overlayheight {\the\vsize\space} % to some reasonable default
-%def\overlaydepth {0pt } % values. The attributes
-%let\overlayoffset \overlaydepth % of the frame can be (are)
-%let\overlaylinewidth \overlaydepth % set somewhere else.
-\let\overlaycolor \empty
-\let\overlaylinecolor \empty
-
-\def\overlayradius{\framedparameter\c!frameradius}
-
\newdimen\d_overlay_width
\newdimen\d_overlay_height
\newdimen\d_overlay_depth
@@ -428,20 +414,24 @@
% expandable ... in a future version the space will go (in mp one can use Overlay*)
-\def\overlaywidth {\the\d_overlay_width \space} % We preset the variables
-\def\overlayheight {\the\d_overlay_height \space} % to some reasonable default
-\def\overlaydepth {\the\d_overlay_depth \space} % values.
-\def\overlayoffset {\the\d_overlay_offset \space} % of the frame can be (are)
-\def\overlaylinewidth {\the\d_overlay_linewidth\space} % set somewhere else.
-\def\overlayregion {\m_overlay_region}
-
-% public but kind of protected
-
-\def\usedoverlaywidth {\dimexpr\d_overlay_width \relax}
-\def\usedoverlayheight {\dimexpr\d_overlay_height \relax}
-\def\usedoverlaydepth {\dimexpr\d_overlay_depth \relax}
-\def\usedoverlayoffset {\dimexpr\d_overlay_offset \relax}
-\def\usedoverlaylinewidth{\dimexpr\d_overlay_linewidth\relax}
+\mutable \def\overlaywidth {\the\d_overlay_width \space} % We preset the variables
+\mutable \def\overlayheight {\the\d_overlay_height \space} % to some reasonable default
+\mutable \def\overlaydepth {\the\d_overlay_depth \space} % values.
+\mutable \def\overlayoffset {\the\d_overlay_offset \space} % of the frame can be (are)
+\mutable \def\overlaylinewidth {\the\d_overlay_linewidth\space} % set somewhere else.
+\mutable \def\overlayregion {\m_overlay_region}
+
+\mutable \def\overlayradius {\framedparameter\c!frameradius}
+\mutable \def\overlaycolor {\framedparameter\c!backgroundcolor}
+\mutable \def\overlaylinecolor {\framedparameter\c!framecolor}
+%mutable \edef\overlaycorner {\framedparameter\c!backgroundcorner}
+%mutable \edef\overlayradius {\framedparameter\c!backgroundradius}
+
+\permanent\def\usedoverlaywidth {\dimexpr\d_overlay_width \relax}
+\permanent\def\usedoverlayheight {\dimexpr\d_overlay_height \relax}
+\permanent\def\usedoverlaydepth {\dimexpr\d_overlay_depth \relax}
+\permanent\def\usedoverlayoffset {\dimexpr\d_overlay_offset \relax}
+\permanent\def\usedoverlaylinewidth{\dimexpr\d_overlay_linewidth\relax}
%D The next register is used to initialize overlays.
@@ -462,37 +452,11 @@
\vsize\d_overlay_height
\to \everyoverlay
-\unexpanded\def\defineoverlay
- {\dodoubleargument\pack_framed_define_overlay}
-
-\def\pack_framed_define_overlay[#1][#2]%
- {\def\pack_framed_define_overlay_indeed##1{\setvalue{\??overlay##1}{\executedefinedoverlay{##1}{#2}}}%
+\permanent\tolerant\protected\def\defineoverlay[#1]#*[#2]% wil be overloaded
+ {\def\pack_framed_define_overlay_indeed##1{\defcsname\??overlay##1\endcsname{\executedefinedoverlay{##1}{#2}}}%
\processcommalist[#1]\pack_framed_define_overlay_indeed}
-% \unexpanded\def\executedefinedoverlay#1#2% we can share the definitions
-% {\bgroup % redundant grouping
-% \setbox\scratchbox\hbox\bgroup
-% \ifzeropt\d_framed_target_dp
-% \the\everyoverlay#2% saves wrapping (and lua call)
-% \else
-% \lower\d_framed_target_dp
-% \hbox{\the\everyoverlay#2}%
-% \fi
-% \egroup
-% \setlayoutcomponentattribute{\v!overlay:#1}%
-% \setbox\scratchbox\hpack \layoutcomponentboxattribute
-% {\kern -.5\dimexpr\wd\scratchbox-\d_framed_target_wd\relax % was \d_overlay_width
-% \raise-.5\dimexpr\ht\scratchbox-\d_framed_target_ht\relax % not \d_overlay_height !
-% \box\scratchbox}%
-% \wd\scratchbox\d_framed_target_wd
-% \ht\scratchbox\d_framed_target_ht
-% \dp\scratchbox\d_framed_target_dp
-% \box\scratchbox
-% \egroup}
-
-% 20191231: moved from cont-exp:
-
-\unexpanded\def\executedefinedoverlay#1#2% we can share the definitions
+\permanent\protected\def\executedefinedoverlay#1#2% we can share the definitions
{\bgroup % redundant grouping
\setlayoutcomponentattribute{\v!overlay:#1}%
\setbox\scratchbox\hbox \layoutcomponentboxattribute{\the\everyoverlay#2}%
@@ -507,14 +471,7 @@
%D \macros
%D {overlayfakebox}
-% \unexpanded\def\overlayfakebox
-% {\hpack
-% {\setbox\scratchbox\emptyhbox
-% \wd\scratchbox\d_overlay_width
-% \ht\scratchbox\d_overlay_height
-% \box\scratchbox}}
-
-\unexpanded\def\overlayfakebox
+\permanent\protected\def\overlayfakebox
{\hpack % redundant but needs testing
{\novrule
\s!width \d_overlay_width
@@ -523,14 +480,14 @@
%D For testing we provide:
-\def\doifelseoverlay#1% only tests external overlays
+\permanent\def\doifelseoverlay#1% only tests external overlays
{\ifcsname\??overlay#1\endcsname
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\doifoverlayelse\doifelseoverlay
+\aliased\let\doifoverlayelse\doifelseoverlay
%D The content of the box will be (temporary) saved in a box. We also have an
%D extra box for backgrounds.
@@ -563,6 +520,8 @@
\box\b_framed_extra
\egroup}
+\let\pack_framed_overlay_initialize\relax
+
\def\pack_framed_process_background_indeed_external
{\pack_framed_overlay_initialize
\pack_framed_process_background_indeed_internal}
@@ -582,6 +541,8 @@
\newdimen\framedbackgrounddepth
\newdimen\framedbackgroundoffset
+\aliased\let\foregroundbox\relax
+
\def\pack_framed_background_box_content% fuzzy but needed hack, this \vss, otherwise
{\vpack to \framedbackgroundheight{\vss\box\b_framed_normal\vss}} % vertical shift \backgroundheight
@@ -605,12 +566,12 @@
\d_framed_target_ht\dimexpr\framedbackgroundheight+ \framedbackgroundoffset\relax
\d_framed_target_dp\dimexpr\framedbackgrounddepth + \framedbackgroundoffset+\framedparameter\c!backgrounddepth\relax
\let\pack_framed_overlay_initialize\pack_framed_overlay_initialize_indeed
- \ifx\p_framed_component\empty
+ \ifempty\p_framed_component
\resetlayoutcomponentattribute
\else
\setlayoutcomponentattribute{\v!background:\p_framed_component}%
\fi
- \let\foregroundbox\pack_framed_background_box_content
+ \enforced\let\foregroundbox\pack_framed_background_box_content
\hpack \layoutcomponentboxattribute to \framedbackgroundwidth\bgroup % width in case 'foreground' is used as overlay
\the\everybackgroundbox % moved
\expandafter\pack_framed_process_backgrounds\p_framed_background,\s!unknown,\relax % hm, messy .. look into it
@@ -624,10 +585,10 @@
\d_overlay_depth \d_framed_target_dp
\d_overlay_linewidth \d_framed_linewidth
\d_overlay_offset \framedbackgroundoffset\relax
- \edef\overlaycolor {\framedparameter\c!backgroundcolor}% let ?
+ % We expand these once:
+ \edef\overlaycolor {\framedparameter\c!backgroundcolor}%
\edef\overlaylinecolor{\framedparameter\c!framecolor}% only needed for layers
- %\edef\overlaycorner {\framedparameter\c!backgroundcorner}%
- %\edef\overlayradius {\framedparameter\c!backgroundradius}%
+ %
\let\pack_framed_overlay_initialize\relax}
%D One can explictly insert the foreground box. For that purpose we introduce the
@@ -663,7 +624,7 @@
\setbox\b_framed_extra\hpack
{\kern-\d_framed_frameoffset
\raise\scratchdimen
- \hpack{\ifx\overlaylinecolor\empty\else\dousecolorparameter\overlaylinecolor\fi\pack_framed_stroked_box}}%
+ \hpack{\ifempty\overlaylinecolor\else\dousecolorparameter\overlaylinecolor\fi\pack_framed_stroked_box}}%
\wd\b_framed_extra\wd\b_framed_normal
\ht\b_framed_extra\ht\b_framed_normal
\dp\b_framed_extra\dp\b_framed_normal
@@ -802,66 +763,53 @@
%D for passing this identifier between brackets lays in the mere fact that this way
%D we can use the optional argument grabbers.
-\def\defaultframeoffset{.25\exheight}
+\mutable\def\defaultframeoffset{.25\exheight}
\installcorenamespace{regularframedlevel}
-\unexpanded\def\installregularframed#1%
+\permanent\protected\def\installregularframed#1%
{\defineframed[#1]}
-\unexpanded\def\presetlocalframed[#1]%
+\permanent\protected\def\presetlocalframed[#1]%
{\defineframed[#1]}
% \presetlocalframed[\??framed]
\newcount\c_pack_framed_nesting
-\unexpanded\def\pack_framed_process_framed[#1]%
- {\bgroup
- \iffirstargument % faster
- \setupcurrentframed[#1]% here !
- \fi
- \pack_framed_process_indeed}
-
-\unexpanded\def\framed
+\permanent\tolerant\protected\def\framed[#1]%
{\bgroup
\advance\c_pack_framed_nesting\plusone
- \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed
- \edef\currentframed{>\the\c_pack_framed_nesting}%
- \pack_framed_initialize
- \dosingleempty\pack_framed_process_framed}
-
-\unexpanded\def\startframed
- {\dosingleempty\pack_framed_start_framed}
-
-\def\pack_framed_start_framed[#1]%
- {\bgroup
- \doifelseassignment{#1}\pack_framed_start_framed_yes\pack_framed_start_framed_nop{#1}}
-
-\def\pack_framed_start_framed_yes#1%
- {\advance\c_pack_framed_nesting\plusone
- \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed
- \iffirstargument\secondargumenttrue\fi % dirty trick
+ \letcsname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed
\edef\currentframed{>\the\c_pack_framed_nesting}%
\pack_framed_initialize
\bgroup
- \iffirstargument
- \secondargumenttrue % dirty trick
- \setupcurrentframed[#1]% here !
- \fi
- \pack_framed_process_indeed
- \bgroup
- \ignorespaces}
-
-\def\pack_framed_start_framed_nop#1%
- {\edef\currentframed{#1}%
- \dosingleempty\pack_framed_start_framed_nop_indeed}
+ \setupcurrentframed[#1]% here !, seldom no argument so no need to optimize
+ \pack_framed_process_indeed}
-\def\pack_framed_start_framed_nop_indeed[#1]%
- {\pack_framed_initialize
- \bgroup
- \iffirstargument
- \setupcurrentframed[#1]% here !
+\permanent\tolerant\protected\def\startframed[#1]#*[#2]%
+ {\bgroup
+ \ifarguments
+ \pack_framed_initialize
+ \bgroup
+ \or
+ \ifhastok={#1}%
+ \advance\c_pack_framed_nesting\plusone
+ \letcsname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed
+ \edef\currentframed{>\the\c_pack_framed_nesting}%
+ \pack_framed_initialize
+ \bgroup
+ \setupcurrentframed[#1]% here !
+ \else
+ \edef\currentframed{#1}%
+ \pack_framed_initialize
+ \bgroup
+ \fi
+ \else
+ \edef\currentframed{#1}%
+ \pack_framed_initialize
+ \bgroup
+ \setupcurrentframed[#2]% here !
\fi
\pack_framed_process_indeed
\bgroup
@@ -869,14 +817,14 @@
% till here
-\unexpanded\def\stopframed
+\permanent\protected\def\stopframed
{\removeunwantedspaces
\egroup}
-\unexpanded\def\normalframedwithsettings[#1]%
+\permanent\protected\def\normalframedwithsettings[#1]%
{\bgroup
\advance\c_pack_framed_nesting\plusone
- \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed
+ \letcsname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed
\bgroup
\edef\currentframed{>\the\c_pack_framed_nesting}%
\pack_framed_initialize
@@ -910,21 +858,23 @@
\newif\ifinframed
-%D The next one is faster on multiple backgrounds per page. No
-%D dimensions can be set, only frames and backgrounds.
+%D The next one is faster on multiple backgrounds per page. No dimensions can be
+%D set, only frames and backgrounds.
-\unexpanded\def\fastlocalframed[#1]#2[#3]#4% 3-4
+%% \protected\def\fastlocalframed[#1]#2[#3]#4% 3-4
+
+\permanent\protected\def\fastlocalframed[#1]#*[#2]#3%
{\bgroup
\edef\currentframed{#1}%
\pack_framed_initialize
- \setbox\b_framed_normal\hbox{#4}%
+ \setbox\b_framed_normal\hbox{#3}%
\iftrialtypesetting \else
\edef\m_overlay_region{\framedparameter\c!region}%
- \ifx\m_overlay_region\empty\else
+ \ifempty\m_overlay_region\else
\pack_framed_set_region
\fi
\fi
- \setupcurrentframed[#3]%
+ \setupcurrentframed[#2]%
\edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds
\d_framed_frameoffset\framedparameter\c!frameoffset\relax % also used in backgrounds
\edef\p_framed_frame{\framedparameter\c!frame}%
@@ -932,12 +882,12 @@
% not here, in calling macro: setups
\pack_framed_remove_depth
\ifx\p_framed_frame\v!overlay \orelse \ifx\p_framed_frame\v!none \else
- \ifx\p_framed_rulethickness\empty\else
+ \ifempty\p_framed_rulethickness\else
\d_framed_linewidth\p_framed_rulethickness\relax
\fi
\pack_framed_add_outline % real or invisible frame
\fi
- \ifx\p_framed_background\empty \else
+ \ifempty\p_framed_background \else
\edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}%
\d_framed_backgroundoffset
\ifx\p_framed_backgroundoffset\v!frame
@@ -949,7 +899,7 @@
\pack_framed_add_background
\fi
\pack_framed_restore_depth
- \iftrialtypesetting\orelse\ifx\m_overlay_region\empty\else
+ \iftrialtypesetting\orelse\ifempty\m_overlay_region\else
\pack_framed_add_region
\fi
\box\b_framed_normal
@@ -958,10 +908,10 @@
%D The next macro uses a box and takes its natural width and height so these
%D can better be correct.
-\unexpanded\def\pack_framed_process_box_indeed#1#2% component box (assumes parameters set and grouped usage)
+\protected\def\pack_framed_process_box_indeed#1#2% component box (assumes parameters set and grouped usage)
{\setbox\b_framed_normal\box#2% could actually be \let\b_framed_normal#2
\edef\m_overlay_region{\framedparameter\c!region}%
- \ifx\m_overlay_region\empty\else
+ \ifempty\m_overlay_region\else
\pack_framed_set_region
\fi
\edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds
@@ -969,12 +919,12 @@
\edef\p_framed_frame{\framedparameter\c!frame}%
\edef\p_framed_background{\framedparameter\c!background}%
\ifx\p_framed_frame\v!overlay \orelse \ifx\p_framed_frame\v!none \else
- \ifx\p_framed_rulethickness\empty \else
+ \ifempty\p_framed_rulethickness \else
\d_framed_linewidth\p_framed_rulethickness\relax
\fi
\pack_framed_add_outline % real or invisible frame
\fi
- \ifx\p_framed_background\empty \else
+ \ifempty\p_framed_background \else
\edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}%
\d_framed_backgroundoffset
\ifx\p_framed_backgroundoffset\v!frame
@@ -985,19 +935,19 @@
\edef\p_framed_component{#1}%
\pack_framed_add_background
\fi
- \ifx\m_overlay_region\empty\else
+ \ifempty\m_overlay_region\else
\pack_framed_add_region
\fi
\box\b_framed_normal
\egroup}
-\unexpanded\def\localbackgroundframed#1% namespace component box
+\permanent\protected\def\localbackgroundframed#1% namespace component box
{\bgroup
\edef\currentframed{#1}%
\pack_framed_initialize
\pack_framed_process_box_indeed} % group ends here
-\let\postprocessframebox\relax
+\mutable\let\postprocessframebox\relax
%D A nice example by Aditya:
%D
@@ -1018,49 +968,46 @@
% todo: protect local \framednames
-\unexpanded\def\localframed
- {\bgroup
- \dodoubleempty\pack_framed_local}
-
-\unexpanded\def\pack_framed_local[#1][#2]%
- {\bgroup
- \edef\currentframed{#1}%
- \pack_framed_initialize
- \ifsecondargument % faster
- \setupcurrentframed[#2]% here !
- \fi
- \pack_framed_process_indeed}
-
-\unexpanded\def\directlocalframed[#1]% no optional
+\permanent\tolerant\protected\def\localframed[#1]#*[#2]%
{\bgroup
\bgroup
\edef\currentframed{#1}%
\pack_framed_initialize
+ \setupcurrentframed[#2]% here !
\pack_framed_process_indeed}
-\unexpanded\def\localframedwithsettings[#1][#2]% no checking (so no spaces between)
+\permanent\protected\def\directlocalframed[#1]% no optional
{\bgroup
\bgroup
\edef\currentframed{#1}%
\pack_framed_initialize
- \setupcurrentframed[#2]% here !
\pack_framed_process_indeed}
+\aliased\let\localframedwithsettings\localframed
+
% done
-\def\c!fr!analyze{fr:analyze} % private option
+\defineinterfaceconstant {fr!analyze} {fr:analyze} % private option
+
+\aliased\let\delayedbegstrut\relax
+\aliased\let\delayedendstrut\relax
+\aliased\let\delayedstrut \relax
+
+\mutable\let\localoffset\empty
+\mutable\let\localwidth \empty
+\mutable\let\localheight\empty
+\mutable\let\localformat\empty
+\mutable\let\localstrut \empty
-\let\delayedbegstrut\relax
-\let\delayedendstrut\relax
-\let\delayedstrut \relax
+\mutable\let\framedwidth \empty
+\mutable\let\framedheight\empty
+\mutable\let\framedoffset\empty
-\let\localoffset\empty
-\let\localwidth \empty
-\let\localheight\empty
-\let\localformat\empty
-\let\localstrut \empty
+\aliased\let\localbegstrut\relax
+\aliased\let\localendstrut\relax
+\aliased\let\localstrut \relax
-\unexpanded\def\pack_framed_process_indeed
+\protected\def\pack_framed_process_indeed
{\d_framed_frameoffset\framedparameter\c!frameoffset
\edef\p_framed_backgroundoffset{\framedparameter\c!backgroundoffset}%
\d_framed_backgroundoffset
@@ -1073,7 +1020,7 @@
\framedparameter\c!extras
% to get the right spacing
\edef\p_framed_foregroundstyle{\framedparameter\c!foregroundstyle}%
- \ifx\p_framed_foregroundstyle\empty\else\dousestyleparameter\p_framed_foregroundstyle\fi
+ \ifempty\p_framed_foregroundstyle\else\dousestyleparameter\p_framed_foregroundstyle\fi
% beware, both the frame and background offset can be overruled
%
\edef\p_framed_setups{\framedparameter\c!setups}%
@@ -1082,7 +1029,8 @@
\edef\localwidth {\framedparameter\c!width}%
\edef\localheight{\framedparameter\c!height}%
\edef\localformat{\framedparameter\c!align}%
- \edef\localstrut {\framedparameter\c!strut}%
+ %
+ \edef\p_strut {\framedparameter\c!strut}%
% these are not
\edef\p_framed_autostrut {\framedparameter\c!autostrut}%
\edef\p_framed_frame {\framedparameter\c!frame}%
@@ -1103,7 +1051,7 @@
\fi
\ifconditional\c_framed_has_frame
\edef\p_framed_rulethickness{\framedparameter\c!rulethickness}%
- \ifx\p_framed_rulethickness\empty\else
+ \ifempty\p_framed_rulethickness\else
\d_framed_linewidth\p_framed_rulethickness\relax
\fi
\else
@@ -1116,7 +1064,7 @@
%
\forgetall % should happen after \localwidth but before align
%
- \ifx\localformat\empty
+ \ifempty\localformat
\setfalse\c_framed_has_format
\else
\settrue\c_framed_has_format
@@ -1143,7 +1091,7 @@
% obey user set height, also downward compatible
\else
\edef\p_framed_lines{\framedparameter\c!lines}%
- \ifx\p_framed_lines\empty
+ \ifempty\p_framed_lines
\orelse\ifcase\p_framed_lines
\else
\d_framed_height\p_framed_lines\lineheight
@@ -1161,48 +1109,48 @@
% i.e. disable (colsetbackgroundproblemintechniek)
\advance\d_framed_width -2\d_framed_local_offset
\advance\d_framed_height -2\d_framed_local_offset
- \ifcsname\??framedstrutalternative\localstrut\endcsname
+ \ifcsname\??framedstrutalternative\p_strut\endcsname
\lastnamedcs
\else
\framed_offset_alternative_unknown
\fi
% the next check could move to strutalternative
\ifcase\c_framed_has_strut % none (not even noindent)
- \let\localbegstrut\relax
- \let\localendstrut\relax
- \let\localstrut \relax
+ \enforced\let\localbegstrut\relax
+ \enforced\let\localendstrut\relax
+ \enforced\let\localstrut \relax
\or % no / overlay
- \let\localbegstrut\pseudobegstrut
- \let\localendstrut\pseudoendstrut
- \let\localstrut \pseudostrut
+ \enforced\let\localbegstrut\pseudobegstrut
+ \enforced\let\localendstrut\pseudoendstrut
+ \enforced\let\localstrut \pseudostrut
\else
- \let\localbegstrut\begstrut
- \let\localendstrut\endstrut
- \let\localstrut \strut
+ \enforced\let\localbegstrut\begstrut
+ \enforced\let\localendstrut\endstrut
+ \enforced\let\localstrut \strut
\fi
\ifx\p_framed_autostrut\v!yes
- \let\delayedbegstrut\relax
- \let\delayedendstrut\relax
- \let\delayedstrut \relax
+ \enforced\let\delayedbegstrut\relax
+ \enforced\let\delayedendstrut\relax
+ \enforced\let\delayedstrut \relax
\else
- \let\delayedbegstrut\localbegstrut
- \let\delayedendstrut\localendstrut
- \let\delayedstrut \localstrut
- \let\localbegstrut \relax
- \let\localendstrut \relax
- \let\localstrut \relax
+ \enforced\let\delayedbegstrut\localbegstrut
+ \enforced\let\delayedendstrut\localendstrut
+ \enforced\let\delayedstrut \localstrut
+ \enforced\let\localbegstrut \relax
+ \enforced\let\localendstrut \relax
+ \enforced\let\localstrut \relax
\fi
\ifconditional\c_framed_has_height
- \let\\\pack_framed_vboxed_newline
+ \enforced\let\\\pack_framed_vboxed_newline
\ifconditional\c_framed_has_width
- \let\hairline\pack_framed_vboxed_hairline
+ \enforced\let\hairline\pack_framed_vboxed_hairline
\ifconditional\c_framed_has_format
\let\next\pack_framed_format_format_yes
\else
\let\next\pack_framed_format_format_nop
\fi
\else
- \let\hairline\pack_framed_hboxed_hairline
+ \enforced\let\hairline\pack_framed_hboxed_hairline
\ifconditional\c_framed_has_format
\let\next\pack_framed_format_format_height
\else
@@ -1211,22 +1159,22 @@
\fi
\orelse\ifconditional\c_framed_has_width
\ifconditional\c_framed_has_format
- \let\hairline\pack_framed_vboxed_hairline
- \let\\\pack_framed_vboxed_newline
+ \enforced\let\\\pack_framed_vboxed_newline
+ \enforced\let\hairline\pack_framed_vboxed_hairline
\let\next\pack_framed_format_format_width
\else
- \let\hairline\pack_framed_hboxed_hairline
- \let\\\pack_framed_hboxed_newline
+ \enforced\let\\\pack_framed_hboxed_newline
+ \enforced\let\hairline\pack_framed_hboxed_hairline
\let\next\pack_framed_format_format_hsize
\fi
\else
- \let\hairline\pack_framed_hboxed_hairline
- \let\\\pack_framed_hboxed_newline
+ \enforced\let\\\pack_framed_hboxed_newline
+ \enforced\let\hairline\pack_framed_hboxed_hairline
\let\next\pack_framed_format_format_no_size
\fi
\pack_framed_check_extra_offsets
\edef\p_framed_background{\framedparameter\c!background}%
-% \ifx\p_framed_background\empty
+% \ifempty\p_framed_background
% \let\pack_framed_forgetall\forgetall
% \else
% \let\pack_framed_forgetall\relax
@@ -1235,7 +1183,10 @@
\edef\framedwidth {\the\ifdim\d_framed_width >\zeropoint \d_framed_width \else\zeropoint\fi}% public
\edef\framedheight{\the\ifdim\d_framed_height>\zeropoint \d_framed_height\else\zeropoint\fi}% public
\edef\framedoffset{\the\dimexpr\ifconditional\c_framed_has_offset\localoffset \else\zeropoint\fi}% public
- \ifx\p_framed_orientation\empty
+ % for now: i need to think of something better
+ % \bitwiseflip \normalizelinemode -\clipwidthcode % now handled in analyzer
+ % but that's for later
+ \ifempty\p_framed_orientation
\let\pack_framed_stop_orientation\relax
\else
\pack_framed_start_orientation
@@ -1411,22 +1362,25 @@
%D never occur. Nevertheless we implement the whole scheme, if not for future
%D extensions.
-%D \macros
-%D {doassigncheckedframeoffset}
-%D
-%D Offset helper (see menus):
-
-\def\doassigncheckedframeoffset#1#2% could be a fast \csname .. \endcsname
- {\edef\checkedframeoffset{#2}%
- #1%
- \ifx\checkedframeoffset\empty \zeropoint\orelse
- \ifx\checkedframeoffset\v!overlay\zeropoint\orelse
- \ifx\checkedframeoffset\v!none \zeropoint\orelse
- \ifx\checkedframeoffset\v!frame \zeropoint\orelse
- \ifx\checkedframeoffset\v!default\zeropoint\else
- #2%
- \fi
- \relax}
+% %D \macros
+% %D {doassigncheckedframeoffset}
+% %D
+% %D Offset helper (see menus):
+%
+% \def\doassigncheckedframeoffset#1#2% could be a fast \csname .. \endcsname
+% {\edef\checkedframeoffset{#2}%
+% #1%
+% \ifempty\checkedframeoffset \zeropoint\orelse
+% \ifx\checkedframeoffset\v!overlay\zeropoint\orelse
+% \ifx\checkedframeoffset\v!none \zeropoint\orelse
+% \ifx\checkedframeoffset\v!frame \zeropoint\orelse
+% \ifx\checkedframeoffset\v!default\zeropoint\else
+% #2%
+% \fi
+% \relax}
+%
+% \def\doassigncheckedframeoffset#1#2% could be a fast \csname .. \endcsname
+% {#1\ifchkdim#2\or#2\else\zeropoint\fi}%
%D \macros
%D {ifreshapeframebox}
@@ -1487,16 +1441,28 @@
{\profilegivenbox\p_profile\b_framed_normal
\setbox\b_framed_normal\vpack{\unvbox\b_framed_normal}}
-\unexpanded\def\pack_framed_finish
+\def\pack_framed_reverse_box
+ {\ifvbox\b_framed_normal
+ \edef\p_linedirection{\framedparameter\c!linedirection}%
+ \ifx\p_linedirection\v!reverse
+ \reversevboxcontent\b_framed_normal
+ \setbox\b_framed_normal\vpack{\unvbox\b_framed_normal}%
+ \fi
+ \fi}
+
+\protected\def\pack_framed_finish
{%\pack_framed_stop_orientation % hm, wrong place ! should rotate the result (after reshape) .. moved down
\pack_framed_locator_before\p_framed_location
\ifconditional\c_framed_has_format
%\ifconditional\c_framed_has_height \else
% \edef\p_profile{\framedparameter\c!profile}%
- % \ifx\p_profile\empty\else
+ % \ifempty\p_profile\else
% \pack_framed_profile_box
% \fi
%\fi
+ \ifempty\p_framed_anchoring\else
+ \pack_framed_reverse_box
+ \fi
\ifx\p_framed_autowidth\v!force
\pack_framed_finish_a
\orelse\ifx\localwidth\v!fit
@@ -1512,7 +1478,7 @@
\fi
\ifconditional\c_framed_has_height \else
\edef\p_profile{\framedparameter\c!profile}%
- \ifx\p_profile\empty\else
+ \ifempty\p_profile\else
\pack_framed_profile_box
\fi
\fi
@@ -1530,7 +1496,7 @@
\ht\b_framed_normal\d_framed_height
\else
\edef\p_framed_minheight{\framedparameter\c!minheight}%
- \ifx\p_framed_minheight\empty \else
+ \ifempty\p_framed_minheight \else
\ifdim\ht\b_framed_normal<\p_framed_minheight
\ht\b_framed_normal\p_framed_minheight
\fi
@@ -1540,13 +1506,13 @@
\ifx\p_framed_empty\v!yes
\pack_framed_fake_box
\fi
- \ifx\p_framed_anchoring\empty\else
+ \ifempty\p_framed_anchoring\else
\pack_framed_handle_anchoring
\fi
\pack_framed_stop_orientation % moved here at 2014-05-25
\iftrialtypesetting \else
\edef\m_overlay_region{\framedparameter\c!region}%
- \ifx\m_overlay_region\empty\else
+ \ifempty\m_overlay_region\else
\pack_framed_set_region
\fi
\fi
@@ -1557,7 +1523,7 @@
\d_framed_linewidth
\fi
\ifconditional\c_framed_has_offset
- \advance\d_framed_applied_offset\localoffset
+ \advance\d_framed_applied_offset\localoffset\relax
\fi
\ifconditional\c_framed_has_extra_offset
\pack_framed_apply_extra_offsets % includes \d_framed_applied_offset
@@ -1568,7 +1534,8 @@
\fi
\fi
%
- \ifx\postprocessframebox\relax \else
+ \ifrelax\postprocessframebox \else
+ % better: \pushmacro\\postprocessframebox etc
\let\next\postprocessframebox
\let\postprocessframebox\relax % prevent nesting
\next\b_framed_normal
@@ -1579,14 +1546,14 @@
\ifconditional\c_framed_has_frame % real or invisible frame
\pack_framed_add_outline
\fi
- \ifx\p_framed_background\empty \else
+ \ifempty\p_framed_background \else
\edef\p_framed_component{\framedparameter\c!component}%
\pack_framed_add_background
\fi
\fi
\pack_framed_locator_after\p_framed_location
\iftrialtypesetting \else
- \ifx\m_overlay_region\empty\else
+ \ifempty\m_overlay_region\else
\pack_framed_add_region
\fi
\fi
@@ -1630,8 +1597,8 @@
% using the keyword approachs works ok, don't mess with orientation
% directly here using \boxorientation ... it doesn't work that well
\s!orientation\scratchcounter
- \ifx\p_xanchor\empty\else \s!xoffset \p_xanchor\fi
- \ifx\p_yanchor\empty\else \s!yoffset \p_yanchor\fi
+ \ifempty\p_xanchor\else \s!xoffset \p_xanchor\fi
+ \ifempty\p_yanchor\else \s!yoffset \p_yanchor\fi
{\box\b_framed_normal}}}
\installcorenamespace{framedlocatorbefore}
@@ -1646,9 +1613,9 @@
\dp\scratchbox\dp\b_framed_normal
\setbox\b_framed_normal\box\scratchbox}
-\def\installframedlocator#1#2#3%
- {\setvalue{\??framedlocatorbefore#1}{#2}%
- \setvalue{\??framedlocatorafter #1}{#3}}
+\permanent\protected\def\installframedlocator#1#2#3%
+ {\defcsname\??framedlocatorbefore#1\endcsname{#2}%
+ \defcsname\??framedlocatorafter #1\endcsname{#3}}
\def\pack_framed_locator_before#1{\begincsname\??framedlocatorbefore#1\endcsname}
\def\pack_framed_locator_after #1{\begincsname\??framedlocatorafter #1\endcsname}
@@ -1708,23 +1675,6 @@
% \framed[width=2cm,align=middle,location=middle] {location\\equals\\middle}
% B}
-% \installframedlocator \v!hanging % best with strut=no
-% {}
-% {\dp\b_framed_normal\ht\b_framed_normal
-% \ht\b_framed_normal\zeropoint}
-%
-% \installframedlocator \v!depth
-% {}
-% {\ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax
-% \dp\b_framed_normal\strutdp
-% \box\b_framed_normal}
-%
-% \installframedlocator \v!height
-% {}
-% {\dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax
-% \ht\b_framed_normal\strutht
-% \box\b_framed_normal}
-
\installframedlocator \v!hanging % best with strut=no *1* / see mail to list by SB
{}
{\scratchdimen\ht\b_framed_normal
@@ -1862,16 +1812,7 @@
%D [height=3cm] {framed} boxes. Such boxes have to be \inframed {aligned} with the
%D running text.
-\unexpanded\def\inframed
- {\dosingleempty\pack_framed_inline}
-
-% \def\pack_framed_inline[#1]%
-% {\framed[\c!location=\v!low,#1]}
-%
-% or:
-
-\def\pack_framed_inline[%
- {\framed[\c!location=\v!low,}
+\permanent\tolerant\protected\def\inframed[#1]{\framed[\c!location=\v!low,#1]}
%D When we set \type{empty} to \type{yes}, we get ourselves a frame and/or background,
%D but no content, so actually we have a sort of phantom framed box.
@@ -1917,7 +1858,7 @@
\newcount\c_framed_mstyle
-\unexpanded\def\pack_framed_math_strut
+\protected\def\pack_framed_math_strut
{\Ustartmath
\triggermathstyle\c_framed_mstyle
\vphantom{(}%
@@ -1927,44 +1868,42 @@
\installframedcommandhandler \??mathframed {mathframed} \??mathframed
+\newcount\c_pack_framed_mathframed
+\newtoks \t_pack_framed_mathframed
+
\appendtoks
- \setuevalue{\currentmathframed}{\pack_framed_mathframed{\currentmathframed}}%
+ \frozen\protected\instance\edefcsname\currentmathframed\endcsname{\pack_framed_mathframed[\currentmathframed]}%
\to \everydefinemathframed
-\unexpanded\def\pack_framed_mathframed#1%
+\let\pack_framed_mc_one\relax
+\let\pack_framed_mc_two\relax
+
+\tolerant\protected\def\pack_framed_mathframed[#1]#*[#2]#:#3% needs testing !
{\begingroup
\edef\currentmathframed{#1}%
- \dosingleempty\pack_framed_mathframed_indeed}
-
-\newcount\c_pack_framed_mathframed
-\newtoks \t_pack_framed_mathframed
-
-\def\pack_framed_math_pos
- {\global\advance\c_pack_framed_mathframed\plusone
- \xdef\pack_framed_mc_one{mcf:1:\number\c_pack_framed_mathframed}%
- \xdef\pack_framed_mc_two{mcf:2:\number\c_pack_framed_mathframed}%
- \xypos\pack_framed_mc_two}
-
-\def\pack_framed_mathframed_indeed[#1]#2% no fancy nesting supported here
- {\iffirstargument
- \setupcurrentmathframed[#1]%
- \fi
- \c_framed_mstyle\mathstyle
+ \setupcurrentmathframed[#2]%
+ \c_framed_mstyle\normalmathstyle
\edef\m_framed_location{\mathframedparameter\c!location}%
\ifx\m_framed_location\v!mathematics
- \let\normalstrut\pack_framed_math_pos
+ \enforced\let\normalstrut\pack_framed_math_pos % I don't like this overload!
\orelse\ifx\m_framed_location\v!low\else
- \let\normalstrut\pack_framed_math_strut
+ \enforced\let\normalstrut\pack_framed_math_strut
\fi
\inheritedmathframedframed\bgroup
\Ustartmath
\triggermathstyle\c_framed_mstyle
\the\t_pack_framed_mathframed
- #2%
+ #3%
\Ustopmath
\egroup
\endgroup}
+\def\pack_framed_math_pos
+ {\global\advance\c_pack_framed_mathframed\plusone
+ \xdef\pack_framed_mc_one{mcf:1:\number\c_pack_framed_mathframed}%
+ \xdef\pack_framed_mc_two{mcf:2:\number\c_pack_framed_mathframed}%
+ \xypos\pack_framed_mc_two}
+
\appendtoks
\mathraggedstatus\plustwo % makes \startalign work
\eqalignmode \zerocount % makes \startalign fit
@@ -2129,29 +2068,29 @@
\ifdefined\raggedonelinerstate \else \newconditional\raggedonelinerstate \fi
-\def\doformatonelinerbox % beware: assumes explicit preceding bgroup
+\permanent\protected\def\doformatonelinerbox % beware: assumes explicit preceding bgroup
{\ifconditional\raggedonelinerstate
\expandafter\dodoformatonelinerbox
\else
\expandafter\nodoformatonelinerbox
\fi}
-\def\dodoformatonelinerbox
+\permanent\protected\def\dodoformatonelinerbox
{\afterassignment\redoformatonelinerbox
\setbox\nextbox\hbox} % maybe \hpack
-\def\redoformatonelinerbox
+\permanent\protected\def\redoformatonelinerbox
{\aftergroup\dododoformatonelinerbox
\ignorespaces}
-\def\dododoformatonelinerbox
+\permanent\protected\def\dododoformatonelinerbox
{\hpack to \hsize % was \hbox
{\ifcase\raggedstatus\or\hss\or\hss \fi
\unhbox\nextbox \removeunwantedspaces
\ifcase\raggedstatus\or \or\hss\or\hss\fi}%
\egroup}
-\def\nodoformatonelinerbox % grabs {
+\permanent\protected\def\nodoformatonelinerbox % grabs {
{\let\next=}
%D The handlers:
@@ -2172,10 +2111,10 @@
\def\pack_framed_set_foregroundcolor
{\edef\p_framed_foregroundcolor{\framedparameter\c!foregroundcolor}%
- \ifx\p_framed_foregroundcolor\empty\else\dousecolorparameter\p_framed_foregroundcolor\fi}
+ \ifempty\p_framed_foregroundcolor\else\dousecolorparameter\p_framed_foregroundcolor\fi}
\def\pack_framed_do_setups
- {\ifx\p_framed_setups\empty \else
+ {\ifempty\p_framed_setups \else
\setups[\p_framed_setups]% \texsetup (or only one!)
% \fastsetup\p_framed_setup % singular would have been better
\fi}
@@ -2194,12 +2133,10 @@
\pack_framed_do_setups
\raggedcommand
\pack_framed_do_top
- \bgroup
\synchronizeinlinedirection
\localbegstrut
- \aftergroup\localendstrut
- \aftergroup\pack_framed_do_bottom
- \aftergroup\egroup
+ \atendofgroup\localendstrut
+ \atendofgroup\pack_framed_do_bottom
\doformatonelinerbox}
\def\pack_framed_format_format_nop
@@ -2216,12 +2153,10 @@
\pack_framed_do_setups
\raggedcenter
\vss
- \bgroup
\synchronizeinlinedirection
\localbegstrut
- \aftergroup\localendstrut
- \aftergroup\vss
- \aftergroup\egroup
+ \atendofgroup\localendstrut
+ \atendofgroup\vss
\doformatonelinerbox}
\def\pack_framed_format_format_height
@@ -2236,12 +2171,10 @@
\pack_framed_do_setups
\raggedcommand
\vss
- \bgroup
- \aftergroup\localendstrut
- \aftergroup\vss
- \aftergroup\egroup
\synchronizeinlinedirection
\localbegstrut
+ \atendofgroup\localendstrut
+ \atendofgroup\vss
\doformatonelinerbox}
\def\pack_framed_format_format_width
@@ -2257,12 +2190,10 @@
\pack_framed_do_setups
\raggedcommand
\pack_framed_do_top
- \bgroup
\synchronizeinlinedirection
\localbegstrut
- \aftergroup\localendstrut
- \aftergroup\pack_framed_do_bottom
- \aftergroup\egroup
+ \atendofgroup\localendstrut
+ \atendofgroup\pack_framed_do_bottom
\doformatonelinerbox}
\def\pack_framed_format_format_vsize
@@ -2276,9 +2207,7 @@
\vsize\d_framed_height
\pack_framed_do_setups
\vss
- \bgroup
- \aftergroup\vss
- \aftergroup\egroup
+ \atendofgroup\vss
\hbox
\bgroup
\aftergroup\egroup
@@ -2298,9 +2227,7 @@
\hss
\synchronizeinlinedirection
\localstrut
- \bgroup
- \aftergroup\hss
- \aftergroup\egroup
+ \atendofgroup\hss
\doformatonelinerbox}
\def\pack_framed_format_format_no_size
@@ -2481,7 +2408,7 @@
%D These macros try to adapt their behaviour as good as possible to the circumstances
%D and act as natural as possible.
-\unexpanded\def\pack_framed_vboxed_hairline % nasty overlay mess .. needed for autowidth
+\protected\def\pack_framed_vboxed_hairline % nasty overlay mess .. needed for autowidth
{\begingroup
\scratchoffset\ifconditional\c_framed_has_offset \localoffset \else \zeropoint \fi
\scratchwidth \dimexpr\scratchoffset+\d_framed_linewidth\relax
@@ -2505,7 +2432,7 @@
\localbegstrut
\endgroup}
-\unexpanded\def\pack_framed_hboxed_hairline % use framed dimen
+\protected\def\pack_framed_hboxed_hairline % use framed dimen
{\bgroup
\scratchoffset\ifconditional\c_framed_has_offset \localoffset \else \zeropoint \fi
\ifconditional\c_framed_has_height
@@ -2529,10 +2456,10 @@
%D The argument of the frame command accepts \type{\\} as a sort of newline signal. In
%D horizontal boxes it expands to a space.
-\unexpanded\def\pack_framed_vboxed_newline
+\protected\def\pack_framed_vboxed_newline
{\endgraf\ignorespaces}
-\unexpanded\def\pack_framed_hboxed_newline
+\protected\def\pack_framed_hboxed_newline
{\unskip\normalspace\ignorespaces}
%D We can set each rule on or off. The default setting is inherited from
@@ -2697,9 +2624,9 @@
\c!margin=\v!standard]
\appendtoks
- \setuevalue{\e!start\currentframedtext}{\pack_framed_text_start {\currentframedtext}}%
- \setuevalue{\e!stop \currentframedtext}{\pack_framed_text_stop }%
- \setuevalue {\currentframedtext}{\pack_framed_text_direct{\currentframedtext}}%
+ \frozen\instance\protected\edefcsname\e!start\currentframedtext\endcsname{\pack_framed_text_start [\currentframedtext]}%
+ \frozen\instance\protected\edefcsname\e!stop \currentframedtext\endcsname{\pack_framed_text_stop }%
+ \frozen\instance\protected\edefcsname \currentframedtext\endcsname{\pack_framed_text_direct[\currentframedtext]}%
\to \everydefineframedtext
\setvalue{\??framedtextlocation\v!left }{\letframedtextparameter\c!left \relax
@@ -2715,15 +2642,12 @@
\letframedtextparameter\c!right\relax
\settrue\c_framed_text_location_none}
-\unexpanded\def\pack_framed_text_start#1%
+\tolerant\protected\def\pack_framed_text_start[#1]#*[#2]#*[#3]% or #1#*[#2]#*[#3]% and pass {#1}
{\bgroup
- \edef\currentframedtext{#1}%
- \dodoubleempty\pack_framed_text_start_indeed}
-
-\def\pack_framed_text_start_indeed[#1][#2]%
- {\doifelseassignment{#1}
- {\pack_framed_text_start_continue\empty{#1}}
- {\pack_framed_text_start_continue{#1}{#2}}}
+ \edef\currentframedtext{#1}
+ \doifelseassignment{#2}
+ {\pack_framed_text_start_continue\empty{#2}}
+ {\pack_framed_text_start_continue{#2}{#3}}}
% todo: sort out first/lastline ht/dp
@@ -2742,7 +2666,7 @@
% \edef\p_framed_text_strut{\letframedtextparameter\c!strut}% to be used
\letframedtextparameter\c!strut\v!no
\inheritedframedtextframed\bgroup
- \let\\=\endgraf
+ \enforced\let\\\endgraf
\edef\p_framed_text_depthcorrection{\framedtextparameter\c!depthcorrection}%
\ifx\p_framed_text_depthcorrection\v!on
\pack_framed_text_start_depth_correction
@@ -2769,7 +2693,7 @@
\defineplacement[\??framedtext][\s!parent=\??framedtext\currentframedtext]
-\unexpanded\def\pack_framed_text_stop % no \baselinecorrection, see faq docs
+\protected\def\pack_framed_text_stop % no \baselinecorrection, see faq docs
{\endgraf
\removelastskip
\ifx\p_framed_text_depthcorrection\v!on
@@ -2849,21 +2773,18 @@
%D The simple brace (or group) delimited case is typeset slightly different
%D and is not aligned.
-\unexpanded\def\pack_framed_text_direct#1%
+\let\pack_framed_strut\relax
+
+\tolerant\protected\def\pack_framed_text_direct[#1]#*[#2]%
{\bgroup
\edef\currentframedtext{#1}%
- \dosingleempty\pack_framed_text_start_direct}
-
-\def\pack_framed_text_start_direct[#1]%
- {\usebodyfontparameter\framedtextparameter
- \iffirstargument
- \setupcurrentframedtext[#1]%
- \fi
+ \usebodyfontparameter\framedtextparameter
+ \setupcurrentframedtext[#2]%
\edef\p_framed_text_strut{\framedtextparameter\c!strut}%
\letframedtextparameter\c!strut\v!no
\inheritedframedtextframed\bgroup
\blank[\v!disable]%
- \let\\=\endgraf
+ \enforced\let\\\endgraf
\useframedtextstyleandcolor\c!style\c!color
\vskip-\strutdp % brrr why is this needed ... needs to be sorted out, see testcase 1
\framedtextparameter\c!inner
@@ -2907,33 +2828,44 @@
\to \everypresetframed
\appendtoks
- \setuevalue\currentframed{\pack_framed_defined_process[\currentframed]}%
+ \frozen\instance\setuevalue{\currentframed}{\pack_framed_defined_process[\currentframed]}%
\to \everydefineframed
\newcount\c_temp_framed_crap
-\unexpanded\def\pack_framed_defined_process[#1]% official (not much checking, todo: parent)
+% \permanent\tolerant\protected\def\pack_framed_defined_process[#1]#*[#2]% official (not much checking, todo: parent)
+% {\bgroup
+% \ifcsname\??regularframedlevel#1\endcsname
+% %\expandafter\let\expandafter\c_pack_framed_temp\csname\??regularframedlevel#1\endcsname
+% \expandafter\let\expandafter\c_pack_framed_temp\lastnamedcs
+% \else
+% \let\c_pack_framed_temp\c_temp_framed_crap
+% \fi
+% \advance\c_pack_framed_temp\plusone
+% \defcsname\??framed#1>\the\c_pack_framed_temp:\s!parent\endcsname{\??framed#1}% \inheritlocalframed
+% \bgroup
+% \edef\currentframed{#1>\the\c_pack_framed_temp}%
+% \pack_framed_initialize
+% \setupcurrentframed[#2]% here !
+% \pack_framed_process_indeed}
+
+\permanent\tolerant\protected\def\pack_framed_defined_process[#1]#*[#2]% official (not much checking, todo: parent)
{\bgroup
\ifcsname\??regularframedlevel#1\endcsname
%\expandafter\let\expandafter\c_pack_framed_temp\csname\??regularframedlevel#1\endcsname
- \expandafter\let\expandafter\c_pack_framed_temp\lastnamedcs
+ \scratchcounter\lastnamedcs
\else
- \let\c_pack_framed_temp\c_temp_framed_crap
+ \scratchcounter\c_temp_framed_crap
\fi
- \advance\c_pack_framed_temp\plusone
- \expandafter\def\csname\??framed#1>\the\c_pack_framed_temp:\s!parent\endcsname{\??framed#1}% \inheritlocalframed
+ \advance\scratchcounter\plusone
+ \defcsname\??framed#1>\the\scratchcounter:\s!parent\endcsname{\??framed#1}% \inheritlocalframed
\bgroup
- \edef\currentframed{#1>\the\c_pack_framed_temp}%
+ \edef\currentframed{#1>\the\scratchcounter}%
\pack_framed_initialize
- \dosingleempty\pack_framed_defined_process_indeed}
-
-\def\pack_framed_defined_process_indeed[#1]%
- {\iffirstargument % faster
- \setupcurrentframed[#1]% here !
- \fi
+ \setupcurrentframed[#2]% here !
\pack_framed_process_indeed}
-\let\placeframed\pack_framed_defined_process % new per 2012/04/23
+\aliased\let\placeframed\pack_framed_defined_process % new per 2012/04/23
%D We can do:
%D
@@ -2996,17 +2928,16 @@
%\c!width=\v!fit,
\c!offset=\v!overlay]
-\unexpanded\def\startframedcontent
- {\dosingleempty\pack_framed_start_content}
+\permanent\let\stopframedcontent\relax
-\def\pack_framed_start_content[#1]%
+\permanent\tolerant\protected\def\startframedcontent[#1]%
{\bgroup
\edef\currentframedcontent{#1}%
\ifx\currentframedcontent\v!off
- \let\stopframedcontent\egroup
+ \enforced\let\stopframedcontent\egroup
\else
\checkframedcontentparent
- \let\stopframedcontent\pack_framed_stop_content_indeed
+ \enforced\let\stopframedcontent\pack_framed_stop_content_indeed
\expandafter\pack_framed_start_content_indeed
\fi}
@@ -3027,7 +2958,7 @@
\forgetall
\blank[\v!disable]}
-\def\pack_framed_stop_content_indeed
+\protected\def\pack_framed_stop_content_indeed
{\removelastskip
\egroup
\vskip\scratchbottomoffset
@@ -3056,8 +2987,6 @@
%D A Goodie:
-\def\v!unframed{unframed}
-
\defineframed
[\v!unframed]
[\c!frame=\v!off,
@@ -3072,18 +3001,17 @@
%D \the\dimexpr\themaxboxwidth\scratchbox\relax
%D \stoptyping
-\let\themaxboxwidth\clf_themaxboxwidth
+% \let\themaxboxwidth % defined at the lua end
-%D New: slow but ok for most cases:
+%D Fast enough for most cases (we could do a massive \type {\ifhastok} instead):
-\unexpanded\def\doifelseframed#1%
- {\ifcase\numexpr\zerocount
- \immediateassignment\edef\tempstring{#1\c!frame }\ifx\tempstring\v!on +\plusone\fi
- \immediateassignment\edef\tempstring{#1\c!topframe }\ifx\tempstring\v!on +\plusone\fi
- \immediateassignment\edef\tempstring{#1\c!bottomframe}\ifx\tempstring\v!on +\plusone\fi
- \immediateassignment\edef\tempstring{#1\c!leftframe }\ifx\tempstring\v!on +\plusone\fi
- \immediateassignment\edef\tempstring{#1\c!rightframe }\ifx\tempstring\v!on +\plusone\fi
- \immediateassignment\edef\tempstring{#1\c!background }\ifx\tempstring\empty\else+\plusone\fi
- \relax\expandafter\secondoftwoarguments\else\expandafter\firstoftwoarguments\fi}
+\permanent\protected\def\doifelseframed#1%
+ {\iftok{#1\c!frame }{\v!on}\expandafter\firstoftwoarguments
+ \orelse\iftok{#1\c!topframe }{\v!on}\expandafter\firstoftwoarguments
+ \orelse\iftok{#1\c!bottomframe}{\v!on}\expandafter\firstoftwoarguments
+ \orelse\iftok{#1\c!leftframe }{\v!on}\expandafter\firstoftwoarguments
+ \orelse\iftok{#1\c!rightframe }{\v!on}\expandafter\firstoftwoarguments
+ \orelse\iftok{#1\c!background } {}\expandafter\secondoftwoarguments
+ \else \expandafter\firstoftwoarguments\fi}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-app.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-app.mkxl
new file mode 100644
index 00000000000..d75366cca0d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-app.mkxl
@@ -0,0 +1,205 @@
+%D \module
+%D [ file=page-app, % from meta-fig
+%D version=1998.01.15,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Independent 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 Page Macros / Applications}
+
+%D This needs an update with a proper define and inheritance.
+
+\unprotect
+
+\installcorenamespace{fittingpage}
+
+\installframedcommandhandler \??fittingpage {fittingpage} \??fittingpage
+
+\newdimen\d_page_fitting_width
+\newdimen\d_page_fitting_height
+\newbox \b_page_fitting
+
+\definepapersize
+ [fittingpage]
+ [\c!width=\d_page_fitting_width,
+ \c!height=\d_page_fitting_height]
+
+\definemakeup
+ [fittingpage]
+ [\c!textstate=\v!empty,
+ \c!doublesided=\v!no,
+ \c!location=\v!top, % no topskip
+ \c!pagestate=\fittingpageparameter\c!pagestate]%
+
+\definelayout
+ [fittingpage]
+ [\v!page]
+ [\c!width=\d_page_fitting_width,
+ \c!height=\d_page_fitting_height,
+ \c!location=\v!middle]
+
+\appendtoks
+ \frozen\instance\protected\edefcsname\e!start\currentfittingpage\endcsname{\startfittingpage[\currentfittingpage]}%
+ \frozen\instance\protected\edefcsname\e!stop \currentfittingpage\endcsname{\stopfittingpage}%
+\to \everydefinefittingpage
+
+\permanent\tolerant\protected\def\startfittingpage[#1]#*[#2]%
+ {\page % this is kind of tricky! there can be preceding page refs
+ \autostarttext
+ \bgroup % resulting in a zero height page; test fig-make !
+ \setupinterlinespace[\v!top=0]% no topskip
+ \def\currentfittingpage{#1}%
+ \dontcomplain
+ % runs under current page regime, i.e. page variables passed to mp
+ \setupcurrentfittingpage[\c!paper=,#2]% auto or size or nothing
+ \doifelsenothing{\fittingpageparameter\c!command}
+ \page_fitting_start_normal
+ \page_fitting_start_command}
+
+\def\page_fitting_start_command
+ {\grabuntil{\e!stop\currentfittingpage}\page_fitting_stop_command}
+
+\def\page_fitting_stop_command#1%
+ {\page_fitting_start_normal
+ \fittingpageparameter\c!command{#1}%
+ \page_fitting_stop_normal}
+
+\def\page_fitting_start_normal
+ {\setbox\b_page_fitting\hbox
+ \bgroup
+ \inheritedfittingpageframed
+ \bgroup
+ \gobblespacetokens}
+
+\protected\def\page_fitting_stop_normal % todo: figure out why a small mp image gets shifted
+ {\removeunwantedspaces
+ \egroup
+ \egroup
+ % finalize
+ \doif{\fittingpageparameter\c!margin}\v!page
+ {\setbox\b_page_fitting\hpack\bgroup
+ \offsetbox
+ [\c!leftoffset=\backspace,
+ \c!rightoffset=\cutspace,
+ \c!topoffset=\topspace,
+ \c!bottomoffset=\bottomspace]
+ {\box\b_page_fitting}%
+ \egroup}%
+ \doifsomething{\fittingpageparameter\c!scale}
+ {\setbox\b_page_fitting\hpack\bgroup
+ \scale[\c!scale=\fittingpageparameter\c!scale]{\box\b_page_fitting}%
+ \egroup}%
+ \ifdim\ht\b_page_fitting=\zeropoint
+ \ht\b_page_fitting\onepoint
+ \fi
+ \ifdim\wd\b_page_fitting=\zeropoint
+ \wd\b_page_fitting\onepoint
+ \fi
+ \d_page_fitting_width \wd\b_page_fitting
+ \d_page_fitting_height\ht\b_page_fitting
+ \startlocallayout % hm, we change the papersize so we still need it
+ \enforced\let\checkcurrentlayout\relax % else interference with odd/even layout
+ \processaction
+ [\fittingpageparameter\c!paper]
+ [ \v!auto=>\let\scratchstringone\printpapersize,
+ \s!unknown=>\let\scratchstringone\commalistelement,
+ \s!default=>\def\scratchstringone{fittingpage}]%
+ \normalexpanded{\setuppapersize[fittingpage][\scratchstringone]}%
+ \startmakeup[fittingpage]%
+ \box\b_page_fitting
+ \stopmakeup
+ \stoplocallayout % we need to get rid of this and use the built-in
+ \egroup
+ \autostoptext}
+
+\permanent\let\stopfittingpage\page_fitting_stop_normal
+
+\setupfittingpage
+ [%\c!scale=1000,
+ %\c!pagestate=,
+ \c!strut=\v!no,
+ \c!align=\v!normal,
+ \c!offset=\v!overlay,
+ \c!width=\v!fit,
+ \c!height=\v!fit,
+ \c!frame=\v!off]
+
+%D \TEX\ pages (for \METAPOST\ pages, see \type {meta-fig}):
+
+%D \starttyping
+%D \startTEXpage[align=normal,width=900pt,autowidth=force]
+%D \framed[width=800pt,frame=off]{\number\dimexpr800pt}\par
+%D \input tufte\par
+%D \stopTEXpage
+%D \stoptyping
+%D
+%D Beware: the width is the textwidth!
+
+\definefittingpage
+ [TEXpage]
+ [\c!align=\v!normal] % needed, else problems !
+
+\permanent\protected\def\setupTEXpage
+ {\setupfittingpage[TEXpage]}
+
+%D For Mojca:
+%D
+%D \starttyping
+%D \startTEXstream \chapter{Bla} Hello world!\crlf Hello world! \stopTEXstream
+%D \startTEXpage \chapter{Bla} Hello world!\crlf Hello world! \stopTEXpage
+%D \stoptyping
+%D
+%D maybe I should support stream=yes in framed.
+
+\permanent\tolerant\protected\def\startTEXstream[#1]% old code, to be redone
+ {\page
+ \enableoutputstream[tex]}
+
+\permanent\protected\def\stopTEXstream
+ {\disableoutputstream
+ \startTEXpage % [\c!align=\v!normal]
+ \outputstreamunvbox[tex]%
+ \stopTEXpage}
+
+%D Application pages, a quick \MKIV\ hack:
+
+\definetypesetting[TEXapplication]
+\definebuffer[TEXapplication]
+
+% we could use a counter and saves runs on numbering them.
+
+\permanent\def\TEXapplicationfilename{\jobname-texapplication.tex}
+
+\permanent\protected\def\stopTEXapplication
+ {\savebuffer[\thedefinedbuffer{TEXapplication}][\TEXapplicationfilename]%
+ \typesetfile[TEXapplication][\TEXapplicationfilename]\relax}
+
+%D \macros
+%D {startpagefigure}
+%D
+%D \starttyping
+%D \starttext \pagefigure[two.1] \stoptext
+%D \stoptyping
+
+\defineexternalfigure[\v!page:\v!figure][\c!offset=\v!overlay] % we force a parent
+
+\permanent\tolerant\protected\def\startpagefigure[#1]#*[#2]%
+ {\bgroup
+ \setupexternalfigure[\v!page:\v!figure][\c!offset=\v!overlay,#2]%
+ \startTEXpage[\c!offset=\namedexternalfigureparameter{\v!page:\v!figure}\c!offset,\c!align=\v!normal]%
+ \externalfigure[#1]\ignorespaces} % so we can put some text below the graphic
+
+\permanent\protected\def\stoppagefigure
+ {\stopTEXpage
+ \egroup}
+
+\permanent\tolerant\protected\def\pagefigure[#1]#*[#2]%
+ {\startpagefigure[#1][#2]\stoppagefigure}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-bck.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-bck.mkxl
new file mode 100644
index 00000000000..5683ba2505e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-bck.mkxl
@@ -0,0 +1,708 @@
+%D \module
+%D [ file=page-bck, % copied from main-001
+%D version=1997.03.31,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Backgrounds,
+%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.
+
+% Currently the text cells are fakes and no (foreground) frames which makes sense
+% as order might matter e.g. is text sticks in other cells. The page, text etc
+% areas do support foreground order change.
+
+\writestatus{loading}{ConTeXt Page Macros / Backgrounds}
+
+\unprotect
+
+% maybe use \currentframedhash here
+
+%D For special purposes, users can question the \type {*background} mode. This mode
+%D is only available when typesetting the pagebody.
+%D
+%D \starttyping
+%D \startmode[*background] ...
+%D \stoptyping
+
+\newconditional\c_page_backgrounds_new
+\newconditional\c_page_backgrounds_new_right
+\newconditional\c_page_backgrounds_new_left
+\newconditional\c_page_backgrounds_some
+
+\appendtoks
+ \ifconditional\c_page_backgrounds_some
+ \ifconditional\c_page_backgrounds_new
+ \setsystemmode\v!background
+ \fi
+ \fi
+\to \everybeforepagebody
+
+\permanent\protected\def\initializepagebackgrounds
+ {\setfalse\c_page_backgrounds_new
+ \setfalse\c_page_backgrounds_new_right
+ \setfalse\c_page_backgrounds_new_left
+ \setfalse\c_page_backgrounds_some}
+
+%D We keep calculations and checks to a minimum and also try to minimize
+%D the amount of tracing due to expansion.
+
+\mutable\let\currentotrbackground\empty
+
+%D This is the only spot where we have a low level dependency on the way
+%D parent chains are defined but we want the speed.
+
+\protected\def\page_backgrounds_check_background
+ {\ifcsname\??framed\currentotrbackground:\c!background\endcsname
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!background\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
+ \ifempty\page_background_temp
+ \expandafter\expandafter\expandafter\page_backgrounds_check_frame
+ \else
+ \page_backgrounds_set_yes
+ \fi
+ \else
+ \expandafter\page_backgrounds_check_frame
+ \fi}
+
+\def\page_backgrounds_check_frame
+ {\ifcsname\??framed\currentotrbackground:\c!frame\endcsname
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!frame\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
+ \ifx\page_background_temp\v!on
+ \page_backgrounds_set_yes
+ \else
+ \expandafter\expandafter\expandafter\page_backgrounds_check_leftframe
+ \fi
+ \else
+ \expandafter\page_backgrounds_check_leftframe
+ \fi}
+
+\def\page_backgrounds_check_leftframe
+ {\ifcsname\??framed\currentotrbackground:\c!leftframe\endcsname
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!leftframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
+ \ifx\page_background_temp\v!on
+ \page_backgrounds_set_yes
+ \else
+ \expandafter\expandafter\expandafter\page_backgrounds_check_rightframe
+ \fi
+ \else
+ \expandafter\page_backgrounds_check_rightframe
+ \fi}
+
+\def\page_backgrounds_check_rightframe
+ {\ifcsname\??framed\currentotrbackground:\c!rightframe\endcsname
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!rightframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
+ \ifx\page_background_temp\v!on
+ \page_backgrounds_set_yes
+ \else
+ \expandafter\expandafter\expandafter\page_backgrounds_check_topframe
+ \fi
+ \else
+ \expandafter\page_backgrounds_check_topframe
+ \fi}
+
+\def\page_backgrounds_check_topframe
+ {\ifcsname\??framed\currentotrbackground:\c!topframe\endcsname
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!topframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
+ \ifx\page_background_temp\v!on
+ \page_backgrounds_set_yes
+ \else
+ \expandafter\expandafter\expandafter\page_backgrounds_check_bottomframe
+ \fi
+ \else
+ \expandafter\page_backgrounds_check_bottomframe
+ \fi}
+
+\def\page_backgrounds_check_bottomframe
+ {\ifcsname\??framed\currentotrbackground:\c!bottomframe\endcsname
+ %\edef\page_background_temp{\csname\??framed\currentotrbackground:\c!bottomframe\endcsname}%
+ \edef\page_background_temp{\lastnamedcs}%
+ \ifx\page_background_temp\v!on
+ \page_backgrounds_set_yes
+ \else
+ \page_backgrounds_set_nop
+ \fi
+ \else
+ \page_backgrounds_set_nop
+ \fi}
+
+%D We don't use the commandhandler code as we want these multitude of backgrounds to be
+%D as fast as possible.
+
+\installcorenamespace{layoutbackgrounds}
+\installcorenamespace{layoutbackgroundcheck} % we need another hash as \??layoutbackgrounds<...> gets defined
+
+\def\page_backgrounds_set_yes{\letcsname\currentotrbackground\endcsname\relax }
+\def\page_backgrounds_set_nop{\letcsname\currentotrbackground\endcsname\undefined}
+
+\protected\def\page_backgrounds_check#1%
+ {\edef\currentotrbackground{\??layoutbackgrounds#1}%
+ \page_backgrounds_check_background}
+
+\permanent\def\doifelsesomebackground#1%
+ {\ifcsname\??layoutbackgrounds#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifsomebackgroundelse\doifelsesomebackground
+
+\permanent\def\doifsomebackground#1%
+ {\ifcsname\??layoutbackgrounds#1\endcsname
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+%D The background mechanism falls back on the \type {\framed} macro. This means
+%D that all normal frame and overlay features can be used.
+
+\def\page_backgrounds_add_to_box#1% area
+ {\ifcsname\??layoutbackgrounds#1\endcsname
+ \expandafter\page_backgrounds_add_to_box_indeed
+ \else
+ \expandafter\gobblefourarguments
+ \fi#1}
+
+%D We don't need the dimensions here as this is a real framed but the question is:
+%D do we indeed need a real framed or can we use a fake (i.e. no foreground, only
+%D for hidden).
+
+\def\page_backgrounds_add_to_box_indeed#1#2#3#4% area box width height / always non zero
+ {\edef\p_page_backgrounds_setups{\namedframedparameter{\??layoutbackgrounds#1}\c!setups}%
+ \ifempty\p_page_backgrounds_setups \else
+ \doprocesslocalsetups\p_page_backgrounds_setups % should not produce funny spaces !
+ \fi
+ % #2 has the right dimensions already
+ \setbox#2\hpack{\localbackgroundframed{\??layoutbackgrounds#1}#1#2}}% a real framed (including foreground)
+
+
+%D There are quite some backgrounds. At the bottom layer, there is the {\em paper}
+%D background. This one is only used for special purposes, like annotations to
+%D documents.
+
+\def\page_backgrounds_add_to_print#1%
+ {\page_backgrounds_add_to_box\v!paper#1\printpaperwidth\printpaperheight}
+
+%D The page backgrounds can be put behind the {\em left page}, the {\em right page}
+%D or {\em each page}. As with the paper background, these are calculated on each
+%D page.
+
+\def\page_backgrounds_add_to_paper#1%
+ {\doifbothsidesoverruled
+ {\page_backgrounds_add_to_box\v!rightpage#1\paperwidth\paperheight}%
+ {\page_backgrounds_add_to_box\v!rightpage#1\paperwidth\paperheight}%
+ {\page_backgrounds_add_to_box\v!leftpage #1\paperwidth\paperheight}%
+ \page_backgrounds_add_to_box\v!page#1\paperwidth\paperheight}
+
+%D Then there are the 25 areas that make up the layout: {\em top, header, text,
+%D footer, bottom} times {\em left edge, left margin, text, right margin, right
+%D edge}. These are only recalculated when they change or when the \type {status}
+%D is set to \type {repeat}.
+
+\newbox\leftbackground % todo: rename
+\newbox\rightbackground % todo: rename
+
+%D Finaly there is an aditional {\em text} background, again useful for special
+%D purposes only. This one is calculated each time. The hidden backgrounds are not
+%D meant for users!
+
+\newconditional\c_page_backgrounds_hidden_enabled
+
+\def\page_backgrounds_add_to_text#1%
+ {\ifconditional\c_page_backgrounds_hidden_enabled
+ \page_backgrounds_add_to_box\v!hidden#1\makeupwidth\textheight % mine !
+ \fi
+ \page_backgrounds_add_to_box\v!text#1\makeupwidth\textheight}
+
+%D The next couple of macros implement the area backgrounds. As said, these are
+%D cached in dedicated boxes. The offsets and depth of the page are used for
+%D alignment purposes.
+
+%newdimen\pageoffset % bleed
+%newdimen\pagedepth % built-in
+
+%D We need a bit more clever mechanism in order to handle layers well. This means
+%D that we cannot calculate both background at the same time since something may
+%D have changed halfway a page.
+
+%D Margin swapping has been simplified: see mkii code in case of regression.
+%D Calculation is delayed till the page anyway so the state is known.
+
+\def\page_backgrounds_recalculate
+ {\global\settrue\c_page_backgrounds_new}
+
+\def\page_backgrounds_set_boxes
+ {\ifconditional\c_page_backgrounds_new
+ \page_backgrounds_set_boxes_r
+ \fi
+ \doifbothsides
+ \page_backgrounds_set_boxes_a
+ \page_backgrounds_set_boxes_b
+ \page_backgrounds_set_boxes_c
+ \ifx\p_page_backgrounds_state\v!repeat\else
+ \global\setfalse\c_page_backgrounds_new
+ \fi}
+
+\def\page_backgrounds_set_boxes_r
+ {\global\settrue\c_page_backgrounds_new_right
+ \global\settrue\c_page_backgrounds_new_left
+ \global\setbox\leftbackground\emptybox
+ \global\setbox\rightbackground\emptybox}
+
+\def\page_backgrounds_set_boxes_a
+ {\ifconditional\c_page_backgrounds_new_left
+ % \showmessage\m!layouts8\empty
+ \page_backgrounds_set_box\leftbackground % \conditionalfalse
+ \global\setfalse\c_page_backgrounds_new_left
+ \global\setfalse\c_page_backgrounds_new_right
+ \fi}
+
+\def\page_backgrounds_set_boxes_b
+ {\ifconditional\c_page_backgrounds_new_left
+ % \showmessage\m!layouts8\empty
+ \page_backgrounds_set_box\leftbackground
+ \global\setfalse\c_page_backgrounds_new_left
+ \fi}
+
+\def\page_backgrounds_set_boxes_c
+ {\ifconditional\c_page_backgrounds_new_right
+ % \showmessage\m!layouts8\empty
+ \page_backgrounds_set_box\rightbackground
+ \global\setfalse\c_page_backgrounds_new_right
+ \fi}
+
+\def\page_backgrounds_add_to_main#1% todo: dimension spec
+ {\ifconditional\c_page_backgrounds_some
+ \page_backgrounds_set_boxes
+ \setbox#1\vpack
+ {\offinterlineskip
+ \doifelsemarginswap{\copy\leftbackground}{\copy\rightbackground}%
+ \box#1}%
+ \fi}
+
+\newdimen\pagebackgroundhoffset % THESE WILL BECOME OBSOLETE
+\newdimen\pagebackgroundvoffset
+\newdimen\pagebackgroundoffset % used elsewhere
+\newdimen\pagebackgrounddepth
+\newdimen\pagebackgroundcompensation
+
+\def\page_backgrounds_set_offsets % used in menus (we can use ifcsname's here)
+ {\ifconditional\c_page_backgrounds_some \ifconditional\c_page_backgrounds_new
+ \page_backgrounds_set_offsets_indeed % indirect, less tracing
+ \fi \fi}
+
+\def\page_backgrounds_set_offsets_indeed
+ {\ifcsname\??layoutbackgrounds\v!text\v!text\endcsname
+ \page_backgrounds_set_offsets_yes
+ \orelse\ifcsname\??layoutbackgrounds\v!text\endcsname
+ \page_backgrounds_set_offsets_yes
+ \else
+ \page_backgrounds_set_offsets_nop
+ \fi}
+
+\def\page_backgrounds_set_offsets_nop
+ {\global\pagebackgroundhoffset \zeropoint
+ \global\pagebackgroundvoffset \zeropoint
+ \global\pagebackgrounddepth \zeropoint
+ \global\pagebackgroundcompensation\zeropoint}
+
+\def\page_backgrounds_set_offsets_yes
+ {\global\pagebackgroundoffset \d_page_backgrounds_depth
+ \global\pagebackgroundcompensation\d_page_backgrounds_offset\relax
+ \ifzeropt\pagebackgroundcompensation
+ \page_backgrounds_set_offsets_nop
+ \else
+ \ifcsname\??layoutbackgrounds\v!top\v!text\endcsname
+ \global\pagebackgroundhoffset\zeropoint
+ \orelse\ifcsname\??layoutbackgrounds\v!bottom\v!text\endcsname
+ \global\pagebackgroundhoffset\zeropoint
+ \else
+ \global\pagebackgroundhoffset\pagebackgroundcompensation
+ \fi
+ \ifcsname\??layoutbackgrounds\v!text\v!rightedge\endcsname
+ \global\pagebackgroundvoffset\zeropoint
+ \global\pagebackgrounddepth \zeropoint
+ \orelse\ifcsname\??layoutbackgrounds\v!text\v!leftedge\endcsname
+ \global\pagebackgroundvoffset\zeropoint
+ \global\pagebackgrounddepth \zeropoint
+ \else
+ \global\pagebackgroundvoffset\pagebackgroundcompensation
+ \global\pagebackgrounddepth \d_page_backgrounds_depth
+ \fi
+ \fi}
+
+\appendtoks
+ \page_backgrounds_set_offsets
+\to \everybeforepagebody
+
+\newconditional\swapbackgroundmargins \settrue\swapbackgroundmargins
+
+%D The swapping here is pretty nasty! Maybe we should find another way some day but
+%D for now we tweak.
+
+\def\page_backgrounds_set_box#1% #2%
+ {\global\setbox#1\vpack
+ {\dontcomplain
+ \page_layouts_swap_margins
+ \ifconditional\swapbackgroundmargins
+ \doifelsemarginswap \donothing
+ {\enforced\swapcsvalues\v!rightmargin\v!leftmargin
+ \enforced\swapcsvalues\v!rightedge \v!leftedge}%
+ \fi
+ \calculatereducedvsizes
+ \offinterlineskip
+ % \ifconditional#2\relax
+ % \page_layouts_swap_margins_indeed % hm, this one gets nilled in \page_layouts_swap_margin anyway
+ % \fi
+ \ifdim\topheight>\zeropoint
+ \kern\dimexpr-\topheight-\topdistance\relax
+ \page_backgrounds_set_box_row\v!top\topheight
+ \kern\topdistance
+ \fi
+ \ifdim\headerheight>\zeropoint
+ \page_backgrounds_set_box_row\v!header\headerheight
+ \kern\headerdistance
+ \fi
+ \ifdim\textheight>\zeropoint
+ \page_backgrounds_set_box_row\v!text\textheight
+ \fi
+ \ifdim\footerheight>\zeropoint
+ \kern\footerdistance
+ \page_backgrounds_set_box_row\v!footer\footerheight
+ \fi
+ \ifdim\bottomheight>\zeropoint
+ \kern\bottomdistance
+ \page_backgrounds_set_box_row\v!bottom\bottomheight
+ \fi
+ \vfilll}%
+ \smashbox#1}
+
+\def\page_backgrounds_set_box_row#1#2% maybe helper
+ {\setbox\scratchbox\vpack to #2
+ \bgroup\hpack\bgroup
+ \goleftonpage
+ \ifdim\leftedgewidth>\zeropoint
+ \ifcsname\??layoutbackgrounds#1\v!leftedge\endcsname
+ \page_backgrounds_set_box_cell#1\v!leftedge\leftedgewidth#2%
+ \else
+ \kern\leftedgewidth
+ \fi
+ \kern\leftedgedistance
+ \fi
+ \ifdim\leftmarginwidth>\zeropoint
+ \ifcsname\??layoutbackgrounds#1\v!leftmargin\endcsname
+ \page_backgrounds_set_box_cell#1\v!leftmargin\leftmarginwidth#2%
+ \else
+ \kern\leftmarginwidth
+ \fi
+ \kern\leftmargindistance
+ \fi
+ \ifcsname\??layoutbackgrounds#1\v!text\endcsname
+ \page_backgrounds_set_box_cell#1\v!text\makeupwidth#2%
+ \else
+ \kern\makeupwidth
+ \fi
+ \ifdim\rightmarginwidth>\zeropoint
+ \kern\rightmargindistance
+ \ifcsname\??layoutbackgrounds#1\v!rightmargin\endcsname
+ \page_backgrounds_set_box_cell#1\v!rightmargin\rightmarginwidth#2%
+ \else
+ \kern\rightmarginwidth
+ \fi
+ \fi
+ \ifdim\rightedgewidth>\zeropoint
+ \kern\rightedgedistance
+ \ifcsname\??layoutbackgrounds#1\v!rightedge\endcsname
+ \page_backgrounds_set_box_cell#1\v!rightedge\rightedgewidth#2%
+ \else
+ \kern\rightedgewidth
+ \fi
+ \fi
+ \egroup\egroup
+ \wd\scratchbox\zeropoint
+ \box\scratchbox\relax}
+
+% these are fake framed .. maybe it's nicer to honor foreground here as well
+% but it's probably a slow downer
+
+\def\page_backgrounds_set_box_cell#1#2#3#4% pos pos width height
+ {\begingroup
+ \edef\p_page_backgrounds_setups{\namedframedparameter{\??layoutbackgrounds#1#2}\c!setups}%
+ \ifempty\p_page_backgrounds_setups \else
+ \doprocesslocalsetups\p_page_backgrounds_setups % should not produce funny spaces !
+ \fi
+ \edef\p_page_backgrounds_command{\namedframedparameter{\??layoutbackgrounds#1#2}\c!command}%
+ \ifempty\p_page_backgrounds_command
+ \expandafter\page_backgrounds_set_box_cell_nop
+ \else
+ \expandafter\page_backgrounds_set_box_cell_yes
+ \fi#3#4%
+ \localbackgroundframed{\??layoutbackgrounds#1#2}{#1:#2}\scratchbox
+ \endgroup}
+
+\def\page_backgrounds_set_box_cell_nop#1#2%
+ {\setbox\scratchbox\emptyvbox
+ \wd\scratchbox#1%
+ \ht\scratchbox#2}
+
+\def\page_backgrounds_set_box_cell_yes#1#2%
+ {\setbox\scratchbox\vpack to #2{\vss\hpack to#1{\hss\p_page_backgrounds_command\hss}\vss}%
+ \dp\scratchbox\zeropoint}
+
+%D The background mechanism is quite demanding in terms or resources. We used to
+%D delay these definitions till runtime usage, but since today's \TEX's are large,
+%D we now do the work on forehand.
+%D
+%D \starttyping
+%D \setupbackgrounds [settings]
+%D \setupbackgrounds [paper,page,text,..] [settings]
+%D \setupbackgrounds [top,...] [leftedge,...] [settings]
+%D \stoptyping
+%D
+%D \showsetup{setupbackgrounds}
+%D
+%D Because the number of arguments runs from one to three, we need to check
+%D for it.
+
+\newtoks\everybackgroundssetup
+
+\permanent\tolerant\protected\def\setupbackgrounds[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ \expandafter\gobblethreeoptionals
+ \or
+ \expandafter\page_backgrounds_setup_basics
+ \or
+ \expandafter\page_backgrounds_setup_single
+ \or
+ \expandafter\page_backgrounds_setup_double
+ \fi[#1][#2][#3]}
+
+\newdimen\d_page_backgrounds_offset
+\newdimen\d_page_backgrounds_depth
+
+\appendtoks
+ \edef\p_page_backgrounds_offset{\namedframedparameter{\??layoutbackgrounds\v!page}\c!offset}%
+ \edef\p_page_backgrounds_depth {\namedframedparameter{\??layoutbackgrounds\v!page}\c!depth }%
+ \edef\p_page_backgrounds_state {\namedframedparameter{\??layoutbackgrounds }\c!state }%
+ \global\d_page_backgrounds_offset\ifempty\p_offset\zeropoint\else\p_page_backgrounds_offset\fi
+ \global\d_page_backgrounds_depth \ifempty\p_depth \zeropoint\else\p_page_backgrounds_depth \fi
+ \global\pagebackgroundoffset\d_page_backgrounds_offset\relax
+ \global\pagebackgrounddepth \d_page_backgrounds_depth \relax
+ \ifx\p_page_backgrounds_state\v!stop
+ \global\setfalse\c_page_backgrounds_new
+ \else
+ \global\settrue \c_page_backgrounds_new
+ \fi
+\to \everybackgroundssetup
+
+\def\v_page_backgrounds_double_set{\v!paper,\v!page,\v!leftpage,\v!rightpage}
+\def\v_page_backgrounds_single_set{\v!text,\v!hidden,\v!paper,\v!page,\v!leftpage,\v!rightpage}
+\def\v_page_backgrounds_common_set{\v!leftedge,\v!leftmargin,\v!text,\v!rightmargin,\v!rightedge}
+
+\let\page_backgrounds_setup_step_nested\relax
+
+\protected\def\page_backgrounds_setup_double[#1][#2][#3]% if needed we can speed this up
+ {\global\settrue\c_page_backgrounds_some
+ \def\page_backgrounds_setup_step##1%
+ {\doifelseinset{##1}\v_page_backgrounds_double_set
+ {\page_backgrounds_setup_and_check{##1}{#3}}
+ {\def\page_backgrounds_setup_step_nested####1{\page_backgrounds_setup_and_check{##1####1}{#3}}%
+ \processcommacommand[#2]\page_backgrounds_setup_step_nested}}%
+ \processcommacommand[#1]\page_backgrounds_setup_step
+ \the\everybackgroundssetup}
+
+\protected\def\page_backgrounds_setup_single[#1][#2][#-]%
+ {\global\settrue\c_page_backgrounds_some
+ \doifelsecommon{#1}\v_page_backgrounds_single_set
+ {\def\page_backgrounds_setup_step##1{\page_backgrounds_setup_and_check{##1}{#2}}%
+ \processcommacommand[#1]\page_backgrounds_setup_step
+ \the\everybackgroundssetup}%
+ {\page_backgrounds_setup_double[#1][\v_page_backgrounds_common_set][#2]}}
+
+\protected\def\page_backgrounds_setup_basics[#1][#-][#-]%
+ {\setupframed[\??layoutbackgrounds][#1]%
+ \the\everybackgroundssetup}
+
+\protected\def\page_backgrounds_setup_and_check#1#2% tag settings
+ {\edef\currentotrbackground{\??layoutbackgrounds#1}%
+ \setupframed[\currentotrbackground][#2]%
+ \page_backgrounds_check_background}
+
+%D Each areas (currently there are $1+3+25+1=30$ of them) has its own low level
+%D framed object associated.
+
+\definesimplifiedframed[\??layoutbackgrounds\v!paper]
+\definesimplifiedframed[\??layoutbackgrounds\v!page]
+\definesimplifiedframed[\??layoutbackgrounds\v!leftpage]
+\definesimplifiedframed[\??layoutbackgrounds\v!rightpage]
+
+\definesimplifiedframed[\??layoutbackgrounds\v!text]
+\definesimplifiedframed[\??layoutbackgrounds\v!hidden]
+
+\definesimplifiedframed[\??layoutbackgrounds\v!top\v!leftedge]
+\definesimplifiedframed[\??layoutbackgrounds\v!top\v!leftmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!top\v!text]
+\definesimplifiedframed[\??layoutbackgrounds\v!top\v!rightmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!top\v!rightedge]
+
+\definesimplifiedframed[\??layoutbackgrounds\v!header\v!leftedge]
+\definesimplifiedframed[\??layoutbackgrounds\v!header\v!leftmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!header\v!text]
+\definesimplifiedframed[\??layoutbackgrounds\v!header\v!rightmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!header\v!rightedge]
+
+\definesimplifiedframed[\??layoutbackgrounds\v!text\v!leftedge]
+\definesimplifiedframed[\??layoutbackgrounds\v!text\v!leftmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!text\v!text]
+\definesimplifiedframed[\??layoutbackgrounds\v!text\v!rightmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!text\v!rightedge]
+
+\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!leftedge]
+\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!leftmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!text]
+\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!rightmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!rightedge]
+
+\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!leftedge]
+\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!leftmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!text]
+\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!rightmargin]
+\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!rightedge]
+
+\setupbackgrounds
+ [\v!page]
+ [\c!offset=\zeropoint, % hm, so we need to force overlay elsewhere
+ \c!depth=\zeropoint]
+
+%D General setup:
+
+\setupbackgrounds
+ [\c!state=\c!start]
+
+%D The hidden layer can be populated by extending the following comma separated
+%D list. This only happens in core modules.
+
+% todo page-2 .. page+2 achter pagina -> bleed
+% spread-2 .. spread+2 achter spread -> spread (repeat 2 times)
+
+\permanent\protected\def\enablehiddenbackground
+ {\global\settrue\c_page_backgrounds_hidden_enabled
+ \global\settrue\c_page_backgrounds_some
+ \page_backgrounds_recalculate}
+
+\permanent\protected\def\disablehiddenbackground
+ {\global\setfalse\c_page_backgrounds_hidden_enabled}
+
+\immutable\def\hiddenbackgroundlist
+ {\v!text-2,\v!text-1,\v!foreground,\v!text+1,\v!text+2}
+
+\permanent\protected\def\prependhiddenbackground#1{\enforced\edef\hiddenbackgroundlist{#1,\hiddenbackgroundlist}}
+\permanent\protected\def\appendhiddenbackground #1{\enforced\edef\hiddenbackgroundlist{\hiddenbackgroundlist,#1}}
+
+\defineoverlay[\v!text-2][\positionregionoverlay\textanchor{\v!text-2}] % no new anchor, we share text
+\defineoverlay[\v!text-1][\positionregionoverlay\textanchor{\v!text-1}]
+\defineoverlay[\v!text+1][\positionregionoverlay\textanchor{\v!text+1}]
+\defineoverlay[\v!text+2][\positionregionoverlay\textanchor{\v!text+2}]
+
+\setupbackgrounds
+ [\v!hidden]
+ [\c!background=\hiddenbackgroundlist]
+
+%D Because we haven't really set up backgrounds yet, we set the main efficiency
+%D switch to false.
+
+\setfalse\c_page_backgrounds_some
+
+%D Sometimes you have a document wide (page) background but need to overload it
+%D locally. In such case (at least in my experience) the only values that get set
+%D are the background and backgroundcolor (if set at all). A full inheritance chain
+%D would complicate things because then we need to use named backgrounds which in
+%D turn will make this mechanism slower. I considered independent local backgrounds
+%D but that also complicates the code (not that much) but isolation means that we
+%D need to set more parameters each time. The following simple approach proabbly
+%D suits most usage.
+%D
+%D \starttyping
+%D \starttext
+%D \setupbackgrounds[page][background=color,backgroundcolor=red]
+%D \input tufte \page
+%D \setupbackgrounds[page][background=,backgroundcolor=]
+%D \input tufte \page
+%D \setupbackgrounds[page][background=color,backgroundcolor=red]
+%D \input tufte \page
+%D \pushbackground[page]
+%D \setupbackgrounds[page][background=color,backgroundcolor=green]
+%D \input tufte \page
+%D \popbackground
+%D \input tufte \page
+%D \stoptext
+%D \stoptyping
+
+\permanent\protected\def\pushbackground[#1]%
+ {\pushmacro\popbackground
+ \edef\currentotrbackground{\??layoutbackgrounds#1}%
+ \enforced\permanent\protected\edef\popbackground
+ {\setupframed
+ [\currentotrbackground]
+ [\c!background=\namedframedparameter{\currentotrbackground}\c!background,
+ \c!backgroundcolor=\namedframedparameter{\currentotrbackground}\c!backgroundcolor]%
+ \page_backgrounds_check_background
+ \popmacro\popbackground}%
+ \setupframed
+ [\currentotrbackground]
+ [\c!background=,\c!backgroundcolor=]%
+ \page_backgrounds_check_background}
+
+\permanent\let\popbackground\relax
+
+\protect \endinput
+
+% %D The next series is used in local (for instance floating) backgrounds.
+%
+% \installsimplifiedframed{\??layoutbackgrounds\v!local}
+%
+% \getparameters
+% [\??layoutbackgrounds\v!local]
+% [\c!component=local,
+% \c!background=\localbackgroundlist]
+%
+% \def\localbackgroundlist
+% {\v!local-2,\v!local-1,\v!foreground,\v!local+1,\v!local+2}
+%
+% \defineoverlay[\v!local-2][\positionoverlay{\v!local-2}] % todo share
+% \defineoverlay[\v!local-1][\positionoverlay{\v!local-1}]
+% \defineoverlay[\v!local+1][\positionoverlay{\v!local+1}]
+% \defineoverlay[\v!local+2][\positionoverlay{\v!local+2}]
+%
+% \def\page_backgrounds_add_local_to_box
+% {\ifconditional\c_page_backgrounds_hidden_enabled
+% \expandafter\page_backgrounds_add_local_to_box_indeed
+% \else
+% \expandafter\gobbleoneargument
+% \fi}
+%
+% \def\page_backgrounds_add_local_to_box_indeed#1%
+% {\setbox#1\hbox{\localbackgroundframed{\??layoutbackgrounds\v!local}\v!local#1}%
+% \global\advance\localpositionnumber\plusone} % afterwards !
+%
+% \let\page_backgrounds_add_local_to_box\gobbleoneargument
+
+% Test how previous macro behaves with depth:
+%
+% \startcolumnset
+% \input tufte
+% \placefigure{none}{\framed[lines=5]{xxx}}
+% \input tufte
+% \placefigure{none}{\starttabulate\NC test\nc test\NC\NR\stoptabulate}
+% \input tufte
+% \stopcolumnset
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-box.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-box.mklx
new file mode 100644
index 00000000000..c8ceeb8282e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-box.mklx
@@ -0,0 +1,289 @@
+%D \module
+%D [ file=page-box,
+%D version=2011.12.05, % moved from other page-* files
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Boxing,
+%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 Page Macros / Boxing}
+
+\unprotect
+
+%D The often two step approach (_indeed) saves skipping tokens which is nicer for
+%D tracing. Centering the paper area on the print area is determined by the \type
+%D {top}, \type {bottom}, \type {left} and \type {right} parameters.
+
+\def\page_boxes_apply_center#box% we could test for a difference (saves packing)
+ {\printpaperwidth \v_page_target_scale\printpaperwidth \relax
+ \printpaperheight\v_page_target_scale\printpaperheight\relax
+ \ifdim\printpaperheight>\ht#box\relax
+ \page_boxes_apply_center_indeed#box%
+ \orelse\ifdim\printpaperwidth>\wd#box\relax
+ \page_boxes_apply_center_indeed#box%
+ \fi}
+
+\def\page_boxes_apply_center_indeed_l_r#box%
+ {\v_page_target_left
+ \v_page_target_left_fill
+ \box#box%
+ \v_page_target_right_fill
+ \v_page_target_right}
+
+\def\page_boxes_apply_center_indeed_r_l#box%
+ {\v_page_target_right
+ \v_page_target_right_fill
+ \box#box%
+ \v_page_target_left_fill
+ \v_page_target_left}
+
+\def\page_boxes_apply_center_indeed#box% we could test for a difference (saves packing)
+ {\setbox#box\vpack to \printpaperheight
+ {\v_page_target_top
+ \v_page_target_top_fill
+ \hpack to \printpaperwidth
+ {\ifconditional\c_page_target_print_doublesided
+ \doifbothsides
+ {\page_boxes_apply_center_indeed_l_r#box}%
+ {\page_boxes_apply_center_indeed_l_r#box}%
+ {\page_boxes_apply_center_indeed_r_l#box}%
+ \else
+ \page_boxes_apply_center_indeed_l_r#box%
+ \fi}%
+ \par
+ \v_page_target_bottom_fill
+ \v_page_target_bottom}}
+
+\def\page_boxes_apply_offset % #box
+ {\unless\ifzeropt\topoffset
+ \expandafter\page_boxes_apply_offset_indeed
+ \orelse\ifzeropt\backoffset
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\page_boxes_apply_offset_indeed
+ \fi}
+
+\def\page_boxes_apply_offset_indeed#box%
+ {\scratchwidth \wd#box%
+ \scratchheight\ht#box%
+ \scratchdepth \dp#box%
+ \setbox#box\vpack
+ {\offinterlineskip
+ \vskip\topoffset
+ \hskip\doifbothsides\backoffset\backoffset{-\backoffset}%
+ \box#box}%
+ \wd#box\scratchwidth
+ \ht#box\scratchheight
+ \dp#box\scratchdepth}
+
+\def\page_boxes_apply_replicate
+ {\ifnum\layoutparameter\c!nx>\plusone
+ \expandafter\page_boxes_apply_replicate_indeed
+ \orelse\ifnum\layoutparameter\c!ny>\plusone
+ \expandafter\page_boxes_apply_replicate_indeed
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\page_boxes_apply_replicate_indeed#box%
+ {\setbox#box\vpack
+ {\offinterlineskip
+ \dorecurse{\layoutparameter\c!ny}
+ {\hpack{\dorecurse{\layoutparameter\c!nx}{\copy#box\kern\layoutparameter\c!dx}\unskip}%
+ \vskip\layoutparameter\c!dy}
+ \unskip}}
+
+\def\page_boxes_apply_orientate_paper#box%
+ {\ifnum\number\c_page_target_paper_orientation\number\c_page_target_paper_reverse>\zerocount
+ \page_boxes_apply_orientate_indeed\c_page_target_paper_orientation\c_page_target_paper_reverse{#box}%
+ \fi}
+
+\def\page_boxes_apply_orientate_print#box%
+ {\ifnum\number\c_page_target_print_orientation\number\c_page_target_print_reverse>\zerocount
+ \page_boxes_apply_orientate_indeed\c_page_target_print_orientation\c_page_target_print_reverse{#box}%
+ \fi}
+
+\def\page_boxes_apply_orientate_indeed#odd#even#box%
+ {\setbox#box\vpack
+ {\edef\p_rotation{\number\ifdoublesided\ifodd\realpageno#odd\else#even\fi\else#odd\fi}%
+ \dorotatebox\p_rotation\hpack{\box#box}}}
+
+\def\page_boxes_apply_mirror#box%
+ {\setbox#box\vpack{\mirror{\box#box}}}
+
+\def\page_boxes_apply_mirror_paper#box{\ifconditional\c_page_target_paper_mirror\page_boxes_apply_mirror{#box}\fi}
+\def\page_boxes_apply_mirror_print#box{\ifconditional\c_page_target_print_mirror\page_boxes_apply_mirror{#box}\fi}
+
+\aliased\let\page_boxes_apply_negate\negatecolorbox
+
+\def\page_boxes_apply_negate_print#box%
+ {\ifconditional\c_page_target_print_negate
+ \page_boxes_apply_negate#box%
+ \orelse\ifconditional\c_page_target_paper_negate
+ \page_boxes_apply_negate#box%
+ \fi}
+
+\let\p_page_layouts_scale\relax
+\let\p_page_layouts_sx \relax
+\let\p_page_layouts_sy \relax
+
+\def\page_boxes_apply_scale#box%
+ {\edef\p_page_layouts_scale{\layoutparameter\c!scale}%
+ \ifdim\p_page_layouts_scale\points=\onepoint
+ \edef\p_page_layouts_sx{\layoutparameter\c!sx}%
+ \edef\p_page_layouts_sy{\layoutparameter\c!sy}%
+ \ifdim\p_page_layouts_sx\points=\onepoint
+ \ifdim\layoutparameter\c!sy\points=\onepoint
+ % no scaling done (and no copying either)
+ \else
+ \page_boxes_apply_scale_indeed\p_page_layouts_sx\p_page_layouts_sy{#box}%
+ \fi
+ \else
+ \page_boxes_apply_scale_indeed\p_page_layouts_sx\p_page_layouts_sy{#box}%
+ \fi
+ \else
+ \page_boxes_apply_scale_indeed\p_page_layouts_scale\p_page_layouts_scale{#box}%
+ \fi}
+
+\def\page_boxes_apply_scale_indeed#sx#sy#box%
+ {\setbox#box\vpack{\scale[\c!sx=#sx,\c!sy=#sy]{\box#box}}% can be a fast one
+ \paperwidth #sx\paperwidth
+ \paperheight#sy\paperheight}
+
+% \setuppagenumbering[alternative=doublesided]
+% \setupcolors[state=start]
+% \setuppapersize[A4][A4,oversized]
+% \setuplayout[location=middle,clipoffset=5mm]
+% \setupbackgrounds
+% [page]
+% [frame=on,rulethickness=1mm,
+% backgroundoffset=10mm,background=color,backgroundcolor=red]
+% \starttext \dorecurse{10}{\input tufte \par} \stoptext
+
+% best use private variables
+
+\newconditional\c_page_boxes_clip_print \settrue\c_page_boxes_clip_print
+
+\def\page_boxes_apply_clip_print_left % box
+ {\ifconditional\c_page_boxes_clip_print
+ \expandafter\page_boxes_apply_clip_print_indeed\expandafter\conditionalfalse
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\page_boxes_apply_clip_print_right % box
+ {\ifconditional\c_page_boxes_clip_print
+ \expandafter\page_boxes_apply_clip_print_indeed\expandafter\conditionaltrue
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\page_boxes_apply_clip_print_indeed#right#box% can be made more efficient, see other clipper
+ {\scratchoffset\pagebackgroundoffset % can be zero which is valid % maybe another variable
+ \scratchwidth \wd#box%
+ \scratchheight\ht#box%
+ \scratchdepth \dp#box%
+ \setbox#box\hpack
+ {\advance\scratchheight\dimexpr\scratchdepth+2\scratchoffset\relax
+ \advance\scratchwidth \scratchoffset
+ \ifconditional#right\relax
+ \scratchdimen-\scratchoffset
+ \kern\scratchdimen
+ \else
+ \scratchdimen\zeropoint
+ \fi
+ \lower\scratchoffset\hpack
+ {\clip
+ [\c!hoffset=\scratchdimen,
+ \c!voffset=-\scratchoffset,
+ \c!width=\scratchwidth,
+ \c!height=\scratchheight]%
+ {\box#box}}}%
+ \wd#box\scratchwidth
+ \ht#box\scratchheight
+ \dp#box\scratchdepth}
+
+\def\page_boxes_apply_clip_paper
+ {\scratchoffset\layoutparameter\c!clipoffset\relax
+ \ifdim\scratchoffset>\zeropoint
+ \expandafter\page_boxes_apply_clip_paper_indeed
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\page_boxes_apply_clip_paper_indeed#box%
+ {\scratchwidth \wd#box%
+ \scratchheight\ht#box%
+ \scratchdepth \dp#box%
+ \setbox#box\hpack
+ {\advance\scratchheight\dimexpr\scratchdepth+2\scratchoffset\relax
+ \advance\scratchwidth \scratchoffset
+ \doifbothsides
+ {\advance\scratchwidth\scratchoffset
+ \scratchdimen-\scratchoffset
+ \kern\scratchdimen}%
+ {\scratchdimen\zeropoint}
+ {\scratchdimen-\scratchoffset
+ \kern\scratchdimen}%
+ \lower\scratchoffset\hpack
+ {\clip
+ [\c!hoffset=\scratchdimen,
+ \c!voffset=-\scratchoffset,
+ \c!width=\scratchwidth,
+ \c!height=\scratchheight]%
+ {\box#box}}}%
+ \wd#box\scratchwidth
+ \ht#box\scratchheight
+ \dp#box\scratchdepth}
+
+% nearly always some displacement so no speedup test needed
+
+\def\page_boxes_apply_offsets#1%
+ {\setbox#1\vpack to \paperheight
+ {\hsize\paperwidth
+ \vkern\topspace
+ \hkern\doifbothsides\backspace\backspace{\dimexpr\paperwidth-\backspace-\makeupwidth\relax}%
+ \box#1}%
+ \dp#1\zeropoint}
+
+%D This is rather specialized:
+
+\newconditional\c_page_areas_enabled
+\newbox \b_page_areas_registered
+
+\permanent\protected\def\enabletextarearegistration
+ {\global\settrue\c_page_areas_enabled}
+
+\def\page_areas_registered_box
+ {\ifconditional\c_page_areas_enabled
+ \expandafter\page_areas_registered_box_indeed
+ \else
+ \expandafter\page_areas_registered_box_forget
+ \fi}
+
+\def\page_areas_registered_box_forget#1#2#3% #1=lower-dp #2=correct-ht #3=box
+ {\box#3}
+
+\def\page_areas_registered_box_indeed#1#2#3% #1=lower-dp #2=correct-ht #3=box
+ {\anch_mark_flow_box{#3}}
+
+\def\page_areas_register_boxed#1%
+ {\begingroup
+ \setbox\scratchbox\vpack{#1}%
+ \wd\scratchbox\makeupwidth % somehow a space creeps in
+ \vpack{\page_areas_registered_box00\scratchbox}% 0 0 will go
+ \endgroup}
+
+\def\page_areas_register_direct#1#2%
+ {\scratchdepth\dp#2%
+ \dp#2\strutdepth
+ \anch_mark_flow_only{#2}%
+ \dp#2\scratchdepth
+ #1#2}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl
new file mode 100644
index 00000000000..aca1d097d12
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-brk.mkxl
@@ -0,0 +1,483 @@
+%D \module
+%D [ file=page-brk, % moved from page-ini
+%D version=2011.12.07, % 2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Breaks,
+%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 Page Macros / Breaks}
+
+\unprotect
+
+\ifdefined\resetcurrentstructuremarkswithpage \else \let\resetcurrentstructuremarkswithpage\relax \fi
+\ifdefined\noheaderandfooterlines \else \let\noheaderandfooterlines \relax \fi
+
+%D Page breaks.
+
+% \definepagebreak
+% [chapter]
+% [yes,header,right]
+%
+% \setuphead
+% [chapter]
+% [page=chapter,
+% header=empty,
+% footer=chapter]
+%
+% \definepagebreak % untested
+% [lastpage]
+% [left,{empty,right},{empty,left}]
+
+% public page handler, beware: definepage already in use (core-ref)
+%
+% \definepagebreak[instance][forsure]
+% \definepagebreak[forsure][yes,+4]
+
+\newconditional\c_page_breaks_enabled \settrue\c_page_breaks_enabled
+\newcount \c_page_breaks_prevpage
+
+\newtoks\everybeforepagebreak
+\newtoks\everyafterpagebreak
+
+\let\page_breaks_current_option \empty
+\let\page_breaks_current_options\empty
+
+\installcorenamespace{pagebreakmethod}
+\installcorenamespace{pagebreaks}
+
+\def\page_breaks_handle#1%
+ {\edef\page_breaks_current_options{#1}% handy for tracing
+ \processcommacommand[\page_breaks_current_options]\page_breaks_handle_step}
+
+\def\page_breaks_handle_step#1%
+ {\edef\page_breaks_current_option{#1}% can be used in handler
+ \ifcsname\??pagebreakmethod\page_breaks_current_option\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??pagebreaks\page_breaks_current_option\endcsname
+ \expandafter\page_breaks_handle\lastnamedcs
+ \else
+ \page_breaks_unknown
+ \fi}
+
+\def\page_breaks_handle_direct#1%
+ {\begincsname\??pagebreakmethod#1\endcsname}
+
+\permanent\protected\def\installpagebreakmethod#1#2% low level definer
+ {\defcsname\??pagebreakmethod#1\endcsname{#2}}
+
+\aliased\let\installpagebreakhandler\installpagebreakmethod % will go
+
+\permanent\tolerant\protected\def\definepagebreak[#1]#*[#2]%
+ {\defcsname\??pagebreaks#1\endcsname{#2}}
+
+\appendtoks
+ \flushnotes
+\to \everybeforepagebreak
+
+\permanent\tolerant\protected\def\pagebreak[#1]
+ {\par % else no vertical penalties, always before group so that we clear hangs etc (as in side floats)
+ \ifvmode % extra check
+ \begingroup
+ \the\everybeforepagebreak
+ \c_page_breaks_prevpage\realpageno
+ \ifcase\pageornamentstate \or
+ % disable reset after shipout
+ \global\pageornamentstate\plustwo
+ \fi
+ \ifparameter#1\or
+ \page_breaks_handle{#1}%
+ \else % so, no pagebreak when \pagebreak[] ! ! !
+ \page_breaks_handle_direct\v!yes
+ \fi
+ \relax
+ \ifnum\c_page_breaks_prevpage<\realpageno
+ \global\pageornamentstate\zerocount
+ \fi
+ \the\everyafterpagebreak
+ \endgroup
+ \fi}
+
+\aliased\let\page\pagebreak
+
+\permanent\protected\def\usepageparameter#1%
+ {\edef\m_page_breaks_asked{#1\c!page}%
+ \ifempty\m_page_breaks_asked\else
+ \pagebreak[\m_page_breaks_asked]%
+ \fi}
+
+\permanent\protected\def\dousepageparameter#1%
+ {\edef\m_page_breaks_asked{#1}%
+ \ifempty\m_spac_align_asked\else
+ \pagebreak[\m_page_breaks_asked]%
+ \fi}
+
+\permanent\protected\def\resetpagebreak % used elsewhere too
+ {\global\settrue\c_page_breaks_enabled}
+
+\permanent\protected\def\simplifypagebreak % to be used grouped !
+ {\enforced\permanent\protected\def\pagebreak[##1]{\goodbreak}}
+
+\permanent\protected\def\disablepagebreaks % to be used grouped !
+ {\enforced\let\pagebreak\gobbleoneoptional}
+
+\installpagebreakmethod \s!dummy
+ {\page_otr_command_flush_all_floats
+ \page_otr_command_next_page
+ \page_otr_insert_dummy_page}
+
+\installpagebreakmethod \v!frame
+ {\page
+ \begingroup
+ \showframe
+ \page[\v!empty]
+ \endgroup}
+
+\protected\def\page_breaks_unknown % how often called ?
+ {\doifelseinstring{+}\page_breaks_current_option
+ {\page_otr_command_flush_all_floats
+ \page_otr_command_next_page
+ \dorecurse\page_breaks_current_option\page_otr_insert_dummy_page}
+ {\doifelsenumber\page_breaks_current_option
+ {\page_otr_command_flush_all_floats
+ \page_otr_command_next_page
+ \doloop
+ {\ifnum\userpageno<\page_breaks_current_option\relax
+ \page_otr_insert_dummy_page
+ \else
+ \exitloop
+ \fi}}
+ {}}}
+
+\installpagebreakmethod \s!unknown
+ {\page_breaks_unknown}
+
+\installpagebreakmethod \s!default
+ {} % do nothing if empty
+
+\installpagebreakmethod \v!reset
+ {% better not: \global\pageornamentstate\zerocount
+ \resetpagebreak}
+
+\installpagebreakmethod \v!disable
+ {\global\setfalse\c_page_breaks_enabled}
+
+\installpagebreakmethod \v!yes
+ {\ifconditional\c_page_breaks_enabled
+ \page_otr_command_flush_all_floats
+ \page_otr_command_next_page
+ \ifinsidecolumns % this will move to MUL
+ \page_otr_eject_page % otherwise sometimes no change
+ \fi
+ \fi}
+
+\installpagebreakmethod \v!makeup
+ {\ifconditional\c_page_breaks_enabled
+ \page_otr_fill_and_eject_page
+ \fi}
+
+\installpagebreakmethod \v!blank
+ {\ifcase\pageornamentstate
+ \global\pageornamentstate\plusone
+ \fi}
+
+% also needed: \page \doifoddpageelse\relax{\page[\v!blank,\v!right]
+
+\installpagebreakmethod \v!no
+ {\ifconditional\c_page_breaks_enabled
+ \dosomebreak\nobreak
+ \fi}
+
+\installpagebreakmethod \v!preference
+ {\ifconditional\c_page_breaks_enabled
+ \ifinsidecolumns % this will move to MUL
+ \dosomebreak\goodbreak
+ \else
+ \testpage[3][\zeropoint]%
+ \fi
+ \fi}
+
+\installpagebreakmethod \v!bigpreference
+ {\ifconditional\c_page_breaks_enabled
+ \ifinsidecolumns % this will move to MUL
+ \dosomebreak\goodbreak
+ \else
+ \testpage[5][\zeropoint]%
+ \fi
+ \fi}
+
+% \installpagebreakmethod \v!empty {} % defined in page-txt.mkiv
+% \installpagebreakmethod \v!header{} % defined in page-txt.mkiv
+% \installpagebreakmethod \v!footer{} % defined in page-txt.mkiv
+
+\def\page_reset_marks_and_insert_dummy
+ {\resetcurrentstructuremarkswithpage\page_otr_insert_dummy_page}
+
+\installpagebreakmethod \v!left
+ {\page_otr_command_flush_all_floats
+ \page_otr_command_next_page_and_inserts
+ \doifbothsidesoverruled\donothing\page_reset_marks_and_insert_dummy\donothing}
+
+\installpagebreakmethod \v!right
+ {\page_otr_command_flush_all_floats
+ \page_otr_command_next_page_and_inserts
+ \doifbothsidesoverruled\donothing\donothing\page_reset_marks_and_insert_dummy}
+
+\installpagebreakmethod \v!even
+ {\page
+ \doifelseoddpage\page_reset_marks_and_insert_dummy\donothing}
+
+\installpagebreakmethod \v!odd
+ {\page
+ \doifelseoddpage\donothing\page_reset_marks_and_insert_dummy}
+
+\installpagebreakmethod \v!quadruple % not yet ok inside columnsets
+ {\ifdoublesided
+ \ifcase\modulonumber\plusfour\realpageno\else
+ \page_breaks_handle_direct\v!yes
+ \doloop
+ {\ifcase\modulonumber\plusfour\realpageno\relax
+ \exitloop
+ \else
+ \page_breaks_handle_direct\v!empty
+ \fi}%
+ \fi
+ \fi}
+
+\installpagebreakmethod \v!last
+ {\page_otr_command_flush_all_floats
+ \page_otr_command_next_page_and_inserts
+ \relax
+ \doifbothsidesoverruled
+ \page_facings_flush % hm
+ \donothing
+ {\noheaderandfooterlines
+ \page_otr_insert_dummy_page}%
+ \filluparrangedpages}
+
+\installpagebreakmethod \v!lastpage % handy for backpage preceded by empty pages
+ {\page_breaks_handle_direct\v!yes
+ \ifdoublesided
+ \page_breaks_handle_direct\v!left
+ \page_breaks_handle_direct\v!empty
+ \page_breaks_handle_direct\v!empty
+ \fi}
+
+\installpagebreakmethod \v!start {\global\settrue \c_otr_shipout_enabled}
+\installpagebreakmethod \v!stop {\global\setfalse\c_otr_shipout_enabled}
+
+\installpagebreakmethod{xy}% for Mojca
+ {\page_breaks_handle_direct\v!yes
+ \scratchcounterone \numexpr\rootlayouttargetparameter\c!nx*\rootlayouttargetparameter\c!ny\relax
+ \scratchcountertwo \luaexpr{math.mod(\the\realpageno-1,\the\scratchcounterone)}\relax
+ \scratchcounterthree\numexpr\scratchcounterone-\scratchcountertwo\relax
+ \dorecurse\scratchcounterthree{\page_breaks_handle_direct\v!empty}}
+
+% Column breaks.
+
+\installcorenamespace{columnbreakmethod}
+\installcorenamespace{columnbreaks}
+
+\newtoks\everybeforecolumnbreak
+\newtoks\everyaftercolumnbreak
+\newtoks\everysynchronizecolumn
+
+\let\page_breaks_columns_current_option \empty
+\let\page_breaks_columns_current_options\empty
+
+\def\page_breaks_columns_handle#1%
+ {\edef\page_breaks_columns_current_options{#1}%
+ \processcommacommand[#1]\page_breaks_columns_handle_step}
+
+\def\page_breaks_columns_handle_step#1%
+ {\edef\page_breaks_columns_current_option{#1}%
+ \ifcsname\??columnbreakmethod\currentoutputroutine:\page_breaks_columns_current_option\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??columnbreaks\page_breaks_columns_current_option\endcsname
+ %\expandafter\csname\page_breaks_columns_handle\??columnbreaks\page_breaks_columns_current_option\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??columnbreakmethod\currentoutputroutine:\s!unknown\endcsname
+ \lastnamedcs
+ \fi}
+
+\def\page_breaks_columns_handle_direct#1%
+ {\begincsname\??columnbreakmethod\currentoutputroutine:#1\endcsname}
+
+\permanent\protected\def\installcolumnbreakmethod#1#2#3% #1=otr-id #2=tag #3=action
+ {\defcsname\??columnbreakmethod#1:#2\endcsname{#3}}
+
+\aliased\let\installcolumnbreakhandler\installcolumnbreakmethod % will go
+
+\permanent\tolerant\protected\def\definecolumnbreak[#1]#*[#2]%
+ {\defcsname\??columnbreaks#1\endcsname{#2}}
+
+%D So, page ornaments are reset after a pagebreak command, unless set!
+
+\permanent\tolerant\protected\def\columnbreak[#1]%
+ {\par % else no vertical penalties
+ \begingroup
+ \the\everybeforecolumnbreak
+ \ifparameter#1\or
+ \page_breaks_columns_handle{#1}%
+ \else
+ \page_breaks_columns_handle_direct\v!yes
+ \fi
+ \relax
+ \the\everyaftercolumnbreak
+ \endgroup
+ % outside group e.g. setting hsize
+ \the\everysynchronizecolumn}
+
+\aliased\let\column\columnbreak
+
+\appendtoks
+ \page_otr_command_set_hsize
+\to \everysynchronizecolumn
+
+%D Test page breaks.
+
+% \newdimen \d_page_tests_test
+% \newconstant\c_page_tests_mode
+
+\newconstant\testpagemethod % old
+\newconstant\testpagetrigger % old
+
+\installcorenamespace {pagechecker}
+\installcorenamespace {pagecheckermethod}
+
+\installcommandhandler \??pagechecker {pagechecker} \??pagechecker
+
+\setuppagechecker
+ [\c!method=1,
+ \c!before=,
+ \c!after=,
+ \c!inbetween=,
+ \c!lines=\plusthree,
+ \c!offset=\zeropoint]
+
+\def\page_check_amount
+ {\dimexpr
+ \pagecheckerparameter\c!lines\lineheight
+ +\pagetotal
+ \ifdim\lastskip<\parskip+\parskip\fi
+ +\pagecheckerparameter\c!offset
+ \relax}
+
+\permanent\tolerant\protected\def\checkpage[#1]#*[#2]%
+ {\relax % needed before \if
+ \endgraf
+ \triggerpagebuilder
+ \relax
+ \ifconditional\c_page_breaks_enabled
+ \begingroup
+ \edef\currentpagechecker{#1}%
+ \setupcurrentpagechecker[#2]%
+ \csname\??pagecheckermethod\pagecheckerparameter\c!method\endcsname
+ \endgroup
+ \fi}
+
+\defcsname\??pagecheckermethod 0\endcsname
+ {\ifdim\pagegoal<\maxdimen \relax
+ \ifdim\pagetotal<\pagegoal \relax
+ \ifdim\page_check_amount>.99\pagegoal
+ \pagecheckerparameter\c!before
+ \penalty-\plustenthousand
+ \pagecheckerparameter\c!after
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi}
+
+\defcsname\??pagecheckermethod 1\endcsname
+ {\ifdim\pagegoal<\maxdimen \relax
+ \ifdim\pagetotal<\pagegoal \relax
+ \ifdim\dimexpr\page_check_amount-\pagegoal\relax>-\lineheight
+ \pagecheckerparameter\c!before
+ \penalty-\plustenthousand
+ \pagecheckerparameter\c!after
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \else
+ \goodbreak
+ \pagecheckerparameter\c!inbetween
+ \fi}
+
+\defcsname\??pagecheckermethod 2\endcsname
+ {\ifdim\pagegoal<\maxdimen \relax
+ \ifdim\pagetotal<\pagegoal \relax
+ \getnoflines\pagegoal
+ \ifdim\dimexpr\page_check_amount-\noflines\lineheight\relax>-\lineheight
+ \pagecheckerparameter\c!before
+ \penalty-\plustenthousand
+ \pagecheckerparameter\c!after
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi}
+
+\defcsname\??pagecheckermethod 3\endcsname
+ {\ifdim\pagegoal<\maxdimen \relax
+ \ifdim\pagetotal<\pagegoal \relax
+ \ifdim\dimexpr\page_check_amount-10\scaledpoint\relax>\pagegoal
+ \pagecheckerparameter\c!before
+ \penalty-\plustenthousand
+ \pagecheckerparameter\c!after
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \orelse\ifdim\pagetotal>\pagegoal
+ \ifdim\dimexpr\pagetotal-\pageshrink\relax>\pagegoal
+ \goodbreak
+ \pagecheckerparameter\c!inbetween
+ \else
+ \pagecheckerparameter\c!before
+ \page
+ \pagecheckerparameter\c!after
+ \fi
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi
+ \else
+ \pagecheckerparameter\c!inbetween
+ \fi}
+
+\definepagechecker[\s!unknown:0] [\c!method=0,\c!before=,\c!after=,\c!inbetween=]
+\definepagechecker[\s!unknown:1][\s!unknown:0][\c!method=1]
+\definepagechecker[\s!unknown:2][\s!unknown:0][\c!method=2]
+\definepagechecker[\s!unknown:3][\s!unknown:0][\c!method=3]
+
+\permanent\tolerant\protected\def\testpage [#1]#*[#2]{\normalexpanded{\checkpage[\s!unknown:1][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} %
+\permanent\tolerant\protected\def\testpageonly[#1]#*[#2]{\normalexpanded{\checkpage[\s!unknown:2][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % no penalties added to the mvl
+\permanent\tolerant\protected\def\testpagesync[#1]#*[#2]{\normalexpanded{\checkpage[\s!unknown:3][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % force sync
+
+%D Test column breaks.
+
+\permanent\tolerant\protected\def\testcolumn[#1]#*[#2]%
+ {\ifdefined\page_otr_command_test_column
+ \ifparameter#2\or
+ \page_otr_command_test_column[#1][#2]%
+ \else
+ \page_otr_command_test_column[#1][\zeropoint]%
+ \fi
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-col.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-col.mkxl
new file mode 100644
index 00000000000..43330c9a7c8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-col.mkxl
@@ -0,0 +1,165 @@
+%D \module
+%D [ file=page-col, % moved from page-ini
+%D version=2011.12.07, % 2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Column Helpers,
+%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 Page Macros / Column Helpers}
+
+%D Here we implement a couple of helpers for dealing with columns. For
+%D the moment we keep the names. When the mul and set modules are redone
+%D these can be adapted or disappear.
+
+%D DO WE STILL NEED THESE?
+
+\unprotect
+
+%D We reserve a counter for the number of columns as well as the current
+%D column. Both are not to be changed by users!
+
+%newcount\nofcolumns \nofcolumns\plusone % already in core-ini.mkiv
+\newcount\mofcolumns \mofcolumns\plusone
+
+\newconstant\columndirection % 0:lr 1:rl
+
+\setnewconstant\maxnofcolumns 50
+\setnewconstant\allocatednofcolumns 0
+
+\newdimen\columnwidth
+\newdimen\columndistance
+
+%D During initialization the temporary boxes are allocated. This enables us to
+%D use as much columns as we want, without exhausting the pool of boxes too
+%D fast. We could have packed them in one box, but we've got enough boxes.
+%D
+%D Two sets of boxes are declared, the txtboxes are used for the text, the
+%D topboxes are for moved column floats.
+
+\installcorenamespace{columntext}
+\installcorenamespace{columnfooter}
+\installcorenamespace{columntop}
+\installcorenamespace{columnbottom}
+
+\permanent\protected\def\initializecolumns#1%
+ {\ifnum#1>\maxnofcolumns
+ \showmessage\m!columns1\maxnofcolumns
+ \nofcolumns\maxnofcolumns
+ \else
+ \nofcolumns#1\relax
+ \fi
+ \ifnum\nofcolumns>\allocatednofcolumns
+ \page_columns_allocate
+ \fi}
+
+\def\page_columns_allocate
+ {\dorecurse\nofcolumns
+ {\ifnum\recurselevel>\allocatednofcolumns\relax
+ \ifcsname\??columntext\recurselevel\endcsname \else
+ \expandafter\newbox\csname\??columntext \recurselevel\endcsname % text
+ \expandafter\newbox\csname\??columnfooter\recurselevel\endcsname % footer
+ \expandafter\newbox\csname\??columntop \recurselevel\endcsname % top insert
+ \expandafter\newbox\csname\??columnbottom\recurselevel\endcsname % bottom insert
+ \fi
+ \fi}%
+ \global\allocatednofcolumns\nofcolumns}
+
+\mutable\def\currentcolumn{1}
+
+\immutable\def\firstcolumnbox {\columntextbox\plusone}
+\immutable\def\currentcolumnbox{\columntextbox\mofcolumns}
+\immutable\def\lastcolumnbox {\columntextbox\nofcolumns}
+
+\immutable\def\firsttopcolumnbox {\columntopbox \plusone}
+\immutable\def\currenttopcolumnbox{\columntopbox \mofcolumns}
+\immutable\def\lasttopcolumnbox {\columntopbox \nofcolumns}
+
+\permanent\def\columntextbox#1{\csname\??columntext \number#1\endcsname}
+\permanent\def\columnfootbox#1{\csname\??columnfooter\number#1\endcsname}
+\permanent\def\columntopbox #1{\csname\??columntop \number#1\endcsname}
+\permanent\def\columnbotbox #1{\csname\??columnbottom\number#1\endcsname}
+
+\permanent\protected\def\columnsettextbox{\global\setbox\columntextbox}
+\permanent\protected\def\columnsetfootbox{\global\setbox\columnfootbox}
+\permanent\protected\def\columnsettopbox {\global\setbox\columntopbox}
+\permanent\protected\def\columnsetbotbox {\global\setbox\columnbotbox}
+
+\permanent\protected\def\columngettextbox {\copy\columntextbox}
+\permanent\protected\def\columngetfootbox {\copy\columnfootbox}
+\permanent\protected\def\columngettopbox {\copy\columntopbox}
+\permanent\protected\def\columngetbotbox {\copy\columnbotbox}
+
+\permanent\protected\def\columnerasetextboxes{\dorecurse\allocatednofcolumns{\columnsettextbox\recurselevel\emptybox}}
+\permanent\protected\def\columnerasefootboxes{\dorecurse\allocatednofcolumns{\columnsetfootbox\recurselevel\emptybox}}
+\permanent\protected\def\columnerasetopboxes {\dorecurse\allocatednofcolumns{\columnsettopbox \recurselevel\emptybox}}
+\permanent\protected\def\columnerasebotboxes {\dorecurse\allocatednofcolumns{\columnsetbotbox \recurselevel\emptybox}}
+
+%D Without going in details we present two macro's which handle the columns. The
+%D action which is transfered by the the first and only parameter can do something
+%D with \type {\currentcolumnbox}. In case of the mid columns, \type
+%D {\firstcolumnbox} and \type {\lastcolumnbox} are handled outside these macro's.
+
+\let\page_columns_action\relax
+
+\permanent\protected\def\dohandleallcolumnscs#1{\let\page_columns_action #1\page_columns_all_indeed}
+\permanent\protected\def\dohandleallcolumns #1{\def\page_columns_action{#1}\page_columns_all_indeed}
+
+\permanent\protected\def\dohandlerevcolumnscs#1{\let\page_columns_action #1\page_columns_rev_indeed}
+\permanent\protected\def\dohandlerevcolumns #1{\def\page_columns_action{#1}\page_columns_rev_indeed}
+
+\permanent\protected\def\dohandlemidcolumnscs#1{\let\page_columns_action #1\page_columns_mid_indeed}
+\permanent\protected\def\dohandlemidcolumns #1{\def\page_columns_action{#1}\page_columns_mid_indeed}
+
+\protected\def\page_columns_all_indeed
+ {\mofcolumns\plusone
+ \edef\currentcolumn{\the\mofcolumns}%
+ \page_columns_action\relax
+ \ifnum\mofcolumns<\nofcolumns
+ \expandafter\page_columns_all_next
+ \fi}
+
+\protected\def\page_columns_all_next
+ {\advance\mofcolumns\plusone
+ \edef\currentcolumn{\the\mofcolumns}%
+ \page_columns_action\relax
+ \ifnum\mofcolumns<\nofcolumns
+ \expandafter\page_columns_all_next
+ \fi}
+
+\protected\def\page_columns_rev_indeed
+ {\mofcolumns\nofcolumns
+ \edef\currentcolumn{\the\mofcolumns}%
+ \page_columns_action\relax
+ \ifnum\mofcolumns>\plusone
+ \expandafter\page_columns_rev_prev
+ \fi}
+
+\protected\def\page_columns_rev_prev
+ {\advance\mofcolumns\minusone
+ \edef\currentcolumn{\the\mofcolumns}%
+ \page_columns_action\relax
+ \ifnum\mofcolumns>\plusone
+ \expandafter\page_columns_rev_prev
+ \fi}
+
+\protected\def\page_columns_mid_indeed
+ {\mofcolumns\plustwo
+ \ifnum\mofcolumns<\nofcolumns
+ \expandafter\page_columns_mid_next
+ \fi}
+
+\protected\def\page_columns_mid_next
+ {\edef\currentcolumn{\the\mofcolumns}%
+ \page_columns_action\relax
+ \advance\mofcolumns\plusone
+ \ifnum\mofcolumns<\nofcolumns
+ \expandafter\page_columns_mid_next
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-com.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-com.mkxl
new file mode 100644
index 00000000000..a7d8aaba71a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-com.mkxl
@@ -0,0 +1,180 @@
+%D \module
+%D [ file=page-com, % moved from page-imp
+%D version=1998.01.15,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Comments,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This will become runtime loaded code.
+
+\writestatus{loading}{ConTeXt Page Macros / Page Comments}
+
+\unprotect
+
+%D \macros
+%D {setuppagecomment,startpagecomment}
+%D
+%D This command is not yet documented. Usage:
+%D
+%D \starttyping
+%D \setuppagecomment[state=start,location=right]
+%D
+%D \startpagecomment
+%D \input knuth
+%D \stoppagecomment
+%D \stoptyping
+
+\installcorenamespace{pagecomment}
+\installcorenamespace{pagecommentlocations}
+\installcorenamespace{pagecommentstates}
+
+\newdimen\d_page_comments_offset
+\newdimen\d_page_comments_page_width
+\newdimen\d_page_comments_page_height
+\newdimen\d_page_comments_width
+\newdimen\d_page_comments_height
+\newdimen\d_page_comments_distance
+
+\newconditional\c_page_comment_enabled
+
+\let\p_page_commands_location\v!none
+\let\p_page_commands_state \v!stop
+
+\installsetuponlycommandhandler \??pagecomment {pagecomment}
+
+\appendtoks
+ \edef\p_page_commands_location{\directpagecommentparameter\c!location}%
+ \edef\p_page_commands_state {\directpagecommentparameter\c!state}%
+ \expandnamespacemacro\??pagecommentstates\p_page_commands_state\v!none
+\to \everysetuppagecomment
+
+% \ifdefined\scrn_canvas_synchronize_simple
+
+ \appendtoks
+ \ifx\p_page_commands_state\v!start
+ \scrn_canvas_synchronize_simple
+ \else
+ \scrn_canvas_synchronize_complex
+ \fi
+ \to \everyshipout
+
+% \fi
+
+\setvalue{\??pagecommentstates\v!start}%
+ {\d_page_comments_offset \directpagecommentparameter\c!offset \relax
+ \d_page_comments_distance\directpagecommentparameter\c!distance\relax
+ \d_page_comments_width \directpagecommentparameter\c!width \relax
+ \d_page_comments_height \directpagecommentparameter\c!height \relax
+ \expandnamespacemacro\??pagecommentlocations\p_page_commands_location\v!none
+ \definepapersize[\v!pagecomment][\c!height=\d_page_comments_page_height,\c!width=\d_page_comments_page_width]%
+ \setuppapersize[\papersize][\v!pagecomment]%
+ \setupbackgrounds[\v!paper][\c!background=\v!pagecomment]} % maybe append if already set
+
+\setvalue{\??pagecommentstates\v!stop}%
+ {\setupbackgrounds[\v!paper][\c!background=]}
+
+\setvalue{\??pagecommentstates\v!none}%
+ {}
+
+\setvalue{\??pagecommentlocations\v!bottom}%
+ {\setuplayout[\c!location=]%
+ \setuppapersize[\c!top=\vskip\d_page_comments_offset,\c!bottom=\vss,\c!left=\hskip\d_page_comments_offset,\c!right=]%
+ \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_height\relax
+ \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset\relax
+ \defineoverlay[\v!pagecomment][\page_comments_top_bottom]}
+
+\setvalue{\??pagecommentlocations\v!top}%
+ {\setuplayout[\c!location=]%
+ \setuppapersize[\c!top=\vss,\c!bottom=\vskip\d_page_comments_offset,\c!left=\hskip\d_page_comments_offset,\c!right=]%
+ \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_height\relax
+ \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset\relax
+ \defineoverlay[\v!pagecomment][\page_comments_top_bottom]}
+
+\setvalue{\??pagecommentlocations\v!left}%
+ {\setuplayout[\c!location=]%
+ \setuppapersize[\c!top=\vskip\d_page_comments_offset,\c!bottom=,\c!left=\hss,\c!right=\hskip\d_page_comments_offset]%
+ \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset\relax
+ \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_width\relax
+ \defineoverlay[\v!pagecomment][\page_comments_left_right]}
+
+\setvalue{\??pagecommentlocations\v!right}%
+ {\setuplayout[\c!location=]%
+ \setuppapersize[\c!top=\vskip\d_page_comments_offset,\c!bottom=,\c!left=\hskip\d_page_comments_offset,\c!right =\hss]%
+ \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset\relax
+ \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_width\relax
+ \defineoverlay[\v!pagecomment][\page_comments_left_right]}
+
+\setvalue{\??pagecommentlocations\v!none}%
+ {}% \setuppapersize[\c!bottom=,\c!top=,\c!left=,\c!right=]}
+
+\protected\def\page_comments_top_bottom
+ {\vpack to \printpaperheight
+ {%\forgetall
+ \hsize\printpaperwidth\relax
+ \ifx\p_page_commands_location\v!bottom
+ \vskip\dimexpr\paperheight+\d_page_comments_distance+\d_page_comments_offset\relax
+ \else
+ \vskip\d_page_comments_offset
+ \vss
+ \fi
+ \hskip\d_page_comments_offset
+ \vbox to \d_page_comments_height
+ {%\forgetall
+ \hsize\paperwidth
+ \ifconditional\c_page_comment_enabled
+ \getbuffer[\v!pagecomment]%
+ \global\setfalse\c_page_comment_enabled
+ \fi}%
+ \hfill
+ \ifx\p_page_commands_location\v!bottom
+ \vss
+ \vskip\d_page_comments_offset
+ \else
+ \vskip\dimexpr\paperheight+\d_page_comments_distance+\d_page_comments_offset\relax
+ \fi}}
+
+\protected\def\page_comments_left_right
+ {\hpack to \printpaperwidth
+ {\ifx\p_page_commands_location\v!right
+ \hskip\dimexpr\paperwidth+\d_page_comments_distance+\d_page_comments_offset\relax
+ \else
+ \hskip\d_page_comments_offset
+ \hss
+ \fi
+ \vbox to \printpaperheight
+ {%\forgetall
+ \vskip\d_page_comments_offset
+ \hsize\d_page_comments_width
+ \ifconditional\c_page_comment_enabled
+ \getbuffer[\v!pagecomment]%
+ \global\setfalse\c_page_comment_enabled
+ \fi
+ \vss}%
+ \ifx\p_page_commands_location\v!right
+ \hss
+ \hskip\d_page_comments_offset
+ \else
+ \hskip\dimexpr\paperwidth+\d_page_comments_distance+\d_page_comments_offset\relax
+ \fi}}
+
+\permanent\protected\setvalue{\e!start\v!pagecomment}%
+ {\global\settrue\c_page_comment_enabled
+ \grabbufferdatadirect\v!pagecomment{\e!start\v!pagecomment}{\e!stop\v!pagecomment}}
+
+\aliased\letcsname\e!stop\v!pagecomment\endcsname\relax
+
+\setuppagecomment
+ [\c!state=, % \v!stop would invoke background calculation
+ \c!location=\v!bottom,
+ \c!offset=.5cm,
+ \c!distance=.5cm,
+ \c!height=5cm,
+ \c!width=10cm]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-cst.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-cst.mkxl
new file mode 100644
index 00000000000..a6f63a56219
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-cst.mkxl
@@ -0,0 +1,791 @@
+%D \module
+%D [ file=page-cst,
+%D version=2016.12.15,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Grids (aka Column Sets),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo : markings per column
+
+%D This module is work in progress and in due time it will replace
+%D columnsets.
+
+\writestatus{loading}{ConTeXt Page Macros / Page Grids}
+
+\registerctxluafile{page-cst}{}
+
+\unprotect
+
+% maybe some protected def ([esc])
+
+%D Columnsets are kind of special. They are mostly meant for special products with
+%D magazine like properties. They are normally not mixed with single column layouts
+%D and not all features of \CONTEXT\ might cooperate well with a mechanism like
+%D this. We use the name page grid because (as with other reimplementations of
+%D \MKII\ features in \MKIV, we need another namespace in order to migrate stepwise.
+%D
+%D This implementation is not neccessarily better than the previous one but it might
+%D be easier to extend it. It should be a bit more efficient.
+%D
+%D When writing this code I occasionally needed a motivational musical time||out and
+%D watching the latest Snarky Puppy DVD brought me the musically and visually videos
+%D of Jacob Collier (Piano, voice, anything) on YouTube (and yes, music keeps amazing
+%D me). It's definitely more fun to watch that than to write code like this.
+
+\definesystemconstant{pagegrid}
+
+\installcorenamespace{pagegrid}
+
+\installframedcommandhandler \??pagegrid {pagegrid} \??pagegrid
+
+\setuppagegrid
+ [\c!distance=1.5\bodyfontsize,
+ \c!n=\plustwo,
+ \c!nleft=\pagegridparameter\c!n,
+ \c!nright=\pagegridparameter\c!n,
+ %\c!align=, % inherit
+ %\c!separator=\v!none,
+ %\c!setups=,
+ \c!lines=\layoutparameter\c!lines,
+ \c!frame=\v!off,
+ \c!strut=\v!no,
+ \c!offset=\v!overlay,
+ \c!alternative=\v!local,
+ \c!width=\v!auto,
+ \c!page=,
+ \c!direction=\v!normal, % todo
+ \c!maxheight=\textheight,
+ \c!maxwidth=\makeupwidth]
+
+\appendtoks % could become an option
+ \frozen\instance\setuevalue{\e!start\currentpagegrid}{\startpagegrid[\currentpagegrid]}%
+ \frozen\instance\setuevalue{\e!stop \currentpagegrid}{\stoppagegrid}%
+ \clf_definecolumnset {
+ name {\currentpagegrid}%
+ }%
+\to \everydefinepagegrid
+
+\newdimen\d_page_grd_column_width
+\newdimen\d_page_grd_max_height
+\newdimen\d_page_grd_max_width
+\newdimen\d_page_grd_distance
+
+\newdimen\d_page_grd_reserved_height
+\newdimen\d_page_grd_reserved_width
+\newcount\c_page_grd_reserved_state
+
+\newdimen\d_page_grd_gap_height
+
+\newcount\c_page_grd_n_of_left
+\newcount\c_page_grd_n_of_right
+\newcount\c_page_grd_n_of_rows
+\newcount\c_page_grd_first_column
+\newcount\c_page_grd_last_column
+
+\newbox \b_page_grd_collected
+\newbox \b_page_grd_column_rest
+\newbox \b_page_grd_column
+
+%D All the parameters are mandate!
+
+\permanent\tolerant\protected\def\setuppagegridlines[#1]#*[#2]#*[#3]#*[#4]% id page col value
+ {\clf_setcolumnsetlines{name {#1} page #2 column #3 value #4}}
+
+\permanent\tolerant\protected\def\setuppagegridstart[#1]#*[#2]#*[#3]#*[#4]% id page col value
+ {\clf_setcolumnsetstart{name {#1} page #2 column #3 value #4}}
+
+\protected\def\page_grd_check
+ {\dorecurse{\numexpr\pagegridparameter\c!nleft+\pagegridparameter\c!nright}
+ {\page_grd_check_column{##1}}}
+
+\protected\def\page_grd_check_column#1%
+ {\chaintocurrentpagegrid{\currentpagegrid:#1}%
+ \edef\p_distance{\namedpagegridparameter{\currentpagegrid:#1}\c!distance}%
+ \edef\p_width {\namedpagegridparameter{\currentpagegrid:#1}\c!width}%
+ \clf_setcolumnsetproperties {%
+ name {\currentpagegrid}
+ column \numexpr#1\relax
+ \ifempty\p_distance\else
+ distance \p_distance
+ \fi
+ \ifempty\p_width\orelse\ifx\p_width\v!auto\else
+ width \p_width
+ \fi
+ }}
+
+\appendtoks
+ \dorecurse{\numexpr\pagegridparameter\c!nleft+\pagegridparameter\c!nright}%
+ {\chaintocurrentpagegrid{\currentpagegrid:#1}}%
+\to \everydefinepagegrid
+
+\permanent\tolerant\protected\def\startpagegrid[#1]#*[#2]%
+ {\bgroup
+ \enforced\let\startpagegrid\page_grd_start_dummy
+ \ifarguments
+ \let\currentpagegrid\empty
+ \or
+ \ifhastok={#1}%
+ \let\currentpagegrid\empty
+ \setupcurrentpagegrid[#1]%
+ \else
+ \def\currentpagegrid{#1}%
+ \fi
+ \or
+ \edef\currentpagegrid{#1}%
+ \setupcurrentpagegrid[#2]%
+ \fi
+ \usepageparameter\pagegridparameter
+ \c_page_grd_n_of_left \pagegridparameter\c!nleft\relax
+ \c_page_grd_n_of_right\pagegridparameter\c!nright\relax
+ \c_page_grd_n_of_rows \pagegridparameter\c!lines\relax
+ \d_page_grd_max_width \pagegridparameter\c!maxwidth\relax
+ \d_page_grd_max_height\pagegridparameter\c!maxheight\relax
+ \d_page_grd_distance \pagegridparameter\c!distance\relax
+ %
+ \ifcase\c_page_grd_n_of_rows
+ \getrawnoflines{\dimexpr\d_page_grd_max_height-\strutheight+\topskip\relax}%
+ \c_page_grd_n_of_rows\noflines
+ \fi
+ \edef\p_width{\pagegridparameter\c!width}%
+ \insidecolumnstrue % will be different flag in addition
+ \clf_resetcolumnset {
+ name {\currentpagegrid}
+ nofrows \c_page_grd_n_of_rows
+ nofleft \c_page_grd_n_of_left
+ nofright \c_page_grd_n_of_right
+ lineheight \strutht
+ linedepth \strutdp
+ \ifx\p_width\v!auto
+ % sets \d_page_grd_column_width
+ \else
+ width \p_width
+ \fi
+ distance \d_page_grd_distance
+ maxwidth \d_page_grd_max_width
+ }%
+ %
+ \page_grd_check
+ %
+ \clf_flushcolumnsetareas{\currentpagegrid}\relax
+ \setupoutputroutine[\s!pagegrid]%
+ \page_grd_command_set_hsize
+ \page_grd_command_set_vsize
+ %
+ \columnwidth \d_page_grd_column_width
+ \columndistance\d_page_grd_distance
+ \nofcolumns \c_page_grd_n_of_left % not always ok
+ \textwidth \d_page_grd_column_width % kind of redundant but we had it so ...
+ %
+ }%\begingroup}
+
+\tolerant\def\page_grd_start_dummy[#1]#*[#2]%
+ {\let\page_grd_stop\egroup}
+
+\permanent\protected\def\stoppagegrid
+ {\page_grd_stop}
+
+\def\page_grd_stop
+ {\endgraf % needed, else wrong vsize in one par case
+ \vfill % otherwise weird \placenotes[endnotes]
+ \page_grd_command_set_vsize % needed
+ \penalty\c_page_otr_eject_penalty
+ \page_grd_command_flush_page
+ \page_otr_fill_and_eject_page
+ \page_grd_command_set_vsize % why here
+ \egroup
+ \page_otr_command_set_vsize
+ \page_otr_command_set_hsize}
+
+\permanent\protected\def\reservepagegrid[#1]%
+ {\begingroup
+ \letdummyparameter\c!c\plusone
+ \letdummyparameter\c!r\plusone
+ \letdummyparameter\c!nc\plusone
+ \letdummyparameter\c!nr\plusone
+ \getdummyparameters[#1]%
+ \clf_blockcolumnset {
+ name {\currentpagegrid}
+ c \dummyparameter\c!c
+ r \dummyparameter\c!r
+ nc \dummyparameter\c!nc
+ nr \dummyparameter\c!nr
+ }%
+ \endgroup}
+
+\permanent\tolerant\protected\def\setpagegrid[#1]%
+ {\begingroup
+ \letdummyparameter\c!c\zerocount
+ \letdummyparameter\c!r\zerocount
+ \letdummyparameter\c!method\v!here
+ \letdummyparameter\c!option\v!none
+ \getdummyparameters[#1]%
+ \dowithnextboxcs\page_grd_set_indeed\hbox}
+
+\def\page_grd_set_indeed
+ {\clf_checkcolumnset {
+ name {\currentpagegrid}
+ c \dummyparameter\c!c
+ r \dummyparameter\c!r
+ box \nextbox
+ method {\dummyparameter\c!method}
+ option {\dummyparameter\c!option}
+ }%
+ \ifcase\c_page_grd_reserved_state
+ \setbox\nextbox\vpack to \d_page_grd_reserved_height \bgroup
+ \vss
+ \hpack to \d_page_grd_reserved_width \bgroup
+ \box\nextbox
+ \hss
+ \egroup
+ \vss
+ \egroup
+ \wd\nextbox\d_page_grd_reserved_width
+ \clf_putincolumnset {
+ name {\currentpagegrid}
+ box \nextbox
+ }%
+ \fi
+ \endgroup}
+
+
+\protected\def\page_grd_command_set_vsize
+ {\clf_setvsizecolumnset{\currentpagegrid}%
+ \ifdim\d_page_grd_gap_height<\lineheight
+ \page_grd_command_flush_page
+ \page_otr_fill_and_eject_page
+ \fi
+ \global\vsize\d_page_grd_gap_height
+ \pagegoal\vsize}
+
+\protected\def\page_grd_command_set_hsize
+ {\clf_sethsizecolumnset{\currentpagegrid}%
+ \hsize\d_page_grd_column_width
+ \textwidth\d_page_grd_column_width}
+
+\protected\def\page_grd_command_routine
+ {\ifvoid\normalpagebox \else
+ \clf_addtocolumnset{\currentpagegrid}\normalpagebox
+ \fi
+ \page_grd_command_set_vsize
+ \page_grd_command_flush_saved_floats
+ \page_grd_command_set_vsize
+ \ifdim\d_page_grd_gap_height<\lineheight
+ \page_grd_command_flush_page
+ \fi
+ \page_grd_command_set_vsize
+ \clf_flushcolumnsetrest {\currentpagegrid}\normalpagebox
+ \ifvoid\normalpagebox \else
+ \unvbox\normalpagebox
+ \fi}
+
+\installoutputroutine\synchronizepagegrid
+ {\ifvoid\normalpagebox\else
+ \clf_addtocolumnset{\currentpagegrid}\normalpagebox
+ \page_grd_command_set_vsize
+ \clf_flushcolumnsetrest{\currentpagegrid}\normalpagebox
+ \ifvoid\normalpagebox \else
+ \unvbox\normalpagebox
+ \fi
+ \fi}
+
+% todo line numbers and marks
+
+\protected\def\page_grd_command_flush_page_column#1%
+ {\privatescratchcounter#1\relax % or just currentcolumn as in page-col.mkiv
+ \clf_flushcolumnsetcolumn{\currentpagegrid}\privatescratchcounter
+ \anch_mark_column_box\b_page_grd_column\privatescratchcounter
+ \page_marks_synchronize_column\c_page_grd_first_column\c_page_grd_last_column\privatescratchcounter\b_page_grd_column
+ \ifnum\privatescratchcounter>\c_page_grd_n_of_left
+ \advance\privatescratchcounter-\c_page_grd_n_of_left
+ \page_lines_add_numbers_to_box\b_page_grd_column\privatescratchcounter\c_page_grd_n_of_right\plustwo
+ \else
+ \page_lines_add_numbers_to_box\b_page_grd_column\privatescratchcounter\c_page_grd_n_of_left\plustwo
+ \fi
+ \begingroup
+ \edef\currentpagegrid{\currentpagegrid:#1}%
+ \inheritedpagegridframedbox\box\b_page_grd_column
+ \endgroup}
+
+\protected\def\page_grd_command_flush_page
+ {\deactivatecolor % puzzling, try ungrouped color \red or so
+ \setbox\b_page_grd_collected\hpack\bgroup
+ \clf_preparecolumnsetflush{\currentpagegrid}%
+ \letpagegridparameter\c!region\currentpagegrid
+ \doifelse{\pagegridparameter\c!direction}\v!reverse
+ {\dostepwiserecurse\c_page_grd_last_column\c_page_grd_first_column\minusone
+ {\page_grd_command_flush_page_column{##1}%
+ \ifnum##1>\plusone
+ \kern\namedpagegridparameter{\currentpagegrid:##1}\c!distance\relax
+ \fi}}%
+ {\dostepwiserecurse\c_page_grd_first_column\c_page_grd_last_column\plusone
+ {\page_grd_command_flush_page_column{##1}%
+ \ifnum##1<\c_page_grd_last_column
+ \kern\namedpagegridparameter{\currentpagegrid:##1}\c!distance\relax
+ \fi}}%
+ \clf_finishcolumnsetflush{\currentpagegrid}%
+ \egroup
+ \page_otr_construct_and_shipout\box\b_page_grd_collected\zerocount % three arguments
+ \clf_flushcolumnsetareas{\currentpagegrid}\relax
+ \page_grd_command_flush_saved_floats}
+
+% slow but robust
+
+\protected\def\page_grd_command_next_progress
+ {\strut
+ \page_grd_command_flush_all_floats
+ \page_otr_eject_page
+ \ifcase\clf_columnsetnoto\else
+ \expandafter\page_grd_command_next_progress
+ \fi}
+
+\protected\def\page_grd_command_handle_column
+ {\ifcase\clf_columnsetgoto{\currentpagegrid}{\page_breaks_columns_current_option}\relax\else
+ \expandafter\page_grd_command_next_progress
+ \fi}
+
+\installcolumnbreakmethod\s!pagegrid\s!unknown {\page_grd_command_handle_column}
+\installcolumnbreakmethod\s!pagegrid\v!yes {\page_grd_command_handle_column}
+
+\protected\def\page_grd_command_next_page
+ {\ifcase\clf_columnsetgoto{\currentpagegrid}{\v!page}\relax\else
+ \page_grd_command_flush_page
+ \fi}
+
+\protected\def\page_grd_command_next_page_and_inserts
+ {\page_grd_command_flush_all_floats
+ \page_grd_command_next_page}
+
+\let\page_grd_command_flush_all_floats\page_one_command_flush_all_floats
+\let\page_grd_command_package_contents\page_one_command_package_contents
+
+\protected\def\page_grd_command_flush_saved_floats
+ {\ifconditional\c_page_floats_flushing \else
+ \ifconditional\c_page_floats_some_waiting
+ \page_grd_command_flush_saved_floats_indeed
+ \fi
+ \fi}
+
+\protected\def\page_grd_command_flush_saved_floats_indeed
+ {\page_floats_flush\s!text\plusone
+ \clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ width \wd\floatbox
+ height \ht\floatbox
+ }%
+ \ifcase\c_page_grd_reserved_state
+ \page_grd_place_float_here_indeed
+ \page_grd_command_set_vsize % needed
+ \ifconditional\c_page_floats_some_waiting
+ \doubleexpandafter\page_grd_command_flush_saved_floats_indeed
+ \fi
+ \else
+ \page_floats_resave\s!text
+ \fi}
+
+% needs checking
+
+\protected\def\page_grd_command_flush_floats
+ {\wait\global\settrue\c_page_floats_flushing
+ \ifconditional\c_page_floats_some_waiting
+ \par
+ \page_grd_command_flush_floats_indeed
+ \fi
+ \global\savednoffloats\zerocount
+ \global\setfalse\c_page_floats_some_waiting
+ \global\setfalse\c_page_floats_flushing}
+
+\def\page_grd_command_flush_floats_indeed % much in common with OTRSET
+ {\ifconditional\c_page_floats_some_waiting
+ \ifconditional\c_page_floats_compress_flushed
+ \page_floats_collect\s!text\hsize\d_page_floats_compress_distance
+ \ifcase\nofcollectedfloats
+ \page_floats_get
+ % \or
+ % \page_floats_get
+ \else
+ \setfalse\c_page_floats_center_box % not needed as we do call directly
+ \global\setbox\floatbox\hbox to \hsize
+ {\hfil
+ \dorecurse\nofcollectedfloats
+ {\ifcase\columndirection % nog document wide
+ \page_floats_flush\s!text\plusone
+ \else
+ \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}%
+ \fi
+ \ifdim\wd\floatbox>\makeupwidth % \hsize
+ \hbox to \makeupwidth{\hss\box\floatbox\hss}%
+ \else
+ \box\floatbox
+ \fi
+ \ifnum\recurselevel<\nofcollectedfloats
+ \hfil
+ \fi}%
+ \hfil}%
+ \fi
+ \else
+ \page_floats_get
+ \fi
+ \doplacefloatbox
+ \expandafter\page_grd_command_flush_floats_indeed
+ \fi}
+
+% so far
+
+\protected\def\page_grd_command_check_if_float_fits
+ {\clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ % c \zerocount
+ % r \zerocount
+ box \floatbox
+ }%
+ \ifcase\c_page_grd_reserved_state
+ \global\settrue\c_page_floats_room
+ \else
+ \global\setfalse\c_page_floats_room
+ \fi}
+
+\protected\def\page_grd_place_float_here_indeed
+ {\setbox\floatbox\vpack to \d_page_grd_reserved_height \bgroup
+ \vss
+ \hpack to \d_page_grd_reserved_width \bgroup
+ % \hss % no
+ \box\floatbox
+ \hss
+ \egroup
+ \vss
+ \egroup
+ \clf_putincolumnset {
+ name {\currentpagegrid}
+ box \floatbox
+ }}
+
+\def\page_grd_place_float_slot
+ {% safeguard
+ \ifempty\floatmethod
+ \let\floatmethod\v!here
+ \fi
+ % synchronize
+ \penalty\c_page_otr_eject_penalty
+ % push
+ \setbox\savedfloatbox\box\floatbox
+ \page_grd_command_flush_saved_floats
+ \setbox\floatbox\box\savedfloatbox
+ % pop
+ \ifconditional\c_page_floats_some_waiting
+ \page_floats_save\s!text
+ \nonoindentation
+ \else
+ \clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ \ifempty\floatcolumn \else
+ c \floatcolumn
+ \fi
+ \ifempty\floatrow \else
+ r \floatrow
+ \fi
+ box \floatbox
+ }%
+ \ifcase\c_page_grd_reserved_state
+ \page_grd_place_float_here_indeed
+ \else
+ \page_floats_save\s!text
+ \nonoindentation
+ \fi
+ \fi}
+
+\def\page_grd_place_float_fixed % todo: fallback on here
+ {\ifempty\floatcolumn
+ \let\floatmethod\v!here
+ \orelse\ifempty\floatrow
+ \let\floatmethod\v!here
+ \else
+ \let\floatmethod\v!fixed
+ \fi
+ \page_grd_place_float_slot}
+
+\def\page_grd_place_float_force
+ {% synchronize
+ \penalty\c_page_otr_eject_penalty
+ \clf_checkcolumnset {
+ name {\currentpagegrid}
+ method {\floatmethod}
+ box \floatbox
+ }%
+ \ifcase\c_page_grd_reserved_state
+ \page_grd_place_float_here_indeed
+ \else
+ \page_floats_save\s!text
+ \nonoindentation
+ \fi}
+
+\def\page_grd_place_float_page {\page_grd_place_float_slot} % todo: fallback on here
+
+\def\page_grd_place_float_here {\let\floatmethod\v!here\page_grd_place_float_slot}
+\def\page_grd_place_float_top {\page_grd_place_float_slot}
+\def\page_grd_place_float_bottom{\page_grd_place_float_slot}
+
+\installfloatmethod \s!pagegrid \v!here \page_grd_place_float_here
+\installfloatmethod \s!pagegrid \v!force \page_grd_place_float_force % todo
+%installfloatmethod \s!pagegrid \v!left
+%installfloatmethod \s!pagegrid \v!right
+%installfloatmethod \s!pagegrid \v!text
+\installfloatmethod \s!pagegrid \v!top \page_grd_place_float_top
+\installfloatmethod \s!pagegrid \v!bottom \page_grd_place_float_bottom
+%installfloatmethod \s!pagegrid \v!auto
+%installfloatmethod \s!pagegrid \v!margin
+%installfloatmethod \s!pagegrid \v!opposite
+\installfloatmethod \s!pagegrid \v!page \page_grd_place_float_page
+%installfloatmethod \s!pagegrid \v!leftpage
+%installfloatmethod \s!pagegrid \v!rightpage
+%installfloatmethod \s!pagegrid \v!inmargin
+%installfloatmethod \s!pagegrid \v!inleft
+%installfloatmethod \s!pagegrid \v!inright
+%installfloatmethod \s!pagegrid \v!leftmargin
+%installfloatmethod \s!pagegrid \v!rightmargin
+%installfloatmethod \s!pagegrid \v!leftedge
+%installfloatmethod \s!pagegrid \v!rightedge
+%installfloatmethod \s!pagegrid \v!somewhere
+%installfloatmethod \s!pagegrid \v!backspace
+%installfloatmethod \s!pagegrid \v!cutspace
+\installfloatmethod \s!pagegrid \s!tblr \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!lrtb \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!tbrl \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!rltb \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!fxtb \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!btlr \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!lrbt \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!btrl \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!rlbt \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!fxbt \page_grd_place_float_slot
+\installfloatmethod \s!pagegrid \s!fixd \page_grd_place_float_fixed
+
+\protected\def\page_grd_command_side_float_output
+ {} % nothing, reset anyway
+
+\protected\def\page_grd_command_flush_side_floats
+ {\page_sides_forget_floats}
+
+\protected\def\page_grd_command_synchronize_side_floats
+ {\page_sides_forget_floats}
+
+\protected\def\page_grd_command_synchronize_hsize
+ {\page_grd_command_set_hsize}
+
+\protected\def\page_grd_command_flush_all_floats
+ {\page_one_command_flush_all_floats}
+
+\defineoutputroutine
+ [\s!pagegrid]
+ [\s!page_otr_command_routine =\page_grd_command_routine,
+ \s!page_otr_command_package_contents =\page_grd_command_package_contents,
+ \s!page_otr_command_set_vsize =\page_grd_command_set_vsize,
+ \s!page_otr_command_set_hsize =\page_grd_command_set_hsize, % tricky, goes wrong
+ \s!page_otr_command_synchronize_hsize =\page_grd_command_synchronize_hsize,
+ \s!page_otr_command_next_page =\page_grd_command_next_page,
+ \s!page_otr_command_next_page_and_inserts =\page_grd_command_next_page_and_inserts,
+ % \s!page_otr_command_set_top_insertions =\page_grd_command_set_top_insertions,
+ % \s!page_otr_command_set_bottom_insertions =\page_grd_command_set_bottom_insertions,
+ % \s!page_otr_command_flush_top_insertions =\page_grd_command_flush_top_insertions,
+ % \s!page_otr_command_flush_bottom_insertions=\page_grd_command_flush_bottom_insertions,
+ \s!page_otr_command_check_if_float_fits =\page_grd_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_grd_command_set_float_hsize,
+ % \s!page_otr_command_flush_float_box =\page_grd_command_flush_float_box,
+ \s!page_otr_command_synchronize_side_floats=\page_grd_command_synchronize_side_floats,
+ \s!page_otr_command_side_float_output =\page_grd_command_side_float_output,
+ \s!page_otr_command_flush_floats =\page_grd_command_flush_floats,
+ \s!page_otr_command_flush_side_floats =\page_grd_command_flush_side_floats,
+ \s!page_otr_command_flush_saved_floats =\page_grd_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_grd_command_flush_all_floats,
+ % \s!page_otr_command_flush_margin_blocks =\page_grd_command_flush_margin_blocks, % not used
+ ]
+
+% spans
+
+\installcorenamespace{pagegridspan}
+
+\installframedcommandhandler \??pagegridspan {pagegridspan} \??pagegridspan
+
+\setuppagegridspan
+ [\c!frame=\v!off,
+ \c!before=,
+ \c!after=,
+ \c!offset=\v!overlay,
+ \c!location=\v!left,
+ \c!linecorrection=\v!off,
+ \c!depthcorrection=\v!off,
+ \c!n=\plustwo,
+ \c!nlines=\zerocount,
+ \c!align=\v!normal,
+ \c!width=\d_page_grd_span_width,
+ \c!indenting=,
+ \c!indentnext=\v!yes,
+ \c!default=\v!here,
+ \c!alternative=\v!a]
+
+\newdimen\d_page_grd_span_width
+
+\let\page_grd_span_stop\relax
+
+\permanent\tolerant\protected\def\startpagegridspan[#1]#*[#2]#*[#3]% [#3] gobbles space
+ {\endgraf % else rubish output if forgotten
+ \synchronizepagegrid
+ \bgroup
+ \forgetall
+ \edef\currentpagegridspan{#1}%
+ \clf_sethsizecolumnspan{\currentpagegrid}\pagegridspanparameter\c!n\relax
+ \setbox\scratchbox\hbox\bgroup\inheritedpagegridspanframed\bgroup
+ \def\page_grd_span_stop{\page_grd_span_stop_indeed{#2}}%
+ \usepagegridspanstyleandcolor\c!style\c!color
+ \pagegridspanparameter\c!before
+ \ignorespaces}
+
+\protected\def\page_grd_span_stop_indeed#1%
+ {\removeunwantedspaces
+ \par
+ \verticalstrut
+ \kern-2\struttotal
+ \verticalstrut
+ \endgraf
+ \pagegridspanparameter\c!after
+ \egroup\egroup
+ \setpagegrid[#1]{\box\scratchbox}%
+ % todo: push into slot
+ \egroup
+ \endgraf}
+
+\permanent\protected\def\stoppagegridspan % indirectness permits aliasing
+ {\page_grd_span_stop}
+
+\permanent\def\pagegridspanwidth#1% assumes equal distances
+ {\the\dimexpr
+ #1\d_page_grd_column_width
+ +#1\d_page_grd_distance
+ - \d_page_grd_distance
+ \relax}
+
+% areas
+
+\installcorenamespace{pagegridarea}
+
+\installframedcommandhandler \??pagegridarea {pagegridarea} \??pagegridarea
+
+\setuppagegridarea
+ [\c!x=\plusone,
+ \c!y=\plusone,
+ \c!nx=\plusone,
+ \c!ny=\plusone,
+ \c!clipoffset=2\lineheight,
+ \c!leftoffset=\zeropoint,
+ \c!rightoffset=\zeropoint,
+ \c!offset=\v!overlay,
+ \c!strut=\v!no,
+ \c!frame=\v!off,
+ %\c!type=\v!next,
+ \c!align=\v!normal,
+ \c!page=\plusone,
+ \c!state=\v!stop]
+
+% type: both fixed left right next (not now), then better
+% lefttext and righttext or so
+
+\appendtoks
+ % \edef\p_type{}%
+ % \ifx\p_type\v!next
+ % \doifelseoddpage
+ % {\letpagegridareaparameter\c!type\v!right}%
+ % {\letpagegridareaparameter\c!type\v!left}%
+ % \fi
+ \clf_registercolumnsetarea {
+ name {\currentpagegridarea}
+ % type {\p_type}
+ % page \pagegridareaparameter\c!page
+ state {\pagegridareaparameter\c!state}
+ c \pagegridareaparameter\c!x
+ r \pagegridareaparameter\c!y
+ nc \pagegridareaparameter\c!nx
+ nr \pagegridareaparameter\c!ny
+ }%
+\to \everydefinepagegridarea
+
+\permanent\tolerant\protected\def\setuppagegridareatext[#1]#*[#2]%
+ {\edef\currentpagegridarea{#1}%
+ \setpagegridareaparameter\c!text{#2}}
+
+% maybe move the left/right correction to the tex end or the offset to lua
+
+% used nowhere:
+
+\permanent\protected\def\setpagegridarea#1#2#3#4#5#6#7#8% can be optimized
+ {\begingroup
+ \edef\currentpagegridarea{#2}%
+ \setpagegridareaparameter\c!width {#5\scaledpoint}%
+ \setpagegridareaparameter\c!height{#6\scaledpoint}%
+ \setbox\nextbox\hpack\bgroup\inheritedpagegridareaframed\bgroup
+ \usepagegridareastyleandcolor\c!style\c!color
+ \ignorespaces
+ \pagegridareaparameter\c!text
+ \egroup\egroup
+ %
+ \scratchdimen#8\scaledpoint
+ \ifdim\scratchdimen>\zeropoint
+ \setbox\scratchbox\vbox\bgroup
+ \clip
+ [ \c!offset=\pagegridareaparameter\c!clipoffset,%
+ \c!rightoffset=\pagegridareaparameter\c!rightoffset,%
+ \c!width=\scratchdimen,%
+ % \c!height=
+ ]%
+ {\copy\nextbox}%
+ \egroup
+ \clf_setcolumnsetarea{name {#1} box \scratchbox c #3 r #4}%
+ \setbox\scratchbox\vbox\bgroup
+ \hskip-\layoutparameter\c!backspace % todo: #9
+ \clip
+ [ \c!offset=\pagegridareaparameter\c!clipoffset,%
+ \c!leftoffset=\pagegridareaparameter\c!rightoffset,%
+ \c!hoffset=\scratchdimen,%
+ \c!width=\dimexpr\wd\nextbox-\scratchdimen\relax,%
+ % \c!height=
+ ]%
+ {\box\nextbox}%
+ \egroup
+ \clf_setcolumnsetarea{name {#1} box \scratchbox c #7 r #4}%
+ \else
+ \setbox\scratchbox\vbox\bgroup
+ \box\nextbox % wrapping needed
+ \egroup
+ \clf_setcolumnsetarea{name {#1} box \scratchbox c #3 r #4}%
+ \fi
+ \endgroup}
+
+% state start | repeat
+
+%D The old one, for now:
+
+\aliased\let\definecolumnset \definepagegrid
+\aliased\let\setupcolumnset \setuppagegrid
+\aliased\let\setupcolumnsetlines \setuppagegridlines
+\aliased\let\setupcolumnsetstart \setuppagegridstart
+\aliased\let\startcolumnset \startpagegrid
+\aliased\let\stopcolumnset \stoppagegrid
+\aliased\let\definecolumnsetspan \definepagegridspan
+\aliased\let\setupcolumnsetspan \setuppagegridspan
+\aliased\let\startcolumnsetspan \startpagegridspan
+\aliased\let\stopcolumnsetspan \stoppagegridspan
+\aliased\let\columnsetspanwidth \pagegridspanwidth
+\aliased\let\definecolumnsetarea \definepagegridarea
+\aliased\let\setupcolumnsetarea \setuppagegridarea
+\aliased\let\setupcolumnsetareatext\setuppagegridareatext
+
+%D It ends here.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-fac.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-fac.mkxl
new file mode 100644
index 00000000000..03fa9821724
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-fac.mkxl
@@ -0,0 +1,87 @@
+%D \module
+%D [ file=page-fac, % moved from page-ini
+%D version=2011.12.07, % 2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Facing Pages,
+%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 Page Macros / Facing Pages}
+
+\unprotect
+
+%D \macros
+%D {setupoppositeplacing,startopposite}
+%D
+%D \starttyping
+%D \starttext
+%D test \startopposite \blackrule[width=3cm,height=4cm] \stopopposite test
+%D test \startopposite \blackrule[width=3cm,height=4cm] \stopopposite test
+%D \stoptext
+%D \stoptyping
+
+\newbox \b_page_facings_content
+\newconditional\c_page_facings_busy
+
+\installcorenamespace{oppositeplacing}
+
+\installsetuponlycommandhandler \??oppositeplacing {oppositeplacing}
+
+\permanent\protected\def\startopposite
+ {\dowithnextboxcontent
+ {\hsize\makeupwidth}%
+ {\global\setbox\b_page_facings_content\vbox
+ {\ifvoid\b_page_facings_content
+ \directoppositeplacingparameter\c!before
+ \else
+ \directoppositeplacingparameter\c!inbetween
+ \unvbox\b_page_facings_content
+ \fi
+ \box\nextbox}}%
+ \vbox\bgroup}
+
+\permanent\protected\def\stopopposite
+ {\egroup}
+
+\def\page_facings_finish
+ {\ifvoid\b_page_facings_content \else
+ \global\setbox\b_page_facings_content\vbox to \makeupheight
+ {\unvbox\b_page_facings_content
+ \directoppositeplacingparameter\c!after
+ \vss}%
+ \fi}
+
+\def\page_facings_flush
+ {\ifconditional\c_page_facings_busy
+ \ifvoid\b_page_facings_content \else
+ \page_facings_flush_indeed
+ \fi
+ \fi}
+
+\def\page_facings_flush_indeed
+ {\ifnum\realpageno>\plusone
+ \begingroup
+ \pageornamentstate\plusone % tricky
+ \page_facings_finish
+ \page_boxes_shipout{\page_boxes_constructed_page\box\b_page_facings_content}%
+ \endgroup
+ \else
+ \global\setbox\b_page_facings_content\emptybox
+ \fi}
+
+\appendtoks
+ \doifelse{\directoppositeplacingparameter\c!state}\v!start\settrue\setfalse\c_page_facings_busy
+\to \everysetupoppositeplacing
+
+\setupoppositeplacing
+ [\c!state=\v!start,
+ \c!before=,
+ \c!inbetween=\blank,
+ \c!after=]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-ffl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-ffl.mkxl
new file mode 100644
index 00000000000..350c4500073
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-ffl.mkxl
@@ -0,0 +1,247 @@
+%D \module
+%D [ file=page-ffl,
+%D version=2018.01.04,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Facing floats,
+%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 Page Macros / Facing floats}
+
+%D The code below comes from a module made for Thomas Schmitz and is now part of the
+%D core. A simple example is given here:
+%D
+%D \starttyping
+%D \definefacingfloat
+%D [whatever]
+%D
+%D \setupfacingfloat
+%D [whatever]
+%D [style=bold,
+%D width=frame,
+%D offset=10pt,
+%D color=white]
+%D
+%D \setupfacingfloat
+%D [whatever:left]
+%D [background=color,
+%D backgroundcolor=red]
+%D
+%D \setupfacingfloat
+%D [whatever:right]
+%D [background=color,
+%D backgroundcolor=green]
+%D
+%D \startfacingfloat[whatever]
+%D {\dorecurse{10}{\samplefile{tufte} }}
+%D {\dorecurse{10}{\samplefile{ward} }}
+%D {\dorecurse{10}{\samplefile{tufte} }}
+%D {\dorecurse{10}{\samplefile{ward} }}
+%D \stopfacingfloat
+%D
+%D \startfacingfloat[whatever]
+%D \startcontent \dorecurse{10}{\samplefile{tufte} } \stopcontent
+%D \startcontent \dorecurse{10}{\samplefile{ward} } \stopcontent
+%D \startcontent \dorecurse{10}{\samplefile{tufte} } \stopcontent
+%D \startcontent \dorecurse{10}{\samplefile{ward} } \stopcontent
+%D \stopfacingfloat
+%D
+%D \dorecurse{10}{\samplefile{sapolsky} }
+%D \stoptyping
+%D
+%D The idea is to flush related floats more or less in parallel.
+
+\unprotect
+
+% width:
+%
+% -- fit : do nothing
+% -- dimension : use that
+% -- frame : use hsize minus frame offsets (based on preroll)
+
+\installcorenamespace {facingfloat}
+
+\installframedcommandhandler \??facingfloat {facingfloat} \??facingfloat
+
+\setupfacingfloat
+ [\c!spaceinbetween=\v!big,
+ \c!inbetween={\blank[\v!big]},
+ \c!width=\v!fit,
+ %\c!style,
+ %\c!color,
+ \c!page=\v!left]
+
+\appendtoks
+ \ifempty\currentfacingfloatparent
+ \normalexpanded{\definefacingfloat[\currentfacingfloat:\v!left ][\currentfacingfloat]}%
+ \normalexpanded{\definefacingfloat[\currentfacingfloat:\v!right][\currentfacingfloat]}%
+ \fi
+\to \everydefinefacingfloat
+
+\newcount\c_strc_floats_facing_saved
+\newcount\c_strc_floats_facing_flushed
+
+\newbox\b_strc_floats_facing_l
+\newbox\b_strc_floats_facing_r
+
+\let\m_strc_floats_state\relax
+
+\permanent\protected\def\strc_floats_facing_flush
+ {\ifnum\c_strc_floats_facing_flushed<\c_strc_floats_facing_saved
+ \ifodd\c_strc_floats_facing_flushed
+ \ifodd\realpageno
+ \strc_floats_facing_flush_indeed
+ \doifelsependingpagecontent\relax{\null\page}%
+ \fi
+ \else
+ \ifodd\realpageno\else
+ \strc_floats_facing_flush_indeed
+ \doifelsependingpagecontent\relax{\null\page}%
+ \fi
+ \fi
+ \fi}
+
+\permanent\protected\def\strc_floats_facing_flush_indeed
+ {\global\advance\c_strc_floats_facing_flushed\plusone
+ \floatingpenalty\zerocount
+ \insert\namedinsertionnumber\s!topfloat\bgroup
+ \forgetall
+ \ifconditional\c_page_one_top_of_insert
+ \ifconditional\c_page_one_correct_top_insert
+ \topskipcorrection % [xx] new: see icare topbleed
+ \kern-\lineskip
+ \par
+ \prevdepth\maxdimen
+ \fi
+ \fi
+ \directboxfromcache{\currentfacingfloat}{\number\c_strc_floats_facing_flushed}%
+ \vkern\s_page_one_between_top_insert
+ \egroup
+ \ifnum\c_strc_floats_facing_saved=\c_strc_floats_facing_flushed
+ \global\c_strc_floats_facing_saved \zerocount
+ \global\c_strc_floats_facing_flushed\zerocount
+ \resetboxesincache{\currentfacingfloat}%
+ \fi}
+
+\aliased\let\flushfacingfloats\strc_floats_facing_flush
+
+\protected\def\strc_floats_facing_setup
+ {\edef\currentfacingfloat{\currentfacingfloat:\m_strc_floats_state}%
+ \usefacingfloatstyleandcolor\c!style\v!color}
+
+\protected\def\strc_floats_facing_collect
+ {\ifx\m_strc_floats_state\v!left
+ \ifvoid\nextbox\orelse\ifzeropt\wd\nextbox\else
+ \ifvoid\b_strc_floats_facing_l
+ \setbox\b_strc_floats_facing_l\box\nextbox
+ \else
+ \setbox\b_strc_floats_facing_l\vbox\bgroup
+ \unvbox\b_strc_floats_facing_l
+ \facingfloatparameter\c!inbetween
+ \unvbox\nextbox
+ \egroup
+ \fi
+ \fi
+ \let\m_strc_floats_state\v!right
+ \orelse\ifx\m_strc_floats_state\v!right
+ \ifvoid\nextbox\orelse\ifzeropt\wd\nextbox\else
+ \ifvoid\b_strc_floats_facing_r
+ \setbox\b_strc_floats_facing_r\box\nextbox
+ \else
+ \setbox\b_strc_floats_facing_r\vbox\bgroup
+ \unvbox\b_strc_floats_facing_r
+ \facingfloatparameter\c!inbetween
+ \unvbox\nextbox
+ \egroup
+ \fi
+ \fi
+ \let\m_strc_floats_state\v!left
+ \else
+ \let\m_strc_floats_state\v!left
+ \fi}
+
+\protected\def\strc_floats_facing_handle
+ {\doifnextbgroupelse
+ \strc_floats_facing_handle_indeed
+ \strc_floats_facing_wrap_up}
+
+\protected\def\strc_floats_facing_handle_indeed
+ {\dowithnextboxcontent
+ \strc_floats_facing_setup
+ {\strc_floats_facing_collect\strc_floats_facing_handle}
+ \vbox}
+
+\permanent\protected\def\startfacingfloat[#1]%
+ {\begingroup
+ % todo: \usepageparameter
+% \edef\p_page{\facingfloatparameter\c!page}%
+% \ifempty\p_page\else
+% \page[\p_page]%
+% \fi
+ %
+ \edef\currentfacingfloat{#1}%
+ \edef\p_width{\facingfloatparameter\c!width}%
+ \letfacingfloatparameter\c!width\v!fit
+ \ifx\p_width\v!frame
+ \setbox\scratchbox\hpack{\inheritedfacingfloatframed{}}%
+ \advance\hsize-\wd\scratchbox
+ \orelse\ifx\p_width\v!fit
+ % whatever
+ \else
+ \hsize\p_width
+ \fi
+ \enforced\let\startcontent\bgroup
+ \enforced\let\stopcontent\egroup
+ \let\m_strc_floats_state\v!left
+ \strc_floats_facing_handle}
+
+\permanent\protected\def\stopfacingfloat
+ {\endgroup}
+
+\protected\def\strc_floats_facing_wrap_up
+ {\edef\p_spaceinbetween{\facingfloatparameter\c!spaceinbetween}%
+ \ifempty\p_spaceinbetween
+ \scratchdimen\zeropoint
+ \else
+ \setbox\scratchbox\vbox{\directvspacing\p_spaceinbetween}%
+ \scratchdimen\htdp\scratchbox
+ \fi
+ \ifvoid\b_strc_floats_facing_l\else
+ \page_postprocessors_linenumbers_box\b_strc_floats_facing_l
+ \fi
+ \ifvoid\b_strc_floats_facing_r\else
+ \page_postprocessors_linenumbers_box\b_strc_floats_facing_r
+ \fi
+ \doloop{%
+ \strc_floats_facing_flush_wrap\b_strc_floats_facing_l\v!left
+ \strc_floats_facing_flush_wrap\b_strc_floats_facing_r\v!right
+ \ifvoid\b_strc_floats_facing_l\relax\ifvoid\b_strc_floats_facing_r\relax
+ \exitloop
+ \fi\fi}}
+
+\def\strc_floats_facing_flush_wrap#1#2%
+ {\ifvoid#1\relax
+ % todo
+ \else
+ \begingroup
+ \setbox\scratchbox\vsplit#1 upto \textheight
+ \setbox\scratchbox\hpack\bgroup
+ \edef\currentfacingfloat{\currentfacingfloat:#2}%
+ \inheritedfacingfloatframed{\box\scratchbox}%
+ \egroup
+ \ifdim\ht\scratchbox<\dimexpr\textheight-\scratchdimen\relax
+ \setbox\scratchbox\vbox{\box\scratchbox\directvspacing\p_spaceinbetween}%
+ \else
+ \setbox\scratchbox\vbox to \textheight{\box\scratchbox\vss}%
+ \fi
+ \global\advance\c_strc_floats_facing_saved\plusone
+ \putboxincache{\currentfacingfloat}{\number\c_strc_floats_facing_saved}\scratchbox
+ \endgroup
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl
new file mode 100644
index 00000000000..a97cc7f0d2e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-flt.mkxl
@@ -0,0 +1,333 @@
+%D \module
+%D [ file=page-flt,
+%D version=2010.04.08,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Float Management,
+%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 Page Macros / Float Management}
+
+%D This module has code that previously was in other modules. There is also float
+%D related code in \type {strc-flt.mkiv}.
+
+\registerctxluafile{page-flt}{}
+
+\unprotect
+
+\defineinsertion[\s!topfloat]
+\defineinsertion[\s!bottomfloat]
+\defineinsertion[\s!pagefloat]
+
+\newdimen \d_page_floats_inserted_bottom
+\newdimen \d_page_floats_inserted_top
+\newdimen \d_page_floats_inserted_page
+\newcount \c_page_floats_n_of_top \c_page_floats_n_of_top \plustwo
+\newcount \c_page_floats_n_of_bottom \c_page_floats_n_of_bottom\zerocount
+\newcount \c_page_floats_n_of_page \c_page_floats_n_of_page \plustwo
+
+\newconstant\c_page_floats_insertions_topskip_mode % 1 = no topskip
+
+\def\page_floats_report_total
+ {\showmessage\m!floatblocks4%
+ {\the\totalnoffloats
+ \ifempty\floatlocationmethod
+ \ifempty\floatlocation\else,\floatlocation\fi
+ \else
+ ,\floatlocationmethod
+ \fi}}
+
+\def\page_floats_report_flushed
+ {\showmessage\m!floatblocks3%
+ {\the\numexpr\totalnoffloats-\savednoffloats\relax}}
+
+%D Extra float registers.
+
+\newconditional\c_page_floats_room
+\newconditional\c_page_floats_some_waiting
+\newconditional\c_page_floats_not_permitted
+\newconditional\c_page_floats_flushing
+\newconditional\c_page_floats_center_box \settrue\c_page_floats_center_box
+\newconditional\c_page_floats_center_box_local
+\newconditional\c_page_floats_center_box_global
+\newconditional\c_page_floats_compress_flushed \settrue\c_page_floats_compress_flushed
+
+\newdimen \d_page_floats_compress_distance
+
+%D For the moment we keep this but they will become private too.
+
+\newcount\totalnoffloats % these will be redone ... handled at the lua end anyway
+\newcount\savednoffloats % these will be redone ... handled at the lua end anyway
+\newcount\nofcollectedfloats % communication channel
+\newdimen\maxcollectedfloatstotal % communication channel
+
+\newcount\noffloatinserts % these will be redone ... handled at the lua end anyway
+
+\newbox \floattext
+
+\newdimen\floatwidth
+\newdimen\floatheight
+\newdimen\floatdepth
+\newdimen\floattextwidth
+\newdimen\floattextheight
+
+\newbox \floatbox
+\newbox \savedfloatbox
+
+%D From now on we manage the float stack at the \LUA\ end instead of packing
+%D them in a box and splitting off stacked floats. It's not so much less code
+%D but it's cleaner this way. It also opens op some posibilities as we can now
+%D more conveniently cary additional information around.
+
+\newtoks \everyfloatscheck
+
+\appendtoks
+ \ifcase\savednoffloats
+ \global\setfalse\c_page_floats_some_waiting
+ \else
+ \global\settrue\c_page_floats_some_waiting
+ \fi
+\to \everyfloatscheck
+
+\protected\def\page_floats_flush#1#2%
+ {\clf_flushfloat{#1}#2\relax
+ \the\everyfloatscheck}
+
+\protected\def\page_floats_flush_by_label#1#2%
+ {\clf_flushlabeledfloat{#1}{#2}\relax
+ \the\everyfloatscheck}
+
+\protected\def\page_floats_save#1%
+ {\clf_savefloat{#1}\relax
+ \the\everyfloatscheck}
+
+\protected\def\page_floats_resave#1%
+ {\clf_resavefloat{#1}\relax
+ \the\everyfloatscheck}
+
+\protected\def\page_floats_push_saved
+ {\clf_pushfloat
+ \the\everyfloatscheck}
+
+\protected\def\page_floats_pop_saved
+ {\clf_popfloat
+ \the\everyfloatscheck}
+
+\protected\def\page_floats_get_info#1%
+ {\clf_consultfloat{#1}}
+
+\protected\def\page_floats_if_else#1%
+ {\clf_doifelsestackedfloats{#1}}
+
+\protected\def\page_floats_collect#1#2#3%
+ {\clf_collectfloat{#1}\dimexpr#2\relax\dimexpr#3\relax}
+
+\permanent\def\nofstackedfloatsincategory#1% was singular
+ {\clf_nofstackedfloats{#1}}
+
+\let\page_floats_column_push_saved\page_floats_push_saved % overloaded in page-mul
+\let\page_floats_column_pop_saved \page_floats_pop_saved % overloaded in page-mul
+
+\protected\def\page_floats_save_page_float#1#2%
+ {\clf_savespecificfloat{#1}{specification{#2}}\relax}
+
+\protected\def\page_floats_save_somewhere_float#1#2% #1=method
+ {\clf_savespecificfloat{#1}{specification{#2}label{\floatlabel}}\relax}
+
+%D This is an experimental new feature (for Alan Braslau), a prelude to more:
+%D
+%D \starttyping
+%D test \placefigure{}{}
+%D test \placefigure[somewhere:alpha][whatever]{}{}
+%D test \placefigure[somewhere:beta] [whatever]{}{}
+%D test \placefigure[somewhere:gamma][whatever]{}{}
+%D test \placefigure[somewhere:delta][whatever]{}{}
+%D test \placefigure{}{}
+%D
+%D in \in{figure}[whatever] bla bla
+%D
+%D \placenamedfloat[figure][*l*]
+%D \placenamedfloat[figure][gamma]
+%D \placenamedfloat[figure][beta]
+%D \stoptyping
+
+\permanent\tolerant\protected\def\placenamedfloat[#1]#*[#2]%
+ {\doloop
+ {\page_floats_flush_by_label\s!somewhere{#2}%
+ \ifvoid\floatbox
+ \exitloop
+ \else
+ \def\currentfloat{#1}%
+ \blank[\rootfloatparameter\c!spacebefore]%
+ \box\floatbox
+ \blank[\rootfloatparameter\c!spaceafter]%
+ \fi}}
+
+% \setupcaption [figure] [align=flushleft]
+% \setupcaption [figure-1] [align=flushleft,leftmargin=10mm]
+% \setupcaption [figure-2] [align=flushleft,leftmargin=10mm,rightmargin=-10mm,width=\textwidth]
+%
+% \startsetups somefigure
+% \ifdim\floatsetupwidth>\textwidth
+% \placesetupfloat[figure-2]
+% \else
+% \placesetupfloat[figure-1]
+% \fi
+% \stopsetups
+%
+% \placefloatwithsetups[somefigure]{}{\externalfigure[dummy][width=5cm,height=2cm]}
+
+\mutable\let\floatsetupcaption\empty
+\mutable\let\floatsetupcontent\empty
+\mutable\let\floatsetupwidth \empty
+\mutable\let\floatsetupheight \empty
+
+\aliased\let\placesetupfloat\gobbleoneoptional
+
+\permanent\tolerant\protected\def\placefloatwithsetups[#1]#*[#2]#*[#3]#:#4%
+ {\def\floatsetupcaption{#4}%
+ \def\floatsetupcontent{\copy\nextbox}%
+ \def\floatsetupwidth {\wd\nextbox}%
+ \def\floatsetupheight {\ht\nextbox}%
+ \enforced\permanent\protected\def\placesetupfloat[##1]%
+ {\placefloat[##1][#2][#3]{#4}{\floatsetupcontent}}% #4 and not \floatsetupcaption (protected)
+ \dowithnextbox{\setups[#1]}\vbox}
+
+%D The following code is in transition as we don't want to break the current single
+%D column, multi column, and columnset mechanism.
+%D
+%D First we reimplement some helpers.
+
+\def\page_floats_get_used_hsize{\hsize}
+
+\protected\def\page_floats_get
+ {\ifconditional\c_page_floats_some_waiting
+ \page_floats_flush\s!text\plusone
+ \ifconditional\c_page_floats_center_box
+ \ifdim\wd\globalscratchbox<\page_floats_get_used_hsize
+ \global\setbox\floatbox\hpack to \page_floats_get_used_hsize{\hss\box\floatbox\hss}%
+ \orelse\ifinsidecolumns
+ % retain special alignments
+ \ifdim\wd\floatbox>\makeupwidth
+ \wd\floatbox\makeupwidth
+ \fi
+ \fi
+ \fi
+ \else
+ \global\savednoffloats\zerocount
+ \global\setbox\floatbox\emptybox
+ \fi}
+
+\protected\def\page_floats_flush_saved
+ {\doloop
+ {\ifconditional\c_page_floats_some_waiting
+ \page_otr_command_check_if_float_fits
+ \ifconditional\c_page_floats_room
+ \page_floats_get
+ \doplacefloatbox
+ \else
+ \exitloop
+ \fi
+ \else
+ % \ifconditional\c_page_margin_blocks_present % not here, here just as many floats as fit
+ % \page_otr_command_flush_margin_blocks
+ % \else
+ \exitloop
+ % \fi
+ \fi}}
+
+%D This is a future mechamism that will be integrated once we're sure about it:
+%D
+%D \starttyping
+%D \dorecurse{10}
+%D {\input thuan
+%D \placefigure{}{\framed[height=1.5cm]{test}}
+%D \placefloatplaceholder}
+%D \stoptyping
+
+\permanent\protected\def\placefloatplaceholder
+ {\ifconditional\c_page_floats_room \else
+ \ifdim\dimexpr\pagegoal-\pagetotal-3\lineheight\relax>\zeropoint
+ \startlinecorrection[blank]
+ \mhbox{\inframed{\labeltexts{placeholder}{\m_strc_floats_last_caption_tag}}}%
+ \stoplinecorrection
+ \else
+ \allowbreak
+ \fi
+ \fi}
+
+\setuplabeltext
+ [placeholder={\Word{\lastplacedfloat}~, moved}]
+
+%D Page floats use different stacks.
+
+\newtoks\everybeforeflushedpagefloat
+
+\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}
+
+\let\m_page_otr_checked_page_float\relax
+
+\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}
+
+% temp hack, needed to prevent floatbox being forgotten during
+% output, this will change to using another box for flushing
+%
+% \dorecurse{700}{text } \placefigure[top][]{First} {\framed{bla 1}}
+% \placefigure[top][]{Second}{\framed{bla 2}}
+% \dorecurse {40}{text } \placefigure[top][]{Third} {\framed{bla 3}}
+
+\appendtoks
+ \global\setbox\savedfloatbox\box\floatbox
+\to \everybeforeoutput
+
+\appendtoks
+ \global\setbox\floatbox\box\savedfloatbox
+\to \everyafteroutput
+
+\protect \endinput
+
+% hm, where is this one used (was in save/restore, see old implementation)
+%
+% \permanent\protected\def\uncenteredfloatbox
+% {\ifconditional\c_page_floats_center_box
+% \ifhbox\floatbox\relax % remove centering
+% \ifdim\wd\floatbox=\hsize
+% \ifhbox\floatbox
+% \setbox\scratchbox\hbox
+% {\unhbox\floatbox
+% \unskip\unskip
+% \global\setbox\globalscratchbox\lastbox}%
+% \box\globalscratchbox
+% \else
+% \box\floatbox
+% \fi
+% \else
+% \box\floatbox
+% \fi
+% \else
+% \box\floatbox
+% \fi
+% \else
+% \box\floatbox
+% \fi}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-flw.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-flw.mkxl
new file mode 100644
index 00000000000..ef92b9b52f9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-flw.mkxl
@@ -0,0 +1,178 @@
+%D \module
+%D [ file=page-flw,
+%D version=2003.04.19, % from test-002 (1997) profile experiment
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Text Flows,
+%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 Page Macros / Text Flows}
+
+%D This is high experimental and especially flushing may change (proper spacing is
+%D the driving force here). It's an old mechanism used for playing with stepping
+%D through document threads. As it's a simple and effective mechanism we keep it
+%D around. It's not to be confused with upcoming stream support.
+%D
+%D \starttyping
+%D \setuppapersize [S6]
+%D \setuptolerance [verytolerant,stretch]
+%D \setupfooter [strut=no]
+%D \setupwhitespace[big]
+%D
+%D \setuplayout
+%D [rightedge=5cm,width=fit,margin=0pt,edgedistance=1cm,
+%D footer=4cm,footerdistance=1cm,header=0cm]
+%D
+%D \setuptexttexts [edge][][\vbox{\flushtextflow{alpha}}]
+%D \setupfootertexts[edge][][\vbox{\flushtextflow{beta}}]
+%D \setupfootertexts [\vbox{\flushtextflow{gamma}}][]
+%D
+%D \definetextflow [alfa] [width=\rightedgewidth]
+%D \definetextflow [beta] [width=\rightedgewidth]
+%D \definetextflow [gamma] [width=\footerheight]
+%D
+%D \starttext
+%D
+%D \dorecurse{50}
+%D {\getrandomnumber{\funny}{0}{8}
+%D \ifcase\funny \starttextflow[alfa] \input tufte.tex \stoptextflow
+%D \or \starttextflow[beta] \input knuth.tex \stoptextflow
+%D \or \starttextflow[gamma] \input materie.tex \stoptextflow
+%D \or {\bf TUFTE}\quad \input tufte \par
+%D \or {\bf TUFTE}\quad \input tufte \par
+%D \or {\bf KNUTH}\quad \input knuth \par
+%D \or {\bf KNUTH}\quad \input knuth \par
+%D \or {\bf MATERIE}\quad \input materie \par
+%D \else {\bf MATERIE}\quad \input materie \par
+%D \fi}
+%D
+%D \stoptext
+%D \stoptyping
+
+\unprotect
+
+\installcorenamespace{textflow}
+\installcorenamespace{textflowbox}
+
+\installcommandhandler \??textflow {textflow} \??textflow
+
+\setuptextflow
+ [%c!style=,
+ %c!color=,
+ \c!width=\availablehsize]
+
+\appendtoks
+ \ifcsname\??textflowbox\currenttextflow\endcsname
+ \setbox\csname\??textflowbox\currenttextflow\endcsname\emptybox
+ \else
+ \expandafter\newbox\csname\??textflowbox\currenttextflow\endcsname
+ \fi
+\to \everydefinetextflow
+
+\newcount\b_page_textflow_box
+
+\permanent\def\textflowcollector#1%
+ {\begincsname\??textflowbox#1\endcsname}
+
+\permanent\protected\def\doifelsetextflowcollector#1%
+ {\ifcsname\??textflowbox#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\permanent\protected\def\doifelsetextflow#1%
+ {\unless\ifcsname\??textflowbox#1\endcsname
+ \expandafter\secondoftwoarguments
+ \orelse\ifvoid\csname\??textflowbox#1\endcsname
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\aliased\let\doiftextflowcollectorelse\doifelsetextflowcollector
+\aliased\let\doiftextflowelse \doifelsetextflow
+
+\permanent\protected\def\starttextflow[#1]%
+ {\begingroup
+ \edef\currenttextflow{#1}%
+ \ifcsname\??textflowbox\currenttextflow\endcsname
+ \b_page_textflow_box\csname\??textflowbox\currenttextflow\endcsname
+ \global\setbox\b_page_textflow_box\vbox
+ \bgroup
+ \dontcomplain
+ \ifvoid\b_page_textflow_box\else
+ \unvbox\b_page_textflow_box
+ \fi
+ \hsize\textflowparameter\c!width\relax
+ \usetextflowstyleandcolor\c!style\c!color
+ \enforced\permanent\protected\def\stoptextflow{\endgraf\egroup\endgroup}%
+ \else
+ \enforced\aliased\let\stoptextflow\endgroup
+ \fi}
+
+\aliased\let\stoptextflow\relax
+
+\permanent\protected\def\flushtextflow#1%
+ {\begingroup
+ \edef\currenttextflow{#1}%
+ \ifcsname\??textflowbox\currenttextflow\endcsname
+ \b_page_textflow_box\csname\??textflowbox\currenttextflow\endcsname
+ \ifvoid\b_page_textflow_box
+ % sorry
+ \orelse\ifdim\ht\b_page_textflow_box>\vsize
+ \setbox\scratchbox\vsplit\b_page_textflow_box to \vsize
+ \ifvoid\scratchbox\else
+ \unvbox\scratchbox
+ \fi
+ \else
+ \unvbox\b_page_textflow_box
+ \fi
+ \fi
+ \endgroup}
+
+\protect \endinput
+
+% \setuppapersize [A6]
+% \setupbodyfont [pagella, 12pt]
+%
+% \definetextflow [even] [width=\textwidth]
+% \definetextflow [odd] [width=\textwidth]
+%
+% \starttextflow [even] \dorecurse{15}{\input bryson} \stoptextflow
+% \starttextflow [odd] \dorecurse {5}{\input knuth } \stoptextflow
+%
+% \starttext
+%
+% \doloop {
+% \ifodd\realpageno
+% \doiftextflowelse{odd} {
+% \bgroup
+% \vsize\dimexpr\textheight-\strutdp\relax
+% \flushtextflow{odd}
+% \egroup
+% } {
+% \null
+% }
+% \page
+% \else
+% \doiftextflowelse{even} {
+% \bgroup
+% \vsize\dimexpr\textheight-\strutdp\relax
+% \flushtextflow{even}
+% \egroup
+% } {
+% \null
+% }
+% \page
+% \fi
+% \doiftextflowelse{even}\donothing{\doiftextflowelse{odd}\donothing\exitloop}
+% }
+%
+% \stoptext
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl
new file mode 100644
index 00000000000..4ee7c159be3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-imp.mkxl
@@ -0,0 +1,1404 @@
+%D \module
+%D [ file=page-imp, % was: core-pag,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Pagebody Building (Imposition),
+%D author=Hans Hagen & Willi Egger,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% much of this can more to run time loading !
+
+\writestatus{loading}{ConTeXt Page Macros / Pagebody Building}
+
+\unprotect
+
+%D \macros
+%D {starttextdata}
+%D
+%D This is a user macro (appending to every last shipout is not really user
+%D friendly).
+
+\newtoks\t_page_text_data
+
+\permanent\protected\def\starttextdata#1\stoptextdata
+ {\glet\page_shipouts_flush_text_data\page_shipouts_flush_text_data_indeed
+ \globaladdtotoks\t_page_text_data{#1}}
+
+\aliased\let\stoptextdata\relax
+
+\def\page_shipouts_flush_text_data_indeed
+ {\vsmashed{\the\t_page_text_data}%
+ \global\t_page_text_data\emptytoks
+ \glet\page_shipouts_flush_text_data\relax}
+
+\let\page_shipouts_flush_text_data\relax
+
+\prependtoks
+ \page_shipouts_flush_text_data
+\to \everylastshipout
+
+%D Problem: we need to apply the finalizers to a to be shipped out page (as we can
+%D have positioning involved). However, we can also add stuff in the imposition,
+%D like cropmarks. Fortunately we do that with metapost so colors etc are dealt with
+%D at that end.
+
+% \starttypen
+% \def\pagestoshipout{1,3,5}
+% \stoptypen
+
+\installcorenamespace{shipoutmethod}
+\installcorenamespace{layoutarranger}
+\installcorenamespace{layoutarrangeoption}
+
+\newcount \shippedoutpages
+\newcount \combinedpagescounter
+\newconstant \whichpagetoshipout % 0=all 1=odd 2=even
+\newbox \shipoutscratchbox
+\setnewconstant\shipoutfinalizemethod\plusone
+
+\mutable\let\pagestoshipout\empty % {1,3,6}
+
+\permanent\protected\def\shipoutrange#1#2%
+ {\begingroup
+ \scratchtoks\emptytoks
+ \dostepwiserecurse{#1}{\numexpr#2-\plusone\relax}\plusone{\etoksapp\scratchtoks{##1,}}%
+ \xdef\pagestoshipout{\the\scratchtoks,\number#2}%
+ \doglobal\appendtoks
+ \ifnum\realpageno>\numexpr#2+\plusone\relax
+ \global\everypar{\normalend}%
+ \fi
+ \to\everyaftershipout
+ \endgroup}
+
+\permanent\protected\def\installshipoutmethod#1#2% % a handler takes one argument: something to be boxed
+ {\gdefcsname\??shipoutmethod#1\endcsname##1{#2{##1}}} % and shipped out (don't depend on the exact package)
+
+\aliased\let\installpagehandler\installshipoutmethod % will go
+
+\permanent\protected\def\invokepagehandler#1%
+ {\expandnamespacevalue\??shipoutmethod{#1}\v!normal}
+
+\def\page_shipouts_handle
+ {\ifcsname\??shipoutmethod\v_page_target_method\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\page_shipouts_ignore
+ \fi}
+
+\installshipoutmethod \v!normal
+ {\ifarrangingpages
+ \expandafter\page_shipouts_arrange
+ \else
+ \expandafter\page_shipouts_normal
+ \fi}
+
+\installshipoutmethod \v!none
+ {\page_shipouts_ignore}
+
+% extension mechanism
+
+\newcount\c_page_boxes_flush_n % set at the lua end
+
+\let\page_boxes_flush_before\relax
+\let\page_boxes_flush_after \relax
+
+% used here:
+
+\def\page_boxes_shipout#1% or: \page_shipouts_apply
+ {\dontcomplain % redundant
+ \ifcase\c_page_boxes_flush_n\else
+ \page_boxes_flush_before
+ \fi
+ \the\everybeforeshipout
+ \ifcase\shipoutfinalizemethod % not nice ... needs thinking
+ \page_shipouts_handle{#1}%
+ \else
+ \setbox\shipoutscratchbox\hpack
+ {#1}% just in case there are objects there, hook for testing (will go away)
+ \page_shipouts_handle
+ {\finalizeshipoutbox\shipoutscratchbox
+ \box\shipoutscratchbox}%
+ \fi
+ \setnextrealpageno % so this comes before \everyaftershipout so in fact:
+ \the\everyaftershipout % at this point we're already on the next realpage
+ \ifcase\c_page_boxes_flush_n\else
+ \page_boxes_flush_after
+ \fi}
+
+\def\page_shipouts_ignore#1%
+ {\begingroup
+ \writestatus\m!system
+ {\ifarrangingpages arranged \fi page
+ \ifarrangingpages\the\arrangeno\else\the\realpageno\fi\normalspace
+ not flushed}%
+ % \setbox\scratchbox\hpack
+ % {#1}% no finalize
+ \deadcycles\zerocount
+ \endgroup}
+
+\def\page_otr_flush_every_stuff
+ {\begingroup
+ \setbox\scratchbox\hpack
+ {% before the main one !
+ \ifcase\realfolio \or
+ \the\everyfirstshipout
+ \global\everyfirstshipout\emptytoks
+ \fi
+ % the main one
+ \the\everyshipout\relax
+ % always last (and after the main one)
+ \ifnum\realpageno=\lastpage\relax
+ \the\everylastshipout
+ \global\everylastshipout\emptytoks
+ \fi}%
+ \smashbox\scratchbox
+ \box\scratchbox
+ \endgroup}
+
+%D Also in normal \MKIV\ we nos use the indirect way so that we benefit from timing
+%D and tracing.
+
+\def\page_shipout_show_box{\showbox diagnose}
+
+\protected\def\page_shipout_box#1%
+ {\ifcase\tracingoutput\else
+ \page_shipout_show_box#1\relax
+ \fi
+ \clf_shipoutpage#1\relax
+ \global\setbox#1\emptybox
+ \global\deadcycles\zerocount}
+
+\def\page_shipouts_normal#1%
+ {\global\advance\shippedoutpages\plusone
+ % this is not resource safe!
+ \ifempty\pagestoshipout
+ \ifcase\whichpagetoshipout\relax
+ \donetrue
+ \or % 1
+ \ifodd\shippedoutpages\relax\donetrue\else\donefalse\fi
+ \or % 2
+ \ifodd\shippedoutpages\relax\donefalse\else\donetrue\fi
+ \else
+ \donetrue
+ \fi
+ \else % testen, aangepast / expanded nodig ?
+ \normalexpanded{\doifelseinset{\the\shippedoutpages}{\pagestoshipout}}\donetrue\donefalse
+ \fi
+ \ifdone
+ \setbox\shipoutscratchbox\hpack
+ {#1}% finalizes
+ \ifcase\shipoutfinalizemethod
+ \finalizeshipoutbox\shipoutscratchbox
+ \fi
+ \setbox\shipoutscratchbox\vpack
+ {\hpack
+ {\page_otr_flush_every_stuff
+ \page_otr_flush_special_content
+ \box\shipoutscratchbox}}%
+ \page_shipout_box\shipoutscratchbox % takes a box number!
+ \else
+ \page_shipouts_ignore{#1}%
+ \fi}
+
+\newconditional\c_page_shipouts_use_objects \settrue\c_page_shipouts_use_objects
+
+\installcorenamespace {arrangedpage}
+
+\def\page_shipouts_arrange#1%
+ {\begingroup
+ \setbox\shipoutscratchbox\hpack
+ {#1}% finalizes
+ \setbox\shipoutscratchbox\hpack
+ {\page_otr_flush_every_stuff
+ \page_otr_flush_special_content
+ \box\shipoutscratchbox}%
+ %
+ \ifconditional\c_page_shipouts_use_objects
+ \setobject\??arrangedpage{\the\realpageno}\hpack{\box\shipoutscratchbox}%
+ \setbox\shipoutscratchbox\hpack{\getobject\??arrangedpage{\the\realpageno}}%
+ \fi
+ %
+ \pusharrangedpage\shipoutscratchbox
+ \deadcycles\zerocount
+ \endgroup}
+
+%D We need a couple of boxes for duplex printing \unknown
+
+\newbox\arrangedpageA \newbox\arrangedpageB
+\newbox\arrangedpageC \newbox\arrangedpageD
+\newbox\arrangedpageE \newbox\arrangedpageF
+\newbox\arrangedpageG \newbox\arrangedpageH
+
+\newconditional\arrangedswapstate
+\newconditional\arrangednegatestate
+\newconditional\arrangedmirrorstate
+\newconditional\arrangeddoublestate
+\newconditional\arrangingdisabledstate
+\newconditional\arrangedbackgroundstate
+
+\mutable\def\arrangedrotationO{0}
+\mutable\def\arrangedrotationE{0}
+
+\newcount\arrangedpageN
+\newcount\arrangedpageM
+
+\newcount\arrangedpageT \arrangedpageT\plusone
+\newcount\arrangedpageX \arrangedpageX\plusone
+\newcount\arrangedpageY \arrangedpageY\plusone
+
+\def\page_paper_set_offsets
+ {\global\paperoffset\v_page_target_offset
+ \global\advance\paperwidth -2\dimexpr\paperoffset/\arrangedpageX\relax
+ \global\advance\paperheight-2\dimexpr\paperoffset/\arrangedpageY\relax}
+
+\permanent\protected\def\doinstallarrangedoption#1#2%
+ {\gdefcsname\??layoutarrangeoption#1\endcsname{#2}}
+
+\permanent\def\doinstalledarrangedoption#1%
+ {\ifcsname\??layoutarrangeoption#1\endcsname
+ \lastnamedcs
+ \else
+ \checkinstalledpagearrangement{#1}% this installs the arranger
+ \fi}
+
+\doinstallarrangedoption\empty
+ {} % no default and check if empty, we can have ,,,
+
+\doinstallarrangedoption\v!disable
+ {\global\settrue\arrangingdisabledstate}
+
+\doinstallarrangedoption\v!mirrored
+ {\global\settrue\arrangedmirrorstate}
+
+\doinstallarrangedoption\v!doublesided
+ {\global\settrue\arrangeddoublestate}
+
+\doinstallarrangedoption\v!negative
+ {\global\settrue\arrangednegatestate}
+
+\doinstallarrangedoption\v!rotated
+ {\gdef\arrangedrotationO {90}%
+ \gdef\arrangedrotationE{270}%
+ \swapcounts\c_page_marks_nx\c_page_marks_ny}
+
+\doinstallarrangedoption{90}
+ {\gdef\arrangedrotationO {90}%
+ \gdef\arrangedrotationE{270}%
+ \swapcounts\c_page_marks_nx\c_page_marks_ny}
+
+\doinstallarrangedoption{180}
+ {\gdef\arrangedrotationO{180}%
+ \gdef\arrangedrotationE {0}}
+
+\doinstallarrangedoption{270}
+ {\gdef\arrangedrotationO{270}%
+ \gdef\arrangedrotationE {90}%
+ \swapcounts\c_page_marks_nx\c_page_marks_ny}
+
+\doinstallarrangedoption\s!reset
+ {\global\arrangingpagesfalse}
+
+\doinstallarrangedoption\v!background
+ {\global\settrue\arrangedbackgroundstate}
+
+\aliased\let\poparrangedpages \relax
+\aliased\let\pusharrangedpage \gobbleoneargument
+\aliased\let\handlearrangedpage\relax
+
+\permanent\protected\def\setuparranging[#1]%
+ {\ifconditional\arrangingdisabledstate \else
+ %global\setfalse\arrangingdisabledstate
+ \global\arrangingpagestrue % will be conditional
+ \global\setfalse\arrangednegatestate
+ \global\setfalse\arrangedmirrorstate
+ \global\setfalse\arrangeddoublestate
+ \global\setfalse\arrangedswapstate
+ \gdef\arrangedrotationO{0}%
+ \gdef\arrangedrotationE{180}%
+ % if we use --arrange we have an initial "disable" here
+ \processcommalist[#1]\doinstalledarrangedoption
+ \ifrelax\poparrangedpages
+ \global\arrangingpagesfalse % nothing set yet
+ \fi
+ \setuppapersize
+ \ifarrangingpages
+ \ifconditional\c_page_shipouts_use_objects\else
+ \clf_disablejobsave
+ \clf_synctexdisable
+ %\disabledirective[job.save]%
+ \fi
+ \fi
+ \fi}
+
+\permanent\protected\def\installpagearrangement #1 % will change, no space
+ {\gdefcsname\??layoutarranger#1\endcsname}
+
+\permanent\def\checkinstalledpagearrangement#1% can be empty: aaa,,bbb
+ {\begincsname\??layoutarranger#1\endcsname}
+
+\permanent\protected\def\dosetuparrangement#1#2#3#4#5#6#7#8%
+ {\global\arrangedpageX #1%
+ \global\arrangedpageY #2%
+ \global\arrangedpageT #3%
+ \global\c_page_marks_nx#4%
+ \global\c_page_marks_ny#5%
+ \enforced\glet\pusharrangedpage #6%
+ \enforced\glet\poparrangedpages #7%
+ \enforced\glet\handlearrangedpage#8}
+
+\installpagearrangement {\v!normal}
+ {\global\arrangingpagesfalse}
+
+%D (WS:) Watch out with 2UP and A4/A5:
+%D
+%D \definepapersize [A4] [width=210mm,height=297mm]
+%D \definepapersize [A5] [width=148mm,height=210mm]
+%D
+%D 297 mm - 2 * 148 mm = 1 mm
+%D
+%D This is only visible when we have a full background.
+
+\installpagearrangement 2*16
+ {\dosetuparrangement{4}{4}{16}{5}{5}%
+ \pusharrangedpageTHIRTYTWO\poparrangedpagesAB\relax}
+
+\installpagearrangement 2*8
+ {\dosetuparrangement{4}{2}{8}{5}{3}%
+ \pusharrangedpageSIXTEEN\poparrangedpagesAB\relax}
+
+\installpagearrangement 2*4
+ {\dosetuparrangement{2}{2}{4}{3}{3}%
+ \pusharrangedpageEIGHT\poparrangedpagesAB\relax}
+
+\installpagearrangement 2*2
+ {\dosetuparrangement{2}{1}{2}{3}{2}%
+ \pusharrangedpageFOURA\poparrangedpagesAB\relax}
+
+\installpagearrangement 2**2
+ {\dosetuparrangement{2}{1}{2}{3}{2}%
+ \pusharrangedpageFOURB\poparrangedpagesAB\relax}
+
+\installpagearrangement 2SIDE
+ {\dosetuparrangement{2}{1}{2}{3}{2}%
+ \pusharrangedpageSIDETOP\poparrangedpagesTWO\handlearrangedpageSIDE}
+
+\installpagearrangement 2TOP
+ {\dosetuparrangement{1}{2}{2}{2}{3}%
+ \pusharrangedpageSIDETOP\poparrangedpagesTWO\handlearrangedpageTOP}
+
+\installpagearrangement 2UP
+ {\dosetuparrangement{2}{1}{4}{3}{2}%
+ \pusharrangedpageTWO\poparrangedpagesTWO\handlearrangedpageTWOUP}
+
+\installpagearrangement 2DOWN
+ {\dosetuparrangement{1}{2}{4}{2}{3}%
+ \pusharrangedpageTWO\poparrangedpagesTWO\handlearrangedpageTWODOWN}
+
+\installpagearrangement 2*4*2 % one defined by Willy Egger:
+ {\dosetuparrangement{2}{2}{4}{3}{3}%
+ \pusharrangedpageSIXTEENTWO\poparrangedpagesAtoD\relax}
+
+\installpagearrangement 2*2*4 % another one of Willy Egger
+ {\dosetuparrangement{2}{1}{8}{3}{2}%
+ \pusharrangedpageSIXTEENFOUR\poparrangedpagesAtoH\relax}
+
+\installpagearrangement 2TOPSIDE
+ {\dosetuparrangement{1}{2}{4}{2}{3}%
+ \pusharrangedpageTWOTOPSIDE\poparrangedpagesTWOTOPSIDE\handlearrangedpageTOP}
+
+\permanent\protected\def\filluparrangedpages % beware: \realpageno is 1 ahead
+ {\ifarrangingpages
+ \scratchcounter\numexpr\realpageno-\plusone\relax
+ \dosetmodulo\scratchcounter\arrangedpageT\scratchcounter
+ \ifcase\scratchcounter\else
+ \advance\scratchcounter \plusone
+ \dostepwiserecurse\scratchcounter\arrangedpageT\plusone
+ {\noheaderandfooterlines\page_otr_insert_dummy_page}%
+ \fi
+ \fi}
+
+\permanent\protected\def\handlearrangedpageXandY#1#2#3#4#5%
+ {\global\setbox#5\hpack to \arrangedpageX\paperwidth
+ {\setbox\scratchbox\vpack to \arrangedpageY\paperheight
+ {\offinterlineskip
+ \vskip#4\paperheight
+ \hskip#3\paperwidth
+ \dorotatebox{\ifcase#2 0\else180\fi}\hpack{\box#1}%
+ \vfill}%
+ \wd\scratchbox\zeropoint
+ \box\scratchbox\box#5\hss}}
+
+\permanent\protected\def\gotonextarrangepage
+ {\global\advance\arrangeno\plusone}
+
+\permanent\protected\def\outputarrangedbox#1%
+ {\begingroup
+ \forgetall % somehow we're back and need to redo this
+ \dontcomplain
+ \gotonextarrangepage
+ \ifnum\arrangedrotationO\arrangedrotationE>\zerocount
+ \setbox#1\vpack
+ {\ifconditional\arrangeddoublestate
+ \ifodd\arrangeno
+ \dorotatebox\arrangedrotationO\hpack{\box#1}%
+ \else
+ \dorotatebox\arrangedrotationE\hpack{\box#1}%
+ \fi
+ \else
+ \dorotatebox\arrangedrotationO\hpack{\box#1}%
+ \fi}%
+ \fi
+ \ifconditional\arrangedmirrorstate
+ \page_boxes_apply_mirror{#1}%
+ \fi
+ \ifconditional\arrangednegatestate
+ \page_boxes_apply_negate{#1}%
+ \fi
+ \page_marks_add_more #1%
+ \page_boxes_apply_center #1%
+ \page_boxes_apply_mirror_print #1%
+ \page_boxes_apply_orientate_print#1%
+ \page_boxes_apply_offset #1%
+ \page_boxes_apply_negate_print #1%
+ %
+ \ifconditional\arrangedbackgroundstate
+ \page_backgrounds_add_to_print#1%
+ \fi
+ %
+ \page_shipouts_normal{\box#1}%
+ \endgroup}
+
+%D The format file can be 16K smaller when we postpone the
+%D real arrangments. Some day ...
+
+\permanent\protected\def\reportarrangedpage#1%
+ {\showmessage\m!system{23}{\the\realpageno.\the\pageno\ifnum\subpageno>0 .\the\subpageno\fi,\number#1}}
+
+\permanent\protected\def\advancearrangedpageN
+ {\global\advance\arrangedpageN\plusone}
+
+% TOP
+
+% 32/16/8/4/SIDE
+
+\permanent\protected\def\poparrangedpagesAB
+ {\ifnum\arrangedpageN>\zerocount
+ \paperwidth\arrangedpageX\paperwidth
+ \paperheight\arrangedpageY\paperheight
+ \outputarrangedbox\arrangedpageA
+ \outputarrangedbox\arrangedpageB
+ \global\arrangedpageN\zerocount
+ \fi}
+
+\permanent\protected\def\pusharrangedpageTHIRTYTWO#1% taco's challenge
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}033\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}003\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}100\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}130\arrangedpageA % 4
+ \or \handlearrangedpageXandY{#1}100\arrangedpageA % 5
+ \or \handlearrangedpageXandY{#1}130\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}033\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}003\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}102\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}132\arrangedpageB % 10
+ \or \handlearrangedpageXandY{#1}031\arrangedpageB % 11
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 12
+ \or \handlearrangedpageXandY{#1}031\arrangedpageA % 13
+ \or \handlearrangedpageXandY{#1}001\arrangedpageB % 14
+ \or \handlearrangedpageXandY{#1}102\arrangedpageB % 15
+ \or \handlearrangedpageXandY{#1}132\arrangedpageA % 16
+ \or \handlearrangedpageXandY{#1}122\arrangedpageA % 17
+ \or \handlearrangedpageXandY{#1}112\arrangedpageB % 18
+ \or \handlearrangedpageXandY{#1}011\arrangedpageB % 19
+ \or \handlearrangedpageXandY{#1}021\arrangedpageA % 20
+ \or \handlearrangedpageXandY{#1}011\arrangedpageA % 21
+ \or \handlearrangedpageXandY{#1}021\arrangedpageB % 22
+ \or \handlearrangedpageXandY{#1}122\arrangedpageB % 23
+ \or \handlearrangedpageXandY{#1}112\arrangedpageA % 24
+ \or \handlearrangedpageXandY{#1}013\arrangedpageA % 25
+ \or \handlearrangedpageXandY{#1}023\arrangedpageB % 26
+ \or \handlearrangedpageXandY{#1}120\arrangedpageB % 27
+ \or \handlearrangedpageXandY{#1}110\arrangedpageA % 28
+ \or \handlearrangedpageXandY{#1}120\arrangedpageA % 29
+ \or \handlearrangedpageXandY{#1}110\arrangedpageB % 30
+ \or \handlearrangedpageXandY{#1}013\arrangedpageB % 31
+ \or \handlearrangedpageXandY{#1}023\arrangedpageA % 32
+ \poparrangedpages
+ \fi}
+
+\permanent\protected\def\pusharrangedpageSIXTEEN#1% changed to match the official way of doing
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}031\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}001\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}031\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 4
+ \or \handlearrangedpageXandY{#1}100\arrangedpageA % 5
+ \or \handlearrangedpageXandY{#1}130\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}100\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}130\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}120\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}110\arrangedpageB % 10
+ \or \handlearrangedpageXandY{#1}120\arrangedpageB % 11
+ \or \handlearrangedpageXandY{#1}110\arrangedpageA % 12
+ \or \handlearrangedpageXandY{#1}011\arrangedpageA % 13
+ \or \handlearrangedpageXandY{#1}021\arrangedpageB % 14
+ \or \handlearrangedpageXandY{#1}011\arrangedpageB % 15
+ \or \handlearrangedpageXandY{#1}021\arrangedpageA % 16
+ \poparrangedpages
+ \fi}
+
+\permanent\protected\def\pusharrangedpageEIGHT#1% changed to match the official way of doing
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}011\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}001\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}100\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}110\arrangedpageA % 4
+ \or \handlearrangedpageXandY{#1}100\arrangedpageA % 5
+ \or \handlearrangedpageXandY{#1}110\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}011\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 8
+ \poparrangedpages
+ \fi}
+
+\permanent\protected\def\pusharrangedpageFOURA{\pusharrangedpageFOURdo01}
+\permanent\protected\def\pusharrangedpageFOURB{\pusharrangedpageFOURdo10}
+
+\permanent\protected\def\pusharrangedpageFOURdo#1#2#3%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#3}010\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#3}0{#1}0\arrangedpageB % 2/3 not {1}
+ \or \handlearrangedpageXandY{#3}0{#2}0\arrangedpageB % 3/2 not {1}
+ \or \handlearrangedpageXandY{#3}000\arrangedpageA % 4
+ \poparrangedpages
+ \fi}
+
+\permanent\protected\def\pusharrangedpageSIDETOP#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \poparrangedpages
+ \fi}
+
+\permanent\protected\def\handlearrangedpageSIDE
+ {\wd\arrangedpageA\paperwidth
+ \wd\arrangedpageB\paperwidth
+ \global\setbox\arrangedpageA\hpack
+ {\box\arrangedpageA\box\arrangedpageB}%
+ \ht\arrangedpageA\paperheight}
+
+\permanent\protected\def\handlearrangedpageTOP
+ {\ht\arrangedpageA\paperheight
+ \ht\arrangedpageB\paperheight
+ \global\setbox\arrangedpageA\vpack
+ {\offinterlineskip\vskip\paperheight
+ \box\arrangedpageA\box\arrangedpageB}%
+ \global\setbox\arrangedpageB\box\scratchbox} % ?
+
+% 2UP/2DOWN / 1pt prevents overflow
+
+\permanent\protected\def\splitoffarrangedpagesTWO
+ {\splittopskip\zeropoint
+ \global\setbox\arrangedpageA\vsplit\arrangedpageB to \onepoint
+ \scratchdimen\dimexpr\ht\arrangedpageB-\onepoint\relax
+ \ifdim\scratchdimen>\onepoint
+ \setbox\scratchbox\vsplit\arrangedpageB to \scratchdimen
+ \fi}
+
+\permanent\protected\def\handlearrangedpageTWOUP
+ {\splitoffarrangedpagesTWO
+ \ht\arrangedpageA\paperheight
+ \ht\arrangedpageB\paperheight
+ \ifconditional\arrangedswapstate
+ \global\setbox\arrangedpageA\hpack
+ {\page_boxes_apply_clip_print_left \arrangedpageA
+ \box\arrangedpageA
+ \page_boxes_apply_clip_print_right\arrangedpageB
+ \box\arrangedpageB}%
+ \setfalse\arrangedswapstate
+ \else
+ \global\setbox\arrangedpageA\hpack
+ {\page_boxes_apply_clip_print_left \arrangedpageB
+ \box\arrangedpageB
+ \page_boxes_apply_clip_print_right\arrangedpageA
+ \box\arrangedpageA}%
+ \settrue\arrangedswapstate
+ \fi
+ \global\setbox\arrangedpageB\box\scratchbox}
+
+\permanent\protected\def\handlearrangedpageTWODOWN
+ {\splitoffarrangedpagesTWO
+ \ht\arrangedpageA\paperheight
+ \ht\arrangedpageB\paperheight
+ \ifconditional\arrangedswapstate
+ \global\setbox\arrangedpageA\vpack
+ {\offinterlineskip
+ \vskip\paperheight
+ \box\arrangedpageA
+ \box\arrangedpageB}%
+ \setfalse\arrangedswapstate
+ \else
+ \global\setbox\arrangedpageA\vpack
+ {\offinterlineskip
+ \vskip\paperheight
+ \box\arrangedpageB
+ \box\arrangedpageA}%
+ \settrue\arrangedswapstate
+ \fi
+ \global\setbox\arrangedpageB\box\scratchbox}
+
+\permanent\protected\def\poparrangedpagesTWO
+ {\ifnum\arrangedpageN>\zerocount
+ \setfalse\arrangedswapstate
+ \doloop
+ {\handlearrangedpage
+ \bgroup
+ \paperwidth \arrangedpageX\paperwidth
+ \paperheight\arrangedpageY\paperheight
+ \ht\arrangedpageA\paperheight
+ \wd\arrangedpageA\paperwidth
+ \outputarrangedbox\arrangedpageA
+ \egroup
+ \ifdim\ht\arrangedpageB=\zeropoint
+ \exitloop
+ \fi}%
+ \global\arrangedpageN\zerocount
+ \fi}
+
+\permanent\protected\def\pusharrangedpageTWO#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \global\setbox\arrangedpageB\vpack
+ {\offinterlineskip
+ \unvbox\arrangedpageB
+ \allowbreak
+ \setbox#1\vpack{\box#1}% really needed in order to keep real dimensions
+ \ht#1\onepoint
+ \dp#1\zeropoint
+ \vpack{\box#1}}}
+
+\permanent\protected\def\poparrangedpagesTWOTOPSIDE
+ {\ifnum\arrangedpageN>\zerocount
+ \bgroup
+ \global\arrangedpageN\plustwo
+ \poparrangedpagesTWO
+ \let\arrangedpageA\arrangedpageC
+ \let\arrangedpageB\arrangedpageD
+ \global\arrangedpageN\plustwo
+ \poparrangedpagesTWO
+ \global\arrangedpageN\zerocount
+ \egroup
+ \fi}
+
+\permanent\protected\def\pusharrangedpageTWOTOPSIDE#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}000\arrangedpageC % 2
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 1
+ \or \handlearrangedpageXandY{#1}000\arrangedpageD % 2
+ \poparrangedpages
+ \fi}
+
+%D Willy Egger's sheet simulations:
+
+\permanent\protected\def\poparrangedpagesAtoH
+ {\ifnum\arrangedpageN>\zerocount
+ \paperwidth \arrangedpageX\paperwidth
+ \paperheight\arrangedpageY\paperheight
+ \outputarrangedbox\arrangedpageA
+ \outputarrangedbox\arrangedpageB
+ \outputarrangedbox\arrangedpageC
+ \outputarrangedbox\arrangedpageD
+ \outputarrangedbox\arrangedpageE
+ \outputarrangedbox\arrangedpageF
+ \outputarrangedbox\arrangedpageG
+ \outputarrangedbox\arrangedpageH
+ \global\arrangedpageN\zerocount
+ \fi}
+
+% to arrange 16 pages on 2 sheets to form one booklet
+
+\permanent\protected\def\poparrangedpagesAtoD
+ {\ifnum\arrangedpageN>\zerocount
+ \paperwidth\arrangedpageX\paperwidth
+ \paperheight\arrangedpageY\paperheight
+ \outputarrangedbox\arrangedpageA
+ \outputarrangedbox\arrangedpageB
+ \outputarrangedbox\arrangedpageC
+ \outputarrangedbox\arrangedpageD
+ \global\arrangedpageN\zerocount
+ \fi}
+
+% to arrange 16 pages on 4 sheets to form one booklet
+
+\permanent\protected\def\pusharrangedpageSIXTEENFOUR#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}010\arrangedpageC % 3
+ \or \handlearrangedpageXandY{#1}000\arrangedpageD % 4
+ \or \handlearrangedpageXandY{#1}010\arrangedpageE % 5
+ \or \handlearrangedpageXandY{#1}000\arrangedpageF % 6
+ \or \handlearrangedpageXandY{#1}010\arrangedpageG % 7
+ \or \handlearrangedpageXandY{#1}000\arrangedpageH % 8
+ \or \handlearrangedpageXandY{#1}010\arrangedpageH % 9
+ \or \handlearrangedpageXandY{#1}000\arrangedpageG % 10
+ \or \handlearrangedpageXandY{#1}010\arrangedpageF % 11
+ \or \handlearrangedpageXandY{#1}000\arrangedpageE % 12
+ \or \handlearrangedpageXandY{#1}010\arrangedpageD % 13
+ \or \handlearrangedpageXandY{#1}000\arrangedpageC % 14
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 15
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 16
+ \poparrangedpages
+ \fi}
+
+% to arrange 16 pages on 2 sheets to form one booklet
+
+\permanent\protected\def\pusharrangedpageSIXTEENTWO#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}011\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}001\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}011\arrangedpageC % 3
+ \or \handlearrangedpageXandY{#1}001\arrangedpageD % 4
+ \or \handlearrangedpageXandY{#1}100\arrangedpageD % 5
+ \or \handlearrangedpageXandY{#1}110\arrangedpageC % 6
+ \or \handlearrangedpageXandY{#1}100\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}110\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}100\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}110\arrangedpageB % 10
+ \or \handlearrangedpageXandY{#1}100\arrangedpageC % 11
+ \or \handlearrangedpageXandY{#1}110\arrangedpageD % 12
+ \or \handlearrangedpageXandY{#1}011\arrangedpageD % 13
+ \or \handlearrangedpageXandY{#1}001\arrangedpageC % 14
+ \or \handlearrangedpageXandY{#1}011\arrangedpageB % 15
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 16
+ \poparrangedpages
+ \fi}
+
+%D Might be used if a printer is printing from a roll or creating mini-books from A4:
+%D This section has 16 pages. The folding scheme is first a Z-fold and at the end
+%D a final fold in the spine.
+%D Coding: [2*8*Z]
+
+\installpagearrangement 2*8*Z
+ {\dosetuparrangement{2}{4}{8}{3}{5}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageSIXTEENZ\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageSIXTEENZ#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}101\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}111\arrangedpageA % 4
+ \or \handlearrangedpageXandY{#1}012\arrangedpageA % 5
+ \or \handlearrangedpageXandY{#1}002\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}103\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}113\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}103\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}113\arrangedpageB % 10
+ \or \handlearrangedpageXandY{#1}012\arrangedpageB % 11
+ \or \handlearrangedpageXandY{#1}002\arrangedpageA % 12
+ \or \handlearrangedpageXandY{#1}101\arrangedpageA % 13
+ \or \handlearrangedpageXandY{#1}111\arrangedpageB % 14
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 15
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 16
+ \poparrangedpages
+ \fi}
+
+%D Another Z-folded section with 12 pages
+%D Coding: [2*6*Z]
+
+\installpagearrangement 2*6*Z
+ {\dosetuparrangement{2}{3}{6}{3}{4}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageTWELVEZ\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageTWELVEZ#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1: rotation (0=upright),x (0=first column),y (0=first row)
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}101\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}111\arrangedpageA % 4
+ \or \handlearrangedpageXandY{#1}012\arrangedpageA % 5
+ \or \handlearrangedpageXandY{#1}002\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}012\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}002\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}101\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}111\arrangedpageB % 10
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 11
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 12
+ \poparrangedpages
+ \fi}
+
+%D For Heinz' special greeting cards folding. This scheme is also used for the PocketDiary (module):
+%D Coding: [1*8]
+
+\installpagearrangement 1*8
+ {\dosetuparrangement{4}{2}{8}{5}{3}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageEIGHTSINGLESIDEDFOLDED\poparrangedpagesTWO\relax}
+
+\permanent\protected\def\pusharrangedpageEIGHTSINGLESIDEDFOLDED#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 2
+ \or \handlearrangedpageXandY{#1}030\arrangedpageA % 3
+ \or \handlearrangedpageXandY{#1}131\arrangedpageA % 4
+ \or \handlearrangedpageXandY{#1}121\arrangedpageA % 5
+ \or \handlearrangedpageXandY{#1}111\arrangedpageA % 6
+ \or \handlearrangedpageXandY{#1}101\arrangedpageA % 7
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 8
+ \poparrangedpages
+ \fi}
+
+%D This is not a section. \CONTEXT\ places 4 pages on a sheet of paper, singlesided
+%D Coding: [1*4]
+
+\installpagearrangement 1*4
+ {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageFOURSINGLESIDEDFOLDED\poparrangedpagesTWO\relax}
+
+\permanent\protected\def\pusharrangedpageFOURSINGLESIDEDFOLDED#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}100\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 2
+ \or \handlearrangedpageXandY{#1}011\arrangedpageA % 3
+ \or \handlearrangedpageXandY{#1}110\arrangedpageA % 4
+ \poparrangedpages
+ \fi}
+
+%D This imposition scheme was requested by Hraban Ramm, by Willi Egger 21-07-2003
+%D Coding: [3SIDE]
+
+\installpagearrangement 3SIDE
+ {\dosetuparrangement{3}{1}{3}{4}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageTHREESIDE\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageTHREESIDE#1% Willi's approach
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 2
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 3
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 4
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 5
+ \or \handlearrangedpageXandY{#1}020\arrangedpageB % 6
+ \poparrangedpages
+ \fi}
+
+%D FLYER in three parts and 6 pages 22-10-2010
+%D Coding: [TRYPTICHON]
+
+\installpagearrangement TRYPTICHON
+ {\dosetuparrangement{3}{1}{3}{4}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageFLYERSIX\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageFLYERSIX#1% Willi's approach
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}020\arrangedpageB % 4
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 5
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 6
+ \poparrangedpages
+ \fi}
+
+%D FLYER in Z-fold with 8 pages 22-01-2010
+%D Coding: [ZFLYER-8]
+
+\installpagearrangement ZFLYER-8
+ {\dosetuparrangement{4}{1}{4}{5}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageZFLYEREIGHT\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageZFLYEREIGHT#1% Willi's approach
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}030\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}020\arrangedpageB % 4
+ \or \handlearrangedpageXandY{#1}030\arrangedpageB % 5
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 6
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 7
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 8
+ \poparrangedpages
+ \fi}
+
+%D FLYER in Z-fold with 10 pages 04-08-2010
+%D Coding: [ZFLYER-10]
+
+\installpagearrangement ZFLYER-10
+ {\dosetuparrangement{5}{1}{5}{6}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageZFLYERTEN\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageZFLYERTEN#1% Willi's approach
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}040\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}020\arrangedpageB % 4
+ \or \handlearrangedpageXandY{#1}030\arrangedpageB % 5
+ \or \handlearrangedpageXandY{#1}040\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 7
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}030\arrangedpageA % 10
+ \poparrangedpages
+ \fi}
+
+%D FLYER in Z-fold with 12 pages 04-08-2010
+%D Coding: [ZFLYER-12]
+
+\installpagearrangement ZFLYER-12
+ {\dosetuparrangement{6}{1}{6}{7}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageZFLYERTWELVE\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageZFLYERTWELVE#1% Willi's approach
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}050\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}020\arrangedpageB % 4
+ \or \handlearrangedpageXandY{#1}030\arrangedpageB % 5
+ \or \handlearrangedpageXandY{#1}040\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}050\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 10
+ \or \handlearrangedpageXandY{#1}030\arrangedpageA % 11
+ \or \handlearrangedpageXandY{#1}040\arrangedpageA % 12
+ \poparrangedpages
+ \fi}
+
+%D FLYER folded as a map with 6 pages per side.
+%D Coding: [MAPFLYER-12]
+
+\installpagearrangement MAPFLYER-12
+ {\dosetuparrangement{3}{2}{6}{4}{3}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageMFLYERTWELVE\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageMFLYERTWELVE#1% Willi's approach
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}001\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 4
+ \or \handlearrangedpageXandY{#1}011\arrangedpageB % 5
+ \or \handlearrangedpageXandY{#1}020\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}021\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 8
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 9
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 10
+ \or \handlearrangedpageXandY{#1}011\arrangedpageA % 11
+ \or \handlearrangedpageXandY{#1}021\arrangedpageA % 12
+ \poparrangedpages
+ \fi}
+
+%D FLYER folded as double window with 4 pages per side.
+%D Coding: [DOUBLEWINDOW]
+
+\installpagearrangement DOUBLEWINDOW
+ {\dosetuparrangement{4}{1}{4}{5}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageDOUBLEWINDOWEIGHT\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageDOUBLEWINDOWEIGHT#1% Willi's approach
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}020\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}030\arrangedpageA % 2
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 4
+ \or \handlearrangedpageXandY{#1}020\arrangedpageB % 5
+ \or \handlearrangedpageXandY{#1}030\arrangedpageB % 6
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 7
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 8
+ \poparrangedpages
+ \fi}
+
+%D Imposition as requested by Jan Pohanka 26-08-2010, 4 pages, two verso, two recto,
+%D uneven pages upright and down, even pages top and rotated 180.
+%D Implementation with 2 pages for conference-name-display
+%D Coding: [1*2-Conference]
+
+\installpagearrangement 1*2-Conference
+ {\dosetuparrangement{1}{2}{4}{3}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageCONFERENCETWO\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageCONFERENCETWO#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}100\arrangedpageA % 2
+ \poparrangedpages
+ \fi}
+
+%D Implementation with 4 pages for conference-name-display
+%D Coding: [1*4-Conference]
+
+\installpagearrangement 1*4-Conference
+ {\dosetuparrangement{1}{2}{4}{3}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageCONFERENCEFOUR\poparrangedpagesAB\relax}
+
+\permanent\protected\def\pusharrangedpageCONFERENCEFOUR#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}001\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}100\arrangedpageA % 2
+ \or \handlearrangedpageXandY{#1}011\arrangedpageB % 3
+ \or \handlearrangedpageXandY{#1}110\arrangedpageB % 4
+ \poparrangedpages
+ \fi}
+
+%D There should be arrangements for sections made of heavy and thick paper. i.e. the heavier the paper
+%D the fewer pages per section:
+%D Section with 8 pages put on two sheets of paper. Each sheet carries recto 2 and verso 2 pages.
+%D Coding: [2*2*2]
+
+\installpagearrangement 2*2*2
+ {\dosetuparrangement{2}{1}{2}{3}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageEIGHTTWO\poparrangedpagesAtoD\relax}
+
+\permanent\protected\def\pusharrangedpageEIGHTTWO#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}010\arrangedpageC % 3
+ \or \handlearrangedpageXandY{#1}000\arrangedpageD % 4
+ \or \handlearrangedpageXandY{#1}010\arrangedpageD % 5
+ \or \handlearrangedpageXandY{#1}000\arrangedpageC % 6
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 7
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 8
+ \poparrangedpages
+ \fi}
+
+%D Section with 12 pages, built from three sheets of paper.
+%D Each sheet carries 2 pages recto and verso.
+%D Coding: [2*2*3]
+
+\permanent\protected\def\poparrangedpagesAtoF
+ {\ifnum\arrangedpageN>\zerocount
+ \paperwidth \arrangedpageX\paperwidth
+ \paperheight\arrangedpageY\paperheight
+ \outputarrangedbox\arrangedpageA
+ \outputarrangedbox\arrangedpageB
+ \outputarrangedbox\arrangedpageC
+ \outputarrangedbox\arrangedpageD
+ \outputarrangedbox\arrangedpageE
+ \outputarrangedbox\arrangedpageF
+ \global\arrangedpageN\zerocount
+ \fi}
+
+\installpagearrangement 2*2*3
+ {\dosetuparrangement{2}{1}{2}{3}{2}% X,Y,Total,hcutmarks,vcutmarks
+ \pusharrangedpageTWELVETWO\poparrangedpagesAtoF\relax}
+
+\permanent\protected\def\pusharrangedpageTWELVETWO#1%
+ {\advancearrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip
+ \or \handlearrangedpageXandY{#1}000\arrangedpageB % 2
+ \or \handlearrangedpageXandY{#1}010\arrangedpageC % 3
+ \or \handlearrangedpageXandY{#1}000\arrangedpageD % 4
+ \or \handlearrangedpageXandY{#1}010\arrangedpageE % 5
+ \or \handlearrangedpageXandY{#1}000\arrangedpageF % 6
+ \or \handlearrangedpageXandY{#1}010\arrangedpageF % 7
+ \or \handlearrangedpageXandY{#1}000\arrangedpageE % 8
+ \or \handlearrangedpageXandY{#1}010\arrangedpageD % 9
+ \or \handlearrangedpageXandY{#1}000\arrangedpageC % 10
+ \or \handlearrangedpageXandY{#1}010\arrangedpageB % 11
+ \or \handlearrangedpageXandY{#1}000\arrangedpageA % 12
+ \poparrangedpages
+ \fi}
+
+% % From Wolfgang for Mari (mail on list) ... yes or no in core .. time for
+% % delayed loading ...
+% %
+% % http://stamphenge.wordpress.com/minibooks/meander-accordion-folded-book/
+%
+% \installpagearrangement MEANDER16
+% {\dosetuparrangement{4}{4}{16}{5}{5}%
+% \pusharrangedpageMEANDERSIXTEEN\poparrangedpagesXY\relax}
+%
+% \permanent\protected\def\pusharrangedpageMEANDERSIXTEEN#1%
+% {\advancearrangedpageN
+% \reportarrangedpage\arrangedpageN
+% \ifcase\arrangedpageN
+% \or \handlearrangedpageXandY{#1}000\arrangedpageA
+% \or \handlearrangedpageXandY{#1}010\arrangedpageA
+% \or \handlearrangedpageXandY{#1}020\arrangedpageA
+% \or \handlearrangedpageXandY{#1}030\arrangedpageA
+% \or \handlearrangedpageXandY{#1}131\arrangedpageA
+% \or \handlearrangedpageXandY{#1}121\arrangedpageA
+% \or \handlearrangedpageXandY{#1}111\arrangedpageA
+% \or \handlearrangedpageXandY{#1}101\arrangedpageA
+% \or \handlearrangedpageXandY{#1}002\arrangedpageA
+% \or \handlearrangedpageXandY{#1}012\arrangedpageA
+% \or \handlearrangedpageXandY{#1}022\arrangedpageA
+% \or \handlearrangedpageXandY{#1}032\arrangedpageA
+% \or \handlearrangedpageXandY{#1}133\arrangedpageA
+% \or \handlearrangedpageXandY{#1}123\arrangedpageA
+% \or \handlearrangedpageXandY{#1}113\arrangedpageA
+% \or \handlearrangedpageXandY{#1}103\arrangedpageA
+% \poparrangedpages
+% \fi}
+%
+% % \definepapersize[small][width=6cm,height=6cm]
+% % \definepapersize[big][width=30cm,height=30cm]
+% % \setuppapersize[small][big]
+% % \setuppagenumbering[location=]
+% % \setuparranging[MEANDER16]
+% % \setuplayout
+% % [location=middle,
+% % marking=on]
+% % \starttext
+% % \dorecurse{32}{\centerbox{\ssd\recurselevel}}
+% % \stoptext
+%
+% % By Willi:
+%
+% \installpagearrangement MEANDER9
+% {\dosetuparrangement{3}{3}{9}{4}{4}%
+% \pusharrangedpageMEANDERNINE\poparrangedpagesXY\relax}
+%
+% \permanent\protected\def\pusharrangedpageMEANDERNINE#1%
+% {\advancearrangedpageN
+% \reportarrangedpage\arrangedpageN
+% \ifcase\arrangedpageN
+% \or \handlearrangedpageXandY{#1}000\arrangedpageA
+% \or \handlearrangedpageXandY{#1}010\arrangedpageA
+% \or \handlearrangedpageXandY{#1}020\arrangedpageA
+% \or \handlearrangedpageXandY{#1}121\arrangedpageA
+% \or \handlearrangedpageXandY{#1}111\arrangedpageA
+% \or \handlearrangedpageXandY{#1}101\arrangedpageA
+% \or \handlearrangedpageXandY{#1}002\arrangedpageA
+% \or \handlearrangedpageXandY{#1}012\arrangedpageA
+% \or \handlearrangedpageXandY{#1}022\arrangedpageA
+% \poparrangedpages
+% \fi}
+
+% % handy for stickers etc, this way we can treat them as page
+%
+% \setuppapersize [XY][A4]
+% \setuppaper [topspace=5mm,backspace=5mm,dx=1mm,dy=1mm,nx=2,ny=6]
+% \setuplayout [page] [topspace=5mm,backspace=5mm]
+% \setuplayout [page]
+% \setuplayout [location=middle]
+% \setuparranging [XY]
+% \showframe
+%
+% \starttext \dorecurse{30}{test \recurselevel \page} \stoptext
+
+\permanent\protected\protected\def\pusharrangedpageXY#1%
+ {\advancearrangedpageN
+ \global\advance\arrangedpageM\plusone
+ \reportarrangedpage\arrangedpageN
+ \global\setbox\arrangedpageB\hpack \ifdim\v_page_target_width>\zeropoint to \v_page_target_width \fi
+ {\ifvoid\arrangedpageB\else
+ \unhbox\arrangedpageB
+ \ifdim\v_page_target_dx>\zeropoint
+ \hskip\v_page_target_dx
+ \else
+ \hss
+ \hskip\v_page_target_dx
+ \hss
+ \fi
+ \fi
+ \box#1}%
+ \ifnum\arrangedpageM<\arrangedpageX\else
+ \global\setbox\arrangedpageA\vpack \ifdim\v_page_target_height>\zeropoint to \v_page_target_height \fi
+ {\offinterlineskip
+ \ifvoid\arrangedpageA\else
+ \unvbox\arrangedpageA
+ \ifdim\v_page_target_dy>\zeropoint
+ \vskip\v_page_target_dy
+ \else
+ \vss
+ \vskip\v_page_target_dy
+ \vss
+ \fi
+ \fi
+ \box\arrangedpageB}%
+ \global\arrangedpageM\zerocount
+ \fi
+ \ifnum\arrangedpageN<\arrangedpageT\else
+ \poparrangedpages
+ \fi}
+
+\permanent\protected\protected\def\poparrangedpagesXY
+ {\ifnum\arrangedpageN>\zerocount
+ \paperwidth \arrangedpageX\paperwidth
+ \paperheight\arrangedpageY\paperheight
+ \outputarrangedbox\arrangedpageA
+ \global\arrangedpageN\zerocount
+ \global\arrangedpageM\zerocount
+ \fi}
+
+\installpagearrangement XY
+ {\dosetuparrangement
+ \v_page_target_nx
+ \v_page_target_ny
+ \v_page_target_xy
+ \zerocount
+ \zerocount
+ \pusharrangedpageXY\poparrangedpagesXY\relax}
+
+%D A crazy definition, don't guess who pushed me for the landscape option.
+
+\def\page_imposition_xy_height
+ {\dimexpr
+ \dimexpr
+ \v_page_target_height
+ -\numexpr\v_page_target_ny-1\relax\v_page_target_dy
+ \relax
+ /\v_page_target_ny
+ \relax}
+
+\def\page_imposition_xy_width
+ {\dimexpr
+ \dimexpr
+ \v_page_target_width
+ -\numexpr\v_page_target_nx-1\relax\v_page_target_dx
+ \relax
+ /\v_page_target_nx
+ \relax}
+
+\definepapersize
+ [XY]
+ [\c!height=\page_imposition_xy_height,
+ \c!width =\page_imposition_xy_width]
+
+\setuppaper
+ [\c!width =\dimexpr\printpaperwidth -2\v_page_target_backspace\relax,
+ \c!height=\dimexpr\printpaperheight-2\v_page_target_topspace \relax]
+
+% \definepageshift[test][horizontal][10pt,20pt,30pt,40pt,50pt]
+% \definepageshift[test][vertical] [10pt,20pt,30pt,40pt,50pt]
+%
+% \setuppageshift[test]
+% \setuppageshift[test][test]
+% \setuppageshift[test][none]
+% \setuppageshift[none][test]
+% \setuppageshift[paper][test][test] % arrange only
+% \setuppageshift[paper][test] % arrange only
+% \setuppageshift[print][test][test]
+%
+% \showframe \dorecurse{100}{\input tufte \par}
+
+% #1=name #2=horizontal|vertical #3=shiftlist
+
+% this will move to lua
+
+\installcorenamespace {pageshift}
+
+\permanent\protected\tolerant\def\definepageshift[#1]#*[#2]#*[#3]%
+ {\setvalue{\??pageshift#2:#1}{#3}}
+
+\let\page_boxes_h_shifts\empty
+\let\page_boxes_v_shifts\empty
+
+\newcount\c_page_boxes_h_shifts
+\newcount\c_page_boxes_v_shifts
+
+\newdimen\d_page_boxes_h_shifts
+\newdimen\d_page_boxes_v_shifts
+
+\let\page_boxes_apply_shift_print\gobbleoneargument
+\let\page_boxes_apply_shift_paper\gobbleoneargument
+
+\def\page_boxes_filter_shift#1#2#3% #1=\dimenx #2=\xpageshifts #3=\nofxpageshifts
+ {#1\zeropoint
+ \ifempty#2\else
+ \global\advance#3\plusone
+ \getfromcommacommand[#2][#3]%
+ \ifempty\commalistelement
+ \global#3\plusone % we cycle
+ \getfromcommacommand[#2][#3]%
+ \fi
+ \ifempty\commalistelement \else
+ #1\commalistelement\relax % the relax is really needed as there is an \if later on
+ \fi
+ \fi}
+
+\def\page_boxes_apply_shift#1%
+ {\page_boxes_filter_shift\d_page_boxes_h_shifts\page_boxes_h_shifts\c_page_boxes_h_shifts
+ \page_boxes_filter_shift\d_page_boxes_v_shifts\page_boxes_v_shifts\c_page_boxes_v_shifts
+ \ifzeropt\d_page_boxes_h_shifts
+ \ifzeropt\d_page_boxes_v_shifts
+ % nothing to shift
+ \else
+ \page_boxes_apply_shift_indeed#1%
+ \fi
+ \else
+ \page_boxes_apply_shift_indeed#1%
+ \fi}
+
+\def\page_boxes_apply_shift_indeed#1%
+ {\edef\next{\wd#1\the\wd#1\ht#1\the\ht#1\dp#1\the\dp#1}%
+ \setbox#1\vpack
+ {\offinterlineskip
+ \vskip\d_page_boxes_v_shifts
+ \hskip\d_page_boxes_h_shifts
+ \box#1}%
+ \next}
+
+\permanent\tolerant\protected\def\setuppageshift[#1]#*[#2]#*[#3]% page|paper horizontal vertical
+ {\ifarguments\or
+ \setuppageshift[\v!page][#1][#1]%
+ \or
+ \doifelseinset{#1}{\v!page,\v!paper}
+ {\setuppageshift[#1][#2][#2]}
+ {\setuppageshift[\v!page][#1][#2]}%
+ \or
+ %edef\page_boxes_h_shifts{\ifcsname\??pageshift\v!horizontal:#2\endcsname\csname\??pageshift\v!horizontal:#2\endcsname\fi}%
+ %edef\page_boxes_v_shifts{\ifcsname\??pageshift\v!vertical :#3\endcsname\csname\??pageshift\v!vertical :#3\endcsname\fi}%
+ \edef\page_boxes_h_shifts{\begincsname\??pageshift\v!horizontal:#2\endcsname}%
+ \edef\page_boxes_v_shifts{\begincsname\??pageshift\v!vertical :#3\endcsname}%
+ \doifelse{#1}\v!page {\let\page_boxes_apply_shift_print\page_boxes_apply_shift}{\let\page_boxes_apply_shift_print\gobbleoneargument}%
+ \doifelse{#1}\v!paper{\let\page_boxes_apply_shift_paper\page_boxes_apply_shift}{\let\page_boxes_apply_shift_paper\gobbleoneargument}%
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-inf.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-inf.mkxl
new file mode 100644
index 00000000000..7e65d6e9a80
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-inf.mkxl
@@ -0,0 +1,124 @@
+%D \module
+%D [ file=page-inf, % moved from page-ini
+%D version=2011.12.07, % 2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Tracing Info,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Page Macros / Tracing Info}
+
+% This needs a real cleanup .. will be a more detailed list.
+
+\unprotect
+
+\installcorenamespace{layoutinfo}
+
+\newtoks\everyresetversion
+\newtoks\everysetupversion
+
+\mutable\let\currentversioninfo\empty
+\mutable\let\currentversiontext\empty
+
+\let\page_info_add_to_box\gobbleoneargument
+
+\permanent\tolerant\protected\def\setupversion[#1]%
+ {\the\everyresetversion
+ \doifelseassignment{#1}%
+ {\getdummyparameters[\c!alternative=,\c!text=,#1]%
+ \edef\currentversioninfo{\dummyparameter\c!alternative}%
+ \edef\currentversiontext{\dummyparameter\c!text}}%
+ {\edef\currentversioninfo{#1}%
+ \let \currentversiontext\empty}%
+ \ifcsname\??layoutinfo\currentversioninfo\endcsname
+ \let\page_info_add_to_box\page_info_add_to_box_indeed
+ \else
+ \let\currentversioninfo\empty
+ \let\page_info_add_to_box\gobbleoneargument
+ \fi
+ \the\everysetupversion}
+
+\aliased\let\version\setupversion
+
+\protected\def\page_info_place_info % at the bottom of the page
+ {\begincsname\??layoutinfo\currentversioninfo\endcsname}
+
+\permanent\protected\def\installversioninfo#1#2%
+ {\setvalue{\??layoutinfo#1}{#2}}
+
+\permanent\protected\def\includeversioninfo#1%
+ {\begincsname\??layoutinfo#1\endcsname}
+
+\installversioninfo\v!final
+ {\let\currentversioninfo\empty
+ \let\page_info_add_to_box\gobbleoneargument}
+
+\installversioninfo\v!concept
+ {\vskip6\points
+ \hbox to \makeupwidth
+ {\infofont
+ \rlap{\v!concept:\space\currentdate}%
+ \hss
+ \currentversiontext
+ \hss
+ \llap{\page_adapts_status_info}}}
+
+\installversioninfo\v!file
+ {\vskip6\points
+ \hbox to \makeupwidth
+ {\infofont
+ \getmessage\m!system{27}:\space\currentdate\quad
+ \donefalse
+ \doif\currentproject\currentproduct{\doif\currentproduct\currentcomponent\donetrue}%
+ \ifdone
+ \donefalse
+ \else
+ \ifempty\currentproject \else \space\v!project :\space\currentproject \space \donetrue \fi
+ \ifempty\currentproduct \else \space\v!product :\space\currentproduct \space \donetrue \fi
+ \ifempty\currentcomponent \else \space\v!component:\space\currentcomponent\space \donetrue \fi
+ \fi
+ \ifdone \else \space\v!file :\space\jobname \space \fi
+ \hss
+ \currentversiontext
+ \quad
+ \page_adapts_status_info}}
+
+\installversioninfo\v!temporary
+ {\includeversioninfo\v!file}
+
+\appendtoks
+ \overfullrule\zeropoint
+\to \everyresetversion
+
+\appendtoks
+ \ifx\currentversioninfo\v!temporary
+ \overfullrule5\points
+ \fi
+\to \everysetupversion
+
+\newbox\b_page_versions
+
+\def\page_info_add_to_box_indeed#1%
+ {\scratchdimen\wd#1%
+ \setbox\b_page_versions\vpack to \ht#1%
+ {\vfill
+ \settexthoffset
+ \hsize\dimexpr\scratchdimen-2\texthoffset\relax
+ \hkern\texthoffset % brrrr
+ \vbox to \zeropoint{\vss\page_info_place_info}%
+ \vkern\bodyfontsize}%
+ \dp\b_page_versions\zeropoint
+ \wd\b_page_versions\scratchdimen
+ \setbox#1\hpack{\box#1\hkern-\scratchdimen\box\b_page_versions}}
+
+\setupversion % resets
+ [\v!final]
+
+\let\page_info_add_to_box\gobbleoneargument
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-ini.mkxl
new file mode 100644
index 00000000000..0a0993d44d3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-ini.mkxl
@@ -0,0 +1,376 @@
+%D \module
+%D [ file=page-ini,
+%D version=2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Initializations,
+%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 Page Macros / Initializations}
+
+\registerctxluafile{page-ini}{}
+
+%D The \type {\processpage} command has become obsolete. It's original
+%D purpose was to flush only parts of a document but nowadays we have
+%D project structure and modes. This is just one of those very early
+%D features that no longer makes sense.
+
+%D The \type {\couplepage} command has become obsolete. It's original
+%D purpose was to provide hooks for printer directives (like choosing
+%D different paper trays).
+
+\unprotect
+
+%D Shipout control.
+
+\newcount\nofshipouts
+
+\appendtoks
+ \global\advance\nofshipouts\plusone
+\to \everyaftershipout
+
+\newconditional\c_otr_shipout_enabled \settrue\c_otr_shipout_enabled
+
+\protected\def\page_otr_shipout % not used at all
+ {\ifconditional\c_otr_shipout_enabled
+ \expandafter\page_otr_shipout_yes
+ \else
+ \expandafter\page_otr_shipout_nop
+ \fi}
+
+\aliased\let\page_otr_shipout_yes\normalshipout
+
+\protected\def\page_otr_shipout_nop
+ {\writestatus\m!system{ignoring shipout of real page \the\realpageno}%
+ \global\advance\realpageno\minusone % else no flush of resources
+ \dowithnextbox{\deadcycles\zerocount}}
+
+% We don't support direct user \shipouts (weird: this does not work, bug?)
+%
+% \let\shipout\page_otr_shipout_nop
+
+%D Building pages.
+
+\newbox\pagebox
+
+% \ifdefined\page_postprocessors_column \else \let\page_postprocessors_column\gobbleoneargument \fi
+% \ifdefined\page_postprocessors_page \else \let\page_postprocessors_page \gobbleoneargument \fi
+% \ifdefined\page_postprocessors_box \else \let\page_postprocessors_box \gobbleoneargument \fi
+
+\newtoks\t_page_postprocessors_box
+\newtoks\t_page_postprocessors_page
+\newtoks\t_page_postprocessors_column
+
+\newconstant\b_page_postprocessor
+
+\def\page_apply_postprocessors_box#1%
+ {\b_page_postprocessor#1\relax
+ \the\t_page_postprocessors_box}
+
+\def\page_apply_postprocessors_page#1%
+ {\b_page_postprocessor#1\relax
+ \the\t_page_postprocessors_page}
+
+\def\page_apply_postprocessors_column#1%
+ {\b_page_postprocessor#1\relax
+ \the\t_page_postprocessors_column}
+
+%D Floats.
+
+\def\page_otr_flush_all_floats
+ {%\flushnotes already done
+ \ifconditional\c_page_floats_some_waiting
+ \page_otr_command_flush_all_floats
+ \fi}
+
+\def\page_otr_insert_dummy_page
+ {\par
+ \ifvmode
+ \page_otr_flush_all_floats
+ \fixedspace
+ \vfill
+ \page_otr_command_next_page
+ \fi}
+
+\def\page_otr_flush_pending_content
+ {\vkern\zeropoint\relax
+ \ifvoid\normalpagebox \else
+ \unvbox\normalpagebox
+ \penalty\outputpenalty
+ \fi}
+
+\newconstant\c_page_postponed_mode % \c_page_postponed_mode\plusone
+\newbox \b_page_otr_saved
+
+\installoutputroutine\savepagecontent
+ {\global\setbox\b_page_otr_saved\box\normalpagebox}
+
+\permanent\protected\def\flushpagecontent
+ {\ifvoid\b_page_otr_saved\else\unvbox\b_page_otr_saved\fi}
+
+% Test case: assumes one group level for output routine, todo:
+% a toks.
+%
+% \starttext
+%
+% \startbuffer[makeup]
+% \startpagemakeup[pagestate=start,page=no]
+% \color[red]{
+% \vfill
+% \dorecurse{3}{
+% \samplefile{klein}
+% \vfill
+% }
+% }
+% \stoppagemakeup
+% \stopbuffer
+%
+% \startcolor[green]
+% \dorecurse{10}{
+% \dontleavehmode{\bf 1:#1:} \samplefile{sapolsky}\par
+% }
+% \stopcolor
+%
+% \startpostponing % [+3]
+% \getbuffer[makeup]
+% \stoppostponing
+%
+% \startcolor[blue]
+% \dorecurse{25}{
+% \dontleavehmode{\bf 2:#1:} \samplefile{sapolsky}\par
+% }
+% \stopcolor
+%
+% \stoptext
+
+\def\page_otr_construct_and_shipout#1#2#3%
+ {\forgetall
+ \page_boxes_shipout{\page_boxes_constructed_page#1#2}% \hbox removed
+ \page_otr_flush_pending_content
+ % not really needed, replaced by \flushsavedfloats
+ \page_otr_check_for_pending_inserts
+ % but does not hurt either (we're still in the otr!)
+ \inpagebodytrue % needed for enabling \blank ! brrr
+ \pagebodymode\plusone % todo: \plustwo when spread
+ \page_otr_command_flush_saved_floats
+ \page_otr_command_set_vsize % this is needed for interacting components, like floats and multicolumns
+ \strc_pagenumbers_increment_counters % should hook into an every
+ \page_adapts_synchronize
+ \page_otr_check_for_pending_inserts
+ \page_otr_command_flush_facing_floats
+ \page_floats_flush_page_floats % before postponed blocks
+ \page_spread_flush % defined later
+ \ifnum#3=\plusone
+ % this is tricky! we need to make sure we are in the output group
+ \ifnum\c_page_postponed_mode=\plusone
+ \aftergroup\page_postponed_blocks_flush
+ \else
+ \page_postponed_blocks_flush
+ \fi
+ \else
+ \page_postponed_blocks_flush
+ \fi}
+
+% Can't we get rid of this hackery? It's used in some widgets
+% stuff so probably not.
+
+\newbox\b_page_otr_special
+
+\def\page_otr_flush_special_content
+ {\ifvoid\b_page_otr_special \else
+ \box\b_page_otr_special
+ \fi}
+
+\permanent\protected\def\page_otr_add_special_content
+ {\dowithnextboxcs\page_otr_add_special_content_indeed\hbox}
+
+\permanent\protected\def\page_otr_add_special_content_indeed
+ {\wd\nextbox\zeropoint
+ \ht\nextbox\zeropoint
+ \dp\nextbox\zeropoint
+ \global\setbox\b_page_otr_special\hbox
+ {%\hskip-\maxdimen % not here, fails in acrobat (clips)
+ \box\b_page_otr_special\box\nextbox}}% was \unhbox, is now box again
+
+\aliased\let\flushatshipout\page_otr_add_special_content % this might go away
+
+\maxdeadcycles\plusthousand
+
+\newtoks\afterpage \newtoks\aftereverypage
+\newtoks\beforepage \newtoks\beforeeverypage
+
+\newif\ifarrangingpages \arrangingpagesfalse
+
+\newconstant\pageornamentstate % 0=on 1=one-off 2=always-off
+
+% \appendtoks
+% \ifcase\pageornamentstate \or
+% \pageornamentstate\zerocount
+% \fi
+% \to \everyaftershipout
+
+\appendtoks
+ \ifcase\pageornamentstate \or
+ \global\pageornamentstate\zerocount
+ \fi
+\to \everyaftershipout
+
+% Mark synchronization
+
+\newconditional\c_page_marks_building_successive_pages \settrue\c_page_marks_building_successive_pages
+
+\def\page_marks_synchronize_page#1% box
+ {\strc_markings_synchronize\v!page{#1}{\ifconditional\c_page_marks_building_successive_pages\v!keep\fi}}
+
+\def\page_marks_synchronize_column#1#2#3#4% first last column box
+ {\ifnum#3=#1\relax
+ \strc_markings_synchronize{\number#3,\v!column:\number#3,\v!first,\v!column:\v!first}{#4}{}%
+ \orelse\ifnum#3=#2\relax
+ \strc_markings_synchronize{\number#3,\v!column:\number#3,\v!last, \v!column:\v!last }{#4}{}%
+ \else
+ \strc_markings_synchronize{\number#3,\v!column:\number#3 }{#4}{}%
+ \fi}
+
+% Page body building
+
+\newconditional\c_page_boxes_save_page_body
+\newbox \b_page_boxes_saved_page_body
+
+\def\page_boxes_constructed_page_body#1#2%
+ {\ifconditional\c_page_boxes_save_page_body \global\setbox\b_page_boxes_saved_page_body \fi \vpack \bgroup
+ \boxmaxdepth\maxdimen % new
+ \dontcomplain
+ \page_marks_synchronize_page {#2}% we could consider doing this for \pagebox (needs testing)
+ \page_boxes_construct_content \pagebox{#1}{#2}%
+ \page_backgrounds_add_to_main \pagebox
+ \page_boxes_apply_offsets \pagebox
+ \page_info_add_to_box \pagebox
+ \ifcase\pageornamentstate
+ \page_backgrounds_add_to_paper \pagebox
+ \fi
+ \anch_positions_register_page \pagebox
+ \ifarrangingpages
+ \page_boxes_apply_shift_paper \pagebox % \v!paper
+ \else
+ \page_boxes_apply_clip_paper \pagebox
+ \page_marks_add_page \pagebox
+ \page_boxes_apply_replicate \pagebox
+ \page_boxes_apply_scale \pagebox
+ \page_boxes_apply_mirror_paper \pagebox
+ \page_boxes_apply_orientate_paper \pagebox
+ \page_marks_add_more \pagebox
+ \page_boxes_apply_center \pagebox
+ \page_backgrounds_add_to_print \pagebox
+ \page_boxes_apply_mirror_print \pagebox
+ \page_boxes_apply_orientate_print \pagebox
+ \page_boxes_apply_shift_print \pagebox % \v!page
+ \page_boxes_apply_offset \pagebox
+ \page_boxes_apply_negate_print \pagebox
+ \fi
+ \box\pagebox
+ \egroup \ifconditional\c_page_boxes_save_page_body \copy\b_page_boxes_saved_page_body \fi}
+
+\appendtoks
+ \restoreglobalbodyfont
+ \pickupattributes
+\to \everybeforepagebody
+
+% if we really need this ... we need to bypass \permanent
+
+% \ifdefined\nestednewbox \else \newbox\nestednextbox \fi % hm, still needed?
+%
+% \prependtoks
+% \let\nextbox\nestednextbox
+% \to \everybeforepagebody
+
+\def\page_boxes_constructed_page#1#2%
+ {\vpack\bgroup % intercept spurious spaces
+ \the\everybeforepagebody
+ \starttextproperties
+ \checkmarginblocks
+ \the\beforeeverypage
+ \normalexpanded{\global\beforepage\emptytoks\the\beforepage}%
+ \inpagebodytrue
+ \pagebodymode\plusone % todo: \plustwo when spread
+ \page_boxes_constructed_page_body#1#2%
+ \normalexpanded{\global\afterpage \emptytoks\the\afterpage }%
+ \the\aftereverypage
+ \resetpagebreak
+ \resetlayouttextlines % will go to \aftereverypage
+ \stoptextproperties
+ \the\everyafterpagebody
+ \egroup}
+
+\permanent\def\doifelsetopofpage
+ {\ifdim\pagegoal=\maxdimen
+ \expandafter\firstoftwoarguments
+ \orelse\ifdim\pagegoal=\vsize
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doiftopofpageelse\doifelsetopofpage
+
+% %D Idea:
+%
+% \newinsert\thispageinsert % <- installinsertion
+%
+% \def\flushatthispage
+% {\bgroup
+% \dowithnextbox{\insert\thispageinsert{\box\nextbox}\egroup}%
+% \hbox}
+%
+% \appendtoks
+% \ifvoid\thispageinsert\else\hbox{\smashedbox\thispageinsert}\fi
+% \to \everyshipout
+
+% not yet in i-* file
+
+\installcorenamespace{markedpage}
+
+% todo: just define at the lua end ... less hassle
+
+\permanent\tolerant\protected\def\markpage [#1]#*[#2]{\clf_markpage {#1}{#2}}
+\permanent \def\markedpages [#1]{\clf_markedpages {#1}} % expandable
+\permanent\protected \def\doifelsemarkedpage#1{\clf_doifelsemarkedpage{#1}}
+\permanent\protected \def\startmarkpages [#1]{\clf_startmarkpages {#1}}
+\permanent\protected \def\stopmarkpages {\clf_stopmarkpages }
+
+%D Experimental:
+
+\newconstant\c_page_force_strut_depth_trace_mode
+
+\installtextracker
+ {otr.forcestrutdepth}
+ {\c_page_force_strut_depth_trace_mode\plusone}
+ {\c_page_force_strut_depth_trace_mode\zerocount}
+
+\installoutputroutine\forcestrutdepth
+ {\clf_forcestrutdepth\normalpagebox\strutdp\c_page_force_strut_depth_trace_mode
+ \unvbox\normalpagebox}
+
+\installoutputroutine\forcestrutdepthplus % experimental
+ {\clf_forcestrutdepthplus\normalpagebox\strutdp\c_page_force_strut_depth_trace_mode
+ \unvbox\normalpagebox}
+
+% maybe better:
+%
+% \installoutputroutine\doforcestrutdepth
+% {\clf_forcestrutdepth\normalpagebox\strutdp\c_page_force_strut_depth_trace_mode
+% \unvbox\normalpagebox}
+%
+% \protected\def\forcestrutdepth
+% {\par\ifvmode\ifinner\else\doforcestrutdepth\fi\fi}
+
+% Also experimental:
+
+\permanent\protected\def\doifelsependingpagecontent{\clf_doifelsependingpagecontent}
+% \permanent\protected\let\doifelsependingpagecontent\clf_doifelsependingpagecontent
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx
new file mode 100644
index 00000000000..fda757dbe57
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-inj.mklx
@@ -0,0 +1,228 @@
+%D \module
+%D [ file=page-inj,
+%D version=2013.02.10,
+%D title=\CONTEXT\ Page Module,
+%D subtitle=Injections,
+%D author=Wolfgang Schuster \& Hans Hagen,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster \& Hans Hagen,
+%D license=see context related readme files (gpl)]
+
+%D This module is based on an idea and prototype by Wolfgang but instead of
+%D injectioning into a page constructor we injection it into the regular shipout
+%D handler because that way we get page numbering. It's a sort of variation on
+%D postponing but the content does not end up in the regular page flow, so it's
+%D closer to page figures but without the usual page builder.
+%D
+%D This module is following the mkvi way of rendering setups and configuration and
+%D is somewhat experimental. Probably more alternatives will be added. This could
+%D become a delayed loaded module at some point (no real consequences).
+
+\unprotect
+
+\registerctxluafile{page-inj}{}
+
+\installcorenamespace {pageinjection}
+\installcorenamespace {pageinjectionalternative}
+\installcorenamespace {pageinjectionrenderings}
+
+\installframedcommandhandler \??pageinjection {pageinjection} \??pageinjection
+\installcommandhandler \??pageinjectionalternative {pageinjectionalternative} \??pageinjectionalternative
+
+\let\page_boxes_flush_before\clf_flushpageinjectionsbefore
+\let\page_boxes_flush_after \clf_flushpageinjectionsafter
+
+\def\page_injections_flush_indeed
+ {\scrn_canvas_synchronize_set{\pageinjectionparameter\c!width}{\pageinjectionparameter\c!height}%
+ \invokepagehandler\v!normal{\inheritedpageinjectionframed{\texsetup\p_page_injectionalternative_rederingsetup}}%
+ \scrn_canvas_synchronize_reset}
+
+\def\page_injections_flush_saved#name#parameters%
+ {\begingroup
+ \edef\currentpageinjection{#name}%
+ \getdummyparameters[#parameters]%
+ \edef\currentpageinjectionalternative {\pageinjectionparameter \c!alternative }%
+ \edef\p_page_injectionalternative_rederingsetup{\pageinjectionalternativeparameter\c!renderingsetup}%
+ \page_injections_nextpage
+ \page_injections_flush_indeed
+ \endgroup}
+
+\permanent\tolerant\protected\def\pageinjection[#1]#*[#2]% name parameters | settings parameters | name | parameters
+ {\begingroup
+ \ifhastok={#1}%
+ \ifhastok={#2}%
+ \page_injections_direct_settings_parameters{#1}{#2}%
+ \else
+ \page_injections_direct_parameters{#1}%
+ \fi
+ \else
+ \ifhastok={#2}%
+ \page_injections_direct_name_parameters{#1}{#2}%
+ \else
+ \page_injections_direct_name{#1}%
+ \fi
+ \fi}
+
+\def\page_injections_direct_settings_parameters#settings% #parameters%
+ {\let\currentpageinjection\empty
+ \checkpageinjectionparent
+ \setupcurrentpageinjection[#settings]%
+ \page_injections_direct_indeed}
+
+\def\page_injections_direct_parameters% #parameters%
+ {\let\currentpageinjection\empty
+ \checkpageinjectionparent
+ \page_injections_direct_indeed}
+
+\def\page_injections_direct_name_parameters#name% #parameters%
+ {\edef\currentpageinjection{#name}%
+ \checkpageinjectionparent
+ \page_injections_direct_indeed}
+
+\def\page_injections_direct_name#name%
+ {\edef\currentpageinjection{#name}%
+ \checkpageinjectionparent
+ \page_injections_direct_indeed{}}
+
+\def\page_injections_direct_indeed% #parameters%
+ {\edef\p_page_injections_state{\pageinjectionparameter\c!state}%
+ \edef\p_page_injections_delay{\pageinjectionparameter\c!delay}%
+ \edef\p_page_injections_page {\pageinjectionparameter\c!page }%
+ \ifx\p_page_injections_delay\v!yes
+ \expandafter\page_injections_direct_indeed_yes
+ \else
+ \expandafter\page_injections_direct_indeed_nop
+ \fi}
+
+\def\page_injections_direct_indeed_yes#parameters%
+ {\clf_savepageinjections
+ name {\currentpageinjection}%
+ state {\p_page_injections_state}%
+ userdata {\normalunexpanded{#parameters}}%
+ \relax
+ \endgroup}
+
+\def\page_injections_direct_indeed_nop#parameters%
+ {\ifempty\p_page_injections_page
+ \page
+ \else
+ \page[\p_page_injections_page]%
+ \fi
+ \getdummyparameters[#parameters]%
+ \page_injections_place
+ \endgroup}
+
+\def\page_injections_place
+ {\edef\currentpageinjectionalternative {\pageinjectionparameter \c!alternative }%
+ \edef\p_page_injectionalternative_rederingsetup{\pageinjectionalternativeparameter\c!renderingsetup}%
+ \page_injections_nextpage
+ \ifx\currentpageinjectionalternative\v!none \else % increment counter but don’t generate output
+ \forgetparindent
+ \dontcomplain
+ \setconstant\shipoutfinalizemethod\zerocount % this is messy
+ \page_injections_flush_indeed
+ \fi}
+
+\def\page_injections_nextpage
+ {\edef\p_page_injections_pagestate{\pageinjectionparameter\c!pagestate}%
+ \ifx\p_page_injections_pagestate\v!stop \else
+ \edef\p_page_injections_n{\pageinjectionparameter\c!n}%
+ \ifempty\p_page_injections_n
+ \let\p_page_injections_n\plusone
+ \fi
+ \dorecurse\p_page_injections_n
+ {\incrementcounter[\s!realpage]%
+ \incrementcounter[\s!userpage]}%
+ \fi}
+
+\definepageinjectionalternative[\v!figure][\c!renderingsetup=\??pageinjectionrenderings:\v!figure]
+\definepageinjectionalternative[\v!buffer][\c!renderingsetup=\??pageinjectionrenderings:\v!buffer]
+\definepageinjectionalternative[\v!setups][\c!renderingsetup=\??pageinjectionrenderings:\s!setup ]
+
+\startsetups[\??pageinjectionrenderings:\v!figure]
+ \dontleavehmode\externalfigure[\dummyparameter\c!name][\c!factor=\v!max]
+\stopsetups
+
+\startsetups[\??pageinjectionrenderings:\s!setup]
+ \setups[\dummyparameter\c!setups]% kind of redundant but fits in
+\stopsetups
+
+\startsetups[\??pageinjectionrenderings:\v!buffer]
+ \getbuffer[\dummyparameter\c!name]%
+\stopsetups
+
+% \setuppaper
+% [\c!method=\v!pageinjection]
+
+\setuppageinjection
+ [ \c!width=\paperwidth,
+ \c!height=\paperheight,
+ \c!frame=\v!off,
+ \c!offset=\v!overlay,
+ \c!delay=\v!no,
+ \c!state=\v!next,
+ \c!alternative=\v!figure]
+
+\definepageinjection[\v!previouspage][\c!delay=\v!yes,\c!state=\v!previous]
+\definepageinjection[\v!nextpage] [\c!delay=\v!yes,\c!state=\v!next]
+\definepageinjection[\v!here] % direct
+\definepageinjection[\v!empty] [\c!alternative=\v!none]
+
+%definepageinjection[\v!chapter] [\v!previouspage][\c!pagestate=\v!stop]
+
+\protect \endinput
+
+% \enabletrackers[pagebuilder.injections]
+%
+% \setuppageinjection[offset=2em]
+%
+% \definepageinjection[chapter][previouspage][pagestate=stop]
+% \definepageinjection[later] [delay=yes,state=+2]
+%
+% \useMPlibrary[dum]
+%
+% \starttext
+%
+% \startchapter[title={Insert pages before/after the current page}]
+%
+% \dorecurse{10}{one: \input ward\par}
+%
+% \pageinjection[previouspage][name=dummy-1]
+%
+% \dorecurse{20}{two: \input ward\par} \page
+%
+% \pageinjection[nextpage][name=dummy-2]
+% \pageinjection[later] [name=dummy-4]
+% \pageinjection[delay=yes,state=+2][name=dummy-5]
+%
+% \dorecurse{100}{three: \input ward\par}
+%
+% \stopchapter
+%
+% \startbuffer[whatever]
+% \dorecurse{10}{whatever #1 }
+% \stopbuffer
+%
+% \startchapter[title={Insert pages at the current location}]
+%
+% \dorecurse{10}{\input ward\par}
+%
+% \pageinjection[direct][name=dummy-3]
+% \pageinjection[direct][alternative=buffer,name=whatever]
+%
+% \dorecurse{10}{\input ward\par}
+%
+% \stopchapter
+%
+% \setuphead
+% [chapter]
+% [beforesection={\pageinjection[empty]},
+% insidesection={\pageinjection[chapter][name=\structureuservariable{image}]}]
+%
+% \startchapter[title={Combine both mechanism}][name=dummy-4]
+%
+% \dorecurse{10}{\input ward\par}
+%
+% \stopchapter
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-ins.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-ins.mkxl
new file mode 100644
index 00000000000..2ab7449ab11
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-ins.mkxl
@@ -0,0 +1,209 @@
+%D \module
+%D [ file=page-ins,
+%D version=2002.04.16, % was core-ins
+%D title=\CONTEXT\ Insertion Macros,
+%D subtitle=Insertions,
+%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 / Insertions}
+
+%D Insertions are special data collections that are associated to \TEX's internal
+%D page builder. When multiple footnote classes were introduced, I decided to
+%D isolate some of the functionality in a module.
+
+\registerctxluafile{page-ins}{}
+
+\unprotect
+
+%D Because we need to deal with inserts at the \LUA\ end as well, we provide a
+%D proper installer.
+
+\installcorenamespace{insertion}
+\installcorenamespace{insertionnumber}
+
+\installcommandhandler \??insertion {insertion} \??insertion
+
+\setupinsertion
+ [%c!n=\plusone,
+ %c!distance=\zeropoint,
+ %c!maxheight=\maxdimen,
+ %c!factor=\plusthousand,
+ \c!location=\v!page]
+
+\newconstant\insertionmigrationmode
+
+\def\page_inserts_check_anchoring
+ {\edef\p_anchoring{\namedinsertionparameter\empty\c!anchoring}%
+ \insertionmigrationmode\ifx\p_anchoring\v!auto\plusone\else\zerocount\fi
+ \clf_setinsertmigration{\p_anchoring}}
+
+\appendtoks
+ \ifempty\currentinsertionparent
+ \page_inserts_check_anchoring
+ \fi
+\to \everysetupinsertion
+
+\setupinsertion
+ [\c!anchoring=\v!auto]
+
+\appendtoks
+ \page_inserts_check_anchoring
+\to \everystarttext % or \everyjob
+
+\newcount\currentinsertionnumber % This is a count and not a macro !
+
+\newtoks\t_page_inserts_list
+
+\mutable\let\doprocessinsert\relax % probably kind of obsolete now
+
+%D Maybe some day we will move settings here.
+
+\permanent\protected\def\setcurrentinsertion#1%
+ {\edef\currentinsertion{#1}%
+ \currentinsertionnumber\csname\??insertionnumber\currentinsertion\endcsname}
+
+\permanent\def\namedinsertionnumber#1{\csname\??insertionnumber#1\endcsname}
+
+\protected\def\page_inserts_synchronize_registers
+ {\currentinsertionnumber\csname\??insertionnumber\currentinsertion\endcsname}
+
+% for practical reasons we still set these elsewhere but that might change in the future
+%
+% \global\count\currentinsertionnumber\numexpr\insertionparameter\c!factor/\insertionparameter\c!n\relax
+% \global\skip \currentinsertionnumber\insertionparameter\c!distance \relax
+% \global\dimen\currentinsertionnumber\insertionparameter\c!maxheight\relax}
+% \floatingpenalty\zerocount
+
+\appendtoks
+ \ifempty\currentinsertionparent \else
+ \page_inserts_synchronize_registers
+ \fi
+\to \everysetupinsertion
+
+\protected\def\page_inserts_process#1% beware, this adapts currentinsertion !
+ {\edef\currentinsertion{#1}%
+ \currentinsertionnumber\csname\??insertionnumber\currentinsertion\endcsname
+ \doprocessinsert\currentinsertionnumber} % old method
+
+\permanent\protected\def\processinsertions
+ {\the\t_page_inserts_list}
+
+\permanent\protected\def\synchronizeinsertions
+ {\let\doprocessinsert\page_inserts_synchronize
+ \processinsertions}
+
+\protected\def\page_inserts_synchronize#1% yes or no
+ {\ifvoid#1\else
+ \insert#1{\unvbox#1}%
+ \fi}
+
+\permanent\protected\def\doifelseinsertion#1%
+ {\ifcsname\??insertionnumber#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifinsertionelse\doifelseinsertion
+
+% \protected\def\startinsertion[#1]%
+% {\insert\csname\??insertionnumber#1\endcsname\bgroup}
+%
+% \protected\def\stopinsertion
+% {\egroup}
+
+% For the moment we use the regular insertion allocator so that users can still
+% define their own insertions (not that they will play nicely with all context
+% mechanisms then). We can use the dimensions at the \LUA\ end so we don't need to
+% pass pass them explicitly. Actually, when we see an insertion node at that end,
+% we already know the number.
+
+\appendtoks
+ \ifempty\currentinsertionparent
+ \ifcsname\??insertionnumber\currentinsertion\endcsname
+ % bad news
+ \else
+ \expandafter\newinsert\csname\??insertionnumber\currentinsertion\endcsname
+ \page_inserts_synchronize_registers
+ \clf_defineinsertion
+ {\currentinsertion}%
+ {%
+ number \currentinsertionnumber
+ }%
+ \relax
+ \t_page_inserts_list\expandafter\expandafter\expandafter
+ {\expandafter\the\expandafter\t_page_inserts_list
+ \expandafter\page_inserts_process\csname\??insertionnumber\currentinsertion\endcsname}%
+ \count\currentinsertionnumber\plusthousand
+ \skip \currentinsertionnumber\zeropoint
+ \dimen\currentinsertionnumber\maxdimen
+ \fi
+ \else
+ \letcsname\??insertionnumber\currentinsertion\expandafter\endcsname
+ \csname\??insertionnumber\currentinsertionparent\endcsname
+ \fi
+\to \everydefineinsertion
+
+\appendtoks
+ \ifempty\currentinsertionparent \else
+ \clf_setupinsertion
+ {\currentinsertion}
+ {%
+ location {\insertionparameter\c!location}%
+ }%
+ \relax
+ \fi
+\to \everysetupinsertion
+
+\protected\def\page_inserts_set_location#1#2% fast one
+ {\clf_setinsertionlocation{#1}{#2}}
+
+%D Auxiliary macros:
+
+\def\page_insert_insertion_height#1%
+ {\dimexpr\expandafter\page_insert_insertion_height_indeed\csname\??insertionnumber#1\endcsname\relax}
+
+\def\page_insert_insertion_height_indeed#1%
+ {\ifvoid#1\zeropoint\else1\skip#1+\ht#1\fi}
+
+%D Obsolete:
+
+% \installcorenamespace{insertionbackup}
+%
+% \protected\def\installbackupinsertion#1%
+% {\ifcsname\??insertionbackup\string#1\endcsname \else
+% \expandafter\newinsert\csname\??insertionbackup\string#1\endcsname
+% \count\csname\??insertionbackup\string#1\endcsname\zerocount
+% \skip \csname\??insertionbackup\string#1\endcsname\zeropoint
+% \dimen\csname\??insertionbackup\string#1\endcsname\maxdimen
+% \fi}
+%
+% \protected\def\saveinsertionbox#1% hm, actually unknown
+% {\global\setbox\csname\??insertionbackup\string#1\endcsname
+% \ifdim\ht#1>\zeropoint\box#1\else\emptybox\fi}
+%
+% \protected\def\restoreinsertionbox#1%
+% {\ifvoid\backupinsertion#1\else % if void, we keep the content
+% \global\setbox#1\box\csname\??insertionbackup\string#1\endcsname
+% \fi}
+%
+% \protected\def\eraseinsertionbackup#1%
+% {\global\setbox\csname\??insertionbackup\string#1\endcsname\emptybox}
+%
+% \protected\def\saveinsertiondata#1%
+% {\global\skip \csname\??insertionbackup\string#1\endcsname\skip #1%
+% \global\count\csname\??insertionbackup\string#1\endcsname\count#1%
+% \global\dimen\csname\??insertionbackup\string#1\endcsname\dimen#1}
+%
+% \protected\def\restoreinsertiondata#1%
+% {\global\skip #1\skip \csname\??insertionbackup\string#1\endcsname
+% \global\count#1\count\csname\??insertionbackup\string#1\endcsname
+% \global\dimen#1\dimen\csname\??insertionbackup\string#1\endcsname}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-lay.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-lay.mkxl
new file mode 100644
index 00000000000..21cb48f20de
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-lay.mkxl
@@ -0,0 +1,1630 @@
+%D \module
+%D [ file=page-lay,
+%D version=2000.10.20, % copied from main-001
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Layout Specification,
+%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 Page Macros / Layout Specification}
+
+%D Before you start wondering why some of the page related modules skip upward or
+%D left in order to place elements, you must realize that the reference point is the
+%D top left corner of the main typesetting area. One reason for this choice is that
+%D it suited some viewers that displayed page areas. Another reason is that margins,
+%D edges and top and bottom areas are kind of virtual, while the header, text and
+%D footer areas normally determine the text flow.
+
+\unprotect
+
+%D The dimensions related to layout areas are represented by real dimensions.
+
+\newdimen\paperheight \paperheight = 297mm
+\newdimen\paperwidth \paperwidth = 210mm
+\newdimen\paperoffset \paperoffset = \zeropoint
+\newdimen\paperbleed \paperbleed = \zeropoint
+\newdimen\spinewidth \spinewidth = \zeropoint
+
+\newdimen\printpaperheight \printpaperheight = \paperheight
+\newdimen\printpaperwidth \printpaperwidth = \paperwidth
+
+\newdimen\makeupheight % calculated
+\newdimen\makeupwidth % calculated
+
+\newdimen\textheight % calculated
+\newdimen\textwidth % calculated
+
+\newdimen\topspace \topspace = 2cm
+\newdimen\backspace \backspace = \topspace
+\newdimen\cutspace \cutspace = \zeropoint
+\newdimen\bottomspace \bottomspace = \zeropoint
+
+\newdimen\headerheight \headerheight = 2cm
+\newdimen\footerheight \footerheight = \headerheight
+
+\newdimen\topoffset \topoffset = \zeropoint
+\newdimen\backoffset \backoffset = \topoffset
+
+\newdimen\leftmarginwidth \leftmarginwidth = 3cm
+\newdimen\rightmarginwidth \rightmarginwidth = \leftmarginwidth
+
+\newdimen\leftedgewidth \leftedgewidth = 3cm
+\newdimen\rightedgewidth \rightedgewidth = \leftedgewidth
+
+\newdimen\topheight \topheight = \zeropoint
+\newdimen\bottomheight \bottomheight = \topheight
+
+\newcount\layoutlines \layoutlines = \zerocount
+\newcount\layoutcolumns \layoutcolumns = \zerocount
+\newdimen\layoutcolumndistance \layoutcolumndistance = \zeropoint
+\newdimen\layoutcolumnwidth \layoutcolumnwidth = \zeropoint
+
+\newdimen\totaltextwidth
+
+%D The next series of dimensions are complemented by left and rights ones.
+
+\newdimen\margindistance
+\newdimen\edgedistance
+\newdimen\marginwidth
+\newdimen\edgewidth
+
+%D Because a distance does not really makes sense when there is no area, we use a
+%D zero distance in case there is no area.
+
+%D The horizontal distances are:
+
+\newdimen\leftedgedistance
+\newdimen\rightedgedistance
+\newdimen\leftmargindistance
+\newdimen\rightmargindistance
+
+%D The vertical distances are:
+
+\newdimen\topdistance
+\newdimen\headerdistance
+\newdimen\textdistance
+\newdimen\footerdistance
+\newdimen\bottomdistance
+
+\newdimen\textovershoot % available in pagebuilder
+
+%D We need to calculate the extra distances:
+
+\newdimen\naturalmarginwidth
+\newdimen\naturaledgewidth
+\newdimen\naturalmargindistance
+\newdimen\naturaledgedistance
+\newdimen\naturalleftedgedistance
+\newdimen\naturalrightedgedistance
+\newdimen\naturalleftmargindistance
+\newdimen\naturalrightmargindistance
+\newdimen\naturaltopdistance
+\newdimen\naturalheaderdistance
+\newdimen\naturaltextdistance
+\newdimen\naturalfooterdistance
+\newdimen\naturalbottomdistance
+
+%D Now we've come to the setup and definition commands.
+
+\installcorenamespace{layout}
+\installcorenamespace{layoutlocation}
+\installcorenamespace{layoutalternative}
+\installcorenamespace{layoutcolumn}
+\installcorenamespace{layoutmethod}
+
+\installswitchcommandhandler \??layout {layout} \??layout
+
+\appendtoks
+ \doifnothing{\directlayoutparameter\c!state}{\letlayoutparameter\c!state\v!start}%
+\to \everydefinelayout
+
+\newconditional \layouthaschanged \settrue\layouthaschanged % used in mp
+
+\appendtoks
+ \ifcase\layoutsetupmode
+ % can't happen
+ \or % \setuplayout[name][key=value]
+ \ifx\previouslayout\currentlayout
+ \letlayoutparameter\c!state\v!normal % global ? still needed ?
+ \let\currentlayout\currentlayout
+ \page_layouts_synchronize
+ \page_layouts_check_next
+ \fi
+ \or % \setuplayout[key=value]
+ % we can inherit so we always synchronize
+ \letlayoutparameter\c!state\v!normal % global ? still needed ?
+ \let\currentlayout\previouslayout
+ \page_layouts_synchronize
+ \page_layouts_check_next
+ \or % \setuplayout[name]
+ \ifx\currentlayout\v!reset
+ \let\currentlayout\empty
+ \fi
+ \letlayoutparameter\c!state\v!normal % global ? still needed ?
+ \glet\currentlayout\currentlayout % global
+ \page_layouts_synchronize
+ \page_layouts_check_next
+ \or % \setuplayout (reverts to main layout)
+ \letlayoutparameter\c!state\v!normal % global ? still needed ?
+ \glet\currentlayout\empty % global
+ \page_layouts_synchronize
+ \page_layouts_check_next
+ \fi
+ \global\settrue\layouthaschanged
+\to \everysetuplayout
+
+\appendtoks
+ \global\setfalse\layouthaschanged
+\to \everyaftershipout
+
+\permanent\def\doifelselayoutdefined#1%
+ {\ifcsname\namedlayouthash{#1}\c!state\endcsname % maybe a helper
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doiflayoutdefinedelse\doifelselayoutdefined
+
+\permanent\def\layoutdistance#1#2{\ifdim\zeropoint<#1#2\else\zeropoint\fi}
+
+% \newconditional\reverselayout
+
+\def\page_layouts_set_dimensions
+ {\global\naturalmarginwidth \layoutparameter\c!margin
+ \global\naturaledgewidth \layoutparameter\c!edge
+ \global\naturalmargindistance \layoutparameter\c!margindistance
+ \global\naturaledgedistance \layoutparameter\c!edgedistance
+ \global\naturalleftedgedistance \layoutparameter\c!leftedgedistance
+ \global\naturalrightedgedistance \layoutparameter\c!rightedgedistance
+ \global\naturalleftmargindistance \layoutparameter\c!leftmargindistance
+ \global\naturalrightmargindistance\layoutparameter\c!rightmargindistance
+ \global\naturaltopdistance \layoutparameter\c!topdistance
+ \global\naturalheaderdistance \layoutparameter\c!headerdistance
+ \global\naturaltextdistance \layoutparameter\c!textdistance
+ \global\naturalfooterdistance \layoutparameter\c!footerdistance
+ \global\naturalbottomdistance \layoutparameter\c!bottomdistance
+ %
+ \global\marginwidth \naturalmarginwidth
+ \global\edgewidth \naturaledgewidth
+ \global\margindistance \naturalmargindistance
+ \global\edgedistance \naturaledgedistance
+ %
+ \global\leftedgedistance \layoutdistance\leftedgewidth \naturalleftedgedistance
+ \global\rightedgedistance \layoutdistance\rightedgewidth \naturalrightedgedistance
+ \global\leftmargindistance \layoutdistance\leftmarginwidth \naturalleftmargindistance
+ \global\rightmargindistance \layoutdistance\rightmarginwidth\naturalrightmargindistance
+ \global\topdistance \layoutdistance\topheight \naturaltopdistance
+ \global\headerdistance \layoutdistance\headerheight \naturalheaderdistance
+ \global\textdistance \naturaltextdistance
+ \global\footerdistance \layoutdistance\footerheight \naturalfooterdistance
+ \global\bottomdistance \layoutdistance\bottomheight \naturalbottomdistance}
+
+\def\page_layouts_set_distances % local in \setreducedvsize
+ {\headerdistance\layoutdistance\headerheight\naturalheaderdistance
+ \footerdistance\layoutdistance\footerheight\naturalfooterdistance}
+
+% these are wrong in the running text, assumes some swapping, needs a cleanup
+
+\newtoks\extralayoutcalculations
+
+\def\page_layouts_calculate_extras
+ {\the\extralayoutcalculations}
+
+\newtoks\everyswapmargins % watch the order !
+
+\appendtoks
+ \enforced\swapcsvalues\leftmargindistance\rightmargindistance
+ \enforced\swapcsvalues\leftedgedistance \rightedgedistance
+ \enforced\swapcsvalues\leftmarginwidth \rightmarginwidth
+ \enforced\swapcsvalues\leftedgewidth \rightedgewidth
+ %
+ \enforced\swapcsvalues\leftmargintotal \rightmargintotal
+ \enforced\swapcsvalues\leftedgetotal \rightedgetotal
+ \enforced\swapcsvalues\leftsidetotal \rightsidetotal
+ \enforced\swapcsvalues\leftcombitotal \rightcombitotal
+ \enforced\swapcsvalues\innermargintotal \outermargintotal
+ \enforced\swapcsvalues\inneredgetotal \outeredgetotal
+ \enforced\swapcsvalues\innercombitotal \outercombitotal
+ \enforced\swapcsvalues\innersidetotal \outersidetotal
+\to \everyswapmargins
+
+%D The papersize macros have a long history and we don't want to change the commands
+%D so they keep looking a bit complex.
+
+%D \macros
+%D {definepapersize}
+%D
+%D Before we start calculating layout dimensions, we will first take care of paper
+%D sizes. The first argument can be either an assignment (for defaults) or an
+%D identifier, in which case the second argument is an assignment.
+%D
+%D \showsetup{definepapersize}
+%D
+%D Yet undocumented, let's see if it gets noticed.
+%D
+%D \starttyping
+%D \definepapersize[main] [A4] [A4]
+%D \definepapersize[extra][A4,landscape][A4,landscape]
+%D
+%D \starttext
+%D \setuppapersize[main]
+%D Page 1. \page
+%D Page 2. \page
+%D \setuppapersize[extra]
+%D Page 2 \page
+%D \setuppapersize[main]
+%D Page 3. \page
+%D Page 4. \page
+%D \adaptpapersize[extra]
+%D Page 5. \page
+%D Page 6. \page
+%D \stoptext
+%D \stoptyping
+%D
+%D \macros
+%D {setuppaper,setuppapersize}
+%D
+%D When setting up the papersize on which to typeset and print, we can also
+%D determine some more characteristics.
+%D
+%D \showsetup{setuppapersize}
+%D
+%D We keep track of these features with the following
+%D variables.
+
+\installcorenamespace{layouttarget}
+\installcorenamespace{layoutpaper}
+\installcorenamespace{layoutprint}
+\installcorenamespace{layoutcurrent}
+
+\installcommandhandler \??layouttarget {layouttarget} \??layouttarget % so this is a sort of mix, not really a user command / maybe switch handler
+
+\newconditional\c_page_target_paper_mirror
+\newconstant \c_page_target_paper_orientation
+\newconstant \c_page_target_paper_reverse
+\newconditional\c_page_target_paper_landscape
+\newconditional\c_page_target_paper_negate
+
+\newconditional\c_page_target_print_mirror
+\newconstant \c_page_target_print_orientation
+\newconstant \c_page_target_print_reverse
+\newconditional\c_page_target_print_landscape
+\newconditional\c_page_target_print_negate
+\newconditional\c_page_target_print_doublesided
+
+\let\v_page_target_left_fill \relax
+\let\v_page_target_right_fill \relax
+\let\v_page_target_top_fill \relax
+\let\v_page_target_bottom_fill\relax
+
+\let\papersize \empty
+\let\printpapersize\empty
+
+\def\v_page_target_top {\namedlayouttargetparameter\papersize\c!top }
+\def\v_page_target_bottom {\namedlayouttargetparameter\papersize\c!bottom}
+\def\v_page_target_left {\namedlayouttargetparameter\papersize\c!left }
+\def\v_page_target_right {\namedlayouttargetparameter\papersize\c!right }
+\def\v_page_target_method {\rootlayouttargetparameter \c!method}
+\def\v_page_target_scale {\rootlayouttargetparameter \c!scale }
+\def\v_page_target_nx {\numexpr\rootlayouttargetparameter \c!nx \relax}
+\def\v_page_target_ny {\numexpr\rootlayouttargetparameter \c!ny \relax}
+\def\v_page_target_dx {\dimexpr\rootlayouttargetparameter \c!dx \relax}
+\def\v_page_target_dy {\dimexpr\rootlayouttargetparameter \c!dy \relax}
+\def\v_page_target_width {\dimexpr\rootlayouttargetparameter \c!width \relax}
+\def\v_page_target_height {\dimexpr\rootlayouttargetparameter \c!height \relax}
+\def\v_page_target_topspace {\dimexpr\rootlayouttargetparameter \c!topspace \relax}
+\def\v_page_target_backspace{\dimexpr\rootlayouttargetparameter \c!backspace\relax}
+\def\v_page_target_offset {\dimexpr\rootlayouttargetparameter \c!offset \relax}
+
+\def\v_page_target_xy {\numexpr\v_page_target_nx*\v_page_target_ny\relax}
+
+%D Normally we will not use this command directly but for now it works out okay. In
+%D the future we might use more of the related commands.
+
+\setuplayouttarget
+ [% these are rather special
+ \c!nx=1,
+ \c!ny=1,
+ \c!dx=\zeropoint,
+ \c!dy=\zeropoint,
+ \c!topspace=\zeropoint,
+ \c!backspace=\zeropoint,
+ \c!width=\zeropoint,
+ \c!height=\zeropoint,
+ %
+ \c!method=\v!normal,
+ \c!option=\v!max,
+ \c!alternative=\v!normal,
+ %
+ \c!scale=1,
+ \c!offset=\zeropoint,
+ %
+ \c!top=,
+ \c!bottom=,
+ \c!left=,
+ \c!right=,
+ %
+ \c!location=]
+
+% \definepapersize[name][A4][A3]
+% \definepapersize[name][settings]
+
+\permanent\tolerant\protected\def\definepapersize[#1]#*[#2]#*[#3]%
+ {\edef\currentlayouttarget{#1}%
+ \ifempty\currentlayouttarget
+ % invalid target
+ \orelse\ifhastok={#2}%
+ \definelayouttarget[#1][#2]%
+ \else
+ \edefcsname\??layoutpaper#1\endcsname{#2}%
+ \ifparameter#3\or
+ \edefcsname\??layoutprint#1\endcsname{#3}%
+ \else
+ \edefcsname\??layoutprint#1\endcsname{#2}%
+ \fi
+ \fi}
+
+\appendtoks
+ \letcsname\??layoutcurrent\currentlayouttarget\endcsname\relax
+\to \everydefinelayouttarget
+
+%def\page_paper_the_paper_size#1{\ifcsname\??layoutpaper#1\endcsname\csname\??layoutpaper#1\endcsname\else#1\fi}
+%def\page_paper_the_print_size#1{\ifcsname\??layoutprint#1\endcsname\csname\??layoutprint#1\endcsname\else#1\fi}
+
+\def\page_paper_the_paper_size#1{\ifcsname\??layoutpaper#1\endcsname\lastnamedcs\else#1\fi}
+\def\page_paper_the_print_size#1{\ifcsname\??layoutprint#1\endcsname\lastnamedcs\else#1\fi}
+
+% \setuppaper [page=A4,paper=A3] % the k/v variant, changes the current page mapping
+% \setuppapersize[A4][a=b,c=d] % the k/v variant, changes nothing, just settings
+% \setuppapersize[A4][A3] % changes the current page mapping
+
+\let\page_paper_reinstate\relax
+\let\page_paper_restore \relax
+
+\permanent\tolerant\protected\def\setuppapersize[#1]#*[#2]%
+ {\ifarguments
+ \page_paper_restore
+ \orelse\ifhastok={#1}%
+ \page_paper_setup_size_settings[#1]%
+ \orelse\ifhastok={#2}%
+ \page_paper_setup_size_settings_by_name[#1][#2]%
+ \else
+ \page_paper_setup_size_change_size[#1][#2]%
+ \fi}
+
+\protected\def\page_paper_setup_size_settings[#1]% sometimes used to set paper/print size
+ {\let\currentlayouttarget\empty
+ \edef\m_layouttarget_paper_saved{\page_paper_the_paper_size{\layouttargetparameter\c!page }}%
+ \edef\m_layouttarget_print_saved{\page_paper_the_print_size{\layouttargetparameter\c!paper}}%
+ \setupcurrentlayouttarget[#1]%
+ \edef\m_layouttarget_paper{\page_paper_the_paper_size{\layouttargetparameter\c!page }}%
+ \edef\m_layouttarget_print{\page_paper_the_print_size{\layouttargetparameter\c!paper}}%
+ \ifx\m_layouttarget_paper_saved\m_layouttarget_paper
+ \ifx\m_layouttarget_print_saved\m_layouttarget_print
+ % we didn't change the size, maybe only sx or sy or so
+ \else
+ \page_paper_setup_size_settings_recalibrate
+ \fi
+ \else
+ \page_paper_setup_size_settings_recalibrate
+ \fi}
+
+\def\page_paper_setup_size_settings_recalibrate
+ {\ifempty\m_layouttarget_paper
+ % forget about it
+ \else
+ \ifempty\m_layouttarget_print
+ \let\m_layouttarget_print\m_layouttarget_paper
+ \fi
+ \page_paper_set_current[\m_layouttarget_paper][\m_layouttarget_print]%
+ \fi
+ \letlayouttargetparameter\c!page \papersize
+ \letlayouttargetparameter\c!paper\printpapersize}
+
+\protected\def\page_paper_setup_size_settings_by_name[#1][#2]%
+ {\def\currentlayouttarget{\page_paper_the_paper_size{#1}}%
+ \setuplayouttarget[#2]}
+
+\protected\def\page_paper_setup_size_change_size[#1][#2]%
+ {\doifelsenothing{#2}
+ {\page_paper_set_current[#1][#1]}
+ {\page_paper_set_current[#1][#2]}}
+
+\permanent\let\setuppaper\page_paper_setup_size_settings
+
+\permanent\protected\def\adaptpapersize
+ {\glet\page_paper_reinstate\page_paper_restore
+ \setuppapersize}
+
+\appendtoks
+ \page_paper_reinstate
+ \glet\page_paper_reinstate\relax
+\to \everyaftershipout
+
+\protected\def\page_paper_set_restore#1#2%
+ {\xdef\page_paper_restore{\page_paper_set_current_indeed[#1][#2]}}
+
+\protected\def\page_paper_set_current[#1][#2]%
+ {\normalexpanded{\page_paper_set_current_indeed
+ [\page_paper_the_paper_size{#1}]%
+ [\page_paper_the_print_size{#2}]}}
+
+\protected\def\page_paper_reset_paper
+ {\global\setfalse\c_page_target_paper_landscape
+ \global\setfalse\c_page_target_paper_mirror
+ \global\setfalse\c_page_target_paper_negate
+ \global\c_page_target_paper_orientation\uprotationangle
+ \global\c_page_target_paper_reverse \uprotationangle}
+
+\protected\def\page_paper_reset_print
+ {\global\setfalse\c_page_target_print_landscape
+ \global\setfalse\c_page_target_print_mirror
+ \global\setfalse\c_page_target_print_negate
+ \global\c_page_target_print_orientation\uprotationangle
+ \global\c_page_target_print_reverse \uprotationangle}
+
+\letvalue{\??layoutpaper\v!reset}\page_paper_reset_paper
+\letvalue{\??layoutprint\v!reset}\page_paper_reset_print
+
+\setvalue{\??layoutpaper\v!landscape }{\global\settrue\c_page_target_paper_landscape}
+\setvalue{\??layoutpaper\v!mirrored }{\global\settrue\c_page_target_paper_mirror}
+\setvalue{\??layoutpaper\v!negative }{\global\settrue\c_page_target_paper_negate}
+\setvalue{\??layoutpaper\v!rotated }{\global\c_page_target_paper_orientation\rightrotationangle
+ \global\c_page_target_paper_reverse \leftrotationangle}
+\setvalue{\??layoutpaper\number\rightrotationangle}{\global\c_page_target_paper_orientation\rightrotationangle
+ \global\c_page_target_paper_reverse \leftrotationangle}
+\setvalue{\??layoutpaper\number\downrotationangle }{\global\c_page_target_paper_orientation\downrotationangle
+ \global\c_page_target_paper_reverse \zerocount}
+\setvalue{\??layoutpaper\number\leftrotationangle }{\global\c_page_target_paper_orientation\leftrotationangle
+ \global\c_page_target_paper_reverse \rightrotationangle}
+
+\setvalue{\??layoutprint\v!landscape }{\global\settrue\c_page_target_print_landscape}
+\setvalue{\??layoutprint\v!mirrored }{\global\settrue\c_page_target_print_mirror}
+\setvalue{\??layoutprint\v!negative }{\global\settrue\c_page_target_print_negate}
+\setvalue{\??layoutprint\v!rotated }{\global\c_page_target_print_orientation\rightrotationangle
+ \global\c_page_target_print_reverse \leftrotationangle}
+\setvalue{\??layoutprint\number\rightrotationangle}{\global\c_page_target_print_orientation\rightrotationangle
+ \global\c_page_target_print_reverse \leftrotationangle}
+\setvalue{\??layoutprint\number\downrotationangle }{\global\c_page_target_print_orientation\downrotationangle
+ \global\c_page_target_print_reverse \zerocount}
+\setvalue{\??layoutprint\number\leftrotationangle }{\global\c_page_target_print_orientation\leftrotationangle
+ \global\c_page_target_print_reverse \rightrotationangle}
+
+%def\page_paper_handle_page_option #1{\ifcsname\??layoutpaper#1\endcsname\csname\??layoutpaper#1\endcsname\fi}
+%def\page_paper_handle_print_option#1{\ifcsname\??layoutprint#1\endcsname\csname\??layoutprint#1\endcsname\fi}
+
+\def\page_paper_handle_page_option #1{\begincsname\??layoutpaper#1\endcsname}
+\def\page_paper_handle_print_option#1{\begincsname\??layoutprint#1\endcsname}
+
+\protected\def\page_paper_identify_target#1%
+ {\ifcsname\??layoutcurrent#1\endcsname
+ \edef\currentlayouttarget{#1}%
+ \fi}
+
+\newdimen\d_page_minimum_paper_size \d_page_minimum_paper_size\luaexpr{math.pi}\onebasepoint
+
+\protected\def\page_paper_set_current_indeed[#1][#2]%
+ {\edef\m_page_asked_paper{#1}% can be the restores
+ \edef\m_page_asked_print{#2}%
+ %
+ \page_paper_set_restore\m_page_asked_paper\m_page_asked_print
+ %
+ % locate page target
+ \let\currentlayouttarget\empty
+ \page_paper_reset_paper
+ \processcommacommand[\m_page_asked_paper]\page_paper_identify_target
+ \ifempty\currentlayouttarget
+ \let\currentlayouttarget\currentpage
+ \fi
+ \glet\papersize\currentlayouttarget
+ \page_paper_reset_paper
+ \processcommacommand[\m_page_asked_paper]\page_paper_handle_page_option
+ \global\paperwidth \layouttargetparameter\c!width \relax
+ \global\paperheight\layouttargetparameter\c!height\relax
+ \ifdim\paperwidth<\d_page_minimum_paper_size
+ \global\paperwidth\d_page_minimum_paper_size
+ \fi
+ \ifdim\paperheight<\d_page_minimum_paper_size
+ \global\paperheight\d_page_minimum_paper_size
+ \fi
+ \ifconditional\c_page_target_paper_landscape
+ \enforced\global\swapcsvalues\paperwidth\paperheight
+ \fi
+ \ifinpagebody % local freeze
+ \normalexpanded{\setlayouttargetparameter\c!height{\the\paperheight}}%
+ \normalexpanded{\setlayouttargetparameter\c!width {\the\paperwidth }}%
+ \fi
+ %
+ \page_paper_set_offsets
+ % locate paper target
+ \page_paper_reset_print
+ \processcommacommand[\m_page_asked_print]\page_paper_identify_target
+ \glet\printpapersize\currentlayouttarget
+ \page_paper_reset_print
+ \processcommacommand[\m_page_asked_print]\page_paper_handle_print_option
+ \global\printpaperwidth \layouttargetparameter\c!width \relax
+ \global\printpaperheight\layouttargetparameter\c!height\relax
+ \ifdim\printpaperwidth<\onepoint
+ \global\printpaperwidth\paperwidth
+ \fi
+ \ifdim\printpaperheight<\onepoint
+ \global\printpaperheight\paperheight
+ \fi
+ \ifconditional\c_page_target_print_landscape
+ \enforced\global\swapcsvalues\printpaperwidth\printpaperheight
+ \fi
+ % this check can be confusing, so we've added the possibility
+ % to bypass this test: \setuppapersize[option=fit]
+ \edef\m_page_asked_option{\rootlayouttargetparameter\c!option}%
+ \ifx\m_page_asked_option\v!max % \v!fit is
+ \begingroup
+ % we need to pre-swap else we get the wrong paper size
+ \ifnum\c_page_target_paper_orientation=\rightrotationangle
+ \enforced\swapcsvalues\paperwidth\paperheight
+ \orelse\ifnum\c_page_target_paper_orientation=\leftrotationangle
+ \enforced\swapcsvalues\paperwidth\paperheight
+ \fi
+ \ifnum\c_page_target_print_orientation=\rightrotationangle
+ \enforced\swapcsvalues\printpaperwidth\printpaperheight
+ \orelse\ifnum\c_page_target_print_orientation=\leftrotationangle
+ \enforced\swapcsvalues\printpaperwidth\printpaperheight
+ \fi
+ \ifdim\paperheight>\printpaperheight
+ \global\printpaperheight\paperheight
+ \writestatus\m!system{print height forced to paper height}%
+ \fi
+ \ifdim\paperwidth>\printpaperwidth
+ \global\printpaperwidth\paperwidth
+ \writestatus\m!system{print width forced to paper width}%
+ \fi
+ \endgroup
+ \fi
+ %\writestatus{layout target}{(\the\paperwidth,\the\paperheight) -> (\the\printpaperwidth,\the\printpaperheight)}%
+ \page_layouts_synchronize
+ % new but we assume \setuplayout
+ \scrn_canvas_synchronize_only}
+
+\ifdefined\scrn_canvas_synchronize_only \else
+ \let\scrn_canvas_synchronize_only\relax
+\fi
+
+\ifdefined\page_paper_set_offsets \else
+
+ \def\page_paper_set_offsets % will move
+ {\global\paperoffset\v_page_target_offset
+ \global\advance\paperwidth -2\paperoffset
+ \global\advance\paperheight-2\paperoffset}
+
+\fi
+
+\ifdefined\synchronizegridsnapping \else
+ \let\synchronizegridsnapping\relax
+\fi
+
+\let\p_page_layouts_width \empty
+\let\p_page_layouts_height\empty
+
+\def\page_layouts_synchronize
+ {\setups[\layoutparameter\c!preset]\relax
+ \global\leftmarginwidth \layoutparameter\c!leftmargin
+ \global\rightmarginwidth\layoutparameter\c!rightmargin
+ \global\leftedgewidth \layoutparameter\c!leftedge
+ \global\rightedgewidth \layoutparameter\c!rightedge
+ \global\headerheight \layoutparameter\c!header
+ \global\footerheight \layoutparameter\c!footer
+ \global\bottomheight \layoutparameter\c!bottom
+ \global\topheight \layoutparameter\c!top
+ \global\backspace \layoutparameter\c!backspace
+ \global\topspace \layoutparameter\c!topspace
+ \page_layouts_set_dimensions
+ \synchronizegridsnapping
+ \usesetupsparameter\layoutparameter % depends on gridsnapping !
+ \synchronizewhitespace
+ \synchronizeblank
+ \setupinterlinespace[\v!reset]% \synchronizegloballinespecs
+ \global\cutspace\layoutparameter\c!cutspace\relax
+ \edef\p_page_layouts_width{\layoutparameter\c!width}%
+ \ifx\p_page_layouts_width\v!middle
+ \ifzeropt\cutspace
+ \global\cutspace\backspace
+ \fi
+ \global\makeupwidth\dimexpr\paperwidth-\backspace-\cutspace\relax
+ \orelse\ifx\p_page_layouts_width\v!fit
+ \ifzeropt\cutspace
+ \global\cutspace\backspace
+ \fi
+ \global\makeupwidth\dimexpr\paperwidth-\cutspace\relax
+ \scratchdimen\dimexpr\backspace
+ -\leftedgewidth -\leftedgedistance
+ -\leftmarginwidth-\leftmargindistance\relax
+ \ifdim\scratchdimen<\zeropoint
+ \scratchdimen\zeropoint
+ \fi
+ \global\advance\makeupwidth\dimexpr
+ -\rightmargindistance-\rightmarginwidth
+ -\rightedgedistance -\rightedgewidth
+ -\scratchdimen\relax
+ \else
+ \global\makeupwidth\p_page_layouts_width\relax
+ \ifzeropt\cutspace
+ \global\cutspace\dimexpr\paperwidth-\makeupwidth-\backspace\relax
+ % \else
+ % A kind of inconsistent specification, but used
+ % in for instance s-pre-19.tex; the cutspace is
+ % used only for determining some kind of right
+ % margin; don't use this in doublesided mode
+ \fi
+ \fi
+ \scratchdimen\layoutparameter\c!bottomspace\relax
+ %\ifzeropt\scratchdimen
+ % \scratchdimen\topspace
+ %\fi
+ \global\bottomspace\layoutparameter\c!bottomspace\relax
+ \global\layoutlines0\number\layoutparameter\c!lines\relax % may be empty
+ \ifcase\layoutlines
+ \edef\p_page_layouts_height{\layoutparameter\c!height}%
+ \ifx\p_page_layouts_height\v!middle
+ \ifzeropt\bottomspace
+ \global\bottomspace\topspace
+ \fi
+ \global\makeupheight\dimexpr\paperheight-\topspace-\bottomspace\relax
+ \orelse\ifx\p_page_layouts_height\v!fit
+ \ifzeropt\bottomspace
+ \global\bottomspace\topspace
+ \fi
+ \global\makeupheight\dimexpr\paperheight-\bottomspace\relax
+ \scratchdimen\dimexpr\topspace-\topheight-\topdistance\relax
+ \ifdim\scratchdimen<\zeropoint
+ \scratchdimen\zeropoint
+ \fi
+ \global\advance\makeupheight\dimexpr-\bottomdistance-\bottomheight-\scratchdimen\relax
+ \else
+ \global\makeupheight\layoutparameter\c!height\relax
+ \ifzeropt\bottomspace
+ \global\bottomspace\dimexpr\paperheight-\makeupheight-\topspace\relax
+ % \else
+ % inconsistent specification
+ \fi
+ \fi
+ \else
+ % beware, when the bodyfont changes (switched) this will change as well; implementing
+ % a global lineheight is tricky: should we take the bodyfont interlinespace or the one set
+ % independent of the bodyfont (before or after a layout spec); way too fuzzy, so we
+ % stick to the current method (after a night of experimenting ...2003/10/13)
+ \global\makeupheight\dimexpr
+ \layoutparameter\c!lines\lineheight-\strutheight+\topskip+
+ \headerdistance+\headerheight+\footerdistance+\footerheight\relax
+ \fi
+ \backoffset\layoutparameter\c!horoffset\relax
+ \topoffset \layoutparameter\c!veroffset\relax
+ \ifdim\makeupwidth<\onepoint
+ \global\makeupwidth\onepoint
+ \fi
+ \ifdim\makeupheight<\onepoint
+ \global\makeupheight\onepoint
+ \fi
+ % handy in page builder
+ \global\totaltextwidth\dimexpr
+ \leftedgetotal
+ +\leftmargintotal
+ +\makeupwidth
+ +\rightmargintotal
+ +\rightedgetotal
+ \relax
+ % \page_layouts_check_next % here ?
+ \page_layouts_check_direction
+ \page_layouts_calculate_extras
+ \page_target_check_centering
+ \calculatehsizes
+ \calculatevsizes
+ \page_layouts_check_pseudo_columns
+ \page_backgrounds_recalculate}
+
+\def\page_layouts_check_direction
+ {\edef\p_direction{\layoutparameter\c!direction}%
+ \ifx\p_direction\v!reverse
+ \enforced\global\swapcsvalues\naturalleftedgedistance \naturalrightedgedistance
+ \enforced\global\swapcsvalues\naturalleftmargindistance\naturalrightmargindistance
+ \enforced\global\swapcsvalues\leftedgedistance \rightedgedistance
+ \enforced\global\swapcsvalues\leftmargindistance \rightmargindistance
+ \enforced\global\swapcsvalues\leftmarginwidth \rightmarginwidth
+ \enforced\global\swapcsvalues\leftedgewidth \rightedgewidth
+ \enforced\global\swapcsvalues\backspace \cutspace
+ \expandafter\setsystemmode
+ \else
+ \expandafter\resetsystemmode
+ \fi{reverselayout}}
+
+\def\page_layouts_check_pseudo_columns
+ {\global\layoutcolumns\layoutparameter\c!columns
+ \global\layoutcolumndistance\layoutparameter\c!columndistance
+ \global\layoutcolumnwidth\dimexpr\makeupwidth-\layoutcolumns\layoutcolumndistance+\layoutcolumndistance\relax
+ \ifnum\layoutcolumns>\plusone
+ \global\divide\layoutcolumnwidth\layoutcolumns
+ \dorecurse\layoutcolumns\page_layouts_check_pseudo_column
+ \fi}
+
+\def\page_layouts_check_pseudo_column
+ {\xdefcsname\??layoutcolumn\recurselevel\endcsname
+ {\the\numexpr\recurselevel-\plusone\relax\dimexpr\layoutcolumnwidth+\layoutcolumndistance\relax}}
+
+\letvalue{\??layoutcolumn0}\zeropoint
+
+\permanent\def\layoutcolumnoffset#1% can travel around so we can't use \lastnamedcs
+ {\csname\??layoutcolumn\ifcsname\??layoutcolumn#1\endcsname#1\else0\fi\endcsname}
+
+\def\page_layouts_synchronize_at_start
+ {\ifdim\makeupheight=\layoutlines\lineheight \else % weird check
+ \page_layouts_synchronize
+ \fi}
+
+\appendtoks
+ \page_layouts_synchronize_at_start % still needed?
+\to \everystarttext
+
+% document:
+%
+% \setuplayout[odd][state=stop] \setuplayout[even][state=stop] \setuplayout[page]
+%
+% \startstandardmakeup[page=blank] ... \stopstandardmakeup
+
+\ifdefined\lastpage \else \let\lastpage\!!plusone \fi
+
+\permanent\protected\def\page_layouts_change#1%
+ {%\writestatus\m!layouts{changing to layout #1}%
+ \xdef\currentlayout{#1}%
+ \page_layouts_synchronize}
+
+\aliased\let\changetolayout\page_layouts_change % also public
+
+\def\v_real_page_normal {\the\realpageno}
+\def\v_real_page_reverse{-\the\numexpr\lastpage-\realpageno\relax}
+
+\def\v_real_page_odd_or_even
+ {\ifodd\pagenoshift
+ \ifodd\realpageno\v!even\else\v!odd \fi
+ \else
+ \ifodd\realpageno\v!odd \else\v!even\fi
+ \fi}
+
+\let\v_real_page_current\v!current
+
+\def\v_real_page_named
+ {\ifnum\lastpage=\realpageno
+ \v!last
+ \orelse\ifnum\plusone=\realpageno
+ \v!first
+ \else
+ \__unknown__
+ \fi}
+
+\let\v_page_layouts_pre_check\relax
+
+\def\page_layouts_check_default_indeed#1%
+ {\edef\m_page_check{#1}
+ \edef\m_page_state{\namedlayoutparameter\m_page_check\c!state}%
+ \ifx\m_page_state\v!start
+ \glet\v_page_layouts_pre_check\currentlayout
+ \glet\currentlayout\m_page_check
+ \page_layouts_synchronize
+ \orelse\ifx\m_page_state\v!repeat
+ \glet\v_page_layouts_pre_check\relax
+ \glet\currentlayout\m_page_check
+ \page_layouts_synchronize
+ \fi}
+
+\def\page_layouts_check_revert
+ {\glet\currentlayout\v_page_layouts_pre_check
+ \glet\v_page_layouts_pre_check\relax
+ \page_layouts_synchronize}
+
+\def\page_layouts_check_default
+ {\ifcsname\namedlayouthash\v_real_page_normal\c!state\endcsname
+ \page_layouts_check_default_indeed\v_real_page_normal
+ \orelse\ifcsname\namedlayouthash\v_real_page_reverse\c!state\endcsname
+ \page_layouts_check_default_indeed\v_real_page_reverse
+ \orelse\ifcsname\namedlayouthash\v_real_page_named\c!state\endcsname
+ \page_layouts_check_default_indeed\v_real_page_named
+ \orelse\ifcsname\namedlayouthash\v_real_page_current\c!state\endcsname
+ \page_layouts_check_default_indeed\v_real_page_current
+ \orelse\ifcsname\namedlayouthash\v_real_page_odd_or_even\c!state\endcsname
+ \page_layouts_check_default_indeed\v_real_page_odd_or_even
+ \orelse\ifrelax\v_page_layouts_pre_check
+ % okay
+ \else
+ \page_layouts_check_revert
+ \fi}
+
+\permanent\protected\def\installlayoutmethod#1#2%
+ {\gdefcsname\??layoutmethod#1\endcsname{#2}}
+
+\installlayoutmethod\v!default{\page_layouts_check_default}
+\installlayoutmethod\v!normal {\page_layouts_check_default}
+
+% \def\page_layouts_check_next
+% {\csname\??layoutmethod\ifcsname\??layoutmethod\layoutparameter\c!method\endcsname
+% \layoutparameter\c!method
+% \else
+% \v!normal
+% \fi\endcsname}
+
+\permanent\protected\def\page_layouts_check_next
+ {\ifcsname\??layoutmethod\layoutparameter\c!method\endcsname
+ \lastnamedcs
+ \else
+ \page_layouts_check_default
+ \fi}
+
+\aliased\let\checkcurrentlayout\page_layouts_check_next % public and used in naw, so this synonym will stay
+
+% inheritance
+%
+% \definelayout
+% [test]
+% [width=12cm,
+% height=10cm]
+%
+% \definelayout
+% [more]
+% [test]
+% [height=12cm]
+%
+% testcase
+%
+% \setuppagenumbering[alternative=doublesided]
+%
+% \setuplayout [width=11cm]
+% \definelayout [odd] [backspace=1cm]
+% \definelayout [even] [backspace=4cm]
+% \definelayout [5] [backspace=5cm]
+% \definelayout [6] [backspace=5cm]
+% \definelayout [-2] [backspace=0cm,cutspace=0cm]
+% \definelayout [last] [backspace=0cm,cutspace=0cm]
+%
+% \checkcurrentlayout \showframe
+%
+% \starttext
+% \dorecurse{20} {\input knuth \endgraf \input tufte \endgraf}
+% \stoptext
+
+% Because we want to keep the set parameters as they are we use some
+% helpers to communicate between the several page building related
+% mechanism.
+
+\appendtoks \page_layouts_check_next \to \everystarttext
+\appendtoks \page_layouts_check_next \to \everyaftershipout
+
+\newconditional\c_page_layouts_location_is_set
+\newconditional\c_page_layouts_location_is_middle
+
+\def\page_layouts_location_reset % we start in the left top and mirror right pages
+ {\setfalse\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
+ \let\v_page_target_left_fill \relax
+ \let\v_page_target_right_fill \hss % ? \relax
+ \let\v_page_target_top_fill \relax
+ \let\v_page_target_bottom_fill\vss} % \relax}
+
+\setvalue{\??layoutlocation\v!right }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
+ \let\v_page_target_left_fill \hss
+ \let\v_page_target_right_fill \relax}
+\setvalue{\??layoutlocation\v!left }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
+ \let\v_page_target_left_fill \relax
+ \let\v_page_target_right_fill \hss}
+\setvalue{\??layoutlocation\v!bottom }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
+ \let\v_page_target_top_fill \vss
+ \let\v_page_target_bottom_fill\relax}
+\setvalue{\??layoutlocation\v!top }{\settrue\c_page_layouts_location_is_set
+ \setfalse\c_page_layouts_location_is_middle
+ \let\v_page_target_top_fill \relax
+ \let\v_page_target_bottom_fill\vss}
+\setvalue{\??layoutlocation\v!middle }{\settrue\c_page_layouts_location_is_set
+ \settrue\c_page_layouts_location_is_middle
+ \let\v_page_target_left_fill \hss
+ \let\v_page_target_right_fill \hss
+ \let\v_page_target_top_fill \vss
+ \let\v_page_target_bottom_fill\vss}
+\setvalue{\??layoutlocation\empty }{\setfalse\c_page_layouts_location_is_set % default also signal to scrn_
+ \setfalse\c_page_layouts_location_is_middle
+ \let\v_page_target_right_fill \hss
+ \let\v_page_target_bottom_fill\hss}
+\setvalue{\??layoutlocation\v!doublesided}{\settrue \c_page_target_print_doublesided}
+\setvalue{\??layoutlocation\v!singlesided}{\setfalse\c_page_target_print_doublesided}
+
+\def\page_target_check_centering_indeed#1%
+ % {\ifcsname\??layoutlocation#1\endcsname\csname\??layoutlocation#1\endcsname\fi}
+ {\begincsname\??layoutlocation#1\endcsname}
+
+\protected\def\page_target_check_centering
+ {\setfalse\c_page_target_print_doublesided
+ \page_layouts_location_reset
+ \processcommacommand[\layoutparameter\c!location]\page_target_check_centering_indeed}
+
+% installers
+
+\permanent\protected\def\installlayoutalternative#1#2%
+ {\gdefcsname\??layoutalternative#1\endcsname{#2}}
+
+\def\page_boxes_construct_content_default#1#2#3% targetbox flusher box
+ {\setbox#1\vpack % was \vbox
+ {\offinterlineskip
+ \begingroup % needed ?
+ \uselayoutstyleandcolor\c!style\c!color
+ \offinterlineskip
+ \page_layouts_insert_elements % zero size
+ \endgroup
+ \page_insert_body#2#3}}% including footnotes
+
+\installlayoutalternative\v!default{\page_boxes_construct_content_default}
+\installlayoutalternative\v!normal {\page_boxes_construct_content_default}
+
+% \def\page_boxes_construct_content % targetbox flusher box
+% {\csname\??layoutalternative\ifcsname\??layoutalternative\layoutparameter\c!alternative\endcsname
+% \layoutparameter\c!alternative
+% \else
+% \v!normal
+% \fi\endcsname}
+
+\def\page_boxes_construct_content % targetbox flusher box
+ {\ifcsname\??layoutalternative\layoutparameter\c!alternative\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\page_boxes_construct_content_default
+ \fi}
+
+%D \macros
+%D {adaptlayout}
+
+\installcorenamespace{adaptlayout}
+\installcorenamespace{pageadaptations}
+
+\installsetuponlycommandhandler \??adaptlayout {adaptlayout}
+
+\newdimen\d_page_adepts_pushed_text_height
+\newdimen\d_page_adepts_pushed_footer_height
+\newdimen\d_page_adepts_height
+\newdimen\d_page_adapts_delta
+
+\permanent\protected\tolerant\def\adaptlayout[#1]#*[#2]%
+ {\ifparameter#2\or
+ \processcommalist[#1]{\page_adapts_layout_register{#2}}%
+ \page_adapts_check
+ \else
+ \page_adapts_layout_indeed{#1}%
+ \fi}
+
+\def\page_adapts_layout_register#1#2%
+ {\gdefcsname\??pageadaptations#2\endcsname{\page_adapts_layout_indeed{#1}}}
+
+\let\p_adapts_height\zeropoint
+\let\p_adapts_lines \zerocount
+
+\def\page_adapts_layout_indeed#1%
+ {\setupcurrentadaptlayout[\c!height=\zeropoint,\c!lines=\zerocount,#1]%
+ \page_adepts_push
+ \edef\p_adapts_height{\adaptlayoutparameter\c!height}%
+ \edef\p_adapts_lines {\adaptlayoutparameter\c!lines}%
+ \ifx\p_adapts_height\v!max
+ \global\d_page_adepts_height\footerheight
+ \else
+ \global\d_page_adepts_height\dimexpr
+ \ifnum\p_adapts_lines=\zerocount
+ \p_adapts_height
+ \else
+ \p_adapts_lines\openlineheight
+ \fi
+ \relax
+ \ifdim\d_page_adepts_height>\footerheight
+ \global\d_page_adepts_height\footerheight
+ \fi
+ \fi
+ \global\advance\textheight \d_page_adepts_height
+ \global\advance\footerheight-\d_page_adepts_height
+ \showmessage\m!layouts1{\the\d_page_adepts_height,\the\realpageno}%
+ % this will become a better one (do we need insert correction?)
+ \page_otr_command_set_vsize
+ %
+ \page_backgrounds_recalculate
+ \glet\page_adepts_push\relax
+ \glet\page_adepts_pop\page_adepts_pop_indeed}
+
+% \def\page_adapts_check
+% {\csname\??pageadaptations\the\ifcsname\??pageadaptations\the\realpageno\endcsname\realpageno\else\zerocount\fi\endcsname}
+%
+% \def\page_adapts_reset
+% {\ifcsname\??pageadaptations\the\realpageno\endcsname
+% \global\undefinevalue{\??pageadaptations\the\realpageno}%
+% \fi}
+
+\def\page_adapts_check
+ {\begincsname\??pageadaptations\the\realpageno\endcsname}
+
+\def\page_adapts_reset
+ {\ifcsname\??pageadaptations\the\realpageno\endcsname
+ \gletcsname\??pageadaptations\the\realpageno\endcsname\relax
+ \fi}
+
+\def\page_adepts_push_indeed
+ {\global\d_page_adepts_pushed_text_height \textheight
+ \global\d_page_adepts_pushed_footer_height\footerheight}
+
+\def\page_adepts_pop_indeed
+ {\global\textheight \d_page_adepts_pushed_text_height
+ \global\footerheight\d_page_adepts_pushed_footer_height
+ \page_layouts_synchronize
+ \glet\page_adepts_push\page_adepts_push_indeed
+ \glet\page_adepts_pop\relax}
+
+\appendtoks \page_adapts_check \to \everystarttext
+\appendtoks \page_adapts_reset \to \everyshipout
+
+\let\page_adepts_pop \relax
+\let\page_adepts_push\page_adepts_push_indeed
+
+\protected\def\page_adapts_synchronize % used elsewhere
+ {\page_adepts_pop
+ \page_adapts_check}
+
+\def\page_adapts_status_info % used elsewhere
+ {\ifrelax\page_adepts_pop \else
+ \space(adept: \the\d_page_adepts_height)\space
+ \fi
+ \the\realpageno}
+
+%D \macros
+%D {startlayout,stoplayout}
+
+\permanent\protected\def\startlayout[#1]%
+ {\page
+ \globalpushmacro\currentlayout
+ \doifelselayoutdefined{#1}{\setuplayout[#1]}\donothing} % {\setuplayout[\currentlayout]}}
+
+\permanent\protected\def\stoplayout
+ {\page
+ \globalpopmacro\currentlayout
+ \setuplayout[\currentlayout]}
+
+% NOG EENS NAGAAN WANNEER NU GLOBAL EN WANNEER NIET
+
+\ifdefined\doifelselayoutsomeline \else % eventually defined in page-txt
+ \let\doifelselayoutsomeline\secondofthreearguments
+\fi
+
+\permanent\def\compensatevsizeheader {\advance\textheight-\dimexpr\headerheight+\headerdistance\relax}
+\permanent\def\compensatevsizefooter {\advance\textheight-\dimexpr\footerheight+\footerdistance\relax}
+\permanent\def\globalcompensatevsizeheader{\global\advance\textheight-\dimexpr\headerheight+\headerdistance\relax}
+\permanent\def\globalcompensatevsizefooter{\global\advance\textheight-\dimexpr\footerheight+\footerdistance\relax}
+
+\permanent\def\compensatevsizeheaderzero{\headerheight\zeropoint\page_layouts_set_distances}
+\permanent\def\compensatevsizefooterzero{\footerheight\zeropoint\page_layouts_set_distances}
+
+\def\page_layouts_set_modes
+ {\ifzeropt\headerheight
+ \resetsystemmode\v!header
+ \else
+ \setsystemmode\v!header
+ \fi
+ \ifzeropt\footerheight
+ \resetsystemmode\v!footer
+ \else
+ \setsystemmode\v!footer
+ \fi}
+
+\permanent\protected\def\calculatevsizes % name will change
+ {\textheight\makeupheight
+ \doifelselayoutsomeline\v!header\compensatevsizeheader\donothing
+ \doifelselayoutsomeline\v!footer\compensatevsizefooter\donothing
+ \page_layouts_set_modes
+ \resetglobal
+ \page_otr_command_set_vsize}
+
+\permanent\protected\def\calculateglobalvsizes % name will change
+ {\global\textheight\makeupheight
+ \doifelselayoutsomeline\v!header\globalcompensatevsizeheader\donothing
+ \doifelselayoutsomeline\v!footer\globalcompensatevsizefooter\donothing
+ \page_layouts_set_modes
+ \page_otr_command_set_vsize}
+
+\permanent\protected\def\calculatereducedvsizes % name will change
+ {\textheight\makeupheight
+ \doifelselayoutsomeline\v!header\compensatevsizeheader\compensatevsizeheaderzero
+ \doifelselayoutsomeline\v!footer\compensatevsizefooter\compensatevsizefooterzero}
+
+\newdimen\innermakeupwidth % special purpose
+\newdimen\innermakeupmargin % special purpose
+
+\newconditional\innermakeupcompensation \settrue\innermakeupcompensation
+
+\permanent\def\compensatedinnermakeupmargin
+ {\dimexpr\ifconditional\innermakeupcompensation+\innermakeupmargin\else\zeropoint\fi\relax}
+
+\permanent\protected\def\freezetextwidth % name will change % \makeupwidth may be set to \textwidth
+ {\textwidth\makeupwidth % which is a tricky but valid value
+ \edef\m_currentlayout_text_width {\layoutparameter\c!textwidth }%
+ \edef\m_currentlayout_text_margin{\layoutparameter\c!textmargin}%
+ \ifempty\m_currentlayout_text_width \else
+ \textwidth\m_currentlayout_text_width % local
+ \fi
+ \global\innermakeupwidth\textwidth
+ \ifempty\m_currentlayout_text_margin
+ \global\innermakeupmargin\zeropoint
+ \else
+ \global\innermakeupmargin\m_currentlayout_text_margin\relax
+ \fi
+ \scratchdimen\dimexpr\innermakeupmargin+\innermakeupmargin\relax
+ \global\advance\innermakeupwidth-\scratchdimen
+ \advance\textwidth-\scratchdimen} % local
+
+\permanent\protected\def\calculatehsizes % name will change
+ {\freezetextwidth
+ \page_otr_command_set_hsize}
+
+%D When we start at an even page, we need to swap the layout differently. We cannot
+%D adapt the real page number, since it is used in cross referencing. The next
+%D switch is set when we start at an even page.
+
+% #single #left #right
+
+\permanent\def\doifelseoddpage
+ {\ifodd\pagenoshift
+ \expandafter\page_layouts_if_odd_else_yes
+ \else
+ \expandafter\page_layouts_if_odd_else_nop
+ \fi}
+
+\aliased\let\doifoddpageelse\doifelseoddpage
+
+\def\page_layouts_if_odd_else_yes
+ {\ifodd\realpageno
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\def\page_layouts_if_odd_else_nop
+ {\ifodd\realpageno
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\def\page_layouts_if_odd_else_again#1{\doifelseoddpage}
+
+\permanent\def\doifbothsidesoverruled
+ {\ifdoublesided
+ \expandafter\page_layouts_if_odd_else_again
+ \else
+ \expandafter\firstofthreearguments
+ \fi}
+
+\permanent\def\doifbothsides% #1 #2 #3
+ {\ifdoublesided
+ \expandafter\page_layouts_if_both_sides
+ \else
+ \expandafter\firstofthreearguments
+ \fi}
+
+\def\page_layouts_if_both_sides
+ {\ifsinglesided
+ \expandafter\firstofthreearguments
+ \else
+ \expandafter\page_layouts_if_odd_else_again
+ \fi}
+
+\newdimen\texthoffset
+
+\permanent\protected\def\settexthoffset % name will change
+ {\texthoffset\doifbothsides\backspace\backspace{\dimexpr\paperwidth-\backspace-\makeupwidth\relax}}
+
+\permanent\protected\def\goleftonpage % name will change (we could cache)
+ {\hkern-\dimexpr\leftmargindistance+\leftmarginwidth+\leftedgedistance+\leftedgewidth\relax}
+
+\permanent\def\doifelsemarginswap#1#2% protected?
+ {\doifbothsides{#1}{#1}{#2}}
+
+\aliased\let\doifmarginswapelse\doifelsemarginswap
+
+\protected\def\page_layouts_swap_margins % name will change, frozen?
+ {\doifelsemarginswap\relax\page_layouts_swap_margins_indeed}
+
+\protected\def\page_layouts_swap_margins_indeed
+ {\let\page_layouts_swap_margins \relax % to prevent local swapping
+ \let\page_layouts_swap_margins_indeed\relax % to prevent local swapping
+ \the\everyswapmargins}
+
+\permanent\def\rightorleftpageaction
+ {\ifdoublesided
+ \expandafter\page_layouts_right_or_left_page_action
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\def\page_layouts_right_or_left_page_action
+ {\ifsinglesided
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\doifelseoddpage
+ \fi}
+
+% swapping needs frozen
+
+\permanent\def\outermarginwidth {\rightorleftpageaction\rightmarginwidth \leftmarginwidth }
+\permanent\def\innermarginwidth {\rightorleftpageaction\leftmarginwidth \rightmarginwidth}
+\permanent\def\outermargindistance{\rightorleftpageaction\rightmargindistance\leftmargindistance }
+\permanent\def\innermargindistance{\rightorleftpageaction\leftmargindistance \rightmargindistance}
+
+\permanent\def\outeredgewidth {\rightorleftpageaction\rightedgewidth \leftedgewidth }
+\permanent\def\inneredgewidth {\rightorleftpageaction\leftedgewidth \rightedgewidth}
+\permanent\def\outeredgedistance {\rightorleftpageaction\rightedgedistance\leftedgedistance }
+\permanent\def\inneredgedistance {\rightorleftpageaction\leftedgedistance \rightedgedistance}
+
+\permanent\def\outerspacewidth {\rightorleftpageaction\cutspace \backspace}
+\permanent\def\innerspacewidth {\rightorleftpageaction\backspace\cutspace }
+
+\permanent\def\leftmargintotal {\dimexpr\leftmarginwidth +\leftmargindistance \relax}
+\permanent\def\rightmargintotal {\dimexpr\rightmarginwidth+\rightmargindistance\relax}
+\permanent\def\leftedgetotal {\dimexpr\leftedgewidth +\leftedgedistance \relax}
+\permanent\def\rightedgetotal {\dimexpr\rightedgewidth +\rightedgedistance \relax}
+
+\permanent\def\leftsidetotal {\dimexpr\leftmarginwidth +\leftedgetotal \relax}
+\permanent\def\rightsidetotal {\dimexpr\rightmarginwidth+\rightedgetotal\relax}
+\permanent\def\leftcombitotal {\dimexpr\leftmargintotal +\leftedgetotal \relax}
+\permanent\def\rightcombitotal {\dimexpr\rightmargintotal+\rightedgetotal\relax}
+
+\permanent\def\innermargintotal {\dimexpr\innermarginwidth+\innermargindistance\relax}
+\permanent\def\outermargintotal {\dimexpr\outermarginwidth+\outermargindistance\relax}
+\permanent\def\inneredgetotal {\dimexpr\inneredgewidth +\inneredgedistance \relax}
+\permanent\def\outeredgetotal {\dimexpr\outeredgewidth +\outeredgedistance \relax}
+
+\permanent\def\innercombitotal {\dimexpr\innermargintotal+\inneredgetotal\relax}
+\permanent\def\outercombitotal {\dimexpr\outermargintotal+\outeredgetotal\relax}
+\permanent\def\innersidetotal {\dimexpr\innermarginwidth+\inneredgetotal\relax}
+\permanent\def\outersidetotal {\dimexpr\outermarginwidth+\outeredgetotal\relax}
+
+%D \macros
+%D {startlocallayout}
+%D
+%D These macros should be used with care. They permit local layouts (as used in
+%D fitting pages, see \type {page-app.tex}). This is kind of obsolete now that we
+%D have \type {\definelayout}, so this hack will disappear in future versions.
+
+\permanent\protected\def\startlocallayout
+ {\globalpushmacro\page_paper_restore
+ \globalpushmacro\currentlayout}
+
+\permanent\protected\def\stoplocallayout
+ {\globalpopmacro\currentlayout
+ \globalpopmacro\page_paper_restore
+ \page_paper_restore
+ \setuplayout[\currentlayout]\relax} % explicit !
+
+%D \macros
+%D {showprint, showframe, showlayout, showsetups}
+%D
+%D We predefine a couple of tracing macros.
+%D
+%D \showsetup{showprint}
+%D \showsetup{showframe}
+%D \showsetup{showlayout}
+%D \showsetup{showsetups}
+%D %showsetup{showmargins}
+%D %showsetup{showgrid}
+%D %showsetup{showusage}
+
+\fetchmodulecommand \showprint \f!page_run
+\fetchmodulecommand \showframe \f!page_run
+\fetchmodulecommand \showlayout \f!page_run
+\fetchmodulecommand \showsetups \f!page_run
+\fetchmodulecommand \showmargins \f!page_run
+\fetchmodulecommand \showgrid \f!page_run
+
+\glet\page_grids_add_to_box\gobbleoneargument
+\glet\page_grids_add_to_one\gobbleoneargument
+\glet\page_grids_add_to_mix\gobbleoneargument
+
+%D The default dimensions are quite old and will not change. The funny fractions
+%D were introduced when we went from fixed dimensions to relative ones. Since
+%D \CONTEXT\ is a dutch package, the dimensions are based on the metric system. The
+%D asymmetrical layout is kind of handy for short quick||and||dirty stapled
+%D documents.
+%D
+%D Although valid, it is not a real good idea to use dimensions based on the \type
+%D {em} unit. First of all, since there are no fonts loaded yet, this dimension
+%D makes no sense, and second, you would loose track of values, since they could
+%D change while going to a new page, depending on the current font setting.
+
+\setuplayout
+ [ \c!topspace=.08417508418\paperheight, % 2.5cm
+ \c!top=\zeropoint,
+ \c!topdistance=\zeropoint,
+ \c!header=.06734006734\paperheight, % 2.0cm
+ \c!headerdistance=\zeropoint,
+ \c!height=.84175084175\paperheight, % 25.0cm
+ \c!footerdistance=\layoutparameter\c!headerdistance,
+ \c!footer=.06734006734\paperheight, % 2.0cm
+ \c!bottomdistance=\layoutparameter\c!topdistance,
+ \c!bottom=\zeropoint,
+ \c!backspace=.11904761905\paperwidth, % 2.5cm
+ \c!edge=\zeropoint,
+ \c!edgedistance=\layoutparameter\c!margindistance,
+ \c!margin=.12649983170\paperwidth, % snijwit-2*afstand
+ \c!margindistance=.02008341748\paperwidth, % 12.0pt
+ \c!leftedge=\layoutparameter\c!edge,
+ \c!leftedgedistance=\layoutparameter\c!edgedistance,
+ \c!leftmargin=\layoutparameter\c!margin,
+ \c!leftmargindistance=\layoutparameter\c!margindistance,
+ \c!width=.71428571429\paperwidth, % 15.0cm \dimexpr\
+ \c!rightmargindistance=\layoutparameter\c!margindistance,
+ \c!rightmargin=\layoutparameter\c!margin,
+ \c!rightedgedistance=\layoutparameter\c!edgedistance,
+ \c!rightedge=\layoutparameter\c!edge,
+ \c!veroffset=\zeropoint,
+ \c!bottomspace=\zeropoint,
+ \c!horoffset=\zeropoint,
+ \c!cutspace=\zeropoint,
+ \c!textwidth=, % dangerous option -> centered / local
+ \c!textmargin=, % dangerous option -> both sides
+ \c!textdistance=\zeropoint, % shift down on grid
+ \c!style=,
+ \c!color=,
+ \c!marking=\v!off,
+ \c!location=,% \v!singlesided, but unset is signal (no other default, spoils arrange)
+ \c!state=\v!start,
+ \c!scale=1,
+ \c!sx=1,
+ \c!sy=1,
+ \c!nx=1,
+ \c!ny=1,
+ \c!dx=\zeropoint,
+ \c!dy=\zeropoint,
+ \c!grid=\v!no,
+ \c!direction=\v!normal,
+ \c!preset=,
+ \c!setups=\systemsetupsprefix\s!default,
+ \c!clipoffset=\zeropoint,
+ \c!lines=0,
+ \c!paper=, % for foxet
+ \c!page=, % for foxet
+ \c!columns=\plusone,
+ \c!columndistance=\zeropoint]
+
+%D First we define a whole range of (DIN) papersizes, of which the A-series makes
+%D most sense. We enable checking.
+
+\definepapersize [A0] [\c!width=841mm,\c!height=1189mm]
+\definepapersize [A1] [\c!width=594mm,\c!height=841mm]
+\definepapersize [A2] [\c!width=420mm,\c!height=594mm]
+\definepapersize [A3] [\c!width=297mm,\c!height=420mm]
+\definepapersize [A4] [\c!width=210mm,\c!height=297mm]
+\definepapersize [A5] [\c!width=148mm,\c!height=210mm]
+\definepapersize [A6] [\c!width=105mm,\c!height=148mm]
+\definepapersize [A7] [\c!width=74mm,\c!height=105mm]
+\definepapersize [A8] [\c!width=52mm,\c!height=74mm]
+\definepapersize [A9] [\c!width=37mm,\c!height=52mm]
+\definepapersize [A10] [\c!width=26mm,\c!height=37mm]
+
+\definepapersize [A4/2][\c!width=\dimexpr297mm/2\relax,\c!height=210mm] % 148.5mm
+%definepapersize [2A5] [\c!width=296mm,\c!height=210mm] % doublewide
+
+\definepapersize [B0] [\c!width=1000mm,\c!height=1414mm]
+\definepapersize [B1] [\c!width=707mm,\c!height=1000mm]
+\definepapersize [B2] [\c!width=500mm,\c!height=707mm]
+\definepapersize [B3] [\c!width=353mm,\c!height=500mm] % [\c!width=354mm,\c!height=500mm]
+\definepapersize [B4] [\c!width=250mm,\c!height=353mm] % [\c!width=250mm,\c!height=354mm]
+\definepapersize [B5] [\c!width=176mm,\c!height=250mm] % [\c!width=177mm,\c!height=250mm]
+\definepapersize [B6] [\c!width=125mm,\c!height=176mm] % [\c!width=125mm,\c!height=177mm]
+\definepapersize [B7] [\c!width=88mm,\c!height=125mm]
+\definepapersize [B8] [\c!width=62mm,\c!height=88mm] % [\c!width=63mm,\c!height=88mm]
+\definepapersize [B9] [\c!width=44mm,\c!height=62mm] % [\c!width=44mm,\c!height=63mm]
+\definepapersize [B10] [\c!width=31mm,\c!height=44mm]
+
+\definepapersize [C0] [\c!width=917mm,\c!height=1297mm]
+\definepapersize [C1] [\c!width=648mm,\c!height=917mm] % [\c!width=649mm,\c!height=917mm]
+\definepapersize [C2] [\c!width=458mm,\c!height=648mm] % [\c!width=459mm,\c!height=649mm]
+\definepapersize [C3] [\c!width=324mm,\c!height=458mm] % [\c!width=324mm,\c!height=459mm]
+\definepapersize [C4] [\c!width=229mm,\c!height=324mm]
+\definepapersize [C5] [\c!width=162mm,\c!height=229mm]
+\definepapersize [C6] [\c!width=114mm,\c!height=162mm] % [\c!width=115mm,\c!height=162mm]
+\definepapersize [C7] [\c!width=81mm,\c!height=114mm] % [\c!width=81mm,\c!height=115mm]
+\definepapersize [C8] [\c!width=57mm,\c!height=81mm]
+\definepapersize [C9] [\c!width=40mm,\c!height=57mm]
+\definepapersize [C10] [\c!width=28mm,\c!height=40mm]
+
+%D Per August 2004 the rounding of some (seldom used) sizes were corrected top the
+%D latest DIN specifications. Peter Rolf came up with these and a few more missing
+%D sizes. Watch out: spaces and slashes!
+
+\definepapersize [4 A0] [\c!width=1682mm,\c!height=2378mm]
+\definepapersize [2 A0] [\c!width=1189mm,\c!height=1682mm]
+\definepapersize [C6/C5] [\c!width=114mm,\c!height=229mm]
+
+%D Because there are no standardized screen sizes, we define a bunch of sizes with
+%D $4:3$ ratios. The \type {S6} size is nearly as wide as a sheet of \type {A4}
+%D paper.
+
+\definepapersize [S3] [\c!width=300pt,\c!height=225pt]
+\definepapersize [S4] [\c!width=400pt,\c!height=300pt]
+\definepapersize [S5] [\c!width=500pt,\c!height=375pt]
+\definepapersize [S6] [\c!width=600pt,\c!height=450pt]
+\definepapersize [S8] [\c!width=800pt,\c!height=600pt]
+\definepapersize [SL] [\c!width=640pt,\c!height=400pt] % low
+\definepapersize [SM] [\c!width=720pt,\c!height=450pt] % medium
+\definepapersize [SW] [\c!width=800pt,\c!height=450pt] % wide
+\definepapersize [HD] [\c!width=1920pt,\c!height=1080pt]
+\definepapersize [HD+] [\c!width=1920pt,\c!height=1200pt]
+\definepapersize [HD-] [\c!width=960pt,\c!height=540pt]
+
+%D These are handy too:
+
+\definepapersize [S33] [\c!width=300pt,\c!height=300pt]
+\definepapersize [S44] [\c!width=400pt,\c!height=400pt]
+\definepapersize [S55] [\c!width=500pt,\c!height=500pt]
+\definepapersize [S66] [\c!width=600pt,\c!height=600pt]
+
+%D One may wonder if \TEX\ should be used for typesetting \CDROM\ covers, but it
+%D does not hurt to have the paper size ready.
+
+\definepapersize [CD] [\c!width=120mm,\c!height=120mm]
+
+%D The next series is for our English speaking friends who decided to stick to non
+%D metric values. Thanks to Nelson Beebe for completing the inch based list.
+
+\definepapersize [letter] [\c!width=8.5in,\c!height=11in]
+\definepapersize [ledger] [\c!width=11in,\c!height=17in]
+\definepapersize [tabloid] [\c!width=17in,\c!height=11in]
+
+\definepapersize [legal] [\c!width=8.5in,\c!height=14in]
+\definepapersize [folio] [\c!width=8.5in,\c!height=13in]
+\definepapersize [executive] [\c!width=7.25in,\c!height=10.5in]
+
+\definepapersize [A] [\c!width=8.5in,\c!height=11in] % 1 sheet
+\definepapersize [B] [\c!width=11in,\c!height=17in] % 2 sheets
+\definepapersize [C] [\c!width=17in,\c!height=22in] % 4 sheets
+
+%D The next set is for Tobias Burnus, who gave me the sizes.
+
+\definepapersize [envelope 9] [\c!width=8.88in,\c!height=3.88in]
+\definepapersize [envelope 10] [\c!width=9.5in,\c!height=4.13in]
+\definepapersize [envelope 11] [\c!width=10.38in,\c!height=4.5in]
+\definepapersize [envelope 12] [\c!width=11.0in,\c!height=4.75in]
+\definepapersize [envelope 14] [\c!width=11.5in,\c!height=5.0in]
+\definepapersize [monarch] [\c!width=7.5in,\c!height=3.88in]
+\definepapersize [check] [\c!width=8.58in,\c!height=3.88in]
+\definepapersize [DL] [\c!width=110mm,\c!height=220mm] % [\c!width=220mm,\c!height=110mm]
+\definepapersize [E4] [\c!width=280mm,\c!height=400mm]
+
+%D The next three sets are supplied by Taco:
+
+\definepapersize [RA0] [\c!width=860mm,\c!height=1220mm]
+\definepapersize [RA1] [\c!width=610mm,\c!height=860mm]
+\definepapersize [RA2] [\c!width=430mm,\c!height=610mm]
+\definepapersize [RA3] [\c!width=305mm,\c!height=430mm]
+\definepapersize [RA4] [\c!width=215mm,\c!height=305mm]
+
+%D ISO SRA (supplementary raw A) sizes:
+
+\definepapersize [SRA0] [\c!width=900mm,\c!height=1280mm]
+\definepapersize [SRA1] [\c!width=640mm,\c!height=900mm]
+\definepapersize [SRA2] [\c!width=450mm,\c!height=640mm]
+\definepapersize [SRA3] [\c!width=320mm,\c!height=450mm]
+\definepapersize [SRA4] [\c!width=225mm,\c!height=320mm]
+
+%D Swedish thesis formats:
+
+\definepapersize [G5] [\c!width=169mm,\c!height=239mm]
+\definepapersize [E5] [\c!width=155mm,\c!height=220mm]
+
+%D Industry invention:
+
+\definepapersize [A3plus] [\c!width=329mm,\c!height=483mm]
+
+%D For Alan:
+
+\definepapersize [business] [\c!width=85mm,\c!height=55mm]
+\definepapersize [businessUS] [\c!width=3.5in,\c!height=2in]
+
+%D We can now default to a reasonable size. We match the print paper size with the
+%D typeset paper size. This setting should come after the first layout specification
+%D (already done).
+
+% \definepapersize
+% [\v!default]
+% [ \c!width=\paperwidth,
+% \c!height=\paperheight]
+
+% \definepapersize
+% [samesized]
+% [ \c!width=\paperwidth,
+% \c!height=\paperheight]
+
+\setuppapersize
+ [\c!distance=1.5cm] % offset is already taken
+
+\definepapersize
+ [oversized]
+ [ \c!width=\dimexpr\paperwidth +\layouttargetparameter\c!distance\relax,
+ \c!height=\dimexpr\paperheight+\layouttargetparameter\c!distance\relax]
+
+\definepapersize
+ [undersized]
+ [ \c!width=\dimexpr\paperwidth -\layouttargetparameter\c!distance\relax,
+ \c!height=\dimexpr\paperheight-\layouttargetparameter\c!distance\relax]
+
+\definepapersize
+ [doublesized]
+ [ \c!width=\dimexpr \paperwidth \relax,
+ \c!height=\dimexpr2\paperheight\relax]
+
+\definepapersize
+ [doubleoversized]
+ [ \c!width=\dimexpr \paperwidth +\layouttargetparameter\c!distance\relax,
+ \c!height=\dimexpr2\paperheight+\layouttargetparameter\c!distance\relax]
+
+\definepapersize
+ [doublewide]
+ [ \c!width=\dimexpr2\paperwidth \relax,
+ \c!height=\dimexpr \paperheight\relax]
+
+% \setuppapersize
+% [A4][A4]
+
+\setuppapersize
+ [A4] % [samesized]
+
+%D A few goodies, first a full page layout:
+
+\definelayout
+ [\v!page]
+
+\setuplayout
+ [\v!page]
+ [\c!backspace=\zeropoint,
+ \c!cutspace=\zeropoint,
+ \c!topspace=\zeropoint,
+ \c!bottomspace=\zeropoint,
+ \c!margin=\zeropoint,
+ \c!edge=\zeropoint,
+ \c!header=\zeropoint,
+ \c!footer=\zeropoint,
+ \c!top=\zeropoint,
+ \c!bottom=\zeropoint,
+ \c!leftmargin=\zeropoint,
+ \c!rightmargin=\zeropoint,
+ \c!leftedge=\zeropoint,
+ \c!rightedge=\zeropoint,
+ \c!textdistance=\zeropoint,
+ \c!width=\v!middle,
+ \c!height=\v!middle,
+ \c!lines=0,
+ \c!grid=\v!no]
+
+%D A quick and dirty one:
+
+\definelayout
+ [\v!middle]
+ [\c!width=\v!middle,
+ \c!height=\v!middle]
+
+%D One for testing examples (5mm is often the non printable area):
+
+\definelayout
+ [\v!tight]
+
+\definelayout
+ [\v!tight]
+ [\v!page]
+ [\c!backspace=5mm,
+ \c!cutspace=5mm,
+ \c!topspace=5mm,
+ \c!bottomspace=5mm]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-lin.lmt b/Master/texmf-dist/tex/context/base/mkxl/page-lin.lmt
new file mode 100644
index 00000000000..f50031ab300
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-lin.lmt
@@ -0,0 +1,418 @@
+if not modules then modules = { } end modules ['page-lin'] = {
+ version = 1.001,
+ comment = "companion to page-lin.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, tonumber = next, tonumber
+
+local trace_numbers = false trackers.register("lines.numbers", function(v) trace_numbers = v end)
+
+local report_lines = logs.reporter("lines")
+
+local attributes = attributes
+local nodes = nodes
+local context = context
+
+local implement = interfaces.implement
+
+nodes.lines = nodes.lines or { }
+local lines = nodes.lines
+
+lines.data = lines.data or { } -- start step tag
+local data = lines.data
+local last = #data
+
+storage.register("lines/data", data, "nodes.lines.data")
+
+local variables = interfaces.variables
+
+local v_next = variables.next
+local v_page = variables.page
+local v_no = variables.no
+
+local properties = nodes.properties.data
+
+local nodecodes = nodes.nodecodes
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local whatsit_code = nodecodes.whatsit
+local glyph_code = nodecodes.glyph
+
+local linelist_code = nodes.listcodes.line
+
+local latelua_code = nodes.whatsitcodes.latelua
+
+local localtexrun = tex.runlocal
+
+----- a_displaymath = attributes.private('displaymath')
+local a_linenumber = attributes.private('linenumber')
+local a_linereference = attributes.private('linereference')
+
+local cross_references = { }
+
+local nuts = nodes.nuts
+
+local getid = nuts.getid
+local getattr = nuts.getattr
+local getlist = nuts.getlist
+local getbox = nuts.getbox
+local gettotal = nuts.gettotal
+
+local takebox = nuts.takebox
+
+local nexthlist = nuts.traversers.hlist
+local nextvlist = nuts.traversers.vlist
+local nextcontent = nuts.traversers.content
+local nextlist = nuts.traversers.list
+local nextnode = nuts.traversers.node
+local nextwhatsit = nuts.traversers.whatsit
+
+local is_display_math = nuts.is_display_math
+
+local ctx_convertnumber = context.convertnumber
+local ctx_makelinenumber = context.makelinenumber
+
+local paragraphs = typesetters.paragraphs
+local addtoline = paragraphs.addtoline
+local checkline = paragraphs.checkline
+
+-- cross referencing
+
+function lines.number(n)
+ n = tonumber(n)
+ local cr = cross_references[n] or 0
+ cross_references[n] = nil
+ return cr
+end
+
+function lines.finalize(t)
+ local getnumber = lines.number
+ for _,p in next, t do
+ for _,r in next, p do
+ local m = r.metadata
+ if m and m.kind == "line" then
+ local e = r.entries
+ local u = r.userdata
+ e.linenumber = getnumber(e.text or 0) -- we can nil e.text
+ e.conversion = u and u.conversion
+ r.userdata = nil -- hack
+ end
+ end
+ end
+end
+
+local filters = structures.references.filters
+local helpers = structures.helpers
+
+structures.references.registerfinalizer(lines.finalize)
+
+filters.line = filters.line or { }
+
+function filters.line.default(data)
+ ctx_convertnumber(data.entries.conversion or "numbers",data.entries.linenumber or "0")
+end
+
+function filters.line.page(data,prefixspec,pagespec) -- redundant
+ helpers.prefixpage(data,prefixspec,pagespec)
+end
+
+function filters.line.linenumber(data) -- raw
+ context(data.entries.linenumber or "0")
+end
+
+-- boxed variant, todo: use number mechanism
+
+local boxed = lines.boxed or { }
+lines.boxed = boxed
+
+-- todo: cache setups, and free id no longer used
+-- use interfaces.cachesetup(t)
+
+function boxed.register(configuration)
+ last = last + 1
+ data[last] = configuration
+ if trace_numbers then
+ report_lines("registering setup %a",last)
+ end
+ return last
+end
+
+implement {
+ name = "registerlinenumbering",
+ actions = { boxed.register, context },
+ arguments = {
+ {
+ { "continue" },
+ { "start", "integer" },
+ { "step", "integer" },
+ { "method" },
+ { "tag" },
+ }
+ }
+}
+
+function boxed.setup(n,configuration)
+ local d = data[n]
+ if d then
+ if trace_numbers then
+ report_lines("updating setup %a",n)
+ end
+ for k,v in next, configuration do
+ d[k] = v
+ end
+ else
+ if trace_numbers then
+ report_lines("registering setup %a (br)",n)
+ end
+ data[n] = configuration
+ end
+ return n
+end
+
+implement {
+ name = "setuplinenumbering",
+ actions = boxed.setup,
+ arguments = {
+ "integer",
+ {
+ { "continue" },
+ { "start", "integer" },
+ { "step", "integer" },
+ { "method" },
+ { "tag" },
+ }
+ }
+}
+
+local function resolve(n,m) -- we can now check the 'line' flag (todo)
+ for current, id, subtype, content in nextlist, n do
+ if content then
+ if id == hlist_code then
+ for current, subtype in nextwhatsit, content do
+ if subtype == latelua_code then -- this has to change!
+ local a = getattr(current,a_linereference)
+ if a then
+ cross_references[a] = m
+ end
+ end
+ end
+ end
+ resolve(content,m)
+ end
+ end
+end
+
+local function check_number(n,b,a,skip)
+ local d = data[a]
+ if d then
+ local tag = d.tag or ""
+ local s = d.start or 1
+ local okay = not skip and s % d.step == 0
+ if trace_numbers then
+ report_lines("%s number for setup %a, tag %a, line %s, continued %a",okay and "making" or "skipping",a,tag,s,d.continue or v_no)
+ end
+ if okay then
+ local p = checkline(n)
+ if p then
+ localtexrun(function() ctx_makelinenumber(tag,s,p.hsize,p.reverse and 1 or 0) end)
+ local l = takebox(b)
+ if l then
+ addtoline(n,l)
+ else
+ -- very unlikely
+ end
+ end
+ end
+ resolve(n,s)
+ d.start = s + 1
+ end
+end
+
+-- print(nodes.idstostring(list))
+
+-- hlists of type line will only have an attribute when the line number attribute
+-- still set at par building time which is not always the case unless we explicitly
+-- do a par before we end the line
+
+local function lineisnumbered(n) -- content node
+ for n, id, subtype, content in nextcontent, getlist(n) do
+ local a = getattr(n,a_linenumber)
+ if a and a > 0 then
+ return a
+ end
+ end
+end
+
+local function listisnumbered(list)
+ if list then
+ for n, subtype in nexthlist, list do
+ if subtype == linelist_code then
+ local a = getattr(n,a_linenumber)
+ if a then
+ -- a quick test for lines (only valid when \par before \stoplinenumbering)
+ return a > 0 and list or false
+ else
+ -- a bit slower one, assuming that we have normalized and anchored
+ if lineisnumbered(n) then
+ return list
+ end
+ end
+ end
+ end
+ end
+end
+
+local function findnumberedlist(list)
+ -- we assume wrapped boxes, only one with numbers
+ for n, id, subtype, content in nextcontent, list do
+ if id == hlist_code then
+ if subtype == linelist_code then
+ local a = getattr(n,a_linenumber)
+ if a then
+ return a > 0 and list
+ end
+ return
+ else
+ if lineisnumbered(content) then
+ return n
+ end
+ local okay = findnumberedlist(content)
+ if okay then
+ return okay
+ end
+ end
+ elseif id == vlist_code then
+ if listisnumbered(content) then
+ return content
+ end
+ local okay = findnumberedlist(content)
+ if okay then
+ return okay
+ end
+ elseif id == glyph_code then
+ return
+ end
+ end
+end
+
+-- reset ranges per page
+-- store first and last per page
+-- maybe just set marks directly
+
+local function findcolumngap(list)
+ -- we assume wrapped boxes, only one with numbers
+ for n, id, subtype, content in nextlist, list do
+ if id == hlist_code or id == vlist_code then
+ local p = properties[n]
+ if p and p.columngap then
+ if trace_numbers then
+ report_lines("first column gap %a",p.columngap)
+ end
+ return n
+ elseif content then
+ local okay = findcolumngap(content)
+ if okay then
+ return okay
+ end
+ end
+ end
+ end
+end
+
+function boxed.addlinenumbers(n,b,nested)
+ local box = getbox(n)
+ if not box then
+ return
+ end
+ local list = getlist(box)
+ if not list then
+ return
+ end
+ local last_a = nil
+ local last_v = -1
+ local skip = false
+
+ local function check()
+ for n, subtype in nexthlist, list do
+ if subtype ~= linelist_code then
+ -- go on
+ elseif gettotal(n) == 0 then
+ -- skip funny hlists -- todo: check line subtype
+ else
+ local a = lineisnumbered(n)
+ if a then
+ if last_a ~= a then
+ local da = data[a]
+ local ma = da.method
+ if ma == v_next then
+ skip = true
+ elseif ma == v_page then
+ da.start = 1 -- eventually we will have a normal counter
+ end
+ last_a = a
+ if trace_numbers then
+ report_lines("starting line number range %s: start %s, continue %s",a,da.start,da.continue or v_no)
+ end
+ end
+ -- if getattr(n,a_displaymath) then
+ -- check_number(n,b,a,skip)
+ -- else
+ check_number(n,b,a,skip)
+ -- end
+ skip = false
+ end
+ end
+ end
+ end
+
+ if nested == 0 then
+ if list then
+ check()
+ end
+ elseif nested == 1 then
+ local id = getid(box)
+ if id == vlist_code then
+ if listisnumbered(list) then
+ -- ok
+ else
+ list = findnumberedlist(list)
+ end
+ else -- hlist
+ list = findnumberedlist(list)
+ end
+ if list then
+ check()
+ end
+ elseif nested == 2 then
+ list = findcolumngap(list)
+ -- we assume we have a vlist
+ if not list then
+ return
+ end
+ for n in nextvlist, list do
+ local p = properties[n]
+ if p and p.columngap then
+ if trace_numbers then
+ report_lines("found column gap %a",p.columngap)
+ end
+ list = getlist(n)
+ if list then
+ check()
+ end
+ end
+ end
+ else
+ -- bad call
+ end
+end
+
+-- column attribute
+
+implement {
+ name = "addlinenumbers",
+ actions = boxed.addlinenumbers,
+ arguments = { "integer", "integer", "integer" }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-lin.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-lin.mklx
new file mode 100644
index 00000000000..3b3a3d71b73
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-lin.mklx
@@ -0,0 +1,604 @@
+%D \module
+%D [ file=page-lin,
+%D version=2007.11.29,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Line Numbering,
+%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.
+
+% generic or not ... maybe not bother too much and simplify to mkiv only get rid of
+% \mk* (left over from experimental times)
+%
+% to be redone (was experiment) .. can be hooked into margin code reshuffle
+% arguments
+%
+% this is early luatex code, 2007 or even before that, and it shows ... we have
+% better tricks now
+
+\writestatus{loading}{ConTeXt Core Macros / Line Numbering}
+
+\unprotect
+
+% todo: save settings
+%
+% low level interface
+%
+% we should use normal counters but then we need to sync settings
+
+% some line
+%
+% \startlocallinenumbering
+% some source code 1\par
+% some source code 2\par
+% some source code 3\par
+% \stoplocallinenumbering
+%
+% some line
+
+\registerctxluafile{page-lin}{autosuffix}
+
+\definesystemattribute[linenumber] [public]
+\definesystemattribute[linereference][public]
+
+\appendtoksonce
+ \c_attr_linenumber\attributeunsetvalue
+\to \everyforgetall
+
+\appendtoks
+ \c_attr_linenumber\attributeunsetvalue
+\to \everyinsidefloat
+
+\mutable\let\linenumber\!!zerocount
+
+\newbox \b_page_lines_scratch
+\newcount \c_page_lines_reference
+\newconstant\c_page_lines_nesting
+
+\newconditional\tracelinenumbering % we keep this for old times sake
+
+\installtextracker
+ {lines.numbers.show}
+ {\settrue \tracelinenumbering}
+ {\setfalse\tracelinenumbering}
+
+% id nr shift width leftskip dir
+
+\installcorenamespace{linenumberinginstance}
+
+% tag skipflag s getfield(n,"shift") getfield(n,"width") leftmarginwidth(getlist(n)) getfield(n,"dir"))
+
+\permanent\let\makelinenumber\gobblefivearguments % used at lua end
+
+\newconditional\page_postprocessors_needed_box
+
+\protected\def\page_postprocessors_linenumbers_page_indeed #tag{\page_lines_add_numbers_to_box{#tag}\plusone \plusone \zerocount}
+\protected\def\page_postprocessors_linenumbers_box_indeed #tag{\page_lines_add_numbers_to_box{#tag}\plusone \plusone \zerocount}
+\protected\def\page_postprocessors_linenumbers_deepbox_indeed#tag{\page_lines_add_numbers_to_box{#tag}\plusone \plusone \plusone }
+\protected\def\page_postprocessors_linenumbers_column_indeed #tag{\page_lines_add_numbers_to_box{#tag}\currentcolumn\nofcolumns\zerocount}
+
+\let\page_postprocessors_linenumbers_page \gobbleoneargument
+\let\page_postprocessors_linenumbers_box \gobbleoneargument
+\let\page_postprocessors_linenumbers_deepbox\gobbleoneargument
+\let\page_postprocessors_linenumbers_column \gobbleoneargument
+
+\protected\def\page_postprocessors_linenumbers_check
+ {\glet\page_postprocessors_linenumbers_check \relax
+ \glet\page_postprocessors_linenumbers_page \page_postprocessors_linenumbers_page_indeed
+ \glet\page_postprocessors_linenumbers_box \page_postprocessors_linenumbers_box_indeed
+ \glet\page_postprocessors_linenumbers_deepbox\page_postprocessors_linenumbers_deepbox_indeed
+ \glet\page_postprocessors_linenumbers_column \page_postprocessors_linenumbers_column_indeed}
+
+\def\page_lines_start_define
+ {\setxvalue{\??linenumberinginstance\currentlinenumbering}%
+ {\clf_registerlinenumbering
+ continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}%
+ start \linenumberingparameter\c!start
+ step \linenumberingparameter\c!step
+ method {\linenumberingparameter\c!method}%
+ tag {\currentlinenumbering}%
+ }}
+
+\def\page_lines_start_update
+ {\clf_setuplinenumbering
+ \csname\??linenumberinginstance\currentlinenumbering\endcsname
+ {%
+ continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}%
+ }%
+ \relax}
+
+\def\page_lines_setup
+ {\ifcsname \??linenumberinginstance\currentlinenumbering\endcsname
+ \clf_setuplinenumbering
+ \lastnamedcs
+ {%
+ continue {\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi}%
+ start \linenumberingparameter\c!start
+ step \linenumberingparameter\c!step
+ method {\linenumberingparameter\c!method}%
+ tag {\currentlinenumbering}%
+ }%
+ \relax
+ \fi}
+
+% we could make this a bit more efficient by putting the end reference
+% in the same table as the start one but why make things complex ...
+
+\protected\def\page_lines_some_reference#1#2#3%
+ {\dontleavehmode\begingroup
+ \global\advance\c_page_lines_reference\plusone
+ \c_attr_linereference\c_page_lines_reference
+ #3% todo: #3{#1} as there is no need to pass #1 as part of #3
+ % for the moment we use a simple system i.e. no prefixes etc .. todo: store as number
+ \c_strc_references_bind_state\zerocount % we don't want the prewordbreak and manage it here
+ \normalexpanded{\strc_references_set_named_reference{line}{#2}{conversion=\linenumberingparameter\c!conversion}{\the\c_page_lines_reference}}% kind labels userdata text
+ \endgroup}
+
+% \def\page_lines_reference_start#1{\page_lines_some_reference{#1}{lr:b:#1}{}} % reimplemented later
+% \def\page_lines_reference_stop #1{\page_lines_some_reference{#1}{lr:e:#1}{}} % reimplemented later
+
+% \def\mklinestartreference#1[#2]{\in{#1}[lr:b:#2]} % not interfaced/ not used
+% \def\mklinestopreference #1[#2]{\in{#1}[lr:e:#2]} % not interfaced/ not used
+
+\newif\ifnumberinglines % will change
+\newif\iftypesettinglines % will change
+
+\installcorenamespace{linenumbering}
+
+\installcommandhandler \??linenumbering {linenumbering} \??linenumbering
+
+\setnewconstant\c_page_lines_mode \plusone % 0=continue, 1=restart
+\setnewconstant\c_page_lines_location \plusone % 0=middle, 1=left, 2=right, 3=inner, 4=outer, 5=text, 6=begin, 7=end
+\setnewconstant\c_page_lines_alignment\plusfive % 0=middle, 1=left, 2=right, 5=auto
+
+\newdimen\d_page_lines_width
+\newdimen\d_page_lines_distance
+
+\newevery \beforeeverylinenumbering \relax
+\newevery \aftereverylinenumbering \relax
+\newevery \everylinenumber \relax
+
+\appendtoks
+ \page_lines_setup
+\to \everysetuplinenumbering
+
+\appendtoks
+ \page_lines_start_define
+\to \everydefinelinenumbering
+
+\setuplinenumbering
+ [\c!conversion=\v!numbers,
+ \c!start=1,
+ \c!step=1,
+ \c!method=\v!first,
+ \c!continue=\v!no,
+ \c!style=,
+ \c!color=,
+ \c!width=2\emwidth,
+ \c!left=,
+ \c!right=,
+ \c!command=,
+ \c!margin=2.5\emwidth,
+ \c!distance=\zeropoint,
+ \c!location=\v!default, % depends on direction, columns etc
+ \c!align=\v!auto]
+
+\definelinenumbering
+ []
+
+% \startlinenumbering[<startvalue>|continue|settings|name]
+% \startlinenumbering[name][<startvalue>|continue|settings]
+
+\newcount\c_pages_lines_nesting
+
+\permanent\tolerant\protected\def\startlinenumbering[#1]#*[#2]%
+ {\begingroup
+ \page_postprocessors_linenumbers_check
+ \advance\c_pages_lines_nesting\plusone
+ \ifnum\c_pages_lines_nesting>\plusone
+ \expandafter\gobbletwooptionals
+ \orelse\ifparameter#2\or
+ \expandafter\page_lines_start_two
+ \orelse\ifparameter#1\or
+ \expandafter\page_lines_start_one
+ \else
+ \expandafter\page_lines_start_zero
+ \fi[#1][#2]}
+
+\def\page_lines_start_zero[#1][#2]%
+ {\edef\m_argument{\linenumberingparameter\c!continue}%
+ \ifx\m_argument\v!yes
+ \c_page_lines_mode\zerocount
+ \else
+ \c_page_lines_mode\plusone
+ \fi
+ \page_lines_start_followup}
+
+\def\page_lines_start_one[#1][#2]% [continue|<number>|settings] % historic
+ {\edef\m_argument{#1}%
+ \ifx\m_argument\v!continue
+ \c_page_lines_mode\zerocount
+ \let\currentlinenumbering\empty
+ \else
+ \c_page_lines_mode\plusone
+ \ifx\m_argument\v!empty
+ \let\currentlinenumbering\empty
+ \orelse\ifhastok={#1}%
+ \let\currentlinenumbering\empty
+ \setupcurrentlinenumbering[#1]%
+ \else
+ \doifelsenumber\m_argument
+ {\let\currentlinenumbering\empty
+ \letlinenumberingparameter\c!start\m_argument}
+ {\let\currentlinenumbering\m_argument}%
+ \fi
+ \edef\p_continue{\linenumberingparameter\c!continue}%
+ \ifx\p_continue\v!yes
+ \c_page_lines_mode\zerocount
+ \fi
+ \fi
+ \page_lines_start_followup}
+
+\def\page_lines_start_two[#1][#2]% [tag][continue|<number>|settings]
+ {\edef\currentlinenumbering{#1}%
+ \edef\m_argument{#2}%
+ \ifx\m_argument\v!continue
+ \c_page_lines_mode\zerocount
+ \else
+ \c_page_lines_mode\plusone
+ \ifx\m_argument\v!empty \else
+ \doifelseassignment{#2}
+ {\setupcurrentlinenumbering[#2]}
+ {\doifnumber\m_argument
+ {\letlinenumberingparameter\c!start\m_argument}}%
+ \fi
+ \edef\p_continue{\linenumberingparameter\c!continue}%
+ \ifx\p_continue\v!yes
+ \c_page_lines_mode\zerocount
+ \fi
+ \fi
+ \page_lines_start_followup}
+
+\newconditional\c_page_lines_auto_narrow
+%\newconditional\c_page_lines_enabled
+
+\appendtoks
+ \ifconditional\page_postprocessors_needed_box
+ \page_postprocessors_linenumbers_page\b_page_postprocessor
+ \fi
+\to \t_page_postprocessors_page
+
+\appendtoks
+ \ifconditional\page_postprocessors_needed_box
+ \page_postprocessors_linenumbers_column\b_page_postprocessor
+ \fi
+\to \t_page_postprocessors_column
+
+\def\page_lines_start_followup
+ {\numberinglinestrue
+ \edef\p_location{\linenumberingparameter\c!location}%
+ \setfalse\c_page_lines_auto_narrow
+ \ifhmode \else
+ \ifx\p_location\v!text
+ \ifdim\leftskip>\zeropoint \else
+ \advance\leftskip\linenumberingparameter\c!margin
+ \settrue\c_page_lines_auto_narrow
+ \fi
+ \orelse\ifx\p_location\v!begin
+ \ifdim\leftskip>\zeropoint \else
+ \advance\leftskip\linenumberingparameter\c!margin
+ \settrue\c_page_lines_auto_narrow
+ \fi
+ \orelse\ifx\p_location\v!end
+ \ifdim\leftskip>\zeropoint \else
+ \advance\rightskip\linenumberingparameter\c!margin
+ \settrue\c_page_lines_auto_narrow
+ \fi
+ \fi
+ \fi
+ \the\beforeeverylinenumbering
+ %\global\settrue\c_page_lines_enabled %
+ \global\settrue\page_postprocessors_needed_box % see core-rul.mkiv
+ \ifcase\c_page_lines_mode\relax
+ \page_lines_start_update % continue
+ \or
+ \page_lines_start_define % only when assignment
+ \fi
+ \c_attr_linenumber\csname\??linenumberinginstance\currentlinenumbering\endcsname\relax}
+
+\permanent\protected\def\stoplinenumbering
+ {\ifconditional\c_pages_lines_nesting=\plusone
+ \c_attr_linenumber\attributeunsetvalue
+ \the\aftereverylinenumbering
+ \ifconditional\c_page_lines_auto_narrow\par\fi
+ \fi
+ \endgroup}
+
+% number placement .. will change into (the new) margin code
+
+\newconditional\c_page_lines_fake_number
+\newconstant \b_page_lines_number
+\newconstant \c_page_lines_column
+\newconstant \c_page_lines_last_column
+\newdimen \d_page_lines_line_width
+\settrue \c_page_lines_dir_left_to_right
+
+\installcorenamespace{linenumberinghandler}
+
+\def\page_line_swap_align % can become a helper
+ {\ifx\p_align\v!inner \let\p_align\v!outer \orelse
+ \ifx\p_align\v!outer \let\p_align\v!inner \orelse
+ \ifx\p_align\v!flushleft \let\p_align\v!flushright\orelse
+ \ifx\p_align\v!flushright\let\p_align\v!flushleft \orelse
+ \ifx\p_align\v!left \let\p_align\v!right \orelse
+ \ifx\p_align\v!right \let\p_align\v!left \fi}
+
+\let\page_lines_make_number_indeed\relax
+
+% \def\page_lines_rlap{\ifconditional\c_page_lines_dir_left_to_right\expandafter\rlap\else\expandafter\llap\fi}
+% \def\page_lines_llap{\ifconditional\c_page_lines_dir_left_to_right\expandafter\llap\else\expandafter\rlap\fi}
+
+\def\page_lines_add_numbers_to_box#box#column#max#nesting%
+ {\bgroup
+ \strc_tags_enable_indeed
+ \b_page_lines_number #box\relax
+ \c_page_lines_column #column\relax
+ \c_page_lines_last_column#max\relax
+ \fullrestoreglobalbodyfont
+ \enforced\let\makelinenumber\page_lines_make_number % used at lua end
+ \clf_addlinenumbers
+ \b_page_lines_number
+ \scratchbox
+ #nesting%
+ \relax
+ \egroup}
+
+\def\page_lines_make_number#tag#linenumber#width#dir% with hang and parindent and skips we have to compensate for \hsize
+ {\setbox\scratchbox\naturalhbox to \zeropoint \bgroup
+ \edef\currentlinenumbering{#tag}%
+ \def\linenumber{#linenumber}% unsafe
+ \d_page_lines_line_width#width\scaledpoint\relax
+ \d_page_lines_distance\linenumberingparameter\c!distance\relax
+ \edef\p_align{\linenumberingparameter\c!align}%
+ \edef\p_location{\linenumberingparameter\c!location}%
+ \ifcase#dir\relax
+ \settrue \c_page_lines_dir_left_to_right
+ \else
+ \setfalse\c_page_lines_dir_left_to_right
+ \fi
+ %
+ % maybe we also need an option to ignore columns, so that we renumber
+ % once but on the other hand this assumes aligned lines
+ %
+ \ifcase\c_page_lines_last_column\relax
+ \settrue \c_page_lines_fake_number % why
+ \or
+ % one column
+ \or
+ % two columns
+ \ifx\p_location\v!default % or just margin
+ \ifcase\c_page_lines_column\relax
+ \settrue \c_page_lines_fake_number % why
+ \or
+ \let\p_location\v!left % one
+ \else
+ \let\p_location\v!right % two
+ \page_line_swap_align % can become a helper
+ \fi
+ \fi
+ \fi
+ \ifx\p_location\v!default
+ \ifconditional\c_page_lines_dir_left_to_right
+ \let\p_location\v!left
+ \else
+ \let\p_location\v!right
+ \page_line_swap_align % yes or no
+ \fi
+ \fi
+ %
+ \begincsname\??linenumberinghandler\p_location\endcsname
+ \egroup}
+
+\def\page_lines_number_inject#align#width%
+ {\edef\p_width{\linenumberingparameter\c!width}%
+ \ifx\p_width\v!margin
+ \d_page_lines_width#width%
+ \else
+ \d_page_lines_width\p_width
+ \fi
+ \relax
+ \ifdim\d_page_lines_width>\zeropoint
+ \ifconditional\tracelinenumbering
+ \ruledhbox{\simplealignedbox\d_page_lines_width#align{\page_lines_number_inject_indeed}}%
+ \else
+ \simplealignedbox\d_page_lines_width#align{\page_lines_number_inject_indeed}%
+ \fi
+ \else
+ \ifconditional\tracelinenumbering
+ \ruledhbox
+ % \else
+ % \hbox
+ \fi
+ {\page_lines_number_inject_indeed}%
+ \fi}
+
+\def\page_lines_number_inject_indeed
+ {\uselinenumberingstyleandcolor\c!style\c!color
+ \linenumberingparameter\c!command
+ {\linenumberingparameter\c!left
+ \convertnumber{\linenumberingparameter\c!conversion}\linenumber
+ \linenumberingparameter\c!right}}
+
+% \def\dodorlap{\hbox to \zeropoint{\box\nextbox\normalhss}\endgroup}
+% \def\dodollap{\hbox to \zeropoint{\normalhss\box\nextbox}\endgroup}
+
+\def\page_line_handle_left#align#width#distance%
+ {\dostarttagged\t!linenumber\empty
+ \llap
+ {\page_lines_number_inject#align#width%
+ \dostarttagged\t!ignore\empty
+ \kern\dimexpr
+ #distance+\d_page_lines_distance
+ \ifconditional\c_page_lines_dir_left_to_right\else+\d_page_lines_line_width\fi
+ \relax
+ \the\everylinenumber
+ \hss
+ \dostoptagged}%
+ \dostoptagged}
+
+\def\page_line_handle_right#align#width#distance%
+ {\dostarttagged\t!linenumber\empty
+ \rlap
+ {\dostarttagged\t!ignore\empty
+ \kern\dimexpr
+ #distance+\d_page_lines_distance
+ \ifconditional\c_page_lines_dir_left_to_right+\d_page_lines_line_width\fi
+ \relax
+ \dostoptagged
+ \page_lines_number_inject#align#width%
+ \dostarttagged\t!ignore\empty
+ \the\everylinenumber
+ \hss
+ \dostoptagged}%
+ \dostoptagged}
+
+\setuvalue{\??linenumberinghandler\v!left}%
+ {\page_line_handle_left\p_align\leftmarginwidth\leftmargindistance}
+
+\setuvalue{\??linenumberinghandler\v!right}%
+ {\page_line_handle_right\p_align\rightmarginwidth\rightmargindistance}
+
+\setuvalue{\??linenumberinghandler\v!inner}%
+ {\ifodd\realpageno
+ \ifx\p_align\v!inner
+ \page_line_handle_left\v!flushleft\leftmarginwidth\leftmargindistance
+ \orelse\ifx\p_align\v!outer
+ \page_line_handle_left\v!flushright\leftmarginwidth\leftmargindistance
+ \else
+ \page_line_handle_left\p_align\leftmarginwidth\leftmargindistance
+ \fi
+ \else
+ \ifx\p_align\v!inner
+ \page_line_handle_right\v!flushright\rightmarginwidth\rightmargindistance
+ \orelse\ifx\p_align\v!outer
+ \page_line_handle_right\v!flushleft\rightmarginwidth\rightmargindistance
+ \else
+ \page_line_handle_right\p_align\rightmarginwidth\rightmargindistance
+ \fi
+ \fi}
+
+\setuvalue{\??linenumberinghandler\v!outer}%
+ {\ifodd\realpageno
+ \ifx\p_align\v!inner
+ \page_line_handle_right\v!flushleft\leftmarginwidth\leftmargindistance
+ \orelse\ifx\p_align\v!outer
+ \page_line_handle_right\v!flushright\leftmarginwidth\leftmargindistance
+ \else
+ \page_line_handle_right\p_align\leftmarginwidth\leftmargindistance
+ \fi
+ \else
+ \ifx\p_align\v!inner
+ \page_line_handle_left\v!flushright\rightmarginwidth\rightmargindistance
+ \orelse\ifx\p_align\v!outer
+ \page_line_handle_left\v!flushleft\rightmarginwidth\rightmargindistance
+ \else
+ \page_line_handle_left\p_align\rightmarginwidth\rightmargindistance
+ \fi
+ \fi}
+
+\def\page_line_handle_begin#align%
+ {\rlap
+ {\kern\d_page_lines_distance
+ \page_lines_number_inject#align\zeropoint
+ \the\everylinenumber}}
+
+\def\page_line_handle_end#align%
+ {\rlap
+ {\kern\d_page_lines_line_width\relax
+ \llap
+ {\page_lines_number_inject#align\zeropoint
+ \kern\d_page_lines_distance
+ \the\everylinenumber}}}
+
+\protected\defcsname\??linenumberinghandler\v!begin\endcsname{\page_line_handle_begin\p_align}
+\protected\defcsname\??linenumberinghandler\v!end \endcsname{\page_line_handle_end \p_align}
+\protected\defcsname\??linenumberinghandler\v!text \endcsname{\page_line_handle_begin\p_align}
+
+\letcsname\??linenumberinghandler\v!inleft \expandafter\endcsname\csname\??linenumberinghandler\v!left \endcsname
+\letcsname\??linenumberinghandler\v!inmargin\expandafter\endcsname\csname\??linenumberinghandler\v!left \endcsname
+\letcsname\??linenumberinghandler\v!margin \expandafter\endcsname\csname\??linenumberinghandler\v!left \endcsname
+\letcsname\??linenumberinghandler\v!inright \expandafter\endcsname\csname\??linenumberinghandler\v!right\endcsname
+
+% referencing: \permithyphenation, also removes leading spaces (new per 29-11-2013)
+
+\permanent\protected\def\someline [#1]{\page_lines_reference_start{#1}\page_lines_reference_stop{#1}} % was just a def
+\permanent\protected\def\startline[#1]{\page_lines_reference_start{#1}\permithyphenation\ignorespaces} %okay?
+\permanent\protected\def\stopline [#1]{\removeunwantedspaces\permithyphenation\page_lines_reference_stop{#1}}
+
+\def\page_lines_reference_show_start
+ {\ifconditional\tracelinenumbering
+ \expandafter\page_lines_reference_show_start_indeed
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\page_lines_reference_show_stop
+ {\ifconditional\tracelinenumbering
+ \expandafter\page_lines_reference_show_stop_indeed
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\page_lines_reference_show_start_indeed#1%
+ {\setbox\scratchbox\hpack{\llap
+ {\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht\raise.85\strutht\hpack{\llap{\tt\txx#1}}}}%
+ \smashbox\scratchbox
+ \box\scratchbox}
+
+\def\page_lines_reference_show_stop_indeed#1%
+ {\setbox\scratchbox\hpack{\rlap
+ {\raise.85\strutht\hpack{\rlap{\tt\txx#1}}\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht}}%
+ \smashbox\scratchbox
+ \box\scratchbox}
+
+\def\page_lines_reference_start#1{\page_lines_some_reference{#1}{lr:b:#1}{\page_lines_reference_show_start{#1}}}
+\def\page_lines_reference_stop #1{\page_lines_some_reference{#1}{lr:e:#1}{\page_lines_reference_show_stop {#1}}}
+
+% eventually we will do this in lua
+
+\permanent\def\currentreferencelinenumber{\clf_filterreference{linenumber}}
+
+\let\m_page_lines_from\empty
+\let\m_page_lines_to \empty
+
+\permanent\protected\def\doifelsesamelinereference#1#2#3%
+ {\doifelsereferencefound{lr:b:#1}
+ {\edef\m_page_lines_from{\currentreferencelinenumber}%
+ \doifelsereferencefound{lr:e:#1}
+ {\edef\m_page_lines_to{\currentreferencelinenumber}%
+ %[\m_page_lines_from,\m_page_lines_to]
+ \ifx\m_page_lines_from\m_page_lines_to#2\else#3\fi}%
+ {#2}}
+ {#2}}
+
+\aliased\let\doifsamelinereferenceelse\doifelsesamelinereference
+
+\permanent\protected\def\inline#1[#2]%
+ {\doifelsenothing{#1}%
+ {\doifelsesamelinereference{#2}%
+ {\in{\leftlabeltext\v!line}{\rightlabeltext\v!line}[lr:b:#2]}%
+ {\in{\leftlabeltext\v!lines}{}[lr:b:#2]--\in{}{\rightlabeltext\v!lines}[lr:e:#2]}}%
+ {\doifelsesamelinereference{#2}%
+ {\in{#1}[lr:b:#2]}%
+ {\in{#1}[lr:b:#2]--\in[lr:e:#2]}}}
+
+\permanent\protected\def\inlinerange[#1]%
+ {\doifelsesamelinereference{#1}%
+ {\in[lr:b:#1]}%
+ {\in[lr:b:#1]\endash\in[lr:e:#1]}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-mak.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-mak.mklx
new file mode 100644
index 00000000000..2a5cd435218
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-mak.mklx
@@ -0,0 +1,280 @@
+%D \module
+%D [ file=page-mak, % copied from main-001,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Simple MakeUp,
+%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 Page Macros / MakeUp}
+
+\unprotect
+
+%D \macros
+%D {definemakeup, setupmakeup, startmakeup}
+%D
+%D A makeup is a separate page, like a title page or colofon. There is one standard
+%D makeup page, but you can define more if needed.
+%D
+%D \starttyping
+%D \startstandardmakeup
+%D My Fancy Title
+%D \stopstandardmakeup
+%D \stoptyping
+%D
+%D The associated commands are:
+%D
+%D \showsetup{definemakeup}
+%D \showsetup{setupmakeup}
+%D \showsetup{startmakeup}
+%D
+%D New is that we have a layout with the same name so one can set up a special
+%D layout that then gets used.
+
+\installcorenamespace{makeup}
+\installcorenamespace{makeupdoublesided}
+
+\installcommandhandler \??makeup {makeup} \??makeup
+
+\appendtoks
+ \frozen\instance\setuevalue{\e!start\currentmakeup\e!makeup}{\startmakeup[\currentmakeup]}%
+ \frozen\instance\setuevalue{\e!stop \currentmakeup\e!makeup}{\stopmakeup}%
+ \doifelselayoutdefined\currentmakeup\donothing{\definelayout[\currentmakeup]}% new
+\to \everydefinemakeup
+
+%D The \type {\start}||\type {\stop} macros are used for both the direct and
+%D indirect way. The parameterless call will build a simple box.
+
+\permanent\tolerant\protected\def\startmakeup[#1]#*[#2]%
+ {\ifparameters
+ \expandafter\page_makeup_start_nop
+ \else
+ \expandafter\page_makeup_start_yes
+ \fi[#1][#2]}
+
+\aliased\let\stopmakeup\relax
+
+%D The simple case: just a box with text dimensions.
+
+\protected\def\page_makeup_start_nop[#name][#settings]% dummies
+ {\page
+ \setupheader[\c!state=\v!empty]%
+ \setupfooter[\c!state=\v!empty]%
+ \bgroup
+ \forgetall % else indented flush
+ \dontcomplain
+ \vbox to \textheight \bgroup
+ \setsystemmode\v!makeup
+ \hsize\textwidth
+ \enforced\let\stopmakeup\page_makeup_stop_nop}
+
+\permanent\protected\def\page_makeup_stop_nop
+ {\egroup
+ \egroup
+ \page}
+
+%D The normal variant.
+
+\newbox \b_page_makeup
+\newtoks\t_page_makeup_every_setup
+
+\def\page_makeup_start_yes[#name]% [#settings]%
+ {\doifelsecommandhandler\??makeup{#name}\page_makeup_start_indeed\page_makeup_start_nop[#name]}%
+
+% case 1:
+%
+% \setuplayout[height=5cm]
+%
+% case 2:
+%
+% \definelayout[crap][height=10cm]
+% \definelayout[standard][crap]
+%
+% case 3:
+%
+% \setuplayout[standard][height=15cm]
+%
+% case 4:
+%
+% \definelayout[whatever][height=2cm]
+% \setuplayout[whatever]
+
+\def\page_makeup_start_indeed[#name][#settings]%
+ {% the next grouping hack is somewhat messy:
+ \begingroup
+ % we need to figure out the current layout
+ \xdef\m_page_makeup_name{#name}%
+ \let\currentmakeup\m_page_makeup_name
+ \let\currentlayout\m_page_makeup_name
+ \xdef\m_page_makeup_layout_parent{\layoutparameter\s!parent}%
+ \setupcurrentmakeup[#settings]%
+ \edef\p_page{\makeupparameter\c!page}%
+ \ifempty\p_page
+ \endgroup
+ \page % new, so best not have dangling mess here like references (we could capture then and flush embedded)
+ \orelse\ifx\p_page\v!no
+ % nothing
+ \endgroup
+ \else
+ \normalexpanded{\endgroup\page[\p_page]}%
+ \fi
+ % some dirty trickery (sorry) for determining if we have
+ % - a layout definition at all
+ % - inherit from the parent of that definition
+ % - inherit from the current layout otherwise
+ \ifx\m_page_makeup_name\currentlayout
+ % we already use the layout
+ \orelse\ifx\m_page_makeup_layout_parent\??layout
+ % we inherit from the current layout
+ \normalexpanded{\setuplayout[#name][\s!parent=\??layout\currentlayout]}% is remembered but checked later anyway
+ % \else
+ % we have an inherited layout
+ \fi
+ \startlayout[#name]% includes \page
+ \bgroup
+ %\edef\currentmakeup{#name}%
+ \let\currentmakeup\m_page_makeup_name
+ \setupcurrentmakeup[#settings]%
+ \setsystemmode\v!makeup
+ \the\t_page_makeup_every_setup
+ \makeupparameter\c!commands % hm, what is this one doing here ?
+ \forgetall % else indented flush
+ \dontcomplain
+ \global\setbox\b_page_makeup\vbox to \makeupparameter\c!height \bgroup
+ \usemakeupstyleandcolor\c!style\c!color
+ \hsize\makeupparameter\c!width
+ \usealignparameter\makeupparameter
+ \usesetupsparameter\makeupparameter % lua(..),xml(...,..),tex(..)
+ \makeupparameter\c!top
+ \enforced\let\stopmakeup\page_makeup_stop_yes}
+
+\permanent\protected\def\page_makeup_stop_yes
+ {\endgraf
+ \makeupparameter\c!bottom
+ \egroup
+ \strc_pagenumbers_page_state_push % new
+ \makeupparameter\c!before\relax
+ \begingroup
+ \ifdim\ht\b_page_makeup>\vsize
+ \ht\b_page_makeup\vsize % is already set to \textheight (maybe set dp to 0)
+ \fi
+ \setuppagenumber[\c!state=\makeupparameter\c!pagestate]%
+ \doif{\makeupparameter\c!location}\v!top{\topskip\zeropoint}%
+ \edef\p_reference{\makeupparameter\c!reference}%
+ \dontleavehmode
+ \usereferenceparameter\makeupparameter
+ \box\b_page_makeup % could be whole box being destination
+ \the\t_page_makeup_every_setup
+ \page
+ \endgroup
+ \makeupparameter\c!after\relax
+ \ifdoublesided \ifodd\realpageno \else
+ \csname\??makeupdoublesided\makeupparameter\c!doublesided\endcsname
+ \fi \fi
+ \strc_pagenumbers_page_state_pop % new
+ \egroup
+ \stoplayout % includes \page
+ \ifx\m_page_makeup_name\currentlayout
+ \orelse\ifx\m_page_makeup_layout_parent\??layout
+ \normalexpanded{\setuplayout[\m_page_makeup_name][\s!parent=\??layout]}% is remembered but checked later anyway
+ \fi}
+
+\setvalue{\??makeupdoublesided\v!yes}%
+ {\emptyhbox
+ \page}
+
+\setvalue{\??makeupdoublesided\v!empty}%
+ {\the\t_page_makeup_every_setup
+ % == \page[\v!dummy]
+ \page[\v!blank]%
+ \emptyhbox
+ \page}
+
+%D Probably obsolete (but used in one manual by Taco):
+
+\permanent\protected\def\startcolumnmakeup % don't change
+ {\bgroup
+ \getrawnoflines\textheight % raw as we can have topskip
+ \setbox\scratchbox\vbox to \dimexpr\noflines\lineheight-\lineheight+\topskip\relax
+ \bgroup
+ \forgetall}
+
+\permanent\protected\def\stopcolumnmakeup
+ {\egroup
+ \dp\scratchbox\zeropoint
+ \wd\scratchbox\textwidth
+ \box\scratchbox
+ \egroup
+ \page_otr_command_synchronize_hsize}
+
+%D The text surrounding the main body text can be influenced by setting their
+%D associated status variables. The connection between them is made by the following
+%D macro:
+
+\appendtoks % this might need a revision
+ \setupfooter[\c!state=\makeupparameter\c!footerstate]%
+ \setupheader[\c!state=\makeupparameter\c!headerstate]%
+ \setuptext [\c!state=\makeupparameter\c!textstate]%
+ \setupbottom[\c!state=\makeupparameter\c!bottomstate]%
+ \setuptop [\c!state=\makeupparameter\c!topstate]%
+\to \t_page_makeup_every_setup
+
+%D The standard page template is defined as follows:
+
+\setupmakeup
+ [\c!width=\innermakeupwidth, % example in manual / was \makeupwidth
+ \c!height=\textheight, % example in manual
+ %\c!commands=,
+ %\c!setups=,
+ %\c!color=,
+ %\c!align=,
+ %\c!before=,
+ %\c!after=,
+ %\c!location=,
+ \c!page=\v!right,
+ \c!doublesided=\v!empty,
+ \c!top=\vss,
+ \c!bottom=\vss,
+ \c!bottomstate=\v!normal,
+ \c!topstate=\v!normal,
+ \c!textstate=\v!normal,
+ \c!headerstate=\v!stop,
+ \c!footerstate=\v!stop,
+ \c!pagestate=\v!stop] % in manual ! ! !
+% \c!pagestate=\v!start]
+
+\definemakeup
+ [\v!standard]
+ [\c!width=\innermakeupwidth,
+ \c!height=\textheight,
+ \c!page=\v!right,
+ \c!doublesided=\v!empty]
+
+\definemakeup
+ [\v!text]
+ [\c!topstate=\v!start,
+ \c!headerstate=\v!start,
+ \c!textstate=\v!start,
+ \c!footerstate=\v!start,
+ \c!bottomstate=\v!start,
+ \c!doublesided=\v!no,
+ \c!page=\v!yes,
+ \c!top=\pseudostrut\ignorespaces,
+ \c!bottom=\obeydepth\vss]
+
+\definemakeup
+ [\v!page]
+
+\definemakeup
+ [\v!middle]
+ [\v!standard]
+
+% \definelayout[standard]
+% \definelayout[text]
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx
new file mode 100644
index 00000000000..05b09c79e87
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-mbk.mklx
@@ -0,0 +1,243 @@
+%D \module
+%D [ file=page-mbk, % was part of page-mis.mkiv / 2008.11.17
+%D version=2011.11.23, % was part of page-flt.tex / 2000.10.20
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Margin Floats,
+%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 Page Macros / Margin Floats}
+
+\unprotect
+
+%D This is an old mechanism that is quite independent of other floats. There is for
+%D instance no save/restore used here. When there is need (and demand) we can use
+%D the float cache and then flush them in the text when they are left over. On the
+%D other hand, margin float are somewhat manual so it does not make too much sense
+%D to complicate the code. As an alternative users can fall back on margin texts:
+%D they do stack but don't float.
+%D
+%D \starttyping
+%D \dorecurse{9} {
+%D \placefigure[margin]{#1}{}
+%D \input ward
+%D }
+%D \page \null % will flush them
+%D \stoptyping
+
+% status=start: in margin
+% status=stop : in text
+%
+% todo: flush margin floats at end of text
+% todo: separate boxes for left and right
+
+\installcorenamespace{marginblock}
+\installcorenamespace{marginblocklocation}
+
+\installcommandhandler \??marginblock {marginblock} \??marginblock
+
+\aliased\let\setupmarginblocks\setupmarginblock
+
+\newconditional\c_page_margin_blocks_enabled % not really needed as we can check each time
+\newconditional\c_page_margin_blocks_present
+
+\newbox \b_page_margin_blocks
+\newbox \b_page_margin_blocks_prepared
+
+\appendtoks
+ \doifelse{\rootmarginblockparameter\c!state}\v!start
+ \settrue\setfalse\c_page_margin_blocks_enabled
+\to \everysetupmarginblock
+
+\setupmarginblocks
+ [\c!state=\v!start,
+ \c!location=\v!inmargin,
+ \c!width=\rightmarginwidth,
+ %\c!style=,
+ %\c!color=,
+ %\c!align=,
+ %\c!left=,
+ %\c!right=,
+ %\c!top=,
+ %\c!before=,
+ %\c!after=,
+ \c!inbetween=\blank,
+ \c!bottom=\vfill]
+
+\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}
+
+\permanent\protected\def\stopmarginblock
+ {\doifelse{\marginblockparameter\c!state}\v!start
+ \page_margin_blocks_stop_block_yes
+ \page_margin_blocks_stop_block_nop
+ \endgroup}
+
+\def\page_margin_blocks_start_block_yes % 2 maal \vbox ivm \unvbox elders
+ {\showmessage\m!layouts4\empty
+ \global\settrue\c_page_margin_blocks_present
+ \global\setbox\b_page_margin_blocks\vtop\bgroup\vbox\bgroup
+ \hsize\marginblockparameter\c!width
+ \ifvoid\b_page_margin_blocks\else
+ \unvbox\b_page_margin_blocks
+ \marginblockparameter\c!inbetween
+ \fi
+ \usealignparameter\marginblockparameter
+ \usemarginblockstyleandcolor\c!style\c!color
+ \begstrut
+ \ignorespaces}
+
+\def\page_margin_blocks_stop_block_yes
+ {\removeunwantedspaces
+ \endstrut
+ \egroup
+ \egroup}
+
+\def\page_margin_blocks_start_block_nop
+ {\showmessage\m!layouts5\empty
+ \marginblockparameter\c!before
+ \bgroup
+ \usemarginblockstyleandcolor\c!style\c!color}
+
+\def\page_margin_blocks_stop_block_nop
+ {\egroup
+ \marginblockparameter\c!after}
+
+\def\page_margin_blocks_reshape
+ {\ifdim\ht\b_page_margin_blocks_prepared>\zeropoint
+ \beginofshapebox
+ \unvbox\b_page_margin_blocks_prepared
+ \endofshapebox
+ \reshapebox
+ {\box\shapebox}%
+ \setbox\b_page_margin_blocks_prepared\vbox to \textheight
+ {\marginblockparameter\c!top
+ \flushshapebox
+ \marginblockparameter\c!bottom}%
+ \fi}
+
+\permanent\protected\def\checkmarginblocks
+ {\ifvoid\b_page_margin_blocks
+ \global\setfalse\c_page_margin_blocks_present
+ \else
+ \page_margin_blocks_check_indeed
+ \fi}
+
+\def\page_margin_blocks_check_indeed
+ {\ifcsname\??marginblocklocation\marginblockparameter\c!location\endcsname
+ \page_margin_blocks_prepare_box
+ \csname\??marginblocklocation\marginblockparameter\c!location\endcsname
+ \else
+ \global\setbox\b_page_margin_blocks\emptybox
+ \global\setfalse\c_page_margin_blocks_present
+ \fi}
+
+\def\page_margin_blocks_prepare_box
+ {\setbox\b_page_margin_blocks_prepared\vbox
+ {\forgetall
+ \splittopskip\topskip
+ \ifvoid\b_page_margin_blocks\else
+ \ifdim\ht\b_page_margin_blocks>\textheight
+ \vsplit\b_page_margin_blocks to \textheight
+ \else
+ \unvbox\b_page_margin_blocks
+ \fi
+ \fi}%
+ \page_margin_blocks_reshape
+ \setbox\b_page_margin_blocks_prepared\vbox
+ {\marginblockparameter\c!before
+ \box\b_page_margin_blocks_prepared
+ \marginblockparameter\c!after}}
+
+% inner outer
+
+\setvalue{\??marginblocklocation\v!left }{\page_margin_blocks_set_l_box}
+\setvalue{\??marginblocklocation\v!right }{\page_margin_blocks_set_r_box}
+\setvalue{\??marginblocklocation\v!inmargin}{\doifbothsidesoverruled
+ \page_margin_blocks_set_r_box
+ \page_margin_blocks_set_r_box
+ \page_margin_blocks_set_l_box}
+\setvalue{\??marginblocklocation\v!middle }{\doifbothsidesoverruled
+ \page_margin_blocks_set_r_box
+ \page_margin_blocks_set_l_box
+ \page_margin_blocks_set_r_box}
+
+\permanent\protected\def\page_margin_blocks_place_r_yes
+ {\setbox\b_page_margin_blocks_prepared\hbox to \rightmarginwidth
+ {\marginblockparameter\c!left
+ \box\b_page_margin_blocks_prepared
+ \marginblockparameter\c!right}%
+ \vsmashbox\b_page_margin_blocks_prepared
+ \box\b_page_margin_blocks_prepared}
+
+\permanent\protected\def\page_margin_blocks_place_l_yes
+ {\setbox\b_page_margin_blocks_prepared\hbox to \leftmarginwidth
+ {\marginblockparameter\c!right
+ \box\b_page_margin_blocks_prepared
+ \marginblockparameter\c!left}%
+ \vsmashbox\b_page_margin_blocks_prepared
+ \box\b_page_margin_blocks_prepared}
+
+\permanent\protected\def\page_margin_blocks_place_r_nop{\hskip\rightmarginwidth}
+\permanent\protected\def\page_margin_blocks_place_l_nop{\hskip\leftmarginwidth}
+
+\aliased\let\placerightmarginblock\page_margin_blocks_place_r_nop
+\aliased\let\placeleftmarginblock \page_margin_blocks_place_l_nop
+
+\def\page_margin_blocks_set_r_box{\enforced\aliased\let\placerightmarginblock\page_margin_blocks_place_r_yes}
+\def\page_margin_blocks_set_l_box{\enforced\aliased\let\placeleftmarginblock \page_margin_blocks_place_l_yes}
+
+% margin floats (keyword 'margin' in option list)
+
+\protected\def\page_margin_blocks_process_float
+ {\doifelse{\marginblockparameter\c!state}\v!start
+ \page_margin_blocks_process_float_yes
+ \page_margin_blocks_process_float_nop}
+
+\def\page_margin_blocks_process_float_yes
+ {\global\setbox\b_page_margin_blocks\vbox
+ {\hsize\marginblockparameter\c!width
+ \unvcopy\b_page_margin_blocks
+ \ifvoid\b_page_margin_blocks\else
+ \expandafter\marginblockparameter\expandafter\c!inbetween
+ \fi
+ \box\floatbox
+ \filbreak}%
+ \ifdim\ht\b_page_margin_blocks>\textheight
+ % page_floats_report_saved % no saving done anyway
+ \else
+ \page_floats_report_total
+ \fi}
+
+\def\page_margin_blocks_process_float_nop
+ {\handlefloatmethod\v!here}
+
+\def\page_margin_blocks_float_before
+ {\ifconditional\c_page_margin_blocks_enabled
+ \doifinset\v!margin\floatlocation\endgraf
+ \fi}
+
+\def\page_margin_blocks_float_set_hsize
+ {\ifconditional\c_page_margin_blocks_enabled
+ \doifinset\v!margin\floatlocation{\hsize\rootmarginblockparameter\c!width}%
+ \fi}
+
+\appendtoks
+ \ifvoid\b_page_margin_blocks \else
+ \writestatus\m!layouts{beware: there are left-over margin floats!}%
+ \fi
+\to \everystoptext
+
+\permanent\protected\def\flushmarginblocks
+ {\page_otr_command_flush_margin_blocks}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-mcl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-mcl.mkxl
new file mode 100644
index 00000000000..d36e76d94f4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-mcl.mkxl
@@ -0,0 +1,542 @@
+%D \module
+%D [ file=page-mcl,
+%D version=2020.07.26, % stripped down redone page-mul
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Multicolumns Limited,
+%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 Page Macros / Multicolumns Limited}
+
+\unprotect
+
+%D Columns are kind of hairy in \TEX\ and we would be better if no one needed them.
+%D Anyway, we do need some support and no mechanism can serve all. The original
+%D multicolumn mechanism of \MKII\ was never fully adapted to \MKIV, where mixed
+%D columns and page columns showed up instead. However, for some cases a dumb
+%D mechanism makes sense, so again we introduce multi columns, but without float
+%D hacks. This one will be optimized for mixed usage as for instance itemize needs.
+%D Their main advantage is that they can better deal with notes, which are hairy in
+%D themselves. This will (for now) only happen in \LMTX.
+%D
+%D The code is stripped down ancient \MKII\ code and might become cleaner as it
+%D evolves. Macros keep similar names but take a different namespace. The code is
+%D not yet perfect wrt spacing!
+
+% \enableexperiments[itemize.columns]
+%
+% \starttext
+%
+% \startmulticolumns
+% \dorecurse{10}{\samplefile{ward}\footnote{note #1}\par}
+% \stopmulticolumns
+%
+% \dorecurse{4}{\samplefile{ward}\par}
+%
+% \startitemize[packed,columns,two]
+% \dorecurse{100}{\startitem test #1 \footnote{this is a footnote #1}\stopitem}
+% \stopitemize
+%
+% \stoptext
+
+\ifdefined \startmulticolumns
+
+ % we're testing and don't want to remake the format
+
+\else
+
+\installcorenamespace {multicolumns}
+
+\installframedcommandhandler \??multicolumns {multicolumns} \??multicolumns
+
+\newdimen \d_page_mcl_available_width
+\newdimen \d_page_mcl_distance
+\newdimen \d_page_mcl_leftskip
+\newdimen \d_page_mcl_rightskip
+\newdimen \d_page_mcl_used_width
+\newdimen \d_page_mcl_temp
+\newdimen \d_page_mcl_saved_pagetotal % brrr, still needed ?
+
+\newcount \c_page_mcl_balance_minimum
+\newcount \c_page_mcl_n_of_lines
+
+\newbox \b_page_mcl_preceding
+\newdimen \d_page_mcl_preceding_height
+\newconditional\c_page_mcl_preceding_present
+
+\newbox \b_page_mcl_rest_of_page
+\newbox \b_page_mcl_page
+
+\newconditional\c_page_mcl_reverse
+\newconditional\c_page_mcl_balance
+
+\newconstant \c_page_mcl_routine
+
+\setnewconstant\c_page_mcl_routine_regular \zerocount
+\setnewconstant\c_page_mcl_routine_intercept \plusone
+\setnewconstant\c_page_mcl_routine_continue \plustwo
+\setnewconstant\c_page_mcl_routine_balance \plusthree
+\setnewconstant\c_page_mcl_routine_error \plusfour
+
+\newbox \b_page_mcl_balance_content
+\newconstant \c_page_mcl_balance_tries_max
+\newcount \c_page_mcl_balance_tries
+\newdimen \d_page_mcl_balance_target
+\newdimen \d_page_mcl_balance_natural_height
+\newdimen \d_page_mcl_balance_step
+\newconditional\c_page_mcl_balance_possible
+
+\c_page_mcl_balance_tries_max 250 % 100 is too small when floats are involved
+
+%def\m_page_mcl_overshoot_ratio{\ifgridsnapping0\else.5\fi}
+\def\m_page_mcl_overshoot_ratio{.5}
+
+\fi
+
+\protected\def\page_mcl_command_set_hsize
+ {\d_page_mcl_available_width\dimexpr
+ \makeupwidth
+ -\d_page_mcl_leftskip
+ -\d_page_mcl_rightskip
+ -\nofcolumns\d_page_mcl_distance
+ +\d_page_mcl_distance
+ \relax
+ \d_page_mcl_used_width\dimexpr
+ \d_page_mcl_available_width/\nofcolumns
+ \relax
+ \textwidth\d_page_mcl_used_width
+ \hsize\d_page_mcl_used_width}
+
+\protected\def\page_mcl_set_n_of_lines#1%
+ {\d_page_mcl_temp\dimexpr
+ +\textheight
+ \ifdim\d_page_mcl_preceding_height>\zeropoint -\d_page_mcl_preceding_height \fi
+% \ifdim\ht\b_page_mcl_preceding>\zeropoint -\ht\b_page_mcl_preceding \fi
+ -#1%
+ \relax
+ \getnoflines\d_page_mcl_temp
+ \ifnum\layoutlines>\zerocount \ifnum\noflines>\layoutlines
+ \noflines\layoutlines
+ \fi \fi
+ \c_page_mcl_n_of_lines\noflines}
+
+% \protected\def\page_mcl_command_set_vsize
+% {%%\page_one_command_set_vsize % indeed?
+% \page_mcl_set_n_of_lines\zeropoint
+% \d_page_mcl_temp\nofcolumns\dimexpr
+% \c_page_mcl_n_of_lines\openlineheight
+% % +\m_page_mcl_overshoot_ratio\openlineheight % collect enough data
+% \relax
+% \global\vsize \d_page_mcl_temp
+% \global\pagegoal\d_page_mcl_temp} % let's do it only here, reports maxdimen anyway
+
+\protected\def\page_mcl_command_set_vsize
+ {\global\vsize\dimexpr\nofcolumns\textheight+\nofcolumns\lineheight\relax
+ \pagegoal\dimexpr
+ \vsize
+% -\d_page_floats_inserted_top % needs checking
+% -\d_page_floats_inserted_bottom % needs checking
+ -\c_page_mix_n_of_columns\insertheights
+ \relax}
+
+\protected\def\page_mcl_command_routine
+ {\ifcase\c_page_mcl_routine
+ \page_one_command_routine
+ \or
+ \page_mcl_routine_intercept
+ \or
+ \page_mcl_routine_continue
+ \or
+ \page_mcl_routine_balance
+ \or
+ \page_mcl_routine_error
+ \fi}
+
+\let\page_mcl_command_package_contents\page_one_command_package_contents
+
+\def\page_mcl_routine_intercept
+ {\global\setbox\b_page_mcl_preceding\vbox
+ {\page_otr_command_flush_top_insertions
+ \unvbox\normalpagebox}}
+
+\def\page_mcl_routine_error
+ {\showmessage\m!columns3\empty
+ \page_otr_construct_and_shipout\unvbox\normalpagebox\zerocount} % three arguments
+
+\protected\def\page_mcl_initialize_variables
+ {\reseteverypar % maybe still freeze ....
+ \dontcomplain
+ \settopskip
+ \setmaxdepth
+ \topskip 1\topskip
+ \splittopskip \topskip
+ \splitmaxdepth \maxdepth
+ \boxmaxdepth \maxdepth % dangerous
+ \emergencystretch\zeropoint
+ \relax}
+
+\def\page_mcl_flush_preceding_normal
+ {\unvbox\b_page_mcl_preceding}
+
+\def\page_mcl_flush_preceding_ongrid
+ {\scratchdimen\dimexpr
+ \d_page_mcl_saved_pagetotal
+ -\d_page_mcl_preceding_height
+ -\topskip
+ \relax
+ \box\b_page_mcl_preceding
+ \kern\scratchdimen}
+
+\def\page_mcl_flush_packaged_columns_continued
+ {\page_mcl_flush_packaged_columns_indeed
+ \box\b_page_mcl_page}
+
+\def\page_mcl_flush_packaged_columns_balanced
+ {\bgroup
+ \page_mcl_flush_packaged_columns_indeed
+ \getnoflines{\htdp\b_page_mcl_page}%
+ \ht\b_page_mcl_page\dimexpr
+ \noflines\openlineheight
+ -\openstrutdepth
+ \ifgridsnapping
+ % quick hack (at least it works with itemize)
+ \else
+ -\openlineheight
+ +\topskip
+ \fi
+ \relax
+ \dp\b_page_mcl_page\openstrutdepth
+ \box\b_page_mcl_page
+ \egroup}
+
+\def\page_mcl_synchronize_marks
+ {\dohandleallcolumns{\page_marks_synchronize_column\plusone\nofcolumns\mofcolumns\currentcolumnbox}}
+
+\def\page_mcl_flush_packaged_columns_indeed
+ {\ifvoid\b_page_mcl_preceding
+ \setfalse\c_page_mcl_preceding_present % will be set elsewhere
+ \else
+ \settrue\c_page_mcl_preceding_present
+ \page_apply_postprocessors_box\b_page_mcl_preceding
+ \fi
+ \forgetall
+ \page_mcl_initialize_variables
+ \page_mcl_synchronize_marks
+ \setbox\b_page_mcl_page\vpack
+ {\ifconditional\c_page_mcl_reverse\reversehpack\else\naturalhpack\fi to \makeupwidth
+ {\hskip\ifconditional\c_page_mcl_reverse\d_page_mcl_rightskip\else\d_page_mcl_leftskip\fi\relax
+ \dohandleallcolumns
+ {\wd\currentcolumnbox\d_page_mcl_used_width
+ \setbox\scratchbox\hpack{\strut\box\currentcolumnbox}% hm, why strut
+ \anch_mark_column_box\scratchbox\currentcolumn
+ \box\scratchbox
+ \hfil}%
+ \unskip
+ \hskip\ifconditional\c_page_mcl_reverse\d_page_mcl_leftskip\else\d_page_mcl_rightskip\fi}}%
+ \ifconditional\c_page_mcl_preceding_present
+ \settrue\c_page_mcl_preceding_present
+ \ifgridsnapping
+ \page_mcl_flush_preceding_ongrid % obey grid settings, force on grid
+ \else
+ \page_mcl_flush_preceding_normal % ignore grid settings, not on grid
+ \fi
+ \fi
+ \global\d_page_mcl_preceding_height\zeropoint
+ \page_otr_command_set_vsize
+ \dosomebreak\nobreak % hm, only needed when topstuff
+ \ifgridsnapping \else
+ \ifconditional\c_page_mcl_preceding_present
+ \nointerlineskip
+ \vskip\dimexpr\openstrutheight-\topskip\relax
+ \fi
+ \fi
+ \prevdepth\openstrutdepth
+ \nointerlineskip
+ \dp\b_page_mcl_page\zeropoint}
+
+\def\page_mcl_split_column#1#2% copy or box
+ {\global\setbox\currentcolumnbox\vsplit#1 upto #2}
+
+\def\page_mcl_routine_continue
+ {\bgroup
+ \forgetall
+ \page_mcl_initialize_variables
+ \settotalinsertionheight
+ \page_mcl_set_n_of_lines\totalinsertionheight
+ \d_page_mcl_balance_target\c_page_mcl_n_of_lines\openlineheight
+ \dohandleallcolumns{\page_mcl_split_column\normalpagebox\d_page_mcl_balance_target}%
+ \setbox\b_page_mcl_rest_of_page\vpack{\unvbox\normalpagebox}%
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox\vpack to \d_page_mcl_balance_target
+ {\unvbox\currentcolumnbox % wel of niet \unvbox ?
+ \vfill}}%
+ \setbox\b_page_mcl_preceding\vpack{\page_mcl_flush_packaged_columns_continued}%
+ \page_otr_construct_and_shipout\box\b_page_mcl_preceding\zerocount % three arguments
+ \page_otr_command_set_hsize
+ \page_otr_command_set_vsize
+ \unvbox\b_page_mcl_rest_of_page
+ \egroup}
+
+\def\page_mcl_routine_balance
+ {\bgroup
+ % why no \forgetall here
+ \page_mcl_initialize_variables
+ \widowpenalty\zerocount
+ \setbox\b_page_mcl_balance_content\vpack{\unvbox\normalpagebox}%
+ \ifdim\ht\b_page_mcl_balance_content>\openlineheight % at least one line
+ \ifnum\c_page_mcl_balance_minimum<\plustwo % balance anyway
+ \settrue\c_page_mcl_balance_possible
+ \else % check criterium to available lines
+ \getnoflines{\ht\b_page_mcl_balance_content}%
+ \divide\noflines \nofcolumns \relax
+ \ifnum\noflines<\c_page_mcl_balance_minimum \relax
+ \ifdim\dimexpr\ht\b_page_mcl_balance_content+\openlineheight\relax>\makeupheight
+ \settrue\c_page_mcl_balance_possible % column exceeding text height
+ \else
+ \setfalse\c_page_mcl_balance_possible % it seems to fit
+ \fi
+ \else
+ \settrue\c_page_mcl_balance_possible % balance indeed
+ \fi
+ \fi
+ \else
+ \setfalse\c_page_mcl_balance_possible % balancing does not make sense
+ \fi
+ \ifconditional\c_page_mcl_balance_possible % start balancing, was: \ifdim\ht\b_page_mcl_balance_content>\openlineheight
+ \page_mcl_balance_try_one
+ \page_mcl_balance_try_two
+ \else
+ % a one liner is not properly handled here, so best rewrite the text then
+ \showmessage\m!columns{10}\empty
+ \global\setbox\firstcolumnbox\vpack{\unvbox\b_page_mcl_balance_content}%
+ \fi
+ \c_page_mcl_routine\c_page_mcl_routine_error
+ %\baselinebottom % forces depth in separation rule
+ \page_mcl_flush_packaged_columns_balanced
+ %\allowbreak
+ \egroup}
+
+% \showmakeup
+
+\def\page_mcl_balance_try_one
+ {\d_page_mcl_balance_target\dimexpr\ht\b_page_mcl_balance_content+\topskip-\baselineskip\relax
+ \divide\d_page_mcl_balance_target \nofcolumns
+ \vbadness\plustenthousand
+ \c_page_mcl_balance_tries\zerocount
+ \bgroup
+ \ifgridsnapping
+ \d_page_mcl_balance_step\lineheight
+ \else
+ \d_page_mcl_balance_step\spacingfactor\onepoint % rubish
+ \fi
+ \doloop\page_mcl_balance_try_one_attempt
+ \global\setbox\b_page_mcl_rest_of_page\box\voidbox
+ \ifnum\c_page_mcl_balance_tries>\c_page_mcl_balance_tries_max\relax
+ \showmessage\m!columns7\empty
+ \else
+ \showmessage\m!columns8{\the\c_page_mcl_balance_tries}%
+ \fi
+ \egroup}
+
+\def\page_mcl_balance_try_one_attempt
+ {\advance\c_page_mcl_balance_tries \plusone
+ \global\setbox\b_page_mcl_rest_of_page\copy\b_page_mcl_balance_content\relax
+ \dohandleallcolumns{\page_mcl_split_column\b_page_mcl_rest_of_page\d_page_mcl_balance_target}%
+ \d_page_mcl_balance_natural_height\zeropoint
+ \dohandleallcolumns\page_mcl_balance_try_one_attempt_step
+\advance\d_page_mcl_balance_natural_height-33\scaledpoint % some slack
+ \ifnum\c_page_mcl_balance_tries>\c_page_mcl_balance_tries_max\relax
+ \exitloop
+ \orelse\ifdim\ht\b_page_mcl_rest_of_page>\zeropoint
+ \advance\d_page_mcl_balance_target\d_page_mcl_balance_step\relax
+ \orelse\ifdim\d_page_mcl_balance_natural_height>\ht\firstcolumnbox\relax
+ \advance\d_page_mcl_balance_target\d_page_mcl_balance_step\relax
+ \else
+ \exitloop
+ \fi}
+
+\def\page_mcl_balance_try_one_attempt_step
+ {\ifcase\currentcolumn\or\else
+ \ifdim\ht\currentcolumnbox>\d_page_mcl_balance_natural_height\relax
+ \d_page_mcl_balance_natural_height\ht\currentcolumnbox
+ \fi
+ \fi}
+
+\def\page_mcl_balance_try_two % hm ... can probably go
+ {\dohandleallcolumnscs\page_mcl_balance_try_two_step}
+
+% \def\page_mcl_balance_try_two_step
+% {\global\setbox\currentcolumnbox\vbox to \ht\firstcolumnbox
+% {\box\currentcolumnbox
+% \vfill}}
+
+\def\page_mcl_balance_try_two_step
+ {%\global\setbox\currentcolumnbox\box\currentcolumnbox
+ \ht\currentcolumnbox\ht\firstcolumnbox}
+
+\permanent\tolerant\protected\def\startmulticolumns[#1]%
+ {\bgroup
+ \ifinsidecolumns
+ \page_mcl_start_nop
+ \else
+ \setupmulticolumns[#1]%
+ \nofcolumns\multicolumnsparameter\c!n\relax
+ \ifnum\nofcolumns>\plusone
+ \page_mcl_start_yes
+ \nofmulticolumns\nofcolumns
+ \else
+ \page_mcl_start_nop
+ \fi
+ \fi}
+
+\aliased\let\stopmulticolumns\relax
+
+\def\page_mcl_start_nop
+ {\enforced\let\stopmulticolumns\page_mcl_stop_nop}
+
+\permanent\protected\def\page_mcl_stop_nop
+ {\egroup}
+
+\protected\def\page_mcl_start_yes
+ {\whitespace
+ \begingroup
+ \enforced\let\stopmulticolumns\page_mcl_stop_indeed
+ \global\insidecolumnstrue
+ \global\insidemulticolumnstrue
+ %
+ \d_page_mcl_distance\multicolumnsparameter\c!distance\relax
+ %
+ \edef\p_direction{\multicolumnsparameter\c!direction}%
+ \ifx\p_direction\v!right
+ \setfalse\c_page_mcl_reverse
+ \else
+ \settrue\c_page_mcl_reverse
+ \fi
+ %
+ \edef\p_balance{\multicolumnsparameter\c!balance}%
+ \ifx\p_balance\v!yes
+ \settrue\c_page_mcl_balance
+ \else
+ \setfalse\c_page_mcl_balance
+ \fi
+ %
+ \usealignparameter\multicolumnsparameter
+ %
+ \edef\p_blank{\multicolumnsparameter\c!blank}%
+ \ifempty\p_blank \else
+ \setupblank[\p_blank]%
+ \fi
+ %
+ \ifdim\s_spac_whitespace_parskip>\zeropoint\relax
+ \setupwhitespace[\p_blank]%
+ \fi
+ \c_page_mcl_balance_minimum\multicolumnsparameter\c!ntop\relax
+ %
+ \begingroup
+ %
+ \d_page_mcl_leftskip \leftskip
+ \d_page_mcl_rightskip\rightskip
+ \leftskip \zeropoint
+ \rightskip \zeropoint
+ \hangafter \zerocount
+ \hangindent \zeropoint
+ %
+ \widowpenalty \zerocount % will become option
+ \clubpenalty \zerocount % will become option
+ %
+ \ifdim\dimexpr\pagetotal+\parskip+\openlineheight\relax<\pagegoal
+ \allowbreak
+ \else
+ \break % sometimes fails
+ \fi
+ \appendtoks
+ \topskip1\topskip % best a switch
+ \to \everybodyfont
+ \the\everybodyfont % ugly here
+ \saveinterlinespace % ugly here
+ %
+ \initializecolumns\nofcolumns
+ %
+ \reseteverypar % todo
+ %
+ \ifdim\pagetotal=\zeropoint \else
+ \verticalstrut
+ \vskip-\struttotal
+ \fi
+ \global\d_page_mcl_saved_pagetotal\pagetotal
+ \setupoutputroutine[\s!multicolumn]%
+ \c_page_mcl_routine\c_page_mcl_routine_intercept
+ \page_otr_trigger_output_routine
+ \global\d_page_mcl_preceding_height\ht\b_page_mcl_preceding
+ \c_page_mcl_routine\c_page_mcl_routine_continue
+ \page_otr_command_set_hsize
+ \page_otr_command_set_vsize}
+
+\permanent\protected\def\page_mcl_stop_indeed
+ {\relax
+ \synchronizeoutput
+ \par
+ \ifconditional\c_page_mcl_balance
+ \c_page_mcl_routine\c_page_mcl_routine_continue
+ \goodbreak
+ \c_page_mcl_routine\c_page_mcl_routine_balance
+ \else
+ \goodbreak
+ \fi
+ % still the multi column routine
+ \page_otr_trigger_output_routine % the prevdepth is important, try e.g. toclist in
+ \prevdepth\zeropoint % columns before some noncolumned text text
+ %
+ \c_page_mcl_routine\c_page_mcl_routine_regular
+ %
+ \ifvoid\b_page_mcl_preceding\else
+ \unvbox\b_page_mcl_preceding
+ \fi
+ \global\d_page_mcl_preceding_height\zeropoint
+ \endgroup % here
+ \nofcolumns\plusone
+ \nofmulticolumns\plusone
+ \page_otr_command_set_vsize
+ \dosomebreak\allowbreak
+ \page_floats_column_pop_saved
+ %
+ \global\insidemulticolumnsfalse
+ \global\insidecolumnsfalse
+ \endgroup
+ \egroup}%
+
+\setupmulticolumns
+ [\c!n=2,
+ \c!ntop=1,
+ \c!direction=\v!right,
+ \c!distance=1.5\bodyfontsize, % influenced by switching
+ \c!balance=\v!yes,
+ \c!align={\v!text,\v!tolerant},
+ \c!blank={\v!line,\v!fixed}]
+
+\defineoutputroutine
+ [\s!multicolumn]
+ [\s!page_otr_command_routine =\page_mcl_command_routine,
+ \s!page_otr_command_package_contents=\page_mcl_command_package_contents,
+ \s!page_otr_command_set_vsize =\page_mcl_command_set_vsize,
+ \s!page_otr_command_set_hsize =\page_mcl_command_set_hsize]
+
+\let\strc_itemgroups_start_columns_old\strc_itemgroups_start_columns
+\let\strc_itemgroups_stop_columns_old \strc_itemgroups_stop_columns
+
+\def\strc_itemgroups_start_columns_new{\startmulticolumns[\c!n=\itemgroupparameter\c!n]}
+\def\strc_itemgroups_stop_columns_new {\stopmulticolumns}
+
+\installtexexperiment
+ {itemize.columns}
+ {\let\strc_itemgroups_start_columns\strc_itemgroups_start_columns_new
+ \let\strc_itemgroups_stop_columns \strc_itemgroups_stop_columns_new}
+ {\let\strc_itemgroups_start_columns\strc_itemgroups_start_columns_old
+ \let\strc_itemgroups_stop_columns \strc_itemgroups_stop_columns_old}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-mix.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-mix.mkxl
new file mode 100644
index 00000000000..433d94ab6bb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-mix.mkxl
@@ -0,0 +1,1086 @@
+%D \module
+%D [ file=page-mix,
+%D version=2012.07.12,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Mixed Columns,
+%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 Page Macros / Mixed Columns}
+
+%D This is a very experimental module. Eventually it will replace the current
+%D multi column mechanism (that then will be an instance). The \LUA\ part of
+%D the interface will quite probably change so don't use that one directly
+%D (yet).
+
+% todo:
+%
+% consult note class
+% notes per page
+% notes in each column
+% notes in last column
+% notes local/global
+% top and bottom inserts
+% wide floats
+% move floats
+% offsets (inner ones, so we change the hsize ... needed with backgrounds
+% when no content we currently loose the page
+
+% luatex buglet:
+%
+% \ctxlua{tex.setbox("global",0,node.hpack(nodes.pool.glyph("a",font.current())))}\box0
+
+\registerctxluafile{page-mix}{}
+
+\unprotect
+
+%D The mixed output routine replaces the traditional multi column handler that
+%D started out in \MKII. One of the complications of a routine is that it needs
+%D to align nicely when mixed in a single column layout. Instead of using all
+%D kind of shift juggling in this mechanism we simply switch to grid mode
+%D locally. After all, columns don't look nice when not on a. As the grid
+%D snapper in \MKIV\ is more advanced not that much extra code is needed.
+
+%D We use the command handler but the parent settings are not to be changed.
+%D Instead we could have used a dedicated root setup, but it's not worth the
+%D trouble.
+
+\installcorenamespace{mixedcolumns}
+
+\installframedcommandhandler \??mixedcolumns {mixedcolumns} \??mixedcolumns
+
+% old multicolumns mechanism
+%
+% \c!ntop=1,
+% \c!rule=\v!off, : now separator=rule
+% \c!height=,
+% \c!blank={\v!line,\v!fixed},
+% \c!rulethickness=\linewidth,
+% \c!offset=.5\bodyfontsize,
+
+\setupmixedcolumns
+ [\c!distance=1.5\bodyfontsize,
+ \c!n=\plustwo,
+ %\c!align=, % inherit (also replaces tolerance)
+ %\c!before=,
+ %\c!after=,
+ %\c!separator=\v!none,
+ %\c!setups=,
+ %\c!balance=\v!no,
+ %\c!blank={\v!line,\v!fixed}, yes or no
+ \c!frame=\v!off,
+ \c!strut=\v!no,
+ \c!offset=\v!overlay,
+ \c!alternative=\v!local,
+ \c!maxheight=\textheight,
+ \c!maxwidth=\makeupwidth,
+ \c!grid=\v!tolerant,
+ \c!internalgrid=\v!line,
+ \c!step=.25\lineheight, % needs some experimenting
+ %\c!splitmethod=\v!fixed, % will be default
+ \c!direction=\v!normal, % new (also todo in the new columnsets)
+ \c!notes=\v!yes,
+ \c!define=\v!yes,
+ \c!method=\ifinner\s!box\else\s!otr\fi] % automatic as suggested by WS
+
+ \let\startmixedcolumns\relax % defined later
+\aliased\let\stopmixedcolumns \relax % defined later
+
+\appendtoks % could become an option
+ \ifcstok{\mixedcolumnsparameter\c!define}\v!yes
+ \frozen\instance\setuevalue{\e!start\currentmixedcolumns}{\startmixedcolumns[\currentmixedcolumns]}%
+ \frozen\instance\setuevalue{\e!stop \currentmixedcolumns}{\stopmixedcolumns}%
+ \fi
+\to \everydefinemixedcolumns
+
+%D In order to avoid a mixup we use quite some local registers.
+
+\newdimen \d_page_mix_column_width
+\newdimen \d_page_mix_max_height
+\newdimen \d_page_mix_max_width
+\newdimen \d_page_mix_distance
+\newcount \c_page_mix_n_of_columns
+\newdimen \d_page_mix_threshold
+\newdimen \d_page_mix_leftskip
+\newdimen \d_page_mix_rightskip
+
+\newdimen \d_page_mix_balance_step
+\setnewconstant\c_page_mix_balance_cycles 500
+
+\setnewconstant\c_page_mix_break_forced -123
+
+\newbox \b_page_mix_preceding
+\newdimen \d_page_mix_preceding_height
+
+\newbox \b_page_mix_collected
+
+\newconstant \c_page_mix_routine
+
+\setnewconstant\c_page_mix_routine_regular \zerocount
+\setnewconstant\c_page_mix_routine_intercept\plusone
+\setnewconstant\c_page_mix_routine_continue \plustwo
+\setnewconstant\c_page_mix_routine_balance \plusthree
+\setnewconstant\c_page_mix_routine_error \plusfour
+
+\newconditional\c_page_mix_process_notes
+\newconditional\c_page_mix_grid_snapping
+
+%D The main environment is called as follows:
+%D
+%D \starttyping
+%D \startmixedcolumns[instance][settings]
+%D \startmixedcolumns[instance]
+%D \startmixedcolumns[settings]
+%D \stoptyping
+%D
+%D However, best is not to use this one directly but define an instance and
+%D use that one.
+
+% % For the moment only on my machine:
+%
+% \definemixedcolumns
+% [\v!columns]
+%
+% \protected\def\setupcolumns
+% {\setupmixedcolumns[\v!columns]}
+
+%D In itemizations we also need columns, so let's define a apecial instance
+%D for them. These need to work well in situations like this:
+%D
+%D \starttyping
+%D \input zapf
+%D
+%D \startnarrower
+%D \startitemize[columns,two,packed][before=,after=]
+%D \dorecurse{10}{\startitem item #1 \stopitem}
+%D \stopitemize
+%D \stopnarrower
+%D
+%D \input zapf
+%D
+%D \startnarrower
+%D \startitemize[columns,two][before=,after=]
+%D \dorecurse{10}{\startitem item #1 \stopitem}
+%D \stopitemize
+%D \stopnarrower
+%D
+%D \input zapf
+%D
+%D \startnarrower
+%D \startitemize[columns,two]
+%D \dorecurse{10}{\startitem item #1 \stopitem}
+%D \stopitemize
+%D \stopnarrower
+%D
+%D \input zapf
+%D \stoptyping
+
+\ifdefined\s!itemgroupcolumns \else \def\s!itemgroupcolumns{itemgroupcolumns} \fi
+
+\definemixedcolumns
+ [\s!itemgroupcolumns]
+ [\c!n=\itemgroupparameter\c!n,
+ \c!direction=\itemgroupparameter\c!direction,
+ \c!separator=\v!none,
+ \c!splitmethod=\v!none,
+ \c!grid=\v!tolerant,
+ \c!internalgrid=\v!halfline, % new, we may still revert to \v!line
+ \c!balance=\v!yes,
+ \c!notes=\v!no] % kind of hidden
+
+% better
+
+\setupmixedcolumns
+ [\s!itemgroupcolumns]
+ [\c!splitmethod=\v!fixed,
+ \c!grid=\v!yes,
+ \c!internalgrid=\v!line]
+
+% even better:
+
+\setupitemgroup
+ [\c!grid=\v!tolerant:10] % 10 pct tolerance in columns snapping
+
+\setupmixedcolumns
+ [\s!itemgroupcolumns]
+ [\c!grid=\itemgroupparameter\c!grid]
+
+% the fast hooks:
+
+\protected\def\strc_itemgroups_start_columns
+ {\startmixedcolumns[\s!itemgroupcolumns]} % we could have a fast one
+
+\protected\def\strc_itemgroups_stop_columns
+ {\stopmixedcolumns}
+
+%D The mixed output routine can be in different states. First we need to intercept
+%D the already present content. This permits mixed single and multi column usage.
+%D Then we have the continuous routine, one that intercepts pages in sequence.
+%D Finally, when we finish the mixed columns mode, we can (optionally) balance the
+%D last page.
+
+\protected\def\page_mix_command_routine
+ {\ifcase\c_page_mix_routine
+ \page_one_command_routine
+ \or
+ \page_mix_routine_intercept
+ \or
+ \page_mix_routine_continue
+ \or
+ \page_mix_routine_balance
+ \or
+ \page_mix_routine_error
+ \fi}
+
+%D The interceptor is quite simple, at least for the moment.
+
+\def\page_mix_routine_intercept
+ {\ifdim\pagetotal>\pagegoal
+ % testcase: preceding-001 ... if we don't do this, text can disappear as
+ % preceding is overwritten ... needs to be figured out some day
+ \page_one_command_routine
+ \fi
+ \global\setbox\b_page_mix_preceding\vbox % pack ?
+ {\forgetall
+ \page_otr_command_flush_top_insertions
+ \ifdim\htdp\b_page_mix_preceding=\zeropoint \else
+ \writestatus\m!columns{preceding error}%
+ \unvbox\b_page_mix_preceding
+ \fi
+ \unvbox\normalpagebox}}
+
+%D The error routine is there but unlikely to be called. It is a left-over from
+%D the traditional routine that might come in handy some day.
+
+\def\page_mix_construct_and_shipout#1#2#3%
+ {\ifconditional\c_page_mix_grid_snapping\else\gridsnappingfalse\fi % maybe only for notes (bottom alignment)
+ \page_otr_construct_and_shipout#1#2#3%
+ \ifconditional\c_page_mix_grid_snapping \gridsnappingtrue \fi}
+
+
+\def\page_mix_routine_error
+ {\showmessage\m!columns3\empty
+ \page_mix_construct_and_shipout\unvbox\normalpagebox\zerocount} % three arguments
+
+%D Some settings (and actions) depend on the current output routine and setting the
+%D hsize and vsize is among them. The calculation of the hsize is done elsewhere.
+
+\protected\def\page_mix_command_set_hsize
+ {\hsize\d_page_mix_column_width
+ \columnwidth\d_page_mix_column_width}
+
+%D When setting the vsize we make sure that we collect a few more lines than needed
+%D so that we have enough to split over the columns. Collecting too much is somewhat
+%D tricky as they will spill over to the next page.
+
+\protected\def\page_mix_command_set_vsize
+ {\vsize\dimexpr\c_page_mix_n_of_columns\textheight+\c_page_mix_n_of_columns\lineheight\relax
+ \pagegoal\dimexpr
+ \vsize
+% -\d_page_floats_inserted_top % needs checking
+% -\d_page_floats_inserted_bottom % needs checking
+ -\c_page_mix_n_of_columns\insertheights
+ \relax}
+
+%D As we use \LUA\ there is the usual amount of tracing at that end. At the tex end
+%D we only visualize boxes.
+
+\let\page_mix_hbox\hbox
+\let\page_mix_vbox\vbox
+
+\installtextracker
+ {mixedcolumns.boxes}
+ {\let\page_mix_hbox\ruledhbox
+ \let\page_mix_vbox\ruledvbox}
+ {\let\page_mix_hbox\hbox
+ \let\page_mix_vbox\vbox}
+
+%D We provide a few column break options. Interesting is that while forcing a new
+%D column in the traditional mechanism was a pain, here it works quite well.
+
+\installcolumnbreakmethod \s!mixedcolumn \v!preference
+ {\goodbreak}
+
+\installcolumnbreakmethod \s!mixedcolumn \v!yes
+ {\par
+ \penalty\c_page_mix_break_forced\relax}
+
+%D As we operate in grid snapping mode, we use a dedicated macro to enable this
+%D mechamism.
+
+\def\page_mix_enable_grid_snapping
+ {\edef\p_grid{\mixedcolumnsparameter\c!grid}%
+ \setfalse\c_page_mix_grid_snapping
+ \ifempty\p_grid
+ % just follow the default grid settings
+ \else
+ \ifgridsnapping\settrue\c_page_mix_grid_snapping\fi
+ \gridsnappingtrue
+ \setsystemmode\v!grid
+ \spac_grids_snap_value_set\p_grid
+ \fi}
+
+%D Between columns there is normally just spacing unless one enforces a rule.
+%D
+%D \starttyping
+%D \input zapf
+%D
+%D \startnarrower
+%D \startmixedcolumns[n=2,background=color,backgroundcolor=red,rulethickness=1mm,rulecolor=green,separator=rule]
+%D \input zapf
+%D \stopmixedcolumns
+%D \stopnarrower
+%D
+%D \input zapf
+%D \stoptyping
+
+\installcorenamespace{mixedcolumnsseparator}
+
+\permanent\protected\def\installmixedcolumnseparator#1#2%
+ {\setvalue{\??mixedcolumnsseparator#1}{#2}}
+
+\installmixedcolumnseparator\v!rule
+ {\vrule
+ \s!width \mixedcolumnsparameter\c!rulethickness
+ \s!height\mixedcolumnseparatorheight
+ \s!depth \mixedcolumnseparatordepth
+ \relax}
+
+\protected\def\page_mix_command_inject_separator
+ {\begingroup
+ \setbox\scratchbox\hbox to \zeropoint \bgroup
+ \hss
+ \starttextproperties
+ \usemixedcolumnscolorparameter\c!rulecolor
+ \begincsname\??mixedcolumnsseparator\p_separator\endcsname % was \c!rule
+ \stoptextproperties
+ \hss
+ \egroup
+ \ht\scratchbox\zeropoint
+ \dp\scratchbox\zeropoint
+ \hss
+ \box\scratchbox
+ \hss
+ \endgroup}
+
+%D We've now arrived at the real code. The start command mostly sets up the
+%D environment and variables that are used in the splitter. One of the last
+%D things happening at the start is switching over to the mixed continuous
+%D routine.
+
+\installcorenamespace{mixedcolumnsbefore}
+\installcorenamespace{mixedcolumnsstart}
+\installcorenamespace{mixedcolumnsstop}
+\installcorenamespace{mixedcolumnsafter}
+
+%D For practical reasons there is always a first argument needed that
+%D indicates the class.
+%D
+%D \starttyping
+%D \startmixedcolumns[n=3,alternative=global]
+%D \dorecurse{200}{Zomaar wat #1 met een footnote\footnote{note #1}. }
+%D \stopmixedcolumns
+%D \stoptyping
+
+\mutable\let\currentmixedcolumnsmethod\empty
+
+\installmacrostack\currentmixedcolumns
+\installmacrostack\currentmixedcolumnsmethod
+
+\permanent\tolerant\protected\def\startmixedcolumns[#1]#*[#2]%
+ {\push_macro_currentmixedcolumns
+ \push_macro_currentmixedcolumnsmethod
+ \ifparameters
+ \expandafter\page_mix_start_columns_c
+ \or
+ \expandafter\page_mix_start_columns_b
+ \or
+ \expandafter\page_mix_start_columns_a
+ \fi[#1][#2]}
+
+\def\page_mix_start_columns_checked#1#2%
+ {\edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}%
+ \ifx\currentmixedcolumnsmethod\v!box
+ \expandafter#1%
+ \orelse\ifinsidecolumns
+ \expandafter#2%
+ \else
+ \expandafter#1%
+ \fi}
+
+\def\page_mix_start_columns_a[#1]% [#2]%
+ {\edef\currentmixedcolumns{#1}%
+ \page_mix_start_columns_checked
+ \page_mix_start_columns_a_yes
+ \page_mix_start_columns_a_nop}
+
+\def\page_mix_start_columns_a_yes[#1]%
+ {\mixedcolumnsparameter\c!before\relax
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begingroup
+ \setupcurrentmixedcolumns[#1]%
+ \page_mix_initialize_columns
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname
+ \enforced\let\stopmixedcolumns\page_mix_columns_stop_yes}
+
+\def\page_mix_start_columns_a_nop[#1]%
+ {\begingroup
+ \enforced\let\stopmixedcolumns\page_mix_columns_stop_nop}
+
+\def\page_mix_start_columns_b[#1][#2]%
+ {\ifhastok={#1}%
+ \let\currentmixedcolumns\empty
+ \page_mix_error_b
+ \page_mix_start_columns_checked\page_mix_start_columns_b_yes\page_mix_start_columns_b_nop[#1]%
+ \else
+ \edef\currentmixedcolumns{#1}%
+ \page_mix_start_columns_checked\page_mix_start_columns_b_yes\page_mix_start_columns_b_nop[#2]%
+ \fi}
+
+\def\page_mix_start_columns_b_yes[#1]%
+ {\mixedcolumnsparameter\c!before\relax % so, it doesn't listen to local settings !
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begingroup
+ \setupcurrentmixedcolumns[#1]%
+ \page_mix_initialize_columns
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname % no \relax
+ \enforced\let\stopmixedcolumns\page_mix_columns_stop_yes}
+
+\def\page_mix_start_columns_b_nop[#1]%
+ {\begingroup
+ \enforced\let\stopmixedcolumns\page_mix_columns_stop_nop}
+
+\def\page_mix_error_b
+ {\writestatus\m!columns{best use an instance of mixed columns}}
+
+\def\page_mix_start_columns_c[#1][#2]%
+ {\let\currentmixedcolumns\empty
+ \page_mix_start_columns_checked
+ \page_mix_start_columns_c_yes
+ \page_mix_start_columns_c_nop}
+
+\def\page_mix_start_columns_c_yes
+ {\mixedcolumnsparameter\c!before\relax
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begingroup
+ \page_mix_initialize_columns
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname
+ \enforced\let\stopmixedcolumns\page_mix_columns_stop_yes}
+
+\def\page_mix_start_columns_c_nop
+ {\begingroup
+ \enforced\let\stopmixedcolumns\page_mix_columns_stop_nop}
+
+\protected\def\page_mix_fast_columns_start#1%
+ {\push_macro_currentmixedcolumns
+ \push_macro_currentmixedcolumnsmethod
+ \edef\currentmixedcolumns{#1}%
+ \edef\currentmixedcolumnsmethod{\mixedcolumnsparameter\c!method}%
+ \mixedcolumnsparameter\c!before\relax % so, it doesn't listen to local settings !
+ \begincsname\??mixedcolumnsbefore\currentmixedcolumnsmethod\endcsname\relax
+ \begingroup
+ \page_mix_initialize_columns
+ \begincsname\??mixedcolumnsstart\currentmixedcolumnsmethod\endcsname % no \relax
+ \let\page_mix_fast_columns_stop\page_mix_columns_stop_yes}
+
+%D When we stop, we switch over to the balancing routine. After we're done we
+%D make sure to set the sizes are set, a somewhat redundant action when we
+%D already have flushed but better be safe.
+
+\let\page_mix_fast_columns_stop\relax
+
+\newtoks\t_page_mix_at_the_end
+
+\def\page_mix_finalize_columns
+ {\ifconditional\c_page_mix_process_notes \else
+ \global\t_page_mix_at_the_end{\stoppostponingnotes}%
+ \fi}
+
+\protected\def\page_mix_columns_stop_yes
+ {\begincsname\??mixedcolumnsstop\currentmixedcolumnsmethod\endcsname % no \relax
+ \page_mix_finalize_columns
+ \endgroup
+ \begincsname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax
+ \mixedcolumnsparameter\c!after\relax
+ \pop_macro_currentmixedcolumnsmethod
+ \pop_macro_currentmixedcolumns
+ \the\t_page_mix_at_the_end\global\t_page_mix_at_the_end\emptytoks}
+
+\protected\def\page_mix_columns_stop_nop
+ {\page_mix_finalize_columns
+ \endgroup
+ \pop_macro_currentmixedcolumnsmethod
+ \pop_macro_currentmixedcolumns
+ \the\t_page_mix_at_the_end\global\t_page_mix_at_the_end\emptytoks}
+
+% \protected\def\page_mix_columns_stop_yes
+% {\begincsname\??mixedcolumnsstop \currentmixedcolumnsmethod\endcsname % no \relax
+% \endgroup
+% \begincsname\??mixedcolumnsafter\currentmixedcolumnsmethod\endcsname\relax
+% \mixedcolumnsparameter\c!after\relax
+% \ifx\currentmixedcolumnsmethod\s!otr
+% \pop_macro_currentmixedcolumnsmethod
+% \pop_macro_currentmixedcolumns
+% \synchronizeoutput % brrr, otherwise sometimes issues in itemize
+% \else
+% \pop_macro_currentmixedcolumnsmethod
+% \pop_macro_currentmixedcolumns
+% \fi
+% }
+
+%D This is how the fast one is used:
+
+\protected\def\strc_itemgroups_start_columns
+ {\page_mix_fast_columns_start\s!itemgroupcolumns}
+
+\protected\def\strc_itemgroups_stop_columns
+ {\page_mix_fast_columns_stop} % set by start
+
+% not used nor documented so commented:
+%
+% \setupmixedcolumns
+% [\s!itemgroupcolumns]
+% [\c!grid=\itemgroupparameter\c!grid]
+%
+% \setupitemgroup
+% [\c!grid=\v!yes] % we need a value
+
+% better
+
+%D The common initialization:
+
+\def\page_mix_initialize_columns
+ {\page_mix_enable_grid_snapping
+ %
+ \d_page_mix_distance \mixedcolumnsparameter\c!distance
+ \c_page_mix_n_of_columns\mixedcolumnsparameter\c!n
+ \d_page_mix_max_height \mixedcolumnsparameter\c!maxheight
+ \d_page_mix_max_width \mixedcolumnsparameter\c!maxwidth
+ \d_page_mix_balance_step\mixedcolumnsparameter\c!step
+ %
+ \d_page_mix_max_width\dimexpr\d_page_mix_max_width-\leftskip-\rightskip\relax
+ \d_page_mix_leftskip \leftskip
+ \d_page_mix_rightskip\rightskip
+ \leftskip \zeropoint
+ \rightskip\zeropoint
+ %
+ \doifelse{\mixedcolumnsparameter\c!notes}\v!yes\settrue\setfalse\c_page_mix_process_notes
+ \ifconditional\c_page_mix_process_notes \else
+ \startpostponingnotes
+ \fi
+ %
+ \d_page_mix_threshold\zeropoint
+ %
+ \d_page_mix_column_width\dimexpr(\d_page_mix_max_width-\d_page_mix_distance*\numexpr(\c_page_mix_n_of_columns-\plusone)\relax)/\c_page_mix_n_of_columns\relax
+ %
+ \columnwidth \d_page_mix_column_width
+ \columndistance\d_page_mix_distance
+ \nofcolumns \c_page_mix_n_of_columns
+ \textwidth \d_page_mix_column_width % kind of redundant but we had it so ...
+ %
+ \usemixedcolumnscolorparameter\c!color
+ %
+ \insidecolumnstrue % new
+ %
+ \usealignparameter \mixedcolumnsparameter
+ \useblankparameter \mixedcolumnsparameter
+ \useprofileparameter\mixedcolumnsparameter % new
+ %
+ \nofcolumns\c_page_mix_n_of_columns} % public
+
+%D The otr method related hooks are defined next:
+
+% \setvalue{\??mixedcolumnsbefore\s!otr}%
+% {\par
+% \ifdim\pagetotal=\zeropoint \else
+% \verticalstrut % probably no longer needed
+% \vskip-\struttotal % probably no longer needed
+% \fi}
+
+\newcount\c_page_mix_otr_nesting
+
+% \setvalue{\??mixedcolumnsbefore\s!otr}%
+% {\par
+% \global\advance\c_page_mix_otr_nesting\plusone
+% \ifcase\c_page_mix_otr_nesting\or
+% \ifdim\pagetotal=\zeropoint \else
+% \obeydepth % we could handle this in pre material
+% \fi
+% \fi}
+
+\setvalue{\??mixedcolumnsbefore\s!otr}%
+ {\par
+ \global\advance\c_page_mix_otr_nesting\plusone
+ \ifcase\c_page_mix_otr_nesting\or
+ \ifdim\pagetotal=\zeropoint \else
+ % make sure that whitespace an dblanks are done
+ \strut
+ \vskip-\lineheight
+ % no, bad spacing: \obeydepth % we could handle this in pre material
+ \fi
+ \fi}
+
+\setvalue{\??mixedcolumnsstart\s!otr}%
+ {\ifcase\c_page_mix_otr_nesting\or
+ \scratchwidth\textwidth
+ \setupoutputroutine[\s!mixedcolumn]%
+ \c_page_mix_routine\c_page_mix_routine_intercept
+ \page_otr_trigger_output_routine
+ %
+ \holdinginserts\maxdimen
+ %
+ \ifvoid\b_page_mix_preceding \else
+ % moved here, before the packaging
+ \page_postprocessors_linenumbers_deepbox\b_page_mix_preceding
+ % we need to avoid unvboxing with successive balanced on one page
+ \global\setbox\b_page_mix_preceding\vpack{\box\b_page_mix_preceding}%
+ \wd\b_page_mix_preceding\scratchwidth % \makeupwidth
+ \page_grids_add_to_one\b_page_mix_preceding
+ \fi
+ \global\d_page_mix_preceding_height\ht\b_page_mix_preceding
+ \c_page_mix_routine\c_page_mix_routine_continue
+ %
+ \page_mix_command_set_vsize
+ \page_mix_command_set_hsize
+ \fi
+ \usealignparameter\mixedcolumnsparameter
+ \usesetupsparameter\mixedcolumnsparameter}
+
+% \setvalue{\??mixedcolumnsstop\s!otr}%
+% {\par
+% \ifcase\c_page_mix_otr_nesting\or
+% \c_page_mix_routine\c_page_mix_routine_balance
+% \page_otr_trigger_output_routine
+% \fi}
+
+\setvalue{\??mixedcolumnsstop\s!otr}%
+ {\par
+ \ifcase\c_page_mix_otr_nesting\or
+ \doifelse{\mixedcolumnsparameter\c!balance}\v!yes
+ {\c_page_mix_routine\c_page_mix_routine_balance}%
+ {\penalty-\plustenthousand}% weird hack, we need to trigger the otr sometimes (new per 20140306, see balancing-001.tex)
+ \page_otr_trigger_output_routine
+ \ifvoid\b_page_mix_preceding \else
+ % empty columns so we need to make sure pending content is flushed
+ \unvbox\b_page_mix_preceding % new per 2014.10.25
+ \fi
+ \fi}
+
+\setvalue{\??mixedcolumnsafter\s!otr}%
+ {\ifcase\c_page_mix_otr_nesting\or
+ \prevdepth\strutdp
+ \page_otr_command_set_vsize
+ \page_otr_command_set_hsize
+ \fi
+ \global\advance\c_page_mix_otr_nesting\minusone}
+
+%D The splitting and therefore balancing is done at the \LUA\ end. This gives
+%D more readable code and also makes it easier to deal with insertions like
+%D footnotes. Eventually we will have multiple strategies available.
+
+\protected\def\page_mix_routine_construct#1%
+ {\d_page_mix_max_height\mixedcolumnsparameter\c!maxheight % can have changed due to header=high
+ \ifconditional\c_page_mix_process_notes
+ \totalnoteheight\zeropoint
+ \else
+ \settotalinsertionheight
+ \fi
+ \clf_mixsetsplit
+ box \b_page_mix_collected
+ nofcolumns \c_page_mix_n_of_columns
+ maxheight \d_page_mix_max_height
+ noteheight \totalnoteheight
+ step \d_page_mix_balance_step
+ cycles \c_page_mix_balance_cycles
+ preheight \d_page_mix_preceding_height
+ prebox \b_page_mix_preceding
+ strutht \strutht
+ strutdp \strutdp
+ threshold \d_page_mix_threshold
+ splitmethod {\mixedcolumnsparameter\c!splitmethod}%
+ balance {#1}%
+ alternative {\mixedcolumnsparameter\c!alternative}%
+ internalgrid {\mixedcolumnsparameter\c!internalgrid}%
+ grid \ifgridsnapping tru\else fals\fi e %
+ notes \ifconditional\c_page_mix_process_notes tru\else fals\fi e %
+ \relax
+ \deadcycles\zerocount}
+
+\newdimen\mixedcolumnseparatorheight
+\newdimen\mixedcolumnseparatordepth
+\newdimen\mixedcolumnseparatorwidth
+
+\def\page_mix_routine_package_step
+ {% needs packaging anyway
+ \setbox\scratchbox\page_mix_command_package_column
+ \page_lines_add_numbers_to_box\scratchbox\recurselevel\c_page_mix_n_of_columns\plusone % new
+ \page_marks_synchronize_column\plusone\c_page_mix_n_of_columns\recurselevel\scratchbox
+ % backgrounds
+ \anch_mark_column_box\scratchbox\recurselevel
+ % for the moment a quick and dirty patch .. we need to go into the box (hence the \plusone) .. a slowdowner
+ % moved to start: \page_lines_add_numbers_to_box\scratchbox\recurselevel\c_page_mix_n_of_columns\plusone
+ % the framed needs a reset of strut, align, setups etc
+ \mixedcolumnseparatorheight\ht\scratchbox
+ \mixedcolumnseparatordepth \dp\scratchbox
+ \inheritedmixedcolumnsframedbox\currentmixedcolumns\scratchbox}
+
+\def\page_mix_routine_package_separate
+ {\ifcsname\??mixedcolumnsseparator\p_separator\endcsname
+ \page_mix_command_inject_separator
+ \else
+ \hss
+ \fi}
+
+\protected\def\page_mix_routine_package
+ {\clf_mixfinalize
+ \setbox\b_page_mix_collected\vbox \bgroup
+ \ifvoid\b_page_mix_preceding \else
+ % \page_postprocessors_linenumbers_deepbox\b_page_mix_preceding % already done
+ \vpack\bgroup
+ \box\b_page_mix_preceding
+ \egroup
+ \global\d_page_mix_preceding_height\zeropoint
+ \nointerlineskip
+ % no no:
+ % \prevdepth\strutdepth
+ \fi
+ \hskip\d_page_mix_leftskip
+ \page_mix_hbox to \d_page_mix_max_width \bgroup
+ \edef\p_separator{\mixedcolumnsparameter\c!separator}%
+ \mixedcolumnseparatorwidth\d_page_mix_distance % \mixedcolumnsparameter\c!rulethickness\relax
+ \edef\p_direction{\mixedcolumnsparameter\c!direction}%
+ \ifx\p_direction\v!reverse
+ \dostepwiserecurse\c_page_mix_n_of_columns\plusone\minusone
+ {\page_mix_routine_package_step
+ \ifnum\recurselevel>\plusone
+ \page_mix_routine_package_separate
+ \fi}%
+ \else
+ \dorecurse\c_page_mix_n_of_columns
+ {\page_mix_routine_package_step
+ \ifnum\recurselevel<\c_page_mix_n_of_columns
+ \page_mix_routine_package_separate
+ \fi}%
+ \fi
+ \egroup
+ \hskip\d_page_mix_rightskip
+ \egroup
+ \wd\b_page_mix_collected\dimexpr
+ \d_page_mix_max_width
+ +\d_page_mix_rightskip
+ +\d_page_mix_leftskip
+ \relax }
+
+\protected\def\page_mix_command_package_column
+ {\page_mix_hbox to \d_page_mix_column_width \bgroup
+ % maybe intercept empty
+ \clf_mixgetsplit\recurselevel\relax
+ \hskip-\d_page_mix_column_width
+ \vbox \bgroup
+ \hsize\d_page_mix_column_width
+ \ifconditional\c_page_mix_process_notes
+ \placenoteinserts
+ \fi
+ \egroup
+ \hss
+ \egroup}
+
+% \protected\def\page_mix_command_package_column
+% {\page_mix_hbox to \d_page_mix_column_width \bgroup
+% % maybe intercept empty
+% \ruledhpack\bgroup
+% \clf_mixgetsplit\recurselevel\relax
+% \egroup
+% \hskip-\d_page_mix_column_width
+% \ruledhpack \bgroup
+% \hsize\d_page_mix_column_width
+% \ifconditional\c_page_mix_process_notes
+% \placenoteinserts
+% \fi
+% \egroup
+% \hss
+% \egroup}
+
+\protected\def\page_mix_routine_continue
+ {\bgroup
+ \forgetall
+ \dontcomplain
+ \setbox\b_page_mix_collected\vpack{\unvbox\normalpagebox}% brrr we need to make a tight box (combine this in lua)
+ \page_mix_routine_construct\v!no
+ \page_mix_routine_package
+ \page_mix_construct_and_shipout\box\b_page_mix_collected\zerocount % three arguments
+ \clf_mixflushrest
+ \clf_mixcleanup
+ \egroup}
+
+\protected\def\page_mix_routine_balance
+ {\bgroup
+ \forgetall
+ \dontcomplain
+ \setbox\b_page_mix_collected\vpack{\unvbox\normalpagebox}% brrr we need to make a tight box (combine this in lua)
+ \doloop
+ {%writestatus\m!columns{construct continue (\the\htdp\b_page_mix_collected)}%
+ \page_mix_routine_construct\v!no
+ \ifcase\clf_mixstate\relax
+ % 0 = okay, we can balance
+ \setbox\b_page_mix_collected\vpack{\clf_mixflushlist}% we could avoid this
+ %writestatus\m!columns{construct balance}%
+ \page_mix_routine_construct\v!yes
+ \page_mix_routine_package
+ \c_page_mix_routine\c_page_mix_routine_regular
+ % \setupoutputroutine[\s!singlecolumn]%
+ \page_otr_command_set_vsize
+ \page_otr_command_set_hsize
+ \par
+ %writestatus\m!columns{flush balance}%
+ \page_grids_add_to_mix\b_page_mix_collected % no linenumbers here
+ \box\b_page_mix_collected
+ \vskip\zeropoint % triggers recalculation of page stuff (weird that this is needed but it *is* needed, see mixed-001.tex)
+ \par
+ \nointerlineskip
+ \prevdepth\strutdp
+ \clf_mixflushrest% rubish
+ \clf_mixcleanup % rubish
+ \exitloop
+ \or
+ % 1 = we have stuff left, so flush and rebalance
+ %writestatus\m!columns{flush continue}%
+ \page_mix_routine_package
+ \page_mix_construct_and_shipout\box\b_page_mix_collected\zerocount % three arguments
+ \setbox\b_page_mix_collected\vpack{\clf_mixflushrest}% we could avoid this
+ \clf_mixcleanup
+ \ifdim\ht\b_page_mix_collected=\zeropoint
+ \exitloop
+ \fi
+ \fi}%
+ \egroup}
+
+%D We also implement a variant compatible with the so called simple columns
+%D mechanism:
+%D
+%D \starttyping
+%D \startboxedcolumns
+%D \input zapf
+%D \stopboxedcolumns
+%D \stoptyping
+%D
+%D This is a rather mininimalistic variant.
+
+% Maybe we also need a variant with obeydepth before and prevdepth after so
+% that we get a nice spacing.
+
+\definemixedcolumns
+ [boxedcolumns]
+ [\c!balance=\v!yes,
+ \c!n=2,
+ \c!method=\s!box,
+ \c!strut=\v!yes,
+ \c!maxwidth=\availablehsize]
+
+%D Boxed columns can be used nested:
+%D
+%D \starttyping
+%D \setupmixedcolumns
+%D [boxedcolumns]
+%D [n=2,
+%D background=color,
+%D backgroundcolor=darkred,
+%D color=white,
+%D backgroundoffset=1mm]
+%D
+%D \definemixedcolumns
+%D [nestedboxedcolumns]
+%D [boxedcolumns]
+%D [n=2,
+%D background=color,
+%D backgroundcolor=white,
+%D color=darkred,
+%D strut=yes,
+%D backgroundoffset=0mm]
+%D
+%D \startboxedcolumns
+%D \input zapf \par \input ward \par \obeydepth
+%D \startnestedboxedcolumns
+%D \input zapf
+%D \stopnestedboxedcolumns
+%D \par \input zapf \par \obeydepth
+%D \startnestedboxedcolumns
+%D \input zapf
+%D \stopnestedboxedcolumns
+%D \par \input zapf
+%D \stopboxedcolumns
+%D \stoptyping
+
+%D Next we define the hooks:
+
+\letvalue{\??mixedcolumnsbefore\s!box}\donothing
+\letvalue{\??mixedcolumnsafter \s!box}\donothing
+
+\setvalue{\??mixedcolumnsstart\s!box}%
+ {\edef\p_page_mix_strut{\mixedcolumnsparameter\c!strut}%
+ \setbox\b_page_mix_collected\vbox \bgroup
+ \let\currentoutputroutine\s!mixedcolumn % makes \column work
+ \forgetall
+ \usegridparameter\mixedcolumnsparameter
+ % \useprofileparameter\mixedcolumnsparameter
+ \page_mix_command_set_hsize
+ \ifx\p_page_mix_strut\v!yes
+ \begstrut
+ \ignorespaces
+ \fi}
+
+\setvalue{\??mixedcolumnsstop\s!box}%
+ {\ifx\p_page_mix_strut\v!yes
+ \removeunwantedspaces
+ \endstrut
+ \fi
+ \egroup
+ \edef\p_profile{\mixedcolumnsparameter\c!profile}%
+ \ifempty\p_profile \else
+ % this can never be ok because we cheat with depth and height
+ % and glue in between and when we're too large we run into issues
+ % so mayb best limit correction to one line
+ \profilegivenbox\p_profile\b_page_mix_collected
+ \setbox\b_page_mix_collected\vpack{\unvbox\b_page_mix_collected}%
+ % tracing
+ % \addprofiletobox\b_page_mix_collected
+ \fi
+ \page_mix_box_balance}
+
+%D The related balancer is only a few lines:
+
+\protected\def\page_mix_box_balance
+ {\bgroup
+ \dontcomplain
+ \page_mix_routine_construct\v!yes
+ \page_mix_routine_package
+ \dontleavehmode\box\b_page_mix_collected
+ \clf_mixflushrest
+ \clf_mixcleanup
+ \egroup}
+
+%D As usual, floats complicates matters and this is where experimental code
+%D starts.
+
+\let\page_mix_command_package_contents\page_one_command_package_contents
+\let\page_mix_command_flush_float_box \page_one_command_flush_float_box
+
+\protected\def\page_mix_command_check_if_float_fits
+ {\ifpostponecolumnfloats
+ \global\setfalse\c_page_floats_room
+ \orelse\ifconditional\c_page_floats_not_permitted
+ \global\setfalse\c_page_floats_room
+ \else
+% \bgroup
+% \getcolumnstatus{\count255}{\dimen0}{\dimen2}%
+% \page_floats_get_info\s!text
+% \setbox\scratchbox\vbox % tricky met objecten ?
+% {\blank[\rootfloatparameter\c!spacebefore]
+% \snaptogrid\vbox{\vskip\floatheight}}% copy?
+% \advance\dimen0\dimexpr\ht\scratchbox+2\openlineheight+.5\lineheight\relax\relax % needed because goal a bit higher
+% \ifdim\dimen0>\dimen2
+% \global\setfalse\c_page_floats_room
+% \else
+ \global\settrue\c_page_floats_room
+ \fi
+ \ifdim\floatwidth>\hsize
+ \showmessage\m!columns{11}\empty
+ \global\setfalse\c_page_floats_room
+ \fi}
+
+\protected\def\page_mix_command_flush_floats
+ {\page_one_command_flush_floats}
+
+\protected\def\page_mix_command_flush_saved_floats
+ {\page_one_command_flush_saved_floats}
+
+% \protected\def\page_mix_command_flush_top_insertions
+% {\page_one_command_flush_top_insertions}
+
+\protected\def\page_mix_place_float_top
+ {\showmessage\m!columns4\empty\page_one_place_float_here}
+
+\protected\def\page_mix_place_float_bottom
+ {\showmessage\m!columns5\empty\page_one_place_float_here}
+
+\protected\def\page_mix_place_float_here
+ {\page_one_place_float_here}
+
+\protected\def\page_mix_place_float_force
+ {\page_one_place_float_force}
+
+\protected\def\page_mix_command_side_float_output
+ {\page_mix_construct_and_shipout\unvbox\normalpagebox\zerocount} % three arguments
+
+\protected\def\page_mix_command_synchronize_side_floats
+ {\page_sides_forget_floats}
+
+\protected\def\page_mix_command_flush_side_floats
+ {\page_sides_forget_floats}
+
+\protected\def\page_mix_command_next_page
+ {\page_otr_eject_page}
+
+\protected\def\page_mix_command_next_page_and_inserts
+ {\page_otr_eject_page_and_flush_inserts}
+
+%D Moved here and dedicated:
+
+\tolerant\protected\def\page_mix_command_test_column[#1]#*[#2]% works on last column
+ {\par
+ \begingroup
+ \scratchdimen\dimexpr#1\lineheight\ifparameter#2\or+#2\fi\relax
+ \ifdim\scratchdimen>\zeropoint
+ \c_attr_checkedbreak\number\scratchdimen % why \number
+ \penalty\c_page_mix_break_forced\relax
+ \fi
+ \endgroup}
+
+%D We need to hook some handlers into the output routine and we define
+%D a dedicated one:
+
+\let\page_mix_command_flush_all_floats\page_one_command_flush_all_floats
+
+\defineoutputroutine
+ [\s!mixedcolumn]
+ [\s!page_otr_command_routine =\page_mix_command_routine,
+ \s!page_otr_command_package_contents =\page_mix_command_package_contents,
+ \s!page_otr_command_set_vsize =\page_mix_command_set_vsize,
+ \s!page_otr_command_set_hsize =\page_mix_command_set_hsize,
+ % \s!page_otr_command_synchronize_hsize =\page_mix_command_synchronize_hsize,
+ \s!page_otr_command_next_page =\page_mix_command_next_page,
+ \s!page_otr_command_next_page_and_inserts =\page_mix_command_next_page_and_inserts,
+ % \s!page_otr_command_set_top_insertions =\page_mix_command_set_top_insertions,
+ % \s!page_otr_command_set_bottom_insertions =\page_mix_command_set_bottom_insertions,
+ % \s!page_otr_command_flush_top_insertions =\page_mix_command_flush_top_insertions,
+ % \s!page_otr_command_flush_bottom_insertions=\page_mix_command_flush_bottom_insertions,
+ \s!page_otr_command_check_if_float_fits =\page_mix_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_mix_command_set_float_hsize,
+ \s!page_otr_command_flush_float_box =\page_mix_command_flush_float_box,
+ \s!page_otr_command_side_float_output =\page_mix_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats=\page_mix_command_synchronize_side_floats,
+ \s!page_otr_command_flush_floats =\page_mix_command_flush_floats,
+ \s!page_otr_command_flush_side_floats =\page_mix_command_flush_side_floats,
+ \s!page_otr_command_flush_saved_floats =\page_mix_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_mix_command_flush_all_floats,
+ % \s!page_otr_command_flush_margin_blocks =\page_mix_command_flush_margin_blocks, % not used
+ \s!page_otr_command_test_column =\page_mix_command_test_column
+ ]
+
+%D Only a few float placement options are supported:
+
+\installfloatmethod \s!mixedcolumn \v!here \page_mix_place_float_here
+\installfloatmethod \s!mixedcolumn \v!force \page_mix_place_float_force
+\installfloatmethod \s!mixedcolumn \v!top \page_mix_place_float_top
+\installfloatmethod \s!mixedcolumn \v!bottom \page_mix_place_float_bottom
+
+\installfloatmethod \s!mixedcolumn \v!local \somelocalfloat
+
+%D It ends here.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-mrk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-mrk.mkxl
new file mode 100644
index 00000000000..143fab180e1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-mrk.mkxl
@@ -0,0 +1,229 @@
+%D \module
+%D [ file=page-mrk,
+%D version=2011.05.23, % moved from page-lay
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Cutmarks and Colorbars,
+%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 Page Macros / Cutmarks and Colorbars}
+
+\unprotect
+
+%D This module implements curmarks and depends on \METAPOST.
+%D
+%D \starttyping
+%D \setuplayout[marking=on,location=middle]
+%D \setuplayout[marking=page,location=middle]
+%D \setuplayout[marking=empty,location=middle]
+%D \setuplayout[marking={color,page},location=middle]
+%D \setuplayout[marking={one,page},location=middle]
+%D \setuplayout[marking={two,page},location=middle]
+%D \setuplayout[marking={four,page},location=middle]
+%D \stoptyping
+
+\mutable\def\pagecutmarklength {5mm}
+\mutable\def\pagecutmarkoffset {3mm} % slightly larger than before, and now a fixed size
+\mutable\def\pagecutmarkmargin{10cm}
+
+% maybe all these should be global
+
+\newconditional\c_page_marks_add_more_color
+\newconditional\c_page_marks_add_more_marking
+\newconditional\c_page_marks_add_more_lines
+\newconditional\c_page_marks_add_page_lines
+\newconditional\c_page_marks_add_more_number
+
+\newcount\c_page_marks_max
+\newcount\c_page_marks_nx
+\newcount\c_page_marks_ny
+
+\startuniqueMPgraphic{print:color}{w,h,l,o}
+ loadmodule "crop" ;
+ page_marks_add_color(\MPvar w,\MPvar h,\MPvar l,\MPvar o) ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{print:marking}{w,h,l,o}
+ loadmodule "crop" ;
+ page_marks_add_marking(\MPvar w,\MPvar h,\MPvar l,\MPvar o) ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{print:lines}{w,h,l,o,x,y}
+ loadmodule "crop" ;
+ page_marks_add_lines(\MPvar w,\MPvar h,\MPvar l,\MPvar o,\MPvar x,\MPvar y,
+ \ifconditional\c_page_marks_add_page_lines tru\else fals\fi e) ;
+\stopuniqueMPgraphic
+
+\startuseMPgraphic{print:number}{w,h,l,o,n}
+ loadmodule "crop" ;
+ page_marks_add_number(\MPvar w,\MPvar h,\MPvar l,\MPvar o,\MPvar n) ;
+\stopuseMPgraphic
+
+\def\page_marks_add_color
+ {\setlayoutcomponentattribute{\v!print:\v!color}%
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
+ \uniqueMPgraphic
+ {print:color}%
+ {w=\the\scratchwidth,h=\the\scratchheight,%
+ l=\pagecutmarklength,o=\pagecutmarkoffset}%
+ \egroup
+ \wd\scratchbox\scratchwidth\ht\scratchbox\scratchheight\dp\scratchbox\scratchdepth
+ \hskip-\scratchwidth\box\scratchbox}
+
+\def\page_marks_add_marking
+ {\setlayoutcomponentattribute{\v!print:\v!marking}%
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
+ \uniqueMPgraphic
+ {print:marking}%
+ {w=\the\scratchwidth,h=\the\scratchheight,%
+ l=\pagecutmarklength,o=\pagecutmarkoffset}%
+ \egroup
+ \wd\scratchbox\scratchwidth\ht\scratchbox\scratchheight\dp\scratchbox\scratchdepth
+ \hskip-\scratchwidth\box\scratchbox}
+
+\def\page_marks_add_lines
+ {\setlayoutcomponentattribute{\v!print:\v!lines}%
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
+ \uniqueMPgraphic
+ {print:lines}%
+ {w=\the\scratchwidth,h=\the\scratchheight,%
+ l=\pagecutmarklength,o=\pagecutmarkoffset,%
+ x=\the\c_page_marks_nx,y=\the\c_page_marks_ny}%
+ \egroup
+ \wd\scratchbox\scratchwidth\ht\scratchbox\scratchheight\dp\scratchbox\scratchdepth
+ \hskip-\scratchwidth\box\scratchbox}
+
+\def\page_marks_add_number
+ {\setlayoutcomponentattribute{\v!print:\v!number}%
+ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup
+ \useMPgraphic
+ {print:number}%
+ {w=\the\scratchwidth ,h=\the\scratchheight,%
+ l=\pagecutmarklength,o=\pagecutmarkoffset,%
+ n=\number\ifcase\arrangeno\realpageno\else\arrangeno\fi}%
+ \egroup
+ \wd\scratchbox\scratchwidth\ht\scratchbox\scratchheight\dp\scratchbox\scratchdepth
+ \hskip-\scratchwidth\box\scratchbox}
+
+\def\page_marks_add_page_indeed#1%
+ {\setbox#1\hpack\bgroup
+ \resetvisualizers
+ \let\objectoffset\pagecutmarkmargin
+ %\infofont
+ \scratchwidth \wd#1%
+ \scratchheight\ht#1%
+ \scratchdepth \dp#1%
+ \box#1\relax
+ \page_marks_add_lines
+ \egroup}
+
+\def\page_marks_add_more_indeed#1%
+ {\setbox#1\hbox\bgroup
+ \resetvisualizers
+ \let\objectoffset\pagecutmarkmargin
+ \infofont
+ \scratchwidth \wd#1% these can move out
+ \scratchheight\ht#1%
+ \scratchdepth \dp#1%
+ \box#1\relax
+ \ifconditional\c_page_marks_add_more_color
+ \page_marks_add_color
+ \fi
+ \ifconditional\c_page_marks_add_more_marking
+ \page_marks_add_marking
+ \fi
+ \ifconditional\c_page_marks_add_more_lines
+ \page_marks_add_lines
+ \fi
+ \ifconditional\c_page_marks_add_more_number
+ \page_marks_add_number
+ \fi
+ \global\advance\c_page_marks_max\minusone
+ \ifnum\c_page_marks_max>\zerocount\else
+ \glet\page_marks_add_more\gobbleoneargument
+ \glet\page_marks_add_page\gobbleoneargument
+ \fi
+ \egroup}
+
+\let\page_marks_add_page\gobbleoneargument
+\let\page_marks_add_more\gobbleoneargument
+
+\installcorenamespace{layoutmarking}
+
+\permanent\protected\def\installpagecutmark#1#2%
+ {\defcsname\??layoutmarking#1\endcsname{#2}}
+
+\installpagecutmark\v!on
+ {%settrue\c_page_marks_add_page_lines
+ \settrue\c_page_marks_add_more_lines
+ \settrue\c_page_marks_add_more_number}
+
+\installpagecutmark\v!page
+ {\settrue\c_page_marks_add_page_lines
+ \settrue\c_page_marks_add_more_lines
+ \settrue\c_page_marks_add_more_number}
+
+\installpagecutmark\v!empty
+ {%settrue\c_page_marks_add_page_lines
+ \settrue\c_page_marks_add_more_lines}
+
+\installpagecutmark\v!color
+ {%settrue\c_page_marks_add_page_lines
+ \settrue\c_page_marks_add_more_lines
+ \settrue\c_page_marks_add_more_color
+ \settrue\c_page_marks_add_more_marking
+ \settrue\c_page_marks_add_more_number}
+
+\installpagecutmark\v!one {\global\c_page_marks_max\plusone} % first page
+\installpagecutmark\v!two {\global\c_page_marks_max\plustwo} % first two pages
+\installpagecutmark\v!four{\global\c_page_marks_max\plusfour} % first four pages
+
+\permanent\protected\def\page_marks_set#1%
+ {\begincsname\??layoutmarking#1\endcsname}
+
+\appendtoks
+ \setfalse\c_page_marks_add_page_lines
+ \setfalse\c_page_marks_add_more_color
+ \setfalse\c_page_marks_add_more_marking
+ \setfalse\c_page_marks_add_more_lines
+ \setfalse\c_page_marks_add_more_number
+ \global\c_page_marks_max\maxcount
+ \rawprocesscommacommand[\layoutparameter\c!marking]\page_marks_set
+ \ifnum\c_page_marks_max<\maxcount
+ \ifconditional\c_page_marks_add_page_lines \orelse
+ \ifconditional\c_page_marks_add_more_color \orelse
+ \ifconditional\c_page_marks_add_more_marking\orelse
+ \ifconditional\c_page_marks_add_more_lines \orelse
+ \ifconditional\c_page_marks_add_more_number \else
+ \settrue\c_page_marks_add_page_lines
+ \settrue\c_page_marks_add_more_number
+ \fi
+ \fi
+ \ifconditional\c_page_marks_add_page_lines
+ \let\page_marks_add_page\page_marks_add_page_indeed
+ \else
+ \let\page_marks_add_page\gobbleoneargument
+ \fi
+ % we can get a double set of (overlayed) lines .. needs to be redone (too many objects anyway)
+ \ifconditional\c_page_marks_add_more_lines
+ \let\page_marks_add_more\page_marks_add_more_indeed
+ \orelse\ifconditional\c_page_marks_add_more_color
+ \let\page_marks_add_more\page_marks_add_more_indeed
+ \orelse\ifconditional\c_page_marks_add_more_marking
+ \let\page_marks_add_more\page_marks_add_more_indeed
+ \orelse\ifconditional\c_page_marks_add_more_number
+ \let\page_marks_add_more\page_marks_add_more_indeed
+ \else
+ \let\page_marks_add_more\gobbleoneargument
+ \fi
+\to \everysetuplayout
+
+\setuplayout
+ [\c!marking=\v!off]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-not.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-not.mkxl
new file mode 100644
index 00000000000..82523cc66a3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-not.mkxl
@@ -0,0 +1,32 @@
+%D \module
+%D [ file=page-nnt,
+%D version=2002.04.16,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Footnotes,
+%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 Page Macros / Footnotes}
+
+%D We've moved some footnote handling to a separate page module. The macros below
+%D are used in the single and multi column page handlers and permit mixed usage of
+%D column and page notes.
+
+\unprotect
+
+\newdimen\totalinsertionheight
+
+\permanent\protected\def\settotalinsertionheight
+ {\calculatetotalnoteheight
+ \totalinsertionheight\dimexpr
+ \totalnoteheight
+ +\page_insert_insertion_height\s!topfloat
+ +\page_insert_insertion_height\s!bottomfloat
+ \relax}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-one.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-one.mkxl
new file mode 100644
index 00000000000..9d0fb2065a2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-one.mkxl
@@ -0,0 +1,709 @@
+%D \module
+%D [ file=page-one,
+%D version=2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Default Routine,
+%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 Page Macros / Default Routine}
+
+%D This is just the good old \CONTEXT\ output routine, which
+%D has been there right from the start.
+
+\unprotect
+
+% OTRONE: basic single column
+
+\newconstant \c_page_one_float_method
+
+\protected\def\page_one_command_next_page
+ {\page_otr_eject_page}
+
+\protected\def\page_one_command_next_page_and_inserts
+ {\page_otr_eject_page_and_flush_inserts}
+
+\protected\def\page_one_command_set_hsize
+ {\global\hsize\textwidth
+ \columnwidth\textwidth} % bonus so that it's not zero
+
+\protected\def\page_one_command_set_float_hsize
+ {\global\hsize\textwidth}
+
+\protected\def\page_one_command_set_vsize
+ {\ifgridsnapping
+ \ifcase\layoutlines
+ \getrawnoflines\textheight
+ \else
+ \noflines\layoutlines
+ \fi
+ \global\vsize\noflines\openlineheight
+ \else
+ \global\vsize\textheight
+ \fi
+ \global\advance\vsize\d_page_adapts_delta
+ % alternatively we could set it in builders.buildpage_filter
+ % \ifdim\pagegoal<\maxdimen .. \fi
+ \pagegoal\dimexpr
+ \vsize
+ -\d_page_floats_inserted_top
+ -\d_page_floats_inserted_bottom
+ -\insertheights
+ \relax}
+
+% 1 = partial page, 2 = whole page, 3 = partial page
+
+% We really need a setting! Todo, what key to use?
+
+\pushoverloadmode
+ \setnewconstant\kindofpagetextareas\plustwo % \plusone can become default some day
+ \overloaded\mutable\let\kindofpagetextareas\kindofpagetextareas % fo rnow mutable, can become a key/value
+\popoverloadmode
+
+\def\page_one_registered_text_area_a % two arguments: (un)vbox n
+ {\ifconditional\c_page_areas_enabled
+ \expandafter\page_one_registered_text_area_a_indeed
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\def\page_one_registered_text_area_b % one arguments: content
+ {\ifconditional\c_page_areas_enabled
+ \expandafter\page_one_registered_text_area_b_indeed
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\def\page_one_registered_text_area_a_indeed % two arguments: (un)vbox n
+ {\ifcase\kindofpagetextareas
+ \expandafter\firstofoneargument
+ \or % partial page (experimental)
+ \expandafter\page_areas_register_direct
+ \or % whole page (default)
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\def\page_one_registered_text_area_b_indeed % one arguments: content
+ {\ifcase\kindofpagetextareas
+ % \expandafter\firstofoneargument
+ \or % partial page (experimental)
+ % \expandafter\firstofoneargument
+ \or % whole page (default)
+ \expandafter\page_areas_register_boxed
+ \else
+ % \expandafter\firstofoneargument
+ \fi}
+
+\newdimen\d_page_one_natural_depth
+\newbox \b_page_one_bottom_notes
+\newbox \b_page_one_contents
+
+\let\page_one_command_package_show_state\relax
+
+% \fakepagenotes ... needs checking
+%
+% we can also have bottom notes on top of bottom insertions
+
+\protected\def\page_one_command_package_contents#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
+ {\bgroup
+ \strc_notes_check_if_bottom_present
+ \d_page_one_natural_depth\dp#2\relax
+ % we need to set the height as otherwise the shrink will not kick in so the following
+ % no longer applies:
+ %
+ % \setbox\b_page_one_contents\vbox \ifconditional\c_notes_bottom_present to \textheight \fi
+ %
+ \setbox\b_page_one_contents\vbox to \textheight % probably no pack
+ {\page_otr_command_flush_top_insertions
+ % this is messy ... we will provide a more tight area (no big deal as we can
+ % do that at the lua end)
+% \parfillskip\zeropoint
+ \page_one_registered_text_area_a#1#2% \unvbox <box>
+ %
+ \ifgridsnapping
+ \unskip % new per 2019-06-18, otherwise weird bottom floats
+ \vkern\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
+ \prevdepth\openstrutdepth
+ \page_otr_command_flush_bottom_insertions
+ \vfil
+ \orelse\ifcase\bottomraggednessmode
+ % ragged (default)
+ \unskip % new per 2019-06-18, otherwise weird bottom floats
+ \vkern\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
+ \prevdepth\openstrutdepth
+ % these have whitespace before but we can have some more options
+ % like a \vfill or so
+ \page_otr_command_flush_bottom_insertions
+ \vfil
+ \or
+ % align (normal)
+ \page_otr_command_flush_bottom_insertions
+ \or
+ % baseline
+ \unskip % new per 2019-06-18, otherwise weird bottom floats
+ \vkern\dimexpr\maxdepth-\d_page_one_natural_depth\relax
+ \page_otr_command_flush_bottom_insertions
+ \fi
+ \fakepagenotes}%
+ \page_one_command_package_show_state
+ \ifconditional\c_notes_bottom_present
+ \ifgridsnapping
+ \ifcase\layoutlines
+ \getrawnoflines\textheight
+ \else
+ \noflines\layoutlines
+ \fi
+ \scratchoffset\dimexpr\numexpr\noflines-\plusone\relax\lineheight+\topskip\relax
+ \else
+ \scratchoffset\ht\b_page_one_contents
+ \fi
+ \setbox\b_page_one_bottom_notes\hpack
+ {\lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}% kerns makes notes sit on bottom % pack ?
+ \smashbox\b_page_one_bottom_notes
+ \ht\b_page_one_contents\zeropoint
+ \page_one_registered_text_area_b
+ {\vpack to \textheight
+ {\box\b_page_one_contents
+ \box\b_page_one_bottom_notes}}%
+ \else
+ \ht\b_page_one_contents\textheight
+ \page_one_registered_text_area_b
+ {\box\b_page_one_contents}%
+ \fi
+ \egroup}
+
+\protected\def\page_one_command_side_float_output
+ {\page_otr_construct_and_shipout\unvbox\normalpagebox\plusone} % three arguments, we need to be in the output group
+
+\protected\def\page_one_command_routine
+ {\page_sides_output_routine}
+
+%D Insertions
+
+\newconditional\c_page_one_top_of_insert
+\newconditional\c_page_one_correct_top_insert \settrue\c_page_one_correct_top_insert % false moves up (tight)
+\newskip \s_page_one_between_top_insert
+
+\def\page_one_prepare_top_float
+ {\ifdim\d_page_floats_inserted_top=\zeropoint
+ \settrue\c_page_one_top_of_insert
+ \else
+ \setfalse\c_page_one_top_of_insert
+ \fi
+ \s_page_one_between_top_insert\ifdim\d_strc_floats_top>\d_strc_floats_bottom\d_strc_floats_top\else\d_strc_floats_bottom\fi\relax
+ \global\advance\d_page_floats_inserted_top\dimexpr\ht\floatbox+\dp\floatbox+\s_page_one_between_top_insert\relax}
+
+\def\page_one_insert_top_float % maybe remember last beforeskip
+ {\floatingpenalty\zerocount
+ \insert\namedinsertionnumber\s!topfloat\bgroup
+ \forgetall
+ \ifconditional\c_page_one_top_of_insert
+ \ifconditional\c_page_one_correct_top_insert
+ \topskipcorrection % [xx] new: see icare topbleed
+ \kern-\lineskip
+ \par
+ \prevdepth\maxdimen
+ \fi
+ \fi
+ \page_otr_command_flush_float_box
+ \vskip\s_page_one_between_top_insert
+ \egroup}
+
+\mutable\let\totaltopinserted\!!zeropoint
+\mutable\let\totalbotinserted\!!zeropoint
+
+\protected\def\page_one_command_set_top_insertions
+ {\bgroup
+ \ifconditional\c_page_floats_some_waiting
+ \noffloatinserts\zerocount
+ \let\totaltopinserted\!!zeropoint
+ \page_one_command_set_top_insertions_indeed
+ \ifnum\rootfloatparameter\c!nbottom=\zerocount
+ \ifnum\rootfloatparameter\c!nlines>\zerocount
+ \ifdim\totaltopinserted>\zeropoint\relax
+ \ifdim\dimexpr\rootfloatparameter\c!nlines\lineheight+\totaltopinserted\relax>\textheight
+ \showmessage\m!floatblocks8{\rootfloatparameter\c!nlines}%
+ \page_otr_fill_and_eject_page % was tripple: vfilll
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \egroup}
+
+\def\page_one_command_set_top_insertions_indeed
+ {\ifnum\noffloatinserts<\c_page_floats_n_of_top
+ \page_floats_get
+ \page_one_prepare_top_float
+ \ifdim\d_page_floats_inserted_top<\textheight\relax
+ \xdef\totaltopinserted{\the\d_page_floats_inserted_top}%
+ \page_one_insert_top_float
+ \ifconditional\c_page_floats_some_waiting
+ \advance\noffloatinserts \plusone
+ \else
+ \noffloatinserts\c_page_floats_n_of_top\relax
+ \fi
+ \page_floats_report_flushed
+ \else
+ \page_floats_resave\s!text
+ \noffloatinserts\c_page_floats_n_of_top\relax
+ \fi
+ \else
+ \ifconditional\c_page_floats_some_waiting
+ \showmessage\m!floatblocks6{\the\c_page_floats_n_of_top}%
+ \fi
+ \let\page_one_command_set_top_insertions_indeed\relax
+ \fi
+ \page_one_command_set_top_insertions_indeed}
+
+\protected\def\page_one_command_set_bottom_insertions
+ {\bgroup
+ \ifconditional\c_page_floats_some_waiting
+ \noffloatinserts\zerocount
+ \page_one_command_set_bottom_insertions_indeed
+ \fi
+ \egroup}
+
+\def\page_one_command_set_bottom_insertions_indeed
+ {\ifnum\noffloatinserts<\c_page_floats_n_of_bottom\relax
+ \page_floats_get
+ \global\advance\d_page_floats_inserted_bottom\dimexpr\ht\floatbox+\dp\floatbox+\d_strc_floats_top\relax
+ \ifdim\d_page_floats_inserted_bottom<\pagegoal\relax
+ \floatingpenalty\zerocount
+ \insert\namedinsertionnumber\s!bottomfloat\bgroup
+ \forgetall
+ \blank[\rootfloatparameter\c!spacebefore]%
+ \page_otr_command_flush_float_box
+ \egroup
+ \ifconditional\c_page_floats_some_waiting
+ \advance\noffloatinserts \plusone
+ \else
+ \noffloatinserts\c_page_floats_n_of_bottom
+ \fi
+ \page_floats_report_flushed
+ \else
+ \page_floats_resave\s!text
+ \noffloatinserts\c_page_floats_n_of_bottom\relax
+ \fi
+ \global\settrue\c_page_floats_not_permitted % vgl topfloats s!
+ \else
+ \ifconditional\c_page_floats_some_waiting
+ \showmessage\m!floatblocks7{\the\c_page_floats_n_of_bottom}%
+ \fi
+ \let\page_one_command_set_bottom_insertions_indeed\relax
+ \fi
+ \page_one_command_set_bottom_insertions_indeed}
+
+\protected\def\page_one_command_flush_top_insertions
+ {\ifvoid\namedinsertionnumber\s!topfloat\else
+ \page_one_command_flush_top_insertions_indeed % less tracing
+ \fi
+ \global\d_page_floats_inserted_top\zeropoint}
+
+\def\page_one_command_flush_top_insertions_indeed
+ {\ifgridsnapping
+ \box\namedinsertionnumber\s!topfloat
+ \vkern-\topskip
+ \vkern\strutheight % [xx] new: see icare topbleed
+ \else
+ \ifcase\c_page_floats_insertions_topskip_mode
+ % 0: default, do nothing
+ \or
+ % 1: no topskip (crossed fingers)
+ \vskip-\topskip % skip !
+ \vkern\strutheight
+ \fi
+ \unvbox\namedinsertionnumber\s!topfloat
+ \fi}
+
+\protected\def\page_one_command_flush_bottom_insertions
+ {\ifvoid\namedinsertionnumber\s!bottomfloat\else
+ \page_one_command_flush_bottom_insertions_indeed
+ \fi
+ \global\d_page_floats_inserted_bottom\zeropoint
+ \global\setfalse\c_page_floats_not_permitted}
+
+\def\page_one_command_flush_bottom_insertions_indeed
+ {\ifgridsnapping
+ % \floatparameter\c!bottombefore
+ \snaptogrid\hbox{\box\namedinsertionnumber\s!bottomfloat}%
+ % \floatparameter\c!bottomafter
+ \else
+ \floatparameter\c!bottombefore
+ \unvbox\namedinsertionnumber\s!bottomfloat
+ \floatparameter\c!bottomafter
+ \fi}
+
+\protected\def\page_one_command_flush_floats
+ {\global\settrue\c_page_floats_flushing
+ \ifconditional\c_page_floats_some_waiting
+ \par
+ % if kept, then option and definitely off in gridmode ! ! ! !
+ % \ifvmode \prevdepth\maxdimen \fi % prevents whitespace; problematic in icare tests
+ \page_one_command_flush_floats_indeed
+ \fi
+ \global\savednoffloats\zerocount
+ \global\setfalse\c_page_floats_some_waiting
+ \global\setfalse\c_page_floats_flushing}
+
+\protected\def\page_one_command_flush_float_box
+ {\ifconditional\c_page_floats_center_box \ifdim\wd\floatbox<\hsize
+ \global\setbox\floatbox\hpack to \hsize{\hss\box\floatbox\hss}%
+ \fi \fi
+ \snaptogrid\hpack{\box\floatbox}} % was copy
+
+\def\page_one_command_floats_get_compressed
+ {\setfalse\c_page_floats_center_box % not needed as we do call directly
+ %% no longer (interferes with footnotes):
+ %%
+ %% \page_one_command_set_vsize % test 2011.06.24.001
+ %%
+ \global\setbox\floatbox\hbox to \hsize
+ {\hfil
+ \dorecurse\nofcollectedfloats
+ {\ifcase\columndirection % nog document wide
+ \page_floats_flush\s!text\plusone
+ \else
+ \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}%
+ \fi
+ \hpack to \ifdim\naturalfloatwd>\makeupwidth\makeupwidth\else\naturalfloatwd\fi
+ {\hss\box\floatbox\hss}%
+ \ifnum\recurselevel<\nofcollectedfloats
+ \hfil
+ \fi}%
+ \hfil}}
+
+\def\page_one_command_flush_floats_indeed
+ {\ifconditional\c_page_floats_some_waiting
+ \ifconditional\c_page_floats_pack_flushed
+ \page_floats_collect\s!text\hsize\d_page_floats_compress_distance
+ \ifcase\nofcollectedfloats
+ \page_floats_get
+ \or
+ \page_floats_get
+ \else
+ \page_one_command_floats_get_compressed
+ \fi
+ \else
+ \page_floats_get
+ \fi
+ % there is a chance that due to rounding errors, the float
+ % fits on a page where it was first rejected, in which case
+ % the prevdepth is -maxdimen and we cannot obey the grid
+ \doplacefloatbox
+ \expandafter\page_one_command_flush_floats_indeed
+ \fi}
+
+\protected\def\page_one_command_flush_margin_blocks
+ {\ifconditional\c_page_margin_blocks_present % \ifvoid\b_page_margin_blocks \else
+ \ifdim\pagetotal=\zeropoint
+ \null % \fixedspace
+ \fi
+ \page_otr_command_next_page % \page
+ \ifvoid\b_page_margin_blocks
+ \global\setfalse\c_page_margin_blocks_present
+ \else
+ \doubleexpandafter\page_one_command_flush_margin_blocks
+ \fi
+ \fi}
+
+\protected\def\page_one_command_check_if_float_fits
+ {\ifconditional\c_page_floats_not_permitted
+ \global\setfalse\c_page_floats_room
+ \else
+ % new per 31/5/2004, should be an option, only one column mode
+ \begingroup
+ \scratchdimen\dimexpr\pagetotal+\lineheight\relax
+ \ifdim\scratchdimen>\pagegoal
+ \goodbreak % hack ?
+ \fi
+ % should be an option
+ \endgroup
+ \scratchdimenone\dimexpr
+ \pagetotal
+ +\floatheight
+ +\d_strc_floats_top
+ +\d_strc_floats_overflow
+ -\pageshrink
+ \relax
+ \scratchdimentwo\pagegoal
+ \relax % needed
+ \ifcase\c_page_one_float_method
+ % method 0 : raw
+ \or
+ % method 1 : safe
+ % too fuzzy as it can change and for a high page it's a lot : \scratchdimentwo .99\pagegoal
+ \advance\scratchdimentwo -\strutdp
+ \or
+ % method 2 : tight
+ \advance\scratchdimenone -\onepoint
+ \fi
+ \relax % really needed ! ! ! !
+ \ifdim\scratchdimenone>\scratchdimentwo
+ \global\setfalse\c_page_floats_room
+ \else
+ \global\settrue\c_page_floats_room
+ \fi
+ \fi}
+
+\protected\def\page_one_command_flush_saved_floats
+ {\global\d_page_floats_inserted_top\zeropoint
+ \global\d_page_floats_inserted_bottom\zeropoint
+ \ifconditional\c_page_floats_flushing \else
+ \page_one_command_set_top_insertions
+ \page_one_command_set_bottom_insertions
+ \ifconditional\c_page_floats_some_waiting
+ \doif{\rootfloatparameter\c!cache}\v!no\page_one_command_flush_floats % could be _otr_
+ \orelse\ifconditional\c_page_margin_blocks_present
+ \page_one_command_flush_floats
+ \fi
+ \fi}
+
+% \def\page_one_place_float_here_indeed
+% {\ifgridsnapping
+% % otherwise real bad outcome
+% \else
+% \baselinecorrection % this has to be done better (and definitely not in column mode)
+% \fi
+% \doplacefloatbox
+% \page_floats_report_total
+% \dohandlenextfloatindent}
+
+\def\page_one_place_float_here_indeed
+ {\ifgridsnapping
+ % otherwise real bad outcome
+ \else
+ % this was not really applied (delayed)
+ % \baselinecorrection % this has to be done better (and definitely not in column mode)
+ % so we now use this:
+ \checkprevdepth
+ \fi
+ \doplacefloatbox
+ \page_floats_report_total
+ \dohandlenextfloatindent}
+
+\def\page_one_place_float_force
+ {\showmessage\m!floatblocks9\empty
+ \page_one_place_float_here_indeed}
+
+\def\page_one_place_float_side_indeed#1%
+ {\setbox\floatbox\vpack{\box\floatbox}% ? can go
+ \wd\floatbox\floatwidth
+ #1{\box\floatbox}%
+ \doifinset\v!tall\floatlocationmethod\page_sides_flush_floats_after_par}
+
+\def\page_one_place_float_left
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_left
+ \presetindentation}
+
+\def\page_one_place_float_right
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_right}
+
+\def\page_one_place_float_margin
+ {\page_margin_blocks_process_float
+ \nonoindentation} % new, due to popular request
+
+\def\page_one_place_float_leftmargin
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_leftmargin
+ \nonoindentation} % new, due to popular request
+
+\def\page_one_place_float_rightmargin
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_rightmargin
+ \nonoindentation} % new, due to popular request
+
+\def\page_one_place_float_leftedge
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_leftedge}
+
+\def\page_one_place_float_rightedge
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_rightedge}
+
+\def\page_one_place_float_inmargin
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_cutspace}
+
+\def\page_one_place_float_backspace
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_backspace}
+
+\def\page_one_place_float_cutspace
+ {\page_one_place_float_side_indeed
+ \page_sides_process_float_cutspace}
+
+\def\page_one_place_float_page {\page_floats_save_page_float \s!page \floatlocationmethod}
+\def\page_one_place_float_leftpage {\page_floats_save_page_float \s!leftpage \floatlocationmethod}
+\def\page_one_place_float_rightpage {\page_floats_save_page_float \s!rightpage\floatlocationmethod}
+\def\page_one_place_float_somewhere {\page_floats_save_somewhere_float\s!somewhere\floatlocationmethod}
+
+\def\page_one_place_float_here
+ {\page_one_place_float_otherwise_here}
+
+\def\page_one_place_float_auto
+ {\page_one_place_float_otherwise
+ \nonoindentation} % new, due to popular request
+
+\def\page_one_place_float_top
+ {\page_one_place_float_otherwise
+ \nonoindentation}
+
+\def\page_one_place_float_bottom
+ {\page_one_place_float_otherwise
+ \nonoindentation} % new, due to popular request
+
+\def\page_one_place_float_otherwise
+ {\doifelseinset\v!here\floatlocationmethod
+ \page_one_place_float_otherwise_here
+ \page_one_place_float_otherwise_else}
+
+\def\page_one_place_float_otherwise_here
+ {\doifelseinset\v!always\floatlocationmethod
+ {\page[\v!preference]%
+ \page_otr_command_check_if_float_fits
+ \ifconditional\c_page_floats_room
+ \page_one_place_float_here_indeed
+ \else
+ \showmessage\m!floatblocks9\empty
+ \page_floats_resave\s!text
+ \fi}
+ {\ifconditional\c_page_floats_some_waiting
+ \page_floats_save\s!text
+ \nonoindentation
+ \else
+ \page[\v!preference]%
+ \page_otr_command_check_if_float_fits
+ \ifconditional\c_page_floats_room
+ \page_one_place_float_here_indeed
+ \else
+ \page_floats_save\s!text
+ \nonoindentation
+ \fi
+ \fi}}
+
+\def\page_one_place_float_otherwise_else
+ {\doifelseinset\v!always\floatlocationmethod
+ {\page_otr_command_check_if_float_fits
+ \ifconditional\c_page_floats_room
+ \page_one_place_float_auto_top_bottom
+ \else
+ \showmessage\m!floatblocks9\empty
+ \page_floats_resave\s!text
+ \fi}
+ {\page_otr_command_check_if_float_fits
+ \ifconditional\c_page_floats_room
+ \page_one_place_float_auto_top_bottom
+ \else
+ \page_floats_save\s!text
+ \nonoindentation
+ \fi}}
+
+\mutable\def\floatautofactor{.5}
+
+\def\page_one_place_float_auto_top_bottom
+ {\ifx\floatmethod\v!auto
+ \ifdim\pagetotal<\floatautofactor\pagegoal % when empty page, maxdimen
+ \page_one_place_float_top_indeed
+ \else
+ \page_one_place_float_bottom_indeed
+ \fi
+ \else
+ \ifx\floatmethod\v!top
+ \page_one_place_float_top_indeed
+ \orelse\ifx\floatmethod\v!bottom
+ \page_one_place_float_bottom_indeed
+ \else
+ \page_one_place_float_here_indeed
+ \fi
+ \fi}
+
+\def\page_one_place_float_top_indeed % maybe remember last beforeskip
+ {\page_one_prepare_top_float
+ \page_one_insert_top_float
+ \page_floats_report_total}
+
+\def\page_one_place_float_bottom_indeed
+ {\global\advance\d_page_floats_inserted_bottom\dimexpr\ht\floatbox+\dp\floatbox+\d_strc_floats_top\relax
+ \floatingpenalty\zerocount
+ \insert\namedinsertionnumber\s!bottomfloat\bgroup
+ \forgetall
+ \blank[\rootfloatparameter\c!spacebefore]%
+ \page_otr_command_flush_float_box
+ \egroup
+ \page_floats_report_total}
+
+\def\page_one_place_float_face % links, rechts, midden, hoog, midden, laag
+ {%\checkwaitingfloats{#1}%
+ \startopposite
+ \page_otr_command_flush_float_box
+ \stopopposite
+ }%\page_floats_report_total}
+
+\protected\def\page_one_command_flush_side_floats
+ {\page_sides_flush_floats}
+
+\protected\def\page_one_command_synchronize_side_floats
+ {\page_sides_synchronize_floats}
+
+\protected\def\page_one_command_test_page
+ {\testpage}
+
+\protected\def\page_one_command_flush_all_floats
+ {\ifconditional\c_page_floats_some_waiting
+ \begingroup
+ \c_page_floats_n_of_top\plusthousand
+ \c_page_floats_n_of_bottom\zerocount
+ % this is needed in case a float that has been stored
+ % ends up at the current page; this border case occurs when
+ % the calculated room is 'eps' smaller that the room available
+ % when just flushing; so now we have (maybe optional):
+ \pagebaselinecorrection % hm, needs checking, not needed when no floats
+ % alas, this is tricky but needed (first surfaced in prikkels)
+ \page_otr_command_flush_floats
+ \endgroup
+ \fi}
+
+\protected\def\page_one_command_flush_facing_floats
+ {\strc_floats_facing_flush}
+
+\defineoutputroutine
+ [\s!singlecolumn]
+ [\s!page_otr_command_routine =\page_one_command_routine,
+ \s!page_otr_command_package_contents =\page_one_command_package_contents,
+ \s!page_otr_command_set_vsize =\page_one_command_set_vsize,
+ \s!page_otr_command_set_hsize =\page_one_command_set_hsize,
+ % \s!page_otr_command_synchronize_hsize =\page_one_command_synchronize_hsize,
+ \s!page_otr_command_next_page =\page_one_command_next_page,
+ \s!page_otr_command_next_page_and_inserts =\page_one_command_next_page_and_inserts,
+ \s!page_otr_command_set_top_insertions =\page_one_command_set_top_insertions,
+ \s!page_otr_command_set_bottom_insertions =\page_one_command_set_bottom_insertions,
+ \s!page_otr_command_flush_top_insertions =\page_one_command_flush_top_insertions,
+ \s!page_otr_command_flush_bottom_insertions=\page_one_command_flush_bottom_insertions,
+ \s!page_otr_command_check_if_float_fits =\page_one_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_one_command_set_float_hsize,
+ \s!page_otr_command_flush_float_box =\page_one_command_flush_float_box,
+ \s!page_otr_command_side_float_output =\page_one_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats=\page_one_command_synchronize_side_floats,
+ \s!page_otr_command_flush_floats =\page_one_command_flush_floats,
+ \s!page_otr_command_flush_side_floats =\page_one_command_flush_side_floats,
+ \s!page_otr_command_flush_saved_floats =\page_one_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_one_command_flush_all_floats,
+ \s!page_otr_command_flush_margin_blocks =\page_one_command_flush_margin_blocks,
+ \s!page_otr_command_test_column =\page_one_command_test_page,
+ \s!page_otr_command_flush_facing_floats =\page_one_command_flush_facing_floats
+]
+
+% \setupoutputroutine
+% [\s!singlecolumn]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-otr.lmt b/Master/texmf-dist/tex/context/base/mkxl/page-otr.lmt
new file mode 100644
index 00000000000..5c0bc96a9c5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-otr.lmt
@@ -0,0 +1,14 @@
+if not modules then modules = { } end modules ['page-otr'] = {
+ version = 1.001,
+ comment = "companion to page-otr.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+interfaces.implement {
+ name = "triggerpagebuilder",
+ public = true,
+ protected = true,
+ actions = tex.triggerbuildpage,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-otr.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-otr.mklx
new file mode 100644
index 00000000000..f2a341d4bc0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-otr.mklx
@@ -0,0 +1,333 @@
+%D \module
+%D [ file=page-otr,
+%D version=2012.01.25,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Output Routines,
+%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 Page Macros / Output Routines}
+
+%D This module will get some of the code from other modules. At the same time we
+%D provide a bit more control.
+
+% When issuing two \par\penalty-\plustenthousand's, only the first triggers the
+% otr. Is this an obscure feature or an optimization?
+
+\registerctxluafile{page-otr}{autosuffix}
+
+\unprotect
+
+% triggerpagebuilder % defined at the lua end
+
+\installcorenamespace{outputroutine}
+
+\installswitchcommandhandler \??outputroutine {outputroutine} \??outputroutine
+
+\newtoks\t_page_otr_commands
+\newtoks\t_page_otr_tracers
+
+\permanent\protected\def\defineoutputroutinecommand[#name]% doing multiple on one go saves syncing
+ {\processcommalist[#name]\page_otr_commands_define}
+
+\protected\def\page_otr_commands_define#name%
+ {\ifcsname#name\endcsname \else
+ \letcsname#name\endcsname\relax
+ \normalexpanded{\t_page_otr_commands{\the\t_page_otr_commands\noexpand\page_otr_commands_process{#name}}}%
+ \fi}
+
+\let\page_otr_commands_process\gobbleoneargument
+
+\appendtoks
+ \let\page_otr_commands_process\page_otr_specifics_preset
+ \the\t_page_otr_commands
+ \let\page_otr_commands_process\gobbleoneargument
+\to \everyswitchoutputroutine
+
+\protected\def\page_otr_specifics_preset#name%
+ {\edef\page_otr_specifics_command{\directoutputroutineparameter{#name}}% no inheritance of commands
+ \ifempty\page_otr_specifics_command
+ \writestatus{\currentoutputroutine}{- \expandafter\strippedcsname\csname#name\endcsname}%
+ \letcsname#name\endcsname\relax
+ \else
+ \writestatus{\currentoutputroutine}{+ \expandafter\strippedcsname\csname#name\endcsname}%
+ \letcsname#name\expandafter\endcsname\page_otr_specifics_command
+ \fi}
+
+\protected\def\page_otr_specifics_preset_normal#name%
+ {\edef\page_otr_specifics_command{\directoutputroutineparameter{#name}}% no inheritance of commands
+ \ifempty\page_otr_specifics_command
+ \letcsname#name\endcsname\relax
+ \else
+ \letcsname#name\expandafter\endcsname\page_otr_specifics_command
+ \fi}
+
+\protected\def\page_otr_specifics_preset_traced#name%
+ {\edef\page_otr_specifics_command{\directoutputroutineparameter{#name}}% no inheritance of commands
+ \ifempty\page_otr_specifics_command
+ \writestatus{\currentoutputroutine}{preset: - \expandafter\strippedcsname\csname#name\endcsname}%
+ \letcsname#name\endcsname\relax
+ \else
+ \writestatus{\currentoutputroutine}{preset: + \expandafter\strippedcsname\csname#name\endcsname}%
+ \letcsname#name\expandafter\endcsname\page_otr_specifics_command
+ \fi}
+
+\let\page_otr_specifics_preset\page_otr_specifics_preset_normal
+
+\permanent\protected\def\traceoutputroutines
+ {\the\t_page_otr_tracers}
+
+\appendtoks
+ \let\page_otr_specifics_preset\page_otr_specifics_preset_traced
+\to \t_page_otr_tracers
+
+%D We have a couple of output routines and the default one is
+%D the single column routine. Then there is a multicolumn variant
+%D that can be used mixed, and a columnset variant that is more
+%D exclusive.
+
+\installcorenamespace{otrtriggers}
+
+\newconstant\c_page_otr_eject_penalty \c_page_otr_eject_penalty -\plustenthousand
+\newconstant\c_page_otr_super_penalty \c_page_otr_super_penalty -\plustwentythousand
+\newcount \c_page_otr_trigger_penalty \c_page_otr_trigger_penalty -100010
+
+\newcount \c_page_otr_columns % we will share this one
+
+\newif \ifinotr % we keep this (name) for old times sake
+
+% \def\page_otr_update_page_goal#1#2%
+% {\global\c_page_otr_columns#2\relax
+% \pagegoal\dimexpr\vsize-\c_page_otr_columns\insertheights\relax}
+
+\appendtoks
+ \insertheights\zeropoint
+\to \everyaftershipout
+
+\protected\def\page_otr_message_b{\page_otr_message_s+}
+\protected\def\page_otr_message_e{\page_otr_message_s-}
+
+\protected\def\page_otr_message_s#sign#what%
+ {\writestatus
+ \currentoutputroutine
+ {#sign\space \space
+ #what\space \space
+ p:\the\outputpenalty,\space
+ r:\the\realpageno ,\space
+ c:\number\mofcolumns,\space
+ v:\the\vsize ,\space
+ g:\the\pagegoal ,\space
+ t:\the\pagetotal ,\space
+ i:\the\insertheights
+ \ifdim\pagetotal>\pagegoal
+ ,\space
+ d:\the\dimexpr\pagetotal-\pagegoal\relax
+ \fi}}
+
+\protected\def\page_otr_trigger#penalty%
+ {\begingroup
+ \par
+ \penalty#penalty%
+ \endgroup}
+
+\permanent\protected\def\installoutputroutine#invoke#action% \invoke \action
+ {\global\advance\c_page_otr_trigger_penalty\minusone
+ \frozen\protected\edef#invoke{\page_otr_trigger{\number\c_page_otr_trigger_penalty}}%
+ \setvalue{\??otrtriggers\number\c_page_otr_trigger_penalty}{#action}}
+
+\protected\def\page_otr_triggered_output_routine_traced
+ {\ifcsname\??otrtriggers\the\outputpenalty\endcsname
+ \page_otr_message_b{special}%
+ \csname\??otrtriggers\the\outputpenalty\endcsname % \lastnamedcs can be gone
+ \page_otr_message_e{special}%
+ \else
+ \page_otr_message_b{normal}%
+ \page_otr_command_routine
+ \page_otr_message_e{normal}%
+ \fi}
+
+\protected\def\page_otr_triggered_output_routine_normal
+ {\ifcsname\??otrtriggers\the\outputpenalty\endcsname
+ \lastnamedcs
+ \else
+ \page_otr_command_routine
+ \fi}
+
+\let\page_otr_triggered_output_routine\page_otr_triggered_output_routine_normal
+
+\appendtoks
+ \let\page_otr_triggered_output_routine\page_otr_triggered_output_routine_traced
+\to \t_page_otr_tracers
+
+%D The real routine handler:
+
+\ifdefined\everybeforeoutput \else \newtoks\everybeforeoutput \fi
+\ifdefined\everyafteroutput \else \newtoks\everyafteroutput \fi
+
+\def\page_otr_set_engine_output_routine#content%
+ {\global\output
+ {\inotrtrue
+ \the\everybeforeoutput
+ #content\relax
+ \the\everyafteroutput}}
+
+% Just as fuzzy (and in 'one' we are okay with \aftergroup anyway):
+%
+% \ifdefined\everybeforeoutputgroup \else \newtoks\everybeforeoutputgroup \fi
+% \ifdefined\everyafteroutputgroup \else \newtoks\everyafteroutputgroup \fi
+%
+% \def\page_otr_set_engine_output_routine#content%
+% {\the\everybeforeoutputgroup
+% \global\output
+% {\inotrtrue
+% \the\everybeforeoutput
+% #content\relax
+% \the\everyafteroutput
+% \aftergroup\the\aftergroup\everyafteroutputgroup}}
+%
+% \appendtoks
+% \ifnum\c_page_postponed_mode=\plusone
+% \page_postponed_blocks_flush % and then not in \page_otr_construct_and_shipout
+% \fi
+% \to \everyafteroutputgroup
+
+\page_otr_set_engine_output_routine\page_otr_triggered_output_routine
+
+\installoutputroutine\synchronizeoutput % use \triggerpagebuilder instead
+ {\ifvoid\normalpagebox\else
+ \unvbox\normalpagebox
+ % not \pagediscards as it does more harm than good
+ \fi}
+
+\installoutputroutine\discardpage
+ {\setbox\scratchbox\box\normalpagebox}
+
+% todo: \resetpagebreak -> everyejectpage
+
+\def\page_otr_trigger_output_routine
+ {\par
+ \ifvmode
+ \penalty\c_page_otr_eject_penalty
+ \fi
+ \resetpagebreak}
+
+\def\page_otr_fill_and_eject_page
+ {\par
+ \ifvmode
+ \vfill
+ \penalty\c_page_otr_eject_penalty
+ \fi
+ \resetpagebreak}
+
+\def\page_otr_eject_page
+ {\par
+ \ifvmode
+ \ifdim\pagetotal>\pagegoal \else
+ \normalvfil
+ \fi
+ \penalty\c_page_otr_eject_penalty
+ \fi
+ \resetpagebreak}
+
+\def\page_otr_eject_page_and_flush_inserts % can be an installed one
+ {\par
+ \ifvmode
+ \ifdim\pagetotal>\pagegoal \else
+ \normalvfil
+ \fi
+ \penalty\c_page_otr_super_penalty
+ \fi
+ \resetpagebreak}
+
+\def\page_otr_check_for_pending_inserts
+ {\ifnum\outputpenalty>\c_page_otr_super_penalty \else
+ \ifnum\insertpenalties>\zerocount
+ % something is being held over so we force a new page
+ \page_otr_force_another_page
+ \fi
+ \fi}
+
+\def\page_otr_force_another_page
+ {% we should actually remove the dummy line in the otr
+ \hpack to \hsize{}%
+ \kern-\topskip
+ \nobreak
+ \vfill
+ \penalty\c_page_otr_super_penalty
+ \resetpagebreak}
+
+%D For those who've read the plain \TEX\ book, we provide the next
+%D macro:
+
+\permanent\protected\def\bye
+ {\writestatus\m!system{Sorry, you're not done yet, so no goodbye!}}
+
+%D We define a few constants because that (1) provides some checking
+%D and (2) is handier when aligning definitions (checks nicer). Most
+%D routines will use ard codes names but sometimes we want to adapt,
+%D which is why we have these:
+
+\definesystemconstant{page_otr_command_routine}
+\definesystemconstant{page_otr_command_package_contents}
+\definesystemconstant{page_otr_command_set_vsize}
+\definesystemconstant{page_otr_command_set_hsize}
+\definesystemconstant{page_otr_command_synchronize_hsize}
+\definesystemconstant{page_otr_command_next_page}
+\definesystemconstant{page_otr_command_next_page_and_inserts}
+\definesystemconstant{page_otr_command_set_top_insertions}
+\definesystemconstant{page_otr_command_set_bottom_insertions}
+\definesystemconstant{page_otr_command_flush_top_insertions}
+\definesystemconstant{page_otr_command_flush_bottom_insertions}
+\definesystemconstant{page_otr_command_check_if_float_fits}
+\definesystemconstant{page_otr_command_set_float_hsize}
+\definesystemconstant{page_otr_command_flush_float_box}
+\definesystemconstant{page_otr_command_side_float_output}
+\definesystemconstant{page_otr_command_synchronize_side_floats}
+\definesystemconstant{page_otr_command_flush_floats}
+\definesystemconstant{page_otr_command_flush_side_floats}
+\definesystemconstant{page_otr_command_flush_saved_floats}
+\definesystemconstant{page_otr_command_flush_all_floats}
+\definesystemconstant{page_otr_command_flush_margin_blocks}
+\definesystemconstant{page_otr_command_test_column}
+\definesystemconstant{page_otr_command_flush_facing_floats}
+
+\definesystemconstant{singlecolumn}
+\definesystemconstant{multicolumn} % will move
+\definesystemconstant{columnset} % will move
+\definesystemconstant{pagecolumn} % will move
+
+\defineoutputroutinecommand
+ [\s!page_otr_command_routine,
+ \s!page_otr_command_package_contents,
+ \s!page_otr_command_set_vsize,
+ \s!page_otr_command_set_hsize,
+ \s!page_otr_command_synchronize_hsize, % for columns of different width
+ \s!page_otr_command_next_page,
+ \s!page_otr_command_next_page_and_inserts,
+ \s!page_otr_command_set_top_insertions,
+ \s!page_otr_command_set_bottom_insertions,
+ \s!page_otr_command_flush_top_insertions,
+ \s!page_otr_command_flush_bottom_insertions,
+ \s!page_otr_command_check_if_float_fits,
+ \s!page_otr_command_set_float_hsize,
+ \s!page_otr_command_flush_float_box,
+ \s!page_otr_command_side_float_output, % name will change as will hooks
+ \s!page_otr_command_synchronize_side_floats,
+ \s!page_otr_command_flush_floats,
+ \s!page_otr_command_flush_side_floats,
+ \s!page_otr_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats,
+ \s!page_otr_command_flush_margin_blocks,
+ \s!page_otr_command_test_column,
+ \s!page_otr_command_flush_facing_floats]
+
+\appendtoks
+ \setupoutputroutine[\s!singlecolumn]%
+\to \everydump
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-par.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-par.mkxl
new file mode 100644
index 00000000000..c198784dc4d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-par.mkxl
@@ -0,0 +1,73 @@
+%D \module
+%D [ file=page-par, % copied from page-lin
+%D version=1997.03.31,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Line Numbering,
+%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 Page Macros / Paragraph Numbering}
+
+\unprotect
+
+\installcorenamespace {paragraphnumbering}
+\installcorenamespace {paragraphnumberingvariants}
+
+\installsimplecommandhandler \??paragraphnumbering {paragraphnumbering} \??paragraphnumbering
+
+\definecounter[\v!paragraph]
+
+\permanent\let\showparagraphnumber\relax
+
+\appendtoks
+ \page_par_check_state
+\to \everysetupparagraphnumbering
+
+\protected\def\page_par_check_state
+ {\rawprocesscommacommand[\paragraphnumberingparameter\c!state]\page_par_check_state_step}
+
+\def\page_par_check_state_step#1%
+ {\ifcsname\??paragraphnumberingvariants#1\endcsname
+ \lastnamedcs
+ \fi}
+
+\setvalue{\??paragraphnumberingvariants\v!start}%
+ {\enforced\let\showparagraphnumber\page_par_show_number_normal}
+
+\setvalue{\??paragraphnumberingvariants\v!stop}%
+ {\enforced\let\showparagraphnumber\relax}
+
+\setvalue{\??paragraphnumberingvariants\v!line}%
+ {\enforced\let\showparagraphnumber\page_par_show_number_lines}
+
+\setvalue{\??paragraphnumberingvariants\v!reset}%
+ {\strc_counters_reset\v!paragraph
+ \enforced\let\showparagraphnumber\page_par_show_number_normal}
+
+\permanent\protected\def\page_par_show_number_normal
+ {\strc_counters_increment\v!paragraph
+ \inleftmargin % todo: \c!location, only a few make sense
+ {\hfill % no complaints
+ \tf % \tf normalizes em
+ \useparagraphnumberingstyleandcolor\c!style\c!color
+ \convertedcounter[\v!paragraph]%
+ \kern\paragraphnumberingparameter\c!distance}}
+
+\permanent\protected\def\page_par_show_number_lines
+ {\ifnumberinglines
+ \page_par_show_number_normal
+ \fi}
+
+\setupparagraphnumbering
+ [\c!state=\v!stop,
+ %\c!location,
+ %\c!style=,
+ %\c!color=,
+ \c!distance=\ifcase\c_page_lines_location2\emwidth\else\zeropoint\fi] % will change
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-pcl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-pcl.mkxl
new file mode 100644
index 00000000000..6d186a4cd4c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-pcl.mkxl
@@ -0,0 +1,853 @@
+%D \module
+%D [ file=page-pcl,
+%D version=2017.11.08,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Columns,
+%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 Page Macros / Page Columns}
+
+%D This is very experimental code! We took a bit from the mixed columns and single
+%D column page code. This one works acceptable with floats and is for whole double
+%D column documents. We don't balance (yet). Footnotes are per column. One can have
+%D side floats too. No balancing and other fancy features.
+%D
+%D Don't use this in production! Although the main approach will stay there might be
+%D changes in the way floats are dealt with. Not much testing has been done but as
+%D we stay close to the single column mode we expect most to just work. Only floats
+%D are the (usual) pain. Backgrounds, line numbering, etc.\ not tested either.
+
+\unprotect
+
+\definemeasure[onecolumn] [\columnwidth]
+\definemeasure[twocolumns] [\dimexpr\plustwo \columnwidth+ \columndistance\relax]
+\definemeasure[threecolumns][\dimexpr\plusthree\columnwidth+\plustwo \columndistance\relax]
+\definemeasure[fourcolumns] [\dimexpr\plusfour \columnwidth+\plusthree\columndistance\relax]
+
+\newcount \c_page_col_n_of_columns \c_page_col_n_of_columns\plusone
+\newcount \c_page_col_current \c_page_col_current \plusone
+\newdimen \d_page_col_distance
+\newdimen \d_page_col_max_height
+\newdimen \d_page_col_max_width
+%newdimen \d_page_col_balance_step
+\newdimen \d_page_col_column_width
+\newdimen \d_page_col_top_height
+\newdimen \d_page_col_top_width
+\newdimen \d_page_col_available
+\newdimen \d_page_col_sofar
+\newconditional\c_page_col_page
+
+%D We need to step over empty columns.
+
+\protected\def\page_col_command_next_page
+ {\page_col_eject_page}
+
+\permanent\protected\def\page_col_column
+ {\page_otr_eject_page}
+
+\protected\def\page_col_eject_page
+ {\begingroup
+ \scratchcountertwo \realpageno
+ \page_otr_eject_page
+ \scratchcounterone \c_page_col_current
+ \scratchcounterthree\zerocount
+ \doloop{%
+ \ifnum\scratchcounterthree>\plushundred
+ % too many attempts
+ \exitloop
+ \orelse\ifnum\realpageno>\scratchcountertwo
+ % we advanced at least one page so we're done
+ \exitloop
+ \else
+ \ifnum\scratchcounterone=\c_page_col_current
+ \dontleavehmode\null
+ \fi
+ \page_otr_eject_page
+ \scratchcounterone\c_page_col_current
+ \advance\scratchcounterthree\plusone
+ \fi
+ }%
+ \endgroup}
+
+%D \unknown
+
+\protected\def\page_col_command_next_page_and_inserts
+ {\page_otr_eject_page_and_flush_inserts}
+
+%D \unknown
+
+\protected\def\page_col_command_set_hsize
+ {\global\hsize\d_page_col_column_width\relax
+ \global\d_page_col_available\dimexpr
+ \numexpr\c_page_col_n_of_columns-\c_page_col_current+\plusone\relax\d_page_col_column_width
+ + \numexpr\c_page_col_n_of_columns-\c_page_col_current \relax\d_page_col_distance
+ \relax
+ \global\d_page_col_sofar
+ \ifnum\c_page_col_n_of_columns=\plusone
+ \zeropoint
+ \else
+ \numexpr\c_page_col_n_of_columns-\plusone\relax
+ \dimexpr\d_page_col_column_width+\d_page_col_distance\relax
+ \fi
+ % consistent with mixed:
+ \textwidth\d_page_col_column_width}
+
+%D \unknown
+
+\protected\def\page_col_command_set_vsize % \page_one_command_set_vsize minus the pagegoal setting
+ {\ifgridsnapping
+ \ifcase\layoutlines
+ \getrawnoflines\textheight
+ \else
+ \noflines\layoutlines
+ \fi
+ \global\vsize\noflines\openlineheight
+ \else
+ \global\vsize\textheight
+ \fi}
+
+%D \unknown
+
+\def\page_col_registered_text_area_b#1%
+ {\begingroup
+ \makeupwidth\d_page_col_column_width
+ \page_one_registered_text_area_b{#1}%
+ \endgroup}
+
+\protected\def\page_col_command_package_contents#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
+ {\bgroup
+ \setbox\b_page_one_contents\vbox to \textheight
+ {\page_one_registered_text_area_a#1#2}%
+ \page_one_command_package_show_state
+ \ht\b_page_one_contents\textheight
+ \page_col_registered_text_area_b
+ {\box\b_page_one_contents}%
+ \egroup}
+
+\protected\def\page_col_command_package_contents_one#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
+ {\bgroup
+ \forgetall
+ % see one for comments as it is similar
+ \strc_notes_check_if_bottom_present
+ \d_page_one_natural_depth\dp#2\relax
+ \setbox\b_page_one_contents\vbox to \textheight
+ {\page_col_command_flush_top_insertions
+ \page_one_registered_text_area_a#1#2%
+ \hsize\d_page_col_column_width
+ \ifgridsnapping
+ \vskip\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
+ \prevdepth\openstrutdepth
+ \page_col_command_flush_bottom_insertions
+ \vfil
+ \orelse\ifcase\bottomraggednessmode
+ % ragged (default)
+ \vskip\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
+ \prevdepth\openstrutdepth
+ \page_col_command_flush_bottom_insertions
+ \vfil
+ \or
+ % align (normal)
+ \page_col_command_flush_bottom_insertions
+ \or
+ % baseline
+ \kern\dimexpr\maxdepth-\d_page_one_natural_depth\relax
+ \page_col_command_flush_bottom_insertions
+ \fi
+ \fakepagenotes}%
+ \page_one_command_package_show_state
+ \ifconditional\c_notes_bottom_present
+ \ifgridsnapping
+ \ifcase\layoutlines
+ \getrawnoflines\textheight
+ \else
+ \noflines\layoutlines
+ \fi
+ \scratchoffset\dimexpr\numexpr\noflines-\plusone\relax\lineheight+\topskip\relax
+ \else
+ \scratchoffset\ht\b_page_one_contents
+ \fi
+ \setbox\b_page_one_bottom_notes\hpack
+ {\hsize\d_page_col_column_width
+ \setupnotes[\c!width=\textwidth]%
+ \lower\scratchoffset\vbox{\placebottomnotes\par\kern\zeropoint}}%
+ \ht\b_page_one_contents \zeropoint
+ \wd\b_page_one_contents \zeropoint
+ \ht\b_page_one_bottom_notes\zeropoint
+ \wd\b_page_one_bottom_notes\zeropoint
+ \wd\b_page_one_bottom_notes\d_page_col_column_width
+ \page_col_registered_text_area_b
+ {\vpack to \textheight
+ {\hpack{\box\b_page_one_contents\box\b_page_one_bottom_notes}}}%
+ \else
+ \ht\b_page_one_contents\textheight
+ \wd\b_page_one_contents\d_page_col_column_width
+ \page_col_registered_text_area_b
+ {\box\b_page_one_contents}%
+ \fi
+ \egroup}
+
+%D \unknown
+
+\protected\def\page_col_command_side_float_output
+ {% % %
+ \ifvoid\namedinsertionnumber\s!topfloat\else
+ \scratchwidth\wd\namedinsertionnumber\s!topfloat
+ \ifdim\scratchwidth>\d_page_col_top_width
+ \global\d_page_col_top_width \scratchwidth
+ \fi
+ \global\d_page_col_top_height\ht\namedinsertionnumber\s!topfloat
+ \fi
+ % % %
+ \setbox\scratchbox\vbox\bgroup
+ \page_col_command_package_contents_one\unvbox\normalpagebox
+ \egroup
+ \putboxincache\s!pagecolumn{\number\c_page_col_current}\scratchbox
+ \ifnum\c_page_col_current=\c_page_col_n_of_columns
+ \page_col_routine_package
+ \page_otr_construct_and_shipout\box\normalpagebox\plusone
+ \global\c_page_col_current\plusone
+ \global\d_page_col_top_height\zeropoint
+ \global\d_page_col_top_width\zeropoint
+ % \page_col_command_flush_top_insertions
+ % \page_col_command_flush_floats
+ \else
+ \ifdim\d_page_col_top_width>\zeropoint
+ \ifdim\dimexpr\d_page_col_top_width>\d_page_col_sofar\relax
+ \begingroup
+ \floatingpenalty\zerocount
+ \insert\namedinsertionnumber\s!topfloat\bgroup
+ \vbox to \d_page_col_top_height{\vss}
+ % can be an option
+ \page_col_command_flush_top_insertions
+ \page_col_command_flush_floats
+ % so far till option
+ \egroup
+ \endgroup
+ \fi
+ \fi
+ \global\advance\c_page_col_current\plusone
+ \fi
+ %
+ \page_col_command_set_vsize
+ \page_col_command_set_hsize}
+
+% use \currentmixedcolumns instead of \recurselevel
+
+\def\page_col_routine_package_step
+ {% needs packaging anyway
+ \getboxfromcache{\s!pagecolumn}{\number\recurselevel}\scratchbox
+ \page_lines_add_numbers_to_box\scratchbox\recurselevel\c_page_col_n_of_columns\plusone % new
+ \page_marks_synchronize_column\plusone\c_page_col_n_of_columns\recurselevel\scratchbox
+ % backgrounds
+ \anch_mark_column_box\scratchbox\recurselevel
+ \mixedcolumnseparatorheight\ht\scratchbox
+ \mixedcolumnseparatordepth \dp\scratchbox
+ \inheritedpagecolumnsframedbox\recurselevel\scratchbox}
+
+\def\page_col_routine_package
+ {\global\setbox\normalpagebox\hbox to \makeupwidth\bgroup
+ \edef\p_separator{\pagecolumnsparameter\c!separator}%
+ \pagecolumnseparatorwidth\d_page_col_distance
+ \edef\p_direction{\pagecolumnsparameter\c!direction}%
+ \ifx\p_direction\v!reverse
+ \dostepwiserecurse\c_page_col_n_of_columns\plusone\minusone
+ {\page_col_routine_package_step
+ \ifnum\recurselevel>\plusone
+ \page_col_routine_package_separate
+ \fi}%
+ \else
+ \dorecurse\c_page_col_n_of_columns
+ {\page_col_routine_package_step
+ \ifnum\recurselevel<\c_page_col_n_of_columns
+ \page_col_routine_package_separate
+ \fi}%
+ \fi
+ \egroup
+ \resetboxesincache{\s!pagecolumn}}
+
+%D \unknown
+
+% \protected\def\page_col_command_check_if_float_fits
+% {\ifconditional\c_page_floats_not_permitted
+% \global\setfalse\c_page_floats_room
+% %\orelse\ifabsdim\dimexpr\d_page_col_available-\naturalfloatwd\relax<\onepoint
+% \orelse\ifdim\dimexpr\d_page_col_available-\naturalfloatwd\relax>-\onepoint
+% \global\settrue\c_page_floats_room
+% \else
+% \global\setfalse\c_page_floats_room
+% \fi
+% \ifconditional\c_page_floats_room
+% \begingroup
+% \scratchdimen\dimexpr\pagetotal+\lineheight\relax
+% \ifdim\scratchdimen>\pagegoal
+% \goodbreak
+% \ifdim\dimexpr\d_page_col_available-\naturalfloatwd\relax>\onepoint
+% \global\setfalse\c_page_floats_room
+% \else
+% \global\settrue\c_page_floats_room
+% \fi
+% \fi
+% \endgroup
+% \fi
+% \ifconditional\c_page_floats_room
+% \ifdim\pagetotal>\zeropoint
+% \scratchdimenone\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
+% \scratchdimentwo\pagegoal
+% \relax % needed
+% \ifcase\c_page_one_float_method
+% % method 0 : raw
+% \or
+% % method 1 : safe
+% \advance\scratchdimentwo -\strutdp
+% \or
+% % method 2 : tight
+% \advance\scratchdimenone -\onepoint
+% \fi
+% \relax % really needed ! ! ! !
+% \ifdim\scratchdimenone>\scratchdimentwo
+% \global\setfalse\c_page_floats_room
+% \fi
+% \fi
+% \ifconditional\c_page_floats_room
+% \global\setbox\floatbox\hpack to \d_page_col_available{\hss\box\floatbox\hss}%
+% \fi
+% \fi}
+
+\protected\def\page_col_command_check_if_float_fits
+ {\ifconditional\c_page_floats_not_permitted
+ % forget about it anyway
+ \global\setfalse\c_page_floats_room
+ \else
+ % first we check the current column
+% \ifdim\dimexpr\d_page_col_width-\naturalfloatwd\relax>-\onepoint
+ \ifdim\dimexpr\hsize-\naturalfloatwd\relax>-\onepoint
+ \global\settrue\c_page_floats_room
+ \else
+ \global\setfalse\c_page_floats_room
+ \fi
+ \ifconditional\c_page_floats_room
+ % we fit in the column but do we have room
+ \ifdim\dimexpr\pagetotal+\lineheight\relax>\pagegoal
+ % try again later
+ \goodbreak
+ \fi
+ \ifdim\pagetotal>\zeropoint
+ \scratchdimenone\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
+ \scratchdimentwo\pagegoal
+ \relax % needed
+ \ifcase\c_page_one_float_method
+ % method 0 : raw
+ \or
+ % method 1 : safe
+ \advance\scratchdimentwo -\strutdp
+ \or
+ % method 2 : tight
+ \advance\scratchdimenone -\onepoint
+ \fi
+ \relax % really needed ! ! ! !
+ \ifdim\scratchdimenone>\scratchdimentwo
+ % there is no room, give up
+ \global\setfalse\c_page_floats_room
+ % now we can decide on a top float
+% \fi
+ \else
+% \ifconditional\c_page_floats_room
+% \global\setbox\floatbox\hpack to \d_page_col_float_available{\hss\box\floatbox\hss}%
+% \fi
+ \fi
+ \fi
+ \fi
+ \fi}
+
+%D \unknown
+
+\def\page_col_set_float_pack_hsize
+ {\ifnum\c_page_col_current=\c_page_col_n_of_columns
+ \c_page_col_current\plusone
+ \else
+ \advance\c_page_col_current\plusone
+ \fi
+ \page_col_command_set_hsize
+ \hsize\d_page_col_available}
+
+\protected\def\page_col_command_flush_floats
+ {\global\settrue\c_page_floats_flushing
+ \ifconditional\c_page_floats_some_waiting
+ \par
+ \page_col_set_float_pack_hsize
+ \page_col_command_flush_floats_indeed
+ \fi
+ \global\savednoffloats\zerocount
+ \global\setfalse\c_page_floats_some_waiting
+ \global\setfalse\c_page_floats_flushing}
+
+\def\page_floats_show_pack_state_indeed#1%
+ {\llap{\smash{\backgroundline[black]{\strut\smallinfofont\white#1\space\the\nofcollectedfloats\space of\space\the\savednoffloats:\the\hsize}}\hskip.25\emwidth}}
+
+\installtextracker
+ {floats.collecting}
+ {\let\page_floats_show_pack_state\page_floats_show_pack_state_indeed}
+ {\let\page_floats_show_pack_state\gobbleoneargument}
+
+\let\page_floats_show_pack_state\gobbleoneargument
+
+\def\page_col_command_flush_floats_indeed % much in common with OTRSET
+ {\ifconditional\c_page_floats_some_waiting
+ \ifconditional\c_page_floats_compress_flushed
+ \setfalse\c_page_floats_center_box % not needed as we do call directly
+ \page_floats_collect\s!text\hsize\d_page_floats_compress_distance
+ %
+ \ifnum\nofcollectedfloats=\plusone
+ \ifdim\naturalfloatwd>\hsize
+ \nofcollectedfloats\zerocount
+ \fi
+ \fi
+ \ifnum\nofcollectedfloats>\zerocount
+ \global\setbox\floatbox\hpack to \hsize
+ {\page_floats_show_pack_state F%
+ \hfil
+ \dorecurse\nofcollectedfloats
+ {\ifcase\columndirection % nog document wide
+ \page_floats_flush\s!text\plusone
+ \else
+ \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}%
+ \fi
+ % this could happen at the lua end instead
+ \scratchdimen\dimexpr\wd\floatbox-\naturalfloatwd\relax
+ \ifdim\scratchdimen<\zeropoint
+ \global\setbox\floatbox\hpack spread -\scratchdimen{\hss\box\floatbox\hss}%
+ \fi
+ %
+ \ifdim\wd\floatbox>\textwidth % \hsize
+ \hpack to \textwidth{\hss\box\floatbox\hss}% \textwidth
+ \else
+ \box\floatbox
+ \fi
+ \ifnum\recurselevel<\nofcollectedfloats
+ \hfil
+ \fi}%
+ \hfil}%
+ \doplacefloatbox
+ % \page_one_insert_top_float
+ \doubleexpandafter\page_col_command_flush_floats_indeed
+ \else
+ % todo
+ \fi
+ \else
+ \page_floats_get
+ % \page_one_insert_top_float
+ \doplacefloatbox
+ \doubleexpandafter\page_col_command_flush_floats_indeed
+ \fi
+ \fi}
+
+\protected\def\page_col_command_flush_saved_floats % like one
+ {\global\d_page_floats_inserted_top\zeropoint
+ \global\d_page_floats_inserted_bottom\zeropoint
+ \ifconditional\c_page_floats_flushing \else
+ \page_col_command_set_top_insertions
+ \page_col_command_set_bottom_insertions
+ \ifconditional\c_page_floats_some_waiting
+ \doif{\rootfloatparameter\c!cache}\v!no\page_col_command_flush_floats % could be _otr_
+ \orelse\ifconditional\c_page_margin_blocks_present
+ \page_col_command_flush_floats
+ \fi
+ \fi}
+
+\protected\def\page_col_command_set_top_insertions
+ {\bgroup
+ \ifconditional\c_page_floats_some_waiting
+ \noffloatinserts\zerocount
+ \let\totaltopinserted\!!zeropoint
+ \page_col_set_float_pack_hsize
+ \page_col_command_set_top_insertions_indeed
+ \ifnum\rootfloatparameter\c!nbottom=\zerocount
+ \ifnum\rootfloatparameter\c!nlines>\zerocount
+ \ifdim\totaltopinserted>\zeropoint\relax
+ \ifdim\dimexpr\rootfloatparameter\c!nlines\lineheight+\totaltopinserted\relax>\textheight
+ \showmessage\m!floatblocks8{\rootfloatparameter\c!nlines}%
+ \page_otr_fill_and_eject_page % was tripple: vfilll
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \egroup}
+
+\permanent\def\d_page_col_collected_top_float_height % pseudo
+ {\dimexpr
+ \d_page_floats_inserted_top +
+ \maxcollectedfloatstotal +
+ \ifdim\d_strc_floats_top>\d_strc_floats_bottom
+ \d_strc_floats_top
+ \else
+ \d_strc_floats_bottom
+ \fi
+ \relax}
+
+\def\page_col_command_set_top_insertions_indeed
+ {\ifnum\noffloatinserts<\c_page_floats_n_of_top
+ \ifcase\savednoffloats
+ \let\page_col_command_set_top_insertions_indeed\relax
+ \else
+ \page_floats_collect\s!text\hsize\emwidth
+ \ifdim\d_page_col_collected_top_float_height<\textheight
+ \global\setbox\floatbox\hpack to \hsize
+ {\page_floats_show_pack_state T%
+ \hfil
+ \dorecurse\nofcollectedfloats
+ {\ifcase\columndirection % nog document wide
+ \page_floats_flush\s!text\plusone
+ \else
+ \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}%
+ \fi
+ % this could happen at the lua end instead
+ \scratchdimen\dimexpr\wd\floatbox-\naturalfloatwd\relax
+ \ifdim\scratchdimen<\zeropoint
+ \global\setbox\floatbox\hpack spread -\scratchdimen{\hss\box\floatbox\hss}%
+ \fi
+ %
+ \ifdim\wd\floatbox>\makeupwidth % \hsize
+ \hpack to \makeupwidth{\hss\box\floatbox\hss}%
+ \else
+ \box\floatbox
+ \fi
+ \ifnum\recurselevel<\nofcollectedfloats
+ \hfil
+ \fi}%
+ \hfil}%
+ \page_one_prepare_top_float
+ \xdef\totaltopinserted{\the\d_page_floats_inserted_top}%
+ \page_one_insert_top_float
+ \ifconditional\c_page_floats_some_waiting
+ \advance\noffloatinserts \plusone
+ \else
+ \noffloatinserts\c_page_floats_n_of_top\relax
+ \fi
+ \page_floats_report_flushed
+ \else
+ \let\page_col_command_set_top_insertions_indeed\relax
+ \fi
+ \fi
+ \else
+ \ifconditional\c_page_floats_some_waiting
+ \showmessage\m!floatblocks6{\the\c_page_floats_n_of_top}%
+ \fi
+ \let\page_col_command_set_top_insertions_indeed\relax
+ \fi
+ \page_col_command_set_top_insertions_indeed}
+
+\let\page_col_command_flush_top_insertions \page_one_command_flush_top_insertions
+\let\page_col_command_flush_bottom_insertions\page_one_command_flush_bottom_insertions
+
+\let\page_col_command_set_bottom_insertions \page_one_command_set_bottom_insertions
+
+\let\page_col_command_flush_float_box \page_one_command_flush_float_box
+\let\page_col_command_synchronize_side_floats\page_one_command_synchronize_side_floats
+\let\page_col_command_flush_side_floats \page_one_command_flush_side_floats
+\let\page_col_command_flush_margin_blocks \page_one_command_flush_margin_blocks
+\let\page_col_command_test_page \page_one_command_test_page
+
+%D The separator code is more or less the same as mixed columns but we need
+%D to compensate for the top floats so we comment a bit for now.
+
+\newdimen\pagecolumnseparatorheight
+\newdimen\pagecolumnseparatordepth
+\newdimen\pagecolumnseparatorwidth
+
+% \installcorenamespace{pagecolumnsseparator}
+%
+% \protected\def\installpagecolumnseparator#1#2%
+% {\setvalue{\??pagecolumnsseparator#1}{#2}}
+%
+% \installpagecolumnseparator\v!rule
+% {\vrule
+% \s!width \pagecolumnsparameter\c!rulethickness
+% \s!height\pagecolumnseparatorheight
+% \s!depth \pagecolumnseparatordepth
+% \relax}
+%
+% \def\page_col_routine_package_separate
+% {\ifcsname\??pagecolumnsseparator\p_separator\endcsname
+% \page_col_command_inject_separator
+% \else
+% \hss
+% \fi}
+%
+% \protected\def\page_col_command_inject_separator
+% {\begingroup
+% \setbox\scratchbox\hbox to \zeropoint \bgroup
+% \hss
+% \starttextproperties
+% \usepagecolumnscolorparameter\c!rulecolor
+% \begincsname\??pagecolumnsseparator\p_separator\endcsname % was \c!rule
+% \stoptextproperties
+% \hss
+% \egroup
+% \ht\scratchbox\zeropoint
+% \dp\scratchbox\zeropoint
+% \hss
+% \box\scratchbox
+% \hss
+% \endgroup}
+
+\def\page_col_routine_package_separate
+ {\hss}
+
+%D \unknown
+
+\protected\def\page_col_command_routine
+ {\page_sides_output_routine}
+
+% % not:
+%
+% \protected\def\page_col_command_routine
+% {\ifconditional\c_page_sides_short
+% \page_sides_output_routine_yes_column
+% \else
+% \page_sides_output_routine_nop_column
+% \fi}
+%
+% \let\page_sides_output_routine_nop_column\page_sides_output_routine
+%
+% \def\page_sides_output_routine_yes_column % this might become the main one too
+% {\unvbox\normalpagebox % bah, and the discards?
+% %\page_col_column
+% \column % \page
+% % why was this \global\holdinginserts\zerocount
+% \global\setfalse\c_page_sides_short}
+
+\let\page_col_command_flush_all_floats\relax
+
+%D \unknown
+
+\defineoutputroutine
+ [\s!pagecolumn]
+ [\s!page_otr_command_routine =\page_col_command_routine,
+ \s!page_otr_command_package_contents =\page_col_command_package_contents,
+ \s!page_otr_command_set_vsize =\page_col_command_set_vsize,
+ \s!page_otr_command_set_hsize =\page_col_command_set_hsize,
+ % \s!page_otr_command_synchronize_hsize =\page_col_command_synchronize_hsize, % not done
+ \s!page_otr_command_next_page =\page_col_command_next_page,
+ \s!page_otr_command_next_page_and_inserts =\page_col_command_next_page_and_inserts,
+ \s!page_otr_command_set_top_insertions =\page_col_command_set_top_insertions,
+ \s!page_otr_command_set_bottom_insertions =\page_col_command_set_bottom_insertions,
+ \s!page_otr_command_flush_top_insertions =\page_col_command_flush_top_insertions,
+ \s!page_otr_command_flush_bottom_insertions=\page_col_command_flush_bottom_insertions,
+ \s!page_otr_command_check_if_float_fits =\page_col_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_col_command_set_float_hsize, % not done
+ \s!page_otr_command_flush_float_box =\page_col_command_flush_float_box,
+ \s!page_otr_command_side_float_output =\page_col_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats=\page_col_command_synchronize_side_floats,
+ \s!page_otr_command_flush_floats =\page_col_command_flush_floats,
+ \s!page_otr_command_flush_side_floats =\page_col_command_flush_side_floats,
+ \s!page_otr_command_flush_saved_floats =\page_col_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_col_command_flush_all_floats,
+ \s!page_otr_command_flush_margin_blocks =\page_col_command_flush_margin_blocks,
+ \s!page_otr_command_test_column =\page_col_command_test_page
+ ]
+
+%D \unknown
+
+\installfloatmethod \s!pagecolumn \v!here \page_one_place_float_here
+\installfloatmethod \s!pagecolumn \v!force \page_one_place_float_force
+\installfloatmethod \s!pagecolumn \v!left \page_one_place_float_left
+\installfloatmethod \s!pagecolumn \v!right \page_one_place_float_right
+\installfloatmethod \s!pagecolumn \v!text \page_one_place_float_text
+\installfloatmethod \s!pagecolumn \v!top \page_one_place_float_top
+\installfloatmethod \s!pagecolumn \v!bottom \page_one_place_float_bottom
+\installfloatmethod \s!pagecolumn \v!auto \page_one_place_float_auto
+\installfloatmethod \s!pagecolumn \v!margin \page_one_place_float_margin
+\installfloatmethod \s!pagecolumn \v!opposite \page_one_place_float_face
+\installfloatmethod \s!pagecolumn \v!page \page_one_place_float_page
+\installfloatmethod \s!pagecolumn \v!leftpage \page_one_place_float_leftpage
+\installfloatmethod \s!pagecolumn \v!rightpage \page_one_place_float_rightpage
+\installfloatmethod \s!pagecolumn \v!inmargin \page_one_place_float_inmargin
+\installfloatmethod \s!pagecolumn \v!inleft \page_one_place_float_leftmargin
+\installfloatmethod \s!pagecolumn \v!inright \page_one_place_float_rightmargin
+\installfloatmethod \s!pagecolumn \v!leftmargin \page_one_place_float_leftmargin
+\installfloatmethod \s!pagecolumn \v!rightmargin \page_one_place_float_rightmargin
+\installfloatmethod \s!pagecolumn \v!leftedge \page_one_place_float_leftedge
+\installfloatmethod \s!pagecolumn \v!rightedge \page_one_place_float_rightedge
+\installfloatmethod \s!pagecolumn \v!somewhere \page_one_place_float_somewhere
+\installfloatmethod \s!pagecolumn \v!backspace \page_one_place_float_backspace
+\installfloatmethod \s!pagecolumn \v!cutspace \page_one_place_float_cutspace
+%installfloatmethod \s!pagecolumn \s!tblr \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!lrtb \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!tbrl \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!fxtb \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!rltb \page_one_place_float_top
+%installfloatmethod \s!pagecolumn \s!btlr \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!lrbt \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!btrl \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!rlbt \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!fxbt \page_one_place_float_bottom
+%installfloatmethod \s!pagecolumn \s!fixd \page_one_place_float_force
+
+\installfloatmethod \s!pagecolumn \v!local \somelocalfloat
+
+%D The main interface:
+
+\installcorenamespace{pagecolumns}
+
+\installframedcommandhandler \??pagecolumns {pagecolumns} \??pagecolumns
+
+\setuppagecolumns
+ [\c!distance=1.5\bodyfontsize,
+ \c!n=\plustwo,
+ \c!page=\v!yes,
+ %\c!align=, % inherit (also replaces tolerance)
+ %\c!before=,
+ %\c!after=,
+ %\c!separator=\v!none,
+ %\c!setups=,
+ %\c!balance=\v!no,
+ %\c!blank={\v!line,\v!fixed}, yes or no
+ \c!frame=\v!off,
+ \c!strut=\v!no,
+ \c!offset=\v!overlay,
+ %\c!maxheight=\textheight,
+ \c!maxwidth=\makeupwidth,
+ %\c!grid=\v!tolerant,
+ %\c!internalgrid=\v!line,
+ \c!direction=\v!normal]
+
+\appendtoks % could become an option
+ \frozen\instance\setuevalue{\e!start\currentpagecolumns}{\startpagecolumns[\currentpagecolumns]}%
+ \frozen\instance\setuevalue{\e!stop \currentpagecolumns}{\stoppagecolumns}%
+\to \everydefinepagecolumns
+
+\def\page_col_pickup_preceding
+ {\begingroup
+ \setupoutputroutine[\s!mixedcolumn]%
+ \c_page_mix_routine\c_page_mix_routine_intercept
+ \page_otr_trigger_output_routine
+ \ifvoid\b_page_mix_preceding \else
+ % moved here, before the packaging
+ \page_postprocessors_linenumbers_deepbox\b_page_mix_preceding
+ % we need to avoid unvboxing with successive balanced on one page
+ \global\setbox\b_page_mix_preceding\vbox\bgroup
+ % yes or no: \forcestrutdepth
+ \unvbox\b_page_mix_preceding
+ \forcestrutdepth
+ \egroup
+ \wd\b_page_mix_preceding\makeupwidth
+ \global\d_page_mix_preceding_height\ht\b_page_mix_preceding
+ \fi
+ \endgroup}
+
+\def\page_col_flush_preceding
+ {\ifvoid\b_page_mix_preceding \else
+ % this is just one method but ok for now
+ \begingroup
+ % we might need more but for now this is ok
+ \setupfloat[\c!spacebefore=,\c!spaceafter=]%
+ \startplacefigure[\c!location={\v!top,\v!none}]%
+ \box\b_page_mix_preceding
+ \stopplacefigure
+ \endgroup
+ \fi}
+
+\permanent\tolerant\protected\def\startpagecolumns[#1]%
+ {\begingroup
+ \begingroup
+ \doifelseassignment{#1}%
+ {\let\currentpagecolumns\empty
+ \setuppagecolumns[#1]}%
+ {\edef\currentpagecolumns{#1}}%
+ \edef\p_page{\pagecolumnsparameter\c!page}%
+ \ifempty\p_page
+ \setfalse\c_page_col_page
+ \orelse\ifx\p_page\v!no
+ \setfalse\c_page_col_page
+ \else
+ \settrue\c_page_col_page
+ \page[\p_page]%
+ \fi
+ \c_page_col_n_of_columns\pagecolumnsparameter\c!n\relax
+ \ifnum\c_page_col_n_of_columns>\plusone
+ \expandafter\page_col_start_yes
+ \else
+ \expandafter\page_col_start_nop
+ \fi} % public
+
+\aliased\let\stoppagecolumns\relax
+
+\protected\def\page_col_start_yes
+ {\d_page_col_distance \pagecolumnsparameter\c!distance\relax
+ % \d_page_col_max_height \pagecolumnsparameter\c!maxheight
+ \d_page_col_max_width \pagecolumnsparameter\c!maxwidth
+ % \d_page_col_balance_step \pagecolumnsparameter\c!step
+ \c_page_col_current \plusone
+ %
+ \d_page_col_column_width\dimexpr(\d_page_col_max_width-\d_page_col_distance*\numexpr(\c_page_col_n_of_columns-\plusone)\relax)/\c_page_col_n_of_columns\relax
+ %
+ \columnwidth \d_page_col_column_width
+ \columndistance \d_page_col_distance
+ \nofcolumns \c_page_col_n_of_columns
+ \textwidth \columnwidth % kind of redundant
+ %
+ \nopenalties
+ %
+ % \insidecolumnstrue % NO!
+ %
+ \enforced\let\column\page_col_column
+ %
+ \def\page_floats_get_used_hsize{\makeupwidth} % a bit of a hack
+ %
+ \usealignparameter \pagecolumnsparameter
+ \useblankparameter \pagecolumnsparameter
+ % \useprofileparameter\pagecolumnsparameter
+ %
+ \usepagecolumnscolorparameter\c!color
+ %
+ \setupnotes[\c!width=\textwidth]%
+ %
+ \usesetupsparameter\pagecolumnsparameter
+ %
+ % This will become a method but for now it's good enough
+ %
+ \ifconditional\c_page_col_page\else
+ \page_col_pickup_preceding
+ \fi
+ \setupoutputroutine[\s!pagecolumn]%
+ \ifconditional\c_page_col_page\else
+ \page_col_flush_preceding
+ \fi
+ %
+ \setupfloats[\c!ntop=\plusthousand]%
+ % \setupfloats[\c!nbottom=\plusthousand]%
+ %
+ \page_col_command_set_vsize
+ \page_col_command_set_hsize
+ %
+ \enforced\permanent\protected\def\startpagecolumns[##1]{\page_col_start_nop}%
+ %
+ \enforced\let\stoppagecolumns\page_col_stop_yes}
+
+\protected\def\page_col_start_nop
+ {\nofcolumns\c_page_mix_n_of_columns
+ \enforced\let\stoppagecolumns\page_col_stop_nop}
+
+\protected\def\page_col_stop_yes
+ {\column % \page_otr_eject_page
+ \page
+ \endgroup
+ % \setupoutputroutine[\s!singlecolumn]%
+ \page_otr_command_set_vsize
+ \page_otr_command_set_hsize
+ \page
+ \endgroup}
+
+\protected\def\page_col_stop_nop
+ {\page
+ \endgroup
+ \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-plg.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-plg.mkxl
new file mode 100644
index 00000000000..10cc1447bf0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-plg.mkxl
@@ -0,0 +1,213 @@
+%D \module
+%D [ file=page-pls,
+%D version=2003.03.16,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Setup,
+%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 Page Macros / Extra Page Building}
+
+%D This still needs some work, especially the dimensions need to be checked cq.\
+%D optimized. Beware: method has become alternative!
+
+%D This feature has been present for a while but has never been exploited: pluggable
+%D pagebuilders. The next example code demonstrates the application of one such a
+%D plug-in. This variant support \type {page}, \type {leftpage} and \type
+%D {rightpage} definitions where specific areas are placed with the \type
+%D {\pagearea} command.
+%D
+%D \starttyping
+%D \setupheadertexts[the header text]
+%D \setupfootertexts[a pretty long left footer text][something right]
+%D \setupbottomtexts[a not so long bottom text][another right thing]
+%D \setuptexttexts [margin][something marginal][indeed]
+%D
+%D \startpagelayout[leftpage]
+%D \setupTABLE[offset=overlay]
+%D \setupTABLE[c][1][width=\leftmarginwidth]
+%D \setupTABLE[c][2][width=\textwidth]
+%D \setupTABLE[c][3][width=\rightmarginwidth]
+%D \bTABLE
+%D \bTR
+%D \bTD[nx=3,background=color,backgroundcolor=green]
+%D \pagearea[header][text][middle]
+%D \eTD
+%D \eTR
+%D \bTR
+%D \bTD \pagearea[text][margin][left] \eTD
+%D \bTD[nx=2] \pagearea[text] \eTD
+%D \eTR
+%D \bTR
+%D \bTD[nx=3,offset=overlay]
+%D {\bTABLE
+%D \bTR
+%D \bTD \pagearea[footer][text][left] \eTD
+%D \bTD \pagearea[bottom][text][left] \eTD
+%D \eTR
+%D \eTABLE}
+%D \eTD
+%D \eTR
+%D \eTABLE
+%D \stoppagelayout
+%D
+%D \startpagelayout[rightpage]
+%D \setupTABLE[offset=overlay]
+%D \setupTABLE[c][1][width=\leftmarginwidth]
+%D \setupTABLE[c][2][width=\textwidth]
+%D \setupTABLE[c][3][width=\rightmarginwidth]
+%D \bTABLE
+%D \bTR
+%D \bTD[nx=3] \pagearea[header][text][middle] \eTD
+%D \eTR
+%D \bTR
+%D \bTD \pagearea[text][margin][left] \eTD
+%D \bTD[nx=2] \pagearea[text] \eTD
+%D \eTR
+%D \bTR
+%D \bTD[nx=3,offset=overlay]
+%D {\bTABLE
+%D \bTR
+%D \bTD \pagearea[bottom][text][right] \eTD
+%D \bTD \pagearea[footer][text][right] \eTD
+%D \eTR
+%D \eTABLE}
+%D \eTD
+%D \eTR
+%D \eTABLE
+%D \stoppagelayout
+%D
+%D \setupcolors[state=start]
+%D
+%D \setuppagenumbering[alternative=doublesided,location=]
+%D
+%D \setuplayout[alternative=makeup]
+%D
+%D \definetextbackground
+%D [test]
+%D [state=start,
+%D background=color,
+%D backgroundcolor=yellow]
+%D
+%D \starttext
+%D
+%D \dorecurse{10}{\input tufte \par}
+%D
+%D \input tufte \starttest \input tufte \stoptest \input tufte
+%D
+%D \starttabulate
+%D \NC test \NC \starttest \input tufte \stoptest \NC \NR
+%D \stoptabulate
+%D
+%D \dorecurse{10}{\input tufte \par}
+%D
+%D \stoptext
+%D \stoptyping
+
+\unprotect
+
+\installcorenamespace{layoutmakeupalternative}
+
+\def\page_boxes_construct_content_makeup#1#2#3% targetbox flusher box
+ {\setbox#1\hbox
+ {\vbox to \textheight
+ {\offinterlineskip
+ \vskip\dimexpr-1\topskip+\strutheight\relax % could be an option
+ \textwidth\makeupwidth
+ \hsize\textwidth
+ \boxmaxdepth\maxdepth
+ \noindent
+ \page_otr_command_package_contents#2#3}}%
+ \wd#1\makeupwidth
+ \ht#1\textheight
+ \dp#1\zeropoint
+ \hsize\paperwidth
+ \vsize\paperheight
+ \setbox#1\vbox{\csname\??layoutmakeupalternative\doifbothsidesoverruled\v!page\v!rightpage\v!leftpage\endcsname}%
+ \wd#1\paperwidth
+ \ht#1\paperheight
+ \dp#1\zeropoint}
+
+\installlayoutalternative\v!makeup{\page_boxes_construct_content_makeup}
+
+\newbox\b_page_area
+
+\permanent\tolerant\protected\def\pagearea[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ \expandafter\gobblethreeoptionals
+ \or
+ \expandafter\page_area_one
+ \or
+ \expandafter\page_area_two
+ \or
+ \expandafter\page_area_three
+ \fi[#1][#2][#3]}
+
+\def\page_area_three[#1][#2][#3]%
+ {\edef\m_page_area_three{#3}%
+ \ifx\m_page_area_three\v!left
+ \let\m_page_area_three\c!lefttext
+ \orelse\ifx\m_page_area_three\v!right
+ \let\m_page_area_three\c!righttext
+ \else
+ \let\m_page_area_three\c!middletext
+ \fi
+ \page_area_indeed{#1}{#2}\m_page_area_three}
+
+\def\page_area_two[#1][#2][#3]%
+ {\edef\m_page_area_three{\doifbothsidesoverruled\c!righttext\c!righttext\c!lefttext}%
+ \page_area_indeed{#1}{#2}\m_page_area_three}
+
+\def\page_area_one[#1][#2][#3]%
+ {\edef\m_page_area_one{#1}
+ \ifx\m_page_area_one\v!text % copy due to trial runs in TABLE
+ \iftrialtypesetting
+ \fakebox\pagebox
+ \else
+ \page_backgrounds_add_to_text\pagebox
+ \page_grids_add_to_box\pagebox
+ \box\pagebox
+ \fi
+ \fi}
+
+\def\page_area_indeed#1#2#3%
+ {\setbox\b_page_area\vbox{\getspecificlayouttext{#1}{#2}{#3}}%
+ \iftrialtypesetting
+ \fakebox\b_page_area
+ \orelse\ifcsname\??layoutbackgrounds#1#2\endcsname
+ \page_area_indeed_yes{#1}{#2}%
+ \else
+ \box\b_page_area
+ \fi}
+
+\def\page_area_indeed_yes#1#2%
+ {% todo: \localbackgroundframed{\??layoutbackgrounds#1#2}{#1:#2}
+ \localframed % todo:
+ [\??layoutbackgrounds#1#2]
+ [\c!width=\wd\b_page_area,
+ \c!height=\ht\b_page_area,
+ \c!offset=\v!overlay]
+ {\box\b_page_area}}
+
+% to be done nicely (proper namespacing)
+
+\setvalue{\??layoutmakeupalternative\v!leftpage }{\csname\??layoutmakeupalternative\v!page\endcsname}
+\setvalue{\??layoutmakeupalternative\v!rightpage}{\csname\??layoutmakeupalternative\v!page\endcsname}
+
+\permanent\protected\def\startpagelayout
+ {\bgroup
+ \catcode\endoflineasciicode\ignorecatcode
+ \page_layouts_start_layout}
+
+\aliased\let\stoppagelayout\relax
+
+\def\page_layouts_start_layout[#1]#2\stoppagelayout
+ {\egroup
+ \setvalue{\??layoutmakeupalternative#1}{#2}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-pst.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-pst.mkxl
new file mode 100644
index 00000000000..026c64d629e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-pst.mkxl
@@ -0,0 +1,112 @@
+%D \module
+%D [ file=page-mis,
+%D version=2008.11.17, % was part of page-flt.tex / 2000.10.20
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Postponing,
+%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 Page Macros / Postponing}
+
+\registerctxluafile{page-pst}{}
+
+\unprotect
+
+% postponing
+
+\newevery\everytopofpage\relax
+
+\appendtoks
+ \the\everytopofpage
+\to \everystarttext
+
+\appendtoks
+ \global\everytopofpage\emptytoks
+\to \everystoptext
+
+% \startpostponing [pagenumber] [+pageoffset]
+%
+% \startpostponing[2]
+% PAGE 2 \blank
+% \stoppostponing
+%
+% \startpostponing[+1]
+% PAGE +1 \blank
+% \stoppostponing
+%
+% \startpostponing[+2]
+% PAGE +2 \blank
+% \stoppostponing
+%
+% \starttext \dorecurse{4}{\input tufte \page} \stoptext
+
+%D There is no real need to use \LUA\ here but the bookkeeping is somewhat easier
+%D and we also can erase buffers easier when we keep a local cache, especially as we
+%D can flush per page.
+
+\newcount \c_page_postponed_blocks_next_page % set at the lua end
+\newconditional\c_page_postponed_busy
+
+\mutable\let\currentpostponedpage\empty
+
+\permanent\protected\setvalue{\e!start\v!postponing}%
+ {\bgroup
+ \obeylines
+ \doifelsenextoptional{\egroup\page_postponed_blocks_start}{\egroup\page_postponed_blocks_start[0]}}
+
+\permanent\protected\setvalue{\e!stop\v!postponing}%
+ {\clf_registerpostponedblock{\currentpostponedpage}\relax}
+
+\def\page_postponed_blocks_start[#1]%
+ {\edef\currentpostponedpage{#1}%
+ \grabbufferdatadirect{postponedblock}{\e!start\v!postponing}{\e!stop\v!postponing}}
+
+%D Officially we should flush again after a flush as there can be new future pages
+%D but that will be looked into when we run into it.
+
+\c_page_postponed_mode\plusone
+
+\protected\def\page_postponed_blocks_flush_indeed
+ {\begingroup
+ \setsystemmode\v!postponing
+ \settrue\c_page_postponed_busy
+ \ifnum\c_page_postponed_mode=\plusone
+ \savepagecontent
+ \fi
+ \pagetotal\zeropoint % here? still needed? (was after flush pagefloats)
+ \the\everytopofpage\relax
+ %\flushrestfloats
+ \page_floats_flush_page_floats
+ \setnormalcatcodes % postponing in verbatim
+ \uncatcodespacetokens % postponing in startlines
+ \restoreglobalbodyfont % otherwise problems inside split verbatim
+ \clf_flushpostponedblocks
+ % page {123}
+ \relax
+ \page_otr_command_flush_floats % new but potential dangerous, maybe we need a classification
+ \ifnum\c_page_postponed_mode=\plusone
+ \flushpagecontent
+ \fi
+ \endgroup} % of blocks: with and without flush
+
+\protected\def\page_postponed_blocks_flush
+ {\ifconditional\c_page_postponed_busy
+ % probably a nested flush
+ \orelse\ifnum\c_page_postponed_blocks_next_page=\zerocount
+ % nothing in cache
+ \orelse\ifnum\c_page_postponed_blocks_next_page<\zerocount
+ % generic cache
+ \page_postponed_blocks_flush_indeed
+ \orelse\ifnum\c_page_postponed_blocks_next_page>\realpageno
+ % future content
+ \else
+ % pending content
+ \page_postponed_blocks_flush_indeed
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-sel.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-sel.mklx
new file mode 100644
index 00000000000..1ec1b40e3df
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-sel.mklx
@@ -0,0 +1,420 @@
+%D \module
+%D [ file=page-sel, % moved from page-imp
+%D version=1998.01.15,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Selection,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This code relates to old texexec features and one can wonder if it needs
+%D to be in the core. So, this could become runtime loaded code. Some of
+%D the alternatives need checking.
+
+\writestatus{loading}{ConTeXt Page Macros / Page Selection}
+
+\unprotect
+
+%D One can (mis)use this mechanism to (re)arrange pages of already produced files.
+%D
+%D \starttyping
+%D \insertpages[file.pdf][1,3][n=30,width=18cm]
+%D \stoptyping
+%D
+%D The pages are inserted in the text area, and even pages are repositioned
+%D according to the width. In this example empty pages are added after page 1 and 3.
+%D
+%D Selecting pages can be accomplished by:
+%D
+%D \starttyping
+%D \filterpages[file.pdf][1,3,5][n=30,width=18cm]
+%D \stoptyping
+%D
+%D One may pass \type {odd} or \type {even} instead of a comma separated list. A
+%D third alternative is:
+%D
+%D \starttyping
+%D \copypages[file.pdf][n=30,scale=950]
+%D \stoptyping
+%D
+%D This macros inserts the page, according to the settings provided.
+
+%D Beware: width is not the width of the image, but height can be used to control
+%D its dimensions.
+
+\installcorenamespace{withpages}
+
+\installsetuponlycommandhandler \??withpages {withpages}
+% \installdirectcommandhandler \??withpages {withpages}
+
+\newcount\c_page_selectors_n
+
+\permanent\tolerant\protected\def\insertpages[#filename]#spacer[#emptylist]#spacer[#settings]%
+ {\doifelseassignment{#emptylist}
+ {\page_selectors_insert_indeed[#filename][][#emptylist]}
+ {\page_selectors_insert_indeed[#filename][#emptylist][#settings]}}
+
+\def\page_selectors_insert_indeed[#filename][#emptylist][#settings]%
+ {\bgroup
+ \dontcomplain
+ \getfiguredimensions[#filename]%
+ \setupcurrentwithpages
+ [\c!width=\zeropoint,%
+ \c!n=\noffigurepages,%
+ \c!category=,%
+ #settings]%
+ \global\c_page_selectors_n\directwithpagesparameter\c!n\relax
+ \scratchwidth\directwithpagesparameter\c!width\relax
+ \doifinset0{#emptylist}
+ {\emptyhbox\page}%
+ \dorecurse\c_page_selectors_n
+ {\page_selectors_filter_a_page{#filename}\recurselevel
+ \doifinset\recurselevel{#emptylist}
+ {\emptyhbox\page}}%
+ \egroup}
+
+\let\page_selectors_filter_step_indeed\gobbleoneargument
+\let\page_selectors_filter_step \gobbleoneargument
+
+\permanent\tolerant\protected\def\filterpages[#filename]#spacer[#selection]#spacer[#settings]% % \noffigurepages not yet supported
+ {\bgroup
+ \dontcomplain
+ \getfiguredimensions[#filename]%
+ \setupcurrentwithpages
+ [\c!width=\zeropoint,%
+ \c!n=\noffigurepages,%
+ \c!category=,%
+ #settings]%
+ \global\c_page_selectors_n\directwithpagesparameter\c!n\relax
+ \scratchwidth\directwithpagesparameter\c!width\relax
+ \edef\p_selection{#selection}%
+ \ifx\p_selection\v!even
+ \dorecurse\c_page_selectors_n
+ {\ifodd\recurselevel\else
+ \page_selectors_filter_a_page{#filename}\recurselevel
+ \fi}%
+ \orelse\ifx\p_selection\v!odd
+ \dorecurse\c_page_selectors_n
+ {\ifodd\recurselevel\relax
+ \page_selectors_filter_a_page{#filename}\recurselevel
+ \fi}%
+ \else
+ \def\page_selectors_filter_step_indeed#page%
+ {\ifnum#page>\c_page_selectors_n\else
+ \page_selectors_filter_a_page{#filename}{#page}%
+ \fi}%
+ \def\page_selectors_filter_step#step%
+ {\dowithrange{#step}\page_selectors_filter_step_indeed}%
+ \processcommacommand[\p_selection]\page_selectors_filter_step
+ \fi
+ \egroup}
+
+\def\page_selectors_filter_a_page#filename#page%
+ {\hpack to \textwidth
+ {\ifdim\scratchwidth>\zeropoint
+ \rightorleftpageaction{\scratchwidth\zeropoint}{\hfill}%
+ \fi
+ \setbox\scratchbox\hpack
+ {\hskip-\scratchwidth
+ \edef\p_category{\directwithpagesparameter\c!category}% \useexternalfigure[foo][width=\textwidth]
+ \ifempty\p_category
+ \externalfigure[#filename][\c!page=#page,\c!height=\textheight]%
+ \else
+ \externalfigure[#filename][\p_category][\c!page=#page]%
+ \fi
+ \hss}%
+ \wd\scratchbox\zeropoint
+ \box\scratchbox}
+ \page}
+
+\permanent\tolerant\protected\def\copypages[#filename]#spacer[#settings]#spacer[#figuresettings]%
+ {\bgroup
+ \getfiguredimensions[#filename]%
+ \setupcurrentwithpages
+ [\c!marking=\v!off,%
+ \c!offset=\zeropoint,%
+ \c!n=\noffigurepages,%
+ \c!category=,%
+ #settings]%
+ \global\c_page_selectors_n\directwithpagesparameter\c!n\relax
+ \scratchoffset\directwithpagesparameter\c!offset\relax
+ \dorecurse\c_page_selectors_n
+ {\vbox to \textheight
+ {\hsize\textwidth
+ \centeredbox
+ {\doifelse{\directwithpagesparameter\c!marking}\v!on\cuthbox\hpack % only place where cuthbox is used
+ {\ifdim\scratchoffset>\zeropoint\relax
+ \advance\vsize -2\scratchoffset
+ \advance\hsize -2\scratchoffset
+ \externalfigure[#filename][\c!page=\recurselevel,#figuresettings,\c!scale=,\c!factor=\v!max,\c!offset=\v!overlay]%
+ \else
+ \externalfigure[#filename][\c!page=\recurselevel,#figuresettings,\c!offset=\v!overlay]%
+ \fi}}}
+ \page}%
+ \egroup}
+
+%D \macros
+%D {combinepages}
+%D
+%D Yet another way of postprocessing is handles by \type {\combinepages}. This macro
+%D builds a matrix of pages from a file, for example:
+%D
+%D \starttyping
+%D \setuppapersize
+%D [A4][A4] % or [A4,landscape][A4,landscape]
+%D
+%D \setuplayout
+%D [header=0pt,footer=1cm,
+%D backspace=1cm,topspace=1cm,
+%D width=middle,height=middle]
+%D
+%D \setupfootertexts
+%D [presentation---\currentdate\space---\space\pagenumber]
+%D
+%D \starttext
+%D \combinepages[slides][nx=2,ny=3,frame=on]
+%D \stoptext
+%D \stoptyping
+%D
+%D One can influence the way the pages are combined. (This will be explained some
+%D time.)
+
+\installcorenamespace{combinepagesalternative}
+
+\permanent\tolerant\protected\def\combinepages[#filename]#spacer[#settings]% a=perpag b=free
+ {\bgroup
+ \dontcomplain
+ \getfiguredimensions[#filename]%
+ \setupcurrentwithpages
+ [\c!alternative=\v!a,
+ \c!n=\noffigurepages,\c!nx=\plustwo,\c!ny=\plustwo,
+ \c!start=\plusone,\c!stop=\maxcard,
+ \c!distance=\bodyfontsize,
+ \c!bottom=\vfill,\c!top=\vss,\c!left=\hss,\c!right=\hss,
+ \c!before=\page,\c!after=\page,\c!inbetween=\blank,
+ \c!frame=,\c!background=,\c!backgroundcolor=,
+ \c!name={#filename},
+ \c!category=,
+ #settings]%
+ \global\c_page_selectors_n\directwithpagesparameter\c!n\relax
+ \directwithpagesparameter\c!before
+ \scratchnx\directwithpagesparameter\c!nx
+ \scratchny\directwithpagesparameter\c!ny
+ \scratchdistance\directwithpagesparameter\c!distance\relax
+ \scratchwidth\dimexpr(\textwidth-\scratchnx\scratchdistance+\scratchdistance)/\scratchnx\relax
+ \scratchheight\dimexpr(\textheight-\scratchny\scratchdistance+\scratchdistance)/\scratchny\relax
+ \expandnamespaceparameter\??combinepagesalternative\directwithpagesparameter\c!alternative\v!b
+ \directwithpagesparameter\c!after
+ \egroup}
+
+\setvalue{\??combinepagesalternative\v!a}% use hpacks
+ {\global\combinedpagescounter\directwithpagesparameter\c!start\relax
+ \doloop
+ {\vbox to \textheight
+ {\dorecurse\scratchny
+ {\hbox to \textwidth
+ {\dorecurse\scratchnx
+ {\vbox to \scratchheight
+ {\hsize\scratchwidth
+ \vsize\scratchheight
+ \directwithpagesparameter\c!top
+ \hbox to \hsize
+ {\directwithpagesparameter\c!left
+ \ifnum\combinedpagescounter>\directwithpagesparameter\c!stop\relax
+ \global\c_page_selectors_n\zerocount
+ \orelse\ifnum\combinedpagescounter>\c_page_selectors_n \else
+ \externalfigure
+ [\directwithpagesparameter\c!name]
+ [\c!object=\v!no,
+ \c!page=\number\combinedpagescounter,
+ \c!factor=\v!max,
+ \c!background=\directwithpagesparameter\c!background,
+ \c!backgroundcolor=\directwithpagesparameter\c!backgroundcolor,
+ \c!frame=\directwithpagesparameter\c!frame]%
+ \fi
+ \directwithpagesparameter\c!right}
+ \directwithpagesparameter\c!bottom}%
+ \global\advance\combinedpagescounter\plusone
+ \hfil}%
+ \hfilneg}
+ \vfil}%
+ \vfilneg}%
+ \page
+ \ifnum\combinedpagescounter>\c_page_selectors_n
+ \exitloop
+ \fi}}
+
+\setvalue{\??combinepagesalternative\v!c}%
+ {\global\combinedpagescounter\directwithpagesparameter\c!start\relax
+ \doloop
+ {\vbox to \textheight
+ {\hbox to \textwidth
+ {\dorecurse\scratchnx
+ {\directwithpagesparameter\c!left
+ \vbox to \textheight
+ {\hsize\scratchwidth
+ \dorecurse\scratchny
+ {\directwithpagesparameter\c!top
+ \hbox to \hsize
+ {\vbox to \scratchheight
+ {\hsize\scratchwidth
+ \vsize\scratchheight
+ \ifnum\combinedpagescounter>\directwithpagesparameter\c!stop\relax
+ \global\c_page_selectors_n\zerocount
+ \orunless\ifnum\combinedpagescounter>\c_page_selectors_n
+ \externalfigure
+ [\directwithpagesparameter\c!name]
+ [\c!object=\v!no,
+ \c!page=\number\combinedpagescounter,
+ \c!factor=\v!max,
+ \c!background=\directwithpagesparameter\c!background,
+ \c!backgroundcolor=\directwithpagesparameter\c!backgroundcolor,
+ \c!frame=\directwithpagesparameter\c!frame]%
+ \fi}}
+ \global\advance\combinedpagescounter\plusone
+ \directwithpagesparameter\c!bottom}}%
+ \hfil}%
+ \hfilneg}}%
+ \page
+ \ifnum\combinedpagescounter>\c_page_selectors_n
+ \exitloop
+ \fi}}
+
+\letcsname\??combinepagesalternative\v!horizontal\expandafter\endcsname\csname\??combinepagesalternative\v!a\endcsname
+\letcsname\??combinepagesalternative\v!vertical \expandafter\endcsname\csname\??combinepagesalternative\v!c\endcsname
+
+\setvalue{\??combinepagesalternative\v!b}%
+ {\global\combinedpagescounter\directwithpagesparameter\c!start\relax
+ \doloop
+ {\startbaselinecorrection
+ \hbox to \textwidth
+ {\dorecurse\scratchnx
+ {\global\advance\combinedpagescounter\plusone
+ \ifnum\combinedpagescounter>\c_page_selectors_n \else
+ \normalexpanded{\externalfigure
+ [\directwithpagesparameter\c!name]
+ [\c!page=\number\combinedpagescounter,
+ \c!width=\the\scratchwidth,
+ \c!background=\directwithpagesparameter\c!background,
+ \c!backgroundcolor=\directwithpagesparameter\c!backgroundcolor,
+ \c!frame=\directwithpagesparameter\c!frame]}%
+ \hfill
+ \fi}%
+ \hfillneg}%
+ \stopbaselinecorrection
+ \ifnum\combinedpagescounter<\c_page_selectors_n\relax
+ \directwithpagesparameter\c!inbetween
+ \else
+ \exitloop
+ \fi}}
+
+% This macro cuts a page into n parts that can be pasted together.
+
+\permanent\tolerant\protected\def\slicepages[#filename]#spacer[#oddsettings]#spacer[#evensettings]%
+ {\ifparameter#evensettings\or
+ \page_selectors_slice_indeed[#filename][#oddsettings][#evensettings]%
+ \else
+ \page_selectors_slice_indeed[#filename][#oddsettings][#oddsettings]%
+ \fi}
+
+\mutable\let\slicedpagenumber\!!zerocount
+\mutable\let\slicedpagestepx \!!zerocount
+\mutable\let\slicedpagestepy \!!zerocount
+
+\def\page_selectors_slice_indeed[#filename][#oddsettings][#evensettings]%
+ {\bgroup
+ \dontcomplain
+ \glet\slicedpagenumber\!!zerocount
+ \getfiguredimensions[#filename]%
+ \setupcurrentwithpages
+ [\c!offset=\zeropoint,%
+ \c!hoffset=\zeropoint,%
+ \c!voffset=\zeropoint,
+ \c!width=\figurewidth,%
+ \c!height=\figureheight,%
+ \c!n=\noffigurepages,%
+ \c!category=,%
+ #oddsettings]%
+ \global\c_page_selectors_n\directwithpagesparameter\c!n\relax
+ \ifnum\c_page_selectors_n>\zerocount
+ \definepapersize
+ [\s!dummy][\c!height=\directwithpagesparameter\c!height,\c!width=\directwithpagesparameter\c!width]%
+ \setuppapersize
+ [\s!dummy][\s!dummy]%
+ \setuplayout
+ [\c!backspace=\zeropoint,\c!topspace=\zeropoint,
+ \c!height=\v!middle,\c!width=\v!middle,
+ \c!textdistance=\zeropoint,
+ \c!header=\zeropoint,\c!footer=\zeropoint]%
+ \fi
+ \dorecurse\noffigurepages
+ {\glet\slicedpagenumber\recurselevel
+ \ifnum\c_page_selectors_n>\plusone
+ \dorecurse\c_page_selectors_n
+ {\let\slicedpagestepx\recurselevel
+ \dorecurse\c_page_selectors_n
+ {\let\slicedpagestepy\recurselevel
+ \clip
+ [\c!nx=\c_page_selectors_n,\c!ny=\c_page_selectors_n,\c!x=\slicedpagestepx,\c!y=\slicedpagestepy]
+ {\scale
+ [\c!scale=\number\c_page_selectors_n000]
+ {\externalfigure[#filename][\c!page=\slicedpagenumber]}}%
+ \page}}%
+ \else
+ \ifodd\slicedpagenumber\relax
+ \setupcurrentwithpages[#oddsettings]%
+ \else
+ \setupcurrentwithpages[#evensettings]%
+ \fi
+ \hskip\directwithpagesparameter\c!offset\relax
+ \clip
+ [\c!hoffset=\directwithpagesparameter\c!hoffset,\c!voffset=\directwithpagesparameter\c!voffset,
+ \c!height=\directwithpagesparameter\c!height,\c!width=\directwithpagesparameter\c!width]
+ {\externalfigure[#filename][\c!page=\slicedpagenumber]}%
+ \page
+ \fi}
+ \egroup}
+
+% \starttext \slicepages[slice1.pdf][n=3] \stoptext
+
+\permanent\protected\def\trimpages[#1]% was for a over decade in p-pdf-51.tex
+ {\begingroup
+ \getdummyparameters
+ [\c!file=dummy,
+ \c!hoffset=\zeropoint,
+ \c!voffset=\zeropoint,
+ \c!width=17cm,
+ \c!height=24cm,
+ \c!x=\zeropoint,
+ \c!y=\zeropoint,
+ #1]
+ \getfiguredimensions
+ [\dummyparameter\c!file]
+ [\c!object=\v!no]
+ \dorecurse\noffigurepages
+ {\scale
+ [\c!width=\paperwidth,
+ \c!height=\paperheight]
+ {\offset
+ [\c!x=\dummyparameter\c!x,
+ \c!y=\dummyparameter\c!y]
+ {\clip
+ [\c!hoffset=\dummyparameter\c!hoffset,
+ \c!voffset=\dummyparameter\c!voffset,
+ \c!width=\dummyparameter\c!width,
+ \c!height=\dummyparameter\c!height]
+ {% we correct by default, if not needed, introduce option
+ \setbox\nextbox\hbox
+ {\externalfigure[\dummyparameter\c!file][\c!page=##1]}%
+ \ifdim\wd\nextbox>\ht\nextbox
+ \rotate[\c!rotation=90]{\box\nextbox}%
+ \else
+ \box\nextbox
+ \fi}}}}%
+ \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-sid.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-sid.mkxl
new file mode 100644
index 00000000000..3c1f1f7beea
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-sid.mkxl
@@ -0,0 +1,1019 @@
+%D \module
+%D [ file=page-sid,
+%D version=2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Side Floats,
+%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 Page Macros / Side Floats}
+
+\unprotect
+
+%D These macro deal with side floats. We started with Daniel Comenetz macros as
+%D published in TUGBoat Volume 14 (1993), No.\ 1: Anchored Figures at Either Margin.
+%D I extended and patched the macros to suite our needs which results in a messy
+%D module.
+%D
+%D A complication is that we need to deal with spacing differently before and after
+%D the float. Also, whitespace can interfere as does the prevdepth. There is no real
+%D universal solution. So, by now not much is left of that code, if only because we
+%D need to match \CONTEXT\ spacing module, because we have more placement options
+%D and control and because the math hackery is not suitable for \CONTEXT\ anyway.
+%D
+%D This code had been redone many times because we kept running into spacing issues
+%D and it's not that much fun (or rewarding). It's probably the module that made
+%D me go into distraciton mode most often (like watching amusing Walk of The
+%D Earth, sophisticated Massive Attack video clips, impressive Davie504 movies
+%D and so on).
+
+\newdimen \d_page_sides_margin
+\newdimen \d_page_sides_height % includes the topskip
+\newdimen \d_page_sides_width
+\newdimen \d_page_sides_hsize
+\newdimen \d_page_sides_vsize
+\newdimen \d_page_sides_vsize_reset
+\newdimen \d_page_sides_progress
+\newdimen \d_page_sides_page_total
+
+\newdimen \d_page_sides_leftoffset
+\newdimen \d_page_sides_rightoffset
+
+%newbox \b_page_sides_bottom
+
+\newcount \c_page_sides_lines_done
+\newcount \c_page_sides_checks_done
+\newcount \c_page_sides_n_of_lines
+\newcount \c_page_sides_n_of_hang
+\newconstant \c_page_sides_float_type
+\newcount \c_page_sides_hangafter
+
+\newconditional \c_page_sides_short
+\newconditional \c_page_sides_flag
+
+\newdimen \d_page_sides_shift
+\newdimen \d_page_sides_extrashift
+\newdimen \d_page_sides_leftshift
+\newdimen \d_page_sides_rightshift
+\newdimen \d_page_sides_leftskip
+\newdimen \d_page_sides_rightskip
+\newdimen \d_page_sides_maximum
+\newdimen \d_page_sides_topskip
+\newdimen \d_page_sides_bottomskip
+\newdimen \d_page_sides_midskip
+\newdimen \d_page_sides_downshift
+\newdimen \d_page_sides_pagetotal
+\newdimen \d_page_sides_topoffset
+\newdimen \d_page_sides_bottomoffset
+\newdimen \d_page_sides_toptotal
+\newdimen \d_page_sides_bottomtotal
+
+\newconstant \c_page_sides_align
+\newconstant \c_page_sides_skipmode
+\newconstant \c_page_sides_tolerance
+
+\newconstant \c_page_sides_method % sort of obsolete
+
+\newdimen \d_page_sides_progression
+
+\newcount \c_page_sides_m_of_lines
+\newconditional \c_page_sides_delayed
+
+\newconditional \c_page_sides_check_same_page
+
+\newif \iftracesidefloats % public (might change)
+
+%D Defaults:
+
+\d_page_sides_vsize_reset -\onepoint
+%d_page_sides_vsize_reset \zeropoint % could be an option, needs testing
+
+%D We have some basic (and colorful) tracing:
+
+\def\page_sides_floats_legend
+ {\showmessage\m!floatblocks{16}\empty
+ \glet\page_sides_floats_legend\relax}
+
+\installtextracker{floats.anchoring}
+ {\page_sides_floats_legend
+ \tracesidefloatstrue}
+ {\tracesidefloatsfalse}
+
+%D The horizontal shifts depend on the location: left or right in the text, margin
+%D or edge. These shifts are rather stable and don't interfere with the page flow
+%D as much as the vertical ones do.
+
+\def\page_sides_process_float_backspace {\global\c_page_sides_float_type\plusone \page_sides_handle_float}
+\def\page_sides_process_float_leftedge {\global\c_page_sides_float_type\plustwo \page_sides_handle_float}
+\def\page_sides_process_float_leftmargin {\global\c_page_sides_float_type\plusthree\page_sides_handle_float}
+\def\page_sides_process_float_left {\global\c_page_sides_float_type\plusfour \page_sides_handle_float}
+\def\page_sides_process_float_right {\global\c_page_sides_float_type\plusfive \page_sides_handle_float}
+\def\page_sides_process_float_rightmargin{\global\c_page_sides_float_type\plussix \page_sides_handle_float}
+\def\page_sides_process_float_rightedge {\global\c_page_sides_float_type\plusseven\page_sides_handle_float}
+\def\page_sides_process_float_cutspace {\global\c_page_sides_float_type\pluseight\page_sides_handle_float}
+\def\page_sides_process_float_margin {\global\c_page_sides_float_type\pluseight\page_sides_handle_float}
+
+\def\page_sides_check_horizontal_skips
+ {\ifcase\c_page_sides_skipmode
+ \or % high
+ \or % low
+ \or % fit
+ \global\d_page_sides_margin\zeropoint
+ \fi}
+
+\def\page_sides_apply_horizontal_shift
+ {\ifdim\d_page_sides_maximum>\zeropoint
+ \ifcase\c_page_sides_float_type
+ % invalid
+ \or
+ % backspace
+ \or
+ \global\d_page_sides_shift\dimexpr
+ -\d_page_sides_maximum
+ -\rightorleftpageaction \leftedgedistance \rightedgedistance
+ -\rightorleftpageaction \leftmarginwidth \rightmarginwidth
+ -\rightorleftpageaction \leftmargindistance \rightmargindistance
+ -\compensatedinnermakeupmargin
+ \relax
+ \or
+ \global\d_page_sides_shift\dimexpr
+ -\d_page_sides_maximum
+ -\rightorleftpageaction \leftmargindistance \rightmargindistance
+ -\compensatedinnermakeupmargin
+ \relax
+ \or
+ % left
+ \or
+ % right
+ \or
+ \global\d_page_sides_shift\dimexpr
+ -\d_page_sides_maximum
+ -\rightorleftpageaction \leftmargindistance \rightmargindistance
+ -\compensatedinnermakeupmargin
+ \relax
+ \or
+ \global\d_page_sides_shift\dimexpr
+ -\d_page_sides_maximum
+ -\rightorleftpageaction \leftedgedistance \rightedgedistance
+ -\rightorleftpageaction \leftmarginwidth \rightmarginwidth
+ -\rightorleftpageaction \leftmargindistance \rightmargindistance
+ -\compensatedinnermakeupmargin
+ \relax
+ \or
+ % cutspace
+ \fi
+ \fi
+ \ifdim\d_page_sides_shift=\zeropoint \relax
+ \ifnum\c_page_sides_float_type=\plusfour
+ \global\advance\d_page_sides_shift\d_page_sides_extrashift
+ \global\d_page_sides_extrashift\zeropoint
+ \orelse\ifnum\c_page_sides_float_type=\plusfive
+ \global\advance\d_page_sides_shift\d_page_sides_extrashift
+ \global\d_page_sides_extrashift\zeropoint
+ \fi
+ \else
+ \ifnum\c_page_sides_float_type<\plusfour
+ \global\c_page_sides_float_type\plusfour
+ \orelse\ifnum\c_page_sides_float_type>\plusfive
+ \global\c_page_sides_float_type\plusfive
+ \fi
+ \fi}
+
+\def\page_sides_set_skips
+ {\global\d_page_sides_rightskip\zeropoint
+ \global\d_page_sides_leftskip \zeropoint
+ \ifcase\c_page_sides_float_type
+ \or % backspace
+ \global\d_page_sides_leftskip\dimexpr
+ +\rightorleftpageaction \backspace \cutspace
+ +\compensatedinnermakeupmargin
+ \relax
+ \or % leftedge
+ \global\d_page_sides_leftskip\dimexpr
+ +\rightorleftpageaction \leftmargindistance \rightmargindistance
+ +\rightorleftpageaction \leftmarginwidth \rightmarginwidth
+ +\rightorleftpageaction \leftedgedistance \rightedgedistance
+ +\compensatedinnermakeupmargin
+ \relax
+ \or % leftmargin
+ \global\d_page_sides_leftskip\dimexpr
+ +\rightorleftpageaction \leftmargindistance \rightmargindistance
+ +\compensatedinnermakeupmargin
+ \relax
+ \or % leftside
+ \or % rightside
+ \or % rightmargin
+ \global\d_page_sides_rightskip\dimexpr
+ +\rightorleftpageaction \rightmargindistance \leftmargindistance
+ +\compensatedinnermakeupmargin
+ \relax
+ \or % rightedge
+ \global\d_page_sides_rightskip\dimexpr
+ +\rightorleftpageaction \rightmargindistance \leftmargindistance
+ +\rightorleftpageaction \rightmarginwidth \leftmarginwidth
+ +\rightorleftpageaction \rightedgedistance \leftedgedistance
+ +\compensatedinnermakeupmargin
+ \relax
+ \or % cutspace
+ \global\d_page_sides_rightskip\dimexpr
+ +\rightorleftpageaction \cutspace \backspace
+ +\compensatedinnermakeupmargin
+ \relax
+ \fi
+ \global\d_page_sides_leftoffset \d_page_sides_rightskip
+ \global\d_page_sides_rightoffset\d_page_sides_leftskip
+ \ifdim\d_page_sides_rightskip>\zeropoint
+ \global\advance\d_page_sides_rightskip\rightskip
+ \fi
+ \ifdim\d_page_sides_leftskip >\zeropoint
+ \global\advance\d_page_sides_leftskip \leftskip
+ \fi}
+
+%D Shifts get applied to the float box:
+
+\def\page_sides_relocate_float#1%
+ {\global\setbox\floatbox\hpack
+ {\ifnum\c_page_sides_float_type=\plusfour
+ \kern\d_page_sides_leftshift
+ \orelse\ifnum\c_page_sides_float_type=\plusone
+ \kern\d_page_sides_leftshift
+ \fi
+ \ifnum\c_page_sides_float_type>\plusfour
+ \kern-\d_page_sides_extrashift
+ \else
+ \kern\d_page_sides_shift
+ \fi
+ \vbox{#1\ifnum\c_page_sides_align=\plusfour \removedepth \fi}%
+ \ifnum\c_page_sides_float_type>\plusfour
+ \kern\d_page_sides_shift
+ \else
+ \kern-\d_page_sides_extrashift
+ \fi
+ \ifnum\c_page_sides_float_type=\pluseight
+ \kern\d_page_sides_rightshift
+ \orelse\ifnum\c_page_sides_float_type=\plusfive
+ \kern\d_page_sides_rightshift
+ \fi}}
+
+%D The vertical skips are a nightmare and this mechanism is about as complex
+%D as one can get it.
+
+\def\page_sides_check_vertical_skips
+ {\ifdim\d_page_sides_topskip <\zeropoint\d_page_sides_topskip \zeropoint\fi
+ \ifdim\d_page_sides_bottomskip<\zeropoint\d_page_sides_bottomskip\zeropoint\fi
+ \ifdim\d_page_sides_midskip <\zeropoint\d_page_sides_midskip \zeropoint\fi
+ %
+ \global\d_page_sides_toptotal \dimexpr\d_page_sides_topskip +\d_page_sides_topoffset \relax
+ \global\d_page_sides_bottomtotal\dimexpr\d_page_sides_bottomskip+\d_page_sides_bottomoffset\relax
+ \ifcase\c_page_sides_skipmode
+ \or % high
+ \global\d_page_sides_toptotal \d_page_sides_topoffset
+ \or % low
+ \global\d_page_sides_bottomtotal\d_page_sides_bottomoffset
+ \or % fit
+ \global\d_page_sides_toptotal \d_page_sides_topoffset
+ \global\d_page_sides_bottomtotal\d_page_sides_bottomoffset
+ \fi}
+
+%D These shifts get (selectively) applied with a bit of optional tracing.
+
+\def\page_sides_apply_vertical_shift_normal
+ {\global\setbox\floatbox\hpack % why extra box
+ {\vpack
+ {\forgetall
+ \hsize\wd\floatbox
+ \vskip\privatescratchdimen
+ \offinterlineskip
+ \box\floatbox
+ % somehow we need this \scratchbox magic, but at least it's the same as the
+ % tracer now
+ \setbox\scratchbox\emptybox
+ \wd\scratchbox\hsize
+ \ht\scratchbox\d_page_sides_bottomtotal
+ \box\scratchbox
+ \vskip-\d_page_sides_bottomtotal
+ \ifnum\c_page_sides_align=\plusfive
+ \vskip-\lineheight
+ \fi}}}
+
+\def\page_sides_apply_vertical_shift_traced
+ {\global\setbox\floatbox\hpack % why extra box
+ {\backgroundline[trace:r]{\ruledhpack{\vpack
+ {\forgetall
+ \hsize\wd\floatbox
+ \vskip\privatescratchdimen
+ \offinterlineskip
+ \backgroundline
+ [trace:g]%
+ {\ruledhpack{\box\floatbox}}%
+ \par
+ \blackrule
+ [\c!color=trace:s,%
+ \c!height=\d_page_sides_bottomtotal,%
+ \c!depth=\zeropoint,%
+ \c!width=\hsize]%
+ \vskip-\d_page_sides_bottomtotal
+ \ifnum\c_page_sides_align=\plusfive
+ \vskip-\lineheight
+ \fi}}}}}
+
+\def\page_sides_apply_vertical_shift
+ {\ifnum\c_page_sides_align=\plusfour
+ \getnoflines{\ht\floatbox}%
+ \privatescratchdimen\dimexpr\noflines\lineheight-\strutdp\relax
+ \getrawnoflines\d_page_sides_toptotal
+ \advance\privatescratchdimen\noflines\lineheight
+ \page_sides_force_depth
+ \ht\floatbox\privatescratchdimen
+ \dp\floatbox\zeropoint
+ \fi
+ \ifcase\c_page_sides_align \else
+ \global\d_page_sides_toptotal\zeropoint
+ \fi
+ \privatescratchdimen
+ \ifnum\c_page_sides_float_type<\plusfour
+ \d_page_sides_toptotal
+ \orelse\ifnum\c_page_sides_float_type>\plusfive
+ \d_page_sides_toptotal
+ \else
+ \zeropoint
+ \fi
+ % the top of the box is at the previous baseline
+ \ifcase\c_page_sides_align
+ % 0 normal
+ \advance\privatescratchdimen\strutdp % or \openstrutdepth
+ \or % 1 height
+ \advance\privatescratchdimen\strutdp % or \openstrutdepth
+ \or % 2 line
+ \or % 3 depth
+ \advance\privatescratchdimen\lineheight % or \openlineheight
+ \advance\privatescratchdimen\strutdp % or \openstrutdepth
+ \or % 4 grid
+ \privatescratchdimen\zeropoint
+ \or
+ \advance\privatescratchdimen\strutht % or \openstrutheight
+ \fi
+ % new
+ \global\c_page_sides_lines_done\zerocount
+ \ifnum\c_page_sides_n_of_lines>\zerocount
+ \advance\privatescratchdimen\c_page_sides_n_of_lines\lineheight
+ \fi
+ \iftracesidefloats
+ \page_sides_apply_vertical_shift_traced % uses \privatescratchdimen
+ \else
+ \page_sides_apply_vertical_shift_normal % uses \privatescratchdimen
+ \fi
+ \ifnum\c_page_sides_float_type<\plusfour
+ \global\d_page_sides_toptotal\zeropoint
+ \orelse\ifnum\c_page_sides_float_type>\plusfive
+ \global\d_page_sides_toptotal\zeropoint
+ \fi
+ \global\d_page_sides_downshift\zeropoint}
+
+%D We have a few virtual dimensions. I'm not sure what to do with \type
+%D {\pagedepth} and \type {\pageshrink} in the next two. If we ever need
+%D that it will become options.
+
+\permanent\def\d_page_sides_flush_criterium
+ {\dimexpr
+ \d_page_sides_vsize
+ -\d_page_sides_bottomtotal
+ -\pagetotal
+ \relax}
+
+\permanent\def\d_page_sides_room_criterium
+ {\dimexpr
+ \d_page_sides_vsize
+ -\d_page_sides_bottomtotal % added here too
+ -\pagetotal
+ \relax}
+
+%D In order to get a consistent spacing we force a strutdepth unless the
+%D preceding material has more depth than that already. This way anchoring
+%D becomes predictable.
+
+\protected\def\page_sides_force_depth
+ {\iftracesidefloats
+ \begingroup
+ \c_page_force_strut_depth_trace_mode\plusone
+ \ifconditional\c_page_sides_check_same_page
+ \forcestrutdepthplus
+ \else
+ \forcestrutdepth
+ \fi
+ \endgroup
+ \else
+ \ifconditional\c_page_sides_check_same_page
+ \forcestrutdepthplus
+ \else
+ \forcestrutdepth
+ \fi
+ \fi
+ \page_otr_command_set_vsize} % new
+
+\def\page_sides_flush_floats
+ {\par
+ \ifdim\d_page_sides_flush_criterium>\zeropoint
+ \page_sides_flush_floats_progress
+ \page_sides_flush_floats_after_next
+ \fi
+ \page_sides_flush_floats_reset}
+
+\def\page_sides_flush_floats_text
+ {\par
+ % what with \c_anch_backgrounds_text_level>\plusone
+ \ifdim\d_page_sides_flush_criterium>\zeropoint
+ \page_sides_flush_floats_progress
+ \page_sides_flush_floats_after_none
+ \fi
+ \page_sides_flush_floats_reset}
+
+\def\page_sides_flush_floats_reset
+ {\global\d_page_sides_vsize\d_page_sides_vsize_reset
+ % also here if used at all \global\holdinginserts\zerocount
+ \global\setfalse\c_page_sides_short
+ \global\setfalse\c_page_sides_flag
+ \global\c_page_sides_checks_done\zerocount}
+
+\def\page_sides_flush_floats_after_none % we force a flush
+ {\ifdim\d_page_sides_midskip>\zeropoint
+ \blank[\the\d_page_sides_midskip]
+ \fi
+ \ignoreparskip
+ \blank[\v!disable]}
+
+\def\page_sides_flush_floats_after_next % we have two successive ones
+ {\ifdim\d_page_sides_bottomskip>\zeropoint
+ \blank[\the\d_page_sides_bottomskip]
+ \fi
+ \ignoreparskip
+ \blank[\v!disable]}
+
+%D A rudimentary checker:
+
+\permanent\protected\def\doifelsesidefloat
+ {\par
+ \ifdim\d_page_sides_room_criterium>\zeropoint % -\pagedepth
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifsidefloatelse\doifelsesidefloat
+
+%D Sometimes we need to fill up the space alongside a side float and this
+%D is where we define the helpers. A user can enforce a smaller step. We use
+%D large steps when possible.
+
+\installcorenamespace{sidefloatsteps}
+
+\setvalue{\??sidefloatsteps\v!line }{\strut}
+\setvalue{\??sidefloatsteps\v!big }{\strut}
+\setvalue{\??sidefloatsteps\v!medium}{\halflinestrut} % was \halfstrut
+\setvalue{\??sidefloatsteps\v!small }{\noheightstrut} % was \quarterstrut
+
+\def\page_sides_flush_floats_tracer
+ {\dontleavehmode
+ \ruledhpack\bgroup\backgroundline[trace:b]{%
+ \llap{\smash{\vrule\s!width4\points\s!height.4\points\s!depth.4\points}}%
+ \ifnum\recurselevel=\plusone
+ \llap{\smash{\smallinfofont\the\scratchdimen}\hskip.5\leftmargindistance}%
+ \orelse\ifodd\recurselevel
+ \llap{\smash{\smallinfofont\recurselevel}\hskip.5\leftmargindistance}%
+ \fi
+ \page_sides_flush_floats_normal
+ \kern\hsize
+ \egroup}}
+
+\def\page_sides_flush_floats_normal
+ {\ifdim\scratchdimen>\htdp\strutbox
+ \strut
+ \else
+ \m_pages_strut
+ \fi}
+
+\def\page_sides_flush_floats_progress
+ {\begingroup
+ \page_sides_force_depth
+ \parskip\zeropoint
+ \let\page_sides_flush_floats\relax
+ \edef\m_pages_strut
+ {\ifcsname\??sidefloatsteps\rootfloatparameter\c!step\endcsname
+ \lastnamedcs
+ \else
+ \noheightstrut
+ \fi}%
+ \forgetall
+ \offinterlineskip
+ \doloop
+ {\scratchdimen\d_page_sides_flush_criterium
+ \ifdim\scratchdimen>\onepoint % good enough, can become configurable
+ \ifnum\recurselevel>\plushundred % safeguard, sort of deadcycles
+ \exitloop
+ \orelse\iftracesidefloats
+ \page_sides_flush_floats_tracer\par
+ \else
+ \page_sides_flush_floats_normal\par
+ \fi
+ \else
+ \page_sides_force_depth
+ \exitloop
+ \fi}%
+ \endgroup}
+
+%D We force a parskip and ignore it afterwards. We can nil it by setting the
+%D \type {spacebeforeside} parameter. We can have a leading blank so we need
+%D to make sure that we use blank to inject the parskip and then ignore
+%D the one injected by the engine.
+
+\def\page_sides_inject_before
+ {\page_sides_force_depth
+ \ifdim\parskip>\zeropoint
+ \ifdim\parskip>\d_strc_floats_top
+ \ifdim\d_strc_floats_top>\zeropoint
+ \ignoreparskip
+ \blank[\v!white]%
+ \else
+ \checkedblank[\rootfloatparameter\c!spacebeforeside]%
+ \fi
+ \else
+ \checkedblank[\rootfloatparameter\c!spacebeforeside]%
+ \fi
+ \else
+ \checkedblank[\rootfloatparameter\c!spacebeforeside]%
+ \fi}
+
+%D We are now done with \type {spacebefore} and the parskip is already
+%D injected. The dummy line makes sure that we anchor properly and it
+%D also can serve as tracer.
+
+\def\page_sides_inject_dummy_line_normal
+ {\hpack to \availablehsize{\strut\hss}}
+
+\def\page_sides_inject_dummy_line_traced
+ {\ruledhpack to \availablehsize{\backgroundline[trace:c]{\page_sides_inject_dummy_line_normal}}}
+
+\def\page_sides_inject_dummy_lines
+ {\par
+ \nointerlineskip
+ % \ifnum\lastpenalty>\zerocount
+ % \penalty\plustenthousand
+ % \fi
+ \dontleavehmode
+ \iftracesidefloats
+ \page_sides_inject_dummy_line_traced
+ \else
+ \page_sides_inject_dummy_line_normal
+ \fi
+ \par
+ % on an empty page we have topskip, say 12pt
+ \ignoreparskip
+ % this can be 18.5pt
+ \kern-\dimexpr\lineheight+\strutdp\relax
+ % so we can actually have a -2.5pt skip on top
+ \ignoreparskip
+ \blank[\v!samepage]
+ \blank[\v!disable]
+ % now say we are negative now
+ \ifdim\pagetotal<\zeropoint
+ % then we're at the top of the page ... quite messy .. i really need to
+ % make the page builder a bit more flexible .. should we do something now?
+ \fi}
+
+%D Checkers:
+
+\def\page_sides_check_floats_after_par
+ {\page_sides_check_floats_indeed
+ \ifdim\d_page_sides_pagetotal=\pagetotal \else
+ \glet\page_sides_check_floats\page_sides_check_floats_indeed
+ \page_sides_flush_floats
+ \global\c_page_sides_n_of_lines\zerocount % here !
+ \fi}
+
+\protected\def\page_sides_flush_floats_after_par
+ {\global\d_page_sides_pagetotal\pagetotal
+ \glet\page_sides_check_floats\page_sides_check_floats_after_par}
+
+\protected\def\page_sides_forget_floats
+ {\global\d_page_sides_vsize\d_page_sides_vsize_reset
+ \global\c_page_sides_n_of_lines\zerocount
+ % also here if used at all \global\holdinginserts\zerocount
+ \global\setfalse\c_page_sides_short
+ \global\setfalse\c_page_sides_flag}
+
+%D Here comes the output routine. We either go the fast route or we use the
+%D normal one (stored in \type {\page_otr_command_side_float_output}. We no
+%D longer have this fuzzy code around with penalties and indentation and
+%D such.
+
+\def\page_sides_output_routine
+ {\page_otr_command_side_float_output
+ \ifconditional\c_page_sides_short
+ \global\setfalse\c_page_sides_short
+ \else
+ \global\d_page_sides_vsize\d_page_sides_vsize_reset
+ \global\c_page_sides_n_of_lines\zerocount
+ \fi}
+
+\def\page_sides_place_float
+ {\ifnum\c_page_sides_float_type=\plusfour \kern\d_page_sides_toptotal \fi
+ \ifnum\c_page_sides_float_type=\plusfive \kern\d_page_sides_toptotal \fi
+ \ifgridsnapping
+ \page_sides_place_float_grid
+ \else
+ \page_sides_place_float_normal
+ \fi
+ \par
+ \kern-\d_page_sides_height
+ \penalty10001 % oeps, this will change
+ \normalbaselines}
+
+\def\page_sides_place_float_normal
+ {\page_sides_push_float_inline\firstofoneargument}
+
+%D The following needs some more work .. consider this a quick hack. We probably
+%D need an mkiv hanging grid option.
+
+\def\page_sides_place_snap_to_grid#1%
+ {\edef\p_grid{\floatparameter\c!grid}%
+ \ifempty\p_grid\else
+ \snaptogrid[\p_grid]%
+ \fi
+ \hpack{#1}}
+
+\def\page_sides_place_float_grid
+ {\getrawnoflines\d_page_sides_height % raw ?
+ \d_page_sides_height\noflines\lineheight
+ \page_sides_push_float_inline\page_sides_place_snap_to_grid}
+
+\let\strc_floats_mark_par_as_free\relax
+
+\def\page_sides_push_float_inline#1%
+ {\begingroup
+ \reseteverypar % needed !
+ \parskip\zeropoint % needed !
+ \nointerlineskip
+ \page_sides_set_skips
+ \page_floats_report_total
+ \relax
+ \lefttoright
+ \strc_floats_mark_par_as_free
+ \ifcase\c_page_sides_float_type
+ % invalid
+ \or % backspace
+ \noindent#1{\llap{\rlap{\box\floatbox}\kern\d_page_sides_leftskip}}\hfill
+ \or % leftedge
+ \noindent#1{\llap{\box\floatbox\kern\d_page_sides_leftskip}}\hfill
+ \or % leftmargin
+ \noindent#1{\llap{\box\floatbox\kern\d_page_sides_leftskip}}\hfill
+ \or % leftside
+ \noindent#1{\box\floatbox}\hfill
+ \or % rightside
+ \hfill#1{\box\floatbox}%
+ \or % rightmargin
+ \hfill#1{\rlap{\kern\d_page_sides_rightskip\box\floatbox}}%
+ \or % rightedge
+ \hfill#1{\rlap{\kern\d_page_sides_rightskip\box\floatbox}}%
+ \or % cutspace
+ \hfill#1{\rlap{\kern\d_page_sides_rightskip\llap{\box\floatbox}}}%
+ \fi
+ \endgroup}
+
+% \def\page_sides_analyse_progress
+% {\d_page_sides_progress\d_page_sides_vsize
+% \ifconditional\c_page_sides_flag
+% \advance\d_page_sides_progress-\d_page_sides_page_total
+% \global\setfalse\c_page_sides_flag
+% \else
+% \advance\d_page_sides_progress-\pagetotal
+% \fi}
+
+% test case
+%
+% \usemodule[art-01]
+% \starttext
+% \dorecurse{40}{\line{#1}}
+% \placefigure[left]{}{}
+% \input ward
+% \startitemize
+% \item word \item word \item word \item word
+% \stopitemize
+% \input ward
+% \page
+% \stoptext
+
+\def\page_sides_analyse_progress
+ {%\page_otr_command_set_vsize % this is new, otherwise topfloats are not taken into account
+ \d_page_sides_progress\d_page_sides_vsize
+ \ifconditional\c_page_sides_flag
+ \advance\d_page_sides_progress-\d_page_sides_page_total
+ \global\setfalse\c_page_sides_flag
+ \else
+ \ifdim\dimexpr\d_page_sides_progress+\d_page_sides_bottomtotal\relax>\pagegoal
+ % we adapt pagegoal because we can already have placed something with
+ % everypar and we hope that it triggers a flush, see test above
+ \pagegoal\dimexpr\pagegoal-\d_page_sides_bottomtotal\relax
+ \fi
+ \advance\d_page_sides_progress-\pagetotal
+ \fi}
+
+\def\page_sides_analyse_space_stage_one
+ {\global\settrue\c_page_sides_flag
+% \ifdim\pagegoal=\maxdimen
+% \pagegoal\textheight % maybe
+% \fi
+ \global\d_page_sides_page_total \pagetotal % global
+ \ifnum\c_page_sides_float_type<\plusfour
+ \global\d_page_sides_width \zeropoint
+ \orelse\ifnum\c_page_sides_float_type>\plusfive
+ \global\d_page_sides_width\zeropoint
+ \else
+ \global\d_page_sides_width\dimexpr\wd\floatbox+\d_page_sides_margin\relax
+ \fi
+ \ifdim\d_page_sides_width<\zeropoint
+ \global\d_page_sides_width\zeropoint
+ \fi
+ \global\d_page_sides_hsize \dimexpr\hsize-\d_page_sides_width\relax
+ \global\d_page_sides_height\dimexpr\ht\floatbox+\dp\floatbox+\d_page_sides_toptotal\relax
+ \global\d_page_sides_vsize \dimexpr\d_page_sides_height+\d_page_sides_page_total\relax
+ \scratchdimenone\d_page_sides_vsize
+ \scratchdimentwo\pagegoal
+ \ifcase\c_page_sides_tolerance
+ \ifcase\c_page_sides_method
+ % method 0 : raw
+ \or
+ % method 1 : safe (default)
+ \advance\scratchdimentwo -\strutdp
+ \or
+ % method 2 : tight (grid default)
+ \advance\scratchdimenone -\onepoint
+ \fi
+ \or
+ % tolerant
+ \advance\scratchdimentwo -.5\strutdp
+ \or
+ % verytolerant
+ % \advance\scratchdimenone -\onepoint (maybe)
+ \else
+ \advance\scratchdimentwo -\strutdp
+ \fi}
+
+\def\page_sides_analyse_space_stage_two
+ {% how about \pagedepth
+ \ifdim\scratchdimenone>\scratchdimentwo
+ \global\setfalse\c_page_floats_room
+ \else
+ \ifdim\dimexpr\pagegoal-\d_page_sides_vsize\relax<\d_page_sides_bottomtotal
+ % just weird: \global\advance\d_page_sides_vsize \scratchdimenone
+ \global\settrue\c_page_sides_short
+ % why was this \global\holdinginserts\plusone
+ \else
+ \global\advance\d_page_sides_vsize \d_page_sides_bottomtotal % wins over inbetween
+ \global\setfalse\c_page_sides_short
+ \fi
+ \global\settrue\c_page_floats_room
+ \fi}
+
+\def\page_sides_analyse_space
+ {\page_sides_analyse_space_stage_one
+ \ifconditional\c_page_sides_check_same_page
+ \ifdim\d_spac_prevcontent>\zeropoint
+ \ifdim\dimexpr\scratchdimenone+\d_spac_prevcontent>\scratchdimentwo
+ \clf_pushatsame
+ \setbox\scratchbox\vpack{\clf_popatsame}%
+ \page
+ \box\scratchbox
+ \vskip-\lineskip
+ \page_sides_analyse_space_stage_one
+ \fi
+ \fi
+ \fi
+ \page_sides_analyse_space_stage_two}
+
+%D As we have no clear end of one or more paragraphs we only have pre float
+%D skips.
+
+\newconstant\c_page_sides_page_method % will be: \c_page_sides_page_method\plusone
+
+\def\page_otr_force_new_page_one
+ {\vskip\d_page_sides_height
+ \penalty\outputpenalty
+ \vskip-\dimexpr\d_page_sides_height-\strutdp\relax
+ \prevdepth\strutdp}
+ %\ignoreparskip}
+
+\def\page_sides_handle_float#1%
+ {\page_sides_initialize_checker
+ \page_sides_check_horizontal_skips
+ \page_sides_check_vertical_skips
+ \page_sides_apply_horizontal_shift
+ \page_sides_check_previous_float
+ \page_sides_inject_before
+ \page_sides_inject_dummy_lines
+ \page_sides_relocate_float{#1}%
+ \page_sides_apply_vertical_shift
+ \page_sides_analyse_space
+ \ifconditional\c_page_floats_room
+ \global\setfalse\c_page_sides_delayed
+ % we're ok
+ \else
+ \global\settrue\c_page_sides_delayed
+ \global\c_page_sides_m_of_lines\c_page_sides_n_of_lines
+ \ifcase\c_page_sides_page_method
+ \page_otr_fill_and_eject_page
+ \or
+ \page_otr_force_new_page_one
+ \else
+ \page_otr_fill_and_eject_page
+ \fi
+ \global\c_page_sides_n_of_lines\c_page_sides_m_of_lines
+ \page_sides_analyse_space
+ %\page_sides_inject_before
+ \page_sides_inject_dummy_lines
+ \fi
+ \page_sides_place_float
+ \global\setfalse\c_page_sides_delayed
+ \page_sides_check_floats_reset
+ \page_sides_wrapup}
+
+\def\page_sides_wrapup
+ {% we need to do this aftergroup
+ \aftergroup\par
+ \aftergroup\ignoreparskip
+ \aftergroup\ignorespaces}
+
+\def\page_sides_check_floats_indeed
+ {\page_sides_analyse_progress
+ \ifdim\d_page_sides_progress>\zeropoint
+ \page_sides_check_floats_set
+ \else
+ \page_sides_check_floats_reset
+ \fi
+ \parskip\s_spac_whitespace_parskip} % not needed
+
+% \let\page_sides_check_floats\page_sides_check_floats_indeed
+
+\let\page_sides_check_floats\relax
+
+\def\page_sides_initialize_checker
+ {\ifrelax\page_sides_check_floats
+ \glet\page_sides_check_floats\page_sides_check_floats_indeed
+ \clf_enablesidefloatchecker
+ \glet\page_sides_initialize_checker\relax
+ \fi}
+
+\protected\def\page_sides_check_floats_tracer
+ {\begingroup
+ \dontleavehmode
+ \ifnum\c_page_sides_float_type>\plusfour
+ \rlap
+ {\hskip\availablehsize % d_page_sides_width % kern
+ \color[trace:o]%
+ {\rlap{\kern.25\bodyfontsize\showstruts\strut}%
+ \vrule\s!height.5\points\s!depth.5\points\s!width\d_page_sides_width}}%
+ \else
+ \hskip-\d_page_sides_width % kern
+ \color[trace:o]%
+ {\vrule\s!height.5\points\s!depth.5\points\s!width\d_page_sides_width
+ \llap{\showstruts\strut\kern.25\bodyfontsize}}%
+ \fi
+ \endgroup}
+
+% tricky test:
+
+% \starttext
+% \dorecurse{33}{\line{#1}}
+% \placefigure[left]{}{}
+% \input ward
+% \startitemize
+% \item word \item word \item word \item word
+% \stopitemize
+% \input ward
+% \page
+% \placefigure[left]{}{}
+% \dontleavehmode \begingroup \input ward \par \endgroup
+% \dontleavehmode \begingroup \input ward \par \endgroup
+% \dontleavehmode \begingroup \input ward \par \endgroup
+% \input ward
+% \stoptext
+
+\protected\def\page_sides_check_floats_set
+ {\edef\p_sidethreshold{\floatparameter\c!sidethreshold}%
+ \ifconditional\c_page_sides_delayed
+ % For Alan's hanging right float that moved to the next page.
+ \d_page_sides_progress\zeropoint
+ \fi
+ \ifx\p_sidethreshold\v!old
+ \d_page_sides_progression\dimexpr\d_page_sides_progress+\strutht-\roundingeps\relax
+ \c_page_sides_n_of_hang\d_page_sides_progression
+ \divide\c_page_sides_n_of_hang \baselineskip\relax
+ \else
+ \d_page_sides_progression
+ \ifempty\p_sidethreshold
+ \d_page_sides_progress
+ \else
+ \dimexpr\d_page_sides_progress-\p_sidethreshold\relax
+ \fi
+ \getnoflines\d_page_sides_progression
+ % this can be an option
+ \ifdim\dimexpr\noflines\lineheight>\dimexpr\pagegoal-\pagetotal\relax
+ \getrawnoflines\d_page_sides_progression
+ \fi
+ %
+ \c_page_sides_n_of_hang\noflines
+ \fi
+ \global\c_page_sides_hangafter\zerocount
+ \ifnum\c_page_sides_n_of_hang>\zerocount
+ \ifcase\c_page_sides_n_of_lines
+ \else
+ \ifcase\c_page_sides_lines_done
+ \global\c_page_sides_lines_done\c_page_sides_n_of_hang
+ \else
+ \privatescratchcounter\c_page_sides_lines_done
+ \advance\privatescratchcounter-\c_page_sides_n_of_hang
+ \global\advance\c_page_sides_n_of_lines-\privatescratchcounter
+ \fi
+ \fi
+ \ifnum\c_page_sides_n_of_lines>\zerocount
+ \privatescratchtoks\emptytoks
+ \privatescratchcounter\c_page_sides_n_of_lines
+ \privatescratchdimen\dimexpr\hsize-\d_page_sides_width\relax
+ \dorecurse\c_page_sides_n_of_lines
+ {\toksapp\privatescratchtoks{\zeropoint\hsize}}%
+ \ifnum\c_page_sides_n_of_hang>\c_page_sides_n_of_lines
+ \advance\c_page_sides_n_of_hang -\c_page_sides_n_of_lines\relax
+ \advance\privatescratchcounter\c_page_sides_n_of_hang
+ \dorecurse\c_page_sides_n_of_hang % weird, shouldn't that be scratchcounter
+ {\ifnum\c_page_sides_float_type>\plusfour
+ \toksapp\privatescratchtoks{\zeropoint\privatescratchdimen}%
+ \else
+ \toksapp\privatescratchtoks{\d_page_sides_width\privatescratchdimen}%
+ \fi}%
+ \fi
+ \parshape
+ \numexpr\privatescratchcounter+\plusone\relax
+ \the\privatescratchtoks
+ \zeropoint \hsize
+ \relax
+ \else
+ \hangindent \ifnum\c_page_sides_float_type>\plusfour -\fi\d_page_sides_width
+ \hangafter-\c_page_sides_n_of_hang
+ \global\c_page_sides_hangafter\hangafter
+ \fi
+ \fi
+ \global\advance\c_page_sides_checks_done \plusone
+ \iftracesidefloats
+ \page_sides_check_floats_tracer
+ \fi}
+
+\protected\def\page_sides_check_floats_reset
+ {\ifcase\c_page_sides_checks_done\else
+ \ifcase\c_page_sides_hangafter\else
+ % we need to deal with par's ending in a group which would restore
+ % hang parameters
+ \global\c_page_sides_hangafter\zerocount
+ \hangindent\zeropoint
+ \fi
+ % \global % no, otherwise a next hangindent won't work
+ \c_page_sides_checks_done\zerocount
+ \fi}
+
+\protected\def\page_sides_synchronize_floats
+ {\ifinner \else
+ \page_sides_check_floats
+ \fi}
+
+\protected\def\page_sides_check_previous_float
+ {\page_sides_analyse_progress
+ \ifdim\d_page_sides_progress>\zeropoint \relax
+ \ifconditional\c_page_sides_short
+ \global\setfalse\c_page_sides_short
+ \page_otr_fill_and_eject_page
+ \else
+ \kern\d_page_sides_progress
+ \fi
+ \fi}
+
+% \def\adjustsidefloatdisplaylines % public, will change
+% {\aftergroup\page_sides_adjust_display_lines}
+%
+% \def\page_sides_adjust_display_lines
+% {\par
+% \noindent
+% \ignorespaces}
+
+%D We need to hook it into the other otr's. This code will be adapted once we rename
+%D the callers. We use \type {\def} as they can be redefined! Some will become obsolete
+
+\permanent\protected\def\checksidefloat {\page_sides_check_floats}
+\permanent\protected\def\flushsidefloats {\page_sides_flush_floats_text}
+\permanent\protected\def\flushsidefloatsafterpar{\page_sides_flush_floats_after_par}
+\permanent\protected\def\forgetsidefloats {\page_sides_forget_floats}
+%permanent\protected\def\synchronizesidefloats {\page_sides_synchronize_floats}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-smp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-smp.mkxl
new file mode 100644
index 00000000000..ccb0e989e82
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-smp.mkxl
@@ -0,0 +1,56 @@
+%D \module
+%D [ file=page-smp, % was: core-mul, page-mul
+%D version=1998.03.15,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Simple Multi Column Output,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D The old one:
+
+\definemixedcolumns
+ [\v!columns]
+ % compatible with columns default :
+ [\c!balance=\v!yes,
+ \c!blank={\v!line,\v!fixed}]
+
+\permanent\protected\def\setupcolumns
+ {\setupmixedcolumns[\v!columns]}
+
+%D This will be replaced by mixed box.
+
+\permanent\tolerant\protected\def\startsimplecolumns[#1]%
+ {\bgroup
+ \setsimplecolumnshsize[#1]%
+ \nopenalties
+ \setbox\scratchbox\vbox\bgroup
+ \forgetall} % \blank[\v!disable]
+
+\permanent\protected\def\stopsimplecolumns
+ {\removebottomthings
+ \egroup
+ \rigidcolumnbalance\scratchbox
+ \egroup}
+
+\permanent\protected\def\setsimplecolumnshsize[#1]%
+ {\getdummyparameters
+ [\c!width=\hsize,
+ \c!distance=1.5\bodyfontsize,
+ \c!n=2,
+ \c!lines=0,
+ #1]%
+ \edef\rigidcolumnlines
+ {\directdummyparameter\c!lines}%
+ \setrigidcolumnhsize
+ {\directdummyparameter\c!width}%
+ {\directdummyparameter\c!distance}%
+ {\directdummyparameter\c!n}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-spr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-spr.mkxl
new file mode 100644
index 00000000000..49285c96fef
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-spr.mkxl
@@ -0,0 +1,129 @@
+%D \module
+%D [ file=page-spr,
+%D version=2002.11.11,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Spreading,
+%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 Page Macros / Spreading}
+
+% This module is experimental and not yet official!
+
+\unprotect
+
+\newbox \b_page_spread_content
+\newconditional\c_page_spread_busy
+\newconditional\c_page_spread_once % when true only one flush (writes etc)
+
+\permanent\overloaded\protected\def\normalsettextpagecontent#1#2#3% #2 and #3 will disappear
+ {\setbox#1\hpack
+ {\setlayoutcomponentattribute{\v!page:\v!text}%
+ \vpack \layoutcomponentboxattribute to \textheight
+ {\offinterlineskip
+ \freezetextwidth
+ \hsize\textwidth % local variant of \sethsize
+ \boxmaxdepth\maxdepth
+ \noindent % content can be < \hsize
+ \page_otr_command_package_contents#2#3}}%
+ \dp#1\zeropoint
+ \ifconditional\c_page_spread_busy
+ \normalsettextpagecontent_spread{#1}%
+ \else
+ \normalsettextpagecontent_normal{#1}%
+ \fi}
+
+\def\normalsettextpagecontent_normal#1%
+ {\ifdim\wd#1=\makeupwidth\else
+ \setbox#1\hpack to \makeupwidth
+ {\hss\box#1\hss}% never change the \hss's
+ \fi}
+
+\def\normalsettextpagecontent_spread#1%
+ {\setbox#1\hpack to \makeupwidth
+ {\ifvoid\b_page_spread_content
+ \ifconditional\c_page_spread_once
+ \box#1%
+ \else
+ \global\setbox\b_page_spread_content\box#1%
+ \copy\b_page_spread_content
+ \fi
+ \hss % left page
+ \else
+ \hss % right page
+ \ifarrangingpages
+ % writes don't matter anyway
+ \orelse\ifconditional\c_page_spread_once
+ \global\setbox\b_page_spread_content\emptyhbox
+ \wd\b_page_spread_content\makeupwidth
+ \ht\b_page_spread_content\textheight
+ \else
+ % writes can interfere (todo: write stripper, but how about hyperlinks)
+ \fi
+ \box\b_page_spread_content
+ \fi}}
+
+\protected\def\page_spread_flush
+ {\ifconditional\c_page_spread_busy \ifvoid\b_page_spread_content\else
+ % this page will be discarded later
+ \emptyhbox \page
+ \fi \fi }
+
+\permanent\protected\def\startspread
+ {\unless\ifdoublesided
+ \expandafter\page_spread_start_nop
+ \orelse\ifconditional\c_page_spread_busy
+ \expandafter\page_spread_start_nop
+ \else
+ \expandafter\page_spread_start_yes
+ \fi}
+
+\aliased\let\stopspread\relax
+
+\protected\def\page_spread_start_yes
+ {\bgroup
+ \page[\v!left]%
+ %\setsystemmode{spread}%
+ \settrue\c_page_spread_busy
+ \expanded{\setuplayout[\c!textwidth=\the\dimexpr2\textwidth+2\backspace\relax]}%
+ \enforced\let\stopspread\page_spread_stop_yes}
+
+\permanent\protected\def\page_spread_stop_yes
+ {\kern\zeropoint
+ \page
+ \setuplayout[\c!textwidth=\textwidth]%
+ \page[\v!left]%
+ \egroup}
+
+\protected\def\page_spread_start_nop
+ {\bgroup
+ \let\stopspread\page_spread_stop_nop}
+
+\protected\def\page_spread_stop_nop
+ {\egroup}
+
+\protect \endinput
+
+% texexec --arr --pdf test
+%
+% \setuplayout[width=middle]
+% \setuppapersize[A4][A3,landscape]
+% \setuppagenumbering[alternative=doublesided]
+% \setuparranging[2UP]
+%
+% \starttext
+%
+% \dorecurse{3}{\input tufte }
+%
+% \startspread
+% \dorecurse{10}{\input tufte }
+% \stopspread
+%
+% \dorecurse{3}{\input tufte }
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-str.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-str.mkxl
new file mode 100644
index 00000000000..d6e01ea595c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-str.mkxl
@@ -0,0 +1,128 @@
+%D \module
+%D [ file=page-str,
+%D version=2010.03.13, % 2006.03.21,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Page Streams,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Page Macros / Page Streams}
+
+%D The first version of this component of \CONTEXT\ was written for Thomas Schmitz
+%D who asked for parallel page streams. While playing with the code, I decided to
+%D make it into a component that can be used to construct all kind of stream related
+%D mechanisms. Because I could apply this feature in a project, there is some
+%D additional code here (related to graphics).
+%D
+%D These macros were written while listening to and watching the DVD \quotation
+%D {Rush In Rio}.
+%D
+%D The reimplementation (or rather experimenting with the complete rewrite) was done
+%D while looping over \quotation {Wende Snijders No.9}.
+%D
+%D Remark: marknotes are gone, at least for a while.
+
+\registerctxluafile{page-str}{}
+
+\unprotect
+
+\mutable\let\currentoutputstream\empty
+
+\newif \ifinoutputstream % will become a conditional or mode
+\newtoks \everyenableoutputstream
+
+\appendtoks
+ \page_otr_command_flush_side_floats
+\to \everyenableoutputstream
+
+\permanent\protected\def\initializeoutputstreams
+ {\clf_initializestream
+ \enforced\glet\initializeoutputstreams\relax}
+
+\permanent\protected\def\enableoutputstream[#1]% could be \startoutputsubstream
+ {\initializeoutputstreams
+ \the\everyenableoutputstream
+ \inoutputstreamtrue
+ \xdef\currentoutputstream{#1}%
+ \clf_enablestream{#1}
+ \prevdepth\zeropoint} % maybe more is needed i.e. we need to get rid of leading glue
+
+\permanent\protected\def\disableoutputstream
+ {\inoutputstreamfalse
+ \glet\currentoutputstream\s!default
+ \clf_disablestream}
+
+\permanent\protected\def\startoutputstream[#1]%
+ {\begingroup
+ \initializeoutputstreams
+ \the\everyenableoutputstream
+ \inoutputstreamtrue
+ \xdef\currentoutputstream{#1}%
+ \clf_startstream{#1}}
+
+\permanent\protected\def\stopoutputstream
+ {\clf_stopstream
+ \endgroup}
+
+\permanent\protected\def\startoutputsubstream[#1]% just push/pop instead
+ {\globalpushmacro\currentoutputstream
+ \enableoutputstream[#1]}
+
+\permanent\protected\def\stopoutputsubstream
+ {\globalpopmacro\currentoutputstream
+ \enableoutputstream[\currentoutputstream]}
+
+\permanent \protected\def\flushoutputstream [#1]{\clf_flushstream{#1}}
+\permanent \protected\def\outputstreambox [#1]{\vbox{\clf_flushstream{#1}}}
+\permanent \protected\def\outputstreamcopy [#1]{\vbox{\clf_flushstreamcopy{#1}}}
+\permanent \protected\def\outputstreamunvbox [#1]{\clf_flushstream{#1}}
+\permanent \protected\def\outputstreamunvcopy[#1]{\clf_flushstreamcopy{#1}}
+\permanent \protected\def\synchronizestreams [#1]{\clf_synchronizestream{#1}}
+\permanent\tolerant\protected\def\pushoutputstream [#1]{\clf_pushstream{#1}}
+
+\protect \endinput
+
+% \enabletrackers[streams.flushing]
+%
+% \setuplayout[grid=yes] \showgrid
+%
+% \starttext
+%
+% \input tufte
+%
+% \startoutputstream[nl]
+%
+% Wat doen we hier?
+%
+% \enableoutputstream[en]
+%
+% Are you sleeping, brother John?\footnote{xxx}
+%
+% \dorecurse{4}{x \footnote{note \recurselevel}\input tufte \par \pushoutputstream}
+%
+% \enableoutputstream[de]
+%
+% Bruder Jakob, schläfst du noch?\footnote{yyy}
+%
+% \dorecurse{4}{x \footnote{note \recurselevel}\input ward \par \pushoutputstream}
+%
+% \disableoutputstream
+%
+% \stopoutputstream
+%
+% Vader Jacob, slaap je nog?\footnote{zzz}
+%
+% \input tufte
+%
+% \synchronizestreams[en,de,nl]
+%
+% \page \flushoutputstream[en] \input knuth
+% \page \flushoutputstream[de] \input knuth
+% \page \flushoutputstream[nl] \input knuth
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-txt.mklx b/Master/texmf-dist/tex/context/base/mkxl/page-txt.mklx
index b8184e44367..f8db27f38e7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-txt.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-txt.mklx
@@ -77,28 +77,28 @@
\definelayoutelement[\v!footer:\v!edge] [\v!footer][\c!lefttext=,\c!middletext=,\c!righttext=]
\definelayoutelement[\v!bottom:\v!edge] [\v!bottom][\c!lefttext=,\c!middletext=,\c!righttext=]
-\unexpanded\def\setuplayouttext
- {\dotripleempty\page_layouts_setup_text}
-
-\def\page_layouts_setup_text[#vertical][#horizontal][#settings]%
- {\ifthirdargument
+\permanent\tolerant\protected\def\setuplayouttext[#vertical]#spacer[#horizontal]#spacer[#settings]%
+ {\ifnum\lastarguments>\plustwo
\setuplayoutelement[#vertical:#horizontal][#settings]%
\else
\setuplayoutelement[#vertical][#horizontal]%
\fi}
\appendtoks
- \ifx\currentlayoutelement\empty\else
+ \ifempty\currentlayoutelement\else
\page_layouts_synchronize_element\currentlayoutelement % brr, can be vertical:horizontal
\fi
\to \everysetuplayoutelement
+\mutable\let\currenttextstate \empty
+\mutable\let\previoustextstate\empty
+
\def\page_layouts_reset_element_status#vertical%
- {\expandafter\normalgdef\csname\??layouttextsreset#vertical\endcsname{\page_layouts_set_element_status_normal#vertical}}
+ {\gdefcsname\??layouttextsreset#vertical\endcsname{\page_layouts_set_element_status_normal#vertical}}
\def\page_layouts_set_element_status_normal#vertical%
- {\expandafter\glet\csname\namedlayoutelementhash#vertical\c!state\endcsname\v!normal
- \expandafter\glet\csname\??layouttextsreset#vertical\endcsname\relax
+ {\gletcsname\namedlayoutelementhash#vertical\c!state\endcsname\v!normal
+ \gletcsname\??layouttextsreset#vertical\endcsname\relax
\page_layouts_synchronize_element{#vertical}}
\def\page_layouts_synchronize_element#vertical%
@@ -114,13 +114,13 @@
\ifx\previoustextstate\v!high \calculatevsizes\page_backgrounds_recalculate \orelse
\ifx\currenttextstate \v!none \calculatevsizes\page_backgrounds_recalculate \orelse
\ifx\previoustextstate\v!none \calculatevsizes\page_backgrounds_recalculate \fi
- \letgvalue{\??layouttextssynchronize#vertical}\currenttextstate}
+ \gletcsname\??layouttextssynchronize#vertical\endcsname\currenttextstate}
-\unexpanded\def\setuptop {\dotripleempty\page_layouts_setup_text[\v!top ]}
-\unexpanded\def\setupheader{\dotripleempty\page_layouts_setup_text[\v!header]}
-\unexpanded\def\setuptext {\dotripleempty\page_layouts_setup_text[\v!text ]}
-\unexpanded\def\setupfooter{\dotripleempty\page_layouts_setup_text[\v!footer]}
-\unexpanded\def\setupbottom{\dotripleempty\page_layouts_setup_text[\v!bottom]}
+\permanent\protected\def\setuptop {\setuplayouttext[\v!top ]}
+\permanent\protected\def\setupheader{\setuplayouttext[\v!header]}
+\permanent\protected\def\setuptext {\setuplayouttext[\v!text ]}
+\permanent\protected\def\setupfooter{\setuplayouttext[\v!footer]}
+\permanent\protected\def\setupbottom{\setuplayouttext[\v!bottom]}
%D We inherit some settings:
@@ -143,11 +143,11 @@
%D \showsetup{noheaderandfooterlines}
%D \showsetup{notopandbottomlines}
-\unexpanded\def\noheaderandfooterlines
+\permanent\protected\def\noheaderandfooterlines
{\setuplayoutelement[\v!header][\c!state=\v!empty]%
\setuplayoutelement[\v!footer][\c!state=\v!empty]}
-\unexpanded\def\notopandbottomlines
+\permanent\protected\def\notopandbottomlines
{\setuplayoutelement[\v!top ][\c!state=\v!empty]%
\setuplayoutelement[\v!bottom][\c!state=\v!empty]}
@@ -169,59 +169,52 @@
%D someone uses the key|/|value interface these things have to be set explicitly as
%D part of the text.
-\unexpanded\def\setuptoptexts {\dosixtupleempty\page_layouts_setup_texts[\v!top ]}
-\unexpanded\def\setupheadertexts{\dosixtupleempty\page_layouts_setup_texts[\v!header]}
-\unexpanded\def\setuptexttexts {\dosixtupleempty\page_layouts_setup_texts[\v!text ]}
-\unexpanded\def\setupfootertexts{\dosixtupleempty\page_layouts_setup_texts[\v!footer]}
-\unexpanded\def\setupbottomtexts{\dosixtupleempty\page_layouts_setup_texts[\v!bottom]}
-
-\unexpanded\def\page_layouts_setup_text_six[#vertical][#horizontal][#a][#b][#c][#d]%
- {\edef\currentlayoutelement{#vertical:#horizontal}%
- \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_double{#a}{#d}}%
- \setlayoutelementparameter\c!righttext{\page_layouts_process_element_double{#b}{#c}}}
-
-\unexpanded\def\page_layouts_setup_text_five[#vertical][#horizontal][#a][#b][#c][#d]%
- {\edef\currentlayoutelement{#vertical:\v!text}%
- \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_double{#horizontal}{#c}}%
- \setlayoutelementparameter\c!righttext{\page_layouts_process_element_double{#a}{#b}}}
-
-\unexpanded\def\page_layouts_setup_text_four[#vertical][#horizontal][#a][#b][#c][#d]%
- {\edef\currentlayoutelement{#vertical:#horizontal}%
- \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_single{#a}}%
- \setlayoutelementparameter\c!righttext{\page_layouts_process_element_single{#b}}}
-
-\unexpanded\def\page_layouts_setup_text_three[#vertical][#horizontal][#a][#b][#c][#d]%
- {\edef\currentlayoutelement{#vertical:\v!text}%
- \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_single{#horizontal}}%
- \setlayoutelementparameter\c!righttext{\page_layouts_process_element_single{#a}}}
-
-\unexpanded\def\page_layouts_setup_text_two[#vertical][#horizontal][#a][#b][#c][#d]%
- {\edef\currentlayoutelement{#vertical:\v!text}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \setlayoutelementparameter \c!middletext{\page_layouts_process_element_single{#horizontal}}}
-
-\unexpanded\def\page_layouts_setup_text_one[#vertical][#horizontal][#a][#b][#c][#d]%
- {\edef\currentlayoutelement{#vertical:\v!text}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \resetlayoutelementparameter\c!middletext
- \edef\currentlayoutelement{#vertical:\v!margin}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \resetlayoutelementparameter\c!middletext
- \edef\currentlayoutelement{#vertical:\v!edge}%
- \resetlayoutelementparameter\c!lefttext
- \resetlayoutelementparameter\c!righttext
- \resetlayoutelementparameter\c!middletext}
-
-\unexpanded\def\page_layouts_setup_texts
- {\ifsixthargument \expandafter\page_layouts_setup_text_six \orelse
- \iffifthargument \expandafter\page_layouts_setup_text_five \orelse
- \iffourthargument\expandafter\page_layouts_setup_text_four \orelse
- \ifthirdargument \expandafter\page_layouts_setup_text_three\orelse
- \ifsecondargument\expandafter\page_layouts_setup_text_two \else
- \expandafter\page_layouts_setup_text_one \fi}
+\permanent\protected\def\setuptoptexts {\setuptexts[\v!top ]}
+\permanent\protected\def\setupheadertexts{\setuptexts[\v!header]}
+\permanent\protected\def\setuptexttexts {\setuptexts[\v!text ]}
+\permanent\protected\def\setupfootertexts{\setuptexts[\v!footer]}
+\permanent\protected\def\setupbottomtexts{\setuptexts[\v!bottom]}
+
+\mutable\let\currentlayoutelementstate\empty
+
+\permanent\tolerant\protected\def\setuptexts[#vertical]#spacer[#horizontal]#spacer[#a]#spacer[#b]#spacer[#c]#spacer[#d]%
+ {\ifarguments
+ % there is always one
+ \or
+ \edef\currentlayoutelement{#vertical:\v!text}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \resetlayoutelementparameter\c!middletext
+ \edef\currentlayoutelement{#vertical:\v!margin}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \resetlayoutelementparameter\c!middletext
+ \edef\currentlayoutelement{#vertical:\v!edge}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \resetlayoutelementparameter\c!middletext
+ \or
+ \edef\currentlayoutelement{#vertical:\v!text}%
+ \resetlayoutelementparameter\c!lefttext
+ \resetlayoutelementparameter\c!righttext
+ \setlayoutelementparameter \c!middletext{\page_layouts_process_element_single{#horizontal}}%
+ \or
+ \edef\currentlayoutelement{#vertical:\v!text}%
+ \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_single{#horizontal}}%
+ \setlayoutelementparameter\c!righttext{\page_layouts_process_element_single{#a}}%
+ \or
+ \edef\currentlayoutelement{#vertical:#horizontal}%
+ \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_single{#a}}%
+ \setlayoutelementparameter\c!righttext{\page_layouts_process_element_single{#b}}%
+ \or
+ \edef\currentlayoutelement{#vertical:\v!text}%
+ \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_double{#horizontal}{#c}}%
+ \setlayoutelementparameter\c!righttext{\page_layouts_process_element_double{#a}{#b}}%
+ \or
+ \edef\currentlayoutelement{#vertical:#horizontal}%
+ \setlayoutelementparameter\c!lefttext {\page_layouts_process_element_double{#a}{#d}}%
+ \setlayoutelementparameter\c!righttext{\page_layouts_process_element_double{#b}{#c}}%
+ \fi}
%D Left and right texts are swapped on odd and even pages, but only when double
%D sided typesetting is enabled.
@@ -230,7 +223,7 @@
\let\m_page_layouts_element_content\empty
-\unexpanded\def\page_layouts_process_element_single#content%
+\protected\def\page_layouts_process_element_single#content%
{\edef\m_page_layouts_element_content{\detokenize{#content}}% so no \v!xxx
\ifcsname\??layouttextspecial\m_page_layouts_element_content\endcsname
\lastnamedcs
@@ -240,26 +233,25 @@
{#content}%
\fi}
-\unexpanded\def\page_layouts_process_element_double#first#second%
+\protected\def\page_layouts_process_element_double#first#second%
{\doifelseoddpage
{\page_layouts_process_element_single{#first}}
{\page_layouts_process_element_single{#second}}}
-\unexpanded\def\page_layouts_process_element_indeed#style#color#width%
+\protected\def\page_layouts_process_element_indeed#style#color#width%
{\begingroup
\uselayoutelementstyleandcolor#style#color%
\begincsname\??layouttextstrut\layoutelementparameter\c!strut\endcsname
\ignorecrlf
- \edef\currentlayoutelementwidth{\layoutelementparameter#width}%
- \ifx\currentlayoutelementwidth\empty\else
+ \edef\p_width{\layoutelementparameter#width}%
+ \ifempty\p_width\else
\expandafter\page_layouts_process_element_limited
\fi\p_text
\endgroup}
\def\page_layouts_process_element_limited#content% are the {}{}{} still needed?
-% {\limitatetext{#content{}{}{}}\currentlayoutelementwidth\unknown}
{\limitated
- left \currentlayoutelementwidth
+ left \p_width
text {#content}
sentinel {\unknown}
\relax}
@@ -280,21 +272,23 @@
\newcount\c_page_layouts_element_state_n
+\mutable\let\textlinestatus\empty
+
\def\page_layouts_set_element_status#vertical%
{\c_page_layouts_element_state_n=0\namedlayoutelementparameter#vertical\c!n\relax
\ifcase\c_page_layouts_element_state_n
\edef\textlinestatus{\namedlayoutelementparameter#vertical\c!state}%
\else
- \setxvalue{\namedlayoutelementhash#vertical\c!n}{\the\numexpr\c_page_layouts_element_state_n+\minusone}%
+ \xdefcsname\namedlayoutelementhash#vertical\c!n\endcsname{\the\numexpr\c_page_layouts_element_state_n+\minusone}%
\let\textlinestatus\v!stop
\fi}
\appendtoks
- \doifinset\v!header\floatspecification{\setxvalue{\namedlayoutelementhash\v!header\c!n}{1}}%
- \doifinset\v!footer\floatspecification{\setxvalue{\namedlayoutelementhash\v!footer\c!n}{1}}%
+ \doifinset\v!header\floatspecification{\xdefcsname\namedlayoutelementhash\v!header\c!n\endcsname{1}}%
+ \doifinset\v!footer\floatspecification{\xdefcsname\namedlayoutelementhash\v!footer\c!n\endcsname{1}}%
\to \everybeforeflushedpagefloat
-\unexpanded\def\page_layouts_place_text_line#vertical%
+\protected\def\page_layouts_place_text_line#vertical%
{\page_layouts_set_element_status#vertical\relax
\ifcsname\??layouttextsline\textlinestatus\endcsname
\expandafter\lastnamedcs
@@ -302,17 +296,17 @@
\expandafter\page_layouts_place_text_line_unknown
\fi#vertical}
-\unexpanded\def\doifelselayouttextline#vertical% shown or not
+\permanent\protected\def\doifelselayouttextline#vertical% shown or not
{\edef\currentlayoutelementstate{\namedlayoutelementparameter{#vertical}\c!state}%
\ifx\currentlayoutelementstate\v!normal
- \expandafter\firstoftwoarguments
+ \expandafter\firstoftwoarguments
\orelse\ifx\currentlayoutelementstate\v!start
- \expandafter\firstoftwoarguments
+ \expandafter\firstoftwoarguments
\else
- \expandafter\secondoftwoarguments
+ \expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifelselayoutsomeline#vertical% present or not
+\permanent\protected\def\doifelselayoutsomeline#vertical% present or not
{\edef\currentlayoutelementstate{\namedlayoutelementparameter{#vertical}\c!state}%
\ifx\currentlayoutelementstate\v!none
\expandafter\secondoftwoarguments
@@ -322,8 +316,8 @@
\expandafter\firstoftwoarguments
\fi}
-\let\doiflayouttextlineelse\doifelselayouttextline
-\let\doiflayoutsomelineelse\doifelselayoutsomeline
+\aliased\let\doiflayouttextlineelse\doifelselayouttextline
+\aliased\let\doiflayoutsomelineelse\doifelselayoutsomeline
\newconditional\resyncaftertextline
@@ -377,7 +371,7 @@
%D The following macro has to be called after a page is flushed.
-\unexpanded\def\resetlayouttextlines % public
+\permanent\protected\def\resetlayouttextlines % public
{\begincsname\??layouttextsreset\v!top \endcsname
\begincsname\??layouttextsreset\v!header\endcsname
\begincsname\??layouttextsreset\v!text \endcsname
@@ -389,49 +383,47 @@
\global\setfalse\resyncaftertextline
\fi}
-\def\getspecificlayouttext#vertical#horizontal#what%
+\permanent\def\getspecificlayouttext#vertical#horizontal#what%
{\begincsname\namedlayoutelementhash{#vertical:#horizontal}#what\endcsname}
% \settext[header][text][middle][xxx][yyy]
-\unexpanded\def\settextcontent
- {\doquintupleempty\page_layouts_set_text_content}
-
-\def\page_layouts_set_text_content[#vertical][#horizontal][#one][#two][#three]% header text middle text/text
- {\iffifthargument
- \setvalue{\namedlayoutelementhash{#vertical:#horizontal}\begincsname\??layouttextcontent\v!text:#one\endcsname\c!middletext}%
- {\page_layouts_process_element_double{#two}{#three}}%
- \orelse\iffourthargument
- \setvalue{\namedlayoutelementhash{#vertical:#horizontal}\begincsname\??layouttextcontent\v!text:#one\endcsname\c!middletext}%
- {\page_layouts_process_element_double{#two}{#two}}%
- \orelse\ifthirdargument
- \setvalue{\namedlayoutelementhash{#vertical:#horizontal}\c!middletext}%
+\permanent\tolerant\protected\def\settextcontent[#vertical]#spacer[#horizontal]#spacer[#one]#spacer[#two]#spacer[#three]% header text middle text/text
+ {\ifarguments\or\or\or % 3
+ \defcsname\namedlayoutelementhash{#vertical:#horizontal}\c!middletext\endcsname
{\page_layouts_process_element_double{#one}{#one}}%
+ \or % 4
+ \defcsname\namedlayoutelementhash{#vertical:#horizontal}\begincsname\??layouttextcontent\v!text:#one\endcsname\c!middletext\endcsname
+ {\page_layouts_process_element_double{#two}{#two}}%
+ \or % 5
+ \defcsname\namedlayoutelementhash{#vertical:#horizontal}\begincsname\??layouttextcontent\v!text:#one\endcsname\c!middletext\endcsname
+ {\page_layouts_process_element_double{#two}{#three}}%
\fi}
\let\currentlayoutelement\relax
-\unexpanded\def\resettextcontent
- {\dotripleempty\page_layouts_reset_text_content}
+%D This will be redefined, so no \type {\frozen} here!
-\def\page_layouts_reset_text_content[#vertical][#horizontal][#tag]% header text middle
- {\edef\currentlayoutelement{#vertical:#horizontal}%
- \ifthirdargument
- \letvalueempty{\layoutelementhash\begincsname\??layouttextcontent\v!text:#tag\endcsname\c!middletext}%
- \orelse\ifsecondargument
+\permanent\tolerant\protected\def\resettextcontent[#vertical]#spacer[#horizontal]#spacer[#tag]% header text middle
+ {\ifarguments\or\or % 2
+ \edef\currentlayoutelement{#vertical:#horizontal}%
\resetlayoutelementparameter\c!lefttext
\resetlayoutelementparameter\c!middletext
\resetlayoutelementparameter\c!righttext
+ \or % 3
+% \edef\currentlayoutelement{#vertical:#horizontal}%
+% \letcsname\layoutelementhash\begincsname\??layouttextcontent\v!text:#tag\endcsname\c!middletext\endcsname\empty
+ \letcsname\namedlayoutelementhash{#vertical:#horizontal}\begincsname\??layouttextcontent\v!text:#tag\endcsname\c!middletext\endcsname\empty
\fi}
-\letvalue{\??layouttextcontent\v!text:\c!middle}\c!middletext
-\letvalue{\??layouttextcontent\v!text:\c!left }\c!lefttext
-\letvalue{\??layouttextcontent\v!text:\c!right }\c!righttext
+\letcsname\??layouttextcontent\v!text:\c!middle\endcsname\c!middletext
+\letcsname\??layouttextcontent\v!text:\c!left \endcsname\c!lefttext
+\letcsname\??layouttextcontent\v!text:\c!right \endcsname\c!righttext
%D The placement of a whole line is handled by the next two macros. These are hooked
%D into the general purpose token list registers mentioned before.
-\let\currentlayouttextline\relax
+\mutable\let\currentlayouttextline\relax
\def\page_layouts_place_text_line_indeed#vertical#height%
{\let\currentlayouttextline#vertical%
@@ -446,8 +438,8 @@
%\hsize\zeropoint % hack so that e.g. after=\hairline gives predictable results
\hsize\totaltextwidth
\normalbaselines
- \let\\\ignoredlinebreak
- \let\crlf\ignoredlinebreak
+ \enforced\let\\\ignoredlinebreak
+ \enforced\let\crlf\ignoredlinebreak
\namedlayoutelementparameter\currentlayouttextline\c!before
\doifbothsidesoverruled
\page_layouts_place_text_line_right
@@ -500,7 +492,7 @@
\def\page_layouts_left_edge_element_indeed#text#style#color#width%
{\letfromlayoutelementparameter\p_text#text%
- \ifx\p_text\empty
+ \ifempty\p_text
\kern\leftedgewidth
\else
\hbox to \leftedgewidth\bgroup
@@ -517,7 +509,7 @@
\def\page_layouts_right_edge_element_indeed#text#style#color#width%
{\letfromlayoutelementparameter\p_text#text%
- \ifx\p_text\empty
+ \ifempty\p_text
\kern\rightedgewidth
\else
\hbox to \rightedgewidth\bgroup
@@ -536,7 +528,7 @@
\def\page_layouts_left_margin_element_indeed#text#style#color#width#margintoo%
{\letfromlayoutelementparameter\p_text#text%
- \ifx\p_text\empty
+ \ifempty\p_text
\kern\leftmarginwidth
\else
\hbox to \leftmarginwidth\bgroup
@@ -546,7 +538,7 @@
\fi
\ifcase#margintoo\or
\letfromlayoutelementparameter\p_text\c!margintext
- \ifx\p_text\empty\else
+ \ifempty\p_text\else
\kern-\leftmarginwidth
\hbox to \leftmarginwidth\bgroup
\hss
@@ -563,7 +555,7 @@
\def\page_layouts_right_margin_element_indeed#text#style#color#width#margintoo%
{\letfromlayoutelementparameter\p_text#text%
- \ifx\p_text\empty
+ \ifempty\p_text
\kern\rightmarginwidth
\else
\hbox to \rightmarginwidth\bgroup
@@ -573,7 +565,7 @@
\fi
\ifcase#margintoo\or
\letfromlayoutelementparameter\p_text\c!margintext
- \ifx\p_text\empty\else
+ \ifempty\p_text\else
\kern-\rightmarginwidth
\hbox to \rightmarginwidth\bgroup
\p_text % ? styling
@@ -590,8 +582,8 @@
\def\page_layouts_text_body_element_indeed_l_m_r_e
{\letfromlayoutelementparameter\p_text\c!lefttext
- \ifx\p_text\empty
- \ifx\page_layouts_place_extra_text_left\empty\else
+ \ifempty\p_text
+ \ifempty\page_layouts_place_extra_text_left\else
\hbox to \makeupwidth\bgroup
\page_layouts_place_extra_text_left
\hss
@@ -607,7 +599,7 @@
\kern-\makeupwidth
\fi
\letfromlayoutelementparameter\p_text\c!middletext
- \ifx\p_text\empty\else
+ \ifempty\p_text\else
\hbox to \makeupwidth\bgroup
\hss
\page_layouts_process_element_indeed\c!middlestyle\c!middlecolor\c!middlewidth
@@ -616,7 +608,7 @@
\kern-\makeupwidth
\fi
\letfromlayoutelementparameter\p_text\c!righttext
- \ifx\p_text\empty
+ \ifempty\p_text
\kern\makeupwidth
\else
\hbox to \makeupwidth\bgroup
@@ -627,7 +619,7 @@
\def\page_layouts_text_body_element_indeed_e_r_m_l
{\letfromlayoutelementparameter\p_text\c!righttext
- \ifx\p_text\empty\else
+ \ifempty\p_text\else
\hbox to \makeupwidth\bgroup
\page_layouts_process_element_indeed\c!rightstyle\c!rightcolor\c!rightwidth
\hss
@@ -635,7 +627,7 @@
\kern-\makeupwidth
\fi
\letfromlayoutelementparameter\p_text\c!middletext
- \ifx\p_text\empty\else
+ \ifempty\p_text\else
\hbox to \makeupwidth\bgroup
\hss
\page_layouts_process_element_indeed\c!middlestyle\c!middlecolor\c!middlewidth
@@ -644,8 +636,8 @@
\kern-\makeupwidth
\fi
\letfromlayoutelementparameter\p_text\c!lefttext
- \ifx\p_text\empty
- \ifx\page_layouts_place_extra_text_right\empty
+ \ifempty\p_text
+ \ifempty\page_layouts_place_extra_text_right
\kern\makeupwidth
\else
\hbox to \makeupwidth\bgroup
@@ -718,20 +710,17 @@
%D \chapter{tweede} \dorecurse{20}{\input tufte \relax}
%D \stoptyping
-\unexpanded\def\definetext
- {\doseventupleempty\page_layouts_define_text}
-
-\def\page_layouts_define_text[#tag][#vertical][#horizontal][#a][#b][#c][#d]%
- {\ifseventhargument
- \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}{\page_layouts_setup_text_six [#vertical][#horizontal][#a][#b][#c][#d]}%
- \orelse\ifsixthargument
- \setvalue{\namedlayoutelementhash {#vertical}#tag}{\page_layouts_setup_text_five [#vertical][#horizontal][#a][#b][#c][]}%
- \orelse\iffifthargument
- \setvalue{\namedlayoutelementhash{#vertical:#horizontal}#tag}{\page_layouts_setup_text_four [#vertical][#horizontal][#a][#b][][]}%
- \orelse\iffourthargument
- \setvalue{\namedlayoutelementhash {#vertical}#tag}{\page_layouts_setup_text_three[#vertical][#horizontal][#a][][][]}%
- \else
- \setvalue{\namedlayoutelementhash {#vertical}#tag}{\page_layouts_setup_text_two [#vertical][#horizontal][][][][]}%
+\permanent\tolerant\protected\def\definetext[#tag]#spacer[#vertical]#spacer[#horizontal]#spacer[#a]#spacer[#b]#spacer[#c]#spacer[#d]%
+ {\ifnum\lastarguments<\plusfour
+ \defcsname\namedlayoutelementhash {#vertical}#tag\endcsname{\setuptexts[#vertical][#horizontal]\relax}% 1, 2, 3
+ \orelse\ifarguments\or\or\or\or
+ \defcsname\namedlayoutelementhash {#vertical}#tag\endcsname{\setuptexts[#vertical][#horizontal][#a]\relax}% 4
+ \or
+ \defcsname\namedlayoutelementhash{#vertical:#horizontal}#tag\endcsname{\setuptexts[#vertical][#horizontal][#a][#b]\relax}% 5
+ \or
+ \defcsname\namedlayoutelementhash {#vertical}#tag\endcsname{\setuptexts[#vertical][#horizontal][#a][#b][#c]\relax}% 6
+ \or
+ \defcsname\namedlayoutelementhash{#vertical:#horizontal}#tag\endcsname{\setuptexts[#vertical][#horizontal][#a][#b][#c][#d]\relax}% 7
\fi}
%D A few more page breakers:
@@ -769,14 +758,15 @@
\let\m_page_layouts_page_number_location_h\relax
\let\m_page_layouts_page_number_location_x\relax
-\def\page_layouts_place_page_number % also elsewhere .. beware, not \unexpanded else
+\def\page_layouts_place_page_number % also elsewhere .. beware, not \protected else
{\strc_pagenumbers_place_location} % test below fails
\def\page_layouts_reset_page_number_location
- {\ifx\m_page_layouts_page_number_location_v\relax\else
+ {\ifrelax\m_page_layouts_page_number_location_v\else
+ % this can be done better now, no meaning hackery needed
\edef\currentlayoutelement{\m_page_layouts_page_number_location_v:\m_page_layouts_page_number_location_h}%
- \edef\page_layouts_previous_page_number_locator{\detokenizedlayoutelementparameter\m_page_layouts_page_number_location_x}%
- \doif{\meaning\page_layouts_previous_page_number_locator}{\meaning\page_layouts_place_page_number}
+ \edef\tempstring{\detokenizedlayoutelementparameter\m_page_layouts_page_number_location_x}%
+ \doif{\meaning\tempstring}{\meaning\page_layouts_place_page_number}
{\resetlayoutelementparameter\m_page_layouts_page_number_location_x}%
\fi}
@@ -817,14 +807,14 @@
\v!marginedge=>\let\m_page_layouts_page_number_location_h\v!text
\let\m_page_layouts_page_number_location_x\c!marginedgetext]}
-\unexpanded\def\strc_pagenumbers_set_location
+\protected\def\strc_pagenumbers_set_location
{\edef\p_strc_pagenumbers_location{\directpagenumberingparameter\c!location}%
\ifx\p_strc_pagenumbers_location\m_page_layouts_page_number_location
% unchanged
\else
\let\m_page_layouts_page_number_location\p_strc_pagenumbers_location
\page_layouts_reset_page_number_location
- \ifx\p_strc_pagenumbers_location\empty
+ \ifempty\p_strc_pagenumbers_location
% set otherwise
\orelse\ifx\p_strc_pagenumbers_location\v!none
% set otherwise
@@ -839,7 +829,7 @@
\setbox\scratchbox\hbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}%
\ifzeropt\wd\scratchbox\else
\edef\p_strc_pagenumbers_width{\directpagenumberingparameter\c!width}%
- \ifx\p_strc_pagenumbers_width\empty
+ \ifempty\p_strc_pagenumbers_width
\box\scratchbox\tfskip
\else
\hpack to \p_strc_pagenumbers_width{\box\scratchbox\hss}%
@@ -852,7 +842,7 @@
\setbox\scratchbox\hbox{\ignorespaces\layoutelementparameter\c!marginedgetext\removeunwantedspaces}%
\ifzeropt\wd\scratchbox\else
\edef\p_strc_pagenumbers_width{\directpagenumberingparameter\c!width}%
- \ifx\p_strc_pagenumbers_width\empty
+ \ifempty\p_strc_pagenumbers_width
\tfskip\box\scratchbox
\else
\hpack to \p_strc_pagenumbers_width{\hss\box\scratchbox}%
@@ -873,7 +863,7 @@
{\setbox\b_page_layouts_element\vpack
{\dontcomplain
\calculatereducedvsizes
- \swapmargins
+ \page_layouts_swap_margins
\offinterlineskip
\vkern\dimexpr-\topheight-\topdistance\relax
\the\toptextcontent
@@ -907,13 +897,13 @@
{\offinterlineskip
\calculatereducedvsizes
\calculatehsizes
- \swapmargins
+ \page_layouts_swap_margins
\vkern\dimexpr\headerheight+\headerdistance+\textdistance\relax
\dontleavehmode
%\page_prepare_backgrounds{#2}%
\hpack to \makeupwidth
{\begingroup
- \swapmargins
+ \page_layouts_swap_margins
\goleftonpage
\ifdim\leftedgewidth>\zeropoint
\the\leftedgetextcontent
@@ -949,10 +939,10 @@
%D The main text area has to be combined with some additional (tracing) information.
%D
%D This will be stored as normal and overloaded in page-lyr and later in page-spr we
-%D overload the the stored version .. evenatually i will clear up the experimental
+%D overload the the stored version .. eventually i will clear up the experimental
%D mess.
-\def\settextpagecontent#1#2#3% #2 and #3 will disappear / is overloaded
+\protected\def\settextpagecontent#1#2#3% #2 and #3 will disappear / is overloaded
{\setbox#1\hpack to \makeupwidth
{\hss % so don't change this
\setlayoutcomponentattribute{\v!page:\v!text}%
diff --git a/Master/texmf-dist/tex/context/base/mkxl/page-var.mkxl b/Master/texmf-dist/tex/context/base/mkxl/page-var.mkxl
new file mode 100644
index 00000000000..1c7fd5b252d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/page-var.mkxl
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=page-var,
+%D version=2011.12.05, % moved from other page-* files
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Variables,
+%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 Page Macros / Variables}
+
+\unprotect
+
+% just for temporary moved variables
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl b/Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl
new file mode 100644
index 00000000000..51ebbe17209
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/phys-dim.mkxl
@@ -0,0 +1,817 @@
+%D \module
+%D [ file=phys-dim,
+%D version=2011-06-13, % was digits and units 1997.03.19,
+%D title=\CONTEXT\ Physics,
+%D subtitle=Digits and Units,
+%D author={Hans Hagen},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{phys-dim}{}
+
+% TAGGING NEEDS CHECKING ... WILL DO WHEN PARSER IS OK
+
+\unprotect
+
+%D \macros
+%D {digits, setdigitmode, setdigitsign}
+%D
+%D This is an update of the \MKII\ digits mechanism. Beware, space delimited mode is
+%D now resticted!
+%D
+%D Depending on the digit mode the command \type {\digits} normalizes number
+%D patterns depending on the language set.
+%D
+%D \starttyping
+%D This will never be a \digits{1.000.000} seller.
+%D \stoptyping
+%D
+%D We still support the space delimited case but this is only for special purposes.
+%D When used in the text, you'd better use the argument variant.
+%D
+%D \startbuffer
+%D 1 \setdigitmode {1} \setdigitorder{0} \digits {12.345,90}
+%D 2 \setdigitmode {2} \setdigitorder{0} \digits {12.345,90}
+%D 3 \setdigitmode {3} \setdigitorder{0} \digits {12.345,90}
+%D 4 \setdigitmode {4} \setdigitorder{0} \digits {12.345,90}
+%D 5 \setdigitmode {5} \setdigitorder{0} \digits {12.345,90}
+%D 6 \setdigitmode {6} \setdigitorder{0} \digits {12.345,90}
+%D 1 \setdigitmode {1} \setdigitorder{1} \digits {12.345,90}
+%D 2 \setdigitmode {2} \setdigitorder{1} \digits {12.345,90}
+%D 3 \setdigitmode {3} \setdigitorder{1} \digits {12.345,90}
+%D 4 \setdigitmode {4} \setdigitorder{1} \digits {12.345,90}
+%D 5 \setdigitmode {5} \setdigitorder{1} \digits {12.345,90}
+%D 6 \setdigitmode {6} \setdigitorder{1} \digits {12.345,90}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This is typeset as:
+%D
+%D \startlines \getbuffer \stoplines
+%D
+%D The sign can be typeset as is or within the space of a digit.
+%D
+%D \startbuffer
+%D \setdigitsign 0 \digits {+12.345,90}
+%D \setdigitsign 1 \digits {+12.345,90}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This is typset as:
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D The digit modes are:
+%D
+%D \startitemize[n,packed]
+%D \item periods/comma
+%D \item commas/period
+%D \item thinmuskips/comma
+%D \item thinmuskips/period
+%D \item thickmuskips/comma
+%D \item thickmuskips/period
+%D \stopitemize
+%D
+%D The digit parser handles a bunch of special characters as well as different
+%D formats. We strongly suggest you to use the grouped call.
+%D
+%D \starttabulate[|l|l|l|]
+%D \NC \type{.} \NC , . \NC comma or period \NC \NR
+%D \NC \type{,} \NC , . \NC comma or period \NC \NR
+%D \NC \type{:} \NC \NC invisible period \NC \NR
+%D \NC \type{;} \NC \NC invisible comma \NC \NR
+%D \NC \type{_} \NC \NC invisible space \NC \NR
+%D \NC \type{/} \NC \NC invisible sign \NC \NR
+%D \NC \type{-} \NC $-$ \NC minus sign \NC \NR
+%D \NC \type{+} \NC $+$ \NC plus sign \NC \NR
+%D \NC \type{//} \NC \NC invisible high sign \NC \NR
+%D \NC \type{--} \NC $\negative$ \NC high minus sign \NC \NR
+%D \NC \type{++} \NC $\positive$ \NC high plus sign \NC \NR
+%D \NC \type{=} \NC $\zeroamount$ \NC zero padding \NC \NR
+%D \stoptabulate
+%D
+%D These triggers are used in the following examples.
+%D
+%D \starttabulate[|l|r|]
+%D \NC \type{1} \NC \ruledhbox{\strut\digits{1}} \NC \NR
+%D \NC \type{12} \NC \ruledhbox{\strut\digits{12}} \NC \NR
+%D \NC \type{12.34} \NC \ruledhbox{\strut\digits{12.34}} \NC \NR
+%D \NC \type{123,456} \NC \ruledhbox{\strut\digits{123,456}} \NC \NR
+%D \NC \type{123,456.78} \NC \ruledhbox{\strut\digits{123,456.78}} \NC \NR
+%D \NC \type{12,34} \NC \ruledhbox{\strut\digits{12,34}} \NC \NR
+%D \NC \type{.1234} \NC \ruledhbox{\strut\digits{.1234}} \NC \NR
+%D \NC \type{1234} \NC \ruledhbox{\strut\digits{1234}} \NC \NR
+%D \NC \type{123,456.78^9} \NC \ruledhbox{\strut\digits{123,456.78^9}} \NC \NR
+%D \NC \type{123,456.78e9} \NC \ruledhbox{\strut\digits{123,456.78e9}} \NC \NR
+%D \NC \type{/123,456.78e-9} \NC \ruledhbox{\strut\digits{/123,456.78e-9}} \NC \NR
+%D \NC \type{-123,456.78e-9} \NC \ruledhbox{\strut\digits{-123,456.78e-9}} \NC \NR
+%D \NC \type{+123,456.78e-9} \NC \ruledhbox{\strut\digits{+123,456.78e-9}} \NC \NR
+%D \NC \type{//123,456.78e-9} \NC \ruledhbox{\strut\digits{//123,456.78e-9}} \NC \NR
+%D \NC \type{--123,456.78e-9} \NC \ruledhbox{\strut\digits{--123,456.78e-9}} \NC \NR
+%D \NC \type{++123,456.78e-9} \NC \ruledhbox{\strut\digits{++123,456.78e-9}} \NC \NR
+%D \NC \type{___,___,123,456,789.00} \NC \ruledhbox{\strut\digits{___,___,123,456,789.00}} \NC \NR
+%D \NC \type{___,___,_12,345,678.==} \NC \ruledhbox{\strut\digits{___,___,_12,345,678.==}} \NC \NR
+%D \stoptabulate
+
+\newconstant\c_phys_digits_order
+\newconstant\c_phys_digits_method
+\newconstant\c_phys_digits_sign % we has sized (text script scriptscript)
+
+\permanent\protected\def\setdigitmethod#1{\c_phys_digits_method #1\relax}
+\permanent\protected\def\setdigitsign #1{\c_phys_digits_sign #1\relax}
+\permanent\protected\def\setdigitorder #1{\c_phys_digits_order #1\relax}
+
+\aliased\let\setdigitmode\setdigitmethod % compatibility
+
+\def\phys_digits_normalized % we could calculate once and remember
+ {\ifcase\c_phys_digits_sign
+ \expandafter\secondoftwoarguments
+ \orelse\ifmmode
+ \expandafter\phys_digits_normalized_math
+ \else
+ \expandafter\phys_digits_normalized_text
+ \fi}
+
+\def\phys_digits_normalized_math#1#2%
+ {\setbox\scratchbox\hbox{\normalstartimath\Ustack{#1}\normalstopimath}%
+ \hbox to \wd\scratchbox{\hss{\normalstartimath\Ustack{#2}\normalstopimath}\hss}}
+
+\def\phys_digits_normalized_text#1#2%
+ {\setbox\scratchbox\hbox{#1}%
+ \hbox to \wd\scratchbox{\hss#2\hss}}
+
+\def\phys_digits_raised
+ {\ifmmode
+ \expandafter\normalsuperscript
+ \else
+ \expandafter\unitshigh
+ \fi}
+
+% we could use a symbolset but how many symbols are there ?
+
+% \definesymbol[units][times][\times]
+% \definesymbol[units][times][\cdots]
+
+% \def\digitstimessymbol{\symbol[units][times]}
+
+% \definesymbol[units][times][\times]
+% \definesymbol[units][times][\cdots]
+% \definesymbol[units][times][\invisibletimes]
+% \definesymbol[units][times][\ifmmode\cdot\else\kern.2\emwidth\cdot\kern.2\emwidth\fi]
+
+\permanent\protected\def\digitstextbinop#1% assumes preceding
+ {\ifmmode#1\else\fourperemspace\nobreak#1\fourperemspace\fi}
+
+%frozen\def\digitstimessymbol{\ifmmode\cdot\else\digitstextbinop\cdot\fi}
+\frozen\def\digitstimessymbol{\digitstextbinop\times}
+
+\frozen\protected\def\digitszeropadding {\hphantom{0}}
+%frozen\protected\def\digitsnegative {\phys_digits_normalized{0}{\phys_digits_raised{\textminus}}}
+%frozen\protected\def\digitspositive {\phys_digits_normalized{0}{\phys_digits_raised{\textplus}}}
+\frozen\protected\def\digitsnegative {\phys_digits_normalized{0}{\mathematics{\negative}}}
+\frozen\protected\def\digitspositive {\phys_digits_normalized{0}{\mathematics{\positive}}}
+%frozen\protected\def\digitsminus {\phys_digits_normalized{0}{\mathematics{-}}}
+%frozen\protected\def\digitsplus {\phys_digits_normalized{0}{\mathematics{+}}}
+\frozen\protected\def\digitsminus {\phys_digits_normalized{0}{\mathminus}}
+\frozen\protected\def\digitsplus {\phys_digits_normalized{0}{\mathplus}}
+\frozen\protected\def\digitsplusminus {\phys_digits_normalized{0}{\mathplusminus}}
+\frozen\protected\def\digitsspace {\hphantom{0}}
+ \protected\def\digitsseparatorspace{\hphantom{.}}
+\frozen\protected\def\digitssignspace {\hphantom{\digitsminus}}
+\frozen\protected\def\digitshighspace {\hphantom{\digitspositive}}
+\frozen\protected\def\digitspower #1{\digitstimessymbol10\phys_digits_raised{#1}}
+\frozen\protected\def\digitspowerplus #1{\digitstimessymbol10\phys_digits_raised{\digitsplus#1}}
+\frozen\protected\def\digitspowerminus #1{\digitstimessymbol10\phys_digits_raised{\digitsminus#1}}
+\frozen\protected\def\digitsdigit #1{#1}
+
+\frozen\protected\def\normaldigitscommasymbol {,}
+\frozen\protected\def\normaldigitsperiodsymbol{.}
+
+\frozen\let\normaldigitsseparatorspace\digitsseparatorspace
+
+\installcorenamespace{digitscomma}
+\installcorenamespace{digitsperiod}
+\installcorenamespace{digitsspace}
+
+\letcsname\??digitscomma 0\endcsname\normaldigitscommasymbol
+\letcsname\??digitsperiod0\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 0\endcsname\normaldigitsseparatorspace
+
+\letcsname\??digitscomma 1\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsperiod1\endcsname\normaldigitscommasymbol
+\letcsname\??digitsspace 1\endcsname\normaldigitsseparatorspace
+
+\letcsname\??digitscomma 2\endcsname\normaldigitscommasymbol
+\letcsname\??digitsperiod2\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 2\endcsname\normaldigitsseparatorspace
+
+\letcsname\??digitscomma 3\endcsname\thinspace
+\letcsname\??digitsperiod3\endcsname\normaldigitscommasymbol
+\letcsname\??digitsspace 3\endcsname\thinspace
+
+\letcsname\??digitscomma 4\endcsname\thinspace
+\letcsname\??digitsperiod4\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 4\endcsname\thinspace
+
+\letcsname\??digitscomma 5\endcsname\thickspace
+\letcsname\??digitsperiod5\endcsname\normaldigitscommasymbol
+\letcsname\??digitsspace 5\endcsname\thickspace
+
+\letcsname\??digitscomma 6\endcsname\thickspace
+\letcsname\??digitsperiod6\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 6\endcsname\thickspace
+
+\frozen\protected\def\digitscommasymbol {\csname\??digitscomma \number\c_phys_digits_method\endcsname}
+\frozen\protected\def\digitsperiodsymbol {\csname\??digitsperiod\number\c_phys_digits_method\endcsname}
+\frozen\protected\def\digitsseparatorspace {\csname\??digitsspace \number\c_phys_digits_method\endcsname}
+
+\frozen\protected\def\digitsfinalcomma {\digitsperiodsymbol} % more for tracing
+\frozen\protected\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing
+\frozen\protected\def\digitsintermediatecomma {\digitscommasymbol } % more for tracing
+\frozen\protected\def\digitsintermediateperiod{\digitscommasymbol } % more for tracing
+
+%D The user macro:
+
+\protected\def\phys_digits_indeed#1%
+ {\dontleavehmode
+ \begingroup
+ \ifcase\c_phys_digits_order\expandafter\clf_digits_normal\else\expandafter\clf_digits_reverse\fi{\detokenize{#1}}%
+ \endgroup
+ \settrue\c_phys_units_dospace}
+
+\permanent\protected\def\digits
+ {\doifelsenextbgroup\phys_digits_argument\phys_digits_spaced}
+
+\def\phys_digits_argument#1%
+ {\phys_digits_indeed{#1}}
+
+\def\phys_digits_spaced#1 % space delimited
+ {\phys_digits_indeed{#1}}
+
+%D \macros
+%D {unit}
+%D
+%D We have been using the units module (and its predecessor) for over a decade now
+%D but when we moved on to \LUATEX\ a variant was prototyped that permits a less
+%D texie coding. I finally picked up that thread and cleaned up the code a bit so
+%D users can now play with it. (The main reason was that I wanted to test
+%D exporting.)
+%D
+%D \startbuffer
+%D 01: $10\unit{km/h}$
+%D 02: $\unit{10 km/h}$
+%D 03: \unit{km/h}
+%D 04: \unit{10 km/h}
+%D 05: \unit{10 km/h}
+%D 06: \unit{~1 km/h}
+%D 07: 10\unit{km/h}
+%D 08: 10 \unit{km/h}
+%D 09: $10 \unit{km/h}$
+%D 10: 10 \unit{KiloMeter/Hour}
+%D 11: 10 \unit{kilometer/hour}
+%D 12: 10 \unit{km/h}
+%D 13: 10 \unit{kilometer per hour}
+%D 14: 10 \unit{km / h}
+%D 15: 10 \unit{ km / h }
+%D 16: 10 \unit{km/ms2}
+%D 17: 10 \unit{meter per second}
+%D 18: 10 \unit{cubic meter}
+%D 19: 10 \unit{cubic meter per second}
+%D 21: 10 \unit{cubic meter / second}
+%D 22: $10 \unit{cubic meter / second}$
+%D 23: 30 \unit{kilo pascal }
+%D 24: 30 \unit{kilo pascal square meter / second}
+%D 25: 30 \unit{kilo pascal square meter / kelvin second}
+%D 26: \unit{30 kilo pascal square meter / kelvin second}
+%D 27: $30 \unit{kilo pascal square meter / kelvin second }$
+%D 28: 30 \unit{crap}
+%D 29: 30 \unit{AC}
+%D 30: $\frac{10 \unit{m/s}}{20 \unit{m/s}} $
+%D 31: {\ss 30 \unit{kilo pascal square meter / second kelvin}}
+%D 32: \unit{123.22^-3 km/s}
+%D 33: \unit{123.22e-3 km/s}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Result: \startlines \getbuffer \stoplines
+%D
+%D Depending on needs we can add more tweaks (also depends on to what extent we need
+%D to be compatible with \MKII.
+%D
+%D Formatting is supported too:
+%D
+%D \startbuffer
+%D \starttabulate[|l|l|l|]
+%D \HL
+%D \NC \unit{10 kilo gram} \NC \digits{10} \NC \unit{10} \NC \NR
+%D \NC \unit{1 kilogram} \NC \digits{1} \NC \unit{1} \NC \NR
+%D \NC \unit{0.1 kilogram} \NC \digits{0.1} \NC \unit{0.1} \NC \NR
+%D \NC \unit{1.1 kilogram} \NC \digits{1.1} \NC \unit{1.1} \NC \NR
+%D \NC \unit{11 kilogram} \NC \digits{11} \NC \unit{11} \NC \NR
+%D \HL
+%D \NC \unit{00,000.10 kilogram} \NC \digits{00,000.10} \NC \unit{00,000.10} \NC \NR
+%D \NC \unit{@@,@@0.10 kilogram} \NC \digits{@@,@@0.10} \NC \unit{@@,@@0.10} \NC \NR
+%D \NC \unit{__,___.10 kilogram} \NC \digits{__,___.10} \NC \unit{__,___.10} \NC \NR
+%D \NC \unit{__,__0:10 kilogram} \NC \digits{__,__0:10} \NC \unit{__,__0:10} \NC \NR
+%D \NC \unit{__,___:10 kilogram} \NC \digits{__,___:10} \NC \unit{__,___:10} \NC \NR
+%D \HL
+%D \stoptabulate
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D Punctuation can be configures usiing \type {method}:
+%D
+%D \startbuffer
+%D \starttabulate[|l|l|l|]
+%D \HL
+%D \NC \NC \setupunits[method=0]\unit{00,000.10 kilogram} \NC \setupunits[method=0]\unit{@@,@@0.10 kilogram} \NC \NR
+%D \NC 1 \NC \setupunits[method=1]\unit{00,000.10 kilogram} \NC \setupunits[method=1]\unit{@@,@@0.10 kilogram} \NC \NR
+%D \NC 2 \NC \setupunits[method=2]\unit{00,000.10 kilogram} \NC \setupunits[method=2]\unit{@@,@@0.10 kilogram} \NC \NR
+%D \NC 3 \NC \setupunits[method=3]\unit{00,000.10 kilogram} \NC \setupunits[method=3]\unit{@@,@@0.10 kilogram} \NC \NR
+%D \NC 4 \NC \setupunits[method=4]\unit{00,000.10 kilogram} \NC \setupunits[method=4]\unit{@@,@@0.10 kilogram} \NC \NR
+%D \NC 5 \NC \setupunits[method=5]\unit{00,000.10 kilogram} \NC \setupunits[method=5]\unit{@@,@@0.10 kilogram} \NC \NR
+%D \NC 6 \NC \setupunits[method=6]\unit{00,000.10 kilogram} \NC \setupunits[method=6]\unit{@@,@@0.10 kilogram} \NC \NR
+%D \HL
+%D \stoptabulate
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+% only a space when a number is part of the unit
+
+\installcorenamespace {unit}
+\installcorenamespace {unitseparator}
+\installcorenamespace {unitspace}
+
+\installcommandhandler \??unit {unit} \??unit
+
+\setupunit
+ [\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!method=0,
+ %\c!grid=\v!yes, % (maybe)
+ %\c!style=..., % done
+ %\c!color=..., % done
+ %\c!space=..., % (maybe) small medium big
+ ]
+
+\definehigh[unitshigh][\c!style=\txx]
+\definelow [unitslow] [\c!style=\txx]
+
+\aliased\let\setupunits\setupunit
+
+\newconstant \c_phys_units_mode % 0=text 1=math 2=textinmath 3=mathintext
+\newconstant \c_phys_units_state % 0=start 1=suffix 2=operator 3=unit 4=prefix 5=number
+\newconditional\c_phys_units_quantity
+\newconditional\c_phys_units_number
+\newconditional\c_phys_units_dospace
+
+% [\unit {micro ohm}]\par % no space before unit
+% [10\unit {micro ohm}]\par % no space before unit
+% [10 \unit{micro ohm}]\par % space before unit
+% [ \unit {micro ohm}]\par % space before unit
+% [\unit{10 micro ohm}]\par % space before unit
+
+\frozen\protected\def\unitssmallspace {\thinspace}
+\frozen\protected\def\unitsmediumspace{\medspace}
+\frozen\protected\def\unitsbigspace {\thickspace}
+\frozen\protected\def\unitsbackspace {\negthinspace}
+
+\permanent\protected\def\installunitsseparator#1#2%
+ {\defcsname\??unitseparator#1\endcsname{#2}}
+
+\protected\def\phys_units_separator
+ {\ifcsname\??unitseparator\unitparameter\c!separator\endcsname\lastnamedcs\else\cdot\fi}
+
+\installunitsseparator\v!normal {\cdot}
+\installunitsseparator\v!big {\unitsbigspace}
+\installunitsseparator\v!medium {\unitsmediumspace}
+\installunitsseparator\v!small {\unitssmallspace}
+\installunitsseparator\v!none {}
+
+\permanent\protected\def\installunitsspace#1#2%
+ {\defcsname\??unitspace#1\endcsname{#2}}
+
+\protected\def\phys_units_space
+ {\unskip % weird, why is unskip needed
+ \ifcsname\??unitspace\unitparameter\c!space\endcsname\lastnamedcs\else\unitsmediumspace\fi}
+
+\installunitsspace\v!normal{\unitsmediumspace}
+\installunitsspace\v!big {\unitsbigspace}
+\installunitsspace\v!medium{\unitsmediumspace}
+\installunitsspace\v!small {\unitssmallspace}
+\installunitsspace\v!none {}
+
+\newtoks \everyunits % we keep the old \units command so we need a longer one
+
+\appendtoks
+ \disablemathpunctuation
+ \nocharacteralign
+\to \everyunits
+
+\appendtoks
+ \frozen\instance\setuevalue\currentunit{\phys_units_direct{\currentunit}}
+\to \everydefineunit
+
+\protected\def\phys_units_direct#1%
+ {\begingroup
+ \the\everyunits
+ \ifdim\lastskip>\zeropoint
+ \settrue\c_phys_units_dospace
+ \removelastskip
+ \fi
+ \c_phys_digits_method\unitparameter\c!method\relax
+ \ifmmode\else\dontleavehmode\fi
+ \edef\currentunit{#1}%
+ \enforced\edef\unitlanguage{\unitparameter\s!language}%
+ \enforced\let\prefixlanguage\unitlanguage
+ \enforced\let\operatorlanguage\unitlanguage
+% \the\everyunits
+ %\removeunwantedspaces % not ok yet
+ \useunitstyleandcolor\c!style\c!color
+ \edef\scratchstringone{\unitparameter\c!alternative}%
+ \ifmmode
+ \ifx\scratchstringone\v!text
+ \expandafter\expandafter\expandafter\phys_units_direct_text_in_math
+ \else
+ \expandafter\expandafter\expandafter\phys_units_direct_math
+ \fi
+ \else
+ \ifx\scratchstringone\v!mathematics
+ \expandafter\expandafter\expandafter\phys_units_direct_math_in_text
+ \else
+ \expandafter\expandafter\expandafter\phys_units_direct_text
+ \fi
+ \fi}
+
+\protected\def\phys_units_direct_text_in_math#1%
+ {\mathtext{%
+ \c_phys_units_mode\plustwo
+ \phys_units_indeed{#1}%
+ \phys_units_finish
+ }%
+ \endgroup}
+
+\protected\def\phys_units_direct_math#1%
+ {\c_phys_units_mode\plusone
+ \rm\tf % slow
+ \mathtf
+ \phys_units_indeed{#1}%
+ \phys_units_finish
+ \endgroup}
+
+\protected\def\phys_units_direct_text#1%
+ {\phys_units_indeed{#1}%
+ \phys_units_finish
+ \endgroup}
+
+\protected\def\phys_units_direct_math_in_text#1%
+ {\removeunwantedspaces % brr
+ \startimath
+ \c_phys_units_mode\plusthree
+ \rm\tf
+ \mathtf
+ \phys_units_indeed{#1}%
+ \phys_units_finish
+ \stopimath
+ \endgroup}
+
+\protected\def\phys_units_direct_nested#1#2%
+ {\phys_units_indeed{#2}}
+
+\appendtoks
+ \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}}}
+
+\permanent\protected\def\digitstextbinnop#1%
+ {\ifmmode#1\else#1\fourperemspace\fi}
+
+\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
+\permanent\protected\def\unitsPS #1#2{\phys_units_next\prefixtext{#1}\unitsraise{\suffixtext{#2}}\c_phys_units_state\plusone} % suffix
+\permanent\protected\def\unitsUS #1#2{\phys_units_next\unittext{#1}\unitsraise{\suffixtext{#2}}\c_phys_units_state\plusone} % suffix
+\permanent\protected\def\unitsP #1{\phys_units_next\prefixtext{#1}1\c_phys_units_state\plusfour} % prefix
+\permanent\protected\def\unitsU #1{\phys_units_next\unittext{#1}\c_phys_units_state\plusthree} % unit
+\permanent\protected\def\unitsS #1{\phys_units_start{}\unitsraise{\suffixtext{#1}}\c_phys_units_state\plusone} % suffix
+\permanent\protected\def\unitsO #1{\phys_units_start\operatortext{#1}\c_phys_units_state\plustwo} % operator
+%permanent\protected\def\unitsN #1{\phys_units_start#1\c_phys_units_state\plusfive} % number
+\permanent\protected\def\unitsC #1{\removeunwantedspaces\unittext{#1}\c_phys_units_state\plussix} % connected
+\permanent\protected\def\unitsQ #1{\removeunwantedspaces\unitslower{#1}\c_phys_units_state\zerocount}
+\permanent\protected\def\unitsR #1#2{% todo: tagging
+ \ifmmode
+ #2%
+ \orelse\ifnum#1=\plusone
+ \digitstextbinop{#2}% before and after
+ \else
+ \digitstextbinnop{#2}% after
+ \fi
+ \c_phys_units_state\zerocount
+ \setfalse\c_phys_units_dospace
+ \setfalse\c_phys_units_number
+ \setfalse\c_phys_units_quantity}
+\permanent\protected\def\unitsRPM {\unitsR\plusone {±}} % todo: symbols
+\permanent\protected\def\unitsRTO {\unitsR\plusone {–}} % todo: symbols
+\permanent\protected\def\unitsRabout {\unitsR\zerocount{±}} % todo: symbols
+\permanent\protected\def\unitsPopen {(}
+\permanent\protected\def\unitsPclose {)}
+\permanent\protected\def\unitrange #1{}
+
+% Fonts can have a celsius and lack a fahrenheit symbol and as we want to be
+% consistent so we check for the counterparts as well. It's slow but ok. Of course
+% we could go virtual instead.
+
+\permanent\protected\def\phys_units_text_prime {\textacute}
+\permanent\protected\def\phys_units_text_doubleprime{\textacute\kern-.25em\textacute}
+\permanent\protected\def\phys_units_text_celsius {°C}
+\permanent\protected\def\phys_units_text_fahrenheit {°F}
+
+\permanent\protected\def\checkedtextprime
+ {\iffontchar\font"2032\relax\iffontchar\font"2033\relax
+ ′\else\phys_units_text_prime\fi\else\phys_units_text_prime
+ \fi}
+
+\permanent\protected\def\checkedtextdoubleprime
+ {\iffontchar\font"2033\relax\iffontchar\font"2032\relax
+ ″\else\phys_units_text_doubleprime\fi\else\phys_units_text_doubleprime
+ \fi}
+
+% \permanent\protected\def\checkedtextcelsius
+% {\ifmmode
+% \phys_units_text_celsius
+% \orelse\iffontchar\font"2103\relax
+% ℃\else\phys_units_text_celsius
+% \fi}
+%
+% \permanent\protected\def\checkedtextfahrenheit
+% {\ifmmode
+% \phys_units_text_fahrenheit
+% \orelse\iffontchar\font"2109\relax
+% ℉\else\phys_units_text_fahrenheit
+% \fi}
+%
+% % but, as users don't like this ...
+
+\aliased\let\checkedtextcelsius \phys_units_text_celsius
+\aliased\let\checkedtextfahrenheit\phys_units_text_fahrenheit
+
+\setelementnature[unit] [mixed]
+\setelementnature[quantity][mixed]
+
+\let\phys_units_finish\relax
+
+\permanent\protected\def\unitsNstartindeed
+ {\ifmmode \else
+ \settrue\c_phys_units_quantity
+ \dostarttagged\t!quantity\empty
+ \settrue\c_phys_units_number
+ \dostarttagged\t!number\empty
+ \fi}
+
+\permanent\protected\def\unitsNstop
+ {\ifconditional\c_phys_units_number
+ \setfalse\c_phys_units_number
+ \dostoptagged
+ \fi
+ \c_phys_units_state\plusfive}
+
+% This is a hack: for some reason \unit {micro meter} like patterns give
+% \unitsNstart \unitsNstop so there is a buglet in the parser
+
+% \aliased\let\unitsNstartindeed\unitsNstart
+
+\permanent\protected\def\unitsNstart
+ {\doifelsenextchar\unitsNstop\gobbleoneargument\unitsNstartindeed}
+
+% End of hack.
+
+\permanent\protected\def\unitsNspace
+ {\space}
+
+\permanent\protected\def\unitsN#1%
+ {\unitsNstart#1\unitsNstop}
+
+\def\phys_units_start
+ {\ifmmode
+ \dostarttagged\t!maction\t!unit
+ \bgroup % make an mrow
+ \else
+ \dostarttagged\t!unit\empty
+ \fi
+ \let\phys_units_finish\phys_units_stop
+ \let\phys_units_start\relax}
+
+\def\phys_units_stop
+ {\ifconditional\c_phys_units_number
+ \setfalse\c_phys_units_number
+ \dostoptagged
+ \fi
+ \ifconditional\c_phys_units_quantity
+ \setfalse\c_phys_units_quantity
+ \dostoptagged
+ \fi
+ \dostoptagged
+ \ifmmode
+ \egroup
+ \fi}
+
+\permanent\def\unitsraise
+ {\ifcase\c_phys_units_mode
+ \expandafter\unitshigh
+ \or
+ \expandafter\normalsuperscript
+ \or
+ \expandafter\unitshigh
+ \or
+ \expandafter\normalsuperscript
+ \fi}
+
+\permanent\def\unitslower
+ {\ifcase\c_phys_units_mode
+ \expandafter\unitslow
+ \or
+ \expandafter\normalsubscript
+ \or
+ \expandafter\unitslow
+ \or
+ \expandafter\normalsubscript
+ \fi}
+
+\protected\def\phys_units_next
+ {\ifcase\c_phys_units_state % start
+ \ifconditional\c_phys_units_dospace
+ % \ifdim\lastskip=\zeropoint
+ \phys_units_space
+ % \else
+ % % too tricky ... we could remove and add
+ % \fi
+ \fi
+ \or % 1: suffix
+ {\phys_units_separator}%
+ \or % 2: operator
+ \or % 3: unit
+ {\phys_units_separator}%
+ \or % 4: prefix
+ \or % 5: number
+ \phys_units_space
+ \or % 6: symbol (connected)
+ \fi
+ \setfalse\c_phys_units_dospace
+ \phys_units_start}
+
+\permanent\protected\def\unitsTIMES
+ {\ifnum\c_phys_units_state=\plusone % suffix
+ \else
+ \unitssmallspace
+ \fi
+ \cdot} % or \times
+
+\permanent\protected\def\unitsOUTOF
+ {\ifnum\c_phys_units_state=\plusone % suffix
+ \else
+ \unitssmallspace
+ \fi
+ :}
+
+\permanent\protected\def\unitsSOLIDUS
+ {\ifnum\c_phys_units_state=\plusone % suffix
+ \unitsbackspace
+ \fi
+ {/}%
+ }%\unitsbackspace}
+
+\definelabelclass [unit] [2]
+\definelabelclass [operator] [2]
+\definelabelclass [prefix] [2]
+\definelabelclass [suffix] [2] % This is only a label because we want to show them in a table.
+
+\clf_definelabels{prefix}{prefixes}\s!false\relax
+\clf_definelabels{unit}{units}\s!false\relax
+\clf_definelabels{operator}{operators}\s!false\relax
+\clf_definelabels{suffix}{suffixes}\s!false\relax
+
+%D You can define additional units:
+%D
+%D \starttyping
+%D \registerunit
+%D [unit]
+%D [point=point,
+%D basepoint=basepoint,
+%D scaledpoint=scaledpoint,
+%D didot=didot,
+%D cicero=cicero]
+%D \stoptyping
+%D
+%D Possible categories are: \type {prefix}, \type {unit}, \type {operator}, \type
+%D {suffix}, \type {symbol},\type {packaged}. You also need to define labels:
+%D
+%D \starttyping
+%D \setupunittext
+%D [point=pt,
+%D basepoint=bp,
+%D scaledpoint=sp,
+%D didot=dd,
+%D cicero=cc]
+%D \stoptyping
+
+\permanent\tolerant\protected\def\registerunit[#1]#*[#2]% todo: public implementer
+ {\clf_registerunit{#1}{#2}}
+
+%D You can generate a list as follows:
+%D
+%D \starttyping
+%D \usemodule[phy-01]
+%D
+%D \ShowUnitsTable % [prefixes]
+%D \stoptyping
+
+%D Now we define the standard units command:
+
+\defineunit
+ [unit]
+
+%D Example:
+%D
+%D \startbuffer[definitions]
+%D \startluacode
+%D languages.data.labels.prefixes.whatever = {
+%D Kilo = "olik"
+%D }
+%D
+%D languages.data.labels.units.whatever = {
+%D Meter = "retem",
+%D Second = "dnoces",
+%D }
+%D
+%D languages.data.labels.operators.whatever = {
+%D Solidus = " rep "
+%D }
+%D \stopluacode
+%D \stopbuffer
+%D
+%D \startbuffer[sample]
+%D \startlines
+%D \lunit{10 km/s}
+%D \lunit{10 Kilo Meter/s}
+%D \lunit{10 kilo Meter/s}
+%D \lunit{10 Kilo m/s}
+%D \lunit{10 k Meter/s}
+%D \stoplines
+%D \stopbuffer
+%D
+%D \typebuffer[definitions] \getbuffer[definitions]
+%D
+%D \startbuffer
+%D \typebuffer[sample]
+%D
+%D \defineunits[lunit] \getbuffer[sample]
+%D \defineunits[lunit][label=test] \getbuffer[sample]
+%D \defineunits[lunit][label=whatever] \getbuffer[sample]
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D Another example:
+%D
+%D \starttyping
+%D \startluacode
+%D languages.data.labels.units.foo = {
+%D Liter = "l"
+%D }
+%D languages.data.labels.units.bar = {
+%D Liter = "L"
+%D }
+%D \stopluacode
+%D
+%D \defineunits[lunit] \lunit{10 l/s}\par
+%D \defineunits[funit][label=foo] \funit{10 l/s}\par
+%D \defineunits[bunit][label=bar] \bunit{10 l/s}\par
+%D \stoptyping
+
+%D Bonus:
+%D
+%D \starttyping
+%D \pi\ = \hyphenateddigits[\unknown]{3.141592653589793238462643383279502884197169399375105} \blank
+%D \pi\ = \hyphenateddigits{3.141592653589793238462643383279502884197169399375105} \blank
+%D x $\pi = \hyphenateddigits[\unknown]{3.141592653589793238462643383279502884197169399375105}$ \blank
+%D x $\pi = \hyphenateddigits{3.141592653589793238462643383279502884197169399375105}$ \blank
+%D \stoptyping
+
+\mutable\protected\def\digitsbreak{\hskip\zeropoint\s!plus\onepoint\relax\ifmmode\allowbreak\fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/publ-inc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/publ-inc.mkxl
new file mode 100644
index 00000000000..9beae595fa2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/publ-inc.mkxl
@@ -0,0 +1,63 @@
+%D \module
+%D [ file=publ-inc,
+%D version=2018.06.23,
+%D title=\CONTEXT\ Publication Macros,
+%D subtitle=XML inclusion,
+%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 Publication Macros / XML inclusion}
+
+\registerctxluafile{publ-inc}{}
+
+%D A teaser for Alan.
+
+\unprotect
+
+\definesymbol[btxattachment][{\infofont\darkred btx}]
+\definesymbol[btxcomment] [{\infofont\darkblue btx}]
+
+\protected\def\btx_add_blob#1#2%
+ {\relax
+ \clf_btxentrytobuffer{\currentbtxdataset}{\currentbtxtag}{temp-btx-export}%
+ #2%
+ [\c!symbol=#1,%
+ \c!space=\v!yes,
+ \c!buffer=temp-btx-export,%
+ \c!name={\currentbtxtag.bib}]%
+ \relax}
+
+\permanent\protected\def\btxattach
+ {\iftrialtypesetting\orelse\ifexporting\iflocation
+ \dostarttagged\t!ignore\empty
+ \btx_add_blob{btxattachment}\attachment
+ \dostoptagged
+ \fi\fi}
+
+\permanent\protected\def\btxcomment
+ {\iftrialtypesetting\orelse\ifexporting\iflocation
+ \dostarttagged\t!ignore\empty
+ \btx_add_blob{btxcomment}\comment
+ \dostoptagged
+ \fi\fi}
+
+%D This kind of feature creep is not yet configurable, nor documented.
+
+\permanent\protected\def\btxaddsource
+ {\iftrialtypesetting\orelse\ifexporting\iflocation
+ \dostarttagged\t!ignore\empty
+ \llap{%
+ \btx_add_blob{btxattachment}\attachment
+ \quad
+ \btx_add_blob{btxcomment}\comment
+ \hskip\leftmargindistance
+ }%
+ \dostoptagged
+ \fi\fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl
new file mode 100644
index 00000000000..2f4d817f24b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/publ-ini.mkxl
@@ -0,0 +1,2038 @@
+%D \module
+%D [ file=publ-ini,
+%D version=2013.05.12,
+%D title=\CONTEXT\ Publication Support,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% TODO: some clf_ can be public implementers instead
+
+% TODO: s! vs v! for default and neutral key/values
+% todo: too many refs in list
+
+% TODO A.-B. Foo (dash as connector, see JMH)
+
+% todo: no need for all these %'s
+
+% todo: tagging
+% todo: we cannot use 'default' as this wipes metadata names (maybe no longer do that)
+% todo: \v!cite => \s!cite
+% todo: interface with (ml)bibtex (export -> call -> import)
+% todo: check if 'all' etc are ok ... either use list or use other criterium
+% todo: \the\everysetupbtxciteplacement probably too often
+
+% \definecolor[btx:field] [darkred]
+% \definecolor[btx:crossref][darkblue]
+% \definecolor[btx:key] [darkgreen]
+% \definecolor[btx:todo] [darkyellow]
+
+%D We operate on several axis:
+%D
+%D \startitemize[packed]
+%D \startitem we can have several databases (or combinations) \stopitem
+%D \startitem we can add entries to them if needed (coded in tex) \stopitem
+%D \startitem we can have several lists each using one of the databases \stopitem
+%D \startitem we can render each list or citation independently \stopitem
+%D \stopitemize
+%D
+%D We assume that the rendering of a list entry is consistent in a document,
+%D although one can redefine properties if needed. Adding more granularity would
+%D complicate the user interface beyond comprehension.
+
+\writestatus{loading}{ConTeXt Publication Support / Initialization}
+
+\registerctxluafile{publ-dat}{}
+\registerctxluafile{publ-ini}{}
+\registerctxluafile{publ-sor}{}
+\registerctxluafile{publ-aut}{}
+\registerctxluafile{publ-usr}{}
+\registerctxluafile{publ-oth}{} % this could become an option
+\registerctxluafile{publ-fnd}{} % new method (for the moment only local)
+\registerctxluafile{publ-jrn}{}
+\registerctxluafile{publ-reg}{}
+\registerctxluafile{publ-tra}{} % has more general helpers too
+
+\unprotect
+
+\startcontextdefinitioncode
+
+%D These are currently not interfaced.
+
+\definesystemconstant {btx}
+
+\definesystemconstant {btxset}
+\definesystemconstant {btxref}
+\definesystemconstant {btxint}
+\definesystemconstant {btxltx}
+\definesystemconstant {btxrtx}
+\definesystemconstant {btxatx}
+\definesystemconstant {btxbtx}
+\definesystemconstant {btxspc}
+\definesystemconstant {btxlst}
+\definesystemconstant {btxcom}
+
+\defineinterfacevariable {btxcite} {btxcite}
+\defineinterfacevariable {btxlist} {btxlist}
+\defineinterfacevariable {btxrendering} {btxrendering}
+
+\definelabelclass[btxlabel][2]
+
+\clf_definelabels{btxlabel}{btx}\s!false\relax
+
+% It is not that trivial to come up with a proper organization of setup
+% and control commands for publications. This is because we have complex
+% inline as well as extensive list rendering. The rules are partially
+% driven by somewhat archaic bibtex specifications and evolving journal
+% (or field) specific demands. The logic in the standards is often so
+% complex that it looks like manual rendering is assumed. But, we want to
+% automate the process as much as possible.
+%
+% Another complication is that in manuals we want to demonstrate different
+% properties of the implementation and therefore we need a way to handle
+% independent standards, databases, etc. This has resulted in the following
+% organization:
+%
+% - general setup (rather minimal)
+% - list setup (rendering)
+% - cite setup
+% - dataset setup
+%
+% The rendering is mostly driven by setups. In there we can call for fields
+% in the database but also for virtual fields or combinations.
+
+% The main rendering style (standard driven).
+
+%D We assume that a specification is global or used grouped. It doesn't make much sense
+%D to split between cite and list here as it only complicates matters (timing) and is
+%D not clear either.
+
+\mutable\let\currentbtxspecification \empty
+\mutable\let\currentbtxspecificationfallback\empty
+
+\installmacrostack\currentbtxspecification
+\installmacrostack\currentbtxspecificationfallback
+
+\permanent\protected\def\startbtxrenderingdefinitions[#1]%
+ {\unprotect
+ \push_macro_currentbtxspecification
+ \edef\currentbtxspecification{#1}}
+
+\permanent\protected\def\stopbtxrenderingdefinitions
+ {\pop_macro_currentbtxspecification
+ \protect}
+
+\permanent\protected\def\loadfoundpublicationfile#1#2% name foundname / not a user command
+ {\input{#2}}
+
+\permanent\protected\def\loadbtxdefinitionfile [#1]{\clf_btxloaddefinitionfile {#1}} % can be public implementer
+\permanent\protected\def\loadbtxreplacementfile[#1]{\clf_btxloadreplacementfile{#1}} % can be public implementer
+
+\protected\def\publ_specification_push#1%
+ {\push_macro_currentbtxspecification
+ \push_macro_currentbtxspecificationfallback
+ \edef\currentbtxspecification{#1}%
+ \edef\currentbtxspecificationfallback{\namedbtxparameter\currentbtxspecification\c!default}%
+ \ifx\currentbtxspecificationfallback\currentbtxspecification
+ \let\currentbtxspecificationfallback\empty
+ \fi
+ \clf_btxsetspecification{\currentbtxspecification}}
+
+\protected\def\publ_specification_pop
+ {\pop_macro_currentbtxspecificationfallback
+ \pop_macro_currentbtxspecification
+ \clf_btxsetspecification{\currentbtxspecification}}
+
+\protected\def\publ_specification_set#1% beware: is global
+ {\edef\currentbtxspecification{#1}%
+ \edef\currentbtxspecificationfallback{\namedbtxparameter\currentbtxspecification\c!default}%
+ \ifx\currentbtxspecificationfallback\currentbtxspecification
+ \let\currentbtxspecificationfallback\empty
+ \fi
+ % has to be done explicitly: \loadbtxdefinitionfile[\currentbtxspecification]%
+ \ifempty\currentbtxspecification
+ % we set default at the end
+ \else
+ \clf_btxsetspecification{\currentbtxspecification}%
+ \fi}% todo: ,true == also load
+
+\installcorenamespace {btx}
+
+\installswitchcommandhandler \??btx {btx} \??btx
+
+% because we have lots of setups we provide a checker for sloppy users
+
+\protected\def\btx_check_chain#1#2#3%
+ {\doifelsesomething{#3}
+ {\writestatus{btx #1}{defining\space"#2"\space as\space descendant\space of\space"#3"}% we're in definition regime (no space)
+ \definebtx[#2][#3]}
+ {\writestatus{btx #1}{defining\space"#2"}%
+ \definebtx[#2]}}
+
+% \protected\def\btxcheckdefine#1#2{\doifelsecommandhandler\??btx{#1}\donothing{\btx_check_chain{define}{#1}{#2}}}
+% \protected\def\btxchecksetup #1#2{\doifelsecommandhandler\??btx{#1}\donothing{\btx_check_chain {setup}{#1}{#2}}}
+
+\permanent\protected\def\btxcheckdefine#1{\doifelsecommandhandler\??btx{#1}\gobbleoneargument{\btx_check_chain{define}{#1}}} % {#2}
+\permanent\protected\def\btxchecksetup #1{\doifelsecommandhandler\??btx{#1}\gobbleoneargument{\btx_check_chain {setup}{#1}}} % {#2}
+
+% for the moment experimental:
+
+\permanent\protected\def\btxenableautodefine
+ {\prependtoks
+ \clf_checkinterfacechain{\currentbtx}{btxcheckdefine}%
+ \to \everydefinebtx
+ \prependtoks
+ \ifnum\btxsetupmode=\doingrootsetupnamed
+ \clf_checkinterfacechain{\currentbtx}{btxchecksetup}%
+ \fi
+ \to \everysetupbtx
+ \let\btxenableautodefine\relax}
+
+\appendtoks
+ \ifnum\btxsetupmode=\doingrootsetuproot
+ \publ_specification_set{\btxparameter\c!specification}%
+ \orelse\ifnum\btxsetupmode=\doingrootsetupnamed
+ \doifelsecommandhandler\??btx\currentbtx
+ {\publ_specification_set{\btxparameter\c!specification}}%
+ {}% maybe a warning
+ \fi
+\to \everysetupbtx
+
+\appendtoks
+ \ifnum\btxsetupmode=\doingrootsetuproot
+ \edef\currentbtxdataset{\clf_btxsetdataset{\btxparameter\c!dataset}{\currentbtxdataset}}%
+ \fi
+\to \everysetupbtx
+
+\appendtoks
+ \publ_specification_set{\btxparameter\c!specification}%
+\to \everyjob
+
+\permanent\protected\def\startusingbtxspecification[#1]%
+ {\publ_specification_push{#1}}
+
+\permanent\protected\def\stopusingbtxspecification
+ {\publ_specification_pop}
+
+% \setupbtxlist[alternative=paragraph,width=auto,distance=\emwidth]
+% \setupbtxlist[alternative=paragraph,width=auto,distance=\emwidth,margin=2em] % useless
+% \setupbtxlist[alternative=paragraph,width=fit,distance=\emwidth]
+% \setupbtxlist[alternative=paragraph,width=fit,distance=\emwidth,margin=2em]
+
+% here starts the bib stuff
+
+\installcorenamespace {btxdataset}
+\installcorenamespace {btxrendering}
+\installcorenamespace {btxregister}
+\installcorenamespace {btxcommand}
+\installcorenamespace {btxrenderingdefinition}
+
+\installcommandhandler \??btxdataset {btxdataset} \??btxdataset
+\installcommandhandler \??btxregister {btxregister} \??btxregister
+\installcommandhandler \??btxrendering {btxrendering} \??btxrendering
+
+\permanent\protected\def\setbtxparameterset#1#2%
+ {\edef\currentbtx
+ {\ifcsname\??btx\currentbtxspecification:#1:#2:\s!parent\endcsname
+ \currentbtxspecification:%
+ \orelse\ifempty\currentbtxspecificationfallback
+ \orelse\ifcsname\??btx\currentbtxspecificationfallback:#1:#2:\s!parent\endcsname
+ \currentbtxspecificationfallback:%
+ \fi#1:#2}}
+
+\permanent\protected\def\setbtxparametersetroot#1%
+ {\edef\currentbtx
+ {\ifcsname\??btx\currentbtxspecification:#1:\s!parent\endcsname
+ \currentbtxspecification:#1%
+ \orelse\ifempty\currentbtxspecificationfallback
+ \orelse\ifcsname\??btx\currentbtxspecificationfallback:#1:\s!parent\endcsname
+ \currentbtxspecificationfallback:#1%
+ \fi}}
+
+\permanent\protected\def\setbtxrendering
+ {\edef\currentbtxrendering
+ {\ifcsname\??btx\currentbtxspecification:\s!parent\endcsname
+ \currentbtxspecification
+ \orelse\ifempty\currentbtxspecificationfallback
+ \orelse\ifcsname\??btx\currentbtxspecificationfallback:\s!parent\endcsname
+ \currentbtxspecificationfallback
+ \fi}}
+
+\permanent\protected\def\setbtxlist % maybe simplify this one, always list=rendering?
+ {\edef\currentbtxlist
+ {\ifcsname\??btx\currentbtxrendering:\s!parent\endcsname
+ \currentbtxrendering
+ \orelse\ifcsname\??btx\currentbtxspecification:\s!parent\endcsname
+ \currentbtxspecification
+ \orelse\ifempty\currentbtxspecificationfallback
+ \orelse\ifcsname\??btx\currentbtxspecificationfallback:\s!parent\endcsname
+ \currentbtxspecificationfallback
+ \fi}%
+ \edef\currentlist{\s!btx:\currentbtxlist}}
+
+\tolerant\permanent\protected\def\usebtxdataset[#1]#*[#2]#*[#3]%
+ {\begingroup
+ \getdummyparameters[\c!specification=\currentbtxspecification,#3]%
+ \ifparameter#2\or
+ \clf_btxusedataset
+ specification {\dummyparameter\c!specification}%
+ dataset {#1}%
+ filename {#2}%
+ \relax
+ \orelse\ifparameter#1\or
+ \clf_btxusedataset
+ specification {\dummyparameter\c!specification}%
+ dataset {\v!default}%
+ filename {#1}%
+ \relax
+ \fi
+ \endgroup}
+
+\definebtxdataset
+ [\v!default]
+% [\c!language=] % nothing set so use current
+
+% \usebtxdataset
+% [default]
+% [mybibs.bib]
+
+%D These can be overloaded in the traditional module so we go \type {\frozen}
+%D instead of \type {\permanent}.
+
+\frozen\let\stoppublication\relax
+
+\frozen\tolerant\protected\def\startpublication[#1]#*[#2]%
+ {\begingroup
+ \catcode\commentasciicode\othercatcode
+ \ifparameters
+ \expandafter\publ_set_publication_default
+ \or
+ \expandafter\publ_set_publication_checked
+ \or
+ \expandafter\publ_set_publication_indeed
+ \fi{#1}{#2}}
+
+\def\publ_set_publication_default#1#2%
+ {\publ_set_publication_indeed\v!default{#1}}
+
+\def\publ_set_publication_checked#1#2%
+ {\doifelseassignment{#1}
+ {\publ_set_publication_indeed\v!default{#1}}
+ {\publ_set_publication_indeed{#1}{}}}
+
+\def\publ_set_publication_indeed#1#2#3\stoppublication
+ {\clf_btxaddentry{#1}{#2}{\detokenize{#3}}%
+ \endgroup
+ \ignorespaces}
+
+% commands
+
+\permanent\protected\def\btxcommand#1%
+ {\ifcsname\??btxcommand#1\endcsname
+ \expandafter\publ_command_yes
+ \else
+ \expandafter\publ_command_nop
+ \fi{#1}}
+
+\newtoks\t_btx_cmd
+\newbox \b_btx_cmd
+
+\t_btx_cmd{\global\setbox\b_btx_cmd\hpack{\clf_btxcmdstring}}
+
+\aliased\let\btxcmd\btxcommand
+
+\def\publ_command_yes#1%
+ {\csname\??btxcommand#1\endcsname}
+
+\def\publ_command_nop#1%
+ {\ifcsname#1\endcsname
+ \showmessage\m!publications{10}{#1,#1}%
+ \gletcsname\??btxcommand#1\expandafter\endcsname\csname#1\endcsname
+ \orelse\ifcsname\utfupper{#1}\endcsname
+ \showmessage\m!publications{10}{#1}{\utfupper{#1}}%
+ \gletcsname\??btxcommand#1\expandafter\endcsname\csname\utfupper{#1}\endcsname
+ \else
+ \showmessage\m!publications{11}{#1}%
+ \setugvalue{\??btxcommand#1}{\underbar{\tttf#1}}%
+ \fi
+ \publ_command_yes{#1}}
+
+\permanent\protected\def\definebtxcommand#1% {body} #1..#n{body}
+ {\setuvalue{\??btxcommand\csstring#1}}%
+
+% access
+
+\let\currentbtxtag \empty
+\let\currentbtxdataset\v!default
+
+\permanent\protected\def\setbtxentry[#1]% or maybe btxsetentry
+ {\edef\currentbtxtag{\clf_btxsetentry{\currentbtxdataset}{#1}}}
+
+% \let\btxsetdataset\setbtxdataset
+% \let\btxsetentry \setbtxentry
+
+% todo: no need for the currents as we can keep them at the lua end so we will have
+%
+% \btxfield : current
+% \btxspecificfield : dataset,tag,key
+
+% todo we can pick up the current's at the lua end (implementers)
+
+%permanent\def\btxfield #1{\clf_btxfield {\currentbtxdataset}{\currentbtxtag}{#1}}
+%permanent\def\btxdetail #1{\clf_btxdetail {\currentbtxdataset}{\currentbtxtag}{#1}}
+%permanent\def\btxflush #1{\clf_btxflush {\currentbtxdataset}{\currentbtxtag}{#1}}
+%permanent\def\btxdirect #1{\clf_btxdirect {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\def\btxfieldname #1{\clf_btxfieldname {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\def\btxfieldtype #1{\clf_btxfieldtype {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\def\btxfoundname #1{\clf_btxfoundname {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\def\btxfoundtype #1{\clf_btxfoundtype {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\def\btxauthorfield#1{\clf_btxauthorfield \currentbtxauthorindex{#1}}
+\permanent\def\btxdoifelse #1{\clf_btxdoifelse {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\def\btxdoif #1{\clf_btxdoif {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\def\btxdoifnot #1{\clf_btxdoifnot {\currentbtxdataset}{\currentbtxtag}{#1}}
+
+\aliased\let\btxsetup\fastsetup
+
+\permanent\def\btxrawfield #1{\clf_btxfield {\currentbtxdataset}{\currentbtxtag}{#1}}
+
+\permanent\def\btxfield #1{\dostarttagged\t!pubfld{#1}\clf_btxfield {\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
+\permanent\def\btxdetail #1{\dostarttagged\t!pubfld{#1}\clf_btxdetail{\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
+\permanent\def\btxflush #1{\dostarttagged\t!pubfld{#1}\clf_btxflush {\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
+\permanent\def\btxdirect #1{\dostarttagged\t!pubfld{#1}\clf_btxdirect{\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
+%permanent\def\btxauthorfield#1{\dostarttagged\t!pubfld{#1}\clf_btxauthorfield \currentbtxauthorindex{#1}\dostoptagged}
+
+% Also possible but inefficient:
+%
+% \permanent\def\btxfield #1{\localcontrolled{\dostarttagged\t!pubfld{#1}}\clf_btxfield {\currentbtxdataset}{\currentbtxtag}{#1}\localcontrolled{\dostoptagged}}
+% \permanent\def\btxdetail #1{\localcontrolled{\dostarttagged\t!pubfld{#1}}\clf_btxdetail{\currentbtxdataset}{\currentbtxtag}{#1}\localcontrolled{\dostoptagged}}
+% \permanent\def\btxflush #1{\localcontrolled{\dostarttagged\t!pubfld{#1}}\clf_btxflush {\currentbtxdataset}{\currentbtxtag}{#1}\localcontrolled{\dostoptagged}}
+% \permanent\def\btxdirect #1{\localcontrolled{\dostarttagged\t!pubfld{#1}}\clf_btxdirect{\currentbtxdataset}{\currentbtxtag}{#1}\localcontrolled{\dostoptagged}}
+% %permanent\def\btxauthorfield#1{\localcontrolled{\dostarttagged\t!pubfld{#1}}\clf_btxauthorfield \currentbtxauthorindex{#1}\localcontrolled{\dostoptagged}}
+
+%D How complex will we go? Can we assume that e.g. an apa style will not be mixed
+%D with another one? I think this assumption is okay. For manuals we might want to
+%D mix but we can work around it.
+
+%D Rendering.
+
+\permanent\protected\def\btxspace {\removeunwantedspaces\space}
+\permanent\protected\def\btxnobreakspace {\removeunwantedspaces\nobreakspace} % these two are
+\permanent\protected\def\btxnbsp {\removeunwantedspaces\nbsp} % the same anyway
+\permanent\protected\def\btxperiod {\removeunwantedspaces.\space}
+\permanent\protected\def\btxcomma {\removeunwantedspaces,\space}
+\permanent\protected\def\btxcommabreak {\removeunwantedspaces,\hskip\zeropoint plus .5\emwidth\relax}
+\permanent\protected\def\btxcolon {\removeunwantedspaces:\space}
+\permanent\protected\def\btxsemicolon {\removeunwantedspaces;\space}
+\permanent\protected\def\btxlparent {\removeunwantedspaces\space(} % obsolete
+\permanent\protected\def\btxrparent {\removeunwantedspaces)\space} % obsolete
+\permanent\protected\def\btxleftparenthesis {\removeunwantedspaces\space(}
+\permanent\protected\def\btxrightparenthesis {\removeunwantedspaces)\space}
+\permanent\protected\def\btxrightparenthesisperiod{\removeunwantedspaces).\space}
+\permanent\protected\def\btxrightparenthesiscomma {\removeunwantedspaces),\space}
+\permanent\protected\def\btxleftbracket {\removeunwantedspaces\space[}
+\permanent\protected\def\btxrightbracket {\removeunwantedspaces]\space}
+\permanent\protected\def\btxrightbracketperiod {\removeunwantedspaces].\space}
+\permanent\protected\def\btxrightbracketcomma {\removeunwantedspaces],\space}
+
+%D Variables:
+
+\mutable\let\currentbtxbacklink \empty \permanent\protected\def\btxsetbacklink {\def\currentbtxbacklink}
+\mutable\let\currentbtxcategory \empty \permanent\protected\def\btxsetcategory {\def\currentbtxcategory}
+\mutable\let\currentbtxcombis \empty \permanent\protected\def\btxsetcombis {\def\currentbtxcombis}
+\mutable\let\currentbtxdataset \empty \permanent\protected\def\btxsetdataset {\def\currentbtxdataset}
+\mutable\let\currentbtxfirst \empty \permanent\protected\def\btxsetfirst {\def\currentbtxfirst}
+\mutable\let\currentbtxsecond \empty \permanent\protected\def\btxsetsecond {\def\currentbtxsecond}
+\mutable\let\currentbtxsuffix \empty \permanent\protected\def\btxsetsuffix {\def\currentbtxsuffix}
+\mutable\let\currentbtxinternal \empty \permanent\protected\def\btxsetinternal {\def\currentbtxinternal}
+\mutable\let\currentbtxlefttext \empty \permanent\protected\def\btxsetlefttext {\def\currentbtxlefttext}
+\mutable\let\currentbtxrighttext \empty \permanent\protected\def\btxsetrighttext {\def\currentbtxrighttext}
+\mutable\let\currentbtxbefore \empty \permanent\protected\def\btxsetbefore {\def\currentbtxbefore}
+\mutable\let\currentbtxafter \empty \permanent\protected\def\btxsetafter {\def\currentbtxafter}
+\mutable\let\currentbtxlanguage \empty \permanent\protected\def\btxsetlanguage {\def\currentbtxlanguage}
+\mutable\let\currentbtxtag \empty \permanent\protected\def\btxsettag {\def\currentbtxtag}
+\mutable\let\currentbtxnumber \empty \permanent\protected\def\btxsetnumber {\def\currentbtxnumber}
+\mutable\let\currentbtxfirstinternal\empty \permanent\protected\def\btxsetfirstinternal{\def\currentbtxfirstinternal}
+\mutable\let\currentbtxlastinternal \empty \permanent\protected\def\btxsetlastinternal {\def\currentbtxlastinternal}
+
+\mutable\let\currentbtxauthorvariant\v!normal \permanent\protected\def\btxsetauthorvariant{\def\currentbtxauthorvariant}
+\mutable\let\currentbtxfirstnames \empty \permanent\protected\def\btxsetfirstnames {\let\currentbtxfirstnames\currentbtxfirstnames_indeed}
+\mutable\let\currentbtxinitials \empty \permanent\protected\def\btxsetinitials {\let\currentbtxinitials \currentbtxinitials_indeed }
+\mutable\let\currentbtxjuniors \empty \permanent\protected\def\btxsetjuniors {\let\currentbtxjuniors \currentbtxjuniors_indeed }
+\mutable\let\currentbtxsurnames \empty \permanent\protected\def\btxsetsurnames {\let\currentbtxsurnames \currentbtxsurnames_indeed }
+\mutable\let\currentbtxvons \empty \permanent\protected\def\btxsetvons {\let\currentbtxvons \currentbtxvons_indeed }
+
+\newconstant\currentbtxoverflow \permanent\protected\def\btxsetoverflow #1{\currentbtxoverflow #1\relax}
+\newconstant\currentbtxconcat \permanent\protected\def\btxsetconcat #1{\currentbtxconcat #1\relax}
+\newconstant\currentbtxcount \permanent\protected\def\btxsetcount #1{\currentbtxcount #1\relax}
+\newconstant\currentbtxauthorindex %permanent\protected\def\btxsetauthorindex#1{\currentbtxauthorindex#1\relax} % passed directly
+\newconstant\currentbtxauthorcount %permanent\protected\def\btxsetauthorcount#1{\currentbtxauthorcount#1\relax} % passed directly
+\newconstant\currentbtxauthorstate \permanent\protected\def\btxsetauthorstate#1{\currentbtxauthorstate#1\relax}
+
+\protected\def\currentbtxfirstnames_indeed{\clf_btxcurrentfirstnames\numexpr\currentbtxauthorindex\relax}
+\protected\def\currentbtxinitials_indeed {\clf_btxcurrentinitials \numexpr\currentbtxauthorindex\relax}
+\protected\def\currentbtxjuniors_indeed {\clf_btxcurrentjuniors \numexpr\currentbtxauthorindex\relax}
+\protected\def\currentbtxsurnames_indeed {\clf_btxcurrentsurnames \numexpr\currentbtxauthorindex\relax}
+\protected\def\currentbtxvons_indeed {\clf_btxcurrentvons \numexpr\currentbtxauthorindex\relax}
+
+\mutable\let\currentbtxfirstpage \empty \permanent\protected\def\btxsetfirstpage#1{\def\currentbtxfirstpage{\btx_page_number{#1}}}
+\mutable\let\currentbtxlastpage \empty \permanent\protected\def\btxsetlastpage #1{\def\currentbtxlastpage {\btx_page_number{#1}}}
+
+\mutable\let\currentbtxfield \empty
+\mutable\let\currentbtxfielddoi \empty
+\mutable\let\currentbtxfieldmonth \empty
+\mutable\let\currentbtxfieldyear \empty
+\mutable\let\currentbtxfieldurl \empty
+\mutable\let\currentbtxcriterium \empty
+\mutable\let\currentbtxlist \empty
+\mutable\let\currentbtxlistentry \empty
+\mutable\let\currentbtxlistindex \empty
+\mutable\let\currentbtxreference \empty
+\mutable\let\currentbtxrenderingtitle \empty
+\mutable\let\currentbtxcitetag \empty
+
+\mutable\def\currentbtxauthorvariant{normal}
+
+\protected\def\btx_reset_list % not needed as we're grouped
+ {\let\currentbtxcombis \empty
+ \let\currentbtxcategory \empty
+ \let\currentbtxinternal \empty
+ \let\currentbtxlefttext \empty
+ \let\currentbtxrighttext\empty
+ \let\currentbtxbefore \empty
+ \let\currentbtxafter \empty
+ \let\currentbtxbacklink \empty
+ \let\currentbtxlanguage \empty
+ \let\currentbtxsuffix \empty
+ %\let\currentbtxdataset \empty % will always be set
+ %\let\currentbtxtag \empty % will always be set
+ \let\currentbtxnumber \empty}
+
+\protected\def\btx_reset_cite % check for less .. not all resets needed when we're grouped (only subcites)
+ {\let \currentbtxfirst \empty
+ \let \currentbtxsecond \empty
+ \let \currentbtxsuffix \empty
+ \let \currentbtxinternal \empty
+ \let \currentbtxlefttext \empty
+ \let \currentbtxrighttext \empty
+ \let \currentbtxbefore \empty
+ \let \currentbtxafter \empty
+ \let \currentbtxbacklink \empty
+ \let \currentbtxlanguage \empty
+ %\let \currentbtxdataset \empty % will always be set, beware of local reset ~
+ %\let \currentbtxtag \empty % will always be set, beware of local reset ~
+ \let \currentbtxnumber \empty
+ \setconstant\currentbtxoverflow \zerocount
+ \setconstant\currentbtxconcat \zerocount
+ \setconstant\currentbtxcount \zerocount}
+
+\protected\def\btx_reset_page % probably not needed
+ {\let \currentbtxfirstpage \empty
+ \let \currentbtxlastpage \empty
+ \let \currentbtxfirstinternal\empty
+ \let \currentbtxlastinternal \empty
+ \setconstant\currentbtxoverflow \zerocount
+ \setconstant\currentbtxconcat \zerocount
+ \setconstant\currentbtxcount \zerocount}
+
+\protected\def\btx_reset_numbering % probably not needed
+ {\let \currentbtxfirst \empty
+ \let \currentbtxsecond\empty
+ \let \currentbtxsuffix\empty
+ \setconstant\currentbtxconcat\zerocount}
+
+%D Pages:
+
+\protected\def\btx_page_number#1%
+ {\def\currentlistindex{#1}%
+ \structurelistpagenumber}
+
+%D Language:
+
+\mutable\def\mainbtxlanguage{\currentmainlanguage}
+
+\protected\def\btx_check_language
+ {\let\mainbtxlanguage\currentlanguage
+ \ifempty\currentbtxlanguage
+ \let\currentbtxlanguage\currentlanguage
+ \else
+ \btx_check_language_indeed
+ \fi}
+
+\protected\def\btx_check_language_indeed
+ {\edef\currentbtxlanguage{\reallanguagetag\currentbtxlanguage}%
+ \ifempty\currentbtxlanguage
+ \let\currentbtxlanguage\currentlanguage
+ \orelse\ifx\currentbtxlanguage\currentlanguage\else
+ \setcurrentlanguage\currentmainlanguage\currentbtxlanguage
+ \fi}
+
+%D Tracing
+
+\newconditional\c_btx_trace % not used yet
+
+\installtextracker
+ {btxrendering}
+ {\settrue \c_btx_trace}
+ {\setfalse\c_btx_trace}
+
+%D Rendering lists and citations.
+
+\permanent\protected\def\btxtodo#1{[#1]}
+
+%D Lists:
+
+\newdimen\d_publ_number_width
+
+\ifdefined\btxblock \else \newcount\btxblock \fi \btxblock\plusone
+\ifdefined\btxcitecounter \else \newcount\btxcitecounter \fi % maybe pass this to lua
+
+\newtoks\everysetupbtxlistplacement % name will change
+\newtoks\everysetupbtxciteplacement % name will change
+
+\definelist % only used for selecting
+ [\s!btx]
+
+\setuplist
+ [\s!btx]
+ [\c!prefixstopper=:,
+ \c!state=\v!start,
+ \c!alternative=a,
+ \c!interaction=\v!none,
+ %\c!alternative=\v!paragraph,
+ %\c!width=\v!auto,
+ %\c!distance=\emwidth,
+ \c!before=\blank,
+ \c!after=\blank]
+
+\permanent\tolerant\protected\def\setupbtxlist[#1]#*[#2]%
+ {\ifarguments\or
+ \setuplist[\s!btx][#1]%
+ \or
+ \setuplist[\s!btx:#1][#2]%
+ \fi}
+
+\appendtoks
+ \ifempty\currentbtxrenderingparent
+ \definelist
+ [\s!btx:\currentbtxrendering]%
+ [\s!btx]%
+ \orelse\ifx\currentbtxrenderingparent\s!btx
+ \definelist
+ [\s!btx:\currentbtxrendering]%
+ [\s!btx]%
+ \else
+ \definelist
+ [\s!btx:\currentbtxrendering]%
+ [\s!btx:\currentbtxrenderingparent]%
+ \fi
+\to \everydefinebtxrendering
+
+\newconditional\c_btx_list_texts
+
+\appendtoks
+ \doifelse{\btxrenderingparameter\c!textstate}\v!start
+ \settrue\setfalse\c_btx_list_texts
+\to \everysetupbtxlistplacement
+
+\newconditional\c_btx_list_pages
+
+\appendtoks
+ \doifelse{\btxrenderingparameter\c!pagestate}\v!start
+ \settrue\setfalse\c_btx_list_pages
+\to \everysetupbtxlistplacement
+
+\protected\def\btx_entry_inject_pages % for the moment only normal
+ {\dontleavehmode
+ \begingroup
+ \setbtxlist % probably already set
+ \btx_reset_page
+ \setbtxparameterset\s!list\s!page
+ \btxparameter\c!command
+ {\usebtxstyleandcolor\c!style\c!color
+ \btxparameter\c!left
+ \clf_btxflushpages{\currentbtxdataset}{\currentbtxtag}%
+ \btxparameter\c!right}%
+ \endgroup}
+
+\permanent\protected\def\btxpagesetup#1% there will be no left|right|command|style at this inner level
+ {\begingroup
+ \publ_fast_setup\plusfive\s!list\s!page
+ \endgroup
+ \btx_reset_page} % probably not needed
+
+\permanent\protected\def\btxnumberingsetup#1%
+ {\begingroup
+ \dostarttagged\t!listtag\empty
+ \setbtxparameterset{\c!list:\s!numbering}\currentbtxnumbering % brrrr \setbtxlist
+ \btxparameter\c!left
+ \publ_fast_setup\plusthree{\s!list:\s!numbering}{#1}%
+ \btxparameter\c!right
+ \dostoptagged
+ \endgroup
+ \btx_reset_numbering} % probably not needed
+
+% end of page stuff
+
+\permanent\protected\def\btxflushlisttext
+ {\begingroup
+ \usebtxstyleandcolor\c!style\c!color
+ \ignorespaces
+ \publ_fast_setup\plusfour\s!list\currentbtxcategory
+ \removeunwantedspaces
+ \endgroup}
+
+\permanent\protected\def\btxflushlistcombis
+ {\begingroup
+ \processcommacommand[\currentbtxcombis]\btx_entry_inject_combi % maybe in lua
+ \endgroup}
+
+\def\btx_entry_inject_list_text
+ {\publ_fast_setup\plusfour\s!list\s!text}
+
+\ifdefined\dotagpublication \else \aliased\let\dotagpublication\gobbletwoarguments \fi
+
+\protected\def\btx_entry_inject
+ {\begingroup
+ \dostarttagged\t!publication\empty
+ \dotagpublication\currentbtxdataset\currentbtxtag
+ \redoconvertfont % see (**) in strc-lst, this will become an configuration option
+ \edef\currentbtxcategory{\btxrawfield{category}}%
+ \ignorespaces
+ \ifconditional\c_btx_list_texts
+ \dostarttagged\t!listtext\s!left
+ \currentbtxbefore
+ \dostoptagged
+ \fi
+ %\dostarttagged\t!listcontent\empty
+ \btx_entry_inject_list_text
+ %\dostoptagged
+ \ifconditional\c_btx_list_pages
+ \dostarttagged\t!listpage\empty
+ \btx_entry_inject_pages
+ \dostoptagged
+ \fi
+ \ifconditional\c_btx_list_texts
+ \dostarttagged\t!listtext\s!right
+ \currentbtxafter
+ \dostoptagged
+ \fi
+ \dostoptagged
+ \endgroup}
+
+\permanent\tolerant\protected\def\btxshowentryinline[#1]#*[#2]%
+ {\ifarguments
+ \ctxcommand{showbtxentry("\currentbtxdataset","\currentbtxtag")}
+ \or
+ \ctxcommand{showbtxentry("\currentbtxdataset","#1")}
+ \or
+ \ctxcommand{showbtxentry("#1","#2")}
+ \fi}
+
+\permanent\protected\def\btxstartcombientry
+ {\begingroup}
+
+\permanent\protected\def\btxstopcombientry
+ {\endgroup}
+
+\permanent\protected\def\btxhandlecombientry
+ {\btx_reference_indeed}
+
+\def\btx_entry_inject_combi#1%
+ {\begingroup
+ \def\currentbtxtag{#1}%
+ \ignorespaces
+ \publ_fast_setup\plusfour\s!list\currentbtxcategory
+ \removeunwantedspaces
+ \endgroup}
+
+% uses reference when set
+
+% \def\btx_entry_inject_combi#1%
+% {\begingroup
+% \def\currentbtxtag{#1}%
+% \ignorespaces
+% \btxdoifelsecombiinlist\currentbtxdataset\currentbtxtag
+% {\clf_btxflushlistcombi{\currentbtxdataset}{\currentbtxtag}}
+% {\publ_fast_setup\plusfour\s!list\currentbtxcategory}%
+% \removeunwantedspaces
+% \endgroup}
+
+\newtoks\everybtxlistrendering
+
+\appendtoks
+ \setbtxlist
+ %
+ \edef\currentbtxcriterium{\btxrenderingparameter\c!criterium}% \v!cite will become \s!cite
+ \ifempty\currentbtxcriterium
+ \let\currentbtxcriterium\v!previous
+ \orelse\ifx\currentbtxcriterium\v!cite
+ \let\currentbtxcriterium\v!here
+ \fi
+ %
+ \iflocation
+ \letinteractionparameter\c!style\empty
+% \letinteractionparameter\c!color\empty
+% \letinteractionparameter\c!contrastcolor\empty
+ \fi
+\to \everybtxlistrendering
+
+\mutable\let\nofbtxlistentries \!!zerocount
+\mutable\let\currentbtxlistentry\!!zerocount
+\mutable\let\currentbtxlistindex\!!zerocount % only for internal use (points back to big list)
+
+\newconditional\c_publ_prefixed
+
+\permanent\protected\def\btxsetnoflistentries #1{\edef\nofbtxlistentries {#1}}
+\permanent\protected\def\btxsetcurrentlistentry#1{\edef\currentbtxlistentry{#1}}
+\permanent\protected\def\btxsetcurrentlistindex#1{\edef\currentbtxlistindex{#1}}
+
+\permanent\protected\def\btxdoifelsesameaspreviouschecked#1#2% #1 == always | doublesided
+ {\clf_btxdoifelsesameasprevious
+ {\currentbtxdataset}%
+ \currentbtxlistentry%
+ {#2}%
+ \c_btx_list_reference
+ {#1}}
+
+\permanent\protected\def\btxdoifelsesameasprevious
+ {\btxdoifelsesameaspreviouschecked\v!doublesided}
+
+\permanent\protected\def\btxdoifelsecombiinlist#1#2%
+ {\clf_btxdoifelsecombiinlist{#1}{#2}}
+
+\aliased\let\btxdoifsameaspreviouscheckedelse\btxdoifelsesameaspreviouschecked
+\aliased\let\btxdoifsameaspreviouselse \btxdoifelsesameasprevious
+\aliased\let\btxdoifcombiinlistelse \btxdoifelsecombiinlist
+
+\tolerant\def\publ_place_list_indeed#1#2#*[#3]#*[#4]%
+ {\begingroup
+ \ifparameters\or\or
+ \let\currentbtxrendering\currentbtxspecification
+ \or
+ \ifhastok={#3}%
+ % [settings]
+ \let\currentbtxrendering\currentbtxspecification
+ \setupcurrentbtxrendering[#3]%
+ \edef\p_specification{\btxrenderingparameter\c!specification}%
+ \ifempty\p_specification\else
+ \let\currentbtxspecification\p_specification
+ \let\currentbtxrendering\currentbtxspecification % tricky
+ \fi
+ \else
+ \edef\currentbtxrendering{#3}%
+ \edef\p_specification{\btxrenderingparameter\c!specification}%
+ \ifempty\p_specification\else
+ \let\currentbtxspecification\p_specification
+ \fi
+ \fi
+ \or
+ % [rendering] [settings]
+ \edef\currentbtxrendering{#3}%
+ \setupcurrentbtxrendering[#4]%
+ \edef\p_specification{\btxrenderingparameter\c!specification}%
+ \ifempty\p_specification\else
+ \let\currentbtxspecification\p_specification
+ \fi
+ \fi
+ \setbtxparameterset\currentbtxspecification\s!list
+ \the\everybtxlistrendering
+ \ifconditional#1\relax
+ \edef\currentbtxrenderingtitle{\btxrenderingparameter\c!title}%
+ \ifempty\currentbtxrenderingtitle
+ \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbtxrendering,\c!title={\headtext{\currentbtxrendering}}]}%
+ \else
+ \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbtxrendering,\c!title={\currentbtxrenderingtitle}]}%
+ \fi
+ \fi
+ \ifempty\currentbtxrendering
+ \setbtxrendering % hm
+ \fi
+ \edef\currentbtxdataset{\btxrenderingparameter\c!dataset}%
+ \uselanguageparameter\btxdatasetparameter % new
+ \setbtxlist
+ \the\everystructurelist
+ \the\everysetupbtxlistplacement
+ % why not pass this with collect .. todo
+ % here we just collect items
+ \clf_btxcollectlistentries
+ names {\s!btx}%
+ criterium {\currentbtxcriterium}%
+ reference {\btxrenderingparameter\c!reference}%
+ method {\btxrenderingparameter\c!method}%
+ dataset {\currentbtxdataset}%
+ keyword {\btxrenderingparameter\c!keyword}%
+ sorttype {\btxrenderingparameter\c!sorttype}%
+ repeated {\btxrenderingparameter\c!repeat}%
+ ignored {\btxrenderingparameter\c!ignore}%
+ group {\btxrenderingparameter\c!group}%
+ filter {\btxrenderingparameter\c!filter}%
+ \relax
+ \ifnum\nofbtxlistentries>\zerocount
+ \forgetall
+ \btxrenderingparameter\c!before
+ \ifconditional#2\relax
+ \edef\p_command{\btxrenderingparameter\c!command}%
+ \ifempty\p_command
+ \edef\p_setups{\btxrenderingparameter\c!setups}%
+ \ifempty\p_setups
+ \else
+ \directsetup{\p_setups}%
+ \fi
+ \else
+ \expandafter\p_command\expandafter{\number\nofbtxlistentries}\relax
+ \fi
+ \else
+ \dostarttagged\t!publications\currentbtxrendering
+ \dostarttagged\t!list{btx}%
+ \startpacked[\v!blank]%
+ % sorting and so
+ \clf_btxpreparelistentries{\currentbtxdataset}% could be put in collect
+ % next we analyze the width
+ \ifempty\currentbtxnumbering \else
+ \edef\p_width{\listparameter\c!width}%
+ \ifx\p_width\v!auto
+ \setbox\scratchbox\vbox \bgroup
+ \settrialtypesetting
+ \clf_btxfetchlistentries{\currentbtxdataset}%
+ \egroup
+ \d_publ_number_width\wd\scratchbox
+ \letlistparameter\c!width\d_publ_number_width
+ \fi
+ \fi
+ \doifelse{\listparameter\c!prefix}\v!yes\settrue\setfalse\c_publ_prefixed
+ % this actually typesets them, we loop here as otherwise the whole
+ % bunch gets flushed at once
+ \dorecurse\nofbtxlistentries
+ {\let\currentbtxlistentry\recurselevel
+ \clf_btxflushlistentry{\currentbtxdataset}\currentbtxlistentry\relax}%
+ \stoppacked
+ \dostoptagged
+ \dostoptagged
+ \fi
+ \btxrenderingparameter\c!after
+ \fi
+ \ifconditional#1\relax
+ \stopnamedsection
+ \fi
+ \global\advance\btxblock\plusone
+ \endgroup}
+
+\permanent\protected\def\placebtxrendering {\publ_place_list_indeed\conditionalfalse\conditionalfalse}
+\permanent\protected\def\completebtxrendering{\publ_place_list_indeed\conditionaltrue \conditionalfalse}
+\permanent\protected\def\flushbtxrendering {\publ_place_list_indeed\conditionalfalse\conditionaltrue }
+
+\aliased\let\completelistofpublications\completebtxrendering % for old times sake
+\aliased\let\placelistofpublications \placebtxrendering % for old times sake
+
+%D This is somewhat special (for Alan of course):
+%D
+%D \starttyping
+%D % #1 is number of entries
+%D
+%D \starttexdefinition mutable protected btx:for:alan:wrapper #1
+%D \bTABLE
+%D % we can have a command or setups
+%D \flushbtxentries[command=\texdefinition{btx:for:alan:content}]
+%D \eTABLE
+%D \stoptexdefinition
+%D
+%D % #1 is tag
+%D
+%D \starttexdefinition mutable protected btx:for:alan:content #1
+%D \bTR
+%D \bTD
+%D \btxsettag{#1}
+%D \btxfield{name}
+%D \eTD
+%D \eTR
+%D \stoptexdefinition
+%D
+%D % we can have a command or setups
+%D
+%D \flushbtxrendering [method=dataset,command=\texdefinition{btx:for:alan:wrapper}]
+%D \stoptyping
+%D
+%D Because we want to be ungrouped we use a special loop construct.
+
+\permanent\protected\def\btxsetlisttag#1%
+ {\clf_btxflushlisttag{\currentbtxdataset}#1\relax}
+
+\newcount\c_btx_list_index
+
+\let\m_btx_list_action\empty
+
+\def\publ_flush_list_step_command
+ {\btxsetlisttag{\c_btx_list_index}
+ \expandafter\m_btx_list_action\expandafter{\currentbtxtag}%
+ \ifnum\c_btx_list_index<\nofbtxlistentries
+ \advance\c_btx_list_index\plusone
+ \expandafter\publ_flush_list_step_command
+ \else
+ \glet\m_btx_list_action\relax
+ \fi}
+
+\def\publ_flush_list_step_setup
+ {\btxsetlisttag{\c_btx_list_index}
+ \directsetup{\m_btx_list_action}%
+ \ifnum\c_btx_list_index<\nofbtxlistentries
+ \advance\c_btx_list_index\plusone
+ \expandafter\publ_flush_list_step_setup
+ \else
+ \glet\m_btx_list_action\relax
+ \fi}
+
+\permanent\protected\def\flushbtxentries[#1]%
+ {\begingroup
+ \getdummyparameters[\c!command=,\c!setups=,#1]%
+ \xdef\m_btx_list_action{\dummyparameter\c!command}%
+ \ifempty\m_btx_list_action
+ \xdef\m_btx_list_action{\dummyparameter\c!setups}%
+ \ifempty\m_btx_list_action
+ \endgroup
+ \c_btx_list_index\zerocount
+ \else
+ \endgroup
+ \c_btx_list_index\plusone
+ \doubleexpandafter\publ_flush_list_step_command
+ \fi
+ \else
+ \endgroup
+ \c_btx_list_index\plusone
+ \expandafter\publ_flush_list_step_command
+ \fi}
+
+%D So far.
+
+\permanent\def\currentbtxblock{\number\btxblock}
+
+% called at the lua end, for determining the width
+
+\permanent\protected\def\btxchecklistentry
+ {\begingroup
+ % todo, switch to font
+ \hbox{\btx_reference_checked}%
+ \par
+ \endgroup}
+
+% called at the lua end, the real rendering
+
+% we could have a yes and no where o nils the btx_reference_indeed ... saves a check there
+
+\installstructurelistprocessor{\s!btx}
+ {\let\currentlistentrynumber \btx_reference_indeed
+ \let\currentlistentrytitle \btx_entry_indeed
+ \let\currentlistentrypagenumber\btx_page_indeed
+ \strc_lists_apply_renderingsetup}
+
+\def\btx_entry_indeed
+ {\dostarttagged\t!listcontent\empty
+ \btx_list_reference_inject
+ \btx_entry_inject
+ \dostoptagged}
+
+\def\btx_page_indeed
+ {}
+
+\permanent\protected\def\btxhandlelistentry
+ {\strc_lists_entry_process}
+
+\permanent\protected\def\btxstartlistentry % maybe pass i
+ {\begingroup
+ \global\advance\c_btx_list_reference\plusone}
+
+\permanent\protected\def\btxstoplistentry
+ {\iftrialtypesetting
+ \global\advance\c_btx_list_reference\minusone
+ \fi
+ \endgroup}
+
+\newtoks\everybtxlistentry
+
+\permanent\protected\def\btxlistsetup#1% used for the reference in the list
+ {\the\everybtxlistentry
+ \everybtxlistentry\emptytoks % so only once per entry to be sure
+ \publ_fast_setup\plusfour\s!list{#1}}
+
+\appendtoks
+ \btx_check_language
+\to \everybtxlistentry
+
+\protected\def\btx_reference_indeed
+ {\begingroup
+ % redundant will go away:
+ \setbtxparameterset{\c!list:\s!numbering}\currentbtxnumbering
+ %
+ \ifempty\currentbtxnumbering
+ % nothing
+ \orelse\ifx\currentbtxnumbering\v!no
+ % nothing
+ \else
+ \usebtxstyleandcolor\c!style\c!color % new, needed?
+ \ifconditional\c_publ_prefixed\btxlistprefixednumber\fi
+ \clf_btxlistvariant % some can go
+ {\currentbtxdataset}%
+ {\currentbtxblock}%
+ {\currentbtxtag}%
+ {\currentbtxnumbering}%
+ {\currentbtxnumber}%
+ \relax
+ \fi
+ \endgroup}
+
+\permanent\protected\def\btxlistprefixednumber % hack but alan needs it
+ {\clf_listprefixednumber
+ {\currentlist}%
+ \currentbtxlistindex
+ {%
+ prefix {\listparameter\c!prefix}%
+ separatorset {\listparameter\c!prefixseparatorset}%
+ conversionset {\listparameter\c!prefixconversionset}%
+ starter {\listparameter\c!prefixstarter}%
+ stopper {\listparameter\c!prefixstopper}%
+ set {\listparameter\c!prefixset}%
+ segments {\listparameter\c!prefixsegments}%
+ connector {\listparameter\c!prefixconnector}%
+ }%
+ \relax}
+
+\protected\def\btx_reference_checked
+ {\dontleavehmode\hbox\bgroup % \hpack
+ \btx_reference_indeed
+ \egroup}
+
+\newcount\c_btx_list_reference
+
+\protected\def\btx_list_reference_inject
+ {\dontleavehmode\begingroup % no box
+ \iftrialtypesetting\else
+ \btx_list_reference_inject_now
+ \fi
+ % \btx_reference_indeed % else double entry in list
+ \endgroup}
+
+\def\btx_list_reference_inject_now
+ {\strc_references_direct_full_user
+ {\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi%
+ \s!btxref=\currentbtxtag,%
+ \s!btxspc=\currentbtxspecification,%
+ \s!btxlst=\number\c_btx_list_reference,% check if needed
+ %\ifempty\currentbtxcombis \else\s!btxcom={\currentbtxcombis},\fi%
+ \ifempty\currentbtxbefore \else\s!btxbtx={\currentbtxbefore},\fi%
+ \ifempty\currentbtxafter \else\s!btxatx={\currentbtxafter },\fi%
+ \ifempty\currentbtxbacklink\else\s!btxint=\number\currentbtxbacklink\fi
+ }%
+ {\s!btx::\v!list::\number\c_btx_list_reference}%
+ {\currentbtxnumber}}
+
+\newconditional\c_btx_cite_reference_injected
+
+\permanent\protected\def\btx_cite_reference_inject
+ {\ifconditional\c_btx_cite_reference_injected \else
+ \dontleavehmode
+ \iftrialtypesetting \else
+ \ifempty\currentbtxbacklink
+ % can be made empty when combining author / year
+ \orelse\ifnum\currentbtxbacklink>\zerocount
+ \btx_cite_reference_inject_indeed
+ \settrue\c_btx_cite_reference_injected
+ \fi
+ \fi
+ \fi}
+
+\newtoks\t_btx_reference_inject
+
+\def\btx_cite_reference_inject_indeed
+ {\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
+ [\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi%
+ \s!btxref=\currentbtxtag,%
+ %\ifempty\currentbtxcombis \else\s!btxcom={\currentbtxcombis},\fi%
+ \ifempty\currentbtxbefore \else\s!btxbtx={\currentbtxbefore},\fi%
+ \ifempty\currentbtxafter \else\s!btxatx={\currentbtxafter },\fi%
+ \ifempty\currentbtxbacklink\else\s!btxint=\number\currentbtxbacklink,\fi
+ \ifempty\currentbtxciteuservariables\else,\currentbtxciteuservariables\fi]}
+
+\permanent\def\currentbtxuservariable #1{\clf_btxuservariable {\currentbtxdataset}{#1}}
+\permanent\def\btxdoifelseuservariable#1{\clf_btxdoifelseuservariable{\currentbtxdataset}{#1}}
+
+\aliased\let\btxdoifuservariableelse\btxdoifelseuservariable
+
+\aliased\let\btxcitereference\btx_cite_reference_inject
+
+\mutable\let\currentbtxnumbering \empty
+\mutable\let\currentbtxcitealternative \empty
+
+\appendtoks
+ \edef\currentbtxnumbering{\btxrenderingparameter\c!numbering}%
+ \ifx\currentbtxnumbering\v!yes
+ \def\currentbtxnumbering{num}% convenient alias
+ \letbtxrenderingparameter\c!numbering\currentbtxnumbering
+ \letlistparameter\c!headnumber\v!always
+ \orelse\ifx\currentbtxnumbering\v!no
+ \letlistparameter\c!headnumber\v!no
+ \let\currentbtxnumbering\empty
+ % \letlistparameter\c!textcommand\outdented % needed? we can use titlealign
+ \letlistparameter\c!symbol \v!none
+ \letlistparameter\c!aligntitle \v!yes
+ \letlistparameter\c!numbercommand\firstofoneargument % for the moment, no doubling needed
+ \else
+ \letlistparameter\c!headnumber\v!always
+ \fi
+ \let\currentlistmethod\s!btx
+\to \everysetupbtxlistplacement
+
+\permanent\tolerant\protected\def\btxremapauthor[#1]#*[#2]%
+ {\clf_btxremapauthor{#1}{#2}}
+
+\permanent\protected\def\btxshowauthorremapping
+ {\clf_btxshowauthorremapping}
+
+\permanent\protected\def\btxflushauthor
+ {\doifelsenextoptionalcs\btx_flush_author_yes\btx_flush_author_nop}
+
+\permanent\protected\def\btxflushsuffix
+ {\ifempty\currentbtxsuffix
+ % nothing
+ \else
+ \characters{\currentbtxsuffix}% todo : rendering specific converter
+ \fi}
+
+\def\btx_flush_author_yes[#1]{\btx_flush_author{#1}}
+\def\btx_flush_author_nop {\btx_flush_author{\btxparameter\c!authorconversion}}
+
+\protected\def\btx_flush_author#1#2%
+ {\begingroup
+ \edef\currentbtxfield{#2}%
+ \setbtxparameterset\s!list\currentbtxfield
+% \let\currentbtxlistvariant\currentbtxfield
+ \clf_btxauthor
+ {\currentbtxdataset}%
+ {\currentbtxtag}%
+ {\currentbtxfield}%
+ {%
+ combiner {#1}%
+ kind {list}%
+ etallimit {\btxparameter\c!etallimit}%
+ etaldisplay {\btxparameter\c!etaldisplay}%
+ etaloption {\btxparameter\c!etaloption}%
+ symbol {\btxparameter{\c!stopper:initials}}%
+ connector {\btxparameter{\c!connector:initials}}%
+ }%
+ \relax
+ \endgroup}
+
+% yes or no: maybe just \flushauthor{...}{...}
+
+\permanent\protected\def\btxflushauthorname {\btx_flush_author{name}} % #1
+\permanent\protected\def\btxflushauthornormal {\btx_flush_author{normal}} % #1
+\permanent\protected\def\btxflushauthornormalshort {\btx_flush_author{normalshort}} % #1
+\permanent\protected\def\btxflushauthorinverted {\btx_flush_author{inverted}} % #1
+\permanent\protected\def\btxflushauthorinvertedshort{\btx_flush_author{invertedshort}} % #1
+
+\mutable\let\currentbtxauthorfield\s!author
+
+\permanent\protected\def\btxsetauthorfield#1{\edef\currentbtxauthorfield{#1}}
+
+\permanent\protected\def\currentbtxciteauthorbyfield
+ {\begingroup
+ %\setbtxparameterset\s!cite\s!author
+ % the alternatives inherit from cite:author
+ % and APA distinguishes authoryears from authoryear ("and" vs. "&")
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \clf_btxauthor
+ {\currentbtxdataset}%
+ {\currentbtxtag}%
+ {\currentbtxauthorfield}%
+ {%
+ combiner {\btxparameter\c!authorconversion}%
+ kind {cite}%
+ etallimit {\btxparameter\c!etallimit}%
+ etaldisplay {\btxparameter\c!etaldisplay}%
+ etaloption {\btxparameter\c!etaloption}%
+ symbol {\btxparameter{\c!stopper:initials}}%
+ }%
+ \relax
+ \endgroup}
+
+\permanent\protected\def\currentbtxciteauthor
+ {\let\currentbtxauthorfield\s!author
+ \currentbtxciteauthorbyfield} % always author
+
+\permanent\protected\def\btxstartauthor#1#2#3% a state > 0 signals that some authors can clash
+ {\begingroup
+ \currentbtxauthorindex#1\relax
+ \currentbtxauthorcount#2\relax
+ \currentbtxauthorstate#3\relax}
+
+\permanent\protected\def\btxstopauthor
+ {\endgroup}
+
+\permanent\protected\def\btxciteauthorsetup#1{\fastsetup{\s!btx:\s!cite:\s!author:#1}}
+\permanent\protected\def\btxlistauthorsetup#1{\fastsetup{\s!btx:\s!list:\s!author:#1}}
+
+% \btxflushauthor{author}
+% \btxflushauthor{editor}
+%
+% \btxflushauthor[name]{author}
+% \btxflushauthor[normal]{author}
+% \btxflushauthor[normalshort]{author}
+% \btxflushauthor[inverted]{author}
+% \btxflushauthor[invertedshort]{author}
+
+% \btxflushauthor{author}
+% \btxflushauthor{editor}
+
+% Interaction
+%
+% Because we have more complex entries in lists we don't use the normal list
+% interaction features.
+
+\newconditional\btxinteractive
+\newconditional\btxinteractivenumber
+\newconditional\btxinteractivetext
+\newconditional\btxinteractivepage
+
+\mutable\let\currentbtxinteraction\empty
+
+\installcorenamespace{btxinteraction}
+
+\setvalue{\??btxinteraction\v!number}{\settrue\btxinteractivenumber}
+\setvalue{\??btxinteraction\v!text }{\settrue\btxinteractivetext}
+\setvalue{\??btxinteraction\v!page }{\settrue\btxinteractivepage}
+\setvalue{\??btxinteraction\v!all }{\settrue\btxinteractivenumber
+ \settrue\btxinteractivetext
+ \settrue\btxinteractivepage}
+
+% \setupbtx[interaction=page] % or text or number or all
+% \setupbtxrendering[pagestate=start]
+
+\appendtoks
+ \iflocation
+ \edef\currentbtxinteraction{\btxparameter\c!interaction}%
+ \ifx\currentbtxinteraction\v!stop
+ \setfalse\btxinteractive
+ \else
+ \enforced\let\structurelistlocation\empty
+ \settrue\btxinteractive
+ \begincsname\??btxinteraction\currentbtxinteraction\endcsname
+ \fi
+ \else
+ \setfalse\btxinteractive
+ \fi
+\to \everysetupbtxlistplacement
+
+\appendtoks
+ \iflocation
+ \edef\currentbtxinteraction{\btxparameter\c!interaction}%
+ \ifx\currentbtxinteraction\v!stop
+ \setfalse\btxinteractive
+ \else
+ \settrue\btxinteractive
+ \fi
+ \else
+ \setfalse\btxinteractive
+ \fi
+\to \everysetupbtxciteplacement
+
+%D When a publication is cited, we need to signal that somehow. This is done with the
+%D following (not user) command. We could tag without injecting a node but this way
+%D we also store the location, which makes it possible to ask local lists.
+
+%D \macros{cite,nocite,citation,nocitation,usecitation}
+%D
+%D The inline \type {\cite} command creates a (often) short reference to a publication
+%D and for historic reasons uses a strict test for brackets. This means, at least
+%D in the default case that spaces are ignored in the argument scanner. The \type
+%D {\citation} commands is more liberal but also gobbles following spaces. Both
+%D commands insert a reference as well as a visual clue.
+%D
+%D The \type {no} commands all do the same (they are synonyms): they make sure that
+%D a reference is injected but show nothing. However, they do create a node so best
+%D attach them to some text in order to avoid spacing interferences. A slightly
+%D less efficient alternative is \type {\cite[none][tag]}.
+
+% [tags]
+% [settings|variant][tags]
+% [base::tags]
+% [settings|variant][base::tags]
+
+% these need to be sort of protected:
+
+% methods:
+%
+% hidden : mark for list, don't show in text
+% list : mark for list, show in text only when in list
+% text : not to list, show in text
+% always : mark for list, show in text
+
+\let\p_publ_cite_before \empty
+\let\p_publ_cite_after \empty
+\let\p_publ_cite_lefttext \empty
+\let\p_publ_cite_righttext\empty
+
+\mutable\let\currentbtxciteuservariables\empty
+\mutable\let\currentbtxcitealternative \empty
+
+\permanent\protected\def\btxhybridcite % so one can alias the old
+ {\dontleavehmode
+ \begingroup
+ \strictdoifelsenextoptional\publ_cite_tags_options\publ_cite_tags_indeed}
+
+\protected\def\publ_cite_tags_options[#1]%
+ {\strictdoifelsenextoptional{\publ_cite_tags_options_indeed{#1}}{\publ_cite_tags_indeed{#1}}}
+
+\protected\def\publ_cite_tags_indeed#1%
+ {\letinteractionparameter\c!style\empty
+ \setbtxparametersetroot\s!cite % we need to get the default
+ \edef\currentbtxcitealternative{\btxparameter\c!alternative}%
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \edef\currentbtxcitetag{#1}%
+ \the\everysetupbtxciteplacement
+ \publ_cite_variant
+ \endgroup}
+
+\protected\def\publ_cite_tags_options_indeed#1%
+ {\doifelseassignment{#1}\publ_cite_tags_settings_indeed\publ_cite_tags_variants_indeed{#1}}
+
+\def\publ_cite_tags_settings_indeed#1[#2]%
+ {\letinteractionparameter\c!style\empty
+ %\letinteractionparameter\c!color\empty
+ \letdummyparameter\c!reference \empty
+ \letdummyparameter\c!alternative\empty
+ \letdummyparameter\c!before \empty
+ \letdummyparameter\c!after \empty
+ \letdummyparameter\c!lefttext \empty
+ \letdummyparameter\c!righttext \empty
+ \getdummyparameters[#1]%
+ \edef\p_reference{\dummyparameter\c!reference}%
+ \ifempty\p_reference
+ \edef\currentbtxcitetag{#2}%
+ \else
+ \let\currentbtxcitetag\p_reference
+ \edef\currentbtxciteuservariables{#2}%
+ \fi
+ \edef\p_specification{\dummyparameter\c!specification}%
+ \ifempty\p_specification
+ \else
+ \let\currentbtxspecification\p_specification
+ \fi
+ \edef\p_alternative{\dummyparameter\c!alternative}%
+ \ifempty\p_alternative
+ \setbtxparametersetroot\s!cite
+ \edef\currentbtxcitealternative{\btxparameter\c!alternative}%
+ \else
+ \let\currentbtxcitealternative\p_alternative
+ \fi
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \setupcurrentbtx[#1]%
+ %
+ \edef\p_publ_cite_before {\dummyparameter\c!before}%
+ \edef\p_publ_cite_after {\dummyparameter\c!after}%
+ \edef\p_publ_cite_lefttext {\dummyparameter\c!lefttext}%
+ \edef\p_publ_cite_righttext{\dummyparameter\c!righttext}%
+ %
+ \the\everysetupbtxciteplacement
+ \publ_cite_variant
+ \endgroup}
+
+\def\publ_cite_tags_variants_indeed#1[#2]%
+ {\letinteractionparameter\c!style\empty
+ \edef\currentbtxcitealternative{#1}%
+ \edef\currentbtxcitetag{#2}%
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \the\everysetupbtxciteplacement
+ \publ_cite_variant
+ \endgroup}
+
+\newconditional\btxcitecompress
+
+\mutable\let\currentbtxcitemethod\v!hidden
+
+\def\publ_cite_variant
+ {\begingroup
+ \publ_cite_handle_variant_indeed[\currentbtxcitetag]}
+
+\protected\def\publ_cite_handle_variant#1%
+ {\begingroup
+ \edef\currentbtxcitealternative{#1}%
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \the\everysetupbtxciteplacement
+ \publ_cite_handle_variant_indeed}
+
+\permanent\protected\def\publ_cite_handle_variant_blob
+ {\clf_btxhandlecite
+ dataset {\currentbtxdataset}%
+ reference {\currentbtxreference}%
+ method {\currentbtxcitemethod}%
+ variant {\currentbtxcitealternative}%
+ sorttype {\btxparameter\c!sorttype}%
+ compress {\btxparameter\c!compress}%
+ author {\btxparameter\c!author}%
+ authorconversion {\c!authorconversion}%
+ lefttext {\p_publ_cite_lefttext}%
+ righttext {\p_publ_cite_righttext}%
+ before {\p_publ_cite_before}%
+ after {\p_publ_cite_after}%
+ \relax
+ \iftrialtypesetting\else
+ %\clf_btxflushmarked
+ \fi}
+
+\aliased\let\dobtxcitevariantblob\publ_cite_handle_variant_blob % command can use it via lua
+
+\tolerant\def\publ_cite_handle_variant_indeed[#1]%
+ {\letbtxparameter\c!alternative\currentbtxcitealternative
+ \edef\currentbtxreference{#1}%
+ \saverunningstyleandcolor
+ \usebtxstyleandcolor\c!style\c!color
+ \uselanguageparameter\btxdatasetparameter % new
+ \btxparameter\c!left
+ \btxparameter\c!command{\dobtxcitevariantblob}% {\publ_cite_handle_variant_blob}%
+ \btxparameter\c!right
+ \endgroup}
+
+\permanent\protected\def\btxlistcitation {\publ_citation\v!list}
+\permanent\protected\def\btxtextcitation {\publ_citation\v!text}
+\permanent\protected\def\btxalwayscitation{\publ_citation\v!always}
+
+\tolerant\def\publ_citation#1[#2]#*[#3]% could be made more efficient but not now
+ {\dontleavehmode
+ \begingroup
+ \let\currentbtxcitemethod#1%
+ \ifparameter#3\or
+ \publ_cite_tags_options_indeed{#2}[#3]%
+ \else
+ \publ_cite_tags_indeed{#2}%
+ \fi}
+
+\permanent\tolerant\protected\def\btxhiddencitation[#1]%
+ {\iftrialtypesetting \else
+ \begingroup
+ \let\currentbtxcitemethod\v!hidden
+ \edef\currentbtxreference{#1}%
+ \clf_btxhandlenocite
+ method {\currentbtxcitemethod}%
+ dataset {\currentbtxdataset}%
+ reference {\currentbtxreference}%
+ \relax
+ %\clf_btxflushmarked
+ \endgroup
+ \fi}
+
+\permanent\protected\def\btxmissing#1%
+ {\dontleavehmode{\tttf<#1>}}
+
+%D Compatibility:
+
+\aliased\let\hiddencitation\btxhiddencitation \aliased\let\hiddencite\hiddencitation
+\aliased\let\listcitation \btxlistcitation \aliased\let\listcite \listcitation
+\aliased\let\textcitation \btxtextcitation \aliased\let\textcite \textcitation
+\aliased\let\alwayscitation\btxalwayscitation \aliased\let\alwayscite\alwayscitation
+
+\permanent\protected\def\citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
+\permanent\protected\def\nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
+
+\aliased\let\cite \citation
+\aliased\let\nocite \nocitation
+\aliased\let\usecitation\nocitation
+
+\protected\def\publ_entry_citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
+\protected\def\publ_entry_nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
+
+\appendtoks
+ \enforced\let\cite \publ_entry_citation
+ \enforced\let\nocite\publ_entry_nocitation
+\to \everybtxlistrendering
+
+\permanent\protected\def\btxdirectlistcite #1{\btxlistcitation [#1]\relax} % no optional arguments
+\permanent\protected\def\btxdirecthiddencite#1{\btxhiddencitation[#1]\relax} % no optional arguments
+
+%D Setup helpers, beware, we need to wrap this .. now we need to know
+%D how setups are implemented.
+
+\setvalue{\??setup:\s!btx:\s!unknown}#1{\inframed{\tttf#1}}
+
+\def\publ_fast_setup_yes#1#2%
+ {\csname\??setup:\s!btx:%
+ \ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname
+ \currentbtxspecification:#1:#2%
+ \orelse\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:#2\endcsname
+ \currentbtxspecificationfallback:#1:#2%
+ \orelse\ifcsname\??setup:\s!btx:#1:#2\endcsname
+ #1:#2%
+ \orelse\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname
+ \currentbtxspecification:#1:\s!unknown
+ \orelse\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname
+ \currentbtxspecificationfallback:#1:\s!unknown
+ \else
+ #1:\s!unknown
+ \fi
+ \endcsname{#2}}
+
+\def\publ_fast_setup_nop#1#2%
+ {\csname\??setup:\s!btx:%
+ \ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname
+ \currentbtxspecification:#1:#2%
+ \orelse\ifcsname\??setup:\s!btx:#1:#2\endcsname
+ #1:#2%
+ \orelse\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname
+ \currentbtxspecification:#1:\s!unknown
+ \else
+ #1:\s!unknown
+ \fi
+ \endcsname{#2}}
+
+\newconstant\btxsetuptype
+
+% 0 = unknown darkred
+% 1 = cite darkblue
+% 2 = subcite darkgreen
+% 3 = numbering darkorange
+% 4 = list darkcyan
+% 5 = page darkmagenta
+% 6 = unknown darkred
+
+\protected\def\publ_fast_btx_setup_chain_inbetween{\allowbreak->\allowbreak}
+\protected\def\publ_fast_btx_setup_colon_inbetween{\allowbreak :\allowbreak}
+
+\protected\def\publ_fast_btx_setup_chain_yes#1#2%
+ {\dontleavehmode\begingroup
+ \let\:\publ_fast_btx_setup_colon_inbetween
+ \infofont
+ \ifcase\btxsetuptype\darkred\or\darkblue\or\darkgreen\or\darkcyan\or\darkmagenta\else\darkred\fi
+ [\prewordbreak
+ \currentbtxspecification \:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ \currentbtxspecificationfallback\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:#2\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ \currentbtxspecification \:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ \currentbtxspecificationfallback\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ unset\fi\fi\fi\fi\fi
+ \space @\space
+ \currentbtx
+ \prewordbreak]%
+ \endgroup}
+
+\protected\def\publ_fast_btx_setup_chain_nop#1#2%
+ {\dontleavehmode\begingroup
+ \let\:\publ_fast_btx_setup_colon_inbetween
+ \infofont
+ \darkred
+ [\prewordbreak
+ \currentbtxspecification\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ \currentbtxspecification\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
+ \publ_fast_btx_setup_chain_inbetween
+ unset\fi\fi\fi
+ \space @\space
+ \currentbtx
+ \prewordbreak]%
+ \endgroup}
+
+\protected\def\publ_fast_btx_setup_normal#1%
+ {\btxsetuptype#1\relax
+ \ifempty\currentbtxspecificationfallback
+ \expandafter\publ_fast_setup_nop
+ \else
+ \expandafter\publ_fast_setup_yes
+ \fi}
+
+\protected\def\publ_fast_btx_setup_visual#1#2#3%
+ {\btxsetuptype#1\relax
+ \ifempty\currentbtxspecificationfallback
+ \expandafter\publ_fast_btx_setup_chain_nop
+ \else
+ \expandafter\publ_fast_btx_setup_chain_yes
+ \fi{#2}{#3}%
+ \ifempty\currentbtxspecificationfallback
+ \expandafter\publ_fast_setup_nop
+ \else
+ \expandafter\publ_fast_setup_yes
+ \fi{#2}{#3}}
+
+\installtextracker
+ {publications.setups}
+ {\let\publ_fast_setup\publ_fast_btx_setup_visual}
+ {\let\publ_fast_setup\publ_fast_btx_setup_normal}
+
+\let\publ_fast_setup\publ_fast_btx_setup_normal
+
+%D Cite helpers:
+
+\newtoks\everybtxciteentry
+
+\prependtoks
+ \setfalse\c_btx_cite_reference_injected
+\to \everybtxciteentry
+
+\permanent\protected\def\btxcitesetup#1%
+ {\the\everybtxciteentry
+ \everybtxciteentry\emptytoks % tricky maybe not when subcites
+ \publ_fast_setup\plusone\s!cite{#1}} % no \btxcitereset as we loose dataset and such
+
+\permanent\protected\def\btxsubcitesetup#1%
+ {\the\everybtxciteentry
+ \everybtxciteentry\emptytoks % tricky maybe not when subcites
+ \publ_fast_setup\plustwo\s!cite{#1}} % no \btxcitereset as we loose dataset and such
+
+\appendtoks
+ \btx_check_language
+\to \everybtxciteentry
+
+\permanent\protected\def\btxstartsubcite#1%
+ {\begingroup
+ \btx_reset_cite % todo: limited set
+ % \saverunningstyleandcolor % let's see when Alan needs it
+ \def\currentbtxcitealternative{#1}%
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \usebtxstyleandcolor\c!style\c!color
+ \btxparameter\c!left
+ \relax}
+
+\permanent\protected\def\btxstopsubcite
+ {\relax
+ \btxparameter\c!right
+ \endgroup}
+
+\permanent\protected\def\btxstartciterendering[#1]%
+ {\begingroup
+ \edef\currentbtxcitealternative{#1}%
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \usebtxstyleandcolor\c!style\c!color
+ \btxparameter\c!left
+ \relax}
+
+\permanent\protected\def\btxstopciterendering
+ {\relax
+ \btxparameter\c!right
+ \endgroup}
+
+\aliased\let\btxstartciteauthor\begingroup
+\aliased\let\btxstopciteauthor \endgroup
+
+\permanent\protected\def\btxstartcite{\begingroup\btx_reset_cite}
+\aliased \let\btxstopcite \endgroup
+
+%D Whatever helpers:
+
+\permanent\protected\def\btxsingularplural#1{\clf_btxsingularorplural{\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\protected\def\btxoneorrange #1{\clf_btxoneorrange {\currentbtxdataset}{\currentbtxtag}{#1}}
+\permanent\protected\def\btxfirstofrange #1{\clf_btxfirstofrange {\currentbtxdataset}{\currentbtxtag}{#1}}
+
+\aliased\let\btxsingularorplural\btxsingularplural
+
+\stopcontextdefinitioncode
+
+%D Journals
+
+\permanent\protected\def\btxloadjournallist [#1]{\clf_btxloadjournallist{#1}}
+\permanent\protected\def\btxsavejournallist [#1]{\clf_btxsavejournallist{#1}}
+\permanent\protected\def\btxaddjournal [#1][#2]{\clf_btxaddjournal{#1}{#2}}
+\permanent \def\btxexpandedjournal #1{\clf_btxexpandedjournal{#1}} % \protected ?
+\permanent \def\btxabbreviatedjournal#1{\clf_btxabbreviatedjournal{#1}} % \protected ?
+
+% \installcorenamespace{btxjournal}
+%
+% \letvalue{\s!btxjournal\v!long }\btxexpandedjournal
+% \letvalue{\s!btxjournal\v!short }\btxabbreviatedjournal
+% \letvalue{\s!btxjournal\v!normal}\firstofoneargument
+%
+% \protected\def\btxcheckedjournal
+% {\expandnamespaceparameter\s!btxjournal\btxrenderingparameter\c!journalconversion}
+
+% \btxloadjournallist[list.txt] % Foo Journal of Bars = FBJ \n ....
+%
+% \btxexpandedjournal[fbj]
+% \btxabbreviatedjournal[foo journal of bars]
+
+%D Saving data:
+
+\tolerant\permanent\protected\def\savebtxdataset[#1]#*[#2]#*[#3]
+ {\ifarguments
+ % bad news
+ \or
+ \ifhastok={#1}%
+ \publ_save_dataset_indeed[\s!default][\jobname-saved.bib][#1]%
+ \else
+ \publ_save_dataset_indeed[\s!default][#1][]%
+ \fi
+ \or
+ \ifhastok={#2}%
+ \publ_save_dataset_indeed[\s!default][#1][#2]%
+ \else
+ \publ_save_dataset_indeed[#1][#2][]%
+ \fi
+ \or
+ \publ_save_dataset_indeed[#1][#2][#3]%
+ \fi}
+
+\protected\def\publ_save_dataset_indeed[#1][#2][#3]%
+ {\begingroup
+ \getdummyparameters
+ [\c!criterium=\v!all,%
+ \c!type=,%
+ \c!dataset=#1,%
+ \c!file=#2,%
+ #3]% % all or used
+ \clf_btxsavedataset
+ dataset {\dummyparameter\c!dataset}%
+ filename {\dummyparameter\c!file}%
+ filetype {\dummyparameter\c!type}%
+ criterium {\dummyparameter\c!criterium}%
+ \relax
+ \endgroup}
+
+% \savebtxdataset[default][e:/tmp/foo.bib]
+% \savebtxdataset[default][e:/tmp/foo.lua]
+% \savebtxdataset[default][e:/tmp/foo.xml]
+
+%D In-text entries:
+
+\permanent\protected\def\placecitation{\citation[entry]} % [#1]
+
+\permanent\protected\def\btxhandleciteentry
+ {\dontleavehmode
+ \begingroup
+ \def\currentbtxcitealternative{entry}%
+ \setbtxparameterset\s!cite\currentbtxcitealternative % needs checking
+ \btxcitereference
+ \btx_entry_inject
+ \endgroup}
+
+%D Registers
+
+% \setupbtxregister
+% [\c!state=\v!start,
+% \c!dataset=\v!all,
+% \c!method=\v!always]
+
+\protected\def\publ_registers_set
+ {\ifempty\currentbtxregister \else
+ \clf_btxsetregister
+ specification {\currentbtxspecification}%
+ name {\currentbtxregister}%
+ state {\btxregisterparameter\c!state}%
+ dataset {\btxregisterparameter\c!dataset}%
+ field {\btxregisterparameter\c!field}%
+ register {\btxregisterparameter\c!register}%
+ method {\btxregisterparameter\c!method}%
+ alternative {\btxregisterparameter\c!alternative}%
+ \relax
+ \fi}
+
+\appendtoks
+ \publ_registers_set
+\to \everydefinebtxregister
+
+\appendtoks
+ \publ_registers_set
+\to \everysetupbtxregister
+
+\appendtoks
+ \normalexpanded{%
+ \defineprocessor
+ [\s!btx:r:\currentbtxregister]%
+ [\c!style=\noexpand\namedbtxregisterparameter{\currentbtxregister}\noexpand\c!style,
+ \c!color=\noexpand\namedbtxregisterparameter{\currentbtxregister}\noexpand\c!color]}%
+\to \everydefinebtxregister
+
+\appendtoks
+ \clf_btxtoregister{\currentbtxdataset}{\currentbtxtag}%
+\to \t_btx_reference_inject
+
+\permanent\protected\def\btxindexedauthor#1#2#3#4#5#6% alternative von last initials first junior
+ {\begingroup
+ \def\currentbtxcitealternative{#1}%
+ \ifempty\currentbtxcitealternative
+ \edef\currentbtxcitealternative{invertedshort}% maybe we need some default here too?
+ \fi
+ %let\currentbtxlistvariant\currentbtxcitealternative % we inherit
+ \the\everysetupbtxciteplacement
+ \def\currentbtxvons {#2}%
+ \def\currentbtxsurnames {#3}%
+ \def\currentbtxinitials {#4}%
+ \def\currentbtxfirstnames {#5}%
+ \def\currentbtxjuniors {#6}%
+ \setbtxparameterset\s!cite\currentbtxcitealternative
+ \fastsetup{\s!btx:\s!cite:\s!author:\currentbtxcitealternative}%
+ \endgroup}
+
+\permanent\protected\def\btxregisterauthor
+ {\doifelsenextoptionalcs\publ_register_author_yes\publ_register_author_nop}
+
+\def\publ_register_author_yes[#1]#2%
+ {\clf_btxauthortoregister{#1}{#2}\relax}
+
+\def\publ_register_author_nop#1%
+ {\clf_btxauthortoregister{\currentbtxdataset}{#1}\relax}
+
+%D We hook some setters in the definition sets:
+
+% \installdefinitionsetmember \??btx {btxspecification} \??btxcitevariant {btxcitevariant}
+% \installdefinitionsetmember \??btx {btxspecification} \??btxlistvariant {btxlistvariant}
+% \installdefinitionsetmember \??btx {btxspecification} \??btxlist {btxlist}
+% \installdefinitionsetmember \??btx {btxspecification} \??btxrendering {btxrendering}
+% \installdefinitionsetmember \??btx {btxspecification} \??btx {btx}
+
+%D And more helpers ... a never ending story these publications:
+
+% \definebtx
+% [btx:apa:list:article:title]
+% [style=bolditalic,
+% command=\WORD]
+%
+% \btxstartstyle[btx:apa:list:article:title]
+% \btxusecommand[btx:apa:list:article:title]{foo}
+% \btxstopstyle
+
+\mutable\let\m_btx_saved_current\empty
+
+\permanent\protected\def\btxstartstyle[#1]%
+ {\begingroup
+ \let\m_btx_saved_current\currentbtx
+ \def\currentbtx{#1}%
+ \usebtxstyleparameter\c!style
+ \let\currentbtx\m_btx_saved_current}
+
+\permanent\protected\def\btxstartcolor[#1]%
+ {\begingroup
+ \let\m_btx_saved_current\currentbtx
+ \def\currentbtx{#1}%
+ \usebtxcolorparameter\c!color
+ \let\currentbtx\m_btx_saved_current}
+
+\permanent\protected\def\btxstartstyleandcolor[#1]%
+ {\begingroup
+ \let\m_btx_saved_current\currentbtx
+ \def\currentbtx{#1}%
+ \usebtxstyleandcolor\c!style\c!color
+ \let\currentbtx\m_btx_saved_current}
+
+\aliased\let\btxstopstyle \endgroup
+\aliased\let\btxstopcolor \endgroup
+\aliased\let\btxstopstyleandcolor\endgroup
+
+\permanent\protected\def\btxusecommand[#1]#2% using #2 permits space after []
+ {\namedbtxparameter{#1}\c!command{#2}}
+
+\permanent\protected\def\startbtxrunningstyleandcolor
+ {\dontleavehmode
+ \begingroup
+ \restorerunningstyleandcolor}
+
+\permanent\protected\def\stopbtxrunningstyleandcolor
+ {\endgroup}
+
+%D Maybe handy:
+
+\permanent\protected\def\btxdoifelsematches#1#2#3%
+ {\clf_btxdoifelsematches{#1}{#2}{#3}}
+
+%D Defaults:
+
+\setupbtxrendering
+ [\c!interaction=\v!start, % \v!all
+ \c!specification=\btxparameter\c!specification,
+ \c!dataset=\v!default,
+ \c!repeat=\v!no,
+ \c!continue=\v!no,
+ \c!method=\v!global,
+ % \c!setups=btx:\btxrenderingparameter\c!alternative:initialize, % not the same usage as cite !
+ \c!sorttype=\v!default,
+ \c!criterium=\v!text,
+ \c!refcommand=authoryears, % todo
+ \c!numbering=\v!yes,
+ %\c!saveinlist=\v!no, % maybe for before/after
+ \c!pagestate=\v!stop,
+ \c!textstate=\v!start,
+ \c!width=\v!auto,
+ \c!separator={\removepunctuation;\space},
+ \c!distance=1.5\emwidth]
+
+% Quite some interpunction and labels are the same of at least consistent within
+% a standard when citations and list entries are involved. We assume that each
+% standard defines its own set but it can fall back on these defaults.
+
+\setupbtx
+ [\c!interaction=\v!start,
+ \c!alternative=num, % default cite form, normally defined in the cite namespace
+ \c!inbetween=\btxspace,
+ % \c!range=\endash, % separator:range?
+ \c!range=\directdiscretionary\endash,
+ \c!compress=\v!yes, % was no?
+ \c!authorconversion=normal,
+ \c!sorttype=normal, % normal, reverse or none
+ \c!etallimit=3,
+ \c!etaldisplay=\btxparameter\c!etallimit,
+ \c!otherstext={\btxspace et al.},
+ \c!separator:firstnames={\btxspace},
+ \c!separator:juniors={\btxspace},
+ \c!separator:vons={\btxspace},
+ \c!separator:initials={\btxspace},
+ \c!stopper:initials={.},
+ %\c!surnamesep={\btxcomma}, % is this used anywhere?
+ \c!separator:invertedinitials={\btxcomma},
+ \c!separator:invertedfirstnames={\btxcomma},
+ \c!separator:names:2={\btxcomma}, % separates multiple names
+ \c!separator:names:3=\btxparameter{\c!separator:2}, % before last name in a list
+ \c!separator:names:4=\btxparameter{\c!separator:2}, % between only two names
+ \c!separator:2={\btxsemicolon}, % aka pubsep - separates multiple objects
+ \c!separator:3=\btxparameter{separator:2}, % before last object in a list
+ \c!separator:4=\btxparameter{separator:2}] % between only two objects
+
+% Do we want these in the format? Loading them delayed is somewhat messy.
+
+\loadbtxdefinitionfile[commands]
+\loadbtxdefinitionfile[definitions]
+
+\loadbtxdefinitionfile[cite]
+\loadbtxdefinitionfile[list]
+\loadbtxdefinitionfile[page]
+\loadbtxdefinitionfile[author]
+
+% we assume that the users sets up the right specification and if not ... well,
+% hope for the best that something shows up and consult the manual otherwise
+
+\permanent\protected\def\usebtxdefinitions[#1]%
+ {\loadbtxdefinitionfile[#1]% % for hh
+ \setupbtx[\c!specification=#1]} % for ab
+
+\setupbtx
+ [\c!specification=\s!default,
+ \c!dataset=\v!default,
+ \c!default=\v!default]
+
+\loadbtxdefinitionfile
+ [\s!default]
+
+%D Delayed loading:
+
+\fetchmodulecommand \showbtxdatasetfields \f!publ_tra
+\fetchmodulecommand \showbtxdatasetcompleteness \f!publ_tra
+\fetchmodulecommand \showbtxdatasetauthors \f!publ_tra
+\fetchmodulecommand \showbtxhashedauthors \f!publ_tra
+\fetchmodulecommand \showbtxfields \f!publ_tra
+\fetchmodulecommand \showbtxtables \f!publ_tra
+
+%D Some potential crap:
+%D
+%D Because I consider this bad data management and a weird mix of languages only one
+%D accessor is provided.
+
+\permanent\tolerant\protected\def\btxshortcut[#1]#:#2%
+ {\clf_btxshortcut{\ifparameter#1\or#1\else\s!default\fi}{#2}}
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/publ-old.mkxl b/Master/texmf-dist/tex/context/base/mkxl/publ-old.mkxl
new file mode 100644
index 00000000000..e5cc98a7448
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/publ-old.mkxl
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=publ-old,
+%D version=2013.12.24,
+%D title=\CONTEXT\ Publication Support,
+%D subtitle=Old Fashioned \BIBTEX,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+% No protection because we have a module that overloads them!
+
+\mutable\protected\def\setupbibtex {\usemodule[oldbibtex]\setupbibtex}
+\mutable\protected\def\setuppublications {\usemodule[oldbibtex]\setuppublications}
+\mutable\protected\def\setuppublicationlist{\usemodule[oldbibtex]\setuppublicationlist}
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/publ-xml.mkxl b/Master/texmf-dist/tex/context/base/mkxl/publ-xml.mkxl
new file mode 100644
index 00000000000..74fb47e08bd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/publ-xml.mkxl
@@ -0,0 +1,111 @@
+%D \module
+%D [ file=publ-xml,
+%D version=2013.12.24,
+%D title=\CONTEXT\ Publication Support,
+%D subtitle=XML,
+%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 Publication Support / XML}
+
+\unprotect
+
+\permanent\tolerant\protected\def\convertbtxdatasettoxml[#1]%
+ {\clf_convertbtxdatasettoxml{\ifparameter#1\or#1\else\s!default\fi}} % or current when not empty
+
+% \startxmlsetups btx:initialize
+% \xmlregistereddocumentsetups{#1}{}
+% \xmlsetsetup{#1}{bibtex|entry|field}{btx:*}
+% \xmlmain{#1}
+% \stopxmlsetups
+
+\startxmlsetups btx:initialize
+ \xmlsetsetup{#1}{bibtex|entry|field}{btx:*}
+ \xmlmain{#1}
+\stopxmlsetups
+
+% \startxmlsetups btx:entry
+% \xmlflush{#1}
+% \stopxmlsetups
+
+\startxmlsetups btx:field
+ \xmlflushcontext{#1}
+\stopxmlsetups
+
+\protect \endinput
+
+% \startxmlsetups bibtex:entry:getkeys
+% \xmladdsortentry{bibtex}{#1}{\xmlfilter{#1}{/field[@name='author']/text()}}
+% \xmladdsortentry{bibtex}{#1}{\xmlfilter{#1}{/field[@name='year' ]/text()}}
+% \xmladdsortentry{bibtex}{#1}{\xmlatt{#1}{tag}}
+% \stopxmlsetups
+
+% \startbuffer
+% \startxmlsetups xml:bibtex:sorter
+% \xmlresetsorter{bibtex}
+% % \xmlfilter{#1}{entry/command(bibtex:entry:getkeys)}
+% \xmlfilter{#1}{
+% bibtex
+% /entry[@category='article']
+% /field[@name='author' and find(text(),'Knuth')]
+% /../command(bibtex:entry:getkeys)}
+% \xmlsortentries{bibtex}
+% \xmlflushsorter{bibtex}{bibtex:entry:flush}
+% \stopxmlsetups
+% \stopbuffer
+
+% \bgroup
+% \setups[bibtex-commands]
+% \getbuffer
+% \egroup
+
+% \startxmlsetups bibtex:entry:flush
+% \xmlfilter{#1}{/field[@name='author']/context()} / %
+% \xmlfilter{#1}{/field[@name='year' ]/context()} / %
+% \xmlatt{#1}{tag}\par
+% \stopxmlsetups
+
+% \startpacked
+% \getbuffer
+% \stoppacked
+
+
+% \protected\def\btx_xml_list_handle_entry
+% {\begingroup
+% \ignorespaces
+% \xmlfilter{btx:\currentbtxrendering}{/bibtex/entry[@tag='\currentbtxtag']/command(btx:format)}%
+% \removeunwantedspaces
+% \endgroup}
+
+% \startxmlsetups btx:format
+% \btxlistparameter\c!before\relax % prevents lookahead
+% \edef\currentbibxmlnode {#1}
+% \edef\currentbibxmltag {\xmlatt{#1}{tag}}
+% \edef\currentbtxcategory{\xmlatt{#1}{category}}
+% \ignorespaces
+% \xmlcommand{#1}{.}{btx:\currentbtxformat:\currentbibxmlcategory}
+% \removeunwantedspaces
+% \btxlistparameter\c!after\relax % prevents lookahead
+% \stopxmlsetups
+
+% \startxmlsetups btx:list
+% \xmlfilter{#1}{/bibtex/entry/command(bibtex:format)}
+% \stopxmlsetups
+
+% \startxmlsetups btx:btx
+% \xmlfilter{#1}{/entry/command(btx:format)}
+% \stopxmlsetups
+
+% \protected\def\btx_xml_doifelse#1{\xmldoifelse\currentbibxmlnode{/field[@name='#1']}}
+% \protected\def\btx_xml_doif #1{\xmldoif \currentbibxmlnode{/field[@name='#1']}}
+% \protected\def\btx_xml_doifnot #1{\xmldoifnot \currentbibxmlnode{/field[@name='#1']}}
+% \def\btx_xml_flush #1{\xmlcontext \currentbibxmlnode{/field[@name='#1']}}
+% \def\btx_xml_setup {\xmlsetup \currentbibxmlnode} % {#1}
+% \protected\def\btx_xml_todo #1{[#1]}
+
+% \xmlfilter{#1}{/field[@name='\currentbtxfield']/btxconcat('\currentbtxfield')}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/regi-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/regi-ini.mkxl
new file mode 100644
index 00000000000..515b6afd6f9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/regi-ini.mkxl
@@ -0,0 +1,37 @@
+%D \module
+%D [ file=regi-ini,
+%D version=2005.04.25,
+%D title=\CONTEXT\ Regime Macros,
+%D subtitle=Regime Support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{regi-ini}{}
+
+\unprotect
+
+%D \macros
+%D {enableregime,disableregime,
+%D startregime,stopregime,
+%D currentregime}
+%D
+%D Beware, the enable and disable commands are global switches, so best use the
+%D start|/|stop commands.
+
+\mutable\let\currentregime\empty
+
+\permanent\protected\def\enableregime[#1]{\clf_enableregime{#1}}
+\permanent\protected\def\disableregime {\clf_disableregime}
+\permanent\protected\def\startregime [#1]{\clf_startregime{#1}}
+\permanent\protected\def\stopregime {\clf_stopregime}
+
+% only for diagnostics:
+
+% \def\codepagename#1{\cldcontext{os.tocodepage("#1")}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-bar.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-bar.mklx
new file mode 100644
index 00000000000..4cfcbde817e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-bar.mklx
@@ -0,0 +1,404 @@
+%D \module
+%D [ file=scrn-bar, % was part of scrn-int
+%D version=1995.01.01,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Progress Bars,
+%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 Screen Macros / Progress Bars}
+
+\unprotect
+
+%D The code is a bit upgraded to \MKIV\ but the output is mostly the same. In
+%D retrospect this should have been a module. We can move some definitions to
+%D scrn-run-bar.mkiv if needed. We can also make the code a bit more efficient.
+
+% todo: replace blackrule by stupid rules
+
+%D \starttyping
+%D \setupinteraction
+%D [state=start]
+%D
+%D \setupsubpagenumber
+%D [state=start]
+%D
+%D \setuplayout
+%D [middle]
+%D
+%D \setuppapersize
+%D [S4][S4]
+%D
+%D \startsetups bars
+%D \ruledvbox to \textheight \bgroup
+%D a \ruledhbox{\interactionbar[a]}\vss
+%D b \ruledhbox{\interactionbar[b]}\vss
+%D c \ruledhbox{\interactionbar[c]}\vss
+%D d \ruledhbox{\interactionbar[d]}\vss
+%D e \ruledhbox{\interactionbar[e]}\vss
+%D f \ruledhbox{\interactionbar[f]}\vss
+%D g \ruledhbox{\interactionbar[g]}\vss
+%D \egroup
+%D \stopsetups
+%D
+%D \setuptexttexts[\setups{bars}]
+%D
+%D \starttext
+%D \dorecurse {12} {
+%D \startstandardmakeup
+%D \stopstandardmakeup
+%D }
+%D \stoptext
+%D \stoptyping
+
+\installcorenamespace{interactionbar}
+
+\installframedcommandhandler \??interactionbar {interactionbar} \??interactionbar
+
+\permanent\tolerant\protected\def\interactionbar[#tag]#spacer[#settings]% somewhat messy
+ {\iflocation
+ \begingroup
+ \ifhastok={#tag}%
+ \let\currentinteractionbar\empty
+ \setupcurrentinteractionbar[#tag]%
+ \edef\currentinteractionbar{\interactionbarparameter\c!alternative}%
+ \else
+ \edef\currentinteractionbar{#tag}%
+ \setupcurrentinteractionbar[#settings]%
+ \fi
+ \doif{\interactionbarparameter\c!state}\v!start
+ {\interactionbarparameter\c!command}%
+ \endgroup
+ \fi}
+
+\newdimen\d_scrn_bar_width
+\newdimen\d_scrn_bar_height
+\newdimen\d_scrn_bar_depth
+\newdimen\d_scrn_bar_distance
+
+%D Interaction buttons, in fact a row of tiny buttons, are typically only used for
+%D navigational purposed. The next macro builds such a row based on a specification
+%D list.
+%D
+%D \startbuffer
+%D \interactionbuttons[width=\hsize][page,PreviousJump,ExitViewer]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \getbuffer
+%D
+%D Apart from individual entries, one can use \type{page} and \type {subpage} as
+%D shortcuts to their four associated buttons. The symbols are derived from the
+%D symbols linked to the entries.
+
+\permanent\tolerant\protected\def\interactionbuttons[#settings]#spacer[#list]%
+ {\iflocation
+ \ifcstok{\interactionbarparameter\c!state}\v!start
+ \ifparameter#list\or
+ \scrn_bar_buttons_indeed{#settings}{#list}%
+ \else
+ \scrn_bar_buttons_indeed{}{#settings}%
+ \fi
+ \fi
+ \fi}
+
+\def\scrn_bar_buttons_indeed#settings#list%
+ {\begingroup
+ %\let\currentinteractionbar\empty
+ \setupcurrentinteractionbar[#settings]%
+ \d_scrn_bar_width \interactionbarparameter\c!width\relax
+ \d_scrn_bar_distance\interactionbarparameter\c!distance\relax
+ \ifzeropt\d_scrn_bar_width
+ \d_scrn_bar_width1.5\emwidth
+ \fi
+ \doifnothing{\interactionbarparameter\c!height}{\letinteractionbarparameter\c!height\v!broad}%
+ \doifnothing{\interactionbarparameter\c!depth }{\letinteractionbarparameter\c!depth\zeropoint}%%%
+ \letinteractionbarparameter\c!background\empty
+ \setbox2\hbox{\inheritedinteractionbarframed{\symbol[\interactionparameter\c!symbolset][\v!previouspage]}}%
+ \scratchheight\ht2 % needed because we default to nothing
+ \letinteractionbarparameter\c!strut\v!no
+ % \letinteractionparameter\c!width\zeropoint
+ \scratchcounterone\zerocount % new, was 1
+ \processallactionsinset
+ [#list]
+ [ \v!page=>\advance\scratchcounterone\plusfour,
+ \v!subpage=>\advance\scratchcounterone\plusfour,
+ \s!unknown=>\advance\scratchcounterone\plusone]%
+ \ifzeropt\d_scrn_bar_width
+ \scratchdimenone\dimexpr2\emwidth+\d_scrn_bar_distance\relax
+ \scratchdimentwo\dimexpr\scratchcounterone\scratchdimenone-\d_scrn_bar_distance\relax
+ \else
+ \scratchdimenone\d_scrn_bar_width
+ \scratchdimentwo\dimexpr\scratchcounterone\d_scrn_bar_distance-\d_scrn_bar_distance\relax
+ \advance\scratchdimenone -\scratchdimentwo
+ \divide\scratchdimenone \scratchcounterone
+ \scratchdimentwo\d_scrn_bar_width
+ \fi
+ \hbox to \scratchdimentwo
+ {\setnostrut
+ \startsymbolset[\interactionparameter\c!symbolset]%
+ \setupbuttons
+ [#settings,%
+ \c!height=\the\scratchheight,%
+ \c!width=\the\scratchdimenone]%
+ \processallactionsinset
+ [#list]
+ [ \v!page=>\scrn_bar_goto\v!firstpage
+ \scrn_bar_goto\v!nextpage
+ \scrn_bar_goto\v!previouspage
+ \scrn_bar_goto\v!lastpage,
+ \v!subpage=>\scrn_bar_goto\v!firstsubpage
+ \scrn_bar_goto\v!nextsubpage
+ \scrn_bar_goto\v!previoussubpage
+ \scrn_bar_goto\v!lastsubpage,
+ \s!unknown=>\scrn_bar_goto\commalistelement]%
+ \unskip
+ \stopsymbolset}%
+ \endgroup}
+
+\def\scrn_bar_goto#action%
+ {\button{\symbol[#action]}[#action]\hss}
+
+% todo: this will be \letblackruleparameter\c!width\scratchdimenone (faster)
+% todo: make these setups
+
+\def\scrn_bar_alternative_a
+ {\d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \noindent\hbox to \d_scrn_bar_width \bgroup
+ \dontcomplain
+ \setupblackrules[\c!height=\v!max,\c!depth=\v!max]%
+ \scratchdimentwo\dimexpr\d_scrn_bar_width-4\emwidth\relax
+ \processaction
+ [\interactionbarparameter\c!step]
+ [ \v!small=>\scratchcounter 20,
+ \v!medium=>\scratchcounter 10,
+ \v!big=>\scratchcounter 5,
+ \s!unknown=>\scratchcounter 10]%
+ \scratchdimenone\dimexpr\scratchdimentwo/\scratchcounter\relax
+ \setupblackrules[\c!width=\scratchdimenone]%
+ \setbox\scratchbox\hbox to \d_scrn_bar_width
+ {\hskip2\emwidth
+ \setbox\scratchbox\hpack{\blackrule[\c!color=\interactionbarparameter\c!backgroundcolor]}%
+ \dorecurse\scratchcounter
+ {\hss\normalexpanded{\directgotodumbbox{\copy\scratchbox}[page(\the\numexpr\recurselevel*\lastpage/\scratchcounter\relax)]}}%
+ \hss
+ \hskip2\emwidth}%
+ \wd\scratchbox\zeropoint
+ \box \scratchbox
+ \setupblackrules[\c!width=\emwidth]%
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!firstpage]}%
+ \hskip\emwidth
+ \ifnum\realpageno>\plusone
+ \hskip\zeropoint\s!plus\numexpr\realpageno-\plustwo\relax \s!sp\relax % cm gives overflow
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!previouspage)]}%
+ \fi
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[page(\number\realpageno)]}% todo: \v!currentpage
+ \ifnum\realpageno<\lastpage\relax
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!nextpage]}%
+ \hskip\zeropoint\s!plus\numexpr\lastpage-\realpageno-\plusone\relax \s!sp\relax % cm gives overflow
+ \fi
+ \hskip\emwidth
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\blackrule}[\v!lastpage]}%
+ \egroup}
+
+\def\scrn_bar_alternative_b
+ {\ifnum\lastpage>\firstpage\relax
+ \interactionbuttons[\v!firstpage,\v!previouspage,\v!nextpage,\v!lastpage]%
+ \fi}
+
+\def\scrn_bar_alternative_c
+ {\ifnum\lastpage>\plusone
+ \d_scrn_bar_width\interactionbarparameter\c!width
+ \hbox to \d_scrn_bar_width
+ {\setupblackrules[\c!height=\interactionbarparameter\c!height,\c!depth=\interactionbarparameter\c!depth,\c!width=\emwidth]%
+ \scratchdimen\dimexpr(\d_scrn_bar_width-4\emwidth)/\numexpr\lastpage+\minusone\relax\relax
+ \scratchdimenone\numexpr\realpageno+\minusone\relax\scratchdimen
+ \scratchdimentwo\numexpr\lastpage-\realpageno\relax\scratchdimen
+ \directgotospecbox\interactionbarparameter{\blackrule}[\v!firstpage]%
+ \hss
+ \directgotospecbox\interactionbarparameter{\blackrule[\c!width=\scratchdimenone]}[\v!previouspage]%
+ \blackrule[\c!color=\interactionbarparameter\c!contrastcolor]%
+ \directgotospecbox\interactionbarparameter{\blackrule[\c!width=\scratchdimentwo]}[\v!nextpage]%
+ \hss
+ \directgotospecbox\interactionbarparameter{\blackrule}[\v!lastpage]}%
+ \fi}
+
+\protected\def\scrn_bar_goto_a#whereto%
+ {\symbol[\ifcase#whereto\v!previous\or\v!somewhere\or\v!next\fi]}
+
+\protected\def\scrn_bar_goto_b#whereto%
+ {\vrule\s!height\d_scrn_bar_height\s!depth\d_scrn_bar_depth\s!width\scratchdimenone\relax}
+
+\protected\def\scrn_bar_goto_c#whereto%
+ {\symbol[\ifcase#whereto\v!previous\or\v!somewhere\or\v!somewhere\or\v!somewhere\or\v!next\fi}
+
+\protected\def\scrn_bar_goto_d#whereto%
+ {\vrule \s!width\scratchdimenone \ifcase#whereto%
+ \s!height \d_scrn_bar_height \s!depth \d_scrn_bar_depth \or
+ \s!height.5\d_scrn_bar_height \s!depth.5\d_scrn_bar_depth \or
+ \s!height \d_scrn_bar_height \s!depth \d_scrn_bar_depth \or
+ \s!height.5\d_scrn_bar_height \s!depth.5\d_scrn_bar_depth \else
+ \s!height \d_scrn_bar_height \s!depth \d_scrn_bar_depth \fi}
+
+\newconstant\c_scrn_bar_mode
+
+\let\scrn_bar_goto_indeed\relax
+
+\protected\def\scrn_bar_goto_x#command%
+ {\doifelse{\interactionbarparameter\c!symbol}\v!yes
+ {\setupsymbolset[\interactionparameter\c!symbolset]%
+ \let\scrn_bar_goto_indeed\scrn_bar_goto_a}
+ {\let\scrn_bar_goto_indeed\scrn_bar_goto_b}%
+ \dorecurse\nofsubpages
+ %{\scratchcounter\numexpr\recurselevel+\firstsubpage+\minusone\relax
+ {\scratchcounter\therealsubpageno\recurselevel
+ \c_scrn_bar_mode
+ \ifnum\scratchcounter<\realpageno \zerocount \else
+ \ifnum\scratchcounter=\realpageno \plusone \else
+ \plustwo \fi\fi
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\c_scrn_bar_mode}[page(\the\scratchcounter)]}%
+ #command}%
+ \unskip}
+
+\def\scrn_bar_alternative_d
+ {\ifnum\nofsubpages>\plusone \doif{\namedcounterparameter\s!subpage\c!state}\v!start{%
+ \d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \scratchdimenone\d_scrn_bar_width
+ \noindent\hbox{\scrn_bar_goto_x{\hskip\d_scrn_bar_distance}}% \hpack ?
+ }\fi}
+
+\def\scrn_bar_alternative_e
+ {\ifnum\nofsubpages>\plusone \doif{\namedcounterparameter\s!subpage\c!state}\v!start{%
+ \d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \scratchdimentwo\dimexpr\nofsubpages\d_scrn_bar_distance-\d_scrn_bar_distance\relax % (n-1)
+ \scratchdimenone\dimexpr(\d_scrn_bar_width-\scratchdimentwo)/\nofsubpages\relax
+ \ifdim\scratchdimenone<\d_scrn_bar_distance
+ \scrn_bar_alternative_f
+ \else
+ \noindent\hbox to \d_scrn_bar_width{\scrn_bar_goto_x{\hss}\unskip}% \hpack ?
+ \fi
+ }\fi}
+
+\def\scrn_bar_alternative_f
+ {\ifnum\nofsubpages>\plusone \doif{\namedcounterparameter\s!subpage\c!state}\v!start{%
+ \d_scrn_bar_width \interactionbarparameter\c!width
+ \d_scrn_bar_distance\interactionbarparameter\c!distance
+ \d_scrn_bar_height \interactionbarparameter\c!height
+ \d_scrn_bar_depth \interactionbarparameter\c!depth
+ \noindent \hbox to \d_scrn_bar_width \bgroup
+ \doloop
+ {\scratchcounterthree\numexpr(\nofsubpages/\recurselevel)+\plusone\relax % rounding
+ \scratchdimentwo\d_scrn_bar_distance
+ \multiply\scratchdimentwo \scratchcounterthree
+ \advance\scratchdimentwo -\d_scrn_bar_distance
+ \scratchdimenone\d_scrn_bar_width
+ \advance\scratchdimenone -\scratchdimentwo
+ \divide\scratchdimenone \scratchcounterthree
+ \ifdim\scratchdimenone<\d_scrn_bar_distance\else
+ \scratchcountertwo\recurselevel
+ \exitloop
+ \fi}%
+ \ifnum\scratchcounterthree>\plusone
+ % this is not that well tested
+ \advance\scratchcounterthree \minustwo
+ \scratchdimenone-\d_scrn_bar_distance
+ \scratchdimenone\scratchcounterthree\scratchdimenone
+ \advance\scratchdimenone \d_scrn_bar_width
+ \advance\scratchcounterthree \plusone
+ \divide\scratchdimenone \scratchcounterthree
+ \fi
+ \doifelse{\interactionbarparameter\c!symbol}\v!yes
+ {\setupsymbolset[\interactionparameter\c!symbolset]%
+ \let\scrn_bar_goto_indeed\scrn_bar_goto_c}%
+ {\let\scrn_bar_goto_indeed\scrn_bar_goto_d}%
+ \scratchcounterthree\numexpr\realpageno-\plustwo\relax
+ \scratchcounterfour\numexpr\realpageno+\plustwo\relax
+ \ifnum\scratchcounterthree<\plusone \scratchcounterthree\plusone \fi
+ \scratchcounterfive\zerocount
+ \dostepwiserecurse\firstsubpage\lastsubpage\plusone
+ {\donefalse
+ \advance\scratchcounterfive \plusone
+ \ifnum\recurselevel=\firstsubpage\relax \donetrue \fi
+ \ifnum\recurselevel=\lastsubpage \relax \donetrue \fi
+ \scratchcountersix\therealsubpageno\recurselevel\relax
+ \c_scrn_bar_mode
+ \ifdone
+ \ifnum\scratchcountersix<\realpageno
+ \zerocount
+ \orelse\ifnum\scratchcountersix>\realpageno
+ \plustwo
+ \else
+ \plusfour
+ \fi
+ \else
+ \ifnum\scratchcounterfive=\scratchcountertwo
+ \ifnum\scratchcountersix<\realpageno
+ \plusone
+ \orelse\ifnum\scratchcountersix>\realpageno
+ \plusthree
+ \else
+ \plustwo
+ \fi
+ \else
+ \minusone
+ \fi
+ \fi
+ \ifnum\c_scrn_bar_mode<\zerocount\else
+ \normalexpanded{\directgotospecbox\noexpand\interactionbarparameter{\scrn_bar_goto_indeed\c_scrn_bar_mode}[realpage(\the\scratchcountersix)]}%
+ \hss
+ \scratchcounterfive\zerocount
+ \fi}%
+ \unskip
+ \egroup
+ }\fi}
+
+\def\scrn_bar_alternative_g
+ {\ifnum\lastsubpage>\firstsubpage\relax % no test for state?
+ \interactionbuttons[\v!firstsubpage,\v!previoussubpage,\v!nextsubpage,\v!lastsubpage]%
+ \fi}
+
+\setupinteractionbar
+ [\c!state=\v!start,
+ \c!alternative=a,
+ \c!symbol=\v!no,
+ \c!width=10\emwidth,
+ \c!height=.5\emwidth,
+ \c!depth=\zeropoint,
+ \c!distance=.5\emwidth,
+ \c!step=\v!medium,
+ \c!foregroundcolor=\interactionbarparameter\c!color,
+ \c!foregroundstyle=\interactionbarparameter\c!style,
+ \c!color=\interactionparameter\c!color,
+ \c!contrastcolor=\interactionparameter\c!contrastcolor,
+ \c!style=,
+ \c!frame=\v!on,
+ \c!background=color,
+ \c!backgroundcolor=gray,
+ \c!samepage=\v!yes]
+
+\defineinteractionbar[a][\c!command=\scrn_bar_alternative_a]
+\defineinteractionbar[b][\c!command=\scrn_bar_alternative_b,\c!height=\v!broad]
+\defineinteractionbar[c][\c!command=\scrn_bar_alternative_c,\c!height=\v!max,\c!depth=\v!max]
+\defineinteractionbar[d][\c!command=\scrn_bar_alternative_d,\c!width=.5\emwidth]
+\defineinteractionbar[e][\c!command=\scrn_bar_alternative_e]
+\defineinteractionbar[f][\c!command=\scrn_bar_alternative_f]
+\defineinteractionbar[g][\c!command=\scrn_bar_alternative_g,\c!height=\v!broad]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-but.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-but.mklx
new file mode 100644
index 00000000000..9832ffbbb26
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-but.mklx
@@ -0,0 +1,1049 @@
+%D \module
+%D [ file=scrn-but, % moved code
+%D version=1995.01.01,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Interaction,
+%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 Screen Macros / Buttons}
+
+\registerctxluafile{scrn-but}{}
+
+%D This really needs testing in lmtx ...
+
+\unprotect
+
+%D Buttons are just what their names says: things that can be clicked (pushed) on.
+%D They are similar to \type{\goto}, except that the text argument is not
+%D interpreted. Furthermore one can apply anything to them that can be done with
+%D \type {\framed}.
+%D
+%D \startbuffer
+%D \button[width=3cm,height=1.5cm]{Exit}[ExitViewer]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \getbuffer
+%D
+%D This command is formally specified as:
+%D
+%D \showsetup{button}
+%D
+%D The characteristics can be set with:
+%D
+%D \showsetup{setupbuttons}
+
+\installcorenamespace{button}
+\installcorenamespace{buttonlocation}
+
+\installframedcommandhandler \??button {button} \??button
+
+\aliased\let\setupbuttons\setupbutton
+
+\appendtoks
+ \frozen\instance\setuevalue\currentbutton{\scrn_button_direct{\currentbutton}}%
+\to \everydefinebutton
+
+\protected\def\scrn_button_direct#tag%
+ {\begingroup
+ \edef\currentbutton{#tag}%
+ \iflocation
+ \expandafter\scrn_button_direct_status
+ \else
+ \expandafter\scrn_button_direct_ignore
+ \fi}
+
+\def\scrn_button_direct_status
+ {\ifcstok{\buttonparameter\c!state}\v!start
+ \expandafter\scrn_button_direct_indeed
+ \else
+ \expandafter\scrn_button_direct_ignore
+ \fi}
+
+% empty=yes
+%
+% \button[settings]{}[action] % normally used at the tex end
+
+\tolerant\def\scrn_button_direct_indeed[#settings]#:#text[#action]%
+ {\setupcurrentbutton[#settings]%
+ % no \dontleavehmode as it will force a vbox to \hsize which then
+ % spoils a tight box
+ \hpack\bgroup
+ \scrn_button_make
+ \buttonparameter
+ \inheritedbuttonframed
+ \letbuttonparameter
+ \setbuttonparameter
+ {#text}%
+ {#action}%
+ \egroup
+ \endgroup}
+
+\tolerant\def\scrn_button_direct_ignore[#settings]#:#text[#destination]%
+ {\endgroup}
+
+\definebutton[button] % english
+
+\setupbuttons
+ [\c!state=\v!start,
+ \c!width=\v!fit,
+ \c!height=\v!broad,
+ \c!offset=0.25\emwidth,
+ \c!frame=\v!on,
+ \c!background=,
+ \c!backgroundcolor=,
+ \c!foregroundstyle=\buttonparameter\c!style,
+ \c!foregroundcolor=\buttonparameter\c!color,
+ \c!style=\interactionparameter\c!style,
+ \c!color=\interactionparameter\c!color,
+ \c!contrastcolor=\interactionparameter\c!contrastcolor,
+ \c!samepage=\v!yes,
+ \c!unknownreference=\v!yes,
+ \c!distance=\zeropoint] % for menubuttons
+
+%D \macros
+%D {overlaybutton}
+%D
+%D For converience we provide:
+%D
+%D \starttyping
+%D \overlaybutton[reference]
+%D \stoptyping
+%D
+%D This command can be used to define overlays an/or can be used in the whatevertext
+%D areas, like:
+%D
+%D \starttyping
+%D \defineoverlay[PrevPage][\overlaybutton{PrevPage}]
+%D \setupbackgrounds[page][background=PrevPage]
+%D \setuptexttexts[\overlaybutton{NextPage}]
+%D \stoptyping
+%D
+%D For practical reasons, this macro accepts square brackets as well as braces.
+
+\permanent\tolerant\protected\def\overlaybutton[#1]#;#=%
+ {\iflocation
+ \gotobox{\overlayfakebox}[#1]%
+ \fi}
+
+%D The renderers:
+
+\aliased\letcsname\??buttonlocation\v!yes \endcsname\zerocount
+\aliased\letcsname\??buttonlocation\v!empty \endcsname\plusone
+\aliased\letcsname\??buttonlocation\v!no \endcsname\plustwo
+\aliased\letcsname\??buttonlocation\v!none \endcsname\plusthree
+\aliased\letcsname\??buttonlocation\v!normal \endcsname\plusone % default
+\aliased\letcsname\??buttonlocation\s!default\endcsname\plusone % default
+\aliased\letcsname\??buttonlocation \endcsname\plusone % default
+
+\newconditional\c_scrn_button_skipped
+\newconstant \locationboxpagestate
+
+\def\scrn_button_make#currentparameter#inheritedframed#letparameter#setparameter#text#action%
+ {\begingroup
+ \c_attr_reference\attributeunsetvalue
+ \global\setfalse\c_scrn_button_skipped
+ \locationboxpagestate\csname\??buttonlocation#currentparameter\c!samepage\endcsname % ?? bt: todo
+ \doifelsereferencefound{#action}\scrn_button_make_yes\scrn_button_make_nop
+ #currentparameter%
+ #inheritedframed%
+ #letparameter%
+ #setparameter
+ {#text}%
+ \endgroup}
+
+\def\scrn_button_make_yes
+ {\scratchcounter\referencerealpage\relax % called in otr
+ \ifcase\scratchcounter
+ \expandafter\scrn_button_make_normal % no state : something else than a page reference
+ \orelse\ifnum\scratchcounter=\realpageno
+ \expandafter\scrn_button_make_yes_same
+ \else
+ \expandafter\scrn_button_make_yes_other
+ \fi}
+
+\def\scrn_button_make_yes_same
+ {\ifcase\locationboxpagestate\relax
+ \expandafter\scrn_button_make_contrast % same page: yes: same page or not ... todo
+ \or
+ \expandafter\scrn_button_make_empty % same page: empty but frame: no click
+ \or
+ \expandafter\scrn_button_make_nothing % same page: empty no frame: no
+ \else
+ \expandafter\scrn_button_make_skipped % same page: nothing at all
+ \fi}
+
+\def\scrn_button_make_yes_other
+ {\ifcase\locationboxpagestate\relax
+ \expandafter\scrn_button_make_normal % other page: yes: same page or not ... todo
+ \or
+ \expandafter\scrn_button_make_normal % other page: empty but frame: no click
+ \or
+ \expandafter\scrn_button_make_normal % other page: empty no frame: no
+ \else
+ \expandafter\scrn_button_make_skipped % other page: nothing at all
+ \fi}
+
+\def\scrn_button_make_nop
+ {\ifcase\locationboxpagestate\relax
+ \expandafter\scrn_button_make_framed
+ \or
+ \expandafter\scrn_button_make_empty
+ \or
+ \expandafter\scrn_button_make_nothing
+ \or
+ \expandafter\scrn_button_make_skipped
+ \fi}
+
+\def\scrn_button_make_framed#currentparameter#inheritedframed#letparameter#setparameter#text%
+ {#inheritedframed{\ignorespaces#text\removeunwantedspaces}}
+
+\def\scrn_button_make_skipped#currentparameter#inheritedframed#letparameter#setparameter#text%
+ {\global\settrue\c_scrn_button_skipped}
+
+\def\scrn_button_make_normal#currentparameter#inheritedframed#letparameter#setparameter#text%
+ {\clf_injectcurrentreference
+ \hbox attr \referenceattribute \lastreferenceattribute
+ {#inheritedframed{\ignorespaces#text\removeunwantedspaces}}}
+
+\def\scrn_button_make_contrast#currentparameter#inheritedframed#letparameter#setparameter#text%
+ {\clf_injectcurrentreference
+ \hbox attr \referenceattribute \lastreferenceattribute
+ {#setparameter\c!foregroundcolor{#currentparameter\c!contrastcolor}%
+ #inheritedframed{\ignorespaces#text\removeunwantedspaces}}}
+
+\def\scrn_button_make_empty#currentparameter#inheritedframed#letparameter#setparameter#text%
+ {#letparameter\c!empty\v!yes
+ #inheritedframed{\ignorespaces#text\removeunwantedspaces}}
+
+\def\scrn_button_make_nothing#currentparameter#inheritedframed#letparameter#setparameter#text%
+ {#letparameter\c!empty\v!yes
+ #letparameter\c!frame\empty
+ #letparameter\c!background\empty
+ #inheritedframed{\ignorespaces#text\removeunwantedspaces}}
+
+%D Menus:
+%D
+%D \starttyping
+%D \setuppapersize
+%D [S6][S6]
+%D
+%D \setuplayout
+%D [backspace=6cm, cutspace=6cm,
+%D leftedge=3cm, rightedge=3cm,
+%D leftmargin=1cm, rightmargin=1cm,
+%D margindistance=5mm, edgedistance=5mm,
+%D topspace=4cm, bottomspace=4cm,
+%D header=0pt, footer=0pt,
+%D top=1cm, bottom=1cm,
+%D topdistance=5mm, bottomdistance=5mm,
+%D width=middle, height=middle]
+%D
+%D \setupinteraction
+%D [state=start,
+%D menu=on]
+%D
+%D \setupinteractionmenu
+%D [right]
+%D [state=start,background=color,frame=off,backgroundcolor=red,color=white,contrastcolor=blue]
+%D \setupinteractionmenu
+%D [left]
+%D [state=start,background=color,frame=off,backgroundcolor=green,color=white]
+%D \setupinteractionmenu
+%D [top]
+%D [state=start,background=color,frame=off,backgroundcolor=blue,color=white]
+%D \setupinteractionmenu
+%D [bottom]
+%D [state=start,background=color,frame=off,backgroundcolor=yellow,color=white]
+%D
+%D \setupinteractionmenu
+%D [left]
+%D [state=local]
+%D \setupinteractionmenu
+%D [bottom]
+%D [state=local]
+%D
+%D \startinteractionmenu[right]
+%D \startbut [page(2)] Page 2 \stopbut
+%D \startbut [page(1)] Page 1 \stopbut
+%D \includemenu[left]
+%D \includemenu[bottom]
+%D \stopinteractionmenu
+%D
+%D \startinteractionmenu[left]
+%D \startbut [page(1)] Page 1 \stopbut
+%D \startbut [page(2)] Page 2 \stopbut
+%D \stopinteractionmenu
+%D
+%D \startinteractionmenu[top]
+%D \startbut [page(1)] Page 1 \stopbut
+%D \startbut [page(2)] Page 2 \stopbut
+%D \stopinteractionmenu
+%D
+%D \startinteractionmenu[bottom]
+%D \startbut [page(2)] Page 2 \stopbut
+%D \startbut [page(1)] Page 1 \stopbut
+%D \stopinteractionmenu
+%D \stoptyping
+%D
+%D \starttyping
+%D \startinteractionmenu[rechts]
+%D \startbut [eerste] eerste \stopbut
+%D \starttxt hello world \stoptxt
+%D \startbut [tweede] tweede \stopbut
+%D \startnop \stopnop
+%D \startbut [tweede] tweede \stopbut
+%D \startrul whow \stoprul
+%D \startbut [tweede] tweede \stopbut
+%D \startraw hello world \stopraw
+%D \startbut [tweede] tweede \stopbut
+%D \startcom \vfill \stopcom
+%D \startbut [derde] derde \stopbut
+%D \stopinteractionmenu
+%D \stoptyping
+%D
+%D \starttyping
+%D \setupinteractionmenu[right][samepage=yes, unknownreference=yes]
+%D \setupinteractionmenu[right][samepage=empty,unknownreference=empty]
+%D \setupinteractionmenu[right][samepage=no, unknownreference=no]
+%D \setupinteractionmenu[right][samepage=none, unknownreference=none]
+%D \stoptyping
+
+\installcorenamespace{menu}
+\installcorenamespace{menutoks}
+\installcorenamespace{menustate}
+\installcorenamespace{menupacker}
+\installcorenamespace{menualign}
+
+\installframedcommandhandler \??menu {interactionmenu} \??menu
+
+\aliased\let\setupinteractionmenus\setupinteractionmenu
+
+\mutable\let\currentinteractionmenudistance\empty
+\mutable\let\currentinteractionmenustate \empty
+
+\let\scrn_menu_action\relax
+
+\let\scrn_menu_define_original\defineinteractionmenu
+
+\pushoverloadmode
+
+\permanent\tolerant\protected\def\defineinteractionmenu[#tag]#spacer[#category]#spacer[#settings]% category reflects location, settings can be parent
+ {\ifarguments\or
+ \scrn_menu_define_original[#tag]% % root definition
+ \or
+ \ifhastok={#category}%
+ \scrn_menu_define_original[#tag][#category]% % root definition
+ \else
+ \scrn_menu_define_original[#tag][#category][\c!category=#category]% % child definition
+ \scrn_menu_register{#tag}{#category}%
+ \fi
+ \or
+ \ifhastok={#settings}%
+ \scrn_menu_define_original[#tag][#category][\c!category=#category,#settings]% child definition
+ \else
+ \scrn_menu_define_original[#tag][#settings][\c!category=#category]% % child definition
+ \fi
+ \scrn_menu_register{#tag}{#category}%
+ \fi}
+
+\popoverloadmode
+
+\def\scrn_menu_register#tag#category%
+ {\ifcsname\??menutoks#category\endcsname \else
+ \expandafter\newtoks \csname\??menutoks#category\endcsname
+ \expandafter\setfalse\csname\??menustate#category\endcsname
+ \fi
+ % \normalexpanded{\csname\??menutoks#category\endcsname{\the\csname\??menutoks#category\endcsname\scrn_menu_action{#tag}}}}
+ \toksapp\csname\??menutoks#category\endcsname{\scrn_menu_action{#tag}}} % needs testing
+
+\def\scrn_menu_actions#category%
+ {\the\csname\??menutoks#category\endcsname}
+
+%D Fill menus:
+
+\aliased\letcsname\e!stop\v!interactionmenu\endcsname\relax
+
+%normalexpanded{\permanent\defcsname\e!start\v!interactionmenu\endcsname[#tag]#content\expandafter\noexpand\csname\e!stop\v!interactionmenu\endcsname}%
+% \normalexpanded{\permanent\expandafter\def\expandafter\noexpand\csname\e!start\v!interactionmenu\endcsname[#tag]#content\expandafter\noexpand\csname\e!stop\v!interactionmenu\endcsname}%
+\normalexpanded{\permanent\expandafter\def\expandafter\noexpand\csname\e!start\v!interactionmenu\endcsname[#tag]#content\csname\e!stop\v!interactionmenu\endcsname}%
+ {\def\currentinteractionmenu{#tag}%
+ \expandafter\settrue\csname\??menustate\interactionmenuparameter\c!category\endcsname
+ \setinteractionmenuparameter\c!menu{#content}}
+
+\permanent\protected\def\resetinteractionmenu[#tag]%
+ {\def\currentinteractionmenu{#tag}%
+ \resetinteractionmenuparameter\c!menu}
+
+%D Placement of menus:
+%D
+%D The offset mechanism is not the same as in in \MKII. There we adapted
+%D automatically to offsets in the text backgrounds. Here we have a bit more (but
+%D manual) control.
+%D
+%D \starttyping
+%D \setupbackgrounds
+%D [text][text]
+%D [background=color,backgroundcolor=gray,backgroundoffset=2mm]
+%D
+%D \setupbackgrounds
+%D [text]
+%D [rightedge,leftedge]
+%D [background=color,backgroundcolor=gray]
+%D
+%D \setupbackgrounds
+%D [top,bottom]
+%D [text]
+%D [background=color,backgroundcolor=gray]
+%D
+%D \setupinteractionmenu
+%D [right]
+%D [topoffset=0mm,bottomoffset=0mm]
+%D
+%D \setupinteractionmenu
+%D [top]
+%D [topoffset=2mm,bottomoffset=2mm,rightoffset=2mm,leftoffset=2mm]
+%D \stoptyping
+%D
+%D The no longer hard coded text areas offset compensation makes tuning easier.
+%D After all, menus need some setup anyway. The offsets are added to the width or
+%D height (this is different from \MKII).
+
+\newbox \b_scrn_menu
+
+\newdimen\d_scrn_menu_next_distance
+\newdimen\d_scrn_menu_final_width
+\newdimen\d_scrn_menu_final_height
+\newdimen\d_scrn_menu_used_width
+\newdimen\d_scrn_menu_used_height
+\newdimen\d_scrn_menu_asked_width
+\newdimen\d_scrn_menu_asked_height
+\newdimen\d_scrn_menu_offset_top
+\newdimen\d_scrn_menu_offset_bottom
+\newdimen\d_scrn_menu_offset_left
+\newdimen\d_scrn_menu_offset_right
+
+\newconditional\c_scrn_menu_zerodimensions
+
+\mutable\let\currentinteractionmenulocation\empty
+
+\def\scrn_menu_set_used
+ {\d_scrn_menu_offset_left \ifchkdim\interactionmenuparameter\c!leftoffset \or\lastchkdim\else\zeropoint\fi
+ \d_scrn_menu_offset_right \ifchkdim\interactionmenuparameter\c!rightoffset \or\lastchkdim\else\zeropoint\fi
+ \d_scrn_menu_offset_top \ifchkdim\interactionmenuparameter\c!topoffset \or\lastchkdim\else\zeropoint\fi
+ \d_scrn_menu_offset_bottom\ifchkdim\interactionmenuparameter\c!bottomoffset\or\lastchkdim\else\zeropoint\fi
+ \d_scrn_menu_asked_width \interactionmenuparameter\c!maxwidth
+ \d_scrn_menu_asked_height \interactionmenuparameter\c!maxheight
+ \d_scrn_menu_used_width\dimexpr
+ \d_scrn_menu_asked_width + \d_scrn_menu_offset_left + \d_scrn_menu_offset_right
+ \relax
+ \d_scrn_menu_used_height\dimexpr
+ \d_scrn_menu_asked_height + \d_scrn_menu_offset_top + \d_scrn_menu_offset_bottom
+ \relax}
+
+\def\scrn_menu_set_final
+ {\d_scrn_menu_final_width \namedinteractionmenuparameter\currentinteractionmenulocation\c!maxwidth
+ \d_scrn_menu_final_height\namedinteractionmenuparameter\currentinteractionmenulocation\c!maxheight}
+
+\def\scrn_menu_apply_final
+ {\ifconditional\c_scrn_menu_zerodimensions
+ \wd\b_scrn_menu\zeropoint
+ \ht\b_scrn_menu\zeropoint
+ \else
+ \wd\b_scrn_menu\d_scrn_menu_final_width
+ \ht\b_scrn_menu\d_scrn_menu_final_height
+ \fi
+ \dp\b_scrn_menu\zeropoint}
+
+\def\scrn_menu_apply_used
+ {\ifzeropt\d_scrn_menu_offset_left \else
+ \setbox\b_scrn_menu\hbox{\hskip-\d_scrn_menu_offset_left \box\b_scrn_menu}%
+ \fi
+ \ifzeropt\d_scrn_menu_offset_bottom \else
+ \setbox\b_scrn_menu\hbox{\lower \d_scrn_menu_offset_bottom \box\b_scrn_menu}%
+ \fi
+ \wd\b_scrn_menu\d_scrn_menu_asked_width
+ \ht\b_scrn_menu\d_scrn_menu_asked_height
+ \dp\b_scrn_menu\zeropoint}
+
+\setvalue{\??menualign\v!right }{\let\scrn_menu_left_align\raggedright}
+\setvalue{\??menualign\v!left }{\let\scrn_menu_left_align\raggedleft}
+\setvalue{\??menualign\v!flushright}{\let\scrn_menu_left_align\raggedleft}
+\setvalue{\??menualign\v!flushleft }{\let\scrn_menu_left_align\raggedright}
+\setvalue{\??menualign\v!middle }{\let\scrn_menu_left_align\raggedcenter}
+\setvalue{\??menualign\v!low }{\let\scrn_menu_top_align\vss\let\scrn_menu_bottom_align\relax}
+\setvalue{\??menualign\v!high }{\let\scrn_menu_top_align\relax\let\scrn_menu_bottom_align\vss}
+\setvalue{\??menualign\v!lohi }{\let\scrn_menu_top_align\vss\let\scrn_menu_bottom_align\vss}
+
+\let\scrn_menu_left_align \relax
+\let\scrn_menu_right_align \relax
+\let\scrn_menu_top_align \relax
+\let\scrn_menu_bottom_align\relax
+
+\def\scrn_menu_set_align
+ {\csname\??menualign\interactionmenuparameter\c!itemalign\endcsname}
+
+%D Hook into the pagebuilder (as less testing as possible):
+
+\def\scrn_menu_insert
+ {\iflocation
+ \expandafter\scrn_menu_insert_checked
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\scrn_menu_insert_checked#location%
+ {\ifconditional\csname\??menustate#location\endcsname
+ \scrn_menu_insert_indeed{#location}%
+ \fi}
+
+\def\scrn_menu_insert_indeed#location%
+ {\begingroup
+ \xdef\currentinteractionmenulocation{#location}%
+ \scrn_menu_set_final
+ \ifcase\d_scrn_menu_final_width \orelse \ifcase\d_scrn_menu_final_height \else
+ \forgetall
+ \global\d_scrn_menu_next_distance\zeropoint
+ \let\scrn_menu_action\scrn_menu_package_indeed
+ \the\everysetmenucommands
+ \csname\??menupacker\namedinteractionmenuparameter\currentinteractionmenulocation\c!alternative\endcsname
+ \fi
+ \endgroup}
+
+%D This calls: % can be \c!command for vertical/horizontal
+
+\let\scrn_menu_packager\relax
+
+\setvalue{\??menupacker\v!vertical}% all menus
+ {\let\scrn_menu_packager\scrn_menu_packager_vertical
+ \setbox\b_scrn_menu\hbox{\scrn_menu_actions\currentinteractionmenulocation}%
+ \scrn_menu_apply_final
+ \box\b_scrn_menu}
+
+\setvalue{\??menupacker\v!horizontal}% all menus
+ {\let\scrn_menu_packager\scrn_menu_packager_horizontal
+ \setbox\b_scrn_menu\vbox{\scrn_menu_actions\currentinteractionmenulocation}%
+ \scrn_menu_apply_final
+ \box\b_scrn_menu}
+
+% stop : skipped
+% start: processed
+% local: skipped but can be included
+% empty: processed but invisible
+
+\protected\def\scrn_menu_package_indeed#tag% one menu
+ {\begingroup
+ \edef\currentinteractionmenu{#tag}%
+ \edef\currentinteractionmenustate{\interactionmenuparameter\c!state}%
+ \ifx\currentinteractionmenustate\v!start
+ \scrn_menu_packager
+ \orelse\ifx\currentinteractionmenustate\v!empty
+ \scrn_menu_packager
+ \fi
+ \endgroup}
+
+%D With the packager being one of:
+
+\let\currentinteractionmenudistance\!!zeropoint
+
+\def\scrn_menu_packager_vertical
+ {\scrn_menu_set_used
+ \hskip\d_scrn_menu_next_distance
+ \setbox\b_scrn_menu\hbox to \d_scrn_menu_used_width
+ {\ifx\currentinteractionmenustate\v!empty \else
+ \interactionmenuparameter\c!left
+ \scrn_menu_package_vertical{\directinteractionmenuparameter\c!menu}%
+ \interactionmenuparameter\c!right
+ \fi}%
+ \edef\currentinteractionmenudistance{\interactionmenuparameter\c!distance}%
+ \ifx\currentinteractionmenudistance\v!overlay
+ \global\d_scrn_menu_next_distance\zeropoint
+ \wd\b_scrn_menu\zeropoint
+ \else
+ \global\d_scrn_menu_next_distance\currentinteractionmenudistance
+ \scrn_menu_apply_used
+ \fi
+ \box\b_scrn_menu}
+
+\def\scrn_menu_packager_horizontal
+ {\scrn_menu_set_used
+ \vskip\d_scrn_menu_next_distance
+ \scrn_menu_set_align
+ \setbox\b_scrn_menu\vbox to \d_scrn_menu_used_height
+ {\ifx\currentinteractionmenustate\v!none \else
+ \scrn_menu_top_align
+ \interactionmenuparameter\c!before
+ \scrn_menu_package_horizontal{\directinteractionmenuparameter\c!menu}%
+ \interactionmenuparameter\c!after
+ \scrn_menu_bottom_align
+ \fi}%
+ \edef\currentinteractionmenudistance{\interactionmenuparameter\c!distance}%
+ \ifx\currentinteractionmenudistance\v!overlay
+ \global\d_scrn_menu_next_distance\zeropoint
+ \offinterlineskip
+ \dp\b_scrn_menu\zeropoint
+ \ht\b_scrn_menu\zeropoint
+ \else
+ \global\d_scrn_menu_next_distance\currentinteractionmenudistance
+ \scrn_menu_apply_used
+ \fi
+ \box\b_scrn_menu}
+
+%D For a right menu, a sequence of calls to \type {right_menu_button} is generated.
+%D
+%D \starttyping
+%D right_menu_button (n, p, s=0/1/2, x, y, w, h, d) ;
+%D \stoptyping
+%D
+%D Here, n is the number of the button, s a status variable, while the rest is
+%D positional info. The status variable is 0, 1 or~2: not found, found and found but
+%D current page.
+
+\newcount \c_scrn_menu_position
+\newconstant \c_scrn_menu_page_mode % 0=notfound 1=found 2=currentpage
+\newconditional\c_scrn_menu_positioning
+\newtoks \t_scrn_menu_meta_data
+
+\def\scrn_menu_button_meta_template
+ {\currentinteractionmenulocation _menu_button(%
+ \number\c_scrn_menu_position,%
+ \number\c_scrn_menu_page_mode,%
+ \MPpos{\currentinteractionmenulocation:\number\c_scrn_menu_position}%
+ );}
+
+\permanent\def\MPmenubuttons#1{\the\t_scrn_menu_meta_data}
+
+\appendtoks
+ \global\t_scrn_menu_meta_data\emptytoks
+\to \everyshipout
+
+\def\scrn_menu_whole_position % cannot happen in previous due to align
+ {\setbox\b_scrn_menu\hbox \bgroup
+ \hpos{menu:\currentinteractionmenulocation:\the\realpageno}{\box\b_scrn_menu}%
+ \egroup}
+
+% removed: \restorestandardblank (vspacing) ... should happen elsewhere
+
+\let\scrn_menu_between_action_indeed\relax
+
+\def\scrn_menu_package_vertical#content%
+ {\begingroup
+ \global\c_scrn_menu_position\zerocount
+ \def\scrn_menu_between_action_indeed{\interactionmenuparameter\c!inbetween}%
+ \doifelse{\interactionmenuparameter\c!position}\v!yes\settrue\setfalse\c_scrn_menu_positioning
+ \scrn_menu_set_align
+ \setbox\b_scrn_menu\vbox to \d_scrn_menu_used_height \bgroup
+ \hsize\d_scrn_menu_used_width
+ \scrn_menu_left_align
+ \interactionmenuparameter\c!before\relax
+ \ignorespaces#content\unskip
+ \interactionmenuparameter\c!after
+ \scrn_menu_right_align
+ \egroup
+ \ifconditional\c_scrn_menu_positioning
+ \scrn_menu_whole_position
+ \fi
+ \box\b_scrn_menu
+ \endgroup}
+
+\def\scrn_menu_package_horizontal#content%
+ {\begingroup
+ \global\c_scrn_menu_position\zerocount
+ \def\scrn_menu_between_action_indeed{\interactionmenuparameter\c!middle}%
+ \doifelse{\interactionmenuparameter\c!position}\v!yes\settrue\setfalse\c_scrn_menu_positioning
+ \setbox\b_scrn_menu\hbox to \d_scrn_menu_used_width \bgroup
+ \interactionmenuparameter\c!left\relax
+ \ignorespaces#content\unskip
+ \interactionmenuparameter\c!right
+ \egroup
+ \ifconditional\c_scrn_menu_positioning
+ \scrn_menu_whole_position
+ \fi
+ \box\b_scrn_menu
+ \endgroup}
+
+\def\scrn_menu_action_start
+ {\dontleavehmode
+ \begingroup}
+
+\def\scrn_menu_action_stop
+ {\ifconditional\c_scrn_button_skipped \else
+ \scrn_menu_between_action_indeed
+ \fi
+ \endgroup
+ \ignorespaces}
+
+\aliased\let\startraw \aliased\let\stopraw\relax \ifdefined\raw\else \aliased\let\raw\relax \fi
+\aliased\let\startbut \aliased\let\stopbut\relax \ifdefined\but\else \aliased\let\but\relax \fi
+\aliased\let\startgot \aliased\let\stopgot\relax \ifdefined\got\else \aliased\let\got\relax \fi
+\aliased\let\startnop \aliased\let\stopnop\relax \ifdefined\nop\else \aliased\let\nop\relax \fi
+\aliased\let\starttxt \aliased\let\stoptxt\relax \ifdefined\txt\else \aliased\let\txt\relax \fi
+\aliased\let\startrul \aliased\let\stoprul\relax \ifdefined\rul\else \aliased\let\rul\relax \fi
+\aliased\let\startcom \aliased\let\stopcom\relax \ifdefined\com\else \aliased\let\com\relax \fi
+
+\protected\def\scrn_menu_raw_start[#action]#text\stopraw
+ {\scrn_menu_action_start
+ \gotobox{\ignorespaces#text\unskip}[#action]%
+ \scrn_menu_action_stop}
+
+\protected\def\scrn_menu_but_start[#action]#text\stopbut
+ {\scrn_menu_action_start
+ \ifconditional\c_scrn_menu_positioning
+ \expandafter\scrn_button_make_position
+ \else
+ \expandafter\scrn_button_make
+ \fi
+ \interactionmenuparameter
+ \inheritedinteractionmenuframed
+ \letinteractionmenuparameter
+ \setinteractionmenuparameter
+ {#text}%
+ {#action}%
+ \scrn_menu_action_stop}
+
+\def\scrn_button_make_position#currentparameter#inheritedframed#letparameter#setparameter#text#action%
+ {\global\advance\c_scrn_menu_position\plusone
+ \doifelsereferencefound{#action}% 0=not found, 1=same page, >1=elsewhere
+ {\c_scrn_menu_page_mode\ifnum\currentreferencerealpage=\realpageno\plusone\else\plustwo\fi}%
+ {\c_scrn_menu_page_mode\plustwo}%
+ \xtoksapp\t_scrn_menu_meta_data{\scrn_menu_button_meta_template}%
+ \hpos
+ {\currentinteractionmenulocation:\number\c_scrn_menu_position}%
+ {\scrn_button_make
+ #currentparameter%
+ #inheritedframed%
+ #letparameter%
+ #setparameter%
+ {#text}%
+ {#action}}}
+
+\permanent\protected\def\scrn_menu_got_start[#action]#text\stopgot
+ {\scrn_menu_action_start
+ \letinteractionmenuparameter\c!frame\v!off
+ \letinteractionmenuparameter\c!background\empty
+ \scrn_button_make
+ \interactionmenuparameter
+ \inheritedinteractionmenuframed
+ \letinteractionmenuparameter
+ \setinteractionmenuparameter
+ {#text}%
+ {#action}%
+ \scrn_menu_action_stop}
+
+\permanent\protected\def\scrn_menu_nop_start#text\stopnop
+ {\scrn_menu_action_start
+ \letinteractionmenuparameter\c!frame\v!off
+ \letinteractionmenuparameter\c!background\empty
+ \letinteractionmenuparameter\c!empty\v!yes
+ \inheritedinteractionmenuframed{\ignorespaces#text\removeunwantedspaces}%
+ \scrn_menu_action_stop}
+
+\permanent\protected\def\scrn_menu_txt_start#text\stoptxt
+ {\scrn_menu_action_start
+ \letinteractionmenuparameter\c!frame\v!off
+ \letinteractionmenuparameter\c!background\empty
+ \inheritedinteractionmenuframed{\ignorespaces#text\removeunwantedspaces}%
+ \scrn_menu_action_stop}
+
+\permanent\protected\def\scrn_menu_rul_start#text\stoprul
+ {\scrn_menu_action_start
+ \inheritedinteractionmenuframed{\ignorespaces#text\removeunwantedspaces}%
+ \scrn_menu_action_stop}
+
+\permanent\protected\def\scrn_menu_com_start#text\stopcom
+ {\ignorespaces#text\removeunwantedspaces
+ \ignorespaces}
+
+\permanent\protected\def\scrn_menu_raw#content\\{\scrn_menu_raw_start#content\stopraw} \aliased\let\stopraw\relax
+\permanent\protected\def\scrn_menu_but#content\\{\scrn_menu_but_start#content\stopbut} \aliased\let\stopbut\relax
+\permanent\protected\def\scrn_menu_got#content\\{\scrn_menu_got_start#content\stopgot} \aliased\let\stopgot\relax
+\permanent\protected\def\scrn_menu_nop#content\\{\scrn_menu_nop_start#content\stopnop} \aliased\let\stopnop\relax
+\permanent\protected\def\scrn_menu_txt#content\\{\scrn_menu_txt_start#content\stoptxt} \aliased\let\stoptxt\relax
+\permanent\protected\def\scrn_menu_rul#content\\{\scrn_menu_rul_start#content\stoprul} \aliased\let\stoprul\relax
+\permanent\protected\def\scrn_menu_com#content\\{\scrn_menu_com_start#content\stopcom} \aliased\let\stopcom\relax
+
+\newtoks\everysetmenucommands % public
+
+\appendtoks
+ \enforced\let\raw\scrn_menu_raw \enforced\let\startraw\scrn_menu_raw_start \enforced\let\stopraw\relax
+ \enforced\let\but\scrn_menu_but \enforced\let\startbut\scrn_menu_but_start \enforced\let\stopbut\relax
+ \enforced\let\got\scrn_menu_got \enforced\let\startgot\scrn_menu_got_start \enforced\let\stopgot\relax
+ \enforced\let\nop\scrn_menu_nop \enforced\let\startnop\scrn_menu_nop_start \enforced\let\stopnop\relax
+ \enforced\let\txt\scrn_menu_txt \enforced\let\starttxt\scrn_menu_txt_start \enforced\let\stoptxt\relax
+ \enforced\let\rul\scrn_menu_rul \enforced\let\startrul\scrn_menu_rul_start \enforced\let\stoprul\relax
+ \enforced\let\com\scrn_menu_com \enforced\let\startcom\scrn_menu_com_start \enforced\let\stopcom\relax
+\to \everysetmenucommands
+
+%D Sometimes handy:
+%D
+%D \starttyping
+%D \setupinteractionmenu
+%D [left]
+%D [state=local]
+%D
+%D \startinteractionmenu[right]
+%D ...
+%D \includemenu[left]
+%D ...
+%D \stopinteractionmenu
+%D \stoptyping
+
+\permanent\protected\def\includemenu[#tag]%
+ {\begingroup
+ \edef\currentinteractionmenu{#tag}%
+ \doif{\interactionmenuparameter\c!state}\v!local
+ {\letinteractionmenuparameter\c!state\v!start
+ \directinteractionmenuparameter\c!menu}%
+ \endgroup}
+
+%D Direct call (todo):
+
+\permanent\tolerant\protected\def\interactionmenu[#tag]#spacer[#settings]%
+ {\begingroup
+ \edef\currentinteractionmenu{#tag}%
+ \setupcurrentinteractionmenu[#settings]%
+ \scrn_menu_insert{#tag}%
+ \endgroup}
+
+%D Plugin handler:
+
+\protected\def\scrn_menu_insert_content_indeed
+ {\iflocation % here as we can have a fast turn-off
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\let\scrn_menu_insert_content_ignore\gobbleoneargument
+
+\appendtoks
+ \doifelse{\interactionparameter\c!menu}\v!on
+ {\let\scrn_menu_insert_content\scrn_menu_insert_content_indeed}%
+ {\let\scrn_menu_insert_content\scrn_menu_insert_content_ignore}%
+\to \everysetupinteraction
+
+%D Plugs into the page builder:
+
+\protected\def\scrn_menu_leftedge
+ {\hbox to \leftedgewidth \bgroup
+ \hsize\leftedgewidth
+ \settrue\c_scrn_menu_zerodimensions
+ \scrn_menu_insert\v!left
+ \egroup
+ \hskip-\leftedgewidth}
+
+\protected\def\scrn_menu_rightedge
+ {\hbox to \rightedgewidth \bgroup
+ \hsize\rightedgewidth
+ \settrue\c_scrn_menu_zerodimensions
+ \scrn_menu_insert\v!right
+ \egroup
+ \hskip-\rightedgewidth}
+
+\protected\def\scrn_menu_top
+ {\vbox to \topheight \bgroup
+ \vsize\topheight
+ \settrue\c_scrn_menu_zerodimensions
+ \scrn_menu_insert\v!top
+ \kern\zeropoint
+ \egroup
+ \vskip-\topheight}
+
+\protected\def\scrn_menu_bottom
+ {\vbox to \bottomheight \bgroup
+ \vsize\bottomheight
+ \settrue\c_scrn_menu_zerodimensions
+ \scrn_menu_insert\v!bottom
+ \kern\zeropoint
+ \egroup
+ \vskip-\bottomheight}
+
+\appendtoks \scrn_menu_insert_content\scrn_menu_leftedge \to \leftedgetextcontent
+\appendtoks \scrn_menu_insert_content\scrn_menu_rightedge \to \rightedgetextcontent
+\appendtoks \scrn_menu_insert_content\scrn_menu_top \to \toptextcontent
+\appendtoks \scrn_menu_insert_content\scrn_menu_bottom \to \bottomtextcontent
+
+%D Initialization (root definitions, main builders):
+
+\defineinteractionmenu [\v!vertical] [\c!alternative=\v!vertical]
+\defineinteractionmenu [\v!horizontal] [\c!alternative=\v!horizontal]
+
+%D Initialization (parent definitions, 4 area builders):
+
+\defineinteractionmenu [\v!right ] [\v!right ] [\v!vertical ]
+\defineinteractionmenu [\v!left ] [\v!left ] [\v!vertical ]
+\defineinteractionmenu [\v!top ] [\v!top ] [\v!horizontal]
+\defineinteractionmenu [\v!bottom] [\v!bottom] [\v!horizontal]
+
+\setupinteraction
+ [\c!menu=\v!off]
+
+\setupinteractionmenu
+ [\c!offset=.25em,
+ \c!position=\v!no,
+ \c!frame=\v!on,
+ \c!maxwidth=\hsize,
+ \c!maxheight=\vsize,
+ \c!background=,
+ \c!backgroundcolor=,
+ \c!foregroundstyle=\interactionmenuparameter\c!style,
+ \c!foregroundcolor=\interactionmenuparameter\c!color,
+ \c!style=\interactionparameter\c!style,
+ \c!color=\interactionparameter\c!color,
+ \c!contrastcolor=\interactionparameter\c!contrastcolor,
+ \c!state=\v!start,
+ \c!samepage=\v!yes,
+ \c!unknownreference=\v!empty,
+ \c!distance=\bodyfontsize,
+ \c!topoffset=\zeropoint,
+ \c!bottomoffset=\zeropoint,
+ \c!leftoffset=\zeropoint,
+ \c!rightoffset=\zeropoint]
+
+\setupinteractionmenu
+ [\v!vertical] % not really a menu
+ [\c!inbetween=\blank,
+ \c!before=,
+ \c!after=\vfil,
+ %\c!width=\v!fit,
+ \c!height=\v!broad]
+
+\setupinteractionmenu
+ [\v!horizontal] % not really a menu
+ [\c!middle=\hfil,
+ %\c!left=\hss,
+ %\c!right=\hss,
+ \c!width=\v!fit,
+ \c!height=\v!broad]
+
+\setupinteractionmenu
+ [\v!left]
+ [\c!itemalign=\v!flushright,
+ \c!maxwidth=\leftedgewidth,
+ \c!maxheight=\makeupheight]
+
+\setupinteractionmenu
+ [\v!right]
+ [\c!itemalign=\v!flushleft,
+ \c!maxwidth=\rightedgewidth,
+ \c!maxheight=\makeupheight]
+
+\setupinteractionmenu
+ [\v!top]
+ [\c!itemalign=\v!high,
+ \c!maxwidth=\makeupwidth,
+ \c!maxheight=\topheight]
+
+\setupinteractionmenu
+ [\v!bottom]
+ [\c!itemalign=\v!low,
+ \c!maxwidth=\makeupwidth,
+ \c!maxheight=\bottomheight]
+
+%D Lists:
+
+\definelistalternative [\v!left ] [\c!renderingsetup=strc:lists:rendering:menu]
+\definelistalternative [\v!right ] [\c!renderingsetup=strc:lists:rendering:menu]
+\definelistalternative [\v!top ] [\c!renderingsetup=strc:lists:rendering:menu]
+\definelistalternative [\v!bottom] [\c!renderingsetup=strc:lists:rendering:menu]
+
+\startsetups[strc:lists:rendering:menu]
+ \startbut[internal(\currentlistentrylocation)]
+ \limitatetext\currentlistentrytitle{\listparameter\c!maxwidth}\unknown
+ \stopbut
+\stopsetups
+
+%D Sometimes handy:
+
+\def\scrn_button_direct_status
+ {\doifelse{\buttonparameter\c!state}\v!start
+ {\dosingleempty\scrn_button_direct_indeed}%
+ {\dosingleempty\scrn_button_direct_ignore}}
+
+\permanent\protected\def\menubutton % tag settings text action
+ {\iflocation
+ \expandafter\scrn_menu_menu_button_indeed
+ \else
+ \expandafter\scrn_menu_menu_button_ignore
+ \fi}
+
+\tolerant\def\scrn_menu_menu_button_indeed[#menutag]#spacer[#settings]#:#text[#action]%
+ {\ifcstok{\interactionmenuparameter\c!state}\v!start
+ \ifparameter#settings\or
+ \expandafter\scrn_menu_menu_button_a
+ \orelse\ifhastok={#menutag}%
+ \expandafter\scrn_menu_menu_button_b
+ \else
+ \expandafter\scrn_menu_menu_button_c
+ \fi{#menutag}{#settings}{#text}{#action}%
+ \fi}
+
+\tolerant\def\scrn_menu_menu_button_ignore[#menutag]#spacer[#settings]#:#text[#action]%
+ {}
+
+\def\scrn_menu_menu_button_a#tag#settings#text#action%
+ {\dontleavehmode \begingroup
+ \edef\currentinteractionmenu{#tag}%
+ \setupcurrentinteractionmenu[#settings]%
+ \scrn_button_make
+ \interactionmenuparameter
+ \inheritedinteractionmenuframed
+ \letinteractionmenuparameter
+ \setinteractionmenuparameter
+ {#text}%
+ {#action}%
+ \endgroup}
+
+\def\scrn_menu_menu_button_b#settings#dummy#text#action%
+ {\dontleavehmode \begingroup
+ \let\currentbutton\empty
+ \setupcurrentbutton[#settings]%
+ \scrn_button_make
+ \buttonparameter
+ \inheritedbuttonframed
+ \letbuttonparameter
+ \setbuttonparameter
+ {#text}%
+ {#action}%
+ \endgroup}
+
+\def\scrn_menu_menu_button_c#tag#dummy#text#action%
+ {\dontleavehmode \begingroup
+ \edef\currentinteractionmenu{#tag}%
+ \scrn_button_make
+ \interactionmenuparameter
+ \inheritedinteractionmenuframed
+ \letinteractionmenuparameter
+ \setinteractionmenuparameter
+ {#text}%
+ {#action}%
+ \endgroup}
+
+%D Untested:
+
+\permanent\tolerant\protected\def\registermenubuttons[#menu]#spacer[#register]%
+ {\begingroup
+ \ifparameter#register\or
+ \clf_registerbuttons{#menu}{#register}{\currentlanguage}%
+ \else
+ \clf_registerbuttons{}{#menu}{\currentlanguage}%
+ \fi
+ \removeunwantedspaces
+ \endgroup}
+
+\permanent\protected\def\doregistermenubutton#1#2#3% used at lua end
+ {\ifcstok{\interactionmenuparameter\c!state}\v!start
+ \scrn_menu_menu_button_c{#1}{}{#2}{#3}%
+ \fi
+ \space}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx
new file mode 100644
index 00000000000..6c134268c60
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-fld.mklx
@@ -0,0 +1,1040 @@
+%D \module
+%D [ file=scrn-fld,
+%D version=1997.05.18,
+%D title=\CONTEXT\ Screen Macros,
+%D subtitle=Fields,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D There is still some leftover code from mkii, where we need to be sparse with hash
+%D entries and so have a somewhat complex setup mechanism. It doesn't pay off to
+%D waste time on improving this because one never knows what happens with widgets
+%D in \PDF; it has a history of dropping features like this. Also, the implementation
+%D of fields fluctuates with versions.
+
+% interaction checking
+
+\writestatus{loading}{ConTeXt Screen Macros / Fields}
+
+\unprotect
+
+\registerctxluafile{scrn-fld}{}
+
+%D In \MKII\ we had to cheat a bit with setups in order not to run out of memory
+%D with thousands of fields, which we happen to need at that time. In \MKIV\ we can
+%D store some data at the \LUA\ end and use a somewhat slower but quite okay
+%D inheritance mechanism. For this reason we now have split definitions, although
+%D the old method is still somewhat supported. The clone and copy commands are
+%D somewhat obsolete for several reasons: we can now use inheritance and autocloning
+%D has been supported for a while. In most cases cloning (especially with check
+%D boxes) the acrobat browser is not stable enough with respect to appearance
+%D handling.
+%D
+%D A fieldcategory is nothing more than a collection of settings.
+%D
+%D \starttyping
+%D \definefieldcategory
+%D [all-email]
+%D [height=1cm,
+%D width=14cm,
+%D style=sstf]
+%D \stoptyping
+%D
+%D A definition can refer to this category:
+%D
+%D \starttyping
+%D \definefieldbody [email] [type=line,category=all-email,default=pragma@xs4all.nl]
+%D \stoptyping
+%D
+%D A copy of a field is made as follows:
+%D
+%D \starttyping
+%D \definefieldbody [xmail] [email]
+%D \stoptyping
+%D
+%D You can also be more specific:
+%D
+%D \starttyping
+%D \definefieldbody[buttona][type=check,values={one,two}]
+%D \definefieldbody[buttonb][type=check,values={three,four}]
+%D \definefieldbody[buttonc][buttona][values={three,four}]
+%D \stoptyping
+%D
+%D Actually typesetting a field happens this way:
+%D
+%D \starttyping
+%D \fieldbody [Email]
+%D \fieldbody [Email] [width=6cm]
+%D \fieldbody [eMAIL]
+%D \fieldbody [eMAIL] [width=7cm]
+%D
+%D \fieldbody [buttona]
+%D \fieldbody [buttona]
+%D \fieldbody [buttonb]
+%D \fieldbody [buttonb]
+%D \fieldbody [buttonc]
+%D \fieldbody [buttonc]
+%D \stoptyping
+%D
+%D So, you can call up a field many times and quite some parameters can be set.
+%D
+%D Because there are persistent problems with acrobat rendering associated
+%D appearance streams (some messy /MK interferende) we also support native (built-in
+%D dingbat) symbols: check, circle, cross, diamond, square and star.
+%D
+%D \starttyping
+%D \definefield[test1][check]
+%D \definefield[test2][check]
+%D
+%D \fieldbody[test1][width=1em,height=\strutht,depth=\strutdp,symbol=check]
+%D \fieldbody[test1][width=1em,height=\strutht,depth=\strutdp,symbol=circle]
+%D \fieldbody[test2][width=1em,height=\strutht,depth=\strutdp,symbol=square]
+%D \stoptyping
+%D
+%D When submitting a form, we need to tell the driver module that we want \FDF\ or
+%D \HTML.
+
+\installcorenamespace {forms}
+
+\installdirectcommandhandler \??forms {forms}
+
+\appendtoks
+ \clf_setformsmethod{\formsparameter\c!method}%
+\to \everysetupforms
+
+\setupforms
+ [\c!method=XML] % no need for everyjob initialization as this is the default
+
+\mutable\let\currentfieldbackgroundcolor \empty
+\mutable\let\currentfieldbackgroundcolorvalue\empty
+\mutable\let\currentfieldbodycategory \empty
+\mutable\let\currentfieldframecolor \empty
+\mutable\let\currentfieldframecolorvalue \empty
+\mutable\let\currentfieldlabel \empty
+\mutable\let\currentfieldstackname \empty
+
+\appendtoks
+ \iflocation
+ \clf_exportformdata{\formsparameter\c!export}%
+ \fi
+\to \everystoptext
+
+%D We need to initialize symbols in a special way so that they can be used as
+%D rendering for a widget.
+
+\permanent\protected\def\presetfieldsymbols[#list]% slow
+ {\processcommacommand[#list]\scrn_symbols_preset}
+
+\def\scrn_symbols_preset#set%
+ {\processcommalist[#set]\scrn_symbols_preset_indeed}%
+
+\permanent\protected\def\scrn_symbols_preset_indeed#tag%
+ {\doifelseobjectfound{SYM}{#tag}
+ {}
+ {\settightobject{SYM}{#tag}\hbox{\symbol[#tag]}% % todo: set this as immediate xform
+ \page_otr_add_special_content{\hskip-\maxdimen\getobject{SYM}{#tag}}}} % and then force it into the file
+
+\aliased\let\dosetfieldsymbol\scrn_symbols_preset_indeed
+
+\permanent\def\dogetfieldsymbol#tag%
+ {\getobject{SYM}{#tag}}
+
+\permanent\protected\def\definedefaultsymbols % used ?
+ {\definesymbol[defaultyes][\mathematics{\times}]%
+ \definesymbol[defaultno] [\mathematics{\cdot }]}
+
+%D Now comes the real code:
+
+\installcorenamespace{fieldcategory}
+\installcorenamespace{fieldbody}
+
+\installcommandhandler \??fieldcategory {fieldcategory} \??fieldcategory
+\installcommandhandler \??fieldbody {fieldbody} \??fieldbody
+
+\newbox\b_scrn_field_body
+
+\setupfieldcategory
+ [\c!alternative=\v!normal, % normal clone copy
+ \c!type=\v!line, % line text ...
+ \c!width=5em,
+ \c!height=1em,
+ \c!depth=\zeropoint,
+ \c!align=\v!flushleft,
+ \c!option=\v!printable, % maybe we need a globaloptions and marge them
+ \c!n=1024]
+
+\def\scrn_field_check_category
+ {\edef\currentfieldbodycategory{\fieldbodyparameter\c!category}%
+ \ifempty\currentfieldbodycategory
+ \letfieldbodyparameter\s!parent\??fieldcategory
+ %\setevalue{\currentfieldbodyhash\s!parent}{\namedfieldcategoryhash\empty}% to WS: not hash !
+ \else
+ \normalexpanded{\setfieldbodyparameter{\s!parent}{\??fieldcategory\currentfieldbodycategory}}%
+ %\setevalue{\currentfieldbodyhash\s!parent}{\namedfieldcategoryhash\currentfieldbodycategory}% to WS: not hash !
+ \fi}
+
+\appendtoks % we cannot use parent .. maybe s!parent has to change
+ \ifempty\currentfieldbodyparent
+ \scrn_field_check_category
+ \clf_definefield
+ name {\currentfieldbody}%
+ alternative {normal}%
+ type {\fieldbodyparameter\c!type}%
+ category {\fieldbodyparameter\c!category}%
+ values {\fieldbodyparameter\c!values}%
+ default {\fieldbodyparameter\c!default}%
+ \relax
+ \else
+ \clf_clonefield
+ children {\currentfieldbody}%
+ alternative {clone}%
+ parent {\currentfieldbodyparent}%
+ category {\fieldbodyparameter\c!category}%
+ values {\fieldbodyparameter\c!values}%
+ default {\fieldbodyparameter\c!default}%
+ \relax
+ \fi
+\to \everydefinefieldbody
+
+\permanent\tolerant\protected\def\fieldbody[#tag]#spacer[#settings]%
+ {\iflocation
+ \hbox\bgroup
+ \edef\currentfieldbody{#tag}%
+ \setupcurrentfieldbody[#settings]%
+ \scrn_field_body_typeset
+ \box\b_scrn_field_body
+ \egroup
+ \fi}
+
+\def\scrn_field_body_typeset % todo: fieldsymbol (checkfields /MK mess)
+ {\edef\currentfieldframecolor{\fieldbodyparameter\c!fieldframecolor}%
+ \ifempty\currentfieldframecolor\else
+ \getcolorattributevalue\currentfieldframecolor\currentfieldframecolorvalue
+ % == \edef\currentfieldframecolorvalue{\thecolorattribute\currentfieldframecolor}%
+ \fi
+ \edef\currentfieldbackgroundcolor{\fieldbodyparameter\c!fieldbackgroundcolor}%
+ \ifempty\currentfieldbackgroundcolor\else
+ \getcolorattributevalue\currentfieldbackgroundcolor\currentfieldbackgroundcolorvalue
+ % == \edef\currentfieldbackgroundcolorvalue{\thecolorattribute\currentfieldbackgroundcolor}%
+ \fi
+ \usefieldbodystyleandcolor\c!style\c!color
+ \clf_insertfield
+ {\currentfieldbody}%
+ {%
+ title {\currentfieldbody}
+ width \dimexpr\fieldbodyparameter\c!width \relax
+ height \dimexpr\fieldbodyparameter\c!height\relax
+ depth \dimexpr\fieldbodyparameter\c!depth \relax
+ align {\fieldbodyparameter\c!align}%
+ length {\fieldbodyparameter\c!n}%
+ fontstyle {\fontstyle}%
+ fontalternative {\fontalternative}%
+ fontsize {\fontbody}%
+ fontsymbol {\fieldbodyparameter\c!symbol}%
+ color {\fieldbodyparameter\c!color}%
+ colorvalue \c_attr_color
+ \ifempty\currentfieldbackgroundcolor \else
+ backgroundcolor {\currentfieldbackgroundcolor}%
+ backgroundcolorvalue \numexpr\currentfieldbackgroundcolorvalue\relax
+ \fi
+ \ifempty\currentfieldframecolor \else
+ framecolor {\currentfieldframecolor}%
+ framecolorvalue \numexpr\currentfieldframecolorvalue\relax
+ \fi
+ layer {\fieldbodyparameter\c!fieldlayer}%
+ option {\fieldbodyparameter\c!option}%
+ clickin {\fieldbodyparameter\c!clickin}%
+ clickout {\fieldbodyparameter\c!clickout}%
+ regionin {\fieldbodyparameter\c!regionin}%
+ regionout {\fieldbodyparameter\c!regionout}%
+ afterkey {\fieldbodyparameter\c!afterkey}%
+ format {\fieldbodyparameter\c!format}%
+ validate {\fieldbodyparameter\c!validate}%
+ calculate {\fieldbodyparameter\c!calculate}%
+ focusin {\fieldbodyparameter\c!focusin}%
+ focusout {\fieldbodyparameter\c!focusout}%
+ openpage {\fieldbodyparameter\c!openpage}%
+ closepage {\fieldbodyparameter\c!closepage}%
+ }%
+ \relax}
+
+%D The sets are used in grouped calculations.
+%D
+%D [name] [set]
+
+\permanent\tolerant\protected\def\definefieldbodyset[#tag]#spacer[#list]%
+ {\clf_definefieldset{#tag}{#list}}
+
+\aliased\let\dodefinefieldset\definefieldbodyset % compatibility
+
+%D A few testing macros (expandable for historic reasons):
+
+\permanent\def\doifelsefieldbody #tag{\clf_doifelsefield{#tag}}
+\permanent\def\doifelsefieldcategory#tag{\clf_doifelsefieldcategory{#tag}}
+
+\aliased\let\doiffieldbodyelse \doifelsefieldbody
+\aliased\let\doiffieldcategoryelse\doifelsefieldcategory
+
+\aliased\let\doiffieldelse \doifelsefieldbody % compatibility / will be dropped
+\aliased\let\doifelsefield \doifelsefieldbody % compatibility / will be dropped
+
+%D We still support the traditional method of defining fields:
+%D
+%D \starttyping
+%D \definefield [name] [type] [category] [values] [default]
+%D
+%D \definefield [WWWW] [text] [textsetup] [default text]
+%D \definefield [XXXX] [push] [pushsetup] [yes,no] [yes]
+%D \definefield [XXXX] [check] [checksetup] [yes,no] [yes]
+%D \definefield [YYYY] [combo] [combosetup] [a,b,c,d] [b]
+%D \definefield [ZZZZ] [radio] [radiosetup] [W,X,Y,Z] [Y]
+%D
+%D \definesubfield [W] [subsetup] [p,q]
+%D \definesubfield [X,Y] [subsetup] [p,r]
+%D \definesubfield [Z] [subsetup] [y,z]
+%D
+%D evt \definemainfield ... wanneer geplaatst voor subs gegeven
+%D
+%D \clonefield [XXXX] [XX,YY] [mysetup] [on,off]
+%D \clonefield [Z] [AA,BB] [somesetup] [true,false]
+%D \clonefield [Z] [CC,DD] [anothersetup]
+%D
+%D \copyfield [XXXX] [PP,QQ,RR]
+%D \stoptyping
+%D
+%D Keep in mind that you can also use \type {\definefieldbody} to achieve the same.
+
+\permanent\tolerant\protected\def\definefield[#tag]#spacer[#type]#spacer[#category]#spacer[#values]#spacer[#default]%
+ {\definefieldbody[#tag][\c!type=#type,\c!category=#category,\c!values={#values},\c!default={#default}]}
+
+\permanent\tolerant\protected\def\definesubfield[#tag]#spacer[#category]#spacer[#values]%
+ {\definefieldbody[#tag][\c!type=sub,\c!category=#category,\c!values={#values}]}
+
+\permanent\tolerant\protected\def\clonefield[#parent]#spacer[#tag]#spacer[#category]#spacer[#values]%
+ {\definefieldbody[#tag][#parent][\c!category=#category,\c!values={#values}]}
+
+\permanent\tolerant\protected\def\copyfield[#parent]#spacer[#tag]%
+ {\definefieldbody[#tag][#parent]}
+
+\aliased\let\definemainfield\definefield % obsolete !
+
+%D We hook fields into the (viewer based) layering mechanism
+%D (implemented as properties).
+
+\appendtoks
+ \let\currentfieldcategory\empty
+ \doifelse{\interactionparameter\c!fieldlayer}\v!auto
+ {\setupcurrentfieldcategory[\c!fieldlayer=\currentviewerlayer]}%
+ {\setupcurrentfieldcategory[\c!fieldlayer=]}%
+\to \everysetupinteraction
+
+\setupinteraction
+ [\c!fieldlayer=\v!auto] % auto by default
+
+%D The \type {\fieldbody} is the more bare one. One step further goes \type
+%D {\fitfield}, in fact it (now) uses a dedicated instance of framed: \type
+%D {fitfieldframed}.
+%D
+%D \starttyping
+%D \ruledhbox{\fieldbody[Email][height=\strutht,depth=\strutdp,style=normal]}
+%D \ruledhbox{\fitfield[Email][height=\strutht,depth=\strutdp,style=normal]}
+%D \ruledhbox{\fitfield[buttona]}
+%D \stoptyping
+
+\newbox\b_scrn_field_fit_symbol
+
+\defineframed
+ [fitfieldframed]
+ [\c!strut=\v!no,
+ \c!frame=off,
+ \c!offset=\v!overlay,
+ \c!align=]
+
+\permanent\tolerant\protected\def\fitfield[#tag]#spacer[#settings]%
+ {\iflocation
+ \begingroup
+ \setbox\b_scrn_field_fit_symbol\hbox\bgroup
+ \normalexpanded{\symbol[\clf_getdefaultfieldvalue{#tag}]}%
+ \egroup
+ \fitfieldframed
+ {\fieldbody[#tag]
+ [\c!width=\wd\b_scrn_field_fit_symbol,
+ \c!height=\ht\b_scrn_field_fit_symbol,
+ \c!depth=\dp\b_scrn_field_fit_symbol,
+ #settings]}%
+ \endgroup
+ \fi}
+
+%D The traditional field command does some labeling and boxing:
+
+\installcorenamespace{fieldlabel}
+\installcorenamespace{fieldcontent}
+\installcorenamespace{fieldtotal}
+
+\installparameterhandler \??fieldlabel {fieldlabelframed}
+\installparameterhandler \??fieldcontent {fieldcontentframed}
+\installparameterhandler \??fieldtotal {fieldtotalframed}
+
+\installparametersethandler \??fieldcontent {fieldcontentframed}
+
+\installsetuphandler \??fieldlabel {fieldlabelframed}
+\installsetuphandler \??fieldcontent {fieldcontentframed}
+\installsetuphandler \??fieldtotal {fieldtotalframed}
+
+\installinheritedframed {fieldlabelframed}
+\installinheritedframed {fieldcontentframed}
+\installinheritedframed {fieldtotalframed}
+
+\setupfieldcontentframed
+ [\c!align=\v!flushleft,
+ \c!strut=\v!no,
+ \s!parent=\??regularframed] % needs checking
+
+\setupfieldcontentframed % independent
+ [\c!alternative=\v!normal,
+ \c!type=\v!line,
+ \c!width=5em,
+ \c!height=\lineheight,
+ \c!depth=\zeropoint,
+ \c!align=\v!flushleft,
+ \c!option=\v!printable,
+ \c!n=1024]
+
+\setupfieldlabelframed
+ [\c!style=,
+ \c!color=,
+ \c!align=\v!flushleft,
+ \s!parent=\??regularframed] % needs checking
+
+\setupfieldtotalframed
+ [%\c!alternative={\v!label,\v!frame,\v!horizontal},
+ \c!strut=\v!no,
+ \c!align=,
+ \s!parent=\??regularframed] % needs checking
+
+% \setupcurrent
+
+\permanent\tolerant\protected\def\setupfield[#tag]#spacer[#variant]#spacer[#totalsettings]#spacer[#labelsettings]#spacer[#fieldsettings]%
+ {\ifarguments\or\or
+ \definefieldcategory[#tag][\s!parent=\??fieldcontent#tag,#variant]%
+ \setupfieldtotalframed [#tag][\s!parent=\??fieldtotal]%
+ \setupfieldlabelframed [#tag][\s!parent=\??fieldlabel]%
+ \setupfieldcontentframed[#tag][\s!parent=\??fieldcontent,#variant]%
+ \or
+ \definefieldcategory[#tag][\s!parent=\??fieldcontent#tag,#totalsettings]%
+ \setupfieldtotalframed [#tag][\s!parent=\??fieldtotal,\c!alternative={#variant}]%
+ \setupfieldlabelframed [#tag][\s!parent=\??fieldlabel]%
+ \setupfieldcontentframed[#tag][\s!parent=\??fieldcontent,#totalsettings]%
+ \or
+ \definefieldcategory[#tag][\s!parent=\??fieldcontent#tag,#labelsettings]%
+ \setupfieldtotalframed [#tag][\s!parent=\??fieldtotal,\c!alternative={#variant},#totalsettings]%
+ \setupfieldlabelframed [#tag][\s!parent=\??fieldlabel]%
+ \setupfieldcontentframed[#tag][\s!parent=\??fieldcontent,#labelsettings]%
+ \or
+ \definefieldcategory[#tag][\s!parent=\??fieldcontent#tag,#fieldsettings]%
+ \setupfieldtotalframed [#tag][\s!parent=\??fieldtotal,\c!alternative={#variant},#totalsettings]%
+ \setupfieldlabelframed [#tag][\s!parent=\??fieldlabel,#labelsettings]%
+ \setupfieldcontentframed[#tag][\s!parent=\??fieldcontent,#fieldsettings]%
+ \fi}
+
+\permanent\tolerant\protected\def\setupfields[#variant]#spacer[#totalsettings]#spacer[#labelsettings]#spacer[#fieldsettings]%
+ {\ifarguments\or
+ \setupfieldtotalframed [#variant]%
+ \or
+ \setupfieldtotalframed [#variant]%
+ \setupfieldcontentframed[#totalsettings]%
+ \or
+ \setupfieldtotalframed [#variant]%
+ \setupfieldlabelframed [#totalsettings]%
+ \setupfieldcontentframed[#labelsettings]%
+ \or
+ \setupfieldtotalframed [\c!alternative={#variant},#totalsettings]%
+ \setupfieldlabelframed [#labelsettings]%
+ \setupfieldcontentframed[#fieldsettings]%
+ \fi}
+
+% just to get the chain right for no category:
+
+\definefieldcategory [][\s!parent=\??fieldcontent]
+%setupfieldtotalframed [][\s!parent=\??fieldtotal]
+%setupfieldlabelframed [][\s!parent=\??fieldlabel]
+%setupfieldcontentframed[][\s!parent=\??fieldcontent]
+
+% no longer supported:
+
+% \let\resetfields\relax
+
+\def\scrn_field_load_scripts{\useJSscripts[fld]\glet\scrn_field_load_scripts\relax}
+
+\newconditional\fieldlabelshown
+\newconditional\fieldframeshown
+\newconditional\fieldisvertical
+\newconditional\fieldishorizontal
+
+\mutable\let\currentfieldtotalframed \empty
+\mutable\let\currentfieldlabelframed \empty
+\mutable\let\currentfieldcontentframed\empty
+
+\mutable\let\fieldtotalframedparameterhash \empty % weird that we have to flag this
+\mutable\let\fieldlabelframedparameterhash \empty % idem
+\mutable\let\fieldcontentframedparameterhash\empty % idem
+
+\permanent\tolerant\protected\def\field[#tag]#spacer[#label]% can be sped up with \setupcurrentfieldtotalframed etc
+ {\iflocation
+ \dontleavehmode
+ \begingroup
+ \scrn_field_load_scripts
+ \edef\currentfieldbody {#tag}%
+ \edef\currentfieldlabel {#label}%
+ \edef\currentfieldcategory{\clf_getfieldcategory{#tag}}%
+ \ifempty\currentfieldlabel
+ \let\currentfieldlabel\currentfieldbody
+ \fi
+ \ifempty\currentfieldcategory
+ \setupfieldtotalframed [\currentfieldbody][\s!parent=\??fieldtotal]%
+ \setupfieldlabelframed [\currentfieldbody][\s!parent=\??fieldlabel]%
+ \setupfieldcontentframed[\currentfieldbody][\s!parent=\??fieldcontent]%
+ \definefieldcategory [\currentfieldbody]%
+ \setupfieldbody [\currentfieldbody][\c!category=\currentfieldbody]%
+ \let\currentfieldcategory\currentfieldbody
+ \fi
+ \let\currentfieldtotalframed \currentfieldcategory
+ \let\currentfieldlabelframed \currentfieldcategory
+ \let\currentfieldcontentframed\currentfieldcategory
+ \scrn_field_analyze_setups
+ \ifconditional\fieldframeshown
+ \inheritedfieldtotalframedframed % lower framedoffset
+ \bgroup
+ \else
+ \vbox
+ \bgroup
+ \fi
+ \dontcomplain
+ \ifconditional\fieldlabelshown
+ \scrn_field_set_label_box
+ \fi
+ \scrn_field_set_content_box
+ \ifconditional\fieldlabelshown
+ \ifconditional\fieldisvertical
+ \scrn_field_flush_vertical
+ \else
+ \scrn_field_flush_horizontal
+ \fi
+ \else
+ \scrn_field_flush_content
+ \fi
+ \egroup
+ \endgroup
+ \fi}
+
+% opties: veld, label, kader, vertikaal/horizontaal
+
+\newbox\b_scrn_field_label
+\newbox\b_scrn_field_content
+
+% lower framedoffset
+
+\def\scrn_field_set_label_box
+ {\setbox\b_scrn_field_label\hbox
+ {\reshapeframeboxtrue % else wrong dimensions % still needed?
+ \inheritedfieldlabelframedframed{\currentfieldlabel}}}
+
+% \c!fieldoffset=-\framedoffset,\c!fieldbackgroundcolor=,
+% \hbox{\lower\@@fdfieldoffset\hbox{\typesetfield}}
+
+\def\scrn_field_set_content_box
+ {\setbox\b_scrn_field_content\hbox
+ {\reshapeframeboxtrue % else wrong dimensions (to be checked)
+ \doifnothing{\fieldcontentframedparameter\c!height}
+ {\ifconditional\fieldisvertical
+ \setfieldcontentframedparameter\c!height{6ex}%
+ \orelse\ifconditional\fieldishorizontal
+ \setfieldcontentframedparameter\c!height{\vsize}%
+ \else
+ \setfieldcontentframedparameter\c!height{2cm}%
+ \fi}%
+ \doifnothing{\fieldcontentframedparameter\c!width}
+ {\ifconditional\fieldisvertical
+ \setfieldcontentframedparameter\c!width{\hsize}%
+ \orelse\ifconditional\fieldishorizontal
+ \setfieldcontentframedparameter\c!width{20em}%
+ \else
+ \setfieldcontentframedparameter\c!width{2cm}%
+ \fi}%
+ \inheritedfieldcontentframedframed % lower framedoffset
+ {\fieldbody
+ [\currentfieldbody]
+ [\c!width=\framedwidth,\c!height=\framedheight]}}}
+
+
+\def\scrn_field_flush_vertical
+ {\vbox
+ {\copy\b_scrn_field_label
+ \fieldtotalframedparameter\c!inbetween
+ \copy\b_scrn_field_content}}
+
+\def\scrn_field_flush_horizontal
+ {\hbox
+ {\vbox \ifdim\ht\b_scrn_field_content>\ht\b_scrn_field_label to \ht\b_scrn_field_content \fi
+ {\fieldtotalframedparameter\c!before
+ \copy\b_scrn_field_label
+ \fieldtotalframedparameter\c!after}%
+ \hskip\fieldtotalframedparameter\c!distance
+ \vbox \ifdim\ht\b_scrn_field_label>\ht\b_scrn_field_content to \ht\b_scrn_field_label \fi
+ {\fieldtotalframedparameter\c!before
+ \box\b_scrn_field_content
+ \fieldtotalframedparameter\c!after}}}
+
+\def\scrn_field_flush_content
+ {\box\b_scrn_field_content}
+
+%D todo: replace \processallactionsinset
+
+\def\scrn_field_analyze_setups
+ {\setfalse\fieldlabelshown
+ \setfalse\fieldframeshown
+ \setfalse\fieldishorizontal
+ \setfalse\fieldisvertical
+ \normalexpanded{\processallactionsinset[\fieldtotalframedparameter\c!alternative]}
+ [ \v!reset=>\setfalse\fieldlabelshown
+ \setfalse\fieldframeshown
+ \setfalse\fieldishorizontal
+ \setfalse\fieldisvertical,
+ \v!label=>\settrue\fieldlabelshown,
+ \v!frame=>\settrue\fieldframeshown,
+ \v!horizontal=>\settrue\fieldishorizontal,
+ \v!vertical=>\settrue\fieldisvertical]%
+ \ifconditional\fieldisvertical
+ \setupfieldtotalframed[\c!distance=\zeropoint,\c!inbetween=\vskip\d_framed_local_offset,\c!align=\v!right,\c!width=20em]%
+ \orelse\ifconditional\fieldishorizontal
+ \setupfieldtotalframed[\c!distance=\d_framed_local_offset,\c!inbetween=,\c!align=\c!left,\c!height=10ex]%
+ \else
+ \setupfieldtotalframed[\c!distance=\zeropoint,\c!inbetween=,\c!align=\c!left]%
+ \fi
+ \setupfieldtotalframed[\c!n=,\c!before=,\c!after=\vss,\c!style=,\c!color=]}
+
+%D Common stuff (obsolete)
+
+\newcount\c_scrn_field_system_n
+
+\permanent\def\currentsystemfield{sys::\number\c_scrn_field_system_n}
+
+\permanent\protected\def\nextsystemfield
+ {\global\advance\c_scrn_field_system_n\plusone}
+
+%D \CONTEXT\ had tooltips right from the moment that it supported fields. Due to the
+%D at that moment somewhat limited \PDF\ specification, they were implemented using
+%D \JAVASCRIPT, but nowadays more kind of actions are supported, so we can do
+%D without. The \MKIV\ version also supports definition of tooltips and
+%D configuration.
+%D
+%D \starttyping
+%D before \tooltip[right]{inbetween}{a very nice tip} after\par
+%D before \tooltip[align=normal]{inbetween}{a very\\nice tip} after\par
+%D before \tooltip[middle]{inbetween}{a very nice tip} after\par
+%D before \tooltip[left]{inbetween}{a very nice tip} after\par
+%D \stoptyping
+
+\newbox \b_scrn_tooltip_anchor
+\newbox \b_scrn_tooltip_text
+\newcount\c_scrn_tooltip_n
+
+\installcorenamespace{tooltip}
+
+\installframedcommandhandler \??tooltip {tooltip} \??tooltip
+
+\setuptooltip
+ [\c!location=\v!right,
+ \c!frame=\v!off,
+ \c!offset=.1ex,
+ \c!background=\v!color,
+ \c!backgroundcolor=gray]
+
+\appendtoks
+ \frozen\instance\setuevalue\currenttooltip{\scrn_tooltip_direct{\currenttooltip}}%
+\to \everydefinetooltip
+
+\protected\def\scrn_tooltip_direct#tag%
+ {\def\currenttooltip{#tag}%
+ \iflocation
+ \expandafter\scrn_tooltip_indeed
+ \else
+ \expandafter\scrn_tooltip_ignore
+ \fi}
+
+\tolerant\def\scrn_tooltip_ignore[#settings]#:#anchortext#tiptext%
+ {#anchortext}
+
+\mutable\let\currenttooltipname\empty
+
+\tolerant\def\scrn_tooltip_indeed[#settings]#:#anchortext#tiptext% a more modern aproach (push buttons)
+ {\dontleavehmode \hbox \bgroup
+ \dontcomplain
+ \global\advance\c_scrn_tooltip_n\plusone
+ \edef\currenttooltipname{tooltip:\number\c_scrn_tooltip_n}%
+ \setbox\b_scrn_tooltip_anchor\hbox
+ {\strut#anchortext}%
+ \doifelseassignment{#settings}
+ {\setupcurrenttooltip[#settings]}%
+ {\setupcurrenttooltip[\c!location=#settings]}%
+ \setbox\b_scrn_tooltip_text\hbox
+ {\lettooltipparameter\c!location\empty
+ \inheritedtooltipframed{#tiptext}}%
+ \definesymbol
+ [\currenttooltipname:txt]
+ [\copy\b_scrn_tooltip_text]%
+ \definefieldbody
+ [\currenttooltipname:txt]
+ [\c!type=push,
+ \c!width=\wd\b_scrn_tooltip_text,
+ \c!height=\ht\b_scrn_tooltip_text,
+ \c!depth=\dp\b_scrn_tooltip_text,
+ \c!option=\v!hidden,
+ \c!values=\currenttooltipname:txt]%
+ \setbox\b_scrn_tooltip_text\hbox
+ {\fieldbody[\currenttooltipname:txt]}%
+ \setbox\b_scrn_tooltip_text\hbox
+ {\strut\lower\dimexpr.25ex+\ht\b_scrn_tooltip_text\relax\box\b_scrn_tooltip_text}%
+ \edef\p_location{\tooltipparameter\c!location}%
+ \ifx\p_location\v!left
+ \hsmashed{\hskip\wd\b_scrn_tooltip_anchor\llap{\box\b_scrn_tooltip_text}}%
+ \orelse\ifx\p_location\v!middle
+ \hsmashed to \wd\b_scrn_tooltip_anchor{\hss\box\b_scrn_tooltip_text\hss}%
+ \else
+ \hsmashed{\box\b_scrn_tooltip_text}%
+ \fi
+ \definesymbol
+ [\currenttooltipname:but]
+ [\hphantom{\copy\b_scrn_tooltip_anchor}]%
+ \definefieldbody
+ [\currenttooltipname:but]
+ [\c!type=push,
+ \c!regionin=action(show{\currenttooltipname:txt}),
+ \c!regionout=action(hide{\currenttooltipname:txt}),
+ \c!width=\wd\b_scrn_tooltip_anchor,
+ \c!height=\ht\b_scrn_tooltip_anchor,
+ \c!depth=\dp\b_scrn_tooltip_anchor]%
+ \hsmashed{\fieldbody[\currenttooltipname:but]}%
+ \egroup
+ #anchortext}% when hyphenated the text wil stick out ... such are fields and we cannot use a link here
+
+\definetooltip[tooltip]
+
+%D From messages on the mailing list we can conclude that fieldstacks are used so we
+%D keep them in the core:
+%D
+%D \starttyping
+%D \definesymbol[one] [one]
+%D \definesymbol[two] [two]
+%D \definesymbol[three][three]
+%D
+%D \definefieldstack[mine][one,two,three]
+%D \fieldstack[mine]
+%D \fieldstack[mine]
+%D
+%D \goto{walk field}[Walk{mine}]
+%D \stoptyping
+
+% todo: expand #symbols
+
+\installcorenamespace {fieldstack}
+
+\permanent\tolerant\protected\def\definefieldstack[#tag]#spacer[#symbols]#spacer[#settings]%
+ {\ifcsname\??fieldstack#tag\endcsname
+ % already done
+ \else
+ %setgvalue{\??fieldstack#tag}{\scrn_fieldstack_construct[#tag][#symbols][#settings]}%
+ \setxvalue{\??fieldstack#tag}{\scrn_fieldstack_construct[#tag][#symbols][\normalunexpanded{#settings}]}%
+ \fi}
+
+\permanent\tolerant\protected\def\fieldstack[#tag]#spacer[#symbols]#spacer[#settings]%
+ {\ifparameter#symbols\or
+ \definefieldstack[#tag][#symbols][#settings]%
+ \fi
+ \csname\??fieldstack#tag\endcsname}
+
+\newbox\b_scrn_fieldstack_box
+
+\definesymbol[\s!empty][]
+
+\def\scrn_fieldstack_add#tag#settings#symbol%
+ {\advance\scratchcounter\plusone
+ \edef\currentfieldstackname{#tag:\number\scratchcounter}%
+ \ifnum\scratchcounter=\fieldcategoryparameter\c!start\relax
+ \definefieldbody[\currentfieldstackname][\c!type=check,\c!values={#symbol,\s!empty},\c!default={#symbol}]%
+ \else
+ \definefieldbody[\currentfieldstackname][\c!type=check,\c!values={#symbol,\s!empty},\c!default=\s!empty]%
+ \fi
+ \setbox\b_scrn_fieldstack_box\hbox{\symbol[#symbol]}%
+ \setcollector
+ [fieldstack]
+ {\fieldbody
+ [\currentfieldstackname]
+ [\c!option={\v!readonly},
+ \c!width=\wd\b_scrn_fieldstack_box,
+ \c!height=\ht\b_scrn_fieldstack_box,
+ \c!depth=\dp\b_scrn_fieldstack_box,
+ #settings]}}
+
+\protected\def\scrn_fieldstack_construct[#tag][#symbols][#settings]% start=n, 0 == leeg
+ {\iflocation
+ \dontleavehmode
+ \begingroup
+ \setupfieldcategory[\c!start=1,#settings]% was just \??fieldcategory
+ \scrn_field_load_scripts
+ \definecollector
+ [fieldstack]%
+ [\c!corner=\v!middle,
+ \c!location=\v!middle]%
+ \scratchcounter\zerocount
+ \processcommalist[#symbols]{\scrn_fieldstack_add{#tag}{#settings}}%
+ \flushcollector[fieldstack]%
+ \endgroup
+ \fi}
+
+%D Another goodie. Two actions can be hookes into an overlay.
+%D
+%D \starttyping
+%D \defineviewerlayer[test]
+%D
+%D \startviewerlayer[test]Hide Me\stopviewerlayer
+%D
+%D \defineoverlay
+%D [WithTest]
+%D [{\overlayrollbutton[HideLayer{test}][VideLayer{test}]}]
+%D
+%D \framed[background=WithTest]{toggle}
+%D \stoptyping
+
+\newcount\c_scrn_rollbutton_n
+
+\permanent\tolerant\protected\def\overlayrollbutton[#1]#*[#2]#;#=#=%
+ {\iflocation
+ \bgroup
+ \global\advance\c_scrn_rollbutton_n_button\plusone
+ \global\advance\c_scrn_rollbutton_n_symbol\plusone
+ \definesymbol
+ [rollsymbol:\number\c_scrn_rollbutton_n_symbol]
+ [{\framed[\c!frame=\v!off,\c!width=\overlaywidth,\c!height=\overlayheight]{}}]%
+ % \definefieldbody
+ % [rollbutton:\number\c_scrn_rollbutton_n_button]
+ % [\c!type=push,
+ % \c!values=rollsymbol:\number\c_scrn_rollbutton_n_symbol,
+ % \c!default=rollsymbol:\number\c_scrn_rollbutton_n_symbol]%
+ % \fitfield
+ % [rollbutton:\number\c_scrn_rollbutton_n_button]%
+ % [\c!regionin={#regionin},
+ % \c!regionout={#regionout}]%
+ %
+ \definefield
+ [rollbutton:\number\c_scrn_rollbutton_n_button][push][rollbutton]
+ [rollsymbol:\number\c_scrn_rollbutton_n_symbol]%
+ \fitfield
+ [rollbutton:\number\c_scrn_rollbutton_n_button]%
+ [\c!regionin={#1#3},\c!regionout={#2#4}]%
+ %
+ \egroup
+ \fi}
+
+% \protect \endinput % THE FOLLOWING CODE IS NOT CHECKED
+
+%D I will redo these when I need them.
+
+% \setupinteraction[state=start]
+%
+% \definepushbutton [reset]
+%
+% \startuniqueMPgraphic{whatever}{color}
+% fill fullcircle xysized (OverlayWidth,OverlayHeight) withcolor \MPvar{color} ;
+% \stopuniqueMPgraphic
+%
+% \definepushsymbol [reset] [n] [\uniqueMPgraphic{whatever}{color=red}]
+% \definepushsymbol [reset] [r] [\uniqueMPgraphic{whatever}{color=green}]
+% \definepushsymbol [reset] [d] [\uniqueMPgraphic{whatever}{color=blue}]
+%
+% \starttext
+% \startTEXpage
+% \pushbutton [reset] [page(2)]
+% \stopTEXpage
+% \startTEXpage
+% \pushbutton [reset] [page(1)]
+% \stopTEXpage
+% \stoptext
+
+\newcount\c_scrn_pushbutton_n
+
+\permanent\tolerant\protected\def\definepushbutton[#tag]#spacer[#settings]%
+ {\scrn_pushbutton_define_variant{#tag}{n}{push}%
+ \scrn_pushbutton_define_variant{#tag}{r}{\symbol[pushsymbol:#tag:n]}%
+ \scrn_pushbutton_define_variant{#tag}{d}{\symbol[pushsymbol:#tag:r]}%
+ \setvalue{pushbutton:#tag}{\scrn_pushbutton_handle{#tag}{#settings}}}
+
+\def\scrn_pushbutton_define_variant#tag#variant#content%
+ {\doifelsesymboldefined{pushsymbol:#tag:#variant}
+ \donothing
+ {\definesymbol[pushsymbol:#tag:#variant][{#content}]}}
+
+\def\scrn_pushbutton_handle#tag#settings#reference%
+ {\bgroup
+ \global\advance\c_scrn_pushbutton_n\plusone
+ \setupfield
+ [pushbutton]%
+ [\c!frame=\v!overlay,%
+ \c!offset=\v!overlay,%
+ \c!clickout={#reference},%
+ #settings]%
+ \definefield
+ [pushbutton:\number\c_scrn_pushbutton_n]%
+ [push]%
+ [pushbutton]%
+ [pushsymbol:#tag:n,pushsymbol:#tag:r,pushsymbol:#tag:d]%
+ \fitfield
+ [pushbutton:\number\c_scrn_pushbutton_n]%
+ \egroup}
+
+\permanent\tolerant\protected\def\definepushsymbol[#tag]#spacer[#variant]% [#reference]
+ {\definesymbol[pushsymbol:#tag:#variant]}
+
+\permanent\tolerant\def\pushbutton[#tag]#spacer[#variant]%
+ {\executeifdefined{pushbutton:#tag}\gobbleoneargument{#variant}}
+
+%D We plug into the menu system
+
+\permanent\permanent\protected\def\scrn_menu_psh_start[#reference]#text\stoppsh
+ {\starttxt\pushbutton[\currentinteractionmenu][#reference]\stoptxt}
+
+\permanent\permanent\protected\def\scrn_menu_psh_direct[#reference]#text\\
+ {\scrn_menu_psh_start[#reference]\stoprob}
+
+\aliased\let\startpsh\relax % maybe mutable
+\aliased\let\stoppsh \relax % maybe mutable
+\aliased\let\psh \relax % maybe mutable
+
+\appendtoks
+ \enforced\let\startpsh\scrn_menu_psh_start
+ \enforced\let\stoppsh \relax
+ \enforced\let\psh \scrn_menu_psh_direct
+\to \everysetmenucommands
+
+%D Another goodie: (unchecked in \MKIV)
+
+% calls:
+% {..} [JS..]
+% [left] {..} [JS..]
+% [a=b] {..} [JS..]
+% [left] [a=b] {..} [JS..]
+%
+% \setupbuttons[offset=0pt,frame=off] % alternative=hidden
+%
+% \rollbutton {Manuals} [JS(Goto_File{show-man.pdf})]
+% \rollbutton {Articles} [JS(Goto_File{show-art.pdf})]
+% \rollbutton {Papers} [JS(Goto_File{show-pap.pdf})]
+% \rollbutton {Presentations} [JS(Goto_File{show-pre.pdf})]
+% \rollbutton {Resources} [JS(Goto_File{show-res.pdf})]
+%
+% \rob [JS(...)] bla bla \\
+
+% \definecolor[rollover:n][red]
+% \definecolor[rollover:r][green]
+% \definecolor[rollover:d][blue]
+
+\definepalet
+ [rollover]
+ [n=red,
+ r=green,
+ d=blue]
+
+\newcount\c_scrn_rollbutton_n_button
+\newcount\c_scrn_rollbutton_n_symbol
+
+\permanent\def\lastrollbuttonindex{\the\c_scrn_rollbutton_n_button}
+
+\setupfield
+ [rollbutton]
+ [\c!frame=\v!off,
+ \c!offset=\v!overlay]
+
+\let\scrn_rollbutton_symbol\relax
+
+\def\scrn_rollbutton_symbol_m
+ {\scrn_rollbutton_symbol_indeed
+ \interactionmenuparameter
+ \inheritedinteractionmenuframed
+ \setinteractionmenuparameter
+ \useinteractionmenustyleandcolor}
+
+\def\scrn_rollbutton_symbol_b
+ {\scrn_rollbutton_symbol_indeed
+ \buttonparameter
+ \inheritedbuttonframed
+ \setbuttonparameter
+ \usebuttonstyleandcolor}
+
+\permanent\tolerant\protected\def\rollbutton[#tag]#spacer[#settings]#:#text[#reference]%
+ {\dontleavehmode
+ \bgroup
+ \global\advance\c_scrn_rollbutton_n_button\plusone
+ \global\advance\c_scrn_rollbutton_n_symbol\plusone
+ \ifparameter#tag\or
+ \ifparameter#settings\or
+ \edef\currentinteractionmenu{#tag}%
+ \setupcurrentinteractionmenu[#settings]%
+ \let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_m
+ \orelse\ifhastok={#tag}%
+ \let\currentbutton\empty
+ \setupcurrentbutton[#tag]%
+ \let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_b
+ \else
+ \edef\currentinteractionmenu{#tag}%
+ \let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_m
+ \fi
+ \else
+ \let\scrn_rollbutton_symbol\scrn_rollbutton_symbol_b
+ \fi
+ % todo: share symbols, tricky since different dimensions (maybe \unique...)
+ \definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:n][\scrn_rollbutton_symbol{n}{#text}]%
+ \definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:r][\scrn_rollbutton_symbol{r}{#text}]%
+ \definesymbol[rollsymbol:\number\c_scrn_rollbutton_n_symbol:d][\scrn_rollbutton_symbol{d}{#text}]%
+ \definefield
+ [rollbutton:\number\c_scrn_rollbutton_n_button][push][rollbutton]
+ [rollsymbol:\number\c_scrn_rollbutton_n_symbol:n,%
+ rollsymbol:\number\c_scrn_rollbutton_n_symbol:r,%
+ rollsymbol:\number\c_scrn_rollbutton_n_symbol:d]%
+ \fitfield
+ [rollbutton:\number\c_scrn_rollbutton_n_button]%
+ [\c!clickout={#reference}]%
+ \egroup}
+
+\protected\def\scrn_rollbutton_symbol_indeed#getparameter#inheritedframed#setparameter#usestyleandcolor#what#text%
+ {\definecolor[rollover][rollover:#what]%
+ \doifelse{#what}{n}% ?
+ {\doifelse{#getparameter\c!alternative}\v!hidden\phantom\hbox}\hbox
+ {#setparameter\c!framecolor {rollover}%
+ #setparameter\c!backgroundcolor{rollover}%
+ #setparameter\c!color {rollover}%
+ #inheritedframed{#usestyleandcolor\c!style\c!color{#text}}}}
+
+%D We plug into the menu system
+
+\permanent\protected\def\scrn_menu_rob_start[#reference]#text\stoprob
+ {\starttxt\rollbutton[\currentinteractionmenu]{\ignorespaces#text\unskip}[#reference]\stoptxt}
+
+\permanent\protected\def\scrn_menu_rob_direct[#reference]#text\\
+ {\scrn_menu_rob_start[#reference]#text\stoprob}
+
+\aliased\let\startrob\relax % maybe mutable
+\aliased\let\stoprob \relax % maybe mutable
+\aliased\let\rob \relax % maybe mutable
+
+\appendtoks
+ \enforced\let\startrob\scrn_menu_rob_start
+ \enforced\let\stoprob \relax
+ \enforced\let\rob \scrn_menu_rob_direct
+\to \everysetmenucommands
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-hlp.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-hlp.mklx
new file mode 100644
index 00000000000..da2afd0d0c1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-hlp.mklx
@@ -0,0 +1,160 @@
+%D \module
+%D [ file=scrn-hlp,
+%D version=1998.10.10,
+%D title=\CONTEXT\ Screen Macros,
+%D subtitle=Help (Experimental),
+%D author={Hans Hagen \& Ton Otten},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Screen Macros / Help popups}
+
+%D As this functionality was in the core and as I don't know how often it is used,
+%D we'll keep it around. However, it is upgraded and usage has changed a bit. We
+%D also use some \LUA\ magic in order to avoid multiple passes.
+
+\registerctxluafile{scrn-hlp}{}
+
+%D Using help boils down to plugging the placement macro someplace visible, like:
+%D
+%D \starttyping
+%D \setuptexttexts[\centerbox{\placehelp}]
+%D \stoptyping
+%D
+%D When this is done, the following should work out okay:
+%D
+%D \starttyping
+%D test \helptext{word}{tip top 1 is somewhat longer} test
+%D test \helptext{word}{tip top 2} test
+%D
+%D \starthelptext[oeps]
+%D \input tufte
+%D \stophelptext
+%D
+%D test test \showhelp{some help}[oeps] test
+%D test test \button[location=depth]{\helpsignal{oeps}OEPS}[oeps] test
+%D
+%D test test \button[location=depth]{next}[page(2)] test
+%D
+%D \page
+%D
+%D test \helptext{word}{tip top one} test
+%D test \helptext{word}{tip top two} test
+%D \stoptyping
+%D
+%D Currently you need to use the signal in custom macros but that might change at
+%D some point.
+
+\unprotect
+
+% also status
+
+\newbox \b_scrn_help_box
+\newcount\c_scrn_help_n
+
+\definesystemattribute[help][public]
+
+\installcorenamespace{popuphelp}
+
+\installframedcommandhandler \??popuphelp {help} \??popuphelp
+
+\setuphelp
+ [\c!frame=\v!off,
+ \c!align=\v!normal,
+ \c!background=\v!color,
+ \c!backgroundcolor=gray]
+
+\appendtoks
+ \frozen\instance\protected\edefcsname \currenthelp\endcsname{\scrn_help_argument{\currenthelp}}%
+ \frozen\instance\protected\edefcsname\e!start\currenthelp\endcsname{\scrn_help_start {\currenthelp}}%
+ \frozen\instance\protected\edefcsname\e!stop \currenthelp\endcsname{\scrn_help_stop }%
+\to \everydefinehelp
+
+\mutable\let\currenthelpreference\empty
+\mutable\let\currenthelpname \empty
+
+\protected\def\scrn_help_argument#category%
+ {\def\currenthelp{#category}%
+ \global\advance\c_scrn_help_n\plusone
+ \edef\currenthelpname{help:\number\c_scrn_help_n}%
+ \doifelselocation\scrn_help_argument_indeed\scrn_help_argument_ignore}
+
+\tolerant\def\scrn_help_argument_indeed[#reference]#:#text#target%
+ {\edef\currenthelpreference{#reference}%
+ \dontleavehmode \hbox \bgroup
+ \dontcomplain
+ \setbox\b_scrn_help_box\hbox{\strut#text}%
+ \scrn_help_register{#target}%
+ \egroup % can be usernode instead
+ \goto
+ {\helpsignal{\number\c_scrn_help_n}#target}%
+ [\helpaction{\number\c_scrn_help_n}]}
+
+\tolerant\def\scrn_help_argument_ignore[#reference]#:#text#target%
+ {#target}
+
+\tolerant\protected\def\scrn_help_start#category#spacer[#reference]%
+ {\global\advance\c_scrn_help_n\plusone
+ \edef\currenthelp{#category}%
+ \edef\currenthelpreference{#reference}%
+ \edef\currenthelpname{help:\number\c_scrn_help_n}%
+ \grabbufferdatadirect\currenthelp{\e!start\currenthelp}{\e!stop\currenthelp}}
+
+\protected\def\scrn_help_stop
+ {\iflocation
+ \scrn_help_register{\getbuffer[\currenthelp]}%
+ \fi}
+
+\def\scrn_help_register#text%
+ {\setbox\b_scrn_help_box\hbox{\inheritedhelpframed{#text}}% \hpack ?
+ \definesymbol
+ [\currenthelpname]
+ [\copy\b_scrn_help_box]%
+ \definefieldbody
+ [\currenthelpname]
+ [\c!type=push,
+ \c!width=\wd\b_scrn_help_box,
+ \c!height=\ht\b_scrn_help_box,
+ \c!depth=\dp\b_scrn_help_box,
+ \c!option=\v!hidden,
+ \c!clickin=action(hide{\currenthelpname}),
+ \c!closepage=action(hide{\currenthelpname}),
+ \c!values=\currenthelpname]%
+ \setbox\b_scrn_help_box\hbox
+ {\fieldbody[\currenthelpname]}%
+ \clf_registerhelp
+ number \c_scrn_help_n
+ name {\currenthelpreference}%
+ box \b_scrn_help_box
+ \relax}
+
+\permanent\protected\def\doifelsehelp
+ {\ifcase\c_scrn_help_n
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifhelpelse\doifelsehelp
+
+\permanent\protected\def\placehelp % was \helpdata
+ {\ifinpagebody\ifcase\c_scrn_help_n\else
+ \clf_collecthelp\normalpagebox
+ \fi\fi}
+
+\permanent\def\helpreference#category{\clf_helpreference{#category}} % could be public implementors
+\permanent\def\helpaction #category{\clf_helpaction {#category}} % could be public implementors
+
+\permanent\protected\def\helpsignal#category%
+ {\hbox attr \helpattribute \helpreference{#category}{}}
+
+\permanent\protected\def\showhelp#target[#category]%
+ {\goto{\helpsignal{#category}#target}[#category]}
+
+\definehelp[\v!helptext]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-ini.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-ini.mklx
new file mode 100644
index 00000000000..c0246bc8328
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-ini.mklx
@@ -0,0 +1,254 @@
+%D \module
+%D [ file=scrn-ini,
+%D version=2011.02.27,
+%D title=\CONTEXT\ Interaction Macros,
+%D subtitle=Initialization,
+%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 Interaction Macros / Initialization}
+
+\unprotect
+
+\registerctxluafile{scrn-ini}{}
+
+%D There is no interaction at all unless enabled by saying:
+%D
+%D \starttyping
+%D \setupinteraction[state=start]
+%D \stoptyping
+%D
+%D The other settings are:
+%D
+%D \showsetup{setupinteraction}
+
+\installcorenamespace{interaction}
+
+\installswitchcommandhandler \??interaction {interaction} \??interaction
+
+\appendtoks
+ \ifempty\previousinteraction
+ \checkinteractionstate
+ \orelse\ifx\currentinteraction\previousinteraction
+ \checkinteractionstate
+ \fi
+\to \everysetupinteraction
+
+\permanent\protected\def\checkinteractionstate
+ {\doifelse{\interactionparameter\c!state}\v!start
+ {\locationtrue \setsystemmode \v!interaction}%
+ {\locationfalse \resetsystemmode\v!interaction}}
+
+\permanent\def\doifelselocation % expandable
+ {\iflocation
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doiflocationelse\doifelselocation
+
+\setupinteraction
+ [\c!state=\v!stop]
+
+\setupinteraction
+ [\c!title=,
+ \c!subtitle=,
+ \c!author=,
+ \c!keyword=,
+ \c!date=]
+
+\appendtoks
+ \setupinteraction % todo: remember info at the lua end (already possible)
+\to \everyjob
+
+% it makes no sense to create an environment as we will seldom have structured
+% interactions so a general start-stop will do
+%
+% \appendtoks
+% \setuevalue \currentinteraction {\scrn_interaction_direct{\currentinteraction}}%
+% \setuevalue{\e!start\currentinteraction}{\scrn_interaction_start {\currentinteraction}}%
+% \setuevalue{\e!stop \currentinteraction}{\scrn_interaction_stop }%
+% \to \everydefineinteraction
+%
+% \protected\def\scrn_interaction_direct#1%
+% {\edef\currentinteraction{#1}}
+%
+% \protected\def\scrn_interaction_start#1%
+% {\pushmacro\currentinteraction
+% \edef\currentinteraction{#1}}
+%
+% \protected\def\scrn_interaction_stop
+% {\popmacro\currentinteraction}
+%
+% \protected\def\setinteraction[#1]%
+% {\def\currentinteraction{#1}}
+%
+% \defineinteraction[\v!interaction]
+
+\permanent\protected\def\startinteraction[#1]%
+ {\pushmacro\currentinteraction
+ \edef\currentinteraction{#1}}
+
+\permanent\protected\def\stopinteraction
+ {\popmacro\currentinteraction}
+
+\permanent\protected\def\setinteraction[#1]%
+ {\def\currentinteraction{#1}}
+
+\defineinteraction % keep it simple
+ [\v!hidden]
+
+\setupinteraction
+ [\v!hidden]
+ [\c!state=\v!start,
+ \c!color=,
+ \c!contrastcolor=,
+ \c!style=,
+ \c!click=\v!off]
+
+%D As long as there a natural feeling of what can be considered
+%D hyper active or not, we have to tell users where they can
+%D possibly click. We've already seen a few macros that deal
+%D with this visualization, something we definitely do not let
+%D up to the viewer. One way of telling is using a distinctive
+%D typeface, another way is using color.
+%D
+%D There are two colors involved: one for normal hyperlinks,
+%D and one for those that point to the currentpage, the
+%D contrast color.
+
+\definecolor [interactioncolor] [r=0, g=.6, b=0]
+\definecolor [interactioncontrastcolor] [r=.8, g=0, b=0]
+
+%D The next few macros are responsible for highlighting hyper
+%D links. The first one, \type{\showlocation}, is used in those
+%D situations where the typeface is handled by the calling
+%D macro.
+
+%D When we're dealing with pure page references, contrast
+%D colors are used when we are already at the page mentioned.
+
+\permanent\protected\def\setlocationcolorspecified#1% not grouped !
+ {\ifnum#1=\plusone
+ \edef\p_contrastcolor{\interactionparameter\c!contrastcolor}%
+ \ifempty\p_contrastcolor
+ \useinteractioncolorparameter\c!color
+ \else
+ \useinteractioncolorparameter\c!contrastcolor
+ \fi
+ \else % we could just set and if > 0 set again
+ \useinteractioncolorparameter\c!color
+ \fi}
+
+\permanent\protected\def\setlocationattributesspecified#1% not grouped !
+ {\ifnum#1=\plusone
+ \edef\p_contrastcolor{\interactionparameter\c!contrastcolor}%
+ \ifempty\p_contrastcolor
+ \useinteractionstyleandcolor\c!style\c!color
+ \else
+ \useinteractionstyleandcolor\c!style\c!contrastcolor
+ \fi
+ \else % we could just set and if > 0 set again
+ \useinteractionstyleandcolor\c!style\c!color
+ \fi}
+
+\permanent\protected\def\setlocationcolorspecspecified#1#2% \resolver
+ {\ifnum#1=\plusone
+ \edef\p_contrastcolor{#2\c!contrastcolor}%
+ \ifempty\p_contrastcolor
+ \colo_helpers_activate{#2\c!color}%
+ \else
+ \colo_helpers_activate\p_contrastcolor
+ \fi
+ \else
+ \colo_helpers_activate{#2\c!color}%
+ \fi}
+
+\permanent\protected\def\setlocationcolor {\setlocationcolorspecified \referencepagestate}
+\permanent\protected\def\setlocationattributes{\setlocationattributesspecified\referencepagestate}
+\permanent\protected\def\setlocationcolorspec {\setlocationcolorspecspecified \referencepagestate}
+
+\permanent\protected\def\setlocationfont % not grouped !
+ {\useinteractionstyleparameter\c!style}
+
+\setupinteraction
+ [\c!style=\v!bold,
+ \c!color=interactioncolor,
+ \c!contrastcolor=interactioncontrastcolor]
+
+%D Identity
+
+% \newconditional\c_scrn_identity_preroll
+%
+% \installtexdirective
+% {interaction.identity.preroll}
+% {\settrue \c_scrn_identity_preroll}
+% {\setfalse\c_scrn_identity_preroll}
+%
+% \def\scrn_identity_prerolled#1%
+% {\begingroup
+% \edef\tempstring{\interactionparameter#1}%
+% \ifempty\tempstring
+% \endgroup
+% \else
+% \the\everypreroll
+% \nodestostring\tempstring{\tempstring}%
+% \normalexpanded{\endgroup\setexpandedinteractionparameter{#1}{\tempstring}}%
+% \fi}
+%
+% \def\scrn_identity_synchronize
+% {\begingroup
+% \ifconditional\c_scrn_identity_preroll
+% \scrn_identity_prerolled\c!title
+% \scrn_identity_prerolled\c!subtitle
+% \scrn_identity_prerolled\c!author
+% \scrn_identity_prerolled\c!date
+% \scrn_identity_prerolled\c!keyword
+% \fi
+% \clf_setupidentity
+% title {\interactionparameter\c!title}%
+% subtitle {\interactionparameter\c!subtitle}%
+% author {\interactionparameter\c!author}%
+% % creator {ConTeXt - \contextversion}%
+% date {\interactionparameter\c!date}%
+% keywords {\interactionparameter\c!keyword}%
+% \relax
+% \endgroup}
+
+\def\scrn_identity_synchronize
+ {\clf_setupidentity
+ title {\prerolltostring{\interactionparameter\c!title}}%
+ subtitle {\prerolltostring{\interactionparameter\c!subtitle}}%
+ author {\prerolltostring{\interactionparameter\c!author}}%
+ % creator {ConTeXt - \contextversion}% fixed
+ date {\prerolltostring{\interactionparameter\c!date}}%
+ keywords {\prerolltostring{\interactionparameter\c!keyword}}%
+ \relax}
+
+\appendtoks
+ \scrn_identity_synchronize
+\to \everysetupinteraction
+
+% this comes before starttext
+
+\def\scrn_identity_document#1#2%
+ {\doifdocumentvariable{metadata:#1}{\setupinteraction[#2=\documentvariable{metadata:#1}]}}
+
+\appendtoks % not interfaced i.e. english
+ \scrn_identity_document {title}\c!title
+ \scrn_identity_document {subject}\c!subtitle
+ \scrn_identity_document{subtitle}\c!subtitle
+ \scrn_identity_document {author}\c!author
+ \scrn_identity_document {authors}\c!author
+ \scrn_identity_document {keyword}\c!keyword
+ \scrn_identity_document{keywords}\c!keyword
+ \scrn_identity_document {date}\c!date
+\to \everystartdocument % or stop
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-pag.lmt b/Master/texmf-dist/tex/context/base/mkxl/scrn-pag.lmt
new file mode 100644
index 00000000000..210a57707db
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-pag.lmt
@@ -0,0 +1,56 @@
+if not modules then modules = { } end modules ['scrn-pag'] = {
+ version = 1.001,
+ comment = "companion to scrn-pag.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+interactions = interactions or { }
+interactions.pages = interactions.pages or { }
+local pages = interactions.pages
+
+local implement = interfaces.implement
+
+pages.setupcanvas = layouts.setupcanvas
+
+local codeinjections = backends.codeinjections
+
+function pages.setpagetransition(specification)
+ codeinjections.setpagetransition(specification)
+end
+
+implement {
+ name = "setupcanvas",
+ actions = pages.setupcanvas,
+ arguments = {
+ {
+ { "mode" },
+ { "singlesided", "boolean" },
+ { "doublesided", "boolean" },
+ { "leftoffset", "dimen" },
+ { "topoffset", "dimen" },
+ { "width", "dimen" },
+ { "height", "dimen" },
+ { "paperwidth", "dimen" },
+ { "paperheight", "dimen" },
+ { "cropoffset", "dimen" },
+ { "bleedoffset", "dimen" },
+ { "artoffset", "dimen" },
+ { "trimoffset", "dimen" },
+ { "copies", "integer" },
+ { "print", "string" }, -- , tohash
+ }
+ }
+}
+
+implement {
+ name = "setpagetransition",
+ actions = pages.setpagetransition,
+ arguments = {
+ {
+ { "n" },
+ { "delay", "integer" },
+ }
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-pag.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-pag.mklx
new file mode 100644
index 00000000000..09c542678fd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-pag.mklx
@@ -0,0 +1,324 @@
+%D \module
+%D [ file=scrn-pag,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Screen Macros,
+%D subtitle=Pages, % moved code
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% pagecomments will be done differently
+
+\writestatus{loading}{ConTeXt Screen Macros / Pages}
+
+\registerctxluafile{scrn-pag}{autosuffix}
+
+\unprotect
+
+\installcorenamespace{interactionscreen}
+
+\installparameterhandler \??interactionscreen {interactionscreen}
+\installsetuphandler \??interactionscreen {interactionscreen}
+
+\newdimen\canvaswidth
+\newdimen\canvasheight
+\newdimen\canvasbackoffset
+\newdimen\canvastopoffset
+\newdimen\canvasmaxwidth
+\newdimen\canvasmaxheight
+\newdimen\canvascropoffset
+\newdimen\canvastrimoffset
+\newdimen\canvasbleedoffset
+\newdimen\canvasartoffset
+
+\mutable\let\currentinteractionscreendelay \empty
+\mutable\let\currentinteractionscreenheight\empty
+\mutable\let\currentinteractionscreenwidth \empty
+
+\newconditional\c_scrn_canvas_tight_page
+
+\def\scrn_canvas_calculate
+ {\begingroup
+ \edef\currentinteractionscreenwidth {\interactionscreenparameter\c!width }%
+ \edef\currentinteractionscreenheight{\interactionscreenparameter\c!height}%
+ \canvasbackoffset\backspace
+ \canvastopoffset\topspace
+ \donetrue
+ \ifx\currentinteractionscreenwidth\v!max
+ \global\canvaswidth\printpaperwidth
+ \orelse\ifx\currentinteractionscreenwidth\v!fit
+ \donefalse
+ \global\canvaswidth\dimexpr
+ \leftcombitotal
+ + \makeupwidth
+ + \rightcombitotal
+ + 2\dimexpr
+ \interactionscreenparameter\c!backspace
+ + \interactionscreenparameter\c!horoffset
+ \relax
+ \relax
+ \orelse\ifx\currentinteractionscreenwidth\v!tight
+ \donefalse
+ \ifdim\backspace>\canvaswidth
+ \ifdim\backspace>\zeropoint\relax
+ \global\advance\canvasbackoffset -\canvaswidth
+ \fi
+ \fi
+ \global\advance\canvaswidth\dimexpr
+ \makeupwidth
+ + \rightcombitotal
+ + 2\dimexpr
+ \interactionscreenparameter\c!backspace
+ + \interactionscreenparameter\c!horoffset
+ \relax
+ \relax
+ \else
+ \donefalse
+ \global\canvaswidth\currentinteractionscreenwidth
+ \fi
+ \ifx\currentinteractionscreenheight\v!max
+ \global\canvasheight\printpaperheight
+ \orelse\ifx\currentinteractionscreenheight\v!fit
+ \donefalse
+ \global\canvasheight\dimexpr
+ \topheight
+ + \topdistance
+ + \makeupheight
+ + \bottomdistance
+ + \bottomheight
+ + 2\dimexpr
+ \interactionscreenparameter\c!topspace
+ + \interactionscreenparameter\c!veroffset
+ \relax
+ \relax
+ \orelse\ifx\currentinteractionscreenheight\v!tight
+ \donefalse
+ \global\canvasheight\dimexpr\topheight+\topdistance\relax
+ \ifdim\topspace>\canvasheight
+ \ifdim\topspace>\zeropoint\relax
+ \global\advance\canvastopoffset -\canvasheight
+ \fi
+ \fi
+ \global\advance\canvasheight\dimexpr
+ \makeupheight
+ + \bottomdistance
+ + \bottomheight
+ + 2\dimexpr
+ \interactionscreenparameter\c!topspace
+ + \interactionscreenparameter\c!veroffset
+ \relax
+ \relax
+ \else
+ \donefalse
+ \global\canvasheight\currentinteractionscreenheight
+ \fi
+ \ifconditional\c_page_layouts_location_is_set
+ \global\setfalse\c_scrn_canvas_tight_page
+ \fi
+ \ifconditional\c_scrn_canvas_tight_page
+ \global\canvasmaxwidth \paperwidth
+ \global\canvasmaxheight\paperheight
+ \else
+ \global\canvasmaxwidth \printpaperwidth
+ \global\canvasmaxheight\printpaperheight
+ \fi
+ % new:
+ \ifdone
+ \global\canvascropoffset \layoutcropoffset
+ \global\canvastrimoffset \layouttrimoffset
+ \global\canvasbleedoffset\layoutbleedoffset
+ \global\canvasartoffset \layoutartoffset
+ \else
+ \global\canvascropoffset \zeropoint
+ \global\canvastrimoffset \zeropoint
+ \global\canvasbleedoffset\zeropoint
+ \global\canvasartoffset \zeropoint
+ \fi
+ \endgroup}
+
+\newdimen\layoutcropoffset
+\newdimen\layouttrimoffset
+\newdimen\layoutbleedoffset
+\newdimen\layoutartoffset
+
+\appendtoks
+ \edef\p_cropoffset{\layoutparameter\c!cropoffset}%
+ \ifx\p_cropoffset\v!auto
+ \ifconditional\c_page_layouts_location_is_middle
+ \scratchheight\dimexpr(\printpaperheight-\paperheight)/2\relax
+ \scratchwidth \dimexpr(\printpaperwidth -\paperwidth )/2\relax
+ \layoutcropoffset\ifdim\scratchheight>\scratchwidth\scratchheight\else\scratchwidth\fi
+ \layouttrimoffset \layoutparameter\c!trimoffset
+ \layoutbleedoffset\layoutparameter\c!bleedoffset
+ \layoutartoffset \layoutparameter\c!artoffset
+ \else
+ \writestatus\m!system{auto crop etc only supported when location=middle}%
+ \layoutcropoffset \zeropoint
+ \layouttrimoffset \zeropoint
+ \layoutbleedoffset\zeropoint
+ \layoutartoffset \zeropoint
+ \fi
+ \else
+ \layoutcropoffset \layoutparameter\c!cropoffset
+ \layouttrimoffset \layoutparameter\c!trimoffset
+ \layoutbleedoffset\layoutparameter\c!bleedoffset
+ \layoutartoffset \layoutparameter\c!artoffset
+ \fi
+ \relax
+\to \everysetuplayout
+
+\setuplayout
+ [\c!cropoffset=\zeropoint,
+ \c!trimoffset=\zeropoint,
+ \c!bleedoffset=\zeropoint,
+ \c!artoffset=\zeropoint]
+
+% test the next when something is changed here:
+%
+% \setuppapersize[A5][A3] \showframe
+%
+% % \setuplayout[location=middle] \setupinteractionscreen[option=fit]
+% % \setuplayout[location=middle] \setupinteractionscreen[option=auto]
+% % \setupinteractionscreen[option=fit]
+% % \setupinteractionscreen[option=auto]
+%
+% \starttext \input ward \stoptext
+
+\let\scrn_canvas_synchronize_simple \relax
+\let\scrn_canvas_synchronize_complex\relax
+
+\appendtoks
+ \glet\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple_indeed
+ \glet\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
+\to \everysetuplayout
+
+\appendtoks
+ \glet\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple_indeed
+ \glet\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
+\to \everysetuplayouttarget
+
+\def\scrn_canvas_synchronize_common {
+ mode {\interactionscreenparameter\c!option}%
+ singlesided \ifsinglesided true\else false\fi\space
+ doublesided \ifdoublesided true\else false\fi\space
+ copies \numexpr\interactionscreenparameter\c!copies\relax
+ print {\interactionscreenparameter\c!print}%
+}
+
+\appendtoks
+ \let\scrn_canvas_synchronize_common\empty
+\to \everyaftershipout
+
+\def\scrn_canvas_synchronize_only
+ {\clf_setupcanvas
+ paperwidth \printpaperwidth
+ paperheight \printpaperheight
+ \scrn_canvas_synchronize_common
+ \relax}
+
+\def\scrn_canvas_synchronize_set#width#height%
+ {\clf_setupcanvas
+ paperwidth \dimexpr#width\relax
+ paperheight \dimexpr#height\relax
+ \relax}
+
+\let\scrn_canvas_synchronize_reset\scrn_canvas_synchronize_only
+
+\def\scrn_canvas_synchronize_simple_indeed
+ {\scrn_canvas_synchronize_only
+ %\glet\scrn_canvas_synchronize_simple \relax
+ \glet\scrn_canvas_synchronize_complex\relax}
+
+\def\scrn_canvas_synchronize_complex_indeed
+ {\scrn_canvas_calculate % otherwise we need to hook it into setuppage etc
+ \clf_setupcanvas
+ leftoffset \canvasbackoffset
+ topoffset \canvastopoffset
+ width \canvaswidth
+ height \canvasheight
+ paperwidth \canvasmaxwidth
+ paperheight \canvasmaxheight
+ cropoffset \canvascropoffset
+ trimoffset \canvastrimoffset
+ bleedoffset \canvasbleedoffset
+ artoffset \canvasartoffset
+ \scrn_canvas_synchronize_common
+ \relax
+ %\glet\scrn_canvas_synchronize_simple \relax
+ % one shot only
+ \glet\scrn_canvas_synchronize_complex\relax}
+
+\appendtoks
+ \begingroup
+ \edef\p_option{\interactionscreenparameter\c!option}%
+ \ifx\p_option\v!max
+ \global\settrue \c_scrn_canvas_tight_page
+ \orelse\ifx\p_option\v!fit
+ \global\settrue \c_scrn_canvas_tight_page
+ \else
+ \global\setfalse\c_scrn_canvas_tight_page
+ \fi
+ \endgroup
+\to \everysetupinteractionscreen
+
+\setupinteractionscreen
+ [\c!width=\printpaperwidth,
+ \c!height=\printpaperheight,
+ \c!horoffset=\zeropoint,
+ \c!veroffset=\zeropoint,
+ \c!backspace=\backspace,
+ \c!topspace=\topspace,
+ \c!copies=\plusone, % not the best place but backend anyway
+ \c!option=\v!auto]
+
+\appendtoks
+ \glet\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple_indeed
+ \glet\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
+\to \everysetupinteractionscreen
+
+%D Conditional page breaks:
+
+\permanent\tolerant\protected\def\screen[#list]%
+ {\iflocation
+ \page[#list]%
+ \fi}
+
+%D Page transitions:
+
+\let\scrn_transitions_list\empty
+
+\permanent\tolerant\protected\def\setuppagetransitions[#list]%
+ {\edef\scrn_transitions_list{#list}%
+ \ifx\scrn_transitions_list\v!reset
+ \let\scrn_transitions_list\empty
+ \fi}
+
+\def\scrn_transitions_set
+ {\iflocation \ifempty\scrn_transitions_list \else
+ \scrn_transitions_set_indeed
+ \fi \fi}
+
+\def\scrn_transitions_set_indeed
+ {\begingroup
+ \edef\currentinteractionscreendelay{\interactionscreenparameter\c!delay}%
+ \clf_setpagetransition
+ n {\scrn_transitions_list}%
+ delay \ifx\currentinteractionscreendelay\v!none \zerocount\else\currentinteractionscreendelay\fi
+ \relax
+ \endgroup}
+
+\prependtoks
+ \scrn_transitions_set
+\to \everyshipout
+
+\setupinteractionscreen
+ [\c!delay=\v!none]
+
+\setuppagetransitions
+ [\v!reset]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-ref.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-ref.mklx
new file mode 100644
index 00000000000..63f76a0920d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-ref.mklx
@@ -0,0 +1,107 @@
+%D \module
+%D [ file=scrn-ref,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Screen Macros,
+%D subtitle=References, % moved code
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Screen Macros / References}
+
+\registerctxluafile{scrn-ref}{}
+
+\unprotect
+
+\appendtoks
+ \doifsomething{\interactionparameter\c!calculate}%
+ {\clf_setfieldcalculationset{\interactionparameter\c!calculate}}%
+ \doifelse{\interactionparameter\c!click }\v!yes
+ \settrue\setfalse\highlighthyperlinks
+ \doifelse{\interactionparameter\c!display}\v!new
+ \settrue\setfalse\gotonewwindow
+ \doifnot {\interactionparameter\c!page}\v!no
+ \scrn_reference_enable_page_destinations
+\to \everysetupinteraction
+
+\def\scrn_reference_enable_page_destinations % no reset
+ {\clf_setreferencelinkmethod{\interactionparameter\c!page}}
+
+\setupinteraction % start fit page and reset form
+ [\c!page=\v!no,
+ \c!click=\v!yes,
+ \c!display=\v!normal,
+ \c!focus=\v!fit,
+ %\c!focusoffset=\zeropoint, % when tested with al views it will become 5\points
+ \c!focusoffset=5\points,
+ \c!calculate=,
+ % rendering:
+ \c!width=\emwidth,
+ \c!height=\zeropoint,
+ \c!depth=\zeropoint,
+ \c!symbolset=]
+
+% for now here, might become per link
+
+\appendtoks
+ \enabledirectives[destinations.offset=\the\dimexpr\interactionparameter\c!focusoffset\relax]%
+\to \everysetupinteraction
+
+\mutable\let\currentinteractioncloseaction \empty
+\mutable\let\currentinteractionclosepageaction\empty
+\mutable\let\currentinteractionopenaction \empty
+\mutable\let\currentinteractionopenpageaction \empty
+
+%D We have to make sure of some settings:
+
+\def\scrn_reference_set_text_actions
+ {\iflocation
+ \edef\currentinteractionopenaction {\interactionparameter\c!openaction }%
+ \edef\currentinteractioncloseaction{\interactionparameter\c!closeaction}%
+ \ifempty\currentinteractionopenaction \else
+ \clf_setopendocumentaction{\currentinteractionopenaction}%
+ \fi
+ \ifempty\currentinteractioncloseaction \else
+ \clf_setclosedocumentaction{\currentinteractioncloseaction}%
+ \fi
+ \glet\scrn_reference_set_text_actions\relax
+ \fi}
+
+\def\scrn_reference_set_page_actions
+ {\iflocation
+ \edef\currentinteractionopenpageaction {\interactionparameter\c!openpageaction }%
+ \edef\currentinteractionclosepageaction{\interactionparameter\c!closepageaction}%
+ \ifempty\currentinteractionopenpageaction \else
+ \clf_setopenpageaction{\currentinteractionopenpageaction}%
+ \fi
+ \ifempty\currentinteractionclosepageaction \else
+ \clf_setclosepageaction{\currentinteractionclosepageaction}%
+ \fi
+ \fi}
+
+\appendtoks \scrn_reference_set_text_actions \to \everyshipout
+\appendtoks \scrn_reference_set_page_actions \to \everyshipout
+
+%D delayed ...
+
+% \def\scrn_reference_enable_references
+% {\ifproductionrun
+% \clf_enableinteraction % only once anyway
+% \glet\scrn_reference_enable_references\relax
+% \fi}
+%
+% \appendtoks
+% \scrn_reference_enable_references
+% \to \everysetupinteraction
+
+\setupinteraction % start fit page and reset form
+ [\c!openaction=,
+ \c!closeaction=,
+ \c!openpageaction=,
+ \c!closepageaction=]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrn-wid.mklx b/Master/texmf-dist/tex/context/base/mkxl/scrn-wid.mklx
new file mode 100644
index 00000000000..5d1d67a99d2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrn-wid.mklx
@@ -0,0 +1,757 @@
+%D \module
+%D [ file=scrn-int,
+%D version=2011.02.27, % moved from scrn-int
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Widgets,
+%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 Interaction Macros / Widgets}
+
+\registerctxluafile{scrn-wid}{}
+
+% todo: expansion in comments (default is expanded)
+% todo: check renderings ... acrobat crashes too easily on missing one
+
+\unprotect
+
+%D Attachments (mkiv upgraded):
+%D
+%D As usual in \CONTEXT\ we separate the general definition (frontend)
+%D and the rendering (backend).
+
+% hack: x\footnote{x\inleftmargin[scope=local]{\attachment[location=high,file=i-context.pdf]}}x
+
+% old but stil valid method:
+%
+% \useattachment[test.tex]
+% \useattachment[whatever][test.tex]
+% \useattachment[whatever][newname][test.tex]
+% \useattachment[whatever][title][newname][test.tex]
+%
+% new method:
+%
+% \registerattachment[sometag][specification] % name file author title subtitle
+%
+% \attachment[sometag][extra specs]
+% \attachment[test.tex]
+% \attachment[file=test.tex]
+% \attachment[file=test.tex,method=hidden]
+% \attachment[name=newname,file=test.tex]
+% \attachment[title=mytitle,name=newname,file=test.tex]
+%
+% indirect
+%
+% \defineattachment[whatever5][file=test.tex] \attachment[whatever5][method=hidden]
+% \defineattachment[whatever5][file=test.tex,method=hidden] \attachment[whatever5]
+%
+% direct (no definitions)
+%
+% \attachment[test][file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden]
+% \attachment[label=test,file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden]
+%
+% autolabel:
+%
+% \attachment[file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden]
+%
+% % \setupattachments[\c!symbol={symbol-normal,symbol-down}]
+
+% startattachment -> temp file
+
+\newbox\b_scrn_attachment_collect
+\newbox\b_scrn_attachment_link
+\newbox\b_scrn_attachment_symbol
+
+\installcorenamespace{attachment}
+\installcorenamespace{attachmentlocation}
+\installcorenamespace{attachmentmethod}
+
+\installcommandhandler \??attachment {attachment} \??attachment
+
+\aliased\let\setupattachments\setupattachment % convenience and compatibility
+
+\setupattachment
+ [\c!state=\v!start,
+ \c!color=\interactionparameter\c!color,
+ %\c!textlayer=,
+ %\c!symbol=,
+ %\c!title=,
+ %\c!subtitle=,
+ %\c!file=, % input filename
+ %\c!name=, % new filename
+ %\c!author=,
+ %\c!method=, % \v!hidden = not in menu
+ %\c!buffer=
+ \c!symbol=,
+ \c!distance=\emwidth,
+ \c!width=\v!fit,
+ \c!height=\v!fit,
+ \c!depth=\v!fit,
+ \c!location=\v!high]
+
+\mutable\let\currentattachmentdepth \empty
+\mutable\let\currentattachmentheight \empty
+\mutable\let\currentattachmentregistered\empty
+\mutable\let\currentattachmentsymbol \empty
+\mutable\let\currentattachmentwidth \empty
+
+\permanent\tolerant\protected\def\registerattachment[#tag]#spacer[#settings]% we save (globally) at the lua end
+ {\ifarguments\else
+ \begingroup
+ \def\currentattachment{_}%
+ \setupcurrentattachment[#settings,\s!parent=\??attachment]%
+ \clf_registerattachment
+ tag {#tag}%
+ registered {#tag}%
+ title {\attachmentparameter\c!title}%
+ subtitle {\attachmentparameter\c!subtitle}%
+ author {\attachmentparameter\c!author}%
+ file {\attachmentparameter\c!file}%
+ name {\attachmentparameter\c!name}%
+ buffer {\attachmentparameter\c!buffer}%
+ mimetype {\attachmentparameter\c!type}%
+ \relax
+ \endgroup
+ \fi}
+
+\appendtoks
+ \frozen\instance\setuevalue \currentattachment {\scrn_attachment_direct[\currentattachment]}%
+ \frozen\instance\setuevalue{\e!start\currentattachment}{\scrn_attachment_start [\currentattachment]}%
+ \frozen\instance\setuevalue{\e!stop \currentattachment}{\scrn_attachment_stop }%
+\to \everydefineattachment
+
+\permanent\tolerant\protected\def\scrn_attachment_direct[#tag]#spacer[#registered]#spacer[#settings]%
+ {\iflocation
+ \bgroup
+ \edef\currentattachment{#tag}%
+ \ifcstok{\attachmentparameter\c!state}\v!start
+ \iftok{#registered}\emptytoks
+ \scrn_attachment_inject[\v!auto][]%
+ \orelse\ifhastok={#registered}%
+ \scrn_attachment_inject[\v!auto][#registered]%
+ \else
+ \scrn_attachment_inject[#registered][#settings]%
+ \fi
+ \fi
+ \egroup
+ \fi}
+
+\tolerant\protected\def\scrn_attachment_start[#tag]#spacer[#registered]#spacer[#settings]%
+ {\edef\currentattachment{#tag}%
+ \unless\iflocation
+ \expandafter\scrn_attachment_start_ignore
+ \orelse\ifcstok{\attachmentparameter\c!state}\v!start
+ \expandafter\scrn_attachment_start_indeed
+ \else
+ \expandafter\scrn_attachment_start_ignore
+ \fi[#registered][#settings]}
+
+\protected\def\scrn_attachment_stop
+ {}
+
+\def\scrn_attachment_start_indeed[#registered][#settings]%
+ {\bgroup
+ \doifelsenothing{#registered}
+ {\def\scrn_attachment_stop{\scrn_attachment_inject[\v!auto][\c!buffer=\v!attachment]\egroup}}%
+ {\doifelseassignment{#registered}
+ {\def\scrn_attachment_stop{\scrn_attachment_inject[\v!auto][\c!buffer=\v!attachment,#registered]\egroup}}%
+ {\def\scrn_attachment_stop{\scrn_attachment_inject[#registered][\c!buffer=\v!attachment,#settings]\egroup}}}%
+ \grabbufferdatadirect\v!attachment{\e!start\currentattachment}{\e!stop\currentattachment}}
+
+\def\scrn_attachment_start_ignore
+ {\expandafter\gobbleuntil\csname\e!stop\currentattachment\endcsname}
+
+\def\scrn_attachment_inject[#registered][#settings]%
+ {\edef\currentattachmentregistered{#registered}%
+ \setupattachment[\currentattachment][#settings]%
+ \expandnamespaceparameter\??attachmentmethod\attachmentparameter\c!method\v!normal}
+
+\setvalue{\??attachmentmethod\v!normal}%
+ {\edef\currentattachmentsymbol{\attachmentparameter\c!symbol}%
+ \edef\currentattachmentwidth {\attachmentparameter\c!width }%
+ \edef\currentattachmentheight{\attachmentparameter\c!height}%
+ \edef\currentattachmentdepth {\attachmentparameter\c!depth }%
+ \ifempty\currentattachmentsymbol
+ \ifx\currentattachmentwidth \v!fit\edef\currentattachmentwidth {.5\emwidth}\fi
+ \ifx\currentattachmentheight\v!fit\edef\currentattachmentheight{.5\emwidth}\fi
+ \ifx\currentattachmentdepth \v!fit\let \currentattachmentdepth \zeropoint\fi
+ \else
+ \clf_presetsymbollist{\attachmentparameter\c!symbol}%
+ % we cannot yet ask for the wd/ht/dp of an xform else we could use those
+ \setbox\b_scrn_attachment_symbol\hbox{\symbol[\lastpredefinedsymbol]}%
+ \ifx\currentattachmentwidth \v!fit\edef\currentattachmentwidth {\wd\b_scrn_attachment_symbol}\fi
+ \ifx\currentattachmentheight\v!fit\edef\currentattachmentheight{\ht\b_scrn_attachment_symbol}\fi
+ \ifx\currentattachmentdepth \v!fit\edef\currentattachmentdepth {\dp\b_scrn_attachment_symbol}\fi
+ \fi
+ \clf_insertattachment
+ tag {\currentattachment}%
+ registered {\currentattachmentregistered}%
+ width \dimexpr\currentattachmentwidth \relax
+ height \dimexpr\currentattachmentheight\relax
+ depth \dimexpr\currentattachmentdepth \relax
+ color {\attachmentparameter\c!color}%
+ colormodel \c_attr_colormodel
+ colorvalue \rawcolorattribute{\attachmentparameter\c!color}%
+ transparencyvalue \rawtransparencyattribute{\attachmentparameter\c!color}%
+ symbol {\currentattachmentsymbol}%
+ layer {\attachmentparameter\c!textlayer}%
+ % these will be overloaded by registered when available
+ title {\attachmentparameter\c!title}%
+ subtitle {\attachmentparameter\c!subtitle}%
+ author {\attachmentparameter\c!author}%
+ file {\attachmentparameter\c!file}%
+ name {\attachmentparameter\c!name}%
+ buffer {\attachmentparameter\c!buffer}%
+ mimetype {\attachmentparameter\c!type}%
+ \relax
+ \wd\b_scrn_attachment_link\currentattachmentwidth
+ \ht\b_scrn_attachment_link\currentattachmentheight
+ \dp\b_scrn_attachment_link\currentattachmentdepth
+ \expandnamespaceparameter\??attachmentlocation\attachmentparameter\c!location\s!unknown}
+
+\setvalue{\??attachmentmethod\v!hidden}%
+ {\clf_insertattachment
+ tag {\currentattachment}%
+ registered {\currentattachmentregistered}%
+ method {\v!hidden}%
+ title {\attachmentparameter\c!title}%
+ subtitle {\attachmentparameter\c!subtitle}%
+ author {\attachmentparameter\c!author}%
+ file {\attachmentparameter\c!file}%
+ name {\attachmentparameter\c!name}%
+ buffer {\attachmentparameter\c!buffer}%
+ mimetype {\attachmentparameter\c!type}%
+ \relax}
+
+\protected\def\scrn_attachment_flush_traced
+ {\hpack\bgroup
+ \blackrule % can be a fast one
+ [ \c!color=trace:r,
+ \c!width=\wd\b_scrn_attachment_link,
+ \c!height=\ht\b_scrn_attachment_link,
+ \c!depth=\dp\b_scrn_attachment_link]%
+ \kern-\wd\b_scrn_attachment_link
+ \box\b_scrn_attachment_link
+ \egroup}
+
+\protected\def\scrn_attachment_flush_normal
+ {\box\b_scrn_attachment_link}
+
+\installtextracker
+ {attachments.anchors}
+ {\let\scrn_attachment_flush\scrn_attachment_flush_traced}
+ {\let\scrn_attachment_flush\scrn_attachment_flush_normal}
+
+\let\scrn_attachment_flush\scrn_attachment_flush_normal
+
+\setvalue{\??attachmentlocation\v!inmargin }{\inmargin {\scrn_attachment_flush}}
+\setvalue{\??attachmentlocation\v!leftedge }{\inleftedge {\scrn_attachment_flush}}
+\setvalue{\??attachmentlocation\v!rightedge }{\inrightedge {\scrn_attachment_flush}}
+\setvalue{\??attachmentlocation\v!leftmargin }{\inleftmargin {\scrn_attachment_flush}}
+\setvalue{\??attachmentlocation\v!rightmargin}{\inrightmargin{\scrn_attachment_flush}}
+\setvalue{\??attachmentlocation\v!high }{\high {\scrn_attachment_flush}}
+
+\setvalue{\??attachmentlocation\v!none}%
+ {\global\setbox\b_scrn_attachment_collect\hbox\bgroup
+ \ifvoid\b_scrn_attachment_collect\else
+ \box\b_scrn_attachment_collect
+ \hskip\attachmentparameter\c!distance\relax
+ \fi
+ \scrn_attachment_flush
+ \egroup}
+
+\setvalue{\??attachmentlocation\s!unknown}%
+ {\ifvoid\b_scrn_attachment_collect\else
+ \box\b_scrn_attachment_collect
+ \fi}
+
+\permanent\protected\def\placeattachments
+ {\ifvoid\b_scrn_attachment_collect\else
+ \box\b_scrn_attachment_collect
+ \fi}
+
+\defineattachment[attachment]
+
+% \ifx\currentinterface\defaultinterface \else
+% \defineattachment[\v!attachment]
+% \fi
+
+% backward compatible:
+
+\permanent\tolerant\protected\def\useattachment[#tag]#spacer[#title]#spacer[#name]#spacer[#file]%
+ {\ifarguments\or
+ \registerattachment[#tag][title=#tag,name=#tag,file=#tag]%
+ \or
+ \registerattachment[#tag][title=#title,name=#title,file=#title]%
+ \or
+ \registerattachment[#tag][title=#title,name=#title,file=#name]%
+ \or
+ \registerattachment[#tag][title=#title,name=#name,file=#file]%
+ \fi}
+
+%D Comments:
+
+% test
+%
+% \startcomment
+% hello beautiful\\world
+% \stopcomment
+%
+% test
+%
+% \startcomment[hello]
+% hello << eerste >>
+% beautiful
+% world
+% \stopcomment
+%
+% test
+%
+% \startcomment[hello][color=green,width=10cm,height=3cm]
+% hello
+% beautiful
+% world
+% \stopcomment
+%
+% test
+%
+% \startcomment[hello][color=red,width=4cm,height=3cm]
+% hello
+%
+% beautiful
+%
+% world
+% \stopcomment
+%
+% test
+%
+% \startcomment[symbol=Help]
+% Do we want this kind of rubish?
+% \stopcomment
+%
+% test
+%
+% \definesymbol [comment-normal][{\externalfigure[cow.pdf]}]
+% \definesymbol [comment-down] [{\externalfigure[cow.pdf]}]
+%
+% \def\CowSymbol#1#2%
+% {\scale
+% [\c!height=#1]
+% {\startMPcode
+% loadfigure "koe.mp" number 1 ;
+% refill currentpicture withcolor #2 ;
+% \stopMPcode}}
+%
+% \definesymbol [comment-normal]
+% [\CowSymbol{4ex}{red}]
+%
+% \definesymbol [comment-down]
+% [\CowSymbol{4ex}{green}]
+%
+% \setupcomment
+% [\c!symbol={comment-normal,comment-down},
+% \c!option=\v!buffer]
+%
+% \startcomment[hello]
+% oeps
+% \stopcomment
+%
+% test
+%
+% \setupcomment
+% [\c!symbol=normal,
+% \c!option=max,width=10cm]
+%
+% \startcomment[hello]
+% oeps
+% \stopcomment
+%
+% test
+
+%D The implementation is mostly the same as for attachments but sharing code
+%D will not make it cleaner.
+
+\installcorenamespace{comment}
+\installcorenamespace{commentlocation}
+
+\installcommandhandler \??comment {comment} \??comment
+
+\newbox\b_scrn_comment_collect
+\newbox\b_scrn_comment_rendering
+\newbox\b_scrn_comment_link
+\newbox\b_scrn_comment_symbol
+
+\setupcomment
+ [\c!state=\v!start,
+ \c!distance=\emwidth,
+ \c!color=\interactionparameter\c!color,
+ \c!space=\v!no,
+ \c!symbol=,
+ %\c!title=,
+ %\c!option=,
+ %\c!textlayer=,
+ \c!width=\v!fit,
+ \c!height=\v!fit,
+ \c!depth=\v!fit,
+ \c!nx=40,
+ \c!ny=10,
+ \c!buffer=\v!comment,
+ \c!location=\v!high]
+
+\mutable\let\currentcommentdepth \empty
+\mutable\let\currentcommentheight\empty
+\mutable\let\currentcommentsymbol\empty
+\mutable\let\currentcommentwidth \empty
+
+\appendtoks
+ \frozen\instance\setuevalue \currentcomment {\scrn_comment_argument[\currentcomment]}%
+ \frozen\instance\setuevalue{\e!start\currentcomment}{\scrn_comment_start [\currentcomment]}%
+ \frozen\instance\setuevalue{\e!stop \currentcomment}{\scrn_comment_stop }%
+\to \everydefinecomment
+
+\tolerant\protected\def\scrn_comment_argument[#category]#spacer[#title]#spacer[#settings]#:#text%%
+ {\iflocation
+ \def\currentcomment{#category}%
+ \ifcstok{\commentparameter\c!state}\v!start
+ \ifhastok={#title}
+ \setupcurrentcomment[#title]%
+ \else
+ \setupcurrentcomment[\c!title=#title,#settings]%
+ \fi
+ \clf_assignbuffer{\v!comment}{#text}\catcodetable\relax% todo: expansion control, but expanded by default (xml)
+ \scrn_comment_inject
+ \fi
+ \fi
+ \ignorespaces}
+
+\tolerant\protected\def\scrn_comment_start[#category]#spacer[#title]#spacer[#settings]%
+ {\def\currentcomment{#category}%
+ \unless\iflocation
+ \expandafter\scrn_comment_start_ignore
+ \orelse\ifcstok{\commentparameter\c!state}\v!start
+ \expandafter\scrn_comment_start_indeed
+ \else
+ \expandafter\scrn_comment_start_ignore
+ \fi[#title][#settings]}
+
+\def\scrn_comment_start_indeed[#title][#settings]%
+ {\bgroup
+ \doifelseassignment{#title}
+ {\setupcurrentcomment[#title]}
+ {\setupcurrentcomment[\c!title=#title,#settings]}%
+ \protected\def\scrn_comment_stop{\scrn_comment_inject\egroup}%
+ \grabbufferdatadirect\v!comment{\e!start\currentcomment}{\e!stop\currentcomment}}
+
+\def\scrn_comment_start_ignore
+ {\expandafter\gobbleuntil\csname\e!stop\currentcomment\endcsname}
+
+\protected\def\scrn_comment_stop
+ {}
+
+\installcorenamespace{commentmethods}
+
+\protected\def\scrn_comment_inject
+ {\expandnamespaceparameter\??commentmethods\commentparameter\c!method\v!normal}
+
+%D Beware: comments symbols don't scale in acrobat (cf. spec but somewhat
+%D weird, esp because for instance attachment symbols do scale).
+
+\setvalue{\??commentmethods\v!normal}%
+ {\edef\currentcommentsymbol{\commentparameter\c!symbol}%
+ \edef\currentcommentwidth {\commentparameter\c!width }%
+ \edef\currentcommentheight{\commentparameter\c!height}%
+ \edef\currentcommentdepth {\commentparameter\c!depth }%
+ \ifempty\currentcommentsymbol
+ \ifx\currentcommentwidth \v!fit\edef\currentcommentwidth {.5\emwidth}\fi
+ \ifx\currentcommentheight\v!fit\edef\currentcommentheight{.5\emwidth}\fi
+ \ifx\currentcommentdepth \v!fit\let \currentcommentdepth \zeropoint\fi
+ \else
+ \clf_presetsymbollist{\commentparameter\c!symbol}%
+ % we cannot yet ask for the wd/ht/dp of an xform else we could use those
+ \setbox\b_scrn_comment_symbol\hbox{\symbol[\lastpredefinedsymbol]}%
+ \ifx\currentcommentwidth \v!fit\edef\currentcommentwidth {\wd\b_scrn_comment_symbol}\fi
+ \ifx\currentcommentheight\v!fit\edef\currentcommentheight{\ht\b_scrn_comment_symbol}\fi
+ \ifx\currentcommentdepth \v!fit\edef\currentcommentdepth {\dp\b_scrn_comment_symbol}\fi
+ \fi
+ \clf_insertcomment
+ tag {\currentcomment}%
+ title {\commentparameter\c!title}%
+ subtitle {\commentparameter\c!subtitle}%
+ author {\commentparameter\c!author}%
+ width \dimexpr\currentcommentwidth\relax
+ height \dimexpr\currentcommentheight\relax
+ depth \dimexpr\currentcommentdepth\relax
+ nx {\commentparameter\c!nx}%
+ ny {\commentparameter\c!ny}%
+ colormodel \c_attr_colormodel
+ colorvalue \rawcolorattribute{\commentparameter\c!color}%
+ transparencyvalue \rawtransparencyattribute{\commentparameter\c!color}%
+ option {\commentparameter\c!option}% % todo
+ symbol {\commentparameter\c!symbol}%
+ buffer {\commentparameter\c!buffer}% {\v!comment}%
+ layer {\commentparameter\c!textlayer}%
+ space {\commentparameter\c!space}%
+ \relax
+ \wd\b_scrn_comment_link\currentcommentwidth
+ \ht\b_scrn_comment_link\currentcommentheight
+ \dp\b_scrn_comment_link\currentcommentdepth
+ \expandnamespaceparameter\??commentlocation\commentparameter\c!location\s!unknown}
+
+\letvalue{\??commentmethods\v!hidden}\donothing
+
+\protected\def\scrn_comment_flush_traced
+ {\hpack\bgroup
+ \blackrule % can be a fast one
+ [ \c!color=trace:y,
+ \c!width=\wd\b_scrn_comment_link,
+ \c!height=\ht\b_scrn_comment_link,
+ \c!depth=\dp\b_scrn_comment_link]%
+ \kern-\wd\b_scrn_comment_link
+ \box\b_scrn_comment_link
+ \egroup}
+
+\protected\def\scrn_comment_flush_normal
+ {\box\b_scrn_comment_link}
+
+\installtextracker
+ {comments.anchors}
+ {\let\scrn_comment_flush\scrn_comment_flush_traced}
+ {\let\scrn_comment_flush\scrn_comment_flush_normal}
+
+\let\scrn_comment_flush\scrn_comment_flush_normal
+
+% todo: dedicated margin classes
+
+\setvalue{\??commentlocation\v!inmargin }{\inmargin {\scrn_comment_flush}}
+\setvalue{\??commentlocation\v!leftedge }{\inleftedge {\scrn_comment_flush}}
+\setvalue{\??commentlocation\v!rightedge }{\inrightedge {\scrn_comment_flush}}
+\setvalue{\??commentlocation\v!leftmargin }{\inleftmargin {\scrn_comment_flush}}
+\setvalue{\??commentlocation\v!rightmargin}{\inrightmargin{\scrn_comment_flush}}
+\setvalue{\??commentlocation\v!high }{\high {\scrn_comment_flush}}
+
+\setvalue{\??commentlocation\v!none}%
+ {\global\setbox\b_scrn_comment_collect\hbox\bgroup
+ \ifvoid\b_scrn_comment_collect\else
+ \box\b_scrn_comment_collect
+ \hskip\commentparameter\c!distance\relax
+ \fi
+ \scrn_comment_flush
+ \egroup}
+
+\setvalue{\??commentlocation\s!unknown}%
+ {\ifvoid\b_scrn_comment_collect\else
+ \box\b_scrn_comment_collect
+ \fi}
+
+\permanent\protected\def\placecomments
+ {\ifvoid\b_scrn_comment_collect\else
+ \box\b_scrn_comment_collect
+ \fi}
+
+\definecomment[comment]
+
+% \ifx\currentinterface\defaultinterface \else
+% \definecomment[\v!comment]
+% \fi
+
+%D Soundclips:
+%D
+%D Defining sound tracks:
+%D
+%D \starttyping
+%D \useexternalsoundtrack[label][file]
+%D \stoptyping
+%D
+%D associated actions: StartSound StopSound PauseSound ResumeSound
+%D
+%D Todo: like external figures, also search on path,
+%D although, they need to be present ar viewing time, so ...
+
+\installcorenamespace{externalsoundtracks}
+
+\installsetuponlycommandhandler \??externalsoundtracks {externalsoundtracks}
+
+\setupexternalsoundtracks
+ [\c!option=]
+
+\permanent\tolerant\protected\def\useexternalsoundtrack[#tag]#spacer[#filename]%
+ {\clf_registersoundclip
+ tag {#tag}%
+ file {#filename}%
+ \relax}
+
+\permanent\def\checksoundtrack#tag% yet untested in mkiv (also move management to lua)
+ {\iflocation
+ \clf_insertsoundclip
+ tag {#tag}%
+ repeat {\directexternalsoundtracksparameter\c!option}%
+ \relax
+ \fi}
+
+%D Renderings (not yet tested in mkvi):
+
+% Todo: multiple instances and inheritance .. will be done when needed i.e. when I
+% see usage. Probaly by that time this feature is dropped (as are other media
+% rel;ated ones).
+
+\mutable\let\currentrendering \empty
+\mutable\let\currentrenderingtype \empty
+\mutable\let\currentrenderingwindow\empty
+
+\definereference[StartCurrentRendering] [\v!StartRendering {\currentrendering}]
+\definereference[StopCurrentRendering] [\v!StopRendering {\currentrendering}]
+\definereference[PauseCurrentRendering] [\v!PauseRendering {\currentrendering}]
+\definereference[ResumeCurrentRendering][\v!ResumeRendering{\currentrendering}]
+
+\permanent\tolerant\protected\def\useexternalrendering[#tag]#spacer[#mime]#spacer[#file]#spacer[#option]%
+ {\clf_registerrendering
+ type {external}%
+ label {#tag}%
+ mime {#mime}%
+ filename {#file}%
+ option {#option}%
+ \relax}
+
+\permanent\tolerant\protected\def\setinternalrendering[#tag]#spacer[#option]% {content} % crappy
+ {\bgroup
+ \dowithnextbox
+ {\clf_registerrendering
+ type {internal}%
+ label {#tag}%
+ mime {IRO}% brrr
+ filename {#tag}%
+ option {#option}%
+ \relax
+ \let\objectoffset\zeropoint
+ \setobject{IRO}{#tag}\hpack{\box\nextbox}%
+ \egroup}%
+ \hbox}
+
+\permanent\def\renderingtype #tag{\clf_renderingvar{#tag}{type}}
+\permanent\def\renderingoption#tag{\clf_renderingvar{#tag}{option}}
+
+\newdimen\d_scrn_rendering_width \d_scrn_rendering_width 8cm
+\newdimen\d_scrn_rendering_height \d_scrn_rendering_height 6cm
+
+\let\m_scrn_rendering_page\!!zerocount
+
+\installcorenamespace{renderingwindow}
+
+\installframedcommandhandler \??renderingwindow {renderingwindow} \??renderingwindow
+
+\appendtoks
+ \letrenderingwindowparameter\c!openpageaction \empty
+ \letrenderingwindowparameter\c!closepageaction\empty
+ \setrenderingwindowparameter\c!width {\d_scrn_rendering_width }%
+ \setrenderingwindowparameter\c!height {\d_scrn_rendering_height}%
+\to \everypresetrenderingwindow
+
+\permanent\tolerant\protected\def\placerenderingwindow[#window]#spacer[#rendering]% do all in lua
+ {\bgroup
+ \edef\currentrendering{\ifparameter#rendering\or#rendering\else#window\fi}%
+ % create fall back if needed
+ \edef\currentrenderingwindow{\namedrenderingwindowparameter{#window}\c!width}% stupid test, we need a proper one here
+ \ifempty\currentrenderingwindow
+ \let\currentrenderingwindow\s!default
+ \definerenderingwindow[\currentrenderingwindow]% why not global
+ \else
+ \edef\currentrenderingwindow{#window}%
+ \fi
+ \edef\currentrenderingtype{\renderingtype\currentrendering}%
+ \ifx\currentrenderingtype\s!internal
+ \getobjectdimensions{IRO}\currentrendering
+ \d_scrn_rendering_height\dimexpr\objectheight+\objectdepth\relax
+ \d_scrn_rendering_width\objectwidth\relax
+ \getobjectreferencepage{IRO}\currentrendering\m_scrn_rendering_page
+ \orelse\ifx\currentrenderingwindow\s!default
+ \d_scrn_rendering_height\vsize
+ \d_scrn_rendering_width \hsize
+ \let\m_scrn_rendering_page\realpageno
+ \else
+ \d_scrn_rendering_height\renderingwindowparameter\c!height
+ \d_scrn_rendering_width \renderingwindowparameter\c!width
+ \let\m_scrn_rendering_page\realpageno
+ \fi
+ % todo:
+ % \handlereferenceactions{\renderingwindowparameter\c!openpageaction }\dosetuprenderingopenpageaction
+ % \handlereferenceactions{\renderingwindowparameter\c!closepageaction}\dosetuprenderingclosepageaction
+ \letrenderingwindowparameter\c!offset\v!overlay
+ \inheritedrenderingwindowframed
+ {\vfilll
+ \dontleavehmode
+ \clf_insertrenderingwindow
+ label {\currentrendering}%
+ width \d_scrn_rendering_width
+ height \d_scrn_rendering_height
+ option {\renderingoption\currentrendering}%
+ page \m_scrn_rendering_page
+ \relax
+ \hfill}%
+ \egroup}
+
+%D Linkedlists (not tested in mkvi):
+
+% %D The next mechanism, linked lists, is quite old and
+% %D is \MKIV'd for completeness. I will finish the
+% %D configuration part when I need it.
+% %D
+% %D \starttyping
+% %D \setupinteraction[state=start]
+% %D \definelinkedlist[demo]
+% %D \dorecurse{10}{\linkedlistelement[demo]{link \recurselevel} \page}
+% %D \stoptyping
+%
+% \definesystemvariable {lk} % LinK
+%
+% \installcommandhandler\??lk{linkedlist}\??lk
+%
+% \let\setupbutton\setuplinkedlists\setuplinkedlist
+%
+% \appendtoks
+% \clf_definelinkedlist{\currentlinkedlist}%
+% \to \everydefinelinkedlist
+%
+% \def\setlinkedlistproperties#1#2#3#4#5#6%
+% {\def\currentlink {#1}%
+% \def\noflinks {#2}%
+% \def\firstlink {#3}%
+% \def\previouslink{#4}%
+% \def\nextlink {#5}%
+% \def\lastlink {#6}}
+%
+% \def\linkedlistelement[#1]#2% currently no view support
+% {\dontleavehmode\hbox\bgroup
+% #2%
+% \iflocation
+% \edef\currentlinkedlist{#1}%
+% \ifcsname\??lk\currentlinkedlist\s!parent\endcsname
+% \hskip\linkedlistparameter\c!distance\relax
+% \clf_addlinklistelement{\currentlinkedlist}%
+% \expanded{\ctxlatecommand{enhancelinkedlist("\currentlinkedlist",\currentlink)}}% can also be done at the lua end
+% \dogotosomepage {\??lk\currentlinkedlist}\gotobegincharacter \firstlink
+% \ifnum\noflinks>\plustwo
+% \dogotosomepage{\??lk\currentlinkedlist}\gobackwardcharacter\previouslink
+% \dogotosomepage{\??lk\currentlinkedlist}\goforwardcharacter \nextlink
+% \fi
+% \dogotosomepage {\??lk\currentlinkedlist}\gotoendcharacter \lastlink
+% \else
+% \writestatus\m!interactions{no such linked list: \currentlinkedlist}%
+% \fi
+% \fi
+% \egroup}
+%
+% \setuplinkedlists
+% [\c!distance=.25em,
+% \c!width=\v!fit,
+% \c!location=\v!low,
+% \c!color=\interactionparameter\c!color,
+% \c!frame=\v!off,
+% \c!background=,
+% \c!backgroundcolor=]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/scrp-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/scrp-ini.mkxl
new file mode 100644
index 00000000000..77412738b4d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/scrp-ini.mkxl
@@ -0,0 +1,111 @@
+%D \module
+%D [ file=scrp-ini,
+%D version=2009.02.06,
+%D title=\CONTEXT\ Script Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The script handler has been upgraded mid June 2020 so there might be issues as I
+%D didn't test everything (yet). It should all be a bit more efficient now in
+%D \LUAMETATEX, although not spectacular. We use no attributes in \LUAMETATEX\ and
+%D only one in \LUATEX\ now.
+%D
+%D A glyph can have (an dget) all kind of properties. Except from the state, these
+%D are assigned within \TEX's grouping model!
+%D
+%D \startitemize
+%D \startitem font \stopitem
+%D \startitem character \stopitem
+%D \startitem language (4 properties packed in an unsigned integer) \stopitem
+%D \startitem data (used for dynamics) \stopitem
+%D \startitem script (used for special script processing) \stopitem
+%D \startitem state (used for analyzing, related to font features) \stopitem
+%D \stopitemize
+%D
+%D Additional properties are set via node list handlers. The state is stored in the
+%D glyph, but additional properties are stored in a node's property table. In the
+%D future the state might get used for something else, in which case we will stire
+%D the state in the property table too. On the other hand, we can now (if we want)
+%D influence the state at the\TEX\ end (not that we do that yet).
+
+%D Todo: as in bidi mode we need a way to globally keep the setting.
+
+\registerctxluafile{scrp-ini}{}
+\registerctxluafile{scrp-cjk}{}
+\registerctxluafile{scrp-eth}{}
+\registerctxluafile{scrp-tha}{}
+\registerctxluafile{scrp-tib}{}
+
+\definesystemattribute[script][public,pickup]
+
+%D Since scripts need specific \LUA\ code we use hard coded attribute values, but we
+%D might have more tricks at some time, so we use a proper define macro too.
+
+\unprotect
+
+\installcorenamespace{script}
+
+\installcommandhandler \??script {script} \??script
+
+\aliased\let\setupscripts\setupscript % be nice
+
+% presets are global and are currently defined in lua
+
+% \appendtoks
+% \setuevalue\currentscript{\setscript[\currentscript]}%
+% \to \everydefinescript
+
+\permanent\protected\def\setlocalscript[#1]%
+ {\edef\currentscript{#1}%
+ \clf_setscript{\currentscript}{\scriptparameter\c!method}{\scriptparameter\c!preset}}
+
+\permanent\protected\def\setglobalscript[#1]%
+ {\setlocalscript[#1]%
+ \pickupscriptattribute} % pagebuilder
+
+\aliased\let\setscript\setlocalscript
+
+\permanent\protected\def\resetscript
+ {\clf_resetscript}
+
+\permanent\protected\def\startscript[#1]%
+ {\begingroup
+ \setlocalscript[#1]}
+
+\permanent\protected\def\stopscript
+ {\endgroup}
+
+% \setscript[hangul] \startscript[hangul]
+
+\definescript [hangul] [\c!method=hangul]
+\definescript [hanzi] [\c!method=hanzi]
+\definescript [nihongo] [\c!method=nihongo]
+\definescript [ethiopic] [\c!method=ethiopic]
+\definescript [thai] [\c!method=thai]
+\definescript [tibetan] [\c!method=tibetan]
+
+\definescript [latin] [\c!method=] % resets the attribute (also currentscript)
+
+\definescript [test] [\c!method=test]
+
+% a new trick (at some point we will predefine more scripts and consider a link with the above)
+
+\appendtoks
+ \ifempty\currentscript
+ \doifelse{\scriptparameter\s!features}\v!auto\enableautofontscript\disableautofontscript
+ \fi
+\to \everysetupscript
+
+\permanent\protected\def\enableautofontscript {\clf_enableautofontscript } % can be public implementor
+\permanent\protected\def\disableautofontscript{\clf_disableautofontscript} % can be public implementor
+
+\definefontfeature[latn][script=latn]
+\definefontfeature[grek][script=grek]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/sort-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/sort-ini.mkxl
new file mode 100644
index 00000000000..d9f9628d523
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/sort-ini.mkxl
@@ -0,0 +1,19 @@
+%D \module
+%D [ file=sort-ini,
+%D version=2005.08.08,
+%D title=\CONTEXT\ Sort Macros,
+%D subtitle=Initialization,
+%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 Sorting Macros / Initialization}
+
+\registerctxluafile{sort-ini}{}
+\registerctxluafile{sort-lan}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt b/Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt
new file mode 100644
index 00000000000..5c434fcdf2a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-ali.lmt
@@ -0,0 +1,134 @@
+if not modules then modules = { } end modules ['spac-ali'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to spac-ali.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local div = math.div
+local format = string.format
+
+local tasks = nodes.tasks
+local enableaction = tasks.enableaction
+
+local nuts = nodes.nuts
+
+local setlist = nuts.setlist
+local setlink = nuts.setlink
+local getdirection = nuts.getdirection
+local takeattr = nuts.takeattr
+local getwidth = nuts.getwidth
+local findtail = nuts.tail
+
+local righttoleft_code = nodes.dirvalues.righttoleft
+local linelist_code = nodes.listcodes.line
+
+local hpack_nodes = nuts.hpack
+local nextlist = nuts.traversers.list
+
+local new_stretch = nuts.pool.stretch
+
+local a_realign = attributes.private("realign")
+
+local texsetattribute = tex.setattribute
+local texgetcount = tex.getcount
+
+local isleftpage = layouts.status.isleftpage
+
+typesetters = typesetters or { }
+local alignments = { }
+typesetters.alignments = alignments
+
+local report_realign = logs.reporter("typesetters","margindata")
+local trace_realign = trackers.register("typesetters.margindata", function(v) trace_margindata = v end)
+
+local nofrealigned = 0
+
+-- leftskip rightskip parfillskip
+-- raggedleft 0 + 0 -
+-- raggedright 0 0 fil
+-- raggedcenter 0 + 0 + -
+
+local function handler(head,leftpage,realpageno) -- traverse_list
+ for current, id, subtype, list in nextlist, head do
+ if subtype == linelist_code then
+ local a = takeattr(current,a_realign)
+ if a and a > 0 then
+ local pageno = div(a,10)
+ if pageno ~= realpageno then
+ local align = a % 10
+ local action = 0
+ if align == 1 then -- flushright
+ action = leftpage and 1 or 2
+ elseif align == 2 then -- flushleft
+ action = leftpage and 2 or 1
+ end
+ -- WS: watch this
+ local direction = getdirection(current)
+ -- or should this happen at the tex end:
+ if direction == righttoleft_code then
+ if action == 1 then
+ action = 2
+ elseif action == 2 then
+ action = 1
+ end
+ end
+ -- Currently we just prepend and append which kind of spoils the normalization unless
+ -- we extend our specs and also introduce left/right anchored stuff.
+ if action == 1 then
+ local head = list
+ setlink(findtail(list),new_stretch(3)) -- append
+ setlist(current,hpack_nodes(head,getwidth(current),"exactly",direction))
+ if trace_realign then
+ report_realign("flushing left, align %a, page %a, realpage %a",align,pageno,realpageno)
+ end
+ elseif action == 2 then
+ local head = setlink(new_stretch(3),list) -- prepend
+ setlist(current,hpack_nodes(head,getwidth(current),"exactly",direction))
+ if trace_realign then
+ report_realign("flushing right, align %a, page %a, realpage %a",align,pageno,realpageno)
+ end
+ elseif trace_realign then
+ report_realign("invalid flushing, align %a, page %a, realpage %a",align,pageno,realpageno)
+ end
+ nofrealigned = nofrealigned + 1
+ end
+ end
+ end
+ handler(list,leftpage,realpageno)
+ end
+ return head
+end
+
+function alignments.handler(head)
+ return handler(head,isleftpage(),texgetcount("realpageno"))
+end
+
+local enabled = false
+
+function alignments.set(n)
+ if not enabled then
+ enableaction("shipouts","typesetters.alignments.handler")
+ enabled = true
+ if trace_realign then
+ report_realign("enabled")
+ end
+ end
+ texsetattribute(a_realign,texgetcount("realpageno") * 10 + n)
+end
+
+interfaces.implement {
+ name = "setrealign",
+ actions = alignments.set,
+ arguments = "integer",
+}
+
+statistics.register("realigning", function()
+ if nofrealigned > 0 then
+ return format("%s processed",nofrealigned)
+ else
+ return nil
+ end
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl
new file mode 100644
index 00000000000..78d09295db3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-ali.mkxl
@@ -0,0 +1,1218 @@
+%D \module
+%D [ file=spac-ali,
+%D version=2009.10.16, % 1997.03.31, was core-spa.tex
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Alignments,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Alignments}
+
+\unprotect
+
+%D The \type {new} and \type {old} methods are gone as we now have \type {flush*}
+%D variants. Starting at the last day of 2011 both methods are merged into one and
+%D caching has been added, which makes switching twice as fast.
+
+\registerctxluafile{spac-ali}{autosuffix,optimize}
+
+% Used once so ... replace it or use if more frequently ...
+
+\installcorenamespace {alignswitch}
+
+% maybe \setconstantvalue or so
+
+\expandafter\integerdef\csname\??alignswitch\v!left \endcsname\zerocount
+\expandafter\integerdef\csname\??alignswitch\v!middle\endcsname\plusone
+\expandafter\integerdef\csname\??alignswitch\v!right \endcsname\plustwo
+
+\mutable\integerdef\alignmentswitch\zerocount
+
+\permanent\protected\def\setalignmentswitch#1%
+ {\integerdef\alignmentswitch\csname\??alignswitch\ifcsname\??alignswitch#1\endcsname#1\else\v!left\fi\endcsname}
+
+% till here
+
+\definesystemattribute[realign] [public] % might be combined with the next one
+\definesystemattribute[alignstate][public] % will make a single attributes for several states
+
+\appendtoks
+ \c_attr_realign \attributeunsetvalue
+ \c_attr_alignstate\attributeunsetvalue
+\to \everyforgetall
+
+\permanent\protected\def\signalinnerrealign{\clf_setrealign\plustwo}
+\permanent\protected\def\signalouterrealign{\clf_setrealign\plusone}
+
+\installcorenamespace{aligncommand}
+\installcorenamespace{alignhorizontal}
+\installcorenamespace{alignvertical}
+
+% \installcorenamespace{alignmentnormalcache}
+% \installcorenamespace{alignmentraggedcache}
+
+% nasty hack:
+
+\installcorenamespace{alignmentnormalcacheodd}
+\installcorenamespace{alignmentnormalcacheeven}
+
+\installcorenamespace{alignmentraggedcacheodd}
+\installcorenamespace{alignmentraggedcacheeven}
+
+\immutable\def\??alignmentnormalcache{\ifodd\realpageno\??alignmentnormalcacheodd\else\??alignmentnormalcacheeven\fi}
+\immutable\def\??alignmentraggedcache{\ifodd\realpageno\??alignmentraggedcacheodd\else\??alignmentraggedcacheeven\fi}
+
+\newtoks\everyresetalign % todo
+
+% This will become a more advanced layout controller soon:
+
+\newconditional\layoutlefttoright \settrue\layoutlefttoright
+\newconditional\displaylefttoright \settrue\displaylefttoright
+\newconditional\inlinelefttoright \settrue\inlinelefttoright
+
+\permanent\protected\def\lefttoright
+ {\ifvmode
+ \spac_directions_lefttoright_vmode
+ \else
+ \spac_directions_lefttoright_hmode
+ \fi}
+
+\permanent\protected\def\righttoleft
+ {\ifvmode
+ \spac_directions_righttoleft_vmode
+ \else
+ \spac_directions_righttoleft_hmode
+ \fi}
+
+\protected\def\spac_directions_lefttoright_vmode
+ {\settrue\displaylefttoright
+ \settrue\inlinelefttoright
+ \textdirection\directionlefttoright
+ \pardirection \directionlefttoright}
+
+\protected\def\spac_directions_righttoleft_vmode
+ {\setfalse\displaylefttoright
+ \setfalse\inlinelefttoright
+ \textdirection\directionrighttoleft
+ \pardirection \directionrighttoleft}
+
+\protected\def\spac_directions_lefttoright_hmode
+ {\linedirection\directionlefttoright % linedir keeps subtype of skip
+ \settrue\inlinelefttoright}
+
+\protected\def\spac_directions_righttoleft_hmode
+ {\linedirection\directionrighttoleft % linedir keeps subtype of skip
+ \setfalse\inlinelefttoright}
+
+\permanent\protected\def\synchronizelayoutdirection
+ {\ifconditional\layoutlefttoright
+ \spac_directions_synchronize_lr
+ \else
+ \spac_directions_synchronize_rl
+ \fi}
+
+\permanent\protected\def\synchronizedisplaydirection
+ {\ifconditional\displaylefttoright
+ \spac_directions_synchronize_lr
+ \else
+ \spac_directions_synchronize_rl
+ \fi}
+
+\def\spac_directions_synchronize_lr
+ {\settrue\inlinelefttoright
+ \textdirection\directionlefttoright
+ \pardirection \directionlefttoright}
+
+\def\spac_directions_synchronize_rl
+ {\setfalse\inlinelefttoright
+ \textdirection\directionrighttoleft
+ \pardirection \directionrighttoleft}
+
+\permanent\protected\def\synchronizeinlinedirection
+ {% why not \linedirection here
+ \textdirection\ifconditional\inlinelefttoright\directionlefttoright\else\directionrighttoleft\fi}
+
+\permanent\protected\def\checkedlefttoright
+ {\ifvmode
+ \spac_directions_lefttoright_vmode
+ \else
+ \spac_directions_lefttoright_hmode_checked
+ \fi}
+
+\permanent\protected\def\checkedrighttoleft
+ {\ifvmode
+ \spac_directions_righttoleft_vmode
+ \else
+ \spac_directions_righttoleft_hmode_checked
+ \fi}
+
+\protected\def\spac_directions_lefttoright_hmode_checked
+ {\ifconditional\inlinelefttoright\else
+ \lefttoright
+ \fi}
+
+\protected\def\spac_directions_righttoleft_hmode_checked
+ {\ifconditional\inlinelefttoright
+ \righttoleft
+ \fi}
+
+\installcorenamespace{bidi}
+
+\letcsname\??bidi\v!left \endcsname\checkedlefttoright \letcsname\??bidi l2r\endcsname\checkedlefttoright
+\letcsname\??bidi\v!right\endcsname\checkedrighttoleft \letcsname\??bidi r2l\endcsname\checkedrighttoleft
+
+\permanent\protected\def\usebidiparameter#1%
+ {\begincsname\??bidi#1\c!bidi\endcsname}
+
+\permanent\protected\def\showdirections
+ {\dontleavehmode
+ \begingroup\infofont\textdirection\directionlefttoright[\space
+ layout: \ifconditional\layoutlefttoright l2r\else r2l\fi\space
+ display: \ifconditional\displaylefttoright l2r\else r2l\fi\space
+ inline: \ifconditional\inlinelefttoright l2r\else r2l\fi\space
+ ]\endgroup}
+
+\permanent\protected\def\righttolefthbox#1#{\reversehbox#1\bgroup\righttoleft\let\next} \aliased\let\rtlhbox\righttolefthbox
+\permanent\protected\def\lefttorighthbox#1#{\naturalhbox#1\bgroup\lefttoright\let\next} \aliased\let\ltrhbox\lefttorighthbox
+\permanent\protected\def\righttoleftvbox#1#{\reversevbox#1\bgroup\righttoleft\let\next} \aliased\let\rtlvbox\righttoleftvbox
+\permanent\protected\def\lefttorightvbox#1#{\naturalvbox#1\bgroup\lefttoright\let\next} \aliased\let\ltrvbox\lefttorightvbox
+\permanent\protected\def\righttoleftvtop#1#{\reversevtop#1\bgroup\righttoleft\let\next} \aliased\let\rtlvtop\righttoleftvtop
+\permanent\protected\def\lefttorightvtop#1#{\naturalvtop#1\bgroup\lefttoright\let\next} \aliased\let\ltrvtop\lefttorightvtop
+
+\permanent\protected\def\autodirhbox#1#{\hbox#1\bgroup\synchronizeinlinedirection\let\next}
+\permanent\protected\def\autodirvbox#1#{\vbox#1\bgroup\synchronizeinlinedirection\let\next} % maybe also pardir or maybe just a \vbox
+\permanent\protected\def\autodirvtop#1#{\vtop#1\bgroup\synchronizeinlinedirection\let\next} % maybe also pardir or maybe just a \vtop
+
+\permanent\protected\def\leftorrighthbox{\ifconditional\displaylefttoright\expandafter\lefttorighthbox\else\expandafter\righttolefthbox\fi}
+\permanent\protected\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi}
+\permanent\protected\def\leftorrightvtop{\ifconditional\displaylefttoright\expandafter\lefttorightvtop\else\expandafter\righttoleftvtop\fi}
+
+% Tolerance and hyphenation
+
+\ifdefined\lesshyphens \else \let\lesshyphens\relax \fi
+\ifdefined\morehyphens \else \let\morehyphens\relax \fi
+\ifdefined\nohyphens \else \let\nohyphens \relax \fi
+\ifdefined\dohyphens \else \let\dohyphens \relax \fi
+
+\newconstant\c_spac_tolerance_default \c_spac_tolerance_default 1500 % shouldn't that be 200
+\newconstant\c_spac_tolerance_minimum \c_spac_tolerance_minimum 1500
+\newconstant\c_spac_tolerance_normal \c_spac_tolerance_normal 3000
+\newconstant\c_spac_tolerance_extreme \c_spac_tolerance_extreme 4500
+
+\def\spac_align_set_raggedness_left {\plustwo\bodyfontsize}
+\def\spac_align_set_raggedness_right {\plustwo\bodyfontsize}
+\def\spac_align_set_raggedness_middle{\plussix\bodyfontsize} % overloaded below
+
+% oeps, hsize can be 0pt in which case we get a strange division
+% was: 6\bodyfontsize, fails on: \placefigure{x $x=x$ x}{}
+
+\def\spac_align_set_raggedness_middle{\ifzeropt\hsize\plussix\bodyfontsize\else.5\hsize\fi}
+
+\permanent\protected\def\setraggedness#1% tricky .. we keep the global tolerance otherwise ... to be reconsidered
+ {\ifnum\tolerance<\c_spac_tolerance_minimum
+ \tolerance\c_spac_tolerance_minimum % small values have unwanted side effects
+ \else
+ % todo: take set value or none .. better done elsewhere (200 is normal)
+ \fi
+ \ifrelax\dohyphens % was 2.5 in old implementation using scratch registers
+ \hyphenpenalty\dimexpr2.8\hsize/\dimexpr#1\relax\relax % 50 in raggedright/raggedleft
+ %\else
+ % no need to do something as we're in \nohyphens
+ \fi}
+
+\protected\def\spac_align_set_tolerant
+ {\tolerance\c_spac_tolerance_normal}
+
+\protected\def\spac_align_set_very_tolerant
+ {\tolerance\c_spac_tolerance_extreme}
+
+\protected\def\spac_align_set_stretch
+ {\emergencystretch\bodyfontsize}
+
+\protected\def\spac_align_set_extreme_stretch
+ {\emergencystretch10\bodyfontsize}
+
+% Vertical
+
+\newconstant\c_spac_align_state_vertical
+
+\protected\def\spac_align_set_vertical_none
+ {\enforced\let\raggedtopcommand \relax
+ \enforced\let\raggedbottomcommand\relax}
+
+\protected\def\spac_align_set_vertical_lohi
+ {\enforced\let\raggedtopcommand \vfilll
+ \enforced\let\raggedbottomcommand\vfilll}
+
+\protected\def\spac_align_set_vertical_low
+ {\enforced\let\raggedtopcommand \vfilll
+ \enforced\let\raggedbottomcommand\relax}
+
+\protected\def\spac_align_set_vertical_high
+ {\enforced\let\raggedtopcommand \relax
+ \enforced\let\raggedbottomcommand\vfilll}
+
+\def\spac_align_flush_vertical
+ {\ifcase\c_spac_align_state_vertical
+ \spac_align_set_vertical_none
+ \or
+ \spac_align_set_vertical_lohi
+ \or
+ \spac_align_set_vertical_low
+ \or
+ \spac_align_set_vertical_high
+ \fi}
+
+% Horizontal
+
+\ifdefined\raggedonelinerstate \else
+ \newconditional\raggedonelinerstate % public
+\fi
+
+% \appendtoks
+% \setfalse\raggedonelinerstate
+% \to \everyforgetall
+
+\newconstant\raggedstatus % public
+
+\newconstant\c_spac_align_state_horizontal
+\newconstant\c_spac_align_state_broad
+\newconstant\c_spac_align_state_par_fill
+
+\def\v_spac_align_fill_amount {\plusone fil}
+\def\v_spac_align_fill_amount_hard {\plusone fill}
+\def\v_spac_align_fill_amount_extreme {\plustenthousand filll}
+\def\v_spac_align_fill_amount_negative {\minusone fil}
+\def\v_spac_align_fill_amount_double {\plustwo fil}
+\def\v_spac_align_fill_amount_space {\plustwo fil} % can be added to xspace if we have a key
+\def\v_spac_align_fill_amount_half {.5fil}
+\let\v_spac_align_space_amount \interwordspace
+\def\v_spac_align_space_amount_x {.5\emwidth}
+
+\newskip\s_zero_plus_one_fil \s_zero_plus_one_fil = 0pt plus 1fil
+\newskip\s_zero_plus_zero \s_zero_plus_zero = 0pt plus 0pt
+
+% \s!plus ... slower than inline
+
+\permanent\protected\def\spac_align_set_horizontal_none % should also relax \updateraggedskips
+ {\raggedstatus \zerocount
+ \c_attr_alignstate\attributeunsetvalue
+ \leftskip \plusone\leftskip
+ \rightskip \plusone\rightskip
+ \spaceskip \zeropoint
+ \xspaceskip \zeropoint
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_one_fil % new
+ \setfalse \raggedonelinerstate % now here
+ \enforced\aliased\let\updateraggedskips\relax} % no need for adaption
+
+\permanent\protected\def\spac_align_set_horizontal_left
+ {\setraggedness \spac_align_set_raggedness_left
+ \raggedstatus \plusone
+ \c_attr_alignstate\plusone
+ \leftskip \plusone\leftskip \s!plus\spac_align_set_raggedness_left
+ \rightskip \plusone\rightskip\s!plus\zeropoint
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_zero
+ \parindent \zeropoint
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_center
+ {\setraggedness \spac_align_set_raggedness_middle
+ \raggedstatus \plustwo
+ \c_attr_alignstate\plustwo
+ \leftskip \plusone\leftskip \s!plus\spac_align_set_raggedness_middle
+ \rightskip \plusone\rightskip\s!plus\spac_align_set_raggedness_middle
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_zero
+ \parindent \zeropoint
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_right
+ {\setraggedness \spac_align_set_raggedness_right
+ \raggedstatus \plusthree
+ \c_attr_alignstate\plusthree
+ \leftskip \plusone\leftskip \s!plus\zeropoint
+ \rightskip \plusone\rightskip\s!plus\spac_align_set_raggedness_right
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_one_fil
+ %\parindent \parindent
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_very_left
+ {\raggedstatus \plusone
+ \c_attr_alignstate\plusone
+ \leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount
+ \rightskip \plusone\rightskip\s!plus\zeropoint
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_zero
+ \parindent \zeropoint
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_very_center
+ {\raggedstatus \plustwo
+ \c_attr_alignstate\plustwo
+ \leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount
+ \rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_zero
+ \parindent \zeropoint
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_very_right
+ {\raggedstatus \plusthree
+ \c_attr_alignstate\plusthree
+ \leftskip \plusone\leftskip \s!plus\zeropoint
+ \rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_zero
+ %\parindent \parindent
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_wide_center
+ {\setraggedness \spac_align_set_raggedness_middle
+ \raggedstatus \plustwo
+ \c_attr_alignstate\plustwo
+ \leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount_half
+ \rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount_half
+ \spaceskip \v_spac_align_space_amount
+ \xspaceskip \v_spac_align_space_amount_x
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_zero
+ \parindent \zeropoint
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_centered_last_line
+ {\raggedstatus \zerocount
+ \c_attr_alignstate\attributeunsetvalue
+ \leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount\relax
+ \rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount_negative\relax
+ \spaceskip \zeropoint\relax
+ \xspaceskip \zeropoint\relax
+ \parfillleftskip \zeropoint
+ \parfillskip \zeropoint\s!plus\v_spac_align_fill_amount_double\relax
+ \parindent \zeropoint
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_flushedright_last_line
+ {\raggedstatus \zerocount
+ \c_attr_alignstate\attributeunsetvalue
+ \leftskip \plusone\leftskip \s!plus\v_spac_align_fill_amount\relax
+ \rightskip \plusone\rightskip\s!plus\v_spac_align_fill_amount_negative\relax
+ \spaceskip \zeropoint\relax
+ \xspaceskip \zeropoint\relax
+ \parfillskip \zeropoint
+ \parfillleftskip \zeropoint\s!plus\v_spac_align_fill_amount_extreme\relax
+ \parindent \zeropoint
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_right_tt % a plain command
+ {\tttf % brrr
+ \raggedstatus \plusthree
+ \c_attr_alignstate\plusthree
+ \leftskip \plusone\leftskip \s!plus\zeropoint\relax
+ \rightskip \plusone\rightskip\s!plus\spac_align_set_raggedness_right\relax
+ \spaceskip \zeropoint\relax
+ \xspaceskip \zeropoint\relax
+ \parfillleftskip \zeropoint
+ \parfillskip \s_zero_plus_zero
+ %\parindent \parindent
+ \relax}
+
+\permanent\protected\def\spac_align_set_horizontal_extra
+ {\xspaceskip\zeropoint\s!plus\v_spac_align_fill_amount_space\relax}
+
+\def\spac_align_flush_horizontal
+ {\ifcase\c_spac_align_state_horizontal
+ % 0
+ \spac_align_set_horizontal_none
+ \or
+ % 1 center
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_center
+ \or
+ \spac_align_set_horizontal_very_center
+ \or
+ \spac_align_set_horizontal_wide_center
+ \fi
+ \or
+ % 2 flush left
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_right
+ \else
+ \spac_align_set_horizontal_very_right
+ \fi
+ \or
+ % 3 flush right
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_left
+ \else
+ \spac_align_set_horizontal_very_left
+ \fi
+ \or
+ % 4 inner
+ \ifdoublesided
+ \signalinnerrealign
+ \fi
+ \rightorleftpageaction\spac_align_set_horizontal_right\spac_align_set_horizontal_left
+ \or
+ % 5 outer
+ \ifdoublesided
+ \signalouterrealign
+ \fi
+ \rightorleftpageaction\spac_align_set_horizontal_left\spac_align_set_horizontal_right
+ \or
+ % 6 oneliner
+ \ifcase\c_spac_align_state_broad
+ \spac_align_set_horizontal_right
+ \else
+ \spac_align_set_horizontal_very_right
+ \fi
+ \parfillskip\zeropoint
+ \or
+ % 7 centered last line
+ \spac_align_set_horizontal_centered_last_line
+ \or
+ % 8 right aligned last line
+ \spac_align_set_horizontal_flushedright_last_line
+ \or
+ % 9 paragraph
+ \parfillskip\zeropoint
+ \fi
+ \relax}
+
+% Page spacing:
+
+\newconstant\c_spac_align_state_page
+
+\mutable\def\bottomalignlimit{\plusthree\lineheight}
+
+\newconstant\bottomraggednessmode % 0=ragged 1=normal/align 2=baseline
+
+\permanent\protected\def\raggedbottom
+ {\bottomraggednessmode\zerocount
+ \settopskip}
+
+\permanent\protected\def\alignbottom
+ {\bottomraggednessmode\plusone
+ \settopskip}
+
+\permanent\protected\def\baselinebottom
+ {\bottomraggednessmode\plustwo
+ \settopskip}
+
+\aliased\let\normalbottom\alignbottom % downward compatible
+
+\permanent\protected\def\setbottomalignmode#1%
+ {\bottomraggednessmode#1%
+ \settopskip}
+
+\def\spac_align_flush_page
+ {\ifcase\c_spac_align_state_page
+ % keep state
+ \or
+ \raggedbottom
+ \or
+ \alignbottom
+ \or
+ \baselinebottom
+ \fi}
+
+% Directions
+
+\newconstant\c_spac_align_state_direction
+
+\def\spac_align_flush_direction
+ {\ifcase\c_spac_align_state_direction
+ % keep state
+ \or
+ \lefttoright
+ \or
+ \righttoleft
+ \fi}
+
+% Interesting is that the non cached version is also pretty efficient
+% and as we cache we seldom call that one now so one can debate the
+% speedup.
+
+\newtoks\t_spac_align_collected
+
+\aliased\let\raggedcommand \relax
+\aliased\let\updateraggedskips\relax
+
+\def\spac_align_add_to_cache
+ {\enforced\let\raggedbox\relax % why
+ % we inherit hyphenation and tolerance
+ \t_spac_align_collected \emptytoks
+ \c_spac_align_state_broad \zerocount
+ \c_spac_align_state_horizontal\zerocount
+ \c_spac_align_state_vertical \zerocount
+ \c_spac_align_state_direction \zerocount % what is default ?
+ \c_spac_align_state_page \zerocount
+ \c_spac_align_state_par_fill \zerocount
+ \ifcsname\??aligncommand\m_spac_align_asked\endcsname
+ \lastnamedcs
+ \else
+ \rawprocesscommacommand[\m_spac_align_asked]\spac_align_collect
+ \fi
+ \normalexpanded{\t_spac_align_collected
+ {\setfalse\raggedonelinerstate % bad
+ \the\t_spac_align_collected
+ \spac_align_flush_horizontal
+ \spac_align_flush_vertical
+ \spac_align_flush_direction
+ \spac_align_flush_page
+ \spac_align_flush_parfill
+ }}% kept, nice for tracing
+ \enforced\permanent\protected\edef\raggedcommand {\the\t_spac_align_collected }%
+ \enforced\permanent\protected\edef\updateraggedskips{\spac_align_flush_horizontal}%
+ \enforced\aliased\gletcsname\??alignmentnormalcache\m_spac_align_asked\endcsname\raggedcommand
+ \enforced\aliased\gletcsname\??alignmentraggedcache\m_spac_align_asked\endcsname\updateraggedskips}
+
+\def\spac_align_collect#1%
+ {\csname\??aligncommand#1\endcsname}
+
+% The local (key driven) setter:
+
+\permanent\protected\def\spac_align_prepare#1% deferred
+ {\edef\m_spac_align_asked{#1}%
+ \enforced\aliased\expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache\m_spac_align_asked\endcsname
+ \ifrelax\raggedcommand
+ \spac_align_add_to_cache
+ \else
+ \enforced\aliased\expandafter\let\expandafter\updateraggedskips\csname\??alignmentraggedcache\m_spac_align_asked\endcsname
+ \fi}
+
+\aliased\let\dosetraggedcommand\spac_align_prepare % sort of public
+
+% The regular align setter:
+
+\permanent\tolerant\protected\def\setupalign[#1]% immediate
+ {\edef\m_spac_align_asked{#1}%
+ \enforced\expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache\m_spac_align_asked\endcsname
+ \ifrelax\raggedcommand
+ \spac_align_add_to_cache
+ \else
+ \enforced\aliased\expandafter\let\expandafter\updateraggedskips\csname\??alignmentraggedcache\m_spac_align_asked\endcsname
+ \fi
+ \raggedcommand}
+
+\permanent\protected\def\usealignparameter#1% faster local variant
+ {\edef\m_spac_align_asked{#1\c!align}%
+ \ifempty\m_spac_align_asked\else
+ \spac_align_use_indeed
+ \fi}
+
+\permanent\protected\def\dousealignparameter#1% faster local variant
+ {\edef\m_spac_align_asked{#1}%
+ \ifempty\m_spac_align_asked\else
+ \spac_align_use_indeed
+ \fi}
+
+\def\spac_align_use_indeed
+ {\enforced\aliased\expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache\m_spac_align_asked\endcsname
+ \ifrelax\raggedcommand
+ \spac_align_add_to_cache
+ \else
+ \enforced\aliased\expandafter\let\expandafter\updateraggedskips\csname\??alignmentraggedcache\m_spac_align_asked\endcsname
+ \fi
+ \raggedcommand}
+
+% experiment
+
+\protected\def\spac_align_use_later#1%
+ {\begingroup
+ \edef\m_spac_align_asked{#1}%
+ \enforced\aliased\expandafter\let\expandafter\raggedcommand\csname\??alignmentnormalcache\m_spac_align_asked\endcsname
+ \ifrelax\raggedcommand
+ \spac_align_add_to_cache
+ \fi
+ \endgroup}
+
+\protected\def\spac_align_use_now#1%
+ {\csname\??alignmentnormalcache#1\endcsname}
+
+% Maybe we need something different in columns.
+
+\permanent\protected\def\installalign#1#2% beware: commands must be unexpandable!
+ {\ifcsname\??aligncommand#1\endcsname \else
+ \defcsname\??aligncommand#1\endcsname{\toksapp\t_spac_align_collected{#2}}%
+ \fi}
+
+% The keywords:
+
+\letcsname\??aligncommand\empty \endcsname\empty
+\defcsname\??aligncommand\v!broad \endcsname{\c_spac_align_state_broad \plusone }
+\defcsname\??aligncommand\v!wide \endcsname{\c_spac_align_state_broad \plustwo }
+
+\defcsname\??aligncommand\v!bottom \endcsname{\c_spac_align_state_page \plusone }
+\defcsname\??aligncommand\v!height \endcsname{\c_spac_align_state_page \plustwo }
+\defcsname\??aligncommand\v!line \endcsname{\c_spac_align_state_page \plusthree
+ % this will become another keyword (undocumented anyway)
+ \toksapp\t_spac_align_collected{\settrue\raggedonelinerstate}}
+
+\defcsname\??aligncommand\v!high \endcsname{\c_spac_align_state_vertical \plusthree}
+\defcsname\??aligncommand\v!low \endcsname{\c_spac_align_state_vertical \plustwo }
+\defcsname\??aligncommand\v!lohi \endcsname{\c_spac_align_state_vertical \plusone }
+
+\defcsname\??aligncommand\v!flushright \endcsname{\c_spac_align_state_horizontal\plusthree}
+\defcsname\??aligncommand\v!flushleft \endcsname{\c_spac_align_state_horizontal\plustwo }
+\defcsname\??aligncommand\v!middle \endcsname{\c_spac_align_state_horizontal\plusone }
+\defcsname\??aligncommand\v!no \endcsname{\c_spac_align_state_horizontal\plustwo }
+\defcsname\??aligncommand\v!yes \endcsname{\c_spac_align_state_horizontal\zerocount}
+\defcsname\??aligncommand\v!width \endcsname{\c_spac_align_state_horizontal\zerocount}
+\defcsname\??aligncommand\v!normal \endcsname{\c_spac_align_state_horizontal\zerocount}
+\defcsname\??aligncommand\v!reset \endcsname{\c_spac_align_state_page \zerocount
+ \c_spac_align_state_horizontal\zerocount}
+\defcsname\??aligncommand\v!inner \endcsname{\c_spac_align_state_horizontal\plusfour }
+\defcsname\??aligncommand\v!outer \endcsname{\c_spac_align_state_horizontal\plusfive }
+\defcsname\??aligncommand\v!flushinner \endcsname{\c_spac_align_state_horizontal\plusfour }
+\defcsname\??aligncommand\v!flushouter \endcsname{\c_spac_align_state_horizontal\plusfive }
+\defcsname\??aligncommand\v!right \endcsname{\c_spac_align_state_horizontal\plustwo }
+\defcsname\??aligncommand\v!left \endcsname{\c_spac_align_state_horizontal\plusthree}
+\defcsname\??aligncommand\v!center \endcsname{\c_spac_align_state_horizontal\plusone
+ \c_spac_align_state_broad \plustwo }
+\defcsname\??aligncommand\v!disable \endcsname{\c_spac_align_state_horizontal\plussix }
+\defcsname\??aligncommand\v!last \endcsname{\c_spac_align_state_horizontal\plusseven}
+\defcsname\??aligncommand\v!end \endcsname{\c_spac_align_state_horizontal\pluseight}
+\defcsname\??aligncommand\v!paragraph \endcsname{\c_spac_align_state_horizontal\plusnine}
+
+\defcsname\??aligncommand\v!lefttoright \endcsname{\c_spac_align_state_direction \plusone }
+\defcsname\??aligncommand\v!righttoleft \endcsname{\c_spac_align_state_direction \plustwo }
+\defcsname\??aligncommand l2r\endcsname{\c_spac_align_state_direction \plusone }
+\defcsname\??aligncommand r2l\endcsname{\c_spac_align_state_direction \plustwo }
+
+\defcsname\??aligncommand\v!table \endcsname{\c_spac_align_state_vertical \plusthree
+ \c_spac_align_state_broad \plusone
+ \c_spac_align_state_horizontal\plustwo }
+
+\defcsname\??aligncommand\v!lesshyphenation\endcsname{\toksapp\t_spac_align_collected{\lesshyphens}}
+\defcsname\??aligncommand\v!morehyphenation\endcsname{\toksapp\t_spac_align_collected{\morehyphens}}
+
+\defcsname\??aligncommand\v!hanging \endcsname{\toksapp\t_spac_align_collected{\font_protruding_enable }}
+\defcsname\??aligncommand\v!hangingboth \endcsname{\toksapp\t_spac_align_collected{\font_protruding_enable_b}}
+\defcsname\??aligncommand\v!nothanging \endcsname{\toksapp\t_spac_align_collected{\font_protruding_disable}}
+\defcsname\??aligncommand\v!hz \endcsname{\toksapp\t_spac_align_collected{\font_expansion_enable }}
+\defcsname\??aligncommand\v!fullhz \endcsname{\toksapp\t_spac_align_collected{\font_expansion_enable_k}}
+\defcsname\??aligncommand\v!nohz \endcsname{\toksapp\t_spac_align_collected{\font_expansion_disable }}
+%defcsname\??aligncommand\v!spacing \endcsname{\toksapp\t_spac_align_collected{\normalspacing\zerocount}} % not yet
+%defcsname\??aligncommand\v!nospacing \endcsname{\toksapp\t_spac_align_collected{\normalspacing\plusone}} % not yet
+\defcsname\??aligncommand\v!hyphenated \endcsname{\toksapp\t_spac_align_collected{\dohyphens}}
+\defcsname\??aligncommand\v!nothyphenated \endcsname{\toksapp\t_spac_align_collected{\nohyphens}}
+
+\defcsname\??aligncommand\v!tolerant \endcsname{\toksapp\t_spac_align_collected{\spac_align_set_tolerant}}
+\defcsname\??aligncommand\v!verytolerant \endcsname{\toksapp\t_spac_align_collected{\spac_align_set_very_tolerant}}
+\defcsname\??aligncommand\v!stretch \endcsname{\toksapp\t_spac_align_collected{\spac_align_set_stretch}}
+\defcsname\??aligncommand\v!extremestretch \endcsname{\toksapp\t_spac_align_collected{\spac_align_set_extreme_stretch}}
+
+\defcsname\??aligncommand \v!final\endcsname{\c_spac_align_state_par_fill\plusone}
+\defcsname\??aligncommand1*\v!final\endcsname{\c_spac_align_state_par_fill\plusone}
+\defcsname\??aligncommand2*\v!final\endcsname{\c_spac_align_state_par_fill\plustwo} % hardcoded multiplier
+\defcsname\??aligncommand3*\v!final\endcsname{\c_spac_align_state_par_fill\plusthree}
+\defcsname\??aligncommand4*\v!final\endcsname{\c_spac_align_state_par_fill\plusfour}
+
+% a one shot (only usefull in e.g. framed, also needs tolerance and stretch)
+
+\defcsname\??aligncommand \v!more\endcsname{\toksapp\t_spac_align_collected{\looseness\plusone}}
+\defcsname\??aligncommand1*\v!more\endcsname{\toksapp\t_spac_align_collected{\looseness\plusone}}
+\defcsname\??aligncommand2*\v!more\endcsname{\toksapp\t_spac_align_collected{\looseness\plustwo}}
+
+%defcsname\??aligncommand ...\endcsname{\toksapp\t_spac_align_collected{\nopenalties}}
+%defcsname\??aligncommand ...\endcsname{\toksapp\t_spac_align_collected{\setdefaultpenalties}}
+
+% experiment
+
+\defcsname\??aligncommand\v!always\endcsname{\toksapp\t_spac_align_collected{\bitwiseflip\hyphenationmode\forcecheckhyphenationmodecode}}
+
+\definehspace [\v!final] [\emspaceamount]
+
+\def\spac_align_flush_parfill
+ {\ifcase\c_spac_align_state_par_fill\else
+ \spac_align_flush_parfill_indeed{\number\c_spac_align_state_par_fill}%
+ \fi}
+
+\protected\def\spac_align_flush_parfill_indeed#1%
+ {\parfillskip
+ #1\directhspaceamount\v!final
+ % plus \dimexpr\availablehsize-#1\directhspaceamount\v!final\relax
+ plus 1fill
+ \relax}
+
+%D For Wolfgang:
+
+\newtoks \t_spac_every_swap_align
+
+\appendtoks
+ \defcsname\??aligncommand\v!right\endcsname{\c_spac_align_state_horizontal\plusthree}%
+ \defcsname\??aligncommand\v!left \endcsname{\c_spac_align_state_horizontal\plustwo }%
+\to \t_spac_every_swap_align
+
+\permanent\protected\def\enablereversealignment
+ {\the\t_spac_every_swap_align
+ \t_spac_every_swap_align\emptytoks}
+
+% Visible commands:
+
+\aliased\let\notragged \spac_align_set_horizontal_none
+\aliased\let\raggedleft \spac_align_set_horizontal_left
+\aliased\let\raggedcenter \spac_align_set_horizontal_center
+\aliased\let\raggedright \spac_align_set_horizontal_right
+\aliased\let\veryraggedleft \spac_align_set_horizontal_very_left
+\aliased\let\veryraggedcenter \spac_align_set_horizontal_very_center
+\aliased\let\veryraggedright \spac_align_set_horizontal_very_right
+\aliased\let\raggedwidecenter \spac_align_set_horizontal_wide_center
+\aliased\let\centeredlastline \spac_align_set_horizontal_centered_last_line
+\aliased\let\flushedrightlastline\spac_align_set_horizontal_flushedright_last_line
+\aliased\let\ttraggedright \spac_align_set_horizontal_right_tt % a plain command
+\aliased\let\forgetragged \spac_align_set_horizontal_none
+
+\appendtoks
+ \spac_align_set_horizontal_none
+\to \everyforgetall
+
+% Box commands.
+
+\permanent\protected\def\ibox
+ {\vbox\bgroup
+ \forgetall
+ \enforced\let\\\endgraf
+ \ifdoublesided\signalinnerrealign\fi
+ \doifelserightpage\spac_align_set_horizontal_right\spac_align_set_horizontal_left
+ \let\next}
+
+\permanent\protected\def\obox
+ {\vbox\bgroup
+ \forgetall
+ \enforced\let\\\endgraf
+ \ifdoublesided\signalouterrealign\fi
+ \doifelserightpage\spac_align_set_horizontal_left\spac_align_set_horizontal_right
+ \let\next}
+
+\let\raggedbox\relax
+
+\permanent\protected\def\dosetraggedvbox#1% can be more keys .. how about caching here (but seldom used)
+ {\enforced\let\raggedbox\vbox
+ \processcommacommand[#1]\spac_align_set_ragged_vbox}
+
+\permanent\protected\def\dosetraggedhbox#1% can be more keys .. how about caching here (but seldom used)
+ {\enforced\let\raggedbox\hbox
+ \processcommacommand[#1]\spac_align_set_ragged_hbox}
+
+\def\spac_align_set_ragged_vbox#1%
+ {\ifcsname\??alignvertical#1\endcsname
+ \lastnamedcs
+ \quitcommalist
+ \fi}
+
+\def\spac_align_set_ragged_hbox#1%
+ {\ifcsname\??alignhorizontal#1\endcsname
+ \lastnamedcs
+ \quitcommalist
+ \fi}
+
+\permanent\protected\def\spac_align_vertical_left {\lbox}
+\permanent\protected\def\spac_align_vertical_right {\rbox}
+\permanent\protected\def\spac_align_vertical_middle {\cbox}
+\permanent\protected\def\spac_align_vertical_inner {\ibox}
+\permanent\protected\def\spac_align_vertical_outer {\obox}
+\permanent\protected\def\spac_align_vertical_flushleft {\rbox}
+\permanent\protected\def\spac_align_vertical_flushright{\lbox}
+\permanent\protected\def\spac_align_vertical_center {\cbox}
+\permanent\protected\def\spac_align_vertical_no {\vbox\bgroup\spac_align_set_horizontal_right\let\next=}
+
+\permanent\protected\def\spac_align_horizontal_left {\doalignedline\v!left}
+\permanent\protected\def\spac_align_horizontal_right {\doalignedline\v!right}
+\permanent\protected\def\spac_align_horizontal_middle {\doalignedline\v!middle}
+\permanent\protected\def\spac_align_horizontal_inner {\doalignedline\v!inner}
+\permanent\protected\def\spac_align_horizontal_outer {\doalignedline\v!outer}
+\permanent\protected\def\spac_align_horizontal_flushleft {\doalignedline\v!right}
+\permanent\protected\def\spac_align_horizontal_flushright{\doalignedline\v!left}
+\permanent\protected\def\spac_align_horizontal_center {\doalignedline\v!middle}
+
+\defcsname\??alignvertical \v!left \endcsname{\enforced\let\raggedbox\spac_align_vertical_left}
+\defcsname\??alignvertical \v!right \endcsname{\enforced\let\raggedbox\spac_align_vertical_right}
+\defcsname\??alignvertical \v!middle \endcsname{\enforced\let\raggedbox\spac_align_vertical_middle}
+\defcsname\??alignvertical \v!inner \endcsname{\enforced\let\raggedbox\spac_align_vertical_inner}
+\defcsname\??alignvertical \v!outer \endcsname{\enforced\let\raggedbox\spac_align_vertical_outer}
+\defcsname\??alignvertical \v!flushleft \endcsname{\enforced\let\raggedbox\spac_align_vertical_flushleft }
+\defcsname\??alignvertical \v!flushright\endcsname{\enforced\let\raggedbox\spac_align_vertical_flushright}
+\defcsname\??alignvertical \v!center \endcsname{\enforced\let\raggedbox\spac_align_vertical_center}
+\defcsname\??alignvertical \v!no \endcsname{\enforced\let\raggedbox\spac_align_vertical_no}
+
+\defcsname\??alignhorizontal\v!left \endcsname{\enforced\let\raggedbox\spac_align_horizontal_left}
+\defcsname\??alignhorizontal\v!right \endcsname{\enforced\let\raggedbox\spac_align_horizontal_right}
+\defcsname\??alignhorizontal\v!middle \endcsname{\enforced\let\raggedbox\spac_align_horizontal_middle}
+\defcsname\??alignhorizontal\v!inner \endcsname{\enforced\let\raggedbox\spac_align_horizontal_inner}
+\defcsname\??alignhorizontal\v!outer \endcsname{\enforced\let\raggedbox\spac_align_horizontal_outer}
+\defcsname\??alignhorizontal\v!flushleft \endcsname{\enforced\let\raggedbox\spac_align_horizontal_flushleft}
+\defcsname\??alignhorizontal\v!flushright\endcsname{\enforced\let\raggedbox\spac_align_horizontal_flushright}
+\defcsname\??alignhorizontal\v!center \endcsname{\enforced\let\raggedbox\spac_align_horizontal_center}
+
+% The next one can be in use so we keep it around but oen should
+% be aware of possible interference.
+
+\permanent\protected\def\setraggedskips#1#2#3#4#5#6#7% never change this name (todo: inline this one .. less tracingall)
+ {\enforced\permanent\protected\def\updateraggedskips{\dosetraggedskips{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
+ \updateraggedskips}
+
+\permanent\protected\def\dosetraggedskips#1#2#3#4#5#6#7%
+ {\raggedstatus #1\relax
+ \leftskip 1\leftskip \s!plus#2\relax
+ \rightskip 1\rightskip\s!plus#3\relax
+ \spaceskip #4\relax
+ \xspaceskip #5\relax
+ \parfillskip \zeropoint\s!plus#6\relax
+ \parindent #7\relax
+ \c_attr_alignstate\ifcase\raggedstatus\attributeunsetvalue\else\raggedstatus\fi}
+
+% older (context) names:
+
+\aliased\let\spaceamount \interwordspace
+\aliased\let\emspaceamount\emwidth
+
+% tracing:
+
+\def\spac_show_par_data#1%
+ {\ifrelax#1\else
+ \hbox{\string#1: \the#1}\endgraf
+ \expandafter\spac_show_par_data
+ \fi}
+
+\permanent\protected\def\showpardata
+ {\normalexpanded{\dontleavehmode\inleftmargin{\vsmash{\infofont\framed[\c!align=\v!right]{%
+ \hbox{font: \fontname\font}\endgraf
+ \spac_show_par_data
+ \interwordspace \interwordstretch \interwordshrink \emwidth \exheight \extraspace
+ \hsize \vsize
+ \leftskip \rightskip
+ \spaceskip \xspaceskip
+ \parindent \parfillskip
+ \hyphenpenalty \exhyphenpenalty \automatichyphenpenalty \explicithyphenpenalty
+ \displaywidowpenalty \widowpenalty \clubpenalty \brokenpenalty
+ \doublehyphendemerits \finalhyphendemerits \adjdemerits
+ \relax}}}}}
+
+\permanent\protected\def\startshowpardata
+ {\begingroup
+ \showstruts
+ \tracingparagraphs\maxdimen
+ \appendtoksonce\showpardata\to\everypar}
+
+\permanent\protected\def\stopshowpardata
+ {\endgraf
+ \endgroup}
+
+% Structure:
+
+\protected\def\startalignment
+ {\par
+ \begingroup
+ \setupalign}
+
+\protected\def\stopalignment
+ {\par
+ \endgroup}
+
+\setnewconstant\alignstrutmode\plusone
+
+% see later for the real definition, which in the simple case is:
+
+\newtoks \everyleftofalignedline
+\newtoks \everyrightofalignedline
+
+\permanent\protected\def\shiftalignedline#1#2#3#4% left, right, inner, outer
+ {\rightorleftpageaction
+ {\everyleftofalignedline {\hskip\dimexpr#1+#3\relax}%
+ \everyrightofalignedline{\hskip\dimexpr#2+#4\relax}}
+ {\everyleftofalignedline {\hskip\dimexpr#1+#4\relax}%
+ \everyrightofalignedline{\hskip\dimexpr#2+#3\relax}}}
+
+\permanent\protected\def\doalignline#1#2% \\ == newline
+ {\noindentation % was \noindent
+ \dontleavehmode % added in marrakesch at TUG 2006\begingroup
+ \begingroup
+ \setlocalhsize % new
+ \enforced\permanent\protected\def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
+ \dowithnextbox
+ {\hbox to \localhsize
+ {\ifcase\alignstrutmode\or\strut\fi
+ \the\everyleftofalignedline
+ #1\unhbox\nextbox#2\relax
+ \the\everyrightofalignedline}%
+ \endgroup}
+ \hbox}
+
+% plain commands
+
+\ifdefined\line \else \permanent\protected\def\line {\hbox to\hsize} \fi
+\ifdefined\leftline \else \permanent\protected\def\leftline #1{\line{#1\hss}} \fi
+\ifdefined\rightline \else \permanent\protected\def\rightline #1{\line{\hss#1}} \fi
+\ifdefined\centerline \else \permanent\protected\def\centerline#1{\line{\hss#1\hss}} \fi
+
+% direct commands
+
+\installcorenamespace{alignwrapper}
+
+\protected\defcsname\??alignwrapper\v!left \endcsname{\doalignline\relax \hss }
+\protected\defcsname\??alignwrapper\v!middle\endcsname{\doalignline\hss \hss }
+\protected\defcsname\??alignwrapper\v!right \endcsname{\doalignline\hss \relax}
+\protected\defcsname\??alignwrapper\v!max \endcsname{\doalignline\relax \relax}
+
+\def\spac_align_wrapper_middle{\doalignline\hss\hss}
+
+\def\spac_align_wrapper_handle#1%
+ {\ifcsname\??alignwrapper#1\endcsname\expandafter\lastnamedcs\else\expandafter\spac_align_wrapper_middle\fi}
+
+\permanent\tolerant\protected\def\startlinealignment[#1]%
+ {\spac_align_wrapper_handle{#1}%
+ \bgroup\ignorespaces}
+
+\protected\def\spac_align_wrapper_stop
+ {\removeunwantedspaces\egroup}
+
+\permanent\let\stoplinealignment\spac_align_wrapper_stop
+
+\permanent\protected\def\startleftaligned {\startlinealignment[\v!left ]} \permanent\let\stopleftaligned \spac_align_wrapper_stop
+\permanent\protected\def\startmiddlealigned{\startlinealignment[\v!middle]} \permanent\let\stopmiddlealigned\spac_align_wrapper_stop
+\permanent\protected\def\startrightaligned {\startlinealignment[\v!right ]} \permanent\let\stoprightaligned \spac_align_wrapper_stop
+\permanent\protected\def\startmaxaligned {\startlinealignment[\v!max ]} \permanent\let\stopmaxaligned \spac_align_wrapper_stop
+
+\aliased\let\startmidaligned \startmiddlealigned \aliased\let\stopmidaligned \stopmiddlealigned
+\aliased\let\startcenteraligned\startmiddlealigned \aliased\let\stopcenteraligned\stopmiddlealigned
+
+\permanent\protected\def\leftaligned {\spac_align_wrapper_handle\v!left }
+\permanent\protected\def\middlealigned{\spac_align_wrapper_handle\v!middle}
+\permanent\protected\def\rightaligned {\spac_align_wrapper_handle\v!right }
+\permanent\protected\def\maxaligned {\spac_align_wrapper_handle\v!max }
+
+\aliased\let\midaligned \middlealigned
+\aliased\let\centeraligned\middlealigned
+
+\installcorenamespace{alignline}
+
+\letcsname\??alignline\v!left \endcsname\leftaligned
+\letcsname\??alignline\v!right \endcsname\rightaligned
+\letcsname\??alignline\v!middle \endcsname\midaligned
+\letcsname\??alignline\v!flushleft \endcsname\rightaligned % beware, makes no sense in locations / we will have a special locations handler
+\letcsname\??alignline\v!flushright\endcsname\leftaligned % beware, makes no sense in locations / we will have a special locations handler
+\letcsname\??alignline\v!center \endcsname\midaligned
+\letcsname\??alignline\v!max \endcsname\maxaligned
+
+%D Experimental (will be redone when floats are redone as it's real messy
+%D now). It can also be made faster (if needed).
+
+\permanent\protected\def\doxalignline#1#2#3#4#5#6%
+ {\noindentation % was \noindent
+ \dontleavehmode % added in marrakesch at TUG 2006\begingroup
+ \begingroup
+ \setlocalhsize
+ \enforced\permanent\protected\def\\{\egroup\par\doxalignline#1#2#3#4#5#6\bgroup}% inefficient
+ \dowithnextbox
+ {\hbox to \localhsize
+ {#1\hskip\ifdone#2\else#3\fi#4%
+ \hbox to \localhsize
+ {\the\everyleftofalignedline
+ \ifcase\alignstrutmode\or\strut\fi
+ \ifdone#5\unhbox\nextbox#6\else#6\unhbox\nextbox#5\fi
+ \the\everyrightofalignedline}%
+ \hss}%
+ \endgroup}
+ \hbox}
+
+\permanent\protected\def\doxcheckline % used for floats so multipass anyway
+ {\signalrightpage\doifelserightpage\donetrue\donefalse}
+
+\defcsname\??alignline\v!inner \endcsname{\doxalignline\doxcheckline++\zeropoint \relax\hss }
+\defcsname\??alignline\v!outer \endcsname{\doxalignline\doxcheckline++\zeropoint \hss \relax}
+\defcsname\??alignline\v!innermargin\endcsname{\doxalignline\doxcheckline-+\innermargintotal\relax\hss }
+\defcsname\??alignline\v!outermargin\endcsname{\doxalignline\doxcheckline+-\outermargintotal\hss \relax}
+\defcsname\??alignline\v!inneredge \endcsname{\doxalignline\doxcheckline-+\inneredgetotal \relax\hss }
+\defcsname\??alignline\v!outeredge \endcsname{\doxalignline\doxcheckline+-\outeredgetotal \hss \relax}
+\defcsname\??alignline\v!backspace \endcsname{\doxalignline\doxcheckline-+\backspace \relax\hss }
+\defcsname\??alignline\v!cutspace \endcsname{\doxalignline\doxcheckline+-\cutspace \hss \relax}
+
+\defcsname\??alignline\v!leftmargin \endcsname{\doxalignline\donefalse --\leftmargintotal \hss \relax}
+\defcsname\??alignline\v!rightmargin\endcsname{\doxalignline\donefalse ++\rightmargintotal\relax\hss }
+\defcsname\??alignline\v!leftedge \endcsname{\doxalignline\donefalse --\leftedgetotal \hss \relax}
+\defcsname\??alignline\v!rightedge \endcsname{\doxalignline\donefalse ++\rightedgetotal \relax\hss }
+
+\permanent\protected\def\doalignedline#1{\begincsname\??alignline#1\endcsname}
+
+\permanent\protected\def\alignedline#1#2% setting default
+ {\ifcsname\??alignline#1\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??alignline#2\expandafter\endcsname
+ \fi}
+
+% beware: \wordright{whatever\kern-\rightskip} should work!
+% so, no funny boxing here
+
+%D We need to pick up a box (downward compatible in case \type {\bgroup}
+%D is used (test suite index example).
+
+\permanent\tolerant\protected\def\wordright[#1]%
+ {\dowithnextbox
+ {\normalexpanded{\spac_word_right_indeed{#1}{\hpack{\thebox\nextbox}}}}
+ \hbox}
+
+\protected\def\spac_word_right_indeed#1#2%
+ {\registerparwrapper
+ {\v!word:\v!right}
+ {\begingroup
+ \frozen\parfillskip \zeropoint
+ \frozen\finalhyphendemerits\zerocount
+ \endgroup}
+ {\doifelseparwrapper{\v!word:\v!right}%
+ {\doifelse{#1}\v!right{\kern-\rightskip}{\doifsomething{#1}{\kern-#1}}%
+ \strut \removeunwantedspaces
+ \hfill
+ \allowbreak % changed back from \hskip\zeropoint
+ \quad}%
+ {\allowbreak % changed back from \hskip\zeropoint
+ \break}%
+ \unregisterparwrapper{\v!word:\v!right}%
+ \strut
+ \hfill
+ \nobreak
+ #2%
+ \allowbreak}}
+
+% \dorecurse{5}{something} \wordright{--someone} \endgraf
+% \dorecurse{6}{something} \wordright{--someone} \endgraf
+% \dorecurse{7}{something} \wordright{--someone} \endgraf
+%
+% \dorecurse{5}{something} \wordright{--someone else entirely} \endgraf
+% \dorecurse{6}{something} \wordright{--someone else entirely} \endgraf
+% \dorecurse{7}{something} \wordright{--someone else entirely} \endgraf
+%
+% \wordright[\rightskip]{whatever}
+
+% Trick posted by WS on mailing list, generalized a bit. The bottom text only shows
+% op when there is one line space available. We could add some extra space if needed.
+
+% v\protected\def\bottomword
+% {\par
+% \dowithnextbox
+% {\leaders\box\nextbox\vfil\page}
+% \vbox to \lineheight}
+%
+% \permanent\protected\def\bottomword
+% {\par
+% \groupedcommand
+% {\leaders
+% \vbox to \lineheight\bgroup}
+% {\egroup
+% \vfil
+% \page}}
+
+% \simplealignedbox{2cm}{right}{x}
+
+\installcorenamespace{alignsimple}
+\installcorenamespace{alignsimplereverse}
+
+% todo: also handle \bgroup ... \egroup
+
+\protected\def\spac_align_simple_left #1{{#1\hss}}
+\protected\def\spac_align_simple_right #1{{\hss#1}}
+\protected\def\spac_align_simple_middle#1{{\hss#1\hss}}
+
+\letcsname\??alignsimple \v!right \endcsname\spac_align_simple_left
+\letcsname\??alignsimple \v!outer \endcsname\spac_align_simple_left % not managed! see linenumbers
+\letcsname\??alignsimple \v!flushleft \endcsname\spac_align_simple_left
+\letcsname\??alignsimple \v!left \endcsname\spac_align_simple_right
+\letcsname\??alignsimple \v!inner \endcsname\spac_align_simple_right % not managed! see linenumbers
+\letcsname\??alignsimple \v!flushright\endcsname\spac_align_simple_right
+\letcsname\??alignsimple \v!middle \endcsname\spac_align_simple_middle
+
+\letcsname\??alignsimplereverse\v!right \endcsname\spac_align_simple_right
+\letcsname\??alignsimplereverse\v!outer \endcsname\spac_align_simple_right % not managed! see linenumbers
+\letcsname\??alignsimplereverse\v!flushleft \endcsname\spac_align_simple_right
+\letcsname\??alignsimplereverse\v!left \endcsname\spac_align_simple_left
+\letcsname\??alignsimplereverse\v!inner \endcsname\spac_align_simple_left % not managed! see linenumbers
+\letcsname\??alignsimplereverse\v!flushright\endcsname\spac_align_simple_left
+\letcsname\??alignsimplereverse\v!middle \endcsname\spac_align_simple_middle
+
+\permanent\protected\def\simplealignedbox#1#2%
+ {\hbox \ifdim#1>\zeropoint to #1
+ \ifcsname\??alignsimple#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
+ \fi}
+
+\permanent\protected\def\simplealignedspreadbox#1#2%
+ {\hbox \ifdim#1>\zeropoint spread #1
+ \ifcsname\??alignsimple#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
+ \fi}
+
+\permanent\protected\def\simplealignedboxplus#1#2#3%
+ {\hbox #3 \ifdim#1>\zeropoint to #1
+ \ifcsname\??alignsimple#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
+ \fi}
+
+\newconditional\alignsimplelefttoright \settrue\alignsimplelefttoright
+
+\permanent\protected\def\simplereversealignedbox#1#2%
+ {\hbox \ifdim#1>\zeropoint to #1
+ \ifcsname\??alignsimplereverse#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
+ \fi}
+
+\permanent\protected\def\simplereversealignedboxplus#1#2#3%
+ {\hbox #3 \ifdim#1>\zeropoint to #1
+ \ifcsname\??alignsimplereverse#2\endcsname
+ \doubleexpandafter\lastnamedcs
+ \else
+ \doubleexpandafter\spac_align_simple_left
+ \fi
+ \fi}
+
+% Some obsolete (old) helpers:
+
+\permanent\tolerant\protected\def\definehbox[#1]#*[#2]%
+ {\ifarguments\else\frozen\instance\protected\defcsname hbox#1\endcsname##1{\hbox to #2{\begstrut##1\endstrut\hss}}\fi}
+
+%D Some direction related helpers:
+
+\installcorenamespace {reverse}
+
+\defcsname\??reverse\v!normal \endcsname{\ifconditional\inlinelefttoright\else\s!reverse\fi}
+\defcsname\??reverse\v!reverse\endcsname{\ifconditional\inlinelefttoright \s!reverse\fi}
+
+\permanent\def\usedirectionparameterreverse#1{\begincsname\??reverse#1\c!direction\endcsname}
+
+%D Now official:
+
+\permanent\protected\def\spaceorpar{\endgraf\ifhmode\space\fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-chr.lmt b/Master/texmf-dist/tex/context/base/mkxl/spac-chr.lmt
new file mode 100644
index 00000000000..ac90926e1ab
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-chr.lmt
@@ -0,0 +1,348 @@
+if not modules then modules = { } end modules ['spac-chr'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to spac-chr.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local byte, lower = string.byte, string.lower
+
+-- beware: attribute copying is bugged ... there will be a proper luatex helper
+-- for this
+
+-- to be redone: characters will become tagged spaces instead as then we keep track of
+-- spaceskip etc
+
+-- todo: only setattr when export / use properties
+
+local next = next
+
+local trace_characters = false trackers.register("typesetters.characters", function(v) trace_characters = v end)
+local trace_nbsp = false trackers.register("typesetters.nbsp", function(v) trace_nbsp = v end)
+
+local report_characters = logs.reporter("typesetting","characters")
+
+local nodes, node = nodes, node
+
+local nuts = nodes.nuts
+
+local getboth = nuts.getboth
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getlanguage = nuts.getlanguage
+local setchar = nuts.setchar
+local setattrlist = nuts.setattrlist
+local getfont = nuts.getfont
+local setsubtype = nuts.setsubtype
+local isglyph = nuts.isglyph
+
+local setcolor = nodes.tracers.colors.set
+
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local remove_node = nuts.remove
+----- traverse_id = nuts.traverse_id
+----- traverse_char = nuts.traverse_char
+local nextchar = nuts.traversers.char
+local nextglyph = nuts.traversers.glyph
+
+local copy_node = nuts.copy
+
+local nodepool = nuts.pool
+local new_penalty = nodepool.penalty
+local new_glue = nodepool.glue
+local new_kern = nodepool.kern
+local new_rule = nodepool.rule
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+
+local glyph_code = nodecodes.glyph
+local spaceskip_code = gluecodes.spaceskip
+
+local chardata = characters.data
+local is_punctuation = characters.is_punctuation
+
+local typesetters = typesetters
+
+local unicodeblocks = characters.blocks
+
+local characters = typesetters.characters or { } -- can be predefined
+typesetters.characters = characters
+
+local fonthashes = fonts.hashes
+local fontparameters = fonthashes.parameters
+local fontcharacters = fonthashes.characters
+local fontquads = fonthashes.quads
+
+local setmetatableindex = table.setmetatableindex
+
+local a_character = attributes.private("characters")
+local a_alignstate = attributes.private("alignstate")
+
+local c_zero = byte('0')
+local c_period = byte('.')
+
+local function inject_quad_space(unicode,head,current,fraction)
+ if fraction ~= 0 then
+ fraction = fraction * fontquads[getfont(current)]
+ end
+ local glue = new_glue(fraction)
+ setattrlist(glue,current)
+ setattrlist(current) -- why reset all
+ setattr(glue,a_character,unicode)
+ return insert_node_after(head,current,glue)
+end
+
+local function inject_char_space(unicode,head,current,parent)
+ local font = getfont(current)
+ local char = fontcharacters[font][parent]
+ local glue = new_glue(char and char.width or fontparameters[font].space)
+ setattrlist(glue,current)
+ setattrlist(current) -- why reset all
+ setattr(glue,a_character,unicode)
+ return insert_node_after(head,current,glue)
+end
+
+local function inject_nobreak_space(unicode,head,current,space,spacestretch,spaceshrink)
+ local glue = new_glue(space,spacestretch,spaceshrink)
+ local penalty = new_penalty(10000)
+ setattrlist(glue,current)
+ setattrlist(current) -- why reset all
+ setattr(glue,a_character,unicode) -- bombs
+ head, current = insert_node_after(head,current,penalty)
+ if trace_nbsp then
+ local rule = new_rule(space)
+ local kern = new_kern(-space)
+ local penalty = new_penalty(10000)
+ setcolor(rule,"orange")
+ head, current = insert_node_after(head,current,rule)
+ head, current = insert_node_after(head,current,kern)
+ head, current = insert_node_after(head,current,penalty)
+ end
+ return insert_node_after(head,current,glue)
+end
+
+local function nbsp(head,current)
+ local para = fontparameters[getfont(current)]
+ local attr = getattr(current,a_alignstate) or 0
+ if attr >= 1 or attr <= 3 then -- flushright
+ head, current = inject_nobreak_space(0x00A0,head,current,para.space,0,0)
+ else
+ head, current = inject_nobreak_space(0x00A0,head,current,para.space,para.spacestretch,para.spaceshrink)
+ end
+ setsubtype(current,spaceskip_code)
+ return head, current
+end
+
+-- assumes nuts or nodes, depending on callers .. so no tonuts here
+
+function characters.replacenbsp(head,original)
+ local head, current = nbsp(head,original)
+ return remove_node(head,original,true)
+end
+
+function characters.replacenbspaces(head)
+ local wipe = false
+ for current, char, font in nextglyph, head do -- can be anytime so no traverse_char
+ if char == 0x00A0 then
+ if wipe then
+ head = remove_node(h,current,true)
+ wipe = false
+ end
+ local h = nbsp(head,current)
+ if h then
+ wipe = current
+ end
+ end
+ end
+ if wipe then
+ head = remove_node(head,current,true)
+ end
+ return head
+end
+
+-- This initialization might move someplace else if we need more of it. The problem is that
+-- this module depends on fonts so we have an order problem.
+
+local nbsphash = { } setmetatableindex(nbsphash,function(t,k)
+ -- this needs checking !
+ for i=unicodeblocks.devanagari.first,unicodeblocks.devanagari.last do nbsphash[i] = true end
+ for i=unicodeblocks.kannada .first,unicodeblocks.kannada .last do nbsphash[i] = true end
+ setmetatableindex(nbsphash,nil)
+ return nbsphash[k]
+end)
+
+local methods = {
+
+ -- The next one uses an attribute assigned to the character but still we
+ -- don't have the 'local' value.
+
+ -- maybe also 0x0008 : backspace
+
+ [0x001F] = function(head,current) -- kind of special
+ local next = getnext(current)
+ if next then
+ local char, font = isglyph(next)
+ if char then
+ head, current = remove_node(head,current,true)
+ if not is_punctuation[char] then
+ local p = fontparameters[font]
+ head, current = insert_node_before(head,current,new_glue(p.space,p.space_stretch,p.space_shrink))
+ end
+ end
+ end
+ end,
+
+ [0x00A0] = function(head,current) -- nbsp
+ local prev, next = getboth(current)
+ if next then
+ local char = isglyph(current)
+ if not char then
+ -- move on
+ elseif char == 0x200C or char == 0x200D then -- nzwj zwj
+ next = getnext(next)
+ if next then
+ char = isglyph(next)
+ if char and nbsphash[char] then
+ return false
+ end
+ end
+ elseif nbsphash[char] then
+ return false
+ end
+ end
+ if prev then
+ local char = isglyph(prev)
+ if char and nbsphash[char] then
+ return false
+ end
+ end
+ return nbsp(head,current)
+ end,
+
+ [0x00AD] = function(head,current) -- softhyphen
+ return insert_node_after(head,current,languages.explicithyphen(current))
+ end,
+
+ [0x2000] = function(head,current) -- enquad
+ return inject_quad_space(0x2000,head,current,1/2)
+ end,
+
+ [0x2001] = function(head,current) -- emquad
+ return inject_quad_space(0x2001,head,current,1)
+ end,
+
+ [0x2002] = function(head,current) -- enspace
+ return inject_quad_space(0x2002,head,current,1/2)
+ end,
+
+ [0x2003] = function(head,current) -- emspace
+ return inject_quad_space(0x2003,head,current,1)
+ end,
+
+ [0x2004] = function(head,current) -- threeperemspace
+ return inject_quad_space(0x2004,head,current,1/3)
+ end,
+
+ [0x2005] = function(head,current) -- fourperemspace
+ return inject_quad_space(0x2005,head,current,1/4)
+ end,
+
+ [0x2006] = function(head,current) -- sixperemspace
+ return inject_quad_space(0x2006,head,current,1/6)
+ end,
+
+ [0x2007] = function(head,current) -- figurespace
+ return inject_char_space(0x2007,head,current,c_zero)
+ end,
+
+ [0x2008] = function(head,current) -- punctuationspace
+ return inject_char_space(0x2008,head,current,c_period)
+ end,
+
+ [0x2009] = function(head,current) -- breakablethinspace
+ return inject_quad_space(0x2009,head,current,1/8) -- same as next
+ end,
+
+ [0x200A] = function(head,current) -- hairspace
+ return inject_quad_space(0x200A,head,current,1/8) -- same as previous (todo)
+ end,
+
+ [0x200B] = function(head,current) -- zerowidthspace
+ return inject_quad_space(0x200B,head,current,0)
+ end,
+
+ [0x202F] = function(head,current) -- narrownobreakspace
+ return inject_nobreak_space(0x202F,head,current,fontquads[getfont(current)]/8)
+ end,
+
+ [0x205F] = function(head,current) -- math thinspace
+ return inject_nobreak_space(0x205F,head,current,4*fontquads[getfont(current)]/18)
+ end,
+
+ -- The next one is also a bom so maybe only when we have glyphs around it
+
+ -- [0xFEFF] = function(head,current) -- zerowidthnobreakspace
+ -- return head, current
+ -- end,
+
+}
+
+characters.methods = methods
+
+-- function characters.handler(head) -- todo: use traverse_id
+-- local current = head
+-- while current do
+-- local char, id = isglyph(current)
+-- if char then
+-- local next = getnext(current)
+-- local method = methods[char]
+-- if method then
+-- if trace_characters then
+-- report_characters("replacing character %C, description %a",char,lower(chardata[char].description))
+-- end
+-- local h = method(head,current)
+-- if h then
+-- head = remove_node(h,current,true)
+-- end
+-- end
+-- current = next
+-- else
+-- current = getnext(current)
+-- end
+-- end
+-- return head
+-- end
+
+-- this also works ok in math as we run over glyphs and these stay glyphs ... not sure
+-- about scripts and such but that is not important anyway ... some day we can consider
+-- special definitions in math
+
+function characters.handler(head)
+ local wipe = false
+ for current, char in nextchar, head do
+ local method = methods[char]
+ if method then
+ if wipe then
+ head = remove_node(head,wipe,true)
+ wipe = false
+ end
+ if trace_characters then
+ report_characters("replacing character %C, description %a",char,lower(chardata[char].description))
+ end
+ local h = method(head,current)
+ if h then
+ wipe = current
+ end
+ end
+ end
+ if wipe then
+ head = remove_node(head,wipe,true)
+ end
+ return head
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-chr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-chr.mkxl
new file mode 100644
index 00000000000..82c8be0ec34
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-chr.mkxl
@@ -0,0 +1,78 @@
+%D \module
+%D [ file=spac-chr,
+%D version=2011.05.24, % code moved from core-spa.mkiv
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Characters,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Characters}
+
+\unprotect
+
+\registerctxluafile{spac-chr}{autosuffix,optimize}
+
+\definesystemattribute[characters][public]
+
+%D The nobreakspace is special as it needs to keep track of the space being
+%D flexible. Another option is to use space (glue) nodes and tag them as characters
+%D instead. No big deal but takes a moment of coding. So, as a prelude we
+%D tag the nobreakspace only. Interesting is that it also fits better in the
+%D tagging mechanism.
+%D
+%D But we need to do some checking as from then on we no longer can compare
+%D them in a string. So this needs thinking. Not that we can compare the
+%D nobreakspace now anyway.
+
+\pushoverloadmode
+
+%immutable\edef\nobreakspace {\begingroup\setalignstateattribute\normalUchar"00A0\endgroup} % 1 = left
+\immutable\edef\nobreakspace {\normalUchar"00A0} % space
+\immutable\edef\softhyphen {\normalUchar"00AD} % softhyohen
+\immutable\edef\enquad {\normalUchar"2000} % quad/2
+\immutable\edef\emquad {\normalUchar"2001} % quad
+\immutable\edef\twoperemspace {\normalUchar"2002} % quad/2
+% % "2003 % quad == \quad == \hskip\emwidth
+\immutable\edef\threeperemspace {\normalUchar"2004} % quad/3
+\immutable\edef\fourperemspace {\normalUchar"2005} % quad/4
+%immutable\edef\fiveperemspace {\normalUchar"001E} % quad/5 (bonus)
+\immutable\edef\sixperemspace {\normalUchar"2006} % quad/6
+\immutable\edef\figurespace {\normalUchar"2007} % width of zero
+\immutable\edef\punctuationspace {\normalUchar"2008} % width of period
+\immutable\edef\breakablethinspace {\normalUchar"2009} % quad/8
+\immutable\edef\hairspace {\normalUchar"200A} % quad/8
+\immutable\edef\zerowidthspace {\normalUchar"200B} % 0
+\immutable\edef\zerowidthnonjoiner {\normalUchar"200C} % 0
+\immutable\edef\zerowidthjoiner {\normalUchar"200D} % 0
+\immutable\edef\narrownobreakspace {\normalUchar"202F} % quad/8
+%immutable\edef\mediummathspace {\normalUchar"205F} % space/8 (math)
+%immutable\edef\zerowidthnobreakspace{\normalUchar"FEFF}
+%immutable\edef\fiveperemspace {\normalUchar"001E}
+
+\immutable\protected\def\zerowidthnobreakspace{\penalty\plustenthousand\kern\zeropoint}
+\immutable\protected\def\fiveperemspace {\hskip\dimexpr\emwidth/5\relax}
+
+\aliased\let\ideographicspace \enquad
+\aliased\let\ideographichalffillspace \emquad
+
+\immutable\let\zwnj \zerowidthnonjoiner
+\immutable\let\zwj \zerowidthjoiner
+\immutable\let\nbsp \nobreakspace
+
+\popoverloadmode
+
+\immutable\chardef\optionalspace"1F % will be space unless before punctuation
+
+% Shortcuts:
+
+% unexpanded as otherwise we need to intercept / cleanup a lot
+
+\protected\def~{\nobreakspace}
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-def.mkxl
new file mode 100644
index 00000000000..294843cce71
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-def.mkxl
@@ -0,0 +1,91 @@
+%D \module
+%D [ file=spac-def,
+%D version=2009.10.16, % 1997.03.31, was core-spa.tex
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Definitions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Definitions}
+
+%D Ideally these definitions should be moved to where they first appear and this
+%D will happen at some point.
+
+\unprotect
+
+% maybe \everysynchronizeglobalspacing
+% maybe \everysynchronizelocalspacing
+
+\appendtoks
+ \forgetverticalstretch
+ \presetnormallineheight
+ \setnormalbaselines % check if redundant (\forgetverticalstretch does it too)
+ \setstrut % check if redundant (\forgetverticalstretch does it too)
+ \settopskip % factors set in \forgetverticalstretch
+ \setmaxdepth % factors set in \forgetverticalstretch
+ \synchronizeindenting
+ \synchronizeskipamounts
+ \synchronizeblank
+ \synchronizewhitespace
+ \synchronizespacecodes % not needed, frozen factors
+ \setrelativeinterlinespace
+\to \everybodyfont
+
+% why exception
+
+\appendtoks
+ \updateraggedskips % under test
+\to \everyfontswitch
+
+% maybe more
+
+\prependtoks
+ \enforced\let\par\normalpar
+\to \everybeforepagebody % see \fillinline (was endgraf)
+
+% needs checking:
+
+\appendtoks
+ \synchronizespacecodes
+\to \everydefinedfont % not needed, frozen factors
+
+\setupinterlinespace
+ [\c!minheight=\zeropoint, % only special purpose
+ \c!mindepth=\zeropoint, % only special purpose
+ \c!height=.72,
+ \c!depth=.28,
+ \c!top=1.0,
+ \c!bottom=0.4,
+ \c!distance=\onepoint, % \dimexpr\openlineheight/10\relax
+ \c!line=2.8\exheight,
+ \c!stretch=\zerocount,
+ \c!shrink=\zerocount]
+
+\setupblank
+ [\v!big]
+
+\setuptolerance
+ [\v!horizontal,\v!verystrict]
+
+\setuptolerance
+ [\v!vertical,\v!strict]
+
+\setupalign
+ [\v!bottom,
+ \v!width]
+
+\setupspacing
+ [\v!packed]
+
+\indenting
+ [\v!never]
+
+\setupindenting
+ [\v!none]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-flr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-flr.mkxl
new file mode 100644
index 00000000000..3ea90bc2c15
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-flr.mkxl
@@ -0,0 +1,196 @@
+%D \module
+%D [ file=spac-fil,
+%D version=2013.01.13,
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Fillers,
+%D author={Hans Hagen and Wolfgang Schuster},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Fillers}
+
+\unprotect
+
+%D A bit more extensive variant of a prototype posted by Wolfgang to the development
+%D list. Instead of dealing with a few leader types it makes sense to support them
+%D all as well as simple rule fillers. Eventually we can also use in for the
+%D mathfillers. We distinguish between alternatives and with them methods, and a
+%D checker is provided for use in applying e.g.\ fillers in lists.
+
+\installcorenamespace{filler}
+\installcorenamespace{filleralternative}
+\installcorenamespace{fillerleadermethod}
+
+\installcommandhandler \??filler {filler} \??filler
+
+\aliased\let\setupfillers\setupfiller
+
+\permanent\protected\def\checkedfiller#1%
+ {\ifcsname\namedfillerhash{#1}\s!parent\endcsname
+ \filler[#1]%
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi{#1}}
+
+\permanent\tolerant\protected\def\filler[#1]%
+ {\removeunwantedspaces
+ \begingroup
+ \edef\currentfiller{#1}%
+ \usefillerstyleandcolor\c!style\c!color
+ \scratchdimen\fillerparameter\c!leftmargin\relax
+ \ifzeropt\scratchdimen\else
+ \hskip\scratchdimen
+ \fi
+ \fillerparameter\c!left\relax
+ \expandnamespaceparameter\??filleralternative\fillerparameter\c!alternative\s!unknown\relax
+ \fillerparameter\c!right\relax
+ \scratchdimen\fillerparameter\c!rightmargin\relax
+ \ifzeropt\scratchdimen\else
+ \hskip\scratchdimen
+ \fi
+ \endgroup
+ \ignorespaces}
+
+% \definefiller
+% [MyFiller]
+% [offset=.25\emwidth,
+% rightmargindistance=-\rightskip,
+% method=middle]
+%
+% \startitemize[packed,joinedup][rightmargin=5em]
+% \startitem
+% \input sapolsky \fillupto[MyFiller]{RS}
+% \stopitem
+% \stopitemize
+
+\permanent\tolerant\protected\def\fillupto[#1]#:#2%
+ {\removeunwantedspaces
+ \begingroup
+ \edef\currentfiller{#1}%
+ \scratchdimen\dimexpr\fillerparameter\c!rightmargindistance\relax
+ \ifzeropt\scratchdimen\else
+ \parfillskip \scratchdimen\s!plus \plusone\s!fil\relax
+ \fi
+ \filler[#1]%
+ \doifsomething{#2}{\hbox{#2}}%
+ \par
+ \endgroup
+ \ignorespaces}
+
+\setvalue{\??filleralternative\s!unknown}%
+ {}
+
+\setvalue{\??filleralternative\v!symbol}%
+ {\expandnamespaceparameter\??fillerleadermethod\fillerparameter\c!method\v!local
+ \ifdim\fillerparameter\c!offset>\zeropoint
+ \simplealignedspreadbox
+ {2\dimexpr\fillerparameter\c!offset\relax}%
+ {\fillerparameter\c!align}%
+ {\fillerparameter\c!symbol}%
+ \else
+ \simplealignedbox
+ {\fillerparameter\c!width}%
+ {\fillerparameter\c!align}%
+ {\fillerparameter\c!symbol}%
+ \fi
+ \hfill}
+
+\setvalue{\??filleralternative\v!stretch}%
+ {\hfill}
+
+\setvalue{\??filleralternative\v!space}%
+ {\hskip\fillerparameter\c!distance\relax}
+
+\setvalue{\??filleralternative\v!rule}%
+ {\expandnamespaceparameter\??fillerleadermethod\fillerparameter\c!method\v!local
+ \hrule
+ \s!height\fillerparameter\c!height
+ \s!depth \fillerparameter\c!depth
+ \hfill}
+
+\letvalue{\??fillerleadermethod\s!local }\normalleaders % overflow ends up inbetween (current box)
+\letvalue{\??fillerleadermethod\v!global}\normalgleaders % overflow ends up inbetween (outermost box)
+\letvalue{\??fillerleadermethod\v!middle}\normalcleaders % overflow ends up before, after (current box)
+\letvalue{\??fillerleadermethod\v!broad }\normalxleaders % overflow ends up before, inbetween, after (current box)
+
+\setupfillers
+ [\c!width=\emwidth,
+ \c!symbol=.,
+ \c!distance=\emwidth,
+ \c!offset=\zeropoint,
+ \c!align=\v!middle,
+ \c!height=.1\exheight,
+ \c!depth=\zeropoint,
+ \c!leftmargin=\zeropoint,
+ \c!rightmargin=\zeropoint,
+ \c!rightmargindistance=\zeropoint,
+ \c!alternative=\v!symbol,
+ \c!method=\s!local]
+
+\definefiller
+ [\v!sym]
+ [\c!method=\v!global,
+ \c!width=.5\emwidth,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [\v!symbol]
+ [\c!method=\v!global,
+ \c!offset=.125\emwidth,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [\v!rule]
+ [\c!alternative=\v!rule,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [\v!width]
+ [\c!alternative=\v!stretch]
+
+\definefiller
+ [\v!space]
+ [\c!alternative=\v!space,
+ \c!distance=3\emwidth]
+
+% bonus:
+
+\definefiller
+ [dotfill]
+ [\c!symbol=\textperiod,
+ \c!style=\v!normal,
+ \c!method=\v!middle,
+ \c!width=.5\emwidth,
+ \c!leftmargin=.2\emwidth,
+ \c!rightmargin=.2\emwidth]
+
+% If users really want it:
+%
+% \permanent\protected\def\mathdotfill{\cleaders\hbox{$\mathsurround\zeropoint\mkern1.5mu.\mkern1.5mu$}\hfill} % plain
+% \permanent\protected\def\textdotfill{\filler[dotfill]}
+% \permanent\protected\def\dotfill {\mathortext\mathdotfill\textdotfill}
+
+\permanent\protected\def\dotfill{\filler[dotfill]}
+
+% maybe box -> symbol
+
+\protect \endinput
+
+% \definefiller[test-a][alternative=stretch]
+% \definefiller[test-b][alternative=symbol,symbol=!]
+% \definefiller[test-c][alternative=rule,height=.1ex,leftmargin=.5em,rightmargin=.25em]
+
+% \starttext
+% text\filler[test-a]text \par
+% text\filler[test-b]text \par
+% text\filler[test-c]text \par
+% text\checkedfiller{<nothing>}text \par
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-grd.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-grd.mkxl
new file mode 100644
index 00000000000..65739cabea7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-grd.mkxl
@@ -0,0 +1,377 @@
+%D \module
+%D [ file=spac-grd,
+%D version=2009.10.16, % 1998.03.10, was core-grd.tex
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Grid Snapping,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module will be merged into spac-ver.mkiv.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Grid Snapping}
+
+\unprotect
+
+%D A rather crappy macro that we need to avoid and as such it will probably
+%D disappear:
+
+\installcorenamespace{lastnodepusher}
+
+\permanent\let\poplastnode\relax
+
+\permanent\protected\def\pushlastnode
+ {\csname\??lastnodepusher
+ \ifcsname\??lastnodepusher\the\lastnodetype\endcsname
+ \the\lastnodetype
+ \else
+ \s!unknown
+ \fi
+ \endcsname}
+
+\defcsname\??lastnodepusher\number\kernnodecode\endcsname
+ {\enforced\permanent\protected\edef\poplastnode{\kern\the\lastkern\relax}%
+ \kern-\lastkern}
+
+\defcsname\??lastnodepusher\number\gluenodecode\endcsname
+ {\enforced\permanent\protected\edef\poplastnode{\vskip\the\lastskip\relax}%
+ \vskip-\lastskip}
+
+\defcsname\??lastnodepusher\number\penaltynodecode\endcsname
+ {\enforced\permanent\protected\edef\poplastnode{\penalty\the\lastpenalty\relax}%
+ \nobreak}
+
+\defcsname\??lastnodepusher\s!unknown\endcsname
+ {\enforced\permanent\let\poplastnode\relax}
+
+%D Moved from supp-box:
+
+%D \macros
+%D {startbaselinecorrection,baselinecorrection,
+%D showbaselinecorrection,offbaselinecorrection}
+%D
+%D Spacing around ruled boxes can get pretty messed up. The
+%D next macro tries as good as possible to fix this.
+%D
+%D \startbuffer[1]
+%D \startbaselinecorrection
+%D \ruledhbox{Rule Brittanica}
+%D \stopbaselinecorrection
+%D \stopbuffer
+%D
+%D \typebuffer[1]
+%D
+%D The macros put some white space around the box:
+%D
+%D \getbuffer[1]
+%D
+%D A simple alternative is \type {\baselinecorrection}, which
+%D only looks at the previous line.
+%D
+%D \startbuffer[2]
+%D \baselinecorrection
+%D \ruledhbox{Rule Brittanica}
+%D \baselinecorrection
+%D \stopbuffer
+%D
+%D \typebuffer[2]
+%D
+%D This time the last preceding line gets a correction,%
+%D dependant on the depth.
+%D
+%D \getbuffer[2]
+%D
+%D One can make the correction visible by saying \type
+%D {\showbaselinecorrection}. Part of the correction is
+%D calculated from the dimensions of a~(. One can disble the
+%D correction by calling \type {\offbaselinecorrection}.
+%D
+%D When visualize the first example looks like:
+%D
+%D {\showbaselinecorrection\getbuffer[1]}
+%D
+%D and the second one comes out as:
+%D
+%D {\showbaselinecorrection\getbuffer[2]}
+
+% \definecolor[GridLineColor][red]
+% \definecolor[GridTextColor][blue]
+
+\newdimen\d_spac_lines_correction_before
+\newdimen\d_spac_lines_correction_after
+
+\newbox \b_spac_lines_correction_before
+\newbox \b_spac_lines_correction_after
+
+\def\spac_lines_initialize_corrections
+ {\setbox\b_spac_lines_correction_before\hpack{\setstrut\strut}%
+ \setbox\b_spac_lines_correction_after \hbox {(}%
+ \d_spac_lines_correction_before\dimexpr\ht\b_spac_lines_correction_before-\ht\b_spac_lines_correction_after\relax
+ \d_spac_lines_correction_after \dimexpr\dp\b_spac_lines_correction_before-\dp\b_spac_lines_correction_after\relax
+ \ifdim\d_spac_lines_correction_before<\zeropoint\d_spac_lines_correction_before\zeropoint\fi
+ \ifdim\d_spac_lines_correction_after <\zeropoint\d_spac_lines_correction_after \zeropoint\fi}
+
+% experiment, todo: proper mkiv mechanism
+%
+% \input ward \par
+% \startframedtext test \stopframedtext
+% \input ward \par
+% \startlinecorrection \framed{xxx} \stoplinecorrection
+% \input ward \par
+%
+% \setupwhitespace[big]
+%
+% \input ward \par
+% \startframedtext test \stopframedtext
+% \input ward \par
+% \startlinecorrection \framed{xxx} \stoplinecorrection
+% \input ward \par
+
+% to be redone:
+
+\permanent\protected\def\dotopbaselinecorrection{\expandafter\blank\expandafter[\the\d_spac_lines_correction_before]}
+\permanent\protected\def\dobotbaselinecorrection{\expandafter\blank\expandafter[\the\d_spac_lines_correction_after ]}
+
+\permanent\def\showbaselinecorrection
+ {\enforced\permanent\protected\def\dobaselinecorrection % visualization is not watertight!
+ {\bgroup
+ \ifdim\prevdepth>\zeropoint
+ \kern-\prevdepth
+ \fi
+ \setbox\scratchbox\emptyhbox
+ \wd\scratchbox\hsize
+ \dp\scratchbox\strutdp
+ \nointerlineskip
+ \forgetall
+ \ruledvpack{\box\scratchbox}%
+ \egroup
+ \prevdepth\strutdp}%
+ \enforced\permanent\protected\def\dotopbaselinecorrection{\hrule\s!height\d_spac_lines_correction_before}%
+ \enforced\permanent\protected\def\dobotbaselinecorrection{\hrule\s!height\d_spac_lines_correction_after }}
+
+% \def\dobaselinecorrection % beware, this one is redefined below
+% {\ifdim\prevdepth>\zeropoint\kern-\prevdepth\fi
+% \kern\strutdp
+% \prevdepth\strutdp}
+
+\permanent\protected\def\baselinecorrection
+ {\endgraf
+ \ifvmode
+ \ifdim\prevdepth<\maxdimen
+ \ifdim\prevdepth<\zeropoint \else
+ \ifdim\prevdepth<\strutdepth \relax
+ \pushlastnode
+ \dobaselinecorrection
+ \poplastnode
+ \fi
+ \fi
+ \fi
+ \fi}
+
+\permanent\protected\def\pagebaselinecorrection
+ {\ifdim\pagegoal<\maxdimen
+ \ifdim\pagetotal>\lineheight % or \topskip
+ \scratchdimen\pagetotal
+ \advance\scratchdimen\lineheight
+ \ifdim\scratchdimen<\pagegoal
+ \baselinecorrection
+ \fi
+ \fi
+ \fi}
+
+\permanent\protected\def\startbaselinecorrection
+ {\bgroup
+ \enforced\let\stopbaselinecorrection\egroup
+ \ifcase\baselinecorrectionmode
+ \or % normal
+ \baselinecorrection
+ \ifvmode
+ \setbox\scratchbox\vbox\bgroup\ignorespaces
+ \enforced\let\stopbaselinecorrection\donormalstopbaselinecorrection
+ \fi
+ \or % off
+ \or % force
+ \baselinecorrection
+ \ifvmode
+ \setbox\scratchbox\vbox\bgroup\ignorespaces
+ \enforced\let\stopbaselinecorrection\doforcedstopbaselinecorrection
+ \fi
+ \fi}
+
+\permanent\let\stopbaselinecorrection\relax
+
+\permanent\protected\def\donormalstopbaselinecorrection % I have to check columns yet.
+ {\egroup
+ \topbaselinecorrection
+ \box\scratchbox
+ \botbaselinecorrection
+ \egroup}
+
+\permanent\protected\def\doforcedstopbaselinecorrection % I have to check columns yet.
+ {\egroup
+ \forcedtopbaselinecorrection
+ \box\scratchbox
+ \forcedbotbaselinecorrection
+ \egroup}
+
+%D We do a bit more checking than needed. The pageborder check
+%D is not needed, but I want to look the visualization as good
+%D as possible too.
+
+\setnewconstant\baselinecorrectionmode\plusone
+
+\permanent\protected\def\onbaselinecorrection {\baselinecorrectionmode\plusone }
+\permanent\protected\def\offbaselinecorrection {\baselinecorrectionmode\plustwo }
+\permanent\protected\def\forcebaselinecorrection{\baselinecorrectionmode\plusthree}
+
+%D \macros
+%D {topbaselinecorrection,botbaselinecorrection}
+%D
+%D The actual top and bottom corrections are implemented as:
+
+\permanent\protected\def\topbaselinecorrection
+ {\ifvmode \ifdim\pagegoal<\maxdimen
+ \forcedtopbaselinecorrection
+ \fi \fi}
+
+% \permanent\protected\def\forcedtopbaselinecorrection
+% {\ifvmode
+% \bgroup
+% \spac_lines_initialize_corrections
+% \whitespace % no longer ok
+% \nointerlineskip
+% \dotopbaselinecorrection
+% \egroup
+% \fi}
+
+\permanent\protected\def\botbaselinecorrection
+ {\ifvmode
+ \bgroup
+ \spac_lines_initialize_corrections
+ \dobotbaselinecorrection
+ \allowbreak % new, otherwise problems when many in a row
+ \prevdepth\strutdp
+ \egroup
+ \fi}
+
+% nointerlineskip
+%
+% startpacked
+% \startlinecorrection \framed{test} \stoplinecorrection
+% \startlinecorrection \framed{test} \stoplinecorrection
+% \stoppacked
+
+\permanent\protected\def\forcedtopbaselinecorrection
+ {\ifvmode
+ \bgroup
+ \spac_lines_initialize_corrections
+ \vspacing[\v!white]
+ %\nointerlineskip %
+ \dotopbaselinecorrection
+ \egroup
+ \fi}
+
+\aliased\let\forcedbotbaselinecorrection\botbaselinecorrection
+
+\permanent\protected\def\dobaselinecorrection
+ {\ifdim\prevdepth>\zeropoint
+ \vspacing[\the\dimexpr-\prevdepth+\strutdp\relax]%
+ \else
+ \vspacing[\the\dimexpr\strutdp\relax]%
+ \fi
+ \prevdepth\strutdp}
+
+% \permanent\protected\def\dobaselinecorrection
+% {\scratchdimen\dimexpr\ifdim\prevdepth>\zeropoint-\prevdepth+\fi\strutdp\relax
+% \vspacing[\the\scratchdimen]%
+% \prevdepth\strutdp}
+%
+% some day:
+%
+% \permanent\protected\def\dobaselinecorrection
+% {\clf_checkstrutdepth\strutdp}
+%
+% \permanent\protected\def\baselinecorrection
+% {\endgraf
+% \ifvmode
+% \ifdim\prevdepth<\maxdimen
+% \ifdim\prevdepth<\zeropoint \else
+% \ifdim\prevdepth<\strutdepth \relax
+% % works in mvl:
+% % \forcestrutdepth
+% % doesn't work immediately (unless enforced with penalty):
+% % \pushlastnode
+% % \dobaselinecorrection
+% % \poplastnode
+% % works ok:
+% \clf_checkstrutdepth\strutdp
+% \fi
+% \fi
+% \fi
+% \fi}
+
+%D For the moment only with placefloats (should work in mvl and boxes):
+
+\permanent\protected\def\checkprevdepth
+ {\endgraf
+ \ifvmode
+ \ifdim\prevdepth<\maxdimen
+ \ifdim\prevdepth<\zeropoint \else
+ \ifdim\prevdepth<\strutdepth \relax
+ \clf_checkstrutdepth\strutdp
+ \fi
+ \fi
+ \fi
+ \fi}
+
+\aliased\let\normalstartbaselinecorrection\startbaselinecorrection
+
+\pushoverloadmode
+
+\permanent\protected\def\startbaselinecorrection
+ {\ifgridsnapping
+ \snaptogrid[\v!normal]\vbox\bgroup
+ \enforced\let\stopbaselinecorrection\egroup
+ \else
+ \normalstartbaselinecorrection
+ \fi}
+
+\popoverloadmode
+
+% This is new (and experimental) and might replace some of the above. beware it doesn't always work
+% out well, e.g. when used grouped and such (e.g. before display math doesn't work out well).
+
+% \permanent\protected\def\fakenextstrutline
+% {\par
+% \begingroup
+% \reseteverypar
+% \dontleavehmode\hpack to \zeropoint{\page_sides_anchor\hss\strut}% just a tracer
+% \vskip-\parskip
+% \vskip-\struttotal
+% \endgroup}
+
+% \permanent\protected\def\fakenextstrutline
+% {\par
+% \begingroup
+% \reseteverypar
+% \dontleavehmode\hpack{\strut}\par
+% \clf_fakenextstrutline
+% \ifdim\pagetotal>\lineheight
+% \pagetotal\dimexpr\pagetotal-\lineheight\relax
+% \fi
+% \endgroup}
+
+% \permanent\protected\def\fakenextstrutline
+% {\par
+% \begingroup
+% \reseteverypar
+% \forgetall
+% \dontleavehmode\hpack{\strut}\par
+% \clf_removelastline
+% \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-hor.lmt b/Master/texmf-dist/tex/context/base/mkxl/spac-hor.lmt
new file mode 100644
index 00000000000..7db8d4d6f3f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-hor.lmt
@@ -0,0 +1,38 @@
+if not modules then modules = { } end modules ['spac-hor'] = {
+ version = 1.001,
+ comment = "companion to spac-hor.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local chardata = characters.data
+local peekchar = tokens.scanners.peekchar
+local ctx_space = context.space
+
+local can_have_space = table.tohash {
+ "lu", "ll", "lt", "lm", "lo", -- letters
+ -- "mn", "mc", "me", -- marks
+ "nd", "nl", "no", -- numbers
+ "ps", "pi", -- initial
+ -- "pe", "pf", -- final
+ -- "pc", "pd", "po", -- punctuation
+ "sm", "sc", "sk", "so", -- symbols
+ -- "zs", "zl", "zp", -- separators
+ -- "cc", "cf", "cs", "co", "cn", -- others
+}
+
+interfaces.implement {
+ name = "autoinsertnextspace",
+ protected = true,
+ public = true,
+ actions = function()
+ local char = peekchar()
+ if char then
+ local d = chardata[char]
+ if d and can_have_space[d.category] then
+ ctx_space()
+ end
+ end
+ end,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl
new file mode 100644
index 00000000000..f64207a2cb5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-hor.mkxl
@@ -0,0 +1,1218 @@
+%D \module
+%D [ file=spac-hor,
+%D version=2009.10.16, % 1997.03.31, was core-spa.tex
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Horizontal,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Horizontal}
+
+\unprotect
+
+\registerctxluafile{spac-hor}{autosuffix}
+
+\aliased\let\parfillrightskip\parfillskip
+
+\bitwiseflip \normalizelinemode \parindentskipcode
+\bitwiseflip \normalizelinemode \normalizelinecode
+\bitwiseflip \normalizelinemode \clipwidthcode
+
+\let\v_spac_indentation_current\empty % amount/keyword
+
+\newdimen \d_spac_indentation_par
+\parindent\d_spac_indentation_par % for the show
+
+\newconditional\c_spac_indentation_indent_first \settrue\c_spac_indentation_indent_first
+\newconstant \c_spac_indentation_toggle_state
+
+%D After a blank or comparable situation (left side floats) we
+%D need to check if the next paragraph has to be indented.
+
+\permanent\protected\def\presetindentation
+ {\doifoutervmode{\ifconditional\c_spac_indentation_indent_first\else\spac_indentation_variant_no\fi}}
+
+\permanent\protected\def\setupindenting
+ {\doifelsenextoptionalcs\spac_indentation_setup_options\spac_indentation_setup_size}
+
+\permanent\protected\def\spac_indentation_setup_size
+ {\assigndimension\v_spac_indentation_current\d_spac_indentation_par{1\emwidth}{1.5\emwidth}{2\emwidth}%
+ \ifzeropt\parindent\else
+ \parindent\d_spac_indentation_par\relax % new per 2019-04-12 : just in case it has been set beforehand
+ \fi}
+
+\aliased\let\synchronizeindenting\spac_indentation_setup_size
+
+\let\m_spac_indentation_options\empty
+
+\def\spac_indentation_setup_options[#1]%
+ {\edef\m_spac_indentation_options{#1}% comma separated list
+ \ifempty\m_spac_indentation_options \else
+ \spac_indentation_setup_indeed
+ \fi}
+
+\def\spac_indentation_setup_indeed
+ {% not here: \settrue\c_spac_indentation_indent_first
+ % not here: \parindent\d_spac_indentation_par
+ % not here: \c_spac_indentation_toggle_state\zerocount
+ \processcommacommand[\m_spac_indentation_options]\spac_indentation_apply_step_one % catch small, medium, etc
+ \processcommacommand[\m_spac_indentation_options]\spac_indentation_apply_step_two % catch rest
+ \ifzeropt\parindent\else
+ \doifemptytoks\everypar\spac_indentation_set_everypar
+ \fi
+ \ifconditional\c_spac_indentation_indent_first
+ \spac_indentation_variant_yes % better than: \let\checkindentation\relax
+ \else
+ \spac_indentation_variant_no
+ \fi
+ \spac_indentation_check_toggle}
+
+\def\spac_indentation_set_everypar
+ {\everypar{\checkindentation}}
+
+\permanent\protected\def\useindentingparameter#1% faster local variant
+ {\edef\m_spac_indentation_options{#1\c!indenting}%
+ \ifempty\m_spac_indentation_options \else
+ \spac_indentation_setup_indeed
+ \fi}
+
+% \defineindenting[whatever][yes,2cm]
+% %defineindenting[whatever][yes,-2cm]
+%
+% \setupindenting[yes,-2em] \input ward \par
+% \setupindenting[yes,2em] \input ward \par
+% \setupindenting[whatever] \input ward \par
+
+\installcorenamespace {indentingpreset}
+
+\permanent\tolerant\protected\def\defineindenting[#1]#*[#2]% todo: mixes
+ {\ifarguments\else\setevalue{\??indentingpreset#1}{#2}\fi}
+
+\def\spac_indentation_apply_step_one_nested
+ {\expandafter\processcommacommand\expandafter[\lastnamedcs]\spac_indentation_apply_step_one}
+
+\def\spac_indentation_apply_step_two_nested
+ {\expandafter\processcommacommand\expandafter[\lastnamedcs]\spac_indentation_apply_step_two}
+
+\def\spac_indentation_apply_step_one#1%
+ {\ifcsname\??indentingpreset#1\endcsname
+ \spac_indentation_apply_step_one_nested
+ \orelse\ifcsname\??indentingmethod#1\endcsname
+ % case two
+ \else
+ \edef\v_spac_indentation_current{#1}% single entry in list
+ \let\v_spac_indentation_normal\v_spac_indentation_current
+ \spac_indentation_setup_size
+ \fi}
+
+\def\spac_indentation_apply_step_two#1%
+ {\ifcsname\??indentingpreset#1\endcsname
+ \spac_indentation_apply_step_two_nested
+ \orelse\ifcsname\??indentingmethod#1\endcsname
+ \lastnamedcs
+ \else
+ % case one
+ \fi}
+
+\permanent\protected\def\indenting % kind of obsolete
+ {\doifelsenextoptionalcs\spac_indentation_setup_options\relax}
+
+% use \noindentation to suppress next indentation
+
+\installcorenamespace{indentingmethod}
+
+\permanent\protected\def\installindentingmethod#1#2%
+ {\defcsname\??indentingmethod#1\endcsname{#2}}
+
+\installindentingmethod \v!no {\parindent\zeropoint}
+\installindentingmethod \v!not {\parindent\zeropoint}
+
+\installindentingmethod \v!first {\settrue\c_spac_indentation_indent_first}
+\installindentingmethod \v!next {\setfalse\c_spac_indentation_indent_first}
+
+\installindentingmethod \v!yes {\parindent\d_spac_indentation_par\relax} % not \indent !
+\installindentingmethod \v!always{\parindent\d_spac_indentation_par\relax} % not \indent !
+
+\installindentingmethod \v!never {\parindent\zeropoint\relax % no \indent !
+ \c_spac_indentation_toggle_state\zerocount}
+
+\installindentingmethod \v!odd {\c_spac_indentation_toggle_state\plusone}
+\installindentingmethod \v!even {\c_spac_indentation_toggle_state\plustwo}
+
+\installindentingmethod \v!normal{\ifempty\v_spac_indentation_normal\else
+ \let\v_spac_indentation_current\v_spac_indentation_normal
+ \spac_indentation_setup_size
+ \fi}
+
+\installindentingmethod \v!reset {\settrue\c_spac_indentation_indent_first
+ \parindent\zeropoint
+ \c_spac_indentation_toggle_state\zerocount}
+
+\installindentingmethod \v!toggle{\parindent\ifzeropt\parindent
+ \d_spac_indentation_par
+ \else
+ \zeropoint
+ \fi\relax}
+
+\permanent\protected\def\noindenting{\indenting[\v!no, \v!next ]}
+\permanent\protected\def\doindenting{\indenting[\v!yes,\v!first]}
+
+%D Here come the handlers (still rather messy ... we need states).
+
+%newif\ifindentation \indentationtrue % will become a mode
+
+\aliased\let\checkindentation\relax
+
+\installmacrostack\checkindentation
+
+%D Actually we can forget about indent and let everypar insert a kern or so,
+%D but on the other hand it's kind of consistent to keep it and make the
+%D width zero. We can do it in \LUA\ or do it natively (which actually makes
+%D sense.
+
+% \permanent\protected\def\undent
+% {\begingroup
+% % todo: check subtype too
+% \ifnum\lastnodetype=\gluenodecode
+% \unskip % we also need to check for the subtype
+% \orelse\ifnum\lastnodetype=\hlistnodecode
+% \setbox\scratchbox\lastbox % we also need to check for the subtype
+% \else
+% % forget about it
+% \fi
+% \endgroup}
+
+\def\spac_indentation_remove
+ {\ifzeropt\parindent \else
+ \undent
+ \fi}
+
+\def\spac_indentation_kill_indeed
+ {%\global\indentationfalse
+ \spac_indentation_remove}
+
+\permanent\protected\def\spac_indentation_do_toggle_indeed
+ {%\global\indentationfalse
+ \enforced\glet\checkindentation\spac_indentation_no_toggle_indeed
+ \spac_indentation_remove}
+
+\permanent\protected\def\spac_indentation_no_toggle_indeed
+ {%\global\indentationtrue
+ \enforced\glet\checkindentation\spac_indentation_do_toggle_indeed}
+
+\permanent\protected\def\spac_indentation_do_indeed
+ {}%\global\indentationtrue}
+
+\permanent\protected\def\spac_indentation_do_toggle
+ {\enforced\glet\checkindentation\spac_indentation_do_toggle_indeed}
+
+\permanent\protected\def\spac_indentation_no_toggle
+ {\enforced\glet\checkindentation\spac_indentation_no_toggle_indeed}
+
+\permanent\protected\def\spac_indentation_check_toggle
+ {\ifcase\c_spac_indentation_toggle_state
+ % nothing
+ \or
+ \spac_indentation_no_toggle
+ \or
+ \spac_indentation_do_toggle
+ \fi}
+
+\permanent\protected\def\spac_indentation_variant_yes
+ {\enforced\glet\checkindentation\spac_indentation_do_indeed}
+
+\permanent\protected\def\spac_indentation_no_next_check
+ {\spac_indentation_remove
+ \enforced\glet\checkindentation\spac_indentation_do_indeed}
+
+\permanent\protected\def\spac_indentation_variant_no % made global
+ {\ifinpagebody \else
+ %\global\indentationfalse
+ \enforced\glet\checkindentation\spac_indentation_no_next_check
+ \fi}
+
+\permanent\protected\def\nonoindentation % bv bij floats
+ {\ifinpagebody \else
+ %\global\indentationtrue
+ \enforced\glet\checkindentation\spac_indentation_do_indeed
+ \fi}
+
+\permanent\protected\def\spac_indentation_variant_force
+ {\ifvmode \ifzeropt\parindent \else
+ % was : \hskip\parindent
+ % can be: \indent
+ % but we test:
+ \noindent\hskip\parindent % hm, we cannot undent this one
+ \fi \fi}
+
+% public:
+
+\aliased\let\indentation \spac_indentation_variant_force
+\aliased\let\noindentation\spac_indentation_variant_no % public
+\aliased\let\doindentation\spac_indentation_variant_yes % public
+
+\permanent\protected\def\dontrechecknextindentation % public (in macros)
+ {\global\enforced\let\dorechecknextindentation\relax}
+
+\aliased\let\dorechecknextindentation\relax % public (in macros)
+
+\permanent\protected\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
+
+\def\spac_indentation_variant_auto
+ {\global\enforced\let\dorechecknextindentation\spac_indentation_check_next_indentation}
+
+%D This one sets up the local indentation behaviour (i.e. either or not
+%D a next paragraph will be indented).
+
+\installcorenamespace{indentnext}
+
+\permanent\protected\def\checknextindentation[#1]%
+ {\begincsname\??indentnext#1\endcsname}
+
+\permanent\protected\def\useindentnextparameter#1% new, the more efficient variant
+ {\edef\p_indentnext{#1\c!indentnext}%
+ \ifempty\p_indentnext\else
+ \begincsname\??indentnext\p_indentnext\endcsname
+ \fi}
+
+\letcsname\??indentnext \endcsname\donothing
+\letcsname\??indentnext\v!yes \endcsname\spac_indentation_variant_yes
+\letcsname\??indentnext\v!no \endcsname\spac_indentation_variant_no
+\letcsname\??indentnext\v!auto\endcsname\spac_indentation_variant_auto
+
+%D An example of usage:
+%D
+%D \starttyping
+%D \setupindenting[small,yes]
+%D
+%D \setupitemize [indentnext=auto]
+%D \setuptyping [indentnext=auto]
+%D \setupformulas[indentnext=auto]
+%D
+%D \input tufte \startitemize \item itemize \stopitemize
+%D \input tufte \startitemize \item itemize \stopitemize
+%D \input tufte \startitemize \item itemize \stopitemize
+%D
+%D \page
+%D
+%D \input tufte
+%D \starttyping
+%D verbatim
+%D \stoptyping
+%D
+%D \input tufte
+%D \starttyping
+%D verbatim
+%D \stoptyping
+%D
+%D \input tufte
+%D \starttyping
+%D verbatim
+%D \stoptyping
+%D
+%D \page
+%D
+%D \input tufte \startformula a = b \stopformula
+%D \input tufte \startformula a = b \stopformula
+%D \input tufte \startformula a = b \stopformula
+%D \stoptyping
+
+% maybe an everyforgetparindent
+
+\permanent\protected\def\forgetparindent
+ {\settrue\c_spac_indentation_indent_first % recently added
+ \d_spac_indentation_par\zeropoint
+ \parindent\zeropoint
+ \let\v_spac_indentation_current\v!none}
+
+\appendtoks
+ \forgetparindent
+\to \everyforgetall
+
+\permanent\protected\def\forgethorizontalstretch
+ {\emergencystretch\zeropoint}
+
+\appendtoks
+ \forgethorizontalstretch
+\to \everyforgetall % needed in pagebody
+
+%D Helper:
+
+\permanent\protected\def\softbreak
+ {\relax\ifhmode\hskip\parfillskip\break\fi}
+
+%D \macros
+%D {frenchspacing,nonfrenchspacing}
+%D
+%D Somehow \type{\frenchspacing} can lead to hyphenation between dashes so we now
+%D have \type {\newfrenchspacing} (moved from \type {syst-chr}). Maybe it's not
+%D needed any more.
+
+%D Hm ... todo:
+
+\installcorenamespace{spacecodemethod}
+
+\sfcode`\)=\zerocount
+\sfcode`\'=\zerocount
+\sfcode`\]=\zerocount
+
+\def\spac_spacecodes_set_fixed#1%
+ {\sfcode`\.#1\relax \sfcode`\,#1\relax
+ \sfcode`\?#1\relax \sfcode`\!#1\relax
+ \sfcode`\:#1\relax \sfcode`\;#1\relax}
+
+\def\spac_spacecodes_set_stretch
+ {\sfcode`\.3000 \sfcode`\,1250
+ \sfcode`\?3000 \sfcode`\!3000
+ \sfcode`\:2000 \sfcode`\;1500 }
+
+\permanent\protected\def\frenchspacing {\spac_spacecodes_set_fixed\plusthousand}
+\permanent\protected\def\newfrenchspacing{\spac_spacecodes_set_fixed{1050}}
+\permanent\protected\def\nonfrenchspacing{\spac_spacecodes_set_stretch}
+
+\permanent\protected\def\installspacingmethod#1#2{\setvalue{\??spacecodemethod#1}{#2}}
+
+\installspacingmethod \empty {} % keep values
+\installspacingmethod \v!fixed {\frenchspacing } % equal spaces everywhere
+\installspacingmethod \v!packed {\newfrenchspacing} % slighly more after punctuation
+\installspacingmethod \v!broad {\nonfrenchspacing} % more depending on what punctuation
+
+\permanent\tolerant\protected\def\setupspacing[#1]%
+ {\ifarguments\or
+ \begincsname\??spacecodemethod#1\endcsname
+ \fi
+ \updateraggedskips}
+
+%D Here's a tweak .. if needed one can configure it in the configuration
+%D so that initialization happens more efficient.
+%D
+%D \starttyping
+%D \startoverlay
+%D {
+%D \green
+%D \enabledirectives[characters.spaceafteruppercase=normal]%
+%D \vbox{\hsize 5em x. X\par x.\ X\par X. X\par X.\ X\par}
+%D } {
+%D \blue
+%D \enabledirectives[characters.spaceafteruppercase=traditional]%
+%D \vbox{\hsize 5em x. X\par x.\ X\par X. X\par X.\ X\par}
+%D }
+%D \stopoverlay
+%D \stoptyping
+
+% This is not needed, as \updateraggedskips is taking care of it:
+
+\permanent\protected\def\synchronizespacecodes{\updateraggedskips}
+
+% \dorecurse{100}{\recurselevel\spacefactor 800 \space} \par
+% \dorecurse{100}{\recurselevel\spacefactor1200 \space} \par
+% \dorecurse{100}{\recurselevel\spacefactor 800 \normalspaceprimitive} \par
+% \dorecurse{100}{\recurselevel\spacefactor1200 \normalspaceprimitive} \par
+
+% When we don't add the % here, we effectively get \<endlinechar> and
+% since we have by default \def\^^M{\ } we get into a loop.
+
+\aliased\let\normalspaceprimitive=\ % space-comment is really needed
+
+%D As the \type{\ } is convenient in:
+%D
+%D \starttyping
+%D \TEX\space x\crlf
+%D \TEX\ x\crlf
+%D \TEX{} x\crlf
+%D \stoptyping
+%D
+%D from now on we treat it as a normal space and not as a space with \type
+%D {sfcode} 1000.
+
+% \permanent\protected\def\specialspaceprimitive
+% {\begingroup
+% % so, no fancy extra spacing after: foo i.e.\ bar
+% \nonfrenchspacing\normalspaceprimitive
+% \endgroup}
+
+\permanent\protected\def\specialspaceprimitive
+ {% is a current state, set explicitly or when a character is appended
+ \ifhmode
+ \spacefactor\plusthousand
+ \else
+ \dontleavehmode
+ \fi
+ \normalspaceprimitive}
+
+% \permanent\protected\def\normalnotobeyedspace
+% {\mathortext\normalspaceprimitive\specialspaceprimitive} % no \dontleavehmode\space (else no frenchspacing)
+
+\permanent\protected\def\normalnotobeyedspace
+ {\ifmmode\normalspaceprimitive\else\specialspaceprimitive\fi} % no \dontleavehmode\space (else no frenchspacing)
+
+\pushoverloadmode
+
+\overloaded\let\ =\normalnotobeyedspace % so we redefine the primitive!
+
+\popoverloadmode
+
+% Because I strip spaces at the end of lines (in the editor) we need a bit of
+% a trick to define slash+newline, so \space and \<newline> are the same
+
+% We need to be careful with \ and \space and the definition of ~ which uses \ as
+% we need to associate unicode spacing with it. There is some messy aspect that
+% I forgot to note down so I will revision the \ once I ran into it again.
+
+% \ruledhbox spread 10pt {\frenchspacing xx xx\ X}
+% \ruledhbox spread 10pt {\nonfrenchspacing xx xx\ X}
+% \ruledhbox spread 10pt {\frenchspacing xx xx X}
+% \ruledhbox spread 10pt {\nonfrenchspacing xx xx X}
+% \ruledhbox spread 10pt {\frenchspacing xx xx~X}
+% \ruledhbox spread 10pt {\nonfrenchspacing xx xx~X}
+
+% \ruledhbox spread 10pt {\frenchspacing xx dr.\ X}
+% \ruledhbox spread 10pt {\nonfrenchspacing xx dr.\ X}
+% \ruledhbox spread 10pt {\frenchspacing xx dr. X}
+% \ruledhbox spread 10pt {\nonfrenchspacing xx dr. X}
+% \ruledhbox spread 10pt {\frenchspacing xx dr.~X}
+% \ruledhbox spread 10pt {\nonfrenchspacing xx dr.~X}
+
+\permanent\protected\def\nonbreakablespace{\penalty\plustenthousand\normalspaceprimitive} % no space in math
+
+\letcatcodecommand \ctxcatcodes \tildeasciicode \nonbreakablespace % overloaded later
+
+% \def\space { }
+\permanent\protected\def\removelastspace{\ifhmode\unskip\fi}
+\permanent\protected\def\nospace {\removelastspace\ignorespaces}
+
+\ifdefined\nospaces
+ \permanent\protected\def\nospacing{\normalnospaces\plusone}
+ \permanent\protected\def\dospacing{\normalnospaces\zerocount}
+\else
+ \permanent\protected\def\nospacing{\spaceskip\scaledpoint \xspaceskip\zeropoint}
+ \permanent\protected\def\dospacing{\spaceskip\currentspaceskip\xspaceskip\zeropoint} % what
+\fi
+
+\ifdefined\softhyphen \else
+ \let\softhyphen\explicitdiscretionary
+\fi
+
+% todo:
+
+\cldcontext{"\string\\protected\string\\def\string\\\string\n{\string\\space}"}
+%cldcontext{"\string\\let\string\\\string\n=\string\\space"}
+
+% in tables we need:
+%
+% \def\fixedspace {\hskip.5em\relax}
+%
+% but, since not all fonts have .5em digits:
+
+\permanent\protected\def\fixedspace
+ {\setbox\scratchbox\hpack{\mathortext{0}{0}}% was \hbox
+ \hskip\wd\scratchbox\relax}
+
+\permanent\protected\def\fixedspaces
+ {\letcatcodecommand \ctxcatcodes \tildeasciicode\fixedspace
+ \enforced\let~\fixedspace} % we need to renew it
+
+\appendtoks
+ \enforced\let~\space
+ \enforced\let\ \space
+\to \everysimplifycommands
+
+\newsignal\d_spac_keep_unwanted_space_signal
+
+% \parindentmode\plusone
+
+\permanent\protected\def\keepunwantedspaces
+ {\ifhmode
+ \ifdim\lastskip=\d_spac_keep_unwanted_space_signal\else
+ \hskip\d_spac_keep_unwanted_space_signal\relax
+ \fi
+ \fi}
+
+\permanent\protected\def\removeunwantedspaces
+ {\ifhmode
+ \expandafter \spac_helpers_remove_unwantedspace
+ \fi}
+
+\def\spac_helpers_remove_unwantedspace
+ {\ifnum\lastnodetype=\gluenodecode\relax
+ \ifnum\lastnodesubtype=\indentskipsubtypecode\relax
+ % keep parindent
+ \orelse\ifdim\lastskip=\d_spac_keep_unwanted_space_signal\relax
+ \unskip
+ \else
+ \unskip
+ \doubleexpandafter\spac_helpers_remove_unwantedspace
+ \fi
+ \fi}
+
+\permanent\protected\def\onlynonbreakablespace
+ {\ifdim\lastskip=\interwordspace
+ \unskip
+ \nonbreakablespace
+ \fi
+ \ignorespaces}
+
+% \startbuffer
+% \startlines \tt \fixedspaces
+% 0~1~~2~~~3~~~~4~~~~~5
+% 0~~~~~~~~~~~~~~~~~~~5
+% $0~1~~2~~~3~~~~4~~~~~5$
+% $0~~~~~~~~~~~~~~~~~~~5$
+% \stoplines
+%
+% \starttabulate[|~|]
+% \NC 0~1~~2~~~3~~~~4~~~~~5 \NC \NR \NC 0~~~~~~~~~~~~~~~~~~~5 \NC \NR
+% \NC $0~1~~2~~~3~~~~4~~~~~5$ \NC \NR \NC $0~~~~~~~~~~~~~~~~~~~5$ \NC \NR
+% \stoptabulate
+%
+% \starttable[||]
+% \NC 0~1~~2~~~3~~~~4~~~~~5 \NC \AR \NC 0~~~~~~~~~~~~~~~~~~~5 \NC \AR
+% \NC $0~1~~2~~~3~~~~4~~~~~5$ \NC \AR \NC $0~~~~~~~~~~~~~~~~~~~5$ \NC \AR
+% \stoptable
+% \stopbuffer
+%
+% \setupbodyfont[cmr] \getbuffer
+% \setupbodyfont[lbr] \getbuffer
+
+%D A couple of plain macros:
+
+\ifdefined\enspace \else \permanent\protected\def\enspace{\kern .5\emwidth} \fi
+\ifdefined\quad \else \permanent\protected\def\quad {\hskip \emwidth\relax} \fi
+\ifdefined\enskip \else \permanent\protected\def\enskip {\hskip.5\emwidth\relax} \fi
+\ifdefined\qquad \else \permanent\protected\def\qquad {\hskip 2\emwidth\relax} \fi
+
+\permanent\protected\def\negenspace{\kern-.5\emwidth}
+\permanent\protected\def\negemspace{\kern- \emwidth}
+
+\aliased\let\emspace\quad
+
+\permanent\protected\def\charspace{ } % the unexpandable \space (as space can also be delimiter for numbers)
+
+\permanent\tolerant\protected\def\quads[#1]% we do robust checking
+ {\dontleavehmode
+ \begingroup
+ %\scratchcounter\ifparameter#1\or#1\else\plusthree\fi
+ \scratchcounter\ifchknum#1\or#1\else\plusthree\fi
+ \zwj\dorecurse\scratchcounter{\hskip\emwidth\zwj}%
+ \endgroup}
+
+% Suggested by GB (not the name) so we keep it for sentimental reasons:
+
+\permanent\protected\def\rapfillskip{.5\hsize plus .092\hsize minus .5\hsize} % D.A.'s value
+
+% Bovendien definieren we enkele extra \fill's:
+
+\newskip\s_spac_fil \s_spac_fil = \zeropoint \s!plus 1\s!fil \relax
+\newskip\s_spac_fill \s_spac_fill = \zeropoint \s!plus 1\s!fill \relax
+\newskip\s_spac_filll \s_spac_filll = \zeropoint \s!plus 1\s!filll\relax
+
+\newskip\s_spac_neg_fil \s_spac_neg_fil = \zeropoint \s!plus-1\s!fil \relax
+\newskip\s_spac_neg_fill \s_spac_neg_fill = \zeropoint \s!plus-1\s!fill \relax
+\newskip\s_spac_neg_filll \s_spac_neg_filll = \zeropoint \s!plus-1\s!filll\relax
+
+\permanent\protected\def\hfilll {\hskip\s_spac_filll\relax}
+\permanent\protected\def\vfilll {\vskip\s_spac_filll\relax}
+
+\permanent\protected\def\hfillneg {\hskip\s_spac_neg_fill \relax}
+\permanent\protected\def\hfilllneg{\hskip\s_spac_neg_filll\relax}
+\permanent\protected\def\vfillneg {\vskip\s_spac_neg_fill \relax}
+\permanent\protected\def\vfilllneg{\vskip\s_spac_neg_filll\relax}
+
+\permanent\protected\def\tfskip {\begingroup\tf\hskip\emwidth\endgroup}
+\permanent\protected\def\dotfskip#1{\begingroup\tf\hskip #1\endgroup} % used elsewhere
+
+% maybe we should hash the analysis
+
+\installcorenamespace{narrower}
+\installcorenamespace{narrowermethod}
+
+\newskip\s_spac_narrower_left
+\newskip\s_spac_narrower_right
+\newskip\s_spac_narrower_middle
+
+\installcommandhandler \??narrower {narrower} \??narrower
+
+\setupnarrower
+ [\c!before=\endgraf,
+ \c!after=\endgraf,
+ \c!left=1.5\emwidth,
+ \c!right=1.5\emwidth,
+ \c!middle=1.5\emwidth,
+ \c!default=\v!middle]
+
+\appendtoks
+ \frozen\instance\protected\edefcsname\e!start\currentnarrower\endcsname{\spac_narrower_start[\currentnarrower]}%
+ \frozen\instance\protected\edefcsname\e!stop \currentnarrower\endcsname{\spac_narrower_stop}%
+\to \everydefinenarrower
+
+\permanent\protected\def\installnarrowermethod#1#2%
+ {\defcsname\??narrowermethod#1\endcsname{#2}}
+
+\protected\def\spac_narrower_method_analyze#1%
+ {\ifcsname\??narrowermethod#1\endcsname
+ \lastnamedcs
+ \else
+ \global\advance\s_spac_narrower_middle#1\relax
+ \fi}
+
+\def\spac_narrower_initialize[#1]% hm, can be dorepeat directly
+ {\dorepeatwithcommand[#1]\spac_narrower_method_analyze}
+
+\installnarrowermethod \v!left {\global\advance\s_spac_narrower_left \narrowerparameter\c!left \relax}
+\installnarrowermethod \v!middle {\global\advance\s_spac_narrower_middle \narrowerparameter\c!middle\relax}
+\installnarrowermethod \v!right {\global\advance\s_spac_narrower_right \narrowerparameter\c!right \relax}
+\installnarrowermethod{-\v!left }{\global\advance\s_spac_narrower_left -\narrowerparameter\c!left \relax}
+\installnarrowermethod{-\v!middle}{\global\advance\s_spac_narrower_middle-\narrowerparameter\c!middle\relax}
+\installnarrowermethod{-\v!right }{\global\advance\s_spac_narrower_right -\narrowerparameter\c!right \relax}
+\installnarrowermethod \v!reset {\global \s_spac_narrower_left \zeropoint
+ \global \s_spac_narrower_middle \zeropoint
+ \global \s_spac_narrower_right \zeropoint\relax}
+\installnarrowermethod \v!none {}
+\installnarrowermethod \v!reverse {} % never seen
+
+\permanent\overloaded\tolerant\protected\def\spac_narrower_start[#1]#*[#2]%
+ {\begingroup
+ \edef\currentnarrower{#1}%
+ \ifparameter#2\or
+ \spac_narrower_start_apply{#2}%
+ \else
+ \spac_narrower_start_apply{\narrowerparameter\v!default}%
+ \fi}
+
+\newskip \s_spac_narrower_left_last
+\newskip \s_spac_narrower_right_last
+\newconditional\s_spac_narrower_last_swap
+
+\def\spac_narrower_start_apply#1%
+ {\narrowerparameter\c!before
+ \global\s_spac_narrower_left \zeropoint
+ \global\s_spac_narrower_right \zeropoint
+ \global\s_spac_narrower_middle\zeropoint
+ \edef\scratchstringone{#1}%
+ \ifx\scratchstringone\v!reverse
+ \ifconditional\s_spac_narrower_last_swap
+ \frozen\leftskip \s_spac_narrower_right_last
+ \frozen\rightskip\s_spac_narrower_left_last
+ \setfalse\s_spac_narrower_last_swap
+ \else
+ \frozen\leftskip \s_spac_narrower_left_last
+ \frozen\rightskip\s_spac_narrower_right_last
+ \settrue\s_spac_narrower_last_swap
+ \fi
+ \else
+ \normalexpanded{\processcommalistwithparameters[\scratchstringone]}\spac_narrower_initialize
+ \frozen\advance\leftskip \dimexpr\s_spac_narrower_left +\s_spac_narrower_middle\relax
+ \frozen\advance\rightskip\dimexpr\s_spac_narrower_right+\s_spac_narrower_middle\relax
+ \fi
+ \seteffectivehsize}
+
+\permanent\protected\def\spac_narrower_stop
+ {\narrowerparameter\c!after
+ \normalexpanded{%
+ \endgroup
+ \s_spac_narrower_left_last \the\leftskip \relax
+ \s_spac_narrower_right_last\the\rightskip\relax
+ \ifconditional\s_spac_narrower_last_swap
+ \setfalse\s_spac_narrower_last_swap
+ \else
+ \settrue\s_spac_narrower_last_swap
+ \fi
+ }}
+
+\permanent\tolerant\protected\def\startnarrower[#1]%
+ {\begingroup
+ \let\currentnarrower\empty
+ \ifparameter#1\or
+ \spac_narrower_start_apply{#1}%
+ \else
+ \spac_narrower_start_apply{\narrowerparameter\v!default}%
+ \fi}
+
+\aliased\let\stopnarrower\spac_narrower_stop
+
+\permanent\tolerant\protected\def\startnarrow[#1]#*[#2]% current how
+ {\begingroup
+ \ifnum\lastarguments=\plustwo
+ \expandafter\spac_narrower_start_named_two
+ \else
+ \expandafter\spac_narrower_start_named_one
+ \fi[#1][#2]}
+
+\def\spac_narrower_start_named_one[#1]%
+ {\doifelseassignment{#1}\spac_narrower_start_named_one_yes\spac_narrower_start_named_one_nop[#1]}
+
+\def\spac_narrower_start_named_one_yes[#1][#2]% [settings] []
+ {\setupcurrentnarrower[#1]%
+ \spac_narrower_start_apply{\narrowerparameter\v!default}}
+
+\def\spac_narrower_start_named_one_nop[#1][#2]% [tag] []
+ {\edef\currentnarrower{#1}%
+ \spac_narrower_start_apply{\narrowerparameter\v!default}}
+
+\def\spac_narrower_start_named_two[#1]%
+ {\doifelseassignment{#1}\spac_narrower_start_named_settings_how\spac_narrower_start_named_tag_unknown[#1]}
+
+\def\spac_narrower_start_named_settings_how[#1][#2]% [settings] [how]
+ {\setupcurrentnarrower[#1]%
+ \spac_narrower_start_apply{#2}}
+
+\def\spac_narrower_start_named_tag_unknown[#1][#2]% [tag] [...]
+ {\doifelseassignment{#2}\spac_narrower_start_named_tag_settings\spac_narrower_start_named_tag_how[#1][#2]}
+
+\def\spac_narrower_start_named_tag_settings[#1][#2]% [tag] [settings]
+ {\edef\currentnarrower{#1}%
+ \setupcurrentnarrower[#2]%
+ \spac_narrower_start_apply{\narrowerparameter\v!default}}
+
+\def\spac_narrower_start_named_tag_how[#1][#2]% [tag] [how]
+ {\edef\currentnarrower{#1}%
+ \spac_narrower_start_apply{#2}}
+
+\aliased\let\stopnarrow\spac_narrower_stop
+
+\newdimen\d_spac_effective_hsize \permanent\protected\def\effectivehsize {\hsize}
+\newdimen\d_spac_effective_leftskip \permanent\protected\def\effectiveleftskip {\dimexpr\leftskip \relax}
+\newdimen\d_spac_effective_rightskip \permanent\protected\def\effectiverightskip{\dimexpr\rightskip\relax}
+
+\permanent\protected\def\seteffectivehsize
+ {\setlocalhsize
+ \d_spac_effective_hsize \localhsize
+ \d_spac_effective_leftskip 1\leftskip
+ \d_spac_effective_rightskip1\rightskip
+ \enforced\let\effectivehsize \d_spac_effective_hsize
+ \enforced\let\effectiveleftskip \d_spac_effective_leftskip
+ \enforced\let\effectiverightskip\d_spac_effective_rightskip}
+
+\installcorenamespace{skipadaptionleft}
+\installcorenamespace{skipadaptionright}
+
+\newskip\leftskipadaption
+\newskip\rightskipadaption
+
+\defcsname\??skipadaptionleft \v!yes\endcsname{\ifzeropt\d_spac_indentation_par\narrowerparameter\c!left\else\d_spac_indentation_par\fi}
+\letcsname\??skipadaptionleft \v!no \endcsname\zeropoint
+\letcsname\??skipadaptionleft \empty\endcsname\zeropoint
+\defcsname\??skipadaptionright\v!yes\endcsname{\narrowerparameter\c!right}
+\letcsname\??skipadaptionright\v!no \endcsname\zeropoint
+\letcsname\??skipadaptionright\empty\endcsname\zeropoint
+
+\letcsname\??skipadaptionleft \v!standard\expandafter\endcsname\csname\??skipadaptionleft \v!yes\endcsname
+\letcsname\??skipadaptionright\v!standard\expandafter\endcsname\csname\??skipadaptionright\v!yes\endcsname
+
+\permanent\protected\def\dosetleftskipadaption #1{\leftskipadaption \ifcsname\??skipadaptionleft #1\endcsname\lastnamedcs\else#1\fi\relax}
+\permanent\protected\def\dosetrightskipadaption#1{\rightskipadaption\ifcsname\??skipadaptionright#1\endcsname\lastnamedcs\else#1\fi\relax}
+
+\permanent\protected\def\doadaptleftskip #1{\normalexpanded{\dosetleftskipadaption {#1}}\permanent\advance\leftskip \leftskipadaption }
+\permanent\protected\def\doadaptrightskip#1{\normalexpanded{\dosetrightskipadaption{#1}}\permanent\advance\rightskip\rightskipadaption}
+
+\permanent\protected\def\forgetbothskips
+ {\leftskip\zeropoint
+ \rightskip\zeropoint
+ \relax}
+
+\appendtoks
+ \forgetbothskips
+\to \everyforgetall
+
+% in spac-ver.mkiv
+%
+% \protected\def\forgetparskip
+% {\s_spac_whitespace_parskip\zeropoint
+% \parskip\zeropoint
+% \let\v_spac_whitespace_current\v!none}
+%
+% \appendtoks
+% \forgetparskip
+% \to \everyforgetall
+
+%D Tolerance (can also be set with align):
+
+\installcorenamespace{tolerancemethods}
+
+\mutable\let\bottomtolerance\empty % why not zero (not used annyway, but for now we keep it)
+
+\permanent\protected\def\installtolerancemethod#1#2#3%
+ {\defcsname\??tolerancemethods#1:#2\endcsname{#3}}
+
+\installtolerancemethod \v!vertical \v!verystrict {\let\bottomtolerance\empty} % why not zero
+\installtolerancemethod \v!vertical \v!strict {\def\bottomtolerance{.050}}
+\installtolerancemethod \v!vertical \v!tolerant {\def\bottomtolerance{.075}}
+\installtolerancemethod \v!vertical \v!verytolerant {\def\bottomtolerance{.100}}
+
+\installtolerancemethod \v!horizontal \v!stretch {\emergencystretch\bodyfontsize\relax}
+\installtolerancemethod \v!horizontal \v!space {\spaceskip.5em\s!plus.25em\s!minus.25em\relax}
+\installtolerancemethod \v!horizontal \v!verystrict {\tolerance\plustwohundred}
+\installtolerancemethod \v!horizontal \v!strict {\tolerance1500 }
+\installtolerancemethod \v!horizontal \v!tolerant {\tolerance3000 }
+\installtolerancemethod \v!horizontal \v!verytolerant {\tolerance4500 }
+
+\appendetoks
+ \pretolerance\plushundred
+ \tolerance \plustwohundred
+\to\everyforgetall
+
+\def\spac_tolerances_step_vertical #1{\csname\??tolerancemethods\v!vertical :#1\endcsname}
+\def\spac_tolerances_step_horizontal#1{\csname\??tolerancemethods\v!horizontal:#1\endcsname}
+
+\permanent\tolerant\protected\def\setuptolerance[#1]%
+ {\ifarguments\or
+ \doifelseinset\v!vertical{#1}%
+ {\processcommacommand[#1]\spac_tolerances_step_vertical }
+ {\processcommacommand[#1]\spac_tolerances_step_horizontal}%
+ \fi}
+
+% %D \macros
+% %D {pushindentation,popindentation}
+% %D
+% %D The pushing and popping is done by:
+%
+% \newbox\b_spac_indentations_a
+% \newbox\b_spac_indentations_b
+%
+% \permanent\protected\def\pushindentation
+% {\begingroup
+% \ifhmode
+% \unskip
+% \setbox\b_spac_indentations_a\lastbox % get \strut if present
+% \unskip
+% \setbox\b_spac_indentations_b\lastbox % get \indent generated box
+% \unskip
+% \else
+% \dontleavehmode % was \hskip\zeropoint % switch to horizontal mode
+% \unskip
+% \setbox\b_spac_indentations_a\lastbox % get \indent generated box
+% \setbox\b_spac_indentations_b\emptybox
+% \fi}
+%
+% \permanent\protected\def\popindentation
+% {\box\b_spac_indentations_b
+% \box\b_spac_indentations_a
+% \endgroup}
+
+%D The only complication lays in \type{\strut}. In \PLAIN\ \TEX\ a \type{\strut} is
+%D defined as:
+%D
+%D \starttyping
+%D \def\strut%
+%D {\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
+%D \stoptyping
+%D
+%D But what is a \type {\strut}? Normally it's a rule of width zero, but when made
+%D visual, it's a rule and a negative skip. The mechanism for putting things in the
+%D margins described here cannot handle this situation very well. One characteristic
+%D of \type {\strut} is that the \type {\unhcopy} results in entering horizontal
+%D mode, which in return leads to some indentation.
+%D
+%D To serve our purpose a bit better, the macro \type {\strut} can be redefined as:
+%D \starttyping
+%D \def\strut
+%D {\relax\ifmmode\else\hskip0pt\fi\copy\strutbox}
+%D \stoptyping
+%D
+%D Or more compatible:
+%D
+%D \starttyping
+%D \def\strut
+%D {\relax\ifmmode
+%D \copy\strutbox
+%D \else
+%D \bgroup\setbox\strutbox=\hbox{\box\strutbox}\unhcopy\strutbox\egroup
+%D \fi}
+%D \stoptyping
+%D
+%D In \CONTEXT\ however we save some processing time by putting an extra \type
+%D {\hbox} around the \type {\strutbox}.
+%D
+%D \starttyping
+%D % \setuplayout[gridgrid=yes] \showgrid
+%D
+%D \startbuffer
+%D test 1\crlf
+%D test 2\crlf
+%D
+%D \crlf test 3
+%D
+%D test 4\crlf
+%D test 5
+%D
+%D \crlf
+%D \crlf
+%D \crlf
+%D test 6
+%D \stopbuffer
+%D
+%D \hbox
+%D {\hsize5em
+%D \ruledvtop{\getbuffer}\enspace
+%D \ruledvtop{\showstruts\getbuffer}\enspace
+%D \hsize15em \setuptyping[before=,after=]%
+%D \ruledvtop{\typebuffer}}
+%D \stoptyping
+
+\permanent\protected\def\justonespace{\removeunwantedspaces\space}
+%permanent\protected\def\justaperiod {\removeunwantedspaces.}
+%permanent\protected\def\justacomma {\removeunwantedspaces,}
+
+\installcorenamespace{hspace}
+
+\permanent\protected\def\ignorecrlf
+ {\enforced\let\crlf\justonespace
+ \enforced\let\\\crlf}
+
+\permanent\tolerant\protected\def\definehspace[#1]#*[#2]#*[#3]% #1 = optional namespace
+ {\ifparameter#3\or
+ \defcsname\??hspace#1:#2\endcsname{#3}%
+ \else
+ \defcsname\??hspace :#1\endcsname{#2}%
+ \fi}
+
+\permanent\tolerant\protected\def\hspace[#1]#*[#2]%
+ {\ifhmode
+ \removeunwantedspaces
+ \hskip % always a skip even when 0pt
+ \ifparameter#2\or
+ \hspaceamount{#1}{#2}%
+ \orelse\ifparameter#1\or
+ \hspaceamount\empty{#1}%
+ \else
+ \hspaceamount\empty\s!default
+ \fi
+ \relax
+ \expandafter\ignorespaces
+ \fi}
+
+\permanent\overloaded\def\hspaceamount #1#2{\dimexpr\ifcsname\??hspace#1:#2\endcsname\lastnamedcs\else\zeropoint\fi\relax}
+\permanent\overloaded\def\directhspaceamount #1{\dimexpr\ifcsname\??hspace :#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
+
+% no installhspace here (this is already an old command)
+
+\definehspace [\v!small] [.25\emspaceamount]
+\definehspace [\v!medium] [.5\emspaceamount]
+\definehspace [\v!big] [1\emspaceamount]
+\definehspace [\v!normal] [1\spaceamount]
+\definehspace [\v!default] [\spaceamount]
+\definehspace [\v!none] [\zeropoint]
+
+%D Taken from Taco's math module (cq. \AMS\ macros), but
+%D adapted to \type {\hspace}:
+
+\permanent\protected\def\textormathspace #1#2#3{\ifmmode\mskip#1#2\else\kern #1\hspaceamount\empty{#3}\fi\relax}
+\permanent\protected\def\textormathspacecommand #1#2#3{\ifmmode\mskip#1#2\else#3\fi\relax}
+\permanent\protected\def\breakabletextormathspace#1#2#3{\ifmmode\mskip#1#2\else\hskip#1\hspaceamount\empty{#3}\fi\relax}
+
+\overloaded\permanent\protected \def\hairspace {\textormathspace+\hairmuskip{.5}}
+\overloaded\permanent\protected \def\thinspace {\textormathspace+\thinmuskip 1}
+%overloaded\permanent\protected \def\medspace {\textormathspace+\medmuskip 2} % 4/18 em
+\overloaded\permanent\protected \def\thickspace {\textormathspace+\thickmuskip3}
+\overloaded\permanent\protected \def\neghairspace {\textormathspace-\thinmuskip{.5}}
+\overloaded\permanent\protected \def\negthinspace {\textormathspace-\thinmuskip 1}
+\overloaded\permanent\protected \def\negmedspace {\textormathspace-\medmuskip 2}
+\overloaded\permanent\protected \def\negthickspace{\textormathspace-\thickmuskip3}
+\overloaded\permanent\protected\edef\medspace {\textormathspacecommand+\medmuskip{\Uchar"205F}}
+
+% needed for unicode:
+
+% \protected\def\breakablethinspace {\breakabletextormathspace+\thinmuskip1}
+% \protected\def\twoperemspace {\hskip\dimexpr\emwidth/2\relax} % == \enspace
+% \protected\def\threeperemspace {\hskip\dimexpr\emwidth/3\relax}
+% \protected\def\fourperemspace {\hskip\dimexpr\emwidth/4\relax}
+% \protected\def\fiveperemspace {\hskip\dimexpr\emwidth/5\relax} % goodie
+% \protected\def\sixperemspace {\hskip\dimexpr\emwidth/6\relax}
+% \protected\def\figurespace {\begingroup\setbox\scratchbox\hbox{0}\hskip\wd\scratchbox\endgroup} % there is a command for this
+% \protected\def\punctuationspace {\begingroup\setbox\scratchbox\hbox{.}\hskip\wd\scratchbox\endgroup}
+% \protected\def\ideographicspace {\hskip\dimexpr\emwidth/1\relax}
+% \protected\def\ideographichalffillspace{\hskip\dimexpr\emwidth/2\relax}
+% \protected\def\nobreakspace {\penalty\plustenthousand\kern\interwordspace}
+% \protected\def\narrownobreakspace {\penalty\plustenthousand\thinspace}
+% \protected\def\zerowidthnobreakspace {\penalty\plustenthousand\kern\zeropoint}
+% \protected\def\zerowidthspace {\hskip\zeropoint}
+
+\definehspace[.5][.1250\emwidth] % hair
+\definehspace[1] [.1667\emwidth] % thin
+\definehspace[2] [.2222\emwidth] % med
+\definehspace[3] [.2777\emwidth] % thick
+
+\suggestedalias \, \thinspace
+\suggestedalias \: \medspace
+\suggestedalias \; \thickspace
+\suggestedalias \! \negthinspace
+
+% plain ...
+%
+% \ifdefined\> \else \protected\def\>{\mskip \medmuskip } \fi
+% \ifdefined\* \else \protected\def\*{\discretionary{\thinspace\the\textfont2\char2}{}{}} \fi
+
+\permanent\def\flexiblespaceamount#1#2#3%
+ {#1\interwordspace
+ \s!plus#2\interwordstretch
+ \s!minus#3\interwordshrink}
+
+\permanent\def\fixedspaceamount#1%
+ {#1\interwordspace}
+
+% moved from page-lin
+%
+% the following code is used in startlines\stoplines
+%
+% do we need \normalspaceprimitive here?
+
+\installcorenamespace{spacemethods}
+
+\permanent\protected\def\installspacemethod#1#2% needs to set \obeyedspace
+ {\defcsname\??spacemethods#1\endcsname{#2}}
+
+\permanent\def\activatespacehandler#1%
+ {\csname\??spacemethods\ifcsname\??spacemethods#1\endcsname#1\else\v!off\fi\endcsname}
+
+\permanent\protected\def\spac_spaces_checked_control{\mathortext\normalspace{\dontleavehmode{\tt\controlspace}}}%
+\permanent\protected\def\spac_spaces_checked_normal {\mathortext\normalspace{\dontleavehmode\normalspace}}%
+\permanent\protected\def\spac_spaces_checked_fixed {\mathortext\normalspace{\dontleavehmode\fixedspace}}%
+
+% hm, order matters when we \let in \obeyspaces
+
+\installspacemethod \v!on
+ {\obeyspaces
+ \enforced\let\obeyedspace\spac_spaces_checked_control
+ \enforced\let\ =\obeyedspace}
+
+\installspacemethod \v!yes
+ {\obeyspaces
+ \enforced\let\obeyedspace\spac_spaces_checked_normal
+ \enforced\let\ =\obeyedspace}
+
+\installspacemethod \v!off % == default
+ {\normalspaces
+ \enforced\let\obeyedspace\normalspace
+ \enforced\let\ =\normalspaceprimitive} % was \normalspace
+
+\installspacemethod \v!fixed
+ {\obeyspaces
+ \enforced\let\obeyedspace\spac_spaces_checked_fixed
+ \enforced\let\ =\obeyedspace}
+
+\appendtoks
+ \normalspaces % to be sure
+\to \everybeforeoutput
+
+%D A more robust variant of the \MKII\ one:
+%D
+%D \startbuffer
+%D bla \TEX\autoinsertnextspace bla
+%D bla \TEX\autoinsertnextspace (bla)
+%D bla (\TEX\autoinsertnextspace) bla
+%D bla \TEX\autoinsertnextspace\ bla
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+% \autoinsertnextspace % defined at the lua end
+
+%D Moved from bib module:
+
+\permanent\protected\def\outdented#1%
+ {\hskip-\hangindent#1\relax}
+
+%D Beware: due to char-def this becomes an active character but that might change
+%D sometime when we will replace all these specials to node insertions. We might
+%D even expand it to utf then as it then can be used in string comparison (not that
+%D much needed anyway).
+
+% \chardef\zwnj="200C
+% \chardef\zwj ="200D
+
+% TODO (but used in languages):
+
+\def\spac_glues_text_or_math#1#2%
+ {\begingroup
+ \ifmmode
+ \mskip#1%
+ \else
+ \scratchdimen#1\hspaceamount\empty{#2}%
+ \scratchskip\scratchdimen\s!plus.5\scratchdimen\s!minus.3\scratchdimen
+ \hskip\scratchskip
+ \fi
+ \endgroup}
+
+\permanent\protected\def\thinglue {\spac_glues_text_or_math\thinmuskip \v!small}
+\permanent\protected\def\medglue {\spac_glues_text_or_math\medmuskip \v!medium}
+\permanent\protected\def\thickglue{\spac_glues_text_or_math\thickmuskip\v!big}
+
+%D A rather unknown one:
+
+\permanent\protected\def\widened % moved from cont-new
+ {\doifelsenextoptionalcs\spac_widened_yes\spac_widened_nop}
+
+\def\spac_widened_yes[#1]#2{\hbox \s!spread #1{\hss#2\hss}}
+\def\spac_widened_nop #1{\hbox \s!spread \emwidth{\hss#1\hss}}
+
+%D For the moment here (used in page-txt):
+
+\permanent\protected\def\ignoredlinebreak{\unskip\space\ignorespaces}
+
+%D \macros
+%D {startignorespaces}
+%D
+%D I'll probably forget that this one exists:
+%D
+%D \starttyping
+%D \ruledhbox
+%D {\startignorespaces
+%D \def\oeps{a}
+%D \startignorespaces
+%D \def\oeps{a}
+%D \stopignorespaces
+%D \def\oeps{a}
+%D \stopignorespaces
+%D \oeps}
+%D \stoptyping
+
+\newsignal\d_spac_ignore_spaces_signal
+\newcount \c_spac_ignore_spaces
+
+\permanent\protected\def\startignorespaces
+ {\advance\c_spac_ignore_spaces\plusone
+ \ifcase\c_spac_ignore_spaces\or \ifhmode
+ \hskip\d_spac_ignore_spaces_signal
+ \fi \fi
+ \ignorespaces}
+
+\permanent\protected\def\stopignorespaces
+ {\ifcase\c_spac_ignore_spaces \or
+ \ifhmode
+ \doloop\spac_ignore_spaces_body
+ \fi
+ \fi
+ \advance\c_spac_ignore_spaces\minusone}
+
+\def\spac_ignore_spaces_body
+ {\ifzeropt\lastskip
+ \exitloop
+ \orelse\ifdim\lastskip=\d_spac_ignore_spaces_signal
+ \unskip
+ \exitloop
+ \else
+ \unskip
+ \fi}
+
+%D \macros
+%D {obeyfollowingtoken}
+
+\permanent\def\obeyfollowingtoken{{}} % end \cs scanning
+
+%D Something new:
+
+\permanent\protected\def\interwordspacebefore{\wordboundary\zwnj\hskip\interwordspace\relax}
+\permanent\protected\def\interwordspaceafter {\hskip\interwordspace\relax\zwnj\wordboundary}
+
+\permanent\protected\def\interwordspacesbefore#1{\dofastloopcs{#1}\interwordspacebefore}
+\permanent\protected\def\interwordspacesafter #1{\dofastloopcs{#1}\interwordspaceafter}
+\permanent\protected\def\interwordspaces #1{\wordboundary\zwnj\dofastloopcs{\numexpr#1+\minusone}\interwordspaceafter}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-lin.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-lin.mkxl
new file mode 100644
index 00000000000..53da64923af
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-lin.mkxl
@@ -0,0 +1,211 @@
+%D \module
+%D [ file=spac-lin,
+%D version=2012.01.08, % 2009.10.16 (core-ver) 1997.03.31 (core-spa)
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Vertical,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Lines}
+
+\unprotect
+
+%D When spacing is active we need to handle commands in a special way:
+%D
+%D \starttyping
+%D \setuplines[space=on]
+%D
+%D \startlines
+%D Let's talk about this{\ttsl\gobbleoneargument or}that.
+%D \stoplines
+%D
+%D \startlines
+%D Let's talk about this{\getvalue{ttsl}or}that.
+%D \stoplines
+%D \stoptyping
+%D
+%D One can indent in several ways:
+%D
+%D \starttyping
+%D \setupindenting[medium] \setuplines[indenting=odd] % no yes odd even
+%D
+%D \startlines
+%D first
+%D second
+%D third
+%D fourth
+%D \stoplines
+%D \stoptyping
+
+%D Contrary to \MKII\ we can now define classes of lines (generalized by
+%D Wolfgang). I will probably rewrite bits in \LUA.
+
+\installcorenamespace{lines}
+
+\installcommandhandler \??lines {lines} \??lines
+
+\setuplines
+ [\c!option=,
+ \c!command=,
+ \c!before=\blank,
+ \c!after=\blank,
+ \c!inbetween=\blank,
+ \c!indenting=\v!no,
+ \c!space=\v!default]
+
+\appendtoks
+ \frozen\instance\setuevalue{\e!start\currentlines}{\spac_lines_start[\currentlines]}%
+ \frozen\instance\letvalue {\e!stop \currentlines }\spac_lines_stop
+\to \everydefinelines
+
+\let\p_lines_option\empty
+
+\let\spac_lines_break \relax
+\let\spac_after_first_obeyed_line\relax
+\let\spac_lines_indent \relax
+
+%D See \type {indentation-005.tex}:
+%D
+%D \starttyping
+%D \setuplines[indentlist={0pt,10pt,15pt,20pt}]
+%D
+%D \setupindenting[yes,1em]
+%D \setuplines[indentlist={0pt,*,*}]
+%D
+%D \setuplines[indentlist={0pt,1em,*}]
+%D \starttyping
+
+\newcount\c_spac_lines_indent_cnt
+\newcount\c_spac_lines_indent_max
+\newdimen\d_spac_lines_indent
+
+\def\spac_lines_indent_indeed
+ {\ifnum\c_spac_lines_indent_cnt=\c_spac_lines_indent_max
+ \c_spac_lines_indent_cnt\plusone
+ \else
+ \advance\c_spac_lines_indent_cnt\plusone
+ \fi
+ \getfromcommacommand[\m_spac_lines_indentlist][\c_spac_lines_indent_cnt]%
+ \ifx\commalistelement\wildcardsymbol
+ \hskip\d_spac_lines_indent
+ \else
+ \scratchdimen\dimexpr\commalistelement\relax
+ \hskip
+ \ifdim\scratchdimen=\zeropoint
+ \zeropoint
+ \else
+ \scratchdimen
+ \d_spac_lines_indent\scratchdimen
+ \fi
+ \fi
+ \relax}
+
+\permanent\tolerant\protected\def\spac_lines_start[#1]%
+ {\bgroup
+ \edef\currentlines{#1}%
+ \obeylines
+ \spac_lines_start_indeed}
+
+\tolerant\def\spac_lines_start_indeed[#1]% new: optional second argument (WS)
+ {\ifarguments\or
+ \setupcurrentlines[#1]%
+ \fi
+ \edef\p_lines_option{\linesparameter\c!option}%
+ \ifx\p_lines_option\v!packed
+ \let\spac_lines_break\nobreak
+ \else
+ \let\spac_lines_break\relax
+ \fi
+ \linesparameter\c!before
+ \push_macro_checkindentation
+ \whitespace
+ \dostarttaggedchained\t!lines\currentlines\??lines
+ \begingroup
+ \uselinesstyleandcolor\c!style\c!color
+ \useindentingparameter\linesparameter
+ \usealignparameter\linesparameter
+ \typesettinglinestrue
+ \setupwhitespace[\v!none]% todo use fast variant
+ %\obeylines % move upwards to keep spaces in the first line due to optional argument
+ %
+ \edef\m_spac_lines_indentlist{\linesparameter\c!indentlist}%
+ \getcommacommandsize[\m_spac_lines_indentlist]%
+ \c_spac_lines_indent_max\commalistsize
+ \c_spac_lines_indent_cnt\zerocount
+ \ifnum\c_spac_lines_indent_max>\plusone
+ \let\spac_lines_indent\spac_lines_indent_indeed
+ \d_spac_lines_indent\d_spac_indentation_par
+ \else
+ \let\spac_lines_indent\relax
+ \fi
+ %
+ \ignorespaces
+ \glet\spac_after_first_obeyed_line\spac_lines_after_first_obeyed_line_a
+ \enforced\let\obeyedline\spac_lines_obeyed_line
+ \activatespacehandler{\linesparameter\c!space}%
+ \dostarttagged\t!line\empty
+ \ignorepars}
+
+
+% we could have states instead and handle option in there
+
+\def\spac_lines_after_first_obeyed_line_a % tzt two pass, like itemize
+ {\linesparameter\c!command
+ \spac_lines_indent
+ \linesparameter\c!left
+ \glet\spac_after_first_obeyed_line\spac_lines_after_first_obeyed_line_b}
+
+\def\spac_lines_after_first_obeyed_line_b
+ {\spac_lines_break
+ \linesparameter\c!command
+ \spac_lines_indent
+ \linesparameter\c!left}
+
+\def\spac_lines_obeyed_line
+ {\ifdone\linesparameter\c!right\fi
+ \dostoptagged % can be a dummy one as we don't look ahead
+ \par
+ \dostarttagged\t!line\empty
+ \futurelet\nexttoken\spac_lines_between}
+
+\protected\def\spac_lines_stop
+ {\dostoptagged
+ \endgroup
+ \dostoptagged
+ \pop_macro_checkindentation
+ \linesparameter\c!after
+ \egroup}
+
+\def\spac_lines_between
+ {\ifx\nexttoken\spac_lines_stop
+ \donefalse
+ \else
+ \doifelsemeaning\nexttoken\obeyedline % brrr
+ {\donefalse\linesparameter\c!inbetween}
+ {\donetrue\spac_after_first_obeyed_line}%
+ \fi}
+
+\definelines[\v!lines]
+
+\permanent\tolerant\protected\def\emptylines[#1]%
+ {\endgraf
+ \begingroup
+ %\forgetall % debatable
+ \ifhmode
+ \crlf % finish the current line
+ \fi
+ \scratchcounter\ifparameter#1\or#1\else3\fi\relax
+ \dorecurse\scratchcounter{\strut\crlf}%
+ \endgroup}
+
+\ifdefined\startlines \else
+ \aliased\expandafter\let\expandafter\startlines\csname\e!start\v!lines\endcsname
+ \aliased\expandafter\let\expandafter\stoplines \csname\e!stop \v!lines\endcsname
+\fi
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl
new file mode 100644
index 00000000000..d9f7c67a1ee
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-pag.mkxl
@@ -0,0 +1,170 @@
+%D \module
+%D [ file=spac-pag,
+%D version=2009.10.16, % 1997.03.31, was core-spa.tex
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Pages,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Pages}
+
+\unprotect
+
+\newif \ifpagestatemismatch
+\newcount \realpagestateno
+\newconstant\frozenpagestate
+
+\permanent\protected\def\dotrackpagestate#1#2%
+ {\ifdoublesided \ifinpagebody \else
+ \doforcedtrackpagestate{#1}{#2}%
+ \fi \fi}
+
+\permanent\protected\def\doforcedtrackpagestate#1#2%
+ {\ifcase\frozenpagestate
+ \global\advance#2\plusone
+ \setpagestate[#1][\number#2]%
+ \fi}
+
+\let\m_spac_pagestates_realpage\empty
+
+\newconditional\c_spac_pagestates_found
+
+\permanent\protected\def\docheckpagestate#1#2%
+ {\ifcase\frozenpagestate
+ \setpagestaterealpageno{#1}{\number#2}%
+ \fi}
+
+\permanent\protected\def\doifelserightpagestate#1#2% not expandable !
+ {\ifcase\frozenpagestate
+ \pagestatemismatchfalse
+ \realpagestateno\realfolio
+ \ifinpagebody
+ \ifdoublesided
+ \ifodd\realpageno\relax
+ \settrue\c_spac_pagestates_found
+ \else
+ \setfalse\c_spac_pagestates_found
+ \fi
+ \else
+ \settrue\c_spac_pagestates_found
+ \fi
+ \orelse\ifdoublesided
+ \edef\m_spac_pagestates_realpage{\pagestaterealpage{#1}{\number#2}}%
+ \ifempty\m_spac_pagestates_realpage
+ \ifodd\realpageno\relax
+ \settrue\c_spac_pagestates_found
+ \else
+ \setfalse\c_spac_pagestates_found
+ \fi
+ \else
+ \realpagestateno\m_spac_pagestates_realpage\relax
+ \ifnum\realpagestateno=\realpageno \else
+ \pagestatemismatchtrue
+ \fi
+ \ifodd\realpagestateno\relax
+ \settrue\c_spac_pagestates_found
+ \else
+ \setfalse\c_spac_pagestates_found
+ \fi
+ \fi
+ \else
+ \settrue\c_spac_pagestates_found
+ \fi
+ \else
+ \ifodd\realpagestateno\relax
+ \settrue\c_spac_pagestates_found
+ \else
+ \setfalse\c_spac_pagestates_found
+ \fi
+ \fi
+ \ifconditional\c_spac_pagestates_found
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\permanent\protected\def\doifelseforcedrightpagestate#1#2%
+ {\ifcase\frozenpagestate
+ \pagestatemismatchfalse
+ \realpagestateno\realfolio
+ \edef\m_spac_pagestates_realpage{\pagestaterealpage{#1}{\number#2}}%
+ \ifempty\m_spac_pagestates_realpage
+ \ifodd\realpageno\relax
+ \settrue\c_spac_pagestates_found
+ \else
+ \setfalse\c_spac_pagestates_found
+ \fi
+ \else
+ \realpagestateno\m_spac_pagestates_realpage\relax
+ \ifnum\realpagestateno=\realpageno \else
+ \pagestatemismatchtrue
+ \fi
+ \ifodd\realpagestateno\relax
+ \settrue\c_spac_pagestates_found
+ \else
+ \setfalse\c_spac_pagestates_found
+ \fi
+ \fi
+ \else
+ \ifodd\realpagestateno\relax
+ \settrue\c_spac_pagestates_found
+ \else
+ \setfalse\c_spac_pagestates_found
+ \fi
+ \fi
+ \ifconditional\c_spac_pagestates_found
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifrightpagestateelse \doifelserightpagestate
+\aliased\let\doifforcedrightpagestateelse\doifelseforcedrightpagestate
+
+\permanent\protected\def\freezepagestate {\frozenpagestate\plusone }
+\permanent\protected\def\defrostpagestate{\frozenpagestate\zerocount}
+
+% we can make more of these on top, but how to deal with mixed frozen states
+
+% \dorecurse{500}{\dontleavehmode\signalrightpage\doifrightpageelse{right}{left}\par} % given doublesided
+
+\newcount\nofraggedparagraphs
+
+\definepagestate[\s!paragraph]
+
+\permanent\protected\def\signalrightpage {\dotrackpagestate \s!paragraph\nofraggedparagraphs} % use \dontleavehmode if needed
+\permanent\protected\def\doifelserightpage{\doifelserightpagestate\s!paragraph\nofraggedparagraphs}
+\permanent\protected\def\rightpageorder {\pagestaterealpageorder\s!paragraph\nofraggedparagraphs}
+
+\aliased\let\doifrightpageelse\doifelserightpage
+
+\installcorenamespace{pagechanges}
+
+\newif\ifpagechanged \mutable\let\lastchangedpage\empty
+
+\def\spac_pagechanges_check#1#2#3%
+ {\pagechangedfalse
+ \doforcedtrackpagestate{#2}{#3}%
+ \edef\m_spac_pagestates_realpage{\pagestaterealpage{#2}{\number#3}}%
+ \ifempty\m_spac_pagestates_realpage \orelse\ifnum\m_spac_pagestates_realpage>0\csname\??pagechanges#2:#1\endcsname\relax
+ \pagechangedtrue
+ \fi
+ \ifpagechanged
+ \letgvalue{\??pagechanges#2:#1}\m_spac_pagestates_realpage
+ \glet\lastchangedpage\m_spac_pagestates_realpage
+ \else
+ \glet\lastchangedpage\realfolio
+ \fi}
+
+\permanent\protected\def\changedpagestate#1#2%
+ {\executeifdefined{\??pagechanges#2:#1}0}
+
+\permanent\protected\def\checkpagechange#1{\spac_pagechanges_check{#1}\s!paragraph\nofraggedparagraphs}
+\permanent\protected\def\changedpage #1{\changedpagestate{#1}\s!paragraph}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-par.lmt b/Master/texmf-dist/tex/context/base/mkxl/spac-par.lmt
new file mode 100644
index 00000000000..179fc1f4380
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-par.lmt
@@ -0,0 +1,81 @@
+if not modules then modules = { } end modules ['spac-par'] = {
+ version = 1.001,
+ comment = "companion to spac-par.mkxl",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local context = context
+local implement = interfaces.implement
+
+local collected = utilities.storage.allocate()
+local tobesaved = utilities.storage.allocate()
+local wrappers = { }
+
+local jobparwrappers = {
+ collected = collected,
+ tobesaved = tobesaved,
+}
+
+job.parwrappers = jobparwrappers
+
+local function initializer()
+ tobesaved = jobparwrappers.tobesaved
+ collected = jobparwrappers.collected
+end
+
+local function finalizer()
+ -- nothing yet
+end
+
+job.register('job.parwrappers.collected', tobesaved, initializer, finalizer)
+
+implement {
+ name = "newparwrapper",
+ arguments = "string",
+ actions = function(id)
+ local t = tobesaved[id]
+ local n
+ if t then
+ n = #t + 1
+ t[n] = 0
+ else
+ n = 1
+ tobesaved[id] = { 0 }
+ end
+ wrappers[id] = n
+ end
+}
+
+implement {
+ name = "setparwrapper",
+ arguments = "string",
+ protected = true,
+ actions = function(id)
+ local t = tobesaved[id]
+ local n = #t
+ t[n] = t[n] + 1
+ end
+}
+
+implement {
+ name = "getparwrapper",
+ arguments = "string",
+ public = true,
+ actions = function(id)
+ local t = tobesaved[id]
+ context(t and t[#t] or 0)
+ end
+}
+
+implement {
+ name = "lastparwrapper",
+ arguments = "string",
+ public = true,
+ actions = function(id)
+ local t = collected and collected[id]
+ context(t and t[wrappers[id]] or 0)
+ end
+}
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-par.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-par.mkxl
new file mode 100644
index 00000000000..134a60e2a02
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-par.mkxl
@@ -0,0 +1,456 @@
+%D \module
+%D [ file=spac-par,
+%D version=2009.10.16, % 1997.03.31, was core-spa.tex
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Paragraphs,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Paragraphs}
+
+\registerctxluafile{spac-par}{autosuffix}
+
+\unprotect
+
+% TODO: \appendtoks \strut \wrapuppar{\strut}\to \everypar
+
+%D New experimental stuff:
+
+% this might move to syst-ini.mkxl
+
+\setnewconstant\paragraphupdatecodes\numexpr
+ \frozentolerancecode
+ + \frozenloosenesscode
+ + \frozenlinepenaltycode
+ + \frozenwidowpenaltycode
+ + \frozenclubpenaltycode
+ + \frozenbrokenpenaltycode
+ + \frozendemeritscode
+\relax
+
+\setnewconstant\paragraphpenaltycodes\numexpr
+ \frozenlinepenaltycode
+ + \frozenwidowpenaltycode
+ + \frozenclubpenaltycode
+ + \frozenbrokenpenaltycode
+\relax
+
+\setnewconstant\paragraphdemeritcodes\numexpr
+ \frozendemeritscode
+\relax
+
+\setnewconstant\paragraphshapecodes\numexpr
+ \frozenhangcode
+ + \frozenskipcode
+ + \frozenparfillcode
+ + \frozenshapecode
+\relax
+
+\setnewconstant\paragraphlinecodes\numexpr
+ \frozenlinecode
+\relax
+
+\setnewconstant\paragraphhyphenationcodes\numexpr
+ \frozenhyphenationcode
+\relax
+
+\setnewconstant\frozenparagraphdefault\numexpr
+ \frozenhsizecode % \hsize
+ + \frozenskipcode % \leftskip \rightskip
+ + \frozenhangcode % \hangindent \hangafter
+ + \frozenindentcode % \parindent
+ + \frozenparfillcode % \parfillskip \parfillleftskip
+ + \frozenadjustcode % \adjustspacing
+ + \frozenprotrudecode % \protrudechars
+ + \frozentolerancecode % \tolerance \pretolerance
+ + \frozenstretchcode % \emergcystretch
+ + \frozenloosenesscode % \looseness
+ + \frozenlastlinecode % \lastlinefit
+ + \frozenlinepenaltycode % \linepenalty \interlinepenalty \interlinepenalties
+ + \frozenclubpenaltycode % \clubpenalty \clubpenalties
+ + \frozenwidowpenaltycode % \widowpenalty \widowpenalties
+ + \frozendisplaypenaltycode % \displaypenalty \displaypenalties
+ + \frozenbrokenpenaltycode % \brokenpenalty
+ + \frozendemeritscode % \doublehyphendemerits \finalhyphendemerits \adjdemerits
+ + \frozenshapecode % \parshape
+ % \frozenlinecode % \baselineskip \lineskip \lineskiplimit
+ + \frozenhyphenationcode % \hyphenationmode
+\relax
+
+\permanent\protected\def\freezeparagraphproperties {\snapshotpar\frozenparagraphdefault}
+\permanent\protected\def\defrostparagraphproperties{\snapshotpar\zerocount}
+
+\permanent\protected\def\updateparagraphproperties{\ifhmode\snapshotpar\paragraphupdatecodes \fi}
+\permanent\protected\def\updateparagraphpenalties {\ifhmode\snapshotpar\paragraphpenaltycodes\fi}
+\permanent\protected\def\updateparagraphdemerits {\ifhmode\snapshotpar\paragraphdemeritcodes\fi}
+\permanent\protected\def\updateparagraphshapes {\ifhmode\snapshotpar\paragraphshapecodes \fi}
+\permanent\protected\def\updateparagraphlines {\ifhmode\snapshotpar\paragraphlinecodes \fi}
+
+% so far
+
+\let\spac_paragraph_freeze\relax
+
+\permanent\protected\def\setparagraphfreezing {\enforced\let\spac_paragraph_freeze\freezeparagraphproperties}
+\permanent\protected\def\forgetparagraphfreezing{\enforced\let\spac_paragraph_freeze\relax}
+
+\installcorenamespace {bparwrap}
+\installcorenamespace {eparwrap}
+\installcorenamespace {parwrapbefore}
+\installcorenamespace {parwrapafter}
+\installcorenamespace {parwrapcount}
+
+\let\spac_paragraph_wrap\relax
+
+\newcount\c_spac_paragraph_group_level
+
+\protected\def\spac_paragraph_update
+ {\c_spac_paragraph_group_level\currentgrouplevel\relax
+ \ifcsname\??bparwrap\the\c_spac_paragraph_group_level\endcsname
+ \the\lastnamedcs
+ \relax
+ \dontleavehmode % just in case
+ \wrapuppar{\the\csname\??eparwrap\the\c_spac_paragraph_group_level\endcsname\relax}%
+ \fi}
+
+\permanent\protected\def\registerparwrapper {\spac_register_par_wrapper\toksapp\tokspre}
+\permanent\protected\def\registerparwrapperreverse{\spac_register_par_wrapper\tokspre\toksapp}
+
+\protected\def\spac_paragraph_install
+ {\expandafter\newtoks\csname\??bparwrap\the\currentgrouplevel\endcsname
+ \expandafter\newtoks\csname\??eparwrap\the\currentgrouplevel\endcsname}
+
+\def\spac_paragraph_install_count#1%
+ {\expandafter\newcount\csname\??parwrapcount#1\endcsname}
+
+\def\spac_paragraph_install_pair#1#2#3%
+ {\expandafter\newtoks\csname\??parwrapbefore#3\endcsname
+ \expandafter\newtoks\csname\??parwrapafter #3\endcsname
+ #1\csname\??bparwrap\the\currentgrouplevel\endcsname{\the\csname\??parwrapbefore#3\endcsname}%
+ #2\csname\??eparwrap\the\currentgrouplevel\endcsname{\the\csname\??parwrapafter #3\endcsname}}
+
+\def\spac_register_par_wrapper_yes#1#2#3#4#5%
+ {\ifcsname\??bparwrap\the\currentgrouplevel\endcsname \else
+ \spac_paragraph_install
+ \fi
+ \ifcsname\??parwrapcount#3\endcsname \else
+ \spac_paragraph_install_count{#3}%
+ \fi
+ \ifcsname\??parwrapbefore#3\endcsname \else
+ \spac_paragraph_install_pair#1#2{#3}%
+ \fi
+ #1\csname\??parwrapbefore#3\endcsname{\advance\csname\??parwrapcount#3\endcsname\plusone\relax
+ \clf_setparwrapper{#3}#4}%
+ #2\csname\??parwrapafter #3\endcsname{#5}%
+ \clf_newparwrapper{#3}%
+ \enforced\let\spac_paragraph_wrap\spac_paragraph_update}
+
+\def\spac_register_par_wrapper_nop#1#2#3#4#5%
+ {\ifcsname\??parwrapcount#3\endcsname \else
+ \spac_paragraph_install_count{#3}%
+ \fi
+ \csname\??parwrapcount#3\endcsname\plusone
+ #4\wrapuppar{#5}}
+
+\protected\def\spac_register_par_wrapper
+ {\ifhmode
+ \expandafter\spac_register_par_wrapper_nop
+ \else
+ \expandafter\spac_register_par_wrapper_yes
+ \fi}
+
+\permanent\protected\def\forgetparwrapper
+ {\csname\??bparwrap\the\currentgrouplevel\endcsname\emptytoks
+ \csname\??eparwrap\the\currentgrouplevel\endcsname\emptytoks}
+
+\permanent\protected\def\unregisterparwrapper#1%
+ {\csname\??parwrapcount#1\endcsname\zerocount
+ \ifcsname\??parwrapbefore#1\endcsname
+ \lastnamedcs\emptytoks
+ \csname\??parwrapafter#1\endcsname\emptytoks
+ \fi}
+
+\permanent\def\directparwrapper#1#2%
+ {#1\wrapuppar{#2}}
+
+\permanent\protected\def\doifelseparwrapper#1%
+ {\unless\ifcsname\??parwrapcount#1\endcsname
+ \expandafter\secondoftwoarguments
+ \orelse\ifcase\lastnamedcs
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+% \getparwrapper % defined in lua
+% \lastparwrapper % defined in lua
+
+\permanent\protected\def\showparwrapperstate#1%
+ {\begingroup
+ \infofont ¶#1\hilo
+ {\smallinfofont\getparwrapper {#1}}%
+ {\smallinfofont\lastparwrapper{#1}}%
+ \endgroup}
+
+%appendtoks\updateparwrapperindeed\to\everypar
+%appendtoks\spac_paragraph_wrap \to\everypar
+%appendtoks\spac_paragraph_freeze \to\everypar
+
+\setparagraphfreezing
+
+\appendtoks\enforced\let\spac_paragraph_wrap\relax\to\everyforgetall
+
+%D In due time, the code below will be upgraded using the above mechanisms.
+
+%D The dreadful sequence \type {\bgroup} \unknown\ \type {\carryoverpar} \unknown\
+%D \type {\egroup} is needed when for instance sidefloats are used in combination
+%D with something that starts with a group. This is because otherwise the
+%D indentation as set (by the output routine) inside the group are forgotten
+%D afterwards. (I must not forget its existence).
+
+\mutable\let\currentparagraphproperties\empty % visible for tracing
+
+\permanent\def\carryoverpar#1% #1 can be \endgroup or \egroup or ... expandable !
+ {\normalexpanded
+ {\noexpand#1%
+ \hangindent\the\hangindent
+ \hangafter \the\hangafter
+ \parskip \the\parskip
+ \leftskip \the\leftskip
+ \rightskip \the\rightskip
+ \relax}}
+
+\permanent\protected\def\pushparagraphproperties
+ {\edef\currentparagraphproperties{\carryoverpar\relax}%
+ \pushmacro\currentparagraphproperties}
+
+\permanent\protected\def\popparagraphproperties
+ {\popmacro\currentparagraphproperties
+ \currentparagraphproperties}
+
+\permanent\protected\def\flushparagraphproperties
+ {\popmacro\currentparagraphproperties}
+
+%D Beware, changing this will break some code (like pos/backgrounds) but it has been
+%D changed anyway so let's see where things go wrong.
+
+\installcorenamespace{paragraphintro}
+
+\let\spac_paragraphs_flush_intro\relax % hook into everypar
+
+\newtoks\t_spac_paragraphs_intro_first
+\newtoks\t_spac_paragraphs_intro_next
+\newtoks\t_spac_paragraphs_intro_each
+
+\newconditional\c_spac_paragraphs_intro_first
+\newconditional\c_spac_paragraphs_intro_next
+\newconditional\c_spac_paragraphs_intro_each
+
+\let\spac_paragraphs_flush_intro\relax
+\let\spac_paragraphs_intro_step \relax
+
+\permanent\protected\tolerant\def\setupparagraphintro[#1]#*[#2]%
+ {\def\spac_paragraphs_intro_step##1%
+ {\csname\??paragraphintro\ifcsname\??paragraphintro##1\endcsname##1\fi\endcsname{#2}}%
+ \processcommacommand[#1]\spac_paragraphs_intro_step}
+
+\letcsname\??paragraphintro\empty\endcsname\gobbleoneargument
+
+\defcsname\??paragraphintro\v!reset\endcsname#1%
+ {\global\setfalse\c_spac_paragraphs_intro_first
+ \global\setfalse\c_spac_paragraphs_intro_next
+ \global\setfalse\c_spac_paragraphs_intro_each
+ \global\t_spac_paragraphs_intro_first\emptytoks
+ \global\t_spac_paragraphs_intro_next \emptytoks
+ \global\t_spac_paragraphs_intro_each \emptytoks
+ \glet\spac_paragraphs_flush_intro\relax}
+
+\defcsname\??paragraphintro\v!first\endcsname#1%
+ {\global\settrue\c_spac_paragraphs_intro_first
+ \gtoksapp\t_spac_paragraphs_intro_first{#1}%
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
+
+\defcsname\??paragraphintro\v!next\endcsname#1%
+ {\global\settrue\c_spac_paragraphs_intro_next
+ \gtoksapp\t_spac_paragraphs_intro_next{#1}%
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
+
+\defcsname\??paragraphintro\v!each\endcsname#1%
+ {\global\settrue\c_spac_paragraphs_intro_each
+ \gtoksapp\t_spac_paragraphs_intro_each{#1}%
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
+
+%D We can say:
+%D
+%D \starttyping
+%D \setupparagraphintro[first][\index{Knuth}]
+%D \stoptyping
+%D
+%D Maybe more convenient is:
+%D
+%D \starttyping
+%D \flushatparagraph{\index{Zapf}}
+%D \stoptyping
+%D
+%D \starttyping
+%D \setupparagraphintro[first][\hbox to 3.5em{\tt FIRST \hss}]
+%D \setupparagraphintro[first][\hbox to 3.5em{\tt TSRIF \hss}]
+%D \setupparagraphintro[next] [\hbox to 3.5em{\tt NEXT \hss}]
+%D \setupparagraphintro[next] [\hbox to 3.5em{\tt TXEN \hss}]
+%D \setupparagraphintro[each] [\hbox to 3.0em{\tt EACH \hss}]
+%D \setupparagraphintro[each] [\hbox to 3.0em{\tt HCEA \hss}]
+%D
+%D some paragraph \par
+%D some paragraph \par
+%D some paragraph \par
+%D some paragraph \par
+%D
+%D \setupparagraphintro[first][\hbox to 3.5em{\tt FIRST \hss}]
+%D \setupparagraphintro[first][\hbox to 3.5em{\tt TSRIF \hss}]
+%D
+%D some paragraph \par
+%D some paragraph \par
+%D
+%D \setupparagraphintro[reset]
+%D
+%D some paragraph \par
+%D \stoptyping
+
+\permanent\protected\def\flushatparagraph#1%
+ {\global\c_spac_paragraphs_intro_first\plusone
+ \gtoksapp\t_spac_paragraphs_intro_first{#1}%
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
+
+%D Here comes the flusher (we misuse the one level expansion of token registers to
+%D feed a nice stream into the paragraph.)
+
+\protected\def\spac_paragraphs_flush_intro_indeed % we make sure that the token lists expand directly
+ {\normalexpanded{% % after another so the first code is there twice
+ \ifconditional\c_spac_paragraphs_intro_each
+ \ifconditional\c_spac_paragraphs_intro_next
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_next
+ \else
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_each
+ \fi
+ \ifconditional\c_spac_paragraphs_intro_first
+ \global\setfalse\c_spac_paragraphs_intro_first
+ \global\t_spac_paragraphs_intro_first\emptytoks
+ \the\t_spac_paragraphs_intro_first
+ \fi
+ \the\t_spac_paragraphs_intro_each
+ \else
+ \ifconditional\c_spac_paragraphs_intro_next
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_next
+ \fi
+ \ifconditional\c_spac_paragraphs_intro_first
+ \global\setfalse\c_spac_paragraphs_intro_first
+ \global\t_spac_paragraphs_intro_first\emptytoks
+ \the\t_spac_paragraphs_intro_first
+ \fi
+ \fi}}
+
+\protected\def\spac_paragraphs_flush_intro_next
+ {\normalexpanded{%
+ \global\setfalse\c_spac_paragraphs_intro_next
+ \global\t_spac_paragraphs_intro_next\emptytoks
+ \ifconditional\c_spac_paragraphs_intro_each
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_each
+ \the\t_spac_paragraphs_intro_next
+ \the\t_spac_paragraphs_intro_each
+ \else
+ \glet\spac_paragraphs_flush_intro\relax
+ \the\t_spac_paragraphs_intro_next
+ \fi}}
+
+\protected\def\spac_paragraphs_flush_intro_each
+ {\the\t_spac_paragraphs_intro_each}
+
+%D \macros
+%D {flushatnextpar}
+%D
+%D This macro collects data that will be flushed at the next paragraph. By using
+%D this macro you can avoid interfering nodes (writes, etc).
+
+\aliased\let\flushpostponednodedata\relax % hook into everypar
+
+\newbox \b_spac_postponed_data
+%newcount\c_spac_postponed_data
+
+% \installcorenamespace {postponednodesstack}
+%
+% \initializeboxstack\??postponednodesstack
+%
+% \protected\def\pushpostponednodedata
+% {\global\advance\c_spac_postponed_data\plusone
+% \savebox\??postponednodesstack{\the\c_spac_postponed_data}{\box\b_spac_postponed_data}}
+%
+% \protected\def\poppostponednodedata
+% {\global\setbox\b_spac_postponed_data\hbox{\foundbox\??postponednodesstack{\the\c_spac_postponed_data}}%
+% \global\advance\c_spac_postponed_data\minusone
+% \ifvoid\b_spac_postponed_data\else
+% \enforced\glet\flushpostponednodedata\spac_postponed_data_flush
+% \fi}
+
+\newtoks\everyflushatnextpar
+
+\permanent\protected\def\pushpostponednodedata
+ {\globalpushbox\b_spac_postponed_data}
+
+\permanent\protected\def\poppostponednodedata
+ {\globalpopbox\b_spac_postponed_data
+ \ifvoid\b_spac_postponed_data\else
+ \enforced\glet\flushpostponednodedata\spac_postponed_data_flush
+ \fi}
+
+\permanent\protected\def\flushatnextpar
+ {\begingroup
+ \the\everyflushatnextpar
+ \enforced\glet\flushpostponednodedata\spac_postponed_data_flush
+ \dowithnextboxcs\spac_postponed_data_finish\hpack}
+
+% \def\spac_postponed_data_finish
+% {\global\setbox\b_spac_postponed_data\hpack % to\zeropoint
+% {\box\b_spac_postponed_data\box\nextbox}%
+% \endgroup}
+%
+% This is better when used with protrusion which does not like too deeply nested
+% boxes:
+%
+% \def\spac_postponed_data_finish
+% {\dontcomplain
+% \global\setbox\b_spac_postponed_data\hpack to \zeropoint
+% {\unhbox\b_spac_postponed_data\unhbox\nextbox}%
+% \endgroup}
+%
+% We could do this if there is content with widths ... not that is should be used
+% that way, but this way we don't overflow:
+
+\def\spac_postponed_data_finish
+ {\dontcomplain
+ \global\setbox\b_spac_postponed_data\hpack % to \zeropoint
+ {\unhbox\b_spac_postponed_data
+ \scratchdimen\wd\nextbox
+ \unhbox\nextbox
+ \ifcase\scratchdimen\else\kern-\b_spac_postponed_data\fi}%
+ \endgroup}
+
+\def\spac_postponed_data_flush
+ {%\iftrialtypesetting \else
+ \ifvoid\b_spac_postponed_data\else
+ \hpack{\smashedbox\b_spac_postponed_data}% \box\b_spac_postponed_data
+ \fi
+ \enforced\glet\flushpostponednodedata\relax
+ }%\fi}
+
+\permanent\protected\def\doflushatpar % might be renamed
+ {\ifvmode
+ \expandafter\flushatnextpar
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-prf.lmt b/Master/texmf-dist/tex/context/base/mkxl/spac-prf.lmt
new file mode 100644
index 00000000000..2223c77302d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-prf.lmt
@@ -0,0 +1,949 @@
+ if not modules then modules = { } end modules ['spac-prf'] = {
+ version = 1.001,
+ comment = "companion to spac-prf.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is a playground, a byproduct of some experiments in a project where
+-- we needed something like this where it works ok, but nevertheless it's
+-- still experimental code. It is very likely to change (or extended).
+
+local unpack, rawget = unpack, rawget
+
+local formatters = string.formatters
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+local listcodes = nodes.listcodes
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local penalty_code = nodecodes.penalty
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local unset_code = nodecodes.unset
+local math_code = nodecodes.math
+local rule_code = nodecodes.rule
+local marginkern_code = nodecodes.marginkern
+
+local leaders_code = gluecodes.leaders
+local lineskip_code = gluecodes.lineskip
+local baselineskip_code = gluecodes.baselineskip
+
+local linelist_code = listcodes.line
+
+local texlists = tex.lists
+local settexattribute = tex.setattribute
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+local tonode = nuts.tonode
+
+local getreplace = nuts.getreplace
+local getattr = nuts.getattr
+local getid = nuts.getid
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local gettexbox = nuts.getbox
+local getwhd = nuts.getwhd
+local getglue = nuts.getglue
+local getkern = nuts.getkern
+local getshift = nuts.getshift
+local getwidth = nuts.getwidth
+local getheight = nuts.getheight
+local getdepth = nuts.getdepth
+local getboxglue = nuts.getboxglue
+
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setattr = nuts.setattr
+local setwhd = nuts.setwhd
+local setshift = nuts.setshift
+local setwidth = nuts.setwidth
+local setheight = nuts.setheight
+local setdepth = nuts.setdepth
+
+local properties = nodes.properties.data
+local setprop = nuts.setprop
+local getprop = nuts.getprop
+local theprop = nuts.theprop
+
+local floor = math.floor
+local ceiling = math.ceil
+
+local new_rule = nuts.pool.rule
+local new_glue = nuts.pool.glue
+local new_kern = nuts.pool.kern
+local hpack_nodes = nuts.hpack
+local find_node_tail = nuts.tail
+local setglue = nuts.setglue
+
+local a_visual = attributes.private("visual")
+local a_snapmethod = attributes.private("snapmethod")
+local a_profilemethod = attributes.private("profilemethod")
+----- a_specialcontent = attributes.private("specialcontent")
+
+local variables = interfaces.variables
+local v_none = variables.none
+local v_fixed = variables.fixed
+local v_strict = variables.strict
+
+local setcolor = nodes.tracers.colors.set
+local settransparency = nodes.tracers.transparencies.set
+
+local enableaction = nodes.tasks.enableaction
+
+local profiling = { }
+builders.profiling = profiling
+
+local report = logs.reporter("profiling")
+
+local show_profile = false trackers.register("profiling.show", function(v) show_profile = v end)
+local trace_profile = false trackers.register("profiling.trace",function(v) trace_profile = v end)
+
+local function getprofile(line,step)
+
+ -- only l2r
+ -- no hz yet
+
+ local line = tonut(line)
+ local current = getlist(line)
+
+ if not current then
+ return
+ end
+
+ local glue_set, glue_order, glue_sign = getboxglue(line)
+
+ local heights = { }
+ local depths = { }
+ local width = 0
+ local position = 0
+ local step = step or 65536 -- * 2 -- 2pt
+ local margin = step / 4
+ local min = 0
+ local max = ceiling(getwidth(line)/step) + 1
+ local wd = 0
+ local ht = 0
+ local dp = 0
+
+ for i=min,max do
+ heights[i] = 0
+ depths [i] = 0
+ end
+
+ -- remember p
+
+ local function progress()
+ position = width
+ width = position + wd
+ p = floor((position - margin)/step + 0.5)
+ w = floor((width + margin)/step - 0.5)
+ if p < 0 then
+ p = 0
+ end
+ if w < 0 then
+ w = 0
+ end
+ if p > w then
+ w, p = p, w
+ end
+ if w > max then
+ for i=max+1,w+1 do
+ heights[i] = 0
+ depths [i] = 0
+ end
+ max = w
+ end
+ for i=p,w do
+ if ht > heights[i] then
+ heights[i] = ht
+ end
+ if dp > depths[i] then
+ depths[i] = dp
+ end
+ end
+ end
+
+ local function process(current) -- called nested in disc replace
+ while current do
+ local id = getid(current)
+ if id == glyph_code then
+ wd, ht, dp = getwhd(current)
+ progress()
+ elseif id == kern_code then
+ wd = getkern(current)
+ ht = 0
+ dp = 0
+ progress()
+ elseif id == disc_code then
+ local replace = getreplace(current)
+ if replace then
+ process(replace)
+ end
+ elseif id == glue_code then
+ local width, stretch, shrink, stretch_order, shrink_order = getglue(current)
+ if glue_sign == 1 then
+ if stretch_order == glue_order then
+ wd = width + stretch * glue_set
+ else
+ wd = width
+ end
+ elseif glue_sign == 2 then
+ if shrink_order == glue_order then
+ wd = width - shrink * glue_set
+ else
+ wd = width
+ end
+ else
+ wd = width
+ end
+ if getsubtype(current) >= leaders_code then
+ local leader = getleader(current)
+ local w
+ w, ht, dp = getwhd(leader) -- can become getwhd(current) after 1.003
+ else
+ ht = 0
+ dp = 0
+ end
+ progress()
+ elseif id == hlist_code then
+ -- we could do a nested check .. but then we need to push / pop glue
+ local shift = getshift(current)
+ local w, h, d = getwhd(current)
+ -- if getattr(current,a_specialcontent) then
+ if getprop(current,"specialcontent") then
+ -- like a margin note, maybe check for wd
+ wd = w
+ ht = 0
+ dp = 0
+ else
+ wd = w
+ ht = h - shift
+ dp = d + shift
+ end
+ progress()
+ elseif id == vlist_code or id == unset_code then
+ local shift = getshift(current) -- todo
+ wd, ht, dp = getwhd(current)
+ progress()
+ elseif id == rule_code then
+ wd, ht, dp = getwhd(current)
+ progress()
+ elseif id == math_code then
+ wd = getkern(current) + getwidth(current) -- surround
+ ht = 0
+ dp = 0
+ progress()
+ elseif id == marginkern_code then
+ -- not in lmtx
+ wd = getwidth(current)
+ ht = 0
+ dp = 0
+ progress()
+ else
+-- print(nodecodes[id])
+ end
+ current = getnext(current)
+ end
+ end
+
+ process(current)
+
+ return {
+ heights = heights,
+ depths = depths,
+ min = min, -- not needed
+ max = max,
+ step = step,
+ }
+
+end
+
+profiling.get = getprofile
+
+local function getpagelist()
+ local pagehead = texlists.page_head
+ if pagehead then
+ pagehead = tonut(texlists.page_head)
+ pagetail = find_node_tail(pagehead)
+ else
+ pagetail = nil
+ end
+ return pagehead, pagetail
+end
+
+local function setprofile(n,step)
+ local p = rawget(properties,n)
+ if p then
+ local pp = p.profile
+ if not pp then
+ pp = getprofile(n,step)
+ p.profile = pp
+ end
+ return pp
+ else
+ local pp = getprofile(n,step)
+ properties[n] = { profile = pp }
+ return pp
+ end
+end
+
+local function hasprofile(n)
+ local p = rawget(properties,n)
+ if p then
+ return p.profile
+ end
+end
+
+local function addstring(height,depth)
+ local typesetters = nuts.typesetters
+ local hashes = fonts.hashes
+ local infofont = fonts.infofont()
+ local emwidth = hashes.emwidths [infofont]
+ local exheight = hashes.exheights[infofont]
+ local httext = height
+ local dptext = depth
+ local httext = typesetters.tohpack(height,infofont)
+ local dptext = typesetters.tohpack(depth,infofont)
+ setshift(httext,- 1.2 * exheight)
+ setshift(dptext, 0.6 * exheight)
+ local text = hpack_nodes(setlink(
+ new_kern(-getwidth(httext)-emwidth),
+ httext,
+ new_kern(-getwidth(dptext)),
+ dptext
+ ))
+ setwhd(text,0,0,0)
+ return text
+end
+
+local function addprofile(node,profile,step)
+
+ local line = tonut(node)
+
+ if not profile then
+ profile = setprofile(line,step)
+ end
+
+ if not profile then
+ report("some error")
+ return node
+ end
+
+ if profile.shown then
+ return node
+ end
+
+ local list = getlist(line)
+ profile.shown = true
+
+ local heights = profile.heights
+ local depths = profile.depths
+ local step = profile.step
+
+ local head = nil
+ local tail = nil
+
+ local lastht = 0
+ local lastdp = 0
+ local lastwd = 0
+
+ local visual = "f:s:t" -- this can change !
+
+ local function progress()
+ if lastwd == 0 then
+ return
+ end
+ local what = nil
+ if lastht == 0 and lastdp == 0 then
+ what = new_kern(lastwd)
+ else
+ what = new_rule(lastwd,lastht,lastdp)
+ setcolor(what,visual)
+ settransparency(what,visual)
+ end
+ if tail then
+ setlink(tail,what)
+ else
+ head = what
+ end
+ tail = what
+ end
+
+-- inspect(profile)
+
+ for i=profile.min,profile.max do
+ local ht = heights[i]
+ local dp = depths[i]
+ if ht ~= lastht or dp ~= lastdp and lastwd > 0 then
+ progress()
+ lastht = ht
+ lastdp = dp
+ lastwd = step
+ else
+ lastwd = lastwd + step
+ end
+ end
+ if lastwd > 0 then
+ progress()
+ end
+
+ local rule = hpack_nodes(head)
+
+ setwhd(rule,0,0,0)
+
+ -- if texttoo then
+ --
+ -- local text = addstring(
+ -- formatters["%0.4f"](getheight(rule)/65536),
+ -- formatters["%0.4f"](getdepth(rule) /65536)
+ -- )
+ --
+ -- setlink(text,rule)
+ --
+ -- rule = text
+ --
+ -- end
+
+ setlink(rule,list)
+ setlist(line,rule)
+
+end
+
+profiling.add = addprofile
+
+local methods = { }
+
+local function getdelta(t_profile,b_profile)
+ local t_heights = t_profile.heights
+ local t_depths = t_profile.depths
+ local t_max = t_profile.max
+ local b_heights = b_profile.heights
+ local b_depths = b_profile.depths
+ local b_max = b_profile.max
+
+ local max = t_max
+ local delta = 0
+
+ if t_max > b_max then
+ for i=b_max+1,t_max do
+ b_depths [i] = 0
+ b_heights[i] = 0
+ end
+ max = t_max
+ elseif b_max > t_max then
+ for i=t_max+1,b_max do
+ t_depths [i] = 0
+ t_heights[i] = 0
+ end
+ max = b_max
+ end
+
+ for i=0,max do
+ local ht = b_heights[i]
+ local dp = t_depths[i]
+ local hd = ht + dp
+ if hd > delta then
+ delta = hd
+ end
+ end
+
+ return delta
+end
+
+-- local properties = theprop(bot)
+-- local unprofiled = properties.unprofiled
+-- if not unprofiled then -- experiment
+-- properties.unprofiled = {
+-- height = height,
+-- strutht = strutht,
+-- }
+-- end
+
+-- lineskip | lineskiplimit
+
+local function inject(top,bot,amount) -- todo: look at penalties
+ local glue = new_glue(amount)
+ --
+ setattr(glue,a_profilemethod,0)
+ setattr(glue,a_visual,getattr(top,a_visual))
+ --
+ setlink(top,glue,bot)
+end
+
+methods[v_none] = function()
+ return false
+end
+
+methods[v_strict] = function(top,bot,t_profile,b_profile,specification)
+
+ local top = tonut(top)
+ local bot = tonut(bot)
+
+ local strutht = specification.height or texdimen.strutht
+ local strutdp = specification.depth or texdimen.strutdp
+ local lineheight = strutht + strutdp
+
+ local depth = getdepth(top)
+ local height = getheight(bot)
+ local total = depth + height
+ local distance = specification.distance or 0
+ local delta = lineheight - total
+
+ -- there is enough room between the lines so we don't need
+ -- to add extra distance
+
+ if delta >= distance then
+ inject(top,bot,delta)
+ return true
+ end
+
+ local delta = getdelta(t_profile,b_profile)
+ local skip = delta - total + distance
+
+ -- we don't want to be too tight so we limit the skip and
+ -- make sure we have at least lineheight
+
+ inject(top,bot,skip)
+ return true
+
+end
+
+-- todo: also set ht/dp of first / last (but what is that)
+
+methods[v_fixed] = function(top,bot,t_profile,b_profile,specification)
+
+ local top = tonut(top)
+ local bot = tonut(bot)
+
+ local strutht = specification.height or texdimen.strutht
+ local strutdp = specification.depth or texdimen.strutdp
+ local lineheight = strutht + strutdp
+
+ local depth = getdepth(top)
+ local height = getheight(bot)
+ local total = depth + height
+ local distance = specification.distance or 0
+ local delta = lineheight - total
+
+ local snapmethod = getattr(top,a_snapmethod)
+
+ if snapmethod then
+
+ -- no distance (yet)
+
+ if delta < lineheight then
+ setdepth(top,strutdp)
+ setheight(bot,strutht)
+ return true
+ end
+
+ local delta = getdelta(t_profile,b_profile)
+
+ local dp = strutdp
+ while depth > lineheight - strutdp do
+ depth = depth - lineheight
+ dp = dp + lineheight
+ end
+ setdepth(top,dp)
+ local ht = strutht
+ while height > lineheight - strutht do
+ height = height - lineheight
+ ht = ht + lineheight
+ end
+ setheight(bot,ht)
+ local lines = floor(delta/lineheight)
+ if lines > 0 then
+ inject(top,bot,-lines * lineheight)
+ end
+
+ return true
+
+ end
+
+ if total < lineheight then
+ setdepth(top,strutdp)
+ setheight(bot,strutht)
+ return true
+ end
+
+ if depth < strutdp then
+ setdepth(top,strutdp)
+ total = total - depth + strutdp
+ end
+ if height < strutht then
+ setheight(bot,strutht)
+ total = total - height + strutht
+ end
+
+ local delta = getdelta(t_profile,b_profile)
+
+ local target = total - delta
+ local factor = specification.factor or 1
+ local step = lineheight / factor
+ local correction = 0
+ local nofsteps = 0
+ while correction < target - step - distance do -- a loop is more accurate, for now
+ correction = correction + step
+ nofsteps = nofsteps + 1
+ end
+
+ if trace_profile then
+ report("top line : %s %05i > %s",t_profile.shown and "+" or "-",top,nodes.toutf(getlist(top)))
+ report("bottom line : %s %05i > %s",b_profile.shown and "+" or "-",bot,nodes.toutf(getlist(bot)))
+ report(" depth : %p",depth)
+ report(" height : %p",height)
+ report(" total : %p",total)
+ report(" lineheight : %p",lineheight)
+ report(" delta : %p",delta)
+ report(" target : %p",target)
+ report(" factor : %i",factor)
+ report(" distance : %p",distance)
+ report(" step : %p",step)
+ report(" nofsteps : %i",nofsteps)
+ -- report(" max lines : %s",lines == 0 and "unset" or lines)
+ report(" correction : %p",correction)
+ end
+
+ inject(top,bot,-correction) -- we could mess with the present glue (if present)
+
+ return true -- remove interlineglue
+
+end
+
+function profiling.distance(top,bot,specification)
+ local step = specification.step
+ local method = specification.method
+ local ptop = getprofile(top,step)
+ local pbot = getprofile(bot,step)
+ local action = methods[method or v_strict] or methods[v_strict]
+ return action(top,bot,ptop,pbot,specification)
+end
+
+local specifications = { } -- todo: save these !
+
+function profiling.fixedprofile(current)
+ local a = getattr(current,a_profilemethod)
+ if a then
+ local s = specifications[a]
+ if s then
+ return s.method == v_fixed
+ end
+ end
+ return false
+end
+
+local function profilelist(line,mvl)
+
+ local current = line
+
+ local top = nil
+ local bot = nil
+
+ local t_profile = nil
+ local b_profile = nil
+
+ local specification = nil
+ local lastattr = nil
+ local method = nil
+ local action = nil
+
+ local distance = 0
+ local lastglue = nil
+
+ local pagehead = nil
+ local pagetail = nil
+
+ if mvl then
+
+ pagehead, pagetail = getpagelist()
+
+ if pagetail then
+ local current = pagetail
+ while current do
+ local id = getid(current)
+ if id == hlist_code then
+ local subtype = getsubtype(current)
+ if subtype == linelist_code then
+ t_profile = hasprofile(current)
+ if t_profile then
+ top = current
+ end
+ end
+ break
+ elseif id == glue_code then
+ local wd = getwidth(current)
+ if not wd or wd == 0 then
+ -- go on
+ else
+ break
+ end
+ elseif id == penalty_code then
+ -- ok
+ else
+ break
+ end
+ current = getnext(current)
+ end
+ end
+
+ end
+
+ while current do
+
+ local attr = getattr(current,a_profilemethod)
+
+ if attr then
+
+ if attr ~= lastattr then
+ specification = specifications[attr]
+ method = specification and specification.method
+ action = method and methods[method] or methods[v_strict]
+ lastattr = attr
+ end
+
+ local id = getid(current)
+
+ if id == hlist_code then -- check subtype
+ local subtype = getsubtype(current)
+ if subtype == linelist_code then
+ if top == current then
+ -- skip
+ bot = nil -- to be sure
+ elseif top then
+ bot = current
+ b_profile = setprofile(bot)
+ if show_profile then
+ addprofile(bot,b_profile)
+ end
+ if not t_profile.done then
+ if action then
+ local ok = action(top,bot,t_profile,b_profile,specification)
+ if ok and lastglue and distance ~= 0 then
+ setglue(lastglue)
+ end
+ end
+ t_profile.done = true
+ end
+ top = bot
+ bot = nil
+ t_profile = b_profile
+ b_profile = nil
+ distance = 0
+ else
+ top = current
+ t_profile = setprofile(top)
+ bot = nil
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == glue_code then
+ if top then
+ local subtype = getsubtype(current)
+ -- if subtype == lineskip_code or subtype == baselineskip_code then
+ local wd = getwidth(current)
+ if wd > 0 then
+ distance = wd
+ lastglue = current
+ elseif wd < 0 then
+ top = nil
+ bot = nil
+ else
+ -- ok
+ end
+ -- else
+ -- top = nil
+ -- bot = nil
+ -- end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == penalty_code then
+ -- okay
+ else
+ top = nil
+ bot = nil
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ current = getnext(current)
+ end
+ if top then
+ t_profile = setprofile(top)
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ end
+end
+
+profiling.list = profilelist
+
+local enabled = false
+
+function profiling.set(specification)
+ if not enabled then
+ enableaction("mvlbuilders", "builders.profiling.pagehandler")
+ -- too expensive so we expect that this happens explicitly, we keep for reference:
+ -- enableaction("vboxbuilders","builders.profiling.vboxhandler")
+ enabled = true
+ end
+ local n = #specifications + 1
+ specifications[n] = specification
+ settexattribute(a_profilemethod,n)
+end
+
+function profiling.profilebox(specification)
+ local boxnumber = specification.box
+ local current = getlist(gettexbox(boxnumber))
+ local top = nil
+ local bot = nil
+ local t_profile = nil
+ local b_profile = nil
+ local method = specification and specification.method
+ local action = method and methods[method] or methods[v_strict]
+ local lastglue = nil
+ local distance = 0
+ while current do
+ local id = getid(current)
+ if id == hlist_code then
+ local subtype = getsubtype(current)
+ if subtype == linelist_code then
+ if top then
+ bot = current
+ b_profile = setprofile(bot)
+ if show_profile then
+ addprofile(bot,b_profile)
+ end
+ if not t_profile.done then
+ if action then
+ local ok = action(top,bot,t_profile,b_profile,specification)
+ if ok and lastglue and distance ~= 0 then
+ setglue(lastglue)
+ end
+ end
+ t_profile.done = true
+ end
+ top = bot
+ t_profile = b_profile
+ b_profile = nil
+ distance = 0
+ else
+ top = current
+ t_profile = setprofile(top)
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ bot = nil
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == glue_code then
+ local subtype = getsubtype(current)
+ if subtype == lineskip_code or subtype == baselineskip_code then
+ if top then
+ local wd = getwidth(current)
+ if wd > 0 then
+ distance = wd
+ lastglue = current
+ elseif wd < 0 then
+ top = nil
+ bot = nil
+ else
+ -- ok
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ else
+ top = nil
+ bot = nil
+ end
+ elseif id == penalty_code then
+ -- okay
+ else
+ top = nil
+ bot = nil
+ end
+ current = getnext(current)
+ end
+
+ if top then
+ t_profile = setprofile(top) -- not needed
+ if show_profile then
+ addprofile(top,t_profile)
+ end
+ end
+
+end
+
+-- local ignore = table.tohash {
+-- "split_keep",
+-- "split_off",
+-- -- "vbox",
+-- }
+--
+-- function profiling.vboxhandler(head,where)
+-- if head and not ignore[where] then
+-- if getnext(head) then
+-- profilelist(head)
+-- end
+-- end
+-- return head
+-- end
+
+function profiling.pagehandler(head)
+ if head then
+ profilelist(head,true)
+ end
+ return head
+end
+
+interfaces.implement {
+ name = "setprofile",
+ actions = profiling.set,
+ arguments = {
+ {
+ { "name" },
+ { "height", "dimen" },
+ { "depth", "dimen" },
+ { "distance", "dimen" },
+ { "factor", "integer" },
+ { "lines", "integer" },
+ { "method" }
+ }
+ }
+}
+
+interfaces.implement {
+ name = "profilebox",
+ actions = profiling.profilebox,
+ arguments = {
+ {
+ { "box", "integer" },
+ { "height", "dimen" },
+ { "depth", "dimen" },
+ { "distance", "dimen" },
+ { "factor", "integer" },
+ { "lines", "integer" },
+ { "method" }
+ }
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-prf.mklx b/Master/texmf-dist/tex/context/base/mkxl/spac-prf.mklx
new file mode 100644
index 00000000000..6b4a966f2af
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-prf.mklx
@@ -0,0 +1,113 @@
+%D \module
+%D [ file=spac-prf,
+%D version=2015.11.16, % moved from test module mathplus
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Profiling,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Profiling}
+
+%D This is experimental code that we need for a project. The interface and details
+%D can change. I moved it into the core because that way we can use it on servers.
+
+% framed: first reflow then profile
+
+\unprotect
+
+\registerctxluafile{spac-prf}{autosuffix}
+
+\definesystemattribute[profilemethod][public]
+
+\installcorenamespace {profile}
+\installcorenamespace {profiles}
+
+\installcommandhandler \??profile {profile} \??profile
+
+\setupprofile
+ [\c!height=\strutht,
+ \c!depth=\strutdp,
+ \c!distance=\normallineskip,
+ \c!lines=\zerocount,
+ \c!factor=\plusone]
+
+\defineprofile
+ [\v!strict]
+ [\c!method=\v!strict]
+
+\defineprofile
+ [\v!fixed]
+ [\c!method=\v!fixed]
+
+\defineprofile
+ [\v!none]
+ [\c!method=\v!none,
+ \c!height=\zeropoint,
+ \c!depth=\zeropoint,
+ \c!distance=\zeropoint,
+ \c!factor=\plusone]
+
+\defineprofile[halffixed] [\v!fixed][\c!factor=\plustwo]
+\defineprofile[quarterfixed][\v!fixed][\c!factor=\plusfour]
+\defineprofile[eightsfixed] [\v!fixed][\c!factor=\pluseight]
+
+\permanent\protected\def\setprofile[#profile]%
+ {\edef\currentprofile{#profile}%
+ \clf_setprofile
+ name {\currentprofile}%
+ height \dimexpr\profileparameter\c!height\relax
+ depth \dimexpr\profileparameter\c!depth\relax
+ distance \dimexpr\profileparameter\c!distance\relax
+ factor \numexpr\profileparameter\c!factor\relax
+ lines \numexpr\profileparameter\c!lines\relax
+ method {\profileparameter\c!method}%
+ \relax}
+
+\permanent\protected\def\resetprofile
+ {\c_attr_profilemethod\attributeunsetvalue}
+
+\permanent\protected\def\useprofileparameter#getparameter%
+ {\edef\m_spac_profile_asked{#getparameter\c!profile}%
+ \ifempty\m_spac_profile_asked
+ \resetprofile
+ \else
+ \setprofile[\m_spac_profile_asked]%
+ \fi}
+
+\permanent\tolerant\protected\def\profiledbox[#profile]#spacer[#settings]%
+ {\vbox\bgroup
+ \ifparameter#settings\or
+ \edef\currentprofile{#profile}%
+ \setupcurrentprofile[#settings]%
+ \orelse\ifhastok={#profile}%
+ \let\currentprofile\v!none
+ \setupcurrentprofile[#profile]%
+ \else
+ \edef\currentprofile{#profile}%
+ \fi
+ \dowithnextbox
+ {\profilegivenbox\currentprofile\nextbox
+ \unvbox\nextbox
+ \egroup}%
+ \vbox}
+
+\permanent\protected\def\profilegivenbox#profile#box%
+ {\begingroup
+ \edef\currentprofile{#profile}%
+ \clf_profilebox
+ box \numexpr#box\relax
+ height \dimexpr\profileparameter\c!height\relax
+ depth \dimexpr\profileparameter\c!depth\relax
+ distance \dimexpr\profileparameter\c!distance\relax
+ factor \numexpr\profileparameter\c!factor\relax
+ lines \numexpr\profileparameter\c!lines\relax
+ method {\profileparameter\c!method}%
+ \relax
+ \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/spac-ver.lmt b/Master/texmf-dist/tex/context/base/mkxl/spac-ver.lmt
new file mode 100644
index 00000000000..2d4aace2437
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-ver.lmt
@@ -0,0 +1,2516 @@
+if not modules then modules = { } end modules ['spac-ver'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to spac-ver.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- we also need to call the spacer for inserts!
+
+-- somehow lists still don't always have proper prev nodes so i need to
+-- check all of the luatex code some day .. maybe i should replece the
+-- whole mvl handler by lua code .. why not
+
+-- todo: use lua nodes with lua data (>0.79)
+-- see ** can go when 0.79
+
+-- needs to be redone, too many calls and tests now ... still within some
+-- luatex limitations
+
+-- this code dates from the beginning and is kind of experimental; it
+-- will be optimized and improved soon .. it's way too complex now but
+-- dates from less possibilities
+--
+-- the collapser will be redone with user nodes; also, we might get make
+-- parskip into an attribute and appy it explicitly thereby getting rid
+-- of automated injections; eventually i want to get rid of the currently
+-- still needed tex -> lua -> tex > lua chain (needed because we can have
+-- expandable settings at the tex end
+
+-- todo: strip baselineskip around display math
+
+local next, type, tonumber = next, type, tonumber
+local gmatch, concat = string.gmatch, table.concat
+local ceil, floor, abs = math.ceil, math.floor, math.abs
+local lpegmatch = lpeg.match
+local unpack = unpack or table.unpack
+local allocate = utilities.storage.allocate
+local todimen = string.todimen
+local formatters = string.formatters
+
+local nodes = nodes
+local trackers = trackers
+local attributes = attributes
+local context = context
+local tex = tex
+
+local texlists = tex.lists
+local texget = tex.get
+local texgetcount = tex.getcount
+local texgetdimen = tex.getdimen
+local texgetglue = tex.getglue
+local texset = tex.set
+local texsetdimen = tex.setdimen
+local texsetcount = tex.setcount
+local texnest = tex.nest
+local texgetbox = tex.getbox
+
+local buildpage = tex.triggerbuildpage
+
+local variables = interfaces.variables
+local implement = interfaces.implement
+
+local v_local = variables["local"]
+local v_global = variables["global"]
+local v_box = variables.box
+----- v_page = variables.page -- reserved for future use
+local v_split = variables.split
+local v_min = variables.min
+local v_max = variables.max
+local v_none = variables.none
+local v_line = variables.line
+local v_noheight = variables.noheight
+local v_nodepth = variables.nodepth
+local v_line = variables.line
+local v_halfline = variables.halfline
+local v_line_m = "-" .. v_line
+local v_halfline_m = "-" .. v_halfline
+local v_first = variables.first
+local v_last = variables.last
+local v_top = variables.top
+local v_bottom = variables.bottom
+local v_minheight = variables.minheight
+local v_maxheight = variables.maxheight
+local v_mindepth = variables.mindepth
+local v_maxdepth = variables.maxdepth
+local v_offset = variables.offset
+local v_strut = variables.strut
+
+local v_hfraction = variables.hfraction
+local v_dfraction = variables.dfraction
+local v_bfraction = variables.bfraction
+local v_tlines = variables.tlines
+local v_blines = variables.blines
+
+-- vertical space handler
+
+local trace_vbox_vspacing = false trackers.register("vspacing.vbox", function(v) trace_vbox_vspacing = v end)
+local trace_page_vspacing = false trackers.register("vspacing.page", function(v) trace_page_vspacing = v end)
+local trace_page_builder = false trackers.register("builders.page", function(v) trace_page_builder = v end)
+local trace_collect_vspacing = false trackers.register("vspacing.collect", function(v) trace_collect_vspacing = v end)
+local trace_vspacing = false trackers.register("vspacing.spacing", function(v) trace_vspacing = v end)
+local trace_vsnapping = false trackers.register("vspacing.snapping", function(v) trace_vsnapping = v end)
+local trace_specials = false trackers.register("vspacing.specials", function(v) trace_specials = v end)
+
+local remove_math_skips = true directives.register("vspacing.removemathskips", function(v) remnove_math_skips = v end)
+
+local report_vspacing = logs.reporter("vspacing","spacing")
+local report_collapser = logs.reporter("vspacing","collapsing")
+local report_snapper = logs.reporter("vspacing","snapping")
+local report_specials = logs.reporter("vspacing","specials")
+
+local a_skipcategory = attributes.private('skipcategory')
+local a_skippenalty = attributes.private('skippenalty')
+local a_skiporder = attributes.private('skiporder')
+local a_snapmethod = attributes.private('snapmethod')
+local a_snapvbox = attributes.private('snapvbox')
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local setlink = nuts.setlink
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getattr = nuts.getattr
+local getattrs = nuts.getattrs
+local setattr = nuts.setattr
+local getsubtype = nuts.getsubtype
+local getbox = nuts.getbox
+local getwhd = nuts.getwhd
+local setwhd = nuts.setwhd
+local getprop = nuts.getprop
+local setprop = nuts.setprop
+local getglue = nuts.getglue
+local setglue = nuts.setglue
+local getkern = nuts.getkern
+local getpenalty = nuts.getpenalty
+local setshift = nuts.setshift
+local setwidth = nuts.setwidth
+local getwidth = nuts.getwidth
+local setheight = nuts.setheight
+local getheight = nuts.getheight
+local setdepth = nuts.setdepth
+local getdepth = nuts.getdepth
+local setnext = nuts.setnext
+
+local find_node_tail = nuts.tail
+local flush_node = nuts.flush_node
+local remove_node = nuts.remove
+local count_nodes = nuts.countall
+local hpack_node = nuts.hpack
+local vpack_node = nuts.vpack
+local start_of_par = nuts.start_of_par
+
+local write_node = nuts.write
+
+local nextnode = nuts.traversers.node
+local nexthlist = nuts.traversers.hlist
+
+local nodereference = nuts.reference
+
+local theprop = nuts.theprop
+
+local listtoutf = nodes.listtoutf
+local nodeidstostring = nodes.idstostring
+
+local nodepool = nuts.pool
+
+local new_penalty = nodepool.penalty
+local new_kern = nodepool.kern
+local new_glue = nodepool.glue
+local new_rule = nodepool.rule
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+----- penaltycodes = nodes.penaltycodes
+----- listcodes = nodes.listcodes
+
+local penalty_code = nodecodes.penalty
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local rule_code = nodecodes.rule
+local par_code = nodecodes.par
+
+local userskip_code = gluecodes.userskip
+local lineskip_code = gluecodes.lineskip
+local baselineskip_code = gluecodes.baselineskip
+local parskip_code = gluecodes.parskip
+local topskip_code = gluecodes.topskip
+local splittopskip_code = gluecodes.splittopskip
+
+local linelist_code = nodes.listcodes.line
+
+local properties = nodes.properties.data
+
+local vspacing = builders.vspacing or { }
+builders.vspacing = vspacing
+
+local vspacingdata = vspacing.data or { }
+vspacing.data = vspacingdata
+
+local snapmethods = vspacingdata.snapmethods or { }
+vspacingdata.snapmethods = snapmethods
+
+storage.register("builders/vspacing/data/snapmethods", snapmethods, "builders.vspacing.data.snapmethods")
+
+do
+
+ local default = {
+ [v_maxheight] = true,
+ [v_maxdepth] = true,
+ [v_strut] = true,
+ [v_hfraction] = 1,
+ [v_dfraction] = 1,
+ [v_bfraction] = 0.25,
+ }
+
+ local fractions = {
+ [v_minheight] = v_hfraction, [v_maxheight] = v_hfraction,
+ [v_mindepth] = v_dfraction, [v_maxdepth] = v_dfraction,
+ [v_box] = v_bfraction,
+ [v_top] = v_tlines, [v_bottom] = v_blines,
+ }
+
+ local values = {
+ offset = "offset"
+ }
+
+ local colonsplitter = lpeg.splitat(":")
+
+ local function listtohash(str)
+ local t = { }
+ for s in gmatch(str,"[^, ]+") do
+ local key, detail = lpegmatch(colonsplitter,s)
+ local v = variables[key]
+ if v then
+ t[v] = true
+ if detail then
+ local k = fractions[key]
+ if k then
+ detail = tonumber("0" .. detail)
+ if detail then
+ t[k] = detail
+ end
+ else
+ k = values[key]
+ if k then
+ detail = todimen(detail)
+ if detail then
+ t[k] = detail
+ end
+ end
+ end
+ end
+ else
+ detail = tonumber("0" .. key)
+ if detail then
+ t[v_hfraction] = detail
+ t[v_dfraction] = detail
+ end
+ end
+ end
+ if next(t) then
+ t[v_hfraction] = t[v_hfraction] or 1
+ t[v_dfraction] = t[v_dfraction] or 1
+ return t
+ else
+ return default
+ end
+ end
+
+ function vspacing.definesnapmethod(name,method)
+ local n = #snapmethods + 1
+ local t = listtohash(method)
+ snapmethods[n] = t
+ t.name = name -- not interfaced
+ t.specification = method -- not interfaced
+ context(n)
+ end
+
+end
+
+local function validvbox(parentid,list)
+ if parentid == hlist_code then
+ local id = getid(list)
+ if id == par_code and start_of_par(list) then
+ list = getnext(list)
+ if not next then
+ return nil
+ end
+ end
+ local done = nil
+ for n, id in nextnode, list do
+ if id == vlist_code or id == hlist_code then
+ if done then
+ return nil
+ else
+ done = n
+ end
+ elseif id == glue_code or id == penalty_code then
+ -- go on
+ else
+ return nil -- whatever
+ end
+ end
+ if done then
+ local id = getid(done)
+ if id == hlist_code then
+ return validvbox(id,getlist(done))
+ end
+ end
+ return done -- only one vbox
+ end
+end
+
+local function already_done(parentid,list,a_snapmethod) -- todo: done when only boxes and all snapped
+ -- problem: any snapped vbox ends up in a line
+ if list and parentid == hlist_code then
+ local id = getid(list)
+ if id == par_code and start_of_par(list) then
+ list = getnext(list)
+ if not list then
+ return false
+ end
+ end
+ for n, id in nextnode, list do
+ if id == hlist_code or id == vlist_code then
+ -- local a = getattr(n,a_snapmethod)
+ -- if not a then
+ -- -- return true -- not snapped at all
+ -- elseif a == 0 then
+ -- return true -- already snapped
+ -- end
+ local p = getprop(n,"snapper")
+ if p then
+ return p
+ end
+ elseif id == glue_code or id == penalty_code then -- or id == kern_code then
+ -- go on
+ else
+ return false -- whatever
+ end
+ end
+ end
+ return false
+end
+
+-- quite tricky: ceil(-something) => -0
+
+local function ceiled(n)
+ if n < 0 or n < 0.01 then
+ return 0
+ else
+ return ceil(n)
+ end
+end
+
+local function floored(n)
+ if n < 0 or n < 0.01 then
+ return 0
+ else
+ return floor(n)
+ end
+end
+
+-- check variables.none etc
+
+local function fixedprofile(current)
+ local profiling = builders.profiling
+ return profiling and profiling.fixedprofile(current)
+end
+
+local function snap_hlist(where,current,method,height,depth) -- method[v_strut] is default
+ if fixedprofile(current) then
+ return
+ end
+ local list = getlist(current)
+ local t = trace_vsnapping and { }
+ if t then
+ t[#t+1] = formatters["list content: %s"](listtoutf(list))
+ t[#t+1] = formatters["snap method: %s"](method.name) -- not interfaced
+ t[#t+1] = formatters["specification: %s"](method.specification) -- not interfaced
+ end
+ local snapht, snapdp
+ if method[v_local] then
+ -- snapping is done immediately here
+ snapht = texgetdimen("bodyfontstrutheight")
+ snapdp = texgetdimen("bodyfontstrutdepth")
+ if t then
+ t[#t+1] = formatters["local: snapht %p snapdp %p"](snapht,snapdp)
+ end
+ elseif method[v_global] then
+ snapht = texgetdimen("globalbodyfontstrutheight")
+ snapdp = texgetdimen("globalbodyfontstrutdepth")
+ if t then
+ t[#t+1] = formatters["global: snapht %p snapdp %p"](snapht,snapdp)
+ end
+ else
+ -- maybe autolocal
+ -- snapping might happen later in the otr
+ snapht = texgetdimen("globalbodyfontstrutheight")
+ snapdp = texgetdimen("globalbodyfontstrutdepth")
+ local lsnapht = texgetdimen("bodyfontstrutheight")
+ local lsnapdp = texgetdimen("bodyfontstrutdepth")
+ if snapht ~= lsnapht and snapdp ~= lsnapdp then
+ snapht, snapdp = lsnapht, lsnapdp
+ end
+ if t then
+ t[#t+1] = formatters["auto: snapht %p snapdp %p"](snapht,snapdp)
+ end
+ end
+
+ local wd, ht, dp = getwhd(current)
+
+ local h = (method[v_noheight] and 0) or height or ht
+ local d = (method[v_nodepth] and 0) or depth or dp
+ local hr = method[v_hfraction] or 1
+ local dr = method[v_dfraction] or 1
+ local br = method[v_bfraction] or 0
+ local ch = h
+ local cd = d
+ local tlines = method[v_tlines] or 1
+ local blines = method[v_blines] or 1
+ local done = false
+ local plusht = snapht
+ local plusdp = snapdp
+ local snaphtdp = snapht + snapdp
+ local extra = 0
+
+ if t then
+ t[#t+1] = formatters["hlist: wd %p ht %p (used %p) dp %p (used %p)"](wd,ht,h,dp,d)
+ t[#t+1] = formatters["fractions: hfraction %s dfraction %s bfraction %s tlines %s blines %s"](hr,dr,br,tlines,blines)
+ end
+
+ if method[v_box] then
+ local br = 1 - br
+ if br < 0 then
+ br = 0
+ elseif br > 1 then
+ br = 1
+ end
+ local n = ceiled((h+d-br*snapht-br*snapdp)/snaphtdp)
+ local x = n * snaphtdp - h - d
+ plusht = h + x / 2
+ plusdp = d + x / 2
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_box,plusht,plusdp)
+ end
+ elseif method[v_max] then
+ local n = ceiled((h+d)/snaphtdp)
+ local x = n * snaphtdp - h - d
+ plusht = h + x / 2
+ plusdp = d + x / 2
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_max,plusht,plusdp)
+ end
+ elseif method[v_min] then
+ -- we catch a lone min
+ if method.specification ~= v_min then
+ local n = floored((h+d)/snaphtdp)
+ local x = n * snaphtdp - h - d
+ plusht = h + x / 2
+ plusdp = d + x / 2
+ if plusht < 0 then
+ plusht = 0
+ end
+ if plusdp < 0 then
+ plusdp = 0
+ end
+ end
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_min,plusht,plusdp)
+ end
+ elseif method[v_none] then
+ plusht, plusdp = 0, 0
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_none,0,0)
+ end
+ end
+ -- for now, we actually need to tag a box and then check at several points if something ended up
+ -- at the top of a page
+ if method[v_halfline] then -- extra halfline
+ extra = snaphtdp/2
+ plusht = plusht + extra
+ plusdp = plusdp + extra
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_halfline,plusht,plusdp)
+ end
+ end
+ if method[v_line] then -- extra line
+ extra = snaphtdp
+ plusht = plusht + extra
+ plusdp = plusdp + extra
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_line,plusht,plusdp)
+ end
+ end
+ if method[v_halfline_m] then -- extra halfline
+ extra = - snaphtdp/2
+ plusht = plusht + extra
+ plusdp = plusdp + extra
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_halfline_m,plusht,plusdp)
+ end
+ end
+ if method[v_line_m] then -- extra line
+ extra = - snaphtdp
+ plusht = plusht + extra
+ plusdp = plusdp + extra
+ if t then
+ t[#t+1] = formatters["%s: plusht %p plusdp %p"](v_line_m,plusht,plusdp)
+ end
+ end
+ if method[v_first] then
+ local thebox = current
+ local id = getid(thebox)
+ if id == hlist_code then
+ thebox = validvbox(id,getlist(thebox))
+ id = thebox and getid(thebox)
+ end
+ if thebox and id == vlist_code then
+ local list = getlist(thebox)
+ local lw, lh, ld
+ for n in nexthlist, list do
+ lw, lh, ld = getwhd(n)
+ break
+ end
+ if lh then
+ local wd, ht, dp = getwhd(thebox)
+ if t then
+ t[#t+1] = formatters["first line: height %p depth %p"](lh,ld)
+ t[#t+1] = formatters["dimensions: height %p depth %p"](ht,dp)
+ end
+ local delta = h - lh
+ ch, cd = lh, delta + d
+ h, d = ch, cd
+ local shifted = hpack_node(getlist(current))
+ setshift(shifted,delta)
+ setlist(current,shifted)
+ done = true
+ if t then
+ t[#t+1] = formatters["first: height %p depth %p shift %p"](ch,cd,delta)
+ end
+ elseif t then
+ t[#t+1] = "first: not done, no content"
+ end
+ elseif t then
+ t[#t+1] = "first: not done, no vbox"
+ end
+ elseif method[v_last] then
+ local thebox = current
+ local id = getid(thebox)
+ if id == hlist_code then
+ thebox = validvbox(id,getlist(thebox))
+ id = thebox and getid(thebox)
+ end
+ if thebox and id == vlist_code then
+ local list = getlist(thebox)
+ local lw, lh, ld
+ for n in nexthlist, list do
+ lw, lh, ld = getwhd(n)
+ end
+ if lh then
+ local wd, ht, dp = getwhd(thebox)
+ if t then
+ t[#t+1] = formatters["last line: height %p depth %p" ](lh,ld)
+ t[#t+1] = formatters["dimensions: height %p depth %p"](ht,dp)
+ end
+ local delta = d - ld
+ cd, ch = ld, delta + h
+ h, d = ch, cd
+ local shifted = hpack_node(getlist(current))
+ setshift(shifted,delta)
+ setlist(current,shifted)
+ done = true
+ if t then
+ t[#t+1] = formatters["last: height %p depth %p shift %p"](ch,cd,delta)
+ end
+ elseif t then
+ t[#t+1] = "last: not done, no content"
+ end
+ elseif t then
+ t[#t+1] = "last: not done, no vbox"
+ end
+ end
+ if method[v_minheight] then
+ ch = floored((h-hr*snapht)/snaphtdp)*snaphtdp + plusht
+ if t then
+ t[#t+1] = formatters["minheight: %p"](ch)
+ end
+ elseif method[v_maxheight] then
+ ch = ceiled((h-hr*snapht)/snaphtdp)*snaphtdp + plusht
+ if t then
+ t[#t+1] = formatters["maxheight: %p"](ch)
+ end
+ else
+ ch = plusht
+ if t then
+ t[#t+1] = formatters["set height: %p"](ch)
+ end
+ end
+ if method[v_mindepth] then
+ cd = floored((d-dr*snapdp)/snaphtdp)*snaphtdp + plusdp
+ if t then
+ t[#t+1] = formatters["mindepth: %p"](cd)
+ end
+ elseif method[v_maxdepth] then
+ cd = ceiled((d-dr*snapdp)/snaphtdp)*snaphtdp + plusdp
+ if t then
+ t[#t+1] = formatters["maxdepth: %p"](cd)
+ end
+ else
+ cd = plusdp
+ if t then
+ t[#t+1] = formatters["set depth: %p"](cd)
+ end
+ end
+ if method[v_top] then
+ ch = ch + tlines * snaphtdp
+ if t then
+ t[#t+1] = formatters["top height: %p"](ch)
+ end
+ end
+ if method[v_bottom] then
+ cd = cd + blines * snaphtdp
+ if t then
+ t[#t+1] = formatters["bottom depth: %p"](cd)
+ end
+ end
+ local offset = method[v_offset]
+ if offset then
+ -- we need to set the attr
+ if t then
+ local wd, ht, dp = getwhd(current)
+ t[#t+1] = formatters["before offset: %p (width %p height %p depth %p)"](offset,wd,ht,dp)
+ end
+ local shifted = hpack_node(getlist(current))
+ setshift(shifted,offset)
+ setlist(current,shifted)
+ if t then
+ local wd, ht, dp = getwhd(current)
+ t[#t+1] = formatters["after offset: %p (width %p height %p depth %p)"](offset,wd,ht,dp)
+ end
+ setattr(shifted,a_snapmethod,0)
+ setattr(current,a_snapmethod,0)
+ end
+ if not height then
+ setheight(current,ch)
+ if t then
+ t[#t+1] = formatters["forced height: %p"](ch)
+ end
+ end
+ if not depth then
+ setdepth(current,cd)
+ if t then
+ t[#t+1] = formatters["forced depth: %p"](cd)
+ end
+ end
+ local lines = (ch+cd)/snaphtdp
+ if t then
+ local original = (h+d)/snaphtdp
+ local whatever = (ch+cd)/(texgetdimen("globalbodyfontstrutheight") + texgetdimen("globalbodyfontstrutdepth"))
+ t[#t+1] = formatters["final lines : %p -> %p (%p)"](original,lines,whatever)
+ t[#t+1] = formatters["final height: %p -> %p"](h,ch)
+ t[#t+1] = formatters["final depth : %p -> %p"](d,cd)
+ end
+-- todo:
+--
+-- if h < 0 or d < 0 then
+-- h = 0
+-- d = 0
+-- end
+ if t then
+ report_snapper("trace: %s type %s\n\t%\n\tt",where,nodecodes[getid(current)],t)
+ end
+ if not method[v_split] then
+ -- so extra will not be compensated at the top of a page
+ extra = 0
+ end
+ return h, d, ch, cd, lines, extra
+end
+
+local categories = {
+ [0] = "discard",
+ [1] = "largest",
+ [2] = "force",
+ [3] = "penalty",
+ [4] = "add",
+ [5] = "disable",
+ [6] = "nowhite",
+ [7] = "goback",
+ [8] = "packed",
+ [9] = "overlay",
+ [10] = "enable",
+ [11] = "notopskip",
+}
+
+categories = allocate(table.swapped(categories,categories))
+vspacing.categories = categories
+
+function vspacing.tocategories(str)
+ local t = { }
+ for s in gmatch(str,"[^, ]") do -- use lpeg instead
+ local n = tonumber(s)
+ if n then
+ t[categories[n]] = true
+ else
+ t[b] = true
+ end
+ end
+ return t
+end
+
+function vspacing.tocategory(str) -- can be optimized
+ if type(str) == "string" then
+ return set.tonumber(vspacing.tocategories(str))
+ else
+ return set.tonumber({ [categories[str]] = true })
+ end
+end
+
+vspacingdata.map = vspacingdata.map or { } -- allocate ?
+vspacingdata.skip = vspacingdata.skip or { } -- allocate ?
+
+storage.register("builders/vspacing/data/map", vspacingdata.map, "builders.vspacing.data.map")
+storage.register("builders/vspacing/data/skip", vspacingdata.skip, "builders.vspacing.data.skip")
+
+do
+
+ local P, C, R, S, Cc, Cs = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cc, lpeg.Cs
+
+ vspacing.fixed = false
+
+ local map = vspacingdata.map
+ local skip = vspacingdata.skip
+
+ local sign = S("+-")^0
+ local multiplier = C(sign * R("09")^1) * P("*")
+ local singlefier = Cs(sign * Cc(1))
+ local separator = S(", ")
+ local category = P(":") * C((1-separator)^1)
+ local keyword = C((1-category-separator)^1)
+ local splitter = (multiplier + Cc(1)) * keyword * (category + Cc(false))
+
+ local k_fixed = variables.fixed
+ local k_flexible = variables.flexible
+ local k_category = "category"
+ local k_penalty = "penalty"
+ local k_order = "order"
+
+ function vspacing.setmap(from,to)
+ map[from] = to
+ end
+
+ function vspacing.setskip(key,value,grid)
+ if value ~= "" then
+ if grid == "" then grid = value end
+ skip[key] = { value, grid }
+ end
+ end
+
+ local expandmacro = token.expand_macro
+ -- local runlocal = tex.runlocal
+ -- local setmacro = tokens.setters.macro
+ -- local settoks = tex.settoks
+ local toscaled = tex.toscaled
+
+ local setattrs = nuts.setattrs
+
+ local b_done = false
+ local b_packed = false
+
+ local b_amount = 0
+ local b_stretch = 0
+ local b_shrink = 0
+ local b_category = false
+ local b_penalty = false
+ local b_order = false
+ local b_fixed = false
+ local b_grid = false
+
+ local pattern = nil
+
+ local packed = categories.packed
+
+ local gluefactor = .25
+
+ local ctx_ignoreparskip = context.core.ignoreparskip
+
+ local function before()
+ b_amount = 0
+ b_stretch = 0
+ b_shrink = 0
+ b_category = 1
+ b_penalty = false
+ b_order = false
+ b_fixed = b_grid
+ end
+
+ local function after()
+ if b_fixed then
+ b_stretch = 0
+ b_shrink = 0
+ else
+ b_stretch = gluefactor * b_amount
+ b_shrink = gluefactor * b_amount
+ end
+ end
+
+ -- use a cache for predefined ones
+
+ local function inject()
+ local n = new_glue(b_amount,b_stretch,b_shrink)
+ setattrs(n,false,a_skipcategory,b_category,a_skippenalty,b_penalty,a_skiporder,b_order or 1)
+ write_node(n)
+ end
+
+ local function flush()
+ after()
+ if b_done then
+ inject()
+ b_done = false
+ end
+ before()
+ end
+
+ -- local cmd = token.create("vspacingfromtempstring")
+ -- local cmd = token.create("vspacingpredefinedvalue") -- not yet known
+
+ local function handler(multiplier, keyword, detail)
+ if not keyword then
+ report_vspacing("unknown directive %a",s)
+ else
+ local mk = map[keyword]
+ if mk then
+ lpegmatch(pattern,mk)
+ elseif keyword == k_fixed then
+ b_fixed = true
+ elseif keyword == k_flexible then
+ b_flexible = false
+ elseif keyword == k_category then
+ local category = tonumber(detail)
+ if category == packed then
+ b_packed = true
+ elseif category then
+ b_category = category
+ b_done = true
+ flush()
+ end
+ elseif keyword == k_order and detail then
+ local order = tonumber(detail)
+ if order then
+ b_order = order
+ end
+ elseif keyword == k_penalty and detail then
+ local penalty = tonumber(detail)
+ if penalty then
+ flush()
+ b_done = true
+ b_category = 3
+ b_penalty = penalty
+ flush()
+ end
+ else
+ local amount, stretch, shrink
+ multiplier = tonumber(multiplier) or 1
+ local sk = skip[keyword]
+ if sk then
+ -- multiplier, keyword
+ -- best, for now, todo: runlocal with arguments
+ expandmacro("vspacingpredefinedvalue",true,keyword)
+ -- expandmacro(cmd,true,keyword)
+ -- setmacro("tempstring",keyword)
+ -- runlocal(cmd)
+ -- nicest
+ -- runlocal(cache[keyword])
+ -- fast
+ -- settoks("scratchtoks",keyword)
+ -- runlocal("vspacingfromscratchtoks")
+ -- middleground
+ -- setmacro("tempstring",keyword)
+ -- runlocal(ctx_vspacingfromtempstring)
+ --
+ amount, stretch, shrink = texgetglue("scratchskip")
+ if not stretch then
+ stretch = 0
+ end
+ if not shrink then
+ shrink = 0
+ end
+ if stretch == 0 and shrink == 0 then
+ stretch = gluefactor * amount -- always unless grid
+ shrink = stretch -- always unless grid
+ end
+ else -- no check, todo: parse plus and minus
+ amount = toscaled(keyword)
+ stretch = gluefactor * amount -- always unless grid
+ shrink = stretch -- always unless grid
+ end
+ -- we look at fixed later
+ b_amount = b_amount + multiplier * amount
+ b_stretch = b_stretch + multiplier * stretch
+ b_shrink = b_shrink + multiplier * shrink
+ b_done = true
+ end
+ end
+ end
+
+ -- alternatively we can make a table and have a keyword -> split cache but this is probably
+ -- not really a bottleneck
+
+ local splitter = ((multiplier + singlefier) * keyword * (category + Cc(false))) / handler
+ pattern = (splitter + separator^1)^0
+
+ function vspacing.inject(grid,str)
+ if trace_vspacing then
+ -- ctx_pushlogger(report_vspacing)
+ end
+ b_done = false
+ b_packed = false
+ b_grid = grid
+ before()
+ lpegmatch(pattern,str)
+ after()
+ if b_done then
+ inject()
+ end
+ if b_packed then
+ ctx_ignoreparskip()
+ end
+ if trace_vspacing then
+ -- ctx_poplogger()
+ end
+ end
+
+ function vspacing.injectpenalty(penalty)
+ local n = new_glue()
+ setattrs(n,false,a_skipcategory,categories.penalty,a_skippenalty,penalty,a_skiporder,1)
+ write_node(n)
+ end
+
+ function vspacing.injectskip(amount)
+ local n = new_glue(amount)
+ setattrs(n,false,a_skipcategory,categories.largest,a_skippenalty,false,a_skiporder,1)
+ write_node(n)
+ end
+
+ function vspacing.injectdisable(amount)
+ local n = new_glue()
+ setattrs(n,false,a_skipcategory,categories.disable,a_skippenalty,false,a_skiporder,1)
+ write_node(n)
+ end
+
+end
+
+-- implementation
+
+-- alignment box begin_of_par vmode_par hmode_par insert penalty before_display after_display
+
+function vspacing.snapbox(n,how)
+ local sv = snapmethods[how]
+ if sv then
+ local box = getbox(n)
+ local list = getlist(box)
+ if list then
+ local s = getattr(list,a_snapmethod)
+ if s == 0 then
+ if trace_vsnapping then
+ -- report_snapper("box list not snapped, already done")
+ end
+ else
+ local wd, ht, dp = getwhd(box)
+ if false then -- todo: already_done
+ -- assume that the box is already snapped
+ if trace_vsnapping then
+ report_snapper("box list already snapped at (%p,%p): %s",
+ ht,dp,listtoutf(list))
+ end
+ else
+ local h, d, ch, cd, lines, extra = snap_hlist("box",box,sv,ht,dp)
+ setprop(box,"snapper",{
+ ht = h,
+ dp = d,
+ ch = ch,
+ cd = cd,
+ extra = extra,
+ current = current,
+ })
+ setwhd(box,wd,ch,cd)
+ if trace_vsnapping then
+ report_snapper("box list snapped from (%p,%p) to (%p,%p) using method %a (%s) for %a (%s lines): %s",
+ h,d,ch,cd,sv.name,sv.specification,"direct",lines,listtoutf(list))
+ end
+ setattr(box,a_snapmethod,0) --
+ setattr(list,a_snapmethod,0) -- yes or no
+ end
+ end
+ end
+ end
+end
+
+-- I need to figure out how to deal with the prevdepth that crosses pages. In fact,
+-- prevdepth is often quite interfering (even over a next paragraph) so I need to
+-- figure out a trick. Maybe use something other than a rule. If we visualize we'll
+-- see the baselineskip in action:
+--
+-- \blank[force,5*big] { \baselineskip1cm xxxxxxxxx \par } \page
+-- \blank[force,5*big] { \baselineskip1cm xxxxxxxxx \par } \page
+-- \blank[force,5*big] { \baselineskip5cm xxxxxxxxx \par } \page
+
+-- We can register and copy the rule instead.
+
+do
+
+ local insert_node_after = nuts.insert_after
+ local insert_node_before = nuts.insert_before
+
+ local abovedisplayskip_code = gluecodes.abovedisplayskip
+ local belowdisplayskip_code = gluecodes.belowdisplayskip
+ local abovedisplayshortskip_code = gluecodes.abovedisplayshortskip
+ local belowdisplayshortskip_code = gluecodes.belowdisplayshortskip
+
+ local w, h, d = 0, 0, 0
+ ----- w, h, d = 100*65536, 65536, 65536
+
+ local trace_list = { }
+ local tracing_info = { }
+ local before = ""
+ local after = ""
+
+ local function nodes_to_string(head)
+ local current = head
+ local t = { }
+ while current do
+ local id = getid(current)
+ local ty = nodecodes[id]
+ if id == penalty_code then
+ t[#t+1] = formatters["%s:%s"](ty,getpenalty(current))
+ elseif id == glue_code then
+ t[#t+1] = formatters["%s:%s:%p"](ty,gluecodes[getsubtype(current)],getwidth(current))
+ elseif id == kern_code then
+ t[#t+1] = formatters["%s:%p"](ty,getkern(current))
+ else
+ t[#t+1] = ty
+ end
+ current = getnext(current)
+ end
+ return concat(t," + ")
+ end
+
+ local function reset_tracing(head)
+ trace_list, tracing_info, before, after = { }, false, nodes_to_string(head), ""
+ end
+
+ local function trace_skip(str,sc,so,sp,data)
+ trace_list[#trace_list+1] = { "skip", formatters["%s | %p | category %s | order %s | penalty %s"](str, getwidth(data), sc or "-", so or "-", sp or "-") }
+ tracing_info = true
+ end
+
+ local function trace_natural(str,data)
+ trace_list[#trace_list+1] = { "skip", formatters["%s | %p"](str, getwidth(data)) }
+ tracing_info = true
+ end
+
+ local function trace_info(message, where, what)
+ trace_list[#trace_list+1] = { "info", formatters["%s: %s/%s"](message,where,what) }
+ end
+
+ local function trace_node(what)
+ local nt = nodecodes[getid(what)]
+ local tl = trace_list[#trace_list]
+ if tl and tl[1] == "node" then
+ trace_list[#trace_list] = { "node", formatters["%s + %s"](tl[2],nt) }
+ else
+ trace_list[#trace_list+1] = { "node", nt }
+ end
+ end
+
+ local function show_tracing(head)
+ if tracing_info then
+ after = nodes_to_string(head)
+ for i=1,#trace_list do
+ local tag, text = unpack(trace_list[i])
+ if tag == "info" then
+ report_collapser(text)
+ else
+ report_collapser(" %s: %s",tag,text)
+ end
+ end
+ report_collapser("before: %s",before)
+ report_collapser("after : %s",after)
+ end
+ end
+
+ local function trace_done(str,data)
+ if getid(data) == penalty_code then
+ trace_list[#trace_list+1] = { "penalty", formatters["%s | %s"](str,getpenalty(data)) }
+ else
+ trace_list[#trace_list+1] = { "glue", formatters["%s | %p"](str,getwidth(data)) }
+ end
+ tracing_info = true
+ end
+
+ local function forced_skip(head,current,width,where,trace) -- looks old ... we have other tricks now
+ if head == current then
+ if getsubtype(head) == baselineskip_code then
+ width = width - getwidth(head)
+ end
+ end
+ if width == 0 then
+ -- do nothing
+ elseif where == "after" then
+ head, current = insert_node_after(head,current,new_rule(w,h,d))
+ head, current = insert_node_after(head,current,new_kern(width))
+ head, current = insert_node_after(head,current,new_rule(w,h,d))
+ else
+ local c = current
+ head, current = insert_node_before(head,current,new_rule(w,h,d))
+ head, current = insert_node_before(head,current,new_kern(width))
+ head, current = insert_node_before(head,current,new_rule(w,h,d))
+ current = c
+ end
+ if trace then
+ report_vspacing("inserting forced skip of %p",width)
+ end
+ return head, current
+ end
+
+ -- penalty only works well when before skip
+
+ local discard = categories.discard
+ local largest = categories.largest
+ local force = categories.force
+ local penalty = categories.penalty
+ local add = categories.add
+ local disable = categories.disable
+ local nowhite = categories.nowhite
+ local goback = categories.goback
+ local packed = categories.packed
+ local overlay = categories.overlay
+ local enable = categories.enable
+ local notopskip = categories.notopskip
+
+ -- [whatsits][hlist][glue][glue][penalty]
+
+ local special_penalty_min = 32250
+ local special_penalty_max = 35000
+ local special_penalty_xxx = 0
+
+ -- this is rather messy and complex: we want to make sure that successive
+ -- header don't break but also make sure that we have at least a decent
+ -- break when we have succesive ones (often when testing)
+
+ -- todo: mark headers as such so that we can recognize them
+
+ local specialmethods = { }
+ local specialmethod = 1
+
+ specialmethods[1] = function(pagehead,pagetail,start,penalty)
+ --
+ if not pagehead or penalty < special_penalty_min or penalty > special_penalty_max then
+ return
+ end
+ local current = pagetail
+ --
+ -- nodes.showsimplelist(pagehead,0)
+ --
+ if trace_specials then
+ report_specials("checking penalty %a",penalty)
+ end
+ while current do
+ local id = getid(current)
+ if id == penalty_code then
+ local p = properties[current]
+ if p then
+ local p = p.special_penalty
+ if not p then
+ if trace_specials then
+ report_specials(" regular penalty, continue")
+ end
+ elseif p == penalty then
+ if trace_specials then
+ report_specials(" context penalty %a, same level, overloading",p)
+ end
+ return special_penalty_xxx
+ elseif p > special_penalty_min and p < special_penalty_max then
+ if penalty < p then
+ if trace_specials then
+ report_specials(" context penalty %a, lower level, overloading",p)
+ end
+ return special_penalty_xxx
+ else
+ if trace_specials then
+ report_specials(" context penalty %a, higher level, quitting",p)
+ end
+ return
+ end
+ elseif trace_specials then
+ report_specials(" context penalty %a, higher level, continue",p)
+ end
+ else
+ local p = getpenalty(current)
+ if p < 10000 then
+ -- assume some other mechanism kicks in so we seem to have content
+ if trace_specials then
+ report_specials(" regular penalty %a, quitting",p)
+ end
+ break
+ else
+ if trace_specials then
+ report_specials(" regular penalty %a, continue",p)
+ end
+ end
+ end
+ end
+ current = getprev(current)
+ end
+ -- none found, so no reson to be special
+ if trace_specials then
+ if pagetail then
+ report_specials(" context penalty, discarding, nothing special")
+ else
+ report_specials(" context penalty, discarding, nothing preceding")
+ end
+ end
+ return special_penalty_xxx
+ end
+
+ -- This will be replaced after 0.80+ when we have a more robust look-back and
+ -- can look at the bigger picture.
+
+ -- todo: look back and when a special is there before a list is seen penalty keep ut
+
+ -- we now look back a lot, way too often
+
+ -- userskip
+ -- lineskip
+ -- baselineskip
+ -- parskip
+ -- abovedisplayskip
+ -- belowdisplayskip
+ -- abovedisplayshortskip
+ -- belowdisplayshortskip
+ -- topskip
+ -- splittopskip
+
+ -- we could inject a vadjust to force a recalculation .. a mess
+ --
+ -- So, the next is far from robust and okay but for the moment this overlaying
+ -- has to do. Always test this with the examples in spac-ver.mkvi!
+
+ local function snap_topskip(current,method)
+ local w = getwidth(current)
+ setwidth(current,0)
+ return w, 0
+ end
+
+ local function check_experimental_overlay(head,current)
+ local p = nil
+ local c = current
+ local n = nil
+ local function overlay(p,n,mvl)
+ local p_wd, p_ht, p_dp = getwhd(p)
+ local n_wd, n_ht, n_dp = getwhd(n)
+ local skips = 0
+ --
+ -- We deal with this at the tex end .. we don't see spacing .. enabling this code
+ -- is probably harmless but then we need to test it.
+ --
+ -- we could calculate this before we call
+ --
+ -- problem: prev list and next list can be unconnected
+ --
+ local c = getnext(p)
+ local l = c
+ while c and c ~= n do
+ local id = getid(c)
+ if id == glue_code then
+ skips = skips + getwidth(c)
+ elseif id == kern_code then
+ skips = skips + getkern(c)
+ end
+ l = c
+ c = getnext(c)
+ end
+ local c = getprev(n)
+ while c and c ~= n and c ~= l do
+ local id = getid(c)
+ if id == glue_code then
+ skips = skips + getwidth(c)
+ elseif id == kern_code then
+ skips = skips + getkern(c)
+ end
+ c = getprev(c)
+ end
+ --
+ local delta = n_ht + skips + p_dp
+ texsetdimen("global","d_spac_overlay",-delta) -- for tracing
+ -- we should adapt pagetotal ! (need a hook for that) .. now we have the wrong pagebreak
+ local k = new_kern(-delta)
+ head = insert_node_before(head,n,k)
+ if n_ht > p_ht then
+ local k = new_kern(n_ht-p_ht)
+ head = insert_node_before(head,p,k)
+ end
+ if trace_vspacing then
+ report_vspacing("overlaying, prev height: %p, prev depth: %p, next height: %p, skips: %p, move up: %p",p_ht,p_dp,n_ht,skips,delta)
+ end
+ return remove_node(head,current,true)
+ end
+
+ -- goto next line
+ while c do
+ local id = getid(c)
+ if id == glue_code or id == penalty_code or id == kern_code then
+ -- skip (actually, remove)
+ c = getnext(c)
+ elseif id == hlist_code then
+ n = c
+ break
+ else
+ break
+ end
+ end
+ if n then
+ -- we have a next line, goto prev line
+ c = current
+ while c do
+ local id = getid(c)
+ if id == glue_code or id == penalty_code then -- kern ?
+ c = getprev(c)
+ elseif id == hlist_code then
+ p = c
+ break
+ else
+ break
+ end
+ end
+ if not p then
+ if a_snapmethod == a_snapvbox then
+ -- quit, we're not on the mvl
+ else
+ -- inefficient when we're at the end of a page
+ local c = tonut(texlists.page_head)
+ while c and c ~= n do
+ local id = getid(c)
+ if id == hlist_code then
+ p = c
+ end
+ c = getnext(c)
+ end
+ if p and p ~= n then
+ return overlay(p,n,true)
+ end
+ end
+ elseif p ~= n then
+ return overlay(p,n,false)
+ end
+ end
+ -- in fact, we could try again later ... so then no remove (a few tries)
+ return remove_node(head,current,true)
+ end
+
+ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also pass tail
+ if trace then
+ reset_tracing(head)
+ end
+ local current = head
+ local oldhead = head
+ local glue_order = 0
+ local glue_data
+ local force_glue = false
+ local penalty_order = 0
+ local penalty_data
+ local natural_penalty
+ local special_penalty
+ local parskip
+ local ignore_parskip = false
+ local ignore_following = false
+ local ignore_whitespace = false
+ local keep_together = false
+ local lastsnap
+ local pagehead
+ local pagetail
+ --
+ -- todo: keep_together: between headers
+ --
+ local function getpagelist()
+ if not pagehead then
+ pagehead = texlists.page_head
+ if pagehead then
+ pagehead = tonut(pagehead)
+ pagetail = find_node_tail(pagehead) -- no texlists.page_tail yet-- no texlists.page_tail yet
+ end
+ end
+ end
+ --
+ local function compensate(n)
+ local g = 0
+ while n and getid(n) == glue_code do
+ g = g + getwidth(n)
+ n = getnext(n)
+ end
+ if n then
+ local p = getprop(n,"snapper")
+ if p then
+ local extra = p.extra
+ if extra and extra < 0 then -- hm, extra can be unset ... needs checking
+ local h = p.ch -- getheight(n)
+ -- maybe an extra check
+ -- if h - extra < g then
+ setheight(n,h-2*extra)
+ p.extra = 0
+ if trace_vsnapping then
+ report_snapper("removed extra space at top: %p",extra)
+ end
+ -- end
+ end
+ end
+ return n
+ end
+ end
+ --
+ local function removetopsnap()
+ getpagelist()
+ if pagehead then
+ local n = pagehead and compensate(pagehead)
+ if n and n ~= pagetail then
+ local p = getprop(pagetail,"snapper")
+ if p then
+ local e = p.extra
+ if e and e < 0 then
+ local t = texget("pagetotal")
+ if t > 0 then
+ local g = texget("pagegoal") -- 1073741823 is signal
+ local d = g - t
+ if d < -e then
+ local penalty = new_penalty(1000000)
+ setlink(penalty,head)
+ head = penalty
+ report_snapper("force pagebreak due to extra space at bottom: %p",e)
+ end
+ end
+ end
+ end
+ end
+ elseif head then
+ compensate(head)
+ end
+ end
+ --
+ local function getavailable()
+ getpagelist()
+ if pagehead then
+ local t = texget("pagetotal")
+ if t > 0 then
+ local g = texget("pagegoal")
+ return g - t
+ end
+ end
+ return false
+ end
+ --
+ local function flush(why)
+ if penalty_data then
+ local p = new_penalty(penalty_data)
+ if trace then
+ trace_done("flushed due to " .. why,p)
+ end
+ if penalty_data >= 10000 then -- or whatever threshold?
+ local prev = getprev(current)
+ if getid(prev) == glue_code then -- maybe go back more, or maybe even push back before any glue
+ -- tricky case: spacing/grid-007.tex: glue penalty glue
+ head = insert_node_before(head,prev,p)
+ else
+ head = insert_node_before(head,current,p)
+ end
+ else
+ head = insert_node_before(head,current,p)
+ end
+ -- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
+ local props = properties[p]
+ if props then
+ props.special_penalty = special_penalty or penalty_data
+ else
+ properties[p] = {
+ special_penalty = special_penalty or penalty_data
+ }
+ end
+ -- end
+ end
+ if glue_data then
+ if force_glue then
+ if trace then
+ trace_done("flushed due to forced " .. why,glue_data)
+ end
+ head = forced_skip(head,current,getwidth(glue_data,width),"before",trace)
+ flush_node(glue_data)
+ else
+ local width, stretch, shrink = getglue(glue_data)
+ if width ~= 0 then
+ if trace then
+ trace_done("flushed due to non zero " .. why,glue_data)
+ end
+ head = insert_node_before(head,current,glue_data)
+ elseif stretch ~= 0 or shrink ~= 0 then
+ if trace then
+ trace_done("flushed due to stretch/shrink in" .. why,glue_data)
+ end
+ head = insert_node_before(head,current,glue_data)
+ else
+ -- report_vspacing("needs checking (%s): %p",gluecodes[getsubtype(glue_data)],w)
+ flush_node(glue_data)
+ end
+ end
+ end
+
+ if trace then
+ trace_node(current)
+ end
+ glue_order, glue_data, force_glue = 0, nil, false
+ penalty_order, penalty_data, natural_penalty = 0, nil, nil
+ parskip, ignore_parskip, ignore_following, ignore_whitespace = nil, false, false, false
+ end
+ --
+ if trace_vsnapping then
+ report_snapper("global ht/dp = %p/%p, local ht/dp = %p/%p",
+ texgetdimen("globalbodyfontstrutheight"),
+ texgetdimen("globalbodyfontstrutdepth"),
+ texgetdimen("bodyfontstrutheight"),
+ texgetdimen("bodyfontstrutdepth")
+ )
+ end
+ if trace then
+ trace_info("start analyzing",where,what)
+ end
+ if snap and where == "page" then
+ removetopsnap()
+ end
+ while current do
+ local id = getid(current)
+ if id == hlist_code or id == vlist_code then
+ -- needs checking, why so many calls
+ if snap then
+ lastsnap = nil
+ local list = getlist(current)
+ local s = getattr(current,a_snapmethod)
+ if not s then
+ -- if trace_vsnapping then
+ -- report_snapper("mvl list not snapped")
+ -- end
+ elseif s == 0 then
+ if trace_vsnapping then
+ report_snapper("mvl %a not snapped, already done: %s",nodecodes[id],listtoutf(list))
+ end
+ else
+ local sv = snapmethods[s]
+ if sv then
+ -- check if already snapped
+ local done = list and already_done(id,list,a_snapmethod)
+ if done then
+ -- assume that the box is already snapped
+ if trace_vsnapping then
+ local w, h, d = getwhd(current)
+ report_snapper("mvl list already snapped at (%p,%p): %s",h,d,listtoutf(list))
+ end
+ else
+ local h, d, ch, cd, lines, extra = snap_hlist("mvl",current,sv,false,false)
+ lastsnap = {
+ ht = h,
+ dp = d,
+ ch = ch,
+ cd = cd,
+ extra = extra,
+ current = current,
+ }
+ setprop(current,"snapper",lastsnap)
+ if trace_vsnapping then
+ report_snapper("mvl %a snapped from (%p,%p) to (%p,%p) using method %a (%s) for %a (%s lines): %s",
+ nodecodes[id],h,d,ch,cd,sv.name,sv.specification,where,lines,listtoutf(list))
+ end
+ end
+ elseif trace_vsnapping then
+ report_snapper("mvl %a not snapped due to unknown snap specification: %s",nodecodes[id],listtoutf(list))
+ end
+ setattr(current,a_snapmethod,0)
+ end
+ else
+ --
+ end
+ -- tex.prevdepth = 0
+ flush("list")
+ current = getnext(current)
+ elseif id == penalty_code then
+ -- natural_penalty = getpenalty(current)
+ -- if trace then
+ -- trace_done("removed penalty",current)
+ -- end
+ -- head, current = remove_node(head,current,true)
+ current = getnext(current)
+ elseif id == kern_code then
+ if snap and trace_vsnapping and getkern(current) ~= 0 then
+ report_snapper("kern of %p kept",getkern(current))
+ end
+ flush("kern")
+ current = getnext(current)
+ elseif id == glue_code then
+ local subtype = getsubtype(current)
+ if subtype == userskip_code then
+ local sc, so, sp = getattrs(current,a_skipcategory,a_skiporder,a_skippenalty)
+ if not so then
+ so = 1 -- the others have no default value
+ end
+ if sp and sc == penalty then
+ if where == "page" then
+ getpagelist()
+ local p = specialmethods[specialmethod](pagehead,pagetail,current,sp)
+ if p then
+ -- todo: other tracer
+ --
+ -- if trace then
+ -- trace_skip("previous special penalty %a is changed to %a using method %a",sp,p,specialmethod)
+ -- end
+ special_penalty = sp
+ sp = p
+ end
+ end
+ if not penalty_data then
+ penalty_data = sp
+ elseif penalty_order < so then
+ penalty_order, penalty_data = so, sp
+ elseif penalty_order == so and sp > penalty_data then
+ penalty_data = sp
+ end
+ if trace then
+ trace_skip("penalty in skip",sc,so,sp,current)
+ end
+ head, current = remove_node(head,current,true)
+ elseif not sc then -- if not sc then
+ if glue_data then
+ if trace then
+ trace_done("flush",glue_data)
+ end
+ head = insert_node_before(head,current,glue_data)
+ if trace then
+ trace_natural("natural",current)
+ end
+ current = getnext(current)
+ glue_data = nil
+ else
+ -- not look back across head
+ -- todo: prev can be whatsit (latelua)
+ local previous = getprev(current)
+ if previous and getid(previous) == glue_code and getsubtype(previous) == userskip_code then
+ local pwidth, pstretch, pshrink, pstretch_order, pshrink_order = getglue(previous)
+ local cwidth, cstretch, cshrink, cstretch_order, cshrink_order = getglue(current)
+ if pstretch_order == 0 and pshrink_order == 0 and cstretch_order == 0 and cshrink_order == 0 then
+ setglue(previous,pwidth + cwidth, pstretch + cstretch, pshrink + cshrink)
+ if trace then
+ trace_natural("removed",current)
+ end
+ head, current = remove_node(head,current,true)
+ if trace then
+ trace_natural("collapsed",previous)
+ end
+ else
+ if trace then
+ trace_natural("filler",current)
+ end
+ current = getnext(current)
+ end
+ else
+ if trace then
+ trace_natural("natural (no prev)",current)
+ end
+ current = getnext(current)
+ end
+ end
+ glue_order = 0
+ elseif sc == disable or sc == enable then
+ local next = getnext(current)
+ if next then
+ ignore_following = sc == disable
+ if trace then
+ trace_skip(sc == disable and "disable" or "enable",sc,so,sp,current)
+ end
+ head, current = remove_node(head,current,true)
+ else
+ current = next
+ end
+ elseif sc == packed then
+ if trace then
+ trace_skip("packed",sc,so,sp,current)
+ end
+ -- can't happen !
+ head, current = remove_node(head,current,true)
+ elseif sc == nowhite then
+ local next = getnext(current)
+ if next then
+ ignore_whitespace = true
+ head, current = remove_node(head,current,true)
+ else
+ current = next
+ end
+ elseif sc == discard then
+ if trace then
+ trace_skip("discard",sc,so,sp,current)
+ end
+ head, current = remove_node(head,current,true)
+ elseif sc == overlay then
+ -- todo (overlay following line over previous
+ if trace then
+ trace_skip("overlay",sc,so,sp,current)
+ end
+ -- beware: head can actually be after the affected nodes as
+ -- we look back ... some day head will the real head
+ head, current = check_experimental_overlay(head,current,a_snapmethod)
+ elseif ignore_following then
+ if trace then
+ trace_skip("disabled",sc,so,sp,current)
+ end
+ head, current = remove_node(head,current,true)
+ elseif not glue_data then
+ if trace then
+ trace_skip("assign",sc,so,sp,current)
+ end
+ glue_order = so
+ head, current, glue_data = remove_node(head,current)
+ elseif glue_order < so then
+ if trace then
+ trace_skip("force",sc,so,sp,current)
+ end
+ glue_order = so
+ flush_node(glue_data)
+ head, current, glue_data = remove_node(head,current)
+ elseif glue_order == so then
+ -- is now exclusive, maybe support goback as combi, else why a set
+ if sc == largest then
+ local cw = getwidth(current)
+ local gw = getwidth(glue_data)
+ if cw > gw then
+ if trace then
+ trace_skip("largest",sc,so,sp,current)
+ end
+ flush_node(glue_data)
+ head, current, glue_data = remove_node(head,current)
+ else
+ if trace then
+ trace_skip("remove smallest",sc,so,sp,current)
+ end
+ head, current = remove_node(head,current,true)
+ end
+ elseif sc == goback then
+ if trace then
+ trace_skip("goback",sc,so,sp,current)
+ end
+ flush_node(glue_data)
+ head, current, glue_data = remove_node(head,current)
+ elseif sc == force then
+ -- last one counts, some day we can provide an accumulator and largest etc
+ -- but not now
+ if trace then
+ trace_skip("force",sc,so,sp,current)
+ end
+ flush_node(glue_data)
+ head, current, glue_data = remove_node(head,current)
+ elseif sc == penalty then
+ if trace then
+ trace_skip("penalty",sc,so,sp,current)
+ end
+ flush_node(glue_data)
+ glue_data = nil
+ head, current = remove_node(head,current,true)
+ elseif sc == add then
+ if trace then
+ trace_skip("add",sc,so,sp,current)
+ end
+ local cwidth, cstretch, cshrink = getglue(current)
+ local gwidth, gstretch, gshrink = getglue(glue_data)
+ setglue(glue_data,gwidth + cwidth, gstretch + cstretch,gshrink + cshrink)
+ -- toto: order
+ head, current = remove_node(head,current,true)
+ else
+ if trace then
+ trace_skip("unknown",sc,so,sp,current)
+ end
+ head, current = remove_node(head,current,true)
+ end
+ else
+ if trace then
+ trace_skip("unknown",sc,so,sp,current)
+ end
+ head, current = remove_node(head,current,true)
+ end
+ if sc == force then
+ force_glue = true
+ end
+ elseif subtype == lineskip_code then
+ if snap then
+ local s = getattr(current,a_snapmethod)
+ if s and s ~= 0 then
+ setattr(current,a_snapmethod,0)
+ setwidth(current,0)
+ if trace_vsnapping then
+ report_snapper("lineskip set to zero")
+ end
+ else
+ if trace then
+ trace_skip("lineskip",sc,so,sp,current)
+ end
+ flush("lineskip")
+ end
+ else
+ if trace then
+ trace_skip("lineskip",sc,so,sp,current)
+ end
+ flush("lineskip")
+ end
+ current = getnext(current)
+ elseif subtype == baselineskip_code then
+ if snap then
+ local s = getattr(current,a_snapmethod)
+ if s and s ~= 0 then
+ setattr(current,a_snapmethod,0)
+ setwidth(current,0)
+ if trace_vsnapping then
+ report_snapper("baselineskip set to zero")
+ end
+ else
+ if trace then
+ trace_skip("baselineskip",sc,so,sp,current)
+ end
+ flush("baselineskip")
+ end
+ else
+ if trace then
+ trace_skip("baselineskip",sc,so,sp,current)
+ end
+ flush("baselineskip")
+ end
+ current = getnext(current)
+ elseif subtype == parskip_code then
+ -- parskip always comes later
+ if ignore_whitespace then
+ if trace then
+ trace_natural("ignored parskip",current)
+ end
+ head, current = remove_node(head,current,true)
+ elseif glue_data then
+ local w = getwidth(current)
+ if w ~= 0 and w > getwidth(glue_data) then
+flush_node(glue_data)
+ glue_data = current
+ if trace then
+ trace_natural("taking parskip",current)
+ end
+ head, current = remove_node(head,current)
+ else
+ if trace then
+ trace_natural("removed parskip",current)
+ end
+ head, current = remove_node(head,current,true)
+ end
+ else
+ if trace then
+ trace_natural("honored parskip",current)
+ end
+ head, current, glue_data = remove_node(head,current)
+ end
+ elseif subtype == topskip_code or subtype == splittopskip_code then
+ local next = getnext(current)
+ if next and getattr(next,a_skipcategory) == notopskip then
+ nuts.setglue(current) -- zero
+ end
+ if snap then
+ local s = getattr(current,a_snapmethod)
+ if s and s ~= 0 then
+ setattr(current,a_snapmethod,0)
+ local sv = snapmethods[s]
+ local w, cw = snap_topskip(current,sv)
+ if trace_vsnapping then
+ report_snapper("topskip snapped from %p to %p for %a",w,cw,where)
+ end
+ else
+ if trace then
+ trace_skip("topskip",sc,so,sp,current)
+ end
+ flush("topskip")
+ end
+ else
+ if trace then
+ trace_skip("topskip",sc,so,sp,current)
+ end
+ flush("topskip")
+ end
+ current = getnext(current)
+ elseif subtype == abovedisplayskip_code and remove_math_skips then
+ --
+ if trace then
+ trace_skip("above display skip (normal)",sc,so,sp,current)
+ end
+ flush("above display skip (normal)")
+ current = getnext(current)
+ --
+ elseif subtype == belowdisplayskip_code and remove_math_skips then
+ --
+ if trace then
+ trace_skip("below display skip (normal)",sc,so,sp,current)
+ end
+ flush("below display skip (normal)")
+ current = getnext(current)
+ --
+ elseif subtype == abovedisplayshortskip_code and remove_math_skips then
+ --
+ if trace then
+ trace_skip("above display skip (short)",sc,so,sp,current)
+ end
+ flush("above display skip (short)")
+ current = getnext(current)
+ --
+ elseif subtype == belowdisplayshortskip_code and remove_math_skips then
+ --
+ if trace then
+ trace_skip("below display skip (short)",sc,so,sp,current)
+ end
+ flush("below display skip (short)")
+ current = getnext(current)
+ --
+ else -- other glue
+ if snap and trace_vsnapping then
+ local w = getwidth(current)
+ if w ~= 0 then
+ report_snapper("glue %p of type %a kept",w,gluecodes[subtype])
+ end
+ end
+ if trace then
+ trace_skip(formatters["glue of type %a"](subtype),sc,so,sp,current)
+ end
+ flush("some glue")
+ current = getnext(current)
+ end
+ else
+ flush(trace and formatters["node with id %a"](id) or "other node")
+ current = getnext(current)
+ end
+ end
+ if trace then
+ trace_info("stop analyzing",where,what)
+ end
+ -- if natural_penalty and (not penalty_data or natural_penalty > penalty_data) then
+ -- penalty_data = natural_penalty
+ -- end
+ if trace and (glue_data or penalty_data) then
+ trace_info("start flushing",where,what)
+ end
+ local tail
+ if penalty_data then
+ tail = find_node_tail(head)
+ local p = new_penalty(penalty_data)
+ if trace then
+ trace_done("result",p)
+ end
+ setlink(tail,p)
+ -- if penalty_data > special_penalty_min and penalty_data < special_penalty_max then
+ local props = properties[p]
+ if props then
+ props.special_penalty = special_penalty or penalty_data
+ else
+ properties[p] = {
+ special_penalty = special_penalty or penalty_data
+ }
+ end
+ -- end
+ end
+ if glue_data then
+ if not tail then tail = find_node_tail(head) end
+ if trace then
+ trace_done("result",glue_data)
+ end
+ if force_glue then
+ head, tail = forced_skip(head,tail,getwidth(glue_data),"after",trace)
+ flush_node(glue_data)
+ glue_data = nil
+ elseif tail then
+ setlink(tail,glue_data)
+setnext(glue_data)
+ else
+ head = glue_data
+ end
+ texnest[texnest.ptr].prevdepth = 0 -- appending to the list bypasses tex's prevdepth handler
+ end
+ if trace then
+ if glue_data or penalty_data then
+ trace_info("stop flushing",where,what)
+ end
+ show_tracing(head)
+ if oldhead ~= head then
+ trace_info("head has been changed from %a to %a",nodecodes[getid(oldhead)],nodecodes[getid(head)])
+ end
+ end
+ return head
+ end
+
+ local stackhead, stacktail, stackhack = nil, nil, false
+
+ local function report(message,where,lst)
+ if lst and where then
+ report_vspacing(message,where,count_nodes(lst,true),nodeidstostring(lst))
+ else
+ report_vspacing(message,count_nodes(lst,true),nodeidstostring(lst))
+ end
+ end
+
+ -- ugly code: we get partial lists (check if this stack is still okay) ... and we run
+ -- into temp nodes (sigh)
+
+ local forceflush = false
+
+ function vspacing.pagehandler(newhead,where)
+ if newhead then
+ local newtail = find_node_tail(newhead) -- best pass that tail, known anyway
+ local flush = false
+ stackhack = true -- todo: only when grid snapping once enabled
+ -- todo: fast check if head = tail
+ for n, id, subtype in nextnode, newhead do -- we could just look for glue nodes
+ if id ~= glue_code then
+ flush = true
+ elseif subtype == userskip_code then
+ if getattr(n,a_skipcategory) then
+ stackhack = true
+ else
+ flush = true
+ end
+ elseif subtype == parskip_code then
+ -- if where == new_graf then ... end
+ if texgetcount("c_spac_vspacing_ignore_parskip") > 0 then
+ -- texsetcount("c_spac_vspacing_ignore_parskip",0)
+ setglue(n)
+ -- maybe removenode
+ end
+ end
+ end
+ texsetcount("c_spac_vspacing_ignore_parskip",0)
+
+ if forceflush then
+ forceflush = false
+ flush = true
+ end
+
+ if flush then
+ if stackhead then
+ if trace_collect_vspacing then report("%s > appending %s nodes to stack (final): %s",where,newhead) end
+ setlink(stacktail,newhead)
+ newhead = stackhead
+ stackhead = nil
+ stacktail = nil
+ end
+ if stackhack then
+ stackhack = false
+ if trace_collect_vspacing then report("%s > processing %s nodes: %s",where,newhead) end
+ newhead = collapser(newhead,"page",where,trace_page_vspacing,true,a_snapmethod)
+ else
+ if trace_collect_vspacing then report("%s > flushing %s nodes: %s",where,newhead) end
+ end
+ return newhead
+ else
+ if stackhead then
+ if trace_collect_vspacing then report("%s > appending %s nodes to stack (intermediate): %s",where,newhead) end
+ setlink(stacktail,newhead)
+ else
+ if trace_collect_vspacing then report("%s > storing %s nodes in stack (initial): %s",where,newhead) end
+ stackhead = newhead
+ end
+ stacktail = newtail
+ end
+ end
+ return nil
+ end
+
+ function vspacing.pageoverflow()
+ local h = 0
+ if stackhead then
+ for n, id in nextnode, stackhead do
+ if id == glue_code then
+ h = h + getwidth(n)
+ elseif id == kern_code then
+ h = h + getkern(n)
+ end
+ end
+ end
+ return h
+ end
+
+ function vspacing.forcepageflush()
+ forceflush = true
+ end
+
+ local ignore = table.tohash {
+ "split_keep",
+ "split_off",
+ -- "vbox",
+ }
+
+ function vspacing.vboxhandler(head,where)
+ if head and not ignore[where] and getnext(head) then
+ if getnext(head) then -- what if a one liner and snapping?
+ head = collapser(head,"vbox",where,trace_vbox_vspacing,true,a_snapvbox) -- todo: local snapper
+ return head
+ end
+ end
+ return head
+ end
+
+ function vspacing.collapsevbox(n,aslist) -- for boxes but using global a_snapmethod
+ local box = getbox(n)
+ if box then
+ local list = getlist(box)
+ if list then
+ list = collapser(list,"snapper","vbox",trace_vbox_vspacing,true,a_snapmethod)
+ if aslist then
+ setlist(box,list) -- beware, dimensions of box are wrong now
+ else
+ setlist(box,vpack_node(list))
+ end
+ end
+ end
+ end
+
+end
+
+-- This one is needed to prevent bleeding of prevdepth to the next page
+-- which doesn't work well with forced skips. I'm not that sure if the
+-- following is a good way out.
+
+do
+
+ local outer = texnest[0]
+
+ local enabled = true
+ local trace = false
+ local report = logs.reporter("vspacing")
+
+ trackers.register("vspacing.synchronizepage",function(v)
+ trace = v
+ end)
+
+ directives.register("vspacing.synchronizepage",function(v)
+ enabled = v
+ end)
+
+ local ignoredepth = -65536000
+
+ -- A previous version analyzed the number of lines moved to the next page in
+ -- synchronizepage because prevgraf is unreliable in that case. However, we cannot
+ -- tweak that parameter because it is also used in postlinebreak and hangafter, so
+ -- there is a danger for interference. Therefore we now do it dynamically.
+
+ -- We can also support other lists but there prevgraf probably is ok.
+
+ function vspacing.getnofpreviouslines(head)
+ if enabled then
+ if not thead then
+ head = texlists.page_head
+ end
+ local noflines = 0
+ if head then
+ local tail = find_node_tail(tonut(head))
+ while tail do
+ local id = getid(tail)
+ if id == hlist_code then
+ if getsubtype(tail) == linelist_code then
+ noflines = noflines + 1
+ else
+ break
+ end
+ elseif id == vlist_code then
+ break
+ elseif id == glue_code then
+ local subtype = getsubtype(tail)
+ if subtype == baselineskip_code or subtype == lineskip_code then
+ -- we're ok
+ elseif subtype == parskip_code then
+ if getwidth(tail) > 0 then
+ break
+ else
+ -- we assume we're ok
+ end
+ end
+ elseif id == penalty_code then
+ -- we're probably ok
+ elseif id == rule_code or id == kern_code then
+ break
+ else
+ -- ins, mark, boundary, whatsit
+ end
+ tail = getprev(tail)
+ end
+ end
+ return noflines
+ end
+ end
+
+ interfaces.implement {
+ name = "getnofpreviouslines",
+ public = true,
+ actions = vspacing.getnofpreviouslines,
+ }
+
+ function vspacing.synchronizepage()
+ if enabled then
+ if trace then
+ local newdepth = outer.prevdepth
+ local olddepth = newdepth
+ if not texlists.page_head then
+ newdepth = ignoredepth
+ texset("prevdepth",ignoredepth)
+ outer.prevdepth = ignoredepth
+ end
+ report("page %i, prevdepth %p => %p",texgetcount("realpageno"),olddepth,newdepth)
+ -- report("list %s",nodes.idsandsubtypes(head))
+ else
+ if not texlists.page_head then
+ texset("prevdepth",ignoredepth)
+ outer.prevdepth = ignoredepth
+ end
+ end
+ end
+ end
+
+ local trace = false
+ local last = nil
+ local vmode_code = tex.modelevels.vertical
+ local temp_code = nodecodes.temp
+ local getnest = tex.getnest
+ local getlist = tex.getlist
+
+ trackers.register("vspacing.forcestrutdepth",function(v) trace = v end)
+
+ -- abs : negative is inner
+
+ function vspacing.checkstrutdepth(depth)
+ local nest = getnest()
+ if abs(nest.mode) == vmode_code and nest.head then
+ local tail = nest.tail
+ local id = tail.id
+ if id == hlist_code then
+ if tail.depth < depth then
+ tail.depth = depth
+ end
+ nest.prevdepth = depth
+ elseif id == temp_code and getnest("ptr") == 0 then
+ local head = getlist("page_head")
+ if head then
+ tail = nodes.tail(head)
+ if tail and tail.id == hlist_code then
+ if tail.depth < depth then
+ tail.depth = depth
+ end
+ nest.prevdepth = depth
+ -- only works in lmtx
+ texset("pagedepth",depth)
+ end
+ end
+ end
+ end
+ end
+
+ interfaces.implement {
+ name = "checkstrutdepth",
+ arguments = "dimension",
+ actions = vspacing.checkstrutdepth,
+ }
+
+ function vspacing.forcestrutdepth(n,depth,trace_mode,plus)
+ local box = texgetbox(n)
+ if box then
+ box = tonut(box)
+ local head = getlist(box)
+ if head then
+ local tail = find_node_tail(head)
+ if tail then
+ if getid(tail) == hlist_code then
+ local dp = getdepth(tail)
+ if dp < depth then
+ setdepth(tail,depth)
+ outer.prevdepth = depth
+ if trace or trace_mode > 0 then
+ nuts.setvisual(tail,"depth")
+ end
+ end
+ end
+ last = nil
+ if plus then
+ -- penalty / skip ...
+ local height = 0
+ local sofar = 0
+ local same = false
+ local seen = false
+ local list = { }
+ last = nil
+ while tail do
+ local id = getid(tail)
+ if id == hlist_code or id == vlist_code then
+ local w, h, d = getwhd(tail)
+ height = height + h + d + sofar
+ sofar = 0
+ last = tail
+ elseif id == kern_code then
+ sofar = sofar + getkern(tail)
+ elseif id == glue_code then
+ if seen then
+ sofar = sofar + getwidth(tail)
+ seen = false
+ else
+ break
+ end
+ elseif id == penalty_code then
+ local p = getpenalty(tail)
+ if p >= 10000 then
+ same = true
+ seen = true
+ else
+ break
+ end
+ else
+ break
+ end
+ tail = getprev(tail)
+ end
+ texsetdimen("global","d_spac_prevcontent",same and height or 0)
+ end
+ end
+ end
+ end
+ end
+
+ function vspacing.pushatsame()
+ -- needs better checking !
+ if last then -- setsplit
+ nuts.setnext(getprev(last))
+ nuts.setprev(last)
+ end
+ end
+
+ function vspacing.popatsame()
+ -- needs better checking !
+ nuts.write(last)
+ end
+
+end
+
+-- interface
+
+do
+
+ interfaces.implement {
+ name = "injectvspacing",
+ actions = vspacing.inject,
+ arguments = { "integer", "string" },
+ }
+
+ interfaces.implement {
+ name = "injectvpenalty",
+ actions = vspacing.injectpenalty,
+ arguments = "integer",
+ }
+
+ interfaces.implement {
+ name = "injectvskip",
+ actions = vspacing.injectskip,
+ arguments = "dimension",
+ }
+
+ interfaces.implement {
+ name = "injectdisable",
+ actions = vspacing.injectdisable,
+ }
+
+ --
+
+ implement {
+ name = "synchronizepage",
+ actions = vspacing.synchronizepage,
+ scope = "private"
+ }
+
+ implement {
+ name = "forcestrutdepth",
+ arguments = { "integer", "dimension", "integer" },
+ actions = vspacing.forcestrutdepth,
+ scope = "private"
+ }
+
+ implement {
+ name = "forcestrutdepthplus",
+ arguments = { "integer", "dimension", "integer", true },
+ actions = vspacing.forcestrutdepth,
+ scope = "private"
+ }
+
+ implement {
+ name = "pushatsame",
+ actions = vspacing.pushatsame,
+ scope = "private"
+ }
+
+ implement {
+ name = "popatsame",
+ actions = vspacing.popatsame,
+ scope = "private"
+ }
+
+ implement {
+ name = "vspacingsetamount",
+ actions = vspacing.setskip,
+ scope = "private",
+ arguments = "string",
+ }
+
+ implement {
+ name = "vspacingdefine",
+ actions = vspacing.setmap,
+ scope = "private",
+ arguments = "2 strings",
+ }
+
+ implement {
+ name = "vspacingcollapse",
+ actions = vspacing.collapsevbox,
+ scope = "private",
+ arguments = "integer"
+ }
+
+ implement {
+ name = "vspacingcollapseonly",
+ actions = vspacing.collapsevbox,
+ scope = "private",
+ arguments = { "integer", true }
+ }
+
+ implement {
+ name = "vspacingsnap",
+ actions = vspacing.snapbox,
+ scope = "private",
+ arguments = { "integer", "integer" }
+ }
+
+ implement {
+ name = "definesnapmethod",
+ actions = vspacing.definesnapmethod,
+ scope = "private",
+ arguments = "2 strings",
+ }
+
+ -- local remove_node = nodes.remove
+ -- local find_node_tail = nodes.tail
+ --
+ -- interfaces.implement {
+ -- name = "fakenextstrutline",
+ -- actions = function()
+ -- local head = texlists.page_head
+ -- if head then
+ -- local head = remove_node(head,find_node_tail(head),true)
+ -- texlists.page_head = head
+ -- buildpage()
+ -- end
+ -- end
+ -- }
+
+ implement {
+ name = "removelastline",
+ actions = function()
+ local head = texlists.page_head
+ if head then
+ local tail = find_node_tail(head)
+ if tail then
+ -- maybe check for hlist subtype 1
+ local head = remove_node(head,tail,true)
+ texlists.page_head = head
+ buildpage()
+ end
+ end
+ end
+ }
+
+ implement {
+ name = "showpagelist", -- will improve
+ actions = function()
+ local head = texlists.page_head
+ if head then
+ print("start")
+ while head do
+ print(" " .. tostring(head))
+ head = head.next
+ end
+ end
+ end
+ }
+
+ implement {
+ name = "pageoverflow",
+ actions = { vspacing.pageoverflow, context }
+ }
+
+ implement {
+ name = "forcepageflush",
+ actions = vspacing.forcepageflush
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkxl b/Master/texmf-dist/tex/context/base/mkxl/spac-ver.mkxl
index c56352077f3..d116113399d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-ver.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/spac-ver.mkxl
@@ -15,7 +15,7 @@
\unprotect
-\registerctxluafile{spac-ver}{optimize}
+\registerctxluafile{spac-ver}{autosuffix,optimize}
% todo: use usernodes ?
@@ -61,20 +61,12 @@
\newskip \s_spac_vspacing_temp \s_spac_vspacing_temp\bigskipamount
-\def\skipfactor {.75}
-\def\skipgluefactor{.25}
+\mutable\def\skipfactor {.75}
+\mutable\def\skipgluefactor{.25}
-% \def\normalskipamount
-% {\openlineheight
-% \ifgridsnapping \else \ifblankflexible
-% \s!plus \skipgluefactor\openlineheight
-% \s!minus\skipgluefactor\openlineheight
-% \fi \fi
-% \relax}
-
-\def\normalskipamount
+\permanent\def\normalskipamount
{\openlineheight
- \ifgridsnapping \orelse \ifblankflexible
+ \ifgridsnapping \orelse \ifconditional\c_spac_whitespace_flexible
\s!plus \skipgluefactor\openlineheight
\s!minus\skipgluefactor\openlineheight
\fi
@@ -84,16 +76,16 @@
\let\bodyfontinterlinespace\empty
\fi
-\unexpanded\def\presetnormallineheight % each bodyfont
+\permanent\protected\def\presetnormallineheight % each bodyfont
{\edef\normallineheight{\interlinespaceparameter\c!line}%
\iflocalinterlinespace \else
\edef\m_spac_normallineheight{\bodyfontinterlinespace}%
- \ifx\m_spac_normallineheight\empty \else
+ \ifempty\m_spac_normallineheight \else
\let\normallineheight\m_spac_normallineheight
\fi
\fi}
-\unexpanded\def\setupspecifiedinterlinespace[#1]%
+\permanent\protected\def\setupspecifiedinterlinespace[#1]%
{\setupcurrentinterlinespace[#1]%
\spac_linespacing_setup_specified_interline_space}
@@ -106,8 +98,8 @@
\edef\normallineheight {\interlinespaceparameter\c!line }%
\edef\topskipfactor {\interlinespaceparameter\c!top }%
\edef\maxdepthfactor {\interlinespaceparameter\c!bottom }%
- \edef\m_spac_vertical_baseline_stretch_factor{\interlinespaceparameter\c!stretch }%
- \edef\m_spac_vertical_baseline_shrink_factor {\interlinespaceparameter\c!shrink }%
+ \edef\m_spac_vertical_baseline_stretch_factor{\interlinespaceparameter\c!stretch}%
+ \edef\m_spac_vertical_baseline_shrink_factor {\interlinespaceparameter\c!shrink }%
% often topskip does more bad than good, so:
\ifx\topskipfactor\v!height
\let\topskipfactor\strutheightfactor
@@ -117,23 +109,23 @@
\installcorenamespace{interlinespacerelative}
-\let\setrelativeinterlinespace \relax % used elsewhere
-\let\currentrelativeinterlinespace\empty
+\aliased\let\setrelativeinterlinespace \relax % used elsewhere
+\mutable\let\currentrelativeinterlinespace\empty
-\setvalue{\??interlinespacerelative\v!on }{\oninterlineskip}
-\setvalue{\??interlinespacerelative\v!off }{\offinterlineskip}
-\setvalue{\??interlinespacerelative\v!reset}{\let\currentrelativeinterlinespace\empty
- \let\setrelativeinterlinespace\relax
- \setfontparameters}
-\setvalue{\??interlinespacerelative\v!auto }{\let\setrelativeinterlinespace\spac_linespacing_set_relative_interlinespace}
+\defcsname\??interlinespacerelative\v!on \endcsname{\oninterlineskip}
+\defcsname\??interlinespacerelative\v!off \endcsname{\offinterlineskip}
+\defcsname\??interlinespacerelative\v!reset\endcsname{\enforced\let\currentrelativeinterlinespace\empty
+ \enforced\let\setrelativeinterlinespace\relax
+ \setfontparameters}
+\defcsname\??interlinespacerelative\v!auto \endcsname{\enforced\let\setrelativeinterlinespace\spac_linespacing_set_relative_interlinespace}
\def\spac_linespacing_set_specified_relative_interlinespace#1% fragile?
- {\doifelsedimenstring{#1}
- {\setupspecifiedinterlinespace[\c!line=#1]}
+ {\doifelsedimenstring{#1}%
+ {\setupspecifiedinterlinespace[\c!line=#1]}%
{\assignvalue{#1}\currentrelativeinterlinespace{1.00}{1.25}{1.50}%
\spacing\currentrelativeinterlinespace}}
-\unexpanded\def\setuprelativeinterlinespace[#1]%
+\permanent\protected\def\setuprelativeinterlinespace[#1]%
{\processcommalist[#1]\spac_linespacing_setup_relative_interlinespace}
\def\spac_linespacing_setup_relative_interlinespace#1%
@@ -143,22 +135,22 @@
\spac_linespacing_set_specified_relative_interlinespace{#1}%
\fi}
-\def\spac_linespacing_set_relative_interlinespace
- {\ifx\currentrelativeinterlinespace\empty\else
+\permanent\protected\def\spac_linespacing_set_relative_interlinespace
+ {\ifempty\currentrelativeinterlinespace\else
\spacing\currentrelativeinterlinespace
\fi}
-\unexpanded\def\spac_linespacing_setup_use
+\protected\def\spac_linespacing_setup_use
{\ifcsname\namedinterlinespacehash\m_spac_interlinespace\s!parent\endcsname
- \let\currentinterlinespace\m_spac_interlinespace
- \spac_linespacing_setup_specified_interline_space
+ \let\currentinterlinespace\m_spac_interlinespace
+ \spac_linespacing_setup_specified_interline_space
% \else
% we only support named interlinespaces
\fi}
-\unexpanded\def\useinterlinespaceparameter#1% see footnotes
+\permanent\protected\def\useinterlinespaceparameter#1% see footnotes
{\edef\m_spac_interlinespace{#1\c!interlinespace}%
- \ifx\m_spac_interlinespace\empty \else
+ \ifempty\m_spac_interlinespace \else
\spac_linespacing_setup_use
\fi}
@@ -173,18 +165,12 @@
\installmacrostack\currentinterlinespace
-\unexpanded\def\setupinterlinespace
- {\dodoubleempty\spac_linespacing_setup}
-
-\ifdefined\setupinterlinespace_double \else
- \let\setupinterlinespace_double\setup_interlinespace % for a while
-\fi
-
-\def\spac_linespacing_setup[#1][#2]%
- {\settrue\interlinespaceisset % reset has to be done when needed
- \ifsecondargument
- \setupinterlinespace_double[#1][#2]%
- \orelse\iffirstargument
+\permanent\overloaded\tolerant\protected\def\setupinterlinespace[#1]%
+ {\ifarguments
+ \settrue\interlinespaceisset
+ \spac_linespacing_synchronize_local
+ \else
+ \settrue\interlinespaceisset
\ifcsname\namedinterlinespacehash{#1}\s!parent\endcsname
\edef\currentinterlinespace{#1}%
\spac_linespacing_setup_specified_interline_space
@@ -192,9 +178,6 @@
\else
\spac_linespacing_setup_specified_or_relative[#1]%
\fi
- \else
- \let\currentinterlinespace\empty
- \spac_linespacing_synchronize_local
\fi}
\def\spac_linespacing_setup_specified_or_relative[#1]%
@@ -208,9 +191,9 @@
\the\everysetuplocalinterlinespace
\localinterlinespacefalse}
-\unexpanded\def\dosetupcheckedinterlinespace#1% often a chain
+\permanent\protected\def\dosetupcheckedinterlinespace#1% often a chain
{\edef\p_spac_checked_interlinespace{#1}%
- \ifx\p_spac_checked_interlinespace\empty
+ \ifempty\p_spac_checked_interlinespace
\spac_linespacing_synchronize_local
\orelse\ifcsname\namedinterlinespacehash\p_spac_checked_interlinespace\s!parent\endcsname % we could have a \s!check
\push_macro_currentinterlinespace
@@ -236,14 +219,14 @@
\fi
\fi}
-\unexpanded\def\setuplocalinterlinespace[#1]%
+\permanent\protected\def\setuplocalinterlinespace[#1]%
{\localinterlinespacetrue
\push_macro_currentinterlinespace
\setupinterlinespace[#1]%
\pop_macro_currentinterlinespace
\localinterlinespacefalse}
-\let\switchtointerlinespace\setuplocalinterlinespace
+\aliased\let\switchtointerlinespace\setuplocalinterlinespace
%D Helpers
@@ -252,21 +235,19 @@
\newcount\c_spac_spacefactor
\newdimen\d_spac_prevcontent % set by lua
-\unexpanded\def\removelastskip
- {\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi}
+% \permanent\overloaded\protected\def\removelastskip
+% {\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi}
-\def\doifoutervmode
- {\ifvmode
- \ifinner
- \doubleexpandafter\gobbleoneargument
- \else
- \doubleexpandafter\firstofoneargument
- \fi
- \else
+\permanent\def\doifoutervmode
+ {\unless\ifvmode
\expandafter\gobbleoneargument
+ \orelse\ifinner
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
\fi}
-\unexpanded\def\dosomebreak#1%
+\permanent\protected\def\dosomebreak#1% should be replaced by something \blank
{\doifoutervmode
{\s_spac_lastskip\lastskip
\removelastskip
@@ -277,19 +258,19 @@
\vskip\s_spac_lastskip
\fi}}
-\unexpanded\def\packed
+\permanent\protected\def\packed
{\nointerlineskip}
-\unexpanded\def\godown[#1]%
+\permanent\protected\def\godown[#1]%
{\relax
\ifhmode\endgraf\fi
\ifvmode\nointerlineskip\vskip#1\relax\fi}
-\unexpanded\def\smallskip{\vskip\smallskipamount}
-\unexpanded\def\medskip {\vskip\medskipamount}
-\unexpanded\def\bigskip {\vskip\bigskipamount}
+\permanent\protected\def\smallskip{\vskip\smallskipamount}
+\permanent\protected\def\medskip {\vskip\medskipamount}
+\permanent\protected\def\bigskip {\vskip\bigskipamount}
-\unexpanded\def\smallbreak
+\permanent\protected\def\smallbreak
{\par
\ifvmode\ifdim\lastskip<\smallskipamount
\removelastskip
@@ -297,7 +278,7 @@
\smallskip
\fi\fi}
-\unexpanded\def\medbreak
+\permanent\protected\def\medbreak
{\par
\ifvmode\ifdim\lastskip<\medskipamount
\removelastskip
@@ -305,7 +286,7 @@
\medskip
\fi\fi}
-\unexpanded\def\bigbreak
+\permanent\protected\def\bigbreak
{\par
\ifvmode\ifdim\lastskip<\bigskipamount
\removelastskip
@@ -313,18 +294,18 @@
\bigskip
\fi\fi}
-\unexpanded\def\break {\penalty-\plustenthousand} % can be hmode or vmode
-\unexpanded\def\nobreak {\penalty \plustenthousand} % can be hmode or vmode
-\unexpanded\def\allowbreak{\penalty \zerocount} % can be hmode or vmode
+\permanent\protected\def\break {\penalty-\plustenthousand} % can be hmode or vmode
+\permanent\protected\def\nobreak {\penalty \plustenthousand} % can be hmode or vmode
+\permanent\protected\def\allowbreak{\penalty \zerocount} % can be hmode or vmode
-\unexpanded\def\goodbreak {\par\ifvmode\penalty-\plusfivehundred\relax\fi} % forces vmode
-\unexpanded\def\filbreak {\par\ifvmode\vfil\penalty-\plustwohundred\vfilneg\fi} % forces vmode
+\permanent\protected\def\goodbreak {\par\ifvmode\penalty-\plusfivehundred\relax\fi} % forces vmode
+\permanent\protected\def\filbreak {\par\ifvmode\vfil\penalty-\plustwohundred\vfilneg\fi} % forces vmode
%D Made slightly more readable:
-\unexpanded\def\vglue {\afterassignment\spac_helpers_vglue_indeed\s_spac_lastskip=}
-\unexpanded\def\hglue {\afterassignment\spac_helpers_hglue_indeed\s_spac_lastskip=}
-\unexpanded\def\topglue{\par\ifvmode\nointerlineskip\vglue-\topskip\vglue\fi}
+\permanent\protected\def\vglue {\afterassignment\spac_helpers_vglue_indeed\s_spac_lastskip=}
+\permanent\protected\def\hglue {\afterassignment\spac_helpers_hglue_indeed\s_spac_lastskip=}
+\permanent\protected\def\topglue{\par\ifvmode\nointerlineskip\vglue-\topskip\vglue\fi}
\def\spac_helpers_vglue_indeed
{\par
@@ -346,9 +327,13 @@
%D We adapt plain's \type {\removelastskip} a bit:
-\unexpanded\def\removelastskip % also in supp-box
+\pushoverloadmode
+
+\permanent\overloaded\protected\def\removelastskip % also in supp-box
{\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi}
+\popoverloadmode
+
% The whitespace handler. We could cache settings but normally there are not
% that many in a set.
@@ -361,25 +346,23 @@
%def\v_spac_whitespace_current{\zeropoint}
\let\v_spac_whitespace_current\v!none
-\unexpanded\def\setupwhitespace
- {\doifelsenextoptionalcs\spac_whitespace_setup_yes\spac_whitespace_setup_nop}
-
-\def\spac_whitespace_setup_nop
- {\ifx\v_spac_whitespace_current\v!none\else
+\permanent\tolerant\protected\def\setupwhitespace[#1]%
+ {\ifarguments
+ \spac_whitespace_setup_nop
+ \orelse\iftok{#1}\emptytoks
+ \spac_whitespace_setup_nop
+ \else
+ \edef\v_spac_whitespace_current{#1}%
\spac_whitespace_setup
\fi}
-\let\synchronizewhitespace\spac_whitespace_setup_nop
-
-\def\spac_whitespace_setup_yes[#1]%
- {\edef\m_spac_whitespace_asked{#1}%
- \ifx\m_spac_whitespace_asked\empty
- \spac_whitespace_setup_nop
- \else
- \let\v_spac_whitespace_current\m_spac_whitespace_asked
+\permanent\protected\def\spac_whitespace_setup_nop
+ {\ifx\v_spac_whitespace_current\v!none\else
\spac_whitespace_setup
\fi}
+\aliased\let\synchronizewhitespace\spac_whitespace_setup_nop
+
\def\spac_whitespace_setup % quick test for no list
{\ifcsname\??whitespacemethod\v_spac_whitespace_current\endcsname
\lastnamedcs
@@ -415,8 +398,8 @@
\fi
\fi}
-\unexpanded\def\installwhitespacemethod#1#2%
- {\setvalue{\??whitespacemethod#1}{#2}}
+\permanent\protected\def\installwhitespacemethod#1#2%
+ {\defcsname\??whitespacemethod#1\endcsname{#2}}
\installwhitespacemethod \v!fix {}
\installwhitespacemethod \v!fixed {\setfalse\c_spac_whitespace_flexible}
@@ -439,7 +422,7 @@
\s_spac_whitespace_parskip#1\fi
\relax}
-\unexpanded\def\forgetparskip
+\permanent\protected\def\forgetparskip
{\s_spac_whitespace_parskip\zeropoint
\parskip\zeropoint
\let\v_spac_whitespace_current\v!none}
@@ -453,8 +436,8 @@
% \def\spac_whitespace_setup_method#1%
% {\csname\??whitespacemethod\ifcsname\??whitespacemethod#1\endcsname#1\else\s!unknown\endcsname\relax}
-\unexpanded\def\nowhitespace{\directcheckedvspacing\v!nowhite} % {\vspacing[\v!nowhite]}
-\unexpanded\def\whitespace {\directcheckedvspacing\v!white} % {\vspacing[\v!white]}
+\permanent\protected\def\nowhitespace{\directcheckedvspacing\v!nowhite} % {\vspacing[\v!nowhite]}
+\permanent\protected\def\whitespace {\directcheckedvspacing\v!white} % {\vspacing[\v!white]}
\setupwhitespace
[\v!none]
@@ -466,10 +449,7 @@
\newconditional\c_spac_packed_blank \settrue\c_spac_packed_blank
\newcount \c_spac_packed_level
-\unexpanded\def\startpacked
- {\dosingleempty\spac_packed_start}
-
-\def\spac_packed_start[#1]% nesting afvangen
+\permanent\tolerant\protected\def\startpacked[#1]%
{\global\advance\c_spac_packed_level\plusone
\par
\ifnum\c_spac_packed_level=\plusone \ifvmode
@@ -480,18 +460,18 @@
\setupwhitespace[\v!none]% or \forgetparskip
\fi \fi}
-\unexpanded\def\stoppacked
+\permanent\protected\def\stoppacked
{\par
\ifnum\c_spac_packed_level=\plusone \ifvmode
\endgroup
\fi \fi
\global\advance\c_spac_packed_level\minusone}
-\unexpanded\def\startunpacked
+\permanent\protected\def\startunpacked
{\directdefaultvspacing % \blank
\begingroup}
-\unexpanded\def\stopunpacked
+\permanent\protected\def\stopunpacked
{\endgroup
\directdefaultvspacing}% \blank}
@@ -508,8 +488,8 @@
\installtextracker
{linecorrection.boxes}
- {\let\spac_lines_vbox\ruledvbox}
- {\let\spac_lines_vbox\vbox}
+ {\letfrozen\let\spac_lines_vbox\ruledvbox}
+ {\letfrozen\let\spac_lines_vbox\vbox}
\let\v_spac_lines_around_action_set\relax
\let\m_spac_lines_around \empty
@@ -525,20 +505,14 @@
\ifcsname\??linesaround\m_spac_lines_around\endcsname\m_spac_lines_around\else\s!unknown\fi
\endcsname}
-\unexpanded\def\startlinecorrection
- {\endgraf
- \begingroup
- \setconstant\c_spac_lines_correction_mode\plusone
- \dosingleempty\spac_lines_start_correction}
+\permanent\tolerant\protected\def\startlinecorrection [#1]{\spac_lines_start_correction\plusone{#1}}
+\permanent\tolerant\protected\def\startlocallinecorrection[#1]{\spac_lines_start_correction\plustwo{#1}}
-\unexpanded\def\startlocallinecorrection
+\permanent\protected\def\spac_lines_start_correction#1#2%
{\endgraf
\begingroup
- \setconstant\c_spac_lines_correction_mode\plustwo
- \dosingleempty\spac_lines_start_correction}
-
-\unexpanded\def\spac_lines_start_correction[#1]%
- {\edef\m_spac_lines_around{#1}%
+ \setconstant\c_spac_lines_correction_mode#1%
+ \edef\m_spac_lines_around{#2}%
\spac_lines_action_around
\d_spac_prevdepth\prevdepth
\spac_lines_initialize_corrections
@@ -556,7 +530,7 @@
\fi
\ignorespaces}
-\unexpanded\def\spac_lines_stop_correction
+\permanent\protected\def\spac_lines_stop_correction
{\removeunwantedspaces
\egroup
\ifgridsnapping
@@ -566,14 +540,14 @@
\fi
\endgroup}
-\unexpanded\def\spac_lines_stop_correction_ongrid
+\protected\def\spac_lines_stop_correction_ongrid
{\directcheckedvspacing\v!white % \blank[\v!white]%
\spac_lines_action_around
\snaptogrid\hpack{\box\scratchbox}%
\directcheckedvspacing\v!white
\spac_lines_action_around}
-\unexpanded\def\spac_lines_stop_correction_normal
+\protected\def\spac_lines_stop_correction_normal
{\directcheckedvspacing\v!nowhite % \blank[\v!nowhite]%
\ifdim\parskip>\zeropoint
% too fuzzy otherwise
@@ -619,21 +593,21 @@
\prevdepth\strutdp
\spac_lines_action_around}
-\let\stoplinecorrection \spac_lines_stop_correction
-\let\stoplocallinecorrection\spac_lines_stop_correction
+\aliased\let\stoplinecorrection \spac_lines_stop_correction
+\aliased\let\stoplocallinecorrection\spac_lines_stop_correction
% todo:
-\unexpanded\def\correctwhitespace
+\permanent\protected\def\correctwhitespace
{\dowithnextboxcs\correctwhitespacefinish\vbox}
-\unexpanded\def\correctwhitespacefinish
+\permanent\protected\def\correctwhitespacefinish
{\startbaselinecorrection
\flushnextbox
\stopbaselinecorrection}
-\unexpanded\def\verticalstrut {\vpack{\hsize\zeropoint\forgetall\strut}}
-\unexpanded\def\horizontalstrut{\hpack {\strut}}
+\permanent\protected\def\verticalstrut {\vpack{\hsize\zeropoint\forgetall\strut}}
+\permanent\protected\def\horizontalstrut{\hpack {\strut}}
%D Here follow some presets related to interline spacing and therefore also struts.
%D The values 2.8, 0.07, 0.72 and 0.28 originate in \INRSTEX, a package that we used
@@ -671,33 +645,31 @@
\newdimen\openstrutheight
\newdimen\openstrutdepth
\newdimen\topskipgap
-\newdimen\struttotal
-\def\strutheightfactor {.72}
-\def\strutdepthfactor {.28}
-
-\def\baselinefactor {2.8}
+\newdimen\strutheight
+\newdimen\strutdepth
+\newdimen\struttotal
+\newdimen\strutwidth
\let\m_spac_vertical_baseline_stretch_factor \zerocount
\let\m_spac_vertical_baseline_shrink_factor \zerocount
-\def\minimumstrutheight {\zeropoint}
-\def\minimumstrutdepth {\zeropoint}
+\mutable\def\strutheightfactor {.72}
+\mutable\def\strutdepthfactor {.28}
+\mutable\def\baselinefactor {2.8}
+\mutable\def\topskipfactor {1.0}
+\mutable\def\maxdepthfactor {0.5}
-\def\normallineheight {\baselinefactor\exheight}
-\def\minimumlinedistance {\lineskip}
+\mutable\def\minimumstrutheight {\zeropoint}
+\mutable\def\minimumstrutdepth {\zeropoint}
-\def\strutheight {\zeropoint}
-\def\strutdepth {\zeropoint}
-\def\strutwidth {\zeropoint}
+\mutable\def\normallineheight {\baselinefactor\exheight}
+\mutable\def\minimumlinedistance {\lineskip}
-\let\spacingfactor \plusone
+\mutable\let\spacingfactor \plusone
-\def\topskipfactor {1.0}
-\def\maxdepthfactor {0.5}
-
-\def\systemtopskipfactor {\topskipfactor}
-\def\systemmaxdepthfactor {\maxdepthfactor}
+\mutable\def\systemtopskipfactor {\topskipfactor}
+\mutable\def\systemmaxdepthfactor{\maxdepthfactor}
\ifdefined\globalbodyfontsize \else
\newdimen\globalbodyfontsize
@@ -708,19 +680,19 @@
\def\normalizedbodyfontsize{12pt}
\fi
-\unexpanded\def\topskipcorrection
+\permanent\protected\def\topskipcorrection
{\simpletopskipcorrection
\vskip-\struttotal
\verticalstrut}
-\unexpanded\def\simpletopskipcorrection
+\permanent\protected\def\simpletopskipcorrection
{\ifdim\topskip>\openstrutheight
% == \vskip\topskipgap
\vskip\topskip
\vskip-\openstrutheight
\fi}
-\unexpanded\def\settopskip % the extra test is needed for the lbr family
+\permanent\protected\def\settopskip % the extra test is needed for the lbr family
{\topskip
\ifgridsnapping
\zeropoint
@@ -743,24 +715,24 @@
\fi
\fi}
-\unexpanded\def\setmaxdepth
+\permanent\protected\def\setmaxdepth
{\maxdepth\systemmaxdepthfactor\globalbodyfontsize}
-\let\normalbaselineskip \relax \newskip \normalbaselineskip % these got lost in the transition to mkiv due
-\let\normallineskip \relax \newskip \normallineskip % to auto-\normal* definitions and registers
-\let\normallineskiplimit\relax \newdimen\normallineskiplimit % being protected
+\newskip \usedbaselineskip % These used to be \normal... but that isn't pretty
+\newskip \usedlineskip % in the token interface, so thes few now have new
+\newdimen\usedlineskiplimit % names. They are public but not really user commands.
-\unexpanded\def\normalbaselines
- {\baselineskip \normalbaselineskip
- \lineskip \normallineskip
- \lineskiplimit\normallineskiplimit}
+\permanent\protected\def\normalbaselines
+ {\baselineskip \usedbaselineskip
+ \lineskip \usedlineskip
+ \lineskiplimit\usedlineskiplimit}
-\unexpanded\def\flexiblebaselines
- {\baselineskip \normalbaselineskip
- \lineskip 1\normallineskip \s!plus 1\s!fill
- \lineskiplimit\normallineskiplimit}
+\permanent\protected\def\flexiblebaselines
+ {\baselineskip \usedbaselineskip
+ \lineskip 1\usedlineskip \s!plus 1\s!fill
+ \lineskiplimit\usedlineskiplimit}
-\unexpanded\def\setnormalbaselines
+\permanent\protected\def\setnormalbaselines % used in overload
{\ifdim\normallineheight>\zeropoint
\lineheight\normallineheight
\fi
@@ -778,30 +750,30 @@
\ifdim\dimexpr\minimumstrutdepth+\minimumstrutheight\relax>\zeropoint
\openlineheight\dimexpr\openstrutheight+\openstrutdepth\relax % new
\fi
- \normalbaselineskip\openlineheight
+ \usedbaselineskip\openlineheight
\ifgridsnapping\else
\s!plus \m_spac_vertical_baseline_stretch_factor\openlineheight
\s!minus\m_spac_vertical_baseline_shrink_factor \openlineheight
\fi
- \normallineskip\minimumlinedistance\relax % \onepoint\relax
- \normallineskiplimit\zeropoint\relax
+ \usedlineskip\minimumlinedistance\relax % \onepoint\relax
+ \usedlineskiplimit\zeropoint\relax
\normalbaselines}
-\unexpanded\def\spacing#1% vertical
+\permanent\protected\def\spacing#1% vertical
{\ifgridsnapping
\let\spacingfactor\plusone
\else
- \edef\spacingfactor{#1}%
+ \permanent\edef\spacingfactor{#1}%
\fi
- \edef\systemtopskipfactor {\withoutpt\the\dimexpr#1\dimexpr\topskipfactor \points}%
- \edef\systemmaxdepthfactor{\withoutpt\the\dimexpr#1\dimexpr\maxdepthfactor\points}%
+ \edef\systemtopskipfactor {\thewithoutunit\dimexpr#1\dimexpr\topskipfactor \points}%
+ \edef\systemmaxdepthfactor{\thewithoutunit\dimexpr#1\dimexpr\maxdepthfactor\points}%
\setnormalbaselines
\setstrut}
-% \unexpanded\def\forgetverticalstretch % \forgetspacing
+% \protected\def\forgetverticalstretch % \forgetspacing
% {\spacing\plusone}
-\unexpanded\def\forgetverticalstretch
+\permanent\protected\def\forgetverticalstretch
{\let\spacingfactor \plusone
\let\systemtopskipfactor \topskipfactor
\let\systemmaxdepthfactor\maxdepthfactor
@@ -818,17 +790,17 @@
%D \rm \saveinterlinespace .... {\ss \restoreinterlinespace .... \endgraf}
%D \stoptyping
-\let\restoreinterlinespace\relax
+\aliased\let\restoreinterlinespace\relax
-\unexpanded\def\saveinterlinespace
- {\unexpanded\edef\restoreinterlinespace
+\permanent\protected\def\saveinterlinespace
+ {\enforced\permanent\protected\edef\restoreinterlinespace
{\lineheight \the\lineheight
\openstrutheight \the\openstrutheight
\openstrutdepth \the\openstrutdepth
\openlineheight \the\openlineheight
- \normalbaselineskip \the\normalbaselineskip
- \normallineskip \the\normallineskip
- \normallineskiplimit\the\normallineskiplimit
+ \usedbaselineskip \the\usedbaselineskip
+ \usedlineskip \the\usedlineskip
+ \usedlineskiplimit \the\usedlineskiplimit
\noexpand\def\noexpand\normallineheight{\the\dimexpr\normallineheight}%
\noexpand\normalbaselines}}
@@ -850,80 +822,84 @@
\setbox\strutbox\hpack{\vrule\s!height8.5pt\s!depth3.5pt\s!width\zeropoint} % just a start
-\def\strut{\relax\ifmmode\copy\else\unhcopy\fi\strutbox}
-
-% \unexpanded\def\strut
+% \permanent\protected\def\strut{\relax\ifmmode\copy\else\unhcopy\fi\strutbox}
+%
+% \protected\def\strut
% {\relax
% \ifmmode\copy\else\dontleavehmode\unhcopy\fi\strutbox}
-
-\let\normalstrut\strut
+%
+% \aliased\let\normalstrut\strut
%D The double \type {\hbox} construction enables us to backtrack boxes.
-\let\strutht\undefined \newdimen\strutht
-\let\strutdp\undefined \newdimen\strutdp
+\overloaded\let\strutht\undefined \newdimen\strutht
+\overloaded\let\strutdp\undefined \newdimen\strutdp
-\unexpanded\def\setstrut
+\permanent\protected\def\setstrut
{\ifgridsnapping
\setstrutgridyes
\else
\setstrutgridnop
\fi}
-\unexpanded\def\setstrutgridyes
+\permanent\protected\def\setstrutgridyes
{\strutht\spacingfactor\dimexpr
\ifdim\minimumstrutheight>\zeropoint
\minimumstrutheight
\else
\strutheightfactor\dimexpr\normallineheight
\fi
+ \relax
\strutdp\dimexpr
\ifdim\minimumstrutdepth>\zeropoint
\minimumstrutdepth
\else
\normallineheight-\strutht
\fi
+ \relax
\dosetstrut}
-\unexpanded\def\setstrutgridnop
+\permanent\protected\def\setstrutgridnop
{\strutht\spacingfactor\dimexpr
\ifdim\minimumstrutheight>\zeropoint
\minimumstrutheight
\else
\strutheightfactor\dimexpr\normallineheight
\fi
+ \relax
\strutdp\spacingfactor\dimexpr
\ifdim\minimumstrutdepth>\zeropoint
\minimumstrutdepth
\else
\strutdepthfactor\dimexpr\normallineheight
\fi
+ \relax
\dosetstrut}
-\unexpanded\def\setcharstrut#1%
+\permanent\protected\def\setcharstrut#1%
{\setbox\strutbox\hbox{#1}% no \hpack, in case we have smallcaps
\strutht\ht\strutbox
\strutdp\dp\strutbox
\dosetstrut}
-\unexpanded\def\settightstrut
+\permanent\protected\def\settightstrut
{\setcharstrut{(}}
-\unexpanded\def\setfontstrut
+\permanent\protected\def\setfontstrut
{\setcharstrut{(gplQT}}
-\unexpanded\def\setcapstrut% could be M, but Q has descender
+\permanent\protected\def\setcapstrut% could be M, but Q has descender
{\setcharstrut{Q}}
%D Handy for math (used in mathml):
-\unexpanded\def\charhtstrut
+\permanent\protected\def\charhtstrut
{\begingroup
\setcharstrut{GJY}%
\vrule\s!width\zeropoint\s!depth\zeropoint\s!height\strutht
\endgroup}
-\unexpanded\def\chardpstrut
+\permanent\protected\def\chardpstrut
{\begingroup
\setcharstrut{gjy}%
\vrule\s!width\zeropoint\s!depth\strutdp\s!height\zeropoint
@@ -934,8 +910,8 @@
%D an attribute so far have shown that it's slower because testing the attribute
%D takes time too.
-\unexpanded\def\dosetstrut
- {\let\strut\normalstrut
+\permanent\protected\def\dosetstrut
+ {\enforced\let\strut\normalstrut
\ifabsnum\dimexpr\strutht+\strutdp-\lineheight\relax<\plustwo
% compensate rounding error /- 1sp to avoid too many
% 1sp baselineskips in for instance verbatim
@@ -946,8 +922,8 @@
\else
\struttotal\dimexpr\strutht+\strutdp\relax
\fi
- \edef\strutheight{\the\strutht}%
- \edef\strutdepth {\the\strutdp}%
+ \strutheight\strutht
+ \strutdepth \strutdp
\ifdim\strutwidth=\zeropoint
\spac_struts_set_hide
\else
@@ -1016,18 +992,18 @@
\ht\strutbox\strutht
\dp\strutbox\strutdp}
-\unexpanded\def\strut % still callbacks for \hbox{\strut}
+\permanent\protected\def\strut % still callbacks for \hbox{\strut}
{\relax
\dontleavehmode
\copy\strutbox}
-% \unexpanded\def\strut % slightly faster
+% \protected\def\strut % slightly faster
% {\relax
% \ifmmode\copy\else\dontleavehmode\unhcopy\fi\strutbox}
-\let\normalstrut\strut
+\aliased\let\normalstrut\strut
-\unexpanded\def\halfstrut
+\permanent\protected\def\halfstrut
{\relax
\dontleavehmode
\begingroup
@@ -1037,7 +1013,7 @@
\box\scratchbox
\endgroup}
-\unexpanded\def\quarterstrut
+\permanent\protected\def\quarterstrut
{\relax
\dontleavehmode
\begingroup
@@ -1047,7 +1023,7 @@
\box\scratchbox
\endgroup}
-\unexpanded\def\depthstrut
+\permanent\protected\def\depthstrut
{\relax
\dontleavehmode
\begingroup
@@ -1056,7 +1032,7 @@
\box\scratchbox
\endgroup}
-\unexpanded\def\halflinestrut
+\permanent\protected\def\halflinestrut
{\relax
\dontleavehmode
\begingroup
@@ -1065,7 +1041,7 @@
\box\scratchbox
\endgroup}
-\unexpanded\def\noheightstrut
+\permanent\protected\def\noheightstrut
{\relax
\dontleavehmode
\begingroup
@@ -1088,10 +1064,7 @@
\installcorenamespace{struts}
-\unexpanded\def\setupstrut
- {\dosingleempty\spac_struts_setup}
-
-\def\spac_struts_setup[#1]%
+\permanent\tolerant\protected\def\setupstrut[#1]%
{\edef\m_strut{#1}%
\ifcsname\??struts\m_strut\endcsname
\lastnamedcs
@@ -1099,7 +1072,7 @@
\setcharstrut\m_strut
\fi}
-\unexpanded\def\synchronizestrut#1% no [] parsing, faster for internal
+\permanent\protected\def\synchronizestrut#1% no [] parsing, faster for internal
{\edef\m_strut{#1}%
\ifcsname\??struts\m_strut\endcsname
\lastnamedcs
@@ -1107,38 +1080,38 @@
\setcharstrut\m_strut
\fi}
-\unexpanded\def\dosynchronizestrut#1% no [] parsing, faster for internal
+\permanent\protected\def\dosynchronizestrut#1% no [] parsing, faster for internal
{\ifcsname\??struts#1\endcsname
\lastnamedcs
\else
\setcharstrut{#1}%
\fi}
-\unexpanded\def\showstruts % adapts .. is wrong
+\permanent\protected\def\showstruts % adapts .. is wrong
{\c_strut_visual_mode\zerocount
\setteststrut
\settestcrlf}
-\unexpanded\def\showcolorstruts % adapts .. is wrong
+\permanent\protected\def\showcolorstruts % adapts .. is wrong
{\c_strut_visual_mode\plusone
\setteststrut
\settestcrlf}
-\unexpanded\def\setteststrut
- {\def\strutwidth{.8pt}%
+\permanent\protected\def\setteststrut
+ {\strutwidth.8\onepoint
\setstrut}
-\unexpanded\def\dontshowstruts
+\permanent\protected\def\dontshowstruts
{\unsetteststrut
\settestcrlf}
-\unexpanded\def\unsetteststrut
- {\let\strutwidth\zeropoint
+\permanent\protected\def\unsetteststrut
+ {\strutwidth\zeropoint
\setstrut}
-\def\autostrutfactor{1.1}
+\mutable\def\autostrutfactor{1.1}
-\unexpanded\def\setautostrut
+\permanent\protected\def\setautostrut
{\begingroup
\setbox\scratchbox\copy\strutbox
\setstrut
@@ -1154,26 +1127,26 @@
\newtoks\everysetnostrut
-\unexpanded\def\setnostrut
+\permanent\protected\def\setnostrut
{\the\everysetnostrut}
\appendtoks
\setbox\strutbox\copy\nostrutbox
- \let\strut\empty
- \let\endstrut\empty
- \let\begstrut\empty
+ \enforced\let\strut \empty
+ \enforced\let\endstrut\empty
+ \enforced\let\begstrut\empty
\to \everysetnostrut
%D When enabled, sigstruts will remove themselves if nothing goes inbetween. For
%D practical reasons we define some boundary characters here.
-\unexpanded\def\leftboundary {\protrusionboundary\plusone}
-\unexpanded\def\rightboundary {\protrusionboundary\plustwo}
-\unexpanded\def\signalcharacter{\boundary\plusone\char\zerocount\boundary\plustwo} % not the same as strut signals
+\permanent\protected\def\leftboundary {\protrusionboundary\plusone}
+\permanent\protected\def\rightboundary {\protrusionboundary\plustwo}
+\permanent\protected\def\signalcharacter{\boundary\plusone\char\zerocount\boundary\plustwo} % not the same as strut signals
-\newsignal\strutsignal \setfalse\sigstruts
+\newsignal\d_spac_struts_signal \setfalse\sigstruts
-\unexpanded\def\begstrut
+\permanent\protected\def\begstrut
{\relax\ifcase\strutht
% \ignorespaces % maybe
\else
@@ -1191,8 +1164,8 @@
\def\spac_struts_beg_signal
{\noindent\horizontalstrut
\penalty\plustenthousand
- \hskip-\strutsignal
- \hskip\strutsignal}
+ \hskip-\d_spac_struts_signal
+ \hskip\d_spac_struts_signal}
\def\spac_struts_beg_normal
{\boundary\plusone
@@ -1202,7 +1175,7 @@
%\boundary\plusone
\hskip\zeropoint}
-\unexpanded\def\endstrut
+\permanent\protected\def\endstrut
{\relax\ifhmode
\ifcase\strutht
% \removeunwantedspaces % maybe
@@ -1219,7 +1192,7 @@
\fi}
\def\spac_struts_end_signal
- {\ifdim\lastskip=\strutsignal
+ {\ifdim\lastskip=\d_spac_struts_signal
\unskip
\unskip
\unpenalty
@@ -1255,14 +1228,14 @@
%
% so:
-\unexpanded\def\pseudostrut
+\permanent\protected\def\pseudostrut
{\noindent} % better: \dontleavehmode
-\let\pseudobegstrut\pseudostrut
-\let\pseudoendstrut\removeunwantedspaces
+\aliased\let\pseudobegstrut\pseudostrut
+\aliased\let\pseudoendstrut\removeunwantedspaces
-\unexpanded\def\resetteststrut
- {\def\strutwidth{\zeropoint}% no let
+\permanent\protected\def\resetteststrut
+ {\strutwidth\zeropoint
\setstrut}
\ifdefined\setfontparameters \else
@@ -1271,34 +1244,38 @@
%D Keyword based strutting:
-\letvalue{\??struts\v!yes }\setstrut
-\letvalue{\??struts\v!auto }\setautostrut
-\letvalue{\??struts\v!no }\setnostrut
-\letvalue{\??struts\v!cap }\setcapstrut
-\letvalue{\??struts\v!fit }\setfontstrut
-\letvalue{\??struts\v!line }\setstrut
-\letvalue{\??struts\s!default}\setstrut
-\letvalue{\??struts\empty }\setstrut
+\letcsname\??struts\v!yes \endcsname\setstrut
+\letcsname\??struts\v!auto \endcsname\setautostrut
+\letcsname\??struts\v!no \endcsname\setnostrut
+\letcsname\??struts\v!cap \endcsname\setcapstrut
+\letcsname\??struts\v!fit \endcsname\setfontstrut
+\letcsname\??struts\v!line \endcsname\setstrut
+\letcsname\??struts\s!default\endcsname\setstrut
+\letcsname\??struts\empty \endcsname\setstrut
%D Handy:
-\def\baselinedistance{\the\lineheight}
+\permanent\def\baselinedistance{\the\lineheight}
%D We need \type {\normaloffinterlineskip} because the new definition contains an
%D assignment, and |<|don't ask me why|>| this assignment gives troubles in for
%D instance the visual debugger.
-\unexpanded\def\offinterlineskip
+\pushoverloadmode
+
+\overloaded\permanent\protected\def\offinterlineskip
{\baselineskip-\thousandpoint
\lineskip \zeropoint
\lineskiplimit\maxdimen
% We also need this here now; thanks to taco for figuring that out!
- \def\minimumlinedistance{\zeropoint}}
+ \let\minimumlinedistance\zeropoint}
-\unexpanded\def\nointerlineskip
+\overloaded\permanent\protected\def\nointerlineskip
{\prevdepth-\thousandpoint}
-\let\normaloffinterlineskip\offinterlineskip % knuth's original
+\aliased\let\normaloffinterlineskip\offinterlineskip % knuth's original
+
+\popoverloadmode
%D This is tricky. The prevdepth value is still set to the last one even if there is
%D nothing on the page. The same is true for prevgraf, which doesn't resemble the
@@ -1316,19 +1293,15 @@
\let\getnofpreviouslines\!!zerocount
\fi
-\unexpanded\def\page_otr_synchronize_page_yes
+\protected\def\page_otr_synchronize_page_yes
{\aftergroup\page_otr_synchronize_page_indeed
- \glet\page_otr_synchronize_page\relax}
+ \global\enforced\let\page_otr_synchronize_page\relax}
-% \unexpanded\def\page_otr_synchronize_page_indeed
-% {\clf_synchronizepage
-% \glet\page_otr_synchronize_page\page_otr_synchronize_page_yes}
-%
% This has to become an otr method: \s!page_otr_command_synchonize_page
-\unexpanded\def\page_otr_synchronize_page_indeed
+\protected\def\page_otr_synchronize_page_indeed
{\ifx\currentoutputroutine\s!multicolumn\else\clf_synchronizepage\fi
- \glet\page_otr_synchronize_page\page_otr_synchronize_page_yes}
+ \global\enforced\let\page_otr_synchronize_page\page_otr_synchronize_page_yes}
\let\page_otr_synchronize_page\page_otr_synchronize_page_yes
@@ -1338,18 +1311,20 @@
%D My own one:
-\unexpanded\def\spac_helpers_push_interlineskip_yes
- {\edef\oninterlineskip
+\protected\def\spac_helpers_push_interlineskip_yes
+ {\enforced\edef\oninterlineskip
{\baselineskip \the\baselineskip
\lineskip \the\lineskip
\lineskiplimit\the\lineskiplimit
\noexpand\edef\noexpand\minimumlinedistance{\the\dimexpr\minimumlinedistance}%
- \let\noexpand\offinterlineskip\noexpand\normaloffinterlineskip}} % \noexpand not needed
+ \enforced\let\noexpand\offinterlineskip\noexpand\normaloffinterlineskip}} % \noexpand not needed
-\unexpanded\def\spac_helpers_push_interlineskip_nop
- {\let\oninterlineskip\setnormalbaselines}
+\protected\def\spac_helpers_push_interlineskip_nop
+ {\enforced\let\oninterlineskip\setnormalbaselines}
-\unexpanded\def\offinterlineskip
+\pushoverloadmode
+
+\overloaded\permanent\protected\def\offinterlineskip
{\ifdim\baselineskip>\zeropoint
\spac_helpers_push_interlineskip_yes
\else
@@ -1357,21 +1332,18 @@
\fi
\normaloffinterlineskip}
-\let\oninterlineskip\relax
+\permanent\let\oninterlineskip\relax
-\unexpanded\def\leaveoutervmode
- {\ifvmode\ifinner\else
- \leavevmode
- \fi\fi}
+\popoverloadmode
-\unexpanded\def\resetpenalties#1%
+\permanent\protected\def\resetpenalties#1%
{\ifdefined#1%
- #1\minusone
+ \frozen#1\minusone
\fi}
-\unexpanded\def\setpenalties#1#2#3%
+\permanent\protected\def\setpenalties#1#2#3%
{\ifdefined#1% space before #3 prevents lookahead problems, needed when #3=text
- #1\numexpr#2+\plusone\relax\space\doexpandedrecurse{\the\numexpr#2\relax}{ #3}\zerocount\relax
+ \frozen#1\numexpr#2+\plusone\relax\space\doexpandedrecurse{\the\numexpr#2\relax}{ #3}\zerocount\relax
\fi}
%D \macros
@@ -1383,45 +1355,46 @@
% attributes
\newcount\c_spac_keep_lines_together
-\let\restoreinterlinepenalty\relax
-\unexpanded\def\spac_penalties_restore
- {\glet\restoreinterlinepenalty\relax
- \global\resetpenalties\interlinepenalties
+\aliased\let\restoreinterlinepenalty\relax
+
+\protected\def\spac_penalties_restore
+ {\global\enforced\let\restoreinterlinepenalty\relax
+ \overloaded\global\resetpenalties\interlinepenalties
\global\c_spac_keep_lines_together\zerocount}
-\unexpanded\def\keeplinestogether#1%
+\permanent\protected\def\keeplinestogether#1%
{\ifnum#1>\c_spac_keep_lines_together
\global\c_spac_keep_lines_together#1%
- \global\setpenalties\interlinepenalties\c_spac_keep_lines_together\plustenthousand
- \glet\restoreinterlinepenalty\spac_penalties_restore
+ \overloaded\global\setpenalties\interlinepenalties\c_spac_keep_lines_together\plustenthousand
+ \global\enforced\let\restoreinterlinepenalty\spac_penalties_restore
\fi}
-\def\defaultdisplaywidowpenalty {50}
-\def\defaultwidowpenalty {2000} % was: 1000
-\def\defaultclubpenalty {2000} % was: 800
-\def\defaultbrokenpenalty {100}
-\def\defaultdoublehyphendemerits {10000}
-\def\defaultfinalhyphendemerits {5000}
-\def\defaultadjdemerits {10000}
-
-\def\defaultgriddisplaywidowpenalty {0}
-\def\defaultgridwidowpenalty {0}
-\def\defaultgridclubpenalty {0}
-\def\defaultgridbrokenpenalty {0}
-\def\defaultgriddoublehyphendemerits{10000} % always was so
-\def\defaultgridfinalhyphendemerits {5000} % always was so
-\def\defaultgridadjdemerits {10000} % always was so
-
-\unexpanded\def\nopenalties
- {\widowpenalty \zerocount
- \clubpenalty \zerocount
- \brokenpenalty \zerocount
- \doublehyphendemerits\zerocount
- \finalhyphendemerits \zerocount
- \adjdemerits \zerocount}
-
-\unexpanded\def\setdefaultpenalties
+\immutable\integerdef\defaultdisplaywidowpenalty 50
+\immutable\integerdef\defaultwidowpenalty 2000 % was: 1000
+\immutable\integerdef\defaultclubpenalty 2000 % was: 800
+\immutable\integerdef\defaultbrokenpenalty 100
+\immutable\integerdef\defaultdoublehyphendemerits 10000
+\immutable\integerdef\defaultfinalhyphendemerits 5000
+\immutable\integerdef\defaultadjdemerits 10000
+
+\immutable\integerdef\defaultgriddisplaywidowpenalty 0
+\immutable\integerdef\defaultgridwidowpenalty 0
+\immutable\integerdef\defaultgridclubpenalty 0
+\immutable\integerdef\defaultgridbrokenpenalty 0
+\immutable\integerdef\defaultgriddoublehyphendemerits 10000 % always was so
+\immutable\integerdef\defaultgridfinalhyphendemerits 5000 % always was so
+\immutable\integerdef\defaultgridadjdemerits 10000 % always was so
+
+\permanent\protected\def\nopenalties
+ {\frozen\widowpenalty \zerocount
+ \frozen\clubpenalty \zerocount
+ \frozen\brokenpenalty \zerocount
+ \frozen\doublehyphendemerits\zerocount
+ \frozen\finalhyphendemerits \zerocount
+ \frozen\adjdemerits \zerocount}
+
+\permanent\protected\def\setdefaultpenalties
{\directsetup{\systemsetupsprefix\s!default}}
\startsetups [\systemsetupsprefix\s!reset]
@@ -1436,13 +1409,13 @@
\directsetup{\systemsetupsprefix\s!reset}
- \widowpenalty \defaultwidowpenalty
- \clubpenalty \defaultclubpenalty
- \displaywidowpenalty \defaultdisplaywidowpenalty
- \brokenpenalty \defaultbrokenpenalty
- \doublehyphendemerits\defaultdoublehyphendemerits
- \finalhyphendemerits \defaultfinalhyphendemerits
- \adjdemerits \defaultadjdemerits
+ \frozen\widowpenalty \defaultwidowpenalty
+ \frozen\clubpenalty \defaultclubpenalty
+ \frozen\displaywidowpenalty \defaultdisplaywidowpenalty
+ \frozen\brokenpenalty \defaultbrokenpenalty
+ \frozen\doublehyphendemerits\defaultdoublehyphendemerits
+ \frozen\finalhyphendemerits \defaultfinalhyphendemerits
+ \frozen\adjdemerits \defaultadjdemerits
\stopsetups
@@ -1450,13 +1423,13 @@
\directsetup{\systemsetupsprefix\s!reset}
- \widowpenalty \defaultgridwidowpenalty
- \clubpenalty \defaultgridclubpenalty
- \displaywidowpenalty \defaultgriddisplaywidowpenalty
- \brokenpenalty \defaultgridbrokenpenalty
- \doublehyphendemerits\defaultgriddoublehyphendemerits
- \finalhyphendemerits \defaultgridfinalhyphendemerits
- \adjdemerits \defaultgridadjdemerits
+ \frozen\widowpenalty \defaultgridwidowpenalty
+ \frozen\clubpenalty \defaultgridclubpenalty
+ \frozen\displaywidowpenalty \defaultgriddisplaywidowpenalty
+ \frozen\brokenpenalty \defaultgridbrokenpenalty
+ \frozen\doublehyphendemerits\defaultgriddoublehyphendemerits
+ \frozen\finalhyphendemerits \defaultgridfinalhyphendemerits
+ \frozen\adjdemerits \defaultgridadjdemerits
\stopsetups
@@ -1468,10 +1441,10 @@
\setpenalties \widowpenalties \plustwo \maxdimen
\setpenalties \clubpenalties \plustwo \maxdimen
- \brokenpenalty \maxdimen
- \doublehyphendemerits \defaultdoublehyphendemerits
- \finalhyphendemerits \defaultfinalhyphendemerits
- \adjdemerits \defaultadjdemerits
+ \frozen \brokenpenalty \maxdimen
+ \frozen \doublehyphendemerits \defaultdoublehyphendemerits
+ \frozen \finalhyphendemerits \defaultfinalhyphendemerits
+ \frozen \adjdemerits \defaultadjdemerits
\stopsetups
@@ -1481,8 +1454,8 @@
\newbox\b_spac_struts_saved
-\unexpanded\def\savestrut {\setbox\b_spac_struts_saved\copy\strutbox}
-\unexpanded\def\savedstrut{\copy \b_spac_struts_saved}
+\permanent\protected\def\savestrut {\setbox\b_spac_struts_saved\copy\strutbox}
+\permanent\protected\def\savedstrut{\copy \b_spac_struts_saved}
%D Good old blank redone:
@@ -1508,56 +1481,51 @@
\newdimen \globalbodyfontstrutheight
\newdimen \globalbodyfontstrutdepth
-\def\snappedvboxattribute{\ifgridsnapping attr \snapvboxattribute \attribute\snapmethodattribute\fi}
-\def\setlocalgridsnapping{\ifgridsnapping \attribute \snapvboxattribute \attribute\snapmethodattribute\fi}
+\permanent\def\snappedvboxattribute{\ifgridsnapping attr\snapvboxattribute\c_attr_snapmethod\fi}
+\permanent\def\setlocalgridsnapping{\ifgridsnapping \c_attr_snapvbox \c_attr_snapmethod\fi}
\def\spac_grids_set_local_snapping#1%
{\ifgridsnapping
\doifsomething{#1}%
{\spac_grids_snap_value_set{#1}%
- \attribute \snapvboxattribute \attribute\snapmethodattribute}%
+ \c_attr_snapvbox\c_attr_snapmethod}%
\fi}
\def\spac_grids_expand_snapper#1%
{\edef\m_spac_snapper
- {\ifx\m_spac_snapper\empty\else\m_spac_snapper,\fi
- \ifcsname\??gridsnappersets#1\endcsname
- \lastnamedcs\else#1%
- \fi}}
+ {\ifempty\m_spac_snapper\else\m_spac_snapper,\fi
+ \ifcsname\??gridsnappersets#1\endcsname\lastnamedcs\else#1\fi}}
-\unexpanded\def\installsnapvalues#1#2%
+\permanent\protected\def\installsnapvalues#1#2%
{\let\m_spac_snapper\empty
\rawprocesscommacommand[#2]\spac_grids_expand_snapper
- \edef\currentsnapper{#1:\m_spac_snapper}%
- \ifcsname\??gridsnapperattributes\currentsnapper\endcsname
+ \edef\p_spac_snapper{#1:\m_spac_snapper}%
+ \ifcsname\??gridsnapperattributes\p_spac_snapper\endcsname
\scratchcounter\lastnamedcs % already defined
\else
\scratchcounter\clf_definesnapmethod{#1}{\m_spac_snapper}%
- \setevalue{\??gridsnapperattributes\currentsnapper}{\the\scratchcounter}%
+ \edefcsname\??gridsnapperattributes\p_spac_snapper\endcsname{\the\scratchcounter}%
\fi
- \setevalue{\??gridsnappers#1}{\attribute\snapmethodattribute\the\scratchcounter\relax}%
- \letvalue{\??gridsnappersets#1}\m_spac_snapper}
+ \edefcsname\??gridsnappers#1\endcsname{\c_attr_snapmethod\the\scratchcounter\relax}%
+ \letcsname\??gridsnappersets#1\endcsname\m_spac_snapper}
-\def\theexpandedsnapperset#1{\begincsname\??gridsnappersets#1\endcsname} % only for manuals
+\permanent\def\theexpandedsnapperset#1{\begincsname\??gridsnappersets#1\endcsname} % only for manuals
-\unexpanded\def\usegridparameter#1% no checking here
+\permanent\protected\def\usegridparameter#1% no checking here
{\edef\m_spac_grid_asked{#1\c!grid}%
- \ifx\m_spac_grid_asked\empty
- \attribute \snapvboxattribute\attributeunsetvalue
+ \ifempty\m_spac_grid_asked
+ \c_attr_snapvbox\attributeunsetvalue
\else
\spac_grids_snap_value_set\m_spac_grid_asked
- \attribute \snapvboxattribute\attribute\snapmethodattribute
+ \c_attr_snapvbox\c_attr_snapmethod
\fi}
-\unexpanded\def\definegridsnapping
- {\dodoubleargument\spac_grids_define}
-
-\def\spac_grids_define[#1][#2]%
+\permanent\tolerant\protected\def\definegridsnapping[#1]#*[#2]%
{\installsnapvalues{#1}{#2}}
\edef\spac_grids_snap_value_reset
{%\gridsnappingfalse
- \attribute\snapmethodattribute\attributeunsetvalue}
+ \c_attr_snapmethod\attributeunsetvalue}
\def\spac_grids_snap_value_set#1%
{%\gridsnappingtrue
@@ -1646,12 +1614,12 @@
\definegridsnapping[\v!math:-\v!line] [\v!math,-\v!line,\v!split]
\definegridsnapping[\v!math:-\v!halfline][\v!math,-\v!halfline,\v!split]
-\unexpanded\def\synchronizelocallinespecs
+\permanent\protected\def\synchronizelocallinespecs
{\bodyfontlineheight \normallineheight
\bodyfontstrutheight\strutht
\bodyfontstrutdepth \strutdp}
-\unexpanded\def\synchronizegloballinespecs
+\permanent\protected\def\synchronizegloballinespecs
{\global\globalbodyfontlineheight \normallineheight
\global\globalbodyfontstrutheight\strutht
\global\globalbodyfontstrutdepth \strutdp}
@@ -1667,7 +1635,7 @@
%D We still have to synchronize these:
-\unexpanded\def\synchronizeskipamounts
+\permanent\protected\def\synchronizeskipamounts
{\bigskipamount
\skipfactor\baselineskip
\s!plus\skipgluefactor\baselineskip
@@ -1678,30 +1646,20 @@
%D Snapping.
-\newif\ifgridsnapping
-
-%unexpanded\def\moveongrid {\dosingleempty\spac_grids_move_on}
-\unexpanded\def\snaptogrid {\dosingleempty\spac_grids_snap_to}
-\unexpanded\def\placeongrid{\dosingleempty\spac_grids_place_on}
+% \newif\ifgridsnapping % already defined
-\unexpanded\def\startgridsnapping
- {\dosingleempty\spac_grids_start_snapping}
-
-\unexpanded\def\spac_grids_start_snapping[#1]%
+\permanent\tolerant\protected\def\startgridsnapping[#1]%
{\snaptogrid[#1]\vbox\bgroup}
-\unexpanded\def\stopgridsnapping
+\permanent\protected\def\stopgridsnapping
{\egroup}
-% \def\spac_grids_move_on[#1]%
-% {[obsolete]} % gone, unless we set an attribute
-
-\def\spac_grids_place_on[#1]%
+\permanent\tolerant\protected\def\placeongrid[#1]%
{\snaptogrid[#1]\vbox} % mark as done
-\def\spac_grids_snap_to[#1]% list or predefined
+\permanent\tolerant\protected\def\snaptogrid[#1]% list or predefined
{\ifgridsnapping
- \expandafter\spac_grids_snap_to_indeed
+ \expandafter\spac_grids_snap_to_indeed % todo: move inline
\else
\expandafter\gobbleoneargument
\fi{#1}}
@@ -1718,7 +1676,7 @@
\clf_vspacingcollapse\nextbox\relax % isn't that already done?
\fi
\doifelsenothing{#1}{\spac_grids_snap_value_set\v!normal}{\spac_grids_snap_value_set{#1}}%
- \clf_vspacingsnap\nextbox\attribute\snapmethodattribute\relax
+ \clf_vspacingsnap\nextbox\c_attr_snapmethod\relax
\ifvbox\nextbox\vbox\else\hbox\fi attr \snapmethodattribute \zerocount {\box\nextbox}% no pack (?), we snap
\egroup}
@@ -1730,31 +1688,34 @@
\def\spac_grids_check_yes
{\gridsnappingtrue
\setsystemmode\v!grid
- \spac_grids_snap_value_set\askedgridmode}
+ \spac_grids_snap_value_set\p_grid}
-\unexpanded\def\synchronizegridsnapping
- {\edef\askedgridmode{\layoutparameter\c!grid}%
- \ifx\askedgridmode\v!no % official
+\permanent\protected\def\synchronizegridsnapping
+ {\edef\p_grid{\layoutparameter\c!grid}%
+ \ifx\p_grid\v!no % official
\spac_grids_check_nop
- \orelse\ifx\askedgridmode\v!off % for taco and luigi
+ \orelse\ifx\p_grid\v!off % for taco and luigi
\spac_grids_check_nop
- \orelse\ifx\askedgridmode\empty % to be sure
+ \orelse\ifempty\p_grid % to be sure
\spac_grids_check_nop
\else
\spac_grids_check_yes
\fi}
-\unexpanded\def\setupgridsnapping[#1]% less overhead than setuplayout (needs testing)
+\permanent\protected\def\setupgridsnapping[#1]% less overhead than setuplayout (needs testing)
{\setlayoutparameter\c!grid{#1}\synchronizegridsnapping}
-\unexpanded\def\checkgridmethod#1%
+\mutable\let\checkedgridmethod\empty % these can become private
+\mutable\let\checkedgridscope \v!local % these can become private
+
+\permanent\protected\def\checkgridmethod#1%
{\edef\p_grid{#1}%
- \ifx\p_grid\empty
+ \ifempty\p_grid
\let\checkedgridmethod\empty
\let\checkedgridscope \v!local
\else
\splitatcolon\p_grid\checkedgridscope\checkedgridmethod
- \ifx\checkedgridmethod\empty
+ \ifempty\checkedgridmethod
\ifx\checkedgridscope\v!local\orelse\ifx\checkedgridscope\v!global\else
\let\checkedgridmethod\checkedgridscope
\let\checkedgridscope \v!local
@@ -1762,10 +1723,10 @@
\fi
\fi}
-\unexpanded\def\applygridmethod#1#2#3% content localsettings (used in head rendering)
+\permanent\protected\def\applygridmethod#1#2#3% content localsettings (used in head rendering)
{\checkgridmethod{#1}%
\ifx\checkedgridscope\v!global
- \ifx\checkedgridmethod\empty \else
+ \ifempty\checkedgridmethod \else
% we assume that the call is grouped because grouping here has the side
% effect that the eventually constructed line will get the value outside
% the group
@@ -1780,20 +1741,20 @@
% we really need that in this case (compatibility etc etc) so here we don't
% het an already done hit (otherwise we would not snap)
\hbox\bgroup
- \ifx\checkedgridmethod\empty\orelse\ifconditional\headisdisplay
+ \ifempty\checkedgridmethod\orelse\ifconditional\headisdisplay
#2%
\fi
\snaptogrid[\checkedgridmethod]\hbox{#3}%
\egroup
\fi}
-\unexpanded\gdef\page_layouts_calculate_overshoot
+\protected\gdef\page_layouts_calculate_overshoot
{\ifgridsnapping\ifcase\layoutlines
\getnoflines\textheight
\textovershoot\dimexpr\noflines\globalbodyfontlineheight-\textheight\relax
\fi\fi}
-\unexpanded\def\page_layouts_report_overshoot
+\protected\def\page_layouts_report_overshoot
{\page_layouts_calculate_overshoot
\ifdim\textovershoot>\zeropoint
\writestatus\m!layouts{gridmode,\space
@@ -1818,7 +1779,7 @@
three=blue,
four=gray]
-\unexpanded\def\setgridtracebox#1[#2]% % maybe reverse the order
+\permanent\protected\def\setgridtracebox#1[#2]% % maybe reverse the order
{\setbox\nextbox#1%
{\hbox
{\hbox to \zeropoint
@@ -1830,7 +1791,7 @@
\setnewconstant\gridboxlinenomode\plusone % 0:nothing 1:all 2:lines 3:frame 4:l/r
\setnewconstant\gridboxlinemode \plusone
-\unexpanded\def\gridboxvbox
+\permanent\protected\def\gridboxvbox
{\ifcase\gridboxlinemode
\vpack
\or
@@ -1843,9 +1804,9 @@
\ruledvpack
\fi}
-\def\gridboxwidth{\ifcase\gridboxlinemode0\or.5\or.5\or0\else.5\fi\linewidth}
+\permanent\def\gridboxwidth{\ifcase\gridboxlinemode0\or.5\or.5\or0\else.5\fi\linewidth}
-\unexpanded\def\setgridbox#1#2#3% maybe ifgridsnapping at outer level
+\permanent\protected\def\setgridbox#1#2#3% maybe ifgridsnapping at outer level
{\setbox#1\gridboxvbox to #3 % given size
{\forgetall
\resetvisualizers
@@ -1882,15 +1843,12 @@
%D This has become obsolete:
-\def\fuzzysnappedbox#1#2% \box<n> \unvbox<n>
- {#1#2}
-
-\def\moveboxontogrid#1#2#3% will become obsolete, but it needs checking
- {}
+% \def\moveboxontogrid#1#2#3% will become obsolete, but it needs checking
+% {}
%D Helper:
-\unexpanded\def\spac_helpers_assign_skip#1#2% ook nog \v!halfline+fuzzysnap
+\protected\def\spac_helpers_assign_skip#1#2% ook nog \v!halfline+fuzzysnap
{\doifelse{#2}\v!line
{#1\ifgridsnapping
\bodyfontlineheight
@@ -1931,23 +1889,27 @@
%
% \ifgridsnapping will go
+\installcorenamespace{vspacing}
\installcorenamespace{vspacingamount}
-\unexpanded\def\definevspacingamount
- {\dotripleempty\spac_vspacing_define_amount}
-
-\def\spac_vspacing_define_amount[#1][#2][#3]% can be combined
- {\ifthirdargument
- \setvalue{\??vspacingamount#1}{\ifgridsnapping#3\else#2\fi}%
- \orelse\ifsecondargument
- \setvalue{\??vspacingamount#1}{\ifgridsnapping\lineheight\else#2\fi}%
- \else
- \setvalue{\??vspacingamount#1}{\lineheight}%
+\permanent\tolerant\protected\def\definevspacingamount[#1]#*[#2]#*[#3]% can be combined
+ {\ifarguments
+ %defcsname\??vspacingamount#1\endcsname{\lineheight}%
+ \or
+ \defcsname\??vspacingamount#1\endcsname{\lineheight}%
+ \or
+ \defcsname\??vspacingamount#1\endcsname{\ifgridsnapping\lineheight\else#2\fi}%
+ \or
+ \defcsname\??vspacingamount#1\endcsname{\ifgridsnapping#3\else#2\fi}%
\fi
\clf_vspacingsetamount{#1}}
\def\spac_vspacing_no_topskip % use grouped
- {\attribute\skipcategoryattribute\plusten}
+ {\c_attr_skipcategory\pluseleven}
+
+%permanent\def\vspacingfromscratchtoks {\scratchdimen\dimexpr\csname\??vspacingamount\the\scratchtoks\endcsname\relax}
+\permanent\def\vspacingpredefinedvalue#1{\scratchskip\glueexpr\csname\??vspacingamount#1\endcsname\relax}
+%permanent\def\vspacingfromtempstring {\scratchdimen\dimexpr\csname\??vspacingamount\tempstring\endcsname\relax}
% \installcorenamespace{vspacingamountnormal}
% \installcorenamespace{vspacingamountgrid}
@@ -1961,13 +1923,10 @@
% \csname g>#1\endcsname{#3}%
% \clf_vspacingsetamount{#1}}
-\unexpanded\def\definevspacing
- {\dodoubleempty\spac_vspacing_define}
-
-\def\spac_vspacing_define[#1][#2]%
+\permanent\tolerant\protected\def\definevspacing[#1]#*[#2]%
{\clf_vspacingdefine{#1}{#2}}
-%D The injector code (generated at the \LUA\ end):
+%D The injector code (generated at the \LUA\ end). This will go away!
\newtoks\everybeforeblankhandling
\newtoks\everyafterblankhandling
@@ -1978,9 +1937,9 @@
\appendtoks
\s_spac_vspacing_temp\zeropoint
- \attribute\skipcategoryattribute\plusone
- \attribute\skippenaltyattribute \attributeunsetvalue
- \attribute\skiporderattribute \attributeunsetvalue
+ \c_attr_skipcategory\plusone
+ \c_attr_skippenalty \attributeunsetvalue
+ \c_attr_skiporder \attributeunsetvalue
\ifgridsnapping
\settrue\c_space_vspacing_fixed
\else
@@ -1997,86 +1956,15 @@
\relax
\to \everyafterblankhandling
-\unexpanded\def\setblankpacked
- {\settrue\c_space_ignore_parskip}
-
-\unexpanded\def\setblankcategory#1%
- {\settrue\c_space_vspacing_done
- \attribute\skipcategoryattribute#1\relax}
-
-\unexpanded\def\setblankorder#1%
- {\attribute\skiporderattribute#1\relax}
-
-\unexpanded\def\fixedblankskip
- {\settrue\c_space_vspacing_fixed}
-
-\unexpanded\def\flexibleblankskip
- {\setfalse\c_space_vspacing_fixed}
-
-% \unexpanded\def\addblankskip#1#2#3%
-% {\settrue\c_space_vspacing_done
-% \advance\s_spac_vspacing_temp#1\dimexpr\ifgridsnapping#3\else#2\fi\relax\relax}
-
-\unexpanded\def\setblankpenalty#1%
- {\flushblankhandling
- \settrue\c_space_vspacing_done
- \attribute\skipcategoryattribute \plusthree
- \attribute\skippenaltyattribute #1\relax
- \flushblankhandling}
-
-\unexpanded\def\startblankhandling % move this to \vspacing
- {\par
- \ifvmode
- \expandafter\dostartblankhandling
- \else
- \expandafter\nostartblankhandling
- \fi}
-
-\unexpanded\def\nostartblankhandling#1\stopblankhandling
- {}
+% The main spacer:
-\def\dostartblankhandling
- {\begingroup
- \setfalse\c_space_vspacing_done
- \setfalse\c_space_ignore_parskip
- \the\everybeforeblankhandling}
-
-\unexpanded\def\stopblankhandling
- {\the\everyafterblankhandling
- \ifconditional\c_space_vspacing_done
- \vskip\s_spac_vspacing_temp
- \fi
- \ifconditional\c_space_ignore_parskip
- \endgroup\ignoreparskip
+\permanent\tolerant\protected\def\vspacing[#1]%
+ {\ifarguments
+ \spac_vspacing_yes[\currentvspacing]% in the new mechanism no [] needed
\else
- \endgroup
+ \spac_vspacing_yes[#1]% in the new mechanism no [] needed
\fi}
-\unexpanded\def\flushblankhandling
- {\the\everyafterblankhandling
- \ifconditional\c_space_vspacing_done
- \vskip\s_spac_vspacing_temp
- \fi
- \setfalse\c_space_vspacing_done
- \the\everybeforeblankhandling}
-
-\unexpanded\def\addpredefinedblankskip#1#2%
- {\settrue\c_space_vspacing_done
- \advance\s_spac_vspacing_temp#1\dimexpr\csname\??vspacingamount#2\endcsname\relax}
-
-% \unexpanded\def\addpredefinedblankskip#1#2%
-% {\settrue\c_space_vspacing_done
-% \advance\s_spac_vspacing_temp#1\dimexpr\the\csname\ifgridsnapping g\else n\fi>#2\endcsname\relax}
-
-\unexpanded\def\addaskedblankskip#1#2%
- {\settrue\c_space_vspacing_done
- \advance\s_spac_vspacing_temp#1\dimexpr#2\relax}
-
-% The main spacer:
-
-\unexpanded\def\vspacing
- {\doifelsenextoptionalcs\spac_vspacing_yes\spac_vspacing_nop}
-
\def\spac_vspacing_yes
{\ifinpagebody % somewhat weird
\expandafter\spac_vspacing_yes_indeed
@@ -2095,62 +1983,23 @@
\expandafter\spac_vspacing_nop_ignore
\fi}
-\def\spac_vspacing_yes_indeed[#1]%
- {\ifmmode\else\par\clf_vspacing{#1}\fi}
-
-\def\spac_vspacing_yes_ignore[#1]%
- {\ifmmode\else\par\fi}
-
-\def\spac_vspacing_nop_indeed
- {\ifmmode\else\par\clf_vspacing{\currentvspacing}\fi}
+\def\spac_vspacing_yes_indeed[#1]{\ifmmode\else\par\ifvmode\clf_injectvspacing\ifgridsnapping\plusone\else\zerocount\fi{#1}\fi\fi}
+\def\spac_vspacing_nop_indeed {\ifmmode\else\par\ifvmode\clf_injectvspacing\ifgridsnapping\plusone\else\zerocount\fi{\currentvspacing}\fi\fi}
-\def\spac_vspacing_nop_ignore
- {\ifmmode\else\par\fi}
-
-\installcorenamespace{vspacing}
+\def\spac_vspacing_yes_ignore[#1]{\ifmmode\else\par\fi}
+\def\spac_vspacing_nop_ignore {\ifmmode\else\par\fi}
-\unexpanded\def\directvspacing#1%
- {\par
- \ifchkdim#1\or
- \spac_vspacing_dim_preset{\the\dimexpr#1}%
- \orelse\ifcsname\??vspacing#1\endcsname
- \lastnamedcs
- \else
- \spac_vspacing_yes_preset{#1}%
- \fi}
+\permanent\protected\def\directvspacing#1%
+ {\ifmmode\else\par\ifvmode\clf_injectvspacing\ifgridsnapping\plusone\else\zerocount\fi{\iftok{#1}\emptytoks\currentvspacing\else#1\fi}\fi\fi}
-\def\spac_vspacing_dim_preset#1%
- {\ifcsname\??vspacing#1\endcsname
- \lastnamedcs
- \else
- \spac_vspacing_yes_preset{#1}%
- \fi}
-
-\def\spac_vspacing_yes_preset#1%
- {\setxvalue{\??vspacing#1}{\clf_vspacing{#1}}%
- %\writestatus{}{}%
- %\writestatus{#1}{\expandafter\meaning\csname\??vspacing#1\endcsname}%
- %\writestatus{}{}%
- \csname\??vspacing#1\endcsname}
-
-\def\spac_vspacing_yes_indeed[#1]%
- {\ifmmode\else
- \directvspacing{#1}%
- \fi}
-
-\def\spac_vspacing_nop_indeed
- {\ifmmode\else
- \directvspacing\currentvspacing
- \fi}
-
-\def\directdefaultvspacing
+\permanent\protected\def\directdefaultvspacing
{\ifinpagebody % somewhat weird
\directvspacing\currentvspacing
\orelse\ifconditional\c_spac_packed_blank
\directvspacing\currentvspacing
\fi}
-\def\directcheckedvspacing
+\permanent\protected\def\directcheckedvspacing
{\ifinpagebody % somewhat weird
\expandafter\directvspacing
\orelse\ifconditional\c_spac_packed_blank
@@ -2159,53 +2008,36 @@
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\useblankparameter#1% faster local variant
+\permanent\protected\def\useblankparameter#1% faster local variant
{\edef\m_spac_blank_asked{#1\c!blank}%
- \ifx\m_spac_blank_asked\empty\else
+ \ifempty\m_spac_blank_asked\else
\directvspacing\m_spac_blank_asked
\fi}
%D Handy (and faster):
-\unexpanded\def\directvpenalty#1%
- {\begingroup
- \attribute\skipcategoryattribute \plusthree
- \attribute\skippenaltyattribute #1\relax
- \attribute\skiporderattribute \attributeunsetvalue
- \vskip\zeropoint
- \endgroup}
-
-\unexpanded\def\directvskip#1%
- {\begingroup
- \attribute\skipcategoryattribute \plusone
- \attribute\skippenaltyattribute \attributeunsetvalue
- \attribute\skiporderattribute \attributeunsetvalue
- \vskip#1\relax
- \endgroup}
+\permanent\protected\def\directvpenalty#1{\ifmmode\else\par\ifvmode\clf_injectvpenalty#1\relax\fi\fi}
+\permanent\protected\def\directvskip #1{\ifmmode\else\par\ifvmode\clf_injectvskip #1\relax\fi\fi}
%D These depend on bigskipamount cum suis so we'd better sync them:
-\unexpanded\def\setupvspacing
- {\doifelsenextoptionalcs\setupvspacing_yes\setupvspacing_nop}
+\mutable\let\currentvspacing\s!default % hm, default, standard ...
-\let\currentvspacing\s!default % hm, default, standard ...
-
-\def\setupvspacing_yes[#1]%
- {\edef\currentvspacing{#1}%
- \spac_whitespace_setup_nop % yes or no, was forgotten
- }
+\permanent\tolerant\protected\def\setupvspacing[#1]%
+ {\ifarguments\else
+ \edef\currentvspacing{#1}%
+ \fi
+ \synchronizevspacing}
-\def\setupvspacing_nop
- {\ifx\empty\currentvspacing % mistakenly had an \else
+\permanent\protected\def\synchronizevspacing
+ {\ifempty\currentvspacing % mistakenly had an \else
\let\currentvspacing\s!default
\fi
\spac_whitespace_setup_nop}
-\unexpanded\def\restorestandardblank % or default ?
+\permanent\protected\def\restorestandardblank % or default ?
{\let\currentvspacing\v!standard}
-\let\synchronizevspacing\setupvspacing_nop
-
%D The \type {category:4} is default.
\definevspacingamount[\v!none] [\zeropoint] [\zeropoint]
@@ -2222,7 +2054,7 @@
\definevspacingamount[\v!standard] [.75\openlineheight] [.75\openlineheight] % mkii compatible
-\def\bodyfontwhitespace
+\permanent\def\bodyfontwhitespace
{\dimexpr
\ifzeropt\parskip
\zeropoint
@@ -2286,7 +2118,7 @@
% 2019-05-31 : upgraded a bit to more distinctive samepage-[level]-[0|1|2] names
-\unexpanded\def\spac_vspacing_define_same_step#1#2% alternatively we could have samepage-n-m
+\protected\def\spac_vspacing_define_same_step#1#2% alternatively we could have samepage-n-m
{\begingroup
\scratchcounterone\numexpr\plusthree*#1+#2\relax
\scratchcountertwo\numexpr\c_spac_vspacing_special_base+\c_spac_vspacing_special_step*\scratchcounterone\relax
@@ -2294,7 +2126,7 @@
\normalexpanded{\definevspacing[\v!samepage-\number#1-\number#2][penalty:\the\scratchcountertwo]}%
\endgroup}
-\unexpanded\def\spac_vspacing_define_same_page#1%
+\protected\def\spac_vspacing_define_same_page#1%
{\dostepwiserecurse\c_spac_vspacing_special_done{#1}\plusone
{\spac_vspacing_define_same_step\recurselevel\zerocount % before
\spac_vspacing_define_same_step\recurselevel\plusone % after
@@ -2323,56 +2155,52 @@
% We keep this one as reference
%
-% \unexpanded\def\inhibitblank
+% \protected\def\inhibitblank
% {\vspacing[\v!disable]}
%
% but use the following more efficient variant instead:
-\unexpanded\def\inhibitblank
- {\ifvmode
- \begingroup
- \attribute\skipcategoryattribute\plusfive
- \vskip\zeropoint
- \endgroup
- \fi}
+\permanent\protected\def\inhibitblank{\ifmmode\else\par\ifvmode\clf_injectdisable\fi\fi}
-\let\doinhibitblank\inhibitblank % keep this command, used in styles
+\aliased\let\doinhibitblank\inhibitblank % keep this command for a while, used in styles
-\let\defineblank \definevspacing
-\let\setupblank \setupvspacing
-\let\blank \vspacing
-\let\synchronizeblank \synchronizevspacing
-\let\defineblankmethod\definevspacingamount
+%D We use \type {vspacing} because at some point we had the blank mechanism alongside
+%D a new experimental variant and I aliased it locally till it all worked out well. So,
+%D we're kind of stuck with synonyms now. Some day we will drop the vspacing and use the
+%D old aliases instead.
+
+\aliased\let\defineblank \definevspacing
+\aliased\let\setupblank \setupvspacing
+\aliased\let\blank \vspacing
+\aliased\let\synchronizeblank \synchronizevspacing
+\aliased\let\defineblankmethod\definevspacingamount
%D The following command is for Wolfgang. It has to be used with care as it does
%D {\em not} work in tandem with the other spacing commands.
\installcorenamespace{vspace}
-\unexpanded\def\definevspace
- {\dotripleempty\spac_vspace_define}
-
-\def\spac_vspace_define[#1][#2][#3]%
- {\ifthirdargument
- \setvalue{\??vspace#1:#2}{#3}%
- \else
- \setvalue{\??vspace:#1}{#2}%
+\permanent\tolerant\protected\def\definevspace[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ \or
+ \letcsname\??vspace:#1\endcsname\empty
+ \or
+ \defcsname\??vspace:#1\endcsname{#2}%
+ \or
+ \defcsname\??vspace#1:#2\endcsname{#3}%
\fi}
\letvalue{\??vspace:\s!unknown}\zeropoint
-\unexpanded\def\vspace
- {\dodoubleempty\spac_vspace_inject}
-
\def\spac_vspace_unknown
{\csname\??vspace:\s!unknown\endcsname}
-\def\spac_vspace_inject[#1][#2]% use \lastnamedcs
+\permanent\tolerant\protected\def\vspace[#1]#*[#2]%
{\par
\ifvmode
\removelastskip
\vskip
- \ifsecondargument
+ \ifparameter#2\or
\ifcsname\??vspace#1:#2\endcsname
\lastnamedcs
\orelse\ifcsname\??vspace:#2\endcsname
@@ -2380,7 +2208,7 @@
\else
\spac_vspace_unknown
\fi
- \orelse\iffirstargument
+ \orelse\ifparameter#1\or
\ifcsname\??vspace:#1\endcsname
\lastnamedcs
\else
@@ -2407,26 +2235,25 @@
\c!location=\v!left,
\c!n=\zerocount]
-\unexpanded\def\starthanging
- {\dontleavehmode\bgroup
- \dosingleempty\spac_hanging_start}
-
-\unexpanded\def\stophanging
- {\endgraf
- \egroup}
-
\let\m_spac_hanging_location\empty
-\def\spac_hanging_start[#1]%
- {\doifelseassignment{#1}
- {\let\m_spac_hanging_location\empty
- \setupcurrenthanging[#1]}%
- {\edef\m_spac_hanging_location{#1}}%
- \ifx\m_spac_hanging_location\empty
+\permanent\tolerant\protected\def\starthanging[#1]%
+ {\dontleavehmode\bgroup
+ \ifhastok={#1}%
+ \let\m_spac_hanging_location\empty
+ \setupcurrenthanging[#1]%
+ \else
+ \edef\m_spac_hanging_location{#1}%
+ \fi
+ \ifempty\m_spac_hanging_location
\edef\m_spac_hanging_location{\directhangingparameter\c!location}%
\fi
\dowithnextboxcs\spac_hanging_finish\hbox}
+\permanent\protected\def\stophanging
+ {\endgraf
+ \egroup}
+
\def\spac_hanging_finish
{\scratchdistance\directhangingparameter\c!distance\relax
\ifdim\ht\nextbox>\strutht
@@ -2434,25 +2261,24 @@
\fi
\scratchcounter\directhangingparameter\c!n\relax
\ifnum\scratchcounter>\zerocount
- \hangafter-\scratchcounter
+ \frozen\hangafter-\scratchcounter
\else
\getboxheight\scratchdimen\of\box\nextbox
\getnoflines\scratchdimen
- \hangafter-\noflines
+ \frozen\hangafter-\noflines
\fi
\ht\nextbox\strutht
\dp\nextbox\strutdp
\scratchwidth\dimexpr\wd\nextbox+\scratchdistance\relax
\ifx\m_spac_hanging_location\v!right
- \hangindent\ifconditional\displaylefttoright-\fi\scratchwidth
+ \frozen\hangindent\ifconditional\displaylefttoright-\fi\scratchwidth
\rlap{\hskip\dimexpr\hsize-\leftskip-\wd\nextbox\relax\box\nextbox}% \leftskip is new
\else
- \hangindent\ifconditional\displaylefttoright\else-\fi\scratchwidth
+ \frozen\hangindent\ifconditional\displaylefttoright\else-\fi\scratchwidth
\llap{\box\nextbox\hskip\scratchdistance}%
\fi
\ignorespaces}
-
%D \macros
%D {startfixed}
%D
@@ -2477,45 +2303,44 @@
\installcorenamespace{fixedalternatives}
-\unexpanded\def\startfixed
- {\bgroup
- \dosingleempty\typo_fixed_start}
+\aliased\let\stopfixed\relax
-\def\typo_fixed_start
- {\ifhmode
+\permanent\protected\def\startfixed
+ {\bgroup
+ \ifhmode
\expandafter\typo_fixed_start_h
\else
\expandafter\typo_fixed_start_v
\fi}
-\def\typo_fixed_start_h[#1]%
- {\let\stopfixed\typo_fixed_stop_h
+\tolerant\def\typo_fixed_start_h[#1]%
+ {\enforced\let\stopfixed\typo_fixed_stop_h
\dowithnextbox{\typo_fixed_finish{#1}}%
\vbox\bgroup
%ignorespaces
\setlocalhsize}
-\unexpanded\def\typo_fixed_stop_h
+\protected\def\typo_fixed_stop_h
{%removeunwantedspaces
\egroup
\egroup}
-\def\typo_fixed_start_v[#1]%
- {\let\stopfixed\typo_fixed_stop_v
+\tolerant\def\typo_fixed_start_v[#1]%
+ {\enforced\let\stopfixed\typo_fixed_stop_v
\startbaselinecorrection}
-\unexpanded\def\typo_fixed_stop_v
+\protected\def\typo_fixed_stop_v
{\stopbaselinecorrection
\egroup}
-\letvalue{\??fixedalternatives \v!high}\bbox
-\letvalue{\??fixedalternatives \v!low}\tbox
-\letvalue{\??fixedalternatives \v!middle}\vcenter
-\letvalue{\??fixedalternatives \v!lohi}\vcenter
-\letvalue{\??fixedalternatives\s!unknown}\tbox
-\letvalue{\??fixedalternatives\s!default}\tbox
+\letcsname\??fixedalternatives \v!high\endcsname\bbox
+\letcsname\??fixedalternatives \v!low\endcsname\tbox
+\letcsname\??fixedalternatives \v!middle\endcsname\vcenter
+\letcsname\??fixedalternatives \v!lohi\endcsname\vcenter
+\letcsname\??fixedalternatives\s!unknown\endcsname\tbox
+\letcsname\??fixedalternatives\s!default\endcsname\tbox
-\unexpanded\def\typo_fixed_finish#1%
+\protected\def\typo_fixed_finish#1%
{\expandnamespacevalue\??fixedalternatives{#1}\s!default{\box\nextbox}}
% %D Forgotten already:
@@ -2546,9 +2371,9 @@
%D Helper:
-\unexpanded\def\checkedblank[#1]%
+\permanent\protected\def\checkedblank[#1]%
{\edef\p_blank{#1}%
- \ifx\p_blank\empty
+ \ifempty\p_blank
% ignore
\orelse\ifx\p_blank\v!none
% ignore
@@ -2562,10 +2387,10 @@
\newskip\prerolledblank
-\unexpanded\def\prerollblank[#1]%
+\permanent\protected\def\prerollblank[#1]%
{\begingroup
\edef\p_blank{#1}%
- \ifx\p_blank\empty
+ \ifempty\p_blank
\global\prerolledblank\zeropoint
\orelse\ifx\p_blank\v!none
\global\prerolledblank\zeropoint
@@ -2600,6 +2425,6 @@
% test \par
% test \par
-\unexpanded\def\ignoreparskip{\c_spac_vspacing_ignore_parskip\plusone}
+\permanent\protected\def\ignoreparskip{\c_spac_vspacing_ignore_parskip\plusone}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-bkm.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-bkm.mkxl
new file mode 100644
index 00000000000..c5bd8732421
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-bkm.mkxl
@@ -0,0 +1,182 @@
+%D \module
+%D [ file=strc-bkm,
+%D version=2009.04.01,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Bookmarks,
+%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 Structure Macros / Bookmarks}
+
+\registerctxluafile{strc-bkm}{}
+
+% \enabledirectives[references.bookmarks.preroll]
+
+\unprotect
+
+%D Bookmarks are a very viewer dependent feature. They are mostly used as additional
+%D table of contents and therefore relate directly to lists.
+%D
+%D A bookmark list is added to the document only when interaction is enabled. The
+%D given lists are bookmarked and a second argument specifies the opened bookmark
+%D trees.
+%D
+%D \starttyping
+%D \placebookmarks
+%D [chapter,section,subsection,mylist]
+%D [chapter]
+%D \stoptyping
+%D
+%D You can overloads the last set bookmark in a sectioning command:
+%D
+%D \starttyping
+%D \chapter {the first chapter}
+%D \bookmark {the first bookmark}
+%D \stoptyping
+%D
+%D However, in practice you can better use \type {\startchapter} and set the \type
+%D {bookmark} parameter.
+%D
+%D You can add entries to the bookmarklist:
+%D
+%D \starttyping
+%D \bookmark[mylist]{whatever}
+%D \stoptyping
+%D
+%D Use force to get titles in the bookmarklist. This is somewhat tricky as one does
+%D not want \quotation {Contents} in a table of contents but it has to be in the
+%D bookmark list.
+
+\installcorenamespace{bookmark}
+
+\installsetuponlycommandhandler \??bookmark {bookmark} % installdirectparametersethandler
+
+\setupbookmark
+ [\c!force=\v!no, % it's easier to force that to inhibit
+ \c!number=\v!yes, % might become v!no
+ \c!sectionblock=\v!no] % show sectionblock level + title
+
+\aliased\let\setupbookmarks\setupbookmark
+
+\permanent\protected\def\bookmark
+ {\iflocation
+ \expandafter\strc_bookmarks_bookmark_yes
+ \else
+ \expandafter\strc_bookmarks_bookmark_nop
+ \fi}
+
+\tolerant\def\strc_bookmarks_bookmark_yes[#1]#:#2%
+ {\begingroup
+ \simplifycommands
+ \ifnum\thenamedheadlevel{#1}>\zerocount
+ \clf_overloadbookmark{#1}{\detokenize\expandafter{\normalexpanded{#2}}}%
+ \else
+ \writetolist[#1]{#2}{}% todo: a dedicated bookmark writer
+ \fi
+ \endgroup}
+
+\tolerant\def\strc_bookmarks_bookmark_nop[#1]#:#2%
+ {}
+
+\permanent\protected\def\placebookmarks
+ {\iflocation
+ \expandafter\strc_bookmarks_place_yes
+ \else
+ \expandafter\gobblethreeoptionals
+ \fi}
+
+\let\m_bookmarks_names \empty
+\let\m_bookmarks_opened\empty
+
+\tolerant\def\strc_bookmarks_place_yes[#1]#*[#2]#*[#3]%
+ {\begingroup
+ \edef\m_bookmarks_names{#1}%
+ \edef\m_bookmarks_opened{#2}%
+ \ifempty\m_bookmarks_names
+ \edef\m_bookmarks_names{\namedlistparameter\v!content\c!list}%
+ \fi
+ \ifempty\m_bookmarks_names
+ \let\m_bookmarks_names\v!all
+ \fi
+ \ifparameters\or\or
+ \doifelseassignment{#2}{\let\m_bookmarks_opened\empty\setupcurrentbookmark[#2]}\donothing
+ \or
+ \setupcurrentbookmark[#3]% no every so not all possible
+ \fi
+ \clf_registerbookmark
+ names {\m_bookmarks_names}%
+ opened {\m_bookmarks_opened}%
+ force {\bookmarkparameter\c!force}%
+ number {\bookmarkparameter\c!number}%
+ \relax
+ \endgroup}
+
+\appendtoks
+ \clf_setupbookmarks
+ separatorset {\bookmarkparameter\c!numberseparatorset}%
+ conversionset {\bookmarkparameter\c!numberconversionset}%
+ starter {\bookmarkparameter\c!numberstarter}%
+ stopper {\bookmarkparameter\c!numberstopper}%
+ segments {\bookmarkparameter\c!numbersegments}%
+ showblocktitle {\bookmarkparameter\c!sectionblock}%
+ \relax
+\to \everysetupbookmark
+
+%D There is a plugin mechanism but this is for experts only. The intermediate
+%D data structures are stable.
+%D
+%D \starttyping
+%D \startluacode
+%D structures.bookmarks.installhandler("check before","before",function(levels)
+%D logs.report("extra bookmarks","before (normal bookmarks)")
+%D inspect(levels)
+%D logs.report("extra bookmarks","before (extra bookmarks)")
+%D inspect(structures.bookmarks.extras.get())
+%D return levels
+%D end)
+%D structures.bookmarks.installhandler("check after", "after", function(levels)
+%D logs.report("extra bookmarks","after (merged bookmarks)")
+%D inspect(levels)
+%D return levels
+%D end)
+%D \stopluacode
+%D \starttyping
+%D
+%D This mechanism was added when bookmark inclusion became (optional) part of graphic
+%D inclusion (which is needed by Taco).
+%D
+%D \starttyping
+%D \getfiguredimensions[somefile.pdf]
+%D \dorecurse {\noffigurepages} {
+%D \startTEXpage
+%D \externalfigure[somefile.pdf][interaction=bookmark,page=\recurselevel]
+%D \stopTEXpage
+%D }
+%D \starttyping
+
+\protect \endinput
+
+% \starttext
+% \setupinteraction[state=start]\setupinteractionscreen[option=bookmark]
+% \placebookmarks[chapter,section,subsection][chapter]
+% \chapter{First}
+% \bookmark{The First Indeed}
+% \section{alpha}
+% \bookmark[chapter]{The First Indeed Again}
+% \section{beta}
+% \chapter{Second}
+% \bookmark{The Second Indeed}
+% \section{gamma \tex{radiation}}
+% \subsection{a}
+% \subsection{b}
+% \section{delta}
+% \section{epsilon}
+% \chapter{Third \relax}
+% \chapter{我〈能åžä¸‹çŽ»ç’ƒè€Œä¸å‚·èº«ã€‰é«”。} % whatever that means
+% \chapter{Idris Samawi Hamid ادريس سماوي حامد}
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-blk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-blk.mkxl
new file mode 100644
index 00000000000..4cfbd51eb58
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-blk.mkxl
@@ -0,0 +1,171 @@
+%D \module
+%D [ file=strc-blk,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Blockmoves,
+%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 Structure Macros / Blockmoves}
+
+\registerctxluafile{strc-blk}{}
+
+\unprotect
+
+% we run on top of buffers and sections
+%
+% todo: prefix numbers (needs further integration elsewhere)
+% check functionality
+% alternative files (needs further integration elsewhere)
+%
+% order matters: \c!before (think of: \c!before=\startitemize)
+%
+% no \endgroups
+
+\installcorenamespace {block}
+\installcorenamespace {blocktemp}
+
+\installcommandhandler \??block {block} \??block
+
+\appendtoks
+ \clf_definestructureblock{\currentblock}%
+ \frozen\setuevalue{\e!begin\currentblock}{\strc_blocks_begin{\currentblock}}%
+ \frozen\letvalue {\e!end \currentblock}\donothing
+\to \everydefineblock
+
+% We need to prevent too much lookahead which will gobble newlines that are needed
+% for buffers. See blocks-002.tex as example.
+
+% maybe: systemmode "block:<name>"
+
+\let\m_block \empty
+\let\m_subblock\empty
+
+\protected\def\strc_blocks_begin#1%
+ {\edef\m_block {#1}%
+ \let \m_subblock\empty
+ \doifelsenextoptionalcs\strc_blocks_begin_yes\strc_blocks_begin_nop}
+
+\protected\def\strc_blocks_begin_yes[#1]%
+ {\doifelseassignmentcs{#1}%
+ \strc_blocks_begin_indeed
+ \strc_blocks_begin_tagged
+ {#1}}
+
+\protected\def\strc_blocks_begin_tagged#1%
+ {\edef\m_subblock{#1}%
+ \doifelsenextoptionalcs\strc_blocks_begin_yes_yes\strc_blocks_begin_nop}
+
+\protected\def\strc_blocks_begin_yes_yes[#1]%
+ {\strc_blocks_begin_indeed{#1}}
+
+\protected\def\strc_blocks_begin_nop
+ {\strc_blocks_begin_indeed{}}
+
+\protected\def\strc_blocks_begin_indeed#1%
+ {\normalexpanded{\buff_pickup{\??block}{\e!begin\m_block}{\e!end\m_block}}%
+ {}%
+ {\clf_savestructureblock{\m_block}{\m_subblock}{#1}{\??block}}%
+ \plusone}
+
+\let\strc_blocks_setup\relax
+
+\newconstant \c_strc_blocks_index
+\newconditional\c_strc_blocks_display
+
+\permanent\protected\def\dostarthiddenblock % called at lua end
+ {\begingroup
+ \visiblefalse % blocks float
+ \startnointerference
+ \strc_start_block}
+
+\permanent\protected\def\dostophiddenblock % called at lua end
+ {\strc_stop_block
+ \stopnointerference
+ \endgroup}
+
+\permanent\protected\def\dostartnormalblock % called at lua end
+ {\begingroup
+ \visibletrue
+ \strc_start_block}
+
+\permanent\protected\def\dostopnormalblock % called at lua end
+ {\strc_stop_block
+ \endgroup}
+
+\def\strc_start_block#1#2%
+ {\edef\currentblock{#2}%
+ \c_strc_blocks_index#1\relax
+ \strc_blocks_setup
+ \let\strc_blocks_setup\relax
+ \edef\p_alternative{\blockparameter\c!alternative}%
+ \ifx\p_alternative\v!text
+ \setfalse\c_strc_blocks_display
+ \else
+ \settrue\c_strc_blocks_display
+ \fi
+ \ifconditional\c_strc_blocks_display
+ \blockparameter\c!before
+ \fi
+ \begingroup
+ \usesetupsparameter\blockparameter\relax
+ \dostarttagged\t!block\currentblock
+ \useblockstyleandcolor\c!style\c!color
+ \blockparameter\c!inner % old
+ \ifconditional\c_strc_blocks_display
+ \usealignparameter\blockparameter
+ \else
+ \blockparameter\c!left
+ \fi
+ \ignorespaces}
+
+\def\strc_stop_block
+ {\removeunwantedspaces
+ \ifconditional\c_strc_blocks_display
+ \par
+ \else
+ \blockparameter\c!right
+ \fi
+ \dostoptagged
+ \endgroup
+ \ifconditional\c_strc_blocks_display
+ \blockparameter\c!after
+ \fi}
+
+\tolerant\def\strc_blocks_set_state[#1]#*[#2]#*[#3]% state name tag % todo: we could use the lua one directly
+ {\clf_setstructureblockstate{#1}{#2}{#3}}
+
+\tolerant\def\strc_blocks_select[#1]#*[#2]#*[#3]#*[#4]% state name tag setups
+ {\begingroup
+ \ifhastok={#3}%
+ \getparameters[\??blocktemp][\c!criterium=\v!text,#3]%
+ \def\strc_blocks_setup{\setupcurrentblock[#3]}%
+ \clf_selectstructureblock{#1}{#2}{}{\csname\??blocktemp\c!criterium\endcsname}%
+ \else
+ \getparameters[\??blocktemp][\c!criterium=\v!text,#4]%
+ \def\strc_blocks_setup{\setupcurrentblock[#4]}%
+ \clf_selectstructureblock{#1}{#2}{#3}{\csname\??blocktemp\c!criterium\endcsname}%
+ \fi
+ \endgroup}
+
+\permanent\def\blockuservariable#1%
+ {\clf_structureblockuservariable\c_strc_blocks_index{#1}}
+
+% hide : save, if [+] also hidden execute
+% keep : save and normal execute
+% use : normal execute unless [-]
+% process: hidden execute unless [-]
+% select : idem use
+
+\permanent\protected\def\hideblocks {\strc_blocks_set_state[hide]}
+\permanent\protected\def\keepblocks {\strc_blocks_set_state[keep]}
+\permanent\protected\def\useblocks {\strc_blocks_select [use]}
+\permanent\protected\def\processblocks{\strc_blocks_select [process]}
+\permanent\protected\def\selectblocks {\strc_blocks_select [use]}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-con.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-con.mklx
new file mode 100644
index 00000000000..5e0ceb8338c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-con.mklx
@@ -0,0 +1,1186 @@
+%D \module
+%D [ file=strc-con,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Constructions,
+%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 Structure Macros / Constructions}
+
+\registerctxluafile{strc-con}{}
+
+% todo: check why \copy .. probably mkii leftover
+%
+% todo: check if commands similar to lists
+% todo: \strc_constructions_setup_counter\strc_constructions_setup_counter{#1} in setup ... synchronization
+%
+% ? : \def\showdnlisttext{\constructionparameter\c!listtext} % space in default
+%
+% maybe: pickup text and store in buffer ...
+%
+% \@@notemakeconstruction[##1]{}{##2}%
+% \expandafter\endgroup\noteparameter\c!next}}
+%
+% todo: \currentconstructionattribute : can be a counter instead
+
+%D Constructions are just descriptions but a bit more abstract so that we can
+%D conveniently build upon them. They are not really meant for users but module
+%D writers might find them useful. We mention a couple of parameters but these are
+%D only mentioned because in the shared code we map all resolvers to constructions.
+%D
+%D On top of constructions we build descriptions, enumerations, notes, labels and
+%D maybe some day more.
+
+\unprotect
+
+%D Todo:
+
+\installcorenamespace{construction}
+
+\installcommandhandler \??construction {construction} \??construction
+
+\aliased\let\setupconstructions\setupconstruction
+
+\setupconstructions[%
+ %c!title=,
+ %c!text=,
+ %
+ %c!style=,
+ %c!color=,
+ %c!command=,
+ %c!align=,
+ %
+ %c!headstyle=,
+ %c!headcolor=,
+ %c!headalign=,
+ %
+ %c!titlestyle=,
+ %c!titlecolor=,
+ %c!titlecommand=,
+ %c!titleleft=,
+ %c!titleright=,
+ %
+ %c!closesymbol=,
+ %c!closecommand=,
+ %
+ \c!alternative=\v!left,
+ \c!display=\v!yes,
+ \c!width=7\emwidth,
+ \c!distance=\emwidth,
+ \c!stretch=.50,
+ \c!shrink=.25,
+ \c!titledistance=.5\emwidth,
+ %c!hang=,
+ %c!sample=,
+ \c!margin=\v!no,
+ \c!before=\blank,
+ \c!inbetween=\blank,
+ \c!after=\blank,
+ %c!indentnext=,
+ %c!indenting=,
+ %
+ \c!expansion=\v!no,
+ %c!xmlsetup=,
+ %s!catcodes=,
+]
+
+%D Constructions and alike uses similar structures. In order to prevent issues
+%D we freeze some states. There is some overhead in the intermediate define
+%D step (as we could set them directly) but this is more flexible (and looks
+%D nicer). Keep in mind that descriptions, enumeration and notations are all
+%D independent and that we just remap the resolvers.
+
+% \defineconstruction[test][handler=description,level=1]
+% \defineconstruction[test][parent][handler=description,level=3]
+
+\installcorenamespace{constructionmain} % frozen after definition
+\installcorenamespace{constructionlevel} % frozen after definition
+\installcorenamespace{constructionclass} % frozen after definition
+
+%aliased\let\currentconstructionhash \??construction
+
+\mutable\let\currentconstructionmain \empty
+\mutable\let\currentconstructionlevel \empty
+\mutable\let\currentconstructionhandler \empty
+
+\mutable\let\currentconstructionattribute \empty
+\mutable\let\currentconstructionbookmark \empty
+\mutable\let\currentconstructioncatcodes \empty
+\mutable\let\currentconstructioncoding \empty
+\mutable\let\currentconstructionexpansion \empty
+\mutable\let\currentconstructionincrementnumber\empty
+\mutable\let\currentconstructionlabel \empty
+\mutable\let\currentconstructionlist \empty
+\mutable\let\currentconstructionlistentry \empty
+\mutable\let\currentconstructionlistnumber \empty
+\mutable\let\currentconstructionmarking \empty
+\mutable\let\currentconstructionnumber \empty
+\mutable\let\currentconstructionreference \empty
+\mutable\let\currentconstructionreferencetext \empty
+\mutable\let\currentconstructionreferenceprefix\empty
+\mutable\let\currentconstructionsynchronize \empty
+\mutable\let\currentconstructiontitle \empty
+\mutable\let\currentconstructionxmlsetup \empty
+
+\settrue\c_strc_constructions_define_commands % use with care, might become a proper key
+
+\appendtoks
+ \ifempty\currentconstructionparent
+ \letvalue{\??constructionmain\currentconstruction}\currentconstruction
+ \definelist[\currentconstruction]% goodie
+ \else
+ \letvalue{\??constructionmain\currentconstruction}\currentconstructionparent
+ \definelist[\currentconstruction][\currentconstructionparent]% goodie
+ \fi
+ \setevalue{\??constructionlevel\currentconstruction}{\number\constructionparameter\c!level}%
+ \setevalue{\??constructionclass\currentconstruction}{\constructionparameter\s!handler}%
+\to \everydefineconstruction
+
+% todo: inhibit this when we have a different handle .. current we cannot do \frozen
+
+\appendtoks
+ \ifconditional\c_strc_constructions_define_commands
+ %% \instance\setuevalue{\e!start\currentconstruction}{\strc_constructions_start{\currentconstruction}}%
+ \instance\setuevalue{\e!start\currentconstruction}{\strc_constructions_start[\currentconstruction]}%
+ \instance\setuevalue{\e!stop \currentconstruction}{\strc_constructions_stop}%
+ \fi
+\to \everydefineconstruction
+
+%D Just a basic environment (mostly for testing). We will provide a 'setup' based
+%D plugin once the rest is sorted out.
+
+\tolerant\protected\def\strc_constructions_start[#1]#*[#2]#*[#3]%
+ {\begingroup
+ \strc_constructions_initialize{#1}%
+ \strc_constructions_register[#3][\c!label={\constructionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,\c!referencetext=,#2]%
+ \csname\??constructionstarthandler\currentconstructionhandler\endcsname}
+
+\protected\def\strc_constructions_stop
+ {\csname\??constructionstophandler\currentconstructionhandler\endcsname
+ \endgroup}
+
+%D As we will build on top of the generic construction mechanism we have handlers
+%D as a sort of plug in mechanism. In order to have some consistency we share
+%D some namespaces.
+
+\installcorenamespace{constructioninitializer}
+\installcorenamespace{constructionfinalizer}
+
+\installcorenamespace{constructionmainhandler}
+\installcorenamespace{constructioncommandhandler}
+\installcorenamespace{constructionstarthandler}
+\installcorenamespace{constructionstophandler}
+
+\installcorenamespace{constructiontexthandler}
+\installcorenamespace{constructionnotehandler}
+
+\protected\def\strc_constructions_initialize#1% class instance
+ {\edef\currentconstruction{#1}%
+ \enforced\let\currentconstructionhash\??construction
+ \let\currentconstructionlistentry\!!zerocount
+ \enforced\expandafter\let\expandafter\currentconstructionmain \csname\??constructionmain \currentconstruction\endcsname
+ \enforced\expandafter\let\expandafter\currentconstructionlevel \csname\??constructionlevel\currentconstruction\endcsname
+ \enforced\expandafter\let\expandafter\currentconstructionhandler\csname\??constructionclass\currentconstruction\endcsname
+ \csname\??constructioninitializer\currentconstructionhandler\endcsname}
+
+\protected\def\strc_constructions_finalize
+ {\csname\??constructionfinalizer\currentconstructionhandler\endcsname
+ \strc_constructions_discard}
+
+\newconditional\c_strc_constructions_number_state
+\newconditional\c_strc_constructions_title_state
+
+\protected\setvalue{\??constructioninitializer\v!construction}%
+ {\setfalse\c_strc_constructions_number_state
+ \setfalse\c_strc_constructions_title_state}
+
+\protected\setvalue{\??constructionfinalizer\v!construction}%
+ {}
+
+%D We keep the command variant around but rather would move to the start-stop one.
+%D Also, passing the title as argument has some history so we need to keep that as
+%D well.
+
+% \ifdefined\dotagsetconstruction \else \aliased\let\dotagsetconstruction\relax \fi
+
+% \startuseMPgraphic{MyFrame}
+% picture p ; numeric o ; path a, b ; pair c ;
+% p := textext.rt("\FunnyFramed{\currentconstructiontext}") ;
+% % p := textext.rt("\wrappedconstruction{\FunnyFramed{\currentconstructiontext}}") ;
+% % p := textext.rt("\FunnyFramed{\wrappedconstruction{\currentconstructiontext}}") ;
+% % p := textext.rt("\FunnyFramed{\wrappedcurrentconstruction}") ;
+% ...
+% \stopuseMPgraphic
+%
+% \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
+%
+% \defineframedtext
+% [MyText]
+% [frame=off,
+% background=MyFrame]
+%
+% \defineenumeration[Theorem]
+% [alternative=empty,
+% before=\startMyText,
+% after=\stopMyText]
+
+\newtoks\everyconstruction
+
+\permanent\protected\def\currentconstructiontext
+ {\begstrut
+ \csname\??constructiontexthandler\currentconstructionhandler\endcsname
+ \endstrut}
+
+\permanent\protected\def\currentconstructionsample
+ {\begstrut
+ \constructionparameter\c!text
+ \p_strc_constructions_sample
+ \endstrut}
+
+\permanent\protected\def\wrappedconstruction#1%
+ {\begingroup
+ \iftrialtypesetting \else
+ \currentconstructionsynchronize
+ \c_attr_destination\currentconstructionattribute\relax
+ \fi
+ #1%
+ \endgroup}
+
+\permanent\protected\def\wrappedcurrentconstruction
+ {\begingroup
+ \iftrialtypesetting \else
+ \currentconstructionsynchronize
+ \c_attr_destination\currentconstructionattribute\relax
+ \fi
+ \currentconstructiontext
+ \endgroup}
+
+\protected\setvalue{\??constructionmainhandler\v!construction}#1%
+ {\iftrialtypesetting \else
+ \begingroup
+ \currentconstructionsynchronize % reinstated
+ \c_attr_destination\currentconstructionattribute\relax % todo, whole text
+ \signalcharacter
+ \endgroup
+ \fi#1}
+
+\protected\setvalue{\??constructiontexthandler\v!construction}%
+ {\begingroup
+ \useconstructionstyleandcolor\c!headstyle\c!headcolor % move to \currentconstructiontext
+ \the\everyconstruction
+ \constructionparameter\c!headcommand
+ {\strut
+ \constructionparameter\c!text
+ \clf_savedlisttitle{\currentconstructionmain}\currentconstructionlistentry\relax}%
+ \endgroup}
+
+\protected\def\strc_constructions_stored_start
+ {\begingroup % brrr \endgroup elsewhere ... will be sorted out
+ \csname\??constructionstarthandler\currentconstructionhandler\endcsname}
+
+\protected\def\strc_constructions_stored_stop
+ {\csname\??constructionstophandler\currentconstructionhandler\endcsname}
+
+\newconstant\c_strc_constructions_nested_state % to be redone
+
+% not used any more
+%
+% \def\resetconstructions % to be used in e.g. footnotes
+% {\c_strc_constructions_nested_state\zerocount}
+
+\protected\setvalue{\??constructioncommandhandler\v!construction}%
+ {\endgroup}
+
+\let\p_strc_constructions_sample \empty
+\let\p_strc_constructions_align \empty
+\let\p_strc_constructions_indenting \empty
+\let\p_strc_constructions_width \empty
+\let\p_strc_constructions_aligntitle \empty
+\let\p_strc_constructions_renderingsetup\empty
+\let\p_strc_constructions_headalign \empty
+\let\p_strc_constructions_hang \empty
+\let\p_strc_constructions_inbetween \empty
+\let\p_strc_constructions_closesymbol \empty
+\let\p_strc_constructions_distance \empty
+
+\newconditional\c_strc_constructions_distance_none
+
+\def\strc_constructions_set_width_and_distance
+ {\assignwidth
+ \p_strc_constructions_width
+ \constructionsheadwidth
+ {\unhcopy\constructionheadbox}
+ \constructionsheaddistance}
+
+\def\strc_constructions_preroll_head#content%
+ {\setbox\constructionheadbox\hbox
+ {\forgetall
+ \dontcomplain
+ \settrialtypesetting
+ \csname\??constructionmainhandler\currentconstructionhandler\endcsname#content}}
+
+\def\strc_constructions_ignore_head
+ {\constructionsheaddistance\zeropoint
+ \constructionsheadwidth \zeropoint
+ % we also need to make sure that no stretch creeps in (new per 2015-02-02, for Alan)
+ \settrue\c_strc_constructions_distance_none}
+
+\protected\setvalue{\??constructionstarthandler\v!construction}% this will be redone (reorganized) .. too much boxing
+ {\dostarttaggedchained\t!construction\currentconstruction\currentconstructionhash
+% \dotagsetconstruction
+ \constructionparameter\c!before
+ \begingroup
+ \edef\currentconstructionalternative{\constructionparameter\c!alternative}%
+ \edef\p_strc_constructions_renderingsetup{\constructionalternativeparameter\c!renderingsetup}%
+ % catch fuzzyness
+ \ifempty\p_strc_constructions_renderingsetup
+ \letconstructionparameter\c!alternative\v!left
+ \let\currentconstructionalternative\v!left
+ \edef\p_strc_constructions_renderingsetup{\constructionalternativeparameter\c!renderingsetup}%
+ \else
+ \doifnotsetups\p_strc_constructions_renderingsetup
+ {\letconstructionparameter\c!alternative\v!left
+ \let\currentconstructionalternative\v!left
+ \edef\p_strc_constructions_renderingsetup{\constructionalternativeparameter\c!renderingsetup}}%
+ \fi
+ %
+ \doadaptleftskip{\constructionparameter\c!margin}%
+ \setlocalhsize % so we can use \localhsize in width assignments
+ \edef\p_strc_constructions_distance{\constructionalternativeparameter\c!distance}%
+ \edef\p_strc_constructions_width{\constructionalternativeparameter\c!width}%
+ \ifx\p_strc_constructions_distance\v!none
+ \settrue\c_strc_constructions_distance_none
+ \constructionsheaddistance\zeropoint
+ \else
+ \setfalse\c_strc_constructions_distance_none
+ \constructionsheaddistance\p_strc_constructions_distance\relax
+ \ifdim\constructionsheaddistance=\zeropoint
+ \ifx\p_strc_constructions_width\v!broad
+ \constructionsheaddistance\emwidth
+ \orelse\ifx\p_strc_constructions_width\v!line
+ \constructionsheaddistance\emwidth
+ \fi
+ \fi
+ \fi
+ % inefficient and not always needed, for instance not with margins so we will make checkers
+ % per alternative some day (especially in labels this is unwanted overhead)
+ %
+ % maybe we should have an option as i cannot oversee the consequences now
+ %
+ % \edef\p_strc_constructions_sample{\constructionparameter\c!sample}%
+ % \ifempty\p_strc_constructions_sample
+ % \strc_constructions_preroll_head\currentconstructiontext
+ % \else
+ % \strc_constructions_preroll_head\currentconstructiontextsample
+ % \fi
+ % \strc_constructions_set_width_and_distance
+ %
+ \strc_constructions_preroll_head\currentconstructiontext
+ \ifzeropt\wd\constructionheadbox
+ \strc_constructions_ignore_head
+ \else
+ \edef\p_strc_constructions_sample{\constructionparameter\c!sample}%
+ \ifempty\p_strc_constructions_sample
+ \strc_constructions_set_width_and_distance
+ \else
+ \strc_constructions_preroll_head\currentconstructionsample
+ \ifzeropt\wd\constructionheadbox
+ \strc_constructions_ignore_head
+ \else
+ \strc_constructions_set_width_and_distance
+ \fi
+ \fi
+ \fi
+ %
+ \dostarttagged\t!constructiontag\empty % todo
+ \setbox\constructionheadbox\hbox
+ {\forgetall
+ \dontcomplain
+ \ifx\currentconstructionalternative\v!serried % brrr, hack, will change
+ \csname\??constructionmainhandler\currentconstructionhandler\endcsname\currentconstructiontext
+ \else
+ \csname\??constructionmainhandler\currentconstructionhandler\endcsname{\boxedconstructionhead\currentconstructiontext}%
+ \fi}%
+ \edef\p_strc_constructions_aligntitle{\constructionparameter\c!aligntitle}%
+ \ifx\p_strc_constructions_aligntitle\v!no
+ \leftconstructionskip \leftskip
+ \rightconstructionskip\rightskip
+ \else
+ \ifcase\c_strc_constructions_nested_state
+ \leftconstructionskip \leftskip
+ \rightconstructionskip\rightskip
+ \fi
+ \fi
+ \edef\p_strc_constructions_align{\constructionparameter\c!align}%
+ \ifempty\p_strc_constructions_align \else
+ \setupalign[\p_strc_constructions_align]% \use...
+ \fi
+ \ifcase\c_strc_constructions_nested_state
+ \c_strc_constructions_nested_state\plusone
+ \or
+ \c_strc_constructions_nested_state\plustwo
+ \fi
+ \strc_constructions_close_symbol_reset
+ %
+ \edef\p_strc_constructions_headalign{\constructionparameter\c!headalign}%
+ %
+ \directsetup\p_strc_constructions_renderingsetup\relax
+ % moved to here 2014-07-03
+ \edef\p_strc_constructions_indenting{\constructionparameter\c!indenting}%
+ \ifempty\p_strc_constructions_indenting \else
+ \indenting[\p_strc_constructions_indenting]% \use...
+ \fi
+ %
+ \dostoptagged % tag
+ \dostarttagged\t!constructioncontent\empty
+ %\freezeparagraphproperties
+ \updateparagraphshapes
+ \ignorespaces} % args not needed
+
+\protected\setvalue{\??constructionstophandler\v!construction}%
+ {\strc_constructions_close_symbol_place
+ \doifnot{\constructionparameter\c!display}\v!no\par
+ \dostoptagged % content
+ \dostoptagged % construction
+ \endgroup
+ \constructionparameter\c!after
+ \useindentnextparameter\constructionparameter
+ \strc_constructions_finalize
+% \endgroup
+ \dorechecknextindentation}
+
+\permanent\protected\def\boxedconstructionhead#1%
+ {\doifelse{\constructionalternativeparameter\c!alignbottom}{\v!yes}\vbox\vtop
+ {\hsize\constructionsheadwidth
+ \edef\p_strc_constructions_headalign{\constructionparameter\c!headalign}%
+ \ifempty\p_strc_constructions_headalign \else
+ \setupalign[\p_strc_constructions_headalign]% \use...
+ \fi
+ #1}}
+
+\installcorenamespace{constructionalternative}
+\installcorenamespace{constructionrenderings}
+
+% see lists: alternativemethods ... todo
+%
+% there will be a proper interface to variables
+
+\installcommandhandler \??constructionalternative {constructionalternative} \??constructionalternative
+
+\setupconstructionalternative
+ [%c!left=, % no inheritance
+ %c!right=,% no inheritance
+ \c!width=\constructionparameter\c!width,
+ \c!distance=\constructionparameter\c!distance,
+ \c!stretch=\constructionparameter\c!stretch,
+ \c!shrink=\constructionparameter\c!shrink]
+
+\defineconstructionalternative
+ [\v!left]
+ [%\c!width=7em,
+ %\c!distance=1em,
+ \c!renderingsetup=\??constructionrenderings:\v!left]
+
+\defineconstructionalternative
+ [\v!right]
+ [%\c!width=7em,
+ %\c!distance=1em,
+ \c!renderingsetup=\??constructionrenderings:\v!right]
+
+\defineconstructionalternative
+ [\v!inmargin]
+ [\c!renderingsetup=\??constructionrenderings:\v!inmargin]
+
+\defineconstructionalternative
+ [\v!inleft]
+ [\c!renderingsetup=\??constructionrenderings:\v!inleft]
+
+\defineconstructionalternative
+ [\v!inright]
+ [\c!renderingsetup=\??constructionrenderings:\v!inright]
+
+\defineconstructionalternative
+ [\v!margin]
+ [\c!renderingsetup=\??constructionrenderings:\v!margin]
+
+\defineconstructionalternative
+ [\v!leftmargin]
+ [\c!renderingsetup=\??constructionrenderings:\v!leftmargin]
+
+\defineconstructionalternative
+ [\v!rightmargin]
+ [\c!renderingsetup=\??constructionrenderings:\v!rightmargin]
+
+\defineconstructionalternative
+ [\v!innermargin]
+ [\c!renderingsetup=\??constructionrenderings:\v!innermargin]
+
+\defineconstructionalternative
+ [\v!outermargin]
+ [\c!renderingsetup=\??constructionrenderings:\v!outermargin]
+
+\defineconstructionalternative
+ [\v!serried]
+ [\c!renderingsetup=\??constructionrenderings:\v!serried]
+
+\defineconstructionalternative
+ [\v!hanging]
+ [%\c!width=.75\emwidth
+ \c!renderingsetup=\??constructionrenderings:\v!hanging]
+
+\defineconstructionalternative
+ [\v!top]
+ [\c!renderingsetup=\??constructionrenderings:\v!top,
+ \c!width=\localhsize]
+
+\defineconstructionalternative
+ [\v!command]
+ [\c!renderingsetup=\??constructionrenderings:\v!command]
+
+\defineconstructionalternative
+ [\v!empty]
+ [\c!renderingsetup=\??constructionrenderings:\v!empty]
+
+\defineconstructionalternative
+ [\v!label]
+ [\c!renderingsetup=\??constructionrenderings:\v!label,
+ \c!width=]
+
+\newbox \constructionheadbox
+\newskip \leftconstructionskip
+\newskip \rightconstructionskip
+\newdimen \constructionsheadwidth
+\newdimen \constructionsheaddistance
+
+\def\strc_constructions_set_hang_box#1% messy left/rightskip
+ {\setbox\constructionheadbox\vtop % \vbox gaat fout in hang
+ {\forgetall
+ \dontcomplain
+ \hsize\constructionsheadwidth\relax
+ \ifempty\p_strc_constructions_headalign
+ \setupalign[#1]% use fast one
+ \else
+ \setupalign[\p_strc_constructions_headalign]% use fast one
+ \fi
+ \ifconditional\c_strc_constructions_distance_none \else
+ \advance\ifx#1\v!flushleft\rightskip\else\leftskip\fi\constructionsheaddistance % only difference and wrong anyway
+ \fi
+ \flushconstructionheadbox}%
+ \setbox\constructionheadbox\hpack{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
+ \ht\constructionheadbox\strutht
+ \dp\constructionheadbox\strutdp}
+
+\def\strc_constructions_set_pure_box#1% default ... better set up differently
+ {\setbox\constructionheadbox\vtop
+ {\forgetall
+ \dontcomplain
+ \hsize\constructionsheadwidth\relax
+ \ifempty\p_strc_constructions_headalign
+ \setupalign[#1]% use fast one
+ \else
+ \setupalign[\p_strc_constructions_headalign]% use fast one
+ \fi
+ \flushconstructionheadbox}%
+ \setbox\constructionheadbox\hpack{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
+ \ht\constructionheadbox\strutht
+ \dp\constructionheadbox\strutdp}
+
+\def\strc_constructions_set_hang#1%
+ {\ifempty\p_strc_constructions_hang
+ % nothing
+ \orelse\ifx\p_strc_constructions_hang\v!fit
+ \scratchdimen\htdp\constructionheadbox
+ \getnoflines\scratchdimen
+ \hangafter-\noflines
+ \orelse\ifx\p_strc_constructions_hang\v!broad
+ \scratchdimen\dimexpr\htdp\constructionheadbox+.5\strutht\relax
+ \getnoflines\scratchdimen
+ \hangafter-\noflines
+ \else
+ \hangafter-\p_strc_constructions_hang
+ \fi
+ \relax
+ \hangindent\ifx#1\v!right-\fi\constructionsheadwidth}
+
+\permanent\protected\def\flushconstructionheadbox
+ {\ifhbox\constructionheadbox\unhbox\else\box\fi\constructionheadbox}
+
+% The setups. These only deal with placement of the descriptor and initializing the
+% environment. The wrapping happens elsewhere.
+
+% todo: optimize the setups with
+%
+% \ifconditional\c_strc_constructions_distance_none : no need for skip
+% \ifzeropt\wd\constructionheadbox : no need for box and skips
+
+\startsetups[\??constructionrenderings:\v!left]
+ \edef\p_strc_constructions_hang{\constructionparameter\c!hang}%
+ \doifelsesetups{\??constructionrenderings:\v!left:\p_strc_constructions_hang} {
+ \directsetup{\??constructionrenderings:\v!left:\p_strc_constructions_hang}
+ } {
+ \directsetup{\??constructionrenderings:\v!left:\v!hanging}
+ }
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!right]
+ \edef\p_strc_constructions_hang{\constructionparameter\c!hang}
+ \doifelsesetups{\??constructionrenderings:\v!right:\p_strc_constructions_hang} {
+ \directsetup{\??constructionrenderings:\v!right:\p_strc_constructions_hang}
+ } {
+ \directsetup{\??constructionrenderings:\v!right:\v!hanging}
+ }
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!left:\v!none]
+ \enforced\let\\\crlf
+ \noindent
+ \strc_constructions_set_pure_box\v!flushleft
+ \leftskip\dimexpr\leftconstructionskip+\constructionsheadwidth+\constructionsheaddistance\relax
+ \rightskip\rightconstructionskip\relax
+ \llap {
+ \hpack to \leftskip {
+ \hskip\leftconstructionskip
+ \box\constructionheadbox % was copy
+ \hss
+ }
+ }
+ \nobreak
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!left:0]
+ \directsetup{\??constructionrenderings:\v!left:\v!none}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!left:]
+ \directsetup{\??constructionrenderings:\v!left:\v!none}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!right:\v!none]
+ \enforced\let\\\crlf
+ \noindent
+ \leftskip\leftconstructionskip
+ \rightskip\dimexpr\rightconstructionskip+\constructionsheadwidth\relax
+ %\strc_constructions_pure_hang_box\raggedleft
+ \strc_constructions_set_pure_box\v!flushright
+ \rlap {
+ \hskip\dimexpr\hsize-\leftskip-\rightskip\relax
+ \copy\constructionheadbox
+ \hskip\rightconstructionskip
+ }
+ \nobreak
+ \advance\rightskip \constructionsheaddistance
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!right:0]
+ \directsetup{\??constructionrenderings:\v!right:\v!none}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!right:]
+ \directsetup{\??constructionrenderings:\v!right:\v!none}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!left:\v!margin]%
+ \enforced\let\\\crlf
+ \noindent
+ \strc_constructions_set_pure_box\v!flushleft
+ \llap {
+ \hpack to \constructionsheadwidth {
+ \box\constructionheadbox % was copy
+ \hss
+ }
+ \hskip\constructionsheaddistance
+ }
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!right:\v!margin]%
+ \enforced\let\\\crlf
+ \noindent
+ \strc_constructions_set_pure_box\v!flushright
+ \rlap {
+ \hskip\constructionsheaddistance
+ \hpack to \constructionsheadwidth {
+ \box\constructionheadbox % was copy
+ \hss
+ }
+ }
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!left:\v!hanging]%
+ \enforced\let\\\crlf
+ \dontcomplain
+ \advance\constructionsheadwidth \constructionsheaddistance
+ \strc_constructions_set_hang_box\v!flushleft
+ \strc_constructions_set_hang\v!left
+ \noindent
+ \llap {
+ \tpack to \zeropoint {
+ \box\constructionheadbox
+ }
+ }
+ \nobreak
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!right:\v!hanging]%
+ \enforced\let\\\crlf
+ \dontcomplain
+ \advance\constructionsheadwidth \constructionsheaddistance
+ \strc_constructions_set_hang_box\v!flushright
+ \strc_constructions_set_hang\v!right
+ \noindent
+ \rlap {
+ \hpack to \dimexpr\hsize-\leftskip-\rightskip\relax {
+ \hss
+ \tpack to \zeropoint {
+ \box\constructionheadbox
+ }
+ }
+ }
+ \nobreak
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!top]
+ % \strc_sectioning_prevent_page_break % commented per 31/5/2019
+ \enforced\let\\\space
+ \noindent
+ \copy\constructionheadbox % why copy ?
+ \par
+ \nobreak
+ \edef\p_strc_constructions_inbetween{\constructionparameter\c!inbetween}%
+ \ifempty\p_strc_constructions_inbetween \else
+ \p_strc_constructions_inbetween
+ % shouldn't this move to after the fi?
+ \directcheckedvspacing\v!samepage
+ \fi
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+% why copy? historic reason?
+
+\startsetups[\??constructionrenderings:\v!margin]
+ \enforced\let\\\crlf
+ \noindent
+ \inmargin[\c!scope=\v!local]{\flushconstructionheadbox}%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!leftmargin]
+ \enforced\let\\\crlf
+ \noindent
+ \inleft[\c!scope=\v!local]{\flushconstructionheadbox}%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!rightmargin]
+ \enforced\let\\\crlf
+ \noindent
+ \inright[\c!scope=\v!local]{\flushconstructionheadbox}%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!innermargin]
+ \enforced\let\\\crlf
+ \noindent
+ \ininner[\c!scope=\v!local]{\flushconstructionheadbox}%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!outermargin]
+ \enforced\let\\\crlf
+ \noindent
+ \inouter[\c!scope=\v!local]{\flushconstructionheadbox}%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!inmargin]
+ \directsetup{\??constructionrenderings:\v!margin}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!inleft]
+ \directsetup{\??constructionrenderings:\v!leftmargin}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!inright]
+ \directsetup{\??constructionrenderings:\v!rightmargin}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!serried]
+ % already set?
+ \edef\p_strc_constructions_width{\constructionparameter\c!width}% CHECK ! ! ! wrong parameter namespace
+ \doifelsesetups{\??constructionrenderings:\v!serried:\p_strc_constructions_width} {
+ \directsetup{\??constructionrenderings:\v!serried:\p_strc_constructions_width}
+ } {
+ \directsetup{\??constructionrenderings:\v!serried:\v!wide}
+ }
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!serried:\v!fit]
+ \enforced\let\\\crlf
+ \noindent
+ \flushconstructionheadbox
+ \nobreak
+ \hskip\constructionsheaddistance\relax
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!serried:\v!broad]
+ \enforced\let\\\crlf
+ \noindent
+ \flushconstructionheadbox
+ \ifconditional\c_strc_constructions_distance_none \else
+ \nobreak
+ \hskip\constructionsheaddistance
+ \s!plus \constructionalternativeparameter\c!stretch\constructionsheaddistance
+ \s!minus\constructionalternativeparameter\c!shrink \constructionsheaddistance
+ \relax
+ \fi
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!serried:]
+ \directsetup{\??constructionrenderings:\v!serried:\v!broad}
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!serried:\v!wide]
+ \enforced\let\\\crlf
+ \noindent
+ \hbox to \constructionsheadwidth {
+ \flushconstructionheadbox
+ \hss
+ }
+ \nobreak
+ \hskip\constructionsheaddistance\relax
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!hanging]
+ % tricky: leftskipadaption is somewhat unpredictable
+ \enforced\let\\\crlf
+ \noindent
+ \advance\leftskip-\leftskipadaption\relax
+ \ifdim\leftskipadaption=\zeropoint
+ \leftskipadaption1.5\emwidth\relax % just some default
+ \ifnum\c_strc_constructions_nested_state=\plusone
+ \ifdim\leftskip>\zeropoint \relax
+ \leftskipadaption\leftskip
+ \fi
+ \fi
+ \fi
+ \ifnum\c_strc_constructions_nested_state>\zerocount % was \ifnum\c_strc_constructions_nested_state=\plusone
+ \advance\leftskip\leftskipadaption % but we're already further on
+ \fi
+ \hskip-\leftskipadaption\relax
+ \ifhbox\constructionheadbox \unhbox\else\box\fi\constructionheadbox
+ \ifconditional\c_strc_constructions_distance_none \else
+ % we used to have just a kern, but long lines look bad then
+ \scratchdistance\ifdim\constructionsheaddistance=\zeropoint .75\emwidth\else\constructionsheaddistance\fi
+ \hskip \scratchdistance
+ \s!plus \constructionalternativeparameter\c!stretch\scratchdistance
+ \s!minus\constructionalternativeparameter\c!shrink \scratchdistance
+ \fi
+ \ifhmode
+ \ifx\p_strc_constructions_width\v!line
+ \hfill\break
+ \else
+ \allowbreak
+ \fi
+ \fi
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+%D \starttyping
+%D \setupfootnotation[location=command,headcommand=\llap]
+%D \stoptyping
+
+\startsetups[\??constructionrenderings:\v!command]
+ \noindent
+ \constructionparameter\c!headcommand{\flushconstructionheadbox}
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!empty]
+ \noindent
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+\startsetups[\??constructionrenderings:\v!label]
+ \dontleavehmode
+ \begingroup
+ \constructionparameter\c!headcommand{\flushconstructionheadbox}
+ \endgroup
+\stopsetups
+
+\ifcase\contextlmtxmode \else
+ % just an empty check so that we can grep for contextlmtxmode in mkiv files
+\fi
+
+% \definedescription[whatever][alternative=right:bottom]
+%
+% \startwhatever{just a small\\example}
+% \input ward
+% \stopwhatever
+
+\defineconstructionalternative
+ [\v!right:\v!bottom]
+ [%\c!width=7em,
+ %\c!distance=1em,
+ \c!alignbottom=\v!yes,
+ \c!renderingsetup=\??constructionrenderings:\v!right:\v!bottom]
+
+\startsetups[\??constructionrenderings:\v!right:\v!bottom]
+ \enforced\let\\\crlf
+ \noindent
+ \leftskip\leftconstructionskip
+ \rightskip\dimexpr\rightconstructionskip+\constructionsheadwidth+\constructionsheaddistance\relax
+ \parfillskip\zeropoint
+ \strc_constructions_set_pure_box\v!flushright
+ \directparwrapper \relax {%
+ \hfilll
+ \rlap
+ {\kern\constructionsheaddistance
+ \copy\constructionheadbox}%
+ }%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+%D This next feature will get an lmtx implementation (probably by using a new generic
+%D close mechanism).
+
+% you can use \placeclosesymbol or \qed to place a symbol at the end of a
+% construction
+
+\installcorenamespace{constructionclosesymbol}
+
+\mutable\let\placeclosesymbol\donothing
+\mutable\let\qed \donothing
+
+\def\strc_constructions_close_symbol_reset % no need for global
+ {\global\expandafter\settrue\csname\??constructionclosesymbol\currentconstruction\endcsname
+ \let\placeclosesymbol\strc_constructions_close_symbol_place
+ \let\qed \strc_constructions_close_symbol_place}
+
+\protected\def\strc_constructions_close_symbol_place
+ {\ifconditional\csname\??constructionclosesymbol\currentconstruction\endcsname
+ \global\expandafter\setfalse\csname\??constructionclosesymbol\currentconstruction\endcsname
+ \edef\p_strc_constructions_closesymbol{\constructionparameter\c!closesymbol}%
+ \ifempty\p_strc_constructions_closesymbol \else
+ \constructionparameter\c!closecommand{\p_strc_constructions_closesymbol}% hm why {} maybe because box expected
+ \fi
+ \fi}
+
+\newif\ifnoconstructioncaption
+
+%D The storage macros:
+
+\mutable\let\currentconstructionlistentry\!!zerocount
+
+\protected\def\strc_constructions_register
+ {\clf_doifelselisthasentry\numexpr\currentconstructionlistentry\relax
+ \strc_constructions_register_nop
+ \strc_constructions_register_yes}
+
+% \def\strc_constructions_register{\strc_constructions_register_yes}
+
+\def\strc_constructions_register_nop[#1][#2]% #1=optional user data #2=interfaced-settings
+ %{\writestatus{constructions}{reusing \currentconstruction: \number\currentconstructionlistentry}}
+ {}
+
+\def\strc_constructions_discard
+ {\iftrialtypesetting
+ % \writestatus{constructions}{discarding \currentconstruction: \number\currentconstructionlistentry}%
+ \clf_discardfromlist\currentconstructionlistentry\relax
+ \fi}
+
+\let\currentconstructionlistnumber \!!zerocount
+\let\currentconstructionsynchronize\relax
+\let\currentconstructionattribute \attributeunsetvalue
+
+\def\strc_constructions_register_yes[#1][#2]% #1=optional user data #2=interfaced-settings
+ {\begingroup % similar to structure so we might generalize this
+ \setupcurrentconstruction[#2]% % xdef's will become edef's
+ \xdef\currentconstructionexpansion {\constructionparameter\c!expansion}%
+ \xdef\currentconstructionxmlsetup {\constructionparameter\c!xmlsetup}%
+ \xdef\currentconstructioncatcodes {\constructionparameter\s!catcodes}%
+ \xdef\currentconstructionlabel {\constructionparameter\c!label}%
+ \xdef\currentconstructionreference {\constructionparameter\c!reference}%
+ \xdef\currentconstructionreferencetext {\constructionparameter\c!referencetext}%
+ \xdef\currentconstructionreferenceprefix{\constructionparameter\c!referenceprefix}%
+ %xdef\currentconstructionshownumber {\constructionparameter\c!number}%
+ \xdef\currentconstructionincrementnumber{\constructionparameter\c!incrementnumber}%
+ %
+ \ifempty\currentconstructionexpansion
+ \glet\currentconstructionexpansion\v!no
+ \fi
+ %
+ \ifempty\currentconstructionreferenceprefix
+ \glet\currentconstructionreferenceprefix\referenceprefix
+ \fi
+ \ifx\currentconstructionexpansion\s!xml
+ \xmlstartraw
+ \xdef\currentconstructiontitle {\constructionparameter\c!title}%
+ \xdef\currentconstructionbookmark {\constructionparameter\c!bookmark}%
+ \xdef\currentconstructionmarking {\constructionparameter\c!marking}%
+ \xdef\currentconstructionlist {\constructionparameter\c!list}%
+ \xdef\currentconstructionreferencetext{\constructionparameter\c!referencetext}%
+ \xmlstopraw
+ \ifempty\currentconstructionlist
+ \glet\currentconstructionlist\currentconstructiontitle
+ \fi
+ \glet\currentconstructioncoding\s!xml
+ \else
+ \ifx\currentconstructionexpansion\v!yes
+ \xdef\currentconstructiontitle {\constructionparameter\c!title}%
+ \xdef\currentconstructionbookmark {\constructionparameter\c!bookmark}%
+ \xdef\currentconstructionmarking {\constructionparameter\c!marking}%
+ \xdef\currentconstructionlist {\constructionparameter\c!list}%
+ \xdef\currentconstructionreferencetext{\constructionparameter\c!referencetext}%
+ \else
+ \xdef\currentconstructiontitle {\detokenizedconstructionparameter\c!title}%
+ \xdef\currentconstructionbookmark {\detokenizedconstructionparameter\c!bookmark}%
+ \xdef\currentconstructionmarking {\detokenizedconstructionparameter\c!marking}%
+ \xdef\currentconstructionlist {\detokenizedconstructionparameter\c!list}%
+ \xdef\currentconstructionreferencetext{\detokenizedconstructionparameter\c!referencetext}%
+ \iflocation \ifempty\currentconstructionbookmark
+ \begingroup
+ \simplifycommands
+ \xdef\currentconstructionbookmark{\detokenize\expandafter{\normalexpanded{\constructionparameter\c!title}}}%
+ \endgroup
+ \fi \fi
+ \fi
+ \ifempty\currentconstructionlist
+ \glet\currentconstructionlist\currentconstructiontitle
+ \fi
+ \glet\currentconstructioncoding\s!tex
+ \fi
+ %
+ \ifx\currentconstructiontitle\v!none % will become obsolete
+ \global\noconstructioncaptiontrue
+ \fi
+ %
+ \ifnoconstructioncaption % then why analyze anyway?
+ \endgroup
+ \let\currentconstructionlistnumber \relax
+ \let\currentconstructionsynchronize\relax
+ \let\currentconstructionattribute \relax
+ \else
+ \setnextinternalreferences{construction}\currentconstructionmain % plural
+ \relax
+ \scratchcounter\clf_addtolist
+ metadata {
+ kind {construction}
+ name {\currentconstructionmain}
+ % level structures.sections.currentlevel()
+ catcodes \catcodetable
+ }
+ references {
+ internal \locationcount
+ order \locationorder
+ reference {\currentconstructionreference}
+ prefix {\currentconstructionreferenceprefix}
+ % block {\currentsectionblock}
+ % section structures.sections.currentid(),
+ }
+ titledata {
+ label {\detokenize\expandafter{\currentconstructionlabel}}
+ title {\detokenize\expandafter{\currentconstructiontitle}}
+ \ifx\currentconstructionbookmark\currentconstructiontitle \else
+ bookmark {\detokenize\expandafter{\currentconstructionbookmark}}
+ \fi
+ \ifx\currentconstructionreferencetext\currentconstructiontitle \else
+ reference {\detokenize\expandafter{\currentconstructionreferencetext}}
+ \fi
+ \ifx\currentconstructionlist\currentconstructiontitle \else
+ list {\detokenize\expandafter{\currentconstructionlist}}
+ \fi
+ }
+ \ifconditional\c_strc_constructions_number_state
+ prefixdata {
+ prefix {\constructionparameter\c!prefix}
+ separatorset {\constructionparameter\c!prefixseparatorset}
+ conversion {\constructionparameter\c!prefixconversion}
+ conversionset {\constructionparameter\c!prefixconversionset}
+ set {\constructionparameter\c!prefixset}
+ segments {\constructionparameter\c!prefixsegments}
+ connector {\constructionparameter\c!prefixconnector}
+ }
+ numberdata {
+ numbers {\currentconstructionnumber}
+ separatorset {\constructionparameter\c!numberseparatorset}
+ conversion {\constructionparameter\c!numberconversion}
+ conversionset {\constructionparameter\c!numberconversionset}
+ starter {\constructionparameter\c!numberstarter}
+ stopper {\constructionparameter\c!numberstopper}
+ segments {\constructionparameter\c!numbersegments}
+ }
+ \or
+ % symbol
+ \fi
+ userdata {\detokenize{#1}}
+ \relax
+ % \writestatus{constructions}{registering \currentconstruction: \number\scratchcounter}%
+ \clf_setinternalreference
+ prefix {\currentconstructionreferenceprefix}%
+ reference {\currentconstructionreference}%
+ internal \locationcount
+ view {\interactionparameter\c!focus}%
+ \relax
+ \normalexpanded {%
+ \endgroup
+ \edef\noexpand\currentconstructionlistentry {\the\scratchcounter}%
+ \edef\noexpand\currentconstructionattribute {\the\lastdestinationattribute}%
+ \edef\noexpand\currentconstructionsynchronize{\clf_deferredenhancelist\the\scratchcounter}%
+ }%
+ \fi}
+
+% This is not so nice, some day I'll just store the number with the entry
+% and deal with all at the Lua end, but first we need to be able to set
+% macros.
+
+\permanent\protected\def\reinstateconstructionnumberentry#1% was xdef
+ {\edef\currentconstructionattribute {\clf_getinternallistreference#1}%
+ \edef\currentconstructionsynchronize{\clf_deferredenhancelist\number#1}}
+
+\permanent\protected\def\reinstatecachedconstructionnumberentry#1% was xdef | #1 = cached index can be different from real
+ {\edef\currentconstructionattribute {\clf_getinternalcachedlistreference#1}% destination
+ \edef\currentconstructionsynchronize{\clf_deferredenhancelist\number#1}}
+
+\installstructurelistprocessor{construction}{\usestructurelistprocessor{number+title}}
+
+% Helpers:
+
+\def\currentconstructionnumber{\constructionparameter\s!counter}
+
+\protected\def\strc_constructions_next_indeed #get#tag#level{\strc_counters_increment_sub{#get{#tag}\s!counter}{#level}}
+\protected\def\strc_constructions_reset_indeed#get#tag#level{\strc_counters_reset_sub {#get{#tag}\s!counter}{#level}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-def.mkxl
new file mode 100644
index 00000000000..52b3b3ad972
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-def.mkxl
@@ -0,0 +1,338 @@
+%D [ file=strc-def,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Definitions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Structure Macros / Definitions}
+
+%registerctxluafile{strc-def}{}
+
+\unprotect
+
+% \setupsectionblock[appendix][sectionconversionset=appendix]
+% \setuphead[chapter][sectionconversionset=\sectionblockparameter\c!sectionconversionset] % \sectionblockparameter]
+
+% \defineresetset[default][0,1,1,0][1] % this will not reset parts and subsections
+% \setuphead[part][sectionresetset=default]
+% \starttext
+% \placelist[chapter,section,subsection][criterium=all,width=3cm]
+% \part{first} \chapter{alpha} \section{a} \section{b} \subsection{x} \subsection{y} \chapter{beta}
+% \part{second} \chapter{gamma} \section{a} \section{b} \subsection{x} \subsection{y} \chapter{delta}
+% \stoptext
+
+\defineseparatorset [\s!default] [] [.]
+\defineconversionset [\s!default] [] [numbers]
+\defineresetset [\s!default] [] [1] % each level
+\defineprefixset [\s!default] [section-1,section-2,section-3] []
+
+\defineconversionset [\v!number] [] [numbers]
+\defineconversionset [\v!pagenumber] [] [numbers]
+
+\defineprefixset [\v!all] [section-1,section-2,section-3,section-4,section-5,section-6,section-7,section-8] []
+\defineprefixset [\v!none] [] []
+
+\defineprefixset [\v!part] [section-1] []
+\defineprefixset [\v!chapter] [section-2] []
+
+\defineseparatorset [\v!appendix:\s!default] [] [.]
+\defineconversionset [\v!appendix:\s!default] [Romannumerals,Characters] [numbers]
+\defineresetset [\v!appendix:\s!default] [] [1] % why was this 0
+
+\setupuserpagenumber
+ [\c!numberconversionset=\v!pagenumber]
+
+\setupcounters
+ [\c!numberconversionset=\v!number]
+
+% \startsetups defaults:frontpart:pagenumbers:roman
+% \defineconversionset[\c!frontpart:\c!pagenumber][][romannumerals]
+% \setupuserpagenumber[\c!way=\v!by\v!block]
+% \stopsetups
+
+% \definesectionblock
+
+\definesectionblock [\v!frontpart] [\v!frontmatter] [\c!number=\v!no]
+\definesectionblock [\v!bodypart] [\v!bodymatter] [\c!number=\v!yes]
+\definesectionblock [\v!appendix] [\v!appendices] [\c!number=\v!yes]
+\definesectionblock [\v!backpart] [\v!backmatter] [\c!number=\v!no]
+
+\setsectionblock [\v!bodypart] % default
+
+% \setuphead[sectionsegments=\currentheadlevel]
+% \setuphead[sectionsegments=current]
+%
+% \startchapter[title=One,ownnumber={A}]
+% \startsection[title=OneOne,ownnumber={A.B}]
+% \startsubsection[title=OneOneOne,ownnumber={A.B.C}]
+% test
+% \stopsubsection
+% \stopsection
+% \stopchapter
+
+% \appendtoks
+% \setsectionblock[\v!bodypart]% default
+% \to \everyjob
+%
+% \appendtoks
+% \clf_setinitialsectionblock{\v!bodypart}%
+% \to \everystarttext
+
+\appendtoks
+ \clf_setinitialsectionblock{\v!bodypart}%
+\to \everyjob
+
+% \definesection (could become \definehead with one parameter)
+
+\definesection[\s!section-1] % part
+\definesection[\s!section-2] % chapter
+\definesection[\s!section-3] % section
+\definesection[\s!section-4] % subsection
+\definesection[\s!section-5] % subsubsection
+\definesection[\s!section-6] % subsubsubsection
+\definesection[\s!section-7] % subsubsubsubsection
+\definesection[\s!section-8] % subsubsubsubsubsection
+\definesection[\s!section-9] % subsubsubsubsubsubsection
+\definesection[\s!section-10] % subsubsubsubsubsubsubsection
+\definesection[\s!section-11] % subsubsubsubsubsubsubsubsection
+\definesection[\s!section-12] % subsubsubsubsubsubsubsubsubsection
+
+% \definehead
+
+\definehead
+ [\v!part]
+ [\c!section=\s!section-1]
+
+\definehead
+ [\v!chapter]
+ [\c!section=\s!section-2]
+
+\definehead
+ [\v!section]
+ [\c!section=\s!section-3]
+
+\definehead
+ [\v!subsection]
+ [\c!section=\s!section-4,
+ \c!default=\v!section]
+
+\definehead
+ [\v!subsubsection]
+ [\c!section=\s!section-5,
+ \c!default=\v!subsection]
+
+\definehead
+ [\v!subsubsubsection]
+ [\c!section=\s!section-6,
+ \c!default=\v!subsubsection]
+
+\definehead
+ [\v!subsubsubsubsection]
+ [\c!section=\s!section-7,
+ \c!default=\v!subsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsection]
+ [\c!section=\s!section-8,
+ \c!default=\v!subsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsection]
+ [\c!section=\s!section-9,
+ \c!default=\v!subsubsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsection]
+ [\c!section=\s!section-10,
+ \c!default=\v!subsubsubsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsection]
+ [\c!section=\s!section-11,
+ \c!default=\v!subsubsubsubsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsubsection]
+ [\c!section=\s!section-12,
+ \c!default=\v!subsubsubsubsubsubsubsubsection]
+
+\definehead
+ [\v!title]
+ [\c!coupling=\v!chapter,
+ \c!default=\v!chapter,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subject]
+ [\c!coupling=\v!section,
+ \c!default=\v!section,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubject]
+ [\c!coupling=\v!subsection,
+ \c!default=\v!subsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubject]
+ [\c!coupling=\v!subsubsection,
+ \c!default=\v!subsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubject]
+ [\c!coupling=\v!subsubsubsection,
+ \c!default=\v!subsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsection,
+ \c!default=\v!subsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+% setups
+
+\setuphead
+ [\v!part]
+ [\c!placehead=\v!no]
+
+\setuphead
+ [\v!chapter]
+ [\v!appendix\c!label=\v!appendix,
+ \v!bodypart\c!label=\v!chapter] % bijlageconversie=\Character
+
+\setuphead
+ [\v!section]
+ [\v!appendix\c!label=\v!section,
+ \v!bodypart\c!label=\v!section] % bijlageconversie=\Character
+
+\setuphead
+ [\v!subsection]
+ [\v!appendix\c!label=\v!subsection,
+ \v!bodypart\c!label=\v!subsection] % bijlageconversie=\Character
+
+\setuphead
+ [\v!subsubsection]
+ [\v!appendix\c!label=\v!subsubsection,
+ \v!bodypart\c!label=\v!subsubsection] % bijlageconversie=\Character
+
+% prefixes
+
+\defineprefixset
+ [\v!all]
+ [section-1,section-2,section-3,section-4,section-5,section-6,section-7,%
+ section-8,section-9,section-10,section-11,section-12]
+ []
+
+% \setuphead
+
+\setuphead
+ [\v!part,\v!chapter]
+ [%\c!align=,
+ %\c!indentnext=\v!no,
+ \c!continue=\v!no,
+ \c!page=\v!right,
+ \c!marking=\v!page,
+ \c!header=,
+ \c!style=\tfc,
+ \c!distance=.75\emwidth,
+ \c!textdistance=\emwidth plus \emwidth minus .25\emwidth,
+ \c!before={\blank[2*\v!big]},
+ \c!after={\blank[2*\v!big]}]
+
+\setuphead
+ [\v!section]
+ [%\c!align=,
+ %\c!indentnext=\v!no,
+ \c!style=\tfa,
+ \c!distance=.75\emwidth,
+ \c!textdistance=\emwidth plus \emwidth minus .25\emwidth,
+ \c!before={\blank[2*\v!big]},
+ \c!after=\blank]
+
+\setuphead % nieuw
+ [\v!subsection]
+ [\c!page=]
+
+% brrr
+
+% \definecounter[\v!page][\c!start=1] % todo: setup
+
+% lists
+
+\definecombinedlist
+ [\v!content]
+ [\v!part,
+ \v!chapter,
+ \v!section,
+ \v!subsection,
+ \v!subsubsection,
+ \v!subsubsubsection,
+ \v!subsubsubsubsection]
+ [\c!level=\v!subsubsubsubsection,
+ \c!criterium=\v!local]
+
+\setuplist
+ [\v!part]
+ [\c!before={\blank[\v!preference,\v!big]}, % sort of mkii compatible, watch columns
+ \c!after=\blank,
+ \c!label=\v!yes,
+ \c!distance=\emwidth]
+
+\setuplist
+ [\v!chapter]
+ [\c!before={\blank[\v!preference,\v!big]}, % sort of mkii compatible, watch columns
+ \c!after=]
+
+\setuplist [\v!part] [\c!width=0\emwidth]
+\setuplist [\v!chapter] [\c!width=2\emwidth]
+\setuplist [\v!section] [\c!width=3\emwidth]
+\setuplist [\v!subsection] [\c!width=4\emwidth]
+\setuplist [\v!subsubsection] [\c!width=5\emwidth]
+\setuplist [\v!subsubsubsection] [\c!width=6\emwidth]
+\setuplist [\v!subsubsubsubsection] [\c!width=7\emwidth]
+\setuplist [\v!subsubsubsubsubsection] [\c!width=8\emwidth]
+\setuplist [\v!subsubsubsubsubsubsection] [\c!width=9\emwidth]
+\setuplist [\v!subsubsubsubsubsubsubsection] [\c!width=10\emwidth]
+\setuplist [\v!subsubsubsubsubsubsubsubsection] [\c!width=11\emwidth]
+\setuplist [\v!subsubsubsubsubsubsubsubsubsection] [\c!width=12\emwidth]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-des.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-des.mklx
new file mode 100644
index 00000000000..b44593a3218
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-des.mklx
@@ -0,0 +1,199 @@
+%D \module
+%D [ file=strc-des,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Descriptions,
+%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 Structure Macros / Descriptions}
+
+\unprotect
+
+\installcorenamespace{description}
+
+\installcommandhandler \??description {description} \??description
+
+\aliased\let\setupdescriptions\setupdescription
+
+% \setupdescription % check with old
+% [\c!alternative=\descriptionparameter\c!location,
+% \c!location=\v!left]
+
+\setupdescription % check with old
+ [\c!alternative=\v!left,
+ \c!headstyle=\v!bold,
+ \c!titlestyle=\v!bold,
+ %\c!style=,
+ %\c!color=,
+ %\c!headcolor=,
+ %\c!titlecolor=,
+ \c!width=7\emwidth,
+ \c!distance=\emwidth,
+ \c!titledistance=.5\emwidth,
+ %\c!hang=,
+ %\c!sample=,
+ %\c!align=,
+ %\c!headalign=,
+ \c!margin=\v!no,
+ \c!before=\blank,
+ \c!inbetween=\blank,
+ \c!after=\blank,
+ \c!indentnext=\v!yes,
+ \c!indenting=\v!never,
+ \c!titleleft=(,
+ \c!titleright=),
+ %\c!closesymbol=,
+ \c!closecommand=\wordright,
+ \c!display=\v!yes,
+ %\c!command=,
+ \c!titlecommand=,
+ \c!expansion=\v!no,
+ %\c!xmlsetup=,
+ %\s!catcodes=,
+ \c!title=\v!yes,
+ %\c!text=,
+ ]
+
+\appendtoks
+ \ifempty\currentdescriptionparent
+ \defineconstruction[\currentdescription][\currentdescriptionparent][\s!handler=\v!description,\c!level=1]%
+ \else
+ \defineconstruction[\currentdescription][\s!handler=\v!description,\c!level=1]%
+ \fi
+ % We can combine these but in tracing (or errors) using a different caller is nicer.
+ \frozen\instance\setuevalue {\currentdescription}{\strc_descriptions_command[\currentdescription]}%
+ \frozen\instance\setuevalue{\e!start\currentdescription}{\strc_descriptions_start [\currentdescription]}%
+ \frozen\instance\setuevalue{\e!stop \currentdescription}{\strc_descriptions_stop}%
+\to \everydefinedescription
+
+\let\p_strc_constructions_title \empty
+
+\protected\setvalue{\??constructioninitializer\v!description}%
+ {\let \currentdescription \currentconstruction
+ \enforced\let\constructionparameter \descriptionparameter
+ \enforced\let\constructionnamespace \??description
+ \enforced\let\detokenizedconstructionparameter\detokenizeddescriptionparameter
+ \enforced\let\letconstructionparameter \letdescriptionparameter
+ \enforced\let\useconstructionstyleandcolor \usedescriptionstyleandcolor
+ \enforced\let\setupcurrentconstruction \setupcurrentdescription
+ \edef\p_strc_constructions_title{\constructionparameter\c!title}%
+ \ifx\p_strc_constructions_title\v!yes
+ \settrue\c_strc_constructions_title_state
+ \else
+ \setfalse\c_strc_constructions_title_state
+ \fi}
+
+% We keep the command variant around but rather would move to the
+% start-stop one. Also, passing the title as argument has some
+% history so we need to keep that as well.
+
+% \startdescription [reference] text \stopdescription
+% \startdescription [reference]{title} text \stopdescription
+% \startdescription [title=,title=,reference=] text \stopdescription
+
+% A bit over the top, the optional title but mkii has it too.
+
+\tolerant\protected\def\strc_descriptions_start[#1]#*[#2]%
+ {\begingroup
+ \strc_constructions_initialize{#1}%
+ \ifhastok={#2}%
+ \expandafter\strc_descriptions_start_setups
+ \orelse\ifconditional\c_strc_constructions_title_state
+ \expandafter\strc_descriptions_start_title
+ \else
+ \expandafter\strc_descriptions_start_reference
+ \fi[#2]}
+
+% we could use this:
+%
+% \def\strc_descriptions_preset
+% {\setdescriptionparameter\c!label{\descriptionparameter\c!text}%
+% \resetdescriptionparameter\c!bookmark
+% \resetdescriptionparameter\c!list
+% \resetdescriptionparameter\c!referencetext}
+
+\protected\def\strc_descriptions_start_setups[#1]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,\c!referencetext=,#1]%
+ \csname\??constructionstarthandler\currentconstructionhandler\endcsname}
+
+\protected\tolerant\def\strc_descriptions_start_title[#1]#*#=%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=]%
+ \csname\??constructionstarthandler\currentconstructionhandler\endcsname}
+
+\protected\def\strc_descriptions_start_reference[#1]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title=,\c!bookmark=,\c!list=,\c!referencetext=]%
+ \csname\??constructionstarthandler\currentconstructionhandler\endcsname}
+
+\protected\def\strc_descriptions_stop
+ {\csname\??constructionstophandler\currentconstructionhandler\endcsname}
+
+% \description [reference] text \par
+% \description [reference] {title} text \par
+
+\tolerant\protected\def\strc_descriptions_command[#1]#*[#2]%
+ {\begingroup
+ \strc_constructions_initialize{#1}%
+ \ifhastok={#2}%
+ \expandafter\strc_descriptions_command_setups
+ \orelse\ifconditional\c_strc_constructions_title_state
+ \expandafter\strc_descriptions_command_title
+ \else
+ \expandafter\strc_descriptions_command_reference
+ \fi[#2]}
+
+\protected\def\strc_descriptions_command_setups[#1]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,\c!referencetext=,#1]%
+ \csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
+
+\protected\tolerant\def\strc_descriptions_command_title[#1]#:#*#=%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=]%
+ \csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
+
+\protected\def\strc_descriptions_command_reference[#1]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title=,\c!bookmark=,\c!list=,\c!referencetext=]%
+ \csname\??constructioncommandhandler\currentconstructionhandler\endcsname}
+
+%D Handlers:
+
+\letcsname\??constructionmainhandler \v!description\expandafter\endcsname\csname\??constructionmainhandler \v!construction\endcsname
+\letcsname\??constructioncommandhandler\v!description\expandafter\endcsname\csname\??constructioncommandhandler\v!construction\endcsname
+\letcsname\??constructiontexthandler \v!description\expandafter\endcsname\csname\??constructiontexthandler \v!construction\endcsname
+
+\protected\setvalue{\??constructioncommandhandler\v!description}%
+ {\dowithpar
+ {\csname\??constructionstarthandler\v!construction\endcsname}%
+ {\csname\??constructionstophandler \v!construction\endcsname\endgroup}}
+
+\protected\setvalue{\??constructionstarthandler\v!description}%
+ {\dogotopar
+ {\csname\??constructionstarthandler\v!construction\endcsname}}
+
+\protected\setvalue{\??constructionstophandler\v!description}%
+ {\csname\??constructionstophandler\v!construction\endcsname
+ \endgroup}
+
+%D For historic reasons we have (from now on undocumented):
+
+\definedescription
+ [tab]
+ [\c!alternative=\v!left,
+ \c!headstyle=\v!normal,
+ \c!headcolor=,
+ \c!style=\v!normal,
+ \c!color=,
+ \c!width=\v!broad,
+ \c!sample=\kern4\emwidth, % was \hskip but that no longer is okay
+ \c!before=,
+ \c!after=]
+
+\permanent\protected\def\setuptab{\setupdescription[tab]} % for old times
+
+%D Maybe we should remove this definition.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl
new file mode 100644
index 00000000000..50b71d9d2dc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-doc.mkxl
@@ -0,0 +1,85 @@
+%D \module
+%D [ file=strc-doc,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Document Structure,
+%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 Structure Macros / Document Structure}
+
+\registerctxluafile{strc-doc}{}
+
+\unprotect
+
+%D This will move:
+
+\mutable\let\currentstructureattribute \empty
+\mutable\let\currentstructurebackreference \empty
+\mutable\let\currentstructurebookmark \empty
+\mutable\let\currentstructurecatcodes \empty
+\mutable\let\currentstructurecoding \empty
+\mutable\let\currentstructurecoupling \empty
+\mutable\let\currentstructureexpansion \empty
+\mutable\let\currentstructureincrementnumber \empty
+\mutable\let\currentstructurelabel \empty
+\mutable\let\currentstructurelevel \empty
+\mutable\let\currentstructurelist \empty
+\mutable\let\currentstructurelistattribute \empty
+\mutable\let\currentstructuremarking \empty
+\mutable\let\currentstructurename \empty
+\mutable\let\currentstructureownnumber \empty
+\mutable\let\currentstructureplaceholder \empty
+\mutable\let\currentstructurereference \empty
+\mutable\let\currentstructurereferenceattribute \empty
+\mutable\let\currentstructurereferenceprefix \empty
+\mutable\let\currentstructuresaveinlist \empty
+\mutable\let\currentstructureshownumber \empty
+\mutable\let\currentstructuretitle \empty
+\mutable\let\currentstructurexmlsetup \empty
+
+\mutable\let\currentstructurecomponentattribute \empty
+\mutable\let\currentstructurecomponentbookmark \empty
+\mutable\let\currentstructurecomponentcatcodes \empty
+\mutable\let\currentstructurecomponentcoding \empty
+\mutable\let\currentstructurecomponentexpansion \empty
+\mutable\let\currentstructurecomponentlabel \empty
+\mutable\let\currentstructurecomponentlevel \empty
+\mutable\let\currentstructurecomponentlist \empty
+\mutable\let\currentstructurecomponentmarking \empty
+\mutable\let\currentstructurecomponentname \empty
+\mutable\let\currentstructurecomponentreference \empty
+\mutable\let\currentstructurecomponentreferenceprefix\empty
+\mutable\let\currentstructurecomponentsynchronize \empty
+\mutable\let\currentstructurecomponenttitle \empty
+\mutable\let\currentstructurecomponentxmlsetup \empty
+
+\permanent\protected\def\setstructuresynchronization#1% todo: use ctxcontext
+ {\clf_setinternalreference
+ prefix {\currentstructurereferenceprefix}%
+ reference {\currentstructurereference}
+ internal \locationcount
+ view {\interactionparameter\c!focus}%
+ \relax
+ \enforced\xdef\currentstructureattribute
+ {\the\lastdestinationattribute}%
+ \enforced\xdef\currentstructuresynchronize
+ {\currentstructuresynchronize
+ \strc_lists_inject_enhance{#1}}}
+
+\permanent\protected\def\setstructurecomponentsynchronization#1% todo: use ctxcontext
+ {\clf_setinternalreference
+ prefix {\currentstructurecomponentreferenceprefix}%
+ reference {\currentstructurecomponentreference}
+ internal \locationcount
+ view {\interactionparameter\c!focus}%
+ \relax
+ \enforced\xdef\currentstructurecomponentattribute {\the\lastdestinationattribute}%
+ \enforced\xdef\currentstructurecomponentsynchronize{\strc_lists_inject_enhance{#1}}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-enu.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-enu.mklx
new file mode 100644
index 00000000000..4bcdb6c4f32
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-enu.mklx
@@ -0,0 +1,372 @@
+%D \module
+%D [ file=strc-enu, % moved from strc-des
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Enumerations,
+%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 Structure Macros / Enumerations}
+
+\unprotect
+
+% command -> headcommand
+
+%D Enumerations are just super descriptions. Therefore we implement
+%D them as an extension. After all, the keys don't clash. In order
+%D to be able to differentiate between specific settings we use
+%D some flags. Unfortunately we have some historic differences
+%D in default values. Therefore we push an extra step in the
+%D parent chain (we might do the same for regular descriptions).
+
+%D In order to be more flexible with theorems Aditya Mahajan added
+%D support for titles and endsymbols. At the same time we added more
+%D flexible support for inheriting numbers.
+%D
+%D \startbuffer
+%D \defineenumeration[one]
+%D \defineenumeration[two] [one] % clone one
+%D \defineenumeration[three] [counter=one,style=slanted] % only use counter of one
+%D \defineenumeration[four] [three] % clone three
+%D \defineenumeration[five] [three] [counter=five] % clone three and use own counter
+%D \defineenumeration[six] [three] [counter=four] % clone tree and use counter four (undefined)
+%D
+%D \startone test test 6 \stopone
+%D \starttwo test test 7 \stoptwo
+%D \startthree test test 8 \stopthree
+%D \startfour test test 9 \stopfour
+%D \startfive test test 2 \stopfive
+%D \startsix test test 10 \stopsix
+%D \stopbuffer
+%D
+%D \typebuffer \start \getbuffer \stop
+%D
+%D \starttyping
+%D \setupenumerations[one] [prefix=yes,prefixsegments=section]
+%D \setupenumerations[two] [prefix=yes,prefixsegments=section]
+%D \setupenumerations[three][prefix=yes,prefixsegments=section]
+%D \setupenumerations[four] [prefix=yes,prefixsegments=chapter:section]
+%D \setupenumerations[five] [prefix=yes,prefixsegments=chapter:section]
+%D \setupenumerations[six] [prefix=yes,prefixsegments=chapter:section]
+%D \stoptyping
+
+% list and titles are experimental
+%
+% \definedescription[test] [location=left,hang=4,headalign={right},distance=1em,list=test]
+% \defineenumeration[lemma][title=yes,right=:,textdistance=1em, location=top, titlestyle=\bs,list=lemma]
+% \defineenumeration[ammel][title=yes,right=:,textdistance=.5em,location=left,titlestyle=\it,width=9em]
+%
+% \placelist[enumeration:lemma]
+% \placelist[description:test][width=0pt]
+%
+% \starttest {something something something} \input zapf \stoptest
+% \startlemma {with a title of a certain length} \input tufte \stoplemma
+% \startammel {with a title} \input zapf \stopammel
+%
+% \defineenumeration[lemma][...]
+% \defineenumeration[titledlemma][lemma][title=yes,right=:,text=lemma,list=lemma]
+
+\installcorenamespace{enumeration}
+
+\installcommandhandler \??enumeration {enumeration} \??enumeration
+
+\installcounterassociation{enumeration}
+
+\let\setupenumerations\setupenumeration
+
+\setupenumeration % check with old
+ [\c!alternative=\v!top,
+ \c!headstyle=\v!bold,
+ \c!titlestyle=\v!bold,
+ %\c!style=,
+ %\c!color=,
+ %\c!headcolor=,
+ %\c!titlecolor=,
+ \c!width=8\emwidth,
+ %\c!distance=\zeropoint,
+ \c!distance=\emwidth,
+ \c!titledistance=.5\emwidth,
+ %\c!hang=,
+ %\c!sample=,
+ %\c!align=,
+ %\c!headalign=,
+ \c!margin=\v!no,
+ \c!before=\blank,
+ \c!inbetween=\blank,
+ \c!after=\blank,
+ \c!indentnext=\v!yes,
+ \c!indenting=\v!never,
+ \c!titleleft=(,
+ \c!titleright=),
+ %\c!closesymbol=,
+ \c!closecommand=\wordright,
+ \c!display=\v!yes,
+ %\c!command=,
+ \c!titlecommand=,
+ \c!expansion=\v!no,
+ %\c!xmlsetup=,
+ %\s!catcodes=,
+ \c!way=\v!by\v!text,
+ \c!prefix=\v!no,
+ \c!prefixconnector=.,
+ %\c!starter=,
+ %\c!stopper=,
+ \c!text=\currentenumeration,
+ \c!number=\v!yes, % else description
+ \c!start=0,
+ \c!state=\v!start,
+ \c!levels=4]
+
+% to be considered:
+%
+% \let\??construction\??enumeration
+%
+% with push/pop (also at definition time)
+
+\protected\def\strc_define_commands_enumeration#tag#level#parent%
+ {\doifelsenothing{#parent}
+ {\normalexpanded{\defineconstruction[#tag][\s!handler=\v!enumeration,\c!level=#level]}%
+ \setevalue{\??enumeration#tag:\s!parent}{\??enumeration}}%
+ {\normalexpanded{\defineconstruction[#tag][#parent][\s!handler=\v!enumeration,\c!level=#level]}%
+ \setevalue{\??enumeration#tag:\s!parent}{\??enumeration#parent}}%
+ \frozen\instance\setuevalue{\e!next #tag}{\strc_enumerations_next {#tag}{\number#level}}% obsolete
+ \frozen\instance\setuevalue{\c!reset#tag}{\strc_enumerations_reset {#tag}{\number#level}}% obsolete
+ %frozen\instance\setuevalue{\c!set #tag}{\strc_enumerations_set {#tag}{\number#level}}% obsolete
+ \frozen\instance\setuevalue {#tag}{\strc_enumerations_command[#tag]}% we could pass level here as well (faster)
+ \frozen\instance\setuevalue{\e!start#tag}{\strc_enumerations_start [#tag]}% we could pass level here as well (faster)
+ \frozen\instance\setuevalue{\e!stop #tag}{\strc_enumerations_stop }}
+
+\let\m_strc_enumeration_sub\empty
+
+\appendtoks
+ \let\m_strc_enumeration_sub\empty
+ \ifempty\currentenumerationparent
+ % clone => parent | subclone => clone | subsubclone => subclone
+ \strc_define_commands_enumeration
+ {\m_strc_enumeration_sub\currentenumeration}%
+ \plusone
+ \empty
+ \edef\p_levels{\enumerationparameter\c!levels}%
+ \dostepwiserecurse\plustwo\p_levels\plusone
+ {\strc_define_commands_enumeration
+ {\v!sub\m_strc_enumeration_sub\currentenumeration}%
+ \recurselevel
+ {\m_strc_enumeration_sub\currentenumeration}%
+ \edef\m_strc_enumeration_sub{\v!sub\m_strc_enumeration_sub}}%
+ \else
+ % clone => parent | subclone => subparent | subsubclone => subsubparent
+ \edef\p_levels{\enumerationparameter\c!levels}%
+ \dorecurse\p_levels
+ {\strc_define_commands_enumeration
+ {\m_strc_enumeration_sub\currentenumeration}%
+ \recurselevel
+ {\m_strc_enumeration_sub\currentenumerationparent}%
+ \edef\m_strc_enumeration_sub{\v!sub\m_strc_enumeration_sub}}%
+ \fi
+ \edef\p_counter{\enumerationparameter\s!counter}% can inherit from parent
+ \ifempty\p_counter %
+ \let\p_counter\currentenumeration
+ \fi
+ \doifelsecounter\p_counter\donothing{\strc_enumerations_define_counter\p_counter}%
+ \letenumerationparameter\s!counter\p_counter
+ %\strc_enumerations_setup_counter\currentenumeration
+\to \everydefineenumeration
+
+\let\p_strc_constructions_title \empty
+\let\p_strc_constructions_number\empty
+
+\protected\setvalue{\??constructioninitializer\v!enumeration}%
+ {\let \currentenumeration \currentconstruction
+ \enforced\let\constructionparameter \enumerationparameter
+ \enforced\let\constructionnamespace \??enumeration
+ \enforced\let\detokenizedconstructionparameter\detokenizedenumerationparameter
+ \enforced\let\letconstructionparameter \letenumerationparameter
+ \enforced\let\useconstructionstyleandcolor \useenumerationstyleandcolor
+ \enforced\let\setupcurrentconstruction \setupcurrentenumeration
+ \edef\p_strc_constructions_number{\constructionparameter\c!number}%
+ \ifx\p_strc_constructions_number\v!yes
+ \settrue\c_strc_constructions_number_state
+ \iftrialtypesetting
+ \strc_counters_save\currentconstructionnumber
+ \fi
+ \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel
+ \else
+ \setfalse\c_strc_constructions_number_state
+ \fi
+ \edef\p_strc_constructions_title{\constructionparameter\c!title}%
+ \ifx\p_strc_constructions_title\v!yes
+ \settrue\c_strc_constructions_title_state
+ \else
+ \setfalse\c_strc_constructions_title_state
+ \fi}
+
+\protected\setvalue{\??constructionfinalizer\v!enumeration}%
+ {\ifconditional\c_strc_constructions_number_state
+ \iftrialtypesetting
+ \strc_counters_restore\currentconstructionnumber
+ \fi
+ \fi}
+
+%D Interfaces:
+
+\let\strc_enumerations_command\strc_descriptions_command
+\let\strc_enumerations_start \strc_descriptions_start
+\let\strc_enumerations_stop \strc_descriptions_stop
+
+\protected\def\strc_enumerations_next {\strc_constructions_next_indeed \namedenumerationparameter} % #1#2
+\protected\def\strc_enumerations_reset{\strc_constructions_reset_indeed\namedenumerationparameter} % #1#2
+%protected\def\strc_enumerations_set {\strc_constructions_set_indeed \namedenumerationparameter} % #1#2
+
+%D Counters (maybe we can share this code): (not ok yet, messy with notes)
+
+% Maybe we should move counters to the construction level as more derived mechanisms
+% use it \unknown\ so don't depend on names here!
+
+\def\strc_enumerations_define_counter#tag% todo: move inline
+ {\definecounter[#tag]%
+ \registerenumerationcounter{#tag}}
+
+\appendtoks
+ \synchronizeenumerationcounters
+\to \everysetupenumeration
+
+\appendtoks
+ \synchronizeenumerationcounters
+\to \everydefineenumeration
+
+%D Initializer:
+
+%D The handlers.
+
+\newtoks\everyenumeration
+
+\letcsname\??constructionmainhandler \v!enumeration\expandafter\endcsname\csname\??constructionmainhandler \v!description\endcsname
+\letcsname\??constructioncommandhandler\v!enumeration\expandafter\endcsname\csname\??constructioncommandhandler\v!description\endcsname
+\letcsname\??constructionstarthandler \v!enumeration\expandafter\endcsname\csname\??constructionstarthandler \v!description\endcsname
+\letcsname\??constructionstophandler \v!enumeration\expandafter\endcsname\csname\??constructionstophandler \v!description\endcsname
+
+\protected\setvalue{\??constructiontexthandler\v!enumeration}%
+ {\begingroup
+ \useconstructionstyleandcolor\c!headstyle\c!headcolor
+ \strc_enumerations_text
+ \endgroup}
+
+\protected\def\strc_enumerations_text
+ {\the\everyenumeration % will become obsolete
+ \ifconditional\c_strc_constructions_number_state
+ \ifx\currentconstructionreference\!!plustoken
+ \strc_enumerations_full_number_symbol
+ \orelse\ifx\currentconstructionreference\!!minustoken
+ \strc_enumerations_full_number_nop
+ \else
+ \strc_enumerations_full_number_coupling
+ \fi
+ \else
+ \strc_enumerations_full_number_nop
+ \fi}
+
+\protected\def\strc_enumerations_inject_text_with_space
+ {\edef\p_text{\constructionparameter\c!text}%
+ \ifempty\p_text \else
+ \p_text
+ \removeunwantedspaces
+ \nobreakspace
+ \fi}
+
+\protected\def\strc_enumerations_inject_extra_text
+ {\ifconditional\c_strc_constructions_title_state
+ \clf_doifelselisthastitle{\currentconstructionmain}\numexpr\currentconstructionlistentry\relax
+ \strc_enumerations_inject_extra_text_indeed
+ \donothing
+ \fi}
+
+\protected\def\strc_enumerations_inject_text
+ {\constructionparameter\c!numbercommand
+ {\constructionparameter\c!text}}
+
+% head ( number title )
+
+\protected\def\strc_enumerations_inject_extra_text_indeed
+ {\begingroup
+ \hskip\constructionparameter\c!titledistance % we listen to the headstyle
+ \useconstructionstyleandcolor\c!titlestyle\c!titlecolor
+ \constructionparameter\c!titlecommand
+ {\constructionparameter\c!titleleft
+ \clf_savedlisttitle{\currentconstructionmain}\currentconstructionlistentry\relax
+ \constructionparameter\c!titleright}%
+ \endgroup}
+
+\protected\def\strc_enumerations_inject_symbol % todo check
+ {\constructionparameter\c!left
+ \constructionparameter\c!symbol
+ \constructionparameter\c!right}
+
+\protected\def\strc_enumerations_inject_number
+ {\constructionparameter\c!left
+ \constructionparameter\c!starter
+ \clf_savedlistprefixednumber{\currentconstructionmain}\currentconstructionlistentry\relax
+ \constructionparameter\c!stopper
+ \constructionparameter\c!right}
+
+\protected\def\strc_enumerations_inject_text_and_number
+ {\constructionparameter\c!numbercommand
+ {\strc_enumerations_inject_text_with_space
+ \strc_enumerations_inject_number}}
+
+\protected\def\strc_enumerations_inject_text_and_symbol
+ {\constructionparameter\c!numbercommand
+ {\strc_enumerations_inject_text_with_space
+ \strc_enumerations_inject_symbol}}
+
+\protected\def\strc_enumerations_full_number_yes
+ {\constructionparameter\c!headcommand
+ {\begstrut
+ \strc_enumerations_inject_text_and_number
+ \strc_enumerations_inject_extra_text
+ \endstrut}}
+
+\protected\def\strc_enumerations_full_number_nop
+ {\constructionparameter\c!headcommand
+ {\begstrut
+ \strc_enumerations_inject_text
+ \strc_enumerations_inject_extra_text
+ \endstrut}}
+
+\protected\def\strc_enumerations_full_number_symbol
+ {\constructionparameter\c!headcommand
+ {\begstrut
+ \strc_enumerations_inject_text_and_symbol
+ \strc_enumerations_inject_extra_text
+ \endstrut}}
+
+% to be used in for instance:
+%
+% coupling=questions .... coupling=answers
+%
+% we will provide some more control, like skipping etc or reference relates
+
+% to do / to be checked
+
+\protected\def\strc_enumerations_full_number_coupling
+ {\iflocation
+ \strc_enumerations_full_number_yes
+ \else
+ \iftrialtypesetting \else
+ % \doenumerationregistercoupling
+ \fi
+ \strc_enumerations_full_number_yes
+ \edef\p_coupling{\constructionparameter\c!coupling}%
+ \ifempty\p_coupling \else
+ \symbolreference[order(construction:\p_coupling:\the\locationorder)]%
+ \fi
+ \fi}
+
+\protected\def\strc_enumerations_skip_number_coupling[#tag]% e.g. for questions with no answer
+ {\clf_setnextreferenceorder{construction}{#tag}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx
new file mode 100644
index 00000000000..8f96701f5df
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-flt.mklx
@@ -0,0 +1,2609 @@
+%D \module
+%D \module
+%D [ file=strc-flt,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Float Numbering,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module will be redone with conditionals and everythings
+
+\writestatus{loading}{ConTeXt Structure Macros / Float Numbering}
+
+\registerctxluafile{strc-flt}{}
+
+\unprotect
+
+% todo: a keyword for this (and then a settings->hash for speed)
+%
+% \setuplayout[width=middle,backspace=3cm]
+%
+% \appendtoks
+% \settrue\inhibitmargindata
+% \to \everyinsidefloat
+%
+% \starttext
+% \dorecurse{20}{
+% \par \inleft{\red\infofont<#1>} \par
+% \placefigure[leftmargin]{}{\framed[height=1cm,width=2cm]{}}
+% % \placefigure{#1}{\framed[height=1cm,width=2cm]{}}
+% \par line #1.1 \par line #1.2 \par
+% }
+% \stoptext
+
+% todo: delay caption creation and make setups for each method instead
+% so that we can have a list of methods and redo them as we can
+% keep the list or even better: recreate it
+%
+% todo: strc_floats_analyze_variables_two could trigger a setup
+% and we could have nofmethods of them
+%
+% todo: move variables from page-flt to strc-flt
+%
+% todo: p_name etc
+%
+% todo: less globals!
+%
+% todo: do all options in lua
+
+%D This module is being converted into a mkvi one.
+%D
+%D - rename macros
+%D - get rid of dead code
+%D - less gobal mess
+%D - more mkiv-ish
+
+\installcorenamespace{float}
+\installcorenamespace{floatbuilder}
+\installcorenamespace{floatcaption}
+\installcorenamespace{floatframed}
+
+\installframedcommandhandler \??float {float} \??float
+\installframedcommandhandler \??floatcaption {floatcaption} \??floatcaption
+\installframedcommandhandler \??floatframed {floatframed} \??floatframed
+
+\aliased\let\setupfloats \setupfloat
+\aliased\let\setupcaption \setupfloatcaption
+\aliased\let\setupcaptions\setupfloatcaption
+
+\permanent\protected\def\dohandlenextfloatindent
+ {\useindentnextparameter\floatparameter
+ \dorechecknextindentation}
+
+\setupcaptions
+ [\c!location=\v!bottom,
+ \c!grid=,
+ \c!before=, % not used (yet)
+ \c!inbetween={\blank[\v!medium]},
+ \c!after=, % not used (yet)
+ \c!spacebefore=,
+ \c!spaceinbetween=, % replaces fuzzy inbetween dual usage
+ \c!spaceafter=,
+ \c!width=\v!fit,
+ \c!minwidth=\v!fit, % id est: the width of the floatbox in some cases
+ \c!headstyle=\v!bold,
+ \c!headcolor=,
+ \c!leftmargin=\zeropoint,
+ \c!rightmargin=\zeropoint,
+ \c!outermargin=\zeropoint,
+ \c!innermargin=\zeropoint,
+ \c!setups=,
+ \c!style=\v!normal,
+ \c!color=,
+ \c!textstyle=,
+ \c!textcolor=,
+ \c!align=,
+ \c!number=\v!yes,
+ \c!offset=\v!overlay,
+ \c!frame=\v!off,
+ % \c!expansion=,
+ % \c!prefix=,
+ % \c!prefixconnector=,
+ % \c!way=,
+ % \c!prefixsegments=,
+ % \c!way=,
+ % \c!blockway=,
+ % \c!sectionnumber=,
+ % \c!separator=,
+ % \c!starter=,
+ % \c!stopper=,
+ \c!suffixseparator=, % currently rather hard coded
+ \c!suffix=\floatcaptionsuffix,
+ \c!distance=\emwidth, % plus .5\emwidth minus .25\emwidth
+ \c!conversion=\v!numbers,
+ \c!maxwidth=\hsize,
+ \c!command=]
+
+% we can comment some of these
+
+\setupfloats
+ [\c!location=\v!middle,
+ \c!width=8\lineheight,
+ \c!height=6\lineheight,
+ \c!offset=\v!overlay,
+ \c!frame=\v!off,
+ \c!strut=\v!no,
+ \c!radius=.5\bodyfontsize,
+ \c!corner=\v!rectangular,
+ \c!grid=,
+ %\c!background=,
+ %\c!backgroundcolor=,
+ \c!backgroundoffset=\!!zeropoint,
+ %\c!topframe=,
+ %\c!bottomframe=,
+ %\c!leftframe=,
+ %\c!rightframe=,
+ \c!frameoffset=\!!zeropoint,
+ %\c!before=,
+ %\c!after=,
+ \c!spacebefore=\v!big,
+ \c!spaceafter=\v!big,
+ \c!sidespacebefore=\rootfloatparameter\c!spacebefore,
+ \c!sidespaceafter=\rootfloatparameter\c!spaceafter,
+ \c!sidespaceinbetween=\rootfloatparameter\c!spacebefore,
+ \c!spacebeforeside=, % extra, not part of, can be used to add whitespace before text
+ \c!spaceafterside=, % idem
+ \c!sidealign=\v!normal,
+ \c!textmethod=\ifgridsnapping2\else0\fi, % 0=raw 1=safe (.99pg) 2=tight (-1pt) % THIS WILL CHANGE
+ \c!sidemethod=\ifgridsnapping2\else1\fi, % 0=raw 1=safe (.99pg) 2=tight (-1pt) % THIS WILL CHANGE
+ \c!indentnext=\v!no,
+ \c!margin=\emwidth,
+ \c!method=1,
+ \c!cache=\v!yes, % when no, then intermediate flush
+ \c!leftmargin=\zeropoint, % displacement in 'normal floats'
+ \c!rightmargin=\zeropoint, % idem
+ \c!innermargin=\zeropoint, % idem
+ \c!outermargin=\zeropoint, % idem
+ \c!leftmargindistance=\zeropoint,
+ \c!rightmargindistance=\floatparameter\c!leftmargindistance,
+ \c!step=\v!small, % the flush side float step (big, medium, small : always depth)
+ \c!ntop=2,
+ \c!nbottom=0,
+ \c!nlines=4, % used?
+ \c!topoffset=\zeropoint,
+ \c!bottomoffset=\zeropoint,
+ \c!freeregion=\v!yes,
+ %\c!local=,
+ %\c!bottombefore=, % e.g. \vfill
+ %\c!bottomafter=,
+ %\c!default=, % default location
+ \c!sidethreshold=.5\strutdp, % set to "old" to check with old method
+ \c!numbering=\v!yes,
+ \c!compress=\v!yes, % when possible pack floats when flushing
+ \c!compressdistance=\emwidth]
+
+\setupfloatframed
+ [\c!frame=\v!off,
+ \c!offset=\v!overlay,
+ \c!strut=\v!no]
+
+\appendtoks
+ \doifelse{\floatparameter\c!compress}\v!yes\settrue\setfalse\c_page_floats_pack_flushed
+ \d_page_floats_compress_distance\floatparameter\c!compressdistance\relax
+\to \everysetupfloat
+
+\mutable\let\currentfloatattribute \empty
+\mutable\let\currentfloatcounter \empty
+\mutable\let\currentfloatgroup \empty
+\mutable\let\currentfloatnumber \empty
+\mutable\let\currentfloatsynchronize\empty
+
+\let\m_strc_floats_previous_number \empty % we can also just push/pop
+
+%D We need to do it again here:
+
+\setupfloat
+ [\c!compress=\v!yes, % when possible pack floats when flushing
+ \c!compressdistance=\emwidth]
+
+%D Individial settings:
+
+\installcounterassociation{floatcaption}
+
+\appendtoks
+ \let\currentfloat\currentfloatcaption % ?
+ \synchronizefloatcaptioncounters
+\to \everysetupfloatcaption
+
+\appendtoks
+ \let\currentfloat\currentfloatcaption % ?
+ \synchronizefloatcaptioncounters
+\to \everydefinefloatcaption
+
+%D Definitions:
+
+\let\strc_floats_define_saved\definefloat
+
+\permanent\tolerant\protected\overloaded\def\definefloat[#1]#*[#2]#*[#3]% name+plural+parent | name+parent+settings
+ {\ifarguments\or
+ \strc_floats_define_c[#1][#1]%
+ \or
+ \doifelsecommandhandler\??float{#2}%
+ {\strc_floats_define_a[#1][#1][#2]}%
+ {\strc_floats_define_c[#1][#2]}%
+ \orelse\ifhastok={#3}%
+ \strc_floats_define_b[#1][#2][#3]%
+ \else
+ \strc_floats_define_a[#1][#2][#3]%
+ \fi}
+
+\def\strc_floats_define_a[#1][#2][#3]% name names parent
+ {\definefloatcaption[#1][#3]%
+ \definefloatframed[#1][#3]%
+ \definecounter[#1][#3]%
+ \definelist[#1][#3]%
+ \copylabeltext[#1=#3]%
+ \strc_floats_define_saved[#1][#3]%
+ \strc_floats_define_commands{#1}{#2}}
+
+\def\strc_floats_define_b[#1][#2][#3]% name parent settings
+ {\definefloatcaption[#1][#2]%
+ \definefloatframed[#1][#2]%
+ \definecounter[#1][#2]%
+ \definelist[#1][#2]%
+ \copylabeltext[#1=#2]%
+ \strc_floats_define_saved[#1][#2][#3]%
+ \strc_floats_define_commands{#1}{#1}}
+
+\def\strc_floats_define_c[#1][#2]% name names
+ {\registerfloatcaptioncounter{#1}%
+ \definefloatcaption[#1]%
+ \definefloatframed[#1]%
+ \definecounter[#1]%
+ \definelist[#1]%
+ \presetlabeltext[#1=\Word{#1}~]%
+ \presetheadtext[#2=\Word{#2}]%
+ \strc_floats_define_saved[#1]%
+ \strc_floats_define_commands{#1}{#2}}
+
+\def\strc_floats_define_commands#1#2%
+ {\frozen\instance\setuevalue{\e!place\e!listof#2}{\strc_lists_place[#1]}% call will change
+ \frozen\instance\setuevalue{\e!complete\e!listof#2}{\strc_lists_complete[#1][#2]}% call will change
+ \frozen\instance\setuevalue{\e!place#1}{\placefloat[#1]}%
+ \frozen\instance\setuevalue{\e!start\e!place#1}{\startplacefloat[#1]}%
+ \frozen\instance\setuevalue{\e!stop\e!place#1}{\stopplacefloat}%
+ \frozen\instance\setuevalue{\e!start#1\e!text}{\strc_floats_start_text[#1]}%
+ \frozen\instance\setuevalue{\e!stop#1\e!text}{\strc_floats_stop_text}%
+ % these will become obsolete:
+ \frozen\instance\setuevalue{\e!reserve#1}{\strc_floats_reserve[#1]}%
+ \frozen\instance\setuevalue{\e!start\e!reserve#1\e!text}{\strc_floats_start_reserve_text[#1]}%
+ \frozen\instance\setuevalue{\e!stop\e!reserve#1\e!text}{\strc_floats_stop_reserve_text}}
+
+%D Fallback float body:
+
+\protected\def\strc_floats_place_empty_box % \inheritedfloatframed
+ {\framed
+ [\c!frame=\v!on,
+ \c!width=\rootfloatparameter\c!width,
+ \c!height=\rootfloatparameter\c!height,
+ \c!location=\v!normal,
+ \c!offset=\rootfloatparameter\c!offset]%
+ {\getmessage\m!floatblocks{12}\empty}}
+
+%D Data. We can generalize this to lists.
+
+\newif\ifnofloatcaption
+\newif\ifnofloatnumber
+\newif\ifemptyfloatcaption
+
+\installstructurelistprocessor\s!float{\usestructurelistprocessor{number+title}}
+
+\permanent\protected\def\thecurrentfloatnumbersuffix
+ {\doifsomething{\floatcaptionparameter\c!suffix}
+ {\floatcaptionparameter\c!suffixseparator
+ \floatcaptionparameter\c!suffix
+ \floatcaptionparameter\c!suffixstopper}}
+
+\permanent\protected\def\thecurrentfloatnumber
+ {\ifnofloatcaption \orelse \ifnofloatnumber \orelse \ifrelax\currentfloatnumber \else
+ \namedtaggedlabeltexts
+ \t!floatlabel \currentfloat
+ \t!floatnumber\currentfloat
+ {\begstrut
+ \floatcaptionparameter\c!numbercommand
+ {\clf_savedlistprefixednumber{\currentfloat}\currentfloatnumber\relax
+ \thecurrentfloatnumbersuffix}%
+ \endstrut}%
+ \fi}
+
+\permanent\protected\def\thecurrentfloatcaption
+ {\ifnofloatcaption \orelse \ifemptyfloatcaption \orelse \ifrelax\currentfloatnumber \else
+ \dostarttagged\t!floattext\empty
+ \begstrut
+ \floatcaptionparameter\c!textcommand
+ {\clf_savedlisttitle{\currentfloat}\numexpr\currentfloatnumber\relax}%
+ \endstrut
+ \dostoptagged
+ \fi}
+
+%D Captions.
+
+\mutable\let\floatcaptionarrangement\empty
+\mutable\let\floatcaptionattribute \empty
+\mutable\let\floatcaptiondirectives \empty
+\mutable\let\floatcaptionlocation \empty
+\mutable\let\floatcaptionnumber \empty
+\mutable\let\floatcaptionsuffix \empty
+
+% For a while these were placeholders:
+%
+%D \starttyping
+%D \protected\def\placefloatcaption{\dodoubleempty\strc_floats_place_caption}
+%D \protected\def\setfloatcaption {\dodoubleempty\strc_floats_set_caption}
+%D
+%D \def\strc_floats_place_caption[#tag][#reference]#caption{[not supported]}
+%D \def\strc_floats_set_caption [#tag][#reference]#caption{[not supported]}
+%D
+%D \protected\def\placefloatcaptiontext [#tag]{[not suported yet]}
+%D \protected\def\placefloatcaptionnumber [#tag]{[not suported yet]}
+%D \protected\def\placefloatcaptionreference[#tag]{[not suported yet]}
+%D \stoptyping
+%D
+%D because in \MKII\ we had:
+%D
+%D \starttyping
+%D \let\placefloatlabel \placefloatcaption
+%D \let\placefloatlabeltext \placefloatcaptiontext
+%D \let\placefloatlabelreference\placefloatcaptionreference
+%D \stoptyping
+%D
+%D But as it was never advertised we don't provide it in \MKIV. However, at some
+%D point HvdM wanted this:
+%D
+%D \starttyping
+%D \placefigure {labeltext-1} {\externalfigure[figure-1]}
+%D \placefloatcaption[figure][title={labeltext-2}] \externalfigure[figure-2]
+%D \placefigure {labeltext-3} {\externalfigure[figure-3]}
+%D \stoptyping
+%D
+%D So there you have it:
+
+\permanent\tolerant\protected\def\placefloatcaption[#category]#spacer[#settings]#spacer[#userdata]%
+ {\ifarguments\or\else % >= 2
+ % we need at least a category and title
+ \dontleavehmode
+ \bgroup
+ \edef\currentfloat{#category}%
+ \let\currentfloatcaption\currentfloat
+ \resetfloatcaptionparameter\c!reference
+ \resetfloatcaptionparameter\c!title
+ \resetfloatcaptionparameter\c!marking
+ \resetfloatcaptionparameter\c!list
+ \resetfloatcaptionparameter\c!bookmark
+ \resetfloatcaptionparameter\c!referencetext
+ \setupcurrentfloatcaption[#settings]%
+ \edef\currentfloatcounter{\namedcounterparameter\currentfloat\s!name}%
+ \iftrialtypesetting\strc_counters_save\currentfloatcounter\fi
+ \strc_counters_increment\currentfloatcounter
+ \strc_counters_register_component
+ \s!float
+ \setupcurrentfloatcaption
+ \floatcaptionparameter
+ \detokenizedfloatcaptionparameter
+ \relax
+ \relax
+ \relax
+ [\s!name=\currentfloat,
+ \s!counter=\currentfloatcounter,%
+ \s!hascaption=\v!yes,%
+ \s!hasnumber=\v!yes,%
+ \s!hastitle=\v!yes]%
+ [#userdata]%
+ \glet\m_strc_floats_previous_number\m_strc_counters_last_registered_index
+ \glet\currentfloatnumber \m_strc_counters_last_registered_index
+ \glet\currentfloatattribute \m_strc_counters_last_registered_attribute
+ \glet\currentfloatsynchronize \m_strc_counters_last_registered_synchronize
+ %
+ % \iflocation
+ % \c_attr_destination\currentfloatattribute\relax
+ % \fi
+ \currentfloatsynchronize
+ \strc_floats_make_complete_caption
+ %
+ \iftrialtypesetting\strc_counters_restore\currentfloatcounter\fi
+ \egroup
+ \fi}
+
+\newbox \b_strc_floats_caption
+\newbox \b_strc_floats_content
+\newdimen\d_strc_floats_caption_height
+\newdimen\d_strc_floats_caption_depth
+
+\let\m_strc_floats_last_caption_tag\empty
+
+\def\strc_floats_make_complete_caption
+ {\doifsomething{\floatcaptionparameter\c!spacebefore}{\blank[\floatcaptionparameter\c!spacebefore]}%
+ \strc_floats_make_complete_caption_before
+ \synchronizedisplaydirection % temp hack, till we have a proper model
+ \noindent
+ \gdef\m_strc_floats_last_caption_tag{\strut\thecurrentfloatnumber}% was xdef ... needs checking
+ \begingroup
+ \ifnofloatcaption
+ \global\d_strc_floats_caption_height\zeropoint
+ \global\d_strc_floats_caption_depth \zeropoint
+ \else
+ \usefloatcaptionstyleandcolor\c!style\c!color
+ \clf_doifelselisthastitle{\currentfloat}\numexpr\currentfloatnumber\relax
+ \donothing
+ \emptyfloatcaptiontrue
+ \ifnofloatnumber \orelse \ifnofloatcaption \else
+ \ifemptyfloatcaption
+ \hbox{\usefloatcaptionstyleandcolor\c!headstyle\c!headcolor\thecurrentfloatnumber}%
+ \else
+ \doifelsenothing{\floatcaptionparameter\c!spaceinbetween}
+ {\scratchskip\floatcaptionparameter\c!distance\relax
+ \setbox\scratchbox\hbox
+ {\usefloatcaptionstyleandcolor\c!headstyle\c!headcolor
+ \thecurrentfloatnumber
+ \floatcaptionparameter\c!headseparator
+ \dotfskip\scratchskip}%
+ \doifelse{\floatcaptionparameter\c!hang}\v!yes
+ {\leftskip\wd\scratchbox
+ \llap{\box\scratchbox}}
+ {\unhbox\scratchbox}%
+ \emergencystretch.5\scratchskip}
+ {\hbox{\usefloatcaptionstyleandcolor\c!headstyle\c!headcolor\thecurrentfloatnumber}%
+ \blank[\floatcaptionparameter\c!spaceinbetween]}%
+ \fi
+ \fi
+ \usefloatcaptionstyleandcolor\c!textstyle\c!textcolor
+ \global\d_strc_floats_caption_height\strutheight
+ \global\d_strc_floats_caption_depth \strutdepth
+ \thecurrentfloatcaption\endgraf
+ \fi
+ \endgroup
+ \strc_floats_make_complete_caption_after
+ \doifsomething{\floatcaptionparameter\c!spaceafter}{\blank[\floatcaptionparameter\c!spaceafter]}}
+
+%let\strc_floats_make_complete_caption_before\relax
+\let\strc_floats_make_complete_caption_after \relax
+
+\def\strc_floats_make_complete_caption_before
+ {\doifelseframed\floatcaptionparameter\strc_floats_make_complete_caption_before_indeed\relax}
+
+\def\strc_floats_make_complete_caption_before_indeed
+ {\edef\m_strc_align{\floatcaptionparameter\c!align}%
+ \edef\m_strc_strut{\floatcaptionparameter\c!strut}%
+ \letfloatcaptionparameter\c!align\v!normal
+ \letfloatcaptionparameter\c!strut\v!no
+ \inheritedfloatcaptionframed
+ \bgroup
+ \letfloatcaptionparameter\c!align\m_strc_align
+ \letfloatcaptionparameter\c!strut\m_strc_strut
+ \let\strc_floats_make_complete_caption_after\egroup}
+
+% \definefloat [figure-1] [figure]
+% \definefloat [figure-2] [figure]
+% \setupfloat [figure-1] [location=left,leftmargin=10mm]
+% \setupfloat [figure-2] [location=left,leftmargin=-5mm]
+% \setupcaption [figure-1] [align=flushleft]
+% \setupcaption [figure-2] [align=flushleft,leftmargin=15mm]
+%
+% \startsetups somefigure
+% \ifdim\wd\nextbox>\textwidth
+% \placefloat[figure-2][][]{}{\box\nextbox}
+% \else
+% \placefloat[figure-1][][]{}{\box\nextbox}
+% \fi
+% \stopsetups
+%
+% \protected\def\setupswithbox[#1]{\dowithnextbox{\setups[#1]}\vbox}
+%
+% test \setupswithbox[somefigure]{\framed[width=3cm] {}} test
+% test \setupswithbox[somefigure]{\framed[width=\dimexpr\textwidth+3cm\relax]{}} test
+
+% temporary removed ... was not applied systematically
+%
+% \def\dosetcaptionthings
+% {\usesetupsparameter\floatcaptionparameter}
+
+\def\strc_floats_check_caption_content
+ {\ifnofloatcaption\else
+ \setbox\b_strc_floats_caption\hbox
+ {\settrialtypesetting
+ \notesenabledfalse
+ \strc_floats_make_complete_caption}%
+ % new, \placefigure{\xmlfirst{#1}{somecaption}}{} passes earlier empty check
+ % so here we misuse the scratch box; actually this means that the previous
+ % test can go away (some day, when i redo this module)
+ \ifzeropt\wd\b_strc_floats_caption
+ \global\emptyfloatcaptiontrue
+ \ifnofloatnumber
+ \global\nofloatcaptiontrue
+ \fi
+ \else
+ \global\emptyfloatcaptionfalse
+ \setbox\b_strc_floats_caption\hpack{\hskip\leftskip\box\b_strc_floats_caption}%
+ \fi
+ \fi}
+
+%D We can do this ...
+%D
+%D \starttyping
+%D \newcount\c_strc_floats_n
+%D
+%D \definedataset[\s!float][\c!delay=\v!yes]
+%D
+%D \let\strc_float_realpage\realpageno
+%D
+%D \def\strc_float_save_data
+%D {\setdataset[\s!float][\number\c_strc_floats_n][]}
+%D
+%D \def\strc_float_load_data % precedes save !
+%D {\global\advance\c_strc_floats_n\plusone
+%D \xdef\strc_float_realpage{\datasetvariable\s!float{\number\c_strc_floats_n}\s!page}%
+%D \ifempty\strc_float_realpage
+%D \glet\strc_float_realpage\realpageno % \realfolio
+%D \fi}
+%D \stoptyping
+%D
+%D ... but this is more efficient:
+
+\definepagestate[\s!float][\c!delay=\v!yes]
+
+\newcount\c_strc_floats_n
+
+\let\strc_float_realpage\realpageno
+
+\def\strc_float_save_data
+ {\setpagestate[\s!float][\number\c_strc_floats_n]}
+
+\def\strc_float_load_data % precedes save !
+ {\global\advance\c_strc_floats_n\plusone
+ \xdef\strc_float_realpage{\pagestaterealpage\s!float{\number\c_strc_floats_n}}%
+ \ifempty\strc_float_realpage
+ \glet\strc_float_realpage\realpageno % \realfolio
+ \fi}
+
+%D test case:
+%D
+%D \starttyping
+%D \setupfloat[figure][criterium=\marginwidth,fallback=bottom]
+%D \dorecurse{3}{
+%D \chapter{test}
+%D \placefigure[bottom]{1}{\framed{bottom}}
+%D test
+%D \placetable[bottom]{1}{\framed{table}}
+%D test
+%D \placetable{2}{\framed{table}}
+%D test
+%D \placefigure[left]{2}{\framed{left but way too wide}}
+%D \input tufte
+%D \placefigure[left]{3}{\framed{left but ok}}
+%D \input tufte }
+%D \stoptyping
+
+% A complication is that we may have to handle a pagebreak first, which in turn may
+% issue a (postponed) float. Therefore we may not trust on variable assignments
+% before we're really dealing with the float. Some day I'll root out the global
+% settings.
+
+\aliased\let\lastplacedfloat\empty
+
+\def\strc_floats_set_current_tag#tag%
+ {\edef\currentfloat{#tag}%
+ \ifempty\currentfloat
+ \let\currentfloat\v!figure % a bit of a hack
+ \fi
+ \doifelsecommandhandler\??float\currentfloat
+ \donothing
+ {\writestatus\m!floatblocks{unknown float type '\currentfloat'}%
+ \let\currentfloat\v!figure}% also a hack
+ \enforced\glet\lastplacedfloat\currentfloat
+ \let\m_strc_floats_saved_userdata\empty
+ \let\currentfloatcaption\currentfloat}
+
+\mutable\let\askedfloatmethod \empty
+\mutable\let\askedfloatoptions\empty
+
+\def\strc_floats_reset_variables
+ {\global\emptyfloatcaptionfalse
+ \global\nofloatcaptionfalse
+ \global\nofloatnumberfalse
+ \glet\askedfloatmethod \empty
+ \glet\askedfloatoptions\empty}
+
+% place
+
+\mutable\let\floatlabel \empty
+\mutable\let\floatcolumn \empty
+\mutable\let\floatrow \empty
+\mutable\let\floatlocation \empty
+\mutable\let\floatlocationmethod\empty
+
+\def\strc_floats_analyze_location
+ {% more will be moved here
+ \let\floatlabel \empty
+ \let\floatcolumn\empty
+ \let\floatrow \empty
+ %
+ \edef\floatcaptionlocation{\floatcaptionparameter\c!location}%
+ %
+ \setfloatmethodvariables\floatlocation}
+
+\newtoks\c_floats_every_table_float
+
+\appendtoks
+ \edef\floatlocation{\v!force,\v!always,\floatlocation}%
+ \setupfloat[\c!spacebefore=\v!none,\c!spaceafter=\v!none]%
+\to \c_floats_every_table_float
+
+\ifdefined\dotagregisterfloat \else \aliased\let\dotagregisterfloat\gobbletwoarguments \fi
+
+\tolerant\def\strc_floats_place[#tag]#spacer[#location]#spacer[#reference]#:#caption%
+ {\strc_floats_set_current_tag{#tag}%
+ \strc_floats_reset_variables
+ \xdef\askedfloatoptions{#location}%
+ \edef\floatlocation{#location}%
+ \ifempty\floatlocation
+ \edef\floatlocation{\floatparameter\c!default}% beware of a clash between alignment locations
+ \fi
+ \ifintable
+ \the\c_floats_every_table_float
+ \fi
+ \strc_floats_analyze_location
+ % todo: use \lets
+ \setupcurrentfloatcaption[\c!reference={#reference},\c!title={#caption},\c!marking=,\c!list=,\c!bookmark=,\c!referencetext=]%
+ \doifelseinset\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal}
+
+\permanent\protected\def\placefloat
+ {\flushnotes
+ \page_otr_command_flush_side_floats % here !
+ \strc_floats_begin_group
+ \strc_floats_place}
+
+% start-stop
+
+% \startplacefigure[title=oeps][subtitle=whatever]
+% \framed[width=10cm,height=5cm]{\floatuserdataparameter{subtitle}}
+% \stopplacefigure
+
+\installcorenamespace{floatuserdata}
+
+\installsetuponlycommandhandler \??floatuserdata {floatuserdata}
+
+\let\m_strc_floats_saved_userdata\empty % todo: reset this in non start|stop cases
+
+%D We abuse the settings to pick up some float parameters too which makes it
+%D messy.
+
+\permanent\tolerant\protected\def\startplacefloat[#tag]#spacer[#settings]#spacer[#userdata]%
+ {\flushnotes
+ \page_otr_command_flush_side_floats % here !
+ \strc_floats_begin_group
+ \strc_floats_set_current_tag{#tag}%
+ \strc_floats_reset_variables
+ % save
+ \edef\m_location {\floatcaptionparameter\c!location}%
+ \edef\m_topoffset {\floatcaptionparameter\c!topoffset}%
+ \edef\m_bottomoffset{\floatcaptionparameter\c!bottomoffset}%
+ \edef\m_freeregion {\floatcaptionparameter\c!freeregion}%
+ % preset
+ \resetfloatcaptionparameter \c!location
+ \setexpandedfloatcaptionparameter\c!topoffset {\floatparameter\c!topoffset}%
+ \setexpandedfloatcaptionparameter\c!bottomoffset{\floatparameter\c!bottomoffset}%
+ \setexpandedfloatcaptionparameter\c!freeregion {\floatparameter\c!freeregion}%
+ \resetfloatcaptionparameter \c!reference
+ \resetfloatcaptionparameter \c!title
+ \resetfloatcaptionparameter \c!marking
+ \resetfloatcaptionparameter \c!list
+ \resetfloatcaptionparameter \c!bookmark
+ \resetfloatcaptionparameter \c!referencetext
+ % pickup
+ \ifparameter#settings\or
+ \setupcurrentfloatcaption[#settings]%
+ \fi
+ \ifparameter#userdata\or
+ \setupcurrentfloatuserdata[#userdata]%
+ \def\m_strc_floats_saved_userdata{#userdata}%
+ \else
+ \let\m_strc_floats_saved_userdata\empty
+ \fi
+ % check
+ \edef\floatlocation{\floatcaptionparameter\c!location}%
+ \ifempty\floatlocation
+ \edef\floatlocation{\floatparameter\c!default}%
+ \fi
+ % inherit
+ \setexpandedfloatparameter\c!topoffset {\floatcaptionparameter\c!topoffset}%
+ \setexpandedfloatparameter\c!bottomoffset{\floatcaptionparameter\c!bottomoffset}%
+ \setexpandedfloatparameter\c!freeregion {\floatcaptionparameter\c!freeregion}%
+ % restore
+ \letfloatcaptionparameter\c!location \m_location
+ \letfloatcaptionparameter\c!topoffset \m_topoffset
+ \letfloatcaptionparameter\c!bottomoffset\m_bottomoffset
+ \letfloatcaptionparameter\c!freeregion \m_freeregion
+ %
+ \strc_floats_analyze_location
+ \doifelseinset\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal
+ \bgroup
+ \ignorespaces}
+
+\permanent\protected\def\stopplacefloat
+ {\removeunwantedspaces
+ \egroup}
+
+% reserve
+
+\protected\def\strc_floats_reserve
+ {\flushnotes
+ \page_otr_command_flush_side_floats % here !
+ \strc_floats_begin_group
+ \strc_floats_place}
+
+\def\strc_floats_reserve_box#settings%
+ {\begingroup
+ \setupcurrentfloat[\c!frame=\v!on,#settings]%
+ \inheritedfloatframed{}%
+ \endgroup}
+
+% text
+
+\protected\def\strc_floats_start_text
+ {\flushnotes % Here indeed?
+ \page_otr_command_flush_side_floats % Here indeed?
+ \strc_floats_begin_text_group
+ \strc_floats_start_text_indeed}
+
+\tolerant\protected\def\strc_floats_start_text_indeed[#tag]#spacer[#location]#spacer[#reference]%
+ {\strc_floats_place[#tag][\v!text,#location,\v!left][#reference]}
+
+\protected\def\strc_floats_stop_text
+ {\strc_floats_stop_text_indeed}
+
+% reserved text
+
+\tolerant\protected\def\strc_floats_start_reserve_text[#tag]#spacer[#settings]#spacer[#location]#spacer[#reference]#:#caption%%
+ {\flushnotes
+ \page_otr_command_flush_side_floats
+ \strc_floats_begin_text_group
+ \strc_floats_place[#tag][\v!text,#location,\v!left][#reference]{#caption}{\strc_floats_reserve_box{#settings}}}
+
+\protected\def\strc_floats_stop_reserve_text
+ {\strc_floats_stop_text_indeed}
+
+% special hack
+
+\def\strc_floats_begin_group {\begingroup}
+\def\strc_floats_end_group {\carryoverpar\endgroup} % hm
+\def\strc_floats_end_split_group {\endgroup}
+\def\strc_floats_begin_text_group{\begingroup\let\strc_floats_end_group\relax}
+\def\strc_floats_end_text_group {\endgroup}
+
+% implementation
+
+%setnewconstant\c_page_one_float_method \zerocount % 0=raw 1=safe (.99) 2=tight (-1pt) / belongs in page-one
+\setnewconstant\c_strc_floats_rotation \zerocount % 0 90 180 270
+\newconditional\c_strc_floats_par_float
+
+\ifdefined\page_margin_strc_floats_before \else \let\page_margin_strc_floats_before \relax \fi
+\ifdefined\page_margin_strc_floats_set_hsize \else \let\page_margin_strc_floats_set_hsize\relax \fi
+
+\immutable\def\flushfloatslist
+ {\v!left,\v!right,\v!inner,\v!outer,%
+ \v!backspace,\v!cutspace,%
+ \v!inleft,\v!inright,\v!inmargin,%
+ \v!leftmargin,\v!rightmargin,\v!leftedge,\v!rightedge,%
+ \v!innermargin,\v!outermargin,\v!inneredge,\v!outeredge,%
+ \v!text,\v!opposite}% \v!page
+
+\protected\def\strc_floats_place_next_box_split
+ {\let\splitfloatfinalizer\strc_floats_end_split_group
+ \let\strc_floats_end_group\relax
+ \splitfloat{\strc_floats_place_next_box_normal}}
+
+\protected\def\strc_floats_place_next_box_normal
+ {\ifconditional\c_page_floats_some_waiting
+ % this was \checkwaitingfloats spread all over
+ \doifelseinset\v!always\floatlocation
+ {\showmessage\m!floatblocks5\empty}
+ {\doifelsecommon\floatlocation\flushfloatslist\page_otr_command_flush_floats\donothing}%
+ % but which should be done before using box \floatbox
+ \fi
+ \page_margin_strc_floats_before % todo: each float handler gets a before
+ \global\insidefloattrue
+ \dostarttaggedchained\t!float\currentfloat\??float
+ \page_margin_strc_floats_set_hsize % todo: each float handler gets a set_hsize
+ \the\everyinsidefloat
+ \strc_floats_analyze_variables_one
+ \dostarttagged\t!floatcontent\empty
+ \dowithnextboxcontent
+ {\strc_floats_set_local_hsize
+ \floatparameter\c!inner
+ \postponenotes} % new
+ {\page_postprocessors_linenumbers_box\nextbox % for aditya
+ \dostoptagged
+ \strc_floats_finish_placement}
+ \vbox}
+
+%D \starttyping
+%D \definefloat
+%D [one] [figure]
+%D [default=right,
+%D rightmargindistance=-20cm,
+%D criterium=129pt,
+%D fallback=rightmargin]
+%D
+%D \definefloat
+%D [two] [figure]
+%D [default=right,
+%D rightmargindistance=-20cm,
+%D criterium=129pt,
+%D fallback=three]
+%D
+%D \definefloat
+%D [three] [figure]
+%D [default=rightmargin,
+%D rightmargindistance=0cm]
+%D
+%D \placefloat[one]{}{\blackrule[width=30pt]} \samplefile{tufte}
+%D \placefloat[one]{}{\blackrule[width=60pt]} \samplefile{tufte}
+%D \placefloat[one]{}{\blackrule[width=90pt]} \samplefile{tufte}
+%D \placefloat[one]{}{\blackrule[width=130pt]} \samplefile{tufte}
+%D \placefloat[two]{}{\blackrule[width=130pt]} \samplefile{tufte}
+%D \stoptyping
+
+\def\strc_floats_finish_placement
+ {\doifsomething{\floatparameter\c!criterium}
+ {\ifdim\wd\nextbox>\floatparameter\c!criterium\relax
+ \edef\forcedfloatmethod{\floatparameter\c!fallback}%
+ \ifempty\forcedfloatmethod \else
+ \doifelsecommandhandler\??float\forcedfloatmethod
+ {\let\currentfloat\forcedfloatmethod
+ \edef\floatlocation{\floatparameter\c!default}%
+ \let\forcedfloatmethod\floatlocation}
+ \donothing
+ \fi
+ \ifempty\forcedfloatmethod
+ \let\forcedfloatmethod\v!here
+ \fi
+ \fi}%
+ \strc_floats_check_extra_actions
+ \strc_floats_analyze_variables_two
+ \strc_floats_place_packaged_boxes
+ \dotagregisterfloat\askedfloatoptions\askedfloatmethod
+ \dostoptagged % tricky .... needs checking
+ % we need to carry over the par because of side floats
+ \global\d_page_sides_downshift \zeropoint
+ \global\d_page_sides_extrashift\zeropoint
+ \ifconditional\c_strc_floats_par_float
+ \doifinset\v!reset\floatlocation\page_sides_forget_floats
+ \doinhibitblank
+ \fi
+ \strc_floats_end_group}
+
+% nicer is a bunch of states and one loop that sets those states
+
+\newdimen\d_strc_floats_top
+\newdimen\d_strc_floats_bottom
+\newdimen\d_strc_floats_overflow
+
+% \def\strc_floats_calculate_skip#target#skip%
+% {\begingroup
+% \edef\askedfloatskip{\rootfloatparameter#skip}%
+% \ifempty\askedfloatskip
+% \global#target\zeropoint
+% \orelse\ifx\askedfloatskip\v!none
+% \global#target\zeropoint
+% \else
+% \setbox\scratchbox\vbox{\whitespace\blank[\askedfloatskip]}% todo: move whitespace inside blank
+% \global#target\ht\scratchbox
+% \fi
+% \endgroup}
+
+\def\strc_floats_calculate_skip#target#skip%
+ {\begingroup
+ \edef\p_blank{\rootfloatparameter#skip}%
+ \ifx\p_blank\v!nowhite
+ \edef\p_blank{-\v!white}%
+ \fi
+ \prerollblank[\p_blank]%
+ \global#target\prerolledblank
+ \endgroup}
+
+\def\strc_floats_analyze_variables_two
+ {\ifinsidecolumns
+ \global\setfalse\c_strc_floats_par_float
+ \else
+ \doifelsecommon\floatlocation\flushfloatslist
+ {\global\settrue \c_strc_floats_par_float}%
+ {\global\setfalse\c_strc_floats_par_float}%
+ \fi
+ % variable initializations
+ \global\d_page_sides_shift \zeropoint
+ \global\d_page_sides_maximum \zeropoint
+ \global\c_page_sides_align \zerocount
+ \global\c_page_sides_tolerance \zerocount
+ \global\c_page_sides_skipmode \zerocount
+ \global\c_strc_floats_rotation \zerocount
+ \global\d_page_sides_margin \floatparameter\c!margin
+ \global\d_page_sides_leftshift \floatparameter\c!leftmargindistance
+ \global\d_page_sides_rightshift \floatparameter\c!rightmargindistance
+ \global\d_page_sides_topoffset \floatparameter\c!topoffset
+ \global\d_page_sides_bottomoffset\floatparameter\c!bottomoffset
+ \global\c_page_sides_method \floatparameter\c!sidemethod
+ \global\c_page_one_float_method \floatparameter\c!textmethod
+ \global\c_page_floats_n_of_top \rootfloatparameter\c!ntop
+ \global\c_page_floats_n_of_bottom\rootfloatparameter\c!nbottom
+ \global\d_strc_floats_overflow \zeropoint
+ \ifconditional\c_strc_floats_par_float
+ \global\d_strc_floats_top \zeropoint
+ \global\d_strc_floats_bottom \zeropoint
+ \strc_floats_calculate_skip\d_page_sides_topskip \c!sidespacebefore
+ \strc_floats_calculate_skip\d_page_sides_bottomskip\c!sidespaceafter
+ \strc_floats_calculate_skip\d_page_sides_midskip \c!sidespaceinbetween
+ \strc_floats_calculate_skip\d_strc_floats_top \c!spacebeforeside
+ \strc_floats_calculate_skip\d_strc_floats_bottom \c!spaceafterside
+ \else
+ \global\d_page_sides_topskip \zeropoint
+ \global\d_page_sides_bottomskip \zeropoint
+ \strc_floats_calculate_skip\d_strc_floats_top \c!spacebefore
+ \strc_floats_calculate_skip\d_strc_floats_bottom\c!spaceafter
+ \fi
+ % keyword handling
+ \ifconditional\c_strc_floats_par_float
+ \processaction
+ [\floatparameter\c!sidealign]
+ [\v!height=>\global\c_page_sides_align\plusone ,%
+ \v!line=>\global\c_page_sides_align\plustwo ,% (***)
+ \v!depth=>\global\c_page_sides_align\plusthree,%
+ \v!grid=>\global\c_page_sides_align\plusfour ,%
+ \v!halfline=>\global\c_page_sides_align\plusfive ]%
+ \ifcase\c_page_sides_align\relax % todo: optie v!lokaal => \else
+ \doifinset\v!height \floatlocation{\global\c_page_sides_align\plusone }%
+ \doifinset\v!line \floatlocation{\global\c_page_sides_align\plustwo }%
+ \doifinset\v!depth \floatlocation{\global\c_page_sides_align\plusthree}%
+ \doifinset\v!grid \floatlocation{\global\c_page_sides_align\plusfour }%
+ \doifinset\v!halfline\floatlocation{\global\c_page_sides_align\plusfive }% meant for 'none'
+ \fi
+ \doifinset\v!high \floatlocation{\global\c_page_sides_skipmode \plusone }%
+ \doifinset\v!low \floatlocation{\global\c_page_sides_skipmode \plustwo }%
+ \doifinset\v!fit \floatlocation{\global\c_page_sides_skipmode \plusthree}%
+ \doifinset\v!tolerant \floatlocation{\global\c_page_sides_tolerance\plusone }%
+ \doifinset\v!verytolerant\floatlocation{\global\c_page_sides_tolerance\plustwo }%
+ \else
+ \processallactionsinset
+ [\floatlocation]%
+ [ 90=>\global\c_strc_floats_rotation\commalistelement\relax,%
+ 180=>\global\c_strc_floats_rotation\commalistelement\relax,%
+ 270=>\global\c_strc_floats_rotation\commalistelement\relax]%
+ \fi
+ \doifelseinset\v!nonumber\floatlocation
+ {\global\nofloatnumbertrue}%
+ {\doifelse{\floatcaptionparameter\c!number}\v!yes
+ {\global\nofloatnumberfalse}%
+ {\global\nofloatnumbertrue}}%
+ \doifelseinset\v!none\floatlocation
+ {\global\nofloatcaptiontrue}%
+ {\global\nofloatcaptionfalse}%
+ \doif{\floatcaptionparameter\c!number}\v!none % new
+ {\global\nofloatcaptiontrue}%
+ \doifinset\v!effective\floatlocation
+ {\letfloatparameter \c!leftmargin \effectiveleftskip
+ \letfloatparameter \c!rightmargin\effectiverightskip
+ \letfloatcaptionparameter\c!leftmargin \effectiveleftskip
+ \letfloatcaptionparameter\c!rightmargin\effectiverightskip}%
+ \ifemptyfloatcaption \ifnofloatnumber
+ \global\nofloatcaptiontrue
+ \fi \fi}
+
+% documenteren in details
+
+\def\strc_floats_analyze_variables_one
+ {\doifelse{\floatparameter\c!local}\v!yes\settrue\setfalse\c_page_floats_center_box_global % fout keyword
+ \ifconditional\c_page_floats_center_box_global
+ \settrue\c_page_floats_center_box_local
+ \else
+ \doifelseinset\v!local\floatlocation\settrue\setfalse\c_page_floats_center_box_local
+ \fi
+ \doifelse{\floatparameter\c!freeregion}\v!yes
+ \settrue\setfalse\c_strc_floats_mark_as_free
+ \doifnotcommon{\v!always,\v!here,\v!force}\floatlocation % ! ! ! ! ! !
+ {\setfalse\c_page_floats_center_box_global
+ \setfalse\c_page_floats_center_box_local}}
+
+\permanent\def\naturalfloatheight{\the\naturalfloatwd}
+\permanent\def\naturalfloatwidth {\the\naturalfloatht}
+\permanent\def\naturalfloatdepth {\the\naturalfloatdp}
+
+\permanent\def\floatcaptionheight{\the\floatcaptionwd}
+\permanent\def\floatcaptionwidth {\the\floatcaptionht}
+\permanent\def\floatcaptiondepth {\the\floatcaptiondp}
+
+\newdimen\naturalfloatwd
+\newdimen\naturalfloatht
+\newdimen\naturalfloatdp
+
+\newdimen\floatcaptionwd
+\newdimen\floatcaptionht
+\newdimen\floatcaptiondp
+
+\def\strc_floats_set_natural_dimensions#box%
+ {\global\naturalfloatwd\wd#box\relax
+ \global\naturalfloatht\ht#box\relax
+ \global\naturalfloatdp\dp#box\relax}
+
+\def\strc_floats_set_caption_dimensions#box%
+ {\global\floatcaptionwd\wd#box\relax
+ \global\floatcaptionht\ht#box\relax
+ \global\floatcaptiondp\dp#box\relax}
+
+\permanent\def\doifelsemainfloatbody
+ {\unless\ifinsidesplitfloat
+ \expandafter\firstoftwoarguments
+ \orelse\ifconditional\splitfloatfirstdone
+ \expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
+ \fi}
+
+\aliased\let\doifmainfloatbodyelse\doifelsemainfloatbody
+
+% todo: optional user pars
+
+\def\floatcaptionattribute
+ {\iflocation
+ \ifempty\currentfloatattribute
+ % safeguard, can be samepage too
+ \orelse\ifnofloatcaption
+ \orelse\ifinsidesplitfloat
+ \ifconditional\splitfloatfirstdone
+ \else
+ attr \destinationattribute \currentfloatattribute
+ \fi
+ \else
+ attr \destinationattribute \currentfloatattribute
+ \fi
+ \fi}
+
+% \def\floatcaptionattribute
+% {\iflocation
+% \ifempty\currentfloatattribute
+% % safeguard, can be samepage too
+% \orelse\ifnofloatcaption
+% % nothing
+% \orunless\ifinsidesplitfloat
+% attr \destinationattribute \currentfloatattribute
+% \orunless\ifconditional\splitfloatfirstdone
+% attr \destinationattribute \currentfloatattribute
+% \fi
+% \fi}
+
+\newconditional\usesamefloatnumber
+
+% \startplacefigure[location=here,reference=first, title=first, group=alpha,groupsuffix=.a]
+% \externalfigure[dummy][height=2cm]
+% \stopplacefigure
+% \startplacefigure[location=here,reference=second,title=second,group=alpha,groupsuffix=.b]
+% \externalfigure[dummy][height=2cm]
+% \stopplacefigure
+%
+% uses:
+
+\def\strc_floats_group_index
+ {\numexpr\clf_listgroupindex{\currentfloat}{\currentfloatgroup}\relax}
+
+\def\strc_floats_place_packaged_boxes
+ {\expandafter\strc_floats_place_packaged_boxes_indeed\expandafter{\m_strc_floats_saved_userdata}}
+
+\def\strc_floats_place_packaged_boxes_indeed#userdata%
+ {\bgroup
+ \ifconditional\usesamefloatnumber
+ \glet\currentfloatnumber \m_strc_floats_previous_number
+ \glet\currentfloatattribute \empty
+ \glet\currentfloatsynchronize\relax
+ \else
+ \edef\currentfloatcounter{\namedcounterparameter\currentfloat\s!name}%
+ \edef\currentfloatgroup {\floatcaptionparameter\c!group}%
+ \ifnofloatnumber
+ \orelse\ifnofloatcaption
+ \orelse\ifempty\currentfloatgroup
+ % independent
+ \iftrialtypesetting\strc_counters_save\currentfloatcounter\fi
+ \strc_counters_increment\currentfloatcounter
+ \orelse\ifcase\strc_floats_group_index
+ % first in group
+ \iftrialtypesetting\strc_counters_save\currentfloatcounter\fi
+ \strc_counters_increment\currentfloatcounter
+ \else
+ % next in group
+ \fi
+ % *1* as an alternative we could set counter parameters here if needed
+ \strc_counters_register_component
+ \s!float
+ \setupcurrentfloatcaption
+ \floatcaptionparameter
+ \detokenizedfloatcaptionparameter
+ \relax
+ \relax
+ \relax
+ [\s!name=\currentfloat,% was c!name
+ \s!counter=\currentfloatcounter,%
+ \s!hascaption=\ifnofloatcaption \v!no\else\v!yes\fi,%
+ \s!hasnumber=\ifnofloatnumber \v!no\else\v!yes\fi,%
+ \s!hastitle=\ifemptyfloatcaption\v!no\else\v!yes\fi]%
+ [#userdata]%
+ \glet\m_strc_floats_previous_number\m_strc_counters_last_registered_index
+ \glet\currentfloatnumber \m_strc_counters_last_registered_index
+ \glet\currentfloatattribute \m_strc_counters_last_registered_attribute
+ \glet\currentfloatsynchronize \m_strc_counters_last_registered_synchronize
+ \fi
+ %
+ \iftrialtypesetting\else\global\setfalse\usesamefloatnumber\fi % one shot
+ % check float box
+ \strc_floats_set_natural_dimensions\nextbox
+ \global\setbox\floatbox\vbox{\floatparameter\c!command{\box\nextbox}}% can be anything so no pack
+ \strc_floats_set_natural_dimensions\floatbox
+ \ifzeropt\htdp\floatbox
+ \showmessage\m!floatblocks{11}\empty
+ \global\setbox\floatbox\vpack
+ {\dostarttagged\t!floatcontent\empty
+ \strc_floats_place_empty_box
+ \dostoptagged}%
+ \fi
+ % deal with lack of caption
+ \global\setbox\floatbox\vpack \floatcaptionattribute
+ {\doifelsemainfloatbody\currentfloatsynchronize\donothing
+ \unvbox\floatbox
+ \ifnofloatcaption
+ \vss
+ \fi}% gets rid of the depth (unless tabulate)
+ \iftrialtypesetting\strc_counters_restore\currentfloatcounter\fi
+ \egroup
+ % place the float
+ \strc_floats_set_box
+ \strc_floats_get_box
+ \global\insidefloatfalse}
+
+\newdimen\availablefloatwidth
+\newdimen\availablefloatheight
+
+\def\strc_floats_set_local_hsize
+ {\ifconditional\c_page_floats_center_box_local
+ % also available check here?
+ \seteffectivehsize
+ \hsize\localhsize
+ \else
+ \doifinset\v!margin\floatlocation % brr, really needed! see wm will be redone
+ {\hsize\namedmarginblockparameter\empty\c!width}%
+ \fi
+ \edef\p_availablewidth {\floatparameter\c!availablewidth }%
+ \edef\p_availableheight{\floatparameter\c!availableheight}%
+ \availablefloatwidth \ifempty\p_availablewidth \hsize\else\p_availablewidth \relax\fi
+ \availablefloatheight\ifempty\p_availableheight\vsize\else\p_availableheight\relax\fi}
+
+\ifdefined\everyinsidefloat \else \newevery \everyinsidefloat \relax \fi
+
+\appendtoks
+ \everyinsidefloat\emptytoks % in case it's called earlier
+ \strc_float_load_data
+\to \everyinsidefloat
+
+\permanent\def\doifelserightpagefloat
+ {\unless\ifdoublesided
+ \expandafter\firstoftwoarguments
+ \orelse\ifsinglesided
+ \expandafter\firstoftwoarguments
+ \orelse\ifodd\purenumber\strc_float_realpage\space
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\permanent\def\doifelseoddpagefloat
+ {\ifodd\purenumber\strc_float_realpage\space
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doifrightpagefloatelse\doifelserightpagefloat
+\aliased\let\doifoddpagefloatelse \doifelseoddpagefloat
+
+\appendtoks
+ \enforced\let\rightorleftpageaction\doifelserightpagefloat
+\to \everyinsidefloat
+
+% \let\movesidefloat\gobbleoneargument
+
+% new : \place...[leftmargin,-2*line]; we need to catch fxtb:2*3
+% watch out: line alone aligns on the line ! ! !
+
+\permanent\protected\def\movesidefloat[#settings]% (-)n*line|x=,y=
+ {\global\d_page_sides_downshift \zeropoint
+ \global\d_page_sides_extrashift\zeropoint
+ \ifhastok={#settings}%
+ \begingroup
+ \setupcurrentfloat[\c!x=\zeropoint,\c!y=\zeropoint,#settings]%
+ \ifgridsnapping
+ \getnoflines{\floatparameter\c!y}%
+ \global\d_page_sides_downshift\noflines\lineheight
+ \else
+ \global\d_page_sides_downshift\floatparameter\c!y
+ \fi
+ \global\d_page_sides_extrashift\floatparameter\c!x
+ \endgroup
+ \else
+ \movedownsidefloat[#settings]%
+ \fi}
+
+\installcorenamespace{floatmovement}
+
+\setvalue{\??floatmovement \v!line}{\strc_floats_move_down_line+}
+\setvalue{\??floatmovement+\v!line}{\strc_floats_move_down_line+}
+\setvalue{\??floatmovement-\v!line}{\strc_floats_move_down_line-}
+\setvalue{\??floatmovement \v!hang}{\strc_floats_move_down_hang\plusone}
+\setvalue{\??floatmovement+\v!hang}{\strc_floats_move_down_hang\plusone}
+\setvalue{\??floatmovement-\v!hang}{\strc_floats_move_down_hang\minusone}
+
+\setvalue{\??floatmovement-2*\v!line}{\strc_floats_move_down_line{-2}}
+\setvalue{\??floatmovement+2*\v!line}{\strc_floats_move_down_line{2}}
+\setvalue{\??floatmovement 2*\v!line}{\strc_floats_move_down_line{2}}
+
+\permanent\protected\def\installfloatmovement#1#2{\setvalue{\??floatmovement#1}{#2}}
+
+\def\strc_floats_move_down#setting%
+ {\begincsname\??floatmovement#setting\endcsname}
+
+\def\strc_floats_move_down_line#sign%
+ {\ifscratchconditionone \else
+ \global\d_page_sides_downshift\zeropoint
+ \scratchconditiononetrue
+ \fi
+ \global\advance\d_page_sides_downshift#sign\lineheight}
+
+\def\strc_floats_move_down_hang#lines%
+ {\ifscratchconditiontwo \else
+ \global\c_page_sides_n_of_lines\zerocount
+ \scratchconditiontwotrue
+ \fi
+ \global\advance\c_page_sides_n_of_lines#lines\relax}
+
+\permanent\protected\def\movedownsidefloat[#settings]% already in core
+ {\unless\ifhastok:{#settings}%
+ \begingroup
+ \scratchconditiononefalse
+ \scratchconditiontwofalse
+ \normalexpanded{\dorepeatwithcommand[#settings]}\strc_floats_move_down
+ \endgroup
+ \fi}
+
+\permanent\protected\def\hangsidefloat[#number]%
+ {\global\c_page_sides_n_of_lines#number\relax}
+
+\mutable\let\extrafloatlocation\empty
+
+\def\strc_floats_set_extra_action#rightpagelocation#leftpagelocation%
+ {\rightorleftpageaction
+ {\let\extrafloatlocation#rightpagelocation}%
+ {\let\extrafloatlocation#leftpagelocation}}
+
+
+\installcorenamespace{extrafloataction}
+
+\setvalue{\??extrafloataction \v!inner}#1{\strc_floats_set_extra_action\v!left \v!right}
+\setvalue{\??extrafloataction \v!outer}#1{\strc_floats_set_extra_action\v!right \v!left}
+\setvalue{\??extrafloataction\v!innermargin}#1{\strc_floats_set_extra_action\v!leftmargin \v!rightmargin}
+\setvalue{\??extrafloataction\v!outermargin}#1{\strc_floats_set_extra_action\v!rightmargin\v!leftmargin}
+\setvalue{\??extrafloataction \v!inneredge}#1{\strc_floats_set_extra_action\v!leftedge \v!rightedge}
+\setvalue{\??extrafloataction \v!outeredge}#1{\strc_floats_set_extra_action\v!rightedge \v!leftedge}
+\setvalue{\??extrafloataction \v!backspace}#1{\strc_floats_set_extra_action\v!backspace \v!cutspace}
+\setvalue{\??extrafloataction \v!cutspace}#1{\strc_floats_set_extra_action\v!cutspace \v!backspace}
+%setvalue{\??extrafloataction \v!margin}#1{\strc_floats_set_extra_action\v!cutspace \v!backspace}
+\setvalue{\??extrafloataction \v!left}#1{\strc_floats_set_extra_action\v!left \v!left}
+\setvalue{\??extrafloataction \v!right}#1{\strc_floats_set_extra_action\v!right \v!right}
+\setvalue{\??extrafloataction \v!line}#1{} % only -n*line is handled (see ***)
+\setvalue{\??extrafloataction \s!unknown}#1{\movedownsidefloat[#1]}
+
+\def\strc_floats_check_extra_actions % less tracingthis way ....
+ {\doifnotinset\v!text\floatlocation % fuzzy, text overloads left, since then it's a directive
+ {\let\extrafloatlocation\empty
+ % \d_page_sides_downshift will be reset afterwards, and can
+ % already be set at this point
+ \processcommacommand[\floatlocation]\strc_floats_check_extra_actions_step
+ \ifempty\extrafloatlocation \else
+ \edef\floatlocation{\extrafloatlocation,\floatlocation}%
+ \setfloatmethodvariables\floatlocation
+ \fi}}
+
+\def\strc_floats_check_extra_actions_step#step%
+ {\csname\??extrafloataction
+ \ifcsname\??extrafloataction#step\endcsname#step\else\s!unknown\fi
+ \endcsname{#step}}
+
+% pas op, maxbreedte niet instellen als plaats=links/rechts
+
+\def\strc_floats_set_local_dimensions
+ {\global\d_page_sides_shift \zeropoint % duplicate
+ \global\d_page_sides_maximum\zeropoint\relax % duplicate
+ \ifzeropt\d_page_sides_downshift\else
+ \global\setbox\floatbox\vpack
+ {\vskip\d_page_sides_downshift
+ \nointerlineskip
+ \box\floatbox}%
+ \fi
+ \edef\p_minwidth{\floatparameter\c!minwidth}%
+ \ifempty\p_minwidth
+ % nothing
+ \else
+ \scratchwidth\p_minwidth\relax
+ \ifdim\wd\floatbox<\scratchwidth
+ \strc_floats_realign_floatbox_horizontal_two
+ \fi
+ \fi
+ % we can also support edges .. in that case no common but a fast loop
+ \doifelseinset\v!hanging\floatlocation
+ {\doifelsecommon{\v!inleft,\v!leftmargin}\floatlocation
+ {\let\p_maxwidth\leftmarginwidth}%
+ {\doifelsecommon{\v!inright,\v!rightmargin}\floatlocation
+ {\let\p_maxwidth\rightmarginwidth}%
+ {\edef\p_maxwidth{\floatparameter\c!maxwidth}}}}%
+ {\edef\p_maxwidth{\floatparameter\c!maxwidth}}%
+ \ifempty\p_maxwidth
+ % nothing
+ \else
+ \scratchwidth\p_maxwidth\relax
+ \ifdim\wd\floatbox>\scratchwidth
+ \doifelsecommon{\v!inright,\v!rightmargin,\v!rightedge,\v!inleft,\v!leftmargin,\v!leftedge}\floatlocation
+ {\global\d_page_sides_maximum\scratchwidth}
+ {\doifelsecommon{\v!right,\v!left}\floatlocation
+ \strc_floats_realign_floatbox_horizontal_one
+ \strc_floats_realign_floatbox_horizontal_two}%
+ \fi
+ \fi}
+
+\def\strc_floats_realign_floatbox_horizontal_one
+ {\global\setbox\floatbox\hpack to \scratchwidth
+ {\doifnotinset\v!right\floatlocation\hss
+ \box\floatbox
+ \doifnotinset\v!left\floatlocation\hss}}
+
+\def\strc_floats_realign_floatbox_horizontal_two % why is this
+ {\global\setbox\floatbox\hpack to \scratchwidth
+ {\doifnot{\floatparameter\c!location}\v!left\hss
+ \box\floatbox
+ \doifnot{\floatparameter\c!location}\v!right\hss}}
+
+\permanent\protected\def\placefloats
+ {\page_otr_command_flush_floats}
+
+\permanent\protected\def\betweenfloatblanko % assumes that spaceafter is present
+ {\blank[\rootfloatparameter\c!spacebefore]} % or v!back,....
+
+% keep as old 1
+%
+% \protected\def\doplacefloatbox % used elsewhere
+% {%\forgetall % NO
+% \whitespace
+% \blank[\rootfloatparameter\c!spacebefore]
+% \page_otr_command_flush_float_box
+% \blank[\rootfloatparameter\c!spaceafter]}
+%
+% keep as old 2
+%
+% \protected\def\doplacefloatbox % used elsewhere
+% {%\forgetall % NO
+% \whitespace
+% \blank[\rootfloatparameter\c!spacebefore]
+% \nointerlineskip
+% \flushnotes % new per 2014-05-29 : todo: move them up in the mvl
+% \nointerlineskip
+% \page_otr_command_flush_float_box
+% \nointerlineskip
+% \blank[\rootfloatparameter\c!spaceafter]}
+
+\def\strc_floats_apply_skip#1%
+ {\edef\m_space{\rootfloatparameter#1}%
+ \ifempty\m_space\orelse\ifx\m_space\v!none\else
+ \directvspacing\m_space
+ \fi}
+
+\permanent\protected\def\doplacefloatbox % used elsewhere
+ {%\forgetall % NO
+ \whitespace
+ \strc_floats_apply_skip\c!spacebefore
+ \nointerlineskip
+ \flushnotes % new per 2014-05-29 : todo: move them up in the mvl
+ \nointerlineskip
+ \page_otr_command_flush_float_box
+ % \nointerlineskip % interferes with depth of caption
+ \strc_floats_apply_skip\c!spaceafter}
+
+% test case:
+%
+% \placefigure[page,none]{}{\blackrule[width=\textwidth,height=0.9\textheight,color=green]}
+% \placefigure[page,none]{}{\blackrule[width=\textwidth,height=1.0\textheight,color=green]}
+% \placefigure[page,none]{}{\blackrule[width=\textwidth,height=1.1\textheight,color=green]}
+
+% the [#1] will go away
+
+\def\page_one_place_float_text % this macro should be defined elsewhere
+ {%\checkwaitingfloats\floatlocationmethod
+ % todo: check if #1 is indeed \floatlocation or maybe more
+ \global\floatwidth \wd\floatbox
+ \global\floatheight \ht\floatbox % forget about the depth
+ \global\floattextwidth\dimexpr\hsize-\floatwidth-\rootfloatparameter\c!margin\relax
+ \edef\floatlocation{\floatlocationmethod}% to be sure .. why
+ \doifelseinset\v!tall\floatlocationmethod
+ {\floattextheight\dimexpr\pagegoal-\pagetotal-\bigskipamount\relax % ugly, this bigskip
+ \ifdim\floattextheight>\textheight
+ \floattextheight\textheight
+ \fi
+ \boxmaxdepth\zeropoint\relax % toegevoegd
+ \ifdim\floattextheight<\floatheight
+ \floattextheight\floatheight
+ \fi
+ \setbox\floattext\vbox to \floattextheight}
+ {\setbox\floattext\vbox}%
+ \bgroup
+ \forgetall
+ \setupblank
+ \setupwhitespace % new, also needed for footnotes
+ \blank[\v!disable]
+ \hsize\floattextwidth
+ \ignorespaces}
+
+\def\strc_floats_stop_text_indeed % todo
+ {\egroup
+ \doifnotinset\v!tall\floatlocation
+ {\floattextheight\ifdim\ht\floattext<\floatheight\floatheight\else\ht\floattext\fi}%
+ \setbox\floatbox\vpack to \floattextheight
+ {\hsize\floatwidth
+ \doifelseinset\v!both\floatlocation
+ {\doifelseinset\v!low\floatlocation
+ {\vfill\box\floatbox}
+ {\doifelseinset\v!middle\floatlocation
+ {\vfill\box\floatbox\vfill}
+ {\box\floatbox\vfill}}}
+ {\box\floatbox\vfill}}%
+ \setbox\floattext\vpack to \floattextheight
+ {\hsize\floattextwidth
+ \doifelseinset\v!low\floatlocation
+ {\vfill
+ \box\floattext
+ \doifinset\c!offset\floatlocation{\whitespace\blank}}
+ {\doifelseinset\v!middle\floatlocation
+ {\vfill
+ \box\floattext
+ \vfill}
+ {\doifinset\v!offset\floatlocation{\whitespace\blank}%
+ \box\floattext
+ \vfill}}}%
+ \doifelseinset\v!right\floatlocation
+ {\setbox\floatbox\hpack to \hsize
+ {\box\floattext
+ \hfill
+ \box\floatbox}}
+ {\setbox\floatbox\hpack to \hsize
+ {\box\floatbox
+ \hfill
+ \box\floattext}}%
+ \baselinecorrection
+ \whitespace
+ \blank[\rootfloatparameter\c!spacebefore]%
+ \doifnotinset\v!tall\floatlocation
+ {\dp\floatbox\openstrutdepth}% dp\strutbox}% % toegevoegd
+ \box\floatbox
+ \dostoptagged
+ \blank[\rootfloatparameter\c!spaceafter]%
+ \strc_floats_end_text_group
+ \page_floats_report_total}
+
+\permanent\def\borderedfloatbox
+ {\begingroup
+ \setupcurrentfloat[\c!location=\v!normal,\c!width=\v!fit,\c!height=\v!fit]%
+ \inheritedfloatframed{\box\floatbox}%
+ \endgroup}
+
+% minwidth=fit,width=max : no overshoot, as wide as graphic
+
+% keep these as reference:
+%
+% \def\strc_floats_align_content_indeed
+% {\alignstrutmode\zerocount
+% \doifnotcommon\floatcaptionlocation{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
+% {\shiftalignedline
+% {\floatparameter\c!leftmargin }{\floatparameter\c!rightmargin}%
+% {\floatparameter\c!innermargin}{\floatparameter\c!outermargin}}%
+% \alignedline{\floatparameter\c!location}\v!middle}
+%
+% \def\strc_floats_align_caption_indeed
+% {\alignstrutmode\zerocount
+% \shiftalignedline
+% {\floatcaptionparameter\c!leftmargin }{\floatcaptionparameter\c!rightmargin}%
+% {\floatcaptionparameter\c!innermargin}{\floatcaptionparameter\c!outermargin}%
+% \alignedline{\floatparameter\c!location}\v!middle}
+%
+% Test case:
+%
+% \setupfloats[location=left]
+% \setupfloatcaption[width=max]
+%
+% \startfloatcombination
+% \placefigure{}{}
+% \placefigure{}{}
+% \stopfloatcombination
+
+%D In a floatcombination we ignore the margins .. if that is ever needed we need another
+%D state (instead of local).
+
+\def\strc_floats_align_indeed
+ {\alignedline{\floatparameter\c!location}\v!middle}
+
+\def\strc_floats_shift_indeed#1%
+ {\shiftalignedline{#1\c!leftmargin}{#1\c!rightmargin}{#1\c!innermargin}{#1\c!outermargin}}
+
+\def\strc_floats_align_content_indeed
+ {\alignstrutmode\zerocount
+ \ifx\forcedfloatmethod\v!local \else
+ \doifnotcommon\floatcaptionlocation{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
+ {\strc_floats_shift_indeed\floatparameter}%
+ \expandafter\strc_floats_align_indeed
+ \fi}
+
+\def\strc_floats_align_caption_indeed
+ {\alignstrutmode\zerocount
+ \ifx\forcedfloatmethod\v!local
+ \expandafter\strc_floats_align_indeed_local
+ \else
+ \strc_floats_shift_indeed\floatcaptionparameter
+ \expandafter\strc_floats_align_indeed
+ \fi}
+
+% \def\strc_floats_align_indeed_local#1%
+% {\begingroup
+% \hsize\wd\floatbox
+% \strc_floats_align_indeed{#1}%
+% \endgroup}
+
+\let\strc_floats_align_indeed_local\firstofoneargument
+
+\newdimen\d_strc_floats_content
+\newdimen\d_strc_float_temp_height
+\newdimen\d_strc_float_temp_width
+
+\newconditional\c_floats_adapt_to_caption_width
+\newconditional\c_floats_store_minimal_package
+
+\newdimen\d_strc_floats_caption_hsize
+\newdimen\d_strc_floats_caption_min_width
+\newdimen\d_strc_floats_caption_overshoot
+
+% These are expandable, for diagnostic purposes only, but might eventually go away:
+
+\permanent\def\captionhsize {\the\d_strc_floats_caption_hsize}
+\permanent\def\captionminwidth {\the\d_strc_floats_caption_min_width}
+\permanent\def\captionovershoot{\the\d_strc_floats_caption_overshoot}
+
+\let\strc_floats_align_content\relax
+\let\strc_floats_align_caption\relax
+
+\def\strc_floats_set_caption_criteria % can become parameter (but what name)
+ {\d_strc_floats_caption_min_width15\bodyfontsize
+ \d_strc_floats_caption_overshoot 2\emwidth}
+
+\let\strc_floats_mark_pag_as_free\relax
+
+\def\strc_floats_set_page_variant
+ {\bgroup
+ \strc_floats_set_local_hsize
+ \ifcase\c_strc_floats_rotation\else
+ % Swapping fails in overloadmode and is also wrong (as it then is persistent due
+ % to global being inherited).
+ %\swapdimens\hsize\vsize
+ \scratchdimen\hsize
+ \hsize\vsize
+ \vsize\scratchdimen
+ \fi
+ \forgetall
+ \postponenotes
+ \dontcomplain
+ \setbox\b_strc_floats_content\vpack{\borderedfloatbox}%
+ \let\strc_floats_align_content\strc_floats_align_content_indeed
+ \let\strc_floats_align_caption\strc_floats_align_caption_indeed
+ \strc_floats_check_caption_content
+ \d_strc_floats_content\wd\b_strc_floats_content
+ \ifcase\floatparameter\c!method
+ % nothing
+ \or
+ % automatic
+ \ifnofloatcaption
+ \strc_floats_prepare_no_caption
+ \strc_floats_set_caption_dimensions\voidbox
+ %\page_backgrounds_add_local_to_box\floatbox % was \doglobal but not needed
+ \else
+ % todo: installable maken, variant/method=auto vs macro
+ \strc_floats_prepare_page_caption
+ %\page_backgrounds_add_local_to_box\b_strc_floats_content
+ \setbox\b_strc_floats_caption\hbox % text
+ {\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}%
+ \strc_floats_set_caption_dimensions\b_strc_floats_caption
+ %\moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
+ %\page_backgrounds_add_local_to_box\b_strc_floats_caption
+ \strc_floats_build_box
+ \fi
+ \or
+ % semi automatic
+ \or
+ % manual
+ \fi
+ \ifconditional\c_floats_store_minimal_package
+ % nothing
+ \orelse\ifcase\c_strc_floats_rotation
+ \doifnotinset\v!margin\floatlocation % brr, really needed! see wm
+ {\postcenterfloatbox\d_strc_floats_content
+ \strc_floats_mark_pag_as_free}%
+ % mark as free not done here
+ \else
+ \global\setbox\floatbox\vpack
+ {\rotate[\c!rotation=\number\c_strc_floats_rotation]{\box\floatbox}}%
+ \strc_floats_mark_pag_as_free
+ \fi
+ \egroup}
+
+\def\strc_floats_prepare_no_caption
+ {\global\setbox\floatbox\vpack % pas op als wd groter dan hsize
+ {\ifinsidecolumns\ifdim\wd\b_strc_floats_content>\hsize
+ \let\strc_floats_align_content\relax
+ \fi\fi
+ \strc_floats_align_content{\copy\b_strc_floats_content}}}
+
+\def\strc_floats_prepare_page_caption
+ {\edef\p_strc_floats_caption_width {\floatcaptionparameter\c!width}%
+ \edef\p_strc_floats_caption_minwidth{\floatcaptionparameter\c!minwidth}%
+ \edef\p_strc_floats_caption_align {\floatcaptionparameter\c!align}%
+ \dostarttagged\t!floatcaption\empty
+ \doifcommonelse\floatcaptionlocation{\v!top,\v!bottom}
+ {\strc_floats_prepare_page_caption_top_bottom}
+ {\ifx\p_strc_floats_caption_width\v!fit
+ \strc_floats_prepare_side_auto_caption
+ \orelse\ifx\p_strc_floats_caption_width\v!max
+ \strc_floats_prepare_side_auto_caption
+ \else
+ \strc_floats_prepare_side_width_caption
+ \fi}%
+ \dostoptagged}
+
+\def\strc_floats_prepare_page_caption_top_bottom
+ {\ifx\p_strc_floats_caption_width\v!fit
+ \strc_floats_prepare_page_caption_top_bottom_fit_max
+ \orelse\ifx\p_strc_floats_caption_width\v!max
+ \strc_floats_prepare_page_caption_top_bottom_fit_max
+ \else
+ \strc_floats_prepare_side_width_caption % new, special effects (see icare)
+ \fi}
+
+\def\strc_floats_prepare_page_caption_top_bottom_fit_max
+ {\unless\ifx\p_strc_floats_caption_minwidth\v!fit
+ \strc_floats_prepare_stack_caption_fixed
+ \orelse\ifx\p_strc_floats_caption_width\v!max
+ \strc_floats_prepare_stack_caption_max
+ \orelse\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content % wider caption
+ \ifx\p_strc_floats_caption_width\v!fit
+ \strc_floats_prepare_stack_caption_auto
+ \else
+ \strc_floats_prepare_stack_caption_width
+ \fi
+ \else
+ \strc_floats_prepare_stack_caption_min
+ \fi}
+
+\def\strc_floats_caption_set_align
+ {\edef\m_align{\v!reset\ifempty\p_strc_floats_caption_align\else,\fi\p_strc_floats_caption_align}%
+ \doifinset\v!tolerant \floatcaptionlocation{\edef\m_align{\m_align,\v!tolerant}}%
+ \doifinset\v!verytolerant\floatcaptionlocation{\edef\m_align{\m_align,\v!verytolerant}}%
+ \doifinset\v!stretch \floatcaptionlocation{\edef\m_align{\m_align,\v!stretch}}%
+ \setupalign[\m_align]}
+
+\def\strc_floats_prepare_side_auto_caption
+ {\scratchdimen\dimexpr\hsize-\wd\b_strc_floats_content-\floatparameter\c!margin\relax
+ \ifdim\wd\b_strc_floats_caption>\scratchdimen
+ \ifdim\wd\b_strc_floats_caption<1.3\scratchdimen
+ \scratchdimen0.8\scratchdimen
+ \fi
+ \fi
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\scratchdimen
+ \strc_floats_make_complete_caption}}
+
+\def\strc_floats_prepare_side_width_caption
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\floatcaptionparameter\c!width
+ \strc_floats_make_complete_caption}}
+
+\def\strc_floats_prepare_stack_caption_fixed
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\floatcaptionparameter\c!minwidth % special effects
+ \strc_floats_make_complete_caption}}
+
+\def\strc_floats_prepare_stack_caption_max
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}}
+
+\def\strc_floats_prepare_stack_caption_width
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\floatcaptionparameter\c!width
+ \strc_floats_make_complete_caption}}
+
+\def\strc_floats_prepare_stack_caption_min
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\wd\b_strc_floats_content
+ \ifempty\p_strc_floats_caption_align
+ \raggedcenter % on purpose overloads align !
+ \fi
+ \strc_floats_make_complete_caption}}
+
+\def\strc_floats_prepare_stack_caption_auto
+ {\ifempty\p_strc_floats_caption_align \else
+ \doifnotinset\v!middle\p_strc_floats_caption_align{\d_strc_floats_caption_overshoot\zeropoint}%
+ \fi
+ \d_strc_floats_caption_hsize\wd\b_strc_floats_content
+ \scratchwidth\floatcaptionparameter\c!maxwidth\relax
+ \ifconditional\c_floats_adapt_to_caption_width
+ \d_strc_floats_caption_min_width\zeropoint
+ \d_strc_floats_caption_overshoot\zeropoint
+ \fi
+ \ifdim\d_strc_floats_caption_hsize>\scratchwidth
+ % float is wider than \hsize
+ \setbox\b_strc_floats_caption\vbox
+ {\settrialtypesetting
+ \strc_floats_caption_set_align
+ \hsize\scratchwidth
+ \notesenabledfalse
+ \strc_floats_make_complete_caption}%
+ \ifdim\ht\scratchbox>\lineheight % more lines
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\dimexpr\d_strc_floats_caption_hsize-\d_strc_floats_caption_overshoot\relax
+ \ifdim\hsize<\d_strc_floats_caption_min_width\relax
+ \hsize\scratchwidth
+ \fi
+ \strc_floats_make_complete_caption}%
+ \else
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\scratchwidth
+ \strc_floats_make_complete_caption}%
+ \fi
+ \else
+ % float is smaller of equal to \hsize
+ \ifdim\d_strc_floats_caption_hsize<\d_strc_floats_caption_min_width\relax
+ \d_strc_floats_caption_hsize\d_strc_floats_caption_min_width % float smaller than min width
+ % \ifconditional\c_floats_adapt_to_caption_width
+ % \setbox\b_strc_floats_content\hpack to \d_strc_floats_caption_hsize{\hss\box\b_strc_floats_content\hss}%
+ % \fi
+ \fi
+ \setbox\scratchbox\vbox % test with overshoot
+ {\settrialtypesetting
+ \scratchdimen\dimexpr\d_strc_floats_caption_hsize+\d_strc_floats_caption_overshoot+3\emwidth\relax % 3em is an average word length
+ \ifdim\scratchdimen<\hsize
+ \hsize\scratchdimen
+ \fi
+ \notesenabledfalse
+ \strc_floats_make_complete_caption}%
+ \ifdim\ht\scratchbox>\lineheight
+ % at least an average word longer than a line
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \scratchdimen\dimexpr\d_strc_floats_caption_hsize+\d_strc_floats_caption_overshoot\relax
+ \ifdim\scratchdimen<\hsize
+ \hsize\scratchdimen
+ \fi
+ \strc_floats_make_complete_caption}%
+ \orelse\ifempty\p_strc_floats_caption_align
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\d_strc_floats_caption_hsize
+ \raggedcenter % overloads
+ \strc_floats_make_complete_caption}%
+ \else
+ \setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\d_strc_floats_caption_hsize
+ \strc_floats_make_complete_caption}%
+ \fi
+ \fi}
+
+\def\strc_floats_between_stack
+ {\endgraf
+ \nointerlineskip
+ \floatcaptionparameter\c!inbetween
+ \endgraf}
+
+\def\strc_floats_build_box_default % done
+ {\strc_floats_align_content{\box\b_strc_floats_content}}
+
+\def\strc_floats_build_box_next_right#1%
+ {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi % skip, no pack
+ {\d_strc_float_temp_height\ht\b_strc_floats_content
+ \box\b_strc_floats_content
+ \doifnotinset\v!hang\floatcaptionlocation
+ {\dotfskip{\floatcaptionparameter\c!distance}}%
+ \vbox to\d_strc_float_temp_height{#1}}}
+
+\def\strc_floats_build_box_next_left#1%
+ {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi % skip, no pack
+ {\d_strc_float_temp_height\ht\b_strc_floats_content
+ \vbox to\d_strc_float_temp_height{#1}%
+ \doifnotinset\v!hang\floatcaptionlocation
+ {\dotfskip{\floatcaptionparameter\c!distance}}%
+ \box\b_strc_floats_content}}
+
+\def\strc_floats_build_box_next_outer
+ {\doifelserightpagefloat\strc_floats_build_box_next_right\strc_floats_build_box_next_left}
+
+\def\strc_floats_build_box_next_inner
+ {\doifelserightpagefloat\strc_floats_build_box_next_left\strc_floats_build_box_next_right}
+
+\def\strc_floats_build_box_next_right_hang#1%
+ {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi
+ {\d_strc_float_temp_height\ht\b_strc_floats_content
+ \box\b_strc_floats_content
+ \vbox to\d_strc_float_temp_height{#1}}}
+
+\def\strc_floats_build_box_next_left_hang#1%
+ {\ifconditional\c_strc_floats_par_float \hpack \else \expandafter \strc_floats_align_content \fi
+ {\d_strc_float_temp_height\ht\b_strc_floats_content
+ \vbox to\d_strc_float_temp_height{#1}%
+ \box\b_strc_floats_content}}
+
+\def\strc_floats_build_box_next_right_margin_indeed#1#2%
+ {\ifconditional\c_strc_floats_par_float
+ \hpack\bgroup
+ \d_strc_float_temp_height\ht\b_strc_floats_content
+ \box\b_strc_floats_content
+ \hsmash{\hskip#1\vbox to\d_strc_float_temp_height{#2}}%
+ \egroup
+ \else
+ \begingroup
+ \d_strc_float_temp_height\ht\b_strc_floats_content
+ \setbox\scratchboxone\vbox{#2}%
+ \ifdim\htdp\scratchboxone>\htdp\b_strc_floats_content
+ \global\d_strc_floats_overflow\dimexpr\htdp\scratchboxone-\htdp\b_strc_floats_content\relax
+ \fi
+ \ht\scratchboxone\d_strc_float_temp_height
+ \everyrightofalignedline{\hsmash{\hskip#1\box\scratchboxone}}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
+ \endgroup
+ \fi}
+
+\def\strc_floats_build_box_next_left_margin_indeed#1#2%
+ {\ifconditional\c_strc_floats_par_float
+ \hpack\bgroup
+ \d_strc_float_temp_height\ht\b_strc_floats_content
+ \hsmash{\hskip-\dimexpr#1+\wd\b_strc_floats_caption\relax\vbox to\d_strc_float_temp_height{#2}}%
+ \box\b_strc_floats_content
+ \egroup
+ \else
+ \begingroup
+ \d_strc_float_temp_height\ht\b_strc_floats_content
+ \setbox\scratchboxone\vbox{#2}%
+ \ifdim\htdp\scratchboxone>\htdp\b_strc_floats_content
+ \global\d_strc_floats_overflow\dimexpr\htdp\scratchboxone-\htdp\b_strc_floats_content\relax
+ \fi
+ \ht\scratchboxone\d_strc_float_temp_height
+ \everyleftofalignedline{\hsmash{\hskip-\dimexpr#1+\wd\scratchboxone\relax\box\scratchboxone}}%
+ \strc_floats_align_content{\box\b_strc_floats_content}%
+ \endgroup
+ \fi}
+
+\def\strc_floats_build_box_next_right_margin
+ {\strc_floats_build_box_next_right_margin_indeed\rightmargindistance}
+
+\def\strc_floats_build_box_next_left_margin
+ {\strc_floats_build_box_next_left_margin_indeed \leftmargindistance}
+
+\def\strc_floats_build_box_next_outer_margin
+ {\doifelserightpagefloat
+ {\strc_floats_build_box_next_right_margin_indeed\rightmargindistance}
+ {\strc_floats_build_box_next_left_margin_indeed \rightmargindistance}}
+
+\def\strc_floats_build_box_next_inner_margin
+ {\doifelserightpagefloat
+ {\strc_floats_build_box_next_left_margin_indeed \leftmargindistance}
+ {\strc_floats_build_box_next_right_margin_indeed\leftmargindistance}}
+
+\def\strc_floats_build_box_next % beware, we first check on left/rightmargin because there can be left/right also
+ {\let\next\strc_floats_build_box_next_left
+ \processallactionsinset[\floatcaptionlocation]
+ [ \v!outermargin=>\let\next\strc_floats_build_box_next_outer_margin,
+ \v!innermargin=>\let\next\strc_floats_build_box_next_inner_margin,
+ \v!leftmargin=>\let\next\strc_floats_build_box_next_left_margin,
+ \v!rightmargin=>\let\next\strc_floats_build_box_next_right_margin,
+ \v!lefthanging=>\let\next\strc_floats_build_box_next_left_hang,
+ \v!righthanging=>\let\next\strc_floats_build_box_next_right_hang,
+ \v!outer=>\let\next\strc_floats_build_box_next_outer,
+ \v!inner=>\let\next\strc_floats_build_box_next_inner,
+ \v!left=>\let\next\strc_floats_build_box_next_left,
+ \v!right=>\let\next\strc_floats_build_box_next_right]%
+ \next}
+
+\def\strc_floats_build_box_side
+ {\ifconditional\c_strc_floats_par_float
+ \let\next\strc_floats_build_box_high
+ \else
+ \let\next\strc_floats_build_box_middle
+ \processallactionsinset[\floatcaptionlocation]
+ [ \v!low=>\let\next\strc_floats_build_box_low,
+ \v!middle=>\let\next\strc_floats_build_box_middle,
+ \v!high=>\let\next\strc_floats_build_box_high]%
+ \fi
+ \next}
+
+\def\strc_floats_flush_right_caption_hang
+ {\hsmash{\rlap{\dotfskip{\floatcaptionparameter\c!distance}\box\b_strc_floats_caption}}}
+
+\def\strc_floats_flush_left_caption_hang
+ {\hsmash{\llap{\box\b_strc_floats_caption\dotfskip{\floatcaptionparameter\c!distance}}}}
+
+\def\strc_floats_flush_caption_hang
+ {\doifelseinset\v!righthanging\floatcaptionlocation
+ {\strc_floats_flush_right_caption_hang}
+ {\doifelseinset\v!lefthanging\floatcaptionlocation
+ {\strc_floats_flush_left_caption_hang}
+ {\doifelseinset\v!hang\floatcaptionlocation
+ {\doifelseinset\v!outer\floatcaptionlocation
+ {\doifelserightpagefloat{\strc_floats_flush_right_caption_hang}{\strc_floats_flush_left_caption_hang}}
+ {\doifelseinset\v!right\floatcaptiondirectives
+ {\strc_floats_flush_right_caption_hang}
+ {\strc_floats_flush_left_caption_hang}}}
+ {\box\b_strc_floats_caption}}}} % is this ok
+
+\def\strc_floats_build_box_high
+ {\strc_floats_build_box_next{\strc_floats_between_stack\strc_floats_flush_caption_hang\vfill}}
+
+\def\strc_floats_build_box_low
+ {\strc_floats_build_box_next{\vfill\strc_floats_flush_caption_hang\strc_floats_between_stack}}
+
+\def\strc_floats_build_box_middle
+ {\strc_floats_build_box_next{\vfill\box\b_strc_floats_caption\vfill}}
+
+% \definefloat
+% [lefty][lefties][figure]
+% \setupfloat
+% [lefty]
+% [default=left,
+% rightmargindistance=-2cm,
+% leftmargindistance=-2cm]
+% \setupcaption
+% [lefty]
+% [location={bottom,overlay}]
+%
+% \starttext
+% \placelefty{}{} \input tufte \input tufte
+% \placelefty{}{} \input tufte \input tufte
+% \stoptext
+
+\def\strc_floats_build_box_top_stack_normal_overlay
+ {\vbox to \ht\b_strc_floats_content{\vss\strc_floats_build_box_top_stack_normal_content}}
+
+\def\strc_floats_build_box_top_stack_normal_content
+ {\d_strc_float_temp_width\wd\b_strc_floats_content
+ \ifconditional\c_strc_floats_par_float
+ \hpack{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
+ \strc_floats_between_stack
+ \hpack{\hbox{\box\b_strc_floats_content}}%
+ \else
+ \page_otr_command_set_float_hsize
+ \hpack{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}
+ \strc_floats_between_stack
+ \hpack{\strc_floats_align_content{\box\b_strc_floats_content}}%
+ \fi}
+
+\def\strc_floats_build_box_bottom_stack_normal_overlay
+ {\vbox to \ht\b_strc_floats_content{\strc_floats_build_box_bottom_stack_normal_content\vss}}
+
+\def\strc_floats_build_box_bottom_stack_normal_content
+ {\d_strc_float_temp_width\wd\b_strc_floats_content
+ \ifconditional\c_strc_floats_par_float
+ \hpack{\hpack{\box\b_strc_floats_content}}%
+ \strc_floats_between_stack
+ \hpack{\strc_floats_locate_side_float{\box\b_strc_floats_caption}}%
+ \else
+ \page_otr_command_set_float_hsize
+ \hpack{\strc_floats_align_content{\box\b_strc_floats_content}}%
+ \strc_floats_between_stack
+ \hpack{\strc_floats_locate_text_float{\box\b_strc_floats_caption}}%
+ \fi}
+
+\def\strc_floats_build_box_top_stack_normal
+ {\doifelseinset\v!overlay{\floatcaptionparameter\c!location}
+ \strc_floats_build_box_top_stack_normal_overlay
+ \strc_floats_build_box_top_stack_normal_content}
+
+\def\strc_floats_build_box_bottom_stack_normal
+ {\doifinset\v!overlay{\floatcaptionparameter\c!location}
+ \strc_floats_build_box_bottom_stack_normal_overlay
+ \strc_floats_build_box_bottom_stack_normal_content}
+
+\def\strc_floats_build_box_top_stack_grid
+ {\dp\b_strc_floats_caption\strutdepth
+ \setbox\scratchbox\vbox
+ {\d_strc_float_temp_width\wd\b_strc_floats_content
+ \hsize\d_strc_float_temp_width
+ \ifconditional\c_strc_floats_par_float
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}%
+ \vss\strc_floats_between_stack
+ \hpack{\box\b_strc_floats_content}%
+ \else
+ \page_otr_command_set_float_hsize
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
+ \vss\strc_floats_between_stack
+ \strc_floats_align_content{\box\b_strc_floats_content}%
+ \fi}%
+ \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
+ \vpack to \noflines\lineheight{\unvbox\scratchbox}}
+
+\def\strc_floats_build_box_bottom_stack_grid
+ {\dp\b_strc_floats_caption\strutdepth
+ \setbox\scratchbox\vbox
+ {\d_strc_float_temp_width\wd\b_strc_floats_content
+ \hsize\d_strc_float_temp_width
+ \ifconditional\c_strc_floats_par_float
+ \hpack{\box\b_strc_floats_content}%
+ \vss\strc_floats_between_stack
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}%
+ \else
+ \page_otr_command_set_float_hsize
+ \strc_floats_align_content{\box\b_strc_floats_content}%
+ \vss\strc_floats_between_stack
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
+ \fi}%
+ \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
+ \vpack to \noflines\lineheight{\unvbox\scratchbox}}
+
+\def\strc_floats_build_box_top_stack_stretch
+ {\dp\b_strc_floats_caption\strutdepth
+ \setbox\scratchbox\vpack
+ {\strc_floats_align_caption{\copy\b_strc_floats_caption}%
+ \strc_floats_align_content{\copy\b_strc_floats_content}}%
+ \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
+ \vbox to \noflines\lineheight % pack ?
+ {\d_strc_float_temp_width\wd\b_strc_floats_content
+ \hsize\d_strc_float_temp_width
+ \ifconditional\c_strc_floats_par_float
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}%
+ \vss\strc_floats_between_stack\vss
+ \hpack{\box\b_strc_floats_content}%
+ \else
+ \page_otr_command_set_float_hsize
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
+ \vss\strc_floats_between_stack\vss
+ \strc_floats_align_content{\box\b_strc_floats_content}%
+ \fi}}
+
+\def\strc_floats_build_box_bottom_stack_stretch
+ {\dp\b_strc_floats_caption\strutdepth
+ \setbox\scratchbox\vpack
+ {\strc_floats_align_content{\copy\b_strc_floats_content}%
+ \strc_floats_align_caption{\copy\b_strc_floats_caption}}%
+ \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
+ \vbox to \noflines\lineheight
+ {\d_strc_float_temp_width\wd\b_strc_floats_content
+ \hsize\d_strc_float_temp_width
+ \ifconditional\c_strc_floats_par_float
+ \hpack{\box\b_strc_floats_content}%
+ \vss\strc_floats_between_stack\vss
+ \strc_floats_locate_side_float{\box\b_strc_floats_caption}%
+ \else
+ \page_otr_command_set_float_hsize
+ \strc_floats_align_content{\box\b_strc_floats_content}%
+ \vss\strc_floats_between_stack\vss
+ \strc_floats_locate_text_float{\box\b_strc_floats_caption}%
+ \fi}}
+
+\def\strc_floats_build_box_top
+ {\let\next\strc_floats_build_box_top_stack_normal
+ \processfirstactioninset[\floatcaptionparameter\c!location]
+ [ \v!grid=>\let\next\strc_floats_build_box_top_stack_grid,
+ \v!lines=>\let\next\strc_floats_build_box_top_stack_stretch]% was \v!grid but interfered
+ \next}
+
+\def\strc_floats_build_box_bottom
+ {\let\next\strc_floats_build_box_bottom_stack_normal
+ \processfirstactioninset[\floatcaptionparameter\c!location]
+ [ \v!grid=>\let\next\strc_floats_build_box_bottom_stack_grid,
+ \v!lines=>\let\next\strc_floats_build_box_bottom_stack_stretch]% was \v!grid but interfered
+ \next}
+
+\def\strc_floats_relocate_caption_right#1{\strc_floats_align_caption{\hbox to \d_strc_float_temp_width{\hss#1}}}
+\def\strc_floats_relocate_caption_left #1{\strc_floats_align_caption{\hbox to \d_strc_float_temp_width{#1\hss}}}
+
+\permanent\protected\def\installfloatboxbuilder#1#2{\setvalue{\??floatbuilder#1}{#2}}
+
+\def\strc_floats_build_box
+ {\strc_floats_build_box_before
+ \global\setbox\floatbox\vbox % pack ? probably not
+ {\strc_floats_set_local_hsize
+ \forgetall
+ \ifconditional\c_floats_store_minimal_package
+ \strc_floats_build_box_separate_make
+ \else
+ % \let\floatcaptionarrangement\s!default
+ \let\floatcaptionarrangement\v!bottom % for Alan
+ \processcommacommand[\floatcaptionparameter\c!location]\strc_floats_build_box_step
+ \ifcsname\??floatbuilder\floatcaptionarrangement\endcsname
+ \lastnamedcs
+ \else
+ \strc_floats_build_box_default
+ \fi
+ \fi}%
+ \strc_floats_build_box_after}
+
+% \let\strc_floats_build_box_before\relax
+% \let\strc_floats_build_box_after \relax
+
+\def\strc_floats_build_box_before
+ {\let\currentfloatframed\currentfloat
+ \floatwidth\wd
+ \ifdim\wd\b_strc_floats_content>\wd\b_strc_floats_caption
+ \b_strc_floats_content\else\b_strc_floats_caption
+ \fi}
+
+\def\strc_floats_build_box_after
+ {\doifelseframed\floatframedparameter\strc_floats_build_box_after_indeed\relax}
+
+\def\strc_floats_build_box_after_indeed
+ {\global\setbox\floatbox\hpack
+ {\edef\m_width{\floatframedparameter\c!width}%
+ \ifx\m_width\v!fit
+ \let\m_width\floatwidth
+ \orelse\ifx\m_width\v!broad
+ \let\m_width\v!fit
+ \fi
+ \letfloatframedparameter\c!strut\v!no
+ \letfloatframedparameter\c!width\m_width
+ \inheritedfloatframedframed
+ {\box\floatbox}}}
+
+% special purpose: used in floatcombinations
+%
+% todo : keep float content and caption separated in local
+
+\newbox\b_strc_floats_separate_content
+\newbox\b_strc_floats_separate_caption
+
+\def\strc_floats_build_box_separate_set
+ {\settrue\c_floats_adapt_to_caption_width
+ \settrue\c_floats_store_minimal_package}
+
+% \def\strc_floats_build_box_separate_make
+% {\offinterlineskip
+% \vpack to \onepoint{\box\b_strc_floats_content}\break
+% \vpack to \onepoint{\box\b_strc_floats_caption}}
+
+%D Remark for \LMTX: we don't want to migrate inserts here so we unpack
+%D (could be a flag). When migrated, the inserts end up in the vertical
+%D list and we no longer have just a box (but inserts and lines again).
+
+\def\strc_floats_build_box_separate_make
+ {\savebox\??localfloatstack{\number\numexpr\c_strc_localfloats_n+1\relax:a}{\box\b_strc_floats_content}%
+ \savebox\??localfloatstack{\number\numexpr\c_strc_localfloats_n+1\relax:b}{\box\b_strc_floats_caption}}
+
+\protected\def\strc_floats_build_box_separate_split#1%
+ {\global\setbox\b_strc_floats_separate_content\vpack{\foundbox\??localfloatstack{\number#1:a}}%
+ \global\setbox\b_strc_floats_separate_caption\tpack{\foundbox\??localfloatstack{\number#1:b}}}
+
+% \def\strc_floats_build_box_step#1%
+% {\doifdefined{\??floatbuilder#1}{\def\floatcaptionarrangement{#1}\quitcommalist}}
+
+\def\strc_floats_build_box_step#1%
+ {\ifcsname\??floatbuilder#1\endcsname
+ \def\floatcaptionarrangement{#1}% \let\floatcaptionarrangement\commalistelement
+ \quitcommalist
+ \fi}
+
+\def\strc_floats_locate_text_float
+ {\let\next\strc_floats_align_caption
+ \processallactionsinset[\floatcaptionparameter\c!location]
+ [ \v!left=>\let\next\strc_floats_relocate_caption_left,
+ \v!right=>\let\next\strc_floats_relocate_caption_right,
+ \v!inner=>\doifelserightpagefloat{\let\next\strc_floats_relocate_caption_left }{\let\next\strc_floats_relocate_caption_right},
+ \v!outer=>\doifelserightpagefloat{\let\next\strc_floats_relocate_caption_right}{\let\next\strc_floats_relocate_caption_left }]%
+ \next}
+
+\installfloatboxbuilder \v!none \strc_floats_build_box_default
+\installfloatboxbuilder \s!default \strc_floats_build_box_default
+\installfloatboxbuilder \v!high \strc_floats_build_box_high
+\installfloatboxbuilder \v!low \strc_floats_build_box_low
+\installfloatboxbuilder \v!middle \strc_floats_build_box_middle
+
+\installfloatboxbuilder \v!rightmargin \strc_floats_build_box_side % added 2016-08-23
+\installfloatboxbuilder \v!leftmargin \strc_floats_build_box_side % added 2016-08-23
+\installfloatboxbuilder \v!innermargin \strc_floats_build_box_side % added 2016-08-23
+\installfloatboxbuilder \v!outermargin \strc_floats_build_box_side % added 2016-08-23
+
+\installfloatboxbuilder \v!left \strc_floats_build_box_side
+\installfloatboxbuilder \v!right \strc_floats_build_box_side
+\installfloatboxbuilder \v!inner \strc_floats_build_box_side % added 2016-08-23
+\installfloatboxbuilder \v!outer \strc_floats_build_box_side % added 2016-08-23
+
+\installfloatboxbuilder \v!lefthanging \strc_floats_build_box_side % added 2016-08-23
+\installfloatboxbuilder \v!righthanging \strc_floats_build_box_side % added 2016-08-23
+\installfloatboxbuilder \v!hang \strc_floats_build_box_side % added 2016-08-23
+
+\installfloatboxbuilder \v!top \strc_floats_build_box_top
+\installfloatboxbuilder \v!bottom \strc_floats_build_box_bottom
+
+% \setuplayout[grid=yes] \showgrid \setupcaptions[style=smallbodyfont,location=grid,inbetween=]
+%
+% \starttext
+% test \placefigure{} {\externalfigure[cow.pdf][frame=on,grid=yes]} test \page
+% test \placefigure{\input zapf\relax}{\externalfigure[cow.pdf][frame=on,grid=yes]} test \page
+% test \placefigure{} {\externalfigure[cow.pdf][frame=on,grid=depth]} test \page
+% test \placefigure{\input zapf\relax}{\externalfigure[cow.pdf][frame=on,grid=depth]} test \page
+% \stoptext
+
+% This might move to page-flt:
+
+\newif\ifpostponecolumnfloats \postponecolumnfloatsfalse % don't change
+
+\setnewconstant\postcenterfloatmethod\plusone
+
+\permanent\def\postcenterfloatbox#1%
+ {\scratchdimen
+ \ifcase\postcenterfloatmethod
+ #1% \wd\floatbox
+ \orelse\ifinsidecolumns
+ \ifpostponecolumnfloats\makeupwidth\else#1\fi
+ \orelse\ifdim#1>\hsize
+ \hsize
+ \else
+ \wd\floatbox
+ \fi
+ \global\setbox\floatbox\hbox to \scratchdimen
+ % {\hfill\box\floatbox\hfill}} % geen \hss, gaat mis in kolommen !
+ % {\hss \box\floatbox\hss }} % wel \hss, anders mis in colset
+ {\ifconditional\c_page_floats_center_box_global
+ \donetrue
+ \orelse\ifconditional\c_page_floats_center_box_local
+ \donetrue
+ \else
+ \donefalse
+ \fi
+ \ifdim\scratchdimen>\effectivehsize
+ \donefalse
+ \fi
+ \hss\ifdone\hskip\effectiveleftskip\fi
+ \box\floatbox
+ \ifdone\hskip\effectiverightskip\fi\hss}}
+
+\def\strc_floats_set_paragraph_variant
+ {\bgroup
+ \forgetall
+ \postponenotes
+ \dontcomplain
+ \setbox\b_strc_floats_content\vbox{\borderedfloatbox}% \vpack >?
+ %\page_backgrounds_add_local_to_box\b_strc_floats_content
+ \ifnofloatcaption
+ \global\setbox\floatbox\vpack{\box\b_strc_floats_content}%
+ \else
+ \strc_floats_check_caption_content
+ \strc_floats_prepare_side_caption
+ \setbox\b_strc_floats_caption\hbox{\floatcaptionparameter\c!command{\box\b_strc_floats_caption}}% \hpack ?
+ %\moveboxontogrid\b_strc_floats_caption{\floatcaptionparameter\c!grid}\d_strc_floats_caption_height
+ %\page_backgrounds_add_local_to_box\b_strc_floats_caption
+ \strc_floats_build_side_box
+ \fi
+ \egroup}
+
+\def\strc_floats_prepare_side_caption
+ {\dostarttagged\t!floatcaption\empty
+ \edef\p_strc_floats_caption_width{\floatcaptionparameter\c!width}%
+ \edef\p_strc_floats_caption_align{\floatcaptionparameter\c!align}%
+ \ifx\p_strc_floats_caption_width\v!max
+ \strc_floats_prepare_side_caption_max
+ \orelse\ifx\p_strc_floats_caption_width\v!fit
+ \strc_floats_prepare_side_caption_fit
+ \else
+ \strc_floats_prepare_side_caption_width
+ \fi
+ \dostoptagged}
+
+% these could be \??floatpreparesidecaption
+
+% \setupfloat[figure][location=left]
+% \setupcaption[figure][width=max]
+%
+% \placefigure{my figure caption my figure caption}{\framed[width=4cm,height=1cm]{}} \input tufte
+% \placefigure{my figure caption} {\framed[width=4cm,height=1cm]{}} \input tufte
+
+\def\strc_floats_prepare_side_caption_max
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}}
+
+\def\strc_floats_prepare_side_caption_fit % or center when smaller
+ {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
+ \setbox\b_strc_floats_caption\vbox
+ {\forgetall % needed?
+ \strc_floats_caption_set_align
+ \hsize\wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}%
+ \else
+ % maybe we should listen to the align option here (now side floats need the max option
+ \setbox\b_strc_floats_caption\hpack to \wd\b_strc_floats_content
+ {\hss\hbox{\strc_floats_make_complete_caption}\hss}%
+ \fi}
+
+\def\strc_floats_prepare_side_caption_width
+ {\setbox\b_strc_floats_caption\vbox
+ {\strc_floats_caption_set_align
+ \hsize\p_strc_floats_caption_width % \wd\b_strc_floats_content
+ \strc_floats_make_complete_caption}}
+
+% % maybe (but then also prepare_page that way):
+%
+% \installcorenamespace{floatpreparesidecaption}
+%
+% \def\strc_floats_prepare_side_caption
+% {\dostarttagged\t!floatcaption\empty
+% \edef\p_strc_floats_caption_width{\floatcaptionparameter\c!width}%
+% \edef\p_strc_floats_caption_align{\floatcaptionparameter\c!align}%
+% \expandnamespacemacro\??floatpreparesidecaption\p_strc_floats_caption_width\s!unknown
+% \dostoptagged}
+%
+% \setvalue{\??floatpreparesidecaption\v!max}%
+% {\setbox\b_strc_floats_caption\vbox
+% {\strc_floats_caption_set_align
+% \hsize\wd\b_strc_floats_content
+% \strc_floats_make_complete_caption}}
+%
+% \setvalue{\??floatpreparesidecaption\v!fit}%
+% {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
+% \setbox\b_strc_floats_caption\vbox
+% {\forgetall % needed?
+% \hsize\wd\b_strc_floats_content
+% \strc_floats_make_complete_caption}%
+% \else
+% \setbox\b_strc_floats_caption\hbox to \wd\b_strc_floats_content
+% {\hss\hbox{\strc_floats_make_complete_caption}\hss}%
+% \fi}
+%
+% \setvalue{\??floatpreparesidecaption\s!unknown}%
+% {\setbox\b_strc_floats_caption\vbox
+% {\strc_floats_caption_set_align
+% \hsize\p_strc_floats_caption_width % \wd\b_strc_floats_content
+% \strc_floats_make_complete_caption}}
+
+\def\strc_floats_locate_side_float#1%
+ {\begingroup
+ \alignstrutmode\zerocount
+ \hsize\d_strc_float_temp_width \forgetall
+ \alignedline{\floatparameter\c!location}\v!middle{#1}%
+ \endgroup}
+
+\def\strc_floats_build_side_box
+ {\let\strc_floats_align_content\relax
+ \let\strc_floats_align_caption\relax
+ \strc_floats_build_box}
+
+\def\strc_floats_set_box % todo : \global\setbox, currently messy
+ {\ifvisible
+ \par
+ \edef\floatcaptiondirectives{\floatparameter\c!location,\floatcaptionparameter\c!location}%
+ \strc_floats_set_caption_criteria
+ \ifconditional\c_strc_floats_par_float
+ \strc_floats_set_paragraph_variant
+ \else
+ \strc_floats_set_page_variant
+ \fi
+ \strc_floats_set_local_dimensions
+ \global\advance\totalnoffloats\plusone
+ \ifconditional\c_floats_store_minimal_package \else
+ \setbox\floatbox\hpack{\strc_float_save_data\box\floatbox}% still needed? we will do renumbering differently
+ \fi
+ \global\floatheight\htdp\floatbox
+ \global\floatwidth\wd\floatbox
+ \ifconditional\c_floats_store_minimal_package \else
+ \doifnotinset\v!margin\floatlocation % gaat namelijk nog fout
+ {\setbox\floatbox\vpack
+ {\parindent\zeropoint
+ \box\floatbox}}%
+ \fi
+ \wd\floatbox\floatwidth
+ \ifdim\dimexpr\floatheight+\lineheight\relax<\textheight \else
+ \global\floatheight\dimexpr\textheight-\lineheight\relax
+ \ht\floatbox\floatheight
+ \dp\floatbox\zeropoint
+ \showmessage\m!floatblocks{10}{\the\totalnoffloats}%
+ \fi
+ \fi}
+
+% \def\dooutput{\sidefloatoutput} % redefinition of \dooutput
+
+\definefloat
+ [\v!figure]
+ [\v!figures]
+
+\definefloat
+ [\v!table]
+ [\v!tables]
+
+\setupfloat
+ [\v!table]
+ [\c!frame=\v!off]
+
+\definefloat
+ [\v!intermezzo]
+ [\v!intermezzi]
+
+\definefloat
+ [\v!graphic]
+ [\v!graphics]
+
+% float strategy, replaces some of the above macros
+
+\installcorenamespace{floatmethods}
+
+\mutable\let\floatmethod \empty % set by lua
+\mutable\let\floatlabel \empty % set by lua
+\mutable\let\floatcolumn \empty % set by lua
+\mutable\let\floatrow \empty % set by lua
+\mutable\let\floatspecification\empty
+
+\mutable\let\forcedfloatmethod \empty % set by lua and floatcombinations
+
+\permanent\protected\def\setfloatmethodvariables#1% \floatmethod \floatlabel \floatrow \floatcolumn
+ {\clf_analysefloatmethod{#1}} % move definition to lua end
+
+\permanent\protected\def\somesomewherefloat[#1]%
+ {\page_floats_save_somewhere_float\s!somewhere{#1}}
+
+\def\strc_floats_get_box
+ {\ifvisible
+ \ifcsname\??floatmethods\currentoutputroutine:\floatmethod\endcsname \else
+ \let\floatmethod\v!here
+ \fi
+ \ifempty\forcedfloatmethod \else
+ \let\floatmethod\forcedfloatmethod
+ \fi
+ \let\askedfloatmethod\floatmethod
+ \ifexporting \ifx\askedfloatmethod\v!here \else
+ \showmessage\m!floatblocks{15}{\askedfloatmethod,\v!here}%
+ \let\floatlocation\v!here
+ \fi \fi
+ % [] will go
+ \edef\floatlocationmethod{\floatmethod,\floatlocation}%
+ \csname\??floatmethods\currentoutputroutine:\floatmethod\endcsname
+ \fi}
+
+\installcorenamespace{floatsettings}
+
+\permanent\protected\def\installfloatmethod#1#2#3% routine keyword handler
+ {\setvalue{\??floatmethods#1:#2}{#3}}
+
+\permanent\protected\def\handlefloatmethod#1%
+ {\csname\??floatmethods\currentoutputroutine:#1\endcsname}
+
+% \protected\def\installfloatmethod#1#2#3% routine keyword handler
+% {\ifcsname\??floatsettings#1:#2\endcsname \else
+% \expandafter\newtoks\csname\??floatsettings#1:#2\endcsname
+% \fi
+% \setvalue{\??floatmethods#1:#2}{#3}}
+%
+% \protected\def\startfloatmethodsettings#1#2 #3\stopfloatmethodsettings
+% {\csname\??floatsettings#1:#2\endcsname\expandafter{\the\csname\??floatsettings#1:#2\endcsname#3}}
+%
+% \let\stopfloatmethodsettings\relax
+%
+% \protected\def\applyfloatmethodsettings#1#2{\the\??floatsettings#1:#2\endcsname}
+
+\definesystemconstant{tblr}
+\definesystemconstant{lrtb}
+\definesystemconstant{tbrl}
+\definesystemconstant{rltb}
+\definesystemconstant{btlr}
+\definesystemconstant{lrbt}
+\definesystemconstant{btrl}
+\definesystemconstant{rlbt}
+\definesystemconstant{fxtb}
+\definesystemconstant{fxbt}
+\definesystemconstant{fixd}
+
+% can move to page-one:
+
+\installfloatmethod \s!singlecolumn \v!here \page_one_place_float_here
+\installfloatmethod \s!singlecolumn \v!force \page_one_place_float_force
+\installfloatmethod \s!singlecolumn \v!left \page_one_place_float_left
+\installfloatmethod \s!singlecolumn \v!right \page_one_place_float_right
+\installfloatmethod \s!singlecolumn \v!text \page_one_place_float_text
+\installfloatmethod \s!singlecolumn \v!top \page_one_place_float_top
+\installfloatmethod \s!singlecolumn \v!bottom \page_one_place_float_bottom
+\installfloatmethod \s!singlecolumn \v!auto \page_one_place_float_auto
+\installfloatmethod \s!singlecolumn \v!margin \page_one_place_float_margin
+\installfloatmethod \s!singlecolumn \v!opposite \page_one_place_float_face
+\installfloatmethod \s!singlecolumn \v!page \page_one_place_float_page
+\installfloatmethod \s!singlecolumn \v!leftpage \page_one_place_float_leftpage
+\installfloatmethod \s!singlecolumn \v!rightpage \page_one_place_float_rightpage
+\installfloatmethod \s!singlecolumn \v!inmargin \page_one_place_float_inmargin
+\installfloatmethod \s!singlecolumn \v!inleft \page_one_place_float_leftmargin
+\installfloatmethod \s!singlecolumn \v!inright \page_one_place_float_rightmargin
+\installfloatmethod \s!singlecolumn \v!leftmargin \page_one_place_float_leftmargin
+\installfloatmethod \s!singlecolumn \v!rightmargin \page_one_place_float_rightmargin
+\installfloatmethod \s!singlecolumn \v!leftedge \page_one_place_float_leftedge
+\installfloatmethod \s!singlecolumn \v!rightedge \page_one_place_float_rightedge
+\installfloatmethod \s!singlecolumn \v!somewhere \page_one_place_float_somewhere
+\installfloatmethod \s!singlecolumn \v!backspace \page_one_place_float_backspace
+\installfloatmethod \s!singlecolumn \v!cutspace \page_one_place_float_cutspace
+\installfloatmethod \s!singlecolumn \s!tblr \page_one_place_float_top
+\installfloatmethod \s!singlecolumn \s!lrtb \page_one_place_float_top
+\installfloatmethod \s!singlecolumn \s!tbrl \page_one_place_float_top
+\installfloatmethod \s!singlecolumn \s!fxtb \page_one_place_float_top
+\installfloatmethod \s!singlecolumn \s!rltb \page_one_place_float_top
+\installfloatmethod \s!singlecolumn \s!btlr \page_one_place_float_bottom
+\installfloatmethod \s!singlecolumn \s!lrbt \page_one_place_float_bottom
+\installfloatmethod \s!singlecolumn \s!btrl \page_one_place_float_bottom
+\installfloatmethod \s!singlecolumn \s!rlbt \page_one_place_float_bottom
+\installfloatmethod \s!singlecolumn \s!fxbt \page_one_place_float_bottom
+\installfloatmethod \s!singlecolumn \s!fixd \page_one_place_float_force
+
+%D Local floats:
+
+\installcorenamespace{localfloats}
+\installcorenamespace{localfloatstack}
+
+\installsetuponlycommandhandler \??localfloats {localfloats}
+
+\setuplocalfloats
+ [%\c!before=\blank,
+ %\c!after=\blank,
+ \c!inbetween=\blank]
+
+\initializeboxstack\??localfloatstack
+
+\newcount\c_strc_localfloats_n \aliased\let\noflocalfloats\c_strc_localfloats_n
+
+\permanent\protected\def\resetlocalfloats
+ {\global\c_strc_localfloats_n\zerocount
+ \initializeboxstack\??localfloatstack}
+
+\permanent\protected\def\somelocalfloat
+ {\global\advance\c_strc_localfloats_n\plusone
+ \savebox\??localfloatstack{\number\c_strc_localfloats_n}{\box\floatbox}}
+
+\permanent\protected\def\getlocalfloats
+ {\dorecurse\c_strc_localfloats_n
+ {\ifnum\recurselevel=\plusone % 1\relax
+ \directlocalfloatsparameter\c!before
+ \else
+ \directlocalfloatsparameter\c!inbetween
+ \fi
+ \dontleavehmode\hpack{\foundbox\??localfloatstack\recurselevel}% \restorebox...
+ \ifnum\recurselevel=\c_strc_localfloats_n\relax
+ \directlocalfloatsparameter\c!after
+ \fi}}
+
+\permanent\protected\def\flushlocalfloats
+ {\getlocalfloats
+ \resetlocalfloats}
+
+% \protected\def\getlocalfloat#1%
+% {\normalexpanded{\foundbox{\??localfloatstack}{\number#1}}}% \vbox{\restorebox...}
+
+\permanent\protected\def\getlocalfloat#1%
+ {\foundbox\??localfloatstack{\number#1}} % \vbox{\restorebox...}
+
+\permanent\protected\def\forcelocalfloats
+ {\let\forcedfloatmethod\v!local}
+
+\installfloatmethod \s!singlecolumn \v!local \somelocalfloat
+\installfloatmethod \s!multicolumn \v!local \somelocalfloat
+\installfloatmethod \s!mixedcolumn \v!local \somelocalfloat
+\installfloatmethod \s!columnset \v!local \somelocalfloat
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-ind.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-ind.mkxl
new file mode 100644
index 00000000000..31d7eb5755a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-ind.mkxl
@@ -0,0 +1,128 @@
+%D \module
+%D [ file=strc-ind, % was part of strc-des,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Indented Text,
+%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 Structure Macros / Indented Text}
+
+\unprotect
+
+%D \macros
+%D {defineindentedtext,
+%D setupindentedtext}
+%D
+%D Ok, we keep it but with a different command as it all looks too
+%D much like indentation and indenting. We also assume start/stop
+%D usage or some explicit par.
+
+\installcorenamespace{indentedtext}
+
+\installcommandhandler \??indentedtext {indentedtext} \??indentedtext
+
+%D \startbuffer
+%D \defineindentedtext[one][text=one]
+%D \defineindentedtext[two][text=two]
+%D
+%D \one test test \par
+%D \subone test test \par
+%D \subtwo test test \par
+%D \subsubone test test \par
+%D
+%D \startone
+%D test test
+%D \startone
+%D test test
+%D \startone
+%D test test
+%D \stopone
+%D \starttwo
+%D test test
+%D \startone
+%D test test
+%D \stopone
+%D \stoptwo
+%D \stopone
+%D \stopone
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\newcount\c_strc_indentedtexts_nesting
+\newdimen\d_strc_indentedtexts_width
+\newdimen\d_strc_indentedtexts_distance
+
+\appendtoks
+ \frozen\instance\setuevalue {\e!start\currentindentedtext}{\strc_indentedtexts_start{\currentindentedtext}\c_strc_indentedtexts_nesting}%
+ \frozen\instance\setuevalue {\e!stop \currentindentedtext}{\strc_indentedtexts_stop}%
+ % to be avoided ... might go away
+ \frozen\instance\setuevalue {\currentindentedtext}{\strc_indentedtexts_direct{\currentindentedtext}{0}}%
+ \frozen\instance\setuevalue {\v!sub\currentindentedtext}{\strc_indentedtexts_direct{\currentindentedtext}{1}}%
+ \frozen\instance\setuevalue{\v!sub\v!sub\currentindentedtext}{\strc_indentedtexts_direct{\currentindentedtext}{2}}%
+\to \everydefineindentedtext
+
+\protected\def\strc_indentedtexts_start#1#2% we need to get rid of \spr
+ {\par
+ \begingroup
+ \edef\currentindentedtext{#1}%
+ \c_strc_indentedtexts_nesting#2\relax
+ \indentedtextparameter\c!before
+ \d_strc_indentedtexts_distance\indentedtextparameter\c!distance\relax
+ \doifnothing{\indentedtextparameter\c!sample}
+ {\setindentedtextparameter\c!sample{\indentedtextparameter\c!text}}%
+ \assignwidth
+ {\indentedtextparameter\c!width}
+ {\d_strc_indentedtexts_width}
+ {\useindentedtextstyleandcolor\c!headstyle\c!headcolor
+ \indentedtextparameter\c!sample
+ \spr{\indentedtextparameter\c!separator}}
+ {\d_strc_indentedtexts_distance}%
+ \advance\d_strc_indentedtexts_width \d_strc_indentedtexts_distance
+ \setbox\scratchbox\hbox to \d_strc_indentedtexts_width
+ {\useindentedtextstyleandcolor\c!headstyle\c!headcolor
+ \strut
+ \indentedtextparameter\c!text
+ \hss
+ \spr{\indentedtextparameter\c!separator}%
+ \hskip\d_strc_indentedtexts_distance}%
+ \parindent\zeropoint
+ \hskip\c_strc_indentedtexts_nesting\d_strc_indentedtexts_width
+ \advance\c_strc_indentedtexts_nesting\plusone
+ \dontleavehmode\box\scratchbox
+ \hangindent\c_strc_indentedtexts_nesting\d_strc_indentedtexts_width
+ \useindentedtextstyleandcolor\c!style\c!color}
+
+\protected\def\strc_indentedtexts_stop
+ {\indentedtextparameter\c!after
+ \par
+ \endgroup}
+
+\permanent\tolerant\protected\def\startindentedtext[#1]%
+ {\strc_indentedtexts_start{#1}\c_strc_indentedtexts_nesting}
+
+\permanent\let\stopindentedtext\strc_indentedtexts_stop
+
+\protected\def\strc_indentedtexts_direct#1#2#3\par % no longer clever grabpar trickery
+ {\strc_indentedtexts_start{#1}{#2}#3\strc_indentedtexts_stop}
+
+\setupindentedtext
+ [\c!style=\v!normal,
+ \c!headstyle=\v!normal,
+ %\c!color=,
+ %\c!headcolor=,
+ \c!width=\v!fit,
+ \c!text=\unknown,
+ %\c!sample=,
+ \c!before=\blank,
+ \c!after=\blank,
+ \c!distance=1em,
+ \c!separator={ :}]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-ini.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-ini.mklx
new file mode 100644
index 00000000000..3897c1d2ac9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-ini.mklx
@@ -0,0 +1,81 @@
+%D \module
+%D [ file=strc-flt,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Initialization \& Helpers,
+%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 Structure Macros / Initialization & Helpers}
+
+\registerctxluafile{strc-ini}{}
+
+\unprotect
+
+% segments: 0:100 2:3 chapter:subsection 3 (=self+2) (alternative: sectionset)
+
+% section : [sectionnumber(s)]
+% sectionseparatorset (default) sectionconversionset (default) sectionstopper () sectionset sectionsegments
+
+% lists : [sectionnumber(s)] [text] [prefix(es)[separator][pagenumber(s)]
+% sectionseparatorset (default) sectionconversionset (default) sectionstopper sectionset sectionsegments
+% prefixseparatorset (default) prefixconversionset (default) prefixstopper (.) prefixset prefixsegments
+% pageseparatorset (default) pageconversionset (default) pagestopper () pagesegments
+% prefix (no)
+
+% counter : [prefix(es)[separator]][number(s)]
+% prefixseparatorset (default) prefixconversionset (default) prefixstopper (.) prefixset prefixsegments
+% numberseparatorset (default) numberconversionset (default) numberstopper () numbersegments
+% prefix (no)
+
+% pagenumber: [prefix(es)[separator]][pagenumber(s)]
+% prefixseparatorset (default) prefixconversionset (default) prefixstopper (.) prefixset prefixsegments
+% pageseparatorset (default) pageconversionset (default) pagestopper ()
+% prefix (no)
+
+% text mark reference list
+% section P P P P
+% float P.N P.N P.N
+% itemize P.N P.N
+% enumerate P.N P.N P.N
+% formula P.N P.N
+% footnote P.N P.N P.N
+% number P.N P.N
+
+% number prefix section page
+
+% [text|marking|reference|list]:[number|prefix|pagenumber|pageprefix]:[separatorset|conversionset|conversion|stopper|set|segments|resetset|order]
+
+% figure caption : text:number:* text:prefix:* -> \setupcaption[figure][...]; stores defaults
+% figure list : list:number:* list:prefix:* list:pagenumber:* list:pageprefix:* -> \setuplist[figure][...]; takes stored defaults for number and pagenumber]
+% figure reference: reference:number:* reference:prefix:* reference:pagenumber:* reference:pageprefix:* -> \setupreference[figure]]...]; takes stored defaults
+
+% This module deals with structure: section headers, list and numbering and
+% eventually cross referencing. These components are rather interwoven and
+% therefore an inbetween layer is used. Eventually this will replace the
+% corresponding code in core-sec, core-lst, core-num and core-ref.
+
+% We collect operations that deal with things like formatting on each level of a
+% number in sets. This is all handles at the \LUA\ end. References to such sets
+% travel with the multipass information.
+
+\permanent\tolerant\protected\def\defineresetset [#name]#spacer[#set]#spacer[#default]{\clf_definestructureset{structure:resets} {#name}{\detokenize{#set}}{\detokenize{#default}}true\relax}
+\permanent\tolerant\protected\def\defineseparatorset [#name]#spacer[#set]#spacer[#default]{\clf_definestructureset{structure:separators} {#name}{\detokenize{#set}}{\detokenize{#default}}false\relax}
+\permanent\tolerant\protected\def\defineconversionset[#name]#spacer[#set]#spacer[#default]{\clf_definestructureset{structure:conversions}{#name}{\detokenize{#set}}{\detokenize{#default}}false\relax}
+\permanent\tolerant\protected\def\defineprefixset [#name]#spacer[#set]#spacer[#default]{\clf_definestructureset{structure:prefixes} {#name}{\detokenize{#set}}{\detokenize{#default}}false\relax}
+
+\aliased\let\definestructureresetset \defineresetset
+\aliased\let\definestructureseparatorset \defineseparatorset
+\aliased\let\definestructureconversionset\defineconversionset
+\aliased\let\definestructureprefixset \defineprefixset
+
+% \defineseparatorset [weird][!,?,*][:] % tex content
+% \defineconversionset[weird][numbers,characters,romannumerals][numbers] % symbolic names
+% \defineresetset [weird][0,0,1][0] % numbers
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-itm.mklx
index 60fe3ee746a..efead3d83a7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-itm.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-itm.mklx
@@ -199,6 +199,7 @@
\newconditional\c_strc_itemgroups_extra
\newconditional\c_strc_itemgroups_repeat
\newconditional\c_strc_itemgroups_inline_head
+\newconditional\c_strc_itemgroups_symbol
% 0 = before/after
% 1 = between unless before
@@ -228,15 +229,15 @@
\let \m_strc_itemgroups_indenting \empty
\let \m_strc_itemgroups_destination \empty
-\let \currentitemlevel \!!zerocount % public
-\def \currentnofitems {\the\c_strc_itemgroups_max_items}
-\def \currentitemnumber {\strc_counters_raw_sub\v_strc_itemgroups_counter\currentitemlevel} % public
+\mutable\let \currentitemlevel \!!zerocount % public
+\mutable\def \currentnofitems {\the\c_strc_itemgroups_max_items}
+\mutable\def \currentitemnumber {\strc_counters_raw_sub\v_strc_itemgroups_counter\currentitemlevel} % public
\newtoks \itemgroupcommands % maybe public
-\def \currentitemgroupsymbol {n} % here we cannot use a _ in the name
-\let \currentitemgroupconversionset \empty % here we cannot use a _ in the name
-\let \currentitemgroupsegments \empty
+\mutable\def \currentitemgroupsymbol {n} % here we cannot use a _ in the name
+\mutable\let \currentitemgroupconversionset \empty % here we cannot use a _ in the name
+\mutable\let \currentitemgroupsegments \empty
\def\strc_itemgroups_register_status
{\clf_registeritemgroup{\currentparentitemgroup}\c_strc_itemgroups_nesting\c_strc_itemgroups_n_of_items\dimexpr\itemgroupparameter\c!maxwidth\relax}
@@ -248,12 +249,12 @@
% todo: \dodosetreference -> \strc_counters_register_component (to be checked)
\def\strc_itemgroups_insert_reference % we will make a decent number helper
- {\iftrialtypesetting \orelse \ifx\currentitemreference \empty \else
+ {\iftrialtypesetting \orelse \ifempty\currentitemreference \else
\strc_itemgroups_insert_reference_indeed
\fi}
\def\strc_itemgroups_insert_extra_reference
- {\iftrialtypesetting \orelse \ifx\currentitemreference \empty \else
+ {\iftrialtypesetting \orelse \ifempty\currentitemreference \else
\normalexpanded{\textreference[\currentitemreference]{\strc_itemgroups_extra_symbol}}%
\fi}
@@ -328,31 +329,29 @@
\installcommandhandler \??itemgroup {itemgroup} \??itemgroup
-\let\setupitemgroups\setupitemgroup
+\aliased\let\setupitemgroups\setupitemgroup
\appendtoks
- \setuevalue{\e!start\currentitemgroup}{\startitemgroup[\currentitemgroup]}%
- \setuevalue{\e!stop \currentitemgroup}{\stopitemgroup}%
- \setuevalue{\e!setup\currentitemgroup\e!endsetup}{\setupitemgroup[\currentitemgroup]}% obsolete
+ \frozen\instance\setuevalue{\e!start\currentitemgroup}{\startitemgroup[\currentitemgroup]}%
+ \frozen\instance\setuevalue{\e!stop \currentitemgroup}{\stopitemgroup}%
+ \frozen\instance\setuevalue{\e!setup\currentitemgroup\e!endsetup}{\setupitemgroup[\currentitemgroup]}% obsolete
\let\currentparentitemgroup\currentitemgroup
\definecounter[\v_strc_itemgroups_counter]%
- % beware ... we cannot use _ as the conversion set is not expanded
- % \defineconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]%
\to \everydefineitemgroup
%D Global states
\def\strc_itemgroups_store_continue_state#options#settings%
- {\setxvalue{\??itemgroupoption \currentitemgroup}{\strc_itemgroups_process_options{#options}}%
- \setgvalue{\??itemgroupsetting\currentitemgroup}{\setupcurrentitemgroup[#settings]}}
+ {\xdefcsname\??itemgroupoption \currentitemgroup\endcsname{\strc_itemgroups_process_options{#options}}%
+ \gdefcsname\??itemgroupsetting\currentitemgroup\endcsname{\setupcurrentitemgroup[#settings]}}
\def\strc_itemgroups_fetch_continue_state
{\csname\??itemgroupoption \currentitemgroup\endcsname
\csname\??itemgroupsetting\currentitemgroup\endcsname}
\def\strc_itemgroups_reset_continue_state
- {\expandafter\glet\csname\??itemgroupoption \currentitemgroup\endcsname\relax
- \expandafter\glet\csname\??itemgroupsetting\currentitemgroup\endcsname\relax}
+ {\gletcsname\??itemgroupoption \currentitemgroup\endcsname\relax
+ \gletcsname\??itemgroupsetting\currentitemgroup\endcsname\relax}
% These will become keywords. We will also add a feature to keep the while set
% together.
@@ -386,26 +385,29 @@
\vspacing[\v!item @500]%
\fi}
-\unexpanded\def\strc_itemgroups_process_options#options%
+\protected\def\strc_itemgroups_process_options#options%
{\processcommacommand[#options]\strc_itemgroups_process_option} % expansion of options is handy for xml
% \installcommalistprocessorcommand \strc_itemgroups_process_option_list \strc_itemgroups_process_option
%
-% \unexpanded\def\strc_itemgroups_process_options#options%
+% \protected\def\strc_itemgroups_process_options#options%
% {\normalexpanded{\strc_itemgroups_process_option_list[#options]}} % expansion of options is handy for xml
+\mutable\let\itemgroupfirst \empty
+\mutable\let\itemgroupsecond\empty
+
\def\strc_itemgroups_process_option#option%
- {\edef\itemgroupconstantvalue{#option}%
- \ifx\itemgroupconstantvalue\empty\else
- \splitatasterisk\itemgroupconstantvalue\itemgroupfirst\itemgroupsecond
- \ifx\itemgroupsecond\empty
+ {\edef\scratchstringone{#option}%
+ \ifempty\scratchstringone\else
+ \splitatasterisk\scratchstringone\itemgroupfirst\itemgroupsecond
+ \ifempty\itemgroupsecond
\let\itemgroupsecond\itemgroupfirst
\let\itemgroupfirst\!!plusone
\fi
\ifcsname\??itemgroupkeyword\itemgroupsecond\endcsname
\lastnamedcs
\else
- \strc_itemgroups_set_symbol\itemgroupconstantvalue
+ \strc_itemgroups_set_symbol\scratchstringone
\fi
\fi}
@@ -424,7 +426,7 @@
\setvalue{\??itemgroupkeyword\v!unpacked }{\strc_itemgroups_process_set_option_unpack}
\setvalue{\??itemgroupkeyword\v!intro }{\settrue\c_strc_itemgroups_intro} % here? not set to false
\setvalue{\??itemgroupkeyword\v!autointro }{\settrue\c_strc_itemgroups_auto_intro}
-\setvalue{\??itemgroupkeyword\v!broad }{\ifx\itemgroupfirst\empty
+\setvalue{\??itemgroupkeyword\v!broad }{\ifempty\itemgroupfirst
\let\itemgroupfirst\!!plusone
\fi
\letitemgroupparameter\c!factor\itemgroupfirst}
@@ -450,7 +452,7 @@
\setvalue{\??itemgroupkeyword\v!joinedup }{\settrue\c_strc_itemgroups_joined
\strc_itemgroups_process_set_option_pack}
\setvalue{\??itemgroupkeyword\v!notjoinedup}{\setfalse\c_strc_itemgroups_joined}
-\setvalue{\??itemgroupkeyword\v!serried }{\edef\itemgroupfirst{-\ifx\itemgroupfirst\empty1\else\itemgroupfirst\fi}%
+\setvalue{\??itemgroupkeyword\v!serried }{\edef\itemgroupfirst{-\ifempty\itemgroupfirst1\else\itemgroupfirst\fi}%
\letitemgroupparameter\c!factor\itemgroupfirst}
\setvalue{\??itemgroupkeyword\v!stopper }{\letitemgroupparameter\c!placestopper\v!yes} % keep {}
\setvalue{\??itemgroupkeyword\v!nostopper }{\letitemgroupparameter\c!placestopper\v!no} % keep {}
@@ -532,8 +534,8 @@
\lastnamedcs
\fi}
-\ifdefined\dotagsetitemgroup \else \let\dotagsetitemgroup\relax \fi
-\ifdefined\dotagsetitem \else \let\dotagsetitem \gobbleoneargument \fi
+\ifdefined\dotagsetitemgroup \else \aliased\let\dotagsetitemgroup\relax \fi
+\ifdefined\dotagsetitem \else \aliased\let\dotagsetitem \gobbleoneargument \fi
\def\strc_itemgroups_tag_start_group
{\dostarttaggedchained\t!itemgroup\currentparentitemgroup\??itemgroup
@@ -599,29 +601,31 @@
\let\strc_itemgroups_normal_setup\setupitemgroup
-\unexpanded\def\setupitemgroup
- {\doquadrupleempty\strc_itemgroups_setup}
-
-\def\strc_itemgroups_setup[#category][#levels][#options][#settings]% category level|each options|settings settings|options
- {\edef\strc_itemgroups_setup_what{#levels}%
- \iffourthargument
+\permanent\overloaded\tolerant\protected\def\setupitemgroup[#category]#spacer[#levels]#spacer[#options]#spacer[#settings]% category level|each options|settings settings|options
+ {\ifarguments
+ % nothing to set up
+ \or
+ \edef\strc_itemgroups_setup_what{#levels}%
+ \strc_itemgroups_normal_setup[#category]% == settings
+ \or
+ \edef\strc_itemgroups_setup_what{#levels}%
+ \strc_itemgroups_setup_each{#category}{#levels}%
+ \or
+ \edef\strc_itemgroups_setup_what{#levels}%
\ifx\strc_itemgroups_setup_what\v!each
\strc_itemgroups_setup_each{#category}{#options}%
- \strc_itemgroups_setup_each{#category}{#settings}%
\else
\strc_itemgroups_setup_list{#levels}{#category}{#options}%
- \strc_itemgroups_setup_list{#levels}{#category}{#settings}%
\fi
- \orelse\ifthirdargument
+ \or
+ \edef\strc_itemgroups_setup_what{#levels}%
\ifx\strc_itemgroups_setup_what\v!each
\strc_itemgroups_setup_each{#category}{#options}%
+ \strc_itemgroups_setup_each{#category}{#settings}%
\else
\strc_itemgroups_setup_list{#levels}{#category}{#options}%
+ \strc_itemgroups_setup_list{#levels}{#category}{#settings}%
\fi
- \orelse\ifsecondargument
- \strc_itemgroups_setup_each{#category}{#levels}%
- \else
- \strc_itemgroups_normal_setup[#category]% == settings
\fi}
% can be made a bit faster
@@ -658,12 +662,12 @@
\def\strc_itemgroups_increment_item_counter
{\ifconditional\c_strc_itemgroups_sub \else
- \ifconditional\c_strc_itemgroups_symbol \else % \ifx\strc_itemgroups_extra_symbol\empty
+ \ifconditional\c_strc_itemgroups_symbol \else % \ifempty\strc_itemgroups_extra_symbol
\strc_counters_increment_sub\v_strc_itemgroups_counter\currentitemlevel
\fi
\fi}
-\unexpanded\def\strc_itemgroups_insert_item_counter
+\protected\def\strc_itemgroups_insert_item_counter
{\ifconditional\c_strc_itemgroups_repeat
\ifcase\c_strc_itemgroups_nesting
% skip
@@ -676,6 +680,12 @@
\strc_itemgroups_insert_item_counter_indeed
\fi}
+\installcorenamespace{itemstopper}
+
+\setvalue{\??itemstopper\v!yes }{\itemgroupparameter\c!stopper}
+\setvalue{\??itemstopper\v!display}{\ifconditional\c_strc_itemgroups_inline\else\itemgroupparameter\c!stopper\fi}
+\setvalue{\??itemstopper\v!inline }{\ifconditional\c_strc_itemgroups_inline\itemgroupparameter\c!stopper\fi}
+
\def\strc_itemgroups_insert_item_counter_indeed % quite slow ... every time this setup .. but it
{\begingroup % can be optimized ... best move some to strc-num
\setupcounter
@@ -690,12 +700,12 @@
\c!prefixconnector=\itemgroupparameter\c!prefixconnector,
\c!criterium=\itemgroupparameter\c!criterium,
\c!numberorder=\ifconditional\c_strc_itemgroups_reverse\v!reverse\else\v!normal\fi,
- \c!numberstopper=\expdoif{\itemgroupparameter\c!placestopper}\v!yes{\itemgroupparameter\c!stopper},
+ \c!numberstopper=\begincsname\??itemstopper\itemgroupparameter\c!placestopper\endcsname,
\c!numberconversionset=\v_strc_itemgroups_counter,
\c!numbersegments=\currentitemgroupsegments]%
% there will be a fixedconversion key
- %\normalexpanded{\defineconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
- \normalexpanded{\strc_sets_define_conversion_set[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
+ \normalexpanded{\defineconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
+ %\normalexpanded{\strc_sets_define_conversion_set[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
%
\convertedcounter[\v_strc_itemgroups_counter]% [\number\currentitemlevel]%
\strc_itemgroups_insert_reference
@@ -731,25 +741,31 @@
% \strc_itemgroups_insert_reference
% \endgroup}
+\let\strc_itemgroups_temp_symbol \empty
+\let\strc_itemgroups_used_symbol \empty
+\let\strc_itemgroups_asked_symbol \empty
+\let\strc_itemgroups_margin_symbol\empty
+\let\strc_itemgroups_extra_symbol \empty
+
\def\strc_itemgroups_set_symbol#symbol%
- {\edef\strc_itemgroups_tmp_symbol{#symbol}%
- \ifx\strc_itemgroups_tmp_symbol\empty \else
- \doifelsesymboldefined\strc_itemgroups_tmp_symbol
+ {\edef\strc_itemgroups_temp_symbol{#symbol}%
+ \ifempty\strc_itemgroups_temp_symbol \else
+ \doifelsesymboldefined\strc_itemgroups_temp_symbol
\strc_itemgroups_set_symbol_symbol
- {\doifelseconversiondefined\strc_itemgroups_tmp_symbol
+ {\doifelseconversiondefined\strc_itemgroups_temp_symbol
\strc_itemgroups_set_symbol_conversion
\donothing}%
\fi}
\def\strc_itemgroups_set_symbol_symbol
- {\let\currentitemgroupsymbol\strc_itemgroups_tmp_symbol
+ {\let\currentitemgroupsymbol\strc_itemgroups_temp_symbol
\strc_itemgroups_store_global_symbol\currentitemgroupsymbol
\strc_itemgroups_store_local_symbol\v_strc_itemgroups_unknown_symbol
\let\strc_itemgroups_used_symbol\strc_itemgroups_set_symbol_symbol_item
\let\strc_itemgroups_asked_symbol\empty}
\def\strc_itemgroups_set_symbol_conversion
- {\let\currentitemgroupsymbol\strc_itemgroups_tmp_symbol
+ {\let\currentitemgroupsymbol\strc_itemgroups_temp_symbol
\strc_itemgroups_store_global_symbol\currentitemgroupsymbol
\strc_itemgroups_store_local_symbol\strc_itemgroups_insert_item_counter
\let\strc_itemgroups_used_symbol\strc_itemgroups_set_symbol_conversion_item
@@ -771,7 +787,7 @@
\fi}
\def\strc_itemgroups_calculate_list_width#level%
- {\let\savedcurrentitemgroup\currentitemgroup
+ {\let\m_strc_itemgroups_saved\currentitemgroup
\edef\currentitemgroup{\currentparentitemgroup:\number#level}%
\ifdim\d_strc_itemgroups_max_width>\zeropoint
\d_strc_itemgroups_list_width\d_strc_itemgroups_max_width
@@ -784,13 +800,14 @@
\d_strc_itemgroups_list_width\itemgroupparameter\c!width\relax
\fi
\advance\d_strc_itemgroups_list_width\itemgroupparameter\c!distance\relax
- \let\currentitemgroup\savedcurrentitemgroup}
+ \let\currentitemgroup\m_strc_itemgroups_saved}
-\unexpanded\def\startitemgroup
- {\dotripleempty\strc_itemgroups_start}
+\let\p_itemgroups_options \empty
+\let\p_itemgroups_extra_options\empty
-\def\strc_itemgroups_start[#category][#options][#settings]%
+\permanent\tolerant\protected\def\startitemgroup[#category]#spacer[#options]#spacer[#settings]%
{\begingroup % (1)
+ \nofarguments\lastarguments
\def\currentitemgroup{#category}% no nested mixing of itemgroups
\let\currentparentitemgroup\currentitemgroup
\global\advance\c_strc_itemgroups_nesting\plusone
@@ -798,33 +815,37 @@
\normalexpanded{\chaintocurrentitemgroup{\currentparentitemgroup:\currentitemlevel}}%
\edef\currentitemgroup{\currentparentitemgroup:\currentitemlevel}%
%
- \ifthirdargument
- \strc_itemgroups_start_indeed[#options][#settings]%
- \orelse\ifsecondargument
- \ifcondition\validassignment{#options}%
- \strc_itemgroups_start_indeed[][#options]%
+ \edef\p_itemgroups_options{\itemgroupparameter\c!option}%
+ \let\p_itemgroups_extra_options\empty
+ \ifcase\nofarguments
+ \strc_itemgroups_start_indeed{}%
+ \or
+ \strc_itemgroups_start_indeed{}%
+ \or
+ \ifhastok={#options}%
+ \strc_itemgroups_start_indeed{#options}%
\else
- \strc_itemgroups_start_indeed[#options][]%
+ \edef\p_itemgroups_extra_options{#options}%
+ \strc_itemgroups_start_indeed{}%
\fi
- \else
- \strc_itemgroups_start_indeed[][]%
+ \or
+ \edef\p_itemgroups_extra_options{#options}%
+ \strc_itemgroups_start_indeed{#settings}%
\fi}
-\def\strc_itemgroups_start_indeed[#options][#settings]%
- {\edef\itemgroupoptions{\itemgroupparameter\c!option}%
- \edef\itemgroupextraoptions{#options}%
- \ifx\itemgroupoptions\empty
- \let\itemgroupoptions\itemgroupextraoptions
- \orelse\ifx\itemgroupextraoptions\empty
+\def\strc_itemgroups_start_indeed#settings%
+ {\ifempty\p_itemgroups_options
+ \let\p_itemgroups_options\p_itemgroups_extra_options
+ \orelse\ifempty\p_itemgroups_extra_options
% ok
\else
- \edef\itemgroupoptions{\itemgroupoptions,\itemgroupextraoptions}%
+ \edef\p_itemgroups_options{\p_itemgroups_options,\p_itemgroups_extra_options}%
\fi
\begingroup % (2)
\the\itemgroupcommands
- \let\c_strc_itemgroups_text_saved\c_strc_itemgroups_text
+ \setconditional\c_strc_itemgroups_text_saved\c_strc_itemgroups_text
\strc_itemgroups_initialize_local
- \strc_itemgroups_preset_stage_one\itemgroupoptions
+ \strc_itemgroups_preset_stage_one\p_itemgroups_options
%
% \ifhmode
% \ifconditional\c_strc_itemgroups_auto_concat
@@ -844,19 +865,19 @@
\fi
\c_strc_itemgroups_n_of_items\zerocount
\strc_itemgroups_check_n_of_items
- \ifx\itemgroupoptions\empty
+ \ifempty\p_itemgroups_options
\strc_itemgroups_setup_symbol_default
\strc_itemgroups_reset_continue_state
\setupcurrentitemgroup[#settings]%
\else
- \strc_itemgroups_process_options\itemgroupoptions
+ \strc_itemgroups_process_options\p_itemgroups_options
\setupcurrentitemgroup[#settings]%
\ifconditional\c_strc_itemgroups_continue
\strc_itemgroups_setup_symbol_continue
\strc_itemgroups_fetch_continue_state
\else
\strc_itemgroups_setup_symbol_asked
- \strc_itemgroups_store_continue_state\itemgroupoptions{#settings}%
+ \strc_itemgroups_store_continue_state\p_itemgroups_options{#settings}%
\fi
\fi
%
@@ -896,9 +917,9 @@
\strc_counters_restart_sub\v_strc_itemgroups_counter\currentitemlevel{\numexpr\itemgroupparameter\c!start-\plusone\relax}%
\fi
\fi
- \ifx\strc_itemgroups_used_symbol\empty
+ \ifempty\strc_itemgroups_used_symbol
\strc_itemgroups_set_symbol\strc_itemgroups_asked_symbol % ** default value
- \ifx\strc_itemgroups_used_symbol\empty
+ \ifempty\strc_itemgroups_used_symbol
\let\currentitemgroupsymbol\currentitemlevel % ** fall back
\fi
\fi
@@ -914,12 +935,12 @@
\letitemgroupparameter\c!inbetween\empty
\fi
\ifconditional\c_strc_itemgroups_columns
- \ifinsidecolumns\else\ifcase\c_strc_itemgroups_column_depth
+ \ifinsidecolumns\orelse\ifcase\c_strc_itemgroups_column_depth
\global\c_strc_itemgroups_column_depth\c_strc_itemgroups_nesting % global ?
\strc_itemgroups_before_command
\strc_itemgroups_tag_start_group
\strc_itemgroups_start_columns
- \fi\fi
+ \fi
\fi
\ifconditional\c_strc_itemgroups_fitting
\ifdim\d_strc_itemgroups_max_width>\zeropoint
@@ -929,10 +950,10 @@
\strc_itemgroups_calculate_list_width\c_strc_itemgroups_nesting
\ifdim\d_strc_itemgroups_list_width>\zeropoint\relax
\ifconditional\c_strc_itemgroups_inline\else
- \advance\leftskip\d_strc_itemgroups_list_width\relax
+ \frozen\advance\leftskip\d_strc_itemgroups_list_width\relax
\fi
\fi
- \ifx\m_strc_itemgroups_repeat_start\empty
+ \ifempty\m_strc_itemgroups_repeat_start
\let\currentitemgroupconversionset \currentitemgroupsymbol
\edef\currentitemgroupsegments {\currentitemlevel}%
\else
@@ -992,8 +1013,8 @@
% will be redefined in page-mix
\ifdefined\startcolumns \else
- \unexpanded\def\startcolumns[#settings]{}
- \unexpanded\def\stopcolumns {}
+ \protected\def\startcolumns[#settings]{}
+ \protected\def\stopcolumns {}
\fi
\def\strc_itemgroups_start_columns
@@ -1009,7 +1030,7 @@
\fi
-\unexpanded\def\stopitemgroup
+\permanent\protected\def\stopitemgroup
{\stopcollectitems
\ifconditional\c_strc_itemgroups_text
\removeunwantedspaces
@@ -1063,9 +1084,6 @@
% The items.
-\unexpanded\def\startitemgroupitem
- {\dosingleempty\strc_itemgroups_start_item}
-
\def\strc_itemgroups_start_item_first
{\setfalse\c_strc_itemgroups_first
% \begingroup % (3)
@@ -1085,17 +1103,22 @@
\ifconditional\c_strc_itemgroups_intro\strc_itemgroups_insert_breakno\fi
\fi}
+\newcount\c_strc_itemgroups_prev_level
+
+\def\strc_itemgroups_inbetween_command
+ {\nameditemgroupparameter{\currentparentitemgroup:\number\c_strc_itemgroups_prev_level}\c!inbetween}
+
\def\strc_itemgroups_start_item_first_two
{\ifconditional\c_strc_itemgroups_paragraph\else
- \edef\previtemlevel{\the\numexpr\c_strc_itemgroups_nesting-\plusone}%
+ \c_strc_itemgroups_prev_level\numexpr\c_strc_itemgroups_nesting-\plusone\relax
\ifcase\c_strc_itemgroups_spacing_mode
\strc_itemgroups_before_command
\or
\doifelsenothing\strc_itemgroups_before_command % should possibly expand to empty
- {\nameditemgroupparameter{\currentparentitemgroup:\previtemlevel}\c!inbetween}%
+ \strc_itemgroups_inbetween_command
\strc_itemgroups_before_command
\else
- \nameditemgroupparameter{\currentparentitemgroup:\previtemlevel}\c!inbetween
+ \strc_itemgroups_inbetween_command
\fi
\strc_itemgroups_tag_start_group
\fi}
@@ -1127,7 +1150,9 @@
% \stopitemize
% \stopitemize
-\unexpanded\def\strc_itemgroups_start_item[#reference]% we can reuse more
+\mutable\let\currentitemreference\empty
+
+\tolerant\permanent\protected\def\startitemgroupitem[#reference]% we can reuse more
{\def\currentitemreference{#reference}%
\ifconditional\c_strc_itemgroups_text
% begin of item
@@ -1165,7 +1190,7 @@
\hskip\d_strc_itemgroups_signal % concat
\itemgroupparameter\c!command}
-\unexpanded\def\stopitemgroupitem
+\protected\permanent\def\stopitemgroupitem
{\ifhmode
\endstrut % new per 2017-12-15
\fi
@@ -1174,10 +1199,8 @@
\else
\endgraf
\fi}
-\unexpanded\def\startitemgrouphead
- {\dosingleempty\strc_itemgroups_start_head}
-\unexpanded\def\strc_itemgroups_start_head[#reference]%
+\tolerant\permanent\protected\def\startitemgrouphead[#reference]%
{\ifconditional\c_strc_itemgroups_first \else
\strc_itemgroups_insert_breakallow
\fi
@@ -1191,23 +1214,24 @@
\fi
\fi
\fi
- \strc_itemgroups_start_item[#reference]%
+ %\strc_itemgroups_start_item[#reference]%
+ \startitemgroupitem[#reference]%
\pickupgroupedcommand
\strc_itemgroups_start_head_indeed
\strc_itemgroups_stop_head_indeed
\strc_itemgroups_head_body_indeed}
-\unexpanded\def\stopitemgrouphead
+\protected\permanent\def\stopitemgrouphead
{\dostoptagged
\stopitemgroupitem}
-\unexpanded\def\strc_itemgroups_start_head_indeed
+\protected\def\strc_itemgroups_start_head_indeed
{\settrue\c_strc_itemgroups_head
\dotagsetitem\s!head% % weird place
\dostarttagged\t!itemhead\empty
\useitemgroupstyleandcolor\c!headstyle\c!headcolor\ignorespaces}
-\unexpanded\def\strc_itemgroups_stop_head_indeed
+\protected\def\strc_itemgroups_stop_head_indeed
{\removeunwantedspaces
\dostoptagged
\ifconditional\c_strc_itemgroups_inline_head
@@ -1225,17 +1249,17 @@
\strc_itemgroups_insert_breakno
\fi}
-\unexpanded\def\strc_itemgroups_head_body_indeed
+\protected\def\strc_itemgroups_head_body_indeed
{\dostarttagged\t!itembody\empty
\noindentation
\ignorespaces}
% Simple commands.
-\unexpanded\def\strc_itemgroups_start_do_item
+\protected\def\strc_itemgroups_start_do_item
{\startitemgroupitem}
-\unexpanded\def\strc_itemgroups_start_no_item
+\protected\def\strc_itemgroups_start_no_item
{\let\currentitemreference\empty
\strc_itemgroups_increment_item_counter
%\advance\c_strc_itemgroups_n_of_items\plusone
@@ -1243,27 +1267,27 @@
\strc_itemgroups_check_for_repeated
\ignorespaces}
-\unexpanded\def\strc_itemgroups_start_button[#destination]%
+\protected\def\strc_itemgroups_start_button[#destination]%
{\edef\m_strc_itemgroups_destination{#destination}%
\startitemgroupitem}
-\unexpanded\def\strc_itemgroups_start_symbol#text%
+\protected\def\strc_itemgroups_start_symbol#text%
{\def\strc_itemgroups_extra_symbol{#text}%
\settrue\c_strc_itemgroups_symbol
\startitemgroupitem
\dotagsetitem\s!symbol}
-\unexpanded\def\strc_itemgroups_start_dummy
+\protected\def\strc_itemgroups_start_dummy
{\strc_itemgroups_start_symbol
%\strut\strut} % two ?
\begstrut}
-\unexpanded\def\strc_itemgroups_start_subitem
+\protected\def\strc_itemgroups_start_subitem
{\settrue\c_strc_itemgroups_sub
\startitemgroupitem
\dotagsetitem\s!sub}
-\unexpanded\def\strc_itemgroups_start_edge#text%
+\protected\def\strc_itemgroups_start_edge#text%
{\strc_itemgroups_start_symbol
{\strc_itemgroups_calculate_list_width\c_strc_itemgroups_nesting
\dostarttagged\t!ignore\empty % for the moment, maybe an attribute
@@ -1271,7 +1295,7 @@
{#text\hskip\itemgroupparameter\c!distance}%
\dostoptagged}}
-\unexpanded\def\strc_itemgroups_start_margin#text%
+\protected\def\strc_itemgroups_start_margin#text%
{\def\strc_itemgroups_margin_symbol % brrr
{\dostarttagged\t!ignore\empty % for the moment, maybe an attribute
\llap
@@ -1284,35 +1308,32 @@
\startitemgroupitem
\dotagsetitem\s!margin}
-\unexpanded\def\strc_itemgroups_start_text#text%
+\protected\def\strc_itemgroups_start_text#text%
{\def\strc_itemgroups_extra_symbol{#text}%
\settrue\c_strc_itemgroups_symbol
\settrue\c_strc_itemgroups_txt
\startitemgroupitem}
-% \unexpanded\def\strc_itemgroups_start_head
+% \protected\def\strc_itemgroups_start_head
% {\settrue\c_strc_itemgroups_head
% \startitemgrouphead}
-\unexpanded\def\strc_itemgroups_start_items
+\protected\def\strc_itemgroups_start_items
{\dosingleempty\strc_itemgroups_start_items_indeed}
-\unexpanded\def\strc_itemgroups_start_items_indeed[#whatever]% something got lost
+\protected\def\strc_itemgroups_start_items_indeed[#whatever]% something got lost
{\strc_itemgroups_start_edge
{\dorecurse{0\itemgroupparameter\c!items}{\strc_itemgroups_used_symbol\hss}%
\unskip}}
-% \unexpanded\def\startspecialitemgroupitem[#name]%
-% {\csname\??itemgroupstart\ifcsname\??itemgroupstart#name\endcsname#name\else\v!item\fi\endcsname}
-
-\unexpanded\def\startspecialitemgroupitem[#name]%
+\protected\permanent\def\startspecialitemgroupitem[#name]% todo: frozen
{\ifcsname\??itemgroupstart#name\endcsname
\expandafter\lastnamedcs
\else
\expandafter\strc_itemgroups_start_do_item
\fi}
-\unexpanded\def\stopspecialitemgroupitem
+\protected\permanent\def\stopspecialitemgroupitem % todo: frozen
{\stopitemgroupitem}
\letvalue{\??itemgroupstart\v!item}\strc_itemgroups_start_do_item
@@ -1321,8 +1342,9 @@
\letvalue{\??itemgroupstart\v!ran }\strc_itemgroups_start_edge
\letvalue{\??itemgroupstart\v!its }\strc_itemgroups_start_items
\letvalue{\??itemgroupstart\v!mar }\strc_itemgroups_start_margin
+\letvalue{\??itemgroupstart\v!txt }\strc_itemgroups_start_text
-\def\optimizelistitemsbreak
+\def\strc_itemgroups_optimize_breaks
{\ifcase\c_strc_itemgroups_column_depth
\ifconditional\c_strc_itemgroups_optimize
\ifcase\c_strc_itemgroups_max_items
@@ -1404,11 +1426,12 @@
\box\b_strc_itemgroups
\hss}} % was: \hfill
-\unexpanded\def\strc_itemgroups_start_head_sym#text%
+\protected\def\strc_itemgroups_start_head_sym#text%
{\def\strc_itemgroups_extra_symbol{#text}%
\settrue\c_strc_itemgroups_symbol
\settrue\c_strc_itemgroups_head
- \strc_itemgroups_start_head}
+ %\strc_itemgroups_start_head}
+ \startitemgrouphead}
\def\strc_itemgroups_make_symbol_box
{\setbox\b_strc_itemgroups\autodirhbox
@@ -1453,13 +1476,13 @@
{\box\b_strc_itemgroups\hskip\itemgroupparameter\c!distance}}}
\def\strc_itemgroups_make_destination_box
- {\iftrialtypesetting \orelse \ifx\m_strc_itemgroups_destination\empty \else
+ {\iftrialtypesetting \orelse \ifempty\m_strc_itemgroups_destination \else
\setbox\b_strc_itemgroups\hbox{\directgotobox{\box\b_strc_itemgroups}[\m_strc_itemgroups_destination]}%
\fi}
\def\strc_itemgroups_check_indenting
{\setfalse\c_strc_itemgroups_indented_first
- \ifx\m_strc_itemgroups_indenting\empty \else
+ \ifempty\m_strc_itemgroups_indenting \else
\normalexpanded{\setupindenting[\v!reset,\v!yes,\m_strc_itemgroups_indenting]}%
\ifconditional\c_spac_indentation_indent_first % better is to have a mode
\doifnot{\itemgroupparameter\c!alignsymbol}\v!yes
@@ -1469,7 +1492,7 @@
\def\strc_itemgroups_check_for_repeated
{\ifconditional\c_strc_itemgroups_repeat
- \ifx\m_strc_itemgroups_repeat_start\empty
+ \ifempty\m_strc_itemgroups_repeat_start
\edef\m_strc_itemgroups_repeat_start{\currentitemlevel}%
\fi
\else
@@ -1483,7 +1506,7 @@
\par % done twice?
\fi
\advance\c_strc_itemgroups_n_of_items\plusone
- \optimizelistitemsbreak
+ \strc_itemgroups_optimize_breaks
\strc_itemgroups_check_indenting
\dontleavehmode
\ifconditional\c_strc_itemgroups_indented_first
@@ -1493,9 +1516,9 @@
\strc_itemgroups_make_destination_box
\ifconditional\c_strc_itemgroups_fitting
\strc_itemgroups_make_fitting_box
- \else\ifdim\d_strc_itemgroups_asked_width>\zeropoint
+ \orelse\ifdim\d_strc_itemgroups_asked_width>\zeropoint
\strc_itemgroups_make_aligned_box
- \fi\fi
+ \fi
\let\m_strc_itemgroups_destination\empty
\ht\b_strc_itemgroups\strutheight % just in case a symbols is not yet available in
\dp\b_strc_itemgroups\strutdepth % the current run (more a mkii mp side artifact)
@@ -1539,14 +1562,14 @@
{\let\m_strc_itemgroups_text_distance\zeropoint}
\setvalue{\??itemgroupdistance\v!space}%
- {\def\m_strc_itemgroups_text_distance{\interwordspace\!!plus\interwordstretch\!!minus\interwordshrink}}
+ {\def\m_strc_itemgroups_text_distance{\interwordspace\s!plus\interwordstretch\s!minus\interwordshrink}}
\setvalue\??itemgroupdistance % catches empty value
{\let\m_strc_itemgroups_text_distance\zeropoint}
-\unexpanded\def\strc_itemgroups_set_text_item_distance
+\protected\def\strc_itemgroups_set_text_item_distance
{\edef\m_strc_itemgroups_text_distance{\itemgroupparameter\c!textdistance}%
- \ifx\m_strc_itemgroups_text_distance\empty
+ \ifempty\m_strc_itemgroups_text_distance
%
\orelse\ifcsname\??itemgroupdistance\m_strc_itemgroups_text_distance\endcsname
\lastnamedcs
@@ -1558,57 +1581,85 @@
{\assignvalue
\m_strc_itemgroups_text_distance
\m_strc_itemgroups_text_distance
- {.5\interwordspace\!!plus.5\emwidth}%
- {\interwordspace \!!plus \emwidth}%
- {\emwidth \!!plus \interwordstretch\!!minus\interwordshrink}}
+ {.5\interwordspace\s!plus.5\emwidth}%
+ {\interwordspace \s!plus \emwidth}%
+ {\emwidth \s!plus \interwordstretch\s!minus\interwordshrink}}
-% \unexpanded\def\strc_itemgroups_default_command
+% \protected\def\strc_itemgroups_default_command
% {\EveryPar{\ignorespaces}% needed ?
% \ignorespaces}
-\unexpanded\def\strc_itemgroups_default_command
+\protected\def\strc_itemgroups_default_command
{\ignorespaces}
%D Special case:
-\unexpanded\def\strc_itemgroups_head#text\par
+\protected\def\strc_itemgroups_head#text\par
{\startitemgrouphead{#text}}
%D The local commands:
+\ifdefined\item \else \let\item \relax \fi % defined later
+\ifdefined\sub \else \aliased\let\sub \relax \fi
+\ifdefined\sym \else \aliased\let\sym \relax \fi
+\ifdefined\ran \else \aliased\let\ran \relax \fi
+\ifdefined\its \else \aliased\let\its \relax \fi
+\ifdefined\mar \else \aliased\let\mar \relax \fi
+\ifdefined\noitem \else \aliased\let\noitem \relax \fi
+\ifdefined\itm \else \aliased\let\itm \relax \fi
+\ifdefined\but \else \aliased\let\but \relax \fi
+%ifdefined\nop \else \let\nop \relax \fi % used often by myself
+\ifdefined\txt \else \aliased\let\txt \relax \fi
+\ifdefined\head \else \let\head \relax \fi % defined later
+\ifdefined\headsym \else \aliased\let\headsym \relax \fi
+\ifdefined\startitem \else \let\startitem \relax \fi % defined later
+\ifdefined\stopitem \else \aliased\let\stopitem \relax \fi
+\ifdefined\starthead \else \aliased\let\starthead \relax \fi
+\ifdefined\stophead \else \aliased\let\stophead \relax \fi
+\ifdefined\startspecialitem \else \aliased\let\startspecialitem\relax \fi
+\ifdefined\stopspecialitem \else \aliased\let\stopspecialitem \relax \fi
+
+
\appendtoks
- \let\item \strc_itemgroups_start_do_item
- \let\noitem \strc_itemgroups_start_no_item
- \let\itm \strc_itemgroups_start_do_item
- \let\but \strc_itemgroups_start_button
- \let\nop \strc_itemgroups_start_dummy
- \let\txt \strc_itemgroups_start_text
- \let\head \strc_itemgroups_head
- \let\headsym \strc_itemgroups_start_head_sym
- \let\startitem \startitemgroupitem
- \let\stopitem \stopitemgroupitem
- \let\starthead \startitemgrouphead
- \let\stophead \stopitemgroupitemhead
- \let\startspecialitem\startspecialitemgroupitem
- \let\stopspecialitem \stopspecialitemgroupitem
+ \enforced\let\item \strc_itemgroups_start_do_item
+ \enforced\let\sub \strc_itemgroups_start_subitem
+ \enforced\let\sym \strc_itemgroups_start_symbol
+ \enforced\let\ran \strc_itemgroups_start_edge
+ \enforced\let\its \strc_itemgroups_start_items
+ \enforced\let\mar \strc_itemgroups_start_margin
+ \enforced\let\noitem \strc_itemgroups_start_no_item
+ \enforced\let\itm \strc_itemgroups_start_do_item
+ \enforced\let\but \strc_itemgroups_start_button
+ \enforced\let\nop \strc_itemgroups_start_dummy
+ \enforced\let\txt \strc_itemgroups_start_text
+ \enforced\let\head \strc_itemgroups_head
+ \enforced\let\headsym \strc_itemgroups_start_head_sym
+ \enforced\let\startitem \startitemgroupitem
+ \enforced\let\stopitem \stopitemgroupitem
+ \enforced\let\starthead \startitemgrouphead
+ \enforced\let\stophead \stopitemgrouphead
+ \enforced\let\startspecialitem\startspecialitemgroupitem
+ \enforced\let\stopspecialitem \stopspecialitemgroupitem
\to \itemgroupcommands
-\ifx\currentinterface \v!english \else
-
- \appendtoks
- \expandafter\let\csname\v!item \endcsname\strc_itemgroups_start_do_item
- \expandafter\let\csname\v!sub \endcsname\strc_itemgroups_start_subitem
- \expandafter\let\csname\v!sym \endcsname\strc_itemgroups_start_symbol
- \expandafter\let\csname\v!ran \endcsname\strc_itemgroups_start_edge
- \expandafter\let\csname\v!head \endcsname\strc_itemgroups_head
- \expandafter\let\csname\v!its \endcsname\strc_itemgroups_start_items
- \expandafter\let\csname\v!mar \endcsname\strc_itemgroups_start_margin
- \expandafter\let\csname\v!txt \endcsname\strc_itemgroups_start_text
- \expandafter\let\csname\e!start\v!item\endcsname\startitemgroupitem
- \expandafter\let\csname\e!stop \v!item\endcsname\stopitemgroupitem
- \expandafter\let\csname\e!start\v!head\endcsname\startitemgrouphead
- \expandafter\let\csname\e!stop \v!head\endcsname\stopitemgrouphead
- \to \itemgroupcommands
+\ifx\currentinterface \s!english \else
+
+ \def\next#1#2{\ifcsname#1\endcsname\else\enforced\aliased\letcsname#1\endcsname#2\fi}
+
+ \etoksapp\itemgroupcommands{%
+ \next{\v!item }\strc_itemgroups_start_do_item
+ \next{\v!sub }\strc_itemgroups_start_subitem
+ \next{\v!sym }\strc_itemgroups_start_symbol
+ \next{\v!ran }\strc_itemgroups_start_edge
+ \next{\v!head }\strc_itemgroups_head
+ \next{\v!its }\strc_itemgroups_start_items
+ \next{\v!mar }\strc_itemgroups_start_margin
+ \next{\v!txt }\strc_itemgroups_start_text
+ \next{\e!start\v!item}\startitemgroupitem
+ \next{\e!stop \v!item}\stopitemgroupitem
+ \next{\e!start\v!head}\startitemgrouphead
+ \next{\e!stop \v!head}\stopitemgrouphead
+ }
\fi
@@ -1652,18 +1703,16 @@
\newcount\c_strc_itemgroups_collected_done
\newcount\c_strc_itemgroups_collected_current
-% \expandafter\def\expandafter\strc_itemgroups_collected_store\expandafter#\expandafter1\csname\e!stop\v!item\endcsname % use grabuntil
-% {\advance\c_strc_itemgroups_collected_stored\plusone
-% \setvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_stored}{\startitemgroupitem#1\stopitemgroupitem}}
-
\let\strc_itemgroups_collected_store\relax
+\let\m_strc_itemgroups_collected\empty
+
\normalexpanded{\def\strc_itemgroups_collected_store#1\csname\e!stop\v!item\endcsname}%
{\advance\c_strc_itemgroups_collected_stored\plusone
\setvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_stored}{\startitemgroupitem#1\stopitemgroupitem}}
\def\strc_itemgroups_collected_flush_randomize
- {\collecteditemgroupitem}
+ {\m_strc_itemgroups_collected}
\def\strc_itemgroups_collected_flush_horizontal
{\begingroup
@@ -1676,18 +1725,12 @@
\fi
\fi
\noindent % no \dontleavehmode
- \hbox to \dimexpr\availablehsize/\scratchcounter\relax{\collecteditemgroupitem\hss}%
+ \hbox to \dimexpr\availablehsize/\scratchcounter\relax{\m_strc_itemgroups_collected\hss}%
\endgroup}
-% \def\strc_itemgroups_collected_flush_indeed
-% {\collecteditemgroupitem
-% \iftrialtypesetting
-% \undefinevalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
-% \fi}
-
\def\strc_itemgroups_collected_flush_indeed
- {\collecteditemgroupitem
- \undefinevalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}}
+ {\m_strc_itemgroups_collected
+ \letcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname\undefined}
\def\strc_itemgroups_collected_flush
{\ifconditional\c_strc_itemgroups_randomize
@@ -1696,7 +1739,7 @@
\advance\c_strc_itemgroups_collected_current\plusone
\fi
\ifcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname
- \edef\collecteditemgroupitem{\lastnamedcs}%
+ \edef\m_strc_itemgroups_collected{\lastnamedcs}%
\ifconditional\c_strc_itemgroups_horizontal
\strc_itemgroups_collected_flush_horizontal
\else
@@ -1708,7 +1751,7 @@
\expandafter\strc_itemgroups_collected_flush
\fi}
-\unexpanded\def\stopcollectitems
+\protected\permanent\def\stopcollectitems % todo: frozen
{\ifconditional\c_strc_itemgroups_collecting
\c_strc_itemgroups_collected_done \zerocount
\c_strc_itemgroups_collected_current\zerocount
@@ -1724,23 +1767,23 @@
\fi
\fi}
-\unexpanded\def\startcollectitems
+\protected\permanent\def\startcollectitems % todo: frozen
{\ifconditional\c_strc_itemgroups_collecting
\c_strc_itemgroups_collected_stored\zerocount
- \letvalue{\e!start\v!item}\strc_itemgroups_collected_store
+ \enforced\letcsname\e!start\v!item\endcsname\strc_itemgroups_collected_store
\fi}
%D Left-overs:
-\unexpanded\def\item
+\permanent\protected\def\item % todo: frozen
{\strc_itemgroups_item_alone}
-\def\strc_itemgroups_item_alone[#category]#text\par
+\tolerant\def\strc_itemgroups_item_alone[#category]#:#text\par
{\doifelsesomething{#category}{\startitemgroup[#category]}{\startitemgroup[\v!itemize]}%
\startitem#text\stopitem
\stopitemgroup}
-\unexpanded\def\head
+\permanent\protected\def\head % todo: frozen
{\strc_itemgroups_head_alone}
\def\strc_itemgroups_head_alone[#category]#head\par#body\par
@@ -1748,10 +1791,20 @@
\starthead{#head}#body\stophead
\stopitemgroup}
-\setuvalue{\e!start\v!item}%
+\pushoverloadmode
+
+\permanent\protected\defcsname\e!start\v!item\endcsname
{\startitemgroup[\v!itemize]%
\startitemgroupitem
- \setuvalue{\e!stop\v!item}{\stopitemgroupitem\stopitemgroup}}
+ \enforced\letcsname\e!stop\v!item\endcsname\strc_itemgroups_stop_item}
+
+\aliased\letcsname\e!stop\v!item\endcsname\relax
+
+\permanent\protected\def\strc_itemgroups_stop_item
+ {\stopitemgroupitem
+ \stopitemgroup}
+
+\popoverloadmode
% \def\sym#text%
% {\noindent
@@ -1765,11 +1818,9 @@
%D Something for tables:
-\unexpanded\def\itemtag
- {\dosingleempty\strc_itemgroups_item_tag}
-
-\unexpanded\def\strc_itemgroups_item_tag[#reference]% we can reuse more
- {\def\currentitemreference{#reference}%
+\permanent\tolerant\protected\def\itemtag[#reference]% we can reuse more
+ {% what if empty
+ \def\currentitemreference{#reference}%
\iftrialtypesetting
\strc_counters_save\v_strc_itemgroups_counter
\strc_itemgroups_increment_item_counter
@@ -1874,8 +1925,8 @@
\global\c_strc_itemgroups_column_depth\zerocount
\global\c_strc_itemgroups_nesting \zerocount
\glet\currentitemlevel\!!zerocount
- \unexpanded\def\startitemize{\startitemgroup[\v!itemize:\v!note]}%
- \unexpanded\def\stopitemize {\stopitemgroup}}
+ \enforced\permanent\protected\def\startitemize{\startitemgroup[\v!itemize:\v!note]}%
+ \enforced\permanent\protected\def\stopitemize {\stopitemgroup}}
\let\strc_itemgroups_pop\relax
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-lab.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-lab.mkxl
new file mode 100644
index 00000000000..3794fdca935
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-lab.mkxl
@@ -0,0 +1,199 @@
+%D \module
+%D [ file=strc-lab, % was part of strc-des,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Labels,
+%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 Structure Macros / Labels}
+
+\unprotect
+
+% todo: reset and increment will go
+
+%D Labels are implemented somewhat inefficient but have the advantage that they
+%D can be controlled like other constructions. Who knows when that comes in
+%D handy?
+
+\installcorenamespace{labels}
+
+\installcommandhandler \??labels {label} \??labels % plural hash, else clash with label (or rename that one)
+
+\installcounterassociation{label}
+
+\let\setuplabels\setuplabel
+
+\setuplabel
+ [\c!alternative=\v!intext,
+ \c!headstyle=\v!bold,
+ \c!titlestyle=\v!bold,
+ \c!distance=\zeropoint,
+ \c!width=\v!fit,
+ \c!titledistance=.5\emwidth,
+ \c!margin=\v!no,
+ \c!titleleft=(,
+ \c!titleright=),
+ \c!display=\v!no,
+ \c!titlecommand=,
+ \c!expansion=\v!no,
+ \c!way=\v!by\v!text,
+ \c!prefix=\v!no,
+ \c!prefixconnector=.,
+ \c!text=\currentlabel,
+ \c!number=\v!yes, % else description
+ \c!start=0,
+ \c!state=\v!start,
+ \c!levels=3]
+
+\protected\def\strc_define_commands_label#1#2#3% current level parent
+ {\doifelsenothing{#3}
+ {\normalexpanded{\defineconstruction[#1][\s!handler=\v!label,\c!level=#2]}%
+ \edefcsname\??label#1:\s!parent\endcsname{\??label}}%
+ {\normalexpanded{\defineconstruction[#1][#3][\s!handler=\v!label,\c!level=#2]}%
+ \edefcsname\??label#1:\s!parent\endcsname{\??label#3}}%
+ \ifconditional\c_strc_constructions_define_commands
+ \frozen\instance\protected\edefcsname\e!next #1\endcsname{\strc_labels_next {#1}{\number#2}}% obsolete
+ \frozen\instance\protected\edefcsname\v!reset#1\endcsname{\strc_labels_reset{#1}{\number#2}}% obsolete % should be \e!reset anyway
+ %frozen\instance\setuevalue{\c!set #1}{\strc_labels_set {#1}{\number#2}}% obsolete
+ \ifcsname\v!current#1\endcsname
+ % we play safe
+ \else
+ \protected\edefcsname\v!current#1\endcsname{\strc_labels_current{#1}}% % obsolete % should be \e!current anyway
+ \fi
+ \frozen\instance\protected\edefcsname#1\endcsname{\strc_labels_command[#1]}%
+ \fi}
+
+% todo: \strc_labels_command for user
+
+\let\m_strc_labels_sub\empty
+
+\appendtoks
+ \let\m_strc_labels_sub\empty
+ \ifempty\currentlabelparent
+ % clone => parent | subclone => clone | subsubclone => subclone
+ \strc_define_commands_label
+ {\m_strc_labels_sub\currentlabel}%
+ \plusone
+ \empty
+ \edef\p_levels{\labelparameter\c!levels}%
+ \dostepwiserecurse\plustwo\p_levels\plusone
+ {\strc_define_commands_label
+ {\v!sub\m_strc_labels_sub\currentlabel}%
+ \recurselevel
+ {\m_strc_labels_sub\currentlabel}%
+ \edef\m_strc_labels_sub{\v!sub\m_strc_labels_sub}}%
+ \else
+ % clone => parent | subclone => subparent | subsubclone => subsubparent
+ \edef\p_levels{\labelparameter\c!levels}%
+ \dorecurse\p_levels
+ {\strc_define_commands_label
+ {\m_strc_labels_sub\currentlabel}%
+ \recurselevel
+ {\m_strc_labels_sub\currentlabelparent}%
+ \edef\m_strc_labels_sub{\v!sub\m_strc_labels_sub}}%
+ \fi
+ \edef\p_counter{\labelparameter\s!counter}% can inherit from parent
+ \ifempty\p_counter %
+ \let\p_counter\currentlabel
+ \fi
+ \doifelsecounter\p_counter\donothing{\strc_labels_define_counter\p_counter}%
+ \letlabelparameter\s!counter\p_counter
+\to \everydefinelabel
+
+\let\p_strc_constructions_title \empty
+\let\p_strc_constructions_number\empty
+
+\newconditional\c_strc_constructions_number_keep
+
+\setvalue{\??constructioninitializer\v!label}%
+ {\let \currentlabel \currentconstruction
+ \enforced\let\constructionparameter \labelparameter
+ \enforced\let\constructionnamespace \??label
+ \enforced\let\detokenizedconstructionparameter\detokenizedlabelparameter
+ \enforced\let\letconstructionparameter \letlabelparameter
+ \enforced\let\useconstructionstyleandcolor \uselabelstyleandcolor
+ \enforced\let\setupcurrentconstruction \setupcurrentlabel
+ % shared with enumerations
+ \edef\p_strc_constructions_number{\constructionparameter\c!number}%
+ \ifx\p_strc_constructions_number\v!yes
+ \settrue\c_strc_constructions_number_state
+ \iftrialtypesetting
+ \strc_counters_save\currentconstructionnumber
+ \fi
+ \ifconditional\c_strc_constructions_number_keep \else
+ \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel
+ \fi
+ \else
+ \setfalse\c_strc_constructions_number_state
+ \fi
+ \edef\p_strc_constructions_title{\constructionparameter\c!title}%
+ \ifx\p_strc_constructions_title\v!yes
+ \settrue\c_strc_constructions_title_state
+ \else
+ \setfalse\c_strc_constructions_title_state
+ \fi}
+
+\setvalue{\??constructionfinalizer\v!label}%
+ {\ifconditional\c_strc_constructions_number_state
+ \iftrialtypesetting
+ \strc_counters_restore\currentconstructionnumber
+ \fi
+ \fi}
+
+%D Interfaces:
+
+\protected\def\strc_labels_command{\setfalse\c_strc_constructions_number_keep\strc_descriptions_command}
+\protected\def\strc_labels_current{\settrue \c_strc_constructions_number_keep\strc_descriptions_command}
+
+\protected\def\strc_labels_next {\strc_constructions_next_indeed \namedlabelparameter} % #1#2
+\protected\def\strc_labels_reset {\strc_constructions_reset_indeed\namedlabelparameter} % #1#2
+%protected\def\strc_labels_set {\strc_constructions_set_indeed \namedlabelparameter} % #1#2
+
+% similar to enumerations
+
+\def\strc_labels_define_counter#1%
+ {\definecounter[#1]%
+ \registerlabelcounter{#1}}
+
+\appendtoks
+ \synchronizelabelcounters
+\to \everysetuplabel
+
+\appendtoks
+ \synchronizelabelcounters
+\to \everydefinelabel
+
+% no start stop here
+
+\letcsname\??constructionmainhandler\v!label\expandafter\endcsname\csname\??constructionmainhandler\v!description\endcsname
+
+\protected\setevalue{\??constructioncommandhandler\v!label}%
+ {\csname\??constructionstarthandler\v!construction\endcsname
+ \csname\??constructionstophandler \v!construction\endcsname
+ \endgroup}
+
+\protected\setvalue{\??constructiontexthandler\v!label}%
+ {\begingroup
+ \useconstructionstyleandcolor\c!headstyle\c!headcolor
+ \strc_labels_text
+ \endgroup}
+
+\let\strc_labels_text\strc_enumerations_text
+
+% inline variant
+
+\defineconstructionalternative
+ [\v!intext]
+ [\c!renderingsetup=\??constructionrenderings:\v!intext]
+
+\startsetups[\??constructionrenderings:\v!intext]
+ \dontleavehmode\box\constructionheadbox
+\stopsetups
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-lev.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-lev.mklx
new file mode 100644
index 00000000000..08688ee04df
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-lev.mklx
@@ -0,0 +1,98 @@
+%D \module
+%D [ file=strc-lev,
+%D version=2010.09.23,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Automatic Levels,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Structure Macros / Automatic Levels}
+
+%D This module is the result of a discussion between Alan Braslau and
+%D me. I used to have a private (\MKII) module for this but the new
+%D structure code in \MKIV\ is more suitable for this so now we have
+%D it as core functionality. For the moment this an experiment that
+%D Alan and I conduct so it might evolve.
+
+\registerctxluafile{strc-lev}{}
+
+\unprotect
+
+\permanent\tolerant\protected\def\definesectionlevels[#category]#spacer[#list]%
+ {\clf_definesectionlevels{#category}{#list}} % we could scan/use public at the lua end
+
+\permanent\tolerant\protected\def\startsectionlevel[#category]%
+ {\doifelseassignment{#category}%
+ {\clf_startsectionlevel\plusone{\v!default}{\currentnamedsection}[#category]}%
+ {\clf_startsectionlevel\plusone {#category}{\currentnamedsection}}}
+
+\permanent\protected\def\stopsectionlevel
+ {\clf_stopsectionlevel} % we could use public at the lua end
+
+\permanent\tolerant\protected\def\startsubjectlevel[#category]%
+ {\doifelseassignment{#category}%
+ {\clf_startsectionlevel\plustwo{\v!default}{\currentnamedsection}[#category]}%
+ {\clf_startsectionlevel\plustwo {#category}{\currentnamedsection}}}
+
+\permanent\protected\def\stopsubjectlevel
+ {\clf_stopsectionlevel} % we could use public at the lua end
+
+\permanent\tolerant\protected\def\nostarthead[#category]#spacer[#settings]#spacer[#userdata]%
+ {\blank
+ \noindentation{\tttf[start missing section level #category]}
+ \blank}
+
+\permanent\tolerant\protected\def\nostophead[#category]%
+ {\blank
+ \noindentation{\tttf[stop missing section level #category]}
+ \blank}
+
+\definesectionlevels
+ [\v!default]
+ [{\v!chapter,\v!title},
+ {\v!section,\v!subject},
+ {\v!subsection,\v!subsubject},
+ {\v!subsubsection,\v!subsubsubject},
+ {\v!subsubsubsection,\v!subsubsubject},
+ {\v!subsubsubsubsection,\v!subsubsubject}]
+
+\aliased\let\definestructurelevels\definesectionlevels
+\aliased\let\startstructurelevel \startsectionlevel
+\aliased\let\stopstructurelevel \stopsectionlevel
+
+\protect \endinput
+
+% \starttext
+%
+% \definehead[xxxxxxsection][subsubsection]
+% \setuphead [xxxxxxsection][color=red]
+%
+% \definesectionlevels[main][chapter,section,subsection,subsubsection]
+% \definesectionlevels[next][chapter,section,subsection,xxxxxxsection]
+%
+% \startsectionlevel [main] [title=first top level]
+%
+% \startsectionlevel [main] [title=first lower level]
+% \startsectionlevel [main] [title=second lower level]
+% \startsectionlevel [main] [title=third lower level]
+% test
+% \stopsectionlevel
+% \stopsectionlevel
+% \stopsectionlevel
+%
+% \startsectionlevel [main] [title=first lower level]
+% \startsectionlevel [main] [title=second lower level]
+% \startsectionlevel [next] [title=third lower level]
+% test
+% \stopsectionlevel
+% \stopsectionlevel
+% \stopsectionlevel
+%
+% \stopsectionlevel
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-lnt.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-lnt.mklx
new file mode 100644
index 00000000000..f389442d83c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-lnt.mklx
@@ -0,0 +1,361 @@
+%D \module
+%D [ file=strc-lnt,
+%D version=2002.05.10,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Line Notes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: mkvi #
+
+\writestatus{loading}{ConTeXt Structure Macros / Line Notes}
+
+%D This module loads on top of the footnote and line numbering macros.
+
+\unprotect
+
+\installcorenamespace{linenote}
+
+\aliased\let\setuplinenote\setupnote
+
+\newcount\c_strc_linenotes
+\newtoks\everydefinelinenote
+
+\permanent\tolerant\protected\def\definelinenote[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ % error
+ \orelse\ifcsname\??linenote#1\endcsname
+ % there might be files that define the default 'linenote'
+ \ifparameters\or\or
+ \setupnote[#1][#2]%
+ \or
+ \setupnote[#1][#3]%
+ \fi
+ \else
+ \ifparameters\or
+ \definenote[#1]%
+ \or
+ \definenote[#1][#2]%
+ \or
+ \definenote[#1][#2][#3]%
+ \fi
+ \pushmacro\currentnote
+ \edef\currentnote{#1}
+ \letcsname\??linenote\currentnote\expandafter\endcsname\csname\currentnote\endcsname % use copy command
+ \frozen\instance\setuevalue {\currentnote}{\strc_linenotes_direct{\currentnote}}%
+ \frozen\instance\setuevalue{\e!start\currentnote}{\strc_linenotes_start {\currentnote}}%
+ \frozen\instance\setuevalue{\e!stop \currentnote}{\strc_linenotes_stop }%
+ \the\everydefinelinenote
+ \popmacro\currentnote
+ \fi}
+
+\protected\def\strc_linenotes_direct#1#2%
+ {\global\advance\c_strc_linenotes\plusone
+ \strc_linenotes_indeed{#1}{\the\c_strc_linenotes}{#2}%
+ \strc_linenotes_traced\empty
+ \normalexpanded{\someline[\the\c_strc_linenotes]}}
+
+\protected\def\strc_linenotes_start#1[#2]#3%
+ {\global\advance\c_strc_linenotes\plusone
+ \keepunwantedspaces
+ \strc_linenotes_indeed{#1}{#2}{#3}%
+ \strc_linenotes_traced{#2}%
+ \startline[#2]}
+
+\protected\def\strc_linenotes_stop[#1]%
+ {\stopline[#1]}
+
+\let\m_page_lines_previous_to \relax
+\let\m_page_lines_previous_from\relax
+
+\let\m_page_lines_current_to \relax
+\let\m_page_lines_current_from \relax
+
+\newconditional\c_page_lines_current_to
+\newconditional\c_page_lines_current_from
+
+\installcorenamespace{linenotespreviousfrom}
+\installcorenamespace{linenotespreviousto}
+
+\letvalue\??linenotespreviousfrom\empty
+\letvalue\??linenotespreviousto \empty
+
+% maybe do this in lua
+
+\mutable\let\currentlinenotereference\empty
+
+\def\page_lines_in_from{\in[lr:b:\currentlinenotereference]}
+\def\page_lines_in_to {\in[lr:e:\currentlinenotereference]}
+
+\protected\def\strc_linenotes_range_normal#1% order
+ {\doifelsereferencefound{lr:b:\currentlinenotereference}\settrue\setfalse\c_page_lines_current_from
+ \ifconditional\c_page_lines_current_from
+ \xdef\m_page_lines_current_from{\currentreferencelinenumber}%
+ \doifelsereferencefound{lr:e:\currentlinenotereference}\settrue\setfalse\c_page_lines_current_to
+ \ifconditional\c_page_lines_current_to
+ \xdef\m_page_lines_current_to{\currentreferencelinenumber}%
+ \page_lines_in_from
+ \ifx\m_page_lines_current_from\m_page_lines_current_to \else
+ \endash
+ \page_lines_in_to
+ \fi
+ \else
+ \page_lines_in_from
+ \fi
+ \else
+ \page_lines_in_from
+ \fi}
+
+\protected\def\strc_linenotes_range_sparse#1% order
+ {\doifelsereferencefound{lr:b:\currentlinenotereference}\settrue\setfalse\c_page_lines_current_from
+ \ifconditional\c_page_lines_current_from
+ \xdef\m_page_lines_current_from{\currentreferencelinenumber}%
+ \doifelsereferencefound{lr:e:\currentlinenotereference}\settrue\setfalse\c_page_lines_current_to
+ \ifconditional\c_page_lines_current_to
+ \xdef\m_page_lines_current_to{\currentreferencelinenumber}%
+ \ifx\m_page_lines_previous_from\m_page_lines_current_from
+ \ifx\m_page_lines_previous_to\m_page_lines_current_to \else
+ \page_lines_in_from
+ \ifx\m_page_lines_current_from\m_page_lines_current_to\else\endash\page_lines_in_to\fi
+ \fi
+ \else
+ \page_lines_in_from
+ \ifx\m_page_lines_current_from\m_page_lines_current_to\else\endash\page_lines_in_to\fi
+ \fi
+ \else
+ \page_lines_in_from
+ \fi
+ \else
+ \ifx\m_page_lines_previous_from\m_page_lines_current_from \else
+ \page_lines_in_from
+ \fi
+ \fi}
+
+\let\currentlinenotereference\empty
+
+\mutable\let\linenotelinenumber\relax
+
+\protected\def\strc_linenotes_indeed#1#2#3%
+ {\begingroup
+ % we keep things local so we can use it as regular note too
+ \edef\currentnotation{#1}%
+ \edef\currentlinenotereference{#2}%
+ \xdef\m_page_lines_previous_from{\begincsname\??linenotespreviousfrom\currentnotation\endcsname}%
+ \xdef\m_page_lines_previous_to {\begincsname\??linenotespreviousto \currentnotation\endcsname}%
+ \strc_linenotes_check_compression
+ \let\currentnote\currentnotation
+ \letnotationparameter\c!numbercommand\linenotelinenumber % todo: deep hook, beware: should be mutable
+ \letnoteparameter \c!textcommand \gobbleoneargument % todo: deep hook
+ \csname\??linenote\currentnotation\endcsname{#3}%
+ \gletcsname\??linenotespreviousfrom\currentnotation\endcsname\m_page_lines_current_from
+ \gletcsname\??linenotespreviousto \currentnotation\endcsname\m_page_lines_current_to
+ \endgroup}
+
+% compression
+
+\installcorenamespace{linenotescompressmethod}
+
+% compress=yes|no
+% compressmethod=separator|stopper
+
+\setvalue{\??linenotescompressmethod\v!separator}%
+ {\edef\p_compressseparator{\noteparameter\c!compressseparator}%
+ \scratchskip\noteparameter\c!compressdistance\relax
+ \ifempty\p_compressseparator
+ \hskip\scratchskip
+ \else
+ \hskip.5\scratchskip
+ \begingroup\p_compressseparator\endgroup
+ \hskip.5\scratchskip
+ \fi}
+
+\setvalue{\??linenotescompressmethod\v!stopper}%
+ {\edef\p_compressstopper{\noteparameter\c!compressstopper}%
+ \scratchskip\noteparameter\c!compressdistance\relax
+ \ifempty\p_compressstopper
+ \hskip\scratchskip
+ \else
+ \begingroup\p_compressstopper\endgroup
+ \hskip.5\scratchskip
+ \fi}
+
+\setvalue{\??linenotescompressmethod\v!space}%
+ {\hskip\noteparameter\c!compressdistance\relax}
+
+\def\strc_linenotes_check_compression
+ {\edef\p_linenotes_compress {\noteparameter\c!compress}%
+ \edef\p_linenotes_compressmethod{\noteparameter\c!compressmethod}%
+ \ifx\p_linenotes_compress\v!yes
+ \let\linenotelinenumber\strc_linenotes_range_sparse
+ \else
+ \let\linenotelinenumber\strc_linenotes_range_normal
+ \fi
+ \ifcsname\??linenotescompressmethod\p_linenotes_compressmethod\endcsname \else
+ \let\p_linenotes_compressmethod\v!space
+ \fi}
+
+\def\strc_linenotes_inbetween % \ifcsname\??linenote\currentnote\expandafter\endcsname
+ {\begincsname\??linenotescompressmethod\p_linenotes_compressmethod\endcsname}
+
+\def\strc_notes_compress_distance{\emwidth \s!plus .5\emwidth \s!minus .25\emwidth}
+
+\setupnotes
+ [%c\compress=\v!no,
+ \c!compressdistance=\strc_notes_compress_distance,
+ \c!compressseparator=\symbol{\v!compressseparator},
+ \c!compressstopper=\symbol{\v!compressstopper}]
+
+\appendtoks
+ \letnoteparameter\c!inbetween\strc_linenotes_inbetween
+\to \everydefinelinenote
+
+% where to hook this one in? resetcounter has no hook:
+
+\permanent\protected\def\doresetlinenotecompression#1% \strc_linenotes_reset_previous
+ {\gletcsname\??linenotespreviousfrom#1\endcsname\empty
+ \gletcsname\??linenotespreviousto #1\endcsname\empty}
+
+\definesymbol
+ [\v!compressseparator]
+ [\hbox{\vl\thinspace\vl}] % \space removed
+
+\definesymbol
+ [\v!compressstopper]
+ [,]
+
+% \setupnotations
+% [%c\compress=\v!no,
+% \c!compressseparator=\symbol\v!compressseparator]
+
+\let\strc_linenotes_traced\gobbleoneargument
+
+\def\strc_linenotes_traced_indeed#1%
+ {\hpack to \zeropoint
+ {\forgetall
+ \hsize\zeropoint
+ \hss
+ \vpack to \strutheight{\llap{\red\infofont\setstrut\the\c_strc_linenotes}\vss}%
+ {\color[blue]{\vl}}%
+ \vpack to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
+ \hss}%
+ \prewordbreak}
+
+\permanent\protected\def\tracelinenotes
+ {\let\strc_linenotes_traced\strc_linenotes_traced_indeed}
+
+% We predefine one, namely \type {\linenote} cum suis.
+
+\definelinenote[\v!linenote]
+
+%D Use these when not properly nested:
+
+\aliased\let\fromlinenote\startlinenote
+\aliased\let\tolinenote \stoplinenote
+
+% beware: line numbers are added later on so grouping setups is a bad idea
+%
+% \startbuffer[test]
+% \startlinenumbering[100]
+% test \linenote {oeps 1} test test test test test test
+% test \startlinenote [well] {oeps X} test test test test test test
+% test \linenote {oeps 2} test test test test test test
+% test \linenote {oeps 3} test test test test test test
+% test \linenote {oeps 4} test test test test test test
+% test \linenote {oeps 5} test test test test test test
+% test \stoplinenote [well] test test test test test test
+% \stoplinenumbering
+% \stopbuffer
+%
+% \typebuffer[test] \getbuffer[test] \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [align=flushleft]
+% \stopbuffer
+%
+% \typebuffer[setup] \getbuffer[setup,test] \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=4em,
+% distance=1em,
+% align=flushright]
+% \stopbuffer
+%
+% \typebuffer[setup] \getbuffer[setup,test] \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=4em,
+% align=flushleft]
+% \stopbuffer
+%
+% \typebuffer[setup] \getbuffer[setup,test] \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=2em,
+% distance=.5em,
+% align=middle]
+% \stopbuffer
+%
+% \typebuffer[setup] \getbuffer[setup,test] \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [conversion=romannumerals,
+% start=1,
+% step=1,
+% location=text,
+% style=slanted,
+% color=blue,
+% width=1.5em]
+% \stopbuffer
+%
+% \typebuffer[setup] \getbuffer[setup] \startnarrower\getbuffer[test]\stopnarrower \page
+%
+% \startbuffer[setup]
+% \setuplinenumbering
+% [width=4em,
+% left=--,
+% right=--,
+% align=middle]
+% \stopbuffer
+%
+% \typebuffer[setup] \getbuffer[setup,test] \page
+%
+% \startbuffer[setup-1]
+% \setuplinenumbering
+% [style=\bfxx,
+% command=\WatchThis]
+% \stopbuffer
+%
+% \startbuffer[setup-2]
+% \def\WatchThis#1%
+% {\ifodd\linenumber
+% \definecolor[linecolor][red]%
+% \else
+% \definecolor[linecolor][green]%
+% \fi
+% \inframed
+% [offset=1pt,frame=off,background=color,backgroundcolor=linecolor]
+% {#1}}
+% \stopbuffer
+%
+% \typebuffer[setup-1,setup-2] \getbuffer[setup-1,setup-2,test] \page
+%
+% \startbuffer[setup-1]
+% \setuplinenumbering
+% [location=inright,
+% style=\bfxx,
+% command=\WatchThis]
+% \stopbuffer
+%
+% \typebuffer[setup-1] \getbuffer[setup-1,setup-2,test] \page
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx
new file mode 100644
index 00000000000..049a0370e9f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-lst.mklx
@@ -0,0 +1,1574 @@
+%D \module
+%D [ file=strc-lst,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Lists,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Structure Macros / Lists}
+
+\registerctxluafile{strc-lst}{}
+
+% clean up in progress ...
+%
+% also (long term) todo:
+%
+% autocrossdocument
+% auto refs to lists (chain)
+%
+% TODO: strut=yes|no
+%
+% \lists -> strc_lists
+
+\unprotect
+
+%D Lists are mostly used for tables of contents but are in fact a rather generic
+%D feature of \CONTEXT. We seperate between storage and rendering and the current
+%D implementation is a reworked version of all that was added in steps. As lists
+%D are used frequently compatibility is an important aspect. A couple of rendering
+%D alternatives are provided here but more are possible.
+
+\installcorenamespace{list}
+
+\installframedcommandhandler \??list {list} \??list
+
+\aliased\let\setuplists\setuplist % yes or no
+
+\setuplist
+ [\c!height=\v!broad,
+ \c!depth=\v!broad,
+ \c!offset=.25\emwidth,
+ \c!state=\v!start,
+ \c!coupling=\v!off,
+ \c!criterium=\v!local,
+ \c!reference=,% was number which was sort of obsolete
+ \c!width=3\emwidth,
+ %\c!maxwidth=,
+ \c!distance=\zeropoint,
+ \c!margin=\zeropoint,
+ \c!alternative=\c!b,
+ \c!style=\v!normal,
+ %\c!color=,
+ \c!textstyle=\listparameter\c!style, % \currentliststyleparameter (but then we need to set it in every ...)
+ \c!numberstyle=\listparameter\c!style, % \currentliststyleparameter
+ \c!pagestyle=\listparameter\c!style, % \currentliststyleparameter
+ \c!textcolor=\listparameter\c!color, % \currentlistcolorparameter (but then we need to set it in every ...)
+ \c!numbercolor=\listparameter\c!color, % \currentlistcolorparameter
+ \c!pagecolor=\listparameter\c!color, % \currentlistcolorparameter
+ \c!numbercommand=\firstofoneargument,
+ \c!textcommand=\firstofoneargument,
+ \c!pagecommand=\firstofoneargument,
+ \c!pagenumber=\v!yes, % better: 'first'
+ \c!headnumber=\v!yes, % better: 'second'
+% \c!sectionnumber=\listparameter\c!headnumber, % use this instead
+ \c!interaction=\v!all, % was \v!sectionnumber, % or make this headnumber (or accept both)
+ \c!label=\v!no,
+ %\c!extras=,
+ %\c!aligntitle=,
+ %\c!before=,
+ %\c!after=,
+ %\c!inbetween=,
+ %\c!symbol=,
+ %\c!expansion=,
+ \c!limittext=\languageparameter\c!limittext] % not used currently
+
+%D Helpers:
+
+\permanent\protected\def\usenestedliststyleandcolor#style#color% will change
+ {\useliststyleandcolor#style#color%
+ % how about style
+ \ifempty\currentcolorparameter \else
+ \resetinteractionparameter\c!color
+ \resetinteractionparameter\c!contrastcolor
+ \fi}
+
+\permanent\protected\def\doifelselist#tag% can also move to \installcommandhandler
+ {\ifcsname\namedlisthash{#tag}\s!parent\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doiflistelse\doifelselist
+
+%D Regular list entries are bound to a specific location in order to get the right
+%D pagenumber etc.\ associated. When pushing something inbetween (in mkiv) it ends
+%D up directtly in the list. This is the default because otherwise users will wonder
+%D why spacing might get messed up (due to an unseen but present node). It is
+%D possible to force a location by explicitly setting \type {location} to \type
+%D {here}.
+%D
+%D Another way to force a certain order is to set the \type {order} variable when
+%D placing a list. The \type {command} option only pushes commands into the right
+%D order, and \type {all} orders all entries (which might be too much). In this case
+%D no specific location is needed with the inbetween method. Maybe additional
+%D mechanisms show up some day. See \type {inbetween-001.tex} for an example.
+
+% command : location=none
+% userdata : location=none
+% simple : location=here
+
+\installcorenamespace {listlocations}
+
+% \permanent\protected\def\doifelseinlistentry#1%
+% {\ifcsname\??listlocations#1\endcsname
+% \ifnum\lastnamedcs=\structurelistlocation\relax
+% \doubleexpandafter\firstoftwoarguments
+% \else
+% \doubleexpandafter\secondoftwoarguments
+% \fi
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+
+\permanent\protected\def\doifelseinlistentry#1%
+ {\unless\ifcsname\??listlocations#1\endcsname
+ \expandafter\secondoftwoarguments
+ \orelse\ifnum\lastnamedcs=\structurelistlocation\relax
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\permanent\protected\def\doifelseincurrentlistentry
+ {\doifelseinlistentry\currentlist}
+
+\permanent\protected\def\structurelistinject[#tag]%
+ {\begingroup
+ \edef\currentlist{#tag}%
+ \doifelse{\listparameter\c!state}\v!start\strc_lists_inject_yes\strc_lists_inject_nop}
+
+\tolerant\protected\def\strc_lists_inject_nop[#settings]#spacer[#userdata]%
+ {\endgroup}
+
+\def\strc_lists_inject_enhance#listindex%
+ {\expandafter\clf_deferredenhancelist\number#listindex\relax}
+
+\tolerant\protected\def\strc_lists_inject_yes[#settings]#spacer[#userdata]% can be used directly
+ {\setupcurrentlist[\c!type=userdata,\c!location=\v!none,#settings]% grouped (use \let...
+ \edef\p_location{\listparameter\c!location}%
+ \setnextinternalreference
+ \scratchcounter\clf_addtolist
+ references {
+ internal \locationcount
+ % block {\currentsectionblock}
+ % section structures.sections.currentid()
+ % location {\p_location}
+ }
+ metadata {
+ kind {\listparameter\c!type}
+ name {\currentlist}
+ % level structures.sections.currentlevel()
+ catcodes \catcodetable
+ }
+ userdata {\detokenize\expandafter{\normalexpanded{#userdata}}}
+ \relax
+ \edef\currentlistnumber{\the\scratchcounter}%
+ \setxvalue{\??listlocations\currentlist}{\the\locationcount}%
+ \ifx\p_location\v!here
+ % this branch injects nodes !
+ \strc_lists_inject_enhance{\currentlistnumber}%
+ \clf_setinternalreference
+ internal \locationcount
+ view {\interactionparameter\c!focus}%
+ \relax % this will change
+ \xdef\currentstructurelistattribute{\the\lastdestinationattribute}%
+ \dontleavehmode\hpack attr \destinationattribute \lastdestinationattribute{}% todo
+ \else
+ % and this one doesn't
+ \clf_enhancelist\currentlistnumber\relax
+ \fi
+ \endgroup}
+
+% todo: make like \strc_references_direct_full_user ... with {}{}{}
+
+\protected\def\strc_lists_inject_direct[#tag]% [#settings][#userdata]
+ {\begingroup
+ \edef\currentlist{#tag}%
+ \strc_lists_inject_yes} % [#settings][#userdata]
+
+\permanent\protected\def\writebetweenlist[#tag]%
+ {\begingroup
+ \edef\currentlist{#tag}%
+ \doifelse{\namedlistparameter{#tag}\c!state}\v!start
+ \strc_lists_write_between_yes
+ \strc_lists_write_between_nop}
+
+\tolerant\def\strc_lists_write_between_yes[#settings]#:#command%
+ {\strc_lists_inject_yes[#settings,\c!type=\s!command][command={#command}]}
+
+\tolerant\def\strc_lists_write_between_nop[#settings]#:#command%
+ {\endgroup}
+
+\permanent\protected\def\writedatatolist[#tag]%
+ {\begingroup
+ \edef\currentlist{#tag}%
+ \doifelse{\namedlistparameter{#tag}\c!state}\v!start
+ \strc_lists_write_data_to_yes
+ \strc_lists_write_data_to_nop}
+
+\tolerant\def\strc_lists_write_data_to_yes[#settings]#spacer[#userdata]%
+ {\ifparameter#userdata\or % no need to have an extra step ... used seldom
+ \strc_lists_inject_yes[#settings,\c!type=\s!userdata][#userdata]%
+ \else
+ \strc_lists_inject_yes[\c!type=\s!userdata][#settings]%
+ \fi}
+
+\tolerant\def\strc_lists_write_data_to_nop[#settings]#spacer[#userdata]%
+ {\endgroup}
+
+\permanent\protected\def\writetolist[#tag]%
+ {\begingroup
+ \edef\currentlist{#tag}%
+ \doifelse{\namedlistparameter{#tag}\c!state}\v!start
+ \strc_lists_write_to_yes
+ \strc_lists_write_to_nop}
+
+\tolerant\def\strc_lists_write_to_yes[#settings]#:#first#second% no \s!first because we don't expand user settings
+ {\strc_lists_inject_yes[\c!location=\v!here,#settings,\c!type=\s!simple][first={#first},second={#second}]}
+
+\tolerant\def\strc_lists_write_to_nop[#settings]#:#first#second%
+ {\endgroup} % \strc_lists_inject_nop[][]
+
+%D When placing a list either one or a set can be giving. This makes it possible to
+%D flush for instance an nested (or merged) table of contents. Keep in mind that
+%D placing a list is what we do most (think of tables of contents, figures, etc.\
+%D but other usage is also possible in which case low level commands have to be
+%D used.
+
+\newtoks\everystructurelist
+
+\permanent\tolerant\protected\def\placelist[#taglist]#spacer[#settings]%
+ {\begingroup
+ \startpacked[\v!blank]%
+ \edef\m_list {#taglist}%
+ \edef\m_first{\firststructureelementinlist{#taglist}}%
+ \ifx\m_list\m_first
+ % use settings of first
+ \else
+ % use settings of root
+ \let\m_first\empty
+ \fi
+ \strc_lists_place_indeed\m_first\m_list{#settings}%
+ \stoppacked
+ \endgroup}
+
+\permanent\tolerant\protected\def\placerawlist[#tag]#spacer[#settings]% just one list
+ {\strc_lists_place_indeed\empty{#tag}{#settings}}
+
+\aliased\let\strc_lists_place\placelist % used in strc-flt
+
+\def\strc_lists_place_indeed#tag#list#settings%
+ {\begingroup
+ \the\t_lists_every_renderingcleanup % \let\currentlistentrylocation\empty
+ \edef\currentlist{#tag}%
+ \setupcurrentlist[#settings]%
+ \the\everystructurelist
+ % \doif{\listparameter\c!coupling}\v!on{\startlistreferences{#tag}}%
+ \strc_lists_place_current % maybe inline
+ {#list}%
+ {\listparameter\c!criterium}%
+ {\listparameter\c!reference}%
+ {\listparameter\c!extras}%
+ {\listparameter\c!order}%
+ % \stoplistreferences
+ \par % todo: only when vertical list mode
+ \endgroup
+ \strc_lists_set_mode}
+
+\def\strc_lists_set_mode
+ {\ifcase\structurelistsize\relax
+ \resetsystemmode\v!list
+ \else
+ \setsystemmode \v!list
+ \fi}
+
+%D Complete lists are just lists but with a title. They were originally introduced
+%D to minimize the number for commands in a document source but nowadays that is
+%D less an issue in the sense that the extra few lines are neglectable to the rest.
+
+\ifdefined\startnamedsection \else \let\startnamedsection\relax \fi
+\ifdefined\stopnamedsection \else \let\stopnamedsection \relax \fi
+\ifdefined\headtext \else \let\headtext \relax \fi
+
+\permanent\tolerant\protected\def\completelist[#tag]#spacer[#settings]%
+ {\normalexpanded{\startnamedsection[\v!title][\c!title=\headtext{#tag},\c!reference=#tag]}% {} around ref ?
+ \strc_lists_place[#tag][#settings]%
+ \stopnamedsection}
+
+\permanent\tolerant\protected\def\strc_lists_complete[#singular]#spacer[#plural]#spacer[#settings]% used in strc-flt
+ {\normalexpanded{\startnamedsection[\v!title][\c!title=\headtext{#plural},\c!reference=#singular]}% {} around ref ?
+ \strc_lists_place[#singular][#settings]%
+ \stopnamedsection}
+
+\permanent\tolerant\def\strc_lists_combined_complete[#tag]#spacer[#settings]%
+ {\normalexpanded{\startnamedsection[\v!title][\c!title={\headtext{#tag}},\c!reference=#tag]}%
+ \placecombinedlist[#tag][#settings]%
+ \stopnamedsection}
+
+%D Combined list provide a nice level of abstraction.
+%D
+%D \starttyping
+%D \definecombinedlist[whatever][a,b,c][settings]
+%D \stoptyping
+
+\permanent\tolerant\protected\def\definecombinedlist[#tag]#spacer[#list]#spacer[#settings]%
+ {\definelist[#tag][\c!criterium=\v!local,\c!reference=,\c!alternative=,\c!list={#list},#settings]% inherits from root
+ \frozen\instance\setvalue{\e!setup#tag\e!endsetup}{\setupcombinedlist[#tag]}%
+ \frozen\instance\setvalue{\e!place#tag}{\placecombinedlist[#tag]}%
+ \frozen\instance\setvalue{\e!complete#tag}{\strc_lists_combined_complete[#tag]}}
+
+\permanent\tolerant\protected\def\setupcombinedlist[#tag]#spacer[#settings]%
+ {\ifarguments\or\or
+ \setuplist[#tag][#settings]% we don't want to mess up the parent
+ \fi}
+
+\permanent\tolerant\protected\def\placecombinedlist[#tag]#spacer[#settings]% i.e. no list set in settings
+ {\begingroup
+ \edef\currentlist{#tag}%
+ \setupcurrentlist[#settings]%
+ \edef\m_strc_list_alternative{\listparameter\c!alternative}% we only inherit alternative
+ \strc_lists_place_indeed{#tag}{\listparameter\c!list}{#settings}%
+ \endgroup}
+
+%D Given that some variables are set, we can ask for some properties of
+%D an entry.
+
+\mutable\def\currentstructurelistnumber{0} % injection
+\mutable\def\currentlistmethod {entry} % typesetting
+\mutable\def\currentlistindex {0} % typesetting (maybe also a real counter)
+
+\permanent\protected\def\savedlistnumber #1#2{\clf_savedlistnumber {#1}\numexpr#2\relax}
+\permanent\protected\def\savedlisttitle #1#2{\clf_savedlisttitle {#1}\numexpr#2\relax}
+\permanent\protected\def\savedlistprefixednumber#1#2{\clf_savedlistprefixednumber{#1}\numexpr#2\relax}
+
+\newconditional\c_lists_show_realpage
+
+\installcorenamespace {listpagenumber}
+
+\setvalue{\??listpagenumber\v!always }{\settrue\c_lists_show_page\settrue\c_lists_has_page}
+\setvalue{\??listpagenumber\v!yes }{\settrue\c_lists_show_page}
+\setvalue{\??listpagenumber\s!realpage}{\settrue\c_lists_show_page\settrue\c_lists_show_realpage}
+
+\def\strc_lists_process_pagenumber#1%
+ {\begincsname\??listpagenumber#1\endcsname}
+
+\permanent\def\structurelistlocation
+ {\clf_listlocation\numexpr\currentlistindex\relax}
+
+\permanent\def\structurelistrealpagenumber
+ {\clf_listrealpage{\currentlist}\numexpr\currentlistindex\relax}
+
+\permanent\protected\def\structurelistpagenumber
+ {\dostarttagged\t!listpage\empty
+ \ifconditional\c_lists_show_realpage
+ \clf_listrealpage{\currentlist}\numexpr\currentlistindex\relax
+ \else
+ \clf_listprefixedpage
+ {\currentlist}%
+ \currentlistindex
+ {%
+ separatorset {\listparameter\c!pageprefixseparatorset}%
+ conversionset {\listparameter\c!pageprefixconversionset}%
+ set {\listparameter\c!pageprefixset}%
+ segments {\listparameter\c!pageprefixsegments}%
+ connector {\listparameter\c!pageprefixconnector}%
+ }%
+ {%
+ prefix {\listparameter\c!pageprefix}%
+ conversionset {\listparameter\c!pageconversionset}%
+ starter {\listparameter\c!pagestarter}%
+ stopper {\listparameter\c!pagestopper}%
+ }%
+ \relax
+ \fi
+ \dostoptagged}
+
+\permanent\protected\def\structurelistuservariable#name%
+ {\dostarttagged\t!listdata{#name}%
+ \clf_listuserdata{\currentlist}\currentlistindex{#name}%
+ \dostoptagged}
+
+\permanent\def\rawstructurelistuservariable#name%
+ {\clf_listuserdata{\currentlist}\currentlistindex{#name}}
+
+\permanent\protected\def\structurelistfirst {\structurelistuservariable\s!first } % s!
+\permanent\protected\def\structurelistsecond{\structurelistuservariable\s!second} % s!
+
+\permanent\def\rawstructurelistfirst {\rawstructurelistuservariable\s!first } % s! % was \protected
+\permanent\def\rawstructurelistsecond{\rawstructurelistuservariable\s!second} % s! % was \protected
+
+\permanent\protected\def\doifelsestructurelisthaspage
+ {\clf_doifelselisthaspage{\currentlist}\numexpr\currentlistindex\relax}
+
+\permanent\protected\def\doifelsestructurelisthasnumber
+ {\clf_doifelselisthasnumber{\currentlist}\numexpr\currentlistindex\relax}
+
+\aliased\let\doifstructurelisthaspageelse \doifelsestructurelisthaspage
+\aliased\let\doifstructurelisthasnumberelse\doifelsestructurelisthasnumber
+
+\permanent\protected\def\structurelistgenerictitle
+ {\dostarttagged\t!listcontent\empty
+ \clf_listtitle{\currentlist}\currentlistindex\relax
+ \dostoptagged}
+
+\permanent\protected\def\structurelistgenericnumber % tricky, we need to delay tagging as we have nested lua calls
+ {\dostarttagged\t!listtag\empty
+ \clf_listprefixednumber
+ {\currentlist}%
+ \currentlistindex
+ {%
+ prefix {\listparameter\c!prefix}%
+ separatorset {\listparameter\c!prefixseparatorset}%
+ conversionset {\listparameter\c!prefixconversionset}%
+ starter {\listparameter\c!prefixstarter}%
+ stopper {\listparameter\c!prefixstopper}%
+ set {\listparameter\c!prefixset}%
+ segments {\listparameter\c!prefixsegments}%
+ connector {\listparameter\c!prefixconnector}%
+ }%
+ {%
+ separatorset {\listparameter\c!numberseparatorset}%
+ conversionset {\listparameter\c!numberconversionset}%
+ starter {\listparameter\c!numberstarter}%
+ stopper {\listparameter\c!numberstopper}%
+ segments {\listparameter\c!numbersegments}%
+ }%
+ \relax
+ \dostoptagged}
+
+% TODO: pass extra tag name (contents, figures, bibliography ...)
+
+\protected\def\strc_lists_place_current#list#criterium#reference#extras#order% beware, not a user command
+ {\dostarttaggedchained\t!list\empty\??list
+ \clf_processlist
+ names {#list}
+ criterium {#criterium}
+ reference {#reference}
+ extras {#extras}
+ order {#order}
+ \relax
+ \dostoptagged}
+
+\protected\def\strc_lists_analyze#list#criterium#reference%
+ {\clf_analyzelist
+ names {#list}
+ criterium {#criterium}
+ reference {#reference}
+ \relax}
+
+\permanent\def\firststructureelementinlist#list% expandable
+ {\firstinset{#list}}
+
+\permanent\def\structurelistsize
+ {\clf_listsize}
+
+%D Depending on what kind of list we have (e.g.\ a section related one) processors
+%D can be defined.
+
+% push pop test:
+%
+% \starttext
+% \placelist[chapter] [after={\placelist[section][criterium=local]}]
+% \chapter{One} \section{Alpha} \section{Beta}
+% \chapter{Two} \section{First} \section{Second}
+% \stoptext
+
+\installcorenamespace{structurelistprocessor} % the topmost list handler
+\installcorenamespace{listextra} % control of that handler
+
+\installcommandhandler \??listextra {listextra} \??listextra
+
+\definelistextra % example
+ [\v!page]
+ [\c!before={\showmessage\m!system{14}{\currentlist/\currentlistindex}\page}]
+
+\permanent\protected\def\installstructurelistprocessor#tag#meaning%
+ {\expandafter\normaldef\csname\??structurelistprocessor#tag\endcsname{#meaning}}
+
+\permanent\def\usestructurelistprocessor#tag%
+ {\csname\??structurelistprocessor#tag\endcsname}
+
+\aliased\let\dotaglistlocation\relax
+
+\def\strc_lists_entry_process_default
+ {no list method}
+
+\def\strc_lists_entry_process % assume things to be set up
+ {\listextraparameter\c!before
+ \dostarttagged\t!listitem\currentlist
+ \dotaglistlocation
+ \ifcsname\??structurelistprocessor\currentlist:\currentlistmethod\endcsname\lastnamedcs\orelse
+ \ifcsname\??structurelistprocessor\currentlistmethod \endcsname\lastnamedcs\orelse
+ \ifcsname\??structurelistprocessor\currentlist \endcsname\lastnamedcs\else
+ \strc_lists_entry_process_default\fi
+ \dostoptagged
+ \listextraparameter\c!after}
+
+\permanent\protected\def\strclistsentryprocess#tag#method#index#extra% This one is called at the lua end!
+ {\clf_pushlist#index\relax
+ %\let\currentlistentrylocation\empty
+ \edef\currentlist {#tag}%
+ \edef\currentlistmethod{#method}%
+ \edef\currentlistindex {#index}%
+ \edef\currentlistextra {#extra}%
+ \strc_lists_entry_process
+ \clf_poplist}
+
+% lists that have a number/title are kind of generic and can share code
+
+\installstructurelistprocessor\s!default
+ {\strc_lists_entry_process_default}
+
+\installstructurelistprocessor\s!simple
+ {\let\currentlistentrynumber \structurelistfirst
+ \let\currentlistentrytitle \structurelistsecond
+ \let\currentlistentrypagenumber\structurelistpagenumber
+ \strc_lists_apply_renderingsetup}
+
+\installstructurelistprocessor\s!command
+ {\clf_listuserdata{\currentlist}\currentlistindex{\s!command}}
+
+\installstructurelistprocessor{section}
+ {\let\currentlistentrynumber \structurelistgenericnumber
+ \let\currentlistentrytitle \structurelistgenerictitle
+ \let\currentlistentrypagenumber\structurelistpagenumber
+ \strc_lists_apply_renderingsetup}
+
+\installstructurelistprocessor{number+title}
+ {\let\currentlistentrynumber \structurelistgenericnumber
+ \let\currentlistentrytitle \structurelistgenerictitle
+ \let\currentlistentrypagenumber\structurelistpagenumber
+ \strc_lists_apply_renderingsetup}
+
+% example of usage elsewhere:
+%
+% \installstructcurelistprocessor{pubs:userdata}
+% {\clf_listuserdata{\currentlist}\currentlistindex{bibref}}
+
+%D List symbols are used in interactive documents where no numbers are used but
+%D nevertheless structure is present. Beware, the list symbol macro gets an argument
+%D passed, i.e. when this argument is not picked up, the symbol becomes a kind of
+%D prefix. It's not really a user command (and might even get protected).
+
+\permanent\protected\def\listsymbol[#tag]#number%
+ {\begingroup
+ \edef\currentlist{#tag}%
+ \def\currentlistentrynumber{#number}% no edef else tag problems
+ \currentlistsymbol
+ \endgroup}
+
+%D For historical reasons we're stuck to symbols, so in order to generalize, we have
+%D to hook it into the symbol handle. One way to deal with this is to use a
+%D different key and as it makes sense to use setups instead of def's we use a new
+%D key \quote {renderingsetup} which is the name of a setup.
+
+\def\strc_lists_assign_dimen#dimension#key#default%
+ {\edef\m_strc_list_dimen{\listparameter#key}%
+ \doifelseinset\m_strc_list_dimen{\v!fit,\v!broad}{#dimension#default}{#dimension\m_strc_list_dimen}\relax}
+
+\definesymbol[\v!list][\v!none ][\strc_lists_symbol_none]
+\definesymbol[\v!list][\v!one ][\strc_lists_symbol_one]
+\definesymbol[\v!list][\v!two ][\strc_lists_symbol_two]
+\definesymbol[\v!list][\v!three ][\strc_lists_symbol_three]
+\definesymbol[\v!list][\s!default][\strc_lists_symbol_default]
+\definesymbol[\v!list][\s!unknown][\strc_lists_symbol_unknown]
+
+\permanent\protected\def\currentlistsymbol
+ {\edef\p_symbol{\listparameter\c!symbol}%
+ \doifelseinsymbolset\v!list\p_symbol
+ {\directsymbol\v!list\p_symbol}
+ {\directsymbol\v!list\s!default}}
+
+\protected\def\strc_lists_symbol_none
+ {\strc_lists_assign_dimen\scratchwidth\c!width{1.5\emwidth}%
+ \hpack to \scratchwidth{}}
+
+\protected\def\strc_lists_symbol_one
+ {\strut\symbol[bullet]}
+
+\protected\def\strc_lists_symbol_two
+ {\vrule\s!width\emwidth\s!height\exheight\s!depth\zeropoint\relax}
+
+\protected\def\strc_lists_symbol_three
+ {\begingroup
+ \strc_lists_assign_dimen\scratchwidth \c!width {1.5\emwidth}%
+ \strc_lists_assign_dimen\scratchheight\c!height\exheight
+ \strc_lists_assign_dimen\scratchdepth \c!depth \zeropoint
+ \vrule\s!width\scratchwidth\s!height\scratchheight\s!depth\scratchdepth
+ \endgroup}
+
+\protected\def\strc_lists_symbol_unknown
+ {\listparameter\c!symbol}
+
+\installcorenamespace{listsymbollabels}
+
+\def\strc_lists_symbol_label_unknown
+ {\leftlabeltext\currentlistlabel
+ \listparameter\c!starter
+ \currentlistentrynumber
+ \listparameter\c!stopper
+ \rightlabeltext\currentlistlabel}
+
+\mutable\let\currentlistnumber\!!zerocount
+\mutable\let\currentlistlabel \empty
+
+\protected\def\strc_lists_symbol_default
+ {\dontleavehmode
+ \strut
+ \begingroup
+ \edef\currentlistlabel{\listparameter\c!label}% can be used in label
+ \ifcsname\??listsymbollabels\currentlistlabel\endcsname
+ \lastnamedcs
+ \else
+ \strc_lists_symbol_label_unknown
+ \fi
+ \endgroup}
+
+\letvalue{\??listsymbollabels\s!unknown}\strc_lists_symbol_default
+
+\setvalue{\??listsymbollabels}% default (empty)
+ {\listparameter\c!starter
+ \currentlistentrynumber
+ \listparameter\c!stopper}
+
+\setvalue{\??listsymbollabels\v!no}% also default
+ {\listparameter\c!starter
+ \currentlistentrynumber
+ \listparameter\c!stopper}
+
+\setvalue{\??listsymbollabels\v!none}% real minimal (as suggested by WS)
+ {\currentlistentrynumber}
+
+\setvalue{\??listsymbollabels\v!yes}% auto (use value stored in tuc file)
+ {\edef\currentlistlabel{\clf_listlabel\currentlistindex{\currentlistlabel}}%
+ \leftlabeltext\currentlistlabel
+ \listparameter\c!starter
+ \currentlistentrynumber
+ \listparameter\c!stopper
+ \rightlabeltext\currentlistlabel}
+
+% a : nr - tit - pag
+% b : nr - tit - fill - pag
+% c : nr - tit - dots - pag
+% d : inline
+% e : interaction
+% f : interaction
+% g : interaction
+
+\installcorenamespace{listalternative} % specific ways of rendering a list
+\installcorenamespace{listrenderings} % a namespace for setups (rather local)
+
+\installcommandhandler \??listalternative {listalternative} \??listalternative
+
+% Commands are bound to specific list instances as often these are quite special
+% and don't apply to multiple. So, being strict saves us resets.
+
+% \installcorenamespace{listfiller}
+%
+% \protected\def\installlistfiller#1#2%
+% {\setuvalue{\??listfiller#1}{#2}}
+%
+% \protected\def\listfiller#1%
+% {\begincsname\??listfiller#1\endcsname}
+%
+% \protected\def\currentlistfiller
+% {\begingroup
+% \edef\p_filler{\listalternativeparameter\c!filler}%
+% \ifcsname\??listfiller\p_filler\endcsname
+% \lastnamedcs
+% \else
+% \p_filler
+% \fi
+% \endgroup}
+%
+% \installlistfiller\v!sym % original one
+% {\begingroup
+% \scratchdimen.5\emwidth
+% \hskip\scratchdimen
+% \gleaders
+% \hbox to \scratchdimen
+% {\hss
+% \uselistalternativestyleandcolor\c!symstyle\c!symcolor
+% \listalternativeparameter\c!symbol
+% \hss}%
+% \hfill
+% \hskip\scratchdimen
+% \endgroup}
+%
+% \installlistfiller\v!symbol % new one (make that default?)
+% {\begingroup
+% \scratchdimen.5\emwidth
+% \hskip\scratchdimen
+% \gleaders
+% \hbox spread .5\scratchdimen
+% {\hss
+% \uselistalternativestyleandcolor\c!symstyle\c!symcolor
+% \listalternativeparameter\c!symbol
+% \hss}%
+% \hfill
+% \hskip\scratchdimen
+% \endgroup}
+%
+% \installlistfiller\v!width
+% {\hfill}
+%
+% \installlistfiller\v!space
+% {\hskip.25\emwidth\relax}
+
+\setuplistalternative
+ [\c!command=\directlistparameter\c!command,
+ \c!symbol=.]
+
+\permanent\protected\def\currentlistfiller
+ {\checkedfiller{\listalternativeparameter\c!filler}}
+
+\definelistalternative
+ [a]
+ [\c!distance=0pt,
+ \c!width=2em,
+ \c!stretch=10em,
+ \c!filler=\hskip.25em\relax,
+ \c!renderingsetup=\??listrenderings:abc]
+
+\definelistalternative
+ [b]
+ [\c!distance=5em,
+ \c!width=2em,
+ \c!stretch=10em,
+ \c!filler=\hfill,
+ \c!renderingsetup=\??listrenderings:abc]
+
+\definelistalternative
+ [c]
+ [\c!distance=5em,
+ \c!width=0pt,
+ \c!stretch=10em,
+ \c!filler=\hskip.5em\gleaders\hbox to .5\emwidth{\hss.\hss}\hfill\hskip.5em\relax,
+ \c!renderingsetup=\??listrenderings:abc]
+
+\definelistalternative
+ [d]
+ [\c!renderingsetup=\??listrenderings:d]
+
+\definelistalternative
+ [e]
+ [\c!renderingsetup=\??listrenderings:e]
+
+\definelistalternative
+ [f]
+ [\c!renderingsetup=\??listrenderings:f]
+
+\definelistalternative
+ [g]
+ [\c!renderingsetup=\??listrenderings:g]
+
+\definelistalternative
+ [\v!command]
+ [\c!renderingsetup=\??listrenderings:command]
+
+\definelistalternative
+ [\v!none]
+ [\c!renderingsetup=\??listrenderings:none]
+
+\definelistalternative
+ [\v!vertical]
+ [\c!before=\ifvmode\nointerlineskip\fi,
+ \c!after=\ifvmode\nointerlineskip\fi\endgraf\allowbreak,
+ \c!renderingsetup=\??listrenderings:generic]
+
+\definelistalternative
+ [\v!horizontal]
+ [\c!before=\noindent,
+ \c!after=,
+ \c!renderingsetup=\??listrenderings:generic]
+
+% \setuplist
+% [section]
+% [alternative=MyListItem,
+% after=\blank,
+% before=\blank]
+%
+% \definelistplacement[MyListItem][command]#1#2#3{(#1) (#2) (#3)}
+% \definelistplacement[MyListItem][command]{\whatever}
+%
+% this is a compatibility command, best use the regular defined with command=
+% either set in the alternative or in the list
+
+\installcorenamespace{listelementcommand} % the old plugin model
+
+\permanent\tolerant\protected\def\definelistplacement[#tag]#spacer[#method]%
+ {\edef\p_method{#method}%
+ \ifempty\p_method
+ \let\p_method\v!command
+ \fi
+ \normalexpanded{\definelistalternative[#tag][\p_method]}[\c!command=\strc_lists_placement_command]%
+ \doifelsenextbgroup
+ {\strc_lists_define_placement_yes{#tag}}
+ {\strc_lists_define_placement_nop{#tag}}}
+
+% indirect definition: <three ignore arguments>: {\bla}
+
+\def\strc_lists_define_placement_yes#tag%
+ {\protected\defcsname\??listelementcommand#tag\endcsname##1##2##3}
+
+% direct definition: <three arguments>{\bla}
+
+\def\strc_lists_define_placement_nop#tag%
+ {\protected\defcsname\??listelementcommand#tag\endcsname}
+
+\def\strc_lists_placement_command
+ {\csname\??listelementcommand\currentlistalternative\endcsname}
+
+%D The rendering macros.
+
+\newbox \b_strc_lists_number
+\newbox \b_strc_lists_text
+\newbox \b_strc_lists_page
+
+\newtoks \t_lists_every_renderingsetup
+\newtoks \t_lists_every_renderingtext
+\newtoks \t_lists_every_renderingsynchronize
+\newtoks \t_lists_every_renderingcleanup
+
+\newconditional\c_lists_has_number
+\newconditional\c_lists_has_page
+\newconditional\c_lists_show_number
+\newconditional\c_lists_show_page
+
+\mutable\let\currentlistentrylocation \empty % watch the 'entry' in the name
+\mutable\let\currentlistentrynumber \empty % watch the 'entry' in the name
+\mutable\let\currentlistentrytitle \empty % watch the 'entry' in the name
+\mutable\let\currentlistentrypagenumber\empty % watch the 'entry' in the name
+
+\appendtoks
+ \dontcomplain
+ % \letinteractionparameter\c!width\zeropoint % a weird one
+\to \t_lists_every_renderingsetup
+
+\appendtoks
+ % better is to use a special list entry but we keep this for compatibility
+ \enforced\let\\\space
+ % so expanding this token register has to come *after* the font switch
+ \dontconvertfont % (**) this has to become an option (see publ)
+\to \t_lists_every_renderingtext
+
+\appendtoks
+ % because we want to avoid redundant lua calls we expand the
+ % location beforehand
+ \ifempty\currentlistentrylocation
+ \enforced\edef\currentlistentrylocation{\structurelistlocation}% needs attention
+ \fi
+ % because these tests happen often and because we're dealing with
+ % rather complex composed data we have special conditionals; keep
+ % in mind that testing for empty fails do to tagging being applied
+% \edef\p_pagenumber{\listparameter\c!pagenumber}%
+% \ifx\p_pagenumber\v!always
+% \settrue\c_lists_has_page
+% \settrue\c_lists_show_page
+% \else
+% \doifelsestructurelisthaspage\settrue\setfalse\c_lists_has_page
+% \ifx\p_pagenumber\v!yes
+% \settrue\c_lists_show_page
+% \else
+% \setfalse\c_lists_show_page
+% \fi
+% \fi
+ \setfalse\c_lists_show_page % necessary?
+ \processcommacommand[\listparameter\c!pagenumber]\strc_lists_process_pagenumber
+ \ifconditional\c_lists_has_page \else
+ \doifelsestructurelisthaspage\settrue\setfalse\c_lists_has_page
+ \fi
+ % always forces number placement (in bib we use a forced number)
+ \edef\p_headnumber{\listparameter\c!headnumber}%
+ \ifx\p_headnumber\v!always
+ \settrue\c_lists_has_number
+ \settrue\c_lists_show_number
+ \else
+ \doifelsestructurelisthasnumber\settrue\setfalse\c_lists_has_number
+ \ifx\p_headnumber\v!yes
+ \settrue\c_lists_show_number
+ \else
+ \setfalse\c_lists_show_number
+ \fi
+ \fi
+ \strc_lists_interaction_check
+\to \t_lists_every_renderingsetup
+
+\appendtoks
+ \strc_references_flush_destination_nodes
+\to \t_lists_every_renderingsynchronize
+
+\appendtoks
+ % as we don't want any interference we clear some variables
+ % afterwards
+ \let\currentlistentrylocation \empty
+ \let\currentlistentrynumber \empty
+ \let\currentlistentrytitle \empty
+ \let\currentlistentrypagenumber\empty
+ \setfalse\c_lists_has_page
+ \setfalse\c_lists_has_number
+ \setfalse\c_lists_show_page
+ \setfalse\c_lists_show_realpage
+ \setfalse\c_lists_show_number
+\to \t_lists_every_renderingcleanup
+
+\let\m_strc_list_alternative\empty % combined
+
+\protected\def\strc_lists_apply_renderingsetup
+ {\the\t_lists_every_renderingsetup
+ % now we group
+ \begingroup
+ \ifempty\m_strc_list_alternative
+ \edef\currentlistalternative{\listparameter\c!alternative}%
+ \else
+ \let\currentlistalternative\m_strc_list_alternative
+ \fi
+ \directsetup{\listalternativeparameter\c!renderingsetup}\relax
+ \endgroup
+ % till here, where we reset locals
+ \the\t_lists_every_renderingcleanup}
+
+% todo: provide packager via attributes
+
+\doinstallinjector\s!list
+
+\installcorenamespace{listalternativemethods} % the general wrapper of a rendering
+
+\startsetups[\??listrenderings:none]
+ % nothing, nb we use the [] syntax here because we end with a \cs
+\stopsetups
+
+\permanent\protected\def\currentlistentrytitlesynchronize
+ {\the\t_lists_every_renderingsynchronize}
+
+\permanent\protected\def\currentlistentrytitlerendered
+ {\currentlistentrytitlesynchronize\currentlistentrytitle}
+
+\startsetups[\??listrenderings:command]
+ \edef\p_command{\listalternativeparameter\c!command}%
+ \ifempty\p_command
+ [\currentlist: \currentlistentrynumber\space -- \currentlistentrytitle\space -- \currentlistentrypagenumber]%
+ \else
+ \p_command
+ \currentlistentrynumber
+ \currentlistentrytitlerendered % {\currentlistentrytitlesynchronize\currentlistentrytitle}
+ \currentlistentrypagenumber
+ \fi
+\stopsetups
+
+% \startsetups[\??listrenderings:\v!vertical]
+% \directsetup{\??listrenderings:generic}
+% \stopsetups
+
+% \startsetups[\??listrenderings:\v!horizontal]
+% \directsetup{\??listrenderings:generic}
+% \stopsetups
+
+\startsetups[\??listrenderings:generic]
+ \typo_injectors_check_list
+ \listparameter\c!before % can be \hskip
+ \edef\p_command{\listalternativeparameter\c!command}
+ \ifempty\p_command
+ \listalternativeparameter\c!before
+ \vbox {
+ \forgetall
+ \noindent % otherwise annotations are mirrored up
+ \typo_injectors_mark_list
+ \hbox \strc_lists_get_reference_attribute\v!all {
+ \ifconditional\c_lists_show_number
+ % \ifconditional\c_lists_has_page
+ \hbox \strc_lists_get_reference_attribute\v!number {
+ \strc_lists_set_style_color\c!numberstyle\c!numbercolor\v!number
+ \listparameter\c!numbercommand\currentlistsymbol
+ }
+ % \fi
+ \fi
+ \hbox \strc_lists_get_reference_attribute\v!text {
+ \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text
+ \the\t_lists_every_renderingtext
+ \the\t_lists_every_renderingsynchronize
+ \listparameter\c!textcommand\currentlistentrytitle
+ }
+ \ifconditional\c_lists_show_page
+ \ifconditional\c_lists_has_page
+ \hbox \strc_lists_get_reference_attribute\v!pagenumber {
+ \strc_lists_set_style_color\c!pagestyle\c!pagecolor\v!pagenumber
+ \listparameter\c!pagecommand\currentlistentrypagenumber
+ }
+ \fi
+ \fi
+ }
+ }
+ \listalternativeparameter\c!after
+ \else
+ \noindent % otherwise annotations are mirrored up
+ \typo_injectors_mark_list
+ \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute {
+ \p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber
+ }
+ \fi
+ \listparameter\c!after
+\stopsetups
+
+% to be documented: align, hang
+
+\startsetups[\??listrenderings:abc]
+ \endgraf % are we grouped?
+ \typo_injectors_check_list
+ % \advance % yes or no ... \rightskip is also honored
+ \leftskip\listparameter\c!margin % after \endgraf !
+ \listparameter\c!before
+ \endgraf
+ \edef\p_width{\listparameter\c!width}
+ \scratchdistance\listparameter\c!distance\relax
+ \ifx\p_width\v!fit
+ \scratchwidth\zeropoint
+ \orelse\ifconditional\c_lists_has_number
+ \scratchwidth\p_width
+ \else
+ \edef\p_aligntitle{\listparameter\c!aligntitle}
+ \ifx\p_aligntitle\v!yes
+ \scratchwidth\zeropoint
+ \scratchdistance\zeropoint
+ \else
+ \scratchwidth\p_width
+ \fi
+ \fi
+ \noindent % otherwise annotations are mirrored up
+ \typo_injectors_mark_list
+ \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute {
+ \setlocalhsize
+ \hsize\localhsize
+ \hbox to \hsize {
+ \forgetall
+ \strc_lists_set_style_color\c!style\c!color\v!all
+ \scratchhsize\hsize
+ \ifconditional\c_lists_has_number
+ \ifconditional\c_lists_show_number
+ \setbox\b_strc_lists_number
+% \hbox
+% \strc_lists_get_reference_attribute\v!number
+% \ifdim\scratchwidth>\zeropoint to \scratchwidth \fi
+ \simplealignedboxplus
+ \scratchwidth
+ {\listparameter\c!numberalign}
+ {\strc_lists_get_reference_attribute\v!number}
+ {
+ \strc_lists_set_style_color\c!numberstyle\c!numbercolor\v!number
+ \listparameter\c!numbercommand\currentlistsymbol
+% \hfill
+ }
+ \else
+ \setbox\b_strc_lists_number\emptyhbox
+ \fi
+ \else
+ \scratchwidth\zeropoint
+ \scratchdistance\zeropoint
+ \setbox\b_strc_lists_number\emptyhbox
+ \fi
+ \ifconditional\c_lists_has_page
+ \ifconditional\c_lists_show_page
+ \setbox\b_strc_lists_page\hpack {
+ \scratchdimen\listalternativeparameter\c!width
+ \hbox \strc_lists_get_reference_attribute\v!pagenumber \ifdim\scratchdimen>\zeropoint to \scratchdimen\fi {
+ \hfill
+ \strc_lists_set_style_color\c!pagestyle\c!pagecolor\v!pagenumber
+ \strut
+ \listparameter\c!pagecommand\currentlistentrypagenumber
+ }
+ }
+ \else
+ \setbox\b_strc_lists_page\emptyhbox
+ \fi
+ \else
+ \setbox\b_strc_lists_page\emptyhbox
+ \fi
+ \vbox {
+ \hsize\scratchhsize
+ \usealignparameter\listparameter
+ \ifdim\scratchwidth<\hsize
+ % we have leftskip so we'd better just skip back instead of messing
+ % with hang*
+ \edef\p_hang{\listparameter\c!hang}
+ \hangindent\dimexpr\wd\b_strc_lists_number+\scratchdistance\relax
+ \hangafter\ifx\p_hang\v!no\zerocount\else\plusone\fi
+ \scratchdimen\listalternativeparameter\c!distance\relax
+ \ifzeropt\wd\b_strc_lists_page\orelse\ifdim\scratchdimen>\zeropoint\relax
+ \rightskip\scratchdimen\s!plus\listalternativeparameter\c!stretch\relax
+ \parfillskip-\rightskip
+ \fi
+ \else
+ \scratchdistance\zeropoint
+ \fi
+ \parindent\zeropoint
+ \dontleavehmode % this nils hang: i need to figure out why
+ % % topaligned
+ %
+ % \scratchdimen\wd\b_strc_lists_number
+ % \setbox\b_strc_lists_number\hbox to \hsize{\box\b_strc_lists_number\hss\box\b_strc_lists_page}%
+ % \wd\b_strc_lists_number\scratchdimen
+ %
+ \box\b_strc_lists_number
+ \hskip\scratchdistance\relax
+ \begingroup
+ \strc_lists_set_reference_attribute\v!text
+ \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text
+ \the\t_lists_every_renderingtext
+ \the\t_lists_every_renderingsynchronize
+ \setstrut % needs checking, new here
+ \begstrut
+ \strc_lists_limitated_text\currentlistentrytitle
+ \endstrut
+ \endgroup
+ \ifzeropt\wd\b_strc_lists_page\else
+ \nobreak
+ \currentlistfiller
+ \box\b_strc_lists_page
+ \fi
+ }
+ \hss
+ }
+ }% new
+ \endgraf % new, else problems with nointerlinespace and prevdepth
+ \nointerlineskip % anders verkeerde spatiering bij multi-line
+ \endgraf
+ \allowbreak
+ \listparameter\c!after
+\stopsetups
+
+% % example from the context list
+%
+% \setuphead [part] [page=right,placehead=yes]
+% \setuplist [chapter] [alternative=d,before=\blank,after=\blank]
+% \setuplist [part] [before=\blank,after=\blank]
+%
+% \starttext
+% \startnarrower[2*right] \placecontent \stopnarrower
+% \blank[4*big]
+% \startsetups chapter
+% \blank \startnarrower[3*middle] \placecontent[criterium=local] \stopnarrower
+% \stopsetups
+% \placelist[part][criterium=text,after=\setups{chapter}]
+%
+% \part{First part} \chapter{Chapter one} \chapter{Chapter two}
+% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five}
+% \part{Second part} \chapter{Chapter one} \chapter{Chapter two}
+% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five}
+% \part{Third part} \chapter{Chapter one} \chapter{Chapter two}
+% \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five}
+% \stoptext
+
+\startsetups[\??listrenderings:d]
+ \ifvmode
+ \advance\leftskip\listparameter\c!margin
+ \fi
+ \begingroup
+ \ifvmode
+ \noindent
+ \fi
+ \begingroup
+ \strc_lists_set_reference_attribute\v!all
+ \strc_lists_set_style_color\c!style\c!color\v!all
+ \strc_lists_get_destination_attribute
+ \begingroup
+ \ifconditional\c_lists_show_number
+ \donetrue
+ \ifconditional\c_lists_has_number \else
+ \edef\p_symbol{\listparameter\c!symbol}
+ \ifempty\p_symbol
+ \donefalse
+ \fi
+ \fi
+ \ifdone
+ \begingroup
+ \strc_lists_set_reference_attribute\v!number
+ \strc_lists_set_style_color\c!numberstyle\c!numbercolor\v!number
+ \listparameter\c!left
+ \listparameter\c!numbercommand\currentlistsymbol
+ \listparameter\c!right
+ \endgroup
+ \kern.5\emwidth\relax
+ \nobreak
+ \fi
+ \fi
+ \endgroup
+ \begingroup
+ \strc_lists_set_reference_attribute\v!text
+ \strc_lists_set_style_color\c!textstyle\c!textcolor\v!text
+ \the\t_lists_every_renderingtext
+ \the\t_lists_every_renderingsynchronize
+ \setstrut % needs checking, new here
+ \begstrut
+ \strc_lists_limitated_text\currentlistentrytitle
+ \endstrut
+ \endgroup
+ \begingroup
+ \ifconditional\c_lists_has_page
+ \ifconditional\c_lists_show_page
+ \nobreak
+ \hskip.75\emwidth\relax
+ \nobreak
+ \strc_lists_set_reference_attribute\v!pagenumber
+ \strc_lists_set_style_color\c!pagestyle\c!pagecolor\v!pagenumber
+ \strut
+ \listparameter\c!pagecommand\currentlistentrypagenumber
+ \fi
+ \fi
+ \endgroup
+ \scratchdistance\listparameter\c!distance\relax
+ \ifdim\scratchdistance<\emwidth
+ \hskip\emwidth\s!plus\emwidth\s!minus.25\emwidth\relax
+ \else
+ \hskip\scratchdistance\s!plus.5\scratchdistance\s!minus.25\scratchdistance\relax
+ \fi
+ \endgroup
+ \endgroup
+\stopsetups
+
+\startsetups[\??listrenderings:e]
+ \typo_injectors_check_list
+ \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
+ \letlistparameter\c!color\empty
+ \inheritedlistframed {
+ \letinteractionparameter\c!strut\v!no % still needed?
+ \strc_lists_set_style_color\c!style\c!color\v!all
+ \the\t_lists_every_renderingtext
+ \the\t_lists_every_renderingsynchronize
+ \setstrut
+ \begstrut
+ \strc_lists_limitated_text\currentlistentrytitle
+ \endstrut
+ }
+ }
+ \par
+ \listparameter\c!inbetween
+\stopsetups
+
+\startsetups[\??listrenderings:f]
+ \typo_injectors_check_list
+ \noindent % otherwise annotations are mirrored up
+ \typo_injectors_mark_list
+ \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute {
+ \dosetraggedhbox{\listparameter\c!align}%
+ \raggedbox {
+ \strc_lists_set_style_color\c!style\c!color\v!all
+ \the\t_lists_every_renderingtext
+ \the\t_lists_every_renderingsynchronize
+ \setstrut
+ \begstrut
+ \strc_lists_limitated_text\currentlistentrytitle
+ \endstrut
+ }
+ }
+ \par
+ \listparameter\c!inbetween
+\stopsetups
+
+\startsetups[\??listrenderings:g]
+ \typo_injectors_check_list
+ \noindent % otherwise annotations are mirrored up
+ \typo_injectors_mark_list
+ \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute {
+ \midaligned {
+ \strc_lists_set_style_color\c!style\c!color\v!all
+ \the\t_lists_every_renderingtext
+ \the\t_lists_every_renderingsynchronize
+ \setstrut
+ \begstrut
+ \strc_lists_limitated_text\currentlistentrytitle
+ \endstrut
+ }
+ }
+ \par
+ \listparameter\c!inbetween
+\stopsetups
+
+%D This is a new one, similar to vertical and horizontal but better suited when
+%D no command is set (WS):
+
+\definelistalternative
+ [\v!interactive]
+ [\c!renderingsetup=\??listrenderings:interactive,
+ \c!before=\endgraf, % new per 2014-11-08
+ \c!after=\endgraf] % new per 2014-11-08
+
+\startsetups[\??listrenderings:interactive]
+ \edef\p_command{\listalternativeparameter\c!command}%
+ \typo_injectors_check_list
+ \listparameter\c!before
+ \noindent % otherwise annotations are mirrored up
+ \typo_injectors_mark_list
+ \hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute {
+ \ifempty\p_command
+ [
+ \currentlist:\space
+ \currentlistentrynumber
+ \space\emdash\space
+ \currentlistentrytitle
+ \space\emdash\space
+ \currentlistentrypagenumber
+ ]
+ \else
+ \p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber
+ \fi
+ }
+ \listparameter\c!after
+\stopsetups
+
+%D One special for publications (as Alan loves to hangindent). No fonts and such
+%D (for now). No interaction either as that is dealt with elsewhere.
+%D
+%D \currentlistsymbol
+%D \currentlistentrynumber
+%D \currentlistentrytitle
+%D \currentlistentrypagenumber % not really used
+
+\definelistalternative
+ [\v!paragraph]
+ [\c!filler=\v!space,
+ \c!renderingsetup=\??listrenderings:\v!paragraph]
+
+\startsetups[\??listrenderings:\v!paragraph]
+ \endgraf % are we grouped?
+ \typo_injectors_check_list % ?
+ \listparameter\c!before
+ \endgraf
+ \begingroup
+ \forgetall
+ \noindent
+ \parindent\zeropoint
+ \edef\p_width{\listparameter\c!width}%
+ \edef\p_distance{\listparameter\c!distance}% we are nice for bib users
+ \edef\p_margin{\listparameter\c!margin}% we are nice for bib users
+ \ifx\p_distance\v!none
+ \scratchdistance\zeropoint
+ \else
+ \scratchdistance\p_distance
+ \fi
+ \ifx\p_margin\v!none
+ \scratchoffset\zeropoint
+ \else
+ \scratchoffset\p_margin
+ \fi
+ \ifx\p_width\v!fit
+ \scratchwidth\zeropoint
+ \leftskip\scratchoffset
+ \else
+ \scratchwidth\p_width
+ \ifzeropt\scratchoffset
+ \leftskip\dimexpr\scratchwidth+\scratchdistance\relax
+ \else
+ \leftskip\scratchoffset
+ \fi
+ \fi
+ \usealignparameter\listparameter
+ \hskip-\leftskip
+ \ifconditional\c_lists_has_number
+ \ifconditional\c_lists_show_number
+ \setbox\scratchbox
+ \simplealignedbox\scratchwidth{\listparameter\c!numberalign}
+ \bgroup
+ \useliststyleandcolor\c!numberstyle\c!numbercolor
+ \currentlistsymbol
+ \egroup
+ \ifdim\wd\scratchbox>\zeropoint
+ \box\scratchbox
+ \hskip\scratchdistance\relax
+ \fi
+ \fi
+ \fi
+ \begingroup
+ \useliststyleandcolor\c!textstyle\c!textcolor
+ \setstrut
+ \begstrut
+ \currentlistentrytitle
+ \endstrut
+ \endgroup
+ \ifconditional\c_lists_has_page
+ \ifconditional\c_lists_show_page
+ \nobreak
+ \currentlistfiller
+ \begingroup
+ \useliststyleandcolor\c!pagestyle\c!pagecolor
+ \currentlistentrypagenumber
+ \endgroup
+ \fi
+ \fi
+ \endgraf
+ \endgroup
+ \allowbreak
+ \listparameter\c!after
+\stopsetups
+
+%D List elements are packaged in such a way that we can click on them in an
+%D interactive document. Here are a few helpers.
+
+\newconstant\a_strc_lists_reference
+\newconstant\a_strc_lists_destination
+
+\installcorenamespace{listinteractions}
+
+\letvalue{\??listinteractions\v!number }\v!number
+\letvalue{\??listinteractions\v!sectionnumber}\v!number
+\letvalue{\??listinteractions\v!text }\v!text
+\letvalue{\??listinteractions\v!title }\v!text
+\letvalue{\??listinteractions\v!page }\v!pagenumber
+\letvalue{\??listinteractions\v!pagenumber }\v!pagenumber
+\letvalue{\??listinteractions\v!all }\v!all
+\letvalue{\??listinteractions\v!yes }\v!all
+
+\permanent\def\listboxproperties {\strc_lists_get_reference_attribute}
+\permanent\def\listrenderingsetup {\the\t_lists_every_renderingtext}
+\permanent\def\listrenderingsynchronize{\the\t_lists_every_renderingsynchronize}
+
+\protected\def\strc_lists_interaction_check
+ {\iflocation
+ \strc_lists_interaction_check_yes
+ \else
+ \strc_lists_interaction_check_nop
+ \fi}
+
+\def\strc_lists_interaction_check_yes_yes
+ {\edef\p_interaction_forward{\listparameter\c!interaction}%
+ \ifcsname\??listinteractions\p_interaction_forward\endcsname
+ %\expandafter\let\expandafter\p_interaction_forward\csname\??listinteractions\p_interaction_forward\endcsname
+ \expandafter\let\expandafter\p_interaction_forward\lastnamedcs
+ \strc_references_get_simple_reference{internal(\currentlistentrylocation)}%
+ \a_strc_lists_reference\currentreferenceattribute
+ \else
+ \a_strc_lists_reference\attributeunsetvalue
+ \fi
+ \ifnum\a_strc_lists_reference=\attributeunsetvalue
+ \let\strc_lists_get_reference_attribute\gobbleoneargument
+ \let\strc_lists_set_reference_attribute\gobbleoneargument
+ \let\strc_lists_set_style_color \strc_lists_set_style_color_normal
+ \else
+ \let\strc_lists_get_reference_attribute\strc_lists_get_reference_attribute_indeed
+ \let\strc_lists_set_reference_attribute\strc_lists_set_reference_attribute_indeed
+ \let\strc_lists_set_style_color \strc_lists_set_style_color_special
+ \fi
+ \edef\p_interaction_backward{\namedheadparameter\currentlist\c!interaction}% \namedheadparameter !
+ \ifx\p_interaction_backward\v!list
+ \strc_references_set_simple_reference{*\currentlistentrylocation}%
+ \a_strc_lists_destination\currentdestinationattribute
+ \else
+ \a_strc_lists_destination\attributeunsetvalue
+ \fi
+ \ifnum\a_strc_lists_destination=\attributeunsetvalue
+ \let\strc_lists_get_destination_attribute\empty
+ \let\strc_lists_set_destination_attribute\empty
+ \else
+ \let\strc_lists_get_destination_attribute\strc_lists_get_destination_attribute_indeed
+ \let\strc_lists_set_destination_attribute\strc_lists_set_destination_attribute_indeed
+ \fi}
+
+\def\strc_lists_interaction_check_yes_nop
+ {\a_strc_lists_reference \attributeunsetvalue
+ \a_strc_lists_destination\attributeunsetvalue
+ \let\strc_lists_get_reference_attribute\gobbleoneargument
+ \let\strc_lists_set_reference_attribute\gobbleoneargument
+ \let\strc_lists_get_destination_attribute\empty
+ \let\strc_lists_set_destination_attribute\empty
+ \let\strc_lists_set_style_color\strc_lists_set_style_color_normal}
+
+\def\strc_lists_interaction_check_yes
+ {\ifempty\currentlistentrylocation
+ \strc_lists_interaction_check_yes_nop
+ \orelse\ifnum\currentlistentrylocation=\zerocount
+ \strc_lists_interaction_check_yes_nop
+ \else
+ \strc_lists_interaction_check_yes_yes
+ \fi}
+
+\def\strc_lists_interaction_check_nop
+ {\let\strc_lists_get_reference_attribute \gobbleoneargument
+ \let\strc_lists_set_reference_attribute \gobbleoneargument
+ \let\strc_lists_get_destination_attribute\empty
+ \let\strc_lists_set_destination_attribute\empty
+ \let\strc_lists_set_style_color \strc_lists_set_style_color_normal}
+
+\strc_lists_interaction_check_nop
+
+\def\strc_lists_get_reference_attribute_indeed#element%
+ {\ifx#element\p_interaction_forward
+ attr \referenceattribute\a_strc_lists_reference
+ \fi}
+
+\def\strc_lists_set_reference_attribute_indeed#element%
+ {\ifx#element\p_interaction_forward
+ \c_attr_reference\a_strc_lists_reference
+ \fi}
+
+\def\strc_lists_get_destination_attribute_indeed
+ {attr \destinationattribute\number\a_strc_lists_destination}
+
+\def\strc_lists_set_destination_attribute_indeed
+ {\c_attr_destination\a_strc_lists_destination}
+
+\protected\def\strc_lists_set_style_color_normal#style#color#element%
+ {\useliststyleandcolor#style#color}
+
+\protected\def\strc_lists_set_style_color_special#style#color#element%
+ {\useliststyleandcolor#style#color%
+ \ifempty\currentcolorparameter
+ \ifx#element\p_interaction_forward
+ \setlocationcolor
+ \fi
+ % \else
+ % \resetinteractionparameter\c!color
+ % \resetinteractionparameter\c!contrastcolor
+ \fi}
+
+\let\strc_lists_set_style_color\strc_lists_set_style_color_normal
+
+%D A helper:
+
+\def\strc_lists_limitated_text#text%
+ {\edef\p_maxwidth{\listparameter\c!maxwidth}%
+ \ifempty\p_maxwidth
+ \listparameter\c!textcommand{#text}%
+ \else
+ \listparameter\c!textcommand{\limitatetext{#text}\p_maxwidth{\splitsymbol{\listparameter\c!limittext}}}%
+ \fi}
+
+% public helpers
+
+\permanent\protected\def\startcurrentlistentrywrapper
+ {\hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute\bgroup}
+
+\aliased\let\stopcurrentlistentrywrapper\egroup
+
+\permanent\def\currentlistentryreferenceattribute {\strc_lists_get_reference_attribute} % this definition can change
+\permanent\def\currentlistentrydestinationattribute{\strc_lists_get_destination_attribute} % this definition can change
+\permanent\def\currentlistentrylimitedtext {\strc_lists_limitated_text} % this definition can change
+
+% todo:
+
+\permanent\def\utilitylistlength{\listlength} % also in strc-reg (downward compatible name)
+
+\mutable\let\listlength\!!zerocount % also in strc-reg
+
+\permanent\tolerant\protected\def\determinelistcharacteristics[#list]#spacer[#settings]%
+ {\begingroup
+ \edef\currentlist{\firststructureelementinlist{#list}}%
+ \ifempty\currentlist
+ \endgroup
+ \let\listlength\!!zerocount
+ \else
+ \setupcurrentlist[#settings]%
+ \strc_lists_analyze{#list}{\listparameter\c!criterium}{\listparameter\c!reference}%
+ \normalexpanded{\endgroup\noexpand\edef\noexpand\listlength{\structurelistsize}}%
+ \fi
+ \strc_lists_set_mode}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl
new file mode 100644
index 00000000000..eb095a2a572
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-mar.mkxl
@@ -0,0 +1,136 @@
+%D \module
+%D [ file=strc-mar,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Markings,
+%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 Structure Macros / Markings}
+
+\registerctxluafile{strc-mar}{}
+
+\unprotect
+
+%D Synchronizing marks is a rather tricky and messy business. When setting a mark, a
+%D node is added to the list in order for to \TEX\ be able to figure out the 3
+%D current marks when a page is made (last mark on previous page, first on current
+%D page, last on current page; in \LUATEX\ we might at one point have the first on
+%D the next page as well).
+%D
+%D Resetting a mark is not easy. An empty one will not erase the last one on the
+%D previous page for instance. In \LUATEX\ we can clear a marks state register with
+%D \type {\clearmarks} but since this is an immediate operation it might have
+%D unwanted side effects when \TEX\ has collected several pages of text and
+%D finishing off these pages uses marks.
+%D
+%D In \MKIV\ we provide an alternative model that permits some more control over the
+%D way marks are used. It is not entirely compatible with \MKII\ or previous \MKIV\
+%D implementations but in practice this is not a real problem. It's also easier now
+%D to extend this mechanism.
+
+\definesystemattribute [marks] [global]
+
+\installcorenamespace{marking}
+
+\installcommandhandler \??marking {marking} \??marking
+
+\newconditional\inhibitgetmarking % will become private
+\newconditional\inhibitsetmarking % will become private
+
+\newtoks \everymarking
+
+\appendtoks
+ \clf_definemarking{\currentmarking}{\currentmarkingparent}%
+\to \everydefinemarking
+
+\permanent\protected\tolerant\def\relatemarking [#1]#*[#2]{\clf_relatemarking{#1}{#2}}
+\permanent\protected\tolerant\def\resetmarking [#1]{\clf_resetmarking{#1}}
+\permanent\protected\tolerant\def\synchronizemarking[#1]#*[#2]#*[#3]{\ifvoid#2\else\clf_synchronizemarking{#1}#2{#3}\fi}
+\permanent \def\doifelsemarking #1{\clf_doifelsemarking{#1}} % no \noexpanded
+
+\def\strc_markings_synchronize#1#2#3{\ifvoid#2\else\clf_synchronizemarking{#1}#2{#3}\fi} % called in page-ini
+
+\permanent\protected\tolerant\def\setmarking[#1]#:#2%
+ {\ifconditional\inhibitsetmarking\else
+ \doifelse{\namedmarkingparameter{#1}\c!expansion}\v!yes
+ {\clf_setmarking{#1}{#2}}%
+ {\clf_setmarking{#1}{\detokenize{#2}}}%
+ \fi}
+
+\aliased\let\marking \setmarking
+\aliased\let\doifmarkingelse\doifelsemarking
+
+% defaults
+
+\setupmarking
+ [\c!expansion=\v!no,
+ \c!separator=\space\emdash\space,
+ \c!filtercommand=\firstofoneargument,
+ \c!state=\v!start]
+
+% fetching, regular interface
+
+\permanent\protected\def\getmarking
+ {\ifconditional\inhibitgetmarking
+ \expandafter\strc_markings_get_nop
+ \else
+ \expandafter\strc_markings_get_yes
+ \fi}
+
+\tolerant\def\strc_markings_get_nop[#-]#*[#-]#*[#-]%
+ {}
+
+\tolerant\def\strc_markings_get_yes[#1]#*[#2]#*[#3]%
+ {\ifcstok{\namedmarkingparameter{#1}\c!state}\v!start
+ \begingroup
+ \setsystemmode\v!marking
+ \the\everymarking
+ \ifparameter#3\or
+ \clf_getmarking{#1}{#2}{#3}%
+ \else
+ \clf_getmarking{#1}{\v!page}{#2}%
+ \fi
+ \endgroup
+ \fi}
+
+% the fetchers are fully expandable: [name][method]
+
+\permanent\tolerant\def\fetchonemark[#1]#*[#2]{\ifconditional\inhibitgetmarking\else\clf_fetchonemark {#1}{\v!page}{#2}\fi}
+\permanent\tolerant\def\fetchtwomarks [#1]{\ifconditional\inhibitgetmarking\else\clf_fetchtwomarks{#1}{\v!page}\fi}
+\permanent\tolerant\def\fetchallmarks [#1]{\ifconditional\inhibitgetmarking\else\clf_fetchallmarks{#1}{\v!page}\fi}
+
+\aliased\let\fetchmark\fetchonemark
+
+% also fully expandable but here we have: [name][range][method]
+
+\permanent\tolerant\def\fetchonemarking[#1]#*[#2]#*[#3]{\ifconditional\inhibitgetmarking\else\clf_fetchonemark {#1}{#2}{#3}\fi}
+\permanent\tolerant\def\fetchtwomarkings [#1]#*[#2]{\ifconditional\inhibitgetmarking\else\clf_fetchtwomarks{#1}{#2}\fi}
+\permanent\tolerant\def\fetchallmarkings [#1]#*[#2]{\ifconditional\inhibitgetmarking\else\clf_fetchallmarks{#1}{#2}\fi}
+
+\aliased\let\fetchmarking\fetchonemarking
+
+\permanent\def\markingseparator#1{\namedmarkingparameter{#1}\c!separator}
+\permanent\def\markingcommand #1{\namedmarkingparameter{#1}\c!filtercommand}
+
+%D Experimental:
+%D
+%D \starttyping
+%D \definemarking[boxmark]
+%D
+%D \setbox0\ruledvbox{
+%D \marking[boxmark]{tufte} \input tufte \par
+%D \marking[boxmark]{ward} \input ward \par
+%D }
+%D
+%D \synchronizemarking[zerobox][0] \box0
+%D
+%D marks: (\getmarking[boxmark][zerobox][first],\getmarking[boxmark][zerobox][last])
+%D \stoptyping
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl
new file mode 100644
index 00000000000..0b90eecba27
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-mat.mkxl
@@ -0,0 +1,1317 @@
+%D \module
+%D [ file=strc-mat,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Math Numbering,
+%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 Structure Macros / Math Numbering}
+
+\registerctxluafile{strc-mat}{}
+
+% -- we have potential for captions
+% -- this module will use the commandhandler
+% -- key/value pairs will be added (I have no time now)
+
+\unprotect
+
+\setupformulas
+ [%\c!way=,
+ %\c!blockway=,
+ %\c!sectionnumber=,
+ %\c!conversion=\v!numbers,
+ %\c!numberstyle=,
+ %\c!numbercolor=,
+ %\c!numbercommand=,
+ %\c!margin=,
+ %\c!align=,
+ %\c!separator=,
+ \c!grid=\v!math,
+ \c!location=\v!right,
+ \c!left=(,
+ \c!right=),
+ \c!expansion=\v!yes, % maybe automatically
+ \c!spacebefore=\v!big,
+ \c!spaceafter=\formulaparameter\c!spacebefore,
+ \c!width=\hsize,
+ \c!leftmargin=\zeropoint,
+ \c!rightmargin=\zeropoint,
+ \c!indentnext=\v!no,
+ \c!alternative=\s!default,
+ \c!strut=\v!no,
+ \c!numberstrut=\v!yes, % \v!no \v!yes \v!always
+ \c!distance=2\emwidth]
+
+\setupformulaframed
+ [%c!location=<auto set>,
+ %c!width=<auto set>,
+ %c!align=<auto set>,
+ \c!offset=.5\exheight]
+
+\ifdefined\matheqnogapstep
+ % we're ok, now we have that quad in the distance which is
+ % more consistent and not depending on the text font in math
+ \matheqnogapstep\zerocount
+\else
+ % we will keep this for a while
+ \setupformulas[\c!distance=\emwidth]
+\fi
+
+% \ifdefined\mathdisplayskipmode
+% \mathdisplayskipmode\plustwo % only when not zero / needs adapted space handler
+% \fi
+
+% \mathdisplayskipmode\plusthree
+%
+% \hbox\bgroup
+% \setbox0\vbox\bgroup
+% xxxxxxxxx\par
+% \vskip-\baselineskip
+% $$a^2_2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \box0
+% \vbox\bgroup
+% xxxxxxxxx\par
+% \vskip-\baselineskip
+% $$a^2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \vbox\bgroup
+% xxxxxxxxx
+% \vskip-\baselineskip
+% $$a_2$$
+% xxxxxxxxx
+% \egroup
+% \egroup
+%
+% \hbox\bgroup
+% \setbox0\vbox\bgroup
+% xxxxxxxxx\par
+% \ctxlua{tex.prevdepth=-1000 *65536}
+% $$a^2_2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \box0
+% \vbox\bgroup
+% xxxxxxxxx\par
+% \ctxlua{tex.prevdepth=-1000 *65536}
+% $$a^2$$\par
+% xxxxxxxxx\par
+% \egroup
+% \vbox\bgroup
+% xxxxxxxxx
+% \ctxlua{tex.prevdepth=-1000 *65536}
+% $$a_2$$
+% xxxxxxxxx
+% \egroup
+% \egroup
+
+\setupsubformulas % subformulas could be last in chain
+ [\c!indentnext=\formulaparameter\c!indentnext]
+
+\definecounter % one ?
+ [\v!formula]
+
+\defineconversionset
+ [\v!formula]
+ [numbers,characters] % no \v! ?
+
+\installcounterassociation{formula} \registerformulacounter\v!formula % currently we only have one
+
+\appendtoks
+ \synchronizeformulacounters
+\to \everysetupformula
+
+% \appendtoks
+% \synchronizeformulacounters
+% \to \everydefineformula
+
+\setupformulas
+ [\c!numberconversionset=\v!formula] % why forgotten
+
+\appendtoks
+ \normalexpanded{\definelist[\currentformula]}% is expansion needed?
+ \frozen\instance\protected\edefcsname\e!start\currentformula\v!formula\endcsname{\strc_formulas_start_formula{\currentformula}}%
+ \frozen\instance\protected\edefcsname\e!stop \currentformula\v!formula\endcsname{\strc_formulas_stop_formula}%
+\to \everydefineformula
+
+\definelist[\v!formula]
+
+\permanent\defcsname\e!start\v!formula\endcsname{\strc_formulas_start_formula{}}
+\permanent\defcsname\e!stop \v!formula\endcsname{\strc_formulas_stop_formula}
+
+\let\strc_formulas_start_formula\relax % defined later
+\let\strc_formulas_stop_formula \relax % defined later
+
+\permanent\tolerant\protected\def\defineformulaalternative[#1]#*[#2]#*[#3]%
+ {\frozen\instance\defcsname\e!start#1\v!formula\endcsname{#2}%
+ \frozen\instance\defcsname\e!stop #1\v!formula\endcsname{#3}}
+
+% sp = single line paragraph sd = single line display
+% mp = multi line paragraph md = multy line display
+
+\defineformulaalternative[\s!default][\startdisplaymath][\stopdisplaymath]
+\defineformulaalternative[\s!single] [\startdisplaymath][\stopdisplaymath]
+\defineformulaalternative[\s!multi] [\startdisplaymath][\stopdisplaymath]
+
+\defineformula
+ [sp]
+ [\c!spacebefore=\v!none,
+ \c!spaceafter=\v!none,
+ \c!indentnext=\v!no,
+ \c!alternative=\s!single]
+
+\defineformula
+ [sd]
+ [\c!spacebefore=\v!none,
+ \c!spaceafter=\v!none,
+ \c!indentnext=\v!yes,
+ \c!alternative=\s!single]
+
+\defineformula
+ [mp]
+ [\c!indentnext=\v!no,
+ \c!alternative=\s!multi]
+
+\defineformula
+ [md]
+ [\c!indentnext=\v!yes,
+ \c!alternative=\s!multi]
+
+\newtoks\everyresetformulas
+
+\appendtoks
+ \let\currentformula\empty % to be checked:
+\to \everyresetformulas
+
+% implementation
+
+\protected\def\strc_formulas_store_number#1#2#3#4#5% ref, todo:str, \sync % todo: title etc (like float)
+ {\settrue\c_strc_formulas_handle_number
+ \strc_counters_register_component
+ {formula}%
+ \setupcurrentformula \formulaparameter \detokenizedformulaparameter
+ \relax \relax \relax
+ [\c!name=\v!formula,\s!counter=\v!formula,%
+ \s!hascaption=\v!yes,\s!hastitle=\v!yes,\s!hasnumber=\v!yes,%\s!haslevel=#6,%
+ \c!reference=#1,\c!title=\namedformulaentry,\c!bookmark=]%
+ [#2]%
+ \glet\namedformulaentry\empty % \relax
+ \glet#3\m_strc_counters_last_registered_index
+ \glet#4\m_strc_counters_last_registered_synchronize
+ \glet#5\m_strc_counters_last_registered_attribute}
+
+% modes: 0=unset, 1=forced, 2=none, 3=reference
+
+\newconstant\c_strc_formulas_place_number_mode
+\newconstant\c_strc_formulas_number_mode
+\newconstant\c_strc_formulas_sub_number_mode
+\newconstant\c_strc_formulas_nested_number_mode
+
+\appendtoks
+ \c_strc_formulas_place_number_mode \zerocount
+ \c_strc_formulas_number_mode \zerocount
+ \c_strc_formulas_sub_number_mode \zerocount
+ \c_strc_formulas_nested_number_mode\zerocount
+\to \everyresetformulas
+
+\newconditional\c_strc_formulas_handle_number
+\newconditional\c_strc_formulas_inside_place
+\newconditional\c_strc_formulas_inside_place_sub
+\newconditional\c_strc_formulas_inside_formulas
+\newconditional\c_strc_formulas_inside_formulas_sub
+
+\appendtoks
+ \global\setfalse\c_strc_formulas_inside_place
+ \global\setfalse\c_strc_formulas_inside_place_sub
+\to \everyresetformulas
+
+\def\strc_formulas_place_number_noneed
+ {\doif{\formulaparameter\c!numberstrut}\v!always\strut}
+
+\def\strc_formulas_place_numbering % place formula
+ {\settrue\c_strc_formulas_handle_number
+ \strc_formulas_check_reference\c_strc_formulas_place_number_mode\currentplaceformulareference
+ \ifnum\c_strc_formulas_place_number_mode=\plustwo
+ \glet\strc_formulas_place_number\strc_formulas_place_number_noneed
+ \else
+ \glet\strc_formulas_place_number\strc_formulas_place_number_indeed
+ \fi
+ \glet\strc_formulas_place_number_nested\strc_formulas_place_number_nested_indeed}
+
+\def\strc_formulas_handle_number % formulas
+ {\strc_formulas_check_reference\c_strc_formulas_number_mode\currentformulasreference}
+
+\def\strc_formulas_handle_sub_number_indeed % sub formulas
+ {\strc_formulas_check_reference\c_strc_formulas_sub_number_mode\currentsubformulasreference
+ \strc_counters_increment\v!formula
+ \strc_formulas_store_number
+ \currentsubformulasreference
+ \empty
+ \currentsubformulasnumber
+ \currentsubformulassynchronize
+ \currentsubformulasattribute}
+
+\def\strc_formulas_handle_sub_number % sub formulas
+ {\iftrialtypesetting
+ \strc_counters_save\v!formula
+ \strc_formulas_handle_sub_number_indeed
+ \strc_counters_restore\v!formula
+ \else
+ \strc_formulas_handle_sub_number_indeed
+ \fi}
+
+\let\strc_formulas_reference_trace\relax
+\let\strc_formulas_reference_show \relax
+
+\permanent\protected\def\placecurrentformulanumber
+ {\begingroup
+ \rm % determines the distance and main font
+ \edef\p_location{\formulaparameter\c!location}%
+ \ifx\p_location\v!right
+ \hskip\formulaparameter\c!distance
+ \fi
+ \begingroup
+ \useformulastyleandcolor\c!numberstyle\c!numbercolor
+ \formulaparameter\c!numbercommand
+ {\edef\p_strut{\formulaparameter\c!numberstrut}%
+ \ifx\p_strut\v!always
+ \strut
+ \orelse\ifx\p_strut\v!yes
+ \strut
+ \fi
+ \formulaparameter\c!left
+ \namedtaggedlabeltexts
+ \t!formulalabel \v!formula
+ \t!formulanumber\v!formula
+ {\ignorespaces\strc_formulas_place_current_number\removeunwantedspaces}%
+ \formulaparameter\c!right}%
+ \endgroup
+ \ifx\p_location\v!left
+ \hskip\formulaparameter\c!distance
+ \fi
+ \endgroup}
+
+\protected\def\strc_formulas_place_current_number
+ {\ifempty\namedformulaentry
+ \strc_formulas_handle_current_references
+ \labeltexts\currentformula{\convertedcounter[\v!formula][]}%
+ \else
+ \expandafter % hm, the next one reset \namedformulaentry
+ \strc_formulas_handle_current_references
+ \namedformulaentry
+ \fi}
+
+\permanent\def\theformuladestinationattribute#1%
+ {\iflocation\ifx#1\relax\orelse\ifempty#1\else
+ \c_attr_destination#1%
+ \glet#1\relax
+ \fi\fi}
+
+\mutable\let\currentplaceformulaattribute\relax
+\mutable\let\currentformulaattribute \relax
+\mutable\let\currentsubformulaattribute \relax
+\mutable\let\currentformulasattribute \relax
+
+\mutable\let\currentplaceformulanumber\relax
+\mutable\let\currentformulanumber \relax
+\mutable\let\currentsubformulanumber \relax
+\mutable\let\currentformulasnumber \relax
+
+\mutable\let\currentformulasreference \empty
+\mutable\let\currentformulareference \empty
+\mutable\let\currentsubformulareference \empty
+\mutable\let\currentnestedformulanumber \empty
+\mutable\let\currentnestedformulareference\empty
+\mutable\let\currentnestedformulaattribute\empty
+
+\appendtoks
+ \glet\currentformulasreference \empty
+ \glet\currentformulareference \empty
+ \glet\currentsubformulareference \empty
+ \glet\currentnestedformulareference\empty
+\to \everyresetformulas
+
+\mutable\let\currentformulassuffix \empty
+\mutable\let\currentformulasuffix \empty
+\mutable\let\currentsubformulasuffix \empty
+\mutable\let\currentnestedformulasuffix\empty
+
+\appendtoks
+ \glet\currentformulassuffix \empty
+ \glet\currentformulasuffix \empty
+ \glet\currentsubformulasuffix \empty
+ \glet\currentnestedformulasuffix\empty
+\to \everyresetformulas
+
+\mutable\let\currentplaceformulasynchronize \relax
+\mutable\let\currentformulassynchronize \relax
+\mutable\let\currentsubformulasynchronize \relax
+\mutable\let\currentnestedformulasynchronize\relax
+
+\appendtoks
+ \glet\currentplaceformulasynchronize \relax
+ \glet\currentformulassynchronize \relax
+ \glet\currentsubformulassynchronize \relax
+ \glet\currentnestedformulasynchronize\relax
+\to \everyresetformulas
+
+\mutable\let\currentsubformulasattribute \empty
+\mutable\let\currentsubformulasnumber \empty
+\mutable\let\currentsubformulasreference \empty
+\mutable\let\currentsubformulassynchronize\empty
+
+% currently we do the number, some day we will do the (sub) formula
+
+\def\strc_formulas_handle_current_references
+ {\strc_formulas_reference_show
+ \ifnum\c_strc_formulas_place_number_mode=\plusthree
+ \strc_formulas_store_number
+ \currentplaceformulareference
+ \empty
+ \currentplaceformulanumber
+ \currentplaceformulasynchronize
+ \currentplaceformulaattribute
+ \currentplaceformulasynchronize
+ \glet\currentplaceformulasynchronize\relax
+ \theformuladestinationattribute\currentplaceformulaattribute
+ \fi
+ \ifnum\c_strc_formulas_number_mode=\plusthree
+ \strc_formulas_store_number
+ \currentformulasreference
+ \empty
+ \currentformulasnumber
+ \currentformulassynchronize
+ \currentformulasattribute
+ \currentformulassynchronize
+ \glet\currentformulassynchronize\relax
+ \theformuladestinationattribute\currentformulasattribute
+ \fi
+ \ifnum\c_strc_formulas_sub_number_mode=\plusthree
+ \currentsubformulassynchronize
+ \glet\currentsubformulassynchronize\relax
+ \fi
+ \ifnum\c_strc_formulas_nested_number_mode=\plusthree
+ \strc_formulas_store_number
+ \currentnestedformulareference
+ \empty
+ \currentnestedformulanumber
+ \currentnestedformulasynchronize
+ \currentnestedformulaattribute
+ \currentnestedformulasynchronize
+ \glet\currentnestedformulasynchronize\relax
+ \theformuladestinationattribute\currentnestedformulaattribute
+ \fi}
+
+% needs checking ... too many:
+
+\def\strc_formulas_handle_numbering_indeed
+ {\ifempty\namedformulaentry
+ \strc_counters_increment\v!formula
+ \doiftext\currentplaceformulasuffix{\strc_counters_setown_sub\v!formula\plustwo\currentplaceformulasuffix}%
+ \fi
+ \placecurrentformulanumber}
+
+\def\strc_formulas_handle_numbering
+ {\iftrialtypesetting
+ \strc_counters_save\v!formula
+ \strc_formulas_handle_numbering_indeed
+ \strc_counters_restore\v!formula
+ \else
+ \strc_formulas_handle_numbering_indeed
+ \fi}
+
+\def\strc_formulas_handle_sub_numbering_indeed
+ {\let\strc_formulas_handle_sub_numbering\relax % else error: see math/numbering-001.tex
+ \doifelsetext\currentsubformulasuffix
+ {\strc_counters_setown_sub\v!formula\plustwo\currentsubformulasuffix}
+ {\strc_counters_increment_sub\v!formula\plustwo}%
+ \placecurrentformulanumber}
+
+\def\strc_formulas_handle_sub_numbering
+ {\iftrialtypesetting
+ \strc_counters_save\v!formula
+ \strc_formulas_handle_sub_numbering_indeed
+ \strc_counters_restore\v!formula
+ \else
+ \strc_formulas_handle_sub_numbering_indeed
+ \fi}
+
+\def\strc_formulas_number_indeed
+ {\ifconditional\c_strc_formulas_handle_number
+ \hbox\bgroup
+ % main counter
+ \ifconditional\c_strc_formulas_inside_formulas_sub
+ % nothing
+ \else
+ \ifcase\c_strc_formulas_number_mode
+ \ifcase\c_strc_formulas_place_number_mode
+ \strc_formulas_handle_numbering
+ \or
+ \strc_formulas_handle_numbering
+ \or
+ % nothing
+ \or
+ \strc_formulas_handle_numbering
+ \fi
+ \or
+ \strc_formulas_handle_numbering
+ \or
+ % nothing
+ \or
+ \strc_formulas_handle_numbering
+ \fi
+ \fi
+ % subcounter
+ \ifconditional\c_strc_formulas_inside_formulas_sub
+ \ifcase\c_strc_formulas_sub_number_mode
+ \strc_formulas_handle_sub_numbering % was nothing
+ \or
+ \strc_formulas_handle_sub_numbering
+ \or
+ % nothing
+ \or
+ \strc_formulas_handle_sub_numbering
+ \fi
+ \fi
+ \strc_formulas_reference_trace
+ \egroup
+ \fi}
+
+\installstructurelistprocessor\v!formula % to be checked ...
+ {\let\currentlistentrynumber \structurelistgenericnumber
+ \let\currentlistentrytitle \structurelistgenerictitle
+ \let\currentlistentrypagenumber\structurelistpagenumber
+ \strc_lists_apply_renderingsetup}
+
+\newif\ifinformula
+
+%D We need a hook into the plain math alignment macros
+%D
+%D \starttyping
+%D \displaylines
+%D \eqalignno
+%D \eqalignno
+%D \stoptyping
+%D
+%D Otherwise we get a missing \type {$$} error reported.
+
+\pushoverloadmode
+
+\aliased\let\reqno\eqno % no longer valid as we just nil it
+
+\aliased\let\math_native_leqno\leqno
+\aliased\let\math_native_reqno\reqno
+
+\permanent\protected\def\normaleqno#1{\writestatus\m!system{no native (l)eqno equation number support}}
+
+\aliased\let\normalleqno\normaleqno
+\aliased\let\normalreqno\normaleqno
+
+\aliased\let\leqno\normaleqno
+\aliased\let\reqno\normaleqno
+\aliased\let\eqno \normaleqno
+
+\popoverloadmode
+
+%D \macros
+%D {startsubformulas}
+
+% \placeformula
+% \startsubformulas[Maxwell]
+% \startformulas
+% \startformula \startalign
+% \NC \nabla\cdot\bf E \NC = \frac{\rho}{\varepsilon_0} \NR[Maxwell 1]
+% \NC \nabla\times\bf E \NC = - \frac{\partial\bf B}{\partial t} \NR[Maxwell II]
+% \stopalign \stopformula
+% \startformula \startalign
+% \NC \nabla\cdot \bf B \NC = 0 \NR[Maxwell III]
+% \NC \nabla\times\bf B \NC = \mu_0{\bf j}+\varepsilon_0\mu_0\frac{\partial\bf E}{\partial t} \NR[Maxwell IV]
+% \stopalign \stopformula
+% \stopformulas
+% \stopsubformulas
+%
+% Maxwell : \in [Maxwell] and II : \in [Maxwell II]
+
+%D Tricky stuff:
+
+\abovedisplayskip \zeropoint
+\abovedisplayshortskip \zeropoint % evt. 0pt minus 3pt
+\belowdisplayskip \zeropoint
+\belowdisplayshortskip \zeropoint % evt. 0pt minus 3pt
+
+\predisplaypenalty \zerocount
+\postdisplaypenalty \zerocount % -5000 goes wrong, see penalty at \section
+\mathdisplayskipmode \plusthree % because align also adds
+
+% \predisplaygapfactor \zerocount % default is 2000
+
+\protected\def\strc_formulas_forget_display_skips
+ {\mathdisplayskipmode \plusthree
+ \abovedisplayskip \zeropoint
+ \belowdisplayskip \zeropoint
+ \abovedisplayshortskip\zeropoint
+ \belowdisplayshortskip\zeropoint}
+
+\newdimen\d_strc_formulas_display_skip_left
+\newdimen\d_strc_formulas_display_skip_right
+\newdimen\d_strc_formulas_display_margin_left
+\newdimen\d_strc_formulas_display_margin_right
+\newdimen\d_strc_formulas_display_pre_threshold
+\newdimen\d_strc_formulas_display_width
+
+\newconstant\c_strc_formulas_mode % this will go away
+\newconstant\c_strc_formulas_space_model
+
+\newconstant\c_strc_math_vertical % experiment
+
+\c_strc_formulas_mode \plustwo % 0=native 1=simple (old) 2=align (new)
+\c_strc_formulas_space_model\plusthree % replaces \plusone, we might use \plusfour in the future
+
+\newconditional\c_strc_formulas_tight
+
+\newbox\b_strc_formulas_number
+\newbox\b_strc_formulas_content
+
+\def\strc_formulas_flush_content_and_number
+ {\noindentation
+ % \dontleavehmode
+ \kern\d_strc_formulas_display_margin_left
+ \ifcase\wd\b_strc_formulas_number
+ \hbox to \displaywidth \bgroup
+ \hfill
+ \box\b_strc_formulas_content
+ \hfill
+ \egroup
+ \orelse\ifdim\dimexpr\wd\b_strc_formulas_content+\wd\b_strc_formulas_number\relax>\displaywidth
+ \vbox \bgroup
+ \hsize\displaywidth
+ \box\b_strc_formulas_content
+ \par
+ \ifx\p_location\v!left
+ \box\b_strc_formulas_number\hfill
+ \else
+ \hfill\box\b_strc_formulas_number
+ \fi
+ \egroup
+ \else
+ \hbox to \displaywidth \bgroup
+ \ifx\p_location\v!left
+ \rlap{\box\b_strc_formulas_number}%
+ \hfill\box\b_strc_formulas_content\hfill
+ \else
+ \hfill\box\b_strc_formulas_content\hfill
+ \llap{\box\b_strc_formulas_number}%
+ \fi
+ \egroup
+ \fi}
+
+\installcorenamespace{mathdisplayspacemodel}
+
+\setvalue{\??mathdisplayspacemodel\v!before:1}% old
+ {\ifx\p_spacebefore\v!none
+ % nothing
+ \else
+ \directvspacing\p_spacebefore
+ \fi}
+
+\setvalue{\??mathdisplayspacemodel\v!after:1}% old
+ {\prevdepth .5\strutdp
+ \edef\p_spaceafter{\formulaparameter\c!spaceafter}%
+ \ifx\p_spaceafter\v!none
+ % nothing
+ \else
+ \directvspacing\p_spaceafter
+ \fi}
+
+\setvalue{\??mathdisplayspacemodel\v!before:2}% old
+ {\ifx\p_spacebefore\v!none
+ % nothing
+ \else
+ \directvspacing\p_spacebefore
+ \fi
+ \prevdepth-\maxdimen} % texbook pagina 79-80
+
+\setvalue{\??mathdisplayspacemodel\v!after:2}% old
+ {\prevdepth\lineheight
+ \edef\p_spaceafter{\formulaparameter\c!spaceafter}%
+ \ifx\p_spaceafter\v!none
+ % nothing
+ \else
+ \directvspacing\p_spaceafter
+ \fi}
+
+\setvalue{\??mathdisplayspacemodel\v!before:3}%
+ {% not ok, try \stopformula\par\startformula vs \stopformula\startformula
+ \let\m_spacebefore\empty
+ \ifvmode
+ \ifdim\lastskip>\zeropoint\else
+ \ifdim\prevdepth<\zeropoint\else
+ \ifdim\prevdepth<\strutdp
+ % maybe add a tracing option here
+ \ifgridsnapping
+ \let\m_spacebefore\v!depth
+ \else
+ \edef\m_spacebefore{\the\dimexpr\strutdp-\prevdepth\relax}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \nointerlineskip
+ \fi
+ \ifempty\m_spacebefore
+ \ifx\p_spacebefore\v!none
+ % nothing
+ \orelse\ifempty\p_spacebefore
+ \directvspacing\currentvspacing
+ \else
+ \directvspacing{\p_spacebefore,\the\scratchdimen}%
+ \fi
+ \else
+ \ifx\p_spacebefore\v!none
+ \directvspacing{\m_spacebefore}%
+ \orelse\ifempty\p_spacebefore
+ \directvspacing{\m_spacebefore,\currentvspacing}%
+ \else
+ \directvspacing{\m_spacebefore,\p_spacebefore}%
+ \fi
+ \fi}
+
+\setvalue{\??mathdisplayspacemodel\v!after:3}%
+ {\prevdepth\strutdp % \directvspacing\v!depth
+ \ifx\p_spaceafter\v!none
+ % nothing
+ \orelse\ifempty\p_spaceafter
+ \directvspacing\currentvspacing
+ \else
+ \directvspacing\p_spaceafter
+ \fi}
+
+\newconditional\c_math_model_four_indeed
+
+\setvalue{\??mathdisplayspacemodel\v!before:4}%
+ {% not ok, try \stopformula\par\startformula vs \stopformula\startformula
+ \ifvmode
+ \ifinner
+ \csname\??mathdisplayspacemodel\v!before:3\endcsname
+ \else
+ \settrue\c_math_model_four_indeed
+ \forcestrutdepth
+ \nointerlineskip
+ \ifx\p_spacebefore\v!none
+ % nothing
+ \orelse\ifempty\p_spacebefore
+ \directvspacing\currentvspacing
+ \else
+ \directvspacing{\p_spacebefore,\the\scratchdimen}%
+ \fi
+ \fi
+ \else
+ \csname\??mathdisplayspacemodel\v!before:3\endcsname
+ \fi}
+
+\setvalue{\??mathdisplayspacemodel\v!after:4}%
+ {\ifconditional\c_math_model_four_indeed
+ \setfalse\c_math_model_four_indeed
+ \forcestrutdepth
+ \else
+ \prevdepth\strutdp % \directvspacing\v!depth
+ \fi
+ \ifx\p_spaceafter\v!none
+ % nothing
+ \orelse\ifempty\p_spaceafter
+ \directvspacing\currentvspacing
+ \else
+ \directvspacing\p_spaceafter
+ \fi}
+
+\permanent\protected\def\setdisplaymathspacemodel[#1]%
+ {\ifcsname\??mathdisplayspacemodel\v!before:\number#1\endcsname
+ \c_strc_formulas_space_model#1\relax
+ \fi}
+
+% \newtoks\everybeforedisplay
+% \appendtoks\page_sides_check_floats_indeed\to\everybeforedisplay
+
+\permanent\protected\def\beforedisplayspace
+ {\ifhmode
+ \par
+ \fi
+ \ifvmode
+ \edef\p_spacebefore{\formulaparameter\c!spacebefore}%
+ \begincsname\??mathdisplayspacemodel\v!before:\number\c_strc_formulas_space_model\endcsname
+ \fi
+ \ifhmode
+ \par
+ \fi
+ \page_sides_check_floats_indeed} % probably needs more
+
+\permanent\protected\def\afterdisplayspace
+ {\ifhmode
+ \par
+ \fi
+ \ifvmode
+ \edef\p_spaceafter{\formulaparameter\c!spaceafter}%
+ \begincsname\??mathdisplayspacemodel\v!after:\number\c_strc_formulas_space_model\endcsname
+ \fi
+ \ifhmode
+ \par
+ \fi}
+
+\permanent\protected\def\setdisplaydimensions
+ {\displayindent\dimexpr
+ \d_strc_formulas_display_skip_left
+ +\d_strc_formulas_display_margin_left
+ \relax
+ \displaywidth\d_strc_formulas_display_width
+ %\setlocalhsize
+ %\displaywidth\localhsize
+ \ifdim\hangindent>\zeropoint
+ \advance\displayindent\hangindent
+ \else
+ \advance\displaywidth\hangindent
+ \fi
+ \advance\displaywidth\dimexpr
+ -\displayindent
+ -\d_strc_formulas_display_skip_right
+ -\d_strc_formulas_display_margin_right
+ \relax
+ \hsize\displaywidth} % new, else overfull in itemize
+
+\protected\def\strc_formulas_start_formula#1%
+ {\dodoubleempty\strc_formulas_start_formula_indeed[#1]}
+
+% \newskip\formulastrutht
+% \newskip\formulastrutdp
+
+%D \startbuffer
+%D \startformula[9pt] x = 1 \stopformula
+%D \startformula[7pt] x = 1 \stopformula
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\setvalue{\??formulaoption\v!packed}%
+ {\c_strc_formulas_space_model\zerocount}
+
+\setvalue{\??formulaoption\v!tight}%
+ {\settrue\c_strc_formulas_tight}
+
+\setvalue{\??formulaoption\v!middle}%
+ {\d_strc_formulas_display_skip_left \zeropoint
+ \d_strc_formulas_display_skip_right\zeropoint}
+
+\setvalue{\??formulaoption\v!depth}%
+ {\c_strc_formulas_space_model\plusfour}
+
+\setvalue{\??formulaoption\v!line}%
+ {\ifgridsnapping
+ \setformulaparameter\c!grid{\v!math:\v!line}%
+ \fi}
+
+\setvalue{\??formulaoption\v!halfline}%
+ {\ifgridsnapping
+ \setformulaparameter\c!grid{\v!math:\v!halfline}%
+ \fi}
+
+\setvalue{\??formulaoption-\v!line}%
+ {\ifgridsnapping
+ \setformulaparameter\c!grid{\v!math:-\v!line}%
+ \fi}
+
+\setvalue{\??formulaoption-\v!halfline}%
+ {\ifgridsnapping
+ \setformulaparameter\c!grid{\v!math:-\v!halfline}%
+ \fi}
+
+% when we have 1.0.6 we wil use \mathpenaltiesmode
+%
+% \prebinoppenalty -100
+% \prerelpenalty -100
+
+\def\strc_math_set_split
+ {\edef\p_split{\formulaparameter\c!split}%
+ \ifx\p_split\v!yes
+ \global\c_strc_math_vertical\plusone
+ \orelse\ifx\p_split\v!page
+ \global\c_strc_math_vertical\plustwo
+ \else
+ \global\c_strc_math_vertical\zerocount
+ \fi
+ \ifcase\c_strc_math_vertical
+ % \mathpenaltiesmode \zerocount
+ \clf_setmathpenalties\zerocount
+ \clf_resetmathhang
+ \else
+ % \mathpenaltiesmode \plusone
+ \clf_setmathpenalties\plusone
+ \edef\p_hang{\formulaparameter\c!hang}%
+ \ifx\p_hang\v!none
+ \global\setfalse\c_strc_math_indent
+ \clf_resetmathhang
+ \else
+ \global\settrue\c_strc_math_indent
+ \clf_setmathhang {%
+ method {\p_hang}%
+ distance \formulaparameter\c!distance
+ }%
+ \fi
+ \fi}
+
+\setupformula
+ [\c!split=\v!no,
+ \c!distance=\zeropoint,
+ %\c!interlinespace=1.5\lineheight,
+ \c!interlinespace=,
+ \c!hang=\v!none]
+
+% for the moment (when testing) we use a penalty 1
+
+\protected\def\strc_math_align_here{\ifmmode\penalty\plusone\fi}%
+\protected\def\strc_math_break_here{\ifmmode\hfill\break \fi}%
+
+\ifdefined\alignhere \else \aliased\let\alignhere\relax \fi
+\ifdefined\breakhere \else \aliased\let\breakhere\relax \fi
+
+\appendtoks
+ \enforced\let\alignhere\strc_math_align_here
+ \enforced\let\breakhere\strc_math_break_here
+\to \everymathematics
+
+\protected\def\strc_formulas_start_formula_indeed[#1][#2]% setting leftskip adaption is slow !
+ {\ifhmode
+ \par
+ \fi
+ \bgroup % HERE
+ \iftrialtypesetting\else
+ \global\advance\c_strc_formulas_n\plusone
+ \fi
+ \def\currentformula{#1}%
+ \strc_math_set_split
+ \dostarttaggedchained\t!formula\currentformula\??formula
+ \setfalse\c_strc_formulas_tight
+ \d_strc_formulas_display_skip_left \leftskip
+ \d_strc_formulas_display_skip_right \rightskip
+ \d_strc_formulas_display_width \formulaparameter\c!width\relax
+ \d_strc_formulas_display_margin_left \formulaparameter\c!leftmargin\relax
+ \d_strc_formulas_display_margin_right\formulaparameter\c!rightmargin\relax
+ \iftok{#2}\emptytoks
+ \edef\p_option{\formulaparameter\c!option}%
+ \orelse\ifhastok={#2}% this is new, so that we can also set the grid
+ \setupcurrentformula[#2]%
+ \edef\p_option{\formulaparameter\c!option}%
+ \else
+ \edef\p_option{\formulaparameter\c!option}%
+ \edef\p_option{\ifempty\p_option\else\p_option,\fi#2}%
+ \fi
+ \ifempty\p_option \else
+ \rawprocesscommacommand[\p_option]\strc_formulas_option
+ \fi
+ \edef\p_margin{\formulaparameter\c!margin}%
+ \ifempty\p_margin \else
+ \dosetleftskipadaption\p_margin
+ \d_strc_formulas_display_margin_left\leftskipadaption
+ \fi
+ \let\strc_formulas_start_formula\strc_formulas_start_formula_nested
+ \strc_formulas_forget_display_skips
+ \the\everybeforedisplayformula
+ \csname\e!start\formulaparameter\c!alternative\v!formula\endcsname}
+
+\protected\def\strc_formulas_start_formula_nested#1%
+ {\bgroup
+ \let\strc_formulas_stop_formula\strc_formulas_stop_formula_nested
+ \dostarttagged\t!subformula\empty}
+
+\protected\def\strc_formulas_stop_formula_nested
+ {\dostoptagged
+ \egroup}
+
+% tagging of formulanumbers is not ok (we get two display maths blobs)
+
+\newcount\c_strc_formulas_n
+
+\ifdefined\dotagregisterformula \else \aliased\let\dotagregisterformula\gobbleoneargument \fi
+
+\protected\def\strc_formulas_stop_formula
+ {\strc_formulas_place_number % in case it hasn't happened yet
+ \strc_formulas_flush_number % in case we are in native mode
+ \dostarttagged\t!formulacontent\empty
+ \dotagregisterformula\c_strc_formulas_n
+ \csname\e!stop\formulaparameter\c!alternative\v!formula\endcsname
+ \dostoptagged
+ \dostoptagged
+ \nonoindentation
+ \useindentnextparameter\formulaparameter
+ \egroup
+ \hangafter\minusone % added for side floats
+ \hangindent\zeropoint % added for side floats
+ \setfalse\c_strc_formulas_handle_number
+ \the\everyresetformulas
+ \dorechecknextindentation} % here ?
+
+% experiment:
+
+\def\strc_formulas_set_grid_snapping
+ {\edef\p_grid{\formulaparameter\c!grid}%
+ \ifempty\p_grid \else
+ \spac_grids_snap_value_auto\p_grid
+ \fi}
+
+\appendtoks
+ \ifgridsnapping
+ \strc_formulas_set_grid_snapping
+ \fi
+\to \everybeforedisplayformula
+
+% \protected\def\switchtoformulabodyfont
+% {\switchtobodyfont}
+
+\tolerant\permanent\protected\def\formula[#1];#2% todo: tagged
+ {\begingroup
+ \ifparameters#1\else
+ \rawprocesscommacommand[#1]\strc_formulas_option
+ \fi
+ \mathematics{#2}%
+ \endgroup}
+
+\aliased\letcsname\v!formula\endcsname\formula
+
+%D \starttyping
+%D % test \par % no preceding hlist
+%D % $$x$$ % preceding hlist
+%D % \noindent $$x$$ % no preceding hlist
+%D \startformula x \stopformula % now has \noindent (in mkii we messed with baselineskip)
+%D \stoptyping
+
+\permanent\protected\def\startdisplaymath
+ {\ifhmode
+ \par
+ \fi
+ \bgroup
+ \informulatrue
+ \beforedisplayspace
+ \setdisplaydimensions
+ \ifcase\c_strc_formulas_mode
+ \noindent % prevents that tex injects empty line (when using native display mechanism)
+ \Ucheckedstartdisplaymath
+ \the\everydisplay % new (probably too much)
+ \or
+ \setbox\b_strc_formulas_content\hbox\bgroup
+ \normalUstartmath
+ \displaystyle
+ \the\everydisplay % new (probably too much)
+ \else
+ \expandafter\startinnermath
+ \fi
+ \begingroup} % less interference with upcoming a \over b
+
+\permanent\protected\def\stopdisplaymath
+ {\endgroup % less interference with upcoming a \over b
+ \ifcase\c_strc_formulas_mode
+ \Ucheckedstopdisplaymath
+ \or
+ \normalUstopmath
+ \egroup
+ \strc_formulas_flush_content_and_number
+ \else
+ \expandafter\stopinnermath
+ \fi
+ \afterdisplayspace
+ \egroup}
+
+% already defined
+%
+% \let\startinnermath\empty
+% \let\stopinnermath \empty
+
+% \defineformulaalternative[multi][\begindmath][\enddmath]
+%
+% \fakewords{20}{40}\epar
+% \placeformula {a} $$ \fakespacingformula $$
+% \fakewords{20}{40}\epar
+% \placeformula {b} \startformule \fakespacingformula \stopformule
+% \placeformula {b} \startformule \fakespacingformula \stopformule
+% \fakewords{20}{40}\epar
+% \placeformula {c} \startmdformule \fakespacingformula \stopmdformule
+% \placeformula {c} \startmdformule \fakespacingformula \stopmdformule
+% \fakewords{20}{40}\epar
+% \placeformula {d} \startmpformule \fakespacingformula \stopmpformule
+% \placeformula {d} \startmpformule \fakespacingformula \stopmpformule
+% \fakewords{20}{40}\epar
+% \placeformula {e} \startsdformule \fakespacingformula \stopsdformule
+% \placeformula {e} \startsdformule \fakespacingformula \stopsdformule
+% \fakewords{20}{40}\epar
+% \placeformula {f} \startspformule \fakespacingformula \stopspformule
+% \placeformula {f} \startspformule \fakespacingformula \stopspformule
+% \fakewords{20}{40}
+
+\permanent\protected\def\startsubformulas
+ {\dosingleempty\strc_formulas_start_sub_formulas}
+
+\def\strc_formulas_start_sub_formulas[#1]%
+ {\edef\currentsubformulasreference{#1}%
+ \global\settrue\c_strc_formulas_inside_formulas_sub
+ \strc_formulas_handle_sub_number}
+
+\permanent\protected\def\stopsubformulas
+ {\nonoindentation
+ \useindentnextparameter\subformulaparameter
+ \the\everyresetformulas % to be checked
+ \global\setfalse\c_strc_formulas_inside_formulas_sub
+ \dorechecknextindentation} % here ?
+
+%D Named subformulas (to be redone)
+
+\permanent\protected\def\startnamedsubformulas
+ {\dosingleempty\strc_formulas_start_named_sub_formulas}
+
+\def\strc_formulas_start_named_sub_formulas[#1]#2%
+ {\setformulalistentry{#2}%
+ \startsubformulas[#1]}
+
+\permanent\protected\def\stopnamedsubformulas
+ {\stopsubformulas}
+
+%D Experimental goodie:
+%D
+%D \startbuffer
+%D \placelist[formula][criterium=text] \blank[2*big]
+%D \placenamedformula[one]{first} \startformula a = 1 \stopformula \endgraf
+%D \placeformula \startformula a = 2 \stopformula \endgraf
+%D \placenamedformula {second} \startformula a = 3 \stopformula \endgraf
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\permanent\protected\def\startformulas{\strc_formulas_start_formulas}
+
+\permanent\letcsname\e!stop\v!formulas\endcsname\relax
+
+\protected\def\strc_formulas_nested_formula_start
+ {\hbox to \displaywidth \bgroup
+ \hsize\displaywidth
+ \hss
+ %\Ustartmath
+ \dostarttagged\t!formulacontent\empty
+ \csname\e!start\formulaparameter\c!alternative\v!formula\endcsname}
+
+\protected\def\strc_formulas_nested_formula_stop
+ {\csname\e!stop\formulaparameter\c!alternative\v!formula\endcsname
+ \dostoptagged
+ %\Ustopmath
+ \hss
+ \egroup
+ \hss}
+
+\normalexpanded{\tolerant\def\noexpand\strc_formulas_start_formulas[#1]#:#2\csname\e!stop\v!formulas\endcsname}%
+ {\startformula
+ \dostarttagged\t!formulaset\empty
+ \global\settrue\c_strc_formulas_inside_formulas
+ \edef\currentformulasreference{#1}%
+ \strc_formulas_handle_number
+ \let\currentformula\empty
+ \strc_formulas_forget_display_skips
+ \enforced\protected\def\startformula
+ {\advance\scratchcounter\plusone
+ \expandafter\gobbleuntil\csname\e!stop\v!formula\endcsname}%
+ \scratchcounter\zerocount
+ #2% preroll
+ \hbox to \displaywidth \bgroup
+ \divide\displaywidth\scratchcounter
+ \hss
+ \enforced\let\startformula\strc_formulas_nested_formula_start
+ \enforced\let\stopformula \strc_formulas_nested_formula_stop
+ #2%
+ \egroup
+ \global\setfalse\c_strc_formulas_inside_formulas
+ \dostoptagged
+ \stopformula
+ \the\everyresetformulas
+ \hangafter\minusone % added for side floats
+ \hangindent\zeropoint} % added for side floats
+
+% place
+
+\def\m_strc_formulas_flag_inhibit{-}
+\def\m_strc_formulas_flag_force {+}
+
+\def\strc_formulas_check_reference#1#2%
+ {#1\unless\ifempty\namedformulaentry % \relax % new 29/8/2010
+ \plusthree
+ \orelse\ifempty#2%
+ \zerocount
+ \orelse\ifx#2\m_strc_formulas_flag_force
+ \plusone
+ \orelse\ifx#2\m_strc_formulas_flag_inhibit
+ \plustwo
+ \else
+ \plusthree
+ \fi}
+
+\permanent\protected\def\formulanumber
+ {\strc_formulas_number} % for the moment
+
+\tolerant\protected\def\strc_formulas_number[#1]%
+ {\def\currentformulareference{#1}%
+ \strc_formulas_place_number_in_box}
+
+\permanent\protected\def\placeformula {\global\settrue\c_strc_formulas_inside_place \strc_formulas_place}
+\permanent\protected\def\placesubformula{\global\settrue\c_strc_formulas_inside_place_sub\strc_formulas_place}
+
+\tolerant\protected\def\strc_formulas_place[#1]%
+ {\def\currentplaceformulareference{#1}%
+ \let\currentplaceformulasuffix\empty
+ \doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
+
+\protected\def\strc_formulas_place_yes#1%
+ {\def\currentplaceformulasuffix{#1}%
+ \strc_formulas_place_nop}
+
+\protected\def\strc_formulas_place_nop
+ {\doifelsenextchar$\strc_formulas_place_pickup\strc_formulas_place_indeed} % [ref]$$ [ref]\start
+
+\protected\def\strc_formulas_place_indeed
+ {\strc_formulas_place_numbering}
+
+\protected\def\strc_formulas_place_pickup$$#1$$%
+ {\strc_formulas_place_numbering
+ \strc_formulas_start_formula{}#1\strc_formulas_stop_formula}
+
+% \let\startplaceformula\placeformula
+% \let\stopplaceformula \relax
+
+% \startplaceformula \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[-] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[x] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[reference=foo] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[title=whatever] \startformula e=mc^2 \stopformula \stopplaceformula
+% \startplaceformula[suffix=x] \startformula e=mc^2 \stopformula \stopplaceformula
+
+\mutable\let\currentplaceformulatitle \empty
+\mutable\let\currentplaceformulareference\empty
+\mutable\let\currentplaceformulasuffix \empty
+
+\permanent\tolerant\protected\def\startplaceformula[#1]%
+ {\begingroup
+ \global\settrue\c_strc_formulas_inside_place
+ \ifparameter#1\or
+ \expandafter\strc_formulas_start_place_yes
+ \else
+ \expandafter\strc_formulas_start_place_nop
+ \fi[#1]}
+
+\def\strc_formulas_start_place_yes[#1]%
+ {\doifassignmentelse{#1}\strc_formulas_start_place_parameters\strc_formulas_start_place_reference[#1]}
+
+\def\strc_formulas_start_place_nop[#1]%
+ {\let\currentplaceformulareference\empty
+ \let\currentplaceformulasuffix \empty
+ \strc_formulas_place_nop}
+
+\def\strc_formulas_start_place_reference[#1]%
+ {\edef\currentplaceformulareference{#1}%
+ \let\currentplaceformulasuffix\empty
+ %\doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
+ \strc_formulas_place_nop}
+
+\def\strc_formulas_start_place_parameters[#1]%
+ {\letdummyparameter\c!title \empty
+ \letdummyparameter\c!reference\empty
+ \letdummyparameter\c!suffix \empty
+ \getdummyparameters[#1]%
+ \edef\currentplaceformulatitle {\dummyparameter\c!title}%
+ \edef\currentplaceformulareference{\dummyparameter\c!reference}%
+ \edef\currentplaceformulasuffix {\dummyparameter\c!suffix}%
+ \ifempty\currentplaceformulatitle\else
+ \normalexpanded{\setformulalistentry{\currentplaceformulatitle}}%
+ \fi
+ \doifelsenextbgroup\strc_formulas_place_yes\strc_formulas_place_nop} % [ref]{}
+
+\permanent\protected\def\stopplaceformula
+ {\relax
+ \endgroup}
+
+% to be checked
+
+\let\strc_formulas_place_number \relax
+\let\strc_formulas_place_number_nested\gobbletwoarguments
+
+\def\strc_formulas_place_number_nested_indeed#1#2%
+ {\def\currentnestedformulareference{#1}%
+ \def\currentnestedformulasuffix{#2}%
+ \strc_formulas_check_reference\c_strc_formulas_nested_number_mode\currentnestedformulareference
+ \ifcase\c_strc_formulas_nested_number_mode
+ % nothing
+ \or
+ \glet\strc_formulas_place_number\relax
+ \expandafter\strc_formulas_number % hm, looks ahead for []
+ \or
+ % nothing
+ \or
+ \glet\strc_formulas_place_number\relax
+ \expandafter\strc_formulas_number % hm, looks ahead for []
+ \fi}
+
+\def\strc_formulas_place_number_indeed
+ {\strc_formulas_place_number_in_box}
+
+\def\strc_formulas_place_number_in_box
+ {\dostarttagged\t!formulacaption\empty
+ \global\setbox\b_strc_formulas_number\naturalhbox{\strc_formulas_number_indeed}%
+ \dostoptagged}
+
+\def\strc_formulas_flush_number
+ {\ifcase\c_strc_formulas_mode
+ \ifzeropt\wd\b_strc_formulas_number
+ % nothing to be done
+ \orelse\ifx\p_location\v!left
+ \math_native_leqno{\box\b_strc_formulas_number}%
+ \else
+ \math_native_reqno{\box\b_strc_formulas_number}%
+ \fi
+ \fi}
+
+% todo
+
+\permanent\tolerant\protected\def\placenamedformula[#1]%
+ {\ifarguments
+ \expandafter\strc_formulase_place_named_nop
+ \else
+ \expandafter\strc_formulase_place_named_yes
+ \fi[#1]}
+
+\def\strc_formulase_place_named_yes[#1]#2%
+ {\setformulalistentry{#2}%
+ \placeformula[#1]}
+
+\def\strc_formulase_place_named_nop[#1]#2%
+ {\setformulalistentry{#2}%
+ \placeformula}
+
+\mutable\let\namedformulaentry\empty % \relax % this will become a key/value so that we can do bookmarks
+
+\permanent\protected\def\setformulalistentry#1%
+ {\gdef\namedformulaentry{#1}}
+
+\protect \endinput
+
+% \abovedisplayshortskip0pt \belowdisplayshortskip0pt \abovedisplayskip0pt \belowdisplayskip0pt \forgetall
+%
+% test \par $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
+% test \par $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
+% test plus \par \prevdepth \maxdimen $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
+% test minus \par \prevdepth-\maxdimen $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
+%
+% \parskip\baselineskip
+%
+% test \par $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
+% test \par $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
+% test plus \par \prevdepth \maxdimen $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
+% test minus \par \prevdepth-\maxdimen $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$ \par test \par
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-not.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-not.mklx
new file mode 100644
index 00000000000..5ac57137422
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-not.mklx
@@ -0,0 +1,1971 @@
+%D \module
+%D [ file=strc-not,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Note Handling,
+%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 Structure Macros / Note Handling}
+
+\registerctxluafile{strc-not}{}
+
+\unprotect
+
+% todo: finish local rendering
+% todo: more p_strc_notations_* (outside trial loop)
+% todo: see if we can now use \insertpenalties (>0 == some left)
+
+\ifdefined\dotagsetnotesymbol \else \aliased\let\dotagsetnotesymbol\relax \fi
+\ifdefined\dotagsetnotation \else \aliased\let\dotagsetnotation \relax \fi
+
+\permanent\protected\def\unvboxed {\ifvmode\unvbox \else\box \fi} % will change or used more often
+\permanent\protected\def\unvcopied{\ifvmode\unvcopy\else\copy\fi} % will change or used more often
+
+%D \LMTX\ testcase:
+%D
+%D \starttyping
+%D \hbox {\hbox{\footnote{HH1}\footnote{HH2}}} \par
+%D \hbox {\hbox{x\footnote{XHH1}x\footnote{XHH2}}} \par
+%D \vbox {\setbox0\hbox{\footnote{VH1}\footnote{VH2}}\box0} \par
+%D \vbox {\hbox{\footnote{VH1}xxx\footnote{VH2}}} \par
+%D \vbox {\hbox{\footnote{VH1}\footnote{VH2}}
+%D \hbox{\footnote{VH1}\footnote{VH2}}} \par
+%D \vbox {\hbox{x\footnote{XVH1}x\footnote{XVH2}}} \par
+%D \vbox {\vbox{\footnote{VV1}\footnote{VV2}}} \par % two lines
+%D \vbox {\vbox{x\footnote{XVV1}x\footnote{XVV2}}} \par
+%D \stoptyping
+
+%D Notes have two handlers: notations and notes. Although notations can be defined
+%D independently it makes not much sense. In principle we can treat notes as lists
+%D but they are currently done as a variant on enumerations. I will provide a list
+%D variant as well. One complication is that for page related notes inserts are used
+%D and therefore notes are typeset immediately and descriptions are better suited
+%D for that. For instance endnotes can as well be typeset using lists.
+
+% textcommand/textstyle/textcolor : set by note commandhandler and used for inline number
+
+%D \macros
+%D {setupnote,setupnotation}
+%D
+%D We can influence footnote typesetting with the setup command:
+%D
+%D \showsetup{setupnotation}
+%D \showsetup{setupnote}
+%D
+%D The definition command indicate that we can frame the footnote area. The
+%D footnotes themselves are treated as descriptions.
+%D
+%D \showsetup{definenote}
+%D
+%D It's sort of a custom to precede footnotes by a horizontal rule and although
+%D fancy rules like
+%D
+%D \starttyping
+%D \hbox to 10em{\hskip-3em\dotfill}
+%D \stoptyping
+%D
+%D Are quite ligitimate, we default to a simple one 20\% of the text width.
+
+% \c!headstyle=\noteparameter\c!style,
+% \c!headcolor=\noteparameter\c!color,
+
+\installcorenamespace{notation}
+
+\installcommandhandler \??notation {notation} \??notation
+
+\installcounterassociation{notation}
+
+\aliased\let\setupnotations\setupnotation
+
+\definesymbol[\v!note:\v!previouspage][\llap{\low{\symbol[\v!previouspage]}}]
+\definesymbol[\v!note:\v!nextpage ][\llap{\low{\symbol[\v!nextpage ]}}]
+
+\setupnotations % check with old
+ [\c!alternative=\v!note,
+ %\c!headstyle=,
+ %\c!titlestyle=,
+ %\c!style=,
+ %\c!color=,
+ %\c!headcolor=,
+ %\c!titlecolor=,
+ \c!numbercommand=\high,
+ %\c!symbolcommand=\lowllap, % experiment
+ %\c!indicator=\v!no, % was \v!yes in mkii for page notes
+ \c!width=\v!fit,
+ \c!titledistance=.5em,
+ \c!distance=.5em,
+ %\c!hang=,
+ %\c!sample=,
+ %\c!align=,
+ %\c!headalign=,
+ \c!margin=\v!no,
+ \c!before=,
+ \c!inbetween=,
+ \c!after=,
+ \c!indentnext=\v!yes,
+ \c!indenting=\v!never,
+ \c!titleleft=(,
+ \c!titleright=),
+ %\c!closesymbol=,
+ \c!closecommand=\wordright,
+ \c!display=\v!yes,
+ %\c!command=,
+ \c!titlecommand=,
+ \c!expansion=\v!no,
+ %\c!xmlsetup=,
+ %\s!catcodes=,
+ \c!way=\v!by\v!text,
+ \c!prefix=\v!no,
+ \c!prefixconnector=.,
+ %\c!starter=,
+ %\c!stopper=,
+ \c!number=\v!yes,
+ \c!text=,
+ \c!start=0,
+ \c!state=\v!start,
+ \c!levels=3]
+
+%D The code here is mostly the same as enumerations but we want to keep them
+%D isolated and at some point we might differentiate.
+
+% \installcorenamespace{noteclass}
+
+\protected\def\strc_define_commands_notation#tag#level#parent%
+ {\doifelsenothing{#parent}
+ {\normalexpanded{\defineconstruction[#tag][\s!handler=\v!notation,\c!level=#level]}%
+ \setevalue{\??notation#tag:\s!parent}{\??notation}}%
+ {\normalexpanded{\defineconstruction[#tag][#parent][\s!handler=\v!notation,\c!level=#level]}%
+ \setevalue{\??note #tag:\s!parent}{\??note#parent}% see later for \s!note
+ \setevalue{\??notation#tag:\s!parent}{\??notation#parent}}%
+ \instance\setuevalue{\e!next #tag}{\strc_notations_next {#tag}{\number#level}}% obsolete
+ \instance\setuevalue{\c!reset#tag}{\strc_notations_reset {#tag}{\number#level}}% obsolete
+ \instance\setuevalue {#tag}{\strc_notations_command[#tag]}%
+ \instance\setuevalue{\e!start#tag}{\strc_notations_start [#tag]}%
+ \instance\setuevalue{\e!stop #tag}{\strc_notations_stop }}
+
+\let\m_strc_notation_sub\empty
+
+\appendtoks
+ \let\m_strc_notation_sub\empty
+ \ifempty\currentnotationparent
+ % clone => parent | subclone => clone | subsubclone => subclone
+ \strc_define_commands_notation
+ {\m_strc_notation_sub\currentnotation}%
+ \plusone
+ \empty
+ \edef\p_levels{\notationparameter\c!levels}%
+ \dostepwiserecurse\plustwo\p_levels\plusone
+ {\strc_define_commands_notation
+ {\v!sub\m_strc_notation_sub\currentnotation}%
+ \recurselevel
+ {\m_strc_notation_sub\currentnotation}%
+ \edef\m_strc_notation_sub{\v!sub\m_strc_notation_sub}}%
+ \definelist[\currentnotation]% goodie
+ \else
+ % clone => parent | subclone => subparent | subsubclone => subsubparent
+ \edef\p_levels{\notationparameter\c!levels}%
+ \dorecurse\p_levels
+ {\strc_define_commands_notation
+ {\m_strc_notation_sub\currentnotation}%
+ \recurselevel
+ {\m_strc_notation_sub\currentnotationparent}%
+ \edef\m_strc_notation_sub{\v!sub\m_strc_notation_sub}}%
+ \definelist[\currentnotation][\currentnotationparent]% goodie
+ \fi
+ \edef\p_counter{\notationparameter\s!counter}% can inherit from parent
+ \ifempty\p_counter
+ \let\p_counter\currentnotation
+ \fi
+ \doifelsecounter\p_counter\donothing{\strc_notes_define_counter\p_counter}%
+ \letnotationparameter\s!counter\p_counter
+ %\strc_notes_setup_counter\currentnotation
+\to \everydefinenotation
+
+\let\p_strc_constructions_title \empty
+\let\p_strc_constructions_number\empty
+
+\protected\setvalue{\??constructioninitializer\v!notation}%
+ {\let \currentnotation \currentconstruction
+ \enforced\let\constructionparameter \notationparameter
+ \enforced\let\constructionnamespace \??notation
+ \enforced\let\detokenizedconstructionparameter\detokenizednotationparameter
+ \enforced\let\letconstructionparameter \letnotationparameter
+ \enforced\let\useconstructionstyleandcolor \usenotationstyleandcolor
+ \enforced\let\setupcurrentconstruction \setupcurrentnotation
+ \edef\p_strc_constructions_number{\constructionparameter\c!number}%
+ \ifx\p_strc_constructions_number\v!yes
+ \settrue\c_strc_constructions_number_state
+ \iftrialtypesetting
+ \strc_counters_save\currentconstructionnumber
+ \fi
+ %\strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel
+ \else
+ \setfalse\c_strc_constructions_number_state
+ \fi
+ \edef\p_strc_constructions_title{\constructionparameter\c!title}%
+ \ifx\p_strc_constructions_title\v!yes
+ \settrue\c_strc_constructions_title_state
+ \else
+ \setfalse\c_strc_constructions_title_state
+ \fi}
+
+\protected\setvalue{\??constructionfinalizer\v!notation}%
+ {\ifconditional\c_strc_constructions_number_state
+ \iftrialtypesetting
+ \strc_counters_restore\currentconstructionnumber
+ \fi
+ \fi}
+
+%D Notations (we simply needed a word that relates to notes and is and sounds like
+%D description and enumeration) are a special case in the sense that they are
+%D stored, rendered elsewhere and referered to from where they are specified. For
+%D that reason they have a different set op main commands.
+
+% \notation[ref]{title}
+% \notation[reference=,title=]
+% \startnotation[ref] title \stopnotation
+
+\protected\def\strc_notations_next {\strc_constructions_next_indeed \namednotationparameter} % #1#2
+\protected\def\strc_notations_reset{\strc_constructions_reset_indeed\namednotationparameter} % #1#2
+%protected\def\strc_notations_set {\strc_constructions_set_indeed \namednotationparameter} % #1#2
+
+\newconditional\c_strc_notations_anchored_next
+
+\def\strc_notations_finalize
+ {\ifconditional\c_strc_notations_anchored_next
+ \expandafter\strc_notations_finalize_next
+ \else
+ \expandafter\strc_notations_finalize_previous
+ \fi}
+
+\def\strc_notations_finalize_previous
+ {\normalexpanded{\endgroup\noteparameter\c!next}}
+
+\def\strc_notations_finalize_next
+ {\endgroup\ignorespaces}
+
+\tolerant\protected\def\strc_notations_command[#1]#*[#2]%
+ {\begingroup
+ \edef\currentnote{#1}%
+ \strc_constructions_initialize{#1}%
+ \strc_notes_synchronize
+ \edef\p_next{\noteparameter\c!anchor}%
+ \ifx\p_next\v!next % for now only two states
+ \settrue \c_strc_notations_anchored_next
+ \else
+ \setfalse\c_strc_notations_anchored_next
+ \fi
+ \ifnotesenabled
+ \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel
+ \fi
+ \ifhastok={#2}%
+ \expandafter\strc_notations_command_setups
+ \else
+ \expandafter\strc_notations_command_reference
+ \fi[#2]}
+
+\def\strc_notations_command_setups[#1]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,\c!referencetext=,#1]%
+ \strc_notations_wrapup}
+
+\tolerant\def\strc_notations_command_reference[#1]#*#=%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=]%
+ \strc_notations_wrapup}
+
+\def\strc_notations_wrapup
+ {\csname\??constructionnotehandler\currentconstructionhandler\endcsname
+ \strc_constructions_finalize
+ \strc_notations_finalize}
+
+\tolerant\protected\def\strc_notations_start[#1]#*[#2]%
+ {\begingroup
+ \edef\currentnote{#1}%
+ \strc_constructions_initialize{#1}%
+ \strc_notes_synchronize
+ \ifnotesenabled
+ \strc_counters_increment_sub\currentconstructionnumber\currentconstructionlevel
+ \fi
+ \ifhastok={#2}%
+ \expandafter\strc_notations_start_setups
+ \else
+ \expandafter\strc_notations_start_reference
+ \fi[#2]}
+
+\let\strc_notations_pickup_yes\relax
+
+\protected\def\strc_notations_start_setups[#1]%
+ {\normalexpanded{\def\noexpand\strc_notations_pickup_yes##/\csname\e!stop\currentconstruction\endcsname{\strc_notations_start_setups_indeed[#1]{##1}}}%
+ \strc_notations_pickup_yes}
+
+\protected\def\strc_notations_start_setups_indeed[#1]#*#2%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=,#1]%
+ \strc_notations_wrapup}
+
+\protected\def\strc_notations_start_reference[#1]%
+ {\normalexpanded{\def\noexpand\strc_notations_pickup_yes##/\csname\e!stop\currentconstruction\endcsname{\strc_notations_start_reference_indeed[#1]{##1}}}%
+ \strc_notations_pickup_yes}
+
+\protected\def\strc_notations_start_reference_indeed[#1]#*#2%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=]%
+ \strc_notations_wrapup}
+
+\protected\def\strc_notations_stop
+ {}
+
+%D A complication is that we need to set up rather specific properties of e.g.
+%D footnotes. It is for this reason that we introduce an extra level of
+%D indirectness. This way notations don't bark on undefined macros when used in
+%D combination.
+
+\protected\setvalue{\??constructionnotehandler\v!notation}%
+ {\csname\??constructionnotehandler\currentconstructionhandler:\constructionparameter\c!type\endcsname}
+
+\protected\setvalue{\??constructionnotehandler\v!notation:}% empty case
+ {[\currentconstructionhandler:\currentconstruction]}
+
+%D Here is a simple renderer for notes
+
+\defineconstructionalternative
+ [\v!note]
+ [\c!renderingsetup=\??constructionrenderings:\v!note]
+
+\startsetups[\??constructionrenderings:\v!note]
+ \noindent
+ \leftboundary % experiment, to be done in more places
+ \llap{\box\constructionheadbox\hskip\constructionparameter\c!distance}%
+ \useconstructionstyleandcolor\c!style\c!color
+ \ignorespaces
+\stopsetups
+
+%D We now implement the note definer.
+
+\installcorenamespace{note}
+
+\installframedcommandhandler \??note {note} \??note
+
+\let\setupnotes\setupnote
+
+% These only concern the inline symbol/number and wrapping of the whole list.
+
+\setupnotes % not all make sense here
+ [\c!location=\v!page,
+ %\c!conversion=,
+ \c!rule=\v!on,
+ \c!before=\blank,
+ \c!bodyfont=\v!small,
+ \c!anchor=, % can also be v!next
+ %\c!style=,
+ %\c!color=,
+ %\c!after=,
+ %\c!rulecolor=,
+ %\c!rulecommand=,
+ \c!rulethickness=\linewidth,
+ \c!frame=\v!off,
+ \c!distance=.125em, % in the text between symbols
+ % \c!textseparator={,}, % optional separator
+ \c!columndistance=1em,
+ % \c!margindistance=.5em,
+ \c!align=, % also use instead of \c!tolerance
+ \c!split=\v!tolerant,
+ \c!width=\makeupwidth, % \ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi
+ \c!height=\textheight,
+ \c!command=, % \noteparameter\c!numbercommand, % (command in enumeration) too messy, called twice
+ \c!separator=,%
+ \c!textcommand=\high,
+ \c!textstyle=\tx,
+ %\c!textcolor=,
+ \c!interaction=\v!yes,
+ %\c!factor=,
+ %\c!scope=, % \v!text \v!page
+ \c!prefixconnector=.,
+ %\c!next=\autoinsertnextspace,
+ \c!prefix=\v!no,
+ %\c!continue=\v!no,
+ \c!paragraph=\v!no,
+ \c!inbetween=\hskip\emwidth,
+ \c!symbol=\mathematics{*},
+ \c!n=1]
+
+\setupnotes
+ [\c!expansion=\v!no,
+ \c!xmlsetup=,
+ \s!catcodes=]
+
+%D Insertions are part of notes.
+
+% \installcorenamespace{noteinsertion}
+
+\permanent\def\currentnoteinsertion {\noteparameter\s!insert}
+\permanent\def\currentnoteinsertionnumber{\namedinsertionnumber{\noteparameter\s!insert}}
+
+\appendtoks
+ \ifempty\currentnoteparent
+ \doifelseinsertion\currentnote
+ \donothing
+ {\defineinsertion[\currentnote]% could be an option
+ \normalexpanded{\t_strc_notes{\the\t_strc_notes\noexpand\strc_notes_process_list{\currentnote}}}}%
+ \letnoteparameter\s!insert\currentnote
+ \definenotation[\currentnote][\c!type=\v!note]%
+ \else
+ \setexpandednoteparameter\s!insert{\namednoteparameter\currentnoteparent\s!insert}%
+ \definenotation[\currentnote][\currentnoteparent][\c!type=\v!note]%
+ \fi
+ \clf_definenote
+ {\currentnote}%
+ {insert}%
+ \currentnoteinsertionnumber
+ \relax
+\to \everydefinenote
+
+% maybe we will share this at some point:
+
+\def\strc_notes_define_counter#tag% todo: move inline
+ {\definecounter[#tag]%
+ \registerenumerationcounter{#tag}}
+
+\appendtoks
+ \synchronizenotationcounters
+\to \everysetupnotation
+
+\appendtoks
+ \synchronizenotationcounters
+\to \everydefinenotation
+
+% so far
+
+%letcsname\??constructionstarthandler \v!notation\expandafter\endcsname\csname\??constructionstarthandler \v!enumeration\endcsname
+\letcsname\??constructionstarthandler \v!notation\expandafter\endcsname\csname\??constructionstarthandler \v!construction\endcsname % no par mess
+\letcsname\??constructionstophandler \v!notation\expandafter\endcsname\csname\??constructionstophandler \v!enumeration \endcsname
+\letcsname\??constructioncommandhandler\v!notation\expandafter\endcsname\csname\??constructioncommandhandler\v!enumeration \endcsname
+\letcsname\??constructiontexthandler \v!notation\expandafter\endcsname\csname\??constructiontexthandler \v!enumeration \endcsname
+
+\protected\setvalue{\??constructionmainhandler\v!notation}#following%
+ {\iftrialtypesetting \else
+ \begingroup
+ \currentconstructionsynchronize
+ \c_attr_destination\currentconstructionattribute\relax % todo, whole text
+ \signalcharacter
+ \endgroup
+ \fi#following}
+
+\protected\setvalue{\??constructionnotehandler\v!notation:\v!note}% in the running text
+ {\ifnotesenabled
+ % do be done elsewhere
+ %
+ %let\currentnote\currentconstructionmain
+ \let\currentnote\currentconstruction % else wrong inheritance
+ %
+ \iftrialtypesetting
+ \strc_notes_inject_dummy
+ \else
+ \begingroup
+ \edef\currentnotenumber{\clf_storenote{\currentnote}\currentconstructionlistentry}%
+ \settrue\processingnote
+ \ifconditional\c_strc_notes_skip
+ \glet\lastnotesymbol\strc_notes_inject_symbol_nop
+ \else
+ \iftypesettinglines % otherwise problems with \type <crlf> {xxx}
+ \ignorelines % makes footnotes work in \startlines ... \stoplines
+ \fi
+ \ifconditional\c_strc_notes_symbol
+ \strc_notes_inject_symbol_yes
+ \else
+ \unskip\unskip
+ \glet\lastnotesymbol\strc_notes_inject_symbol_yes
+ \fi
+ \fi
+ \ifconditional\postponingnotes % todo: per note class
+ \global\settrue\postponednote
+ \orelse\ifconditional\inlocalnotes % todo: per note class
+ \global\settrue\postponednote
+ \orelse\ifconditional\c_strc_notes_delayed
+ % probably end notes
+ \else
+ \handlenoteinsert\currentnote\currentnotenumber % either an insert or just delayed
+ \fi
+ \endgroup
+ \fi
+ \fi
+ \ifconditional\c_strc_notes_skip
+ \global\setfalse\c_strc_notes_skip
+ \else
+ \kern\d_strc_notes_signal\relax % \relax is needed to honor spaces
+ \fi}
+
+%D Interaction in notes is somewhat complex due to the way notes get flushed. In
+%D principle it is more or less the same as lists but where in lists we pack whole
+%D entries, in notes this doesn't happen. Okay, in retrospect we could have made
+%D descriptions lists but that will be a backward compatibility mess. At some point
+%D a completely new mechanism might show up, but not now. Also, as notes are inserts
+%D there is some extra mess to be kept in mind and it's easier to maintain two
+%D mechanisms than to combine too much.
+%D
+%D Interaction is also complicated because we want to provide several variants. For
+%D simple reference there is no need for anything special, as page references will
+%D do and we store them in the list anyway. But if we want a destination with
+%D dimensions we will use an additional destination because we can have only one
+%D with the same name and we always have the number as one.
+
+% interaction:
+%
+% all : text and number
+% number|yes: only number
+% text : only text
+%
+% \dogetsimple : injects
+
+\installcorenamespace{noteinteractioninline}
+\installcorenamespace{noteinteractiondisplay}
+
+\newconstant\a_strc_notes_symbol_reference
+\newconstant\a_strc_notes_number_reference
+\newconstant\a_strc_notes_text_reference
+\newconstant\a_strc_notes_text_destination
+
+\let\strc_notes_get_reference_attribute_symbol \empty
+\let\strc_notes_get_destination_attribute_symbol\empty
+
+\def\strc_notes_interaction_check_inline
+ {\edef\p_interaction{\noteparameter\c!interaction}%
+ \csname\??noteinteractioninline
+ \ifcsname\??noteinteractioninline\p_interaction\endcsname\p_interaction\else\v!no\fi
+ \endcsname}
+
+\def\strc_notes_interaction_check_display
+ {\edef\p_interaction{\noteparameter\c!interaction}%
+ \csname\??noteinteractiondisplay
+ \ifcsname\??noteinteractiondisplay\p_interaction\endcsname\p_interaction\else\v!no\fi
+ \endcsname}
+
+\mutable\let\currentnotenumber\!!zerocount
+
+\let\strc_notes_get_reference_attribute_symbol \empty
+\let\strc_notes_get_destination_attribute_symbol\empty
+
+\let\strc_notes_set_reference_attribute_number\donothing
+\let\strc_notes_set_reference_attribute_text \donothing
+\let\strc_notes_set_destination_attribute_text\donothing
+
+\let\strc_notes_set_style_color_inline \relax
+\let\strc_notes_set_style_color_display\relax
+
+% inline
+
+\let\m_strc_notes_internal\relax
+
+\def\strc_notes_prepare_inline_references_nop
+ {\let\strc_notes_get_reference_attribute_symbol\empty
+ \let\strc_notes_get_destination_attribute_symbol\empty
+ \let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_nop}
+
+\def\strc_notes_prepare_inline_references_yes
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \strc_references_set_simple_reference{*\m_strc_notes_internal}% destination
+ \strc_references_get_simple_reference{internal(\m_strc_notes_internal)}% reference
+ \edef\strc_notes_get_destination_attribute_symbol{attr\destinationattribute\currentdestinationattribute}%
+ \edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}%
+ \let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_yes}
+
+\letvalue{\??noteinteractioninline\v!no }\strc_notes_prepare_inline_references_nop
+\letvalue{\??noteinteractioninline\v!all }\strc_notes_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!number}\strc_notes_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!text }\strc_notes_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!yes }\strc_notes_prepare_inline_references_yes
+
+% display (for 'all' we need unique text and number attributes so we resolve twice
+% as we otherwise don't get the number one which is lapped in the margin so we need
+% to explicitly visit it)
+
+\def\strc_notes_prepare_display_references_nop
+ {\let\strc_notes_set_reference_attribute_number\donothing
+ \let\strc_notes_set_reference_attribute_text\donothing
+ \let\strc_notes_set_destination_attribute_text\donothing
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_nop}
+
+\def\strc_notes_prepare_display_references_yes_number
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\m_strc_notes_internal\relax
+ \strc_notes_prepare_display_references_nop
+ \else
+ \let\strc_notes_set_reference_attribute_text\donothing
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
+ \edef\strc_notes_set_reference_attribute_number{\c_attr_reference\currentreferenceattribute}%
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
+ \fi}
+
+\def\strc_notes_prepare_display_references_yes_text
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\m_strc_notes_internal\relax
+ \strc_notes_prepare_display_references_nop
+ \else
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
+ \edef\strc_notes_set_reference_attribute_text{\c_attr_reference\currentreferenceattribute}%
+ \let\strc_notes_set_reference_attribute_number\donothing
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
+ \fi}
+
+\def\strc_notes_prepare_display_references_yes_all
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\m_strc_notes_internal\relax
+ \strc_notes_prepare_display_references_nop
+ \else
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
+ \edef\strc_notes_set_reference_attribute_text{\c_attr_reference\currentreferenceattribute}%
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
+ \edef\strc_notes_set_reference_attribute_number{\c_attr_reference\currentreferenceattribute}%
+ \let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
+ \fi}
+
+\letvalue{\??noteinteractiondisplay\v!no }\strc_notes_prepare_display_references_nop
+\letvalue{\??noteinteractiondisplay\v!all }\strc_notes_prepare_display_references_yes_all
+\letvalue{\??noteinteractiondisplay\v!number}\strc_notes_prepare_display_references_yes_number
+\letvalue{\??noteinteractiondisplay\v!text }\strc_notes_prepare_display_references_yes_text
+\letvalue{\??noteinteractiondisplay\v!yes }\strc_notes_prepare_display_references_yes_number
+
+\mutable\let\strc_notes_set_style_color_inline_nop \usenotestyleandcolor
+\mutable\let\strc_notes_set_style_color_display_nop\usenotationstyleandcolor
+
+\protected\def\strc_notes_set_style_color_inline_yes#style#color%
+ {\usenotestyleandcolor#style#color%
+ \iflocation\strc_notes_set_style_color_special\fi}
+
+\protected\def\strc_notes_set_style_color_display_yes#style#color%
+ {\usenotationstyleandcolor#style#color%
+ \iflocation\strc_notes_set_style_color_special\fi}
+
+\def\strc_notes_set_style_color_special
+ {\iftrialtypesetting
+ % keep
+ \orelse\ifempty\currentcolorparameter
+ \scratchcounter\clf_notedeltapage{\currentnote}\currentnotenumber\relax % todo calculate once
+ \setlocationcolorspecified\scratchcounter
+ \fi}
+
+\setvalue{\??constructiontexthandler\v!notation}%
+ {\begingroup
+ % we need to retrigger the reference as otherwise it gets lost because we don't do nested
+ % references with the same id ... maybe some day if we can figure out a nice heuristic ...
+ % the problem is that normally it's no issue but here we lap into the margin, so maybe that's
+ % a criterium
+ % \strc_notes_interaction_check_display
+ \strc_notes_set_reference_attribute_number
+ \dotagsetnotation
+ \strc_notes_set_style_color_display\c!headstyle\c!headcolor
+ \strc_enumerations_text
+ \endgroup}
+
+% in mkii the pointer only showed up in pagewise notes
+
+\protected\def\strc_notes_inject_pointer % todo calculate once
+ {\ifcase\clf_notedeltapage{\currentnote}\currentnotenumber\relax\relax
+ % unknown
+ \or
+ % same page
+ \or
+ \noteparameter\c!symbolcommand{\symbol[\v!note:\v!nextpage]}%
+ \or
+ \noteparameter\c!symbolcommand{\symbol[\v!note:\v!previouspage]}%
+ \fi}
+
+\protected\def\strc_notes_inject_symbol_yes
+ {\strc_notes_inject_symbol_indeed\conditionaltrue}
+
+\protected\def\strc_notes_inject_symbol_nop
+ {\strc_notes_inject_symbol_indeed\conditionalfalse}
+
+\definemargindata
+ [strc_notes_destination_margin]
+ [\v!left]
+ [\c!margin=\zeropoint,
+ \c!width=\zeropoint,
+ \c!style=,
+ \c!color=]
+
+\protected\def\strc_notes_inject_symbol_indeed#synchronize%
+ {\ifconditional\c_strc_notations_anchored_next\else
+ \removeunwantedspaces
+ \doifelseitalic\/\donothing % Charles IV \footnote{the fourth}
+ \fi
+ \ifdim\lastkern=\d_strc_notes_signal
+ % \kern\noteparameter\c!distance % yes or no note font? or main text
+ \strc_notes_inject_separator
+ \fi
+ \nobreak
+ \begingroup
+ \strc_notes_interaction_check_inline
+ \strc_notes_set_style_color_inline\c!textstyle\c!textcolor
+ \hbox \strc_notes_get_reference_attribute_symbol \strc_notes_get_destination_attribute_symbol \bgroup
+ % \hbox \strc_notes_get_reference_attribute_symbol \bgroup \strc_notes_destination_hack
+ \strc_references_flush_destination_nodes % a bit late but ok
+ \dostarttagged\t!descriptionsymbol\currentnote
+ \dotagsetnotesymbol
+ \noteparameter\c!textcommand{\clf_noteprefixednumber{\currentnote}\currentnotenumber\relax}%
+ % the next one can cycle so we need to make sure it has no advance width
+ \doif{\noteparameter\c!indicator}\v!yes\strc_notes_inject_pointer
+ \dostoptagged
+ \egroup
+ \endgroup
+ \glet\lastnotesymbol\empty}
+
+\protected\def\strc_notes_inject_dummy % temp hack
+ {\removeunwantedspaces
+ \doifelseitalic\/\donothing % Charles IV \footnote{the fourth}
+ \ifdim\lastkern=\d_strc_notes_signal
+ % \kern\noteparameter\c!distance % yes or no note font? or main text
+ \strc_notes_inject_separator
+ \fi
+ \nobreak
+ \hpack to .5\emwidth{}%
+ \glet\lastnotesymbol\empty}
+
+\protected\def\strc_notes_inject_separator % patch by WS due to request on list
+ {\edef\p_textseparator{\noteparameter\c!textseparator}%
+ \ifempty\p_textseparator
+ \kern\noteparameter\c!distance
+ \else
+ % skip or kern
+ \nobreak
+ \hbox\bgroup
+ \strc_notes_interaction_check_inline
+ \strc_notes_set_style_color_inline\c!textstyle\c!textcolor
+ \noteparameter\c!textcommand{\p_textseparator}%
+ \kern\noteparameter\c!distance
+ \egroup
+ \nobreak
+ \fi}
+
+% this needs a further cleanup ... soon as it's a slow mechanism
+%
+% -- set breakpoint in descriptions
+% -- reset after trialtypesetting
+% -- that way we can trick the symbol space
+
+% removed:
+%
+% \pushsomestates
+%
+% core-ins -> obsolete
+%
+% saveinsertiondata
+% restoreinsertiondata
+% saveinsertionbox
+% eraseinsertionbackup
+% restoreinsertionbackup
+
+% \def\savenotedata {} % \writestatus{todo}{save note data}}
+% \def\restorenotedata {} % \writestatus{todo}{restore note data}}
+% \def\savenotecontent {} % \writestatus{todo}{save note content}}
+% \def\restorenotecontent{} % \writestatus{todo}{restore note content}}
+% \def\erasenotebackup {} % \writestatus{todo}{erase note backup}}
+
+% page-set:
+
+% \def\enablenotes {\writestatus{todo}{enable notes}}
+% \def\disablenotes {\writestatus{todo}{disable notes}}
+% \def\savenotes {\writestatus{todo}{save notes}}
+% \def\flushsavednotes{\writestatus{todo}{flush notes}}
+
+% experiment: (compare scope=text and scope=page)
+%
+% \definenote[mynote][way=bytext,location=text,width=\leftmarginwidth,scope=page,rule=,before=,after=,factor=0]
+% \setuptexttexts[margin][\vbox to \textheight{\placenotes[mynote]\vfill}][]
+
+%D Footnotes are can be characterized by three components:
+%D
+%D \startitemize[packed]
+%D \item a small number \footnote {a footnote number} or symbol {\setupfootnotes
+%D [conversion=set 2]\footnote {a footnote}}
+%D \item and a similar mark at the bottom of the page
+%D \item followed by some additional text
+%D \stopitemize
+%D
+%D Because footnotes are declared at the location of their reference they can be
+%D seen as a special kind of floating bodies. Their placement is postponed but has
+%D to be taken into account in the pagebreak calculations. This kind of calculations
+%D are forced by using \type{\insert}s and dealing with all cases is not trivial.
+
+%D \macros
+%D {notesenabled}
+%D
+%D We need a couple of states because at some moments we don't want to mess around
+%D with inserts at all. Take for instance a table of contents. And so we can
+%D temporary disable footnotes by saying
+%D
+%D \starttyping
+%D \notesenabledfalse
+%D \stoptyping
+
+\newif\ifnotesenabled \notesenabledtrue
+
+% better mark a note .. once flushed no more flushing
+
+%appendtoks \notesenabledfalse \to \everymarking
+\appendtoks \notesenabledfalse \to \everybeforepagebody
+\appendtoks \notesenabledfalse \to \everystructurelist % quick hack
+\appendtoks \notesenabledfalse \to \everysimplifycommands % quick hack
+\appendtoks \notesenabledfalse \to \everypreroll % quick hack
+
+%D Often we need to process the whole set of notes and to make that fast, we use a
+%D token register:
+
+% we have several synchronizers:
+%
+% - after a definition
+% - after a specific setup
+% - after a general setup (inheritance of dimensions)
+% - just before a note is typeset
+
+\newtoks\t_strc_notes
+
+\let\strc_notes_process_list\gobbleoneargument
+
+\protected\def\strc_notes_process#action% argument is a \macro that uses \currentnote
+ {\def\strc_notes_process_list##1{\edef\currentnote{##1}\let\currentdescription\currentnote#action}%
+ \the\t_strc_notes}
+
+\newtoks\everychecknote % just before a note is typeset
+\newtoks\everysynchronizenote % after a general setup has happened
+
+\appendtoks
+ \ifempty\currentnote \else
+ \setupnotations[\currentnote][]% also a synchronize
+ \fi
+\to \everysynchronizenote
+
+\def\strc_notes_synchronize
+ {\the\everysynchronizenote} % we can speed this one up if needed by avoiding the commalist
+
+\appendtoks
+ \strc_notes_process\strc_notes_synchronize
+\to \everysetupnoteroot
+
+\appendtoks
+ \the\everysynchronizenote
+\to \everydefinenote
+
+% \starttext
+% text \startfootnote Test.\stopfootnote
+% test \footnote{xxxx} \subfootnote{xxxx}
+% test \footnote{xxxx} \subfootnote{xxxx}
+% \stoptext
+
+\installcorenamespace{notecommand}
+\installcorenamespace{notealign}
+\installcorenamespace{notepenalty}
+\installcorenamespace{noterule}
+
+\permanent\protected\def\currentnoterulecommand{\begincsname\??notecommand\currentnote\endcsname}
+\permanent\protected\def\currentnoterulealign {\begincsname\??notealign \currentnote\endcsname}
+
+\permanent\protected\def\currentnoterulecommandcommand{\noteparameter\c!rulecommand}
+\permanent\protected\def\currentnoterulecommandnormal {\normalnoterule} % no let as it can be changed afterwards
+
+\permanent\protected\def\letcurrentnoterulecommand{\enforced\letcsname\??notecommand\currentnote\endcsname}
+\permanent\protected\def\letcurrentnoterulealign {\enforced\letcsname\??notealign \currentnote\endcsname}
+
+\appendtoks
+ \enforced\letcsname\??notecommand\currentnote\endcsname\currentnoterulecommandnormal
+ \enforced\letcsname\??notealign \currentnote\endcsname\lefttoright
+\to \everysynchronizenote
+
+\def\strc_notes_set_rule
+ {\letcurrentnoterulecommand\relax % so we default to nothing
+ \letcurrentnoterulealign \relax
+ \processcommacommand[\noteparameter\c!rule]\strc_notes_set_rule_step}
+
+\def\strc_notes_set_rule_step#alternative%
+ {\begincsname\??noterule#alternative\endcsname}
+
+\def\strc_notes_set_rule_autodir
+ {\doifelserighttoleftinbox\currentnoteinsertionnumber\righttoleft\lefttoright}
+
+\setvalue{\??noterule \v!command}{\letcurrentnoterulecommand\currentnoterulecommandcommand}
+\setvalue{\??noterule \v!on}{\letcurrentnoterulecommand\currentnoterulecommandnormal}
+\setvalue{\??noterule \v!normal}{\letcurrentnoterulecommand\currentnoterulecommandnormal}
+\setvalue{\??noterule \v!left}{\letcurrentnoterulecommand\currentnoterulecommandnormal
+ \letcurrentnoterulealign \lefttoright}
+\setvalue{\??noterule \v!right}{\letcurrentnoterulecommand\currentnoterulecommandnormal
+ \letcurrentnoterulealign \righttoleft}
+\setvalue{\??noterule\v!paragraph}{\letcurrentnoterulecommand\currentnoterulecommandnormal
+ \letcurrentnoterulealign \strc_notes_set_rule_autodir}
+\setvalue{\??noterule \v!off}{\letcurrentnoterulecommand\relax}
+
+\appendtoks
+ \strc_notes_set_rule
+\to \everysynchronizenote
+
+\permanent\def\currentnotepenalty
+ {\ifcsname\??notepenalty\noteparameter\c!split\endcsname
+ \lastnamedcs
+ \else
+ \numexpr\noteparameter\c!split\relax
+ \fi}
+
+\setnewconstant\notepenaltytolerant \zerocount
+\setnewconstant\notepenaltystrict 9999
+\setnewconstant\notepenaltyverystrict\maxdimen
+
+\letvalue{\??notepenalty\v!tolerant }\notepenaltytolerant
+\letvalue{\??notepenalty\v!strict }\notepenaltystrict
+\letvalue{\??notepenalty\v!verystrict}\notepenaltyverystrict
+\letvalue{\??notepenalty }\notepenaltytolerant
+
+%D The following switch can be used to disable limiting the height of the footnote
+%D area, something that is needed in multi column balancing. Use this switch with
+%D care.
+
+\newif\ifnotelimit \notelimittrue % shared
+
+\def\strc_notes_set_factor
+ {\edef\p_factor{\noteparameter\c!factor}%
+ \ifempty\p_factor \else
+ \ifnum\p_factor<\zerocount \else
+% \global
+ \count\currentnoteinsertionnumber\p_factor % new: global
+ \fi
+ \fi}
+
+\appendtoks
+ \strc_notes_set_factor
+\to \everysynchronizenote
+
+% locations:
+
+\installcorenamespace{notelocationvariant}
+\installcorenamespace{notepositionvariant}
+\installcorenamespace{notedelayedvariant}
+\installcorenamespace{notelocation}
+
+\newconditional\c_strc_notes_delayed
+
+\protected\def\strc_notes_set_delayed_yes{\settrue \c_strc_notes_delayed}
+\protected\def\strc_notes_set_delayed_nop{\setfalse\c_strc_notes_delayed}
+
+\setvalue{\??notelocation\v!page }{\letcsname\??notedelayedvariant \currentnote\endcsname\strc_notes_set_delayed_nop
+ \letcsname\??notelocationvariant\currentnote\endcsname\strc_notes_set_location_page}
+\setvalue{\??notelocation\v!columns }{\letcsname\??notedelayedvariant \currentnote\endcsname\strc_notes_set_delayed_nop
+ \letcsname\??notelocationvariant\currentnote\endcsname\strc_notes_set_location_columns}
+\setvalue{\??notelocation\v!lastcolumn }{\letcsname\??notedelayedvariant \currentnote\endcsname\strc_notes_set_delayed_nop
+ \letcsname\??notelocationvariant\currentnote\endcsname\strc_notes_set_location_lastcolumn}
+\setvalue{\??notelocation\v!firstcolumn}{\letcsname\??notedelayedvariant \currentnote\endcsname\strc_notes_set_delayed_nop
+ \letcsname\??notelocationvariant\currentnote\endcsname\strc_notes_set_location_firstcolumn}
+\setvalue{\??notelocation\v!none }{\letcsname\??notedelayedvariant \currentnote\endcsname\strc_notes_set_delayed_yes
+ \letcsname\??notelocationvariant\currentnote\endcsname\strc_notes_set_location_none}
+\setvalue{\??notelocation\v!text }{\letcsname\??notedelayedvariant \currentnote\endcsname\strc_notes_set_delayed_yes
+ \letcsname\??notelocationvariant\currentnote\endcsname\strc_notes_set_location_text}
+\setvalue{\??notelocation\v!high }{\letcsname\??notepositionvariant\currentnote\endcsname\strc_notes_set_position_high}
+\setvalue{\??notelocation\v!bottom }{\letcsname\??notepositionvariant\currentnote\endcsname\strc_notes_set_position_bottom}
+
+\setvalue{\??notedelayedvariant \??notedelayedvariant }{\strc_notes_set_delayed_nop} % not let
+\setvalue{\??notepositionvariant\??notepositionvariant}{\strc_notes_set_position_bottom} % not let
+\setvalue{\??notelocationvariant\??notelocationvariant}{\strc_notes_set_location_page} % not let
+
+\protected\def\strc_notes_set_delayed
+ {\csname\??notedelayedvariant
+ \ifcsname\??notedelayedvariant\currentnote\endcsname
+ \currentnote
+ \else
+ \??notedelayedvariant
+ \fi
+ \endcsname}
+
+\protected\def\strc_notes_set_position
+ {\csname\??notepositionvariant
+ \ifcsname\??notepositionvariant\currentnote\endcsname
+ \currentnote
+ \else
+ \??notepositionvariant
+ \fi
+ \endcsname}
+
+\protected\def\strc_notes_set_location
+ {\csname\??notelocationvariant
+ \ifcsname\??notelocationvariant\currentnote\endcsname
+ \currentnote
+ \else
+ \??notelocationvariant
+ \fi
+ \endcsname}
+
+\protected\def\strc_notes_set_variants
+ {\normalexpanded{\rawprocesscommalist[\noteparameter\c!location]\strc_notes_set_location_step}}
+
+\protected\def\strc_notes_set_location_step#alternative% the insert related one
+ {\begincsname\??notelocation#alternative\endcsname}
+
+\appendtoks
+ \strc_notes_set_variants
+ \strc_notes_set_delayed
+\to \everysynchronizenote
+
+\newskip \s_strc_notes_distance % we need to implement stretch
+\newcount\c_strc_notes_columns
+
+\newskip \s_strc_notes_before
+\newskip \s_strc_notes_inbetween
+\newconditional\c_strc_notes_first_flushed
+
+\appendtoks
+ \edef\p_spacebefore{\rootnoteparameter\c!spacebefore}%
+ \ifempty\p_spacebefore
+ \global\s_strc_notes_before\zeropoint
+ \else
+ \setbox\scratchbox\vbox{\blank[\p_spacebefore]\global\s_strc_notes_before\lastskip}%
+ \fi
+ \edef\p_spaceinbetween{\rootnoteparameter\c!spaceinbetween}%
+ \ifempty\p_spaceinbetween
+ \global\s_strc_notes_inbetween\zeropoint
+ \else
+ \setbox\scratchbox\vbox{\blank[\p_spaceinbetween]\global\s_strc_notes_inbetween\lastskip}%
+ \fi
+\to \everysynchronizenote
+
+\def\strc_notes_set_distance
+ {\begingroup
+ \restoreglobalbodyfont
+ \setbox\scratchbox\vbox % no reuse as it can mirror
+ {\forgetall
+ \dontcomplain
+ \noteparameter\c!before
+ \placenoterule
+ \strut
+ \noteparameter\c!after}%
+ % also dp now
+ \scratchdimen\dimexpr\htdp\scratchbox-\lineheight\relax
+ \ifgridsnapping
+ \getnoflines\scratchdimen
+ \scratchdimen\noflines\lineheight
+ \fi
+ \expandafter\endgroup\expandafter
+ \s_strc_notes_distance\the\scratchdimen\relax}
+
+\def\strc_notes_set_columns
+ {\c_strc_notes_columns\noteparameter\c!n\relax
+ \ifcase\c_strc_notes_columns
+ \c_strc_notes_columns\plusone
+ \fi}
+
+\def\strc_notes_set_location_page
+ {\setfalse\c_strc_notes_delayed
+ \strc_notes_set_distance
+ \strc_notes_set_columns
+ \page_inserts_set_location\currentnoteinsertion\v!page % \setupinsertion[\currentnote][\c!location=\v!page]%
+ \global\count\currentnoteinsertionnumber\numexpr(\plusthousand/\c_strc_notes_columns)*\nofmulticolumns\relax
+ \global\dimen\currentnoteinsertionnumber\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
+ \global\skip \currentnoteinsertionnumber\s_strc_notes_distance}
+
+\def\strc_notes_set_location_columns
+ {\setfalse\c_strc_notes_delayed
+ \strc_notes_set_distance
+ \strc_notes_set_columns
+ % \ifnum\currentnofcolumns=\zerocount
+ \ifnum\nofcolumns=\zerocount
+ \c_strc_notes_columns\plusone
+ \fi
+ \page_inserts_set_location\currentnoteinsertion\v!columns % \setupinsertion[\currentnote][\c!location=\v!columns]%
+ \global\count\currentnoteinsertionnumber\numexpr\plusthousand/\c_strc_notes_columns\relax
+ \global\dimen\currentnoteinsertionnumber\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
+ \global\skip \currentnoteinsertionnumber\s_strc_notes_distance}
+
+\def\strc_notes_set_location_somecolumn#whatcolumn%
+ {\setfalse\c_strc_notes_delayed
+ \strc_notes_set_distance
+ \strc_notes_set_columns
+ \page_inserts_set_location\currentnoteinsertion#whatcolumn% \setupinsertion[\currentnote][\c!location=#whatcolumn]%
+ \global\count\currentnoteinsertionnumber\plusthousand
+ \global\dimen\currentnoteinsertionnumber\ifnotelimit\noteparameter\c!height\else\maxdimen\fi
+ \global\skip \currentnoteinsertionnumber\s_strc_notes_distance}
+
+\def\strc_notes_set_location_firstcolumn{\strc_notes_set_location_somecolumn\v!firstcolumn}
+\def\strc_notes_set_location_lastcolumn {\strc_notes_set_location_somecolumn\v!lastcolumn }
+
+\def\strc_notes_set_location_text % we don't use inserts anyway (e.g. endnotes)
+ {\settrue\c_strc_notes_delayed
+ \clf_setnotestate{\currentnote}{store}%
+ \page_inserts_set_location\currentnoteinsertion\v!text % \setupinsertion[\currentnote][\c!location=\v!text]%
+ \global\count\currentnoteinsertionnumber\zerocount
+ \global\dimen\currentnoteinsertionnumber\maxdimen
+ \global\skip \currentnoteinsertionnumber\zeropoint}
+
+\let\strc_notes_set_location_none\strc_notes_set_location_text
+
+\def\strc_notes_set_properties
+ {\strc_notes_set_columns
+ \strc_notes_set_distance
+ \strc_notes_set_location
+ \strc_notes_set_delayed}
+
+\let\strc_notes_set_position_high\relax
+
+\def\strc_notes_set_position_bottom
+ {\settrue\c_notes_bottom_present}
+
+\appendtoks
+ \strc_notes_set_properties
+\to \everysynchronizenote
+
+%D A fast checker for bottom notes being used:
+
+\newconditional\c_notes_bottom_present
+
+\def\strc_notes_check_if_bottom_present_indeed % in otr !
+ {\ifvoid\currentnoteinsertionnumber\else
+ \strc_notes_set_position
+ \fi}
+
+\def\strc_notes_check_if_bottom_present_step
+ {\ifconditional\c_notes_bottom_present\else\strc_notes_check_if_bottom_present_indeed\fi}
+
+\def\strc_notes_check_if_bottom_present
+ {\setfalse\c_notes_bottom_present
+ \strc_notes_process\strc_notes_check_if_bottom_present_step}
+
+% Example of using factor:
+%
+% \definenote[mynote][way=bypage,location=text,width=\marginwidth,rule=,before=,factor=0]
+% \setuplayout[backspace=5cm,margin=3cm,margindistance=.5cm,width=middle]
+% \setuptexttexts[margin][\vbox to \textheight{\placenotes[mynote]\vfill}][]
+% \starttext
+% \dorecurse{10}{test \mynote{one one one one one one} \input zapf \mynote{one one one one one one} }
+% \stoptext
+
+%D The noterule can be a graphic and therefore calling this setup macro at every
+%D skipswitch is tricky (many many MP runs). Let's just reserve a few points, that
+%D probably match those of the stretch component. A bit messy:
+
+\permanent\protected\def\placenoterule
+ {\begingroup
+ \currentnoterulealign
+ \currentnoterulecommand
+ \par
+ \endgroup}
+
+\permanent\protected\def\normalnoterule
+ {\ifvmode
+ \dontleavehmode \blackrule
+ [\c!color=\noteparameter\c!rulecolor,
+ \c!width=.2\hsize,
+ \c!height=\noteparameter\c!rulethickness,
+ \c!depth=\zeropoint]%
+ \endgraf
+ \kern\strutdepth
+ \fi}
+
+%D The formatting depends on the width of the table, so we have to set \type {n} to
+%D zero.
+%D
+%D \starttyping
+%D \startbuffer
+%D \bTABLE
+%D \bTR \bTD one \footnote{\dorecurse{10}{abcd }} \eTD \bTD two \eTD \eTR
+%D \bTR \bTD three fout five six seven eight nine \eTD \bTD ten \eTD \eTR
+%D \eTABLE
+%D \stopbuffer
+%D
+%D \startlocalfootnotes[n=0,location={text,none}]
+%D \placelegend[n=2]{\getbuffer}{\placelocalfootnotes}
+%D \stoplocalfootnotes
+%D \stoptyping
+
+%D \macros
+%D {footnote}
+%D
+%D A footnote can have a reference as optional argument and therefore its formal
+%D specification looks like:
+%D
+%D \showsetup{footnote}
+%D
+%D This command has one optional command: the reference. By saying \type{[-]} the
+%D number is omitted. The footnote command is not that sensitive to spacing, so it's
+%D quite legal to say:
+%D
+%D \startbuffer
+%D Users of \CONTEXT\ must keep both feet \footnote {Given they have two.} on the
+%D ground and not get confused \footnote {Or even crazy.} by all those obscure
+%D \footnote {But fortunately readable.} parameters.
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D When setting the \type{conversion} to \type{set 2} we get
+%D something like:
+%D
+%D \bgroup
+%D \startnarrower
+%D \setupfootnotes[conversion=set 1]
+%D \getbuffer
+%D \stopnarrower
+%D \egroup
+%D
+%D Typesetting footnotes is, at least for the moment, disabled when reshaping boxes.
+%D The additional macro \type {\footnotetext} and the associated \type {\note} macro
+%D were implemented at request of users on the mailing list and a suggestion by taco
+%D to split of the symbol placement. I decided to merge this functionality with the
+%D existing \type {\note} functionality.
+
+\newconditional\c_strc_notes_symbol \settrue\c_strc_notes_symbol % not used
+\newconditional\c_strc_notes_skip
+
+\permanent\protected\def\setnote [#tag]{\csname#tag\endcsname}
+\permanent\protected\def\setnotetext[#tag]{\global\settrue\c_strc_notes_skip\csname#tag\endcsname}
+
+\permanent\protected\def\handlenoteinsert#tag#id%
+ {\begingroup
+ \edef\currentnote{#tag}%
+ \strc_constructions_initialize{#tag}%
+ \strc_notes_synchronize
+ \the\everybeforenoteinsert
+ \insert\currentnoteinsertionnumber\bgroup
+ \the\everyinsidenoteinsert\relax
+ \usesetupsparameter\noteparameter % experimental
+ \useinterlinespaceparameter\noteparameter
+ \doifelse{\noteparameter\c!paragraph}\v!yes
+ {\nointerlineskip
+ \startvboxtohboxseparator
+ \noteparameter\c!inbetween
+ \stopvboxtohboxseparator
+ \startvboxtohbox
+ \handlenoteitself{#tag}{#id}%
+ \stopvboxtohbox}
+ {\handlenoteitself{#tag}{#id}}%
+ \egroup
+ \the\everyafternoteinsert
+ \endgroup}
+
+\permanent\protected\def\betweennoteitself#tag% used ?
+ {\edef\currentnote{#tag}%
+ \doif{\noteparameter\c!paragraph}\v!yes{\noteparameter\c!inbetween}}
+
+\permanent\protected\def\handlenoteitself#tag#id%
+ {\edef\currentnotenumber{#id}%
+ \edef\currentnote{#tag}%
+ \strc_constructions_initialize{#tag}%
+ \strc_notes_synchronize
+ \edef\currentconstructionlistentry{\clf_notelistindex{\currentnote}#id}% index in list cache
+ % as we can have collected notes (e.g. in tables) we need to recover
+ % \currentdescriptionattribute and \currentdescriptionsynchronize
+ %
+ \reinstatecachedconstructionnumberentry\currentconstructionlistentry % we could store the number in the entry (e.g. needed when local notes in table)
+ %
+ \dontcomplain
+ %begingroup
+ \strc_notes_interaction_check_display
+ \strc_notes_set_reference_attribute_text
+ \strc_constructions_stored_start
+ \begstrut
+ \strc_references_flush_destination_nodes
+ \strc_notes_set_destination_attribute_text
+ \strc_notes_inject_text\relax
+ \ifvmode\obeydepth\else\endstrut\fi % \obeydepth is new per 2015-01-10
+ \strc_constructions_stored_stop
+ %endgroup
+ }
+
+\protected\def\strc_notes_inject_text % hm main?
+ {\clf_savedlisttitle{\currentconstructionmain}\currentconstructionlistentry\relax}
+
+\newsignal\d_strc_notes_signal
+
+\newconditional\processingnote
+\newconditional\postponednote
+
+\newtoks\everybeforenoteinsert
+\newtoks\everyinsidenoteinsert
+\newtoks\everyafternoteinsert
+
+\permanent\protected\def\doifelseinnote
+ {\ifconditional\processingnote
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\appendtoks
+ \enforced\let\flushnotes \relax
+ \enforced\let\postponenotes\relax
+ \forgetall
+ \resetallattributes % new, we don't want color bleed into notes
+ \inheritmaintextcolor % but we do want to obey the textcolor
+\to \everybeforenoteinsert
+
+\def\strc_notes_set_penalties
+ {% stored in insert node
+ \floatingpenalty \currentnotepenalty
+ % used when typesetting
+ \interlinepenalty\plushundred % plain value
+ % used when we need to split in columns
+ \ifnum\noteparameter\c!n>\plusone
+ \penalty\zerocount % otherwise no split in columns, maybe just always (tex just adds it to accumulated)
+ \fi}
+
+\appendtoks
+ \strc_notes_set_penalties
+ \forgetall % again
+ \strc_notes_set_bodyfont
+ \redoconvertfont % to undo \undo calls in in headings etc
+ \splittopskip\strutht % not actually needed here
+ \splitmaxdepth\strutdp % not actually needed here
+ %
+ % not:
+ %
+ % \leftmargindistance \noteparameter\c!margindistance
+ % \rightmargindistance\leftmargindistance
+ % \ifnum\noteparameter\c!n=\zerocount % no ifcase new 31-07-99 ; always ?
+ % \doifnotinset{\noteparameter\c!width}{\v!fit,\v!broad}\setnotehsize % ?
+ % \fi
+ %
+ \pickupattributes
+\to \everyinsidenoteinsert
+
+%D Nasty, the might be more:
+
+\appendtoks \strc_itemgroups_push \to \everybeforenoteinsert
+\appendtoks \strc_itemgroups_pop \to \everyafternoteinsert
+
+% maybe but better use [scope=local] here
+%
+% \appendtoks
+% \setfalse\inhibitmargindata
+% \to \everyinsidenoteinsert
+
+\setupnotes
+ [\c!width=\v!auto]
+
+\permanent\protected\def\setnotehsize
+ {\ifinsidemulticolumns
+ \setnoteparameter\c!width{\makeupwidth}%
+ \else
+ \edef\p_width{\noteparameter\c!width}%
+ \ifx\p_width\v!auto
+ % \ifinsidecolumns
+ \setnoteparameter\c!width{\ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi}%
+ % \else
+ % \setnoteparameter\c!width{\makeupwidth}%
+ % \fi
+ \orelse\ifempty\p_width
+ \setnoteparameter\c!width{\hsize}%
+ \fi
+ \fi
+ \hsize\noteparameter\c!width\relax}
+
+\appendtoks
+ % only needed when columns (could be three \set...)
+ \setnotehsize
+ \setsimplecolumnshsize[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\noteparameter\c!width]%
+\to \everyinsidenoteinsert
+
+%D Normally footnotes are saved as inserts that are called upon as soon as the
+%D pagebody is constructed. The footnote insertion routine looks just like the
+%D \PLAIN\ \TEX\ one, except that we check for the end note state.
+
+% testcase for split bottom alignment see (a) below
+%
+% \dorecurse{6}{\input tufte\footnote{\input ward \input tufte \relax}}
+
+\newconditional\c_strc_notes_first_placed
+
+\permanent\protected\def\placenoteinserts
+ {\setfalse\c_strc_notes_first_placed
+ \strc_notes_process\strc_notes_place_inserts}
+
+\def\strc_notes_place_inserts
+ {\strc_notes_set_delayed % \strc_notes_synchronize % we need to know if it's delayed
+ \ifconditional\c_strc_notes_delayed \else
+ \ifdim\ht\currentnoteinsertionnumber>\zeropoint % or a faster delayed test
+ \strc_notes_place_inserts_indeed
+ \settrue\c_strc_notes_first_placed
+ \fi
+ \fi}
+
+\def\strc_notes_place_inserts_indeed
+ {\relax
+ \ifdim\ht\currentnoteinsertionnumber>\zeropoint
+ \endgraf
+ \ifvmode
+ \whitespace
+ \ifconditional\c_strc_notes_first_placed
+ \edef\p_spaceinbetween{\noteparameter\c!spaceinbetween}%
+ \ifempty\p_spaceinbetween\else
+ \blank[\p_spaceinbetween]%
+ \fi
+ \else
+ \edef\p_spacebefore{\noteparameter\c!spacebefore}%
+ \ifempty\p_spacebefore\else
+ \blank[\p_spacebefore]%
+ \fi
+ \fi
+ \noteparameter\c!before
+ \fi
+ \placenoterule
+ \bgroup
+ \strc_notes_set_bodyfont
+ \setbox\scratchbox\hbox
+ {\strc_notes_flush_inserts}%
+ \page_postprocessors_linenumbers_deepbox\scratchbox
+ \setbox\scratchbox\hbox
+ {\setupcurrentnote
+ [\c!location=,
+ \c!width=\v!fit,
+ \c!height=\v!fit,
+ \c!strut=\v!no,
+ \c!offset=\v!overlay]%
+ \inheritednoteframed
+ {\ifzeropt\dp\scratchbox % this hack is needed because \vadjust
+ \hpack{\lower\strutdp\box\scratchbox}% % in margin number placement
+ \else % hides the (always) present depth
+ \box\scratchbox
+ \fi}}%
+ \setbox\scratchbox\hpack{\lower\strutdepth\box\scratchbox}%
+ \dp\scratchbox\strutdepth % so we know that it has the note bodyfont depth
+ \ifvmode
+ \nointerlineskip % else sometimes empty line
+ \fi
+ \box\scratchbox
+ \egroup
+ \endgraf
+ \ifvmode
+ \noteparameter\c!after
+ \fi
+ \fi}
+
+\def\strc_notes_flush_inserts
+ {\ifcase\noteparameter\c!n\relax
+ % should not happen
+ \or
+ \strc_notes_flush_inserts_normal
+ \else
+ \strc_notes_flush_inserts_columns
+ \fi}
+
+\def\strc_notes_flush_inserts_normal
+ {\strc_notes_flush_global
+ \obeydepth} % (a) added , since split footnotes will not align properly
+
+\def\strc_notes_flush_inserts_columns
+ {\begingroup
+ \setnotehsize % probably still not ok for columns
+ \startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\noteparameter\c!width]%
+ \strc_notes_flush_global
+ \stopsimplecolumns
+ \endgroup}
+
+% idea: tag with attr and then just flush them again
+
+\def\strc_notes_flush_global
+ {\begingroup
+ \useinterlinespaceparameter\noteparameter
+ \doifelse{\noteparameter\c!paragraph}\v!yes
+ {\leftorrightvbox % cf mail from ws to list
+ {\starthboxestohbox
+ \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber
+ \stophboxestohbox}}
+ {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}%
+ \endgroup}
+
+%D Supporting end notes is surprisingly easy. Even better, we can combine this
+%D feature with solving the common \TEX\ problem of disappearing inserts when
+%D they're called for in deeply nested boxes. The general case looks like:
+%D
+%D \starttyping
+%D \postponenotes
+%D \.box{whatever we want with footnotes}
+%D \flushnotes
+%D \stoptyping
+%D
+%D This alternative can be used in headings, captions, tables etc. The latter one
+%D sometimes calls for notes local to the table, which can be realized by saying
+%D
+%D \starttyping
+%D \setlocalfootnotes
+%D some kind of table with local footnotes
+%D \placelocalfootnotes
+%D \stoptyping
+%D
+%D Postponing is accomplished by simply redefining the (local) insert operation. A
+%D not too robust method uses the \type{\insert} primitive when possible. This
+%D method fails in situations where it's not entirely clear in what mode \TEX\ is.
+%D Therefore the auto method can is to be overruled when needed.
+
+\newconditional\postponingnotes
+
+% we need a proper state: normal, postponing, flushing
+
+\permanent\protected\def\postponenotes % will be locally overloaded
+ {\ifcase\insertionmigrationmode
+ \ifconditional\postponingnotes\else
+ \global\settrue\postponingnotes
+ \enforced\glet\flushnotes\doflushnotes
+ \clf_postponenotes
+ \fi
+ \fi}
+
+\aliased\let\flushnotes\relax
+
+% also \ifcase\insertionmigrationmode here, needs testing:
+
+\permanent\protected\def\startpostponingnotes % experimental, page-mix
+ {\ifconditional\postponingnotes\else
+ \global\settrue\postponingnotes
+ %\glet\flushnotes\doflushnotes
+ \clf_postponenotes
+ \fi}
+
+\permanent\protected\def\stoppostponingnotes % experimental, page-mix
+ {\doflushnotes}
+
+\permanent\protected\def\doflushnotes
+ {\ifconditional\postponingnotes
+ \begingroup
+ \enforced\let\flushnotes \relax
+ \enforced\let\postponenotes\relax
+ \ifconditional\postponednote
+ \ifhmode
+ % needed for tagging ... otherwise we get some weird node free error
+ \signalcharacter
+ \fi
+ \fi
+ \clf_flushpostponednotes% this also resets the states !
+ \global\setfalse\postponednote
+ \global\setfalse\postponingnotes
+ \enforced\glet\flushnotes\relax
+ \endgroup
+ \fi}
+
+%D \macros
+%D {startlocalfootnotes,placelocalfootnotes}
+%D
+%D The next two macros can be used in for instance tables, as we'll demonstrate
+%D later on.
+%D
+%D \showsetup{startlocalfootnotes}
+%D \showsetup{placelocalfootnotes}
+
+% todo: compatibility mode: when first arg is assignment or missing, then all
+
+\newtoks\everyplacelocalnotes
+
+\appendtoks
+ \enforced\let\flushnotes \relax
+ \enforced\let\postponenotes\relax
+\to \everyplacelocalnotes
+
+\newconditional\inlocalnotes
+
+\mutable\let\localnoteslist\empty
+
+\permanent\tolerant\protected\def\startlocalnotes[#list]% grouping ? (we used to have a second argument ... settings)
+ {\settrue\inlocalnotes
+ \def\localnoteslist{#list}%
+ \processcommacommand[\localnoteslist]\strc_notes_local_start_step}
+
+\permanent\protected\def\stoplocalnotes
+ {\processcommacommand[\localnoteslist]\strc_notes_local_stop_step
+ \setfalse\inlocalnotes}
+
+\let\p_strc_notes_continue\empty
+
+\def\strc_notes_local_start_step#tag%
+ {\p_strc_notes_continue{\noteparameter\c!continue}%
+ \ifx\p_strc_notes_continue\v!yes \else
+ \strc_counters_save{#tag}%
+ \strc_counters_reset{#tag}%
+ \fi
+ \clf_savenote{#tag}{store}}
+
+\def\strc_notes_local_stop_step#tag%
+ {\p_strc_notes_continue{\noteparameter\c!continue}%
+ \ifx\p_strc_notes_continue\v!yes \else
+ \strc_counters_restore{#tag}%
+ \fi
+ \clf_restorenote{#tag}}
+
+\permanent\tolerant\protected\def\placelocalnotes[#tag]#spacer[#settings]%
+ {\doif{\clf_getnotestate{#tag}}{store}{\strc_notes_local_place_indeed{#settings}{#tag}}}
+
+\def\strc_notes_local_place_indeed#settings#tag%
+ {\begingroup
+ \edef\currentnote{#tag}% is already set?
+ \the\everyplacelocalnotes
+ % beware, we cannot trust setting \currentnote here
+ \setupcurrentnote[#settings]% later we set height etc for framed
+ \strc_notes_place_local_alternative
+ \strc_notes_set_properties % restore globals (if needed)
+ \endgroup
+ }% TODO: just restore properties \the\everychecknote} % we need to restore the old state
+
+%D These commands can be used like:
+%D
+%D \startbuffer
+%D \startlocalnotes[footnote]
+%D \placetable
+%D {Some Table}
+%D \placeontopofeachother
+%D {\starttable[|l|r|]
+%D \HL
+%D \VL Nota\footnote{Bene} \VL Bene\footnote{Nota} \VL\SR
+%D \VL Bene\footnote{Nota} \VL Nota\footnote{Bene} \VL\SR
+%D \HL
+%D \stoptable}
+%D {\setupnotation[footnote][alternative={serried},distance=.5em,after=\hskip1em]%
+%D \placelocalnotes[footnote]}
+%D \stoplocalnotes
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Because this table placement macro expect box content, and thanks to the grouping
+%D of the local footnotes, we don't need additional braces.
+%D
+%D \getbuffer
+
+%D \macros
+%D {placefootnotes}
+%D
+%D We still have no decent command for placing footnotes somewhere else than at the
+%D bottom of the page (for which no user action is needed). Footnotes (endnotes) can
+%D be placed by using
+%D
+%D \showsetup{placefootnotes}
+
+\permanent\protected\def\placebottomnotes
+ {\strc_notes_process\strc_notes_place_inserts}
+
+\permanent\tolerant\protected\def\placenotes[#list]#spacer[#settings]%
+ {\processcommalist[#list]{\strc_notes_place_indeed{#settings}}}
+
+\def\strc_notes_place_indeed#settings#tag% settings note
+ {\edef\currentnote{#tag}% grouping ?
+ \doifelse{\clf_getnotestate{#tag}}{store}
+ \strc_notes_local_place_indeed
+ \strc_notes_global_place_indeed
+ {#settings}{#tag}}
+
+\def\strc_notes_global_place_indeed#settings#tag%
+ {\begingroup
+ \setupnote[#tag][#settings]%
+ \strc_notes_place_inserts
+ \endgroup
+ \the\everysetupnote} % to be checked .. synchronize
+
+%D Placement
+
+\installcorenamespace{notealternative}
+
+\permanent\protected\def\installnotealternative#alternative#command%
+ {\setvalue{\??notealternative#alternative}{#command}}
+
+\permanent\protected\def\doifnotescollected#tag%
+ {\clf_doifnotecontent{#tag}}
+
+\def\strc_notes_place_local_alternative % will be a setup (wrapper)
+ {\doifnotescollected\currentnote
+ {\endgraf
+ \ifvmode
+ \whitespace
+ \noteparameter\c!before
+ \fi
+ \begingroup
+ \strc_notes_set_bodyfont
+ \csname\??notealternative\noteparameter\c!alternative\endcsname
+ \endgroup
+ \ifvmode
+ \noteparameter\c!after
+ \fi}}
+
+%D A stupid alternative is also provided:
+%D
+%D \starttyping
+%D \setupfootnotes[location=text,alternative=none]
+%D \stoptyping
+
+% setups ?
+
+\permanent\def\flushlocalnotes#tag{\clf_flushnotes{#tag}{store}{\noteparameter\c!criterium}}
+
+\installnotealternative \v!none
+ {\flushlocalnotes\currentnote}
+
+\installnotealternative \empty
+ {\flushlocalnotes\currentnote}
+
+\installnotealternative \v!grid % test if n > 0
+ {\begingroup
+ \setupcurrentnote[\c!location=]%
+ \snaptogrid\hbox
+ {\inheritednoteframed
+ {\flushlocalnotes\currentnote}}%
+ \endgroup}
+
+\installnotealternative \v!fixed % test if n > 0
+ {\begingroup
+ \setupcurrentnote[\c!location=]%
+ \inheritednoteframed
+ {\flushlocalnotes\currentnote}%
+ \endgroup}
+
+\installnotealternative \v!columns % redundant
+ {\begingroup
+ \setupcurrentnote[\c!location=]%
+ \inheritednoteframed
+ {\doifelsedimension{\noteparameter\c!width}\donothing{\setexpandednoteparameter\c!width{\the\hsize}}%
+ \startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\noteparameter\c!width]%
+ \flushlocalnotes\currentnote
+ \stopsimplecolumns}%
+ \endgroup}
+
+% 0:page 1:firstcolumn 2:lastcolumn
+
+\newconstant\c_strc_notes_page_location
+
+\protected\def\strc_notes_check_locations
+ {\edef\p_strc_notes_location{\rootnoteparameter\c!location}%
+ \c_strc_notes_page_location
+ \ifx\p_strc_notes_location\v!firstcolumn\plusone \else
+ \ifx\p_strc_notes_location\v!lastcolumn \plustwo \else
+ \zerocount\fi\fi}
+
+\appendtoks
+ \strc_notes_check_locations
+\to \everysynchronizenote
+
+% still semi public (but will change)
+
+\newif\ifnotespresent
+
+\permanent\protected\def\checknotepresence
+ {\notespresentfalse
+ \strc_notes_process\strc_notes_check_presence}
+
+\def\strc_notes_check_presence
+ {\ifdim\ht\currentnoteinsertionnumber>\zeropoint
+ \notespresenttrue
+ \fi}
+
+%D \macros
+%D {fakenotes}
+
+ % used in page-mul
+
+ % \ifdefined\currentnofcolumns\else \def\currentnofcolumns{\nofcolumns} \fi
+
+ \permanent\protected\def\fakenotes
+ {\ifhmode\endgraf\fi\ifvmode
+ \calculatetotalclevernoteheight
+ \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi
+ \fi}
+
+ \permanent\protected\def\fakepagenotes
+ {\ifhmode\endgraf\fi\ifvmode
+ \calculatetotalpagenoteheight
+ \ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi
+ \fi}
+
+ % used in page-not but not yet ok
+
+ \newdimen\totalnoteheight
+
+ \permanent\protected\def\additionaltotalnoteheight#insert% temp hacks anyway
+ {\dimexpr
+ \ifdim\ht#insert>\zeropoint
+ \ifcase\count#insert %
+ \zeropoint
+ \else % todo: divide by count
+ \ht#insert+\skip#insert% hm, no stretch but a dimen anyway
+ \fi
+ \else
+ \zeropoint
+ \fi
+ \relax}
+
+ \permanent\def\docalculatetotalnoteheight
+ {\ifcase\c_strc_notes_page_location % tricky here ! ! ! to be sorted out ! ! !
+ \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}%
+ \fi}
+
+ \permanent\def\docalculatetotalclevernoteheight
+ {\ifcase\c_strc_notes_page_location \else % tricky here ! ! ! to be sorted out ! ! !
+ \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}%
+ \fi}
+
+ \permanent\def\docalculatetotalpagenoteheight
+ {\advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}}
+
+ \permanent\def\calculatetotalnoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalnoteheight}
+ \permanent\def\calculatetotalclevernoteheight{\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalclevernoteheight}
+ \permanent\def\calculatetotalpagenoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalpagenoteheight}
+
+%D Now how can this mechanism be hooked into \CONTEXT\ without explictly postponing
+%D footnotes? The solution turned out to be rather simple:
+%D
+%D \starttyping
+%D \everypar {...\flushnotes...}
+%D \neverypar {...\postponenotes}
+%D \stoptyping
+%D
+%D We can use \type {\neverypar} because in most commands sensitive to footnote
+%D gobbling we disable \type {\everypar} in favor for \type {\neverypar}. In fact,
+%D this footnote implementation is the first to use this scheme.
+
+%D This is a nasty and new secondary footnote flusher. It can be hooked into \type
+%D {\everypar} like:
+%D
+%D \starttyping
+%D \appendtoks \synchronizenotes \to \everypar
+%D \stoptyping
+
+% \let\synchronizenotes\relax
+
+%D When typesetting footnotes, we have to return to the footnote specific bodyfont
+%D size, which is in most cases derived from the global document bodyfont size. In
+%D the previous macros we already used a footnote specific font setting macro.
+
+\def\strc_notes_set_bodyfont
+ {\let\strc_notes_set_bodyfont\relax
+ \restoreglobalbodyfont
+ \usebodyfontparameter\noteparameter
+ \usealignparameter\noteparameter}
+
+%D The footnote mechanism defaults to a traditional one column way of showing them.
+%D By default we precede them by a small line.
+
+% end notes in the margin:
+%
+% \setuptexttexts
+% [margin]
+% [] [{\directsetup{notabene}}]
+%
+% \startsetups notabene
+% \vbox to \textheight \bgroup
+% \setupalign[tolerant]
+% \topskipcorrection
+% \placenotes[endnote][before=,after=]
+% \vfilll
+% \egroup
+% \stopsetups
+
+\definenote [\v!footnote]
+\definenote [\v!endnote ] [\c!location=\v!none] % else no break
+
+%D Compatibility macros:
+
+\permanent\protected\def\setupfootnotedefinition{\setupnotation [\v!footnote]}
+\permanent\protected\def\setupfootnotes {\setupnote [\v!footnote]}
+\permanent \def\footnotetext {\setnotetext [\v!footnote]}
+\permanent\protected\def\placefootnotes {\strc_notes_place_footnotes [\v!footnote]}
+\permanent\protected\def\placelocalfootnotes {\strc_notes_place_local_footnotes[\v!footnote]}
+\permanent\protected\def\startlocalfootnotes {\startlocalnotes [\v!footnote]} % alleen footnote
+\permanent\protected\def\stoplocalfootnotes {\stoplocalnotes }
+
+\tolerant\def\strc_notes_place_footnotes[#list]#spacer[#settings]%
+ {\ifarguments\or
+ \placenotes[#list][\c!height=\textheight]%
+ \or
+ \placenotes[#list][#settings,\c!height=\textheight]%
+ \fi}
+
+\tolerant\def\strc_notes_place_local_footnotes[#list]#spacer[#settings]%
+ {\ifarguments\or
+ \placelocalnotes[#list][\c!height=\textheight]%
+ \or
+ \placelocalnotes[#list][#settings,\c!height=\textheight]%
+ \fi}
+
+%D Goodies:
+%D
+%D \starttyping
+%D \dorecurse {100} {
+%D test \footnote{\doifnoteonsamepageelse[footnote]{ibidem}{aaa}}
+%D }
+%D \stoptyping
+
+\permanent\def\doifelsenoteonsamepage#tag{\clf_doifnoteonsamepageasprevious{#tag}}
+
+\aliased\let\doifnoteonsamepageelse\doifelsenoteonsamepage
+
+%D New trickery:
+
+%D \macros
+%D {note}
+%D
+%D Refering to a note is accomplished by the rather short command:
+%D
+%D \showsetup{note}
+%D
+%D This command is implemented rather straightforward as:
+
+\installcorenamespace{notesymbol}
+
+\mutable\let\lastnotesymbol\empty % todo: per class
+
+\permanent\tolerant\protected\def\notesymbol[#tag]#spacer[#reference]%
+ {\ifnotesenabled
+ \dontleavehmode
+ \begingroup
+ \edef\currentnote{#tag}%
+ \usenotestyleandcolor\c!textstyle\c!textcolor
+ \iftok{#reference}\emptytoks
+ \noteparameter\c!textcommand\lastnotesymbol % check if command double
+ \else
+ \unskip
+ \noteparameter\c!textcommand{\in[#reference]}% command here?
+ \fi
+ \endgroup
+ \fi}
+
+\permanent\tolerant\protected\def\note[#tag]#spacer[#reference]%
+ {\iftok{#reference}\emptytoks
+ \notesymbol[\v!footnote][#tag]%
+ \else
+ \notesymbol[#tag][#reference]%
+ \fi}
+
+% will be redone if needed
+%
+% \def\ownnotesymbol#1% #1 gets number passed
+% {\executeifdefined{\??notesymbol\currentnote}\empty}
+%
+% \protected\def\setnotesymbol[#1]#2#3%
+% {\prewordbreak % prevent lookback
+% \setgvalue{\??notesymbol#1}{#3}
+% \strc_notes_inject_symbol}
+%
+% \protected\def\ownnote[#1]#2#3#4%
+% {\setnotesymbol[#1]{#2}{#3}%
+% \setnotetext [#1]{#4}}
+%
+% \defineconversion
+% [ownnote]
+% [\ownnotesymbol]
+
+% tricky:
+%
+% \enabletrackers[nodes.areas]
+% \enabletrackers[nodes.references]
+% \enabletrackers[nodes.destinations]
+%
+% \setupnotes[interaction=all,rule=no]
+% \setupinteraction[state=start,focus=standard]
+%
+% \starttext
+% \goto{\input tufte\relax}[page(2)] \par
+% \ruledhbox{\gotobox{\vtop{\input tufte\relax}}[page(2)]} \par
+% \ruledhbox{\gotobox{\vbox{\input tufte\relax}}[page(2)]} \par
+% % \completecontent
+% % \chapter{Chapter}
+% % \dorecurse{5}{\input knuth}
+% a\footnote{\input tufte\par\input ward\relax}
+% \stoptext
+
+%D Bonus:
+
+\appendtoks
+ \setsystemmode\currentnote
+\to \everysynchronizenote
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-num.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-num.mkxl
new file mode 100644
index 00000000000..02674bce29c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-num.mkxl
@@ -0,0 +1,691 @@
+%D \module
+%D [ file=strc-num,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Basic Numbering,
+%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 Structure Macros / Basic Numbering}
+
+\registerctxluafile{strc-num}{}
+
+\unprotect
+
+\startcontextdefinitioncode
+
+% work in progress
+% to be checked: can we use the command handler code here?
+% all settings will move to lua
+
+\installcorenamespace{counter}
+
+\installcommandhandler \??counter {counter} \??counter
+
+\aliased\let\setupcounters \setupcounter
+\aliased\let\setupstructurecounting\setupcounter % will disappear
+
+\setupcounter
+ [\c!way=\v!by\v!chapter,
+% \c!blockway=,
+% \c!prefixstarter=,
+% \c!prefixstopper=,
+ \c!prefixconnector=.,
+ \c!prefixsegments=\autostructureprefixsegments\rootcounterparameter,
+ \c!start=\zerocount,
+ \c!prefix=\v!yes,
+ \c!state=\v!start]
+
+\permanent\def\autostructureprefixsegments#1% todo: \c!prefixsegments=\v!auto
+ {2:\thenamedheadlevel{\clf_way{#1\c!way}}}
+
+\appendtoks
+ \resetcounterparameter\s!counter
+\to \everypresetcounter
+
+\appendtoks
+ \ifempty\currentcounterparent
+ \edef\p_start{\counterparameter\c!start}%
+ \clf_definecounter
+ name {\currentcounter}%
+ start \ifempty\p_start\zerocount\else\numexpr\p_start\relax\fi
+ counter {\counterparameter\s!counter}%
+ method {\counterparameter\c!method}%
+ \relax
+ \letcounterparameter\s!name\currentcounter
+ \else
+ % \letcounterparameter\s!name\currentcounterparent % we need a chained clone
+ \setexpandedcounterparameter\s!name{\namedcounterparameter\currentcounterparent\s!name}%
+ \fi
+ \strc_counters_check_setup
+\to \everydefinecounter
+
+\appendtoks
+ \ifempty\currentcounter \else
+ \edef\p_number{\counterparameter\c!number}%
+ \ifempty\p_number \else
+ \clf_setcounter{\counterparameter\s!name}\numexpr\p_number\relax
+ \letcounterparameter\c!number\empty
+ \fi
+ \edef\p_start{\counterparameter\c!start}%
+ \setexpandedcounterparameter\c!start{\ifempty\p_start0\else\number\p_start\fi}%
+ \strc_counters_check_setup
+ \fi
+\to \everysetupcounter
+
+% % % %
+
+\permanent\def\strc_counters_way #1{\clf_way{\namedcounterparameter{#1}\c!way}}
+\permanent\def\thenamedcounterlevel#1{\xthenamedheadlevel{\clf_way{\namedcounterparameter{#1}\c!way}}}
+
+\mutable\let\currentcounterlevel\!!zerocount % yes or no public ?
+
+\protected\def\strc_counters_check_setup
+ {\edef\p_name{\directcounterparameter\s!name}%
+ \ifx\currentcounter\p_name
+ \edef\currentcounterlevel{\thenamedcounterlevel\currentcounter}%
+ \edef\p_start{\counterparameter\c!start}%
+ \clf_checkcountersetup
+ {\currentcounter}%
+ \numexpr\currentcounterlevel\relax
+ \numexpr\ifempty\p_start\zerocount\else\p_start\fi\relax % bug in scanner
+ {\counterparameter\c!state}%
+ \fi}
+
+\permanent\protected\def\doifelsecounter #1{\clf_doifelsecounter{\namedcounterparameter{#1}\s!name}}
+\permanent\protected\def\doifcounter #1{\clf_doifcounter {\namedcounterparameter{#1}\s!name}}
+\permanent\protected\def\doifnotcounter #1{\clf_doifnotcounter {\namedcounterparameter{#1}\s!name}}
+
+\aliased\let\doifcounterelse\doifelsecounter
+
+\permanent\tolerant\protected\def\setcounter[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or
+ \clf_setcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax
+ \else
+ \clf_setsubcounter{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\numexpr#3\relax
+ \fi}
+
+\permanent\tolerant\protected\def\setcounterown[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or
+ \clf_setowncounter {\namedcounterparameter{#1}\s!name}{#2}%
+ \else
+ \clf_setownsubcounter{\namedcounterparameter{#1}\s!name}\numexpr#2\relax{#3}%
+ \fi}
+
+\permanent\tolerant\protected\def\restartcounter[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or
+ \clf_restartcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax
+ \else
+ \clf_restartsubcounter{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\numexpr#3\relax
+ \fi}
+
+\permanent\tolerant\protected\def\resetcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_resetcounter {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_resetsubcounter{\namedcounterparameter{#1}\s!name}\numexpr#2\relax
+ \fi}
+
+\permanent\tolerant\protected\def\incrementcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \strc_counters_increment_sub{#1}\plusone
+ \else
+ \strc_counters_increment_sub{#1}{#2}%
+ \fi}
+
+\permanent\tolerant\protected\def\decrementcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_decrementcounter {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_decrementsubcounter{\namedcounterparameter{#1}\s!name}\numexpr#2\relax
+ \fi}
+
+\permanent\tolerant\protected\def\rawcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_countervalue {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_subcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\or
+ \fi}
+
+\permanent\tolerant\protected\def\lastcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_lastcountervalue {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_lastsubcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\or
+ \fi}
+
+\permanent\tolerant\protected\def\firstcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_firstcountervalue {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_firstsubcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\or
+ \fi}
+
+\permanent\tolerant\protected\def\prevcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_previouscountervalue {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_previoussubcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\or
+ \fi}
+
+\permanent\tolerant\protected\def\nextcounter[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_nextcountervalue {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_nextsubcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\or
+ \fi}
+
+\permanent\tolerant\protected\def\countersubs[#1]#*[#2]%
+ {\ifarguments\or
+ \clf_subcountervalues {\namedcounterparameter{#1}\s!name}%
+ \else
+ \clf_subsubcountervalues{\namedcounterparameter{#1}\s!name}\numexpr#2\relax\or
+ \fi}
+
+\permanent\tolerant\protected\def\savecounter[#1]%
+ {\ifarguments\or
+ \clf_savecounter{\namedcounterparameter{#1}\s!name}%
+ \fi}
+
+\permanent\tolerant\protected\def\restorecounter[#1]%
+ {\ifarguments\or
+ \clf_restorecounter{\namedcounterparameter{#1}\s!name}%
+ \fi}
+
+\protected\def\strc_counters_set #1#2{\clf_setcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+\protected\def\strc_counters_setown #1#2{\clf_setowncounter {\namedcounterparameter{#1}\s!name}{#2}}
+\protected\def\strc_counters_restart #1#2{\clf_restartcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+\protected\def\strc_counters_reset #1{\clf_resetcounter {\namedcounterparameter{#1}\s!name}}
+\protected\def\strc_counters_decrement #1{\clf_decrementcounter {\namedcounterparameter{#1}\s!name}}
+
+ \def\strc_counters_raw #1{\clf_countervalue {\namedcounterparameter{#1}\s!name}}
+ \def\strc_counters_last #1{\clf_lastcountervalue {\namedcounterparameter{#1}\s!name}}
+ \def\strc_counters_first #1{\clf_firstcountervalue {\namedcounterparameter{#1}\s!name}}
+ \def\strc_counters_next #1{\clf_nextcountervalue {\namedcounterparameter{#1}\s!name}}
+ \def\strc_counters_prev #1{\clf_previouscountervalue {\namedcounterparameter{#1}\s!name}}
+ \def\strc_counters_subs #1{\clf_subcountervalues {\namedcounterparameter{#1}\s!name}}
+
+\protected\def\strc_counters_set_sub #1#2#3{\clf_setsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax\numexpr#3\relax}
+\protected\def\strc_counters_setown_sub #1#2#3{\clf_setownsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax{#3}}
+\protected\def\strc_counters_restart_sub #1#2#3{\clf_restartsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax\numexpr#3\relax}
+\protected\def\strc_counters_reset_sub #1#2{\clf_resetsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+\protected\def\strc_counters_decrement_sub #1#2{\clf_decrementsubcounter {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+
+ \def\strc_counters_raw_sub #1#2{\clf_subcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax} % maybe raw
+ \def\strc_counters_last_sub #1#2{\clf_lastsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+ \def\strc_counters_first_sub #1#2{\clf_firstsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+ \def\strc_counters_next_sub #1#2{\clf_nextsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+ \def\strc_counters_prev_sub #1#2{\clf_previoussubcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+ \def\strc_counters_subs_sub #1#2{\clf_subsubcountervalues {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+
+\protected\def\strc_counters_save #1{\clf_savecounter {\namedcounterparameter{#1}\s!name}}
+\protected\def\strc_counters_restore #1{\clf_restorecounter {\namedcounterparameter{#1}\s!name}}
+
+\protected\def\strc_counters_incremented #1{\clf_incrementedcounter {\namedcounterparameter{#1}\s!name}}
+\protected\def\strc_counters_decremented #1{\clf_decrementedcounter {\namedcounterparameter{#1}\s!name}}
+
+\permanent\protected\def\showcounter [#1]{\clf_showcounter {\namedcounterparameter{#1}\s!name}}
+\permanent\protected\def\incrementedcounter[#1]{\clf_incrementedcounter{\namedcounterparameter{#1}\s!name}} % no \dosingleargument
+\permanent\protected\def\decrementedcounter[#1]{\clf_decrementedcounter{\namedcounterparameter{#1}\s!name}} % no \dosingleargument
+
+% public variants ... beware, for old cases, from now on the value variants are the
+% ones that are expandable
+
+\permanent\def\rawcountervalue [#1]{\clf_countervalue {\namedcounterparameter{#1}\s!name}}
+\permanent\def\lastcountervalue [#1]{\clf_lastcountervalue {\namedcounterparameter{#1}\s!name}}
+\permanent\def\firstcountervalue[#1]{\clf_firstcountervalue {\namedcounterparameter{#1}\s!name}}
+\permanent\def\nextcountervalue [#1]{\clf_nextcountervalue {\namedcounterparameter{#1}\s!name}}
+\permanent\def\prevcountervalue [#1]{\clf_previouscountervalue{\namedcounterparameter{#1}\s!name}}
+
+\permanent\def\rawsubcountervalue [#1]#*[#2]{\clf_subcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+\permanent\def\lastsubcountervalue [#1]#*[#2]{\clf_lastsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+\permanent\def\firstsubcountervalue[#1]#*[#2]{\clf_firstsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+\permanent\def\nextsubcountervalue [#1]#*[#2]{\clf_nextsubcountervalue {\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+\permanent\def\prevsubcountervalue [#1]#*[#2]{\clf_previoussubcountervalue{\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+
+% The bypage check needs a multipass reference and therefore we only check for it when we increment
+% and know that some content will be placed. We could also check for spreads.
+
+\protected\def\strc_counters_increment_sub#1#2%
+ {% this will be combined into one lua call
+ \edef\m_strc_counters_way{\strc_counters_way{#1}}%
+ \ifx\m_strc_counters_way\v!page
+ \checkpagechange{#1}%
+ \ifpagechanged
+ \strc_counters_reset{#1}%
+ \fi
+ \fi
+ \clf_incrementsubcounter{\namedcounterparameter{#1}\s!name}\numexpr#2\relax}
+
+\protected\def\strc_counters_increment#1%
+ {\strc_counters_increment_sub{#1}\plusone}
+
+% so far for the hack
+
+\permanent\tolerant\protected\def\convertedcounter[#1]#*[#2]%
+ {\begingroup
+ \edef\currentcounter{#1}%
+ \ifparameter#2\or\setupcurrentcounter[#2]\fi
+ \clf_prefixedconverted
+ {\counterparameter\s!name}
+ {
+ prefix {\counterparameter\c!prefix}
+ separatorset {\counterparameter\c!prefixseparatorset}
+ conversion {\counterparameter\c!prefixconversion}
+ conversionset {\counterparameter\c!prefixconversionset}
+ starter {\counterparameter\c!prefixstarter}
+ stopper {\counterparameter\c!prefixstopper}
+ set {\counterparameter\c!prefixset}
+ segments {\counterparameter\c!prefixsegments}
+ connector {\counterparameter\c!prefixconnector}
+ }
+ {
+ order {\counterparameter\c!numberorder}
+ separatorset {\counterparameter\c!numberseparatorset}
+ conversion {\counterparameter\c!numberconversion}
+ conversionset {\counterparameter\c!numberconversionset}
+ starter {\counterparameter\c!numberstarter}
+ stopper {\counterparameter\c!numberstopper}
+ segments {\counterparameter\c!numbersegments}
+ type {\counterparameter\c!type}
+ criterium {\counterparameter\c!criterium}
+ }
+ \relax
+ \endgroup}
+
+\permanent\def\directconvertedcounter#1#2% name, type
+ {\clf_prefixedconverted
+ {\namedcounterparameter{#1}\s!name}
+ {
+ prefix {\namedcounterparameter{#1}\c!prefix}
+ separatorset {\namedcounterparameter{#1}\c!prefixseparatorset}
+ conversion {\namedcounterparameter{#1}\c!prefixconversion}
+ conversionset {\namedcounterparameter{#1}\c!prefixconversionset}
+ % starter {\namedcounterparameter{#1}\c!prefixstarter}
+ % stopper {\namedcounterparameter{#1}\c!prefixstopper}
+ set {\namedcounterparameter{#1}\c!prefixset}
+ segments {\namedcounterparameter{#1}\c!prefixsegments}
+ connector {\namedcounterparameter{#1}\c!prefixconnector}
+ }
+ {
+ order {\namedcounterparameter{#1}\c!numberorder}
+ separatorset {\namedcounterparameter{#1}\c!numberseparatorset}
+ conversion {\namedcounterparameter{#1}\c!numberconversion}
+ conversionset {\namedcounterparameter{#1}\c!numberconversionset}
+ starter {\namedcounterparameter{#1}\c!numberstarter}
+ stopper {\namedcounterparameter{#1}\c!numberstopper}
+ segments {\namedcounterparameter{#1}\c!numbersegments}
+ type {#2}
+ }
+ \relax}
+
+\permanent\tolerant\protected\def\convertedsubcounter[#1]#*[#2]#*[#3]% #2 can be n or n:m
+ {\ifarguments\or
+ \convertedcounter[#1][]%
+ \else
+ \convertedcounter[#1][\c!numbersegments=#2,#3]%
+ \fi}
+
+\permanent\protected\def\doifdefinedcounter {\doifcommandhandler \??counter}
+\permanent\protected\def\doifundefinedcounter {\doifnotcommandhandler \??counter}
+\permanent\protected\def\doifelsedefinedcounter{\doifelsecommandhandler\??counter}
+
+\aliased\let\doifdefinedcounterelse\doifelsedefinedcounter
+
+%D What follows is a compatibility layer. Do we need this?
+
+\aliased\let \numberparameter \namedcounterparameter % {name}\c!key
+
+\aliased\let \definenumber \definecounter % [name]
+\aliased\let \setupnumber \setupcounter % [name][setups]
+
+\aliased\let \setnumber \setcounter % [name]{value}
+\aliased\let \resetnumber \resetcounter % [name]
+\aliased\let \savenumber \savecounter % [name]
+\aliased\let \restorenumber \restorecounter % [name]
+\aliased\let \incrementnumber \incrementcounter % [name]
+\aliased\let \decrementnumber \decrementcounter % [name]
+\aliased\let \rawnumber \rawcounter % [name]
+\aliased\let \getnumber \convertedcounter % [name]
+\aliased\let \convertednumber \convertedcounter % [name]
+
+\aliased\let \doifdefinednumber \doifdefinedcounter % {number}{true}
+\aliased\let \doifelsedefinednumber \doifelsedefinedcounter % {number}{true}{false}
+\aliased\let \doifdefinednumberelse \doifelsedefinedcounter % {number}{true}{false}
+
+\aliased\let \setupnumbering \setupcounter
+
+%D Helpers:
+
+% call:
+%
+% \strc_counters_register_component
+% \currentfloat
+% \getfloatparameters \floatparameter \detokenizedfloatparameter
+% \hascaption \hastitle \hasnumber
+% [settings][userdata]
+%
+% sets:
+%
+% \m_strc_counters_last_registered_index
+% \m_strc_counters_last_registered_attribute
+% \m_strc_counters_last_registered_synchronize
+
+% currentstructurecomponent => \strc_current_ or just \m_strc_
+
+\mutable\let\currentname \empty
+\mutable\let\currentcounter\empty
+
+\protected\def\strc_counters_register_component#1#2#3#4#5#6#7[#8][#9]% maybe also nolist
+ {\begingroup
+ %
+ #2[\s!haslevel=1,#8]%
+ \edef\p_haslevel {#3\s!haslevel}%
+ \edef\p_hascaption{#3\s!hascaption}%
+ \edef\p_hastitle {#3\s!hastitle}%
+ \edef\p_hasnumber {#3\s!hasnumber}%
+ %
+ \edef\p_prefixsegments{#3\c!prefixsegments}%
+ \ifx\p_prefixsegments\v!auto
+ \edef\p_prefixsegments{\autostructureprefixsegments#3}%
+ \fi
+ %
+ \edef\currentname{#3\s!name}%
+ \ifempty\currentname
+ \edef\currentname{#1}%
+ \fi
+ \edef\currentcounter{#3\s!counter}%
+ \ifempty\currentcounter
+ \let\currentcounter\currentname
+ \fi
+ %
+ \ifx\p_hascaption\v!yes
+ \strc_counters_register_component_list{#1}{#3}{#4}{#9}%
+ \orelse\ifempty\currentstructurecomponentreference
+ \strc_counters_register_component_none
+ \else
+ \strc_counters_register_component_page{#3}%
+ \fi
+ \endgroup}
+
+\def\strc_counters_register_component_none
+ {\glet\m_strc_counters_last_registered_index \relax
+ \glet\m_strc_counters_last_registered_attribute \attributeunsetvalue
+ \glet\m_strc_counters_last_registered_synchronize\relax}
+
+\def\strc_counters_register_component_check_prefix
+ {\ifempty\currentstructurecomponentreferenceprefix
+ \let\currentstructurecomponentreferenceprefix\currentstructurereferenceprefix
+ \fi
+ \ifempty\currentstructurecomponentreferenceprefix
+ \let\currentstructurecomponentreferenceprefix\referenceprefix
+ \fi
+ \ifdefined\currentstructurecomponentreferenceprefix\else
+ \let\currentstructurecomponentreferenceprefix\empty
+ \fi}
+
+\def\strc_counters_register_component_page#1%
+ {\xdef\currentstructurecomponentreference {#1\c!reference}%
+ \xdef\currentstructurecomponentreferenceprefix{#1\c!referenceprefix}%
+ \strc_counters_register_component_check_prefix
+ \setnextinternalreference
+ \clf_setdestinationattribute
+ {%
+ references {%
+ internal \locationcount
+ % block {\currentsectionblock}% move to lua
+ view {\interactionparameter\c!focus}%
+ prefix {\currentstructurecomponentreferenceprefix}%
+ reference {\currentstructurecomponentreference}%
+ }%
+ metadata {%
+ kind {\s!page}%
+ }%
+ }%
+ \relax
+ \xdef\m_strc_counters_last_registered_attribute {\the\lastdestinationattribute}%
+ \glet\m_strc_counters_last_registered_index \relax
+ \glet\m_strc_counters_last_registered_synchronize\relax}
+
+\def\strc_counters_register_component_list#1#2#3#4%
+ {\xdef\currentstructurecomponentname {#2\s!name}%
+ \xdef\currentstructurecomponentlevel {#2\c!level}%
+ \edef\currentstructurecomponentexpansion {#2\c!expansion}%
+ \xdef\currentstructurecomponentxmlsetup {#2\c!xmlsetup}%
+ \xdef\currentstructurecomponentcatcodes {#2\s!catcodes}%
+ \xdef\currentstructurecomponentlabel {#2\c!label}%
+ \xdef\currentstructurecomponentreference {#2\c!reference}%
+ \xdef\currentstructurecomponentreferenceprefix{#2\c!referenceprefix}%
+ \strc_counters_register_component_check_prefix
+ \ifx\currentstructurecomponentexpansion\s!xml
+ \xmlstartraw
+ \xdef\currentstructurecomponenttitle {#2\c!title}%
+ \xdef\currentstructurecomponentbookmark{#2\c!bookmark}%
+ \xdef\currentstructurecomponentmarking {#2\c!marking}%
+ \xdef\currentstructurecomponentlist {#2\c!list}%
+ \xmlstopraw
+ \ifempty\currentstructurecomponentlist
+ \glet\currentstructurecomponentlist\currentstructurecomponenttitle
+ \fi
+ \glet\currentstructurecomponentcoding\s!xml
+ \else
+ \ifx\currentstructurecomponentexpansion\v!yes
+ \xdef\currentstructurecomponenttitle {#2\c!title}%
+ \xdef\currentstructurecomponentbookmark{#2\c!bookmark}%
+ \xdef\currentstructurecomponentmarking {#2\c!marking}%
+ \xdef\currentstructurecomponentlist {#2\c!list}%
+ \else
+ \xdef\currentstructurecomponenttitle {#3\c!title}%
+ \xdef\currentstructurecomponentbookmark{#3\c!bookmark}%
+ \xdef\currentstructurecomponentmarking {#3\c!marking}%
+ \xdef\currentstructurecomponentlist {#3\c!list}%
+ \iflocation \ifempty\currentstructurecomponentbookmark
+ \begingroup
+ \simplifycommands
+ \xdef\currentstructurecomponentbookmark{\detokenize\expandafter{\normalexpanded{#2\c!title}}}%
+ \endgroup
+ \fi \fi
+ \fi
+ \ifempty\currentstructurecomponentlist
+ \glet\currentstructurecomponentlist\currentstructurecomponenttitle
+ \fi
+ \glet\currentstructurecomponentcoding\s!tex
+ \fi
+ %
+ \setnextinternalreference
+ \scratchcounter\clf_addtolist %{
+ metadata {
+ kind {#1}
+ name {\currentname}
+ % level structures.sections.currentlevel()
+ catcodes \ifempty\currentstructurecomponentcatcodes\catcodetable\else\csname\currentstructurecomponentcatcodes\endcsname\fi
+ coding {\currentstructurecomponentcoding}
+ \ifx\currentstructurecomponentcoding\s!xml
+ xmlroot {\xmldocument}
+ \fi
+ \ifempty\currentstructurecomponentxmlsetup \else
+ xmlsetup {\currentstructurexmlsetup}
+ \fi
+ }
+ references {
+ internal \locationcount
+ % block {\currentsectionblock}
+ reference {\currentstructurecomponentreference}
+ prefix {\currentstructurecomponentreferenceprefix}
+ % section structures.sections.currentid()
+ view {\interactionparameter\c!focus}%
+ }
+ titledata {
+ label {\detokenize\expandafter{\currentstructurecomponentlabel}}
+ title {\detokenize\expandafter{\currentstructurecomponenttitle}}
+ \ifx\currentstructurecomponentbookmark\currentstructurecomponenttitle \else
+ bookmark {\detokenize\expandafter{\currentstructurecomponentbookmark}}
+ \fi
+ \ifx\currentstructurecomponentmarking\currentstructurecomponenttitle \else
+ marking {\detokenize\expandafter{\currentstructurecomponentmarking}}
+ \fi
+ \ifx\currentstructurecomponentlist\currentstructurecomponenttitle \else
+ list {\detokenize\expandafter{\currentstructurecomponentlist}}
+ \fi
+ }
+ \ifx\p_hasnumber\v!yes
+ prefixdata {
+ prefix {#2\c!prefix}
+ separatorset {#2\c!prefixseparatorset}
+ conversion {#2\c!prefixconversion}
+ conversionset {#2\c!prefixconversionset}
+ set {#2\c!prefixset}
+ % segments {#2\c!prefixsegments}
+ segments {\p_prefixsegments}
+ connector {#2\c!prefixconnector}
+ }
+ numberdata { % more helpers here, like compact elsewhere
+ numbers {\currentcounter}
+ group {#2\c!group}
+ groupsuffix {#2\c!groupsuffix}
+ counter {\currentcounter}
+ separatorset {#2\c!numberseparatorset}
+ conversion {#2\c!numberconversion}
+ conversionset {#2\c!numberconversionset}
+ starter {#2\c!numberstarter}
+ stopper {#2\c!numberstopper}
+ segments {#2\c!numbersegments}
+ }
+ \fi
+ userdata {\detokenize{#4}}
+ %}
+ \relax
+ \xdef\m_strc_counters_last_registered_index{\the\scratchcounter}%
+ \setstructurecomponentsynchronization\m_strc_counters_last_registered_index
+ \glet\m_strc_counters_last_registered_attribute \currentstructurecomponentattribute
+ \glet\m_strc_counters_last_registered_synchronize\currentstructurecomponentsynchronize}
+
+\let\m_strc_counters_last_registered_index \relax
+\let\m_strc_counters_last_registered_attribute \relax
+\let\m_strc_counters_last_registered_synchronize\relax
+
+% This can be improved as we don't need to pas all these variables
+% each time (we can set them up once).
+
+\protected\def\strc_counter_preset_using_parameter#1#2% \setupcommand \someparameter
+ {#1%
+ [\c!way =#2\c!way,
+ \c!prefix =#2\c!prefix,
+ \c!prefixseparatorset =#2\c!prefixseparatorset,
+ \c!prefixconversion =#2\c!prefixconversion,
+ \c!prefixconversionset=#2\c!prefixconversionset,
+ \c!prefixstarter =#2\c!prefixstarter,
+ \c!prefixstopper =#2\c!prefixstopper,
+ \c!prefixsegments =#2\c!prefixsegments,
+ \c!prefixset =#2\c!prefixset,
+ \c!prefixconnector =#2\c!prefixconnector,
+ \c!numberseparatorset =#2\c!numberseparatorset,
+ \c!numberconversion =#2\c!numberconversion,
+ \c!numberconversionset=#2\c!numberconversionset,
+ \c!numberstarter =#2\c!numberstarter,
+ \c!numberstopper =#2\c!numberstopper,
+ \c!numbersegments =#2\c!numbersegments]}
+
+\protected\def\strc_counter_setup_using_parameter#1#2% name \someparameter
+ {\edef\currentcounter{#1}%
+ %
+ \setcounterparameter \c!start{#2\c!start}%
+ \setcounterparameter \c!state{#2\c!state}% % beware, "" == start
+ \setcounterparameter \c!way{#2\c!way}%
+ %
+ \setcounterparameter \c!prefix{#2\c!prefix}%
+ \setcounterparameter \c!prefixseparatorset{#2\c!prefixseparatorset}%
+ \setcounterparameter \c!prefixconversion{#2\c!prefixconversion}%
+ \setcounterparameter\c!prefixconversionset{#2\c!prefixconversionset}%
+ \setcounterparameter \c!prefixstarter{#2\c!prefixstarter}%
+ \setcounterparameter \c!prefixstopper{#2\c!prefixstopper}%
+ \setcounterparameter \c!prefixset{#2\c!prefixset}%
+ \setcounterparameter \c!prefixsegments{#2\c!prefixsegments}%
+ \setcounterparameter \c!prefixset{#2\c!prefixset}%
+ \setcounterparameter \c!prefixconnector{#2\c!prefixconnector}%
+ %
+ \setcounterparameter \c!numberseparatorset{#2\c!numberseparatorset}%
+ \setcounterparameter \c!numberconversion{#2\c!numberconversion}%
+ \setcounterparameter\c!numberconversionset{#2\c!numberconversionset}%
+ \setcounterparameter \c!numberstarter{#2\c!numberstarter}%
+ \setcounterparameter \c!numberstopper{#2\c!numberstopper}%
+ \setcounterparameter \c!numbersegments{#2\c!numbersegments}%
+ %
+ \the\everysetupcounter}
+
+\protected\def\mult_interfaces_counter_association#1#2#3#4#5#6#7% tag current setup parameter list sync register
+ {\strc_counter_preset_using_parameter#3\rootcounterparameter
+ \newtoks#5%
+ \permanent\protected\def #6{\ifempty#2\the#5\else\strc_counter_setup_using_parameter#2#4\fi}% sync
+ \permanent\protected\def#7##1{\normalexpanded{#5{\the#5\strc_counter_setup_using_parameter{##1}\noexpand#4}}}} % register
+
+\permanent\protected\def\installcounterassociation#1% => synchronize#1counters register#1counter
+ {\normalexpanded
+ {\mult_interfaces_counter_association
+ {#1}% not \??xx but xx
+ \expandafter\noexpand\csname current#1\endcsname
+ \expandafter\noexpand\csname setup#1\endcsname
+ \expandafter\noexpand\csname #1parameter\endcsname
+ \expandafter\noexpand\csname counter_association_list_#1\endcsname
+ \expandafter\noexpand\csname synchronize#1counters\endcsname
+ \expandafter\noexpand\csname register#1counter\endcsname}}
+
+% needs testing:
+%
+% \protected\def\strc_counter_setup_push#1#2#3% \someparameter \directsomeparameter \setexpandedsomeparameter
+% {\let\savedcounterparameter \counterparameter
+% \let\saveddirectcounterparameter \directcounterparameter
+% \let\savedsetexpandedcounterparameter\setexpandedcounterparameter
+% % remap
+% \let\counterparameter #1%
+% \let\directcounterparameter #2%
+% \let\setexpandedcounterparameter #3}
+%
+% \protected\def\strc_counter_setup_pop
+% {\let\counterparameter \savedcounterparameter
+% \let\directcounterparameter \saveddirectcounterparameter
+% \let\setexpandedcounterparameter \savedsetexpandedcounterparameter}
+%
+% \protected\def\mult_interfaces_counter_association#1#2#3#4#5#6#7% tag current setup parameter list sync register
+% {\strc_counter_preset_using_parameter#3\rootcounterparameter
+% \newtoks#5%
+% \protected\def#6% sync
+% {\strc_counter_setup_push
+% \ifempty#2%
+% \the#5%
+% \else
+% \let\currentcounter\empty
+% \the\everysetupcounter
+% \fi
+% \strc_counter_setup_pop}%
+% \protected\def#7##1% register
+% {\normalexpanded{#5{\the#5\edef\noexpand\currentcounter{##1}\noexpand\the\everysetupcounter}}}}
+
+%D For good old times (easier to explain in manuals):
+%D
+%D \starttyping
+%D \setcounter[userpage][9]
+%D \setupcounter[userpage][number=9]
+%D \setupuserpagenumber[number=9]
+%D \stoptyping
+
+% needs testing: we might have conflicts with mixins
+%
+% \appendtoks
+% \ifempty\currentcounter \else
+% \edef\p_number{\counterparameter\c!number}%
+% \ifempty\p_number \else
+% \strc_counters_set\currentcounter\p_number
+% \letcounterparameter\c!number\empty
+% \fi
+% \fi
+% \to \everysetupcounter
+
+\stopcontextdefinitioncode
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-pag.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-pag.mkxl
new file mode 100644
index 00000000000..c27fd942953
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-pag.mkxl
@@ -0,0 +1,487 @@
+%D \module
+%D [ file=strc-pag,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Pagenumbering,
+%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 Structure Macros / Pagenumbering}
+
+\registerctxluafile{strc-pag}{}
+
+\unprotect
+
+\startcontextdefinitioncode
+
+% Allocation:
+
+\ifdefined\realpageno \else \permanent\countdef\realpageno \zerocount \fi \realpageno \plusone
+\ifdefined\userpageno \else \permanent\countdef\userpageno \plusone \fi \userpageno \plusone
+\ifdefined\subpageno \else \permanent\countdef\subpageno \plustwo \fi \subpageno \plusone % was \zerocount but that doesn't work well with bytext
+\ifdefined\arrangeno \else \permanent\countdef\arrangeno \plusthree \fi \arrangeno \zerocount % !
+\ifdefined\pagenoshift \else \permanent\countdef\pagenoshift\plusfour \fi \pagenoshift\zerocount % !
+\ifdefined\lastpageno \else \permanent\countdef\lastpageno \plusfive \fi \lastpageno \zerocount % !
+
+\ifdefined\pageno \else \aliased\let\pageno\userpageno \fi
+
+\permanent\def\realfolio{\the\realpageno}
+\permanent\def\userfolio{\the\userpageno}
+\permanent\def\subfolio {\the\subpageno }
+\permanent\def\lastfolio{\the\lastpageno}
+
+\newtoks\everyinitializepagecounters
+
+\permanent\protected\def\initializepagecounters
+ {\the\everyinitializepagecounters}
+
+\appendtoks
+ \initializepagecounters
+\to \everyjob
+
+% Page numbers are kind of independent of each other and therefore they
+% all get their own counter. After all, it's easier to combine them in
+% a pseudo counterset than to deal with a complex set itself.
+
+% \defineprefixset [mine][section-1,section-2]
+% \defineseparatorset[mine][:]
+%
+% \setupuserpagenumber
+% [way=bypart,
+% prefix=yes,
+% prefixset=mine,
+% prefixseparatorset=mine]
+
+% \defineconversionset[frontpart:pagenumber][][romannumerals]
+% \defineconversionset[bodypart:pagenumber] [][numbers]
+%
+% \setupuserpagenumber[way=byblock]
+% \setupuserpagenumber[way=bychapter]
+% \setupuserpagenumber[numberconversionset=pagenumber]
+%
+% \starttext
+% \startfrontmatter
+% \completecontent[criterium=all]
+% \chapter{tufte} \section{one} \input tufte \page \section{two} \input tufte \page
+% \chapter{tufte} \section{one} \input tufte \page \section{two} \input tufte \page
+% \stopfrontmatter
+% \startbodymatter
+% \chapter{knuth} \section{one} \input knuth \page \section{two} \input knuth \page \section{three} \input knuth \page
+% \chapter{knuth} \section{one} \input knuth \page \section{two} \input knuth \page \section{three} \input knuth \page
+% \stopbodymatter
+% \stoptext
+
+\definecounter[\s!realpage][\c!prefix=\v!no,\c!start=\plusone,\c!prefixsegments=,\s!counter=realpageno,\c!method=\v!page]
+\definecounter[\s!userpage][\c!prefix=\v!no,\c!start=\plusone,\c!prefixsegments=,\s!counter=userpageno,\c!method=\v!page]
+\definecounter[\s!subpage] [\c!prefix=\v!no,\c!start=\plusone,\c!prefixsegments=,\s!counter=subpageno, \c!method=\v!page]
+
+\newtoks\everysetuprealpagenumber % todo: set state: none, start, stop, reset
+\newtoks\everysetupuserpagenumber % todo: set state: none, start, stop, reset
+\newtoks\everysetupsubpagenumber % todo: set state: none, start, stop, reset
+
+\let\m_strc_pagenumbers_state_old\zerocount
+\let\m_strc_pagenumbers_state_new\zerocount
+
+\def\strc_pagenumbers_save_state#1{\edef\m_strc_pagenumbers_state_old{\namedcounterparameter#1\c!state}}
+
+\permanent\tolerant\protected\def\setuprealpagenumber[#1]{\strc_pagenumbers_save_state\s!realpage\setupcounter[\s!realpage][#1]\the\everysetuprealpagenumber}
+\permanent\tolerant\protected\def\setupuserpagenumber[#1]{\strc_pagenumbers_save_state\s!userpage\setupcounter[\s!userpage][#1]\the\everysetupuserpagenumber}
+\permanent\tolerant\protected\def\setupsubpagenumber [#1]{\strc_pagenumbers_save_state\s!subpage \setupcounter[\s!subpage ][#1]\the\everysetupsubpagenumber }
+
+\permanent\protected\def\resetrealpagenumber {} % not permitted
+\permanent\protected\def\resetuserpagenumber {\strc_counters_reset\s!userpage}
+\permanent\protected\def\resetsubpagenumber {\strc_counters_reset\s!subpage}
+
+\appendtoks
+ \strc_counters_set\s!realpage\realpageno
+ \strc_counters_set\s!userpage\userpageno
+ \strc_counters_set\s!subpage \subpageno
+ \lastpageno\lastcountervalue[\s!realpage]\relax
+\to \everyinitializepagecounters
+
+\aliased\let\setuppagenumber\setupuserpagenumber
+\aliased\let\resetpagenumber\resetuserpagenumber
+
+% invisible =
+
+\def\strc_pagenumbers_page_state_save % \normalexpanded?
+ {\clf_savepagedata
+ {
+ prefix {\namedcounterparameter\s!userpage\c!prefix}
+ separatorset {\namedcounterparameter\s!userpage\c!prefixseparatorset}
+ conversion {\namedcounterparameter\s!userpage\c!prefixconversion}
+ conversionset {\namedcounterparameter\s!userpage\c!prefixconversionset}
+ set {\namedcounterparameter\s!userpage\c!prefixset}
+ segments {\namedcounterparameter\s!userpage\c!prefixsegments}
+ connector {\namedcounterparameter\s!userpage\c!prefixconnector}
+ }{
+ conversion {\namedcounterparameter\s!userpage\c!numberconversion}
+ conversionset {\namedcounterparameter\s!userpage\c!numberconversionset}
+ starter {\namedcounterparameter\s!userpage\c!numberstarter}
+ stopper {\namedcounterparameter\s!userpage\c!numberstopper}
+ }{
+ viewerprefix {\namedcounterparameter\s!userpage\c!viewerprefix}
+ state {\namedcounterparameter\s!userpage\c!state}
+ }%
+ \relax}
+
+\prependtoks
+ \strc_pagenumbers_page_state_save
+\to \everyshipout
+
+\installcorenamespace{pagestatestack} % no level yet
+
+\protected\def\strc_pagenumbers_page_state_push{\xdefcsname\??pagestatestack\c!state\endcsname{\namedcounterparameter\s!userpage\c!state}}
+\protected\def\strc_pagenumbers_page_state_pop {\normalexpanded{\setuppagenumber[\c!state=\csname\??pagestatestack\c!state\endcsname]}}
+
+\setuppagenumber
+ [\c!way=\v!by\v!text,
+ \c!prefix=\v!no,
+ \c!prefixset=\v!part,
+ \c!prefixconnector=\endash,
+ \c!state=\v!start]
+
+\setupsubpagenumber
+ [\c!way=\v!by\v!part,
+ \c!state=\v!start] % was stop but start looks better in logging
+
+% Counters
+
+%permanent\def\firstrealpagenumber{\convertedcounter[\s!realpage][\c!type=\v!first]}
+%permanent\def\firstuserpagenumber{\convertedcounter[\s!userpage][\c!type=\v!first]}
+%permanent\def\firstsubpagenumber {\convertedcounter[\s!subpage ][\c!type=\v!first]}
+
+%permanent\def\lastrealpagenumber {\convertedcounter[\s!realpage][\c!type=\v!last]}
+%permanent\def\lastuserpagenumber {\convertedcounter[\s!userpage][\c!type=\v!last]}
+%permanent\def\lastsubpagenumber {\convertedcounter[\s!subpage ][\c!type=\v!last]}
+
+%permanent\def\prevrealpagenumber {\convertedcounter[\s!realpage][\c!type=\v!previous]}
+%permanent\def\prevuserpagenumber {\convertedcounter[\s!userpage][\c!type=\v!previous]}
+%permanent\def\prevsubpagenumber {\convertedcounter[\s!subpage ][\c!type=\v!previous]}
+
+%permanent\def\nextrealpagenumber {\convertedcounter[\s!realpage][\c!type=\v!next]}
+%permanent\def\nextuserpagenumber {\convertedcounter[\s!userpage][\c!type=\v!next]}
+%permanent\def\nextsubpagenumber {\convertedcounter[\s!subpage ][\c!type=\v!next]}
+
+\permanent\def\firstrealpage{\strc_counters_first\s!realpage}
+\permanent\def\firstuserpage{\strc_counters_first\s!userpage}
+\permanent\def\firstsubpage {\strc_counters_first\s!subpage }
+
+\permanent\def\prevrealpage {\strc_counters_prev \s!realpage}
+\permanent\def\prevuserpage {\strc_counters_prev \s!userpage}
+\permanent\def\prevsubpage {\strc_counters_prev \s!subpage }
+
+\permanent\def\nextrealpage {\strc_counters_next \s!realpage}
+\permanent\def\nextuserpage {\strc_counters_next \s!userpage}
+\permanent\def\nextsubpage {\strc_counters_next \s!subpage }
+
+\permanent\def\lastrealpage {\strc_counters_last \s!realpage}
+\permanent\def\lastuserpage {\strc_counters_last \s!userpage}
+\permanent\def\lastsubpage {\strc_counters_last \s!subpage }
+
+\aliased\let\firstpage\firstrealpage
+\aliased\let\prevpage \prevrealpage
+\aliased\let\nextpage \nextrealpage
+\aliased\let\lastpage \lastrealpage
+
+% Compatibility counters:
+
+\permanent\def\nofrealpages {\lastrealpage} \permanent\def\totalnumberofpages{\lastrealpage}
+\permanent\def\nofuserpages {\lastuserpage} \permanent\def\lastpagenumber {\lastuserpage}
+\permanent\def\nofsubpages {\lastsubpage }
+
+% Renderers:
+
+\permanent\def\pagenumber {\strc_counters_raw\s!userpage}
+\permanent\def\prefixedpagenumber {\directconvertedcounter\s!userpage\empty} % \userpagenumber
+
+\permanent\def\realpagenumber {\directconvertedcounter\s!realpage\empty}
+\permanent\def\userpagenumber {\directconvertedcounter\s!userpage\empty}
+\permanent\def\subpagenumber {\directconvertedcounter\s!subpage \empty}
+
+\permanent\def\firstrealpagenumber{\directconvertedcounter\s!realpage\v!first}
+\permanent\def\firstuserpagenumber{\directconvertedcounter\s!userpage\v!first}
+\permanent\def\firstsubpagenumber {\directconvertedcounter\s!subpage \v!first}
+
+\permanent\def\lastrealpagenumber {\directconvertedcounter\s!realpage\v!last}
+\permanent\def\lastuserpagenumber {\directconvertedcounter\s!userpage\v!last}
+\permanent\def\lastsubpagenumber {\directconvertedcounter\s!subpage \v!last}
+
+\permanent\def\prevrealpagenumber {\directconvertedcounter\s!realpage\v!previous}
+\permanent\def\prevuserpagenumber {\directconvertedcounter\s!userpage\v!previous}
+\permanent\def\prevsubpagenumber {\directconvertedcounter\s!subpage \v!previous}
+
+\permanent\def\nextrealpagenumber {\directconvertedcounter\s!realpage\v!next}
+\permanent\def\nextuserpagenumber {\directconvertedcounter\s!userpage\v!next}
+\permanent\def\nextsubpagenumber {\directconvertedcounter\s!subpage \v!next}
+
+\protected\def\strc_pagenumbers_decrement_counters % only at the end
+ {\strc_counters_decrement\s!realpage
+ \strc_counters_decrement\s!userpage
+ \strc_counters_decrement\s!subpage}
+
+\protected\def\strc_pagenumbers_increment_counters
+ {\incrementpagenumber
+ \incrementsubpagenumber}
+
+\appendtoks
+ \strc_pagenumbers_decrement_counters
+\to \everygoodbye
+
+\newcount\c_strc_subpage_first_real \c_strc_subpage_first_real\plusone
+
+\appendtoks
+ \ifcase\subpageno\relax
+ \global\c_strc_subpage_first_real\realpageno
+ \or
+ \global\c_strc_subpage_first_real\realpageno
+ \fi
+\to \everybeforepagebody
+
+\permanent\def\therealsubpageno#1% new helper
+ {\the\numexpr\c_strc_subpage_first_real+#1+\minusone\relax}
+
+% Equivalents (compatibility):
+%
+% todo: maybe leave lastpage etc lua calls
+
+\permanent\def\realpage{\the\realpageno}
+\permanent\def\userpage{\the\userpageno}
+\permanent\def\subpage {\the\subpageno}
+
+% Hooks:
+
+\permanent\def\currentpage{\the\realpageno}% rather useless
+
+\appendtoks
+ \ifnum\realpageno>\lastpage \enforced\glet\lastpage\lastrealpage \fi
+\to \everyinitializepagecounters
+
+% States:
+
+\newconditional\layoutisdoublesided % already defined: \newif\ifdoublesided
+\newconditional\layoutissinglesided % already defined: \newif\ifsinglesided
+
+% Realpage and subpage numbers:
+
+\permanent\protected\def\setnextrealpageno{\global\realpageno\strc_counters_incremented\s!realpage\relax}
+\permanent\protected\def\setnextsubpageno {\global\subpageno \strc_counters_incremented\s!subpage \relax}
+
+% Page numbers: (can move to lua) ... inconsistent names
+
+\installcorenamespace{pagenumberinc}
+\installcorenamespace{pagenumberdec}
+
+\protected\def\strc_pagenumbers_decrement_userpage{\global\userpageno\strc_counters_decremented\s!userpage\relax}
+\protected\def\strc_pagenumbers_increment_userpage{\global\userpageno\strc_counters_incremented\s!userpage\relax}
+
+\permanent\protected\def\decrementsubpagenumber{\global\subpageno \strc_counters_decremented\s!subpage \relax}
+\permanent\protected\def\incrementsubpagenumber{\global\subpageno \strc_counters_incremented\s!subpage \relax}
+
+\protected\def\strc_pagenumbers_synchronize_userpage{\global\c_strc_pagenumbers_state_userpage\plustwo} % start and visible
+
+\permanent\protected\def\decrementpagenumber{\csname\??pagenumberdec\namedcounterparameter\s!userpage\c!state\endcsname}
+\permanent\protected\def\incrementpagenumber{\csname\??pagenumberinc\namedcounterparameter\s!userpage\c!state\endcsname}
+
+\letvalue{\??pagenumberdec\v!start}\strc_pagenumbers_decrement_userpage
+\letvalue{\??pagenumberdec\v!none }\strc_pagenumbers_decrement_userpage
+\letvalue{\??pagenumberdec\v!empty}\strc_pagenumbers_decrement_userpage
+
+\letvalue{\??pagenumberinc\v!start}\strc_pagenumbers_increment_userpage
+\letvalue{\??pagenumberinc\v!none }\strc_pagenumbers_increment_userpage
+\setvalue{\??pagenumberinc\v!empty}{\strc_pagenumbers_increment_userpage\strc_pagenumbers_synchronize_userpage}
+\letvalue{\??pagenumberinc\v!keep }\strc_pagenumbers_synchronize_userpage
+
+% Setup general page numbering
+
+\installcorenamespace{pagenumbering}
+
+\installdirectcommandhandler \??pagenumbering {pagenumbering}
+
+% some day ifsinglesided and ifdoublesided will become obsolete
+
+\newtoks\everysidedswitch
+
+\appendtoks
+ \singlesidedfalse \setfalse\layoutisdoublesided
+ \doublesidedfalse \setfalse\layoutissinglesided
+ \resetsystemmode\v!singlesided
+ \resetsystemmode\v!doublesided
+ \processallactionsinset
+ [\directpagenumberingparameter\c!alternative]%
+ [ \v!singlesided=>\setsystemmode\v!singlesided\singlesidedtrue\settrue\layoutissinglesided,
+ \v!doublesided=>\setsystemmode\v!doublesided\doublesidedtrue\settrue\layoutisdoublesided]%
+ \the\everysidedswitch
+ \pageduplexmode
+ \ifsinglesided
+ \ifdoublesided\plustwo\else\zerocount\fi
+ \else
+ \ifdoublesided\plusone\else\zerocount\fi
+ \fi
+ \page_backgrounds_recalculate
+ \strc_pagenumbers_set_location
+\to \everysetuppagenumbering
+
+\ifdefined \page_backgrounds_recalculate \else
+ \let\page_backgrounds_recalculate\relax
+\fi
+
+\ifdefined \strc_pagenumbers_set_location \else
+ \let\strc_pagenumbers_set_location\relax
+\fi
+
+\protected\def\strc_pagenumbers_flush_final_page
+ {\edef\p_strc_pagenumbers_page{\directpagenumberingparameter\c!page}%
+ \ifempty\p_strc_pagenumbers_page \else
+ \ifx\p_strc_pagenumbers_page\v!no \else
+ \page[\p_strc_pagenumbers_page]%
+ \fi
+ \fi}
+
+% The numbered location handler is there because we need to be downward
+% compatible. So, in fact there can be multiple handlers active at the
+% same time, but only the current one does something.
+
+% Rendering:
+
+\protected\def\strc_pagenumbers_place_location
+ {\ifnum\c_strc_pagenumbers_state_userpage=\plustwo
+ \ifnum\c_strc_pagenumbers_state=\plusone
+ \doif{\directpagenumberingparameter\c!strut}\v!yes\strut
+ \begingroup
+ \usepagenumberingstyleandcolor\c!style\c!color
+ \directpagenumberingparameter\c!command
+ {\directpagenumberingparameter\c!left
+ \labeltexts\v!pagenumber\prefixedpagenumber
+ \directpagenumberingparameter\c!right}%
+ \endgroup
+ \fi
+ \fi}
+
+\permanent\protected\def\completepagenumber
+ {\ifnum\c_strc_pagenumbers_state_userpage=\plustwo
+ \ifnum\c_strc_pagenumbers_state=\plusone
+ \directpagenumberingparameter\c!left
+ \labeltexts\v!pagenumber\prefixedpagenumber
+ \directpagenumberingparameter\c!right
+ \fi
+ \fi}
+
+\permanent\protected\def\placepagenumber
+ {\ifnum\c_strc_pagenumbers_state_userpage=\plustwo
+ \ifnum\c_strc_pagenumbers_state=\plusone
+ \labeltexts\v!pagenumber\pagenumber
+ \fi
+ \fi}
+
+\permanent\protected\def\referencepagenumber[#1]%
+ {\doifelsenothing{#1}{?}{}}
+
+% The numbered location handler is there because we need to be downward
+% compatible. So, in fact there can be multiple handlers active at the
+% same time, but only the current one does something.
+
+\setnewconstant\c_strc_pagenumbers_state_realpage\plustwo % counter state : 0=stop, 1=start, 2=start and visible
+\setnewconstant\c_strc_pagenumbers_state_userpage\plustwo % counter state : 0=stop, 1=start, 2=start and visible
+\setnewconstant\c_strc_pagenumbers_state_subpage \plustwo % counter state : 0=stop, 1=start, 2=start and visible
+\setnewconstant\c_strc_pagenumbers_state \plusone % general number: 0=invisible, 1=visible
+
+\protected\def\strc_pagenumbers_check_state_change#1#2%
+ {\edef\m_strc_pagenumbers_state_new{\namedcounterparameter#1\c!state}%
+ \ifx\m_strc_pagenumbers_state_new\m_strc_pagenumbers_state_old \else
+ #2\ifx\m_strc_pagenumbers_state_new\v!start\plustwo\else\zerocount\fi
+ \fi}
+
+\appendtoks % todo: set state: none, start, stop, reset
+ \strc_pagenumbers_check_state_change\s!realpage\c_strc_pagenumbers_state_realpage
+\to \everysetuprealpagenumber
+
+\appendtoks % todo: set state: none, start, stop, reset
+ \strc_pagenumbers_check_state_change\s!userpage\c_strc_pagenumbers_state_userpage
+\to \everysetupuserpagenumber
+
+\appendtoks % todo: set state: none, start, stop, reset
+ \strc_pagenumbers_check_state_change\s!subpage\c_strc_pagenumbers_state_subpage
+\to \everysetupsubpagenumber
+
+\appendtoks % todo: set state: none, start, stop, reset
+ \doifelse{\directpagenumberingparameter\c!state}\v!start
+ {\c_strc_pagenumbers_state\plusone }%
+ {\c_strc_pagenumbers_state\zerocount}%
+\to \everysetuppagenumbering
+
+% Done
+
+% \c!way=\v!by\v!part
+% \c!text=
+% \v!chapter\v!number=\v!no
+% \v!part\v!number=\v!yes
+% \c!numberseparator=--
+% \c!conversion=\v!numbers
+
+\setuppagenumbering
+ [\c!alternative=\v!singlesided,
+ \c!location={\v!header,\v!middle},
+ \c!width=, % in geval van \v!marginedge
+ \c!left=,
+ \c!right=,
+ \c!page=\v!last,
+ \c!textseparator=\tfskip,
+ \c!state=\v!start,
+ \c!command=,
+ \c!strut=\v!yes,
+ \c!style=, % empty, otherwise conflict
+ \c!color=]
+
+% just for downward compatbility
+
+\appendtoks
+ \edef\scratchstringone{\namedcounterparameter\s!userpage\c!number}%
+ \ifempty\scratchstringone \else
+ \normalexpanded{\setuppagenumber[\c!start=\scratchstringone,\c!number=]}%
+ \userpageno\strc_counters_raw\s!userpage
+ \fi
+\to \everysetupuserpagenumber % todo: set state: none, start, stop, reset
+
+\appendtoks
+ \edef\scratchstringone{\namedcounterparameter\s!subpage\c!number}%
+ \ifempty\scratchstringone \else
+ \normalexpanded{\setupsubpagenumber[\c!start=\scratchstringone,\c!number=]}%
+ \subpageno\strc_counters_raw\s!subpage\relax
+ \fi
+\to \everysetupsubpagenumber % todo: set state: none, start, stop, reset
+
+% \setuplayout[width=300pt,backspace=4cm]
+% \setuppagenumbering [alternative=doublesided]
+% \setupuserpagenumber[start=2]
+% \starttext \dorecurse{20}{\input knuth \par} \stoptext
+
+\protected\def\strc_pagenumbers_check_change_shift
+ {\userpageno\strc_counters_raw\s!userpage\relax
+ \ifnum\realpageno=\plusone
+ \ifodd\userpageno
+ \else
+ \global\pagenoshift\plusone
+ \fi
+ \fi}
+
+\appendtoks % todo: set state: none, start, stop, reset
+ % this makes starting at an even page possible
+ \strc_pagenumbers_check_change_shift
+\to \everysetupuserpagenumber
+
+\appendtoks % todo: set state: none, start, stop, reset
+ % this makes starting at an even page possible
+ \strc_pagenumbers_check_change_shift
+\to \everysetuppagenumbering
+
+\initializepagecounters
+
+\stopcontextdefinitioncode
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx b/Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx
new file mode 100644
index 00000000000..f3a90ed6764
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-ref.mklx
@@ -0,0 +1,2217 @@
+%D \module
+%D [ file=strc-ref,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Cross Referencing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: (1) configure references, (2) rendering => with presets
+%
+% \defineconversionset[default][Character,number,Romannumerals,Character][number]
+% \defineseparatorset [default][.,.,--][.]
+% \setuphead[subsection][sectionstopper=),sectionsegments=4:4]
+% \setupreferencestructureprefix[default][prefixsegments=2:4]
+% \setupreferencestructureprefix[figure][default][prefixsegments=3:4]
+% \chapter {One}
+% \section {One}
+% \subsection[sec:test]{Two}
+% See \in[sec:test] and \in[fig:xx] and \in[fig:yy]
+% \placefigure[here][fig:xx]{}{}
+% \placefigure[here][fig:yy]{}{}
+
+\writestatus{loading}{ConTeXt Structure Macros / Cross Referencing}
+
+\registerctxluafile{strc-rsc}{}
+\registerctxluafile{strc-ref}{}
+\registerctxluafile{node-ref}{autosuffix,optimize}
+
+\unprotect
+
+% todo : unknown/illegal reference no arg
+% todo : +n pages check on 'samepage' (contrastcolor)
+% todo : multiple text in reference
+
+% Makes more sense to build action data first, especially now openaction etc are
+% supported.
+%
+% \definespecial\doexecuteactionchain w h
+% \definespecial\dosetgotolocation
+% \definespecial\dosetexecuteJScode
+% ...
+
+%D This module deals with referencing. In \CONTEXT\ referencing is one of the core
+%D features, although at a first glance probably nobody will notice. This is good,
+%D because referencing should be as hidden as possible.
+%D
+%D Before we start implementing functionality we provide a way to set up this
+%D mechanism.
+%D
+%D \showsetup{setupreferencing}
+%D
+%D In interactive documents verbose references don't always make sense (what is a
+%D page number in an unnumbered document). By setting the \type{interaction}
+%D variable, one can influences the way interactive references are set.
+
+\installcorenamespace{referencing}
+
+\installdirectcommandhandler \??referencing {referencing} % \??referencing
+
+\mutable\let\referenceprefix \empty
+
+\mutable\let\currentdestinationattribute \empty
+
+\mutable\let\currentreferenceattribute \empty
+\mutable\let\currentreferencecoding \empty
+\mutable\let\currentreferencecontent \empty
+\mutable\let\currentreferencedata \empty
+\mutable\let\currentreferenceexpansion \empty
+\mutable\let\currentreferenceformatautocase\empty
+\mutable\let\currentreferenceformatlabel \empty
+\mutable\let\currentreferenceformatsetups \empty
+\mutable\let\currentreferenceformattype \empty
+\mutable\let\currentreferencekind \empty
+\mutable\let\currentreferencelabels \empty
+%mutable\let\currentreferencenumber \empty
+\mutable\let\currentreferenceorder \empty
+%mutable\let\currentreferencepage \empty
+%mutable\let\currentreferencerealpage \empty
+%mutable\let\currentreferencetext \empty
+%mutable\let\currentreferencetitle \empty
+\mutable\let\currentreferenceuserdata \empty
+
+
+\newif\ifreferencing \referencingtrue
+
+\appendtoks
+ \edef\p_state{\referencingparameter\c!state}%
+ \ifx\p_state\v!start
+ \referencingtrue
+ \else
+ \referencingfalse
+ \fi
+\to \everysetupreferencing
+
+%D In paper documents, referencing comes down to cross referencing, but in
+%D their interactive counterparts, is also involves navigation. Many features
+%D implemented here are therefore closely related to navigation.
+%D
+%D Many \CONTEXT\ commands can optionally be fed with a reference. Such a
+%D reference, when called upon, returns the number of a figure, table, chapter
+%D etc, a piece of text, or a pagenumber.
+%D
+%D There are three ways of defining a reference:
+%D
+%D \starttyping
+%D \pagereference[here]
+%D \textreference[here]{some text}
+%D \stoptyping
+%D
+%D the third alternative combines them in:
+%D
+%D \starttyping
+%D \reference[here]{some text}
+%D \stoptyping
+
+\permanent\protected\def\showreferences{\enabletrackers[nodes.references.show,nodes.destinations.show]}
+
+%D These are implemented in a low level form as:
+
+\permanent\tolerant\protected\def\textreference [#labels]{\strc_references_set_named_reference\s!text{#labels}{}}
+\permanent\tolerant\protected\def\pagereference [#labels]{\strc_references_set_named_reference\s!page{#labels}{}{}}
+\permanent\tolerant\protected\def\reference [#labels]{\strc_references_set_named_reference\s!full{#labels}{}}
+\permanent\tolerant\protected\def\setreference [#labels]#spacer[#settings]{\strc_references_set_named_reference\s!user{#labels}{#settings}{}}
+
+\permanent\protected\def\dosetdirectpagereference#1{\strc_references_set_named_reference\s!page{#1}{}{}} % low level, maybe use _
+
+\permanent\protected\def\usereferenceparameter#1% faster local variant
+ {\edef\m_strc_references_asked{#1\c!reference}%
+ \ifempty\m_strc_references_asked\else
+ \dosetdirectpagereference\m_strc_references_asked
+ \fi}
+
+%D Actually there is not much difference between a text and a full reference, but
+%D it's the concept that counts. The low level implementation is:
+
+\newcount\lastreferenceattribute
+\newcount\lastdestinationattribute
+
+\def\strc_references_finish#prefix#reference#internal% gets expanded anyway
+ {\normalexpanded{\clf_deferredenhancereference{#prefix}{#reference}}}
+
+\permanent\let\dofinishreference\strc_references_finish % used at lua end
+
+%D This is somewhat tricky: we want to keep the reference with the following word but
+%D that word should also hyphenate. We need to find a better way.
+
+% 0 = nothing
+% 1 = bind to following word
+
+\setnewconstant\c_strc_references_bind_state\plusone
+
+\def\strc_references_inject_before
+ {}
+
+\def\strc_references_inject_after
+ {\ifcase\c_strc_references_bind_state
+ % nothing
+ \or
+ \prewordbreak % to be tested: \removeunwantedspaces\permithyphenation
+ \fi}
+
+
+\protected\def\strc_references_set_named_reference
+ {\ifreferencing
+ \expandafter\strc_references_set_named_reference_indeed
+ \else
+ \expandafter\gobblefourarguments
+ \fi}
+
+\newbox\b_strc_destination_nodes
+
+\protected\def\strc_references_flush_destination_nodes
+ {\ifvoid\b_strc_destination_nodes \else
+ \unhbox\b_strc_destination_nodes
+ \fi}
+
+\def\strc_references_placeholder
+ {\ifempty\dotaggedplaceholder\else
+ \c_attr_destination\lastdestinationattribute
+ \dotaggedplaceholder
+ \fi}
+
+\protected\def\strc_references_destination_point_yes
+ {\strc_references_inject_before % new
+ \dostarttagged\t!reference\empty
+ \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup
+ \strc_references_flush_destination_nodes
+ \strc_references_placeholder
+ \egroup
+ \dostoptagged
+ \strc_references_inject_after}
+
+\protected\def\strc_references_destination_point_nop
+ {\strc_references_inject_before % new
+ \dostarttagged\t!reference\empty
+ \dontleavehmode\hbox \bgroup
+ \strc_references_flush_destination_nodes
+ \strc_references_placeholder
+ \egroup
+ \dostoptagged
+ \strc_references_inject_after}
+
+\protected\def\strc_references_start_destination_nodes % messy but we need the delay
+ {\setbox\b_strc_destination_nodes\hbox\bgroup} % also sets lastdestinationattribute
+
+\protected\def\strc_references_stop_destination_nodes
+ {\normalexpanded{\egroup\lastdestinationattribute\the\lastdestinationattribute\relax}}
+
+\protected\def\strc_references_set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
+ {\ifreferencing
+ % we could have a more efficient one for page references but for the moment
+ % we don't care too much
+ \edef\currentreferencekind {#kind}%
+ \edef\currentreferencelabels {#labels}%
+ \edef\currentreferenceuserdata {#userdata}%
+ \edef\currentreferenceexpansion{\referencingparameter\c!expansion}% {\referenceparameter\c!expansion}
+ \ifempty\currentreferencelabels
+ \lastdestinationattribute\attributeunsetvalue
+ \else
+ \ifx\currentreferenceexpansion\s!xml
+ \xmlstartraw
+ \xdef\currentreferencedata{#text}% data, no text else conflict
+ \xmlstopraw
+ \glet\currentreferencecoding\s!xml
+ \else
+ \ifx\currentreferenceexpansion\v!yes
+ \xdef\currentreferencedata{#text}%
+ \else
+ \xdef\currentreferencedata{\detokenize{#text}}%
+ \fi
+ \glet\currentreferencecoding\s!tex
+ \fi
+ % beware, the structures.references.set writes a
+ \setnextinternalreference
+ \strc_references_start_destination_nodes
+ \clf_setdestinationattribute
+ {%
+ references {%
+ internal \locationcount
+ % block {\currentsectionblock}%
+ view {\interactionparameter\c!focus}%
+ \ifempty\referenceprefix\else
+ prefix {\referenceprefix}%
+ \fi
+ reference {\currentreferencelabels}%
+ }%
+ metadata {%
+ kind {\currentreferencekind}%
+ \ifx\currentreferencekind\s!page\else
+ \ifx\currentreferencecoding\s!xml
+ xmlroot {\xmldocument}%
+ \fi
+ catcodes \catcodetable
+ \fi
+ }%
+ \ifempty\currentreferencedata\else
+ entries {%
+ text {\currentreferencedata}%
+ }%
+ \fi
+ \ifempty\currentreferenceuserdata\else
+ userdata {\detokenize{#userdata}}%
+ \fi
+ }%
+ \relax
+ \strc_references_stop_destination_nodes
+ \fi
+ \else
+ \setbox\b_strc_destination_nodes\emptyhbox
+ \lastdestinationattribute\attributeunsetvalue
+ \fi
+ % will become obsolete:
+ \xdef\currentdestinationattribute{\number\lastdestinationattribute}%
+ % will become an option:
+ \ifnum\lastdestinationattribute>\zerocount
+ \strc_references_destination_point_yes
+ \orelse\ifvoid\b_strc_destination_nodes\else
+ \strc_references_destination_point_nop
+ \fi}
+
+\def\strc_references_set_page_only_destination_attribute#labels% could in fact be fully expandable
+ {\ifreferencing
+ \edef\currentreferencelabels{#labels}%
+ \ifempty\currentreferencelabels
+ \setbox\b_strc_destination_nodes\emptyhbox
+ \lastdestinationattribute\attributeunsetvalue
+ \else
+ \strc_references_start_destination_nodes
+ \setnextinternalreference
+ \clf_setdestinationattribute
+ {%
+ references {%
+ internal \locationcount
+ % block {\currentsectionblock}%
+ view {\interactionparameter\c!focus}%
+ \ifempty\referenceprefix\else
+ prefix {\referenceprefix}%
+ \fi
+ reference {\currentreferencelabels}%
+ }%
+ metadata {%
+ kind {page}%
+ }%
+ }%
+ \relax
+ \strc_references_stop_destination_nodes
+ \fi
+ \else
+ \setbox\b_strc_destination_nodes\emptyhbox
+ \lastdestinationattribute\attributeunsetvalue
+ \fi}
+
+\protected\def\strc_references_direct_full_user#user#labels#text%
+ {\ifreferencing
+ \strc_references_start_destination_nodes
+ \setnextinternalreference
+ \edef\m_strc_references_user{#user}%
+ \edef\m_strc_references_text{#text}%
+ \clf_setdestinationattribute
+ {%
+ references {%
+ internal \locationcount
+ % block {\currentsectionblock}%
+ view {\interactionparameter\c!focus}%
+ \ifempty\referenceprefix\else
+ prefix {\referenceprefix}%
+ \fi
+ reference {#labels}%
+ }%
+ metadata {%
+ kind {\s!full}%
+ }%
+ \ifempty\m_strc_references_text \else
+ entries {%
+ text {\m_strc_references_text}%
+ }%
+ \fi
+ \ifempty\m_strc_references_user \else
+ userdata {\m_strc_references_user}% \detokenize\expandafter{\normalexpanded{...}}
+ \fi
+ }%
+ \relax
+ \strc_references_stop_destination_nodes
+ \else
+ \setbox\b_strc_destination_nodes\emptyhbox
+ \lastdestinationattribute\attributeunsetvalue
+ \fi
+ % will become obsolete:
+ \xdef\currentdestinationattribute{\number\lastdestinationattribute}%
+ % will become an option:
+ \ifnum\lastdestinationattribute>\zerocount
+ \strc_references_destination_point_yes
+ \orelse\ifvoid\b_strc_destination_nodes\else
+ \strc_references_destination_point_nop
+ \fi}
+
+\protected\def\strc_references_direct_full
+ {\strc_references_direct_full_user\empty}
+
+\permanent\let\dodirectfullreference\strc_references_direct_full % for at lua end (no longer)
+
+\def\strc_references_set_page_only_destination_box_attribute#cs#labels%
+ {\strc_references_set_page_only_destination_attribute{#labels}%
+ \ifnum\lastdestinationattribute>\zerocount
+ \edef#cs{attr \destinationattribute\number\lastdestinationattribute}%
+ \else
+ \let#cs\empty
+ \fi}
+
+%D It's about time to clean up references .. stable enough now.
+
+\permanent\protected\def\boxreference[#1]%
+ {\begingroup
+ \dowithnextbox
+ {\strc_references_set_page_only_destination_attribute{#1}%
+ \hpack % \hbox
+ \ifnum\lastdestinationattribute=\attributeunsetvalue\else attr \destinationattribute \lastdestinationattribute \fi
+ {\box\b_strc_destination_nodes\box\nextbox}%
+ \endgroup}}
+
+\permanent\protected\def\hboxreference[#1]{\boxreference[#1]\hbox}
+\permanent\protected\def\vboxreference[#1]{\boxreference[#1]\vbox}
+
+\mutable\def\defaultreferencepage#text{[[[#text]]]}
+\mutable\def\defaultreferencetext#text{[[[#text]]]}
+
+%D For internal usage:
+
+\def\strc_references_set_simple_reference#label%
+ {\iflocation
+ \strc_references_start_destination_nodes
+ \setnextinternalreference
+ \clf_setdestinationattribute
+ {%
+ references {%
+ view {\interactionparameter\c!focus}%
+ \ifempty\referenceprefix\else
+ prefix {\referenceprefix}%
+ \fi
+ reference {#label}%
+ internal \locationcount
+ }%
+ metadata {%
+ kind {\s!page}%
+ }%
+ }%
+ \relax
+ \strc_references_stop_destination_nodes
+ \xdef\currentdestinationattribute{\number\lastdestinationattribute}%
+ \else
+ \setbox\b_strc_destination_nodes\emptyhbox
+ \xdef\currentdestinationattribute{\number\attributeunsetvalue}%
+ \fi}
+
+\def\strc_references_set_simple_internal_reference#label% no prefix
+ {\iflocation
+ \strc_references_start_destination_nodes
+ \setnextinternalreference
+ \clf_setdestinationattribute
+ {%
+ references {%
+ view {\interactionparameter\c!focus}%
+ reference {#label}%
+ internal \locationcount
+ }%
+ metadata {%
+ kind {\s!page}%
+ }%
+ }%
+ \relax
+ \strc_references_stop_destination_nodes
+ \xdef\currentdestinationattribute{\number\lastdestinationattribute}%
+ \else
+ \setbox\b_strc_destination_nodes\emptyhbox
+ \xdef\currentdestinationattribute{\number\attributeunsetvalue}%
+ \fi}
+
+\def\strc_references_get_simple_reference#label%
+ {\iflocation
+ \clf_injectreference
+ {\referenceprefix}%
+ {#label}%
+ {%
+ height \ht\strutbox
+ depth \dp\strutbox
+ \extrareferencearguments
+ }%
+ \relax
+ \xdef\currentreferenceattribute{\number\lastreferenceattribute}%
+ \else
+ \xdef\currentreferenceattribute{\number\attributeunsetvalue}%
+ \fi}
+
+%D \macros
+%D {contentreference}
+%D
+%D \starttyping
+%D \setupinteraction
+%D [state=start,
+%D focus=standard]
+%D
+%D \setupheader
+%D [state=stop]
+%D
+%D See page \goto{page 2}[page2] \page
+%D
+%D \contentreference
+%D [page2]
+%D [offset=1cm,toffset=2cm,frame=on]
+%D {\externalfigure[cow.pdf][factor=fit]}
+%D
+%D \stoptyping
+
+\permanent\tolerant\protected\def\contentreference[#1]#*[#2]%
+ {\ifarguments
+ \expandafter\gobbletwoarguments
+ \or
+ \expandafter\strc_references_content_pickup_nop
+ \else
+ \expandafter\strc_references_content_pickup_yes
+ \fi{#1}{#2}}
+
+\def\strc_references_content_pickup_yes#1#2%
+ {\hbox\bgroup\dowithnextbox{\strc_references_content_yes_finish{#1}{#2}}\hbox}
+
+\def\strc_references_content_pickup_nop#1#2%
+ {\hbox\bgroup\dowithnextbox{\strc_references_content_nop_finish{#1}{#2}}\hbox}
+
+\def\strc_references_content_yes_finish#1#2%
+ {\scratchwidth \wd\nextbox
+ \scratchheight\ht\nextbox
+ \scratchdepth \dp\nextbox
+ \setbox\nextbox\hpack
+ {\framed[\c!frame=\v!off,#2]{\box\nextbox}}%
+ \strc_references_set_simple_reference{#1}%
+ \setbox\nextbox\hpack attr \destinationattribute \currentdestinationattribute % \hpack ?
+ {\strc_references_flush_destination_nodes
+ \box\nextbox}%
+ \setbox\nextbox\hpack{\box\nextbox}%
+ \wd\nextbox\scratchwidth
+ \ht\nextbox\scratchheight
+ \dp\nextbox\scratchdepth
+ \box\nextbox
+ \egroup}
+
+\def\strc_references_content_nop_finish#1#2%
+ {\strc_references_set_simple_reference{#1}%
+ \hpack attr \destinationattribute \currentdestinationattribute % \hpack ?
+ {\strc_references_flush_destination_nodes
+ \box\nextbox}%
+ \egroup}
+
+%D \macros
+%D {everyreference}
+%D
+%D For rather tricky purposes, one can assign sanitizing macros to \type
+%D {\everyreference} (no longer that relevant).
+
+\newevery \everyreference \relax
+
+%D This is really needed, since for instance Polish has a different alphabet and
+%D needs accented entries in registers.
+
+\appendtoks
+ \cleanupfeatures
+\to \everyreference
+
+%D We did not yet discuss prefixing. Especially in interactive documents, it's not
+%D always easy to keep track of duplicate references. The prefix mechanism, which we
+%D will describe later on, solves this problem. By (automatically) adding a prefix
+%D one keeps references local, but the global ones in view. To enable this feature,
+%D we explictly split the prefix from the reference.
+
+\let\referenceprefix\empty
+
+%D For a long time the only way to access an external file was to use the file
+%D prefix (\type {somefile::}. However, when you split up a document, redefining the
+%D references may be such a pain, that another approach is feasible. By setting the
+%D \type {autofile} variable to \type {yes} or \type {page}, you can access the
+%D reference directly.
+%D
+%D \starttabulate[||||]
+%D \NC filename::tag \NC page(filename::pnum) \NC tag \NC\NR
+%D \NC $\star$ \NC \NC \NC\NR
+%D \NC $\star$ \NC $\star$ \NC $\star$ \NC\NR
+%D \NC \NC $\star$ \NC \NC\NR
+%D \stoptabulate
+
+\permanent\protected\def\usereferences[#filename]{} % obsolete
+
+%D As mentioned we will also use the cross reference mechanism for navigational
+%D purposes. The main reason for this is that we want to treat both categories
+%D alike:
+%D
+%D \starttyping
+%D \goto{go back}[PreviousJump]
+%D \goto{colofon}[colofon page]
+%D \stoptyping
+%D
+%D Here \type{PreviousJump} is handled by the viewer, while the
+%D \type{colofon page} reference is, apart from hyperlinking, a
+%D rather normal reference.
+%D
+%D We already saw that cross refences are written to and read from a file. The pure
+%D navigational ones don't need to be written to file, but both for fast processing
+%D and transparant integration, they are saved internally as a sort of reference. We
+%D can easily distinguish such system references from real cross reference ones by
+%D their tag.
+%D
+%D We also use the odd/even characteristic to determine the page state.
+
+\mutable\let\currentrealreference \empty
+\mutable\let\currentpagereference \empty
+\mutable\let\currenttextreference \empty
+\mutable\let\currentsubtextreference \empty
+\mutable\let\currentsubsubtextreference\empty
+
+\newcount\referencehastexstate % set in backend
+
+% referencepagestate:
+%
+% 0 = no page ref, 1=same page, 2=before, 3=after
+
+%D Cross references appear as numbers (figure~1.1, chapter~2) or pagenumbers
+%D (page~2, page 3--2), and are called with \type {\in} and \type {\at}. In
+%D interactive documents we also have \type {\goto}, \type {\button} and alike.
+%D These are more versatile and look like:
+%D
+%D \starttyping
+%D \goto[reference]
+%D \goto[outer reference::]
+%D \goto[outer reference::inner reference]
+%D \goto[operation(argument)]
+%D \goto[operation(action{argument,argument})]
+%D \goto[action]
+%D \goto[action{argument}]
+%D \stoptyping
+%D
+%D The first one is a normal reference, the second and third are references to a
+%D file or \URL. The brace delimited references for instance refer to a \JAVASCRIPT.
+%D The last example shows that we can pass arguments to the actions.
+%D
+%D Now we've come to the testing step. As we can see below, this macro does bit more
+%D than testing: it also resolves the reference. This means that whenever we test
+%D for the existance of a reference at an outer level, we have all the relevant
+%D properties of that reference avaliable inside the true branche~(\type {#2}).
+%D
+%D The prefix has to do with localizing references. When a prefix is set, looking
+%D for a reference comes to looking for the prefixed one, and when not found,
+%D looking for the non prefixed one. Consider for instance the prefix set to \type
+%D {sidetrack}.
+%D
+%D \starttyping
+%D \pagereference[important]
+%D \pagereference[unimportant]
+%D \setupreferencing[prefix=sidetrack]
+%D \pagereference[important]
+%D \stoptyping
+%D
+%D results in saving (writing) the references
+%D
+%D \starttyping
+%D ...{}{important}
+%D ...{}{unimportant}
+%D ...{sidetrack}{important}...
+%D \stoptyping
+%D
+%D Now when we call for \type{unimportant}, we will indeed get the pagenumber
+%D associated to this reference. But when we call for \type{important}, while the
+%D prefix is still set, we will get the pagenumber bound to the prefixed one.
+%D
+%D {\em Some day, when processing time and memory are no longer
+%D performance factors, we will introduce multi||level
+%D prefixes.}
+%D
+%D Before we start analyzing, I introduce a general definition macro. Consider:
+%D
+%D \starttyping
+%D \goto{do}[JS(My_Script{"test",123}),titlepage]
+%D \stoptyping
+%D
+%D This can also be achieved by:
+%D
+%D \starttyping
+%D \definereference[startup][JS(My_Script{"test",123}),titlepage]
+%D \goto{do}[startup]
+%D \stoptyping
+%D
+%D Now is this is a handy feature or not?
+%D
+%D \showsetup{definereference}
+%D
+%D We can trace references by setting the next switch to true.
+
+\permanent\tolerant\protected\def\definereference[#name]#spacer[#specification]%
+ {\clf_definereference{\referenceprefix}{#name}{\detokenize{#specification}}}
+
+\permanent\protected\def\resetreference[#name]%
+ {\clf_resetreference{\referenceprefix}{#name}}
+
+\permanent\def\setpagereference#name#specification% hm,. low level ?
+ {\clf_definereference{}{#name}{\v!page(\detokenize{#specification}}} % is detokenize needed here?
+
+%D Chained references are defined as:
+%D
+%D \starttyping
+%D \goto{somewhere}[JS(somescript),nextpage,JS(anotherscript)]
+%D \stoptyping
+%D
+%D Actually supporting chains is up to the special driver. Here we only provide the
+%D hooks.
+
+%D \macros
+%D {highlighthyperlinks}
+%D
+%D The next switch can be used to make user hyperlinks are not highlighted when
+%D clicked on.
+
+\newconditional\highlighthyperlinks \settrue\highlighthyperlinks
+
+%D \macros
+%D {gotonewwindow}
+%D
+%D To make the {\em goto previous jump} feature more convenient when using more than
+%D one file, it makes sense to force the viewer to open a new window for each file
+%D opened.
+
+\newconditional\gotonewwindow \setfalse\gotonewwindow
+
+\permanent\def\expandtexincurrentreference % will happen in lua some time
+ {\ifcase\referencehastexstate\else\clf_expandcurrentreference\fi}
+
+\permanent\def\expandreferenceoperation#tag#content{\clf_setreferenceoperation#tag{#content}}
+\permanent\def\expandreferencearguments#tag#content{\clf_setreferencearguments#tag{#content}}
+
+\permanent\def\doifelsereferencefound#label#yes#nop%
+ {\clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
+ {\expandtexincurrentreference
+ #yes}%
+ {#nop}}
+
+\aliased\let\doifreferencefoundelse\doifelsereferencefound
+
+%D The tester only splits the reference in components but does not look into them.
+%D The following macro does a preroll and determines for instance the current real
+%D reference pagenumber. The \type {\currentrealreference} macro does the same so
+%D unless one wants to use the pagestate the next macro seldom needs to be called.
+%D
+%D The inner case is simple. Only two cases have to be taken
+%D care of:
+%D
+%D \starttyping
+%D \goto{some text}[reference]
+%D \goto{some text}[prefix:reference]
+%D \stoptyping
+%D
+%D References to other files however are treated strict or tolerant, depending on
+%D their loading and availability:
+%D
+%D \starttyping
+%D \useexternaldocument[somefile][filename][a nice description]
+%D
+%D \goto{checked reference}[somefile::reference]
+%D \goto{unchecked reference}[somefile::]
+%D \goto{unchecked reference}[anotherfile::reference]
+%D \stoptyping
+%D
+%D An unknown reference is reported on the screen, in the log file and, when
+%D enabled, in the left margin of the text.
+
+\mutable\let\unknownreference\gobbleoneargument
+
+%D When a reference is not found, we typeset a placeholder (two glyphs are often
+%D enough to represent the reference text).
+
+% \askedreference defined in lua
+
+\mutable\def\dummyreference{{\tttf ??}}
+\mutable\def\emptyreference{{\tttf !!}}
+
+\installtextracker
+ {structures.referencing.show}
+ {\let\strc_references_dummy\strc_references_dummy_yes}
+ {\let\strc_references_dummy\strc_references_dummy_nop}
+
+\def\strc_references_dummy_nop
+ {\dummyreference}
+
+\def\strc_references_dummy_yes
+ {\dummyreference
+ \margindata
+ [\referencingparameter\c!labelalternative]% alternative?
+ [\c!style=\referencingparameter\c!labelstyle,
+ \c!color=\referencingparameter\c!labelcolor]
+ {\askedreference}}
+
+\let\strc_references_dummy\strc_references_dummy_nop
+
+\setupreferencing
+ [\c!labelalternative=\v!inleft,
+ \c!labelcolor=darkred,
+ \c!labelstyle=\smallinfofont]
+
+%D To prevent repetitive messages concerning a reference being defined, we set such
+%D an unknown reference to an empty one after the first encounter.
+%D
+%D Apart from cross references supplied by the user, \CONTEXT\ generates cross
+%D references itself. Most of them are not saved as a reference, but stored with
+%D their source, for instance a list or an index entry. Such automatically
+%D generated, for the user invisible, references are called {\em internal
+%D references}. The user supplied ones are labeled as {\em external references}.
+%D
+%D A second important characteristic is that when we want to support different
+%D backends (viewers), we need to support named destinations as well as page
+%D numbers. I invite readers to take a glance at the special driver modules to
+%D understand the fine points of this. As a result we will deal with {\em locations}
+%D as well as {\em real page numbers}. We explictly call this pagenumber a real one,
+%D because it is independant of the page numbering scheme used in the document.
+%D
+%D One of the reasons for \CONTEXT\ being the first \TEX\ base macropackage to
+%D support sophisticated interactive \PDF\ files, lays in the mere fact that real
+%D page numbers are available in most two pass data, like references, list data and
+%D index entries.
+%D
+%D We will speak of \type {thisis...} when we are marking a location, and
+%D \type {goto...} when we point to such a location. The latter one can be seen as a
+%D hyperlink to the former one. In the next macros one we use constructs like:
+%D
+%D \starttyping
+%D \dostart...
+%D \dostop...
+%D \stoptyping
+%D
+%D The flag \type {\iflocation} signals if we're in interactive mode.
+
+\ifdefined\buttonheight \else \newdimen\buttonheight \fi
+\ifdefined\buttonwidth \else \newdimen\buttonwidth \fi
+
+%D Internal references can best be set using the next few macros. Setting such
+%D references to unique values is completely up to the macros that call them.
+%D
+%D \starttyping
+%D \thisissomeinternal{tag}{identifier}
+%D \gotosomeinternal {tag}{identifier}{pagenumber}{text}
+%D \stoptyping
+%D
+%D We could do this in \LUA\ \unknown
+
+\newif \iflocation
+\newcount\locationcount
+\newcount\locationorder
+\newbox \locationbox
+
+\permanent\def\nextinternalreference {\the\locationcount}
+\permanent\def\nextinternalorderreference{\the\locationorder}
+
+\permanent\def\setnextinternalreference
+ {\global\advance\locationcount\plusone}
+
+\permanent\def\setnextinternalreferences#kind#name% plural
+ {\clf_setnextinternalreference{#kind}{#name}}
+
+\permanent\def\getinternalorderreference#kind#name%
+ {\clf_currentreferenceorder{#kind}{#name}}
+
+\permanent\def\thisissomeinternal#kind#name% only for old time sake, will go away
+ {\begingroup
+ \clf_setinternalreference
+ reference {#kind:#name}% no view
+ \relax
+ \hpack attr \destinationattribute\lastdestinationattribute{}%
+ \endgroup}
+
+\installcorenamespace{savedinternalreference}
+
+\letvalue{\??savedinternalreference\s!default}\!!zerocount
+
+\permanent\protected\def\storeinternalreference#1#2%
+ {\xdefcsname\??savedinternalreference\currentstructurename\endcsname{\number#2}}
+
+\newconditional\preferpagereferences
+
+\permanent\def\gotosomeinternal#kind#name#target#text%
+ {\ifconditional\preferpagereferences
+ \directgoto{#text}[page(#target)]%
+ \else
+ \directgoto{#text}[#kind:#name]%
+ \fi}
+
+\permanent\def\gotonextinternal#text#target%
+ {\directgoto{#text}[internal(#target)]}
+
+%D In this module we define three system references: one for handling navigational,
+%D viewer specific, commands, another for jumping to special pages, like the first
+%D or last one, and a third reference for linking tree like lists, like tables of
+%D contents. The latter two adapt themselves to the current state.
+%D
+%D An example of an action is:
+%D
+%D \starttyping
+%D \goto{some action}[PreviousJump]
+%D \stoptyping
+%D
+%D as well as:
+%D
+%D \starttyping
+%D \goto{some text}[\v!action(PreviousJump]
+%D \stoptyping
+%D
+%D One can also activate an automatic prefix mechanism. By setting the
+%D \type {\prefix} variable to \type {+}, the prefix is incremented, when set to
+%D \type {-} or empty, the prefix is reset. Other values become the prefix.
+
+\newcount\prefixcounter
+
+\newconditional\autocrossfilereferences
+
+\appendtoks
+ \edef\p_autofile{\referencingparameter\c!autofile}%
+ \ifx\p_autofile\v!yes
+ \settrue \autocrossfilereferences
+ \else
+ \setfalse\autocrossfilereferences
+ \fi
+\to \everysetupreferencing
+
+\appendtoks
+ \edef\p_export{\referencingparameter\c!export}%
+ \ifx\p_export\v!yes
+ \clf_exportreferences
+ \fi
+\to \everygoodbye
+
+\permanent\protected\def\setupglobalreferenceprefix[#prefix]%
+ {\xdef\referenceprefix{#prefix}}
+
+\permanent\protected\def\globalpushreferenceprefix#prefix%
+ {\xdef\referenceprefix{\clf_pushreferenceprefix{#prefix}}}
+
+\permanent\protected\def\globalpopreferenceprefix
+ {\xdef\referenceprefix{\clf_popreferenceprefix}}
+
+\permanent\protected\def\pushreferenceprefix#prefix%
+ {\edef\referenceprefix{\clf_pushreferenceprefix{#prefix}}}
+
+\permanent\protected\def\popreferenceprefix
+ {\edef\referenceprefix{\clf_popreferenceprefix}}
+
+\def\m_strc_references_prefix_yes{+}
+\def\m_strc_references_prefix_nop{-}
+
+\permanent\protected\def\setupreferenceprefix[#prefix]%
+ {\edef\p_prefix{#prefix}%
+ \ifempty\p_prefix
+ \let\referenceprefix\empty
+ \orelse\ifx\p_prefix\m_strc_references_prefix_yes
+ \letreferencingparameter\c!prefix\s!unknown
+ \global\advance\prefixcounter\plusone
+ \edef\referenceprefix{\the\prefixcounter}%
+ \orelse\ifx\p_prefix\m_strc_references_prefix_nop
+ \letreferencingparameter\c!prefix\s!unknown
+ \let\referenceprefix\empty
+ \orelse\ifx\p_prefix\s!unknown
+ % forget about it
+ \else
+ \let\referenceprefix\p_prefix
+ \fi}
+
+\appendtoks
+ \setupreferenceprefix[\referencingparameter\c!prefix]
+\to \everysetupreferencing
+
+%D We can typeset a reference using \type {\in}, \type {\at} and \type {\about} and
+%D goto specific locations using \type {\goto}. The last one does not make that much
+%D sense in a paper document. To complicate things, \PLAIN\ \TEX\ also implements an
+%D \type {\in} but fortunately that one only makes sense in math mode.
+%D
+%D Typesetting the reference is a bit more complicated than one would at first sight
+%D expect. This is due to the fact that we distinguish three (five) alternative
+%D calls:
+%D
+%D \placefigure
+%D [here][three calls]
+%D {Three alternatives reference calls.}
+%D {\startcombination[1*3]
+%D {\framed{\type{ \in }}} {a}
+%D {\framed{\type{ \at }}} {b}
+%D {\framed{\type{\goto}}} {c}
+%D \stopcombination}
+%D
+%D \startbuffer
+%D \in figure[fig:three calls]
+%D \in{figure}[fig:three calls]
+%D \in figure a[fig:three calls]
+%D \in{figure}{a}[fig:three calls]
+%D figure~\in[fig:three calls]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This turns up as:
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D The dual \type {{}} results in a split reference. In a document meant for paper,
+%D one is tempted to use the last (most straightforward) alternative. When a
+%D document is also meant voor electronic distribution, the former alternatives have
+%D preference, because everything between the \type {\in} and~\type {[} becomes
+%D active (and when asked for, typeset in a different color and typeface).
+
+\appendtoks
+ % likely math
+ \ifdefined\in \aliased\let\normalmathin \in \permanent\protected\def\in {\mathortext\normalmathin \strc_references_in } \else \aliased\let\in \strc_references_in \fi
+ \ifdefined\over \aliased\let\normalmathover \over \permanent\protected\def\over {\mathortext\normalmathover \strc_references_about} \else \aliased\let\over \strc_references_about \fi
+ %
+ % \ifdefined\at \aliased\let\normalmathat \at \permanent\protected\def\at {\mathortext\normalmathat \strc_references_at } \else \aliased\let\at \strc_references_at \fi
+ % \ifdefined\about \aliased\let\normalmathabout\about \permanent\protected\def\about{\mathortext\normalmathabout\strc_references_about} \else \aliased\let\about\strc_references_about \fi
+ % \ifdefined\from \aliased\let\normalmathfrom \from \permanent\protected\def\from {\mathortext\normalmathfrom \strc_references_from } \else \aliased\let\from \strc_references_from \fi
+ \aliased\let\at \strc_references_at
+ \aliased\let\about\strc_references_about
+ \aliased\let\from \strc_references_from
+\to \everydump
+
+\permanent \def\filterreference #key{\clf_filterreference{#key}} % no checking, expandable
+\permanent\protected\def\getreferenceentry#key{\clf_filterreference{#key}} % no checking, not expandable
+
+\permanent\def\currentreferencenumber {\clf_filterreference{number}}
+\permanent\def\currentreferencepage {\clf_filterreference{page}}
+\permanent\def\currentreferencetitle {\clf_filterreference{title}}
+\permanent\def\currentreferencetext {\clf_filterreference{text}}
+%permanent\def\currentreferencedefault {\clf_filterreference{default}}
+\permanent\def\currentreferencerealpage{\clf_filterreference{realpage}}
+
+%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 ...
+ {\ifarguments\or
+ \strc_references_dummy
+ \else
+ \doifelsereferencefound{#label}{\clf_filterreference{#key}}\strc_references_dummy
+ \fi}
+
+\aliased\let\ref\getreference
+
+%D Special cases:
+
+\permanent\protected\def\strc_references_about[#label]%
+ {\dontleavehmode
+ \begingroup
+ \enforced\let\crlf\space
+ \enforced\let\\\space
+ \postponenotes % might go
+ \referencingparameter\c!left
+ \doifelsereferencefound{#label}
+ {\goto{\limitatetext\currentreferencetitle{\referencingparameter\c!width}\unknown}[#label]}% not so efficient (dup lookup)
+ {}% todo
+ \flushnotes % might go
+ \referencingparameter\c!right
+ \endgroup}
+
+%D The previously discussed setup macro lets us specify the representation of
+%D references. A symbol reference does not show the specific data, like the number
+%D of a figure, but shows one of: \hbox {$^\goforwardcharacter$
+%D $^\gobackwardcharacter$ $^\gonowherecharacter$}, depending on the direction to
+%D go.
+%D
+%D \starttyping
+%D ... \somewhere{backward text}{forward text}[someref] ...
+%D ... \atpage[someref] ...
+%D \stoptyping
+
+% standard detail
+%
+% 0 = unknown unknown
+% 1 = same on same page
+% 2 = before preceding page
+% 3 = after following page
+%
+% 4 = above above on same page
+% 5 = below below on same page
+
+% todo: optimize for use in pagebody
+% todo: maybe make it optional
+
+% \setuppagenumbering[alternative=doublesided]
+% \setupreferencing [doublesided=no] % yes is default
+%
+% \somewhere{backward}{foreward}[label]
+% \someplace{preceding}{backward}{current}{foreward}{following}[label]
+% \atpage[#label]
+% \doifcheckedpagestate{label}{preceding}{backward}{current}{foreward}{following}{otherwise}
+%
+% \dorecurse {20} {
+% \placefigure[here][fig:#1]{}{\externalfigure[dummy]}
+% \dorecurse {20} {
+% ##1: \atpage[fig:##1] /
+% \doifcheckedpagestate
+% {fig:##1}
+% {preceding}{backward}{current}{foreward}{following}
+% {otherwise}
+% }
+% }
+
+\newcount \nofreferencestates
+\newconditional\pagestatespread
+
+\appendtoks
+ \doifelse{\referencingparameter\c!doublesided}\v!yes\settrue\setfalse\pagestatespread
+\to \everysetupreferencing
+
+\setupreferencing
+ [\c!doublesided=\v!yes]
+
+\permanent\def\referencepagestate
+ {\numexpr\clf_referencepagestate
+ {rst::\number\nofreferencestates}%
+ \relax}
+
+\permanent\def\referencepagedetail
+ {\numexpr\clf_referencepagedetail
+ {rst::\number\nofreferencestates}%
+ true %
+ \ifconditional\pagestatespread false\ifdoublesided true\else false\fi\fi
+ \relax}
+
+\permanent\def\referencerealpage {\clf_referencerealpage} % todo: no need for wrapping
+\permanent\def\referencecolumnnumber{\clf_referencecolumn} % todo: no need for wrapping
+
+% So we need : instead of \ but that's only lmtx:
+%
+% \def\referencecolumnnumber
+% {\numexpr\dimexpr\clf_referenceposx-\cutspace\relax:\dimexpr\makeupwidth/\nofcolumns\relax+\plusone\relax}
+%
+% Tacos patch of the older one, kept here as illustration
+%
+% \def\referencecolumnnumber
+% {\numexpr
+% \dimexpr\clf_referenceposx-\cutspace-\makeupwidth/(2*\nofcolumns)\relax
+% /\dimexpr \makeupwidth/ \nofcolumns \relax
+% +\plusone
+% \relax}
+
+
+\permanent\protected\def\tracedpagestate
+ {{\blue\tttf(\ifcase\referencepagedetail unknown\or same\or previous\or next\or above\or below\else unknown\fi)}}
+
+\permanent\protected\def\markreferencepage
+ {\dontleavehmode\begingroup
+ \iftrialtypesetting
+ % issue warning that not stable
+ \else
+ % needs checking ... but probably never in trialmode
+ \global\advance\nofreferencestates\plusone
+ \xypos{rst::\number\nofreferencestates}%
+ % \tracedpagestate
+ \fi
+ \endgroup}
+
+\permanent\protected\def\doifcheckedpagestate#label% #preceding#backward#current#foreward#following#otherwise%
+ {\doifelsereferencefound{#label}\strc_references_handle_page_state_yes\strc_references_handle_page_state_nop}
+
+\let\strc_references_handle_page_state_nop\sixthofsixarguments
+
+\def\strc_references_handle_page_state_yes
+ {\markreferencepage
+ \ifcase\referencepagedetail
+ \expandafter\sixthofsixarguments \or
+ \expandafter\thirdofsixarguments \or
+ \expandafter\firstofsixarguments \or
+ \expandafter\fifthofsixarguments \or
+ \expandafter\secondofsixarguments\or
+ \expandafter\fourthofsixarguments\else
+ \expandafter\sixthofsixarguments \fi}
+
+\permanent\protected\def\referencesymbol
+ {\hpack\bgroup
+ \strut
+ \markreferencepage
+ \high
+ {\setupsymbolset[\interactionparameter\c!symbolset]%
+ \symbol[\ifcase\referencepagedetail\v!somewhere\or\v!nowhere\or\v!previous\or\v!next\or\v!previous\or\v!next\else\v!somewhere\fi]}%
+ \egroup}
+
+%D Hereafter the \type {\ignorespaces} binds the state node to next character (more likely
+%D than a preceding one) and one can always add an explicit space.
+
+\permanent\protected\def\somewhere#backward#foreward#dummy[#label]% #dummy gobbles space around #foreward
+ {\doifcheckedpagestate{#label}%
+ {\goto{#backward}[#label]}%
+ {\goto{#backward}[#label]}%
+ {\ignorespaces}%
+ {\goto{#foreward}[#label]}%
+ {\goto{#foreward}[#label]}%
+ {#label}}%
+
+\permanent\protected\def\someplace#preceding#backward#current#foreward#following#dummy[#label]% #dummy gobbles space around #foreward
+ {\doifcheckedpagestate{#label}%
+ {\doifelsenothing{#preceding}{\goto{#preceding}[#label]}\ignorespaces}%
+ {\doifelsenothing {#backward}{\goto {#backward}[#label]}\ignorespaces}%
+ {\doifelsenothing {#current}{\goto {#current}[#label]}\ignorespaces}%
+ {\doifelsenothing {#foreward}{\goto {#foreward}[#label]}\ignorespaces}%
+ {\doifelsenothing{#following}{\goto{#following}[#label]}\ignorespaces}%
+ {#label}}
+
+\permanent\protected\def\atpage[#label]% todo
+ {\doifcheckedpagestate{#label}%
+ {\goto{\labeltext\v!precedingpage}[#label]}%
+ {\goto{\labeltext\v!hencefore}[#label]}%
+ {\ignorespaces}%
+ {\goto{\labeltext\v!hereafter}[#label]}%
+ {\goto{\labeltext\v!followingpage}[#label]}%
+ {\goto{\labeltexts\v!page\strc_references_dummy}[#label]}}
+
+% Someone requested this but in retrospect didn't need it so we keep it as example.
+% Beware: a node is injected which is why we add ignorespaces!
+%
+% \protected\def\strc_references_conditional#action#text[#condition]#dummy[#label]%
+% {\doifcheckedpagestate{#label}%
+% {\doifelse{#condition}\v!precedingpage{#action{#text}[#label]}\ignorespaces}%
+% {\doifelse{#condition}\v!hencefore {#action{#text}[#label]}\ignorespaces}%
+% {\doifelse{#condition}\v!current {#action{#text}[#label]}\ignorespaces}%
+% {\doifelse{#condition}\v!hereafter {#action{#text}[#label]}\ignorespaces}%
+% {\doifelse{#condition}\v!followingpage{#action{#text}[#label]}\ignorespaces}%
+% {#label}}
+%
+% \protected\def\conditionalat {\strc_references_conditional\at}
+% \protected\def\conditionalin {\strc_references_conditional\in}
+% \protected\def\conditionalabout{\strc_references_conditional\about}
+
+%D The other alternatives just conform their names: only the label, only the text, or the
+%D label and the text.
+
+% \dounknownreference -> \dummyreference
+
+\permanent\def\symbolreference[#label]% for old times sake
+ {\goto{\referencesymbol}[#label]}
+
+% \referencecontentmode 0=all 1=label 2=text 3=symbol
+
+\newtoks\leftreferencetoks
+\newtoks\rightreferencetoks
+\newtoks\defaultleftreferencetoks
+\newtoks\defaultrightreferencetoks
+
+\permanent\let\rightofreferencecontent\empty
+\permanent\let\leftofreference \empty
+\permanent\let\rightofreference \empty
+
+\permanent\protected\def\leftofreferencecontent
+ {\removeunwantedspaces
+ \nonbreakablespace
+ \ignorespaces}
+
+\installcorenamespace{referencinginteraction}
+
+\def\strc_references_interaction_all
+ {\the\leftreferencetoks
+ \doifelsesometoks\leftreferencetoks \leftofreferencecontent \donothing
+ \leftofreference
+ \doifelsesometoks\leftreferencetoks\onlynonbreakablespace\relax % new, replace space by nonbreakable if present
+ \currentreferencecontent
+ \rightofreference
+ \doifelsesometoks\rightreferencetoks\rightofreferencecontent\donothing
+ \the\rightreferencetoks}
+
+\letvalue{\??referencinginteraction\v!all}\strc_references_interaction_all
+
+\setvalue{\??referencinginteraction\v!label}%
+ {\leftofreference
+ \the\leftreferencetoks
+ \the\rightreferencetoks
+ \rightofreference}
+
+\setvalue{\??referencinginteraction\v!text}%
+ {\leftofreference
+ \currentreferencecontent
+ \rightofreference}
+
+\setvalue{\??referencinginteraction\v!symbol}%
+ {\referencesymbol}
+
+\permanent\def\referencesequence
+ {\ifcsname\??referencinginteraction\referencingparameter\c!interaction\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \expandafter\strc_references_interaction_all
+ \fi}
+
+\newtoks\everyresetinatreference
+
+\appendtoks
+ \enforced\glet\leftofreference \relax
+ \enforced\glet\rightofreference\relax
+\to \everyresetinatreference
+
+\def\strc_references_start_goto
+ {\dontleavehmode
+ \begingroup}
+
+\def\strc_references_stop_goto
+ {\the\everyresetinatreference
+ \endgroup}
+
+% NEEDS TESTING:
+
+\tolerant\def\strc_references_pickup_goto#=#=#:#*[#3]%
+ {\leftreferencetoks
+ \ifparameter#1\or
+ {#1}%
+ \else
+ \defaultleftreferencetoks
+ \enforced\let\leftofreferencecontent\empty
+ \fi
+ \rightreferencetoks
+ \ifparameter#2\or
+ {#2}%
+ \else
+ \defaultrightreferencetoks
+ \enforced\let\rightofreferencecontent\empty
+ \fi
+ % inefficient: double resolve
+ \doifelsereferencefound{#3} % we need to resolve the text
+ {\goto{\referencesequence}[#3]}
+ {\let\currentreferencecontent\strc_references_dummy
+ \goto{\referencesequence}[#3]}%
+ \strc_references_stop_goto}
+
+\permanent\protected\def\strc_references_in
+ {\strc_references_start_goto
+ \let\currentreferencecontent\currentreferencedefault
+ \strc_references_pickup_goto}
+
+\permanent\protected\def\strc_references_at
+ {\strc_references_start_goto
+ \let\currentreferencecontent\currentreferencepage
+ \strc_references_pickup_goto}
+
+%D \macros
+%D {definereferenceformat}
+%D
+%D The next few macros were made for for David Arnold and Taco Hoekwater. They can
+%D be used for predefining reference texts, and thereby stimulate efficiency.
+%D
+%D \starttyping
+%D \definereferenceformat[informula] [left=(,right=),text=formula]
+%D \definereferenceformat[informulas] [left=(,right=),text=formulas]
+%D \definereferenceformat[andformula] [left=(,right=),text=and]
+%D \definereferenceformat[andformulas][left=(,right=),text=and]
+%D
+%D \informula [b] and \informula [for:c]
+%D the \informula {formulas}[b] \informula {and} [for:c]
+%D the \informulas {formulas}[b] \informula {and} [for:c]
+%D the \informulas [b] \informula {en} [for:c]
+%D the \informulas [b] \andformula [for:c]
+%D \stoptyping
+%D
+%D Instead of a text, one can specify a label, which should be defined with \type
+%D {\setuplabeltext}.
+%D
+%D Watch out: the second argument is somewhat special and mostly meant for a suffix
+%D to a number:
+%D
+%D \startbuffer
+%D \definereferenceformat [intesta] [left=(,right=),text=Whatever~]
+%D \definereferenceformat [intestb] [left=(,right=),label=figure]
+%D
+%D \placeformula[x]\startformula a \stopformula
+%D
+%D \starttabulate[|||||]
+%D \NC \in [x] \NC \in {left}[x] \NC \in {}{right}[x] \NC \in {left}{right}[x] \NC \NR
+%D \NC \intesta[x] \NC \intesta{left}[x] \NC \intesta{}{right}[x] \NC \intesta{left}{right}[x] \NC \NR
+%D \NC \intestb[x] \NC \intestb{left}[x] \NC \intestb{}{right}[x] \NC \intestb{left}{right}[x] \NC \NR
+%D \stoptabulate
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+% to be done: interfaced
+
+\installcorenamespace{referenceformat}
+
+\installcommandhandler \??referenceformat {referenceformat} \??referenceformat
+
+\appendtoks
+ \setuevalue\currentreferenceformat{\strc_references_apply_format{\currentreferenceformat}}%
+\to \everydefinereferenceformat
+
+\setupreferenceformat
+ [\c!left=,
+ \c!right=,
+ \c!text=,
+ \c!label=,
+ \c!autocase=\v!no,
+ \c!style=,
+ \c!type=default, % to be done: interfaced
+ \c!setups=,
+ \c!color=]
+
+\protected\def\strc_references_apply_format#name%
+ {\strc_references_start_goto
+ \edef\currentreferenceformat{#name}%
+ \enforced\gdef\leftofreference {\referenceformatparameter\c!left }%
+ \enforced\gdef\rightofreference {\referenceformatparameter\c!right }%
+ \edef\currentreferenceformatlabel {\referenceformatparameter\c!label }%
+ \edef\currentreferenceformattype {\referenceformatparameter\c!type }%
+ \edef\currentreferenceformatsetups {\referenceformatparameter\c!setups }%
+ \edef\currentreferenceformatautocase{\referenceformatparameter\c!autocase}%
+ \usereferenceformatstyleandcolor\c!style\c!color
+ \ifempty\currentstyleparameter \else
+ \resetinteractionparameter\c!style
+ \fi
+ \ifempty\currentcolorparameter \else
+ \resetinteractionparameter\c!contrastcolor
+ \resetinteractionparameter\c!color
+ \fi
+ \ifx\currentreferenceformatlabel\wildcardsymbol
+ \edef\currentreferenceformatlabel{\autoreferencelabeltext}%
+ \fi
+ \ifx\currentreferenceformatautocase\v!yes
+ \setcharactercleaning[1]%
+ \fi
+ \ifempty\currentreferenceformatlabel
+ \defaultleftreferencetoks {\referenceformatparameter\c!text}%
+ \defaultrightreferencetoks\emptytoks
+ \else
+ \defaultleftreferencetoks {\leftlabeltext \currentreferenceformatlabel}%
+ \defaultrightreferencetoks{\rightlabeltext\currentreferenceformatlabel}%
+ \fi
+ \ifempty\currentreferenceformattype
+ \def\currentreferenceformattype{default}%
+ \fi
+ %
+ \ifempty\currentreferenceformatsetups
+ \def\currentreferencecontent{\filterreference\currentreferenceformattype}%
+ \else
+ \def\currentreferencecontent{\directsetup\currentreferenceformatsetups}%
+ \fi
+ %
+ \enforced\let\leftofreferencecontent \empty
+ \enforced\let\rightofreferencecontent\empty
+ \strc_references_pickup_goto}
+
+\permanent\protected\def\autoreferencelabeltext
+ {\clf_getcurrentreferencemetadata{name}}
+
+% \starttext
+% \definereferenceformat[inxx] [left=(,right=),text=txt]
+% \setupinteraction[state=start]
+% \chapter[one]{xx}
+% [\goto{state}[file(mk-last-state)]]
+% [\goto{state} [file(mk-last-state)]]
+% [\at{page} [one]]
+% [\at{page}[one]]
+% [\at{page}{okay}[one]]
+% [\inxx{a}{b}[one]]
+% \stoptext
+
+% \startsetups referenceformat:numberplustext
+% \filterreference{number}, \filterreference{title}
+% \stopsetups
+%
+% \definereferenceformat[hellup][text=Hellup ,setups=referenceformat:numberplustext]
+
+%D In interactive documents going to a specific location is not bound to cross
+%D references. The \type {\goto} commands can be used to let users access another
+%D part of the document. In this respect, interactive tables of contents and
+%D registers can be considered goto's. Because in fact a \type {\goto} is just a
+%D reference without reference specific data, the previous macros are implemented
+%D using the goto functionality.
+%D
+%D \showsetup{goto}
+%D
+%D One important characteristic is that the first argument of \type {\goto} (and
+%D therefore \type {\at} and \type {\in} is split at spaces. This means that,
+%D although hyphenation is prevented, long references can cross line endings.
+
+% \starttext
+% \setupinteraction[state=start]
+% [\goto{state}[file(mk-last-state)]]
+% [\goto{state} [file(mk-last-state)]]
+% \stoptext
+
+\newconditional\uselocationstrut \settrue\uselocationstrut
+
+\permanent\def\extrareferencearguments
+ {highlight \luaconditional\highlighthyperlinks\space
+ newwindow \luaconditional\gotonewwindow\space
+ layer {\currentviewerlayer}}
+
+\permanent\protected\def\directgoto
+ {\ifconditional\uselocationstrut
+ \expandafter\strc_references_direct_goto
+ \else
+ \expandafter\strc_references_direct_goto_htdp
+ \fi}
+
+\permanent\protected\def\goto
+ {\ifconditional\uselocationstrut
+ \expandafter\strc_references_goto
+ \else
+ \expandafter\strc_references_goto_htdp
+ \fi}
+
+% The unbox trick is needed in order to permit \par inside a reference. Otherwise
+% the reference attribute migrates to the outer boxes.
+
+\newcount\lastsavedreferenceattribute
+
+\newbox\referencebox
+
+\permanent\def\revivesavedreferenceattribute % sometimes handy as no test etc needed
+ {\c_attr_reference\lastsavedreferenceattribute}
+
+\def\strc_references_direct_goto#content[#label]% no test for valid references
+ {\dontleavehmode
+ \begingroup
+ \c_attr_reference\attributeunsetvalue
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \iflocation
+ \clf_injectreference
+ {\referenceprefix}%
+ {#label}%
+ {%
+ height \ht\strutbox
+ depth \dp\strutbox
+ \extrareferencearguments
+ }%
+ \relax
+ \setlocationattributes
+ \setstrut % can be option
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
+ \dostarttagged\t!link\empty % not here
+ #content%
+ \dostoptagged
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\def\strc_references_direct_goto_htdp#content[#label]% no test for valid references
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \clf_injectreference
+ {\referenceprefix}%
+ {#label}%
+ {%
+ height \dimexpr\interactionparameter\c!height\relax
+ depth \dimexpr\interactionparameter\c!depth \relax
+ \extrareferencearguments
+ }%
+ \relax
+ \setlocationattributes
+ \c_attr_reference\lastreferenceattribute
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ #content%
+ \dostoptagged
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\def\strc_references_goto#content#dummy[#label]% #dummy gobbles spaces
+ {\dontleavehmode
+ \begingroup
+ %\setbox\referencebox\hbox\bgroup % experiment, might change again to non \par support
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
+ {\expandtexincurrentreference
+ \clf_injectcurrentreferencehtdp
+ \ht\strutbox
+ \dp\strutbox
+ \relax
+ \setlocationattributes
+ \setstrut % can be option
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ #content%
+ \dostoptagged}%
+ {#content}%
+ \else
+ #content%
+ \fi
+ %\egroup\unhbox\referencebox}
+ \endgroup}
+
+\def\strc_references_goto_internal#content#dummy[#internal]% #dummy gobbles spaces
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \setstrut % can be option
+ \strc_references_get_simple_reference{#internal}%
+ \global\lastsavedreferenceattribute\currentreferenceattribute
+ \c_attr_reference\currentreferenceattribute
+ \setlocationattributes
+ \dostarttagged\t!link\empty
+ #content%
+ \dostoptagged
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\permanent\protected\def\startgoto[#label]%
+ {\dontleavehmode
+ \begingroup
+ \iflocation
+ \clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
+ {\expandafter\strc_references_start_goto_yes}%
+ {\expandafter\strc_references_start_goto_nop}%
+ \else
+ \expandafter\strc_references_start_goto_nop
+ \fi}
+
+\aliased\let\stopgoto\relax
+
+\permanent\protected\def\strc_references_start_goto_nop
+ {\enforced\let\stopgoto\strc_references_stop_goto_nop}
+
+\permanent\protected\def\strc_references_stop_goto_nop
+ {\endgroup}
+
+\protected\def\strc_references_start_goto_yes
+ {\expandtexincurrentreference
+ \clf_injectcurrentreferencehtdp
+ \ht\strutbox
+ \dp\strutbox
+ \relax
+ \setlocationattributes
+ \setstrut % can be option
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ \let\stopgoto\strc_references_stop_goto_yes}
+
+\protected\def\strc_references_stop_goto_yes
+ {\dostoptagged
+ \endgroup}
+
+\def\strc_references_goto_htdp#content#dummy[#label]% dummy gobbles spaces
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
+ {\expandtexincurrentreference
+ \clf_injectcurrentreferencehtdp
+ \dimexpr\interactionparameter\c!height\relax
+ \dimexpr\interactionparameter\c!depth \relax
+ \relax
+ \setlocationattributes
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \c_attr_reference\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ #content%
+ \dostoptagged}%
+ {#content}%
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\permanent\protected\def\directgotobox#content[#label]% no test for valid references
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \clf_injectreference
+ {\referenceprefix}%
+ {#label}%
+ {\extrareferencearguments}%
+ \relax
+ \setlocationattributes
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ \hbox attr \referenceattribute \lastreferenceattribute {#content}%
+ \dostoptagged
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\permanent\protected\def\directgotospecbox#resolver#content[#label]% no test for valid references
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \clf_injectreference
+ {\referenceprefix}%
+ {#label}%
+ {\extrareferencearguments}%
+ \relax
+ \setlocationcolorspec{#resolver}% no consequence for strut
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ \hbox attr \referenceattribute \lastreferenceattribute {#content}%
+ \dostoptagged
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\permanent\protected\def\directgotodumbbox#content[#label]% no test for valid references
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \clf_injectreference
+ {\referenceprefix}%
+ {#label}%
+ {\extrareferencearguments}%
+ \relax
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ \hbox attr \referenceattribute \lastreferenceattribute {#content}%
+ \dostoptagged
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\permanent\protected\def\gotobox#content[#label]%
+ {\dontleavehmode
+ \begingroup
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \iflocation
+ \clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
+ {\expandtexincurrentreference
+ \clf_injectcurrentreference
+ \setlocationattributes
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \dostarttagged\t!link\empty
+ \hbox attr \referenceattribute \lastreferenceattribute {#content}%
+ \dostoptagged}%
+ {#content}%
+ \else
+ #content%
+ \fi
+ \endgroup}
+
+\permanent\protected\def\gotowdhtbox#width#height[#label]% fast variant for overlays
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\emptyhbox
+ \wd\scratchbox#width%
+ \ht\scratchbox#height%
+ \global\lastsavedreferenceattribute\attributeunsetvalue
+ \c_attr_reference\attributeunsetvalue
+ \clf_doifelsereference{\referenceprefix}{#label}{\extrareferencearguments}%
+ {\clf_injectcurrentreference
+ \global\lastsavedreferenceattribute\lastreferenceattribute
+ \hpack attr \referenceattribute \lastreferenceattribute {\box\scratchbox}}
+ {\box\scratchbox}%
+ \endgroup}
+
+%D An reference to another document can be specified as a file or as an \URL. Both
+%D are handled by the same mechanism and can be issued by saying something like:
+%D
+%D \starttyping
+%D \goto[dictionary::the letter a]
+%D \stoptyping
+%D
+%D One can imagine that many references to such a dictionary are made, so in most
+%D cases such a document reference in an indirect one.
+%D
+%D \showsetup{useexternaldocument}
+%D
+%D For example:
+%D
+%D \starttyping
+%D \useexternaldocument
+%D [dictionary][engldict]
+%D [The Famous English Dictionary]
+%D \stoptyping
+%D
+%D The next macro implements these relations, and also take care of loading the
+%D document specific references.
+%D
+%D The \URL\ alternative takes four arguments:
+%D
+%D \showsetup{useURL}
+%D
+%D like:
+%D
+%D \starttyping
+%D \useURL
+%D [dictionary][http://www.publisher.com/public][engldict]
+%D [The Famous English Dictionary]
+%D \stoptyping
+%D
+%D Several specifications are possible:
+%D
+%D \starttyping
+%D \useURL [id] [url] [file] [description]
+%D \useURL [id] [url] [file]
+%D \useURL [id] [url]
+%D \stoptyping
+%D
+%D This time we don't load the references when no file is specified. This is logical
+%D when one keeps in mind that a valid \URL\ can also be a mail address.
+
+\permanent\tolerant\protected\def\useurl[#label]#spacer[#url]#spacer[#file]#spacer[#description]%
+ {\clf_useurl{#label}{\detokenize{#url}}{\detokenize{#file}}{\detokenize{#description}}}
+
+\permanent\tolerant\protected\def\usefile[#label]#spacer[#file]#spacer[#description]%
+ {\clf_usefile{#label}{\detokenize{#file}}{\detokenize{#description}}}
+
+\aliased\let\useURL \useurl
+\aliased\let\useexternaldocument\usefile
+
+\permanent\def\doifelseurldefined #label{\clf_doifelseurldefined {#label}} % todo: no wrap
+\permanent\def\doifelsefiledefined#label{\clf_doifelsefiledefined{#label}} % todo: no wrap
+
+\aliased\let\doifurldefinedelse \doifelseurldefined
+\aliased\let\doiffiledefinedelse\doifelsefiledefined
+
+%D \macros
+%D {url,setupurl}
+%D
+%D We also have: \type {\url} for directly calling the description. So we can say:
+%D
+%D \starttyping
+%D \useURL [one] [http://www.test.nl]
+%D \useURL [two] [http://www.test.nl] [] [Some Site]
+%D
+%D \url[one] or \from[two] or \goto{Whatever Site}[URL(two)]
+%D \stoptyping
+%D
+%D An \URL\ can be set up with
+%D
+%D \showsetup{setupurl}
+
+\installcorenamespace{url}
+
+\installdirectcommandhandler \??url {url}
+
+\setupurl
+ [\c!style=\v!type,
+ \c!color=]
+
+\permanent\protected\def\url[#label]% move \hyphenatedurl to lua end (is already lua)
+ {\dontleavehmode
+ \begingroup
+ \useurlstyleandcolor\c!style\c!color
+ \hyphenatedurl{\clf_geturl{#label}}%
+ \endgroup}
+
+%D This macro is hooked into a support macro, and thereby \URL's break ok, according
+%D to the setting of a switch,
+%D
+%D \startbuffer
+%D \useURL
+%D [test]
+%D [sentence_sentence~sentence//sentence:sentence.sentence]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Such an \URL\ is, depending on the settings, hyphenated as:
+%D
+%D \getbuffer
+
+%D When defining the external source of information, one can also specify a suitable
+%D name (the last argument). This name can be called upon with:
+%D
+%D \showsetup{from}
+%D
+%D We keep this for compatibility reasons, hence the hackery.
+
+\permanent\tolerant\protected\def\strc_references_from[#label]%
+ {\dontleavehmode
+ \goto{\clf_from{#label}}[fileorurl(#label)]}
+
+\permanent\def\dofromurldescription#content% called at the lua end
+ {#content}
+
+\permanent\def\dofromurlliteral#content% called at the lua end
+ {\useurlstyleandcolor\c!style\c!color
+ \hyphenatedurl{#content}}
+
+\aliased\let\dofromfiledescription\dofromurldescription
+\aliased\let\dofromfileliteral \dofromurlliteral % maybe some day setupfile that inherits from url
+
+%D We also support:
+%D
+%D \starttyping
+%D \goto{some text}[file(identifier{location}]
+%D \stoptyping
+%D
+%D which is completely equivalent with
+%D
+%D \starttyping
+%D \goto{some text}[identifier::location]
+%D \stoptyping
+
+%D A special case of references are those to programs. These, very system dependant
+%D references are implemented by abusing some of the previous macros.
+%D
+%D \showsetup{setupprograms}
+%D \showsetup{defineprogram}
+%D \showsetup{program} % changed functionality !
+%D
+%D The latter gives access to the description of the program,
+%D being the last argument to the definition command.
+
+% also lua, like urls and files
+
+\installcorenamespace{programs}
+
+\installdirectcommandhandler \??programs {programs}
+
+\permanent\tolerant\protected\def\defineprogram[#name]#spacer[#program]#spacer[#description]%
+ {\clf_defineprogram{#name}{#program}{#description}}
+
+\permanent\protected\def\program[#name]% incompatible, more consistent, hardy used anyway
+ {\dontleavehmode
+ \begingroup
+ \useprogramsstyleandcolor\c!style\c!color
+ \clf_getprogram{#name}%
+ \endgroup}
+
+%D As we can see, we directly use the special reference mechanism, which means that
+%D
+%D \starttyping
+%D \goto{some text}[program(name{args})]
+%D \stoptyping
+%D
+%D is valid.
+
+%D The next macro provides access to the actual pagenumbers. When documenting and
+%D sanitizing the original reference macros, I decided to keep the present meaning
+%D as well as to make this meaning available as a special reference method. So now
+%D one can use:
+%D
+%D \starttyping
+%D \gotopage{some text}[location]
+%D \gotopage{some text}[number]
+%D \gotopage{some text}[file::number]
+%D \stoptyping
+%D
+%D as well as:
+%D
+%D \starttyping
+%D \goto{some text}[page(location)]
+%D \goto{some text}[page(number)]
+%D \goto{some text}[file::page(number)]
+%D \stoptyping
+%D
+%D Here location is a keyword like \type{nextpage}.
+%D
+%D \showsetup{gotopage}
+
+\permanent\tolerant\protected\def\definepage[#name]#spacer[#target]%
+ {\definereference[#name][page(#target)]}
+
+\permanent\protected\def\gotopage#text[#target]%
+ {\goto{#text}[\v!page(#target)]}
+
+%D The previous definitions are somewhat obsolete so we don't use it here.
+
+%D We can cross link documents by using:
+%D
+%D \showsetup{coupledocument}
+%D
+%D like:
+%D
+%D \starttyping
+%D \coupledocument[print][somefile][chapter,section]
+%D \stoptyping
+%D
+%D After which when applicable, we have available the references:
+%D
+%D \starttyping
+%D \goto{print version}[print::chapter]
+%D \stoptyping
+%D
+%D and alike. The title placement definition macros have a key \type {file}, which
+%D is interpreted as the file to jump to, that is, when one clicks on the title.
+
+\permanent\tolerant\protected\def\coupledocument[#name]#spacer[#file]#spacer[#sections]#spacer[#description]%
+ {} % this will be done differently (when it's needed)
+
+%D \macros
+%D {dotextprefix}
+%D
+%D In previous macros we used \type {\dotextprefix} to generate a space between
+%D a label and a number.
+%D
+%D \starttyping
+%D \dotextprefix{text}
+%D \stoptyping
+%D
+%D Only when \type {text} is not empty, a space is inserted.
+
+\permanent\protected\def\dotextprefix#text%
+ {\begingroup
+ \setbox\scratchbox\hbox{#text}% to be solved some day
+ \ifdim\wd\scratchbox>\zeropoint
+ \unhbox\scratchbox
+ \edef\p_separator{\referencingparameter\c!separator}%
+ \ifempty\p_separator \else
+ \removeunwantedspaces % remove is new
+ \p_separator
+ \fi
+ \else
+ \unhbox\scratchbox
+ \fi
+ \endgroup}
+
+%D In the next settings we see some variables that were not used here and that
+%D concern the way the pagenumbers refered to are typeset.
+
+\setupreferencing
+ [\c!state=\v!start,
+ \c!autofile=\v!no,
+ \v!part\c!number=\v!yes,
+ \v!chapter\c!number=\v!no,
+ \c!interaction=\v!all,
+ \c!convertfile=\v!no,
+ %\c!strut=\v!no, % some day an option
+ \c!prefix=,
+ \c!width=.75\makeupwidth,
+ \c!left=\quotation\bgroup,
+ \c!right=\egroup,
+ \c!global=\v!no,
+ \c!expansion=\v!no,
+ \c!separator=\nonbreakablespace,
+ \c!export=\v!no]
+
+\setupprograms
+ [\c!directory=,
+ \c!style=\v!type,
+ \c!color=]
+
+\definereference [\v!CloseDocument ] [action(close)]
+\definereference [\v!ExitViewer ] [action(exit)]
+\definereference [\v!FirstPage ] [action(first)]
+\definereference [\v!LastPage ] [action(last)]
+\definereference [\v!NextJump ] [action(forward)]
+\definereference [\v!NextPage ] [action(next)]
+\definereference [\v!PauseMovie ] [action(pausemovie)]
+\definereference [\v!PauseSound ] [action(pausesound)]
+\definereference [\v!PauseRendering ] [action(pauserendering)]
+\definereference [\v!PreviousJump ] [action(backward)]
+\definereference [\v!PreviousPage ] [action(previous)]
+\definereference [\v!PrintDocument ] [action(print)]
+\definereference [\v!SaveForm ] [action(exportform)]
+\definereference [\v!LoadForm ] [action(importform)]
+\definereference [\v!ResetForm ] [action(resetform)]
+\definereference [\v!ResumeMovie ] [action(resumemovie)]
+\definereference [\v!ResumeSound ] [action(resumesound)]
+\definereference [\v!ResumeRendering ] [action(resumerendering)]
+\definereference [\v!SaveDocument ] [action(save)]
+\definereference [\v!SaveNamedDocument] [action(savenamed)]
+\definereference [\v!OpenNamedDocument] [action(opennamed)]
+\definereference [\v!SearchDocument ] [action(search)]
+\definereference [\v!SearchAgain ] [action(searchagain)]
+\definereference [\v!StartMovie ] [action(startmovie)]
+\definereference [\v!StartSound ] [action(startsound)]
+\definereference [\v!StartRendering ] [action(startrendering)]
+\definereference [\v!StopMovie ] [action(stopmovie)]
+\definereference [\v!StopSound ] [action(stopsound)]
+\definereference [\v!StopRendering ] [action(stoprendering)]
+\definereference [\v!SubmitForm ] [action(submitform)]
+\definereference [\v!ToggleViewer ] [action(toggle)]
+\definereference [\v!ViewerHelp ] [action(help)]
+\definereference [\v!HideField ] [action(hide)]
+\definereference [\v!ShowField ] [action(show)]
+\definereference [\v!GotoPage ] [action(gotopage)]
+\definereference [\v!Query ] [action(query)]
+\definereference [\v!QueryAgain ] [action(queryagain)]
+\definereference [\v!FitWidth ] [action(fitwidth)]
+\definereference [\v!FitHeight ] [action(fitheight)]
+\definereference [\v!ShowThumbs ] [action(thumbnails)]
+\definereference [\v!ShowBookmarks ] [action(bookmarks)]
+
+\definereference [\v!HideLayer ] [action(hidelayer)]
+\definereference [\v!VideLayer ] [action(videlayer)]
+\definereference [\v!ToggleLayer ] [action(togglelayer)]
+
+\definereference [\v!firstpage] [page(firstpage)]
+\definereference [\v!previouspage] [page(previouspage)]
+\definereference [\v!nextpage] [page(nextpage)]
+\definereference [\v!lastpage] [page(lastpage)]
+\definereference [\v!forward] [page(forward)]
+\definereference [\v!backward] [page(backward)]
+\definereference [\v!firstsubpage] [page(firstsubpage)]
+\definereference [\v!previoussubpage] [page(previoussubpage)]
+\definereference [\v!nextsubpage] [page(nextsubpage)]
+\definereference [\v!lastsubpage] [page(lastsubpage)]
+
+% we can do this but only when later in resolve (else problems with \chapter[first]{...}
+%
+% \definereference [\v!first] [page(firstpage)]
+% \definereference [\v!previous] [page(prevpage)]
+% \definereference [\v!next] [page(nextpage)]
+% \definereference [\v!last] [page(lastpage)]
+% \definereference [\v!first\v!sub] [page(firstsubpage)]
+% \definereference [\v!previous\v!sub] [page(prevsubpage)]
+% \definereference [\v!next\v!sub] [page(nextsubpage)]
+% \definereference [\v!last\v!sub] [page(lastsubpage)]
+
+%D We cannot set up buttons (not yet, this one calls a menu macro):
+
+%D New (and experimental):
+
+% \starttext
+% \chapter{test}
+% \placefigure[here][xx:1]{}{\framed{one}} \placefigure[here][xx:2]{}{\framed{three}}
+% \placetable [here][xx:3]{}{\framed{two}} \placetable [here][xx:4]{}{\framed{four}}
+% \start
+% \in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
+% \stop \blank \start
+% \setupreferencestructureprefix[default][prefix=no]
+% \in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
+% \stop \blank \start
+% \setupreferencestructureprefix[float][default][prefix=no]
+% \in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
+% \stop \blank \start
+% \setupreferencestructureprefix[figure][default][prefix=no]
+% \in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
+% \stop \blank
+% \stoptext
+
+% todo: parameterhandler
+
+\installcorenamespace{referencingprefix}
+
+\permanent\def\getreferencestructureprefix#kind#name#category% name will change
+ {{%
+ prefix {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefix}%
+ separatorset {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixseparatorset}%
+ conversion {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixconversion}%
+ conversionset {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixconversionset}%
+ starter {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixstarter}%
+ stopper {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixstopper}%
+ set {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixset}%
+ segments {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixsegments}%
+ connector {\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixconnector}%
+ }%
+ {%
+ separatorset {\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberseparatorset}%
+ conversion {\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberconversion}%
+ conversionset {\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberconversionset}%
+ starter {\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberstarter}%
+ stopper {\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberstopper}%
+ segments {\referencestructureprefixparameter{#kind}{#name}{#category}\c!numbersegments}%
+ }}
+
+\permanent\tolerant\protected\def\setupreferencestructureprefix[#kind]#spacer[#category]#spacer[#settings]%
+ {\ifarguments\or\or
+ \getparameters[\??referencingprefix:#kind][#category]%
+ \else
+ \getparameters[\??referencingprefix#kind:#category][#settings]%
+ \fi}
+
+\permanent\def\referencestructureprefixparameter#kind#name#category#parameter%
+ {\ifcsname\??referencingprefix#name:#category#parameter\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??referencingprefix#kind:#category#parameter\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??referencingprefix:#category#parameter\endcsname
+ \lastnamedcs
+ \fi}
+
+\permanent\def\currentreferencedefault % for some reason we need to explicitly expand
+ {\normalexpanded{\noexpand\clf_filterdefaultreference
+ {\s!default}%
+ \noexpand\getreferencestructureprefix\clf_getcurrentprefixspec{\s!default}% returns #kind#name#category
+ \relax}}
+
+%D Not all support is visible by looking at the \TEX\ code; here is one of those:^
+%D
+%D \starttyping
+%D \startinteractionmenu[right]
+%D \startbut [section(first {chapter})] first chapter \stopbut
+%D \startbut [section(previous{chapter})] previous chapter \stopbut
+%D \startbut [section(next {chapter})] next chapter \stopbut
+%D \startbut [section(last {chapter})] last chapter \stopbut
+%D \blank[2*big]
+%D \startbut [section(first {section})] first section \stopbut
+%D \startbut [section(previous{section})] previous section \stopbut
+%D \startbut [section(next {section})] next section \stopbut
+%D \startbut [section(last {section})] last section \stopbut
+%D \stopinteractionmenu
+%D \stoptyping
+
+%D Relatively new:
+%D
+%D \starttyping
+%D \chapter{The never ending story}
+%D
+%D \section{An ending story}
+%D
+%D \in{chapter}[match(complex bibliographies)]
+%D \in{chapter}[match(never ending)]
+%D \in{chapter}[match(ending)]
+%D \in{chapter}[match(chapter:never ending)]
+%D \in{chapter}[match(chapter:ending)]
+%D \in{section}[match(section:ending)]
+%D \in{figure}[match(float:mess)]
+%D \in{figure}[match(figure:mess)]
+%D \in{figure (not found)}[match(section:mess)]
+%D \in{figure (not found)}[match(section:xxxx)]
+%D \in{figure}[match(mess)]
+%D
+%D \placefigure{What a mess}{}
+%D
+%D \chapter{About complex bibliographies}
+%D
+%D \in{chapter}[match(complex bibliographies)]
+%D \in{chapter}[match(never ending)]
+%D \in{figure}[match(mess)]
+%D \stoptyping
+
+\protect \endinput
+
+% tricky:
+%
+% \enabletrackers[nodes.references]
+% \setupinteraction[state=start]
+% \def\KnuthTest{\input knuth }
+% \def\KnuthTest{\input tufte }
+% \def\TufteTest{\input tufte }
+% \defineoverlay[xxx][\overlaybutton{page(3)}]
+% \setupbackgrounds[text][background=xxx]
+% \starttext
+% test {\red \KnuthTest} test \par
+% \button{test}[page(1)] \par
+% \goto{page 2 \TeX}[page(2)] \goto{page 2 \TeX}[page(2)] \goto{\TufteTest}[page(2)] test \page
+% test \goto{page 3}[page(3)] \goto{\TufteTest\space\par\TufteTest}[page(4)] test \page
+% \goto{page 1}[page(1)] \goto{\TufteTest\space test}[page(1)] \page
+% \goto{page 1}[page(1)] \goto{\KnuthTest\space test}[page(1)] \page
+% test \goto{page 1}[page(1)] {\goto{\KnuthTest\space test}[page(1)]} test
+% \goto{page 1}[page(1)] \goto{\TufteTest}[page(1)] test \page
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl
new file mode 100644
index 00000000000..22a6614b785
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-reg.mkxl
@@ -0,0 +1,1276 @@
+%D \module
+%D [ file=strc-reg,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Registers,
+%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 Structure Macros / Registers}
+
+\registerctxluafile{strc-reg}{}
+
+\unprotect
+
+\startcontextdefinitioncode
+
+% todo: tag:: becomes rendering
+% todo: language, character, linked, location
+% todo: fonts etc at sublevels (already defined)
+
+% \starttext
+% \placeregister[index]
+% \chapter{a} \index{93} \index{456} \index{***} \index{*} \index{@}
+% test \index{aa} test \startregister[index][x]{bb} test \page test \page test \page test \stopregister[index][x]
+% test \index{aa} test \setregisterentry[index][label=x,entries=bb] test \page test \page test \page test \finishregisterentry[index][label=x]
+% test \index{aa} test \setregisterentry[index][label=y] test \page test \page test \page test \finishregisterentry[index][label=y,entries=yy]
+% \stoptext
+
+% \index {entry}
+% \index[key] {entry}
+% \index[pageclass::] {entry}
+% \index[pageclass::key]{entry}
+% \index {textclass::entry}
+% \index[key] {textclass::entry}
+% \index[pageclass::] {textclass::entry}
+% \index[pageclass::key]{textclass::entry}
+
+% nice example:
+%
+% \setupregister[index]
+% [n=1,
+% pageleft=\hfilll,
+% pageright=\frozen\parfillleftskip 0pt plus 1fill\frozen\parfillrightskip 0pt\par]
+%
+% \starttext
+%
+% {\showmakeup \placeindex \page}
+%
+% % \dorecurse{10}{\dontleavehmode \index{AAA}\page}
+% \dorecurse{100}{\dontleavehmode\index{AAA}\page}
+
+% tzt variant with n entries, parameters and userdata (altnum)
+
+\installcorenamespace{register}
+
+\installcommandhandler\??register {register} \??register
+
+\aliased\let\strc_registers_setup_saved\setupregister
+
+% maybe we should drop the plural form
+
+\let\strc_registers_setup_step\relax
+
+\permanent\tolerant\protected\overloaded\def\setupregister[#1]#*[#2]#*[#3]%
+ {\ifarguments\or
+ \strc_registers_setup_saved[#1]%
+ \or
+ \strc_registers_setup_saved[#1][#2]%
+ \or
+ \def\strc_registers_setup_step##1{\strc_registers_setup_saved[#1:##1][#3]}%
+ \processcommalist[#2]\strc_registers_setup_step
+ \fi}
+
+\permanent\tolerant\protected\def\setupregisters[#1]%
+ {\strc_registers_setup_saved[#1]\relax}
+
+\setupregister
+ [\c!n=2,
+ \c!balance=\v!yes, % \v!no komt niet zo vaak voor
+ \c!align=\v!flushleft,
+ \c!tolerance=\v!stretch,
+ \c!before=\blank,
+ %\c!after=,
+ %\c!symbol=,
+ \c!compress=\v!no,
+ \c!interaction=\v!pagenumber,
+ \c!alternative=\v!a,
+ \c!distance=\emwidth,
+ \c!style=\v!bold,
+ \c!pagestyle=\v!slanted,
+ \c!indicator=\v!yes,
+ \c!criterium=\v!all,
+ \c!check=\v!yes, % check for weird see usage
+ %\c!command=,
+ \c!referencing=\v!on,
+ \c!location=\v!middle,
+ %\c!maxwidth=,
+ \c!number=\v!no,
+ \c!unknownreference=\v!empty,
+ \c!prefix=\v!both,
+ %\c!expansion=,
+ %\c!xmlsetup=,
+ \c!pagenumber=\v!yes,
+ \c!pageprefixconnector=\endash,
+ \c!pagesegments=2:2,
+ \c!file=\jobname,
+ %\c!deeptextcommand=, % undefined by default !
+ \c!method=, % no default as we have them in the module, maybe some day in lang-*
+ \c!numberorder=\v!numbers, % \v!characters
+ \s!language=\currentmainlanguage]%
+
+% yes or no shared ?
+
+\setupregister
+ [\c!label=,
+ \c!entries=,
+ \c!alternative=]
+
+\definemixedcolumns
+ [\v!register]
+ [\c!define=\v!no,
+ \c!n=\registerparameter\c!n,
+ \c!balance=\registerparameter\c!balance,
+ \c!align=\registerparameter\c!align,
+ \c!tolerance=\registerparameter\c!tolerance]
+
+%D \starttyping
+%D \setupregister[index][1][textcolor=darkred]
+%D \setupregister[index][2][textcolor=darkgreen,textstyle=bold]
+%D
+%D \placeregister[index][n=1] \blank[3*big]
+%D
+%D test \index{test+one} test \index{test+two} more \index{more}
+%D \stoptyping
+
+\mutable\let\currentregistercharacter \empty
+\mutable\let\currentregistercoding \empty
+\mutable\let\currentregisterentries \empty
+\mutable\let\currentregisterentriesa \empty
+\mutable\let\currentregisterentriesb \empty
+\mutable\let\currentregisterentriesc \empty
+\mutable\let\currentregisterexpansion \empty
+\mutable\let\currentregisterkeys \empty
+\mutable\let\currentregisterkeysa \empty
+\mutable\let\currentregisterkeysb \empty
+\mutable\let\currentregisterkeysc \empty
+\mutable\let\currentregisterlabel \empty
+\mutable\let\currentregistermaxwidth \empty
+\mutable\let\currentregistername \empty
+\mutable\let\currentregisternumber \empty
+\mutable\let\currentregisterownnumber \empty
+\mutable\let\currentregisterpageindex \empty
+\mutable\let\currentregisterpagesymbol \empty
+\mutable\let\currentregistersectionindex\empty
+\mutable\let\currentregisterseeindex \empty
+\mutable\let\currentregisterseeword \empty
+\mutable\let\currentregistersynchronize \empty
+\mutable\let\currentregisterxmlsetup \empty
+\mutable\let\currentregisterprocessors \empty
+\mutable\let\currentregisterprocessorsa \empty
+\mutable\let\currentregisterprocessorsb \empty
+\mutable\let\currentregisterprocessorsc \empty
+
+\newconditional\c_strc_registers_defining
+\setnewconstant\c_strc_registers_maxlevel \plusfive
+
+\ifdefined\Word \else \protected\def\Word#1{#1} \fi
+
+\appendtoks
+ \ifconditional\c_strc_registers_defining \else % todo: dosingle ...
+ \settrue\c_strc_registers_defining
+ \definemixedcolumns[\currentregister][\v!register]% first as otherwise it overloads start/stop
+ \clf_defineregister{\currentregister}{\registerparameter\c!referencemethod}%
+ \normalexpanded{\presetheadtext[\currentregister=\Word{\currentregister}]}%
+ \frozen\instance\setuevalue{\currentregister}{\strc_registers_insert_entry[\currentregister]}%
+ \frozen\instance\setuevalue{\e!see\currentregister}{\strc_registers_insert_see[\currentregister]}%
+ %frozen\instance\setuevalue{\e!coupled\currentregister}{\dolinkedregister{\currentregister}}%
+ % historic ballast
+ \frozen\instance\setuevalue{\e!place\currentregister}{\placeregister[\currentregister]}%
+ \frozen\instance\setuevalue{\e!complete\currentregister}{\completeregister[\currentregister]}%
+ \frozen\instance\setuevalue{\e!setup\currentregister\e!endsetup}{\setupregister[\currentregister]}%
+ \dorecurse\c_strc_registers_maxlevel{% weird, expanded should not be needed
+ \normalexpanded{\defineregister[\currentregister:\recurselevel][\currentregister]}%
+ %\defineregister[\currentregister:\recurselevel][\currentregister]%
+ \letregisterparameter{\c!entries:\recurselevel}\empty % needed as we use detokenize (ok, we can
+ \letregisterparameter{\c!keys :\recurselevel}\empty % avoid it, but it's faster too)
+ }%
+ %
+ \setfalse\c_strc_registers_defining
+ \fi
+\to \everydefineregister
+
+\appendtoks
+ \clf_setregistermethod{\currentregister}{\registerparameter\c!referencemethod}%
+\to \everysetupregister
+
+%D Registering:
+
+\glet\currentregistername \empty
+\glet\currentregisternumber\!!zerocount
+
+\def\strc_registers_register_page_entry
+ {\iftrialtypesetting
+ \expandafter\gobblethreearguments
+ \else
+ \expandafter\strc_registers_register_page_entry_indeed
+ \fi}
+
+\def\strc_registers_register_page_expand_xml_entries
+ {\xmlstartraw
+ \xdef\currentregisterentriesa{\registerparameter{\c!entries:1}}%
+ \xdef\currentregisterentriesb{\registerparameter{\c!entries:2}}%
+ \xdef\currentregisterentriesc{\registerparameter{\c!entries:3}}%
+ \xmlstopraw
+ \glet\currentregistercoding\s!xml}
+
+\def\strc_registers_register_page_expand_yes_entries
+ {\xdef\currentregisterentriesa{\registerparameter{\c!entries:1}}%
+ \xdef\currentregisterentriesb{\registerparameter{\c!entries:2}}%
+ \xdef\currentregisterentriesc{\registerparameter{\c!entries:3}}%
+ \glet\currentregistercoding\s!tex}
+
+\def\strc_registers_register_page_expand_nop_entries
+ {\xdef\currentregisterentriesa{\detokenizedregisterparameter{\c!entries:1}}%
+ \xdef\currentregisterentriesb{\detokenizedregisterparameter{\c!entries:2}}%
+ \xdef\currentregisterentriesc{\detokenizedregisterparameter{\c!entries:3}}%
+ \glet\currentregistercoding\s!tex}
+
+\def\strc_registers_register_page_expand_xml
+ {\xmlstartraw
+ \xdef\currentregisterentries{\registerparameter\c!entries}%
+ \xmlstopraw
+ \glet\currentregistercoding\s!xml}
+
+\def\strc_registers_register_page_expand_yes
+ {\xdef\currentregisterentries{\registerparameter\c!entries}%
+ \glet\currentregistercoding\s!tex}
+
+\def\strc_registers_register_page_expand_nop
+ {\xdef\currentregisterentries{\detokenizedregisterparameter\c!entries}%
+ \glet\currentregistercoding\s!tex}
+
+\def\strc_registers_register_page_expand_xml_keys
+ {\xmlstartraw
+ \xdef\currentregisterkeysa{\registerparameter{\c!keys:1}}%
+ \xdef\currentregisterkeysb{\registerparameter{\c!keys:2}}%
+ \xdef\currentregisterkeysc{\registerparameter{\c!keys:3}}%
+ \xmlstopraw}
+
+\def\strc_registers_register_page_expand_yes_keys
+ {\xdef\currentregisterkeysa{\registerparameter{\c!keys:1}}%
+ \xdef\currentregisterkeysb{\registerparameter{\c!keys:2}}%
+ \xdef\currentregisterkeysc{\registerparameter{\c!keys:3}}}
+
+\def\strc_registers_register_page_expand_processors
+ {\xdef\currentregisterprocessorsa{\registerparameter{\c!processors:1}}%
+ \xdef\currentregisterprocessorsb{\registerparameter{\c!processors:2}}%
+ \xdef\currentregisterprocessorsc{\registerparameter{\c!processors:3}}}
+
+\def\strc_registers_register_page_entry_indeed#1#2#3% register data userdata
+ {\begingroup
+ \edef\currentregister{#1}%
+ %\setupcurrentregister[\c!entries=,\c!label=,\c!keys=,\c!alternative=,#2]%
+ \setupcurrentregister[#2]%
+ \edef\currentregisterlabel {\registerparameter\c!label}%
+ \edef\currentregisterexpansion {\registerparameter\c!expansion}%
+ \edef\currentregisterownnumber {\registerparameter\c!ownnumber}%
+ \xdef\currentregisterkeys {\registerparameter\c!keys}%
+ \xdef\currentregisterentries {\registerparameter\c!entries}%
+ \xdef\currentregisterprocessors{\registerparameter\c!processors}%
+ \xdef\currentregisterxmlsetup {\registerparameter\c!xmlsetup}%
+ \ifempty\currentregisterentries
+ \ifx\currentregisterexpansion\s!xml
+ \strc_registers_register_page_expand_xml_entries
+ \orelse\ifx\currentregisterexpansion\v!yes
+ \strc_registers_register_page_expand_yes_entries
+ \else
+ \strc_registers_register_page_expand_nop_entries
+ \fi
+ \else
+ \ifx\currentregisterexpansion\s!xml
+ \strc_registers_register_page_expand_xml
+ \orelse\ifx\currentregisterexpansion\v!yes
+ \strc_registers_register_page_expand_yes
+ \else
+ \strc_registers_register_page_expand_nop
+ \fi
+ \fi
+ \ifempty\currentregisterkeys
+ \ifx\currentregistercoding\s!xml
+ \strc_registers_register_page_expand_xml_keys
+ \else
+ \strc_registers_register_page_expand_yes_keys
+ \fi
+ \fi
+ \strc_registers_register_page_expand_processors
+ \setnextinternalreference
+ % we could consider storing register entries in a list which we
+ % could then sort
+ \glet\currentregistername\currentregister
+ \xdef\currentregisternumber{\clf_storeregister % 'own' should not be in metadata
+ metadata {%
+ name {\currentregister}%
+ coding {\currentregistercoding}%
+ \ifx\currentregisterownnumber\v!yes
+ own {\registerparameter\c!alternative}% can be used instead of pagenumber
+ \fi
+ \ifx\currentreferencecoding\s!xml
+ xmlroot {\xmldocument} % only useful when text
+ \fi
+ \ifempty\currentregisterxmlsetup \else
+ xmlsetup {\currentregisterxmlsetup}%
+ \fi
+ }%
+ references {%
+ \ifempty\currentregisterlabel \else
+ label {\currentregisterlabel}%
+ \fi
+% view {\interactionparameter\c!focus}%
+ }%
+ entries {%
+ % we need a special one for xml, this is just a single one
+ \ifempty\currentregisterentries
+ entries {
+ {\currentregisterentriesa}%
+ {\currentregisterentriesb}%
+ {\currentregisterentriesc}%
+ }
+ \else
+ entry {\currentregisterentries}%
+ \fi
+ \ifempty\currentregisterkeys
+ keys {
+ {\currentregisterkeysa}%
+ {\currentregisterkeysb}%
+ {\currentregisterkeysc}%
+ }
+ \else
+ key {\currentregisterkeys}%
+ \fi
+ \ifempty\currentregisterprocessors
+ processors {
+ {\currentregisterprocessorsa}%
+ {\currentregisterprocessorsb}%
+ {\currentregisterprocessorsc}%
+ }
+ \else
+ processor {\currentregisterprocessors}%
+ \fi
+ }%
+ userdata {\detokenize\expandafter{\normalexpanded{#3}}}
+ }%
+ \clf_setinternalreference
+ internal \locationcount
+ view {\interactionparameter\c!focus}%
+ \relax % this will change
+ \ifx\currentregisterownnumber\v!yes
+ \glet\currentregistersynchronize\relax
+ \else
+ \xdef\currentregistersynchronize{\clf_deferredenhanceregister{\currentregister}\number\currentregisternumber}%
+ \fi
+ \currentregistersynchronize % here?
+ % needs thinking ... bla\index{bla}. will break before the . but adding a
+ % penalty is also no solution
+ \dostarttagged\t!registerlocation\currentregister
+ \c_attr_destination\lastdestinationattribute
+ \signalcharacter % no \strut as it will be removed during cleanup
+ \dotagregisterlocation
+ \dostoptagged
+ \endgroup}
+
+\permanent\protected\def\dosetfastregisterentry#1#2#3#4#5% register entry key processor processor
+ {\begingroup
+ \edef\currentregister{#1}%
+ \setnextinternalreference
+ \glet\currentregistername\currentregister
+ \xdef\currentregisternumber{\clf_storeregister
+ {%
+ metadata {%
+ name {\currentregister}%
+ }
+ entries {%
+ entry {#2}%
+ key {#3}%
+ }%
+ processors {%
+ entry {#4}%
+ page {#5}%
+ }%
+ }%
+ }%
+ % overlap with the above
+ % \clf_setinternalreference
+ % internal \locationcount
+ % view {\interactionparameter\c!focus}%
+ \relax % this will change
+ \xdef\currentregistersynchronize{\clf_deferredenhanceregister{\currentregister}\number\currentregisternumber}%
+ \currentregistersynchronize % here?
+ \dostarttagged\t!registerlocation\currentregister
+ \c_attr_destination\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
+ \dotagregisterlocation
+ \dostoptagged
+ \endgroup}
+
+\aliased\let\dotagregisterlocation\relax % experiment
+
+\tolerant\protected\def\strc_registers_insert_entry[#1]#*[#2]%
+ {\def\currentregister{#1}%
+ \edef\p_ownnumber{\registerparameter\c!ownnumber}%
+ \ifx\p_ownnumber\v!yes
+ \expandafter\strc_registers_insert_entry_yes
+ \else
+ \expandafter\strc_registers_insert_entry_nop
+ \fi{#2}}
+
+% \def\strc_registers_insert_entry_nop#1#2%
+% {\doflushatpar{\strc_registers_register_page_entry\currentregister{\c!keys={#1},\c!entries={#2}}{}}}
+%
+% \def\strc_registers_insert_entry_yes#1#2#3%
+% {\doflushatpar{\strc_registers_register_page_entry\currentregister{\c!keys={#1},\c!alternative=#2,\c!entries={#3}}{}}}
+%
+% less tokens passed (nicer for tracing) .. could become installable
+
+\def\strc_registers_insert_entry_nop
+ {\ifvmode
+ \expandafter\strc_registers_insert_entry_nop_par
+ \else
+ \expandafter\strc_registers_insert_entry_nop_txt
+ \fi}
+
+\def\strc_registers_insert_entry_yes
+ {\ifvmode
+ \expandafter\strc_registers_insert_entry_yes_par
+ \else
+ \expandafter\strc_registers_insert_entry_yes_txt
+ \fi}
+
+\def\strc_registers_insert_entry_nop_par#1#2%
+ {\flushatnextpar{\strc_registers_register_page_entry\currentregister{\c!keys={#1},\c!entries={#2}}{}}}
+
+\def\strc_registers_insert_entry_yes_par#1#2#3%
+ {\flushatnextpar{\strc_registers_register_page_entry\currentregister{\c!keys={#1},\c!alternative=#2,\c!entries={#3}}{}}}
+
+\def\strc_registers_insert_entry_nop_txt#1#2%
+ {\strc_registers_register_page_entry\currentregister{\c!keys={#1},\c!entries={#2}}{}}
+
+\def\strc_registers_insert_entry_yes_txt#1#2#3%
+ {\strc_registers_register_page_entry\currentregister{\c!keys={#1},\c!alternative=#2,\c!entries={#3}}{}}
+
+%D This is one of the few commands where a stop has arguments.
+
+\permanent\tolerant\protected\def\startregister[#1]#*[#2]#*[#3]#*[#4]#*#:#5%
+ {\ifparameter#4\or
+ % #1=register #2=tag #3=own #4=sortkey #5=entry
+ \doflushatpar{\strc_registers_register_page_entry{#1}{\c!label=#2,\c!alternative=#3,\c!keys={#4},\c!entries={#5}}{}}%
+ \else
+ % #1=register #2=tag #3=sortkey #5=entry
+ \doflushatpar{\strc_registers_register_page_entry{#1}{\c!label=#2,\c!keys={#3},\c!entries={#5}}{}}%
+ \fi}
+
+\permanent\tolerant\protected\def\stopregister[#1]#*[#2]%
+ {\normalexpanded{\ctxlatecommand{extendregister("#1","#2")}}}
+
+% a synonym, so that we can nest with overlap without syntax check problems
+
+\aliased\let\openregisterrange \startregister
+\aliased\let\closeregisterrange\stopregister
+
+% not yet document, not sure if this will stay:
+
+\permanent\tolerant\protected\def\setregisterentry[#1]#*[#2]#*[#3]%
+ {\doflushatpar{\strc_registers_register_page_entry{#1}{#2}{#3}}}
+
+\permanent\tolerant\protected\def\finishregisterentry[#1]#*[#2]#*[#3]%
+ {\strc_registers_finish_entry_indeed{#1}{#2}{#3}}
+
+\def\strc_registers_finish_entry_indeed#1#2#3% register data userdata
+ {\begingroup
+ \edef\currentregister{#1}%
+ %\setupcurrentregister[\c!entries=,\c!label=,\c!keys=,\c!alternative=,#2]% todo: fast setter
+ \resetregisterparameter\c!entries
+ \resetregisterparameter\c!label
+ \resetregisterparameter\c!keys
+ \resetregisterparameter\c!alternative
+ \setupcurrentregister[#2]%
+ \edef\currentregisterlabel {\registerparameter\c!label}%
+ \edef\currentregisterexpansion{\registerparameter\c!expansion}%
+ \edef\currentregisterownnumber{\registerparameter\c!ownnumber}%
+ \xdef\currentregisterkeys {\registerparameter\c!keys}%
+ \ifx\currentregisterexpansion\s!xml
+ \xmlstartraw
+ \xdef\currentregisterentries{\registerparameter\c!entries}%
+ \xmlstopraw
+ \glet\currentregistercoding\s!xml
+ \else
+ \ifx\currentregisterexpansion\v!yes
+ \xdef\currentregisterentries{\registerparameter\c!entries}%
+ \else
+ \xdef\currentregisterentries{\detokenizedregisterparameter\c!entries}%
+ \fi
+ \glet\currentregistercoding\s!tex
+ \fi
+ % I hate this kind of mess ... but it's a user request.
+ \ifempty\currentregisterentries
+ \normalexpanded{\ctxcommand{extendregister("\currentregister","\currentregisterlabel", {
+ metadata = {
+ \ifx\currentregisterownnumber\v!yes
+ own = "\registerparameter\c!alternative", % can be used instead of pagenumber
+ \fi
+ },
+ userdata = \!!bs\detokenize{#3}\!!es
+ })%
+ }}%
+ \else
+ \normalexpanded{\ctxcommand{extendregister("\currentregister","\currentregisterlabel", {
+ metadata = {
+ % catcodes = \the\catcodetable,
+ coding = "\currentregistercoding",
+ \ifx\currentregisterownnumber\v!yes
+ own = "\registerparameter\c!alternative", % can be used instead of pagenumber
+ \fi
+ },
+ entries = {
+ % we need a special one for xml, this is just a single one
+ \!!bs\currentregisterentries\!!es,
+ \!!bs\currentregisterkeys\!!es
+ },
+ userdata = \!!bs\detokenize{#3}\!!es
+ })
+ }}%
+ \fi
+ \endgroup}
+
+% The following variants are meant for (for instance xml). There is some
+% overlap with previously defined macros.
+%
+% \starttext
+% \setstructurepageregister[index][entries=alpha]a
+% \setstructurepageregister[index][entries=gamma]g
+% \setstructurepageregister[index][entries=beta]b
+% \setstructurepageregister[index][entries:1=alpha,keys:1=z]a
+% \setstructurepageregister[index][entries:1=gamma,keys:1=x]g
+% \setstructurepageregister[index][entries:1=beta, keys:1=y]b
+% \index{alpha}a
+% \index{gamma}g
+% \index{beta}b
+% \placeregister[index][n=1]
+% \stoptext
+
+% some overlap with previous
+
+\permanent\tolerant\protected\def\setstructurepageregister[#1]#*[#2]#*[#3]% [register][settings][userdata]
+ {\doflushatpar{\strc_registers_register_page_entry{#1}{#2}{#3}}}
+
+\permanent\tolerant\protected\def\startstructurepageregister[#1]#*[#2]#*[#3]#*[#4]% [register][tag][settings][userdata]
+ {\doflushatpar{\strc_registers_register_page_entry{#1}{\c!label=#2,#3}{#4}}}
+
+\permanent\tolerant\protected\def\stopstructurepageregister[#1]#*[#2]%
+ {\normalexpanded{\ctxlatecommand{structures.registers.extend("#1","#2")}}}
+
+\aliased\let\openstructurepageregisterrange \startstructurepageregister
+\aliased\let\closestructurepageregisterrange\stopstructurepageregister
+
+% So far.
+
+\tolerant\protected\def\strc_registers_insert_see[#1]#*[#2]#*#:#3#4%
+ {\doflushatpar{\strc_registers_insert_see_indeed{#1}{#2}{#3}{#4}}}
+
+\def\strc_registers_insert_see_indeed#1#2#3#4% register key entry seeword
+ {\begingroup
+ \edef\currentregister{#1}%
+ \edef\currentregisterexpansion{\registerparameter\c!expansion}%
+ \ifx\currentregisterexpansion\s!xml
+ \xmlstartraw
+ \xdef\currentregisterentries{\detokenize{#3}}% not ok yet
+ \xdef\currentregisterseeword{\detokenize{#4}}% not ok yet
+ \xmlstopraw
+ \glet\currentregistercoding\s!xml
+ \else
+ \ifx\currentregisterexpansion\v!yes
+ \xdef\currentregisterentries{#3}% not ok yet
+ \xdef\currentregisterseeword{#4}% not ok yet
+ \else
+ \xdef\currentregisterentries{\detokenize{#3}}% not ok yet
+ \xdef\currentregisterseeword{\detokenize{#4}}% not ok yet
+ \fi
+ \glet\currentregistercoding\s!tex
+ \fi
+ \setnextinternalreference
+ % we could consider storing register entries in list
+ \edef\temp{\clf_storeregister{% \temp grabs the nofentries
+ metadata {%
+ kind {see}%
+ name {\currentregister}%
+ }%
+ references {%
+% view {\interactionparameter\c!focus}%
+ }%
+ entries {%
+ % we need a special one for xml, this is just a single one
+ entry {\currentregisterentries}%
+ key {#2}%
+ }%
+ seeword {%
+ text {\currentregisterseeword}%
+ }%
+ }}%
+ \clf_setinternalreference
+ internal \locationcount
+ view {\interactionparameter\c!focus}%
+ \relax % this will change
+ \dostarttagged\t!registerlocation\currentregister
+ \c_attr_destination\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
+ \dotagregisterlocation
+ \dostoptagged
+ \endgroup}
+
+%D Rendering:
+
+% todo: c!language ipv s!language
+
+\permanent\def\utilityregisterlength{\listlength} % also in strc-lst (downward compatible name)
+
+% \mutable\let\listlength\!!zerocount % also in strc-lst
+
+\permanent\tolerant\protected\def\determineregistercharacteristics[#1]#*[#2]%
+ {\begingroup
+ \setupregister[#1][#2]%
+ \edef\currentregister{\firstinset{#1}}%
+ \normalexpanded{\endgroup\noexpand\xdef\noexpand\listlength{\clf_analyzeregister
+ {\currentregister}%
+ {%
+ language {\registerparameter\s!language}%
+ method {\registerparameter\c!method}%
+ numberorder {\registerparameter\c!numberorder}%
+ compress {\registerparameter\c!compress}%
+ criterium {\registerparameter\c!criterium}%
+ pagenumber \ifempty\registerpageseparatorsymbol false\else true\fi
+ }%
+ }}%
+ \ifcase\utilityregisterlength\relax
+ \resetsystemmode\v!register
+ \else
+ \setsystemmode \v!register
+ \fi}
+
+\newtoks\everyplaceregister
+
+\appendtoks
+ \dontcomplain
+\to \everyplaceregister
+
+\newconditional\c_strc_registers_text_interaction
+\newconditional\c_strc_registers_page_done
+
+\permanent\tolerant\protected\def\placeregister[#1]#*[#2]%
+ {\ifarguments\else
+ \begingroup
+ %\forgetall
+ \setupregister[#1][#2]% can be a list
+ \edef\currentregister{\firstinset{#1}}%
+ \the\everyplaceregister
+ \ifnum\namedmixedcolumnsparameter\currentregister\c!n>\plusone
+ \startmixedcolumns[\currentregister]%
+ \strc_registers_place_indeed{#1}%
+ \stopmixedcolumns
+ \else
+ \strc_registers_place_indeed{#1}%
+ \fi
+ \endgroup
+ \fi}
+
+\def\strc_registers_place_indeed#1%
+ {\doifelse{\registerparameter\c!interaction}\v!text
+ \settrue\setfalse\c_strc_registers_text_interaction
+ \clf_processregister
+ {#1}%
+ {%
+ language {\registerparameter\s!language}%
+ method {\registerparameter\c!method}%
+ numberorder {\registerparameter\c!numberorder}%
+ check {\registerparameter\c!check}%
+ compress {\registerparameter\c!compress}%
+ criterium {\registerparameter\c!criterium}%
+ pagemethod {\registerparameter\c!pagemethod}%
+ pagenumber \ifempty\registerpageseparatorsymbol false\else true\fi
+ }{%
+ separatorset {\registerparameter\c!pageprefixseparatorset}%
+ conversionset {\registerparameter\c!pageprefixconversionset}%
+ starter {\registerparameter\c!pageprefixstarter}%
+ stopper {\registerparameter\c!pageprefixstopper}%
+ set {\registerparameter\c!pageprefixset}%
+ segments {\registerparameter\c!pageprefixsegments}%
+ connector {\registerparameter\c!pageprefixconnector}%
+ }{%
+ prefix {\registerparameter\c!pageprefix}%
+ separatorset {\registerparameter\c!pageseparatorset}%
+ conversionset {\registerparameter\c!pageconversionset}%
+ starter {\registerparameter\c!pagestarter}%
+ stopper {\registerparameter\c!pagestopper}%
+ segments {\registerparameter\c!pagesegments}%
+ }%
+ \relax}
+
+% \def\strc_registers_limited_entry#1%
+% {\limitatetext{#1}\currentregistermaxwidth\unknown}%
+
+\def\strc_registers_limited_entry#1%
+ {\limitated left \currentregistermaxwidth sentinel {\unknown} text {#1} freeze true\relax}
+
+\aliased\let\limitedregisterentry\firstofoneargument
+
+\appendtoks
+ \edef\currentregistermaxwidth{\registerparameter\c!maxwidth}%
+ \ifempty\currentregistermaxwidth
+ \enforced\let\limitedregisterentry\firstofoneargument
+ \else
+ \enforced\let\limitedregisterentry\strc_registers_limited_entry
+ \fi
+\to \everyplaceregister
+
+\permanent\tolerant\protected\def\completeregister[#1]#*[#2]%
+ {\ifarguments\or
+ \begingroup
+ \edef\currentregister{\firstinset{#1}}%
+ \normalexpanded{\startnamedsection[\v!chapter][\c!title={\headtext{\currentregister}},reference=\currentregister]}%
+ \placeregister[#1][#2]%
+ \page[\v!yes]%
+ \stopnamedsection
+ \endgroup
+ \fi}
+
+% test case for collapsing (experimental, for Steffen Wolfrum)
+%
+% \starttext
+% \placeregister[index][compress=no] \blank[2*big]
+% \placeregister[index][compress=yes] \blank[2*big]
+% \placeregister[index][compress=all] \page
+% \dorecurse{10}{test 1:!\index{test} test \page}
+% \dorecurse{5} {test 2:\recurselevel \page}
+% \dorecurse{10}{test 3:!\index{test} test \page}
+% \dorecurse{5} {test 4:\recurselevel \page}
+% \dorecurse{1} {test 5:!\index{test} test \page}
+% \dorecurse{5} {test 6:\recurselevel \page}
+% \dorecurse{10}{test 7:!\index{test} test \page}
+% \dorecurse{5} {test 8:\recurselevel \page}
+% oeps \index{oeps}
+% xxxx \index{xxxx}
+% todo \index{todo}
+% \stoptext
+
+%D Character rendering (sections):
+
+\installcorenamespace{registerindicator}
+
+\permanent\def\defaultregistercharacter#1%
+ {\edef\currentregistercharacter{#1}%
+ \ifempty\currentregistercharacter
+ % skip
+ \orelse\ifx\currentregistercharacter\s!unknown
+ % skip
+ \else
+ \edef\p_indicator{\registerparameter\c!indicator}%
+ \ifx\p_indicator\v!yes
+ \strc_registers_place_character_yes
+ \else
+ \strc_registers_place_character_nop
+ \fi
+ \fi}
+
+\def\strc_registers_place_character_yes
+ {\expandnamespaceparameter\??registerindicator\registerparameter\c!alternative\v!a{\currentregistercharacter}}
+
+\def\strc_registers_place_character_nop
+ {\registerparameter\c!before
+ \goodbreak}
+
+% a = <before> <goodbreak> <character> <par> <after> <nobreak>
+
+\def\strc_registers_indicator_a#1#2%
+ {\registerparameter\c!before
+ % bugged, why does leftskip gets set: \vskip\lineheight\goodbreak\vskip-\lineheight
+ \typo_injectors_check_register
+ \begingroup
+ \useregisterstyleandcolor\c!style\c!color
+ \dontleavehmode
+ \typo_injectors_mark_register
+ \strut
+ \iflocation
+ \dosetdirectpagereference{\currentregister:\v!section:#1}%
+ \fi
+ \registerparameter\c!command{#2}%
+ \endgroup
+ \blank[\v!samepage]%
+ \registerparameter\c!after
+ \par
+ \nobreak}
+
+% b = <goodbreak> <before> <character> <after> <nobreak>
+
+\def\strc_registers_indicator_b#1#2%
+ {\registerparameter\c!before
+ \typo_injectors_check_register
+ \begingroup
+ \useregisterstyleandcolor\c!style\c!color
+ \dontleavehmode
+ \typo_injectors_mark_register
+ \strut
+ \iflocation
+ \dosetdirectpagereference{\currentregister:\v!section:#1}%
+ \fi
+ \registerparameter\c!command{#2}%
+ \endgroup
+ \registerparameter\c!after
+ \nobreak}
+
+\setvalue{\??registerindicator a}#1{\strc_registers_indicator_a{#1}{#1}}
+\setvalue{\??registerindicator A}#1{\strc_registers_indicator_a{#1}{\WORD{#1}}}
+\setvalue{\??registerindicator b}#1{\strc_registers_indicator_b{#1}{#1}}
+\setvalue{\??registerindicator B}#1{\strc_registers_indicator_b{#1}{\WORD{#1}}}
+
+%D The following macros are the interface to the rendering. These are
+%D generated by \LUA. This might change.
+
+% \showinjector
+% \setinjector[register][2][\column]
+%
+% \starttext
+% first \index{first}
+% second \index{second}
+% third \index{third}
+% fourth \index{fourth}
+% \placeregister[index]
+% \stoptext
+
+\doinstallinjector\s!register
+
+%D Beware, we get funny side effects when a dangling \index precedes an
+%D placeindex as then flushing takes place inside the index. Took me hours
+%D to notice that.
+
+\newconstant\c_strc_registers_page_state % 0=nothing 1=page 2=see
+\newdimen \d_strc_registers_distance
+
+\permanent\protected\def\startregisteroutput
+ {\endgraf
+ \begingroup
+ \d_strc_registers_distance\registerparameter\c!distance\relax
+ \dostarttaggedchained\t!register\currentregister\??register
+ \forgeteverypar
+ \forgetparindent
+ \forgetparskip}
+
+\permanent\protected\def\stopregisteroutput
+ {\endgraf
+ \dostoptagged
+ \endgroup}
+
+\newdimen\d_strc_registers_hangindent
+\newcount\c_strc_registers_hangafter
+
+\permanent\protected\def\usenestedregisterstyleandcolor#1#2% will change
+ {\useregisterstyleandcolor#1#2%
+ % how about style
+ \ifconditional\c_strc_registers_text_interaction
+ \ifempty\currentcolorparameter \else
+ \resetinteractionparameter\c!color
+ \resetinteractionparameter\c!contrastcolor
+ \fi
+ \fi}
+
+\permanent\protected\def\startregisterentries#1% depth
+ {\endgraf
+ \begingroup
+ \scratchcounter\ifnum#1>\c_strc_registers_maxlevel\c_strc_registers_maxlevel\else#1\fi\relax
+ \dostarttagged\t!registerentries\empty
+% \let\savedcurrentregister\currentregister
+ \pushmacro\currentregister
+ \edef\currentregister{\currentregister:\number\scratchcounter}%
+ \usenestedregisterstyleandcolor\c!textstyle\c!textcolor
+ \ifnum\scratchcounter>\plusone
+ \advance\leftskip\d_strc_registers_distance\relax
+ \fi
+ \d_strc_registers_hangindent\registerparameter\c!distance\relax
+ \c_strc_registers_hangafter \plusone
+ \blank[\v!samepage]%
+% \let\currentregister\savedcurrentregister}
+ \popmacro\currentregister}
+
+\permanent\protected\def\stopregisterentries
+ {\endgraf
+ \dostoptagged
+ \endgroup}
+
+\permanent\protected\def\startregisterentry#1% todo: level
+ {\typo_injectors_check_register
+ \begingroup
+ \dostarttagged\t!registerentry\empty
+ \global\setconstant\c_strc_registers_page_state\zerocount
+ \hangindent\d_strc_registers_hangindent
+ \hangafter \c_strc_registers_hangafter
+ \typo_injectors_mark_register}
+
+\permanent\protected\def\stopregisterentry
+ {\endgraf
+ \global\setconstant\c_strc_registers_page_state\zerocount
+ \dostoptagged
+ \endgroup}
+
+\permanent\protected\def\startregistersection#1% title
+ {\dostarttagged\t!registersection\empty
+ \dostarttagged\t!registertag\empty
+ \registercharacter{#1}\endgraf
+ \dostoptagged}
+
+\permanent\protected\def\stopregistersection
+ {\dostoptagged
+ \endgraf}
+
+\permanent\protected\def\startregisterpages
+ {\begingroup
+ \dostarttagged\t!registerpages\empty
+ \useregisterstyleandcolor\c!pagestyle\c!pagecolor
+ \registerparameter\c!pageleft}
+
+\permanent\protected\def\stopregisterpages
+ {\registerparameter\c!pageright
+ \dostoptagged
+ \endgroup}
+
+\permanent\protected\def\startregisterseewords
+ {\begingroup
+ \dostarttagged\t!registerpage\empty
+ \useregisterstyleandcolor\c!pagestyle\c!pagecolor}
+
+\permanent\protected\def\stopregisterseewords
+ {\dostoptagged
+ \endgroup}
+
+\permanent\protected\def\registerpageseparator % todo: , configurable
+ {\ifcase\c_strc_registers_page_state
+ \hskip\d_strc_registers_distance\relax
+ \or
+ \dostarttagged\t!registerseparator\empty
+ \registerpageseparatorsymbol % page
+ \dostoptagged
+ \or
+ \dostarttagged\t!registerseparator\empty
+ \registerpageseparatorsymbol % see
+ \dostoptagged
+ \fi}
+
+\permanent\protected\def\registeronepagerangeseparator
+ {|\endash|} % todo use \prewordbreak
+
+% \protected\def\withregisterpagecommand#1#2#3#4%
+% {\def\currentregisterpageindex{#2}%
+% \iflocation
+% \goto{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[internal(#2)]%
+% \else
+% \applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}%
+% \fi}
+
+\permanent\protected\def\withregisterpagecommand#1#2#3#4%
+ {\ifcase#3\relax
+ {\tt [entry\space not\space flushed]}%
+ \else
+ \def\currentregisterpageindex{#2}%
+ \iflocation
+ \strc_references_goto_internal{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[internal(#2)]%
+ \else
+ \applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}%
+ \fi
+ \fi}
+
+\permanent\protected\def\pushcurrentregister#1%
+ {\let\m_current_register\currentregister
+ \edef\currentregister{#1}}
+
+\permanent\protected\def\popcurrentregister
+ {\let\currentregister\m_current_register}
+
+\permanent\protected\def\registeronepage#1#2#3#4#5% #1:class #2:processor content
+ {\pushcurrentregister{#1}%
+ \edef\p_pagenumber{\registerparameter\c!pagenumber}%
+ \ifx\p_pagenumber\v!no\else
+ \registerpageseparator
+ \global\setconstant\c_strc_registers_page_state\plusone
+ \dostarttagged\t!registerpage\empty
+ \withregisterpagecommand{#2}{#3}{#4}{#5}%
+ \dostoptagged
+ \fi
+ \popcurrentregister}
+
+\newconditional\c_strc_registers_following
+
+\appendtoks
+ \edef\p_compress{\registerparameter\c!compress}%
+ \ifx\p_compress\v!text
+ \settrue\c_strc_registers_following
+ \letregisterparameter\c!compress\v!yes
+ \else
+ \setfalse\c_strc_registers_following
+ \fi
+\to \everyplaceregister
+
+\permanent\protected\def\registerpagerange#1#2#3#4#5#6#7#8% #1:class #2:processor content, content todo: -- configurable
+ {\pushcurrentregister{#1}%
+ \edef\p_pagenumber{\registerparameter\c!pagenumber}%
+ \ifx\p_pagenumber\v!no\else
+ \registerpageseparator
+ \global\setconstant\c_strc_registers_page_state\plusone
+ \dostarttagged\t!registerpagerange\empty
+ \dostarttagged\t!registerfrompage\empty
+ \withregisterpagecommand{#2}{#3}{#4}{#5}%
+ \dostoptagged
+ \ifconditional\c_strc_registers_following
+ \ifnum#3=\numexpr#6-1\relax
+ \labeltext{following:\s!singular}%
+ \else
+ \labeltext{following:\s!plural}%
+ \fi
+ \else
+ \registeronepagerangeseparator
+ \dostarttagged\t!registertopage\empty
+ \withregisterpagecommand{#2}{#6}{#7}{#8}%
+ \fi
+ \dostoptagged
+ \dostoptagged
+ \fi
+ \popcurrentregister}
+
+\permanent\protected\def\defaultregisterentry#1#2#3#4#5% #1:class #2:processor #3:internal #4:seeindex #5:word
+ {\pushcurrentregister{#1}%
+ \def\currentregisterpageindex{#3}%
+ \iflocation
+ \def\currentregisterseeindex{#4}%
+ \ifconditional\c_strc_registers_text_interaction
+ \strc_references_goto_internal{\setlocationcolor\doapplyregisterentrycommand{#2}{#5}}[internal(#3)]%
+ \else
+ \doapplyregisterentrycommand{#2}{#5}%
+ \fi
+ \else
+ \let\currentregisterseeindex\empty
+ \doapplyregisterentrycommand{#2}{#5}%
+ \fi
+ \popcurrentregister}
+
+\permanent\protected\def\doapplyregisterentrycommand#1#2% processor text
+ {\dostarttagged\t!registercontent\empty
+ \ifempty\currentregisterseeindex \else
+ \dontleavehmode
+ \dosetdirectpagereference{seeindex:\currentregisterseeindex}% maybe some day we will support an area
+ \fi
+ \applyprocessor{#1}{\registerparameter\c!textcommand{\limitedregisterentry{\registerparameter\c!deeptextcommand{#2}}}}%
+ \dostoptagged}
+
+\permanent\protected\def\doapplyregisterseecommand#1#2%
+ {\ifempty\currentregisterseeindex
+ \applyprocessor{#1}{#2}%
+ \orelse\iflocation
+ \strc_references_goto_internal{\applyprocessor{#1}{#2}}[seeindex:\currentregisterseeindex]%
+ \else
+ \applyprocessor{#1}{#2}%
+ \fi}
+
+\permanent\protected\def\defaultregisterseeword#1#2#3#4#5#6#7% class i n #3:processor #4:internal #5:seeindex #6:word
+ {\pushcurrentregister{#1}%
+ \ifnum#2=\plusone
+ \registerpageseparator
+ \fi
+ \global\setconstant\c_strc_registers_page_state\plustwo
+ \def\currentregisterpageindex{#5}%
+ \dostarttagged\t!registersee\empty
+ \settrue\c_strc_registers_page_done
+ \iflocation
+ \def\currentregisterseeindex{#6}%
+ \else
+ \let\currentregisterseeindex\empty
+ \fi
+ \ifnum#2=\plusone
+ \labeltexts\v!see{\doapplyregisterseecommand{#4}{#7}}%
+ \orelse\ifnum#2=#3\relax
+ \labeltexts\v!and{\doapplyregisterseecommand{#4}{#7}}%
+ \else
+ ,\space\doapplyregisterseecommand{#4}{#7}%
+ \fi
+ \dostoptagged
+ \popcurrentregister}
+
+\permanent\protected\def\doapplyregistersectioncommand#1#2%
+ {\ifempty\currentregistersectionindex
+ \applyprocessor{#1}{#2}%
+ \orelse\iflocation
+ \strc_references_goto_internal{\applyprocessor{#1}{#2}}[sectionindex:\currentregistersectionindex]%
+ \else
+ \applyprocessor{#1}{#2}%
+ \fi}
+
+\permanent\protected\def\defaultregistersection#1#2#3#4#5#6#7% class i n #4:processor #5:internal #6:sectionindex #7:word
+ {\pushcurrentregister{#1}%
+ \ifnum#2=\plusone
+ \registerpageseparator
+ \fi
+ \global\setconstant\c_strc_registers_page_state\plustwo
+ \def\currentregisterpageindex{#5}%
+ \dostarttagged\t!registersection\empty
+ \settrue\c_strc_registers_page_done
+ \iflocation
+ \def\currentregistersectionindex{#6}%
+ \else
+ \let\currentregistersectionindex\empty
+ \fi
+ \ifnum#2=\plusone\else
+ ,\space
+ \fi
+ \doapplyregistersectioncommand{#4}{#7}%
+ \dostoptagged
+ \popcurrentregister}
+
+\aliased\let\registersection \defaultregistersection
+\aliased\let\registerseeword \defaultregisterseeword
+\aliased\let\registerentry \defaultregisterentry
+\aliased\let\registercharacter\defaultregistercharacter
+
+%D Experimental:
+%D
+%D \starttyping
+%D \setupregister
+%D [index]
+%D [pagesegments=1:4,
+%D pagemethod=section]
+%D
+%D \starttext
+%D
+%D \chapter {one} \section {alpha}
+%D
+%D x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page
+%D x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page
+%D
+%D \chapter {one} \section {alpha}
+%D
+%D x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page
+%D x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page
+%D
+%D \placeindex[n=1]
+%D
+%D \stoptext
+%D \stoptyping
+
+%D A few specific rendering variants:
+
+% \def\doregisterpagelocation#1#2%
+% {\nextregisterpage
+% \hbox to 1em{\hss\doregisterpagehowto{#1}{#2}\hss}}
+
+% todo: \installregisterpagehandler
+
+% \def\MyRegisterPageCommand#1%
+% {#1\currentregisterpageuserdata{whatever}}
+%
+% \starttext
+% \setregisterentry[index][entries=aaa][whatever=f.] test \index{bbb} test
+% \placeregister[index][n=1,pagecommand=\MyRegisterPageCommand]
+% \stoptext
+
+\permanent\def\registerpageuserdata #1#2{\clf_registeruserdata#1{#2}}
+\permanent\def\currentregisterpageuserdata {\registerpageuserdata\currentregisterpageindex} % {#1}
+
+% not yet ok : new internal handler names
+
+\aliased\let\registerpageseparatorsymbol\empty
+
+\permanent\protected\def\registerpagebuttonsymbol
+ {\vrule\s!width\emwidth\s!height\exheight\s!depth\zeropoint\relax}
+
+\installcorenamespace{registersymbol}
+
+\setvalue{\??registersymbol n}%
+ {\enforced\frozen\def\registerpageseparatorsymbol{,\space}}
+
+\setvalue{\??registersymbol a}%
+ {\enforced\frozen\def\registerpageseparatorsymbol{,\space}} % now done via conversion
+
+\setvalue{\??registersymbol\v!none}%
+ {\enforced\frozen\let\registerpageseparatorsymbol\empty
+ \enforced\frozen\let\registeronepage\gobblefivearguments
+ \enforced\frozen\let\registerpagerange\gobbleeightarguments}
+
+\setvalue{\??registersymbol 1}%
+ {\enforced\frozen\let\registerpageseparatorsymbol\space
+ \enforced\frozen\def\registeronepage{\symbol[1]\gobblefivearguments}%
+ \enforced\frozen\def\registerpagerange{\symbol[1]\gobbleeightarguments}}
+
+\setvalue{\??registersymbol 2}%
+ {\enforced\frozen\let\registerpageseparatorsymbol\space
+ \enforced\frozen\def\registeronepage{\registerpagebuttonsymbol\gobblefivearguments}%
+ \enforced\frozen\def\registerpagerange{\registerpagebuttonsymbol\gobbleeightarguments}}
+
+\protected\def\strc_registers_set_page_rendering
+ {\doifelse{\registerparameter\c!pagenumber}\v!no
+ {\enforced\frozen\let \currentregisterpagesymbol\v!none}
+ {\enforced\frozen\edef\currentregisterpagesymbol{\registerparameter\c!symbol}}%
+ \ifempty\currentregisterpagesymbol
+ \csname\??registersymbol n\endcsname
+ \orelse\ifcsname\??registersymbol\currentregisterpagesymbol\endcsname
+ \csname\??registersymbol\currentregisterpagesymbol\endcsname
+ \else
+ \enforced\frozen\let\registerpageseparatorsymbol\space
+ \enforced\frozen\def\registeronepage{\registerparameter\c!symbol\gobblefivearguments}%
+ \enforced\frozen\def\registerpagerange{\registerparameter\c!symbol\gobbleeightarguments}%
+ \fi}
+
+\appendtoks
+ \strc_registers_set_page_rendering
+\to \everyplaceregister
+
+%D The linked register code will be reimplemented (not that hard) when it's needed
+%D again and/or when I'm bored.
+
+\permanent \def\findregisterinternal#1#2#3{\clf_findregisterinternal{#1}{#2}#3\relax}
+\permanent\protected\def\pageofinternal #1{\clf_pageofinternal#1\relax}
+
+\permanent\protected\def\linkedregisterentrylink#1#2#3#4% tag where before after
+ {\iflocation
+ \scratchcounter\findregisterinternal{#1}{#2}\currentregisternumber\relax\relax
+ \ifcase\scratchcounter\else
+ #3\relax
+ \goto{\symbol[#2]}[internal(\the\scratchcounter)]%
+ #4\relax
+ \fi
+ \else
+ % \scratchcounter\findregisterinternal{#1}{#2}\currentregisternumber\relax\relax
+ % \ifcase\scratchcounter\else
+ % #3\relax
+ % \pageofinternal\scratchcounter
+ % #4\relax
+ % \fi
+ \fi}
+
+\permanent\protected\def\linkedregisterentry#1%
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\hbox{#1}%
+ \linkedregisterentrylink\currentregistername\v!previous\relax\nobreakspace
+ \unhbox\scratchbox
+ \linkedregisterentrylink\currentregistername\v!next\nobreakspace\relax
+ \endgroup}
+
+\permanent\protected\def\registerpacked#1#2%
+ {\iflocation
+ \hskip\d_strc_registers_distance\relax
+ \nobreak
+ \ifnum#1=#2\relax
+ \goto{\symbol[\v!somewhere]}[internal(#1)]%
+ \else
+ \goto{\symbol[\v!first]}[internal(#1)]%
+ \nobreakspace
+ \goto{\symbol[\v!last]}[internal(#2)]%
+ \fi
+ \fi}
+
+%D Default index:
+
+\defineregister
+ [\v!index]
+% [\v!indices]
+
+\stopcontextdefinitioncode
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-ren.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-ren.mkxl
new file mode 100644
index 00000000000..774f6f64049
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-ren.mkxl
@@ -0,0 +1,820 @@
+%D \module
+%D [ file=strc-ren,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Section Rendering,
+%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 Structure Macros / Section Rendering}
+
+\unprotect
+
+\newbox\b_strc_rendering_head
+
+\newdimen\d_strc_rendering_local_leftoffset
+\newdimen\d_strc_rendering_local_rightoffset
+
+% Martin Kolarik's problem:
+%
+% \setuphead[section][command=\doTitle]
+% \def\doTitle#1#2{\ruledvbox{\forgetall \hsize=4cm \ruledhbox{\ruledvtop{#1}\ruledvtop{#2}}}}
+% \section{test test test test test test test test test test test test test test test test test}
+
+% \newtoks\everyheadstart % not used currently
+
+\protected\def\strc_rendering_initialize_style_and_color
+ {\ifconditional\headisdisplay
+ \expandafter\strc_rendering_initialize_style_and_color_display
+ \else
+ \expandafter\strc_rendering_initialize_style_and_color_inline
+ \fi}
+
+\protected\def\strc_rendering_initialize_style_and_color_display#1#2%
+ {\dontconvertfont
+ \edef\p_strc_rendering_interlinespace{\headparameter\c!interlinespace}%
+ \ifempty\p_strc_rendering_interlinespace
+ % here the interline space is only set when style sets no space
+ \setfalse\fontattributeisset % use the currentfontparameter state instead
+ \setfalse\interlinespaceisset
+ \useheadstyleandcolor\c!style\c!color\relax
+ \ifconditional\fontattributeisset \ifconditional\interlinespaceisset \else
+ \setupinterlinespace
+ \fi \fi
+ \setfalse\fontattributeisset
+ \useheadstyleandcolor#1#2\relax
+ \ifconditional\fontattributeisset \ifconditional\interlinespaceisset \else
+ \setupinterlinespace
+ \fi \fi
+ \else
+ % here the set interline space overloads any other set space in the style
+ \setfalse\fontattributeisset
+ \useheadstyleandcolor\c!style\c!color\relax
+ \ifconditional\fontattributeisset
+ \dosetupcheckedinterlinespace\p_strc_rendering_interlinespace
+ \fi
+ \setfalse\fontattributeisset
+ \useheadstyleandcolor#1#2\relax
+ \ifconditional\fontattributeisset
+ \dosetupcheckedinterlinespace\p_strc_rendering_interlinespace
+ \fi
+ \fi}
+
+\protected\def\strc_rendering_initialize_style_and_color_inline#1#2%
+ {\dontconvertfont
+ \setfalse\fontattributeisset
+ \useheadstyleandcolor\c!style\c!color\relax
+ \ifconditional\fontattributeisset
+ \updateraggedskips % \setupspacing
+ \fi
+ \setfalse\fontattributeisset
+ \useheadstyleandcolor#1#2\relax
+ \ifconditional\fontattributeisset
+ \updateraggedskips % \setupspacing
+ \fi}
+
+\let\currentstructurereferenceattribute\attributeunsetvalue
+
+\permanent\def\headreferenceattributes
+ {\iflocation
+ % \ctxlua{structures.lists.taglocation(\the\locationcount)}% maybe ... tags entry as used
+ attr \destinationattribute \currentstructureattribute
+ attr \referenceattribute \currentstructurereferenceattribute
+ % attr \internalattribute \locationcount
+ \fi}
+
+\permanent\def\setinlineheadreferenceattributes
+ {\ifconditional\headisdisplay\orelse\iflocation
+ \c_attr_destination\currentstructureattribute
+ \c_attr_reference \currentstructurereferenceattribute
+ % \c_attr_internal \locationcount
+ \fi}
+
+\permanent\protected\def\docheckheadreference
+ {\edef\currentheadinteraction{\headparameter\c!interaction}%
+ \ifx\currentheadinteraction\v!list
+ % setuphead[<section>][interaction=list,...]
+ \strc_references_get_simple_reference{*\the\locationcount}%
+ \let\currentstructurereferenceattribute\currentreferenceattribute
+ \orelse\ifx\currentheadinteraction\v!reference
+ % setuphead[<section>][interaction=reference,...] start<section>[backreference=abc,...]
+ \edef\currentheadbackreference{\structurevariable\c!backreference}% weird, was references.backreference
+ \ifempty\currentheadbackreference \else
+ \strc_references_get_simple_reference\currentheadbackreference
+ \let\currentstructurereferenceattribute\currentreferenceattribute
+ \fi
+ \else
+ % maybe auto: backreference when given, else list
+ \fi}
+
+% a bit messy ... empty in place instead of self .. might change (or use special
+% whatsig (invisible user one)
+
+\protected\def\strc_rendering_place_head_text
+ {\strc_rendering_start_placement
+ \setheadmarking
+ \strc_sectioning_reset_head_number_content
+ \ifconditional\c_strc_sectioning_empty
+ \setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}%
+ \else
+ \docheckheadreference
+ \setbox\b_strc_rendering_head\hbox \headreferenceattributes
+ {\spac_grids_set_local_snapping{\headparameter\c!internalgrid}%
+ \strc_sectioning_reset_head_number_content
+ \useheadstyleparameter\c!style
+ \setinlineheadreferenceattributes
+ \strc_rendering_inject_text}%
+ \fi
+ \strc_rendering_stop_placement}
+
+\protected\def\strc_rendering_place_head_number_and_text
+ {\strc_rendering_start_placement
+ \setheadmarking
+ \doifelsetext\getheadnumber
+ \strc_sectioning_set_head_number_content
+ \strc_sectioning_reset_head_number_content
+ \ifconditional\c_strc_sectioning_empty
+ \setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}%
+ \else % = needed
+ \docheckheadreference
+ \setbox\b_strc_rendering_head\hbox \headreferenceattributes
+ {\spac_grids_set_local_snapping{\headparameter\c!internalgrid}%
+ \useheadstyleparameter\c!style
+ \setinlineheadreferenceattributes
+ \strc_rendering_inject_number_and_text}%
+ \fi
+ \strc_rendering_stop_placement}
+
+\protected\def\strc_rendering_place_head_empty
+ {\hpack\headreferenceattributes{\getheadsyncs}}
+
+%D \starttyping
+%D \def\StretchedBox#1%
+%D {\framed
+%D [frame=off,offset=.5em,align=middle,width=broad]
+%D {\sc\def\stretchedspaceamount{.3em}\stretchednormalcase{#1}}}
+%D
+%D \definehead[MySubject][subject]
+%D \setuphead [MySubject][deeptextcommand=\StretchedBox]
+%D
+%D \MySubject{feeling stretched feeling stretched feeling stretched feeling stretched}
+%D \stoptyping
+
+% helpers
+
+\permanent\protected\def\headhbox{\hbox\headreferenceattributes}
+\permanent\protected\def\headvbox{\vbox\headreferenceattributes}
+
+\permanent\protected\def\startlocalheadsetup{\bgroup\strc_rendering_initialize_spacing}
+\permanent\protected\def\stoplocalheadsetup {\egroup}
+
+\aliased\let\headsetupspacing\relax
+\aliased\let\localheadsetup \relax
+
+\permanent\protected\def\strc_rendering_initialize_spacing
+ {\forgetall % local !
+ \edef\p_align{\headparameter\c!align}%
+ \ifempty\p_align \else
+ \setupalign[\p_align]%
+ \fi
+ \edef\p_tolerance{\headparameter\c!tolerance}%
+ \ifempty\p_tolerance \else
+ \setuptolerance[\p_tolerance]%
+ \fi
+ \edef\p_strut{\headparameter\c!strut}%
+ \ifx\p_strut\v!no
+ \setnostrut
+ \fi
+ \enforced\let\\\strc_rendering_shortcut_backslash}
+
+\protected\def\strc_rendering_shortcut_backslash
+ {\crlf
+ \strut
+ \ignorespaces}
+
+\def\strc_rendering_start_placement
+ {\bgroup
+ \setsystemmode\currenthead
+ \strc_rendering_initialize_alternatives
+ \strc_rendering_initialize_dimensions
+ \strc_rendering_initialize_line_state
+ \reseteverypar % needed indeed
+ \noindent % ipv \whitespace elders, na \forgetall !
+ \bgroup
+ \synctexpushline
+ \edef\p_aligntitle{\headparameter\c!aligntitle}%
+ \ifx\p_aligntitle\v!yes
+ \strc_rendering_initialize_hsize_local
+ \orelse\ifx\p_aligntitle\v!float
+ \strc_rendering_initialize_hsize_local
+ \else
+ \strc_rendering_initialize_hsize_global
+ \fi
+ \setfalse\inhibitmargindata % brrrr is set in forgetall
+ \dontcomplain
+ \postponenotes
+ \strc_rendering_initialize_interaction
+ % delayed:
+ \enforced\let\localheadsetup \strc_rendering_initialize_spacing % historic name, kept around because some styles use it
+ \enforced\let\headsetupspacing\strc_rendering_initialize_spacing} % official name
+
+\def\strc_rendering_initialize_interaction
+ {\resetinteractionparameter\c!style
+ \resetinteractionparameter\c!color
+ \resetinteractionparameter\c!contrastcolor}
+
+% \setuphead[chapter] [style=\bfd,after=,hang=line] % fit broad 2
+% \setuphead[section] [style=\bfc,after=,hang=line]
+% \setuphead[subsection] [style=\bfb,after=,hang=line]
+% \setuphead[subsubsection] [style=\bfa,after=,hang=line]
+% \setuphead[subsubsubsection][style=\bf ,after=,hang=line]
+%
+% \chapter {Test} \input tufte \page
+% \section {Test} \input tufte \page
+% \subsection {Test} \input tufte \page
+% \subsubsection {Test} \input tufte \page
+% \subsubsubsection{Test} \input tufte \page
+%
+% \chapter {Test\\Test} \input tufte \page
+% \section {Test\\Test} \input tufte \page
+% \subsection {Test\\Test} \input tufte \page
+% \subsubsection {Test\\Test} \input tufte \page
+% \subsubsubsection{Test\\Test} \input tufte \page
+
+\newdimen\d_strc_rendering_hang_height
+\newcount\n_strc_rendering_hang_lines
+
+\newdimen\d_strc_rendering_local_height
+\newdimen\d_strc_rendering_local_depth
+\newdimen\d_strc_rendering_local_lineheight
+
+\def\strc_rendering_initialize_line_state
+ {\global\d_strc_rendering_local_height\strutht
+ \global\d_strc_rendering_local_depth\strutdp
+ \global\d_strc_rendering_local_lineheight\lineheight}
+
+\def\strc_rendering_check_hang
+ {\begingroup
+ \openlineheight\d_strc_rendering_local_lineheight
+ \d_strc_rendering_hang_height\htdp\b_strc_rendering_head
+ \getnoflines\d_strc_rendering_hang_height
+ \normalexpanded{\endgroup\n_strc_rendering_hang_lines\the\numexpr\noflines-\plusone\relax}% brrr
+ \setbox\b_strc_rendering_head\hpack{\lower\n_strc_rendering_hang_lines\d_strc_rendering_hang_height\box\b_strc_rendering_head}%
+ \d_strc_rendering_hang_height\dimexpr\htdp\b_strc_rendering_head-\d_strc_rendering_local_height+\strutdp\relax
+ \ht\b_strc_rendering_head\strutht
+ \dp\b_strc_rendering_head\strutdp
+ \d_strc_rendering_local_depth\strutdp}
+
+\installcorenamespace{headplacementcheckhang}
+
+\setvalue{\??headplacementcheckhang\v!line }{\strc_rendering_check_hang
+ \n_strc_rendering_hang_lines\zerocount}
+\setvalue{\??headplacementcheckhang\v!broad }{\strc_rendering_check_hang
+ \getnoflines\d_strc_rendering_hang_height}
+\setvalue{\??headplacementcheckhang\v!fit }{\strc_rendering_check_hang
+ \getrawnoflines\d_strc_rendering_hang_height}
+\setvalue{\??headplacementcheckhang\v!none }{\n_strc_rendering_hang_lines\zerocount}
+\setvalue{\??headplacementcheckhang }{\n_strc_rendering_hang_lines\zerocount}
+\setvalue{\??headplacementcheckhang\s!unknown}{\strc_rendering_check_hang
+ \n_strc_rendering_hang_lines\numexpr\headparameter\c!hang-\plusone\relax}
+
+\def\strc_rendering_initialize_line_hang
+ {\ifconditional\headisdisplay
+ \expandnamespaceparameter\??headplacementcheckhang\headparameter\c!hang\s!unknown
+ \relax
+ \else
+ \n_strc_rendering_hang_lines \zerocount
+ \d_strc_rendering_hang_height\zeropoint
+ \fi}
+
+\def\strc_rendering_initialize_hsize_local
+ {\global\d_strc_rendering_local_leftoffset \leftskip
+ \global\d_strc_rendering_local_rightoffset\rightskip
+ % \forgetall
+ % \leftskip \d_strc_rendering_local_leftoffset % no stretch
+ % \rightskip\d_strc_rendering_local_rightoffset % no stretch
+ % \setlocalhsize
+ % \hsize\localhsize
+ % \forgetbothskips}
+ \scratchwidth\availablehsize
+ \forgetall
+ \hsize\scratchwidth}
+
+\def\strc_rendering_initialize_hsize_global
+ {\global\d_strc_rendering_local_leftoffset \zeropoint
+ \global\d_strc_rendering_local_rightoffset\zeropoint
+ \forgetall}
+
+% \def\strc_sectioning_stay_on_this_line
+% {\directcheckedvspacing{-\v!line,\v!samepage,\v!nowhite}%
+% \directcheckedvspacing\v!disable}
+%
+% we now use \ignoreparskip, so:
+
+\def\strc_sectioning_stay_on_this_line
+ {\directcheckedvspacing{-\v!line,\v!samepage}%
+ \directcheckedvspacing\v!disable}
+
+\def\strc_rendering_stop_placement
+ {\n_strc_rendering_hang_lines\zerocount
+ \ifconditional\headisdisplay
+ \strc_rendering_initialize_line_hang
+ % kind of special, we want to snap heads also according to local specs local
+ \setbox\b_strc_rendering_head\hbox
+ {\hskip\dimexpr\d_strc_rendering_local_leftoffset+\headparameter\c!margin\relax
+ \box\b_strc_rendering_head
+ \getheadsyncs % a latelua why not in the box
+ }%
+ \ifgridsnapping
+ \applygridmethod
+ {\headparameter\c!grid}%
+ {\ifconditional\headisdisplay
+ \strc_rendering_initialize_style_and_color_display\c!textstyle\c!textcolor
+ \fi}%
+ {\box\b_strc_rendering_head}
+ \else
+ \box\b_strc_rendering_head
+ \fi
+ \flushnotes % new, not really needed
+ \endgraf
+ \ifvmode
+ \ifnum\n_strc_rendering_hang_lines>\zerocount
+ \dorecurse\n_strc_rendering_hang_lines{\nointerlineskip\dosomebreak\nobreak\strut\endgraf}% to be checked
+ \fi
+ \nointerlineskip
+ \dosomebreak\nobreak
+ \fi
+% \getheadsyncs % a latelua why not in the box
+ \else
+ % somehow this goes ok even when we push in the margin probably because we gobble pars
+ % in the process of collecting index entries etc
+ \strut
+ \flushnotes % new, here since we're in par mode
+ \unhbox\b_strc_rendering_head
+ \getheadsyncs % a latelua
+ \ifconditional\headissomewhere
+ \strc_sectioning_stay_on_this_line % test case: alternative=margintext and \startparagraph ..
+ \else
+ %\hskip\headnumberdistance\s!plus\headnumberdistance\s!minus.25\dimexpr\headnumberdistance\relax
+ \hskip\headtextdistance\relax
+ \strc_sectioning_inject_continuous_signal
+ \fi
+ \fi
+ \ifconditional\headisdisplay
+ \ifvmode
+ \ifgridsnapping % important, font related depth, see comment
+ \prevdepth\strutdp
+ \else
+ \prevdepth\d_strc_rendering_local_depth
+ \fi
+ \fi
+ \fi
+ \synctexpopline
+ \egroup
+ \egroup
+ \ifconditional\headisdisplay
+ \useindentnextparameter\headparameter
+ \orelse\ifconditional\headissomewhere
+ \ignoreparskip
+ \noindentation
+ \else
+ \ignoreparskip
+ \fi}
+
+% nice testcase
+%
+% \setupheads[aligntitle=yes]
+%
+% \startnarrower
+% \subject{\dorecurse{100}{x }}
+% \section{\dorecurse{100}{x }}
+% \input tufte \par
+% \setupheads[alternative=inmargin]
+% \subject{\dorecurse{100}{x }}
+% \section{\dorecurse{100}{x }}
+% \input tufte \par
+% \stopnarrower
+
+% \dodefineheadplacement[sectiona][vertical]{#1->#2}
+% \dodefineheadplacement[sectionb][vertical]#1#2{#1->#2}
+%
+% \setuphead[section][alternative=sectiona]
+% \setuphead[subsection][alternative=sectionb]
+
+% \startsetups[\??headrenderings:\v!vertical:\v!sectiona]
+% ... there will be a more public namespace
+% \stopsetups
+
+\installcorenamespace{headplacementalternative}
+\installcorenamespace{headrenderings}
+\installcorenamespace{headalternative}
+
+\installcommandhandler \??headalternative {headalternative} \??headalternative % or just \??head
+
+\setupheadalternative
+ [%\c!width=\headparameter\c!width,
+ %\c!distance=\headparameter\c!distance,
+ \c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\currentheadalternative]
+
+\let\currentheadalternative \v!normal
+\let\currentheadrenderingsetup \empty
+\let\currentheadrenderingalternative\v!vertical
+
+\permanent\tolerant\protected\def\defineheadplacement[#1]#*[#2]%
+ {\doifelsenextbgroup
+ {\strc_rendering_define_placement_yes[#1][#2]}%
+ {\strc_rendering_define_placement_nop[#1][#2]}}
+
+\def\strc_rendering_define_placement_yes[#1][#2]%
+ {\defineheadalternative[#1][\c!alternative=#2,\c!renderingsetup=\??headrenderings:\v!command]%
+ \setuvalue{\??headplacementalternative#1}##1##2}
+
+\def\strc_rendering_define_placement_nop[#1][#2]%
+ {\defineheadalternative[#1][\c!alternative=#2,\c!renderingsetup=\??headrenderings:\v!command]%
+ \setuvalue{\??headplacementalternative#1}}
+
+% these can be used in setups:
+%
+% \headnumbercontent
+% \headtextcontent
+%
+% \headwidth
+% \headtextwidth
+% \headnumberdistance
+% \headnumberwidth
+% \headsetupspacing
+%
+% \headshownumber
+% \headisdisplay
+
+\let\headnumbercontent\empty
+\let\headtextcontent \empty
+
+\newdimen\headwidth
+\newdimen\headtextwidth
+\newskip \headtextdistance
+\newdimen\headnumberdistance
+\newdimen\headnumberwidth
+
+% \newconditional\headshownumber % defined already
+% \newconditional\headisdisplay % defined already
+
+\protected\def\strc_rendering_initialize_alternatives
+ {\edef\currentheadalternative{\headparameter\c!alternative}%
+ \ifcsname\currentheadalternativehash\s!parent\endcsname \else
+ \let\currentheadalternative\v!normal % cf. mkii
+ \fi
+ \edef\currentheadrenderingsetup{\headalternativeparameter\c!renderingsetup}%
+ \edef\currentheadrenderingalternative{\headalternativeparameter\c!alternative}%
+ \ifempty\currentheadrenderingalternative
+ \let\currentheadrenderingalternative\v!vertical
+ \fi
+ \ifx\currentheadrenderingalternative\v!horizontal
+ \global\setfalse\headisdisplay % global
+ \global\setfalse\headissomewhere % global
+ \orelse\ifx\currentheadrenderingalternative\v!somewhere
+ \global\setfalse\headisdisplay % global
+ \global\settrue \headissomewhere % global
+ \else
+ \global\settrue \headisdisplay % global
+ \global\setfalse\headissomewhere % global
+ \fi}
+
+\protected\def\strc_rendering_initialize_dimensions
+ {\headwidth \headparameter\c!width \relax % \zeropoint == unset
+ \headnumberwidth \headparameter\c!numberwidth \relax % \zeropoint == unset
+ \headnumberdistance\headparameter\c!distance \relax
+ \headtextdistance \headparameter\c!textdistance\relax
+ \headtextwidth \headparameter\c!textwidth \relax} % \zeropoint == unset
+
+\permanent\protected\def\headtextcontent
+ {\begingroup
+ \strc_rendering_initialize_style_and_color\c!textstyle\c!textcolor
+ \headparameter\c!commandbefore\relax
+ \ifcsname\currentheadhash\c!deeptextcommand\endcsname
+ %\expandafter\let\expandafter\deepstructuretitlecommand\csname\currentheadhash\c!deeptextcommand\endcsname
+ \expandafter\let\expandafter\deepstructuretitlecommand\lastnamedcs
+ \fi
+ \ifconditional\headisdisplay
+ % struts can be nilled with \setnostrut
+ \headparameter\c!textcommand{\setstrut\begstrut\getheadtitle\endstrut}%
+ \global\d_strc_rendering_local_height\strutht
+ \global\d_strc_rendering_local_depth\strutdp
+ \global\d_strc_rendering_local_lineheight\lineheight
+ \headparameter\c!commandafter\relax
+ \endgraf
+ \else
+ \headparameter\c!textcommand{\getheadtitle}%
+ \headparameter\c!commandafter\relax
+ \fi
+ \endgroup}
+
+\permanent\protected\def\headnumbercontent
+ {\begingroup
+ \strc_rendering_initialize_style_and_color\c!numberstyle\c!numbercolor
+ \ifcsname\currentheadhash\c!deepnumbercommand\endcsname
+ %\expandafter\let\expandafter\deepstructurenumbercommand\csname\currentheadhash\c!deepnumbercommand\endcsname
+ \expandafter\let\expandafter\deepstructurenumbercommand\lastnamedcs
+ \fi
+ \ifconditional\headisdisplay
+ % can be nilled with \setnostrut
+ \headparameter\c!numbercommand{\setstrut\begstrut\getheadnumber\endstrut}%
+ \else
+ \headparameter\c!numbercommand{\getheadnumber}%
+ \fi
+ \endgroup}
+
+\permanent\protected\def\fakedheadnumber{\vphantom{0}} % needed for mathplus
+
+% \permanent\protected\def\fakeheadnumbercontent
+% {\hbox to \zeropoint{\let\getheadnumber\fakedheadnumber\headnumbercontent}}
+
+\permanent\protected\def\fakeheadnumbercontent
+ {\edef\p_hidenumber{\headparameter\c!hidenumber}%
+ \ifx\p_hidenumber\v!yes\else
+ \hbox to \zeropoint{\let\getheadnumber\fakedheadnumber\headnumbercontent}%
+ \fi}
+
+\permanent\protected\def\strc_rendering_inject_number_and_text
+ {\edef\p_command{\headparameter\c!command}% assumes \protected definition
+ \ifempty\p_command
+ \directsetup\currentheadrenderingsetup
+ \else
+ \p_command\headnumbercontent\headtextcontent
+ \fi}
+
+\protected\def\strc_rendering_inject_text
+ {\edef\p_command{\headparameter\c!command}% assumes \protected definition
+ \ifempty\p_command
+ \directsetup\currentheadrenderingsetup
+ \else
+ \p_command\empty\headtextcontent
+ \fi}
+
+\startsetups[\??headrenderings:\v!command]
+ \csname\??headplacementalternative\currentheadalternative\endcsname \headnumbercontent \headtextcontent
+\stopsetups
+
+% obsolete
+%
+% \def\normalplacehead % hooks into \c!command
+% {\csname\??headplacementalternative\ifcsname\??headplacementalternative\currentheadalternative\endcsname\currentheadalternative\else\v!normal\fi\endcsname}
+
+\defineheadalternative
+ [\v!paragraph]
+ [\c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\v!paragraph]
+
+\startsetups[\??headrenderings:\v!paragraph]
+ \vbox {
+ \headsetupspacing
+ \begstrut
+ \ifconditional\headshownumber % \ifheadnumbercontent
+ \headnumbercontent
+ \hskip\headnumberdistance
+ \fi
+ \headtextcontent
+ }
+\stopsetups
+
+% \setuphead
+% [chapter]
+% [numberwidth=2cm,hang=line,after={\blank[3*line]}]
+%
+% \chapter{Oeps oeps oeps} \input tufte \section{Oeps}
+% \chapter{Oeps oeps oeps} \section{Oeps} \input tufte
+
+\defineheadalternative
+ [\v!normal]
+ [\c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\v!normal]
+
+\startsetups[\??headrenderings:\v!normal]
+ \vbox {
+ \headsetupspacing
+ \ifconditional\headshownumber
+ \ifzeropt\headwidth \else
+ \ifzeropt\headnumberwidth
+ \ifzeropt\headtextwidth \else
+ \headnumberwidth\dimexpr\headwidth-\headtextwidth\relax
+ \fi
+ \else
+ \ifzeropt\headtextwidth
+ \headtextwidth\dimexpr\headwidth-\headnumberwidth\relax
+ \fi
+ \fi
+ \hsize\headwidth
+ \fi
+ \ifzeropt\headnumberwidth \else
+ \headnumberdistance\zeropoint
+ \fi
+ \setbox\scratchbox\hbox \ifzeropt\headnumberwidth\else to \headnumberwidth\fi{\headnumbercontent}
+ \scratchdimen\dimexpr\wd\scratchbox+\headnumberdistance\relax
+ \ifzeropt\headtextwidth \else
+ \hsize\dimexpr\scratchdimen+\headtextwidth\relax
+ \fi
+ \hangindent\scratchdimen
+ \hangafter \plusone
+ \noindent
+ \box\scratchbox
+ \hskip\headnumberdistance
+ \else
+ \ifzeropt\headtextwidth
+ \ifzeropt\headwidth \else
+ \hsize\headwidth
+ \fi
+ \else
+ \hsize\headtextwidth
+ \fi
+ \noindent
+ \fakeheadnumbercontent % will also be done in the other ones (force consistency with numbered)
+ \fi
+ \headtextcontent
+ }
+\stopsetups
+
+\defineheadalternative
+ [\v!inmargin]
+ [\c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\v!inmargin]
+
+\startsetups[\??headrenderings:\v!inmargin]
+ \vbox {
+ \headsetupspacing
+ \dontleavehmode % in case there is no strut, else side effects with llap
+ \begstrut % use one \strut here!
+ \ifconditional\headshownumber
+ \doifelsesomething {\headparameter\c!location} {
+ % kind of new
+ \margindata [\headparameter\c!location] {
+ \headnumbercontent
+ }
+ } {
+ % normal backward compatible variant
+ \llap {
+ \signalrightpage
+ \hbox {
+ \hfill
+ \headnumbercontent
+ \doifelserightpage{
+ \scratchdistance\leftmargindistance
+ } {
+ \scratchdistance\rightmargindistance
+ }
+ \hskip\dimexpr\d_strc_rendering_local_leftoffset+\scratchdistance\relax
+ }
+ }
+ }
+ \else
+ \fakeheadnumbercontent % will also be done in the other ones (force consistency with numbered)
+ \fi
+ \headtextcontent
+ }
+\stopsetups
+
+\defineheadalternative
+ [\v!margin]
+ [\v!inmargin]
+
+% \startsetups[\??headrenderings:\v!vertical:\v!margin]
+% \directsetup{\??headrenderings:\v!vertical:\v!inmargin}
+% \stopsetups
+
+%D This one is for head based numbering usage: foo 1.2 and so:
+
+\defineheadalternative
+ [\v!reverse]
+ [\c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\v!reverse]
+
+\startsetups[\??headrenderings:\v!reverse]
+ \vbox {
+ \headsetupspacing
+ \noindent
+ \begstrut
+ \setfalse\headisdisplay % so a kind of mix
+ \headtextcontent
+ \ifconditional\headshownumber
+ \kern\headnumberdistance
+ \headnumbercontent
+ \else
+ \fakeheadnumbercontent
+ \fi
+ \endstrut
+ }
+\stopsetups
+
+\defineheadalternative
+ [\v!middle]
+ [\c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\v!middle]
+
+\startsetups[\??headrenderings:\v!middle]
+ \vbox {
+ \headsetupspacing
+ \veryraggedcenter
+ \enforced\let\\\endgraf
+ \enforced\let\crlf\endgraf
+ \ifconditional\headshownumber
+ \strut
+ \headnumbercontent
+ \par
+ \else
+ \fakeheadnumbercontent
+ \fi
+ \begstrut
+ \headtextcontent
+ \endstrut
+ }
+\stopsetups
+
+\defineheadalternative
+ [\v!text]
+ [\c!alternative=\v!horizontal,
+ \c!renderingsetup=\??headrenderings:\v!text]
+
+\startsetups[\??headrenderings:\v!text]
+ \begingroup
+ \headsetupspacing % no stretch in distance
+ \ifconditional\headshownumber
+ \headnumbercontent
+ \kern\headnumberdistance
+ \fi
+ \begstrut
+ \headtextcontent
+ \endstrut
+ \endgroup
+\stopsetups
+
+% onder/boven lijnt het nummer op de onderste/bovenste regel uit van een meerregelige kop
+
+\defineheadalternative
+ [\v!bottom]
+ [\c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\v!bottom]
+
+\startsetups[\??headrenderings:\v!bottom]
+ \ifconditional\headshownumber
+ \setbox\scratchboxone\hbox {
+ \headnumbercontent
+ }
+ \setbox\scratchboxtwo\vbox {
+ \headsetupspacing
+ \advance\hsize-\wd\scratchboxone\relax
+ \headtextcontent
+ }
+ \hpack {
+ \box\scratchboxone
+ \hskip\headnumberdistance
+ \box\scratchboxtwo
+ }
+ \else
+ \vbox {
+ \headsetupspacing
+ \noindent
+ \headtextcontent
+ }
+ \fi
+\stopsetups
+
+\defineheadalternative
+ [\v!top]
+ [\c!alternative=\v!vertical,
+ \c!renderingsetup=\??headrenderings:\v!top]
+
+\startsetups[\??headrenderings:\v!top]
+ \ifconditional\headshownumber
+ \setbox\scratchboxone\hbox {
+ \headnumbercontent
+ }
+ \setbox\scratchboxtwo\vtop {
+ \headsetupspacing
+ \advance\hsize-\wd\scratchboxone\relax
+ \headtextcontent
+ }
+ \hpack {
+ \box\scratchboxone
+ \hskip\headnumberdistance
+ \box\scratchboxtwo
+ }
+ \else
+ \vtop{
+ \headsetupspacing
+ \noindent
+ \headtextcontent
+ }
+ \fi
+\stopsetups
+
+% see typo-mar.mkiv:
+%
+% \defineheadalternative
+% [\v!margintext]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-sbe.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-sbe.mkxl
new file mode 100644
index 00000000000..d3141d28b66
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-sbe.mkxl
@@ -0,0 +1,137 @@
+%D \module
+%D [ file=strc-sbe,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Section Block Environments,
+%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 Structure Macros / Section Block Environments}
+
+\unprotect
+
+% \def\ChapterEntry#1#2#3%
+% {chapter : \hbox to \hsize{\strut\bf#2\hss#3}\endgraf\placelist[section]}
+%
+% \startfrontmatter % optional
+% \placelist[chapter][alternative=command,command=\ChapterEntry,criterium=text] \page
+% \stopfrontmatter % optional
+%
+% \startbodymatter % optional
+% \chapter{first} \section{one} test \section{two} test \page
+% \chapter{second} \section{alpha} test \section{beta} test \page
+% \stopbodymatter % optional
+
+\installcorenamespace{sectionblock}
+
+\installcommandhandler \??sectionblock {sectionblock} \??sectionblock
+
+\setupsectionblock
+ [\c!number=\v!yes,
+ \c!page=\v!right] % otherwise marks are reset too soon
+
+\newtoks\everybeforesectionblock
+\newtoks\everyaftersectionblock
+
+\let\strc_sectionblock_define_normal\definesectionblock
+
+\permanent\overloaded\tolerant\protected\def\definesectionblock[#1]#*[#2]#*[#3]% singular plural settings
+ {\strc_sectionblock_define_normal[#1][#3]%
+ %\expandafter\newif\csname if#2\endcsname % obsolete
+ \strc_sectionblock_set_environment{#1}\empty
+ \frozen\setuvalue{\e!start#2}{\startsectionblock[#1]}%
+ \frozen\setuvalue{\e!stop #2}{\stopsectionblock}}
+
+\ifdefined \resetallstructuremarks \else
+ \let\resetallstructuremarks\relax
+\fi
+
+\def\strc_sectionblock_handle_page
+ {\edef\p_strc_sectionblock_page{\sectionblockparameter\c!page}%
+ \ifempty\p_strc_sectionblock_page \else
+ \page[\p_strc_sectionblock_page]%
+ \fi}
+
+\appendtoks
+ \strc_sectionblock_handle_page
+ \resetallstructuremarks
+ \strc_sectionblock_get_environment\currentsectionblock
+ \sectionblockparameter\c!before % don't move
+ \dostarttagged\t!division\currentsectionblock % no parents
+\to \everybeforesectionblock
+
+\appendtoks
+ \sectionblockparameter\c!after % don't move
+ \strc_sectionblock_handle_page
+ \dostoptagged
+ \resetallstructuremarks
+\to \everyaftersectionblock
+
+\permanent\tolerant\protected\def\setsectionblock[#1]#*[#2]% used to set the default
+ {\edef\currentsectionblock{#1}% from now on we assume a value
+ \setupcurrentsectionblock[#2]%
+ \clf_setsectionblock{#1}
+ bookmark {\sectionblockparameter\c!bookmark}%
+ \relax}
+
+\mutable\let\currentsectionblock\empty % was \s!unknown
+
+\permanent\tolerant\protected\def\startsectionblock[#1]#*[#2]%
+ {%\ctxlua{structures.counters.check(0)}% we assume sane usage of \page, as this is the only workable place (in push)
+ \begingroup
+ \edef\currentsectionblock{#1}% from now on we assume a value
+ \setupcurrentsectionblock[#2]%
+ \clf_pushsectionblock{#1}
+ bookmark {\sectionblockparameter\c!bookmark}%
+ \relax
+ %\csname #1true\endcsname % obsolete
+ \setsystemmode\currentsectionblock
+ \the\everybeforesectionblock\relax
+ \showmessage\m!structures1\currentsectionblock}
+
+\permanent\protected\def\stopsectionblock
+ {\showmessage\m!structures2\currentsectionblock
+ \the\everyaftersectionblock\relax
+ \clf_popsectionblock
+ \endgroup}
+
+%D \starttyping
+%D \startsectionblockenvironment[frontpart]
+%D \setupnumber[userpage][numberconversion=romannumerals,start=1]
+%D \stopsectionblockenvironment
+%D
+%D \startsectionblockenvironment[bodypart]
+%D \setupnumber[userpage][numberconversion=numbers,start=1]
+%D \stopsectionblockenvironment
+%D
+%D \startsectionblockenvironment[backpart]
+%D \setupnumber[userpage][numberconversion=numbers,start=1]
+%D \stopsectionblockenvironment
+%D
+%D \starttext
+%D \startfrontmatter \chapter{test} \stopfrontmatter
+%D \startbodymatter \chapter{test} \stopbodymatter
+%D \startappendices \chapter{test} \stopappendices
+%D \stoptext
+%D \stoptyping
+
+\installcorenamespace{sectionblockenvironment}
+
+\protected\def\strc_sectionblock_set_environment#1#2%
+ {\setvalue{\??sectionblockenvironment#1}{#2}}
+
+\protected\def\strc_sectionblock_get_environment#1%
+ {\csname\??sectionblockenvironment#1\endcsname}
+
+\permanent\tolerant\protected\setvalue{\e!start\v!sectionblockenvironment}[#1]% evt \pushendofline \popendofline
+ {\grabuntil{\e!stop\v!sectionblockenvironment}{\strc_sectionblock_set_environment{#1}}}
+
+\aliased\letvalue{\e!stop\v!sectionblockenvironment}\relax
+
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl
new file mode 100644
index 00000000000..7c4a8fc249d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-sec.mkxl
@@ -0,0 +1,1322 @@
+%D \module
+%D [ file=strc-sec,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Sectioning,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D In retrospect I should have gone futher and move more to the
+%D \LUA\ end but here we are now. Maybe some day.
+
+\writestatus{loading}{ConTeXt Structure Macros / Sectioning}
+
+\unprotect
+
+\startcontextdefinitioncode
+
+\installcorenamespace{structure}
+
+\installdirectcommandhandler \??structure {structure} % unchecked, so we need to initialize used parameters
+
+\setupstructure % not a user command so we might need to change the name
+ [\c!number=,
+ \c!level=,
+ \c!name=,
+ \c!title=,
+ \c!bookmark=, % no real need, default to empty anyway
+ \c!marking=, % no real need, default to empty anyway
+ \c!list=, % no real need, default to empty anyway
+ \c!referencetext=, % no real need, default to empty anyway
+ \c!label=, % no real need, default to empty anyway
+ \c!coupling=,
+ \c!ownnumber=,
+ % \c!interaction=\v!list,
+ \c!sectionseparatorset=\s!default,
+ \c!sectionconversionset=\s!default,
+ \c!sectionstopper=,
+ \c!sectionstarter=,
+ \c!sectionsegments=,
+ \c!sectionresetset=,
+ \c!reference=,
+ \c!backreference=,
+ \c!expansion=\v!no,
+ \c!xmlsetup=,
+ \s!catcodes=,
+ \c!saveinlist=\v!yes]
+
+% maybe flags for list, bm, mark
+
+\def\m_strc_references_prefix_yes{+}
+\def\m_strc_references_prefix_nop{-}
+
+\mutable\let\currentstructurereferenceprefix\empty
+\mutable\let\currentstructurereferencetext \empty
+
+\installglobalmacrostack\currentstructurereferenceprefix
+
+\def\strc_sectioning_set_reference_prefix
+ {\ifempty\currentstructurereferenceprefix
+ % nothing
+ \orelse\ifx\currentstructurereferenceprefix\m_strc_references_prefix_yes
+ \global\advance\prefixcounter \plusone % temp here
+ \setupglobalreferenceprefix[\the\prefixcounter]%
+ \orelse\ifx\currentstructurereferenceprefix\m_strc_references_prefix_nop
+ \setupglobalreferenceprefix[]%
+ \else
+ \setupglobalreferenceprefix[\currentstructurereferenceprefix]%
+ \fi
+ \glet\currentstructurereferenceprefix\referenceprefix}
+
+% why xdef ?
+
+\setupstructure
+ [\c!label={\headparameter{\currentsectionblock\c!label}},
+ \c!incrementnumber=\ifconditional\c_strc_sectioning_increment\v!yes\else\v!no\fi, % not that needed
+ \c!saveinlist=\ifconditional\c_strc_sectioning_to_list\v!yes\else\v!no\fi,
+ \c!level=\currentheadlevel,
+ \c!number=\ifconditional\c_strc_sectioning_increment\ifconditional\headshownumber\v!yes\else\v!no\fi\else\v!no\fi,
+ \c!expansion=\headparameter\c!expansion,
+ \c!xmlsetup=\headparameter\c!xmlsetup,
+ \s!catcodes=\headparameter\s!catcodes,
+ \c!sectionresetset=\headparameter\c!sectionresetset,
+ \c!sectionseparatorset=\headparameter\c!sectionseparatorset,
+ \c!sectionconversionset=\headparameter\c!sectionconversionset,
+ \c!sectionconversion=\headparameter\c!conversion, % just for compatibility
+ \c!sectionstarter=\headparameter\c!sectionstarter,
+ \c!sectionstopper=\headparameter\c!sectionstopper,
+ \c!sectionset=\headparameter\c!sectionset,
+ \c!sectionsegments=\headparameter\c!sectionsegments,
+ \c!reference=\headparameter\c!reference,
+ \c!referenceprefix=\headparameter\c!referenceprefix,
+ \c!criterium=\headparameter\c!criterium]
+
+% see lists/neat-001.tex for usage of:
+
+\permanent\def\namedstructureheadlocation#1% expandable, maybe [#1]
+ {\csname\??savedinternalreference\ifcsname\??savedinternalreference#1\endcsname#1\else\s!default\fi\endcsname}
+
+\mutable\let\currentheadbackreference \empty
+\mutable\let\currentheaddefault \empty
+\mutable\let\currentheadincrement \empty
+\mutable\let\currentheadinteraction \empty
+\mutable\let\currentheadlabeltag \empty
+\mutable\let\currentheadnumber \!!zerocount
+\mutable\let\currentheadrenderingalternative\empty
+\mutable\let\currentheadrenderingsetup \empty
+\mutable\let\currentheadtext \empty
+
+% zeros:
+%
+% \setuphead[subsection][criterium=all]
+%
+% \dorecurse{3} {
+% \chapter{Blabla} \subsection{bla 1 1} \subsection{bla 1 2}
+% \section{bla 2} \subsection{bla 2 1} \subsection{bla 2 2}
+% }
+
+\protected\def\strc_sectioning_register#1#2#3% #1=interfaced-settings, #2=optional user data (not yet supported)
+ {\begingroup
+ \setupstructure[\c!name={#1},#2]%
+ \xdef\currentstructurename {\structureparameter\c!name}%
+ \xdef\currentstructurecoupling {\structureparameter\c!coupling}%
+ \xdef\currentstructureownnumber {\structureparameter\c!ownnumber}% optional own number
+ \xdef\currentstructurelevel {\structureparameter\c!level}%
+ \edef\currentstructureexpansion {\structureparameter\c!expansion}%
+ \xdef\currentstructurexmlsetup {\structureparameter\c!xmlsetup}%
+ \xdef\currentstructurecatcodes {\structureparameter\s!catcodes}%
+ \xdef\currentstructurelabel {\structureparameter\c!label}%
+ \xdef\currentstructurereference {\structureparameter\c!reference}%
+ \xdef\currentstructurereferenceprefix{\structureparameter\c!referenceprefix}%
+ \xdef\currentstructurebackreference {\structureparameter\c!backreference}%
+ \xdef\currentstructureshownumber {\structureparameter\c!number}%
+ \xdef\currentstructuresaveinlist {\structureparameter\c!saveinlist}%
+ \xdef\currentstructureincrementnumber{\structureparameter\c!incrementnumber}%
+ \xdef\currentstructureplaceholder {\structureparameter\c!placeholder}%
+ \ifx\currentstructureexpansion\s!xml
+ \xmlstartraw
+ \xdef\currentstructuretitle {\structureparameter\c!title}%
+ \xdef\currentstructurebookmark {\structureparameter\c!bookmark}%
+ \xdef\currentstructuremarking {\structureparameter\c!marking}%
+ \xdef\currentstructurelist {\structureparameter\c!list}%
+ \xdef\currentstructurereferencetext{\structureparameter\c!referencetext}%
+ \xmlstopraw
+ \iflocation \ifempty\currentstructurebookmark
+ \xdef\currentstructurebookmark{\prerolltostring{\currentstructuretitle}}%
+ \fi \fi
+ \ifempty\currentstructurelist
+ \glet\currentstructurelist\currentstructuretitle
+ \fi
+ \glet\currentstructurecoding\s!xml
+ \else
+ \ifx\currentstructureexpansion\v!yes
+ \xdef\currentstructuretitle {\structureparameter\c!title}%
+ \xdef\currentstructurebookmark {\structureparameter\c!bookmark}%
+ \xdef\currentstructuremarking {\structureparameter\c!marking}%
+ \xdef\currentstructurelist {\structureparameter\c!list}%
+ \xdef\currentstructurereferencetext{\structureparameter\c!referencetext}%
+ \iflocation \ifempty\currentstructurebookmark
+ \xdef\currentstructurebookmark{\prerolltostring{\currentstructuretitle}}%
+ \fi \fi
+ \else
+ \xdef\currentstructuretitle {\detokenizedstructureparameter\c!title}%
+ \xdef\currentstructurebookmark {\detokenizedstructureparameter\c!bookmark}%
+ \xdef\currentstructuremarking {\detokenizedstructureparameter\c!marking}%
+ \xdef\currentstructurelist {\detokenizedstructureparameter\c!list}%
+ \xdef\currentstructurereferencetext{\detokenizedstructureparameter\c!referencetext}%
+ \iflocation \ifempty\currentstructurebookmark
+ \xdef\currentstructurebookmark{\prerolltostring{\structureparameter\c!title}}%
+ \fi \fi
+ \fi
+ \ifempty\currentstructurelist
+ \glet\currentstructurelist\currentstructuretitle
+ \fi
+ \glet\currentstructurecoding\s!tex
+ \fi
+ \iflocation \ifempty\currentstructurebookmark \orelse \ifx\currentstructurebookmark\currentstructuretitle \else
+ %\showmessage\m!structures3{{\currentstructurebookmark}}% comma interference
+ \writestatus{\m!structures}{bookmark:\space\currentstructurebookmark}%
+ \fi \fi
+ \setnextinternalreference
+ \storeinternalreference\currentstructurename{\the\locationcount}%
+ \strc_sectioning_set_reference_prefix
+ \clf_setsectionentry
+ references {
+ internal \locationcount
+ % block {\currentsectionblock}
+ prefix {\currentstructurereferenceprefix}
+ reference {\currentstructurereference}
+ backreference {\currentstructurebackreference}
+ }
+ directives {
+ resetset {\structureparameter\c!sectionresetset}
+ }
+ metadata {
+ kind {section}
+ name {\currentstructurename}
+ catcodes \ifempty\currentstructurecatcodes\catcodetable\else\csname\currentstructurecatcodes\endcsname\fi\space
+ coding {\currentstructurecoding}
+ \ifx\currentstructurecoding\s!xml
+ xmlroot {\xmldocument}
+ \fi
+ \ifempty\currentstructurexmlsetup \else
+ xmlsetup {\currentstructurexmlsetup}
+ \fi
+ \ifx\currentstructuresaveinlist\v!no
+ nolist \space true\space
+ \fi
+ \ifx\currentstructureincrementnumber\v!yes
+ increment {\currentstructureincrementnumber}
+ \fi
+ }
+ titledata {
+ label {\detokenize\expandafter{\currentstructurelabel}}
+ title {\detokenize\expandafter{\currentstructuretitle}}
+ \ifx\currentstructurebookmark\currentstructuretitle \else
+ bookmark {\detokenize\expandafter{\currentstructurebookmark}}
+ \fi
+ \ifx\currentstructuremarking\currentstructuretitle \else
+ marking {\detokenize\expandafter{\currentstructuremarking}}
+ \fi
+ \ifx\currentstructuresaveinlist\v!no \else
+ \ifx\currentstructurelist\currentstructuretitle \else
+ list {\detokenize\expandafter{\currentstructurelist}}
+ \fi
+ \fi
+ \ifx\currentstructurereferencetext\currentstructuretitle \else
+ reference {\detokenize\expandafter{\currentstructurereferencetext}}
+ \fi
+ }
+ numberdata {
+ % block {\currentsectionblock}
+ \ifx\currentstructureshownumber\v!no
+ hidenumber \space true\space % space needed for parser
+ \fi
+ separatorset {\structureparameter\c!sectionseparatorset}
+ conversionset {\structureparameter\c!sectionconversionset}
+ conversion {\structureparameter\c!sectionconversion}
+ starter {\structureparameter\c!sectionstarter}
+ stopper {\structureparameter\c!sectionstopper}
+ set {\structureparameter\c!sectionset}
+ segments {\structureparameter\c!sectionsegments}
+ ownnumber {\currentstructureownnumber}
+ language {\currentlanguage}% for the moment, needed for bookmarks conversion
+ criterium {\structureparameter\c!criterium}
+ }
+ userdata {\detokenize{#3}}% will be converted to table at the lua end
+ \relax
+ \xdef\currentstructurelistnumber{\clf_currentsectiontolist}%
+ % \currentstructuresynchronize has to be called someplace, since it introduces a node
+ \setstructuresynchronization\currentstructurelistnumber
+ \endgroup}
+
+\mutable\let\currentsectioncountervalue \!!zerocount % redefined later
+\mutable\let\previoussectioncountervalue\!!zerocount % redefined later
+
+% We can access the (stored) data with the following macros.
+%
+% \def\MyHeadCommand #1#2{\framed{#1}\framed{#2 / \structureuservariable{subtitle}}}
+% \def\MyListCommand#1#2#3{\externalfigure[\structurelistuservariable{figure}][height=5mm]#2}
+%
+% \setuphead[chapter][command=\MyHeadCommand]
+% \setuplist[chapter][alternative=command,command=\MyListCommand]
+%
+% \starttext
+% \setupheadertexts[chapter]
+% \setupinteraction[state=start]
+% \placebookmarks[chapter]
+% \placelist[chapter]
+% \startchapter[ownnumber=10,title=Ton,list=Hans,marking=Kees,bookmark=Bram][figure=cow.pdf,subtitle=oeps]
+% \stopchapter
+% \stoptext
+
+% todo: #1 => "#1" ... adapt lua code for name and number
+
+\permanent\def\structurenumber {\clf_structurenumber}
+\permanent\def\structuretitle {\clf_structuretitle}
+\permanent\def\structurevariable #1{\clf_structurevariable {#1}}
+\permanent\def\structureuservariable #1{\clf_structureuservariable {#1}}
+\permanent\def\structurecatcodedget #1{\clf_structurecatcodedget {#1}} % bad name
+\permanent\def\structuregivencatcodedget #1#2{\clf_structuregivencatcodedget {#1}#2 } % bad name
+\permanent\def\structureautocatcodedget #1#2{\clf_structureautocatcodedget {#1}{#2}}
+\permanent\def\namedstructurevariable #1#2{\clf_namedstructurevariable {#1}{#2}}
+\permanent\def\namedstructureuservariable#1#2{\clf_namedstructureuservariable{#1}{#2}}
+
+% compatibility issue:
+%
+% \def\setfullsectionnumber #1{}
+% \def\preparefullnumber #1{}
+% \def\fullsectionnumber {1--1--1}
+% \def\makesectionnumber [#1]{}
+% \def\makesectionformat {}
+% \def\sectionformat {1--1-1-1-1-1-1}
+% \def\composedsectionnumber{}
+% \def\@@kolist{}
+
+% \setuphead[section] [separator=\separatorlist{?,!,*}]
+% \setuphead[subsection][separator=\separatorlist{??,!!,**}]
+%
+% \let\spr\separatorlist % this will enable this feature
+%
+% \setuphead[section] [separator={?,!,*}]
+% \setuphead[subsection][separator={??,!!,**}]
+%
+% \setupheads[separator={A,B,C,D,E,F}]
+% \chapter{test}
+% \section{test} \subsection{test} \subsection{test}
+% \section{test} \subsection{test} \subsection{test}
+
+% lua interface / names and interface might change
+
+% \newconditional\c_strc_rendering_continuous % not used (mkii ?)
+
+\permanent\def\setstructurelevel #1#2{\clf_setstructurelevel {#1}{#2}} % name, level|parent
+\permanent\def\getstructurelevel #1{\clf_getstructurelevel {#1}} % name
+\permanent\def\setstructurenumber #1#2{\clf_setstructurenumber #1{#2}} % level, number (+/-)
+\permanent\def\getstructurenumber #1{\clf_getstructurenumber \numexpr#1\relax} % level
+\permanent\def\getsomestructurenumber #1#2{\clf_getsomestructurenumber #1{#2}} % level, what
+\permanent\def\getfullstructurenumber #1{\clf_getfullstructurenumber \numexpr#1\relax} % level
+\permanent\def\getsomefullstructurenumber#1#2{\clf_getsomefullstructurenumber #1{#2}} % level, what
+\permanent\def\getspecificstructuretitle #1{\clf_getspecificstructuretitle {#1}{\headparameter\s!catcodes}}
+
+% structure heads (like \startchapter)
+
+% \c!deeptextcommand, \c!deepnumbercommand: undefined !
+% \c!before \c!after \c!distance
+% \c!page \c!header \c!text \c!footer=,
+% \c!numbercommand \c!textcommand \c!ownnumber \c!number
+% \c!file \c!grid \c!margintext
+% \c!expansion \c!xmlsetup \s!catcode
+
+\installcorenamespace{head}
+\installcorenamespace{headlevel}
+\installcorenamespace{headincrement}
+\installcorenamespace{headplace}
+\installcorenamespace{headmarkyes}
+\installcorenamespace{headmarknop}
+
+\installcommandhandler \??head {head} \??head
+
+\installmacrostack\currenthead
+\installmacrostack\currentheadparent
+
+\setuphead [%
+ %\c!after=,
+ %\c!align=,
+ %\c!aligntitle=,
+ \c!alternative=\v!normal,
+ %\c!before=,
+ %\c!color=,
+ %\c!command=,
+ \c!continue=\v!yes,
+ %\c!coupling=,
+ %\c!deepnumbercommand=,
+ %\c!deeptextcommand=,
+ %\c!default=,
+ \c!distance=\zeropoint,
+ \c!textdistance=\zeropoint,
+ \c!textwidth=\zeropoint, % signal too
+ \c!numberwidth=\zeropoint, % signal too
+ \c!width=\zeropoint, % signal too
+ \c!expansion=\v!no,
+ %\c!file=,
+ %\c!footer=,
+ %\c!grid=,
+ \c!hang=\v!none,
+ %\c!header=,
+ \c!incrementnumber=\v!yes,
+ \c!indentnext=\v!no,
+ %\c!label=,
+ %\c!limittext=\languageparameter\c!limittext,
+ \c!margin=\zeropoint,
+ %\c!margintext=,
+ \c!number=\v!yes,
+ \c!numbercolor=\headparameter\c!color,
+ \c!textcolor=\headparameter\c!color,
+ \c!numberstyle=\headparameter\c!style,
+ \c!textstyle=\headparameter\c!style,
+ %\c!numbercommand=,
+ %\c!textcommand=,
+ \c!ownnumber=\v!no,
+ %\c!page=,
+ \c!placehead=\v!yes,
+ \c!sectionconversionset=\s!default,
+ \c!sectionnumber=\v!yes,
+ %\c!sectionsegments=,
+ \c!sectionseparatorset=\s!default,
+ \c!sectionset=\v!all,
+ \c!interlinespace=,
+ %\c!sectionstopper=,
+ %\c!sectionstarter=,
+ %\c!strut=,
+ %\c!style=,
+ %\c!text=,
+ %\c!tolerance=,
+ %\c!beforesection=\directsetup{document:\currenthead:start}, % these might become defaults i.e. acpect document: namespace
+ %\c!insidesection=\directsetup{document:\currenthead:inside}, % these might become defaults i.e. acpect document: namespace
+ %\c!aftersection=\directsetup{document:\currenthead:stop}, % these might become defaults i.e. acpect document: namespace
+ ]
+
+\aliased\let\setupheads\setuphead % will go
+
+\appendtoks
+ \ifempty\currentheadparent
+ \edef\currentheaddefault{\headparameter\c!default}%
+ \edef\currentheadsection{\headparameter\c!section}%
+ \ifx\currenthead\currentheaddefault
+ \let\currentheadparent\currentheadsection
+ \orelse\ifempty\currentheaddefault
+ \let\currentheadparent\currentheadsection
+ \else
+ \let\currentheadparent\currentheaddefault
+ \fi
+ \normalexpanded {%
+ \setheadparameter{\c!label}{\currenthead}%
+ \setheadparameter{\c!coupling}{\currenthead}%
+ \setheadparameter{\s!parent}{\??head\currentheadparent}%
+ \definemarking[\currenthead] [\currentheadsection]%
+ \definemarking[\currenthead\v!number][\currentheadsection]%
+ \setupmarking [\currenthead] [\c!filtercommand=\noexpand\sectionheadmarkingtitle {\currenthead}]%
+ \setupmarking [\currenthead\v!number][\c!filtercommand=\noexpand\sectionheadmarkingnumber{\currenthead}]%
+ }%
+ \doifelselist\currenthead\donothing
+ {\definelist[\currenthead][\c!prefix=\v!no]}%
+ % we can't do this now for backward compatibility reasons
+ % \doifelselist\currenthead\donothing
+ % {\normalexpanded{\definelist[\currenthead][\currentheadparent][\c!prefix=\v!no]}}%
+ \else
+ \normalexpanded {%
+ \setheadparameter{\c!label}{\currenthead}%
+ \setheadparameter{\c!coupling}{\currentheadparent}%
+ \definemarking[\currenthead] [\currentheadparent]%
+ \definemarking[\currenthead\v!number][\currentheadparent\c!number]%
+ }%
+ \doifelselist\currenthead\donothing
+ {\normalexpanded{\definelist[\currenthead][\currentheadparent][\c!prefix=\v!no]}}%
+ \fi
+ \presetlabeltext[\currenthead=]%
+ \the\everysetuphead
+\to \everydefinehead
+
+\newtoks\everyredefinehead
+
+\appendtoks
+ \the\everyredefinehead
+\to \everydefinehead
+
+\appendtoks
+ \setstructurelevel\currenthead{\thenamedheadlevel\currenthead}%
+\to \everyredefinehead
+
+\mutable\let\currentsectionheadcoupling\empty
+\mutable\let\currentsectionheadsection \empty
+\mutable\let\currentsectionlevel \empty
+
+\appendtoks
+ % beware, this is a global register
+ \begingroup
+ \edef\currentsectionheadcoupling{\sectionheadcoupling\currenthead}%
+ \edef\currentsectionheadsection {\sectionheadsection \currentsectionheadcoupling}%
+ \edef\currentsectionlevel {\sectionlevel \currentsectionheadsection}%
+ \clf_registersection {\currenthead} {
+ coupling {\currentsectionheadcoupling}
+ section {\currentsectionheadsection}
+ level \space \currentsectionlevel \space % space needed for parser
+ parent {\currentheadparent}
+ }%
+ \endgroup
+\to \everyredefinehead
+
+\appendtoks
+ \frozen\instance\protected\edefcsname\e!start\currenthead\endcsname{\strc_sectioning_start[\currenthead]}%
+ \frozen\instance\protected\edefcsname\e!stop \currenthead\endcsname{\strc_sectioning_stop [\currenthead]}%
+\to \everydefinehead
+
+% so \subject as well as \section will need two commands when ownnumber
+% is used (one can disable it anyway for subject) .. this is not downward
+% compatible but better
+
+\appendtoks
+ \ifempty\currenthead \else
+ \doifelse{\headparameter\c!ownnumber}\v!yes
+ {\instance\protected\edefcsname\currenthead\endcsname{\strc_sectioning_handle_own[\currenthead]}}
+ {\instance\protected\edefcsname\currenthead\endcsname{\strc_sectioning_handle_nop[\currenthead]}}%
+ \fi
+\to \everysetuphead
+
+\permanent\protected\def\doredefinehead#1#2% called at lua end
+ {\push_macro_currenthead
+ \push_macro_currentheadparent
+ \edef\currenthead{#1}%
+ \edef\currentheadparent{#2}%
+ \the\everyredefinehead\relax
+ \pop_macro_currentheadparent
+ \pop_macro_currenthead}
+
+\mutable\let\currentnamedsection\empty
+
+\installmacrostack\currentnamedsection
+
+% structure sections (the parents of chapter etc)
+
+\aliased\let\firstsectionname\empty
+\aliased\let\lastsectionname \empty
+
+%aliased\let\resetallstructuremarks \relax
+%aliased\let\resetcurrentstructuremarks \relax
+\aliased\let\resetcurrentstructuremarkswithpage\relax
+
+\permanent\protected\def\resetallstructuremarks {\resetmarking[\firstsectionname]} % will become option (was \v!section-1)
+\permanent\protected\def\resetcurrentstructuremarks {\resetmarking[\lastsectionname]} % will become option
+%permanent\protected\def\resetcurrentstructuremarkswithpage{\resetmarking[\lastsectionname]} % will become option
+
+% We could use a commandhandler here but sections are somewhat special in the
+% sense that we have two ways of chaining: the main section (levels) as well
+% as rendering (head).
+
+% -2 = text
+% -1 = manual
+% 0 = block
+% +1 = structurelevel 1 .. n
+
+\newcount\maxstructuredepth
+
+\permanent\def\sectionlevel#1%
+ {\csname\??headlevel\ifcsname\??headlevel#1\endcsname#1\else\v!none\fi\endcsname}
+
+\permanent\def\namedsectionlevel#1#2% direct indirect
+ {\csname\??headlevel
+ \ifcsname\??headlevel#1\endcsname
+ #1%
+ \orelse\ifcsname\??headlevel#2\endcsname
+ #2%
+ \else
+ \v!none
+ \fi
+ \endcsname}
+
+\permanent\def\xthenamedheadlevel#1%
+ {\namedsectionlevel{#1}{\sectionheadsection{\sectionheadcoupling{#1}}}}
+
+\defcsname\??headlevel\v!block\endcsname{0}
+\defcsname\??headlevel\v!none \endcsname{-1}
+\defcsname\??headlevel\v!text \endcsname{-2}
+\defcsname\??headlevel\v!head \endcsname{-3}
+
+\newtoks\everydefinesection
+
+\mutable\let\currentsection\empty % historic alias
+
+\permanent\protected\def\definesection[#1]%
+ {\ifcsname\??headlevel#1\endcsname \else
+ \edef\currenthead{#1}%
+ \let\currentsection\currenthead % just an alias
+ \global\advance\maxstructuredepth\plusone
+ \setevalue{\??headlevel#1}{\the\maxstructuredepth}%
+ \setstructurelevel{#1}{\sectionlevel{#1}}%
+ \normalexpanded{\setheadparameter{\s!parent}{\??head\lastsectionname}}% TO BE CHECKED, WE HAVE A HELPER
+ \the\everydefinesection
+ % so far for these default inheritances
+ \definemarking[#1]%
+ \ifnum\maxstructuredepth>\plusone
+ \normalexpanded{\relatemarking[#1][\lastsectionname]}% so, the parent will reset the child
+ \fi
+ \enforced\permanent\xdef\lastsectionname{#1}%
+ \ifempty\firstsectionname
+ \enforced\glet\firstsectionname\lastsectionname
+ \fi
+ \fi}
+
+\permanent\tolerant\protected\def\setupsection[#1]#*[#2]#*[#3]%
+ {\ifparameter#1\else
+ \push_macro_currenthead
+ \edef\currenthead{\ifcsname\??headlevel#1\endcsname#1\else\sectionheadsection{#1}\fi}%
+ \ifparameter#3\or
+ \edef\currenthead{\currenthead#2}% not used at any more in mkiv (sets now)
+ \setupcurrenthead[#3]%
+ \else
+ \setupcurrenthead[#2]%
+ \fi
+ \pop_macro_currenthead
+ \fi}
+
+% we share the parameters as sections are roots of heads so eventually we can
+% consider \definesection -> \definehead with one argument
+
+\appendtoks
+ % This is a rather practical default that we don't want to
+ % be part of the parent chain lookup mechanism; it's also
+ % mkii compatible. Somewhat weird that it's part of the
+ % top level structure but it will be flattened anyway.
+ % \let\currenthead\currentsection % hm
+ \setheadparameter\c!textstyle {\directheadparameter\c!style}%
+ \setheadparameter\c!textcolor {\directheadparameter\c!color}%
+ \setheadparameter\c!numberstyle{\directheadparameter\c!style}%
+ \setheadparameter\c!numbercolor{\directheadparameter\c!color}%
+\to \everydefinesection
+
+% head -> head
+
+\permanent\def\sectionheadmarkingtitle #1#2{\clf_markingtitle {#1}{#2}} % can be done at lua end
+\permanent\def\sectionheadmarkingnumber#1#2{\clf_markingnumber{#1}{#2}} % can be done at lua end
+
+\permanent\def\sectionheadcoupling#1{\namedheadparameter{#1}\c!coupling}
+\permanent\def\sectionheadsection #1{\namedheadparameter{#1}\c!section}
+
+% head construction
+
+\newconditional\currentstructureown
+
+\newtoks\everybeforehead % hook, todo: before/after keys
+\newtoks\everyafterhead % hook, todo: before/after keys
+
+\permanent\tolerant\protected\def\strc_sectioning_handle_own[#1]#*[#2]#:#*#=#*#=% [ref] {nr} {title}
+ {\settrue\currentstructureown
+ \triggerautostructurelevel
+ \strc_sectioning_handle{#1}{\c!reference={#2},\c!ownnumber={#3},\c!title={#4}}{}} % name ref nr title --
+
+\permanent\tolerant\protected\def\strc_sectioning_handle_nop[#1]#*[#2]% [ref] {title} / for taco: [key=value] variant
+ {\setfalse\currentstructureown
+ \triggerautostructurelevel
+ \ifhastok={#2}%
+ \expandafter\strc_sectioning_handle_nop_indeed_yes
+ \else
+ \expandafter\strc_sectioning_handle_nop_indeed_nop
+ \fi
+ {#1}{#2}}
+
+\def\strc_sectioning_handle_nop_indeed_yes#1#2%
+ {\strc_sectioning_handle{#1}{#2}{}}
+
+\def\strc_sectioning_handle_nop_indeed_nop#1#2#3%
+ {\strc_sectioning_handle{#1}{\c!reference={#2},\c!title={#3}}{}} % name ref nr title --
+
+\permanent\tolerant\protected\def\strc_sectioning_start[#1]#*[#2]#*[#3]% for the moment no grouping, too annoying with page breaks
+ {\push_macro_currentnamedsection
+ \push_macro_currentstructurereferenceprefix
+ \edef\currentnamedsection{#1}%
+ \setfalse\currentstructureown
+ %\globalpushmacro\currenthead % this does not work out well
+ \xdef\currenthead{#1}%
+ \setsystemmode\currenthead % new, also here now
+ \headparameter\c!beforesection % beware, no users vars set yet
+ \the\everybeforehead
+ \strc_sectioning_handle{#1}{#2}{#3}% name -- -- -- userdata (we might move the tagged to here)
+ % potential: \bgroup (can be optional: grouped = yes)
+ \headparameter\c!insidesection}
+
+\permanent\protected\def\strc_sectioning_stop[#1]% !!! also used at lua end
+ {\dostoptagged
+ \dostoptagged
+ % potential: \egroup
+ %\globalpopmacro\currenthead % so we do a hard recover
+ \xdef\currenthead{#1}% recover
+ \headparameter\c!aftersection
+ \the\everyafterhead
+ \resetsystemmode\currenthead
+ \pop_macro_currentstructurereferenceprefix
+ \pop_macro_currentnamedsection} % new, also here now
+
+\aliased\let\dostarthead\strc_sectioning_start % used at lua end
+\aliased\let\dostophead \strc_sectioning_stop % used at lua end
+
+% todo: add grouping but where: before/after trickery .. probably inside because one can always add
+% grouping to the before/after settings
+
+\aliased\let\startnamedsection\strc_sectioning_start
+
+\permanent\protected\def\stopnamedsection
+ {\normalexpanded{\strc_sectioning_stop[\currentnamedsection]}}
+
+% \newconditional\structurereversesectionnumbers % todo: key/val
+
+\newconditional\c_strc_sectioning_to_list
+\newconditional\c_strc_sectioning_increment
+\newconditional\c_strc_sectioning_place
+\newconditional\c_strc_sectioning_empty
+\newconditional\c_strc_sectioning_hidden
+\newconditional\c_strc_sectioning_section
+
+\newconditional\headshownumber % public
+\newconditional\headisdisplay % public
+\newconditional\headissomewhere % public
+
+\defcsname\??headincrement\v!yes \endcsname{\settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list}
+\defcsname\??headincrement\v!no \endcsname{\setfalse\c_strc_sectioning_increment\setfalse\c_strc_sectioning_to_list}
+\defcsname\??headincrement\v!list \endcsname{\setfalse\c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list}
+\defcsname\??headincrement\s!empty\endcsname{\settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list}
+
+\protected\def\strc_sectioning_initialize_increment
+ {\edef\currentheadincrement{\headparameter\c!incrementnumber}%
+ \ifcsname\??headincrement\currentheadincrement\endcsname
+ \lastnamedcs
+ \else
+ \settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list
+ % \filterheadnumber
+ \fi}
+
+\permanent\protected\def\filterheadnumber
+ {\settrue\c_strc_sectioning_increment
+ \settrue\c_strc_sectioning_to_list
+ \ifempty\currentproduct
+ % todo : filter from other toc (number, file, title)
+ % use : \currentheadincrement as spec
+ \fi}
+
+\defcsname\??headplace\v!yes\endcsname
+ {\setfalse\c_strc_sectioning_empty
+ \settrue \c_strc_sectioning_place
+ \setfalse\c_strc_sectioning_hidden
+ \setfalse\c_strc_sectioning_section}
+
+\defcsname\??headplace\v!empty\endcsname
+ {\settrue \c_strc_sectioning_empty
+ \settrue \c_strc_sectioning_place
+ \setfalse\c_strc_sectioning_hidden
+ \setfalse\c_strc_sectioning_section}
+
+\defcsname\??headplace\v!no\endcsname
+ {\settrue \c_strc_sectioning_empty
+ \setfalse\c_strc_sectioning_place
+ \setfalse\c_strc_sectioning_hidden
+ \setfalse\c_strc_sectioning_section}
+
+\defcsname\??headplace\v!hidden\endcsname
+ {\settrue \c_strc_sectioning_empty
+ \setfalse\c_strc_sectioning_place
+ \settrue \c_strc_sectioning_hidden
+ \setfalse\c_strc_sectioning_section}
+
+\defcsname\??headplace\v!section\endcsname
+ {\settrue \c_strc_sectioning_empty
+ \setfalse\c_strc_sectioning_place
+ \settrue \c_strc_sectioning_hidden
+ \settrue \c_strc_sectioning_section}
+
+\protected\def\strc_sectioning_initialize_placement
+ {\expandnamespaceparameter\??headplace\headparameter\c!placehead\v!yes}
+
+\newmode\v!sectionnumber
+
+\def\strc_sectioning_set_head_number_content % was: \dosetstructureheadnumbercontent
+ {\setsystemmode\v!sectionnumber
+ \settrue\headshownumber} % why ?
+
+\def\strc_sectioning_reset_head_number_content % was: \doresetstructureheadnumbercontent
+ {\resetsystemmode\v!sectionnumber
+ \setfalse\headshownumber} % why ?
+
+\protected\def\strc_sectioning_initialize_number
+ {\edef\p_number{\sectionblockparameter\c!number}%
+ \ifx\p_number\v!yes
+ \edef\p_number{\headparameter\c!number}%
+ \ifx\p_number\v!yes
+ \settrue\headshownumber
+ \else
+ \setfalse\headshownumber
+ \fi
+ \else
+ \setfalse\headshownumber
+ \fi}
+
+% Beware, we do need some node for anchoring marks and normally a zwnj will
+% do but it interferes so we deal with it at the \LUA\ end.
+
+\newtoks\everyheadsynchronization
+
+% \appendtoks
+% \currentstructuresynchronize
+% \to \everyheadsynchronization
+
+\aliased\let\currentstructuresynchronize\donothing
+
+\appendtoks
+ \currentstructuresynchronize
+ \enforced\glet\currentstructuresynchronize\donothing
+\to \everyheadsynchronization
+
+\permanent\protected\def\theheadsynchronization % public
+ {% no, interferes: \signalcharacter
+ \the\everyheadsynchronization}
+
+% BEWARE: \marking[section]{my text} does not work as we use list indices instead
+% so we need a 'keep track of raw set option' (or maybe a funny internal prefix)
+
+\permanent\protected\def\setheadmarking % li:: so that we can use \marking[section]{Taco needed this}
+ {\strc_sectioning_delayed_flush
+ \normalexpanded{\setmarking[\currenthead]{li::\currentstructurelistnumber}}}
+
+\mutable\let\deepstructurenumbercommand\relax
+\mutable\let\deepstructuretitlecommand \relax
+
+\permanent\protected\def\fullheadnumber
+ {\edef\currentheadlabeltag{\currentsectionblock\c!label}%
+ \dostarttagged\t!sectionnumber\empty
+ \labeltexts
+ {\headparameter\currentheadlabeltag}
+ {\ifrelax\deepstructurenumbercommand
+ \structurenumber
+ \else
+ \normalexpanded{\noexpand\deepstructurenumbercommand{\structurenumber}}%
+ \fi}%
+ \dostoptagged}
+
+\permanent\protected\def\fullheadtitle
+ {\dostarttagged\t!sectiontitle\empty
+ \ifrelax\deepstructuretitlecommand
+ \structuretitle
+ \else
+ \normalexpanded{\noexpand\deepstructuretitlecommand{\structuretitle}}%
+ \fi
+ \dostoptagged}
+
+\mutable\let\currenthead \empty
+\mutable\let\currentheadcoupling\empty
+\mutable\let\currentheadsection \empty
+\mutable\let\currentheadlevel \!!zerocount
+\mutable\let\currentheadcounter \!!zerocount
+
+\let\strc_show_used\relax
+
+\installtextracker
+ {structures.showused}
+ {\let\strc_show_used\clf_showstructure}
+ {\let\strc_show_used\relax}
+
+\appendtoks
+ \strc_show_used
+\to \everystoptext
+
+\protected\def\strc_sectioning_report{\clf_reportstructure}
+
+\ifdefined\strc_rendering_initialize_style_and_color \else
+
+ \protected\def\strc_rendering_initialize_style_and_color#1#2%
+ {\dontconvertfont
+ \useheadstyleandcolor\c!style\c!color
+ \useheadstyleandcolor#1#2%
+ \setupinterlinespace}
+
+\fi
+
+\permanent\tolerant\protected\def\placeheadtext[#1]%
+ {\dontleavehmode
+ \begingroup
+ \protected\def\\{\space}% messy here, but the default (and needs to be grouped)
+ \global\settrue\headisdisplay % triggers interlinespace checking
+ \edef\currenthead{#1}% maybe only when #1 is given
+ \strc_rendering_initialize_style_and_color\c!textstyle\c!textcolor
+ \relax
+ \getspecificstructuretitle{\thenamedheadlevel{#1}}%
+ \endgraf
+ \endgroup}
+
+\permanent\tolerant\protected\def\placeheadnumber[#1]%
+ {\dontleavehmode
+ \begingroup
+ \global\settrue\headisdisplay % triggers interlinespace checking
+ \edef\currenthead{#1}% maybe only when #1 is given
+ \strc_rendering_initialize_style_and_color\c!numberstyle\c!numbercolor
+ \relax
+ \getfullstructurenumber{\thenamedheadlevel{#1}}%
+ \endgraf
+ \endgroup}
+
+\ifdefined\triggerautostructurelevel \else \let\triggerautostructurelevel\relax \fi
+
+\newtoks\everybeforesectionheadhandle
+\newtoks\everyaftersectionheadhandle
+
+\mutable\let\getheadnumber\empty
+\mutable\let\getheadtitle \empty
+\mutable\let\getheadsyncs \empty
+
+\def\strc_sectioning_handle#1#2#3% name data userdata (we can move #1 to the caller)
+ {\xdef\currenthead {#1}%
+ \xdef\currentheadcoupling{\sectionheadcoupling\currenthead}%
+ \xdef\currentheadsection {\sectionheadsection \currentheadcoupling}%
+ \xdef\currentheadlevel {\sectionlevel \currentheadsection}%
+ %
+ %\writestatus\m!system{setup: \currenthead,\currentheadcoupling,\currentheadsection,\currentheadlevel}%
+ %
+ \strc_sectioning_initialize_autolevel
+ \strc_sectioning_initialize_increment
+ \strc_sectioning_initialize_placement
+ \strc_sectioning_initialize_number
+ %
+ \the\everybeforesectionheadhandle
+ %
+ % todo: also mark (for header)
+ %
+ % we might remove the lower level
+ %
+ % not here, after optional \page: \strc_sectioning_register{#1}{#2}{#3}%
+ %
+% \xdef\currentheadcounter{\currentsectioncountervalue}% lua call
+ %
+ % \currentstructuresynchronize % will move
+ %
+ \let\getheadnumber\empty
+ \let\getheadtitle \empty
+ \let\getheadsyncs \empty
+ \ifconditional\c_strc_sectioning_increment
+ \ifconditional\c_strc_sectioning_place
+ \strc_sectioning_before_yes
+ \strc_sectioning_register{#1}{#2}{#3}% after optional \page
+ \strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
+ \let\getheadsyncs\theheadsynchronization
+ \let\getheadtitle\fullheadtitle
+ \ifconditional\headshownumber
+ \let\getheadnumber\fullheadnumber
+ \strc_rendering_place_head_number_and_text
+ \else
+ \strc_rendering_place_head_text
+ \fi
+ \dostoptagged
+ \strc_sectioning_after_yes
+ \orelse\ifconditional\c_strc_sectioning_hidden
+ \strc_sectioning_register{#1}{#2}{#3}% after optional \page
+ \strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
+ \let\getheadsyncs\theheadsynchronization
+ \ifconditional\c_strc_sectioning_section
+ \strc_rendering_place_head_section
+ \else
+ \strc_rendering_place_head_hidden % only something when tracing
+ \fi
+ \dostoptagged
+ \else
+ \strc_sectioning_before_nop % toegevoegd ivm subpaginanr / tug sheets
+ \strc_sectioning_register{#1}{#2}{#3}% after optional \page
+ \strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
+ \let\getheadsyncs\theheadsynchronization
+ \strc_rendering_place_head_empty % just flush 'm
+ \dostoptagged
+ \strc_sectioning_after_nop
+ \fi
+ \else
+ \ifconditional\c_strc_sectioning_place
+ \strc_sectioning_before_yes
+ \strc_sectioning_register{#1}{#2}{#3}% after optional \page
+ \strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
+ \let\getheadsyncs\theheadsynchronization
+ \let\getheadtitle\fullheadtitle
+ \strc_rendering_place_head_text
+ \dostoptagged
+ \strc_sectioning_after_yes
+ \orelse\ifconditional\c_strc_sectioning_hidden
+ \strc_sectioning_register{#1}{#2}{#3}% after optional \page
+ \strc_sectioning_report
+ \let\getheadsyncs\theheadsynchronization
+ \dostarttagged\t!sectioncaption\empty
+ \ifconditional\c_strc_sectioning_section
+ \strc_rendering_place_head_section
+ \else
+ \strc_rendering_place_head_hidden % only something when tracing
+ \fi
+ \dostoptagged
+ \else
+ % do nothing / should be vbox to 0pt
+ \strc_sectioning_before_nop
+ \strc_sectioning_register{#1}{#2}{#3}% after optional \page
+ \strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
+ \let\getheadsyncs\theheadsynchronization
+ \strc_rendering_place_head_empty % just flush 'm
+ \dostoptagged
+ \strc_sectioning_after_nop
+ \fi
+ \fi
+ %
+ \the\everyaftersectionheadhandle
+ %
+ \setfalse\c_strc_sectioning_ignore_page
+ % ignorespaces prevents spaces creeping in when after=\dontleavehmode
+ \dostarttagged\t!sectioncontent\empty
+ \ifempty\currentstructureplaceholder
+ \ifconditional\headisdisplay
+ \doubleexpandafter\ignorespaces
+ \else
+ \doubleexpandafter\ignorepars
+ \fi
+ \else
+ \expandafter\strc_sectioning_placeholder
+ \fi}
+
+%D \starttyping
+%D \startsubject[placeholder=todo,title=one]
+%D whatever one
+%D \stopsubject
+%D \stoptyping
+
+\def\strc_sectioning_placeholder
+ {\placeholder[\currentstructureplaceholder]%
+ \gobblenested{\e!start\currenthead}{\e!stop\currenthead}{\e!stop\currenthead}}
+
+% typesetting (the getters are public)
+
+\protected\def\strc_rendering_place_head_number_and_text
+ {\setheadmarking
+ \getheadnumber/\getheadtitle
+ \getheadsyncs}
+
+\protected\def\strc_rendering_place_head_text
+ {\setheadmarking
+ \getheadtitle
+ \getheadsyncs}
+
+\protected\def\strc_rendering_place_head_empty
+ {\setheadmarking
+ \getheadsyncs}
+
+\installcorenamespace{hiddenheadattr}
+\installcorenamespace{hiddenheadsync}
+
+% todo: when in the page builder we need to resolve the marking immediately
+% because otherwise we have an async
+
+\newbox\b_sectioning_delayed
+
+\def\strc_sectioning_delayed_flush
+ {\ifvoid\b_sectioning_delayed\else
+ \smashedbox\b_sectioning_delayed
+ \fi}
+
+\protected\def\strc_rendering_place_head_section % see hidden below
+ {\global\setbox\b_sectioning_delayed\hpack\bgroup
+ \setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
+ \hpack\headreferenceattributes{}% also does the mark
+ \theheadsynchronization
+ \egroup}
+
+\protected\def\strc_rendering_place_head_hidden % maybe trialtypesetting check
+ {\xdefcsname\??hiddenheadattr\currenthead\endcsname
+ {\headreferenceattributes}% can be used when making a box
+ \xdefcsname\??hiddenheadsync\currenthead\endcsname
+ {\noexpand\letgvalue{\??hiddenheadsync\currenthead}\relax
+ \noexpand\setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
+ \hpack\headreferenceattributes{}% otherwise no destination ... maybe tag ref as hidden and fall back on page reference
+ \theheadsynchronization}} % and it's a node anyway
+
+\permanent\def\synchronizehead #1{\begincsname\??hiddenheadsync#1\endcsname}
+\permanent\def\theheadreferenceattributes#1{\begincsname\??hiddenheadattr#1\endcsname}
+
+\permanent\protected\def\placerawheaddata [#1]{\synchronizehead{#1}}
+\permanent\protected\def\placerawheadtext [#1]{\getspecificstructuretitle{\thenamedheadlevel{#1}}}
+\permanent\protected\def\placerawheadnumber[#1]{\getfullstructurenumber{\thenamedheadlevel{#1}}}
+
+\permanent\protected\def\repeathead[#1]%
+ {\begingroup
+ \setupinteraction[\c!state=\v!stop]%
+ \def\currenthead{#1}
+ \strc_sectioning_initialize_placement
+ \strc_sectioning_initialize_number
+ \dostarttagged\t!sectioncaption\empty
+ \let\getheadsyncs \relax
+ \def\getheadtitle {\getmarking[#1]}
+ \def\getheadnumber{\getmarking[#1\v!number]}
+ \strc_sectioning_before_yes
+ \ifconditional\headshownumber
+ \strc_rendering_place_head_number_and_text
+ \else
+ \strc_rendering_place_head_text
+ \fi
+ \dostoptagged
+ \strc_sectioning_after_yes
+ \endgroup}
+
+% \setuphead[chapter][placehead=hidden]
+% \chapter {test}
+%
+% %(\synchronizehead{chapter}) % \getheadsyncs
+% %(\getfullstructurenumber{\thenamedheadlevel{chapter}})
+% %(\getspecificstructuretitle{\thenamedheadlevel{chapter}})
+%
+% (\placerawheaddata [chapter])
+% (\placerawheadnumber[chapter])
+% (\placerawheadtext [chapter])
+
+% pagebreaks
+
+\letcsname\??headmarknop\v!page \endcsname\donothing
+\defcsname\??headmarknop\v!reset \endcsname{\resetcurrentstructuremarks}
+\letcsname\??headmarknop\s!unknown\endcsname\donothing
+
+\letcsname\??headmarkyes\v!page \endcsname\donothing % to be checked: {\resetcurrentstructuremarks}
+\defcsname\??headmarkyes\v!reset \endcsname{\resetcurrentstructuremarks}
+\letcsname\??headmarkyes\s!unknown\endcsname\donothing
+
+\def\strc_sectioning_check_layout
+ {\edef\p_page{\headparameter\c!page}%
+ \ifempty\p_page
+ \strc_sectioning_check_layout_nop
+ \else
+ \strc_sectioning_check_layout_yes
+ \fi}
+
+\def\strc_sectioning_check_layout_nop
+ {\expandnamespaceparameter\??headmarknop\headparameter\c!marking\s!unknown}
+
+\def\strc_sectioning_check_layout_yes
+ {\page[\p_page]%
+ \expandnamespaceparameter\??headmarkyes\headparameter\c!marking\s!unknown
+ \edef\p_header{\headparameter\c!header}%
+ \ifempty\p_header \else
+ \doifelselayouttextline\v!header{\normalexpanded{\setuplayouttext[\v!header][\c!state=\p_header]}}\donothing
+ \fi
+ \edef\p_text{\headparameter\c!text}%
+ \ifempty\p_text \else
+ \doifelselayouttextline\v!text {\normalexpanded{\setuplayouttext[\v!text ][\c!state=\p_text ]}}\donothing
+ \fi
+ \edef\p_footer{\headparameter\c!footer}%
+ \ifempty\p_footer \else
+ \doifelselayouttextline\v!footer{\normalexpanded{\setuplayouttext[\v!footer][\c!state=\p_footer]}}\donothing
+ \fi}
+
+\newcount \c_strc_sectioning_preceding_level \c_strc_sectioning_preceding_level\plusone
+\newconditional\c_strc_sectioning_auto_break \settrue\c_strc_sectioning_auto_break
+\newconditional\c_strc_sectioning_ignore_page
+\newsignal \d_strc_sectioning_continuous_signal
+
+\protected\def\strc_sectioning_inject_continuous_signal
+ {\ifhmode
+ \hskip\d_strc_sectioning_continuous_signal\relax
+ \fi}
+
+% \let\dotagsectionlevel\relax
+
+\def\strc_sectioning_before_yes
+ {\strc_sectioning_check_before\strc_sectioning_handle_page_yes
+ \headparameter\c!inbetween
+ \dostarttaggedchained\t!section\currenthead\??head
+% \dotagsectionlevel
+ }
+
+\def\strc_sectioning_before_nop
+ {\strc_sectioning_check_before\strc_sectioning_handle_page_nop
+ \headparameter\c!inbetween
+ \dostarttagged\currenthead\empty} % this is a weird one .. needs checking
+
+\def\strc_sectioning_empty_correction
+ {\ifconditional\c_strc_sectioning_empty
+ % this needs checking
+ \penalty\plustenthousand
+ \vskip-\lineheight
+ \kern\zeropoint
+ \prevdepth\strutdepth
+ \fi}
+
+\def\strc_sectioning_after_nop
+ {}
+
+\def\strc_sectioning_check_before#1%
+ {\ifhmode
+ \scratchcounter\lastpenalty
+ \unpenalty % no beauty in this
+ \ifdim\lastskip=\d_strc_sectioning_continuous_signal
+ % no page break
+ \ifconditional\c_strc_sectioning_ignore_page
+ \setfalse\c_strc_sectioning_ignore_page
+ \else
+ \global\c_strc_sectioning_preceding_level\currentheadlevel
+ \nobreak
+ \fi
+ % \global\settrue\c_strc_rendering_continuous
+ \else
+ \penalty\scratchcounter
+ % \global\setfalse\c_strc_rendering_continuous
+ #1%
+ \fi
+ \else
+ % \global\setfalse\c_strc_rendering_continuous
+ #1%
+ \fi}
+
+%permanent\def\currentsectioncountervalue {\clf_depthnumber\numexpr\thenamedheadlevel\currenthead\relax}
+%permanent\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead+\minusone\relax}
+
+\permanent\def\currentsectioncountervalue {\clf_depthnumber\numexpr\thenamedheadlevel\currenthead\relax}
+%permanent\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead+\minusone\relax}
+\permanent\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\previoushead\relax}
+
+\mutable\let\previoushead\empty
+
+\def\strc_sectioning_handle_page_nop
+ {\edef\p_continue{\headparameter\c!continue}%
+ \ifx\p_continue\v!yes
+ \ifx\currenthead\previoushead % not really needed
+ \strc_sectioning_check_layout
+ \orelse\ifnum\previoussectioncountervalue=\zerocount
+ \strc_sectioning_check_layout
+ \orelse\ifnum\currentsectioncountervalue>\zerocount
+ \strc_sectioning_check_layout
+ \fi
+ \else
+ \strc_sectioning_check_layout
+ \fi
+ \glet\previoushead\currenthead}
+
+
+\def\strc_sectioning_handle_page_yes
+ {\ifconditional\c_strc_sectioning_ignore_page
+ \setfalse\c_strc_sectioning_ignore_page
+ \else
+ % beware, these numbers are not yet know here
+ \strc_sectioning_handle_page_nop
+ \edef\p_aligntitle{\headparameter\c!aligntitle}%
+ \ifx\p_aligntitle\v!float
+ \ifconditional\c_strc_sectioning_auto_break
+ \spac_vspacing_same_page\currentheadlevel\zerocount
+ \fi
+ \headparameter\c!before\relax
+ \indent
+ \else
+ \page_otr_command_flush_side_floats
+ \ifconditional\c_strc_sectioning_auto_break
+ \spac_vspacing_same_page\currentheadlevel\zerocount
+ \fi
+ \headparameter\c!before\relax
+ \fi
+ \global\c_strc_sectioning_preceding_level\currentheadlevel
+ \fi
+ \glet\previoushead\currenthead}
+
+\def\strc_sectioning_depth_correction
+ {\ifvmode
+ \edef\p_depthcorrection{\headparameter\c!depthcorrection}%
+ \ifx\p_depthcorrection\v!strut
+ \prevdepth\strutdepth
+ \fi
+ \fi}
+
+\def\strc_sectioning_after_yes
+ {\ifconditional\headisdisplay
+ \ifconditional\c_strc_sectioning_auto_break
+ \spac_vspacing_same_page\currentheadlevel\plusone
+ \fi
+ \strc_sectioning_empty_correction
+ \headparameter\c!after
+ \strc_sectioning_depth_correction
+ \fi}
+
+\protected\def\strc_sectioning_prevent_page_break % see strc-con
+ {\ifconditional\c_strc_sectioning_auto_break
+ \spac_vspacing_same_page\currentheadlevel\plustwo
+ \fi}
+
+
+% We do support negative numbers but it can have side effects that we won't catch:
+%
+% \chapter{some} \setupheadnumber[chapter][3] \chapter{more}
+% \setupheadnumber[section][8] \section{b} \section{c} \setupheadnumber[section][-1] \section{d}
+
+\permanent\def\thenamedheadlevel#1%
+ {\sectionlevel{\sectionheadsection{\sectionheadcoupling{#1}}}}
+
+\permanent\tolerant\protected\def\setupheadnumber[#1]#*[#2]% todo: reset if at other level
+ {\setstructurenumber{\thenamedheadlevel{#1}}{\number#2}}
+
+\permanent\protected\def\determineheadnumber[#1]%
+ {\xdef\currentheadnumber{\getstructurenumber{\thenamedheadlevel{#1}}}}
+
+% The previous macro is been replaced by the expandable:
+
+\permanent\def\namedheadnumber #1{\getstructurenumber {\thenamedheadlevel{#1}}}
+\permanent\def\somenamedheadnumber#1#2{\getsomestructurenumber{\thenamedheadlevel{#1}}{#2}}
+
+\permanent\tolerant\protected\def\headnumber[#1]#*[#2]% simple case is just a number
+ {\getsomefullstructurenumber{\ifparameter#1\or\thenamedheadlevel{#1}\fi}{#2}}
+
+\permanent\tolerant\protected\def\someheadnumber[#1]#*[#2]%
+ {\dontleavehmode
+ \begingroup
+ \edef\currenthead{#1}%
+ \getsomefullstructurenumber{\thenamedheadlevel{#1}}{#2}%
+ \endgroup}
+
+% \mutable\def\currentheadtext{obsolete,\space use marks}
+
+% list references, will be redone in lua when we need it
+
+% \let\startlistreferences\relax
+% \let\stoplistreferences \relax
+
+% experimental
+
+\newconditional\c_strc_sectioning_auto_levels
+
+\appendtoks
+ \settrue\c_strc_sectioning_auto_levels
+\to \everyenableelements
+
+\protected\def\strc_sectioning_initialize_autolevel
+ {\ifconditional\c_strc_sectioning_auto_levels
+ \clf_autonextstructurelevel\currentheadlevel\relax
+ \global\setfalse\c_strc_sectioning_auto_levels
+ \fi}
+
+\permanent\protected\def\triggerautostructurelevel
+ {\global\settrue\c_strc_sectioning_auto_levels}
+
+\permanent\protected\def\finalizeautostructurelevels
+ {\clf_autofinishstructurelevels}
+
+\permanent\protected\def\finalizeautostructurelevel
+ {\dostoptagged
+ \dostoptagged}
+
+\appendtoks
+ \finalizeautostructurelevels
+\to \everystoptext
+
+\stopcontextdefinitioncode
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl
new file mode 100644
index 00000000000..df573a7e995
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-syn.mkxl
@@ -0,0 +1,680 @@
+%D \module
+%D [ file=strc-syn,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Synonyms and Sorting,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Structure Macros / Synonyms and Sorting}
+
+\registerctxluafile{strc-syn}{}
+
+%D Although we could nowadays build this on top of regular lists we keep this
+%D more efficient variant around. Eventually we can add some options to lists
+%D that also provide such functionality but at the cost of much more overhead.
+%D
+%D We show a usage of both synonyms and sorts, which are deep down variants of
+%D so called simple lists. A definition looks like this:
+%D
+%D \startbuffer
+%D \definesynonyms
+%D [myabbreviation]
+%D
+%D \setupsynonyms
+%D [myabbreviation]
+%D [headstyle=bold,
+%D headcolor=darkred,
+%D synonymstyle=boldslanted,
+%D synonymcolor=darkblue,
+%D textstyle=slanted,
+%D textcolor=darkgreen,
+%D style=normal,
+%D color=darkyellow]
+%D
+%D \definesorting
+%D [mylogo]
+%D
+%D \setupsorting
+%D [mylogo]
+%D [style=bold,
+%D color=darkmagenta]
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D More complex definitions involves commands to call up meanings and such. The
+%D use of the defined commands is as follows: \
+%D
+%D \startbuffer
+%D \myabbreviation [FIRST] {TheFirst} {The First Words}
+%D \myabbreviation [SECOND] {TheSecond} {The Second Words}
+%D \myabbreviation [THIRD] {TheThird} {The Third Words}
+%D
+%D \mylogo [FOURTH] {TheFourth}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D By default a synonym is just typeset and flagges as being used, so that in
+%D a list it wil be shows with its meaning. You can however also expand the
+%D meaning automatically at first use:
+%D
+%D \startbuffer
+%D \setupsynonyms[myabbreviation][alternative=first]
+%D
+%D We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH.
+%D
+%D We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH.
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D We can change the order, as demonstrated in:
+%D
+%D \startbuffer
+%D \resetshownsynonyms[myabbreviation]
+%D
+%D \setupsynonyms[myabbreviation][alternative=last]
+%D
+%D We have \FIRST\ and \THIRD\ or \FOURTH.
+%D
+%D We have \FIRST\ and \THIRD\ or \FOURTH.
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D A list is called up with:
+%D
+%D \startbuffer
+%D \placelistofsynonyms[myabbreviation]
+%D
+%D \placelistofsorts[mylogo]
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D The lists are constructions (like descriptions are) and can be set up
+%D likewise.
+
+% todo: add 'define only' option to descriptions, then add sorting (also based on key)
+% and call to definition -> replaces this module
+
+\unprotect
+
+% split but common in lua
+
+\permanent\protected\def\preprocessexpansion#1#2#3#4% do this at the lua end if still needed
+ {\ifx#1\s!xml
+ \xmlstartraw
+ \xdef#2{#4}%
+ \xmlstopraw
+ \glet#3\s!xml
+ \else
+ \ifx#1\v!yes
+ \xdef#2{#4}%
+ \else
+ \xdef#2{\detokenize{#4}}%
+ \fi
+ \glet#3\s!tex
+ \fi}
+
+%D We now use a simple list variant:
+
+\installcorenamespace {simplelist}
+
+\installcommandhandler \??simplelist {simplelist} \??simplelist
+
+\aliased\let\setupsimplelists\setupsimplelist
+
+\setupsimplelists[%
+ %c!title=,
+ %c!text=,
+ %
+ %c!style=,
+ %c!color=,
+ %c!command=,
+ %c!align=,
+ %
+ %c!headstyle=,
+ %c!headcolor=,
+ %c!headalign=,
+ %
+ %c!titlestyle=,
+ %c!titlecolor=,
+ %c!titlecommand=,
+ %c!titleleft=,
+ %c!titleright=,
+ %
+ %c!closesymbol=,
+ %c!closecommand=,
+ %
+ \c!alternative=\v!left,
+ \c!display=\v!yes,
+ \c!width=7\emwidth,
+ \c!distance=\emwidth,
+ \c!titledistance=.5\emwidth,
+ %c!hang=,
+ %c!sample=,
+ \c!margin=\v!no,
+ \c!before=\startpacked,
+ \c!inbetween=\blank,
+ \c!after=\stoppacked,
+ %c!indentnext=,
+ %c!indenting=,
+ %
+ \c!expansion=\v!no,
+ %c!xmlsetup=,
+ %s!catcodes=,
+ \s!language=\currentmainlanguage,
+]
+
+\appendtoks
+ \setfalse\c_strc_constructions_define_commands
+ \ifempty\currentsimplelistparent
+ \defineconstruction[\currentsimplelist][\s!handler=\v!simplelist,\c!level=1]%
+ \else
+ \defineconstruction[\currentsimplelist][\currentsimplelistparent][\s!handler=\v!simplelist,\c!level=1]%
+ \fi
+ \settrue\c_strc_constructions_define_commands
+\to \everydefinesimplelist
+
+\protected\defcsname\??constructioninitializer\v!simplelist\endcsname
+ {\let \currentsimplelist \currentconstruction
+ \enforced\let\constructionparameter \simplelistparameter
+ \enforced\let\constructionnamespace \??simplelist
+ \enforced\let\detokenizedconstructionparameter\detokenizedsimplelistparameter
+ \enforced\let\letconstructionparameter \letsimplelistparameter
+ \enforced\let\useconstructionstyleandcolor \usesimpleliststyleandcolor
+ \enforced\let\setupcurrentconstruction \setupcurrentsimplelist}
+
+\protected\defcsname\??constructionfinalizer\v!simplelist\endcsname
+ {}
+
+\protected\defcsname\??constructiontexthandler\v!simplelist\endcsname
+ {\begingroup
+ \useconstructionstyleandcolor\c!headstyle\c!headcolor
+ \the\everyconstruction
+ \constructionparameter\c!headcommand
+ {\strut
+ \currentsimplelistentry}%
+ \endgroup}
+
+% And we build on top of this.
+
+\ifdefined\dotagsynonym \else \aliased\let\dotagsynonym\relax \fi
+\ifdefined\dotagsorting \else \aliased\let\dotagsorting\relax \fi
+
+\definesimplelist
+ [\v!synonym]
+ [\c!state=\v!start,
+ %\c!synonymstyle=,
+ %\c!textstyle=,
+ %\c!headstyle=,
+ %\c!headcolor=,
+ %\c!criterium=,
+ \c!location=\v!left,
+ \c!width=5\emwidth,
+ \c!distance=\zeropoint,
+ %\c!sample=,
+ %\c!hang=,
+ %\c!align=,
+ %\c!before=,
+ %\c!inbetween=,
+ %\c!after=,
+ \c!indentnext=\v!no,
+ %\c!expansion=,
+ \c!method=]
+
+\aliased\let\setupsynonyms\setupsimplelist
+
+% these might become private
+
+\mutable\let\currentsynonymoption \empty
+\mutable\let\currentsynonymcoding \empty
+\mutable\let\currentsynonymexpansion\empty
+\mutable\let\currentsynonym \empty
+\mutable\let\currentsynonymtag \empty
+\mutable\let\currentsynonymtext \empty
+
+\permanent\tolerant\protected\def\definesynonyms[#1]#*[#2]#*[#3]#*[#4]% name plural \meaning \use
+ {\ifnum\lastarguments=\plusfour
+ \protected\instance\def#4##1{\strc_synonyms_insert{#1}{##1}}% name tag
+ \frozen\instance\protected\defcsname#1\endcsname{\definesynonym[\v!no][#1]}% \name
+ \else
+ \frozen\instance\protected\defcsname#1\endcsname{\definesynonym[\v!yes][#1]}% \name
+ \fi
+ \ifparameter#3\or
+ \frozen\instance\protected\def#3##1{\strc_synonyms_insert_meaning{#1}{##1}}% \meaning
+ \fi
+ \edef\currentsynonym{#1}%
+ %
+ %\checksynonymparent
+ %\setupcurrentsynonym[\s!single={#1},\s!multi={#2}]%
+ \setfalse\c_strc_constructions_define_commands
+ \definesimplelist
+ [\currentsynonym]%
+ [\v!sorting]
+ [\s!single={#1},%
+ \s!multi={#2}]%
+ \settrue\c_strc_constructions_define_commands
+ \ifparameter#2\or
+ %
+ \presetheadtext[#2=\Word{#2}]% changes the \if...argument
+ %
+ % These will go away. Actually the overloads catched this empty case!
+ %
+ \frozen\instance\protected\defcsname\e!setup #2\e!endsetup\endcsname{\setupsynonyms[#1]}% obsolete definition
+ \frozen\instance\protected\defcsname\e!place \e!listof#2\endcsname{\placelistofsynonyms[#1]}% accepts extra argument
+ \frozen\instance\protected\defcsname\e!complete\e!listof#2\endcsname{\completelistofsynonyms[#1]}%
+ \fi}
+
+\permanent\tolerant\protected\def\definesynonym[#1]#*[#2]#*[#3]%
+ {\begingroup
+ \edef\currentsynonymoption{#1}%
+ \edef\currentsynonym{#2}%
+ \edef\currentsynonymtag{#3}%
+ \strc_synonyms_define_entry}
+
+\def\strc_synonyms_define_entry#1#2%
+ {\let\currentsimplelist\currentsynonym
+ \ifempty\currentsynonymtag
+ \edef\currentsynonymtag{#1}%
+ \fi
+ \ifempty\currentsynonymtag \else
+ % this is not that efficient, esp when we load a big list
+ \edef\currentsynonymexpansion{\simplelistparameter\c!expansion}%
+ \preprocessexpansion\currentsynonymexpansion\m_synonyms_text \currentsynonymcoding{#1}%
+ \preprocessexpansion\currentsynonymexpansion\m_synonyms_meaning\currentsynonymcoding{#2}%
+ % currently they all end up in the tuc file
+ \clf_registersynonym
+ {\currentsynonym}%
+ {synonym}%
+ {%
+ metadata {%
+ catcodes \catcodetable
+ coding {\currentsynonymcoding}%
+ \ifx\currentsynonymcoding\s!xml
+ xmlroot {\xmldocument}%
+ \fi
+ }%
+ definition {%
+ tag {\currentsynonymtag}%
+ synonym {\m_synonyms_text}%
+ meaning {\m_synonyms_meaning}%
+ % used false
+ }%
+ }%
+ \relax
+ \ifx\currentsynonymoption\v!yes
+ \instance\setuxvalue\currentsynonymtag{\strc_synonyms_insert{\currentsynonym}{\currentsynonymtag}}%
+ \fi
+ \fi
+ \endgroup}
+
+\permanent\tolerant\protected\def\registersynonym [#1]#*[#2]{\clf_registerusedsynonym{#1}{#2}}
+\permanent \protected\def\currentsynonymname {\clf_synonymname{\currentsimplelist}{\currentsynonymtag}}
+\permanent \protected\def\currentsynonymmeaning {\clf_synonymmeaning{\currentsimplelist}{\currentsynonymtag}}
+\permanent \protected\def\doifelsecurrentsynonymused {\clf_doifelsesynonymused{\currentsimplelist}{\currentsynonymtag}}
+\permanent \protected\def\doifelsecurrentsynonymshown{\clf_doifelsesynonymshown{\currentsimplelist}{\currentsynonymtag}}
+\permanent \protected\def\resetusedsynonyms [#1]{\clf_resetusedsynonyms{#1}}
+\permanent \protected\def\resetshownsynonyms [#1]{\clf_resetshownsynonyms{#1}}
+
+\aliased\let\rawsynonymname \clf_synonymname
+\aliased\let\rawsynonymmeaning\clf_synonymmeaning
+
+\installcorenamespace{simplelistalternative} % specific ways of rendering a list
+\installcorenamespace{simplelistrenderings} % a namespace for setups (rather local)
+
+\installcommandhandler \??simplelistalternative {simplelistalternative} \??simplelistalternative
+
+\setupsimplelist
+ [\v!synonym]
+ [\c!alternative=\v!normal]
+
+\protected\def\strc_synonyms_insert_meaning#1#2% name tag
+ {\dontleavehmode % otherwise we don't get it right at the beginning of a par
+ \begingroup
+ \def\currentsimplelist{#1}%
+ \def\currentsynonymtag{#2}%
+ \fastsetup{\??simplelistrenderings::\v!text}%
+ \endgroup}
+
+\protected\def\strc_synonyms_insert#1#2% name tag
+ {\dontleavehmode % otherwise we don't get it right at the beginning of a par
+ \begingroup
+ \edef\currentsimplelist{#1}%
+ \let\currentsynonym\currentsimplelist % for a while
+ \def\currentsynonymtag{#2}%
+ \edef\currentsimplelistalternative{\simplelistparameter\c!alternative}%
+ \doifnotcommandhandler\??simplelistalternative\currentsimplelistalternative
+ {\let\currentsimplelistalternative\v!normal}%
+ \fastsetup{\??simplelistrenderings:\v!synonym:\currentsimplelistalternative}%
+ \normalexpanded{\endgroup\simplelistparameter\c!next}}
+
+% \setupsimplelistalternative
+% [\c!command=\directsimplelistparameter\c!command]
+
+\definesimplelistalternative
+ [\v!normal]
+ [\c!inbetween=\space,
+ \c!left=(,
+ \c!right=)]
+
+\definesimplelistalternative
+ [\v!first]
+ [\v!normal]
+
+\definesimplelistalternative
+ [\v!last]
+ [\v!normal]
+
+\startsetups[\??simplelistrenderings::\v!synonym]
+ \begingroup
+ \dostarttaggedchained\t!synonym\currentsynonym\??simplelist
+ \dotagsynonym
+ \usesimpleliststyleandcolor\c!synonymstyle\c!synonymcolor
+ \simplelistparameter\c!synonymcommand{\currentsynonymname}%
+ \dostoptagged
+ \endgroup
+\stopsetups
+
+\startsetups[\??simplelistrenderings::\v!text]
+ \begingroup
+ \usehyphensparameter\simplelistparameter
+ \usesimpleliststyleandcolor\c!textstyle\c!textcolor
+ \simplelistparameter\c!textcommand{\currentsynonymmeaning}%
+ \endgroup
+\stopsetups
+
+\startsetups[\??simplelistrenderings:\v!synonym:\v!normal]
+ \fastsetup{\??simplelistrenderings::\v!synonym}
+\stopsetups
+
+\startsetups[\??simplelistrenderings:\v!synonym:\v!first]
+ \fastsetup{\??simplelistrenderings::\v!synonym}
+ \doifelsecurrentsynonymshown \donothing {
+ \simplelistalternativeparameter\c!inbetween
+ \simplelistalternativeparameter\c!left
+ \fastsetup{\??simplelistrenderings::\v!text}
+ \simplelistalternativeparameter\c!right
+ }
+\stopsetups
+
+\startsetups[\??simplelistrenderings:\v!synonym:\v!last]
+ \doifelsecurrentsynonymshown {
+ \fastsetup{\??simplelistrenderings::\v!synonym}
+ } {
+ \fastsetup{\??simplelistrenderings::\v!text}
+ \simplelistalternativeparameter\c!inbetween
+ \simplelistalternativeparameter\c!left
+ \fastsetup{\??simplelistrenderings::\v!synonym}
+ \simplelistalternativeparameter\c!right
+ }
+\stopsetups
+
+\aliased\let\synonymentry\relax
+
+\permanent\tolerant\protected\def\placelistofsynonyms[#1]#*[#2]%
+ {\begingroup
+ \edef\currentsimplelist{#1}%
+ \doifelsecommandhandler\??simplelist\currentsimplelist
+ {\strc_constructions_initialize{#1}%
+ \setupcurrentsimplelist[#2]%
+ \enforced\let\synonymentry\strc_synonym_normal
+ % so we can hook tabulate into before and after
+ \normalexpanded{\simplelistparameter\c!before
+ \noexpand\clf_processsynonyms
+ {#1}%
+ {%
+ criterium {\simplelistparameter\c!criterium}%
+ language {\simplelistparameter\s!language}%
+ method {\simplelistparameter\c!method}%
+ }%
+ \relax
+ \simplelistparameter\c!after}%
+ \relax}%
+ {}% todo: message that invalid
+ \endgroup}
+
+\permanent\tolerant\protected\def\completelistofsynonyms[#1]#*[#2]%
+ {\begingroup
+ \edef\currentsimplelist{#1}%
+ \doifelsecommandhandler\??simplelist\currentsimplelist
+ {\normalexpanded{\startnamedsection[\v!chapter][\c!title={\headtext{\simplelistparameter\s!multi}},\c!reference=#1]}%
+ \placelistofsynonyms[#1][#2]%
+ \page
+ \stopnamedsection}%
+ {}% todo: message that invalid
+ \endgroup}
+
+\mutable\let\currentsimplelistentry\empty
+
+\protected\def\strc_synonym_normal#1#2#3#4%
+ {\begingroup
+ \def\currentsimplelistentry{#3}%
+ \csname\??constructionstarthandler\v!construction\endcsname
+ #4%
+ \csname\??constructionstophandler\v!construction\endcsname
+ \endgroup}
+
+%D Sorting (a simplified version of synonym).
+
+\definesimplelist
+ [\v!sorting]
+ [\c!state=\v!start,
+ %\c!command=, % we test for defined !
+ %\c!criterium=,
+ %\c!style=,
+ \c!before=\startpacked,
+ \c!after=\stoppacked,
+ %\c!expansion=,
+ \c!method=]
+
+\aliased\let\setupsorting\setupsimplelist
+
+% if #3=\relax or \v!none, then no command but still protected
+
+% these might become private
+
+\mutable\let\currentsortingoption \empty
+\mutable\let\currentsortingcoding \empty
+\mutable\let\currentsortingexpansion\empty
+\mutable\let\currentsorting \empty
+\mutable\let\currentsortingtag \empty
+\mutable\let\currentsortingtext \empty
+
+\permanent\tolerant\protected\def\definesorting[#1]#*[#2]#*[#3]%
+ {\ifnum\lastarguments=\plusthree
+ \doifnot{#3}\v!none
+ {\ifx#3\relax \else
+ \protected\instance\def#3##1{\strc_sorting_insert{#1}{##1}}%
+ \fi}%
+ \frozen\instance\protected\defcsname#1\endcsname{\definesort[\v!no][#1]}%
+ \else
+ \frozen\instance\protected\defcsname#1\endcsname{\definesort[\v!yes][#1]}%
+ \fi
+ \edef\currentsorting{#1}%
+ \setfalse\c_strc_constructions_define_commands
+ \definesimplelist
+ [\currentsorting]%
+ [\v!sorting]
+ [\s!single={#1},%
+ \s!multi={#2}]%
+ \settrue\c_strc_constructions_define_commands
+ \ifparameter#2\or
+ %
+ \presetheadtext[#2=\Word{#2}]% changes the \if...argument
+ %
+ % These will go away. Actually the overloads catched this empty case!
+ %
+ %
+ \presetheadtext[#2=\Word{#2}]%
+ %
+ \frozen\instance\protected\defcsname\e!setup #2\e!endsetup\endcsname{\setupsorting[#1]}% obsolete definition
+ \frozen\instance\protected\defcsname\e!place \e!listof#2\endcsname{\placelistofsorts[#1]}%
+ \frozen\instance\protected\defcsname\e!complete\e!listof#2\endcsname{\completelistofsorts[#1]}%
+ \fi}
+
+\permanent\tolerant\protected\def\definesort[#1]#*[#2]#*[#3]%
+ {\begingroup
+ \edef\currentsortingoption{#1}%
+ \edef\currentsorting{#2}%
+ \edef\currentsortingtag{#3}%
+ \strc_sorting_define_entry}
+
+\def\strc_sorting_define_entry#1%
+ {\let\currentsimplelist\currentsimplelist
+ \ifempty\currentsortingtag
+ \edef\currentsortingtag{#1}%
+ \fi
+ \ifempty\currentsortingtag \else
+ \edef\currentsortingexpansion{\simplelistparameter\c!expansion}%
+ \preprocessexpansion\currentsortingexpansion\currentsortingtext\currentsortingcoding{#1}%
+ \clf_registersynonym
+ {\currentsorting}%
+ {sorting}%
+ {%
+ metadata {%
+ catcodes \catcodetable
+ coding {\currentsortingcoding}%
+ \ifx\currentsortingcoding\s!xml
+ xmlroot {\xmldocument}%
+ \fi
+ }%
+ definition {%
+ tag {\currentsortingtag}%
+ synonym {\currentsortingtext}%
+ % used false
+ }%
+ }%
+ \relax
+ \ifx\currentsortingoption\v!yes
+ \instance\setuxvalue\currentsortingtag{\strc_sorting_insert{\currentsorting}{\currentsortingtag}}%
+ \fi
+ \fi
+ \endgroup}
+
+\permanent\protected\def\currentsortingname {\clf_synonymname {\currentsimplelist}{\currentsortingtag}}
+\permanent\protected\def\doifelsecurrentsortingused {\clf_doifelsesynonymused {\currentsimplelist}{\currentsortingtag}}
+\permanent\protected\def\resetusedsortings [#1]{\clf_resetusedsynonyms {#1}}
+
+\setupsimplelist
+ [\v!sorting]
+ [\c!alternative=\v!normal]
+
+\protected\def\strc_sorting_insert#1#2% name tag
+ {\dontleavehmode % otherwise we don't get it right at the beginning of a par
+ \begingroup
+ % no kap currently, of .. we need to map cap onto WORD
+ \edef\currentsorting{#1}%
+ \edef\currentsortingtag{#2}%
+ \let\currentsimplelist\currentsorting
+ \edef\currentsimplelistalternative{\simplelistparameter\c!alternative}%
+ \doifnotcommandhandler\??simplelistalternative\currentsimplelistalternative
+ {\let\currentsimplelistalternative\v!normal}%
+ \fastsetup{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}%
+ \normalexpanded{\endgroup\simplelistparameter\c!next}}
+
+% or:
+%
+% \doifelsesetups{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}
+% {\fastsetup{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}}
+% {\fastsetup{\??simplelistrenderings:\v!sorting:\v!normal}}
+
+\startsetups [\??simplelistrenderings:\v!sorting:\v!normal]
+ \fastsetup{\??simplelistrenderings::\v!sorting}%
+\stopsetups
+
+\startsetups [\??simplelistrenderings::\v!sorting]
+ \begingroup
+ \dostarttaggedchained\t!sorting\currentsorting\??simplelist
+ \dotagsorting
+ \usesimpleliststyleandcolor\c!style\c!color
+ \currentsortingname
+ \dostoptagged
+ \endgroup
+\stopsetups
+
+\permanent\tolerant\protected\def\registersort[#1]#*[#2]%
+ {\clf_registerusedsynonym{#1}{#2}}
+
+% before after
+%
+% maybe just 'commandset' and then combine
+
+\permanent\tolerant\protected\def\placelistofsorts[#1]#*[#2]%
+ {\begingroup
+ \edef\currentsimplelist{#1}%
+ \strc_constructions_initialize{#1}%
+ \setupcurrentsimplelist[#2]%
+ \edef\p_simplelist_command{\simplelistparameter\c!command}%
+ \ifempty\p_simplelist_command
+ \enforced\let\synonymentry\strc_sorting_normal
+ \else
+ \enforced\let\synonymentry\strc_sorting_command
+ \fi
+ % so we can hook tabulate into before and after
+ \normalexpanded{\simplelistparameter\c!before
+ \noexpand\clf_processsynonyms
+ {#1}%
+ {%
+ criterium {\simplelistparameter\c!criterium}%
+ language {\simplelistparameter\s!language}%
+ method {\simplelistparameter\c!method}%
+ }%
+ \relax
+ \simplelistparameter\c!after}%
+ \endgroup}
+
+\permanent\tolerant\protected\def\completelistofsorts[#1]#*[#2]%
+ {\begingroup
+ \edef\currentsimplelist{#1}%
+ \normalexpanded{\startnamedsection[\v!chapter][\c!title={\headtext{\simplelistparameter\s!multi}},\c!reference=#1]}%
+ \placelistofsorts[#1][#2]%
+ \page
+ \stopnamedsection
+ \endgroup}
+
+\def\strc_sorting_command#1#2#3#4% #4 is meaning but empty here
+ {\p_simplelist_command{#1}{#2}{#3}}
+
+\def\strc_sorting_normal#1#2#3#4% #4 is meaning but empty here
+ {\begingroup
+ \usesimpleliststyleandcolor\c!style\c!color
+ #3%
+ \endgroup
+ \par}
+
+%D Presets.
+
+% To be considered:
+%
+% \setupsimplelist
+% [\v!sorting]
+% [\c!headstyle=\simplelistparameter\c!synonymstyle,
+% \c!headcolor=\simplelistparameter\c!synonymcolor,
+% \c!style=\simplelistparameter\c!textstyle,
+% \c!color=\simplelistparameter\c!textcolor]
+
+\definesynonyms
+ [\v!abbreviation]
+ [\v!abbreviations]
+ [\infull]
+
+\setupsynonyms
+ [\v!abbreviation]
+ [\c!hyphens=\v!no, % new, not yet in setup definitions
+ \c!textstyle=\v!capital]
+
+\definesorting
+ [\v!logo]
+ [\v!logos]
+% [\logogram] % no
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-tag.lmt b/Master/texmf-dist/tex/context/base/mkxl/strc-tag.lmt
new file mode 100644
index 00000000000..96510f24eac
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-tag.lmt
@@ -0,0 +1,615 @@
+if not modules then modules = { } end modules ['strc-tag'] = {
+ version = 1.001,
+ comment = "companion to strc-tag.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is rather experimental code. Tagging happens on the fly and there are two analysers
+-- involved: the pdf backend tagger and the exporter. They share data but there are subtle
+-- differences. Each tag carries a specification and these can be accessed by attribute (the
+-- end of the chain tag) or by so called fullname which is a tagname combined with a number.
+
+local type, next = type, next
+local insert, remove, unpack, concat, merge = table.insert, table.remove, table.unpack, table.concat, table.merge
+local find, topattern, format = string.find, string.topattern, string.format
+local lpegmatch, P, S, C, Cc = lpeg.match, lpeg.P, lpeg.S, lpeg.C, lpeg.Cc
+local allocate = utilities.storage.allocate
+local settings_to_hash = utilities.parsers.settings_to_hash
+local setmetatableindex = table.setmetatableindex
+
+local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end)
+
+local report_tags = logs.reporter("structure","tags")
+
+local attributes = attributes
+local structures = structures
+local implement = interfaces.implement
+
+local a_tagged = attributes.private('tagged')
+
+local unsetvalue = attributes.unsetvalue
+local codeinjections = backends.codeinjections
+
+local texgetattribute = tex.getattribute
+local texsetattribute = tex.setattribute
+
+local taglist = allocate() -- access by attribute
+local specifications = allocate() -- access by fulltag
+local labels = allocate()
+local stack = { }
+local chain = { }
+local ids = { }
+local enabled = false
+local tagcontext = { }
+local tagpatterns = { }
+local lasttags = { }
+local stacksize = 0
+local metadata = nil -- applied to the next element
+local documentdata = { }
+local extradata = false
+
+local tags = structures.tags
+tags.taglist = taglist -- can best be hidden
+tags.labels = labels
+tags.patterns = tagpatterns
+tags.specifications = specifications
+
+function tags.current()
+ if stacksize > 0 then
+ return stack[stacksize] -- maybe copy or proxy
+ end
+end
+
+-- Tags are internally stored as:
+--
+-- tag>number tag>number tag>number
+
+local p_splitter = C((1-S(">"))^1) * P(">") * C(P(1)^1)
+tagpatterns.splitter = p_splitter
+
+local properties = allocate { -- todo: more "record = true" to improve formatting
+
+ document = { pdf = "Div", nature = "display" },
+
+ division = { pdf = "Div", nature = "display" },
+ paragraph = { pdf = "P", nature = "mixed" },
+ p = { pdf = "P", nature = "mixed" },
+ construct = { pdf = "Span", nature = "inline" },
+ highlight = { pdf = "Span", nature = "inline" },
+
+ section = { pdf = "Sect", nature = "display" },
+ sectioncaption = { pdf = "Div", nature = "display", record = true },
+ sectiontitle = { pdf = "H", nature = "mixed" },
+ sectionnumber = { pdf = "H", nature = "mixed" },
+ sectioncontent = { pdf = "Div", nature = "display" },
+
+ itemgroup = { pdf = "L", nature = "display" },
+ item = { pdf = "LI", nature = "display" },
+ itemtag = { pdf = "Lbl", nature = "mixed" },
+ itemcontent = { pdf = "LBody", nature = "mixed" },
+ itemhead = { pdf = "Div", nature = "display" },
+ itembody = { pdf = "Div", nature = "display" },
+
+ description = { pdf = "Div", nature = "display" },
+ descriptiontag = { pdf = "Div", nature = "mixed" },
+ descriptioncontent = { pdf = "Div", nature = "mixed" },
+ descriptionsymbol = { pdf = "Span", nature = "inline" }, -- note reference
+
+ verbatimblock = { pdf = "Code", nature = "display" },
+ verbatimlines = { pdf = "Code", nature = "display" },
+ verbatimline = { pdf = "Code", nature = "mixed" },
+ verbatim = { pdf = "Code", nature = "inline" },
+
+ lines = { pdf = "Code", nature = "display" },
+ line = { pdf = "Code", nature = "mixed" },
+ linenumber = { pdf = "Span", nature = "inline" },
+
+ synonym = { pdf = "Span", nature = "inline" },
+ sorting = { pdf = "Span", nature = "inline" },
+
+ register = { pdf = "Div", nature = "display" },
+ registerlocation = { pdf = "Span", nature = "inline" },
+ registersection = { pdf = "Div", nature = "display" },
+ registertag = { pdf = "Span", nature = "mixed" },
+ registerentries = { pdf = "Div", nature = "display" },
+ registerentry = { pdf = "Div", nature = "display" },
+ registercontent = { pdf = "Span", nature = "mixed" },
+ registersee = { pdf = "Span", nature = "mixed" },
+ registerpages = { pdf = "Span", nature = "mixed" },
+ registerpage = { pdf = "Span", nature = "mixed" },
+ registerseparator = { pdf = "Span", nature = "inline" },
+ registerpagerange = { pdf = "Span", nature = "mixed" },
+
+ table = { pdf = "Table", nature = "display" },
+ tablerow = { pdf = "TR", nature = "display" },
+ tablecell = { pdf = "TD", nature = "mixed" },
+ tableheadcell = { pdf = "TH", nature = "mixed" },
+ tablehead = { pdf = "THEAD", nature = "display" },
+ tablebody = { pdf = "TBODY", nature = "display" },
+ tablefoot = { pdf = "TFOOT", nature = "display" },
+
+ tabulate = { pdf = "Table", nature = "display" },
+ tabulaterow = { pdf = "TR", nature = "display" },
+ tabulatecell = { pdf = "TD", nature = "mixed" },
+ tabulateheadcell = { pdf = "TH", nature = "mixed" },
+ tabulatehead = { pdf = "THEAD", nature = "display" },
+ tabulatebody = { pdf = "TBODY", nature = "display" },
+ tabulatefoot = { pdf = "TFOOT", nature = "display" },
+
+ list = { pdf = "TOC", nature = "display" },
+ listitem = { pdf = "TOCI", nature = "display" },
+ listtag = { pdf = "Lbl", nature = "mixed" },
+ listcontent = { pdf = "P", nature = "mixed" },
+ listdata = { pdf = "P", nature = "mixed" },
+ listpage = { pdf = "Reference", nature = "mixed" },
+ listtext = { pdf = "Span", nature = "inline" },
+
+ delimitedblock = { pdf = "BlockQuote", nature = "display" },
+ delimited = { pdf = "Quote", nature = "inline" },
+ delimitedcontent = { pdf = "Span", nature = "inline" },
+ delimitedsymbol = { pdf = "Span", nature = "inline" },
+ subsentence = { pdf = "Span", nature = "inline" },
+ subsentencecontent = { pdf = "Span", nature = "inline" },
+ subsentencesymbol = { pdf = "Span", nature = "inline" },
+
+ label = { pdf = "Span", nature = "mixed" },
+ number = { pdf = "Span", nature = "mixed" },
+
+ float = { pdf = "Div", nature = "display" }, -- Figure
+ floatcaption = { pdf = "Caption", nature = "mixed" },
+ floatlabel = { pdf = "Span", nature = "inline" },
+ floatnumber = { pdf = "Span", nature = "inline" },
+ floattext = { pdf = "Span", nature = "mixed" },
+ floatcontent = { pdf = "P", nature = "mixed" },
+
+ image = { pdf = "P", nature = "mixed" },
+ mpgraphic = { pdf = "P", nature = "mixed" },
+
+ formulaset = { pdf = "Div", nature = "display" },
+ formula = { pdf = "Div", nature = "display" }, -- Formula
+ formulacaption = { pdf = "Span", nature = "mixed" },
+ formulalabel = { pdf = "Span", nature = "mixed" },
+ formulanumber = { pdf = "Span", nature = "mixed" },
+ formulacontent = { pdf = "P", nature = "display" },
+ subformula = { pdf = "Div", nature = "display" },
+
+ link = { pdf = "Link", nature = "inline" },
+ reference = { pdf = "Span", nature = "inline" },
+
+ margintextblock = { pdf = "Span", nature = "inline" },
+ margintext = { pdf = "Span", nature = "inline" },
+ marginanchor = { pdf = "Span", nature = "inline" },
+
+ math = { pdf = "Div", nature = "inline" }, -- no display
+ mn = { pdf = "Span", nature = "mixed" },
+ mi = { pdf = "Span", nature = "mixed" },
+ mo = { pdf = "Span", nature = "mixed" },
+ ms = { pdf = "Span", nature = "mixed" },
+ mrow = { pdf = "Span", nature = "display" },
+ msubsup = { pdf = "Span", nature = "display" },
+ msub = { pdf = "Span", nature = "display" },
+ msup = { pdf = "Span", nature = "display" },
+ merror = { pdf = "Span", nature = "mixed" },
+ munderover = { pdf = "Span", nature = "display" },
+ munder = { pdf = "Span", nature = "display" },
+ mover = { pdf = "Span", nature = "display" },
+ mtext = { pdf = "Span", nature = "mixed" },
+ mfrac = { pdf = "Span", nature = "display" },
+ mroot = { pdf = "Span", nature = "display" },
+ msqrt = { pdf = "Span", nature = "display" },
+ mfenced = { pdf = "Span", nature = "display" },
+ maction = { pdf = "Span", nature = "display" },
+
+ mstacker = { pdf = "Span", nature = "display" }, -- these are only internally used
+ mstackertop = { pdf = "Span", nature = "display" }, -- these are only internally used
+ mstackerbot = { pdf = "Span", nature = "display" }, -- these are only internally used
+ mstackermid = { pdf = "Span", nature = "display" }, -- these are only internally used
+
+ mtable = { pdf = "Table", nature = "display" }, -- might change
+ mtr = { pdf = "TR", nature = "display" }, -- might change
+ mtd = { pdf = "TD", nature = "display" }, -- might change
+
+ ignore = { pdf = "Span", nature = "mixed" }, -- used internally
+ private = { pdf = "Span", nature = "mixed" }, -- for users (like LS) when they need it
+ metadata = { pdf = "Div", nature = "display" },
+ metavariable = { pdf = "Span", nature = "mixed" },
+
+ mid = { pdf = "Span", nature = "inline" },
+ sub = { pdf = "Span", nature = "inline" },
+ sup = { pdf = "Span", nature = "inline" },
+ subsup = { pdf = "Span", nature = "inline" },
+
+ combination = { pdf = "Span", nature = "display" },
+ combinationpair = { pdf = "Span", nature = "display" },
+ combinationcontent = { pdf = "Span", nature = "mixed" },
+ combinationcaption = { pdf = "Span", nature = "mixed" },
+
+ publications = { pdf = "Div", nature = "display" },
+ publication = { pdf = "Div", nature = "mixed" },
+ pubfld = { pdf = "Span", nature = "inline" },
+
+ block = { pdf = "Div", nature = "display" },
+ userdata = { pdf = "Div", nature = "display" },
+
+}
+
+tags.properties = properties
+
+local patterns = setmetatableindex(function(t,tag)
+ local v = topattern("^" .. tag .. ">")
+ t[tag] = v
+ return v
+end)
+
+function tags.locatedtag(tag)
+ local attribute = texgetattribute(a_tagged)
+ if attribute >= 0 then
+ local specification = taglist[attribute]
+ if specification then
+ local taglist = specification.taglist
+ local pattern = patterns[tag]
+ for i=#taglist,1,-1 do
+ local t = taglist[i]
+ if find(t,pattern) then
+ return t
+ end
+ end
+ end
+ else
+ -- enabled but not auto
+ end
+ return false -- handy as bogus index
+end
+
+function structures.atlocation(str) -- not used
+ local specification = taglist[texgetattribute(a_tagged)]
+ if specification then
+ local list = specification.taglist
+ if list then
+ local pattern = patterns[str]
+ for i=#list,1,-1 do
+ if find(list[i],pattern) then
+ return true
+ end
+ end
+ end
+ end
+end
+
+function tags.setproperty(tag,key,value)
+ local p = properties[tag]
+ if p then
+ p[key] = value
+ else
+ properties[tag] = { [key] = value }
+ end
+end
+
+function tags.setaspect(key,value)
+ local tag = chain[stacksize]
+ if tag then
+ local p = properties[tag]
+ if p then
+ p[key] = value
+ else
+ properties[tag] = { [key] = value }
+ end
+ end
+end
+
+function tags.registermetadata(data)
+ local d = settings_to_hash(data)
+ if #chain > 1 then
+ if metadata then
+ merge(metadata,d)
+ else
+ metadata = d
+ end
+ else
+ merge(documentdata,d)
+ end
+end
+
+function tags.getmetadata()
+ return documentdata or { }
+end
+
+function tags.registerextradata(name,serializer)
+ if type(serializer) == "function" then
+ if extradata then
+ extradata[name] = serializer
+ else
+ extradata = { [name] = serializer }
+ end
+ end
+end
+
+function tags.getextradata()
+ return extradata
+end
+
+function tags.start(tag,specification)
+ if not enabled then
+ codeinjections.enabletags()
+ enabled = true
+ end
+ --
+ labels[tag] = tag -- can go away
+ --
+ local attribute = #taglist + 1
+ local tagindex = (ids[tag] or 0) + 1
+ --
+ local completetag = tag .. ">" .. tagindex
+ --
+ ids[tag] = tagindex
+ lasttags[tag] = tagindex
+ stacksize = stacksize + 1
+ --
+ chain[stacksize] = completetag
+ stack[stacksize] = attribute
+ tagcontext[tag] = completetag
+ --
+ local tagnesting = { unpack(chain,1,stacksize) } -- a copy so we can add actualtext
+ --
+ if specification then
+ specification.attribute = attribute
+ specification.tagindex = tagindex
+ specification.taglist = tagnesting
+ specification.tagname = tag
+ if metadata then
+ specification.metadata = metadata
+ metadata = nil
+ end
+ local userdata = specification.userdata
+ if userdata == "" then
+ specification.userdata = nil
+ elseif type(userdata) == "string" then
+ specification.userdata = settings_to_hash(userdata)
+ end
+ local detail = specification.detail
+ if detail == "" then
+ specification.detail = nil
+ end
+ local parents = specification.parents
+ if parents == "" then
+ specification.parents = nil
+ end
+ else
+ specification = {
+ attribute = attribute,
+ tagindex = tagindex,
+ taglist = tagnesting,
+ tagname = tag,
+ metadata = metadata,
+ }
+ metadata = nil
+ end
+ --
+ taglist[attribute] = specification
+ specifications[completetag] = specification
+ --
+ if completetag == "document>1" then
+ specification.metadata = documentdata
+ end
+ --
+ texsetattribute(a_tagged,attribute)
+ return attribute
+end
+
+function tags.restart(attribute)
+ stacksize = stacksize + 1
+ if type(attribute) == "number" then
+ local taglist = taglist[attribute].taglist
+ chain[stacksize] = taglist[#taglist]
+ else
+ chain[stacksize] = attribute -- a string
+ attribute = #taglist + 1
+ taglist[attribute] = { taglist = { unpack(chain,1,stacksize) } }
+ end
+ stack[stacksize] = attribute
+ texsetattribute(a_tagged,attribute)
+ return attribute
+end
+
+function tags.stop()
+ if stacksize > 0 then
+ stacksize = stacksize - 1
+ end
+ local t = stack[stacksize]
+ if not t then
+ if trace_tags then
+ report_tags("ignoring end tag, previous chain: %s",stacksize > 0 and concat(chain," ",1,stacksize) or "none")
+ end
+ t = unsetvalue
+ end
+ texsetattribute(a_tagged,t)
+ return t
+end
+
+function tags.getid(tag,detail)
+ return ids[tag] or "?"
+end
+
+function tags.last(tag)
+ return lasttags[tag] -- or false
+end
+
+function tags.lastinchain(tag)
+ if tag and tag ~= "" then
+ return tagcontext[tag]
+ else
+ return chain[stacksize]
+ end
+end
+
+local strip = C((1-S(">"))^1)
+
+function tags.elementtag()
+ local fulltag = chain[stacksize]
+ if fulltag then
+ return lpegmatch(strip,fulltag)
+ end
+end
+
+function tags.strip(fulltag)
+ return lpegmatch(strip,fulltag)
+end
+
+function tags.setuserproperties(tag,list)
+ if not list or list == "" then
+ tag, list = chain[stacksize], tag
+ else
+ tag = tagcontext[tag]
+ end
+ if tag then -- an attribute now
+ local l = settings_to_hash(list)
+ local s = specifications[tag]
+ if s then
+ local u = s.userdata
+ if u then
+ for k, v in next, l do
+ u[k] = v
+ end
+ else
+ s.userdata = l
+ end
+ else
+ -- error
+ end
+ end
+end
+
+function tags.handler(head) -- we need a dummy
+ return head, false
+end
+
+statistics.register("structure elements", function()
+ if enabled then
+ if stacksize > 0 then
+ return format("%s element chains identified, open chain: %s ",#taglist,concat(chain," => ",1,stacksize))
+ else
+ return format("%s element chains identified",#taglist)
+ end
+ end
+end)
+
+directives.register("backend.addtags", function(v)
+ if not enabled then
+ codeinjections.enabletags()
+ enabled = true
+ end
+end)
+
+-- interface
+
+local starttag = tags.start
+
+implement {
+ name = "strc_tags_start",
+ public = true,
+ protected = true,
+ actions = starttag,
+ arguments = "argument",
+}
+
+implement {
+ name = "strc_tags_stop",
+ public = true,
+ protected = true,
+ actions = tags.stop,
+}
+
+implement {
+ name = "strc_tags_start_userdata",
+ public = true,
+ protected = true,
+ actions = function(tag,userdata) starttag(tag,{ userdata = userdata }) end,
+ arguments = { "optional", "optional" },
+}
+
+implement {
+ name = "strc_tags_start_detail",
+ public = true,
+ protected = true,
+ actions = function(tag,detail) starttag(tag,{ detail = detail }) end,
+ arguments = "2 arguments",
+}
+
+implement {
+ name = "strc_tags_start_ignore",
+ public = true,
+ protected = true,
+ actions = function(detail) starttag("ignore",{ detail = detail }) end,
+ arguments = { "argument" },
+}
+
+implement {
+ name = "strc_tags_start_chained",
+ public = true,
+ protected = true,
+ actions = function(tag,detail,parents) starttag(tag,{ detail = detail, parents = parents }) end,
+ arguments = "3 arguments",
+}
+
+implement {
+ name = "strc_tags_set_aspect",
+ public = true,
+ protected = true,
+ actions = tags.setaspect,
+ arguments = "2 arguments"
+}
+
+implement {
+ name = "settagproperty",
+ actions = tags.setproperty,
+ arguments = "3 arguments"
+}
+
+implement {
+ name = "setelementbackendtag",
+ public = true,
+ protected = true,
+ actions = tags.setproperty,
+ arguments = { "optional", "'backend'", "optional" },
+}
+
+implement {
+ name = "setelementnature",
+ public = true,
+ protected = true,
+ actions = tags.setproperty,
+ arguments = { "optional", "'nature'", "optional" },
+}
+
+implement {
+ name = "strc_tags_get_element_tag",
+ public = true,
+ protected = true,
+ actions = { tags.elementtag, context }
+}
+
+implement {
+ name = "strc_tags_set_element_user_properties",
+ public = true,
+ protected = true,
+ actions = tags.setuserproperties,
+ arguments = { "optional", "optional" },
+}
+
+implement {
+ name = "doifelseinelement",
+ public = true,
+ protected = true,
+ actions = { structures.atlocation, commands.testcase },
+ arguments = "argument",
+}
+
+implement {
+ name = "settaggedmetadata",
+ public = true,
+ protected = true,
+ actions = tags.registermetadata,
+ arguments = "optional",
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-tag.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-tag.mkxl
new file mode 100644
index 00000000000..c2597074750
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-tag.mkxl
@@ -0,0 +1,531 @@
+%D \module
+%D [ file=strc-tag,
+%D version=2010.07.16,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Tags,
+%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.
+
+% labels: no language needed
+% key/values and other names might change (and probably will)
+
+\writestatus{loading}{ConTeXt Structure Macros / Tags}
+
+\registerctxluafile{strc-tag}{autosuffix}
+
+\unprotect
+
+%D Eventually these labels will either move to the modules where they're used, or
+%D they will en dup in mult-tag.
+
+\definetagconstant{document} % Div
+
+\definetagconstant{division} % Div
+\definetagconstant{paragraph} % P
+\definetagconstant{p} % P
+\definetagconstant{construct} % Span
+\definetagconstant{highlight} % Span
+
+\definetagconstant{section} % Sect
+\definetagconstant{sectioncaption} % Div
+\definetagconstant{sectiontitle} % H
+\definetagconstant{sectionnumber} % H
+\definetagconstant{sectioncontent} % Div
+
+\definetagconstant{itemgroup} % L
+\definetagconstant{item} % Li
+\definetagconstant{itemtag} % Lbl
+\definetagconstant{itemcontent} % LBody
+\definetagconstant{itemhead} % Div
+\definetagconstant{itembody} % Div
+
+\definetagconstant{description} % Li
+\definetagconstant{descriptiontag} % Lbl
+\definetagconstant{descriptioncontent} % LBody
+\definetagconstant{descriptionsymbol} % Span
+
+\aliastagconstant{construction} {description}
+\aliastagconstant{constructiontag} {descriptiontag}
+\aliastagconstant{constructioncontent}{descriptioncontent}
+\aliastagconstant{constructionsymbol} {descriptionsymbol}
+
+\definetagconstant{verbatimblock} % Code
+\definetagconstant{verbatimlines} % Code
+\definetagconstant{verbatimline} % Code
+\definetagconstant{verbatim} % Code
+
+\definetagconstant{lines} % Code
+\definetagconstant{line} % Code
+\definetagconstant{linenumber} % Span
+
+\definetagconstant{sorting} % Span
+\definetagconstant{synonym} % Span
+
+\definetagconstant{register} % Div
+\definetagconstant{registerlocation} % Span
+\definetagconstant{registersection} % Div
+\definetagconstant{registertag} % Span
+\definetagconstant{registerentries} % Div
+\definetagconstant{registerentry} % Span
+\definetagconstant{registercontent} % Span
+\definetagconstant{registersee} % Span
+\definetagconstant{registerpages} % Span
+\definetagconstant{registerpage} % Span
+\definetagconstant{registerpagerange} % Span
+\definetagconstant{registerfrompage} % Span
+\definetagconstant{registertopage} % Span
+\definetagconstant{registerseparator} % Span
+
+\definetagconstant{table} % Table
+\definetagconstant{tablerow} % TR
+\definetagconstant{tablecell} % TD
+\definetagconstant{tableheadcell} % TH
+\definetagconstant{tablehead} % THEAD
+\definetagconstant{tablebody} % TBODY
+\definetagconstant{tablefoot} % TFOOT
+
+\definetagconstant{tabulate} % Table
+\definetagconstant{tabulaterow} % TR
+\definetagconstant{tabulatecell} % TD
+\definetagconstant{tabulateheadcell} % TH
+\definetagconstant{tabulatehead} % THEAD
+\definetagconstant{tabulatebody} % TBODY
+\definetagconstant{tabulatefoot} % TFOOT
+
+\definetagconstant{math} % math
+\definetagconstant{mtable} % Table
+\definetagconstant{mtr} % TR
+\definetagconstant{mtd} % TD
+\definetagconstant{maction} %
+\definetagconstant{mstacker}
+\definetagconstant{mstackertop}
+\definetagconstant{mstackermid}
+\definetagconstant{mstackerbot}
+
+\aliastagconstant{mtablerow} {mtr}
+\aliastagconstant{mtablecell}{mtd}
+
+\definetagconstant{munderover} % special cases
+\definetagconstant{munder} % special cases
+\definetagconstant{mover} % special cases
+
+\definetagconstant{list} % TOC
+\definetagconstant{listitem} % TOCI
+\definetagconstant{listtag} % Lbl
+\definetagconstant{listcontent} % P
+\definetagconstant{listdata} % P
+\definetagconstant{listpage} % Reference
+\definetagconstant{listtext} % Span
+
+\definetagconstant{delimited} % BlockQuote
+%definetagconstant{delimited} % Quote
+\definetagconstant{delimitedsymbol} % Span
+\definetagconstant{delimitedcontent} % Span
+
+\aliastagconstant{delimitedblock}{delimited}
+
+\definetagconstant{subsentence} % Span
+\definetagconstant{subsentencecontent} % Span
+\definetagconstant{subsentencesymbol} % Span
+
+\definetagconstant{float} % Div
+\definetagconstant{floatcaption} % Caption
+\definetagconstant{floatlabel} % Span
+\definetagconstant{floattext} % Span
+\definetagconstant{floatnumber} % Span
+\definetagconstant{floatcontent} % P
+
+\definetagconstant{image} % P
+
+\definetagconstant{mpgraphic} % P
+
+\definetagconstant{formulaset} % Div
+\definetagconstant{formula} % Div
+\definetagconstant{formulacaption} % Span
+\definetagconstant{formulalabel} % Span
+\definetagconstant{formulanumber} % P
+\definetagconstant{formulacontent} % P
+\definetagconstant{subformula} % Div
+
+\definetagconstant{link} % Link
+\definetagconstant{reference} % Span
+
+\definetagconstant{margintext} % Span
+\definetagconstant{margintextblock} % Div
+\definetagconstant{marginanchor} % Span
+
+% we might opt for verbose variants so this is experimental:
+
+\definetagconstant{label} % Span
+\definetagconstant{number} % Span
+
+\definetagconstant{ignore} % Span
+\definetagconstant{private} % Span
+
+\definetagconstant{mid} % Span
+\definetagconstant{sub} % Span
+\definetagconstant{sup} % Span
+\definetagconstant{subsup} % Span
+
+\definetagconstant{unit} % Span
+\definetagconstant{quantity} % Span
+%definetagconstant{number} % Span
+
+\definetagconstant{combination} % Span
+\definetagconstant{combinationpair} % Span
+\definetagconstant{combinationcontent} % Span
+\definetagconstant{combinationcaption} % Span
+
+\definetagconstant{publications} % Span
+\definetagconstant{publication} % Span
+\definetagconstant{pubfld} % Span
+
+\definetagconstant{block} % Div
+\definetagconstant{userdata} % Div
+
+% \setuptaglabeltext
+% [en]
+% [\t!document=document]
+
+% the real code
+
+\definesystemattribute[tagged][public]
+\definesystemattribute[image] [public]
+
+% \setelementbackendtag [#1][#2] % define at the lua end
+% \setelementnature [#1][#2] % define at the lua end
+
+\permanent\protected\def\ignoretagsinexport[#1]{\clf_ignoretagsinexport{#1}} % todo: public implementor
+
+\installcorenamespace{tagging}
+
+\installsetuponlycommandhandler \??tagging {tagging}
+
+\def\strc_tags_report_hyphen#1%
+ {\writestatus\m!languages{setting #1 to U+00AD}}
+
+\protected\def\strc_tags_patch_hyphen
+ {% for the moment here
+ \ifnum\languageparameter\s!lefthyphenchar>\zerocount
+ \setuplanguage[\s!default][\s!lefthyphenchar="AD]%
+ \strc_tags_report_hyphen\s!lefthyphenchar
+ \fi
+ \ifnum\languageparameter\s!righthyphenchar>\zerocount
+ \setuplanguage[\s!default][\s!righthyphenchar="AD]%
+ \strc_tags_report_hyphen\s!righthyphenchar
+ \fi
+ \let\strc_tags_report_hyphen\gobbleoneargument}
+
+% It makes no sense to have labels ... maybe some day as a last 'replace' in the export
+% which might be more efficient then ... okay, we now cannot overload but who cares.
+
+% \strc_tags_start_userdata % defined at the lua end
+% \strc_tags_stop % defined at the lua end
+% \strc_tags_set_aspect % defined at the lua end
+% \strc_tags_get_element_tag % defined at the lua end
+% \strc_tags_set_element_user_properties % defined at the lua end
+
+\permanent\protected\def\strc_tags_element_start_yes
+ {\iftrialtypesetting
+ \expandafter\gobbletwooptionals
+ \else
+ \expandafter\strc_tags_start_userdata
+ \fi}
+
+\permanent\protected\def\strc_tags_element_stop_yes
+ {\iftrialtypesetting
+ % nothing
+ \else
+ \expandafter\strc_tags_stop
+ \fi}
+
+\protected\def\strc_tags_enable_elements
+ {\strc_tags_patch_hyphen
+ \enforced\let\startelement \strc_tags_element_start_yes
+ \enforced\let\stopelement \strc_tags_element_stop_yes
+ \enforced\let\dosettagproperty\strc_tags_set_aspect}
+
+\protected\def\strc_tags_disable_elements
+ {\enforced\let\startelement \gobbletwooptionals
+ \enforced\let\stopelement \relax
+ \enforced\let\dosettagproperty\gobbletwoarguments}
+
+% beware: making these unexpanded spoils tables (noalign problem)
+
+\def\strc_tags_enabled_start_no_detail
+ {\iftrialtypesetting
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\strc_tags_start
+ \fi}
+
+\def\strc_tags_enabled_start_detail
+ {\iftrialtypesetting
+ \expandafter\gobbletwoarguments
+ \else
+ \expandafter\strc_tags_start_detail
+ \fi}
+
+\def\strc_tags_enabled_start_chained
+ {\iftrialtypesetting
+ \expandafter\gobblethreearguments
+ \else
+ \expandafter\strc_tags_start_chained_indeed
+ \fi}
+
+\def\strc_tags_enabled_start_ignore
+ {\iftrialtypesetting
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\strc_tags_start_ignore
+ \fi}
+
+\def\strc_tags_enabled_stop
+ {\iftrialtypesetting
+ % do nothing
+ \else
+ \expandafter\strc_tags_stop
+ \fi}
+
+\def\strc_tags_start_chained_indeed#1#2#3{\strc_tags_start_chained{#1}{#2}{\getcurrentparentchain#3{#2}}}
+
+\newconditional\c_strc_tags_enabled
+
+\aliased\let\dotaggedplaceholder\empty
+
+\immutable\chardef\strc_tags_placeholder_char\zerocount % "FFFC
+
+\protected\def\strc_tags_enable_indeed
+ {\enforced\let\dotaggedplaceholder \strc_tags_placeholder_char
+ \enforced\let\dostarttagged \strc_tags_enabled_start_detail
+ \enforced\let\dostarttaggednodetail\strc_tags_enabled_start_no_detail
+ \enforced\let\dostarttaggedchained \strc_tags_enabled_start_chained
+ \enforced\let\dostoptagged \strc_tags_enabled_stop
+ \enforced\let\dostartignoretagging \strc_tags_enabled_start_ignore
+ \enforced\let\dostopignoretagging \strc_tags_stop}
+
+\protected\def\strc_tags_enable
+ {% once enable one is toast
+ \global\settrue\c_strc_tags_enabled
+ % and gets:
+ \strc_tags_enable_indeed}
+
+\protected\def\strc_tags_disable
+ {\ifconditional\c_strc_tags_enabled
+ % so now all are artifacts
+ \enforced\let\dotaggedplaceholder \strc_tags_placeholder_char
+ \enforced\let\dostarttagged \gobbletwoarguments
+ \enforced\let\dostarttaggednodetail\gobbleoneargument
+ \enforced\let\dostarttaggedchained \gobblethreearguments
+ \enforced\let\dostoptagged \donothing
+ \else
+ % initial
+ \enforced\let\dotaggedplaceholder \empty
+ \enforced\let\dostarttagged \gobbletwoarguments
+ \enforced\let\dostarttaggednodetail\gobbleoneargument
+ \enforced\let\dostarttaggedchained \gobblethreearguments
+ \enforced\let\dostoptagged \donothing
+ \enforced\let\dostartignoretagging \donothing
+ \enforced\let\dostopignoretagging \donothing
+ \fi}
+
+% for luigi (beware: fully expandable):
+
+\protected\def\strc_tags_setup_element_user_properties
+ {\iftrialtypesetting
+ \expandafter\gobbletwooptionals
+ \else
+ \expandafter\strc_tags_set_element_user_properties
+ \fi}
+
+\protected\def\strc_tags_enable_properties
+ {\enforced\let\getelementtag \strc_tags_get_element_tag
+ \enforced\let\setupelementuserproperties\strc_tags_set_element_user_properties}
+
+\protected\def\strc_tags_disable_properties
+ {\enforced\let\getelementtag \donothing
+ \enforced\let\setupelementuserproperties\gobbletwooptionals}
+
+%D The triggers:
+
+\newtoks\everyenableelements
+\newtoks\everydisableelements
+
+\appendtoks
+ \strc_tags_enable_elements
+ \strc_tags_enable_properties
+ \doifelse{\taggingparameter\c!method}\v!auto\strc_tags_enable\strc_tags_disable
+\to \everyenableelements
+
+\appendtoks
+ \strc_tags_disable_elements
+ \strc_tags_disable_properties
+ \strc_tags_disable
+\to \everydisableelements
+
+\appendtoks
+ \doifelse{\taggingparameter\c!state}\v!start{\the\everyenableelements}{\the\everydisableelements}%
+\to \everysetuptagging
+
+\permanent\protected\def\forgettagging
+ {\c_attr_tagged\attributeunsetvalue}
+
+\setuptagging
+ [\c!state=\v!stop,
+ \c!method=\v!auto]
+
+% Cf suggestion by Wolfgang we now have named paragraphs. Watch out, the content
+% is grouped but only when we have an instance.
+%
+% \defineparagraph[red] [color=red]
+% \defineparagraph[bold][style=bold]
+%
+% \startparagraph \input ward \stopparagraph
+% \startparagraph[red] \input ward \stopparagraph
+% \startparagraph[bold] \input ward \stopparagraph
+
+\installcorenamespace {paragraph}
+\installcommandhandler \??paragraph {paragraph} \??paragraph
+
+\setupparagraph % someday maybe also strut (beg/end) and align
+ [\c!color=,
+ \c!style=]
+
+\ifdefined\dotagparagraph \else \aliased\let\dotagparagraph\gobbleoneargument \fi
+
+\permanent\tolerant\protected\def\startparagraph[#1]#*[#2]%
+ {\endgraf % we end before the group
+ \begingroup
+ \ifarguments
+ \let\currentparagraph\empty
+ \or
+ \ifhastok={#1}%
+ \let\currentparagraph\empty
+ \setupcurrentparagraph[#1]
+ \else
+ \edef\currentparagraph{#1}%
+ \fi
+ \or
+ \edef\currentparagraph{#1}%
+ \setupcurrentparagraph[#2]%
+ \fi
+ \useparagraphstyleandcolor\c!style\c!color
+ \usealignparameter\paragraphparameter
+ \usesetupsparameter\paragraphparameter
+ \dostarttagged\t!paragraph\currentparagraph
+ \dotagparagraph{\paragraphparameter\c!align}}
+
+\permanent\protected\def\stopparagraph
+ {\dostoptagged
+ \endgraf % we end inside the group
+ \endgroup}
+
+\aliased\let\startpar\startparagraph
+\aliased\let\stoppar \stopparagraph
+
+\def\strc_tags_document_start_indeed
+ {\glet\strc_tags_document_start_indeed\relax
+ \dostarttagged\t!document\empty}
+
+\def\strc_tags_document_stop_indeed
+ {\glet\strc_tags_document_stop_indeed\relax
+ \dostoptagged}
+
+\appendtoks
+ \strc_tags_document_start_indeed % here because otherwise products don't get a root (starttext before env)
+\to \everyenableelements
+
+% \appendtoks
+% \strc_tags_document_start_indeed
+% \to \everystarttext
+
+\appendtoks
+ \strc_tags_document_stop_indeed
+\to \everystoptext
+
+\appendtoks
+ \strc_tags_disable_elements
+ \strc_tags_disable
+\to \everybeforepagebody
+
+% This doesn't work well either, so instead we handle the ornaments in the tagging
+% in a different way (see attr -> false code).
+
+% \appendtoks
+% \dostartignoretagging
+% \to \everybeforepagebody
+%
+% \appendtoks
+% \dostopignoretagging
+% \to \everyafterpagebody
+
+% \doifelseinelement{structure:section} {yes} {no}
+% \doifelseinelement{structure:chapter} {yes} {no}
+% \doifelseinelement{division:*-structure:chapter} {yes} {no}
+
+\aliased\let\doifinelementelse\doifelseinelement % define at the lua end
+
+\permanent\protected\def\taggedlabeltexts#1#2#3% experimental: label, numberdetail, numbercontent
+ {\begingroup
+ \dostarttagged\t!label{#1}%
+ \labeltexts{#1}%
+ {\dostoptagged
+ \dostarttagged\t!number{#2}%
+ #3%
+ \dostoptagged
+ \dostarttagged\t!label{#1}}%
+ \dostoptagged
+ \endgroup}
+
+\permanent\protected\def\namedtaggedlabeltexts#1#2#3#4#5% experimental: labeltag label numbertag numberdetail numbercontent
+ {\begingroup
+ \dostarttagged{#1}{#2}%
+ \labeltexts{#2}%
+ {\dostoptagged
+ \dostarttagged{#3}{#4}%
+ #5%
+ \dostoptagged
+ \dostarttagged{#1}{#2}}%
+ \dostoptagged
+ \endgroup}
+
+%D Metadata is added after the following structure element so here we get some as
+%D child of the document root and some as child of the chapter element.
+%D
+%D \settaggedmetadata[title=Hello World!,author=Hans Hagen]
+%D
+%D \starttyping
+%D \starttext
+%D \startelement[ignore]
+%D \input tufte
+%D \stopelement
+%D \par \input ward \par
+%D \settaggedmetadata[whatever=Again and Again]
+%D \startchapter[title=test]
+%D \input ward
+%D \stopchapter
+%D \stoptext
+%D \stoptyping
+
+% \settaggedmetadata[#1] % define at the lua end
+
+%D An overload:
+
+\pushoverloadmode
+
+\aliased\let\strc_tagged_saved_bpar\bpar
+\aliased\let\strc_tagged_saved_epar\epar
+
+\enforced\permanent\protected\def\bpar{\dostarttagged\t!paragraph\empty\strc_tagged_saved_bpar}
+\enforced\permanent\protected\def\epar{\strc_tagged_saved_epar\dostoptagged}
+
+\popoverloadmode
+
+% \permanent\def\untagged{attr \taggedattribute\attributeunsetvalue}
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-tnt.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-tnt.mkxl
new file mode 100644
index 00000000000..4129117f06a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-tnt.mkxl
@@ -0,0 +1,117 @@
+%D \module
+%D [ file=strc-tnt,
+%D version=2019.05.30, % based on older code
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Text Notes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D \macros
+%D {definetextnote,setuptextnote}
+%D
+%D \startbuffer
+%D \definetextnote
+%D [textnote]
+%D
+%D \startbuffer
+%D Test test test \textnote [n=5] {alpha}. test test test test tets test test
+%D \textnote [n=10] {beta}. Test test test test tets test test \textnote [n=12]
+%D {gamma}. Test test test test tets test test \textnote [n=24] {delta}. Test test
+%D test test test test \textnote {epsilon} test test \textnote [n=*] {zeta}.
+%D \stopbuffer
+%D
+%D \blank {\setuptextnote[empty=yes] \getbuffer\par} \blank
+%D \blank {\setuptextnote[empty=number] \getbuffer\par} \blank
+%D \blank {\setuptextnote[empty=none] \getbuffer\par} \blank
+%D \blank { \getbuffer\par} \blank
+%D
+%D \blank[2*big]
+%D
+%D \placenotes[textnote:note][criterium=text]
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\installcorenamespace{textnote}
+
+\installcommandhandler \??textnote {textnote} \??textnote
+
+\definebar
+ [\v!textnote:\v!underbar]
+ [\v!underbar]
+
+\definenote
+ [\v!textnote:\v!note]
+
+\setuptextnote
+ [\c!rule=\v!textnote:\v!underbar,
+ \c!note=\v!textnote:\v!note,
+ \c!n=10] % * will use the real space
+
+\appendtoks
+ \frozen\instance\setuevalue{\currenttextnote}{\educ_textnote[\currenttextnote]}%
+\to \everydefinetextnote
+
+\tolerant\protected\def\educ_textnote[#1]#*[#2]#:#3%
+ {\dontleavehmode
+ \begingroup
+ \def\currenttextnote{#1}%
+ \ifparameter#2\or\setupcurrenttextnote[#2]\fi
+ \edef\p_n{\textnoteparameter\c!n}%
+ \edef\p_empty{\textnoteparameter\c!empty}%
+ \edef\currentbar{\textnoteparameter\c!rule}%
+ \edef\currentnote{\textnoteparameter\c!note}%
+ \ifx\p_n\wildcardsymbol
+ \donefalse
+ \ifx\p_empty\v!yes
+ \donetrue
+ \orelse\ifx\p_empty\v!number
+ \donetrue
+ \orelse\ifx\p_empty\v!none
+ \donetrue
+ \fi
+ \ifdone
+ \setupbar[\currentbar][\c!empty=\v!yes]%
+ \fi
+ \inlinebar[\currentbar]\bgroup
+ \wordboundary#3%
+ \ifx\p_empty\v!yes
+ \setnotetext[\currentnote]{#3}%
+ \orelse\ifx\p_empty\v!number
+ \runninghbox{\resetbar\setnote[\currentnote]{#3}}%
+ \orelse\ifx\p_empty\v!none
+ \setupnote[\currentnote][\c!location=\v!none]%
+ \runninghbox{\resetbar\setnote[\currentnote]{#3}}%
+ \fi
+ \egroup
+ \else
+ \inlinebar[\currentbar]\bgroup
+ \scratchcounter\numexpr\p_n/\plustwo\relax
+ \ifx\p_empty\v!yes
+ \interwordspacesbefore\scratchcounter
+ \setnotetext[\currentnote]{#3}%
+ \interwordspacesafter\scratchcounter
+ \orelse\ifx\p_empty\v!number
+ \interwordspacesbefore\scratchcounter
+ \zwnj\runninghbox{\resetbar\setnote[\currentnote]{#3}}\zwnj
+ \interwordspacesafter\scratchcounter
+ \orelse\ifx\p_empty\v!none
+ \setupnote[\currentnote][\c!location=\v!none]%
+ \interwordspacesbefore\scratchcounter
+ \zwnj\runninghbox{\resetbar\setnote[\currentnote]{#3}}\zwnj
+ \interwordspacesafter\scratchcounter
+ \else
+ #3%
+ \fi
+ \egroup
+ \fi
+ \endgroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/strc-usr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/strc-usr.mkxl
new file mode 100644
index 00000000000..28d398194f1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/strc-usr.mkxl
@@ -0,0 +1,169 @@
+%D \module
+%D [ file=strc-bkm,
+%D version=2009.04.01,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Bookmarks,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Structure Macros / Userdata}
+
+\registerctxluafile{strc-usr}{}
+
+%D It's a bit like blocks that also use buffers but more lightweight and with
+%D inplace settings.
+%D
+%D \starttyping
+%D \defineuserdata [test] [style=italic]
+%D
+%D \samplefile{klein}
+%D
+%D \startuserdata [before=\blank,after=\blank,color=red]
+%D \samplefile{greenfield}
+%D \stopuserdata
+%D
+%D \samplefile{sapolsky}
+%D
+%D \startuserdata [test]
+%D \samplefile{bryson}
+%D \stopuserdata
+%D
+%D \samplefile{jojomayer}
+%D
+%D \startuserdata [test] [before=\blank,after=\blank,color=red]
+%D \samplefile{linden}
+%D \stopuserdata
+%D
+%D \samplefile{montgomery}
+%D \stoptyping
+%D
+%D Or from \LUA:
+%D
+%D \starttyping
+%D \startluacode
+%D context.startuserdata({color="blue"})
+%D context.samplefile("klein")
+%D context.stopuserdata()
+%D \stopluacode
+%D \stoptyping
+%D
+%D An example of an alternative:
+%D
+%D \starttyping
+%D \defineuserdataalternative [epigraph] [renderingsetup=userdata:epigraph]
+%D
+%D \startsetups [userdata:epigraph]
+%D \startframedtext [location=right,frame=off,align={flushleft,broad},style=\tfx,offset=.25ex,width=.5\textwidth]
+%D \begstrut\inlinebuffer[userdata]\endstrut
+%D \hairline
+%D \wordright{\userdataparameter{author}}
+%D \stopframedtext
+%D \stopsetups
+%D
+%D \defineuserdata
+%D [epigraph]
+%D [alternative=epigraph]
+%D
+%D \startuserdata [epigraph] [author={Sean B. Carrol}]
+%D The fraction of fossil olfactory receptor genes is significantly higher in
+%D all species with full color vision. This suggests that the evolution of
+%D trichromatic vision --- which allows these primates to detect food, mates,
+%D and danger with visual cues --- has reduced their reliance on the sense of
+%D smell.
+%D \stopuserdata
+%D
+%D \startuserdata [epigraph] [author={Sean B. Carrol}]
+%D \samplefile{carrol}
+%D \stopuserdata
+%D \stoptyping
+
+\unprotect
+
+\installnamespace {userdata}
+\installnamespace {userdataalternative}
+\installnamespace {userdatarenderings}
+
+\installcommandhandler \????userdata {userdata} \????userdata
+\installcommandhandler \????userdataalternative {userdataalternative} \????userdataalternative
+
+\permanent\protected\def\startuserdata
+ {\begingroup
+ \let\currentuserdata\empty
+ \doifelsenextoptionalcs\userdata_start_delayed\userdata_start_indeed}
+
+% This variant works only when the userdata instance exists while the assignment check
+% can also be used with undefined instances which falls back to the global settings.
+%
+% \def\userdata_start_delayed[#1]%
+% {\ifcsname\nameduserdatahash{\detokenize\expandafter{\normalexpanded{#1}}}\s!parent\endcsname
+% \expandafter\userdata_start_delayed_name
+% \else
+% \expandafter\userdata_start_delayed_parameters
+% \fi[#1]}
+
+\def\userdata_start_delayed[#1]%
+ {\doifelseassignmentcs{#1}%
+ \userdata_start_delayed_parameters
+ \userdata_start_delayed_name
+ [#1]}
+
+\def\userdata_start_delayed_parameters[#1]%
+ {\setupcurrentuserdata[#1]%
+ \userdata_start_indeed}
+
+\def\userdata_start_delayed_name[#1]%
+ {\edef\currentuserdata{#1}%
+ \checkuserdataparent
+ \doifelsenextoptionalcs\userdata_start_delayed_parameters\userdata_start_indeed}
+
+\def\userdata_start_indeed
+ {\grabbufferdatadirect\s!userdata{\csstring\startuserdata}{\csstring\stopuserdata}}
+
+\permanent\protected\def\stopuserdata
+ {\userdataparameter\c!before % HH: moved, so we obey the outer spacing
+ \dostarttagged\t!userdata\currentuserdata % HH: added, maybe move up ?
+ \begingroup
+ \useuserdatastyleandcolor\c!style\c!color
+ \usealignparameter\userdataparameter % HH: added
+ \edef\currentuserdataalternative{\userdataparameter\c!alternative}%
+ \ifcsname\currentuserdataalternativehash\s!parent\endcsname \else
+ \let\currentuserdataalternative\s!default
+ \fi
+ \usesetupsparameter\userdataparameter
+ \edef\p_renderingsetup{\userdataalternativeparameter\c!renderingsetup}%
+ \directsetup\p_renderingsetup
+ \endgroup
+ \dostoptagged
+ \userdataparameter\c!after % HH: moved
+ \endgroup}
+
+\permanent\protected\def\getuserdata
+ {\getbufferdata[\s!userdata]}
+
+\permanent\protected\def\getinlineuserdata
+ {\inlinebuffer[\s!userdata]}
+
+\defineuserdataalternative
+ [\s!default]
+ [\c!renderingsetup=\????userdatarenderings:\s!default]
+
+% \startsetups[\????userdatarenderings:\s!default]
+% \userdataparameter\c!before
+% \usesetupsparameter\userdataparameter
+% \getbufferdata[\s!userdata]
+% \userdataparameter\c!after
+% \stopsetups
+
+\startsetups[\????userdatarenderings:\s!default]
+ \getuserdata
+\stopsetups
+
+\setupuserdata
+ [\c!alternative=\s!default]
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt b/Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt
new file mode 100644
index 00000000000..657e3addb97
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/supp-box.lmt
@@ -0,0 +1,1395 @@
+if not modules then modules = { } end modules ['supp-box'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to supp-box.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- this is preliminary code, use insert_before etc
+
+local report_hyphenation = logs.reporter("languages","hyphenation")
+
+local tonumber, next, type = tonumber, next, type
+
+local lpegmatch = lpeg.match
+
+local tex = tex
+local context = context
+local nodes = nodes
+
+local implement = interfaces.implement
+
+local nodecodes = nodes.nodecodes
+
+local disc_code = nodecodes.disc
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glue_code = nodecodes.glue
+local penalty_code = nodecodes.penalty
+local glyph_code = nodecodes.glyph
+local par_code = nodecodes.par
+
+local indent_code = nodes.listcodes.indent
+
+local hmode_code = tex.modelevels.horizontal
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+local tonode = nuts.tonode
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getdisc = nuts.getdisc
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local getattribute = nuts.getattribute
+local getbox = nuts.getbox
+local getdirection = nuts.getdirection
+local getwidth = nuts.getwidth
+local getheight = nuts.getheight
+local getdepth = nuts.getdepth
+local getwhd = nuts.getwhd
+local takebox = nuts.takebox
+
+local setlink = nuts.setlink
+local setboth = nuts.setboth
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setbox = nuts.setbox
+local setlist = nuts.setlist
+local setdisc = nuts.setdisc
+local setwidth = nuts.setwidth
+local setheight = nuts.setheight
+local setdepth = nuts.setdepth
+local setshift = nuts.setshift
+local setsplit = nuts.setsplit
+local setattrlist = nuts.setattrlist
+local setwhd = nuts.setwhd
+local setglue = nuts.setglue
+
+local flush_node = nuts.flush_node
+local flush_list = nuts.flush_list
+local copy_node = nuts.copy
+local copy_list = nuts.copy_list
+local find_tail = nuts.tail
+local getdimensions = nuts.dimensions
+local hpack = nuts.hpack
+local vpack = nuts.vpack
+local traverse_id = nuts.traverse_id
+local traverse = nuts.traverse
+local free = nuts.free
+local findtail = nuts.tail
+local reverse = nuts.reverse
+local effective_glue= nuts.effective_glue
+
+local nextdisc = nuts.traversers.disc
+local nextdir = nuts.traversers.dir
+local nexthlist = nuts.traversers.hlist
+
+local listtoutf = nodes.listtoutf
+
+local nodepool = nuts.pool
+local new_penalty = nodepool.penalty
+local new_hlist = nodepool.hlist
+local new_glue = nodepool.glue
+
+local setlistcolor = nodes.tracers.colors.setlist
+
+local texget = tex.get
+local texgetbox = tex.getbox
+local texsetdimen = tex.setdimen
+local texgetnest = tex.getnest
+
+local function hyphenatedlist(head,usecolor)
+ local current = head and tonut(head)
+ while current do
+ local id = getid(current)
+ local prev, next = getboth(current)
+ if id == disc_code then
+ local pre, post, replace = getdisc(current)
+ if not usecolor then
+ -- nothing fancy done
+ elseif pre and post then
+ setlistcolor(pre,"darkmagenta")
+ setlistcolor(post,"darkcyan")
+ elseif pre then
+ setlistcolor(pre,"darkyellow")
+ elseif post then
+ setlistcolor(post,"darkyellow")
+ end
+ if replace then
+ flush_list(replace)
+ end
+ setdisc(current)
+ if pre then
+ setlink(prev,new_penalty(10000),pre)
+ setlink(find_tail(pre),current)
+ end
+ if post then
+ setlink(current,new_penalty(10000),post)
+ setlink(find_tail(post),next)
+ end
+ elseif id == vlist_code or id == hlist_code then
+ hyphenatedlist(getlist(current))
+ end
+ current = next
+ end
+end
+
+implement {
+ name = "hyphenatedlist",
+ arguments = { "integer", "boolean" },
+ actions = function(n,color)
+ local b = texgetbox(n)
+ if b then
+ hyphenatedlist(b.list,color)
+ end
+ end
+}
+
+local function checkedlist(list)
+ if type(list) == "number" then
+ return getlist(getbox(tonut(list)))
+ else
+ return tonut(list)
+ end
+end
+
+implement {
+ name = "showhyphenatedinlist",
+ arguments = "integer",
+ actions = function(n)
+ -- we just hyphenate (as we pass a hpack) .. a bit too much casting but ...
+ local l = languages.hyphenators.handler(tonode(checkedlist(n)))
+ report_hyphenation("show: %s",listtoutf(l,false,true))
+ end
+}
+
+local function applytochars(current,doaction,noaction,nested)
+ while current do
+ local id = getid(current)
+ if nested and (id == hlist_code or id == vlist_code) then
+ context.beginhbox()
+ applytochars(getlist(current),doaction,noaction,nested)
+ context.endhbox()
+ elseif id ~= glyph_code then
+ noaction(tonode(copy_node(current)))
+ else
+ doaction(tonode(copy_node(current)))
+ end
+ current = getnext(current)
+ end
+end
+
+local function applytowords(current,doaction,noaction,nested)
+ local start
+ while current do
+ local id = getid(current)
+ if id == glue_code then
+ if start then
+ doaction(tonode(copy_list(start,current)))
+ start = nil
+ end
+ noaction(tonode(copy_node(current)))
+ elseif nested and (id == hlist_code or id == vlist_code) then
+ context.beginhbox()
+ applytowords(getlist(current),doaction,noaction,nested)
+ context.egroup()
+ elseif not start then
+ start = current
+ end
+ current = getnext(current)
+ end
+ if start then
+ doaction(tonode(copy_list(start)))
+ end
+end
+
+local methods = {
+ char = applytochars,
+ characters = applytochars,
+ word = applytowords,
+ words = applytowords,
+}
+
+implement {
+ name = "applytobox",
+ arguments = {
+ {
+ { "box", "integer" },
+ { "command" },
+ { "method" },
+ { "nested", "boolean" },
+ }
+ },
+ actions = function(specification)
+ local list = checkedlist(specification.box)
+ local action = methods[specification.method or "char"]
+ if list and action then
+ action(list,context[specification.command or "ruledhbox"],context,specification.nested)
+ end
+ end
+}
+
+local split_char = lpeg.Ct(lpeg.C(1)^0)
+local split_word = lpeg.tsplitat(lpeg.patterns.space)
+local split_line = lpeg.tsplitat(lpeg.patterns.eol)
+
+local function processsplit(specification)
+ local str = specification.data or ""
+ local command = specification.command or "ruledhbox"
+ local method = specification.method or "word"
+ local spaced = specification.spaced
+ if command then
+ command = context[command]
+ end
+ if method == "char" or method == "character" then
+ if spaced then
+ spaced = context.space
+ end
+ local words = lpegmatch(split_char,str)
+ for i=1,#words do
+ local word = words[i]
+ if word == " " then
+ if spaced then
+ spaced()
+ end
+ elseif command then
+ command(word)
+ else
+ context(word)
+ end
+ end
+ elseif method == "word" then
+ if spaced then
+ spaced = context.space
+ end
+ local words = lpegmatch(split_word,str)
+ for i=1,#words do
+ local word = words[i]
+ if spaced and i > 1 then
+ spaced()
+ end
+ if command then
+ command(word)
+ else
+ context(word)
+ end
+ end
+ elseif method == "line" then
+ if spaced then
+ spaced = context.par
+ end
+ local words = lpegmatch(split_line,str)
+ for i=1,#words do
+ local word = words[i]
+ if spaced and i > 1 then
+ spaced()
+ end
+ if command then
+ command(word)
+ else
+ context(word)
+ end
+ end
+ else
+ context(str)
+ end
+end
+
+implement {
+ name = "processsplit",
+ actions = processsplit,
+ arguments = {
+ {
+ { "data" },
+ { "command" },
+ { "method" },
+ { "spaced", "boolean" },
+ }
+ }
+}
+
+local a_vboxtohboxseparator = attributes.private("vboxtohboxseparator")
+
+implement {
+ name = "vboxlisttohbox",
+ arguments = { "integer", "integer", "dimen" },
+ actions = function(original,target,inbetween)
+ local current = getlist(getbox(original))
+ local head = nil
+ local tail = nil
+ while current do
+ local id = getid(current)
+ local next = getnext(current)
+ if id == hlist_code then
+ local list = getlist(current)
+ if head then
+ if inbetween > 0 then
+ local n = new_glue(0,0,inbetween)
+ setlink(tail,n)
+ tail = n
+ end
+ setlink(tail,list)
+ else
+ head = list
+ end
+ tail = find_tail(list)
+ -- remove last separator
+ if getid(tail) == hlist_code and getattribute(tail,a_vboxtohboxseparator) == 1 then
+ local temp = tail
+ local prev = getprev(tail)
+ if next then
+ local list = getlist(tail)
+ setlink(prev,list)
+ setlist(tail)
+ tail = find_tail(list)
+ else
+ tail = prev
+ end
+ flush_node(temp)
+ end
+ -- done
+ setnext(tail)
+ setlist(current)
+ end
+ current = next
+ end
+ local result = new_hlist()
+ setlist(result,head)
+ setbox(target,result)
+ -- setbox(target,new_hlist(head))
+ end
+}
+
+implement {
+ name = "hboxtovbox",
+ arguments = "integer",
+ actions = function(n)
+ local b = getbox(n)
+ local factor = texget("baselineskip",false) / texget("hsize")
+ setdepth(b,0)
+ setheight(b,getwidth(b) * factor)
+ end
+}
+
+implement {
+ name = "boxtostring",
+ arguments = "integer",
+ public = true,
+ actions = function(n)
+ context.verbatim(nodes.toutf(texgetbox(n).list)) -- helper is defined later
+ end
+}
+
+local function getnaturaldimensions(n)
+ local w = 0
+ local h = 0
+ local d = 0
+ local l = getlist(getbox(n))
+ if l then
+ w, h, d = getdimensions(l)
+ end
+ texsetdimen("lastnaturalboxwd",w)
+ texsetdimen("lastnaturalboxht",h)
+ texsetdimen("lastnaturalboxdp",d)
+ return w, h, d
+end
+
+implement {
+ name = "getnaturaldimensions",
+ arguments = "integer",
+ actions = getnaturaldimensions
+}
+
+implement {
+ name = "naturalwd",
+ arguments = "integer",
+ actions = function(n)
+ getnaturaldimensions(n)
+ context.lastnaturalboxwd(false)
+ end
+}
+
+implement {
+ name = "getnaturalwd",
+ arguments = "integer",
+ actions = function(n)
+ local w = 0
+ local h = 0
+ local d = 0
+ local l = getlist(getbox(n))
+ if l then
+ w, h, d = getdimensions(l)
+ end
+ context("\\dimexpr%i\\scaledpoint\\relax",w)
+ end
+}
+
+local function setboxtonaturalwd(n)
+ local old = takebox(n)
+ local new = hpack(getlist(old))
+ setlist(old,nil)
+ flush_node(old)
+ setbox(n,new)
+end
+
+implement {
+ name = "setnaturalwd",
+ arguments = "integer",
+ actions = setboxtonaturalwd
+}
+
+nodes.setboxtonaturalwd = setboxtonaturalwd
+
+local doifelse = commands.doifelse
+
+do
+
+ local dirvalues = nodes.dirvalues
+ local lefttoright_code = dirvalues.lefttoright
+ local righttoleft_code = dirvalues.righttoleft
+
+ local function firstdirinbox(n)
+ local b = getbox(n)
+ if b then
+ local l = getlist(b)
+ if l then
+ for d in nextdir, l do
+ return getdirection(d)
+ end
+ for h in nexthlist, l do
+ return getdirection(h)
+ end
+ end
+ end
+ return lefttoright_code
+ end
+
+ nodes.firstdirinbox = firstdirinbox
+
+ implement {
+ name = "doifelserighttoleftinbox",
+ arguments = "integer",
+ actions = function(n)
+ doifelse(firstdirinbox(n) == righttoleft_code)
+ end
+ }
+
+end
+
+-- new (handy for mp) .. might move to its own module
+
+do
+
+ local tonut = nodes.tonut
+ local takebox = nuts.takebox
+ local flush_list = nuts.flush_list
+ local copy_list = nuts.copy_list
+ local getwhd = nuts.getwhd
+ local setbox = nuts.setbox
+ local new_hlist = nuts.pool.hlist
+
+ local values = tokens.values
+ local dimension_value = values.dimension
+
+ local boxes = { }
+ nodes.boxes = boxes
+ local cache = table.setmetatableindex("table")
+ local report = logs.reporter("boxes","cache")
+ local trace = false
+
+ trackers.register("nodes.boxes",function(v) trace = v end)
+
+ function boxes.save(category,name,b)
+ name = tonumber(name) or name
+ local b = takebox(b)
+ if trace then
+ report("category %a, name %a, %s (%s)",category,name,"save",b and "content" or "empty")
+ end
+ cache[category][name] = b or false
+ end
+
+ function boxes.savenode(category,name,n)
+ name = tonumber(name) or name
+ if trace then
+ report("category %a, name %a, %s (%s)",category,name,"save",n and "content" or "empty")
+ end
+ cache[category][name] = tonut(n) or false
+ end
+
+ function boxes.found(category,name)
+ name = tonumber(name) or name
+ return cache[category][name] and true or false
+ end
+
+ function boxes.direct(category,name,copy)
+ name = tonumber(name) or name
+ local c = cache[category]
+ local b = c[name]
+ if not b then
+ -- do nothing, maybe trace
+ elseif copy then
+ b = copy_list(b)
+ else
+ c[name] = false
+ end
+ if trace then
+ report("category %a, name %a, %s (%s)",category,name,"direct",b and "content" or "empty")
+ end
+ if b then
+ return tonode(b)
+ end
+ end
+
+ function boxes.restore(category,name,box,copy)
+ name = tonumber(name) or name
+ local c = cache[category]
+ local b = takebox(box)
+ if b then
+ flush_list(b)
+ end
+ local b = c[name]
+ if not b then
+ -- do nothing, maybe trace
+ elseif copy then
+ b = copy_list(b)
+ else
+ c[name] = false
+ end
+ if trace then
+ report("category %a, name %a, %s (%s)",category,name,"restore",b and "content" or "empty")
+ end
+ setbox(box,b or nil)
+ end
+
+ local function dimensions(category,name)
+ name = tonumber(name) or name
+ local b = cache[category][name]
+ if b then
+ return getwhd(b)
+ else
+ return 0, 0, 0
+ end
+ end
+
+ boxes.dimensions = dimensions
+
+ function boxes.reset(category,name)
+ name = tonumber(name) or name
+ local c = cache[category]
+ if name and name ~= "" then
+ local b = c[name]
+ if b then
+ flush_list(b)
+ c[name] = false
+ end
+ if trace then
+ report("category %a, name %a, reset",category,name)
+ end
+ else
+ for k, b in next, c do
+ if b then
+ flush_list(b)
+ end
+ end
+ cache[category] = { }
+ if trace then
+ report("category %a, reset",category)
+ end
+ end
+ end
+
+ implement {
+ name = "putboxincache",
+ public = true,
+ protected = true,
+ arguments = { "string", "string", "integer" },
+ actions = boxes.save,
+ }
+
+ implement {
+ name = "getboxfromcache",
+ public = true,
+ protected = true,
+ arguments = { "string", "string", "integer" },
+ actions = boxes.restore,
+ }
+
+ implement {
+ name = "directboxfromcache",
+ public = true,
+ protected = true,
+ arguments = "2 strings",
+ actions = { boxes.direct, context },
+ -- actions = function(category,name) local b = boxes.direct(category,name) if b then context(b) end end,
+ }
+
+ implement {
+ name = "directcopyboxfromcache",
+ public = true,
+ protected = true,
+ arguments = { "string", "string", true },
+ actions = { boxes.direct, context },
+ -- actions = function(category,name) local b = boxes.direct(category,name,true) if b then context(b) end end,
+ }
+
+ implement {
+ name = "copyboxfromcache",
+ public = true,
+ protected = true,
+ arguments = { "string", "string", "integer", true },
+ actions = boxes.restore,
+ }
+
+ implement {
+ name = "doifelseboxincache",
+ public = true,
+ protected = true,
+ arguments = "2 strings",
+ actions = { boxes.found, doifelse },
+ }
+
+ implement {
+ name = "resetboxesincache",
+ public = true,
+ protected = true,
+ arguments = "string",
+ actions = boxes.reset,
+ }
+
+ -- we can share this ...
+
+ implement {
+ name = "getboxwdfromcache",
+ public = true,
+ protected = true,
+ usage = "value",
+ arguments = "2 strings",
+ actions = function(category,name)
+ local w, h, d = dimensions(category,name)
+ return dimension_value, w
+ end,
+ }
+
+ implement {
+ name = "getboxhtfromcache",
+ arguments = "2 strings",
+ public = true,
+ protected = true,
+ usage = "value",
+ actions = function(category,name)
+ local w, h, d = dimensions(category,name)
+ return dimension_value, h
+ end,
+ }
+
+ implement {
+ name = "getboxdpfromcache",
+ arguments = "2 strings",
+ public = true,
+ protected = true,
+ usage = "value",
+ actions = function(category,name)
+ local w, h, d = dimensions(category,name)
+ return dimension_value, d
+ end,
+ }
+
+ implement {
+ name = "putnextboxincache",
+ public = true,
+ protected = true,
+ arguments = { "string", "string", "box" },
+ actions = function(category,name,b)
+ name = tonumber(name) or name
+ b = tonut(b)
+ if trace then
+ report("category %a, name %a, %s (%s)",category,name,"save",b and "content" or "empty")
+ end
+ cache[category][name] = b or false
+ end
+ }
+
+end
+
+implement {
+ name = "lastlinewidth",
+ actions = function()
+ local head = tex.lists.page_head
+ -- list dimensions returns 3 value but we take the first
+ context(head and getdimensions(getlist(find_tail(tonut(tex.lists.page_head)))) or 0)
+ end
+}
+
+implement {
+ name = "shiftbox",
+ arguments = { "integer", "dimension" },
+ actions = function(n,d)
+ setshift(getbox(n),d)
+ end,
+}
+
+implement { name = "vpackbox", arguments = "integer", actions = function(n) setbox(n,(vpack(takebox(n)))) end }
+implement { name = "hpackbox", arguments = "integer", actions = function(n) setbox(n,(hpack(takebox(n)))) end }
+
+implement { name = "vpackedbox", arguments = "integer", actions = function(n) context(vpack(takebox(n))) end }
+implement { name = "hpackedbox", arguments = "integer", actions = function(n) context(hpack(takebox(n))) end }
+
+implement {
+ name = "scangivendimensions",
+ public = true,
+ protected = true,
+ arguments = {
+ {
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "depth", "dimension" },
+ },
+ },
+ actions = function(t)
+ texsetdimen("givenwidth", t.width or 0)
+ texsetdimen("givenheight",t.height or 0)
+ texsetdimen("givendepth", t.depth or 0)
+ end,
+}
+
+local function stripglue(list)
+ local done = false
+ local first = list
+ while first do
+ local id = getid(first)
+ if id == glue_code or id == penalty_code then
+ first = getnext(first)
+ else
+ break
+ end
+ end
+ if first and first ~= list then
+ -- we have discardables
+ setsplit(getprev(first),first)
+ flush_list(list)
+ list = first
+ done = true
+ end
+ if list then
+ local tail = findtail(list)
+ local last = tail
+ while last do
+ local id = getid(last)
+ if id == glue_code or id == penalty_code then
+ last = getprev(last)
+ else
+ break
+ end
+ end
+ if last ~= tail then
+ -- we have discardables
+ flush_list(getnext(last))
+ setnext(last)
+ done = true
+ end
+ end
+ return list, done
+end
+
+local function limitate(t) -- don't pack the result !
+ local text = t.text
+ if text then
+ text = tonut(text)
+ else
+ return
+ end
+ local sentinel = t.sentinel
+ if sentinel then
+ sentinel = tonut(sentinel)
+ local s = getlist(sentinel)
+ setlist(sentinel)
+ free(sentinel)
+ sentinel = s
+ else
+ return tonode(text)
+ end
+ local width = getwidth(text)
+ local list = getlist(text)
+ local done = false
+ if t.strip then
+ list, done = stripglue(list)
+ if not list then
+ setlist(text)
+ setwidth(text,0)
+ return text
+ elseif done then
+ width = getdimensions(list)
+ setlist(text,list)
+ end
+ end
+ local left = t.left or 0
+ local right = t.right or 0
+ local total = left + right
+ if total < width then
+ local last = nil
+ local first = nil
+ local maxleft = left
+ local maxright = right
+ local swidth = getwidth(sentinel)
+ if maxright > 0 then
+ maxleft = maxleft - swidth/2
+ maxright = maxright - swidth/2
+ else
+ maxleft = maxleft - swidth
+ end
+ for n in traverse_id(glue_code,list) do
+ local width = getdimensions(list,n)
+ if width > maxleft then
+ if not last then
+ last = n
+ end
+ break
+ else
+ last = n
+ end
+ end
+ if last and maxright > 0 then
+ for n in traverse_id(glue_code,last) do
+ local width = getdimensions(n)
+ if width < maxright then
+ first = n
+ break
+ else
+ first = n
+ end
+ end
+ end
+ if last then
+ local rest = getnext(last)
+ if rest then
+ local tail = findtail(sentinel)
+ if first and getid(first) == glue_code and getid(tail) == glue_code then
+ setwidth(first,0)
+ end
+ if last and getid(last) == glue_code and getid(sentinel) == glue_code then
+ setwidth(last,0)
+ end
+ if first and first ~= last then
+ local prev = getprev(first)
+ if prev then
+ setnext(prev)
+ end
+ setlink(tail,first)
+ end
+ setlink(last,sentinel)
+ setprev(rest)
+ flush_list(rest)
+ end
+ end
+ end
+ setlist(text)
+ free(text)
+
+ if t.freeze then
+ local l = hpack(list,total,"exactly")
+ for n in traverse_id(glue_code,list) do
+ setglue(n,(effective_glue(n,l)))
+ end
+ setlist(l)
+ flush_node(l)
+ end
+
+ return tonode(list)
+end
+
+implement {
+ name = "limitated",
+ public = true,
+ protected = true,
+ arguments = {
+ {
+ { "left", "dimension" },
+ { "right", "dimension" },
+ { "text", "hbox" },
+ { "sentinel", "hbox" },
+ { "strip", "boolean" },
+ { "freeze", "boolean" },
+ }
+ },
+ actions = function(t)
+ context.dontleavehmode()
+ context(limitate(t))
+ end,
+}
+
+-- only in lmtx:
+
+implement {
+ name = "widthuptohere",
+ public = true,
+ usage = "value",
+ actions = function()
+ local n = texgetnest()
+ local w = 0
+ if n.mode == hmode_code then
+ local h = hpack(getnext(tonut(n.head)))
+ w = getwidth(h)
+ setlist(h)
+ free(h)
+ end
+ return tokens.values.dimension, w
+ end,
+}
+
+implement {
+ name = "doifelseindented",
+ public = true,
+ protected = true,
+ actions = function()
+ local n = texgetnest()
+ local b = false
+ -- can be a helper !
+ if n.mode == hmode_code then
+ n = tonut(n.head)
+ while n do
+ n = getnext(n)
+ if n then
+ local id = getid(n)
+ if id == hlist_code then
+ if getsubtype(n) == indent_code then
+ b = getwidth(n) > 0
+ break
+ end
+ elseif id ~= par_code then
+ break
+ end
+ end
+ end
+ end
+ commands.doifelse(b)
+ end,
+}
+
+implement {
+ name = "noflinesinbox",
+ public = true,
+ protected = false,
+ arguments = "integer",
+ actions = function(n)
+ local c = 0
+ local b = getbox(n)
+ if b then
+ b = getlist(b)
+ if b then
+ for n, id in traverse(b) do
+ if id == hlist_code or id == vlist_code then
+ c = c + 1
+ end
+ end
+ end
+ end
+ context(c)
+ end,
+}
+
+do
+
+ local takebox = tex.takebox
+
+ implement {
+ name = "thebox",
+ public = true,
+ arguments = "integer",
+ actions = function(n)
+ context(takebox(n))
+ end
+ }
+
+end
+
+-- only in lmtx
+
+implement {
+ name = "reversevboxcontent",
+ protected = true,
+ public = true,
+ arguments = "integer",
+ actions = function(n)
+ local b = getbox(n)
+ local l = b and getid(b) == vlist_code and getlist(b)
+ if l and getnext(l) then
+ setlist(b,reverse(l)) -- no re-vpack here!
+ end
+ end
+}
+
+-- only in lmtx
+
+do
+
+ local scaninteger = tokens.scanners.integer
+ local scanbox = tokens.scanners.box
+ local scandimen = tokens.scanners.dimen
+
+ local setsubtype = nuts.setsubtype
+ local removenode = nuts.remove
+ local getnormalizedline = nuts.getnormalizedline -- we can optimize this
+ local getdimensions = nuts.dimensions
+ local getrangedimensions = nuts.rangedimensions
+
+ local setprop = nuts.setprop
+ local getprop = nuts.getprop
+
+ local listcodes = nodes.listcodes
+ local line_code = listcodes.line
+ local equation_code = listcodes.equation
+ local unknown_code = listcodes.unknown
+
+ local values = tokens.values
+ local dimension_value = values.dimension
+ local cardinal_value = values.cardinal
+ local direct_value = values.direct
+
+ -- todo: make helper that formats
+
+ local reporterror = logs.texerrormessage
+
+ -- The first variant did a linear lookup but for large boxes and lots of
+ -- analysis that is not nice. Okay, in practice performance is quite ok
+ -- (milliseconds for thousands of access) but still ... the next is nicer
+ -- and it's part of the experimental fun stuff anyway.
+
+ local function countlines(box)
+ local prop = getprop(box,"boxlines")
+ if not prop then
+ local line = 0
+ local list = getlist(box)
+ prop = { }
+ if list then
+ for n, subtype in nexthlist, list do
+ if subtype == line_code then -- or subtype == equation_code then
+ line = line + 1
+ prop[line] = n
+ end
+ end
+ end
+ setprop(box,"boxlines",prop)
+ end
+ return prop
+ end
+
+ local function boxlinecount(what)
+ local n = scaninteger()
+ local box = getbox(n)
+ if what == "value" then
+ return cardinal_value, box and #countlines(box) or 0
+ end
+ end
+
+ local function findline()
+ local n = scaninteger()
+ local line = scaninteger()
+ local box = getbox(n)
+ if box then
+ local prop = getprop(box,"boxlines")
+ if not prop then
+ prop = countlines(box)
+ end
+ local found = prop[line]
+ if found then
+ local props = getprop(found,"lineproperties")
+ if not props then
+ props = getnormalizedline(found)
+ props.width, props.height, props.depth = getwhd(found)
+ setprop(found,"lineproperties",props)
+ end
+ return props, line, found, box
+ end
+ end
+ reporterror("no line %i in box %i",line,n)
+ end
+
+ local function findrange()
+ local n = scaninteger()
+ local first = scaninteger()
+ local last = scaninteger()
+ local box = getbox(n)
+ if box then
+ local prop = getprop(box,"boxlines")
+ if not prop then
+ prop = countlines(box)
+ end
+ if first > 0 and last <= #prop then
+ for i = first, last do
+ local found = prop[i]
+ local props = getprop(found,"lineproperties")
+ if not props then
+ props = getnormalizedline(found)
+ props.width, props.height, props.depth = getwhd(found)
+ setprop(found,"lineproperties",props)
+ end
+ end
+ return prop, first, last, box
+ end
+ end
+ reporterror("no lines %i - %i in box %i",first,last,n)
+ end
+
+ local function getline(props,line,found,box,value)
+ local p, n = getboth(found)
+ local temp = new_hlist()
+ setsubtype(temp,getsubtype(found))
+ setwhd(temp,getwhd(found))
+ if found == getlist(box) then
+ setlink(temp,n)
+ setlist(box,temp)
+ else
+ setlink(p,temp,n)
+ end
+ getprop(box,"boxlines")[line] = temp
+ setboth(found)
+ setsubtype(found, unknown_code)
+ if value then
+ return direct_value, found
+ else
+ context(tonode(found))
+ end
+ end
+
+ local function copyline(props,line,found,box,value)
+ found = copy_node(found)
+ setsubtype(found, unknown_code)
+ if value then
+ return direct_value, found
+ else
+ context(tonode(found))
+ end
+ end
+
+ local function setline(props,line,found,box)
+ local p, n = getboth(found)
+ local temp = scanbox()
+ if temp then
+ temp = tonut(temp)
+ if found == getlist(box) then
+ setlink(temp,n)
+ setlist(box,temp)
+ else
+ setlink(p,temp,n)
+ end
+ flush_node(found)
+ getprop(box,"boxlines")[line] = temp
+ end
+ end
+
+ local function naturaldimensions(p,l,found)
+ if not p.naturalwidth then
+ p.naturalwidth, p.naturalheight, p.naturaldepth = getdimensions(getlist(found))
+ end
+ return p
+ end
+
+ local function rangedimensions(p,f,l,box)
+ local w, h, d = getrangedimensions(box,p[f],getnext(p[l]),true)
+ return { width = w, height = h, depth = d }
+ end
+
+ local getters_one = {
+
+ ["wd"] = function(p,l,found) return dimension_value, p.width end,
+ ["ht"] = function(p,l,found) return dimension_value, p.height end,
+ ["dp"] = function(p,l,found) return dimension_value, p.depth end,
+ ["ls"] = function(p,l,found) return dimension_value, p.leftskip end,
+ ["rs"] = function(p,l,found) return dimension_value, p.rightskip end,
+ ["lh"] = function(p,l,found) return dimension_value, p.lefthangskip end,
+ ["rh"] = function(p,l,found) return dimension_value, p.righthangskip end,
+ ["lp"] = function(p,l,found) return dimension_value, p.parfillleftskip end,
+ ["rp"] = function(p,l,found) return dimension_value, p.parfillrightskip end,
+ ["in"] = function(p,l,found) return dimension_value, p.indent end,
+
+ ["nw"] = function(p,l,found) return dimension_value, naturaldimensions(p,l,found).naturalwidth end,
+ ["nh"] = function(p,l,found) return dimension_value, naturaldimensions(p,l,found).naturalheigth end,
+ ["nd"] = function(p,l,found) return dimension_value, naturaldimensions(p,l,found).naturaldepth end,
+
+ ["get"] = function(p,l,found,box) return getline(p,l,found,box,true) end,
+ }
+
+ local getters_two = {
+ ["wd"] = function(p,f,l,box) return dimension_value, rangedimensions(p,f,l,box).width end,
+ ["ht"] = function(p,f,l,box) return dimension_value, rangedimensions(p,f,l,box).height end,
+ ["dp"] = function(p,f,l,box) return dimension_value, rangedimensions(p,f,l,box).depth end,
+ }
+
+ local setters_one = {
+ ["wd"] = function(p,l,found) return setwidth (found,scandimen(false,false,true)) end,
+ ["ht"] = function(p,l,found) return setheight(found,scandimen(false,false,true)) end,
+ ["dp"] = function(p,l,found) return setdepth (found,scandimen(false,false,true)) end,
+ ["set"] = setline,
+ ["get"] = getline,
+ ["copy"] = copyline,
+ }
+
+ local function boxline(name,what)
+ local props, line, found, box = findline()
+ if not found then
+ --
+ elseif what == "value" then
+ local getter = getters_one[name]
+ if getter then
+ return getter(props,line,found,box)
+ end
+ else
+ local setter = setters_one[name]
+ if setter then
+ return setter(props,line,found,box)
+ end
+ end
+ end
+
+ --
+
+ local function boxrange(name,what)
+ local prop, first, last, box = findrange()
+ if not prop then
+ --
+ elseif what == "value" then
+ local getter = getters_two[name]
+ if getter then
+ return getter(prop,first,last,box)
+ end
+ else
+ local setter = setters_two[name]
+ if setter then
+ return setter(prop,first,last,box)
+ end
+ end
+ end
+
+ local function define_one(name,action)
+ implement {
+ name = name,
+ public = true,
+ usage = "value",
+ actions = function(what) return boxline(action,what) end,
+ }
+ end
+
+ local function define_two(name,action)
+ implement {
+ name = name,
+ public = true,
+ usage = "value",
+ actions = function(what) return boxrange(action,what) end,
+ }
+ end
+
+ implement {
+ name = "boxlines",
+ public = true,
+ usage = "value",
+ actions = boxlinecount,
+ }
+
+ define_one("boxline", "get")
+ define_one("setboxline", "set")
+ define_one("copyboxline", "copy")
+ define_one("boxlineht", "ht")
+ define_one("boxlinedp", "dp")
+ define_one("boxlinewd", "wd")
+ define_one("boxlinels", "ls")
+ define_one("boxliners", "rs")
+ define_one("boxlinelh", "lh")
+ define_one("boxlinerh", "rh")
+ define_one("boxlinelp", "lp")
+ define_one("boxlinerp", "rp")
+ define_one("boxlinein", "in")
+ define_one("boxlinenw", "nw")
+ define_one("boxlinenh", "nh")
+ define_one("boxlinend", "nd")
+
+ define_two("boxrangewd", "wd")
+ define_two("boxrangeht", "ht")
+ define_two("boxrangedp", "dp")
+
+end
+
+do
+
+ local getbox = tex.getbox
+ local setfield = nodes.setfield
+ local getfield = nodes.getfield
+ local flush = nodes.flush
+ local copynode = nodes.copy
+
+ local function get(n,field,copy)
+ local b = getbox(n)
+ if b then
+ local p = getfield(b,field)
+ if copy then
+ p = copynode(p)
+ else
+ setfield(b,field)
+ end
+ context(p) -- todo: proper return
+ end
+ end
+
+ local function set(n,l,field)
+ local b = getbox(n)
+ if b then
+ setfield(b,field,l)
+ else
+ flush(l)
+ end
+ end
+
+ implement {
+ name = "prelistbox",
+ public = true,
+ usage = "value",
+ arguments = { "integer", '"pre"' },
+ actions = get,
+ }
+
+ implement {
+ name = "postlistbox",
+ public = true,
+ usage = "value",
+ arguments = { "integer", '"post"' },
+ actions = get,
+ }
+
+ implement {
+ name = "prelistcopy",
+ public = true,
+ usage = "value",
+ arguments = { "integer", '"pre"', true },
+ actions = get,
+ }
+
+ implement {
+ name = "postlistcopy",
+ public = true,
+ usage = "value",
+ arguments = { "integer", '"post"', true },
+ actions = get,
+ }
+
+ implement {
+ name = "setprelistbox",
+ public = true,
+ usage = "value",
+ arguments = { "integer", "box", '"pre"' },
+ actions = set,
+ }
+
+ implement {
+ name = "setpostlistbox",
+ public = true,
+ usage = "value",
+ arguments = { "integer", "box", '"post"' },
+ actions = set,
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkxl b/Master/texmf-dist/tex/context/base/mkxl/supp-box.mkxl
index e6ab96e8929..e52ea90b81c 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/supp-box.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/supp-box.mkxl
@@ -15,13 +15,7 @@
\unprotect
-\registerctxluafile{supp-box}{optimize}
-
-% This file is partially cleaned up.
-
-%D First some defaults:
-
-\fixupboxesmode\plusone
+\registerctxluafile{supp-box}{autosuffix,optimize}
%D And some dimensions:
@@ -29,17 +23,7 @@
\newdimen\givenheight
\newdimen\givendepth
-%D \macros
-%D {dontcomplain}
-%D
-%D The next macro suppresses over- and underfull messages which often makes sense
-%D when we deal with boxes.
-
-\unexpanded\def\dontcomplain
- {\hbadness\plustenthousand
- \vbadness\plustenthousand
- \hfuzz \maxdimen
- \vfuzz \maxdimen}
+% \fixupboxesmode\plusone % gone: is now the default
%D This module implements some box manipulation macros. Some are quite simple, some
%D are more advanced and when understood well, all can be of use.
@@ -51,11 +35,11 @@
%D not, you're in trouble). These shortcuts can be used like a dimension, opposite
%D to the core macros \type {\strutdepth} and alike, which are values.
-\def\strutdp {\dp\strutbox}
-\def\strutht {\ht\strutbox}
-\def\strutwd {\wd\strutbox}
-\def\struthtdp{\htdp\strutbox}
-\def\strutgap {\dimexpr\ht\strutbox-\dp\strutbox\relax}
+ \def\strutdp {\dp\strutbox} % overloaded in spac-ver
+ \def\strutht {\ht\strutbox} % overloaded in spac-ver
+\permanent\protected\def\strutwd {\wd\strutbox}
+\permanent\protected\def\struthtdp{\dimexpr\strutht+\strutdp\relax}
+\permanent\protected\def\strutgap {\dimexpr\strutht-\strutdp\relax}
%D \macros
%D {voidbox,nextbox}
@@ -76,21 +60,21 @@
\newdimen\nextdepth
%D \macros
-%D {smashbox, smashedbox}
+%D {smashbox, smashboxed, smashedbox}
%D
%D Smashing is introduced in \PLAIN\ \TEX, and stands for reducing the dimensions of
%D a box to zero. The most resolute one is presented first.
-\unexpanded\def\smashbox#1%
- {\wd#1\zeropoint
- \ht#1\zeropoint
- \dp#1\zeropoint}
-
-\unexpanded\def\smashboxed#1%
- {\wd#1\zeropoint
- \ht#1\zeropoint
- \dp#1\zeropoint
- \box#1\relax}
+% \permanent\protected\def\smashbox#1%
+% {\wd#1\zeropoint
+% \ht#1\zeropoint
+% \dp#1\zeropoint}
+%
+% \permanent\protected\def\smashboxed#1%
+% {\wd#1\zeropoint
+% \ht#1\zeropoint
+% \dp#1\zeropoint
+% \box#1\relax}
%D \macros
%D {hsmashbox,vsmashbox}
@@ -98,18 +82,18 @@
%D Smashing can be used for overlaying boxes. Depending on the mode, horizontal or
%D vertical, one can use:
-\unexpanded\def\hsmashbox#1%
- {\wd#1\zeropoint}
-
-\unexpanded\def\vsmashbox#1%
- {\ht#1\zeropoint
- \dp#1\zeropoint}
+% \permanent\protected\def\hsmashbox#1%
+% {\wd#1\zeropoint}
+%
+% \permanent\protected\def\vsmashbox#1%
+% {\ht#1\zeropoint
+% \dp#1\zeropoint}
%D The next implementation is less sensitive for spurious spaces.
\newcount\c_boxes_register
-\unexpanded\def\smashbox
+\permanent\protected\def\smashbox
{\afterassignment\syst_boxes_smash_boxes_register\c_boxes_register}
\def\syst_boxes_smash_boxes_register
@@ -117,28 +101,30 @@
\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint}
-\unexpanded\def\hsmashbox
+\permanent\protected\def\hsmashbox
{\afterassignment\syst_boxes_hsmashed_boxes_register\c_boxes_register}
\def\syst_boxes_hsmashed_boxes_register
{\wd\c_boxes_register\zeropoint}
-\unexpanded\def\vsmashbox
+\permanent\protected\def\vsmashbox
{\afterassignment\syst_boxes_vsmashed_boxes_register\c_boxes_register}
\def\syst_boxes_vsmashed_boxes_register
{\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint}
-\unexpanded\def\smashedbox
+\permanent\protected\def\smashedbox
{\afterassignment\syst_boxes_smashed_boxes_register\c_boxes_register}
-\unexpanded\def\syst_boxes_smashed_boxes_register
+\protected\def\syst_boxes_smashed_boxes_register
{\wd\c_boxes_register\zeropoint
\ht\c_boxes_register\zeropoint
\dp\c_boxes_register\zeropoint
\box\c_boxes_register}
+\aliased\let\smashboxed\smashedbox
+
%D \macros
%D {hsmash,vsmash,
%D hsmashed,vsmashed}
@@ -147,23 +133,23 @@
%D some subtle differences betreen the smash and smashed alternatives. The later
%D ones reduce all dimensions to zero.
-\unexpanded\def\hsmash {\bgroup\dowithnextboxcs\syst_boxes_hsmashed_nextbox\hbox}
-\unexpanded\def\vsmash {\bgroup\dowithnextboxcs\syst_boxes_vsmashed_nextbox\vbox}
-\unexpanded\def\hsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \hbox}
-\unexpanded\def\vsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \vbox}
+\permanent\protected\def\hsmash {\bgroup\dowithnextboxcs\syst_boxes_hsmashed_nextbox\hbox}
+\permanent\protected\def\vsmash {\bgroup\dowithnextboxcs\syst_boxes_vsmashed_nextbox\vbox}
+\permanent\protected\def\hsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \hbox}
+\permanent\protected\def\vsmashed{\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox \vbox}
-\unexpanded\def\syst_boxes_hsmashed_nextbox
+\protected\def\syst_boxes_hsmashed_nextbox
{\wd\nextbox\zeropoint
\box\nextbox
\egroup}
-\unexpanded\def\syst_boxes_vsmashed_nextbox
+\protected\def\syst_boxes_vsmashed_nextbox
{\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
\box\nextbox
\egroup}
-\unexpanded\def\syst_boxes_smashed_nextbox
+\protected\def\syst_boxes_smashed_nextbox
{\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
\wd\nextbox\zeropoint
@@ -180,16 +166,16 @@
%D \smashedvbox to ... {...}
%D \stoptyping
-\unexpanded\def\smashedhbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\hbox}
-\unexpanded\def\smashedvbox{\vpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\vbox}
+\permanent\protected\def\smashedhbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\hbox}
+\permanent\protected\def\smashedvbox{\vpack\bgroup\dowithnextboxcs\syst_boxes_smashed_nextbox\vbox}
%D First we define a helper. We use a \LUATEX\ feature in order to avoid
%D mathpalettes.
\newcount\c_boxes_math_style
-\unexpanded\def\syst_boxes_math_set_nextbox#1%
- {\c_boxes_math_style\mathstyle
+\protected\def\syst_boxes_math_set_nextbox#1%
+ {\c_boxes_math_style\normalmathstyle
\setbox\nextbox\hbox{\normalstartimath\mathsurround\zeropoint\triggermathstyle\c_boxes_math_style{#1}\normalstopimath}}
%D \macros
@@ -199,7 +185,7 @@
%D catcode safer. It is needed by the math module (although the \type {\leavevmode}
%D is not added here).
-\unexpanded\def\smash
+\permanent\protected\def\smash
{\begingroup
\futureexpandis[\syst_boxes_smash_yes\syst_boxes_smash_nop}
@@ -271,9 +257,9 @@
%D {\mathchoice}, the next macro looks ugly. We also take care of non||braced
%D arguments.
-\unexpanded\def\phantom {\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed }
-\unexpanded\def\vphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_v}
-\unexpanded\def\hphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_h}
+\permanent\protected\def\phantom {\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed }
+\permanent\protected\def\vphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_v}
+\permanent\protected\def\hphantom{\begingroup\futurelet\nexttoken\syst_boxes_phantom_indeed_h}
\def\syst_boxes_phantom_math #1{\syst_boxes_math_set_nextbox{#1}\syst_boxes_phantom_make }
\def\syst_boxes_phantom_math_v#1{\syst_boxes_math_set_nextbox{#1}\syst_boxes_phantom_make_v}
@@ -337,7 +323,7 @@
%D We also define plain's \type {\mathstrut}.
-\unexpanded\def\mathstrut{\vphantom(} % can be made faster by inlining
+\permanent\protected\def\mathstrut{\vphantom(} % can be made faster by inlining
%D \macros
%D {getboxheight}
@@ -371,7 +357,7 @@
%D The next alternative is slightly more clever, since it accepts \type {{12}} as
%D well as \type {12} as box number.
-\unexpanded\def\getboxheight#1\of#2\box#3%
+\permanent\protected\def\getboxheight#1\of#2\box#3%
{\def\next{#1\htdp\c_boxes_register}%
\afterassignment\next\c_boxes_register=#3}
@@ -389,38 +375,15 @@
%D \stoptyping
%D
%D Er wordt gedeeld door \type {\openlineheight} en een hoogte van~0pt komt overeen
-%D met 0~regels. The raw alternative does not round.
-%D
-%D For a long time we had:
-%D
-%D \starttyping
-%D \newcount\noflines
-%D \newdimen\noflinesheight
-%D
-%D \def\dogetnoflines#1#2%
-%D {\noflinesheight#2\relax
-%D \ifzeropt\noflinesheight
-%D \noflines\zerocount
-%D \else
-%D \divide\noflinesheight \openlineheight
-%D \noflines\noflinesheight
-%D #1\ifdim\noflines\openlineheight=#2\relax \else
-%D \advance\noflines\ifdim#2>\zeropoint\plusone\else\minusone\fi
-%D \fi\fi
-%D \fi}
-%D
-%D \def\getnoflines {\dogetnoflines\iftrue } % compensated
-%D \def\getrawnoflines{\dogetnoflines\iffalse} % no compensation
-%D \stoptyping
-%D
-%D A more recent variant is:
+%D met 0~regels. The raw alternative does not round. See the \MKII\ and \MKIV\ files
+%D for historic variants.
-\ifx\roundingeps\undefined \newdimen\roundingeps \roundingeps=10sp \fi
+\ifdefined\roundingeps \else \newdimen\roundingeps \roundingeps=10sp \fi
\newcount\noflines
\newdimen\noflinesheight
-\unexpanded\def\getnoflines#1%
+\permanent\protected\def\getnoflines#1%
{\noflinesheight#1\relax
\ifzeropt\noflinesheight
\noflines\zerocount
@@ -436,7 +399,7 @@
\advance\noflines\minusone
\fi}
-\unexpanded\def\getroundednoflines#1%
+\permanent\protected\def\getroundednoflines#1%
{\noflinesheight#1\relax
\ifzeropt\noflinesheight
\noflines\zerocount
@@ -450,7 +413,7 @@
\noflines\noflinesheight
\fi}
-\unexpanded\def\getrawnoflines#1%
+\permanent\protected\def\getrawnoflines#1%
{\noflinesheight#1\relax
\ifzeropt\noflinesheight
\noflines\zerocount
@@ -503,19 +466,22 @@
%D \determinenoflines{\definedfont[Sans at 40pt]test\\test}
%D \stoptyping
-\def\syst_boxes_determine_noflines % can be mkiv'd
- {\beginofshapebox
- \unvbox\nextbox
- \endofshapebox
- \globalscratchcounter\zerocount
- \reshapebox{\global\advance\globalscratchcounter\plusone}%
- \expandafter\egroup\expandafter\noflines\the\globalscratchcounter\relax}
+% \def\syst_boxes_determine_noflines % can be mkiv'd
+% {\beginofshapebox
+% \unvbox\nextbox
+% \endofshapebox
+% \globalscratchcounter\zerocount
+% \reshapebox{\global\advance\globalscratchcounter\plusone}%
+% \expandafter\egroup\expandafter\noflines\the\globalscratchcounter\relax}
+
+\def\syst_boxes_determine_noflines
+ {\expandafter\egroup\expandafter\noflines\noflinesinbox\nextbox\relax}
-\unexpanded\def\determinenoflines
+\permanent\protected\def\determinenoflines
{\bgroup
\forgetall
- \let\crlf\endgraf
- \let\\\endgraf
+ \enforced\let\crlf\endgraf
+ \enforced\let\\\endgraf
\dowithnextboxcs\syst_boxes_determine_noflines\vbox}
%D \macros
@@ -529,7 +495,7 @@
%D \doiftext {data} {then branch}
%D \stoptyping
-\unexpanded\def\doifelsetext#1%
+\permanent\protected\def\doifelsetext#1%
{\begingroup
\setbox\scratchbox\hbox % no \hpack because we can have fallbacks
{\settrialtypesetting
@@ -540,7 +506,7 @@
\endgroup\expandafter\firstoftwoarguments
\fi}
-\unexpanded\def\doiftext#1%
+\permanent\protected\def\doiftext#1%
{\begingroup
\setbox\scratchbox\hbox % no \hpack because we can have fallbacks
{\settrialtypesetting
@@ -555,7 +521,7 @@
%
% \nospacing#1}%
-\let\doiftextelse\doifelsetext
+\aliased\let\doiftextelse\doifelsetext
%D \macros
%D {dowithnextbox,nextbox}
@@ -590,7 +556,9 @@
%D In this implementation the \type {\aftergroup} construction is needed because
%D \type {\afterassignment} is executed inside the box.
-\unexpanded\def\dowithnextbox#1%
+\let\syst_boxes_with_next_box\relax
+
+\permanent\protected\def\dowithnextbox#1%
{\def\syst_boxes_with_next_box{#1}%
\afterassignment\syst_boxes_with_next_box_indeed
\setbox\nextbox}
@@ -598,7 +566,7 @@
\def\syst_boxes_with_next_box_indeed
{\aftergroup\syst_boxes_with_next_box}
-\unexpanded\def\dowithnextboxcs#1%
+\permanent\protected\def\dowithnextboxcs#1%
{\let\syst_boxes_with_next_box#1%
\afterassignment\syst_boxes_with_next_box_indeed
\setbox\nextbox}
@@ -618,19 +586,19 @@
%D A slower but more versatile implementation is:
%D
%D \starttyping
-%D \unexpanded\def\dowithnextbox#1#2%
+%D \protected\def\dowithnextbox#1#2%
%D {\def\syst_boxes_with_next_box{#1}%
%D \ifx#2\hbox
%D \afterassignment\syst_boxes_with_next_box_indeed
-%D \else\ifx#2\vbox
+%D \orelse\ifx#2\vbox
%D \afterassignment\syst_boxes_with_next_box_indeed
-%D \else\ifx#2\vtop
+%D \orelse\ifx#2\vtop
%D \afterassignment\syst_boxes_with_next_box_indeed
-%D \else\ifx#2\normalvcenter
+%D \orelse\ifx#2\normalvcenter
%D \afterassignment\syst_boxes_with_next_box_indeed
%D \else
%D \afterassignment\syst_boxes_with_next_box
-%D \fi\fi\fi\fi
+%D \fi
%D \setbox\nextbox#2}
%D \stoptyping
%D
@@ -643,12 +611,12 @@
%D The next couple of shortcuts saves us memory as well as \type {{}}'s in passing
%D parameters.
-\def\nextboxht {\ht\nextbox}
-\def\nextboxwd {\wd\nextbox}
-\def\nextboxdp {\dp\nextbox}
-\def\nextboxhtdp{\htdp\nextbox}
+\permanent\def\nextboxht {\ht\nextbox}
+\permanent\def\nextboxwd {\wd\nextbox}
+\permanent\def\nextboxdp {\dp\nextbox}
+\permanent\def\nextboxhtdp{\htdp\nextbox}
-\unexpanded\def\flushnextbox{\box\nextbox}
+\permanent\protected\def\flushnextbox{\box\nextbox}
%D \macros
%D {dowithnextboxcontent}
@@ -662,20 +630,28 @@
%D
%D {\em todo: Search source for potential usage!}
-\unexpanded\def\dowithnextboxcontent#1#2% inside, after
- {\def\syst_boxes_with_next_box_one{#2}%
- \def\syst_boxes_with_next_box_two{#1}%
- \afterassignment\syst_boxes_with_next_box_content_indeed
- \setbox\nextbox}
+% \protected\def\dowithnextboxcontent#1#2% inside, after
+% {\def\syst_boxes_with_next_box_one{#2}%
+% \def\syst_boxes_with_next_box_two{#1}%
+% \afterassignment\syst_boxes_with_next_box_content_indeed
+% \setbox\nextbox}
+%
+% \protected\def\dowithnextboxcontentcs#1#2% inside, after
+% {\let\syst_boxes_with_next_box_one#2%
+% \let\syst_boxes_with_next_box_two#1%
+% \afterassignment\syst_boxes_with_next_box_content_indeed
+% \setbox\nextbox}
+%
+% \def\syst_boxes_with_next_box_content_indeed
+% {\syst_boxes_with_next_box_two\aftergroup\syst_boxes_with_next_box_one}
-\unexpanded\def\dowithnextboxcontentcs#1#2% inside, after
- {\let\syst_boxes_with_next_box_one#2%
- \let\syst_boxes_with_next_box_two#1%
- \afterassignment\syst_boxes_with_next_box_content_indeed
+\permanent\protected\def\dowithnextboxcontent#1#2% inside, after
+ {\afterassigned{#1\aftergrouped{#2}}%
\setbox\nextbox}
-\def\syst_boxes_with_next_box_content_indeed
- {\syst_boxes_with_next_box_two\aftergroup\syst_boxes_with_next_box_one}
+\permanent\protected\def\dowithnextboxcontentcs#1#2% inside, after
+ {\afterassigned{#1\aftergroup#2}%
+ \setbox\nextbox}
%D \macros
%D {llap, rlap, tlap, blap, clap}
@@ -683,27 +659,30 @@
%D Some well known friends, but we implement them our own way. We want the macros to
%D work in both math and text mode.
-\def\dodorlap{\hpack to \zeropoint{\box\nextbox\hss}\endgroup}
-\def\dodollap{\hpack to \zeropoint{\hss\box\nextbox}\endgroup}
-\def\dodoclap{\hpack to \zeropoint{\hss\box\nextbox\hss}\endgroup}
-
-\def\dorlap{\begingroup\dowithnextboxcs\dodorlap\hbox}
-\def\dollap{\begingroup\dowithnextboxcs\dodollap\hbox}
-\def\doclap{\begingroup\dowithnextboxcs\dodoclap\hbox}
+\def\syst_boxes_do_rlap{\hpack to \zeropoint{\box\nextbox\hss}\endgroup}
+\def\syst_boxes_do_llap{\hpack to \zeropoint{\hss\box\nextbox}\endgroup}
+\def\syst_boxes_do_clap{\hpack to \zeropoint{\hss\box\nextbox\hss}\endgroup}
+\def\syst_boxes_do_tlap{\vpack to \zeropoint{\vss\box\nextbox}\endgroup}
+\def\syst_boxes_do_blap{\vpack to \zeropoint{\box\nextbox\vss}\endgroup}
-\def\domathclap{\mathpalette\dodomathclap} \def\dodomathclap#1#2{\doclap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
-\def\domathllap{\mathpalette\dodomathllap} \def\dodomathllap#1#2{\dollap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
-\def\domathrlap{\mathpalette\dodomathrlap} \def\dodomathrlap#1#2{\dorlap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
+\def\syst_boxes_rlap {\begingroup\dowithnextboxcs\syst_boxes_do_rlap\hbox}
+\def\syst_boxes_llap {\begingroup\dowithnextboxcs\syst_boxes_do_llap\hbox}
+\def\syst_boxes_clap {\begingroup\dowithnextboxcs\syst_boxes_do_clap\hbox}
+\def\syst_boxes_math_clap{\mathpalette\syst_boxes_do_math_clap}
+\def\syst_boxes_math_llap{\mathpalette\syst_boxes_do_math_llap}
+\def\syst_boxes_math_rlap{\mathpalette\syst_boxes_do_math_rlap}
-\unexpanded\def\rlap{\mathortext\domathrlap\dorlap}
-\unexpanded\def\llap{\mathortext\domathllap\dollap}
-\unexpanded\def\clap{\mathortext\domathclap\doclap}
+\def\syst_boxes_do_math_clap#1#2{\syst_boxes_clap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
+\def\syst_boxes_do_math_llap#1#2{\syst_boxes_llap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
+\def\syst_boxes_do_math_rlap#1#2{\syst_boxes_rlap{\normalstartimath\mathsurround\zeropoint#1#2\normalstopimath}}
-\def\dodotlap{\vpack to \zeropoint{\vss\box\nextbox}\endgroup}
-\def\dodoblap{\vpack to \zeropoint{\box\nextbox\vss}\endgroup}
+\permanent\protected\def\rlap{\mathortext\syst_boxes_math_rlap\syst_boxes_rlap}
+\permanent\protected\def\llap{\mathortext\syst_boxes_math_llap\syst_boxes_llap}
+\permanent\protected\def\clap{\mathortext\syst_boxes_math_clap\syst_boxes_clap}
+\permanent\protected\def\tlap{\begingroup\dowithnextboxcs\syst_boxes_do_tlap\vbox}
+\permanent\protected\def\blap{\begingroup\dowithnextboxcs\syst_boxes_do_blap\vbox}
-\unexpanded\def\tlap{\begingroup\dowithnextboxcs\dodotlap\vbox}
-\unexpanded\def\blap{\begingroup\dowithnextboxcs\dodoblap\vbox}
+%D in \LMTX\ this mechanism is obsolete! Use boxlines instead!
%D \macros
%D {beginofshapebox,
@@ -817,6 +796,10 @@
%D bad spacing. This means that for instance linenumbers etc. should be given zero
%D height and depth before being lapped into the margin. The previous examples
%D ignore this side effect, but beware!
+%D
+%D This is ancient stuff and proably not used any more but we keep it around or
+%D maybe turn it into a module some day. It shows the kind of struggling that we
+%D needed before \LUATEX\ came around.
\newif \ifsomeshapeleft
\newif \ifreshapingbox
@@ -835,16 +818,16 @@
\newevery \everyshapebox \relax
-\def\shapesignal{.12345678pt} % or 12345sp
+\permanent\dimensiondef\shapesignal.12345678pt % or 12345sp
-\unexpanded\def\reshapebox#1%
+\permanent\protected\def\reshapebox#1%
{\doreshapebox
{#1}%
{\penalty\shapepenalty}%
{\kern \shapekern }%
{\vskip \shapeskip }}
-\def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
+\permanent\protected\def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
{\global\reshapingfailedfalse
\ifzeropt\ht\oldshapebox
\setbox\newshapebox\emptyvbox
@@ -857,18 +840,16 @@
\setbox\newshapebox\box\tmpshapebox
\fi}
-\ifx\originalshapebox\undefined \let\originalshapebox\oldshapebox \fi
-
% We will turn this into a \MKIV\ variant (we can use \type {\vpack} too).
-\unexpanded\def\insertshapesignal
+\permanent\protected\def\insertshapesignal
{\hpack to \shapesignal{\strut\hss}% plus \strut
\prevdepth\strutdp} % never \nointerlineskip
-\unexpanded\def\restoreshapebox % compensates for the signal
+\permanent\protected\def\restoreshapebox % compensates for the signal
{\global\setbox\tmpshapebox\vbox{\vskip-\lineheight\unvcopy\oldshapebox}}
-\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
+\permanent\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
{\ifnum\lastnodetype=\gluenodecode
\shapeskip\lastskip
\global\setbox\tmpshapebox\vbox{#4\unvbox\tmpshapebox}%
@@ -902,21 +883,21 @@
\advance\shapecounter \plusone
\fi}
-\unexpanded\def\beginofshapebox
+\permanent\protected\def\beginofshapebox
{\setbox\oldshapebox\vbox
\bgroup
\reshapingboxtrue
\the\everyshapebox
\insertshapesignal}
-\unexpanded\def\endofshapebox
+\permanent\protected\def\endofshapebox
{\endgraf
\egroup}
-\let\beginshapebox\beginofshapebox
-\let\endshapebox \endofshapebox
+\aliased\let\beginshapebox\beginofshapebox
+\aliased\let\endshapebox \endofshapebox
-\unexpanded\def\flushshapebox
+\permanent\protected\def\flushshapebox
{\bgroup
\ifzeropt\ht\newshapebox
\else
@@ -967,7 +948,7 @@
%
% \omlijnd[offset=0pt,hoogte=8mm,uitlijnen={rechts,laho}]{\bfa test}
-\unexpanded\def\innerflushshapebox
+\permanent\protected\def\innerflushshapebox
{\ifzeropt\ht\newshapebox \else
\unvcopy\newshapebox\relax % unvcopy ! else spacing problem
% \kern-\dp\newshapebox\relax
@@ -990,12 +971,14 @@
%D use \type {\shapedhbox} instead of \type {\hbox}, since it manages the height and
%D depth of the line.
-\unexpanded\def\shapedhbox % lines with non strutted dimensions have
- {\expanded{\dowithnextbox % interlineskip so if we want the original
- {\ht\nextbox\the\ht\shapebox % spacing, we need to preserve the original
- \dp\nextbox\the\dp\shapebox % height and depth which is definitely
- \box\nextbox}} % needed if we apply struts to the 'new'
- \hbox} % box or do something that changed ist size
+\permanent\protected\def\shapedhbox % lines with non strutted dimensions have
+ {\expanded{\dowithnextbox % interlineskip so if we want the original
+ {\ht\nextbox\the\ht\shapebox % spacing, we need to preserve the original
+ \dp\nextbox\the\dp\shapebox % height and depth which is definitely
+ \box\nextbox}} % needed if we apply struts to the 'new'
+ \hbox} % box or do something that changed ist size
+
+%D Till here obsolete.
%D \macros
%D {hyphenatedword,
@@ -1010,10 +993,10 @@
%D \showhyphens{dohyphenatedword}
%D \stoptyping
-\unexpanded\def\doshowhyphenatednextbox
+\permanent\protected\def\doshowhyphenatednextbox
{\clf_showhyphenatedinlist\nextbox}
-\unexpanded\def\showhyphens % hpack: so no processing (we hyphenate in lua)
+\permanent\protected\def\showhyphens % hpack: so no processing (we hyphenate in lua)
{\dowithnextboxcs\doshowhyphenatednextbox\hpack}
%D The following macros are seldom used but handy for tracing.
@@ -1024,19 +1007,13 @@
%D \hyphenatedfile{tufte}
%D \stoptyping
-\unexpanded\def\dohyphenatednextbox
- {\clf_hyphenatedlist\nextbox false\relax
- \unhbox\nextbox}
-
-\unexpanded\def\hyphenatedword {\dowithnextboxcs\dohyphenatednextbox\hbox}
-\unexpanded\def\hyphenatedpar {\dowithnextboxcs\dohyphenatednextbox\hbox}
-\unexpanded\def\hyphenatedfile#1{\dowithnextboxcs\dohyphenatednextbox\hbox{\readfile{#1}\donothing\donothing}}
+\def\syst_boxes_hyphenatednextbox {\clf_hyphenatedlist\nextbox false\relax\unhbox\nextbox}
+\def\syst_boxes_hyphenatednextboxcolor{\clf_hyphenatedlist\nextbox true \relax\unhbox\nextbox}
-\unexpanded\def\dohyphenatednextboxcolor
- {\clf_hyphenatedlist\nextbox true\relax
- \unhbox\nextbox}
-
-\unexpanded\def\hyphenatedcoloredword{\dowithnextboxcs\dohyphenatednextboxcolor\hbox}
+\permanent\protected\def\hyphenatedword {\dowithnextboxcs\syst_boxes_hyphenatednextbox\hbox}
+\permanent\protected\def\hyphenatedpar {\dowithnextboxcs\syst_boxes_hyphenatednextbox\hbox}
+\permanent\protected\def\hyphenatedfile #1{\dowithnextboxcs\syst_boxes_hyphenatednextbox\hbox{\readfile{#1}\donothing\donothing}}
+\permanent\protected\def\hyphenatedcoloredword{\dowithnextboxcs\syst_boxes_hyphenatednextboxcolor\hbox}
%D \macros
%D {processtokens}
@@ -1065,43 +1042,51 @@
%D The list of tokens may contain spaces, while \type {\\}, \type {{}} and \type {\
%D } are handled as space too.
-\unexpanded\def\processtokens#1#2#3#4#5%
+%D This can be done in a more modern way but for nostalgic reasons we keep it.
+
+\mutable\let\nextprocessedtoken\empty
+
+\mutable\let\before \relax % for now mutable
+%mutable\let\between\relax % is a math character
+\mutable\let\after \relax % for now mutable
+\mutable\let\white \relax % for now mutable
+
+\permanent\protected\def\processtokens#1#2#3#4#5%
{\begingroup
- \def\lastcharacter{\lastcharacter}% hm, recursive ?
- \def\space{ }%
- \let\\=\space
- \def\before {#1}%
- \def\between{#2}%
- \def\after {#3}%
- \def\white {#4}%
- \let\savedbefore\before
- \doprocesstokens#5\lastcharacter
+ \enforced\permanent\def\space{ }%
+ \enforced\let\\\space
+ \enforced\def\before {#1}%
+ \enforced\def\between{#2}%
+ \enforced\def\after {#3}%
+ \enforced\def\white {#4}%
+ \enforced\let\m_syst_boxes_before\before
+ \syst_boxes_processtokens#5\s!e_o_t_token
\endgroup}
-\def\doprocesstokens% the space after = is essential
- {\afterassignment\dodoprocesstokens\let\nextprocessedtoken= }
+\def\syst_boxes_processtokens% the space after = is essential
+ {\afterassignment\syst_boxes_do_processtokens\let\nextprocessedtoken= }
-\def\redoprocessedtoken
+\def\syst_boxes_redo_processedtoken
{\dowithnextbox
{\before{\copy\nextbox}% \before can use nextbox several times
- \let\before\between
- \doprocesstokens}
+ \enforced\let\before\between
+ \syst_boxes_processtokens}
\hbox\bgroup}
-\def\dodoprocesstokens
- {\ifx\nextprocessedtoken\lastcharacter
+\def\syst_boxes_do_processtokens
+ {\ifx\nextprocessedtoken\s!e_o_t_token
\after
\orelse\ifx\nextprocessedtoken\bgroup
- \expandafter\redoprocessedtoken
+ \expandafter\syst_boxes_redo_processedtoken
\else
\expandafter\if\space\nextprocessedtoken
\after\white
- \let\before\savedbefore
+ \enforced\let\before\m_syst_boxes_before
\else
\before\nextprocessedtoken
- \let\before\between
+ \enforced\let\before\between
\fi
- \expandafter\doprocesstokens
+ \expandafter\syst_boxes_processtokens
\fi}
%D \macros
@@ -1119,20 +1104,22 @@
%D
%D When calculating the room needed, we take the width of the third argument into
%D account, which leads to a bit more complex macro than needed at first sight.
+%D
+%D Sort of obsolete I guess:
-\def\dodoboundtext#1%
+\def\syst_boxes_boundtext#1%
{\setbox\scratchboxone\hbox{#1}%
\advance\scratchdimen -\wd\scratchboxone
\ifdim\scratchdimen>\zeropoint\relax#1\fi}
-\def\doboundtext#1#2#3% still used?
+\permanent\protected\def\doboundtext#1#2#3% still used?
{\hbox
{\setbox\scratchbox\hbox{#1}%
\scratchdimen#2\relax
\ifdim\wd\scratchbox>\scratchdimen
\setbox\scratchbox\hbox{#3}%
\advance\scratchdimen -\wd\scratchbox
- \handletokens#1\with\dodoboundtext
+ \handletokens#1\with\syst_boxes_boundtext
\fi
\box\scratchbox}}
@@ -1154,116 +1141,20 @@
\ifdefined\fakecompoundhyphen\else \let\fakecompoundhyphen\relax \fi
\ifdefined\veryraggedright \else \def\veryraggedright{\raggedright} \fi
-% \unexpanded\def\limitatetext
-% {\bgroup % evt \setstrut
-% \forgetall % otherwise indentation and so
-% \let\limitatetext\firstofthreearguments
-% \fakecompoundhyphen % dangerous ! ! ! ! ! ! ! ! !
-% \dowithnextboxcs\syst_boxes_limitate_text\hbox}
-%
-% \def\syst_boxes_limitate_text#1% #2
-% {\doifelsenothing{#1}\syst_boxes_limitate_text_nop\syst_boxes_limitate_text_yes{#1}} % {#2}
-%
-% \def\syst_boxes_limitate_text_nop#1#2%
-% {\unhbox\nextbox
-% \egroup}
-%
-% \def\syst_boxes_limitate_text_yes#1#2%
-% {\nopenalties
-% \scratchdimen#1\relax
-% \ifdim\scratchdimen<\zeropoint\relax % we'll take the last line
-% \donefalse
-% \scratchdimen-\scratchdimen
-% \else
-% \donetrue
-% \fi
-% \ifdim\wd\nextbox>\scratchdimen
-% \setbox\scratchbox\hbox{\ifdone\space#2\else#2\space\fi}%
-% \advance\scratchdimen -\wd\scratchbox
-% \setbox\scratchboxone\box\nextbox
-% \setbox\nextbox\vbox
-% {\hsize\scratchdimen
-% \hfuzz\maxdimen
-% \veryraggedright
-% \strut
-% \ifdone \else
-% \parfillskip\zeropoint
-% \rightskip\zeropoint
-% \hskip\zeropoint \s!plus 1\s!fill % \hsize
-% \fi
-% \unhcopy\scratchboxone}%
-% \ifdim\ht\nextbox>\strutht
-% \setbox\nextbox\vbox % if omitted: missing brace reported
-% {\splittopskip\openstrutheight
-% \ifdone
-% \setbox\nextbox\vsplit\nextbox to \strutht
-% \else
-% \doloop
-% {\setbox\scratchboxone\vsplit\nextbox to \strutht
-% \ifdim\ht\nextbox>\strutht \else \exitloop \fi}%
-% \fi
-% \unvbox\nextbox
-% \setbox\nextbox\lastbox
-% \global\setbox1\hpack
-% {\ifdone
-% \unhbox\nextbox\unskip\kern\zeropoint\box\scratchbox
-% \else
-% \box\scratchbox\unhbox\nextbox
-% \fi
-% \unskip}}%
-% \unhbox1
-% \else
-% \unhbox0%
-% \fi
-% \else
-% \unhbox\nextbox
-% \fi
-% \egroup}
-%
-% %D We can also limit a text with more control:
-% %D
-% %D \startbuffer
-% %D \limitatetext {\input tufte } {2cm,5mm} {\unknown}
-% %D \limitatetext {ton en hans} {2cm,5mm} {\unknown}
-% %D \limitatetext {ton en hans zijn eikels} {2cm,5mm} {\unknown}
-% %D \limitatetext {ton} {2cm,5mm} {\unknown}
-% %D \stopbuffer
-% %D
-% %D \typebuffer \getbuffer
-% %D
-% %D We build this feature on top of the previous macro.
-%
-% % we could move the text argument to the end
-%
-% \let\normallimitatetext\limitatetext
-%
-% \def\speciallimitatetext#1#2#3#4% text left right placeholder
-% {%\dontleavehmode
-% \bgroup
-% \let\speciallimitatetext\firstoffourarguments
-% \setbox\scratchboxone\hbox
-% {\nohyphens
-% \normallimitatetext{#1}{+#2}{}#4%
-% \normallimitatetext{#1}{-#3}{}}%
-% \setbox\scratchboxtwo\hbox
-% {#1}%
-% \ifdim\wd\scratchboxtwo<\wd\scratchboxone #1\else\unhbox\scratchboxone\fi
-% \egroup}
-%
-% \unexpanded\def\limitatetext#1#2#3% \expanded added 2003/01/16
-% {\splitatcomma{#2}\leftlimit\rightlimit
-% \ifx\rightlimit\empty
-% \normallimitatetext {#1}\leftlimit {#3}%
-% \else
-% \speciallimitatetext{#1}\leftlimit\rightlimit{#3}%
-% \fi}
+%D See \MKIV\ file for the older implementation.
-\unexpanded\def\limitatetext#1#2#3% \expanded added 2003/01/16
- {\splitatcomma{#2}\leftlimit\rightlimit
+\let\m_syst_boxes_left \empty
+\let\m_syst_boxes_right\empty
+
+\permanent\protected\def\limitatetext#1#2#3%
+ {% we could also split in \LUA
+ \splitatcomma{#2}\m_syst_boxes_left\m_syst_boxes_right
\limitated
- left \leftlimit
- \ifx\rightlimit\empty\else
- right \rightlimit
+ \ifempty\m_syst_boxes_left\else
+ left \m_syst_boxes_left
+ \fi
+ \ifempty\m_syst_boxes_right\else
+ right \m_syst_boxes_right
\fi
strip true
sentinel {#3}
@@ -1276,7 +1167,7 @@
%D \limitatefirstline{\input tufte\relax}{10cm}{\unknown}
%D \stoptyping
-\unexpanded\def\limitatefirstline#1#2#3%
+\permanent\protected\def\limitatefirstline#1#2#3%
{\hbox\bgroup\strut % \hpack
\setbox\scratchbox\hbox{\begstrut#1\endstrut}%
\ifdim\wd\scratchbox>#2\relax
@@ -1290,7 +1181,7 @@
\global\setbox\plusone\lastbox
\global\setbox\plusone\hbox{\strut\unhbox\plusone}%
\hbox % to #2 % \hpack
- {\ifx\clip\undefined
+ {\unless\ifdefined\clip
\box\plusone
\orelse\ifdim\wd\plusone>\hsize
\lower\strutdepth\hpack{\clip[\c!width=\hsize,\c!height=\lineheight]{\hpack{\raise\strutdepth\box\plusone}}}%
@@ -1319,7 +1210,7 @@
% todo: provide variant with #1 picked up as box
-\unexpanded\def\processisolatedchars#1#2%
+\permanent\protected\def\processisolatedchars#1#2%
{\dontleavehmode
\begingroup
\setbox\scratchbox\hbox{\settrialtypesetting#2{\savecurrentattributes{pic}}}%
@@ -1332,7 +1223,7 @@
\relax
\endgroup}
-\unexpanded\def\processisolatedwords#1#2%
+\permanent\protected\def\processisolatedwords#1#2%
{\dontleavehmode
\begingroup
\setbox\scratchbox\hbox{\settrialtypesetting#2{\savecurrentattributes{pic}}}%
@@ -1347,7 +1238,7 @@
%D A variant:
-\unexpanded\def\applytocharacters#1%
+\permanent\protected\def\applytocharacters#1%
{\dontleavehmode
\dowithnextbox{\clf_applytobox
method {char}%
@@ -1357,7 +1248,7 @@
\relax}%
\hbox}
-\unexpanded\def\applytowords#1%
+\permanent\protected\def\applytowords#1%
{\dontleavehmode
\dowithnextbox{\clf_applytobox
method {word}%
@@ -1369,33 +1260,33 @@
%D The old call:
-\unexpanded\def\processwords#1%
+\permanent\protected\def\processwords#1%
{\processisolatedwords{#1}\processword}
-\let\processword\relax
+\mutable\let\processword\relax
-\unexpanded\def\applytosplitstringchar#1#2%
+\permanent\protected\def\applytosplitstringchar#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
method {char}%
\relax}
-\unexpanded\def\applytosplitstringword#1#2%
+\permanent\protected\def\applytosplitstringword#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
method {word}%
\relax}
-\unexpanded\def\applytosplitstringline#1#2%
+\permanent\protected\def\applytosplitstringline#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
method {line}%
\relax}
-\unexpanded\def\applytosplitstringcharspaced#1#2%
+\permanent\protected\def\applytosplitstringcharspaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
@@ -1403,7 +1294,7 @@
spaced true%
\relax}
-\unexpanded\def\applytosplitstringwordspaced#1#2%
+\permanent\protected\def\applytosplitstringwordspaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
@@ -1411,7 +1302,7 @@
spaced true%
\relax}
-\unexpanded\def\applytosplitstringlinespaced#1#2%
+\permanent\protected\def\applytosplitstringlinespaced#1#2%
{\dontleavehmode\clf_processsplit
data {#2}%
command {\csstring#1}%
@@ -1444,11 +1335,11 @@
%D would have ended up in the text. This macro can be useful when building
%D complicated menus, headers and footers and|/|or margin material.
-\unexpanded\def\sbox
+\permanent\protected\def\sbox
{\vpack\bgroup
\dowithnextboxcs\syst_boxes_sbox_finish\vbox}
-\unexpanded\def\syst_boxes_sbox_finish
+\def\syst_boxes_sbox_finish
{\boxyoffset\nextbox-\strutdp
\dp\nextbox\strutdp
\ht\nextbox\strutht
@@ -1461,11 +1352,11 @@
%D xx \ruledhbox{\inlinedbox{\tfd test}} xx
%D \stoptyping
-\unexpanded\def\inlinedbox
+\permanent\protected\def\inlinedbox
{\bgroup
\dowithnextboxcs\syst_boxes_inlined_finish\hbox}
-\unexpanded\def\syst_boxes_inlined_finish
+\def\syst_boxes_inlined_finish
{\boxyoffset\nextbox-\dimexpr(\htdp\nextbox-\lineheight)/\plustwo+\strutdp\relax
\ht\nextbox\strutht
\dp\nextbox\strutdp
@@ -1477,7 +1368,7 @@
%D
%D This boxing macro limits the height and depth to those of a strut.
-\unexpanded\def\struttedbox
+\permanent\protected\def\struttedbox
{\hpack\bgroup
\dowithnextboxcs\syst_boxes_struttedbox_finish\hbox}
@@ -1493,7 +1384,7 @@
%D This macro compensates the difference between the topskip and strutheight. Watch
%D how we preserve the depth when it equals strutdepth.
-\unexpanded\def\topskippedbox
+\permanent\protected\def\topskippedbox
{\hpack\bgroup\dowithnextboxcs\syst_boxes_topskippedbox_finish\hbox}
\def\syst_boxes_topskippedbox_finish
@@ -1545,7 +1436,7 @@
%D The dimensions of the surrounding box are kept intact. This commands handles
%D positive and negative dimensions (which is why we need two boxes with rules).
-\unexpanded\def\centeredbox#1#% height +/-dimen width +/-dimen
+\permanent\protected\def\centeredbox#1#% height +/-dimen width +/-dimen
{\bgroup
\dontcomplain
\forgetall
@@ -1582,7 +1473,7 @@
%D
%D Do you see why we call this one \type {next}?
-\unexpanded\def\centerednextbox#1#%
+\permanent\protected\def\centerednextbox#1#%
{\bgroup
\dowithnextbox
{\hsize\wd\nextbox
@@ -1603,7 +1494,7 @@
%D When omitted, the current \type {\hsize} and \type {\vsize} are used. Local
%D dimensions are supported.
-\unexpanded\def\centerbox#1#% optional height +/-dimen width +/-dimen
+\permanent\protected\def\centerbox#1#% optional height +/-dimen width +/-dimen
{\bgroup
\dowithnextbox
{\setlocalhsize
@@ -1633,10 +1524,16 @@
\newif\ifstretchrigidcolumns
\newif\iftightrigidcolumns % if true: just a vbox, no depth/noflines/gridsnap corrrections
-\unexpanded\def\setrigidcolumnhsize#1#2#3% todo: \dimexpr
- {\xdef\savedrigidhsize{\the\hsize}%
+\mutable\let\rigidcolumnlines\!!zerocount
+
+\newbox \rigidcolumnbox
+\newdimen\rigidhsize
+\newcount\rigidcolumns
+
+\permanent\protected\def\setrigidcolumnhsize#1#2#3% todo: \dimexpr
+ {\global\rigidhsize\hsize
+ \global\rigidcolumns#3\relax
\hsize#1\relax
- \global\chardef\rigidcolumns#3\relax
\scratchdimen -#2\relax
\multiply\scratchdimen #3\relax
\advance\scratchdimen #2\relax
@@ -1646,15 +1543,11 @@
% ==
%
% \def\setrigidcolumnhsize#1#2#3%
-% {\xdef\savedrigidhsize{\the\hsize}%
-% \global\chardef\rigidcolumns#3\relax
-% \hsize=\dimexpr(#1-\numexpr#3-1\relax\dimexpr#2\relax)/#3\relax}
+% {\global\rigidhsize\hsize
+% \rigidcolumns#3\relax
+% \hsize\dimexpr(#1-\numexpr#3-1\relax\dimexpr#2\relax)/#3\relax}
-\newbox\rigidcolumnbox
-
-\let\rigidcolumnlines\!!zerocount
-
-\unexpanded\def\rigidcolumnbalance#1%
+\permanent\protected\def\rigidcolumnbalance#1%
{\ifnum\rigidcolumns=1 % tzt ook h/d correctie
\ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi#1\relax
\else
@@ -1691,7 +1584,7 @@
\setbox0=\box\rigidcolumnbox
\doloop
{\setbox\rigidcolumnbox=\copy0
- \setbox\scratchbox\hpack to \savedrigidhsize
+ \setbox\scratchbox\hpack to \rigidhsize
{\dorecurse\rigidcolumns
{\setbox\scratchbox\vsplit\rigidcolumnbox to \scratchdimen
\dp\scratchbox\openstrutdepth
@@ -1745,7 +1638,7 @@
%D Create line and fake height of paragraph by messign with heights: a nice hack by
%D DEK himself.
-%\unexpanded\def\setvboxtohbox
+%\protected\def\setvboxtohbox
% {\bgroup
% \ifdim\baselineskip<16pt \relax
% \scratchdimen\baselineskip
@@ -1759,13 +1652,13 @@
% \xdef\vboxtohboxfactor{\withoutpt\the\scratchdimen}%
% \egroup}
%
-% \unexpanded\def\startvboxtohbox
+% \protected\def\startvboxtohbox
% {\bgroup
% \setvboxtohbox
% \setbox\scratchbox\hbox\bgroup}
%
-% \unexpanded\def\stopvboxtohbox
-% {\ifcase\vboxtohboxslack\else\hskip\zeropoint\!!minus\vboxtohboxslack\fi
+% \protected\def\stopvboxtohbox
+% {\ifcase\vboxtohboxslack\else\hskip\zeropoint\s!minus\vboxtohboxslack\fi
% \egroup
% \dp\scratchbox\zeropoint
% \ht\scratchbox\vboxtohboxfactor\wd\scratchbox
@@ -1779,17 +1672,17 @@
%newbox\d_syst_boxes_vboxtohbox
\newbox\d_syst_boxes_separator
-\unexpanded\def\startvboxtohboxseparator
+\permanent\protected\def\startvboxtohboxseparator
{\setbox\d_syst_boxes_separator\hbox attr \vboxtohboxseparatorattribute\plusone\bgroup}
-\unexpanded\def\stopvboxtohboxseparator
+\permanent\protected\def\stopvboxtohboxseparator
{\egroup}
-\unexpanded\def\startvboxtohbox
+\permanent\protected\def\startvboxtohbox
{\begingroup
\setbox\scratchbox\hbox\bgroup}
-\unexpanded\def\stopvboxtohbox
+\permanent\protected\def\stopvboxtohbox
{\ifvoid\d_syst_boxes_separator
\hskip\zeropoint\ifcase\vboxtohboxslack\else\s!minus\vboxtohboxslack\fi % we really need a skip
\else
@@ -1802,12 +1695,12 @@
% A possible reconstruction:
-\unexpanded\def\convertvboxtohbox
+\permanent\protected\def\convertvboxtohbox
{\makehboxofhboxes
\setbox\scratchboxone\hpack{\unhbox\scratchboxone\removehboxes}% \hpack
\noindent\unhbox\scratchboxone\par}
-\unexpanded\def\makehboxofhboxes
+\permanent\protected\def\makehboxofhboxes
{\setbox\scratchboxone\emptyhbox
\loop % \doloop { .. \exitloop .. }
\setbox\scratchboxtwo\lastbox
@@ -1815,7 +1708,7 @@
\setbox\scratchboxone\hpack{\box\scratchboxtwo\unhbox\scratchboxone}%
\repeat}
-\unexpanded\def\removehboxes
+\permanent\protected\def\removehboxes
{\setbox\scratchboxone\lastbox
\ifhbox\scratchboxone
{\removehboxes}\unhbox\scratchboxone
@@ -1823,11 +1716,11 @@
% And one special for notes:
-\unexpanded\def\starthboxestohbox
+\permanent\protected\def\starthboxestohbox
{\bgroup
\setbox\scratchbox\vbox\bgroup}
-\unexpanded\def\stophboxestohbox
+\permanent\protected\def\stophboxestohbox
{\egroup
\clf_vboxlisttohbox\scratchbox\nextbox\dimexpr\hboxestohboxslack\relax
\dontleavehmode
@@ -1847,7 +1740,7 @@
\newdimen \lasthhboxwidth
\newskip \hhboxindent
-\unexpanded\def\unhhbox#1\with#2%
+\permanent\protected\def\unhhbox#1\with#2%
{\bgroup
\nopenalties
\dontcomplain
@@ -1873,14 +1766,14 @@
\fi}%
\egroup}
-\def\dohboxofvbox
+\def\syst_boxes_hboxofvbox
{\setbox0\vpack{\unvbox\scratchcounter\global\setbox1\lastbox}%
\unhbox1
\egroup}
-\unexpanded\def\hboxofvbox
+\permanent\protected\def\hboxofvbox
{\bgroup
- \afterassignment\dohboxofvbox
+ \afterassignment\syst_boxes_hboxofvbox
\scratchcounter=}
%D This macro can be used to break a paragraph apart and treat each line seperately,
@@ -1921,7 +1814,7 @@
%D dimension of this box suggest some content, the resulting box is unboxed and
%D surrounded by the first two arguments, else the third arguments is executed.
-\unexpanded\def\doifcontent#1#2#3%
+\permanent\protected\def\doifcontent#1#2#3%
{\dowithnextbox
{\ifhbox\nextbox
\ifdim\wd\nextbox>\zeropoint
@@ -1964,7 +1857,9 @@
\newbox\processbox % public : this is the one where \nextbox's end up in
-\unexpanded\def\processboxes#1%
+\let\syst_boxes_process_indeed\relax
+
+\permanent\protected\def\processboxes#1%
{\bgroup
\def\syst_boxes_process_indeed{#1}% #1 can be redefined halfway
\setbox\processbox\emptybox
@@ -1978,7 +1873,7 @@
\syst_boxes_process_indeed % takes \nextbox makes \processbox
\doifelsenextbgroup\syst_boxes_process_yes\syst_boxes_process_nop}
-\unexpanded\def\syst_boxes_process_nop
+\protected\def\syst_boxes_process_nop
{\removeunwantedspaces
\box\processbox
\egroup}
@@ -2002,7 +1897,7 @@
%D
%D \leavevmode\getbuffer
-\def\boxisempty#1%
+\permanent\def\boxisempty#1%
{\ifdim\wd#1=\zeropoint
\ifdim\ht#1=\zeropoint
\ifdim\dp#1=\zeropoint
@@ -2038,12 +1933,12 @@
\kern-\scratchwidth
\hpack to \scratchwidth{\hss\box\nextbox \hss}}}
-\unexpanded\def\startoverlay
+\permanent\protected\def\startoverlay
{\bgroup
- \let\stopoverlay\egroup
+ \enforced\aliased\let\stopoverlay\egroup
\processboxes\syst_boxes_overlay_process}
-\let\stopoverlay\relax
+\aliased\let\stopoverlay\relax
%D \macros
%D {fakebox}
@@ -2056,7 +1951,7 @@
%D
%D returns an empty box with the dimensions of the box specified, here being zero.
-\unexpanded\def\fakebox
+\permanent\protected\def\fakebox
{\bgroup
\afterassignment\syst_boxes_fakebox_finish\scratchcounter}
@@ -2083,15 +1978,20 @@
%D \type {to 3cm}, but align to the left, middle and right. These box types can be
%D used to typeset paragraphs.
-\def\syst_boxes_lrc_process#1{\bgroup\forgetall\let\\\endgraf#1\let\next}
+\def\syst_boxes_lrc_process#1%
+ {\bgroup
+ \forgetall
+ \enforced\let\\\endgraf
+ #1%
+ \let\nexttoken}
-\unexpanded\def\lbox#1#{\vbox#1\syst_boxes_lrc_process\raggedleft }
-\unexpanded\def\cbox#1#{\vbox#1\syst_boxes_lrc_process\raggedcenter}
-\unexpanded\def\rbox#1#{\vbox#1\syst_boxes_lrc_process\raggedright }
+\permanent\protected\def\lbox#1#{\vbox#1\syst_boxes_lrc_process\raggedleft }
+\permanent\protected\def\cbox#1#{\vbox#1\syst_boxes_lrc_process\raggedcenter}
+\permanent\protected\def\rbox#1#{\vbox#1\syst_boxes_lrc_process\raggedright }
-\unexpanded\def\ltop#1#{\vtop#1\syst_boxes_lrc_process\raggedleft }
-\unexpanded\def\ctop#1#{\vtop#1\syst_boxes_lrc_process\raggedcenter}
-\unexpanded\def\rtop#1#{\vtop#1\syst_boxes_lrc_process\raggedright }
+\permanent\protected\def\ltop#1#{\vtop#1\syst_boxes_lrc_process\raggedleft }
+\permanent\protected\def\ctop#1#{\vtop#1\syst_boxes_lrc_process\raggedcenter}
+\permanent\protected\def\rtop#1#{\vtop#1\syst_boxes_lrc_process\raggedright }
%D The alternatives \type {\tbox} and \type {\bbox} can be used to properly align
%D boxes, like in:
@@ -2113,8 +2013,8 @@
%D
%D \getbuffer
-\unexpanded\def\tbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_tbox_finish\hbox}
-\unexpanded\def\bbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_bbox_finish\hbox}
+\permanent\protected\def\tbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_tbox_finish\hbox}
+\permanent\protected\def\bbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_bbox_finish\hbox}
\def\syst_boxes_tbox_finish
{\scratchheight\ht\strutbox
@@ -2139,17 +2039,17 @@
%D
%D A few more boxes.
-\def\dodolhbox{\hpack to \hsize{\box\nextbox\hss }}
-\def\dodomhbox{\hpack to \hsize{\hss\box\nextbox\hss}}
-\def\dodorhbox{\hpack to \hsize{\hss\box\nextbox }}
+\def\syst_boxes_lhbox{\hpack to \hsize{\box\nextbox\hss }}
+\def\syst_boxes_mhbox{\hpack to \hsize{\hss\box\nextbox\hss}}
+\def\syst_boxes_rhbox{\hpack to \hsize{\hss\box\nextbox }}
-\unexpanded\def\lhbox{\dowithnextboxcs\dodolhbox\hbox}
-\unexpanded\def\mhbox{\dowithnextboxcs\dodomhbox\hbox}
-\unexpanded\def\rhbox{\dowithnextboxcs\dodorhbox\hbox}
+\permanent\protected\def\lhbox{\dowithnextboxcs\syst_boxes_lhbox\hbox}
+\permanent\protected\def\mhbox{\dowithnextboxcs\syst_boxes_mhbox\hbox}
+\permanent\protected\def\rhbox{\dowithnextboxcs\syst_boxes_rhbox\hbox}
-\let\lefthbox \lhbox
-\let\midhbox \mhbox
-\let\righthbox\rhbox
+\aliased\let\lefthbox \lhbox
+\aliased\let\midhbox \mhbox
+\aliased\let\righthbox\rhbox
%D \macros
%D {boxofsize}
@@ -2166,15 +2066,15 @@
\newdimen\sizeofbox
-\unexpanded\def\boxofsize#1%
+\permanent\protected\def\boxofsize#1%
{\bgroup
\sizeofbox\zeropoint
\scratchdimen\zeropoint
\def\docommand
{\advance\sizeofbox\scratchdimen
- \futurelet\next\dodocommand}%
+ \futurelet\nexttoken\dodocommand}%
\def\dodocommand
- {\ifx\next\bgroup
+ {\ifx\nexttoken\bgroup
\expanded{\egroup#1 to \the\sizeofbox}%
\else
\expandafter\afterassignment\expandafter\docommand\expandafter\scratchdimen
@@ -2188,7 +2088,7 @@
% \limitvbox
% \limithbox
-\unexpanded\def\limitatelines#1#2% size sentinel
+\permanent\protected\def\limitatelines#1#2% size sentinel
{\dowithnextbox
{\scratchdimen#1\hsize
\ifdim\wd\nextbox>\scratchdimen
@@ -2199,7 +2099,7 @@
\unhbox\nextbox}
\hbox}
-\unexpanded\def\fittoptobaselinegrid % weg hier
+\permanent\protected\def\fittoptobaselinegrid % weg hier
{\dowithnextbox
{\bgroup
\par
@@ -2228,7 +2128,7 @@
\setbox\fakedboxcursor\hpack
{\vrule\s!width\zeropoint\s!height\zeropoint\s!depth\zeropoint}
-\unexpanded\def\boxcursor % overloaded in core-vis
+\permanent\protected\def\boxcursor % overloaded in core-vis
{\iftraceboxplacement
\bgroup
\scratchdimen2\onepoint
@@ -2245,26 +2145,26 @@
\copy\fakedboxcursor
\fi}
-\unexpanded\def\placedbox
+\permanent\protected\def\placedbox
{\iftraceboxplacement\ruledhbox\else\hbox\fi}
\newdimen\boxoffset
\newdimen\boxhdisplacement
\newdimen\boxvdisplacement
-\unexpanded\def\rightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbox_finish \placedbox}
-\unexpanded\def\leftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbox_finish \placedbox}
-\unexpanded\def\topbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_topbox_finish \placedbox}
-\unexpanded\def\bottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_bottombox_finish \placedbox}
-\unexpanded\def\lefttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_lefttopbox_finish \placedbox}
-\unexpanded\def\righttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_righttopbox_finish \placedbox}
-\unexpanded\def\leftbottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbottombox_finish \placedbox}
-\unexpanded\def\rightbottombox{\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbottombox_finish\placedbox}
+\permanent\protected\def\rightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbox_finish \placedbox}
+\permanent\protected\def\leftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbox_finish \placedbox}
+\permanent\protected\def\topbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_topbox_finish \placedbox}
+\permanent\protected\def\bottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_bottombox_finish \placedbox}
+\permanent\protected\def\lefttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_lefttopbox_finish \placedbox}
+\permanent\protected\def\righttopbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_righttopbox_finish \placedbox}
+\permanent\protected\def\leftbottombox {\hpack\bgroup\dowithnextboxcs\syst_boxes_leftbottombox_finish \placedbox}
+\permanent\protected\def\rightbottombox{\hpack\bgroup\dowithnextboxcs\syst_boxes_rightbottombox_finish\placedbox}
-\let\topleftbox \lefttopbox
-\let\toprightbox \righttopbox
-\let\bottomleftbox \leftbottombox
-\let\bottomrightbox\rightbottombox
+\aliased\let\topleftbox \lefttopbox
+\aliased\let\toprightbox \righttopbox
+\aliased\let\bottomleftbox \leftbottombox
+\aliased\let\bottomrightbox\rightbottombox
\def\syst_boxes_rightbox_finish
{\global\boxhdisplacement\boxoffset
@@ -2338,10 +2238,10 @@
\box\nextbox
\egroup}
-\unexpanded\def\middlebox {\hpack\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox}
-\unexpanded\def\baselinemiddlebox{\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinemiddlebox_finish\placedbox}
-\unexpanded\def\baselineleftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox}
-\unexpanded\def\baselinerightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox}
+\permanent\protected\def\middlebox {\hpack\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox}
+\permanent\protected\def\baselinemiddlebox{\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinemiddlebox_finish\placedbox}
+\permanent\protected\def\baselineleftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox}
+\permanent\protected\def\baselinerightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox}
\def\syst_boxes_middlebox_finish
{\global\boxhdisplacement-.5\wd\nextbox
@@ -2384,7 +2284,7 @@
%D
%D Experimental, not yet frozen:
-\unexpanded\def\lrtbbox#1#2#3#4% l r t b
+\permanent\protected\def\lrtbbox#1#2#3#4% l r t b
{\bgroup
\dowithnextboxcontent
{\advance\hsize-#1\advance\hsize-#2\relax
@@ -2397,7 +2297,7 @@
%D
%D See core-tbl.tex for an example of its usage:
-\unexpanded\def\toplinebox
+\permanent\protected\def\toplinebox
{\dowithnextboxcs\syst_boxes_toplinebox_finish\tbox}
\def\syst_boxes_toplinebox_finish
@@ -2436,91 +2336,88 @@
\installcorenamespace {stackbox}
\installcorenamespace {stacklst}
-\unexpanded\def\setstackbox#1#2%
+\permanent\protected\def\setstackbox#1#2%
{\ifcsname\??stackbox#1:#2\endcsname\else
\expandafter\newbox\csname\??stackbox#1:#2\endcsname
\fi
\global\setbox\csname\??stackbox#1:#2\endcsname\vbox}
-\unexpanded\def\initializeboxstack#1%
+\permanent\protected\def\initializeboxstack#1%
{\def\docommand##1{\setstackbox{#1}{##1}{}}%
\ifcsname\??stacklst#1\endcsname
\expandafter\processcommacommand\expandafter[\lastnamedcs]\docommand
\fi
- \letgvalueempty{\??stacklst#1}}
+ \gletcsname\??stacklst#1\endcsname\empty}
-\unexpanded\def\savebox#1#2% stack name
- {% beware, \setxvalue defines the cs beforehand so we cannot use the
- % test inside the { }
+\permanent\protected\def\savebox#1#2% stack name
+ {% beware, \setxvalue defines the cs beforehand so we cannot use the test inside the { }
\ifcsname\??stacklst#1\endcsname
- %\setxvalue{\??stacklst#1}{\csname\??stacklst#1\endcsname,#2}%
- \expandafter\xdef\csname\??stacklst#1\expandafter\endcsname\expandafter{\lastnamedcs,#2}%
+ \xdefcsname\??stacklst#1\expandafter\endcsname\expandafter{\lastnamedcs,#2}%
\else
- \expandafter\xdef\csname\??stacklst#1\endcsname{#2}%
+ \xdefcsname\??stacklst#1\endcsname{#2}%
\fi
\setstackbox{#1}{#2}}
-\unexpanded\def\flushbox#1#2% unwrapped
+\permanent\protected\def\flushbox#1#2% unwrapped
{\ifcsname\??stackbox#1:#2\endcsname
\box\lastnamedcs
\else
\emptybox
\fi}
-\unexpanded\def\restorebox#1#2% unwrapped
+\permanent\protected\def\restorebox#1#2% unwrapped
{\ifcsname\??stackbox#1:#2\endcsname
\copy\lastnamedcs
\else
\emptybox
\fi}
-\unexpanded\def\foundbox#1#2% wrapped
+\permanent\protected\def\foundbox#1#2% wrapped
{\vpack
{\ifcsname\??stackbox#1:#2\endcsname
\copy\lastnamedcs
\fi}}
-\unexpanded\def\doifelsebox#1#2%
- {\ifcsname\??stackbox#1:#2\endcsname
- \ifvoid\lastnamedcs
- \doubleexpandafter\secondoftwoarguments
- \else
- \doubleexpandafter\firstoftwoarguments
- \fi
- \else
+\permanent\protected\def\doifelsebox#1#2%
+ {\unless\ifcsname\??stackbox#1:#2\endcsname
+ \expandafter\secondoftwoarguments
+ \orelse\ifvoid\lastnamedcs
\expandafter\secondoftwoarguments
+ \else
+ \expandafter\firstoftwoarguments
\fi}
-\let\doifboxelse\doifelsebox
+\aliased\let\doifboxelse\doifelsebox
%D This one is cheaper (the above is no longer used that much):
\installcorenamespace {boxstack}
\newcount\c_syst_boxes_stack
-\let \b_syst_boxes_stack\relax
-\unexpanded\def\syst_boxes_stack_allocate
+\mutable\let\b_syst_boxes_stack\relax
+
+\protected\def\syst_boxes_stack_allocate
{\newbox\b_syst_boxes_stack
- \expandafter\let\csname\??boxstack\number\c_syst_boxes_stack\endcsname\b_syst_boxes_stack}
+ \letcsname\??boxstack\number\c_syst_boxes_stack\endcsname\b_syst_boxes_stack}
-\unexpanded\def\syst_boxes_push#1#2%
+\protected\def\syst_boxes_push#1#2%
{\global\advance\c_syst_boxes_stack\plusone
\expandafter\let\expandafter\b_syst_boxes_stack\csname\??boxstack\number\c_syst_boxes_stack\endcsname
- \ifx\b_syst_boxes_stack\relax % cheaper then csname check as in most cases it's defined
+ \ifrelax\b_syst_boxes_stack % cheaper then csname check as in most cases it's defined
\syst_boxes_stack_allocate
\fi
#1\setbox\b_syst_boxes_stack\box#2\relax}
-\unexpanded\def\syst_boxes_pop#1#2%
+\protected\def\syst_boxes_pop#1#2%
{#1\setbox#2\box\csname\??boxstack\number\c_syst_boxes_stack\endcsname
\global\advance\c_syst_boxes_stack\minusone}
-\unexpanded\def\localpushbox {\syst_boxes_push\relax}
-\unexpanded\def\localpopbox {\syst_boxes_pop \relax}
+\permanent\protected\def\localpushbox {\syst_boxes_push\relax}
+\permanent\protected\def\localpopbox {\syst_boxes_pop \relax}
-\unexpanded\def\globalpushbox{\syst_boxes_push\global}
-\unexpanded\def\globalpopbox {\syst_boxes_pop \global}
+\permanent\protected\def\globalpushbox{\syst_boxes_push\global}
+\permanent\protected\def\globalpopbox {\syst_boxes_pop \global}
%D And here is a more modern one (not yet in i-*):
%D
@@ -2538,16 +2435,17 @@
%D \resetboxesincache{foo}
%D \stoptyping
-\unexpanded\def\putboxincache #1#2#3{\clf_putboxincache {#1}{#2}#3\relax}
-\unexpanded\def\getboxfromcache #1#2#3{\clf_getboxfromcache {#1}{#2}#3\relax}
-\unexpanded\def\doifelseboxincache #1#2{\clf_doifelseboxincache {#1}{#2}}
-\unexpanded\def\copyboxfromcache #1#2#3{\clf_copyboxfromcache {#1}{#2}#3\relax}
-\unexpanded\def\directboxfromcache #1#2{\clf_directboxfromcache {#1}{#2}}
-\unexpanded\def\directcopyboxfromcache#1#2{\clf_directcopyboxfromcache{#1}{#2}}
-\unexpanded\def\resetboxesincache #1{\clf_resetboxesincache {#1}}
-
-\unexpanded\def\putnextboxincache#1#2%
- {\dowithnextbox{\putboxincache{#1}{#2}\nextbox}}
+% \putboxincache % {category} {name} number
+% \getboxfromcache % {category} {name} number
+% \doifelseboxincache % {category} {name}
+% \copyboxfromcache % {category} {name} number
+% \directboxfromcache % {category} {name}
+% \directcopyboxfromcache % {category} {name}
+% \resetboxesincache % {category}
+% \putnextboxincache % {category} {name} box
+% \getboxwdfromcache % {category} {name}
+% \getboxhtfromcache % {category} {name}
+% \getboxdpfromcache % {category} {name}
%D \macros
%D {removedepth, obeydepth}
@@ -2555,21 +2453,21 @@
%D While \type {\removedepth} removes the preceding depth, \type {\obeydepth} makes
%D sure we have depth. Both macros leave the \type {\prevdepth} untouched.
-\unexpanded\def\removedepth
+\permanent\protected\def\removedepth
{\ifvmode
\ifdim\prevdepth>\zeropoint
\kern-\prevdepth
\fi
\fi}
-\unexpanded\def\obeydepth
+\permanent\protected\def\obeydepth
{\par % watch out for changes in math formulas
\ifvmode\ifdim\prevdepth<\zeropoint\orelse\ifdim\prevdepth<\strutdp
\kern\dimexpr\strutdp-\prevdepth\relax
\prevdepth\strutdp
\fi\fi}
-\unexpanded\def\undepthed
+\permanent\protected\def\undepthed
{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\hbox}
%D \macros
@@ -2577,10 +2475,10 @@
%D
%D A funny (but rather stupid) one, plus a redefinition.
-\unexpanded\def\removebottomthings
+\permanent\protected\def\removebottomthings
{\dorecurse\plusfive{\unskip\unkern\unpenalty}}
-\unexpanded\def\removelastskip % \ifvmode the plain tex one \fi
+\permanent\protected\def\removelastskip % \ifvmode the plain tex one \fi, overloaded to \permanent in spac-ver
{\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi}
%D \macros
@@ -2589,7 +2487,7 @@
%D This macro sets the dimensions of a box to those of a strut. Sort of obsolete so
%D it will go away.
-\unexpanded\def\makestrutofbox % not used
+\permanent\protected\def\makestrutofbox % not used
{\afterassignment\syst_boxes_makestrutofbox\c_boxes_register}
\def\syst_boxes_makestrutofbox
@@ -2608,8 +2506,8 @@
%D \hsmash{\raisebox{100pt}\hbox{test}}
%D \stoptyping
-\unexpanded\def\raisebox#1{\bgroup\afterassignment\syst_boxes_raise_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
-\unexpanded\def\lowerbox#1{\bgroup\afterassignment\syst_boxes_lower_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
+\permanent\protected\def\raisebox#1{\bgroup\afterassignment\syst_boxes_raise_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
+\permanent\protected\def\lowerbox#1{\bgroup\afterassignment\syst_boxes_lower_indeed\scratchdimen#1} % so both 10pt and {10pt} is accepted
\def\syst_boxes_raise_indeed{\dowithnextboxcs\syst_boxes_raise_finish}
\def\syst_boxes_lower_indeed{\dowithnextboxcs\syst_boxes_lower_finish}
@@ -2630,7 +2528,7 @@
% vcenter in text, we kunnen vcenter overloaden
-\unexpanded\def\halfwaybox
+\permanent\protected\def\halfwaybox
{\hpack\bgroup
\dowithnextboxcs\syst_boxes_halfwaybox_finish\hbox}
@@ -2639,7 +2537,7 @@
\lower.5\ht\nextbox\box\nextbox
\egroup}
-\unexpanded\def\depthonlybox
+\permanent\protected\def\depthonlybox
{\tpack\bgroup
\dowithnextboxcs\syst_boxes_depthonlybox_finish\vbox}
@@ -2650,30 +2548,12 @@
%D New:
-\def\setdimentoatleast#1#2{\ifdim#1>\zeropoint\else#1=#2\fi}
-\def\setdimentoatmost #1#2{\ifdim#1>#2\relax \else#1=#2\fi}
+\permanent\def\setdimentoatleast#1#2{\ifdim#1>\zeropoint\else#1=#2\fi}
+\permanent\def\setdimentoatmost #1#2{\ifdim#1>#2\relax \else#1=#2\fi}
%D And even rawer:
-\let\naturalvcenter\normalvtop % will go away
-
-%D \macros
-%D {vcenter}
-%D
-%D Also new: tex mode \type {\vcenter}.
-
-\unexpanded\def\vcenter
- {\vbox\bgroup
- \dowithnextboxcs\syst_boxes_vcenter_finish\vbox}
-
-\def\syst_boxes_vcenter_finish
- {\hpack{\normalstartimath\vcenter{\box\nextbox}\normalstopimath}%
- \egroup}
-
-% could be \everymathematics
-
-\prependtoks \let\vcenter\normalvcenter \to \everymath
-\prependtoks \let\vcenter\normalvcenter \to \everydisplay
+\aliased\let\naturalvcenter\normalvtop % will go away
% \appendtoks \let\vcenter\normalvcenter \to \everymathematics
@@ -2682,7 +2562,7 @@
%D
%D A not so well unhboxable box can be made with:
-\unexpanded\def\frozenhbox
+\permanent\protected\def\frozenhbox
{\hpack\bgroup
\dowithnextboxcs\syst_boxes_frozenhbox_finish\hbox}
@@ -2698,19 +2578,17 @@
\installcorenamespace {box_x}
\installcorenamespace {box_y}
-\unexpanded\def\setboxllx #1#2{\expandafter\edef\csname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
-\unexpanded\def\setboxlly #1#2{\expandafter\edef\csname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
+\permanent\protected\def\setboxllx #1#2{\edefcsname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
+\permanent\protected\def\setboxlly #1#2{\edefcsname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
-\unexpanded\def\gsetboxllx#1#2{\expandafter\xdef\csname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
-\unexpanded\def\gsetboxlly#1#2{\expandafter\xdef\csname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
+\permanent\protected\def\gsetboxllx#1#2{\xdefcsname\??box_x\number#1\endcsname{\the\dimexpr#2\relax}}
+\permanent\protected\def\gsetboxlly#1#2{\xdefcsname\??box_y\number#1\endcsname{\the\dimexpr#2\relax}}
-%def\getboxllx#1{\ifcsname\??box_x\number#1\endcsname\csname\??box_x\number#1\endcsname\else\zeropoint\fi}
-%def\getboxlly#1{\ifcsname\??box_y\number#1\endcsname\csname\??box_y\number#1\endcsname\else\zeropoint\fi}
-\def\getboxllx#1{\ifcsname\??box_x\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
-\def\getboxlly#1{\ifcsname\??box_y\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
+\permanent\def\getboxllx#1{\ifcsname\??box_x\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
+\permanent\def\getboxlly#1{\ifcsname\??box_y\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
-\def\directgetboxllx#1{\csname\??box_x\number#1\endcsname} % use when sure existence
-\def\directgetboxlly#1{\csname\??box_y\number#1\endcsname} % use when sure existence
+\permanent\def\directgetboxllx#1{\csname\??box_x\number#1\endcsname} % use when sure existence
+\permanent\def\directgetboxlly#1{\csname\??box_y\number#1\endcsname} % use when sure existence
%D \macros
%D {shownextbox}
@@ -2725,7 +2603,7 @@
%D \shownextbox\vbox{\setupwhitespace[big]test\endgraf\thinrule}
%D \stoptyping
-\unexpanded\def\shownextbox % seldom used
+\permanent\protected\def\shownextbox % seldom used
{\dowithnextbox
{\bgroup
\showboxbreadth\maxdimen
@@ -2737,7 +2615,7 @@
\interactionmode\scratchcounter
\egroup}}
-\unexpanded\def\spreadhbox#1% rebuilds \hbox{<box><hss><box><hss><box>}
+\permanent\protected\def\spreadhbox#1% rebuilds \hbox{<box><hss><box><hss><box>}
{\bgroup
\ifhbox#1\relax
\setbox\scratchboxtwo\emptybox
@@ -2758,10 +2636,10 @@
\fi
\egroup}
-% makes sense but too much log for overfull boxes:
-%
-% \showboxbreadth\maxdimen
-% \showboxdepth \maxdimen
+% Why not ...
+
+\showboxbreadth\plusthousand
+\showboxdepth \plusthousand
%D Moved from cont-new:
%D
@@ -2769,7 +2647,7 @@
%D \minimalhbox 100pt {test}
%D \stoptyping
-\unexpanded\def\minimalhbox#1#%
+\permanent\protected\def\minimalhbox#1#%
{\dowithnextbox
{\bgroup
\setbox\scratchbox\hpack#1{\hss}%
@@ -2780,14 +2658,45 @@
%D A bit dirty:
-\unexpanded\def\nodestostring#1#2% more tolerant for #2=\cs
- {\begingroup
- \setbox\nextbox\hbox{#2}%
- \normalexpanded{\endgroup\edef\noexpand#1{\clf_boxtostring\nextbox}}}
+% \permanent\protected\def\nodestostring#1#2% more tolerant for #2=\cs
+% {\begingroup
+% \setbox\nextbox\hbox{#2}%
+% \normalexpanded{\endgroup\edef\noexpand#1{\boxtostring\nextbox}}}
+%
+% \permanent\def\tostring
+% {\beginlocalcontrol
+% \dowithnextbox{\endlocalcontrol\boxtostring\nextbox}\hbox}
+%
+% \permanent\def\tostring
+% {\beginlocalcontrol\begingroup
+% \dowithnextbox{\normalexpanded{\endgroup\endlocalcontrol\boxtostring\nextbox}}\hbox}
+
+\def\syst_boxes_contenttostring
+ {\normalexpanded{\endgroup\endlocalcontrol\boxtostring\nextbox}}
+
+\permanent\def\contenttostring
+ {\beginlocalcontrol\begingroup
+ \dowithnextboxcs\syst_boxes_contenttostring\hbox}
+
+\newtoks\everypreroll
+
+\let\prerolltostring\firstofoneargument % we need to bypass initializations
+
+\appendtoks
+ \permanent\def\prerolltostring
+ {\beginlocalcontrol\begingroup
+ \the\everypreroll
+ \dowithnextboxcs\syst_boxes_contenttostring\hbox}
+\to \everydump
+
+% depricated:
+
+\permanent\protected\def\nodestostring#1#2% more tolerant for #2=\cs
+ {\edef#2{\contenttostring{#1}}}
%D Even more dirty:
-\let\hyphenatedhbox\hbox
+\aliased\let\hyphenatedhbox\hbox % was a macro in mkii
%D We can do this:
%D
@@ -2805,85 +2714,86 @@
\newdimen\lastnaturalboxht
\newdimen\lastnaturalboxdp
-\let\getnaturaldimensions\clf_getnaturaldimensions % sets three dimensions
-\let\naturalwd \clf_naturalwd % calculates and returns wd
+%D We can define these public in lua:
+
+\aliased\let\getnaturaldimensions\clf_getnaturaldimensions % sets three dimensions
+\aliased\let\naturalwd \clf_naturalwd % calculates and returns wd
-\let\getnaturalwd\clf_getnaturalwd % no intermediate
-\let\setnaturalwd\clf_setnaturalwd % no intermediate
+\aliased\let\getnaturalwd\clf_getnaturalwd % no intermediate
+\aliased\let\setnaturalwd\clf_setnaturalwd % no intermediate
-\unexpanded\def\doifelserighttoleftinbox{\clf_doifelserighttoleftinbox}
+\permanent\protected\def\doifelserighttoleftinbox{\clf_doifelserighttoleftinbox}
-\let\doifrighttoleftinboxelse\doifelserighttoleftinbox
+\aliased\let\doifrighttoleftinboxelse\doifelserighttoleftinbox
%D New, used in high/low:
\definesystemattribute [runningtext] [public]
-%unexpanded\def\runninghbox{\hbox attr \runningtextattribute \plusone} % not yet in i-*
-\unexpanded\def\runninghbox{\hbox attr \runningtextattribute \fontid\font} % not yet in i-*
+\permanent\protected\def\runninghbox{\hbox attr \runningtextattribute \fontid\font} % not yet in i-*
%D To complement lua (yet undocumented):
-\unexpanded\def\beginhbox{\hbox\bgroup} \let\endhbox\egroup
-\unexpanded\def\beginvbox{\vbox\bgroup} \let\endvbox\egroup
-\unexpanded\def\beginvtop{\vtop\bgroup} \let\endvtop\egroup
-
-\unexpanded\def\sethboxregister#1{\setbox#1\hbox}
-\unexpanded\def\setvboxregister#1{\setbox#1\vbox}
-\unexpanded\def\setvtopregister#1{\setbox#1\vtop}
-
-\unexpanded\def\flushboxregister#1{\box\numexpr#1\relax}
+\permanent\protected\def\beginhbox{\hbox\bgroup} \aliased\let\endhbox\egroup
+\permanent\protected\def\beginvbox{\vbox\bgroup} \aliased\let\endvbox\egroup
+\permanent\protected\def\beginvtop{\vtop\bgroup} \aliased\let\endvtop\egroup
-\unexpanded\def\starthboxregister#1{\setbox#1\hbox\bgroup} \let\stophboxregister\egroup
-\unexpanded\def\startvboxregister#1{\setbox#1\vbox\bgroup} \let\stopvboxregister\egroup
-\unexpanded\def\startvtopregister#1{\setbox#1\vtop\bgroup} \let\stopvtopregister\egroup
+\permanent\protected\def\sethboxregister#1{\setbox#1\hbox}
+\permanent\protected\def\setvboxregister#1{\setbox#1\vbox}
+\permanent\protected\def\setvtopregister#1{\setbox#1\vtop}
-%D For whatever third party package needs it:
-%D
-%D \starttyping
-%D \newlocalbox\BoxOne
-%D \newlocalbox\BoxTwo
-%D
-%D \setbox\BoxOne\hbox{Box One}
-%D \setbox\BoxTwo\hbox{Box Two}
-%D
-%D [\box\BoxTwo] [\box\BoxOne]
-%D \stoptyping
-
-\installcorenamespace{localbox}
+\permanent\protected\def\flushboxregister#1{\box\numexpr#1\relax}
-\unexpanded\def\newlocalbox#1%
- {\expandafter\let\expandafter#1\csname\??localbox\string#1\endcsname
- \ifx#1\relax
- \syst_aux_new_localbox#1%
- \fi}
+\permanent\protected\def\starthboxregister#1{\setbox#1\hbox\bgroup} \aliased\let\stophboxregister\egroup
+\permanent\protected\def\startvboxregister#1{\setbox#1\vbox\bgroup} \aliased\let\stopvboxregister\egroup
+\permanent\protected\def\startvtopregister#1{\setbox#1\vtop\bgroup} \aliased\let\stopvtopregister\egroup
-\def\syst_aux_new_localbox#1%
- {\expandafter\newbox\csname\??localbox\string#1\endcsname
- \newlocalbox#1}
+% %D For whatever third party package needs it:
+% %D
+% %D \starttyping
+% %D \newlocalbox\BoxOne
+% %D \newlocalbox\BoxTwo
+% %D
+% %D \setbox\BoxOne\hbox{Box One}
+% %D \setbox\BoxTwo\hbox{Box Two}
+% %D
+% %D [\box\BoxTwo] [\box\BoxOne]
+% %D \stoptyping
+%
+% \installcorenamespace{localbox}
+%
+% \permanent\protected\def\newlocalbox#1%
+% {\expandafter\let\expandafter#1\csname\??localbox\string#1\endcsname
+% \ifrelax#1%
+% \syst_aux_new_localbox#1%
+% \fi}
+%
+% \def\syst_aux_new_localbox#1%
+% {\expandafter\newbox\csname\??localbox\string#1\endcsname
+% \newlocalbox#1}
%D Who knows when this comes in handy:
-\unexpanded\def\lastlinewidth{\dimexpr\clf_lastlinewidth\scaledpoint\relax}
+\permanent\protected\def\lastlinewidth{\dimexpr\clf_lastlinewidth\scaledpoint\relax}
%D Keep as reference:
-% \unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
-% \unexpanded\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop}
+% \protected\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
+% \protected\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop}
%D This one keeps dimensions and sets the shift field (and so it's more for testing
%D than for real usage):
-\unexpanded\def\shiftbox {\clf_shiftbox}
-\unexpanded\def\vpackbox {\clf_vpackbox}
-\unexpanded\def\hpackbox {\clf_hpackbox}
-\unexpanded\def\vpackedbox{\clf_vpackedbox}
-\unexpanded\def\hpackedbox{\clf_hpackedbox}
+\permanent\protected\def\shiftbox {\clf_shiftbox}
+\permanent\protected\def\vpackbox {\clf_vpackbox}
+\permanent\protected\def\hpackbox {\clf_hpackbox}
+\permanent\protected\def\vpackedbox{\clf_vpackedbox}
+\permanent\protected\def\hpackedbox{\clf_hpackedbox}
%D This one has been moved from a 2 decade old file. It makes something boxed
%D sit on the baseline.
-\unexpanded\def\linebox
+\permanent\protected\def\linebox
{\hpack\bgroup\dowithnextbox
{\scratchdimen\dimexpr\dimexpr\htdp\nextbox-\lineheight\relax/2+\dp\strutbox\relax
\setbox\nextbox\hpack{\lower\scratchdimen\box\nextbox}%
@@ -2893,6 +2803,70 @@
\egroup}
\hbox}
+%D \macros
+%D {widthuptohere}
+%D
+%D Implemented at the \LUA\ end:
+%D
+%D \startbuffer
+%D widthuptohere:\the\widthuptohere\crlf
+%D widthuptohere : \the\widthuptohere (space without stretch or shrink!)
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
+%D
+%D Implemented elsewhere:
+%D
+%D \starttyping
+%D \boxlines <box>
+%D \boxline <box> <line>
+%D \copyboxline <box> <line>
+%D \setboxline <box> <line>
+%D \boxlineht <box> <line> [<dimen>]
+%D \boxlinedp <box> <line> [<dimen>]
+%D \boxlinewd <box> <line> [<dimen>]
+%D \boxlinels <box> <line>
+%D \boxliners <box> <line>
+%D \boxlinelh <box> <line>
+%D \boxlinerh <box> <line>
+%D \boxlinelp <box> <line>
+%D \boxlinerp <box> <line>
+%D \boxlinein <box> <line>
+%D \boxrangeht <box> <first line> <last line>
+%D \boxrangedp <box> <first line> <last line>
+%D \boxrangewd <box> <first line> <last line>
+%D \stoptyping
+
+% To be discussed with ws.
+%
+% \installcorenamespace{namedboxes}
+%
+% \protected\def\newnamedbox#1%
+% {\ifcsname\??namedboxes#1\endcsname\else
+% \expandafter\newbox\csname\??namedboxes#1\endcsname
+% \fi}
+%
+% \protected\def\namedbox#1{\csname\??namedboxes#1\endcsname}
+
+%D Implemented elsewhere:
+%D
+%D \startbuffer
+%D \setbox0\hbox{test \footnote{test}} (\prelistbox0) (\postlistbox0)
+%D \setprelistbox0\hbox{BEFORE} \setpostlistbox0\hbox{AFTER}
+%D \box0
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
+%D
+%D \starttyping
+%D \prelistbox <box>
+%D \postlistbox <box>
+%D \prelistcopy <box>
+%D \postlistcopy <box>
+%D \setprelistbox <box> <hbox|vbox|vtop|somebox>
+%D \setpostlistbox <box> <hbox|vbox|vtop|somebox>
+%D \stoptyping
+
\protect \endinput
% a bit of test code:
@@ -2934,10 +2908,10 @@
%
% \unprotect
%
-% \unexpanded\def\withwordsinstring#1#2% command str
+% \protected\def\withwordsinstring#1#2% command str
% {\ctxcommand{withwords(\!!bs#1\!!es,\!!bs#2\!!es)}}
%
-% \unexpanded\def\withwordsinfile#1#2% command name
+% \protected\def\withwordsinfile#1#2% command name
% {\ctxcommand{withwords(\!!bs#1\!!es,io.loaddata(resolvers.findfile("#2")))}}
%
% \protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/supp-dir.mkxl b/Master/texmf-dist/tex/context/base/mkxl/supp-dir.mkxl
new file mode 100644
index 00000000000..d2500d236b1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/supp-dir.mkxl
@@ -0,0 +1,44 @@
+%D \module
+%D [ file=supp-dir,
+%D version=2004.11.11,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Directional Things,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\aliased\let\directionlefttoright\zerocount
+\aliased\let\directionrighttoleft\plusone
+
+\immutable\edef\??bdir{\ifdefined\bodydir bdir\else direction\fi}
+
+\permanent\protected\edef\naturalhbox {\hbox \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalvbox {\vbox \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalvtop {\vtop \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalhpack {\hpack \??bdir\directionlefttoright}
+\permanent\protected\edef\naturalvpack {\vpack \??bdir\directionlefttoright}
+\permanent\protected\edef\naturaltpack {\tpack \??bdir\directionlefttoright}
+
+\permanent\protected\edef\reversehbox {\hbox \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversevbox {\vbox \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversevtop {\vtop \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversehpack {\hpack \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversevpack {\vpack \??bdir\directionrighttoleft}
+\permanent\protected\edef\reversetpack {\tpack \??bdir\directionrighttoleft}
+
+% \expanded{\defineactivecharacter \number"2000E} {\textdirection\directionrighttoleft\relax}
+% \expanded{\defineactivecharacter \number"2000F} {\textdirection\directionlefttoright\relax}
+
+\def\syst_direction_string#1{\ifcase#1=\plusone r2l\else l2r\fi}
+
+\permanent\protected\def\showdirsinmargin
+ {\normalexpanded{\inleft{\naturalhbox
+ {\ttxx[\syst_direction_string\pardirection,\syst_direction_string\textdirection]}}}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/supp-mat.mkxl b/Master/texmf-dist/tex/context/base/mkxl/supp-mat.mkxl
new file mode 100644
index 00000000000..5822e959dd3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/supp-mat.mkxl
@@ -0,0 +1,180 @@
+%D \module
+%D [ file=supp-mat,
+%D version=1998.09.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Math,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D For practical reasons, I decided to move some math things to a support module.
+%D There is nothing spectacular here. It may move back to math-ini.
+
+\writestatus{loading}{ConTeXt Support Macros / Math}
+
+\unprotect
+
+%D \macros
+%D {mathematics, math, nomathematics, startmathmode}
+%D
+%D The \type {$} can be both an begin and end math character. This can lead to
+%D confusing and errorprone situations when macros insert \type {$}. When for
+%D instance we have defined:
+%D
+%D \starttyping
+%D \def\MyPlus{$\,+\,$}
+%D \stoptyping
+%D
+%D the sequence \type{$x^2 \MyPlus y^2 = r^2$} will expand to:
+%D
+%D \starttyping
+%D $x^2 $\,+\,$ y^2 = r^2$
+%D \stoptyping
+%D
+%D Here the \type {\,} are given outside math mode and \TEX\ will definitely
+%D complain about this. A more save definition would have been:
+%D
+%D \starttyping
+%D \def\MyPlus{\mathematics{\,+\,}}
+%D \stoptyping
+%D
+%D Which is implemented (in \type{syst-ini.mkiv}) as:
+
+\permanent\protected\def\Ucheckedstartdisplaymath
+ {\ifinner
+ \ifhmode
+ \normalUstartmath
+ \let\Ucheckedstopdisplaymath\normalUstopmath
+ \else
+ \normalUstartdisplaymath
+ \let\Ucheckedstopdisplaymath\normalUstopdisplaymath
+ \fi
+ \else
+ \normalUstartdisplaymath
+ \let\Ucheckedstopdisplaymath\normalUstopdisplaymath
+ \fi}
+
+\aliased\let\Ucheckedstopdisplaymath\relax
+
+% \let\normalsuper\Usuperscript % obsolete
+% \let\normalsuber\Usubscript % obsolete
+
+\aliased\let\startimath\Ustartmath
+\aliased\let\stopimath \Ustopmath
+\aliased\let\startdmath\Ustartdisplaymath % \Ucheckedstartdisplaymath
+\aliased\let\stopdmath \Ustopdisplaymath % \Ucheckedstopdisplaymath
+
+\permanent\protected\def\mathematics#1{\relax \ifmmode#1\else\normalstartimath#1\normalstopimath\fi}
+\permanent\protected\def\displaymath#1{\noindent \ifmmode#1\else\normalstartdmath#1\normalstopdmath\fi}
+\permanent\protected\def\inlinemath #1{\dontleavehmode\ifmmode#1\else\normalstartimath#1\normalstopimath\fi}
+\permanent\protected\def\textmath #1{\dontleavehmode\ifmmode#1\else\begingroup\everymath\emptytoks\normalstartimath#1\normalstopimath\endgroup\fi} % \mathsurround\zeropoint
+
+\aliased\let\stopmathmode\relax
+
+\permanent\protected\def\startmathmode % nested variant
+ {\relax\ifmmode
+ \begingroup
+ \enforced\let\stopmathmode\endgroup
+ \else
+ \normalstartimath
+ \enforced\let\stopmathmode\normalstopimath
+ \fi}
+
+\permanent\protected\def\nomathematics#1%
+ {\relax\ifmmode\hbox{#1}\else#1\fi}
+
+\aliased\let\m \mathematics % \mathematics will be overloaded later
+\aliased\let\math\mathematics % \mathematics will be overloaded later
+
+%D \macros
+%D {displaymathematics,inlinemathematics,automathematics}
+%D
+%D An example of usage of the following can be found in the MathML module:
+
+\ifdefined\strc_formulas_start_formula \else
+ \def\strc_formulas_start_formula{\normalstartdmath}
+ \def\strc_formulas_stop_formula {\normalstopdmath }
+\fi
+
+\permanent\protected\def\displaymathematics#1{\relax\ifmmode#1\else\strc_formulas_start_formula{}#1\strc_formulas_stop_formula\fi}
+\permanent\protected\def\inlinemathematics {\dontleavehmode\mathematics}
+%permanent\protected\def\automathematics {\relax\ifhmode\expandafter\inlinemathematics\else\expandafter\displaymathematics\fi}
+
+% better, esp when used in bTABLE ... eTABLE
+
+\permanent\protected\def\automathematics
+ {\relax
+ \ifhmode
+ \expandafter\inlinemathematics
+ \orelse\ifintable
+ \expandafter\inlinemathematics
+ \else
+ \expandafter\displaymathematics
+ \fi}
+
+%D \macros
+%D {dimension, nodimension}
+%D
+%D The next few macros are used for typesetting dimensions in such a way that
+%D spacing is acceptable. I won't spend much words on these macros, because they
+%D will be overloaded in the units module.
+%D
+%D REPLACED (keep commented):
+
+\newsignal\dimensionsignal
+
+\mutable\def\dimensiontypeface {\tf}
+\mutable\def\dimensionhalfspace {\,}
+
+\aliased\let\dodimensionsignal\relax
+
+\permanent\protected\def\dimension#1%
+ {\pushmacro\dodimensionsignal
+ \enforced\gdef\dodimensionsignal{\kern\dimensionsignal}%
+ \ifzeropt\lastskip
+ \ifzeropt\lastkern
+ \ifmmode
+ \mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \else
+ \mathematics{\dimensiontypeface#1}%
+ \fi
+ \orelse\ifdim\lastkern=\dimensionsignal
+ \mathematics{\dimensionhalfspace\dimensiontypeface#1}%
+ \else
+ \unkern\mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \fi
+ \else
+ \unskip\mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \fi
+ \dodimensionsignal
+ \popmacro\dodimensionsignal}
+
+\permanent\protected\def\nodimension#1%
+ {\unskip#1\enforced\glet\dodimensionsignal\relax}
+
+% experiment, not yet to be used
+
+% \protected\def\displaybreak
+% {\ifhmode
+% \removeunwantedspaces
+% \ifcase\raggedstatus\hfill\fi
+% \strut\penalty-9999 % \break fails on case (3)
+% \fi}
+%
+% \def\startdisplay{\displaybreak\ignorespaces\startpacked}
+% \def\stopdisplay {\stoppacked\displaybreak\ignorespaces}
+
+\aliased\let\superscript \Usuperscript
+\aliased\let\subscript \Usubscript
+\aliased\let\nosuperscript \Unosuperscript
+\aliased\let\nosubscript \Unosubscript
+\aliased\let\superprescript \Usuperprescript
+\aliased\let\subprescript \Usubprescript
+\aliased\let\nosuperprescript\Unosuperprescript
+\aliased\let\nosubsprecript \Unosubprescript
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/supp-ran.mkxl b/Master/texmf-dist/tex/context/base/mkxl/supp-ran.mkxl
new file mode 100644
index 00000000000..7d212fdfd01
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/supp-ran.mkxl
@@ -0,0 +1,52 @@
+%D \module
+%D [ file=supp-ran,
+%D version=2008-10-31,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Random Number Generation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Support Macros / Random Number Generation}
+
+%D This module is downward compatible in the sense that we've kept the user
+%D interface (which uses intermediate variables).
+%D
+%D \starttyping
+%D \type{new}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \setrandomseed{24}\type{set}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \setrandomseed{24}\type{set}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \setrandomseed{24}\type{set}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \pushrandomseed \type{new}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \poprandomseed \type{old}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \type{new}: \dorecurse{10}{\randomnumber{1}{100} }\par
+%D \stoptyping
+
+\registerctxluafile{supp-ran}{}
+
+\unprotect
+
+\permanent\protected\def\getrandomcount #1#2#3{#1=\clf_getrandomnumber\numexpr#2\relax\numexpr#3\relax\relax}
+\permanent\protected\def\getrandomdimen #1#2#3{#1=\clf_getrandomdimen\dimexpr#2\relax\dimexpr#3\relax\scaledpoint\relax}
+\permanent\protected\def\getrandomnumber#1#2#3{\edef#1{\clf_getrandomnumber\numexpr#2\relax\numexpr#3\relax}}
+\permanent\protected\def\getrandomfloat #1#2#3{\edef#1{\clf_getrandomfloat\dimexpr#2\relax\dimexpr#3\relax}}
+\permanent\protected\def\setrandomseed #1{\clf_setrandomseed\numexpr#1\relax}
+\permanent\protected\def\getrandomseed #1{\edef#1{\clf_getrandomseed}}
+\permanent\protected\def\newrandomseed {\clf_getrandomseed}
+%permanent\protected\def\pushrandomseed {\clf_pushrandomseed}
+%permanent\protected\def\poprandomseed {\clf_poprandomseed}
+%permanent\protected\def\reuserandomseed {\clf_reuserandomseed} % within push/pop
+
+\aliased\let\freezerandomseed \pushrandomseed
+\aliased\let\defrostrandomseed\poprandomseed
+
+\setnewconstant \mpscaledmax 4095 % for old times sake
+
+\permanent\def\randomnumber #1#2{\clf_getrandomnumber\numexpr#1\relax\numexpr#2\relax}
+\permanent\def\mprandomnumber {\clf_getrandomnumber\zerocount\mpscaledmax}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt b/Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt
new file mode 100644
index 00000000000..b043d835df8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/symb-emj.lmt
@@ -0,0 +1,76 @@
+if not modules then modules = { } end modules ['symb-emj'] = {
+ version = 1.001,
+ comment = "companion to symb-emj.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- processors.hpack_filter does it all
+
+local symbols = fonts.symbols
+
+local resolvedemoji = characters.emoji.resolve
+local processfeatures = fonts.handlers.otf.featuresprocessor
+local injectspacing = nodes.injections.handler
+local protectglyphs = nodes.handlers.protectglyphs
+local tonodes = nodes.tonodes
+local currentfont = font.current
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+local tonut = nuts.tonut
+local remove_node = nuts.remove
+local isglyph = nuts.isglyph
+local getnext = nuts.getnext
+
+local function removemodifiers(head)
+ local head = tonut(head)
+ local current = head
+ while current do
+ local char = isglyph(current)
+ if char and (char == 0x200D or (char >= 0x1F3FB and char <= 0x1F3FF)) then
+ head, current = remove_node(head,current,true)
+ else
+ current = getnext(current)
+ end
+ end
+ return tonode(head)
+end
+
+-- fast enough, no need to memoize, maybe use attributes
+
+local function checkedemoji(name,id)
+ local str = resolvedemoji(name)
+ if str then
+ if not id then
+ id = currentfont()
+ end
+ local head = tonodes(str,id,nil,nil,true) -- use current attributes
+ head = processfeatures(head,id,false)
+ if head then
+ head = injectspacing(head)
+ protectglyphs(head)
+ return removemodifiers(head)
+ end
+ end
+end
+
+symbols.emoji = {
+ resolved = resolvedemoji,
+ checked = checkedemoji,
+}
+
+interfaces.implement {
+ name = "resolvedemoji",
+ actions = { resolvedemoji, context.escaped },
+ arguments = "string",
+}
+
+interfaces.implement {
+ name = "checkedemoji",
+ actions = { checkedemoji, context },
+ arguments = "string",
+}
+
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/symb-emj.mkxl b/Master/texmf-dist/tex/context/base/mkxl/symb-emj.mkxl
new file mode 100644
index 00000000000..e64646a529e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/symb-emj.mkxl
@@ -0,0 +1,26 @@
+%D \module
+%D [ file=symb-emj,
+%D version=2017.04.21,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Emoji,
+%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 Symbol Libraries / Emoji}
+
+\registerctxluafile{symb-emj}{autosuffix}
+
+\unprotect
+
+\permanent \def\expandedemoji#1{\clf_resolvedemoji{#1}}
+\permanent\protected\def\resolvedemoji#1{\clf_resolvedemoji{#1}}
+\permanent\protected\def\checkedemoji #1{\clf_checkedemoji {#1}}
+\permanent\protected\def\emoji #1{\dontleavehmode{\setdirectsymbolicfont{emoji}\clf_resolvedemoji{#1}}}
+\permanent\protected\def\robustemoji #1{\dontleavehmode{\setdirectsymbolicfont{emoji}\clf_checkedemoji {#1}}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt
new file mode 100644
index 00000000000..9837afcf325
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt
@@ -0,0 +1,59 @@
+if not modules then modules = { } end modules ['symb-ini'] = {
+ version = 1.001,
+ comment = "companion to symb-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local context = context
+local variables = interfaces.variables
+
+fonts = fonts or { } -- brrrr
+
+local symbols = fonts.symbols or { }
+fonts.symbols = symbols
+
+local listitem = utilities.parsers.listitem
+local uselibrary = resolvers.uselibrary
+
+local report_symbols = logs.reporter ("fonts","symbols")
+local status_symbols = logs.messenger("fonts","symbols")
+
+local patterns = {
+ "symb-imp-%s.mkxl",
+ "symb-imp-%s.mkiv",
+ "symb-imp-%s.tex",
+ -- obsolete:
+ "symb-%s.mkiv",
+ "symb-%s.tex"
+}
+
+local function action(name,foundname)
+ commands.loadlibrary(name,foundname,false)
+ status_symbols("library %a loaded",name)
+end
+
+local function failure(name)
+ report_symbols("library %a is unknown",name)
+end
+
+function symbols.uselibrary(name)
+ if name ~= variables.reset then
+ for name in listitem(name) do
+ uselibrary {
+ name = name,
+ patterns = patterns,
+ action = action,
+ failure = failure,
+ onlyonce = true,
+ }
+ end
+ end
+end
+
+interfaces.implement {
+ name = "usesymbols",
+ actions = symbols.uselibrary,
+ arguments = "string",
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/symb-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/symb-ini.mkxl
new file mode 100644
index 00000000000..c29b073606d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/symb-ini.mkxl
@@ -0,0 +1,340 @@
+%D \module
+%D [ file=symb-ini,
+%D version=1998.07.20,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Basic Symbols Commands,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The macros described here used to be part of the \type {core-con} module. I
+%D decided to move them here when symbolsets saw the light. Let their light shine.
+
+\writestatus{loading}{ConTeXt Symbol Libraries / Initialization}
+
+\registerctxluafile{symb-ini}{autosuffix}
+
+\unprotect
+
+%D \macros
+%D {definesymbol, symbol}
+%D
+%D Converting numbers or levels into a character, romannumeral, symbol or something
+%D else, is supported by many \CONTEXT\ commands. Therefore we need a mechanism for
+%D linking such numbers to their counterparts.
+%D
+%D First we take care of symbols. These are for instance used in enumerations and
+%D itemizations. We have:
+%D
+%D \showsetup{definesymbol}
+%D \showsetup{symbol}
+%D
+%D Symbols are simply linked to a tag. Such tags can be numbers or strings.
+%D
+%D \starttyping
+%D \definesymbol [1] [$\bullet$]
+%D \definesymbol [level 5] [$\star$]
+%D \stoptyping
+
+\installcorenamespace{symbol}
+\installcorenamespace{symbols}
+\installcorenamespace{symbolset}
+\installcorenamespace{symboldefault}
+
+%D For now we only have one option.
+
+\installparameterhandler\??symbols {symbols}
+\installsetuphandler \??symbols {symbols}
+
+\appendtoks
+ \doifelse{\symbolsparameter\c!stylealternative}\v!math
+ \settrue\setfalse\prefermathovertextchar
+\to \everysetupsymbols
+
+\setupsymbols
+ [\c!stylealternative=\v!text]
+
+\mutable\let\currentsymbol \empty
+\mutable\let\currentsymbolset\empty
+
+\newtoks\t_symb_setups
+
+\let\m_symb_current_set\empty
+
+\newconditional\c_symb_found
+
+\newtoks\everysymbol
+
+%D We don't use the commandhandler as symbols have their own subsystem for resolving
+%D values.
+
+\permanent\tolerant\protected\def\definesymbol[#1]#*[#2]#*[#3]%
+ {\ifparameter#3\or
+ \defcsname\??symbol#1:#2\endcsname{#3}%
+ \doifsomething{#1}{\addvalue{\??symbolset#1}{#2}}%
+ \else
+ \defcsname\??symbol\m_symb_current_set:#1\endcsname{#2}%
+ \addvalue{\??symbolset\m_symb_current_set}{#1}%
+ \fi}
+
+\permanent\protected\def\doifelseinsymbolset#1#2{\ifcsname\??symbol#1:#2\endcsname\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
+\permanent\protected\def\doifinsymbolset #1#2{\ifcsname\??symbol#1:#2\endcsname\expandafter\firstofoneargument \else\expandafter\gobbleoneargument \fi}
+\permanent\protected\def\doifelsesymbolset #1{\ifcsname\??symbolset#1\endcsname\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
+
+\aliased\let\doifinsymbolsetelse\doifelseinsymbolset
+\aliased\let\doifsymbolsetelse \doifelsesymbolset
+
+\letvalue{\??symbolset}\empty
+
+%def\symbolset#1{\csname\??symbolset\ifcsname\??symbolset#1\endcsname#1\fi\endcsname} % no [#1], to be used in commalists etc
+
+\permanent\def\symbolset#1{\begincsname\??symbolset#1\endcsname} % no [#1], to be used in commalists etc
+
+%D Since symbols are used frequently in interactive documents, we speed up this one.
+%D Well, that was history, since now we simplified things a bit, because the low
+%D level macros have been sped up every now and then.
+
+% We support both:
+%
+% Test test \symbol[whatever]\ test \symbol[whatever].
+% Test test \symbol{whatever} test \symbol{whatever}.
+
+\permanent\tolerant\protected\def\symbol[#1]#*[#2]%
+ {\ifarguments
+ \expandafter\symb_place_argument
+ \or
+ \symb_place_argument{#1}%
+ \or
+ \dontleavehmode
+ \edef\currentsymbol{#2}%
+ \ifcsname\??symbol#1:#2\endcsname
+ \symb_place_indeed{#1:#2}% maybe use \lastnamescs
+ \orelse\ifcsname\??symboldefault#1\endcsname
+ \symb_place_named{#1}% maybe use \lastnamescs
+ \else
+ \symb_place_normal
+ \fi
+ \fi}
+
+\def\symb_place_argument#1%
+ {\dontleavehmode
+ \edef\currentsymbol{#1}%
+ \ifcsname\??symbol\currentsymbolset:#1\endcsname
+ \symb_place_indeed{\currentsymbolset:#1}%
+ \else
+ \symb_place_normal
+ \fi}
+
+\def\symb_place_normal
+ {\setfalse\c_symb_found
+ \the\t_symb_setups
+ \ifconditional\c_symb_found \else
+ \symb_place_retry\currentsymbol % hm, isn't this redundant?
+ \fi}
+
+\def\symb_place_indeed#1% \relax's prevent lookahead problems
+ {\settrue\c_symb_found
+ \begingroup
+ \the\everysymbol
+ \csname\??symbol#1\endcsname\relax
+ \endgroup}
+
+\letvalue{\??symbol}\firstofoneargument
+
+\permanent\def\directsymbol#1#2% no \relax, there can be an argument, see lists
+ {\begincsname\??symbol#1:#2\endcsname}
+
+\protected\def\symb_fetch
+ {\ifconditional\c_symb_found
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\symb_fetch_indeed
+ \fi}
+
+\def\symb_fetch_indeed#1%
+ {\ifcsname\??symbol#1:\currentsymbol\endcsname
+ \symb_place_indeed{#1:\currentsymbol}%
+ \orelse\ifcsname\??symboldefault#1\endcsname
+ \symb_place_named{#1}%
+ \fi}
+
+\def\symb_place_named#1% \relax's prevent lookahead problems
+ {\begingroup
+ \setbox\scratchbox\hbox\bgroup
+ \the\everysymbol
+ \getglyphstyled
+ {\csname\??symboldefault#1\endcsname}%
+ {\tochar{n:\currentsymbol}}%
+ \relax
+ \egroup
+ \ifdim\wd\scratchbox>\zeropoint
+ \unhbox\scratchbox
+ \endgroup
+ \xdefcsname\??symbol#1:\currentsymbol\endcsname{\symb_place_named_indeed{#1}{\currentsymbol}}%
+ \settrue\c_symb_found
+ \else
+ \endgroup
+ \fi}
+
+\protected\def\symb_place_named_indeed#1#2% \relax's prevent lookahead problems
+ {\settrue\c_symb_found
+ \begingroup
+ \the\everysymbol
+ \getglyphstyled
+ {\csname\??symboldefault#1\endcsname}%
+ {\tochar{n:#2}}%
+ \relax
+ \endgroup}
+
+\def\symb_place_retry#1%
+ {\ifcsname\??symbol:#1\endcsname
+ \symb_place_indeed{:#1}%
+ \else
+ #1%
+ \fi}
+
+%D \macros
+%D {definefiguresymbol}
+%D
+%D To simplify defining figure symbols, we offer:
+%D
+%D \showsetup{definefiguresymbol}
+%D
+%D By default, such symbols scale along the current bodyfont size or running font
+%D size (which is better).
+
+\ifdefined\externalfigure \else \def\externalfigure[#1][#2]{#1} \fi
+
+\mutable\def\defaultsymbolfactor{10}
+\mutable\def\defaultsymbolheight{1.25ex}
+
+\permanent\tolerant\protected\def\figuresymbol[#1]#*[#2]%
+ {\externalfigure[#1][\c!reset=\v!yes,\c!symbol=\v!yes,\c!height=\defaultsymbolheight,#2]}
+
+\permanent\tolerant\protected\def\definefiguresymbol[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\else
+ \definesymbol[#1][{\figuresymbol[#2][#3]}]%
+ \fi}
+
+%D \macros
+%D {doifsymboldefinedelse}
+%D
+%D A handy private one:
+
+\def\symb_fetch_first
+ {\ifconditional\c_symb_found
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\symb_fetch_first_indeed
+ \fi}
+
+\def\symb_fetch_first_indeed#1%
+ {\doifinsymbolset{#1}\currentsymbol{\settrue\c_symb_found}}
+
+\def\symb_fetch_second#1%
+ {\doifinsymbolset\empty\currentsymbol{\settrue\c_symb_found}}
+
+\permanent\protected\def\doifelsesymboldefined#1%
+ {\begingroup
+ \edef\currentsymbol{#1}%
+ \let\symb_fetch\symb_fetch_first
+ \setfalse\c_symb_found
+ \the\t_symb_setups
+ \ifconditional\c_symb_found
+ \endgroup\expandafter\firstoftwoarguments
+ \else
+ \symb_fetch_second\currentsymbol
+ \ifconditional\c_symb_found
+ \endgroup\doubleexpandafter\firstoftwoarguments
+ \else
+ \endgroup\doubleexpandafter\secondoftwoarguments
+ \fi
+ \fi}
+
+\aliased\let\doifsymboldefinedelse\doifelsesymboldefined
+
+%D \macros
+%D {setupsymbolset,startsymbolset}
+%D
+%D From these macro definitions one can deduce that symbols can be grouped in
+%D symbol sets:
+%D
+%D \starttyping
+%D \startsymbolset [navigation 1]
+%D \definefiguresymbol [Next] [mp-symb.1]
+%D \definefiguresymbol [Prev] [mp-symb.2]
+%D \stopsymbolset
+%D \stoptyping
+%D
+%D Such a symbol can be typeset with:
+%D
+%D \starttyping
+%D \setupsymbolset[navigation 1]\symbol[Next]
+%D \stoptyping
+%D
+%D or simply:
+%D
+%D \starttyping
+%D \symbol[navigation 1][Next]
+%D \stoptyping
+%D
+%D Formally:
+%D
+%D \showsetup{setupsymbolset}
+%D \showsetup{startsymbolset}
+
+\installcorenamespace{symbolsets}
+
+\permanent\tolerant\protected\def\startsymbolset[#1]#*[#2]%
+ {\pushmacro\m_symb_current_set
+ \def\m_symb_current_set{#1}%
+ \ifarguments\or\or
+ \getdummyparameters[\s!font=,#2]%
+ \edef\p_font{\dummyparameter\s!font}%
+ \ifempty\p_font\else
+ \letcsname\??symboldefault#1\endcsname\p_font
+ \fi
+ \fi}
+
+\permanent\protected\def\stopsymbolset
+ {\popmacro\m_symb_current_set}
+
+\permanent\protected\def\setupsymbolset[#1]%
+ {\edef\currentsymbolset{#1}%
+ \ifcsname\??symbolsets\currentsymbolset\endcsname \else
+ \symb_setup_symbol_set
+ \fi}
+
+\def\symb_setup_symbol_set
+ {\normalexpanded{\t_symb_setups{\symb_fetch{\currentsymbolset}\the\t_symb_setups}}%
+ \letcsname\??symbolsets\currentsymbolset\endcsname\empty} % speedup
+
+\permanent\protected\def\resetsymbolset
+ {\t_symb_setups\emptytoks}
+
+\permanent\protected\def\forcesymbolset[#1]% still needed? why not just usesymbolset
+ {\normalexpanded{\t_symb_setups{\symb_fetch{#1}}}}
+
+%D \macros
+%D {showsymbolset}
+%D
+%D \showsetup{showsymbolset}
+
+\fetchmodulecommand \showsymbolset \f!symb_run
+
+%D \macros
+%D {usesymbols}
+%D
+%D \showsetup{usesymbols}
+
+\permanent\protected\def\usesymbols[#1]{\clf_usesymbols{#1}}
+
+%D As longs as symbols are linked to levels or numbers, we can also use the
+%D conversion mechanism, but in for instance the itemization macros, we prefer
+%D symbols because they can more easier be (partially) redefined.
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-aux.lmt b/Master/texmf-dist/tex/context/base/mkxl/syst-aux.lmt
new file mode 100644
index 00000000000..726fd4d326a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-aux.lmt
@@ -0,0 +1,782 @@
+ if not modules then modules = { } end modules ['syst-aux'] = {
+ version = 1.001,
+ comment = "companion to syst-aux.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- slower than lpeg:
+--
+-- utfmatch(str,"(.?)(.*)$")
+-- utf.sub(str,1,1)
+
+local tonumber, next, type = tonumber, next, type
+local utfsub = utf.sub
+local P, S, R, C, Cc, Cs, Carg, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Carg, lpeg.match
+local find, formatters = string.find, string.formatters
+
+local context = context
+local implement = interfaces.implement
+local setmacro = interfaces.setmacro
+local setcatcode = tex.setcatcode
+local texget = tex.get
+local utf8character = lpeg.patterns.utf8character
+local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_set = utilities.parsers.settings_to_set
+
+local pattern = C(utf8character^-1) * C(P(1)^0)
+
+implement {
+ name = "getfirstcharacter",
+ arguments = "string",
+ actions = function(str)
+ local first, rest = lpegmatch(pattern,str)
+ setmacro("firstcharacter",first)
+ setmacro("remainingcharacters",rest)
+ end
+}
+
+implement {
+ name = "thefirstcharacter",
+ arguments = "string",
+ actions = function(str)
+ local first, rest = lpegmatch(pattern,str)
+ context(first)
+ end
+}
+
+implement {
+ name = "theremainingcharacters",
+ arguments = "string",
+ actions = function(str)
+ local first, rest = lpegmatch(pattern,str)
+ context(rest)
+ end
+}
+
+local pattern = C(utf8character^-1)
+local ctx_doifelse = commands.doifelse
+
+implement {
+ name = "doifelsefirstchar",
+ arguments = "2 strings",
+ actions = function(str,chr)
+ ctx_doifelse(lpegmatch(pattern,str) == chr)
+ end
+}
+
+implement {
+ name = "getsubstring",
+ arguments = "3 strings",
+ actions = function(str,first,last)
+ context(utfsub(str,tonumber(first),tonumber(last)))
+ end
+}
+
+-- function commands.addtocommalist(list,item)
+-- if list == "" then
+-- context(item)
+-- else
+-- context("%s,%s",list,item) -- using tex.print is some 10% faster
+-- end
+-- end
+--
+-- function commands.removefromcommalist(list,item)
+-- if list == "" then
+-- context(item)
+-- else
+-- -- okay, using a proper lpeg is probably faster
+-- -- we could also check for #l = 1
+-- local l = settings_to_array(list)
+-- local t, n = { }
+-- for i=1,#l do
+-- if l[i] ~= item then
+-- n = n + 1
+-- t[n] = item
+-- end
+-- end
+-- if n == 0 then
+-- context(item)
+-- else
+-- context(concat(list,","))
+-- end
+-- end
+-- end
+
+local pattern = (C((1-P("%"))^1) * Carg(1)) / function(n,d)
+ return formatters["%.0fsp"](d * tonumber(n)/100) end * P("%") * P(-1) -- .0 ?
+
+-- percentageof("10%",65536*10)
+
+implement {
+ name = "percentageof",
+ arguments = { "string", "dimen" },
+ actions = function(str,dim)
+ context(lpegmatch(pattern,str,1,dim) or str)
+ end
+}
+
+-- \gdef\setpercentdimen#1#2%
+-- {#1=\ctxcommand{percentageof("#2",\number#1)}\relax}
+
+local space = P(" ") / ""
+local spaces = P(" ")^0 / ""
+local nohash = 1 - P("#")
+local digit = R("09")
+local double = P("##") / "#"
+local single = P("#")
+local sentinel = spaces * (nohash^1 / "\\%0")
+local whatever = S("+-/*_^=:") + digit
+local sargument = (single * digit)^1
+local dargument = (double * digit)^1
+local swhatever = (single * whatever)^1
+local dwhatever = (double * whatever)^1
+
+-- different ones:
+
+local space = P(" ")
+local spaces = space^0
+
+-- see syst-aux.lua for historic variants
+
+local global = nil
+local protected = nil
+local permanent = nil
+local expanded = nil
+local mutable = nil
+local immutable = nil
+local optional = nil
+local tolerant = nil
+local instance = nil
+local frozen = nil
+local csname = nil
+local rest = nil
+
+local function catcodes_s()
+ setcatcode(32,10) -- space
+ setcatcode(13, 5) -- endofline
+end
+
+local function catcodes_n()
+ setcatcode(32, 9) -- ignore
+ setcatcode(13, 9) -- ignore
+end
+
+local function oldoption(s)
+ if optional > 1 then
+ optional = optional - 1
+ return s .. "#*"
+ else
+ return s
+ end
+end
+
+local option = (
+ P("single") * Cc(1)
+ + P("double") * Cc(2)
+ + P("triple") * Cc(3)
+ + P("quadruple") * Cc(4)
+ + P("quintuple") * Cc(5)
+ + P("sixtuple")
+ ) * (P("empty") + P("argument"))
+
+local pattern = (
+ (
+ spaces * (
+ ( P("spaces") * space / catcodes_s )
+ + ( P("nospaces") * space / catcodes_n )
+ + ( P("global") * space / function() global = true end)
+ + ( P("protected") * space / function() protected = true end)
+ + ( P("permanent") * space / function() permanent = true end)
+ + ( P("expanded") * space / function() expanded = true end)
+ + ( P("tolerant") * space / function() tolerant = true end)
+ + ( P("instance") * space / function() instance = true end)
+ + ( P("frozen") * space / function() frozen = true end)
+ + ( P("mutable") * space / function() mutable = true end)
+ + ( P("immutable") * space / function() immutable = true end)
+ + ( P("unexpanded") * space / function() protected = true end)
+ + ( option * space / function(s) tolerant = true
+ optional = s end)
+ )
+ )^0
+ * spaces * ( C((1-S(" #["))^1) )
+ * spaces * Cs(
+ (Cs(P("[") * dargument * P("]")) / oldoption + dwhatever)^1 * sentinel^-1 * double^-1
+ + (Cs(P("[") * sargument * P("]")) / oldoption + swhatever)^1 * sentinel^-1 * single^-1
+ + sentinel^-1 * (double+single)^-1
+ )
+)
+
+local ctx_dostarttexdefinition = context.dostarttexdefinition
+
+local function texdefinition_one(str)
+ global = false
+ protected = false
+ permanent = false
+ expanded = false
+ mutable = false
+ immutable = false
+ optional = 0
+ tolerant = false
+ instance = false
+ frozen = false
+ csname, rest = lpegmatch(pattern,str)
+ ctx_dostarttexdefinition()
+end
+
+local function texdefinition_two()
+ context (
+ (tolerant and [[\tolerant]] or "") ..
+ (frozen and [[\frozen]] or "") ..
+ (protected and [[\protected]] or "") ..
+ (permanent and [[\permanent]] or "") ..
+ (instance and [[\instance]] or "") ..
+ (mutable and [[\mutable]] or "") ..
+ (immutable and [[\immutable]] or "") ..
+-- [[\expandafter]] .. (global and (expanded and [[\xdef]] or [[\gdef]]) or (expanded and [[\edef]] or [[\def]])) ..
+-- [[\csname ]] .. csname .. [[\endcsname ]] ..
+ (global and (expanded and [[\xdefcsname ]] or [[\gdefcsname ]]) or (expanded and [[\edefcsname ]] or [[\defcsname ]])) ..
+ csname .. [[\endcsname ]] ..
+ rest
+ )
+end
+
+implement { name = "texdefinition_one", actions = texdefinition_one, scope = "private", arguments = "string" }
+implement { name = "texdefinition_two", actions = texdefinition_two, scope = "private" }
+
+do
+
+ -- Quite probably we don't yet have characters loaded so we delay some
+ -- aliases.
+
+ local _lower_, _upper_, _strip_
+
+ _lower_ = function(s)
+ if characters and characters.lower then
+ _lower_ = characters.lower
+ return _lower_(s)
+ end
+ return string.lower(s)
+ end
+
+ _upper_ = function(s)
+ if characters and characters.upper then
+ _upper_ = characters.upper
+ return _upper_(s)
+ end
+ return string.upper(s)
+ end
+
+ _strip_ = function(s)
+ -- or utf.strip
+ if string.strip then
+ _strip_ = string.strip
+ return _strip_(s)
+ end
+ return s
+ end
+
+ local function lower(s) context(_lower_(s)) end
+ local function upper(s) context(_upper_(s)) end
+ local function strip(s) context(_strip_(s)) end
+
+ implement { name = "upper", arguments = "string", actions = upper }
+ implement { name = "lower", arguments = "string", actions = lower }
+ implement { name = "strip", arguments = "string", actions = strip }
+
+end
+
+implement {
+ name = "converteddimen",
+ arguments = { "dimen", "string" },
+ actions = function(dimen,unit)
+ context(number.todimen(dimen,unit or "pt","%0.5f")) -- no unit appended (%F)
+ end
+}
+
+-- where, not really the best spot for this:
+
+implement {
+ name = "immediatemessage",
+ public = true,
+ arguments = { "'message'", "string" },
+ actions = logs.status
+}
+
+implement {
+ name = "writestring",
+ public = true,
+ protected = true,
+ arguments = "string",
+ actions = function (s)
+ logs.writer(s,"\n")
+ end,
+}
+
+implement {
+ name = "writeline",
+ public = true,
+ protected = true,
+ actions = logs.newline,
+}
+
+implement {
+ name = "resettimer",
+ actions = function()
+ statistics.resettiming("whatever")
+ statistics.starttiming("whatever")
+ end
+}
+
+implement {
+ name = "benchmarktimer",
+ actions = function()
+ statistics.benchmarktimer("whatever")
+ end
+}
+
+implement {
+ name = "elapsedtime",
+ actions = function()
+ statistics.stoptiming("whatever")
+ context(statistics.elapsedtime("whatever"))
+ end
+}
+
+implement {
+ name = "elapsedsteptime",
+ arguments = "integer",
+ actions = function(n)
+ statistics.stoptiming("whatever")
+ local t = statistics.elapsed("whatever")/(n > 0 and n or 1)
+ if t > 0 then
+ context("%0.9f",t)
+ else
+ context(0)
+ end
+ end
+}
+
+local accuracy = table.setmetatableindex(function(t,k)
+ local v = formatters["%0." ..k .. "f"]
+ t[k] = v
+ return v
+end)
+
+implement {
+ name = "rounded",
+ arguments = "integer",
+ actions = function(n,m) context(accuracy[n](m)) end
+}
+
+-- not faster but just less tracing:
+
+local ctx_protected_cs = context.protected.cs -- more efficient
+
+local ctx_firstoftwoarguments = ctx_protected_cs.firstoftwoarguments
+local ctx_secondoftwoarguments = ctx_protected_cs.secondoftwoarguments
+local ctx_firstofoneargument = ctx_protected_cs.firstofoneargument
+local ctx_gobbleoneargument = ctx_protected_cs.gobbleoneargument
+
+context.firstoftwoarguments = ctx_firstoftwoarguments
+context.secondoftwoarguments = ctx_secondoftwoarguments
+context.firstofoneargument = ctx_firstofoneargument
+context.gobbleoneargument = ctx_gobbleoneargument
+
+local ctx_iftrue = context.iftrue
+local ctx_iffalse = context.iffalse
+
+local hash = utilities.parsers.hashes.settings_to_set
+
+local function doifelsecommon(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ ctx_secondoftwoarguments()
+ else
+ ctx_firstoftwoarguments()
+ end
+ return
+ end
+ local ba = find(a,",",1,true)
+ local bb = find(b,",",1,true)
+ if ba and bb then
+ local ha = hash[a]
+ local hb = hash[b]
+ -- local ha = settings_to_set(a)
+ -- local hb = settings_to_set(b)
+ for k in next, ha do
+ if hb[k] then
+ setmacro("commalistelement",k)
+ ctx_firstoftwoarguments()
+ return
+ end
+ end
+ elseif ba then
+ if hash[a][b] then
+ -- if settings_to_set(a)[b] then
+ setmacro("commalistelement",b)
+ ctx_firstoftwoarguments()
+ return
+ end
+ elseif bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ ctx_firstoftwoarguments()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ ctx_secondoftwoarguments()
+end
+
+local function doifcommon(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ ctx_gobbleoneargument()
+ else
+ ctx_firstofoneargument()
+ end
+ return
+ end
+ local ba = find(a,",",1,true)
+ local bb = find(b,",",1,true)
+ if ba and bb then
+ local ha = hash[a]
+ local hb = hash[b]
+ -- local ha = settings_to_set(a)
+ -- local hb = settings_to_set(b)
+ for k in next, ha do
+ if hb[k] then
+ setmacro("commalistelement",k)
+ ctx_firstofoneargument()
+ return
+ end
+ end
+ elseif ba then
+ if hash[a][b] then
+ -- if settings_to_set(a)[b] then
+ setmacro("commalistelement",b)
+ ctx_firstofoneargument()
+ return
+ end
+ elseif bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ ctx_firstofoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ ctx_gobbleoneargument()
+end
+
+local function doifnotcommon(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ ctx_firstofoneargument()
+ else
+ ctx_gobbleoneargument()
+ end
+ return
+ end
+ local ba = find(a,",",1,true)
+ local bb = find(b,",",1,true)
+ if ba and bb then
+ local ha = hash[a]
+ local hb = hash[b]
+ -- local ha = settings_to_set(a)
+ -- local hb = settings_to_set(b)
+ for k in next, ha do
+ if hb[k] then
+ setmacro("commalistelement",k)
+ ctx_gobbleoneargument()
+ return
+ end
+ end
+ elseif ba then
+ if hash[a][b] then
+ -- if settings_to_set(a)[b] then
+ setmacro("commalistelement",b)
+ ctx_gobbleoneargument()
+ return
+ end
+ elseif bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ ctx_gobbleoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ ctx_firstofoneargument()
+end
+
+-- local function hascommonargumentcondition(a,b)
+-- if a == b then
+-- setmacro("commalistelement",a)
+-- if a == "" then
+-- ctx_iffalse()
+-- else
+-- ctx_iftrue()
+-- end
+-- return
+-- end
+-- local ba = find(a,",",1,true)
+-- local bb = find(b,",",1,true)
+-- if ba and bb then
+-- local ha = hash[a]
+-- local hb = hash[b]
+-- for k in next, ha do
+-- if hb[k] then
+-- setmacro("commalistelement",k)
+-- ctx_iftrue()
+-- return
+-- end
+-- end
+-- elseif ba then
+-- if hash[a][b] then
+-- setmacro("commalistelement",b)
+-- ctx_iftrue()
+-- return
+-- end
+-- elseif bb then
+-- if hash[b][a] then
+-- setmacro("commalistelement",a)
+-- ctx_iftrue()
+-- return
+-- end
+-- end
+-- setmacro("commalistelement","")
+-- ctx_iffalse()
+-- end
+
+local function doifelseinset(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ ctx_secondoftwoarguments()
+ else
+ ctx_firstoftwoarguments()
+ end
+ return
+ end
+ local bb = find(b,",",1,true)
+ if bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ ctx_firstoftwoarguments()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ ctx_secondoftwoarguments()
+end
+
+local function doifinset(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ ctx_gobbleoneargument()
+ else
+ ctx_firstofoneargument()
+ end
+ return
+ end
+ local bb = find(b,",",1,true)
+ if bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ ctx_firstofoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ ctx_gobbleoneargument()
+end
+
+local function doifnotinset(a,b)
+ if a == b then
+ setmacro("commalistelement",a)
+ if a == "" then
+ ctx_firstofoneargument()
+ else
+ ctx_gobbleoneargument()
+ end
+ return
+ end
+ local bb = find(b,",",1,true)
+ if bb then
+ if hash[b][a] then
+ -- if settings_to_set(b)[a] then
+ setmacro("commalistelement",a)
+ ctx_gobbleoneargument()
+ return
+ end
+ end
+ setmacro("commalistelement","")
+ ctx_firstofoneargument()
+end
+
+implement {
+ name = "doifelsecommon",
+ actions = doifelsecommon,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "doifcommon",
+ actions = doifcommon,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "doifnotcommon",
+ actions = doifnotcommon,
+ arguments = "2 strings",
+}
+
+-- implement {
+-- name = "hascommonargumentcondition",
+-- actions = hascommonargumentcondition,
+-- arguments = "2 strings",
+-- arguments = { "argument", "argument" },
+-- }
+
+implement {
+ name = "doifelseinset",
+ actions = doifelseinset,
+ arguments = "2 strings",
+-- arguments = { "argument", "argument" },
+}
+
+implement {
+ name = "doifinset",
+ actions = doifinset,
+ arguments = "2 strings",
+}
+
+implement {
+ name = "doifnotinset",
+ actions = doifnotinset,
+ arguments = "2 strings",
+}
+
+-- done elsewhere:
+--
+-- local function firstinset(a)
+-- local aa = hash[a]
+-- context(aa and aa[1] or a)
+-- end
+--
+-- implement {
+-- name = "firstinset",
+-- actions = firstinset,
+-- arguments = "string",
+-- private = false,
+-- }
+
+-- implement {
+-- name = "stringcompare",
+-- arguments = "2 strings",
+-- actions = function(a,b)
+-- context((a == b and 0) or (a > b and 1) or -1)
+-- end
+-- }
+--
+-- implement {
+-- name = "doifelsestringafter",
+-- arguments = "2 strings",
+-- actions = function(a,b)
+-- ctx_doifelse((a == b and 0) or (a > b and 1) or -1)
+-- end
+-- }
+--
+-- implement {
+-- name = "doifelsestringbefore",
+-- arguments = "2 strings",
+-- actions = function(a,b)
+-- ctx_doifelse((a == b and 0) or (a < b and -1) or 1)
+-- end
+-- }
+
+-- implement { -- not faster than addtocommalist
+-- name = "additemtolist", -- unique
+-- arguments = "2 strings",
+-- actions = function(l,s)
+-- if l == "" or s == l then
+-- -- s = s
+-- elseif find("," .. l .. ",","," .. s .. ",") then
+-- s = l
+-- else
+-- s = l .. "," .. s
+-- end
+-- context(s)
+-- end
+-- }
+
+local bp = number.dimenfactors.bp
+
+implement {
+ name = "tobigpoints",
+ actions = function(d) context("%.5F",bp * d) end,
+ arguments = "dimension",
+}
+
+implement {
+ name = "towholebigpoints",
+ actions = function(d) context("%r",bp * d) end,
+ arguments = "dimension",
+}
+
+-- for now here:
+
+local function getshape(s)
+ local t = texget(s)
+ local n = t and #t or 0
+ context(n)
+ if n > 0 then
+ for i=1,n do
+ local ti = t[i]
+ if type(ti) == "table" then
+ context(" %isp %isp",ti[1],ti[2])
+ else
+ context(" %i",ti)
+ end
+ end
+ end
+end
+
+implement {
+ name = "getparshape",
+ public = true,
+ actions = function() getshape("parshape") end,
+}
+implement {
+ name = "getclubpenalties",
+ public = true,
+ actions = function() getshape("clubpenalties") end,
+}
+implement {
+ name = "getinterlinepenalties",
+ public = true,
+ actions = function() getshape("interlinepenalties") end,
+ }
+implement {
+ name = "getdisplaywidowpenalties",
+ public = true,
+ actions = function() getshape("displaywidowpenalties") end,
+}
+implement {
+ name = "getwidowpenalties",
+ public = true,
+ actions = function() getshape("widowpenalties") end,
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-aux.mkxl
index 7ade250d970..e4cecfe58e2 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-aux.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-aux.mkxl
@@ -11,13 +11,35 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{syst-aux}{}
+%D In the process of being adapted to \LMTX\ flags so a bit of a mess now. Also
+%D our playground.
-%D This fils is a follow up in \type {syst-aux.mkii} and \type {syst-aux.mkiv}
-%D where you can find some more pure \TEX\ or \LUATEX| variants.
+\registerctxluafile{syst-aux}{autosuffix}
+\registerctxluafile{syst-mac}{autosuffix}
+
+%D This file is a follow up in \type {syst-aux.mkii} and \type {syst-aux.mkiv} where
+%D you can find some more pure \TEX\ or \LUATEX\ variants. There are quite some
+%D helpers here and many no longer are used but we keep them around because they
+%D have always been there. However, the implementation in \LMTX\ can be somewhat
+%D different that in \MKIV, because it's also a kind of a playground for new
+%D features. Of course nostalgia also plays a role.
+%D
+%D For the original code we refer to \type {syst-aux.mkii} and its follow up \type
+%D {syst-aux.mkiv}. These also have historic versions. As usual, the upgrade went
+%D through stages. First I wrote variants usign the new \type {\ignorearguments}
+%D feature, then I decided to implement a few more conditionals and new fancy code
+%D could be ditched before it was even published. I kept some as examples.
+%D
+%D Of course I couldn't do this without Wolfgang looking over my shoulder. Changing
+%D core code is kind of tricky.
\unprotect
+%D These are for local helpers, the names are historic:
+
+\mutable\let\docommand \relax
+\mutable\let\dodocommand\relax
+
%D \macros
%D {unexpanded}
%D
@@ -25,31 +47,32 @@
%D code.
%D
%D \starttyping
-%D \unexpanded\def\somecommand{... ... ...}
+%D \protected\def\somecommand{... ... ...}
%D \stoptyping
%D
%D This overloads the \ETEX\ primitive but as we already had an \MKII\ solution we
-%D keep the same name for a similar mechanism.
+%D keep the same name for a similar mechanism. So, effectively we have two ways to
+%D protect a macro.
+%D
+%D In \LMTX\ we try to avoid this and use \type {\protected} instead, which is
+%D possible because over time we got rid of using the \CONTEXT\ macro with that
+%D name.
-\let\unexpanded\normalprotected
+\pushoverloadmode
-\ifcase\contextlmtxmode
+\aliased\let\unexpanded\normalprotected
- \def\startlmtxmode#1\stoplmtxmode{}
- \let\stoplmtxmode \relax
- \let\startmkivmode\relax
- \let\stopmkivmode \relax
+\popoverloadmode
-\else
+%D We're definitely in \LMTX\ mode here.
- \let\startlmtxmode\relax
- \let\stoplmtxmode \relax
- \def\startmkivmode#1\stopmkivmode{}
- \let\stopmkivmode \relax
+\aliased \let\startlmtxmode\relax
+\aliased \let\stoplmtxmode \relax
+\permanent\def\startmkivmode#-\stopmkivmode{}
+\permanent\let\stopmkivmode \relax
-\fi
-
-%D As we don't have namespace definers yet, we use a special one:
+%D As we don't have namespace definers yet, we use a special one. Later we will
+%D do a better job.
\ifdefined\c_syst_helpers_n_of_namespaces
@@ -64,121 +87,100 @@
\fi
-\unexpanded\def\installsystemnamespace#1% maybe move this to syst-ini
+\permanent\protected\def\installsystemnamespace#1% maybe move this to syst-ini
{\ifcsname ??#1\endcsname
\writestatus\m!system{duplicate system namespace '#1'}\wait
\else
\global\advance\c_syst_helpers_n_of_namespaces\plusone
- \expandafter\edef\csname ??#1\endcsname{\v_interfaces_prefix_template_system}%
+ \immutable\edefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}%
\fi}
%D \macros
%D {normalspace}
%D
-%D There is already \type{\space} but just to be sure we also provide:
+%D There is already \type{\space} but just to be sure we also provide this one:
-\def\normalspace{ }
+\permanent\def\normalspace{ }
-%D \macros
-%D {!!count, !!toks, !!dimen, !!box,
-%D !!width, !!height, !!depth, !!string, !!done}
-%D
-%D We define some more \COUNTERS\ and \DIMENSIONS. We also define some shortcuts to
-%D the local scatchregisters~0, 2, 4, 6 and~8.
-
-\newcount\!!counta \newtoks\!!toksa \newdimen\!!dimena \newbox\!!boxa
-\newcount\!!countb \newtoks\!!toksb \newdimen\!!dimenb \newbox\!!boxb
-\newcount\!!countc \newtoks\!!toksc \newdimen\!!dimenc \newbox\!!boxc
-\newcount\!!countd \newtoks\!!toksd \newdimen\!!dimend \newbox\!!boxd
-\newcount\!!counte \newtoks\!!tokse \newdimen\!!dimene \newbox\!!boxe
-\newcount\!!countf \newtoks\!!toksf \newdimen\!!dimenf \newbox\!!boxf
- \newdimen\!!dimeng
- \newdimen\!!dimenh
- \newdimen\!!dimeni
- \newdimen\!!dimenj
- \newdimen\!!dimenk
-
-\let\!!stringa\empty \let\!!stringb\empty \let\!!stringc\empty
-\let\!!stringd\empty \let\!!stringe\empty \let\!!stringf\empty
-
-\newdimen\!!widtha \newdimen\!!heighta \newdimen\!!deptha
-\newdimen\!!widthb \newdimen\!!heightb \newdimen\!!depthb
-\newdimen\!!widthc \newdimen\!!heightc \newdimen\!!depthc
-\newdimen\!!widthd \newdimen\!!heightd \newdimen\!!depthd
-
-\newif\if!!donea \newif\if!!doneb \newif\if!!donec
-\newif\if!!doned \newif\if!!donee \newif\if!!donef
-
-\def\!!zerocount {0} % alongside \zerocount
-\def\!!minusone {-1} % ...
-\def\!!plusone {1} % ...
-\def\!!plustwo {2} % ...
-\def\!!plusthree {3} % ...
-\def\!!plusfour {4} % ...
-\def\!!plusfive {5} % ...
-\def\!!plussix {6} % ...
-\def\!!plusseven {7} % ...
-\def\!!pluseight {8} % ...
-\def\!!plusnine {9} % alongside \plusnine
+\newif\if!!donea \newif\if!!doneb \newif\if!!donec % soon obsolete in lmtx
+\newif\if!!doned \newif\if!!donee \newif\if!!donef % soon obsolete in lmtx
+
+\immutable\def\!!zerocount {0} % alongside \zerocount
+\immutable\def\!!minusone {-1} % ...
+\immutable\def\!!plusone {1} % ...
+\immutable\def\!!plustwo {2} % ...
+\immutable\def\!!plusthree {3} % ...
+\immutable\def\!!plusfour {4} % ...
+\immutable\def\!!plusfive {5} % ...
+\immutable\def\!!plussix {6} % ...
+\immutable\def\!!plusseven {7} % ...
+\immutable\def\!!pluseight {8} % ...
+\immutable\def\!!plusnine {9} % alongside \plusnine
\setnewconstant \uprotationangle 0
\setnewconstant\rightrotationangle 90
\setnewconstant \downrotationangle 180
\setnewconstant \leftrotationangle 270
-\ifdefined\data \else \let\data \relax \fi % dep checker
-
%D \macros
%D {s!,c!,e!,p!,v!,@@,??}
%D
%D To save memory, we use constants (sometimes called variables). Redefining these
-%D constants can have disastrous results.
-
-\def\v!prefix! {v!}
-\def\c!prefix! {c!}
-\def\s!prefix! {s!}
+%D constants can have disastrous results. Of course, expanding them costs time, so
+%D that's the price to pay. More are defined elsewhere. Of course we later pay a
+%D price when they need to be expanded.
-\def\s!next {next}
-\def\s!default {default}
-\def\s!dummy {dummy}
-\def\s!unknown {unknown}
-
-\def\s!do {do}
-\def\s!dodo {dodo}
-
-\def\s!complex {complex}
-\def\s!start {start}
-\def\s!simple {simple}
-\def\s!stop {stop}
+% \def\v!prefix! {v!}
+% \def\c!prefix! {c!}
+% \def\s!prefix! {s!}
+%
+% \def\s!next {next}
+% \def\s!default {default}
+% \def\s!dummy {dummy}
+% \def\s!unknown {unknown}
+%
+% \def\s!do {do}
+% \def\s!dodo {dodo}
+%
+% \def\s!complex {complex}
+% \def\s!simple {simple}
+%
+% \def\s!start{start}
+% \def\s!stop {stop}
-\def\s!empty {empty}
+% \immutable\def\s!empty {empty}
-%D Sometimes we pass macros as arguments to commands that don't expand them
-%D before interpretation. Such commands can be enclosed with \type {\expanded},
-%D like:
+%D Sometimes we pass macros as arguments to commands that don't expand them before
+%D interpretation. Such commands can be enclosed with \type {\expanded}, like:
%D
%D \starttyping
%D \expanded{\setupsomething[\alfa]}
%D \stoptyping
%D
-%D Such situations occur for instance when \type{\alfa} is a commalist or when data
+%D Such situations occur for instance when \type {\alfa} is a commalist or when data
%D stored in macros is fed to index of list commands. If needed, one should use
-%D \type{\noexpand} inside the argument. Later on we will meet some more clever
+%D \type {\noexpand} inside the argument. Later on we will meet some more clever
%D alternatives to this command. Beware, only the simple one has \type {\noexpand}
%D before its argument.
\let\m_syst_helpers_expanded\empty
-\unexpanded\def\expanded#1%
+\pushoverloadmode
+
+\permanent\protected\def\expanded#1%
{\xdef\m_syst_helpers_expanded{\noexpand#1}\m_syst_helpers_expanded}
-\unexpanded\def\startexpanded#1\stopexpanded
+\popoverloadmode
+
+\permanent\protected\def\startexpanded#1\stopexpanded
{\xdef\m_syst_helpers_expanded{#1}\m_syst_helpers_expanded}
-\let\stopexpanded\relax
+\aliased\let\stopexpanded\relax
%D Recent \TEX\ engines have a primitive \type {\expanded} and we will use that when
-%D possible. After all, we can make not expandable macros now.
+%D possible. After all, we can make not expandable macros now. The name clash is an
+%D unfortunate fact and in retrospect I should nto have agreed to a primitive having
+%D that same name.
% We cannot use the next variant as first we need to adapt \type {##}'s in callers:
%
@@ -192,28 +194,29 @@
%D {gobbleoneargument,gobble...arguments}
%D
%D The next set of macros just do nothing, except that they get rid of a number of
-%D arguments.
-
-\def\gobbleoneargument #1{}
-\def\gobbletwoarguments #1#2{}
-\def\gobblethreearguments#1#2#3{}
-\def\gobblefourarguments #1#2#3#4{}
-\def\gobblefivearguments #1#2#3#4#5{}
-\def\gobblesixarguments #1#2#3#4#5#6{}
-\def\gobblesevenarguments#1#2#3#4#5#6#7{}
-\def\gobbleeightarguments#1#2#3#4#5#6#7#8{}
-\def\gobbleninearguments #1#2#3#4#5#6#7#8#9{}
-\def\gobbletenarguments #1{\gobbleninearguments}
-
-\def\gobbleoneoptional [#1]{}
-\def\gobbletwooptionals [#1][#2]{}
-\def\gobblethreeoptionals[#1][#2][#3]{}
-\def\gobblefouroptionals [#1][#2][#3][#4]{}
-\def\gobblefiveoptionals [#1][#2][#3][#4][#5]{}
+%D arguments. These zero references prevent intermediate storage. In principle that
+%D is more efficient but it probably won't be noticed. It's anyway cheaper on memory
+%D access. We use versions that don't even store the arguments.
+
+%permanent\def\gobbleoneargument #-{}
+\permanent\def\gobbletwoarguments #-#-{}
+\permanent\def\gobblethreearguments #-#-#-{}
+\permanent\def\gobblefourarguments #-#-#-#-{}
+\permanent\def\gobblefivearguments #-#-#-#-{}
+\permanent\def\gobblesixarguments #-#-#-#-{}
+\permanent\def\gobblesevenarguments #-#-#-#-#-{}
+\permanent\def\gobbleeightarguments #-#-#-#-#-#-{}
+\permanent\def\gobbleninearguments #-#-#-#-#-#-#-{}
+
+\permanent\tolerant\def\gobbleoneoptional [#-]{}
+\permanent\tolerant\def\gobbletwooptionals [#-]#*[#-]{}
+\permanent\tolerant\def\gobblethreeoptionals[#-]#*[#-]#*[#-]{}
+\permanent\tolerant\def\gobblefouroptionals [#-]#*[#-]#*[#-]#*[#-]{}
+\permanent\tolerant\def\gobblefiveoptionals [#-]#*[#-]#*[#-]#*[#-]#*[#-]{}
%D Reserved macros for tests:
-\let\donothing\empty
+\aliased\let\donothing\empty
\let\m_syst_string_one \empty
\let\m_syst_string_two \empty
@@ -226,161 +229,76 @@
%D \macros
%D {doifnextcharelse}
%D
-%D When we started using \TEX\ in the late eighties, our first experiences with
-%D programming concerned a simple shell around \LATEX. The commands probably use
-%D most at \PRAGMA, are the itemizing ones. One of those few shell commands took
-%D care of an optional argument, that enabled us to specify what kind of item symbol
-%D we wanted. Without understanding anything we were able to locate a \LATEX\ macro
-%D that could be used to inspect the next character.
-%D
-%D It's this macro that the ancester of the next one presented here. It executes one
-%D of two actions, dependant of the next character. Disturbing spaces and line
-%D endings, which are normally interpreted as spaces too, are skipped.
-%D
-%D \starttyping
-%D \doifnextcharelse {karakter} {then ...} {else ...}
-%D \stoptyping
-%D
-%D This macro differs from the original in the use of \type {\localnext} because we
-%D don't want clashes with \type {\next}.
+%D This macro has a long history. Among the things we had to deal with was ignoring
+%D blank spaces but in the meantime we can use some \LUATEX\ trickery. Older versions
+%D use more code and can be find in the \MKIV\ and \MKII\ files.
-\let\next \relax
-\let\nextnext \relax
-\let\nextnextnext \relax
-\let\nexttoken \relax
-\let\charactertoken\relax
+% \mutable\let\next \relax
+% \mutable\let\nextnext \relax % kind of obsolete
+% \mutable\let\nextnextnext \relax % kind of obsolete
+% \mutable\let\nexttoken \relax
-\let\m_syst_action_yes\relax
-\let\m_syst_action_nop\relax
-
-% \def\syst_helpers_inspect_next_character
-% {\ifx\nexttoken\blankspace
-% \expandafter\syst_helpers_reinspect_next_character
-% \else
-% \expandafter\syst_helpers_inspect_next_character_indeed
-% \fi}
-%
-% \def\syst_helpers_inspect_next_character_indeed
-% {\ifx\nexttoken\charactertoken
-% \expandafter\m_syst_action_yes
-% \else
-% \expandafter\m_syst_action_nop
-% \fi}
-
-\unexpanded\def\doifelsenextchar#1#2#3% #1 should not be {} !
+\permanent\protected\def\doifelsenextchar#1#2#3% #1 should not be {} !
{\def\m_syst_action_yes{#2}%
\def\m_syst_action_nop{#3}%
\futureexpandis#1\m_syst_action_yes\m_syst_action_nop}
-\unexpanded\def\doifelsenextcharcs % #1#2#3% #1 should not be {} !
+\permanent\protected\def\doifelsenextcharcs % #1#2#3% #1 should not be {} !
{\futureexpandis}
-\let\doifnextcharelse \doifelsenextchar
-\let\doifnextcharcselse\doifelsenextcharcs
+\aliased\let\doifnextcharelse \doifelsenextchar
+\aliased\let\doifnextcharcselse\doifelsenextcharcs
%D Because we will mostly use this macro for testing if the next character is \type
%D {[}, we also make a slightly faster variant as it is not uncommon to have tens of
%D thousands of calls to this test in a run. Of course it also is more convenient to
-%D read a trace then.
-
-% \newif\if_next_blank_space_token
+%D read a trace then. Here we use a lookahead primitive that ignores (blank) spaces
+%D which makes for less tracing clutter than the original definition. It's also
+%D faster bit that will probably go unnoticed. Of course, hard||core \TEX ies whose
+%D reputations depends on understanding obscure macro definitions will love the more
+%D low level variants.
-% \let\syst_helpers_next_optional_character_token=[
-%
-% \def\syst_helpers_inspect_next_optional_character
-% {\ifx\nexttoken\blankspace
-% \expandafter\syst_helpers_reinspect_next_optional_character
-% \else
-% \expandafter\syst_helpers_inspect_next_optional_character_indeed
-% \fi}
-%
-% \def\syst_helpers_inspect_next_optional_character_indeed
-% {\ifx\nexttoken\syst_helpers_next_optional_character_token
-% \expandafter\m_syst_action_yes
-% \else
-% \expandafter\m_syst_action_nop
-% \fi}
-
-\unexpanded\def\doifelsenextoptional#1#2%
+\permanent\protected\def\doifelsenextoptional#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\futureexpandis[\m_syst_action_yes\m_syst_action_nop}
-\unexpanded\def\doifelsenextoptionalcs
+\permanent\protected\def\doifelsenextoptionalcs
{\futureexpandis[}
-\let\doifnextoptionalelse \doifelsenextoptional
-\let\doifnextoptionalcselse\doifelsenextoptionalcs
-
-% \let\syst_helpers_next_bgroup_character_token\bgroup
-%
-% \def\syst_helpers_inspect_next_bgroup_character
-% {\ifx\nexttoken\blankspace
-% \expandafter\syst_helpers_reinspect_next_bgroup_character
-% \else
-% \expandafter\syst_helpers_inspect_next_bgroup_character_indeed
-% \fi}
-%
-% \def\syst_helpers_inspect_next_bgroup_character_indeed
-% {\ifx\nexttoken\syst_helpers_next_bgroup_character_token
-% \expandafter\m_syst_action_yes
-% \else
-% \expandafter\m_syst_action_nop
-% \fi}
+\aliased\let\doifnextoptionalelse \doifelsenextoptional
+\aliased\let\doifnextoptionalcselse\doifelsenextoptionalcs
-\unexpanded\def\doifelsenextbgroup#1#2%
+\permanent\protected\def\doifelsenextbgroup#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\futureexpandis\bgroup\m_syst_action_yes\m_syst_action_nop}
-\unexpanded\def\doifelsenextbgroupcs % #1#2
+\permanent\protected\def\doifelsenextbgroupcs % #1#2
{\futureexpandis\bgroup}
-\let\doifnextbgroupelse \doifelsenextbgroup
-\let\doifnextbgroupcselse\doifelsenextbgroupcs
+\aliased\let\doifnextbgroupelse \doifelsenextbgroup
+\aliased\let\doifnextbgroupcselse\doifelsenextbgroupcs
-% \let\syst_helpers_next_parenthesis_character_token(
-%
-% \def\syst_helpers_inspect_next_parenthesis_character
-% {\ifx\nexttoken\blankspace
-% \expandafter\syst_helpers_reinspect_next_parenthesis_character
-% \else
-% \expandafter\syst_helpers_inspect_next_parenthesis_character_indeed
-% \fi}
-%
-% \def\syst_helpers_inspect_next_parenthesis_character_indeed
-% {\ifx\nexttoken\syst_helpers_next_parenthesis_character_token
-% \expandafter\m_syst_action_yes
-% \else
-% \expandafter\m_syst_action_nop
-% \fi}
-
-\unexpanded\def\doifelsenextparenthesis#1#2%
+\permanent\protected\def\doifelsenextparenthesis#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\futureexpandis(\m_syst_action_yes\m_syst_action_nop}
-\let\doifnextparenthesiselse\doifelsenextparenthesis
+\aliased\let\doifnextparenthesiselse\doifelsenextparenthesis
%D The next one is handy in predictable situations:
-\def\syst_helpers_do_if_fast_optional_check_else
- {\ifx\nexttoken\syst_helpers_next_optional_character_token
- \expandafter\m_syst_action_yes
- \else
- \expandafter\m_syst_action_nop
- \fi}
-
-\unexpanded\def\doifelsefastoptionalcheck#1#2%
+\permanent\protected\def\doifelsefastoptionalcheck#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\futureexpandis[\m_syst_action_yes\m_syst_action_nop}
-\unexpanded\def\doifelsefastoptionalcheckcs
+\permanent\protected\def\doifelsefastoptionalcheckcs
{\futureexpandis[}
-\let\doiffastoptionalcheckelse \doifelsefastoptionalcheck
-\let\doiffastoptionalcheckcselse\doifelsefastoptionalcheckcs
+\aliased\let\doiffastoptionalcheckelse \doifelsefastoptionalcheck
+\aliased\let\doiffastoptionalcheckcselse\doifelsefastoptionalcheckcs
%D Here's one for skipping spaces and pars, handy for:
%D
@@ -401,71 +319,27 @@
%D oeps
%D \egroup
%D \stoptyping
+%D
+%D The original kind of clumsy but working version is now replaced by a simple
+%D macro. And it can be even less code in \LUAMETATEX:
-%D The cumbersome original:
-
-% \unexpanded\def\assumelongusagecs#1%
-% {\let\m_syst_action#1%
-% \futurelet\nexttoken\syst_helpers_ignore_spacing}
-%
-% \def\syst_helpers_ignore_spacing
-% {\ifx\nexttoken\blankspace
-% \expandafter\syst_helpers_ignore_spacing_blankspace
-% \orelse\ifx\nexttoken\par
-% \expandafter\syst_helpers_ignore_spacing_partoken
-% \else
-% \expandafter\m_syst_action
-% \fi}
-%
-% \def\syst_helpers_ignore_spacing_partoken\par
-% {\futurelet\nexttoken\syst_helpers_ignore_spacing}
-
-%D A bit less tracing noise:
-
-% \def\assume_long_usage_cs
-% {\futureexpandis\par\assume_long_usage_par\m_syst_action}
-%
-% \def\assume_long_usage_par\par%
-% {\assume_long_usage_cs}
-%
-% \unexpanded\def\assumelongusagecs#1{\let\m_syst_action#1\assume_long_usage_cs}
-
-%D Ok, using \type {\futureexpandisap} is maybe feature creep but I'd like to experiment
-%D with more tolerant user input. It might go away in which case we use the above.
-
-\unexpanded\def\assumelongusagecs#1%
- {\futureexpandisap\relax#1#1}
-
-% D These macros use some auxiliary macros. Although we were able to program quite
-% D complicated things, I only understood these after rereading the \TEX book. The
-% D trick is in using a command with a one character name. Such commands differ from
-% D the longer ones in the fact that trailing spaces are {\em not} skipped. This
-% D enables us to indirectly define a long named macro that gobbles a space. In the
-% D first line we define \type {\blankspace}. Next we make \type {\:} equivalent to
-% D \type {\reinspect...}. This one||character command is expanded before the next
-% D \type {\def} comes into action. This way the space after \type {\:} becomes a
-% D delimiter of the longer named \type {\reinspectnextcharacter}.
-
-\let\next\:
+\aliased\let\assumelongusagecs\expandafterpars % so we can replace it
-\def\:{\let\blankspace= } \:
+%D It's used to skip over empty lines in some constructs that we like to set up
+%D spacy. We already permit par tokens (and equivalents) in math and some other
+%D places visa engine features. And, \type {\long} stuff has been dropped for a long
+%D time already (it is still optional in \lUATEX). But the \quote {long} in the
+%D name kind of stuck.
-% \def\:{\syst_helpers_reinspect_next_character}
-% \expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_character}
-%
-% \def\:{\syst_helpers_reinspect_next_optional_character}
-% \expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_optional_character}
-%
-% \def\:{\syst_helpers_reinspect_next_bgroup_character}
-% \expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_bgroup_character}
-%
-% \def\:{\syst_helpers_reinspect_next_parenthesis_character}
-% \expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_parenthesis_character}
-%
-% \def\:{\syst_helpers_ignore_spacing_blankspace}
-% \expandafter\def\: {\futurelet\nexttoken\syst_helpers_ignore_spacing}
+%D \macros
+%D {blankspace}
+%D
+%D Here is how this works. The \type {\let} primitive first picks up the to be let
+%D name. Then it scans for an optional equal and when that is found it will skip the
+%D next space, which is why we need an extra one to achieve our goal. Such a \type
+%D {\blankspace} has the meaning \typ {blank space}. A typical \TEX ie definition:
-\let\:\next
+\normalexpanded{\permanent\let\noexpand\blankspace=\space\space}
%D \macros
%D {setvalue,setgvalue,setevalue,setxvalue,
@@ -490,32 +364,32 @@
%D As we will see, \CONTEXT\ uses these commands many times, which is mainly due to
%D its object oriented and parameter driven character.
-\def\setvalue #1{\expandafter\def \csname#1\endcsname}
-\def\setgvalue #1{\expandafter\gdef\csname#1\endcsname}
-\def\setevalue #1{\expandafter\edef\csname#1\endcsname}
-\def\setxvalue #1{\expandafter\xdef\csname#1\endcsname}
-\def\getvalue #1{\csname#1\endcsname} % maybe: \begincsname#1\endcsname
-\def\letvalue #1{\expandafter\let \csname#1\endcsname}
-\def\letgvalue #1{\expandafter\glet\csname#1\endcsname}
-\def\resetvalue #1{\expandafter\let \csname#1\endcsname\empty}
-\def\undefinevalue#1{\expandafter\let \csname#1\endcsname\undefined}
-\def\ignorevalue#1#2{\expandafter\let \csname#1\endcsname\empty}
+\permanent\def\setvalue #1{\defcsname #1\endcsname}
+\permanent\def\setgvalue #1{\gdefcsname#1\endcsname}
+\permanent\def\setevalue #1{\edefcsname#1\endcsname}
+\permanent\def\setxvalue #1{\xdefcsname#1\endcsname}
+\permanent\def\getvalue #1{\csname#1\endcsname} % maybe: \begincsname#1\endcsname
+\permanent\def\letvalue #1{\letcsname #1\endcsname}
+\permanent\def\letgvalue #1{\gletcsname#1\endcsname}
+\permanent\def\resetvalue #1{\letcsname#1\endcsname\empty}
+\permanent\def\undefinevalue#1{\letcsname#1\endcsname\undefined}
+\permanent\def\ignorevalue#1#2{\letcsname#1\endcsname\empty}
-\def\setuvalue #1{\normalprotected\expandafter \def\csname#1\endcsname}
-\def\setuevalue #1{\normalprotected\expandafter\edef\csname#1\endcsname}
-\def\setugvalue #1{\normalprotected\expandafter\gdef\csname#1\endcsname}
-\def\setuxvalue #1{\normalprotected\expandafter\xdef\csname#1\endcsname}
+\permanent\def\setuvalue #1{\protected\defcsname #1\endcsname}
+\permanent\def\setuevalue #1{\protected\edefcsname#1\endcsname}
+\permanent\def\setugvalue #1{\protected\gdefcsname#1\endcsname}
+\permanent\def\setuxvalue #1{\protected\xdefcsname#1\endcsname}
-\unexpanded\def\getuvalue#1{\csname#1\endcsname}
+\permanent\protected\def\getuvalue#1{\csname#1\endcsname}
%D \macros
%D {globallet,glet}
%D
%D In \CONTEXT\ of May 2000 using \type {\globallet} instead of the two tokens will
%D save us some $300\times4=1200$ bytes of format file on a 32~bit system. Not that
-%D it matters much today. This shortcut is already defined:
+%D it matters much today. But nowadays we can just alias to a primitive:
-\let\globallet\glet
+\aliased\let\globallet\glet
%D \macros
%D {doifundefined,doifdefined,
@@ -523,8 +397,8 @@
%D doifalldefinedelse}
%D
%D The standard way of testing if a macro is defined is comparing its meaning with
-%D another undefined one, usually \type{\undefined}. To garantee correct working of
-%D the next set of macros, \type{\undefined} may never be defined!
+%D another undefined one, usually \type {\undefined}. To garantee correct working of
+%D the next set of macros, \type {\undefined} may never be defined!
%D
%D \starttyping
%D \doifundefined {string} {...}
@@ -537,41 +411,46 @@
%D Every macroname that \TEX\ builds gets an entry in the hash table, which is of
%D limited size. It is expected that \ETEX\ will offer a less memory||consuming
%D alternative.
-
+%D
%D Although it will probably never be a big problem, it is good to be aware of the
-%D difference between testing on a macro name to be build by using \type{\csname} and
-%D \type{\endcsname} and testing the \type{\name} directly.
+%D difference between testing on a macro name to be build by using \type {\csname} and
+%D \type {\endcsname} and testing the \type {\name} directly.
%D
%D \starttyping
-%D \expandafter\ifx\csname NameA\endcsname\relax ... \else ... \fi
+%D \expandafter\ifrelax\csname NameA\endcsname ... \else ... \fi
%D
%D \ifundefined\NameB ... \else ... \fi
%D \stoptyping
+%D
+%D Suppression of errors while constructing a control sequence is one of the (few)
+%D things that I remember being discussed in the perspective of \ETEX\ but it was
+%D rejected because it was not considered useful. Well, in \LUATEX\ we can surpress
+%D it and that is what we do in \MKIV. We're probably the only macro package that
+%D needs it. That kind of configuration happens elsewhere. These macros are (mostly
+%D for historic reasons) fully expandable.
-% \suppressifcsnameerror\plusone % already set
-
-\def\doifelseundefined#1%
+\permanent\def\doifelseundefined#1%
{\ifcsname#1\endcsname
\expandafter\secondoftwoarguments\else\expandafter\firstoftwoarguments
\fi}
-\def\doifelsedefined#1%
+\permanent\def\doifelsedefined#1%
{\ifcsname#1\endcsname
\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments
\fi}
-\def\doifundefined#1%
+\permanent\def\doifundefined#1%
{\ifcsname#1\endcsname
\expandafter\gobbleoneargument\else\expandafter\firstofoneargument
\fi}
-\def\doifdefined#1%
+\permanent\def\doifdefined#1%
{\ifcsname#1\endcsname
\expandafter\firstofoneargument\else\expandafter\gobbleoneargument
\fi}
-\let\doifundefinedelse\doifelseundefined
-\let\doifdefinedelse \doifelsedefined
+\aliased\let\doifundefinedelse\doifelseundefined
+\aliased\let\doifdefinedelse \doifelsedefined
%D \macros
%D {letbeundefined}
@@ -581,22 +460,22 @@
%D {\undefined}! In \ETEX\ we have \type {\ifcsname} and that way of testing on
%D existance is not the same as the one described here. Therefore we introduce:
-\unexpanded\def\letbeundefined#1% potential stack buildup when used \global
- {\expandafter\let\csname#1\endcsname\undefined} % or use \undefinevalue to match \setvalue
+\permanent\protected\def\letbeundefined#1%
+ {\letcsname#1\endcsname\undefined}
-\unexpanded\def\localundefine#1% conditional
- {\ifcsname#1\endcsname\expandafter\let\csname#1\endcsname\undefined\fi}
+\permanent\protected\def\localundefine#1% conditional
+ {\ifcsname#1\endcsname\letcsname#1\endcsname\undefined\fi}
-\unexpanded\def\globalundefine#1% conditional
- {\ifcsname#1\endcsname\expandafter\glet\csname#1\endcsname\undefined\fi}
+\permanent\protected\def\globalundefine#1% conditional
+ {\ifcsname#1\endcsname\gletcsname#1\endcsname\undefined\fi}
%D Beware, being \type {\undefined} in \ETEX\ means that the macro {\em is} defined!
%D
%D When we were developing the scientific units module, we encountered different
%D behavior in text and math mode, which was due to this grouping subtilities. We
-%D therefore decided to use \type{\begingroup} instead of \type{\bgroup}.
+%D therefore decided to use \type {\begingroup} instead of \type {\bgroup}.
-\unexpanded\def\doifelsealldefined#1%
+\permanent\protected\def\doifelsealldefined#1%
{\begingroup
\donetrue % we could use a reserved one and avoid the group
\processcommalist[#1]\syst_helpers_do_if_all_defined_else
@@ -606,7 +485,7 @@
\endgroup\expandafter\secondoftwoarguments
\fi}
-\let\doifalldefinedelse\doifelsealldefined
+\aliased\let\doifalldefinedelse\doifelsealldefined
\def\syst_helpers_do_if_all_defined_else#1%
{\ifcsname#1\endcsname\else
@@ -619,7 +498,7 @@
%D
%D Programming in \TEX\ differs from programming in procedural languages like
%D \MODULA. This means that one --- well, let me speek for myself --- tries to do
-%D the things in the well known way. Therefore the next set of \type{\ifthenelse}
+%D the things in the well known way. Therefore the next set of \type {ifthenelse}
%D commands were between the first ones we needed. A few years later, the opposite
%D became true: when programming in \MODULA, I sometimes miss handy things like
%D grouping, runtime redefinition, expansion etc. While \MODULA\ taught me to
@@ -630,22 +509,26 @@
%D \doifnot {string1} {string2} {...}
%D \doifelse {string1} {string2} {then ...}{else ...}
%D \stoptyping
+%D
+%D Again, we use some of the new primitives in \LUAMETATEX. Using straightforward
+%D \type {\edef}'s and \type {\ifx} comparison works as well, but this saves tokens
+%D and, more important, tracing clutter.
-\unexpanded\def\doifelse#1#2%
+\permanent\protected\def\doifelse#1#2%
{\iftok{#1}{#2}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doif#1#2%
+\permanent\protected\def\doif#1#2%
{\iftok{#1}{#2}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnot#1#2%
+\permanent\protected\def\doifnot#1#2%
{\iftok{#1}{#2}%
\expandafter\gobbleoneargument
\else
@@ -663,29 +546,30 @@
%D \doifemptyelse {string} {then ...} {else ...}
%D \stoptyping
%D
-%D This time, the string is not expanded.
+%D This time, the string is not expanded, but we use the dedicated empty checker
+%D here.
-\unexpanded\def\doifelseempty#1%
+\permanent\protected\def\doifelseempty#1%
{\def\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
+ \ifempty\m_syst_string_one
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\doifemptyelse\doifelseempty
+\aliased\let\doifemptyelse\doifelseempty
-\unexpanded\def\doifempty#1%
+\permanent\protected\def\doifempty#1%
{\def\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
+ \ifempty\m_syst_string_one
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotempty#1%
+\permanent\protected\def\doifnotempty#1%
{\def\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
+ \ifempty\m_syst_string_one
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
@@ -730,12 +614,70 @@
% !5yes=\doifnotinset{}{}{yes}
% !6yes=\doifnotinset{aaa}{}{yes}
-\unexpanded\def\doifelseinset#1#2{\clf_doifelseinset{#1}{#2}}
-\unexpanded\def\doifinset #1#2{\clf_doifinset {#1}{#2}}
-\unexpanded\def\doifnotinset #1#2{\clf_doifnotinset {#1}{#2}}
- % \let\firstinset \clf_firstinset
+%D These are normally only used for keywords, i.e.\ strings so we can delegate
+%D the work to \LUA:
+
+%protected\def\doifelseinset#1#2{\clf_doifelseinset{#1}{#2}}
+%protected\def\doifinset #1#2{\clf_doifinset {#1}{#2}}
+%protected\def\doifnotinset #1#2{\clf_doifnotinset {#1}{#2}}
+% % \let\firstinset \clf_firstinset
+
+% These don't accept spaces after commas:
+%
+% \protected\def\doifelseinset#1#2%
+% {\ifhasxtoks{,#1,}{,#2,}%
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+
+% \protected\def\doifinset#1#2%
+% {\ifhasxtoks{,#1,}{,#2,}%
+% \expandafter\firstofoneargument
+% \else
+% \expandafter\gobbleoneargument
+% \fi}
+
+% \protected\def\doifnotinset#1#2%
+% {\ifhasxtoks{,#1,}{,#2,}%
+% \expandafter\gobbleoneargument
+% \else
+% \expandafter\firstofoneargument
+% \fi}
+
+% But these do:
-\let\doifinsetelse\doifelseinset
+\immutable\edef\a!comma{\expandtoken \ignorecatcode \commaasciicode}
+\immutable\edef\a!space{\expandtoken \ignorecatcode \spaceasciicode}
+
+\normalexpanded {
+
+ \permanent \protected \def \noexpand \doifelseinset#1#2%
+ {\noexpand\ifhasxtoks{,\a!space#1,}{,#2,}%
+ \noexpand\expandafter\noexpand\firstoftwoarguments
+ \noexpand\else
+ \noexpand\expandafter\noexpand\secondoftwoarguments
+ \noexpand\fi}
+
+ \permanent \protected \def \noexpand \doifinset#1#2%
+ {\noexpand\ifhasxtoks{,\a!space#1,}{,#2,}%
+ \noexpand\expandafter\noexpand\firstofoneargument
+ \noexpand\else
+ \noexpand\expandafter\noexpand\gobbleoneargument
+ \noexpand\fi}
+
+ \permanent \protected \def \noexpand \doifnotinset#1#2%
+ {\noexpand\ifhasxtoks{,\a!space#1,}{,#2,}%
+ \noexpand\expandafter\noexpand\gobbleoneargument
+ \noexpand\else
+ \noexpand\expandafter\noexpand\firstofoneargument
+ \noexpand\fi}
+
+}
+
+%D Done.
+
+\aliased\let\doifinsetelse\doifelseinset
%D \macros
%D {doifcommon,doifnotcommon,doifcommonelse}
@@ -765,11 +707,11 @@
% !9yes=\doifcommonelse{,a,}{,,,a,}{yes}{nop}
% !9yes=\doifcommonelse{,,a,}{,,,a,}{yes}{nop}
-\unexpanded\def\doifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}}
-\unexpanded\def\doifcommon #1#2{\clf_doifcommon {#1}{#2}}
-\unexpanded\def\doifnotcommon #1#2{\clf_doifnotcommon {#1}{#2}}
+\permanent\protected\def\doifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}} % todo: define in lua
+\permanent\protected\def\doifcommon #1#2{\clf_doifcommon {#1}{#2}} % todo: define in lua
+\permanent\protected\def\doifnotcommon #1#2{\clf_doifnotcommon {#1}{#2}} % todo: define in lua
-\let\doifcommonelse\doifelsecommon
+\aliased\let\doifcommonelse\doifelsecommon
%D \macros
%D {processcommalist,processcommacommand,quitcommalist,
@@ -801,97 +743,13 @@
%D
%D \typebuffer
%D
-%D Before we show the result, we present the macro's:
-
-\newcount\commalevel
-
-\installsystemnamespace{nextcommalevel}
-
-\def\syst_helpers_do_do_do_process_comma_item
- {\csname\??nextcommalevel\the\commalevel\endcsname}
-
-% \ifcase\contextlmtxmode
-
- \def\syst_helpers_do_process_comma_item
- {\futurelet\nexttoken\syst_helpers_do_do_process_comma_item}
-
- \def\syst_helpers_do_do_process_comma_item
- {\ifx\nexttoken\blankspace
- \expandafter\syst_helpers_re_do_process_comma_item
- \else
- \expandafter\syst_helpers_do_do_process_comma_item_indeed
- \fi}
-
- \def\syst_helpers_do_do_process_comma_item_indeed
- {\ifx\nexttoken]%
- \expandafter\gobbleoneargument
- \else
- \expandafter\syst_helpers_do_do_do_process_comma_item
- \fi}
-
-% \else
-%
-% \def\syst_helpers_do_process_comma_item
-% {\futureexpandis]\gobbleoneargument\syst_helpers_do_do_do_process_comma_item}
-%
-% \fi
-
-%D Empty arguments are not processed. Empty items (\type {,,}) however are
-%D treated. We have to check for the special case \type {[{a,b,c}]}.
-
-\unexpanded\def\processcommalist[%
- {\futurelet\nexttoken\syst_helpers_do_check_comma_item}
-
-\def\syst_helpers_do_check_comma_item
- {\ifx\nexttoken]%
- \expandafter\gobblethreearguments
- \else
- \expandafter\syst_helpers_do_process_comma_list
- \fi
- \relax} % this one preserved the next {}
-
-\def\syst_helpers_do_process_comma_list#1]#2%
- {\global\advance\commalevel \plusone
- \expandafter\def\csname\??nextcommalevel\the\commalevel\endcsname##1,%
- {#2{##1}\syst_helpers_do_process_comma_item}%
- \syst_helpers_do_do_process_comma_item_gobble#1,]\relax
- \global\advance\commalevel \minusone }
-
-\def\syst_helpers_do_do_process_comma_item_gobble#1{\syst_helpers_do_do_process_comma_item}
-
-%D One way of quitting a commalist halfway is:
-
-\unexpanded\def\quitcommalist
- {\begingroup\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_comma_list}
-
-\def\syst_helpers_do_quit_comma_list#1]%
- {\endgroup}
-
-\unexpanded\def\quitprevcommalist
- {\begingroup\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_prev_comma_list}
-
-\def\syst_helpers_do_quit_prev_comma_list#1]%
- {\let\syst_helpers_do_process_comma_item\syst_helpers_do_quit_comma_list}
-
-%D The hack we used for checking the next character \type {\doifnextcharelse}
-%D is also used here.
-
-% \ifcase\contextlmtxmode
-
- \let\next\:
-
- \def\:{\syst_helpers_re_do_process_comma_item} % \:not saved ?
-
- \expandafter\def\: {\futurelet\nexttoken\syst_helpers_do_do_process_comma_item}
-
- \let\:\next
-
-% \fi
-
-%D The previous examples lead to:
+%D Or expanded:
+%D
+%D \blank \getbuffer \blank
+%D
+%D The original definitions can be found elsewhere and need a bit more code. In case of
+%D issues, consult the \MKIV\ variant or previous \LMTX\ variants in the repository.
%D
-%D \getbuffer
-
%D When a list is saved in a macro, we can use a construction like:
%D
%D \starttyping
@@ -916,10 +774,109 @@
%D \stoptyping
%D
%D Commands that are part of the list are expanded, so the use of this macro has its
-%D limits.
+%D limits. We use a new \LUAMETATEX\ feature that intercepts invalid macro arguments
+%D by quitting when \type {\ignorearguments} is seen. That's why we act on the
+%D arguments state. Again it permits leaner and meaner macro definitions with a bit
+%D less clutter in tracing.
+
+\mutable\let\commalistcommand\empty
+
+\protected\def\syst_helpers_process_comma_item#+,%
+ {\ifarguments
+ \expandafter\syst_helpers_process_comma_item_gobble
+ \orelse\ifparameter#1\or
+ \commalistcommand{#1}%
+ \expandafter\syst_helpers_process_comma_item_next
+ \else
+ \expandafter\syst_helpers_process_comma_item_gobble
+ \fi}
+
+% \def\syst_helpers_process_comma_item_next
+% {\expandafterspaces\syst_helpers_process_comma_item}
+
+% \protected\def\processcommalist[#1]#2%
+% {\pushmacro\commalistcommand
+% \def\commalistcommand{#2}%
+% \expandafterspaces\syst_helpers_process_comma_item#1,\ignorearguments\ignorearguments\ignorearguments
+% \popmacro\commalistcommand}
+
+% \protected\def\processcommacommand[#1]#2%
+% {\pushmacro\commalistcommand
+% \def\commalistcommand{#2}%
+% \normalexpanded{\noexpand\expandafterspaces\syst_helpers_process_comma_item#1,}\ignorearguments\ignorearguments\ignorearguments
+% \popmacro\commalistcommand}
+
+% \permanent\protected\def\processcommalist[#*#+]#2%
+% {\pushmacro\commalistcommand
+% \def\commalistcommand{#2}%
+% \expandafterspaces\syst_helpers_process_comma_item#1,\ignorearguments\ignorearguments\ignorearguments
+% \popmacro\commalistcommand}
+%
+% \permanent\protected\def\processcommacommand[#*#+]#2%
+% {\pushmacro\commalistcommand
+% \def\commalistcommand{#2}%
+% \normalexpanded{\noexpand\expandafterspaces\syst_helpers_process_comma_item#1,}\ignorearguments\ignorearguments\ignorearguments
+% \popmacro\commalistcommand}
+
+\tolerant\protected\def\syst_helpers_process_comma_item#*#1,%
+ {\ifarguments\or
+ \commalistcommand{#1}%
+ \expandafter\syst_helpers_process_comma_item_next
+ \fi}
-\unexpanded\def\processcommacommand[#1]%
- {\normalexpanded{\processcommalist[#1]}}
+\def\syst_helpers_process_comma_item_next
+ {\expandafterspaces\syst_helpers_process_comma_item}
+
+\permanent\protected\def\processcommalist[#1]#2%
+ {\pushmacro\commalistcommand
+ \def\commalistcommand{#2}%
+ \syst_helpers_process_comma_item#1\ignorearguments\ignorearguments\ignorearguments
+ \popmacro\commalistcommand}
+
+\permanent\protected\def\processcommacommand[#1]#2%
+ {\pushmacro\commalistcommand
+ \def\commalistcommand{#2}%
+ \normalexpanded{\syst_helpers_process_comma_item#1}\ignorearguments\ignorearguments\ignorearguments
+ \popmacro\commalistcommand}
+
+% \let\syst_helpers_process_comma_item_next_a \syst_helpers_process_comma_item_next
+% \def\syst_helpers_process_comma_item_next_b#0\ignorearguments{\let\syst_helpers_process_comma_item_next\syst_helpers_process_comma_item_next_a}
+% \def\syst_helpers_process_comma_item_next_c#0\ignorearguments{\let\syst_helpers_process_comma_item_next\syst_helpers_process_comma_item_next_b}
+% \def\syst_helpers_process_comma_item_gobble#0\ignorearguments{}
+
+\let\syst_helpers_process_comma_item_next_a \syst_helpers_process_comma_item_next
+\def\syst_helpers_process_comma_item_next_b#-\ignorearguments{\let\syst_helpers_process_comma_item_next\syst_helpers_process_comma_item_next_a}
+\def\syst_helpers_process_comma_item_next_c#-\ignorearguments{\let\syst_helpers_process_comma_item_next\syst_helpers_process_comma_item_next_b}
+\def\syst_helpers_process_comma_item_gobble#-\ignorearguments{}
+
+\permanent\protected\def\quitcommalist {\let\syst_helpers_process_comma_item_next\syst_helpers_process_comma_item_next_b}
+\permanent\protected\def\quitprevcommalist{\let\syst_helpers_process_comma_item_next\syst_helpers_process_comma_item_next_c}
+
+%D \startbuffer
+%D \def\foo#1{(#1)}
+%D <\processcommalist[a,b,c,d]\foo>
+%D
+%D \def\foo#1{(#1)}
+%D \def\oof#1{<\processcommalist[#1]\foo>}
+%D <\processcommalist[{a,b},{c,d}]\oof>
+%D
+%D \def\foo#1{(#1)\quitcommalist}
+%D <\processcommalist[a,b,c,d]\foo>
+%D
+%D \def\foo#1{(#1)}
+%D \def\oof#1{<\processcommalist[#1]\foo\quitcommalist>}
+%D <\processcommalist[{a,b},{c,d}]\oof>
+%D
+%D \def\foo#1{(#1)\quitcommalist}
+%D \def\oof#1{<\processcommalist[#1]\foo>}
+%D <\processcommalist[{a,b},{c,d},{e,f}]\oof>
+%D
+%D \def\foo#1{(#1)\quitprevcommalist}
+%D \def\oof#1{<\processcommalist[#1]\foo>}
+%D <\processcommalist[{a,b},{c,d},{e,f}]\oof>
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
%D The argument to \type{\command} is not delimited. Because we often use \type {[]}
%D as delimiters, we also have:
@@ -934,7 +891,9 @@
%D \def\command[#1]{... #1 ...}
%D \stoptyping
-\unexpanded\def\processcommalistwithparameters[#1]#2%
+\let\syst_helpers_do_process_comma_list_with_parameters\gobbleoneargument
+
+\permanent\protected\def\processcommalistwithparameters[#1]#2%
{\def\syst_helpers_do_process_comma_list_with_parameters##1{#2[##1]}%
\processcommalist[#1]\syst_helpers_do_process_comma_list_with_parameters}
@@ -945,16 +904,18 @@
\let\syst_helpers_comma_list_step\relax
-\unexpanded\def\startprocesscommalist[#1]#2\stopprocesscommalist
+\mutable\let\currentcommalistitem\empty
+
+\permanent\protected\def\startprocesscommalist[#1]#2\stopprocesscommalist
{\def\syst_helpers_comma_list_step##1{\def\currentcommalistitem{##1}#2}%
\processcommalist[#1]\syst_helpers_comma_list_step}
-\unexpanded\def\startprocesscommacommand[#1]#2\stopprocesscommacommand
+\permanent\protected\def\startprocesscommacommand[#1]#2\stopprocesscommacommand
{\def\syst_helpers_comma_list_step##1{\def\currentcommalistitem{##1}#2}%
\normalexpanded{\processcommalist[#1]}\syst_helpers_comma_list_step}
-\let\stopprocesscommalist \relax
-\let\stopprocesscommacommand\relax
+\aliased\let\stopprocesscommalist \relax
+\aliased\let\stopprocesscommacommand\relax
%D \macros
%D {processaction,
@@ -966,9 +927,9 @@
%D can be nested without problems.
%D
%D \starttyping
-%D \processaction [x] [a=>\a,b=>\b,c=>\c]
-%D \processfirstactioninset [x,y,z] [a=>\a,b=>\b,c=>\c]
-%D \processallactionsinset [x,y,z] [a=>\a,b=>\b,c=>\c]
+%D \processaction [x] [x=>a,y=>b,z=>c]
+%D \processfirstactioninset [x,y,z] [x=>a,y=>b,z=>c]
+%D \processallactionsinset [x,y,z] [x=>a,y=>b,z=>c]
%D \stoptyping
%D
%D We can supply both a \type {default} action and an action to be undertaken when
@@ -992,19 +953,28 @@
%D the use of this macro can be found in \PPCHTEX, where we completely rely on \TEX\
%D for interpreting user supplied keywords like \type {SB}, \type {SB1..6}, \type
%D {SB125} etc.
+%D
+%D In the meantime we follow a different approach, often somewhat more heavy on the
+%D number of control sequences used, but that is no lomger a real issue. The code
+%D has been simplified and nwo uses the macro stack mechanism. If needed I can make
+%D this more hip and a bit faster now but \unknown\ it's seldom used nowadays as we
+%D have better ways now.
+
+\mutable\let\commalistelement\empty
-\newcount\processlevel
+\let\m_syst_string_one\empty
+\let\m_syst_string_two\empty
-\unexpanded\def\syst_helpers_do_compare_process_action_a[#1=>#2][#3]%
+\let\syst_helpers_do_compare_process_action\relax
+
+\protected\def\syst_helpers_do_compare_process_action_a[#1=>#2][#3]%
{\edef\m_syst_string_two{#1}%
\ifx\m_syst_string_two\s!default
\let\commalistelement\empty
#2%
\fi}
-% met \quitcommalist tot meer dan 25\% sneller
-
-\unexpanded\def\syst_helpers_do_compare_process_action_b[#1=>#2][#3]%
+\protected\def\syst_helpers_do_compare_process_action_b[#1=>#2][#3]%
{\edef\m_syst_string_two{#1}%
\ifx\m_syst_string_one\m_syst_string_two
\def\commalistelement{#3}%
@@ -1015,17 +985,17 @@
#2%
\fi}
-\unexpanded\def\processaction[#1]#2[%
+\permanent\protected\def\processaction[#1]#2[%
{\edef\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
+ \ifempty\m_syst_string_one
\let\syst_helpers_do_compare_process_action\syst_helpers_do_compare_process_action_a
\else
\let\syst_helpers_do_compare_process_action\syst_helpers_do_compare_process_action_b
\fi
\edef\syst_helpers_do_process_action##1{\syst_helpers_do_compare_process_action[##1][#1]}% expands #1
- \processnextcommalist\relax\relax\syst_helpers_do_process_action[}
+ \processnextcommalist\syst_helpers_do_process_action[}
-\unexpanded\def\syst_helpers_do_compare_process_action_c[#1=>#2][#3]%
+\protected\def\syst_helpers_do_compare_process_action_c[#1=>#2][#3]%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#3}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -1040,22 +1010,25 @@
\fi
\fi}
-\unexpanded\def\processfirstactioninset[#1]%
+\permanent\protected\def\processfirstactioninset[#1]%
{\edef\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
+ \ifempty\m_syst_string_one
\expandafter\processaction
\else
\expandafter\syst_helpers_process_first_action_in_set_indeed
\fi
[#1]}
-\unexpanded\def\syst_helpers_process_first_action_in_set_indeed[#1]#2[#3]%
+\let\syst_helpers_do_process_action \gobbleoneargument
+\let\syst_helpers_do_do_process_action\gobbleoneargument
+
+\tolerant\protected\def\syst_helpers_process_first_action_in_set_indeed[#1]#*[#2]%
{\def\syst_helpers_do_process_action##1%
{\def\syst_helpers_do_do_process_action####1{\syst_helpers_do_compare_process_action_c[####1][##1]}%
- \processcommalist[#3]\syst_helpers_do_do_process_action}%
+ \processcommalist[#2]\syst_helpers_do_do_process_action}%
\normalexpanded{\processcommalist[#1]}\syst_helpers_do_process_action}
-\unexpanded\def\syst_helpers_do_compare_process_action_d[#1=>#2][#3]%
+\protected\def\syst_helpers_do_compare_process_action_d[#1=>#2][#3]%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#3}%
\ifx\m_syst_string_one\m_syst_string_two
@@ -1070,39 +1043,37 @@
\fi
\fi}
-\installsystemnamespace{nextactionlevel}
+\let\syst_process_action_in_set_all\relax
-\unexpanded\def\syst_helpers_do_process_all_actions_in_set
- {\csname\??nextactionlevel\the\processlevel\endcsname}
+\tolerant\protected\def\syst_helpers_process_all_actions_in_set_indeed[#1]#*[#2]%
+ {\globalpushmacro\syst_process_action_in_set_all
+ \def\syst_process_action_in_set##1%
+ {\def\syst_process_action_in_set_one####1{\syst_helpers_do_compare_process_action_d[####1][##1]}%
+ \processcommalist[#2]\syst_process_action_in_set_one}%
+ \processcommacommand[#1]\syst_process_action_in_set
+ \globalpopmacro\syst_process_action_in_set_all}
-\unexpanded\def\processallactionsinset[#1]%
+\permanent\protected\def\processallactionsinset[#1]%
{\edef\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty
+ \ifempty\m_syst_string_one
\expandafter\processaction
\else
\expandafter\syst_helpers_process_all_actions_in_set_indeed
- \fi
- [#1]}
-
-\unexpanded\def\syst_helpers_process_all_actions_in_set_indeed[#1]#2[#3]%
- {\advance\processlevel \plusone
- \expandafter\def\csname\??nextactionlevel\the\processlevel\endcsname##1%
- {\def\syst_helpers_do_do_process_action####1{\syst_helpers_do_compare_process_action_d[####1][##1]}%
- \processcommalist[#3]\syst_helpers_do_do_process_action}%
- \normalexpanded{\processcommalist[#1]}\syst_helpers_do_process_all_actions_in_set
- \advance\processlevel\minusone}
+ \fi[#1]}
%D These macros use:
-\unexpanded\def\processnextcommalist#1#2#3[#4#5]%
- {#1%
- \let\nexttoken#4%
- \global\advance\commalevel \plusone
- \expandafter\def\csname\??nextcommalevel\the\commalevel\endcsname##1,%
- {#3{##1}\syst_helpers_do_process_comma_item}%
- \syst_helpers_do_do_process_comma_item#4#5,]\relax
- \global\advance\commalevel\minusone
- #2}
+% \protected\def\processnextcommalist#1[#2#3]%
+% {\pushmacro\commalistcommand
+% \def\commalistcommand{#1}%
+% \expandafterspaces\syst_helpers_process_comma_item#2#3\ignorearguments\ignorearguments\ignorearguments
+% \popmacro\commalistcommand}
+
+\permanent\protected\def\processnextcommalist#1[#2#3]%
+ {\pushmacro\commalistcommand
+ \def\commalistcommand{#1}%
+ \expandafterspaces\syst_helpers_process_comma_item#2#3\ignorearguments\ignorearguments\ignorearguments
+ \popmacro\commalistcommand}
%D \macros
%D {getfirstcharacter, firstcharacter, remainingcharacters, doiffirstcharacter}
@@ -1117,15 +1088,15 @@
%D A two step expansion is used to prevent problems with complicated arguments, for
%D instance arguments that consist of two or more expandable tokens.
-\let\firstcharacter \empty
-\let\remainingcharacters\empty
+\mutable\let\firstcharacter \empty
+\mutable\let\remainingcharacters\empty
-\unexpanded\def\getfirstcharacter #1{\clf_getfirstcharacter{#1}}
-\unexpanded\def\doifelsefirstchar #1#2{\clf_doifelsefirstchar{#1}{#2}}
-\unexpanded\def\thefirstcharacter #1{\clf_thefirstcharacter{#1}}
-\unexpanded\def\theremainingcharacters#1{\clf_theremainingcharacters{#1}}
+\permanent\protected\def\getfirstcharacter #1{\clf_getfirstcharacter{#1}}
+\permanent\protected\def\doifelsefirstchar #1#2{\clf_doifelsefirstchar{#1}{#2}}
+\permanent\protected\def\thefirstcharacter #1{\clf_thefirstcharacter{#1}}
+\permanent\protected\def\theremainingcharacters#1{\clf_theremainingcharacters{#1}}
-\let\doiffirstcharelse\doifelsefirstchar
+\aliased\let\doiffirstcharelse\doifelsefirstchar
%D \macros
%D {doifinstringelse, doifincsnameelse}
@@ -1133,126 +1104,171 @@
%D We can check for the presence of a substring in a given sequence of characters.
%D
%D \starttyping
-%D \doifinsetelse {substring} {string} {then ...} {else ...}
+%D \doifinstringelse {substring} {string} {then ...} {else ...}
%D \stoptyping
+%D
+%D \startbuffer
+%D \doifinstringelse{abc}{foo bar abc}{Y}{N}=Y\par
+%D \doifinstringelse{abc}{foo bar cab}{Y}{N}=N\par
+%D \doifinstring {abc}{foo bar abc}{Y}=Y\par
+%D \doifinstring {abc}{foo bar cab}{Y}\par
+%D \doifnotinstring {abc}{foo bar abc}{Y}\par
+%D \doifnotinstring {abc}{foo bar cab}{Y}=Y\par
+%D \doifinstringelse{}{foo bar abc}{Y}{N}=N\par
+%D \doifinstring {}{foo bar abc}{N}\par
+%D \doifnotinstring {}{foo bar abc}{Y}=Y\par
+%D \doifinstringelse{x}{}{Y}{N}=N\par
+%D \doifinstring {x}{}{N}\par
+%D \doifnotinstring {x}{}{Y}=Y\par
+%D \doifinstringelse{}{}{Y}{N}=N\par
+%D \doifinstring {}{}{N}\par
+%D \doifnotinstring {}{}{Y}=Y\par
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
-\let\m_syst_sub_string\empty
-
-\unexpanded\def\doifelseinstring#1%
- {\edef\m_syst_sub_string{#1}% expand #1 here
- \ifx\m_syst_sub_string\empty
- \expandafter\thirdofthreearguments
- \else
- \expandafter\syst_helpers_do_if_in_string_else_indeed
- \fi}
-
-\let\doifinstringelse\doifelseinstring
+%D I keep the following as example code:
-\unexpanded\def\syst_helpers_do_if_in_string_else_indeed#1%
- {\syst_helpers_do_if_in_string_else\m_syst_sub_string{#1}%
+% \let\syst_helpers_do_do_if_in_string_else\relax
+% \let\syst_helpers_do_do_if_in_string \relax
+% \let\syst_helpers_do_do_if_not_in_string \relax
+%
+% \let\m_syst_sub_string \empty
+%
+% \protected\def\doifelseinstring#1%
+% {\edef\m_syst_sub_string{#1}% expand #1 here
+% \ifempty\m_syst_sub_string
+% \expandafter\thirdofthreearguments
+% \else
+% \expandafter\syst_helpers_do_if_in_string_else
+% \fi}
+%
+% \let\doifinstringelse\doifelseinstring
+%
+% \protected\def\syst_helpers_do_if_in_string_else#1% ##2 can be {abc}
+% {\normalexpanded{\protected\def\syst_helpers_do_do_if_in_string_else##1\m_syst_sub_string##2}%
+% {\ifarguments
+% \or
+% \expandafter\syst_helpers_do_if_in_string_else_nop
+% \or
+% \expandafter\syst_helpers_do_if_in_string_else_yes
+% \fi}%
+% \normalexpanded{\syst_helpers_do_do_if_in_string_else#1}\s!e_o_t_token\ignorearguments\ignorearguments}
+%
+% \protected\def\syst_helpers_do_if_in_string_else_delimited#1% ##2 can be {abc}
+% {\normalexpanded{\protected\def\syst_helpers_do_do_if_in_string_else##1,\m_syst_sub_string,##2}%
+% {\ifarguments
+% \or
+% \expandafter\syst_helpers_do_if_in_string_else_nop
+% \or
+% \expandafter\syst_helpers_do_if_in_string_else_yes
+% \fi}%
+% \normalexpanded{\syst_helpers_do_do_if_in_string_else,#1,}\s!e_o_t_token\ignorearguments\ignorearguments}
+%
+% \protected\def\doifinstring#1%
+% {\edef\m_syst_sub_string{#1}% expand #1 here
+% \ifempty\m_syst_sub_string
+% \expandafter\gobbletwoarguments
+% \else
+% \expandafter\syst_helpers_do_if_in_string
+% \fi}
+%
+% \protected\def\syst_helpers_do_if_in_string#1% ##2 can be {abc}
+% {\normalexpanded{\protected\def\syst_helpers_do_do_if_in_string##1\m_syst_sub_string##2}%
+% {\ifarguments
+% \or
+% \expandafter\syst_helpers_do_if_in_string_nop
+% \or
+% \expandafter\syst_helpers_do_if_in_string_yes
+% \fi}%
+% \normalexpanded{\syst_helpers_do_do_if_in_string#1}\s!e_o_t_token\ignorearguments\ignorearguments}
+%
+% \protected\def\doifnotinstring#1%
+% {\edef\m_syst_sub_string{#1}% expand #1 here
+% \ifempty\m_syst_sub_string
+% \expandafter\secondoftwoarguments
+% \else
+% \expandafter\syst_helpers_do_if_not_in_string
+% \fi}
+%
+% \protected\def\syst_helpers_do_if_not_in_string#1% ##2 can be {abc}
+% {\normalexpanded{\protected\def\syst_helpers_do_do_if_not_in_string##1\m_syst_sub_string##2}%
+% {\ifarguments
+% \or
+% \expandafter\syst_helpers_do_if_not_in_string_nop
+% \or
+% \expandafter\syst_helpers_do_if_not_in_string_yes
+% \fi}%
+% \normalexpanded{\syst_helpers_do_do_if_not_in_string#1}\s!e_o_t_token\ignorearguments\ignorearguments}
+%
+% \def\syst_helpers_do_if_in_string_else_yes#0\ignorearguments\ignorearguments#2#0{#2}
+% \def\syst_helpers_do_if_in_string_else_nop#0\ignorearguments#0#3{#3}
+% \def\syst_helpers_do_if_in_string_yes #0\ignorearguments\ignorearguments#2{#2}
+% \def\syst_helpers_do_if_in_string_nop #0\ignorearguments#0{}
+% \def\syst_helpers_do_if_not_in_string_yes #0\ignorearguments\ignorearguments#0{}
+% \def\syst_helpers_do_if_not_in_string_nop #0\ignorearguments#2{#2}
+
+\permanent\protected\def\doifelseinstring#1#2%
+ {\ifhasxtoks{#1}{#2}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifinstring#1%%
- {\edef\m_syst_sub_string{#1}% expand #1 here
- \ifx\m_syst_sub_string\empty
- \expandafter\gobbletwoarguments
- \else
- \expandafter\syst_helpers_do_if_in_string_indeed
- \fi}
-
-\unexpanded\def\syst_helpers_do_if_in_string_indeed#1%
- {\syst_helpers_do_if_in_string_else\m_syst_sub_string{#1}%
+\permanent\protected\def\doifinstring#1#2%
+ {\ifhasxtoks{#1}{#2}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotinstring#1%%
- {\edef\m_syst_sub_string{#1}% expand #1 here
- \ifx\m_syst_sub_string\empty
- \expandafter\gobbletwoarguments
- \else
- \expandafter\syst_helpers_do_if_not_in_string_indeed
- \fi}
-
-\unexpanded\def\syst_helpers_do_if_not_in_string_indeed#1%
- {\syst_helpers_do_if_in_string_else\m_syst_sub_string{#1}%
+\permanent\protected\def\doifnotinstring#1#2%
+ {\ifhasxtoks{#1}{#2}%
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-% replaces prev
-
-\unexpanded\def\syst_helpers_do_if_in_string_else#1#2% ##2 can be {abc}
- {\expandafter\def\expandafter\syst_helpers_do_do_if_in_string_else
- \expandafter##\expandafter1#1##2##3^^^^0004{\unless\if##2@}% expand #1 here
- \expandafter\syst_helpers_do_do_if_in_string_else\normalexpanded{#2#1}@@^^^^0004} % expand #2 here
-
-%D The next alternative proved to be upto twice as fast on tasks like checking
-%D reserved words in pretty verbatim typesetting! This is mainly due to the fact
-%D that passing (expanded) strings is much slower that passing a macro.
-%D
-%D \starttyping
-%D \doifincsnameelse {substring} {\string} {then ...} {else ...}
-%D \stoptyping
-%D
-%D Where \type {\doifinstringelse} does as much expansion as possible, the latter
-%D alternative does minimal (one level) expansion.
-
-\unexpanded\def\syst_helpers_do_if_in_csname_else#1#2%
- {\def\syst_helpers_do_do_if_in_csname_else##1#1##2##3^^^^0004%
- {\unless\if##2@}%
- \expandafter\syst_helpers_do_do_if_in_csname_else#2#1@@^^^^0004}
+\aliased\let\doifinstringelse\doifelseinstring
-\unexpanded\def\doifelseincsname#1#2%
- {\normalexpanded{\syst_helpers_do_if_in_csname_else{#1}}{#2}%
- \expandafter\firstoftwoarguments
- \else
- \expandafter\secondoftwoarguments
- \fi}
+%D The next one one of those variants that we used when speed was more of an issue
+%D that today. Now we just expand the lot. We just use an alias now:
-\let\doifincsnameelse\doifelseincsname
+\aliased\let\doifelseincsname\doifelseinstring
+\aliased\let\doifincsnameelse\doifinstringelse
%D \macros
%D {doifnumberelse,doifnumber,doifnotnumber}
%D
%D The next macro executes a command depending of the outcome of a test on numerals.
-%D This is probably one of the fastest test possible, exept from a less robust
-%D 10||step \type {\if}||ladder or some tricky \type {\lcode} checking.
-%D
-%D \starttyping
-%D \doifnumberelse {string} {then ...} {else ...}
-%D \stoptyping
-%D
-%D The macro accepts \type {123}, \type {abc}, \type {{}}, \type {\getal} and \type
-%D {\the\count...}. This macro is a rather dirty one.
+%D We now use a \LUATEX\ feature that permits a more robust checking, but you might
+%D want to take a look at the originals. It's typically one of these new features
+%D that probably only \CONTEXT\ will use, which is probably true for more such
+%D features that no one ever asked for (but they are pretty generic in nature
+%D anyway).
-\def\doifelsenumber#1%
+\permanent\def\doifelsenumber#1%
{\ifchknum#1\or
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\def\doifnumber#1%
+\permanent\def\doifnumber#1%
{\ifchknum#1\or
\expandafter\firstoftwoarguments
\else
\expandafter\gobbleoneargument
\fi}
-\def\doifnotnumber#1%
+\permanent\def\doifnotnumber#1%
{\ifchknum#1\or
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\let\doifnumberelse\doifelsenumber
+\aliased\let\doifnumberelse\doifelsenumber
%D \macros
%D {setpercentdimen}
@@ -1263,10 +1279,12 @@
%D \scratchdimen \percentdimen \hsize {10\letterpercent}
%D \stoptyping
-\def\percentdimen#1#2% dimen percentage (with %)
+% todo: use the push back dimen trickery
+
+\permanent\def\percentdimen#1#2% dimen percentage (with %)
{\dimexpr\clf_percentageof{#2}\dimexpr#1\relax}
-\unexpanded\def\setpercentdimen#1#2% dimen percentage (with %)
+\permanent\protected\def\setpercentdimen#1#2% dimen percentage (with %)
{#1=\clf_percentageof{#2}\dimexpr#1\relax}
%D \macros
@@ -1292,111 +1310,121 @@
%D
%D Spaces embedded in the list, for instance after commas, spoil the search process.
%D The gain in speed depends on the length of the argument (the longer the argument,
-%D the less we gain).
+%D the less we gain). The question is: do we still need these raw variants?
-\unexpanded\def\makerawcommalist[#1]#2% use \processnext ... here
- {\def\syst_helpers_do_make_raw_comma_list##1% we don't expand ##1
- {\ifx#2\empty
- \def#2{##1}%
- \else
- \expandafter\def\expandafter#2\expandafter{#2,##1}%
- \fi}%
- \let#2\empty
- \processcommalist[#1]\syst_helpers_do_make_raw_comma_list}
+\let\syst_helpers_do_make_raw_comma_list\gobbleoneargument
-\def\syst_helpers_raw_process_comma_item#1,#2% #2 eats up preceding space
- {\if]#1\else
- \csname\??nextcommalevel\the\commalevel\endcsname{#1}%
- \expandafter\syst_helpers_raw_process_comma_item
- \fi#2}
+\permanent\protected\def\makerawcommalist[#1]#2% use \processnext ... here
+ {\scratchtoks\emptytoks
+ \def\syst_helpers_do_make_raw_comma_list##1{\iftok\scratchtoks\emptytoks\scratchtoks{##1}\else\toksapp\scratchtoks{,##1}\fi}%
+ \processcommalist[#1]\syst_helpers_do_make_raw_comma_list
+ \edef#2{\the\scratchtoks}}
-\unexpanded\def\rawprocesscommalist[#1]#2% accepteert ook [\cs]
- {\global\advance\commalevel \plusone
- \expandafter\let\csname\??nextcommalevel\the\commalevel\endcsname#2%
- \expandafter\syst_helpers_raw_process_comma_item#1,],% \relax
- \global\advance\commalevel \minusone }
+% beware: in mkiv { } were lost so it was not compatible with the non raw
-\unexpanded\def\rawprocesscommacommand[#1]% not really needed
- {\normalexpanded{\rawprocesscommalist[#1]}}
+\aliased\let\rawprocesscommalist \processcommalist % can go
+\aliased\let\rawprocesscommacommand\processcommacommand % can go
-%D Here is one without nesting:
+%D Here is one without nesting .. still needed? Only used for modes (no nesting
+%D there).
-\unexpanded\def\syst_helpers_fast_process_comma_item#1,#2% #2 eats up preceding space
- {\if]#1\else
- \syst_helpers_fast_process_comma_command{#1}%
- \expandafter\syst_helpers_fast_process_comma_item
- \fi#2}
+\mutable\let\fastcommalistcommand\relax
+
+\protected\def\syst_helpers_process_fast_comma_item#1,%
+ {\ifarguments
+ \expandafter\syst_helpers_process_comma_item_gobble
+ \or
+ \fastcommalistcommand{#1}%
+ \expandafter\syst_helpers_process_fast_comma_item_next
+ \fi}
-\unexpanded\def\fastprocesscommalist[#1]#2% accepteert ook [\cs]
- {\let\syst_helpers_fast_process_comma_command#2%
- \expandafter\syst_helpers_fast_process_comma_item#1,],}% \relax
+\protected\def\syst_helpers_process_fast_comma_item_next
+ {\expandafterspaces\syst_helpers_process_fast_comma_item}
-\unexpanded\def\fastprocesscommacommand[#1]#2% accepteert ook [\cs]
- {\let\syst_helpers_fast_process_comma_command#2%
- \normalexpanded{\syst_helpers_fast_process_comma_item#1},],}% \relax
+\permanent\protected\def\fastprocesscommalist[#1]#2%
+ {\let\fastcommalistcommand#2%
+ \expandafterspaces\syst_helpers_process_fast_comma_item#1\ignorearguments\ignorearguments\ignorearguments}
+
+\permanent\protected\def\fastprocesscommacommand[#1]#2%
+ {\let\fastcommalistcommand#2%
+ \normalexpanded{\noexpand\expandafterspaces\syst_helpers_process_fast_comma_item#1}\ignorearguments\ignorearguments\ignorearguments}
% \def\rawdoifelseinset#1#2{\doifinstringelse{,#1,}{,#2,}}
% \def\rawdoifinset #1#2{\doifinstring {,#1,}{,#2,}}
-\def\m_syst_two_commas{,,}
+\def\syst_helpers_do_if_else_in_set#1%
+ {\ifhasxtoks{,\m_syst_sub_string,}{,#1,}%
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
-\unexpanded\def\rawdoifelseinset#1%
- {\edef\m_syst_sub_string{,#1,}% expand #1 here
- \ifx\m_syst_sub_string\m_syst_two_commas
+\permanent\protected\def\rawdoifelseinset#1%
+ {\edef\m_syst_sub_string{#1}% expand #1 here
+ \ifempty\m_syst_sub_string
\expandafter\thirdofthreearguments
\else
- \expandafter\syst_helpers_raw_do_if_in_set_else
+ \expandafter\syst_helpers_do_if_else_in_set
\fi}
-\let\rawdoifinsetelse\rawdoifinsetelse
+\aliased\let\rawdoifinsetelse\rawdoifelseinset
-\unexpanded\def\syst_helpers_raw_do_if_in_set_else#1%
- {\syst_helpers_do_if_in_string_else\m_syst_sub_string{,#1,}%
- \expandafter\firstoftwoarguments
+\def\syst_helpers_do_if_in_set#1%
+ {\ifhasxtoks{,\m_syst_sub_string,}{,#1,}%
+ \expandafter\firstofoneargument
\else
- \expandafter\secondoftwoarguments
+ \expandafter\gobbleoneargument
\fi}
-\unexpanded\def\rawdoifinset#1%
- {\edef\m_syst_sub_string{,#1,}% expand #1 here
+\permanent\protected\def\rawdoifinset#1% or just alias this one
+ {\edef\m_syst_sub_string{#1}% expand #1 here
\ifx\m_syst_sub_string\m_syst_two_commas
\expandafter\gobbletwoarguments
\else
- \expandafter\syst_helpers_raw_do_if_in_set
- \fi}
-
-\unexpanded\def\syst_helpers_raw_do_if_in_set#1%%
- {\syst_helpers_do_if_in_string_else\m_syst_sub_string{,#1,}%
- \expandafter\firstofoneargument
- \else
- \expandafter\gobbleoneargument
+ \expandafter\syst_helpers_do_if_in_set
\fi}
%D Some more raw material:
-\def\syst_helpers_do_raw_process_action[#1][#2]%
- {\def\syst_helpers_do_do_raw_process_action##1,#1=>##2,##3^^^^0004%
- {\if##3@\else
- \def\m_syst_helpers_process_action{##2}%
- \fi}%
- \syst_helpers_do_do_raw_process_action,#2,#1=>,@^^^^0004}
-
-\unexpanded\def\rawprocessaction[#1]#2[#3]%
- {\edef\m_syst_string_one{#1}%
- \edef\m_syst_string_two{undefined}% better \!!undefined
- \let\m_syst_helpers_process_action\m_syst_string_two
- \ifx\m_syst_string_one\empty
- \expandafter\syst_helpers_do_raw_process_action\expandafter[\s!default][#3]%
- \else
- \expandafter\syst_helpers_do_raw_process_action\expandafter[\m_syst_string_one][#3]%
- \ifx\m_syst_helpers_process_action\m_syst_string_two
- \expandafter\syst_helpers_do_raw_process_action\expandafter[\s!unknown][#3]%
- \fi
- \fi
- \ifx\m_syst_helpers_process_action\m_syst_string_two
- \else
- \m_syst_helpers_process_action
- \fi}
+% probably never used
+%
+% \def\syst_helpers_raw_process_action#1=>#2,%
+% {\ifarguments
+% %\expandafter\syst_helpers_raw_process_action_gobble
+% \or
+% \expandafter\syst_helpers_raw_process_action_gobble
+% \or
+% \edef\m_syst_string_two{#1}%
+% \ifx\m_syst_string_one\m_syst_string_two
+% \def\m_syst_helpers_process_action{#2}%
+% \expandafter\expandafter\expandafter\syst_helpers_raw_process_action_gobble
+% \else
+% \ifx\s!unknown\m_syst_string_two
+% \def\m_syst_helpers_process_action_unknown{#2}%
+% \fi
+% \expandafter\expandafter\expandafter\syst_helpers_raw_process_action_next
+% \fi
+% \fi}
+%
+% \def\syst_helpers_raw_process_action_gobble#-\ignorearguments
+% {}
+%
+% \def\syst_helpers_raw_process_action_next
+% {\expandafterspaces\syst_helpers_raw_process_action}
+%
+% \permanent\protected\def\xrawprocessaction[#1]#*[#2]%
+% {\edef\m_syst_string_one{#1}%
+% \ifempty\m_syst_string_one
+% \let\m_syst_string_one\s!default
+% \fi
+% \let\m_syst_helpers_process_action\relax
+% \let\m_syst_helpers_process_action_unknown\relax
+% \syst_helpers_raw_process_action#2\ignorearguments\ignorearguments\ignorearguments
+% \ifrelax\m_syst_helpers_process_action
+% \m_syst_helpers_process_action_unknown
+% \else
+% \m_syst_helpers_process_action
+% \fi}
%D When we process the list \type {a,b,c,d,e}, the raw routine takes over 30\% less
%D time, when we feed $20+$ character strings we gain about 20\%. Alternatives which
@@ -1421,23 +1449,12 @@
%D These macros are in fact auxiliary ones and are not meant for use outside the
%D assignment macros.
-\def\dosetvalue#1#2% #3
- {\expandafter\def\csname#1#2\endcsname} % {#3}}
-
-\def\dosetevalue#1#2% #3
- {\expandafter\edef\csname#1#2\endcsname} % {#3}}
-
-\def\dosetgvalue#1#2% #3
- {\expandafter\gdef\csname#1#2\endcsname} % {#3}}
-
-\def\doresetvalue#1#2%
- {\expandafter\let\csname#1#2\endcsname\empty}
-
-\def\doignorevalue#1#2#3%
- {\expandafter\let\csname#1#2\endcsname\empty}
-
-\def\docopyvalue#1#2#3%
- {\expandafter\def\csname#1#3\endcsname{\csname#2#3\endcsname}}
+\def\dosetvalue #1#2{\defcsname #1#2\endcsname} % takes #3
+\def\dosetevalue #1#2{\edefcsname #1#2\endcsname} % takes #3
+\def\dosetgvalue #1#2{\global\edefcsname#1#2\endcsname} % takes #3
+\def\doresetvalue #1#2{\letcsname #1#2\endcsname\empty}
+\def\doignorevalue#1#2#3{\letcsname #1#2\endcsname\empty}
+\def\docopyvalue #1#2#3{\defcsname #1#3\endcsname{\csname#2#3\endcsname}}
%D \macros
%D {doassign,undoassign,doassignempty}
@@ -1471,10 +1488,10 @@
%D will redefine this macro later on, when a more advanced message mechanism is
%D implemented.
-\unexpanded\def\showassignerror#1#2%
+\protected\def\showassignerror#1#2%
{\writestatus{setup}{missing or ungrouped '=' after '#1' in line #2}}
-\unexpanded\def\doassignempty[#1][#2=#3]%
+\permanent\protected\def\doassignempty[#1][#2=#3]% kind of obsolete
{\ifcsname#1#2\endcsname\else\dosetvalue{#1}{#2}{#3}\fi}
%D \macros
@@ -1542,70 +1559,65 @@
%D funny to see that this alternative saw the light so lately --- can be used to do
%D expanded assigments.
-\let\currentvalue\empty
+% \mutable\let\currentvalue\empty % only mkii
-\unexpanded\def\getparameters {\dogetparameters\dosetvalue}
-\unexpanded\def\geteparameters {\dogetparameters\dosetevalue}
-\unexpanded\def\getgparameters {\dogetparameters\dosetgvalue}
-\unexpanded\def\getxparameters {\dogetparameters\dosetxvalue}
-\unexpanded\def\forgetparameters{\dogetparameters\doignorevalue}
+\permanent\protected\def\getparameters {\dogetparameters\dosetvalue}
+\permanent\protected\def\geteparameters {\dogetparameters\dosetevalue}
+\permanent\protected\def\getgparameters {\dogetparameters\dosetgvalue}
+\permanent\protected\def\getxparameters {\dogetparameters\dosetxvalue}
+\permanent\protected\def\forgetparameters{\dogetparameters\doignorevalue}
-\let\getexpandedparameters\geteparameters
+\aliased\let\getexpandedparameters\geteparameters
-\unexpanded\def\dogetparameters#1[#2]#3[#4%
- {\if\noexpand#4]%
- \expandafter\gobbleoneargument
- \else
- \let\setsomevalue#1%
- \def\syst_helpers_get_parameters_assign{\syst_helpers_get_parameters_assign_indeed#2}%
- \expandafter\syst_helpers_get_parameters
- \fi#4}
-
-\def\syst_helpers_get_parameters#1]%
- {\xprocesscommaitem#1,],^^^^0004}
-
-\def\syst_helpers_process_comma_item#1,#2% #2 takes space before ,
- {\if,#1,% dirty trick for testing #1=empty
- \expandafter\syst_helpers_process_comma_item
- \orelse\if]#1%
- \expandafter\gobbleoneargument
- \else
- \syst_helpers_get_parameters_assign^^^^0004#1==\empty^^^^0004%
- \expandafter\syst_helpers_process_comma_item
- \fi#2}
-
-\def\syst_helpers_assign_error#1#2#3%
- {\showassignerror{#2}{\the\inputlineno\space(#1)}}
-
-\def\syst_helpers_get_parameters_assign_normal#1^^^^0004#2=#3=#4#5^^^^0004%
- {\ifx\empty#2\empty
- \expandafter\syst_helpers_assign_error
- \orelse\ifx#4\empty
- \expandafter\syst_helpers_assign_error
- \else
- \expandafter\setsomevalue
- \fi
- {#1}{#2}{#3}}
-
-\def\syst_helpers_get_parameters_assign_error#1^^^^0004#2=#3=#4#5^^^^0004%
- {\ifx\empty#2\empty
- \expandafter\syst_helpers_assign_error
- \orelse\ifx#4\empty
- \expandafter\syst_helpers_assign_error
- \orelse\ifcsname#1#2\endcsname
- \expandafter\let\expandafter\currentvalue\csname#1#2\endcsname
- \expandafter\setsomevalue
+\def\syst_helpers_grab_parameter_error#1%
+ {\showassignerror{#1}{\the\inputlineno\space(\m_syst_parameter_n)}}
+
+\def\syst_helpers_grab_parameter#1,%
+ {\ifarguments
+ % done
\else
- \let\currentvalue\empty
- \expandafter\setsomevalue
- \fi
- {#1}{#2}{#3}}
+ \syst_helpers_grab_parameter_okay#1,\ignorearguments
+ \expandafter\syst_helpers_grab_parameter_next
+ \fi}
+
+\def\syst_helpers_grab_parameter_okay#1=#2,%
+ {\ifarguments
+ \or
+ \syst_helpers_grab_parameter_error{#1}%
+ \or
+ \m_syst_parameter_s\m_syst_parameter_n{#1}{#2}%
+ \fi}
+
+\def\syst_helpers_grab_parameter_next
+ {\expandafterspaces\syst_helpers_grab_parameter}
+
+\permanent\protected\def\dogetparameters#1[#2]#*[#3]%
+ {\def\m_syst_parameter_n{#2}%
+ \let\m_syst_parameter_s#1%
+ \expandafterspaces\syst_helpers_grab_parameter#3\ignorearguments\ignorearguments}
+
+%D \macros
+%D {getemptyparameters}
+%D
+%D Sometimes we explicitly want variables to default to an empty string, so we
+%D welcome:
+%D
+%D \starttyping
+%D \getemptyparameters [label] [...=...,...=...]
+%D \stoptyping
-\let\syst_helpers_get_parameters_assign_indeed\syst_helpers_get_parameters_assign_normal
+\let\syst_helpers_get_empty_parameters\gobbleoneargument
-\unexpanded\def\doassign [#1][#2]{\let\setsomevalue\dosetvalue \syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
-\unexpanded\def\doeassign [#1][#2]{\let\setsomevalue\dosetevalue \syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
-\unexpanded\def\undoassign[#1][#2]{\let\setsomevalue\doresetvalue\syst_helpers_get_parameters_assign_indeed#1^^^^0004#2==\empty^^^^0004}
+\permanent\protected\def\getemptyparameters[#1]#*[#2]%
+ {\def\syst_helpers_get_empty_parameters##1{\doassignempty[#1][##1]}%
+ \processcommalist[#2]\syst_helpers_get_empty_parameters}
+
+%D We now just alias these as there is no need for a speedup. These have not been used
+%D for a long time in core code.
+
+\aliased\let\doassign \getparameters % obsolete, these will go
+\aliased\let\doeassign \geteparameters % obsolete, these will go
+\aliased\let\undoassign\forgetparameters % obsolete, these will go
%D \macros
%D {processassignmentlist,processassignmentcommand,
@@ -1621,22 +1633,33 @@
%D We can optimize this one if needed but it's not a core macro so hardly worth the
%D trouble and tokens.
-\unexpanded\def\processassignmentlist[#1]#2% #2 == \command{key}{value]
- {\def\syst_helpers_process_assignment_entry##1{#2}% {##2}{##3} % namespace is ignored
- \dogetparameters\syst_helpers_process_assignment_entry[][#1]}
+\mutable\let\currentassignmentlistcommand\gobbletwoarguments
+\mutable\let\currentassignmentlistkey \empty
+\mutable\let\currentassignmentlistvalue \empty
+
+\let\syst_helpers_process_assign_entry\gobbleoneargument
-\unexpanded\def\processassignmentcommand[#1]%
+\permanent\protected\def\processassignmentlist[#1]#2% #2 == \command{key}{value]
+ {\def\syst_helpers_process_assign_entry##1{#2}% {##2}{##3} % namespace is ignored
+ \dogetparameters\syst_helpers_process_assign_entry[][#1]}
+
+\permanent\protected\def\processassignmentcommand[#1]%
{\normalexpanded{\processassignmentlist[#1]}}
-\unexpanded\def\startprocessassignmentlist[#1]#2\stopprocessassignmentlist
+\permanent\protected\def\startprocessassignmentlist[#1]#2\stopprocessassignmentlist
{\def\currentassignmentlistcommand##1##2{\def\currentassignmentlistkey{##1}\def\currentassignmentlistvalue{##2}#2}%
\processassignmentlist[#1]\currentassignmentlistcommand}
-\unexpanded\def\startprocessassignmentcommand[#1]#2\stopprocessassignmentcommand
+\aliased\let\stopprocessassignmentlist\relax
+
+\permanent\protected\def\startprocessassignmentcommand[#1]#2\stopprocessassignmentcommand
{\def\currentassignmentlistcommand##1##2{\def\currentassignmentlistkey{##1}\def\currentassignmentlistvalue{##2}#2}%
\normalexpanded{\processassignmentlist[#1]}\currentassignmentlistcommand}
-%D \macros{currentvalue}
+\aliased\let\stopprocessassignmentcommand\relax
+
+%D \macros
+%D {currentvalue}
%D
%D Just in case a \type{\getparameter} argument itself ends up inside a \type
%D {\write} or other expandable location, our new macro needs a default value.
@@ -1650,60 +1673,6 @@
%D \stoptyping
%D \macros
-%D {expandparameters}
-%D
-%D Example usage:
-%D
-%D \startbuffer
-%D \getparameters[taco][name=taco]
-%D \convertcommand\taconame\to\ascii \ascii
-%D \expandparameters \getparameters[taco][name=\currentvalue\space hoekwater]
-%D \convertcommand\taconame\to\ascii \ascii
-%D \getparameters[taco][name=\currentvalue\space hoekwater]
-%D \convertcommand\taconame\to\ascii \ascii
-%D \stopbuffer
-%D
-%D \typebuffer
-%D \startlines
-%D \getbuffer
-%D \stoplines
-%D
-%D Here we hook in the code (beware, this is the optimized get **):
-
-\def\syst_helpers_get_parameters_normal#1]%
- {\syst_helpers_process_comma_item#1,],^^^^0004}
-
-\def\syst_helpers_get_parameters_expanded#1]%
- {\let\dosetnvalue\setsomevalue
- \let\setsomevalue\dosetevalue
- \let\syst_helpers_get_parameters_assign_indeed\syst_helpers_get_parameters_assign_error
- \let\setsomevalue\dosetevalue
- \syst_helpers_process_comma_item#1,],^^^^0004%
- \let\syst_helpers_get_parameters_assign_indeed\syst_helpers_get_parameters_assign_normal
- \let\setsomevalue\dosetnvalue
- \let\syst_helpers_get_parameters\syst_helpers_get_parameters_normal
- \let\currentvalue\empty}
-
-\let\syst_helpers_get_parameters\syst_helpers_get_parameters_normal % **
-
-\unexpanded\def\expandparameters
- {\let\syst_helpers_get_parameters\syst_helpers_get_parameters_expanded}
-
-%D \macros
-%D {getemptyparameters}
-%D
-%D Sometimes we explicitly want variables to default to an empty string, so we
-%D welcome:
-%D
-%D \starttyping
-%D \getemptyparameters [label] [...=...,...=...]
-%D \stoptyping
-
-\unexpanded\def\getemptyparameters[#1]#2[#3]%
- {\def\syst_helpers_get_empty_parameters##1{\doassignempty[#1][##1]}%
- \processcommalist[#3]\syst_helpers_get_empty_parameters}
-
-%D \macros
%D {copyparameters}
%D
%D Some \CONTEXT\ commands take their default setups from others. All commands that
@@ -1732,31 +1701,30 @@
%D By using \type {\docopyvalue} we've prepared this command for use in a
%D multi||lingual environment.
-\unexpanded\def\copyparameters[#1]#2[#3]#4[#5]%
- {\doifnot{#1}{#3}
- {\def\syst_helpers_copy_parameter{\docopyvalue{#1}{#3}}% ##1
- \processcommalist[#5]\syst_helpers_copy_parameter}}
-
-%D \macros
-%D {ifparameters,checkparameters}
-%D
-%D A slightly different one is \type {\checkparameters}, which also checks on the
-%D presence of a~\type {=}.
-%D
-%D The boolean \type {\ifparameters} can be used afterwards. Combining both in one
-%D \type {\if}||macro would lead to problems with nested \type {\if}'s.
-%D
-%D \starttyping
-%D \checkparameters[argument]
-%D \stoptyping
-
-\newif\ifparameters
-
-\def\syst_helpers_check_parameters#1=#2#3^^^^0004%
- {\if#2^^^^0003\parametersfalse\else\parameterstrue\fi}
-
-\unexpanded\def\checkparameters[#1]%
- {\syst_helpers_check_parameters#1=^^^^0003^^^^0003^^^^0004}
+\let\syst_helpers_copy_parameter\relax
+
+\permanent\protected\def\copyparameters[#1]#*[#2]#*[#3]%
+ {\doifnot{#1}{#2}
+ {\def\syst_helpers_copy_parameter{\docopyvalue{#1}{#2}}% ##1
+ \processcommalist[#3]\syst_helpers_copy_parameter}}
+
+% %D \macros
+% %D {ifparameters,checkparameters}
+% %D
+% %D A slightly different one is \type {\checkparameters}, which also checks on the
+% %D presence of a~\type {=}.
+% %D
+% %D The boolean \type {\ifparameters} can be used afterwards. Combining both in one
+% %D \type {\if}||macro would lead to problems with nested \type {\if}'s.
+% %D
+% %D \starttyping
+% %D \checkparameters[argument]
+% %D \stoptyping
+%
+% \newif\ifparameters
+%
+% \protected\def\checkparameters[#1]%
+% {\ifhastok={#1}\parameterstrue\else\parametersfalse\fi}
%D \macros
%D {getfromcommalist,getfromcommacommand,
@@ -1787,37 +1755,55 @@
\newcount\commalistcounter
-\def\commalistsize{0}
+\mutable\def\commalistsize{0}
+
+\def\syst_helpers_get_comma_list_size#0,% no #- as we need to count
+ {\ifarguments\or
+ \advance\commalistcounter\plusone
+ \expandafter\syst_helpers_get_comma_list_size
+ \fi}
-\def\syst_helpers_get_comma_list_size#1%
- {\advance\commalistcounter\plusone}
+\permanent\protected\def\getcommalistsize[%
+ {\futureexpand]\syst_helpers_get_comma_list_size_nop\syst_helpers_get_comma_list_size_yes}
-\unexpanded\def\getcommalistsize#1]% don't loose [{#1}]
+\def\syst_helpers_get_comma_list_size_yes#+]%
{\commalistcounter\zerocount
- \processcommalist#1]\syst_helpers_get_comma_list_size % was [{#1}]
+ \syst_helpers_get_comma_list_size #1,\ignorearguments\ignorearguments
\edef\commalistsize{\the\commalistcounter}}
-% \def\getcommacommandsize[#1]%
-% {\edef\commacommand{#1}%
-% \scratchtoks\expandafter{\expandafter[\commacommand]}%
-% \expandafter\getcommalistsize\the\scratchtoks }
+\def\syst_helpers_get_comma_list_size_nop]%
+ {\commalistcounter\zerocount
+ \let\commalistsize\!!zerocount}
-\unexpanded\def\getcommacommandsize[#1]%
+\permanent\protected\def\getcommacommandsize[#1]%
{\normalexpanded{\getcommalistsize[#1]}}
-\def\syst_helpers_get_from_comma_list#1%
- {\advance\commalistcounter \minusone
- \ifcase\commalistcounter
- \def\commalistelement{#1}%
- \expandafter\quitcommalist
+%D Filters:
+
+% \def\syst_helpers_gobble_comma_list#0\ignorearguments{}
+
+\def\syst_helpers_gobble_comma_list#-\ignorearguments{}
+
+\def\syst_helpers_get_from_comma_list#1,%
+ {\ifarguments \or
+ \advance\commalistcounter \minusone
+ \ifcase\commalistcounter
+ \def\commalistelement{#1}%
+ \expandafter\expandafter\expandafter\syst_helpers_gobble_comma_list
+ \else
+ \expandafter\expandafter\expandafter\syst_helpers_get_from_comma_list_next
+ \fi
\fi}
-\unexpanded\def\getfromcommalist[#1]#2[#3]%
+\def\syst_helpers_get_from_comma_list_next
+ {\expandafterspaces\syst_helpers_get_from_comma_list}
+
+\permanent\protected\def\getfromcommalist[#1]#*[#2]%
{\let\commalistelement\empty
- \commalistcounter#3\relax
- \processcommalist[#1]\syst_helpers_get_from_comma_list}
+ \commalistcounter#2\relax
+ \expandafterspaces\syst_helpers_get_from_comma_list#1\ignorearguments\ignorearguments}
-\unexpanded\def\getfromcommacommand[#1]%
+\permanent\protected\def\getfromcommacommand[#1]%
{\normalexpanded{\getfromcommalist[#1]}}
%D Watertight (and efficient) solutions are hard to find, due to the handling of
@@ -1846,17 +1832,19 @@
%D {dogetcommalistelement,dogetcommacommandelement}
%D
%D For low level (fast) purposes, we can also use the next alternative, which can
-%D handle 8~elements at most.
+%D handle 9~elements at most.
%D
%D \starttyping
%D \dogetcommalistelement1\from a,b,c\to\commalistelement
%D \stoptyping
-\def\syst_helpers_get_comma_list_element#1\from#2,#3,#4,#5,#6,#7,#8\to#9%
- {\edef#9{\ifcase#1\relax\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}}
+\def\syst_helpers_get_comma_list_element#1,#2,#3,#4,#5,#6,#7,#8,#9,%
+ {\ifcase\scratchcounter\or#1\or#2\or#3\or#4\or#5\or#6\or#7\or#8\or#9\fi
+ \syst_helpers_gobble_comma_list}
-\def\dogetcommacommandelement#1\from#2\to%
- {\expandafter\syst_helpers_get_comma_list_element\expandafter#1\expandafter\from#2,,,,,,\to}
+\permanent\protected\def\dogetcommacommandelement#1\from#2\to#3%
+ {\scratchcounter#1\relax
+ \edef#3{\normalexpanded{\syst_helpers_get_comma_list_element#2\ignorearguments\ignorearguments}}}
%D \macros
%D {dosingleargument,dodoubleargument,dotripleargument,
@@ -1868,27 +1856,27 @@
%D arguments. Forgive me the funny names.
%D
%D \starttyping
-%D \dosingleargument\commando = \commando[#1]
-%D \dodoubleargument\commando = \commando[#1][#2]
-%D \dotripleargument\commando = \commando[#1][#2][#3]
-%D \doquadrupleargument\commando = \commando[#1][#2][#3][#4]
-%D \doquintupleargument\commando = \commando[#1][#2][#3][#4][#5]
-%D \dosixtupleargument\commando = \commando[#1][#2][#3][#4][#5][#6]
-%D \doseventupleargument\command = \commando[#1][#2][#3][#4][#5][#6][#7]
+%D \dosingleargument \command = \command[#1]
+%D \dodoubleargument \command = \command[#1][#2]
+%D \dotripleargument \command = \command[#1][#2][#3]
+%D \doquadrupleargument \command = \command[#1][#2][#3][#4]
+%D \doquintupleargument \command = \command[#1][#2][#3][#4][#5]
+%D \dosixtupleargument \command = \command[#1][#2][#3][#4][#5][#6]
+%D \doseventupleargument\command = \command[#1][#2][#3][#4][#5][#6][#7]
%D \stoptyping
%D
-%D These macros are used in the following way:
+%D These macros can be used in the following way:
%D
%D \starttyping
%D \def\dosetupsomething[#1][#2]%
%D {... #1 ... #2 ...}
%D
-%D \unexpanded\def\setupsomething
+%D \protected\def\setupsomething
%D {\dodoubleargument\dosetupsomething}
%D \stoptyping
%D
-%D The implementation can be surprisingly simple and needs no
-%D further explanation, like:
+%D The implementation can be surprisingly simple and needs no further explanation,
+%D like:
%D
%D \starttyping
%D \def\dosingleargument#1[#2]%
@@ -1917,6 +1905,8 @@
%D We use some signals for telling the calling macros if all wanted arguments are
%D indeed supplied by the user.
+\newcount\nofarguments
+
\newif\iffirstargument
\newif\ifsecondargument
\newif\ifthirdargument
@@ -1953,349 +1943,436 @@
%D Depending of the generousity of the user. Afterwards one can use the \type
%D {\if...argument} boolean. For novice: watch the stepwise doubling of \type {#}'s.
+%D NB : experimental versions in cont-exp.mkiv
+
%D Common:
\newtoks\t_syst_aux
-\def\syst_helpers_single_empty_one_yes {\firstargumenttrue \the\t_syst_aux}
-\def\syst_helpers_double_empty_two_yes {\secondargumenttrue \the\t_syst_aux}
-\def\syst_helpers_triple_empty_three_yes {\thirdargumenttrue \the\t_syst_aux}
-\def\syst_helpers_quadruple_empty_four_yes {\fourthargumenttrue \the\t_syst_aux}
-\def\syst_helpers_quintuple_empty_five_yes {\fifthargumenttrue \the\t_syst_aux}
-\def\syst_helpers_sixtuple_empty_six_yes {\sixthargumenttrue \the\t_syst_aux}
-\def\syst_helpers_seventuple_empty_seven_yes{\seventhargumenttrue\the\t_syst_aux}
-
-%D Single:
-
-\unexpanded\def\dosingleempty#1%
- {%syst_helpers_argument_reset
- \t_syst_aux{#1}%
- \futureexpand[\syst_helpers_single_empty_one_yes\syst_helpers_single_empty_one_nop}
-
-\def\syst_helpers_single_empty_one_nop
- {\firstargumentfalse
- \the\t_syst_aux[]}
-
-%D Double
-
-\unexpanded\def\dodoubleempty#1%
- {%syst_helpers_argument_reset
- \t_syst_aux{#1}%
- \futureexpand[\syst_helpers_double_empty_one_yes\syst_helpers_double_empty_one_nop}
-
-\def\syst_helpers_double_empty_one_yes[#1]%
- {\firstargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_double_empty_two_yes\syst_helpers_double_empty_two_nop}
-
-\def\syst_helpers_double_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \the\t_syst_aux[][]}
-
-\def\syst_helpers_double_empty_two_nop
- {\secondargumentfalse
- \the\t_syst_aux[]}
-
-% Triple
-
-\unexpanded\def\dotripleempty#1%
- {%syst_helpers_argument_reset
- \t_syst_aux{#1}%
- \futureexpand[\syst_helpers_triple_empty_one_yes\syst_helpers_triple_empty_one_nop}
-
-\def\syst_helpers_triple_empty_one_yes[#1]%
- {\firstargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_triple_empty_two_yes\syst_helpers_triple_empty_two_nop}
-
-\def\syst_helpers_triple_empty_two_yes[#1]%
- {\secondargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_triple_empty_three_yes\syst_helpers_triple_empty_three_nop}
-
-\def\syst_helpers_triple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \the\t_syst_aux[][][]}
-
-\def\syst_helpers_triple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \the\t_syst_aux[][]}
-
-\def\syst_helpers_triple_empty_three_nop
- {\thirdargumentfalse
- \the\t_syst_aux[]}
-
-%D Quadruple:
-
-\unexpanded\def\doquadrupleempty#1%
- {%syst_helpers_argument_reset
- \t_syst_aux{#1}%
- \futureexpand[\syst_helpers_quadruple_empty_one_yes\syst_helpers_quadruple_empty_one_nop}
-
-\def\syst_helpers_quadruple_empty_one_yes[#1]%
- {\firstargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_quadruple_empty_two_yes\syst_helpers_quadruple_empty_two_nop}
-
-\def\syst_helpers_quadruple_empty_two_yes[#1]%
- {\secondargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_quadruple_empty_three_yes\syst_helpers_quadruple_empty_three_nop}
-
-\def\syst_helpers_quadruple_empty_three_yes[#1]%
- {\thirdargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_quadruple_empty_four_yes\syst_helpers_quadruple_empty_four_nop}
-
-\def\syst_helpers_quadruple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \the\t_syst_aux[][][][]}
-
-\def\syst_helpers_quadruple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \the\t_syst_aux[][][]}
-
-\def\syst_helpers_quadruple_empty_three_nop
- {\thirdargumentfalse
- \fourthargumentfalse
- \the\t_syst_aux[][]}
-
-\def\syst_helpers_quadruple_empty_four_nop
- {\fourthargumentfalse
- \the\t_syst_aux[]}
-
-%D Quintuple:
-
-\unexpanded\def\doquintupleempty#1%
- {%syst_helpers_argument_reset
- \t_syst_aux{#1}%
- \futureexpand[\syst_helpers_quintuple_empty_one_yes\syst_helpers_quintuple_empty_one_nop}
-
-\def\syst_helpers_quintuple_empty_one_yes[#1]%
- {\firstargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_quintuple_empty_two_yes\syst_helpers_quintuple_empty_two_nop}
-
-\def\syst_helpers_quintuple_empty_two_yes[#1]%
- {\secondargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_quintuple_empty_three_yes\syst_helpers_quintuple_empty_three_nop}
-
-\def\syst_helpers_quintuple_empty_three_yes[#1]%
- {\thirdargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_quintuple_empty_four_yes\syst_helpers_quintuple_empty_four_nop}
-
-\def\syst_helpers_quintuple_empty_four_yes[#1]%
- {\fourthargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_quintuple_empty_five_yes\syst_helpers_quintuple_empty_five_nop}
-
-\def\syst_helpers_quintuple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux[][][][][]}
-
-\def\syst_helpers_quintuple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux[][][][]}
-
-\def\syst_helpers_quintuple_empty_three_nop
- {\thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux[][][]}
-
-\def\syst_helpers_quintuple_empty_four_nop
- {\fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux[][]}
-
-\def\syst_helpers_quintuple_empty_five_nop
- {\fifthargumentfalse
- \the\t_syst_aux[]}
-
-%D Sixtuple:
-
-\unexpanded\def\dosixtupleempty#1%
- {%syst_helpers_argument_reset
- \t_syst_aux{#1}%
- \futureexpand[\syst_helpers_sixtuple_empty_one_yes\syst_helpers_sixtuple_empty_one_nop}
-
-\def\syst_helpers_sixtuple_empty_one_yes[#1]%
- {\firstargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_sixtuple_empty_two_yes\syst_helpers_sixtuple_empty_two_nop}
-
-\def\syst_helpers_sixtuple_empty_two_yes[#1]%
- {\secondargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_sixtuple_empty_three_yes\syst_helpers_sixtuple_empty_three_nop}
-
-\def\syst_helpers_sixtuple_empty_three_yes[#1]%
- {\thirdargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_sixtuple_empty_four_yes\syst_helpers_sixtuple_empty_four_nop}
-
-\def\syst_helpers_sixtuple_empty_four_yes[#1]%
- {\fourthargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_sixtuple_empty_five_yes\syst_helpers_sixtuple_empty_five_nop}
-
-\def\syst_helpers_sixtuple_empty_five_yes[#1]%
- {\fifthargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_sixtuple_empty_six_yes\syst_helpers_sixtuple_empty_six_nop}
-
-\def\syst_helpers_sixtuple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \the\t_syst_aux[][][][][][]}
-
-\def\syst_helpers_sixtuple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \the\t_syst_aux[][][][][]}
-
-\def\syst_helpers_sixtuple_empty_three_nop
- {\thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \the\t_syst_aux[][][][]}
-
-\def\syst_helpers_sixtuple_empty_four_nop
- {\fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \the\t_syst_aux[][][]}
-
-\def\syst_helpers_sixtuple_empty_five_nop
- {\fifthargumentfalse
- \sixthargumentfalse
- \the\t_syst_aux[][]}
-
-\def\syst_helpers_sixtuple_empty_six_nop
- {\sixthargumentfalse
- \the\t_syst_aux[]}
-
-%D Seventuple:
-
-\unexpanded\def\doseventupleempty#1%
- {%syst_helpers_argument_reset
- \t_syst_aux{#1}%
- \futureexpand[\syst_helpers_seventuple_empty_one_yes\syst_helpers_seventuple_empty_one_nop}
-
-\def\syst_helpers_seventuple_empty_one_yes[#1]%
- {\firstargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_seventuple_empty_two_yes\syst_helpers_seventuple_empty_two_nop}
-
-\def\syst_helpers_seventuple_empty_two_yes[#1]%
- {\secondargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_seventuple_empty_three_yes\syst_helpers_seventuple_empty_three_nop}
-
-\def\syst_helpers_seventuple_empty_three_yes[#1]%
- {\thirdargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_seventuple_empty_four_yes\syst_helpers_seventuple_empty_four_nop}
-
-\def\syst_helpers_seventuple_empty_four_yes[#1]%
- {\fourthargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_seventuple_empty_five_yes\syst_helpers_seventuple_empty_five_nop}
-
-\def\syst_helpers_seventuple_empty_five_yes[#1]%
- {\fifthargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_seventuple_empty_six_yes\syst_helpers_seventuple_empty_six_nop}
-
-\def\syst_helpers_seventuple_empty_six_yes[#1]%
- {\sixthargumenttrue
- \toksapp\t_syst_aux{[{#1}]}%
- \futureexpand[\syst_helpers_seventuple_empty_seven_yes\syst_helpers_seventuple_empty_seven_nop}
-
-\def\syst_helpers_seventuple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \seventhargumentfalse
- \the\t_syst_aux[][][][][][][]}
-
-\def\syst_helpers_seventuple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \seventhargumentfalse
- \the\t_syst_aux[][][][][][]}
-
-\def\syst_helpers_seventuple_empty_three_nop
- {\thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \seventhargumentfalse
- \the\t_syst_aux[][][][][]}
-
-\def\syst_helpers_seventuple_empty_four_nop
- {\fourthargumentfalse
- \fifthargumentfalse
- \sixthargumentfalse
- \seventhargumentfalse
- \the\t_syst_aux[][][][]}
-
-\def\syst_helpers_seventuple_empty_five_nop
- {\fifthargumentfalse
- \sixthargumentfalse
- \seventhargumentfalse
- \the\t_syst_aux[][][]}
-
-\def\syst_helpers_seventuple_empty_six_nop
- {\sixthargumentfalse
- \seventhargumentfalse
- \the\t_syst_aux[][]}
-
-\def\syst_helpers_seventuple_empty_seven_nop
- {\seventhargumentfalse
- \the\t_syst_aux[]}
+% \def\syst_helpers_single_empty_one_yes {\firstargumenttrue \the\t_syst_aux}
+% \def\syst_helpers_double_empty_two_yes {\secondargumenttrue \the\t_syst_aux}
+% \def\syst_helpers_triple_empty_three_yes {\thirdargumenttrue \the\t_syst_aux}
+% \def\syst_helpers_quadruple_empty_four_yes {\fourthargumenttrue \the\t_syst_aux}
+% \def\syst_helpers_quintuple_empty_five_yes {\fifthargumenttrue \the\t_syst_aux}
+% \def\syst_helpers_sixtuple_empty_six_yes {\sixthargumenttrue \the\t_syst_aux}
+% \def\syst_helpers_seventuple_empty_seven_yes{\seventhargumenttrue\the\t_syst_aux}
+%
+% %D Single:
+%
+% \protected\def\dosingleempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand[\syst_helpers_single_empty_one_yes\syst_helpers_single_empty_one_nop}
+%
+% \def\syst_helpers_single_empty_one_nop
+% {\firstargumentfalse
+% \the\t_syst_aux[]}
+%
+% %D Double
+%
+% \protected\def\dodoubleempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand[\syst_helpers_double_empty_one_yes\syst_helpers_double_empty_one_nop}
+%
+% % \def\syst_helpers_double_empty_one_yes[#1]%
+% % {\firstargumenttrue
+% % \toksapp\t_syst_aux{[{#1}]}%
+% % \futureexpand[\syst_helpers_double_empty_two_yes\syst_helpers_double_empty_two_nop}
+% %
+% % nicer is:
+%
+% \def\syst_helpers_double_empty_one_yes[#+]%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_double_empty_two_yes\syst_helpers_double_empty_two_nop}
+%
+% \def\syst_helpers_double_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \the\t_syst_aux[][]}
+%
+% \def\syst_helpers_double_empty_two_nop
+% {\secondargumentfalse
+% \the\t_syst_aux[]}
+%
+% % Triple
+%
+% \protected\def\dotripleempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand[\syst_helpers_triple_empty_one_yes\syst_helpers_triple_empty_one_nop}
+%
+% \def\syst_helpers_triple_empty_one_yes[#+]%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_triple_empty_two_yes\syst_helpers_triple_empty_two_nop}
+%
+% \def\syst_helpers_triple_empty_two_yes[#+]%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_triple_empty_three_yes\syst_helpers_triple_empty_three_nop}
+%
+% \def\syst_helpers_triple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \the\t_syst_aux[][][]}
+%
+% \def\syst_helpers_triple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \the\t_syst_aux[][]}
+%
+% \def\syst_helpers_triple_empty_three_nop
+% {\thirdargumentfalse
+% \the\t_syst_aux[]}
+%
+% %D Quadruple:
+%
+% \protected\def\doquadrupleempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand[\syst_helpers_quadruple_empty_one_yes\syst_helpers_quadruple_empty_one_nop}
+%
+% \def\syst_helpers_quadruple_empty_one_yes[#+]%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_quadruple_empty_two_yes\syst_helpers_quadruple_empty_two_nop}
+%
+% \def\syst_helpers_quadruple_empty_two_yes[#+]%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_quadruple_empty_three_yes\syst_helpers_quadruple_empty_three_nop}
+%
+% \def\syst_helpers_quadruple_empty_three_yes[#+]%
+% {\thirdargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_quadruple_empty_four_yes\syst_helpers_quadruple_empty_four_nop}
+%
+% \def\syst_helpers_quadruple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \the\t_syst_aux[][][][]}
+%
+% \def\syst_helpers_quadruple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \the\t_syst_aux[][][]}
+%
+% \def\syst_helpers_quadruple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \the\t_syst_aux[][]}
+%
+% \def\syst_helpers_quadruple_empty_four_nop
+% {\fourthargumentfalse
+% \the\t_syst_aux[]}
+%
+% %D Quintuple:
+%
+% \protected\def\doquintupleempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand[\syst_helpers_quintuple_empty_one_yes\syst_helpers_quintuple_empty_one_nop}
+%
+% \def\syst_helpers_quintuple_empty_one_yes[#+]%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_quintuple_empty_two_yes\syst_helpers_quintuple_empty_two_nop}
+%
+% \def\syst_helpers_quintuple_empty_two_yes[#+]%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_quintuple_empty_three_yes\syst_helpers_quintuple_empty_three_nop}
+%
+% \def\syst_helpers_quintuple_empty_three_yes[#+]%
+% {\thirdargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_quintuple_empty_four_yes\syst_helpers_quintuple_empty_four_nop}
+%
+% \def\syst_helpers_quintuple_empty_four_yes[#+]%
+% {\fourthargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_quintuple_empty_five_yes\syst_helpers_quintuple_empty_five_nop}
+%
+% \def\syst_helpers_quintuple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux[][][][][]}
+%
+% \def\syst_helpers_quintuple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux[][][][]}
+%
+% \def\syst_helpers_quintuple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux[][][]}
+%
+% \def\syst_helpers_quintuple_empty_four_nop
+% {\fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux[][]}
+%
+% \def\syst_helpers_quintuple_empty_five_nop
+% {\fifthargumentfalse
+% \the\t_syst_aux[]}
+%
+% %D Sixtuple:
+%
+% \protected\def\dosixtupleempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand[\syst_helpers_sixtuple_empty_one_yes\syst_helpers_sixtuple_empty_one_nop}
+%
+% \def\syst_helpers_sixtuple_empty_one_yes[#+]%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_sixtuple_empty_two_yes\syst_helpers_sixtuple_empty_two_nop}
+%
+% \def\syst_helpers_sixtuple_empty_two_yes[#+]%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_sixtuple_empty_three_yes\syst_helpers_sixtuple_empty_three_nop}
+%
+% \def\syst_helpers_sixtuple_empty_three_yes[#+]%
+% {\thirdargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_sixtuple_empty_four_yes\syst_helpers_sixtuple_empty_four_nop}
+%
+% \def\syst_helpers_sixtuple_empty_four_yes[#+]%
+% {\fourthargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_sixtuple_empty_five_yes\syst_helpers_sixtuple_empty_five_nop}
+%
+% \def\syst_helpers_sixtuple_empty_five_yes[#+]%
+% {\fifthargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_sixtuple_empty_six_yes\syst_helpers_sixtuple_empty_six_nop}
+%
+% \def\syst_helpers_sixtuple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \the\t_syst_aux[][][][][][]}
+%
+% \def\syst_helpers_sixtuple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \the\t_syst_aux[][][][][]}
+%
+% \def\syst_helpers_sixtuple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \the\t_syst_aux[][][][]}
+%
+% \def\syst_helpers_sixtuple_empty_four_nop
+% {\fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \the\t_syst_aux[][][]}
+%
+% \def\syst_helpers_sixtuple_empty_five_nop
+% {\fifthargumentfalse
+% \sixthargumentfalse
+% \the\t_syst_aux[][]}
+%
+% \def\syst_helpers_sixtuple_empty_six_nop
+% {\sixthargumentfalse
+% \the\t_syst_aux[]}
+%
+% %D Seventuple:
+%
+% \protected\def\doseventupleempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand[\syst_helpers_seventuple_empty_one_yes\syst_helpers_seventuple_empty_one_nop}
+%
+% \def\syst_helpers_seventuple_empty_one_yes[#+]%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_seventuple_empty_two_yes\syst_helpers_seventuple_empty_two_nop}
+%
+% \def\syst_helpers_seventuple_empty_two_yes[#+]%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_seventuple_empty_three_yes\syst_helpers_seventuple_empty_three_nop}
+%
+% \def\syst_helpers_seventuple_empty_three_yes[#+]%
+% {\thirdargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_seventuple_empty_four_yes\syst_helpers_seventuple_empty_four_nop}
+%
+% \def\syst_helpers_seventuple_empty_four_yes[#+]%
+% {\fourthargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_seventuple_empty_five_yes\syst_helpers_seventuple_empty_five_nop}
+%
+% \def\syst_helpers_seventuple_empty_five_yes[#+]%
+% {\fifthargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_seventuple_empty_six_yes\syst_helpers_seventuple_empty_six_nop}
+%
+% \def\syst_helpers_seventuple_empty_six_yes[#+]%
+% {\sixthargumenttrue
+% \toksapp\t_syst_aux{[#1]}%
+% \futureexpand[\syst_helpers_seventuple_empty_seven_yes\syst_helpers_seventuple_empty_seven_nop}
+%
+% \def\syst_helpers_seventuple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \the\t_syst_aux[][][][][][][]}
+%
+% \def\syst_helpers_seventuple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \the\t_syst_aux[][][][][][]}
+%
+% \def\syst_helpers_seventuple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \the\t_syst_aux[][][][][]}
+%
+% \def\syst_helpers_seventuple_empty_four_nop
+% {\fourthargumentfalse
+% \fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \the\t_syst_aux[][][][]}
+%
+% \def\syst_helpers_seventuple_empty_five_nop
+% {\fifthargumentfalse
+% \sixthargumentfalse
+% \seventhargumentfalse
+% \the\t_syst_aux[][][]}
+%
+% \def\syst_helpers_seventuple_empty_six_nop
+% {\sixthargumentfalse
+% \seventhargumentfalse
+% \the\t_syst_aux[][]}
+%
+% \def\syst_helpers_seventuple_empty_seven_nop
+% {\seventhargumentfalse
+% \the\t_syst_aux[]}
+
+%tolerant\def\syst_single_empty#1\relax[#+]%
+\tolerant\def\syst_single_empty#1\relax[#2]%
+ {\ifarguments
+ \or\firstargumentfalse
+ \or\firstargumenttrue
+ \fi
+ #1[#2]}
+
+%tolerant\def\syst_double_empty#1\relax[#2]#*[#3]%
+\tolerant\def\syst_double_empty#1\relax[#+]#*[#+]%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse
+ \or\firstargumenttrue \secondargumentfalse
+ \or\firstargumenttrue \secondargumenttrue
+ \fi
+ #1[#2][#3]}
+
+%tolerant\def\syst_triple_empty#1\relax[#2]#*[#3]#*[#4]%
+\tolerant\def\syst_triple_empty#1\relax[#+]#*[#+]#*[#+]%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue
+ \fi
+ #1[#2][#3][#4]}
+
+%tolerant\def\syst_quadruple_empty#1\relax[#2]#*[#3]#*[#4]#*[#5]%
+\tolerant\def\syst_quadruple_empty#1\relax[#+]#*[#+]#*[#+]#*[#+]%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse\fourthargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse\fourthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse\fourthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue
+ \fi
+ #1[#2][#3][#4][#5]}
+
+%\tolerant\def\syst_quintuple_empty#1\relax[#2]#*[#3]#*[#4]#*[#5]#*[#6]%
+\tolerant\def\syst_quintuple_empty#1\relax[#+]#*[#+]#*[#+]#*[#+]#*[#+]%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse\fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumenttrue
+ \fi
+ #1[#2][#3][#4][#5][#6]}
+
+%tolerant\def\syst_sixtuple_empty#1\relax[#2]#*[#3]#*[#4]#*[#5]#*[#6]#*[#7]%
+\tolerant\def\syst_sixtuple_empty#1\relax[#+]#*[#+]#*[#+]#*[#+]#*[#+]#*[#+]%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse\sixthargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse\sixthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse\fourthargumentfalse\fifthargumentfalse\sixthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumentfalse\fifthargumentfalse\sixthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumentfalse\sixthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumenttrue \sixthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumenttrue \sixthargumenttrue
+ \fi
+ #1[#2][#3][#4][#5][#6][#7]}
+
+%tolerant\def\syst_seventuple_empty#1\relax[#2]#*[#3]#*[#4]#*[#5]#*[#6]#*[#7]#*[#8]%
+\tolerant\def\syst_seventuple_empty#1\relax[#+]#*[#+]#*[#+]#*[#+]#*[#+]#*[#+]#*[#+]%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse\sixthargumentfalse\seventhargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse\sixthargumentfalse\seventhargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse\fourthargumentfalse\fifthargumentfalse\sixthargumentfalse\seventhargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumentfalse\fifthargumentfalse\sixthargumentfalse\seventhargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumentfalse\sixthargumentfalse\seventhargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumenttrue \sixthargumentfalse\seventhargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumenttrue \sixthargumenttrue \seventhargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumenttrue \sixthargumenttrue \seventhargumenttrue
+ \fi
+ #1[#2][#3][#4][#5][#6][#7][#8]}
+
+\permanent\protected\def\dosingleempty #1{\syst_single_empty #1\relax}
+\permanent\protected\def\dodoubleempty #1{\syst_double_empty #1\relax}
+\permanent\protected\def\dotripleempty #1{\syst_triple_empty #1\relax}
+\permanent\protected\def\doquadrupleempty #1{\syst_quadruple_empty #1\relax}
+\permanent\protected\def\doquintupleempty #1{\syst_quintuple_empty #1\relax}
+\permanent\protected\def\dosixtupleempty #1{\syst_sixtuple_empty #1\relax}
+\permanent\protected\def\doseventupleempty#1{\syst_seventuple_empty#1\relax}
%D Aliases:
-\let\dosingleargument \dosingleempty
-\let\dodoubleargument \dodoubleempty
-\let\dotripleargument \dotripleempty
-\let\doquadrupleargument \doquadrupleempty
-\let\doquintupleargument \doquintupleempty
-\let\dosixtupleargument \dosixtupleempty
-\let\doseventupleargument\doseventupleempty
+\aliased\let\dosingleargument \dosingleempty
+\aliased\let\dodoubleargument \dodoubleempty
+\aliased\let\dotripleargument \dotripleempty
+\aliased\let\doquadrupleargument \doquadrupleempty
+\aliased\let\doquintupleargument \doquintupleempty
+\aliased\let\dosixtupleargument \dosixtupleempty
+\aliased\let\doseventupleargument\doseventupleempty
%D \macros
%D {strippedcsname}
@@ -2308,10 +2385,7 @@
%D
%D This expands to \type{\ifsomething}.
-% \def\strippedcsname
-% {\expandafter\gobbleoneargument\string}
-
-\let\strippedcsname\csstring
+\aliased\let\strippedcsname\csstring
%D \macros
%D {complexorsimple,complexorsimpleempty}
@@ -2352,15 +2426,13 @@
%D Many \CONTEXT\ commands started as complex or simple ones, but changed into more
%D versatile (more object oriented) ones using the \type {\get..argument} commands.
-\unexpanded\def\complexorsimple#1%
- {% \relax % prevents lookahead, brrr
- \doifelsenextoptional
+\permanent\protected\def\complexorsimple#1%
+ {\doifelsenextoptional
{\firstargumenttrue \csname\s!complex\csstring#1\endcsname}
{\firstargumentfalse\csname\s!simple \csstring#1\endcsname}}
-\unexpanded\def\complexorsimpleempty#1%
- {% \relax % prevents lookahead, brrr
- \doifelsenextoptional
+\permanent\protected\def\complexorsimpleempty#1%
+ {\doifelsenextoptional
{\firstargumenttrue \csname\s!complex\csstring#1\endcsname}
{\firstargumentfalse\csname\s!complex\csstring#1\endcsname[]}}
@@ -2370,19 +2442,19 @@
%D The previous commands are used that often that we found it worthwile to offer two
%D more alternatives. Watch the build in protection.
-\unexpanded\def\syst_helpers_complex_or_simple#1#2%
+\protected\def\syst_helpers_complex_or_simple#1#2%
{\doifelsenextoptional{\firstargumenttrue#1}{\firstargumentfalse#2}}
-\unexpanded\def\syst_helpers_complex_or_simple_empty#1%
+\protected\def\syst_helpers_complex_or_simple_empty#1%
{\doifelsenextoptional{\firstargumenttrue#1}{\firstargumentfalse#1[]}}
-\unexpanded\def\definecomplexorsimple#1%
- {\unexpanded\edef#1{\syst_helpers_complex_or_simple
+\permanent\protected\def\definecomplexorsimple#1%
+ {\protected\edef#1{\syst_helpers_complex_or_simple
\expandafter\noexpand\csname\s!complex\csstring#1\endcsname
\expandafter\noexpand\csname\s!simple \csstring#1\endcsname}}
-\unexpanded\def\definecomplexorsimpleempty#1%
- {\unexpanded\edef#1{\syst_helpers_complex_or_simple_empty
+\permanent\protected\def\definecomplexorsimpleempty#1%
+ {\protected\edef#1{\syst_helpers_complex_or_simple_empty
\expandafter\noexpand\csname\s!complex\csstring#1\endcsname}}
%D These commands are called as:
@@ -2420,8 +2492,8 @@
\newconditional\c_syst_helpers_permit_spaces_between_groups
-\unexpanded\def \permitspacesbetweengroups{\settrue \c_syst_helpers_permit_spaces_between_groups}
-\unexpanded\def\dontpermitspacesbetweengroups{\setfalse\c_syst_helpers_permit_spaces_between_groups}
+\permanent\protected\def \permitspacesbetweengroups{\settrue \c_syst_helpers_permit_spaces_between_groups}
+\permanent\protected\def\dontpermitspacesbetweengroups{\setfalse\c_syst_helpers_permit_spaces_between_groups}
\dontpermitspacesbetweengroups
@@ -2430,155 +2502,213 @@
%D \type {conditional} token. Okay, these macros are not called that often but it
%D saves crap when tracing.
-\unexpanded\def\dosinglegroupempty#1%
- {\t_syst_aux{#1}%
- \futureexpand\bgroup\syst_helpers_single_empty_one_yes\syst_helpers_single_group_empty_one_nop}
-
-\def\syst_helpers_single_group_empty_one_nop
- {\firstargumentfalse
- \the\t_syst_aux{}}
-
-\unexpanded\def\dodoublegroupempty#1%
- {\t_syst_aux{#1}%
- \futureexpand\bgroup\syst_helpers_group_double_empty_one_yes\syst_helpers_group_double_empty_one_nop}
-
-\def\syst_helpers_group_double_empty_one_yes#1%
- {\firstargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_double_empty_two_yes\syst_helpers_group_double_empty_two_nop}
-
-\def\syst_helpers_group_double_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \the\t_syst_aux{}{}}
-
-\def\syst_helpers_group_double_empty_two_nop
- {\secondargumentfalse
- \the\t_syst_aux{}}
-
-\unexpanded\def\dotriplegroupempty#1%
- {\t_syst_aux{#1}%
- \futureexpand\bgroup\syst_helpers_group_triple_empty_one_yes\syst_helpers_group_triple_empty_one_nop}
-
-\def\syst_helpers_group_triple_empty_one_yes#1%
- {\firstargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_group_triple_empty_two_yes\syst_helpers_group_triple_empty_two_nop}
-
-\def\syst_helpers_group_triple_empty_two_yes#1%
- {\secondargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_triple_empty_three_yes\syst_helpers_group_triple_empty_three_nop}
-
-\def\syst_helpers_group_triple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \the\t_syst_aux{}{}{}}
-
-\def\syst_helpers_group_triple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \the\t_syst_aux{}{}}
-
-\def\syst_helpers_group_triple_empty_three_nop
- {\thirdargumentfalse
- \the\t_syst_aux{}}
-
-\unexpanded\def\doquadruplegroupempty#1%
- {\t_syst_aux{#1}%
- \futureexpand\bgroup\syst_helpers_group_quadruple_empty_one_yes\syst_helpers_group_quadruple_empty_one_nop}
-
-\def\syst_helpers_group_quadruple_empty_one_yes#1%
- {\firstargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_group_quadruple_empty_two_yes\syst_helpers_group_quadruple_empty_two_nop}
-
-\def\syst_helpers_group_quadruple_empty_two_yes#1%
- {\secondargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_group_quadruple_empty_three_yes\syst_helpers_group_quadruple_empty_three_nop}
-
-\def\syst_helpers_group_quadruple_empty_three_yes#1%
- {\thirdargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_quadruple_empty_four_yes\syst_helpers_group_quadruple_empty_four_nop}
-
-\def\syst_helpers_group_quadruple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \the\t_syst_aux{}{}{}{}}
-
-\def\syst_helpers_group_quadruple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \the\t_syst_aux{}{}{}}
-
-\def\syst_helpers_group_quadruple_empty_three_nop
- {\thirdargumentfalse
- \fourthargumentfalse
- \the\t_syst_aux{}{}}
-
-\def\syst_helpers_group_quadruple_empty_four_nop
- {\fourthargumentfalse
- \the\t_syst_aux{}}
-
-\unexpanded\def\doquintuplegroupempty#1%
- {\t_syst_aux{#1}%
- \futureexpand\bgroup\syst_helpers_group_quintuple_empty_one_yes\syst_helpers_group_quintuple_empty_one_nop}
-
-\def\syst_helpers_group_quintuple_empty_one_yes#1%
- {\firstargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_group_quintuple_empty_two_yes\syst_helpers_group_quintuple_empty_two_nop}
-
-\def\syst_helpers_group_quintuple_empty_two_yes#1%
- {\secondargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_group_quintuple_empty_three_yes\syst_helpers_group_quintuple_empty_three_nop}
-
-\def\syst_helpers_group_quintuple_empty_three_yes#1%
- {\thirdargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_group_quintuple_empty_four_yes\syst_helpers_group_quintuple_empty_four_nop}
-
-\def\syst_helpers_group_quintuple_empty_four_yes#1%
- {\fourthargumenttrue
- \toksapp\t_syst_aux{{#1}}%
- \futureexpand\bgroup\syst_helpers_quintuple_empty_five_yes\syst_helpers_group_quintuple_empty_five_nop}
-
-\def\syst_helpers_group_quintuple_empty_one_nop
- {\firstargumentfalse
- \secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux{}{}{}{}{}}
-
-\def\syst_helpers_group_quintuple_empty_two_nop
- {\secondargumentfalse
- \thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux{}{}{}{}}
-
-\def\syst_helpers_group_quintuple_empty_three_nop
- {\thirdargumentfalse
- \fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux{}{}{}}
-
-\def\syst_helpers_group_quintuple_empty_four_nop
- {\fourthargumentfalse
- \fifthargumentfalse
- \the\t_syst_aux{}{}}
-
-\def\syst_helpers_group_quintuple_empty_five_nop
- {\fifthargumentfalse
- \the\t_syst_aux{}}
+% \protected\def\dosinglegroupempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_single_empty_one_yes\syst_helpers_single_group_empty_one_nop}
+%
+% \def\syst_helpers_single_group_empty_one_nop
+% {\firstargumentfalse
+% \the\t_syst_aux{}}
+%
+% \protected\def\dodoublegroupempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_double_empty_one_yes\syst_helpers_group_double_empty_one_nop}
+%
+% % \def\syst_helpers_group_double_empty_one_yes#1%
+% % {\firstargumenttrue
+% % \toksapp\t_syst_aux{{#1}}%
+% % \futureexpand\bgroup\syst_helpers_double_empty_two_yes\syst_helpers_group_double_empty_two_nop}
+% %
+% % nicer is:
+%
+% \def\syst_helpers_group_double_empty_one_yes#+%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_double_empty_two_yes\syst_helpers_group_double_empty_two_nop}
+%
+% \def\syst_helpers_group_double_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \the\t_syst_aux{}{}}
+%
+% \def\syst_helpers_group_double_empty_two_nop
+% {\secondargumentfalse
+% \the\t_syst_aux{}}
+%
+% \protected\def\dotriplegroupempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_triple_empty_one_yes\syst_helpers_group_triple_empty_one_nop}
+%
+% \def\syst_helpers_group_triple_empty_one_yes#+%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_triple_empty_two_yes\syst_helpers_group_triple_empty_two_nop}
+%
+% \def\syst_helpers_group_triple_empty_two_yes#+%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_triple_empty_three_yes\syst_helpers_group_triple_empty_three_nop}
+%
+% \def\syst_helpers_group_triple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \the\t_syst_aux{}{}{}}
+%
+% \def\syst_helpers_group_triple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \the\t_syst_aux{}{}}
+%
+% \def\syst_helpers_group_triple_empty_three_nop
+% {\thirdargumentfalse
+% \the\t_syst_aux{}}
+%
+% \protected\def\doquadruplegroupempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_quadruple_empty_one_yes\syst_helpers_group_quadruple_empty_one_nop}
+%
+% \def\syst_helpers_group_quadruple_empty_one_yes#+%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_quadruple_empty_two_yes\syst_helpers_group_quadruple_empty_two_nop}
+%
+% \def\syst_helpers_group_quadruple_empty_two_yes#+%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_quadruple_empty_three_yes\syst_helpers_group_quadruple_empty_three_nop}
+%
+% \def\syst_helpers_group_quadruple_empty_three_yes#+%
+% {\thirdargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_quadruple_empty_four_yes\syst_helpers_group_quadruple_empty_four_nop}
+%
+% \def\syst_helpers_group_quadruple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \the\t_syst_aux{}{}{}{}}
+%
+% \def\syst_helpers_group_quadruple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \the\t_syst_aux{}{}{}}
+%
+% \def\syst_helpers_group_quadruple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \the\t_syst_aux{}{}}
+%
+% \def\syst_helpers_group_quadruple_empty_four_nop
+% {\fourthargumentfalse
+% \the\t_syst_aux{}}
+%
+% \protected\def\doquintuplegroupempty#1%
+% {\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_quintuple_empty_one_yes\syst_helpers_group_quintuple_empty_one_nop}
+%
+% \def\syst_helpers_group_quintuple_empty_one_yes#+%
+% {\firstargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_quintuple_empty_two_yes\syst_helpers_group_quintuple_empty_two_nop}
+%
+% \def\syst_helpers_group_quintuple_empty_two_yes#+%
+% {\secondargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_quintuple_empty_three_yes\syst_helpers_group_quintuple_empty_three_nop}
+%
+% \def\syst_helpers_group_quintuple_empty_three_yes#+%
+% {\thirdargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_group_quintuple_empty_four_yes\syst_helpers_group_quintuple_empty_four_nop}
+%
+% \def\syst_helpers_group_quintuple_empty_four_yes#+%
+% {\fourthargumenttrue
+% \toksapp\t_syst_aux{#1}%
+% \futureexpand\bgroup\syst_helpers_quintuple_empty_five_yes\syst_helpers_group_quintuple_empty_five_nop}
+%
+% \def\syst_helpers_group_quintuple_empty_one_nop
+% {\firstargumentfalse
+% \secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux{}{}{}{}{}}
+%
+% \def\syst_helpers_group_quintuple_empty_two_nop
+% {\secondargumentfalse
+% \thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux{}{}{}{}}
+%
+% \def\syst_helpers_group_quintuple_empty_three_nop
+% {\thirdargumentfalse
+% \fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux{}{}{}}
+%
+% \def\syst_helpers_group_quintuple_empty_four_nop
+% {\fourthargumentfalse
+% \fifthargumentfalse
+% \the\t_syst_aux{}{}}
+%
+% \def\syst_helpers_group_quintuple_empty_five_nop
+% {\fifthargumentfalse
+% \the\t_syst_aux{}}
+
+\tolerant\def\syst_single_group_empty#1\relax#_%
+ {\ifarguments
+ \or\firstargumentfalse
+ \or\firstargumenttrue
+ \fi
+ #1#2}
+
+\tolerant\def\syst_double_group_empty#1\relax#_#*#_%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse
+ \or\firstargumenttrue \secondargumentfalse
+ \or\firstargumenttrue \secondargumenttrue
+ \fi
+ #1#2#3}
+
+\tolerant\def\syst_triple_group_empty#1\relax#_#*#_#*#_%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue
+ \fi
+ #1#2#3#4}
+
+\tolerant\def\syst_quadruple_group_empty#1\relax#_#*#_#*#_#*#_%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse\fourthargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse\fourthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse\fourthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue
+ \fi
+ #1#2#3#4#5}
+
+\tolerant\def\syst_quintuple_group_empty#1\relax#_#*#_#*#_#*#_#*#_%
+ {\ifarguments
+ \or\firstargumentfalse\secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumentfalse\thirdargumentfalse\fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumentfalse\fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumentfalse\fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumentfalse
+ \or\firstargumenttrue \secondargumenttrue \thirdargumenttrue \fourthargumenttrue \fifthargumenttrue
+ \fi
+ #1#2#3#4#5#6}
+
+\permanent\protected\def\dosinglegroupempty #1{\syst_single_group_empty #1\relax}
+\permanent\protected\def\dodoublegroupempty #1{\syst_double_group_empty #1\relax}
+\permanent\protected\def\dotriplegroupempty #1{\syst_triple_group_empty #1\relax}
+\permanent\protected\def\doquadruplegroupempty #1{\syst_quadruple_group_empty #1\relax}
+\permanent\protected\def\doquintuplegroupempty #1{\syst_quintuple_group_empty #1\relax}
%D These macros can explictly take care of spaces, which means that the next
%D definition and calls are valid:
@@ -2607,41 +2737,41 @@
%D The next six macros (dedicated to Taco) can conveniently used to select
%D arguments. Their names explain their functionality.
-\def\firstofoneargument #1{#1}
+\permanent\def\firstofoneargument #1{#1}
-\def\firstoftwoarguments #1#2{#1}
-\def\secondoftwoarguments #1#2{#2}
+\permanent\def\firstoftwoarguments #1#-{#1}
+\permanent\def\secondoftwoarguments #-#1{#1}
-\def\firstofthreearguments #1#2#3{#1}
-\def\secondofthreearguments #1#2#3{#2}
-\def\thirdofthreearguments #1#2#3{#3}
+\permanent\def\firstofthreearguments #1#-#-{#1}
+\permanent\def\secondofthreearguments #-#1#-{#1}
+\permanent\def\thirdofthreearguments #-#-#1{#1}
-\def\firstoffourarguments #1#2#3#4{#1}
-\def\secondoffourarguments #1#2#3#4{#2}
-\def\thirdoffourarguments #1#2#3#4{#3}
-\def\fourthoffourarguments #1#2#3#4{#4}
+\permanent\def\firstoffourarguments #1#-#-#-{#1}
+\permanent\def\secondoffourarguments #-#1#-#-{#1}
+\permanent\def\thirdoffourarguments #-#-#1#-{#1}
+\permanent\def\fourthoffourarguments #-#-#-#1{#1}
-\def\firstoffivearguments #1#2#3#4#5{#1}
-\def\secondoffivearguments #1#2#3#4#5{#2}
-\def\thirdoffivearguments #1#2#3#4#5{#3}
-\def\fourthoffivearguments #1#2#3#4#5{#4}
-\def\fifthoffivearguments #1#2#3#4#5{#5}
+\permanent\def\firstoffivearguments #1#-#-#-#-{#1}
+\permanent\def\secondoffivearguments #-#1#-#-#-{#1}
+\permanent\def\thirdoffivearguments #-#-#1#-#-{#1}
+\permanent\def\fourthoffivearguments #-#-#-#1#-{#1}
+\permanent\def\fifthoffivearguments #-#-#-#-#1{#1}
-\def\firstofsixarguments #1#2#3#4#5#6{#1}
-\def\secondofsixarguments#1#2#3#4#5#6{#2}
-\def\thirdofsixarguments #1#2#3#4#5#6{#3}
-\def\fourthofsixarguments#1#2#3#4#5#6{#4}
-\def\fifthofsixarguments #1#2#3#4#5#6{#5}
-\def\sixthofsixarguments #1#2#3#4#5#6{#6}
+\permanent\def\firstofsixarguments #1#-#-#-#-#-{#1}
+\permanent\def\secondofsixarguments#-#1#-#-#-#-{#1}
+\permanent\def\thirdofsixarguments #-#-#1#-#-#-{#1}
+\permanent\def\fourthofsixarguments#-#-#-#1#-#-{#1}
+\permanent\def\fifthofsixarguments #-#-#-#-#1#-{#1}
+\permanent\def\sixthofsixarguments #-#-#-#-#-#1{#1}
-\unexpanded\def\firstofoneunexpanded #1{#1}
+\permanent\protected\def\firstofoneunexpanded #1{#1}
-\unexpanded\def\firstoftwounexpanded #1#2{#1}
-\unexpanded\def\secondoftwounexpanded #1#2{#2}
+\permanent\protected\def\firstoftwounexpanded #1#-{#1}
+\permanent\protected\def\secondoftwounexpanded #-#1{#1}
-\unexpanded\def\firstofthreeunexpanded #1#2#3{#1}
-\unexpanded\def\secondofthreeunexpanded#1#2#3{#2}
-\unexpanded\def\thirdofthreeunexpanded #1#2#3{#3}
+\permanent\protected\def\firstofthreeunexpanded #1#-#-{#1}
+\permanent\protected\def\secondofthreeunexpanded#-#1#-{#1}
+\permanent\protected\def\thirdofthreeunexpanded #-#-#1{#1}
%D \macros
%D {globalletempty,letempty,
@@ -2650,17 +2780,17 @@
%D
%D Trivial:
-\unexpanded\def\letempty #1{\let #1\empty}
-\unexpanded\def\globalletempty#1{\glet#1\empty}
+\permanent\protected\def\letempty #1{\let #1\empty}
+\permanent\protected\def\globalletempty#1{\glet#1\empty}
-\unexpanded\def\letvalueempty #1{\expandafter\let \csname#1\endcsname\empty}
-\unexpanded\def\letgvalueempty#1{\expandafter\glet\csname#1\endcsname\empty}
-\unexpanded\def\letvaluerelax #1{\expandafter\let \csname#1\endcsname\relax}
-\unexpanded\def\letgvalurelax #1{\expandafter\glet\csname#1\endcsname\relax}
+\permanent\protected\def\letvalueempty #1{\letcsname #1\endcsname\empty}
+\permanent\protected\def\letgvalueempty#1{\gletcsname#1\endcsname\empty}
+\permanent\protected\def\letvaluerelax #1{\letcsname #1\endcsname\relax}
+\permanent\protected\def\letgvalurelax #1{\gletcsname#1\endcsname\relax}
-\unexpanded\def\relaxvalueifundefined#1%
+\permanent\protected\def\relaxvalueifundefined#1%
{\ifcsname#1\endcsname \else
- \expandafter\let\csname#1\endcsname\relax
+ \aliased\letcsname#1\endcsname\relax
\fi}
%D \macros
@@ -2669,80 +2799,76 @@
%D The next macro hardly needs explanation. Because no nesting is to be expected, we
%D can reuse \type {\wait} within \type {\wait} itself.
-\unexpanded\def\wait
+\permanent\protected\def\wait
{\begingroup
\read16 to \wait
\endgroup}
-%D \macros
-%D {writestring,writeline,
-%D writestatus,statuswidth,normalwritestatus}
-%D
-%D Maybe one didn't notice, but we've already introduced a macro for showing
-%D messages. In the multi||lingual modules, we will also introduce a mechanism for
-%D message passing. For the moment we stick to the core macros:
-%D
-%D \starttyping
-%D \writestring {string}
-%D \writeline
-%D \writestatus {category} {message}
-%D \stoptyping
-%D
-%D Messages are formatted. One can provide the maximum with of the identification
-%D string with the macro \type {\statuswidth}.
-
-\setnewconstant\statuswidth 15
-\setnewconstant\statuswrite 128 % \pluscxxviii
-
-\ifdefined\writestring \else
-
- \unexpanded\def\writestring{\immediate\write\statuswrite}
- \unexpanded\def\writeline {\writestring{}}
-
-\fi
-
-\unexpanded\def\normalwritestatus#1#2%
- {\writestring{\expandafter\syst_helpers_split_status_yes\expandafter\statuswidth#1%
- \space\space\space\space\space\space\space
- \space\space\space\space\space\space\space
- \space\space\space\space\space\space\end
- \space:\space#2}}
-
-\def\syst_helpers_split_status_yes#1#2%
- {\ifcase#1 \expandafter\syst_helpers_split_status_nop\fi#2%
- \expandafter\syst_helpers_split_status_yes\expandafter{\the\numexpr#1+\minusone\relax}}
-
-\def\syst_helpers_split_status_nop#1\end
- {}
+% %D \macros
+% %D {writestring,writeline,writestatus}
+% %D
+% %D Maybe one didn't notice, but we've already introduced a macro for showing
+% %D messages. In the multi||lingual modules, we will also introduce a mechanism for
+% %D message passing. For the moment we stick to the core macros:
+% %D
+% %D \starttyping
+% %D \writestring {string}
+% %D \writeline
+% %D \writestatus {category} {message}
+% %D \stoptyping
+% %D
+% %D Messages are formatted. One can provide the maximum with of the identification
+% %D string with the macro \type {\statuswidth}.
+%
+% \setnewconstant\statuswidth 15
+% \setnewconstant\statuswrite 128 % \pluscxxviii
+%
+% \ifdefined\writestring \else
+%
+% \protected\def\writestring{\immediate\write\statuswrite}
+% \protected\def\writeline {\writestring{}}
+%
+% \fi
+%
+% \protected\def\normalwritestatus#1#2%
+% {\writestring{\expandafter\syst_helpers_split_status_yes\expandafter\statuswidth#1%
+% \space\space\space\space\space\space\space
+% \space\space\space\space\space\space\space
+% \space\space\space\space\space\space\end
+% \space:\space#2}}
+%
+% \def\syst_helpers_split_status_yes#1#2%
+% {\ifcase#1 \expandafter\syst_helpers_split_status_nop\fi#2%
+% \expandafter\syst_helpers_split_status_yes\expandafter{\the\numexpr#1+\minusone\relax}}
+%
+% \def\syst_helpers_split_status_nop#1\end
+% {}
%D \macros
%D {immediatemessage}
%D
%D A fully expandable message:
-\let\immediatemessage\clf_immediatemessage % {} mandate
+% \immediatemessage % {} mandate / defined at the lua end
%D \macros
%D {rawgetparameters}
%D
%D A raw and dirty alternative for \type {\getparameters}; no checking is done!
-\unexpanded\def\rawsetparameter#1=#2,%
- {\if]#1\else
- \expandafter\def\csname\rawparameterprefix#1\endcsname{#2}%
- \expandafter\rawsetparameter
+\def\syst_helpers_grab_raw_parameter#1=#2,%
+ {\ifarguments\or\or
+ \defcsname\m_syst_parameter_n#1\endcsname{#2}%
+ \expandafter\syst_helpers_grab_raw_parameter_next
\fi}
-\unexpanded\def\rawgetparameters[#1][#2% some 5-10% faster
- {\ifx#2]% test is needed, else bomb on [#1][]
- \expandafter\gobbleoneargument
- \else
- \def\rawparameterprefix{#1}%
- \expandafter\dorawgetparameters
- \fi#2}
+\def\syst_helpers_grab_raw_parameter_next
+ {\expandafterspaces\syst_helpers_grab_raw_parameter}
-\def\dorawgetparameters#1]%
- {\expandafter\rawsetparameter#1,]=,}
+\permanent\protected\def\rawgetparameters#1[#2]#*[#3]%
+ {\def\m_syst_parameter_n{#2}%
+ %\expandafterspaces\syst_helpers_grab_raw_parameter#3\ignorearguments\ignorearguments}
+ \expandafter\expandafterspaces\expandafter\syst_helpers_grab_raw_parameter#3\ignorearguments\ignorearguments}
%D \macros
%D {doglobal,
@@ -2754,89 +2880,54 @@
%D all preceding ones with \type {\redoglobal}. When using only alternatives, one
%D can reset this mechanism with \type {\resetglobal}.
-\unexpanded\def\resetglobal
- {\let\redoglobal\relax
- \let\dodoglobal\relax}
+\permanent\protected\def\resetglobal
+ {\enforced\let\redoglobal\relax
+ \enforced\let\dodoglobal\relax}
\resetglobal
-\unexpanded\def\doglobal
- {\ifx\redoglobal\relax
- \let\redoglobal\global
- \let\dodoglobal\syst_helpers_dodo_global
+\permanent\protected\def\doglobal
+ {\ifrelax\redoglobal
+ \enforced\let\redoglobal\global
+ \enforced\let\dodoglobal\syst_helpers_dodo_global
\fi}
\def\syst_helpers_dodo_global
{\resetglobal\global}
-\def\saveglobal
+\let\syst_helpers_redo_global\relax
+
+\permanent\protected\def\saveglobal
{\let\syst_helpers_dodo_global\dodoglobal
\let\syst_helpers_redo_global\redoglobal}
-\def\restoreglobal
- {\let\redoglobal\syst_helpers_redo_global
- \let\dodoglobal\syst_helpers_dodo_global}
-
-%D A very useful application of this macro is \type {\newif}, \TEX's fake boolean
-%D type. Not being a primitive, \type {\global} hopelessly fails here. But a slight
-%D adaption of Knuth's original macro permits:
-%D
-%D \starttyping
-%D \doglobal\newif\iftest
-%D \stoptyping
-%D
-%D Of course one can still say:
-%D
-%D \starttyping
-%D \global\testtrue
-%D \global\testfalse
-%D \stoptyping
-%D
-%D Apart from the prefixes, a few more \type {\expandafters} are needed:
-
-% \unexpanded\def\newif#1% uses the original plain \@if
-% {\privatescratchcounter\escapechar
-% \escapechar\minusone
-% \expandafter\expandafter\expandafter
-% \redoglobal\expandafter\expandafter\expandafter
-% \edef\@if#1{true}{\let\noexpand#1\noexpand\iftrue}%
-% \expandafter\expandafter\expandafter
-% \redoglobal\expandafter\expandafter\expandafter
-% \edef\@if#1{false}{\let\noexpand#1\noexpand\iffalse}%
-% \dodoglobal\@if#1{false}%
-% \escapechar\privatescratchcounter}
+\permanent\protected\def\restoreglobal
+ {\enforced\let\redoglobal\syst_helpers_redo_global
+ \enforced\let\dodoglobal\syst_helpers_dodo_global}
-\normalprotected\def\newif#1% see syst-ini.mkiv
- {\let\new_if_saved\newif
- \let\newif\new_if_check
- \expandafter\redoglobal\expandafter\def\csname\expandafter\newif\csstring#1true\endcsname {\let#1\iftrue }%
- \expandafter\redoglobal\expandafter\def\csname\expandafter\newif\csstring#1false\endcsname{\let#1\iffalse}%
- \dodoglobal\csname\expandafter\newif\csstring#1false\endcsname
- \let\newif\new_if_saved}
+%D Whatever (will be overtoaded):
-%D Also new:
-
-\unexpanded\def\define#1%
+\protected\def\define#1%
{\ifdefined#1%
\message{[\noexpand#1is already defined]}%
- \unexpanded\expandafter\def\expandafter\gobbleddefinition
+ \protected\expandafter\def\expandafter\gobbleddefinition
\else
- \unexpanded\expandafter\def
+ \protected\expandafter\def
\fi#1}
-\unexpanded\def\redefine#1%
+\protected\def\redefine#1%
{\ifdefined#1%
\message{[\noexpand#1is redefined]}%
\fi
- \unexpanded\def#1}
+ \protected\def#1}
-\unexpanded\def\definemacro#1%
- {\ifdefined#1%
- \message{[\noexpand#1is already defined]}%
- \unexpanded\expandafter\def\expandafter\gobbleddefinition
- \else
- \unexpanded\expandafter\def
- \fi#1}
+% \permanent\protected\def\definemacro#1%
+% {\ifdefined#1%
+% \message{[\noexpand#1is already defined]}%
+% \protected\expandafter\def\expandafter\gobbleddefinition
+% \else
+% \protected\expandafter\def
+% \fi#1}
% \define\hans{hans}
% \redefine\hans{hans}
@@ -2860,13 +2951,9 @@
%
% [\test]
-\def\s!unexpanded{unexpanded}
-
\bgroup \obeylines
-\glet\stoptexdefinition\relax
-
-\unexpanded\gdef\starttexdefinition%
+\permanent\protected\gdef\starttexdefinition%
{\bgroup%
\obeylines%
\syst_helpers_start_tex_definition}
@@ -2875,20 +2962,17 @@
{\catcode\endoflineasciicode\ignorecatcode%
\clf_texdefinition_one{#1}}
-\gdef\dostarttexdefinition#1\stoptexdefinition%
+\aliased\glet\stoptexdefinition\relax
+
+\permanent\gdef\dostarttexdefinition#1\stoptexdefinition%
{\egroup%
\clf_texdefinition_two{#1}}
\egroup
-% \unexpanded\def\texdefinition#1{\csname\ifcsname#1\endcsname#1\else donothing\fi\endcsname} % todo: a nop cs: char 0 or some corenamespace
+% \protected\def\texdefinition#1{\csname\ifcsname#1\endcsname#1\else donothing\fi\endcsname} % todo: a nop cs: char 0 or some corenamespace
-\unexpanded\def\texdefinition#1{\begincsname#1\endcsname}
-
-% This is a first variant, more might be added:
-
-\unexpanded\def\starttexcode{\unprotect}
-\unexpanded\def\stoptexcode {\protect}
+\permanent\protected\def\texdefinition#1{\begincsname#1\endcsname}
%D \macros
%D {newcounter,
@@ -2941,18 +3025,18 @@
%D unexpected results, for instance execution of \type {\doif} even if both numbers
%D are unequal.
-\def\zerocountervalue{0}
+\immutable\def\zerocountervalue{0}
-\unexpanded\def\newcounter#1%
+\permanent\protected\def\newcounter#1%
{\dodoglobal\let#1\zerocountervalue}
%D Nowadays we don't mind a few more tokens if we can gain a bit of speed.
-\def\syst_helpers_do_increment#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+\plusone \relax}}
-\def\syst_helpers_do_decrement#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+\minusone\relax}}
+\def\syst_helpers_do_increment#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifrelax#1\else#1\fi\fi+\plusone \relax}}
+\def\syst_helpers_do_decrement#1{\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifrelax#1\else#1\fi\fi+\minusone\relax}}
-\def\syst_helpers_do_do_do_increment#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi+#2\relax}}
-\def\syst_helpers_do_do_do_decrement#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifx#1\relax\else#1\fi\fi-#2\relax}}
+\def\syst_helpers_do_do_do_increment#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifrelax#1\else#1\fi\fi+#2\relax}}
+\def\syst_helpers_do_do_do_decrement#1,#2){\dodoglobal\edef#1{\the\numexpr\ifdefined#1\ifrelax#1\else#1\fi\fi-#2\relax}}
\def\syst_helpers_do_do_increment(#1%
{\def\m_syst_action_yes{\syst_helpers_do_do_do_increment#1}%
@@ -2964,14 +3048,14 @@
\def\m_syst_action_nop{\syst_helpers_do_do_do_decrement#1,\plusone}%
\doifelsenextcharcs,\m_syst_action_yes\m_syst_action_nop}
-\unexpanded\def\increment{\doifelsenextcharcs(\syst_helpers_do_do_increment\syst_helpers_do_increment}
-\unexpanded\def\decrement{\doifelsenextcharcs(\syst_helpers_do_do_decrement\syst_helpers_do_decrement}
+\permanent\protected\def\increment{\doifelsenextcharcs(\syst_helpers_do_do_increment\syst_helpers_do_increment}
+\permanent\protected\def\decrement{\doifelsenextcharcs(\syst_helpers_do_do_decrement\syst_helpers_do_decrement}
-\unexpanded\def\fastincrement#1{\dodoglobal\edef#1{\the\numexpr#1+\plusone \relax}}
-\unexpanded\def\fastdecrement#1{\dodoglobal\edef#1{\the\numexpr#1+\minusone\relax}}
+\permanent\protected\def\fastincrement#1{\dodoglobal\edef#1{\the\numexpr#1+\plusone \relax}}
+\permanent\protected\def\fastdecrement#1{\dodoglobal\edef#1{\the\numexpr#1+\minusone\relax}}
-\unexpanded\def\incrementvalue#1{\expandafter\increment\csname#1\endcsname}
-\unexpanded\def\decrementvalue#1{\expandafter\decrement\csname#1\endcsname}
+\permanent\protected\def\incrementvalue#1{\expandafter\increment\csname#1\endcsname}
+\permanent\protected\def\decrementvalue#1{\expandafter\decrement\csname#1\endcsname}
%D \macros
%D {newsignal}
@@ -2988,12 +3072,12 @@
%D Signals old dimensions and can be used in skips, kerns and tests like \type
%D {\ifdim}.
-\newdimen\maximumsignal % step is about 0.00025pt
+\newdimen\d_syst_maximum_signal % step is about 0.00025pt
-\unexpanded\def\newsignal#1%
+\permanent\protected\def\newsignal#1%
{\ifdefined#1\else
- \advance\maximumsignal 2\scaledpoint % to be save in rounding
- \edef#1{\the\maximumsignal}%
+ \advance\d_syst_maximum_signal2\scaledpoint % to be save in rounding
+ \immutable\dimensiondef#1\d_syst_maximum_signal
\fi}
%D \macros
@@ -3005,16 +3089,16 @@
%D \csname if\strippedcsname\something\endcsname
%D \stoptyping
-\let\checkedstrippedcsname\csstring
+\aliased\let\checkedstrippedcsname\csstring
%D \macros
%D {savenormalmeaning}
%D
%D We will use this one in:
-\unexpanded\def\savenormalmeaning#1%
+\permanent\protected\def\savenormalmeaning#1%
{\ifcsname normal\csstring#1\endcsname \else
- \expandafter\let\csname normal\csstring#1\endcsname#1%
+ \aliased\letcsname normal\csstring#1\endcsname#1%
\fi}
%D \macros
@@ -3053,78 +3137,66 @@
%D
%D Both \type {\recurselevel} and \type {\recursedepth} are macros. The real
%D \COUNTERS\ are hidden from the user because we don't want any interference.
+%D
+%D We now use the macro stack which is somewhat leaner and meaner and a little
+%D faster too.
+
+% left overs: too much \protected here
\newcount\outerrecurse
\newcount\innerrecurse
-\def\recursedepth{\the\outerrecurse}
-\def\recurselevel{0}
+\mutable\def\recursedepth{\the\outerrecurse}
+\mutable\def\recurselevel{0}
-\let\syst_helpers_stepwise_next\relax
+\mutable\let\recurseaction\relax
+\mutable\let\recursestring\empty
-\installsystemnamespace{recurseindex}
-\installsystemnamespace{recurseaction}
+% \let\syst_helpers_stepwise_next\relax
-\unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
- {\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#4}%
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
- \ifnum#3>\zerocount\relax
- \ifnum#2<#1\relax
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
- \else
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_recurse
- \fi
- \orelse\ifnum#3<\zerocount\relax
- \ifnum#1<#2\relax
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
- \else
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_reverse
- \fi
- \else
- \let\syst_helpers_stepwise_next\syst_helpers_stepwise_exit
- \fi\normalexpanded{\syst_helpers_stepwise_next{\number#1}{\number#2}{\number#3}}}
+% \protected\def\syst_helpers_stepwise_recurse#1#2#3% from to step
+% {\ifnum#1>#2\relax
+% \expandafter\syst_helpers_stepwise_recurse_nop
+% \else
+% \def\recurselevel{#1}%
+% \doubleexpandafter\syst_helpers_stepwise_recurse_yes\expandafter
+% \fi\expandafter{\the\numexpr\recurselevel+#3\relax}{#2}{#3}}
-\unexpanded\def\syst_helpers_stepwise_recurse#1#2#3% from to step
+\protected\def\syst_helpers_stepwise_recurse#1#2#3% from to step
{\ifnum#1>#2\relax
- \expandafter\syst_helpers_stepwise_recurse_nop
+ \expandafter\gobblefourarguments
\else
\def\recurselevel{#1}%
- \doubleexpandafter\syst_helpers_stepwise_recurse_yes\expandafter
+% \doubleexpandafter\syst_helpers_stepwise_recurse_yes\expandafter
+% \fi\expandafter{\the\numexpr\recurselevel+#3\relax}{#2}{#3}}
+ \doubleexpandafter\syst_helpers_stepwise_recurse_yes
\fi\expandafter{\the\numexpr\recurselevel+#3\relax}{#2}{#3}}
-\unexpanded\def\syst_helpers_recurse_content
- {\csname\??recurseaction\the\outerrecurse\endcsname}
-
-\unexpanded\def\syst_helpers_stepwise_recurse_yes
+\protected\def\syst_helpers_stepwise_recurse_yes
{\syst_helpers_recurse_content
\syst_helpers_stepwise_recurse}
-\unexpanded\def\syst_helpers_stepwise_reverse#1#2#3% from to step
+\protected\def\syst_helpers_stepwise_reverse#1#2#3% from to step
{\ifnum#1<#2\relax
- \expandafter\syst_helpers_stepwise_recurse_nop
+% \expandafter\syst_helpers_stepwise_recurse_nop
+ \expandafter\gobblefourarguments
\else
\def\recurselevel{#1}%
\innerrecurse#1\relax
\advance\innerrecurse#3\relax
- \doubleexpandafter\syst_helpers_stepwise_reverse_yes\expandafter
- \fi\expandafter{\the\innerrecurse}{#2}{#3}}
+% \doubleexpandafter\syst_helpers_stepwise_reverse_yes\expandafter
+% \fi\expandafter{\the\innerrecurse}{#2}{#3}}
+ \doubleexpandafter\syst_helpers_stepwise_reverse_yes
+ \fi\expandafter{\the\numexpr\recurselevel+#3\relax}{#2}{#3}}
-\unexpanded\def\syst_helpers_stepwise_reverse_yes
+\protected\def\syst_helpers_stepwise_reverse_yes
{\syst_helpers_recurse_content
\syst_helpers_stepwise_reverse}
-\unexpanded\def\syst_helpers_stepwise_exit
- {\syst_helpers_stepwise_recurse_nop\relax}
-
-\unexpanded\def\syst_helpers_stepwise_recurse_nop#1#2#3#4%
- {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
- \global\advance\outerrecurse\minusone}
-
-\unexpanded\def\dorecurse#1%
- {\dostepwiserecurse\plusone{#1}\plusone}
+% \protected\def\syst_helpers_stepwise_exit
+% {\syst_helpers_stepwise_recurse_nop\relax}
-\def\doexpandedrecurse#1#2% user macro (also was \doxprecurse)
+\permanent\def\doexpandedrecurse#1#2% user macro (also was \doxprecurse)
{\ifnum#1>\zerocount
#2\expandafter\doexpandedrecurse\expandafter{\the\numexpr#1-\plusone\relax}{#2}%
\fi}
@@ -3144,9 +3216,9 @@
%D \dostepwiserecurse {10} {1} {-2} {...}
%D \stoptyping
%D
-%D Because the simple case is used often, we implement it more efficiently:
+%D Because the simple case (n=1) is used often, we implement it more efficiently:
-\unexpanded\def\dorecurse#1%
+\permanent\protected\def\dorecurse#1%
{\ifcase#1\relax
\expandafter\gobbletwoarguments
\or
@@ -3155,29 +3227,8 @@
\expandafter\syst_helpers_recurse_x
\fi{#1}}
-\unexpanded\def\syst_helpers_recurse_x#1#2%
- {\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#2}%
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
- \expandafter\syst_helpers_recurse_indeed\expandafter1\expandafter{\number#1}}
-
-\unexpanded\def\syst_helpers_recurse_y#1#2%
- {\global\advance\outerrecurse \plusone
- \expandafter\glet\csname\??recurseindex\the\outerrecurse\endcsname\recurselevel
- \let\recurselevel\!!plusone
- #2%
- \expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
- \global\advance\outerrecurse \minusone}
-
-\unexpanded\def\syst_helpers_recurse_indeed#1#2% from to
- {\ifnum#1>#2\relax
- \expandafter\syst_helpers_recurse_indeed_nop
- \else
- \def\recurselevel{#1}%
- \doubleexpandafter\syst_helpers_recurse_indeed_yes
- \fi\expandafter{\the\numexpr\recurselevel+\plusone\relax}{#2}}
-
-\unexpanded\def\syst_helpers_recurse_indeed#1#2% from to
+\protected\def\syst_helpers_recurse_indeed#1#2% from to
+% {\ifnum#1>#2 %
{\ifnum#1>#2\relax
\expandafter\syst_helpers_recurse_indeed_nop
\else
@@ -3186,13 +3237,12 @@
\doubleexpandafter\syst_helpers_recurse_indeed_yes
\fi\expandafter{\the\innerrecurse}{#2}}
-\unexpanded\def\syst_helpers_recurse_indeed_yes
+\protected\def\syst_helpers_recurse_indeed_yes
{\syst_helpers_recurse_content
\syst_helpers_recurse_indeed}
-\unexpanded\def\syst_helpers_recurse_indeed_nop#1#2#3%
- {\expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
- \global\advance\outerrecurse \minusone }
+\protected\def\syst_helpers_recurse_indeed_nop#0#0#0%
+ {}
%D \macros
%D {dowith}
@@ -3203,7 +3253,9 @@
%D \dowith{a,b,c}{[#1]}
%D \stoptyping
-\unexpanded\def\dowith#1#2%
+\let\syst_helpers_with\gobbleoneargument
+
+\permanent\protected\def\dowith#1#2%
{\def\syst_helpers_with##1{#2}%
\normalexpanded{\processcommalist[#1]}\syst_helpers_with}
@@ -3223,36 +3275,37 @@
%D
%D When needed, one can call for \type {\looplevel} and \type {\loopdepth}.
-\let\endofloop\donothing % maybe \syst_helpers_loop_end
+\aliased\let\endofloop\donothing % maybe \syst_helpers_loop_end
-\unexpanded\def\doloop#1%
+\permanent\protected\def\doloop#1%
{\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname{#1}%
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
- \let\endofloop\syst_helpers_loop
- \syst_helpers_loop1} % no \plusone else \recurselevel wrong
+ \globalpushmacro\recurseaction
+ \globalpushmacro\recurselevel
+ \protected\gdef\recurseaction##1##2{#1}%
+ \enforced\let\endofloop\syst_helpers_loop
+ \syst_helpers_loop1}% no \plusone else \recurselevel wrong
-\unexpanded\def\syst_helpers_loop#1%
+\protected\def\syst_helpers_loop#1%
{\def\recurselevel{#1}%
\expandafter\syst_helpers_loop_yes\expandafter{\the\numexpr\recurselevel+\plusone\relax}}
-\unexpanded\def\syst_helpers_loop_yes
+\protected\def\syst_helpers_loop_yes
{\syst_helpers_recurse_content
\endofloop}
-\unexpanded\def\syst_helpers_loop_nop#1%
- {\let\endofloop\syst_helpers_loop % new, permits nested \doloop's
- \expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
+\protected\def\syst_helpers_loop_nop#0%
+ {\enforced\let\endofloop\syst_helpers_loop
+ \globalpopmacro\recurselevel
+ \globalpopmacro\recurseaction
\global\advance\outerrecurse\minusone}
-\unexpanded\def\exitloop % \exitloop quits at end
- {\let\endofloop\syst_helpers_loop_nop}
+\permanent\protected\def\exitloop % \exitloop quits at end
+ {\enforced\let\endofloop\syst_helpers_loop_nop}
-\unexpanded\def\exitloopnow#1\endofloop % \exitloopnow quits directly
+\permanent\protected\def\exitloopnow#0\endofloop % \exitloopnow quits directly
{\syst_helpers_loop_nop}
-%D The loop is executed at least once, so beware of situations
-%D like:
+%D The loop is executed at least once, so beware of situations like:
%D
%D \starttyping
%D \doloop {\exitloop some commands}
@@ -3288,57 +3341,84 @@
%D \stoptyping
\def\syst_helpers_recurse_content
- {\csname\??recurseaction\the\outerrecurse\expandafter\expandafter\expandafter\endcsname
- \expandafter\expandafter\expandafter{\expandafter\recurselevel\expandafter}\expandafter{\the\outerrecurse}}
+ {\normalexpanded{\recurseaction{\recurselevel}{\the\outerrecurse}}}
-\unexpanded\def\syst_helpers_recurse_x#1#2%
- {\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#2}%
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
- \expandafter\syst_helpers_recurse_indeed\expandafter1\expandafter{\number#1}}
+\protected\def\syst_helpers_recurse_x#1#2%
+ {\global\advance\outerrecurse\plusone
+ \globalpushmacro\recurseaction
+ \globalpushmacro\recurselevel
+ \protected\gdef\recurseaction##1##2{#2}%
+ \expandafter\syst_helpers_recurse_indeed\expandafter1\expandafter{\number#1}%
+ \globalpopmacro\recurselevel
+ \globalpopmacro\recurseaction
+ \global\advance\outerrecurse\minusone}
-\unexpanded\def\syst_helpers_recurse_y#1#2%
- {\global\advance\outerrecurse \plusone
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
+\protected\def\syst_helpers_recurse_y#1#2%
+ {\global\advance\outerrecurse\plusone
+ \globalpushmacro\recurseaction
+ \globalpushmacro\recurselevel
\let\recurselevel\!!plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#2}%
+ \protected\gdef\recurseaction##1##2{#2}%
\syst_helpers_recurse_content
- \expandafter\let\expandafter\recurselevel\csname\??recurseindex\the\outerrecurse\endcsname
- \global\advance\outerrecurse \minusone}
-
-\unexpanded\def\doloop#1%
- {\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#1}%
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
- \let\endofloop\syst_helpers_loop
- \syst_helpers_loop1} % no \plusone else \recurselevel wrong
-
-\installsystemnamespace{recursestepwise}
+ \globalpopmacro\recurselevel
+ \globalpopmacro\recurseaction
+ \global\advance\outerrecurse\minusone}
-\unexpanded\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
+% \protected\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4
+% {\global\advance\outerrecurse \plusone
+% \globalpushmacro\recurseaction
+% \globalpushmacro\recurselevel
+% \protected\gdef\recurseaction##1##2{#4}%
+% \normalexpanded{\ifcmpnum#3\zerocount
+% \ifnum#1<#2\relax\relax % so we catch \number\numexpr xx without \relax's
+% \syst_helpers_stepwise_exit
+% \else
+% \syst_helpers_stepwise_reverse
+% \fi
+% \or
+% \syst_helpers_stepwise_exit
+% \or
+% \ifnum#2<#1\relax\relax % so we catch \number\numexpr xx without \relax's
+% \syst_helpers_stepwise_exit
+% \else
+% \syst_helpers_stepwise_recurse
+% \fi
+% \fi{\number#1}{\number#2}{\number#3}}%
+% \globalpopmacro\recurselevel
+% \globalpopmacro\recurseaction
+% \global\advance\outerrecurse\minusone}
+
+\permanent\protected\def\dostepwiserecurse#1#2#3#4% can be made faster by postponing #4 ... todo: remove unused helpers
{\global\advance\outerrecurse \plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1##2{#4}%
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recurselevel
- \csname\??recursestepwise
- % we need the x in order to avoid the \relax that tex adds
- \ifnum#3>\zerocount
- \ifnum#2<#1x\else d\fi
- \orelse\ifnum#3<\zerocount
- \ifnum#1<#2x\else r\fi
+ \globalpushmacro\recurseaction
+ \globalpushmacro\recurselevel
+ \protected\gdef\recurseaction##1##2{#4}%
+ \normalexpanded{\ifcmpnum#3\zerocount
+ \ifnum#1<#2\relax\relax % so we catch \number\numexpr xx without \relax's
+ \doubleexpandafter\gobbletwoarguments
+ \else
+ \tripleexpandafter\syst_helpers_stepwise_reverse
\fi
- \expandafter\endcsname\normalexpanded{{\number#1}{\number#2}{\number#3}}}
- % \expandafter\endcsname\expandafter{\number#1\expandafter}\expandafter{\number#2\expandafter}\expandafter{\number#3}}
+ \or
+ \doubleexpandafter\gobbletwoarguments
+ \orelse\ifnum#2<#1\relax\relax % so we catch \number\numexpr xx without \relax's
+ \doubleexpandafter\gobbletwoarguments
+ \else
+ \doubleexpandafter\syst_helpers_stepwise_recurse
+ \fi\normalexpanded{{\number#1}{\number#2}{\number#3}}}%
+ \globalpopmacro\recurselevel
+ \globalpopmacro\recurseaction
+ \global\advance\outerrecurse\minusone}
-\letvalue{\??recursestepwise x}\syst_helpers_stepwise_exit
-\letvalue{\??recursestepwise d}\syst_helpers_stepwise_recurse
-\letvalue{\??recursestepwise r}\syst_helpers_stepwise_reverse
+% \protected\def\syst_helpers_stepwise_recurse_nop#0#0#0#0%
+% {}
\newcount\fastloopindex
\newcount\fastloopfinal
\let\m_syst_helpers_fast_loop_cs\relax
-\unexpanded\def\dofastloopcs#1%
+\permanent\protected\def\dofastloopcs#1%
{\fastloopfinal#1\relax
\ifcase\fastloopfinal
\expandafter\gobbleoneargument
@@ -3346,12 +3426,12 @@
\expandafter\syst_helpers_fast_loop_cs
\fi}
-\unexpanded\def\syst_helpers_fast_loop_cs#1%
+\protected\def\syst_helpers_fast_loop_cs#1%
{\let\m_syst_helpers_fast_loop_cs#1%
\fastloopindex\plusone
\syst_helpers_fast_loop_cs_step}
-\unexpanded\def\syst_helpers_fast_loop_cs_step
+\protected\def\syst_helpers_fast_loop_cs_step
{\ifnum\fastloopindex>\fastloopfinal
\let\m_syst_helpers_fast_loop_cs\relax
\else
@@ -3362,7 +3442,7 @@
% Helper:
-\unexpanded\def\resetrecurselevel{\let\recurselevel\!!zerocount}
+\permanent\protected\def\resetrecurselevel{\let\recurselevel\!!zerocount}
\let\recurselevel\!!zerocount
@@ -3391,14 +3471,54 @@
%D }
%D \stoptyping
-\unexpanded\def\doloopoverlist#1#2%
+\permanent\protected\def\doloopoverlist#1#2%
{\global\advance\outerrecurse\plusone
- \expandafter\gdef\csname\??recurseaction\the\outerrecurse\endcsname##1{\edef\recursestring{##1}#2}%
- \expandafter\glet\csname\??recurseindex \the\outerrecurse\endcsname\recursestring
- \normalexpanded{\processcommalist[#1]{\expandafter\noexpand\csname\??recurseaction\the\outerrecurse\endcsname}}%
- \expandafter\let\expandafter\recursestring\csname\??recurseindex\the\outerrecurse\endcsname
+ \globalpushmacro\recurseaction
+ \globalpushmacro\recursestring
+ \protected\gdef\recurseaction##1{\edef\recursestring{##1}#2}%
+ \processcommacommand[#1]\recurseaction
+ \globalpopmacro\recursestring
+ \globalpopmacro\recurseaction
\global\advance\outerrecurse\minusone}
+%D This is some \LMTX\ experiment:
+%D
+%D Think of:
+%D
+%D \starttyping
+%D \doloopovermatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd} {
+%D [
+%D \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#1} {(##1 ##2)}
+%D \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#2} {(##1 ##2)}
+%D ]
+%D }
+%D
+%D and:
+%D
+%D \stoptyping
+%D
+%D \starttyping
+%D \def\MyMacro#1{(#1)} \ctxluamatch \MyMacro {(.)} {abcd}
+%D \stoptyping
+
+\aliased\let\matchloopcommand\relax
+
+\permanent\protected\def\doloopovermatch#1#2#3%
+ {\pushmacro\matchloopcommand
+ \enforced\def\matchloopcommand##1##2##3##4##5##6##7##8##9{#3}%
+ \ctxluamatch\matchloopcommand{#1}{#2}%
+ \popmacro\matchloopcommand}
+
+\permanent\def\doloopovermatched#1#2#3%
+ {\beginlocalcontrol
+ \pushmacro\matchloopcommand
+ \enforced\def\matchloopcommand##1##2##3##4##5##6##7##8##9{#3}%
+ \endlocalcontrol
+ \the\ctxluamatch\matchloopcommand{#1}{#2}%
+ \beginlocalcontrol
+ \popmacro\matchloopcommand
+ \endlocalcontrol}
+
%D \macros
%D {newevery,everyline,EveryLine,EveryPar}
%D
@@ -3423,14 +3543,14 @@
\installsystemnamespace{extraevery}
-\unexpanded\def\newevery#1#2%
+\permanent\protected\def\newevery#1#2%
{\ifx#1\everypar\else\newtoks#1\fi% we test for redefinition elsewhere
- \ifx#2\relax\orelse\ifdefined#2\else
+ \ifrelax#2\orelse\ifdefined#2\else
\expandafter\newtoks\csname\??extraevery\csstring#1\endcsname
- \edef#2{\syst_helpers_every#1\csname\??extraevery\csstring#1\endcsname}%
+ \frozen\protected\edef#2{\syst_helpers_every#1\csname\??extraevery\csstring#1\endcsname}%
\fi}
-\unexpanded\def\syst_helpers_every#1#2%
+\protected\def\syst_helpers_every#1#2%
{\removetoks\the#2\from#1%
\appendtoks\the#2\to #1%
#2}
@@ -3444,7 +3564,7 @@
\newtoks \neverypar
-\unexpanded\def\forgeteverypar
+\permanent\protected\def\forgeteverypar
{\everypar{\the\neverypar}}
%D Which we're going to use indeed! When the second argument equals \type {\relax},
@@ -3510,10 +3630,10 @@
%D
%D Both commands accept the prefix \type{\doglobal} for global assignments.
-\unexpanded\def\convertvalue#1\to
+\permanent\protected\def\convertvalue#1\to
{\expandafter\convertcommand\csname#1\endcsname\to}
-\unexpanded\def\defconvertedvalue#1#2% less sensitive for \to
+\permanent\protected\def\defconvertedvalue#1#2% less sensitive for \to
{\expandafter\defconvertedcommand\expandafter#1\csname#2\endcsname}
%D \macros
@@ -3533,60 +3653,64 @@
%D \starttyping
%D \doifassignmentelse {...} {then ...} {else ...}
%D \stoptyping
+%D
+%D So
+%D \startbuffer
+%D \doifelseassignment{a=b}{Y}{N}
+%D \doifelseassignment{a+b}{Y}{N}
+%D
+%D \ifcondition\validassignment {a=b}Y\else N\fi
+%D \ifcondition\novalidassignment{a=b}N\else Y\fi
+%D \ifcondition\novalidassignment {ab}Y\else N\fi
+%D \stopbuffer
+%D
+%D \typebuffer gives: \blank \getbuffer \blank
-\def\syst_helpers_check_if_assignment_else#1=#2#3^^^^0004{\if#2^^^^0003}%
-\def\syst_helpers_check_else_assignment_if#1=#2#3^^^^0004{\unless\if#2^^^^0003}%
-
-\unexpanded\def\doifelseassignment#1%
- {\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004%
- \expandafter\secondoftwoarguments
- \else
+\permanent\protected\def\doifelseassignment#1%
+ {\ifhastok={#1}%
\expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifelseassignmentcs#1#2#3%
- {\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004%
- \expandafter#3%
- \else
+\permanent\protected\def\doifelseassignmentcs#1#2#3%
+ {\ifhastok={#1}%
\expandafter#2%
+ \else
+ \expandafter#3%
\fi}
-\let\doifassignmentelse \doifelseassignment
-\let\doifassignmentelsecs\doifelseassignmentcs
+\aliased\let\doifassignmentelse \doifelseassignment
+\aliased\let\doifassignmentelsecs\doifelseassignmentcs
\newif\ifassignment
-\unexpanded\def\docheckassignment#1%
- {\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004%
- \assignmentfalse
- \else
+\permanent\protected\def\docheckassignment#1%
+ {\ifhastok={#1}%
\assignmenttrue
+ \else
+ \assignmentfalse
\fi}
-%D These can be used for cases where we want less tracing noise.
-
-\unexpanded\def\validassignment#1%
- {\expandafter\syst_helpers_check_else_assignment_if\detokenize{#1}=^^^^0003^^^^0003^^^^0004}
-
-\unexpanded\def\novalidassignment#1%
- {\expandafter\syst_helpers_check_if_assignment_else\detokenize{#1}=^^^^0003^^^^0003^^^^0004}
+\permanent\protected\def\validassignment #1{\ifhastok={#1}} % can become: {\ifhastok=} as we enforce {}
+\permanent\protected\def\novalidassignment#1{\ifnum\ifhastok={#1}\zerocount\else\plusone\fi=\plusone} % or use unless
%D In \ETEX\ we can use \type {\detokenize} and gain some speed, but in general far
%D less that 1\% for \type {\convertargument} and nil for \type {\convertcommand}.
%D This macro is more robust than the pure \TEX\ one, something I found out when
%D primitives like \type {\jobname} were fed (or something undefined).
-\unexpanded\def\convertargument#1\to#2{\dodoglobal\edef#2{\detokenize{#1}}}
-\unexpanded\def\convertcommand #1\to#2{\dodoglobal\edef#2{\expandafter\detokenize\expandafter{#1}}} % hm, only second is also ok
+\permanent\protected\def\convertargument#1\to#2{\dodoglobal\edef#2{\detokenize{#1}}}
+\permanent\protected\def\convertcommand #1\to#2{\dodoglobal\edef#2{\expandafter\detokenize\expandafter{#1}}} % hm, only second is also ok
-\unexpanded\def\defconvertedargument #1#2{\edef#1{\detokenize{#2}}}
-\unexpanded\def\defconvertedcommand #1#2{\edef#1{\detokenize\expandafter{#2}}}
-\unexpanded\def\edefconvertedargument#1#2{\edef#1{#2}%
- \edef#1{\detokenize\expandafter{#1}}}
-\unexpanded\def\gdefconvertedargument#1#2{\xdef#1{\detokenize{#2}}}
-\unexpanded\def\gdefconvertedcommand #1#2{\xdef#1{\detokenize\expandafter{#2}}}
-\unexpanded\def\xdefconvertedargument#1#2{\xdef#1{#2}%
- \xdef#1{\detokenize\expandafter{#1}}}
+\permanent\protected\def\defconvertedargument #1#2{\edef#1{\detokenize{#2}}}
+\permanent\protected\def\defconvertedcommand #1#2{\edef#1{\detokenize\expandafter{#2}}}
+\permanent\protected\def\edefconvertedargument#1#2{\edef#1{#2}%
+ \edef#1{\detokenize\expandafter{#1}}}
+\permanent\protected\def\gdefconvertedargument#1#2{\xdef#1{\detokenize{#2}}}
+\permanent\protected\def\gdefconvertedcommand #1#2{\xdef#1{\detokenize\expandafter{#2}}}
+\permanent\protected\def\xdefconvertedargument#1#2{\xdef#1{#2}%
+ \xdef#1{\detokenize\expandafter{#1}}}
%D When you try to convert a primitive command, you'll find out that the \ETEX\
%D method fails on for instance \type {\jobname} in the sense that it returns the
@@ -3609,7 +3733,7 @@
%D
%D Ahandy macro, for testing purposes only:
-\unexpanded\def\showvalue#1%
+\permanent\protected\def\showvalue#1%
{\ifcsname#1\endcsname
\expandafter\show\csname#1\endcsname
\else
@@ -3629,7 +3753,7 @@
%D
%D Watch the one level expansion of the second argument.
-\unexpanded\def\doifelsemeaning#1#2%
+\permanent\protected\def\doifelsemeaning#1#2%
{\edef\m_syst_string_one{\normalmeaning#1}%
\def \m_syst_string_two{#2}%
\edef\m_syst_string_two{\normalmeaning\m_syst_string_two}%
@@ -3639,7 +3763,7 @@
\expandafter\secondoftwoarguments
\fi}
-\let\doifmeaningelse\doifelsemeaning
+\aliased\let\doifmeaningelse\doifelsemeaning
%D \macros
%D {doifsamestringselse,doifsamestring,doifnotsamestring}
@@ -3658,77 +3782,19 @@
\edef\m_syst_string_two{\detokenize\expandafter{\normalexpanded{#4}}}%
\ifx\m_syst_string_one\m_syst_string_two\expandafter#1\else\expandafter#2\fi}
-\unexpanded\def\doifelsesamestring{\syst_helpers_if_samestring_else\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifsamestring {\syst_helpers_if_samestring_else\firstofoneargument \gobbleoneargument }
-\unexpanded\def\doifnotsamestring {\syst_helpers_if_samestring_else\gobbleoneargument \firstofoneargument }
+\permanent\protected\def\doifelsesamestring{\syst_helpers_if_samestring_else\firstoftwoarguments\secondoftwoarguments}
+\permanent\protected\def\doifsamestring {\syst_helpers_if_samestring_else\firstofoneargument \gobbleoneargument }
+\permanent\protected\def\doifnotsamestring {\syst_helpers_if_samestring_else\gobbleoneargument \firstofoneargument }
-\let\doifsamestringelse\doifelsesamestring
+\aliased\let\doifsamestringelse\doifelsesamestring
-%D \macros
-%D {ConvertToConstant,ConvertConstantAfter}
-%D
-%D When comparing arguments with a constant, we can get into trouble when this
-%D argument consists of tricky expandable commands. One solution for this is
-%D converting the argument to a string of unexpandable characters. To make
-%D comparison possible, we have to convert the constant too.
+%D These are obsolete in MTX:
%D
%D \starttyping
-%D \ConvertToConstant\doifelse {...} {...} {then ...} {else ...}
+%D \ConvertToConstant #1#2#3
+%D \CheckConstantAfter #1#2
+%D \ConvertConstantAfter #1#2#3
%D \stoptyping
-%D
-%D This construction is only needed when the first argument can give troubles.
-%D Misuse can slow down processing.
-%D
-%D \starttyping
-%D \ConvertToConstant\doifelse{\c!alfa} {\c!alfa}{...}{...}
-%D \ConvertToConstant\doifelse{alfa} {\c!alfa}{...}{...}
-%D \ConvertToConstant\doifelse{alfa} {alfa} {...}{...}
-%D \ConvertToConstant\doifelse{alfa \alfa test}{\c!alfa}{...}{...}
-%D \stoptyping
-%D
-%D In examples~2 and~3 both arguments equal, in~1 and~4 they differ.
-
-\unexpanded\def\ConvertToConstant#1#2#3%
- {\edef\m_syst_string_one{\expandafter\detokenize\expandafter{#2}}%
- \edef\m_syst_string_two{\expandafter\detokenize\expandafter{#3}}%
- #1{\m_syst_string_one}{\m_syst_string_two}}
-
-%D When the argument \type{#1} consists of commands, we had better use
-%D
-%D \starttyping
-%D \ConvertConstantAfter\processaction[#1][...]
-%D \ConvertConstantAfter\doifelse{#1}{\v!something}{}{}
-%D \stoptyping
-%D
-%D This commands accepts things like:
-%D
-%D \starttyping
-%D \v!constant
-%D constant
-%D \hbox to \hsize{\rubish}
-%D \stoptyping
-%D
-%D As we will see in the core modules, this macro permits constructions like:
-%D
-%D \starttyping
-%D \setupfootertexts[...][...]
-%D \setupfootertexts[margin][...][...]
-%D \setupfootertexts[\v!margin][...][...]
-%D \stoptyping
-%D
-%D where \type {...} can be anything legally \TEX.
-
-\unexpanded\def\CheckConstantAfter#1#2%
- {\expandafter\convertargument\v!prefix!\to\ascii
- \convertargument#1\to#2\relax
- \doifelseinstring\ascii{#2}
- {\expandafter\convertargument#1\to#2}
- {}}
-
-\unexpanded\def\ConvertConstantAfter#1#2#3%
- {\CheckConstantAfter{#2}\asciia
- \CheckConstantAfter{#3}\asciib
- #1{\asciia}{\asciib}}
%D \macros
%D {assignifempty}
@@ -3741,8 +3807,8 @@
%D
%D We don't explicitly test if the macro is defined.
-\unexpanded\def\assignifempty#1#2% can be sped up
- {\doifsomething{#1}{\def#1{#2}}} % {\doifnot{#1}{}{\def#1{#2}}}
+\permanent\protected\def\assignifempty#1#2%
+ {\iftok{#1}\emptytoks \def#1{#2}\fi}
%D \macros
%D {gobbleuntil,grabuntil,gobbleuntilrelax,
@@ -3754,7 +3820,7 @@
%D In \CONTEXT\ we use a lot of \type {\start}||\type {\stop} like constructions.
%D Sometimes, the \type {\stop} is used as a hard coded delimiter like in: %D
%D \starttyping
-%D \unexpanded\def\startcommand#1\stopcommand%
+%D \protected\def\startcommand#1\stopcommand%
%D {... #1 ...}
%D \stoptyping
%D
@@ -3772,7 +3838,7 @@
%D {\stop}. This means that:
%D
%D \starttyping
-%D \unexpanded\def\starthello%
+%D \protected\def\starthello%
%D {\grabuntil{stophello}\message}
%D
%D \starthello Hello world!\stophello
@@ -3782,10 +3848,10 @@
\let\syst_helpers_grab_indeed\relax
-\unexpanded\def\syst_helpers_grab#1#2%
+\protected\def\syst_helpers_grab#1#2%
{\def\syst_helpers_grab_indeed##1#1{#2{##1}}\syst_helpers_grab_indeed}
-\unexpanded\def\grabuntil#1%
+\permanent\protected\def\grabuntil#1%
{\expandafter\syst_helpers_grab\expandafter{\csname#1\endcsname}}
%D The next command build on this mechanism:
@@ -3812,13 +3878,22 @@
\let\syst_helpers_gobble_indeed\relax
-\unexpanded\def\processbetween#1#2%
+\permanent\protected\def\processbetween#1#2%
{\setvalue{\s!start#1}{\grabuntil{\s!stop#1}{#2}}}
-\unexpanded\def\gobbleuntil#1%
- {\def\syst_helpers_gobble_indeed##1#1{}\syst_helpers_gobble_indeed}
+% \protected\def\gobbleuntil#1%
+% {\def\syst_helpers_gobble_indeed##1#1{}\syst_helpers_gobble_indeed}
+%
+% \protected\def\gobbleuntilrelax#1\relax
+% {}
+
+\permanent\protected\def\gobbleuntil#1%
+ {\def\syst_helpers_gobble_indeed##-#1{}\syst_helpers_gobble_indeed}
-\unexpanded\def\gobbleuntilrelax#1\relax
+\permanent\protected\def\gobbleuntilandfinalize#1%
+ {\def\syst_helpers_gobble_indeed##-#1{#1}\syst_helpers_gobble_indeed}
+
+\permanent\protected\def\gobbleuntilrelax#-\relax
{}
%D The next one simply expands the pickup up tokens.
@@ -3829,7 +3904,7 @@
\let\syst_helpers_until_indeed\relax
-\unexpanded\def\processuntil#1%
+\permanent\protected\def\processuntil#1%
{\def\syst_helpers_until_indeed##1#1{##1}\syst_helpers_until_indeed}
%D \macros
@@ -3898,7 +3973,7 @@
\let\m_syst_helpers_handle_group_after \relax
\let\m_syst_helpers_handle_group_before\relax
-\unexpanded\def\syst_helpers_handle_group_nop
+\protected\def\syst_helpers_handle_group_nop
{\ifnum\currentgrouptype=\semisimplegroupcode
\expandafter\syst_helpers_handle_group_nop_a
\else
@@ -3917,7 +3992,7 @@
\aftergroup\egroup
\m_syst_helpers_handle_group_b}
-\unexpanded\def\syst_helpers_handle_group_normal
+\protected\def\syst_helpers_handle_group_normal
{\bgroup
\afterassignment\m_syst_helpers_handle_group_normal_before
\let\next=}
@@ -3930,7 +4005,7 @@
\aftergroup\egroup
\aftergroup\egroup}
-\unexpanded\def\syst_helpers_handle_group_simple% no inner group (so no kerning interference)
+\protected\def\syst_helpers_handle_group_simple% no inner group (so no kerning interference)
{\bgroup
\afterassignment\m_syst_helpers_handle_group_simple_before
\let\next=}
@@ -3944,7 +4019,7 @@
{\m_syst_helpers_handle_group_a
\egroup}%
-\unexpanded\def\syst_helpers_handle_group_pickup% no inner group (so no kerning interference)
+\protected\def\syst_helpers_handle_group_pickup% no inner group (so no kerning interference)
{\bgroup
\afterassignment\m_syst_helpers_handle_group_pickup_before
\let\next=}
@@ -3956,7 +4031,7 @@
\aftergroup\m_syst_helpers_handle_group_p
\m_syst_helpers_handle_group_b}
-\unexpanded\def\syst_helpers_handle_group_nop_x
+\protected\def\syst_helpers_handle_group_nop_x
{\ifnum\currentgrouptype=\semisimplegroupcode
\begingroup
\aftergroup\endgroup
@@ -3966,7 +4041,7 @@
\fi
\m_syst_helpers_handle_group_b}
-\unexpanded\def\syst_helpers_handle_group_normal_x
+\protected\def\syst_helpers_handle_group_normal_x
{\bgroup
\afterassignment\m_syst_helpers_handle_group_normal_before_x
\let\next=}
@@ -3989,32 +4064,32 @@
%D {\futurelet} obeys blank spaces, and a line||ending token is treated as a blank
%D space. So the final implementation became:
-\unexpanded\def\groupedcommand#1#2%
+\permanent\protected\def\groupedcommand#1#2%
{\def\m_syst_helpers_handle_group_b{#1}%
\def\m_syst_helpers_handle_group_a{#2}%
\futureexpandis\bgroup\syst_helpers_handle_group_normal\syst_helpers_handle_group_nop}
-\unexpanded\def\groupedcommandcs#1#2%
+\permanent\protected\def\groupedcommandcs#1#2%
{\let\m_syst_helpers_handle_group_b#1%
\let\m_syst_helpers_handle_group_a#2%
\futureexpandis\bgroup\syst_helpers_handle_group_normal\syst_helpers_handle_group_nop}
-\unexpanded\def\simplegroupedcommand#1#2%
+\permanent\protected\def\simplegroupedcommand#1#2%
{\def\m_syst_helpers_handle_group_b{#1}%
\def\m_syst_helpers_handle_group_a{#2}%
\futureexpandis\bgroup\syst_helpers_handle_group_simple\syst_helpers_handle_group_nop}
-\unexpanded\def\pickupgroupedcommand#1#2#3%
+\permanent\protected\def\pickupgroupedcommand#1#2#3%
{\def\m_syst_helpers_handle_group_b{#1}%
\def\m_syst_helpers_handle_group_a{#2}%
\def\m_syst_helpers_handle_group_p{#3}%
\futureexpandis\bgroup\syst_helpers_handle_group_pickup\syst_helpers_handle_group_nop}
-\unexpanded\def\triggergroupedcommand#1%
+\permanent\protected\def\triggergroupedcommand#1%
{\def\m_syst_helpers_handle_group_b{#1}%
\futureexpandis\bgroup\syst_helpers_handle_group_normal_x\syst_helpers_handle_group_nop_x}
-\unexpanded\def\triggergroupedcommandcs#1%
+\permanent\protected\def\triggergroupedcommandcs#1%
{\let\m_syst_helpers_handle_group_b#1%
\futureexpandis\bgroup\syst_helpers_handle_group_normal_x\syst_helpers_handle_group_nop_x}
@@ -4028,26 +4103,26 @@
%D {\groupedcommand{\raggedcenter\bf}{\par}}
%D \stoptyping
-%D \macros
-%D {checkdefined}
-%D
-%D The bigger the system, the greater the change that user defined commands collide
-%D with those that are part of the system. The next macro gives a warning when a
-%D command is already defined. We considered blocking the definition, but this is
-%D not always what we want.
-%D
-%D \starttyping
-%D \checkdefined {category} {class} {command}
-%D \stoptyping
-%D
-%D The user is warned with the suggestion to use \type {CAPITALS}. This suggestion
-%D is feasible, because \CONTEXT only defines lowcased macros.
-
-\unexpanded\def\showdefinederror#1#2%
- {\writestatus\m!system{#1 #2 replaces a macro, use CAPITALS!}}
-
-\unexpanded\def\checkdefined#1#2#3%
- {\doifdefined{#3}{\showdefinederror{#2}{#3}}}
+% %D \macros
+% %D {checkdefined}
+% %D
+% %D The bigger the system, the greater the change that user defined commands collide
+% %D with those that are part of the system. The next macro gives a warning when a
+% %D command is already defined. We considered blocking the definition, but this is
+% %D not always what we want.
+% %D
+% %D \starttyping
+% %D \checkdefined {category} {class} {command}
+% %D \stoptyping
+% %D
+% %D The user is warned with the suggestion to use \type {CAPITALS}. This suggestion
+% %D is feasible, because \CONTEXT only defines lowcased macros. These are obsolete:
+%
+% \protected\def\showdefinederror#1#2%
+% {\writestatus\m!system{#1 #2 replaces a macro, use CAPITALS!}}
+%
+% \protected\def\checkdefined#1#2#3%
+% {\doifdefined{#3}{\showdefinederror{#2}{#3}}}
%D \macros
%D {GotoPar,GetPar}
@@ -4098,28 +4173,30 @@
%D \type {\GotoPar}. This one leaves \type {\par} unchanged and is therefore more
%D robust. On the other hand, \type {\AfterPar} is not supported.
-\newtoks\BeforePar
-\newtoks\AfterPar
+\let\syst_helpers_par_before\relax
+\let\syst_helpers_par_around\relax
-\def\redowithpar\par
- {\doifelsenextchar\par\redowithpar\dodowithpar}%
+\permanent\protected\def\dowithpar#1#2%
+ {\globalpushmacro\syst_helpers_par_around
+ \def\syst_helpers_par_around##1\par{#1##1#2\globalpopmacro\syst_helpers_par_around}%
+ \expandafter\syst_helpers_par_around\ignorepars}
-\def\dowithpar#1#2%
- {\def\dodowithpar##1\par{#1##1#2}%
- \redowithpar\par}
+\permanent\protected\def\dogotopar#1%
+ {\globalpushmacro\syst_helpers_par_before
+ \def\syst_helpers_par_before{#1\globalpopmacro\syst_helpers_par_before}%
+ \expandafter\syst_helpers_par_before\ignorepars}
-\def\redogotopar\par
- {\doifelsenextchar\par\redogotopar\dodogotopar}%
+\aliased\let\dogotoparcs\dogotopar
-\def\dogotopar#1%
- {\def\dodogotopar{#1}%
- \redogotopar\par}
+\permanent\protected\def\dogotoparstart
+ {\ignorepars}
-\def\dogotoparcs#1%
- {\let\dodogotopar#1%
- \redogotopar\par}
+%D This is old and kind of obsolete:
-\unexpanded\def\GetPar
+\newtoks\BeforePar
+\newtoks\AfterPar
+
+\permanent\protected\def\GetPar
{\expanded
{\dowithpar
{\the\BeforePar
@@ -4128,7 +4205,7 @@
\BeforePar\emptytoks
\AfterPar\emptytoks}}}
-\unexpanded\def\GotoPar
+\permanent\protected\def\GotoPar
{\expanded
{\dogotopar
{\the\BeforePar
@@ -4167,7 +4244,7 @@
\let\syst_helpers_next_par\relax
\let\syst_helpers_next_arg\relax
-\unexpanded\def\dowithpargument#1%
+\permanent\protected\def\dowithpargument#1%
{\def\syst_helpers_next_par##1 \par{#1{##1}}%
\def\syst_helpers_next_arg##1{#1{##1}}%
\doifelsenextbgroup\syst_helpers_next_arg{\doifelsenextchar\par{#1{}}\syst_helpers_next_par}}
@@ -4195,7 +4272,7 @@
\let\syst_helpers_next_war\relax
\let\syst_helpers_next_arg\relax
-\unexpanded\def\dowithwargument#1%
+\permanent\protected\def\dowithwargument#1%
{\def\syst_helpers_next_war##1 {#1{##1}}%
\def\syst_helpers_next_arg##1{#1{##1}}%
\doifelsenextbgroup\syst_helpers_next_arg\syst_helpers_next_war}
@@ -4229,7 +4306,7 @@
%D commands, the \type {n*} is optional. When this specification is missing, the
%D command executes once.
-\unexpanded\def\dorepeatwithcommand[#1]%
+\permanent\protected\def\dorepeatwithcommand[#1]%
{\syst_helpers_repeat_with_command#1*\empty*\relax}
\def\syst_helpers_repeat_with_command#1*#2#3*#4\relax#5%
@@ -4272,32 +4349,10 @@
%D {doifstringinstringelse}
%D
%D The next macro is meant for situations where both strings are macros. This save
-%D some unneeded expansion.
-%D
-%D \starttyping
-%D \def\doifstringinstringelse#1#2%
-%D {\syst_helpers_do_if_in_string_else#1#2%
-%D \expandafter\firstoftwoarguments
-%D \else
-%D \expandafter\secondoftwoarguments
-%D \fi}
-%D \stoptyping
-%D
-%D A bit faster is:
+%D some unneeded expansion. But now we just alias.
-\def\syst_helpers_if_instring_else_indeed#1%
- {\if#1@%
- \expandafter\secondoftwoarguments
- \else
- \expandafter\firstoftwoarguments
- \fi}
-
-\def\doifelsestringinstring#1#2%
- {\expandafter\def\expandafter\syst_helpers_if_instring_else\expandafter##\expandafter1#1##2##3^^^^0004%
- {\syst_helpers_if_instring_else_indeed##2}%
- \expandafter\expandafter\expandafter\syst_helpers_if_instring_else\expandafter#2#1@@^^^^0004}
-
-\let\doifstringinstringelse\doifelsestringinstring
+\aliased\let\doifelsestringinstring\doifelseinstring
+\aliased\let\doifstringinstringelse\doifelseinstring
%D \macros
%D {appendtoks,prependtoks,appendtoksonce,prependtoksonce,
@@ -4318,60 +4373,42 @@
\newtoks\t_syst_helpers_scratch
\let \m_syst_helpers_scratch\empty
-\unexpanded\def\appendtoks#1\to#2%
- {\ifx\dodoglobal\relax
+\permanent\protected\def\appendtoks#1\to#2%
+ {\ifrelax\dodoglobal
\expandafter\toksapp
\else
\resetglobal
\expandafter\gtoksapp
\fi#2{#1}}
-\unexpanded\def\prependtoks#1\to#2%
- {\ifx\dodoglobal\relax
+\permanent\protected\def\prependtoks#1\to#2%
+ {\ifrelax\dodoglobal
\expandafter\tokspre
\else
\resetglobal
\expandafter\gtokspre
\fi#2{#1}}
-\def\syst_helpers_append_toks_indeed
- {\ifx\dodoglobal\relax
- \expandafter\toksapp
- \else
- \resetglobal
- \expandafter\gtoksapp
- \fi\m_syst_helpers_scratch\t_syst_helpers_scratch}
+\permanent\protected\def\appendtoksonce#1\to#2%
+ {\ifhasxtoks{#1}#2\else
+ \appendtoks#1\to#2%
+ \fi}
-\def\syst_helpers_prepend_toks_indeed
- {\ifx\dodoglobal\relax
- \expandafter\tokspre
- \else
- \resetglobal
- \expandafter\gtokspre
- \fi\m_syst_helpers_scratch\t_syst_helpers_scratch}
-
-\unexpanded\def\appendtoksonce#1\to#2%
- {\let\m_syst_helpers_scratch#2%
- \t_syst_helpers_scratch{#1}%
- \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
- \donothing
- \syst_helpers_append_toks_indeed}
-
-\unexpanded\def\prependtoksonce#1\to#2%
- {\let\m_syst_helpers_scratch#2%
- \t_syst_helpers_scratch{#1}%
- \doifelseintoks\t_syst_helpers_scratch\m_syst_helpers_scratch
- \donothing
- \syst_helpers_prepend_toks_indeed}
+\permanent\protected\def\prependtoksonce#1\to#2%
+ {\ifhasxtoks{#1}{#2}\m_syst_helpers_scratch\else
+ \prependtoks#1\to#2%
+ \fi}
%D The test macro:
-\unexpanded\def\doifelseintoks#1#2% #1 en #2 zijn toks
- {\edef\asciia{\detokenize\expandafter{\the#1}}%
- \edef\asciib{\detokenize\expandafter{\the#2}}%
- \doifelsestringinstring\asciia\asciib}
+\permanent\protected\def\doifelseintoks#1#2% #1 en #2 zijn toks
+ {\ifhasxtoks#1#2%
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
-\let\doifintokselse\doifelseintoks
+\aliased\let\doifintokselse\doifelseintoks
%D Moved from \type {lxml-ini.tex} to here. This one is for generators that collect
%D stuff piecewise, which is sometimes hard on mechanisms that grab content using
@@ -4394,14 +4431,17 @@
\newtoks \collectingtoks
-\unexpanded\def\startcollect #1\stopcollect {\toksapp \collectingtoks{#1}}
-\unexpanded\def\startexpandedcollect#1\stopexpandedcollect{\etoksapp\collectingtoks{#1}}
+\aliased\let\stopcollect \relax
+\aliased\let\stopexpandedcollect\relax
-\unexpanded\def\startcollecting{\collectingtoks\emptytoks}
-\unexpanded\def\stopcollecting {\the\collectingtoks}
+\permanent\protected\def\startcollect #1\stopcollect {\toksapp \collectingtoks{#1}}
+\permanent\protected\def\startexpandedcollect#1\stopexpandedcollect{\etoksapp\collectingtoks{#1}}
-\unexpanded\def\collect {\toksapp \collectingtoks}
-\unexpanded\def\collectexpanded{\etoksapp\collectingtoks}
+\permanent\protected\def\startcollecting{\collectingtoks\emptytoks}
+\permanent\protected\def\stopcollecting {\the\collectingtoks}
+
+\permanent\protected\def\collect {\toksapp \collectingtoks}
+\permanent\protected\def\collectexpanded{\etoksapp\collectingtoks}
%D A nice one too:
@@ -4411,24 +4451,26 @@
% {\scratchtoks{xaa} \removetoks x\from\scratchtoks [\the\scratchtoks]}
% {\scratchtoks{a\relax b} \removetoks \relax\from\scratchtoks [\showthe\scratchtoks]}
-\unexpanded\def\removetoks#1\from#2%
+\let\syst_helpers_remove_toks\relax
+
+\permanent\protected\def\removetoks#1\from#2%
{\def\syst_helpers_remove_toks##1#1##2\empty\empty\empty##3^^^^0004%
{\def\m_syst_string_one{##3}%
- \ifx\m_syst_string_one\empty#2{##1}\else#2{##1##2}\fi}%
+ \ifempty\m_syst_string_one#2{##1}\else#2{##1##2}\fi}%
\expandafter\syst_helpers_remove_toks\the#2\empty\empty\empty#1\empty\empty\empty^^^^0004}
%D Also:
-\unexpanded\def\appendetoks#1\to#2%
- {\ifx\dodoglobal\relax
+\permanent\protected\def\appendetoks#1\to#2%
+ {\ifrelax\dodoglobal
\expandafter\etoksapp
\else
\resetglobal
\expandafter\xtoksapp
\fi#2{#1}}
-\unexpanded\def\prependetoks#1\to#2%
- {\ifx\dodoglobal\relax
+\permanent\protected\def\prependetoks#1\to#2%
+ {\ifrelax\dodoglobal
\expandafter\etokspre
\else
\resetglobal
@@ -4437,12 +4479,12 @@
%D Hm.
-\unexpanded\def\flushtoks#1% nb: can reassign to #1 again, hence the indirectness
+\permanent\protected\def\flushtoks#1% nb: can reassign to #1 again, hence the indirectness
{\t_syst_helpers_scratch#1\relax
\dodoglobal#1\emptytoks
\the\t_syst_helpers_scratch\relax}
-\let\dotoks\the
+\aliased\let\dotoks\the
%D \macros
%D {beforesplitstring,aftersplitstring}
@@ -4462,87 +4504,116 @@
\let\syst_helpers_split_string\relax
-\unexpanded\def\beforesplitstring#1\at#2\to#3%
- {\def\syst_helpers_split_string##1#2##2#2##3\\%
- {\def#3{##1}}%
- \expandafter\syst_helpers_split_string#1#2#2\\}
-
-\unexpanded\def\aftersplitstring#1\at#2\to#3%
- {\def\syst_helpers_split_string##1#2##2@@@##3\\%
- {\def#3{##2}}%
- \expandafter\syst_helpers_split_string#1@@@#2@@@\\}
+\permanent\protected\def\beforesplitstring#1\at#2\to#3%
+ {\def\syst_helpers_split_string##1#2##0^^^^0004% no #- as we need to count
+ {\ifarguments
+ \let#3\empty
+ \or
+ \let#3\empty
+ \else
+ \def#3{##1}%
+ \fi}%
+ \expandafter\syst_helpers_split_string#1^^^^0004\ignorearguments\ignorearguments}
+
+\permanent\protected\def\aftersplitstring#1\at#2\to#3%
+ {\def\syst_helpers_split_string##0#2##2^^^^0004% no #- as we need to count
+ {\ifarguments
+ \let#3\empty
+ \or
+ \def#3{#1}%
+ \else
+ \def#3{##2}%
+ \fi}%
+ \expandafter\syst_helpers_split_string#1^^^^0004\ignorearguments\ignorearguments}
%D \macros
%D {splitstring,greedysplitstring}
%D
%D A bonus macro.
-\unexpanded\def\splitstring#1\at#2\to#3\and#4%
- {\def\syst_helpers_split_string##1#2##2\empty\empty\empty##3\\%
- {\def#3{##1}%
- \def\syst_helpers_split_string{##3}%
- \ifx\syst_helpers_split_string\empty
+\permanent\protected\def\splitstring#1\at#2\to#3\and#4%
+ {\def\syst_helpers_split_string##1#2##2^^^^0004%
+ {\ifarguments
+ \let#3\empty
+ \let#4\empty
+ \or
+ \def#3{#1}%
\let#4\empty
\else
+ \def#3{##1}%
\def#4{##2}%
- \fi}%
- \expandafter\syst_helpers_split_string#1\empty\empty\empty#2\empty\empty\empty\\}
-
-\unexpanded\def\greedysplitstring#1\at#2\to#3\and#4%
- {\edef\asciib{#1}%
- \let\asciic\asciib
- \let#3\empty
- \let#4\empty
- \doloop
- {\expandafter\splitstring\asciib\at#2\to\asciia\and\asciib
- \ifx\asciib\empty
- \exitloop
+ \fi}%
+ \expandafter\syst_helpers_split_string#1^^^^0004\ignorearguments\ignorearguments}
+
+\permanent\protected\def\greedysplitstring#1\at#2\to#3\and#4%
+ {\def\syst_helpers_split_string##1#2##2^^^^0004%
+ {\ifarguments
+ \let#3\empty
+ \let#4\empty
+ \or
+ \def#3{#1}%
+ \let#4\empty
\else
- % not \edef#3{\ifx#3\empty\else#3#2\fi\asciia} else
- % /root/path fails because then #3==empty
- \edef#3{\ifcase\recurselevel\or\else#3#2\fi\asciia}%
- \let#4\asciib
- \fi}%
- \ifx#3\empty\let#3\asciic\fi}
+ \def#3{##1}%
+ \def#4{##2}%
+ \def\syst_helpers_split_string####1#2####2^^^^0004%
+ {\ifarguments
+ \or
+ \else
+ \expandafter\def\expandafter#3\expandafter{#3####1}%
+ \def#4{####2}%
+ \syst_helpers_split_string####2^^^^0004\ignorearguments\ignorearguments
+ \fi}%
+ \syst_helpers_split_string##2^^^^0004\ignorearguments\ignorearguments
+ \fi}%
+ \expandafter\syst_helpers_split_string#1^^^^0004\ignorearguments\ignorearguments}
%D \macros
%D {beforetestandsplitstring,
%D aftertestandsplitstring,
%D testandsplitstring}
-\unexpanded\def\beforetestandsplitstring#1\at#2\to#3%
- {\def\syst_helpers_split_string##1#2##2#2##3##4\\%
- {\ifx##3\empty\let#3\empty\else\def#3{##1}\fi}%
- \expandafter\syst_helpers_split_string#1#2#2\empty\\}
+\aliased\let\beforetestandsplitstring\beforesplitstring
-\unexpanded\def\aftertestandsplitstring#1\at#2\to#3%
- {\def\syst_helpers_split_string ##1#2##2@@@##3##4\\%
- {\ifx##3\empty\let#3\empty\else\def#3{##2}\fi}%
- \expandafter\syst_helpers_split_string #1@@@#2@@@\empty\\}
-
-\def\testandsplitstring#1\at#2\to#3\and#4%
- {\def\syst_helpers_split_string##1#2##2#2##3##4\\%
- {\ifx##3\empty\let#3\empty\let#4\empty\else\def#3{##1}\def#4{##2}\fi}%
- \expandafter\syst_helpers_split_string#1#2#2\empty\\}
+\permanent\protected\def\aftertestandsplitstring#1\at#2\to#3%
+ {\def\syst_helpers_split_string##0#2##2^^^^0004% no #- as we need to count
+ {\ifarguments
+ \let#3\empty
+ \or
+ \let#3\empty
+ \else
+ \def#3{##2}%
+ \fi}%
+ \expandafter\syst_helpers_split_string#1^^^^0004\ignorearguments\ignorearguments}
+
+\permanent\protected\def\testandsplitstring#1\at#2\to#3\and#4%
+ {\def\syst_helpers_split_string##1#2##2^^^^0004%
+ {\ifarguments
+ \let#3\empty
+ \let#4\empty
+ \or
+ \let#3\empty
+ \let#4\empty
+ \else
+ \def#3{##1}%
+ \def#4{##2}%
+ \fi}%
+ \expandafter\syst_helpers_split_string#1^^^^0004\ignorearguments\ignorearguments}
%D \macros
-%D {splitatperiod,
-%D {splitatcomma,
-%D splitatasterisk,
-%D splitatcolon,
-%D splitatcolons}
-
-\unexpanded\def\splitatperiod #1{\normalexpanded{\syst_helpers_splitatperiod #1}..\relax}
-\unexpanded\def\splitatcomma #1{\normalexpanded{\syst_helpers_splitatcomma #1},,\relax} % not at ", "
-\unexpanded\def\splitatasterisk#1{\normalexpanded{\syst_helpers_splitatasterisk#1}**\relax}
-\unexpanded\def\splitatcolon #1{\normalexpanded{\syst_helpers_splitatcolon #1}::\relax}
-\unexpanded\def\splitatcolons #1{\normalexpanded{\syst_helpers_splitatcolons #1}::::\relax}
-
-\unexpanded\def\syst_helpers_splitatperiod #1.#2.#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatcomma #1,#2,#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatasterisk #1*#2*#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatcolon #1:#2:#3\relax#4#5{\def#4{#1}\def#5{#2}}
-\unexpanded\def\syst_helpers_splitatcolons #1::#2::#3\relax#4#5{\edef#4{#1}\edef#5{#2}}
+%D {splitatperiod, splitatcomma, splitatasterisk, splitatcolon, splitatcolons}
+
+\protected\def\syst_helpers_splitatperiod #1.#2.#-^^^^0004#3#4{\def #3{#1}\def #4{#2}}
+\protected\def\syst_helpers_splitatcomma #1,#2,#-^^^^0004#3#4{\def #3{#1}\def #4{#2}}
+\protected\def\syst_helpers_splitatasterisk #1*#2*#-^^^^0004#3#4{\def #3{#1}\def #4{#2}}
+\protected\def\syst_helpers_splitatcolon #1:#2:#-^^^^0004#3#4{\def #3{#1}\def #4{#2}}
+\protected\def\syst_helpers_splitatcolons #1::#2::#-^^^^0004#3#4{\edef#3{#1}\edef#4{#2}}
+
+\permanent\protected\def\splitatperiod #1{\normalexpanded{\syst_helpers_splitatperiod #1}..^^^^0004}
+\permanent\protected\def\splitatcomma #1{\normalexpanded{\syst_helpers_splitatcomma #1},,^^^^0004} % not at ", "
+\permanent\protected\def\splitatasterisk#1{\normalexpanded{\syst_helpers_splitatasterisk#1}**^^^^0004}
+\permanent\protected\def\splitatcolon #1{\normalexpanded{\syst_helpers_splitatcolon #1}::^^^^0004}
+\permanent\protected\def\splitatcolons #1{\normalexpanded{\syst_helpers_splitatcolons #1}::::^^^^0004}
%D \macros
%D {removesubstring}
@@ -4555,7 +4626,7 @@
%D
%D Which in terms of \TEX\ looks like:
-\unexpanded\def\removesubstring#1\from#2\to#3%
+\permanent\protected\def\removesubstring#1\from#2\to#3%
{\splitstring#2\to\m_syst_string_one\and\m_syst_string_two
\dodoglobal#3{\m_syst_string_one\m_syst_string_two}}
@@ -4612,53 +4683,52 @@
%D
%D The faster alternatives are:
-\unexpanded\def\appendtocommalist#1#2%
- {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}
+\permanent\protected\def\appendtocommalist#1#2%
+ {\dodoglobal\edef#2{\ifempty#2\else#2,\fi#1}}
-\unexpanded\def\prependtocommalist#1#2%
- {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}
+\permanent\protected\def\prependtocommalist#1#2%
+ {\dodoglobal\edef#2{#1\ifempty#2\else,#2\fi}}
-\unexpanded\def\addtocommalist#1#2% {item} \cs
+\permanent\protected\def\addtocommalist#1#2% {item} \cs
{\rawdoifelseinset{#1}#2\resetglobal
- {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}}
+ {\dodoglobal\edef#2{\ifempty#2\else#2,\fi#1}}}
-\unexpanded\def\pretocommalist#1#2% {item} \cs
+\permanent\protected\def\pretocommalist#1#2% {item} \cs
{\rawdoifelseinset{#1}#2\resetglobal
- {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}}
+ {\dodoglobal\edef#2{#1\ifempty#2\else,#2\fi}}}
-\unexpanded\def\robustdoifelseinset#1#2%
+\permanent\protected\def\robustdoifelseinset#1#2%
{\edef\m_syst_string_one{\detokenize\expandafter{\normalexpanded{#1}}}%
\edef\m_syst_string_two{\detokenize\expandafter{\normalexpanded{#2}}}%
\rawdoifelseinset\m_syst_string_one\m_syst_string_two}
-\let\robustdoifinsetelse\robustdoifelseinset
+\aliased\let\robustdoifinsetelse\robustdoifelseinset
-\unexpanded\def\robustaddtocommalist#1#2% {item} \cs
+\permanent\protected\def\robustaddtocommalist#1#2% {item} \cs
{\robustdoifelseinset{#1}#2\resetglobal
- {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}}
+ {\dodoglobal\edef#2{\ifempty#2\else#2,\fi#1}}}
-\unexpanded\def\robustpretocommalist#1#2% {item} \cs
+\permanent\protected\def\robustpretocommalist#1#2% {item} \cs
{\robustdoifelseinset{#1}#2\resetglobal
- {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}}
+ {\dodoglobal\edef#2{#1\ifempty#2\else,#2\fi}}}
-\unexpanded\def\xsplitstring#1#2% \cs {str}
- {\def\syst_helpers_split_string##1,#2,##2,#2,##3\\%
- {\edef\m_syst_string_one{\bcleanedupcommalist##1\empty\empty\relax}%
- \edef\m_syst_string_two{\acleanedupcommalist##2,,\relax}}%
+\permanent\protected\def\xsplitstring#1#2% \cs {str}
+ {\def\syst_helpers_split_string##1,#2,##2,#2,##-\\%
+ {\edef\m_syst_string_one{\syst_cleanedup_commalist_b##1\empty\empty\relax}%
+ \edef\m_syst_string_two{\syst_cleanedup_commalist_a##2,,\relax}}%
\expandafter\syst_helpers_split_string\expandafter,#1,,#2,,#2,\\}
-\def\bcleanedupcommalist#1#2#3\relax{\if#1,\else#1\fi\if#2,\else#2\fi#3}
-\def\bcleanedupcommalist#1#2\relax{\if#1,\else#1\fi#2}
-\def\acleanedupcommalist#1,,#2\relax{#1}
+\def\syst_cleanedup_commalist_b#1#2\relax{\if#1,\else#1\fi#2}
+\def\syst_cleanedup_commalist_a#1,,#-\relax{#1}
-\unexpanded\def\removefromcommalist#1#2% to be sped up
+\permanent\protected\def\removefromcommalist#1#2% to be sped up
{\rawdoifelseinset{#1}#2%
{\normalexpanded{\xsplitstring\noexpand#2{#1}}%
\dodoglobal\edef#2%
- {\ifx\m_syst_string_one\empty
+ {\ifempty\m_syst_string_one
\m_syst_string_two
\else
- \m_syst_string_one\ifx\m_syst_string_two\empty\else,\m_syst_string_two\fi
+ \m_syst_string_one\ifempty\m_syst_string_two\else,\m_syst_string_two\fi
\fi}}
\resetglobal}
@@ -4674,14 +4744,14 @@
\def\syst_helpers_substitute_in_comma_list_step#1%
{\edef\m_syst_string_three{#1}%
\ifx\m_syst_string_one\m_syst_string_three
- \ifx\m_syst_string_two\empty \else
- \edef\m_syst_string_four{\ifx\m_syst_string_four\empty\else\m_syst_string_four,\fi\m_syst_string_two}%
+ \ifempty\m_syst_string_two \else
+ \edef\m_syst_string_four{\ifempty\m_syst_string_four\else\m_syst_string_four,\fi\m_syst_string_two}%
\fi
\else
- \edef\m_syst_string_four{\ifx\m_syst_string_four\empty\else\m_syst_string_four,\fi#1}%
+ \edef\m_syst_string_four{\ifempty\m_syst_string_four\else\m_syst_string_four,\fi#1}%
\fi}
-\unexpanded\def\substituteincommalist#1#2#3% old, new, list (slooow)
+\permanent\protected\def\substituteincommalist#1#2#3% old, new, list (slooow)
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#2}%
\let\m_syst_string_four\empty
@@ -4713,12 +4783,12 @@
\newcount\c_syst_helpers_comma_list_index
\let \m_syst_helpers_comma_list_target\empty
-\let\newcommalistelement\empty
+\mutable\let\newcommalistelement\empty
-\def\syst_helpers_replace_in_comma_list_step#1%
+\def\syst_helpers_replace_in_comma_list_step#1% we can use #+ here too
{\ifnum\commalistcounter=\c_syst_helpers_comma_list_index\relax
- \ifx\newcommalistelement\empty\else
- \ifx\m_syst_helpers_comma_list_target\empty
+ \ifempty\newcommalistelement\else
+ \ifempty\m_syst_helpers_comma_list_target
\let\m_syst_helpers_comma_list_target\newcommalistelement
\else
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter
@@ -4728,7 +4798,7 @@
\fi
\def\commalistelement{#1}%
\else
- \ifx\m_syst_helpers_comma_list_target\empty
+ \ifempty\m_syst_helpers_comma_list_target
\ifx\nexttoken\bgroup % is known -)
\def\m_syst_helpers_comma_list_target{{#1}}%
\else
@@ -4744,7 +4814,7 @@
\fi
\advance\commalistcounter\plusone}
-\unexpanded\def\replaceincommalist#1#2% #1 = commalistelement #2 = position starts at 1
+\permanent\protected\def\replaceincommalist#1#2% #1 = commalistelement #2 = position starts at 1
{\c_syst_helpers_comma_list_index#2\relax
\let\m_syst_helpers_comma_list_target\empty
\let\commalistelement\empty
@@ -4768,7 +4838,7 @@
\expandafter\syst_helpers_comma_list_command_global_step
\fi}
-\unexpanded\def\globalprocesscommalist[#1]#2%
+\permanent\protected\def\globalprocesscommalist[#1]#2%
{\glet\m_syst_helpers_comma_list_command_global#2%
\expandafter\syst_helpers_comma_list_command_global_step#1,],}
@@ -4782,13 +4852,22 @@
%D \PtToCm{dimension}
%D \stoptyping
-{\catcode`\.=\othercatcode
- \catcode`\p=\othercatcode
- \catcode`\t=\othercatcode
- \gdef\WITHOUTPT#1pt{#1}}
+% {\catcode`\.=\othercatcode
+% \catcode`\p=\othercatcode
+% \catcode`\t=\othercatcode
+% \gdef\WITHOUTPT#1pt{#1}}
+%
+% \def\withoutpt#1%
+% {\expandafter\WITHOUTPT#1}
+%
+% Okay, not really an impressive extension to the engine, but better than some macro
+% that is demonstrating deeper understanding of \TEX. It's anyway a trivial extension
+% anyway. There are actually many examples of very advanced macros and exposure of
+% how clever one is that could be done cheap in the engine. It's just that at the time
+% that \TEX\ was written, it made no sense to add a lot of that. After decades we know
+% what extras we need.
-\def\withoutpt#1%
- {\expandafter\WITHOUTPT#1}
+\permanent\def\withoutpt#1{\thewithoutunit\dimexpr#1} % best use the primitive directly
%D The capitals are needed because \type {p} and \type {t} have catcode~12, while
%D macronames only permit tokens with the catcode~11. As a result we cannot use the
@@ -4796,8 +4875,10 @@
%D manipulations, we advice to study the \TEX book in detail. Because this macro
%D does not do any assignment, we can use it in the following way too.
-\def\PtToCm#1%
- {\withoutpt\the\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
+% \def\PtToCm#1%
+% {\withoutpt\the\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
+
+\permanent\def\PtToCm#1{\thewithoutunit\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
%D We also support:
%D
@@ -4811,27 +4892,40 @@
% \dimensiontocount{10.49pt}\scratchcounter \the\scratchcounter / \numberofpoints{10.49pt}
% \dimensiontocount{10.51pt}\scratchcounter \the\scratchcounter / \numberofpoints{10.51pt}
-\def\dimensiontocount#1#2{#2\numexpr\dimexpr#1\relax/\maxcard\relax}
-\def\numberofpoints #1{\the\numexpr\dimexpr#1\relax/\maxcard\relax}
+\permanent\def\dimensiontocount#1#2{#2\numexpr\dimexpr#1\relax/\maxcard\relax}
+\permanent\def\numberofpoints #1{\the\numexpr\dimexpr#1\relax/\maxcard\relax}
%D \macros
-%D {swapdimens,swapcounts,swapmacros,
+%D {swapdimens,swapskips,swapcounts,swapmacros,
%D globalswapdimens,globalswapcounts,globalswapmacros}
%D
%D Simple but effective are the next two macros. There name exactly states their
%D purpose.
\newdimen\d_syst_helpers_swapped
+\newskip \s_syst_helpers_swapped
\newcount\c_syst_helpers_swapped
\let \m_syst_helpers_swapped\relax
-\unexpanded\def\swapdimens#1#2{\d_syst_helpers_swapped#1#1#2#2\d_syst_helpers_swapped}
-\unexpanded\def\swapcounts#1#2{\c_syst_helpers_swapped#1#1#2#2\c_syst_helpers_swapped}
-\unexpanded\def\swapmacros#1#2{\let\m_syst_helpers_swapped#1\let#1#2\let#2\m_syst_helpers_swapped}
+% \protected\def\swapdimens#1#2{\d_syst_helpers_swapped#1#1#2#2\d_syst_helpers_swapped}
+% \protected\def\swapskips #1#2{\s_syst_helpers_swapped#1#1#2#2\s_syst_helpers_swapped}
+% \protected\def\swapcounts#1#2{\c_syst_helpers_swapped#1#1#2#2\c_syst_helpers_swapped}
+% \protected\def\swapmacros#1#2{\let\m_syst_helpers_swapped#1\let#1#2\let#2\m_syst_helpers_swapped}
+
+\aliased\let\swapdimens\swapcsvalues
+\aliased\let\swapskips \swapcsvalues
+\aliased\let\swapcounts\swapcsvalues
+\aliased\let\swapmacros\swapcsvalues
-\unexpanded\def\globalswapdimens#1#2{\d_syst_helpers_swapped#1\global#1#2\global#2\d_syst_helpers_swapped}
-\unexpanded\def\globalswapcounts#1#2{\c_syst_helpers_swapped#1\global#1#2\global#2\c_syst_helpers_swapped}
-\unexpanded\def\globalswapmacros#1#2{\let\m_syst_helpers_swapped#1\glet#1#2\glet#2\m_syst_helpers_swapped}
+% \protected\def\globalswapdimens#1#2{\d_syst_helpers_swapped#1\global#1#2\global#2\d_syst_helpers_swapped}
+% \protected\def\globalswapskips #1#2{\s_syst_helpers_swapped#1\global#1#2\global#2\s_syst_helpers_swapped}
+% \protected\def\globalswapcounts#1#2{\c_syst_helpers_swapped#1\global#1#2\global#2\c_syst_helpers_swapped}
+% \protected\def\globalswapmacros#1#2{\let\m_syst_helpers_swapped#1\glet#1#2\glet#2\m_syst_helpers_swapped}
+
+\permanent\protected\def\globalswapdimens{\global\swapcsvalues}
+\permanent\protected\def\globalswapskips {\global\swapcsvalues}
+\permanent\protected\def\globalswapcounts{\global\swapcsvalues}
+\permanent\protected\def\globalswapmacros{\global\swapcsvalues}
%D \macros
%D {pushmacro,popmacro}
@@ -4842,56 +4936,9 @@
%D \pushmacro\macro
%D \popmacro\macro
%D \stoptyping
-%D
-%D Beware: global!
-
-\installsystemnamespace{localpushedmacro}
-\installsystemnamespace{globalpushedmacro}
-
-\let\m_syst_helpers_push_macro\empty
-
-\newcount\c_syst_helpers_pop_count
-
-\def\syst_helpers_push_macro_new_global
- {\expandafter\newcount\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
- \global\advance\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname\plusone}
-
-\def\syst_helpers_push_macro_new_local
- {\expandafter\newcount\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
- \global\advance\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname\plusone}
-
-\unexpanded\def\globalpushmacro#1%
- {\xdef\m_syst_helpers_push_macro{\csstring#1}%
- \ifcsname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
- \global\advance\lastnamedcs\plusone
- \else
- \syst_helpers_push_macro_new_global
- \fi
- \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
-
-\unexpanded\def\localpushmacro#1% this one can be used to push a value over an \egroup
- {\xdef\m_syst_helpers_push_macro{\csstring#1}%
- \ifcsname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
- \global\advance\lastnamedcs\plusone
- \else
- \syst_helpers_push_macro_new_local
- \fi
- \expandafter\glet\csname\the\lastnamedcs\m_syst_helpers_push_macro\endcsname#1}
-\unexpanded\def\globalpopmacro#1%
- {\xdef\m_syst_helpers_push_macro{\csstring#1}%
- \c_syst_helpers_pop_count\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
- \global\advance\lastnamedcs \minusone
- \expandafter\glet\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
-
-\unexpanded\def\localpopmacro#1%
- {\xdef\m_syst_helpers_push_macro{\csstring#1}%
- \c_syst_helpers_pop_count\csname\??localpushedmacro\m_syst_helpers_push_macro\endcsname
- \global\advance\lastnamedcs \minusone
- \expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
-
-\let\pushmacro\localpushmacro
-\let\popmacro \localpopmacro
+\permanent\let\pushmacro\localpushmacro
+\permanent\let\popmacro \localpopmacro
%D \macros
%D {setlocalhsize,distributedhsize}
@@ -4911,7 +4958,7 @@
\newdimen\localhsize
-\unexpanded\def\setlocalhsize % don't change !
+\permanent\protected\def\setlocalhsize % don't change !
{\doifelsenextoptional
\syst_helpers_set_local_hsize_yes
\syst_helpers_set_local_hsize_nop}
@@ -4923,7 +4970,7 @@
{\syst_helpers_set_local_hsize_nop
\advance\localhsize#1\relax}
-\def\availablehsize
+\permanent\def\availablehsize
{\dimexpr
\hsize-\leftskip-\rightskip
\ifnum\hangafter<\zerocount
@@ -4931,10 +4978,10 @@
\fi
\relax}
-\def\distributedhsize#1#2#3%
+\permanent\def\distributedhsize#1#2#3%
{\dimexpr(#1-\numexpr#3-1\relax\dimexpr#2\relax)/#3\relax}
-\def\hsizefraction#1#2%
+\permanent\def\hsizefraction#1#2%
{\dimexpr#1/#2\relax}
%D \macros
@@ -4947,104 +4994,104 @@
%D three tokens per call. Anyone familiar with the not||values ones, can derive
%D their meaning from the definitions.
-\unexpanded\def\doifvalue#1#2%
+\permanent\protected\def\doifvalue#1#2%
{\iftok{\csname#1\endcsname}{#2}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifnotvalue#1#2%
+\permanent\protected\def\doifnotvalue#1#2%
{\iftok{\csname#1\endcsname}{#2}%
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifelsevalue#1#2%
+\permanent\protected\def\doifelsevalue#1#2%
{\iftok{\csname#1\endcsname}{#2}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifnothing#1%
+\permanent\protected\def\doifnothing#1%
{\iftok{#1}\emptytoks
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifsomething#1%
+\permanent\protected\def\doifsomething#1%
{\iftok{#1}\emptytoks
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifelsenothing#1%
+\permanent\protected\def\doifelsenothing#1%
{\iftok{#1}\emptytoks
- \expandafter\firstoftwoarguments
+ \expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\doifelsesomething#1%
+\permanent\protected\def\doifelsesomething#1%
{\iftok{#1}\emptytoks
\expandafter\secondoftwoarguments
\else
\expandafter\firstoftwoarguments
\fi}
-\unexpanded\def\doifvaluenothing#1%
+\permanent\protected\def\doifvaluenothing#1%
{\iftok{\csname#1\endcsname}\emptytoks
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\doifvaluesomething#1%
+\permanent\protected\def\doifvaluesomething#1%
{\iftok{\csname#1\endcsname}\emptytoks
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifelsevaluenothing#1%
+\permanent\protected\def\doifelsevaluenothing#1%
{\iftok{\csname#1\endcsname}\emptytoks
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\doifvalueelse \doifelsevalue
-\let\doifnothingelse \doifelsenothing
-\let\doifsomethingelse \doifelsesomething
-\let\doifvaluenothingelse\doifelsevaluenothing
+\aliased\let\doifvalueelse \doifelsevalue
+\aliased\let\doifnothingelse \doifelsenothing
+\aliased\let\doifsomethingelse \doifelsesomething
+\aliased\let\doifvaluenothingelse\doifelsevaluenothing
%D \macros
%D {doifemptyelsevalue, doifemptyvalue, doifnotemptyvalue}
%D
%D Also handy:
-\def\doifelseemptyvalue#1%
- {\expandafter\ifx\csname#1\endcsname\empty
+\permanent\def\doifelseemptyvalue#1%
+ {\expandafter\ifempty\csname#1\endcsname
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\doifemptyvalueelse\doifelseemptyvalue
+\aliased\let\doifemptyvalueelse\doifelseemptyvalue
-\def\doifemptyvalue#1%
- {\expandafter\ifx\csname#1\endcsname\empty
+\permanent\def\doifemptyvalue#1%
+ {\expandafter\ifempty\csname#1\endcsname
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\def\doifnotemptyvalue#1%
- {\expandafter\ifx\csname#1\endcsname\empty
+\permanent\def\doifnotemptyvalue#1%
+ {\expandafter\ifempty\csname#1\endcsname
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
@@ -5056,6 +5103,8 @@
%D A complete match of two sets can be tested with \type {\doifallcommonelse}, where
%D the first two arguments are sets.
+\let\syst_helpers_do_common_check_all\gobbleoneargument
+
\def\syst_helpers_do_if_all_common_else#1#2#3#4% slow
{\def\syst_helpers_do_common_check_all##1%
{\doifnotinset{##1}{#4}\donefalse
@@ -5064,11 +5113,11 @@
\processcommalist[#3]\syst_helpers_do_common_check_all
\ifdone\expandafter#1\else\expandafter#2\fi}
-\unexpanded\def\doifelseallcommon{\syst_helpers_do_if_all_common_else\firstoftwoarguments\secondoftwoarguments}
-\unexpanded\def\doifallcommon {\syst_helpers_do_if_all_common_else\firstofonearguments\gobbleoneargument }
-\unexpanded\def\doifnotallcommon {\syst_helpers_do_if_all_common_else\gobbleoneargument \firstofonearguments }
+\permanent\protected\def\doifelseallcommon{\syst_helpers_do_if_all_common_else\firstoftwoarguments\secondoftwoarguments}
+\permanent\protected\def\doifallcommon {\syst_helpers_do_if_all_common_else\firstofoneargument \gobbleoneargument }
+\permanent\protected\def\doifnotallcommon {\syst_helpers_do_if_all_common_else\gobbleoneargument \firstofoneargument }
-\let\doifallcommonelse\doifelseallcommon
+\aliased\let\doifallcommonelse\doifelseallcommon
%D \macros
%D {DOIF,DOIFELSE,DOIFNOT}
@@ -5089,38 +5138,34 @@
%D These might end up as \LUA based helpers (i.e. consider these
%D obsolete:
-\unexpanded\def\syst_helpers_do_IF#1#2%
- {\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
+\protected\def\syst_helpers_do_IF#1#2%
+ {\uppercase{\iftok{#1}{#2}}%
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\unexpanded\def\syst_helpers_do_IF_NOT#1#2%
- {\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
+\protected\def\syst_helpers_do_IF_NOT#1#2%
+ {\uppercase{\iftok{#1}{#2}}%
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\syst_helpers_do_IF_ELSE#1#2%
- {\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
+\protected\def\syst_helpers_do_IF_ELSE#1#2%
+ {\uppercase{\iftok{#1}{#2}}%
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\unexpanded\def\syst_helpers_do_IF_INSTRING_ELSE#1#2%
- {\uppercase{\syst_helpers_do_if_in_string_else{$#1$}{$#2$}}%
- \expandafter\firstoftwoarguments
- \else
- \expandafter\secondoftwoarguments
- \fi}
+\protected\def\syst_helpers_do_IF_INSTRING_ELSE#1#2%
+ {\uppercase{\doifelseinstring{#1}{#2}}}
-\unexpanded\def\DOIF #1#2{\normalexpanded{\syst_helpers_do_IF {#1}{#2}}}% will become obsolete
-\unexpanded\def\DOIFNOT #1#2{\normalexpanded{\syst_helpers_do_IF_NOT {#1}{#2}}}% will become obsolete
-\unexpanded\def\DOIFELSE #1#2{\normalexpanded{\syst_helpers_do_IF_ELSE {#1}{#2}}}% will become obsolete
-\unexpanded\def\DOIFINSTRINGELSE #1#2{\normalexpanded{\syst_helpers_do_IF_INSTRING_ELSE{#1}{#2}}}% will become obsolete
+\permanent\protected\def\DOIF #1#2{\normalexpanded{\syst_helpers_do_IF {#1}{#2}}}% will become obsolete
+\permanent\protected\def\DOIFNOT #1#2{\normalexpanded{\syst_helpers_do_IF_NOT {#1}{#2}}}% will become obsolete
+\permanent\protected\def\DOIFELSE #1#2{\normalexpanded{\syst_helpers_do_IF_ELSE {#1}{#2}}}% will become obsolete
+\permanent\protected\def\DOIFINSTRINGELSE #1#2{\normalexpanded{\syst_helpers_do_IF_INSTRING_ELSE{#1}{#2}}}% will become obsolete
%D \macros
%D {dosingleargumentwithset,
@@ -5145,7 +5190,7 @@
%D \def\dodefinesomething[#1][#2]%
%D {\getparameters[\??xx#1][#2]}
%D
-%D \unexpanded\def\definesomething%
+%D \protected\def\definesomething%
%D {\dodoubleargumentwithset\dodefinesomething}
%D \stoptyping
%D
@@ -5155,24 +5200,20 @@
%D \definesomething[alfa,beta,...][variable=...,...]
%D \stoptyping
-\let\m_syst_helpers_with_set_command\empty
-\let\syst_helpers_with_set_step \relax
-
-\def\syst_helpers_with_set_double[#1][#2]%
- {\doifsomething{#1}%
- {\def\syst_helpers_with_set_step##1{\m_syst_helpers_with_set_command[##1][#2]}%
- \processcommalist[#1]\syst_helpers_with_set_step}}
+\let\syst_helpers_with_set_step\relax % maybe push pop
-\def\syst_helpers_with_set_triple[#1][#2][#3]%
- {\doifsomething{#1}%
- {\def\syst_helpers_with_set_step##1{\m_syst_helpers_with_set_command[##1][#2][#3]}%
- \processcommalist[#1]\syst_helpers_with_set_step}}
+\permanent\tolerant\protected\def\dodoubleemptywithset#1#*[#2]#*[#3]%
+ {\doifsomething{#2}%
+ {\def\syst_helpers_with_set_step##1{#1[##1][#3]}%
+ \processcommalist[#2]\syst_helpers_with_set_step}}
-\def\dodoubleemptywithset #1{\let\m_syst_helpers_with_set_command#1\dodoubleempty \syst_helpers_with_set_double} % \command
-\def\dodoubleargumentwithset#1{\let\m_syst_helpers_with_set_command#1\dodoubleargument\syst_helpers_with_set_double} % \command
+\permanent\tolerant\protected\def\dotripleemptywithset#1#*[#2]#*[#3]#*[#4]%
+ {\doifsomething{#2}%
+ {\def\syst_helpers_with_set_step##1{#1[##1][#3][#4]}%
+ \processcommalist[#2]\syst_helpers_with_set_step}}
-\def\dotripleemptywithset #1{\let\m_syst_helpers_with_set_command#1\dotripleempty \syst_helpers_with_set_triple} % \command
-\def\dotripleargumentwithset#1{\let\m_syst_helpers_with_set_command#1\dotripleargument\syst_helpers_with_set_triple} % \command
+\aliased\let\dodoubleargumentwithset\dodoubleemptywithset
+\aliased\let\dotripleargumentwithset\dotripleemptywithset
%D \macros
%D {stripcharacters,stripspaces}
@@ -5187,8 +5228,8 @@
%D \stripspaces\from\one\to\two
%D \stoptyping
%D
-%D Both the old string \type{\one} and the new one \type{\two}
-%D are expanded. This command is a special case of:
+%D Both the old string \type {\one} and the new one \type {\two} are expanded. This
+%D command is a special case of:
%D
%D \starttyping
%D \stripcharacter\char\from\one\to\two
@@ -5197,9 +5238,10 @@
%D As we can see below, spaces following a control sequence are to enclosed in \type
%D {{}}.
+\let\syst_helpers_strip_character \relax
\let\m_syst_helpers_strip_character\empty
-\unexpanded\def\stripcharacter#1\from#2\to#3%
+\permanent\protected\def\stripcharacter#1\from#2\to#3%
{\def\syst_helpers_strip_character##1#1##2\end
{\edef\m_syst_helpers_strip_character{\m_syst_helpers_strip_character##1}%
\doifnotempty{##2}{\syst_helpers_strip_character##2\end}}%
@@ -5208,7 +5250,7 @@
\expandafter\syst_helpers_strip_character\m_syst_string_one#1\end
\dodoglobal\let#3\m_syst_helpers_strip_character}
-\unexpanded\def\stripspaces\from#1\to#2% will become \unspacestring#1\from#2
+\permanent\protected\def\stripspaces\from#1\to#2% will become \unspacestring#1\from#2
{\stripcharacter{ }\from#1\to#2}
%D \macros
@@ -5217,7 +5259,7 @@
%D The next macro does the same but is more compatible with other macros, like \type
%D {\convert...}.
-\unexpanded\def\unspacestring#1\to#2%
+\permanent\protected\def\unspacestring#1\to#2%
{\stripcharacter{ }\from#1\to#2}
%D \macros
@@ -5237,9 +5279,8 @@
%D
%D We can of course gobble more arguments using the appropriate gobbling command.
-\def\executeifdefined#1% #2 / never change this one again
+\permanent\def\executeifdefined#1% #2 / never change this one again
{\ifcsname#1\endcsname
- % \csname#1\expandafter\expandafter\expandafter\endcsname\expandafter\gobbleoneargument
\expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
@@ -5263,16 +5304,23 @@
%D Is this one still needed?
-\def\syst_helpers_if_some_space_else#1 #2#3^^^^0004{\if\noexpand#2@}
+% \def\syst_helpers_if_some_space_else#1 #2#3^^^^0004{\if\noexpand#2@}
+%
+% \def\doifelsesomespace#1% % #2#3%
+% {\syst_helpers_if_some_space_else#1 @ @^^^^0004% #3\else#2\fi}
+% \expandafter\secondoftwoarguments
+% \else
+% \expandafter\firstoftwoarguments
+% \fi}
-\def\doifelsesomespace#1% % #2#3%
- {\syst_helpers_if_some_space_else#1 @ @^^^^0004% #3\else#2\fi}
- \expandafter\secondoftwoarguments
- \else
- \expandafter\firstoftwoarguments
- \fi}
+\permanent\edef\doifelsesomespace#1%
+ {\noexpand\ifhastok\space{#1}%
+ \noexpand\expandafter\noexpand\firstoftwoarguments
+ \noexpand\else
+ \noexpand\expandafter\noexpand\secondoftwoarguments
+ \noexpand\fi}
-\let\doifsomespaceelse\doifelsesomespace
+\aliased\let\doifsomespaceelse\doifelsesomespace
%D \macros
%D {processseparatedlist}
@@ -5307,23 +5355,46 @@
\let\syst_helpers_process_separated_list_step\relax
-\def\syst_helpers_process_separated_list#1]#2[#3]#4%
- {\def\syst_helpers_process_separated_list_step##1##2#3%
- {\def\m_syst_string_one{##2}% suggested by VZ
- \if]##1%
- \let\syst_helpers_process_separated_list_step\relax
- \orelse\ifx\blankspace\m_syst_string_one
- #4{##1}%
- \orelse\if]##2%
- \let\syst_helpers_process_separated_list_step\relax
- \else
- #4{##1##2}%
- \fi
- \syst_helpers_process_separated_list_step}%
- \expandafter\syst_helpers_process_separated_list_step\gobbleoneargument#1#3]#3}
-
-\unexpanded\def\processseparatedlist[%
- {\syst_helpers_process_separated_list\relax}
+% \def\syst_helpers_process_separated_list#1]#*[#2]#3%
+% {\def\syst_helpers_process_separated_list_step##1##2#2%
+% {\def\m_syst_string_one{##2}% suggested by VZ
+% \if]##1%
+% \let\syst_helpers_process_separated_list_step\relax
+% \orelse\ifx\blankspace\m_syst_string_one
+% #3{##1}%
+% \orelse\if]##2%
+% \let\syst_helpers_process_separated_list_step\relax
+% \else
+% #3{##1##2}%
+% \fi
+% \syst_helpers_process_separated_list_step}%
+% \expandafter\syst_helpers_process_separated_list_step\gobbleoneargument#1#2]#2}
+
+% \def\syst_helpers_process_separated_list#1]#*[#2]#3%
+% {\def\syst_helpers_process_separated_list_step##1##2#2%
+% {\def\m_syst_string_one{##2}% suggested by VZ
+% \if]##1%
+% \orelse\ifx\blankspace\m_syst_string_one
+% #3{##1}%
+% \expandafter\syst_helpers_process_separated_list_step
+% \orelse\if]##2%
+% \else
+% #3{##1##2}%
+% \expandafter\syst_helpers_process_separated_list_step
+% \fi
+% }%
+% \expandafter\syst_helpers_process_separated_list_step\gobbleoneargument#1#2]#2}
+
+% \permanent\protected\def\processseparatedlist[%
+% {\syst_helpers_process_separated_list\relax}
+
+\permanent\protected\def\processseparatedlist[#+]#*[#2]#3%
+ {\tolerant\def\syst_helpers_process_separated_list_step##1#2%
+ {\ifarguments\or
+ #3{##1}%
+ \expandafter\syst_helpers_process_separated_list_step
+ \fi}%
+ \syst_helpers_process_separated_list_step#1\ignorearguments\ignorearguments}
%D \macros
%D {processlist}
@@ -5345,7 +5416,7 @@
\let\syst_helpers_process_any_list_indeed\relax
\let\syst_helpers_process_any_list_step \relax
-\unexpanded\def\processlist#1#2#3#4% no blank skipping !
+\permanent\protected\def\processlist#1#2#3#4% no blank skipping !
{\def\syst_helpers_process_any_list_indeed##1#2%
{\def\syst_helpers_process_any_list_step####1####2#3%
{\ifx#2####1%
@@ -5374,9 +5445,19 @@
%D This command can be integrated in \type {\getparameters}, but we decided best not
%D to do so.
-\unexpanded\def\processassignlist#1[#2]#3%
- {\def\syst_helpers_process_assign_list_assign[##1=##2=##3]%
- {\doif{##3}\relax{#3{##1}}}%
+% \protected\def\processassignlist#1[#2]#3%
+% {\def\syst_helpers_process_assign_list_assign[##1=##2=##3]%
+% {\doif{##3}\relax{#3{##1}}}%
+% \def\syst_helpers_process_assign_list_step##1%
+% {\syst_helpers_process_assign_list_assign[##1==\relax]}%
+% \processcommalist[#2]\syst_helpers_process_assign_list_step}
+
+\let\syst_helpers_process_assign_list_assign\gobbleoneoptional
+\let\syst_helpers_process_assign_list_step \gobbleoneargument
+
+\permanent\protected\def\processassignlist#1[#2]#3%
+ {\def\syst_helpers_process_assign_list_assign[##1=##-=##2]%
+ {\doif{##2}\relax{#3{##1}}}%
\def\syst_helpers_process_assign_list_step##1%
{\syst_helpers_process_assign_list_assign[##1==\relax]}%
\processcommalist[#2]\syst_helpers_process_assign_list_step}
@@ -5397,7 +5478,7 @@
\let\m_syst_helpers_untexed\empty
-\unexpanded\def\untexsomething
+\permanent\protected\def\untexsomething
{\begingroup
\catcode\leftbraceasciicode \ignorecatcode
\catcode\rightbraceasciicode\ignorecatcode
@@ -5409,8 +5490,8 @@
\endgroup
\let#3\m_syst_helpers_untexed}
-\unexpanded\def\untexargument{\untexsomething\convertargument}
-\unexpanded\def\untexcommand {\untexsomething\convertcommand}
+\permanent\protected\def\untexargument{\untexsomething\convertargument}
+\permanent\protected\def\untexcommand {\untexsomething\convertcommand}
%D \macros
%D {ScaledPointsToBigPoints,ScaledPointsToWholeBigPoints}
@@ -5424,13 +5505,13 @@
%D \ScaledPointsToWholeBigPoints {number} \target
%D \stoptyping
-\let\tobigpoints \clf_tobigpoints
-\let\towholebigpoints\clf_towholebigpoints
+\aliased\let\tobigpoints \clf_tobigpoints % todo: permanent at lua end
+\aliased\let\towholebigpoints\clf_towholebigpoints % todo: permanent at lua end
-\unexpanded\def\PointsToBigPoints #1#2{\edef#2{\tobigpoints #1}} % can be avoided
-\unexpanded\def\PointsToWholeBigPoints #1#2{\edef#2{\towholebigpoints#1}} % can be avoided
-\unexpanded\def\ScaledPointsToBigPoints #1#2{\edef#2{\tobigpoints #1\scaledpoint}} % obsolete
-\unexpanded\def\ScaledPointsToWholeBigPoints#1#2{\edef#2{\towholebigpoints#1\scaledpoint}} % obsolete
+\permanent\protected\def\PointsToBigPoints #1#2{\edef#2{\tobigpoints #1}} % can be avoided
+\permanent\protected\def\PointsToWholeBigPoints #1#2{\edef#2{\towholebigpoints#1}} % can be avoided
+\permanent\protected\def\ScaledPointsToBigPoints #1#2{\edef#2{\tobigpoints #1\scaledpoint}} % obsolete
+\permanent\protected\def\ScaledPointsToWholeBigPoints#1#2{\edef#2{\towholebigpoints#1\scaledpoint}} % obsolete
%D \macros
%D {PointsToReal}
@@ -5442,8 +5523,11 @@
%D \PointsToReal {dimension} \target
%D \stoptyping
-\unexpanded\def\PointsToReal#1#2%
- {\edef#2{\withoutpt\the\dimexpr#1}}
+% \protected\def\PointsToReal#1#2%
+% {\edef#2{\withoutpt\the\dimexpr#1}}
+
+\permanent\protected\def\PointsToReal#1#2%
+ {\edef#2{\thewithoutunit\dimexpr#1}}
%D \macros
%D {dontleavehmode}
@@ -5459,16 +5543,16 @@
%D first version was:
%D
%D \starttyping
-%D \def\dontleavehmode{\ifhmode\else\ifmmode\else$ $\fi\fi}
+%D \def\dontleavehmode{\ifhmode\orelse\ifmmode\else$ $\fi}
%D \stoptyping
%D
%D Next, Taco came with a better alternative (using mathsurround):
%D
%D \starttyping
%D \def\dontleavehmode
-%D {\ifhmode\else \ifmmode\else
+%D {\ifhmode\orelse\ifmmode\else
%D {\mathsurround\zeropoint\everymath\emptytoks$ $}%
-%D \fi \fi}
+%D \fi}
%D \stoptyping
%D
%D And finaly we got the following alternative, one that avoids interfering grouping
@@ -5477,15 +5561,15 @@
%D \starttyping
%D \newbox\b_syst_helpers_dlh
%D
-%D \unexpanded\def\dontleavehmode
-%D {\ifhmode\else \ifmmode\else
+%D \protected\def\dontleavehmode
+%D {\ifhmode\orelse\ifmmode\else
%D \setbox\b_syst_helpers_dlh\hbox{\mathsurround\zeropoint\everymath\emptytoks$ $}\unhbox\b_syst_helpers_dlh
-%D \fi \fi}
+%D \fi}
%D \stoptyping
%D
%D But, as we run a recent version of \TEX, we can use the new primitive:
-\ifdefined\normalquitvmode \let\dontleavehmode\normalquitvmode \fi
+\aliased\let\dontleavehmode\quitvmode
%D \macros
%D {utfupper, utflower, uppercasestring, lowercasestring}
@@ -5502,11 +5586,11 @@
%D These macros are sort of obsolete as we never use uppercase this way. But
%D nevertheless we provide them:
-\def\utfupper#1{\clf_upper{#1}} % expandable
-\def\utflower#1{\clf_lower{#1}} % expandable
+\permanent\def\utfupper#1{\clf_upper{#1}} % expandable
+\permanent\def\utflower#1{\clf_lower{#1}} % expandable
-\unexpanded\def\uppercasestring#1\to#2{\dodoglobal\edef#2{\clf_upper{#1}}}
-\unexpanded\def\lowercasestring#1\to#2{\dodoglobal\edef#2{\clf_lower{#1}}}
+\permanent\protected\def\uppercasestring#1\to#2{\dodoglobal\edef#2{\clf_upper{#1}}}
+\permanent\protected\def\lowercasestring#1\to#2{\dodoglobal\edef#2{\clf_lower{#1}}}
%D \macros
%D {handletokens}
@@ -5551,14 +5635,14 @@
\expandafter\syst_helpers_count_token
\fi}
-\unexpanded\def\counttoken#1\in#2\to#3%
+\permanent\protected\def\counttoken#1\in#2\to#3%
{\privatescratchcounter\zerocount
\def\m_syst_string_one{#1}%
\def\m_syst_string_two{\end}%
\syst_helpers_count_token#2\end
\dodoglobal#3\privatescratchcounter}
-\unexpanded\def\counttokens#1\to#2%
+\permanent\protected\def\counttokens#1\to#2%
{\privatescratchcounter\zerocount
\def\syst_helpers_count_token##1{\advance\privatescratchcounter\plusone}%
\handletokens#1\with\syst_helpers_count_token
@@ -5570,7 +5654,9 @@
%D Running this one not always gives the expected results. Consider for instance the
%D macro for which I originally wrote this token handler.
-\unexpanded\def\splitofftokens#1\from#2\to#3% slow but hardly used
+\let\syst_helpers_split_off_tokens\gobbleoneargument
+
+\permanent\protected\def\splitofftokens#1\from#2\to#3% slow but hardly used
{\ifnum#1>\zerocount
\privatescratchcounter#1\relax
\def\syst_helpers_split_off_tokens##1%
@@ -5614,10 +5700,14 @@
%D assignment, this time by using \type {\futurelet}, and grabbing an argument as
%D well. That way we can handle the sentinal, a blank space and grouped tokens.
-\unexpanded\def\syst_helpers_handle_tokens % \nexthandledtoken is part of interface
+\mutable\let\nexthandledtoken\empty % part of public interface
+
+\let\syst_helpers_handle_tokens_command\relax
+
+\protected\def\syst_helpers_handle_tokens
{\futurelet\nexthandledtoken\syst_helpers_handle_tokens_indeed}
-\def\handletokens#1\with#2%
+\permanent\protected\def\handletokens#1\with#2%
{\gdef\syst_helpers_handle_tokens_command{#2}% permits more complex #2's
\syst_helpers_handle_tokens#1\end}
@@ -5666,25 +5756,24 @@
\newtoks\everysettrialtypesetting
\newtoks\everyresettrialtypesetting
-\unexpanded\def\settrialtypesetting {\the\everysettrialtypesetting } % obeys grouping so
-\unexpanded\def\resettrialtypesetting{\the\everyresettrialtypesetting} % this one is seldom needed
+\permanent\protected\def\settrialtypesetting {\the\everysettrialtypesetting } % obeys grouping so
+\permanent\protected\def\resettrialtypesetting{\the\everyresettrialtypesetting} % this one is seldom needed
-\let\iftrialtypesetting\iffalse % so we have no \trialtypesettingtrue|false in mkiv !
+\aliased\let\iftrialtypesetting\iffalse % so we have no \trialtypesettingtrue|false in mkiv !
-\appendtoks \let\iftrialtypesetting\iftrue \to \everysettrialtypesetting
-\appendtoks \let\iftrialtypesetting\iffalse \to \everyresettrialtypesetting
+\appendtoks \enforced\aliased\let\iftrialtypesetting\iftrue \to \everysettrialtypesetting
+\appendtoks \enforced\aliased\let\iftrialtypesetting\iffalse \to \everyresettrialtypesetting
%D \macros
%D {twodigitrounding}
%D
-%D When using \type {\special}s or \type {\pdfliteral}s, it sometimes makes sense to
-%D limit the precission. The next macro rounds a real number to two digits. It takes
-%D one argument and only works in \ETEX.
+%D The next macro rounds a real number to two digits. They are probably no longer needed
+%D but we keep them around for a while.
-\def\integerrounding #1{\clf_rounded\zerocount\numexpr#1\relax}
-\def\onedigitrounding #1{\clf_rounded\plusone \numexpr#1\relax}
-\def\twodigitrounding #1{\clf_rounded\plustwo \numexpr#1\relax}
-\def\threedigitrounding#1{\clf_rounded\plusthree\numexpr#1\relax}
+\permanent\def\integerrounding #1{\clf_rounded\zerocount\numexpr#1\relax}
+\permanent\def\onedigitrounding #1{\clf_rounded\plusone \numexpr#1\relax}
+\permanent\def\twodigitrounding #1{\clf_rounded\plustwo \numexpr#1\relax}
+\permanent\def\threedigitrounding#1{\clf_rounded\plusthree\numexpr#1\relax}
%D \macros
%D {processcontent}
@@ -5692,15 +5781,15 @@
%D This macro is first used in the tabulation macros.
%D
%D \starttyping
-%D \unexpanded\def\starthans%
+%D \protected\def\starthans%
%D {\processcontent{stophans}\test{\message{\test}\wait}}
%D \stoptyping
-\unexpanded\def\processcontent#1%
+\permanent\protected\def\processcontent#1%
{\begingroup\expandafter\syst_helpers_process_content\csname#1\endcsname}
-\unexpanded\def\syst_helpers_process_content#1#2#3%
- {\unexpanded\def\syst_helpers_process_content##1#1%
+\protected\def\syst_helpers_process_content#1#2#3%
+ {\protected\def\syst_helpers_process_content##1#1%
{\endgroup\def#2{##1}#3}%
\syst_helpers_process_content}
@@ -5709,14 +5798,11 @@
%D
%D These two macros savely grab and dispose two arguments.
-\def\dogobblesingleempty{\dosingleempty\syst_helpers_gobble_single_empty}
-\def\dogobbledoubleempty{\dodoubleempty\syst_helpers_gobble_double_empty}
-
-\def\syst_helpers_gobble_single_empty [#1]{}
-\def\syst_helpers_gobble_double_empty[#1][#2]{}
+\permanent\tolerant\protected\def\dogobblesingleempty [#-]{}
+\permanent\tolerant\protected\def\dogobbledoubleempty[#-]#*[#-]{}
-\let\gobblesingleempty\dogobblesingleempty % also used
-\let\gobbledoubleempty\dogobbledoubleempty % also used
+\aliased\let\gobblesingleempty\dogobblesingleempty % also used
+\aliased\let\gobbledoubleempty\dogobbledoubleempty % also used
%D \macros
%D {setdimensionwithunit, freezedimensionwithunit}
@@ -5734,10 +5820,10 @@
%D As an alternative for the next macro we can use a global assignment inside a box.
%D The \type {\empty}'s permits gobbling while preventing spurious \type {\relax}'s.
-\unexpanded\def\setdimensionwithunit#1#2#3% number unit dimension / nice trick
+\permanent\protected\def\setdimensionwithunit#1#2#3% number unit dimension / nice trick
{\afterassignment\gobblefourarguments#1=#2#3pt\relax\empty\empty\empty\empty}
-\unexpanded\def\freezedimensionwithunit#1#2%
+\permanent\protected\def\freezedimensionwithunit#1#2%
{\setdimensionwithunit\privatescratchdimen#1{#2}\edef#1{\the\privatescratchdimen}}
%D \macros
@@ -5745,28 +5831,28 @@
%D
%D Not that fast I guess, but here's a way to test for token registers being empty.
-\unexpanded\def\doifelsesometoks#1%
+\permanent\protected\def\doifelsesometoks#1%
{\iftok#1\emptytoks
\expandafter\secondoftwoarguments
\else
\expandafter\firstoftwoarguments
\fi}
-\unexpanded\def\doifsometoks#1%
+\permanent\protected\def\doifsometoks#1%
{\iftok#1\emptytoks
\expandafter\gobbleoneargument
\else
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\doifemptytoks#1%
+\permanent\protected\def\doifemptytoks#1%
{\iftok#1\emptytoks
\expandafter\firstofoneargument
\else
\expandafter\gobbleoneargument
\fi}
-\let\doifsometokselse\doifelsesometoks
+\aliased\let\doifsometokselse\doifelsesometoks
%D \macros
%D {startstrictinspectnextcharacter}
@@ -5782,12 +5868,12 @@
\expandafter\m_syst_action_nop
\fi}
-\unexpanded\def\strictdoifelsenextoptional#1#2%
+\permanent\protected\def\strictdoifelsenextoptional#1#2%
{\def\m_syst_action_yes{#1}%
\def\m_syst_action_nop{#2}%
\futurelet\nexttoken\syst_helpers_strict_inspect_next_character}
-\let\strictdoifnextoptionalelse\strictdoifelsenextoptional
+\aliased\let\strictdoifnextoptionalelse\strictdoifelsenextoptional
%D \macros
%D {gobblespacetokens}
@@ -5797,7 +5883,7 @@
%\def\gobblespacetokens
% {\doifnextcharelse\empty\donothing\donothing} % no {}\do\do !
-\def\gobblespacetokens
+\permanent\def\gobblespacetokens
{\afterassignment\nexttoken\let\nexttoken=}
%D \macros
@@ -5805,21 +5891,21 @@
%D
%D As the name says, this macro converts its argument to a (rather safe) string.
-\let\verbatimstring\detokenize
+\aliased\let\verbatimstring\detokenize
%D These are needed in ordinal number conversions:
-\def\lastdigit#1%
+\permanent\def\lastdigit#1%
{\expandafter\thelastdigit\number#1\relax}
-\def\thelastdigit#1#2%
- {\ifx#2\relax#1\else\expandafter\thelastdigit\expandafter#2\fi}
+\permanent\def\thelastdigit#1#2%
+ {\ifrelax#2#1\else\expandafter\thelastdigit\expandafter#2\fi}
-\def\lasttwodigits#1%
+\permanent\def\lasttwodigits#1%
{\expandafter\thelasttwodigits\expandafter0\number#1\relax}
-\def\thelasttwodigits#1#2#3% 0 dig ... \relax
- {\ifx#3\relax#1#2\else\expandafter\thelasttwodigits\expandafter#2\expandafter#3\fi}
+\permanent\def\thelasttwodigits#1#2#3% 0 dig ... \relax
+ {\ifrelax#3#1#2\else\expandafter\thelasttwodigits\expandafter#2\expandafter#3\fi}
%D \macros
%D {serializecommalist}
@@ -5828,10 +5914,12 @@
\let\syst_helpers_serialize_comma_list_step\relax
+\mutable\let\serializedcommalist\empty
+
\def\syst_helpers_serialize_comma_list_step#1%
{\edef\serializedcommalist{\serializedcommalist#1}}
-\unexpanded\def\serializecommalist[#1]%
+\permanent\protected\def\serializecommalist[#1]%
{\let\serializedcommalist\empty
\processcommacommand[#1]\syst_helpers_serialize_comma_list_step}
@@ -5849,10 +5937,10 @@
%D relax-less \type {\purenumber}. This macro works ok with \type {\the}, \type
%D {\number} as well as \ETEX's \type {\numexpr}.
-\def\purenumber#1{\expandafter\firstofoneargument\expandafter{\number#1}}
+\permanent\def\purenumber#1{\expandafter\firstofoneargument\expandafter{\number#1}}
%D \macros
-%D {filterfromvalue}
+%D {filterfromvalue, filterfromnext}
%D
%D \starttyping
%D \setvalue{xx}{{A}{B}{C}}
@@ -5861,59 +5949,40 @@
%D \filterfromvalue{xx}{3}{2}
%D \filterfromvalue{xx}{3}{1}
%D \stoptyping
-%D
-%D An alternative is to store 'max' in the list, say:
-%D
-%D \starttyping
-%D \setvalue{xx}{3{A}{B}{C}}
-%D
-%D \filterfromvalues{3}{xx}{3}
-%D \filterfromvalues{3}{xx}{2}
-%D \filterfromvalues{3}{xx}{1}
-%D \stoptyping
-%D
-%D I'll implement this when I'm in \quotation {writing dirty macros mood}.
-
-\def\dofilterfromstr#1#2% max n % no need to be fast
- {\expandafter \expandafter \expandafter \csstring
- \ifcase#1\or \ifcase#2\or
- \firstofoneargument \else
- \gobbleoneargument \fi
- \or \ifcase#2\or
- \firstoftwoarguments \or
- \secondoftwoarguments \else
- \gobbletwoarguments \fi
- \or \ifcase#2\or
- \firstofthreearguments \or
- \secondofthreearguments \or
- \thirdofthreearguments \else
- \gobblethreearguments \fi
- \or \ifcase#2\or
- \firstoffourarguments \or
- \secondoffourarguments \or
- \thirdoffourarguments \or
- \fourthoffourarguments \else
- \gobblefourarguments \fi
- \or \ifcase#2\or
- \firstoffivearguments \or
- \secondoffivearguments \or
- \thirdoffivearguments \or
- \fourthoffivearguments \or
- \fifthoffivearguments \else
- \gobblefivearguments \fi
- \fi}
-\def\filterfromvalue#1#2#3% value max n
- {\expandafter\doubleexpandafter\csname % we use the fact that an
- \expandafter\ifx\csname#1\endcsname\relax % undefined cs has become \relax
- \csstring\gobbleoneargument % which we then gobble here
- \else
- \dofilterfromstr{#2}{#3}%
- \fi
- \endcsname\csname#1\endcsname}
+% can be sped up with ignored arguments
-\def\filterfromnext#1#2% max n {..}{..}{..}{..}
- {\csname\dofilterfromstr{#1}{#2}\endcsname}
+\def\syst_filter_from_next_yes#1%
+ {\advance\scratchcounterone\plusone
+ \ifnum\scratchcounterone=\scratchcountertwo
+ \scratchtoks{#1}%
+ \fi
+ \ifnum\scratchcounterone=\scratchcounterthree
+ \expandafter\syst_filter_from_next_nop
+ \else
+ \expandafter\syst_filter_from_next_yes
+ \fi}
+
+\def\syst_filter_from_next_nop
+ {\expandafter\endgroup
+ \expandafter\endlocalcontrol
+ \the\scratchtoks}
+
+\permanent\def\filterfromnext#1#2% max n {..}{..}{..}{..}
+ {\beginlocalcontrol
+ \begingroup
+ \scratchcounterone \zerocount
+ \scratchcountertwo #2%
+ \scratchcounterthree #1%
+ \syst_filter_from_next_yes}
+
+\permanent\def\filterfromvalue#1#2#3% max n {..}{..}{..}{..}
+ {\beginlocalcontrol
+ \begingroup
+ \scratchcounterone \zerocount
+ \scratchcountertwo #3%
+ \scratchcounterthree #2%
+ \expandafter\expandafter\expandafter\syst_filter_from_next_yes\csname#1\endcsname}
%D \macros
%D {definemeasure}
@@ -5926,29 +5995,16 @@
\installsystemnamespace{measure}
-\unexpanded\def\definemeasure
- {\dodoubleargument\syst_helpers_define_measure}
-
-\def\syst_helpers_define_measure[#1][#2]%
- {\expandafter\def\csname\??measure#1\endcsname{#2}}
-
-\unexpanded\def\freezemeasure
- {\dodoubleargument\syst_helpers_freeze_measure}
-
-\def\syst_helpers_freeze_measure[#1][#2]%
- {\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}}
+\permanent\tolerant\protected\def\definemeasure[#1]#*[#2]{\defcsname \??measure#1\endcsname{#2}}
+\permanent\tolerant\protected\def\freezemeasure[#1]#*[#2]{\edefcsname\??measure#1\endcsname{\the\dimexpr#2}}
-\unexpanded\def\setmeasure #1#2{\expandafter\def \csname\??measure#1\endcsname{#2}} % quick way
-\unexpanded\def\setgmeasure#1#2{\expandafter\gdef\csname\??measure#1\endcsname{#2}} % quick way
-\unexpanded\def\setemeasure#1#2{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
-\unexpanded\def\setxmeasure#1#2{\expandafter\xdef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
+\permanent\protected\def\setmeasure #1#2{\defcsname \??measure#1\endcsname{#2}} % quick way
+\permanent\protected\def\setgmeasure#1#2{\gdefcsname\??measure#1\endcsname{#2}} % quick way
+\permanent\protected\def\setemeasure#1#2{\edefcsname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
+\permanent\protected\def\setxmeasure#1#2{\xdefcsname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
-\def\measure
- {\the\measured}
-
-\def\measured#1%
- %{\dimexpr\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi\relax}
- {\dimexpr\ifcsname\??measure#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
+\permanent\def\measure {\the\measured}
+\permanent\def\measured#1{\dimexpr\ifcsname\??measure#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
% #2 could be omitted, but we want to support spaces
%
@@ -5963,31 +6019,17 @@
\installsystemnamespace{quantity}
-\unexpanded\def\definequantity
- {\dodoubleargument\syst_helpers_define_quantity}
-
-\def\syst_helpers_define_quantity[#1][#2]%
- {\expandafter\def\csname\??quantity#1\endcsname{#2}}
-
-\unexpanded\def\freezequantity
- {\dodoubleargument\syst_helpers_freeze_quantity}
-
-\def\syst_helpers_freeze_quantity[#1][#2]%
- {\expandafter\edef\csname\??quantity#1\endcsname{\the\numexpr#2}}
-
-\unexpanded\def\setquantity #1#2{\expandafter\def \csname\??quantity#1\endcsname{#2}} % quick way
-\unexpanded\def\setgquantity#1#2{\expandafter\gdef\csname\??quantity#1\endcsname{#2}} % quick way
-\unexpanded\def\setequantity#1#2{\expandafter\edef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
-\unexpanded\def\setxquantity#1#2{\expandafter\xdef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
-
-\def\quantity
- {\the\quantitied}
+\permanent\tolerant\protected\def\definequantity[#1]#*[#2]{\defcsname \??quantity#1\endcsname{#2}}
+\permanent\tolerant\protected\def\freezequantity[#1]#*[#2]{\edefcsname\??quantity#1\endcsname{\the\numexpr#2}}
-\def\quantitied#1%
- {\numexpr\ifcsname\??quantity#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
+\permanent\protected\def\setquantity #1#2{\defcsname \??quantity#1\endcsname{#2}} % quick way
+\permanent\protected\def\setgquantity#1#2{\gdefcsname\??quantity#1\endcsname{#2}} % quick way
+\permanent\protected\def\setequantity#1#2{\edefcsname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
+\permanent\protected\def\setxquantity#1#2{\xdefcsname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
-\def\directquantity#1%
- {\the\numexpr#1\relax}
+\permanent\def\quantity {\the\quantitied}
+\permanent\def\quantitied #1{\numexpr\ifcsname\??quantity#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
+\permanent\def\directquantity#1{\the\numexpr#1\relax}
% let\quantified\quantitied
@@ -6000,7 +6042,7 @@
%D \definemeasure[columnwidth][\dividedsize\textwidth{1em}{3}]
%D \stoptyping
-\def\dividedsize#1#2#3% size gap n
+\permanent\def\dividedsize#1#2#3% size gap n
{\dimexpr
\ifnum\dimexpr#1\relax>\plusone
(\dimexpr#1\relax-\numexpr#3-\plusone\relax\dimexpr#2\relax)/#3\else#1%
@@ -6012,14 +6054,14 @@
%D
%D This is a dirty one: we simply append a unit and discard it when needed.
-\def\doifelsedimension#1%
+\permanent\def\doifelsedimension#1%
{\ifchkdim#1\or
\expandafter\firstoftwoarguments
\else
\expandafter\secondoftwoarguments
\fi}
-\let\doifdimensionelse\doifelsedimension
+\aliased\let\doifdimensionelse\doifelsedimension
%D Ok, here's another one, slower but seldom used. This one scans the text.
%D
@@ -6038,34 +6080,32 @@
%D \NC 1 \NC \doifdimenstringelse {1}{yes}{no} \NC \NR
%D \stoptabulate
-\let\doifelsedimenstring\doifelsedimension
-\let\doifdimenstringelse\doifelsedimenstring
+\aliased\let\doifelsedimenstring\doifelsedimension
+\aliased\let\doifdimenstringelse\doifelsedimenstring
%D \macros
%D {comparedimension,comparedimensioneps}
%D
-%D This is a dirty one: we simply append a unit and discard it when needed.
+%D We no longer use the \MKIV\ dirty trick. These are obsolete anyway.
\newdimen \roundingeps \roundingeps=10sp
\newconstant\compresult
-\def\comparedimension#1#2%
+\permanent\protected\def\comparedimension#1#2%
{\compresult
- \ifdim#1<#2%
+ \ifcmpdim#1#2 % space wil be skipped
\zerocount
- \orelse\ifdim#1<#2%
+ \or
\plusone
\else
\plustwo
\fi}
-\def\comparedimensioneps#1#2% todo: use eps feature
+\permanent\protected\def\comparedimensioneps#1#2% todo: use eps feature
{\compresult
- \ifdim\dimexpr#1-#2\relax<\roudingeps
- \zerocount
- \orelse\ifdim\dimexpr#2-#1\relax<\roudingeps
+ \ifabsdim\dimexpr#1-#2\relax<\roundingeps
\zerocount
- \orelse\ifdim#1<#2%
+ \orelse\ifdim#1<#2 % space wil be skipped
\plusone
\else
\plustwo
@@ -6075,73 +6115,63 @@
% \copycsname xxx\endcsname\csname ..\endcsname
-\unexpanded\def\copycsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter\csname}
+\permanent\protected\def\copycsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter\csname}
% \letcscsname \crap \csname ..\endcsname
% \letcsnamecs \csname ..\endcsname\crap
% \letcsnamecsname\csname ..\endcsname\csname ..\endcsname
-\unexpanded\def\letcscsname {\expandafter\let\expandafter}
-\unexpanded\def\letcsnamecs {\expandafter\let}
-\unexpanded\def\letcsnamecsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter}
+\permanent\protected\def\letcscsname {\expandafter\let\expandafter}
+\permanent\protected\def\letcsnamecs {\expandafter\let}
+\permanent\protected\def\letcsnamecsname{\expandafter\expandafter\expandafter\let\expandafter\expandafter}
% another one, add an item to a commalist
-\unexpanded\def\addvalue#1#2% cs item
- {\ifcsname#1\endcsname\else\expandafter\let\csname#1\endcsname\empty\fi
- \normalexpanded{\noexpand\addtocommalist{#2}\expandafter\noexpand\csname#1\endcsname}}
-
-\def\unspaced#1%
- {\syst_helpers_unspaced#1\end}
-
-\def\syst_helpers_unspaced#1%
- {\ifx#1\end
- \expandafter\gobbleoneargument
- \orelse\ifx#1\blankspace
- % go on
- \else
- #1%
- \fi
- \syst_helpers_unspaced}
+\permanent\protected\def\addvalue#1#2% cs item
+ {\ifcsname#1\endcsname\else\letcsname#1\endcsname\empty\fi
+ \normalexpanded{\addtocommalist{#2}\expandafter\noexpand\csname#1\endcsname}}
-\unexpanded\def\unspaceargument#1\to#2%
- {\privatescratchcounter\catcode\spaceasciicode
- \catcode\spaceasciicode\ignorecatcode
- \scantextokens{\edef#2{#1}}%
- \catcode\spaceasciicode\privatescratchcounter}
+%D Are these ever used? Anyway, these variants are somewhat more efficient than
+%D the \MKIV variants for larger strings.
-\unexpanded\def\unspaceafter#1#2%
- {\unspaceargument#2\to\ascii
- \expandafter#1\expandafter{\ascii}}
+% A variant:
+%
+% \permanent\def\unspaced#1%
+% {\localcontrolled{\begingroup\catcode\spaceasciicode\ignorecatcode}%
+% \tokenized{#1}%
+% \localcontrolled{\endgroup}}
+%
+% but we can also do this:
-% sometimes handy:
+\permanent\def\unspaced#1%
+ {\tokenized \s!catcodetable \ctdcatcodes {#1}}
-\unexpanded\def\doifelsehasspace#1%
- {\edef\m_syst_string_one{#1}%
- \normalexpanded{\syst_helpers_if_has_space_else#1\space}\empty\relax}
+\permanent\protected\def\unspaceargument#1\to#2%
+ {\edef#2{\tokenized \s!catcodetable \ctdcatcodes {#1}}}
-\let\doifhasspaceelse\doifelsehasspace
+\permanent\protected\def\unspaceafter#1#2%
+ {\expandafter#1\expandafter{\tokenized \s!catcodetable \ctdcatcodes {#2}}}
-\unexpanded\def\syst_helpers_if_has_space_else#1 #2#3\relax % \space\empty\relax
- {\ifx\m_syst_string_one\space
+\permanent\protected\def\doifelsehasspace#1%
+ {\expandafter\ifhastok\space{#1}%
\expandafter\firstoftwoarguments
- \orelse\ifx#2\empty
- \expandafter\secondoftwoarguments
\else
- \expandafter\firstoftwoarguments
+ \expandafter\secondoftwoarguments
\fi}
+\aliased\let\doifhasspaceelse\doifelsehasspace
+
% this will replace loadfile once and alike !!! todo
\installsystemnamespace{flag}
-\unexpanded\def\setflag #1{\expandafter\dodoglobal\expandafter\let\csname\??flag#1\endcsname\zerocount}
-\unexpanded\def\resetflag#1{\expandafter\dodoglobal\expandafter\let\csname\??flag#1\endcsname\plusone}
+\permanent\protected\def\setflag #1{\dodoglobal\letcsname\??flag#1\endcsname\zerocount}
+\permanent\protected\def\resetflag#1{\dodoglobal\letcsname\??flag#1\endcsname\plusone}
-\def\flag#1{\csname\??flag#1\endcsname}
+\permanent\def\flag#1{\csname\??flag#1\endcsname}
-\def\doifelseflagged#1%
- {\expandafter\ifx\csname\??flag#1\endcsname\relax
+\permanent\def\doifelseflagged#1%
+ {\expandafter\ifrelax\csname\??flag#1\endcsname
\expandafter\secondoftwoarguments
\orelse\ifcase\csname\??flag#1\endcsname
\expandafter\firstoftwoarguments
@@ -6149,10 +6179,10 @@
\expandafter\secondoftwoarguments
\fi}
-\let\doifflaggedelse\doifelseflagged
+\aliased\let\doifflaggedelse\doifelseflagged
-\def\doifnotflagged#1%
- {\expandafter\ifx\csname\??flag#1\endcsname\relax
+\permanent\def\doifnotflagged#1%
+ {\expandafter\ifrelax\csname\??flag#1\endcsname
\expandafter\firstofoneargument
\orelse\ifcase\csname\??flag#1\endcsname
\expandafter\gobbleoneargument
@@ -6160,11 +6190,11 @@
\expandafter\firstofoneargument
\fi}
-\unexpanded\def\inheritparameter[#1]#2[#3]#4[#5]% tag tokey fromkey
- {\expandafter\def\csname#1#3\expandafter\endcsname\expandafter{\csname#1#5\endcsname}}
+\permanent\protected\def\inheritparameter[#1]#2[#3]#4[#5]% tag tokey fromkey
+ {\defcsname#1#3\expandafter\endcsname\expandafter{\csname#1#5\endcsname}}
\def\syst_helpers_if_non_zero_positive_else#1#2\end % #3#4%
- {\ifx#1\relax
+ {\ifrelax#1%
\ifcase\privatescratchcounter
\endgroup
\doubleexpandafter\secondoftwoarguments
@@ -6179,57 +6209,66 @@
% used ?
-\def\doifelsenonzeropositive#1%
+\permanent\def\doifelsenonzeropositive#1%
{\begingroup\afterassignment\syst_helpers_if_non_zero_positive_else\privatescratchcounter=0#1\relax\empty\end}
-\let\doifnonzeropositiveelse\doifelsenonzeropositive
+\aliased\let\doifnonzeropositiveelse\doifelsenonzeropositive
-% here ?
+%D Some old|-|time favourites:
-\unexpanded\def\dosetrawvalue #1#2#3{\expandafter \def\csname#1#2\endcsname{#3}}
-\unexpanded\def\dosetrawevalue#1#2#3{\expandafter\edef\csname#1#2\endcsname{#3}}
-\unexpanded\def\dosetrawgvalue#1#2#3{\expandafter\gdef\csname#1#2\endcsname{#3}}
-\unexpanded\def\dosetrawxvalue#1#2#3{\expandafter\xdef\csname#1#2\endcsname{#3}}
+\permanent\protected\def\dosetrawvalue #1#2#3{\defcsname #1#2\endcsname{#3}}
+\permanent\protected\def\dosetrawevalue#1#2#3{\edefcsname #1#2\endcsname{#3}}
+\permanent\protected\def\dosetrawgvalue#1#2#3{\global\defcsname #1#2\endcsname{#3}}
+\permanent\protected\def\dosetrawxvalue#1#2#3{\global\edefcsname#1#2\endcsname{#3}}
-\unexpanded\def\getrawparameters {\dogetparameters\dosetrawvalue }
-\unexpanded\def\getraweparameters {\dogetparameters\dosetrawevalue}
-\unexpanded\def\getrawgparameters {\dogetparameters\dosetrawgvalue}
-\unexpanded\def\getrawxparameters {\dogetparameters\dosetrawxvalue}
+\permanent\protected\def\getrawparameters {\dogetparameters\dosetrawvalue }
+\permanent\protected\def\getraweparameters {\dogetparameters\dosetrawevalue}
+\permanent\protected\def\getrawgparameters {\dogetparameters\dosetrawgvalue}
+\permanent\protected\def\getrawxparameters {\dogetparameters\dosetrawxvalue}
-\unexpanded\def\globalgetrawparameters{\dogetparameters\dosetrawgvalue} % obsolete
+\permanent\protected\def\globalgetrawparameters{\dogetparameters\dosetrawgvalue} % obsolete
%D Sort of obsolete:
\newcount\c_syst_helpers_mod
-\unexpanded\def\dosetmodulo#1#2#3%
+\permanent\protected\def\dosetmodulo#1#2#3%
{\c_syst_helpers_mod#1\divide\c_syst_helpers_mod#2\multiply\c_syst_helpers_mod#2%
#3#1\advance#3-\c_syst_helpers_mod}
-\unexpanded\def\dosetdivision#1#2#3%
+\permanent\protected\def\dosetdivision#1#2#3%
{#3#1\divide#3 #2\relax}
-\unexpanded\def\DoMod#1by#2to#3{\dosetmodulo {#1}{#2}{#3}}
-\unexpanded\def\DoDiv#1by#2to#3{\dosetdivision{#1}{#2}{#3}}
+\permanent\protected\def\DoMod#1by#2to#3{\dosetmodulo {#1}{#2}{#3}}
+\permanent\protected\def\DoDiv#1by#2to#3{\dosetdivision{#1}{#2}{#3}}
\def\syst_helpers_unprotected#1\par
{#1\protect}
-\unexpanded\def\unprotected
+\permanent\protected\def\unprotected
{\unprotect
\syst_helpers_unprotected}
-\let\resettimer \clf_resettimer
-\let\elapsedtime \clf_elapsedtime
-\let\elapsedseconds \elapsedtime
+\aliased\let\resettimer \clf_resettimer % todo: at lua end
+\aliased\let\elapsedtime \clf_elapsedtime % todo: at lua end
+\aliased\let\elapsedseconds\elapsedtime
+
+\aliased\let\elapsedsteps\!!zerocount
+
+\permanent\protected\def\elapsedsteptime % unexpanded ! a bit useless but who knows ...
+ {\clf_elapsedsteptime\elapsedsteps\relax}
\newcount\c_syst_helpers_test_feature_n
\newcount\c_syst_helpers_test_feature_m
-\def\currentfeaturetest{\number\c_syst_helpers_test_feature_n}
+\let\syst_helpers_test_feature_yes\relax
+\let\syst_helpers_test_feature_nop\relax
-\unexpanded\def\testfeature#1#2%
+\permanent\def\currentfeaturetest{\number\c_syst_helpers_test_feature_n}
+
+\permanent\protected\def\testfeature#1#2%
{\c_syst_helpers_test_feature_m#1\relax
+ \enforced\xdef\elapsedsteps{\number\c_syst_helpers_test_feature_m}%
\def\syst_helpers_test_feature_yes
{\advance\c_syst_helpers_test_feature_n\plusone
\ifnum\c_syst_helpers_test_feature_n>\c_syst_helpers_test_feature_m\else
@@ -6242,26 +6281,31 @@
\fi}%
\retestfeature}
-\unexpanded\def\retestfeature % timer support is new per 10/5/2005
+\permanent\protected\def\retestfeature % timer support is new per 10/5/2005
{\bgroup
- \ifcase\interactionmode\let\wait\relax\fi
+ \ifcase\interactionmode\enforced\let\wait\relax\fi
\clf_resettimer
\c_syst_helpers_test_feature_n\zerocount
\syst_helpers_test_feature_nop
\clf_benchmarktimer
- \writestatus\m!system{starting feature test (n=\number\c_syst_helpers_test_feature_m)}\wait
+ \writestatus\m!system
+ {starting feature test: %
+ \number\c_syst_helpers_test_feature_m\space steps}%
\c_syst_helpers_test_feature_n\zerocount
\syst_helpers_test_feature_yes
- \writestatus\m!system{\number\c_syst_helpers_test_feature_m\space feature tests done (\elapsedseconds s)}%
- \wait
+ \writestatus\m!system
+ {feature test done: %
+ \number\c_syst_helpers_test_feature_m\space steps, %
+ \clf_elapsedtime\space seconds, %
+ \clf_elapsedsteptime\elapsedsteps\space\space per step}%
\egroup}
-\unexpanded\def\showtimer#1%
+\permanent\protected\def\showtimer#1%
{\writestatus{runtime}{\elapsedseconds\space s / #1}}
-\unexpanded\def\testfeatureonce#1#2%
+\permanent\protected\def\testfeatureonce#1#2%
{\begingroup
- \let\wait\relax
+ \enforced\let\wait\relax
\testfeature{#1}{#2}%
\endgroup}
@@ -6274,7 +6318,7 @@
%D \freezedimenmacro\leftmargindistance
%D \stoptyping
-\unexpanded\def\freezedimenmacro#1%
+\permanent\protected\def\freezedimenmacro#1%
{\edef#1{\the\dimexpr#1}}
%D The next macro negates a macro (dimension or number, or actually, whatever. It's
@@ -6284,25 +6328,28 @@
%D \if-\whatever \else-\whatever\fi => else => -whatever
%D \if--\whatever\else-\whatever\fi => then => whatever
%D \stoptyping
+%D
+%D Do we still need this? If not it will go away:
-\def\negated#1{\if-#1\else-#1\fi} % does only work in macros or text
+\permanent\def\negated#1{\if-#1\else-#1\fi} % does only work in macros or text
-\def\gobbleassigndimen#1\\{}
+% \def\gobbleassigndimen#1\\{}
+%
+% \permanent\def\assigndimen#1#2%
+% {\afterassignment\gobbleassigndimen#1=#2\zeropoint\\}
-\def\assigndimen#1#2%
- {\afterassignment\gobbleassigndimen#1=#2\zeropoint\\}
+%D Maybe ... toksapp should deal with this ...
-\unexpanded\def\appended#1#2#3{\expandafter#1\expandafter#2\expandafter{#2#3}}
-\unexpanded\def\appendvalue #1{\expandafter\appended\expandafter \def\csname#1\endcsname}
-\unexpanded\def\appendgvalue#1{\expandafter\appended\expandafter\gdef\csname#1\endcsname}
+\permanent\protected\def\appendvalue #1#2%
+ {\defcsname#1\expandafter\expandafter\expandafter\endcsname\expandafter\expandafter\expandafter
+ {\begincsname#1\endcsname#2}}
-\unexpanded\def\prepended#1#2#3%
- {\t_syst_helpers_scratch{#3}%
- \expandafter\expandafter\expandafter#1\expandafter\expandafter\expandafter#2\expandafter\expandafter\expandafter
- {\expandafter\the\expandafter\t_syst_helpers_scratch#2}}
+\permanent\protected\def\prependvalue #1#2%
+ {\edefcsname#1\endcsname
+ {\normalunexpanded{#2}\expandafter\expandafter\expandafter\empty\begincsname#1\endcsname}}
-\unexpanded\def\prependvalue #1{\expandafter\prepended\expandafter \def\csname#1\endcsname}
-\unexpanded\def\prependgvalue#1{\expandafter\prepended\expandafter\gdef\csname#1\endcsname}
+\permanent\protected\def\appendgvalue #1#2{\global\appendvalue}
+\permanent\protected\def\prependgvalue#1#2{\global\prependvalue}
%D \macros
%D {dowithrange}
@@ -6321,14 +6368,14 @@
\def\syst_helpers_with_range#1%
{\splitstring#1\at:\to\m_syst_helpers_range_from\and\m_syst_helpers_range_to
- \ifx\m_syst_helpers_range_to\empty\let\m_syst_helpers_range_to\m_syst_helpers_range_from\fi
+ \ifempty\m_syst_helpers_range_to\let\m_syst_helpers_range_to\m_syst_helpers_range_from\fi
\dostepwiserecurse\m_syst_helpers_range_from\m_syst_helpers_range_to\plusone{\m_helpers_range_action{##1}}}%
-\unexpanded\def\processranges[#1]#2% #1= n:m,p,q:r
+\permanent\protected\def\processranges[#1]#2% #1= n:m,p,q:r
{\def\m_helpers_range_action{#2}%
\processcommacommand[#1]\syst_helpers_with_range}
-\unexpanded\def\dowithrange#1#2%
+\permanent\protected\def\dowithrange#1#2%
{\def\m_helpers_range_action{#2}%
\processcommacommand[#1]\syst_helpers_with_range}
@@ -6347,21 +6394,23 @@
%D
%D \typebuffer \getbuffer
-\unexpanded\def\ignoreimplicitspaces
+\permanent\protected\def\ignoreimplicitspaces
{\doifelsenextchar\relax\relax\relax}
-%D \macros
-%D {processwords}
-%D
-%D Not that sophisticated but sometimes users (like in metafun).
-
-\def\syst_helpers_process_word#1 #2\_e_o_w_
- {\doifsomething{#1}{\processword{#1} \syst_helpers_process_word#2 \_e_o_w_}}
-
-\def\processwords#1%
- {\syst_helpers_process_word#1 \_e_o_w_}% no \unskip
-
-\let\processword\relax
+% %D \macros
+% %D {processwords}
+% %D
+% %D Not that sophisticated but sometimes users (like in metafun).
+%
+% %D This will be overloaded.
+%
+% \def\syst_helpers_process_word#1 #2\s!e_o_t_token
+% {\doifsomething{#1}{\processword{#1} \syst_helpers_process_word#2 \s!e_o_t_token}}
+%
+% \def\processwords#1%
+% {\syst_helpers_process_word#1 \s!e_o_t_token}% no \unskip
+%
+% \let\processword\relax
%D \macros
%D {startnointerference}
@@ -6374,17 +6423,17 @@
\newbox\b_syst_helpers_no_interference
-\unexpanded\def\startnointerference % not even grouped !
+\permanent\protected\def\startnointerference % not even grouped !
{\setbox\b_syst_helpers_no_interference\vbox
\bgroup}
-\unexpanded\def\stopnointerference
+\permanent\protected\def\stopnointerference
{\egroup
\setbox\b_syst_helpers_no_interference\emptybox}
%D A variant for \type {\executeifdefined}:
-\def\expandcheckedcsname#1#2% #2 is often a \xxxparameter so let's expand it once
+\permanent\def\expandcheckedcsname#1#2% #2 is often a \xxxparameter so let's expand it once
{\normalexpanded{\noexpand\syst_helpers_expand_checked_csname{#1}{#2}}}
\def\syst_helpers_expand_checked_csname#1#2#3%
@@ -6393,12 +6442,12 @@
%D Signal. Some fonts have a char0 rendering so we need to make sure that it is not
%D set in the font! (This will be overloaded)
-\unexpanded\def\signalcharacter{\char\zerocount} % \zwj
+\protected\def\signalcharacter{\char\zerocount} % \zwj
%D A few secial variants of commands defined here. Some more will be moved here (e.g.
%D from table modules.
-\def\dodirectdoubleempty#1#2% used in math (lookahead issues)
+\permanent\def\dodirectdoubleempty#1#2% used in math (lookahead issues)
{\ifx#2[%
\expandafter\syst_helpers_direct_double_empty_one_yes
\else
@@ -6411,27 +6460,27 @@
\def\syst_helpers_direct_double_empty_one_nop#1{#1[][]}
\def\syst_helpers_direct_double_empty_two_nop#1[#2]{#1[#2][]}
-%D Used in math definitions (in an \type {\edef}):
-
-%D \startbuffer
-%D [\docheckedpair{}]
-%D [\docheckedpair{a}]
-%D [\docheckedpair{a,b}]
-%D [\docheckedpair{a,b,c}]
-%D \stopbuffer
-%D
-%D \typebuffer \startlines \getbuffer \stoplines
-
-\def\docheckedpair#1%
- {\syst_helpers_checked_pair#1,,\_o_e_p_}
-
-\def\syst_helpers_checked_pair#1,#2,#3\_o_e_p_
- {#1,#2}
+% %D Used in math definitions (in an \type {\edef}). This will be replaced.
+% %D
+% %D \startbuffer
+% %D [\docheckedpair{}]
+% %D [\docheckedpair{a}]
+% %D [\docheckedpair{a,b}]
+% %D [\docheckedpair{a,b,c}]
+% %D \stopbuffer
+% %D
+% %D \typebuffer \startlines \getbuffer \stoplines
+%
+% \permanent\def\docheckedpair#1%
+% {\syst_helpers_checked_pair#1,,\s!e_o_t_token}
+%
+% \def\syst_helpers_checked_pair#1,#2,#-\s!e_o_t_token
+% {#1,#2}
%D Here are some nasty helpers. They can be used to fill often expanded token
%D lists efficiently (see tabulate for an example).
-\def\constantnumber#1%
+\permanent\def\constantnumber#1%
{\ifcase#1\zerocount
\or \plusone
\or \plustwo
@@ -6445,7 +6494,7 @@
\or \plusten
\else \number#1\relax\fi}
-\def\constantnumberargument#1%
+\permanent\def\constantnumberargument#1%
{\ifcase#1\zerocount
\or \plusone
\or \plustwo
@@ -6459,22 +6508,22 @@
\or \plusten
\else {\number#1}\fi}
-\def\constantdimen#1%
+\permanent\def\constantdimen#1%
{\ifdim#1=\zeropoint
\zeropoint
\else
\the#1\relax
\fi}
-\def\constantdimenargument#1%
+\permanent\def\constantdimenargument#1%
{\ifdim#1=\zeropoint
\zeropoint
\else
{\the#1}%
\fi}
-\def\constantemptyargument#1%
- {\ifx#1\empty
+\permanent\def\constantemptyargument#1%
+ {\ifempty#1%
\noexpand\empty
\else
{#1}%
@@ -6498,11 +6547,11 @@
% expandable:
-\def\getsubstring#1#2#3{\clf_getsubstring{#3}{#1}{#2}}
+\permanent\def\getsubstring#1#2#3{\clf_getsubstring{#3}{#1}{#2}}
%D Other dimensions than pt (used in mb-mp)
-\def\converteddimen#1#2{\clf_converteddimen\dimexpr#1\relax{#2}}
+\permanent\def\converteddimen#1#2{\clf_converteddimen\dimexpr#1\relax{#2}}
%D Maybe (looks ugly):
%D
@@ -6528,7 +6577,7 @@
% {title} {\texdefinition{btx:apa:title-subtitle-type}}
% {default} {\btxflush{author}}
-% \unexpanded\def\doifcase#1%
+% \protected\def\doifcase#1%
% {\edef\m_case_asked{#1}%
% \syst_aux_case}
%
@@ -6571,17 +6620,52 @@
%D This is not real fast but quite okay:
%def\ntimes#1#2{\ifnum#2>\zerocount#1\ntimes{#1}{\numexpr#2-\plusone\relax}\fi} % 1.72
-\def\ntimes#1#2{\clf_ntimes{#1}\numexpr#2\relax} % 0.33
+\permanent\def\ntimes#1#2{\clf_ntimes{#1}\numexpr#2\relax} % 0.33
%D Experiment (sometimes looks nicer in code):
-\unexpanded\def\sameargumentscondition#1#2%
+\permanent\protected\def\sameargumentscondition#1#2%
{\edef\m_syst_string_one{#1}%
\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two}
-\unexpanded\def\emptyargumentcondition#1%
+\permanent\protected\def\emptyargumentcondition#1%
{\edef\m_syst_string_one{#1}%
- \ifx\m_syst_string_one\empty}
+ \ifempty\m_syst_string_one}
+
+%D New (also serves as an example):
+%D
+%D \starttyping
+%D \commandflags\defineframed
+%D \stoptyping
+
+\permanent\def\commandflags#1%
+ {\beginlocalcontrol\begingroup\scratchtoks\emptytoks\donefalse
+ \ifflags#1= \frozenflagcode\etoksapp\scratchtoks{\ifdone \space\fi frozen}\donetrue\fi
+ \ifflags#1=\permanentflagcode\etoksapp\scratchtoks{\ifdone \space\fi permanent}\donetrue\fi
+ \ifflags#1=\immutableflagcode\etoksapp\scratchtoks{\ifdone \space\fi immutable}\donetrue\fi
+ \ifflags#1=\primitiveflagcode\etoksapp\scratchtoks{\ifdone \space\fi primitive}\donetrue\fi
+ \ifflags#1= \mutableflagcode\etoksapp\scratchtoks{\ifdone \space\fi mutable}\donetrue\fi
+ \ifflags#1=\noalignedflagcode\etoksapp\scratchtoks{\ifdone \space\fi noaligned}\donetrue\fi
+ \ifflags#1= \instanceflagcode\etoksapp\scratchtoks{\ifdone \space\fi instance}\donetrue\fi
+ %\ifflags#1= \reservedflagcode\etoksapp\scratchtoks{\ifdone \space\fi reserved}\donetrue\fi
+ \ifflags#1= \tolerantflagcode\etoksapp\scratchtoks{\ifdone \space\fi tolerant}\donetrue\fi
+ \ifflags#1=\protectedflagcode\etoksapp\scratchtoks{\ifdone \space\fi protected}\donetrue\fi
+ \expandafter\endgroup\expandafter\endlocalcontrol\the\scratchtoks}
+
+%D \macros
+%D {resetmacros}
+%D
+%D The next macro can be used to reset a macro:
+%D
+%D \starttyping
+%D \resetmacros[startfoo,\stopfoo]
+%D \stoptyping
+
+\permanent\protected\def\syst_reset_macro#1%
+ {\overloaded\letcsname\csstring#1\endcsname\undefined} % so only frozen (instances(
+
+\permanent\protected\def\resetmacros[#1]%
+ {\processcommalist[#1]\syst_reset_macro}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-cmp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-cmp.mkxl
new file mode 100644
index 00000000000..a5ebdd8e33d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-cmp.mkxl
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=syst-cmp,
+%D version=2018.12.05,
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Compatibility,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Some code that has been laying around for generic compatibility is (and will be)
+%D moved here, for instance because tikz needs it. At some point I will make an
+%D indirect interface for generic code (if needed).
+
+\registerctxluafile{syst-cmp}{}
+
+\unprotect
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-con.mkxl
index c3293b221f8..ed4a4f3c5a7 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-con.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-con.mkxl
@@ -20,40 +20,40 @@
%D In addition to the uppercase hex conversion, as needed in math families, we
%D occasionally need a lowercase one.
-\def\lchexnumber #1{\clf_lchexnumber \numexpr#1\relax}
-\def\uchexnumber #1{\clf_uchexnumber \numexpr#1\relax}
-\def\lchexnumbers#1{\clf_lchexnumbers\numexpr#1\relax}
-\def\uchexnumbers#1{\clf_uchexnumbers\numexpr#1\relax}
+\permanent\def\lchexnumber #1{\clf_lchexnumber \numexpr#1\relax}
+\permanent\def\uchexnumber #1{\clf_uchexnumber \numexpr#1\relax}
+\permanent\def\lchexnumbers#1{\clf_lchexnumbers\numexpr#1\relax}
+\permanent\def\uchexnumbers#1{\clf_uchexnumbers\numexpr#1\relax}
-\let\hexnumber\uchexnumber
+\aliased\let\hexnumber\uchexnumber
%D \macros{octnumber}
%D
%D For \UNICODE\ remapping purposes, we need octal numbers.
-\def\octnumber#1{\clf_octnumber\numexpr#1\relax}
+\permanent\def\octnumber#1{\clf_octnumber\numexpr#1\relax}
%D \macros{hexstringtonumber,octstringtonumber}
%D
%D This macro converts a two character hexadecimal number into a decimal number,
%D thereby taking care of lowercase characters as well.
-\def\hexstringtonumber#1{\clf_hexstringtonumber\numexpr#1\relax}
-\def\octstringtonumber#1{\clf_octstringtonumber\numexpr#1\relax}
+\permanent\def\hexstringtonumber#1{\clf_hexstringtonumber\numexpr#1\relax}
+\permanent\def\octstringtonumber#1{\clf_octstringtonumber\numexpr#1\relax}
%D \macros{rawcharacter}
%D
%D This macro can be used to produce proper 8 bit characters that we sometimes need
%D in backends and round||trips.
-\def\rawcharacter#1{\clf_rawcharacter\numexpr#1\relax}
+\permanent\def\rawcharacter#1{\clf_rawcharacter\numexpr#1\relax}
%D \macros{twodigits, threedigits}
%D
%D These macros provides two or three digits always:
-\def\twodigits #1{\ifnum #1<10 0\fi\number#1}
-\def\threedigits#1{\ifnum#1<100 \ifnum#1<10 0\fi0\fi\number#1}
+\permanent\def\twodigits #1{\ifnum #1<10 0\fi\number#1}
+\permanent\def\threedigits#1{\ifnum#1<100 \ifnum#1<10 0\fi0\fi\number#1}
%D \macros{modulonumber}
%D
@@ -68,25 +68,20 @@
%D have behaved like \TEX's normal\type {\divide}, then the expression could have
%D been somewhat simpler, like \type {#2-(#2/#1)*#1}. This works just as well, but a
%D bit more complex.
-%D
-%D \starttyping
-%D \def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax}
-%D \stoptyping
-%D
-%D But \unknown\ now we can also do this:
-\def\modulonumber#1#2{\the\numexpr#2-(#2:#1)*#1\relax}
+%permanent\def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax}
+%permanent\def\modulonumber#1#2{\the\numexpr#2-(#2:#1)*#1\relax}
%D \macros{setcalculatedsin,setcalculatedcos,setcalculatedtan}
-\unexpanded\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}}
-\unexpanded\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}}
-\unexpanded\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}}
+\permanent\protected\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}}
+\permanent\protected\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}}
+\permanent\protected\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}}
%D \macros{formatted,format}
- \def\formatted#1{\ctxcommand{format(#1)}} % not clf
-\unexpanded\def\format #1{\ctxcommand{format(#1)}} % not clf
+\permanent \def\formatted#1{\ctxcommand{format(#1)}} % not clf
+\permanent\protected\def\format #1{\ctxcommand{format(#1)}} % not clf
%D The \type {\modulatednumber} and \type {\realnumber} macros have been removed.
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-fnt.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-fnt.mkxl
new file mode 100644
index 00000000000..e6029d80511
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-fnt.mkxl
@@ -0,0 +1,47 @@
+%D \module
+%D [ file=syst-fnt,
+%D version=2006.08.11,
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Font Things,
+%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.
+
+% formal names cf the tb \& tbt
+
+\unprotect
+
+\immutable\protected\def\fontslantperpoint {\scaledfontdimen\plusone }
+\immutable\protected\def\fontinterwordspace {\scaledfontdimen\plustwo }
+\immutable\protected\def\fontinterwordstretch{\scaledfontdimen\plusthree}
+\immutable\protected\def\fontinterwordshrink {\scaledfontdimen\plusfour }
+\immutable\protected\def\fontexheight {\scaledfontdimen\plusfive }
+\immutable\protected\def\fontemwidth {\scaledfontdimen\plussix }
+\immutable\protected\def\fontextraspace {\scaledfontdimen\plusseven}
+
+\immutable\protected\def\slantperpoint {\scaledfontdimen\plusone \font}
+\immutable\protected\def\interwordspace {\scaledfontdimen\plustwo \font}
+\immutable\protected\def\interwordstretch {\scaledfontdimen\plusthree\font}
+\immutable\protected\def\interwordshrink {\scaledfontdimen\plusfour \font}
+\immutable\protected\def\exheight {\scaledfontdimen\plusfive \font}
+\immutable\protected\def\emwidth {\scaledfontdimen\plussix \font}
+\immutable\protected\def\extraspace {\scaledfontdimen\plusseven\font}
+
+\aliased\let\mathaxisheight\Umathaxis % takes style
+
+\permanent\def\currentspaceskip{\interwordspace\s!plus\interwordstretch\s!minus\interwordshrink\relax}
+
+\permanent\def\currentspacevalue{\the\interwordspace
+ \ifzeropt\interwordstretch\else{ plus }\the\interwordstretch\fi
+ \ifzeropt\interwordshrink \else{ minus }\the\interwordshrink \fi}
+
+\permanent\def\usedspacevalue{\ifzeropt\spaceskip\the\spaceskip\else\currentspacevalue\fi}
+
+\permanent\def\mathstacktotal{\dimexpr\Umathstacknumup\scriptstyle+\Umathstackdenomdown\scriptstyle\relax}
+\permanent\def\mathstackvgap {\Umathstackvgap\scriptstyle}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl
new file mode 100644
index 00000000000..50304d1048a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-ini.mkxl
@@ -0,0 +1,1319 @@
+%D \module
+%D [ file=syst-ini,
+%D version=2008.11.04, % 2001.11.16, % 1999.03.17, % an oldie: 1995.10.10
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Bootstrapping \TEX,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D We used to load plain \TEX\ in a special way, but redefining a couple of
+%D primitives so that for instance font loading was ignored. For those interested,
+%D this loader is found in \type {syst-tex.tex}. Some of the comment's are Don
+%D Knuths and more of it can be found in the plain \TEX\ format.
+%D
+%D Characters can have special states, that can be triggered by setting their
+%D category coded. Some are preset, others are to be set as soon as possible,
+%D otherwise we cannot define any useful macros.
+%D
+%D First we define a bunch of constants. Normally we would \type {\setconstant}
+%D but we're prestine and have no macros defined yet. Abstraction also makes it
+%D possible to avoid the \type {^^} in the input.
+
+\immutable\integerdef\escapecatcode 0
+\immutable\integerdef\begingroupcatcode 1
+\immutable\integerdef\endgroupcatcode 2
+\immutable\integerdef\mathshiftcatcode 3
+\immutable\integerdef\alignmentcatcode 4
+\immutable\integerdef\endoflinecatcode 5
+\immutable\integerdef\parametercatcode 6
+\immutable\integerdef\superscriptcatcode 7
+\immutable\integerdef\subscriptcatcode 8
+\immutable\integerdef\ignorecatcode 9
+\immutable\integerdef\spacecatcode 10
+\immutable\integerdef\lettercatcode 11
+\immutable\integerdef\othercatcode 12 % finally obsolete: \let\other \othercatcode
+\immutable\integerdef\activecatcode 13 % finally obsolete: \let\active\activecatcode
+\immutable\integerdef\commentcatcode 14
+\immutable\integerdef\invalidcatcode 15
+
+%immutable\integerdef\zeroasciicode 0
+\immutable\integerdef\tabasciicode 9
+\immutable\integerdef\newlineasciicode 10 % don't confuse this one with \endoflineasciicode
+\immutable\integerdef\formfeedasciicode 12
+\immutable\integerdef\endoflineasciicode 13 % somewhat messy but this can be the active \par
+\immutable\integerdef\endoffileasciicode 26
+\immutable\integerdef\spaceasciicode 32
+\immutable\integerdef\exclamationmarkasciicode 33 % ! used in namespace protection
+\immutable\integerdef\doublequoteasciicode 34 % "
+\immutable\integerdef\hashasciicode 35
+\immutable\integerdef\dollarasciicode 36
+\immutable\integerdef\commentasciicode 37
+\immutable\integerdef\ampersandasciicode 38
+\immutable\integerdef\singlequoteasciicode 39 % '
+\immutable\integerdef\primeasciicode 39 % '
+\immutable\integerdef\leftparentasciicode 40
+\immutable\integerdef\rightparentasciicode 41
+\immutable\integerdef\commaasciicode 44
+\immutable\integerdef\hyphenasciicode 45
+\immutable\integerdef\periodasciicode 46
+\immutable\integerdef\forwardslashasciicode 47 % /
+\immutable\integerdef\colonasciicode 58
+\immutable\integerdef\lessthanasciicode 60 % < used as alternative verbatim {
+\immutable\integerdef\morethanasciicode 62 % > used as alternative verbatim }
+\immutable\integerdef\questionmarkasciicode 63 % ? used in namespace protection
+\immutable\integerdef\atsignasciicode 64 % @ used in namespace protection
+\immutable\integerdef\leftbracketasciicode 91
+\immutable\integerdef\backslashasciicode 92 % `\\
+\immutable\integerdef\rightbracketasciicode 93
+\immutable\integerdef\circumflexasciicode 94
+\immutable\integerdef\underscoreasciicode 95
+\immutable\integerdef\leftbraceasciicode 123 % `\{
+\immutable\integerdef\barasciicode 124 % `\|
+\immutable\integerdef\rightbraceasciicode 125 % `\}
+\immutable\integerdef\tildeasciicode 126 % `\~
+\immutable\integerdef\delasciicode 127
+
+\aliased\let\percentasciicode\commentasciicode
+
+%catcode\zeroasciicode \ignorecatcode % `\^^@ ascii null is ignored
+\catcode\tabasciicode \spacecatcode % `\^^I ascii tab is a blank space
+\catcode\formfeedasciicode \activecatcode % `\^^L ascii form-feed (active, set later)
+%catcode\endoflineasciicode \endoflinecatcode % `\^^M ascii return is end-line
+\catcode\endoffileasciicode \ignorecatcode % `\^^Z endoffile (ignored in ConTeXt)
+%catcode\spaceasciicode \spacecatcode % `\ ascii space is blank space
+\catcode\hashasciicode \parametercatcode % `\# hash mark is macro parameter character
+\catcode\dollarasciicode \mathshiftcatcode % `\$ dollar sign is math shift
+%catcode\commentasciicode \commentcatcode % `\% percent sign is comment character
+\catcode\ampersandasciicode \alignmentcatcode % `\& ampersand is alignment tab
+%catcode\backslashasciicode \escapecatcode % `\\ backslash is TeX escape character
+\catcode\circumflexasciicode \superscriptcatcode % `\^ circumflex and uparrow are for superscripts
+\catcode\underscoreasciicode \subscriptcatcode % `\_ underline and downarrow are for subscripts
+\catcode\leftbraceasciicode \begingroupcatcode % `\{ left brace is begin-group character
+\catcode\rightbraceasciicode \endgroupcatcode % `\} right brace is end-group character
+\catcode\tildeasciicode \activecatcode % `\~ tilde is active
+%catcode\delasciicode \invalidcatcode % `\^^? ascii delete is invalid
+
+%D First we need to initialization the primitives. Because \CONTEXT\ is already a
+%D pretty old macro package, we have a couple of issues with respect to primitives.
+%D The \ETEX\ engine added a few as did \PDFTEX. The \LUATEX\ engine added even
+%D more. This means that there can be a potential clash between primitives and
+%D existing macros. The most noticeable ones are:
+%D
+%D \starttyping
+%D \protected
+%D \expanded
+%D \unexpanded
+%D \stoptyping
+%D
+%D Because we had macros like that before the primitives showed up. The protection
+%D related macros were there before we even knew about extensions to the engine.
+%D When the expansion related ones were introduced, we originally came up with
+%D different names but due to requests we used the current names, somethng that in
+%D retrospect was a bad idea: they should have gotten different names in \LUATEX, if
+%D only because at that time only \CONTEXT\ was using them in rolling releases.
+%D Anyway, we're now stuck with this situation, and it means that one should use the
+%D \type {\normal...} variants in low level code:
+%D
+%D \starttyping
+%D \normalexpanded
+%D \normalprotected
+%D \normalunexpanded
+%D \stoptyping
+%D
+%D In the end not using different names in \LUATEX\ for these kind of backfires. It
+%D makes not much sense to fix this in \LUAMETATEX\ because we're now to long on the
+%D road. It is actually the reason why we have the option in \LUATEX\ to alias all
+%D primitives in one go using a prefix. Actually this trick could be used to recover
+%D a primitive meaning: just enable it with some prefix and \type {\let} the
+%D original to that. But \unknown\ we prevent that trick below.
+%D
+%D The code below differs from \LUATEX: in \LUAMETATEX\ all primitives are already
+%D available; it cannot limit itself to being \TEX\ or \ETEX. It could not do that
+%D anyway because there are differences (no backend, to mention one).
+
+\directlua {
+ tex.enableprimitives("normal",true) % we default to everything
+ function tex.enableprimitives() end % so we kind of protect what's there
+}
+
+\permanent\let\undefined\undefined
+
+\immutable\def\space{ }
+\immutable\def\empty{}
+\mutable \def\temp {}
+
+\immutable\letcharcode \formfeedasciicode \par % \def ^^L{\par} formfeed
+\immutable\letcharcode \tildeasciicode \ % tilde
+\immutable\letcharcode \spaceasciicode \space % space
+
+\immutable\defcsname\Uchar\tabasciicode \endcsname {\ } % \def\^^I{\ } tab
+\immutable\defcsname\Uchar\formfeedasciicode \endcsname {\par} % \def\^^L{\par} formfeed
+\immutable\defcsname\Uchar\endoflineasciicode\endcsname {\ } % \def\^^M{\ } return
+
+%D For now:
+
+\permanent\def\gobbleoneargument#-{} % will be defined later on anyway
+
+%D First we define a simplified version of the \CONTEXT\ protection mechanism. Later
+%D we will implement a better variant.
+
+\def\unprotect
+ {\edef\protect
+ {\catcode\atsignasciicode \the\catcode\atsignasciicode \relax
+ \catcode\exclamationmarkasciicode\the\catcode\exclamationmarkasciicode\relax
+ \catcode\questionmarkasciicode \the\catcode\questionmarkasciicode \relax
+ \catcode\underscoreasciicode \the\catcode\underscoreasciicode \relax
+ \let\protect\relax}%
+ \catcode\atsignasciicode \lettercatcode
+ \catcode\exclamationmarkasciicode\lettercatcode
+ \catcode\questionmarkasciicode \lettercatcode
+ \catcode\underscoreasciicode \lettercatcode}
+
+\let\protect\relax
+
+\unprotect
+
+%D Some pretty important definitions:
+
+\immutable\let\bgroup={
+\immutable\let\egroup=}
+
+%D \macros
+%D {normalbgroup,normalgroup}
+%D
+%D No comment.
+
+%D Allocation of registers is done slightly different than in plain \TEX. First of
+%D all we use different reserved counters. We also don't implement a family handler
+%D because users are not supposed to implement their own math. We reserve the lowest
+%D 31 registers for scratch purposes. Keep in mind that in the core engine some
+%D registers are reserved: counters 0 upto 9, and counter 255.
+%D
+%D As with plain \TEX\ we recommend that macro designers always use \type {\global}
+%D assignments with respect to registers numbered 1, 3, 5 \unknown\ 31, and always
+%D non||\type {\global} assignments with respect to registers 0, 2, 4, \unknown\ 30.
+%D This will prevent \quote {save stack buildup} that might otherwise occur.
+%D
+%D We reserve some registers for special (management) purposes:
+
+% 0 - 20 : scratch
+% 21 - 127 : internal
+% 128 - 254 : inserts
+% 255 : page
+% 256 - : user
+
+% use \chardef instead for min and max
+%
+% will be blocked: \newfamily \newlanguage
+
+\permanent\countdef \c_syst_min_allocated_register = 52 \c_syst_min_allocated_register = 256 % can change
+\permanent\countdef \c_syst_max_allocated_register = 53 \c_syst_max_allocated_register = 65535
+\permanent\countdef \c_syst_min_allocated_read = 54 \c_syst_min_allocated_read = 0
+\permanent\countdef \c_syst_max_allocated_read = 55 \c_syst_max_allocated_read = 1023
+\permanent\countdef \c_syst_min_allocated_language = 56 \c_syst_min_allocated_language = 0
+\permanent\countdef \c_syst_max_allocated_language = 57 \c_syst_max_allocated_language = 8191
+\permanent\countdef \c_syst_min_allocated_insert = 58 \c_syst_min_allocated_insert = 128
+\permanent\countdef \c_syst_max_allocated_insert = 59 \c_syst_max_allocated_insert = 254
+\permanent\countdef \c_syst_min_allocated_family = 60 \c_syst_min_allocated_family = 128
+\permanent\countdef \c_syst_max_allocated_family = 61 \c_syst_max_allocated_family = 255
+\permanent\countdef \c_syst_min_allocated_attribute = 62 \c_syst_min_allocated_attribute = 1024 % 0-1023 : private
+\permanent\countdef \c_syst_min_allocated_write = 63 \c_syst_min_allocated_write = 0
+\permanent\countdef \c_syst_max_allocated_write = 64 \c_syst_max_allocated_write = 1023
+
+\permanent\countdef \c_syst_last_allocated_count = 32 \c_syst_last_allocated_count = \c_syst_min_allocated_register
+\permanent\countdef \c_syst_last_allocated_dimen = 33 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
+\permanent\countdef \c_syst_last_allocated_skip = 34 \c_syst_last_allocated_skip = \c_syst_min_allocated_register
+\permanent\countdef \c_syst_last_allocated_muskip = 35 \c_syst_last_allocated_muskip = \c_syst_min_allocated_register
+\permanent\countdef \c_syst_last_allocated_box = 36 \c_syst_last_allocated_box = \c_syst_min_allocated_register
+\permanent\countdef \c_syst_last_allocated_toks = 37 \c_syst_last_allocated_toks = \c_syst_min_allocated_register
+\permanent\countdef \c_syst_last_allocated_read = 38 \c_syst_last_allocated_read = \c_syst_min_allocated_read
+\permanent\countdef \c_syst_last_allocated_write = 39 \c_syst_last_allocated_write = \c_syst_min_allocated_write
+\permanent\countdef \c_syst_last_allocated_marks = 40 \c_syst_last_allocated_marks = \c_syst_min_allocated_register
+\permanent\countdef \c_syst_last_allocated_language = 41 \c_syst_last_allocated_language = \c_syst_min_allocated_language % not used in context
+\permanent\countdef \c_syst_last_allocated_insertion = 42 \c_syst_last_allocated_insertion = \c_syst_min_allocated_insert
+\permanent\countdef \c_syst_last_allocated_family = 43 \c_syst_last_allocated_family = \c_syst_min_allocated_family % not used in context
+\permanent\countdef \c_syst_last_allocated_attribute = 44 \c_syst_last_allocated_attribute = \c_syst_min_allocated_attribute % not used in context
+
+\permanent\countdef \c_syst_min_counter_value = 125 \c_syst_min_counter_value = -"7FFFFFFF % beware, we use index 125 at the lua end
+\permanent\countdef \c_syst_max_counter_value = 126 \c_syst_max_counter_value = "7FFFFFFF % beware, we use index 126 at the lua end
+
+\immutable\integerdef\zerocount 0
+\immutable\integerdef\plusone 1
+\immutable\integerdef\minusone -1
+
+\immutable\integerdef\normalpagebox 255 % hardcoded in pdftex/xetex
+
+\immutable\integerdef\statuswrite \minusone
+
+%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
+%D 255. Users can use the scratch registers upto 31 without problem but all others
+%D are reserved.
+
+\permanent\let\wlog\gobbleoneargument % Let's get rid of this one.
+
+%D The allocators share a common helper macro.
+
+\permanent\protected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
+\permanent\protected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
+\permanent\protected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
+\permanent\protected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
+\permanent\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \integerdef\c_syst_max_allocated_register}
+\permanent\protected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
+\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_register}
+\permanent\protected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
+\permanent\protected\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\integerdef\c_syst_max_allocated_language} % not needed in context
+\permanent\protected\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \integerdef\c_syst_max_allocated_family} % not needed in context
+
+\aliased\let\newfam\newfamily
+
+\firstvalidlanguage \plusone % so zero is ignored in hyphenation, this might become the default
+
+% Watch out, for the moment we disable the check for already being defined
+% later we will revert this but first all chardefs must be replaced.
+
+\permanent\protected\def\setconstant {}
+\permanent\protected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
+
+\permanent\protected\def\newconstant#1%
+ {\ifrelax#1%
+ %\writestatus{!!!!!!!!!!}{\string #1 => RELAX}%
+ \unletfrozen#1%
+ \newcount#1%
+ \orelse\ifdefined#1%
+ %\writestatus{!!!!!!!!!!}{\string #1 => DEFINED}%
+ \else
+ \newcount#1%
+ \fi}
+
+\permanent\protected\def\setnewconstant#1{\newconstant#1#1}
+
+% %D The next definitions are really needed (in \CONTEXT):
+
+\newlinechar\newlineasciicode \permanent\edef\outputnewlinechar{\Uchar\newlineasciicode} % {^^J}
+
+%D One reason to start high with allocation is that it permits us to allocate
+%D consecutive ranges more easily, for instance if for \MPLIB\ we want to allocate a
+%D continuous range of boxes. It also permits us to do a proper upward allocation
+%D for inserts. The current code evolved from code that dealt with older engines but
+%D as all engines now provide many registers we removed all traces.
+
+\ifdefined\writestatus \else
+ %\protected\def\writestatus#1#2{\immediate\write\statuswrite{#1: #2}}
+ \frozen\protected\def\writestatus#1#2{\message{#1: #2}}
+\fi
+
+\def\syst_basics_allocate_yes#1#2#3#4#5% last class method max name
+ {\ifnum#1<#4\relax
+ \global\advance#1\plusone
+ \permanent\global#3#5=#1\relax
+ \else
+ \writestatus{warning}{no room for \string#2\space \string#5\space (max: \number#4)}%
+ \fi}
+
+\def\syst_basics_allocate_nop#1#2#3#4#5% last class method max name
+ {\writestatus{warning}{\string#2 \string#5 is already defined (\string\relax\space it first)}}
+
+\def\syst_basics_allocate#1#2#3#4#5% last class method max name
+ {\ifrelax#5%
+ \expandafter\syst_basics_allocate_yes
+ \orelse\ifdefined#5%
+ \expandafter\syst_basics_allocate_nop
+ \else
+ \expandafter\syst_basics_allocate_yes
+ \fi
+ #1#2#3#4#5}
+
+%D Since the number of chars exceed 256 now, we can use \type {\chardef} instead of
+%D the more limited \type {\mathchardef}.
+
+% \protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \chardef\c_syst_max_allocated_register}
+% \protected\def\newmarks{\syst_basics_allocate\c_syst_last_allocated_marks\marks\chardef\c_syst_max_allocated_register}
+
+%D Attributes are something very \LUATEX. In \CONTEXT\ you are not supposed to use
+%D the attributes directly but always allocate then first. For instance attribute~0
+%D is reserved for special purposes (this might change). Attributes in the range
+%D 128-1023 are private and should not be touched.
+
+\immutable\integerdef\attributeunsetvalue\c_syst_min_counter_value % used to be \minusone
+
+% \permanent\protected\def\newattribute{\syst_basics_allocate\c_syst_last_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}
+
+% %D Not used by \CONTEXT\ but for instance \PICTEX\ needs it. It's a trick to force
+% %D strings instead of tokens that take more memory.
+%
+% \permanent\protected\def\newhelp#1#2{\newtoks#1#1\expandafter{\detokenize{#2}}}
+
+%D \macros
+%D {scratchcounter,
+%D scratchdimen,scratchskip,scratchmuskip,
+%D scratchbox,
+%D scratchtoks}
+%D
+%D We now define a few scratch registers, so that successive loads at least have
+%D some available. The private ones are used in cases where we don't want to
+%D intrude on normal scratch ones.
+
+\newcount \scratchcounter \newcount \globalscratchcounter \newcount \privatescratchcounter
+\newdimen \scratchdimen \newdimen \globalscratchdimen \newdimen \privatescratchdimen
+\newskip \scratchskip \newskip \globalscratchskip \newskip \privatescratchskip
+\newmuskip\scratchmuskip \newmuskip\globalscratchmuskip \newmuskip\privatescratchmuskip
+\newtoks \scratchtoks \newtoks \globalscratchtoks \newtoks \privatescratchtoks
+\newbox \scratchbox \newbox \globalscratchbox \newbox \privatescratchbox
+
+\newcount\scratchcounterone \newcount\scratchcountertwo \newcount\scratchcounterthree
+\newdimen \scratchdimenone \newdimen \scratchdimentwo \newdimen \scratchdimenthree
+\newskip \scratchskipone \newskip \scratchskiptwo \newskip \scratchskipthree
+\newmuskip\scratchmuskipone \newmuskip\scratchmuskiptwo \newmuskip\scratchmuskipthree
+\newtoks \scratchtoksone \newtoks \scratchtokstwo \newtoks \scratchtoksthree
+\newbox \scratchboxone \newbox \scratchboxtwo \newbox \scratchboxthree
+
+\newcount\scratchcounterfour \newcount\scratchcounterfive \newcount\scratchcountersix
+\newdimen \scratchdimenfour \newdimen \scratchdimenfive \newdimen \scratchdimensix
+\newskip \scratchskipfour \newskip \scratchskipfive \newskip \scratchskipsix
+\newmuskip\scratchmuskipfour \newmuskip\scratchmuskipfive \newmuskip\scratchmuskipsix
+\newtoks \scratchtoksfour \newtoks \scratchtoksfive \newtoks \scratchtokssix
+\newbox \scratchboxfour \newbox \scratchboxfive \newbox \scratchboxsix
+
+\newcount\globalscratchcounterone
+\newcount\globalscratchcountertwo
+\newcount\globalscratchcounterthree
+
+\mutable\let\scratchmacro \relax
+\mutable\let\scratchmacroone\relax
+\mutable\let\scratchmacrotwo\relax
+
+%D \macros
+%D {tempstring, scratchstring*}
+
+\mutable\let\tempstring \empty
+
+\mutable\let\scratchstring \empty
+\mutable\let\scratchstringone\empty
+\mutable\let\scratchstringtwo\empty
+
+%D \macros
+%D {scratchwidth, scratchheight, scratchdepth, scratchoffset, scratchdistance}
+%D
+%D A few more scratch dimensions:
+
+\newdimen\scratchwidth
+\newdimen\scratchheight
+\newdimen\scratchdepth
+\newdimen\scratchtotal
+
+\newdimen\scratchoffset
+\newdimen\scratchleftoffset
+\newdimen\scratchrightoffset
+\newdimen\scratchtopoffset
+\newdimen\scratchbottomoffset
+
+\newdimen\scratchdistance
+
+\newdimen\scratchhsize
+\newdimen\scratchvsize
+
+\newdimen\scratchxoffset
+\newdimen\scratchyoffset
+\newdimen\scratchhoffset
+\newdimen\scratchvoffset
+
+\newdimen\scratchxposition
+\newdimen\scratchyposition
+
+\newcount\scratchnx
+\newcount\scratchny
+
+\newcount\scratchmx
+\newcount\scratchmy
+
+\newcount\scratchmin
+\newcount\scratchmax
+
+\newcount\scratchunicode
+
+\newdimen\scratchleftskip
+\newdimen\scratchrightskip
+\newdimen\scratchtopskip
+\newdimen\scratchbottomskip
+
+%D More allocations:
+
+% \newcount \maxcount \immutable\maxcount 2147483647
+
+% \newdimen \zeropoint \immutable\zeropoint 0pt
+% \newdimen \onepoint \immutable\onepoint 1pt
+% \newdimen \halfapoint \immutable\halfapoint 0.5pt
+% \newdimen \maxdimen \immutable\maxdimen 16383.99999pt % 1073741823sp
+% \newdimen \onebasepoint \immutable\onebasepoint 1bp
+% \newdimen \scaledpoint \immutable\scaledpoint 1sp
+% \newdimen \thousandpoint \immutable\thousandpoint 1000pt
+
+\immutable\integerdef \maxcount 2147483647
+
+\immutable\dimensiondef \zeropoint 0pt
+\immutable\dimensiondef \onepoint 1pt
+\immutable\dimensiondef \halfapoint 0.5pt
+\immutable\dimensiondef \maxdimen 16383.99999pt % 1073741823sp
+\immutable\dimensiondef \onebasepoint 1bp
+\immutable\dimensiondef \scaledpoint 1sp
+\immutable\dimensiondef \thousandpoint 1000pt
+
+\immutable\gluespecdef \zeroskip 0pt plus 0pt minus 0pt
+
+\immutable\mugluespecdef \zeromuskip 0mu
+\immutable\mugluespecdef \onemuskip 1mu
+\immutable\mugluespecdef \muquad 18mu
+
+\aliased\let\points \onepoint
+\aliased\let\halfpoint\halfapoint
+
+\newtoks \emptytoks
+
+%D And even more: (todo: countdefs 60+). Watch out, we need a count for a negative constant
+%D but can use chardefs for positive ones. Actually, because we have plenty of counters we
+%D can also use counts for those.
+
+%immutable\integerdef\minusone -1
+\immutable\integerdef\minustwo -2
+%immutable\integerdef\zerocount 0
+%immutable\integerdef\plusone 1
+\immutable\integerdef\plustwo 2
+\immutable\integerdef\plusthree 3
+\immutable\integerdef\plusfour 4
+\immutable\integerdef\plusfive 5
+\immutable\integerdef\plussix 6
+\immutable\integerdef\plusseven 7
+\immutable\integerdef\pluseight 8
+\immutable\integerdef\plusnine 9
+\immutable\integerdef\plusten 10
+\immutable\integerdef\pluseleven 11
+\immutable\integerdef\plustwelve 12
+\immutable\integerdef\plussixteen 16
+\immutable\integerdef\plusfifty 50
+\immutable\integerdef\plushundred 100
+\immutable\integerdef\plusonehundred 100
+\immutable\integerdef\plustwohundred 200
+\immutable\integerdef\plusfivehundred 500
+\immutable\integerdef\pluscxxvii 127
+\immutable\integerdef\pluscxxviii 128
+\immutable\integerdef\pluscclv 255
+\immutable\integerdef\pluscclvi 256
+\immutable\integerdef\plusthousand 1000
+\immutable\integerdef\plustenthousand 10000
+\immutable\integerdef\plustwentythousand 20000
+\immutable\integerdef\medcard 32768
+\immutable\integerdef\maxcard 65536 % pdftex has less mathchars
+\immutable\integerdef\maxcardminusone 65535
+
+%D \macros
+%D {doubleexpandafter,tripleexpandafter,expanded,startexpanded}
+%D
+%D A few handy shortcuts
+
+\permanent\let\singleexpandafter \expandafter
+\permanent\def\doubleexpandafter{\expandafter\expandafter\expandafter}
+\permanent\def\tripleexpandafter{\expandafter\doubleexpandafter\expandafter}
+
+%D We prefer the more readable variant than in plain \TEX. User should only
+%D use \type {\emptybox}:
+
+\newbox\voidbox % public
+
+\permanent\def\unvoidbox{\unhbox\voidbox}
+\permanent\def\emptybox {\box \voidbox} % used in initializations so no attributes
+\permanent\def\emptyvbox{\normalvpack{}} % no copy as we need to set attributes
+\permanent\def\emptyhbox{\normalhpack{}} % no copy as we need to set attributes
+
+\aliased\let\leavevmode\unvoidbox % we prefer to use \dontleavehmode
+
+%D \macros
+%D {dontcomplain}
+%D
+%D We need this one soon:
+
+\permanent\protected\def\dontcomplain
+ {\hbadness\plustenthousand
+ \vbadness\plustenthousand
+ \hfuzz \maxdimen
+ \vfuzz \maxdimen}
+
+%D Some expected plain variants follow. We don't reuse registers because we
+%D don't want clashes.
+
+\aliased\let\p@ \onepoint
+\aliased\let\m@ne \minusone
+\aliased\let\z@ \zeropoint
+\aliased\let\@ne \plusone
+\aliased\let\tw@ \plustwo
+\aliased\let\thr@@ \plusthree
+\aliased\let\sixt@@n\plussixteen
+\aliased\let\@cclv \pluscclv
+\aliased\let\@cclvi \pluscclvi
+\aliased\let\voidb@x\voidbox
+
+\newtoks \toks@ %scratchtoks
+
+%D We define \type {\newif} a la plain \TEX, but will redefine it later. As Knuth
+%D says:
+%D
+%D \startnarrower
+%D And here's a different sort of allocation: for example,
+%D
+%D \starttyping
+%D \newif\iffoo
+%D \stoptyping
+%D
+%D creates \type {\footrue}, \type {\foofalse} to go with \type {\iffoo}.
+%D \stopnarrower
+
+% \protected\def\newif#1%
+% {\count@\escapechar
+% \escapechar\minusone
+% \expandafter\expandafter\expandafter\def\new_if #1{true}{\let#1\iftrue }%
+% \expandafter\expandafter\expandafter\def\new_if#1{false}{\let#1\iffalse}%
+% \new_if#1{false}% the condition starts out false
+% \escapechar\count@}
+%
+% \def\new_if#1#2%
+% {\csname\expandafter\if@\string#1#2\endcsname}
+%
+% \bgroup % `if' is required
+% \uccode`1=`i \uccode`2=`f \uppercase{\gdef\if@12{}}
+% \egroup
+
+% We use \csstring so there is no need to push/pop escapechar.
+% We use different names so that we get a better error message.
+%
+% \protected\def\newif#1%
+% {\let\new_if_saved\newif
+% \let\newif\new_if_check
+% \expandafter\expandafter\expandafter\def\new_if_cs #1{true}{\let#1\iftrue }%
+% \expandafter\expandafter\expandafter\def\new_if_cs#1{false}{\let#1\iffalse}%
+% \new_if_cs#1{false}%
+% \let\newif\new_if_saved}
+%
+% \protected\def\new_if_cs#1#2%
+% {\csname\expandafter\newif\csstring#1#2\endcsname}
+%
+% We wrap all into one macro (the frozen stuff adds 10% runtime):
+
+\permanent\protected\def\newif#1%
+ {\permanent\protected\gdefcsname\expandafter\new_if_check\csstring#1true\endcsname {\overloaded\frozen\let#1\iftrue }%
+ \permanent\protected\gdefcsname\expandafter\new_if_check\csstring#1false\endcsname{\overloaded\frozen\let#1\iffalse}%
+ \csname\expandafter\new_if_check\csstring#1false\endcsname}
+
+\normalexpanded{\gdef\noexpand\new_if_check\string i\string f{}}
+
+%D Let's test this one:
+
+\newif\ifdone
+\newif\iffound
+
+\newif\ifscratchcondition
+\newif\ifscratchconditionone
+\newif\ifscratchconditiontwo
+
+\aliased\let\htdp\boxtotal
+
+%D A few shortcuts:
+
+% \permanent\protected\def\udef {\protected\def }
+% \permanent\protected\def\ugdef{\protected\gdef}
+% \permanent\protected\def\uedef{\protected\edef}
+% \permanent\protected\def\uxdef{\protected\xdef}
+
+% For now:
+
+\permanent\protected\def\defUmathtopaccent #1#2#3#4{\global\immutable\protected\def#1{\Umathaccent "#2 "#3 "#4 }}
+\permanent\protected\def\defUmathbotaccent #1#2#3#4{\global\immutable\protected\def#1{\Umathbotaccent "#2 "#3 "#4 }}
+\permanent\protected\def\defUdelimiterover #1#2#3#4{\global\immutable\protected\def#1{\Udelimiterover "#2 "#3 }}
+\permanent\protected\def\defUdelimiterunder #1#2#3#4{\global\immutable\protected\def#1{\Udelimiterunder "#2 "#3 }}
+\permanent\protected\def\defUdelimiter #1#2#3#4{\global\immutable\protected\def#1{\Udelimiter "#2 "#3 "#4 }}
+\permanent\protected\def\defUradical #1#2#3{\global\immutable\protected\def#1{\Uradical "#2 "#3 }}
+\permanent\protected\def\defUroot #1#2#3{\global\immutable\protected\def#1{\Uroot "#2 "#3 }}
+\permanent\protected\def\defUmathchar #1#2#3#4{\global\immutable\Umathchardef #1 "#2 "#3 "#4 }
+
+%D For a while we keep the following, as systems like tikz need it. Best not use
+%D that one \CONTEXT.
+
+\aliased\let\active\activecatcode
+
+%D Constants to be used with \type {\interactionmode}.
+
+\immutable\integerdef\batchmodecode \zerocount
+\immutable\integerdef\nonstopmodecode \plusone
+\immutable\integerdef\scrollmodecode \plustwo
+\immutable\integerdef\errorstopmodecode \plusthree
+
+%D Of course we want even bigger log files, so we copied this from the \ETEX\
+%D source files.
+%D
+%D When watching such logs, beware of nasty side effects of \type {\scantokens},
+%D as in:
+%D
+%D \starttyping
+%D \bgroup
+%D \lccode`a=12\lowercase{\xdef\whatever{a}}\egroup
+%D \def\whatever{test \whatever test}
+%D \scantokens\expandafter{\whatever}
+%D \egroup
+%D \stoptyping
+%D
+%D In \LUATEX\ we have ways around this.
+
+% no longer \errorstopmode cf. plain tex 3.141592653
+
+\permanent\protected\def\tracingall
+ {\tracingonline \plusone
+ \tracingcommands \plusthree
+ \tracingmacros \plustwo
+ \tracingoutput \plusone
+ \tracingpages \plusone
+ \tracingparagraphs\plusone
+ \tracingrestores \plusone
+ \tracinggroups \plusone
+ \tracingifs \plusone
+ \tracingnesting \plustwo
+ \tracingassigns \plustwo
+ \tracingmath \plusone
+ \tracingalignments\plusone
+ \showboxbreadth \maxcount
+ \showboxdepth \maxcount}
+
+\permanent\protected\def\loggingall
+ {\tracingall
+ \tracingonline \zerocount}
+
+\permanent\protected\def\tracingnone
+ {\showboxdepth \plusthree
+ \showboxbreadth \plusfive
+ \tracingalignments\zerocount
+ \tracingmath \zerocount
+ \tracingassigns \zerocount
+ \tracingnesting \zerocount
+ \tracingifs \zerocount
+ \tracinggroups \zerocount
+ \tracingrestores \zerocount
+ \tracingparagraphs\zerocount
+ \tracingpages \zerocount
+ \tracingoutput \zerocount
+ \tracingmacros \zerocount
+ \tracingcommands \zerocount
+ \tracingonline \zerocount}
+
+%D When we want to see a box we can as well show all of it.
+
+\showboxdepth \maxdimen
+\showboxbreadth\maxdimen
+
+%D Just for tracing purposes we set:
+
+\tracingstats\plusone
+
+%D This is only used when we load \CONTEXT. Nesting is not supported here.
+
+\permanent\def\pushoverloadmode
+ {\enforced\permanent\protected\edef\popoverloadmode{\overloadmode\the\overloadmode\enforced\let\popoverloadmode\relax}%
+ \overloadmode\zerocount}
+
+\aliased\let\popoverloadmode\relax
+
+\let\pushrunstate\relax % will be defined later
+\let\poprunstate \relax % will be defined later
+
+\newtoks\everydump
+
+\pushoverloadmode
+
+\permanent\protected\def\dump
+ {\the\everydump
+ \global\everydump\emptytoks
+ \pushoverloadmode
+ \enforced\glet\dump\relax
+ \popoverloadmode
+ %let\pushoverloadmode\relax
+ %let\popoverloadmode\relax
+ % \tracingall
+ \normaldump}
+
+\permanent\protected\def\input
+ {\normalinput}
+
+\popoverloadmode
+
+%D \macros
+%D {newconditional,
+%D settrue, setfalse,
+%D ifconditional,then}
+%D
+%D \TEX's lacks boolean variables, although the \PLAIN\ format implements \type
+%D {\newif}. The main disadvantage of this scheme is that it takes three hash table
+%D entries. A more memory saving alternative is presented here. A conditional is
+%D defined by:
+%D
+%D \starttyping
+%D \newconditional\doublesided
+%D \setfalse
+%D \stoptyping
+%D Setting a conditional is done by \type{\settrue} and
+%D \type{\setfalse}:
+%D
+%D \starttyping
+%D \settrue\doublesided
+%D \setfalse
+%D \stoptyping
+%D while testing is accomplished by:
+%D
+%D \starttyping
+%D \ifconditional\doublesided ... \else ... \fi
+%D \setfalse
+%D \stoptyping
+%D We cannot use the simple scheme:
+%D
+%D \starttyping
+%D \def\settrue #1{\let#1=\iftrue}
+%D \def\setfalse#1{\let#1=\iffalse}
+%D \stoptyping
+%D
+%D Such an implementation gives problems with nested conditionals. The next
+%D implementation is about as fast and just as straightforward:
+
+\aliased\let\conditionalfalse\plusone % maybe we will have a dedicated count/chardef
+\aliased\let\conditionaltrue \zerocount % maybe we will have a dedicated count/chardef
+
+% \permanent\protected\def\settrue #1{\integerdef#1\conditionaltrue }
+% \permanent\protected\def\setfalse#1{\integerdef#1\conditionalfalse}
+%
+% \permanent\protected\def\settruevalue #1{\expandafter\integerdef\csname#1\endcsname\conditionaltrue }
+% \permanent\protected\def\setfalsevalue#1{\expandafter\integerdef\csname#1\endcsname\conditionalfalse}
+
+\permanent\protected\def\settrue #1{\enforced\let#1\conditionaltrue }
+\permanent\protected\def\setfalse #1{\enforced\let#1\conditionalfalse}
+\permanent\protected\def\setconditional#1{\enforced\let#1}
+
+\permanent\protected\def\settruevalue #1{\enforced\letcsname#1\endcsname\conditionaltrue }
+\permanent\protected\def\setfalsevalue#1{\enforced\letcsname#1\endcsname\conditionalfalse}
+
+
+\aliased\let\newconditional\setfalse
+\aliased\let\ifconditional \ifcase
+
+\aliased\let\then\relax % so that we can say: \ifnum1>2\then -)
+
+\permanent\def\truecondition {\iftrue}
+\permanent\def\falsecondition{\iffalse}
+
+% This one has to be unprotected otherwise we get a files-ends-to-soon but it's ok
+% as conditions expand anyway.
+
+\permanent\def\quitcondition{\orelse\iffalse}
+
+%D \macros
+%D {newmacro,setnewmacro,newfraction}
+%D
+%D Let's be complete and also introduce some definers. These are not mandate
+%D but handy for grepping. We make these mutable because they are \type
+%D {\let} (the only advantage is that we often give them names with some
+%D prefix.
+
+\permanent\protected\def\newmacro #1{\mutable\let#1\empty}
+\permanent\protected\def\setnewmacro#1{\mutable\let#1}
+
+\permanent\protected\def\newfraction#1{\mutable\let#1\!!plusone}
+
+\def\!!zerocount{0} % later redefined
+\def\!!plusone {1} % later redefined
+
+%D It would be handy to have a primitive \type {\unless\ifcase} because then we
+%D could use nicer values. Anyhow, this conditional code used to be in the \type
+%D {syst-aux} module but is now promoted to here.
+
+%D \macros
+%D {ifzeropt}
+%D
+%D The next macro is both cosmetic and byte saving. It is pretty \type
+%D {\if}||safe too. It can be used in cases like:
+%D
+%D \starttyping
+%D \ifzeropt \somedimen ... \else ... \fi
+%D \stoptyping
+
+\aliased\let\ifzeropt\ifcase
+
+% these token list helpers might move to syst-aux.mkiv
+%
+% we assume a \cs. not toks0 or so
+%
+% \protected\def\appendtotoks #1#{\def\temp{#1}\afterassignment\doappendtotoks \scratchtoks=}
+% \protected\def\prependtotoks#1#{\def\temp{#1}\afterassignment\doprependtotoks\scratchtoks=}
+
+\newtoks\t_syst_toks_temp \let\m_syst_toks_temp\t_syst_toks_temp
+
+\permanent\protected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
+\permanent\protected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
+
+% \def\syst_toks_append {\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\m_syst_toks_temp\the\t_syst_toks_temp}}}
+% \def\syst_toks_prepend{\m_syst_toks_temp\expandafter\expandafter\expandafter{\expandafter\the\expandafter\t_syst_toks_temp\the\m_syst_toks_temp}}}
+
+\permanent\protected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
+\permanent\protected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
+
+\def\syst_toks_append_l {\normalexpanded{\m_syst_toks_temp{\the\m_syst_toks_temp\the\t_syst_toks_temp}}}
+\def\syst_toks_prepend_l{\normalexpanded{\m_syst_toks_temp{\the\t_syst_toks_temp\the\m_syst_toks_temp}}}
+
+\def\syst_toks_append_g {\global\syst_toks_append_l }
+\def\syst_toks_prepend_g{\global\syst_toks_prepend_l}
+
+\permanent\protected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
+\permanent\protected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
+
+\def\syst_toks_add_l{\m_syst_toks_temp\expandafter\bgroup\the\m_syst_toks_temp}
+\def\syst_toks_add_g{\global\syst_toks_add_l}
+
+\permanent\protected\def\addtotokscs #1#2{#1{\the#1#2}} % saves a few bytes
+\permanent\protected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}} % saves a few bytes
+
+%D \macros
+%D {begcsname}
+%D
+%D Handy for \ETEX-only usage (avoids making \type {\relax}'s:
+
+% \def\begcsname#1\endcsname{\ifcsname#1\endcsname\csname#1\endcsname\fi}
+
+\aliased\let\begcsname\begincsname
+
+%D Now come a few macros that might be needed in successive loading. We redefine the
+%D \type {\par} primitive pretty soon so that we get the equivalents right.
+
+% too tricky: \par is use more often than a par starts so we have too much change
+% that we get assymetrical behaviour
+%
+% \newtoks\everyendpar
+%
+% \protected\def\endpar{\the\everyendpar\normalpar}
+% \protected\def\par {\endpar}
+%
+% \protected\def\reseteverypar
+% {\everypar \emptytoks
+% \everyendpar\emptytoks}
+
+\permanent\protected\def\reseteverypar
+ {\everypar\emptytoks}
+
+\aliased\let\endgraf\par % plain, a kind of funny name
+%aliased\let\endline\cr % plain, not needed and probably also confusing
+
+\permanent\protected\def\null{\hpack{}}
+
+%D The following two might be overloaded later on but some modules need then
+%D earlier. These functionality is reflected in the name and will not change.
+
+% \bgroup
+% \catcode`\^^M=\activecatcode%
+% \gdef\obeylines{\catcode`\^^M\activecatcode \let^^M\par}%
+% \glet^^M\par%
+% \egroup
+%
+% \bgroup
+% \gdef\obeyspaces{\catcode`\ \activecatcode}%
+% \obeyspaces\glet =\space%
+% \egroup
+
+\def\obeylines {\catcode\endoflineasciicode\activecatcode\letcharcode\endoflineasciicode\par } % check if these can be \permanent
+\def\obeyspaces{\catcode\spaceasciicode \activecatcode\letcharcode\spaceasciicode \space} % check if these can be \permanent
+
+% %D A constant:
+%
+% \let\endoflinetoken=^^M
+
+%D Also needed might be a simple loop structure and we borrow plain \TEX's one
+%D as it is often expected to be present and it is about the fastest you can
+%D get. Beware: this macro does not support nested loops. We use a namespace
+%D prefix \type {@@pln}.
+
+\let\syst_plain_body\relax
+
+\permanent\def\loop#1\repeat{\def\syst_plain_body{#1}\syst_plain_iterate} % might go
+
+%D The following makes \type {\loop} \unknown\ \type {\if} \unknown\ \type
+%D {\repeat} skippable (clever trick):
+
+\permanent\let\repeat\fi % so both \loop and \repeat are reserved words!
+
+%D The original (no \type {syst_plain_} there):
+%D
+%D \starttyping
+%D \def\syst_plain_iterate
+%D {\syst_plain_body
+%D \let\next\syst_plain_iterate
+%D \else
+%D \let\next\relax
+%D \fi
+%D \next}
+%D \stoptyping
+%D
+%D A more efficient alternative:
+%D
+%D \starttyping
+%D \def\syst_plain_iterate
+%D {\syst_plain_body
+%D \expandafter\syst_plain_iterate
+%D \else\expandafter\relax\fi}
+%D \stoptyping
+%D
+%D An even more efficient one:
+
+\def\syst_plain_iterate
+ {\syst_plain_body
+ \expandafter\syst_plain_iterate\else\fi}
+
+%D We don't define a real output routine yet but at least get rid of pages:
+
+\output{\shipout\box\normalpagebox}
+
+%D Although we don't add pagenumbers yet we alias the default register used
+%D for counting pages:
+
+\permanent\countdef\pageno\zerocount \pageno\plusone % first page is number 1
+
+%D Beside the raw counter \type {\pageno} the \type {\folio} macro provides
+%D the value.
+
+\permanent\def\folio{\the\pageno} % kind of expected and therefore reserved
+
+%D The following registers are kind of standard and (for the moment) we define
+%D them here. This might change.
+
+\newskip \bigskipamount \bigskipamount = 12pt plus 4pt minus 4pt
+\newskip \medskipamount \medskipamount = 6pt plus 2pt minus 2pt
+\newskip \smallskipamount \smallskipamount = 3pt plus 1pt minus 1pt
+
+\baselineskip = 12pt
+\lineskip = 1pt
+\lineskiplimit = 0pt
+
+%D Sometimes kerns make more sense than glue but we need to be in the
+%D right mode:
+
+\permanent\protected\def\vkern {\ifhmode\par \fi\kern}
+\permanent\protected\def\hkern {\ifvmode\dontleavehmode\fi\kern}
+
+\permanent\protected\def\vpenalty{\ifhmode\par \fi\penalty}
+\permanent\protected\def\hpenalty{\ifvmode\dontleavehmode\fi\penalty}
+
+%D Again a few kind-of-extensions the core. These come from plain \TEX\ but
+%D are probably not used in \CONTEXT.
+
+\newskip \hideskip \hideskip = -1000pt plus 1fill
+\newskip \centering \centering = 0pt plus 1000pt minus 1000pt
+
+\permanent\def\hidewidth % for alignment entries that can stick out
+ {\hskip\hideskip}
+
+\permanent\def\ialign % initialized \halign
+ {\everycr\emptytoks
+ \tabskip\zeroskip
+ \halign}
+
+\newcount \mscount
+
+\permanent\def\spanomit{\span\omit} % bypass error message
+
+\permanent\def\multispan#1%
+ {\omit
+ \mscount#1\relax
+ \loop
+ \ifnum\mscount>\plusone
+ \spanomit \advance\mscount\minusone
+ \repeat}
+
+\let\nopdfcompression \relax % later
+\let\onlypdfobjectcompression\relax % later
+\let\maximumpdfcompression \relax % later
+\let\normalpdfcompression \relax % later
+
+%D Basic status stuff.
+
+% \newif\ifproductionrun % already defined
+
+%D For those who expect this \unknown
+
+\ifdefined\fmtname \else \immutable\def\fmtname {ConTeXt Initial TeX} \fi
+\ifdefined\fmtversion \else \immutable\def\fmtversion{3.1415926} \fi
+
+%D A few bonus macros:
+
+%permanent\def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax}
+\permanent\def\modulonumber#1#2{\the\numexpr#2-(#2:#1)*#1\relax}
+\permanent\def\dividenumber#1#2{\the\numexpr(#2-(#1/2))/#1\relax}
+
+%D These could be set at the \LUA\ end instead:
+
+\immutable\edef\texenginename {\directlua{tex.print(LUATEXENGINE)}}
+\immutable\edef\texengineversion {\directlua{tex.print(LUATEXVERSION)}}
+\immutable\edef\texenginefunctionality{\directlua{tex.print(LUATEXFUNCTIONALITY)}}
+
+%D We have no reason not to enable this:
+
+\savingvdiscards\plusone
+
+%D We only can set this one via directives (system.synctex) and we only support
+%D the context variant. This will go away completely.
+
+\newcount\synctex % \let\normalsynctex\synctex
+
+%D We get rid of the funny \TEX\ offset defaults of one inch by setting them to zero.
+
+% \voffset\zeropoint \overloaded\let\voffset\relax \newdimen\voffset \let\normalvoffset\voffset
+% \hoffset\zeropoint \overloaded\let\hoffset\relax \newdimen\hoffset \let\normalhoffset\hoffset
+
+\matheqnogapstep\zerocount % for now
+
+%D Now we define a few helpers that we need in a very early stage. We have no
+%D message system yet but redundant definitions are fatal anyway.
+
+\newcount\c_syst_helpers_n_of_namespaces \c_syst_helpers_n_of_namespaces\pluseight % 1-8 reserved for catcodes
+
+\def\v_interfaces_prefix_template_system{\number \c_syst_helpers_n_of_namespaces>>}
+%def\v_interfaces_prefix_template_system{\characters\c_syst_helpers_n_of_namespaces>>} % no \characters yet
+
+\protected\def\installsystemnamespace#1% will be redefined
+ {\ifcsname ??#1\endcsname
+ \immediate\write\statuswrite{fatal error: duplicate system namespace '#1'}%
+ \else
+ \global\advance\c_syst_helpers_n_of_namespaces\plusone
+ \immutable\edefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}%
+ \fi}
+
+%D It makes more sense to have these here:
+
+\aliased\let\normalsuperscript \Usuperscript
+\aliased\let\normalsubscript \Usubscript
+\aliased\let\normalnosuperscript\Unosuperscript
+\aliased\let\normalnosubscript \Unosubscript
+\aliased\let\normalstartimath \Ustartmath
+\aliased\let\normalstopimath \Ustopmath
+\aliased\let\normalstartdmath \Ustartdisplaymath
+\aliased\let\normalstopdmath \Ustopdisplaymath
+
+%D Also better here:
+
+\immutable\def\wildcardsymbol{*}
+
+%D For a while we will keep these useless numbers as for instance tikz checks for them:
+
+\immutable\integerdef\eTeXversion 2
+\immutable\def \eTeXrevision {2}
+
+%D Experiment:
+
+\glyphoptions"80 % replaces \glyphdimensionsmode=1
+
+%D Just in case users use this:
+
+\aliased\let\immediateassign \immediate
+\aliased\let\immediateassigned\localcontrolled
+
+%D Needed:
+
+\mutable\let\nexttoken \relax
+\mutable\let\next \relax
+\mutable\let\nextnext \relax
+\mutable\let\nextnextnext\relax
+
+%D For now here: will get a proper solution
+
+% \pushoverloadmode
+% \mutable\let\par\par
+% \popoverloadmode
+
+%D Also here:
+
+\listcallbackmode\plusone
+
+%D Often used as cs key:
+
+\mutable\let\on \empty
+\mutable\let\of \empty
+\mutable\let\and \empty
+\mutable\let\with\empty
+\mutable\let\nop \empty % used often
+\mutable\let\yes \empty % used often
+
+%D Another experiment:
+
+\def\syst_suggested_alias#1#2% expandable
+ {\beginlocalcontrol
+ \writestatus{suggestion}{use \string#2 instead of \string#1}%
+ \enforced\glet#1#2%
+ \endlocalcontrol
+ #2}
+
+\permanent\protected\def\suggestedalias#1#2%
+ {\ifflags#2\permanent\permanent\fi % the rest is taken with the copy
+ \def#1{\syst_suggested_alias#1#2}}
+
+% A few traditional allocations (these might go):
+
+% \countdef \count@ 255 % hm, used in \newif .. todo: replace it there
+% \dimendef \dimen@ 0
+% \dimendef \dimen@i 1 % global only
+% \dimendef \dimen@ii 2
+
+\suggestedalias \count@ \scratchcounter
+\suggestedalias \dimen@ \scratchdimen
+\suggestedalias \dimen@i \scratchdimenone
+\suggestedalias \dimen@ii \scratchdimentwo
+
+%D The next feature is experimental and could go into another system module, but it
+%D feels more natural to have it here.
+%D
+%D \starttyping
+%D \begingroup
+%D \newlocaldimen\mydimena % \mydimena1\onepoint
+%D \newlocaldimen\mydimenb % \mydimenb2\onepoint
+%D \begingroup
+%D \newlocaldimen\mydimena % \mydimena3\onepoint
+%D \newlocaldimen\mydimenb % \mydimenb4\onepoint
+%D \newlocaldimen\mydimenc % \mydimenc5\onepoint
+%D \endgroup
+%D \endgroup
+%D
+%D \begingroup
+%D \setlocaldimen\mydimena 1\onepoint
+%D \setlocaldimen\mydimenb 2\onepoint
+%D \begingrou
+%D \setlocaldimen\mydimena 3\onepoint
+%D \setlocaldimen\mydimenb 4\onepoint
+%D \setlocaldimen\mydimenc 5\onepoint
+%D \endgroup
+%D \endgroup
+%D \stoptyping
+%D
+%D There is a little extra overhead in the overload protection but not that much.
+%D Instead of:
+
+% \newcount\c_syst_local_count \c_syst_local_count \c_syst_max_allocated_register
+% \newcount\c_syst_local_dimen \c_syst_local_dimen \c_syst_local_count
+% \newcount\c_syst_local_skip \c_syst_local_skip \c_syst_local_count
+% \newcount\c_syst_local_muskip\c_syst_local_muskip\c_syst_local_count
+% \newcount\c_syst_local_box \c_syst_local_box \c_syst_local_count
+% \newcount\c_syst_local_toks \c_syst_local_toks \c_syst_local_count
+
+%D We do this:
+
+\permanent\countdef\c_syst_local_count = 72 \c_syst_local_count = \c_syst_max_allocated_register
+\permanent\countdef\c_syst_local_dimen = 73 \c_syst_local_dimen = \c_syst_local_count
+\permanent\countdef\c_syst_local_skip = 74 \c_syst_local_skip = \c_syst_local_count
+\permanent\countdef\c_syst_local_muskip = 75 \c_syst_local_muskip = \c_syst_local_count
+\permanent\countdef\c_syst_local_box = 76 \c_syst_local_box = \c_syst_local_count
+\permanent\countdef\c_syst_local_toks = 77 \c_syst_local_toks = \c_syst_local_count
+\permanent\countdef\c_syst_local_read = 78 \c_syst_local_read = \c_syst_local_count
+\permanent\countdef\c_syst_local_write = 79 \c_syst_local_write = \c_syst_local_count
+
+% We should have used \c_syst_local_dimen = \numexpr \c_syst_max_allocated_register +
+% 1\relax, but we do this instead (it's no problem loosing a few registers).
+
+\c_syst_max_allocated_register \numexpr\c_syst_max_allocated_register:2\relax % floor
+
+\permanent\protected\def\syst_local_overflow#1#2{\writestatus\m!system{no room for local #1 \string#2}\wait}
+
+\permanent\protected\def\setnewlocaldimen#1%
+ {\ifnum\c_syst_local_dimen>\c_syst_max_allocated_register
+ \advance\c_syst_local_dimen\minusone\dimendef#1\c_syst_local_dimen
+ \else
+ \syst_local_overflow_dimen#1%
+ \fi
+ #1}
+
+\permanent\protected\def\setnewlocalcount#1%
+ {\ifnum\c_syst_local_count>\c_syst_max_allocated_register
+ \advance\c_syst_local_count\minusone
+ \overloaded\frozen\countdef#1\c_syst_local_count
+ \else
+ \syst_local_overflow_count#1%
+ \fi
+ #1}
+
+\permanent\protected\def\setnewlocalskip#1%
+ {\ifnum\c_syst_local_skip>\c_syst_max_allocated_register
+ \advance\c_syst_local_skip\minusone
+ \overloaded\frozen\skipdef#1\c_syst_local_skip
+ \else
+ \syst_local_overflow_skip#1%
+ \fi
+ #1}
+
+\permanent\protected\def\setnewlocalmuskip#1%
+ {\ifnum\c_syst_local_muskip>\c_syst_max_allocated_register
+ \advance\c_syst_local_muskip\minusone
+ \overloaded\frozen\muskipdef#1\c_syst_local_muskip
+ \else
+ \syst_local_overflow_muskip#1%
+ \fi
+ #1}
+
+\permanent\protected\def\setnewlocaltoks#1%
+ {\ifnum\c_syst_local_toks>\c_syst_max_allocated_register
+ \advance\c_syst_local_toks\minusone
+ \overloaded\frozen\toksdef#1\c_syst_local_toks
+ \else
+ \syst_local_overflow_toks#1%
+ \fi
+ #1}
+
+\permanent\protected\def\setnewlocalbox#1%
+ {\ifnum\c_syst_local_box>\c_syst_max_allocated_register
+ \advance\c_syst_local_box\minusone
+ \overloaded\frozen\integerdef#1\c_syst_local_box
+ \else
+ \syst_local_overflow_box#1%
+ \fi
+ \setbox#1}
+
+\permanent\protected\def\newlocalread#1% so no set
+ {\ifnum\c_syst_local_read>\c_syst_max_allocated_register
+ \advance\c_syst_local_read\minusone
+ \overloaded\frozen\integerdef#1\c_syst_local_read
+ \else
+ \syst_local_overflow_read#1%
+ \fi}
+
+\permanent\protected\def\newlocalwrite#1% so no set
+ {\ifnum\c_syst_local_write>\c_syst_max_allocated_register
+ \advance\c_syst_local_write\minusone
+ \overloaded\frozen\integerdef#1\c_syst_local_write
+ \else
+ \syst_local_overflow_write#1%
+ \fi}
+
+%D The error handlers:
+
+\permanent\protected\def\syst_local_overflow_count {\syst_local_overflow {count}}
+\permanent\protected\def\syst_local_overflow_dimen {\syst_local_overflow {dimen}}
+\permanent\protected\def\syst_local_overflow_skip {\syst_local_overflow {skip}}
+\permanent\protected\def\syst_local_overflow_muskip{\syst_local_overflow{muskip}}
+\permanent\protected\def\syst_local_overflow_toks {\syst_local_overflow {toks}}
+\permanent\protected\def\syst_local_overflow_box {\syst_local_overflow {box}}
+\permanent\protected\def\syst_local_overflow_read {\syst_local_overflow {read}}
+\permanent\protected\def\syst_local_overflow_write {\syst_local_overflow {write}}
+
+%D We sacrifice a little performance but save some tokens by not defineing these
+%D completely:
+
+\permanent\protected\def\newlocalcount #1{\setnewlocalcount #1\zerocount }
+\permanent\protected\def\newlocaldimen #1{\setnewlocaldimen #1\zeropoint }
+\permanent\protected\def\newlocalskip #1{\setnewlocalskip #1\zeroskip }
+\permanent\protected\def\newlocalmuskip#1{\setnewlocalmuskip#1\zeromuskip}
+\permanent\protected\def\newlocaltoks #1{\setnewlocaltoks #1\emptytoks }
+\permanent\protected\def\newlocalbox #1{\setnewlocalbox #1\emptybox }
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt b/Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt
new file mode 100644
index 00000000000..a89cea852bf
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-lua.lmt
@@ -0,0 +1,521 @@
+if not modules then modules = { } end modules ['syst-lua'] = {
+ version = 1.001,
+ comment = "companion to syst-lua.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local load, type, tonumber = load, type, tonumber
+local find, gsub = string.find, string.gsub
+local concat = table.concat
+local utfchar = utf.char
+local S, C, P, lpegmatch, lpegtsplitat = lpeg.S, lpeg.C, lpeg.P, lpeg.match, lpeg.tsplitat
+
+local xmath = xmath or math
+local xcomplex = xcomplex or { }
+
+local scan_next = token.scan_next or token.get_next
+local scan_cmdchr = token.scan_cmdchr_expanded
+local scan_token = token.scan_token
+
+local get_csname = token.get_csname
+----- get_macro = token.get_macro
+----- put_next = token.put_next
+
+local cmd = tokens.commands
+local letter_code = cmd.letter
+local other_char_code = cmd.other_char
+local spacer_code = cmd.spacer
+local other_char_code = cmd.other_char
+local relax_code = cmd.relax
+local register_int_code = cmd.register_int
+local internal_int_code = cmd.internal_int
+local register_dimen_code = cmd.register_dimen
+local internal_dimen_code = cmd.internal_dimen
+local register_glue_code = cmd.register_glue
+local internal_glue_code = cmd.internal_glue
+local register_toks_code = cmd.register_toks
+local internal_toks_code = cmd.internal_toks
+local char_given_code = cmd.char_given
+local math_given_code = cmd.math_given
+local xmath_given_code = cmd.xmath_given
+local some_item_code = cmd.some_item
+
+local getdimen = tex.getdimen
+local getglue = tex.getglue
+local getcount = tex.getcount
+local gettoks = tex.gettoks
+local gettex = tex.get
+
+local context = context
+commands = commands or { }
+local commands = commands
+local context = context
+local implement = interfaces.implement
+local dimenfactors = number.dimenfactors
+
+local ctx_protected_cs = context.protected.cs -- more efficient
+local ctx_firstoftwoarguments = context.firstoftwoarguments
+local ctx_secondoftwoarguments = context.secondoftwoarguments
+local ctx_firstofoneargument = context.firstofoneargument
+local ctx_gobbleoneargument = context.gobbleoneargument
+
+implement { -- will be overloaded later
+ name = "writestatus",
+ arguments = "2 arguments",
+ actions = logs.status,
+}
+
+function commands.doifelse(b)
+ if b then
+ ctx_firstoftwoarguments()
+ else
+ ctx_secondoftwoarguments()
+ end
+end
+
+function commands.doifelsesomething(b)
+ if b and b ~= "" then
+ ctx_firstoftwoarguments()
+ else
+ ctx_secondoftwoarguments()
+ end
+end
+
+function commands.doif(b)
+ if b then
+ ctx_firstofoneargument()
+ else
+ ctx_gobbleoneargument()
+ end
+end
+
+function commands.doifsomething(b)
+ if b and b ~= "" then
+ ctx_firstofoneargument()
+ else
+ ctx_gobbleoneargument()
+ end
+end
+
+function commands.doifnot(b)
+ if b then
+ ctx_gobbleoneargument()
+ else
+ ctx_firstofoneargument()
+ end
+end
+
+function commands.doifnotthing(b)
+ if b and b ~= "" then
+ ctx_gobbleoneargument()
+ else
+ ctx_firstofoneargument()
+ end
+end
+
+commands.testcase = commands.doifelse -- obsolete
+
+function commands.boolcase(b)
+ context(b and 1 or 0)
+end
+
+function commands.doifelsespaces(str)
+ if find(str,"^ +$") then
+ ctx_firstoftwoarguments()
+ else
+ ctx_secondoftwoarguments()
+ end
+end
+
+local pattern = lpeg.patterns.validdimen
+
+function commands.doifelsedimenstring(str)
+ if lpegmatch(pattern,str) then
+ ctx_firstoftwoarguments()
+ else
+ ctx_secondoftwoarguments()
+ end
+end
+
+local p_first = C((1-P(",")-P(-1))^0)
+
+implement {
+ name = "firstinset",
+ arguments = "string",
+ actions = function(str) context(lpegmatch(p_first,str or "")) end,
+ public = true,
+}
+
+implement {
+ name = "ntimes",
+ arguments = { "string", "integer" },
+ actions = { string.rep, context }
+}
+
+implement {
+ name = "execute",
+ arguments = "string",
+ actions = os.execute -- wrapped in sandbox
+}
+
+implement {
+ name = "doifelsesame",
+ arguments = "2 strings",
+ actions = function(a,b)
+ if a == b then
+ ctx_firstoftwoarguments()
+ else
+ ctx_secondoftwoarguments()
+ end
+ end
+}
+
+implement {
+ name = "doifsame",
+ arguments = "2 strings",
+ actions = function(a,b)
+ if a == b then
+ ctx_firstofoneargument()
+ else
+ ctx_gobbleoneargument()
+ end
+ end
+}
+
+implement {
+ name = "doifnotsame",
+ arguments = "2 strings",
+ actions = function(a,b)
+ if a == b then
+ ctx_gobbleoneargument()
+ else
+ ctx_firstofoneargument()
+ end
+ end
+}
+
+-- This is a bit of a joke as I never really needed floating point expressions (okay,
+-- maybe only with scaling because there one can get numbers that are too large for
+-- dimensions to deal with). Of course one can write a parser in \TEX\ speak but then
+-- one also needs to implement a bunch of functions. It doesn't pay of so we just
+-- stick to the next gimmick. It looks inefficient but performance is actually quite
+-- efficient.
+
+do
+
+ local result = { "return " }
+ local word = { }
+ local r = 1
+ local w = 0
+
+ local report = logs.reporter("system","expression")
+
+ local function unexpected(c)
+ report("unexpected token %a",c)
+ end
+
+ local function unexpected(c)
+ report("unexpected token %a",c)
+ end
+
+ local function expression()
+ local w = 0
+ local r = 1
+ while true do
+ local n, i = scan_cmdchr()
+ if n == letter_code then
+ w = w + 1 ; word[w] = utfchar(i)
+ else
+ if w > 0 then
+ -- we could use a metatable for all math, complex and factors
+ local s = concat(word,"",1,w)
+ local d = dimenfactors[s]
+ if d then
+ r = r + 1 ; result[r] = "*"
+ r = r + 1 ; result[r] = 1/d
+ else
+ if xmath[s] then
+ r = r + 1 ; result[r] = "xmath."
+ elseif xcomplex[s] then
+ r = r + 1 ; result[r] = "xcomplex."
+ end
+ r = r + 1 ; result[r] = s
+ end
+ w = 0
+ end
+ if n == other_char_code then
+ r = r + 1 ; result[r] = utfchar(i)
+ elseif n == spacer_code then
+ -- r = r + 1 ; result[r] = " "
+ elseif n == relax_code then
+ break
+ elseif n == register_int_code or n == internal_int_code then
+ r = r + 1 ; result[r] = getcount(i)
+ elseif n == register_dimen_code or n == internal_dimen_code then
+ r = r + 1 ; result[r] = getdimen(i)
+ elseif n == register_glue_code or n == n == register_dimen_code_glue_code then
+ r = r + 1 ; result[r] = getglue(i)
+ elseif n == register_toks_code or n == n == register_dimen_code_toks_code then
+ r = r + 1 ; result[r] = gettoks(i)
+ elseif n == char_given_code or n == math_given_code or n == xmath_given_code then
+ r = r + 1 ; result[r] = i
+ elseif n == some_item_code then
+ local n = get_csname(t)
+ if n then
+ local s = gettex(n)
+ if s then
+ r = r + 1 ; result[r] = s
+ else
+ unexpected(c)
+ end
+ else
+ unexpected(c)
+ end
+ -- elseif n == call_code then
+ -- local n = get_csname(t)
+ -- if n then
+ -- local s = get_macro(n)
+ -- if s then
+ -- r = r + 1 ; result[r] = s
+ -- else
+ -- unexpected(c)
+ -- end
+ -- else
+ -- unexpected(c)
+ -- end
+ -- elseif n == the_code or n == convert_code or n == lua_expandable_call_code then
+ -- put_next(t)
+ -- scan_token() -- expands
+ else
+ unexpected(c)
+ end
+ end
+ end
+ local code = concat(result,"",1,r)
+ local func = load(code)
+ if type(func) == "function" then
+ context(func())
+ else
+ report("invalid lua %a",code)
+ end
+ end
+
+ implement {
+ public = true,
+ name = "expression",
+ actions = expression,
+ }
+
+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.
+
+ local channels = { }
+ local lastdone = { }
+
+ local findbinfile = resolvers.findbinfile
+ local loadbinfile = resolvers.loadbinfile
+ local opentexfile = resolvers.opentexfile
+
+ local scaninteger = tokens.scanners.integer
+ local scankeyword = tokens.scanners.keyword
+ local scanstring = tokens.scanners.string
+ local scancsname = tokens.scanners.csname
+
+ local setmacro = tokens.setters.macro
+ local rlncatcodes = tex.rlncatcodes
+ local texgetcount = tex.getcount
+
+ local bytes = string.bytes
+ local getcatcode = tex.getcatcode
+
+ local char, concat = string.char, table.concat
+
+ -- This uses the normal bin lookup method that we also use for other files,
+ -- and in principle there is no limit on the amount of files other than the
+ -- operating system imposes.
+
+ local t = { }
+ local l = 0
+
+ implement {
+ name = "openin",
+ public = true,
+ usage = "value",
+ actions = function()
+ local n = scaninteger()
+ scankeyword("=")
+ local s = scanstring(true)
+ local c = channels[n]
+ if c then
+ c:close()
+ end
+ local f = findbinfile(s,"tex")
+ if f then
+ channels[n] = opentexfile(f)
+ lastdone[n] = false
+ else
+ channels[n] = false
+ lastdone[n] = true
+ end
+ end,
+ }
+
+ implement {
+ name = "closein",
+ public = true,
+ usage = "value",
+ actions = function()
+ local n = scaninteger()
+ local c = channels[n]
+ if c then
+ c:close()
+ end
+ channels[n] = false
+ t = { }
+ end,
+ }
+
+ -- This is not the fastest routine but hardly used, occasionally for line by line
+ -- input in e.g. tikz which is not that fast anyway so I'll deal with it when it
+ -- really is a bottleneck.
+
+ local readerror = function(what,n)
+ tex.error(string.formatters["too many %s brace tokens in read from channel %i"](what,n))
+ end
+
+ interfaces.implement {
+ name = "read",
+ public = true,
+ usage = "value",
+ actions = function(prefix)
+ local n = scaninteger()
+ local c = channels[n]
+ if scankeyword("line") and c then
+ c:gotoline(scaninteger())
+ end
+ scankeyword("to")
+ local m = scancsname(true)
+ local g = 0
+ local s
+ l = 0
+ if c then
+ while true do
+ local s = c and c:reader()
+ if s then
+ l = l + 1
+ s = gsub(s," *$","")
+ t[l] = s
+ for c in bytes(s) do
+ local cc = getcatcode(c)
+ if cc == 1 then
+ g = g + 1
+ elseif cc == 2 then
+ g = g - 1
+ end
+ end
+ if g <= 0 then
+ break
+ end
+ else
+ break
+ end
+ end
+ if g > 0 then
+ readerror("left",n)
+ s = ""
+ elseif g < 0 then
+ readerror("right",n)
+ s = ""
+ elseif l == 0 then
+ if c:endoffile() then
+ lastdone[n] = true
+ s = "\\par"
+ else
+ s = ""
+ end
+ channels[n] = false
+ else
+ local e = texgetcount("endlinechar") -- we can have tex.endline if needed
+ if e < 0 or e > 127 then
+ e = ""
+ else
+ e = " "
+ l = l + 1
+ t[l] = ""
+ end
+ s = concat(t, e, 1, l)
+ end
+ else
+ s = ""
+ end
+ setmacro(m, s, prefix) -- checks for frozen
+ end,
+ }
+
+ -- This is an etex extension. All characters become catcode 12 but a space gets code
+ -- 10. The etex manual specifies a lineending of catcode 12 too. Should we strip spaces
+ -- at the end? A bit weird command that we never use anyway.
+
+ implement {
+ name = "readline",
+ public = true,
+ usage = "value",
+ actions = function(prefix)
+ local n = scaninteger()
+ local c = channels[n]
+ if scankeyword("line") and c then
+ c:gotoline(scaninteger())
+ end
+ scankeyword("to")
+ local m = scancsname(true)
+ local s = c and c:reader()
+ if s then
+ local e = texgetcount("endlinechar") -- we can have tex.endline if needed
+ if e > 0 then -- forget about 0
+ s = s .. char(e)
+ end
+ else
+ channels[n] = false
+ s = ""
+ end
+ setmacro(rlncatcodes, m, s, prefix) -- checks for frozen
+ end,
+ }
+
+ -- This one uses the special lua condition option which is kind of experimental
+ -- but seems to work fine.
+
+ local boolean_value = tokens.values.boolean
+
+ implement {
+ name = "ifeof",
+ public = true,
+ usage = "condition",
+ actions = function()
+ local n = scaninteger()
+ return boolean_value, not channels[n]
+ end,
+ }
+
+ -- This one doesn't belong here and it might become a real primitive if we need it
+ -- frequently. So, for the moment we keep it in this file.
+
+ local getnest = tex.getnest
+
+ implement {
+ name = "ifmvl",
+ public = true,
+ usage = "condition",
+ actions = function()
+ return boolean_value, getnest("ptr") == 0
+ end,
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-lua.mkxl
index cf20c3341f8..158682399a8 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/syst-lua.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-lua.mkxl
@@ -11,52 +11,56 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\registerctxluafile{syst-lua}{}
+\registerctxluafile{syst-lua}{autosuffix}
\unprotect
-\def\expdoifelse#1#2{\clf_doifelsesame{#1}{#2}}
-\def\expdoif #1#2{\clf_doifsame {#1}{#2}}
-\def\expdoifnot #1#2{\clf_doifnotsame {#1}{#2}}
+\permanent\def\expdoifelse#1#2{\clf_doifelsesame{#1}{#2}}
+\permanent\def\expdoif #1#2{\clf_doifsame {#1}{#2}}
+\permanent\def\expdoifnot #1#2{\clf_doifnotsame {#1}{#2}}
%D Here is variant using a brainwave of the 12\high{+} hour \quotation {Long Road
%D Out of Eden}\footnote {Eden being Backo\TeX\ 2018, where the virtues of the \type
%D {\expanded} primitive were mentioned in talks.} trip. For now I don't really see
%D other useful applications.
-\def\expandeddoifelse#1#2{\iftok{#1}{#2}\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
-\def\expandeddoif #1#2{\iftok{#1}{#2}\expandafter\firstofoneargument \else\expandafter\gobbleoneargument \fi}
-\def\expandeddoifnot #1#2{\iftok{#1}{#2}\expandafter\gobbleoneargument \else\expandafter\firstofoneargument \fi}
+\permanent\def\expandeddoifelse#1#2{\iftok{#1}{#2}\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi}
+\permanent\def\expandeddoif #1#2{\iftok{#1}{#2}\expandafter\firstofoneargument \else\expandafter\gobbleoneargument \fi}
+\permanent\def\expandeddoifnot #1#2{\iftok{#1}{#2}\expandafter\gobbleoneargument \else\expandafter\firstofoneargument \fi}
% \testfeatureonce{100000}{\doifelse{hello world}{here i am}{}} % 0.3
% \testfeatureonce{100000}{\expandabledoifelse{hello world}{here i am}{}} % 1.5
-\def\expdoifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}}
-\def\expdoifelseinset #1#2{\clf_doifelseinset {#1}{#2}}
+\permanent\def\expdoifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}}
+\permanent\def\expdoifelseinset #1#2{\clf_doifelseinset {#1}{#2}}
-\def\expdoifcommonelse\expdoifelsecommon
-\def\expdoifinsetelse \expdoifelseinset
+\aliased\let\expdoifcommonelse\expdoifelsecommon
+\aliased\let\expdoifinsetelse \expdoifelseinset
%D We define these here, just in case. This permits \typefile {self} otherwise
%D nested b|/|e sep problems.
-\def\luastringsep{===}
+\immutable\def\luastringsep{===}
-\edef\!!bs{[\luastringsep[}
-\edef\!!es{]\luastringsep]}
+\immutable\edef\!!bs{[\luastringsep[}
+\immutable\edef\!!es{]\luastringsep]}
-\unexpanded\def\writestatus#1#2{\clf_writestatus{#1}{#2}}
+\pushoverloadmode
+
+\permanent\protected\def\writestatus#1#2{\clf_writestatus{#1}{#2}}
+
+\popoverloadmode
%D We can omit the tex.ctxcatcodes here as nowadays we seldom change the regime at
%D the \TEX\ end:
-%def\luaexpr#1{\ctxlua{context (tostring(#1))}} % more efficient:
-\def\luaexpr#1{\ctxlua{tex.print(tostring(#1))}} % no use is shortcutting has to be compiled
+%def\luaexpr#1{\ctxlua{context (tostring(#1))}} % more efficient:
+\permanent\def\luaexpr#1{\ctxlua{tex.print(tostring(#1))}} % no use is shortcutting has to be compiled
%D But as we only use write 16 we could as well do all in \LUA\ and ignore the rest.
%D Okay, we still can do writes here but only when not blocked.
-\let\syst_write_execute\clf_execute % always {...}
+\aliased\let\syst_write_execute\clf_execute % always {...}
%D There is a probably rather useless \type {\expression} command that can mix \LUA\ numeric
%D expressions with \TEX\ commands (for as far that makes sense) that works like this:
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-mac.lmt b/Master/texmf-dist/tex/context/base/mkxl/syst-mac.lmt
new file mode 100644
index 00000000000..410a49f8b11
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-mac.lmt
@@ -0,0 +1,117 @@
+if not modules then modules = { } end modules ['syst-mac'] = {
+ version = 1.001,
+ comment = "companion to syst-aux.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is kind of tricky and might not work for all csnames but as long as we use
+-- it in a controlled way, we're okay. The engine implementation might be changed
+-- a bit (no need to go through strings, but fetching a cs index and passing that
+-- back also takes time).
+
+-- Another approach is to have the predefined stack operate use private stacks and
+-- then the pop doesn't need the cs. But ... we then also need to store stuff in
+-- the format so that complicates maters more than I'm willing to do.
+
+local insert, remove = table.insert, table.remove
+
+local push_macro = token.push_macro
+local pop_macro = token.pop_macro
+local scan_csname = token.scan_csname
+local create_token = token.create
+local gobble_token = token.gobble
+
+local context = context
+local implement = interfaces.implement
+
+local report = logs.reporter("system","macrostack")
+
+local stack = table.setmetatableindex("table")
+
+local function pushmacro(name,global)
+ local s = push_macro(name,global)
+ if s then
+ insert(stack[name],s)
+ else
+ report("no macro %a to push",name)
+ insert(stack[name],false)
+ end
+end
+
+local function popmacro(name)
+ local s = remove(stack[name])
+ if s then
+ pop_macro(s)
+ else
+ report("no macro %a to pop",name)
+ end
+end
+
+tokens.pushmacro = pushmacro
+tokens.popmacro = popmacro
+
+implement {
+ name = "localpushmacro",
+ public = true,
+ protected = true,
+ actions = function()
+ pushmacro(scan_csname())
+ end
+}
+
+implement {
+ name = "globalpushmacro",
+ public = true,
+ protected = true,
+ actions = function()
+ pushmacro(scan_csname(),true)
+ end
+}
+
+implement {
+ name = "localpopmacro",
+ public = true,
+ protected = true,
+ actions = function()
+ popmacro(scan_csname())
+ end
+}
+
+implement {
+ name = "globalpopmacro",
+ public = true,
+ protected = true,
+ actions = function()
+ popmacro(scan_csname())
+ end
+}
+
+implement {
+ name = "showmacrostack",
+ public = true,
+ protected = true,
+ actions = function()
+ local n = scan_csname()
+ local s = stack[n]
+ local m = #s
+ report("%s : %i stack slots used",n,m)
+ for i=1,m do
+ report("% 3i %S",i,s[i])
+ end
+ end
+}
+
+implement {
+ name = "gobblenested",
+ public = true,
+ protected = true,
+ arguments = "3 strings",
+ actions = function(start,stop,command)
+ gobble_token(create_token(start),create_token(stop))
+ if command then
+ context[command]()
+ end
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-pln.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-pln.mkxl
new file mode 100644
index 00000000000..38ec9c4c1c5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-pln.mkxl
@@ -0,0 +1,119 @@
+%D \module
+%D [ file=syst-pln,
+%D version=2001.11.16, % 1999.03.17, % an oldie: 1995.10.10
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Efficient \PLAIN\ \TEX\ loading,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D This module set a couple of variables to the plain \TEX\ values. Later they might
+%D be overloaded. There is not much difference between \MKII\ and \MKIV\ but at some
+%D point they might diverge.
+
+%D Build||in numeric variables.
+
+\adjdemerits = 10000
+\binoppenalty = 700
+\brokenpenalty = 100
+\clubpenalty = 150
+%day = 0
+\defaulthyphenchar = `\-
+\defaultskewchar = -1
+\delimiterfactor = 901
+\displaywidowpenalty = 50
+\doublehyphendemerits = 10000
+%endlinechar = `\^^M
+\errorcontextlines = 5
+%escapechar = `\\
+\exhyphenpenalty = 50
+%fam = 0
+\finalhyphendemerits = 5000
+%floatingpenalty = 0
+%globaldefs = 0
+\hangafter = 1 % automatically set to 1 (no zero assignment)
+\hbadness = 1000
+%holdinginserts = 0
+\hyphenpenalty = 50
+%interlinepenalty = 0
+%language = 0
+\lefthyphenmin = 2
+\linepenalty = 10
+%looseness = 0
+%mag = 1000
+%maxdeadcycles = 25
+%month = 0
+%newlinechar = -1 % commented i.e. no plain value
+%outputpenalty = 0
+%pausing = 0
+%postdisplaypenalty = 0
+\predisplaypenalty = 10000
+\pretolerance = 100
+\relpenalty = 500
+\righthyphenmin = 3
+\showboxbreadth = 5
+\showboxdepth = 3
+%time = 0
+\tolerance = 200
+%tracingcommands = 0
+\tracinglostchars = 1
+%tracingmacros = 0
+%tracingonline = 0
+%tracingoutput = 0
+%tracingpages = 0
+%tracingparagraphs = 0
+%tracingrestores = 0
+%tracingstats = 0
+\uchyph = 1
+\vbadness = 1000
+\widowpenalty = 150
+%year = 0
+
+%D Build in dimension variables.
+
+\abovedisplayshortskip = 0pt plus 3pt
+\abovedisplayskip = 12pt plus 3pt minus 9pt
+%baselineskip = 0pt
+\belowdisplayshortskip = 7pt plus 3pt minus 4pt
+\belowdisplayskip = 12pt plus 3pt minus 9pt
+\boxmaxdepth = \maxdimen
+\delimitershortfall = 5pt
+%displayindent = 0pt
+%displaywidth = 0pt
+%hangindent = 0pt
+\hfuzz = 0.1pt
+%hoffset = 0pt
+\hsize = 6.5in
+%leftskip = 0pt
+%lineskip = 0pt
+%lineskiplimit = 0pt
+%mathsurround = 0pt
+\maxdepth = 4pt
+\medmuskip = 4mu plus 2mu minus 4mu
+\nulldelimiterspace = 1.2pt
+\overfullrule = 5pt
+\parfillskip = 0pt plus 1fil
+\parindent = 20pt
+\parskip = 0pt plus 1pt
+%predisplaysize = 0pt
+%rightskip = 0pt
+\scriptspace = 0.5pt
+%spaceskip = 0pt
+\splitmaxdepth = \maxdimen
+\splittopskip = 10pt
+%tabskip = 0pt
+\thickmuskip = 5mu plus 5mu
+\thinmuskip = 3mu
+\topskip = 10pt
+\vfuzz = 0.1pt
+%voffset = 0pt
+\vsize = 8.9in
+%xspaceskip = 0pt
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/syst-rtp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/syst-rtp.mkxl
new file mode 100644
index 00000000000..73aa59ba942
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/syst-rtp.mkxl
@@ -0,0 +1,18 @@
+%D \module
+%D [ file=syst-rtp,
+%D version=2006.10.13,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Run Time Processes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\aliased\let\executesystemcommand\clf_execute % can be public implementor
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl
new file mode 100644
index 00000000000..bdae8711bb9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-com.mkxl
@@ -0,0 +1,96 @@
+%D \module
+%D [ file=tabl-com,
+%D version=2009.08.22,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Common Code,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Table Macros / Common Code}
+
+\unprotect
+
+\pushoverloadmode
+
+% maybe frozen instead
+
+\permanent\let\AR\relax
+\permanent\let\BA\relax
+\permanent\let\BC\relax
+\permanent\let\BH\relax
+\permanent\let\BL\relax
+\permanent\let\BR\relax
+\permanent\let\CC\relax
+\permanent\let\CL\relax
+\permanent\let\CM\relax
+\permanent\let\CR\relax
+\permanent\let\DB\relax
+\permanent\let\DC\relax
+\permanent\let\DL\relax
+\permanent\let\DR\relax
+\permanent\let\DV\relax
+\permanent\let\EH\relax
+\permanent\let\EQ\relax
+\permanent\let\ER\relax
+\permanent\let\FB\relax
+\permanent\let\FL\relax
+\permanent\let\FR\relax
+\permanent\let\HC\relax
+\permanent\let\HL\relax
+\permanent\let\HQ\relax
+\permanent\let\HR\relax
+\permanent\let\LB\relax
+\permanent\let\LC\relax
+\permanent\let\LT\relax
+\permanent\let\LL\relax
+\permanent\let\LR\relax
+\permanent\let\MC\relax
+\permanent\let\ML\relax
+\permanent\let\MR\relax
+\permanent\let\NA\relax
+\permanent\let\NB\relax
+\permanent\let\NC\relax
+\permanent\let\ND\relax
+\permanent\let\NF\relax
+\permanent\let\NG\relax
+\permanent\let\NI\relax
+\permanent\let\NL\relax
+\permanent\let\NN\relax
+\permanent\let\NP\relax
+\permanent\let\NR\relax
+\permanent\let\PB\relax
+\permanent\let\RC\relax
+\permanent\let\RQ\relax
+\permanent\let\SL\relax
+\permanent\let\SM\relax
+\permanent\let\SR\relax
+\permanent\let\TB\relax
+\permanent\let\TL\relax
+\permanent\let\TR\relax
+\permanent\let\VL\relax
+\permanent\let\VC\relax
+\permanent\let\VD\relax
+\permanent\let\VN\relax
+\permanent\let\VS\relax
+\permanent\let\VT\relax
+\permanent\let\XC\relax
+
+\permanent\let\FC\relax
+\permanent\let\RB\relax
+\permanent\let\RT\relax
+
+\popoverloadmode
+
+\installmacrostack\BC
+\installmacrostack\EC
+\installmacrostack\EQ
+\installmacrostack\NC
+\installmacrostack\NN
+\installmacrostack\NR
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-frm.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-frm.mkxl
new file mode 100644
index 00000000000..ec530e7a4a5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-frm.mkxl
@@ -0,0 +1,263 @@
+%D \module
+%D [ file=tabl-frm,
+%D version=2017.04.11,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Framed Tables,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D For Thomas Schmitz who needed 3000 pages long tables.
+
+\unprotect
+
+\writestatus{loading}{ConTeXt Table Macros / Framed Tables}
+
+\installcorenamespace{framedtable}
+\installcorenamespace{framedtablerow}
+\installcorenamespace{framedtablecolumn}
+
+\newcount\c_tabl_framed_c
+\newcount\c_tabl_framed_r
+\newdimen\d_tabl_framed_h
+\newdimen\d_tabl_framed_d
+\newdimen\b_tabl_framed
+
+\initializeboxstack\??framedtable
+
+\defineframed[\??framedtable]
+\defineframed[\??framedtablerow][\??framedtable]
+\defineframed[\??framedtablecolumn][\??framedtable]
+
+\setupframed
+ [\??framedtable]
+ [\c!distance=\zeropoint,
+ \c!before=,
+ \c!after=,
+ \c!inbetween=]
+
+\setupframed
+ [\??framedtablerow]
+ [\c!strut=\v!no,
+ \c!offset=\v!overlay]
+
+% \defineframedtable[foo]
+% \defineframedtable[bar][foo]
+
+\permanent\tolerant\protected\def\defineframedtable[#1]#*[#2]%
+ {\ifarguments\or
+ \defineframed[\??framedtable#1][\??framedtable]%
+ \or
+ \defineframed[\??framedtable#1][\??framedtable#2]%
+ \fi}
+
+% \setupframedtable[foo][...]
+
+\permanent\tolerant\protected\def\setupframedtable[#1]#*[#2]%
+ {\ifarguments\or
+ \setupframed[\??framedtable][#1]%
+ \or
+ \ifcsname\??framed:\??framedtable#1\endcsname \else
+ \defineframed[\??framedtable#1][\??framedtable]%
+ \fi
+ \setupframed[\??framedtable#1][#2]%
+ \fi}
+
+% \setupframedtable[1][...]
+% \setupframedtable[foo][1][...]
+
+\permanent\tolerant\protected\def\setupframedtablerow[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or
+ \ifcsname\??framed:\??framedtablerow:#1\endcsname \else
+ \defineframed[\??framedtablerow:#1][\??framedtable]%
+ \fi
+ \setupframed[\??framedtablerow:#1][#2]%
+ \or
+ \ifcsname\??framed:\??framedtable#1\endcsname \else
+ \defineframed[\??framedtable#1][\??framedtable]%
+ \fi
+ \ifcsname\??framed:\??framedtablerow#1:#2\endcsname \else
+ \defineframed[\??framedtablerow#1:#2][\??framedtable#1]%
+ \fi
+ \setupframed[\??framedtablerow#1:#2][#3]%
+ \fi}
+
+\permanent\tolerant\protected\def\setupframedtablecolumn[#1]#*[#2]#*[#3]%
+ {\ifarguments\or\or
+ \ifcsname\??framed:\??framedtablecolumn:#1\endcsname \else
+ \defineframed[\??framedtablecolumn:#1][\??framedtable]%
+ \fi
+ \setupframed[\??framedtablecolumn:#1][#2]%
+ \or
+ \ifcsname\??framed:\??framedtable#1\endcsname \else
+ \defineframed[\??framedtable#1][\??framedtable]%
+ \fi
+ \ifcsname\??framed:\??framedtablecolumn#1:#2\endcsname \else
+ \defineframed[\??framedtablecolumn#1:#2][\??framedtable#1]%
+ \fi
+ \setupframed[\??framedtablecolumn#1:#2][#3]%
+ \fi}
+
+\mutable\let\currentframedtable\empty
+
+\permanent\tolerant\protected\def\startframedtable[#1]#*[#2]%
+ {\begingroup
+ \forgetall
+ \ifhastok={#1}%
+ \let\currentframedtable\empty
+ \setupframed[\??framedtable][#1]%
+ \else
+ \edef\currentframedtable{#1}%
+ \setupframed[\??framedtable][#2]%
+ \fi
+ \edef\currentframed{\??framedtable\currentframedtable}%
+ \c_tabl_framed_r\zerocount
+ \d_tabl_framed_d\framedparameter\c!distance
+ \framedparameter\c!before}
+
+\permanent\protected\def\stopframedtable
+ {\framedparameter\c!after
+ \endgroup}
+
+% a two pass variant that deals with the height .. so no catcode changes here
+
+\tolerant\protected\def\pack_framed_start_framed_whatever[#1]%
+ {\pack_framed_initialize
+ \bgroup
+ \setupcurrentframed[#1]% here !
+ \pack_framed_process_indeed
+ \bgroup
+ \ignorespaces}
+
+% \permanent\protected\def\startframedrow
+% {\advance\c_tabl_framed_r\plusone
+% \c_tabl_framed_c\zerocount
+% \d_tabl_framed_h\zeropoint
+% \bgroup
+% \edef\currentframed{\number\c_tabl_framed_r}%
+% \edef\currentframed
+% {\??framedtablerow\currentframedtable
+% \ifcsname\??framedtablerow\currentframedtable:\currentframed\endcsname
+% :\currentframed
+% \orelse\ifcsname\??framedtablerow\currentframedtable:\v!each\endcsname
+% :\v!each
+% \fi}%
+% \pack_framed_start_framed_whatever}
+%
+% \permanent\protected\def\stopframedrow
+% {\dofastloopcs\c_tabl_framed_c\tabl_framed_flush_row
+% \stopframed
+% \nointerlineskip
+% \vskip\zeropoint\relax
+% \framedparameter\c!inbetween}
+
+\protected\def\tabl_framed_flush_row
+ {\vpack to \d_tabl_framed_h{\flushbox\??framedtable{\number\fastloopindex}\vfill}%
+ \ifzeropt\d_tabl_framed_d\else\kern\d_tabl_framed_d\fi}
+
+\newcount\c_tabl_framed_pass
+
+\permanent\let\stopframedrow\relax
+
+\permanent\protected\def\startframedrow#1\stopframedrow
+ {\advance\c_tabl_framed_r\plusone
+ \startframedrow_one#1\stopframedrow_one
+ \startframedrow_two#1\stopframedrow_two}
+
+\tolerant\def\startframedrow_one[#-]%
+ {\bgroup
+ \c_tabl_framed_pass\plusone
+ \c_tabl_framed_c\zerocount
+ \d_tabl_framed_h\zeropoint
+ \settrialtypesetting}
+
+\protected\def\stopframedrow_one
+ {\normalexpanded{\egroup\d_tabl_framed_h\the\d_tabl_framed_h\relax}}
+
+\def\startframedrow_two
+ {\bgroup
+ \c_tabl_framed_c\zerocount
+ \c_tabl_framed_pass\plustwo
+ \edef\currentframed{\number\c_tabl_framed_r}%
+ \edef\currentframed
+ {\??framedtablerow\currentframedtable
+ \ifcsname\??framedtablerow\currentframedtable:\currentframed\endcsname
+ :\currentframed
+ \orelse\ifcsname\??framedtablerow\currentframedtable:\v!each\endcsname
+ :\v!each
+ \fi}%
+ \pack_framed_start_framed_whatever}
+
+\protected\def\stopframedrow_two
+ {\dofastloopcs\c_tabl_framed_c\tabl_framed_flush_row
+ \stopframed
+ \nointerlineskip
+ \vskip\zeropoint\relax
+ \framedparameter\c!inbetween}
+
+\protected\def\tabl_framed_flush_row_two
+ {\vpack to \d_tabl_framed_h{\flushbox\??framedtable{\number\fastloopindex}\vfill}%
+ \ifzeropt\d_tabl_framed_d\else\kern\d_tabl_framed_d\fi}
+
+\permanent\protected\def\startframedcell
+ {\advance\c_tabl_framed_c\plusone
+ \setbox\b_tabl_framed\hpack\bgroup
+ %\bgroup
+ \edef\currentframed{\number\c_tabl_framed_c}%
+ \edef\currentframed
+ {\??framedtablecolumn\currentframedtable
+ \ifcsname\??framedtablecolumn\currentframedtable:\currentframed\endcsname
+ :\currentframed
+ \orelse\ifcsname\??framedtablecolumn\currentframedtable:\v!each\endcsname
+ :\v!each
+ \fi}%
+ \ifcase\c_tabl_framed_pass
+ \or
+ \letframedparameter\c!background\empty
+ \letframedparameter\c!frame\v!off
+ \or
+ \letframedparameter\c!height\d_tabl_framed_h
+ \fi
+ \pack_framed_start_framed_whatever}
+
+\permanent\protected\def\stopframedcell
+ {\stopframed
+ %\egroup
+ \ifcase\c_tabl_framed_pass
+ \or
+ \ifdim\ht\b_tabl_framed>\d_tabl_framed_h
+ \d_tabl_framed_h\ht\b_tabl_framed
+ \fi
+ \else
+ \savebox\??framedtable{\number\c_tabl_framed_c}{\box\b_tabl_framed}%
+ \fi}
+
+\protect \endinput
+
+\starttext
+
+\setupframedtablecolumn [1] [width=3cm,background=color,backgroundcolor=red]
+\setupframedtablecolumn [2] [width=4cm,background=color,backgroundcolor=green,align=normal]
+% \setupframedtablerow [each] [background=color,backgroundcolor=blue,strut=no]
+% \setupframedtablerow [each] [strut=no,offset=overlay]
+
+\startframedtable[inbetween=\kern-0.4pt,distance=-0.4pt]
+
+\testfeatureonce{10000}{
+% \testfeatureonce{10}{
+ \startframedrow
+ \startframedcell%[backgroundcolor=yellow]
+ test
+ \stopframedcell
+ \startframedcell
+ test \par test
+ \stopframedcell
+ \stopframedrow
+}
+\stopframedtable
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-ltb.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-ltb.mkxl
new file mode 100644
index 00000000000..ec4a373603b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-ltb.mkxl
@@ -0,0 +1,803 @@
+%D \module
+%D [ file=tabl-ltb,
+%D version=2002.10.31, % updated 2016.01.08
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Line Tables,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module was made for some special project where we needed to typeset tables
+%D spanning spanning many pages horizontally and vertically, with repeated header
+%D lines and (entry) columns, tab tracking, color, etc. We do two passes over a
+%D table, which is why the table can go into a buffer or file. As said, tables can
+%D be real huge but performance is still quite okay (there is room for some speed
+%D up). The code has been adapted to \MKIV\ but the functionality is the same as in
+%D \MKII.
+
+% \BH \BC .. \EC \BC .. \EC \EH % append
+% \BR \BC .. \EC \BC .. \EC \ER
+%
+% or
+%
+% \NC .. \NC .. \NC \NR (todo: optional last \NC)
+
+% alternative:
+%
+% (1) direct run, save content in macro, but only if needed
+%
+% todo
+%
+% (2) buffered table content
+%
+% \startbuffer
+% \startlinetablehead
+% \stoplinetablehead
+% \startlinetablebody
+% \stoplinetablebody
+% \stopbuffer
+%
+% \processlinetablebuffer[buffer]
+%
+% in buffer : head and body
+%
+% (3) unbuffered run, multipass
+%
+% - run with starting width zero / prev run
+% - clip on prev run
+% - flush real widths
+
+\writestatus{loading}{ConTeXt Table Macros / Line Tables}
+
+\unprotect
+
+\installcorenamespace{linetable}
+\installcorenamespace{linetablepart}
+\installcorenamespace{linetablewidth}
+\installcorenamespace{linetableheight}
+\installcorenamespace{linetabledepth}
+
+% (For now) we share these three:
+
+\aliased\let\tabl_lines_initialize_box \tabl_tabulate_initialize_box
+\aliased\let\tabl_lines_initialize_boxes\tabl_tabulate_initialize_boxes
+\aliased\let\b_tabl_lines_current \b_tabl_tabulate_current
+
+\newconditional \c_tabl_lines_preroll
+\newconditional \c_tabl_lines_in_table
+
+\newdimen \d_tabl_lines_width
+\newdimen \d_tabl_lines_height
+%newdimen \d_tabl_lines_depth
+
+\newbox \b_tabl_lines_cell
+
+\newcount \c_tabl_lines_n_of_columns
+\newcount \c_tabl_lines_n_of_rows
+\newcount \c_tabl_lines_n_of_lines
+\newcount \c_tabl_lines_n_of_parts
+\newcount \c_tabl_lines_part \c_tabl_lines_part\plusone
+\newcount \c_tabl_lines_step \c_tabl_lines_step\plusone
+\newcount \c_tabl_lines_line
+\newcount \c_tabl_lines_row
+\newcount \c_tabl_lines_rows
+\newcount \c_tabl_lines_column
+\newcount \c_tabl_lines_subcol
+
+\newconstant \c_tabl_lines_hmode
+\newconstant \c_tabl_lines_page
+\newconstant \c_tabl_lines_repeat
+\newconstant \c_tabl_lines_split_state
+\newconstant \c_tabl_lines_head_state
+\newconstant \c_tabl_lines_mode
+
+\newtoks \t_tabl_lines_head
+
+\newconditional \linetableautoheight \settrue\linetableautoheight
+
+\tabl_lines_initialize_box\zerocount % holds repeater
+
+\pushoverloadmode
+
+\permanent\tolerant\protected\def\setuplinetable[#1]#*[#2]#*[#3]%
+ {\ifarguments\or
+ \getparameters[\??linetable][#1]%
+ \or
+ \getparameters[\??linetable#1:][#2]%
+ \or
+ \getparameters[\??linetable#1:#2][#3]%
+ \fi}
+
+\permanent\def\linetableparameter#1%
+ {\begincsname\??linetable#1\endcsname}
+
+\permanent\protected\def\doifelselinetablecparameter#1%
+ {\ifcsname\??linetable c:\number\c_tabl_lines_column#1\endcsname
+ \expandafter\firstoftwoarguments
+ \orelse\ifcsname\??linetable c:#1\endcsname
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\aliased\let\doiflinetablecparameterelse\doifelselinetablecparameter
+
+\permanent\def\linetablecparameter#1%
+ {\begincsname
+ \??linetable
+ \ifcsname\??linetable c:\number\c_tabl_lines_column#1\endcsname
+ c:\number\c_tabl_lines_column
+ \orelse\ifcsname\??linetable c:#1\endcsname
+ c:%
+ \fi
+ #1%
+ \endcsname}
+
+\permanent\def\linetablerparameter#1% faster, leaner and meaner
+ {\begincsname
+ \??linetable
+ \ifnum\c_tabl_lines_row=\zerocount % geen ifcase
+ \ifcsname\??linetable r:\v!header#1\endcsname
+ r:\v!header
+ \orelse\ifcsname\??linetable r:0#1\endcsname
+ r:0%
+ \fi
+ \else
+ \ifcsname\??linetable r:\number\c_tabl_lines_row#1\endcsname
+ r:\number\c_tabl_lines_row
+ \orelse\ifcsname\??linetable r:\v!oddeven\c_tabl_lines_row#1\endcsname
+ r:\v!oddeven\c_tabl_lines_row
+ \fi
+ \fi
+ #1%
+ \endcsname}
+
+\protected\def\tabl_lines_set
+ {\edef\p_lines{\linetableparameter\c!lines}%
+ \ifx\p_lines\v!fit
+ \tabl_lines_set_indeed
+ \else
+ \global\c_tabl_lines_n_of_lines\p_lines
+ \fi}
+
+\protected\def\tabl_lines_set_indeed
+ {% whitespace already added by vertical strut
+ %\triggerpagebuilder
+ \scratchdimen
+ \ifdim\pagegoal<\maxdimen
+ \dimexpr\pagegoal-\pagetotal\relax
+ \else
+ \textheight
+ \fi
+ \getrawnoflines\scratchdimen
+ \global\c_tabl_lines_n_of_lines\noflines
+ \ifconditional\c_tabl_lines_preroll\orelse\ifnum\c_tabl_lines_n_of_lines<\plustwo
+ \page
+ \tabl_lines_set
+ \fi}
+
+\def\tabl_lines_step_cell
+ {\advance\scratchdimen\linetablecparameter\c!width
+ \global\advance \c_tabl_lines_column\plusone
+ \advance\scratchskip \linetablecparameter\c!distance}
+
+\permanent\tolerant\protected\def\startlinetablecell[#1]%
+ {\global\setbox\b_tabl_lines_cell\hbox\bgroup
+ \ifparameter#1\or
+ \getparameters[\??linetable c:\number\c_tabl_lines_column][#1]%
+ \fi
+ \global\c_tabl_lines_step\linetablecparameter\c!nx\relax
+ \ifcase\c_tabl_lines_step\or
+ \scratchdimen\linetablecparameter\c!width
+ \scratchskip \linetablecparameter\c!distance
+ \else
+ \scratchdimen \zeropoint
+ \scratchskip \zeropoint
+ \scratchcounter\c_tabl_lines_column
+ \dorecurse\c_tabl_lines_step\tabl_lines_step_cell
+ \global\c_tabl_lines_column\scratchcounter
+ \fi
+ \c_tabl_lines_mode
+ \ifconditional\c_tabl_lines_preroll
+ \ifdim\scratchdimen>\zeropoint \zerocount \else \plustwo \fi
+ \else
+ \zerocount
+ \fi
+ \ifcase\c_tabl_lines_mode
+ \ifcase\c_tabl_lines_hmode
+ % nothing
+ \or
+ % fit, keep it simple
+ \or
+ \c_tabl_lines_mode\plusone % line
+ \else
+ % some already calculated height
+ \fi
+ \fi
+ \setbox\scratchbox\hbox
+ \bgroup
+ \dontcomplain
+ \hskip\linetablecparameter\c!leftoffset\relax
+ % 0 = width, unknown height
+ % 1 = width, fixed height
+ % 2 = no width, auto hsize
+ \ifnum\c_tabl_lines_mode<\plustwo
+ \advance\scratchdimen-\linetablecparameter\c!leftoffset
+ \advance\scratchdimen-\linetablecparameter\c!rightoffset
+ \fi
+ \ifcase\c_tabl_lines_mode
+ \dosetraggedcommand{\linetablecparameter\c!align}%
+ \vtop \ifdim\d_tabl_lines_height>\zeropoint to\d_tabl_lines_height \fi \bgroup
+ \hsize\scratchdimen
+ \raggedcommand
+ \else
+ \setalignmentswitch{\linetablecparameter\c!align}%
+ \hbox \ifcase\c_tabl_lines_mode \or to\scratchdimen \fi \bgroup
+ \ifcase\alignmentswitch\hss\or\hss\fi
+ \fi
+ \dousestyleparameter{\linetablecparameter\c!style}%
+ \dousecolorparameter{\linetablecparameter\c!color}%
+ \begstrut \ignorespaces}
+
+\permanent\protected\def\stoplinetablecell
+ {\unskip \endstrut
+ \ifcase\c_tabl_lines_mode
+ \endgraf
+ \else
+ \ifcase\alignmentswitch\else\hss\fi
+ \fi
+ \egroup
+ \hskip\linetablecparameter\c!rightoffset
+ \egroup
+ \ifconditional\c_tabl_lines_preroll
+ \box\scratchbox
+ \else
+ \tabl_lines_wrap_up
+ \fi
+ \egroup}
+
+\def\tabl_lines_wrap_up
+ {\edef\p_background{\linetablecparameter\c!background}%
+ \ifx\p_background\v!color
+ \ifconditional\linetableautoheight
+ \tabl_lines_wrap_up_auto
+ \else
+ \tabl_lines_wrap_up_line
+ \fi
+ \else
+ \box\scratchbox
+ \fi}
+
+% \startuseMPgraphic{one}
+% path p, q ;
+% numeric r ;
+% r := RuleThickness ;
+% p := unitsquare xysized(RuleWidth,RuleHeight+RuleDepth) ;
+% q := p topenlarged -r bottomenlarged -r ;
+% draw q ;
+% setbounds currentpicture to p;
+% \stopuseMPgraphic
+%
+% \setuplinetable[r][odd] [type=mp,mp=one,backgroundcolor=gray,rulethickness=1pt]
+% \setuplinetable[r][even][type=mp,mp=one,backgroundcolor=green,rulethickness=1pt]
+%
+% \startlinetable
+% \dorecurse{10}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+% \stoplinetable
+
+\def\tabl_lines_wrap_up_auto
+ {\edef\p_height{\linetablerparameter{x\c!height}}%
+ \edef\p_depth {\linetablerparameter{x\c!depth }}%
+ \hpack
+ {\blackrule
+ [ \c!color=\linetablecparameter\c!backgroundcolor,
+ \c!type=\linetablecparameter\c!type,
+ \c!mp=\linetablecparameter\c!mp,
+ \c!rulethickness=\linetablecparameter\c!rulethickness,
+ \c!height=\ifempty\p_height\ht\scratchbox\else\p_height\fi,
+ \c!depth=\ifempty\p_depth \dp\scratchbox\else\p_depth \fi,
+ \c!width=\wd\scratchbox]%
+ \hskip-\wd\scratchbox\box\scratchbox}}
+
+\def\tabl_lines_wrap_up_auto_r
+ {\hpack
+ {\blackrule
+ [ \c!color=\linetablerparameter\c!backgroundcolor,
+ \c!type=\linetablerparameter\c!type,
+ \c!mp=\linetablerparameter\c!mp,
+ \c!rulethickness=\linetablerparameter\c!rulethickness,
+ \c!height=\ht\scratchbox,
+ \c!depth=\dp\scratchbox,
+ \c!width=\wd\scratchbox]%
+ \hskip-\wd\scratchbox\box\scratchbox}}
+
+\def\tabl_lines_wrap_up_line
+ {\backgroundline[\linetablecparameter\c!backgroundcolor]{\box\scratchbox}}
+
+\def\tabl_lines_save_part
+ {\global\setbox\b_tabl_lines_current\c_tabl_lines_part
+ \ifcase\c_tabl_lines_part\relax
+ \box\scratchbox % just storing
+ \else
+ \vbox
+ {\ifvoid\b_tabl_lines_current\c_tabl_lines_part\else\unvbox\b_tabl_lines_current\c_tabl_lines_part\fi
+ \edef\p_background{\linetablerparameter\c!background}%
+ \ifx\p_background\v!color
+ \backgroundline[\linetablerparameter\c!backgroundcolor]{\box\scratchbox}%
+ \else
+ \edef\p_type{\linetablerparameter\c!type}%
+ \ifempty\p_type
+ \box\scratchbox
+ \else
+ \tabl_lines_wrap_up_auto_r
+ \fi
+ \fi
+ \endgraf
+ \linetablerparameter\c!after}%
+ \fi}
+
+\def\tabl_lines_flush_parts
+ {\global\advance\c_tabl_lines_line\plusone
+ \ifnum\c_tabl_lines_line<\c_tabl_lines_n_of_lines
+ % keep collecting
+ \else
+ \ifconditional\c_tabl_lines_preroll
+ % forget about them
+ \else
+ \dorecurse\c_tabl_lines_n_of_parts
+ {\c_tabl_lines_part\recurselevel
+ \dp\b_tabl_lines_current\c_tabl_lines_part\strutdepth
+ % noindent en endgraf needed else whitespace mess-up!
+ \whitespace % here not after verticalstrut
+ \ifdim\topskipgap=\zeropoint\else
+ \verticalstrut
+ \nobreak
+ \kern-\struttotal
+ \kern-\parskip
+ \nobreak
+ \nointerlineskip % fix topskip
+ \fi
+ \noindent\strut
+ \hpack to \hsize{\box\b_tabl_lines_current\c_tabl_lines_part\hss}%
+ \endgraf
+ \ifnum\c_tabl_lines_part<\c_tabl_lines_n_of_parts\relax
+ \linetableparameter\c!inbetween
+ \fi}%
+ \ifnum\c_tabl_lines_rows<\c_tabl_lines_n_of_rows
+ \linetableparameter\c!inbetween
+ \else
+ % after, later
+ \fi
+ \c_tabl_lines_head_state\plusthree
+ \global\setbox\b_tabl_lines_current\zerocount\emptybox % here
+ \fi
+ % reset \c_tabl_lines_row will be an option, currently
+ % starts at zero after split
+ \global\c_tabl_lines_row\zerocount
+ \global\c_tabl_lines_line\zerocount
+ \global\c_tabl_lines_page\zerocount
+ \global\d_tabl_lines_width\zeropoint
+ \tabl_lines_set
+ \fi}
+
+\def\tabl_lines_start_part
+ {\global\c_tabl_lines_subcol\zerocount
+ \setbox\scratchbox\hbox\bgroup
+ \dousestyleparameter{\linetablerparameter\c!style}%
+ \dousecolorparameter{\linetablerparameter\c!color}%
+ \ignorespaces}
+
+\def\tabl_lines_stop_part
+ {\ifnum\c_tabl_lines_part>\zerocount
+ \unskip \unskip % remove last intercolumn skip (distance+fill)
+ \fi
+ \egroup
+ \ifconditional\c_tabl_lines_preroll \else
+ \ifcase\c_tabl_lines_part
+ % we're collecting the repeater
+ \else
+ \ifdim\dimexpr\hsize-\wd\scratchbox\relax>\linetableparameter\c!stretch\else
+ \setbox\scratchbox\hpack to \hsize{\unhbox\scratchbox}%
+ \fi
+ \fi
+ \fi}
+
+\def\tabl_lines_check_part
+ {\global\advance\d_tabl_lines_width\wd\b_tabl_lines_cell
+ \global\advance\c_tabl_lines_column\c_tabl_lines_step
+ \global\advance\c_tabl_lines_subcol\c_tabl_lines_step
+ \relax
+ %\message{\the\c_tabl_lines_column,\the\c_tabl_lines_subcol}\wait
+ % from now on the column counter is already incremented
+ \ifcase\c_tabl_lines_split_state
+ \ifconditional\c_tabl_lines_preroll \else
+ \box\b_tabl_lines_cell
+ % the columncounter is one ahead !
+ \hskip\scratchskip
+ \fi
+ %%%
+ \donefalse
+ \ifcase\c_tabl_lines_repeat\else
+ % calculate ahead
+ \ifnum\c_tabl_lines_repeat=\numexpr\c_tabl_lines_column-\plustwo\relax
+ \donetrue % collecting repeater
+ \fi
+ \fi
+ %%%%
+ \ifdone
+ % collecting repeater
+ \else
+ \ifnum\c_tabl_lines_column>\csname\??linetablepart\number\c_tabl_lines_part\endcsname\relax
+ \donetrue
+ \fi
+ \fi
+ \ifdone
+ \tabl_lines_stop_part
+ \ifconditional\c_tabl_lines_preroll \else
+ \tabl_lines_save_part
+ \fi
+ \ifcase\c_tabl_lines_page \or
+ \global\c_tabl_lines_page \plustwo
+ \else
+ \global\c_tabl_lines_page \plusone
+ \fi
+ \global\advance\c_tabl_lines_part\plusone
+ \global\d_tabl_lines_width\wd\b_tabl_lines_current\zerocount
+ \tabl_lines_start_part
+ \fi
+ \else
+ \donefalse
+ \scratchconditiononefalse
+ \ifcase\c_tabl_lines_repeat\else
+ % calculate ahead
+ \ifnum\c_tabl_lines_repeat=\numexpr\c_tabl_lines_column-\plustwo\relax
+ \donetrue % collecting repeater
+ \fi
+ \fi
+ \ifdone
+ \scratchconditiononetrue
+ % collecting repeater
+ \orelse\ifdim\d_tabl_lines_width>\hsize
+ \donetrue
+ \else
+ \global\advance\d_tabl_lines_width\scratchskip
+ \ifdim\d_tabl_lines_width>\hsize % ?
+ \donetrue
+ \fi
+ \fi
+ \ifdone
+ \tabl_lines_stop_part
+ \tabl_lines_save_part
+ \ifcase\c_tabl_lines_page \or
+ \global\c_tabl_lines_page \plustwo
+ \else
+ \global\c_tabl_lines_page \plusone
+ \fi
+ \global\advance\c_tabl_lines_part\plusone
+ \ifnum\c_tabl_lines_part>\c_tabl_lines_n_of_parts
+ \global\c_tabl_lines_n_of_parts\c_tabl_lines_part
+ \tabl_lines_initialize_box\c_tabl_lines_part
+ \fi
+ \global\d_tabl_lines_width\wd\b_tabl_lines_cell
+ \tabl_lines_start_part
+ \ifscratchconditionone \orelse \ifcase\c_tabl_lines_repeat \else
+ % check for left/right page
+ \ifcase\c_tabl_lines_page\donetrue\or\donetrue\or\donefalse\fi\ifdone
+ % insert repeater
+ \global\advance\d_tabl_lines_width\wd\b_tabl_lines_current\zerocount
+ \ifconditional\c_tabl_lines_preroll\kern\wd\else\unhcopy\fi\b_tabl_lines_current\zerocount
+ \fi
+ \fi
+ \fi
+ \ifconditional\c_tabl_lines_preroll \else
+ \box\b_tabl_lines_cell
+ % the columncounter is one ahead !
+ %\dorecurse\c_tabl_lines_step{\strut\hfil}%
+ \strut
+ \hskip\scratchskip
+ \fi
+ \fi}
+
+\permanent\protected\def\startlinetablerun % to do: quit when nested
+ {\bgroup
+ \dontcomplain
+ \settrue\c_tabl_lines_in_table
+ % autowidth
+ \doif{\linetableparameter\c!maxwidth}\v!fit
+ {\setuplinetable[\c!maxwidth=\zeropoint]}%
+ \processaction
+ [\linetableparameter\c!stretch]
+ [ \v!no=>{\setuplinetable[\c!stretch=\maxdimen]},% no stretch
+ \v!yes=>{\setuplinetable[\c!stretch=\zeropoint]}]% max stretch
+ \c_tabl_lines_repeat\linetableparameter\c!nleft
+ \c_tabl_lines_split_state % =
+ \ifdim\linetableparameter\c!maxwidth>\zeropoint
+ \zerocount \else \plusone
+ \fi
+ % optional prevdepth correction
+ \ifconditional\c_tabl_lines_preroll
+ \global\c_tabl_lines_n_of_rows\zerocount
+ \else
+ \linetableparameter\c!before
+ \fi
+ \global\c_tabl_lines_rows\zerocount
+ \global\c_tabl_lines_n_of_columns\zerocount
+ \global\c_tabl_lines_n_of_parts\zerocount
+ \scratchcounter\zerocount
+ \def\docommand##1%
+ {\global\advance\c_tabl_lines_n_of_parts\plusone
+ \advance\scratchcounter##1%
+ \xdefcsname\??linetablepart\number\c_tabl_lines_n_of_parts\endcsname{\the\scratchcounter}}%
+ \processcommacommand[\linetableparameter\c!n]\docommand
+ \tabl_lines_initialize_boxes\c_tabl_lines_n_of_parts
+ \global\c_tabl_lines_part\ifcase\c_tabl_lines_repeat\plusone\else\zerocount\fi % repeater
+ \global\c_tabl_lines_step\plusone
+ \global\c_tabl_lines_line\zerocount
+ \global\c_tabl_lines_row \zerocount
+ \global\c_tabl_lines_column\zerocount
+ \global\c_tabl_lines_subcol\zerocount
+ \global\d_tabl_lines_width\zeropoint
+ \ifconditional\c_tabl_lines_preroll\orelse\ifdim\pagetotal>\zeropoint
+ \verticalstrut\kern-\struttotal
+ \fi
+ \tabl_lines_set
+ \tabl_lines_check_page
+ \enforced\let\BR\tabl_lines_BR
+ \enforced\let\ER\tabl_lines_ER
+ \enforced\let\BH\tabl_lines_BR
+ \enforced\let\EH\tabl_lines_ER
+ \enforced\let\BC\tabl_lines_BC
+ \enforced\let\EC\tabl_lines_EC
+ \enforced\let\NC\tabl_lines_NC
+ \enforced\let\NR\tabl_lines_NR
+ \tabl_lines_flush_head}
+
+\permanent\protected\def\stoplinetablerun
+ {\global\c_tabl_lines_line\maxcard
+ \c_tabl_lines_head_state\zerocount % blocked
+ \tabl_lines_flush_parts
+ \ifconditional\c_tabl_lines_preroll \else
+ \linetableparameter\c!after
+ \fi
+ \global\c_tabl_lines_part\zerocount
+ \global\c_tabl_lines_n_of_parts\zerocount
+ \egroup}
+
+\permanent\def\checklinecolumndimension#1#2#3%
+ {\global\edef#1\number#3\endcsname
+ {\expandafter\ifrelax\csname#1\number#3\endcsname
+ \the#2\b_tabl_lines_cell
+ \orelse\ifdim\csname#1\number#3\endcsname<#2\b_tabl_lines_cell
+ \the#2\b_tabl_lines_cell
+ \else
+ \csname#1\number#3\endcsname
+ \fi}}
+
+\def\tabl_lines_check_width {\checklinecolumndimension\??linetablewidth \wd\c_tabl_lines_column}
+\def\tabl_lines_check_height{\checklinecolumndimension\??linetableheight\ht\c_tabl_lines_row}
+\def\tabl_lines_check_depth {\checklinecolumndimension\??linetabledepth \dp\c_tabl_lines_row}
+
+\permanent\tolerant\protected\def\tabl_lines_BR[#1]% #1 not yet implemented
+ {\ifnum\c_tabl_lines_head_state=1\else
+ \global\advance\c_tabl_lines_row\plusone
+ \global\advance\c_tabl_lines_rows\plusone
+ \fi
+ \global\c_tabl_lines_column\plusone
+ \global\c_tabl_lines_subcol\plusone
+ \d_tabl_lines_height\zeropoint
+ \edef\p_height{\linetablerparameter\c!height}%
+ \ifempty\p_height
+ \c_tabl_lines_hmode \zerocount
+ \orelse\ifx\p_height\v!fit
+ \c_tabl_lines_hmode \plusone
+ \orelse\ifx\p_height\v!line
+ \c_tabl_lines_hmode \plustwo
+ \else
+ \d_tabl_lines_height\dimexpr\p_height-\strutdepth\relax
+ \fi
+ \tabl_lines_start_part}
+
+\permanent\protected\def\tabl_lines_BC
+ {\startlinetablecell}
+
+\permanent\protected\def\tabl_lines_EC
+ {\stoplinetablecell
+ \ifconditional\c_tabl_lines_preroll
+ \tabl_lines_check_width
+ \tabl_lines_check_height
+ \tabl_lines_check_depth
+ \fi
+ \tabl_lines_check_part}
+
+\permanent\protected\def\tabl_lines_ER
+ {% \stoplinetablecell
+ % no \box\b_tabl_lines_cell, i.e. dummy columnn, last \NC \NR
+ \tabl_lines_stop_part
+ \tabl_lines_save_part
+ \advance\c_tabl_lines_column \minusone
+ \ifnum\c_tabl_lines_column>\c_tabl_lines_n_of_columns
+ \global\c_tabl_lines_n_of_columns\c_tabl_lines_column
+ \fi
+ \tabl_lines_flush_parts
+ \global\c_tabl_lines_column\zerocount
+ \global\d_tabl_lines_width \zeropoint
+ \ifcase\c_tabl_lines_repeat
+ \global\c_tabl_lines_part\plusone
+ \else
+ \global\c_tabl_lines_part\zerocount % repeater
+ \fi
+ \tabl_lines_check_page
+ \tabl_lines_flush_head}
+
+\def\tabl_lines_check_page
+ {\global\c_tabl_lines_page\zerocount
+ \ifcase\c_tabl_lines_repeat\orelse\ifcase\c_tabl_lines_page
+ \doif{\linetableparameter\c!repeat}\v!no
+ {\global\c_tabl_lines_page\doifelseoddpage\plusone\plustwo}%
+ \fi}
+
+\def\tabl_lines_flush_head
+ {\ifcase\c_tabl_lines_head_state
+ % 0 blocked
+ \or
+ % 1 doing head
+ \or
+ % 2 head done
+ \or
+ % 3 trigger flush
+ \c_tabl_lines_head_state\plusone
+ \the\t_tabl_lines_head\relax
+ \c_tabl_lines_head_state\plustwo
+ \fi}
+
+\permanent\protected\def\tabl_lines_NC % first time special treatment
+ {\relax
+ \ifcase\c_tabl_lines_column
+ \tabl_lines_BR
+ \else
+ \tabl_lines_EC
+ \fi
+ \tabl_lines_BC} % beware, this will result in BR BC EC BC NR
+
+\permanent\protected\def\tabl_lines_NR
+ {\stoplinetablecell % dummy
+ \tabl_lines_ER}
+
+\permanent\protected\def\startlinetable
+ {\startlinetablerun}
+
+\permanent\protected\def\stoplinetable
+ {\stoplinetablerun}
+
+\permanent\protected\def\startlinetableanalysis
+ {\bgroup
+ \settrue\c_tabl_lines_preroll
+ \settrialtypesetting
+ \startlinetablerun}
+
+\permanent\protected\def\stoplinetableanalysis
+ {\stoplinetablerun
+ \egroup
+ \global\c_tabl_lines_n_of_rows\c_tabl_lines_rows
+ \dorecurse\c_tabl_lines_n_of_rows % global, from last run {\linetableparameter\c!n}
+ {\edefcsname\??linetable r:##1x\c!height\endcsname{\csname\??linetableheight##1\endcsname}%
+ \edefcsname\??linetable r:##1x\c!depth \endcsname{\csname\??linetabledepth ##1\endcsname}%
+ \gletcsname\??linetableheight##1\endcsname\zeropoint
+ \gletcsname\??linetabledepth ##1\endcsname\zeropoint}
+ \dorecurse\c_tabl_lines_n_of_columns % global, from last run {\linetableparameter\c!n}
+ {\edefcsname\??linetable c:##1\c!width\endcsname{\csname\??linetablewidth##1\endcsname}%
+ \gletcsname\??linetablewidth##1\endcsname\zeropoint}} % init next table
+
+% todo: store in box instead of macro
+
+\aliased\let\stoplinetablehead\relax
+
+\permanent\protected\def\startlinetablehead#1\stoplinetablehead
+ {\ifconditional\c_tabl_lines_in_table
+ \t_tabl_lines_head\emptytoks
+ \fi
+ \c_tabl_lines_head_state\plusthree % full
+ \t_tabl_lines_head{#1}%
+ \ifconditional\c_tabl_lines_in_table
+ \tabl_lines_flush_head
+ \fi}
+
+\permanent\protected\def\tabl_lines_BH
+ {\ifrelax\EC
+ % signal, grabbing lines
+ \else
+ \t_tabl_lines_head\emptytoks
+ \fi
+ \push_macro_BC
+ \push_macro_EC
+ \enforced\permanent\protected\def\BC##1\EC{\appendtoks##1\to\t_tabl_lines_head}%
+ \enforced\permanent \let\EC\relax} % signal
+
+\permanent\protected\def\tabl_lines_EH
+ {\pop_macro_EC
+ \pop_macro_BC
+ \expandafter\startlinetablehead\the\t_tabl_lines_head\stoplinetablehead}
+
+\permanent\let\startlinetablebody\relax
+\permanent\let\stoplinetablebody \relax
+
+\permanent\tolerant\protected\def\processlinetablebuffer[#1]%
+ {\bgroup
+ \enforced\let\startlinetable\relax
+ \enforced\let\stoplinetable \relax
+ \startlinetableanalysis\getbuffer[#1]\stoplinetableanalysis
+ \startlinetablerun \getbuffer[#1]\stoplinetablerun
+ \egroup}
+
+\permanent\tolerant\protected\def\processlinetablefile[#1]% maybe accept #1 as well as [#1]
+ {\bgroup
+ \enforced\let\startlinetable\relax
+ \enforced\let\stoplinetable \relax
+ \startlinetableanalysis\readfile{#1}\donothing\donothing\stoplinetableanalysis
+ \startlinetablerun \readfile{#1}\donothing\donothing\stoplinetablerun
+ \egroup}
+
+\popoverloadmode
+
+\setuplinetable
+ [\c!n=\maxcard,
+ \c!lines=\maxcard,
+ \c!nx=\plusone,
+ \c!nleft=\zerocount,
+ \c!repeat=\v!yes, % when nleft > 0, repeat on both pages
+ \c!before=,
+ \c!after=,
+ \c!inbetween=\page,
+ \c!distance=\zeropoint,
+ \c!stretch=\v!no,
+ \c!align=\c!right,
+ \c!leftoffset=.25\exheight,
+ \c!rightoffset=\linetableparameter\c!leftoffset,
+ \c!maxwidth=\zeropoint,
+ \c!width=5\emwidth,
+ \c!height=\v!fit, % \v!line = faster
+ \c!background=,
+ \c!backgroundcolor=,
+ \c!rulethickness=\linewidth]
+
+\protect
+
+\continueifinputfile{tabl-ltb.mkxl}
+
+\setuplinetable[n=6,m={2,2,2},lines=25] % m ?
+
+\setuplinetable[c][1] [width=2cm,background=color,backgroundcolor=red]
+\setuplinetable[c][4] [width=3cm,background=color,backgroundcolor=yellow]
+\setuplinetable[c][6] [width=3cm,background=color,backgroundcolor=magenta]
+\setuplinetable[r][odd] [background=color,backgroundcolor=gray]
+\setuplinetable[r][even][background=color,backgroundcolor=green]
+
+\starttext
+
+\showframe \showstruts
+
+\setuppagenumbering[alternative=doublesided]\page[left]
+
+\startlinetable
+\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR
+\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+\stoplinetable
+
+\startlinetable
+\NC[style=slanted,color=green,background=color,backgroundcolor=darkred,nx=2,uitlijnen=middle] xxx
+ \NC yy \NC ddddd \NC eeee \NC ff \NC \NR
+\dorecurse{100}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+\stoplinetable
+
+% \startbuffer[lt]
+% \NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC ee \NC ff \NC \NR
+% \NC aaa\crlf aaa \NC b \NC cc \NC ddd \NC eeee \NC f \NC \NR
+% \stopbuffer
+%
+% \processlinetablebuffer[lt]
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-mis.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-mis.mkxl
new file mode 100644
index 00000000000..7b6f0ffac1f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-mis.mkxl
@@ -0,0 +1,299 @@
+%D \module
+%D [ file=tabl-mis,
+%D version=2012.06.28,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Miscellaneous,
+%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 Table Macros / Miscellaneous}
+
+\unprotect
+
+%D \macros
+%D {somekindoftab,kindoftabposition}
+%D
+%D This macro can be used to create tabs:
+%D
+%D \starttyping
+%D \setupheadertexts[{\somekindoftab[alternative=horizontal]{\framed{\kindoftabposition}}}]
+%D \setuptexttexts [{\somekindoftab[alternative=vertical] {\framed{\kindoftabposition}}}]
+%D
+%D \starttext
+%D \showframe \dorecurse{10}{test\page}
+%D \stoptext
+%D \stoptyping
+%D
+%D (This rather old but updated code used to be in \type {core-mis.mkiv}.)
+
+\mutable\let\kindoftabposition\!!zerocount
+
+\permanent\tolerant\protected\def\somekindoftab[#1]%
+ {\bgroup
+ \getdummyparameters
+ [\c!alternative=\v!vertical,
+ \c!width=\textwidth,\c!height=\textheight,
+ \c!n=\lastpage,\c!m=\realpageno,
+ #1]%
+ \doifelse{\directdummyparameter\c!alternative}\v!vertical
+ {\typo_kindoftab_indeed\vbox\vskip\c!height}
+ {\typo_kindoftab_indeed\hbox\hskip\c!width }}
+
+\def\typo_kindoftab_indeed#1#2#3#4%
+ {#1 to \directdummyparameter#3 \bgroup
+ \forgetall
+ \scratchnx\directdummyparameter\c!n\relax
+ \scratchmx\directdummyparameter\c!m\relax
+ \edef\kindoftabposition{\the\scratchmx}%
+ \ifnum\scratchmx>\plusone
+ #2\zeropoint \s!plus \the\numexpr\scratchmx-\plusone \relax\s!fill\relax
+ \fi
+ #4% can use \kindoftabposition
+ \ifnum\scratchmx<\scratchnx\relax
+ #2\zeropoint \s!plus \the\numexpr\scratchnx-\scratchmx\relax\s!fill\relax
+ \fi
+ \egroup
+ \egroup}
+
+%D The following paragraphs mechanism is probably one of the oldest of \CONTEXT\ and
+%D mostly served as a table mechanism capable of dealing with paragraphs. Nowadays
+%D one can also use tabulate or natural tables.
+%D
+%D \startbuffer
+%D \defineparagraphs[sample][n=2,rule=on]
+%D
+%D \startsample
+%D first \nextsample
+%D second \nextsample
+%D third
+%D \stopsample
+%D
+%D \startsample
+%D \input tufte \nextsample
+%D \input ward \nextsample
+%D \input davis \nextsample
+%D \input zapf
+%D \stopsample
+%D
+%D \startparagraphs[sample]
+%D first \nextsample
+%D second \nextsample
+%D third
+%D \stopparagraphs
+%D
+%D \startparagraphs[sample]
+%D \startparagraphscell
+%D first
+%D \stopparagraphscell
+%D \startparagraphscell
+%D second
+%D \stopparagraphscell
+%D \startparagraphscell
+%D third
+%D \stopparagraphscell
+%D \stopparagraphs
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\installcorenamespace{paragraphs}
+
+\installframedcommandhandler \??paragraphs {paragraphs} \??paragraphs
+
+\setupparagraphs
+ [\c!n=3,
+ \c!offset=\zeropoint,
+ \c!before=\blank,
+ \c!after=\blank,
+ \c!distance=\emwidth,
+ \c!height=\v!fit,
+ \c!width=\availablehsize,
+ \c!rule=\v!off,
+ \c!command=,
+ \c!align=,
+ \c!tolerance=\v!tolerant, % obsolete
+ \c!rulethickness=\linewidth,
+ \c!rulecolor=,
+ \c!style=,
+ \c!color=,
+ \c!frame=\v!off,
+ \c!top=\vss,
+ \c!bottom=\vfill]
+
+\aliased\let\typo_paragraphs_setup_saved\setupparagraphs
+
+\let\typo_paragraphs_setup_step\gobbleoneargument
+
+\overloaded\permanent\tolerant\protected\def\setupparagraphs[#1]#*[#2]#*[#3]% we are downward compatible with [each] and [1,3]
+ {\ifarguments\or
+ \typo_paragraphs_setup_saved[#1]%
+ \or
+ \typo_paragraphs_setup_saved[#1][#2]%
+ \or
+ \doifelse{#2}\v!each
+ {\dorecurse{\namedparagraphsparameter{#1}\c!n}%
+ {\normalexpanded{\typo_paragraphs_setup_saved[#1:\recurselevel]}[#3]}}%
+ {\def\typo_paragraphs_setup_step##1{\typo_paragraphs_setup_saved[#1:##1][#3]}%
+ \processcommalist[#2]\typo_paragraphs_setup_step}%
+ \fi}
+
+\appendtoks
+ \frozen\instance\letcsname\e!next \currentparagraphs\endcsname\nextparagraphs
+ \frozen\instance\letcsname\currentparagraphs\endcsname\nextparagraphs
+ \frozen\instance\protected\edefcsname\e!start\currentparagraphs\endcsname{\startparagraphs[\currentparagraphs]}%
+ \frozen\instance\letcsname\e!stop \currentparagraphs\endcsname\stopparagraphs
+ %frozen\instance\setuevalue{\e!setup\currentparagraph\e!endsetup}{\typo_paragraphs_setup_saved[\currentparagraphs]}%
+ \dorecurse{\paragraphsparameter\c!n}%
+ {\normalexpanded{\typo_paragraphs_setup_saved[\currentparagraphs:\recurselevel][\c!width=,\s!parent=\??paragraphs\currentparagraphs]}}%
+ \typo_paragraphs_setup_saved[\currentparagraphs:1][\c!distance=\zeropoint]%
+\to \everydefineparagraphs
+
+\newcount\c_typo_paragraphs_n
+\newcount\c_typo_paragraphs_max
+\newdimen\d_typo_paragraphs_width
+\newdimen\d_typo_paragraphs_auto
+
+\let\typo_paragraphs_start_cell\relax
+\let\typo_paragraphs_stop_cell \relax
+
+\permanent\protected\def\startparagraphs[#1]% quite slow
+ {\bgroup % (1)
+ \edef\currentparagraphs{#1}%
+ % \paragraphsparameter\c!before
+ \edef\p_width{\paragraphsparameter\c!width}%
+ \ifempty\p_width
+ \d_typo_paragraphs_width\availablehsize
+ \else
+ \d_typo_paragraphs_width\p_width\relax
+ \fi
+ \advance\d_typo_paragraphs_width-2\dimexpr\paragraphsparameter\c!offset\relax
+ \c_typo_paragraphs_max\paragraphsparameter\c!n\relax
+ \d_typo_paragraphs_auto\d_typo_paragraphs_width\relax
+ \scratchcounter\zerocount
+ \dorecurse\c_typo_paragraphs_max
+ {\edef\p_width{\namedparagraphsparameter{\currentparagraphs:\recurselevel}\c!width}%
+ \ifempty\p_width
+ \advance\scratchcounter\plusone
+ \else
+ \advance\d_typo_paragraphs_auto-\p_width\relax
+ \fi
+ \ifnum\recurselevel>\plusone
+ \advance\d_typo_paragraphs_auto-\namedparagraphsparameter{\currentparagraphs:\recurselevel}\c!distance\relax
+ \fi}%
+ \ifnum\scratchcounter>\zerocount
+ \divide\d_typo_paragraphs_auto\scratchcounter
+ \else
+ \d_typo_paragraphs_auto\zeropoint
+ \fi
+ \parindent\zeropoint
+ \c_typo_paragraphs_n\zerocount
+ \enforced\let\\\nextparagraphs % downward compatible
+ \edef\p_offset{\paragraphsparameter\c!offset}%
+ \doifelsedimension\p_offset
+ {\scratchoffset\p_offset}%
+ {\scratchoffset\zeropoint}%
+ \setbox\scratchbox\hpack
+ \bgroup % (2)
+ \forgetall
+ \advance\hsize-2\scratchoffset
+ \let\typo_paragraphs_start_cell\typo_paragraphs_start_cell_indeed
+ \let\typo_paragraphs_stop_cell \typo_paragraphs_stop_cell_indeed
+ \typo_paragraphs_start_cell_indeed}
+
+\permanent\protected\def\stopparagraphs
+ {\stopparagraphscell
+ \egroup % (2)
+ \letparagraphsparameter\c!align\v!flushleft % normal
+ \paragraphsparameter\c!before
+ \dontleavehmode\inheritedparagraphsframed{\box\scratchbox}%
+ \paragraphsparameter\c!after
+ \egroup} % (1)
+
+\permanent\protected\def\nextparagraphs
+ {\stopparagraphscell
+ \startparagraphscell}
+
+\permanent\protected\def\startparagraphscell
+ {\typo_paragraphs_start_cell}
+
+\def\typo_paragraphs_start_cell_indeed
+ {\removeunwantedspaces
+ \advance\c_typo_paragraphs_n\plusone
+ \ifnum\c_typo_paragraphs_n>\c_typo_paragraphs_max
+ \expandafter\typo_paragraphs_start_cell_nop
+ \else
+ \expandafter\typo_paragraphs_start_cell_yes
+ \fi}
+
+\def\typo_paragraphs_start_cell_nop
+ {\begingroup
+ % message: too many cells in paragraphs
+ \let\typo_paragraphs_start_cell\relax
+ \let\typo_paragraphs_stop_cell\typo_paragraphs_stop_cell_indeed
+ \setbox\scratchbox\vbox\bgroup}
+
+\def\typo_paragraphs_start_cell_yes
+ {\begingroup
+ \let\typo_paragraphs_start_cell\relax
+ \let\typo_paragraphs_stop_cell\typo_paragraphs_stop_cell_indeed
+ \edef\currentparagraphs{\currentparagraphs:\the\c_typo_paragraphs_n}%
+ \ifnum\c_typo_paragraphs_n>\plusone
+ \typo_paragraphs_separator
+ \fi
+ \edef\p_height{\paragraphsparameter\c!height}%
+ \edef\p_width {\paragraphsparameter\c!width }%
+ \useparagraphsstyleandcolor\c!style\c!color
+ \setbox\scratchbox\vtop \ifempty\p_height \orelse\ifx\p_height\v!fit \else to \p_height \fi
+ \bgroup % (2)
+ \blank[\v!disable]%
+ \paragraphsparameter\c!top
+ \hsize\ifempty\p_width \d_typo_paragraphs_auto \else \p_width \fi \relax
+ \usealignparameter\paragraphsparameter
+ \paragraphsparameter\c!inner
+ \everypar{\begstrut\everypar\emptytoks}%
+ \ignorespaces
+ \paragraphsparameter\c!command}
+
+\permanent\protected\def\stopparagraphscell
+ {\typo_paragraphs_stop_cell
+ \let\typo_paragraphs_stop_cell\relax}
+
+\def\typo_paragraphs_stop_cell_indeed
+ {\ifnum\c_typo_paragraphs_n>\c_typo_paragraphs_max
+ \expandafter\typo_paragraphs_stop_cell_nop
+ \else
+ \expandafter\typo_paragraphs_stop_cell_yes
+ \fi}
+
+\def\typo_paragraphs_stop_cell_nop
+ {\egroup
+ \endgroup}
+
+\def\typo_paragraphs_stop_cell_yes
+ {\ifvmode
+ \removelastskip
+ \else
+ \removeunwantedspaces
+ \endstrut
+ \endgraf
+ \fi
+ \paragraphsparameter\c!bottom
+ \egroup % (2)
+ \dontleavehmode\hpack{\raise\strutheight\box\scratchbox}%
+ \endgroup}
+
+\def\typo_paragraphs_separator
+ {\scratchdistance\paragraphsparameter\c!distance
+ \doif{\paragraphsparameter\c!rule}\v!on
+ {\scratchwidth\paragraphsparameter\c!rulethickness
+ \scratchdistance\dimexpr(\scratchdistance-\scratchwidth)/2\relax
+ \hskip\scratchdistance
+ \color[\paragraphsparameter\c!rulecolor]{\vrule\s!width\scratchwidth}}%
+ \hskip\scratchdistance}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-ntb.mkxl
index 6b84411b2a9..5b30c449ca4 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-ntb.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-ntb.mkxl
@@ -44,12 +44,12 @@
% \eTR
% \eTABLE
-% \unexpanded\def\startrow {\bTR}
-% \unexpanded\def\stoprow {\eTR}
-% \unexpanded\def\startcell#1\stopcell{\bTD#1\eTD}
-% \let\stopcell \relax
-% \let\startcelltable \bTABLE
-% \let\stopcelltable \eTABLE
+% \protected\def\startrow {\bTR}
+% \protected\def\stoprow {\eTR}
+% \protected\def\startcell#1\stopcell{\bTD#1\eTD}
+% \let\stopcell \relax
+% \let\startcelltable \bTABLE
+% \let\stopcelltable \eTABLE
% \starttext
% \startcelltable
@@ -77,8 +77,8 @@
%D
%D \typebuffer \getbuffer
-\ifdefined\dotagTABLEcell \else \let\dotagTABLEcell \relax \fi % todo: namespace
-\ifdefined\dotagTABLEsignal \else \let\dotagTABLEsignal\relax \fi % todo: namespace
+\ifdefined\dotagTABLEcell \else \aliased\let\dotagTABLEcell \relax \fi % todo: namespace
+\ifdefined\dotagTABLEsignal \else \aliased\let\dotagTABLEsignal\relax \fi % todo: namespace
\let\tabl_ntb_next_level\relax
@@ -100,7 +100,7 @@
% maybe: \the\neverypar
\to \t_tabl_ntb_cell_start
-\unexpanded\def\tabl_ntb_cell_start
+\protected\def\tabl_ntb_cell_start
{% \inhibitblank
\dotagTABLEcell
%\tabl_ntb_next_level
@@ -109,7 +109,7 @@
\everypar\t_tabl_ntb_cell_start
\font_styles_math_start}
-\unexpanded\def\tabl_ntb_cell_stop
+\protected\def\tabl_ntb_cell_stop
{\font_styles_math_stop
\ifhmode
\the\t_tabl_ntb_cell_stop
@@ -123,7 +123,7 @@
% maybe:
%
-% \unexpanded\def\tabl_ntb_cell_stop
+% \protected\def\tabl_ntb_cell_stop
% {\ifhmode
% \the\t_tabl_ntb_cell_stop
% \par % added 13/4/2006
@@ -132,11 +132,11 @@
% \par
% \ifhmode
% % \removeunwantedspaces
-% \else\ifdim\prevdepth<\zeropoint % =-1000pt ?
+% \orelse\ifdim\prevdepth<\zeropoint % =-1000pt ?
% \vskip-\strutdp
% \else
% \removebottomthings
-% \fi\fi
+% \fi
% \fi}
\newcount\c_tabl_ntb_row
@@ -213,7 +213,7 @@
\installglobalmacrostack\m_tabl_ntb_saved_row
\installglobalmacrostack\m_tabl_ntb_saved_col
-\unexpanded\def\tabl_ntb_table_push
+\protected\def\tabl_ntb_table_push
{\ifnum\m_tabl_tbl_level>\plusone
\tabl_ntb_parameters_reset
% we need a proper count push/pop
@@ -223,7 +223,7 @@
\global\intabletrue
\fi}
-\unexpanded\def\tabl_ntb_table_pop
+\protected\def\tabl_ntb_table_pop
{\ifnum\m_tabl_tbl_level>\plusone
\pop_macro_m_tabl_ntb_saved_row\global\c_tabl_ntb_row\m_tabl_ntb_saved_row
\pop_macro_m_tabl_ntb_saved_col\global\c_tabl_ntb_col\m_tabl_ntb_saved_col
@@ -231,11 +231,11 @@
\global\intablefalse
\fi}
-\unexpanded\def\tabl_ntb_next_level
+\protected\def\tabl_ntb_next_level
{\advance\c_tabl_level\plusone
\edef\m_tabl_tbl_level{\the\c_tabl_level}}
-\unexpanded\def\tabl_ntb_prev_level
+\protected\def\tabl_ntb_prev_level
{\advance\c_tabl_level\minusone
\edef\m_tabl_tbl_level{\the\c_tabl_level}}
@@ -247,6 +247,9 @@
\installdirectcommandhandler \??naturaltable {naturaltable} % \??naturaltable
\installsimpleframedcommandhandler \??naturaltablelocal {naturaltablelocal} \??naturaltablelocal
+\permanent\protected\def\bTABLEnested{\tabl_ntb_next_level\bTABLE}
+\permanent\protected\def\eTABLEnested{\eTABLE\tabl_ntb_prev_level}
+
\installcorenamespace{naturaltabletal}
\installcorenamespace{naturaltablegal}
\installcorenamespace{naturaltablenob}
@@ -276,28 +279,28 @@
\letvalue{\??naturaltablesqueeze\v!broad}\donetrue
\letvalue{\??naturaltablesqueeze\v!local}\donetrue
-\def\tabl_ntb_let_gal{\expandafter\glet\csname\??naturaltablegal\m_tabl_tbl_level\endcsname}
+\def\tabl_ntb_let_gal{\gletcsname\??naturaltablegal\m_tabl_tbl_level\endcsname}
\def\tabl_ntb_get_gal{\csname\??naturaltablegal\m_tabl_tbl_level\endcsname}
-\def\tabl_ntb_let_tal#1{\expandafter\glet\csname\??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname}
+\def\tabl_ntb_let_tal#1{\gletcsname\??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname}
\def\tabl_ntb_get_tal#1{\csname\??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname}
-\def\tabl_ntb_set_nob#1{\expandafter\let\csname\??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone}
+\def\tabl_ntb_set_nob#1{\letcsname\??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone}
\def\tabl_ntb_get_nob#1{\ifcsname\??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone\else\zerocount\fi}
-%def\tabl_ntb_set_tag#1#2{\expandafter\edef\csname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_set_col#1#2{\expandafter\edef\csname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_set_row#1#2{\expandafter\edef\csname\??naturaltablerow\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+%def\tabl_ntb_set_tag#1#2{\edefcsname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+\def\tabl_ntb_set_col#1#2{\edefcsname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+\def\tabl_ntb_set_row#1#2{\edefcsname\??naturaltablerow\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_let_tag#1#2{\expandafter\let\csname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_let_col#1#2{\expandafter\let\csname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_let_row#1#2{\expandafter\let\csname\??naturaltablerow\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+\def\tabl_ntb_let_tag#1#2{\letcsname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+\def\tabl_ntb_let_col#1#2{\letcsname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+\def\tabl_ntb_let_row#1#2{\letcsname\??naturaltablerow\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-%def\tabl_ntb_set_wd#1#2{\expandafter\xdef\csname\??naturaltablewd\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
-\def\tabl_ntb_set_ht#1#2{\expandafter\xdef\csname\??naturaltableht\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
+%def\tabl_ntb_set_wd#1#2{\xdefcsname\??naturaltablewd\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
+\def\tabl_ntb_set_ht#1#2{\xdefcsname\??naturaltableht\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
-%def\tabl_ntb_let_wd#1#2{\expandafter\glet\csname\??naturaltablewd\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
-\def\tabl_ntb_let_ht#1#2{\expandafter\glet\csname\??naturaltableht\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
+%def\tabl_ntb_let_wd#1#2{\letcsname\??naturaltablewd\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
+\def\tabl_ntb_let_ht#1#2{\letcsname\??naturaltableht\m_tabl_tbl_level:\number#1:\number#2\endcsname} % global !
\def\tabl_ntb_get_tag#1#2{\csname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname}
\def\tabl_ntb_get_col#1#2{\csname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname}
@@ -306,15 +309,15 @@
%def\tabl_ntb_get_wd#1#2{\csname\??naturaltablewd\m_tabl_tbl_level:\number#1:\number#2\endcsname}
\def\tabl_ntb_get_ht#1#2{\csname\??naturaltableht\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_set_wid#1{\expandafter\xdef\csname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_set_hei#1{\expandafter\xdef\csname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_set_dis#1{\expandafter\xdef\csname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_set_aut#1{\expandafter\xdef\csname\??naturaltableaut\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_set_wid#1{\xdefcsname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_set_hei#1{\xdefcsname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_set_dis#1{\xdefcsname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_set_aut#1{\xdefcsname\??naturaltableaut\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_let_wid#1{\expandafter\glet\csname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_let_hei#1{\expandafter\glet\csname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_let_dis#1{\expandafter\glet\csname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
-\def\tabl_ntb_let_aut#1{\expandafter\glet\csname\??naturaltableaut\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_let_wid#1{\gletcsname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_let_hei#1{\gletcsname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_let_dis#1{\gletcsname\??naturaltabledis\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
+\def\tabl_ntb_let_aut#1{\gletcsname\??naturaltableaut\m_tabl_tbl_level:\number#1\endcsname} % {#2} global !
\def\tabl_ntb_get_wid#1{\ifcsname\??naturaltablewid\m_tabl_tbl_level:\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
\def\tabl_ntb_get_hei#1{\ifcsname\??naturaltablehei\m_tabl_tbl_level:\number#1\endcsname\lastnamedcs\else\zeropoint\fi}
@@ -340,7 +343,7 @@
%
% \def\tabl_ntb_let_tag#1#2#3%
% {\ifx#3\c_tabl_ntb_none\else
-% \expandafter\let\csname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname#3%
+% \letcsname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname#3%
% \fi}
%
% \def\tabl_ntb_get_tag#1#2%
@@ -350,38 +353,20 @@
% \c_tabl_ntb_none
% \fi}
-% not used
-%
-% \def\tabl_ntb_tag_state#1#2{\ifcsname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname\zerocount\else\plusone\fi}
-% \def\tabl_ntb_row_state#1#2{\ifcsname\??naturaltablerow\m_tabl_tbl_level:\number#1:\number#2\endcsname\zerocount\else\plusone\fi}
-% \def\tabl_ntb_col_state#1#2{\ifcsname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname\zerocount\else\plusone\fi}
-
-%def\tabl_ntb_set_spn #1{\expandafter\let\csname\??naturaltablespn\m_tabl_tbl_level:\number#1\endcsname \!!plusone}
-%def\tabl_ntb_spn_doifelse#1{\doifelse {\csname\??naturaltablespn\m_tabl_tbl_level:\number#1\endcsname}\!!plusone}
-
-%def\tabl_ntb_set_spn #1{\setvalue {\??naturaltablespn\m_tabl_tbl_level:\number#1}{1}}
-%def\tabl_ntb_spn_doifelse#1{\doifelsevalue{\??naturaltablespn\m_tabl_tbl_level:\number#1}{1}}
-
-\def\tabl_ntb_let_ref #1#2{\expandafter\glet\csname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_set_ref #1#2{\expandafter\xdef\csname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+\def\tabl_ntb_let_ref #1#2{\gletcsname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
+\def\tabl_ntb_set_ref #1#2{\xdefcsname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
%def\tabl_ntb_get_ref #1#2{\ifcsname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname\csname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname\fi}
\def\tabl_ntb_get_ref #1#2{\begincsname\??naturaltableref\m_tabl_tbl_level:\number#1:\number#2\endcsname}
-\def\tabl_ntb_set_spn #1{\expandafter\let\csname\??naturaltablespn\m_tabl_tbl_level:\number#1\endcsname \!!plusone}
+\def\tabl_ntb_set_spn #1{\letcsname\??naturaltablespn\m_tabl_tbl_level:\number#1\endcsname \!!plusone}
\def\tabl_ntb_spn_doifelse#1{\ifcase0\csname\??naturaltablespn\m_tabl_tbl_level:\number#1\endcsname\relax % could be inlined
\expandafter\secondoftwoarguments % unset
\else
\expandafter\firstoftwoarguments % a span
\fi}
-% keep for a while:
-%
-% \unexpanded\def\tabl_ntb_set_txt_process#1#2#3#4#5#6% nasty: we restore the level
-% {\expandafter\def\csname\??naturaltabletxt\m_tabl_tbl_level:\number#1:\number#2\expandafter\endcsname\expandafter
-% {\expandafter\def\expandafter\m_tabl_tbl_level\expandafter{\m_tabl_tbl_level}\tabl_ntb_cell_process{#3}{#4}[#5]{#6}}}
-
-\unexpanded\def\tabl_ntb_set_txt_process#1#2#3#4#5#6%
- {\expandafter\def\csname\??naturaltabletxt\m_tabl_tbl_level:\number#1:\number#2\endcsname
+\protected\def\tabl_ntb_set_txt_process#1#2#3#4#5#6%
+ {\defcsname\??naturaltabletxt\m_tabl_tbl_level:\number#1:\number#2\endcsname
{\tabl_ntb_cell_process{#3}{#4}[#5]{\tabl_ntb_next_level#6\tabl_ntb_prev_level}}}
\def\tabl_ntb_get_txt#1#2%
@@ -411,25 +396,27 @@
% so far
-\unexpanded\def\tabl_ntb_cell_process#1#2[#3]{}
-
-\unexpanded\def\bTC#1\eTC{\bTD#1\eTD} \let\eTC\relax
-\unexpanded\def\bTX#1\eTX{\bTD#1\eTD} \let\eTX\relax
-\unexpanded\def\bTY#1\eTY{\bTR#1\eTR} \let\eTY\relax
+\protected\def\tabl_ntb_cell_process#1#2[#3]{}
-\unexpanded\def\setupTABLE
- {\dotripleempty\tabl_ntb_setup}
+\permanent\protected\def\bTC#1\eTC{\bTD#1\eTD} \aliased\let\eTC\relax
+\permanent\protected\def\bTX#1\eTX{\bTD#1\eTD} \aliased\let\eTX\relax
+\permanent\protected\def\bTY#1\eTY{\bTR#1\eTR} \aliased\let\eTY\relax
\let\tabl_ntb_parameters_get\setupcurrentnaturaltablelocal
-\def\tabl_ntb_setup
- {\ifthirdargument
+\let\tabl_ntb_setup_step \gobbleoneargument
+\let\tabl_ntb_setup_step_step\gobbleoneargument
+
+\permanent\tolerant\protected\def\setupTABLE[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ \expandafter\gobblethreeoptionals
+ \or
+ \expandafter\tabl_ntb_setup_one
+ \or
+ \expandafter\tabl_ntb_setup_two
+ \or
\expandafter\tabl_ntb_setup_three
- \orelse\ifsecondargument
- \doubleexpandafter\tabl_ntb_setup_two
- \else
- \doubleexpandafter\tabl_ntb_setup_one
- \fi}
+ \fi[#1][#2][#3]}
\def\tabl_ntb_setup_one[#1][#2][#3]%
{\setupcurrentnaturaltablelocal[#1]}
@@ -454,9 +441,6 @@
\installcorenamespace{naturaltablesetupthree}
\installcorenamespace{naturaltablesetuptwo}
-%def\tabl_ntb_setup_three[#1]{\csname\??naturaltablesetupthree\ifcsname\??naturaltablesetupthree#1\endcsname#1\else\s!unknown\fi\endcsname[#1]}
-%def\tabl_ntb_setup_two [#1]{\csname\??naturaltablesetuptwo \ifcsname\??naturaltablesetuptwo #1\endcsname#1\else\s!unknown\fi\endcsname[#1]}
-
\def\tabl_ntb_setup_three[#1]{\ifcsname\??naturaltablesetupthree#1\endcsname\expandafter\lastnamedcs\else\expandafter\tabl_ntb_setup_un\fi[#1]}
\def\tabl_ntb_setup_two [#1]{\ifcsname\??naturaltablesetuptwo #1\endcsname\expandafter\lastnamedcs\else\expandafter\tabl_ntb_setup_ux\fi[#1]}
@@ -486,15 +470,15 @@
\def\tabl_ntb_parameters_set[#1][#2]%
{\ifappendTBLsetups
\ifcsname\??naturaltableset\m_tabl_tbl_level:#1\endcsname
- \def\tabl_ntb_parameters_get[##1]%
- {\setvalue{\??naturaltableset\m_tabl_tbl_level:#1}{\tabl_ntb_parameters_get[##1,#2]}}%
+ \enforced\def\tabl_ntb_parameters_get[##1]%
+ {\defcsname\??naturaltableset\m_tabl_tbl_level:#1\endcsname{\tabl_ntb_parameters_get[##1,#2]}}%
\csname\??naturaltableset\m_tabl_tbl_level:#1\endcsname
- \let\tabl_ntb_parameters_get\setupcurrentnaturaltablelocal
+ \enforced\let\tabl_ntb_parameters_get\setupcurrentnaturaltablelocal
\else
- \setvalue{\??naturaltableset\m_tabl_tbl_level:#1}{\tabl_ntb_parameters_get[#2]}%
+ \defcsname\??naturaltableset\m_tabl_tbl_level:#1\endcsname{\tabl_ntb_parameters_get[#2]}%
\fi
\else
- \setvalue{\??naturaltableset\m_tabl_tbl_level:#1}{\tabl_ntb_parameters_get[#2]}%
+ \defcsname\??naturaltableset\m_tabl_tbl_level:#1\endcsname{\tabl_ntb_parameters_get[#2]}%
\fi}
% % \setupTABLE [y] [first][background=color,backgroundcolor=blue,frame=off,bottomframe=on,topframe=on,framecolor=white]
@@ -559,7 +543,7 @@
\let\tabl_ntb_setup_section\relax
-\unexpanded\def\tabl_ntb_setup_cell#1#2% cell over col over row
+\protected\def\tabl_ntb_setup_cell#1#2% cell over col over row
{\tabl_ntb_setup_section % already forgotten
\edef\m_tabl_ntb_positive_row{\number#1}%
\edef\m_tabl_ntb_positive_col{\number#2}%
@@ -668,29 +652,29 @@
% \bTR \bTD left \eTD\bTD right \eTD\eTR
% \eTABLE
-\unexpanded\def\tabl_ntb_tr
+\tolerant\protected\def\tabl_ntb_tr[#1]%
{\c_tabl_ntb_running_col\zerocount
\c_tabl_ntb_encountered_col\zerocount
\advance\c_tabl_ntb_maximum_row\plusone
- \iffirstargument
+ \ifparameter#1\or
\expandafter\tabl_ntb_tr_yes
\else
\expandafter\gobbleoneoptional
- \fi}
+ \fi[#1]}
\def\tabl_ntb_tr_yes[#1]%
- {\setvalue{\??naturaltableset\m_tabl_tbl_level:\c!y++\the\c_tabl_ntb_maximum_row}{\setupcurrentnaturaltablelocal[#1]}}
+ {\defcsname\??naturaltableset\m_tabl_tbl_level:\c!y++\the\c_tabl_ntb_maximum_row\endcsname{\setupcurrentnaturaltablelocal[#1]}}
\def\m_tabl_ntb_default_nr{\naturaltableparameter\c!nr}
\def\m_tabl_ntb_default_nc{\naturaltableparameter\c!nc}
-\unexpanded\def\tabl_ntb_td
+\tolerant\protected\def\tabl_ntb_td[#1]%
{\advance\c_tabl_ntb_encountered_col\plusone
- \iffirstargument
+ \ifparameter#1\or
\expandafter\tabl_ntb_td_yes
\else
\expandafter\tabl_ntb_td_nop
- \fi}
+ \fi[#1]}
\def\tabl_ntb_td_yes[#1]#2\eTD
{\letnaturaltableparameter\c!ny \m_tabl_ntb_default_nr
@@ -708,12 +692,12 @@
\edef\m_tabl_ntb_n{\naturaltableparameter\c!n}%
\edef\m_tabl_ntb_m{\naturaltableparameter\c!m}%
%
- \ifx\m_tabl_ntb_n\empty
+ \ifempty\m_tabl_ntb_n
\global\advance\c_tabl_ntb_spn\c_tabl_ntb_nx\relax
\orelse\ifnum\m_tabl_ntb_n=\c_tabl_ntb_running_col\else
\tabl_ntb_td_pass_n{#1}%
\fi
- \ifx\m_tabl_ntb_m\empty \else
+ \ifempty\m_tabl_ntb_m \else
\ifnum\m_tabl_ntb_m=\c_tabl_ntb_running_col\else
\tabl_ntb_td_pass_m{#1}%
\fi
@@ -857,10 +841,10 @@
%D
%D \typebuffer \getbuffer
-\def\tabl_ntb_th[#1]#2\eTH
+\tolerant\def\tabl_ntb_th[#1]#:#2\eTH
{\tabl_ntb_td[#1,\c!color=\naturaltablelocalparameter\c!headcolor,\c!style=\naturaltablelocalparameter\c!headstyle,\c!aligncharacter=\v!no]#2\eTD}
-\def\tabl_ntb_tn[#1]#2\eTN
+\tolerant\def\tabl_ntb_tn[#1]#:#2\eTN
{\tabl_ntb_td[#1]\digits#2\relax\eTD}
%D Vit Zyka needed the option to create a distance between columns, so I added
@@ -909,18 +893,18 @@
% to be done: head <raw> foot, dus state var
-\unexpanded\def\bTABLEhead{\dosingleempty\tabl_ntb_head} \let\eTABLEhead\relax
-\unexpanded\def\bTABLEnext{\dosingleempty\tabl_ntb_next} \let\eTABLEnext\relax
-\unexpanded\def\bTABLEbody{\dosingleempty\tabl_ntb_body} \let\eTABLEbody\relax
-\unexpanded\def\bTABLEfoot{\dosingleempty\tabl_ntb_foot} \let\eTABLEfoot\relax
+\aliased\let\eTABLEhead\relax
+\aliased\let\eTABLEnext\relax
+\aliased\let\eTABLEbody\relax
+\aliased\let\eTABLEfoot\relax
-\def\tabl_ntb_head[#1]#2\eTABLEhead{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_head}
-\def\tabl_ntb_next[#1]#2\eTABLEnext{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_next}
-\def\tabl_ntb_body[#1]#2\eTABLEbody{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_body}
-\def\tabl_ntb_foot[#1]#2\eTABLEfoot{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_foot}
+\permanent\tolerant\protected\def\bTABLEhead[#1]#:#2\eTABLEhead{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_head}
+\permanent\tolerant\protected\def\bTABLEnext[#1]#:#2\eTABLEnext{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_next}
+\permanent\tolerant\protected\def\bTABLEbody[#1]#:#2\eTABLEbody{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_body}
+\permanent\tolerant\protected\def\bTABLEfoot[#1]#:#2\eTABLEfoot{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_foot}
\def\tabl_ntb_section[#1]#2% also used in tabl-nte
- {\unexpanded\def\tabl_ntb_setup_section{\setupcurrentnaturaltablelocal[#1]}%
+ {\protected\def\tabl_ntb_setup_section{\setupcurrentnaturaltablelocal[#1]}%
#2%
\let\tabl_ntb_setup_section\relax}
@@ -929,10 +913,7 @@
\begincsname\??naturaltableset\m_tabl_tbl_level:\v!start\v!oddeven\m_tabl_tbl_level\endcsname
\begincsname\??naturaltableset\m_tabl_tbl_level:\v!start\m_tabl_tbl_level\endcsname}
-\unexpanded\def\bTABLE
- {\dosingleempty\tabl_ntb_table}
-
-\def\tabl_ntb_table[#1]%
+\permanent\tolerant\protected\def\bTABLE[#1]%
{\tabl_ntb_table_push
% box not here
\bgroup
@@ -981,36 +962,38 @@
\let\currentTABLEcolumn\tabl_ntb_current_column
\let\nofTABLErows \tabl_ntb_n_of_rows
\let\nofTABLEcolumns \tabl_ntb_n_of_columns
- \let\bTR\dobTR
- \let\bTD\dobTD
- \let\bTH\dobTH
- \let\bTN\dobTN}
+ \enforced\let\bTR\tabl_ntb_bTR
+ \enforced\let\bTD\tabl_ntb_bTD
+ \enforced\let\bTH\tabl_ntb_bTH
+ \enforced\let\bTN\tabl_ntb_bTN}
\def\tabl_ntb_current_row {\m_tabl_ntb_positive_row}
\def\tabl_ntb_current_column{\m_tabl_ntb_positive_col}
\def\tabl_ntb_n_of_rows {\number\c_tabl_ntb_maximum_row}
\def\tabl_ntb_n_of_columns {\number\c_tabl_ntb_maximum_col}
-\let\currentTABLErow \!!zerocount
-\let\currentTABLEcolumn\!!zerocount
-\let\nofTABLErows \!!zerocount
-\let\nofTABLEcolumns \!!zerocount
+\mutable\let\currentTABLErow \!!zerocount
+\mutable\let\currentTABLEcolumn\!!zerocount
+\mutable\let\nofTABLErows \!!zerocount
+\mutable\let\nofTABLEcolumns \!!zerocount
% there is no gain in a \doifelsenextoptionalcs variant
-\unexpanded\def\dobTR{\dosingleempty\tabl_ntb_tr} % also used in tabl-nte
-\unexpanded\def\dobTD{\dosingleempty\tabl_ntb_td} % also used in tabl-nte
-\unexpanded\def\dobTH{\dosingleempty\tabl_ntb_th} % also used in tabl-nte
-\unexpanded\def\dobTN{\dosingleempty\tabl_ntb_tn} % also used in tabl-nte
+% todo with tolerant:
+
+\permanent\tolerant\protected\def\tabl_ntb_bTR{\tabl_ntb_tr} % also used in tabl-nte
+\permanent\tolerant\protected\def\tabl_ntb_bTD{\tabl_ntb_td} % also used in tabl-nte
+\permanent\tolerant\protected\def\tabl_ntb_bTH{\tabl_ntb_th} % also used in tabl-nte
+\permanent\tolerant\protected\def\tabl_ntb_bTN{\tabl_ntb_tn} % also used in tabl-nte
% permits \expanded{\bTD ... \eTD}
-\let\bTR\relax \unexpanded\def\eTR{\ignorespaces} % handy in case we use a macro to generate rows
-\let\bTD\relax \unexpanded\def\eTD{\ignorespaces}
-\let\bTH\relax \unexpanded\def\eTH{\ignorespaces}
-\let\bTN\relax \unexpanded\def\eTN{\ignorespaces}
+\permanent\let\bTR\relax \permanent\protected\def\eTR{\ignorespaces} % handy in case we use a macro to generate rows
+\permanent\let\bTD\relax \permanent\protected\def\eTD{\ignorespaces}
+\permanent\let\bTH\relax \permanent\protected\def\eTH{\ignorespaces}
+\permanent\let\bTN\relax \permanent\protected\def\eTN{\ignorespaces}
-\unexpanded\def\eTABLE % beware, we need to get rid of spurious spaces when in hmode
+\permanent\protected\def\eTABLE % beware, we need to get rid of spurious spaces when in hmode
{% tricky and dirty order -)
\setfalse\c_tabl_ntb_okay
% head
@@ -1158,8 +1141,8 @@
\tabl_ntb_let_tag\c_tabl_ntb_current_row\c_tabl_ntb_current_col\c_tabl_ntb_none
\fi}
-\let\startTBLprocessing\relax % public
-\let\stopTBLprocessing \relax % public
+\mutable\let\startTBLprocessing\relax % public
+\mutable\let\stopTBLprocessing \relax % public
\newcount\c_tabl_prelocated_rows % \prelocateTBLrows{1000} may speed up large tables
@@ -1211,12 +1194,12 @@
\the\t_tabl_ntb_row
\tabl_ntb_row_align_stop}}
-\unexpanded\def\tabl_ntb_row_align_set#1#2#3%
+\protected\def\tabl_ntb_row_align_set#1#2#3%
{\xdef\m_tabl_ntb_before_split{#1}%
\xdef\m_tabl_ntb_after_split {#2}%
\xdef\m_tabl_ntb_same_page {#3}}
-\unexpanded\def\tabl_ntb_row_align_reset
+\protected\def\tabl_ntb_row_align_reset
{\glet\m_tabl_ntb_before_split\empty
\glet\m_tabl_ntb_after_split \empty
\glet\m_tabl_ntb_same_page \empty}
@@ -1226,7 +1209,7 @@
% \prelocateTBLrows{1000} % may speed up large tables
-\def\prelocateTBLrows#1% we start at zero so we have one to much, better play safe anyway
+\permanent\protected\def\prelocateTBLrows#1% we start at zero so we have one to much, better play safe anyway
{\dostepwiserecurse\c_tabl_prelocated_rows{#1}\plusone
{\expandafter\newtoks\csname\??naturaltabletok\recurselevel\endcsname}%
\def\tabl_ntb_row_start
@@ -1293,7 +1276,7 @@
\fi
\fi}
-\unexpanded\def\tabl_ntb_row_align_start
+\protected\def\tabl_ntb_row_align_start
{\global\advance\c_tabl_ntb_row\plusone
\global\c_tabl_ntb_col\plusone
\global\c_tabl_ntb_spn\zerocount
@@ -1304,7 +1287,7 @@
\hbox\bgroup
\kern\dimexpr\d_tabl_ntb_leftmargindistance\relax}
-\unexpanded\def\tabl_ntb_row_align_stop
+\protected\def\tabl_ntb_row_align_stop
{\kern\dimexpr\d_tabl_ntb_rightmargindistance-\d_tabl_ntb_columndistance\relax
\egroup
\ifconditional\c_strc_tags_enabled
@@ -1312,7 +1295,7 @@
\fi
\tabl_ntb_row_align_stop_inject}
-\unexpanded\def\tabl_ntb_before_page
+\protected\def\tabl_ntb_before_page
{\ifx\m_tabl_ntb_same_page\v!before
% \blank[\v!samepage,\v!strong]%
\unpenalty
@@ -1323,7 +1306,7 @@
\nobreak
\fi}
-\unexpanded\def\tabl_ntb_after_page
+\protected\def\tabl_ntb_after_page
{\ifnum\c_tabl_ntb_row>\c_tabl_ntb_n_of_head_lines
\ifnum\tabl_ntb_get_nob\c_tabl_ntb_row=\zerocount
\unpenalty
@@ -1343,18 +1326,18 @@
\allowbreak % else no proper head split off
\fi}
-\unexpanded\def\tabl_ntb_inbetween
+\protected\def\tabl_ntb_inbetween
{\scratchcounter\numexpr\c_tabl_ntb_row+\plusone\relax
\ifnum\scratchcounter>\c_tabl_ntb_n_of_hdnx_lines\relax
\ifnum\scratchcounter<\c_tabl_ntb_maximum_row\relax
\edef\p_spaceinbetween{\naturaltablelocalparameter\c!spaceinbetween}%
- \ifx\p_spaceinbetween\empty\else
+ \ifempty\p_spaceinbetween\else
\blank[\p_spaceinbetween]%
\fi
\fi
\fi}
-\unexpanded\def\tabl_ntb_row_align_start_inject
+\protected\def\tabl_ntb_row_align_start_inject
{\bgroup % protect local vars
\m_tabl_ntb_before_split
\egroup
@@ -1362,7 +1345,7 @@
\tabl_ntb_before_page
\fi}
-\unexpanded\def\tabl_ntb_row_align_stop_inject
+\protected\def\tabl_ntb_row_align_stop_inject
{\par
\nointerlineskip
\ifenableTBLbreak
@@ -1386,16 +1369,16 @@
\the\t_tabl_ntb
\dostoptagged}
-\unexpanded\def\tabl_ntb_span#1%
+\protected\def\tabl_ntb_span#1%
{\hskip\tabl_ntb_get_dis\c_tabl_ntb_col
\dorecurse{#1}
{\hskip\tabl_ntb_get_wid\c_tabl_ntb_col\relax
\global\advance\c_tabl_ntb_col\plusone}}
-\unexpanded\def\tabl_ntb_skip#1%
+\protected\def\tabl_ntb_skip#1%
{\global\advance\c_tabl_ntb_col#1\relax}
-\unexpanded\def\tabl_ntb_plus
+\protected\def\tabl_ntb_plus
{\global\advance\c_tabl_ntb_col\plusone
\kern\d_tabl_ntb_columndistance}
@@ -1418,10 +1401,10 @@
\fi}%
\fi}
-\unexpanded\def\tabl_ntb_cell#1#2%
+\protected\def\tabl_ntb_cell#1#2%
{\csname\??naturaltablecell\the\tabl_ntb_get_tag{#1}{#2}\endcsname{#1}{#2}}
-\unexpanded\def\tabl_ntb_table_start
+\protected\def\tabl_ntb_table_start
{\global\c_tabl_ntb_spn\zerocount
\global\c_tabl_ntb_row\zerocount
\global\c_tabl_ntb_col\zerocount
@@ -1434,17 +1417,17 @@
\def\tabl_ntb_pass_two#1 #2 % meer in cellD
{\d_tabl_ntb_width\zeropoint
\scratchcounter\c_tabl_ntb_col
- \!!counta\tabl_ntb_get_col{#1}{#2}\relax
- \ifcase\!!counta\or
+ \scratchcounterone\tabl_ntb_get_col{#1}{#2}\relax
+ \ifcase\scratchcounterone\or
\advance\d_tabl_ntb_width\dimexpr
\tabl_ntb_get_wid\scratchcounter
\relax
\advance\scratchcounter\plusone
\else
- \dorecurse\!!counta
+ \dorecurse\scratchcounterone
{\advance\d_tabl_ntb_width\dimexpr
\tabl_ntb_get_wid\scratchcounter
- \ifnum\recurselevel<\!!counta
+ \ifnum\recurselevel<\scratchcounterone
+\d_tabl_ntb_columndistance
+\tabl_ntb_get_dis\scratchcounter
\fi
@@ -1461,36 +1444,36 @@
\def\tabl_ntb_pass_three#1 #2 %
{% height
\dostarttagged\t!tablecell\empty
- \!!counta \tabl_ntb_get_col{#1}{#2}\relax
- \!!countb \tabl_ntb_get_row{#1}{#2}\relax
- \!!heighta\tabl_ntb_get_ht {#1}{#2}\relax
- \tablecellcolumns\!!counta % used later so don't adapt these
- \tablecellrows \!!countb % used later so don't adapt these
+ \scratchcounterone\tabl_ntb_get_col{#1}{#2}\relax
+ \scratchcountertwo\tabl_ntb_get_row{#1}{#2}\relax
+ \scratchheight\tabl_ntb_get_ht {#1}{#2}\relax
+ \tablecellcolumns\scratchcounterone % used later so don't adapt these
+ \tablecellrows \scratchcountertwo % used later so don't adapt these
\d_tabl_ntb_height\zeropoint
- \ifnum\!!counta=\c_tabl_ntb_maximum_col\relax
+ \ifnum\scratchcounterone=\c_tabl_ntb_maximum_col\relax
% case: nc=maxcolumns
\else
\scratchcounter#1\relax
- \dorecurse\!!countb
+ \dorecurse\scratchcountertwo
{\advance\d_tabl_ntb_height\tabl_ntb_get_hei\scratchcounter
\advance\scratchcounter\plusone}%
- \ifdim\d_tabl_ntb_height<\!!heighta\relax
- \d_tabl_ntb_height\!!heighta
+ \ifdim\d_tabl_ntb_height<\scratchheight\relax
+ \d_tabl_ntb_height\scratchheight
\fi
\fi
% width
\d_tabl_ntb_width\zeropoint
\scratchcounter\c_tabl_ntb_col
- \ifcase\!!counta\or
+ \ifcase\scratchcounterone\or
\advance\d_tabl_ntb_width\dimexpr
\tabl_ntb_get_wid\scratchcounter
\relax
\advance\scratchcounter\plusone
\else
- \dorecurse\!!counta
+ \dorecurse\scratchcounterone
{\advance\d_tabl_ntb_width\dimexpr
\tabl_ntb_get_wid\scratchcounter
- \ifnum\recurselevel<\!!counta
+ \ifnum\recurselevel<\scratchcounterone
+\d_tabl_ntb_columndistance
+\tabl_ntb_get_dis\scratchcounter
\fi
@@ -1498,11 +1481,11 @@
\advance\scratchcounter\plusone}%
\fi
% cell
- \setbox\scratchbox\hbox attr \taggedattribute \attribute\taggedattribute \bgroup
+ \setbox\scratchbox\hbox attr \taggedattribute \c_attr_tagged \bgroup
\dotagTABLEsignal % maybe we need to add some packaging in this case
\tabl_ntb_get_txt{#1}{#2}%
\egroup
- \ifnum\!!counta=\c_tabl_ntb_maximum_col\relax
+ \ifnum\scratchcounterone=\c_tabl_ntb_maximum_col\relax
% case: nc=maxcolumns
\else
\scratchdimen\tabl_ntb_get_hei{#1}%
@@ -1511,27 +1494,20 @@
\ht\scratchbox\scratchdimen
\fi
\dp\scratchbox\zeropoint
- \edef\!!stringa{\tabl_ntb_get_ref{#1}{#2}}%
- \ifx\!!stringa\empty
+ \edef\scratchmacro{\tabl_ntb_get_ref{#1}{#2}}%
+ \ifempty\scratchmacro
\box\scratchbox
\else
- \normalexpanded{\noexpand\directgotobox{\box\scratchbox}[\!!stringa]}% to be checked
+ \normalexpanded{\directgotobox{\box\scratchbox}[\scratchmacro]}% to be checked
\fi
\dostoptagged} % right spot
-% \def\tabl_ntb_cell_finalize
-% {\doifnotinset\localwidth{\v!fit,\v!broad}% user set
-% {\scratchdimen\tabl_ntb_get_aut\c_tabl_ntb_col\relax
-% \ifdim\localwidth>\scratchdimen
-% \tabl_ntb_set_aut\c_tabl_ntb_col{\the\dimexpr\localwidth}%
-% \fi}}
-
\def\tabl_ntb_cell_finalize
{\ifx\localwidth\v!fit
% nothing
\orelse\ifx\localwidth\v!broad
% nothing
- \orelse\ifx\localwidth\empty
+ \orelse\ifempty\localwidth
% nothing (safeguard)
\else
\tabl_ntb_cell_finalize_indeed
@@ -1561,6 +1537,10 @@
\scratchdimen\wd\scratchbox\relax
\fi}
+\newdimen\d_tabl_ntb_saved_hsize
+
+\let\tabl_ntb_pass\relax
+
\def\tabl_ntb_table_stop
{\forgetall % new, here see narrower-004.tex
%\setbox\scratchbox\hbox
@@ -1620,12 +1600,12 @@
% added jun 2014 because someone had less columns than nx .. sigh / see *nx*
\writestatus\m!TABLE{missing\space\number\numexpr\c_tabl_ntb_maximum_col-\c_tabl_ntb_encountered_max\relax\space column(s), guessing widths}%
\fi
- \edef\savedhsize{\the\hsize}%
+ \d_tabl_ntb_saved_hsize\hsize
% \hsize\wd\scratchbox\relax % new per 17/04/2006
\hsize\scratchdimen\relax % new per 17/04/2006
\tabl_ntb_check_widths_one % trial run
\tabl_ntb_check_widths_two % real run
- \hsize\savedhsize
+ \hsize\d_tabl_ntb_saved_hsize
\let\tabl_ntb_cell_process\tabl_ntb_cell_process_c
\setbox\scratchbox\vbox{\settrialtypesetting \tabl_ntb_flush_content}%
\fi
@@ -1640,41 +1620,41 @@
\c_tabl_tbl_pass\plusthree
\let\tabl_ntb_pass\tabl_ntb_pass_three
\ifnum\m_tabl_tbl_level>\plusone
- \tabl_tbl_split_nop
+ \tabl_ntb_split_nop
\orelse\ifenableTBLbreak
- \tabl_tbl_split_yes
+ \tabl_ntb_split_yes
\else
- \tabl_tbl_split_nop
+ \tabl_ntb_split_nop
\fi}
\def\tabl_ntb_stretch_widths % more variants, e.g. a max to \dimend
{\ifcase\c_tabl_ntb_maximum_col\else % else division by zero
- \!!dimend\zeropoint
- \!!dimene\dimexpr
+ \scratchdimenfour\zeropoint
+ \scratchdimenfive\dimexpr
\hsize
-\d_tabl_ntb_leftmargindistance
-\d_tabl_ntb_rightmargindistance
+\d_tabl_ntb_columndistance
\relax
\dorecurse\c_tabl_ntb_maximum_col
- {\advance\!!dimend\dimexpr
+ {\advance\scratchdimenfour\dimexpr
\tabl_ntb_get_wid\recurselevel
\relax
- \advance\!!dimene\dimexpr
+ \advance\scratchdimenfive\dimexpr
-\tabl_ntb_get_dis\recurselevel
-\d_tabl_ntb_columndistance
\relax}%
\relax
% distribute width (stretch)
- \ifdim\!!dimend<\!!dimene
- \advance\!!dimend-\!!dimene
- \divide\!!dimend\c_tabl_ntb_maximum_col
+ \ifdim\scratchdimenfour<\scratchdimenfive
+ \advance\scratchdimenfour-\scratchdimenfive
+ \divide\scratchdimenfour\c_tabl_ntb_maximum_col
\dorecurse\c_tabl_ntb_maximum_col
- {\tabl_ntb_set_wid\recurselevel{\the\dimexpr\tabl_ntb_get_wid\recurselevel-\!!dimend\relax}}%
+ {\tabl_ntb_set_wid\recurselevel{\the\dimexpr\tabl_ntb_get_wid\recurselevel-\scratchdimenfour\relax}}%
\fi
\fi}
-\def\tabl_tbl_split_nop
+\def\tabl_ntb_split_nop
{\setbox\b_tabl_ntb_final\vbox{\tabl_ntb_flush_content}%
\postprocessTABLEbox\b_tabl_ntb_final
\beforeTABLEbox
@@ -1690,7 +1670,7 @@
\box\b_tabl_ntb_final
\afterTABLEbox}
-\def\tabl_tbl_split_yes
+\def\tabl_ntb_split_yes
{\ifinsidesplitfloat
\donetrue
\orelse\ifinsidefloat
@@ -1701,54 +1681,54 @@
\ifdone
\expandafter\tabl_ntb_split_box
\else
- \expandafter\tabl_tbl_split_nop
+ \expandafter\tabl_ntb_split_nop
\fi}
\newbox\TABLEsplitbox % public, don't change
-\let\extratblsplitheight\zeropoint % additional space taken by before/afterTABLEsplitbox
+\mutable\let\extratblsplitheight\zeropoint % additional space taken by before/afterTABLEsplitbox
\def\tabl_ntb_split_box
{\resettsplit
- \def\tsplitminimumfreelines{2}%
- \def\tsplitminimumfreespace{\dimexpr\extratblsplitheight+\naturaltablelocalparameter\c!splitoffset\relax}%
- \def\tsplitbeforeresult {\beforeTABLEsplitbox}%
- \def\tsplitafterresult {\afterTABLEsplitbox}%
- \def\tsplitafter {\m_tabl_ntb_after_split}%
- \def\tsplitbefore {\m_tabl_ntb_before_split}% supported ?
- \setbox\tsplitcontent\vbox{\tabl_ntb_flush_content}%
+ \c_split_minimum_free_lines\plustwo
+ \d_split_minimum_free_space\dimexpr\extratblsplitheight+\naturaltablelocalparameter\c!splitoffset\relax
+ \t_split_before_result{\beforeTABLEsplitbox}%
+ \t_split_after_result{\afterTABLEsplitbox}%
+ \t_split_after{\m_tabl_ntb_after_split}%
+ \t_split_before{\m_tabl_ntb_before_split}% not used (yet)
+ \setbox\b_split_content\vbox{\tabl_ntb_flush_content}%
\ifmultipleTBLheads
\dorecurse\c_tabl_ntb_n_of_head_lines
- {\setbox\scratchbox\vsplit\tsplitcontent to \lineheight
- \setbox\tsplithead\vbox{\unvcopy\tsplithead\unvcopy\scratchbox}}% \vpack ?
+ {\setbox\scratchbox\vsplit\b_split_content to \lineheight
+ \setbox\b_split_head\vbox{\unvcopy\b_split_head\unvcopy\scratchbox}}% \vpack ?
\dorecurse\c_tabl_ntb_n_of_next_lines
- {\setbox\scratchbox\vsplit\tsplitcontent to \lineheight
- \setbox\tsplitnext\vbox{\unvcopy\tsplitnext\unvcopy\scratchbox}}% \vpack ?
+ {\setbox\scratchbox\vsplit\b_split_content to \lineheight
+ \setbox\b_split_next\vbox{\unvcopy\b_split_next\unvcopy\scratchbox}}% \vpack ?
\fi
\edef\p_spaceinbetween{\naturaltablelocalparameter\c!spaceinbetween}%
- \ifx\p_spaceinbetween\empty\else
+ \ifempty\p_spaceinbetween\else
\blank[\p_spaceinbetween]%
\fi
- \def\postprocesstsplit{\postprocessTABLEsplitbox{\box\tsplitresult}}%
+ \def\postprocesstsplit{\postprocessTABLEsplitbox{\box\b_split_result}}%
\handletsplit}
% ! ! ! ! TODO: naast \postprocessTABLEsplitbox ook evt \postprocessTABLEbox voor niet split
-\let\postprocessTABLEsplitbox\gobbleoneargument
-\let\postprocessTABLEbox \gobbleoneargument
+\mutable\let\postprocessTABLEsplitbox\gobbleoneargument % maybe just a parameter
+\mutable\let\postprocessTABLEbox \gobbleoneargument % maybe just a parameter
-\let\beforeTABLEsplitbox\relax
-\let\afterTABLEsplitbox \relax
-\let\beforeTABLEbox \relax
-\let\afterTABLEbox \relax
+\mutable\let\beforeTABLEsplitbox\relax % maybe just a parameter
+\mutable\let\afterTABLEsplitbox \relax % maybe just a parameter
+\mutable\let\beforeTABLEbox \relax % maybe just a parameter
+\mutable\let\afterTABLEbox \relax % maybe just a parameter
\def\tabl_ntb_check_widths_one{\tabl_ntb_check_widths_indeed\zerocount} % 0 = trial run
\def\tabl_ntb_check_widths_two{\tabl_ntb_check_widths_indeed\plusone } % 1 = real run
\def\tabl_ntb_check_widths_indeed#1%
{\ifconditional\c_tabl_ntb_trace_widths\tabl_ntb_show_widths B#1\fi
- \!!counta\zerocount
- \!!dimena\dimexpr
+ \scratchcounterone\zerocount
+ \scratchdimenone\dimexpr
\hsize
-\d_tabl_ntb_leftmargindistance
-\d_tabl_ntb_rightmargindistance
@@ -1756,38 +1736,38 @@
\relax
\dorecurse\c_tabl_ntb_maximum_col
{\scratchdimen\tabl_ntb_get_aut\recurselevel\relax
- \advance\!!dimena\dimexpr
+ \advance\scratchdimenone\dimexpr
-\tabl_ntb_get_dis\recurselevel
-\d_tabl_ntb_columndistance
\relax
\ifdim\scratchdimen>\zeropoint\relax
- \advance\!!dimena -\scratchdimen
+ \advance\scratchdimenone -\scratchdimen
\else
\scratchdimen\tabl_ntb_get_wid\recurselevel\relax
\ifdim\scratchdimen>\d_tabl_ntb_maxwidth\relax
\ifcase#1\else\tabl_ntb_let_wid\recurselevel\zeropoint\fi
- \advance\!!counta \plusone
+ \advance\scratchcounterone \plusone
\orelse\ifdim\scratchdimen>\zeropoint\relax
- \advance\!!dimena -\scratchdimen
+ \advance\scratchdimenone -\scratchdimen
\else
% eigenlijk moet dit alleen als de kolom wordt overspannen door een
% vorige, maw extra dubbele loop en status var
\ifnum\c_tabl_ntb_encountered_max=\c_tabl_ntb_maximum_col % *nx* bah
- \advance\!!counta \plusone % setting maxwidth to a large value also works
+ \advance\scratchcounterone \plusone % setting maxwidth to a large value also works
\fi
\fi
\fi}%
\ifconditional\c_tabl_ntb_trace_widths\tabl_ntb_show_widths M#1\fi
- \ifcase\!!counta \else \divide\!!dimena \!!counta \fi
+ \ifcase\scratchcounterone \else \divide\scratchdimenone \scratchcounterone \fi
\dorecurse\c_tabl_ntb_maximum_col
{\scratchdimen\tabl_ntb_get_wid\recurselevel\relax
\ifcase#1\relax
- \ifdim\scratchdimen<\!!dimena % take natural width
+ \ifdim\scratchdimen<\scratchdimenone % take natural width
\tabl_ntb_set_aut\recurselevel{\the\scratchdimen}%
\fi
\else
\ifzeropt\scratchdimen % auto set width
- \tabl_ntb_set_wid\recurselevel{\the\!!dimena}%
+ \tabl_ntb_set_wid\recurselevel{\the\scratchdimenone}%
\fi
\fi}%
\ifconditional\c_tabl_ntb_trace_widths\tabl_ntb_show_widths E#1\fi}
@@ -1795,9 +1775,9 @@
% todo: use scratchcounters, not !! ones
\def\tabl_ntb_check_heights_one_indeed
- {\!!countb\tabl_ntb_get_row\c_tabl_ntb_current_row_three\c_tabl_ntb_current_col_three\relax
+ {\scratchcountertwo\tabl_ntb_get_row\c_tabl_ntb_current_row_three\c_tabl_ntb_current_col_three\relax
% check row span
- \ifnum\!!countb>\plusone
+ \ifnum\scratchcountertwo>\plusone
% current height in row
\dimen0=\tabl_ntb_get_ht\c_tabl_ntb_current_row_three\c_tabl_ntb_current_col_three
% find nearest height in row
@@ -1805,8 +1785,8 @@
\dorecurse\c_tabl_ntb_maximum_col
{\ifnum\recurselevel=\c_tabl_ntb_current_col_three\else
\ifcsname\tabl_ntb_row_pattern\c_tabl_ntb_current_row_three\recurselevel\endcsname
- \!!countc=\tabl_ntb_get_row\c_tabl_ntb_current_row_three\recurselevel\relax
- \ifnum\!!countc=\plusone
+ \scratchcounterthree\tabl_ntb_get_row\c_tabl_ntb_current_row_three\recurselevel\relax
+ \ifnum\scratchcounterthree=\plusone
\dimen4=\tabl_ntb_get_ht\c_tabl_ntb_current_row_three\recurselevel\relax
\ifdim\dimen2<\dimen4
\dimen2=\dimen4
@@ -1817,25 +1797,25 @@
\c_tabl_ntb_current_row_four\c_tabl_ntb_current_row_three
% calculate cummulative height
\dimen4=\dimen2
- \!!countc\c_tabl_ntb_current_row_three
- \advance\!!countc\minusone
- \dorecurse\!!countb
+ \scratchcounterthree\c_tabl_ntb_current_row_three
+ \advance\scratchcounterthree\minusone
+ \dorecurse\scratchcountertwo
{\ifnum\c_tabl_ntb_current_row_four=\c_tabl_ntb_current_row_three\else
\advance\dimen4 \tabl_ntb_get_hei\c_tabl_ntb_current_row_four
\fi
- \ifnum\recurselevel=\!!countb\else
- \tabl_ntb_set_nob\!!countc
- \advance\!!countc\plusone
+ \ifnum\recurselevel=\scratchcountertwo\else
+ \tabl_ntb_set_nob\scratchcounterthree
+ \advance\scratchcounterthree\plusone
\fi
\advance\c_tabl_ntb_current_row_four\plusone}%
% distribute overshoot equally
\ifdim\dimen2>\zeropoint % new: test on natural-003
\ifdim\dimen4<\dimen0
\advance\dimen0 -\dimen4
- \divide\dimen0 \!!countb
+ \divide\dimen0 \scratchcountertwo
\c_tabl_ntb_current_row_four\c_tabl_ntb_current_row_three
\tabl_ntb_set_hei\c_tabl_ntb_current_row_three{\the\dimen2}%
- \dorecurse\!!countb
+ \dorecurse\scratchcountertwo
{\dorecurse\c_tabl_ntb_maximum_col
{\ifnum\recurselevel=\c_tabl_ntb_current_col_three\else
\scratchdimen\dimexpr\tabl_ntb_get_ht\c_tabl_ntb_current_row_four\recurselevel+\dimen0\relax
@@ -1894,14 +1874,14 @@
\typo_charalign_adapt_font
\signalcharacteralign{#2}{#1}}
-\unexpanded\def\tabl_ntb_cell_process_a_extra#1#2%
+\protected\def\tabl_ntb_cell_process_a_extra#1#2%
{\ifcase\tabl_ntb_get_tal{#2}\relax
\expandafter\tabl_ntb_cell_process_x
\else
\expandafter\tabl_ntb_cell_process_a
\fi{#1}{#2}}
-\unexpanded\def\tabl_ntb_cell_process_x#1#2[#3]#4%
+\protected\def\tabl_ntb_cell_process_x#1#2[#3]#4%
{}
% problem: when span doesn't break we can have a span that is the sum of cells but
@@ -1930,7 +1910,7 @@
\tabl_ntb_set_wid\c_tabl_ntb_col{\the\wd\scratchbox}%
\fi}
-\unexpanded\def\tabl_ntb_cell_process_a#1#2[#3]#4% grouping added ! ! !
+\protected\def\tabl_ntb_cell_process_a#1#2[#3]#4% grouping added ! ! !
{\bgroup
\letnaturaltablelocalparameter\c!option\empty
\tabl_ntb_setup_cell{#1}{#2}%
@@ -1990,7 +1970,7 @@
\box\scratchboxone
\egroup}
-\unexpanded\def\tabl_ntb_cell_process_b_c#1#2#3[#4]#5%
+\protected\def\tabl_ntb_cell_process_b_c#1#2#3[#4]#5%
{\setbox\scratchbox\hbox
{\tabl_ntb_setup_cell{#2}{#3}%
\setupcurrentnaturaltablelocal[#4,#1]%
@@ -2014,7 +1994,7 @@
\fi
\box2 }
-\unexpanded\def\tabl_ntb_cell_process_b#1#2[#3]#4%
+\protected\def\tabl_ntb_cell_process_b#1#2[#3]#4%
{\scratchdimen\tabl_ntb_get_aut\c_tabl_ntb_col\relax
\ifdim\scratchdimen>\zeropoint\relax
\else
@@ -2028,10 +2008,10 @@
\normalexpanded{\tabl_ntb_cell_process_b_c{\ifdim\scratchdimen>\zeropoint \c!width=\the\scratchdimen\fi}}%
{#1}{#2}[#3]{\tabl_ntb_char_align{#1}{#2}#4}}
-\unexpanded\def\tabl_ntb_cell_process_c
+\protected\def\tabl_ntb_cell_process_c
{\tabl_ntb_cell_process_b_c{}}
-\unexpanded\def\tabl_ntb_cell_process_d#1#2[#3]#4%
+\protected\def\tabl_ntb_cell_process_d#1#2[#3]#4%
{\tabl_ntb_setup_cell{#1}{#2}%
\bgroup
\setupcurrentnaturaltablelocal[#3]%
@@ -2041,7 +2021,7 @@
\inheritednaturaltablelocalframed{\tabl_ntb_cell_start\tabl_ntb_char_align{#1}{#2}#4\tabl_ntb_cell_stop}%
\egroup}
-\unexpanded\def\tabl_ntb_cell_process_e#1#2[#3]#4%
+\protected\def\tabl_ntb_cell_process_e#1#2[#3]#4%
{\tabl_ntb_setup_cell{#1}{#2}%
\setupcurrentnaturaltablelocal[#3]% to get the color right, the way we
\color % handle color here prevents interference due to whatsit nodes
@@ -2054,7 +2034,7 @@
\fi
\ifcase\c_anch_backgrounds_text_count\else
\edef\p_region{\naturaltablelocalparameter\c!region}%
- \ifx\p_region\empty\ifnum\tabl_ntb_get_bck{#1}{#2}>\zerocount
+ \ifempty\p_region\ifnum\tabl_ntb_get_bck{#1}{#2}>\zerocount
\letnaturaltablelocalparameter\c!region\v!yes
\fi\fi
\fi
@@ -2182,19 +2162,16 @@
\installcorenamespace{naturaltablesetup}
-\unexpanded\def\defineTABLEsetup
- {\dodoubleargument\tabl_ntb_define_setup}
-
-\def\tabl_ntb_define_setup[#1][#2]%
- {\setvalue{\??naturaltablesetup#1}{#2}}
+\permanent\tolerant\protected\def\defineTABLEsetup[#1]#*[#2]%
+ {\ifarguments\else\defcsname\??naturaltablesetup#1\endcsname{#2}\fi}
-\let\eTDs\relax
-\let\eTRs\relax
+\permanent\let\eTDs\relax
+\permanent\let\eTRs\relax
-\unexpanded\def\bTDs[#1]#2\eTDs
+\permanent\protected\def\bTDs[#1]#2\eTDs
{\normalexpanded{\bTD[\begincsname\??naturaltablesetup#1\endcsname]}#2\eTD}
-\unexpanded\def\bTRs[#1]#2\eTRs
+\permanent\protected\def\bTRs[#1]#2\eTRs
{\normalexpanded{\bTR[\begincsname\??naturaltablesetup#1\endcsname]}#2\eTR}
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-nte.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-nte.mkxl
new file mode 100644
index 00000000000..e79e2a00417
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-nte.mkxl
@@ -0,0 +1,107 @@
+%D \module
+%D [ file=core-nte,
+%D version=2009.03.08,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Natural Tables Extensions,
+%D author=Hans Hagen \& Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Table Module / Natural Tables Extensions}
+
+\unprotect
+
+%D This module is suggested by Wolfgang Schuster who also prototyped
+%D it and came up with the rationale:
+%D
+%D This module provides an easy way to use natural in a similiar
+%D way as the older table module (based on the \TABLE\ macros) and
+%D the newer tabulate module.
+%D
+%D You can see the advantage in the following table, once created
+%D with the new macros and once with the normal macros provided
+%D with the natural table module.
+%D
+%D Let us start with the original macros:
+%D
+%D \startbuffer
+%D \bTABLE
+%D \bTR
+%D \bTD Text 1 \eTD
+%D \bTD Text 2 \eTD
+%D \eTR
+%D \bTR
+%D \bTD Text 3 \eTD
+%D \bTD Text 4 \eTD
+%D \eTR
+%D \eTABLE
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D Watch how the new macros use less code:
+%D
+%D \startbuffer
+%D \startTABLE
+%D \NC Text 1 \NC Text 2 \NC\NR
+%D \NC Text 3 \NC Text 4 \NC\NR
+%D \stopTABLE
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+%D
+%D The actual code differs from the prototype that it does not need
+%D to collect whole rows and parse them but looks ahead instead.
+
+\newconditional\c_tabl_nte_in_nc
+
+\permanent\tolerant\protected\def\startTABLE[#1]%
+ {\bgroup
+ \bTABLE[#1]%
+ \enforced\let\NC\tabl_nte_start_nc
+ \enforced\let\NR\tabl_nte_start_nr
+ \enforced\let\bTR\relax
+ \enforced\let\bTD\relax
+ \enforced\let\bTH\relax
+ \enforced\let\bTN\relax}
+
+\permanent\protected\def\stopTABLE
+ {\eTABLE
+ \egroup}
+
+\permanent\protected\def\tabl_nte_start_nr
+ {\eTR
+ \setfalse\c_tabl_nte_in_nc}
+
+\permanent\protected\def\tabl_nte_start_nc
+ {\futurelet\nexttoken\tabl_nte_start_nc_indeed}
+
+\def\tabl_nte_start_nc_indeed
+ {\ifx\nexttoken\tabl_nte_start_nr \else
+ \expandafter\tabl_nte_start_nc_finish
+ \fi}
+
+\def\tabl_nte_start_nc_finish#1\NC
+ {\ifconditional\c_tabl_nte_in_nc \else
+ \settrue\c_tabl_nte_in_nc
+ \tabl_ntb_bTR[]%
+ \fi
+ \tabl_ntb_bTD#1\eTD\NC}
+
+%D The related structure commands are also available:
+
+\permanent\let\stopTABLEhead\relax
+\permanent\let\stopTABLEnext\relax
+\permanent\let\stopTABLEbody\relax
+\permanent\let\stopTABLEfoot\relax
+
+\permanent\tolerant\protected\def\startTABLEhead[#1]#:#2\stopTABLEhead{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_head}
+\permanent\tolerant\protected\def\startTABLEnext[#1]#:#2\stopTABLEnext{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_next}
+\permanent\tolerant\protected\def\startTABLEbody[#1]#:#2\stopTABLEbody{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_body}
+\permanent\tolerant\protected\def\startTABLEfoot[#1]#:#2\stopTABLEfoot{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_foot}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl
new file mode 100644
index 00000000000..547ff93ff5d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-tab.mkxl
@@ -0,0 +1,2267 @@
+%D \module
+%D [ file=core-tab,
+%D version=1997.10.10,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=\TABLE\ Embedding,
+%D author=Hans Hagen with copied and patched code from MJ Wichura,
+%D date=\currentdate]
+%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 Table Macros / TaBlE Embedding}
+
+% Todo: just for the fun of it ... use lmtx features.
+
+% Todo: a bitmore namespace protection ... although we want to keep some of the
+% original flavour.
+%
+% In \MKIV\ the old table macros are sort of obsolete. The color extensions have
+% been removed and some code is stripped. For practical reasons the \TABLE\ macros
+% that are used are embedded in this file.
+%
+% The following code is based on TABLE 1.0 by Michael J. Wichura (August 1988. We
+% used a patched version with many overloads and extensions. The documented (and
+% larger) source can be found in \type {thrd-tab.tex}.
+%
+% Some code has been stripped. Some color has been added. Some macros have been
+% renamed. Registers have been replaces. And probably much more can be cleaned up.
+% We also need to use \tabl_tab_ prefixes here.
+
+\unprotect
+
+\newconditional\c_tabl_table_spacing_left
+\newconditional\c_tabl_table_spacing_right
+
+\newdimen \d_tabl_table_line_thickness_unit
+\newdimen \d_tabl_table_strut_unit
+\newskip \s_tabl_table_inter_column_space_unit
+\newdimen \d_tabl_table_column_width_unit
+\newdimen \d_tabl_table_kern_unit
+
+\mutable\def\tablestrutheightfactor {8}
+\mutable\def\tablestrutdepthfactor {3}
+\mutable\def\tableintercolumnspacefactor {3}
+\mutable\def\tablecolumnwidthfactor {10}
+\mutable\def\tablevspacefactor {2}
+\mutable\def\tablekernfactor {1}
+\mutable\def\tablelinethicknessfactor {4}
+
+\newtoks\everytable
+\newtoks\everytableparbox
+
+\protected\def\tabl_table_begin_par_box#1%
+ {\setbox\scratchbox\vtop\bgroup % \setbox added
+ \hsize#1\relax
+ \dontcomplain
+ \tabl_table_restore_lineskips
+ \normalbaselines
+ \enforced\let~\fixedspace
+ \inhibitblank % \blank[\v!disable]% % added
+ \the\everytableparbox}
+
+\protected\def\tabl_table_end_par_box
+ {\removelastskip % itemize or so
+ \endgraf
+ \ifnum\prevgraf>\zerocount % we want at least
+ \verticalstrut \nowhitespace \vskip-\struttotal % one line of text
+ \egroup
+ \ifdim\dp\scratchbox>\lineheight % see (*) for an
+ \getnoflines{\dp\scratchbox}% % example of where
+ \dp\scratchbox\zeropoint % saving can go
+ \setbox\scratchbox % terrible wrong
+ \vtop to \noflines\lineheight{\box\scratchbox}%
+ \fi % esp between rows
+ \else % of paragraphs
+ \egroup
+ \fi
+ \box\scratchbox}
+
+\appendtoks
+ \parindent\zeropoint
+ \raggedright
+ \rightskip\zeropoint \s!plus 4em \relax
+\to \everytableparbox
+
+\newskip \tablelefttabskip
+\newskip \tablerighttabskip
+
+\newcount\!taColumnNumber
+\newcount\!taRecursionLevel % (Initially 0)
+
+\newdimen\!taDimenA % used by \Enlarge
+\newdimen\!taDimenB % used by \Enlarge
+\newdimen\!taDimenC % used by numeric.tex
+\newdimen\!taMinimumColumnWidth
+
+\newtoks \!taTableSpread
+\newtoks \!taPreamble
+\newtoks \!taDataColumnTemplate
+\newtoks \!taRuleColumnTemplate
+\newtoks \!taOldRuleColumnTemplate
+\newtoks \!taLeftGlue
+\newtoks \!taRightGlue
+
+\newskip \!taLastRegularTabskip
+
+\newif \if!taBeginFormat
+\newif \if!taOnceOnlyTabskip
+
+\def\!thToksEdef#1#2%
+ {\edef\tempstring{#2}%
+ #1\expandafter{\tempstring}%
+ \ignorespaces}
+
+\def\!thLoop#1\repeat
+ {\def\!thIterate{#1\expandafter\!thIterate\fi}%
+ \!thIterate
+ \let\!thIterate\relax}
+
+\def\tabl_table_begin_format
+ {\!taPreamble\emptytoks
+ \!taColumnNumber\zerocount
+ \scratchskip\s_tabl_table_inter_column_space_unit
+ \multiply\scratchskip\tableintercolumnspacefactor
+ \divide\scratchskip\plustwo
+ \!taRuleColumnTemplate\expandafter{\expandafter\tabskip\the\scratchskip}%
+ \!taLastRegularTabskip\scratchskip
+ \!taOnceOnlyTabskipfalse
+ \!taBeginFormattrue
+ \let\!tfRowOfWidths\empty
+ \doreadtableformatkeys}
+
+\def\!tfSetWidth
+ {\ifempty\!tfRowOfWidths % true if no prior "w" keys
+ \ifnum\!taColumnNumber>\zerocount % true if "w" key is to right of first "|"
+ \begingroup % RowOfWidths={\aligntab\omit || n copies of \aligntab\omit\aligntab#\omit}, where n = number of column to the left of this one
+ \scratchcounter\plusone
+ \aftergroup\edef
+ \aftergroup\!tfRowOfWidths
+ \aftergroup{%
+ \aftergroup\aligntab
+ \aftergroup\omit
+ \!thLoop
+ \ifnum \scratchcounter<\!taColumnNumber
+ \advance\scratchcounter\plusone
+ \aftergroup\!tfAOAO
+ \repeat
+ \aftergroup}%
+ \endgroup
+ \fi
+ \fi
+ \ifx[\tempstring % \!tgGetValue sets \tempstring = token after w
+ \expandafter\!tfSetWidthText
+ \else
+ \expandafter\!tfSetWidthValue
+ \fi}
+
+\def\!tfAOAO{\aligntab\omit\aligntab\omit}
+
+\def\!tfSetWidthText[#1]%
+ {\def\!tfWidthText{#1}%
+ \doreadtableformatkeys}
+
+\def\!tfSetWidthValue
+ {\!taMinimumColumnWidth
+ \ifnum\!tgCode=\plusone
+ \ifempty\!tgValue \tablecolumnwidthfactor \else \!tgValue \fi \d_tabl_table_column_width_unit
+ \else
+ \!tgValue
+ \fi
+ \let\!tfWidthText\empty % Override possible prior `w[sample entry]'
+ \doreadtableformatkeys}
+
+\def\!tfSetTabskip
+ {\ifnum\!tgCode=\plusone
+ \scratchskip\s_tabl_table_inter_column_space_unit
+ \multiply\scratchskip \ifempty\!tgValue\tableintercolumnspacefactor\else\!tgValue\fi
+ \else
+ \scratchskip\!tgValue
+ \fi
+ \divide\scratchskip\plustwo
+ \ifnum\!taColumnNumber=\zerocount
+ %\!thToksEdef\!taRuleColumnTemplate{\the\!taRuleColumnTemplate\tabskip\the\scratchskip}%
+ \normalexpanded{\!taRuleColumnTemplate{\the\!taRuleColumnTemplate\tabskip\the\scratchskip}}%
+ \else
+ %\!thToksEdef\!taDataColumnTemplate{\the\!taDataColumnTemplate\tabskip\the\scratchskip}%
+ \normalexpanded{\!taDataColumnTemplate{\the\!taDataColumnTemplate\tabskip\the\scratchskip}}%
+ \fi
+ \if!taOnceOnlyTabskip\else
+ \!taLastRegularTabskip\scratchskip % Remember this Tabskip, for possible
+ \fi % restoration after a subsequent"OnceOnly"
+ \doreadtableformatkeys}
+
+\def\!tfSetVrule
+ {\!thToksEdef\!taRuleColumnTemplate
+ {\hfil
+ \vrule
+ \noexpand\s!width
+ \ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \c_tabl_table_vrule_thickness_factor
+ \else
+ \!tgValue
+ \fi
+ \d_tabl_table_line_thickness_unit
+ \else
+ \!tgValue
+ \fi
+ \alignmark\alignmark\alignmark\alignmark
+ \hfil
+ \the\!taRuleColumnTemplate}%
+ \!tfAdjoinPriorColumn}
+
+\def\!tfSetAlternateVrule
+ {\afterassignment\!tfSetAlternateA\scratchtoks}
+
+\def\!tfSetAlternateA
+ {\!thToksEdef\!taRuleColumnTemplate{\the\scratchtoks\the\!taRuleColumnTemplate}%
+ \!tfAdjoinPriorColumn}
+
+\def\!tfAdjoinPriorColumn
+ {\ifnum\!taColumnNumber=\zerocount
+ \!taPreamble=\!taRuleColumnTemplate % New \tabskip may have been added
+ \else
+ \ifempty\!tfRowOfWidths\else % no "w" keys specified yet, not even this col
+ \!tfUpdateRowOfWidths
+ \fi
+ \!thToksEdef\!taDataColumnTemplate{\the\!taLeftGlue\the\!taDataColumnTemplate\the\!taRightGlue}%
+ \!thToksEdef\!taPreamble{\the\!taPreamble\aligntab\the\!taDataColumnTemplate\aligntab\the\!taRuleColumnTemplate}%
+ \fi
+ \advance\!taColumnNumber\plusone
+ \if!taOnceOnlyTabskip
+ \!thToksEdef\!taDataColumnTemplate{\alignmark\alignmark\alignmark\alignmark\tabskip\the\!taLastRegularTabskip}%
+ \else
+ \!taDataColumnTemplate{\alignmark\alignmark}%
+ \fi
+ \!taRuleColumnTemplate\emptytoks
+ \!taLeftGlue{\hfil}%
+ \!taRightGlue{\hfil}%
+ \!taMinimumColumnWidth\zeropoint
+ \let\!tfWidthText\empty
+ \!taOnceOnlyTabskipfalse
+ \doreadtableformatkeys}
+
+\def\!tfUpdateRowOfWidths
+ {\ifempty\!tfWidthText\else
+ \!tfComputeMinColWidth
+ \fi
+ \edef\!tfRowOfWidths
+ {\!tfRowOfWidths
+ \aligntab
+ \omit
+ \ifdim \!taMinimumColumnWidth>\zeropoint
+ \hskip \the\!taMinimumColumnWidth
+ \fi
+ \aligntab
+ \omit}}
+
+\def\!tfComputeMinColWidth
+ {\setbox\scratchbox\vbox
+ {\ialign{% Plain's initialized \halign; \tabskip=0pt \everycr={}
+ \span\the\!taDataColumnTemplate\cr
+ \!tfWidthText\cr}}%
+ \!taMinimumColumnWidth\wd\scratchbox}
+
+\def\!tfFinishFormat
+ {\!thToksEdef\!taPreamble{%
+ \alignmark\alignmark\alignmark\alignmark\tabskip\tablelefttabskip
+ \aligntab
+ \the\!taPreamble\tabskip\tablerighttabskip
+ \aligntab
+ \alignmark\alignmark\alignmark\alignmark\tabskip\zeropoint\cr}
+ \!taBeginFormatfalse
+ \!ttDoHalign}
+
+\def\tabl_table_reformat[#1]% will become local
+ {\omit
+ \!taDataColumnTemplate{\alignmark\alignmark}%
+ \!taLeftGlue\emptytoks
+ \!taRightGlue\emptytoks
+ \begingroup
+ \tabl_table_use_bar
+ \expanded{\endgroup\noexpand\doreadtableformatkeys#1]}}% appear in a \tabl_table_reformat cmd; this is here as a safeguard.
+
+\aliased\let\ReFormat\relax
+
+\appendtoks
+ \enforced\let\ReFormat\tabl_table_reformat
+\to \everytable
+
+\def\!tfEndReFormat
+ {\!tfReFormat}
+
+\appendtoks
+ \tabl_table_paralignment
+\to \everytableparbox
+
+\def\!tfReFormat#1%
+ {\the \!taLeftGlue
+ \vbox{\forgetall\ialign{\span\the\!taDataColumnTemplate\cr#1\cr}}%
+ \the \!taRightGlue
+ \kern\zeropoint} % prevents \unskip / really needed
+
+\def\!tgGetValue#1%
+ {\def\!tgReturn{#1}%
+ \futurelet\tempstring\!tgCheckForParen}
+
+\def\!tgCheckForParen%
+ {\ifx\tempstring (%
+ \expandafter \!tgDoParen
+ \else
+ \expandafter \!tgCheckForSpace
+ \fi}
+
+\def\!tgDoParen(#1)%
+ {\def\!tgCode{2}% will be expanded
+ \def\!tgValue{#1}%
+ \!tgReturn}
+
+\def\!tgCheckForSpace
+ {\def\!tgCode{1}%
+ \let\!tgValue\empty
+ \ifx\tempstring\!thSpaceToken
+ \expandafter\!tgReturn
+ \else
+ \expandafter\!tgCheckForDigit
+ \fi}
+
+\def\!tgCheckForDigit % less tokens: (could be an ifcsname)
+ {\donetrue
+ \ifx 0\tempstring \orelse \ifx 1\tempstring \orelse
+ \ifx 2\tempstring \orelse \ifx 3\tempstring \orelse
+ \ifx 4\tempstring \orelse \ifx 5\tempstring \orelse
+ \ifx 6\tempstring \orelse \ifx 7\tempstring \orelse
+ \ifx 8\tempstring \orelse \ifx 9\tempstring \else
+ \donefalse
+ \fi
+ \ifdone
+ \expandafter\!tgGetNumber
+ \else
+ \expandafter\!tgReturn
+ \fi}
+
+% \def\!tgCheckForDigit % does not work
+% {\relax\doifnumberelse\tempstring\!tgGetNumber\!tgReturn}
+
+\def\!tgGetNumber {\afterassignment\!tgGetNumberA\scratchcounter=}
+\def\!tgGetNumberA{\edef\!tgValue{\the\scratchcounter}\!tgReturn}
+
+\def\!tgSetUpParBox
+ {\normalexpanded
+ {\noexpand \doreadtableformatkeys
+ b{\tabl_table_begin_par_box
+ {\ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \tablecolumnwidthfactor
+ \else
+ \!tgValue
+ \fi
+ \d_tabl_table_column_width_unit
+ \else
+ \!tgValue
+ \fi}}%
+ a{\tabl_table_end_par_box}}}
+
+\def\!tgInsertKern
+ {\edef\tempstring
+ {\kern
+ \ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \tablekernfactor
+ \else
+ \!tgValue
+ \fi
+ \d_tabl_table_kern_unit
+ \else
+ \!tgValue
+ \fi}%
+ \edef\tempstring
+ {\noexpand\doreadtableformatkeys
+ \ifconditional\c_tabl_table_spacing_left
+ b{\tempstring}
+ \fi
+ \ifconditional\c_tabl_table_spacing_right
+ a{\tempstring}
+ \fi}%
+ \tempstring}
+
+\permanent\protected\def\newtableformatkey #1{\defcsname !tk<\string#1>\endcsname}
+\permanent \def\doreadtableformatkeys#1{\begincsname !tk<\string#1>\endcsname}
+
+% Key "b": b{TOKENS} adds TOKENS to the left of (before) the template
+
+\newtableformatkey b#1%
+ {\expandafter\!tkJoin\expandafter{\the\!taDataColumnTemplate}{#1}%
+ \doreadtableformatkeys}
+
+\def\!tkJoin#1#2%
+ {\!taDataColumnTemplate{#2#1}}%
+
+% Key "a": a{TOKENS} adds TOKENS to the right of (after) the template
+
+\newtableformatkey a#1%
+ {\toksapp\!taDataColumnTemplate{#1}%
+ \doreadtableformatkeys}
+
+% Key "\{": Enclose template in braces.
+
+\newtableformatkey \{%
+ {\!taDataColumnTemplate=\expandafter{\expandafter{\the\!taDataColumnTemplate}}%
+ \doreadtableformatkeys}
+
+% Key "*": "*{N}{KEY LETTERS}" is equivalent to specifying
+% <KEY LETTERS> N times.
+% KEY LETTERS may contain further * specifications
+
+\newtableformatkey *#1#2%
+ {\scratchcounter=#1\relax
+ \scratchtoks\emptytoks
+ \!thLoop
+ \ifnum\scratchcounter>\zerocount
+ \toksapp\scratchtoks{#2}%
+ \advance\scratchcounter\minusone
+ \repeat
+ \expandafter\doreadtableformatkeys\the\scratchtoks}
+
+% Key "\LeftGlue": Specifies the glue (usually \hfil, or nothing) to be
+% added to extreme left of the template to position a column
+
+\aliased\let\LeftGlue \relax
+\aliased\let\RightGlue\relax
+
+\newtableformatkey \LeftGlue#1%
+ {\!taLeftGlue{#1}%
+ \doreadtableformatkeys}
+
+\newtableformatkey \RightGlue#1%
+ {\!taRightGlue{#1}%
+ \doreadtableformatkeys}
+
+\newtableformatkey c%
+ {\prependtoks\raggedcenter\to\!taDataColumnTemplate
+ \doreadtableformatkeys \LeftGlue\hfil \RightGlue\hfil}
+
+\newtableformatkey l%
+ {\prependtoks\raggedright\to\!taDataColumnTemplate
+ \doreadtableformatkeys \LeftGlue\empty \RightGlue\hfil}
+
+\newtableformatkey r%
+ {\prependtoks\raggedleft\to\!taDataColumnTemplate
+ \doreadtableformatkeys \LeftGlue\hfil \RightGlue\empty}
+
+\newtableformatkey x%
+ {\prependtoks\notragged\to\!taDataColumnTemplate
+ \doreadtableformatkeys \LeftGlue\hfil \RightGlue\empty}
+
+% Key "k": Adds kerns to left and right of "#" This key and the two below use Plain
+% TeX's \if@h as if it were \if@left, and \if@v as if it were \if@right. Table
+% making goes on in a group, so even in the unlikely circumstance that a \phantom
+% is currently under construction, there's no problem.
+
+\newtableformatkey k%
+ {\settrue\c_tabl_table_spacing_left
+ \settrue\c_tabl_table_spacing_right
+ \!tgGetValue{\!tgInsertKern}}
+
+% Key "i": Adds a kern to the left of "#"
+
+\newtableformatkey i%
+ {\settrue\c_tabl_table_spacing_left
+ \setfalse\c_tabl_table_spacing_right
+ \!tgGetValue{\!tgInsertKern}}
+
+% Key "j": Adds a kern to the right of "#"
+
+\newtableformatkey j%
+ {\setfalse\c_tabl_table_spacing_left
+ \settrue\c_tabl_table_spacing_right
+ \!tgGetValue{\!tgInsertKern}}
+
+% Key "n": numeric item , non-math mode.
+
+\newtableformatkey n%
+ {\def\!tnStyle{}%
+ \futurelet\!tnext\!tnTestForBracket}
+
+% Key "N": numeric item, math mode.
+
+\newtableformatkey N%
+ {\def\!tnStyle{$}%
+ \futurelet\!tnext\!tnTestForBracket}
+
+% Key "m": Math mode.
+
+\newtableformatkey m%
+ {\doreadtableformatkeys b{\normalstartimath} a{\normalstopimath}}
+
+% Key "M": Displaymath mode.
+
+\newtableformatkey M%
+ {\doreadtableformatkeys \{ b{\normalstartimath\displaystyle} a{\normalstopimath}}
+
+% Key "\m": Template ${}#\hfil$
+
+\newtableformatkey \m%
+ {\doreadtableformatkeys l b{{}} m}
+
+% Key "\M": Template $\displaystyle{{}#\hfil}$
+
+\newtableformatkey \M%
+ {\doreadtableformatkeys l b{{}} M}
+
+% Key "f": Set font (E.g., f\it sets up italic font (assuming \it
+% has its usual meaning)
+
+\newtableformatkey f#1%
+ {\doreadtableformatkeys b{#1}}
+
+\newtableformatkey B{\doreadtableformatkeys f\bf} % Key "B": abbreviation for f\bf
+\newtableformatkey I{\doreadtableformatkeys f\it} % Key "I": abbreviation for f\it
+\newtableformatkey S{\doreadtableformatkeys f\sl} % Key "S": abbreviation for f\sl
+\newtableformatkey R{\doreadtableformatkeys f\rm} % Key "R": abbreviation for f\rm
+\newtableformatkey T{\doreadtableformatkeys f\tt} % Key "T": abbreviation for f\tt
+
+% Key "p": ParBox
+
+\newtableformatkey p%
+ {\!tgGetValue{\!tgSetUpParBox}}
+
+% Key "w": minimum column width
+
+\newtableformatkey w%
+ {\!tkTestForBeginFormat w{\!tgGetValue{\!tfSetWidth}}}
+
+% Key "s": Set tabskip for the inter-column space to the right of the current
+% column, and all subsequent spaces, until overriden by a new "s" or "o" key.
+
+\newtableformatkey s%
+ {\!taOnceOnlyTabskipfalse % in case same column has a prior "o" key
+ \!tkTestForBeginFormat t{\!tgGetValue{\!tfSetTabskip}}}
+
+% Key "o": Apply the \tabskip stated for this column ONLY to the inter-column space
+% just to the right of this column; restore the the previous \tabskip for
+% subsequent columns.
+
+\newtableformatkey o%
+ {\!taOnceOnlyTabskiptrue
+ \!tkTestForBeginFormat o{\!tgGetValue{\!tfSetTabskip}}}
+
+% Key "|": Standard rule column designator
+
+\newtableformatkey |%
+ {\!tkTestForBeginFormat |{\!tgGetValue{\!tfSetVrule}}}
+
+% Key "\|": Non-standard rule column designator
+
+\newtableformatkey \|%
+ {\!tkTestForBeginFormat \|{\!tfSetAlternateVrule}}
+
+% Key ".": PERIOD -- end of \tabl_table_begin_format section.
+
+\newtableformatkey .%
+ {\!tkTestForBeginFormat.{\!tfFinishFormat}}
+
+% Key "\doendtableformat": Equivalent to "."
+
+\aliased\let\doendtableformat\relax
+
+\newtableformatkey \doendtableformat
+ {\!tkTestForBeginFormat\doendtableformat{\!tfFinishFormat}}
+
+% Key "]": End of \tabl_table_reformat section
+
+\newtableformatkey ]%
+ {\!tkTestForReFormat ] \!tfEndReFormat}
+
+% TEST FOR BEGIN FORMAT{<Key>}{Intended Action}: This test is run on keys that can
+% only be used by \tabl_table_begin_format --- "s", "o", "|", "\|", "w", ".", and
+% "\doendtableformat".
+
+\def\!tkTestForBeginFormat#1#2%
+ {\if!taBeginFormat
+ \def\tempstring{#2}%
+ \expandafter\tempstring
+ \else
+ \toks0={#1}%
+ \toks2=\expandafter{\string\tabl_table_reformat}%
+ \expandafter\!tkImproperUse
+ \fi}
+
+% TEST FOR RE FORMAT{<Key>}{Intended Action}: This test is run on the key "]",
+% which can only be used by \tabl_table_reformat.
+
+\def\!tkTestForReFormat#1#2%
+ {\if!taBeginFormat
+ \toks0={#1}%
+ \toks2=\expandafter{\string\tabl_table_begin_format}%
+ \expandafter\!tkImproperUse
+ \else
+ \def\tempstring{#2}%
+ \expandafter\tempstring
+ \fi}
+
+% NOTE: THE SPACE BETWEEN A NUMERIC ENTRY AND THE FOLLOWING '|', '"', OR '\|' IS
+% MANDATORY. EMPTY NUMERIC ENTRIES ARE NOT ALLOWED: USE '{}' OR '\omit' INSTEAD.
+
+\def\!tnTestForBracket
+ {\ifx[\!tnext
+ \expandafter\!tnGetArgument
+ \else
+ \expandafter\!tnGetCode
+ \fi}
+
+% GET CODE: E.g. "4", or "4.0", "0.4", or "10.2"
+
+\def\!tnGetCode#1 %
+ {\!tnConvertCode #1..!}
+
+% CONVERT CODE: E.g. converts above to [0000], [0000.], [.0000], [0000000000.00]
+
+\def\!tnConvertCode #1.#2.#3!%
+ {\begingroup
+ \aftergroup\edef \aftergroup\tempstring \aftergroup{%
+ \aftergroup[%
+ \scratchcounter#1\relax
+ \!thLoop
+ \ifnum \scratchcounter>\zerocount
+ \advance\scratchcounter\minusone
+ \aftergroup0
+ \repeat
+ \def\tempstring{#3}%
+ \ifempty\tempstring\else
+ \aftergroup.
+ \scratchcounter#2\relax
+ \!thLoop
+ \ifnum \scratchcounter>\zerocount
+ \advance\scratchcounter\minusone
+ \aftergroup0
+ \repeat
+ \fi
+ \aftergroup]\aftergroup}%
+ \endgroup\relax
+ \expandafter\!tnGetArgument\tempstring}
+
+% GET ARGUMENT: [<sample left field> <optional .<sample right field>>
+
+\def\!tnGetArgument[#1]%
+ {\!tnMakeNumericTemplate\!tnStyle#1..!}
+
+% MAKE NUMERIC TEMPLATE
+
+\def\!tnMakeNumericTemplate#1#2.#3.#4!% #1=<empty> or $
+ {\def\tempstring{#4}%
+ \ifempty\tempstring
+ \!taDimenC\zeropoint
+ \else
+ \setbox\scratchbox\hbox{\mathsurround\zeropoint #1.#3#1}%
+ \!taDimenC\wd\scratchbox
+ \fi
+ \setbox\scratchbox\hbox{\mathsurround\zeropoint #1#2#1}%
+ \!thToksEdef\!taDataColumnTemplate
+ {\noexpand\!tnSetNumericItem{\the\wd\scratchbox}{\the\!taDimenC}{#1}%
+ \the\!taDataColumnTemplate}% Might have tabskip glue in here
+ \doreadtableformatkeys}
+
+% SET NUMERIC ITEM
+
+\def\!tnSetNumericItem #1#2#3#4 %
+ {\!tnSetNumericItemA {#1}{#2}{#3}#4..!}
+
+\def\!tnSetNumericItemA #1#2#3#4.#5.#6!%
+ {\def\tempstring{#6}%
+ \hbox to #1{\hss \mathsurround\zeropoint #3#4#3}%
+ \hbox to #2{\ifempty\tempstring\else\mathsurround\zeropoint #3.#5#3\fi\hss}}
+
+% extensions
+
+\newtableformatkey q%
+ {\let\!tqStyle\empty
+ \futurelet\!tnext\!tqTestForBracket}
+
+\newtableformatkey Q%
+ {\def\!tqStyle{$}%
+ \futurelet\!tnext\!tqTestForBracket}
+
+\def\!tqTestForBracket
+ {\ifx[\!tnext
+ \!thx\!tqGetArgument
+ \else
+ \!thx\!tqGetCode
+ \fi}
+
+\def\!tqGetCode#1 % note the blank
+ {\!tqConvertCode #1,,!}
+
+\def\!tqConvertCode #1,#2,#3!%
+ {\begingroup
+ \aftergroup\edef
+ \aftergroup\tempstring
+ \aftergroup{%
+ \aftergroup[%
+ \scratchcounter#1\relax
+ \!thLoop
+ \ifnum \scratchcounter>\zerocount
+ \advance\scratchcounter\minusone
+ \aftergroup0
+ \repeat
+ \def\tempstring{#3}%
+ \ifempty\tempstring\else
+ \aftergroup,
+ \scratchcounter#2\relax
+ \!thLoop
+ \ifnum\scratchcounter>\zerocount
+ \advance\scratchcounter\minusone
+ \aftergroup0
+ \repeat
+ \fi
+ \aftergroup]\aftergroup}%
+ \endgroup\relax
+ \!thx\!tqGetArgument\tempstring}
+
+\def\!tqGetArgument[#1]%
+ {\!tqMakeQuantityTemplate\!tqStyle#1,,!}
+
+\def\!tqMakeQuantityTemplate#1#2,#3,#4!% #1=<empty> or $
+ {\def\tempstring{#4}%
+ \ifempty\tempstring
+ \!taDimenC\zeropoint
+ \else
+ \setbox\scratchbox\hbox{\mathsurround\zeropoint #1,#3#1}%
+ \!taDimenC\wd\scratchbox
+ \fi
+ \setbox\scratchbox\hbox{\mathsurround\zeropoint #1#2#1}%
+ \!thToksEdef\!taDataColumnTemplate
+ {\noexpand\!tqSetQuantityItem{\the\wd\scratchbox}{\the\!taDimenC}{#1}%
+ \the\!taDataColumnTemplate}%
+ \doreadtableformatkeys}
+
+\def\!tqSetQuantityItem #1#2#3#4 %
+ {\!tqSetQuantityItemA{#1}{#2}{#3}#4,,!}
+
+\def\!tqSetQuantityItemA #1#2#3#4,#5,#6!%
+ {\def\tempstring{#6}%
+ \hbox to #1{\hss\mathsurround\zeropoint#3#4#3}%
+ \hbox to #2{\ifempty\tempstring\else\mathsurround\zeropoint#3,#5#3\fi\hss}}
+
+% \Enlarge<extra height><extra depth><original>
+% \enlarge<multiple for extra height><multiple for extra depth><original>
+
+\def\tabl_table_Enlarge#1#2%
+ {% 3rd argument is picked up later
+ % #1=extra height
+ % #2=extra depth
+ \!taDimenA=#1\relax
+ \!taDimenB=#2\relax
+ \let\!TsSpaceFactor\empty
+ \ifmmode
+ \expandafter\mathpalette
+ \expandafter\!TsEnlargeMath
+ \else
+ \expandafter\!TsEnlargeOther
+ \fi}
+
+\def\!TsEnlargeOther#1%
+ {\ifhmode
+ \setbox\scratchbox\hbox{#1\xdef\!TsSpaceFactor{\spacefactor\the\spacefactor}}%
+ \else
+ \setbox\scratchbox\hbox{#1}%
+ \fi
+ \!TsFinishEnlarge}
+
+\def\!TsEnlargeMath#1#2%
+ {\setbox\scratchbox\hbox{\normalstartimath\mathsurround\zeropoint#1{#2}\normalstopimath}%
+ \!TsFinishEnlarge}
+
+\def\!TsFinishEnlarge
+ {\ht\scratchbox\dimexpr\ht\scratchbox+\!taDimenA\relax
+ \dp\scratchbox\dimexpr\dp\scratchbox+\!taDimenB\relax
+ \box\scratchbox
+ \!TsSpaceFactor\relax}
+
+\def\tabl_table_enlarge#1#2% 3rd argument is picked up later
+ {\tabl_table_Enlarge{#1\d_tabl_table_strut_unit}{#2\d_tabl_table_strut_unit}}
+
+
+\aliased\let\enlarge\relax
+\aliased\let\Enlarge\relax
+
+\appendtoks
+ \enforced\let\enlarge\tabl_table_enlarge
+ \enforced\let\Enlarge\tabl_table_Enlarge
+\to \everytable
+
+% BEGIN TABLE
+
+\let\tabl_table_standard_end\relax
+
+\def\tabl_table_standard_begin[#1]% \!ttBeginTable (always argument)
+ {\if#1u% unboxed table
+ \ifmmode
+ \let\tabl_table_standard_end\relax % user had better be in display math mode and have only one table at the outer level
+ \else % user had better be in vertical mode
+ \bgroup
+ \let\tabl_table_standard_end\egroup
+ \fi
+ \else
+ \hbox\bgroup
+ \def\tabl_table_standard_end{\egroup\egroup}%
+ \if#1t%
+ \vtop
+ \orelse\if#1b%
+ \vbox
+ \else
+ \def\tabl_table_standard_end{\egroup\normalstopimath\egroup}%
+ \scratchtoks\everymath
+ \everymath\emptytoks
+ \normalstartimath
+ \everymath\scratchtoks
+ \vcenter
+ \fi
+ \bgroup % for the \vtop, \vbox, or \vcenter
+ \fi
+ \advance\!taRecursionLevel\plusone
+ \let\!ttRightGlue\relax
+ \everycr\emptytoks
+ \ifnum\!taRecursionLevel=\plusone
+ \the\everytable
+ \fi}
+
+\bgroup \catcode\tildeasciicode\activecatcode
+
+ \appendtoks
+ \catcode\barasciicode\activecatcode
+ \enforced\protected\def ~{\kern.5em}%
+ \enforced\protected\def\\{\ifhmode\space\else\par\fi}%
+ \to \everytable
+
+\egroup
+
+\let\!ttRightGlue\relax % This may be changed, in a group, by \JustCenter, etc
+
+% DO HALIGN: Invoked by END FORMAT (or the key ".")
+
+\let\tabl_table_restore_lineskips\relax
+
+\def\!ttDoHalign
+ {\edef\tabl_table_restore_lineskips
+ {\baselineskip \the\baselineskip
+ \lineskiplimit\the\lineskiplimit
+ \lineskip \the\lineskip
+ \tabskip \the\tabskip
+ \relax}%
+ \baselineskip \zeropoint
+ \lineskiplimit\zeropoint
+ \lineskip \zeropoint
+ \tabskip \zeropoint
+ \edef\p_tabl_table_textwidth{\directtablesparameter\c!textwidth}%
+ % we are not in sync so:
+ \synchronizedisplaydirection
+ \synchronizeinlinedirection
+ \halign
+ \usedirectionparameterreverse\directtablesparameter
+ \ifempty\p_tabl_table_textwidth \else to \ifx\p_tabl_table_textwidth\v!max \hsize \else \p_tabl_table_textwidth \fi\fi
+ %\the\!taTableSpread
+ \bgroup
+ \span
+ \the\!taPreamble
+ \ifempty\!tfRowOfWidths\else
+ \!tfRowOfWidths\cr
+ \fi}
+
+% END TABLE
+
+\def\tabl_table_normal_end
+ {\egroup % finishes the \halign
+ \tabl_table_standard_end} % closes off the table envirnoment set up by \tablestandardbegin
+
+\def\tabl_table_normal_line_ending
+ {\cr}
+
+\def\tabl_table_normal_line_format#1#2%
+ {\vrule
+ \s!width \zeropoint
+ \s!height\dimexpr\tablestrutheightfactor\d_tabl_table_strut_unit+#1\d_tabl_table_strut_unit\relax
+ \s!depth \dimexpr\tablestrutdepthfactor \d_tabl_table_strut_unit+#2\d_tabl_table_strut_unit\relax
+ \relax
+ \cr}
+
+% INSERT VRULE
+
+\newcount\c_tabl_table_n_of_vrules \c_tabl_table_n_of_vrules\plusone
+
+\let\m_tabl_table_vrule_color\empty
+\let\m_tabl_table_hrule_color\empty
+
+\def\tabl_table_insert_vrule
+ {\vrule\s!width
+ \ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \c_tabl_table_vrule_thickness_factor
+ \else
+ \!tgValue
+ \fi
+ \d_tabl_table_line_thickness_unit
+ \else
+ \!tgValue
+ \fi
+ \hskip.125\emwidth\relax}
+
+\def\tabl_table_normal_line_simple_bar
+ {\unskip\!ttRightGlue\aligntab\aligntab}
+
+\def\tabl_table_normal_line_complex_bar
+ {\unskip\!ttRightGlue\aligntab\omit
+ \hfil
+ \ifempty\m_tabl_table_vrule_color\else
+ \switchtocolor[\m_tabl_table_vrule_color]%
+ \fi
+ \ifcase\c_tabl_table_n_of_vrules\or
+ \tabl_table_insert_vrule
+ \unskip
+ \else
+ \dorecurse\c_tabl_table_n_of_vrules\tabl_table_insert_vrule
+ \global\c_tabl_table_n_of_vrules\plusone
+ \unskip
+ \fi
+ \glet\m_tabl_table_vrule_color\empty
+ \hfil
+ \aligntab}
+
+\def\tabl_table_normal_no_bar
+ {\unskip\!ttRightGlue\aligntab\omit\aligntab}
+
+\def\tabl_table_normal_single_rule
+ {\aligntab\tabl_table_normal_long_rule\aligntab}
+
+\def\tabl_table_normal_multi_rule
+ {\aligntab\tabl_table_use\c_tabl_table_drule_span\tabl_table_normal_long_rule\aligntab}
+
+% USE
+
+\def\tabl_table_use#1%
+ {\ifnum#1>\plusone
+ \omit
+ \global\setfalse\c_tabl_table_is_division % added
+ \scratchcounter\currenttablecolumn % added
+ \advance\scratchcounter #1% % added
+ \advance\scratchcounter \minusone % added
+ \def\next % added
+ {\global\advance\currenttablecolumn #1% % added
+ \global\advance\currenttablecolumn \minusone % added
+ \scratchcounter#1%
+ \advance\scratchcounter \minusone
+ \advance\scratchcounter \scratchcounter
+ \!thLoop
+ \ifnum\scratchcounter>\plusone
+ \spanomit \advance\scratchcounter\minusone
+ \repeat
+ \span}%
+ \else % added
+ \def\next % conflicts with possible next \omit % added
+ {\global\advance\currenttablecolumn \plusone}%% added
+ \fi
+ \next} % added
+
+\def\tabl_table_Use#1[%
+ {\tabl_table_use{#1}%
+ \tabl_table_reformat[}
+
+\aliased\let\use\relax
+\aliased\let\Use\relax
+
+\appendtoks
+ \enforced\let\use\tabl_table_use
+ \enforced\let\Use\tabl_table_Use
+\to \everytable
+
+% rules
+
+\def\tabl_table_normal_full_rule
+ {\noalign\bgroup
+ \!ttGetHalfRuleThickness
+ \scratchdistance\directtablesparameter\c!openup
+ \ifzeropt\scratchdistance\else\kern\scratchdistance\fi
+ \hrule\s!height\scratchdimen\s!depth\scratchdimen
+ \ifzeropt\scratchdistance\else\kern\scratchdistance\fi
+ \egroup}
+
+\def\tabl_table_normal_short_rule % was: \!ttShortHrule
+ {\omit
+ \!ttGetHalfRuleThickness
+ \ifempty\m_tabl_table_hrule_color\else
+ \switchtocolor[\m_tabl_table_hrule_color]% see *DL*
+ \fi
+ \leaders\hrule\s!height\scratchdimen\s!depth\scratchdimen\hfill
+ \emptyhbox
+ \ignorespaces}
+
+\def\tabl_table_normal_long_rule % was: \!ttLongHrule
+ {\omit\span
+ \omit\span
+ \tabl_table_normal_short_rule}
+
+\def\!ttGetHalfRuleThickness
+ {\scratchdimen\dimexpr
+ \ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \c_tabl_table_hrule_thickness_factor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \d_tabl_table_line_thickness_unit
+ \else
+ \!tgValue % user-specified dimension
+ \fi
+ \divide\scratchdimen\plustwo}
+
+% \emptyhbox prevents \unskip
+
+\def\tabl_table_Left #1{#1\hfill\emptyhbox}
+\def\tabl_table_Center#1{\hfill#1\hfill\emptyhbox}
+\def\tabl_table_Right #1{\hfill#1}
+
+\def\tabl_table_OpenUp#1#2%
+ {\edef\tablestrutheightfactor{\withoutpt\the\dimexpr\tablestrutheightfactor\points+#1\points}%
+ \edef\tablestrutdepthfactor {\withoutpt\the\dimexpr\tablestrutdepthfactor \points+#2\points}}
+
+% SetTableToWidth -> textwidth=dimension [to dimension]
+% Expand -> textwidth=max [to \hsize]
+% WidenTableBy -> [spread #1]
+% \tablelefttabskip\zeropoint\s!plus1\s!fill
+% \tablerighttabskip\tablelefttabskip
+% LongLines -> [spread \hsize]
+
+\def\tabl_table_JustLeft {\omit\let\!ttRightGlue\hfill}
+\def\tabl_table_JustCenter{\omit\hfill\emptyhbox\let\!ttRightGlue\hfill}
+\def\tabl_table_JustRight {\omit\hfill\emptyhbox}
+
+\def\tabl_table_Smash
+ {\relax
+ \ifmmode
+ \expandafter\mathpalette
+ \expandafter\!thDoMathVCS
+ \else
+ \expandafter\!thDoVCS
+ \fi}
+
+\def\!thDoVCS#1%
+ {\setbox\zerocount\hbox{#1}%
+ \!thFinishVCS}
+
+\def\!thDoMathVCS#1#2%
+ {\setbox\zerocount\hbox{\normalstartimath\mathsurround\zeropoint#1{#2}\normalstopimath}%
+ \!thFinishVCS}
+
+\def\!thFinishVCS
+ {\vpack to\zeropoint{\vss\box\zerocount\vss}}
+
+\def\tabl_table_Raise
+ {\def\!thSign{+}%
+ \!tgGetValue\!thSetDimen}
+
+\def\tabl_table_Lower
+ {\def\!thSign{-}%
+ \!tgGetValue\!thSetDimen}
+
+\def\!thSetDimen
+ {\ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \!taDimenA\tablestrutheightfactor\d_tabl_table_strut_unit
+ \advance\!taDimenA\tablestrutdepthfactor\d_tabl_table_strut_unit
+ \divide\!taDimenA\plustwo
+ \else
+ \!taDimenA\!tgValue\d_tabl_table_strut_unit
+ \fi
+ \else
+ \!taDimenA\!tgValue
+ \fi
+ \!taDimenA\!thSign\!taDimenA\relax
+ \ifmmode
+ \expandafter\mathpalette
+ \expandafter\!thDoMathRaise
+ \else
+ \expandafter\!thDoSimpleRaise
+ \fi}
+
+\def\!thDoSimpleRaise#1%
+ {\setbox\zerocount\hbox{\raise \!taDimenA\hbox{#1}}%
+ \!thFinishRaise} % From Plain TeX: \ht0=0pt \dp0=0pt \box0
+
+\def\!thDoMathRaise#1#2%
+ {\setbox\zerocount\hbox{\raise \!taDimenA\hbox{\normalstartimath\mathsurround\zeropoint#1{#2}\normalstopimath}}%
+ \!thFinishRaise}
+
+\def\!thFinishRaise
+ {\ht\zerocount\zeropoint
+ \dp\zerocount\zeropoint
+ \box\zerocount}
+
+\def\tabl_table_BackSpace
+ {\!tgGetValue\!thKernBack}
+
+\def\!thKernBack
+ {\kern -
+ \ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \tablekernfactor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \d_tabl_table_kern_unit
+ \else
+ \!tgValue % user-specified dimension
+ \fi
+ \ignorespaces}
+
+\def\tabl_table_Vspace
+ {\noalign
+ \bgroup
+ \!tgGetValue\!thVspace}
+
+\def\!thVspace
+ {\vskip
+ \ifnum\!tgCode=\plusone
+ \ifempty\!tgValue
+ \tablevspacefactor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \d_tabl_table_strut_unit
+ \else
+ \!tgValue % user-specified skip
+ \fi
+ \egroup} % Ends the \noalign
+
+\aliased\let\JustLeft \relax
+\aliased\let\JustCenter \relax
+\aliased\let\JustRight \relax
+\aliased\let\Smash \relax
+\aliased\let\Raise \relax
+\aliased\let\Lower \relax
+\aliased\let\BackSpace \relax
+\aliased\let\Vspace \relax
+\aliased\let\OpenUp \relax
+\aliased\let\TableLeft \relax
+\aliased\let\TableCenter\relax
+\aliased\let\TableRight \relax
+
+\appendtoks
+ \enforced\let\JustLeft \tabl_table_JustLeft
+ \enforced\let\JustCenter \tabl_table_JustCenter
+ \enforced\let\JustRight \tabl_table_JustRight
+ \enforced\let\Smash \tabl_table_Smash
+ \enforced\let\Raise \tabl_table_Raise
+ \enforced\let\Lower \tabl_table_Lower
+ \enforced\let\BackSpace \tabl_table_BackSpace
+ \enforced\let\Vspace \tabl_table_Vspace
+ \enforced\let\OpenUp \tabl_table_OpenUp
+ \enforced\let\TableLeft \tabl_table_Left
+ \enforced\let\TableCenter\tabl_table_Center
+ \enforced\let\TableRight \tabl_table_Right
+\to \everytable
+
+%D \macros
+%D {inintable, ifsplittables}
+%D
+%D First we declare some variables. These show a bit what we are dealing with. First
+%D we introdoce some booleans that enable us, inside as well as outside this module,
+%D to determine in what mode we are.
+
+\newif\ifintable
+\newif\ifsplittables
+
+%D We show this feature in an example that also shows some of the basic table
+%D typesetting commands.
+%D
+%D \startbuffer
+%D \starttable[|||]
+%D \HL
+%D \VL first \VL second \VL\AR
+%D \HL
+%D \VL alfa \VL 1 \VL\AR
+%D \VL beta \VL 2 \VL\AR
+%D \VL gamma \VL 3 \VL\AR
+%D \HL
+%D \stoptable
+%D \stopbuffer
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D This table is specified as:
+%D
+%D \typebuffer
+%D
+%D This examples shows about the minimum of commands needed to typeset such a table.
+%D In this table, the \type {\AR} is automatically translated into the more
+%D primitive (but more verbose) commands \type {\SR}, \type {\FR}, \type {\MR} and
+%D \type {\LR} commands.
+%D
+%D \startbuffer
+%D \starttables[|||]
+%D \HL
+%D \VL first \VL second \VL\AR
+%D \HL
+%D \VL alfa \VL 1 \VL\AR
+%D \VL beta \VL 2 \VL\AR
+%D \VL gamma \VL 3 \VL\AR
+%D \HL
+%D \stoptables
+%D \stopbuffer
+%D
+%D \getbuffer
+%D
+%D Some simple color support is provided:
+%D
+%D \startbuffer
+%D \starttable[|c|c|]
+%D \HL
+%D \VL test \VL test \VL \SR
+%D \HL[green,5]
+%D \VL[red] test \VL test \VL \FR
+%D \VL test \VL[10,red] test \VL \MR
+%D \VL test \VL test \VL[10] \LR
+%D \HL
+%D \stoptable
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\installcorenamespace{tabletemplate}
+
+\immutable\def\m!TABLE{TABLE}
+
+%D We already saw that the table macros report errors and provide automatic spacing.
+%D These features can only be implemented by keeping track of the state, often the
+%D last command on a row.
+
+\newconstant\tableforcestate
+\newconstant\tableactionstate
+
+\setnewconstant\tableunknownstate 0
+
+\setnewconstant\tableseparaterowstate 1
+\setnewconstant\tablefirstrowstate 2
+\setnewconstant\tablemidrowstate 3
+\setnewconstant\tablelastrowstate 4
+\setnewconstant\tablerulestate 5
+%setnewconstant\tableskipstate 6
+%setnewconstant\tableautorowstate 7
+
+\setnewconstant\tableforcefirstrowstate 1
+\setnewconstant\tableforcelastrowstate 2
+
+\newconstant\tablerowfactor
+\newconstant\TABLEendofrowdepth
+\newconstant\TABLEendofrowheight
+\newconstant\TABLEcr
+\newconstant\tablerowzero
+\newconstant\TABLEn
+
+%D We store these states using \type {constants}'s and like most variables, these
+%D are global ones. When needed, especially when we flush the backgrounds, we can
+%D temporary disable the assignment.
+
+\newconditional\tableactionstatepermitted
+
+\def\tabl_table_set_action#1{\ifconditional\tableactionstatepermitted\global\tableactionstate#1\fi}
+\def\tabl_table_set_force #1{\ifconditional\tableactionstatepermitted\global\tableforcestate #1\fi}
+
+%D To give an impression of what the (well documented) source of \TABLE\ looks like,
+%D we first implement an alternative for the numeric keys. The quantity keys
+%D (\type{q} and \type{Q}) support the more european way of writing numbers:
+%D
+%D \startnarrower
+%D 100.000.000,00 instead of 100,000,000.00
+%D \stopnarrower
+%D
+%D The next table shows how to use these keys. We use braces instead of brackets because
+%D we need brackets to specify the format.
+%D
+%D \starttyping
+%D \starttable{|q[00,000]|Q[00,00]|}
+%D \HL
+%D \VL -1,2 \VL 12,35 \VL\FR
+%D \VL 11,203 \VL 2,4 \VL\LR
+%D \HL
+%D \stoptable
+%D \stoptyping
+%D
+%D Although a more efficient implementation is possible |<|we can for instance share
+%D common macros|>| we just adapt a copy of the numeric ones. To permit double
+%D loading of this module, we check for the existence of one of the macros.
+%D
+%D To be compatible with the tabulate environment, we also support the \type {l},
+%D \type {c} and \type {r} keys for paragraph entries.
+%D
+%D All commands that are executed between rows are to be put in \type {\noalign}. We
+%D can however not verify if we (that is \TABLE) does or did not enter this mode. A
+%D moderate dirty but useful trick is using our own alternative:\footnote{Once one
+%D has entered the stage of redefining \TEX\ primitives, such hacks become a second
+%D nature. However, redefining \type {\omit} and \type{\span} is not that easy.}
+
+%D We no longer need this in \LUAMETATEX:
+%D
+%D \starttyping
+%D \aliased\let\tablenoalign \noalign
+%D \def\starttablenoalign{\noalign\bgroup}
+%D \let\stoptablenoalign \egroup
+%D \stoptyping
+
+%D \macros
+%D {starttable}
+%D
+%D The rest of this module is not easy to comprehend, mainly because we have to take
+%D care of:
+%D
+%D \startitemize[packed]
+%D \item \type{\startitemize[template]}
+%D \item \type{\startitemize{template}}
+%D \item \type{\startitemize[predefined]}
+%D \stopitemize
+%D
+%D as well as:
+%D
+%D \startitemize[continue]
+%D \item restart after table break
+%D \stopitemize
+%D
+%D The official specification of the start command is:
+%D
+%D \showsetup{starttable}
+
+\newconditional\c_tabl_table_repeat_head
+\newconditional\c_tabl_table_repeat_tail
+
+\permanent\tolerant\protected\def\starttable[#1]#*[#2]% preamble optional-settings
+ {\bgroup
+ \ifarguments\or\or
+ \setupcurrenttables[#2]%
+ \fi
+ \edef\p_tabl_table_split{\directtablesparameter\c!split}%
+ \edef\p_tabl_table_frame{\directtablesparameter\c!frame}%
+ \ifx\p_tabl_table_split\v!auto
+ \ifinsidesplitfloat
+ \let\p_tabl_table_split\v!yes
+ \lettablesparameter\c!split\v!yes % might be used later, best make a proper mode
+ \fi
+ \fi
+ \ifx\p_tabl_table_split\v!yes
+ \enforced\let\stoptable\table_table_stop_g % not \protected as we look ahead
+ \expandafter\starttables
+ \orelse\ifx\p_tabl_table_split\v!repeat
+ \enforced\let\stoptable\table_table_stop_g % not \protected as we look ahead
+ \expandafter\starttables
+ \else
+ \enforced\let\stoptable\table_table_stop
+ \ifempty\p_tabl_table_frame
+ \ifinsidefloat\else\startbaselinecorrection\fi
+ \else
+ \startframedcontent[\p_tabl_table_frame]%
+ \fi
+ \postponenotes
+ \expandafter\tabl_table_first_stage
+ \fi[#1]}
+
+% We cannot define the stopper as \type {\protected} because lookahead in
+% alignments fail then, so we relax it and define it locally. Actually we
+% now can.
+
+\permanent\let\stoptable\relax
+
+\permanent\def\table_table_stop
+ {\tabl_tables_chuck_auto_row % before the tail, else noalign problem
+ \tabl_table_insert_tail
+ \noalign\bgroup
+ \glet\tabl_table_head\empty
+ \glet\tabl_table_tail\empty
+ \egroup
+ \tabl_table_finish
+ \ifempty\p_tabl_table_frame
+ \ifinsidefloat\else
+ \stopbaselinecorrection
+ \goodbreak % compensates all the nobreaks
+ \fi
+ \else
+ \stopframedcontent
+ \fi
+ \egroup}
+
+\permanent\def\table_table_stop_g
+ {\table_table_stop_s\egroup}
+
+%D Before we can grab the argument, we have to make sure that the \CATCODES\ are
+%D set. The first stage takes care of that.
+
+\def\tabl_table_first_stage
+ {\bgroup
+ \global\intabletrue
+ \tabl_table_second_stage}
+
+%D \macros
+%D {definetabletemplate}
+%D
+%D The complex (and main) start macro first takes care of the predefined case. Such
+%D a predefined setup looks like:
+%D
+%D \starttyping
+%D \definetabletemplate[test][|||]
+%D
+%D \starttable[test]
+%D \VL test \VL test \VL\AR
+%D \VL test \VL test \VL\AR
+%D \VL test \VL test \VL\AR
+%D \stoptable
+%D \stoptyping
+%D
+%D The implementation of the definition macro is not that complicated:
+
+\installcorenamespace{tablehead}
+\installcorenamespace{tabletail}
+
+\permanent\protected\def\definetabletemplate % to be redone
+ {\bgroup
+ \catcode\barasciicode\othercatcode
+ \tabl_table_define_template}
+
+\tolerant\def\tabl_table_define_template[#1]#*[#2]#*[#3]#*[#4]%
+ {\ifarguments\or\else
+ \setgvalue{\??tabletemplate#1}{\tabl_table_use_template{#2}{#3}{#4}}%
+ \fi
+ \egroup}
+
+\def\tabl_table_use_template#1#2#3%
+ {\gdef\tabl_table_head{\begincsname\??tablehead#2\endcsname}%
+ \gdef\tabl_table_tail{\begincsname\??tabletail#3\endcsname}%
+ \tabl_table_second_stage[#1]}
+
+%D The optional third and fourth arguments define which table head and tail to use.
+%D
+%D \starttyping
+%D \definetabletemplate[test][|||][before][after]
+%D \stoptyping
+%D
+%D This also means that one can define table heads and tails by name!
+%D
+%D \starttyping
+%D \starttablehead[before]
+%D \HL \VL first \VL second \VL \SR \HL
+%D \stoptablehead
+%D \stoptyping
+%D
+%D Templates defined this way get protected names, that cannot conflict with
+%D existing commands.
+%D
+%D \showsetup{definetabletemplate}
+%D
+%D The second half of the next macro prepares table
+%D splitting.
+
+\def\tabl_table_insert_head
+ {\noalign{\global\settrue\preventtablebreak\global\setfalse\hassometablehead}%
+ \tabl_table_head
+ \noalign{\global\setfalse\preventtablebreak}}
+
+\def\tabl_table_insert_tail
+ {\noalign{\global\settrue\preventtablebreak\global\setfalse\hassometabletail}%
+ \tabl_table_tail
+ \noalign{\global\setfalse\preventtablebreak}}
+
+% \def\doverysimpletableHL % todo
+% {\noalign{\normalexpanded{\noexpand\tabl_table_normal_full_rule\m_tabl_table_HLheight}}
+
+\let\tabl_table_restart\relax
+
+\def\tabl_table_restart_indeed#1%
+ {\gdef\tabl_table_restart{#1}%
+ \tabl_table_restart
+% \noalign{\globalpushmacro\simpletableHL\glet\simpletableHL\doverysimpletableHL}%
+ \tabl_table_insert_head
+ \ifsplittables \ifconditional \c_tabl_table_repeat_tail
+ \noalign{\goodbreak}%
+ \tabl_table_insert_tail
+ \noalign{\goodbreak}%
+ \fi \fi
+% \noalign{\globalpopmacro\simpletableHL}%
+ }
+
+\bgroup \catcode\barasciicode\othercatcode
+
+\gdef\tabl_table_second_stage[#1]% brr nested mess
+ {\bgroup
+ \tabl_table_use_bar
+ \global\setfalse\tableactionstatepermitted
+ \global\setfalse\hassometablehead
+ \global\setfalse\hassometabletail
+ \expanded{\doifelseinstring{|}{#1}}
+ {\xdef\tabl_table_restart{\noexpand\tabl_table_restart_indeed{\noexpand\tabl_table_third_stage{#1}}}}
+ {\ifcsname\??tabletemplate#1\endcsname
+ \gdef\tabl_table_restart{\csname\??tabletemplate#1\endcsname}%
+ \else
+ \gdef\tabl_table_restart{\tabl_table_restart_indeed{\begincsname#1\endcsname}}%
+ \fi}%
+ \egroup
+ \tabl_table_restart}
+
+\egroup
+
+%D The third stage involves a lot of (re)sets, which we will explain later.
+
+\appendtoks
+ \fixedspaces
+ \enforced\let\_\normalunderscore
+\to \everytable
+
+%D Now we can start the table.
+
+\newtoks\localtabledefinitions
+
+\mutable\let\currenttableformat\empty
+
+\def\tabl_table_third_stage#1%
+ {\global\settrue\tableactionstatepermitted
+ \tabl_table_set_action\tableunknownstate
+ \tabl_table_set_force\tableunknownstate
+ \tabl_table_resetVLvalues
+ \appendtoks\tabl_table_local_setups\to\everytable
+ \tabl_table_standard_begin[\ifsplittables u\else b\fi]%
+ \the\localtabledefinitions
+ \forgetall % added
+ \edef\currenttableformat{#1}%
+ \doifsomething\currenttableformat
+ {\tabl_tables_get_nofcolumns\currenttableformat
+ % more modern is to use catcode tables
+ \expandafter\tabl_table_begin_format\currenttableformat\doendtableformat}}
+
+\def\tabl_table_finish
+ {\tabl_tables_chuck_auto_row
+ \unskip\crcr
+ \tabl_table_normal_end
+ \global\intablefalse
+ \egroup}
+
+%D \macros
+%D {starttables}
+%D
+%D Split tables are specified using the plural form of the start and stop commands.
+%D
+%D \showsetup{starttables}
+%D
+%D For example:
+%D
+%D \starttyping
+%D \starttables[|||]
+%D \HL
+%D \VL element \VL atom weight \VL\AR
+%D \HL
+%D \VL ....... \VL ........... \VL\AR
+%D \VL ....... \VL ........... \VL\AR
+%D \HL
+%D \stoptables
+%D \stoptyping
+
+\newbox\tablecontentbox
+
+\permanent\protected\def\starttables
+ {\bgroup
+ \enforced\let\stoptables\table_table_stop_s
+ \splittablestrue
+ \edef\p_tabl_table_split{\directtablesparameter\c!split}%
+ \ifx\p_tabl_table_split\v!repeat
+ \settrue\c_tabl_table_repeat_head
+ \settrue\c_tabl_table_repeat_tail
+ \else
+ \setfalse\c_tabl_table_repeat_head
+ \setfalse\c_tabl_table_repeat_tail
+ \fi
+ \flushnotes
+ \setbox\tablecontentbox\vbox\bgroup
+ \forgetall
+ \tabl_table_first_stage}
+
+\aliased\let\stoptables\relax % needed for \noalign
+
+\def\table_table_stop_s % not \protected as we need the lookahead (brrr)
+ {\tabl_tables_chuck_auto_row % AM: before the tail, else noalign problem
+ \ifconditional\c_tabl_table_repeat_tail\else\tabl_table_insert_tail\fi
+ \tabl_table_finish
+ \egroup
+ \dontcomplain
+ \tabl_table_split_box\tablecontentbox
+ \glet\tabl_table_head\empty % new here
+ \glet\tabl_table_tail\empty % new here
+ \flushnotes
+ \egroup}
+
+\def\tabl_table_split_box#1%
+ {\resettsplit
+ \c_split_minimum_free_lines\plustwo
+ \d_split_minimum_free_space\zeropoint
+ \setbox\b_split_content\box#1%
+ \ifconditional\c_tabl_table_repeat_head \ifconditional\hassometablehead
+ \setbox\b_split_head\vsplit\b_split_content to \lineheight
+ \setbox\b_split_head\vbox{\unvbox\b_split_head}% \vpack ?
+ \fi \fi
+ \ifconditional\c_tabl_table_repeat_tail \ifconditional\hassometabletail
+ \setbox\b_split_tail\vsplit\b_split_content to \lineheight
+ \setbox\b_split_tail\vbox{\unvbox\b_split_tail}% \vpack ?
+ \fi \fi
+ \ifinsidefloat\else
+ \t_split_before_result{\startbaselinecorrection}%
+ \t_split_after_result {\stopbaselinecorrection}%
+ \fi
+ \handletsplit}
+
+%D When the table in the previous example is split across pages, only the first gets
+%D a head. We could have said something like:
+%D
+%D \starttyping
+%D \starttablehead
+%D \HL
+%D \VL element \VL atom weight \VL\AR
+%D \HL
+%D \stoptablehead
+%D
+%D \starttabletail
+%D \HL
+%D \stoptabletail
+%D
+%D \starttables[|||]
+%D \VL ....... \VL ........... \VL\AR
+%D \VL ....... \VL ........... \VL\AR
+%D \stoptables
+%D \stoptyping
+%D
+%D This time each split table gets a head line and ends with a rule. Keep in mind
+%D that such heads also apply to the unbroken ones and should be defined local
+%D (grouped) if needed. The rather complicated definition below is due to the fact
+%D that the stopcondition is interface language dependant.
+
+\let\tabl_table_head\empty % needs checking
+\let\tabl_table_tail\empty % needs checking
+
+\letvalue{\e!start\v!tablehead}\relax % todo: frozen, but we use a grabber
+\letvalue{\e!stop \v!tablehead}\relax % todo: frozen, but we use a grabber
+\letvalue{\e!start\v!tabletail}\relax % todo: frozen, but we use a grabber
+\letvalue{\e!stop \v!tabletail}\relax % todo: frozen, but we use a grabber
+
+%D The second argument is a dummy one, by scanning for it, we get rid of
+%D interfering spaces.
+
+\newconditional\preventtablebreak
+\newconditional\hassometablehead
+\newconditional\hassometabletail
+
+% \def\tabl_table_set_head[#1][#2]#3\end{\setvalue{\??tablehead#1}{\noalign{\global\settrue\hassometablehead}#3}}
+% \def\tabl_table_set_tail[#1][#2]#3\end{\setvalue{\??tabletail#1}{\noalign{\global\settrue\hassometabletail}#3}}
+
+\permanent\protected\def\settablehead{\dodoubleempty\tabl_table_set_head} % todo: use pickup
+\permanent\protected\def\settabletail{\dodoubleempty\tabl_table_set_tail} % todo: use pickup
+
+\def\tabl_table_set_head[#1][#2]#3\end
+ {\gdef\tabl_table_head{\begincsname\??tablehead#1\endcsname}% new
+ \defcsname\??tablehead#1\endcsname{\noalign{\global\settrue\hassometablehead}#3}}
+
+\def\tabl_table_set_tail[#1][#2]#3\end
+ {\gdef\tabl_table_tail{\begincsname\??tabletail#1\endcsname}% new
+ \defcsname\??tabletail#1\endcsname{\noalign{\global\settrue\hassometabletail}#3}}
+
+\normalexpanded {
+ \aliased\letcsname\e!stop\v!tablehead\endcsname\relax
+ \aliased\letcsname\e!stop\v!tabletail\endcsname\relax
+}
+
+\normalexpanded {
+ \permanent\protected\def\csname\e!start\v!tablehead\endcsname#1\csname\e!stop\v!tablehead\endcsname{\settablehead#1\noexpand\end}
+ \permanent\protected\def\csname\e!start\v!tabletail\endcsname#1\csname\e!stop\v!tabletail\endcsname{\settabletail#1\noexpand\end}
+}
+
+%D Redundant \type{\HL}'s are removed automatically, so mid||lines can be used
+%D without problems.
+%D
+%D The order of the next macros is more or less random. First we implement error
+%D recovery. Errors are reported to the screen and log file as well as visualized in
+%D the table in teletype.
+
+\def\tabl_table_finish_row
+ {\crcr
+ \noalign\bgroup
+ \nobreak
+ \tabl_table_set_action\tableunknownstate
+ \glet\tabl_tables_check_auto_row\empty
+ \glet\tabl_tables_chuck_auto_row\empty
+ \global\currenttablecolumn\zerocount
+ \egroup}
+
+%D Next we enter the more complicated area of column and row switching. I won't go
+%D into much detail from now on, but just mention the general principles.
+%D
+%D \startitemize[3*ruim]
+%D \sym{\type{\SR}} end a separate row (between rules)
+%D \sym{\type{\FR}} end a first row (after a rule)
+%D \sym{\type{\MR}} end a mid row (between text lines)
+%D \sym{\type{\LR}} end a last row (before a rule)
+%D \stopitemize
+%D
+%D and best of all:
+%D
+%D \startitemize[continue]
+%D \sym{\type{\AR}} end a row with automatic spacing
+%D \stopitemize
+%D
+%D As far as possible, we report confusing situations. In most cases one can use
+%D \type{\AR}, which transfigurates itself into one of the other types.
+%D
+%D \starttyping
+%D \starttable[||]
+%D \HL
+%D \VL a separate row \VL\SR
+%D \HL
+%D \VL a first row \VL\FR
+%D \VL a mid row \VL\MR
+%D \VL a last row \VL\LR
+%D \HL
+%D \stoptable
+%D \stoptyping
+%D
+%D In this example we could have used \type{\AR} without problems.
+%D
+%D Color or gray scale backgrounds precede the content. They are passed over
+%D horizontal (division) lines when needed. Errors in the color template are traced
+%D elsewhere. Here we only check for inconsistent spacing. Due to the way \TEX\
+%D handles alignments, we cannot automate spacing for colored rows and columns.
+
+\tablerowzero\zerocount
+
+\appendtoks
+ \enforced\let\SR\tabl_table_SR
+ \enforced\let\FR\tabl_table_FR
+ \enforced\let\MR\tabl_table_MR
+ \enforced\let\LR\tabl_table_LR
+ \enforced\let\AR\tabl_table_AR
+\to \localtabledefinitions
+
+\protected\def\tabl_table_SR
+ {\ifnum\tableactionstate=\tablefirstrowstate
+ \writestatus\m!TABLE{change \string\SR\space into \string\MR/\string\LR}%
+ \orelse\ifnum\tableactionstate=\tablemidrowstate
+ \writestatus\m!TABLE{change \string\SR\space into \string\MR/\string\LR}%
+ \orelse\ifnum\tableactionstate=\tablemidrowstate
+ \writestatus\m!TABLE{change \string\SR\space into \string\MR/\string\LR}%
+ \fi
+ \tabl_table_end_row_indeed\tableseparaterowstate\tablerowfactor\tablerowfactor}
+
+\protected\def\tabl_table_FR
+ {\ifnum\tableactionstate=\tablemidrowstate
+ \writestatus\m!TABLE{change \string\FR\space into \string\MR/\string\LR}%
+ \orelse\ifnum\tableactionstate=\tablelastrowstate
+ \writestatus\m!TABLE{change \string\FR\space into \string\MR/\string\LR}%
+ \fi
+ \tabl_table_end_row_indeed\tablefirstrowstate\tablerowfactor\tablerowzero}
+
+\protected\def\tabl_table_MR
+ {\ifnum\tableactionstate=\tablerulestate
+ \writestatus\m!TABLE{change \string\MR\space into \string\FR/\string\SR}%
+ \orelse\ifnum\tableactionstate=\tablelastrowstate
+ \writestatus\m!TABLE{change \string\MR\space into \string\FR}%
+ \fi
+ \tabl_table_end_row_indeed\tablemidrowstate00}
+
+\protected\def\tabl_table_LR
+ {\ifnum\tableactionstate=\tablerulestate
+ \writestatus\m!TABLE{change \string\LR\space into \string\FR/\string\SR}%
+ \fi
+ \tabl_table_end_row_indeed\tablelastrowstate\tablerowzero\tablerowfactor}
+
+%D \macros
+%D {ifcheckTABLEcolums}
+%D
+%D The next macros handle the actual row ending. This macro also take care of space
+%D corrections due to table splitting when \type{\MR} and collegues are used. When
+%D tracing is enabled, the corrections as well as the values used to determine the
+%D available space are shown (in color). By default checking is off.
+
+\def\tabl_table_end_row_indeed#1#2#3%
+ {\tabl_table_set_action#1%
+ \ifcase#1\relax
+ % unknown
+ \or
+ \tabl_tables_end_line\SR\SR\tablerowfactor\tablerowfactor
+ \or
+ \tabl_tables_end_line\FR\FR\tablerowfactor\tablerowzero
+ \or
+ \ifnum\tableforcestate=\tableforcelastrowstate
+ \tabl_tables_end_line\MR\LR\tablerowzero\tablerowfactor
+ \orelse\ifnum\tableforcestate=\tableforcefirstrowstate
+ \tabl_tables_end_line\MR\FR\tablerowfactor\tablerowzero
+ \else
+ \tabl_tables_end_line\MR\MR\tablerowzero\tablerowzero
+ \fi
+ \or
+ \tabl_tables_end_line\LR\LR\tablerowzero\tablerowfactor
+ \fi
+ \noalign\bgroup
+ \tabl_table_set_force\tableunknownstate
+ \global\currenttablecolumn\zerocount
+ \ifconditional\preventtablebreak
+ \nobreak
+ \else
+ \goodbreak
+ \fi
+ \egroup}
+
+%D Handling \type{\AR} is postponed till the next row. The check takes care of
+%D the first and mid rows, the chuck macro |<|how about that name|>| handles
+%D the last row.
+
+\protected\def\tabl_table_AR
+ {\glet\tabl_tables_check_auto_row\tabl_tables_check_auto_row_indeed
+ \glet\tabl_tables_chuck_auto_row\tabl_tables_chuck_auto_row_indeed}
+
+\let\tabl_tables_check_auto_row\empty
+\let\tabl_tables_chuck_auto_row\empty
+
+\def\tabl_tables_check_auto_row_indeed
+ {\glet\tabl_tables_check_auto_row\empty
+ \ifnum\tableactionstate=\tablerulestate \FR\orelse
+ \ifnum\tableactionstate=\tableunknownstate\FR\else
+ \MR\fi}
+
+\def\tabl_tables_chuck_auto_row_indeed
+ {\glet\tabl_tables_check_auto_row\empty
+ \glet\tabl_tables_chuck_auto_row\empty
+ \ifnum\tableactionstate=\tablerulestate \SR\orelse
+ \ifnum\tableactionstate=\tableunknownstate\SR\else
+ \LR\fi}
+
+%D When a table is split, we also add a tail and when present we repeat the table
+%D head. If a gets split indeed, the spacing before and after a horizontal rule is
+%D corrected according to what we expect.
+
+\def\tabl_tables_end_line#1#2#3#4%
+ {\ifx#1#2\else
+ \writestatus\m!TABLE{\string#1\space changed into \string#2}%
+ \fi
+ \expandafter\tabl_table_normal_line_format#3#4\crcr % \crcr nodig ?
+ \noalign{\nobreak\global\settrue\tableactionstatepermitted}}
+
+%D In order to prevent (as good as possible) alignment overflow and therefore \TEX\
+%D error messages, we check the maximum number of columns. We keep track of the
+%D current column and maximum column by means of two \COUNTERS. Keep in mind that
+%D the number of \type{|}'s and \type{\VL}'s or alike is always one more than the
+%D number of columns.
+
+\newcount\currenttablecolumn
+
+% DWhile defining this macro we change the \CATCODE\ of \type{|}. When counting the
+% Dbars, we use a non active representation of the bar, simply because we cannot be
+% Dsure if the bar is active or not.\footnote{Normally it is, but \TABLE\ changes
+% Dthe catcode when needed.}
+
+\bgroup
+ \catcode\barasciicode\othercatcode \permanent\gdef\tabl_table_bar{|}
+ \catcode\barasciicode\activecatcode\gdef\tabl_table_use_bar{\enforced\let|\tabl_table_bar}
+\egroup
+
+\bgroup \catcode\barasciicode\othercatcode
+
+\gdef\tabl_tables_get_nofcolumns#1% todo: also divert this to lua as with tabulate
+ {\bgroup
+ \cleanupfeatures % needed !
+ \tabl_table_use_bar
+ \egroup}
+
+\egroup
+
+%D \startitemize[3*ruim]
+%D \sym{\type{\VL}} a vertical line
+%D \sym{\type{\VC}} a vertical colored line
+%D \sym{\type{\HL}} a horizontal line
+%D \sym{\type{\HC}} a horizontal colored line
+%D \stopitemize
+
+\newcount\c_tabl_table_vrule_thickness_factor
+\newcount\c_tabl_table_hrule_thickness_factor
+\newcount\c_tabl_table_drule_span
+
+\let\m_tabl_table_vrule_color\empty
+\let\m_tabl_table_hrule_color\empty
+
+\appendtoks
+ \enforced\let\VL\tabl_table_VL
+ \enforced\let\VC\tabl_table_VC
+ \enforced\let\HL\tabl_table_HL
+ \enforced\let\HC\tabl_table_HC
+ \enforced\let\VS\tabl_table_VS
+ \enforced\let\VD\tabl_table_VD
+ \enforced\let\VT\tabl_table_VT
+ \enforced\let\VN\tabl_table_VN
+\to \localtabledefinitions
+
+\def\tabl_table_resetVLvalues
+ {\global\currenttablecolumn\zerocount}
+
+\def\tabl_table_vrulecommand#1% global assignments
+ {\doifelsenumber{#1}
+ {\global\c_tabl_table_vrule_thickness_factor#1\relax
+ \global\multiply\c_tabl_table_vrule_thickness_factor\m_tabl_table_VLwidth\relax}
+ {\xdef\m_tabl_table_vrule_color{#1}}}
+
+\permanent\tolerant\protected\def\tabl_table_VL[#1]%
+ {\tabl_tables_check_auto_row
+ \global\advance\currenttablecolumn\plusone
+ \glet\m_tabl_table_vrule_color\empty
+ \global\c_tabl_table_vrule_thickness_factor\m_tabl_table_VLwidth\relax
+ \iftok{#1}\emptytoks\else
+ \rawprocesscommalist[#1]\tabl_table_vrulecommand
+ \fi
+ \tabl_table_normal_line_complex_bar}% \relax breaks \use
+
+\permanent\let\tabl_table_VC\tabl_table_VL % for mojca
+
+% \starttable[|||]
+% \HL
+% \VL test \VS test \VL \FR
+% \VL test \VD test \VL \MR
+% \VL test \VT test \VL \LR
+% \HL
+% \stoptable
+
+\permanent\protected\def\tabl_table_VS {\VN1}
+\permanent\protected\def\tabl_table_VD {\VN2}
+\permanent\protected\def\tabl_table_VT {\VN3}
+\permanent\protected\def\tabl_table_VN#1{\global\c_tabl_table_n_of_vrules#1\relax\VL}
+
+\def\tabl_table_hrulecommand#1% global assignments
+ {\doifelsenumber{#1}
+ {\global\c_tabl_table_hrule_thickness_factor#1\relax
+ \global\multiply\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax}
+ {\xdef\m_tabl_table_hrule_color{#1}}}
+
+\permanent\tolerant\protected\def\tabl_table_HL[#1]%
+ {\tabl_tables_chuck_auto_row
+ \tabl_table_finish_row
+ \noalign\bgroup
+ \nobreak
+ \ifnum\tableactionstate=\tablerulestate
+ \writestatus\m!TABLE{skipping \string\HL}% \statusmessage
+ \else
+ \ifnum\tableactionstate=\tablemidrowstate
+ \writestatus\m!TABLE{change \string\MR\space into \string\LR/\string\SR}%
+ \orelse\ifnum\tableactionstate=\tablefirstrowstate
+ \writestatus\m!TABLE{change \string\MR\space into \string\SR}%
+ \fi
+ \bgroup
+ \global\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax
+ \ifparameter#1\or
+ \glet\m_tabl_table_hrule_color\empty
+ \rawprocesscommalist[#1]\tabl_table_hrulecommand
+ \ifempty\m_tabl_table_hrule_color\else
+ \switchtocolor[\m_tabl_table_hrule_color]%
+ \fi
+ \fi
+ \tabl_table_normal_full_rule
+ \egroup
+ \tabl_table_account_width
+ \fi
+ \tabl_table_set_action\tablerulestate
+ \nobreak
+ \egroup}
+
+\aliased\let\tabl_table_HC\tabl_table_HL % for mojca
+
+%D \startitemize[3*ruim]
+%D \sym{\type{\NL}} a vertical skip
+%D \sym{\type{\NR}} goto the next row
+%D \sym{\type{\NC}} goto the next column
+%D \sym{\type{\FC}} a first column
+%D \sym{\type{\MC}} a mid column
+%D \sym{\type{\LC}} a last column
+%D \stopitemize
+
+% \starttable[|||]
+% \VL text \VL text \VL \AR
+% \TB[small]
+% \VL text \VL text \VL \AR
+% \TB[4*big]
+% \VL text \VL text \VL \AR
+% \stoptable
+
+% n+1 uitleggen
+
+\appendtoks
+ \enforced\let\TB\tabl_table_TB
+ \enforced\let\NL\tabl_table_NL % old
+ \enforced\let\NR\tabl_table_NR
+ \enforced\let\NC\tabl_table_NC
+ \enforced\let\FC\tabl_table_NC
+ \enforced\let\MC\tabl_table_NC
+ \enforced\let\LC\tabl_table_NC
+\to \localtabledefinitions
+
+\permanent\tolerant\protected\def\tabl_table_TB[#1]%
+ {\tabl_tables_chuck_auto_row
+ \tabl_table_finish_row
+ \noalign\bgroup
+ \blank[\iftok{#1}\emptytoks\directtablesparameter\c!NL\else#1\fi]%
+ \nobreak
+ \egroup}
+
+\aliased\let\tabl_table_NL\tabl_table_TB
+
+\protected\def\tabl_table_NR
+ {\global\currenttablecolumn\zerocount
+ \tabl_table_normal_line_ending
+ \noalign\bgroup
+ \nobreak
+ \tabl_table_set_action\tableunknownstate
+ \egroup}
+
+\protected\def\tabl_table_NC
+ {\tabl_tables_check_auto_row
+ \global\advance\currenttablecolumn \plusone
+ \tabl_table_normal_no_bar}
+
+%D \startitemize[3*broad]
+%D \sym{\type{\DL}}
+%D \sym{\type{\DV}} (\type{\VD})
+%D \sym{\type{\DC}}
+%D \sym{\type{\DR}}
+%D \stopitemize
+
+\newconditional\c_tabl_table_is_division
+
+\appendtoks
+ \global\setfalse\c_tabl_table_is_division
+ \enforced\let\DL\tabl_table_DL
+ \enforced\let\DC\tabl_table_DC
+ \enforced\let\DV\tabl_table_DV
+ \enforced\let\DR\tabl_table_DR
+\to \localtabledefinitions
+
+\def\tabl_table_check_division
+ {\ifconditional\c_tabl_table_is_division\else
+ \tabl_tables_chuck_auto_row
+ \global\currenttablecolumn\zerocount
+ \global\settrue\c_tabl_table_is_division
+ \fi}
+
+\def\tabl_table_drulecommand#1% global assignments
+ {\doifelsenumber{#1}
+ {\ifcase\c_tabl_table_drule_span
+ \global\c_tabl_table_drule_span#1\relax
+ \else
+ \global\c_tabl_table_hrule_thickness_factor#1\relax
+ \global\multiply\c_tabl_table_hrule_thickness_factor\m_tabl_table_VLwidth\relax
+ \fi}
+ {\xdef\m_tabl_table_hrule_color{#1}}}
+
+\permanent\tolerant\protected\def\tabl_table_DL[#1]%
+ {\tabl_table_check_division
+ \ifnum\tableactionstate=\tablerulestate
+ \writestatus\m!TABLE{skipping \string\DL}%
+ \else
+ \ifnum\tableactionstate=\tablemidrowstate
+ \writestatus\m!TABLE{change \string\MR\space into \string\LR/\string\SR}%
+ \orelse\ifnum\tableactionstate=\tablefirstrowstate
+ \writestatus\m!TABLE{change \string\MR\space into \string\SR}%
+ \fi
+ \tabl_table_set_action\tableunknownstate
+ \global\c_tabl_table_hrule_thickness_factor\m_tabl_table_HLheight\relax
+ \global\c_tabl_table_drule_span\zerocount
+ \iftok{#1}\emptytoks\else
+ \glet\m_tabl_table_hrule_color\empty
+ \rawprocesscommalist[#1]\tabl_table_drulecommand
+ % \ifempty\m_tabl_table_hrule_color\else
+ % \switchtocolor[\m_tabl_table_hrule_color]% see *DL*
+ % \fi
+ \fi
+ \ifcase\c_tabl_table_drule_span
+ \global\advance\currenttablecolumn \plusone
+ \tabl_table_normal_single_rule
+ \or
+ \global\advance\currenttablecolumn \plustwo
+ \tabl_table_normal_single_rule
+ \else
+ \global\advance\currenttablecolumn \plusone
+ \tabl_table_normal_multi_rule
+ \fi
+ \fi}
+
+\permanent\protected\def\tabl_table_DV
+ {\tabl_table_DCV\tabl_table_normal_line_simple_bar}
+
+\permanent\protected\def\tabl_table_DC
+ {\tabl_table_DCV\tabl_table_normal_no_bar}
+
+\permanent\protected\def\tabl_table_DCV#1%
+ {\tabl_table_check_division
+ \tabl_tables_check_auto_row
+ \global\advance\currenttablecolumn \plusone
+ #1}
+
+\permanent\protected\def\tabl_table_DR
+ {\global\currenttablecolumn\zerocount % nog check
+ \tabl_table_normal_line_ending
+ \noalign\bgroup
+ \nobreak
+ \global\setfalse\c_tabl_table_is_division
+ \tabl_table_account_width % temporary solution
+ \tabl_table_set_action\tablerulestate
+ \egroup}
+
+\def\tabl_table_account_width
+ {\scratchdimen\d_tabl_table_line_thickness_unit}
+
+\permanent\def\tabl_table_TWO {\use\plustwo}
+\permanent\def\tabl_table_THREE{\use\plusthree}
+\permanent\def\tabl_table_FOUR {\use\plusfour}
+\permanent\def\tabl_table_FIVE {\use\plusfive}
+\permanent\def\tabl_table_SIX {\use\plussix}
+
+\aliased\let\LOW \relax
+\aliased\let\TWO \relax
+\aliased\let\THREE\relax
+\aliased\let\FOUR \relax
+\aliased\let\FIVE \relax
+\aliased\let\SIX \relax
+\aliased\let\SPAN \relax
+\aliased\let\REF \relax
+
+\appendtoks
+ \enforced\let\TWO \tabl_table_TWO
+ \enforced\let\THREE\tabl_table_THREE
+ \enforced\let\FOUR \tabl_table_FOUR
+ \enforced\let\FIVE \tabl_table_FIVE
+ \enforced\let\SIX \tabl_table_SIX
+ \enforced\let\SPAN \use
+ \enforced\let\REF \tabl_table_reformat
+\to \localtabledefinitions
+
+\installcorenamespace{tables}
+\installcorenamespace{tabledistance}
+\installcorenamespace{tablealign}
+
+\installsetuponlycommandhandler \??tables {tables} % some day we can have named tables
+
+\defcsname\??tabledistance\v!none \endcsname{\tabl_table_OpenUp00\enforced\def\LOW{\Lower6 }}
+\defcsname\??tabledistance\v!small \endcsname{\tabl_table_OpenUp00\enforced\def\LOW{\Lower6 }} % == baseline
+\defcsname\??tabledistance\v!medium\endcsname{\tabl_table_OpenUp11\enforced\def\LOW{\Lower7 }}
+\defcsname\??tabledistance\v!big \endcsname{\tabl_table_OpenUp22\enforced\def\LOW{\Lower8 }}
+
+\appendtoks
+ \expandnamespaceparameter\??tabledistance\directtablesparameter\c!distance\v!medium
+\to \localtabledefinitions
+
+\defcsname\??tablealign\v!right \endcsname{\def\tabl_table_paralignment{\raggedright}}
+\defcsname\??tablealign\v!left \endcsname{\def\tabl_table_paralignment{\raggedleft}}
+\defcsname\??tablealign\v!middle \endcsname{\def\tabl_table_paralignment{\raggedcenter}}
+\defcsname\??tablealign\s!unknown\endcsname{\def\tabl_table_paralignment{\notragged}}
+
+\appendtoks
+ \doifelse{\directtablesparameter\c!distance}\v!none
+ {\tablerowfactor\zerocount}
+ {\tablerowfactor\plustwo }%
+\to \localtabledefinitions
+
+\appendtoks
+ \expandnamespaceparameter\??tablealign\directtablesparameter\c!align\s!unknown
+ \assignalfadimension{\directtablesparameter\c!VL}\m_tabl_table_VLwidth 246%
+ \assignalfadimension{\directtablesparameter\c!HL}\m_tabl_table_HLheight246%
+\to \everysetuptables
+
+\def\tabl_table_local_setups
+ {\directtablesparameter\c!commands\relax
+ \usebodyfontparameter\directtablesparameter
+ \d_tabl_table_line_thickness_unit\dimexpr\directtablesparameter\c!rulethickness/\tablelinethicknessfactor\relax
+ \edef\p_tabl_table_height{\directtablesparameter\c!height}%
+ \edef\p_tabl_table_depth{\directtablesparameter\c!depth}%
+ \ifx\p_tabl_table_height\v!strut
+ \let\tablestrutheightfactor\tablestrutheightfactor
+ \else
+ \let\tablestrutheightfactor\p_tabl_table_height
+ \fi
+ \ifx\p_tabl_table_depth\v!strut
+ \let\tablestrutdepthfactor\tablestrutdepthfactor
+ \else
+ \let\tablestrutdepthfactor\p_tabl_table_depth
+ \fi
+ \edef\tablestrutheightfactor{\withoutpt\the\dimexpr10\dimexpr\tablestrutheightfactor\points}%
+ \edef\tablestrutdepthfactor {\withoutpt\the\dimexpr10\dimexpr\tablestrutdepthfactor \points}%
+ \d_tabl_table_strut_unit \dimexpr\normalbaselineskip/12\relax % 12 is default bodyfont
+ \d_tabl_table_kern_unit .5em\relax
+ \s_tabl_table_inter_column_space_unit.5em plus 1fil minus .25em\relax
+ \d_tabl_table_column_width_unit \d_tabl_table_kern_unit
+ \d_tabl_table_kern_unit \d_tabl_table_kern_unit}
+
+%D As one can see, we didn't only add color, but also more control over spacing.
+%D
+%D \startbuffer[a]
+%D \starttable[|c|]
+%D \HL
+%D \VL \strut test \VL \FR
+%D \VL \strut test \VL \MR
+%D \VL \strut test \VL \MR
+%D \VL \strut test \VL \LR
+%D \HL
+%D \stoptable
+%D \stopbuffer
+%D
+%D \startbuffer[b]
+%D \starttabulate[|c|]
+%D \HL
+%D \NC test \NC \NR
+%D \NC test \NC \NR
+%D \NC test \NC \NR
+%D \NC test \NC \NR
+%D \HL
+%D \stoptabulate
+%D \stopbuffer
+%D
+%D In the next example, the first table is defined as:
+%D
+%D \typebuffer[a]
+%D
+%D and the second one as:
+%D
+%D \typebuffer[b]
+%D
+%D The first table is typeset using the default height and depth factors .8 and .4.
+%D The second table has both factors set to \type {strut}, and the third table shows
+%D what happens when we set the values to zero. The rightmost table is typeset using
+%D the tabulate environment.
+%D
+%D \startcombination[4*1]
+%D {$\vcenter{\getbuffer[a]}$}
+%D {\hbox{h=.8 d=.4}}
+%D {\setuptables[height=strut,depth=strut]$\vcenter{\getbuffer[a]}$}
+%D {\hbox{h=d=\type{strut}}}
+%D {\setuptables[height=0,depth=0]$\vcenter{\getbuffer[a]}$}
+%D {\hbox{h=d=0}}
+%D {$\vcenter{\getbuffer[b]}$}
+%D {\hbox{tabulate}}
+%D \stopcombination
+
+\setuptables
+ [\c!HL=\v!medium,
+ \c!VL=\v!medium,
+ \c!NL=\v!small,
+ \c!frame=,
+ \c!align=\v!right,
+ \c!depth=.40, % \v!strut
+ \c!height=.80, % \v!strut
+ \c!textwidth=,
+ \c!rulethickness=\linewidth,
+ \c!rulecolor=,
+ \c!distance=\v!medium,
+ \c!bodyfont=,
+ \c!commands=,
+ \c!background=,
+ \c!backgroundcolor=,
+ \c!split=\v!auto,
+ \c!openup=\zeropoint]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-tbl.mkxl
index dc8ae0214c4..88cd791e488 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/tabl-tbl.mkxl
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-tbl.mkxl
@@ -219,22 +219,24 @@
\newconstant \c_tabl_tabulate_pass
\newconstant \c_tabl_tabulate_type
\newconstant \c_tabl_tabulate_kind % 1=strong 2=equals
-\newconstant \c_tabl_tabulate_splitlinemode \c_tabl_tabulate_splitlinemode\plusone
+\newconstant \c_tabl_tabulate_splitlinemode \c_tabl_tabulate_splitlinemode\plusone
\newconstant \c_tabl_tabulate_colorspan
\newconstant \c_tabl_tabulate_localcolorspan
\newconstant \c_tabl_tabulate_modus
-\let\tabulatesplitlinemode\c_tabl_tabulate_splitlinemode % temp hack, we need an interface
+%newconditional \c_tabl_pre_is_set
+\newconditional \c_tabl_post_is_set
\let \m_tabl_tabulate_separator_factor \empty % fraction
+\aliased\let\tabulatesplitlinemode\c_tabl_tabulate_splitlinemode % temp hack, we need an interface
+
\newtoks \everytabulatepar % where used ?
\newtoks \everytabulate % public ?
-\unexpanded\def\tolerantTABLEbreaktrue {\settrue \c_tabl_tabulate_tolerant_break} % used in styles !
-\unexpanded\def\handletabulatepbreakfalse{\setfalse\c_tabl_tabulate_handlepbreak } % depricated
+\permanent\protected\def\tolerantTABLEbreaktrue{\settrue\c_tabl_tabulate_tolerant_break} % used in styles !
-\def\noftabulaterows{\number\c_tabl_tabulate_noflines} % handy for testing if a table is empty
+\permanent\def\noftabulaterows{\number\c_tabl_tabulate_noflines} % handy for testing if a table is empty
\installcorenamespace{tabulatebox}
\installcorenamespace{tabulatesetup}
@@ -260,10 +262,10 @@
\to \t_tabl_tabulate_initializers_second
\prependtoks
- \global\advance\c_tabl_tabulate_nofrealrows\plusone
+ \global\advance\c_tabl_tabulate_nofrealrows\plusone
\to \t_tabl_tabulate_every_real_row
-\def\b_tabl_tabulate_current#1%
+\permanent\def\b_tabl_tabulate_current#1%
{\csname\??tabulatebox\number#1\endcsname} % beware, a synonym
\def\tabl_tabulate_initialize_boxes#1%
@@ -289,28 +291,10 @@
\tabl_tabulate_initialize_boxes{16} % not really needed
-\let\initializetablebox \tabl_tabulate_initialize_box % used elsewhere, will change
-\let\initializetableboxes\tabl_tabulate_initialize_boxes % used elsewhere, will change
-\let\tablebox \b_tabl_tabulate_current
-
% 0 = NC column next EQ equal column
% 1 = RC column raw RQ equal column raw
% 2 = HC column hook HQ equal column hook
-% handy helper
-
-\def\tabulatenoalign % public ?
- {\noalign
- \bgroup
- \let\noalign\relax
- \let\tabulatenoalign\relax
- \let\next=}
-
-\def\starttabulatenoalign % public ?
- {\tabulatenoalign\bgroup}
-
-\let\stoptabulatenoalign\egroup
-
% [|lg{.}|] => \NG 12.34 \NC
\def\tabl_tabulate_nobreak_inject_tracer
@@ -332,22 +316,22 @@
\tabl_tabulate_break_no_tracer}
\def\tabl_tabulate_nobreak_inject
- {\tabulatenoalign{\tabl_tabulate_nobreak_inject_indeed}}
+ {\noalign{\tabl_tabulate_nobreak_inject_indeed}}
-\unexpanded\def\tabl_tabulate_hook_check
+\protected\def\tabl_tabulate_hook_check
{\ifnum\c_tabl_tabulate_type<\plustwo
\glet\tabl_tabulate_hook\tabl_tabulate_hook_nop
\else
\glet\tabl_tabulate_hook\tabl_tabulate_hook_yes
\fi}
-\unexpanded\def\tabl_tabulate_setups_check
+\protected\def\tabl_tabulate_setups_check
{\begincsname\??tabulatesetup\the\c_tabl_tabulate_column\endcsname}
-\unexpanded\def\tabl_tabulate_entry_before{\ignorespaces\tabl_tabulate_hook}
-\unexpanded\def\tabl_tabulate_entry_after {\unskip\unskip\ifmmode\else\endgraf\fi}
+\protected\def\tabl_tabulate_entry_before{\ignorespaces\tabl_tabulate_hook}
+\protected\def\tabl_tabulate_entry_after {\unskip\unskip\ifmmode\else\endgraf\fi}
-\unexpanded\def\tabl_tabulate_shaped_par_begin
+\protected\def\tabl_tabulate_shaped_par_begin
{\dowithnextboxcs\tabl_tabulate_shaped_par_finish\vbox\bgroup}
\def\tabl_tabulate_shaped_par_finish
@@ -356,15 +340,15 @@
\let\tabl_tabulate_shaped_par_end\egroup
-\ifdefined\dotagtabulatecell \else \let\dotagtabulatecell \relax \fi
-\ifdefined\dotagtabulatesignal \else \let\dotagtabulatesignal\relax \fi
+\ifdefined\dotagtabulatecell \else \aliased\let\dotagtabulatecell \relax \fi
+\ifdefined\dotagtabulatesignal \else \aliased\let\dotagtabulatesignal\relax \fi
-\unexpanded\def\tabl_tabulate_check_local_color_first#1#2%
+\protected\def\tabl_tabulate_check_local_color_first#1#2%
{\relax}
-\unexpanded\def\tabl_tabulate_check_local_color_second#1#2%
+\protected\def\tabl_tabulate_check_local_color_second#1#2%
{\relax
- \ifx\m_tabl_tabulate_color_local\empty
+ \ifempty\m_tabl_tabulate_color_local
\xdef\m_tabl_tabulate_color{#1}%
\else
\glet\m_tabl_tabulate_color\m_tabl_tabulate_color_local
@@ -377,7 +361,7 @@
\global\c_tabl_tabulate_localcolorspan\zerocount
\fi}
-\unexpanded\def\tabl_tabulate_check_local_vrule_thickness#1%
+\protected\def\tabl_tabulate_check_local_vrule_thickness#1%
{\relax
\ifcase\d_tabl_tabulate_vrulethickness_local
\global\d_tabl_tabulate_vrulethickness#1\relax
@@ -386,12 +370,12 @@
\global\d_tabl_tabulate_vrulethickness_local\zeropoint
\fi}
-\unexpanded\def\tabl_tabulate_check_local_vrule_color_first#1%
+\protected\def\tabl_tabulate_check_local_vrule_color_first#1%
{\relax}
-\unexpanded\def\tabl_tabulate_check_local_vrule_color_second#1%
+\protected\def\tabl_tabulate_check_local_vrule_color_second#1%
{\relax
- \ifx\m_tabl_tabulate_vrule_color_local\empty
+ \ifempty\m_tabl_tabulate_vrule_color_local
\xdef\m_tabl_tabulate_vrule_color{#1}%
\else
\glet\m_tabl_tabulate_vrule_color\m_tabl_tabulate_vrule_color_local
@@ -411,7 +395,7 @@
\let\tabl_tabulate_check_local_vrule_color\tabl_tabulate_check_local_vrule_color_second
\to \t_tabl_tabulate_initializers_second
-% \unexpanded % we can expand this one
+% \protected % we can expand this one
\def\tabl_tabulate_inject_pre_skip#1%
{\ifdim#1>\zeropoint
\kern#1\relax % was \hskip
@@ -423,10 +407,10 @@
\fi
\fi}
-% \unexpanded % we can expand this one
-\def\tabl_tabulate_inject_post_skip#1%
+% \protected % we can expand this one
+\def\tabl_tabulate_inject_post_skip#1#2%
{\ifdim#1>\zeropoint
- \kern#1\relax % was \hskip
+ \kern\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns#2\else#1\fi\relax
\orelse\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns
\ifconditional\c_tabl_tabulate_autorulespacing
\ifcase\c_tabl_tabulate_has_rule_spec_last\else
@@ -475,7 +459,7 @@
\bgroup % we cannot combine the if because a cell may have only one ##
\tabl_tabulate_hook_b
\c_tabl_tabulate_align\constantnumber\c_tabl_tabulate_align % needed in tag passing
- \ifx\m_tabl_tabulate_alignment\empty \else
+ \ifempty\m_tabl_tabulate_alignment \else
\spac_align_use_now{\m_tabl_tabulate_alignment}%
\fi
\noexpand\dostarttagged\noexpand\t!tabulatecell\noexpand\empty
@@ -490,10 +474,10 @@
\the\t_tabl_tabulate_font
\the\t_tabl_tabulate_settings
\the\t_tabl_tabulate_before
- \ifx\m_tabl_tabulate_text_color\empty
+ \ifempty\m_tabl_tabulate_text_color
\expandafter\gobbleoneargument
\else
- \expandafter\dofastcoloractivation
+ \expandafter\colo_helpers_direct_activate
\fi\m_tabl_tabulate_text_color
\noexpand\fi
% grouping needs to be outside macros (or expandable), nice test
@@ -516,7 +500,9 @@
\egroup
\aligntab
\noexpand\dostoptagged
- \tabl_tabulate_inject_post_skip{\the\dimexpr\s_tabl_tabulate_post}% get rid of plus
+ \tabl_tabulate_inject_post_skip
+ {\the\ifconditional\c_tabl_post_is_set\s_tabl_tabulate_post\else\s_tabl_tabulate_last\fi}%
+ {\the\s_tabl_tabulate_post}%
\alignmark\alignmark
}%
\toksapp\t_tabl_tabulate_dummy{\NC}%
@@ -527,10 +513,12 @@
\s_tabl_tabulate_post\zeropoint
\fi
%\let\gettabulateexit\dogettabulateexit % still needed ?
- \d_tabl_tabulate_width\zeropoint}
+ \d_tabl_tabulate_width\zeropoint
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set}
-\unexpanded\def\installtabulatepreambleoption#1#2%
- {\setvalue{\??tabulatepreamble\string#1}{#2}}%
+\permanent\protected\def\installtabulatepreambleoption#1#2%
+ {\defcsname\??tabulatepreamble\string#1\endcsname{#2}}%
\installtabulatepreambleoption{x}{\c_tabl_tabulate_align\zerocount
\tabl_tabulate_set_preamble} % internal
@@ -589,26 +577,11 @@
%D Also, as there is always a key, we no longer do some after assigment or future
%D let but just pick up the key.
-% \installtabulatepreambleoption \s!unknown %
-% {\writestatus{tabulate}{unknown preamble key [\normalmeaning\next]}%
-% \tabl_tabulate_set_preamble}
-%
-% \def\tabl_tabulate_set_preamble
-% {\afterassignment\dosettabulatepreamble\let\next=}
-%
-% \def\dosettabulatepreamble
-% {\ifx\next\relax \else
-% \csname\??tabulatepreamble
-% \ifcsname\??tabulatepreamble\next\endcsname\next\else\s!unknown\fi
-% \expandafter\endcsname
-% \fi}
-
\installtabulatepreambleoption\relax
{} % finished
\def\tabl_tabulate_set_preamble#1%
{\ifcsname\??tabulatepreamble\string#1\endcsname
- %\expandafter\tabl_tabulate_set_preamble_yes
\expandafter\expandafter\expandafter\lastnamedcs\expandafter\gobbleoneargument
\else
\expandafter\tabl_tabulate_set_preamble_nop
@@ -622,26 +595,30 @@
\tabl_tabulate_set_preamble}
\def\tabl_tabulate_set_preskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_posskip#1%
- {\doifelsenumber{#1}%
+ {\settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_post#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_post.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_preposskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_setups#1%
- {\setvalue{\??tabulatesetup\the\c_tabl_tabulate_columns}{\setups[#1]}%
+ {\defcsname\??tabulatesetup\the\c_tabl_tabulate_columns\endcsname{\setups[#1]}%
\tabl_tabulate_set_preamble}
\def\tabl_tabulate_set_hook#1%
- {\setvalue{\??tabulatehook\the\c_tabl_tabulate_columns}{#1}%
+ {\defcsname\??tabulatehook\the\c_tabl_tabulate_columns\endcsname{#1}%
\tabl_tabulate_set_preamble}
% begin of character align plugin
@@ -740,7 +717,7 @@
% \global\advance\d_tabl_tabulate_width_p\d_tabl_tabulate_width % accumulated parwidth
% \fi
% \tabl_tabulate_set_preamble}
-%
+
\def\tabl_tabulate_set_raggedright {\ifnum\c_tabl_tabulate_type=\plusone \else\raggedright \fi}
\def\tabl_tabulate_set_raggedcenter{\ifnum\c_tabl_tabulate_type=\plusone \else\raggedcenter\fi}
\def\tabl_tabulate_set_raggedleft {\ifnum\c_tabl_tabulate_type=\plusone \else\raggedleft \fi}
@@ -778,16 +755,16 @@
% \def\tabl_tabulate_set_color_span#1#2%
% {\xdef\m_tabl_tabulate_color{#2}%
-% \global\c_tabl_tabulate_colorspan\if#1L\plusone\else\if#1M\plustwo\else\if#1R\plusthree\else\zerocount\fi\fi\fi\relax
+% \global\c_tabl_tabulate_colorspan\if#1L\plusone\orelse\if#1M\plustwo\orelse\if#1R\plusthree\else\zerocount\fi\relax
% \tabl_tabulate_set_preamble}
\installcorenamespace{tabulatecolorspec}
-\setvalue{\??tabulatecolorspec C}#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\zerocount}
-\setvalue{\??tabulatecolorspec L}#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\plusone }
-\setvalue{\??tabulatecolorspec M}#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\plustwo }
-\setvalue{\??tabulatecolorspec R}#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\plusthree}
-\setvalue{\??tabulatecolorspec T}#1{\xdef\m_tabl_tabulate_text_color{#1}}
+\defcsname\??tabulatecolorspec C\endcsname#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\zerocount}
+\defcsname\??tabulatecolorspec L\endcsname#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\plusone }
+\defcsname\??tabulatecolorspec M\endcsname#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\plustwo }
+\defcsname\??tabulatecolorspec R\endcsname#1{\xdef\m_tabl_tabulate_color {#1}\global\c_tabl_tabulate_colorspan\plusthree}
+\defcsname\??tabulatecolorspec T\endcsname#1{\xdef\m_tabl_tabulate_text_color{#1}}
\def\tabl_tabulate_set_color_span#1#2%
{\csname\??tabulatecolorspec#1\endcsname{#2}%
@@ -798,11 +775,13 @@
{\global\d_tabl_tabulate_vrulethickness#1\d_tabl_tabulate_vrulethickness_default}
{\xdef\m_tabl_tabulate_vrule_color{#1}}}
-\def\tabl_tabulate_set_entry#1#2% rulespec template
+\permanent\protected\def\tabl_tabulate_set_entry#1#2% rulespec template
{\c_tabl_tabulate_align\v_tabl_tabulate_align
\c_tabl_tabulate_modus\zerocount
\setfalse\c_tabl_tabulate_pwidth_set
\setfalse\c_tabl_tabulate_reshape
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set
\t_tabl_tabulate_before\emptytoks
\t_tabl_tabulate_after\emptytoks
\t_tabl_tabulate_bmath\emptytoks
@@ -816,12 +795,12 @@
\global\c_tabl_tabulate_colorspan\zerocount
\global\setfalse\c_tabl_auto_align_mode
\global\advance\c_tabl_tabulate_columns\plusone
- \expandafter\let\csname\??tabulatesetup\the\c_tabl_tabulate_columns\endcsname\donothing % here ?
- \edef\currenttabulationtrulespec{#1}%
- \ifx\currenttabulationtrulespec\empty
+ \letcsname\??tabulatesetup\the\c_tabl_tabulate_columns\endcsname\donothing % here ?
+ \iftok{#1}\emptytoks
\global\d_tabl_tabulate_vrulethickness\zeropoint
\else
\global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default
+ % the lmtx raw processor handles {} like the normal one so we need to prune
\rawprocesscommalist[#1]\tabl_tabulate_set_vrule_command
\fi
\tabl_tabulate_set_preamble#2\relax\relax % permits i without n
@@ -835,11 +814,10 @@
\tabl_tabulate_set_width_simple
\fi}
-\def\tabl_tabulate_set_last_entry#1% rulespec
+\permanent\protected\def\tabl_tabulate_set_last_entry#1% rulespec
{\glet\m_tabl_tabulate_color\empty
\glet\m_tabl_tabulate_vrule_color\empty
- \edef\currenttabulationtrulespec{#1}%
- \ifx\currenttabulationtrulespec\empty
+ \iftok{#1}\emptytoks
\global\d_tabl_tabulate_vrulethickness\zeropoint
\else
\global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default
@@ -850,8 +828,8 @@
\tabl_tabulate_check_local_vrule_color\constantemptyargument\m_tabl_tabulate_vrule_color
\tabl_tabulate_column_vrule_inject}}
-\let\settabulateentry \tabl_tabulate_set_entry % used at the lua end
-\let\settabulatelastentry\tabl_tabulate_set_last_entry % used at the lua end
+\aliased\let\settabulateentry \tabl_tabulate_set_entry % used at the lua end
+\aliased\let\settabulatelastentry\tabl_tabulate_set_last_entry % used at the lua end
\def\tabl_tabulate_normalize_splitline
{\ifcase\c_tabl_tabulate_splitlinemode
@@ -904,7 +882,7 @@
\tabl_tabulate_check_linenumbers
\box\b_tabl_tabulate}
-\unexpanded\def\tabl_tabulate_hook_nop
+\protected\def\tabl_tabulate_hook_nop
{}
\let\tabl_tabulate_hook\tabl_tabulate_hook_nop
@@ -943,12 +921,12 @@
\fi}
\def\tabl_tabulate_pbreak_check
- {\starttabulatenoalign
+ {\noalign\bgroup
\tabl_tabulate_pbreak_inject
\ifconditional\c_tabl_tabulate_splitoff_whitespace
\tabl_tabulate_whitespace
\fi
- \stoptabulatenoalign}
+ \egroup}
%D \startbuffer
%D \starttabulate[|c|p|p|]
@@ -1038,48 +1016,46 @@
%\c!title=,
\c!indenting=\v!no]
-\unexpanded\def\definetabulate
- {\dotripleempty\tabl_tabulate_define}
-
-\def\tabl_tabulate_define[#1][#2][#3]%
- {\ifthirdargument
+\permanent\tolerant\protected\def\definetabulate[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ % ignore
+ \or
+ % [tag]
+ \definetabulation[#1][\c!format={|l|p|},\s!check=]%
+ \or
+ % [tag] [template]
+ \definetabulation[#1][\c!format={#2},\s!check=]%
+ \or
% [tag] [sub] [template]
\ifcsname\namedtabulationhash{#1}\s!check\endcsname \else
\definetabulation[#1][\c!format={#3},\s!check=]%
\fi
\definetabulation[#1:#2][#1][\c!format={#3},\s!check=]%
- \orelse\ifsecondargument
- % [tag] [template]
- \definetabulation[#1][\c!format={#2},\s!check=]%
- \else
- % [tag]
- \definetabulation[#1][\c!format={|l|p|},\s!check=]%
\fi}
-\unexpanded\def\setuptabulate
- {\dotripleempty\tabl_tabulate_setup}
-
-\def\tabl_tabulate_setup[#1][#2][#3]%
- {\ifthirdargument
- % [tag] [sub] [settings]
- \setuptabulation[#1:#2][#3]%
- \orelse\ifsecondargument
- % [tag] [settings]
- \setuptabulation[#1][#2]%
- \else
+\permanent\tolerant\protected\def\setuptabulate[#1]#*[#2]#*[#3]%
+ {\ifarguments
+ % ignore
+ \or
% [tag]
\setuptabulation[#1]%
+ \or
+ % [tag] [settings]
+ \setuptabulation[#1][#2]%
+ \or
+ % [tag] [sub] [settings]
+ \setuptabulation[#1:#2][#3]%
\fi}
\appendtoks
- \setuevalue{\e!start\currenttabulation}{\tabl_start_defined[\currenttabulation]}%
- \letvalue{\e!stop\currenttabulation}\relax
- \letvalue{\??tabulatehead\currenttabulation}\empty
- \letvalue{\??tabulatefoot\currenttabulation}\empty
+ \enforced\permanent\protected\edefcsname\e!start \currenttabulation\endcsname{\tabl_start_defined[\currenttabulation]}%
+ \enforced\aliased \letcsname \e!stop \currenttabulation\endcsname\relax
+ \enforced\aliased \letcsname \??tabulatehead\currenttabulation\endcsname\empty
+ \enforced\aliased \letcsname \??tabulatefoot\currenttabulation\endcsname\empty
\to \everydefinetabulation
-\let\tabulateparameter\tabulationparameter % will stay for a while
-\def\currenttabulate {\currenttabulation} % will stay for a while
+\aliased \let\tabulateparameter\tabulationparameter % will stay for a while
+\permanent\def\currenttabulate {\currenttabulation} % will stay for a while
% Here begins the implementation.
@@ -1088,19 +1064,20 @@
\let\tabl_tabulate_insert_foot\empty
\def\tabl_tabulate_insert_head_content
- {\tabulatenoalign{\global\settrue\c_tabl_tabulate_someamble}%
+ {\noalign{\global\settrue\c_tabl_tabulate_someamble}%
\begincsname\??tabulatehead\currenttabulation\endcsname
- \tabulatenoalign{\global\setfalse\c_tabl_tabulate_someamble}}%
+ \noalign{\global\setfalse\c_tabl_tabulate_someamble}}%
\def\tabl_tabulate_insert_foot_content
- {\tabulatenoalign{\global\settrue\c_tabl_tabulate_someamble}%
+ {\noalign{\global\settrue\c_tabl_tabulate_someamble}%
\begincsname\??tabulatefoot\currenttabulation\endcsname
- \tabulatenoalign{\global\setfalse\c_tabl_tabulate_someamble}}%
+ \noalign{\global\setfalse\c_tabl_tabulate_someamble}}%
\def\tabl_tabulate_check_full_content % - needed, else confusion with \c!header
{\ifcsname\??tabulatehead\currenttabulation\endcsname
- %\expandafter\ifx\csname\??tabulatehead\currenttabulation\endcsname\empty
- \expandafter\ifx\lastnamedcs\empty
+ %\expandafter\ifempty\csname\??tabulatehead\currenttabulation\endcsname
+ %\expandafter\ifempty\lastnamedcs
+ \ifempty\lastnamedcs
\let\tabl_tabulate_insert_head\empty
\else
\let\tabl_tabulate_insert_head\tabl_tabulate_insert_head_content
@@ -1109,8 +1086,9 @@
\let\tabl_tabulate_insert_head\empty
\fi
\ifcsname\??tabulatefoot\currenttabulation\endcsname
- \expandafter\ifx\csname\??tabulatefoot\currenttabulation\endcsname\empty
- %\expandafter\ifx\lastnamedcs\empty
+ %\expandafter\ifempty\csname\??tabulatefoot\currenttabulation\endcsname
+ %\expandafter\ifempty\lastnamedcs
+ \ifempty\lastnamedcs
\let\tabl_tabulate_insert_foot\empty
\else
\let\tabl_tabulate_insert_foot\tabl_tabulate_insert_foot_content
@@ -1122,7 +1100,7 @@
\def\tabl_tabulate_insert_content
{\tabl_tabulate_insert_head
\ifcase\c_tabl_tabulate_repeathead \else
- \tabulatenoalign{\penalty\zerocount}% added 7/5/2014 WS mail
+ \noalign{\penalty\zerocount}% added 7/5/2014 WS mail
\fi
\tabl_tabulate_insert_body
\tabl_tabulate_insert_foot
@@ -1131,13 +1109,13 @@
\def\tabl_tabulate_remove_funny_line
{\ifhmode
\strut\crcr
- \tabulatenoalign{\kern-\lineheight}%
+ \noalign{\kern-\lineheight}%
\fi}
% todo: make footer synonym to tail
-\setuvalue{\e!start\v!tabulatehead}{\doifelsenextoptionalcs\tabl_tabulate_start_head_yes\tabl_tabulate_start_head_nop}
-\setuvalue{\e!start\v!tabulatetail}{\doifelsenextoptionalcs\tabl_tabulate_start_foot_yes\tabl_tabulate_start_foot_nop}
+\permanent\protected\defcsname\e!start\v!tabulatehead\endcsname{\doifelsenextoptionalcs\tabl_tabulate_start_head_yes\tabl_tabulate_start_head_nop}
+\permanent\protected\defcsname\e!start\v!tabulatetail\endcsname{\doifelsenextoptionalcs\tabl_tabulate_start_foot_yes\tabl_tabulate_start_foot_nop}
\let\m_tabl_tabulate_data\empty
@@ -1150,101 +1128,97 @@
\def\tabl_tabulate_start_head_nop{\tabl_tabulate_start_head_yes[\v!tabulate]}
\def\tabl_tabulate_start_foot_nop{\tabl_tabulate_start_foot_yes[\v!tabulate]}
-\unexpanded\def\tabl_start_defined[#1]%
+\protected\def\tabl_start_defined[#1]%
{\bgroup
\edef\currenttabulationparent{#1}%
\let\currenttabulation\currenttabulationparent
- \edef\p_format{\tabulationparameter\c!format}%
- \ifx\p_format\v!none
+ \iftok{\tabulationparameter\c!format}{\v!none}%
% this is special case: we need to define the generic english
% \starttabulate in other interfaces as well
- \expandafter\dodoubleempty \expandafter\tabl_start_regular
+ \lettabulationparameter\c!format\tabl_default_format
+ \expandafter\tabl_start_regular
\else
- \expandafter\dodoubleargument\expandafter\tabl_start_defined_indeed
+ \expandafter\tabl_start_defined_indeed
\fi}
-\def\tabl_start_defined_indeed
- {\iffirstargument
- \ifsecondargument
- \doubleexpandafter\tabl_start_defined_two
+\tolerant\def\tabl_start_defined_indeed[#1]#*[#2]%
+ {\ifarguments\or
+ \ifhastok={#1}%
+ \setuptabulation[\currenttabulation][#1]%
\else
- \doubleexpandafter\tabl_start_defined_one
+ \edef\currenttabulation{\currenttabulation:#1}%
\fi
\else
- \singleexpandafter\tabl_start_defined_zero
- \fi}
-
-\def\tabl_start_defined_one[#1][#2]%
- {\ifcondition\validassignment{#1}%
- \setuptabulation[\currenttabulation][#1]%
- \else
\edef\currenttabulation{\currenttabulation:#1}%
+ \setuptabulation[\currenttabulation][#2]%
\fi
\tabl_tabulate_start_building}
-\def\tabl_start_defined_two[#1][#2]%
- {\edef\currenttabulation{\currenttabulation:#1}%
- \setuptabulation[\currenttabulation][#2]%
- \tabl_tabulate_start_building}
-
-\def\tabl_start_defined_zero[#1][#2]%
- {\tabl_tabulate_start_building}
-
% \definetabulate[\v!tabulate][|l|p|] % we need to get rid of this one
-\unexpanded\setuvalue{\e!start\v!tabulate}%
+\def\tabl_default_format{|l|p|} % actually format is always set
+
+\permanent\protected\setuvalue{\e!start\v!tabulate}%
{\bgroup % whole thing
\let\currenttabulationparent\empty
- \dodoubleempty\tabl_start_regular}
+ \tabl_start_regular}
-\def\tabl_start_regular
- {\let\currenttabulation\currenttabulationparent
- \ifsecondargument
- \expandafter\tabl_start_regular_two
- \else
- \expandafter\tabl_start_regular_one
- \fi}
-
-\def\tabl_default_format{|l|p|}
+% \tolerant\protected\def\tabl_start_regular[#1]#*[#2]% [format] | [settings] | [format] [settings] | [settings] [format]
+% {\let\currenttabulation\currenttabulationparent
+% \iftok{#1}\emptytoks
+% \ifhastok={#2}\relax
+% \setupcurrenttabulation[#2]%
+% \fi
+% \orelse\ifhastok={#1}\relax
+% \iftok{#2}\emptytoks\else
+% \settabulationparameter\c!format{#2}%
+% \fi
+% \setupcurrenttabulation[#1]%
+% \else
+% \settabulationparameter\c!format{#1}%
+% \ifhastok={#2}\relax
+% \setupcurrenttabulation[#2]%
+% \fi
+% \fi
+% \tabl_tabulate_start_building}
-\def\tabl_start_regular_one[#1][#2]%
- {\ifcondition\validassignment{#1}%
- \lettabulationparameter\c!format\tabl_default_format
+\tolerant\protected\def\tabl_start_regular[#1]#*[#2]% [format] | [settings] | [format] [settings] | [settings] [format]
+ {\let\currenttabulation\currenttabulationparent
+ \iftok{#1}\emptytoks
+ \ifhastok={#2}\relax
+ \setupcurrenttabulation[#2]%
+ \fi
+ \orelse\ifhastok={#1}\relax
+ \iftok{#2}\emptytoks\else
+ \settabulationparameter\c!format{#2}%
+ \fi
\setupcurrenttabulation[#1]%
\else
- \def\p_format{#1}%
- \ifx\p_format\empty
- \def\p_format{|l|p|}%
+ \iftok{#1}\emptytoks\else
+ \settabulationparameter\c!format{#1}%
+ \fi
+ \ifhastok={#2}\relax
+ \setupcurrenttabulation[#2]%
\fi
- \lettabulationparameter\c!format\p_format
- \fi
- \tabl_tabulate_start_building}
-
-\def\tabl_start_regular_two[#1][#2]%
- {\def\p_format{#1}%
- \ifx\p_format\empty
- \let\p_format\tabl_default_format
\fi
- \lettabulationparameter\c!format\p_format
- \setupcurrenttabulation[#2]%
\tabl_tabulate_start_building}
-\letvalue{\e!stop\v!tabulate }\relax
-\letvalue{\e!stop\v!tabulatehead}\relax
-\letvalue{\e!stop\v!tabulatetail}\relax
+\permanent\letcsname\e!stop\v!tabulate \endcsname\relax
+\permanent\letcsname\e!stop\v!tabulatehead\endcsname\relax
+\permanent\letcsname\e!stop\v!tabulatetail\endcsname\relax
-\unexpanded\def\tabl_tabulate_start_ignore
+\permanent\protected\def\tabl_tabulate_start_ignore % todo when we go frozen
{\em Nested tabulate is not (yet) supported.\relax
\expandafter\gobbleuntil\csname\ifconditional\c_tabl_generic stoptabulate\else\e!stop\v!tabulate\fi\endcsname}
\appendtoks
- \letvalue{\e!start\v!tabulate}\tabl_tabulate_start_ignore % only the main one
+ \enforced\letvalue{\e!start\v!tabulate}\tabl_tabulate_start_ignore % only the main one
\to \everytabulate
-\setvalue{\??tabulatesplit\v!yes }{\settrue\c_tabl_tabulate_split}
-\setvalue{\??tabulatesplit\v!repeat}{\settrue\c_tabl_tabulate_split}
-\setvalue{\??tabulatesplit\v!no }{\setfalse\c_tabl_tabulate_split}
-\setvalue{\??tabulatesplit\v!auto }{\ifinsidefloat\ifinsidesplitfloat\else\setfalse\c_tabl_tabulate_split\fi\fi}
+\defcsname\??tabulatesplit\v!yes \endcsname{\settrue\c_tabl_tabulate_split}
+\defcsname\??tabulatesplit\v!repeat\endcsname{\settrue\c_tabl_tabulate_split}
+\defcsname\??tabulatesplit\v!no \endcsname{\setfalse\c_tabl_tabulate_split}
+\defcsname\??tabulatesplit\v!auto \endcsname{\ifinsidefloat\ifinsidesplitfloat\else\setfalse\c_tabl_tabulate_split\fi\fi}
% todo: spacing around tabulate when bodyfont is set
@@ -1281,7 +1255,7 @@
\let\tabl_tabulate_inside_inbetween \relax
\let\tabl_tabulate_outside_inbetween\relax
-\unexpanded\def\tabl_tabulate_inside_before
+\protected\def\tabl_tabulate_inside_before
{\ifhmode\par\fi
\ifhmode
\ifinsidesplitfloat
@@ -1294,7 +1268,7 @@
\let\tabl_tabulate_inside_after\relax
\fi}
-\unexpanded\def\tabl_tabulate_outside_before
+\protected\def\tabl_tabulate_outside_before
{\ifhmode\par\fi
\ifhmode
\vbox\bgroup
@@ -1326,7 +1300,7 @@
\verticalstrut
\vskip-\struttotal}}
-\unexpanded\def\tabl_tabulate_start_building
+\protected\def\tabl_tabulate_start_building
{\ifinsidefloat
\tabl_tabulate_inside_before
\else
@@ -1344,7 +1318,7 @@
\edef\p_line {\tabulationparameter\c!rule}%
\edef\p_rulecolor {\tabulationparameter\c!rulecolor}%
\edef\p_rulethickness{\tabulationparameter\c!rulethickness}%
- \edef\p_bodyfont {\tabulationparameter\c!bodyfont}
+ \edef\p_bodyfont {\tabulationparameter\c!bodyfont}%
\edef\p_indenting {\tabulationparameter\c!indenting}%
\edef\p_keeptogether {\tabulationparameter\c!keeptogether}%
\edef\p_blank {\tabulationparameter\c!blank}%
@@ -1368,7 +1342,7 @@
\let\m_tabl_tabulate_hrule_color_default\p_rulecolor
\d_tabl_tabulate_vrulethickness_default\p_rulethickness
\d_tabl_tabulate_hrulethickness_default\p_rulethickness
- \ifx\p_bodyfont\empty\else
+ \ifempty\p_bodyfont\else
\switchtobodyfont[\p_bodyfont]%
\fi
\postponenotes % new, to be tested / will be configurable
@@ -1378,12 +1352,12 @@
\tabulationparameter\c!inner
\d_tabl_tabulate_indent\dimexpr\leftskip+\hangindent\ifx\p_indenting\v!yes+\parindent\fi\relax
\global\c_tabl_tabulate_column\zerocount
- \processcontent
- {\ifconditional\c_tabl_generic stoptabulate\else\e!stop\ifx\currenttabulationparent\empty\v!tabulate\else\currenttabulationparent\fi\fi}
+ \processcontent % stoptabulate needs to match the frozen one
+ {\ifconditional\c_tabl_generic stoptabulate\else\e!stop\ifempty\currenttabulationparent\v!tabulate\else\currenttabulationparent\fi\fi}
\tabl_tabulate_insert_body
\tabl_tabulate_process}
-\def\tabulateEQ
+\permanent\protected\def\tabulateEQ
{\ifconditional\c_tabl_tabulate_firstflushed\else
\dostarttaggedchained\t!ignore\empty\empty
\dostarttagged\t!ignore\empty
@@ -1411,23 +1385,23 @@
\let\m_tabl_tabulate_blank_default \empty
\appendtoks
- \glet\m_tabl_tabulate_color_previous \empty
- \glet\m_tabl_tabulate_color \empty
- \glet\m_tabl_tabulate_text_color \empty
- \glet\m_tabl_tabulate_color_local \empty
- \glet\m_tabl_tabulate_vrule_color \empty
- \glet\m_tabl_tabulate_vrule_color_local \empty
- \global \d_tabl_tabulate_vrulethickness_local\zeropoint
+ \glet \m_tabl_tabulate_color_previous \empty
+ \glet \m_tabl_tabulate_color \empty
+ \glet \m_tabl_tabulate_text_color \empty
+ \glet \m_tabl_tabulate_color_local \empty
+ \glet \m_tabl_tabulate_vrule_color \empty
+ \glet \m_tabl_tabulate_vrule_color_local \empty
+ \global\d_tabl_tabulate_vrulethickness_local\zeropoint
\to \t_tabl_tabulate_every_row
-\unexpanded\def\tabl_tabulate_color_side_right_second
- {\ifx\m_tabl_tabulate_color_previous\empty \else
+\protected\def\tabl_tabulate_color_side_right_second
+ {\ifempty\m_tabl_tabulate_color_previous \else
\tabl_tabulate_color_set\m_tabl_tabulate_color_previous
\glet\m_tabl_tabulate_color_previous\empty
\fi}
-\unexpanded\def\tabl_tabulate_color_side_left_second
- {\ifx\m_tabl_tabulate_color\empty \else
+\protected\def\tabl_tabulate_color_side_left_second
+ {\ifempty\m_tabl_tabulate_color \else
\ifcase\c_tabl_tabulate_colorspan
\or
\tabl_tabulate_color_set\m_tabl_tabulate_color
@@ -1436,8 +1410,8 @@
\fi
\fi}
-\unexpanded\def\tabl_tabulate_color_side_both_second
- {\ifx\m_tabl_tabulate_color\empty \else
+\protected\def\tabl_tabulate_color_side_both_second
+ {\ifempty\m_tabl_tabulate_color \else
\tabl_tabulate_color_set\m_tabl_tabulate_color
\ifcase\c_tabl_tabulate_colorspan
%\glet\m_tabl_tabulate_color_previous\empty
@@ -1460,7 +1434,7 @@
\let\tabl_tabulate_color_side_both \tabl_tabulate_color_side_both_second
\to \t_tabl_tabulate_initializers_second
-\def\tabl_tabulate_set_color_column#1% overloaded
+\def\tabl_tabulate_set_color_column#1% overloaded / todo
{\unskip
\doifelsefastoptionalcheck{\tabl_tabulate_set_color_column_yes#1}{\tabl_tabulate_set_color_column_nop#1}}
@@ -1518,16 +1492,16 @@
{\begincsname\??tabulatevrule\the\c_tabl_tabulate_column\endcsname}
\def\tabl_tabulate_column_vruled_nop
- {\expandafter\glet\csname\??tabulatevrule\the\c_tabl_tabulate_column\endcsname\tabl_tabulate_column_vruled_preset
+ {\gletcsname\??tabulatevrule\the\c_tabl_tabulate_column\endcsname\tabl_tabulate_column_vruled_preset
\tabl_tabulate_column_normal}
\def\tabl_tabulate_column_vruled_step#1%
- {\doifelsenumber{#1}
+ {\doifelsenumber{#1}%
{\global\d_tabl_tabulate_vrulethickness_local#1\d_tabl_tabulate_vrulethickness_default}
{\xdef\m_tabl_tabulate_vrule_color_local{#1}}}
\def\tabl_tabulate_column_vruled_yes#1#2[#3]%
- {\expandafter\gdef\csname\??tabulatevrule\the\c_tabl_tabulate_column\endcsname
+ {\gdefcsname\??tabulatevrule\the\c_tabl_tabulate_column\endcsname
{\tabl_tabulate_column_vruled_preset
\rawprocesscommalist[#3]\tabl_tabulate_column_vruled_step}%
\tabl_tabulate_column_normal#1#2}
@@ -1542,21 +1516,12 @@
\global\c_tabl_tabulate_max_vrulecolumn\zerocount}
\def\tabl_tabulate_vrule_reset_step % undefined or relax
- {\expandafter\glet\csname\??tabulatevrule\the\fastloopindex\endcsname\undefined}
+ {\gletcsname\??tabulatevrule\the\fastloopindex\endcsname\undefined}
\appendtoks
\tabl_tabulate_vrule_reset
\to \t_tabl_tabulate_every_after_row
-% sometimes more efficient:
-%
-% \def\tabl_tabulate_column_vruled_yes#1#2[#3]%
-% {\rawprocesscommalist[#3]\tabl_tabulate_column_vruled_step
-% \expandafter\xdef\csname\??tabulatevrule\the\c_tabl_tabulate_column\endcsname
-% {\global\d_tabl_tabulate_vrulethickness_local\the\d_tabl_tabulate_vrulethickness_default
-% \noexpand\xdef\noexpand\m_tabl_tabulate_vrule_color_local{\m_tabl_tabulate_vrule_color_local}}%
-% \tabl_tabulate_column_normal#1#2}
-
\def\tabl_tabulate_column_vruled_normal
{\vrule\s!width\d_tabl_tabulate_vrulethickness\relax}
@@ -1564,15 +1529,15 @@
{\dousecolorparameter\m_tabl_tabulate_vrule_color
\vrule\s!width\d_tabl_tabulate_vrulethickness\relax}
-\unexpanded\def\tabl_tabulate_column_vrule_inject_first
+\protected\def\tabl_tabulate_column_vrule_inject_first
{\ifcase\d_tabl_tabulate_vrulethickness\else
\tabl_tabulate_column_vruled_normal % could be a skip instead
\fi
\global\d_tabl_tabulate_vrulethickness\zeropoint} % nils second one
-\unexpanded\def\tabl_tabulate_column_vrule_inject_second
+\protected\def\tabl_tabulate_column_vrule_inject_second
{\ifcase\d_tabl_tabulate_vrulethickness\else
- \ifx\m_tabl_tabulate_vrule_color\empty
+ \ifempty\m_tabl_tabulate_vrule_color
\tabl_tabulate_column_vruled_normal
\else
\tabl_tabulate_column_vruled_colored
@@ -1600,17 +1565,17 @@
\expandafter\ignorespaces % interferes with the more tricky hooks
\fi}
-\unexpanded\def\setquicktabulate#1% see \startlegend \startgiven (for the moment still public)
- {\let#1\tabl_tabulate_column_inject_auto
- \let\\\tabl_tabulate_column_inject_auto} % brrr, will go
+\protected\def\tabl_tabulate_set_quick#1% see \startlegend \startgiven (for the moment still public)
+ {\enforced\let#1\tabl_tabulate_column_inject_auto
+ \enforced\let\\\tabl_tabulate_column_inject_auto} % brrr, will go
-\setvalue{\??tabulateseparator\v!blank }{\s_tabl_tabulate_separator\bigskipamount}
-\setvalue{\??tabulateseparator\v!depth }{\s_tabl_tabulate_separator\strutdp}
-\setvalue{\??tabulateseparator\v!small }{\def\m_tabl_tabulate_separator_factor{.25}}
-\setvalue{\??tabulateseparator\v!medium}{\def\m_tabl_tabulate_separator_factor{.5}}
-\setvalue{\??tabulateseparator\v!big }{}
-\setvalue{\??tabulateseparator\v!none }{\s_tabl_tabulate_separator\zeropoint\let\m_tabl_tabulate_separator_factor\zerocount}
-\setvalue{\??tabulateseparator\v!grid }{\s_tabl_tabulate_separator\zeropoint\let\m_tabl_tabulate_separator_factor\zerocount}
+\defcsname\??tabulateseparator\v!blank \endcsname{\s_tabl_tabulate_separator\bigskipamount}
+\defcsname\??tabulateseparator\v!depth \endcsname{\s_tabl_tabulate_separator\strutdp}
+\defcsname\??tabulateseparator\v!small \endcsname{\def\m_tabl_tabulate_separator_factor{.25}}
+\defcsname\??tabulateseparator\v!medium\endcsname{\def\m_tabl_tabulate_separator_factor{.5}}
+\defcsname\??tabulateseparator\v!big \endcsname{}
+\defcsname\??tabulateseparator\v!none \endcsname{\s_tabl_tabulate_separator\zeropoint\let\m_tabl_tabulate_separator_factor\zerocount}
+\defcsname\??tabulateseparator\v!grid \endcsname{\s_tabl_tabulate_separator\zeropoint\let\m_tabl_tabulate_separator_factor\zerocount}
\def\tabl_tabulate_column_rule_separator_step#1%
{\ifcsname\??tabulateseparator#1\endcsname
@@ -1622,7 +1587,7 @@
\def\tabl_tabulate_column_rule_separator_inject % can be sped up (will do when used frequently)
{\bgroup
\s_tabl_tabulate_separator\strutdp
- \ifx\p_distance\empty\else
+ \ifempty\p_distance\else
\let\m_tabl_tabulate_separator_factor\plusone
\processcommacommand[\p_distance]\tabl_tabulate_column_rule_separator_step
\s_tabl_tabulate_separator\m_tabl_tabulate_separator_factor\s_tabl_tabulate_separator
@@ -1634,24 +1599,17 @@
\directvskip\s_tabl_tabulate_separator
\egroup}
-\def\tabl_tabulate_hrule_spec_ignore#1%
- {%\glet\currenttabulationlocalhrulecolor\empty
- %\global\d_tabl_tabulate_hrulethickness_local\d_tabl_tabulate_hrulethickness_default
- \doifelsefastoptionalcheck#1#1}
-
-\def\tabl_tabulate_hrule_spec_pickup#1%
- {\glet\currenttabulationlocalhrulecolor\m_tabl_tabulate_hrule_color_default
- \global\d_tabl_tabulate_hrulethickness_local\d_tabl_tabulate_hrulethickness_default
- \doifelsefastoptionalcheck{\tabl_tabulate_hrule_preset#1}#1}
+\let\m_tabl_tabulate_hrule_color\empty
\def\tabl_tabulate_hrule_preset_step#1%
- {\doifelsenumber{#1}
+ {\doifelsenumber{#1}%
{\global\d_tabl_tabulate_hrulethickness_local#1\d_tabl_tabulate_hrulethickness_default}
- {\xdef\currenttabulationlocalhrulecolor{#1}}}
+ {\xdef\m_tabl_tabulate_hrule_color{#1}}}
-\def\tabl_tabulate_hrule_preset#1[#2]%
- {\rawprocesscommalist[#2]\tabl_tabulate_hrule_preset_step
- #1}
+\def\tabl_tabulate_hrule_preset[#1]%
+ {\glet\m_tabl_tabulate_hrule_color\m_tabl_tabulate_hrule_color_default
+ \global\d_tabl_tabulate_hrulethickness_local\d_tabl_tabulate_hrulethickness_default
+ \iftok{#1}\emptytoks\else\rawprocesscommalist[#1]\tabl_tabulate_hrule_preset_step\fi}
\def\tabl_tabulate_hrule_inject_normal
{\autorule
@@ -1661,17 +1619,17 @@
\relax}
\def\tabl_tabulate_hrule_inject_colored
- {\dousecolorparameter\currenttabulationlocalhrulecolor
+ {\dousecolorparameter\m_tabl_tabulate_hrule_color
\tabl_tabulate_hrule_inject_normal}
-\unexpanded\def\tabl_tabulate_hrule_inject_first
+\protected\def\tabl_tabulate_hrule_inject_first
{\ifcase\d_tabl_tabulate_hrulethickness_local\else
\tabl_tabulate_hrule_inject_normal
\fi}
-\unexpanded\def\tabl_tabulate_hrule_inject_second
+\protected\def\tabl_tabulate_hrule_inject_second
{\ifcase\d_tabl_tabulate_hrulethickness_local\else
- \ifx\currenttabulationlocalhrulecolor\empty
+ \ifempty\m_tabl_tabulate_hrule_color
\tabl_tabulate_hrule_inject_normal
\else
\tabl_tabulate_hrule_inject_colored
@@ -1713,15 +1671,14 @@
% \NC test \CC[yellow] test \NC test \NC \NR
% \stoptabulate
-\unexpanded\def\tabl_tabulate_color_set#1% we could store the attributes at the cost of a lua call
+\protected\def\tabl_tabulate_color_set#1% we could store the attributes at the cost of a lua call
{\begingroup
\clf_enablebackgroundalign % was \node_backgrounds_align_initialize
\glet\tabl_tabulate_color_repeat\tabl_tabulate_color_repeat_second
- \global\settrue\c_tabl_tabulate_has_colors
\ifnum\c_tabl_tabulate_column>\c_tabl_tabulate_max_colorcolumn
\global\c_tabl_tabulate_max_colorcolumn\c_tabl_tabulate_column
\fi
- \expandafter\xdef\csname\??tabulatecolor\the\c_tabl_tabulate_column\endcsname{#1}%
+ \xdefcsname\??tabulatecolor\the\c_tabl_tabulate_column\endcsname{#1}%
\hpack \thealignbackgroundcolorattr{#1}{}% pack ?
\endgroup}
@@ -1752,7 +1709,7 @@
{\dofastloopcs\c_tabl_tabulate_max_colorcolumn\tabl_tabulate_color_reset_step}
\def\tabl_tabulate_color_reset_step % undefined or empty?
- {\expandafter\glet\csname\??tabulatecolor\number\fastloopindex\endcsname\undefined}
+ {\gletcsname\??tabulatecolor\number\fastloopindex\endcsname\undefined}
\appendtoks
\tabl_tabulate_color_reset
@@ -1819,21 +1776,21 @@
\def\tabl_tabulate_digits{\digits}
-%D Beware, we cannot use \type {\unexpanded} on \type {\HL} cum suis, since \TEX's
+%D Beware, we cannot use \type {\protected} on \type {\HL} cum suis, since \TEX's
%D hard coded noalign lookahead fails on it! I mistakenly added this for a while.
-\setvalue{\??tabulatealigning\v!normal}{0}
-\setvalue{\??tabulatealigning\v!right }{1}
-\setvalue{\??tabulatealigning\v!left }{2}
-\setvalue{\??tabulatealigning\v!middle}{3}
+\defcsname\??tabulatealigning\v!normal\endcsname{0}
+\defcsname\??tabulatealigning\v!right \endcsname{1}
+\defcsname\??tabulatealigning\v!left \endcsname{2}
+\defcsname\??tabulatealigning\v!middle\endcsname{3}
-\setvalue{\??tabulateheader\v!repeat}{\plusone}
-\setvalue{\??tabulateheader\v!text }{\plustwo}
+\defcsname\??tabulateheader\v!repeat\endcsname{\plusone}
+\defcsname\??tabulateheader\v!text \endcsname{\plustwo}
-\unexpanded\def\tabl_tabulate_bskip_first {\setbox\b_tabl_tabulate\vbox\bgroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_nop}
-\unexpanded\def\tabl_tabulate_eskip_first {\par\egroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_yes}
-\unexpanded\def\tabl_tabulate_xbskip_first{\hpack\bgroup\vbox\bgroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_nop}
-\unexpanded\def\tabl_tabulate_xeskip_first{\par\egroup\egroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_yes}
+\protected\def\tabl_tabulate_bskip_first {\setbox\b_tabl_tabulate\vbox\bgroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_nop}
+\protected\def\tabl_tabulate_eskip_first {\par\egroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_yes}
+\protected\def\tabl_tabulate_xbskip_first{\hpack\bgroup\vbox\bgroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_nop}
+\protected\def\tabl_tabulate_xeskip_first{\par\egroup\egroup\glet\tabl_tabulate_hook\tabl_tabulate_hook_yes}
\let\tabl_tabulate_bbskip\relax
\let\tabl_tabulate_eeskip\relax
@@ -1871,28 +1828,28 @@
% so far
-\unexpanded\def\tabl_tabulate_VL_first{\tabl_tabulate_column_vruled\zerocount\zerocount}
-\unexpanded\def\tabl_tabulate_NC_first{\tabl_tabulate_column_normal\zerocount\zerocount}
-\unexpanded\def\tabl_tabulate_RC_first{\tabl_tabulate_column_normal\zerocount\plusone}
-\unexpanded\def\tabl_tabulate_HC_first{\tabl_tabulate_column_normal\zerocount\plustwo}
-\unexpanded\def\tabl_tabulate_EQ_first{\tabl_tabulate_column_equal \plustwo \zerocount}
-\unexpanded\def\tabl_tabulate_RQ_first{\tabl_tabulate_column_equal \zerocount\plusone}
-\unexpanded\def\tabl_tabulate_HQ_first{\tabl_tabulate_column_equal \zerocount\plustwo}
+\permanent\protected\def\tabl_tabulate_VL_first{\tabl_tabulate_column_vruled\zerocount\zerocount}
+\permanent\protected\def\tabl_tabulate_NC_first{\tabl_tabulate_column_normal\zerocount\zerocount}
+\permanent\protected\def\tabl_tabulate_RC_first{\tabl_tabulate_column_normal\zerocount\plusone}
+\permanent\protected\def\tabl_tabulate_HC_first{\tabl_tabulate_column_normal\zerocount\plustwo}
+\permanent\protected\def\tabl_tabulate_EQ_first{\tabl_tabulate_column_equal \plustwo \zerocount}
+\permanent\protected\def\tabl_tabulate_RQ_first{\tabl_tabulate_column_equal \zerocount\plusone}
+\permanent\protected\def\tabl_tabulate_HQ_first{\tabl_tabulate_column_equal \zerocount\plustwo}
-\unexpanded\def\tabl_tabulate_NG_first{\tabl_tabulate_column_normal\zerocount\zerocount}
-\unexpanded\def\tabl_tabulate_NN_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % new, undocumented, test first
-\unexpanded\def\tabl_tabulate_ND_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % same, for old times sake
+\permanent\protected\def\tabl_tabulate_NG_first{\tabl_tabulate_column_normal\zerocount\zerocount}
+\permanent\protected\def\tabl_tabulate_NN_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % new, undocumented, test first
+\permanent\protected\def\tabl_tabulate_ND_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % same, for old times sake
-\unexpanded\def\tabl_tabulate_NR_first {\tabl_tabulate_NR_common\conditionaltrue \tabl_tabulate_check_penalties} % next row
-\unexpanded\def\tabl_tabulate_NB_first {\tabl_tabulate_NR_common\conditionaltrue \tabl_tabulate_nobreak_inject } % next row no break
+\permanent\protected\def\tabl_tabulate_NR_first {\tabl_tabulate_NR_common\conditionaltrue \tabl_tabulate_check_penalties} % next row
+\permanent\protected\def\tabl_tabulate_NB_first {\tabl_tabulate_NR_common\conditionaltrue \tabl_tabulate_nobreak_inject } % next row no break
-\unexpanded\def\tabl_tabulate_NR_second{\tabl_tabulate_NR_common\conditionalfalse\tabl_tabulate_check_penalties} % next row
-\unexpanded\def\tabl_tabulate_NB_second{\tabl_tabulate_NR_common\conditionalfalse\tabl_tabulate_nobreak_inject } % next row no break
+\permanent\protected\def\tabl_tabulate_NR_second{\tabl_tabulate_NR_common\conditionalfalse\tabl_tabulate_check_penalties} % next row
+\permanent\protected\def\tabl_tabulate_NB_second{\tabl_tabulate_NR_common\conditionalfalse\tabl_tabulate_nobreak_inject } % next row no break
-\unexpanded\def\tabl_tabulate_CC_first{\global\c_tabl_tabulate_localcolorspan\zerocount\tabl_tabulate_set_color_column\zerocount}
-\unexpanded\def\tabl_tabulate_CL_first{\global\c_tabl_tabulate_localcolorspan\plusone \tabl_tabulate_set_color_column\zerocount}
-\unexpanded\def\tabl_tabulate_CM_first{\global\c_tabl_tabulate_localcolorspan\plustwo \tabl_tabulate_set_color_column\zerocount}
-\unexpanded\def\tabl_tabulate_CR_first{\global\c_tabl_tabulate_localcolorspan\plusthree\tabl_tabulate_set_color_column\zerocount}
+\permanent\protected\def\tabl_tabulate_CC_first{\global\c_tabl_tabulate_localcolorspan\zerocount\tabl_tabulate_set_color_column\zerocount}
+\permanent\protected\def\tabl_tabulate_CL_first{\global\c_tabl_tabulate_localcolorspan\plusone \tabl_tabulate_set_color_column\zerocount}
+\permanent\protected\def\tabl_tabulate_CM_first{\global\c_tabl_tabulate_localcolorspan\plustwo \tabl_tabulate_set_color_column\zerocount}
+\permanent\protected\def\tabl_tabulate_CR_first{\global\c_tabl_tabulate_localcolorspan\plusthree\tabl_tabulate_set_color_column\zerocount}
%D Sort of special:
%D
@@ -1918,53 +1875,50 @@
%D
%D \typebuffer \getbuffer
-\unexpanded\def\tabl_tabulate_NI_first{\doifelsefastoptionalcheck\tabl_tbl_NI_yes\tabl_tbl_NI_nop}
-
-\def\tabl_tbl_NI_yes[#1]{\NC \itemtag[#1]\NC}
-\def\tabl_tbl_NI_nop {\NC \itemtag \NC}
+\permanent\tolerant\protected\def\tabl_tabulate_NI_first[#1]{\NC\itemtag[#1]\NC}
%D The following shortcut is handy for tables where one needs bold headers:
-\unexpanded\def\tabl_tabulate_BC_first
+\permanent\protected\def\tabl_tabulate_BC_first
{\tabl_tabulate_column_normal\plusone\zerocount
\let\fontstyle\globalfontstyle
\bf}
\appendtoks
- \let\VL\tabl_tabulate_VL_first
- \let\NC\tabl_tabulate_NC_first
- \let\BC\tabl_tabulate_BC_first
- \let\RC\tabl_tabulate_RC_first
- \let\HC\tabl_tabulate_HC_first
- \let\EQ\tabl_tabulate_EQ_first
- \let\RQ\tabl_tabulate_RQ_first
- \let\HQ\tabl_tabulate_HQ_first
- \let\NG\tabl_tabulate_NG_first
- \let\NN\tabl_tabulate_NN_first
- \let\ND\tabl_tabulate_ND_first
- \let\NR\tabl_tabulate_NR_first
- \let\NB\tabl_tabulate_NB_first
- \let\CC\tabl_tabulate_CC_first
- \let\CL\tabl_tabulate_CL_first
- \let\CM\tabl_tabulate_CM_first
- \let\CR\tabl_tabulate_CR_first
- \let\NI\tabl_tabulate_NI_first
+ \enforced\let\VL\tabl_tabulate_VL_first
+ \enforced\let\NC\tabl_tabulate_NC_first
+ \enforced\let\BC\tabl_tabulate_BC_first
+ \enforced\let\RC\tabl_tabulate_RC_first
+ \enforced\let\HC\tabl_tabulate_HC_first
+ \enforced\let\EQ\tabl_tabulate_EQ_first
+ \enforced\let\RQ\tabl_tabulate_RQ_first
+ \enforced\let\HQ\tabl_tabulate_HQ_first
+ \enforced\let\NG\tabl_tabulate_NG_first
+ \enforced\let\NN\tabl_tabulate_NN_first
+ \enforced\let\ND\tabl_tabulate_ND_first
+ \enforced\let\NR\tabl_tabulate_NR_first
+ \enforced\let\NB\tabl_tabulate_NB_first
+ \enforced\let\CC\tabl_tabulate_CC_first
+ \enforced\let\CL\tabl_tabulate_CL_first
+ \enforced\let\CM\tabl_tabulate_CM_first
+ \enforced\let\CR\tabl_tabulate_CR_first
+ \enforced\let\NI\tabl_tabulate_NI_first
\to \t_tabl_tabulate_initializers_first
\appendtoks
- \let\NR\tabl_tabulate_NR_second
- \let\NB\tabl_tabulate_NB_second
+ \enforced\let\NR\tabl_tabulate_NR_second
+ \enforced\let\NB\tabl_tabulate_NB_second
\to \t_tabl_tabulate_initializers_second
\appendtoks
- \let\SR\NR
- \let\FR\NR
- \let\MR\NR
- \let\LR\NR
- \let\AR\NR
+ \enforced\let\SR\NR
+ \enforced\let\FR\NR
+ \enforced\let\MR\NR
+ \enforced\let\LR\NR
+ \enforced\let\AR\NR
\to \t_tabl_tabulate_initializers_first
-\unexpanded\def\tabl_tabulate_NR_common#1#2%
+\permanent\protected\def\tabl_tabulate_NR_common#1#2%
{\global\advance\c_tabl_tabulate_noflines\plusone
\global\setfalse\c_tabl_tabulate_firstflushed
\global\setfalse\c_tabl_tabulate_equal
@@ -1975,10 +1929,7 @@
\tabl_tabulate_pheight_reset
\unskip\unskip\crcr\tabl_tabulate_flush_collected
% can we omit the next one in the first run? probably
- \starttabulatenoalign
- \the\t_tabl_tabulate_every_after_row
- #2%
- \stoptabulatenoalign}
+ \noalign{\the\t_tabl_tabulate_every_after_row#2}}
\def\tabl_tabulate_check_penalties
{\ifconditional\c_tabl_tabulate_tolerant_break\else
@@ -2003,20 +1954,20 @@
\fi
\global\setfalse\c_tabl_tabulate_firstflushed}
-\unexpanded\def\tabl_tabulate_bbskip_second_split_yes
+\protected\def\tabl_tabulate_bbskip_second_split_yes
{\ifvoid\b_tabl_tabulate_current\c_tabl_tabulate_column
- \ifx\tabl_tabulate_flush_collected_indeed\empty\else
+ \ifempty\tabl_tabulate_flush_collected_indeed\else
\setbox0\hbox
\fi
\fi}
-\unexpanded\def\tabl_tabulate_eskip_second
+\protected\def\tabl_tabulate_eskip_second
{\par\egroup
\tabl_tabulate_pheight_set
\glet\tabl_tabulate_hook\tabl_tabulate_hook_yes
\tabl_tabulate_splitoff_box}
-\unexpanded\def\tabl_tabulate_bskip_second_split_yes
+\protected\def\tabl_tabulate_bskip_second_split_yes
{\ifvoid\b_tabl_tabulate_current\c_tabl_tabulate_column
% first line
\global\setbox\b_tabl_tabulate_current\c_tabl_tabulate_column\vbox
@@ -2035,33 +1986,33 @@
\expandafter\tabl_tabulate_splitoff_box
\fi}
-\unexpanded\def\tabl_tabulate_xbskip_second{\tabl_tabulate_bskip}
-\unexpanded\def\tabl_tabulate_xeskip_second{\tabl_tabulate_eskip}
+\protected\def\tabl_tabulate_xbskip_second{\tabl_tabulate_bskip}
+\protected\def\tabl_tabulate_xeskip_second{\tabl_tabulate_eskip}
-\unexpanded\def\tabl_tabulate_flush_second_indeed
+\protected\def\tabl_tabulate_flush_second_indeed
{\glet\tabl_tabulate_flush_collected_indeed\empty
\global\c_tabl_tabulate_column\zerocount
\tabl_tabulate_pbreak_check
\dofastloopcs\c_tabl_tabulate_columns\tabl_tabulate_flush_second_step
\global\settrue\c_tabl_tabulate_firstflushed}
-\unexpanded\def\tabl_tabulate_flush_second_step
+\protected\def\tabl_tabulate_flush_second_step
{\ifvoid\b_tabl_tabulate_current\fastloopindex\else
\gdef\tabl_tabulate_flush_collected_indeed{\the\t_tabl_tabulate_dummy}%
\fi}
\def\tabl_tabulate_flush_second
- {\tabulatenoalign{\tabl_tabulate_flush_second_indeed}%
+ {\noalign{\tabl_tabulate_flush_second_indeed}%
\tabl_tabulate_flush_collected_indeed}
-\unexpanded\def\tabl_tabulate_bskip_second_split_nop
+\protected\def\tabl_tabulate_bskip_second_split_nop
{\vtop\bgroup
\ifconditional\c_tabl_tabulate_automode\hsize\d_tabl_tabulate_width\fi
% \begstrut % interferes with pre-\pars
% evt: \appendtoks\begstrut\to\everypar
\ignorespaces}
-\unexpanded\def\tabl_tabulate_eskip_second_split_nop % vertical strut added august 2003
+\protected\def\tabl_tabulate_eskip_second_split_nop % vertical strut added august 2003
{\par\verticalstrut
\vskip-\struttotal
\egroup}
@@ -2088,19 +2039,15 @@
% \starttabulate[||] \dorecurse{100}{\NC Eins \NC \NR \HL} \stoptabulate
% \stoptext
-\def\tabl_tabulate_XX_none
- {\starttabulatenoalign
- \tabl_tabulate_break_state_set
- \tabl_tabulate_hrule_spec_ignore
- \stoptabulatenoalign}
+\permanent\tolerant\noaligned\protected\def\tabl_tabulate_XX_none [#1]{\noalign{\tabl_tabulate_break_state_set}}
-\def\tabl_tabulate_FL_second{\starttabulatenoalign\tabl_tabulate_hrule_spec_pickup\tabl_tabulate_FL_second_indeed}
-\def\tabl_tabulate_ML_second{\starttabulatenoalign\tabl_tabulate_hrule_spec_pickup\tabl_tabulate_ML_second_indeed}
-\def\tabl_tabulate_LL_second{\starttabulatenoalign\tabl_tabulate_hrule_spec_pickup\tabl_tabulate_LL_second_indeed}
-\def\tabl_tabulate_TL_second{\starttabulatenoalign\tabl_tabulate_hrule_spec_pickup\tabl_tabulate_TL_second_indeed}
-\def\tabl_tabulate_BL_second{\starttabulatenoalign\tabl_tabulate_hrule_spec_pickup\tabl_tabulate_BL_second_indeed}
+\permanent\tolerant\noaligned\protected\def\tabl_tabulate_FL_second[#1]{\noalign{\tabl_tabulate_hrule_preset[#1]\tabl_tabulate_FL_second_indeed}}
+\permanent\tolerant\noaligned\protected\def\tabl_tabulate_ML_second[#1]{\noalign{\tabl_tabulate_hrule_preset[#1]\tabl_tabulate_ML_second_indeed}}
+\permanent\tolerant\noaligned\protected\def\tabl_tabulate_LL_second[#1]{\noalign{\tabl_tabulate_hrule_preset[#1]\tabl_tabulate_LL_second_indeed}}
+\permanent\tolerant\noaligned\protected\def\tabl_tabulate_TL_second[#1]{\noalign{\tabl_tabulate_hrule_preset[#1]\tabl_tabulate_TL_second_indeed}}
+\permanent\tolerant\noaligned\protected\def\tabl_tabulate_BL_second[#1]{\noalign{\tabl_tabulate_hrule_preset[#1]\tabl_tabulate_BL_second_indeed}}
-\unexpanded\def\tabl_tabulate_FL_second_indeed
+\protected\def\tabl_tabulate_FL_second_indeed
{\ifinsidefloat\else
\doifempty{\tabulationparameter\c!before}\tabl_tabulate_baselinecorrection % no expansion
\fi
@@ -2108,13 +2055,12 @@
\tabl_tabulate_nobreak_inject
\tabl_tabulate_column_rule_separator_inject
\prevdepth\strutdp
- \tabl_tabulate_nobreak_inject
- \stoptabulatenoalign}
+ \tabl_tabulate_nobreak_inject}
\def\spac_vspacing_no_topskip % use grouped
- {\attribute\skipcategoryattribute\plusten}
+ {\c_attr_skipcategory\plusten}
-\unexpanded\def\tabl_tabulate_ML_second_indeed
+\protected\def\tabl_tabulate_ML_second_indeed
{\tabl_tabulate_break_no
\tabl_tabulate_column_rule_separator_inject
\tabl_tabulate_break_no
@@ -2125,10 +2071,9 @@
\tabl_tabulate_hrule_inject
\endgroup
\tabl_tabulate_break_no
- \tabl_tabulate_column_rule_separator_inject
- \stoptabulatenoalign}
+ \tabl_tabulate_column_rule_separator_inject}
-\unexpanded\def\tabl_tabulate_LL_second_indeed
+\protected\def\tabl_tabulate_LL_second_indeed
{\tabl_tabulate_nobreak_inject
\tabl_tabulate_column_rule_separator_inject
\tabl_tabulate_nobreak_inject
@@ -2137,10 +2082,9 @@
\tabl_tabulate_inside_inbetween
\else
\tabl_tabulate_outside_inbetween
- \fi
- \stoptabulatenoalign}
+ \fi}
-\unexpanded\def\tabl_tabulate_TL_second_indeed
+\protected\def\tabl_tabulate_TL_second_indeed
{\tabl_tabulate_nobreak_inject
\tabl_tabulate_column_rule_separator_inject
\tabl_tabulate_nobreak_inject
@@ -2148,12 +2092,11 @@
\tabl_tabulate_nobreak_inject
\tabl_tabulate_column_rule_separator_inject
%\prevdepth\strutdp % todo, might differ between TL and BL
- \tabl_tabulate_nobreak_inject
- \stoptabulatenoalign}
+ \tabl_tabulate_nobreak_inject}
\let\tabl_tabulate_BL_second_indeed\tabl_tabulate_TL_second_indeed
-\def\tabl_tabulate_HL_second
+\permanent\def\tabl_tabulate_HL_second
{\csname
\ifnum\c_tabl_tabulate_noflines=\zerocount F\orelse
\ifnum\c_tabl_tabulate_noflines=\c_tabl_tabulate_totalnoflines L\else
@@ -2161,52 +2104,25 @@
L\endcsname}
\appendtoks
- \let\FL\tabl_tabulate_XX_none
- \let\ML\tabl_tabulate_XX_none
- \let\LL\tabl_tabulate_XX_none
- \let\TL\tabl_tabulate_XX_none
- \let\BL\tabl_tabulate_XX_none
- \let\HL\tabl_tabulate_XX_none
- \let\HR\tabl_tabulate_XX_none
+ \enforced\let\FL\tabl_tabulate_XX_none
+ \enforced\let\ML\tabl_tabulate_XX_none
+ \enforced\let\LL\tabl_tabulate_XX_none
+ \enforced\let\TL\tabl_tabulate_XX_none
+ \enforced\let\BL\tabl_tabulate_XX_none
+ \enforced\let\HL\tabl_tabulate_XX_none
+ \enforced\let\HR\tabl_tabulate_XX_none
\to \t_tabl_tabulate_initializers_first
\appendtoks
- \let\FL\tabl_tabulate_FL_second
- \let\ML\tabl_tabulate_ML_second
- \let\LL\tabl_tabulate_LL_second
- \let\TL\tabl_tabulate_TL_second
- \let\BL\tabl_tabulate_BL_second
- \let\HL\tabl_tabulate_HL_second
- \let\HR\tabl_tabulate_HL_second
+ \enforced\let\FL\tabl_tabulate_FL_second
+ \enforced\let\ML\tabl_tabulate_ML_second
+ \enforced\let\LL\tabl_tabulate_LL_second
+ \enforced\let\TL\tabl_tabulate_TL_second
+ \enforced\let\BL\tabl_tabulate_BL_second
+ \enforced\let\HL\tabl_tabulate_HL_second
+ \enforced\let\HR\tabl_tabulate_HL_second
\to \t_tabl_tabulate_initializers_second
-% \def\tabulatedoHRfive % horizontal rule line (break untested)
-% {\starttabulatenoalign
-% \glet\dotabulateautoline\dotabulatelinerule
-% %\ifcase#1\or % todo: check what this does
-% \ifnum\noftabulatelines=\zerocount
-% \glet\dotabulateautoline\donothing
-% \else\ifnum\noftabulatelines=\totalnoftabulatelines
-% \glet\dotabulateautoline\donothing
-% \fi\fi
-% %\fi
-% \dotabulatenobreak
-% \stoptabulatenoalign
-% \dotabulateautoline
-% \starttabulatenoalign
-% \tabl_tabulate_break_no
-% \ifx\dotabulateautoline\dotabulatelinerule\kern-\lineheight\fi
-% \ifnum\noftabulatelines=\totalnoftabulatelines
-% \expandafter\dotabulatenobreak
-% \else
-% \expandafter\tabl_tabulate_break_allow
-% \fi
-% \stoptabulatenoalign
-% \dotabulateautoline
-% \starttabulatenoalign
-% \dotabulatenobreak
-% \stoptabulatenoalign}
-
% \dorecurse{10}{
% \starttabulate[|l|]
% \FL
@@ -2228,10 +2144,10 @@
% This needs checking:
-\def\tabulaterule {\HR} % a rule with lineheight
-\def\tabulateline {\HL} % just a spaced rule
-\def\tabulateautorule{\HR}%
-\def\tabulateautoline{\HL} % no longer different (to be looked into)
+\permanent\def\tabulaterule {\HR} % a rule with lineheight
+\permanent\def\tabulateline {\HL} % just a spaced rule
+\permanent\def\tabulateautorule{\HR}%
+\permanent\def\tabulateautoline{\HL} % no longer different (to be looked into)
%D When support for vertical rules we needed a way to pick up the specification for
%D the final rule and a \type {|{}} interface was chosen. As a result parsing had to
@@ -2257,6 +2173,15 @@
{\setlocalhsize
\hsize\localhsize}
+% test case for pre/post spacing:
+%
+% \ruledvbox{\starttabulate[|l|] \FL\NC xxx \NC \NR\LL\stoptabulate}
+% \ruledvbox{\starttabulate[|l|l|]\FL\NC xxx \NC xxx \NC \NR\LL\stoptabulate}
+% \ruledvbox{\starttabulate[|l|] \NC xxx \NC \NR \stoptabulate}
+% \ruledvbox{\starttabulate[|lj8|] \NC xxx \NC \NR \stoptabulate}
+% \ruledvbox{\starttabulate[|k8|] \NC xxx \NC \NR \stoptabulate}
+% \ruledvbox{\starttabulate[|l|l|] \NC xxx \NC xxx \NC \NR \stoptabulate}
+
\def\tabl_tabulate_process
{\c_tabl_tabulate_pass\plusone
\tabl_tabulate_check_full_content
@@ -2264,7 +2189,9 @@
\s_tabl_tabulate_first.5\d_tabl_tabulate_unit
\s_tabl_tabulate_last\s_tabl_tabulate_first
\s_tabl_tabulate_pre\zeropoint
- \s_tabl_tabulate_post\s_tabl_tabulate_first % was: \zeropoint
+ \s_tabl_tabulate_post\zeropoint
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set
\global\c_tabl_tabulate_columns\zerocount
\global\c_tabl_tabulate_nofauto\zerocount
\global\c_tabl_tabulate_noflines\zerocount
@@ -2382,9 +2309,9 @@
\the\t_tabl_tabulate_initializers_second % collect more here
%
\ifx\p_line\v!line
- \let\HL\HR
- \let\tabulateautoline\tabulateautorule
- \let\tabulateline\tabulaterule
+ \enforced\let\HL\HR
+ \enforced\let\tabulateautoline\tabulateautorule
+ \enforced\let\tabulateline \tabulaterule
\fi
%
\ifcase\c_tabl_tabulate_repeathead
@@ -2400,8 +2327,8 @@
\dostarttaggedchained\t!tabulate\empty\??tabulation
\dostarttagged\t!tabulaterow\empty
\setfalse\inhibitmargindata % new per 2012.06.13 ... really needed
- % \everycr\expandafter{\the\everycr\noalign{\the\t_tabl_tabulate_every_real_row}\dostoptagged\dostarttagged\t!tabulaterow\empty}%
- \toksapp\everycr{\noalign{\the\t_tabl_tabulate_every_real_row}\dostoptagged\dostarttagged\t!tabulaterow\empty}%
+% % \everycr\expandafter{\the\everycr\noalign{\the\t_tabl_tabulate_every_real_row}\dostoptagged\dostarttagged\t!tabulaterow\empty}%
+ \toksapp\everycr{\noalign{\the\t_tabl_tabulate_every_real_row\dostoptagged\dostarttagged\t!tabulaterow\empty}}%
\expandafter\halign\expandafter{\the\t_tabl_tabulate_preamble\crcr\tabl_tabulate_insert_content\crcr}%
\dostoptagged
\dostoptagged
@@ -2460,14 +2387,14 @@
\def\tabl_split_box_indeed#1%
{\resettsplit
- \def\tsplitminimumfreelines{2}%
- \def\tsplitminimumfreespace{0pt}%
- \setbox\tsplitcontent\box#1%
+ \c_split_minimum_free_lines\plustwo
+ \d_split_minimum_free_space\zeropoint
+ \setbox\b_split_content\box#1%
\ifcase\c_tabl_tabulate_repeathead\or
- \setbox\tsplithead\vsplit\tsplitcontent to \lineheight
- \setbox\tsplithead\vbox{\unvbox\tsplithead}%
+ \setbox\b_split_head\vsplit\b_split_content to \lineheight
+ \setbox\b_split_head\vbox{\unvbox\b_split_head}%
\or
- \setbox\tsplithead\vbox{\hbox{\strut\tabulationparameter\c!title}}%
+ \setbox\b_split_head\vbox{\hbox{\strut\tabulationparameter\c!title}}%
\fi
\handletsplit}
@@ -2494,36 +2421,19 @@
% \NC text \NC text \NC \NR
% \stoptabulate
-\def\tabl_tabulate_TB
- {\starttabulatenoalign
- \dosingleempty\tabl_tabulate_TB_indeed}
-
-\def\tabl_tabulate_TB_indeed[#1]%
- {\iffirstargument
- \blank[#1]
- \orelse\ifx\m_tabl_tabulate_blank_default\empty
- \blank
- \else
- \blank[\m_tabl_tabulate_blank_default]%
- \fi
- \stoptabulatenoalign}
-
-% to be tested:
-%
-% \def\tabl_tabulate_TB
-% {\starttabulatenoalign
-% \doiffastoptionalcheckelse\tabl_tabulate_TB_yes\tabl_tabulate_TB_nop}
-%
-% \def\tabl_tabulate_TB_yes[#1]%
-% {\blank[#1]
-% \stoptabulatenoalign}
-%
-% \def\tabl_tabulate_TB_nop[#1]%
-% {\blank
-% \stoptabulatenoalign}
+\permanent\tolerant\noaligned\protected\def\tabl_tabulate_TB[#1]%
+ {\noalign\bgroup
+ \unless\iftok{#1}\emptytoks
+ \blank[#1]
+ \orelse\ifempty\m_tabl_tabulate_blank_default
+ \blank
+ \else
+ \blank[\m_tabl_tabulate_blank_default]%
+ \fi
+ \egroup}
\appendtoks
- \let\TB\tabl_tabulate_TB
+ \enforced\let\TB\tabl_tabulate_TB
\to \everytabulate
% %D Between alignment lines certain rules apply, and even a simple test can mess
@@ -2635,13 +2545,16 @@
%D Predefined categories (moved from core-mis):
+\mutable\let\leg \relax % column separators
+\mutable\let\fact\relax % column separators
+
\definetabulate
[\v!legend]
[|emj1|i1|mR|]
\setuptabulate
[\v!legend]
- [\c!unit=.75em,\c!inner=\setquicktabulate\leg,EQ={=}]
+ [\c!unit=.75em,\c!inner=\tabl_tabulate_set_quick\leg,EQ={=}]
\definetabulate
[\v!legend][\v!two]
@@ -2653,7 +2566,7 @@
\setuptabulate
[\v!fact]
- [\c!unit=.75em,\c!inner=\setquicktabulate\fact,EQ={=}]
+ [\c!unit=.75em,\c!inner=\tabl_tabulate_set_quick\fact,EQ={=}]
%D Another example:
%D
@@ -2690,13 +2603,17 @@
\newconditional\c_tabl_generic
-\unexpanded\setuvalue{starttabulate}%
+\pushoverloadmode
+
+\permanent\protected\defcsname starttabulate\endcsname
{\bgroup % whole thing
\settrue\c_tabl_generic
\let\currenttabulationparent\empty
- \dodoubleempty\tabl_start_regular}
+ \tabl_start_regular}
-\letvalue{stoptabulate}\relax
+\permanent\letcsname stoptabulate\endcsname\relax % testcase cvs-002.tex
+
+\popoverloadmode
%D The following helpers are just there because we also have them at the \LUA\ end:
%D
@@ -2723,10 +2640,10 @@
\expandafter\tabl_tabulate_compact_step
\fi#1}
-\unexpanded\def\tabulaterow {\tabl_tabulate_compact_row\relax}
-\unexpanded\def\tabulaterowbold{\tabl_tabulate_compact_row\bold}
-\unexpanded\def\tabulaterowtype{\tabl_tabulate_compact_row\type}
-\unexpanded\def\tabulaterowtyp {\tabl_tabulate_compact_row\typ}
+\permanent\protected\def\tabulaterow {\tabl_tabulate_compact_row\relax}
+\permanent\protected\def\tabulaterowbold{\tabl_tabulate_compact_row\bold}
+\permanent\protected\def\tabulaterowtype{\tabl_tabulate_compact_row\type}
+\permanent\protected\def\tabulaterowtyp {\tabl_tabulate_compact_row\typ}
%D Here we plug in a row background feature. As we only have support for
%D \type {frame=name} we can use these variables.
@@ -2812,16 +2729,16 @@
\let\m_table_current_row_background_defaultfiller\empty
\let\m_table_current_row_background_auto \empty
-\unexpanded\def\tabl_register_row_background#1%
+\protected\def\tabl_register_row_background#1%
{\xdef\m_table_current_row_background{#1}}
-\unexpanded\def\tabl_register_row_background_filler#1%
+\protected\def\tabl_register_row_background_filler#1%
{\xdef\m_table_current_row_background_filler{#1}}
-\unexpanded\def\tabl_synchronize_row_background
+\protected\def\tabl_synchronize_row_background
{\iftrialtypesetting\else
- \ifx\m_table_current_row_background_filler\empty
- \ifx\m_table_current_row_background\empty
+ \ifempty\m_table_current_row_background_filler
+ \ifempty\m_table_current_row_background
% nothing
\tabl_synchronize_row_background_dummy
\else
@@ -2832,7 +2749,7 @@
\fi
\fi}
-\unexpanded\def\tabl_synchronize_row_background_dummy
+\protected\def\tabl_synchronize_row_background_dummy
{\iftrialtypesetting\else
\begingroup
%\clf_setbackgroundrowdata\numexpr\c_tabl_tabulate_nofrealrows+\minusone\relax\zerocount\zeropoint
@@ -2840,7 +2757,7 @@
\endgroup
\fi}
-\unexpanded\def\tabl_synchronize_row_background_indeed#1%
+\protected\def\tabl_synchronize_row_background_indeed#1%
{\iftrialtypesetting\else
\begingroup
\clf_enablebackgroundalign % can be moved into \clf_setbackgroundrowdata
@@ -2851,7 +2768,7 @@
\endgroup
\fi}
-\unexpanded\def\tabl_synchronize_row_background_filler_indeed#1%
+\protected\def\tabl_synchronize_row_background_filler_indeed#1%
{\iftrialtypesetting\else
\begingroup
\clf_enablebackgroundalign % can be moved into \clf_setbackgroundrowdata
@@ -2887,21 +2804,27 @@
\glet\m_table_current_row_background_filler\empty
\to \t_tabl_tabulate_every_after_row
-\unexpanded\def\tabl_tabulate_NL_first[#1]%
+\permanent\protected\def\tabl_tabulate_NL_first[#1]%
{\tabl_tabulate_column_normal\zerocount\zerocount\relax
\ifcase\c_tabl_tabulate_column\or
\tabl_register_row_background{#1}%
\fi
\ignorespaces}
-\unexpanded\def\tabl_tabulate_ND_first
- {\tabl_tabulate_column_normal\zerocount\zerocount\relax
- \ifcase\c_tabl_tabulate_column\or
- \tabl_register_row_background\m_table_current_row_background_default
- \fi
- \ignorespaces}
+\pushoverloadmode
-\unexpanded\def\tabl_tabulate_LB_first[#1]%
+ % redefinition needs checking
+
+ \permanent\overloaded\protected\def\tabl_tabulate_ND_first
+ {\tabl_tabulate_column_normal\zerocount\zerocount\relax
+ \ifcase\c_tabl_tabulate_column\or
+ \tabl_register_row_background\m_table_current_row_background_default
+ \fi
+ \ignorespaces}
+
+\popoverloadmode
+
+\permanent\protected\def\tabl_tabulate_LB_first[#1]%
{\tabl_tabulate_column_normal\plusone\zerocount\relax
\ifcase\c_tabl_tabulate_column\or
\tabl_register_row_background{#1}%
@@ -2909,30 +2832,30 @@
\usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
\ignorespaces}
-\unexpanded\def\tabl_tabulate_DB_first
+\permanent\protected\def\tabl_tabulate_DB_first
{\tabl_tabulate_column_normal\plusone\zerocount\relax
\ifcase\c_tabl_tabulate_column\or
\tabl_register_row_background\m_table_current_row_background_default
\fi
- \let\fontstyle\globalfontstyle
+ \enforced\let\fontstyle\globalfontstyle
\usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
\ignorespaces}
-\unexpanded\def\tabl_tabulate_NF_first[#1]%
+\permanent\protected\def\tabl_tabulate_NF_first[#1]%
{\tabl_tabulate_column_normal\zerocount\zerocount\relax
\ifcase\c_tabl_tabulate_column\or
\tabl_register_row_background_filler{#1}%
\fi
\ignorespaces}
-\unexpanded\def\tabl_tabulate_NP_first
+\permanent\protected\def\tabl_tabulate_NP_first
{\tabl_tabulate_column_normal\zerocount\zerocount\relax
\ifcase\c_tabl_tabulate_column\or
\tabl_register_row_background_filler\m_table_current_row_background_default_filler
\fi
\ignorespaces}
-\unexpanded\def\tabl_tabulate_FB_first[#1]%
+\permanent\protected\def\tabl_tabulate_FB_first[#1]%
{\tabl_tabulate_column_normal\plusone\zerocount\relax
\ifcase\c_tabl_tabulate_column\or
\tabl_register_row_background_filler{#1}%
@@ -2940,41 +2863,45 @@
\usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
\ignorespaces}
-\unexpanded\def\tabl_tabulate_PB_first
+\permanent\protected\def\tabl_tabulate_PB_first
{\tabl_tabulate_column_normal\plusone\zerocount\relax
\ifcase\c_tabl_tabulate_column\or
\tabl_register_row_background_filler\m_table_current_row_background_default_filler
\fi
- \let\fontstyle\globalfontstyle
+ \enforced\let\fontstyle\globalfontstyle
\usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
\ignorespaces}
-\unexpanded\def\tabl_tabulate_BC_first % overloaded
- {\tabl_tabulate_column_normal\plusone\zerocount
- \let\fontstyle\globalfontstyle
- \ifx\m_table_current_row_background\empty
- \ifx\m_table_current_row_background_filler\empty
- \usetabulationstyleandcolor\c!headstyle\c!headcolor
- \else
- \usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
- \fi
- \else
- \usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
- \fi}
+\pushoverloadmode
+
+ \permanent\overloaded\protected\def\tabl_tabulate_BC_first
+ {\tabl_tabulate_column_normal\plusone\zerocount
+ \enforced\let\fontstyle\globalfontstyle
+ \ifempty\m_table_current_row_background
+ \ifempty\m_table_current_row_background_filler
+ \usetabulationstyleandcolor\c!headstyle\c!headcolor
+ \else
+ \usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
+ \fi
+ \else
+ \usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
+ \fi}
+
+\popoverloadmode
-\unexpanded\def\tabl_tabulate_A_first
+\permanent\protected\def\tabl_tabulate_A_first
{\global\advance\c_tabl_tabulate_autocolor\plusone
\edef\m_table_current_row_background_auto{\tabulateparameter{\c!backgroundcolor:\number\c_tabl_tabulate_autocolor}}%
- \ifx\m_table_current_row_background_auto\empty
+ \ifempty\m_table_current_row_background_auto
\global\c_tabl_tabulate_autocolor\plusone
\edef\m_table_current_row_background_auto{\tabulateparameter{\c!backgroundcolor:\number\c_tabl_tabulate_autocolor}}%
\fi
- \ifx\m_table_current_row_background_auto\empty
+ \ifempty\m_table_current_row_background_auto
\let\m_table_current_row_background_auto\empty % \m_table_current_row_background_default
\fi
\tabl_register_row_background{\m_table_current_row_background_auto}}
-\unexpanded\def\tabl_tabulate_NA_first
+\permanent\protected\def\tabl_tabulate_NA_first
{\tabl_tabulate_column_normal\zerocount\zerocount\relax
\iftrialtypesetting\else
\ifcase\c_tabl_tabulate_column\or
@@ -2983,7 +2910,7 @@
\fi
\ignorespaces}
-\unexpanded\def\tabl_tabulate_BA_first
+\permanent\protected\def\tabl_tabulate_BA_first
{\tabl_tabulate_column_normal\plusone\zerocount\relax
\iftrialtypesetting\else
\ifcase\c_tabl_tabulate_column\or
@@ -2994,16 +2921,16 @@
\ignorespaces}
\appendtoks
- \let\NL\tabl_tabulate_NL_first % NC with Line
- \let\ND\tabl_tabulate_ND_first % NC with Default Line
- \let\LB\tabl_tabulate_LB_first % BC with Line
- \let\DB\tabl_tabulate_DB_first % BC with Default Line
- \let\NF\tabl_tabulate_NF_first % NC with Filler
- \let\NP\tabl_tabulate_NP_first % NC with Predefined Filler
- \let\FB\tabl_tabulate_FB_first % BC with Filler
- \let\PB\tabl_tabulate_PB_first % BC with Predefined Filler
- \let\NA\tabl_tabulate_NA_first % NC with Auto Line
- \let\BA\tabl_tabulate_BA_first % NC with Auto Line
+ \enforced\let\NL\tabl_tabulate_NL_first % NC with Line
+ \enforced\let\ND\tabl_tabulate_ND_first % NC with Default Line
+ \enforced\let\LB\tabl_tabulate_LB_first % BC with Line
+ \enforced\let\DB\tabl_tabulate_DB_first % BC with Default Line
+ \enforced\let\NF\tabl_tabulate_NF_first % NC with Filler
+ \enforced\let\NP\tabl_tabulate_NP_first % NC with Predefined Filler
+ \enforced\let\FB\tabl_tabulate_FB_first % BC with Filler
+ \enforced\let\PB\tabl_tabulate_PB_first % BC with Predefined Filler
+ \enforced\let\NA\tabl_tabulate_NA_first % NC with Auto Line
+ \enforced\let\BA\tabl_tabulate_BA_first % NC with Auto Line
\to \t_tabl_tabulate_initializers_first
\appendtoks
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-tsp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/tabl-tsp.mkxl
new file mode 100644
index 00000000000..5f01e7eb4ae
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-tsp.mkxl
@@ -0,0 +1,580 @@
+%D \module
+%D [ file=tabl-tsp,
+%D version=2000.10.20,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Splitting,
+%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 Table Macros / Splitting}
+
+%D The code in this file is moved here from other places and needs a mkiv cleanup.
+%D As it mostly targets at tables the code lives in the tabl and page namespaces.
+
+% work in progress
+
+\unprotect
+
+%D Although the name resembles floats, and therefore this should be a page module,
+%D we decided to make it core functionality because the table code depends on it.
+%D Othrwise there would be too much overloading afterwards involved. Actually, the
+%D float part is rather generic and not that related to floats.
+
+% \splitfloat [settings] {\placetable[optional args]{test}} {content}
+
+%D When \type {inbetween} is made empty instead of the default \type {\page}, we
+%D will get delayed flushing and text may continue below the graphic.
+%D
+%D \starttyping
+%D \dorecurse{2}{\input tufte }
+%D
+%D \splitfloat[lines=auto,inbetween=]
+%D {\placetable{\dorecurse{5}{test\recurselevel\endgraf}}}
+%D {\bTABLE[split=yes]
+%D \bTR \bTD 11 \eTD \bTD \input tufte \eTD \eTR
+%D \bTR \bTD 12 \eTD \bTD \input zapf \eTD \eTR
+%D \bTR \bTD 13 \eTD \bTD \input bryson \eTD \eTR
+%D \bTR \bTD 14 \eTD \bTD test \eTD \eTR
+%D \bTR \bTD 21 \eTD \bTD \input tufte \eTD \eTR
+%D \bTR \bTD 22 \eTD \bTD \input zapf \eTD \eTR
+%D \bTR \bTD 23 \eTD \bTD \input bryson \eTD \eTR
+%D \bTR \bTD 24 \eTD \bTD test \eTD \eTR
+%D \bTR \bTD 31 \eTD \bTD \input tufte \eTD \eTR
+%D \bTR \bTD 32 \eTD \bTD \input zapf \eTD \eTR
+%D \bTR \bTD 33 \eTD \bTD \input bryson \eTD \eTR
+%D \bTR \bTD 34 \eTD \bTD test \eTD \eTR
+%D \eTABLE}
+%D
+%D \dorecurse{10}{\input tufte }
+%D \stoptyping
+
+\installcorenamespace{floatsplitting}
+
+\installdirectcommandhandler \??floatsplitting {floatsplitting} % \??floatsplitting
+
+\setupfloatsplitting
+ [\c!conversion=\v!character, % \v!romannumerals
+ \c!lines=3,
+ \c!before=,
+ \c!inbetween=\page,
+ \c!after=]
+
+\newconditional\splitfloatfirstdone
+\newconditional\somenextsplitofffloat
+\newconditional\splitfloatdone
+\newconditional\onlyonesplitofffloat \settrue\onlyonesplitofffloat
+
+\newif \ifinsidesplitfloat % will become conditional
+
+\newcount \noffloatssplits
+\newtoks \everysplitfloatsetup
+
+\mutable\let \extrasplitfloatlines \!!zerocount
+\mutable\let \splitfloatfinalizer \relax
+\mutable\let \splitfloatcommand \empty
+
+\mutable\let \floatcaptionsuffix \empty
+
+\permanent\tolerant\protected\def\splitfloat[#1]#:#2% nog dubbele refs
+ {\bgroup
+ \global\setfalse\splitfloatdone
+ \aftergroup\page_split_float_check
+ \insidefloattrue
+ \insidesplitfloattrue
+ \setupcurrentfloatsplitting[#1]%
+ \global\noffloatssplits\zerocount
+ \let\floatcaptionsuffix\page_split_float_suffix
+ \edef\extrasplitfloatlines{\floatsplittingparameter\c!lines}%
+ \the\everysplitfloatsetup
+ \def\splitfloatcommand{#2}%
+ \global\settrue \onlyonesplitofffloat
+ \global\setfalse\somenextsplitofffloat
+ \page_floats_push_saved
+ \floatsplittingparameter\c!before
+ \let\next} % \bgroup
+
+\protected\def\page_split_float_suffix
+ {\begingroup
+ \usefloatsplittingstyleandcolor\c!style\c!color % only the suffix
+ \convertnumber{\floatsplittingparameter\c!conversion}\noffloatssplits
+ \endgroup}
+
+\protected\def\page_split_float_check
+ {\ifconditional\splitfloatdone
+ \splitfloatfinalizer % a weird place (could interfere with flushing)
+ \else
+ \blank
+ \begingroup
+ \tttf \dontleavehmode \getmessage\m!floatblocks{13}\empty
+ \endgroup
+ \blank
+ \showmessage\m!floatblocks{13}\empty
+ \fi}
+
+\def\page_split_float_process % nextbox
+ {\ifinsidesplitfloat
+ \expandafter\page_split_float_process_yes
+ \else
+ \expandafter\page_split_float_process_nop
+ \fi}
+
+\def\page_split_float_process_yes
+ {\dowithnextboxcs\page_split_float_process_finish\vbox}
+
+\def\page_split_float_process_finish
+ {\forgetall
+ \dontcomplain
+ \global\settrue\splitfloatdone
+ % \nodelocationmode\zerocount % bypass auto-renumbering
+ \global\advance\noffloatssplits\plusone
+ \ifcase\noffloatssplits\relax \or
+ \ifconditional\onlyonesplitofffloat
+ \let\floatcaptionsuffix\empty
+ \fi
+ \fi
+ \bgroup
+ \ifconditional\somenextsplitofffloat
+ \notesenabledfalse % best here, experimental, brrr; test with note in caption
+ \fi
+ \splitfloatcommand{\box\nextbox}%
+ \egroup
+ \ifconditional\somenextsplitofffloat
+ \edef\p_inbetween{\floatsplittingparameter\c!inbetween}%
+ \ifempty\p_inbetween
+ \ifconditional\splitfloatfirstdone\else\page\fi
+ \else
+ \p_inbetween
+ \fi
+ \else
+ \floatsplittingparameter\c!after
+ \page_floats_pop_saved
+ \page_floats_flush_saved
+ \fi
+ \global\settrue\splitfloatfirstdone}
+
+\def\page_split_float_process_nop
+ {\dowithnextboxcs\page_split_float_process_nop_finish\vbox}
+
+\def\page_split_float_process_nop_finish
+ {\forgetall
+ \dontcomplain
+ \box\nextbox % maybe an option to unvbox
+ \global\settrue\splitfloatfirstdone}
+
+\def\page_split_float_check_content#1% box
+ {\ifinsidesplitfloat
+ % \ifdim\ht#1=\zeropoint % funny: \ifcase does not check for overflow
+ \ifcase\ht#1\relax
+ \global\setfalse\somenextsplitofffloat
+ \else
+ \global\settrue \somenextsplitofffloat
+ \global\setfalse\onlyonesplitofffloat
+ \fi
+ \fi}
+
+\def\page_split_float_check_caption#1% depends on page-flt .. pretty messy
+ {\edef\extrasplitfloatlines{\extrasplitfloatlines}%
+ \ifx\extrasplitfloatlines\v!auto
+ \bgroup
+ \forcelocalfloats
+ \setuplocalfloats[\c!before=,\c!after=,\c!inbetween=]%
+ % This controls samepage resetting too but it also messes up the numbering
+ % so I need another fix.
+% \settrialtypesetting
+ \splitfloatcommand{\hbox to #1{\strut}}% dummy line
+% \resettrialtypesetting
+ \setbox\scratchbox\vbox{\flushlocalfloats}% \vpack ?
+ \getnoflines{\ht\scratchbox}%
+ \resetlocalfloats
+ \advance\noflines\minusone % compensate dummy line
+ \normalexpanded{\egroup\noexpand\edef\noexpand\extrasplitfloatlines{\the\noflines}}%
+ \global\settrue\usesamefloatnumber
+ \else
+ \doifelsenumber\extrasplitfloatlines\donothing{\def\extrasplitfloatlines{1}}%
+ \fi}
+
+\permanent\protected\def\doifnotinsidesplitfloat
+ {\ifinsidesplitfloat
+ \expandafter\gobbleoneargument
+ \fi}
+
+%D Table splitter, on top of previous code:
+
+% todo: keep tail to rest, so we need a lookahead
+
+\newbox\b_split_content
+\newbox\b_split_result
+\newbox\b_split_head
+\newbox\b_split_next
+\newbox\b_split_tail
+
+\newtoks\t_split_before_result
+\newtoks\t_split_after_result
+\newtoks\t_split_before
+\newtoks\t_split_inbetween
+\newtoks\t_split_after
+
+\newtoks\everyresettsplit
+
+\newcount\c_split_minimum_free_lines
+
+\newdimen\d_split_minimum_free_space
+\newdimen\d_split_available_height
+\newdimen\d_split_inbetween_height
+
+\newconditional\c_tabl_split_done
+\newconditional\c_tabl_split_head
+\newconditional\c_tabl_split_full
+
+\newconditional\tabl_split_forced_page
+
+\appendtoks
+ \c_split_minimum_free_lines\zerocount
+ \d_split_minimum_free_space\zeropoint
+ \setbox\b_split_content \emptyvbox
+ \setbox\b_split_result \emptyvbox
+ \setbox\b_split_head \emptyvbox
+ \setbox\b_split_next \emptyvbox
+ \setbox\b_split_tail \emptyvbox
+ \t_split_before_result \emptytoks
+ \t_split_after_result \emptytoks
+ \t_split_inbetween \emptytoks
+ \t_split_before \emptytoks
+ \t_split_after \emptytoks
+ \let\postprocesstsplit \donothing
+\to \everyresettsplit
+
+\mutable\let\postprocesstsplit\donothing
+
+\permanent\protected\def\resettsplit
+ {\the\everyresettsplit}
+
+\resettsplit
+
+\mutable\def\tsplitdirectwidth{\hsize}
+
+\permanent\protected\def\handletsplit
+ {\page_split_float_check_caption{\wd\b_split_content}%
+ \global\setfalse\splitfloatfirstdone
+ \testpagesync % new, sync, but still tricky
+ [\number\c_split_minimum_free_lines]
+ [\dimexpr\d_split_minimum_free_space+\extrasplitfloatlines\lineheight\relax]%
+ \setbox\scratchbox\vbox{\the\t_split_inbetween}%
+ \d_split_inbetween_height\htdp\scratchbox
+ \setfalse\c_tabl_split_done
+ \doloop\tabl_split_loop_body
+ \global\setfalse\usesamefloatnumber % new, prevent next increment
+ \global\setfalse\splitfloatfirstdone} % we can use this one for tests
+
+\def\tabl_split_loop_body
+ {\ifinsidecolumns
+ % brrr, assumes empty columns
+ \global\setfalse\splitfloatfirstdone
+ \d_split_available_height\textheight
+ \settrue\c_tabl_split_full
+ \else
+ \ifconditional\splitfloatfirstdone
+ \d_split_available_height\textheight
+ \settrue\c_tabl_split_full
+ \orelse\ifdim\pagegoal<\maxdimen
+ \d_split_available_height\dimexpr\pagegoal-\pagetotal\relax
+ \setfalse\c_tabl_split_full
+ \else
+ \d_split_available_height\textheight
+ \settrue\c_tabl_split_full
+ \fi
+ \fi
+ \d_split_available_height \dimexpr
+ \d_split_available_height
+ -\d_split_inbetween_height
+ -\d_split_minimum_free_space
+ -\extrasplitfloatlines\lineheight
+ \relax
+ \ifdim\htdp\b_split_tail>\zeropoint
+ \advance\d_split_available_height-\htdp\b_split_tail
+ \fi
+ \setbox\b_split_result\vbox
+ {\ifdim\ht\b_split_head>\zeropoint
+ \unvcopy\b_split_head
+ \the\t_split_inbetween
+ \fi}%
+ \ifconditional\c_tabl_split_done \else
+ \ifdim\ht\b_split_next>\zeropoint
+ \setbox\b_split_head\box\b_split_next
+ \fi
+ \fi
+ \settrue\c_tabl_split_done
+ \ifdim\ht\b_split_result>\zeropoint
+ \settrue\c_tabl_split_head % table head
+ \else
+ \setfalse\c_tabl_split_head % no tablehead
+ \fi
+ \splittopskip\zeropoint
+ \doloop % inner loop
+ {\setbox\scratchbox\vsplit\b_split_content to \onepoint % \lineheight
+ \setbox\scratchbox\vbox % \vpack
+ {\unvbox\scratchbox
+ \setbox\scratchbox\vbox % \vpack
+ {\splitdiscards
+ \ifnum\lastpenalty>-\plustenthousand\else
+ % so that \bTR[before=\page] works
+ \global\settrue\tabl_split_forced_page
+ \fi}}%
+ \ifconditional\tabl_split_forced_page
+ \global\setfalse\tabl_split_forced_page
+ \setbox\b_split_result\vbox
+ {\unvbox\b_split_result
+ \the\t_split_inbetween
+ \unvbox\scratchbox}%
+ \exitloop
+ \orelse\ifdim\dimexpr\d_split_available_height-\htdp\scratchbox-\htdp\b_split_result\relax>\zeropoint
+ \setbox\b_split_result\vbox
+ {\unvbox\b_split_result
+ \the\t_split_inbetween
+ \unvbox\scratchbox}%
+ \ifvoid\b_split_content \exitloop \fi
+ \orelse\ifconditional\c_tabl_split_head
+ % we only have a tablehead so far
+ \setbox\b_split_result\vbox{\unvbox\b_split_result\unvbox\scratchbox}% \vpack
+ \exitloop
+ \orelse\ifconditional\c_tabl_split_full
+ % we have text height available, but the (one) cell is too
+ % large to fit, so, in order to avoid loops/deadcycles we do:
+ \setbox\b_split_result\vbox
+ {\unvbox\b_split_result
+ \the\t_split_inbetween
+ \unvbox\scratchbox}%
+ \exitloop
+ \else
+ \setbox\b_split_content\vbox
+ {\unvbox\scratchbox
+ \the\t_split_inbetween
+ \ifvoid\b_split_content\else\unvbox\b_split_content\fi}%
+ \exitloop
+ \fi
+ \setfalse\c_tabl_split_head
+ \setfalse\c_tabl_split_full}%
+ \postprocesstsplit
+ \page_split_float_check_content\b_split_content
+ \ifvoid\b_split_content
+ \setbox\b_split_result\vbox
+ {\unvbox\b_split_result
+ \the\t_split_inbetween
+ \unvcopy\b_split_tail}%
+ \page_split_float_process{\the\t_split_before_result\box\b_split_result\the\t_split_after_result}%
+ \doifnotinsidesplitfloat{\the\t_split_after}%
+ \endgraf
+ \exitloop
+ \else
+ % hack
+ \ifdim\pagegoal<\maxdimen
+ \pagegoal\dimexpr\pagegoal+\lineheight\relax % etex
+ \fi
+ % brrr
+ \ifdim\ht\b_split_result>\zeropoint
+ \setbox\b_split_result\vbox
+ {\unvbox\b_split_result
+ \the\t_split_inbetween
+ \unvcopy\b_split_tail}%
+ \page_split_float_process{\the\t_split_before_result\box\b_split_result\the\t_split_after_result}%
+ \doifnotinsidesplitfloat{\the\t_split_after}%
+ \endgraf
+ \global\settrue\usesamefloatnumber % new, prevent next increment
+ \fi
+ \ifinsidecolumns
+ \goodbreak % was \doifnotinsidesplitfloat\goodbreak
+ \else
+ \page % was \doifnotinsidesplitfloat\page
+ \fi
+ \fi}
+
+%D The next one assumes that the split takes place elsewhere. This is used in
+%D xtables.
+
+\aliased\let\resetdirecttsplit\resettsplit
+
+\mutable\let\tsplitdirectsplitter\relax
+
+\permanent\protected\def\handledirecttsplit
+ {\page_split_float_check_caption{\tsplitdirectwidth}%
+ \global\setfalse\splitfloatfirstdone
+ \testpagesync % new, sync, but still tricky
+ [\number\c_split_minimum_free_lines]
+ [\dimexpr\d_split_minimum_free_space+\extrasplitfloatlines\lineheight\relax]%
+ \doloop\tabl_split_direct_loop_body
+ \global\setfalse\usesamefloatnumber % new, prevent next increment
+ \global\setfalse\splitfloatfirstdone} % we can use this one for tests
+
+\def\tabl_split_direct_loop_body
+ {\ifinsidecolumns
+ \global\setfalse\splitfloatfirstdone
+ \d_split_available_height\textheight
+ \orelse\ifconditional\splitfloatfirstdone
+ \d_split_available_height\textheight
+ \orelse\ifdim\pagegoal<\maxdimen
+ \d_split_available_height\dimexpr\pagegoal-\pagetotal\relax
+ \else
+ \d_split_available_height\textheight
+ \fi
+ \d_split_available_height\dimexpr
+ \d_split_available_height
+ -\d_split_minimum_free_space
+ -\extrasplitfloatlines\lineheight
+ \relax
+ \tsplitdirectsplitter\d_split_available_height % also sets state
+ \ifdim\ht\b_split_result>\zeropoint
+ \ifconditional\somenextsplitofffloat
+ \global\setfalse\onlyonesplitofffloat
+ \fi
+ \ifdim\pagegoal<\maxdimen
+ \pagegoal\dimexpr\pagegoal+\lineheight\relax % etex
+ \fi
+ \page_split_float_process{\the\t_split_before_result\box\b_split_result\the\t_split_after_result}%
+ \global\settrue\usesamefloatnumber % new, prevent next increment
+ \endgraf
+ \ifconditional\somenextsplitofffloat
+ \ifinsidecolumns
+ \goodbreak
+ \else
+ \page
+ \fi
+ \fi
+ \global\settrue\splitfloatfirstdone
+ \orelse\ifconditional\somenextsplitofffloat
+ \ifinsidecolumns
+ \goodbreak
+ \else
+ \page % no room
+ \fi
+ \else
+ \exitloop
+ \fi}
+
+%D Maybe handy:
+%D
+%D \starttyping
+%D \splitfloat
+%D {\placefigure{some caption}}
+%D {\startsplittext
+%D \typefile[option=TEX,before=,after=]{oeps.tex}
+%D \stopsplittext}
+%D \stoptyping
+
+\permanent\def\handlesplittext#1%
+ {\setbox\b_split_result\vbox
+ {\vsplit\b_split_content to \dimexpr#1-\lineheight\relax}}
+
+\permanent\protected\def\startsplittext
+ {\begingroup
+ \resettsplit
+ \c_split_minimum_free_lines\zerocount
+ \d_split_minimum_free_space\zeropoint
+ \let\extrasplitfloatlines \!!plusone
+ \let\tsplitdirectsplitter \handlesplittext
+ \setbox\b_split_content\vbox\bgroup
+ \insidefloattrue}
+
+\permanent\protected\def\stopsplittext
+ {\egroup
+ \handledirecttsplit
+ \endgroup}
+
+\protect \endinput
+
+% test cases
+
+% \setupTABLE[split=repeat]
+%
+% \input tufte \endgraf
+% \splitfloat[lines=11]
+% {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
+% {\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \splitfloat[lines=0]
+% {}
+% {\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
+% \input tufte \endgraf \page
+%
+% \input tufte \endgraf
+% \bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE
+% \input tufte \page
+
+% \setuptabulate[split=yes]
+%
+% \input tufte \endgraf
+% \splitfloat[lines=11]
+% {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
+% {\starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \splitfloat[lines=0]
+% {}
+% {\starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate
+% \input tufte \page
+
+% \setuptables[split=yes]
+%
+% \newtoks\TestToks
+%
+% \TestToks\emptytoks
+% \appendtoks\starttablehead\to\TestToks
+% \dorecurse{3}{\appendtoks\VL head \VL head \VL \SR\to\TestToks}
+% \appendtoks\stoptablehead\to\TestToks
+% \appendtoks\starttabletail\to\TestToks
+% \dorecurse{3}{\appendtoks\VL tail \VL tail \VL \SR\to\TestToks}
+% \appendtoks\stoptabletail\to\TestToks
+% \appendtoks\starttables[|c|c|]\to\TestToks
+% \dorecurse{100}{\appendtoks\VL test \VL test \VL \SR\to\TestToks}
+% \appendtoks\stoptables\to\TestToks
+%
+% \input tufte \endgraf
+% \splitfloat[lines=auto] % [lines=11]
+% {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
+% {\the\TestToks}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \splitfloat[lines=0]
+% {}
+% {\the\TestToks}
+% \input tufte \page
+%
+% \input tufte \endgraf
+% \the\TestToks
+% \input tufte \page
+%
+% multiple floats
+%
+% \starttext
+% \dorecurse{3}{\input tufte } \endgraf
+% \dorecurse{5}{\placefigure{}{\framed[height=.5\textheight]{}}}
+% \splitfloat[lines=auto,inbetween=]
+% {\placetable{\dorecurse{5}{test\recurselevel\endgraf}}}
+% {\bTABLE[split=yes]
+% \bTR \bTD 11 \eTD \bTD \input tufte \eTD \eTR
+% \bTR \bTD 12 \eTD \bTD \input zapf \eTD \eTR
+% \bTR \bTD 13 \eTD \bTD \input bryson \eTD \eTR
+% \bTR \bTD 14 \eTD \bTD test \eTD \eTR
+% \bTR \bTD 21 \eTD \bTD \input tufte \eTD \eTR
+% \bTR \bTD 22 \eTD \bTD \input zapf \eTD \eTR
+% \bTR \bTD 23 \eTD \bTD \input bryson \eTD \eTR
+% \bTR \bTD 24 \eTD \bTD test \eTD \eTR
+% \bTR \bTD 31 \eTD \bTD \input tufte \eTD \eTR
+% \bTR \bTD 32 \eTD \bTD \input zapf \eTD \eTR
+% \bTR \bTD 33 \eTD \bTD \input bryson \eTD \eTR
+% \bTR \bTD 34 \eTD \bTD test \eTD \eTR
+% \eTABLE}
+% \dorecurse{10}{\input tufte }
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-xnt.mklx b/Master/texmf-dist/tex/context/base/mkxl/tabl-xnt.mklx
new file mode 100644
index 00000000000..f2a41c500fe
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-xnt.mklx
@@ -0,0 +1,142 @@
+% macros=mkvi
+
+%D \module
+%D [ file=tabl-xtb,
+%D version=2011.10.28,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Natural to Xtreme Tables,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Table Macros / Natural to Xtreme Tables}
+
+\unprotect
+
+%D Don't expect wonders but it might come in handy:
+%D
+%D \starttyping
+%D \mapTABLEtoxtable
+%D \restoreTABLEfromxtable
+%D \stoptyping
+%D
+%D We stick to a simple example:
+%D
+%D \startbuffer
+%D \bTABLE
+%D \bTR
+%D \bTD[width=1cm,background=color,backgroundcolor=red] one \eTD
+%D \bTD[width=2cm] two \eTD
+%D \eTR
+%D \bTR
+%D \bTD alpha \eTD
+%D \bTD beta \eTD
+%D \eTR
+%D \eTABLE
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startbuffer
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+%D
+%D \startlinecorrection
+%D \mapTABLEtoxtable \getbuffer
+%D \stoplinecorrection
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\pushoverloadmode % this file is runtime loaded
+
+\overloaded\permanent\let\tabl_x_normal_bTABLEhead\bTABLEhead
+\overloaded\permanent\let\tabl_x_normal_eTABLEhead\eTABLEhead
+\overloaded\permanent\let\tabl_x_normal_bTABLEnext\bTABLEnext
+\overloaded\permanent\let\tabl_x_normal_eTABLEnext\eTABLEnext
+\overloaded\permanent\let\tabl_x_normal_bTABLEfoot\bTABLEfoot
+\overloaded\permanent\let\tabl_x_normal_eTABLEfoot\eTABLEfoot
+\overloaded\permanent\let\tabl_x_normal_bTABLEbody\bTABLEbody
+\overloaded\permanent\let\tabl_x_normal_eTABLEbody\eTABLEbody
+\overloaded\permanent\let\tabl_x_normal_bTR \bTR
+\overloaded\permanent\let\tabl_x_normal_eTR \eTR
+\overloaded\permanent\let\tabl_x_normal_bTD \bTD
+\overloaded\permanent\let\tabl_x_normal_eTD \eTD
+\overloaded\permanent\let\tabl_x_normal_bTH \bTH
+\overloaded\permanent\let\tabl_x_normal_eTH \eTH
+\overloaded\permanent\let\tabl_x_normal_setupTABLE\setupTABLE
+\overloaded\permanent\let\tabl_x_normal_bTABLE \bTABLE
+\overloaded\permanent\let\tabl_x_normal_eTABLE \eTABLE
+
+\permanent\protected\def\restoreTABLEfromxtable
+ {\enforced\let\bTABLEhead\tabl_x_normal_bTABLEhead
+ \enforced\let\eTABLEhead\tabl_x_normal_eTABLEhead
+ \enforced\let\bTABLEnext\tabl_x_normal_bTABLEnext
+ \enforced\let\eTABLEnext\tabl_x_normal_eTABLEnext
+ \enforced\let\bTABLEfoot\tabl_x_normal_bTABLEfoot
+ \enforced\let\eTABLEfoot\tabl_x_normal_eTABLEfoot
+ \enforced\let\bTABLEbody\tabl_x_normal_bTABLEbody
+ \enforced\let\eTABLEbody\tabl_x_normal_eTABLEbody
+ \enforced\let\bTR \tabl_x_normal_bTR
+ \enforced\let\eTR \tabl_x_normal_eTR
+ \enforced\let\bTD \tabl_x_normal_bTD
+ \enforced\let\eTD \tabl_x_normal_eTD
+ \enforced\let\bTH \tabl_x_normal_bTH
+ \enforced\let\eTH \tabl_x_normal_eTH
+ \enforced\let\setupTABLE\tabl_x_normal_setupTABLE
+ \enforced\let\bTABLE \tabl_x_normal_bTABLE
+ \enforced\let\eTABLE \tabl_x_normal_eTABLE}
+
+\permanent\protected\def\mapTABLEtoxtable
+ {\enforced\let\bTABLEhead\startxtablehead
+ \enforced\let\eTABLEhead\stopxtablehead
+ \enforced\let\bTABLEnext\startxtablefoot
+ \enforced\let\eTABLEnext\stopxtablefoot
+ \enforced\let\bTABLEfoot\startxtablefoot
+ \enforced\let\eTABLEfoot\stopxtablefoot
+ \enforced\let\bTABLEbody\startxtablebody
+ \enforced\let\eTABLEbody\stopxtablebody
+ \enforced\let\bTR \startxrow
+ \enforced\let\eTR \stopxrow
+ \enforced\let\bTD \startxcell
+ \enforced\let\eTD \stopxcell
+ \enforced\let\bTH \tabl_x_TABLE_TH_start_cell
+ \enforced\let\eTH \tabl_x_TABLE_TH_stop_cell
+ \enforced\let\setupTABLE\tabl_x_TABLE_setup
+ \enforced\let\bTABLE \tabl_x_TABLE_start
+ \enforced\let\eTABLE \tabl_x_TABLE_stop}
+
+\popoverloadmode
+
+\permanent\protected\def\tabl_x_TABLE_TH_start_cell
+ {\startxcellgroup[\c!foregroundstyle=\v!bold]%
+ \startxcell}
+
+\permanent\protected\def\tabl_x_TABLE_TH_stop_cell
+ {\stopxcell
+ \stopxcellgroup}
+
+\permanent\protected\tolerant\def\tabl_x_TABLE_setup[#settings]%
+ {\ifarguments\or
+ %\ifparameter#1\or
+ \setupxtable[#settings]%
+ \fi}
+
+\permanent\protected\tolerant\def\tabl_x_TABLE_start[#settings]%
+ {\bgroup
+ \ifarguments\or
+ %\ifparameter#1\or
+ \tabl_x_prepare{#settings}%
+ \fi
+ \edef\tabl_x_current_buffer{\tabl_x_default_buffer}%
+ \buff_pickup\tabl_x_current_buffer{bTABLE}{eTABLE}\relax\tabl_x_process\zerocount}
+
+\permanent\protected\def\tabl_x_TABLE_stop
+ {\stopxtable}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.mklx b/Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.mklx
new file mode 100644
index 00000000000..b15d99c1221
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/tabl-xtb.mklx
@@ -0,0 +1,976 @@
+% macros=mkvi
+
+%D \module
+%D [ file=tabl-xtb,
+%D version=2011.10.26,
+%D title=\CONTEXT\ Table Macros,
+%D subtitle=Xtreme,
+%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 Table Macros / Xtreme}
+
+\registerctxluafile{tabl-xtb}{}
+
+% todo:
+%
+% - yes or no: foregroundstyle/color <- style/color
+% - template alignment
+% - maybe split horizontal (a la linetables)
+% - before/after and wrapping (linecorrection)
+% - maybe also some before/after commands
+% - maybe correction when non float usage
+% - tagging needs to be checked
+% - maybe only tag the box
+% - scale to fit
+%
+% - buffers permit verbatim but are not always handy
+
+%D This module started as an afternoon experiment and surprisingly could be
+%D mostly finished the same evening. Of course it builds upon existing
+%D functionality. The main reason for writing it is that we occasionally
+%D run into pretty large tables that take tens of pages and need to be split
+%D into floats. Speed is one issue there, avoiding to use vsplit is another.
+%D
+%D \starttyping
+%D \definextable [tag] | [tag][parent]
+%D \setupxtable [settings] | [tag][settings]
+%D
+%D \startxtable[tag|settings]
+%D \startxtablehead|\startxtablenext|\startxtablebody|\startxtablefoot
+%D \startxrowgroup[tag|settings]
+%D \startxrow[settings]
+%D \startxcellgroup[tag|settings]
+%D \startxcell[settings] ... \stopxcell
+%D \stopxcellgroup
+%D \stopxrow
+%D \startxrowgroup
+%D \stopxtablehead|\stopxtablenext|\stopxtablebody|\stopxtablefoot
+%D \stopxtable
+%D \stoptyping
+%D
+%D See xtables-001.tex etc for some examples.
+
+% We can avoid some checking by using the fastoptionalcheckcs helpers
+% instead of dosingleempty but the speed gain is neglectable.
+
+\unprotect
+
+% option=stretch : equal distribution
+% option={stretch,width} : proportional distribution
+% option={max} : prefer max over forced width/height
+%
+% cells: option=fixed : nils autostretch (not yet complete)
+
+% \setbox\scratchbox\hbox attr \taggedattribute \c_attr_tagged {...}
+
+\aliased\let\dotagxtablecell \relax % names will change
+\aliased\let\dotagxtablesignal\relax % names will change
+
+\appendtoks
+ \enforced\permanent\protected\def\dotagxtablecell
+ {\clf_settagtablecell
+ \numexpr\tablecellrows\relax
+ \numexpr\tablecellcolumns\relax
+ \numexpr\raggedstatus\relax}%
+ \enforced\permanent\protected\def\dotagxtablesignal
+ {\signalcharacter}% not used
+\to \everyenableelements
+
+\newdimen\d_tabl_x_width
+\newdimen\d_tabl_x_height
+\newdimen\d_tabl_x_depth % not used
+\newdimen\d_tabl_x_distance
+\newcount\c_tabl_x_nx
+\newcount\c_tabl_x_ny
+\newcount\c_tabl_x_mode
+\newbox \b_tabl_x
+\newcount\c_tabl_x_state % 0=empty 1=content 3=splitleft
+\newdimen\d_tabl_x_final_width
+\newcount\c_tabl_x_nesting
+\newcount\c_tabl_x_skip_mode % 1 = skip
+\newdimen\d_tabl_x_textwidth
+\newcount\c_tabl_x_swapped
+\newcount\c_tabl_x_swapped_max
+
+\let\m_tabl_x_swapped_settings\empty
+
+\aliased\let\currentxtablerow \clf_x_table_r
+\aliased\let\currentxtablecolumn\clf_x_table_c
+
+% \setupxtable[one][parent][a=b,c=d]
+% \setupxtable[one] [a=b,c=d]
+% \setupxtable [a=b,c=d]
+
+\installcorenamespace{xtable}
+\installcorenamespace{xtablecheck}
+\installcorenamespace{xtableswap}
+
+\installframedautocommandhandler \??xtable {xtable} \??xtable
+
+\appendtoks
+ \checkxtableparent % so we can deal with undefined settings, not that it's efficient
+\to \everysetupxtable
+
+\setupxtable[%
+ \c!nr=\plusone,
+ \c!nc=\plusone,
+ \c!nx=\plusone, % slow
+ \c!ny=\plusone, % slow
+ \c!align=\v!table, % {\v!flushleft,\v!broad,\v!high}, % just as \bTABLE .. \eTABLE
+ \c!frameoffset=.5\linewidth,
+ \c!backgroundoffset=\v!frame,
+ % \c!framecolor=\s!black,
+ % \c!foregroundstyle=\xtableparameter\c!style, % not clean, better capture elsewhere
+ % \c!foregroundcolor=\xtableparameter\c!color, % not clean, better capture elsewhere
+ % \c!bodyfont=,
+ \c!width=\v!fit,
+ \c!height=\v!fit,
+ \c!maxwidth=8\emwidth,
+ \c!autowidth=\v!yes, % controls framed
+ \c!rulethickness=\linewidth,
+ \c!strut=\v!yes,
+ \c!autostrut=\v!no,
+ \c!split=\v!auto, % a number will take that many lines
+ \c!splitoffset=\zeropoint, % extra space taken
+ \c!aligncharacter=\v!no,
+ \c!alignmentcharacter={,},
+ \c!alignmentleftsample=,
+ \c!alignmentrightsample=,
+ \c!alignmentleftwidth=\zeropoint,
+ \c!alignmentrightwidth=\zeropoint,
+ % \c!option=, % \v!stretch {\v!stretch,\v!width}
+ % \c!footer=,
+ % \c!header=,
+ \c!spaceinbetween=,
+ \c!textwidth=\v!local, % was \hsize,
+ \c!textheight=\vsize, % used for vertical spread
+ \c!distance=\zeropoint, % individual column
+ \c!columndistance=\zeropoint, % each column (whole table)
+ \c!leftmargindistance=\zeropoint, % whole table
+ \c!rightmargindistance=\zeropoint,% whole table
+]
+
+\def\tabl_x_default_buffer{x_table_\number\c_tabl_x_nesting}
+\let\tabl_x_current_buffer\empty
+
+\permanent\protected\def\startxtable{\tabl_x_start_table}
+
+\protected\tolerant\def\tabl_x_start_table[#settings]% maybe two arguments: [tag][settings] | [tag] | [settings]
+ {\bgroup
+ \tabl_x_prepare{#settings}%
+ \edef\tabl_x_current_buffer{\tabl_x_default_buffer}%
+ \buff_pickup{\tabl_x_current_buffer}{startxtable}{stopxtable}\relax\tabl_x_process\zerocount}
+
+% \permanent\protected\aliased\startxtable\tabl_x_start_table
+
+\aliased\permanent\let\stopxtable\relax
+
+% These direct buffers can be somewhat faster but it's probably neglectable.
+% Anyway, no nesting is supported as we then need to catch (e.g.) rows and keep
+% track of nesting and have a more complex redefinition of nested instanced
+% \unknown\ it's not worth the trouble. Only use them when you really need them and
+% use the embeddedxtable command when nesting them. Implementing nesting would be
+% slower than not using direct buffers.
+
+\permanent\tolerant\protected\def\processxtablebuffer[#name]%
+ {\bgroup
+ \let\tabl_x_start_table\tabl_x_process_buffer
+ \edef\tabl_x_current_buffer{#name}%
+ \tabl_x_get_buffer % settings
+ \tabl_x_process}
+
+\protected\tolerant\def\tabl_x_start_ignore[#settings]%
+ {}
+
+\protected\tolerant\def\tabl_x_process_buffer[#settings]%
+ {\tabl_x_prepare{#settings}%
+ \let\tabl_x_start_table\tabl_x_start_ignore
+ \gobbleuntil\stopxtable} % nested xtables are not supported,
+
+%D A bonus: you have to use the following construct inside a macro or
+%D direct buffer.
+
+\permanent\tolerant\protected\def\startembeddedxtable[#settings]#:#content\stopembeddedxtable
+ {\tabl_x_prepare{#settings}%
+ \clf_assignbuffer{embedded_x_table}{\detokenize{#content}}\catcodetable\relax
+ \bgroup
+ \let\tabl_x_start_table\tabl_x_process_buffer
+ \edef\tabl_x_current_buffer{embedded_x_table}%
+ \tabl_x_process}
+
+\aliased\permanent\let\stopembeddedxtable\relax
+
+%D We can also define xtables.
+
+\appendtoks
+ \permanent\setuevalue{\e!start\currentxtable}{\tabl_x_start_named[\currentxtable]}%
+ \permanent\setuevalue{\e!stop \currentxtable}{\tabl_x_stop_named}%
+\to \everydefinextable
+
+\protected\def\tabl_x_start_named[#tag]#spacer[#settings]%
+ {\bgroup
+ \edef\currentxtable{#tag}%
+ \advance\c_tabl_x_nesting\plusone
+ \dostarttaggedchained\t!table\empty\??xtable
+ \setupcurrentxtable[#settings]%
+ \tabl_x_check_textwidth
+ %\forgetall % else whitespace mess
+ \edef\tabl_x_current_buffer{\tabl_x_default_buffer}%
+ \normalexpanded{\buff_pickup{\tabl_x_current_buffer}{\e!start\currentxtable}{\e!stop\currentxtable}\relax\tabl_x_process\zerocount}}
+
+\protected\def\tabl_x_stop_named
+ {}
+
+%D Now we come to processing:
+
+\protected\def\tabl_x_check_textwidth
+ {\edef\p_textwidth{\xtableparameter\c!textwidth}%
+ \ifx\p_textwidth\v!local
+ \d_tabl_x_textwidth\availablehsize
+ \else
+ \d_tabl_x_textwidth\p_textwidth
+ \fi}
+
+\newtoks\everypreparextable
+
+\protected\def\tabl_x_prepare#settings%
+ {\advance\c_tabl_x_nesting\plusone
+ \dostarttaggedchained\t!table\empty\??xtable
+ \tabl_x_set_checked{#settings}%
+ \tabl_x_check_textwidth
+ \the\everypreparextable
+ }% else whitespace mess
+
+\def\tabl_x_get_buffer
+ {\clf_gettexbuffer{\tabl_x_current_buffer}}
+
+\let\tabl_x_start_row_yes \relax
+\let\tabl_x_start_row_nop \relax
+\let\tabl_x_stop_row \relax
+\let\tabl_x_start_cell_yes\relax
+\let\tabl_x_start_cell_nop\relax
+\let\tabl_x_stop_cell \relax
+
+\newtoks\t_table_x_cleanup
+
+\protected\def\tabl_x_process
+ {\begingroup % *
+ \forgetall % moved here
+ \dontcomplain % for the moment here till we figure out where we get the overflow
+ \usebodyfontparameter\xtableparameter
+ \setbox\scratchbox\vbox
+ {\doifsomething{\xtableparameter\c!spaceinbetween}{\blank[\xtableparameter\c!spaceinbetween]}}%
+ \clf_x_table_create
+ option {\xtableparameter\c!option}%
+ textwidth \d_tabl_x_textwidth
+ textheight \dimexpr\xtableparameter\c!textheight\relax
+ maxwidth \dimexpr\xtableparameter\c!maxwidth\relax
+ lineheight \openlineheight
+ columndistance \dimexpr\xtableparameter\c!columndistance\relax
+ leftmargindistance \dimexpr\xtableparameter\c!leftmargindistance\relax
+ rightmargindistance \dimexpr\xtableparameter\c!rightmargindistance\relax
+ rowdistance \ht\scratchbox
+ header {\xtableparameter\c!header}%
+ footer {\xtableparameter\c!footer}%
+ \relax
+ %
+ \letxtableparameter\c!option\empty
+ % not so nice but needed as we use this in the setup
+ \linewidth\xtableparameter\c!rulethickness\relax
+ % so we freeze it
+ \c_tabl_x_swapped_max\zerocount
+ \begingroup
+ \let\tabl_x_start_row_yes \tabl_x_start_row_reflow_width_yes
+ \let\tabl_x_start_row_nop \tabl_x_start_row_reflow_width_nop
+ \let\tabl_x_stop_row \tabl_x_stop_row_reflow_width
+ \let\tabl_x_start_cell_yes\tabl_x_start_cell_reflow_width_yes
+ \let\tabl_x_start_cell_nop\tabl_x_start_cell_reflow_width_nop
+ \let\tabl_x_stop_cell \tabl_x_stop_cell_reflow_width
+ \settrialtypesetting
+ \tabl_x_get_buffer
+ \ifcase\c_tabl_x_swapped_max
+ \else
+ \tabl_x_flush_swapped
+ \fi
+ \clf_x_table_reflow_width
+ \endgroup
+ \begingroup
+ \let\tabl_x_start_row_yes \tabl_x_start_row_reflow_height_yes
+ \let\tabl_x_start_row_nop \tabl_x_start_row_reflow_height_nop
+ \let\tabl_x_stop_row \tabl_x_stop_row_reflow_height
+ \let\tabl_x_start_cell_yes\tabl_x_start_cell_reflow_height_yes
+ \let\tabl_x_start_cell_nop\tabl_x_start_cell_reflow_height_nop
+ \let\tabl_x_stop_cell \tabl_x_stop_cell_reflow_height
+ \settrialtypesetting
+ \ifcase\c_tabl_x_swapped_max
+ \tabl_x_get_buffer
+ \else
+ \tabl_x_flush_swapped
+ \fi
+ \clf_x_table_reflow_height
+ \endgroup
+ \begingroup
+ \let\tabl_x_start_row_yes \tabl_x_start_row_construct_yes
+ \let\tabl_x_start_row_nop \tabl_x_start_row_construct_nop
+ \let\tabl_x_stop_row \tabl_x_stop_row_construct
+ \let\tabl_x_start_cell_yes\tabl_x_start_cell_construct_yes
+ \let\tabl_x_start_cell_nop\tabl_x_start_cell_construct_nop
+ \let\tabl_x_stop_cell \tabl_x_stop_cell_construct
+ \ifcase\c_tabl_x_swapped_max
+ \tabl_x_get_buffer
+ \else
+ \tabl_x_flush_swapped
+ \fi
+ \clf_x_table_construct
+ \endgroup
+ \endgroup % *
+ \ifinsidesplitfloat
+ \tabl_x_flush_float_split
+ \orelse\ifinsidefloat
+ \tabl_x_flush_float_normal
+ \else
+ \tabl_x_flush_text_checked
+ \fi
+ \clf_x_table_cleanup
+ \dostoptagged
+ \resetbuffer[\tabl_x_current_buffer]%
+ \resetcharacteralign
+ \the\t_table_x_cleanup
+ \egroup}
+
+% text flow split modes
+
+\installcorenamespace{xtableflushsplit}
+
+\protected\def\tabl_x_flush_text_checked
+ {\expandnamespaceparameter\??xtableflushsplit\xtableparameter\c!split\v!no}
+
+% in text flow: headers and footers only once
+
+\setvalue{\??xtableflushsplit\v!yes}%
+ {\clf_x_table_flush
+ method {\v!split}%
+ \relax}
+
+% in text flow: headers and footers only once
+
+\setvalue{\??xtableflushsplit\v!no}%
+ {% \noindent % gives extra line after table
+ % \noindentation % messes up the next indentation
+ % \dontleavehmode % no leftskip
+ \kern\zeropoint % yet another guess
+ \ignorespaces
+ \clf_x_table_flush
+ method {\v!normal}%
+ \relax
+ \removeunwantedspaces}
+
+% in text flow: headers and footers get repeated
+
+\setvalue{\??xtableflushsplit\v!repeat}%
+ {\doloop
+ {\clf_x_table_flush
+ method {\v!split}%
+ height \ifdim\pagegoal=\maxdimen\textheight\else\pagegoal\fi
+ \relax
+ \ifcase\c_tabl_x_state
+ \exitloop
+ \else
+ \page
+ \fi}}
+
+% \setvalue{\??xtableflushsplit\v!setups}%
+% {\directsetup{xtable:split:user}}
+%
+% \startsetups[xtable:split:user]
+% \doloop {
+% \xtablesplitflush % uses \xtablesplitvsize (a macro)
+% \ifcase\xtablesplitstate
+% \exitloop
+% \else
+% \page
+% \fi
+% }
+% \stopsetups
+%
+% \protected\def\xtablesplitflush
+% {\clf_x_table_flush
+% method {\v!split}%
+% height \dimexpr\xtablesplitvsize\relax
+% \relax}
+%
+% \def\xtablesplitvsize
+% {\ifdim\pagegoal=\maxdimen\textheight\else\pagegoal\fi}
+%
+% \let\xtablesplitstate\c_tabl_x_state
+
+\mutable\let\extraxtablesplitheight\zeropoint % might disappear so don't depend on it
+
+\protected\def\tabl_x_flush_float_normal
+ {\clf_x_table_flush
+ method {\v!normal}%
+ \relax}
+
+\protected\def\tabl_x_flush_float_split
+ {\resetdirecttsplit
+ \edef\extrasplitfloatlines{\xtableparameter\c!split}%
+ \d_split_minimum_free_space\dimexpr\extraxtablesplitheight+\xtableparameter\c!splitoffset\relax
+ %\c_split_minimum_free_lines\plustwo % not needed here as we're precise enough
+ \let\tsplitdirectsplitter\tabl_x_split_splitter
+ \let\tsplitdirectwidth \d_tabl_x_final_width
+ \handledirecttsplit}
+
+\protected\def\tabl_x_split_splitter#height%
+ {\setbox\b_split_result\vbox
+ {\clf_x_table_flush
+ method {\v!split}%
+ height \dimexpr#height\relax
+ \relax}%
+ \ifcase\c_tabl_x_state
+ \global\setfalse\somenextsplitofffloat
+ \else
+ \global\settrue \somenextsplitofffloat
+ \fi}
+
+% \permanent\protected\def\startxrow
+% {\begingroup
+% \doifelsenextoptionalcs\tabl_x_start_row_yes\tabl_x_start_row_nop}
+
+% \permanent\protected\def\stopxrow
+% {\tabl_x_stop_row
+% \endgroup}
+
+\protected\def\tabl_x_start_row_reflow_width_yes[#settings]%
+ {\setupcurrentxtable[#settings]%
+ \clf_x_table_next_row}
+
+\protected\def\tabl_x_start_row_reflow_width_nop
+ {\clf_x_table_next_row}
+
+\protected\def\tabl_x_stop_row_reflow_width
+ {}
+
+\let\tabl_x_start_row_reflow_height_yes\tabl_x_start_row_reflow_width_yes
+\let\tabl_x_start_row_reflow_height_nop\tabl_x_start_row_reflow_width_nop
+\let\tabl_x_stop_row_reflow_height \tabl_x_stop_row_reflow_width
+
+\protected\def\tabl_x_start_row_construct_yes[#settings]%
+ {\setupcurrentxtable[#settings]%
+ \dostarttagged\t!tablerow\empty
+ \clf_x_table_next_row_option{\xtableparameter\c!samepage}}
+
+\protected\def\tabl_x_start_row_construct_nop
+ {\dostarttagged\t!tablerow\empty
+ \clf_x_table_next_row}
+
+\protected\def\tabl_x_stop_row_construct
+ {\clf_x_table_finish_row
+ \dostoptagged}
+
+\permanent\protected\def\dummyxcell
+ {\begingroup
+ \enforced\let\inheritedxtableframed\relax
+ \tabl_x_start_cell_nop
+ \tabl_x_stop_cell
+ \endgroup}
+
+\def\tabl_x_setup_character_align
+ {\edef\p_left {\directxtableparameter\c!alignmentleftsample}%
+ \edef\p_right{\directxtableparameter\c!alignmentrightsample}%
+ \ifempty\p_left
+ \scratchdimenone\dimexpr\directxtableparameter\c!alignmentleftwidth\relax
+ \else
+ \setbox\scratchbox\hbox{\p_left}%
+ \scratchdimenone\wd\scratchbox
+ \fi
+ \ifempty\p_right
+ \scratchdimentwo\dimexpr\directxtableparameter\c!alignmentrightwidth\relax
+ \else
+ \setbox\scratchbox\hbox{\p_right}%
+ \scratchdimentwo\wd\scratchbox
+ \fi
+ \clf_setcharacteraligndetail
+ \clf_x_table_c
+ {\directxtableparameter\c!alignmentcharacter}%
+ \scratchdimenone
+ \scratchdimentwo
+ \relax}
+
+\newtoks\t_tabl_x_every_cell
+
+% \appendtoks
+% \inhibitblank % already in framed
+% \to \t_tabl_x_every_cell
+
+\appendtoks
+ \edef\p_characteralign{\directxtableparameter\c!aligncharacter}%
+ \ifx\p_characteralign\v!yes
+ \ifcase\clf_x_table_r\or
+ \tabl_x_setup_character_align
+ \fi
+ \signalcharacteralign\clf_x_table_c\clf_x_table_r
+ \fi
+\to \t_tabl_x_every_cell
+
+\protected\def\tabl_x_begin_of_cell
+ {\the\t_tabl_x_every_cell
+ \everypar{\delayedbegstrut}}
+
+\protected\def\tabl_x_end_of_cell
+ {\ifhmode
+ \delayedendstrut
+ \par
+ \else
+ \par
+ \ifdim\prevdepth<\zeropoint % =-1000pt ?
+ \vskip-\strutdp
+ \else
+ \removebottomthings
+ \fi
+ \fi}
+
+% For historic reasons we support both nx/nc and ny/nr : maybe nx/ny becomes
+% obsolete some day. The let as well as the direct speed things up a bit. We
+% could also consider a \defaultxtableparameter.
+%
+% \c_tabl_x_nx\defaultxtableparameter\c!nc{\defaultxtableparameter\c!nx\plusone}
+% \c_tabl_x_ny\defaultxtableparameter\c!nr{\defaultxtableparameter\c!ny\plusone}
+%
+% Although this becomes kind of messy. It saves already time that we only check
+% for it when we have settings.
+
+% \def\tabl_x_set_hsize
+% {\hsize.25\maxdimen} % let's be reasonable
+
+% \def\tabl_x_set_hsize
+% {\edef\p_width{\xtableparameter\c!width}%
+% \ifempty\p_width
+% \hsize.25\maxdimen % is this really needed
+% \fi}
+
+\let\tabl_x_set_hsize\relax
+
+\protected\def\tabl_x_start_cell_reflow_width_yes[#settings]%
+ {\setbox\b_tabl_x\hpack\bgroup
+ \ifnum\c_tabl_x_nesting>\plusone
+ \letxtableparameter\c!width \v!fit % overloads given width
+ \letxtableparameter\c!height\v!fit % overloads given height
+ \fi
+ %
+ \letxtableparameter\c!nx\plusone
+ \letxtableparameter\c!ny\plusone
+ \letxtableparameter\c!nc\plusone
+ \letxtableparameter\c!nr\plusone
+ %
+ \setupcurrentxtable[#settings]%
+ %
+ \c_tabl_x_nx\directxtableparameter\c!nc\relax
+ \c_tabl_x_ny\directxtableparameter\c!nr\relax
+ \ifnum\c_tabl_x_nx=\plusone
+ \c_tabl_x_nx\directxtableparameter\c!nx\relax
+ \fi
+ \ifnum\c_tabl_x_ny=\plusone
+ \c_tabl_x_ny\directxtableparameter\c!ny\relax
+ \fi
+ %
+ \d_tabl_x_distance\xtableparameter\c!distance\relax
+ \clf_x_table_init_reflow_width_option{\xtableparameter\c!option}%
+ \inheritedxtableframed\bgroup
+ \tabl_x_begin_of_cell
+ \tabl_x_set_hsize}
+
+\protected\def\tabl_x_start_cell_reflow_width_nop
+ {\setbox\b_tabl_x\hpack\bgroup
+ \ifnum\c_tabl_x_nesting>\plusone
+ \letxtableparameter\c!width \v!fit % overloads given width
+ \letxtableparameter\c!height\v!fit % overloads given height
+ \fi
+ \c_tabl_x_nx\plusone
+ \c_tabl_x_ny\plusone
+ \d_tabl_x_distance\xtableparameter\c!distance\relax
+ \clf_x_table_init_reflow_width
+ \inheritedxtableframed\bgroup
+ \tabl_x_begin_of_cell
+ \tabl_x_set_hsize}
+
+\protected\def\tabl_x_stop_cell_reflow_width
+ {\tabl_x_end_of_cell
+ \egroup
+ \egroup
+ \clf_x_table_set_reflow_width}
+
+\protected\def\tabl_x_start_cell_reflow_height_yes[#settings]%
+ {\setbox\b_tabl_x\hpack\bgroup
+ \clf_x_table_init_reflow_height
+ \ifcase\c_tabl_x_skip_mode % can be sped up
+ \ifnum\c_tabl_x_nesting>\plusone
+ \letxtableparameter\c!height\v!fit % overloads given height
+ \fi
+ \setupcurrentxtable[#settings]%
+ \relax
+ \letxtableparameter\c!width\d_tabl_x_width % overloads given width
+ \inheritedxtableframed\bgroup
+ \tabl_x_begin_of_cell
+ \fi}
+
+\protected\def\tabl_x_start_cell_reflow_height_nop
+ {\setbox\b_tabl_x\hpack\bgroup
+ \clf_x_table_init_reflow_height
+ \ifcase\c_tabl_x_skip_mode % can be sped up
+ \ifnum\c_tabl_x_nesting>\plusone
+ \letxtableparameter\c!height\v!fit % overloads given height
+ \fi
+ \relax
+ \letxtableparameter\c!width\d_tabl_x_width % overloads given width
+ \inheritedxtableframed\bgroup
+ \tabl_x_begin_of_cell
+ \fi}
+
+\protected\def\tabl_x_stop_cell_reflow_height
+ {\ifcase\c_tabl_x_skip_mode
+ \tabl_x_end_of_cell
+ \egroup
+ \fi
+ \egroup
+ \clf_x_table_set_reflow_height}
+
+\protected\def\tabl_x_start_cell_construct_yes[#settings]%
+ {\dostarttagged\t!tablecell\empty % can't we just tag the box
+ \setbox\b_tabl_x\hpack\bgroup
+ \setupcurrentxtable[#settings]%
+ \letxtableparameter\c!width \d_tabl_x_width % overloads given width
+ \letxtableparameter\c!height\d_tabl_x_height % overloads given height
+ \clf_x_table_init_construct
+ \inheritedxtableframed\bgroup
+ \tabl_x_begin_of_cell
+ \dotagxtablecell}
+
+\protected\def\tabl_x_start_cell_construct_nop
+ {\dostarttagged\t!tablecell\empty % can't we just tag the box
+ \setbox\b_tabl_x\hpack\bgroup
+ \letxtableparameter\c!width \d_tabl_x_width % overloads given width
+ \letxtableparameter\c!height\d_tabl_x_height % overloads given height (commenting it ... nice option)
+ \clf_x_table_init_construct
+ \inheritedxtableframed\bgroup
+ \tabl_x_begin_of_cell
+ \dotagxtablecell}
+
+\protected\def\tabl_x_stop_cell_construct
+ {\tabl_x_end_of_cell
+ \egroup
+ \dotagxtablesignal % harmless spot
+ \egroup
+ \clf_x_table_set_construct
+ \dostoptagged}
+
+% \permanent\tolerant\protected\def\startxcellgroup[#settings]%
+% {\begingroup
+% \ifarguments\or
+% \tabl_x_set_checked{#settings}%
+% \fi}
+%
+% \permanent\protected\def\stopxcellgroup
+% {\endgroup}
+%
+% \permanent\tolerant\protected\def\startxrowgroup[#settings]%
+% {\begingroup
+% \ifarguments\or
+% \tabl_x_set_checked{#settings}%
+% \fi}
+%
+% \permanent\protected\def\stopxrowgroup
+% {\dostoptagged
+% \endgroup}
+
+\protected\def\tabl_x_set_checked#settings%
+ {\ifcsname\namedxtablehash{#settings}\s!parent\endcsname
+ \edef\currentxtable{#settings}%
+ \else
+ \setupcurrentxtable[#settings]%
+ \fi}
+
+\permanent\protected\def\startxtablehead{\begingroup\c_tabl_x_mode\plusone \tabl_x_start_partition}
+\permanent\protected\def\startxtablefoot{\begingroup\c_tabl_x_mode\plustwo \tabl_x_start_partition}
+\permanent\protected\def\startxtablenext{\begingroup\c_tabl_x_mode\plusthree\tabl_x_start_partition}
+\permanent\protected\def\startxtablebody{\begingroup\c_tabl_x_mode\plusfour \tabl_x_start_partition}
+
+\permanent\tolerant\protected\def\tabl_x_start_partition[#settings]#spacer%
+ {\ifarguments\or
+ \tabl_x_set_checked{#settings}%
+ \fi}
+
+\permanent\protected\def\tabl_x_stop_partition
+ {\endgroup}
+
+\aliased\let\stopxtablehead\tabl_x_stop_partition
+\aliased\let\stopxtablefoot\tabl_x_stop_partition
+\aliased\let\stopxtablenext\tabl_x_stop_partition
+\aliased\let\stopxtablebody\tabl_x_stop_partition
+
+%D This is an experiment! Beware: you can create loops by using nested
+%D references to already chained settings.
+%D
+%D \startbuffer
+%D \setupxtable[suffix][align=middle,foregroundcolor=red]
+%D \setupxtable[blabla][foregroundstyle=slanted]
+%D \setupxtable[crap] [foregroundcolor=blue]
+%D \setupxtable[bold] [crap][foregroundstyle=bold]
+%D
+%D \startxtable[frame=off]
+%D \startxtablehead
+%D \startxrow[bold]
+%D \startxcell[suffix] a 0 \stopxcell
+%D \startxcell[blabla] a 1 \stopxcell
+%D \startxcell a 2 \stopxcell
+%D \stopxrow
+%D \stopxtablehead
+%D \startxtablebody
+%D \startxrow \startxcell[suffix][ny=2] a 1 \stopxcell \startxcell b 1 \stopxcell \startxcell c 1 \stopxcell \stopxrow
+%D \startxrow \startxcell b 2 \stopxcell \startxcell c 2 \stopxcell \stopxrow
+%D \startxrow \startxcell[suffix] a 3 \stopxcell \startxcell b 3 \stopxcell \startxcell c 3 \stopxcell \stopxrow
+%D \startxrow \startxcell[suffix] a 4 \stopxcell \startxcell b 4 \stopxcell \startxcell c 4 \stopxcell \stopxrow
+%D \startxrow \startxcell[suffix] a 5 \stopxcell \startxcell b 5 \stopxcell \startxcell c 5 \stopxcell \stopxrow
+%D \stopxtablebody
+%D \stopxtable
+%D \stopbuffer
+%D
+%D \typebuffer \placetable{}{\getbuffer}
+
+\appendtoks
+ \letcsname\??xtablecheck\currentxtable\endcsname\relax % faster than checking parent
+\to \everysetupxtable
+
+% \definefontfamily[newtimes][serif][TeX Gyre Termes]
+% \setupxtable[newtimes][foregroundstyle=\newtimes]
+% \startxcell[newtimes] ...\stopxcell
+% \startxcell[foregroundstyle=\newtimes] ...\stopxcell
+
+% % \ifcsname\namedxtablehash{#tag}\s!parent\endcsname
+% % \ifcsname\??xtablecheck#tag\endcsname
+% \ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname % two times slower on keywords
+% \expandafter\whatever % but more tolerant for tricky key=value
+% \else
+% \expandafter\whatever
+% \fi[#tag]
+
+% groups
+
+\permanent\protected\def\startxgroup
+ {\begingroup
+ \doifelsenextoptionalcs\tabl_x_start_group_delayed_one\relax}
+
+\permanent\protected\def\stopxgroup
+ {\endgroup}
+
+\protected\def\tabl_x_start_group_delayed_one[#tag]%
+ {\ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname
+ \expandafter\tabl_x_start_group_delayed_two
+ \else
+ \expandafter\setupcurrentxtable
+ \fi[#tag]}
+
+\protected\def\tabl_x_start_group_delayed_two[#tag]%
+ {\ifempty\currentxtable \else
+ \chaintocurrentxtable{#tag}%
+ \fi
+ \edef\currentxtable{#tag}%
+ \doifelsenextoptionalcs\setupcurrentxtable\relax}
+
+\aliased\let\startxrowgroup \startxgroup
+\aliased\let\stopxrowgroup \stopxgroup
+\aliased\let\startxcellgroup\startxgroup
+\aliased\let\stopxcellgroup \stopxgroup
+
+% cells (maybe also check for 1 etc but it becomes messy)
+
+\permanent\protected\def\startxcell
+ {\begingroup
+ \doifelsenextoptionalcs\tabl_x_start_cell_delayed_one\tabl_x_start_cell_nop}
+
+\protected\def\tabl_x_start_cell_delayed_one[#tag]%
+ {\ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname
+ \expandafter\tabl_x_start_cell_delayed_two
+ \else
+ \expandafter\tabl_x_start_cell_yes
+ \fi[#tag]}
+
+\tolerant\protected\def\tabl_x_start_cell_delayed_two[#tag]#spacer%
+ {\ifempty\currentxtable \else
+ \chaintocurrentxtable{#tag}%
+ \fi
+ \edef\currentxtable{#tag}%
+ \doifelsenextoptionalcs\tabl_x_start_cell_yes\tabl_x_start_cell_nop}
+
+\permanent\protected\def\stopxcell
+ {\tabl_x_stop_cell
+ \endgroup}
+
+% rows
+
+\permanent\protected\def\startxrow
+ {\begingroup
+ \doifelsenextoptionalcs\tabl_x_start_row_delayed_one\tabl_x_start_row_nop}
+
+\protected\def\tabl_x_start_row_delayed_one[#tag]%
+ {\ifcsname\??xtablecheck\detokenize\expandafter{\normalexpanded{#tag}}\endcsname
+ \expandafter\tabl_x_start_row_delayed_two
+ \else
+ \expandafter\tabl_x_start_row_yes
+ \fi[#tag]}
+
+\permanent\protected\def\tabl_x_start_row_delayed_two[#tag]%
+ {\ifempty\currentxtable \else
+ \chaintocurrentxtable{#tag}%
+ \fi
+ \edef\currentxtable{#tag}%
+ \doifelsenextoptionalcs\tabl_x_start_row_yes\tabl_x_start_row_nop}
+
+\permanent\protected\def\stopxrow
+ {\tabl_x_stop_row
+ \endgroup}
+
+%D A bonus, not advertised but some like it this way:
+
+\protected\def\tabl_x_nc
+ {\startxrow
+ \enforced\let\NC\tabl_x_nc_next
+ \enforced\let\NR\tabl_x_nr
+ \startxcell}
+
+\protected\def\tabl_x_nc_next
+ {\stopxcell
+ \startxcell}
+
+\protected\def\tabl_x_nr
+ {\stopxcell
+ \stopxrow
+ \enforced\let\NC\tabl_x_nc}
+
+\appendtoks
+ \enforced\let\NC\tabl_x_nc
+ \enforced\let\NR\tabl_x_nr
+\to \everypreparextable
+
+%D Another bonus, suggested by Taco at the 2018 \CONTEXT\ meeting.
+
+\protected\def\tabl_x_c_cell_start#settings%
+ {\begingroup
+ \tabl_x_set_checked{#settings}%
+ \doifelsenextoptionalcs\tabl_x_start_cell_yes\tabl_x_start_cell_nop}
+
+\protected\def\tabl_x_c_cell_stop
+ {\tabl_x_stop_cell
+ \endgroup}
+
+% \protected\def\dummyxcell
+% {\tabl_x_start_cell_nop
+% \tabl_x_stop_cell}
+
+\mutable\let\t_tabl_x_swapped\relax
+
+\def\tabl_x_flush_swapped
+ {\dorecurse\c_tabl_x_swapped_max
+ {\expandafter
+ \startxrow
+ \the\csname\??xtableswap##1\endcsname\relax
+ \stopxrow}}
+
+\def\tabl_x_collect_allocate
+ {\expandafter\newtoks\csname\??xtableswap\number\c_tabl_x_swapped\endcsname
+ \expandafter\let\expandafter\t_tabl_x_swapped\csname\??xtableswap\number\c_tabl_x_swapped\endcsname}
+
+\def\tabl_x_collect_advance
+ {\global\advance\c_tabl_x_swapped\plusone
+ \ifnum\c_tabl_x_swapped>\c_tabl_x_swapped_max
+ \global\c_tabl_x_swapped_max\c_tabl_x_swapped
+ \fi
+ \mutable\expandafter\let\expandafter\t_tabl_x_swapped\csname\??xtableswap\number\c_tabl_x_swapped\endcsname
+ \ifrelax\t_tabl_x_swapped
+ \tabl_x_collect_allocate
+ \fi}
+
+\protected\def\tabl_x_collect_cell_start
+ {\doifelsenextoptionalcs
+ \tabl_x_collect_cell_start_yes
+ \tabl_x_collect_cell_start_nop}
+
+\def\tabl_x_collect_cell_start_nop#content\stopxcell
+ {\tabl_x_collect_advance
+ \ifempty\m_tabl_x_swapped_settings
+ \gtoksapp\t_tabl_x_swapped{\tabl_x_c_cell_start{}#content\tabl_x_c_cell_stop}%
+ \else
+ \gtoksapp\t_tabl_x_swapped\expandafter{\expandafter\tabl_x_c_cell_start\expandafter{\m_tabl_x_swapped_settings}#content\tabl_x_c_cell_stop}%
+ \fi}
+
+\def\tabl_x_collect_cell_start_yes[#settings]#content\stopxcell
+ {\tabl_x_collect_advance
+ \ifempty\m_tabl_x_swapped_settings
+ \gtoksapp\t_tabl_x_swapped{\tabl_x_c_cell_start{}[#settings]#content\tabl_x_c_cell_stop}%
+ \else
+ \gtoksapp\t_tabl_x_swapped\expandafter{\expandafter\tabl_x_c_cell_start\expandafter{\m_tabl_x_swapped_settings}[#settings]#content\tabl_x_c_cell_stop}%
+ \fi
+ \getdummyparameters[\c!ny=1,#settings]%
+ \scratchcounter\numexpr\dummyparameter\c!ny-\plusone\relax
+ \ifcase\scratchcounter\else
+ \dorecurse\scratchcounter\tabl_x_collect_advance
+ \fi}
+
+\permanent\tolerant\protected\def\startxcolumn[#settings]#spacer%
+ {\begingroup
+ \global\c_tabl_x_swapped\zerocount
+ \enforced\let\startxcell\tabl_x_collect_cell_start
+ \enforced\let\stopxcell \relax
+ \xdef\m_tabl_x_swapped_settings{#settings}}
+
+\permanent\protected\def\stopxcolumn
+ {\endgroup}
+
+\appendtoks
+ \dorecurse\c_tabl_x_swapped_max
+ {\global\csname\??xtableswap\number#1\endcsname\emptytoks}%
+\to \t_table_x_cleanup
+
+%D \startbuffer
+%D \setupxtable[one][foregroundcolor=red]
+%D \setupxtable[two][foregroundcolor=blue]
+%D
+%D \startlinecorrection
+%D \startxtable
+%D \startxrow[one]
+%D \startxcell[width=5cm] Row 1, Column 1 \stopxcell
+%D \startxcell Row 1, Column 2 \stopxcell
+%D \startxcell Row 1, Column 3 \stopxcell
+%D \stopxrow
+%D \startxrow[two]
+%D \startxcell Row 2, Column 1 \stopxcell
+%D \startxcell Row 2, Column 2 \stopxcell
+%D \startxcell Row 2, Column 3 \stopxcell
+%D \stopxrow
+%D \stopxtable
+%D \stoplinecorrection
+%D
+%D \startlinecorrection
+%D \startxtable
+%D \startxcolumn[one]
+%D \startxcell[width=5cm] Row 1, Column 1 \stopxcell
+%D \startxcell Row 1, Column 2 \stopxcell
+%D \startxcell Row 1, Column 3 \stopxcell
+%D \stopxcolumn
+%D \startxcolumn[two]
+%D \startxcell Row 2, Column 1 \stopxcell
+%D \startxcell Row 2, Column 2 \stopxcell
+%D \startxcell Row 2, Column 3 \stopxcell
+%D \stopxcolumn
+%D \stopxtable
+%D \stoplinecorrection
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/task-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/task-ini.mkxl
new file mode 100644
index 00000000000..77e4fa98540
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/task-ini.mkxl
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=task-ini,
+%D version=2007.06.06,
+%D title=\CONTEXT\ Task Handler,
+%D subtitle=Initialization,
+%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 Task Handler / initialization}
+
+\unprotect
+
+%D Maybe we will make things configureable (speed up and such).
+
+\registerctxluafile{task-ini}{}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt b/Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt
new file mode 100644
index 00000000000..03f4dc2c106
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/toks-aux.lmt
@@ -0,0 +1,183 @@
+if not modules then modules = { } end modules ['toks-aux'] = {
+ version = 1.001,
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local type, tostring = type, tostring
+local max = math.max
+local formatters, gsub, char = string.formatters, string.gsub, string.char
+local concat = table.concat
+
+local function flags(t)
+ if type(t) == "string" then
+ t = token.create(t)
+ end
+ local r = { }
+ if t.frozen then r[#r+1] = "frozen" end
+ if t.permanent then r[#r+1] = "permanent" end
+ if t.immutable then r[#r+1] = "immutable" end
+ if t.primitive then r[#r+1] = "primitive" end
+ if t.mutable then r[#r+1] = "mutable" end
+ if t.noaligned then r[#r+1] = "noaligned" end
+ if t.instance then r[#r+1] = "instance" end
+ if t.tolerant then r[#r+1] = "tolerant" end
+ if t.protected then r[#r+1] = "protected" end
+ return r
+end
+
+tokens.flags= flags
+
+interfaces.implement {
+ name = "showluatokens",
+ public = true,
+ protected = true,
+ actions = function()
+ local f0 = formatters["%s: %s"]
+ local nl = logs.newline
+ local wr = logs.writer
+ local t = token.peek_next() -- local t = token.scan_next() token.put_back(t)
+ local n = ""
+ local w = ""
+ local c = t.cmdname
+ if c == "left_brace" then
+ w = "given token list"
+ t = token.scan_toks(false)
+ elseif c == "register_toks" then
+ token.scan_next()
+ w = "token register"
+ n = t.csname or t.index
+ t = tex.gettoks(n,true)
+ elseif c == "internal_toks" then
+ token.scan_next()
+ w = "internal token variable"
+ n = t.csname or t.index
+ t = tex.gettoks(n,true)
+ else
+ n = token.scan_csname()
+ local r = flags(t)
+ local m = token.get_meaning(n,true)
+ r[#r+1] = "control sequence"
+ if type(m) == "table" then
+ t = m
+ else
+ t = { t }
+ end
+ w = concat(r, " ")
+ end
+ wr(f0(w,n))
+ nl()
+ if type(t) == "table" then
+ local w1 = 4
+ local w2 = 1
+ local w3 = 3
+ local w4 = 3
+ for i=1,#t do
+ local ti = t[i]
+ w1 = max(w1,#tostring(ti.id))
+ w2 = max(w2,#tostring(ti.command))
+ w3 = max(w3,#tostring(ti.index))
+ w4 = max(w4,#ti.cmdname)
+ end
+ local f1 = formatters["%" .. w1 .. "i %" .. w2 .. "i %" .. w3 .. "i %-" .. w4 .. "s %s"]
+ local f2 = formatters["%" .. w1 .. "i %" .. w2 .. "i %" .. w3 .. "i %-" .. w4 .. "s"]
+ local f3 = formatters["%" .. w1 .. "i %" .. w2 .. "i %" .. w3 .. "i %-" .. w4 .. "s %C"]
+ for i=1,#t do
+ local ti = t[i]
+ local cs = ti.csname
+ local id = ti.id
+ local ix = ti.index
+ local cd = ti.command
+ local cn = ti.cmdname
+ if cn == "prefix" and not cs then
+ cs = "always enforced"
+ end
+ cn = gsub(cn,"_"," ")
+ if cs then
+ wr(f1(id,cd,ix,cn,cs))
+ elseif cn == "letter" or cn == "other char" then
+ wr(f3(id,cd,ix,cn,ix))
+ elseif cn == "match" then
+ local s
+ if ix == 32 then s = "optional spacer" -- space
+ elseif ix == 42 then s = "skip spaces" -- *
+ elseif ix == 43 then s = "keep braces" -- +
+ elseif ix == 45 then s = "thrash" -- -
+ elseif ix == 47 then s = "prune" -- /
+ elseif ix == 58 then s = "continue" -- :
+ elseif ix == 59 then s = "quit" -- ;
+ elseif ix == 61 then s = "mandate braces" -- =
+ elseif ix == 94 then s = "keep spaces" -- ^
+ elseif ix == 95 then s = "keep mandate braces" -- _
+ else s = "argument " .. char(ix)
+ end
+ wr(f1(id,cd,ix,cn,s))
+ else
+ wr(f2(id,cd,ix,cn))
+ if cn == "end match" then
+ wr("--------------")
+ end
+ end
+ end
+ nl()
+ end
+ end
+}
+
+-- For the moment here, will move to initex only (also see node-ini.lua); we need
+-- to actually store these.
+
+local groupcodes = { }
+local glyphoptioncodes = { }
+local hyphenationcodes = { }
+local frozenparcodes = { }
+local flagcodes = { }
+local normalizecodes = { }
+
+for k, v in next, tex.getgroupvalues() do
+ groupcodes[k] = gsub(v,"[_ ]","")
+end
+for k, v in next, tex.gethyphenationvalues() do
+ hyphenationcodes[k] = gsub(v,"[_ ]","")
+end
+for k, v in next, tex.getglyphoptionvalues() do
+ glyphoptioncodes[k] = gsub(v,"[_ ]","")
+end
+for k, v in next, tex.getfrozenparvalues() do
+ frozenparcodes[k] = gsub(v,"[_ ]","")
+end
+for k, v in next, tex.getflagvalues() do
+ flagcodes[k] = gsub(v,"[_ ]","")
+end
+for k, v in next, tex.getnormalizevalues() do
+ normalizecodes[k] = gsub(v,"[_ ]","")
+end
+
+
+if environment.initex then
+
+ local texintegerdef = tex.integerdef
+
+ for k, v in next, groupcodes do texintegerdef(v .. "groupcode", k,"immutable") end
+ for k, v in next, glyphoptioncodes do texintegerdef(v .. "code", k,"immutable") end
+ for k, v in next, hyphenationcodes do texintegerdef(v .. "hyphenationmodecode",k,"immutable") end
+ for k, v in next, frozenparcodes do texintegerdef("frozen" .. v .. "code", k,"immutable") end
+ for k, v in next, flagcodes do texintegerdef(v .. "flagcode", k,"immutable") end
+ for k, v in next, normalizecodes do texintegerdef(v .. "code", k,"immutable") end
+
+end
+
+groupcodes = utilities.storage.allocate(table.swapped(groupcodes, groupcodes))
+glyphoptioncodes = utilities.storage.allocate(table.swapped(glyphoptioncodes,glyphoptioncodes))
+hyphenationcodes = utilities.storage.allocate(table.swapped(hyphenationcodes,hyphenationcodes))
+frozenparcodes = utilities.storage.allocate(table.swapped(frozenparcodes, frozenparcodes))
+flagcodes = utilities.storage.allocate(table.swapped(flagcodes, flagcodes))
+normalizecodes = utilities.storage.allocate(table.swapped(normalizecodes, normalizecodes))
+
+tex.groupcodes = groupcodes
+tex.glyphoptioncodes = glyphoptioncodes
+tex.hyphenationcodes = hyphenationcodes
+tex.frozenparcodes = frozenparcodes
+tex.flagcodes = flagcodes
+tex.normalizecodes = normalizecodes
diff --git a/Master/texmf-dist/tex/context/base/mkxl/toks-aux.mkxl b/Master/texmf-dist/tex/context/base/mkxl/toks-aux.mkxl
new file mode 100644
index 00000000000..4563014ecfc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/toks-aux.mkxl
@@ -0,0 +1,68 @@
+%D \module
+%D [ file=toks-aux,
+%D version=2018.11.29,
+%D title=\CONTEXT\ Token Support,
+%D subtitle=Helpers,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Token Support / Helpers}
+
+\unprotect
+
+%D The older \type {\scantokens} overload has been replace by a more modern one (in
+%D \LMTX):
+%D
+%D \starttyping
+%D \protected\def\whatever#1[#2](#3)\relax{oeps #1 and #2 and #3 done ## error}
+%D \scratchtoks{foo \framed{\red 123}456}
+%D
+%D \showluatokens{123\what}
+%D \showluatokens\whatever
+%D \showluatokens\framed
+%D
+%D \showluatokens\scratchtoks
+%D \showluatokens\everypar
+%D \stoptyping
+
+\registerctxluafile{toks-aux}{autosuffix}
+
+\installcorenamespace {tokenlist}
+
+\permanent\protected\def\definetokenlist[#1]%
+ {\ifcsname\??tokenlist#1\endcsname
+ \global\lastnamedcs\emptytoks
+ \else
+ \expandafter\newtoks\csname\??tokenlist#1\endcsname
+ \fi}
+
+\permanent\protected\def\starttokenlist[#1]#2\stoptokenlist
+ {\ifcsname\??tokenlist#1\endcsname \else
+ \expandafter\newtoks\csname\??tokenlist#1\endcsname
+ \fi
+ \toksapp\lastnamedcs{#2}}
+
+\aliased\let\stoptokenlist\relax
+
+\permanent\def\gettokenlist[#1]%
+ {\ifcsname\??tokenlist#1\endcsname
+ \the\lastnamedcs
+ \fi}
+
+\permanent\protected\def\settokenlist[#1]#2%
+ {\ifcsname\??tokenlist#1\endcsname \else
+ \expandafter\newtoks\csname\??tokenlist#1\endcsname
+ \fi
+ \toksapp\lastnamedcs{#2}}
+
+\permanent\protected\def\resettokenlist[#1]%
+ {\ifcsname\??tokenlist#1\endcsname
+ \lastnamedcs\emptytoks
+ \fi}
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt
new file mode 100644
index 00000000000..4b2d1faccf5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/toks-ini.lmt
@@ -0,0 +1,332 @@
+if not modules then modules = { } end modules ['toks-ini'] = {
+ version = 1.001,
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+tokens = tokens or { }
+
+local tokens = tokens
+local token = token -- the built in one
+local next = next
+local tonumber = tonumber
+local tostring = tostring
+local utfchar = utf.char
+local char = string.char
+local printtable = table.print
+local concat = table.concat
+local format = string.format
+
+local commands = token.getcommandvalues()
+local values = token.getfunctionvalues()
+values.dimen = values.dimension
+values.count = values.integer
+tokens.values = utilities.storage.allocate(table.swapped(values, values))
+tokens.commands = utilities.storage.allocate(table.swapped(commands,commands))
+
+local scan_toks = token.scan_toks
+local scan_string = token.scan_string
+local scan_argument = token.scan_argument
+local scan_delimited = token.scan_delimited
+local scan_tokenlist = token.scan_tokenlist or scan_string
+local scan_integer = token.scan_integer or token.scan_int
+local scan_cardinal = token.scan_cardinal
+local scan_code = token.scan_code
+local scan_token_code = token.scan_token_code
+local scan_dimen = token.scan_dimen
+local scan_glue = token.scan_glue
+local scan_skip = token.scan_skip
+local scan_keyword = token.scan_keyword
+local scan_keyword_cs = token.scan_keyword_cs or scan_keyword
+local scan_token = token.scan_token
+local scan_box = token.scan_box
+local scan_word = token.scan_word
+local scan_letters = token.scan_letters or scan_word -- lmtx
+local scan_key = token.scan_key
+local scan_value = token.scan_value
+local scan_char = token.scan_char
+local scan_number = token.scan_number -- not defined
+local scan_csname = token.scan_csname
+local scan_real = token.scan_real
+local scan_float = token.scan_float
+local scan_luanumber = token.scan_luanumber or scan_float -- only lmtx
+local scan_luainteger = token.scan_luainteger or scan_integer -- only lmtx
+local scan_luacardinal = token.scan_luacardinal or scan_cardinal -- only lmtx
+
+local scan_integer_argument = token.scan_integer_argument
+local scan_dimen_argument = token.scan_dimen_argument
+
+-- todo: gobble_integer -- might go away
+-- todo: gobble_dimension -- might go away
+
+local set_macro = token.set_macro
+local set_char = token.set_char
+local set_lua = token.set_lua
+
+local create_token = token.create
+local new_token = token.new
+local is_defined = token.is_defined
+local is_token = token.is_token
+
+tokens.new = new_token
+tokens.create = create_token
+tokens.istoken = is_token
+tokens.isdefined = is_defined
+tokens.defined = is_defined
+
+tokens.getinteger = token.get_integer
+tokens.setinteger = token.set_integer
+
+local bits = {
+ escape = 0x00000001, -- 2^00
+ begingroup = 0x00000002, -- 2^01
+ endgroup = 0x00000004, -- 2^02
+ mathshift = 0x00000008, -- 2^03
+ alignment = 0x00000010, -- 2^04
+ endofline = 0x00000020, -- 2^05
+ parameter = 0x00000040, -- 2^06
+ superscript = 0x00000080, -- 2^07
+ subscript = 0x00000100, -- 2^08
+ ignore = 0x00000200, -- 2^09
+ space = 0x00000400, -- 2^10 -- 1024
+ letter = 0x00000800, -- 2^11
+ other = 0x00001000, -- 2^12
+ active = 0x00002000, -- 2^13
+ comment = 0x00004000, -- 2^14
+ invalid = 0x00008000, -- 2^15
+ --
+ character = 0x00001800, -- 2^11 + 2^12
+ whitespace = 0x00002400, -- 2^13 + 2^10 -- / needs more checking
+ --
+ open = 0x00000402, -- 2^10 + 2^01 -- space + begingroup
+ close = 0x00000404, -- 2^10 + 2^02 -- space + endgroup
+}
+
+-- for k, v in next, bits do bits[v] = k end
+
+tokens.bits = bits
+
+-- words are space or \relax terminated and the trailing space is gobbled; a word
+-- can contain any non-space letter/other (see archive for implementation in lua)
+
+if not scan_number then
+
+ scan_number = function(base)
+ local s = scan_word()
+ if not s then
+ return nil
+ elseif base then
+ return tonumber(s,base)
+ else
+ return tonumber(s)
+ end
+ end
+
+end
+
+local function scan_boolean()
+ local kw = scan_word()
+ if kw == "true" then
+ return true
+ elseif kw == "false" then
+ return false
+ else
+ return nil
+ end
+end
+
+local function scan_verbatim()
+ return scan_argument(false)
+end
+
+if not scan_box then
+
+ local scan_list = token.scan_list
+ local put_next = token.put_next
+
+ scan_box = function(s)
+ if s == "hbox" or s == "vbox" or s == "vtop" then
+ put_next(create_token(s))
+ end
+ return scan_list()
+ end
+
+ token.scan_box = scan_box
+
+end
+
+tokens.scanners = { -- these expand
+ token = scan_token,
+ toks = scan_toks,
+ tokens = scan_toks,
+ box = scan_box,
+ hbox = function() return scan_box("hbox") end,
+ vbox = function() return scan_box("vbox") end,
+ vtop = function() return scan_box("vtop") end,
+ dimen = scan_dimen,
+ dimension = scan_dimen,
+ glue = scan_glue,
+ gluevalues = function() return scan_glue(false,false,true) end,
+ gluespec = scan_skip,
+ integer = scan_integer,
+ cardinal = scan_cardinal,
+ real = scan_real,
+ float = scan_float,
+ luanumber = scan_luanumber,
+ luainteger = scan_luainteger,
+ luacardinal = scan_luacardinal,
+ count = scan_integer,
+ string = scan_string,
+ argument = scan_argument,
+ delimited = scan_delimited,
+ tokenlist = scan_tokenlist,
+ verbatim = scan_verbatim, -- detokenize
+ code = scan_code,
+ tokencode = scan_token_code,
+ word = scan_word,
+ letters = scan_letters,
+ key = scan_key,
+ value = scan_value,
+ char = scan_char,
+ number = scan_number,
+ boolean = scan_boolean,
+ keyword = scan_keyword,
+ keywordcs = scan_keyword_cs,
+ csname = scan_csname,
+
+ next = token.scan_next,
+ nextexpanded = token.scan_next_expanded,
+
+ peek = token.peek_next,
+ peekexpanded = token.peek_next_expanded,
+ peekchar = token.peek_next_char,
+
+ skip = token.skip_next,
+ skipexpanded = token.skip_next_expanded,
+
+ cmdchr = token.scan_cmdchr,
+ cmdchrexpanded = token.scan_cmdchr_expanded,
+
+ ischar = token.is_next_char,
+
+ integerargument = scan_integer_argument,
+ dimenargument = scan_dimen_argument,
+}
+
+tokens.getters = { -- these don't expand
+ meaning = token.get_meaning,
+ macro = token.get_macro,
+ token = token.scan_next or token.get_next, -- not here, use scanners.next or token
+ cstoken = token.get_cstoken,
+ count = tex.getcount,
+ dimen = tex.getdimen,
+ skip = tex.getglue,
+ glue = tex.getglue,
+ skip = tex.getmuglue,
+ glue = tex.getmuglue,
+ box = tex.getbox,
+}
+
+tokens.setters = {
+ macro = set_macro,
+ char = set_char,
+ lua = set_lua,
+ count = tex.setcount,
+ dimen = tex.setdimen,
+ skip = tex.setglue,
+ glue = tex.setglue,
+ skip = tex.setmuglue,
+ glue = tex.setmuglue,
+ box = tex.setbox,
+}
+
+token.accessors = {
+ command = token.get_command,
+ cmd = token.get_command,
+ cmdname = token.get_cmdname,
+ name = token.get_cmdname,
+ csname = token.get_csname,
+ index = token.get_index,
+ active = token.get_active,
+ frozen = token.get_frozen,
+ protected = token.get_protected,
+ expandable = token.get_protected,
+ user = token.get_user,
+ cmdchrcs = token.get_cmdchrcs,
+ active = token.get_active,
+ range = token.get_range,
+}
+
+-- static int run_scan_token(lua_State * L)
+-- {
+-- saved_tex_scanner texstate;
+-- save_tex_scanner(texstate);
+-- get_x_token();
+-- make_new_token(L, cur_cmd, cur_chr, cur_cs);
+-- unsave_tex_scanner(texstate);
+-- return 1;
+-- }
+--
+-- static int run_get_future(lua_State * L)
+-- {
+-- /* saved_tex_scanner texstate; */
+-- /* save_tex_scanner(texstate); */
+-- get_token();
+-- make_new_token(L, cur_cmd, cur_chr, cur_cs);
+-- back_input();
+-- /* unsave_tex_scanner(texstate); */
+-- return 1;
+-- }
+
+if setinspector then
+
+ local simple = { letter = "letter", other_char = "other" }
+
+ local astable = function(t)
+ if t and is_token(t) then
+ local cmdname = t.cmdname
+ local simple = simple[cmdname]
+ if simple then
+ return {
+ id = t.id,
+ category = simple,
+ character = utfchar(t.index) or nil,
+ }
+ else
+ return {
+ id = t.id,
+ command = t.command,
+ index = t.index,
+ csname = t.csname,
+ cmdname = cmdname,
+ active = t.active,
+ expandable = t.expandable,
+ frozen = t.frozen,
+ tolerant = t.tolerant,
+ protected = t.protected,
+ primitive = t.primitive,
+ permanent = t.permanent,
+ noaligned = t.noaligned,
+ instance = t.instance,
+ immutable = t.imutable,
+ user = t.user,
+ }
+ end
+ end
+ end
+
+ tokens.astable = astable
+
+ setinspector("token",function(v) local t = astable(v) if t then printtable(t,tostring(v)) return true end end)
+
+end
+
+tokens.cache = table.setmetatableindex(function(t,k)
+ if not is_defined(k) then
+ set_macro(k,"","global")
+ end
+ local v = create_token(k)
+ t[k] = v
+ return v
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/toks-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/toks-ini.mkxl
new file mode 100644
index 00000000000..c7d7bceb384
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/toks-ini.mkxl
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=toks-ini,
+%D version=2007.03.03,
+%D title=\CONTEXT\ Token Support,
+%D subtitle=Initialization,
+%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 Token Support / Initialization}
+
+\unprotect
+
+\registerctxluafile{toks-ini}{autosuffix}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt b/Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt
new file mode 100644
index 00000000000..73eedbba789
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/toks-scn.lmt
@@ -0,0 +1,582 @@
+if not modules then modules = { } end modules ['toks-scn'] = {
+ version = 1.001,
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Writing this kind of code (and completing the newtoken code base) is fun. I did
+-- so with the brilliant film music from The Girl with the Dragon Tattoo running in a
+-- loop in the background (three cd's by Trent Reznor and Atticus Ross). An alien
+-- feeling helps with alien code.
+
+-- todo: more \let's at the tex end
+
+local type, next, tostring, tonumber = type, next, tostring, tonumber
+
+local formatters = string.formatters
+local concat = table.concat
+
+local scanners = tokens.scanners
+local tokenbits = tokens.bits
+
+local scanstring = scanners.string
+local scanargument = scanners.argument
+local scandelimited = scanners.delimited
+local scanverbatim = scanners.verbatim
+local scantokenlist = scanners.tokenlist
+local scantoks = scanners.toks
+local scaninteger = scanners.integer
+local scancardinal = scanners.cardinal
+local scannumber = scanners.number
+local scankeyword = scanners.keyword
+local scankeywordcs = scanners.keywordcs
+local scanword = scanners.word
+local scanletters = scanners.letters
+local scankey = scanners.key
+local scancode = scanners.code
+local scanboolean = scanners.boolean
+local scandimen = scanners.dimen
+local scanglue = scanners.glue
+local scangluevalues = scanners.gluevalues
+local scangluespec = scanners.gluespec
+local scancsname = scanners.csname
+local scanintegerargument = scanners.integerargument
+local scandimenargument = scanners.dimenargument
+
+local todimen = number.todimen
+local toboolean = toboolean
+
+local lpegmatch = lpeg.match
+local p_unquoted = lpeg.Cs(lpeg.patterns.unquoted)
+
+local trace_compile = false trackers.register("tokens.compile", function(v) trace_compile = v end)
+local report_compile = logs.reporter("tokens","compile")
+local report_scan = logs.reporter("tokens","scan")
+
+local open = tokenbits.open
+local close = tokenbits.close
+
+local function scanopen()
+ while true do
+ local c = scancode(open)
+ if c == 123 then
+ return true
+ -- elseif c ~= 32 then
+ elseif not c then
+ return
+ end
+ end
+end
+
+local function scanclose()
+ while true do
+ local c = scancode(close)
+ if c == 125 then
+ return true
+ -- elseif c ~= 32 then
+ elseif not c then
+ return
+ end
+ end
+end
+
+scanners.scanopen = scanopen
+scanners.scanclose = scanclose
+
+local function scanlist()
+ local wrapped = scanopen()
+ local list = { }
+ local size = 0
+ while true do
+ local entry = scanstring()
+ if entry then
+ size = size + 1
+ list[size] = entry
+ else
+ break
+ end
+ end
+ if wrapped then
+ scanclose()
+ end
+ return list
+end
+
+local function scanconditional()
+ local kw = scanword()
+ if kw == "true" then
+ return true
+ end
+ if kw == "false" then
+ return false
+ end
+ local c = scaninteger()
+ if c then
+ return c == 0 -- with a conditional 0=true
+ end
+ return nil
+end
+
+local function scantable(t,data)
+ if not data then
+ data = { }
+ end
+ if t then
+ local wrapped = scanopen()
+ while true do
+ local key = scanword(true)
+ if key then
+ local get = t[key]
+ if get then
+ data[key] = get()
+ else
+ -- catch all we can get
+ end
+ else
+ break
+ end
+ end
+ if wrapped then
+ scanclose()
+ end
+ end
+ return data
+end
+
+function tokens.constant(s)
+ if type(s) == "string" then
+ return "'" .. s .. "'"
+ else
+ return s
+ end
+end
+
+scanners.list = scanlist
+scanners.table = scantable
+scanners.conditional = scanconditional
+
+function scanners.whd()
+ local width, height, depth
+ while true do
+ if scankeyword("width") then
+ width = scandimen()
+ elseif scankeyword("height") then
+ height = scandimen()
+ elseif scankeyword("depth") then
+ depth = scandimen()
+ else
+ break
+ end
+ end
+ if width or height or depth then
+ return width or 0, height or 0, depth or 0
+ else
+ -- we inherit
+ end
+end
+
+local l = utf.byte("[")
+local r = utf.byte("]")
+
+local function scanbracketed()
+ local s = scandelimited(l, r)
+ if s then
+ return s
+ else
+ local readstate = status.getreadstate()
+ report_scan("missing argument in line %i of %a", readstate.linenumber, readstate.filename)
+ return ""
+ end
+end
+
+local function scanoptional()
+ return scandelimited(l, r) or ""
+end
+
+local function scanbracketedasis()
+ return scandelimited(l, r, false)
+end
+
+local function scanargumentasis()
+ return scanargument(false)
+end
+
+scanners.bracketed = scanbracketed
+scanners.optional = scanoptional
+scanners.bracketedasis = scanbracketedasis
+scanners.argumentasis = scanargumentasis
+
+local shortcuts = {
+ tokens = tokens,
+ bits = tokenbits,
+ open = open,
+ close = close,
+ scanners = scanners,
+ scanstring = scanstring,
+ scanargument = scanargument,
+ scanverbatim = scanverbatim,
+ scantokenlist = scantokenlist,
+ scantoks = scantoks,
+ scaninteger = scaninteger,
+ scancardinal = scancardinal,
+ scannumber = scannumber,
+ scantable = scantable, -- not directly useable
+ scankeyword = scankeyword,
+ scankeywordcs = scankeywordcs,
+ scanword = scanword,
+ scanletters = scanletters,
+ -- scankey = scankey,
+ scancode = scancode,
+ scanboolean = scanboolean,
+ scanglue = scanglue, -- list
+ scangluespec = scangluespec,
+ scangluevalues = scangluevalues,
+ scandimen = scandimen,
+ scandimension = scandimen,
+ scanbox = scanners.box,
+ scanhbox = scanners.hbox,
+ scanvbox = scanners.vbox,
+ scanvtop = scanners.vtop,
+ scanconditional = scanconditional,
+ scanopen = scanopen,
+ scanclose = scanclose,
+ scanlist = scanlist,
+ scancsname = scancsname,
+ scandelimited = scandelimited, -- not directly useable
+ scanbracketed = scanbracketed,
+ scanoptional = scanoptional,
+ scanbracketedasis = scanbracketedasis,
+ scanargumentasis = scanargumentasis,
+ scanintegerargument = scanintegerargument,
+ scandimenargument = scandimenargument,
+ todimen = todimen,
+ tonumber = tonumber,
+ tostring = tostring,
+ toboolean = toboolean,
+ inspect = inspect,
+ report = report_scan,
+}
+
+tokens.shortcuts = shortcuts
+
+local load = load
+local dump = string.dump
+
+local function loadstripped(code)
+ return load(code,nil,nil,shortcuts)
+ -- return load(dump(load(code),true),nil,nil,shortcuts)
+end
+
+tokens.converters = {
+ tonumber = "tonumber",
+ tostring = "tostring",
+ toboolean = "toboolean",
+ todimen = "todimen",
+ toglue = "todimen",
+}
+
+-- We could just pickup a keyword but then we really need to make sure that no number
+-- follows it when that is the assignment and adding an optional = defeats the gain
+-- in speed. Currently we have sources with no spaces (\startcontextdefinitioncode
+-- ...) so it fails there.
+--
+-- Another drawback is that we then need to use { } instead of ending with \relax (as
+-- we can do now) but that is no big deal. It's just that I then need to check the TeX
+-- end. More pain than gain and a bit risky too. Using scanletters works better, but
+-- the gain is only some 10 percent but if we don't have keywords with numbers it might
+-- make sense in the end, some day.
+
+local f_if = formatters[ " if scankeywordcs('%s') then data['%s'] = scan%s()"]
+local f_elseif = formatters[" elseif scankeywordcs('%s') then data['%s'] = scan%s()"]
+
+----- f_if_x = formatters[ " if not data['%s'] and scankeywordcs('%s') then data['%s'] = scan%s()"]
+----- f_elseif_x = formatters[" elseif not data['%s'] and scankeywordcs('%s') then data['%s'] = scan%s()"]
+
+----- f_if = formatters[" local key = scanletters() if key == '' then break elseif key == '%s' then data['%s'] = scan%s()"]
+----- f_elseif = formatters[" elseif key == '%s' then data['%s'] = scan%s()"]
+
+local f_local = formatters["local scan%s = scanners.%s"]
+local f_scan = formatters["scan%s()"]
+local f_shortcut = formatters["local %s = scanners.converters.%s"]
+
+local f_if_c = formatters[ " if scankeywordcs('%s') then data['%s'] = %s(scan%s())"]
+local f_elseif_c = formatters[" elseif scankeywordcs('%s') then data['%s'] = %s(scan%s())"]
+local f_scan_c = formatters["%s(scan%s())"]
+
+-- see above
+
+----- f_if_c = formatters[" local key = scanletters() if key == '' then break elseif key == '%s' then data['%s'] = %s(scan%s())"]
+----- f_elseif_c = formatters[" elseif k == '%s' then data['%s'] = %s(scan%s())"]
+
+local f_any = formatters[" else local key = scanword(true) if key then data[key] = scan%s() else break end end"]
+local f_any_c = formatters[" else local key = scanword(true) if key then data[key] = %s(scan%s()) else break end end"]
+local s_done = " else break end"
+
+local f_any_all = formatters[" local key = scanword(true) if key then data[key] = scan%s() else break end"]
+local f_any_all_c= formatters[" local key = scanword(true) if key then data[key] = %s(scan%s()) else break end"]
+
+local f_table = formatters["%\nt\nreturn function()\n local data = { }\n%s\n return %s\nend\n"]
+local f_sequence = formatters["%\nt\n%\nt\n%\nt\nreturn function()\n return %s\nend\n"]
+local f_singular = formatters["%\nt\n%\nt\n\nreturn function(%s)\n return %s\nend\n"]
+local f_simple = formatters["%\nt\nreturn function()\n return %s\nend\n"]
+local f_string = formatters["%q"]
+local f_action_f = formatters["action%s(%s)"]
+local f_action_s = formatters["local action%s = tokens._action[%s]"]
+local f_nested = formatters["local function scan%s()\n local data = { }\n%s\n return data\nend\n"]
+
+local f_check = formatters[ [[
+ local wrapped = scanopen()
+ while true do
+ ]] .. "%\nt\n" .. [[
+ %s
+ end
+ if wrapped then
+ scanclose()
+ end
+]] ]
+
+-- using these shortcuts saves temporary small tables (okay, it looks uglier)
+
+local presets = {
+ ["1 string" ] = { "string" },
+ ["2 strings"] = { "string", "string" },
+ ["3 strings"] = { "string", "string", "string" },
+ ["4 strings"] = { "string", "string", "string", "string" },
+ ["5 strings"] = { "string", "string", "string", "string", "string" },
+ ["6 strings"] = { "string", "string", "string", "string", "string", "string" },
+ ["7 strings"] = { "string", "string", "string", "string", "string", "string", "string" },
+ ["8 strings"] = { "string", "string", "string", "string", "string", "string", "string", "string" },
+
+ ["1 argument" ] = { "argument" },
+ ["2 arguments"] = { "argument", "argument" },
+ ["3 arguments"] = { "argument", "argument", "argument" },
+ ["4 arguments"] = { "argument", "argument", "argument", "argument" },
+}
+
+tokens.presets = presets
+
+function tokens.compile(specification)
+ local f = { }
+ local n = 0
+ local c = { }
+ local t = specification.arguments or specification
+ local a = specification.actions or nil
+ if type(a) == "function" then
+ a = { a }
+ end
+ local code
+ local args
+ local function compile(t,nested)
+ local done = s_done
+ local r = { }
+ local m = 0
+ for i=1,#t do
+ local ti = t[i]
+ if ti == "*" and i == 1 then
+ done = f_any_all("string")
+ else
+ local t1 = ti[1]
+ local t2 = ti[2] or "string"
+ if type(t2) == "table" then
+ n = n + 1
+ f[n] = compile(t2,n)
+ t2 = n
+ end
+ local t3 = ti[3]
+ if type(t3) == "function" then
+ -- todo: also create shortcut
+ elseif t3 then
+ c[t3] = f_shortcut(t3,t3)
+ if t1 == "*" then
+ if i == 1 then
+ done = f_any_all_c(t3,t2)
+ break
+ else
+ done = f_any_c(t3,t2)
+ end
+ else
+ m = m + 1
+ r[m] = (m > 1 and f_elseif_c or f_if_c)(t1,t1,t3,t2)
+ end
+ else
+ if t1 == "*" then
+ if i == 1 then
+ done = f_any_all(t2)
+ break
+ else
+ done = f_any(t2)
+ end
+ else
+ m = m + 1
+ r[m] = (m > 1 and f_elseif or f_if )(t1,t1,t2)
+ -- r[m] = (m > 1 and f_elseif_x or f_if_x)(t1,t1,t1,t2)
+ end
+ end
+ end
+ end
+ local c = f_check(r,done)
+ if nested then
+ return f_nested(nested,c)
+ else
+ return c
+ end
+ end
+ local p = t and presets[t] -- already done in implement
+ if p then
+ t = p
+ end
+ local tt = type(t)
+ if tt == "string" then
+ if a then
+ local s = lpegmatch(p_unquoted,t)
+ if s and t ~= s then
+ code = t
+ else
+ code = f_scan(t)
+ end
+ tokens._action = a
+ for i=1,#a do
+ code = f_action_f(i,code)
+ n = n + 1
+ f[n] = f_action_s(i,i)
+ end
+ code = f_simple(f,code)
+ else
+ return scanners[t]
+ end
+ elseif tt ~= "table" then
+ return
+ elseif #t == 1 then
+ local ti = t[1]
+ if type(ti) == "table" then
+ ti = compile(ti)
+ code = "data"
+ if a then
+ tokens._action = a
+ for i=1,#a do
+ code = f_action_f(i,code)
+ n = n + 1
+ f[n] = f_action_s(i,i)
+ end
+ end
+ code = f_table(f,ti,code)
+ elseif a then
+ code = f_scan(ti)
+ tokens._action = a
+ for i=1,#a do
+ code = f_action_f(i,code)
+ n = n + 1
+ f[n] = f_action_s(i,i)
+ end
+ code = f_simple(f,code)
+ else
+ return scanners[ti]
+ end
+ elseif #t == 0 then
+ if specification.usage == "value" then
+ code = "b"
+ args = "_,b"
+ else
+ code = ""
+ args = ""
+ end
+ if a then
+ tokens._action = a
+ for i=1,#a do
+ code = f_action_f(i,code)
+ n = n + 1
+ f[n] = f_action_s(i,i)
+ end
+ end
+ code = f_singular(c,f,args,code)
+ else
+ local r = { }
+ local p = { }
+ local m = 0
+ for i=1,#t do
+ local ti = t[i]
+ local tt = type(ti)
+ if tt == "table" then
+ if ti[1] == "_constant_" then
+ local v = ti[2]
+ if type(v) == "string" then
+ r[i] = f_string(v)
+ else
+ r[i] = tostring(v)
+ end
+ else
+ m = m + 1
+ p[m] = compile(ti,100+m)
+ r[i] = f_scan(100+m)
+ end
+ elseif tt == "number" then
+ r[i] = tostring(ti)
+ elseif tt == "boolean" then
+ r[i] = tostring(ti)
+ else
+ local s = lpegmatch(p_unquoted,ti)
+ if s and ti ~= s then
+ r[i] = ti -- a string, given as "'foo'" or '"foo"'
+ elseif scanners[ti] then
+ r[i] = f_scan(ti)
+ else
+ report_compile("unknown scanner %a",ti)
+ r[i] = ti
+ end
+ end
+ end
+ code = concat(r,",")
+ if a then
+ tokens._action = a
+ for i=1,#a do
+ code = f_action_f(i,code)
+ n = n + 1
+ f[n] = f_action_s(i,i)
+ end
+ end
+ code = f_sequence(c,f,p,code)
+ end
+ if not code then
+ return
+ end
+ if trace_compile then
+ report_compile("code: %s",code)
+ end
+ local code, message = loadstripped(code)
+ if code then
+ code = code() -- sets action
+ else
+ report_compile("error in code: %s",code)
+ report_compile("error message: %s",message)
+ end
+ if a then
+ tokens._action = nil
+ end
+ if code then
+ return code
+ end
+end
+
+-- local fetch = tokens.compile {
+-- "string",
+-- "string",
+-- {
+-- { "data", "string" },
+-- { "tab", "string" },
+-- { "method", "string" },
+-- { "foo", {
+-- { "method", "integer" },
+-- { "compact", "number" },
+-- { "nature" },
+-- { "*" }, -- any key
+-- } },
+-- { "compact", "string", "tonumber" },
+-- { "nature", "boolean" },
+-- { "escape", "string" },
+-- { "escape" },
+-- },
+-- "boolean",
+-- }
+--
+-- os.exit()
diff --git a/Master/texmf-dist/tex/context/base/mkxl/toks-scn.mkxl b/Master/texmf-dist/tex/context/base/mkxl/toks-scn.mkxl
new file mode 100644
index 00000000000..e8da7063d25
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/toks-scn.mkxl
@@ -0,0 +1,23 @@
+%D \module
+%D [ file=toks-ini,
+%D version=2007.03.03,
+%D title=\CONTEXT\ Token Support,
+%D subtitle=Initialization,
+%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 Token Support / Scanners}
+
+\unprotect
+
+\registerctxluafile{toks-scn}{}
+\registerctxluafile{cldf-scn}{}
+\registerctxluafile{cldf-stp}{}
+\registerctxluafile{cldf-lmt}{}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-ctx.mkxl b/Master/texmf-dist/tex/context/base/mkxl/trac-ctx.mkxl
new file mode 100644
index 00000000000..656a7a9aa9b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-ctx.mkxl
@@ -0,0 +1,58 @@
+%D \module
+%D [ file=trac-ctx,
+%D version=2012.07.13,
+%D title=\CONTEXT\ Tracing Macros,
+%D subtitle=TeX Trackers,
+%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 Tracing Macros / TeX Trackers}
+
+\registerctxluafile{trac-ctx}{}
+
+\unprotect
+
+\permanent\protected\def\installtextracker #1#2#3{\clf_installtextracker {#1}{\detokenize{#2}}{\detokenize{#3}}}
+\permanent\protected\def\installtexdirective #1#2#3{\clf_installtexdirective {#1}{\detokenize{#2}}{\detokenize{#3}}}
+\permanent\protected\def\installtexexperiment#1#2#3{\clf_installtexexperiment{#1}{\detokenize{#2}}{\detokenize{#3}}}
+
+\appendtoks
+ \clf_initializetextrackers
+ \clf_initializetexdirectives
+ \clf_initializetexexperiments
+\to \everyjob
+
+\protect \endinput
+
+% this is one option:
+%
+% \newconditional\c_math_virtual_tx
+% \newconditional\c_math_virtual_px
+% \newconditional\c_math_virtual_lm
+%
+% \installtexdirective {fonts.math.virtual.tx} {\settrue \c_math_virtual_tx} {\setfalse\c_math_virtual_tx}
+% \installtexdirective {fonts.math.virtual.px} {\settrue \c_math_virtual_px} {\setfalse\c_math_virtual_px}
+% \installtexdirective {fonts.math.virtual.lm} {\settrue \c_math_virtual_lm} {\setfalse\c_math_virtual_lm}
+%
+% but as it makes the typescript look ugly we wil use:
+%
+% \installtexdirective {fonts.math.virtual.tx} {\enablemode[fonts.math.virtual.tx]} {\disablemode[fonts.math.virtual.tx]}
+% \installtexdirective {fonts.math.virtual.px} {\enablemode[fonts.math.virtual.px]} {\disablemode[fonts.math.virtual.px]}
+% \installtexdirective {fonts.math.virtual.lm} {\enablemode[fonts.math.virtual.lm]} {\disablemode[fonts.math.virtual.lm]}
+%
+% which could be:
+%
+% \def\mode_f_m_v_tx{fonts.math.virtual.tx}
+% \def\mode_f_m_v_px{fonts.math.virtual.px}
+% \def\mode_f_m_v_lm{fonts.math.virtual.lm}
+%
+% \installtexdirective \mode_f_m_v_tx {\enablemode[\mode_f_m_v_tx]} {\disablemode[\mode_f_m_v_tx]}
+% \installtexdirective \mode_f_m_v_px {\enablemode[\mode_f_m_v_px]} {\disablemode[\mode_f_m_v_px]}
+% \installtexdirective \mode_f_m_v_lm {\enablemode[\mode_f_m_v_lm]} {\disablemode[\mode_f_m_v_lm]}
+%
+% alas .. we don't want to define this in the core
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt b/Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt
new file mode 100644
index 00000000000..8ff12410528
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-deb.lmt
@@ -0,0 +1,417 @@
+if not modules then modules = { } end modules ['trac-deb'] = {
+ version = 1.001,
+ comment = "companion to trac-deb.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is an old mechanism, a result of some experiments in the early days of
+-- luatex and mkiv, but still nice anyway. I will clean it up in lmtx.
+
+local status = status
+
+local tonumber, tostring, type = tonumber, tostring, type
+local format, concat, match, find, gsub = string.format, table.concat, string.match, string.find, string.gsub
+
+local report_nl = logs.newline
+local report_str = logs.writer
+
+tracers = tracers or { }
+local tracers = tracers
+
+local implement = interfaces.implement
+
+local ioflush = io.flush
+local ioread = io.read
+local writenl = texio.write_nl
+local write = texio.write
+
+local runlocal = tex.runlocal
+local terminaldata = false
+local context = context
+
+implement {
+ name = "fetchterminaldata",
+ actions = function()
+ context(terminaldata)
+ end,
+}
+
+function texio.terminal()
+ writenl("\n" .. "entering interactive mode, use \\quit to abort reading" .."\n\n")
+ while true do
+ write(">")
+ ioflush()
+ terminaldata = ioread()
+ if terminaldata == "\\quit" then
+ terminaldata = false
+ break
+ else
+ runlocal("t_syst_terminal_data",nil,nil,true) -- obeymode
+ end
+ end
+end
+
+implement {
+ name = "readfromterminal",
+ public = true,
+ protected = true,
+ actions = texio.terminal,
+}
+
+local savedluaerror = nil
+local usescitelexer = nil
+local quitonerror = true
+
+local function errorreporter(luaerror)
+ local category = luaerror and "lua error" or "tex error"
+ local report = logs.reporter(category)
+ logs.enable(category)
+ return report
+end
+
+function tracers.showlines(filename,linenumber,offset,luaerrorline)
+ local data = io.loaddata(filename)
+ if not data or data == "" then
+ local hash = url.hashed(filename)
+ if not hash.noscheme then
+ local ok, d, n = resolvers.loaders.byscheme(hash.scheme,filename)
+ if ok and n > 0 then
+ data = d
+ end
+ end
+ end
+ local scite = usescitelexer and require("util-sci")
+ if scite then
+ return utilities.scite.tohtml(data,"tex",linenumber or true,false)
+ else
+ local lines = data and string.splitlines(data)
+ if lines and #lines > 0 then
+ if luaerrorline and luaerrorline > 0 then
+ -- lua error: linenumber points to last line
+ local start = "\\startluacode"
+ local stop = "\\stopluacode"
+ local n = linenumber
+ for i=n,1,-1 do
+ local line = lines[i]
+ if not line then
+ break
+ elseif find(line,start) then
+ n = i + luaerrorline - 1
+ if n <= linenumber then
+ linenumber = n
+ end
+ break
+ end
+ end
+ end
+ offset = tonumber(offset) or 10
+ linenumber = tonumber(linenumber) or 10
+ local start = math.max(linenumber - offset,1)
+ local stop = math.min(linenumber + offset,#lines)
+ if stop > #lines then
+ return "<linenumber past end of file>"
+ else
+ local result, fmt = { }, "%" .. #tostring(stop) .. "d %s %s"
+ for n=start,stop do
+ result[#result+1] = format(fmt,n,n == linenumber and ">>" or " ",lines[n])
+ end
+ return concat(result,"\n")
+ end
+ else
+ return "<empty file>"
+ end
+ end
+end
+
+-- todo: last tex error has ! prepended
+-- todo: some nested errors have two line numbers
+-- todo: collect errorcontext in string (after code cleanup)
+-- todo: have a separate status.lualinenumber
+-- todo: \starttext bla \blank[foo] bla \stoptext
+
+local nop = function() end
+local resetmessages = status.resetmessages or nop
+
+local function processerror(offset,errortype)
+ local readstate = status.readstate
+ local filename = readstate.filename
+ local linenumber = readstate.linenumber
+ local skiplinenumber = readstate.skiplinenumber
+ local errorstate = status.errorstate
+ local lastcontext = errorstate.errorcontext
+ local lasttexerror = errorstate.error or "?"
+ local lastluaerror = errorstate.luaerror or "?" -- lasttexerror
+ local luaerrorline = match(lastluaerror,[[lua%]?:.-(%d+)]]) or (lastluaerror and find(lastluaerror,"?:0:",1,true) and 0)
+ local lastmpserror = match(lasttexerror,[[^.-mp%serror:%s*(.*)$]])
+ resetmessages()
+ lastluaerror = gsub(lastluaerror,"%[\\directlua%]","[ctxlua]")
+ tracers.printerror {
+ filename = filename,
+ linenumber = linenumber,
+ skiplinenumber = skiplinenumber,
+ offset = tonumber(offset) or 10,
+ lasttexerror = lasttexerror,
+ lastmpserror = lastmpserror,
+ lastluaerror = lastluaerror, -- can be the same as lasttexerror
+ luaerrorline = luaerrorline,
+ lastcontext = lastcontext,
+ lasttexhelp = tex.gethelptext and tex.gethelptext() or nil,
+ errortype = errortype,
+ }
+ if job and type(job.disablesave) == "function" then
+ job.disablesave()
+ end
+end
+
+directives.register("system.quitonerror",function(v)
+ quitonerror = toboolean(v)
+end)
+
+directives.register("system.usescitelexer",function(v)
+ usescitelexer = toboolean(v)
+end)
+
+local busy = false
+
+function tracers.printerror(specification)
+ if not busy then
+ busy = true
+ local errorvalues = table.swapped(tex.geterrorvalues())
+ local filename = specification.filename
+ local linenumber = specification.linenumber
+ local lasttexerror = specification.lasttexerror
+ local lastmpserror = specification.lastmpserror
+ local lastluaerror = specification.lastluaerror
+ local lastcontext = specification.lastcontext
+ local luaerrorline = specification.luaerrorline
+ local errortype = specification.errortype
+ local offset = specification.offset
+ local endoffile = specification.endoffile
+ local report = errorreporter(luaerrorline)
+ if errortype == errorvalues.warning then
+ report("warning error: %s",lasttexerror or "-")
+ busy = false;
+ return;
+ elseif errortype == errorvalues.eof then
+ report("runaway error: %s",lasttexerror or "-")
+ if not quitonerror and texio.terminal then
+ texio.terminal() -- not well tested
+ end
+ elseif errortype == errorvalues.condition then
+ linenumber = specification.skiplinenumber
+ if linenumber > 0 then
+ report("condition error on line %s in file %s: %s",linenumber,filename,lasttexerror)
+ report_nl()
+ report_str(tracers.showlines(filename,linenumber,offset,tonumber(luaerrorline)))
+ report_nl()
+ else
+ report("runaway condition error: %s",lasttexerror or "-")
+ end
+ quitonerror = true
+ elseif not filename then
+ report("fuzzy error:")
+ report(" tex: %s",lasttexerror or "-")
+ report(" lua: %s",lastluaerror or "-")
+ report(" mps: %s",lastmpserror or "-")
+ elseif type(filename) == "number" then
+ report("error on line %s of filehandle %s: %s ...",linenumber,lasttexerror)
+ else
+ report_nl()
+ if luaerrorline then
+ if linenumber == 0 or not filename or filename == "" then
+ print("\nfatal lua error:\n\n",lastluaerror,"\n")
+ luatex.abort()
+ return
+ else
+ report("lua error on line %s in file %s:\n\n%s",linenumber,filename,lastluaerror)
+ end
+ elseif lastmpserror then
+ report("mp error on line %s in file %s:\n\n%s",linenumber,filename,lastmpserror)
+ else
+ report("tex error on line %s in file %s: %s",linenumber,filename,lasttexerror)
+ if lastcontext then
+ report_nl()
+ report_str(lastcontext)
+ report_nl()
+ else
+ report_nl()
+ -- tex.showcontext()
+ end
+ if lastluaerror and not match(lastluaerror,"^%s*[%?]*%s*$") then
+ print("\nlua error:\n\n",lastluaerror,"\n")
+ quitonerror = true
+ end
+ end
+ report_nl()
+ report_str(tracers.showlines(filename,linenumber,offset,tonumber(luaerrorline)))
+ report_nl()
+ end
+ local errname = file.addsuffix(tex.jobname .. "-error","log")
+ if quitonerror then
+ table.save(errname,specification)
+ local help = specification.lasttexhelp
+ if help and #help > 0 then
+ report_nl()
+ report_str(help)
+ report_nl()
+ report_nl()
+ end
+ luatex.abort()
+ end
+ busy = false
+ end
+end
+
+luatex.wrapup(function() os.remove(file.addsuffix(tex.jobname .. "-error","log")) end)
+
+local function processwarning(offset)
+ local warningstate = status.warningstate
+ local lastwarning = warningstate.warning or "?"
+ local lastlocation = warningstate.warningtag or "?"
+ resetmessages()
+ tracers.printwarning {
+ lastwarning = lastwarning,
+ lastlocation = lastlocation,
+ }
+end
+
+function tracers.printwarning(specification)
+ logs.report("luatex warning","%s: %s",specification.lastlocation,specification.lastwarning)
+end
+
+directives.register("system.errorcontext", function(v)
+ local register = callback.register
+ if v then
+ register('show_error_message', nop)
+ register('show_warning_message', function() processwarning(v) end)
+ register('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)
+ end
+end)
+
+-- this might move
+
+lmx = lmx or { }
+
+lmx.htmfile = function(name) return environment.jobname .. "-status.html" end
+lmx.lmxfile = function(name) return resolvers.findfile(name,'tex') end
+
+local function reportback(lmxname,default,variables)
+ if lmxname == false then
+ return variables
+ else
+ local name = lmx.show(type(lmxname) == "string" and lmxname or default,variables)
+ if name then
+ logs.report("context report","file: %s",name)
+ end
+ end
+end
+
+local function showerror(lmxname)
+ local readstate = status.readstate()
+ local filename = readstate.filename
+ local linenumber = tonumber(readstate.linenumber) or 0
+ local errorcontext = ""
+ if not filename then
+ filename = status.iocodes[readstate.iocode]
+ errorcontext = 'error in filename'
+ else
+ errorcontext = tracers.showlines(filename,linenumber,offset)
+ end
+ local variables = {
+ ['title'] = 'ConTeXt Error Information',
+ ['errormessage'] = status.errorstatus.error or "?",
+ ['linenumber'] = linenumber,
+ ['color-background-one'] = lmx.get('color-background-yellow'),
+ ['color-background-two'] = lmx.get('color-background-purple'),
+ ['filename'] = filename,
+ ['errorcontext'] = errorcontext,
+ }
+ reportback(lmxname,"context-error.lmx",variables)
+ luatex.abort()
+end
+
+lmx.showerror = showerror
+
+function lmx.overloaderror(v)
+ if v == "scite" then
+ usescitelexer = true
+ end
+ callback.register('show_error_message', function() showerror() end)
+ callback.register('intercept_lua_error', function() showerror() end)
+ callback.register('intercept_tex_error', function() showerror() end)
+end
+
+directives.register("system.showerror", lmx.overloaderror)
+
+-- local debugger = utilities.debugger
+--
+-- local function trace_calls(n)
+-- debugger.enable()
+-- luatex.registerstopactions(function()
+-- debugger.disable()
+-- debugger.savestats(tex.jobname .. "-luacalls.log",tonumber(n))
+-- end)
+-- trace_calls = function() end
+-- end
+--
+-- directives.register("system.tracecalls", function(n)
+-- trace_calls(n)
+-- end) -- indirect is needed for nilling
+
+-- Obsolete ... not that usefull as normally one runs from an editor and
+-- when run unattended it makes no sense either.
+
+-- local editor = [[scite "-open:%filename%" -goto:%linenumber%]]
+--
+-- directives.register("system.editor",function(v)
+-- editor = v
+-- end)
+--
+-- callback.register("call_edit",function(filename,linenumber)
+-- if editor then
+-- editor = gsub(editor,"%%s",filename)
+-- editor = gsub(editor,"%%d",linenumber)
+-- editor = gsub(editor,"%%filename%%",filename)
+-- editor = gsub(editor,"%%linenumber%%",linenumber)
+-- logs.report("system","starting editor: %s",editor)
+-- os.execute(editor)
+-- end
+-- end)
+
+implement { name = "showtrackers", public = true, protected = true, actions = trackers.show }
+implement { name = "enabletrackers", public = true, protected = true, actions = trackers.enable, arguments = "optional" }
+implement { name = "disabletrackers", public = true, protected = true, actions = trackers.disable, arguments = "optional" }
+implement { name = "resettrackers", public = true, protected = true, actions = trackers.reset }
+
+implement { name = "showdirectives", public = true, protected = true, actions = directives.show }
+implement { name = "enabledirectives", public = true, protected = true, actions = directives.enable, arguments = "optional" }
+implement { name = "disabledirectives", public = true, protected = true, actions = directives.disable, arguments = "optional" }
+
+implement { name = "showexperiments", public = true, protected = true, actions = experiments.show }
+implement { name = "enableexperiments", public = true, protected = true, actions = experiments.enable, arguments = "optional" }
+implement { name = "disableexperiments", public = true, protected = true, actions = experiments.disable, arguments = "optional" }
+
+implement { name = "overloaderror", public = true, protected = true, actions = lmx.overloaderror }
+implement { name = "showlogcategories", public = true, protected = true, actions = logs.show }
+
+local debugger = utilities.debugger
+
+directives.register("system.profile",function(n)
+ luatex.registerstopactions(function()
+ debugger.disable()
+ debugger.savestats("luatex-profile.log",tonumber(n) or 0)
+ report_nl()
+ logs.report("system","profiler stopped, log saved in %a","luatex-profile.log")
+ report_nl()
+ end)
+ logs.report("system","profiler started")
+ debugger.enable()
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-deb.mkxl b/Master/texmf-dist/tex/context/base/mkxl/trac-deb.mkxl
new file mode 100644
index 00000000000..0eab24d2940
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-deb.mkxl
@@ -0,0 +1,45 @@
+%D \module
+%D [ file=trac-deb,
+%D version=2005.11.06,
+%D title=\CONTEXT\ Tracing Macros,
+%D subtitle=Debugger,
+%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 Tracing Macros / Debugger}
+
+%registerctxluafile{trac-lmx}{}
+\registerctxluafile{trac-deb}{autosuffix}
+
+\unprotect
+
+% \showtrackers % defined at the lua end
+% \enabletrackers [#1] % defined at the lua end
+% \disabletrackers [#1] % defined at the lua end
+% \resettrackers % defined at the lua end
+%
+% \showdirectives % defined at the lua end
+% \enabledirectives [#1] % defined at the lua end
+% \disabledirectives [#1] % defined at the lua end
+%
+% \showexperiments % defined at the lua end
+% \enableexperiments [#1] % defined at the lua end
+% \disableexperiments[#1] % defined at the lua end
+%
+% \overloaderror % defined at the lua end
+%
+% \showlogcategories % defined at the lua end
+
+% \enabledirectives[system.showerror]
+
+\newtoks \t_syst_terminal_data
+
+%t_syst_terminal_data {\beginlocalcontrol\clf_fetchterminaldata\endlocalcontrol}
+\t_syst_terminal_data {\clf_fetchterminaldata}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-inf.lmt b/Master/texmf-dist/tex/context/base/mkxl/trac-inf.lmt
new file mode 100644
index 00000000000..ebcd21e07af
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-inf.lmt
@@ -0,0 +1,425 @@
+if not modules then modules = { } end modules ['trac-inf'] = {
+ version = 1.001,
+ comment = "companion to trac-inf.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- As we want to protect the global tables, we no longer store the timing
+-- in the tables themselves but in a hidden timers table so that we don't
+-- get warnings about assignments. This is more efficient than using rawset
+-- and rawget.
+
+local type, tonumber, select = type, tonumber, select
+local format, lower, find, gsub, rep = string.format, string.lower, string.find, string.gsub, string.rep
+local concat = table.concat
+local clock = os.gettimeofday or os.clock -- should go in environment
+
+local setmetatableindex = table.setmetatableindex
+local serialize = table.serialize
+local formatters = string.formatters
+
+statistics = statistics or { }
+local statistics = statistics
+
+statistics.enable = true
+statistics.threshold = 0.01
+
+local statusinfo, n, registered, timers = { }, 0, { }, { }
+
+setmetatableindex(timers,function(t,k)
+ local v = { timing = 0, loadtime = 0, offset = 0 }
+ t[k] = v
+ return v
+end)
+
+local function hastiming(instance)
+ return instance and timers[instance]
+end
+
+local function resettiming(instance)
+ timers[instance or "notimer"] = { timing = 0, loadtime = 0, offset = 0 }
+end
+
+local ticks = clock
+local seconds = function(n) return n or 0 end
+
+ticks = lua.getpreciseticks
+seconds = lua.getpreciseseconds
+
+local function starttiming(instance,reset)
+ local timer = timers[instance or "notimer"]
+ local it = timer.timing
+ if reset then
+ it = 0
+ timer.loadtime = 0
+ end
+ if it == 0 then
+ timer.starttime = ticks()
+ if not timer.loadtime then
+ timer.loadtime = 0
+ end
+ end
+ timer.timing = it + 1
+end
+
+local function stoptiming(instance)
+ local timer = timers[instance or "notimer"]
+ local it = timer.timing
+ if it > 1 then
+ timer.timing = it - 1
+ else
+ local starttime = timer.starttime
+ if starttime and starttime > 0 then
+ local stoptime = ticks()
+ local loadtime = stoptime - starttime
+ timer.stoptime = stoptime
+ timer.loadtime = timer.loadtime + loadtime
+ timer.timing = 0
+ timer.starttime = 0
+ end
+ end
+end
+
+local function benchmarktimer(instance)
+ local timer = timers[instance or "notimer"]
+ local it = timer.timing
+ if it > 1 then
+ timer.timing = it - 1
+ else
+ local starttime = timer.starttime
+ if starttime and starttime > 0 then
+ timer.offset = ticks() - starttime
+ else
+ timer.offset = 0
+ end
+ end
+end
+
+local function elapsed(instance)
+ if type(instance) == "number" then
+ return instance
+ else
+ local timer = timers[instance or "notimer"]
+ return timer and seconds(timer.loadtime - 2*(timer.offset or 0)) or 0
+ end
+end
+
+local function currenttime(instance)
+ if type(instance) == "number" then
+ return instance
+ else
+ local timer = timers[instance or "notimer"]
+ local it = timer.timing
+ if it > 1 then
+ -- whatever
+ else
+ local starttime = timer.starttime
+ if starttime and starttime > 0 then
+ return seconds(timer.loadtime + ticks() - starttime - 2*(timer.offset or 0))
+ end
+ end
+ return 0
+ end
+end
+
+local function elapsedtime(instance)
+ return format("%0.3f",elapsed(instance))
+end
+
+local function elapsedindeed(instance)
+ return elapsed(instance) > statistics.threshold
+end
+
+local function elapsedseconds(instance,rest) -- returns nil if 0 seconds
+ if elapsedindeed(instance) then
+ return format("%0.3f seconds %s", elapsed(instance),rest or "")
+ end
+end
+
+statistics.hastiming = hastiming
+statistics.resettiming = resettiming
+statistics.starttiming = starttiming
+statistics.stoptiming = stoptiming
+statistics.currenttime = currenttime
+statistics.elapsed = elapsed
+statistics.elapsedtime = elapsedtime
+statistics.elapsedindeed = elapsedindeed
+statistics.elapsedseconds = elapsedseconds
+statistics.benchmarktimer = benchmarktimer
+
+-- general function .. we might split this module
+
+function statistics.register(tag,fnc)
+ if statistics.enable and type(fnc) == "function" then
+ -- second load can overload:
+ local rt = registered[tag] or (#statusinfo + 1)
+ statusinfo[rt] = { tag, fnc }
+ registered[tag] = rt
+ if #tag > n then n = #tag end
+ end
+end
+
+local report = logs.reporter("mkiv lua stats")
+
+function statistics.show()
+ if statistics.enable then
+ -- this code will move
+ local register = statistics.register
+ register("used platform", function()
+ return format("%s, type: %s, binary subtree: %s",
+ os.platform or "unknown",os.type or "unknown", environment.texos or "unknown")
+ end)
+ register("used engine", function()
+ return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
+ LUATEXENGINE, LUATEXVERSION, LUATEXFUNCTIONALITY, LUATEXFORMATID, status.used_compiler)
+ end)
+ register("tex properties", function()
+ local t = status.gethashstate()
+ local l = status.getlookupstate()
+ local m = status.gettexstate()
+ return format("%s hash slots used of %s, %s control sequences, approximate memory usage: %i MB",
+ t.top, t.max, l.ptr, m.approximate // (1024 * 1024))
+ end)
+ register("callbacks", statistics.callbacks)
+ -- so far
+ register("lua properties",function()
+ -- local hash = lua.gethashchars()
+ local mask = load([[τεχ = 1]]) and "utf" or "ascii"
+ -- return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
+ return format("engine: %s %s, used memory: %s, symbol mask: %s (%s)",
+ "lua", LUAVERSION, statistics.memused(), mask, mask == "utf" and "τεχ" or "tex")
+ end)
+ register("runtime",statistics.runtime)
+ logs.newline() -- initial newline
+ for i=1,#statusinfo do
+ local s = statusinfo[i]
+ local r = s[2]()
+ if r then
+ report("%s: %s",s[1],r)
+ end
+ end
+ -- logs.newline() -- final newline
+ statistics.enable = false
+ end
+end
+
+function statistics.memused() -- no math.round yet -)
+ local round = math.round or math.floor
+ local luastate = status.getluastate()
+ return format("%s MB, ctx: %s MB, max: %s MB",
+ round(collectgarbage("count")//1024),
+ round(luastate.state_bytes//1048576),
+ luastate.state_bytes_max and round(luastate.state_bytes_max//1048576) or "unknown"
+ )
+end
+
+starttiming(statistics)
+
+function statistics.formatruntime(runtime) -- indirect so it can be overloaded and
+ return format("%s seconds", runtime) -- indeed that happens in cure-uti.lua
+end
+
+function statistics.runtime()
+ stoptiming(statistics)
+ -- stoptiming(statistics) -- somehow we can start the timer twice, but where
+ local runtime = lua.getruntime and lua.getruntime() or elapsedtime(statistics)
+ return statistics.formatruntime(runtime)
+end
+
+local report = logs.reporter("system")
+
+function statistics.timed(action,all)
+ starttiming("run")
+ action()
+ stoptiming("run")
+ local runtime = tonumber(elapsedtime("run"))
+ if all then
+ local alltime = tonumber(lua.getruntime and lua.getruntime() or elapsedtime(statistics))
+ if alltime and alltime > 0 then
+ report("total runtime: %0.3f seconds of %0.3f seconds",runtime,alltime)
+ return
+ end
+ end
+ report("total runtime: %0.3f seconds",runtime)
+end
+
+-- goodie
+
+function statistics.tracefunction(base,tag,...)
+ for i=1,select("#",...) do
+ local name = select(i,...)
+ local stat = { }
+ local func = base[name]
+ setmetatableindex(stat,function(t,k) t[k] = 0 return 0 end)
+ base[name] = function(n,k,v) stat[k] = stat[k] + 1 return func(n,k,v) end
+ statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
+ end
+end
+
+-- now here
+
+status.iocodes = setmetatableindex(tex.getiovalues(), function() return "unknown" end)
+
+local report = logs.reporter("system")
+
+function statistics.showusage(when)
+ local s = status.list()
+ local c = status.getcallbackstate() -- status.callbacks
+ local m = mplib.getcallbackstate()
+ local b = backends.getcallbackstate()
+ --
+ local estatus = s.expandstate
+ local tstatus = s.texstate
+ local lstatus = s.luastate
+ local rstatus = s.readstate
+ --
+ local pstatus = logs.private.getpagetiming()
+ --
+ local iocode = status.iocodes[rstatus.iocode]
+ --
+ local mpinstances, mpmemory = metapost.getstatistics(true)
+ --
+ report("")
+ if when == "finish" then
+ report("status after finishing run")
+ else
+ report("status after shipping out page %s",tex.getcount("realpageno"))
+ end
+ report("")
+ local list = {
+ "stringstate", "poolstate", "hashstate", "lookupstate",
+ "nodestate", "extrastate", "tokenstate",
+ "bufferstate", "inputstate", "filestate",
+ "neststate", "parameterstate", "savestate",
+ "fontstate", "languagestate", "markstate", "sparsestate",
+ }
+ local fields = { "max", "min", "set", "stp", false, "mem", "all", false, "ini", "ptr", "top" }
+ local line = rep("-",190)
+ do
+ local t = { }
+ for i=1,#list do
+ t[i] = gsub(list[i],"state","")
+ end
+ report("%w%s",2,line)
+ report("%w%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s",5,unpack(t))
+ report("%w%s",2,line)
+ end
+ for i=1,#fields do
+ local f = fields[i]
+ if f then
+ local t = { }
+ for i=1,#list do
+ local n = s[list[i]][f]
+ t[i] = n < 0 and formatters["%w"](11) or formatters["%11i"](n)
+ end
+ report(" %3s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s",f,unpack(t))
+ else
+ report("")
+ end
+ end
+ report("%w%s",2,line)
+ report("")
+ report(" current input type : %s", iocode)
+ if iocode == "file" then
+ report(" current file name : %s", rstatus.filename or "")
+ report(" current line number : %s", rstatus.linenumber)
+ end
+ report("")
+ report(" approximate memory : %s (%s MB)", tstatus.approximate, tstatus.approximate // 1048576)
+ report("")
+ report(" expansion depth : min: %s, max: %s, set: %s, top: %s", estatus.min, estatus.max, estatus.set, estatus.top)
+ report("")
+ report(" luabytecode registers : %s", lstatus.bytecodes)
+ report(" luabytecode bytes : %s (%s MB)", lstatus.bytecode_bytes, lstatus.bytecode_bytes // 1048576)
+ report(" luastate bytes now : %s (%s MB)", lstatus.state_bytes, lstatus.state_bytes // 1048576)
+ report(" luastate bytes max : %s (%s MB)", lstatus.state_bytes_max, lstatus.state_bytes_max // 1048576)
+ report("")
+ report(" file callbacks : %s", c.file)
+ report(" saved callbacks : %s", c.saved)
+ report(" direct callbacks : %s", c.direct)
+ report(" function callbacks : %s", c["function"])
+ report(" value callbacks : %s", c.value)
+ report(" message callbacks : %s", c.message)
+ report(" bytecode callbacks : %s", c.bytecode)
+ report("")
+ report(" mp instances : %s", mpinstances)
+ report(" mp estimated memory : %s (%s MB)", mpmemory, mpmemory // 1048576)
+ report(" mp file callbacks : %s", m.file)
+ report(" mp text callbacks : %s", m.text)
+ report(" mp script callbacks : %s", m.script)
+ report(" mp log callbacks : %s", m.log)
+ report("")
+ report(" total callbacks : %s", c.count)
+ report(" mp total callbacks : %s", m.count)
+ report(" backend callbacks : %s", b.count)
+ report("")
+ report(" page numbers : realpage %s, userpage %s, subpage %s",pstatus.page.real,pstatus.page.user,pstatus.page.sub)
+ report(" page timing : total %0.03f, page %0.03f, average %0.03f",pstatus.time.elapsed,pstatus.time.page,pstatus.time.average)
+ report("")
+end
+
+function statistics.showmemory(when)
+ local s = status.list()
+ --
+ report("")
+ report("memory configuration")
+ report("")
+ local list = {
+ "stringstate", "poolstate", "hashstate", "lookupstate",
+ "nodestate", "tokenstate",
+ "bufferstate", "inputstate", "filestate",
+ "neststate", "parameterstate", "savestate",
+ "fontstate", "languagestate", "markstate",
+ }
+ local fields = { "max", "min", "set", "stp" }
+ local line = rep("-",168)
+ do
+ local t = { }
+ for i=1,#list do
+ t[i] = gsub(list[i],"state","")
+ end
+ report("%w%s",2,line)
+ report("%w%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s",5,unpack(t))
+ report("%w%s",2,line)
+ end
+ for i=1,#fields do
+ local f = fields[i]
+ if f then
+ local t = { }
+ for i=1,#list do
+ local n = s[list[i]][f]
+ t[i] = n < 0 and formatters["%w"](11) or formatters["%11i"](n)
+ end
+ report(" %3s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s%11s",f,unpack(t))
+ else
+ report("")
+ end
+ end
+ report("%w%s",2,line)
+ report("")
+end
+
+local registered = false
+local enabled = false
+
+trackers.register("system.usage", function(v)
+ if v and not registered then
+ logs.private.enablepagetiming()
+ if v ~= "summary" then
+ luatex.registerpageactions(function()
+ if enabled then
+ statistics.showusage("page")
+ end
+ end)
+ end
+ luatex.registerstopactions(function()
+ if enabled then
+ statistics.showusage("finish")
+ end
+ end)
+ registered = true
+ end
+ enabled = v
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-jus.mkxl b/Master/texmf-dist/tex/context/base/mkxl/trac-jus.mkxl
new file mode 100644
index 00000000000..3375e5ee76f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-jus.mkxl
@@ -0,0 +1,24 @@
+%D \module
+%D [ file=trac-jus,
+%D version=2012.11.27,
+%D title=\CONTEXT\ Tracing Macros,
+%D subtitle=Justification,
+%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 Tracing Macros / Justification}
+
+\registerctxluafile{trac-jus}{}
+
+\unprotect
+
+\definesystemattribute [justification] [public]
+
+\permanent\protected\def\showjustification{\clf_showjustification} % currently no argument (default 1), todo: public implementor
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-tex.mkxl b/Master/texmf-dist/tex/context/base/mkxl/trac-tex.mkxl
new file mode 100644
index 00000000000..13c1a047f76
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-tex.mkxl
@@ -0,0 +1,70 @@
+%D \module
+%D [ file=trac-tex,
+%D version=2009.07.20,
+%D title=\CONTEXT\ Tracking Macros,
+%D subtitle=\TEX,
+%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 Tracking Macros / TeX}
+
+\registerctxluafile{trac-tex}{}
+
+%D All tracing flags at the \TEX\ end will be redone this way so
+%D that we have a similar mechanism for \TEX\ and \LUA. Also, the
+%D currently used if's might become conditionals.
+
+\unprotect
+
+% \def\enabletextracerwhatever {...}
+% \def\disabletextracerwhatever{...}
+
+\mutable\let\alltextracers\empty % so that we can report available tracers
+
+\permanent\protected\def\installtextracer#1%
+ {\addtocommalist{#1}\alltextracers}
+
+\permanent\protected\def\enabletextracers [#1]{\processcommalist[#1]\syst_textracers_enable }
+\permanent\protected\def\disabletextracers[#1]{\processcommalist[#1]\syst_textracers_disable}
+
+\def\syst_textracers_enable #1{\begincsname enabletracer#1\endcsname}
+\def\syst_textracers_disable#1{\begincsname disabletracer#1\endcsname}
+
+%D The next one is for Taco, although we can use directives as well which is the
+%D preferred way!
+
+\permanent\protected\def\nomkivstatistics{\enabledirectives[system.nostatistics]}
+
+%D This is not really a tracker but for decades it lived in my \type {cont-loc}
+%D file. I moved it here because I wanted someone else to use it. This macro is not
+%D really useful for users. I kept the \LUA\ variant in \type {cont-loc.mkiv}.
+
+\installcorenamespace{profilemacrocount}
+\installcorenamespace{profilemacromacro}
+
+\newtoks\t_syst_profile
+
+\appendtoks
+ \the\t_syst_profile
+\to \everystoptext
+
+\permanent\protected\def\profilemacro#1% an oldie, but modernized a bit
+ {\edef\p_name{\csstring#1}%
+ \ifcsname\??profilemacrocount\p_name\endcsname \else
+ \expandafter\newcount\csname\??profilemacrocount\p_name\endcsname
+ \letcsname\??profilemacromacro\p_name\endcsname#1%
+ \xtoksapp\t_syst_profile
+ {\writestatus
+ {profile}%
+ {\string#1: \noexpand\the\csname\??profilemacrocount\p_name\endcsname}}%
+ \enforced\protected\xdef#1%
+ {\global\advance\csname\??profilemacrocount\p_name\endcsname\plusone
+ \expandafter\noexpand\csname\??profilemacromacro\p_name\endcsname}%
+ \fi}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-tim.lmt b/Master/texmf-dist/tex/context/base/mkxl/trac-tim.lmt
new file mode 100644
index 00000000000..fcba7f1325a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-tim.lmt
@@ -0,0 +1,178 @@
+if not modules then modules = { } end modules ['trac-tim'] = {
+ version = 1.001,
+ comment = "companion to m-timing.tex",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format, gsub = string.format, string.gsub
+local concat, sort = table.concat, table.sort
+local next, tonumber = next, tonumber
+
+moduledata = moduledata or { }
+local progress = moduledata.progress or { }
+moduledata.progress = progress
+
+local report_timing = logs.reporter("timing")
+
+if not nodes then nodes = { } end -- when loaded in mtxrun
+
+progress.defaultfilename = ((tex and tex.jobname) or "whatever") .. "-luatex-progress"
+
+-- storage
+
+function progress.store()
+ nodes.snapshots.takesample()
+end
+
+function progress.save(name)
+ local filename = (name or progress.defaultfilename) .. ".lut"
+ report_timing("saving data in %a",filename)
+ table.save(filename,nodes.snapshots.getsamples())
+ nodes.snapshots.resetsamples()
+end
+
+-- conversion
+
+local processed = { }
+
+local function convert(name)
+ name = name ~= "" and name or progress.defaultfilename
+ if not processed[name] then
+ local pages = 0
+ local names = { }
+ local top = { }
+ local bot = { }
+ local siz = { }
+ local paths = { }
+ local data = table.load(name .. ".lut")
+ if data then
+ pages = #data
+ if pages > 1 then
+
+ local factor = 100
+
+ local function path(tag,subtag,tagname)
+ local tagname = tag .. ": " .. subtag
+ local b, t, s = nil, nil, { }
+ for k=1,#data do
+ local v = data[k][tag]
+ v = v and v[subtag]
+ if v then
+ if type(v) == "table" then
+ set[tagname] = tonumber(v.set)
+ v = tonumber(v.top)
+ else
+ v = tonumber(v)
+ end
+ if v then
+ if b then
+ if v > t then t = v end
+ if v < b then b = v end
+ else
+ t = v
+ b = v
+ end
+ else
+ v = 0
+ end
+ else
+ v = 0
+ end
+ s[k] = v
+ end
+ if not b then
+ -- safeguard against updates
+ b = 0
+ t = 0
+ end
+ top[tagname] = gsub(format("%.3f",t),"%.000$","")
+ bot[tagname] = gsub(format("%.3f",b),"%.000$","")
+ local delta = t - b
+ if delta == 0 then
+ delta = 1
+ else
+ delta = factor/delta
+ end
+ for k=1,#s do
+ s[k] = format("(%.3f,%.3f)",k,(s[k]-b)*delta)
+ end
+ paths[tagname] = concat(s,"--")
+ return tagname
+ end
+
+ local function collect(category)
+ if data[1][category] then
+ local keys = { }
+ for k=1,#data do
+ for k, v in next, data[k][category] do
+ keys[k] = true
+ end
+ end
+ for k=1,#data do
+ local m = data[k][category]
+ for k, v in next, keys do
+ if not m[k] then m[k] = 0 end
+ end
+ end
+ for k in next, keys do
+ names[#names+1] = path(category,k)
+ end
+ end
+ end
+
+ collect("nodes")
+ collect("stock")
+ collect("memories")
+ collect("variables")
+ collect("texvariables")
+ collect("luavariables")
+ collect("texcallbacks")
+ collect("mpcallbacks")
+ collect("backendcallbacks")
+
+ pages = pages - 1 -- hm
+ end
+ end
+
+ sort(names)
+
+ processed[name] = {
+ names = names,
+ top = top,
+ bot = bot,
+ set = set,
+ pages = pages,
+ paths = paths,
+ }
+ end
+ return processed[name]
+end
+
+progress.convert = convert
+
+function progress.set(name,tag)
+ return convert(name).set[tag] or 0
+end
+
+function progress.bot(name,tag)
+ return convert(name).bot[tag] or 0
+end
+
+function progress.top(name,tag)
+ return convert(name).top[tag] or 0
+end
+
+function progress.pages(name,tag)
+ return convert(name).pages or 0
+end
+
+function progress.path(name,tag)
+ return convert(name).paths[tag] or "origin"
+end
+
+function progress.names(name)
+ return convert(name).names or { }
+end
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-vis.lmt b/Master/texmf-dist/tex/context/base/mkxl/trac-vis.lmt
new file mode 100644
index 00000000000..44723e38fad
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-vis.lmt
@@ -0,0 +1,1757 @@
+if not modules then modules = { } end modules ['trac-vis'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to trac-vis.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local node, nodes, attributes, tex = node, nodes, attributes, tex
+local type, tonumber, next, rawget = type, tonumber, next, rawget
+local gmatch = string.gmatch
+local formatters = string.formatters
+local round = math.round
+
+-- This module started out in the early days of mkiv and luatex with visualizing
+-- kerns related to fonts. In the process of cleaning up the visual debugger code it
+-- made sense to integrate some other code that I had laying around and replace the
+-- old supp-vis debugging code. As only a subset of the old visual debugger makes
+-- sense it has become a different implementation. Soms of the m-visual
+-- functionality will also be ported. The code is rather trivial. The caching is not
+-- really needed but saves upto 50% of the time needed to add visualization. Of
+-- course the overall runtime is larger because of color and layer processing in the
+-- backend (can be times as much) so the runtime is somewhat larger with full
+-- visualization enabled. In practice this will never happen unless one is demoing.
+
+-- todo: global switch (so no attributes)
+-- todo: maybe also xoffset, yoffset of glyph
+-- todo: inline concat (more efficient)
+-- todo: tags can also be numbers (just add to hash)
+-- todo: make a lmtx variant (a few more efficient fetchers)
+
+local nodecodes = nodes.nodecodes
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local setboth = nuts.setboth
+local setlink = nuts.setlink
+local setlist = nuts.setlist
+local setsubtype = nuts.setsubtype
+local setattr = nuts.setattr
+local setwidth = nuts.setwidth
+local setshift = nuts.setshift
+
+local getid = nuts.getid
+local getfont = nuts.getfont
+local getattr = nuts.getattr
+local getsubtype = nuts.getsubtype
+local getbox = nuts.getbox
+local getlist = nuts.getlist
+local getnext = nuts.getnext
+local getboth = nuts.getboth
+local getwhd = nuts.getwhd
+local getkern = nuts.getkern
+local getwidth = nuts.getwidth
+local getdepth = nuts.getdepth
+local getexpansion = nuts.getexpansion
+local getstate = nuts.getstate
+local getoffsets = nuts.getoffsets
+
+local isglyph = nuts.isglyph
+
+local hpack_nodes = nuts.hpack
+local vpack_nodes = nuts.vpack
+local copy_list = nuts.copy_list
+local copy_node = nuts.copy_node
+local flush_node_list = nuts.flush_list
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local apply_to_nodes = nuts.apply
+
+local hpack_string = nuts.typesetters.tohpack
+
+local texgetattribute = tex.getattribute
+local texsetattribute = tex.setattribute
+
+local setmetatableindex = table.setmetatableindex
+
+local unsetvalue = attributes.unsetvalue
+
+local current_font = font.current
+
+local fonthashes = fonts.hashes
+local chardata = fonthashes.characters
+local exheights = fonthashes.exheights
+local emwidths = fonthashes.emwidths
+local pt_factor = number.dimenfactors.pt
+
+local nodepool = nuts.pool
+local new_rule = nodepool.rule
+local new_kern = nodepool.kern
+local new_glue = nodepool.glue
+local new_hlist = nodepool.hlist
+local new_vlist = nodepool.vlist
+
+local tracers = nodes.tracers
+local visualizers = nodes.visualizers
+
+local setcolor = tracers.colors.set
+local setlistcolor = tracers.colors.setlist
+local settransparency = tracers.transparencies.set
+local setlisttransparency = tracers.transparencies.setlist
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local a_visual = attributes.private("visual")
+local a_layer = attributes.private("viewerlayer")
+
+local band = bit32.band
+local bor = bit32.bor
+
+local enableaction = nodes.tasks.enableaction
+
+-- local trace_hbox
+-- local trace_vbox
+-- local trace_vtop
+-- local trace_kern
+-- local trace_glue
+-- local trace_penalty
+-- local trace_fontkern
+-- local trace_strut
+-- local trace_whatsit
+-- local trace_user
+-- local trace_math
+-- local trace_italic
+-- local trace_discretionary
+-- local trace_expansion
+-- local trace_line
+-- local trace_space
+
+local report_visualize = logs.reporter("visualize")
+
+local modes = {
+ hbox = 0x000001,
+ vbox = 0x000002,
+ vtop = 0x000004,
+ kern = 0x000008,
+ glue = 0x000010,
+ penalty = 0x000020,
+ fontkern = 0x000040,
+ strut = 0x000080,
+ whatsit = 0x000100,
+ glyph = 0x000200,
+ simple = 0x000400,
+ simplehbox = 0x000401,
+ simplevbox = 0x000402,
+ simplevtop = 0x000404,
+ user = 0x000800,
+ math = 0x001000,
+ italic = 0x002000,
+ origin = 0x004000,
+ discretionary = 0x008000,
+ expansion = 0x010000,
+ line = 0x020000,
+ space = 0x040000,
+ depth = 0x080000,
+ marginkern = 0x100000,
+ mathlistkern = 0x200000,
+ dir = 0x400000,
+ par = 0x800000,
+}
+
+local usedfont, exheight, emwidth
+local l_penalty, l_glue, l_kern, l_fontkern, l_hbox, l_vbox, l_vtop, l_strut, l_whatsit, l_glyph, l_user, l_math, l_marginkern, l_mathlistkern, l_italic, l_origin, l_discretionary, l_expansion, l_line, l_space, l_depth,
+ l_dir, l_whatsit
+
+local enabled = false
+local layers = { }
+
+local preset_boxes = modes.hbox + modes.vbox + modes.vtop + modes.origin
+local preset_makeup = preset_boxes
+ + modes.kern + modes.glue + modes.penalty
+local preset_all = preset_makeup
+ + modes.fontkern + modes.marginkern + modes.mathlistkern
+ + modes.whatsit + modes.glyph + modes.user + modes.math
+ + modes.dir + modes.whatsit
+
+function visualizers.setfont(id)
+ usedfont = id or current_font()
+ exheight = exheights[usedfont]
+ emwidth = emwidths[usedfont]
+end
+
+-- we can preset a bunch of bits
+
+local userrule -- bah, not yet defined: todo, delayed(nuts.rules,"userrule")
+local outlinerule -- bah, not yet defined: todo, delayed(nuts.rules,"userrule")
+local emptyrule -- bah, not yet defined: todo, delayed(nuts.rules,"userrule")
+
+local function initialize()
+ --
+ if not usedfont then
+ -- we use a narrow monospaced font -- infofont ?
+ visualizers.setfont(fonts.definers.define { name = "lmmonoltcond10regular", size = tex.sp("4pt") })
+ end
+ --
+ for mode, value in next, modes do
+ local tag = formatters["v_%s"](mode)
+ attributes.viewerlayers.define {
+ tag = tag,
+ title = formatters["visualizer %s"](mode),
+ visible = "start",
+ editable = "yes",
+ printable = "yes"
+ }
+ layers[mode] = attributes.viewerlayers.register(tag,true)
+ end
+ l_hbox = layers.hbox
+ l_vbox = layers.vbox
+ l_vtop = layers.vtop
+ l_glue = layers.glue
+ l_kern = layers.kern
+ l_penalty = layers.penalty
+ l_fontkern = layers.fontkern
+ l_strut = layers.strut
+ l_whatsit = layers.whatsit
+ l_glyph = layers.glyph
+ l_user = layers.user
+ l_math = layers.math
+ l_italic = layers.italic
+ l_marginkern = layers.marginkern
+ l_mathlistkern = layers.mathlistkern
+ l_origin = layers.origin
+ l_discretionary = layers.discretionary
+ l_expansion = layers.expansion
+ l_line = layers.line
+ l_space = layers.space
+ l_depth = layers.depth
+ l_dir = layers.dir
+ l_par = layers.par
+ --
+ if not userrule then
+ userrule = nuts.rules.userrule
+ end
+ --
+ if not outlinerule then
+ outlinerule = nuts.pool.outlinerule
+ end
+ --
+ if not emptyrule then
+ emptyrule = nuts.pool.emptyrule
+ end
+ initialize = false
+end
+
+local function enable()
+ if initialize then
+ initialize()
+ end
+ enableaction("shipouts","nodes.visualizers.handler")
+ report_visualize("enabled")
+ enabled = true
+ tex.setcount("global","c_syst_visualizers_state",1) -- so that we can optimize at the tex end
+end
+
+local function setvisual(n,a,what,list) -- this will become more efficient when we have the bit lib linked in
+ if not n or n == "reset" then
+ return unsetvalue
+ elseif n == true or n == "makeup" then
+ if not a or a == 0 or a == unsetvalue then
+ a = preset_makeup
+ else
+ a = bor(a,preset_makeup)
+ end
+ elseif n == "boxes" then
+ if not a or a == 0 or a == unsetvalue then
+ a = preset_boxes
+ else
+ a = bor(a,preset_boxes)
+ end
+ elseif n == "all" then
+ if what == false then
+ return unsetvalue
+ elseif not a or a == 0 or a == unsetvalue then
+ a = preset_all
+ else
+ a = bor(a,preset_all)
+ end
+ else
+ for s in gmatch(n,"[a-z]+") do
+ local m = modes[s]
+ if not m then
+ -- go on
+ elseif not a or a == 0 or a == unsetvalue then
+ a = m
+ else
+ a = bor(a,m)
+ end
+ end
+ end
+ if not a or a == 0 or a == unsetvalue then
+ return unsetvalue
+ elseif not enabled then -- must happen at runtime (as we don't store layers yet)
+ enable()
+ end
+ return a
+end
+
+function nuts.setvisual(n,mode)
+ setattr(n,a_visual,setvisual(mode,getattr(n,a_visual),true))
+end
+
+function nuts.setvisuals(n,mode) -- currently the same
+ setattr(n,a_visual,setvisual(mode,getattr(n,a_visual),true,true))
+end
+
+-- fast setters
+
+do
+
+ local cached = setmetatableindex(function(t,k)
+ if k == true then
+ return texgetattribute(a_visual)
+ elseif not k then
+ t[k] = unsetvalue
+ return unsetvalue
+ else
+ local v = setvisual(k)
+ t[k] = v
+ return v
+ end
+ end)
+
+ -- local function applyvisuals(n,mode)
+ -- local a = cached[mode]
+ -- apply_to_nodes(n,function(n) setattr(n,a_visual,a) end)
+ -- end
+
+ local a = unsetvalue
+
+ local f = function(n) setattr(n,a_visual,a) end
+
+ local function applyvisuals(n,mode)
+ a = cached[mode]
+ apply_to_nodes(n,f)
+ end
+
+ nuts.applyvisuals = applyvisuals
+
+ function nodes.applyvisuals(n,mode)
+ applyvisuals(tonut(n),mode)
+ end
+
+ function visualizers.attribute(mode)
+ return cached[mode]
+ end
+
+ visualizers.attributes = cached
+
+end
+
+function nuts.copyvisual(n,m)
+ setattr(n,a_visual,getattr(m,a_visual))
+end
+
+function visualizers.setvisual(n)
+ texsetattribute(a_visual,setvisual(n,texgetattribute(a_visual)))
+end
+
+function visualizers.setlayer(n)
+ texsetattribute(a_layer,layers[n] or unsetvalue)
+end
+
+local function set(mode,v)
+ texsetattribute(a_visual,setvisual(mode,texgetattribute(a_visual),v))
+end
+
+for mode, value in next, modes do
+ trackers.register(formatters["visualizers.%s"](mode), function(v) set(mode,v) end)
+end
+
+local fraction = 10
+local normalize = true
+
+trackers .register("visualizers.reset", function(v) set("reset", v) end)
+trackers .register("visualizers.all", function(v) set("all", v) end)
+trackers .register("visualizers.makeup", function(v) set("makeup",v) end)
+trackers .register("visualizers.boxes", function(v) set("boxes", v) end)
+directives.register("visualizers.fraction", function(v) fraction = (v and tonumber(v)) or (v == "more" and 5) or 10 end)
+
+local c_positive = "trace:b"
+local c_negative = "trace:r"
+local c_zero = "trace:g"
+local c_text = "trace:s"
+local c_space = "trace:y"
+local c_space_x = "trace:m"
+local c_skip_a = "trace:c"
+local c_skip_b = "trace:m"
+local c_glyph = "trace:o"
+local c_ligature = "trace:s"
+local c_white = "trace:w"
+----- c_math = "trace:s"
+----- c_origin = "trace:o"
+----- c_discretionary = "trace:d"
+----- c_expansion = "trace:o"
+local c_depth = "trace:o"
+local c_indent = "trace:s"
+
+local c_positive_d = "trace:db"
+local c_negative_d = "trace:dr"
+local c_zero_d = "trace:dg"
+local c_text_d = "trace:ds"
+local c_space_d = "trace:dy"
+local c_space_x_d = "trace:dm"
+local c_skip_a_d = "trace:dc"
+local c_skip_b_d = "trace:dm"
+local c_glyph_d = "trace:do"
+local c_ligature_d = "trace:ds"
+local c_white_d = "trace:dw"
+local c_math_d = "trace:dr"
+local c_origin_d = "trace:do"
+local c_discretionary_d = "trace:dd"
+----- c_expansion_d = "trace:do"
+----- c_depth_d = "trace:do"
+----- c_indent_d = "trace:ds"
+
+-- we can just paste verbatim together .. no typesetting needed
+
+local function sometext(str,layer,color,textcolor,lap,variant)
+ local text = hpack_string(str,usedfont)
+ local size = getwidth(text)
+ local rule = new_rule(size,2*exheight,exheight/2)
+ local kern = new_kern(-size)
+ if color then
+ setcolor(rule,color)
+ end
+ if textcolor then
+ setlistcolor(getlist(text),textcolor)
+ end
+ local info = setlink(rule,kern,text)
+ setlisttransparency(info,c_zero)
+ info = hpack_nodes(info)
+ local width = getwidth(info)
+ if variant then
+ nuts.setoffsets(info,0,variant*exheight)
+ end
+ if lap then
+ info = new_hlist(setlink(new_kern(-width),info))
+ else
+ info = new_hlist(info) -- a bit overkill: double wrapped
+ end
+ if layer then
+ setattr(info,a_layer,layer)
+ end
+ return info, width
+end
+
+local function someblob(str,layer,color,textcolor,width)
+ local text = hpack_string(str,usedfont)
+ local size = getwidth(text)
+ local rule = new_rule(width,2*exheight,exheight/2)
+ local kern = new_kern(-width + (width-size)/2)
+ if color then
+ setcolor(rule,color)
+ end
+ if textcolor then
+ setlistcolor(getlist(text),textcolor)
+ end
+ local info = setlink(rule,kern,text)
+ setlisttransparency(info,c_zero)
+ info = hpack_nodes(info)
+ local width = getwidth(info)
+ info = new_hlist(info)
+ if layer then
+ setattr(info,a_layer,layer)
+ end
+ return info, width
+end
+
+local caches = setmetatableindex("table")
+
+local fontkern, italickern, marginkern, mathlistkern do
+
+ local f_cache = caches["fontkern"]
+ local i_cache = caches["italickern"]
+ local m_cache = caches["marginkern"]
+ local l_cache = caches["mathlistkern"]
+
+ local function somekern(head,current,cache,color,layer)
+ local width = getkern(current)
+ local extra = getexpansion(current)
+ local kern = width + extra
+ local info = cache[kern]
+ if not info then
+ local text = hpack_string(formatters[" %0.3f"](kern*pt_factor),usedfont)
+ local rule = new_rule(emwidth/fraction,6*exheight,2*exheight)
+ local list = getlist(text)
+ if kern > 0 then
+ setlistcolor(list,c_positive_d)
+ elseif kern < 0 then
+ setlistcolor(list,c_negative_d)
+ else
+ setlistcolor(list,c_zero_d)
+ end
+ setlisttransparency(list,color)
+ setcolor(rule,color)
+ settransparency(rule,color)
+ setshift(text,-5 * exheight)
+ info = new_hlist(setlink(rule,text))
+ setattr(info,a_layer,layer)
+ f_cache[kern] = info
+ end
+ head = insert_node_before(head,current,copy_list(info))
+ return head, current
+ end
+
+ fontkern = function(head,current)
+ return somekern(head,current,f_cache,c_text_d,l_fontkern)
+ end
+
+ italickern = function(head,current)
+ return somekern(head,current,i_cache,c_glyph_d,l_italic)
+ end
+
+ marginkern = function(head,current)
+ return somekern(head,current,m_cache,c_glyph_d,l_marginkern)
+ end
+
+ mathlistkern = function(head,current)
+ return somekern(head,current,l_cache,c_glyph_d,l_mathlistkern)
+ end
+
+end
+
+local glyphexpansion do
+
+ local f_cache = caches["glyphexpansion"]
+
+ glyphexpansion = function(head,current)
+ local extra = getexpansion(current)
+ if extra and extra ~= 0 then
+ extra = extra / 1000
+ local info = f_cache[extra]
+ if not info then
+ local text = hpack_string(round(extra),usedfont)
+ local rule = new_rule(emwidth/fraction,exheight,2*exheight)
+ local list = getlist(text)
+ if extra > 0 then
+ setlistcolor(list,c_positive_d)
+ elseif extra < 0 then
+ setlistcolor(list,c_negative_d)
+ end
+ setlisttransparency(list,c_text_d)
+ setcolor(rule,c_text_d)
+ settransparency(rule,c_text_d)
+ setshift(text,1.5 * exheight)
+ info = new_hlist(setlink(rule,text))
+ setattr(info,a_layer,l_expansion)
+ f_cache[extra] = info
+ end
+ head = insert_node_before(head,current,copy_list(info))
+ return head, current
+ end
+ return head, current
+ end
+
+end
+
+local kernexpansion do
+
+ local f_cache = caches["kernexpansion"]
+
+ -- in mkiv we actually need to reconstruct but let's not do that now
+
+ kernexpansion = function(head,current)
+ local extra = getexpansion(current)
+ if extra ~= 0 then
+ extra = extra / 1000
+ local info = f_cache[extra]
+ if not info then
+ local text = hpack_string(round(extra),usedfont)
+ local rule = new_rule(emwidth/fraction,exheight,4*exheight)
+ local list = getlist(text)
+ if extra > 0 then
+ setlistcolor(list,c_positive_d)
+ elseif extra < 0 then
+ setlistcolor(list,c_negative_d)
+ end
+ setlisttransparency(list,c_text_d)
+ setcolor(rule,c_text_d)
+ settransparency(rule,c_text_d)
+ setshift(text,3.5 * exheight)
+ info = new_hlist(setlink(rule,text))
+ setattr(info,a_layer,l_expansion)
+ f_cache[extra] = info
+ end
+ head = insert_node_before(head,current,copy_list(info))
+ return head, current
+ end
+ return head, current
+ end
+
+end
+
+local whatsit do
+
+ local whatsitcodes = nodes.whatsitcodes
+ local w_cache = caches["whatsit"]
+
+ local tags = {
+ [whatsitcodes.open] = "OPN",
+ [whatsitcodes.write] = "WRI",
+ [whatsitcodes.close] = "CLS",
+ -- [whatsitcodes.special] = "SPE",
+ [whatsitcodes.latelua] = "LUA",
+ [whatsitcodes.savepos] = "POS",
+ [whatsitcodes.userdefined] = "USR",
+ [whatsitcodes.literal] = "LIT",
+ [whatsitcodes.setmatrix] = "MAT",
+ [whatsitcodes.save] = "SAV",
+ [whatsitcodes.restore] = "RES",
+ [whatsitcodes.startscaling] = "+SCA",
+ [whatsitcodes.stopscaling] = "-SCA",
+ [whatsitcodes.startrotation] = "+ROT",
+ [whatsitcodes.stoprotation] = "-ROT",
+ [whatsitcodes.startmirroring] = "+MIR",
+ [whatsitcodes.stopmirroring] = "-MIR",
+ [whatsitcodes.startclipping] = "+CLP",
+ [whatsitcodes.stopclipping] = "-CLP",
+ [whatsitcodes.startmatrix] = "+MAT",
+ [whatsitcodes.stopmatrix] = "-MAT",
+ [whatsitcodes.setstate] = "SET", -- can't happen because these are added after visualizing
+ }
+
+ whatsit = function(head,current)
+ local what = getsubtype(current)
+ local info = w_cache[what]
+ if info then
+ -- print("hit whatsit")
+ else
+ info = sometext(formatters["W:%s"](tags[what] or what),usedfont,nil,c_white)
+ setattr(info,a_layer,l_whatsit)
+ w_cache[what] = info
+ end
+ head, current = insert_node_after(head,current,copy_list(info))
+ return head, current
+ end
+
+end
+
+local dir, par do
+
+ local dircodes = nodes.dircodes
+ local dirvalues = nodes.dirvalues
+
+ local cancel_code = dircodes.cancel
+ local l2r_code = dirvalues.l2r
+ local r2l_code = dirvalues.r2l
+
+ local d_cache = caches["dir"]
+
+ local getdirection = nuts.getdirection
+
+ local tags = {
+ l2r = "L2R",
+ r2l = "R2L",
+ cancel = "CAN",
+ par = "PAR",
+ }
+
+ par = function(head,current)
+ local what = "par" -- getsubtype(current)
+ local info = d_cache[what]
+ if info then
+ -- print("hit par")
+ else
+ info = sometext(formatters["L:%s"](what),usedfont,nil,c_white)
+ setattr(info,a_layer,l_dir)
+ d_cache[what] = info
+ end
+ return head, current
+ end
+
+ dir = function(head,current)
+ local what = getsubtype(current)
+ if what == cancelcode then
+ what = "cancel"
+ elseif getdirection(current) == r2l_code then
+ what = "r2l"
+ else
+ what = "l2r"
+ end
+ local info = d_cache[what]
+ if info then
+ -- print("hit dir")
+ else
+ info = sometext(formatters["D:%s"](what),usedfont,nil,c_white)
+ setattr(info,a_layer,l_dir)
+ d_cache[what] = info
+ end
+ return head, current
+ end
+
+end
+
+local user do
+
+ local u_cache = caches["user"]
+
+ user = function(head,current)
+ local what = getsubtype(current)
+ local info = u_cache[what]
+ if info then
+ -- print("hit user")
+ else
+ info = sometext(formatters["U:%s"](what),usedfont)
+ setattr(info,a_layer,l_user)
+ u_cache[what] = info
+ end
+ head, current = insert_node_after(head,current,copy_list(info))
+ return head, current
+ end
+
+end
+
+local math do
+
+ local mathcodes = nodes.mathcodes
+ local m_cache = {
+ beginmath = caches["bmath"],
+ endmath = caches["emath"],
+ }
+ local tags = {
+ beginmath = "B",
+ endmath = "E",
+ }
+
+ math = function(head,current)
+ local what = getsubtype(current)
+ local tag = mathcodes[what]
+ local skip = getkern(current) + getwidth(current) -- surround
+ local info = m_cache[tag][skip]
+ if info then
+ -- print("hit math")
+ else
+ local text, width = sometext(formatters["M:%s"](tag and tags[tag] or what),usedfont,nil,c_math_d)
+ local rule = new_rule(skip,-655360/fraction,2*655360/fraction)
+ setcolor(rule,c_math_d)
+ settransparency(rule,c_math_d)
+ setattr(rule,a_layer,l_math)
+ if tag == "beginmath" then
+ info = new_hlist(setlink(new_glue(-skip),rule,new_glue(-width),text))
+ else
+ info = new_hlist(setlink(new_glue(-skip),rule,new_glue(-skip),text))
+ end
+ setattr(info,a_layer,l_math)
+ m_cache[tag][skip] = info
+ end
+ head, current = insert_node_after(head,current,copy_list(info))
+ return head, current
+ end
+
+end
+
+local ruleddepth do
+
+ ruleddepth = function(current,wd,ht,dp)
+ local wd, ht, dp = getwhd(current)
+ if dp ~= 0 then
+ local rule = new_rule(wd,0,dp)
+ setcolor(rule,c_depth)
+ settransparency(rule,c_zero)
+ setattr(rule,a_layer,l_depth)
+ setlist(current,setlink(rule,new_kern(-wd),getlist(current)))
+ end
+ end
+
+end
+
+local ruledbox do
+
+ local b_cache = caches["box"]
+ local o_cache = caches["origin"]
+
+ local getshift = nuts.getshift
+
+ setmetatableindex(o_cache,function(t,size)
+ local rule = new_rule(2*size,size,size)
+ local origin = hpack_nodes(rule)
+ setcolor(rule,c_origin_d)
+ settransparency(rule,c_origin_d)
+ setattr(rule,a_layer,l_origin)
+ t[size] = origin
+ return origin
+ end)
+
+ ruledbox = function(head,current,vertical,layer,what,simple,previous,trace_origin,parent)
+ local wd, ht, dp = getwhd(current)
+ local force_origin = wd == 0 or (dp + ht) == 0
+ local shift = getshift(current)
+ local next = getnext(current)
+ local prev = previous
+ setboth(current)
+ local linewidth = emwidth/fraction
+ local size = 2*linewidth
+ local this
+ if not simple then
+ this = b_cache[what]
+ if not this then
+ local text = hpack_string(what,usedfont)
+ this = setlink(new_kern(-getwidth(text)),text)
+ setlisttransparency(this,c_text)
+ this = new_hlist(this)
+ b_cache[what] = this
+ end
+ end
+ -- we need to trigger the right mode (else sometimes no whatits)
+ local info = setlink(
+ this and copy_list(this) or nil,
+ (force_origin and emptyrule(wd,ht,dp)) -- we accept some overhead
+ or (dp == 0 and outlinerule and outlinerule(wd,ht,dp,linewidth))
+ or userrule {
+ width = wd,
+ height = ht,
+ depth = dp,
+ line = linewidth,
+ type = "box",
+ dashed = 3*size,
+ }
+ )
+ --
+ setlisttransparency(info,c_text)
+ info = new_hlist(info) -- important
+ --
+ setattr(info,a_layer,layer)
+ if vertical then
+ if not force_origin and shift == 0 then
+ info = setlink(current,dp ~= 0 and new_kern(-dp) or nil,info)
+ elseif trace_origin or force_origin then
+ local size = 2*size
+ local origin = o_cache[size]
+ origin = copy_list(origin)
+ if getid(parent) == vlist_code then
+ setshift(origin,-shift)
+ info = setlink(current,new_kern(-size),origin,new_kern(-size-dp),info)
+ else
+ -- todo .. i need an example
+ info = setlink(current,dp ~= 0 and new_kern(-dp) or nil,info)
+ end
+ setshift(current,0)
+ else
+ info = setlink(current,new_dp ~= 0 and new_kern(-dp) or nil,info)
+ setshift(current,0)
+ end
+ info = new_vlist(info,wd,ht,dp,shift)
+ else
+ if not force_origin and shift == 0 then
+ info = setlink(current,new_kern(-wd),info)
+ elseif trace_origin or force_origin then
+ local size = 2*size
+ local origin = o_cache[size]
+ origin = copy_list(origin)
+ if getid(parent) == vlist_code then
+ info = setlink(current,new_kern(-wd-size-shift),origin,new_kern(-size+shift),info)
+ else
+ setshift(origin,-shift)
+ info = setlink(current,new_kern(-wd-size),origin,new_kern(-size),info)
+ end
+ setshift(current,0)
+ else
+ info = setlink(current,new_kern(-wd),info)
+ setshift(current,0)
+ end
+ info = new_hlist(info,wd,ht,dp,shift)
+ end
+ if next then
+ setlink(info,next)
+ end
+ if prev and prev > 0 then
+ setlink(prev,info)
+ end
+ if head == current then
+ return info, info
+ else
+ return head, info
+ end
+ -- else
+ -- return head, current
+ -- end
+ end
+
+end
+
+local ruledglyph do
+
+ -- see boundingbox feature .. maybe a pdf stream is more efficient, after all we
+ -- have a frozen color anyway or i need a more detailed cache .. below is a more
+ -- texie approach
+
+ ruledglyph = function(head,current,previous) -- wrong for vertical glyphs
+ local wd = getwidth(current)
+ if wd ~= 0 then
+ local wd, ht, dp = getwhd(current)
+ local next = getnext(current)
+ local prev = previous
+ setboth(current)
+ local linewidth = emwidth/(2*fraction)
+ local x_offset, y_offset, l_margin, r_margin, raise = getoffsets(current)
+ local info = setlink((dp == 0 and outlinerule and outlinerule(wd,ht,dp,linewidth)) or userrule {
+ width = wd,
+ height = ht,
+ depth = dp,
+ line = linewidth,
+ type = "box",
+ },new_kern(-wd))
+ local c, f = isglyph(current)
+ local char = chardata[f][c]
+ if char and type(char.unicode) == "table" then -- hackery test
+ setlistcolor(info,c_ligature)
+ setlisttransparency(info,c_ligature_d)
+ else
+ setlistcolor(info,c_glyph)
+ setlisttransparency(info,c_glyph_d)
+ end
+ info = new_hlist(info)
+ setattr(info,a_layer,l_glyph)
+ local info = setlink(current,new_kern(-wd),info)
+ info = hpack_nodes(info)
+ setwidth(info,wd)
+ if next then
+ setlink(info,next)
+ end
+ if prev then
+ setlink(prev,info)
+ end
+ if head == current then
+ return info, info
+ else
+ return head, info
+ end
+ else
+ return head, current
+ end
+ end
+
+ function visualizers.setruledglyph(f)
+ ruledglyph = f or ruledglyph
+ end
+
+end
+
+local ruledglue do
+
+ local effectiveglue = nuts.effective_glue
+
+ local gluecodes = nodes.gluecodes
+
+ local userskip_code = gluecodes.userskip
+ local spaceskip_code = gluecodes.spaceskip
+ local xspaceskip_code = gluecodes.xspaceskip
+ local zerospaceskip_code = gluecodes.zerospaceskip or gluecodes.userskip
+ -- local keepskip_code = gluecodes.keepskip or gluecodes.userskip
+ local leftskip_code = gluecodes.leftskip
+ local rightskip_code = gluecodes.rightskip
+ local lefthangskip_code = gluecodes.lefthangskip
+ local righthangskip_code = gluecodes.righthangskip
+ local parfillleftskip_code = gluecodes.parfillleftskip or parfillskip_code
+ local parfillrightskip_code = gluecodes.parfillrightskip or parfillskip_code
+ local indentskip_code = gluecodes.indentskip
+ local correctionskip_code = gluecodes.correctionskip
+
+ local g_cache_v = caches["vglue"]
+ local g_cache_h = caches["hglue"]
+ local g_cache_ls = caches["leftskip"]
+ local g_cache_rs = caches["rightskip"]
+ local g_cache_lh = caches["lefthang"]
+ local g_cache_rh = caches["righthang"]
+ local g_cache_lp = caches["parfillleftskip"]
+ local g_cache_rp = caches["parfillrightskip"]
+ local g_cache_is = caches["indentskip"]
+ local g_cache_cs = caches["correctionskip"]
+
+ local tags = {
+ -- [userskip_code] = "US",
+ [gluecodes.lineskip] = "LI",
+ [gluecodes.baselineskip] = "BS",
+ [gluecodes.parskip] = "PS",
+ [gluecodes.abovedisplayskip] = "DA",
+ [gluecodes.belowdisplayskip] = "DB",
+ [gluecodes.abovedisplayshortskip] = "SA",
+ [gluecodes.belowdisplayshortskip] = "SB",
+ [gluecodes.topskip] = "TS",
+ [gluecodes.splittopskip] = "ST",
+ [gluecodes.tabskip] = "AS",
+ [gluecodes.thinmuskip] = "MS",
+ [gluecodes.medmuskip] = "MM",
+ [gluecodes.thickmuskip] = "ML",
+ [gluecodes.intermathskip] = "IM",
+ [gluecodes.keepskip or 99] = "KS",
+ [gluecodes.mathskip] = "MT",
+ [gluecodes.leaders] = "NL",
+ [gluecodes.cleaders] = "CL",
+ [gluecodes.xleaders] = "XL",
+ [gluecodes.gleaders] = "GL",
+ -- true = "VS",
+ -- false = "HS",
+ [leftskip_code] = "LS",
+ [rightskip_code] = "RS",
+ [lefthangskip_code] = "LH",
+ [righthangskip_code] = "RH",
+ [spaceskip_code] = "SP",
+ [xspaceskip_code] = "XS",
+ [zerospaceskip_code] = "ZS",
+ [parfillleftskip_code] = "PL",
+ [parfillrightskip_code] = "PR",
+ [indentskip_code] = "IN",
+ [correctionskip_code] = "CS",
+ }
+
+ local stags = {
+ [lefthangskip_code] = 0.5,
+ [righthangskip_code] = 0.5,
+ [leftskip_code] = -2,
+ [rightskip_code] = -2,
+ [parfillleftskip_code] = -0.75,
+ [parfillrightskip_code] = -0.75,
+ }
+
+ -- we sometimes pass previous as we can have issues in math (not watertight for all)
+
+ ruledglue = function(head,current,vertical,parent)
+ local subtype = getsubtype(current)
+ local width = effectiveglue(current,parent)
+ local stag = normalize and stags[subtype]
+ local amount = formatters["%s:%0.3f"](tags[subtype] or (vertical and "VS") or "HS",width*pt_factor)
+ local info = (vertical and g_cache_v or g_cache_h)[amount]
+ if info then
+ -- print("glue hit")
+ else
+ if subtype == spaceskip_code or subtype == xspaceskip_code or subtype == zerospaceskip_code then
+ info = sometext(amount,l_glue,c_space)
+ elseif subtype == userskip_code then
+ if width > 0 then
+ info = sometext(amount,l_glue,c_positive)
+ elseif width < 0 then
+ info = sometext(amount,l_glue,c_negative)
+ else
+ info = sometext(amount,l_glue,c_zero)
+ end
+ elseif subtype == indentskip_code or subtype == correctionskip_code then
+ info = sometext(amount,l_glue,c_indent)
+ elseif subtype == leftskip_code then
+ info = sometext(amount,l_glue,normalize and c_space or c_skip_a,false,true,stag)
+ elseif subtype == rightskip_code then
+ info = sometext(amount,l_glue,normalize and c_space or c_skip_a,false,false,stag)
+ elseif subtype == lefthangskip_code then
+ info = sometext(amount,l_glue,normalize and c_space or c_skip_b,false,true,stag)
+ elseif subtype == righthangskip_code then
+ info = sometext(amount,l_glue,normalize and c_space or c_skip_b,false,false,stag)
+ elseif subtype == parfillleftskip_code then
+ info = sometext(amount,l_glue,c_indent,false,true,stag)
+ elseif subtype == parfillrightskip_code then
+ info = sometext(amount,l_glue,c_indent,false,false,stag)
+ else
+ info = sometext(amount,l_glue,c_skip_b)
+ end
+ (vertical and g_cache_v or g_cache_h)[amount] = info
+ end
+ ::PICKIP::
+ info = copy_list(info)
+ if vertical then
+ info = vpack_nodes(info)
+ end
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ end
+
+ -- ruledspace = function(head,current,parent)
+ -- local subtype = getsubtype(current)
+ -- if subtype == spaceskip_code or subtype == xspaceskip_code or subtype == zerospaceskip_code then
+ -- local width = effectiveglue(current,parent)
+ -- local amount = formatters["%s:%0.3f"](tags[subtype] or "HS",width*pt_factor)
+ -- local info = g_cache_h[amount]
+ -- if info then
+ -- -- print("space hit")
+ -- else
+ -- info = sometext(amount,l_glue,c_space)
+ -- g_cache_h[amount] = info
+ -- end
+ -- info = copy_list(info)
+ -- head, current = insert_node_before(head,current,info)
+ -- return head, getnext(current)
+ -- else
+ -- return head, current
+ -- end
+ -- end
+
+ local g_cache_s = caches["space"]
+ local g_cache_x = caches["xspace"]
+
+ ruledspace = function(head,current,parent)
+ local subtype = getsubtype(current)
+ if subtype == spaceskip_code or subtype == xspaceskip_code or subtype == zerospaceskip_code then -- not yet all space
+ local width = effectiveglue(current,parent)
+ local info
+ if subtype == spaceskip_code then
+ info = g_cache_s[width]
+ if not info then
+ info = someblob("SP",l_glue,c_space,nil,width)
+ g_cache_s[width] = info
+ end
+ else
+ info = g_cache_x[width]
+ if not info then
+ info = someblob("XS",l_glue,c_space_x,nil,width)
+ g_cache_x[width] = info
+ end
+ end
+ info = copy_list(info)
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ else
+ return head, current
+ end
+ end
+
+end
+
+local ruledkern do
+
+ local k_cache_v = caches["vkern"]
+ local k_cache_h = caches["hkern"]
+
+ ruledkern = function(head,current,vertical,mk)
+ local kern = getkern(current)
+ local cache = vertical and k_cache_v or k_cache_h
+ local info = cache[kern]
+ if not info then
+ local amount = formatters["%s:%0.3f"](vertical and "VK" or (mk and "MK") or "HK",kern*pt_factor)
+ if kern > 0 then
+ info = sometext(amount,l_kern,c_positive)
+ elseif kern < 0 then
+ info = sometext(amount,l_kern,c_negative)
+ else
+ info = sometext(amount,l_kern,c_zero)
+ end
+ cache[kern] = info
+ end
+ info = copy_list(info)
+ if vertical then
+ info = vpack_nodes(info)
+ end
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ end
+
+end
+
+local ruleditalic do
+
+ local i_cache = caches["italic"]
+
+ ruleditalic = function(head,current)
+ local kern = getkern(current)
+ local info = i_cache[kern]
+ if not info then
+ local amount = formatters["%s:%0.3f"]("IC",kern*pt_factor)
+ if kern > 0 then
+ info = sometext(amount,l_kern,c_positive)
+ elseif kern < 0 then
+ info = sometext(amount,l_kern,c_negative)
+ else
+ info = sometext(amount,l_kern,c_zero)
+ end
+ i_cache[kern] = info
+ end
+ info = copy_list(info)
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ end
+
+end
+
+local ruledmarginkern do
+
+ local m_cache = caches["marginkern"]
+
+ ruledmarginkern = function(head,current)
+ local kern = getkern(current)
+ local info = m_cache[kern]
+ if not info then
+ local amount = formatters["%s:%0.3f"]("MK",kern*pt_factor)
+ if kern > 0 then
+ info = sometext(amount,l_marginkern,c_positive)
+ elseif kern < 0 then
+ info = sometext(amount,l_marginkern,c_negative)
+ else
+ info = sometext(amount,l_marginkern,c_zero)
+ end
+ m_cache[kern] = info
+ end
+ info = copy_list(info)
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ end
+
+end
+
+local ruledmathlistkern do
+
+ local l_cache = caches["mathlistkern"]
+
+ ruledmathlistkern = function(head,current)
+ local kern = getkern(current)
+ local info = l_cache[kern]
+ if not info then
+ local amount = formatters["%s:%0.3f"]("LK",kern*pt_factor)
+ if kern > 0 then
+ info = sometext(amount,l_mathlistkern,c_positive)
+ elseif kern < 0 then
+ info = sometext(amount,l_mathlistkern,c_negative)
+ else
+ info = sometext(amount,l_mathlistkern,c_zero)
+ end
+ l_cache[kern] = info
+ end
+ info = copy_list(info)
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ end
+
+end
+
+local ruleddiscretionary do
+
+ local d_cache = caches["discretionary"]
+
+ ruleddiscretionary = function(head,current)
+ local d = d_cache[true]
+ if not the_discretionary then
+ local rule = new_rule(4*emwidth/fraction,4*exheight,exheight)
+ local kern = new_kern(-2*emwidth/fraction)
+ setlink(kern,rule)
+ setcolor(rule,c_discretionary_d)
+ settransparency(rule,c_discretionary_d)
+ setattr(rule,a_layer,l_discretionary)
+ d = new_hlist(kern)
+ d_cache[true] = d
+ end
+ insert_node_after(head,current,copy_list(d))
+ return head, current
+ end
+
+end
+
+local ruledpenalty do
+
+ local p_cache_v = caches["vpenalty"]
+ local p_cache_h = caches["hpenalty"]
+
+ local raisepenalties = false
+
+ local getpenalty = nuts.getpenalty
+
+ directives.register("visualizers.raisepenalties",function(v) raisepenalties = v end)
+
+ ruledpenalty = function(head,current,vertical)
+ local penalty = getpenalty(current)
+ local info = (vertical and p_cache_v or p_cache_h)[penalty]
+ if info then
+ -- print("penalty hit")
+ else
+ local amount = formatters["%s:%s"](vertical and "VP" or "HP",penalty)
+ if penalty > 0 then
+ info = sometext(amount,l_penalty,c_positive)
+ elseif penalty < 0 then
+ info = sometext(amount,l_penalty,c_negative)
+ else
+ info = sometext(amount,l_penalty,c_zero)
+ end
+ (vertical and p_cache_v or p_cache_h)[penalty] = info
+ end
+ info = copy_list(info)
+ if vertical then
+ info = vpack_nodes(info)
+ elseif raisepenalties then
+ setshift(info,-65536*4)
+ end
+ head, current = insert_node_before(head,current,info)
+ return head, getnext(current)
+ end
+
+end
+
+do
+
+ local disc_code = nodecodes.disc
+ local kern_code = nodecodes.kern
+ local glyph_code = nodecodes.glyph
+ local glue_code = nodecodes.glue
+ local penalty_code = nodecodes.penalty
+ local whatsit_code = nodecodes.whatsit
+ local user_code = nodecodes.user
+ local math_code = nodecodes.math
+ local hlist_code = nodecodes.hlist
+ local vlist_code = nodecodes.vlist
+ local marginkern_code = nodecodes.marginkern
+ local mathlistkern_code = nodecodes.mathlistkern
+ local dir_code = nodecodes.dir
+ local par_code = nodecodes.par
+
+ local kerncodes = nodes.kerncodes
+ local fontkern_code = kerncodes.fontkern
+ local italickern_code = kerncodes.italiccorrection
+ local leftmarginkern_code = kerncodes.leftmarginkern
+ local rightmarginkern_code = kerncodes.rightmarginkern
+ local mathlistkern_code = kerncodes.mathlistkern
+ ----- userkern_code = kerncodes.userkern
+
+ local listcodes = nodes.listcodes
+ local linelist_code = listcodes.line
+
+ local vtop_package_state = 3 -- todo: symbolic
+
+ local getleader = nuts.getleader
+ local getdisc = nuts.getdisc
+
+ local setleader = nuts.setleader
+ local setdisc = nuts.setdisc
+
+ local cache
+
+ local function visualize(head,vertical,forced,parent)
+ local trace_hbox = false
+ local trace_vbox = false
+ local trace_vtop = false
+ local trace_kern = false
+ local trace_glue = false
+ local trace_penalty = false
+ local trace_fontkern = false
+ local trace_strut = false
+ local trace_whatsit = false
+ local trace_glyph = false
+ local trace_simple = false
+ local trace_user = false
+ local trace_math = false
+ local trace_italic = false
+ local trace_origin = false
+ local trace_discretionary = false
+ local trace_expansion = false
+ local trace_line = false
+ local trace_space = false
+ local trace_depth = false
+ local trace_dir = false
+ local trace_par = false
+ local current = head
+ local previous = nil
+ local attr = unsetvalue
+ local prev_trace_fontkern = nil
+ local prev_trace_italic = nil
+ local prev_trace_marginkern = nil
+-- local prev_trace_mathlist = nil
+ local prev_trace_expansion = nil
+
+ while current do
+ local id = getid(current)
+ local a = forced or getattr(current,a_visual) or unsetvalue
+ local subtype
+ if a ~= attr then
+ prev_trace_fontkern = trace_fontkern
+ prev_trace_italic = trace_italic
+ prev_trace_marginkern = trace_marginkern
+-- prev_trace_mathlistkern = trace_mathlistkern
+ prev_trace_expansion = trace_expansion
+ attr = a
+ if a == unsetvalue then
+ trace_hbox = false
+ trace_vbox = false
+ trace_vtop = false
+ trace_kern = false
+ trace_glue = false
+ trace_penalty = false
+ trace_fontkern = false
+ trace_strut = false
+ trace_whatsit = false
+ trace_glyph = false
+ trace_simple = false
+ trace_user = false
+ trace_math = false
+ trace_italic = false
+ trace_origin = false
+ trace_discretionary = false
+ trace_expansion = false
+ trace_line = false
+ trace_space = false
+ trace_depth = false
+ trace_marginkern = false
+ trace_mathlistkern = false
+ trace_dir = false
+ trace_par = false
+ if id == kern_code then
+ goto kern
+ else
+ goto list
+ end
+ else -- dead slow:
+ -- cache[a]()
+ trace_hbox = band(a,0x000001) ~= 0
+ trace_vbox = band(a,0x000002) ~= 0
+ trace_vtop = band(a,0x000004) ~= 0
+ trace_kern = band(a,0x000008) ~= 0
+ trace_glue = band(a,0x000010) ~= 0
+ trace_penalty = band(a,0x000020) ~= 0
+ trace_fontkern = band(a,0x000040) ~= 0
+ trace_strut = band(a,0x000080) ~= 0
+ trace_whatsit = band(a,0x000100) ~= 0
+ trace_glyph = band(a,0x000200) ~= 0
+ trace_simple = band(a,0x000400) ~= 0
+ trace_user = band(a,0x000800) ~= 0
+ trace_math = band(a,0x001000) ~= 0
+ trace_italic = band(a,0x002000) ~= 0
+ trace_origin = band(a,0x004000) ~= 0
+ trace_discretionary = band(a,0x008000) ~= 0
+ trace_expansion = band(a,0x010000) ~= 0
+ trace_line = band(a,0x020000) ~= 0
+ trace_space = band(a,0x040000) ~= 0
+ trace_depth = band(a,0x080000) ~= 0
+ trace_marginkern = band(a,0x100000) ~= 0
+ trace_mathlistkern = band(a,0x200000) ~= 0
+ trace_dir = band(a,0x400000) ~= 0
+ trace_par = band(a,0x800000) ~= 0
+ end
+ elseif a == unsetvalue then
+ goto list
+ end
+ if trace_strut then
+ setattr(current,a_layer,l_strut)
+ elseif id == glyph_code then
+ if trace_glyph then
+ head, current = ruledglyph(head,current,previous)
+ end
+ if trace_expansion then
+ head, current = glyphexpansion(head,current)
+ end
+ elseif id == disc_code then
+ if trace_discretionary then
+ head, current = ruleddiscretionary(head,current)
+ end
+ local pre, post, replace = getdisc(current)
+ if pre then
+ pre = visualize(pre,false,a,parent)
+ end
+ if post then
+ post = visualize(post,false,a,parent)
+ end
+ if replace then
+ replace = visualize(replace,false,a,parent)
+ end
+ setdisc(current,pre,post,replace)
+ elseif id == kern_code then
+ goto kern
+ elseif id == glue_code then
+ local content = getleader(current)
+ if content then
+ setleader(current,visualize(content,false,nil,parent))
+ elseif trace_glue then
+ head, current = ruledglue(head,current,vertical,parent)
+ elseif trace_space then
+ head, current = ruledspace(head,current,parent)
+ end
+ elseif id == penalty_code then
+ if trace_penalty then
+ head, current = ruledpenalty(head,current,vertical)
+ end
+ elseif id == hlist_code or id == vlist_code then
+ goto list
+ elseif id == whatsit_code then
+ if trace_whatsit then
+ head, current = whatsit(head,current)
+ end
+ elseif id == user_code then
+ if trace_user then
+ head, current = user(head,current)
+ end
+ elseif id == math_code then
+ if trace_math then
+ head, current = math(head,current)
+ end
+ elseif id == marginkern_code then
+ if trace_kern then
+ head, current = ruledkern(head,current,vertical,true)
+ end
+ elseif id == dir_code then
+ if trace_dir then
+ head, current = dir(head,current)
+ end
+ elseif id == par_code then
+ if trace_par then
+ head, current = par(head,current)
+ end
+ end
+ goto next
+ ::kern::
+ subtype = getsubtype(current)
+ if subtype == fontkern_code then
+ if trace_fontkern or prev_trace_fontkern then
+ head, current = fontkern(head,current)
+ end
+ if trace_expansion or prev_trace_expansion then
+ head, current = kernexpansion(head,current)
+ end
+ elseif subtype == italickern_code then
+ if trace_italic or prev_trace_italic then
+ head, current = italickern(head,current)
+ elseif trace_kern then
+ head, current = ruleditalic(head,current)
+ end
+ elseif subtype == leftmarginkern_code or subtype == rightmarginkern_code then
+ if trace_marginkern or prev_trace_marginkern then
+ head, current = marginkern(head,current)
+ elseif trace_kern then
+ head, current = ruledmarginkern(head,current)
+ end
+ elseif subtype == mathlistkern_code then
+ if trace_mathlist then -- or prev_trace_mathlist then
+ head, current = mathlistkern(head,current)
+ elseif trace_kern then
+ head, current = ruledmathlistkern(head,current)
+ end
+ else
+ if trace_kern then
+ head, current = ruledkern(head,current,vertical)
+ end
+ end
+ goto next;
+ ::list::
+ if id == hlist_code then
+ local content = getlist(current)
+ if content then
+ setlist(current,visualize(content,false,nil,current))
+ end
+ if trace_depth then
+ ruleddepth(current)
+ end
+ if trace_line and getsubtype(current) == linelist_code then
+ head, current = ruledbox(head,current,false,l_line,"L__",trace_simple,previous,trace_origin,parent)
+ elseif trace_hbox then
+ head, current = ruledbox(head,current,false,l_hbox,"H__",trace_simple,previous,trace_origin,parent)
+ end
+ elseif id == vlist_code then
+ local content = getlist(current)
+ local isvtop = getstate(current) == vtop_package_state
+ local tag = nil
+ local layer = nil
+ if content then
+ setlist(current,visualize(content,true,nil,current))
+ end
+ if trace_vtop then
+ if isvtop then
+ tag = "_T_"
+ layer = l_vtop
+ elseif trace_vbox then
+ tag = "__V"
+ layer = l_vbox
+ end
+ elseif trace_vbox then
+ if not isvtop then
+ tag = "__V"
+ layer = l_vbox
+ end
+ end
+ if tag then
+ head, current = ruledbox(head,current,true,layer,tag,trace_simple,previous,trace_origin,parent)
+ end
+ end
+ ::next::
+ previous = current
+ current = getnext(current)
+ end
+ return head
+ end
+
+ local function cleanup()
+ for tag, cache in next, caches do
+ for k, v in next, cache do
+ flush_node_list(v)
+ end
+ end
+ cleanup = function()
+ report_visualize("error, duplicate cleanup")
+ end
+ end
+
+ luatex.registerstopactions(cleanup)
+
+ function visualizers.handler(head)
+ if usedfont then
+ starttiming(visualizers)
+ head = visualize(head,true)
+ stoptiming(visualizers)
+ return head, true
+ else
+ return head, false
+ end
+ end
+
+ function visualizers.box(n)
+ if usedfont then
+ starttiming(visualizers)
+ local box = getbox(n)
+ if box then
+ setlist(box,visualize(getlist(box),getid(box) == vlist_code))
+ end
+ stoptiming(visualizers)
+ return head, true
+ else
+ return head, false
+ end
+ end
+
+end
+
+do
+
+ local hlist_code = nodecodes.hlist
+ local vlist_code = nodecodes.vlist
+ local nextnode = nuts.traversers.node
+
+ local last = nil
+ local used = nil
+
+ local mark = {
+ "trace:1", "trace:2", "trace:3",
+ "trace:4", "trace:5", "trace:6",
+ "trace:7",
+ }
+
+ local function markfonts(list)
+ for n, id in nextnode, list do
+ if id == glyph_code then
+ local font = getfont(n)
+ local okay = used[font]
+ if not okay then
+ last = last + 1
+ okay = mark[last]
+ used[font] = okay
+ end
+ setcolor(n,okay)
+ elseif id == hlist_code or id == vlist_code then
+ markfonts(getlist(n))
+ end
+ end
+ end
+
+ function visualizers.markfonts(list)
+ last, used = 0, { }
+ markfonts(type(n) == "number" and getlist(getbox(n)) or n)
+ end
+
+end
+
+statistics.register("visualization time",function()
+ if enabled then
+ -- cleanup() -- in case we don't don't do it each time
+ return formatters["%s seconds"](statistics.elapsedtime(visualizers))
+ end
+end)
+
+-- interface
+
+do
+
+ local implement = interfaces.implement
+
+ implement {
+ name = "setvisual",
+ arguments = "string",
+ actions = visualizers.setvisual
+ }
+
+ implement {
+ name = "setvisuals",
+ arguments = "string",
+ actions = visualizers.setvisual
+ }
+
+ implement {
+ name = "getvisual",
+ arguments = "string",
+ actions = { setvisual, context }
+ }
+
+ implement {
+ name = "setvisuallayer",
+ arguments = "string",
+ actions = visualizers.setlayer
+ }
+
+ implement {
+ name = "markvisualfonts",
+ arguments = "integer",
+ actions = visualizers.markfonts
+ }
+
+ implement {
+ name = "setvisualfont",
+ arguments = "integer",
+ actions = visualizers.setfont
+ }
+
+end
+
+-- Here for now:
+
+do
+
+ local function make(str,forecolor,rulecolor,layer)
+ if initialize then
+ initialize()
+ end
+ local rule = new_rule(emwidth/fraction,exheight,4*exheight)
+ setcolor(rule,rulecolor)
+ settransparency(rule,rulecolor)
+ local info
+ if str == "" then
+ info = new_hlist(rule)
+ else
+ local text = hpack_string(str,usedfont)
+ local list = getlist(text)
+ setlistcolor(list,textcolor)
+ setlisttransparency(list,textcolor)
+ setshift(text,3.5 * exheight)
+ info = new_hlist(setlink(rule,text))
+ end
+ setattr(info,a_layer,layer)
+ return info
+ end
+
+ function visualizers.register(name,textcolor,rulecolor)
+ if rawget(layers,name) then
+ -- message
+ return
+ end
+ local cache = caches[name]
+ local layer = layers[name]
+ if not textcolor then
+ textcolor = c_text_d
+ end
+ if not rulecolor then
+ rulecolor = c_origin_d
+ end
+ return function(str)
+ if not str then
+ str = ""
+ end
+ local info = cache[str]
+ if not info then
+ info = make(str,textcolor,rulecolor,layer)
+ cache[str] = info
+ end
+ return copy_node(info)
+ end
+ end
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/trac-vis.mkxl b/Master/texmf-dist/tex/context/base/mkxl/trac-vis.mkxl
new file mode 100644
index 00000000000..dd69e0bb8d3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/trac-vis.mkxl
@@ -0,0 +1,219 @@
+%D \module
+%D [ file=trac-vis, % replaces supp-vis plus some s-* modules
+%D version=2012.06.23, % 1996.10.21,
+%D title=\CONTEXT\ Tracing Macros,
+%D subtitle=Visualization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The old visual debugger dates from 1996 and started out as joke. In practice
+%D it's not used that often although the \type {\ruledhbox} cum suis macros come
+%D in handy when writing code. In the process of luafication some additional
+%D tracing options were tested, for instance showing font kerns. As part of the
+%D \MKIV\ cleanup the decision was made to reimplement, reintegrate and reconsider
+%D all these features. The old code is gone and the new code will get extended
+%D when needed. We still provide placeholders for some old visualization commands
+%D but they might go away.
+%D
+%D Control over what gets visualized happens with the tracker command:
+%D
+%D \enabletrackers[visualizers.*]
+%D
+%D Possible values are: \type {fontkern}, \type {kern}, \type {glue}, \type
+%D {penalty}, \type {hbox}, \type {vbox}, \type {all}, \type {reset}, \type
+%D {makeup}, \type {whatsit}, \type{glyph}.
+%D
+%D In due time some special visualzation of math will move here as well.
+
+\writestatus{loading}{ConTeXt Tracing Macros / Visualization}
+
+\registerctxluafile{trac-vis}{autosuffix,optimize}
+
+\unprotect
+
+\newconstant\c_syst_visualizers_state
+\newtoks \t_syst_visualizers_optimize
+
+% \definesystemattribute[visual][public,global] % already defined
+
+% no, but can become an option:
+%
+% \appendtoks
+% \c_attr_visual\attributeunsetvalue
+% \to \everybeforepagebody
+
+%D We only provide box visualizers as they can come in handy for testing
+%D macros. In due time we will move some of the m-visual code here too.
+
+\aliased\let\syst_visualizers_hbox \hbox
+\aliased\let\syst_visualizers_vbox \vbox
+\aliased\let\syst_visualizers_vtop \vtop
+\aliased\let\syst_visualizers_vcenter\vcenter
+\aliased\let\syst_visualizers_hpack \hpack
+\aliased\let\syst_visualizers_vpack \vpack
+\aliased\let\syst_visualizers_tpack \tpack
+
+\permanent\protected\def\ruledhbox {\syst_visualizers_hbox attr \visualattribute \clf_getvisual{simplehbox} }
+\permanent\protected\def\ruledhpack {\syst_visualizers_hpack attr \visualattribute \clf_getvisual{simplehbox} }
+\permanent\protected\def\ruledvbox {\syst_visualizers_vbox attr \visualattribute \clf_getvisual{simplevbox} }
+\permanent\protected\def\ruledvpack {\syst_visualizers_vpack attr \visualattribute \clf_getvisual{simplevbox} }
+\permanent\protected\def\ruledvtop {\syst_visualizers_vtop attr \visualattribute \clf_getvisual{simplevtop} }
+\permanent\protected\def\ruledtpack {\syst_visualizers_tpack attr \visualattribute \clf_getvisual{simplevtop} }
+\permanent\protected\def\ruledvcenter{\syst_visualizers_vcenter attr \visualattribute \clf_getvisual{simplevbox} }
+\permanent\protected\def\ruledmbox #1{\ruledhbox{\startimath#1\stopimath}}
+
+\appendtoks
+ \ifcase\c_syst_visualizers_state\else
+ \syst_visualizers_speedup
+ \fi
+\to \everyshipout
+
+\appendtoks
+ \glet\syst_visualizers_speedup\relax
+ \global\t_syst_visualizers_optimize\emptytoks
+\to \t_syst_visualizers_optimize
+
+\def\syst_visualizers_speedup{\the\t_syst_visualizers_optimize}
+
+\appendtoks
+% \enforced\global\protected\edef\ruledhbox {\syst_visualizers_hbox attr \visualattribute \number\clf_getvisual{simplehbox} }
+% \enforced\global\protected\edef\ruledhpack {\syst_visualizers_hpack attr \visualattribute \number\clf_getvisual{simplehbox} }
+% \enforced\global\protected\edef\ruledvbox {\syst_visualizers_vbox attr \visualattribute \number\clf_getvisual{simplevbox} }
+% \enforced\global\protected\edef\ruledvpack {\syst_visualizers_vpack attr \visualattribute \number\clf_getvisual{simplevbox} }
+% \enforced\global\protected\edef\ruledvtop {\syst_visualizers_vtop attr \visualattribute \number\clf_getvisual{simplevtop} }
+% \enforced\global\protected\edef\ruledtpack {\syst_visualizers_tpack attr \visualattribute \number\clf_getvisual{simplevtop} }
+% \enforced\global\protected\edef\ruledvcenter{\syst_visualizers_vcenter attr \visualattribute \number\clf_getvisual{simplevbox} }
+\to \t_syst_visualizers_optimize
+
+\permanent\tolerant\protected\def\showmakeup[#1]%
+ {\ifarguments
+ \clf_setvisual{makeup}%
+ \else
+ \clf_setvisual{#1}%
+ \fi}
+
+\permanent\protected\def\showallmakeup {\clf_setvisual{all}\showstruts}
+\permanent\protected\def\showboxes {\clf_setvisual{boxes}}
+\permanent\protected\def\showglyphs {\clf_setvisual{glyph}}
+\permanent\protected\def\showfontkerns {\clf_setvisual{fontkern}}
+\permanent\protected\def\showfontitalics {\clf_setvisual{italic}}
+\permanent\protected\def\showglyphdata {\showglyphs\showfontkerns\showfontitalics}
+\permanent\protected\def\showfontexpansion{\clf_setvisual{expansion}}
+
+\permanent\tolerant\protected\def\setvisualizerfont[#1]% somename at 4pt
+ {\begingroup
+ \iftok{#1}\emptytoks
+ \definedfont[Mono at 4pt]%
+ \else
+ \definedfont[#1]%
+ \fi
+ \clf_setvisualfont\fontid\font
+ \endgroup}
+
+\permanent\protected\def\resetvisualizers
+ {\c_attr_visual\attributeunsetvalue}
+
+%D New (these might also be a visualizers):
+
+% \definecolor[f:r:t][a=1,t=.25,r=1]
+% \definecolor[f:g:t][a=1,t=.25,g=1]
+% \definecolor[f:b:t][a=1,t=.25,b=1]
+% \definecolor[f:c:t][a=1,t=.25,c=1]
+% \definecolor[f:m:t][a=1,t=.25,m=1]
+% \definecolor[f:y:t][a=1,t=.25,y=1]
+% \definecolor[f:k:t][a=1,t=.25,s=0]
+
+\permanent\protected\def\filledhboxr{\node_backgrounds_boxes_add\hbox[f:r:t]}
+\permanent\protected\def\filledhboxg{\node_backgrounds_boxes_add\hbox[f:g:t]}
+\permanent\protected\def\filledhboxb{\node_backgrounds_boxes_add\hbox[f:b:t]}
+\permanent\protected\def\filledhboxc{\node_backgrounds_boxes_add\hbox[f:c:t]}
+\permanent\protected\def\filledhboxm{\node_backgrounds_boxes_add\hbox[f:m:t]}
+\permanent\protected\def\filledhboxy{\node_backgrounds_boxes_add\hbox[f:y:t]}
+\permanent\protected\def\filledhboxk{\node_backgrounds_boxes_add\hbox[f:k:t]}
+
+%D Overload:
+
+\protected\def\spac_struts_vide_hbox
+ {\hbox attr \visualattribute \clf_getvisual{strut} }
+
+\appendtoks
+ \normalexpanded{\protected\xdef\spac_struts_vide_hbox\expandafter{\spac_struts_vide_hbox}}%
+\to \t_syst_visualizers_optimize
+
+%D For manuals:
+
+\permanent\protected\def\markfonts#1%
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\hbox{\getbuffer}%
+ \clf_markvisualfonts\scratchbox
+ \unhbox\scratchbox
+ \endgroup}
+
+% As demo:
+%
+% \startbuffer
+% \hbox {\raise1cm\hbox{raised} normal \lower1cm\hbox{lowered}}
+% \blank
+% \moveleft1cm\hbox{left}
+% \blank
+% \hbox{normal}
+% \blank
+% \moveright1cm\hbox{right}
+% \blank
+% \stopbuffer
+%
+% \start \showboxes \getbuffer \stop \blank[4*big] \getbuffer
+%
+% \startbuffer
+% \moveleft1cm\vbox{left}
+% \blank
+% \vbox{normal}
+% \blank
+% \moveright1cm\vbox{right}
+% \blank
+% \stopbuffer
+%
+% \start \showboxes \getbuffer \stop \blank[4*big] \getbuffer
+
+%D We keep this one:
+
+\permanent\protected\def\dontinterfere
+ {\reseteverypar
+ \parindent\zeropoint
+ \parskip \zeropoint
+ \leftskip \zeropoint
+ \rightskip\zeropoint
+ \relax}
+
+%D We keep these for a while:
+
+% \aliased\let\ruledhss \hss
+% \aliased\let\ruledhfil \hfil
+% \aliased\let\ruledhfill \hfill
+% \aliased\let\ruledhfilll \hfilll
+% \aliased\let\ruledhfilneg \hfilneg
+% \aliased\let\ruledhfillneg \hfillneg
+% \aliased\let\ruledhfilllneg \hfilllneg
+% \aliased\let\ruledvss \vss
+% \aliased\let\ruledvfil \vfil
+% \aliased\let\ruledvfill \vfill
+% \aliased\let\ruledvfilll \vfilll
+% \aliased\let\ruledvfilneg \vfilneg
+% \aliased\let\ruledvfillneg \vfillneg
+% \aliased\let\ruledvfilllneg \vfilllneg
+% \aliased\let\ruledhskip \hskip
+% \aliased\let\ruledvskip \vskip
+% \aliased\let\ruledkern \kern
+% \aliased\let\ruledhglue \hglue
+% \aliased\let\ruledvglue \vglue
+% \aliased\let\ruledmkern \mkern
+% \aliased\let\ruledmskip \mskip
+% \aliased\let\ruledpenalty \penalty
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/type-def.mkxl b/Master/texmf-dist/tex/context/base/mkxl/type-def.mkxl
new file mode 100644
index 00000000000..a80b4f7bdf3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/type-def.mkxl
@@ -0,0 +1,48 @@
+%D \module
+%D [ file=type-def,
+%D version=2005.02.04,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Default Definitions,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\starttypescriptcollection[simplification]
+
+\starttypescript [\s!serif] [\s!simple] [\s!name]
+ \definefontsynonym [\s!Serif] [\s!Simple]
+ \definefontsynonym [\s!SerifBold] [\s!Serif]
+ \definefontsynonym [\s!SerifItalic] [\s!Serif]
+ \definefontsynonym [\s!SerifSlanted] [\s!Serif]
+ \definefontsynonym [\s!SerifBoldItalic] [\s!Serif]
+ \definefontsynonym [\s!SerifBoldSlanted] [\s!Serif]
+ \definefontsynonym [\s!SerifCaps] [\s!Serif]
+\stoptypescript
+
+\starttypescript [\s!sans] [\s!simple] [\s!name]
+ \definefontsynonym [\s!Sans] [\s!Simple]
+ \definefontsynonym [\s!SansBold] [\s!Sans]
+ \definefontsynonym [\s!SansItalic] [\s!Sans]
+ \definefontsynonym [\s!SansSlanted] [\s!Sans]
+ \definefontsynonym [\s!SansBoldItalic] [\s!Sans]
+ \definefontsynonym [\s!SansBoldSlanted] [\s!Sans]
+ \definefontsynonym [\s!SansCaps] [\s!Sans]
+\stoptypescript
+
+\starttypescript [\s!mono] [\s!simple] [\s!name]
+ \definefontsynonym [\s!Mono] [\s!Simple]
+ \definefontsynonym [\s!MonoBold] [\s!Mono]
+ \definefontsynonym [\s!MonoItalic] [\s!Mono]
+ \definefontsynonym [\s!MonoSlanted] [\s!Mono]
+ \definefontsynonym [\s!MonoBoldItalic] [\s!Mono]
+ \definefontsynonym [\s!MonoBoldSlanted] [\s!Mono]
+ \definefontsynonym [\s!MonoCaps] [\s!Mono]
+\stoptypescript
+
+\stoptypescriptcollection
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/type-fbk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/type-fbk.mkxl
new file mode 100644
index 00000000000..4ac38178754
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/type-fbk.mkxl
@@ -0,0 +1,70 @@
+%D \module
+%D [ file=type-sfbk,
+%D version=2005.02.04, % moved from ini/def/set
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Fallbacks,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\definetypescriptprefix [\s!serif] [\s!Serif]
+\definetypescriptprefix [\s!sans] [\s!Sans]
+\definetypescriptprefix [\s!mono] [\s!Mono]
+
+\definefontsynonym [\s!DefaultFont] [\s!file:lmmonoproplt10-regular]
+
+\startsetups [\s!font:\s!fallback:\s!serif]
+ \definefontsynonym[\s!Serif] [\s!DefaultFont]
+ \definefontsynonym[\s!SerifBold] [\s!Serif]
+ \definefontsynonym[\s!SerifItalic] [\s!Serif]
+ \definefontsynonym[\s!SerifSlanted] [\s!SerifItalic]
+ \definefontsynonym[\s!SerifBoldItalic] [\s!Serif]
+ \definefontsynonym[\s!SerifBoldSlanted][\s!SerifBoldItalic]
+ \definefontsynonym[\s!SerifCaps] [\s!Serif] [\s!features=\s!smallcaps]
+\stopsetups
+
+\startsetups [\s!font:\s!fallback:\s!sans]
+ \definefontsynonym[\s!Sans] [\s!DefaultFont]
+ \definefontsynonym[\s!SansBold] [\s!Sans]
+ \definefontsynonym[\s!SansItalic] [\s!Sans]
+ \definefontsynonym[\s!SansSlanted] [\s!SansItalic]
+ \definefontsynonym[\s!SansBoldItalic] [\s!Sans]
+ \definefontsynonym[\s!SansBoldSlanted][\s!SansBoldItalic]
+ \definefontsynonym[\s!SansCaps] [\s!Sans] [\s!features=\s!smallcaps]
+\stopsetups
+
+\startsetups [\s!font:\s!fallback:\s!mono]
+ \definefontsynonym[\s!Mono] [\s!DefaultFont]
+ \definefontsynonym[\s!MonoBold] [\s!Mono]
+ \definefontsynonym[\s!MonoItalic] [\s!Mono]
+ \definefontsynonym[\s!MonoSlanted] [\s!MonoItalic]
+ \definefontsynonym[\s!MonoBoldItalic] [\s!Mono]
+ \definefontsynonym[\s!MonoBoldSlanted][\s!MonoBoldItalic]
+ \definefontsynonym[\s!MonoCaps] [\s!Mono] [\s!features=\s!smallcaps]
+\stopsetups
+
+\starttypescript [\s!serif,\s!sans,\s!mono] [\s!fallback]
+ \setups[\s!font:\s!fallback:\typescriptone]
+\stoptypescript
+
+\startsetups [\s!font:allbold:\s!serif]
+ \definefontsynonym[\s!Serif] [\s!SerifBold]
+ \definefontsynonym[\s!SerifItalic] [\s!SerifBoldItalic]
+ \definefontsynonym[\s!SerifSlanted][\s!SerifBoldSlanted]
+ %definefontsynonym[\s!SerifCaps] [\s!SerifBold]
+\stopsetups
+
+\startsetups [\s!font:allbold:\s!sans]
+ \definefontsynonym[\s!Sans] [\s!SansBold]
+ \definefontsynonym[\s!SansItalic] [\s!SansBoldItalic]
+ \definefontsynonym[\s!SansSlanted][\s!SansBoldSlanted]
+ %definefontsynonym[\s!SansCaps] [\s!SansBold]
+\stopsetups
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt
new file mode 100644
index 00000000000..23d5096e2ff
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt
@@ -0,0 +1,45 @@
+if not modules then modules = { } end modules ['type-ini'] = {
+ version = 1.001,
+ comment = "companion to type-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local lpegmatch, P, Cs = lpeg.match, lpeg.P, lpeg.Cs
+
+local context = context
+local implement = interfaces.implement
+local uselibrary = resolvers.uselibrary
+local p_strip = Cs((P("type-") * (P("imp-")^0))^0/"" * P(1)^0)
+local report = logs.reporter("fonts","typescripts")
+
+local function action(name,foundname)
+ context.loadfoundtypescriptfile(name,foundname)
+end
+
+local patterns = {
+ "type-imp-%s.mkxl",
+ "type-imp-%s.mkiv",
+ "type-imp-%s.tex"
+}
+
+local function failure(name)
+ if name ~= "loc" then
+ report("unknown library %a",name)
+ end
+end
+
+implement {
+ name = "loadtypescriptfile",
+ arguments = "string",
+ actions = function(name) -- a more specific name
+ uselibrary {
+ name = lpegmatch(p_strip,name) or name,
+ patterns = patterns,
+ action = action,
+ failure = failure,
+ onlyonce = false, -- will become true
+ }
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkiv/type-ini.mklx b/Master/texmf-dist/tex/context/base/mkxl/type-ini.mklx
index 5470c9016ce..bba2d433b20 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/type-ini.mklx
+++ b/Master/texmf-dist/tex/context/base/mkxl/type-ini.mklx
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Typescript Macros / Initialization}
-\registerctxluafile{type-ini}{}
+\registerctxluafile{type-ini}{autosuffix}
%D The default fontclass is empty. We could demand always using fontclasses, and
%D then make the calling macros simplier (always assume fontclass) but apart from
@@ -27,8 +27,6 @@
\unprotect
-\definesystemvariable {ts} % TypeScript / for the moment we keep this one
-
\newcount \c_font_typescripts_n_of_preloaded
\newconditional\c_font_typescripts_quit
\newtoks \c_font_typescripts_document
@@ -41,21 +39,21 @@
\newtoks \everybeforedefinetypeface
\newtoks \everyafterdefinetypeface
-\let\typescriptfiles \empty
-\let\currenttypescripts\empty
-\let\currenttypefile \empty
+\mutable\let\typescriptfiles \empty
+\mutable\let\currenttypescripts\empty
+\mutable\let\currenttypefile \empty
\installmacrostack\currenttypefile
-\let\typescriptone \empty % public, used in typescripts
-\let\typescripttwo \empty % public, used in typescripts
-\let\typescriptthree\empty % public, used in typescripts
+\mutable\let\typescriptone \empty % public, used in typescripts
+\mutable\let\typescripttwo \empty % public, used in typescripts
+\mutable\let\typescriptthree\empty % public, used in typescripts
\installmacrostack\typescriptone
\installmacrostack\typescripttwo
\installmacrostack\typescriptthree
-\let\fontclassstyle \empty
+\mutable\let\fontclassstyle \empty
\installmacrostack\fontclassstyle
@@ -69,7 +67,7 @@
\installmacrostack\m_font_typescripts_two
\installmacrostack\m_font_typescripts_three
-\let\t_font_typescripts\relax % uses as synonym
+\mutable\let\t_font_typescripts\relax % uses as synonym
\installcorenamespace{typescriptcache}
\installcorenamespace{typescriptfiles}
@@ -84,35 +82,54 @@
% tricky ... here we push/pop ... so \let
-\let\typescriptmethod\plusone % 1: empty==all==true 2: empty==false
-\let\typescriptstate \plustwo % 1: process 2: store
+\mutable\let\typescriptmethod\plusone % 1: empty==all==true 2: empty==false
+\mutable\let\typescriptstate \plustwo % 1: process 2: store
\installmacrostack\typescriptmethod
\installmacrostack\typescriptstate
-\unexpanded\def\starttypescriptcollection
+%D When these are loaded it is possible to get spaces but the whole idea is to do
+%D that loading in vertical mode. Adding \type {\pushendofline} and \type
+%D {\popendofline} is an option but not watertight as it can still interfere, for
+%D instance work comments and leading spaces. Also, in horizontal mode it is likely
+%D that one is also grouped and loading bodyfonts grouped is a real bad idea.
+%D Ignoring all spaces is also not a solution. So, our verdict is: no catch.
+
+\permanent\protected\def\starttypescriptcollection % redefined on the fly
{\dosingleempty\font_typescripts_collection_start}
\def\font_typescripts_collection_start[#tag]%
{}
-\let\stoptypescriptcollection\relax
+\permanent\let\stoptypescriptcollection\relax
+
+\permanent\protected\def\usetypescriptfile[#filename]%
+ {\ifcstok{#filename}\v!reset
+ \let\typescriptfiles\empty
+ \else
+ \splitfilename{#filename}%
+ \addtocommalist\splitoffbase\typescriptfiles
+ \fi}
+
+\installmacrostack\stoptypescript
-\unexpanded\def\usetypescriptfile[#filename]%
- {\doifelse{#filename}\v!reset
- {\let\typescriptfiles\empty}
- {\splitfilename{#filename}%
- \addtocommalist\splitoffbase\typescriptfiles}}
+% \permanent\protected\def\usetypescript {\dotripleempty\font_typescripts_use_one}
+% \permanent\protected\def\usetypescriptexact{\dotripleempty\font_typescripts_use_two}
+%
+% \def\font_typescripts_use_one{\let\typescriptmethod\plusone\font_typescripts_use}
+% \def\font_typescripts_use_two{\let\typescriptmethod\plustwo\font_typescripts_use}
+%
+% \protected\def\font_typescripts_use[#one][#two][#three]%
-\unexpanded\def\usetypescript {\dotripleempty\font_typescripts_use_one}
-\unexpanded\def\usetypescriptexact{\dotripleempty\font_typescripts_use_two}
+% todo: just pass the method ... also further on then .. first test
\def\font_typescripts_use_one{\let\typescriptmethod\plusone\font_typescripts_use}
\def\font_typescripts_use_two{\let\typescriptmethod\plustwo\font_typescripts_use}
-\installmacrostack\stoptypescript
+\permanent\protected\def\usetypescript {\font_typescripts_use_one}
+\permanent\protected\def\usetypescriptexact{\font_typescripts_use_two}
-\unexpanded\def\font_typescripts_use[#one][#two][#three]%
+\tolerant\protected\def\font_typescripts_use[#one]#spacer[#two]#spacer[#three]%
{\push_macro_m_font_typescripts_one
\push_macro_m_font_typescripts_two
\push_macro_m_font_typescripts_three
@@ -152,20 +169,20 @@
\let\font_typescripts_use_inline\font_typescripts_use_display
-\unexpanded\def\preloadtypescripts
+\permanent\protected\def\preloadtypescripts
{\ifproductionrun\settrue\c_font_typescripts_preload\fi}
\prependtoks
\preloadtypescripts
\to \everyjob
-\unexpanded\def\loadtypescriptfile[#1]%
+\permanent\protected\def\loadtypescriptfile[#1]%
{\push_macro_typescriptstate
\let\typescriptstate\plustwo % assumes 2 at the outer level
\clf_loadtypescriptfile{#1}%
\pop_macro_typescriptstate}
-\unexpanded\def\loadfoundtypescriptfile#1#2% name foundname / not a user command
+\permanent\protected\def\loadfoundtypescriptfile#1#2% name foundname / not a user command
{\startreadingfile
\unprotect
\pushendofline
@@ -174,19 +191,19 @@
\protect
\stopreadingfile}
-\unexpanded\def\quittypescriptscanning
+\permanent\protected\def\quittypescriptscanning
{\settrue\c_font_typescripts_quit} % public
-\def\font_typescripts_start_store#definitions\stoptypescript
+\permanent\protected\def\font_typescripts_start_store#definitions\stoptypescript
{\global\advance\c_font_typescripts_n_of_preloaded\plusone
- \expandafter\normalgdef\csname\??typescriptcache\the\c_font_typescripts_n_of_preloaded\endcsname
+ \gdefcsname\??typescriptcache\the\c_font_typescripts_n_of_preloaded\endcsname
{\starttypescript#definitions\stoptypescript}%
\gtoksapp\t_font_typescripts\expandafter
{\csname\??typescriptcache\the\c_font_typescripts_n_of_preloaded\endcsname}}
-\def\font_typescripts_collection_start_store#definitions\stoptypescriptcollection
+\permanent\protected\def\font_typescripts_collection_start_store#definitions\stoptypescriptcollection
{\global\advance\c_font_typescripts_n_of_preloaded\plusone
- \expandafter\normalgdef\csname\??typescriptcache\the\c_font_typescripts_n_of_preloaded\endcsname
+ \gdefcsname\??typescriptcache\the\c_font_typescripts_n_of_preloaded\endcsname
{\starttypescriptcollection#definitions\stoptypescriptcollection}%
\gtoksapp\t_font_typescripts\expandafter
{\csname\??typescriptcache\the\c_font_typescripts_n_of_preloaded\endcsname}}
@@ -208,7 +225,7 @@
\def\font_typescript_process_typescript_file_and_store
{\expandafter\let\expandafter\t_font_typescripts\csname\??typescriptfiles\currenttypefile\endcsname
- \ifx\t_font_typescripts\relax
+ \ifrelax\t_font_typescripts
\font_typescript_process_typescript_store_indeed
\fi
\the\t_font_typescripts}
@@ -216,37 +233,30 @@
\def\font_typescript_process_typescript_store_indeed
{\newtoks\t_font_typescripts % is \relaxed elsewhere
\begingroup
- \let\starttypescript \font_typescripts_start_store
- \let\starttypescriptcollection\font_typescripts_collection_start_store
+ \enforced\let\starttypescript \font_typescripts_start_store
+ \enforced\let\starttypescriptcollection\font_typescripts_collection_start_store
\font_typescript_process_typescript_file
\endgroup
- \expandafter\let\csname\??typescriptfiles\currenttypefile\endcsname\t_font_typescripts}
+ \letcsname\??typescriptfiles\currenttypefile\endcsname\t_font_typescripts}
\def\font_typescript_process_typescript_file
- {\clf_doprocesstypescriptfile{\currenttypefile}}
-
-\unexpanded\def\usetypescriptonce
- {\dotripleempty\font_typescripts_use_once}
+ {\clf_loadtypescriptfile{\currenttypefile}}
-\def\font_typescripts_use_once[#one][#two][#three]%
+\permanent\tolerant\protected\def\usetypescriptonce[#one]#spacer[#two]#spacer[#three]%
{\ifcsname\??typescriptonce#one:#two:#three\endcsname
\writestatus\m!fonts{once (#one) (#two) (#three)}%
\else
- \expandafter\let\csname\??typescriptonce#one:#two:#three\endcsname\relax
+ \letcsname\??typescriptonce#one:#two:#three\endcsname\relax
\font_typescripts_use[#one][#two][#three]%
\fi}
% \definetypescriptsynonym[lbr][cmr]
-\unexpanded\def\definetypescriptsynonym
- {\dodoubleempty\font_typescripts_synonym_define}
+\permanent\tolerant\protected\def\definetypescriptsynonym[#name]#spacer[#synonym]%
+ {\ifarguments\or\or\edefcsname\??typescriptsynonyms#name\endcsname{#synonym}\fi}
-\def\font_typescripts_synonym_define[#name][#synonym]%
- {\ifsecondargument\setevalue{\??typescriptsynonyms#name}{#synonym}\fi}
-
-\def\truetypescript#name% recursive so no \lastnamedcs
+\permanent\def\truetypescript#name% recursive so no \lastnamedcs
{\ifcsname\??typescriptsynonyms#name\endcsname
- %\expandafter\truetypescript\csname\??typescriptsynonyms#name\endcsname
\expandafter\truetypescript\lastnamedcs
\else
#name%
@@ -262,7 +272,7 @@
\settrue\c_font_typescripts_first_pass
\to \everyjob
-\unexpanded\def\starttypescript
+\permanent\protected\def\starttypescript
{\ifcase\typescriptstate
% 0 = skip
\expandafter\font_typescripts_start_gobble
@@ -277,7 +287,7 @@
\expandafter\font_typescripts_start_gobble
\fi}
-\def\font_typescripts_start_gobble#definitions\stoptypescript{}
+\def\font_typescripts_start_gobble#ignore\stoptypescript{}
\def\font_typescripts_start_document#definitions\stoptypescript
{\toksapp\c_font_typescripts_document{\starttypescript#definitions\stoptypescript}}
@@ -300,7 +310,7 @@
\fi}
\def\font_typescripts_show_match
- {\writestatus\m!fonts{match:\ifx\currenttypefile\relax\space *\fi \m_font_typescripts_match}}
+ {\writestatus\m!fonts{match:\ifrelax\currenttypefile\space *\fi \m_font_typescripts_match}}
\def\font_typescripts_start_process_yes
{\ifdone
@@ -331,13 +341,13 @@
\def\font_typescripts_start_process_indeed
{\push_macro_fontclass}
-\unexpanded\def\stoptypescript
+\permanent\protected\def\stoptypescript
{\pop_macro_fontclass}
\def\font_typescripts_check#asked#target#followup[#value]% script use value next
{\donefalse
\edef\m_font_typescripts_check{#value}%
- \ifx\m_font_typescripts_check\empty % no longer needed / met
+ \ifempty\m_font_typescripts_check % no longer needed / met
\ifcase\typescriptmethod\or\donetrue\fi
\orelse\ifx#asked\s!all
\donetrue
@@ -359,23 +369,15 @@
\expandafter\font_typescripts_start_gobble
\fi}
-\def\extendtypescriptmatch
+\permanent\protected\def\extendtypescriptmatch
{\edef\m_font_typescripts_match{\m_font_typescripts_match\space[\m_font_typescripts_check]}}
%D Map files will go away in \LUATEX, but till that happens we use stripped down
%D support for loading them.
-\unexpanded\def\loadmapfile{\dosingleempty\font_map_load_file}
-\unexpanded\def\loadmapline{\dodoubleempty\font_map_load_line}
-
-\def\font_map_load_file[#filename]%
- {\clf_loadmapfile{#filename}}
-
-\def\font_map_load_line[#kind][#data]%
- {\clf_loadmapline{#kind}{#data}}
-
-\unexpanded\def\forgetmapfiles
- {\clf_resetmapfiles}
+\permanent\tolerant\protected\def\loadmapfile [#filename]{\clf_loadmapfile{#filename}}
+\permanent\tolerant\protected\def\loadmapline [#kind]#spacer[#data]{\clf_loadmapline{#kind}{#data}}
+\permanent \protected\def\forgetmapfiles {\clf_resetmapfiles}
% \prependtoks
% \loadmapfile[mkiv-base.map]% can't we preload this one?
@@ -388,16 +390,13 @@
% \definetypescriptprefix[mono] [Mono]
%
% \starttypescript [serif,sans,mono] [handling,hanging,hz] [pure,normal,hz,quality]
-% \setupfontsynonym [\typescriptprefix\typescriptone] [handling=\typescriptthree]
+% \setupfontsynonym [\typescriptprefix\typescriptone] [handling=\typescriptthree]
% \stoptypescript
-\unexpanded\def\definetypescriptprefix
- {\dodoubleargument\font_typescripts_define_prefix}
-
-\def\font_typescripts_define_prefix[#name][#prefix]%
- {\setgvalue{\??typescriptprefix#name}{#prefix}} % made global
+\permanent\tolerant\protected\def\definetypescriptprefix[#name]#spacer[#prefix]%
+ {\gdefcsname\??typescriptprefix#name\endcsname{#prefix}} % made global
-\def\typescriptprefix#name%
+\permanent\def\typescriptprefix#name%
%{\ifcsname\??typescriptprefix#name\endcsname\csname\??typescriptprefix#name\endcsname\else#name\fi}
{\ifcsname\??typescriptprefix#name\endcsname\lastnamedcs\else#name\fi}
@@ -410,9 +409,6 @@
% \definetypeface [joke] [rm] [serif] [lucida] [size] [settings]
% \definetypeface [joke] [specification]
-\unexpanded\def\definetypeface
- {\dosixtupleargument\font_typefaces_define}
-
\appendtoks
\font_helpers_reset_fontclass_math_families\fontclass
\to \everybeforedefinetypeface
@@ -421,7 +417,7 @@
\settrue\autotypescripts
-\unexpanded\def\trycurrentfontclass#typeface%
+\protected\def\fonts_helpers_try_currentfontclass#typeface%
{\ifconditional\autotypescripts
\usetypescript[#typeface]%
\ifcsname\??fontclassyes#typeface\endcsname
@@ -434,26 +430,35 @@
\edef\fontclass{#typeface}%
\else
% todo: message
- \letvalueempty{\??fontclassnop#typeface}%
+ \letcsname\??fontclassnop#typeface\endcsname\empty
\fi
\fi
\else
% todo: message
- \letvalueempty{\??fontclassnop#typeface}%
+ \letcsname\??fontclassnop#typeface\endcsname\empty
\fi}
%D Now we define:
-\def\font_typefaces_define
- {\iffifthargument
- \expandafter\font_typefaces_define_a
- \orelse\iffourthargument
- \expandafter\font_typefaces_define_b
- \orelse\ifthirdargument
- \expandafter\font_typefaces_define_c
- \else
+\permanent\tolerant\protected\def\definetypeface[#name]#spacer[#style]#spacer[#fontshape]#spacer[#fontname]#spacer[#fontsize]#spacer[#settings]%
+ {\ifarguments
+ \expandafter\font_typefaces_define_e
+ \or
\expandafter\font_typefaces_define_d
- \fi}
+ \or
+ \expandafter\font_typefaces_define_d
+ \or
+ \expandafter\font_typefaces_define_c
+ \or
+ \expandafter\font_typefaces_define_b
+ \or
+ \expandafter\font_typefaces_define_a
+ \or
+ \expandafter\font_typefaces_define_a
+ \fi[#name][#style][#fontshape][#fontname][#fontsize][#settings]}
+
+\def\font_typefaces_define_e[#name][#style][#fontshape][#fontname][#fontsize][#settings]%
+ {}
\def\font_typefaces_define_a[#name][#style][#fontshape][#fontname][#fontsize][#settings]%
{\iftracetypescripts\writestatus\m!fonts{define: [#name] [#style] [#fontshape] [#fontname]}\fi
@@ -470,41 +475,41 @@
\font_typescripts_use_one[#fontshape][#fontsize][\s!size]%
\font_typefaces_defining_stop}
-\def\font_typefaces_define_b[#name][#style][#fontshape][#fontname][#dummya][#dummyb]%
- {\font_typefaces_define_a[#name][#style][#fontshape][#fontname][\s!default][#dummyb]}
+\def\font_typefaces_define_b[#name][#style][#fontshape][#fontname][#discard][#discard]%
+ {\font_typefaces_define_a[#name][#style][#fontshape][#fontname][\s!default][#discard]}
-\def\font_typefaces_define_c[#name][#style][#dummya][#dummyb][#dummyc][#dummyd]%
+\def\font_typefaces_define_c[#name][#style][#discard][#discard][#discard][#discard]%
{\font_typefaces_define_indeed[#name][#style]}
-\def\font_typefaces_define_d[#name][#specification][#dummya][#dummyb][#dummyc][#dummyd]% use definitions in lfg file
+\def\font_typefaces_define_d[#name][#specification][#discard][#discard][#discard][#discard]% use definitions in lfg file
{\clf_definetypeface{#name}{#specification}}
\def\font_typefaces_define_indeed[#name][#style]% saveguard against redefinition
{\doifsomething{#name}
{\ifcsname\??typescriptdefaultstyles#name\endcsname \else
\registerfontclass{#name}%
- \setxvalue{\??typescriptdefaultstyles#name}{#style}%
+ \gdefcsname\??typescriptdefaultstyles#name\endcsname{#style}%
\fi
\ifcsname#name\endcsname \else
- \setugvalue{#name}{\switchtotypeface[#name][#style]}%
+ \protected\frozen\instance\gdefcsname#name\endcsname{\switchtotypeface[#name][#style]}%
\fi}}
\def\font_typefaces_defining_start#name#style#settings%
- {\let\@@tsrscale \!!plusone % as we push/pop
- \let\@@tsfeatures \empty
- \let\@@tsfallbacks \empty
- \let\@@tsgoodies \empty
- \let\@@tsdirection \empty
- \let\@@tsdesignsize\empty
- \geteparameters[\??ts][#settings]% todo raw
+ {\let\m_ts_rscale \!!plusone % as we push/pop
+ \let\m_ts_features \empty
+ \let\m_ts_fallbacks \empty
+ \let\m_ts_goodies \empty
+ \let\m_ts_direction \empty
+ \let\m_ts_designsize\empty
+ \geteparameters[m_ts_][#settings]% todo raw ... no need for key interpretation
\push_macro_fontclass
\push_macro_fontclassstyle
\setcurrentfontclass{#name}%
- \savefontclassparameters{#style}\@@tsrscale\@@tsfeatures\@@tsfallbacks\@@tsgoodies\@@tsdesignsize\@@tsdirection
+ \savefontclassparameters{#style}\m_ts_rscale\m_ts_features\m_ts_fallbacks\m_ts_goodies\m_ts_designsize\m_ts_direction
\the\everybeforedefinetypeface}
-\def\tsvar#key#default% undocumented and unofficial
- {\expandafter\ifx\csname\??ts#key\endcsname\empty
+\permanent\def\tsvar#key#default% undocumented and unofficial
+ {\expandafter\ifempty\csname\??ts#key\endcsname
#default%
\else
\csname\??ts#key\endcsname
@@ -515,45 +520,47 @@
\pop_macro_fontclassstyle
\pop_macro_fontclass}
-\def\dofastdefinetypeface#name#style#fontshape#fontsize#settings% called from the lua end (via case d)
+\permanent\protected\def\dofastdefinetypeface#name#style#fontshape#fontsize#settings% called from the lua end (via case d)
{\font_typefaces_define_indeed[#name][#style]%
\font_typefaces_defining_start{#name}{#style}{#settings}%
\font_typescripts_use_one[#fontshape][#fontsize][\s!size]%
\font_typefaces_defining_stop}
-\unexpanded\def\setuptypeface% [class] [settings]
- {\dodoubleempty\font_typefaces_setup}
-
-\unexpanded\def\switchtotypeface% [class] [settings]
- {\dodoubleempty\font_typefaces_switch}
-
-\def\font_typefaces_setup[#class][#settings]%
- {\setcurrentfontclass{#class}%
- \let\globalfontclass\fontclass
- \ifsecondargument
+\permanent\tolerant\protected\def\setuptypeface[#class]#spacer[#settings]%
+ {\ifarguments
+ \or
+ \setcurrentfontclass{#class}%
+ \let\globalfontclass\fontclass
+ \ifempty\fontclass
+ \setupbodyfont[\s!rm]%
+ \orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
+ \expandafter\setupbodyfont\expandafter[\lastnamedcs]%
+ \else
+ \setupbodyfont[\s!rm]%
+ \fi
+ \or
+ \setcurrentfontclass{#class}%
+ \let\globalfontclass\fontclass
\setupbodyfont[#settings]%
- \orelse\ifx\fontclass\empty
- \setupbodyfont[\s!rm]%
- \orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
- %\setupbodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]%
- \expandafter\setupbodyfont\expandafter[\lastnamedcs]%
- \else
- \setupbodyfont[\s!rm]%
\fi
\ifmmode\mr\else\tf\fi} % needed ?
-\def\font_typefaces_switch[#class][#settings]%
- {\setcurrentfontclass{#class}%
- \let\globalfontclass\globalfontclass
- \ifsecondargument
- \switchtobodyfont[#settings]%
- \orelse\ifx\fontclass\empty
- \switchtobodyfont[\s!rm]%
- \orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
- %\switchtobodyfont[\csname\??typescriptdefaultstyles\fontclass\endcsname]%
- \expandafter\switchtobodyfont\expandafter[\lastnamedcs]%
- \else
- \switchtobodyfont[\s!rm]%
+\permanent\tolerant\protected\def\switchtotypeface[#class]#spacer[#settings]%
+ {\ifarguments
+ \or
+ \setcurrentfontclass{#class}%
+ \let\globalfontclass\globalfontclass
+ \ifempty\fontclass
+ \switchtobodyfont[\s!rm]%
+ \orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
+ \expandafter\switchtobodyfont\expandafter[\lastnamedcs]%
+ \else
+ \switchtobodyfont[\s!rm]%
+ \fi
+ \or
+ \setcurrentfontclass{#class}%
+ \let\globalfontclass\globalfontclass
+ \switchtobodyfont[#settings]%
\fi
\ifmmode\mr\else\tf\fi} % needed ?
@@ -566,16 +573,14 @@
%D \inherittypeface[palatino] % == [rm,ss,tt,mm]
%D \stoptyping
-\unexpanded\def\inherittypeface
- {\dotripleempty\font_typescripts_inherit_indeed}
-
-\def\font_typescripts_inherit_indeed[#name][#styles][#parentclass]%
- {\doifelsenothing{#styles}
- {\font_typescripts_inherit_indeed[#name][\s!rm,\s!ss,\s!tt,\s!mm][\fontclass]}
- {\doifnot{#name}{#parentclass}
- {\glet\font_typescripts_inherit_check\font_typescripts_inherit_check_indeed
- \def\font_typescripts_inherit_check_step#style{\setevalue{\??typescriptinheritances#name:#style}{#parentclass}}%
- \processcommalist[#styles]\font_typescripts_inherit_check_step}}}
+\permanent\tolerant\protected\def\inherittypeface[#name]#spacer[#styles]#spacer[#parentclass]%
+ {\iftok{#styles}\emptytoks
+ \inherittypeface[#name][\s!rm,\s!ss,\s!tt,\s!mm][\fontclass]%
+ \orelse\iftok{#name}{#parentclass}\else
+ \glet\font_typescripts_inherit_check\font_typescripts_inherit_check_indeed
+ \def\font_typescripts_inherit_check_step#style{\edefcsname\??typescriptinheritances#name:#style\endcsname{#parentclass}}%
+ \processcommalist[#styles]\font_typescripts_inherit_check_step
+ \fi}
\let\font_typescripts_inherit_check_step\relax
@@ -589,24 +594,14 @@
\let\font_typescripts_inherit_check\gobbleoneargument
-% not yet:
-%
-% \def\font_helpers_check_relative_font_id
-% {\ifcsname\??typescriptrelatives\fontclass\endcsname
-% \expandafter\let\expandafter\relativefontid\csname\??typescriptrelatives\fontclass\endcsname
-% \else
-% \expandafter\normalxdef\csname\??typescriptrelatives\fontclass\endcsname{\the\lastfontid}%
-% \let\relativefontid\minusone
-% \fi}
-
\def\v_font_string_d % default fontstyle (expands to \s!Serif in font-ini)
- {\expandafter\ifx\csname\??typescriptdefaultstyles\fontclass\endcsname\s!rm \s!Serif \else
- \expandafter\ifx\csname\??typescriptdefaultstyles\fontclass\endcsname\s!ss \s!Sans \else
- \expandafter\ifx\csname\??typescriptdefaultstyles\fontclass\endcsname\s!tt \s!Mono \else
+ {\expandafter\ifx\csname\??typescriptdefaultstyles\fontclass\endcsname\s!rm \s!Serif \else % no \orelse !
+ \expandafter\ifx\csname\??typescriptdefaultstyles\fontclass\endcsname\s!ss \s!Sans \else % no \orelse !
+ \expandafter\ifx\csname\??typescriptdefaultstyles\fontclass\endcsname\s!tt \s!Mono \else % no \orelse !
\s!Serif \fi\fi\fi}
-\unexpanded\def\font_helpers_set_fontstyle_of_fontclass
- {\ifx\fontclass\empty
+\protected\def\font_helpers_set_fontstyle_of_fontclass
+ {\ifempty\fontclass
\let\fontstyle\s!rm
\orelse\ifcsname\??typescriptdefaultstyles\fontclass\endcsname
%\edef\fontstyle{\csname\??typescriptdefaultstyles\fontclass\endcsname}%
diff --git a/Master/texmf-dist/tex/context/base/mkxl/type-lua.mkxl b/Master/texmf-dist/tex/context/base/mkxl/type-lua.mkxl
new file mode 100644
index 00000000000..fac6c3867a8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/type-lua.mkxl
@@ -0,0 +1,86 @@
+%D \module
+%D [ file=type-lua,
+%D version=2009.11.27,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=\MKIV\ goodies,
+%D author=Hans Hagen \& Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\starttypescriptcollection [luatex]
+
+\starttypescript [specserif] [\s!all] [\s!name]
+ \definefontsynonym [\s!Serif] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifItalic] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifSlanted] [spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBold] [spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldItalic] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldSlanted] [spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifCaps] [spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps]
+\stoptypescript
+
+\starttypescript [specsans] [\s!all] [\s!name]
+ \definefontsynonym [\s!Sans] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default]
+ \definefontsynonym [\s!SansItalic] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SansSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBold] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBoldItalic] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBoldSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SansCaps] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps]
+\stoptypescript
+
+\starttypescript [specmono] [\s!all] [\s!name]
+ \definefontsynonym [\s!Mono] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!default]
+ \definefontsynonym [\s!MonoItalic] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!MonoSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!MonoBold] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!normal] [\s!features=\s!default]
+ \definefontsynonym [\s!MonoBoldItalic] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!MonoBoldSlanted] [\s!spec:\cleanfontname\typescripttwo-\s!bold -\s!italic] [\s!features=\s!default]
+ \definefontsynonym [\s!MonoCaps] [\s!spec:\cleanfontname\typescripttwo-\s!normal-\s!normal] [\s!features=\s!smallcaps]
+\stoptypescript
+
+% we could combine these in the normal serif settings
+
+\starttypescript [specserif] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!rm] [\s!default]
+\stoptypescript
+
+\starttypescript [specsans] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!ss] [\s!default]
+\stoptypescript
+
+\starttypescript [specmono] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!tt] [\s!default]
+\stoptypescript
+
+\starttypescript [specserif] [\s!dtp] [\s!size]
+ \definebodyfont
+ [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
+ [\s!rm] [\s!default]
+\stoptypescript
+
+\starttypescript [specsans] [\s!dtp] [\s!size]
+ \definebodyfont
+ [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
+ [\s!ss] [\s!default]
+\stoptypescript
+
+\starttypescript [specmono] [\s!dtp] [\s!size]
+ \definebodyfont
+ [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
+ [\s!tt] [\s!default]
+\stoptypescript
+
+\stoptypescriptcollection
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/type-set.mkxl b/Master/texmf-dist/tex/context/base/mkxl/type-set.mkxl
new file mode 100644
index 00000000000..4a22b59a50a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/type-set.mkxl
@@ -0,0 +1,139 @@
+%D \module
+%D [ file=type-set,
+%D version=2005.02.04, % moved from ini/def
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Default Settings,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\ifnum\typescriptstate=\plustwo
+
+ % we store some typescripts in the format
+
+ % \loadmarkfile{type-def}
+ % \loadmarkfile{type-lua}
+ % \loadmarkfile{type-siz}
+ % \loadmarkfile{type-fbk}
+ % \loadmarkfile{type-imp-latinmodern}
+
+ % but ... let's make sure that newlines are gone
+
+ % beware: these are low level calls, so not user commands !
+
+ \loadfoundtypescriptfile\empty{type-def.mkxl}
+ \loadfoundtypescriptfile\empty{type-lua.mkxl}
+ \loadfoundtypescriptfile\empty{type-siz.mkxl}
+ \loadfoundtypescriptfile\empty{type-fbk.mkxl}
+ \loadfoundtypescriptfile\empty{type-imp-latinmodern.mkiv}
+
+ % and not:
+
+ % \loadtypescriptfile[def] % meant for local usage only
+ % \loadtypescriptfile[fbk] % meant for local usage only
+ % \loadtypescriptfile[lua] % meant for local usage only
+ % \loadtypescriptfile[siz] % meant for local usage only
+ % \usetypescriptfile[latinmodern]
+
+ \usetypescriptfile[loc]
+
+ % We want these names preset but they conflict with later loads so from now on
+ % one has to define a proper typeface if they are needed.
+ %
+ % \usetypescript[serif,sans,mono,math] [latin-modern]
+
+\else
+
+ \usetypescriptfile[def]
+ \usetypescriptfile[fbk]
+ \usetypescriptfile[lua]
+ \usetypescriptfile[siz]
+ \usetypescriptfile[latinmodern]
+ \usetypescriptfile[loc]
+
+\fi
+
+\definefilesynonym [type-imp-latin-modern.mkiv] [type-imp-latinmodern.mkiv]
+\definefilesynonym [type-imp-modern-latin.mkiv] [type-imp-modernlatin.mkiv]
+
+\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv]
+\definefilesynonym [type-imp-lucidaot.mkiv] [type-imp-lucida-opentype.mkiv]
+\definefilesynonym [type-imp-lucidadk.mkiv] [type-imp-lucida-opentype.mkiv]
+
+\definefilesynonym [type-imp-dejavu-condensed.mkiv] [type-imp-dejavu.mkiv]
+
+\definefilesynonym [type-imp-palatino.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-courier.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-avantgarde.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-helvetica.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-chancery.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-bookman.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-schoolbook.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-times.mkiv] [type-imp-texgyre.mkiv]
+
+\definefilesynonym [type-imp-cursor.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-adventor.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-heros.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-chorus.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-bonum.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-schola.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-pagella.mkiv] [type-imp-texgyre.mkiv]
+\definefilesynonym [type-imp-termes.mkiv] [type-imp-texgyre.mkiv]
+
+\definefilesynonym [type-imp-mscoretimes.mkiv] [type-imp-mscore.mkiv]
+\definefilesynonym [type-imp-mscorearial.mkiv] [type-imp-mscore.mkiv]
+\definefilesynonym [type-imp-mscorecourier.mkiv] [type-imp-mscore.mkiv]
+\definefilesynonym [type-imp-mscoreverdana.mkiv] [type-imp-mscore.mkiv]
+
+\definefilesynonym [type-imp-candara.mkiv] [type-imp-cleartype.mkiv]
+\definefilesynonym [type-imp-consolas.mkiv] [type-imp-cleartype.mkiv]
+\definefilesynonym [type-imp-constantia.mkiv] [type-imp-cleartype.mkiv]
+\definefilesynonym [type-imp-corbel.mkiv] [type-imp-cleartype.mkiv]
+\definefilesynonym [type-imp-calibri.mkiv] [type-imp-cleartype.mkiv]
+
+\definefilesynonym [type-imp-antykwa-poltawskiego.mkiv] [type-imp-antykwapoltawskiego.mkiv]
+
+%definefilesynonym [type-imp-mac.mkiv] [type-imp-osx.mkiv]
+%definefilesynonym [type-imp-win.mkiv] [type-imp-mscore.mkiv]
+
+\definefilesynonym [type-imp-eulernovum.mkiv] [type-imp-euler.mkiv]
+\definefilesynonym [type-imp-eulernova.mkiv] [type-imp-euler.mkiv]
+
+\definefilesynonym [type-imp-euler-with-pagella.mkiv] [type-imp-euler.mkiv]
+\definefilesynonym [type-imp-pagella-with-euler.mkiv] [type-imp-euler.mkiv]
+
+\definefilesynonym [type-imp-mdbch.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mdugm.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mdput.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mdici.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mdpgd.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mdpus.mkiv] [type-imp-mathdesign.mkiv]
+
+\definefilesynonym [type-imp-mathdesignch.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mathdesigngm.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mathdesignut.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mathdesignci.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mathdesigngd.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mathdesignus.mkiv] [type-imp-mathdesign.mkiv]
+
+\definefilesynonym [type-imp-mathdesigncharter.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mathdesigngaramond.mkiv] [type-imp-mathdesign.mkiv]
+\definefilesynonym [type-imp-mathdesignutopia.mkiv] [type-imp-mathdesign.mkiv]
+
+\definefilesynonym [type-imp-cows.mkiv] [type-imp-koeielettersot.mkiv]
+\definefilesynonym [type-imp-sheep.mkiv] [type-imp-koeielettersot.mkiv]
+\definefilesynonym [type-imp-coloredcows.mkiv] [type-imp-koeielettersot.mkiv]
+\definefilesynonym [type-imp-coloredsheep.mkiv] [type-imp-koeielettersot.mkiv]
+\definefilesynonym [type-imp-koeieletters.mkiv] [type-imp-koeielettersot.mkiv]
+
+\definefilesynonym [type-imp-stixtwo.mkiv] [type-imp-stix.mkiv]
+
+\definefilesynonym [type-imp-ibmplex.mkiv] [type-imp-plex.mkiv]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/type-siz.mkxl b/Master/texmf-dist/tex/context/base/mkxl/type-siz.mkxl
new file mode 100644
index 00000000000..d4c90b18229
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/type-siz.mkxl
@@ -0,0 +1,169 @@
+%D \module
+%D [ file=type-siz,
+%D version=2001.04.12,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Sizing scripts,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+% beware: no \s! before keys as these are interpreted
+
+\starttypescriptcollection[\s!size]
+
+\starttypescript [\s!serif] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!rm] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!sans] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!ss] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!mono] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!tt] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!math] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!mm] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!handwriting] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!hw] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!calligraphy] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!cg] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!casual] [\s!default] [\s!size]
+ \definebodyfont
+ [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt]
+ [\s!rm] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!all] [\s!dtp] [\s!size]
+
+ \definebodyfontenvironment
+ [4pt]
+ [\s!text=4pt,\s!script=4pt,\s!scriptscript=4pt,
+ \s!x=4pt,\s!xx=4pt,\v!big=6pt,\v!small=4pt]
+
+ \definebodyfontenvironment
+ [5pt]
+ [\s!text=5pt,\s!script=5pt,\s!scriptscript=5pt,
+ \s!x=5pt,\s!xx=5pt,\v!big=7pt,\v!small=5pt]
+
+ \definebodyfontenvironment
+ [6pt]
+ [\s!text=6pt,\s!script=5pt,\s!scriptscript=5pt,
+ \s!x=5pt,\s!xx=5pt,\v!big=8pt,\v!small=5pt]
+
+ \definebodyfontenvironment
+ [7pt]
+ [\s!text=7pt,\s!script=6pt,\s!scriptscript=5pt,
+ \s!x=6pt,\s!xx=5pt,\v!big=9pt,\v!small=5pt]
+
+ \definebodyfontenvironment
+ [8pt]
+ [\s!text=8pt,\s!script=6pt,\s!scriptscript=5pt,
+ \s!x=6pt,\s!xx=5pt,\v!big=10pt,\v!small=6pt]
+
+ \definebodyfontenvironment
+ [9pt]
+ [\s!text=9pt,\s!script=7pt,\s!scriptscript=5pt,
+ \s!x=7pt,\s!xx=5pt,\v!big=11pt,\v!small=7pt]
+
+ \definebodyfontenvironment
+ [10pt]
+ [\s!text=10pt,\s!script=7pt,\s!scriptscript=5pt,
+ \s!x=8pt,\s!xx=6pt,\v!big=12pt,\v!small=8pt]
+
+ \definebodyfontenvironment
+ [11pt]
+ [\s!text=11pt,\s!script=8pt,\s!scriptscript=6pt,
+ \s!x=9pt,\s!xx=7pt,\v!big=13pt,\v!small=9pt]
+
+ \definebodyfontenvironment
+ [12pt]
+ [\s!text=12pt,\s!script=9pt,\s!scriptscript=7pt,
+ \s!x=10pt,\s!xx=8pt,\v!big=14pt,\v!small=10pt]
+
+ \definebodyfontenvironment
+ [13pt]
+ [\s!text=13pt,\s!script=10pt,\s!scriptscript=8pt,
+ \s!x=11pt,\s!xx=9pt,\v!big=16pt,\v!small=11pt]
+
+ \definebodyfontenvironment
+ [14pt]
+ [\s!text=14pt,\s!script=10pt,\s!scriptscript=7pt,
+ \s!x=12pt,\s!xx=10pt,\v!big=16pt,\v!small=12pt]
+
+ \definebodyfontenvironment
+ [16pt]
+ [\s!text=16pt,\s!script=12pt,\s!scriptscript=9pt,
+ \s!x=13pt,\s!xx=11pt,\v!big=18pt,\v!small=14pt]
+
+ % suboptimal math sizes
+
+ \definebodyfontenvironment
+ [18pt]
+ [\s!text=18pt,\s!script=16pt,\s!scriptscript=14pt,
+ \s!x=16pt,\s!xx=14pt,\v!big=22pt,\v!small=16pt]
+
+ \definebodyfontenvironment
+ [22pt]
+ [\s!text=22pt,\s!script=22pt,\s!scriptscript=18pt,
+ \s!x=18pt,\s!xx=16pt,\v!big=28pt,\v!small=18pt]
+
+ \definebodyfontenvironment
+ [28pt]
+ [\s!text=28pt,\s!script=22pt,\s!scriptscript=18pt,
+ \s!x=22pt,\s!xx=18pt,\v!big=28pt,\v!small=22pt]
+
+\stoptypescript
+
+\starttypescript [\s!serif] [\s!dtp] [\s!size]
+ \definebodyfont
+ [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
+ [\s!rm] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!sans] [\s!dtp] [\s!size]
+ \definebodyfont
+ [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
+ [\s!ss] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!mono] [\s!dtp] [\s!size]
+ \definebodyfont
+ [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
+ [\s!tt] [\s!default]
+\stoptypescript
+
+\starttypescript [\s!math] [\s!dtp] [\s!size]
+ \definebodyfont
+ [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt]
+ [\s!mm] [\s!default]
+\stoptypescript
+
+\stoptypescriptcollection
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-bld.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-bld.lmt
new file mode 100644
index 00000000000..599106ccd61
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-bld.lmt
@@ -0,0 +1,414 @@
+if modules then modules = { } end modules ['typo-bld'] = { -- was node-par
+ version = 1.001,
+ comment = "companion to typo-bld.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- no need for nuts in the one-line demo (that might move anyway)
+
+local insert, remove = table.insert, table.remove
+
+builders = builders or { }
+local builders = builders
+
+builders.paragraphs = builders.paragraphs or { }
+local parbuilders = builders.paragraphs
+
+parbuilders.constructors = parbuilders.constructors or { }
+local constructors = parbuilders.constructors
+
+constructors.names = constructors.names or { }
+local names = constructors.names
+
+constructors.numbers = constructors.numbers or { }
+local numbers = constructors.numbers
+
+constructors.methods = constructors.methods or { }
+local methods = constructors.methods
+
+local a_parbuilder = attributes.numbers['parbuilder'] or 999 -- why 999
+constructors.attribute = a_parbuilder
+
+local unsetvalue = attributes.unsetvalue
+local texsetattribute = tex.setattribute
+local texnest = tex.nest
+local texlists = tex.lists
+
+local texget = tex.get
+local texset = tex.set
+
+local texgetdimen = tex.getdimen
+
+local nodes = nodes
+local nodeidstostring = nodes.idstostring
+local nodepool = nodes.pool
+local new_baselineskip = nodepool.baselineskip
+local new_lineskip = nodepool.lineskip
+local insert_node_before = nodes.insert_before
+local hpack_node = nodes.hpack
+
+local nuts = nodes.nuts
+local tonode = nodes.tonode
+local tonut = nodes.tonut
+local count_nodes = nuts.countall
+local getattr = nuts.getattr
+
+local starttiming = statistics.starttiming
+local stoptiming = statistics.stoptiming
+
+local registercallback = callbacks.register
+
+storage.register("builders/paragraphs/constructors/names", names, "builders.paragraphs.constructors.names")
+storage.register("builders/paragraphs/constructors/numbers", numbers, "builders.paragraphs.constructors.numbers")
+
+local trace_page_builder = false trackers.register("builders.page", function(v) trace_page_builder = v end)
+local trace_vbox_builder = false trackers.register("builders.vbox", function(v) trace_vbox_builder = v end)
+local trace_post_builder = false trackers.register("builders.post", function(v) trace_post_builder = v end)
+
+local report_page_builder = logs.reporter("builders","page")
+local report_vbox_builder = logs.reporter("builders","vbox")
+local report_par_builder = logs.reporter("builders","par")
+
+local mainconstructor = nil -- not stored in format
+local nofconstructors = 0
+local stack = { }
+
+function constructors.define(name)
+ nofconstructors = nofconstructors + 1
+ names[nofconstructors] = name
+ numbers[name] = nofconstructors
+end
+
+function constructors.set(name) --- will go
+ if name then
+ mainconstructor = numbers[name] or unsetvalue
+ else
+ mainconstructor = stack[#stack] or unsetvalue
+ end
+ texsetattribute(a_parbuilder,mainconstructor)
+ if mainconstructor ~= unsetvalue then
+ constructors.enable()
+ end
+end
+
+function constructors.start(name)
+ local number = numbers[name]
+ insert(stack,number)
+ mainconstructor = number or unsetvalue
+ texsetattribute(a_parbuilder,mainconstructor)
+ if mainconstructor ~= unsetvalue then
+ constructors.enable()
+ end
+ -- report_par_builder("start %a",name)
+end
+
+function constructors.stop()
+ remove(stack)
+ mainconstructor = stack[#stack] or unsetvalue
+ texsetattribute(a_parbuilder,mainconstructor)
+ if mainconstructor == unsetvalue then
+ constructors.disable()
+ end
+ -- report_par_builder("stop")
+end
+
+-- return values:
+--
+-- true : tex will break itself
+-- false : idem but dangerous
+-- head : list of valid vmode nodes with last being hlist
+
+function constructors.handler(head,followed_by_display)
+ if type(head) == "boolean" then
+ return head
+ else
+ local attribute = getattr(head,a_parbuilder) -- or mainconstructor
+ if attribute then
+ local method = names[attribute]
+ if method then
+ local handler = methods[method]
+ if handler then
+ return handler(head,followed_by_display)
+ else
+ report_par_builder("contructor method %a is not defined",tostring(method))
+ return true -- let tex break
+ end
+ end
+ end
+ return true -- let tex break
+ end
+end
+
+-- just for testing
+
+function constructors.methods.default(head,followed_by_display)
+ return true -- let tex break
+end
+
+-- also for testing (now also surrounding spacing done)
+
+function parbuilders.constructors.methods.oneline(head,followed_by_display)
+ -- when needed we will turn this into a helper
+ local t = texnest[texnest.ptr]
+ local h = hpack_node(head)
+ local d = texget("baselineskip",false) - t.prevdepth - h.height
+ t.prevdepth = h.depth
+ t.prevgraf = 1
+ if d < texget("lineskiplimit") then
+ return insert_node_before(h,h,new_lineskip(texget("lineskip",false))) -- no stretch etc
+ else
+ return insert_node_before(h,h,new_baselineskip(d))
+ end
+end
+
+-- It makes no sense to have a sequence here as we already have
+-- pre and post hooks and only one parbuilder makes sense, so no:
+--
+-- local actions = nodes.tasks.actions("parbuilders")
+--
+-- yet ... maybe some day.
+
+local actions = constructors.handler
+local enabled = false
+
+local function processor(head,followed_by_display)
+ -- todo: not again in otr so we need to flag
+ if enabled then
+ starttiming(parbuilders)
+ head = tonut(head)
+ head = actions(head,followed_by_display)
+ head = tonode(head)
+ stoptiming(parbuilders)
+ return head
+ else
+ return true -- let tex do the work
+ end
+end
+
+function constructors.enable () enabled = true end
+function constructors.disable() enabled = false end
+
+registercallback('linebreak_filter', processor, "breaking paragraps into lines")
+
+statistics.register("linebreak processing time", function()
+ return statistics.elapsedseconds(parbuilders)
+end)
+
+-- todo: move from nodes.builders to builders
+
+nodes.builders = nodes.builder or { }
+local builders = nodes.builders
+
+local vboxactions = nodes.tasks.actions("vboxbuilders")
+
+function builders.vpack_filter(head,groupcode,size,packtype,maxdepth,direction)
+ local done = false
+ if head then
+ starttiming(builders)
+ head = tonut(head)
+ if trace_vbox_builder then
+ local before = count_nodes(head)
+ head, done = vboxactions(head,groupcode,size,packtype,maxdepth,direction)
+ local after = count_nodes(head)
+ nodes.processors.tracer("vpack",head,groupcode,before,after,done)
+ else
+ head, done = vboxactions(head,groupcode)
+ end
+ head = tonode(head)
+ stoptiming(builders)
+ end
+ return head, done
+end
+
+-- This one is special in the sense that it has no head and we operate on the mlv. Also,
+-- we need to do the vspacing last as it removes items from the mvl.
+
+local pageactions = nodes.tasks.actions("mvlbuilders")
+----- lineactions = nodes.tasks.actions("linebuilders")
+
+local function report(groupcode,head)
+ report_page_builder("trigger: %s",groupcode)
+ report_page_builder(" vsize : %p",texget("vsize"))
+ report_page_builder(" pagegoal : %p",texget("pagegoal"))
+ report_page_builder(" pagetotal: %p",texget("pagetotal"))
+ report_page_builder(" list : %s",head and nodeidstostring(head) or "<empty>")
+end
+
+-- check why box is called before after_linebreak .. maybe make categories and
+-- call 'm less
+
+-- this will be split into contribute_filter for these 4 so at some point
+-- the check can go away
+
+-- Todo: contrib_head can be any head (kind of) not per se the page one so maybe I will
+-- intercept that in the engine with page_contribute_head or so.
+
+function builders.buildpage_filter(groupcode)
+ local head = texlists.contribute_head
+ if head then
+ local done = false
+ -- called quite often ... maybe time to remove timing
+ starttiming(builders)
+ if trace_page_builder then
+ report(groupcode,head)
+ end
+ head, done = pageactions(head,groupcode)
+ stoptiming(builders)
+ -- -- doesn't work here (not passed on?)
+ -- texset("pagegoal,texget("vsize") - texgetdimen("d_page_floats_inserted_top") - texgetdimen("d_page_floats_inserted_bottom")
+ texlists.contribute_head = head or nil -- needs checking
+ -- tex.setlist("contribute_head",head,head and nodes.tail(head))
+ return done and head or true -- no return value needed
+ else
+ -- happens quite often
+ if trace_page_builder then
+ report(groupcode)
+ end
+-- return nil, false -- no return value needed
+ return nil
+ end
+end
+
+registercallback('vpack_filter', builders.vpack_filter, "vertical spacing etc")
+registercallback('buildpage_filter', builders.buildpage_filter, "vertical spacing etc (mvl)")
+
+statistics.register("v-node processing time", function()
+ return statistics.elapsedseconds(builders)
+end)
+
+local implement = interfaces.implement
+
+implement { name = "defineparbuilder", actions = constructors.define, arguments = "string" }
+implement { name = "setparbuilder", actions = constructors.set, arguments = "string" }
+implement { name = "startparbuilder", actions = constructors.start, arguments = "string" }
+implement { name = "stopparbuilder", actions = constructors.stop }
+implement { name = "enableparbuilder", actions = constructors.enable }
+implement { name = "disableparbuilder", actions = constructors.disable }
+
+-- Here are some tracers:
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+local setcolor = nodes.tracers.colors.set
+local listtoutf = nodes.listtoutf
+local new_kern = nuts.pool.kern
+local new_rule = nuts.pool.rule
+local hpack = nuts.hpack
+local getheight = nuts.getheight
+local getdepth = nuts.getdepth
+local getdirection = nuts.getdirection
+local getlist = nuts.getlist
+local setwidth = nuts.setwidth
+local setdirection = nuts.setdirection
+local setlink = nuts.setlink
+local tonode = nuts.tonode
+
+local list = { }
+
+local report_quality = logs.reporter("pack quality")
+
+-- overflow|badness w h d dir
+
+local function vpack_quality(how,n,detail,first,last,filename)
+ if last <= 0 then
+ report_quality("%s vbox",how)
+ elseif first > 0 and first < last then
+ report_quality("%s vbox at line %i - %i in file %a",how,first,last,filename or "?")
+ else
+ report_quality("%s vbox at line %i in file %a",how,filename or "?",last)
+ end
+ list[#list+1] = { "hbox", how, filename, first, last, how }
+end
+
+trackers.register("builders.vpack.quality",function(v)
+ registercallback("vpack_quality",v and vpack_quality or nil,"check vpack quality")
+end)
+
+local report = false
+local show = false
+
+local function hpack_quality(how,detail,n,first,last,filename)
+ n = tonut(n)
+ if report then
+ local str = listtoutf(getlist(n),"",true,nil,true)
+ if last <= 0 then
+ report_quality("%s hbox: %s",how,str)
+ elseif first > 0 and first < last then
+ report_quality("%s hbox at line %i - %i in file %a: %s",how,first,last,filename or "?",str)
+ else
+ report_quality("%s hbox at line %i in file %a: %s",how,last,filename or "?",str)
+ end
+ list[#list+1] = { "hbox", how, filename, first, last, str }
+ end
+ if show then
+ local width = 2*65536
+ local height = getheight(n)
+ local depth = getdepth(n)
+ local direction = getdirection(n)
+ if height < 4*65526 then
+ height = 4*65526
+ end
+ if depth < 2*65526 then
+ depth = 2*65526
+ end
+ local rule = new_rule(width,height,depth)
+ setdirection(rule,direction)
+ if how == "overfull" then
+ setcolor(rule,"red")
+ local kern = new_kern(-detail)
+ setlink(kern,rule)
+ rule = kern
+ elseif how == "underfull" then
+ setcolor(rule,"blue")
+ elseif how == "loose" then
+ setcolor(rule,"magenta")
+ elseif how == "tight" then
+ setcolor(rule,"cyan")
+ end
+ rule = hpack(rule)
+ setwidth(rule,0)
+ setdirection(rule,direction)
+ return tonode(rule) -- can be a nut
+ end
+end
+
+trackers.register("builders.hpack.quality",function(v)
+ report = v
+ registercallback("hpack_quality",(report or show) and hpack_quality or nil,"check hpack quality")
+end)
+
+trackers.register("builders.hpack.overflow",function(v)
+ show = v
+ registercallback("hpack_quality",(report or show) and hpack_quality or nil,"check hpack quality")
+end)
+
+statistics.register("quality reports", function()
+ local n = #list
+ if n > 0 then
+ local t = table.setmetatableindex("number")
+ local fw = 0
+ local hw = 0
+ for i=1,n do
+ local f = list[i][1]
+ local h = list[i][2]
+ if #f > fw then
+ fw = #f
+ end
+ if #h > hw then
+ hw = #h
+ end
+ t[h] = t[h] + 1
+ end
+ logs.startfilelogging(report_quality)
+ for i=1,n do
+ local l = list[i]
+ report_quality("%-" .. fw .. "s [%04i - %04i] : %-" .. hw .. "s %s : %s",file.basename(l[3]),l[4],l[5],l[2],l[1],l[6])
+ end
+ logs.stopfilelogging()
+ report_quality()
+ report_quality("%i entries added to the log file : %s",n,table.sequenced(t))
+ report_quality()
+ end
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-bld.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-bld.mkxl
new file mode 100644
index 00000000000..ff1f569cb86
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-bld.mkxl
@@ -0,0 +1,62 @@
+%D \module
+%D [ file=typo-bld, % was node-par,
+%D version=2008.09.30,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Paragraph 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 Typesetting Macros / Paragraph Building}
+
+%D This is very experimental, undocumented, subjected to changes, etc. just as
+%D the underlying interfaces. But at least it's cleaned as part of the status-mkiv
+%D cleanup.
+
+% \enabletrackers[builders.hpack.overflow]
+% \enabletrackers[builders.hpack.quality]
+% \enabletrackers[builders.vpack.quality]
+
+% \startparbuilder[default]
+% \input tufte \par
+% \startparbuilder[oneline]
+% \input tufte \par
+% \stopparbuilder
+% \input tufte \par
+% \stopparbuilder
+%
+% \startparbuilder[oneline]
+% \dorecurse{100}{\input ward \par}
+% \stopparbuilder
+
+\unprotect
+
+\registerctxluafile{typo-bld}{autosuffix}
+
+\definesystemattribute[parbuilder][public]
+
+\installcorenamespace {parbuilder}
+
+\permanent\protected\def\defineparbuilder [#1]{\clf_defineparbuilder{#1}}
+\permanent\protected\def\setmainparbuilder[#1]{\clf_setparbuilder{#1}}
+
+\permanent\protected\def\startparbuilder [#1]{\ifhmode\par\fi\clf_startparbuilder{#1}}
+\permanent\protected\def\stopparbuilder {\ifhmode\par\fi\clf_stopparbuilder}
+
+%D There is no high level interface because after all implementing a linebreaker
+%D is not something that the average user will do.
+
+\defineparbuilder[default] % just for testing
+\defineparbuilder[oneline] % just for testing
+\defineparbuilder[basic] % just for testing
+
+%D This hooks in otr so we need to pickup.
+
+\permanent\protected\def\enableparbuilders {\clf_enableparbuilder } % can be public implementor
+\permanent\protected\def\disableparbuilders{\clf_disableparbuilder} % can be public implementor
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-brk.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-brk.lmt
new file mode 100644
index 00000000000..8d2fcd147b7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-brk.lmt
@@ -0,0 +1,498 @@
+if not modules then modules = { } end modules ['typo-brk'] = {
+ version = 1.001,
+ comment = "companion to typo-brk.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- this code dates from the beginning and is kind of experimental; it
+-- will be optimized and improved soon
+
+local next, type, tonumber, tostring = next, type, tonumber, tostring
+local utfbyte, utfchar = utf.byte, utf.char
+local format = string.format
+
+local trace_breakpoints = false trackers.register("typesetters.breakpoints", function(v) trace_breakpoints = v end)
+
+local report_breakpoints = logs.reporter("typesetting","breakpoints")
+
+local nodes, node = nodes, node
+
+local settings_to_array = utilities.parsers.settings_to_array
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getsubtype = nuts.getsubtype
+local getfont = nuts.getfont
+local getid = nuts.getid
+local getattrlist = nuts.getattrlist
+local getattr = nuts.getattr
+local getlanguage = nuts.getlanguage
+local isglyph = nuts.isglyph
+
+local setattr = nuts.setattr
+local setattrlist = nuts.setattrlist
+local setlink = nuts.setlink
+local setchar = nuts.setchar
+local setdisc = nuts.setdisc
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+local setboth = nuts.setboth
+local setsubtype = nuts.setsubtype
+
+local copy_node = nuts.copy_node
+local copy_node_list = nuts.copy_list
+local flush_node = nuts.flush_node
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local remove_node = nuts.remove
+local end_of_math = nuts.end_of_math
+local find_attribute = nuts.find_attribute
+local unset_attributes = nuts.unset_attributes
+
+local tonodes = nuts.tonodes
+
+local texsetattribute = tex.setattribute
+local unsetvalue = attributes.unsetvalue
+
+local nodepool = nuts.pool
+local enableaction = nodes.tasks.enableaction
+
+local v_reset = interfaces.variables.reset
+local v_yes = interfaces.variables.yes
+
+local implement = interfaces.implement
+
+local new_penalty = nodepool.penalty
+local new_glue = nodepool.glue
+local new_disc = nodepool.disc
+local new_wordboundary = nodepool.wordboundary
+
+local nodecodes = nodes.nodecodes
+local kerncodes = nodes.kerncodes
+
+local kern_code = nodecodes.kern
+local math_code = nodecodes.math
+
+local fontkern_code = kerncodes.fontkern
+local italickern_code = kerncodes.italiccorrection
+
+local is_letter = characters.is_letter
+
+local typesetters = typesetters
+
+typesetters.breakpoints = typesetters.breakpoints or {}
+local breakpoints = typesetters.breakpoints
+
+breakpoints.mapping = breakpoints.mapping or { }
+breakpoints.numbers = breakpoints.numbers or { }
+
+breakpoints.methods = breakpoints.methods or { }
+local methods = breakpoints.methods
+
+local a_breakpoints = attributes.private("breakpoint")
+
+storage.register("typesetters/breakpoints/mapping", breakpoints.mapping, "typesetters.breakpoints.mapping")
+
+local mapping = breakpoints.mapping
+local numbers = breakpoints.mapping
+
+for i=1,#mapping do
+ local m = mapping[i]
+ numbers[m.name] = m
+end
+
+-- this needs a cleanup ... maybe make all of them disc nodes
+
+-- todo: use boundaries
+
+local function insert_break(head,start,stop,before,after,kern)
+ if not kern then
+ local p = new_penalty(before)
+ local g = new_glue()
+ setattrlist(p,start)
+ setattrlist(g,start)
+ insert_node_before(head,start,p)
+ insert_node_before(head,start,g)
+ end
+ local p = new_penalty(after)
+ local g = new_glue()
+ setattrlist(p,start)
+ setattrlist(g,start)
+ insert_node_after(head,stop,g)
+ insert_node_after(head,stop,p)
+end
+
+methods[1] = function(head,start,stop,settings,kern)
+ local p, n = getboth(stop)
+ if p and n then
+ insert_break(head,start,stop,10000,0,kern)
+ end
+ return head, stop
+end
+
+methods[6] = function(head,start,stop,settings,kern)
+ local p = getprev(start)
+ local n = getnext(stop)
+ if p and n then
+ if kern then
+ insert_break(head,start,stop,10000,0,kern)
+ else
+ local l = new_wordboundary()
+ local d = new_disc()
+ local r = new_wordboundary()
+ setattrlist(d,start) -- otherwise basemode is forced and we crash
+ setlink(p,l,d,r,n)
+ if start == stop then
+ setboth(start)
+ setdisc(d,start,nil,copy_node(start))
+ else
+ setprev(start)
+ setnext(stop)
+ setdisc(d,start,nil,copy_node_list(start))
+ end
+ stop = r
+ end
+ end
+ return head, stop
+end
+
+methods[2] = function(head,start) -- ( => (-
+ local p, n = getboth(start)
+ if p and n then
+ local replace
+ head, start, replace = remove_node(head,start)
+ local post = copy_node(replace)
+ local hyphen = copy_node(post)
+ setchar(hyphen,languages.prehyphenchar(getlanguage(post)))
+ setlink(post,hyphen)
+ head, start = insert_node_before(head,start,new_disc(nil,post,replace))
+ setattrlist(start,replace)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+methods[3] = function(head,start) -- ) => -)
+ local p, n = getboth(start)
+ if p and n then
+ local replace
+ head, start, replace = remove_node(head,start)
+ local pre = copy_node(replace)
+ local hyphen = copy_node(pre)
+ setchar(hyphen,languages.prehyphenchar(getlanguage(pre)))
+ setlink(hyphen,pre)
+ head, start = insert_node_before(head,start,new_disc(hyphen,nil,replace)) -- so not pre !
+ setattrlist(start,tmp)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+methods[4] = function(head,start) -- - => - - -
+ local p, n = getboth(start)
+ if p and n then
+ local tmp
+ head, start, tmp = remove_node(head,start)
+ head, start = insert_node_before(head,start,new_disc())
+ setattrlist(start,tmp)
+ setdisc(start,copy_node(tmp),copy_node(tmp),tmp)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+methods[5] = function(head,start,stop,settings) -- x => p q r
+ local p, n = getboth(start)
+ if p and n then
+ local tmp
+ head, start, tmp = remove_node(head,start)
+ head, start = insert_node_before(head,start,new_disc())
+ local attr = getattrlist(tmp)
+ local font = getfont(tmp)
+ local left = settings.left
+ local right = settings.right
+ local middle = settings.middle
+ if left then
+ left = tonodes(tostring(left),font,attr)
+ end
+ if right then
+ right = tonodes(tostring(right),font,attr)
+ end
+ if middle then
+ middle = tonodes(tostring(middle),font,attr)
+ end
+ setdisc(start,left,right,middle)
+ setattrlist(start,attr)
+ flush_node(tmp)
+ insert_break(head,start,start,10000,10000)
+ end
+ return head, start
+end
+
+-- we know we have a limited set
+-- what if characters are replaced by the font handler
+-- do we need to go into disc nodes (or do it as first step but then we need a pre/post font handler)
+
+function breakpoints.handler(head)
+ local _, current = find_attribute(head, a_breakpoints)
+ if current then
+ local done = false
+ local attr = nil
+ local map = nil
+ local current = head
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local a = getattr(current,a_breakpoints)
+ if a and a > 0 then
+ if a ~= attr then
+ local data = mapping[a]
+ if data then
+ map = data.characters
+ else
+ map = nil
+ end
+ attr = a
+ end
+ if map then
+ local cmap = map[char]
+ if cmap then
+ -- for now we collect but when found ok we can move the handler here
+ -- although it saves nothing in terms of performance
+ local lang = getlanguage(current)
+ local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[languages.numbers[lang]] or cmap[""])
+ if smap then
+ local skip = smap.skip
+ local start = current
+ local stop = current
+ current = getnext(current)
+ if skip then
+ while current do
+ local c = isglyph(current)
+ if c == char then
+ stop = current
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ end
+ local d = { start, stop, cmap, smap, char }
+ if done then
+ done[#done+1] = d
+ else
+ done = { d }
+ end
+ else
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ elseif id == math_code then
+ attr = nil
+ current = end_of_math(current)
+ if current then
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ end
+ if not done then
+ return head
+ end
+ -- we have hits
+ -- local numbers = languages.numbers
+ for i=1,#done do
+ local data = done[i]
+ local start = data[1]
+ local stop = data[2]
+ local cmap = data[3]
+ local smap = data[4]
+ -- we do a sanity check for language
+ -- local lang = getlanguage(start)
+ -- local smap = lang and lang >= 0 and lang < 0x7FFF and (cmap[numbers[lang]] or cmap[""])
+ -- if smap then
+ local nleft = smap.nleft
+ local cleft = 0
+ local prev = getprev(start)
+ local kern = nil
+ while prev and nleft ~= cleft do
+ local char, id = isglyph(prev)
+ if char then
+ if not is_letter[char] then
+ cleft = -1
+ break
+ end
+ cleft = cleft + 1
+ prev = getprev(prev)
+ elseif id == kern_code then
+ local s = getsubtype(prev)
+ if s == fontkern_code or s == italickern_code then
+ if cleft == 0 then
+ kern = prev
+ prev = getprev(prev)
+ else
+ break
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if nleft == cleft then
+ local nright = smap.nright
+ local cright = 0
+ local next = getnext(stop) -- getnext(start)
+ while next and nright ~= cright do
+ local char, id = isglyph(next)
+ if char then
+ if not is_letter[char] then
+ cright = -1
+ break
+ end
+ if cright == 1 and cmap[char] then
+ -- let's not make it too messy
+ break
+ end
+ cright = cright + 1
+ next = getnext(next)
+ elseif id == kern_code then
+ local s = getsubtype(next)
+ if s == fontkern_code or s == italickern_code then
+ if cleft == 0 then
+ next = getnext(next)
+ else
+ break
+ end
+ else
+ break
+ end
+ else
+ break
+ end
+ end
+ if nright == cright then
+ local method = methods[smap.type]
+ if method then
+ head, start = method(head,start,stop,smap,kern)
+ end
+ end
+ -- end
+ end
+ end
+ if done then
+-- unset_attributes(a_breakpoints, head)
+ end
+ end
+ return head
+end
+
+local enabled = false
+
+function breakpoints.define(name)
+ local data = numbers[name]
+ if data then
+ -- error
+ else
+ local number = #mapping + 1
+ local data = {
+ name = name,
+ number = number,
+ characters = { },
+ }
+ mapping[number] = data
+ numbers[name] = data
+ end
+end
+
+function breakpoints.setreplacement(name,char,language,settings)
+ char = utfbyte(char)
+ local data = numbers[name]
+ if data then
+ local characters = data.characters
+ local cmap = characters[char]
+ if not cmap then
+ cmap = { }
+ characters[char] = cmap
+ end
+ local left, right, middle = settings.left, settings.right, settings.middle
+ cmap[language or ""] = {
+ type = tonumber(settings.type) or 1,
+ nleft = tonumber(settings.nleft) or 1,
+ nright = tonumber(settings.nright) or 1,
+ left = left ~= "" and left or nil,
+ right = right ~= "" and right or nil,
+ middle = middle ~= "" and middle or nil,
+ skip = settings.range == v_yes,
+ } -- was { type or 1, before or 1, after or 1 }
+ end
+end
+
+function breakpoints.set(n)
+ if n == v_reset then
+ n = unsetvalue
+ else
+ n = mapping[n]
+ if not n then
+ n = unsetvalue
+ else
+ if not enabled then
+ if trace_breakpoints then
+ report_breakpoints("enabling breakpoints handler")
+ end
+ enableaction("processors","typesetters.breakpoints.handler")
+ end
+ n = n.number
+ end
+ end
+ texsetattribute(a_breakpoints,n)
+end
+
+-- interface
+
+implement {
+ name = "definebreakpoints",
+ actions = breakpoints.define,
+ arguments = "string"
+}
+
+implement {
+ name = "definebreakpoint",
+ actions = breakpoints.setreplacement,
+ arguments = {
+ "string",
+ "string",
+ "string",
+ {
+ { "type", "integer" },
+ { "nleft", "integer" },
+ { "nright", "integer" },
+ { "right" },
+ { "left" },
+ { "middle" },
+ { "range" },
+ }
+ }
+}
+
+implement {
+ name = "setbreakpoints",
+ actions = breakpoints.set,
+ arguments = "string"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-brk.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-brk.mkxl
new file mode 100644
index 00000000000..47e5da886e2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-brk.mkxl
@@ -0,0 +1,94 @@
+%D \module
+%D [ file=typo-brk,
+%D version=2009.03.27, % code moved from core-spa.mkiv
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Breakpoints,
+%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 Typesetting Macros / Breakpoints}
+
+\unprotect
+
+% hm, we cannot prebuild lists, font dependent
+%
+% -- type nleft nright language left right middle
+%
+% -- we might eventually stick to only method 5
+
+\registerctxluafile{typo-brk}{autosuffix}
+
+\definesystemattribute[breakpoint][public,global]
+
+% see below: \exhyphenchar \minusone % we use a different order than base tex, so we really need this
+
+\permanent\tolerant\protected\def\definebreakpoints[#1]%
+ {\clf_definebreakpoints{#1}} % todo: public implementor
+
+\permanent\tolerant\protected\def\definebreakpoint[#1]#*[#2]#*[#3]% name char settings
+ {\begingroup
+ \getdummyparameters
+ [\c!type=\plusone,\c!nleft=\plusthree,\c!nright=\plusthree,%
+ \s!language=,\c!left=,\c!right=,\c!middle=,\c!range=\v!no,%
+ #3]%
+ \clf_definebreakpoint
+ {#1}%
+ {#2}%
+ {\reallanguagetag{\directdummyparameter\s!language}}%
+ {% maybe deal with #3 at the lua end
+ type \directdummyparameter\c!type
+ nleft \directdummyparameter\c!nleft
+ nright \directdummyparameter\c!nright
+ right {\directdummyparameter\c!right}%
+ left {\directdummyparameter\c!left}%
+ middle {\directdummyparameter\c!middle}%
+ range {\directdummyparameter\c!range}%
+ }%
+ \relax
+ \endgroup}
+
+\permanent\protected\def\setbreakpoints[#1]%
+ {\exhyphenchar\minusone % we use a different order than base tex, so we really need this
+ \clf_setbreakpoints{#1}}
+
+\permanent\protected\def\resetbreakpoints
+ {\exhyphenchar\hyphenasciicode % 2020.03.05
+ \c_attr_breakpoint\attributeunsetvalue}
+
+\definebreakpoints[compound]
+
+% 1: simple break
+% 6: simple break but skip same
+
+\definebreakpoint [compound] [+] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right=
+%definebreakpoint [compound] [-] [\c!nleft=3,\c!nright=3,\c!type=1,\c!range=\v!yes] % middle=+,left=,right=
+\definebreakpoint [compound] [-] [\c!nleft=3,\c!nright=3,\c!type=6,\c!range=\v!yes] % middle=+,left=,right=
+\definebreakpoint [compound] [/] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right=
+\definebreakpoint [compound] [(] [\c!nleft=3,\c!nright=3,\c!type=2] % type=5,middle=(,left=(-,right=
+\definebreakpoint [compound] [)] [\c!nleft=3,\c!nright=3,\c!type=3] % type=5,middle=),left=,right=-)
+
+\aliased\let\installbreakpoint\definebreakpoint % for a while
+
+% \start \hsize 1.5cm \setbreakpoints[compound]
+% \definebreakpoint [compound] [-] [nleft=3,nright=3,type=5,left=,right={-},middle={-}]
+% \definebreakpoint [compound] [(] [nleft=3,nright=3,type=5,left=,right={(-},middle={(}]
+% \definebreakpoint [compound] [)] [nleft=3,nright=3,type=5,left={-)},right=,middle={)}]
+% composed-word\par composed(word)\par
+% \stop
+
+% \mainlanguage[czech]
+% \definebreakpoint [compound] [\number`-] [language=cs,nleft=3,nright=3,type=4]
+% \setbreakpoints[compound]
+% \start \hsize 1mm test-test \par \stop
+
+%D Maybe some day default:
+%
+% \setbreakpoints[compound]
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-cap.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-cap.lmt
new file mode 100644
index 00000000000..67acb2535c3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-cap.lmt
@@ -0,0 +1,458 @@
+if not modules then modules = { } end modules ['typo-cap'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to typo-cap.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- see typo-cap.lua for a word traverser variant
+
+local next, type, tonumber = next, type, tonumber
+local format, insert = string.format, table.insert
+local div, getrandom, random = math.div, utilities.randomizer.get, math.random
+
+local trace_casing = false trackers.register("typesetters.casing", function(v) trace_casing = v end)
+
+local report_casing = logs.reporter("typesetting","casing")
+
+local nodes, node = nodes, node
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getattr = nuts.getattr
+local getfont = nuts.getfont
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local isglyph = nuts.isglyph
+local getdisc = nuts.getdisc
+
+local setchar = nuts.setchar
+local setfont = nuts.setfont
+local setscales = nuts.setscales
+
+local copy_node = nuts.copy
+local end_of_math = nuts.end_of_math
+local insert_after = nuts.insert_after
+local find_attribute = nuts.find_attribute
+local unset_attributes = nuts.unset_attributes
+
+local nextglyph = nuts.traversers.glyph
+
+local nodecodes = nodes.nodecodes
+local kerncodes = nodes.kerncodes
+
+local glyph_code = nodecodes.glyph
+local kern_code = nodecodes.kern
+local disc_code = nodecodes.disc
+local math_code = nodecodes.math
+
+local fontkern_code = kerncodes.fontkern
+
+local enableaction = nodes.tasks.enableaction
+
+local newkern = nuts.pool.kern
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local fontchar = fonthashes.characters
+
+local currentfont = font.current
+
+local variables = interfaces.variables
+local v_reset = variables.reset
+
+local texsetattribute = tex.setattribute
+local unsetvalue = attributes.unsetvalue
+local texgetcount = tex.getcount
+
+typesetters = typesetters or { }
+local typesetters = typesetters
+
+typesetters.cases = typesetters.cases or { }
+local cases = typesetters.cases
+
+cases.actions = { }
+local actions = cases.actions
+local a_cases = attributes.private("case")
+
+local run = 0 -- a trick to make neighbouring ranges work
+local blocked = { }
+
+local fontstate = { } -- this will become something generic
+
+local function set(tag,font)
+ if run < 0x7F then
+ run = run + 1
+ else
+ run = 1
+ end
+ local a = (font << 16)
+ + (tag << 8)
+ + (run << 0)
+ blocked[a] = false
+ -- it makes sense to fetch them all at once
+ fontstate[a] = {
+ texgetcount("glyphscale"),
+ texgetcount("glyphxscale"),
+ texgetcount("glyphyscale"),
+ texgetcount("glyphdatafield")
+ }
+ return a
+end
+
+local function get(a)
+ return
+ (a >> 8) & 0x00FF, -- tag
+ (a >> 16) & 0xFFFF, -- font
+ (a >> 0) & 0x00FF -- run
+end
+
+-- a previous implementation used char(0) as placeholder for the larger font, so we needed
+-- to remove it before it can do further harm ... that was too tricky as we use char 0 for
+-- other cases too
+--
+-- we could do the whole glyph run here (till no more attributes match) but then we end up
+-- with more code .. maybe i will clean this up anyway as the lastfont hack is somewhat ugly
+-- ... on the other hand, we need to deal with cases like:
+--
+-- \WORD {far too \Word{many \WORD{more \word{pushed} in between} useless} words}
+
+local uccodes = characters.uccodes
+local lccodes = characters.lccodes
+local categories = characters.categories
+
+-- true false true == mixed
+
+local function replacer(start,codes)
+ local char, fnt = isglyph(start)
+ local dc = codes[char]
+ if dc then
+ local ifc = fontchar[fnt]
+ if type(dc) == "table" then
+ for i=1,#dc do
+ if not ifc[dc[i]] then
+ return start, false
+ end
+ end
+ for i=#dc,1,-1 do
+ local chr = dc[i]
+ if i == 1 then
+ setchar(start,chr)
+ else
+ local g = copy_node(start)
+ setchar(g,chr)
+ insert_after(start,start,g)
+ end
+ end
+ elseif ifc[dc] then
+ setchar(start,dc)
+ end
+ end
+ return start
+end
+
+local registered, n = { }, 0
+
+local function register(name,f)
+ if type(f) == "function" then
+ n = n + 1
+ actions[n] = f
+ registered[name] = n
+ return n
+ else
+ local n = registered[f]
+ registered[name] = n
+ return n
+ end
+end
+
+cases.register = register
+
+local function WORD(start,attr,lastfont,n,count,where,first)
+ lastfont[n] = false
+ return replacer(first or start,uccodes)
+end
+
+local function word(start,attr,lastfont,n,count,where,first)
+ lastfont[n] = false
+ return replacer(first or start,lccodes)
+end
+
+local function Words(start,attr,lastfont,n,count,where,first) -- looks quite complex
+ if where == "post" then
+ return
+ end
+ if count == 1 and where ~= "post" then
+ replacer(first or start,uccodes)
+ return start, true
+ else
+ return start, true
+ end
+end
+
+local function Word(start,attr,lastfont,n,count,where,first)
+ blocked[attr] = true
+ return Words(start,attr,lastfont,n,count,where,first)
+end
+
+local function camel(start,attr,lastfont,n,count,where,first)
+ word(start,attr,lastfont,n,count,where,first)
+ Words(start,attr,lastfont,n,count,where,first)
+ return start, true
+end
+
+local function mixed(start,attr,lastfont,n,count,where,first)
+ if where == "post" then
+ return
+ end
+ local used = first or start
+ local char = getchar(used)
+ local dc = uccodes[char]
+ if not dc then
+ -- quit
+ elseif dc == char then
+ local lfa = lastfont[n]
+ if lfa then
+ local s = fontstate[attr]
+ setfont(used,lfa)
+ if s then
+ setscales(used, s[1], s[2], s[3])
+ end
+ end
+ else
+ replacer(used,uccodes)
+ end
+ return start, true
+end
+
+local function Capital(start,attr,lastfont,n,count,where,first,once) -- 3
+ local used = first or start
+ if count == 1 and where ~= "post" then
+ local lfa = lastfont[n]
+ if lfa then
+ local dc = uccodes[getchar(used)]
+ if dc then
+ local s = fontstate[attr]
+ setfont(used,lfa)
+ if s then
+ setscales(used, s[1], s[2], s[3])
+ end
+ end
+ end
+ end
+ local s, c = replacer(first or start,uccodes)
+ if once then
+ lastfont[n] = false -- here
+ end
+ return start, c
+end
+
+local function capital(start,attr,lastfont,n,where,count,first,count) -- 4
+ return Capital(start,attr,lastfont,n,where,count,first,true)
+end
+
+local function none(start,attr,lastfont,n,count,where,first)
+ return start, true
+end
+
+local function randomized(start,attr,lastfont,n,count,where,first)
+ local used = first or start
+ local char = getchar(used)
+ local font = getfont(used)
+ local tfm = fontchar[font]
+ lastfont[n] = false
+ local kind = categories[char]
+ if kind == "lu" then
+ while true do
+ local n = getrandom("capital lu",0x41,0x5A)
+ if tfm[n] then -- this also intercepts tables
+ setchar(used,n)
+ return start
+ end
+ end
+ elseif kind == "ll" then
+ while true do
+ local n = getrandom("capital ll",0x61,0x7A)
+ if tfm[n] then -- this also intercepts tables
+ setchar(used,n)
+ return start
+ end
+ end
+ end
+ return start
+end
+
+register(variables.WORD, WORD) -- 1
+register(variables.word, word) -- 2
+register(variables.Word, Word) -- 3
+register(variables.Words, Words) -- 4
+register(variables.capital,capital) -- 5
+register(variables.Capital,Capital) -- 6
+register(variables.none, none) -- 7 (dummy)
+register(variables.random, randomized) -- 8
+register(variables.mixed, mixed) -- 9
+register(variables.camel, camel) -- 10
+
+register(variables.cap, variables.capital) -- clone
+register(variables.Cap, variables.Capital) -- clone
+
+function cases.handler(head)
+ local _, start = find_attribute(head, a_cases)
+ if start then
+ local lastfont = { }
+ local lastattr = nil
+ local count = 0
+ local done = false
+ while start do -- while because start can jump ahead
+ local id = getid(start)
+ if id == glyph_code then
+ local attr = getattr(start,a_cases)
+ if attr and attr > 0 and not blocked[attr] then
+ if attr ~= lastattr then
+ lastattr = attr
+ count = 1
+ else
+ count = count + 1
+ end
+ local n, id, m = get(attr)
+ if lastfont[n] == nil then
+ lastfont[n] = id
+ end
+ local action = actions[n] -- map back to low number
+ if action then
+ local quit
+ start, quit = action(start,attr,lastfont,n,count)
+ if trace_casing then
+ report_casing("case trigger %a, instance %a, fontid %a, result %a",n,m,id,quit and "-" or "+")
+ end
+ elseif trace_casing then
+ report_casing("unknown case trigger %a",n)
+ end
+ done = true
+ end
+ elseif id == disc_code then
+ local attr = getattr(start,a_cases)
+ if attr and attr > 0 and not blocked[attr] then
+ if attr ~= lastattr then
+ lastattr = attr
+ count = 0
+ end
+ local n, id, m = get(attr)
+ if lastfont[n] == nil then
+ lastfont[n] = id
+ end
+ local action = actions[n] -- map back to low number
+ if action then
+ local pre, post, replace = getdisc(start)
+ if replace then
+ local cnt = count
+ for g in nextglyph, replace do
+ cnt = cnt + 1
+ getattr(g,a_cases)
+ local h, quit = action(start,attr,lastfont,n,cnt,"replace",g)
+ if quit then
+ break
+ end
+ end
+ end
+ if pre then
+ local cnt = count
+ for g in nextglyph, pre do
+ cnt = cnt + 1
+ getattr(g,a_cases)
+ local h, quit = action(start,attr,lastfont,n,cnt,"pre",g)
+ if quit then
+ break
+ end
+ end
+ end
+ if post then
+ local cnt = count
+ for g in nextglyph, post do
+ cnt = cnt + 1
+ getattr(g,a_cases)
+ local h, quit = action(start,attr,lastfont,n,cnt,"post",g)
+ if quit then
+ break
+ end
+ end
+ end
+ end
+ count = count + 1
+ done = true
+ end
+ else
+ if id == math_code then
+ start = end_of_math(start)
+ end
+ count = 0
+ end
+ if start then
+ start = getnext(start)
+ end
+ end
+ if done then
+ -- unset_attributes(a_cases,head)
+ end
+ end
+ return head
+end
+
+local enabled = false
+
+function cases.set(n,id)
+ if n == v_reset then
+ n = unsetvalue
+ else
+ n = registered[n] or tonumber(n)
+ if n then
+ if not enabled then
+ enableaction("processors","typesetters.cases.handler")
+ if trace_casing then
+ report_casing("enabling case handler")
+ end
+ enabled = true
+ end
+ n = set(n,id or currentfont())
+ else
+ n = unsetvalue
+ end
+ end
+ texsetattribute(a_cases,n)
+ -- return n -- bonus
+end
+
+-- interface
+
+interfaces.implement {
+ name = "setcharactercasing",
+ -- public = true,
+ -- protected = true,
+ actions = cases.set,
+ arguments = { "argument" }
+}
+
+-- An example of a special plug, see type-imp-punk for usage.
+
+cases.register("randomvariant", function(start)
+ local char, fnt = isglyph(start)
+ local data = fontchar[fnt][char]
+ if data then
+ local variants = data.variants
+ if variants then
+ local n = #variants
+ local i = getrandom("variant",1,n+1)
+ if i > n then
+ -- we keep the original
+ else
+ setchar(start,variants[i])
+ end
+ return start, true
+ end
+ end
+ return start, false
+end)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-cap.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-cap.mkxl
new file mode 100644
index 00000000000..bab69e130e7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-cap.mkxl
@@ -0,0 +1,271 @@
+%D \module
+%D [ file=typo-cap,
+%D version=2009.03.27, % code moved from core-spa.mkiv
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Capping,
+%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 Typesetting Macros / Caps}
+
+\unprotect
+
+%D Maybe we need a more clever system: either command or style mode etc. so
+%D that we can avoid the grouped mess in a simple style switch.
+
+% \registerctxluafile{typo-cap}{autosuffix,optimize}
+\registerctxluafile{typo-cap}{autosuffix}
+
+% \definesystemattribute[case][public] % already predefined
+
+%D \macros
+%D {setupcapitals}
+%D
+%D By default we use pseudo small caps in titles. This can be set up with:
+%D
+%D \showsetup{setupcapitals}
+
+\installcorenamespace{capitals}
+
+\installcommandhandler \??capitals {capitals} \??capitals
+
+%D Beware, these are not really defines (yet).
+
+\definecapitals[\v!WORD] % all upper
+\definecapitals[\v!capital] % one upper + font
+\definecapitals[\v!Capital] % some upper + font
+\definecapitals[\v!mixed] % UpperCase
+\definecapitals[\v!Word] % one upper + font
+\definecapitals[\v!Words] % some upper
+\definecapitals[\v!camel] % lowers first
+\definecapitals[\v!word][\c!style=] % nothing
+
+%D \macros
+%D {Word, Words, WORD, WORDS}
+%D
+%D This is probably not the right place to present the next set of macros.
+%D
+%D \starttyping
+%D \Word {far too many words}
+%D \Words{far too many words}
+%D \WORD {far too many words}
+%D \WORDS{far too many words}
+%D \stoptyping
+%D
+%D \typebuffer
+%D
+%D This calls result in:
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D \showsetup{Word}
+%D \showsetup{Words}
+%D \showsetup{WORD}
+%D \showsetup{WORDS}
+
+% test \WORD{test TEST \TeX} test
+% test \word{test TEST \TeX} test
+% test \Word{test TEST \TeX} test
+
+\permanent\protected\def\setcharactercasing[#1]{\clf_setcharactercasing{#1}} % can be public implementor
+
+\protected\def\typo_capitale_WORD {\clf_setcharactercasing\v!WORD }
+\protected\def\typo_capitale_word {\clf_setcharactercasing\v!word }
+\protected\def\typo_capitale_Word {\clf_setcharactercasing\v!Word }
+\protected\def\typo_capitale_Words{\clf_setcharactercasing\v!Words}
+\protected\def\typo_capitale_camel{\clf_setcharactercasing\v!camel}
+
+\pushoverloadmode
+
+\permanent\protected\def\WORD {\triggergroupedcommandcs\typo_capitale_WORD }
+\permanent\protected\def\word {\triggergroupedcommandcs\typo_capitale_word }
+\permanent\protected\def\Word {\triggergroupedcommandcs\typo_capitale_Word }
+\permanent\protected\def\Words{\triggergroupedcommandcs\typo_capitale_Words}
+\permanent\protected\def\camel{\triggergroupedcommandcs\typo_capitale_camel}
+
+\aliased\let\WORDS\WORD
+\aliased\let\words\word
+
+\popoverloadmode
+
+%D \macros
+%D {kap,KAP,Kap,Kaps,nokap,userealcaps,usepseudocaps}
+%D
+%D We already introduced \type {\cap} as way to capitalize words. This command comes
+%D in several versions:
+%D
+%D \startbuffer
+%D \cap {let's put on a \cap{cap}}
+%D \cap {let's put on a \nocap{cap}}
+%D \CAP {let's put on a \\{cap}}
+%D \Cap {let's put on a \\{cap}}
+%D \Caps{let's put on a cap}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Note the use of \type {\nocap}, \type {\\} and the nested \type {\cap}.
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+%D
+%D These macros show te main reason why we introduced the smaller \type {\tx} and
+%D \type {\txx}.
+%D
+%D \starttyping
+%D \cap\romannumerals{1995}
+%D \stoptyping
+%D
+%D This at first sight unusual capitilization is completely legal.
+%D
+%D \showsetup{smallcapped}
+%D \showsetup{notsmallcapped}
+%D \showsetup{CAPPED}
+%D \showsetup{SmallCapped}
+%D \showsetup{SmallCaps}
+%D
+%D The difference between pseudo and real caps is demonstrated below:
+%D
+%D \startbuffer
+%D \usepseudocaps \cap{Hans Hagen}
+%D \userealcaps \cap{Hans Hagen}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+%D
+%D The \type {\bgroup} trickery below is needed because of \type {\groupedcommand}.
+
+\newconditional\c_typo_capitals_pseudo
+
+\permanent\protected\def\usepseudocaps{\settrue \c_typo_capitals_pseudo}
+\permanent\protected\def\userealcaps {\setfalse\c_typo_capitals_pseudo}
+
+\usepseudocaps
+
+% we use char0 as placeholder for the larger font
+%
+% here we keep the \groupedcommand
+
+\def\typo_capitals_set_fake#1%
+ {\edef\currentcapitals{#1}%
+ \clf_setcharactercasing\currentcapitals
+ \usecapitalsstyleparameter\c!style}
+
+\def\typo_capitals_set_real#1%
+ {\edef\currentcapitals{#1}%
+ \sc
+ \clf_setcharactercasing\currentcapitals}
+
+\permanent\protected\def\pseudosmallcapped{\triggergroupedcommandcs\font_style_pseudosmallcapped}
+\permanent\protected\def\pseudoSmallcapped{\triggergroupedcommandcs\font_style_pseudoSmallcapped}
+\permanent\protected\def\pseudoSmallCapped{\triggergroupedcommandcs\font_style_pseudoSmallCapped}
+\permanent\protected\def\pseudoMixedCapped{\triggergroupedcommandcs\font_style_pseudoMixedCapped}
+
+\permanent\protected\def\realsmallcapped {\triggergroupedcommandcs\font_style_realsmallcapped}
+\permanent\protected\def\realSmallcapped {\triggergroupedcommandcs\font_style_realSmallcapped}
+\permanent\protected\def\realSmallCapped {\triggergroupedcommandcs\font_style_realSmallCapped}
+
+\permanent\protected\def\notsmallcapped {\triggergroupedcommandcs\font_style_notsmallcapped}
+
+\protected\def\font_style_pseudosmallcapped{\typo_capitals_set_fake\v!WORD } % all upper
+\protected\def\font_style_pseudoSmallcapped{\typo_capitals_set_fake\v!capital} % one upper + font
+\protected\def\font_style_pseudoSmallCapped{\typo_capitals_set_fake\v!Capital} % some upper + font
+\protected\def\font_style_pseudoMixedCapped{\typo_capitals_set_fake\v!mixed }
+
+\protected\def\font_style_realsmallcapped {\typo_capitals_set_real\v!WORD } % all lower
+\protected\def\font_style_realSmallcapped {\typo_capitals_set_real\v!Word } % one upper + font
+\protected\def\font_style_realSmallCapped {\typo_capitals_set_real\v!Words } % some upper
+
+\protected\def\font_style_notsmallcapped {\typo_capitals_set_fake\v!word }
+
+\protected\def\typo_capitals_smallcaps
+ {\ifconditional\c_typo_capitals_pseudo
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\permanent\protected\def\smallcapped{\typo_capitals_smallcaps\pseudosmallcapped\realsmallcapped}
+\permanent\protected\def\Smallcapped{\typo_capitals_smallcaps\pseudoSmallcapped\realSmallcapped}
+\permanent\protected\def\SmallCapped{\typo_capitals_smallcaps\pseudoSmallCapped\realSmallCapped}
+
+\permanent\protected\def\font_style_smallcapped{\typo_capitals_smallcaps\font_style_pseudosmallcapped\font_style_realsmallcapped}
+\permanent\protected\def\font_style_Smallcapped{\typo_capitals_smallcaps\font_style_pseudoSmallcapped\font_style_realSmallcapped}
+\permanent\protected\def\font_style_SmallCapped{\typo_capitals_smallcaps\font_style_pseudoSmallCapped\font_style_realSmallCapped}
+
+\permanent\protected\def\autocap{\ifmmode\expandafter\normalcap\else\expandafter\smallcapped\fi}
+
+\prependtoks
+ \enforced\let\normalcap\cap % mathmode cap
+\to \everydump
+
+\appendtoks
+ \enforced\let\cap\autocap
+\to \everydump
+
+\ifdefined\kap\else \aliased\let\kap\cap \fi % for old times sake
+
+\aliased\let\Caps\SmallCapped % for old times sake
+
+\aliased\let\mixedcaps\pseudoMixedCapped
+
+\aliased\let\normalsmallcapped\smallcapped
+\aliased\let\normalWORD \WORD
+\aliased\let\normalword \word
+
+\aliased\let\font_style_normalsmallcapped\font_style_smallcapped
+\aliased\let\font_style_normalWORD \WORD
+\aliased\let\font_style_normalword \word
+
+\appendtoks
+ \ifempty\currentcapitals
+ \doifelse{\directcapitalsparameter\c!title}\v!yes
+ {\definealternativestyle[\v!capital ][\font_style_normalsmallcapped][\font_style_normalsmallcapped]%
+ \definealternativestyle[\v!smallcaps][\setsmallcaps][\setsmallcaps]}
+ {\definealternativestyle[\v!capital ][\font_style_normalsmallcapped][\font_style_normalWORD]%
+ \definealternativestyle[\v!smallcaps][\setsmallcaps][\font_style_normalWORD]}%
+ \doifelse{\directcapitalsparameter\s!sc}\v!yes
+ \userealcaps
+ \usepseudocaps
+ \fi
+\to \everysetupcapitals
+
+\aliased\let\uppercased\normalWORD
+\aliased\let\lowercased\normalword
+
+\setupcapitals
+ [\c!title=\v!yes,
+ \c!style=\tx,
+ \s!sc=\v!no] % no \c!sc any longer
+
+\definefont
+ [MixedCaps]
+ [CurrentFont*default cp 1.2\exheight]
+
+\setupcapitals
+ [\v!mixed]
+ [\c!style=MixedCaps]
+
+% \definestartstop is not yet in available at core-spa time
+%
+% \startrandomized \input tufte \stoprandomized
+%
+% \definestartstop[randomized][\c!before=\dosetattribute{case}{8},\c!after=]
+
+% \protected\def\randomizetext{\groupedcommand{\c_attr_case\pluseight}{}}
+
+\permanent\protected\def\randomizetext{\triggergroupedcommand{\c_attr_case\pluseight}}
+
+\definestartstop[randomized][\c!before=\dosetattribute{case}{8},\c!after=]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-chr.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-chr.lmt
new file mode 100644
index 00000000000..bb11f54a64c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-chr.lmt
@@ -0,0 +1,291 @@
+if not modules then modules = { } end modules ['typo-chr'] = {
+ version = 1.001,
+ comment = "companion to typo-bld.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- A historic intermediate version can be found in the mkiv variant. The code
+-- can probably be improved but performance etc is not really an issue here.
+
+local insert, remove = table.insert, table.remove
+
+local context = context
+local ctx_doifelse = commands.doifelse
+
+local nodecodes = nodes.nodecodes
+local boundarycodes = nodes.boundarycodes
+local subtypes = nodes.subtypes
+
+local glyph_code = nodecodes.glyph
+local par_code = nodecodes.par
+local boundary_code = nodecodes.boundary
+
+local wordboundary_code = boundarycodes.word
+
+local texgetnest = tex.getnest -- to be used
+local texsetcount = tex.setcount
+
+local flush_node = nodes.flush_node
+local flush_list = nodes.flush_list
+
+local settexattribute = tex.setattribute
+local punctuation = characters.is_punctuation
+
+local variables = interfaces.variables
+local v_all = variables.all
+local v_reset = variables.reset
+
+local stack = { }
+
+local a_marked = attributes.numbers['marked']
+local lastmarked = 0
+local marked = {
+ [v_all] = 1,
+ [""] = 1,
+ [v_reset] = attributes.unsetvalue,
+}
+
+local function pickup()
+ local list = texgetnest()
+ if list then
+ local tail = list.tail
+ if tail and tail.id == glyph_code and punctuation[tail.char] then
+ local prev = tail.prev
+ list.tail = prev
+ if prev then
+ prev.next = nil
+ end
+ list.tail = prev
+ tail.prev = nil
+ return tail
+ end
+ end
+end
+
+local actions = {
+ remove = function(specification)
+ local n = pickup()
+ if n then
+ flush_node(n)
+ end
+ end,
+ push = function(specification)
+ local n = pickup()
+ if n then
+ insert(stack,n or false)
+ end
+ end,
+ pop = function(specification)
+ local n = remove(stack)
+ if n then
+ context(n)
+ end
+ end,
+}
+
+local function pickuppunctuation(specification)
+ local action = actions[specification.action or "remove"]
+ if action then
+ action(specification)
+ end
+end
+
+-- I played with nested marked content but it makes no sense and gives
+-- complex code. Also, it's never needed so why bother.
+
+local function pickup(head,tail,str)
+ local attr = marked[str]
+ local last = tail
+ if last[a_marked] == attr then
+ local first = last
+ while true do
+ local prev = first.prev
+ if prev and prev[a_marked] == attr then
+ if prev.id == par_code then -- and start_of_par(prev)
+ break
+ else
+ first = prev
+ end
+ else
+ break
+ end
+ end
+ return first, last
+ end
+end
+
+local function found(str)
+ local list = texgetnest()
+ if list then
+ local tail = list.tail
+ return tail and tail[a_marked] == marked[str]
+ end
+end
+
+local actions = {
+ remove = function(specification)
+ local list = texgetnest()
+ if list then
+ local head = list.head
+ local tail = list.tail
+ local first, last = pickup(head,tail,specification.mark)
+ if first then
+ if first == head then
+ list.head = nil
+ list.tail = nil
+ else
+ local prev = first.prev
+ list.tail = prev
+ prev.next = nil
+ end
+ flush_list(first)
+ end
+ end
+ end,
+}
+
+local function pickupmarkedcontent(specification)
+ local action = actions[specification.action or "remove"]
+ if action then
+ action(specification)
+ end
+end
+
+local function markcontent(str)
+ local currentmarked = marked[str or v_all]
+ if not currentmarked then
+ lastmarked = lastmarked + 1
+ currentmarked = lastmarked
+ marked[str] = currentmarked
+ end
+ settexattribute(a_marked,currentmarked)
+end
+
+interfaces.implement {
+ name = "pickuppunctuation",
+ actions = pickuppunctuation,
+ arguments = {
+ {
+ { "action" }
+ }
+ }
+}
+
+interfaces.implement {
+ name = "pickupmarkedcontent",
+ actions = pickupmarkedcontent,
+ arguments = {
+ {
+ { "action" },
+ { "mark" }
+ }
+ }
+}
+
+interfaces.implement {
+ name = "markcontent",
+ actions = markcontent,
+ arguments = "string",
+}
+
+interfaces.implement {
+ name = "doifelsemarkedcontent",
+ actions = function(str) ctx_doifelse(found(str)) end,
+ arguments = "string",
+}
+
+-- We just put these here.
+
+interfaces.implement {
+ name = "lastnodeidstring",
+ public = true,
+ actions = function()
+ local list = texgetnest() -- "top"
+ local okay = false
+ if list then
+ local tail = list.tail
+ if tail then
+ okay = nodecodes[tail.id]
+ end
+ end
+ context(okay or "")
+ end,
+}
+
+-- local t_lastnodeid = token.create("c_syst_last_node_id")
+--
+-- interfaces.implement {
+-- name = "lastnodeid",
+-- public = true,
+-- actions = function()
+-- ...
+-- tex.setcount("c_syst_last_node_id",okay)
+-- context.sprint(t_lastnodeid)
+-- end,
+-- }
+
+-- not needed in lmtx ...
+
+interfaces.implement {
+ name = "lastnodeid",
+ actions = function()
+ local list = texgetnest() -- "top"
+ local okay = -1
+ if list then
+ local tail = list.tail
+ if tail then
+ okay = tail.id
+ end
+ end
+ texsetcount("c_syst_last_node_id",okay)
+ end,
+}
+
+interfaces.implement {
+ name = "lastnodesubtypestring",
+ public = true,
+ actions = function()
+ local list = texgetnest() -- "top"
+ local okay = false
+ if list then
+ local tail = list.tail
+ if head then
+ okay = subtypes[tail.id][tail.subtype]
+ end
+ end
+ context(okay or "")
+ end,
+}
+
+local function lastnodeequals(id,subtype)
+ local list = texgetnest() -- "top"
+ local okay = false
+ if list then
+ local tail = list.tail
+ if tail then
+ local i = tail.id
+ okay = i == id or i == nodecodes[id]
+ if subtype then
+ local s = tail.subtype
+ okay = s == subtype or s == subtypes[i][subtype]
+ end
+ end
+ end
+ ctx_doifelse(okay)
+end
+
+interfaces.implement {
+ name = "lastnodeequals",
+ arguments = "2 strings",
+ actions = lastnodeequals,
+}
+
+interfaces.implement {
+ name = "atwordboundary",
+ actions = function()
+ lastnodeequals(boundary_code,wordboundary_code)
+ end,
+}
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-chr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-chr.mkxl
new file mode 100644
index 00000000000..1c459cfcf35
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-chr.mkxl
@@ -0,0 +1,87 @@
+%D \module
+%D [ file=typo-chr,
+%D version=2015.01.01, % or about that time
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Cleaning Up Mess,
+%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 Typesetting Macros / Characters}
+
+\unprotect
+
+%D This is a very experimental feature, mostly for Alan and me to play with in
+%D publication hell.
+%D
+%D \startbuffer
+%D before, after\par
+%D before,\removepunctuation after\par
+%D before\markcontent[gone]{\darkred gone}\removemarkedcontent[gone]after\par
+%D before\markcontent[kept]{\darkgreen kept}\removemarkedcontent[gone]after\par
+%D \markcontent[gone]{\darkred gone}\removemarkedcontent[gone]after\par
+%D \markcontent[kept]{\darkgreen kept}\removemarkedcontent[gone]after\par
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer\blank
+%D
+%D This feature is paragraph based and is only to be used for small snippets of text,
+%D for instance when combining bit and pieces where keeping a state is complex compared
+%D to cleaning up unwanted stuff.
+
+\registerctxluafile{typo-chr}{autosuffix}
+
+\definesystemattribute[marked][public]
+
+\permanent\protected\def\removepunctuation{\clf_pickuppunctuation action{remove}\relax}
+\permanent\protected\def\pushpunctuation {\clf_pickuppunctuation action{push}\relax}
+\permanent\protected\def\poppunctuation {\clf_pickuppunctuation action{pop}\relax}
+
+\permanent\tolerant\protected\def\markcontent[#1]#:#2%
+ {\dontleavehmode
+ \bgroup
+ \clf_markcontent{#1}%
+ \bgroup
+ #2% double grouping makes aftergroups work ok
+ \egroup
+ \egroup}
+
+\permanent\tolerant\protected\def\startmarkedcontent[#1]%
+ {\dontleavehmode
+ \bgroup
+ \clf_markcontent{#1}%
+ % double grouping makes aftergroups work ok
+ \bgroup}
+
+\permanent\protected\def\stopmarkedcontent
+ {\egroup
+ \egroup}
+
+\permanent\tolerant\protected\def\removemarkedcontent[#1]%
+ {\clf_pickupmarkedcontent action{remove}mark{#1}\relax}
+
+\permanent\protected\def\doifelsemarkedcontent#1%
+ {\clf_doifelsemarkedcontent{#1}}
+
+%D A few helpers (put here for convenience):
+%D
+%D \starttyping
+%D test test\doifelselastnode{boundary}{word}{YES}{NOP}test
+%D test test\wordboundary \doifelselastnode{boundary}{word}{YES}{NOP}test
+%D test test\wordboundary \doifelseatwordboundary{YES}{NOP}test
+%D test test \lastnodeidstring test
+%D test test\lastnodeidstring test
+%D test test\number\lastnodeid test
+%D \stoptyping
+
+\newcount\c_syst_last_node_id
+
+\permanent\protected\def\doifelselastnode {\clf_lastnodeequals} % can be public implementors
+\permanent\protected\def\doifelseatwordboundary{\clf_atwordboundary} % can be public implementors
+\permanent\protected\def\lastnodeid {\clf_lastnodeid\c_syst_last_node_id} % can be public implementors
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-cln.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-cln.mkxl
new file mode 100644
index 00000000000..84fc1d2353b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-cln.mkxl
@@ -0,0 +1,32 @@
+%D \module
+%D [ file=typo-cln,
+%D version=2011.02.11,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Cleaning,
+%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 Typesetting Macros / Cleaning}
+
+\unprotect
+
+\registerctxluafile{typo-cln}{}
+
+\definesystemattribute[cleaner][public]
+
+%D Currently there is no interface.
+%D
+%D 1: Autocap first character of a line
+
+\permanent\protected\def\setcharactercleaning[#1]{\clf_setcharactercleaning{#1}} % also accepts reset, todo: public implementor
+
+% \appendtoks
+% \c_attr_cleaner\attributeunsetvalue
+% \to \everyforgetall
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-del.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-del.mkxl
new file mode 100644
index 00000000000..8e17ea82b3f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-del.mkxl
@@ -0,0 +1,925 @@
+%D \module
+%D [ file=typo-del, % moved from core-mis,
+%D version=20110112,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Delimited Content,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: textstyle|color for inline \quotation etc
+
+\writestatus{loading}{ConTeXt Typesetting Macros / Delimited Content}
+
+\unprotect
+
+\ifdefined\dotagsetdelimitedsymbol \else \aliased\let\dotagsetdelimitedsymbol \gobbleoneargument \fi
+\ifdefined\dotagsetsubsentencesymbol \else \aliased\let\dotagsetsubsentencesymbol\gobbleoneargument \fi
+
+% THIS IS OBSOLETE:
+
+\installcorenamespace{hyphenmarksign} % let's not waste a setuphandler (yet)
+
+\permanent\permanent\protected\def\setuphyphenmark[#1]% sign=normal|wide
+ {\getdummyparameters[#1]%
+ \expandnamespaceparameter\??hyphenmarksign\dummyparameter\c!sign\v!normal}
+
+\setvalue{\??hyphenmarksign\v!normal}%
+ {\enforced\let\textmodehyphen\normalhyphen
+ \enforced\let\textmodehyphendiscretionary\normalhyphendiscretionary}
+
+\setvalue{\??hyphenmarksign\v!wide}%
+ {\enforced\let\textmodehyphen\composedhyphen
+ \enforced\let\textmodehyphendiscretionary\composedhyphendiscretionary}
+
+\setuphyphenmark[\c!sign=\v!wide]
+
+\definesymbol[\c!lefthyphen] [\languageparameter\c!lefthyphen]
+\definesymbol[\c!righthyphen] [\languageparameter\c!righthyphen]
+\definesymbol[\c!hyphen] [\languageparameter\c!hyphen]
+
+\permanent\protected\def\normalhyphen
+ {\hbox{\directsymbol\empty\c!hyphen}}
+
+\permanent\protected\def\composedhyphen
+ {\hbox{\directsymbol\empty\c!compoundhyphen}}
+
+\permanent\protected\def\normalhyphendiscretionary
+ {\discretionary
+ {\hbox{\directsymbol\empty\c!righthyphen}}
+ {\hbox{\directsymbol\empty\c!lefthyphen}}
+ {\hbox{\directsymbol\empty\c!hyphen}}}
+
+\permanent\protected\def\composedhyphendiscretionary
+ {\discretionary
+ {\hbox{\directsymbol\empty\c!rightcompoundhyphen}}
+ {\hbox{\directsymbol\empty\c!leftcompoundhyphen}}
+ {\hbox{\directsymbol\empty\c!compoundhyphen}}}
+
+\aliased\let\textmodehyphen \composedhyphen
+\aliased\let\textmodehyphendiscretionary\composedhyphendiscretionary
+
+\definesymbol[\c!leftcompoundhyphen] [\languageparameter\c!leftcompoundhyphen]
+\definesymbol[\c!rightcompoundhyphen] [\languageparameter\c!rightcompoundhyphen]
+\definesymbol[\c!compoundhyphen] [\languageparameter\c!compoundhyphen]
+
+% TILL HERE
+
+\setnewconstant\boundarycharactermode\plusone
+
+% old: skip symbol skip
+% new: bound skip symbol skip bound
+
+\permanent\protected\def\midboundarycharacter#1#2%
+ {\ifcase\boundarycharactermode
+ \or
+ \removeunwantedspaces
+ \wordboundary
+ \hskip\hspaceamount\currentusedlanguage{#2}%
+ \usedlanguageparameter#1%
+ \hskip\hspaceamount\currentusedlanguage{#2}%
+ \wordboundary
+ \ignorespaces
+ \or
+ \usedlanguageparameter#1%
+ \fi
+ \boundarycharactermode\plusone}
+
+% old: symbol nobreak skip
+% new: symbol nobreak skip wordboundary
+
+\permanent\protected\def\leftboundarycharacter#1#2%
+ {\ifcase\boundarycharactermode
+ \or
+ \usedlanguageparameter#1%
+ \nobreak
+ \hskip\hspaceamount\currentusedlanguage{#2}% why not a kern
+ \wordboundary
+ \or
+ \usedlanguageparameter#1%
+ \fi
+ \boundarycharactermode\plusone}
+
+% old: preword skip symbol
+% new: bound nobreak skip symbol
+
+\permanent\protected\def\rightboundarycharacter#1#2%
+ {\ifcase\boundarycharactermode
+ \or
+ \wordboundary
+ \nobreak
+ \hskip\hspaceamount\currentusedlanguage{#2}% why not a kern
+ \usedlanguageparameter#1%
+ \or
+ \usedlanguageparameter#1%
+ \fi
+ \boundarycharactermode\plusone}
+
+\definehspace [sentence] [\zeropoint]
+\definehspace [intersentence] [.250\emwidth]
+
+\definesymbol
+ [\c!midsentence]
+ [\midboundarycharacter\c!midsentence{sentence}]
+
+\definesymbol
+ [\c!leftsentence]
+ [\leftboundarycharacter\c!leftsentence{sentence}]
+
+\definesymbol
+ [\c!rightsentence]
+ [\rightboundarycharacter\c!rightsentence{sentence}]
+
+\definesymbol
+ [\c!leftsubsentence]
+ [\leftboundarycharacter\c!leftsubsentence{sentence}]
+
+\definesymbol
+ [\c!rightsubsentence]
+ [\rightboundarycharacter\c!rightsubsentence{sentence}]
+
+\newsignal\d_typo_subsentence_signal
+\newcount \c_typo_subsentence_nesting
+
+\mutable\let\beforesubsentence\donothing % maybe just a parameter
+\mutable\let\aftersubsentence \donothing % maybe just a parameter
+
+% todo: make this language option
+%
+% \def\beforesubsentence{\removeunwantedspaces}
+% \def\aftersubsentence {\ignorespaces}
+
+\newconditional\c_typo_subsentence_cleanup \settrue\c_typo_subsentence_cleanup
+
+\def\typo_subsentence_cleanup_start
+ {\ifconditional\c_typo_subsentence_cleanup
+ \expandafter\ignorespaces
+ \fi}
+
+\def\typo_subsentence_cleanup_stop
+ {\ifconditional\c_typo_subsentence_cleanup
+ \removeunwantedspaces
+ \fi}
+
+\permanent\protected\def\midsentence
+ {\dostarttagged\t!subsentencesymbol\empty
+ \dotagsetsubsentencesymbol\s!middle
+ \symbol[\c!midsentence]%
+ \dostoptagged}
+
+\permanent\protected\def\beginofsubsentence
+ {\beforesubsentence
+ \ifdim\lastkern=\d_typo_subsentence_signal
+ \unskip
+ \kern\hspaceamount\currentusedlanguage{intersentence}%
+ \fi
+ \global\advance\c_typo_subsentence_nesting\plusone
+ \ifnum\c_typo_subsentence_nesting=\plusone
+ \dontleavehmode
+ \fi
+ \dostarttagged\t!subsentence\empty % no chain
+ \dostarttagged\t!subsentencesymbol\empty
+ \dotagsetsubsentencesymbol\s!left
+ \symbol[\ifodd\c_typo_subsentence_nesting\c!leftsentence\else\c!leftsubsentence\fi]%
+ \dostoptagged
+ \dostarttagged\t!subsentencecontent\empty
+ \typo_subsentence_cleanup_start}
+
+\permanent\protected\def\endofsubsentence % relax prevents space gobbling
+ {\typo_subsentence_cleanup_stop
+ \dostoptagged
+ \dostarttagged\t!subsentencesymbol\empty
+ \dotagsetsubsentencesymbol\s!right
+ \symbol[\ifodd\c_typo_subsentence_nesting\c!rightsentence\else\c!rightsubsentence\fi]%
+ \dostoptagged
+ \dostoptagged
+ \global\advance\c_typo_subsentence_nesting\minusone
+ \unskip
+ \kern\d_typo_subsentence_signal\relax
+ \aftersubsentence}
+
+\permanent\protected\def\beginofsubsentencespacing % relax prevents space gobbling
+ {\kern\d_typo_subsentence_signal\relax}% \ignorespaces}
+
+\permanent\protected\def\endofsubsentencespacing
+ {\ifdim\lastkern=\d_typo_subsentence_signal
+ \unskip
+ \hskip\hspaceamount\currentusedlanguage{intersentence}%
+ % no good, actually language dependent:
+ % \ignorespaces
+ \else
+ \unskip
+ \fi}
+
+%D \startbuffer
+%D test |<|test |<|test|>| test|>| test \par
+%D test|<|test|<|test|>|test|>|test \par
+%D test |<||<|test|>||>| test \par
+%D test \directdiscretionary{<}test\directdiscretionary{>} test \par
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \getbuffer
+
+\permanent\protected\def\startsubsentence{\beginofsubsentence\wordboundary\beginofsubsentencespacing\wordboundary\typo_subsentence_cleanup_start}
+\permanent\protected\def\stopsubsentence {\typo_subsentence_cleanup_stop\wordboundary\endofsubsentencespacing\wordboundary\endofsubsentence}
+\permanent\protected\def\subsentence {\groupedcommandcs\startsubsentence\stopsubsentence}
+\permanent\protected\def\midsubsentence {\typo_subsentence_cleanup_start\wordboundary\midsentence\wordboundary\typo_subsentence_cleanup_stop}
+
+\definehspace [quotation] [\zeropoint]
+\definehspace [interquotation] [.125em]
+
+%definehspace [quote] [\zeropoint]
+%definehspace [speech] [\zeropoint]
+
+\definehspace [quote] [\hspaceamount\currentusedlanguage{quotation}]
+\definehspace [speech] [\hspaceamount\currentusedlanguage{quotation}]
+
+\definesymbol
+ [\c!leftquotation]
+ [\leftboundarycharacter\c!leftquotation{quotation}]
+
+\definesymbol
+ [\c!rightquotation]
+ [\rightboundarycharacter\c!rightquotation{quotation}]
+
+\definesymbol
+ [\c!nextleftquotation]
+ [\rightboundarycharacter\c!leftquotation{quotation}]
+
+\definesymbol
+ [\c!nextrightquotation]
+ [\leftboundarycharacter\c!rightquotation{quotation}]
+
+\definesymbol
+ [\c!leftquote]
+ [\leftboundarycharacter\c!leftquote{quote}]
+
+\definesymbol
+ [\c!rightquote]
+ [\rightboundarycharacter\c!rightquote{quote}]
+
+\definesymbol
+ [\c!leftspeech]
+ [\leftboundarycharacter\c!leftspeech{speech}]
+
+\definesymbol
+ [\c!rightspeech]
+ [\rightboundarycharacter\c!rightspeech{speech}]
+
+\definesymbol
+ [\c!middlespeech]
+ [\leftboundarycharacter\c!middlespeech{speech}]
+
+\appendtoks
+ \enforced\permanent\def\quotation#1{"#1"}%
+ \enforced\permanent\def\quote #1{'#1'}%
+\to \everysimplifycommands
+
+%D The next features was so desperately needed by Giuseppe Bilotta that he made a
+%D module for it. Since this is a typical example of core functionality, I decided
+%D to extend the low level quotation macros in such a way that a speech feature
+%D could be build on top of it. The speech opening and closing symbols are defined
+%D per language. Italian is an example of a language that has them set.
+
+\newsignal\d_typo_delimited_signal
+
+\mutable\let\currentdelimitedtext \s!unknown
+\mutable\let\currentparentdelimitedtext\currentdelimitedtext
+
+\installglobalmacrostack\currentdelimitedtext
+
+\mutable\let\delimitedtextlevel\!!zerocount
+
+\permanent\def\c_typo_delimited_nesting{\csname\??delimitedtextlevel\currentparentdelimitedtext\endcsname}
+
+% the \setlanguageparameter macro sets but we are ungrouped .. only used here
+%
+% \currentusedlanguage
+% \usedlanguageparameter
+
+%D The optional argument can be a language, a narrower spec, or a outer:inner language
+%D specification.
+%D
+%D \starttabulate
+%D \NC [en] \NC {\tttf en} \quotation[en] {{\tttf <en=\currentlanguage>} something french} \NC \NR
+%D \NC [fr] \NC {\tttf en} \quotation[fr] {{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [fr:] \NC {\tttf fr} \quotation[fr:] {{\tttf <en=\currentlanguage>} something french} \NC \NR
+%D \NC [:fr] \NC {\tttf en} \quotation[:fr] {{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [fr:fr] \NC {\tttf fr} \quotation[fr:fr]{{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [en:fr] \NC {\tttf en} \quotation[en:fr]{{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [fr:en] \NC {\tttf fr} \quotation[fr:en]{{\tttf <en=\currentlanguage>} something french} \NC \NR
+%D \stoptabulate
+
+\mutable\let\currentdelimitedlanguage\empty
+\mutable\let\innerdelimitedlanguage \empty
+\mutable\let\outerdelimitedlanguage \empty
+
+\installglobalmacrostack\currentdelimitedlanguage
+
+\def\typo_delimited_set_language_nop
+ {\setusedlanguage{\delimitedtextparameter\c!language}}
+
+\def\typo_delimited_set_language_yes
+ {\doiflanguageelse\m_delimited_argument
+ \typo_delimited_set_language_yes_a
+ {\doifelseinstring:\m_delimited_argument
+ \typo_delimited_set_language_yes_b
+ \typo_delimited_set_language_nop}}
+
+\def\typo_delimited_set_language_yes_b
+ {\splitatcolon\m_delimited_argument\outerdelimitedlanguage\innerdelimitedlanguage
+ \ifempty\outerdelimitedlanguage
+ \typo_delimited_set_language_nop
+ \else
+ \doiflanguageelse\outerdelimitedlanguage
+ {\setusedlanguage\outerdelimitedlanguage}%
+ \typo_delimited_set_language_nop
+ \fi
+ \ifempty\innerdelimitedlanguage\else
+ \doiflanguageelse\innerdelimitedlanguage
+ {\let\currentdelimitedlanguage\innerdelimitedlanguage}%
+ \donothing
+ \fi
+ \let\m_delimited_argument\empty}
+
+\def\typo_delimited_set_language_yes_a
+ {\let\currentdelimitedlanguage\m_delimited_argument
+ \let\m_delimited_argument\empty}
+
+\def\typo_delimited_push#1#2%
+ {\push_macro_currentdelimitedtext % can we combine these two
+ \push_macro_currentdelimitedlanguage % the language used for hyphenation
+ \edef\currentdelimitedtext{#1}%
+ \edef\m_delimited_argument{#2}%
+ \ifempty\m_delimited_argument
+ \typo_delimited_set_language_nop
+ \else
+ \typo_delimited_set_language_yes
+ \fi
+ \let\currentparentdelimitedtext\currentdelimitedtext
+ \global\advance\c_typo_delimited_nesting\plusone
+ \edef\delimitedtextlevel{\number\c_typo_delimited_nesting}%
+ \normalexpanded{\chaintocurrentdelimitedtext{\currentparentdelimitedtext:\delimitedtextlevel}}%
+ \edef\currentdelimitedtext{\currentparentdelimitedtext:\delimitedtextlevel}}
+
+\def\typo_delimited_pop
+ {\global\advance\c_typo_delimited_nesting\minusone
+ \pop_macro_currentdelimitedlanguage
+ \pop_macro_currentdelimitedtext}
+
+\installcorenamespace{delimitedtext}
+\installcorenamespace{delimitedtextlevel}
+
+\installcommandhandler \??delimitedtext {delimitedtext} \??delimitedtext
+
+\appendtoks
+ \expandafter\newcount\csname\??delimitedtextlevel\currentdelimitedtext\endcsname
+ \frozen\instance\setuevalue{\currentdelimitedtext }{\delimitedtext[\currentdelimitedtext]}%
+ \frozen\instance\setuevalue{\e!start\currentdelimitedtext}{\startdelimitedtext[\currentdelimitedtext]}%
+ \frozen\instance\setuevalue{\e!stop \currentdelimitedtext}{\stopdelimitedtext}%
+\to \everydefinedelimitedtext
+
+\setupdelimitedtext
+ [\c!location=\v!margin, % \v!text \v!paragraph
+ \c!spacebefore=,
+ \c!spaceafter=\delimitedtextparameter\c!spacebefore,
+ \c!style=,
+ \c!color=,
+ \c!leftmargin=\zeropoint,
+ \c!rightmargin=\delimitedtextparameter\c!leftmargin,
+ \c!indentnext=\v!yes,
+ \c!before=,
+ \c!after=,
+ \c!left=,
+ \c!right=,
+ %\c!level=0,
+ \c!method=,
+ %\c!language=\v!local,
+ \c!repeat=\v!no]
+
+\def\typo_delimited_repeat_indeed
+ {\relax\ifcase\delimitedtextlevel\else
+ \typo_delimited_handle_middle\c!middle
+ \fi}
+
+\let\typo_delimited_repeat\relax
+
+\permanent\tolerant\protected\def\startdelimitedtext[#1]#*[#2]%
+ {\begingroup
+ \typo_delimited_push{#1}{#2}%
+ \dostarttaggedchained\t!delimitedblock\currentdelimitedtext\??delimitedtext
+ \edef\p_delimited_method{\delimitedtextparameter\c!method}%
+ \ifx\p_delimited_method\v!font
+ \expandafter\typo_delimited_start_font
+ \else
+ \expandafter\typo_delimited_start_other
+ \fi}
+
+\let\typo_delimited_stop\relax % hooks into \everypar
+
+\def\typo_delimited_start_font
+ {\let\typo_delimited_stop\typo_delimitedtexts_finish_font
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!left
+ \delimitedtextparameter\c!left
+ \dostoptagged
+ \ignorespaces}
+
+\newconditional\c_typo_delimited_repeating
+
+\def\typo_delimited_start_other
+ {\edef\p_delimited_repeat{\delimitedtextparameter\c!repeat}%
+ \ifx\p_delimited_repeat\v!yes
+ \let\typo_delimited_repeat\typo_delimited_repeat_indeed
+ \else
+ \let\typo_delimited_repeat\relax
+ \fi
+ \setfalse\c_typo_delimited_repeating
+ \edef\p_delimited_location{\delimitedtextparameter\c!location}%
+ \ifx\p_delimited_location\v!paragraph
+ \expandafter\typo_delimited_start_par
+ \orelse\ifx\p_delimited_location\v!margin
+ \expandafter\typo_delimited_start_par
+ \else
+ \expandafter\typo_delimited_start_txt
+ \fi}
+
+\def\typo_delimitedtexts_finish_font
+ {\removeunwantedspaces % again ?
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!right
+ \delimitedtextparameter\c!right
+ \dostoptagged}
+
+\def\typo_delimited_show_language_indeed#1#2%
+ {\begingroup
+ \infofont
+ \setbox\scratchbox\hpack{\lower\strutht\hbox to \zeropoint{\darkred#1\currentlanguage:\currentdelimitedlanguage#2}}%
+ \vsmashbox\scratchbox
+ \box\scratchbox
+ \endgroup}
+
+\let\typo_delimited_show_language\gobbletwoarguments
+
+\installtextracker{delimited.language}
+ {\let\typo_delimited_show_language\typo_delimited_show_language_indeed}
+ {\let\typo_delimited_show_language\gobbletwoarguments}
+
+\def\typo_delimited_start_content
+ {\dostarttagged\t!delimitedcontent\empty
+ \begingroup
+ \douselanguageparameter\currentdelimitedlanguage
+ \typo_delimited_show_language<\hss
+ \ignorespaces}
+
+\def\typo_delimited_stop_content
+ {\removeunwantedspaces
+ \removelastskip % redundant
+ \typo_delimited_show_language\hss<%
+ \endgroup
+ \dostoptagged}
+
+\tolerant\def\typo_delimited_start_par[#1]%
+ {\let\typo_delimited_stop\typo_delimited_stop_par
+ \edef\p_delimited_spacebefore{\delimitedtextparameter\c!spacebefore}%
+ \ifempty\p_delimited_spacebefore \else
+ \blank[\p_delimited_spacebefore]%
+ \fi
+ \delimitedtextparameter\c!before
+ \edef\m_delimited_argument{#1}%
+ \ifempty\m_delimited_argument
+ \let\m_delimited_argument\m_delimited_argument
+ \fi
+ \ifempty\m_delimited_argument
+ \endgraf
+ \doadaptleftskip {\delimitedtextparameter\c!leftmargin}%
+ \doadaptrightskip{\delimitedtextparameter\c!rightmargin}%
+ \let\typo_delimited_stop_par_indeed\endgraf
+ \else % backward compatible direct directive
+ \startnarrower[\m_delimited_argument]%
+ \let\typo_delimited_stop_par_indeed\stopnarrower
+ \fi
+ % so far
+ \push_macro_checkindentation
+ \useindentingparameter\delimitedtextparameter
+ %
+ \begingroup
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ %
+ \begingroup
+ \edef\p_delimited_left {\delimitedtextparameter{\c!left}}%
+ \edef\p_delimited_right {\delimitedtextparameter{\c!right}}%
+ \edef\p_delimited_nextleft {\delimitedtextparameter{\c!nextleft}}%
+ \edef\p_delimited_nextright{\delimitedtextparameter{\c!nextright}}%
+ %
+ \leftdelimitedtextmark
+ %
+ \setnextleftdelimitedtextmark
+ \setnextrightdelimitedtextmark
+ %
+ \typo_delimited_start_content}
+
+\let\typo_delimited_stop_par_indeed\endgraf
+
+\def\typo_delimited_stop_par
+ {\typo_delimited_stop_content
+ \rightdelimitedtextmark
+ \rightdelimitedtextmark
+ \carryoverpar\endgroup
+ \endgraf
+ \endgroup
+ \pop_macro_checkindentation
+ \typo_delimited_stop_par_indeed
+ \delimitedtextparameter\c!after
+ \edef\p_delimited_spaceafter{\delimitedtextparameter\c!spaceafter}%
+ \ifempty\p_delimited_spaceafter \else
+ \blank[\p_delimited_spaceafter]%
+ \fi
+ \useindentnextparameter\delimitedtextparameter
+ \aftergroup\dorechecknextindentation}% AM: This was missing!
+
+\def\typo_delimited_start_txt
+ {\let\typo_delimited_stop\typo_delimited_stop_txt
+ \begingroup
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \typo_delimited_handle_left\c!left
+ \typo_delimited_start_content}
+
+\def\typo_delimited_stop_txt
+ {\typo_delimited_stop_content
+ \typo_delimited_handle_right\c!right
+ \endgroup}
+
+\permanent\protected\def\stopdelimitedtext
+ {\typo_delimited_stop
+ \dostoptagged
+ \typo_delimited_pop
+ \endgroup}
+
+\permanent\tolerant\protected\def\delimitedtext[#1]#*[#2]%
+ {\dontleavehmode % following ones can be omited
+ \typo_delimited_push{#1}{#2}%
+ \edef\p_delimited_method{\delimitedtextparameter\c!method}%
+ \ifx\p_delimited_method\v!font
+ \expandafter\typo_delimited_fontdriven
+ \else
+ \expandafter\typo_delimited_other
+ \fi}
+
+\def\typo_delimited_other
+ {\edef\p_delimited_location{\delimitedtextparameter\c!location}%
+ \ifx\p_delimited_location\v!paragraph
+ \expandafter\typo_delimited_par
+ \orelse\ifx\p_delimited_location\v!margin
+ \expandafter\typo_delimited_par
+ \else
+ \expandafter\typo_delimited_txt
+ \fi}
+
+% shortcuts
+
+\permanent\protected\def\startdelimited{\startdelimitedtext}
+\permanent\protected\def\stopdelimited {\stopdelimitedtext} % no let, dynamically assigned
+\permanent \def\delimited {\delimitedtext}
+
+% todo: \dostarttagged\t!nothing\empty % for left/right boxes
+
+%D We have 4 different location and symbol handlers (two pairs):
+%D
+%D \starttyping
+%D \input tufte \startquotation \input tufte \stopquotation
+%D
+%D \setupdelimitedtext
+%D [quotation]
+%D [nextleft=right,
+%D nextright=left]
+%D
+%D \input tufte \startquotation \input tufte \stopquotation
+%D
+%D \setupdelimitedtext
+%D [quotation]
+%D [nextleft={\symbol[nextleftquotation]},
+%D nextright={\symbol[nextrightquotation]}]
+%D
+%D \input tufte \startquotation \input tufte \stopquotation
+%D \stoptyping
+
+\permanent\protected\def\setnextleftdelimitedtextmark
+ {\ifempty\p_delimited_nextleft
+ % nothing
+ \orelse\ifx\p_delimited_nextleft\v!left
+ \typo_delimited_nextleft_symbol\p_delimited_left
+ \orelse\ifx\p_delimited_nextleft\v!right
+ \typo_delimited_nextleft_symbol\p_delimited_right
+ \else
+ \typo_delimited_nextleft_symbol\p_delimited_nextleft
+ \fi}
+
+\permanent\protected\def\setnextrightdelimitedtextmark
+ {\ifempty\p_delimited_nextright
+ % nothing
+ \orelse\ifx\p_delimited_nextright\v!right
+ \typo_delimited_nextright_symbol\p_delimited_right
+ \orelse\ifx\p_delimited_nextright\v!left
+ \typo_delimited_nextright_symbol\p_delimited_left
+ \else
+ \typo_delimited_nextright_symbol\p_delimited_nextright
+ \fi}
+
+\permanent\protected\def\leftdelimitedtextmark
+ {\ifempty\p_delimited_left
+ % nothing
+ \else
+ \typo_delimited_left_symbol\p_delimited_left
+ \fi}
+
+\permanent\protected\def\rightdelimitedtextmark
+ {\ifempty\p_delimited_right
+ % nothing
+ \else
+ \typo_delimited_right_symbol\p_delimited_right
+ \fi}
+
+\def\typo_delimited_left_symbol#1%
+ {\dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!left
+ \setbox\scratchbox\hbox{\usedelimitedtextstyleandcolor\c!symstyle\c!symcolor#1}%
+ \dontleavehmode
+ \edef\p_delimited_margin{\delimitedtextparameter\c!location}%
+ \ifx\p_delimited_margin\v!margin
+ \hskip-\wd\scratchbox
+ \fi
+ \box\scratchbox
+ \dostoptagged}
+
+\def\typo_delimited_right_symbol#1%
+ {\dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!right
+ \hsmash{\usedelimitedtextstyleandcolor\c!symstyle\c!symcolor#1}%
+ \dostoptagged}
+
+\def\typo_delimited_nextleft_symbol#1%
+ {\let\typo_delimited_reset_next_symbol\typo_delimited_reset_next_symbol_indeed
+ \localleftbox\bgroup
+ \enforced\swapmacros\leftboundarycharacter\rightboundarycharacter
+ \boundarycharactermode\plusone
+ \typo_delimited_left_symbol#1%
+ \egroup}
+
+\def\typo_delimited_nextright_symbol#1%
+ {\let\typo_delimited_reset_next_symbol\typo_delimited_reset_next_symbol_indeed
+ \localrightbox\bgroup
+ \enforced\swapmacros\leftboundarycharacter\rightboundarycharacter
+ \boundarycharactermode\plusone
+ \typo_delimited_right_symbol#1%
+ \egroup}
+
+\protected\def\typo_delimited_reset_next_symbol_indeed
+ {\localleftbox {}%
+ \localrightbox{}}%
+
+\let\typo_delimited_reset_next_symbol\relax
+
+\appendtoks
+ \typo_delimited_reset_next_symbol
+\to \everyforgetall
+
+% \starttext
+% \hyphenatedword{groepsvrijstellingsverordeningen}\par
+% \hyphenatedword{\quote{groepsvrijstellingsverordeningen}}\par
+% \dorecurse{100}{\hskip300pt\hskip\recurselevel pt test \quote{xxx xxxx}.\par}
+% \page \setuppapersize[A5][A4]
+% \quotation {overly beautiful pusillanimous sesquipedalian
+% longwinded} test test test test test test test test test test test
+% test test test test test test test test test test test test test
+% test test test test test test test test test test test test test
+% test test test test test test test test test test test test test
+% test test test
+% \stoptext
+
+% We have no real test case for this and it's broken already for a while,
+% even in \MKII. Maybe we should to this in \LUA. Only Italian has the
+% middlespeech parameter set.
+
+\def\typo_delimited_handle_middle#1% special case
+ {\ifconditional\c_typo_delimited_repeating
+ \begingroup
+ \usedelimitedtextstyleandcolor\c!symstyle\c!symcolor
+ \setbox\scratchbox\hbox{\delimitedtextparameter#1}%
+ \ifdim\wd\scratchbox>\zeropoint
+ \ifdim\lastkern=\d_typo_delimited_signal
+ \unkern
+ \hskip\hspaceamount\currentusedlanguage{interquotation}%
+ \else % maybe an option:
+ %\edef\p_delimited_margin{\delimitedtextparameter\c!location}%
+ %\ifx\p_delimited_margin\v!margin
+ % \hskip-\wd\scratchbox
+ %\fi
+ \fi
+ \strut % new, needed below
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!middle
+ \delimitedtextparameter#1% unhbox\scratchbox
+ \dostoptagged
+ % \penalty\plustenthousand % else overfull boxes, but that's better than dangling periods
+ \kern\d_typo_delimited_signal % +- \prewordbreak
+ \fi
+ \endgroup
+ \else
+ \settrue\c_typo_delimited_repeating
+ \fi}
+
+\def\typo_delimited_handle_left#1%
+ {\begingroup
+ \usedelimitedtextstyleandcolor\c!symstyle\c!symcolor
+ \setbox\scratchbox\hbox{\delimitedtextparameter#1}%
+ \ifdim\wd\scratchbox>\zeropoint
+ \ifdim\lastkern=\d_typo_delimited_signal
+ \unkern
+ \hskip\hspaceamount\currentusedlanguage{interquotation}%
+ \orelse\ifdim\lastskip=\d_typo_delimited_signal
+ \unskip
+ \hskip\hspaceamount\currentusedlanguage{interquotation}%
+ \fi
+ % \strut % new, needed below
+ % \ifhmode % else funny pagebeaks
+ % \penalty\plustenthousand
+ % \hskip\zeropoint % == \prewordbreak
+ % \fi
+ \strut % new, needed below
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!left
+ \delimitedtextparameter#1% unhbox\scratchbox
+ \dostoptagged
+ \penalty\plustenthousand % new per 2013-03-09 WS mailing list
+ \hskip\d_typo_delimited_signal % +- \prewordbreak
+ \fi
+ \endgroup}
+
+\def\typo_delimited_handle_right#1%
+ {\begingroup
+ \usedelimitedtextstyleandcolor\c!symstyle\c!symcolor
+ \setbox\scratchbox\hbox{\delimitedtextparameter#1}%
+ \ifdim\wd\scratchbox>\zeropoint
+ \ifdim\lastkern=\d_typo_delimited_signal
+ \unkern
+ \penalty\plustenthousand
+ \hskip\hspaceamount\currentusedlanguage{interquotation}%
+ \orelse\ifdim\lastskip=\d_typo_delimited_signal
+ \unskip
+ \penalty\plustenthousand
+ \hskip\hspaceamount\currentusedlanguage{interquotation}%
+ \fi
+ \ifhmode % else funny pagebeaks
+ \penalty\plustenthousand
+ \hskip\zeropoint % == \prewordbreak
+ \fi
+ \strut % new, needed below
+ \dostarttagged\t!delimitedsymbol\empty
+ \dotagsetdelimitedsymbol\s!right
+ \delimitedtextparameter#1% unhbox\scratchbox
+ \dostoptagged
+ \kern\d_typo_delimited_signal % +- \prewordbreak
+ \fi
+ \endgroup}
+
+\protected\def\typo_delimited_par
+ {\groupedcommand
+ {\dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext % block?
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \typo_delimited_handle_left\c!left
+ \typo_delimited_start_content}
+ {\typo_delimited_stop_content
+ \typo_delimited_handle_right\c!right
+ \removelastskip % hm
+ \dostoptagged
+ \typo_delimited_pop}}
+
+\protected\def\typo_delimited_txt
+ {\edef\p_left_right{\delimitedtextparameter\c!left\delimitedtextparameter\c!right}%
+ \ifempty\p_left_right
+ \expandafter\typo_delimited_attributed
+ \else
+ \expandafter\typo_delimited_quoted
+ \fi}
+
+\def\typo_delimited_quoted
+ {\dontleavehmode
+ \begingroup
+ \dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
+ \typo_delimited_handle_left\c!left
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \typo_delimited_start_content
+ \bgroup
+ \aftergroup\typo_delimited_quoted_e
+ \let\next=}
+
+\def\typo_delimited_quoted_e
+ {\typo_delimited_stop_content
+ \typo_delimited_handle_right\c!right
+ \removelastskip % ?
+ \dostoptagged
+ \typo_delimited_pop
+ \endgroup}
+
+\def\typo_delimited_attributed
+ {\dontleavehmode
+ \begingroup
+ \dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \typo_delimited_start_content
+ \bgroup
+ \aftergroup\typo_delimited_attributed_e
+ \let\next=}
+
+\def\typo_delimited_attributed_e
+ {\typo_delimited_stop_content
+ \dostoptagged
+ \typo_delimited_pop
+ \endgroup}
+
+\def\typo_delimited_fontdriven
+ {\dontleavehmode
+ \begingroup
+ \dostarttaggedchained\t!delimited\currentdelimitedtext\??delimitedtext
+ \usedlanguageparameter{\c!left\currentparentdelimitedtext}% was: \currentdelimitedtext
+ \usedelimitedtextstyleandcolor\c!style\c!color
+ \typo_delimited_start_content
+ \bgroup
+ \aftergroup\typo_delimited_fontdriven_e
+ \let\next=}
+
+\def\typo_delimited_fontdriven_e
+ {\typo_delimited_stop_content
+ \usedlanguageparameter{\c!right\currentparentdelimitedtext}% was: \currentdelimitedtext
+ \dostoptagged
+ \typo_delimited_pop
+ \endgroup}
+
+% testcase for nesting:
+%
+% \quotation{... \quotation{...} ...}
+% \startquotation ... \startquotation... \quotation{...} \stopquotation\space ...\stopquotation
+% \setupdelimitedtext[quotation][1][left=(,right=)]
+% \setupdelimitedtext[quotation][2][left={[},right={]}]
+% \setupdelimitedtext[quotation][3][left=\{,right=\}]
+% \quotation{... \quotation{...} ...}
+% \startquotation ... \startquotation... \quotation{...} \stopquotation\space ...\stopquotation
+
+\definedelimitedtext
+ [\v!quotation]
+ [\c!left={\symbol[\c!leftquotation]},
+ \c!right={\symbol[\c!rightquotation]},
+ \c!leftmargin=\v!standard]
+
+\definedelimitedtext
+ [\v!quote][\v!quotation]
+
+\setupdelimitedtext
+ [\v!quote]
+ [\c!location=\v!text,
+ \c!left={\symbol[\c!leftquote]},
+ \c!right={\symbol[\c!rightquote]}]
+
+\definedelimitedtext
+ [\v!blockquote][\v!quotation]
+
+\setupdelimitedtext
+ [\v!blockquote]
+ [\c!left=,
+ \c!right=]
+
+\definedelimitedtext
+ [\v!speech][\v!quotation]
+
+\setupdelimitedtext
+ [\v!speech]
+ [\c!repeat=\v!yes,
+ \c!left={\symbol[\c!leftspeech]},
+ \c!middle={\symbol[\c!middlespeech]},
+ \c!right={\symbol[\c!rightspeech]}]
+
+\definedelimitedtext
+ [\v!aside]
+ [\c!left={\symbol[\c!leftsentence]},
+ \c!right={\symbol[\c!rightsentence]}]
+
+% how do we call an tight quote
+%
+% \definedelimitedtext
+% [\v!quotation][\v!quotation]
+%
+% \setupdelimitedtext
+% [\v!quotation]
+% [\c!indentnext=\v!no,
+% \c!spacebefore=\v!nowhite]
+
+\permanent\protected\def\setupquotation{\setupdelimitedtext[\v!quotation]}
+\permanent\protected\def\setupquote {\setupdelimitedtext[\v!quote]}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-dig.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-dig.lmt
new file mode 100644
index 00000000000..7f6663db98a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-dig.lmt
@@ -0,0 +1,181 @@
+if not modules then modules = { } end modules ['typo-dig'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to typo-dig.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- we might consider doing this after the otf pass because now osf do not work
+-- out well in node mode.
+
+local next, type, tonumber = next, type, tonumber
+local format, insert = string.format, table.insert
+local round, div = math.round, math.div
+
+local trace_digits = false trackers.register("typesetters.digits", function(v) trace_digits = v end)
+
+local report_digits = logs.reporter("typesetting","digits")
+
+local nodes, node = nodes, node
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getwidth = nuts.getwidth
+local isglyph = nuts.isglyph
+local getattr = nuts.getattr
+
+local setlink = nuts.setlink
+local setnext = nuts.setnext
+local setprev = nuts.setprev
+
+local hpack_node = nuts.hpack
+local traverse_id = nuts.traverse_id
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local find_attribute = nuts.find_attribute
+local unset_attributes = nuts.unset_attributes
+
+local texsetattribute = tex.setattribute
+local unsetvalue = attributes.unsetvalue
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+
+local nodepool = nuts.pool
+local enableaction = nodes.tasks.enableaction
+
+local new_glue = nodepool.glue
+
+local fonthashes = fonts.hashes
+local chardata = fonthashes.characters
+
+local v_reset = interfaces.variables.reset
+
+local charbase = characters.data
+local getdigitwidth = fonts.helpers.getdigitwidth
+
+typesetters = typesetters or { }
+local typesetters = typesetters
+
+typesetters.digits = typesetters.digits or { }
+local digits = typesetters.digits
+
+digits.actions = { }
+local actions = digits.actions
+
+local a_digits = attributes.private("digits")
+
+-- at some point we can manipulate the glyph node so then i need
+-- to rewrite this then
+
+function nodes.aligned(head,start,stop,width,how)
+ if how == "flushright" or how == "middle" then
+ head, start = insert_node_before(head,start,new_glue(0,65536,65536))
+ end
+ if how == "flushleft" or how == "middle" then
+ head, stop = insert_node_after(head,stop,new_glue(0,65536,65536))
+ end
+ local prv = getprev(start)
+ local nxt = getnext(stop)
+ setprev(start)
+ setnext(stop)
+ local packed = hpack_node(start,width,"exactly") -- no directional mess here, just lr
+ if prv then
+ setlink(prv,packed)
+ end
+ if nxt then
+ setlink(packed,nxt)
+ end
+ if getprev(packed) then
+ return head, packed
+ else
+ return packed, packed
+ end
+end
+
+actions[1] = function(head,start,attr)
+ local char, font = isglyph(start)
+ local unic = chardata[font][char].unicode or char
+ if charbase[unic].category == "nd" then -- ignore unic tables
+ local oldwidth = getwidth(start)
+ local newwidth = getdigitwidth(font)
+ if newwidth ~= oldwidth then
+ if trace_digits then
+ report_digits("digit trigger %a, instance %a, char %C, unicode %U, delta %s",
+ attr%100,div(attr,100),char,unic,newwidth-oldwidth)
+ end
+ head, start = nodes.aligned(head,start,start,newwidth,"middle")
+ return head, start
+ end
+ end
+ return head, start
+end
+
+function digits.handler(head)
+ local _, start = find_attribute(head, a_digits)
+ if start then
+ local current = head
+ while current do
+ if getid(current) == glyph_code then
+ local attr = getattr(current,a_digits)
+ if attr and attr > 0 then
+ local action = actions[attr%100] -- map back to low number
+ if action then
+ head, current = action(head,current,attr)
+ elseif trace_digits then
+ report_digits("unknown digit trigger %a",attr)
+ end
+ done = true
+ end
+ end
+ if current then
+ current = getnext(current)
+ end
+ end
+ if done then
+ unset_attributes(a_digits, head)
+ end
+ end
+ return head
+end
+
+local m, enabled = 0, false -- a trick to make neighbouring ranges work
+
+function digits.set(n) -- number or 'reset'
+ if n == v_reset then
+ n = unsetvalue
+ else
+ n = tonumber(n)
+ if n then
+ if not enabled then
+ enableaction("processors","typesetters.digits.handler")
+ if trace_digits then
+ report_digits("enabling digit handler")
+ end
+ enabled = true
+ end
+ if m == 100 then
+ m = 1
+ else
+ m = m + 1
+ end
+ n = m * 100 + n
+ else
+ n = unsetvalue
+ end
+ end
+ texsetattribute(a_digits,n)
+end
+
+-- interface
+
+interfaces.implement {
+ name = "setdigitsmanipulation",
+ actions = digits.set,
+ arguments = "string"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl
new file mode 100644
index 00000000000..308ccb66e61
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl
@@ -0,0 +1,58 @@
+%D \module
+%D [ file=typo-dig,
+%D version=2010.01.18,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Digits,
+%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 Typesetting Macros / Digits}
+
+\unprotect
+
+\registerctxluafile{typo-dig}{autosuffix}
+
+\definesystemattribute[digits][public]
+
+%D This could as well be a dynamic font feature but why bother.
+%D
+%D \macros
+%D {\equaldigits}
+%D
+%D \startbuffer
+%D test test \ruledhbox{123} test test\par
+%D test test \ruledhbox{\equaldigits{123}} test test\par
+%D test test \equaldigits{123} test test\par
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This calls result in:
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+
+\permanent\protected\def\setdigitsmanipulation[#1]% can be public implementor
+ {\clf_setdigitsmanipulation{#1}}
+
+\permanent\protected\def\resetdigitsmanipulation
+ {\c_attr_digits\attributeunsetvalue}
+
+\appendtoks
+ \resetdigitsmanipulation
+\to \everyresettypesetting
+
+\permanent\protected\def\equaldigits{\groupedcommand{\setdigitsmanipulation[\number\plusone]}{}}
+\permanent\protected\def\dummydigit {\hphantom {\setdigitsmanipulation[\number\plusone]0}}
+
+\appendtoks
+ \resetdigitsmanipulation
+\to \everyinitializeverbatim
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-dir.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-dir.mkxl
new file mode 100644
index 00000000000..8439ed342d0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-dir.mkxl
@@ -0,0 +1,205 @@
+%D \module
+%D [ file=typo-dir,
+%D version=2009.03.27, % code moved from core-spa.mkiv
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Directions,
+%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 Typesetting Macros / Directions}
+
+%D At some point we might default to method 'two' but first I need to make it more
+%D efficient (and provide some options). I also want to have some basic tracing.
+
+\unprotect
+
+\registerctxluafile{typo-dir}{optimize}
+\registerctxluafile{typo-dha}{}
+%registerctxluafile{typo-dua}{}
+%registerctxluafile{typo-dub}{}
+\registerctxluafile{typo-duc}{autosuffix}
+
+\definesystemattribute[directions][public,pickup]
+
+\installcorenamespace{directions}
+\installcorenamespace{directionsbidimode}
+
+% plural as we can have a combination but maybe better singular
+
+\installsimplecommandhandler \??directions {directions} \??directions % no \define... yet
+
+\immutable\edef\lefttorightmark{\normalUchar"200E} \aliased\let\lrm\lefttorightmark % expandable
+\immutable\edef\righttoleftmark{\normalUchar"200F} \aliased\let\rlm\righttoleftmark % expandable
+
+\permanent\protected\def\setdirection[#1]% todo: symbolic names
+ {\clf_setdirection#1\relax}
+
+\permanent\protected\def\resetdirection
+ {\c_attr_directions\attributeunsetvalue}
+
+\newconstant\directionsbidimode % this one might become pivate
+
+% \setupdirections[bidi=global,method=default]
+% \setupdirections[bidi=global,method=one]
+% \setupdirections[bidi=global,method=two]
+% \setupdirections[bidi=global,method=two,fences=no]
+
+% maybe use chardefs
+
+\mutable\let\currentbidimode\empty
+\mutable\let\currentbidistamp\empty
+
+\def\typo_dir_get_mode
+ {\def\currentbidimode{\clf_getbidimode % test edef
+ scope {\directionsparameter\c!bidi}%
+ method {\directionsparameter\c!method}%
+ fences {\directionsparameter\c!fences}%
+ }%
+ \gletcsname\??directionsbidimode\currentbidistamp\endcsname\currentbidimode}
+
+\appendtoks
+ \edef\p_bidi{\directionsparameter\c!bidi}%
+ \edef\currentbidistamp
+ {\p_bidi
+ :\directionsparameter\c!method
+ :\directionsparameter\c!fences}%
+ \expandafter\let\expandafter\currentbidimode\csname\??directionsbidimode\currentbidistamp\endcsname
+ \ifrelax\currentbidimode
+ \typo_dir_get_mode
+ \fi
+ \directionsbidimode\currentbidimode\relax
+ \ifcase\directionsbidimode
+ \resetdirection
+ \else
+ \setdirection[\number\directionsbidimode]%
+ \fi
+ \ifx\p_bidi\v!global
+ \pickupdirectionsattribute % pagebuilder
+ \else
+ \forgetdirectionsattribute
+ \fi
+\to \everysetupdirections
+
+\appendtoks
+ \edef\p_option{\directionsparameter\c!break}% name can change
+ \bitwiseflip\normalizelinemode\ifx\p_option\v!both\else-\fi\breakafterdircode
+\to \everysetupdirections
+
+% bidi: local=obey grouping, global=ignore grouping (unicode has no grouping)
+
+\setupdirections % maybe start/stop
+ [\c!bidi=\v!off,
+ \c!method=\v!default,
+ \c!break=\v!both, % experimental value, maybe \v!no will be default (bad name too)
+ \c!fences=\v!yes]
+
+\permanent\protected\edef\bidilre{\normalUchar"202A}
+\permanent\protected\edef\bidirle{\normalUchar"202B}
+\permanent\protected\edef\bidipop{\normalUchar"202C}
+\permanent\protected\edef\bidilro{\normalUchar"202D}
+\permanent\protected\edef\bidirlo{\normalUchar"202E}
+
+\permanent\protected\def\dirlre{\ifcase\directionsbidimode\or\bidilre\or\textdirection\directionlefttoright\fi}
+\permanent\protected\def\dirrle{\ifcase\directionsbidimode\or\bidirle\or\textdirection\directionrighttoleft\fi}
+\permanent\protected\def\dirlro{\ifcase\directionsbidimode\or\bidilro\or\setdirection[3]\fi}
+\permanent\protected\def\dirrlo{\ifcase\directionsbidimode\or\bidirlo\or\setdirection[4]\fi}
+
+% for the moment: \setdirection[\plusone]
+
+\definecolor[bidi:left:original] [r=.6]
+\definecolor[bidi:left:reversed] [g=.6]
+\definecolor[bidi:right:original][b=.6]
+\definecolor[bidi:right:reversed][r=.6,g=.6]
+\definecolor[bidi:mirrored] [r=.6,b=.6]
+
+\protect \endinput
+
+% bidi test
+
+% \definefontfeature
+% [arab]
+% [mode=node,language=dflt,script=arab,
+% init=yes,medi=yes,fina=yes,isol=yes,
+% liga=yes,dlig=yes,rlig=yes,clig=yes,
+% mark=yes,mkmk=yes,kern=yes,curs=yes]
+%
+% \font\Arabic=arabtype*arab at 20pt
+%
+% \def\LATIN{LATIN} {\setdirection[1]} % enable this
+% \def\ARAB {عربي}
+%
+% \startluacode
+% function documentdata.split_tokens(str)
+% for s in str:bytes() do
+% context.sprint(tex.ctxcatcodes,string.format("\\hbox{\\char %s}",s))
+% end
+% end
+% \stopluacode
+%
+% \protected\def\biditest#1#2#3% font text raw
+% {\dontleavehmode\hbox
+% {\framed[offset=overlay]{\tttf#2}\quad
+% \enabletrackers[typesetters.directions]%
+% \framed[offset=overlay]{#1#3}\quad
+% \disabletrackers[typesetters.directions]%
+% \tttf\ctxlua{documentdata.split_tokens([[\detokenize{#3}]])}}}
+%
+% \startbuffer[bidi-sample]
+% \biditest\Arabic{LATIN BARA}{\lefttoright\relax \LATIN\ \ARAB}\par
+% \biditest\Arabic{BARA LATIN}{\righttoleft\relax \LATIN\ \ARAB}\par
+% \biditest\Arabic{LATIN ARAB}{\lefttoright{\bidilro \LATIN\ \ARAB}}\par % right -> left
+% \biditest\Arabic{LATIN ARAB}{\righttoleft{\bidilro \LATIN\ \ARAB}}\par % right -> left
+% \biditest\Arabic{BARA NITAL}{\lefttoright{\bidirlo \LATIN\ \ARAB}}\par % left -> right
+% \biditest\Arabic{BARA NITAL}{\righttoleft{\bidirlo \LATIN\ \ARAB}}\par % left -> right
+% \stopbuffer
+%
+% \startbuffer[bidi-sample]
+% \biditest\Arabic{LATIN BARA}{\lefttoright\relax \LATIN\ \ARAB}\par
+% \biditest\Arabic{BARA LATIN}{\righttoleft\relax \LATIN\ \ARAB}\par
+% \biditest\Arabic{LATIN ARAB}{\lefttoright\bidilro \LATIN\ \ARAB}\par % right -> left
+% \biditest\Arabic{LATIN ARAB}{\righttoleft\bidilro \LATIN\ \ARAB}\par % right -> left
+% \biditest\Arabic{BARA NITAL}{\lefttoright\bidirlo \LATIN\ \ARAB}\par % left -> right
+% \biditest\Arabic{BARA NITAL}{\righttoleft\bidirlo \LATIN\ \ARAB}\par % left -> right
+% \stopbuffer
+%
+% \startbuffer[bidi-setup]
+% \setupdirections[bidi=off]
+% \stopbuffer
+%
+% {\typebuffer[bidi-setup] \getbuffer[bidi-setup] \getbuffer[bidi-sample]}
+%
+% \startbuffer[bidi-setup]
+% \setupdirections[bidi=global]
+% \stopbuffer
+%
+% {\typebuffer[bidi-setup] \getbuffer[bidi-setup] \getbuffer[bidi-sample]}
+%
+% \startbuffer[bidi-setup]
+% \setupdirections[bidi=local]
+% \stopbuffer
+%
+% {\typebuffer[bidi-setup] \getbuffer[bidi-setup] \getbuffer[bidi-sample]}
+%
+% \startbuffer[bidi-sample]
+% \setupdirections[bidi=global]
+%
+% \hbox{\righttoleft\arabicfont (0001)}\par
+% \dontleavehmode\hbox{\righttoleft\arabicfont (0002)}\par
+% {\righttoleft\arabicfont (0003)\par}
+% {\righttoleft\arabicfont (0004)}\par
+% \dontleavehmode{\righttoleft\arabicfont (0005)\par}
+% \dontleavehmode{\righttoleft\arabicfont (0006)}\par
+% \rtlhbox{\arabicfont (0007)}\par
+% \ltrhbox{\arabicfont (0008)}\par
+% \dontleavehmode\rtlhbox{\arabicfont (0009)}\par
+% \dontleavehmode\ltrhbox{\arabicfont (0010)}\par
+% \stopsetups
+%
+% {\typebuffer[bidi-sample] \getbuffer[bidi-sample]}
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-drp.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-drp.lmt
new file mode 100644
index 00000000000..2c53cc111a9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-drp.lmt
@@ -0,0 +1,341 @@
+if not modules then modules = { } end modules ['typo-drp'] = {
+ version = 1.001,
+ comment = "companion to typo-drp.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This one is sensitive for order (e.g. when combined with first line
+-- processing.
+
+-- todo: use isglyph
+
+local tonumber, type, next = tonumber, type, next
+local ceil = math.ceil
+local settings_to_hash = utilities.parsers.settings_to_hash
+
+local trace_initials = false trackers.register("typesetters.initials", function(v) trace_initials = v end)
+local report_initials = logs.reporter("nodes","initials")
+
+local initials = typesetters.paragraphs or { }
+typesetters.initials = initials or { }
+
+local nodes = nodes
+
+local tasks = nodes.tasks
+local enableaction = tasks.enableaction
+local disableaction = tasks.disableaction
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getchar = nuts.getchar
+local getid = nuts.getid
+local getattr = nuts.getattr
+local getwhd = nuts.getwhd
+
+local getprop = nuts.getprop
+local setprop = nuts.setprop
+
+local setlink = nuts.setlink
+local setprev = nuts.setprev
+local setnext = nuts.setnext
+local setfont = nuts.setfont
+local setchar = nuts.setchar
+local setwhd = nuts.setwhd
+local setkern = nuts.setkern
+local setoffsets = nuts.setoffsets
+local setglyphdata = nuts.setglyphdata
+
+local hpack_nodes = nuts.hpack
+
+local nodecodes = nodes.nodecodes
+
+local nodepool = nuts.pool
+local new_kern = nodepool.kern
+
+local insert_before = nuts.insert_before
+local insert_after = nuts.insert_after
+local remove_node = nuts.remove
+local start_of_par = nuts.start_of_par
+
+local nextnode = nuts.traversers.node
+local nextglyph = nuts.traversers.glyph
+
+local setcoloring = nuts.colors.set
+
+local variables = interfaces.variables
+local v_default = variables.default
+local v_margin = variables.margin
+local v_auto = variables.auto
+local v_first = variables.first
+local v_last = variables.last
+
+local texget = tex.get
+local texset = tex.set
+local unsetvalue = attributes.unsetvalue
+
+local glyph_code = nodecodes.glyph
+local hlist_code = nodecodes.hlist
+local glue_code = nodecodes.glue
+local kern_code = nodecodes.kern
+local par_code = nodecodes.par
+
+local actions = { }
+initials.actions = actions
+
+local a_initial = attributes.private("initial")
+
+local category = characters.category
+
+local function set(par,specification)
+ enableaction("processors","typesetters.initials.handler")
+ if trace_initials then
+ report_initials("enabling initials")
+ end
+ setprop(par,a_initial,specification)
+end
+
+function initials.set(specification)
+ nuts.setparproperty(set,specification)
+end
+
+interfaces.implement {
+ name = "setinitial",
+ actions = initials.set,
+ arguments = {
+ {
+ { "location" },
+ { "enabled", "boolean" },
+ { "method" },
+ { "distance" ,"dimen" },
+ { "hoffset" ,"dimen" },
+ { "voffset" ,"dimen" },
+ { "font", "integer" },
+ { "dynamic", "integer" },
+ { "ca", "integer" },
+ { "ma", "integer" },
+ { "ta", "integer" },
+ { "n", "integer" },
+ { "m", "integer" },
+ }
+ }
+}
+
+-- todo: prevent linebreak .. but normally a initial ends up at the top of
+-- a page so this has a low priority
+
+actions[v_default] = function(head,setting)
+ -- begin of par
+ local first = getnext(head)
+ local indent = false
+ -- parbox .. needs to be set at 0
+ if first and getid(first) == hlist_code then
+ first = getnext(first)
+ indent = true
+ end
+ -- we need to skip over kerns and glues (signals)
+ while first and getid(first) ~= glyph_code do
+ first = getnext(first)
+ end
+ if first and getid(first) == glyph_code then
+ local ma = setting.ma or 0
+ local ca = setting.ca
+ local ta = setting.ta
+ local last = first
+ local distance = setting.distance or 0
+ local voffset = setting.voffset or 0
+ local hoffset = setting.hoffset or 0
+ local parindent = texget("parindent")
+ local baseline = texget("baselineskip",false)
+ local lines = tonumber(setting.n) or 0
+ local dynamic = setting.dynamic
+ local font = setting.font
+ local method = settings_to_hash(setting.method)
+ local length = tonumber(setting.m) or 1
+ --
+ -- 1 char | n chars | skip first quote | ignore punct | keep punct
+ --
+ if getattr(first,a_initial) then
+ for current in nextnode, getnext(first) do
+ if getattr(current,a_initial) then
+ last = current
+ else
+ break
+ end
+ end
+ elseif method[v_auto] then
+ local char = getchar(first)
+ local kind = category(char)
+ if kind == "po" or kind == "pi" then
+ if method[v_first] then
+ -- remove quote etc before initial
+ local next = getnext(first)
+ if not next then
+ -- don't start with a quote or so
+ return head
+ end
+ last = nil
+ for current in nextglyph, next do
+ head, first = remove_node(head,first,true)
+ first = current
+ last = first
+ break
+ end
+ if not last then
+ -- no following glyph or so
+ return head
+ end
+ else
+ -- keep quote etc with initial
+ local next = getnext(first)
+ if not next then
+ -- don't start with a quote or so
+ return head
+ end
+ for current in nextglyph, next do
+ last = current
+ break
+ end
+ if last == first then
+ return head
+ end
+ end
+ elseif kind == "pf" then
+ -- error: final quote
+ else
+ -- okay
+ end
+ -- maybe also: get all A. B. etc
+ local next = getnext(first)
+ if next then
+ for current, char in nextglyph, next do
+ local kind = category(char)
+ if kind == "po" then
+ if method[v_last] then
+ -- remove period etc after initial
+ remove_node(head,current,true)
+ else
+ -- keep period etc with initial
+ last = current
+ end
+ end
+ break
+ end
+ end
+ else
+ for current in nextglyph, first do
+ last = current
+ if length <= 1 then
+ break
+ else
+ length = length - 1
+ end
+ end
+ end
+ local current = first
+ while true do
+ local id = getid(current)
+ if id == kern_code then
+ setkern(current,0)
+ elseif id == glyph_code then
+ local next = getnext(current)
+ if font then
+ setfont(current,font)
+ end
+ if dynamic > 0 then
+ setglyphdata(current,dynamic)
+ end
+ setcoloring(ma,ca,ta)
+ end
+ if current == last then
+ break
+ else
+ current = getnext(current)
+ end
+ end
+ -- We pack so that successive handling cannot touch the dropped cap. Packaging
+ -- in a hlist is also needed because we cannot locally adapt e.g. parindent (not
+ -- yet stored in with par).
+ local prev = getprev(first)
+ local next = getnext(last)
+ --
+ setprev(first)
+ setnext(last)
+ local dropper = hpack_nodes(first)
+ local width, height, depth = getwhd(dropper)
+ setwhd(dropper,0,0,0)
+ --
+ setlink(prev,dropper)
+ setlink(dropper,next)
+ --
+ if next then
+ local current = next
+ while current do
+ local id = getid(current)
+ if id == glue_code or id == kern_code then
+ local next = getnext(current)
+ -- remove_node(current,current,true) -- created an invalid next link and dangling remains
+ remove_node(head,current,true)
+ current = next
+ else
+ break
+ end
+ end
+ end
+ --
+ local hoffset = width + hoffset + distance + (indent and parindent or 0)
+ for current in nextglyph, first do
+ setoffsets(current,-hoffset,-voffset) -- no longer - height here
+ if current == last then
+ break
+ end
+ end
+ --
+ first = dropper
+ --
+ if setting.location == v_margin then
+ -- okay
+ else
+ if lines == 0 then -- safeguard, not too precise
+ lines = ceil((height+voffset) / baseline)
+ end
+ -- We cannot set parshape yet ... when we can I'll add a slope
+ -- option (positive and negative, in emwidth).
+ local hangafter = - lines
+ local hangindent = width + distance
+ if trace_initials then
+ report_initials("setting hangafter to %i and hangindent to %p",hangafter,hangindent)
+ end
+ texset("hangafter",hangafter,true)
+ texset("hangindent",hangindent,true)
+ end
+ if indent then
+ insert_after(first,first,new_kern(-parindent))
+ end
+ end
+ return head
+end
+
+-- we can count ... when all done, we can disable ...
+
+function initials.handler(head)
+ if getid(head) == par_code and start_of_par(head) then
+ local settings = getprop(head,a_initial)
+ if settings then
+ disableaction("processors","typesetters.initials.handler")
+ local alternative = settings.alternative or v_default
+ local action = actions[alternative] or actions[v_default]
+ if action then
+ if trace_initials then
+ report_initials("processing initials, alternative %a",alternative)
+ end
+ return action(head,settings)
+ end
+ end
+ end
+ return head
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-drp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-drp.mkxl
new file mode 100644
index 00000000000..94e08c9b013
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-drp.mkxl
@@ -0,0 +1,129 @@
+%D \module
+%D [ file=typo-drp, % was typo-par
+%D version=2011.10.27,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Initials,
+%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 Typesetting Macros / Initials}
+
+%D This will change ... par specific attribute set and such.
+
+\unprotect
+
+\registerctxluafile{typo-drp}{autosuffix}
+
+\definesystemattribute[initial][public]
+
+\appendtoks
+ \c_attr_initial\attributeunsetvalue
+\to \everyforgetall
+
+%D For the moment here: dropped caps redone. In addition to the parameters shown in
+%D the example you can use the \type {style} and more low level \type {font} keys to
+%D set up the font where the first one wins. If you don't like the behaviour you can
+%D always roll out your own command.
+%D
+%D \starttyping
+%D \placeinitial \input ward \par \input ward \par \placeinitial \input tufte
+%D
+%D \setupinitial
+%D [location=text,
+%D n=2,
+%D color=darkred,
+%D distance=-1em,
+%D hoffset=1em,
+%D voffset=-3ex,
+%D before=\blank]
+%D
+%D \placeinitial \input ward \par \input ward \placeinitial \input tufte
+%D \stoptyping
+
+% todo: angle (once we can set parshape at the Lua end)
+
+\installcorenamespace{initial}
+
+\installcommandhandler \??initial {initial} \??initial
+
+\definemeasure[initial:n][\lineheight*\initialparameter\c!n - \strutdp]
+
+\setupinitial
+ [\c!location=\v!text,
+ \c!n=3,
+ \c!m=1,
+ \c!method=\v!none,
+ % \c!font=Bold sa 4,
+ % \c!font=Bold ht \measure{initial:n},
+ \c!font=Bold cp \measure{initial:n},
+ \c!distance=.125\emwidth,
+ \c!hoffset=\zeropoint,
+ \c!voffset=\v!line, % \dimexp\lineheight*\initialparameter\c!n-\lineheight\relax]
+ \c!style=,
+ \c!color=,
+ \c!before=\blank]
+
+\permanent\tolerant\protected\def\placeinitial[#1]% old command
+ {\par
+ \namedinitialparameter{#1}\c!before
+ \edef\typo_initial_handle{\typo_initial_handle_indeed{#1}{}}}
+
+\permanent\tolerant\protected\def\setinitial[#1]#*[#2]%
+ {\edef\typo_initial_handle{\typo_initial_handle_indeed{#1}{#2}}}
+
+\protected\def\typo_initial_handle_indeed#1#2%
+ {\dontleavehmode
+ \begingroup
+ \edef\currentinitial{#1}%
+ \setupcurrentinitial[#2]%
+ \resetfontfeature % might be needed in more places
+ \doifelsenothing{\initialparameter\c!style}
+ {\definedfont[\initialparameter\c!font]}
+ {\useinitialstyleparameter\c!style}%
+ \useinitialcolorparameter\c!color
+ \edef\p_voffset{\initialparameter\c!voffset}%
+ \scratchcounter \initialparameter\c!n\relax
+ \scratchvoffset\dimexpr\ifx\p_voffset\v!line\scratchcounter\lineheight-\lineheight\else\p_voffset\fi\relax
+ \clf_setinitial
+ location {\initialparameter\c!location}%
+ enabled true\space
+ n \scratchcounter
+ m \numexpr\initialparameter\c!m\relax
+ method {\initialparameter\c!method}%
+ distance \dimexpr\initialparameter\c!distance\relax
+ hoffset \dimexpr\initialparameter\c!hoffset\relax
+ voffset \scratchvoffset
+ ma \c_attr_colormodel
+ ca \c_attr_color
+ ta \c_attr_transparency
+ font \fontid\font
+ dynamic \font_dynamic_value % it's a bit over the top to support this here
+ \relax
+ \c_attr_initial\plusone
+ \initialparameter\c!text
+ \endgroup
+ \glet\typo_initial_handle\relax}
+
+\let\typo_initial_handle\relax
+
+% \setupbodyfont[dejavu,9pt]
+%
+% \startbuffer
+% \setinitial[two] D. E. Knuth \ignorespaces\input knuth \par
+% \setinitial[two] Knuth \ignorespaces\input knuth \par
+% \setinitial[two] \quotation{D. E. Knuth} \ignorespaces\input knuth \par
+% \setinitial[two] \quotation {Knuth} \ignorespaces\input knuth \par
+% \setinitial[two] [text={D.E. Knuth}] \ignorespaces\input knuth \par
+% \setinitial[two] [m=4] D. E. Knuth \ignorespaces\input knuth \par
+% \stopbuffer
+%
+% \type{m=2} \start \defineinitial[two][m=2,method=none] \getbuffer \page \stop
+% \type{m=1,method=auto} \start \defineinitial[two][m=1,method=auto] \getbuffer \page \stop
+% \type{m=1,method={auto,first,last}} \start \defineinitial[two][m=1,method={first,auto,last}] \getbuffer \page \stop
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-duc.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-duc.lmt
new file mode 100644
index 00000000000..07ae140e867
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-duc.lmt
@@ -0,0 +1,1048 @@
+if not modules then modules = { } end modules ['typo-duc'] = {
+ version = 1.001,
+ comment = "companion to typo-dir.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+ comment = "Unicode bidi (sort of) variant c",
+}
+
+-- This is a follow up on typo-uda which itself is a follow up on t-bidi by Khaled Hosny which
+-- in turn is based on minibidi.c from Arabeyes. This is a further optimizations, as well as
+-- an update on some recent unicode bidi developments. There is (and will) also be more control
+-- added. As a consequence this module is somewhat slower than its precursor which itself is
+-- slower than the one-pass bidi handler. This is also a playground and I might add some plugin
+-- support. However, in the meantime performance got a bit better and this third variant is again
+-- some 10% faster than the second variant.
+
+-- todo (cf html):
+--
+-- normal The element does not offer a additional level of embedding with respect to the bidirectional algorithm. For inline elements implicit reordering works across element boundaries.
+-- embed If the element is inline, this value opens an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the direction property.
+-- bidi-override For inline elements this creates an override. For block container elements this creates an override for inline-level descendants not within another block container element. This means that inside the element, reordering is strictly in sequence according to the direction property; the implicit part of the bidirectional algorithm is ignored.
+-- isolate This keyword indicates that the element's container directionality should be calculated without considering the content of this element. The element is therefore isolated from its siblings. When applying its bidirectional-resolution algorithm, its container element treats it as one or several U+FFFC Object Replacement Character, i.e. like an image.
+-- isolate-override This keyword applies the isolation behavior of the isolate keyword to the surrounding content and the override behavior o f the bidi-override keyword to the inner content.
+-- plaintext This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the direction property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.
+-- This value allows to display data which has already formatted using a tool following the Unicode Bidirectional Algorithm.
+--
+-- todo: check for introduced errors
+-- todo: reuse list, we have size, so we can just change values (and auto allocate when not there)
+-- todo: reuse the stack
+-- todo: no need for a max check
+-- todo: collapse bound similar ranges (not ok yet)
+-- todo: combine some sweeps
+-- todo: removing is not needed when we inject at the same spot (only chnage the dir property)
+-- todo: isolated runs (isolating runs are similar to bidi=local in the basic analyzer)
+
+-- todo: check unicode addenda (from the draft):
+--
+-- Added support for canonical equivalents in BD16.
+-- Changed logic in N0 to not check forwards for context in the case of enclosed text opposite the embedding direction.
+-- Major extension of the algorithm to allow for the implementation of directional isolates and the introduction of new isolate-related values to the Bidi_Class property.
+-- Adds BD8, BD9, BD10, BD11, BD12, BD13, BD14, BD15, and BD16, Sections 2.4 and 2.5, and Rules X5a, X5b, X5c and X6a.
+-- Extensively revises Section 3.3.2, Explicit Levels and Directions and its existing X rules to formalize the algorithm for matching a PDF with the embedding or override initiator whose scope it terminates.
+-- Moves Rules X9 and X10 into a separate new Section 3.3.3, Preparations for Implicit Processing.
+-- Modifies Rule X10 to make the isolating run sequence the unit to which subsequent rules are applied.
+-- Modifies Rule W1 to change an NSM preceded by an isolate initiator or PDI into ON.
+-- Adds Rule N0 and makes other changes to Section 3.3.5, Resolving Neutral and Isolate Formatting Types to resolve bracket pairs to the same level.
+
+local insert, remove, unpack, concat = table.insert, table.remove, table.unpack, table.concat
+local utfchar = utf.char
+local setmetatable = setmetatable
+local formatters = string.formatters
+
+local directiondata = characters.directions
+local mirrordata = characters.mirrors
+local textclassdata = characters.textclasses
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+----- getchar = nuts.getchar
+local getattr = nuts.getattr
+local getprop = nuts.getprop
+local getdirection = nuts.getdirection
+local isnextchar = nuts.isnextchar -- we do this before the font handler
+
+local setprop = nuts.setprop
+local setchar = nuts.setchar
+local setdirection = nuts.setdirection
+local setattrlist = nuts.setattrlist
+
+local properties = nodes.properties.data
+
+local remove_node = nuts.remove
+local insert_node_after = nuts.insert_after
+local insert_node_before = nuts.insert_before
+local start_of_par = nuts.start_of_par
+
+local nodepool = nuts.pool
+local new_direction = nodepool.direction
+
+local nodecodes = nodes.nodecodes
+local gluecodes = nodes.gluecodes
+
+local glyph_code = nodecodes.glyph
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local math_code = nodecodes.math
+local dir_code = nodecodes.dir
+local par_code = nodecodes.par
+local penalty_code = nodecodes.penalty
+
+local parfillskip_code = gluecodes.parfillskip
+local parfillleftskip_code = gluecodes.parfillleftskip
+
+local dirvalues = nodes.dirvalues
+local lefttoright_code = dirvalues.lefttoright
+local righttoleft_code = dirvalues.righttoleft
+
+local maximum_stack = 0xFF
+
+local a_directions = attributes.private('directions')
+
+local directions = typesetters.directions
+local setcolor = directions.setcolor
+local getfences = directions.getfences
+
+local remove_controls = true directives.register("typesetters.directions.removecontrols",function(v) remove_controls = v end)
+----- analyze_fences = true directives.register("typesetters.directions.analyzefences", function(v) analyze_fences = v end)
+
+local report_directions = logs.reporter("typesetting","directions three")
+
+local trace_directions = false trackers.register("typesetters.directions", function(v) trace_directions = v end)
+local trace_details = false trackers.register("typesetters.directions.details", function(v) trace_details = v end)
+local trace_list = false trackers.register("typesetters.directions.list", function(v) trace_list = v end)
+
+-- strong (old):
+--
+-- l : left to right
+-- r : right to left
+-- lro : left to right override
+-- rlo : left to left override
+-- lre : left to right embedding
+-- rle : left to left embedding
+-- al : right to legt arabic (esp punctuation issues)
+--
+-- weak:
+--
+-- en : english number
+-- es : english number separator
+-- et : english number terminator
+-- an : arabic number
+-- cs : common number separator
+-- nsm : nonspacing mark
+-- bn : boundary neutral
+--
+-- neutral:
+--
+-- b : paragraph separator
+-- s : segment separator
+-- ws : whitespace
+-- on : other neutrals
+--
+-- interesting: this is indeed better (and more what we expect i.e. we already use this split
+-- in the old original (also these isolates)
+--
+-- strong (new):
+--
+-- l : left to right
+-- r : right to left
+-- al : right to left arabic (esp punctuation issues)
+--
+-- explicit: (new)
+--
+-- lro : left to right override
+-- rlo : left to left override
+-- lre : left to right embedding
+-- rle : left to left embedding
+-- pdf : pop dir format
+-- lri : left to right isolate
+-- rli : left to left isolate
+-- fsi : first string isolate
+-- pdi : pop directional isolate
+
+local whitespace = {
+ lre = true,
+ rle = true,
+ lro = true,
+ rlo = true,
+ pdf = true,
+ bn = true,
+ ws = true,
+}
+
+local b_s_ws_on = {
+ b = true,
+ s = true,
+ ws = true,
+ on = true
+}
+
+-- tracing
+
+local function show_list(list,size,what)
+ local what = what or "direction"
+ local joiner = utfchar(0x200C)
+ local result = { }
+ for i=1,size do
+ local entry = list[i]
+ local character = entry.char
+ local direction = entry[what]
+ if character == 0xFFFC then
+ local first = entry.id
+ local last = entry.last
+ local skip = entry.skip
+ if last then
+ result[i] = formatters["%-3s:%s %s..%s (%i)"](direction,joiner,nodecodes[first],nodecodes[last],skip or 0)
+ else
+ result[i] = formatters["%-3s:%s %s (%i)"](direction,joiner,nodecodes[first],skip or 0)
+ end
+ elseif character >= 0x202A and character <= 0x202C then
+ result[i] = formatters["%-3s:%s %U"](direction,joiner,character)
+ else
+ result[i] = formatters["%-3s:%s %c %U"](direction,joiner,character,character)
+ end
+ end
+ return concat(result,joiner .. " | " .. joiner)
+end
+
+-- preparation
+
+local function show_done(list,size)
+ local joiner = utfchar(0x200C)
+ local result = { }
+ local format = formatters["<%s>"]
+ for i=1,size do
+ local entry = list[i]
+ local character = entry.char
+ local begindir = entry.begindir
+ local enddir = entry.enddir
+ if begindir then
+ result[#result+1] = format(begindir)
+ end
+ if entry.remove then
+ -- continue
+ elseif character == 0xFFFC then
+ result[#result+1] = format("?")
+ elseif character == 0x0020 then
+ result[#result+1] = format(" ")
+ elseif character >= 0x202A and character <= 0x202C then
+ result[#result+1] = format(entry.original)
+ else
+ result[#result+1] = utfchar(character)
+ end
+ if enddir then
+ result[#result+1] = format(enddir)
+ end
+ end
+ return concat(result,joiner)
+end
+
+-- keeping the list and overwriting doesn't save much runtime, only a few percent
+-- char is only used for mirror, so in fact we can as well only store it for
+-- glyphs only
+--
+-- tracking what direction is used and skipping tests is not faster (extra kind of
+-- compensates gain)
+
+local mt_space = { __index = { char = 0x0020, direction = "ws", original = "ws", level = 0, skip = 0 } }
+local mt_lre = { __index = { char = 0x202A, direction = "lre", original = "lre", level = 0, skip = 0 } }
+local mt_rle = { __index = { char = 0x202B, direction = "rle", original = "rle", level = 0, skip = 0 } }
+local mt_pdf = { __index = { char = 0x202C, direction = "pdf", original = "pdf", level = 0, skip = 0 } }
+local mt_object = { __index = { char = 0xFFFC, direction = "on", original = "on", level = 0, skip = 0 } }
+
+local stack = table.setmetatableindex("table") -- shared
+local list = { } -- shared
+
+-- instead of skip we can just have slots filled with 'skip'
+
+local function build_list(head,where)
+ -- P1
+ local current = head
+ local size = 0
+ while current do
+ size = size + 1
+ -- local id = getid(current)
+ local nxt, chr, id = isnextchar(current)
+ local p = properties[current]
+ if p and p.directions then
+ -- tricky as dirs can be injected in between
+ local skip = 0
+ local last = id
+ -- current = getnext(current)
+ current = nxt
+ while current do
+ local id = getid(current)
+ local p = properties[current]
+ if p and p.directions then
+ skip = skip + 1
+ last = id
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ if id == last then -- the start id
+ list[size] = setmetatable({ skip = skip, id = id },mt_object)
+ else
+ list[size] = setmetatable({ skip = skip, id = id, last = last },mt_object)
+ end
+ -- elseif id == glyph_code then
+ elseif chr then
+ -- local chr = getchar(current)
+ local dir = directiondata[chr]
+ -- could also be a metatable
+ list[size] = { char = chr, direction = dir, original = dir, level = 0 }
+ -- current = getnext(current)
+ current = nxt
+ -- if not list[dir] then list[dir] = true end -- not faster when we check for usage
+ elseif id == glue_code then -- and how about kern
+ list[size] = setmetatable({ },mt_space)
+ -- current = getnext(current)
+ current = nxt
+ elseif id == dir_code then
+ local dir, pop = getdirection(current)
+ if dir == lefttoright_code then
+ list[size] = setmetatable({ },pop and mt_pdf or mt_lre)
+ elseif dir == righttoleft_code then
+ list[size] = setmetatable({ },pop and mt_pdf or mt_rle)
+ else
+ list[size] = setmetatable({ id = id },mt_object)
+ end
+ -- current = getnext(current)
+ current = nxt
+ elseif id == math_code then
+ local skip = 0
+ -- current = getnext(current)
+ current = nxt
+ while getid(current) ~= math_code do
+ skip = skip + 1
+ current = getnext(current)
+ end
+ skip = skip + 1
+ current = getnext(current)
+ list[size] = setmetatable({ id = id, skip = skip },mt_object)
+ else -- disc_code: we assume that these are the same as the surrounding
+ local skip = 0
+ local last = id
+ -- current = getnext(current)
+ current = nxt
+ while n do
+ local id = getid(current)
+ if id ~= glyph_code and id ~= glue_code and id ~= dir_code then
+ skip = skip + 1
+ last = id
+ current = getnext(current)
+ else
+ break
+ end
+ end
+ if id == last then -- the start id
+ list[size] = setmetatable({ id = id, skip = skip },mt_object)
+ else
+ list[size] = setmetatable({ id = id, skip = skip, last = last },mt_object)
+ end
+ end
+ end
+ return list, size
+end
+
+-- new
+
+-- we could support ( ] and [ ) and such ...
+
+-- ש ) ל ( × 0-0
+-- ש ( ל ] × 0-0
+-- ש ( ל ) × 2-4
+-- ש ( ל [ × ) ×› ] 2-6
+-- ש ( ל ] × ) ×› 2-6
+-- ש ( ל ) × ) ×› 2-4
+-- ש ( ל ( × ) ×› 4-6
+-- ש ( ל ( × ) ×› ) 2-8,4-6
+-- ש ( ל [ × ] ×› ) 2-8,4-6
+
+local fencestack = table.setmetatableindex("table")
+
+local function resolve_fences(list,size,start,limit)
+ -- N0: funny effects, not always better, so it's an option
+ local nofstack = 0
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "on" then
+ local char = entry.char
+ local mirror = mirrordata[char]
+ if mirror then
+ local class = textclassdata[char]
+ entry.mirror = mirror
+ entry.class = class
+ if class == "open" then
+ nofstack = nofstack + 1
+ local stacktop = fencestack[nofstack]
+ stacktop[1] = mirror
+ stacktop[2] = i
+ elseif nofstack == 0 then
+ -- skip
+ elseif class == "close" then
+ while nofstack > 0 do
+ local stacktop = fencestack[nofstack]
+ if stacktop[1] == char then
+ local open = stacktop[2]
+ local close = i
+ list[open ].paired = close
+ list[close].paired = open
+ break
+ else
+ -- do we mirror or not
+ end
+ nofstack = nofstack - 1
+ end
+ end
+ end
+ end
+ end
+end
+
+-- local function test_fences(str)
+-- local list = { }
+-- for s in string.gmatch(str,".") do
+-- local b = utf.byte(s)
+-- list[#list+1] = { c = s, char = b, direction = directiondata[b] }
+-- end
+-- resolve_fences(list,#list,1,#size)
+-- inspect(list)
+-- end
+--
+-- test_fences("a(b)c(d)e(f(g)h)i")
+-- test_fences("a(b[c)d]")
+
+-- the action
+
+local function get_baselevel(head,list,size,direction)
+ if direction == lefttoright_code or direction == righttoleft_code then
+ return direction, true
+ elseif getid(head) == par_code and start_of_par(head) then
+ direction = getdirection(head)
+ if direction == lefttoright_code or direction == righttoleft_code then
+ return direction, true
+ end
+ end
+ -- P2, P3
+ for i=1,size do
+ local entry = list[i]
+ local direction = entry.direction
+ if direction == "r" or direction == "al" then -- and an ?
+ return righttoleft_code, true
+ elseif direction == "l" then
+ return lefttoright_code, true
+ end
+ end
+ return lefttoright_code, false
+end
+
+local function resolve_explicit(list,size,baselevel)
+-- if list.rle or list.lre or list.rlo or list.lro then
+ -- X1
+ local level = baselevel
+ local override = "on"
+ local nofstack = 0
+ for i=1,size do
+ local entry = list[i]
+ local direction = entry.direction
+ -- X2
+ if direction == "rle" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ local stacktop = stack[nofstack]
+ stacktop[1] = level
+ stacktop[2] = override
+ level = level + (level % 2 == 1 and 2 or 1) -- least_greater_odd(level)
+ override = "on"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X3
+ elseif direction == "lre" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ local stacktop = stack[nofstack]
+ stacktop[1] = level
+ stacktop[2] = override
+ level = level + (level % 2 == 1 and 1 or 2) -- least_greater_even(level)
+ override = "on"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X4
+ elseif direction == "rlo" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ local stacktop = stack[nofstack]
+ stacktop[1] = level
+ stacktop[2] = override
+ level = level + (level % 2 == 1 and 2 or 1) -- least_greater_odd(level)
+ override = "r"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X5
+ elseif direction == "lro" then
+ if nofstack < maximum_stack then
+ nofstack = nofstack + 1
+ local stacktop = stack[nofstack]
+ stacktop[1] = level
+ stacktop[2] = override
+ level = level + (level % 2 == 1 and 1 or 2) -- least_greater_even(level)
+ override = "l"
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack overflow at position %a with direction %a",i,direction)
+ end
+ -- X7
+ elseif direction == "pdf" then
+ if nofstack > 0 then
+ local stacktop = stack[nofstack]
+ level = stacktop[1]
+ override = stacktop[2]
+ nofstack = nofstack - 1
+ entry.level = level
+ entry.direction = "bn"
+ entry.remove = true
+ elseif trace_directions then
+ report_directions("stack underflow at position %a with direction %a",
+ i, direction)
+ else
+ report_directions("stack underflow at position %a with direction %a: %s",
+ i, direction, show_list(list,size))
+ end
+ -- X6
+ else
+ entry.level = level
+ if override ~= "on" then
+ entry.direction = override
+ end
+ end
+ end
+ -- X8 (reset states and overrides after paragraph)
+end
+
+local function resolve_weak(list,size,start,limit,orderbefore,orderafter)
+ -- W1: non spacing marks get the direction of the previous character
+-- if list.nsm then
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "nsm" then
+ if i == start then
+ entry.direction = orderbefore
+ else
+ entry.direction = list[i-1].direction
+ end
+ end
+ end
+-- end
+ -- W2: mess with numbers and arabic
+-- if list.en then
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "en" then
+ for j=i-1,start,-1 do
+ local prev = list[j]
+ local direction = prev.direction
+ if direction == "al" then
+ entry.direction = "an"
+ break
+ elseif direction == "r" or direction == "l" then
+ break
+ end
+ end
+ end
+ end
+-- end
+ -- W3
+-- if list.al then
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "al" then
+ entry.direction = "r"
+ end
+ end
+-- end
+ -- W4: make separators number
+-- if list.es or list.cs then
+ -- skip
+ if false then
+ for i=start+1,limit-1 do
+ local entry = list[i]
+ local direction = entry.direction
+ if direction == "es" then
+ if list[i-1].direction == "en" and list[i+1].direction == "en" then
+ entry.direction = "en"
+ end
+ elseif direction == "cs" then
+ local prevdirection = list[i-1].direction
+ if prevdirection == "en" then
+ if list[i+1].direction == "en" then
+ entry.direction = "en"
+ end
+ elseif prevdirection == "an" and list[i+1].direction == "an" then
+ entry.direction = "an"
+ end
+ end
+ end
+ else -- only more efficient when we have es/cs
+ local runner = start + 2
+ if runner <= limit then
+ local before = list[start]
+ local entry = list[start + 1]
+ local after = list[runner]
+ while after do
+ local direction = entry.direction
+ if direction == "es" then
+ if before.direction == "en" and after.direction == "en" then
+ entry.direction = "en"
+ end
+ elseif direction == "cs" then
+ local prevdirection = before.direction
+ if prevdirection == "en" then
+ if after.direction == "en" then
+ entry.direction = "en"
+ end
+ elseif prevdirection == "an" and after.direction == "an" then
+ entry.direction = "an"
+ end
+ end
+ before = current
+ current = after
+ after = list[runner]
+ runner = runner + 1
+ end
+ end
+ end
+-- end
+ -- W5
+-- if list.et then
+ local i = start
+ while i <= limit do
+ if list[i].direction == "et" then
+ local runstart = i
+ local runlimit = runstart
+ for i=runstart,limit do
+ if list[i].direction == "et" then
+ runlimit = i
+ else
+ break
+ end
+ end
+ local rundirection = runstart == start and sor or list[runstart-1].direction
+ if rundirection ~= "en" then
+ rundirection = runlimit == limit and orderafter or list[runlimit+1].direction
+ end
+ if rundirection == "en" then
+ for j=runstart,runlimit do
+ list[j].direction = "en"
+ end
+ end
+ i = runlimit
+ end
+ i = i + 1
+ end
+-- end
+ -- W6
+-- if list.es or list.cs or list.et then
+ for i=start,limit do
+ local entry = list[i]
+ local direction = entry.direction
+ if direction == "es" or direction == "et" or direction == "cs" then
+ entry.direction = "on"
+ end
+ end
+-- end
+ -- W7
+ for i=start,limit do
+ local entry = list[i]
+ if entry.direction == "en" then
+ local prev_strong = orderbefore
+ for j=i-1,start,-1 do
+ local direction = list[j].direction
+ if direction == "l" or direction == "r" then
+ prev_strong = direction
+ break
+ end
+ end
+ if prev_strong == "l" then
+ entry.direction = "l"
+ end
+ end
+ end
+end
+
+local function resolve_neutral(list,size,start,limit,orderbefore,orderafter)
+ -- N1, N2
+ for i=start,limit do
+ local entry = list[i]
+ if b_s_ws_on[entry.direction] then
+ -- this needs checking
+ local leading_direction, trailing_direction, resolved_direction
+ local runstart = i
+ local runlimit = runstart
+-- for j=runstart,limit do
+ for j=runstart+1,limit do
+ if b_s_ws_on[list[j].direction] then
+-- runstart = j
+ runlimit = j
+ else
+ break
+ end
+ end
+ if runstart == start then
+ leading_direction = orderbefore
+ else
+ leading_direction = list[runstart-1].direction
+ if leading_direction == "en" or leading_direction == "an" then
+ leading_direction = "r"
+ end
+ end
+ if runlimit == limit then
+ trailing_direction = orderafter
+ else
+ trailing_direction = list[runlimit+1].direction
+ if trailing_direction == "en" or trailing_direction == "an" then
+ trailing_direction = "r"
+ end
+ end
+ if leading_direction == trailing_direction then
+ -- N1
+ resolved_direction = leading_direction
+ else
+ -- N2 / does the weird period
+ resolved_direction = entry.level % 2 == 1 and "r" or "l"
+ end
+ for j=runstart,runlimit do
+ list[j].direction = resolved_direction
+ end
+ i = runlimit
+ end
+ i = i + 1
+ end
+end
+
+local function resolve_implicit(list,size,start,limit,orderbefore,orderafter,baselevel)
+ for i=start,limit do
+ local entry = list[i]
+ local level = entry.level
+ local direction = entry.direction
+ if level % 2 ~= 1 then -- even
+ -- I1
+ if direction == "r" then
+ entry.level = level + 1
+ elseif direction == "an" or direction == "en" then
+ entry.level = level + 2
+ end
+ else
+ -- I2
+ if direction == "l" or direction == "en" or direction == "an" then
+ entry.level = level + 1
+ end
+ end
+ end
+end
+
+local function resolve_levels(list,size,baselevel,analyze_fences)
+ -- X10
+ local start = 1
+ while start < size do
+ local level = list[start].level
+ local limit = start + 1
+ while limit < size and list[limit].level == level do
+ limit = limit + 1
+ end
+ local prev_level = start == 1 and baselevel or list[start-1].level
+ local next_level = limit == size and baselevel or list[limit+1].level
+ local orderbefore = (level > prev_level and level or prev_level) % 2 == 1 and "r" or "l"
+ local orderafter = (level > next_level and level or next_level) % 2 == 1 and "r" or "l"
+ -- W1 .. W7
+ resolve_weak(list,size,start,limit,orderbefore,orderafter)
+ -- N0
+ if analyze_fences then
+ resolve_fences(list,size,start,limit)
+ end
+ -- N1 .. N2
+ resolve_neutral(list,size,start,limit,orderbefore,orderafter)
+ -- I1 .. I2
+ resolve_implicit(list,size,start,limit,orderbefore,orderafter,baselevel)
+ start = limit
+ end
+ -- L1
+ for i=1,size do
+ local entry = list[i]
+ local direction = entry.original
+ -- (1)
+ if direction == "s" or direction == "b" then
+ entry.level = baselevel
+ -- (2)
+ for j=i-1,1,-1 do
+ local entry = list[j]
+ if whitespace[entry.original] then
+ entry.level = baselevel
+ else
+ break
+ end
+ end
+ end
+ end
+ -- (3)
+ for i=size,1,-1 do
+ local entry = list[i]
+ if whitespace[entry.original] then
+ entry.level = baselevel
+ else
+ break
+ end
+ end
+ -- L4
+ if analyze_fences then
+ for i=1,size do
+ local entry = list[i]
+ if entry.level % 2 == 1 then -- odd(entry.level)
+ if entry.mirror and not entry.paired then
+ entry.mirror = false
+ end
+ -- okay
+ elseif entry.mirror then
+ entry.mirror = false
+ end
+ end
+ else
+ for i=1,size do
+ local entry = list[i]
+ if entry.level % 2 == 1 then -- odd(entry.level)
+ local mirror = mirrordata[entry.char]
+ if mirror then
+ entry.mirror = mirror
+ end
+ end
+ end
+ end
+end
+
+local stack = { }
+
+local function insert_dir_points(list,size)
+ -- L2, but no actual reversion is done, we simply annotate where
+ -- begindir/endddir node will be inserted.
+ local maxlevel = 0
+ local toggle = true
+ for i=1,size do
+ local level = list[i].level
+ if level > maxlevel then
+ maxlevel = level
+ end
+ end
+ for level=0,maxlevel do
+ local started -- = false
+ local begindir -- = nil
+ local enddir -- = nil
+ local prev -- = nil
+ if toggle then
+ begindir = lefttoright_code
+ enddir = lefttoright_code
+ toggle = false
+ else
+ begindir = righttoleft_code
+ enddir = righttoleft_code
+ toggle = true
+ end
+ for i=1,size do
+ local entry = list[i]
+ if entry.level >= level then
+ if not started then
+ entry.begindir = begindir
+ started = true
+ end
+ else
+ if started then
+ prev.enddir = enddir
+ started = false
+ end
+ end
+ prev = entry
+ end
+ end
+ -- make sure to close the run at end of line
+ local last = list[size]
+ if not last.enddir then
+ local n = 0
+ for i=1,size do
+ local entry = list[i]
+ local e = entry.enddir
+ local b = entry.begindir
+ if e then
+ n = n - 1
+ end
+ if b then
+ n = n + 1
+ stack[n] = b
+ end
+ end
+ if n > 0 then
+ if trace_list and n > 1 then
+ report_directions("unbalanced list")
+ end
+ last.enddir = stack[n]
+ end
+ end
+end
+
+-- We flag nodes that can be skipped when we see them again but because whatever
+-- mechanism can inject dir nodes that then are not flagged, we don't flag dir
+-- nodes that we inject here.
+
+local function apply_to_list(list,size,head,pardir)
+ local index = 1
+ local current = head
+ if trace_list then
+ report_directions("start run")
+ end
+ while current do
+ if index > size then
+ report_directions("fatal error, size mismatch")
+ break
+ end
+ local id = getid(current) -- we can better store the id in list[index]
+ local entry = list[index]
+ local begindir = entry.begindir
+ local enddir = entry.enddir
+ local p = properties[current]
+ if p then
+ p.directions = true
+ else
+ properties[current] = { directions = true }
+ end
+ if id == glyph_code then
+ local mirror = entry.mirror
+ if mirror then
+ setchar(current,mirror)
+ end
+ if trace_directions then
+ local direction = entry.direction
+ if trace_list then
+ local original = entry.original
+ local char = entry.char
+ local level = entry.level
+ if direction == original then
+ report_directions("%2i : %C : %s",level,char,direction)
+ else
+ report_directions("%2i : %C : %s -> %s",level,char,original,direction)
+ end
+ end
+ setcolor(current,direction,false,mirror)
+ end
+ elseif id == hlist_code or id == vlist_code then
+ setdirection(current,pardir) -- is this really needed?
+ elseif id == glue_code then
+ -- Maybe I should also fix dua and dub but on the other hand ... why?
+ if enddir and getsubtype(current) == parfillskip_code then
+ -- insert the last enddir before \parfillskip glue
+ local c = current
+ local p = getprev(c)
+ if p and getid(p) == glue_code and getsubtype(p) == parfillleftskip_code then
+ c = p
+ p = getprev(c)
+ end
+ if p and getid(p) == penalty_code then -- linepenalty
+ c = p
+ end
+ -- there is always a par nodes so head will stay
+ head = insert_node_before(head,c,new_direction(enddir,true))
+ enddir = false
+ end
+ elseif begindir then
+ if id == par_code and start_of_par(current) then
+ -- par should always be the 1st node
+ head, current = insert_node_after(head,current,new_direction(begindir))
+ begindir = nil
+ end
+ end
+ if begindir then
+ head = insert_node_before(head,current,new_direction(begindir))
+ end
+ local skip = entry.skip
+ if skip and skip > 0 then
+ for i=1,skip do
+ current = getnext(current)
+ local p = properties[current]
+ if p then
+ p.directions = true
+ else
+ properties[current] = { directions = true }
+ end
+ end
+ end
+ if enddir then
+ head, current = insert_node_after(head,current,new_direction(enddir,true))
+ end
+ if not entry.remove then
+ current = getnext(current)
+ elseif remove_controls then
+ -- X9
+ head, current = remove_node(head,current,true)
+ else
+ current = getnext(current)
+ end
+ index = index + 1
+ end
+ if trace_list then
+ report_directions("stop run")
+ end
+ return head
+end
+
+-- If needed we can optimize for only_one. There is no need to do anything
+-- when it's not a glyph. Otherwise we only need to check mirror and apply
+-- directions when it's different from the surrounding. Paragraphs always
+-- have more than one node. Actually, we only enter this function when we
+-- do have a glyph!
+
+local function process(head,direction,only_one,where)
+ -- for the moment a whole paragraph property
+ local attr = getattr(head,a_directions)
+ local analyze_fences = getfences(attr)
+ --
+ local list, size = build_list(head,where)
+ local baselevel, dirfound = get_baselevel(head,list,size,direction)
+ if trace_details then
+ report_directions("analyze: baselevel %a",baselevel == righttoleft_code and "r2l" or "l2r")
+ report_directions("before : %s",show_list(list,size,"original"))
+ end
+ resolve_explicit(list,size,baselevel)
+ resolve_levels(list,size,baselevel,analyze_fences)
+ insert_dir_points(list,size)
+ if trace_details then
+ report_directions("after : %s",show_list(list,size,"direction"))
+ report_directions("result : %s",show_done(list,size))
+ end
+ return apply_to_list(list,size,head,baselevel)
+end
+
+local variables = interfaces.variables
+
+directions.installhandler(variables.one, process) -- for old times sake
+directions.installhandler(variables.two, process) -- for old times sake
+directions.installhandler(variables.three, process) -- for old times sake
+directions.installhandler(variables.unicode,process)
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-fkr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-fkr.mkxl
new file mode 100644
index 00000000000..f56294dc057
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-fkr.mkxl
@@ -0,0 +1,38 @@
+%D \module
+%D [ file=typo-fkr,
+%D version=2016.10.10,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Additional Font Kerning,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Typesetting Macros / Additional Font Kerning}
+
+\registerctxluafile{typo-fkr}{}
+
+\definesystemattribute[extrafontkern][public]
+
+\unprotect
+
+% none : not across fonts (but still within)
+% min : min value across fonts
+% max : max value across fonts
+% mixed : mean value across fonts
+% reset : disable
+
+\permanent\protected\def\setextrafontkerns[#1]% % can be public implementor
+ {\clf_setextrafontkerns{#1}}
+
+\permanent\protected\def\resetextrafontkerns
+ {\c_attr_extrafontkern\attributeunsetvalue}
+
+\appendtoks
+ \resetextrafontkerns
+\to \everyresettypesetting
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-fln.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-fln.lmt
new file mode 100644
index 00000000000..fa507df4b1a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-fln.lmt
@@ -0,0 +1,406 @@
+if not modules then modules = { } end modules ['typo-fln'] = {
+ version = 1.001,
+ comment = "companion to typo-fln.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- When I ran into the following experimental code again, I figured that it dated
+-- from the early days of mkiv, so I updates it a bit to fit into todays context.
+-- In the process I might have messed up things. For instance we had a diffent
+-- wrapper then using head and tail.
+
+-- todo: only letters (no punctuation)
+-- todo: nuts
+
+local trace_firstlines = false trackers.register("typesetters.firstlines", function(v) trace_firstlines = v end)
+local report_firstlines = logs.reporter("nodes","firstlines")
+
+typesetters.firstlines = typesetters.firstlines or { }
+local firstlines = typesetters.firstlines
+
+local nodes = nodes
+
+local tasks = nodes.tasks
+local enableaction = tasks.enableaction
+local disableaction = tasks.disableaction
+
+local context = context
+local implement = interfaces.implement
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local setboth = nuts.setboth
+local getid = nuts.getid
+local getwidth = nuts.getwidth
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getattr = nuts.getattr
+local getbox = nuts.getbox
+local getdisc = nuts.getdisc
+local setdisc = nuts.setdisc
+local setlink = nuts.setlink
+local setfont = nuts.setfont
+local setglyphdata = nuts.setglyphdata
+local getprop = nuts.getprop
+local setprop = nuts.setprop
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local par_code = nodecodes.par
+
+local spaceskip_code = nodes.gluecodes.spaceskip
+
+local nextglyph = nuts.traversers.glyph
+local nextdisc = nuts.traversers.disc
+
+local flush_node_list = nuts.flush_list
+local flush_node = nuts.flush_node
+local copy_node_list = nuts.copy_list
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local remove_node = nuts.remove
+local getdimensions = nuts.dimensions
+local hpack_node_list = nuts.hpack
+local start_of_par = nuts.start_of_par
+
+local setcoloring = nuts.colors.set
+
+local nodepool = nuts.pool
+local newpenalty = nodepool.penalty
+local newkern = nodepool.kern
+local tracerrule = nodes.tracers.pool.nuts.rule
+
+local actions = { }
+firstlines.actions = actions
+
+local a_firstline = attributes.private('firstline')
+
+local texget = tex.get
+
+local variables = interfaces.variables
+local v_default = variables.default
+local v_line = variables.line
+local v_word = variables.word
+
+local function set(par,specification)
+ enableaction("processors","typesetters.firstlines.handler")
+ if trace_firstlines then
+ report_firstlines("enabling firstlines")
+ end
+ setprop(par,a_firstline,specification)
+end
+
+function firstlines.set(specification)
+ nuts.setparproperty(set,specification)
+end
+
+implement {
+ name = "setfirstline",
+ actions = firstlines.set,
+ arguments = {
+ {
+ { "alternative" },
+ { "font", "integer" },
+ { "dynamic", "integer" },
+ { "ma", "integer" },
+ { "ca", "integer" },
+ { "ta", "integer" },
+ { "n", "integer" },
+ }
+ }
+}
+
+actions[v_line] = function(head,setting)
+ local dynamic = setting.dynamic
+ local font = setting.font
+ local noflines = setting.n or 1
+ local ma = setting.ma or 0
+ local ca = setting.ca
+ local ta = setting.ta
+ local hangafter = texget("hangafter")
+ local hangindent = texget("hangindent")
+ local parindent = texget("parindent")
+ local nofchars = 0
+ local n = 0
+ local temp = copy_node_list(head)
+ local linebreaks = { }
+
+ local set = function(head)
+ for g in nextglyph, head do
+ if dynamic > 0 then
+ setglyphdata(g,dynamic)
+ end
+ setfont(g,font)
+ end
+ end
+
+ set(temp)
+
+ for g in nextdisc, temp do
+ local pre, post, replace = getdisc(g)
+ if pre then
+ set(pre)
+ end
+ if post then
+ set(post)
+ end
+ if replace then
+ set(replace)
+ end
+ end
+
+ local start = temp
+ local list = temp
+ local prev = temp
+ for i=1,noflines do
+ local hsize = texget("hsize") - texget("leftskip",false) - texget("rightskip",false)
+ if i == 1 then
+ hsize = hsize - parindent
+ end
+ if i <= - hangafter then
+ hsize = hsize - hangindent
+ end
+
+ local function list_dimensions(list,start)
+ local temp = copy_node_list(list,start)
+ temp = nodes.handlers.characters(temp)
+ temp = nodes.injections.handler(temp)
+ -- temp = typesetters.fontkerns.handler(temp) -- maybe when enabled
+ -- nodes.handlers.protectglyphs(temp) -- not needed as we discard
+ -- temp = typesetters.spacings.handler(temp) -- maybe when enabled
+ -- temp = typesetters.kerns.handler(temp) -- maybe when enabled
+ -- temp = typesetters.cases.handler(temp) -- maybe when enabled
+ local width = getdimensions(temp)
+ flush_node_list(temp)
+ return width
+ end
+
+ local function try(extra)
+ local width = list_dimensions(list,start)
+ if extra then
+ width = width + list_dimensions(extra)
+ end
+ -- report_firstlines("line length: %p, progression: %p, text: %s",hsize,width,nodes.listtoutf(list,nil,nil,start))
+ if width > hsize then
+ list = prev
+ return true
+ else
+ linebreaks[i] = n
+ prev = start
+ nofchars = n
+ end
+ end
+
+ while start do
+ local id = getid(start)
+ if id == glyph_code then
+ -- go on
+ elseif id == disc_code then
+ -- this could be an option
+ n = n + 1
+ local pre, post, replace = getdisc(start)
+ if pre and try(pre) then
+ break
+ elseif replace and try(replace) then
+ break
+ end
+ elseif id == kern_code then -- todo: fontkern
+ -- this could be an option
+ elseif id == glue_code then
+ n = n + 1
+ if try() then
+ break
+ end
+ end
+ start = getnext(start)
+ end
+ if not linebreaks[i] then
+ linebreaks[i] = n
+ end
+ end
+
+ flush_node_list(temp)
+
+ local start = head
+ local n = 0
+
+ local function update(start)
+ if dynamic > 0 then
+ setglyphdata(start,dynamic)
+ end
+ setfont(start,font)
+ setcoloring(ma,ca,ta)
+ end
+
+ for i=1,noflines do
+ local linebreak = linebreaks[i]
+ while start and n < nofchars do
+ local id = getid(start)
+ local ok = false
+ if id == glyph_code then
+ update(start)
+ elseif id == disc_code then
+ n = n + 1
+ local disc = start
+ local pre, post, replace, pretail, posttail, replacetail = getdisc(disc,true)
+ if linebreak == n then
+ local p, n = getboth(start)
+ if pre then
+ for current in nextglyph, pre do
+ update(current)
+ end
+ setlink(pretail,n)
+ setlink(p,pre)
+ start = pretail
+ pre = nil
+ else
+ setlink(p,n)
+ start = p
+ end
+ if post then
+ local p, n = getboth(start)
+ setlink(posttail,n)
+ setlink(start,post)
+ post = nil
+ end
+ else
+ local p, n = getboth(start)
+ if replace then
+ for current in nextglyph, replace do
+ update(current)
+ end
+ setlink(replacetail,n)
+ setlink(p,replace)
+ start = replacetail
+ replace = nil
+ else
+ setlink(p,n)
+ start = p
+ end
+ end
+ setdisc(disc,pre,post,replace)
+ flush_node(disc)
+ elseif id == glue_code then
+ n = n + 1
+ if linebreak ~= n then
+ head = insert_node_before(head,start,newpenalty(10000)) -- nobreak
+ end
+ end
+ local next = getnext(start)
+ if linebreak == n then
+ if start ~= head then
+ local where = id == glue_code and getprev(start) or start
+ if trace_firstlines then
+ head, where = insert_node_after(head,where,newpenalty(10000)) -- nobreak
+ head, where = insert_node_after(head,where,newkern(-65536))
+ head, where = insert_node_after(head,where,tracerrule(65536,4*65536,2*65536,"darkblue"))
+ end
+ head, where = insert_node_after(head,where,newpenalty(-10000)) -- break
+ end
+ start = next
+ break
+ end
+ start = next
+ end
+ end
+
+ return head
+end
+
+actions[v_word] = function(head,setting)
+ -- local attribute = fonts.specifiers.contextnumber(setting.feature) -- was experimental
+ local dynamic = setting.dynamic
+ local font = setting.font
+ local words = 0
+ local nofwords = setting.n or 1
+ local start = head
+ local ok = false
+ local ma = setting.ma or 0
+ local ca = setting.ca
+ local ta = setting.ta
+ while start do
+ local id = getid(start)
+ -- todo: delete disc nodes
+ if id == glyph_code then
+ if not ok then
+ words = words + 1
+ ok = true
+ end
+ setcoloring(ma,ca,ta)
+ if dynamic > 0 then
+ setglyphdata(start,dynamic)
+ end
+ setfont(start,font)
+ elseif id == disc_code then
+ -- continue
+ elseif id == kern_code then -- todo: fontkern
+ -- continue
+ else
+ ok = false
+ if words == nofwords then
+ break
+ end
+ end
+ start = getnext(start)
+ end
+ return head
+end
+
+actions[v_default] = actions[v_line]
+
+function firstlines.handler(head)
+ if getid(head) == par_code and start_of_par(head) then
+ local settings = getprop(head,a_firstline)
+ if settings then
+ disableaction("processors","typesetters.firstlines.handler")
+ local alternative = settings.alternative or v_default
+ local action = actions[alternative] or actions[v_default]
+ if action then
+ if trace_firstlines then
+ report_firstlines("processing firstlines, alternative %a",alternative)
+ end
+ return action(head,settings)
+ end
+ end
+ end
+ return head
+end
+
+-- goodie
+
+local function applytofirstcharacter(box,what)
+ local tbox = getbox(box) -- assumes hlist
+ local list = getlist(tbox)
+ local done = nil
+ for n in nextglyph, list do
+ list = remove_node(list,n)
+ done = n
+ break
+ end
+ if done then
+ setlist(tbox,list)
+ local kind = type(what)
+ if kind == "string" then
+ context[what](tonode(done))
+ elseif kind == "function" then
+ what(done)
+ else
+ -- error
+ end
+ end
+end
+
+implement {
+ name = "applytofirstcharacter",
+ actions = applytofirstcharacter,
+ arguments = { "integer", "string" }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-fln.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-fln.mkxl
new file mode 100644
index 00000000000..3ef688bb55a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-fln.mkxl
@@ -0,0 +1,109 @@
+%D \module
+%D [ file=typo-fln,
+%D version=2013.08.22, % comes from the few years older m-newstuff
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=First Lines,
+%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 Typesetting Macros / First Lines}
+
+%D I had this code laying around for a while \unknown\ probably as a side effect
+%D of cleaning up the supp-fun modules. There is probably room for improvement
+%D and more features.
+
+% \setupbodyfont[pagella]
+%
+% \starttext
+%
+% \setupindenting[medium,yes]
+%
+% \definefirstline
+% [smallcaps]
+% [alternative=line,
+% color=darkred,
+% style=\setfontfeature{smallcaps}]
+%
+% \setfirstline[smallcaps] \input tufte \par
+% \setfirstline[smallcaps] \input ward \par
+% \setfirstline[smallcaps] \input knuth \par
+% \setfirstline[smallcaps] \input bryson \par
+%
+% \definefirstline
+% [smallcaps]
+% [alternative=word,
+% color=darkblue,
+% style=bold,
+% n=2]
+%
+% \setfirstline[smallcaps] \input tufte \par
+% \setfirstline[smallcaps] \input ward \par
+% \setfirstline[smallcaps] \input knuth \par
+% \setfirstline[smallcaps] \input bryson \par
+%
+% \stoptext
+
+\unprotect
+
+\registerctxluafile{typo-fln}{autosuffix}
+
+\definesystemattribute[firstline][public]
+
+\appendtoks
+ \c_attr_firstline\attributeunsetvalue
+\to \everyforgetall
+
+\installcorenamespace {firstline}
+
+\installcommandhandler \??firstline {firstline} \??firstline
+
+\setupfirstline
+ [\c!alternative=\v!line,
+ %\c!style=,
+ %\c!color=,
+ \c!n=1]
+
+\permanent\tolerant\protected\def\setfirstline[#1]%
+ {\edef\typo_firstline_handle{\typo_firstline_handle_indeed{#1}}}
+
+\protected\def\typo_firstline_handle_indeed#1%
+ {\dontleavehmode
+ \begingroup
+ \edef\currentfirstline{#1}%
+ \usefirstlinestyleandcolor\c!style\c!color
+ \clf_setfirstline
+ alternative {\firstlineparameter\c!alternative}%
+ ma \c_attr_colormodel
+ ca \c_attr_color
+ ta \c_attr_transparency
+ n \numexpr\firstlineparameter\c!n\relax
+ font \fontid\font
+ dynamic \font_dynamic_value
+ \relax
+% \kern\zeropoint % we need a node
+% \hskip\zeropoint\s!plus\emwidth\relax % can be an option
+ \endgroup
+ \glet\typo_firstline_handle\relax}
+
+\let\typo_firstline_handle\relax
+
+% goodie, question on list
+%
+% \defineframed[ChapterFramed][location=low,background=color,backgroundcolor=red,frame=off]
+%
+% \setuphead[chapter][deeptextcommand=\applytofirstcharacter\ChapterFramed]
+
+\permanent\protected\def\applytofirstcharacter#1%
+ {\begingroup
+ \dowithnextbox
+ {\clf_applytofirstcharacter\nextbox{\csstring#1}%
+ \unhbox\nextbox
+ \endgroup}%
+ \hbox}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-ini.lmt
new file mode 100644
index 00000000000..c45d2966436
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-ini.lmt
@@ -0,0 +1,11 @@
+if not modules then modules = { } end modules ['typo-ini'] = {
+ version = 1.001,
+ comment = "companion to typo-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- nothing yet
+
+typesetters = typesetters or { }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-ini.mkxl
new file mode 100644
index 00000000000..3c081d8ca40
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-ini.mkxl
@@ -0,0 +1,49 @@
+%D \module
+%D [ file=typo-ini,
+%D version=2000.16.09,
+%D title=\CONTEXT\ Typographic Macros,
+%D subtitle=Initialization,
+%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 Since \CONTEXT\ is dealing with typographics, isn't
+%D September 2000 a bit late to start writing this module? It
+%D may seem so, but since more and more languages are
+%D supported, we think it is time to isolate language specific
+%D typographic extensions in modules. The first language that
+%D demands this is Chinese, and more will follow.
+
+\writestatus{loading}{ConTeXt Typographic Macros / Initialization}
+
+\registerctxluafile{typo-ini}{autosuffix}
+
+\unprotect
+
+% This will be done differently:
+%
+% %D \macros
+% %D {ifvertical}
+% %D
+% %D The following switch can be used to signal macros that they
+% %D should adapt their behaviour.
+%
+% \newif\ifvertical % maybe also ifreverse
+%
+% %D \macros
+% %D {vhbox}
+% %D
+% %D A stupid but useful macro.
+%
+% \def\vhbox{\ifvertical\vbox\else\hbox\fi}
+
+%D \macros
+%D {everyresettypesetting}
+
+\newtoks\everyresettypesetting
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-inj.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-inj.mkxl
new file mode 100644
index 00000000000..f615014b04f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-inj.mkxl
@@ -0,0 +1,75 @@
+%D \module
+%D [ file=typo-inj,
+%D version=2014.10.13,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Triggering Actions,
+%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 Typesetting Macros / Triggering Actions}
+
+%D This is a sort of escape from too automatic typesetting of lists. I have
+%D been thinking fo a more generic injector for instance based on tags (as we
+%D already index each element) but thi sis sort of fuzzy because the number of a
+%D tag is not always incremented before we check for it. Also, registers and lists
+%D are among the few candidates that cannot be controlled directly by putting
+%D something in the input. So,m for the moment I stick to this mechanism but
+%D future versions of \CONTEXT\ might do it differently. Compatibility is not much
+%D of an issue here as this mechanism is only to be used in final production runs.
+
+\unprotect
+
+\registerctxluafile{typo-inj}{}
+
+% todo: no need in trialmode
+
+%D \showinjector
+%D
+%D \setinjector[register][3][\column]
+%D \setinjector[list] [2][{\blank[3*big]}]
+%D
+%D \starttext
+%D \placelist[section][criterium=text]
+%D \blank[3*big]
+%D \placeregister[index][criterium=text]
+%D \page
+%D \startsection[title=Alpha] first \index{first} \stopsection
+%D \startsection[title=Beta] second \index{second} \stopsection
+%D \startsection[title=Gamma] third \index{third} \stopsection
+%D \startsection[title=Delta] fourth \index{fourth} \stopsection
+%D \stoptext
+
+\permanent \protected\def\resetinjector [#1]{\clf_resetinjector{#1}}
+\permanent \protected\def\markinjector [#1]{\dontleavehmode\clf_markinjector{#1}}
+\permanent\tolerant\protected\def\checkinjector [#1]#*[#2]{\clf_checkinjector{#1}{#2}}
+\permanent \protected\def\checknextinjector [#1]{\clf_checkinjector{#1}{\v!next}}
+\permanent \protected\def\checkpreviousinjector [#1]{\clf_checkinjector{#1}{\v!previous}}
+%permanent \protected\def\checknextinjector [#1]{\clf_checknextinjector{#1}}
+%permanent \protected\def\checkpreviousinjector [#1]{\clf_checkpreviousinjector{#1}}
+\permanent\tolerant\protected\def\setinjector [#1]#*[#2]#*[#3]{\clf_setinjector{#1}{#2}{#3}}
+\permanent\tolerant\protected\def\showinjector [#1]{\clf_showinjector{#1}}
+
+\permanent\protected\def\domarkinjector#1#2% called at the lua end
+ {\dontleavehmode\llap{\infofont\ifcase#1\else\red\fi<#2>\quad}}
+
+% low level definers .. we could have \injectors_mark and \injectors_check and then
+% use \v!list instead of \s!list
+
+\permanent\protected\def\doinstallinjector#1%
+ {\letcsname typo_injectors_mark_#1\endcsname\donothing
+ \letcsname typo_injectors_check_#1\endcsname\donothing}
+
+\permanent\protected\def\doactivateinjector#1% used at lua end
+ {\protected\defcsname typo_injectors_mark_#1\endcsname{\dontleavehmode\noexpand\clf_markinjector{#1}}%
+ \protected\defcsname typo_injectors_check_#1\endcsname{\noexpand\clf_checkinjector{#1}}}
+
+\permanent\protected\def\dotestinjector#1% only for testing outside unprotect
+ {\begincsname typo_injectors_check_#1\endcsname
+ \begincsname typo_injectors_mark_#1\endcsname}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-itc.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-itc.lmt
new file mode 100644
index 00000000000..4350053b367
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-itc.lmt
@@ -0,0 +1,703 @@
+if not modules then modules = { } end modules ['typo-itc'] = {
+ version = 1.001,
+ comment = "companion to typo-itc.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local tonumber = tonumber
+
+local trace_italics = false trackers.register("typesetters.italics", function(v) trace_italics = v end)
+
+local report_italics = logs.reporter("nodes","italics")
+
+local threshold = 0.5 trackers.register("typesetters.threshold", function(v) threshold = v == true and 0.5 or tonumber(v) end)
+
+typesetters.italics = typesetters.italics or { }
+local italics = typesetters.italics
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local disc_code = nodecodes.disc
+local math_code = nodecodes.math
+
+local enableaction = nodes.tasks.enableaction
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+
+local getprev = nuts.getprev
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getchar = nuts.getchar
+local getdisc = nuts.getdisc
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getattrlist = nuts.getattrlist
+local setattrlist = nuts.setattrlist
+local setdisc = nuts.setdisc
+local isglyph = nuts.isglyph
+local setkern = nuts.setkern
+local getkern = nuts.getkern
+local getheight = nuts.getheight
+
+local insert_node_after = nuts.insert_after
+local remove_node = nuts.remove
+local end_of_math = nuts.end_of_math
+
+local texgetattribute = tex.getattribute
+local texsetattribute = tex.setattribute
+local a_italics = attributes.private("italics")
+local a_mathitalics = attributes.private("mathitalics")
+
+local unsetvalue = attributes.unsetvalue
+
+local new_correction_kern = nodepool.italickern
+local new_correction_glue = nodepool.glue
+
+local fonthashes = fonts.hashes
+local fontdata = fonthashes.identifiers
+local italicsdata = fonthashes.italics
+local exheights = fonthashes.exheights
+local chardata = fonthashes.characters
+
+local is_punctuation = characters.is_punctuation
+
+local implement = interfaces.implement
+
+local forcedvariant = false
+
+function typesetters.italics.forcevariant(variant)
+ forcedvariant = variant
+end
+
+-- We use the same key as the tex font handler. So, if a valua has already be set, we
+-- use that one.
+
+local function setitalicinfont(font,char)
+ local tfmdata = fontdata[font]
+ local character = tfmdata.characters[char]
+ if character then
+ local italic = character.italic
+ if not italic then
+ local autoitalicamount = tfmdata.properties.autoitalicamount or 0
+ if autoitalicamount ~= 0 then
+ local description = tfmdata.descriptions[char]
+ if description then
+ italic = description.italic
+ if not italic then
+ local boundingbox = description.boundingbox
+ italic = boundingbox[3] - description.width + autoitalicamount
+ if italic < 0 then -- < 0 indicates no overshoot or a very small auto italic
+ italic = 0
+ end
+ end
+ if italic ~= 0 then
+ italic = italic * tfmdata.parameters.hfactor
+ end
+ end
+ end
+ if trace_italics then
+ report_italics("setting italic correction of %C of font %a to %p",char,font,italic)
+ end
+ if not italic then
+ italic = 0
+ end
+ character.italic = italic
+ end
+ return italic
+ else
+ return 0
+ end
+end
+
+-- todo: clear attribute
+
+local function okay(data,current,font,prevchar,previtalic,char,what)
+ if data then
+ if trace_italics then
+ report_italics("ignoring %p between %s italic %C and italic %C",previtalic,what,prevchar,char)
+ end
+ return false
+ end
+ if threshold then
+ -- if getid(current) == glyph_code then
+ while current and getid(current) ~= glyph_code do
+ current = getprev(current)
+ end
+ if current then
+ local ht = getheight(current)
+ local ex = exheights[font]
+ local th = threshold * ex
+ if ht <= th then
+ if trace_italics then
+ report_italics("ignoring correction between %s italic %C and regular %C, height %p less than threshold %p",prevchar,what,char,ht,th)
+ end
+ return false
+ end
+ else
+ -- maybe backtrack to glyph
+ end
+ end
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and regular %C",previtalic,what,prevchar,char)
+ end
+ return true
+end
+
+-- maybe: with_attributes(current,n) :
+--
+-- local function correction_kern(kern,n)
+-- return with_attributes(new_correction_kern(kern),n)
+-- end
+
+local function correction_kern(kern,n)
+ local k = new_correction_kern(kern)
+ if n then
+-- local a = getattrlist(n)
+-- if a then -- maybe not
+-- setattrlist(k,a) -- can be a marked content (border case)
+-- end
+ setattrlist(k,n) -- can be a marked content (border case)
+ end
+ return k
+end
+
+local function correction_glue(glue,n)
+ local g = new_correction_glue(glue)
+ if n then
+-- local a = getattrlist(n)
+-- if a then -- maybe not
+-- setattrlist(g,a) -- can be a marked content (border case)
+-- end
+ setattrlist(g,n) -- can be a marked content (border case)
+ end
+ return g
+end
+
+local mathokay = false
+local textokay = false
+local enablemath = false
+local enabletext = false
+
+local function domath(head,current)
+ current = end_of_math(current)
+ local next = getnext(current)
+ if next then
+ local char, id = isglyph(next)
+ if char then
+ -- we can have an old font where italic correction has been applied
+ -- or a new one where it hasn't been done
+ local kern = getprev(current)
+ if kern and getid(kern) == kern_code then
+ local glyph = getprev(kern)
+ if glyph and getid(glyph) == glyph_code then
+ -- [math: <glyph><kern>]<glyph> : we remove the correction when we have
+ -- punctuation
+ if is_punctuation[char] then
+ local a = getattr(glyph,a_mathitalics)
+ if a and (a < 100 or a > 100) then
+ if a > 100 then
+ a = a - 100
+ else
+ a = a + 100
+ end
+ local i = getkern(kern)
+ local c, f = isglyph(glyph)
+ if getheight(next) < 1.25*exheights[f] then
+ if i == 0 then
+ if trace_italics then
+ report_italics("%s italic %p between math %C and punctuation %C","ignoring",i,c,char)
+ end
+ else
+ if trace_italics then
+ report_italics("%s italic between math %C and punctuation %C","removing",i,c,char)
+ end
+ setkern(kern,0) -- or maybe a small value or half the ic
+ end
+ elseif i == 0 then
+ local d = chardata[f][c]
+ local i = d.italic
+ if i == 0 then
+ if trace_italics then
+ report_italics("%s italic %p between math %C and punctuation %C","ignoring",i,c,char)
+ end
+ else
+ setkern(kern,i)
+ if trace_italics then
+ report_italics("%s italic %p between math %C and punctuation %C","setting",i,c,char)
+ end
+ end
+ elseif trace_italics then
+ report_italics("%s italic %p between math %C and punctuation %C","keeping",k,c,char)
+ end
+ end
+ end
+ end
+ else
+ local glyph = kern
+ if glyph and getid(glyph) == glyph_code then
+ -- [math: <glyph>]<glyph> : we add the correction when we have
+ -- no punctuation
+ if not is_punctuation[char] then
+ local a = getattr(glyph,a_mathitalics)
+ if a and (a < 100 or a > 100) then
+ if a > 100 then
+ a = a - 100
+ else
+ a = a + 100
+ end
+ if trace_italics then
+ report_italics("%s italic %p between math %C and non punctuation %C","adding",a,getchar(glyph),char)
+ end
+ insert_node_after(head,glyph,correction_kern(a,glyph))
+ end
+ end
+ end
+ end
+ end
+ end
+ return current
+end
+
+local function mathhandler(head)
+ local current = head
+ while current do
+ if getid(current) == math_code then
+ current = domath(head,current)
+ end
+ current = getnext(current)
+ end
+ return head
+end
+
+local function texthandler(head)
+
+ local prev = nil
+ local prevchar = nil
+ local prevhead = head
+ local previtalic = 0
+ local previnserted = nil
+
+ local pre = nil
+ local pretail = nil
+
+ local post = nil
+ local posttail = nil
+ local postchar = nil
+ local posthead = nil
+ local postitalic = 0
+ local postinserted = nil
+
+ local replace = nil
+ local replacetail = nil
+ local replacechar = nil
+ local replacehead = nil
+ local replaceitalic = 0
+ local replaceinserted = nil
+
+ local current = prevhead
+ local lastfont = nil
+ local lastattr = nil
+
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local font = id
+ local data = italicsdata[font]
+ if font ~= lastfont then
+ if previtalic ~= 0 then
+ if okay(data,current,font,prevchar,previtalic,char,"glyph") then
+ insert_node_after(prevhead,prev,correction_kern(previtalic,current))
+ end
+ elseif previnserted and data then
+ if trace_italics then
+ report_italics("deleting last correction before %s %C",char,"glyph")
+ end
+ remove_node(prevhead,previnserted,true)
+ else
+ --
+ if replaceitalic ~= 0 then
+ if okay(data,replace,font,replacechar,replaceitalic,char,"replace") then
+ insert_node_after(replacehead,replace,correction_kern(replaceitalic,current))
+ end
+ replaceitalic = 0
+ elseif replaceinserted and data then
+ if trace_italics then
+ report_italics("deleting last correction before %s %C","replace",char)
+ end
+ remove_node(replacehead,replaceinserted,true)
+ end
+ --
+ if postitalic ~= 0 then
+ if okay(data,post,font,postchar,postitalic,char,"post") then
+ insert_node_after(posthead,post,correction_kern(postitalic,current))
+ end
+ postitalic = 0
+ elseif postinserted and data then
+ if trace_italics then
+ report_italics("deleting last correction before %s %C","post",char)
+ end
+ remove_node(posthead,postinserted,true)
+ end
+ end
+ --
+ lastfont = font
+ end
+ if data then
+ local attr = forcedvariant or getattr(current,a_italics)
+ if attr and attr > 0 then
+ local cd = data[char]
+ if not cd then
+ -- this really can happen
+ previtalic = 0
+ else
+ previtalic = cd.italic
+ if not previtalic then
+ previtalic = setitalicinfont(font,char) -- calculated once
+ -- previtalic = 0
+ end
+ if previtalic ~= 0 then
+ lastfont = font
+ lastattr = attr
+ prev = current
+ -- prevhead = head
+ prevchar = char
+ end
+ end
+ else
+ previtalic = 0
+ end
+ else
+ previtalic = 0
+ end
+ previnserted = nil
+ replaceinserted = nil
+ postinserted = nil
+ elseif id == disc_code then
+ previnserted = nil
+ previtalic = 0
+ replaceinserted = nil
+ replaceitalic = 0
+ postinserted = nil
+ postitalic = 0
+ updated = false
+ replacefont = nil
+ postfont = nil
+ pre, post, replace, pretail, posttail, replacetail = getdisc(current,true)
+ if replace then
+ local current = replacetail
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local font = id
+ if font ~= lastfont then
+ local data = italicsdata[font]
+ if data then
+ local attr = forcedvariant or getattr(current,a_italics)
+ if attr and attr > 0 then
+ local cd = data[char]
+ if not cd then
+ -- this really can happen
+ replaceitalic = 0
+ else
+ replaceitalic = cd.italic
+ if not replaceitalic then
+ replaceitalic = setitalicinfont(font,char) -- calculated once
+ -- replaceitalic = 0
+ end
+ if replaceitalic ~= 0 then
+ lastfont = font
+ lastattr = attr
+ replacechar = char
+ replacehead = replace
+ updated = true
+ end
+ end
+ end
+ end
+ replacefont = font
+ end
+ break
+ else
+ current = getprev(current)
+ end
+ end
+ end
+ if post then
+ local current = posttail
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local font = id
+ if font ~= lastfont then
+ local data = italicsdata[font]
+ if data then
+ local attr = forcedvariant or getattr(current,a_italics)
+ if attr and attr > 0 then
+ local cd = data[char]
+ if not cd then
+ -- this really can happen
+ -- postitalic = 0
+ else
+ postitalic = cd.italic
+ if not postitalic then
+ postitalic = setitalicinfont(font,char) -- calculated once
+ -- postitalic = 0
+ end
+ if postitalic ~= 0 then
+ lastfont = font
+ lastattr = attr
+ postchar = char
+ posthead = post
+ updated = true
+ end
+ end
+ end
+ end
+ postfont = font
+ end
+ break
+ else
+ current = getprev(current)
+ end
+ end
+ end
+ if replacefont or postfont then
+ lastfont = replacefont or postfont
+ end
+ if updated then
+ setdisc(current,pre,post,replace)
+ end
+ elseif id == kern_code then -- how about fontkern ?
+ previnserted = nil
+ previtalic = 0
+ replaceinserted = nil
+ replaceitalic = 0
+ postinserted = nil
+ postitalic = 0
+ elseif id == glue_code then
+ if previtalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and glue",previtalic,"glyph",prevchar)
+ end
+ previnserted = correction_glue(previtalic,current) -- maybe just add ? else problem with penalties
+ previtalic = 0
+ insert_node_after(prevhead,prev,previnserted)
+ else
+ if replaceitalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and glue",replaceitalic,"replace",replacechar)
+ end
+ replaceinserted = correction_kern(replaceitalic,current) -- needs to be a kern
+ replaceitalic = 0
+ insert_node_after(replacehead,replace,replaceinserted)
+ end
+ if postitalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and glue",postitalic,"post",postchar)
+ end
+ postinserted = correction_kern(postitalic,current) -- needs to be a kern
+ postitalic = 0
+ insert_node_after(posthead,post,postinserted)
+ end
+ end
+ elseif id == math_code then
+ -- is this still needed ... the current engine implementation has been redone
+ previnserted = nil
+ previtalic = 0
+ replaceinserted = nil
+ replaceitalic = 0
+ postinserted = nil
+ postitalic = 0
+ if mathokay then
+ current = domath(head,current)
+ else
+ current = end_of_math(current)
+ end
+ else
+ if previtalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and whatever",previtalic,"glyph",prevchar)
+ end
+ insert_node_after(prevhead,prev,correction_kern(previtalic,current))
+ previnserted = nil
+ previtalic = 0
+ replaceinserted = nil
+ replaceitalic = 0
+ postinserted = nil
+ postitalic = 0
+ else
+ if replaceitalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and whatever",replaceitalic,"replace",replacechar)
+ end
+ insert_node_after(replacehead,replace,correction_kern(replaceitalic,current))
+ previnserted = nil
+ previtalic = 0
+ replaceinserted = nil
+ replaceitalic = 0
+ postinserted = nil
+ postitalic = 0
+ end
+ if postitalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and whatever",postitalic,"post",postchar)
+ end
+ insert_node_after(posthead,post,correction_kern(postitalic,current))
+ previnserted = nil
+ previtalic = 0
+ replaceinserted = nil
+ replaceitalic = 0
+ postinserted = nil
+ postitalic = 0
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ if lastattr and lastattr > 1 then -- more control is needed here
+ if previtalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and end of list",previtalic,"glyph",prevchar)
+ end
+ insert_node_after(prevhead,prev,correction_kern(previtalic,current))
+ else
+ if replaceitalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and end of list",replaceitalic,"replace",replacechar)
+ end
+ insert_node_after(replacehead,replace,correction_kern(replaceitalic,current))
+ end
+ if postitalic ~= 0 then
+ if trace_italics then
+ report_italics("inserting %p between %s italic %C and end of list",postitalic,"post",postchar)
+ end
+ insert_node_after(posthead,post,correction_kern(postitalic,current))
+ end
+ end
+ end
+ return head
+end
+
+function italics.handler(head)
+ if textokay then
+ return texthandler(head)
+ elseif mathokay then
+ return mathhandler(head)
+ else
+ return head, false
+ end
+end
+
+enabletext = function()
+ enableaction("processors","typesetters.italics.handler")
+ if trace_italics then
+ report_italics("enabling text/text italics")
+ end
+ enabletext = false
+ textokay = true
+end
+
+enablemath = function()
+ enableaction("processors","typesetters.italics.handler")
+ if trace_italics then
+ report_italics("enabling math/text italics")
+ end
+ enablemath = false
+ mathokay = true
+end
+
+function italics.enabletext()
+ if enabletext then
+ enabletext()
+ end
+end
+
+function italics.enablemath()
+ if enablemath then
+ enablemath()
+ end
+end
+
+function italics.set(n)
+ if enabletext then
+ enabletext()
+ end
+ if n == variables.reset then
+ texsetattribute(a_italics,unsetvalue)
+ else
+ texsetattribute(a_italics,tonumber(n) or unsetvalue)
+ end
+end
+
+function italics.reset()
+ texsetattribute(a_italics,unsetvalue)
+end
+
+implement {
+ name = "setitaliccorrection",
+ actions = italics.set,
+ arguments = "string"
+}
+
+implement {
+ name = "resetitaliccorrection",
+ actions = italics.reset,
+}
+
+local variables = interfaces.variables
+local settings_to_hash = utilities.parsers.settings_to_hash
+
+local function setupitaliccorrection(option) -- no grouping !
+ if enabletext then
+ enabletext()
+ end
+ local options = settings_to_hash(option)
+ local variant = unsetvalue
+ if options[variables.text] then
+ variant = 1
+ elseif options[variables.always] then
+ variant = 2
+ end
+ -- maybe also keywords for threshold
+ if options[variables.global] then
+ forcedvariant = variant
+ texsetattribute(a_italics,unsetvalue)
+ else
+ forcedvariant = false
+ texsetattribute(a_italics,variant)
+ end
+ if trace_italics then
+ report_italics("forcing %a, variant %a",forcedvariant or "-",variant ~= unsetvalue and variant)
+ end
+end
+
+implement {
+ name = "setupitaliccorrection",
+ actions = setupitaliccorrection,
+ arguments = "string"
+}
+
+-- for manuals:
+
+local stack = { }
+
+implement {
+ name = "pushitaliccorrection",
+ actions = function()
+ table.insert(stack,{forcedvariant, texgetattribute(a_italics) })
+ end
+}
+
+implement {
+ name = "popitaliccorrection",
+ actions = function()
+ local top = table.remove(stack)
+ forcedvariant = top[1]
+ texsetattribute(a_italics,top[2])
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-itc.mklx b/Master/texmf-dist/tex/context/base/mkxl/typo-itc.mklx
new file mode 100644
index 00000000000..67753efd50c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-itc.mklx
@@ -0,0 +1,56 @@
+%D \module
+%D [ file=typo-itc,
+%D version=2011.10.08,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Italic Correction,
+%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 Typesetting Macros / Italics Corrections}
+
+\unprotect
+
+%D The brave might try:
+%D
+%D \starttyping
+%D \definefontfeature[default][default][itlc=yes,textitalics=yes]
+%D \setupitaliccorrection[global,always]
+%D \stoptyping
+
+\registerctxluafile{typo-itc}{autosuffix}
+
+\definesystemattribute[italics] [public]
+\definesystemattribute[mathitalics][public]
+
+% \let\/=/
+% \let\emphasiscorrection\donothing
+
+\permanent\protected\def\italiccorrection
+ {\ifnum\c_attr_italics<\plusone\normalitaliccorrection\fi}
+
+\pushoverloadmode
+ \aliased\let\/\italiccorrection % replaces the primitive
+\popoverloadmode
+
+% 1 = end of word
+% 2 = end of word and end of a list
+
+\permanent\protected\def\setitaliccorrection [#code]{\clf_setitaliccorrection#code\relax} % todo: public implementor
+\permanent\protected\def\resetitaliccorrection {\clf_resetitaliccorrection} % todo: public implementor
+\permanent\protected\def\setupitaliccorrection[#settings]{\clf_setupitaliccorrection{#settings}} % todo: public implementor
+
+% global : no attributes, just always (faster and less memory)
+% text : only text
+% always : text and boxes
+% none : -
+
+\appendtoks
+ \c_attr_italics\attributeunsetvalue
+\to \everymathematics
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-itm.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-itm.mkxl
new file mode 100644
index 00000000000..7ae1b732f42
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-itm.mkxl
@@ -0,0 +1,273 @@
+%D \module
+%D [ file=typo-itm, % comes from core-mis
+%D version=2012.06.28,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Item Lists,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Node Macros / Item Lists}
+
+\unprotect
+
+%D This is a real old mechanism that we once used for questionaries. As it is documented
+%D we keep it around. A more modern implementation would probably use another approach
+%D but I don't want to spend too much time on it now. There are a couple of changes:
+%D
+%D \startitemize
+%D \startitem textwidth sets the combined width \stopitem
+%D \startitem width sets the symbolwidth \stopitem
+%D \startitem alternative is used instead of location \stopitem
+%D \stopitemize
+%D
+%D \startbuffer
+%D \items[alternative=left]{a,b,c}
+%D \items[alternative=left,align=middle,textalign=flushright,distance=1em]{a,b,c}
+%D \items[alternative=right]{a,b,c}
+%D \items[alternative=inmargin]{a,b,c}
+%D \items[alternative=top]{a,b,c}
+%D \items[alternative=bottom]{a,b,c}
+%D \items[alternative=bottom,align=flushleft,textstyle=bold,color=red,textcolor=green]{a,b,c}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This renders as:
+%D
+%D \getbuffer
+
+\installcorenamespace{items}
+\installcorenamespace{itemsalternatives}
+\installcorenamespace{itemshorizontal}
+\installcorenamespace{itemsvertical}
+
+\installcommandhandler \??items {items} \??items
+
+\setupitems
+ [\c!alternative=\v!left,
+ \c!symbol=5,
+ \c!textwidth=\availablehsize,
+ \c!align=\v!middle,
+ \c!textalign=\v!flushleft,
+ \c!distance=\zeropoint,
+ %\c!n=,
+ \c!before=\blank,
+ \c!inbetween={\blank[\v!medium]},
+ \c!after=\blank]
+
+\newcount\c_typo_items_n
+\newcount\c_typo_items_m
+\newdimen\d_typo_items_text_width
+\newdimen\d_typo_items_symbol_width
+\newdimen\d_typo_items_distance
+\newbox \b_typo_items_symbols
+\newbox \b_typo_items_texts
+
+\permanent\tolerant\protected\def\items[#1]#:#2%
+ {\bgroup
+ \setupitems[#1]%
+ \edef\p_typo_items_alternative{\itemsparameter\c!alternative}%
+ \ifcsname\??itemsalternatives\p_typo_items_alternative\endcsname \else
+ \let\p_typo_items_alternative\v!left
+ \fi
+ \let\currentitems\p_typo_items_alternative
+ \setupcurrentitems[#1]%
+ %
+ \edef\p_typo_items_textwidth{\itemsparameter\c!textwidth}%
+ \ifempty\p_typo_items_textwidth
+ \d_typo_items_text_width\availablehsize
+ \else
+ \d_typo_items_text_width\p_typo_items_textwidth\relax
+ \fi
+ %
+ \edef\p_typo_items_width{\itemsparameter\c!width}%
+ \ifempty\p_typo_items_width
+ \d_typo_items_symbol_width1.5\emwidth
+ \else
+ \d_typo_items_symbol_width\p_typo_items_width\relax
+ \fi
+ %
+ \edef\p_typo_items_distance{\itemsparameter\c!distance}%
+ \ifempty\p_typo_items_distance
+ \d_typo_items_distance\zeropoint
+ \else
+ \d_typo_items_distance\p_typo_items_distance\relax
+ \fi
+ %
+ \edef\p_typo_items_symbol{\itemsparameter\c!symbol}%
+ \ifempty\p_typo_items_symbol
+ \let\m_typo_items_symbol\firstofoneargument
+ \orelse\ifx\p_typo_items_symbol\v!none
+ \let\p_typo_items_symbol\empty
+ \let\m_typo_items_symbol\firstofoneargument
+ \else
+ \doifelseconversiondefined\p_typo_items_symbol
+ {\def\m_typo_items_symbol{\convertnumber\p_typo_items_symbol}}
+ {\doifelsesymboldefined\p_typo_items_symbol
+ {\def\m_typo_items_symbol{\symbol[\p_typo_items_symbol]\gobbleoneargument}}
+ {\let\m_typo_items_symbol\firstofoneargument}}%
+ \fi
+ %
+ \edef\p_typo_items_align{\itemsparameter\c!align}%
+ \edef\p_typo_items_textalign{\itemsparameter\c!textalign}%
+ %
+ \edef\p_typo_items_n{\itemsparameter\c!n}%
+ \ifempty\p_typo_items_n
+ \getcommalistsize[#2]%
+ \c_typo_items_n\commalistsize\relax % \commalistcounter
+ \else
+ \c_typo_items_n\p_typo_items_n\relax
+ \fi
+ %
+ \parindent\zeropoint
+ \dontcomplain
+ %
+ \itemsparameter\c!before
+ \csname\??itemsalternatives\p_typo_items_alternative\endcsname{#2}%
+ \itemsparameter\c!after
+ \egroup}
+
+% rendering
+
+\let\typo_items_item\relax
+\let\typo_items_make\relax
+
+\def\typo_items_item_horizontal
+ {\advance\c_typo_items_m\plusone
+ \csname\??itemshorizontal
+ \ifcsname\??itemshorizontal\p_typo_items_align\endcsname
+ \p_typo_items_align
+ \else
+ \s!unknown
+ \fi
+ \endcsname}
+
+\def\typo_items_item_vertical
+ {\advance\c_typo_items_m\plusone
+ \csname\??itemsvertical
+ \ifcsname\??itemsvertical\p_typo_items_align\endcsname
+ \p_typo_items_align
+ \else
+ \s!unknown
+ \fi
+ \endcsname}
+
+\defcsname\??itemshorizontal\v!margin\endcsname#1%
+ {\ifnum\c_typo_items_m=\plusone\hss\else\hfill\fi
+ \strut#1%
+ \ifnum\c_typo_items_m=\c_typo_items_n\hss\else\hfill\fi}
+
+\defcsname\??itemshorizontal\s!unknown\endcsname
+ {\simplealignedbox\scratchwidth\m_typo_items_align}
+
+\defcsname\??itemsvertical\s!unknown\endcsname
+ {\simplealignedbox\scratchwidth\m_typo_items_align}
+
+\def\typo_items_make_horizontal#1%
+ {\divide\scratchwidth\c_typo_items_n
+ \hbox{#1}}
+
+\def\typo_items_make_vertical#1%
+ {\vbox{#1}}
+
+\def\typo_items_construct_items_boxes#1%
+ {\setbox\b_typo_items_texts\hbox
+ {\c_typo_items_m\zerocount
+ \let\m_typo_items_align\p_typo_items_textalign
+ \scratchwidth\d_typo_items_text_width
+ \useitemsstyleandcolor\c!textstyle\c!textcolor
+ \typo_items_make{\processcommalist[#1]\typo_items_item}}%
+ \ifempty\p_typo_items_symbol
+ \setbox\b_typo_items_symbols\emptyhbox
+ \else
+ \setbox\b_typo_items_symbols\hbox
+ {\c_typo_items_m\zerocount
+ \let\m_typo_items_align\p_typo_items_align
+ \scratchwidth\d_typo_items_symbol_width
+ \useitemsstyleandcolor\c!style\c!color
+ \typo_items_make{\dorecurse\c_typo_items_n{\typo_items_item{\strut\m_typo_items_symbol\recurselevel}}}}%
+ \fi}
+
+% alternatives:
+
+\defineitems[\v!top][\c!width=\d_typo_items_text_width,\c!textalign=\itemsparameter\c!align]
+
+\setvalue{\??itemsalternatives\v!top}#1%
+ {\let\typo_items_make\typo_items_make_horizontal
+ \let\typo_items_item\typo_items_item_horizontal
+ \typo_items_construct_items_boxes{#1}%
+ \noindent\vbox\bgroup
+ \forgetall
+ \ifvoid\b_typo_items_symbols \else
+ \box\b_typo_items_symbols
+ \itemsparameter\c!inbetween
+ \nointerlineskip
+ \fi
+ \box\b_typo_items_texts\
+ \egroup}
+
+\defineitems[\v!bottom][\c!width=\d_typo_items_text_width,\c!textalign=\itemsparameter\c!align]
+
+\setvalue{\??itemsalternatives\v!bottom}#1%
+ {\let\typo_items_make\typo_items_make_horizontal
+ \let\typo_items_item\typo_items_item_horizontal
+ \typo_items_construct_items_boxes{#1}%
+ \noindent\vbox\bgroup
+ \forgetall
+ \box\b_typo_items_texts
+ \ifvoid\b_typo_items_symbols \else
+ \itemsparameter\c!inbetween
+ \nointerlineskip
+ \box\b_typo_items_symbols
+ \fi
+ \egroup}
+
+\defineitems[\v!inmargin][\c!width=1.5\emwidth,\c!align=\v!flushright,\c!distance=\leftmargindistance]
+
+\setvalue{\??itemsalternatives\v!inmargin}#1%
+ {\let\typo_items_make\typo_items_make_vertical
+ \let\typo_items_item\typo_items_item_vertical
+ \typo_items_construct_items_boxes{#1}%
+ \noindent\hbox\bgroup
+ \ifvoid\b_typo_items_symbols \else
+ \llap{\box\b_typo_items_symbols\hskip\d_typo_items_distance}%
+ \fi
+ \box\b_typo_items_texts
+ \egroup}
+
+\defineitems[\v!left][\c!width=1.5\emwidth,\c!align=\v!flushleft]
+
+\setvalue{\??itemsalternatives\v!left}#1%
+ {\let\typo_items_make\typo_items_make_vertical
+ \let\typo_items_item\typo_items_item_vertical
+ \advance\d_typo_items_text_width-\dimexpr\d_typo_items_symbol_width+\d_typo_items_distance\relax
+ \typo_items_construct_items_boxes{#1}%
+ \noindent\hbox\bgroup
+ \ifvoid\b_typo_items_symbols \else
+ \box\b_typo_items_symbols
+ \kern\d_typo_items_distance
+ \fi
+ \box\b_typo_items_texts
+ \egroup}
+
+\defineitems[\v!right][\c!width=1.5\emwidth,\c!align=\v!flushright]
+
+\setvalue{\??itemsalternatives\v!right}#1%
+ {\let\typo_items_make\typo_items_make_vertical
+ \let\typo_items_item\typo_items_item_vertical
+ \advance\d_typo_items_text_width-\dimexpr\d_typo_items_symbol_width+\d_typo_items_distance\relax
+ \typo_items_construct_items_boxes{#1}%
+ \noindent\hbox\bgroup
+ \box\b_typo_items_texts
+ \ifvoid\b_typo_items_symbols \else
+ \kern\d_typo_items_distance
+ \box\b_typo_items_symbols
+ \fi
+ \egroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-krn.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-krn.lmt
new file mode 100644
index 00000000000..a8ccedccf44
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-krn.lmt
@@ -0,0 +1,630 @@
+if not modules then modules = { } end modules ['typo-krn'] = {
+ version = 1.001,
+ comment = "companion to typo-krn.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- glue is still somewhat suboptimal
+-- components: better split on tounicode
+--
+-- maybe ignore when properties[n].injections.cursivex (or mark)
+
+local next, type, tonumber = next, type, tonumber
+
+local nodes = nodes
+local fonts = fonts
+
+local enableaction = nodes.tasks.enableaction
+
+local nuts = nodes.nuts
+local nodepool = nuts.pool
+
+-- check what is used
+
+local find_node_tail = nuts.tail
+local flush_node = nuts.flush_node
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local end_of_math = nuts.end_of_math
+local copy_node = nuts.copy
+local find_attribute = nuts.find_attribute
+local unset_attributes = nuts.unset_attributes
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getfont = nuts.getfont
+local getsubtype = nuts.getsubtype
+local getchar = nuts.getchar
+local getdisc = nuts.getdisc
+local getglue = nuts.getglue
+local getkern = nuts.getkern
+local getglyphdata = nuts.getglyphdata
+
+local isglyph = nuts.isglyph
+
+local setfield = nuts.setfield
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local setlink = nuts.setlink
+local setdisc = nuts.setdisc
+local setglue = nuts.setglue
+local setkern = nuts.setkern
+local setchar = nuts.setchar
+local setglue = nuts.setglue -- todo
+
+local texsetattribute = tex.setattribute
+local unsetvalue = attributes.unsetvalue
+
+local new_kern = nodepool.kern
+local new_glue = nodepool.glue
+
+local nodecodes = nodes.nodecodes
+local kerncodes = nodes.kerncodes
+local gluecodes = nodes.gluecodes
+local disccodes = nodes.disccodes
+local listcodes = nodes.listcodes
+
+local glyph_code = nodecodes.glyph
+local kern_code = nodecodes.kern
+local disc_code = nodecodes.disc
+local glue_code = nodecodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local math_code = nodecodes.math
+
+local boxlist_code = listcodes.box
+local unknownlist_code = listcodes.unknown
+
+local discretionarydisc_code = disccodes.discretionary
+local automaticdisc_code = disccodes.automatic
+
+local fontkern_code = kerncodes.fontkern
+local userkern_code = kerncodes.userkern
+
+local userskip_code = gluecodes.userskip
+local spaceskip_code = gluecodes.spaceskip
+local xspaceskip_code = gluecodes.xspaceskip
+
+local fonthashes = fonts.hashes
+local chardata = fonthashes.characters
+local quaddata = fonthashes.quads
+local markdata = fonthashes.marks
+local fontproperties = fonthashes.properties
+local fontdescriptions = fonthashes.descriptions
+local fontfeatures = fonthashes.features
+
+local tracers = nodes.tracers
+local setcolor = tracers.colors.set
+local resetcolor = tracers.colors.reset
+
+local v_max = interfaces.variables.max
+local v_auto = interfaces.variables.auto
+
+typesetters = typesetters or { }
+local typesetters = typesetters
+
+local kerns = typesetters.kerns or { }
+typesetters.kerns = kerns
+
+local report = logs.reporter("kerns")
+local trace_ligatures = false trackers.register("typesetters.kerns.ligatures", function(v) trace_ligatures = v end)
+local trace_ligatures_d = false trackers.register("typesetters.kerns.ligatures.details", function(v) trace_ligatures_d = v end)
+
+kerns.mapping = kerns.mapping or { }
+kerns.factors = kerns.factors or { }
+local a_kerns = attributes.private("kern")
+
+local contextsetups = fonts.specifiers.contextsetups
+
+storage.register("typesetters/kerns/mapping", kerns.mapping, "typesetters.kerns.mapping")
+storage.register("typesetters/kerns/factors", kerns.factors, "typesetters.kerns.factors")
+
+local mapping = kerns.mapping
+local factors = kerns.factors
+
+-- one must use liga=no and mode=base and kern=yes
+-- use more helpers
+-- make sure it runs after all others
+-- there will be a width adaptor field in nodes so this will change
+-- todo: interchar kerns / disc nodes / can be made faster
+-- todo: use insert_before etc
+
+local gluefactor = 4 -- assumes quad = .5 enspace
+
+-- red : kept by dynamic feature
+-- green : kept by static feature
+-- blue : keep by goodie
+
+function kerns.keepligature(n) -- might become default
+ local f = getfont(n)
+ local a = getglyphdata(n) or 0
+ if trace_ligatures then
+ local c = getchar(n)
+ local d = fontdescriptions[f][c].name
+ if a > 0 and contextsetups[a].keepligatures == v_auto then
+ if trace_ligatures_d then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"kept","dynamic","keepligatures")
+ end
+ setcolor(n,"darkred")
+ return true
+ end
+ local k = fontfeatures[f].keepligatures
+ if k == v_auto then
+ if trace_ligatures_d then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"kept","static","keepligatures")
+ end
+ setcolor(n,"darkgreen")
+ return true
+ end
+ if not k then
+ if trace_ligatures_d then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"split","static","keepligatures")
+ end
+ resetcolor(n)
+ return false
+ end
+ local k = fontproperties[f].keptligatures
+ if not k then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, %s goodie specification",f,d,c,"split","no")
+ resetcolor(n)
+ return false
+ end
+ if k and k[c] then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, %s goodie specification",f,d,c,"kept","by")
+ setcolor(n,"darkblue")
+ return true
+ else
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, %s goodie specification",f,d,c,"split","by")
+ resetcolor(n)
+ return false
+ end
+ else
+ if a > 0 and contextsetups[a].keepligatures == v_auto then
+ return true
+ end
+ local k = fontfeatures[f].keepligatures
+ if k == v_auto then
+ return true
+ end
+ if not k then
+ return false
+ end
+ local k = fontproperties[f].keptligatures
+ if not k then
+ return false
+ end
+ if k and k[c] then
+ return true
+ end
+ end
+end
+
+-- can be optimized .. the prev thing .. but hardly worth the effort
+
+local function kern_injector(fillup,kern)
+ if fillup then
+ local g = new_glue(kern)
+ setfield(g,"stretch",kern)
+ setfield(g,"stretch_order",1)
+ return g
+ else
+ return new_kern(kern)
+ end
+end
+
+-- a simple list injector, no components and such .. just disable ligatures in
+-- kern mode .. maybe not even hyphenate ... anyway, the next one is for simple
+-- sublists .. beware: we can have char -1
+
+local function inject_begin(boundary,prev,keeptogether,krn,ok) -- prev is a glyph
+ local char, id = isglyph(boundary)
+ if id == kern_code then
+ if getsubtype(boundary) == fontkern_code then
+ local inject = true
+ if keeptogether then
+ local next = getnext(boundary)
+ if not next or (getid(next) == glyph_code and keeptogether(prev,next)) then
+ inject = false
+ end
+ end
+ if inject then
+ -- not yet ok, as injected kerns can be overlays (from node-inj.lua)
+ setkern(boundary,getkern(boundary) + quaddata[getfont(prev)]*krn,userkern_code)
+ return boundary, true
+ end
+ end
+ elseif char then
+ if keeptogether and keeptogether(boundary,prev) then
+ -- keep 'm
+ else
+ local prevchar = isglyph(prev)
+ if prevchar and prevchar > 0 then
+ local font = getfont(boundary)
+ local data = chardata[font][prevchar]
+ local kerns = data and data.kerns
+ local kern = new_kern((kerns and kerns[char] or 0) + quaddata[font]*krn)
+ setlink(kern,boundary)
+ return kern, true
+ end
+ end
+ end
+ return boundary, ok
+end
+
+local function inject_end(boundary,next,keeptogether,krn,ok)
+ local tail = find_node_tail(boundary)
+ local char, id = isglyph(tail)
+ if id == kern_code then
+ if getsubtype(tail) == fontkern_code then
+ local inject = true
+ if keeptogether then
+ local prev = getprev(tail)
+ if getid(prev) == glyph_code and keeptogether(prev,two) then
+ inject = false
+ end
+ end
+ if inject then
+ -- not yet ok, as injected kerns can be overlays (from node-inj.lua)
+ setkern(tail,getkern(tail) + quaddata[getfont(next)]*krn,userkern_code)
+ return boundary, true
+ end
+ end
+ elseif char then
+ if keeptogether and keeptogether(tail,two) then
+ -- keep 'm
+ else
+ local nextchar = isglyph(tail)
+ if nextchar and nextchar > 0 then
+ local font = getfont(tail)
+ local data = chardata[font][nextchar]
+ local kerns = data and data.kerns
+ local kern = (kerns and kerns[char] or 0) + quaddata[font]*krn
+ setlink(tail,new_kern(kern))
+ return boundary, true
+ end
+ end
+ end
+ return boundary, ok
+end
+
+local function process_list(head,keeptogether,krn,font,okay)
+ local start = head
+ local prev = nil
+ local pid = nil
+ local kern = 0
+ local mark = font and markdata[font]
+ while start do
+ local char, id = isglyph(start)
+ if char then
+ if not font then
+ font = id -- getfont(start)
+ mark = markdata[font]
+ kern = quaddata[font]*krn
+ end
+ if prev then
+ if mark[char] then
+ -- skip
+ elseif pid == kern_code then
+ if getsubtype(prev) == fontkern_code then
+ local inject = true
+ if keeptogether then
+ local prevprev = getprev(prev)
+ if getid(prevprev) == glyph_code and keeptogether(prevprev,start) then
+ inject = false
+ end
+ end
+ if inject then
+ -- not yet ok, as injected kerns can be overlays (from node-inj.lua)
+ setkern(prev,getkern(prev) + kern,userkern_code)
+ okay = true
+ end
+ end
+ elseif pid == glyph_code then
+ if keeptogether and keeptogether(prev,start) then
+ -- keep 'm
+ else
+ local prevchar = getchar(prev)
+ local data = chardata[font][prevchar]
+ local kerns = data and data.kerns
+ -- if kerns then
+ -- print("it happens indeed, basemode kerns not yet injected")
+ -- end
+ insert_node_before(head,start,new_kern((kerns and kerns[char] or 0) + kern))
+ okay = true
+ end
+ end
+ end
+ end
+ if start then
+ prev = start
+ pid = id
+ start = getnext(start)
+ end
+ end
+ return head, okay, prev
+end
+
+local function closest_bound(b,get)
+ b = get(b)
+ if b and getid(b) ~= glue_code then
+ while b do
+ if not getattr(b,a_kerns) then
+ break
+ else
+ local c, f = isglyph(b)
+ if c then
+ return b, f
+ else
+ b = get(b)
+ end
+ end
+ end
+ end
+end
+
+function kerns.handler(head)
+ local _, start = find_attribute(head, a_kerns)
+ if start then
+ local lastfont = nil
+ local keepligature = kerns.keepligature
+ local keeptogether = kerns.keeptogether
+ local fillup = false
+ local bound = false
+ local prev = nil
+ local previd = nil
+ local prevchar = nil
+ local prevfont = nil
+ local prevmark = nil
+ local done = false
+ while start do
+ -- fontkerns don't get the attribute but they always sit between glyphs so
+ -- are always valid bound .. disc nodes also sometimes don't get them
+ local attr = getattr(start,a_kerns)
+ if attr and attr > 0 then
+ local char, id = isglyph(start)
+ local krn = mapping[attr]
+ if krn == v_max then
+ krn = .25
+ fillup = true
+ else
+ fillup = false
+ end
+ if not krn or krn == 0 then
+ bound = false
+ elseif char then -- id == glyph_code
+ local font = id -- more readable
+ local mark = markdata[font]
+ if keepligature and keepligature(start) then
+ -- keep 'm
+ else
+ -- beware, these are not kerned so we mighty need a kern only pass
+ -- maybe some day .. anyway, one should disable ligaturing
+ local data = chardata[font][char]
+ if data then
+ local unicode = data.unicode -- can be cached
+ if type(unicode) == "table" then
+ char = unicode[1]
+ local s = start
+ setchar(s,char)
+ for i=2,#unicode do
+ local n = copy_node(s)
+ if i == 2 then
+ setattr(n,a_kerns,attr) -- we took away the attr
+ end
+ setchar(n,unicode[i])
+ insert_node_after(head,s,n)
+ s = n
+ end
+ end
+ end
+ end
+ if not bound then
+ -- yet
+ elseif mark[char] then
+ -- skip
+ elseif previd == kern_code then
+ if getsubtype(prev) == fontkern_code then
+ local inject = true
+ if keeptogether then
+ if previd == glyph_code and keeptogether(prev,start) then
+ inject = false
+ end
+ end
+ if inject then
+ -- not yet ok, as injected kerns can be overlays (from node-inj.lua)
+ setkern(prev,getkern(prev) + quaddata[font]*krn,userkern_code)
+ end
+ end
+ elseif previd == glyph_code then
+ if prevfont == font then
+ if keeptogether and keeptogether(prev,start) then
+ -- keep 'm
+ else
+ -- hm, only basemode ... will go away ...
+ local data = chardata[font][prevchar]
+ local kerns = data and data.kerns
+ local kern = (kerns and kerns[char] or 0) + quaddata[font]*krn
+ insert_node_before(head,start,kern_injector(fillup,kern))
+ end
+ else
+ insert_node_before(head,start,kern_injector(fillup,quaddata[font]*krn))
+ end
+ end
+ prev = start
+ prevchar = char
+ prevfont = font
+ prevmark = mark
+ previd = glyph_code -- id
+ bound = true
+ elseif id == disc_code then
+ local prev, next, pglyph, nglyph -- delayed till needed
+ local subtype = getsubtype(start)
+ -- if subtype == automaticdisc_code then
+ -- -- this is kind of special, as we have already injected the
+ -- -- previous kern
+ -- local prev = getprev(start)
+ -- local pglyph = prev and getid(prev) == glyph_code
+ -- languages.expand(start,pglyph and prev)
+ -- -- we can have a different start now
+ -- elseif subtype ~= discretionarydisc_code then
+ -- prev = getprev(start)
+ -- pglyph = prev and getid(prev) == glyph_code
+ -- languages.expand(start,pglyph and prev)
+ -- end
+ local pre, post, replace = getdisc(start)
+ local indeed = false
+ if pre then
+ local okay = false
+ if not prev then
+ prev = getprev(start)
+ pglyph = prev and getid(prev) == glyph_code
+ end
+ if pglyph then
+ pre, okay = inject_begin(pre,prev,keeptogether,krn,okay)
+ end
+ pre, okay = process_list(pre,keeptogether,krn,false,okay)
+ if okay then
+ indeed = true
+ end
+ end
+ if post then
+ local okay = false
+ if not next then
+ next = getnext(start)
+ nglyph = next and getid(next) == glyph_code
+ end
+ if nglyph then
+ post, okay = inject_end(post,next,keeptogether,krn,okay)
+ end
+ post, okay = process_list(post,keeptogether,krn,false,okay)
+ if okay then
+ indeed = true
+ end
+ end
+ if replace then
+ local okay = false
+ if not prev then
+ prev = getprev(start)
+ pglyph = prev and getid(prev) == glyph_code
+ end
+ if pglyph then
+ replace, okay = inject_begin(replace,prev,keeptogether,krn,okay)
+ end
+ if not next then
+ next = getnext(start)
+ nglyph = next and getid(next) == glyph_code
+ end
+ if nglyph then
+ replace, okay = inject_end(replace,next,keeptogether,krn,okay)
+ end
+ replace, okay = process_list(replace,keeptogether,krn,false,okay)
+ if okay then
+ indeed = true
+ end
+ elseif prevfont then
+ replace = new_kern(quaddata[prevfont]*krn)
+ indeed = true
+ end
+ if indeed then
+ setdisc(start,pre,post,replace)
+ end
+ bound = false
+ elseif id == kern_code then
+ bound = getsubtype(start) == fontkern_code
+ prev = start
+ previd = id
+ elseif id == glue_code then
+ local subtype = getsubtype(start)
+ if subtype == userskip_code or subtype == xspaceskip_code or subtype == spaceskip_code then
+ local width, stretch, shrink, stretch_order, shrink_order = getglue(start)
+ if width > 0 then
+ local w = width + gluefactor * width * krn
+ stretch = stretch * w / width
+ shrink = shrink * w / width
+ if fillup then
+ stretch = 2 * stretch
+ shrink = 2 * shrink
+ stretch_order = 1
+ -- shrink_order = 1 ?
+ end
+ setglue(start,w,stretch,shrink,stretch_order,shrink_order)
+ end
+ end
+ bound = false
+ elseif id == hlist_code or id == vlist_code then
+ local subtype = getsubtype(start)
+ if subtype == unknownlist_code or subtype == boxlist_code then
+ -- special case
+ local b, f = closest_bound(start,getprev)
+ if b then
+ insert_node_before(head,start,kern_injector(fillup,quaddata[f]*krn))
+ end
+ local b, f = closest_bound(start,getnext)
+ if b then
+ insert_node_after(head,start,kern_injector(fillup,quaddata[f]*krn))
+ end
+ end
+ bound = false
+ elseif id == math_code then
+ start = end_of_math(start)
+ bound = false
+ end
+ if start then
+ start = getnext(start)
+ end
+ done = true
+ else
+ local id = getid(start)
+ if id == kern_code then
+ bound = getsubtype(start) == fontkern_code
+ prev = start
+ previd = id
+ start = getnext(start)
+ else
+ bound = false
+ start = getnext(start)
+ end
+ end
+ end
+ if done then
+ -- unset_attributes(a_kerns, head)
+ end
+ end
+ return head
+end
+
+local enabled = false
+
+function kerns.set(factor)
+ if factor ~= v_max then
+ factor = tonumber(factor) or 0
+ end
+ if factor == v_max or factor ~= 0 then
+ if not enabled then
+ enableaction("processors","typesetters.kerns.handler")
+ enabled = true
+ end
+ local a = factors[factor]
+ if not a then
+ a = #mapping + 1
+ factors[factors], mapping[a] = a, factor
+ end
+ factor = a
+ else
+ factor = unsetvalue
+ end
+ texsetattribute(a_kerns,factor)
+ return factor
+end
+
+-- interface
+
+interfaces.implement {
+ name = "setcharacterkerning",
+ actions = kerns.set,
+ arguments = "string"
+}
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-krn.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-krn.mkxl
new file mode 100644
index 00000000000..4c6aea256f8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-krn.mkxl
@@ -0,0 +1,143 @@
+%D \module
+%D [ file=typo-krn,
+%D version=2009.03.27, % code moved from core-spa.mkiv
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Spacing,
+%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 Typesetting Macros / Kerning}
+
+\unprotect
+
+\registerctxluafile{typo-krn}{autosuffix}
+
+\definesystemattribute[kern][public]
+
+% more
+%
+% {\setcharacterkerning[extrakerning]\input davis\relax}
+
+\installcorenamespace{characterkerning}
+
+\installcommandhandler \??characterkerning {characterkerning} \??characterkerning
+
+\permanent\protected\def\setcharacterkerning[#1]%
+ {\edef\currentcharacterkerning{#1}%
+ \ifx\currentcharacterkerning\s!reset
+ \resetcharacterkerning
+ \else
+ \typo_kerning_set
+ \fi}
+
+\def\typo_kerning_set
+ {\usecharacterkerningstyleandcolor\c!style\c!color % goodie, maybe also strut
+ \useaddfontfeatureparameter\characterkerningparameter
+ \clf_setcharacterkerning{\characterkerningparameter\c!factor}}
+
+\permanent\protected\def\resetcharacterkerning % fast one
+ {\c_attr_kern\attributeunsetvalue}
+
+\appendtoks
+ \resetcharacterkerning
+\to \everyresettypesetting
+
+\definecharacterkerning [extrakerning] [\c!factor=.125] % used in manuals
+
+%D Added after discussion on list (posted by WS, adapted abit by HH) \unknown\ this
+%D needs to be interfaced (\type {\v!kerncharacters}).
+%D
+%D \starttyping
+%D \setuphead[section][style=\sca,textstyle={\kerncharacters[.5]}] \section{Section}
+%D \stoptyping
+%D
+%D We could combine this with the previous definition command but then we always
+%D would get a command defined which is not beforehand a good idea.
+%D
+%D Here we need to keep the groupedcommand solution as it is used as modifier.
+
+\appendtoks
+ \frozen\instance\setuevalue{\currentcharacterkerning}%
+ {\doifelsenextoptional
+ {\typo_kerning_apply_yes{\currentcharacterkerning}}%
+ {\typo_kerning_apply_nop{\currentcharacterkerning}}}%
+\to \everydefinecharacterkerning
+
+\protected\def\typo_kerning_apply_yes#1[#2]%
+ {\groupedcommand{\typo_kerning_apply_yes_indeed{#1}{#2}}\donothing}
+
+\protected\def\typo_kerning_apply_nop#1%
+ {\groupedcommand{\typo_kerning_apply_nop_indeed{#1}}\donothing}
+
+\def\typo_kerning_apply_yes_indeed#1#2%
+ {\edef\currentcharacterkerning{#1}%
+ \setupcurrentcharacterkerning[\c!factor=#2]%
+ \typo_kerning_set}
+
+\def\typo_kerning_apply_nop_indeed#1%
+ {\edef\currentcharacterkerning{#1}%
+ \typo_kerning_set}
+
+\definecharacterkerning [\v!kerncharacters] [\c!factor=.125]
+\definecharacterkerning [\v!letterspacing ] [\v!kerncharacters] [\c!features=letterspacing]
+
+%D \macros
+%D {stretched}
+%D
+%D Stretching characters in a word is a sort of typographical murder. Nevertheless
+%D we support this manipulation for use in for instance titles.
+%D
+%D \starttyping
+%D \hbox to 5cm{\stretched{to the limit}}
+%D \stretched{to the limit}
+%D \stretched[width=10cm]{to the limit}
+%D \stoptyping
+%D
+%D \typebuffer
+%D
+%D or
+%D
+%D \startexample
+%D \getbuffer
+%D \stopexample
+%D
+%D \showsetup{stretched}
+%D
+%D This command replaces the old \MKII\ variant.
+
+\definecharacterkerning
+ [\v!stretched]
+ [\c!factor=\v!max,
+ \c!width=\availablehsize]
+
+\permanent\protected\def\setupstretched
+ {\setupcharacterkerning[\v!stretched]}
+
+\pushoverloadmode
+
+\enforced\permanent\tolerant\protected\def\stretched[#1]#:#2%
+ {\begingroup
+ \let\currentcharacterkerning\v!stretched
+ \ifparameter#1\or
+ \setupcurrentcharacterkerning[#1]%
+ \fi
+ \edef\p_width{\characterkerningparameter\c!width}%
+ \ifempty\p_width \else
+ \hbox to \p_width
+ \fi
+ \bgroup
+ \usecharacterkerningstyleandcolor\c!style\c!color
+ \useaddfontfeatureparameter\characterkerningparameter
+ \typo_kerning_set
+ #2%
+ \egroup
+ \endgroup}
+
+\popoverloadmode
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl
new file mode 100644
index 00000000000..9d137f5a561
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl
@@ -0,0 +1,64 @@
+%D \module
+%D [ file=typo-lan,
+%D version=2013.03.22,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Language Goodies,
+%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 Typography Macros / Languages}
+
+\unprotect
+
+\registerctxluafile{typo-lan}{}
+
+%D \macros
+%D {averagecharwidth, charwidthlanguage}
+%D
+%D This is a more \MKIV-ish variant of lang-frq.mkiv. The methods are gone as one
+%D doesn't need the tables for them. The main macro is \type {\averagecharwidth}
+%D which behaves like a dimension register.
+%D
+%D I finally decided to reimplement this as I needed it for a manual (which is often
+%D a reason for such a rewrite). With some inspiring Porcupine Tree in the
+%D background it's not the worst thing to do.
+
+\mutable\def\charwidthlanguage{\currentmainlanguage}
+
+\permanent\def\averagecharwidth {\dimexpr\clf_averagecharwidth{\charwidthlanguage}\scaledpoint\relax}
+\permanent\def\languagecharwidth#1{\dimexpr\clf_averagecharwidth{#1}\scaledpoint\relax}
+
+\protect
+
+\continueifinputfile{typo-lan.mkiv}
+
+\setuplayout[backspace=4cm]
+
+\showframe
+
+\starttext
+
+\startbuffer
+
+\mainlanguage[en] \hsize65\averagecharwidth \normalexpanded{\inleft{\the\hsize}} \input ward \par
+\mainlanguage[de] \hsize65\averagecharwidth \normalexpanded{\inleft{\the\hsize}} \input ward \par
+\mainlanguage[nl] \hsize65\averagecharwidth \normalexpanded{\inleft{\the\hsize}} \input ward \par
+
+\stopbuffer
+
+\getbuffer \blank
+
+\switchtobodyfont[pagella]
+
+\getbuffer \blank
+
+\switchtobodyfont[tt,8pt]
+
+\getbuffer
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-lig.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-lig.mkxl
new file mode 100644
index 00000000000..e30774d8efc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-lig.mkxl
@@ -0,0 +1,23 @@
+%D \module
+%D [ file=typo-lig,
+%D version=2014.12.01,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Ligatures,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Typesetting Macros / Ligatures}
+
+%D The original macro was mostly used for testing an attribute that blocks ligatures
+%D in the nodemode handler. In \LMTX\ things are done differently.
+
+\unprotect
+
+\permanent\protected\def\noligature{\dontleavehmode\groupedcommandcs\noligaturing\donothing}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-lin.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-lin.lmt
new file mode 100644
index 00000000000..86365c3ba03
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-lin.lmt
@@ -0,0 +1,402 @@
+if not modules then modules = { } end modules ['typo-lin'] = {
+ version = 1.001,
+ comment = "companion to typo-lin.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is experimental code. The idea is to create an anchor point in a line but there are
+-- some considerations:
+--
+-- * if we normalize in order to have more easy access later on, we need to normalize all
+-- lines and we cannot catch all without losing efficiency
+--
+-- * if we normalize too soon, we might have issues with changed properties later on
+--
+-- * if we normalize too late, we have no knowledge of the current hsize
+--
+-- * if we always create an anchor we also create unwanted overhead if it is not used later
+-- on (more nodes)
+--
+-- The question is: do we mind of at the first access an anchor is created? As we cannot know
+-- that now, I choose some middle ground but this might change. if we don't assume direct
+-- access but only helpers, we can decide later.
+--
+-- Because of right2left mess it makes sense to use helpers so that we only need to deal with
+-- this mess once, in helpers. The more abstraction there the better. And so, after a week of
+-- experimenting, yet another abstraction was introduced.
+--
+-- The danger of adding the anchor later is that we adapt the head and so the caller needs to
+-- check that ... real messy. On the other hand, we soldom traverse the line. And other
+-- mechanisms can push stuff in front too. Actually that alone can mess up analysis when we
+-- delay too much. So in the end we need to accept the slow down.
+--
+-- We only need to normalize the left side because when we mess around we keep the page stream
+-- order (and adding content to the right of the line is a no-go for tagged etc. For the same
+-- reason we don't use two left anchors (each side fo leftskip) because there can be stretch.
+-- But, maybe there are good reasons for having just that anchor (mostly for educational purposes
+-- I guess.)
+--
+-- At this stage the par node is no longer of any use so we remove it (each line has the
+-- direction attached). We might at some point also strip the disc nodes as they no longer serve
+-- a purpose but that can better be a helper. Anchoring left has advantage of keeping page
+-- stream.
+--
+-- This looks a bit messy but we want to keep the box as it is so \showboxes still visualizes as
+-- expected. Normally left and rightskips end up in the line while hangindents become shifts and
+-- hsize corrections. We could normalize this to a line with
+
+-- indent : hlist type 3
+-- hangindent : shift and width
+
+local type = type
+
+local trace_anchors = false trackers.register("paragraphs.anchors", function(v) trace_anchors = v end)
+
+local report = logs.reporter("anchors")
+
+local nuts = nodes.nuts
+local nodecodes = nodes.nodecodes
+local listcodes = nodes.listcodes
+
+local hlist_code = nodecodes.hlist
+local kern_code = nodecodes.kern
+local linelist_code = listcodes.line
+
+local tonut = nodes.tonut
+local tonode = nodes.tonode
+
+local nexthlist = nuts.traversers.hlist
+local insert_before = nuts.insert_before
+local insert_after = nuts.insert_after
+
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local getid = nuts.getid
+local getboth = nuts.getboth
+local setlink = nuts.setlink
+local setkern = nuts.setkern
+local getkern = nuts.getkern
+local getdirection = nuts.getdirection
+local getshift = nuts.getshift
+local setshift = nuts.setshift
+local getwidth = nuts.getwidth
+local setwidth = nuts.setwidth
+
+local getnormalizedline = nuts.getnormalizedline
+
+local setprop = nuts.setprop
+local getprop = nuts.rawprop -- getprop
+
+local effectiveglue = nuts.effective_glue
+
+local nodepool = nuts.pool
+local new_kern = nodepool.kern
+local new_hlist = nodepool.hlist
+local new_rule = nodepool.rule
+local new_glue = nodepool.glue
+
+local righttoleft_code = nodes.dirvalues.righttoleft
+
+local texgetcount = tex.getcount
+local setmetatableindex = table.setmetatableindex
+
+local jobpositions = job.positions
+local getposition = jobpositions.get
+local getreserved = jobpositions.getreserved
+
+local paragraphs = { }
+typesetters.paragraphs = paragraphs
+
+local noflines = 0
+
+local function finalize(prop,key) -- delayed calculations
+ local line = prop.line
+ local hsize = prop.hsize
+ local width = prop.width
+ local shift = getshift(line) -- dangerous as it can be vertical as well
+ local reverse = getdirection(line) == righttoleft_code or false
+ local pack = new_hlist()
+ local head = getlist(line)
+ local delta = 0
+ if reverse then
+ delta = - shift + (hsize - width)
+ else
+ delta = shift
+ end
+ local kern1 = new_kern(delta)
+ local kern2 = new_kern(-delta)
+ head = insert_before(head,head,kern1) -- setlink
+ head = insert_before(head,head,pack)
+ head = insert_before(head,head,kern2)
+ setlist(line,head)
+ local where = {
+ pack = pack,
+ head = nil,
+ tail = nil,
+ }
+ prop.where = where
+ prop.reverse = reverse
+ -- prop.shift = shift
+ setmetatableindex(prop,nil)
+ return prop[key]
+end
+
+local function normalize(line,islocal) -- assumes prestine lines, nothing pre/appended
+ local prop = getnormalizedline(line) -- we also can have "lineproperties" set but for a different porpose
+ local width = getwidth(line)
+ local hsize = islocal and width or tex.hsize
+ noflines = noflines + 1
+ if prop then
+ prop.width = width
+ prop.hsize = hsize
+ prop.line = line
+ prop.number = noflines
+ else
+ -- can be a vbox ... we could use a metatable with zeros
+ prop = {
+ width = width,
+ hsize = hsize,
+ leftskip = 0,
+ rightskip = 0,
+ lefthangskip = 0,
+ righthangskip = 0,
+ parfillleftskip = 0,
+ parfillrightskip = 0,
+ line = line,
+ number = noflines,
+ }
+ end
+ setprop(line,"line",prop)
+ setmetatableindex(prop,finalize)
+ return prop
+end
+
+function paragraphs.checkline(n)
+ return getprop(n,"line") or normalize(n,true)
+end
+
+-- print(nodes.idstostring(head))
+
+-- We do only basic positioning and leave compensation for directions and distances
+-- to the caller as that one knows the circumstances better.
+
+-- todo: only in mvl or explicitly, e.g. framed or so, not in all lines
+
+local function addtoline(n,list,option)
+ local line = getprop(n,"line")
+ if not line then
+ line = normalize(n,true)
+ end
+ if line then
+ if trace_anchors and not line.traced then
+ line.traced = true
+ local rule = new_rule(2*65536,2*65536,1*65536)
+ local list = insert_before(rule,rule,new_kern(-1*65536))
+ addtoline(n,list)
+ local rule = new_rule(2*65536,6*65536,-3*65536)
+ local list = insert_before(rule,rule,new_kern(-1*65536))
+ addtoline(n,list,"internal")
+ else
+ line.traced = true
+ end
+ local list = tonut(list)
+ local where = line.where
+ local head = where.head
+ local tail = where.tail
+ local blob = new_hlist(list)
+ local delta = 0
+ if option == "internal" then
+ if line.reverse then
+ delta = line.lefthangskip - line.leftskip - (line.hsize - line.width)
+ else
+ delta = line.lefthangskip + line.leftskip
+ end
+ end
+ -- always kerns, also when 0 so that we can adapt but we can optimize if needed
+ -- by keeping a hash as long as we use the shiftinline helper .. no need to
+ -- optimize now .. we can also decide to put each blob in a hlist
+ local kern = new_kern(delta)
+ if tail then
+ head, tail = insert_after(head,tail,kern)
+ else
+ head, tail = kern, kern
+ setlist(where.pack,head)
+ end
+ head, tail = insert_after(head,tail,blob)
+ local kern = new_kern(-delta)
+ head, tail = insert_after(head,tail,kern)
+ --
+ where.head = head
+ where.tail = tail
+ return line, blob
+ else
+ -- report("unknown anchor")
+ end
+end
+
+local function addanchortoline(n,anchor)
+ local line = type(n) ~= "table" and getprop(n,"line") or n
+ if not line then
+ line = normalize(n,true)
+ end
+ if line then
+ local anchor = tonut(anchor)
+ local where = line.where
+ if trace_anchors then
+ anchor = new_hlist(setlink(
+ anchor,
+ new_kern(-65536/4),
+ new_rule(65536/2,4*65536,4*65536),
+ new_kern(-65536/4-4*65536),
+ new_rule(8*65536,65536/4,65536/4)
+ ))
+ setwidth(anchor,0)
+ end
+ if where.tail then
+ local head = where.head
+ insert_before(head,head,anchor)
+ else
+ where.tail = anchor
+ end
+ setlist(where.pack,anchor)
+ where.head = anchor
+ return line
+ end
+end
+
+paragraphs.addtoline = addtoline
+paragraphs.addanchortoline = addanchortoline
+
+function paragraphs.moveinline(n,blob,dx,dy)
+ if not blob then
+ return
+ end
+ if not dx then
+ dx = 0
+ end
+ if not dy then
+ dy = 0
+ end
+ if dx ~= 0 or dy ~= 0 then
+ local line = type(n) ~= "table" and getprop(n,"line") or n
+ if line then
+ if dx ~= 0 then
+ local prev, next = getboth(blob)
+ if prev and getid(prev) == kern_code then
+ setkern(prev,getkern(prev) + dx)
+ end
+ if next and getid(next) == kern_code then
+ setkern(next,getkern(next) - dx)
+ end
+ end
+ if dy ~= 0 then
+ if getid(blob) == hlist_code then
+ setshift(blob,getshift(blob) + dy)
+ end
+ end
+ else
+ -- report("no line")
+ end
+ end
+end
+
+local latelua = nodepool.latelua
+local setposition = jobpositions.setspec
+
+local function setanchor(h_anchor)
+ return latelua {
+ action = setposition,
+ name = "md:h",
+ index = h_anchor,
+ value = { x = true, c = true },
+ }
+end
+
+-- needs to be adapted !
+
+function paragraphs.calculatedelta(n,width,delta,atleft,islocal,followshape,area)
+ local line = type(n) ~= "table" and getprop(n,"line") or n
+ if not line then
+ line = normalize(n,true)
+ end
+ local hmove = 0
+ if line then
+ local reverse = line.reverse
+ -- basic hsize based anchoring
+ if atleft then
+ if reverse then
+ -- delta = delta
+ else
+ delta = - delta - width
+ end
+ else
+ if reverse then
+ delta = - delta - width - line.hsize
+ else
+ delta = delta + line.hsize
+ end
+ end
+ if islocal then
+ -- relative to hsize with leftskip / rightskip compensation
+ if atleft then
+ if reverse then
+ delta = delta - line.leftskip
+ else
+ delta = delta + line.leftskip
+ end
+ else
+ if reverse then
+ delta = delta + line.rightskip
+ else
+ delta = delta - line.rightskip
+ end
+ end
+ if followshape then
+ -- shape compensation (compare to mkiv where we have shift!)
+ if atleft then
+ if reverse then
+ delta = delta + line.lefthangskip - line.hsize + line.width -- needs testing: + line.parfillleftskip
+ else
+ delta = delta + line.lefthangskip -- needs testing: - line.parfillleftskip
+ end
+ else
+ if reverse then
+ delta = delta + line.lefthangskip + line.parfillrightskip
+ else
+ delta = delta + line.lefthangskip - line.hsize + line.width - line.parfillrightskip
+ end
+ end
+ end
+ end
+ if area then
+ local number = line.number
+ if not line.hanchor then
+ addanchortoline(line,setanchor(number))
+ line.hanchor = true
+ end
+ local blob = getposition("md:h",number)
+ if blob then
+ local reference = getreserved(area,blob.c)
+ if reference then
+ hmove = (reference.x or 0) - (blob.x or 0)
+ if atleft then
+ if reverse then
+ hmove = hmove + (reference.w or 0)
+ else
+ -- hmove = hmove
+ end
+ else
+ if reverse then
+ hmove = hmove + line.hsize
+ else
+ hmove = hmove + (reference.w or 0) - line.hsize
+ end
+ end
+ end
+ end
+ end
+ end
+ return delta, hmove
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-lin.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-lin.mkxl
new file mode 100644
index 00000000000..6b142b32d19
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-lin.mkxl
@@ -0,0 +1,25 @@
+%D \module
+%D [ file=typo-lin,
+%D version=2015.08.01,
+%D title=\CONTEXT\ Typographic Macros,
+%D subtitle=Line Normalization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Typographic Macros / Normalization}
+
+%D Beware: the mvl callback is also called when a line is added to a vbox.
+
+\registerctxluafile{typo-lin}{autosuffix}
+
+\unprotect
+
+% nothing yet / experimental
+
+\protect \endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-mar.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-mar.lmt
new file mode 100644
index 00000000000..7e69162a900
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-mar.lmt
@@ -0,0 +1,995 @@
+if not modules then modules = { } end modules ['typo-mar'] = {
+ version = 1.001,
+ comment = "companion to typo-mar.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo:
+--
+-- * autoleft/right depending on available space (or distance to margin)
+-- * floating margin data, with close-to-call anchoring
+
+local format, validstring = string.format, string.valid
+local insert, remove, sortedkeys, fastcopy = table.insert, table.remove, table.sortedkeys, table.fastcopy
+local setmetatable, next, tonumber = setmetatable, next, tonumber
+local formatters = string.formatters
+local toboolean = toboolean
+local settings_to_hash = utilities.parsers.settings_to_hash
+
+local attributes = attributes
+local nodes = nodes
+local variables = variables
+local context = context
+
+local trace_margindata = false trackers.register("typesetters.margindata", function(v) trace_margindata = v end)
+local trace_marginstack = false trackers.register("typesetters.margindata.stack", function(v) trace_marginstack = v end)
+local trace_margingroup = false trackers.register("typesetters.margindata.group", function(v) trace_margingroup = v end)
+
+local report_margindata = logs.reporter("margindata")
+
+local tasks = nodes.tasks
+local prependaction = tasks.prependaction
+local disableaction = tasks.disableaction
+local enableaction = tasks.enableaction
+
+local variables = interfaces.variables
+
+local conditionals = tex.conditionals
+local systemmodes = tex.systemmodes
+
+local v_top = variables.top
+local v_depth = variables.depth
+local v_local = variables["local"]
+local v_global = variables["global"]
+local v_left = variables.left
+local v_right = variables.right
+local v_inner = variables.inner
+local v_outer = variables.outer
+local v_margin = variables.margin
+local v_edge = variables.edge
+local v_default = variables.default
+local v_normal = variables.normal
+local v_yes = variables.yes
+local v_continue = variables.continue
+local v_first = variables.first
+local v_text = variables.text
+local v_paragraph = variables.paragraph
+local v_line = variables.line
+
+local nuts = nodes.nuts
+local tonode = nuts.tonode
+
+local hpack_nodes = nuts.hpack
+local traverse_id = nuts.traverse_id
+local flush_node_list = nuts.flush_list
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getsubtype = nuts.getsubtype
+local getlist = nuts.getlist
+local getwhd = nuts.getwhd
+local setlist = nuts.setlist
+local setlink = nuts.setlink
+local getshift = nuts.getshift
+local setshift = nuts.setshift
+local getwidth = nuts.getwidth
+local setwidth = nuts.setwidth
+local getheight = nuts.getheight
+
+local setattrlist = nuts.setattrlist
+
+local getbox = nuts.getbox
+local takebox = nuts.takebox
+
+local setprop = nuts.setprop
+local getprop = nuts.getprop
+
+local nodecodes = nodes.nodecodes
+local listcodes = nodes.listcodes
+local whatsitcodes = nodes.whatsitcodes
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local whatsit_code = nodecodes.whatsit
+local userdefined_code = whatsitcodes.userdefined
+
+local nodepool = nuts.pool
+
+local new_hlist = nodepool.hlist
+local new_usernode = nodepool.usernode
+local latelua = nodepool.latelua
+
+local texgetdimen = tex.getdimen
+local texgetcount = tex.getcount
+local texget = tex.get
+
+local isleftpage = layouts.status.isleftpage
+local registertogether = builders.paragraphs.registertogether
+
+local paragraphs = typesetters.paragraphs
+local addtoline = paragraphs.addtoline
+local moveinline = paragraphs.moveinline
+local calculatedelta = paragraphs.calculatedelta
+
+local a_linenumber = attributes.private('linenumber')
+
+local inline_mark = nodepool.userids["margins.inline"]
+
+local jobpositions = job.positions
+local getposition = jobpositions.get
+local setposition = jobpositions.set
+local getreserved = jobpositions.getreserved
+
+local margins = { }
+typesetters.margins = margins
+
+local locations = { v_left, v_right, v_inner, v_outer } -- order might change
+local categories = { }
+local displaystore = { } -- [category][location][scope]
+local inlinestore = { } -- [number]
+local nofsaved = 0
+local nofstored = 0
+local nofinlined = 0
+local nofdelayed = 0
+local nofinjected = 0
+local h_anchors = 0
+local v_anchors = 0
+
+local mt1 = {
+ __index = function(t,location)
+ local v = { [v_local] = { }, [v_global] = { } }
+ t[location] = v
+ return v
+ end
+}
+
+local mt2 = {
+ __index = function(stores,category)
+ categories[#categories+1] = category
+ local v = { }
+ setmetatable(v,mt1)
+ stores[category] = v
+ return v
+ end
+}
+
+setmetatable(displaystore,mt2)
+
+local defaults = {
+ __index = {
+ location = v_left,
+ align = v_normal, -- not used
+ method = "",
+ name = "",
+ threshold = 0, -- .25ex
+ margin = v_normal,
+ scope = v_global,
+ distance = 0,
+ hoffset = 0,
+ voffset = 0,
+ category = v_default,
+ line = 0,
+ vstack = 0,
+ dy = 0,
+ baseline = false,
+ inline = false,
+ leftskip = 0,
+ rightskip = 0,
+ option = { }
+ }
+}
+
+local enablelocal, enableglobal -- forward reference (delayed initialization)
+
+local function showstore(store,banner,location)
+ if next(store) then
+ for i, si in table.sortedpairs(store) do
+ local si =store[i]
+ report_margindata("%s: stored in %a at %s: %a => %s",banner,location,i,validstring(si.name,"no name"),nodes.toutf(getlist(si.box)))
+ end
+ else
+ report_margindata("%s: nothing stored in location %a",banner,location)
+ end
+end
+
+function margins.save(t)
+ setmetatable(t,defaults)
+ local content = takebox(t.number)
+ local location = t.location
+ local category = t.category
+ local inline = t.inline
+ local scope = t.scope
+ local name = t.name
+ local option = t.option
+ local stack = t.stack
+ if option then
+ option = settings_to_hash(option)
+ t.option = option
+ end
+ if not content then
+ report_margindata("ignoring empty margin data %a",location or "unknown")
+ return
+ end
+ setprop(content,"specialcontent","margindata")
+ local store
+ if inline then
+ store = inlinestore
+ else
+ store = displaystore[category][location]
+ if not store then
+ report_margindata("invalid location %a",location)
+ return
+ end
+ store = store[scope]
+ end
+ if not store then
+ report_margindata("invalid scope %a",scope)
+ return
+ end
+ if enablelocal and scope == v_local then
+ enablelocal()
+ if enableglobal then
+ enableglobal() -- is the fallback
+ end
+ elseif enableglobal and scope == v_global then
+ enableglobal()
+ end
+ nofsaved = nofsaved + 1
+ nofstored = nofstored + 1
+ if trace_marginstack then
+ showstore(store,"before",location)
+ end
+ if name and name ~= "" then
+ -- this can be used to overload
+ if inlinestore then -- todo: inline store has to be done differently (not sparse)
+ local t = sortedkeys(store) for j=#t,1,-1 do local i = t[j]
+ local si = store[i]
+ if si.name == name then
+ local s = remove(store,i)
+ flush_node_list(s.box)
+ end
+ end
+ else
+ for i=#store,1,-1 do
+ local si = store[i]
+ if si.name == name then
+ local s = remove(store,i)
+ flush_node_list(s.box)
+ end
+ end
+ end
+ if trace_marginstack then
+ showstore(store,"between",location)
+ end
+ end
+ if t.number then
+ local leftmargindistance = texgetdimen("naturalleftmargindistance")
+ local rightmargindistance = texgetdimen("naturalrightmargindistance")
+ local strutbox = getbox("strutbox")
+ local _, strutht, strutdp = getwhd(strutbox)
+ -- better make a new table and make t entry in t
+ t.box = content
+ t.n = nofsaved
+ -- used later (we will clean up this natural mess later)
+ -- nice is to make a special status table mechanism
+ t.strutheight = strutht
+ t.strutdepth = strutdp
+ -- beware: can be different from the applied one (we're not in forgetall)
+ t.leftskip = texget("leftskip",false)
+ t.rightskip = texget("rightskip",false)
+ --
+ t.leftmargindistance = leftmargindistance -- todo:layoutstatus table
+ t.rightmargindistance = rightmargindistance
+ t.leftedgedistance = texgetdimen("naturalleftedgedistance")
+ + texgetdimen("leftmarginwidth")
+ + leftmargindistance
+ t.rightedgedistance = texgetdimen("naturalrightedgedistance")
+ + texgetdimen("rightmarginwidth")
+ + rightmargindistance
+ t.lineheight = texgetdimen("lineheight")
+ --
+ -- t.realpageno = texgetcount("realpageno")
+ if inline then
+ local n = new_usernode(inline_mark,nofsaved)
+ setattrlist(n,true)
+ context(tonode(n)) -- or use a normal node
+ store[nofsaved] = t -- no insert
+ nofinlined = nofinlined + 1
+ else
+ insert(store,t)
+ end
+ end
+ if trace_marginstack then
+ showstore(store,"after",location)
+ end
+ if trace_margindata then
+ report_margindata("saved %a, location %a, scope %a, inline %a",nofsaved,location,scope,inline)
+ end
+end
+
+-- Actually it's an advantage to have them all anchored left (tags and such)
+-- we could keep them in store and flush in stage two but we might want to
+-- do more before that so we need the content to be there unless we can be
+-- sure that we flush this first which might not be the case in the future.
+--
+-- When the prototype inner/outer code that was part of this proved to be
+-- okay it was moved elsewhere.
+
+local function realign(current,candidate)
+ local location = candidate.location
+ local margin = candidate.margin
+ local hoffset = candidate.hoffset
+ local distance = candidate.distance
+ local hsize = candidate.hsize
+ local width = candidate.width
+ local align = candidate.align
+ local inline = candidate.inline
+ local anchor = candidate.anchor
+ local hook = candidate.hook
+ local scope = candidate.scope
+ local option = candidate.option
+ local reverse = hook.reverse
+ local atleft = true
+ local hmove = 0
+ local delta = 0
+ local leftpage = isleftpage()
+ local leftdelta = 0
+ local rightdelta = 0
+ local leftdistance = distance
+ local rightdistance = distance
+ --
+ if not anchor or anchor == "" then
+ anchor = v_text -- this has to become more clever: region:0|column:n|column
+ end
+ if margin == v_normal then
+ --
+ elseif margin == v_local then
+ leftdelta = - candidate.leftskip
+ rightdelta = candidate.rightskip
+ elseif margin == v_margin then
+ leftdistance = candidate.leftmargindistance
+ rightdistance = candidate.rightmargindistance
+ elseif margin == v_edge then
+ leftdistance = candidate.leftedgedistance
+ rightdistance = candidate.rightedgedistance
+ end
+ if leftpage then
+ leftdistance, rightdistance = rightdistance, leftdistance
+ end
+ if location == v_right then
+ atleft = false
+ elseif location == v_inner then
+ if leftpage then
+ atleft = false
+ end
+ elseif location == v_outer then
+ if not leftpage then
+ atleft = false
+ end
+ else
+ -- v_left
+ end
+
+ local islocal = scope == v_local
+ local area = (not islocal or option[v_text]) and anchor or nil
+
+ if atleft then
+ delta = hoffset + leftdelta + leftdistance
+ else
+ delta = hoffset + rightdelta + rightdistance
+ end
+
+ local delta, hmove = calculatedelta (
+ hook, -- the line
+ width, -- width of object
+ delta, -- offset
+ atleft,
+ islocal, -- islocal
+ option[v_paragraph], -- followshape
+ area -- relative to area
+ )
+
+ if hmove ~= 0 then
+ delta = delta + hmove
+ if trace_margindata then
+ report_margindata("realigned %a, location %a, margin %a, move %p",candidate.n,location,margin,hmove)
+ end
+ else
+ if trace_margindata then
+ report_margindata("realigned %a, location %a, margin %a",candidate.n,location,margin)
+ end
+ end
+ moveinline(hook,candidate.node,delta)
+end
+
+local function realigned(current,candidate)
+ realign(current,candidate)
+ nofdelayed = nofdelayed - 1
+ setprop(current,"margindata",false)
+ return true
+end
+
+-- Stacking is done in two ways: the v_yes option stacks per paragraph (or line,
+-- depending on what gets by) and mostly concerns margin data dat got set at more or
+-- less the same time. The v_continue option uses position tracking and works on
+-- larger range. However, crossing pages is not part of it. Anyway, when you have
+-- such messed up margin data you'd better think twice.
+--
+-- The stacked table keeps track (per location) of the offsets (the v_yes case). This
+-- table gets saved when the v_continue case is active. We use a special variant
+-- of position tracking, after all we only need the page number and vertical position.
+
+local validstacknames = {
+ [v_left ] = v_left ,
+ [v_right] = v_right,
+ [v_inner] = v_inner,
+ [v_outer] = v_outer,
+}
+
+local cache = { }
+local stacked = { [v_yes] = { }, [v_continue] = { } }
+local anchors = { [v_yes] = { }, [v_continue] = { } }
+
+local function resetstacked(all)
+ stacked[v_yes] = { }
+ anchors[v_yes] = { }
+ if all then
+ stacked[v_continue] = { }
+ anchors[v_continue] = { }
+ end
+end
+
+-- anchors are only set for lines that have a note
+
+local function sa(specification) -- maybe l/r keys ipv left/right keys
+ local tag = specification.tag
+ local p = cache[tag]
+ if p then
+ if trace_marginstack then
+ report_margindata("updating anchor %a",tag)
+ end
+ p.p = true
+ p.y = true
+ -- maybe settobesaved first
+ setposition("md:v",tag,p)
+ cache[tag] = nil -- do this later, per page a cleanup
+ end
+end
+
+local function setanchor(v_anchor) -- freezes the global here
+ return latelua { action = sa, tag = v_anchor }
+end
+
+local function aa(specification) -- maybe l/r keys ipv left/right keys
+ local tag = specification.tag
+ local n = specification.n
+ local p = jobpositions.gettobesaved('md:v',tag)
+ if p then
+ if trace_marginstack then
+ report_margindata("updating injected %a",tag)
+ end
+ local pages = p.pages
+ if not pages then
+ pages = { }
+ p.pages = pages
+ end
+ pages[n] = texgetcount("realpageno")
+ elseif trace_marginstack then
+ report_margindata("not updating injected %a",tag)
+ end
+end
+
+local function addtoanchor(v_anchor,n) -- freezes the global here
+ return latelua { action = aa, tag = v_anchor, n = n }
+end
+
+local function markovershoot(current) -- todo: alleen als offset > line
+ v_anchors = v_anchors + 1
+ cache[v_anchors] = fastcopy(stacked)
+ local anchor = setanchor(v_anchors)
+ -- local list = hpack_nodes(setlink(anchor,getlist(current))) -- not ok, we need to retain width
+ -- local list = setlink(anchor,getlist(current)) -- why not this ... better play safe
+ local list = hpack_nodes(setlink(anchor,getlist(current)),getwidth(current),"exactly")--
+ if trace_marginstack then
+ report_margindata("marking anchor %a",v_anchors)
+ end
+ setlist(current,list)
+end
+
+local function inject(parent,head,candidate)
+ local box = candidate.box
+ if not box then
+ return head, nil, false -- we can have empty texts
+ end
+ local width, height, depth
+ = getwhd(box)
+ local shift = getshift(box)
+ local stack = candidate.stack
+ local stackname = candidate.stackname
+ local location = candidate.location
+ local method = candidate.method
+ local voffset = candidate.voffset
+ local line = candidate.line
+ local baseline = candidate.baseline
+ local strutheight = candidate.strutheight
+ local strutdepth = candidate.strutdepth
+ local inline = candidate.inline
+ local psubtype = getsubtype(parent)
+ -- This stackname is experimental and therefore undocumented and basically
+ -- unsupported. It was introduced when we needed to support overlapping
+ -- of different anchors.
+ if not stackname or stackname == "" then
+ stackname = location
+ else
+ stackname = validstacknames[stackname] or location
+ end
+ local isstacked = stack == v_continue or stack == v_yes
+ local offset = isstacked and stacked[stack][stackname]
+ local firstonstack = offset == false or offset == nil
+ nofinjected = nofinjected + 1
+ nofdelayed = nofdelayed + 1
+ -- yet untested
+ baseline = tonumber(baseline)
+ if not baseline then
+ baseline = toboolean(baseline)
+ end
+ --
+ if baseline == true then
+ baseline = false
+ else
+ baseline = tonumber(baseline)
+ if not baseline or baseline <= 0 then
+ -- in case we have a box of width 0 that is not analyzed
+ baseline = false -- strutheight -- actually a hack
+ end
+ end
+ candidate.width = width
+ candidate.hsize = getwidth(parent) -- we can also pass textwidth
+ candidate.psubtype = psubtype
+ candidate.stackname = stackname
+ if trace_margindata then
+ report_margindata("processing, index %s, height %p, depth %p, parent %a, method %a",candidate.n,height,depth,listcodes[psubtype],method)
+ end
+ -- Overlap detection is somewhat complex because we have display and inline
+ -- notes mixed as well as inner and outer positioning. We do need to
+ -- handle it in the stream because we also keep lines together so we keep
+ -- track of page numbers of notes.
+
+ if isstacked then
+ firstonstack = true
+ local anchor = getposition("md:v")
+ if anchor and (location == v_inner or location == v_outer) then
+ local pages = anchor.pages
+ if pages then
+ local page = pages[nofinjected]
+ if page then
+ if isleftpage(page) then
+ stackname = location == v_inner and v_right or v_left
+ else
+ stackname = location == v_inner and v_left or v_right
+ end
+ candidate.stackname = stackname
+ offset = stack and stack ~= "" and stacked[stack][stackname]
+ end
+ end
+ end
+ local current = v_anchors + 1
+ local previous = anchors[stack][stackname]
+ if trace_margindata then
+ report_margindata("anchor %i, offset so far %p",current,offset or 0)
+ end
+ local ap = anchor and anchor[previous]
+ local ac = anchor and anchor[current]
+ if not previous then
+ elseif previous == current then
+ firstonstack = false
+ elseif ap and ac and ap.p == ac.p then
+ local distance = (ap.y or 0) - (ac.y or 0)
+ if trace_margindata then
+ report_margindata("distance %p",distance)
+ end
+ if offset > distance then
+ -- we already overflow
+ offset = offset - distance
+ firstonstack = false
+ else
+ offset = 0
+ end
+ else
+ -- what to do
+ end
+ anchors[v_yes] [stackname] = current
+ anchors[v_continue][stackname] = current
+ if firstonstack then
+ offset = 0
+ end
+ offset = offset + candidate.dy -- always
+ shift = shift + offset
+ else
+ if firstonstack then
+ offset = 0
+ end
+ offset = offset + candidate.dy -- always
+ shift = shift + offset
+ end
+ -- Maybe we also need to patch offset when we apply methods, but how ...
+ -- This needs a bit of playing as it depends on the stack setting of the
+ -- following which we don't know yet ... so, consider stacking partially
+ -- experimental.
+ if method == v_top then
+ local delta = height - getheight(parent)
+ if trace_margindata then
+ report_margindata("top aligned by %p",delta)
+ end
+ if delta < candidate.threshold then -- often we need a negative threshold here
+ shift = shift + voffset + delta
+ end
+ elseif method == v_line then
+ local _, ph, pd = getwhd(parent)
+ if pd == 0 then
+ local delta = height - ph
+ if trace_margindata then
+ report_margindata("top aligned by %p (no depth)",delta)
+ end
+ if delta < candidate.threshold then -- often we need a negative threshold here
+ shift = shift + voffset + delta
+ end
+ end
+ elseif method == v_first then
+ if baseline then
+ shift = shift + voffset + height - baseline -- option
+ else
+ shift = shift + voffset -- normal
+ end
+ if trace_margindata then
+ report_margindata("first aligned")
+ end
+ elseif method == v_depth then
+ local delta = strutdepth
+ if trace_margindata then
+ report_margindata("depth aligned by %p",delta)
+ end
+ shift = shift + voffset + delta
+ elseif method == v_height then
+ local delta = - strutheight
+ if trace_margindata then
+ report_margindata("height aligned by %p",delta)
+ end
+ shift = shift + voffset + delta
+ elseif voffset ~= 0 then
+ if trace_margindata then
+ report_margindata("voffset %p applied",voffset)
+ end
+ shift = shift + voffset
+ end
+ -- -- --
+ if line ~= 0 then
+ local delta = line * candidate.lineheight
+ if trace_margindata then
+ report_margindata("offset %p applied to line %s",delta,line)
+ end
+ shift = shift + delta
+ offset = offset + delta
+ end
+ setshift(box,shift)
+ setwidth(box,0) -- not needed when wrapped
+ --
+ if isstacked then
+ setlink(box,addtoanchor(v_anchors,nofinjected))
+ box = new_hlist(box)
+ -- set height / depth ?
+ end
+ --
+ candidate.hook, candidate.node = addtoline(parent,box)
+ --
+ setprop(box,"margindata",candidate)
+ if trace_margindata then
+ report_margindata("injected, location %a, stack %a, shift %p",location,stackname,shift)
+ end
+ -- we need to add line etc to offset as well
+ offset = offset + depth
+ local room = {
+ height = height,
+ depth = offset,
+ slack = candidate.bottomspace, -- todo: 'depth' => strutdepth
+ lineheight = candidate.lineheight, -- only for tracing
+ stacked = inline and isstacked,
+ }
+ offset = offset + height
+ -- we need a restart ... when there is no overlap at all
+ stacked[v_yes] [stackname] = offset
+ stacked[v_continue][stackname] = offset
+ -- todo: if no real depth then zero
+ if trace_margindata then
+ report_margindata("status, offset %s",offset)
+ end
+ return getlist(parent), room, inline and isstacked or (stack == v_continue)
+end
+
+local function flushinline(parent,head)
+ local current = head
+ local done = false
+ local continue = false
+ local room, don, con, list
+ while current and nofinlined > 0 do
+ local id = getid(current)
+ if id == whatsit_code then
+ if getsubtype(current) == userdefined_code and getprop(current,"id") == inline_mark then
+ local n = getprop(current,"data")
+ local candidate = inlinestore[n]
+ if candidate then -- no vpack, as we want to realign
+ inlinestore[n] = nil
+ nofinlined = nofinlined - 1
+ head, room, con = inject(parent,head,candidate) -- maybe return applied offset
+ done = true
+ continue = continue or con
+ nofstored = nofstored - 1
+ if room and room.stacked then
+ -- for now we also check for inline+yes/continue, maybe someday no such check
+ -- will happen; we can assume most inlines are one line heigh; also this
+ -- together feature can become optional
+ registertogether(parent,room)
+ end
+ end
+ end
+ elseif id == hlist_code or id == vlist_code then
+ -- optional (but sometimes needed)
+ list, don, con = flushinline(current,getlist(current))
+ setlist(current,list)
+ continue = continue or con
+ done = done or don
+ end
+ current = getnext(current)
+ end
+ return head, done, continue
+end
+
+local function flushed(scope,parent) -- current is hlist
+ local head = getlist(parent)
+ local done = false
+ local continue = false
+ local room, con, don
+ for c=1,#categories do
+ local category = categories[c]
+ for l=1,#locations do
+ local location = locations[l]
+ local store = displaystore[category][location][scope]
+ if store then
+ while true do
+ local candidate = remove(store,1) -- brr, local stores are sparse
+ if candidate then -- no vpack, as we want to realign
+ head, room, con = inject(parent,head,candidate)
+ done = true
+ continue = continue or con
+ nofstored = nofstored - 1
+ if room then
+ registertogether(parent,room)
+ end
+ else
+ break
+ end
+ end
+ else
+ -- report_margindata("fatal error: invalid category %a",category or "?")
+ end
+ end
+ end
+ if nofinlined > 0 then
+ if done then
+ setlist(parent,head)
+ end
+ head, don, con = flushinline(parent,head)
+ continue = continue or con
+ done = done or don
+ end
+ if done then
+ local a = getattr(head,a_linenumber) -- hack .. we need a more decent critical attribute inheritance mechanism
+ if false then
+ local l = hpack_nodes(head,getwidth(parent),"exactly")
+ setlist(parent,l)
+ if a then
+ setattr(l,a_linenumber,a)
+ end
+ else
+ -- because packing messes up profiling
+ setlist(parent,head)
+ if a then
+ setattr(parent,a_linenumber,a)
+ end
+ end
+ end
+ return done, continue
+end
+
+-- only when group : vbox|vmode_par
+-- only when subtype : line, box (no indent alignment cell)
+
+local function handler(scope,head,group)
+ if nofstored > 0 then
+ if trace_margindata then
+ report_margindata("flushing stage one, stored %s, scope %s, delayed %s, group %a",nofstored,scope,nofdelayed,group)
+ end
+ local current = head
+ local done = false -- for tracing only
+ while current do
+ local id = getid(current)
+ if (id == vlist_code or id == hlist_code) and getprop(current,"margindata") == nil then
+ local don, continue = flushed(scope,current)
+ if don then
+ done = true
+ setprop(current,"margindata",false) -- signal to prevent duplicate processing
+ if continue then
+ markovershoot(current)
+ end
+ if nofstored <= 0 then
+ break
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ if trace_margindata then
+ if done then
+ report_margindata("flushing stage one, done, %s left",nofstored)
+ else
+ report_margindata("flushing stage one, nothing done, %s left",nofstored)
+ end
+ end
+ resetstacked()
+ end
+ return head
+end
+
+local trialtypesetting = context.trialtypesetting
+
+-- maybe change this to an action applied to the to be shipped out box (that is
+-- the mvl list in there so that we don't need to traverse global
+
+function margins.localhandler(head,group) -- sometimes group is "" which is weird
+
+ if trialtypesetting() then
+ return head
+ end
+
+ local inhibit = conditionals.inhibitmargindata
+ if inhibit then
+ if trace_margingroup then
+ report_margindata("ignored 3, group %a, stored %s, inhibit %a",group,nofstored,inhibit)
+ end
+ return head
+ end
+ if nofstored > 0 then
+ return handler(v_local,head,group)
+ end
+ if trace_margingroup then
+ report_margindata("ignored 4, group %a, stored %s, inhibit %a",group,nofstored,inhibit)
+ end
+ return head
+end
+
+function margins.globalhandler(head,group) -- check group
+
+ if trialtypesetting() then
+ return head, false
+ end
+
+ local inhibit = conditionals.inhibitmargindata
+ if inhibit or nofstored == 0 then
+ if trace_margingroup then
+ report_margindata("ignored 1, group %a, stored %s, inhibit %a",group,nofstored,inhibit)
+ end
+ return head
+ elseif group == "hmode_par" then
+ return handler(v_global,head,group)
+ elseif group == "vmode_par" then -- experiment (for alignments)
+ return handler(v_global,head,group)
+ -- this needs checking as we then get quite some one liners to process and
+ -- we cannot look ahead then:
+ elseif group == "box" then -- experiment (for alignments)
+ return handler(v_global,head,group)
+ elseif group == "alignment" then -- experiment (for alignments)
+ return handler(v_global,head,group)
+ else
+ if trace_margingroup then
+ report_margindata("ignored 2, group %a, stored %s, inhibit %a",group,nofstored,inhibit)
+ end
+ return head
+ end
+end
+
+local function finalhandler(head)
+ if nofdelayed > 0 then
+ local current = head
+ while current and nofdelayed > 0 do -- traverse_list
+ local id = getid(current)
+ if id == hlist_code then -- only lines?
+ local a = getprop(current,"margindata")
+ if not a then
+ finalhandler(getlist(current))
+ elseif realigned(current,a) then
+ if nofdelayed == 0 then
+ return head, true
+ end
+ end
+ elseif id == vlist_code then
+ finalhandler(getlist(current))
+ end
+ current = getnext(current)
+ end
+ end
+ return head
+end
+
+function margins.finalhandler(head)
+ if nofdelayed > 0 then
+ if trace_margindata then
+ report_margindata("flushing stage two, instore: %s, delayed: %s",nofstored,nofdelayed)
+ end
+ head = finalhandler(head)
+ resetstacked(nofdelayed==0)
+ else
+ resetstacked()
+ end
+ return head
+end
+
+-- Somehow the vbox builder (in combinations) gets pretty confused and decides to
+-- go horizontal. So this needs more testing.
+
+enablelocal = function()
+ enableaction("finalizers", "typesetters.margins.localhandler")
+ enableaction("shipouts", "typesetters.margins.finalhandler")
+ enablelocal = nil
+end
+
+enableglobal = function()
+ enableaction("mvlbuilders", "typesetters.margins.globalhandler")
+ enableaction("shipouts", "typesetters.margins.finalhandler")
+ enableglobal = nil
+end
+
+statistics.register("margin data", function()
+ if nofsaved > 0 then
+ return format("%s entries, %s pending",nofsaved,nofdelayed)
+ else
+ return nil
+ end
+end)
+
+interfaces.implement {
+ name = "savemargindata",
+ actions = margins.save,
+ arguments = {
+ {
+ { "location" },
+ { "method" },
+ { "category" },
+ { "name" },
+ { "scope" },
+ { "number", "integer" },
+ { "margin" },
+ { "distance", "dimen" },
+ { "hoffset", "dimen" },
+ { "voffset", "dimen" },
+ { "dy", "dimen" },
+ { "bottomspace", "dimen" },
+ { "baseline"}, -- dimen or string or
+ { "threshold", "dimen" },
+ { "inline", "boolean" },
+ { "anchor" },
+ -- { "leftskip", "dimen" },
+ -- { "rightskip", "dimen" },
+ { "align" },
+ { "option" },
+ { "line", "integer" },
+ { "index", "integer" },
+ { "stackname" },
+ { "stack" },
+ }
+ }
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-mar.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-mar.mkxl
new file mode 100644
index 00000000000..4862ee671ba
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-mar.mkxl
@@ -0,0 +1,478 @@
+% macros=mkvi
+
+%D \module
+%D [ file=typo-mar,
+%D version=2010.02.15, % was experimental code
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Margindata,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% maybe dontleavehmode when scope is local
+
+% todo: tags
+% todo: force inline with option (saves pos)
+% todo: margintitle (also less position then)
+
+\writestatus{loading}{ConTeXt Typesetting Macros / Margindata}
+
+\unprotect
+
+%D This module has been on the agenda for a while. Actually, it is one of the things
+%D that I really need myself, for instance when rendering rather unpredictable
+%D (educational) tests encoded in XML. This module permits anchoring for instance
+%D item numbers and also overload them when they have subnumbers. In the future it
+%D might replace the current maginal note mechanism (that then will be just an
+%D instance).
+%D
+%D In spite of what might be expected, the more advanced \LUA\ based variant is upto
+%D twice as fast on simple entries. Also, we no longer need an extra pass to get
+%D inner and outer alignments in sync with the pagebuilder.
+
+\registerctxluafile{typo-mar}{autosuffix}
+
+%definesystemattribute[margindata] % only at the lua end
+
+%D In \MKII\ we have three categories and their historically meaning is as follows:
+%D
+%D marginlines: These are flushed relative to the start of a line and need to be
+%D invoked there.
+%D
+%D marginwords: These can be issued in the text flow and will migrate sidewards; in
+%D spite of the name, it can be a paragraph of text as well, but normally it's
+%D words.
+%D
+%D margintexts: These can be set beforehand and are flushed at the next paragraph of
+%D text (of header).
+%D
+%D In \MKIV\ we have further integrated the mechanism and we now have:
+%D
+%D margindata: This can be anything that needs to go into the margin. It can be
+%D anchored in the text or given beforehand in which case it gets flushed at the
+%D first occasion.
+%D
+%D margintext: This runs on top of margindata and the only difference is that it
+%D uses the framed mechanism for packaging.
+%D
+%D Stacking is done differently as is inner and outer alignment (in most cases more
+%D efficient). The functionality is mostly the same as in \MKII, but there are a few
+%D additions, like names entries, where later ones overload preceding not yet
+%D flushed ones. Data can get catagorized and is then treated as a group (e.g. when
+%D stacking is needed).
+%D
+%D The amount of \TEX\ code is less than in \MKII\ because we do all trickery in at
+%D the \LUA\ end. At the end of this file we define several commands, like \type
+%D {\inleftmargin} and \type {\inleft}. You can configure them individually or as a
+%D group. There is an inheritance model in place.
+%D
+%D The following notes will be stacked:
+%D
+%D \starttyping
+%D \ininner[line=2]{IM A}
+%D \ininner[stack=yes]{IM B}
+%D \ininner[stack=yes]{IM C}
+%D \stoptyping
+%D
+%D The distance between them is determined by \type {dy}:
+%D
+%D \starttyping
+%D \ininner[stack=yes,dy=2ex][frame=on] {IM A}
+%D \ininner[stack=yes,dy=2ex][frame=on] {IM B}
+%D \stoptyping
+%D
+%D There are several methods of vertical alignment.
+%D
+%D \starttyping
+%D \inmargin [method=first] [frame=on] {first\\second} \input ward \par
+%D \inmargin [method=first] [frame=on,offset=3pt] {first\\second} \input ward \par
+%D \inmargin [method=first,voffset=-3pt][frame=on,offset=3pt,rulethickness=3pt] {first\\second} \input ward \par
+%D \inmargin [method=first,voffset=-6pt][frame=on,offset=3pt,rulethickness=3pt] {first\\second} \input ward \par
+%D \stoptyping
+%D
+%D You sometimes need to combine \type {voffset} with \type {offset}. The first
+%D argument concerns the data, the second the framed. Not sharing the setup is on
+%D purpose: location, offset, alignment and other parameters might clash.
+
+\installcorenamespace{margindata}
+\installcorenamespace{marginframed}
+
+\installcommandhandler \??margindata {margindata} \??margindata
+\installframedcommandhandler \??marginframed {marginframed} \??marginframed
+
+\setupmargindata
+ [\c!location=\v!left,
+ % \c!align=,
+ % \c!method=,
+ \c!style=\v!bold,
+ \c!color=, % maybe \maintextcolor
+ % \c!name=,
+ % \c!category=,
+ \c!threshold=.25\exheight,
+ \c!margin=\v!normal,
+ \c!scope=\v!global,
+ \c!width=,
+ % \c!stack=,
+ % \c!stackname=,
+ % \c!option=, % \v!paragraph (follow shape)
+ \c!line=0,
+ \c!anchor=\v!text,
+ \c!bottomspace=\strutdepth, % slack used for keeptogether
+ \c!dy=\zeropoint,
+ \c!distance=\zeropoint,
+ \c!hoffset=\zeropoint,
+ \c!voffset=\zeropoint]
+
+\setupmarginframed % so, align should be set with the data command
+ [\c!strut=\v!yes, % so by default we scale the strut to the font !
+ \c!offset=\v!overlay,
+ \c!fr!analyze=\v!yes,
+ \c!frame=\v!off,
+ \c!width=\margindataparameter\c!width,
+ \c!align=\margindataparameter\c!align]
+
+\appendtoks
+ \frozen\instance\setuevalue\currentmargindata{\margindata[\currentmargindata]}%
+\to \everydefinemargindata
+
+\newconditional\inhibitmargindata % This one is used at the Lua end!
+\newtoks \everymargindatacontent % Later on we will set this one.
+
+\mutable\let\currentmargindatastrut \empty
+\mutable\let\currentmargindatawidth \empty
+\mutable\let\currentmarginfirstheight\empty
+\mutable\let\currentmarginreference \empty
+
+\appendtoks
+ \settrue\inhibitmargindata
+\to \everyforgetall
+
+\appendtoks
+ \forgetall
+ \tf
+ \resetallattributes % \deactivatecolor % needed, but maybe we should switch to maintextcolor: \onlyinheritmaintextcolor
+ \pickupattributes
+\to \everymargindatacontent
+
+% trialtypesetting: no need for margin stuff while trialing as
+% is has no dimensions
+
+\newcount\nofmargintexts
+\newcount\c_typo_margins_n
+
+\ifdefined\dotagmarginanchor \else \aliased\let\dotagmarginanchor\gobbleoneargument \fi
+\ifdefined\dotagmargintext \else \aliased\let\dotagmargintext \gobbleoneargument \fi
+
+\definepagestate[\s!margintext]
+
+\protected\def\typo_margins_data_synchronize
+ {\doforcedtrackpagestate\s!margintext\nofmargintexts % includes increment
+ \docheckpagestate\s!margintext\nofmargintexts
+ %\doifelserightpagestate\s!margintext\nofmargintexts\relax\relax
+ \realpageno\realpagestateno
+ \page_layouts_swap_margins}
+
+\permanent\protected\def\margindata
+ {\iftrialtypesetting
+ \expandafter\typo_margins_data_nop
+ \else
+ \expandafter\typo_margins_data_yes
+ \fi}
+
+\permanent\tolerant\protected\def\typo_margins_data_nop[#name]#spacer[#dataparameters]#spacer[#textparameters]#:#content%
+ {}
+
+\permanent\tolerant\protected\def\typo_margins_data_yes[#name]#spacer[#dataparameters]#spacer[#textparameters]#:#content%
+ {\setfalse\inhibitmargindata % flushing afterwards
+ \begingroup
+ %\settrue\inhibitmargindata % no flushing in here
+ \def\currentmargindata{#name}%
+ \let\currentmarginframed\currentmargindata
+ \ifparameter#dataparameters\or
+ \setupcurrentmargindata[#dataparameters]%
+ \fi
+ % \doifelsenothing{#content}\donefalse\donetrue
+ % \doifelsetext{#content}\donetrue\donefalse
+ \ifparameter#content\donefalse\or\donetrue\else\donefalse\fi
+ \global\advance\c_typo_margins_n\plusone
+ \ifdone
+ \edef\currentmarginreference{\margindataparameter\c!reference}%
+ \ifempty\currentmarginreference \else
+ \strc_references_set_page_only_destination_box_attribute\currentmarginreference\currentmarginreference
+ \fi
+ \edef\currentmargindatastrut{\margindataparameter\c!strut}%
+ \dostarttaggedchained\t!margintext\currentmargindata\??margindata
+ \dotagmargintext\c_typo_margins_n
+ \ifcsname\currentmarginframedhash\s!parent\endcsname
+ \setbox\nextbox\naturalhbox \currentmarginreference \bgroup
+ \the\everymargindatacontent
+ \usemargindatastyleandcolor\c!style\c!color
+ \setupcurrentmarginframed[\c!location=\v!normal,#textparameters]%
+ \typo_margins_data_synchronize
+ \inheritedmarginframedframed\bgroup
+ \ifempty\currentmargindatastrut \else
+ \synchronizestrut\currentmargindatastrut
+ \fi
+ \begstrut
+ \strc_references_flush_destination_nodes
+ \margindataparameter\c!command{#content}%
+ \endstrut
+ \egroup
+ \egroup
+ \edef\currentmarginfirstheight{\number\dimexpr\framedfirstheight}%
+ \else
+ \edef\currentmargindatawidth{\margindataparameter\c!width}%
+ \ifempty\currentmargindatawidth
+ \setbox\nextbox\naturalhbox \currentmarginreference \bgroup
+ \typo_margins_data_synchronize
+ \the\everymargindatacontent
+ \usemargindatastyleandcolor\c!style\c!color
+ \ifempty\currentmargindatastrut \else
+ \synchronizestrut\currentmargindatastrut
+ \fi
+ \begstrut
+ \strc_references_flush_destination_nodes
+ \margindataparameter\c!command{#content}%
+ \endstrut
+ \egroup
+ \let\currentmarginfirstheight\empty
+ \else
+ \setbox\nextbox\naturalhbox \currentmarginreference \bgroup
+ \typo_margins_data_synchronize
+ \dosetraggedcommand{\margindataparameter\c!align}%
+ \vtop \bgroup
+ \the\everymargindatacontent
+ \usemargindatastyleandcolor\c!style\c!color
+ \hsize\currentmargindatawidth
+ \raggedcommand
+ \ifempty\currentmargindatastrut \else
+ \synchronizestrut\currentmargindatastrut
+ \fi
+ \begstrut
+ \strc_references_flush_destination_nodes
+ \margindataparameter\c!command{#content}%
+ \endstrut
+ \egroup
+ \egroup
+ \edef\currentmarginfirstheight{true}%
+ \fi
+ \fi
+ \dostoptagged
+ \fi
+ \ifdone
+ \edef\p_anchor{\margindataparameter\c!anchor}%
+ \anch_positions_initialize % we use positions at the lua end
+ \dostarttagged\t!marginanchor\empty
+ \dotagmarginanchor\c_typo_margins_n
+ \clf_savemargindata
+ location {\margindataparameter\c!location}%
+ method {\margindataparameter\c!method}%
+ category {\margindataparameter\c!category}%
+ name {\margindataparameter\c!name}%
+ scope {\margindataparameter\c!scope}%
+ option {\margindataparameter\c!option}%
+ number \nextbox
+ margin {\margindataparameter\c!margin}% local normal margin edge
+ distance \dimexpr\margindataparameter\c!distance\relax
+ hoffset \dimexpr\margindataparameter\c!hoffset\relax
+ voffset \dimexpr\margindataparameter\c!voffset\relax
+ dy \dimexpr\margindataparameter\c!dy\relax
+ bottomspace \dimexpr\margindataparameter\c!bottomspace\relax
+ \ifempty\currentmarginfirstheight \else
+ baseline {\currentmarginfirstheight}%
+ \fi
+ threshold \dimexpr\margindataparameter\c!threshold\relax % overlap related, will change
+ \ifhmode
+ inline true %
+ \fi
+ anchor {\p_anchor\ifx\p_anchor\v!region:0\fi}% kind of a hack to force column anchoring (for now)
+ %
+ % we're not in forgetall
+ %
+ % \ifzeropt\leftskip \else
+ % leftskip \dimexpr\leftskip\relax
+ % \fi
+ % \ifzeropt\leftskip \else
+ % rightskip \dimexpr\rightskip\relax
+ % \fi
+ align {\margindataparameter\c!align}%
+ line \numexpr\margindataparameter\c!line\relax
+ stackname {\margindataparameter\c!stackname}%
+ stack {\margindataparameter\c!stack}%
+ index \c_typo_margins_n
+ \relax
+ \dostoptagged
+ \else
+ \clf_savemargindata
+ location {\margindataparameter\c!location}%
+ method {\margindataparameter\c!method}%
+ category {\margindataparameter\c!category}%
+ name {\margindataparameter\c!name}%
+ scope {\margindataparameter\c!scope}%
+ number \nextbox
+ \relax
+ \fi
+ \endgroup}
+
+%D Downward compatible hack:
+
+\appendtoks
+ \enforced\let\\\spaceorpar
+\to \everymargindatacontent
+
+%D Another one:
+
+% \installcorenamespace{oppositemargin}
+%
+% \letvalue{\??oppositemargin\v!left }\v!right
+% \letvalue{\??oppositemargin\v!right }\v!left
+% \letvalue{\??oppositemargin\v!inner }\v!outer
+% \letvalue{\??oppositemargin\v!outer }\v!inner
+% \letvalue{\??oppositemargin\v!normal}\v!normal
+%
+% \def\oppositemargin#1%
+% {\csname\??oppositemargin\ifcsname\??oppositemargin#1\endcsname#1\else\v!normal\fi\endcsname}
+
+%D Definitions:
+
+% common to lines and text
+
+\setupmargindata [\v!left ] [\c!method=\v!first,\c!location=\v!left ,\c!margin=\v!margin,\c!align=\v!flushright,\s!parent=\??margindata] % we could autoparent when no define yet
+\setupmargindata [\v!right] [\c!method=\v!first,\c!location=\v!right,\c!margin=\v!margin,\c!align=\v!flushleft, \s!parent=\??margindata]
+\setupmargindata [\v!outer] [\c!method=\v!first,\c!location=\v!outer,\c!margin=\v!margin,\c!align=\v!inner, \s!parent=\??margindata]
+\setupmargindata [\v!inner] [\c!method=\v!first,\c!location=\v!inner,\c!margin=\v!margin,\c!align=\v!outer, \s!parent=\??margindata]
+
+% lines
+
+\definemargindata [\v!inleftmargin] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!style=,\c!color=]
+\definemargindata [\v!inrightmargin] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!style=,\c!color=]
+\definemargindata [\v!inoutermargin] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!style=,\c!color=]
+\definemargindata [\v!ininnermargin] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!style=,\c!color=]
+
+\definemargindata [\v!inleftedge] [\v!left ] [\c!margin=\v!edge ,\c!width=\leftedgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+\definemargindata [\v!inrightedge] [\v!right] [\c!margin=\v!edge ,\c!width=\rightedgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+\definemargindata [\v!inouteredge] [\v!outer] [\c!margin=\v!edge ,\c!width=\outeredgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+\definemargindata [\v!ininneredge] [\v!inner] [\c!margin=\v!edge ,\c!width=\inneredgewidth ,\c!style=,\c!color=,\c!category=\v!edge]
+
+\definemargindata [\v!atleftmargin] [\v!left ] [\c!margin=\v!normal,\c!width=\leftmarginwidth ,\c!style=,\c!color=]
+\definemargindata [\v!atrightmargin] [\v!right] [\c!margin=\v!normal,\c!width=\rightmarginwidth,\c!style=,\c!color=]
+
+% text: \v!added
+
+\definemargindata [\v!inleft] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!align=\v!flushright]
+\definemargindata [\v!inright] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]
+\definemargindata [\v!inouter] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!align=\v!inner]
+\definemargindata [\v!ininner] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!align=\v!outer]
+
+% no longer auto auto-other
+
+\definemargindata [\v!inmargin] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright]
+\definemargindata [\v!inother] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]
+
+\definemargindata [\v!margintext] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright,\c!stack=\v!yes]
+
+\setupmarginframed [\v!left ] [\c!method=\v!first,\c!align=\v!flushright,\s!parent=\??marginframed] % we could autoparent when no define yet
+\setupmarginframed [\v!right] [\c!method=\v!first,\c!align=\v!flushleft, \s!parent=\??marginframed]
+\setupmarginframed [\v!outer] [\c!method=\v!first,\c!align=\v!inner, \s!parent=\??marginframed]
+\setupmarginframed [\v!inner] [\c!method=\v!first,\c!align=\v!outer, \s!parent=\??marginframed]
+
+\definemarginframed [\v!inleft] [\v!left ]
+\definemarginframed [\v!inright] [\v!right]
+\definemarginframed [\v!inouter] [\v!outer]
+\definemarginframed [\v!ininner] [\v!inner]
+\definemarginframed [\v!inmargin] [\v!inleft]
+\definemarginframed [\v!inother] [\v!inright]
+
+\aliased\let\marginword \margintext
+\aliased\let\margintitle \margintext
+\aliased\let\inothermargin\inother % for old times sake
+
+%definemargindata [inouterextra] [\v!outer] [\c!margin=\v!edge,\c!location=\v!outer,\c!width=\outeredgewidth,\c!align=\v!outer,\c!category=\v!edge]
+%definemargindata [ininnerextra] [\v!inner] [\c!margin=\v!edge,\c!location=\v!inner,\c!width=\inneredgewidth,\c!align=\v!inner,\c!category=\v!edge]
+%
+%definemarginframed [inouterextra] [\v!outer]
+%definemarginframed [ininnerextra] [\v!inner]
+
+%D As we have more control we are not backward compatible although in
+%D practice it won't hurt that much. So, from now on use:
+%D
+%D \starttyping
+%D \definemargindata
+%D \setupmargindata
+%D \definemarginframed
+%D \setupmarginframed
+%D \stoptyping
+
+% The following sort of works okay but is to be avoided ... it will disappear from lmtx:
+
+\permanent\tolerant\protected\def\defineinmargin[#name]#spacer[#location]#spacer[#align]#spacer[#settings]% not completely compatible
+ {\ifarguments\else
+ \definemargindata[#name][\c!location=#location,\c!align=#align,#settings]%
+ \definemarginframed[#name][#location][\c!align=#align,#settings]%
+ \fi}
+
+\aliased\let\definemarginline\definemargindata % for old times sake
+\aliased\let\setupinmargin \setupmargindata % only partial (no framed), for old times sake
+
+% begin of experimental code (will move)
+%
+% \dosetanchor{x}test \dostarthanchoring{x}\llap{crap}\dostophanchoring{x}test test test
+% test \dostarthanchoring{text}\llap{crap}\dostophanchoring{text}test test test
+
+% \def\dosetanchor #1{\dontleavehmode\latelua{anchors.set("#1")}}
+% \def\doresetanchor #1{\dontleavehmode\latelua{anchors.reset("#1")}}
+% \def\doresetanchornow #1{\directlua{anchors.reset("#1")}}
+% \def\dostartanchoring #1{\dontleavehmode\latelua{anchors.startmove("#1")}}
+% \def\dostopanchoring #1{\dontleavehmode\latelua{anchors.stopmove("#1")}}
+% \def\dostarthanchoring#1{\dontleavehmode\latelua{anchors.startmove("#1","h")}}
+% \def\dostartvanchoring#1{\dontleavehmode\latelua{anchors.startmove("#1","v")}}
+% \let\dostophanchoring \dostopanchoring
+% \let\dostopvanchoring \dostopanchoring
+
+%D Here because in strc-ren we are too early:
+
+% % \definemargindata
+% % [margintext:chapter]
+% % [margintext:section]
+% %
+% % \defineheadalternative
+% % [margintext:chapter]
+% % [margintext]
+% % [margintext=margintext:chapter]
+% %
+% % \setuphead
+% % [chapter]
+% % [alternative=margintext:chapter]
+%
+% \setuphead
+% [chapter]
+% [alternative=margintext]
+
+\definemargindata
+ [\v!margintext:\v!section]
+ [\v!left]
+ [\c!margin=\v!margin,
+ \c!width=\leftmarginwidth,
+ \c!align=\v!flushright]
+
+\defineheadalternative
+ [\v!margintext]
+ [\c!alternative=\v!somewhere,
+ \c!margintext=\v!margintext:\v!section,
+ \c!renderingsetup=\??headrenderings:\v!margintext]
+
+\startsetups[\??headrenderings:\v!margintext]
+ \executeifdefined{\headalternativeparameter\c!margintext}\margintext {
+ \ifconditional\headshownumber
+ \headnumbercontent
+ \hskip\headnumberdistance
+ \fi
+ \headtextcontent
+ }
+\stopsetups
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-ovl.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-ovl.lmt
new file mode 100644
index 00000000000..5834f9ff06a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-ovl.lmt
@@ -0,0 +1,184 @@
+if not modules then modules = { } end modules ['typo-ovl'] = {
+ version = 1.001,
+ comment = "companion to typo-ovl.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is dubious code. If you needed it your source is probably bad. We only used
+-- in when we had to mark bad content but when cleaning up some project code I decided
+-- that it is easier to maintain in the distribution then in a project style. After all,
+-- we have hardly any private code. For convenience I hooked it into the existing
+-- replacement module (as it used the same code anyway). I did some cleanup.
+
+local next, type = next, type
+
+local context = context
+
+local nuts = nodes.nuts
+local tonut = nodes.tonut
+local tonode = nodes.tonode
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+
+local getnext = nuts.getnext
+local getid = nuts.getid
+local getdisc = nuts.getdisc
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getattrlist = nuts.getattrlist
+local setattrlist = nuts.setattrlist
+local getdata = nuts.getdata
+local setfont = nuts.setfont
+
+local nextnode = nuts.traversers.node
+
+local unsetvalue = attributes.unsetvalue
+local prvattribute = attributes.private
+
+local texgetbox = tex.getbox
+local currentfont = font.current
+
+local a_overloads = attributes.private("overloads")
+local n_overloads = 0
+local t_overloads = { }
+
+local overloaded = { }
+
+local function markasoverload(a)
+ local n = prvattribute(a)
+ if n then
+ overloaded[n] = a
+ end
+end
+
+attributes.markasoverload = markasoverload
+
+markasoverload("color")
+markasoverload("colormodel")
+markasoverload("transparency")
+markasoverload("case")
+markasoverload("negative")
+markasoverload("effect")
+markasoverload("ruled")
+markasoverload("shifted")
+markasoverload("kernchars")
+markasoverload("kern")
+markasoverload("noligature")
+markasoverload("viewerlayer")
+
+local function tooverloads(n)
+ local current = tonut(n)
+ local a = getattrlist(current)
+ local s = { }
+ while a do
+ local index, value = getdata(a)
+ local o = overloaded[n]
+ if o and value ~= unsetvalue then
+ -- It is actually very unlikely that we have unsetvalue.
+ s[index] = value
+ end
+ a = getnext(a)
+ end
+ return s
+end
+
+attributes.tooverloads = tooverloads
+
+function attributes.applyoverloads(specification,start,stop)
+ local start = tonut(start)
+ local processor = specification.processor
+ local overloads = specification.processor or getattr(start,a_overloads)
+ if overloads and overloads ~= unsetvalue then
+ overloads = t_overloads[overloads]
+ if not overloads then
+ return
+ end
+ else
+ return
+ end
+
+ local last = stop and tonut(stop)
+ local oldlist = nil
+ local newlist = nil
+ local newfont = overloads.font
+
+ local function apply(current)
+ local a = getattrlist(current)
+ if a == oldlist then
+ setattrlist(current,newlist)
+ else
+ oldlist = getattrlist(current)
+ for k, v in next, overloads do
+ if type(v) == "number" then
+ setattr(current,k,v)
+ else
+ -- can be: ["font"] = number
+ end
+ end
+ newlist = current -- getattrlist(current)
+ end
+ if newfont then
+ setfont(current,newfont)
+ end
+ end
+
+ for current, id in nextnode, start do
+ if id == glyph_code then
+ apply(current)
+ elseif id == disc_code then
+ apply(current)
+ if pre then
+ while pre do
+ if getid(pre) == glyph_code then
+ apply()
+ end
+ pre = getnext(pre)
+ end
+ end
+ if post then
+ while post do
+ if getid(post) == glyph_code then
+ apply()
+ end
+ post = getnext(post)
+ end
+ end
+ if replace then
+ while replace do
+ if getid(replace) == glyph_code then
+ apply()
+ end
+ replace = getnext(replace)
+ end
+ end
+ end
+ if current == last then
+ break
+ end
+ end
+end
+
+-- we assume the same highlight so we're global
+
+interfaces.implement {
+ name = "overloadsattribute",
+ arguments = { "string", "integer", "integer" },
+ actions = function(name,font,box)
+ local samplebox = texgetbox(box)
+ local sample = samplebox and samplebox.list
+ local overloads = sample and tooverloads(sample)
+ if overloads then
+ overloads.font = font > 0 and font or false
+ n_overloads = n_overloads + 1
+ t_overloads[n_overloads] = overloads
+ t_overloads[name] = overloads
+ context(n_overloads)
+ else
+ context(unsetvalue)
+ end
+ end
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-ovl.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-ovl.mkxl
new file mode 100644
index 00000000000..b3ba2e78388
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-ovl.mkxl
@@ -0,0 +1,116 @@
+%D \module
+%D [ file=lang-ovl,
+%D version=2016.02.03, % about that time (maybe earlier)
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Overloads,
+%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 Typesetting Macros / Overloads}
+
+\unprotect
+
+%D See \LUA\ file for comments. I'll probably never use this code outside the
+%D project where it had some experimental use. (Occasionally we do some spell
+%D checking and suspicious word usage marking.) So there is not much documentation
+%D here. Keep in mind that overloading only makes sense for content that gets
+%D replaced as otherwise normal attributes make more sense. Using this otherwise
+%D is weird but one never knows what users come up with.
+
+\registerctxluafile{typo-ovl}{autosuffix}
+
+\definesystemattribute[overloads][public,global]
+
+\installcorenamespace{overloads}
+
+%D Watch how we abuse highlights.
+
+\newcount\c_typo_overload_font_id
+
+\protected\def\typo_overloads_define#1%
+ {\begingroup
+ % we pack so we avoid interference (and for sure don't process!)
+ \setbox\scratchbox\hpack\bgroup
+ \global\c_typo_overload_font_id\fontid\font
+ \resetallattributes % so we only change what gets set
+ \highlight[#1]%
+ \signalcharacter
+ \global\c_typo_overload_font_id
+ \ifnum\c_typo_overload_font_id=\fontid\font
+ \zerocount
+ \else
+ \fontid\font
+ \fi
+ \egroup
+ \global\expandafter\chardef\csname\??overloads#1\endcsname
+ \clf_overloadsattribute{#1}\c_typo_overload_font_id\scratchbox
+ \endgroup}
+
+\permanent\protected\def\setoverloads[#1]%
+ {\ifcsname\??overloads#1\endcsname\else
+ \typo_overloads_define{#1}%
+ \fi
+ \c_attr_overloads\csname\??overloads#1\endcsname}
+
+\permanent\protected\def\registeroverloads[#1]%
+ {\ifcsname\??overloads#1\endcsname\else
+ \typo_overloads_define{#1}%
+ \fi}
+
+\permanent\protected\def\resetoverloads
+ {\c_attr_overloads\attributeunsetvalue}
+
+%D We hook this into the replacement module, probably the only place where it makes
+%D sense. Here is an adapted version of an example:
+%D
+%D \starttyping
+%D \replaceword[basics][new] [old]
+%D \replaceword[basics][now] [hl3->never]
+%D \replaceword[basics][never][now]
+%D \replaceword[basics][heck] []
+%D
+%D \definehighlight[hl1][style={\setbar[underbar]\red\setcharactercasing[WORD]\bf}]
+%D \definehighlight[hl2][style={\setbar[overbar]\blue\setcharactercasing[Words]}]
+%D \definehighlight[hl3][style={\setbar[overstrike]\green\bs}]
+%D
+%D \registeroverloads[hl1]
+%D \registeroverloads[hl2]
+%D \registeroverloads[hl3]
+%D
+%D \start \setreplacements[basics][hl1] What the heck, it's now or never, isn't it new? \stop \par
+%D \start \setreplacements[basics][hl2] What the heck, it's now or never, isn't it new? \stop \par
+%D \start \setreplacements[basics][hl1] What the heck, it's now or never, isn't it new? \stop \par
+%D \start \setreplacements[basics] What the heck, it's now or never, isn't it new? \stop \par
+%D \stoptyping
+%D
+%D We used it to mark synonyms that should not be corrected by the editor. Sort of the
+%D reverse of not having a word in a vetted wordlist. A bit out of place in a typesetting
+%D system. If really needed we can support multiple words seperataed by spaces but I didn't
+%D need it. And \unknown\ fonts are supported but at fixed size!
+
+\ifdefined\setreplacements
+
+ \pushoverloadmode
+
+ \permanent\tolerant\protected\def\setreplacements[#1]#*[#2]%
+ {\clf_setreplacements{#1}%
+ \ifparameter#2\or
+ \setoverloads[#2]%
+ \else
+ \resetoverloads
+ \fi}
+
+ \popoverloadmode
+
+\else
+
+ % something weird
+
+\fi
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-pag.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-pag.lmt
new file mode 100644
index 00000000000..9f8a3a1f418
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-pag.lmt
@@ -0,0 +1,206 @@
+if not modules then modules = { } end modules ['typo-pag'] = {
+ version = 1.001,
+ comment = "companion to typo-pag.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+
+builders = builders or { }
+local builders = builders
+
+builders.paragraphs = builders.paragraphs or { }
+local parbuilders = builders.paragraphs
+
+local nodes = nodes
+local nodecodes = nodes.nodecodes
+
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glue_code = nodecodes.glue
+local kern_code = nodecodes.kern
+local penalty_code = nodecodes.penalty
+
+local unsetvalue = attributes.unsetvalue
+local a_keeptogether = attributes.private("keeptogether")
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getid = nuts.getid
+local getattr = nuts.getattr
+local takeattr = nuts.takeattr
+local setattr = nuts.setattr
+local getwhd = nuts.getwhd
+local getkern = nuts.getkern
+local setpenalty = nuts.setpenalty
+local getwidth = nuts.getwidth
+local getdepth = nuts.getdepth
+
+local insert_node_after = nuts.insert_after
+local new_penalty = nuts.pool.penalty
+
+local trace_keeptogether = false
+local report_keeptogether = logs.reporter("parbuilders","keeptogether")
+
+local enableaction = nodes.tasks.enableaction
+
+local cache = { }
+local last = 0
+local enabled = false
+
+trackers.register("parbuilders.keeptogether", function(v) trace_keeptogether = v end)
+
+-- todo: also support lines = 3 etc (e.g. dropped caps) but how to set that
+-- when no hlists are there ?
+
+function parbuilders.registertogether(line,specification) -- might change
+ if not specification then
+ return
+ end
+ if not enabled then
+ enableaction("finalizers","builders.paragraphs.keeptogether")
+ end
+ local a = getattr(line,a_keeptogether)
+ local c = a and cache[a]
+ if c then
+ local height = specification.height
+ local depth = specification.depth
+ local slack = specification.slack
+ if height and height > c.height then
+ c.height = height
+ end
+ if depth and depth > c.depth then
+ c.depth = depth
+ end
+ if slack and slack > c.slack then
+ c.slack = slack
+ end
+ else
+ last = last + 1
+ cache[last] = specification
+ if not specification.height then
+ specification.height = 0
+ end
+ if not specification.depth then
+ specification.depth = 0
+ end
+ if not specification.slack then
+ specification.slack = 0
+ end
+ setattr(line,a_keeptogether,last)
+ end
+ if trace_keeptogether then
+ local a = a or last
+ local c = cache[a]
+ local noflines = specification.lineheight
+ local height = c.height
+ local depth = c.depth
+ local slack = c.slack
+ if not noflines or noflines == 0 then
+ noflines = "unknown"
+ else
+ noflines = math.round((height + depth - slack) / noflines)
+ end
+ report_keeptogether("registered, index %s, height %p, depth %p, slack %p, noflines %a",a,height,depth,slack,noflines)
+ end
+end
+
+local function keeptogether(start,a,specification)
+ local current = getnext(start)
+ local previous = start
+ local total = getdepth(previous)
+ local slack = specification.slack
+ local threshold = specification.depth - slack
+ if trace_keeptogether then
+ report_keeptogether("%s, index %s, total %p, threshold %p, slack %p","list",a,total,threshold,slack)
+ end
+ while current do
+ local id = getid(current)
+ if id == vlist_code or id == hlist_code then
+ local wd, ht, dp = getwhd(current)
+ total = total + ht + dp
+ if trace_keeptogether then
+ report_keeptogether("%s, index %s, total %p, threshold %p","list",a,total,threshold)
+ end
+ if total <= threshold then
+ if getid(previous) == penalty_code then
+ setpenalty(previous,10000)
+ else
+ insert_node_after(head,previous,new_penalty(10000))
+ end
+ else
+ break
+ end
+ elseif id == glue_code then
+ -- hm, breakpoint, maybe turn this into kern
+ total = total + getwidth(current)
+ if trace_keeptogether then
+ report_keeptogether("%s, index %s, total %p, threshold %p","glue",a,total,threshold)
+ end
+ if total <= threshold then
+ if getid(previous) == penalty_code then
+ setpenalty(previous,10000)
+ else
+ insert_node_after(head,previous,new_penalty(10000))
+ end
+ else
+ break
+ end
+ elseif id == kern_code then
+ total = total + getkern(current)
+ if trace_keeptogether then
+ report_keeptogether("%s, index %s, total %s, threshold %s","kern",a,total,threshold)
+ end
+ if total <= threshold then
+ if getid(previous) == penalty_code then
+ setpenalty(previous,10000)
+ else
+ insert_node_after(head,previous,new_penalty(10000))
+ end
+ else
+ break
+ end
+ elseif id == penalty_code then
+ if total <= threshold then
+ if getid(previous) == penalty_code then
+ setpenalty(previous,10000)
+ end
+ setpenalty(current,10000)
+ else
+ break
+ end
+ end
+ previous = current
+ current = getnext(current)
+ end
+end
+
+-- also look at first non glue/kern node e.g for a dropped caps
+
+-- todo: find_attribute and unset_attributes instead of takeattr
+
+function parbuilders.keeptogether(head)
+ local done = false -- can go
+ local current = head
+ while current do
+ if getid(current) == hlist_code then
+ local a = takeattr(current,a_keeptogether)
+ if a and a > 0 then
+ local specification = cache[a]
+ if specification then
+ keeptogether(current,a,specification)
+ -- this is tricky ... we need a better resetter, maybe some
+ -- injected latelua or a gc method on a property (interesting
+ -- experiment)
+ cache[a] = nil
+ done = true
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ return head, done
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-pag.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-pag.mkxl
new file mode 100644
index 00000000000..b34ff079b5a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-pag.mkxl
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=typo-pag,
+%D version=2011.11.02,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Pages,
+%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 Typesetting Macros / Pages}
+
+\unprotect
+
+\registerctxluafile{typo-pag}{autosuffix}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-par.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-par.lmt
new file mode 100644
index 00000000000..005d1b32ecb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-par.lmt
@@ -0,0 +1,96 @@
+if not modules then modules = { } end modules ['typo-par'] = {
+ version = 1.001,
+ comment = "companion to node-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Just some experimental stuff .. trying to improve some ancient metafun manual
+-- hackery that has been on the angenda for too long already. Names might names
+-- anyway.
+
+local insert, remove = table.insert, table.remove
+
+local texget = tex.get
+local texset = tex.set
+local shiftparshape = tex.shiftparshape
+
+local sequencers = utilities.sequencers
+local appendaction = sequencers.appendaction
+local enableaction = sequencers.enableaction
+local disableaction = sequencers.disableaction
+
+local implement = interfaces.implement
+
+local stack = { }
+local top = nil
+local enabled = false
+
+local trace = false trackers.register("paragraphs.tweaks",function(v) trace = v end)
+
+local report = logs.reporter("paragraphs","tweaks")
+
+implement {
+ name = "pushparagraphtweak",
+ public = true,
+ protected = true,
+ arguments = "string",
+ actions = function(t)
+ insert(stack,top)
+ if not enabled then
+ if trace then
+ report("enabling")
+ end
+ enableaction("paragraphcontext","builders.checkparcontext")
+ enabled = true
+ end
+ top = t
+ end
+}
+
+implement {
+ name = "popparagraphtweak",
+ public = true,
+ protected = true,
+ actions = function()
+ top = remove(stack)
+ if enabled and not top then
+ if trace then
+ report("disabling")
+ end
+ disableaction("paragraphcontext","builders.checkparcontext")
+ enabled = false
+ end
+ end
+}
+
+function builders.checkparcontext(where)
+ if top and where == "normal" then
+ if top == "cycle" then
+ local s = texget("parshape",true)
+ if s then
+ local p = texget("prevgraf")
+ while p > s do
+ p = p - s
+ end
+ if trace then
+ report("cycling %i",s)
+ end
+ shiftparshape(p,true)
+ return true
+ end
+ elseif top == "shift" then
+ local s = texget("parshape",true)
+ if s then
+ if trace then
+ report("shifting %i", s)
+ end
+ shiftparshape(texget("prevgraf"))
+ return true
+ end
+ end
+ end
+end
+
+appendaction("paragraphcontext","system","builders.checkparcontext")
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-par.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-par.mkxl
new file mode 100644
index 00000000000..22450e76edb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-par.mkxl
@@ -0,0 +1,60 @@
+%D \module
+%D [ file=typo-par,
+%D version=2008.09.30,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Paragraph 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 / Paragraph Building}
+
+%D This is very experimental, undocumented, subjected to changes, etc. just as
+%D the underlying interfaces. But at least it's cleaned as part of the status-mkiv
+%D cleanup.
+
+% \startparbuilder[basic]
+% \input tufte \par
+% \stopparbuilder
+
+\unprotect
+
+%registerctxluafile{node-ltp}{optimize}
+\registerctxluafile{node-ltp}{}
+\registerctxluafile{trac-par}{}
+\registerctxluafile{typo-par}{}
+
+%D Just a reminder:
+%D
+%D \starttyping
+%D \def\whatever#1{#1mm \dimexpr\hsize-#1mm\relax}
+%D
+%D \parshape
+%D 14
+%D options 1 % repeat
+%D \whatever{0} \whatever {2}\whatever {4}\whatever{6}\whatever{8}\whatever{10}\whatever{12}\whatever{14}
+%D \whatever{12}\whatever{10}\whatever{8}\whatever{6}\whatever {4}\whatever {2}
+%D \pushparagraphtweak {repeat}
+%D \dorecurse{10}{\samplefile{tufte} \samplefile{tufte} \par}
+%D \popparagraphtweak
+%D \page
+%D
+%D \dorecurse{2}{
+%D \parshape 4 5mm 125mm 0mm 120mm 5mm 125mm 0mm 120mm
+%D \pushparagraphtweak {repeat}
+%D \dorecurse{10}{
+%D verse line 1\crlf
+%D verse line 2\crlf
+%D verse line 3\crlf
+%D verse line 4\par
+%D }
+%D \popparagraphtweak
+%D \page
+%D }
+%D \stoptyping
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-plc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-plc.mkxl
new file mode 100644
index 00000000000..e6e90db73c8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-plc.mkxl
@@ -0,0 +1,39 @@
+%D \module
+%D [ file=typo-plc,
+%D version=2020.07.01,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Placeholders,
+%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 Typesetting Macros / Placeholders}
+
+\unprotect
+
+\installcorenamespace {placeholder}
+
+\installcommandhandler \??placeholder {placeholder} \??placeholder
+
+\permanent\protected\def\placeholder[#1]%
+ {\begingroup
+ \edef\currentplaceholder{#1}%
+ \placeholderparameter\c!before
+ \useplaceholderstyleandcolor\c!style\c!color
+ \placeholderparameter\c!text
+ \placeholderparameter\c!after
+ \endgroup}
+
+\defineplaceholder
+ [todo]
+ %[\c!text={Still to be written!},
+ [\c!text=todo, % labeltext ?
+ \c!style=\v!bold,
+ \c!before=\blank,
+ \c!after=\blank]
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-pnc.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-pnc.mkxl
new file mode 100644
index 00000000000..b5b1a17d676
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-pnc.mkxl
@@ -0,0 +1,55 @@
+%D \module
+%D [ file=typo-pnc,
+%D version=2017.06.23, % experiment in project
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Punctuation,
+%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 Typesetting Macros / Punctuation}
+
+\unprotect
+
+% In manuals we often have "foo e.g. bar" where we then have to compensate spaces
+% with "foo e.g.\ bar" so let's see if we can automate that and at the same time
+% inject spaces between the snippets. It gets boring writing this kind of code.
+
+\registerctxluafile{typo-pnc}{}
+
+\definesystemattribute[periodkern][public,global]
+
+\installcorenamespace{periodkerning}
+
+\installcommandhandler \??periodkerning {periodkerning} \??periodkerning
+
+\permanent\protected\def\setperiodkerning[#1]%
+ {\edef\currentperiodkerning{#1}%
+ \ifx\currentperiodkerning\s!reset
+ \resetperiodkerning
+ \else
+ \typo_periodkerning_set
+ \fi}
+
+\def\typo_periodkerning_set
+ {\clf_setperiodkerning{\periodkerningparameter\c!factor}}
+
+\permanent\protected\def\resetperiodkerning % fast one
+ {\c_attr_periodkern\attributeunsetvalue}
+
+\appendtoks
+ \resetperiodkerning
+\to \everyresettypesetting
+
+\defineperiodkerning [zerospaceperiods] [\c!factor=0]
+\defineperiodkerning [smallspaceperiods] [\c!factor=.25]
+\defineperiodkerning [halfspaceperiods] [\c!factor=.5]
+
+% If we ever need a command, see typo-krn.mkiv but it doesn't make much sense
+% to have it.
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-prc.mklx b/Master/texmf-dist/tex/context/base/mkxl/typo-prc.mklx
new file mode 100644
index 00000000000..9531949b8f4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-prc.mklx
@@ -0,0 +1,99 @@
+%D \module
+%D [ file=typo-prc,
+%D version=2008.10.20,
+%D title=\CONTEXT\ Structure Macros,
+%D subtitle=Processors,
+%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 Typesetting Macros / Processors}
+
+%D For the moment manipulators are loaded here too, as they're in the same category
+%D as processors. This might change. (They are used in publications.)
+
+\registerctxluafile{typo-prc}{}
+\registerctxluafile{typo-man}{}
+
+\unprotect
+
+%D Processors are used when we cannot easily associate typesetting directives with
+%D (for instance) structural elements. Instead of ending up with numerous additional
+%D definitions we can group treatments in so called processors.
+%D
+%D An example of where processors can be used is in separator sets (these are
+%D related to typesetting numbers using structure).
+%D
+%D \starttyping
+%D \defineprocessor[demo][style=\bfb,color=red]
+%D \stoptyping
+%D
+%D This defines a processor named \type {demo}. Such a name ends up as prefix in for
+%D instance:
+%D
+%D \starttyping
+%D \defineseparatorset [demosep] [demo->!,demo->?,demo->!,demo->?] [demo->@]
+%D \stoptyping
+%D
+%D Here the \type {!} and \type {?} are just the seperator characters that end up
+%D between part, chapter, section, etc.\ numbers. The third argument defines the
+%D default. When a separator is inserted, the \type{demo} processor will be applied.
+%D Here the number will be separated by red slightly bigger than normal bold
+%D exclamation marks and questionmarks.
+%D
+%D Valid keys for defining a processor are \type {style}, \type {color}, \type
+%D {left}, \type {right}, and \type {command} (the given command takes one
+%D argument).
+
+\installcorenamespace{processor}
+\installcorenamespace{processorcheck}
+
+\installcommandhandler \??processor {processor} \??processor
+
+\appendtoks
+ \letcsname\??processorcheck\currentprocessor\endcsname\relax
+ \clf_registerstructureprocessor{\currentprocessor}% global, but it permits using processor that are yet undefined
+\to \everydefineprocessor
+
+%D The following command can be used by users but normally it will be invoked behind
+%D the screens. After all, processor prefixes need to be split off first. At the
+%D \LUA\ end we do check for a processor being registered anyway.
+
+\permanent\protected\def\applyprocessor#tag%
+ {\def\currentprocessor{#tag}%
+ \ifcsname\??processorcheck\currentprocessor\endcsname
+ \expandafter\typo_processor_apply
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
+\def\typo_processor_apply
+ {\edef\p_state{\processorparameter\c!state}%
+ \ifx\p_state\v!stop
+ \expandafter\firstofoneargument
+ \else
+ \expandafter\typo_processor_apply_indeed
+ \fi}
+
+\def\typo_processor_apply_indeed#content%
+ {\begingroup
+ \useprocessorstyleandcolor\c!style\c!color
+ \processorparameter\c!left
+ \processorparameter\c!command{#content}%
+ \processorparameter\c!right
+ \endgroup}
+
+%D \startbuffer
+%D \defineprocessor[first] [style=bold]
+%D \defineprocessor[last] [first] [color=red]
+%D
+%D \applyprocessor{first}{hans} \applyprocessor{last}{hagen}
+%D \stopbuffer
+%D
+%D \typebuffer \start \blank \getbuffer \blank \stop
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-rep.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-rep.mkxl
new file mode 100644
index 00000000000..6e0a9a22ce0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-rep.mkxl
@@ -0,0 +1,42 @@
+%D \module
+%D [ file=typo-rep,
+%D version=2010.05.23,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Stripping,
+%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 Typesetting Macros / Stripping}
+
+%D Here we implement an experimental stripper. I might cook up a few more
+%D variants when there is real demand. It might even go away.
+%D
+%D \starttyping
+%D \definefontfeature[default][default][mode=node,formatters=strip]
+%D
+%D \setcharacterstripping[1]
+%D \stoptyping
+
+\unprotect
+
+\registerctxluafile{typo-rep}{}
+
+\definesystemattribute[stripping][public]
+
+\permanent\protected\def\setcharacterstripping[#1]%
+ {\clf_setcharacterstripping{#1}}
+
+\permanent\protected\def\resetcharacterstripping
+ {\c_attr_stripping\attributeunsetvalue}
+
+% maybe .. this might disappear, but is handy for testing
+
+\permanent\protected\def\forcecharacterstripping % secret command
+ {\ctxlua{fonts.handlers.otf.features.register("formatters",true)}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-rub.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-rub.lmt
new file mode 100644
index 00000000000..82aa3c269df
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-rub.lmt
@@ -0,0 +1,397 @@
+if not modules then modules = { } end modules ['typo-rub'] = {
+ version = 1.001,
+ comment = "companion to typo-rub.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- todo: recycle slots better
+-- todo: hoffset
+-- todo: auto-increase line height
+-- todo: only hpack when start <> stop
+
+-- A typical bit of afternoon hackery ... with some breaks for watching
+-- Ghost-Note on youtube (Robert Searight and Nate Werth) ... which expands
+-- my to-be-had cd/dvd list again.
+
+local lpegmatch = lpeg.match
+local utfcharacters = utf.characters
+local setmetatableindex = table.setmetatableindex
+
+local variables = interfaces.variables
+local implement = interfaces.implement
+
+local texsetattribute = tex.setattribute
+
+local v_flushleft = variables.flushleft
+local v_middle = variables.middle
+local v_flushright = variables.flushright
+local v_yes = variables.yes
+local v_no = variables.no
+local v_auto = variables.auto
+
+local nuts = nodes.nuts
+
+local getid = nuts.getid
+local getsubtype = nuts.getsubtype
+local getattr = nuts.getattr
+local setattr = nuts.setattr
+local getnext = nuts.getnext
+local setnext = nuts.setnext
+local getprev = nuts.getprev
+local setprev = nuts.setprev
+local setlink = nuts.setlink
+local getlist = nuts.getlist
+local setlist = nuts.setlist
+local setshift = nuts.setshift
+local getwidth = nuts.getwidth
+local setwidth = nuts.setwidth
+
+local hpack = nuts.hpack
+local insert_after = nuts.insert_after
+local takebox = nuts.takebox
+
+local nextlist = nuts.traversers.list
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local glue_code = nodecodes.glue
+local penalty_code = nodecodes.penalty
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local par_code = nodecodes.par
+local dir_code = nodecodes.dir
+
+local kerncodes = nodes.kerncodes
+local fontkern_code = kerncodes.font
+
+local nodepool = nuts.pool
+local new_kern = nodepool.kern
+
+local setprop = nuts.setprop
+local getprop = nuts.getprop
+
+local enableaction = nodes.tasks.enableaction
+
+local nofrubies = 0
+local rubylist = { }
+
+local a_ruby = attributes.private("ruby")
+
+local rubies = { }
+typesetters.rubies = rubies
+
+local trace_rubies = false trackers.register("typesetters.rubies",function(v) trace_rubies = v end)
+local report_rubies = logs.reporter("rubies")
+
+do
+
+ local shared = nil
+ local splitter = lpeg.tsplitat("|")
+
+ local function enable()
+ enableaction("processors","typesetters.rubies.check")
+ enableaction("shipouts", "typesetters.rubies.attach")
+ enable = false
+ end
+
+ local ctx_setruby = context.core.setruby
+
+ local function ruby(settings)
+ local base = settings.base
+ local comment = settings.comment
+ shared = settings
+ local c = lpegmatch(splitter,comment)
+ if #c == 1 then
+ ctx_setruby(base,comment)
+ if trace_rubies then
+ report_rubies("- %s -> %s",base,comment)
+ end
+ else
+ local i = 0
+ for b in utfcharacters(base) do
+ i = i + 1
+ local r = c[i]
+ if r then
+ ctx_setruby(b,r)
+ if trace_rubies then
+ report_rubies("%i: %s -> %s",i,b,r)
+ end
+ else
+ ctx_setruby(b,"")
+ if trace_rubies then
+ report_rubies("%i: %s",i,b)
+ end
+ end
+ end
+ end
+ if enable then
+ enable()
+ end
+ end
+
+ local function startruby(settings)
+ shared = settings
+ if enable then
+ enable()
+ end
+ end
+
+ implement {
+ name = "ruby",
+ actions = ruby,
+ arguments = {
+ {
+ { "align" },
+ { "stretch" },
+ { "hoffset", "dimension" },
+ { "voffset", "dimension" },
+ { "comment" },
+ { "base" },
+ }
+ },
+ }
+
+ implement {
+ name = "startruby",
+ actions = startruby,
+ arguments = {
+ {
+ { "align" },
+ { "stretch" },
+ { "hoffset", "dimension" },
+ { "voffset", "dimension" },
+ }
+ },
+ }
+
+ local function setruby(n,m)
+ nofrubies = nofrubies + 1
+ local r = takebox(n)
+ rubylist[nofrubies] = setmetatableindex({
+ text = r,
+ width = getwidth(r),
+ basewidth = 0,
+ start = false,
+ stop = false,
+ }, shared)
+ texsetattribute(a_ruby,nofrubies)
+ end
+
+ implement {
+ name = "setruby",
+ actions = setruby,
+ arguments = "integer",
+ }
+
+end
+
+function rubies.check(head)
+ local current = head
+ local start = nil
+ local stop = nil
+ local found = nil
+
+ local function flush(where)
+ local r = rubylist[found]
+ if r then
+ local prev = getprev(start)
+ local next = getnext(stop)
+ setprev(start)
+ setnext(stop)
+ local h = hpack(start)
+ if start == head then
+ head = h
+ else
+ setlink(prev,h)
+ end
+ setlink(h,next)
+ local bwidth = getwidth(h)
+ local rwidth = r.width
+ r.basewidth = bwidth
+ r.start = start
+ r.stop = stop
+ setprop(h,"ruby",found)
+ if rwidth > bwidth then
+ -- ruby is wider
+ setwidth(h,rwidth)
+ end
+ end
+ end
+
+ while current do
+ local nx = getnext(current)
+ local id = getid(current)
+ if id == glyph_code then
+ local a = getattr(current,a_ruby)
+ if not a then
+ if found then
+ flush("flush 1")
+ found = nil
+ end
+ elseif a == found then
+ stop = current
+ else
+ if found then
+ flush("flush 2")
+ end
+ found = a
+ start = current
+ stop = current
+ end
+ -- go on
+ elseif id == kern_code and getsubtype(current,fontkern_code) then
+ -- go on
+ elseif found and id == disc_code then
+ -- go on (todo: look into disc)
+ elseif found then
+ flush("flush 3")
+ found = nil
+ end
+ current = nx
+ end
+ if found then
+ flush("flush 4")
+ end
+ return head, true -- no need for true
+end
+
+local attach
+
+local function whatever(current,list)
+ local a = getprop(current,"ruby")
+ if a then
+ local ruby = rubylist[a]
+ local align = ruby.align or v_middle
+ local stretch = ruby.stretch or v_no
+ local hoffset = ruby.hoffset or 0
+ local voffset = ruby.voffset or 0
+ local start = ruby.start
+ local stop = ruby.stop
+ local text = ruby.text
+ local rwidth = ruby.width
+ local bwidth = ruby.basewidth
+ local delta = rwidth - bwidth
+ setwidth(text,0)
+ if voffset ~= 0 then
+ setshift(text,voffset)
+ end
+ -- center them
+ if delta > 0 then
+ -- ruby is wider
+ if stretch == v_yes then
+ setlink(text,start)
+ while start and start ~= stop do
+ local s = nodepool.stretch()
+ local n = getnext(start)
+ setlink(start,s,n)
+ start = n
+ end
+ text = hpack(text,rwidth,"exactly")
+ else
+ local left = new_kern(delta/2)
+ local right = new_kern(delta/2)
+ setlink(text,left,start)
+ setlink(stop,right)
+ end
+ setlist(current,text)
+ elseif delta < 0 then
+ -- ruby is narrower
+ if align == v_auto then
+ local l = true
+ local c = getprev(current)
+ while c do
+ local id = getid(c)
+ if id == glue_code or id == penalty_code or id == kern_code then
+ -- go on
+ elseif id == hlist_code and getwidth(c) == 0 then
+ -- go on
+ elseif id == whatsit_code or id == par_code or id == dir_code then
+ -- go on
+ else
+ l = false
+ break
+ end
+ c = getprev(c)
+ end
+ local r = true
+ local c = getnext(current)
+ while c do
+ local id = getid(c)
+ if id == glue_code or id == penalty_code or id == kern_code then
+ -- go on
+ elseif id == hlist_code and getwidth(c) == 0 then
+ -- go on
+ else
+ r = false
+ break
+ end
+ c = getnext(c)
+ end
+ if l and not r then
+ align = v_flushleft
+ elseif r and not l then
+ align = v_flushright
+ else
+ align = v_middle
+ end
+ end
+ if align == v_flushleft then
+ setlink(text,start)
+ setlist(current,text)
+ elseif align == v_flushright then
+ local left = new_kern(-delta)
+ local right = new_kern(delta)
+ setlink(left,text,right,start)
+ setlist(current,left)
+ else
+ local left = new_kern(-delta/2)
+ local right = new_kern(delta/2)
+ setlink(left,text,right,start)
+ setlist(current,left)
+ end
+ else
+ setlink(text,start)
+ setlist(current,text)
+ end
+ setprop(current,"ruby",false)
+ rubylist[a] = nil
+ elseif list then
+ attach(list)
+ end
+end
+
+attach = function(head)
+ for current, id, subtype, list in nextlist, head do
+ if id == hlist_code or id == vlist_code then
+ whatever(current,list)
+ end
+ end
+ return head
+end
+
+rubies.attach = attach
+
+-- for now there is no need to be compact
+
+-- local data = { }
+-- rubies.data = data
+--
+-- function rubies.define(settings)
+-- data[#data+1] = settings
+-- return #data
+-- end
+--
+-- implement {
+-- name = "defineruby",
+-- actions = { rubies.define, context },
+-- arguments = {
+-- {
+-- { "align" },
+-- { "stretch" },
+-- }
+-- }
+-- }
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-rub.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-rub.mkxl
new file mode 100644
index 00000000000..b4b0cbc5ee8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-rub.mkxl
@@ -0,0 +1,173 @@
+%D \module
+%D [ file=typo-rub,
+%D version=2016.10.10,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Rubies,
+%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 Experimental and unfinished.
+
+% todo: distance
+
+\writestatus{loading}{ConTeXt Typesetting Macros / Rubies}
+
+\unprotect
+
+\registerctxluafile{typo-rub}{autosuffix}
+
+\definesystemattribute[ruby][public]
+
+\installcorenamespace {ruby}
+\installcorenamespace {rubyanalyze}
+\installcorenamespace {rubyplacement}
+\installcorenamespace {rubynumber}
+
+\installcommandhandler \??ruby {ruby} \??ruby
+
+% \appendtoks
+% \clf_defineruby
+% align {\rubyparameter\c!align}
+% stretch {\rubyparameter\c!stretch}
+% hoffset \rubyparameter\c!hoffset
+% voffset \rubyparameter\c!voffset
+% \relax
+% \to \everydefineruby
+
+\permanent\tolerant\protected\def\ruby[#1]#:#2#3%
+ {\dontleavehmode
+ \begingroup
+ \enforced\let\ruby\noruby
+ \edef\currentruby{#1}%
+ \edef\p_location{\rubyparameter\c!location}%
+ \enforced\let|\relax
+ \ifcsname\??rubyanalyze\p_location\endcsname
+ \expandafter\lastnamedcs\else\expandafter\typo_ruby_analyze
+ \fi{#2}{#3}%
+ \endgroup}
+
+\permanent\tolerant\protected\def\noruby[#1]#:#2#3%
+ {#2}
+
+\def\typo_ruby_analyze#1#2%
+ {\clf_ruby
+ base {#1}%
+ comment {#2}
+ \relax}
+
+\setvalue{\??rubyanalyze\v!top}#1#2%
+ {\clf_ruby
+ align {\rubyparameter\c!align}%
+ stretch {\rubyparameter\c!stretch}%
+ hoffset \rubyparameter\c!hoffset
+ voffset \rubyparameter\c!voffset
+ base {#1}%
+ comment {#2}
+ \relax}
+
+\setvalue{\??rubyplacement\v!top}#1#2%
+ {\setbox\scratchbox\hbox\bgroup
+ \userubystyleandcolor\c!style\c!color
+ #2%
+ \egroup
+ \clf_setruby \scratchbox
+ \relax
+ #1}
+
+\setvalue{\??rubyplacement\v!right}#1#2%
+ {#1%
+ \edef\p_distance{\rubyparameter\c!distance}%
+ \ifempty\p_distance\orelse\ifx\p_distance\v!none\else\hskip\p_distance\fi
+ \begingroup
+ \userubystyleandcolor\c!style\c!color
+ \rubyparameter\c!left#2\rubyparameter\c!right
+ \endgroup}
+
+\setvalue{\??rubyplacement\v!left}#1#2%
+ {\begingroup
+ \userubystyleandcolor\c!style\c!color
+ \rubyparameter\c!left#2\rubyparameter\c!right
+ \endgroup
+ \edef\p_distance{\rubyparameter\c!distance}%
+ \ifempty\p_distance\orelse\ifx\p_distance\v!none\else\hskip\p_distance\fi
+ #1}
+
+\permanent\protected\def\setruby#1#2%
+ {\begingroup
+ \ifcsname\??rubyplacement\p_location\endcsname
+ \lastnamedcs{#1}{#2}%
+ \else
+ #1%
+ \fi
+ \endgroup}
+
+\permanent\tolerant\protected\def\startruby[#1]%
+ {\dontleavehmode
+ \begingroup
+ \enforced\aliased\startruby\begingroup
+ \edef\currentruby{#1}%
+ \clf_startruby
+ align {\rubyparameter\c!align}%
+ stretch {\rubyparameter\c!stretch}%
+ hoffset \rubyparameter\c!hoffset
+ voffset \rubyparameter\c!voffset
+ \relax}
+
+\permanent\protected\def\stopruby
+ {\endgroup}
+
+\setupruby
+ [\c!style=\txx,
+ \c!location=\v!top,
+ \c!left=(,
+ \c!right=),
+ \c!distance=\zeropoint, % \v!none means no skip at all so no break either
+ \c!hoffset=\zeropoint,
+ \c!voffset=-2\exheight]
+
+%D Experiment too:
+
+\permanent\protected\def\numberedruby[#1]#2%
+ {\doifnotcounter{\??rubynumber#1}{\definecounter[\??rubynumber#1]\setcounter[\??rubynumber#1][1]}%
+ \ruby[#1]{#2}{\convertedcounter[\??rubynumber#1]}%
+ \incrementcounter[\??rubynumber#1]%
+ \relax}
+
+\protect \endinput
+
+% \usemodule[art-01]\setupbodyfont[dejavu,12pt]
+%
+% \defineruby[auto] [align=auto,color=darkred]
+% \defineruby[left] [align=flushleft,color=darkred]
+% \defineruby[right] [align=flushright,color=darkred]
+% \defineruby[spread][stretch=yes]
+%
+% \showframe \showglyphs \showfontkerns \setupinterlinespace[22pt]
+%
+% \starttext
+%
+% \startbuffer
+% \dorecurse{20}{\ruby{XYZ}{a|bc|d} }\par
+% \dorecurse{20}{\ruby{PQR}{p|q|r} }\par
+% \dorecurse{20}{\ruby{XYZ}{1|22|333} }\par
+% \dorecurse{20}{\ruby{XYZ}{111|222|333} }\par
+% \dorecurse{20}{\ruby{XYZ}{foobar} }\par
+% \dorecurse{20}{\ruby{XYZ}{fooledbar} }\par
+% \dorecurse{20}{\ruby[spread]{XYZ}{fooledbar} }\par
+% \dorecurse{20}{\ruby{extremely}{wide} }\par
+% \dorecurse{20}{\ruby{wide}{extremely} }\par
+% stopbuffer
+%
+% \testfeatureonce{1}{\start \setupinterlinespace[16pt] \setupruby[location=none] \getbuffer \stop \page}
+% \testfeatureonce{1}{\start \setupinterlinespace[16pt] \setupruby[location=right] \getbuffer \stop \page}
+% \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=auto,color=darkred] \getbuffer \stop \page}
+% \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=flushleft,color=darkgreen] \getbuffer \stop \page}
+% \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=flushright,color=darkblue] \getbuffer \stop \page}
+% \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=middle,color=darkyellow] \getbuffer \stop \page}
+%
+% \stoptext
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-scr.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-scr.mkxl
new file mode 100644
index 00000000000..bb67228cdc0
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-scr.mkxl
@@ -0,0 +1,266 @@
+%D \module
+%D [ file=typo-scr,
+%D version=2012.01.23, % very old ... 1995.10.10 .. moved from core-mis
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Scripts,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Typesetting Macros / Scripts}
+
+\unprotect
+
+%D I addition to the commands implemented here, we have alternative commands
+%D \type {shiftup} and \type {shiftdown} that can work across paragraphs.
+
+%D \macros
+%D {low, high, definelow, definehigh, setuplow, setuphigh}
+%D
+%D Although \TEX\ is pretty well aware of super- and subscripts, its mechanism
+%D is mainly tuned for math mode. The next few commands take care of script
+%D texts both modes.
+%D
+%D \startbuffer
+%D The higher\high{one goes} the lower\low{one drops}, or\lohi{yes}{no}?
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \getbuffer
+%D
+%D Note the different placement of \type {\lohi}, where we need a bit more
+%D space. The implementation looks a bit fuzzy, since some \type {\fontdimen}'s
+%D are involved to determine the optimal placement.
+
+\installcorenamespace {low}
+\installcorenamespace {high}
+
+\installcommandhandler \??low {low} \??low
+\installcommandhandler \??high {high} \??high
+
+\setuplow [\c!style=\tx,\c!distance=\zeropoint,\c!down=.48\exheight] % historical
+\setuphigh[\c!style=\tx,\c!distance=\zeropoint,\c!up =.86\exheight] % values
+
+\appendtoks \frozen\protected\edefcsname\currentlow \endcsname{\typo_scripts_low [\currentlow ]}\to \everydefinelow
+\appendtoks \frozen\protected\edefcsname\currenthigh\endcsname{\typo_scripts_high[\currenthigh]}\to \everydefinehigh
+
+\protected\def\typo_scripts_low[#1]#2%
+ {\dontleavehmode
+ \begingroup
+ \edef\currentlow{#1}%
+ \kern\lowparameter\c!distance\relax
+ \setbox\scratchbox\runninghbox\bgroup
+ \lower\lowparameter\c!down\hbox\bgroup
+ \ifempty\fontsize
+ \ifmmode
+ \mr % no color yet
+ \else
+ \uselowstyleandcolor\c!style\c!color
+ \fi
+ \else
+ \uselowstyleandcolor\c!style\c!color
+ \fi
+ \dostarttagged\t!sub\currentlow
+ #2%
+ \dostoptagged
+ \egroup
+ \egroup
+ \ht\scratchbox\strutht
+ \dp\scratchbox\strutdp
+ \box\scratchbox
+ \endgroup}
+
+\protected\def\typo_scripts_high[#1]#2%
+ {\dontleavehmode
+ \begingroup
+ \edef\currenthigh{#1}%
+ \kern\highparameter\c!distance\relax
+ \setbox\scratchbox\runninghbox\bgroup
+ \raise\highparameter\c!up\hbox\bgroup
+ \ifempty\fontsize
+ \ifmmode
+ \mr % no color yet
+ \else
+ \usehighstyleandcolor\c!style\c!color
+ \fi
+ \else
+ \usehighstyleandcolor\c!style\c!color
+ \fi
+ \dostarttagged\t!sup\currenthigh
+ #2%
+ \dostoptagged
+ \egroup
+ \egroup
+ \ht\scratchbox\strutht
+ \dp\scratchbox\strutdp
+ \box\scratchbox
+ \endgroup}
+
+\permanent\protected\def\low {\typo_scripts_low []}
+\permanent\protected\def\high{\typo_scripts_high[]}
+
+%D \macros
+%D {lohi, hilo, definelohi, setuplohi}
+%D
+%D You can provide an optional keyword \type {left}, in which case the super and
+%D subscripts will be aligned in a way that permits placement at the left of a word
+%D (which means that it will be right aligned).
+%D
+%D \startbuffer
+%D \lohi {aha} {ah} test \lohi {aha} {ah} test
+%D \lohi [left] {aha} {ah} test \lohi [left] {aha} {ah} test
+%D \lohi {aha} {ah} test \lohi {aha} {ah} test
+%D \lohi [left] {aha} {ah}test \lohi [left] {aha} {ah} test
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \getbuffer
+
+\installcorenamespace {lowhigh}
+
+\installcommandhandler \??lowhigh {lowhigh} \??lowhigh
+
+\setuplowhigh
+ [\c!style=\tx,
+ \c!distance=.1\exheight, % these are
+ \c!up=.96\exheight, % historical
+ \c!down=.58\exheight] % values
+
+\appendtoks
+ \frozen\setuevalue\currentlowhigh{\typo_scripts_lowhigh[\currentlowhigh]}%
+\to \everydefinelowhigh
+
+\tolerant\protected\def\typo_scripts_lowhigh[#1]#*[#2]#:#3#4% todo: align .. [#1] is compatible hack
+ {\dontleavehmode
+ \runninghbox\bgroup
+ \edef\currentlowhigh{#1}%
+ \dostarttagged\t!subsup\currentlowhigh
+ \scratchdimen\lowhighparameter\c!distance\relax
+ \setbox\plusfour\hpack{\typo_scripts_lowhigh_low_high\lower\c!down\t!sub{#3}}%
+ \setbox\plussix \hpack{\typo_scripts_lowhigh_low_high\raise\c!up \t!sup{#4}}%
+ \edef\p_align{#2}%
+ \ifx\p_align\v!left
+ \ifdim\wd\plusfour<\wd\plussix
+ \setbox\plusfour\hpack to \wd\plussix {\hss\box\plusfour}%
+ \else
+ \setbox\plussix \hpack to \wd\plusfour{\hss\box\plussix }%
+ \fi
+ \fi
+ \ifdim\wd\plusfour<\wd\plussix
+ \wd\plusfour\zeropoint
+ \box\plusfour
+ \box\plussix
+ \else
+ \wd\plussix\zeropoint
+ \box\plussix
+ \box\plusfour
+ \fi
+ \dostoptagged
+ \egroup}
+
+\def\typo_scripts_lowhigh_low_high#1#2#3#4%
+ {\kern\scratchdimen
+ \setbox\scratchbox\hpack\bgroup
+ #1\lowhighparameter#2\hbox\bgroup
+ \ifempty\fontsize
+ \ifmmode
+ \mr % no color yet
+ \else
+ \uselowhighstyleandcolor\c!style\c!color
+ \fi
+ \else
+ \uselowhighstyleandcolor\c!style\c!color
+ \fi
+ \dostarttagged#3\empty
+ #4%
+ \dostoptagged
+ \egroup
+ \egroup
+ \ht\scratchbox\strutht
+ \dp\scratchbox\strutdp
+ \box\scratchbox}
+
+\permanent\tolerant\protected\def\typo_scripts_highlow[#1]#*[#2]#:#3#4%
+ {\typo_scripts_lowhigh[#1][#2]{#4}{#3}}
+
+\permanent\protected\def\lohi{\typo_scripts_lowhigh[]}
+\permanent\protected\def\hilo{\typo_scripts_highlow[]}
+
+%D \macros
+%D {lowmidhigh, definelowmidhigh, setuplowmidhigh}
+%D
+%D The previous command originally didn't have definers. These were introduced when
+%D the next showed up:
+%D
+%D \startbuffer
+%D \definelow [MyLow] [style=\txx]
+%D \definehigh [MyHigh] [style=\txx]
+%D \definelowhigh [MyLoHi] [style=\txx]
+%D \definelowmidhigh[MyLoMiHi][style=\txx]
+%D
+%D We have
+%D \ruledhbox{\low {L}} and \ruledhbox{\MyLow {L}} and
+%D \ruledhbox{\high {H}} and \ruledhbox{\MyHigh {H}} and
+%D \ruledhbox{\lohi {L}{H}} and \ruledhbox{\MyLoHi {L}{H}} and
+%D \ruledhbox{\lomihi{L}{M}{H}} and \ruledhbox{\MyLoMiHi{L}{M}{H}}.
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\installcorenamespace {lowmidhigh}
+
+\installcommandhandler \??lowmidhigh {lowmidhigh} \??lowmidhigh
+
+\setuplowmidhigh
+ [\c!style=\tx,
+ \c!up=.8\struthtdp,
+ \c!down=.8\struthtdp]
+
+\appendtoks
+ \frozen\setuevalue\currentlowmidhigh{\typo_scripts_lowmidhigh[\currentlowmidhigh]}%
+\to \everydefinelowmidhigh
+
+\protected\def\typo_scripts_lowmidhigh[#1]#2#3#4%
+ {\dontleavehmode
+ \runninghbox\bgroup
+ \edef\currentlowmidhigh{#1}%
+ \dostarttagged\t!subsup\currentlowmidhigh
+ \uselowmidhighstyleandcolor\c!style\c!color
+ \setstrut
+ \setbox\plustwo \hbox{\strut\dostarttagged\t!sub\empty#2\dostoptagged}%
+ \setbox\plusfour\hbox{\strut\dostarttagged\t!mid\empty#3\dostoptagged}% inefficient
+ \setbox\plussix \hbox{\strut\dostarttagged\t!sup\empty#4\dostoptagged}%
+ \scratchdimen \wd
+ \ifdim\wd\plustwo>\wd\plusfour
+ \ifdim\wd\plustwo>\wd\plussix
+ \plustwo
+ \else
+ \plussix
+ \fi
+ \else
+ \ifdim\wd\plusfour>\wd\plussix
+ \plusfour
+ \else
+ \plussix
+ \fi
+ \fi
+ \relax
+ \setbox\plustwo \hpack to \scratchdimen{\hss\lower\lowmidhighparameter\c!down\box\plustwo \hss}%
+ \setbox\plusfour\hpack to \scratchdimen{\hss \box\plusfour\hss}%
+ \setbox\plussix \hpack to \scratchdimen{\hss\raise\lowmidhighparameter\c!up \box\plussix \hss}%
+ \wd\plustwo \zeropoint
+ \wd\plusfour\zeropoint
+ \box\plusfour
+ \box\plustwo
+ \box\plussix
+ \dostoptagged
+ \egroup}
+
+\permanent\protected\def\lomihi {\typo_scripts_lowmidhigh[]}
+\permanent\protected\def\himilo#1#2#3{\typo_scripts_lowmidhigh[]{#3}{#2}{#1}}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-shp.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-shp.lmt
new file mode 100644
index 00000000000..30719c40e28
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-shp.lmt
@@ -0,0 +1,267 @@
+if not modules then modules = { } end modules ['meta-imp-txt'] = {
+ version = 1.001,
+ comment = "companion to meta-imp-txt.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local setmetatableindex = table.setmetatableindex
+local settings_to_array = utilities.parsers.settings_to_array
+
+local texget = tex.get
+local texset = tex.set
+local texgetcount = tex.getcount
+local texgetglue = tex.getglue
+
+local expandmacro = token.expand_macro
+
+local implement = interfaces.implement
+
+local scan = mp.scan
+local scannumeric = scan.numeric
+local scaninteger = scan.integer
+local scanboolean = scan.boolean
+local scanstring = scan.string
+
+local bpfactor = number.dimenfactors.bp
+
+local context = context
+
+local parshapes = { }
+local properties = { }
+
+metapost.registerscript("setparshapeproperty", function()
+ local k = scanstring()
+ if k == "line" then
+ local entry = properties.shape[scannumeric()]
+ local indent = scannumeric() / bpfactor
+ local width = scannumeric() / bpfactor
+ entry[1] = indent
+ entry[2] = width
+ elseif k == "lines" then
+ properties.lines = scaninteger()
+ properties.shape = setmetatableindex(function(t,k)
+ local v = { 0, properties.width or 0 }
+ t[k] = v
+ return v
+ end)
+ elseif k == "first" then
+ properties[k] = scanboolean()
+ elseif k == "inspect" then
+ inspect(properties)
+ else
+ properties[k] = scannumeric() / bpfactor
+ end
+end)
+
+implement {
+ name = "setparagraphmetashape",
+ public = true,
+ protected = true,
+ arguments = { "optional", "optional" }, -- array
+ actions = function(list,options)
+ if list and list ~= "" then
+ list = settings_to_array(list) -- array
+ options = settings_to_array(options) -- array
+ if #list > 0 then
+ parshapes = { }
+ properties = { }
+ for i=1,#list do
+ properties = { }
+ parshapes[i] = properties
+ expandmacro("spac_shapes_calculate","{"..list[i].."}")
+ end
+ local t, n = { }, 0
+ for i=1,#parshapes do
+ local p = parshapes[i]
+ local s = p.shape
+ if s then
+ for i=1,(p.lines or #s) do
+ n = n + 1
+ t[n] = s[i]
+ end
+ end
+ end
+ if n > 0 then
+ for i=1,#options do
+ t[options[i]] = true
+ end
+ texset("parshape",t)
+ end
+ end
+ end
+ end
+}
+
+-- implement {
+-- name = "resetparagraphmetashape",
+-- public = true,
+-- protected = true,
+-- actions = function(list)
+-- parshapes = { }
+-- properties = { }
+-- end
+-- }
+
+implement {
+ name = "getshapeparameter",
+ public = true,
+ arguments = "string",
+ actions = function(name)
+ local index = texgetcount("shapetextindex")
+ local value = parshapes[index][name]
+ if type(value) == "boolean" then
+ value = value and 1 or 0
+ end
+ context(value or 0) -- so the first check, for "lines" is always ok
+ end
+}
+
+-- Another experiment: continuing parshapes with alternative definitions:
+--
+-- left d | right d | left d right d | both d | left d hsize d |
+-- copy n | reset | repeat | done
+
+do
+
+ local scanners = tokens.scanners
+ local scanword = scanners.word
+ local scandimen = scanners.dimen
+ local scanstring = scanners.string
+ local scancardinal = scanners.cardinal
+
+ implement {
+ name = "setparagraphshape",
+ protected = true,
+ actions = function()
+ local t = { }
+ local n = 0
+ local h = texget("hsize")
+ local a = 0
+ while true do
+ local key = scanword()
+ ::AGAIN::
+ if key == "left" then
+ local l = scandimen()
+ key = scanword()
+ if key == "right" then
+ n = n + 1 ; t[n] = { l, a + h - l - scandimen() }
+ elseif key == "hsize" then
+ n = n + 1 ; t[n] = { l, a + scandimen() }
+ else
+ n = n + 1 ; t[n] = { l, a + h }
+ goto AGAIN
+ end
+ elseif key == "right" then
+ n = n + 1 ; t[n] = { 0, a + h - scandimen() }
+ elseif key == "both" then
+ local b = scandimen()
+ n = n + 1 ; t[n] = { b, a + h - b - b }
+ elseif key == "copy" then
+ local c = scancardinal()
+ for i=1,c do
+ local m = n + 1
+ t[m] = t[n]
+ n = m
+ end
+ elseif key == "done" then
+ -- in case the user ended with "done"
+ scanword()
+ break
+ elseif key == "metapost" then
+ local list = settings_to_array(scanstring()) -- array
+ properties = { }
+ parshapes = { }
+ for i=1,#list do
+ properties = { }
+ parshapes[i] = properties
+ expandmacro("spac_shapes_calculate","{"..list[i].."}")
+ end
+ for i=1,#parshapes do
+ local p = parshapes[i]
+ local s = p.shape
+ if s then
+ for i=1,(p.lines or #s) do
+ local si = s[i]
+ n = n + 1 ; t[n] = { si[1], a + si[2] }
+ end
+ end
+ end
+ elseif key == "repeat" then
+ t["repeat"] = true
+ elseif key == "delete" then
+ local c = scancardinal()
+ for i=1,c do
+ if n > 0 then
+ t[n] = nil
+ n = n - 1
+ else
+ break
+ end
+ end
+ elseif key == "reset" then
+ n = n + 1 ; t[n] = { 0, a + h }
+ break
+ elseif key == "absolute" then
+ local s = scanword()
+ local l = texgetglue("leftskip")
+ local r = texgetglue("rightskip")
+ if s == "left" then
+ a = l
+ elseif s == "right" then
+ a = r
+ elseif s == "both" then
+ a = l + r
+ else
+ a = l + r
+ goto AGAIN
+ end
+ else
+ logs.report("system","bad key %a in paragraphshape",key)
+ break
+ end
+ end
+ texset("parshape",t)
+ end,
+ }
+
+ local NC = context.NC
+ local NR = context.NR
+ local VL = context.VL
+
+ implement {
+ name = "showparagraphshape",
+ protected = true,
+ public = true,
+ actions = function()
+ local p = texget("parshape")
+ if p then
+ -- only english interface (for now)
+ context.inleftmargin(
+ {
+ align = "flushright",
+ strut = "no",
+ width = "0pt",
+ -- voffset = "-\\lineheight"
+ }, function()
+ context.starttabulate {
+ before = "",
+ after = "",
+ unit = "2pt",
+ rulethickness = ".1pt",
+ format = "|rb{\\smallinfofont}|lb{\\smallinfofont}|"
+ }
+ for i=1,#p do
+ NC() context("%P",p[i][1])
+ VL() context("%P",p[i][2])
+ NC() NR()
+ end
+ context.stoptabulate()
+ end
+ )
+ end
+ end
+ }
+
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-shp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-shp.mkxl
new file mode 100644
index 00000000000..b74003068fa
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-shp.mkxl
@@ -0,0 +1,130 @@
+%D \module
+%D [ file=typo-shp,
+%D version=2021.02.27, % was meta-txt / meta-imp-txt / 2000.07.06
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Paragraph Shapes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D I finally decided to move some of the code written in 2000 for the
+%D \METAFUN\ manual to its own core module. Of course it got adapted
+%D to the way \LMTX\ does things.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Paragraph Shapes}
+
+\registerctxluafile{typo-shp}{autosuffix}
+
+\unprotect
+
+%D Something new (experimental and evolving):
+%D
+%D \starttyping
+%D \parshape
+%D 3
+%D options 1 % repeat
+%D 0cm 10cm 2cm 8cm 4cm 6cm
+%D lots of text
+%D \stoptyping
+%D
+%D \starttyping
+%D \parshape 4 5mm 125mm 0mm 120mm 5mm 125mm 0mm 120mm
+%D \pushparagraphtweak {repeat}
+%D verse line 1\crlf
+%D verse line 2\crlf
+%D verse line 3\crlf
+%D verse line 4\par
+%D etc
+%D \popparagraphtweak
+%D \stoptyping
+
+%D But we wrap this in a more abstract interface:
+
+\installcorenamespace {parshapes}
+
+\aliased\let\stopparagraphshape\relax
+
+\permanent\protected\def\startparagraphshape[#1]#2\stopparagraphshape
+ {\gdefcsname\??parshapes#1\endcsname{#2}} % global
+
+\permanent\protected\def\rawparagraphshape#1%
+ {\begincsname\??parshapes#1\endcsname}
+
+\permanent\protected\def\setparagraphshape[#1]%
+ {\ifcsname\??parshapes#1\endcsname
+ \expandafter\clf_setparagraphshape\lastnamedcs done\relax
+ \fi}
+
+\def\spac_shapes_calculate#1% called locally in \LUA
+ {\startMPcalculation \includeMPgraphic{#1} \stopMPcalculation}
+
+\permanent\protected\tolerant\def\startshapedparagraph[#1]% no grouping
+ {\begingroup
+ \getdummyparameters[\c!method=,\c!list=,\c!mp=,\c!repeat=,#1]%
+ \edef\p_mp {\dummyparameter\c!mp}%
+ \edef\p_repeat{\dummyparameter\c!repeat}%
+ \setlocalhsize
+ \normalexpanded
+ {\endgroup
+ \ifempty\p_mp
+ \setparagraphshape[\dummyparameter\c!list]%
+ \else
+ \setparagraphmetashape[\dummyparameter\c!mp][\ifx\p_repeat\v!yes repeat\fi]%
+ \fi
+ \pushparagraphtweak{\dummyparameter\c!method}\relax}}
+
+\permanent\protected\def\stopshapedparagraph
+ {\popparagraphtweak}
+
+%D As it is not much code we now put it here:
+
+\newbox \shapetextbox
+\newcount\shapetextindex
+
+\permanent\protected\def\startshapetext[#1]%
+ {\begingroup
+ \global\shapetextindex\zerocount
+ \global\setbox\shapetextbox\vbox\bgroup
+ \setparagraphmetashape[#1]%
+ \forgetall
+ \dontcomplain
+ \setuptolerance[\v!verytolerant,\v!stretch]% default
+ % \setuplayout[\c!grid=\v!yes]% goes wrong, we need a local one
+ \pushparagraphtweak {shift}}
+
+\permanent\protected\def\stopshapetext
+ {\popparagraphtweak
+ \egroup
+ \endgroup}
+
+\permanent\protected\def\getshapetext
+ {\vbox\bgroup
+ \forgetall
+ \dontcomplain
+ \global\advance\shapetextindex\plusone
+ \scratchcounter\getshapeparameter{lines}\relax
+ \ifnum\scratchcounter>\zerocount
+ \scratchwidth \getshapeparameter{width}\scaledpoint\relax
+ \scratchheight \getshapeparameter{height}\scaledpoint\relax
+ \setbox\scratchbox\vpack to \scratchheight
+ {\splittopskip\strutheight
+ \vskip\dimexpr\getshapeparameter{voffset}\scaledpoint\relax
+ \ifcase\numexpr\getshapeparameter{first}\relax\else
+ \vskip\lineheight
+ \fi
+ \hskip\dimexpr\getshapeparameter{hoffset}\scaledpoint\relax
+ \hpack{\vsplit\shapetextbox to \scratchcounter\lineheight}}%
+ \wd\scratchbox\scratchwidth
+ \ht\scratchbox\scratchheight
+ \dp\scratchbox\zeropoint
+ \box\scratchbox
+ \else
+ % what now
+ \fi
+ \egroup}
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-spa.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-spa.lmt
new file mode 100644
index 00000000000..84dd0696d6c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-spa.lmt
@@ -0,0 +1,255 @@
+if not modules then modules = { } end modules ['typo-spa'] = {
+ version = 1.001,
+ comment = "companion to typo-spa.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next, type = next, type
+
+local trace_spacing = false trackers.register("typesetters.spacing", function(v) trace_spacing = v end)
+
+local report_spacing = logs.reporter("typesetting","spacing")
+
+local nodes, fonts, node = nodes, fonts, node
+
+local fonthashes = fonts.hashes
+local quaddata = fonthashes.quads
+
+local texsetattribute = tex.setattribute
+local unsetvalue = attributes.unsetvalue
+
+local v_reset = interfaces.variables.reset
+
+local nuts = nodes.nuts
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getattr = nuts.getattr
+local isglyph = nuts.isglyph
+
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local remove_node = nuts.remove
+local end_of_math = nuts.end_of_math
+local unset_attributes = nuts.unset_attributes
+local find_attribute = nuts.find_attribute
+
+local nodepool = nuts.pool
+local new_penalty = nodepool.penalty
+local new_glue = nodepool.glue
+
+local nodecodes = nodes.nodecodes
+local math_code = nodecodes.math
+
+local somespace = nodes.somespace
+local somepenalty = nodes.somepenalty
+
+local enableaction = nodes.tasks.enableaction
+
+typesetters = typesetters or { }
+local typesetters = typesetters
+
+typesetters.spacings = typesetters.spacings or { }
+local spacings = typesetters.spacings
+
+spacings.mapping = spacings.mapping or { }
+spacings.numbers = spacings.numbers or { }
+
+local a_spacings = attributes.private("spacing")
+
+storage.register("typesetters/spacings/mapping", spacings.mapping, "typesetters.spacings.mapping")
+
+local mapping = spacings.mapping
+local numbers = spacings.numbers
+
+for i=1,#mapping do
+ local m = mapping[i]
+ numbers[m.name] = m
+end
+
+-- todo cache lastattr
+
+function spacings.handler(head)
+ local _, start = find_attribute(head, a_spacings)
+ if start then
+ local done = false
+ -- head is always begin of par (whatsit), so we have at least two prev nodes
+ -- penalty followed by glue
+ while start do
+ local char, id = isglyph(start)
+ if char then
+ local attr = getattr(start,a_spacings)
+ if attr and attr > 0 then
+ local data = mapping[attr]
+ if data then
+ local map = data.characters[char]
+ if map then
+ local font = id
+ local left = map.left
+ local right = map.right
+ local alternative = map.alternative
+ local quad = quaddata[font]
+ local prev = getprev(start)
+ if left and left ~= 0 and prev then
+ local ok = false
+ local prevprev = getprev(prev)
+ if alternative == 1 then
+ local somespace = somespace(prev,true)
+ if somespace then
+ local somepenalty = somepenalty(prevprev,10000)
+ if somepenalty then
+ if trace_spacing then
+ report_spacing("removing penalty and space before %C (left)",char)
+ end
+ head = remove_node(head,prev,true)
+ head = remove_node(head,prevprev,true)
+ else
+ if trace_spacing then
+ report_spacing("removing space before %C (left)",char)
+ end
+ head = remove_node(head,prev,true)
+ end
+ end
+ ok = true
+ else
+ ok = not (somespace(prev,true) and somepenalty(prevprev,true)) or somespace(prev,true)
+ end
+ if ok then
+ if trace_spacing then
+ report_spacing("inserting penalty and space before %C (left)",char)
+ end
+ insert_node_before(head,start,new_penalty(10000))
+ insert_node_before(head,start,new_glue(left*quad))
+ end
+ end
+ local next = getnext(start)
+ if right and right ~= 0 and next then
+ local ok = false
+ local nextnext = getnext(next)
+ if alternative == 1 then
+ local somepenalty = somepenalty(next,10000)
+ if somepenalty then
+ local somespace = somespace(nextnext,true)
+ if somespace then
+ if trace_spacing then
+ report_spacing("removing penalty and space after %C right",char)
+ end
+ head = remove_node(head,next,true)
+ head = remove_node(head,nextnext,true)
+ end
+ else
+ local somespace = somespace(next,true)
+ if somespace then
+ if trace_spacing then
+ report_spacing("removing space after %C (right)", char)
+ end
+ head = remove_node(head,next,true)
+ end
+ end
+ ok = true
+ else
+ ok = not (somepenalty(next,10000) and somespace(nextnext,true)) or somespace(next,true)
+ end
+ if ok then
+ if trace_spacing then
+ report_spacing("inserting penalty and space after %C (right)",char)
+ end
+ insert_node_after(head,start,new_glue(right*quad))
+ insert_node_after(head,start,new_penalty(10000))
+ end
+ end
+ end
+ end
+ done = true
+ end
+ elseif id == math_code then
+ start = end_of_math(start) -- weird, can return nil .. no math end?
+ end
+ if start then
+ start = getnext(start)
+ end
+ end
+ if done then
+ -- unset_attributes(a_spacings,head)
+ end
+ end
+ return head
+end
+
+local enabled = false
+
+function spacings.define(name)
+ local data = numbers[name]
+ if data then
+ -- error
+ else
+ local number = #mapping + 1
+ local data = {
+ name = name,
+ number = number,
+ characters = { },
+ }
+ mapping[number] = data
+ numbers[name] = data
+ end
+end
+
+function spacings.setup(name,char,settings)
+ local data = numbers[name]
+ if not data then
+ -- error
+ else
+ data.characters[char] = settings
+ end
+end
+
+function spacings.set(name)
+ local n = unsetvalue
+ if name ~= v_reset then
+ local data = numbers[name]
+ if data then
+ if not enabled then
+ enableaction("processors","typesetters.spacings.handler")
+ enabled = true
+ end
+ n = data.number or unsetvalue
+ end
+ end
+ texsetattribute(a_spacings,n)
+end
+
+function spacings.reset()
+ texsetattribute(a_spacings,unsetvalue)
+end
+
+-- interface
+
+local implement = interfaces.implement
+
+implement {
+ name = "definecharacterspacing",
+ actions = spacings.define,
+ arguments = "string"
+}
+
+implement {
+ name = "setupcharacterspacing",
+ actions = spacings.setup,
+ arguments = {
+ "string",
+ "integer",
+ {
+ { "left", "number" },
+ { "right", "number" },
+ { "alternative", "integer" },
+ }
+ }
+}
+
+implement {
+ name = "setcharacterspacing",
+ actions = spacings.set,
+ arguments = "string"
+}
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-spa.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-spa.mkxl
new file mode 100644
index 00000000000..42825b02272
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-spa.mkxl
@@ -0,0 +1,78 @@
+%D \module
+%D [ file=typo-spa,
+%D version=2009.03.27, % code moved from cors-spa.mkiv
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Spacing,
+%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 Typesetting Macros / Spacing}
+
+\unprotect
+
+\registerctxluafile{typo-spa}{autosuffix}
+
+\definesystemattribute[spacing][public]
+
+% experimental spacing
+%
+% test: oeps {\setcharacterspacing[frenchpunctuation]x: xx \bfd x: xx} oeps: test
+%
+% todo: page | text => pagebody or text only
+
+\installcorenamespace{characterspacing}
+
+\installsetuponlycommandhandler \??characterspacing {_p_characterspacing} % private
+
+\setup_p_characterspacing
+ [\c!left=0,
+ \c!right=0,
+ \c!alternative=0]
+
+\permanent\protected\def\definecharacterspacing[#1]%
+ {\clf_definecharacterspacing{#1}}
+
+\permanent\tolerant\protected\def\setupcharacterspacing[#1]#*[#2]#*[#3]% todo: #2 list
+ {\begingroup
+ \setupcurrent_p_characterspacing[#3]%
+ \clf_setupcharacterspacing
+ {#1}%
+ \numexpr#2\relax
+ {%
+ left \direct_p_characterspacingparameter\c!left\space
+ right \direct_p_characterspacingparameter\c!right\space
+ alternative \direct_p_characterspacingparameter\c!alternative
+ }%
+ \relax
+ \endgroup}
+
+\permanent\protected\def\setcharacterspacing[#1]% we can store the attribute if we want speed
+ {\clf_setcharacterspacing{#1}}
+
+\permanent\protected\def\resetcharacterspacing % fast one
+ {\c_attr_spacing\attributeunsetvalue}
+
+\appendtoks
+ \resetcharacterspacing
+\to \everyresettypesetting
+
+% \setcharacterspacing[frenchpunctuation]
+% «\type{bla}»\crlf « \type{bla}»\crlf
+% «bla »\crlf « bla»\crlf « bla »\crlf
+% bla: bla\crlf bla : bla
+
+\definecharacterspacing [frenchpunctuation] % name may change / unit is em
+
+\setupcharacterspacing [frenchpunctuation] ["003A] [\c!left =.25,\c!alternative=1] % : % strip preceding space(char)
+\setupcharacterspacing [frenchpunctuation] ["003B] [\c!left =.25,\c!alternative=1] % ; % strip preceding space(char)
+\setupcharacterspacing [frenchpunctuation] ["003F] [\c!left =.25,\c!alternative=1] % ? % strip preceding space(char)
+\setupcharacterspacing [frenchpunctuation] ["0021] [\c!left =.25,\c!alternative=1] % ! % strip preceding space(char)
+\setupcharacterspacing [frenchpunctuation] ["00AB] [\c!right=.25,\c!alternative=1] % guillemotleft/leftguillemot % strip following space(char)
+\setupcharacterspacing [frenchpunctuation] ["00BB] [\c!left =.25,\c!alternative=1] % guillemotright/rightguillemot % strip preceding space(char)
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-sus.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-sus.lmt
new file mode 100644
index 00000000000..2c6d9ea69c9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-sus.lmt
@@ -0,0 +1,308 @@
+if not modules then modules = { } end modules ['typo-sus'] = {
+ version = 1.001,
+ comment = "companion to typo-sus.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local next = next
+
+local punctuation = {
+ po = true,
+}
+
+local openquote = {
+ ps = true,
+ pi = true,
+}
+
+local closequote = {
+ pe = true,
+ pf = true,
+}
+
+local weird = {
+ lm = true,
+ no = true,
+}
+
+local categories = characters.categories
+
+local nodecodes = nodes.nodecodes
+
+local glyph_code = nodecodes.glyph
+local kern_code = nodecodes.kern
+local penalty_code = nodecodes.penalty
+local glue_code = nodecodes.glue
+local math_code = nodecodes.math
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local nuts = nodes.nuts
+
+local nextnode = nuts.traversers.node
+
+local getid = nuts.getid
+local getprev = nuts.getprev
+local getnext = nuts.getnext
+local getattr = nuts.getattr
+local getfont = nuts.getfont
+local getlist = nuts.getlist
+local getkern = nuts.getkern
+local getpenalty = nuts.getpenalty
+local getwidth = nuts.getwidth
+local getwhd = nuts.getwhd
+local isglyph = nuts.isglyph
+
+local setattr = nuts.setattr
+local setlist = nuts.setlist
+
+local setcolor = nodes.tracers.colors.set
+local insert_before = nuts.insert_before
+local insert_after = nuts.insert_after
+local end_of_math = nuts.end_of_math
+
+local nodepool = nuts.pool
+
+local new_rule = nodepool.rule
+local new_kern = nodepool.kern
+local new_hlist = nodepool.hlist
+----- new_penalty = nodepool.penalty
+
+local a_characters = attributes.private("characters")
+local a_suspecting = attributes.private('suspecting')
+local a_suspect = attributes.private('suspect')
+local texsetattribute = tex.setattribute
+local unsetvalue = attributes.unsetvalue
+local enabled = false
+
+local enableaction = nodes.tasks.enableaction
+
+local threshold = 65536 / 4
+
+local function special(n)
+ if n then
+ local id = getid(n)
+ if id == kern_code then
+ return getkern(n) < threshold
+ elseif id == penalty_code then
+ return true
+ elseif id == glue_code then
+ return getwidth(n) < threshold
+ elseif id == hlist_code then
+ return getwidth(n) < threshold
+ end
+ else
+ return false
+ end
+end
+
+local function goback(current)
+ local prev = getprev(current)
+ while prev and special(prev) do
+ prev = getprev(prev)
+ end
+ if prev then
+ return prev, getid(prev)
+ end
+end
+
+local function goforward(current)
+ local next = getnext(current)
+ while next and special(next) do
+ next = getnext(next)
+ end
+ if next then
+ return next, getid(next)
+ end
+end
+
+-- We can cache rules if needed but there are not that many.
+
+local function mark(head,current,id,color)
+ if id == glue_code then
+ -- the glue can have stretch and/or shrink so the rule can overlap with the
+ -- following glyph .. no big deal as that one then sits on top of the rule
+ local width = getwidth(current)
+ local rule = new_rule(width)
+ local kern = new_kern(-width)
+ head = insert_before(head,current,rule)
+ head = insert_before(head,current,kern)
+ setcolor(rule,color)
+ -- elseif id == kern_code then
+ -- local width = getkern(current)
+ -- local rule = new_rule(width)
+ -- local kern = new_kern(-width)
+ -- head = insert_before(head,current,rule)
+ -- head = insert_before(head,current,kern)
+ -- setcolor(rule,color)
+ else
+ local width, height, depth = getwhd(current)
+ local extra = fonts.hashes.xheights[getfont(current)] / 2
+ local rule = new_rule(width,height+extra,depth+extra)
+ local hlist = new_hlist(rule)
+ head = insert_before(head,current,hlist)
+ setcolor(rule,color)
+ setcolor(current,"white")
+ end
+ return head, current
+end
+
+-- we can cache the font and skip ahead to next but it doesn't
+-- save enough time and it makes the code looks bad too ... after
+-- all, we seldom use this
+
+local colors = {
+ "darkred",
+ "darkgreen",
+ "darkblue",
+ "darkcyan",
+ "darkmagenta",
+ "darkyellow",
+ "darkgray",
+ "orange",
+}
+
+local found = 0
+
+function typesetters.marksuspects(head)
+ local current = head
+ local lastdone = nil
+ while current do
+ if getattr(current,a_suspecting) then
+ local char, id = isglyph(current)
+ if char then
+ local code = categories[char]
+ local done = false
+ if punctuation[code] then
+ local prev, pid = goback(current)
+ if prev and pid == glue_code then
+ done = 3 -- darkblue
+ elseif prev and pid == math_code then
+ done = 3 -- darkblue
+ else
+ local next, nid = goforward(current)
+ if next and nid ~= glue_code then
+ done = 3 -- darkblue
+ end
+ end
+ elseif openquote[code] then
+ local next, nid = goforward(current)
+ if next and nid == glue_code then
+ done = 1 -- darkred
+ end
+ elseif closequote[code] then
+ local prev, pid = goback(current)
+ if prev and pid == glue_code then
+ done = 1 -- darkred
+ end
+ elseif weird[code] then
+ done = 2 -- darkgreen
+ else
+ local prev, pid = goback(current)
+ if prev then
+ if pid == math_code then
+ done = 7-- darkgray
+ elseif pid == glyph_code and getfont(current) ~= getfont(prev) then
+ if lastdone ~= prev then
+ done = 2 -- darkgreen
+ end
+ end
+ end
+ if not done then
+ local next, nid = goforward(current)
+ if next then
+ if nid == math_code then
+ done = 7 -- darkgray
+ elseif nid == glyph_code and getfont(current) ~= getfont(next) then
+ if lastdone ~= prev then
+ done = 2 -- darkgreen
+ end
+ end
+ end
+ end
+ end
+ if done then
+ setattr(current,a_suspect,done)
+ lastdone = current
+ found = found + 1
+ end
+ current = getnext(current)
+ elseif id == math_code then
+ current = getnext(end_of_math(current))
+ elseif id == glue_code then
+ local a = getattr(current,a_characters)
+ if a then
+ local prev = getprev(current)
+ local prid = prev and getid(prev)
+ local done = false
+ if prid == penalty_code and getpenalty(prev) == 10000 then
+ done = 8 -- orange
+ else
+ done = 5 -- darkmagenta
+ end
+ if done then
+ setattr(current,a_suspect,done)
+ -- lastdone = current
+ found = found + 1
+ end
+ end
+ current = getnext(current)
+ else
+ current = getnext(current)
+ end
+ else
+ current = getnext(current)
+ end
+ end
+ return head
+end
+
+local function showsuspects(head)
+ -- we inject before so we're okay with a loop
+ for current, id, subtype in nextnode, head do
+ if id == glyph_code then
+ local a = getattr(current,a_suspect)
+ if a then
+ head, current = mark(head,current,id,colors[a])
+ end
+ elseif id == glue_code then
+ local a = getattr(current,a_suspect)
+ if a then
+ head, current = mark(head,current,id,colors[a])
+ end
+ elseif id == math_code then
+ current = end_of_math(current)
+ elseif id == hlist_code or id == vlist_code then
+ local list = getlist(current)
+ if list then
+ local l = showsuspects(list)
+ if l ~= list then
+ setlist(current,l)
+ end
+ end
+ end
+ end
+ return head
+end
+
+function typesetters.showsuspects(head)
+ if found > 0 then
+ return showsuspects(head)
+ else
+ return head
+ end
+end
+
+-- or maybe a directive
+
+trackers.register("typesetters.suspects",function(v)
+ texsetattribute(a_suspecting,v and 1 or unsetvalue)
+ if v and not enabled then
+ enableaction("processors","typesetters.marksuspects")
+ enableaction("shipouts", "typesetters.showsuspects")
+ enabled = true
+ end
+end)
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-sus.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-sus.mkxl
new file mode 100644
index 00000000000..7b62b8acac4
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-sus.mkxl
@@ -0,0 +1,51 @@
+%D \module
+%D [ file=typo-sus,
+%D version=2014.11.06,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Checking Suspects,
+%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 Typesetting Macros / Checking Suspects}
+
+%D This is a rather special module, mostly needed by ourselves for
+%D projects where copy||editing is not that precise.
+
+\registerctxluafile{typo-sus}{}
+
+\permanent\protected\def\showsuspects{\enabletrackers[typesetters.suspects]}
+
+%D The suspicious spacing will be colored in the text. There can be false
+%D positives but this features is mostly used when proofreading. So, we
+%D don't worry too much about interference (and efficiency).
+%D
+%D \protected\def\showsample#1%
+%D {\NC \type{#1}%
+%D \NC \enabletrackers[typesetters.suspects]#1\disabletrackers[typesetters.spacing]%
+%D \NC \NR}
+%D
+%D \starttabulate[|||][before=,after=]
+%D \showsample{foo$x$}
+%D \showsample{$x$bar}
+%D \showsample{foo$x$bar}
+%D \showsample{$f+o+o$:}
+%D \showsample{;$f+o+o$}
+%D \showsample{; bar}
+%D \showsample{foo:bar}
+%D \showsample{\quote{ foo }}
+%D \showsample{\quote{bar }}
+%D \showsample{\quote{ bar}}
+%D \showsample{(foo )}
+%D \showsample{\{foo \}}
+%D \showsample{foo{\bf gnu}bar}
+%D \showsample{foo$x^2$bar}
+%D \showsample{foo\nobreakspace bar}
+%D \stoptabulate
+
+\endinput
+
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-tal.lmt b/Master/texmf-dist/tex/context/base/mkxl/typo-tal.lmt
new file mode 100644
index 00000000000..5c32e9ef9fc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-tal.lmt
@@ -0,0 +1,439 @@
+if not modules then modules = { } end modules ['typo-tal'] = {
+ version = 1.001,
+ comment = "companion to typo-tal.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- I'll make it a bit more efficient and provide named instances too which is needed for
+-- nested tables.
+--
+-- Currently we have two methods: text and number with some downward compatible
+-- defaulting.
+
+-- We can speed up by saving the current fontcharacters[font] + lastfont.
+
+local next, type, tonumber = next, type, tonumber
+local div = math.div
+local utfbyte = utf.byte
+
+local splitmethod = utilities.parsers.splitmethod
+
+local nodecodes = nodes.nodecodes
+local glyph_code = nodecodes.glyph
+local glue_code = nodecodes.glue
+
+local fontcharacters = fonts.hashes.characters
+----- unicodes = fonts.hashes.unicodes
+local categories = characters.categories -- nd
+
+local variables = interfaces.variables
+local v_text = variables.text
+local v_number = variables.number
+
+local nuts = nodes.nuts
+local tonut = nuts.tonut
+
+local getnext = nuts.getnext
+local getprev = nuts.getprev
+local getboth = nuts.getboth
+local getid = nuts.getid
+local getfont = nuts.getfont
+local getchar = nuts.getchar
+local getattr = nuts.getattr
+local isglyph = nuts.isglyph
+
+local setattr = nuts.setattr
+local setchar = nuts.setchar
+
+local insert_node_before = nuts.insert_before
+local insert_node_after = nuts.insert_after
+local nextglyph = nuts.traversers.glyph
+local getdimensions = nuts.dimensions
+
+local setglue = nuts.setglue
+
+local nodepool = nuts.pool
+local new_kern = nodepool.kern
+
+local tracers = nodes.tracers
+local setcolor = tracers.colors.set
+local tracedrule = tracers.pool.nuts.rule
+
+local enableaction = nodes.tasks.enableaction
+
+local characteralign = { }
+typesetters.characteralign = characteralign
+
+local trace_split = false trackers.register("typesetters.characteralign", function(v) trace_split = true end)
+local report = logs.reporter("aligning")
+
+local a_characteralign = attributes.private("characteralign")
+local a_character = attributes.private("characters")
+
+local enabled = false
+
+local datasets = false
+
+local implement = interfaces.implement
+
+local comma = 0x002C
+local period = 0x002E
+local punctuationspace = 0x2008
+
+local validseparators = {
+ [comma] = true,
+ [period] = true,
+ [punctuationspace] = true,
+}
+
+local validsigns = {
+ [0x002B] = 0x002B, -- plus
+ [0x002D] = 0x2212, -- hyphen
+ [0x00B1] = 0x00B1, -- plusminus
+ [0x2212] = 0x2212, -- minus
+ [0x2213] = 0x2213, -- minusplus
+}
+
+-- If needed we can have more modes which then also means a faster simple handler
+-- for non numbers.
+
+local function setcharacteralign(column,separator,before,after)
+ if not enabled then
+ enableaction("processors","typesetters.characteralign.handler")
+ enabled = true
+ end
+ if not datasets then
+ datasets = { }
+ end
+ local dataset = datasets[column] -- we can use a metatable
+ if not dataset then
+ local method, token
+ if separator then
+ method, token = splitmethod(separator)
+ if method and token then
+ separator = utfbyte(token) or comma
+ else
+ separator = utfbyte(separator) or comma
+ method = validseparators[separator] and v_number or v_text
+ end
+ else
+ separator = comma
+ method = v_number
+ end
+ local before = tonumber(before) or 0
+ local after = tonumber(after) or 0
+ dataset = {
+ separator = separator,
+ list = { },
+ maxbefore = before,
+ maxafter = after,
+ predefined = before > 0 or after > 0,
+ collected = false,
+ method = method,
+ separators = validseparators,
+ signs = validsigns,
+ }
+ datasets[column] = dataset
+ used = true
+ end
+ return dataset
+end
+
+local function resetcharacteralign()
+ datasets = false
+end
+
+characteralign.setcharacteralign = setcharacteralign
+characteralign.resetcharacteralign = resetcharacteralign
+
+implement {
+ name = "setcharacteralign",
+ actions = setcharacteralign,
+ arguments = { "integer", "string" }
+}
+
+implement {
+ name = "setcharacteraligndetail",
+ actions = setcharacteralign,
+ arguments = { "integer", "string", "dimension", "dimension" }
+}
+
+implement {
+ name = "resetcharacteralign",
+ actions = resetcharacteralign
+}
+
+local function traced_kern(w)
+ return tracedrule(w,nil,nil,"darkgray")
+end
+
+function characteralign.handler(head,where)
+ if not datasets then
+ return head
+ end
+ local first
+ for n in nextglyph, head do
+ first = n
+ break
+ end
+ if not first then
+ return head
+ end
+ local a = getattr(first,a_characteralign)
+ if not a or a == 0 then
+ return head
+ end
+ local column = div(a,0xFFFF)
+ local row = a % 0xFFFF
+ local dataset = datasets and datasets[column] or setcharacteralign(column)
+ local separator = dataset.separator
+ local list = dataset.list
+ local b_start = nil
+ local b_stop = nil
+ local a_start = nil
+ local a_stop = nil
+ local c = nil
+ local current = first
+ local sign = nil
+ --
+ local validseparators = dataset.separators
+ local validsigns = dataset.signs
+ local method = dataset.method
+ -- we can think of constraints
+ if method == v_number then
+
+-- local function bothdigit(current) -- this could become a helper
+-- local prev, next = getboth(current)
+-- if next and prev and getid(next) == glyph_code and getid(prev) == glyph_code then
+-- local pchar = getchar(prev)
+-- local nchar = getchar(next)
+-- local pdata = fontcharacters[getfont(prev)][pchar]
+-- local ndata = fontcharacters[getfont(next)][nchar]
+-- local punicode = pdata and pdata.unicode or pchar -- we ignore tables
+-- local nunicode = ndata and ndata.unicode or nchar -- we ignore tables
+-- if punicode and nunicode and categories[punicode] == "nd" and categories[nunicode] == "nd" then
+-- return true
+-- end
+-- end
+-- end
+
+ local function bothdigit(current) -- this could become a helper
+ local prev, next = getboth(current)
+ if next and prev then
+ local char, font = isglyph(prev)
+ if char then
+ local data = fontcharacters[font][char]
+ if data and categories[data.unicode or char] == "nd" then -- we ignore tables
+ char, font = isglyph(next)
+ if char then
+ data = fontcharacters[font][char]
+ if data and categories[data.unicode or char] == "nd" then -- we ignore tables
+ return true
+ end
+ end
+ end
+ end
+ end
+ end
+
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local font = id --- nicer
+ local data = fontcharacters[font][char]
+ local unicode = data and data.unicode or char -- ignore tables
+ if not unicode then -- type(unicode) ~= "number"
+ -- no unicode so forget about it
+ elseif unicode == separator then
+ c = current
+ if trace_split then
+ setcolor(current,"darkred")
+ end
+ dataset.hasseparator = true
+ elseif categories[unicode] == "nd" or validseparators[unicode] then
+ if c then
+ if not a_start then
+ a_start = current
+ end
+ a_stop = current
+ if trace_split then
+ setcolor(current,validseparators[unicode] and "darkcyan" or "darkblue")
+ end
+ else
+ if not b_start then
+ if sign then
+ b_start = sign
+ local c, f = isglyph(sign)
+ local new = validsigns[c]
+ if char == new or not fontcharacters[f][new] then
+ if trace_split then
+ setcolor(sign,"darkyellow")
+ end
+ else
+ setchar(sign,new)
+ if trace_split then
+ setcolor(sign,"darkmagenta")
+ end
+ end
+ sign = nil
+ b_stop = current
+ else
+ b_start = current
+ b_stop = current
+ end
+ else
+ b_stop = current
+ end
+ if trace_split and current ~= sign then
+ setcolor(current,validseparators[unicode] and "darkcyan" or "darkblue")
+ end
+ end
+ elseif not b_start then
+ sign = validsigns[unicode] and current
+ -- if trace_split then
+ -- setcolor(current,"darkgreen")
+ -- end
+ end
+ elseif (b_start or a_start) and id == glue_code then
+ -- maybe only in number mode
+ -- somewhat inefficient
+ if bothdigit(current) then
+ local width = fontcharacters[getfont(b_start or a_start)][separator or period].width
+ setglue(current,width,0,0)
+ setattr(current,a_character,punctuationspace)
+ if a_start then
+ a_stop = current
+ elseif b_start then
+ b_stop = current
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ else
+ while current do
+ local char, id = isglyph(current)
+ if char then
+ local font = id -- nicer
+ -- local unicode = unicodes[font][char]
+ local unicode = fontcharacters[font][char].unicode or char -- ignore tables
+ if not unicode then
+ -- no unicode so forget about it
+ elseif unicode == separator then
+ c = current
+ if trace_split then
+ setcolor(current,"darkred")
+ end
+ dataset.hasseparator = true
+ else
+ if c then
+ if not a_start then
+ a_start = current
+ end
+ a_stop = current
+ if trace_split then
+ setcolor(current,"darkgreen")
+ end
+ else
+ if not b_start then
+ b_start = current
+ end
+ b_stop = current
+ if trace_split then
+ setcolor(current,"darkblue")
+ end
+ end
+ end
+ end
+ current = getnext(current)
+ end
+ end
+ local predefined = dataset.predefined
+ local before, after
+ if predefined then
+ before = b_start and getdimensions(b_start,getnext(b_stop)) or 0
+ after = a_start and getdimensions(a_start,getnext(a_stop)) or 0
+ else
+ local entry = list[row]
+ if entry then
+ before = entry.before or 0
+ after = entry.after or 0
+ else
+ before = b_start and getdimensions(b_start,getnext(b_stop)) or 0
+ after = a_start and getdimensions(a_start,getnext(a_stop)) or 0
+ list[row] = {
+ before = before,
+ after = after,
+ }
+ return head, true
+ end
+ if not dataset.collected then
+ -- print("[maxbefore] [maxafter]")
+ local maxbefore = 0
+ local maxafter = 0
+ for k, v in next, list do
+ local before = v.before
+ local after = v.after
+ if before and before > maxbefore then
+ maxbefore = before
+ end
+ if after and after > maxafter then
+ maxafter = after
+ end
+ end
+ dataset.maxbefore = maxbefore
+ dataset.maxafter = maxafter
+ dataset.collected = true
+ end
+ end
+ local maxbefore = dataset.maxbefore
+ local maxafter = dataset.maxafter
+ local new_kern = trace_split and traced_kern or new_kern
+ if b_start then
+ if before < maxbefore then
+ head = insert_node_before(head,b_start,new_kern(maxbefore-before))
+ end
+ if not c then
+ -- print("[before]")
+ if dataset.hasseparator then
+ local width = fontcharacters[getfont(b_start)][separator].width
+ insert_node_after(head,b_stop,new_kern(maxafter+width))
+ end
+ elseif a_start then
+ -- print("[before] [separator] [after]")
+ if after < maxafter then
+ insert_node_after(head,a_stop,new_kern(maxafter-after))
+ end
+ else
+ -- print("[before] [separator]")
+ if maxafter > 0 then
+ insert_node_after(head,c,new_kern(maxafter))
+ end
+ end
+ elseif a_start then
+ if c then
+ -- print("[separator] [after]")
+ if maxbefore > 0 then
+ head = insert_node_before(head,c,new_kern(maxbefore))
+ end
+ else
+ -- print("[after]")
+ local width = fontcharacters[getfont(b_stop)][separator].width
+ head = insert_node_before(head,a_start,new_kern(maxbefore+width))
+ end
+ if after < maxafter then
+ insert_node_after(head,a_stop,new_kern(maxafter-after))
+ end
+ elseif c then
+ -- print("[separator]")
+ if maxbefore > 0 then
+ head = insert_node_before(head,c,new_kern(maxbefore))
+ end
+ if maxafter > 0 then
+ insert_node_after(head,c,new_kern(maxafter))
+ end
+ end
+ return head
+end
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-tal.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-tal.mkxl
new file mode 100644
index 00000000000..d96d1348bb8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-tal.mkxl
@@ -0,0 +1,303 @@
+%D \module
+%D [ file=typo-tal, % spac-cha (2012.06.08) supp-ali (2000.04.17)
+%D version=2013.10.04,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Character Alignment,
+%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 Typesetting Macros / Character Alignment}
+
+%D This module replaces the \MKII\ character alignment code which hooked into
+%D table mechanisms but used parsing. In fact, this might be one of these cases
+%D where a \TEX\ based solution is faster, but a \LUA\ one a bit more robust.
+%D Anyway, as I had to fix something (to fit the newer table mechanisms) I
+%D decided to go the mixed route, a rather easy going effort in the aftermath of
+%D the 2013 \CONTEXT\ meeting.
+
+\unprotect
+
+\registerctxluafile{typo-tal}{autosuffix}
+
+\definesystemattribute[characteralign][public]
+
+%D This mechanism is mostly meant for tables:
+%D
+%D \startbuffer
+%D \starttabulate[|l|g{,}|r|]
+%D \NC test \NC 1.234.456,99 \NC \NC test \NR
+%D \NC test \NC 234.456,9 \NC \NC test \NR
+%D \NC test \NC 234.456 \NC \NC test \NR
+%D \NC test \NC 456 \NC \NC test \NR
+%D \NC test \NC \bf whatever \NC \NC test \NR
+%D \stoptabulate
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
+
+% D \startbuffer
+% D \bTABLE
+% D \bTR \bTD[aligncharacter=yes] € 1,1 \eTD \eTR
+% D \bTR \bTD[aligncharacter=yes] € 11,11 \eTD \eTR
+% D \bTR \bTD[aligncharacter=yes] € 12\punctuationspace111,11 \eTD \eTR
+% D \bTR \bTD[aligncharacter=yes] € 12 111,11 \eTD \eTR
+% D \bTR \bTD[aligncharacter=yes] € 1.234.451,22222 \eTD \eTR
+% D \bTR \bTD[aligncharacter=yes] € 234.451,2 \eTD \eTR
+% D \bTR \bTD[aligncharacter=yes] € 234.451 \eTD \eTR
+% D \bTR \bTD[aligncharacter=yes] € 451 \eTD \eTR
+% D \bTR \bTD \bf some text \eTD \eTR
+% D \eTABLE
+% D \stopbuffer
+% D
+% D \typebuffer \blank \getbuffer \blank
+
+\permanent\protected\def\signalcharacteralign #1#2{\c_attr_characteralign\numexpr#1*\maxcardminusone+#2\relax} % 0xFFFF
+\permanent\protected\def\setcharacteralign #1#2{\clf_setcharacteralign#1{#2}}
+\permanent\protected\def\resetcharacteralign {\clf_resetcharacteralign}
+\permanent\protected\def\nocharacteralign {\c_attr_characteralign\attributeunsetvalue}
+\permanent\protected\def\setcharacteraligndetail#1#2#3#4{\clf_setcharacteraligndetail#1{#2}#3#4\relax}
+
+%D Mostly downward compatible:
+%D
+%D \startbuffer
+%D \startcharacteralign
+%D \checkcharacteralign{123.456,78}
+%D \checkcharacteralign{456}
+%D \checkcharacteralign{23.456}
+%D \checkcharacteralign{78,9}
+%D \stopcharacteralign
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
+%D
+%D \startbuffer
+%D \startcharacteralign[leftsample=123.456,rightsample=00,character={,}]
+%D \checkcharacteralign{123.456,78}\par
+%D \checkcharacteralign {456}\par
+%D \checkcharacteralign {23.456}\par
+%D \checkcharacteralign {78,9}\par
+%D \checkcharacteralign {78}\par
+%D \stopcharacteralign
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
+%D
+%D \startbuffer
+%D \startcharacteralign[leftwidth=123.456,rightwidth=00,character={,}]
+%D \checkcharacteralign{123.456,78}\par
+%D \checkcharacteralign {456}\par
+%D \checkcharacteralign {23.456}\par
+%D \checkcharacteralign {78,9}\par
+%D \checkcharacteralign {78}\par
+%D \stopcharacteralign
+%D \stopbuffer
+%D
+%D \typebuffer \blank \getbuffer \blank
+%D
+%D We have (currently) two modes: \type {text} and \type {number}. The handler tries
+%D to determine the mode automatically. When using periods and commas as separators
+%D the \type {number} mode is chosen. If you use for instance a \type {-} as
+%D separator, \type {text} is chosen, but you can enforce \type {number} with \type
+%D {number->-} (as with other mechanisms, the arrow indicates a method to apply).
+%D
+%D One can use \type {\nocharacteralign} to disable this mechanism, for instance in
+%D a table cell.
+
+\mutable\def\alignmentcharacter{,}
+
+\installcorenamespace{characteralign}
+
+\installparameterhandler\??characteralign {characteralign}
+\installsetuphandler \??characteralign {characteralign}
+
+\setupcharacteralign
+ [\c!leftwidth =\zeropoint,
+ \c!rightwidth =\zeropoint,
+ \c!leftsample =,
+ \c!rightsample=,
+ \c!character =\alignmentcharacter]
+
+\permanent\protected\def\typo_charalign_pass_one
+ {\advance\scratchcounter\plusone
+ \setbox\scratchbox\typo_charalign_pass}
+
+\permanent\protected\def\typo_charalign_pass_two
+ {\advance\scratchcounter\plusone
+ \typo_charalign_pass}
+
+\def\typo_charalign_pass
+ {\hbox\bgroup\signalcharacteralign\plusone\scratchcounter\let\next}
+
+\permanent\tolerant\protected\def\startcharacteralign[#1]%
+ {\doifelseassignment{#1}\typo_charalign_start_one\typo_charalign_start_two{#1}}
+
+\def\typo_charalign_start_one#1#2\stopcharacteralign
+ {\bgroup
+ % for now no instances
+ \setupcurrentcharacteralign[#1]%
+ \edef\p_left {\characteralignparameter\c!leftsample}%
+ \edef\p_right{\characteralignparameter\c!rightsample}%
+ \ifempty\p_left
+ \scratchdimenone\dimexpr\characteralignparameter\c!leftwidth\relax
+ \else
+ \setbox\scratchbox\hbox{\p_left}%
+ \scratchdimenone\wd\scratchbox
+ \fi
+ \ifempty\p_right
+ \scratchdimentwo\dimexpr\characteralignparameter\c!rightwidth\relax
+ \else
+ \setbox\scratchbox\hbox{\p_right}%
+ \scratchdimentwo\wd\scratchbox
+ \fi
+ \ifzeropt\scratchdimenone
+ \ifzeropt\scratchdimentwo
+ \donefalse
+ \else
+ \donetrue
+ \fi
+ \else
+ \donetrue
+ \fi
+ \edef\alignmentcharacter{\characteralignparameter\c!character}%
+ \ifdone
+ \clf_setcharacteraligndetail
+ \plusone
+ \alignmentcharacter
+ \scratchdimenone
+ \scratchdimentwo
+ \else
+ \clf_setcharacteralign
+ \plusone
+ \alignmentcharacter
+ \begingroup
+ \scratchcounter\zerocount
+ \enforced\let\checkcharacteralign\typo_charalign_pass_one
+ \settrialtypesetting
+ #2\relax
+ \endgroup
+ \fi
+ \begingroup
+ \scratchcounter\zerocount
+ \enforced\let\checkcharacteralign\typo_charalign_pass_two
+ #2\relax
+ \endgroup
+ \resetcharacteralign
+ \egroup}
+
+\def\typo_charalign_start_two#1#2\stopcharacteralign
+ {\bgroup
+ \edef\m_temp{#1}%
+ \ifempty\m_temp \else
+ \let\alignmentcharacter\m_temp
+ \fi
+ \clf_setcharacteralign
+ \plusone
+ \alignmentcharacter
+ \begingroup
+ \scratchcounter\zerocount
+ \enforced\let\checkcharacteralign\typo_charalign_pass_one
+ \settrialtypesetting
+ #2\relax
+ \endgroup
+ \begingroup
+ \scratchcounter\zerocount
+ \enforced\let\checkcharacteralign\typo_charalign_pass_two
+ #2\relax
+ \endgroup
+ \resetcharacteralign
+ \egroup}
+
+\aliased\let\stopcharacteralign \relax
+\aliased\let\checkcharacteralign\gobbleoneargument
+
+\permanent\protected\def\setfirstpasscharacteralign {\enforced\let\checkcharacteralign\gobbleoneargument}
+\permanent\protected\def\setsecondpasscharacteralign{\enforced\let\checkcharacteralign\firstofoneargument}
+
+%D We need fonts to provide tabular digits that is, the digits need to have the same
+%D width.
+%D
+%D \startbuffer
+%D \startbuffer[demo]
+%D \switchtobodyfont[pagella]
+%D \setupTABLE[column][1][alignmentcharacter=.,aligncharacter=yes]
+%D \bTABLE
+%D \bTR \bTD 11.111 \eTD \bTD 11.111 \eTD \eTR
+%D \bTR \bTD 2.2 \eTD \bTD 2.2 \eTD \eTR
+%D \bTR \bTD 444.444 \eTD \bTD 444.444 \eTD \eTR
+%D \eTABLE
+%D \stopbuffer
+%D
+%D \start inlinenumbers: \crlf \addfeature[inlinenumbers] \getbuffer \stop
+%D \start tabularnumbers: \crlf \addfeature[tabularnumbers] \getbuffer \stop
+%D \start oldstylenumbers:\crlf \addfeature[oldstylenumbers] \getbuffer \stop
+%D \stopbuffer
+%D
+%D \enabledirectives[typesetters.characteralign.autofont]
+%D \typebuffer \blank \getbuffer \blank
+%D \disabledirectives[typesetters.characteralign.autofont]
+%D \typebuffer \blank \getbuffer \blank
+%D \enabledirectives[typesetters.characteralign.autofont]
+
+\definefontfeature
+ [system:tabnum]
+ [tnum=yes,
+ lnum=no]
+
+\newconditional\c_tabl_ntb_char_align_auto_font \settrue\c_tabl_ntb_char_align_auto_font
+
+\installtexdirective % yes or no ?
+ {typesetters.characteralign.autofont}
+ {\settrue \c_tabl_ntb_char_align_auto_font}
+ {\setfalse\c_tabl_ntb_char_align_auto_font}
+
+\def\m_font_feature_auto_tabnum{system:tabnum}
+
+\protected\def\typo_charalign_adapt_font_indeed
+ {\let\m_font_feature_asked\m_font_feature_auto_tabnum
+ \font_feature_reset_add_indeed}
+
+\def\typo_charalign_adapt_font % slow but seldom used (expanded in preamble)
+ {\ifconditional\c_tabl_ntb_char_align_auto_font
+ \typo_charalign_adapt_font_indeed
+ \fi}
+
+%D Another example:
+%D
+%D \starttyping
+%D \setupTABLE[c][2][alignmentcharacter={number->,},aligncharacter=yes,align={flushleft}]
+%D \bTABLE
+%D \bTR \bTD 1 \eTD \bTD 125 cm \eTD \eTR
+%D \bTR \bTD 2 \eTD \bTD 1 125,80 cm \eTD \eTR
+%D \bTR \bTD 6 \eTD \bTD 1 125,80 $\pi^2$ \eTD \eTR
+%D \bTR \bTD 7 \eTD \bTD 129,3 \unit{square centimeter} \eTD \eTR
+%D \eTABLE
+%D
+%D \setupTABLE[c][2][alignmentcharacter={number->,},aligncharacter=yes,align={flushleft}]
+%D \bTABLE
+%D \bTR \bTD 1 \eTD \bTD 125 cm \eTD \eTR
+%D \bTR \bTD 2 \eTD \bTD 1 125,80 cm \eTD \eTR
+%D \bTR \bTD 6 \eTD \bTD 1 125,80 $\pi^2$ \eTD \eTR
+%D \bTR \bTD 7 \eTD \bTD 129,3 \unit{square centimeter} \eTD \eTR
+%D \eTABLE
+%D
+%D \setupTABLE[c][2][alignmentcharacter={number->,},aligncharacter=yes,align={middle}]
+%D \bTABLE
+%D \bTR \bTD 1 \eTD \bTD 125 \eTD \eTR
+%D \bTR \bTD 6 \eTD \bTD 1 125,80 \eTD \eTR
+%D \bTR \bTD 7 \eTD \bTD 129,3 \eTD \eTR
+%D \eTABLE
+%D
+%D \setupTABLE[c][2][alignmentcharacter={text->,},aligncharacter=yes,align={middle}]
+%D \bTABLE
+%D \bTR \bTD 1 \eTD \bTD 125 \eTD \eTR
+%D \bTR \bTD 6 \eTD \bTD 1 125,80 \eTD \eTR
+%D \bTR \bTD 7 \eTD \bTD 129,3 \eTD \eTR
+%D \eTABLE
+%D \stoptyping
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-txt.mklx b/Master/texmf-dist/tex/context/base/mkxl/typo-txt.mklx
new file mode 100644
index 00000000000..270cc94e028
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-txt.mklx
@@ -0,0 +1,231 @@
+%D \module
+%D [ file=typo-txt,
+%D version=2011.10.27,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Text Hacks,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This module replaces the by now rather old supp-fun module.
+
+\writestatus{loading}{ConTeXt Typesetting Macros / Text Hacks}
+
+\unprotect
+
+% registerctxluafile{typo-txt}{}
+
+%D \macros
+%D {normalizefontheight,normalizefontwidth,normalizedfontsize}
+%D
+%D Next we introduce some font manipulation macros. When we want to typeset some
+%D text spread in a well defined area, it can be considered bad practice to
+%D manipulate character and word spacing. In such situations the next few macros can
+%D be of help:
+%D
+%D \starttyping
+%D \normalizefontheight \name {sample text} {height} {font}
+%D \normalizefontwidth \name {sample text} {width} {font}
+%D \stoptyping
+%D
+%D Consider for instance:
+%D
+%D \startbuffer[a]
+%D \normalizefontheight \TempFont {X} {2\baselineskip} {Serif}
+%D \stopbuffer
+%D
+%D \startbuffer[b]
+%D \ruledhbox{\TempFont To Be Or Not To Be}
+%D \stopbuffer
+%D
+%D \typebuffer[a,b] \getbuffer[a]
+%D
+%D This shows up as:
+%D
+%D \startlinecorrection
+%D \ruledhbox{\getbuffer[b]}
+%D \stoplinecorrection
+%D
+%D The horizontal counterpart is:
+%D
+%D \startbuffer[a]
+%D \normalizefontwidth \TempFont {This Line Fits} {\hsize} {Serif}
+%D \stopbuffer
+%D
+%D \startbuffer[b]
+%D \ruledhbox{\TempFont This Line Fits}
+%D \stopbuffer
+%D
+%D \typebuffer[a,b] \getbuffer[a]
+%D
+%D This gives:
+%D
+%D \startlinecorrection
+%D \ruledhbox{\getbuffer[b]}
+%D \stoplinecorrection
+%D
+%D The calculated font scale is avaliable in \type {\normalizedfontsize}.
+
+\newbox\b_typo_normalizers
+
+\def\typo_normalizers_size#axis#size%
+ {\dimexpr\ifdim#1\b_typo_normalizers=\zeropoint
+ \bodyfontsize
+ \else
+ \luaexpr{\number\dimexpr10pt\relax*\number\dimexpr#size\relax/\number#axis\b_typo_normalizers}\scaledpoint
+ \fi\relax}
+
+\def\typo_normalizers_font_at_size#axis#cs#text#size#font% avoid overflow by using lua
+ {\begingroup
+ \setbox\b_typo_normalizers\hbox{\definedfont[#font at 10pt]\settrialtypesetting#text}%
+ \normalexpanded{\endgroup\enforced\edef\noexpand\normalizedfontsize{\the\typo_normalizers_size{#axis}{#size}}}%
+ \definefont[\strippedcsname#cs][#font at \normalizedfontsize]}
+
+\protected\def\typo_normalizers_text_at_size#axis#font#size#text%
+ {\dontleavehmode
+ \begingroup
+ \setbox\b_typo_normalizers\hbox{\definedfont[#font at 10pt]\settrialtypesetting#text}%
+ \definedfont[#font at \the\typo_normalizers_size{#axis}{#size}]#text%
+ \endgroup}
+
+\mutable\def\normalizedfontsize{\bodyfontsize}
+
+\permanent\protected\def\normalizetextwidth {\typo_normalizers_text_at_size\wd}
+\permanent\protected\def\normalizetextheight{\typo_normalizers_text_at_size\ht}
+\permanent\protected\def\normalizetextdepth {\typo_normalizers_text_at_size\dp}
+\permanent\protected\def\normalizetextline {\typo_normalizers_text_at_size\htdp}
+
+\permanent\protected\def\normalizefontwidth {\typo_normalizers_font_at_size\wd}
+\permanent\protected\def\normalizefontheight{\typo_normalizers_font_at_size\ht}
+\permanent\protected\def\normalizefontdepth {\typo_normalizers_font_at_size\dp}
+\permanent\protected\def\normalizefontline {\typo_normalizers_font_at_size\htdp}
+
+\permanent\protected\def\widthspanningtext #text#size#specification{\hbox{\normalizefontwidth \temp{#text}{#size}{#specification}\temp#text}}
+\permanent\protected\def\heightspanningtext#text#size#specification{\hbox{\normalizefontheight\temp{#text}{#size}{#specification}\temp#text}}
+\permanent\protected\def\depthspanningtext #text#size#specification{\hbox{\normalizefontdepth \temp{#text}{#size}{#specification}\temp#text}}
+\permanent\protected\def\linespanningtext #text#size#specification{\hbox{\normalizefontline \temp{#text}{#size}{#specification}\temp#text}}
+
+%D Traditionally we use UpperCasedNames for this kind of functionality.
+
+\aliased\let\NormalizeFontHeight \normalizefontheight
+\aliased\let\NormalizeFontWidth \normalizefontwidth
+\aliased\let\NormalizeTextHeight \normalizetextheight
+\aliased\let\NormalizeTextWidth \normalizetextwidth
+
+\aliased\let\WidthSpanningText \widthspanningtext
+
+\permanent\def\TheNormalizedFontSize{\normalizedfontsize}
+
+%D \macros
+%D {vulgarfraction}
+%D
+%D This code is moved from \type {cor-mis.mkiv}. We show three versions. First
+%D the simple one using \type {\low} and \type {high}:
+%D
+%D \startbuffer
+%D \def\vfrac#1#2%
+%D {\hbox{\high{\tx#1\kern-.25em}/\low{\kern-.25em\tx#2}}}
+%D
+%D test \vfrac{1}{2} test \vfrac{123}{456} test
+%D \stopbuffer
+%D
+%D \typebuffer {\showmakeup\getbuffer}
+%D
+%D A better way to handle the kerning is the following, here we kind of assume
+%D that tye slash is symmetrical and has nearly zero width.
+%D
+%D \startbuffer
+%D \def\vfract#1#2%
+%D {\hbox{\high{\tx#1}\hbox to \zeropoint{\hss/\hss}\low{\tx#2}}}
+%D \stopbuffer
+%D
+%D \typebuffer {\showmakeup\getbuffer}
+%D
+%D The third and best alternative is the following:
+%D
+%D {\showmakeup\getbuffer}\crlf\getbuffer
+%D
+%D This time we measure the height of the \type {/} and shift over the maximum
+%D height and depths of this character and the fractional digits (we use 57 as
+%D sample). Here we combine all methods in one macros.
+
+\setnewconstant\vulgarfractionmethod\plusthree
+
+\definehspace[\v!vulgarfraction][.25em] % [.15em]
+\definesymbol[\v!vulgarfraction][/] % [\raise.2ex\hbox{/}]
+
+\permanent\protected\def\vulgarfraction#1#2%
+ {\dontleavehmode
+ \hbox
+ {\def\vulgarfraction{vulgarfraction}%
+ \ifcase\vulgarfractionmethod
+ #1\symbol[\v!vulgarfraction]#2%
+ \or
+ \high{\tx#1\kern-\hspaceamount\empty\v!vulgarfraction}%
+ \symbol[\vulgarfraction]%
+ \low {\kern-\hspaceamount\empty\v!vulgarfraction\tx#2}%
+ \or
+ \high{\tx#1}%
+ \hbox to \zeropoint{\hss\symbol[\v!vulgarfraction]\hss}%
+ \low{\tx#2}%
+ \or
+ \setbox0\hbox{\symbol[\vulgarfraction]}%
+ \setbox2\hbox{\txx57}%
+ \raise\ht0\hbox{\lower\ht2\hbox{\txx#1}}%
+ \hbox to \zeropoint{\hss\symbol[\v!vulgarfraction]\hss}%
+ \lower\dp0\hbox{\raise\dp2\hbox{\txx#2}}%
+ \fi}}
+
+\ifdefined\vfrac \else \let\vfrac\vulgarfraction \fi % \aliased ?
+
+%D \starttabulate[|l|l|]
+%D \HL
+%D \NC \bf method \NC \bf visualization \NC\NR
+%D \HL
+%D \NC 0 \NC \vulgarfractionmethod0 \vulgarfraction{1}{2} \NC\NR
+%D \NC 1 \NC \vulgarfractionmethod1 \vulgarfraction{1}{2} \NC\NR
+%D \NC 2 \NC \vulgarfractionmethod2 \vulgarfraction{1}{2} \NC\NR
+%D \NC 3 \NC \vulgarfractionmethod3 \vulgarfraction{1}{2} \NC\NR
+%D \HL
+%D \stoptabulate
+
+%D This is used in the beginners manual. One needs to set the font size to an
+%D acceptable value for this to work.
+
+\permanent\tolerant\protected\def\startnicelyfilledbox[#1]%
+ {\vbox\bgroup
+ \forgetall
+ \letdummyparameter\c!width \hsize
+ \letdummyparameter\c!height\vsize
+ \letdummyparameter\c!offset\exheight % we obey to the outer exheight
+ \letdummyparameter\c!strut \v!yes % we obey to the inner strut !
+ \getdummyparameters[#1]%
+ \scratchoffset\dummyparameter\c!offset\relax
+ \setbox\scratchbox\vbox to \dummyparameter\c!height \bgroup
+ \hsize\dummyparameter\c!width\relax
+ \emergencystretch10\scratchoffset
+ \parfillskip\zeropoint
+ \leftskip \scratchoffset
+ \rightskip\scratchoffset}
+
+\permanent\protected\def\stopnicelyfilledbox
+ {\egroup
+ \vbox to \dummyparameter\c!height \bgroup
+ \doifelse{\dummyparameter\c!strut}\v!yes
+ {\dorecurse{\boxlines\scratchbox}%
+ {\boxlineht\scratchbox\recurselevel\strutht
+ \boxlinedp\scratchbox\recurselevel\strutdp
+ \boxline\scratchbox\recurselevel
+ \vss}}%
+ {\dorecurse{\boxlines\scratchbox}%
+ {\boxline\scratchbox\recurselevel
+ \vss}}%
+ \unskip
+ \egroup
+ \egroup}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-wrp.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-wrp.mkxl
new file mode 100644
index 00000000000..b552c151aa7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-wrp.mkxl
@@ -0,0 +1,58 @@
+%D \module
+%D [ file=typo-wrp,
+%D version=2014.11.09,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Wrappers,
+%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 Typesetting Macros / Wrapping}
+
+\unprotect
+
+\registerctxluafile{typo-wrp}{}
+
+\permanent\protected\def\crlf
+ {\ifhmode
+ \expandafter\spac_crlf
+ \fi}
+
+\protected\def\spac_crlf
+ {\clf_enablecrlf % once
+ \unskip
+ \spac_crlf_placeholder
+ \ifcase\raggedstatus\hfil\or\or\or\hfil\fi
+ % in bad usage this can lead to: [break -10000] [wordboundary] [line(break)penalty] [parfillskip]
+ \break
+ \wordboundary
+ % which we then remove (maybe we should flag the wordboundary with an attribute but not now
+ \ignorespaces}
+
+\protected\def\spac_crlf_placeholder
+ {\strut}
+
+\protected\def\spac_crlf_placeholder_show
+ {\wordboundary
+ %\nobreak
+ \hpack to \zeropoint{\strut{\infofont\kern.25\emwidth}\lohi{\infofont CR}{\infofont LF}\hss}}
+
+\permanent\protected\def\settestcrlf
+ {\let\spac_crlf_placeholder\spac_crlf_placeholder_show}
+
+\permanent\protected\def\crlfplaceholder % for old times sake
+ {\spac_crlf_placeholder}
+
+\appendtoks
+ \let\spac_crlf_placeholder\empty
+\to \everysetnostrut
+
+\appendtoks
+ \let\spac_crlf\space
+\to \everysimplifycommands
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/mkxl/unic-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/unic-ini.mkxl
new file mode 100644
index 00000000000..aedfe47ed2a
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/unic-ini.mkxl
@@ -0,0 +1,36 @@
+%D \module
+%D [ file=unic-ini,
+%D version=2002.12.03,
+%D title=\CONTEXT\ \UNICODE\ Support,
+%D subtitle=\UNICODE\ \& UTF-8 support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Unicode Support / Initialization}
+
+\registerctxluafile{unic-ini}{}
+
+\unprotect
+
+\permanent\def\unicodenumber #1{\the\numexpr#1\relax} % no lookahead
+\permanent\def\unicodehexnumber#1{\cldcontext{number.toevenhex(\number#1))}}
+
+%D \startbuffer
+%D \unicodechar{left square bracket}okay\unicodechar{right square bracket}
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\permanent\def\unicodechar#1{\clf_unicodechar{#1}}
+
+\permanent\protected\def\unknownchar
+ {\dontleavehmode\hpack{\vrule\s!width.5\emwidth\s!height\exheight\s!depth\zeropoint}}
+
+% \ifdefined\zwnbsp\else \let\zwnbsp\relax \fi % zerowidthnonbreakablespace
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-ams.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-ams.tex
index 37bcf253fa1..6adddbf3fc0 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-ams.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-ams.tex
@@ -122,7 +122,7 @@
%D Some shortcuts.
% ((#1(type\ |)chapter#2)|#3)
-
+
\def\insertchap#1#2#3%
{\insertchapter
{#1\insertbibtype{}{\ }{chapter\ }}{#2}%
@@ -167,15 +167,16 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
+
\setuppublicationlayout[book]{%
\insertauthors{}{ }{\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\inserttitle
{\unskip, \bgroup\it }%
- {\/\egroup
+ {\/\egroup
\ifeditedbook
\global\editedbookfalse
\insertvolume
@@ -217,7 +218,7 @@
\setuppublicationlayout[inbook]{%
\insertauthors{}{}{\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\inserttitle
{, \bgroup\it }%
@@ -313,7 +314,7 @@
\insertarttitle{\bgroup\it }{\/\egroup }{}%%
\inserttitle
{\unskip, in \bgroup\it}%
- {\egroup
+ {\egroup
\inserteditors{, edited by }%
{}%
{}%
@@ -337,11 +338,11 @@
\insertpages
{\unskip, \fixpp.~}
{\unskip.}
- {\unskip.}%
+ {\unskip.}%
}%
{ In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, \fixpp.~}{. }{\unskip. }%
+ \insertpages{\unskip, \fixpp.~}{. }{\unskip. }%
}%
\insertNote{ }{.}{}%
}
@@ -349,11 +350,11 @@
\setuppublicationlayout[proceedings]{%
\inserteditors{}{, ed%
\ifnum\getvalue{editor@num}> 1 s\fi.,
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{ }{}}%
\inserttitle
{\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
@@ -370,7 +371,7 @@
\insertpages
{\unskip, p.~}
{\insertcity{, }{}{}}
- {\unskip\insertcity{, }{}{}}%
+ {\unskip\insertcity{, }{}{}}%
}%
{}%
\insertNote{\unskip. }{.}{.}%
@@ -433,5 +434,5 @@
\insertpubyear{ (unpublished, }{)}{ (unpublished)}%
\insertpages{\unskip, }{ }{}%
\insertNote{\unskip. }{.}{\unskip.}%
-}
+}
\protect
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-de.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-de.tex
index afeebd260b3..60ef3113b1d 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-de.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-de.tex
@@ -105,7 +105,7 @@
%D Some shortcuts.
% ((#1(type\ |)chapter#2)|#3)
-
+
\def\insertchap#1#2#3%
{\insertchapter
{#1\insertbibtype{}{\ }{Kapitel\ }}{#2}%
@@ -137,15 +137,15 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\insertauthors{}{ }{\inserteditors{}{, Herausgeber%
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\insertpubyear{(}{). }{\unskip.}%
\inserttitle
{\bgroup\it }%
- {\/\egroup
+ {\/\egroup
\ifeditedbook
\global\editedbookfalse
\insertvolume
@@ -184,7 +184,7 @@
\setuppublicationlayout[inbook]{%
\insertauthors{}{ }{\inserteditors{}{, Herausgeber%
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\insertpubyear{(}{). }{\unskip.}%
\inserttitle
@@ -260,13 +260,13 @@
{, Herausgeber, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, Nummer }{~in }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, Seiten~}{. }{\unskip. }%
+ \insertpages{\unskip, Seiten~}{. }{\unskip. }%
\insertpublisher
{}%
{\insertedition{, }{ Auflage. }{. }}%
@@ -274,7 +274,7 @@
}%
{In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, Seiten~}{. }{\unskip. }%
+ \insertpages{\unskip, Seiten~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -288,7 +288,7 @@
{, Herausgeber, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, Nummer }{~in }{ }}%
{}%
@@ -297,7 +297,7 @@
\insertpages
{\unskip, Seiten~}
{\insertcity{, }{. }{. }}
- {\unskip. }%
+ {\unskip. }%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -305,26 +305,26 @@
}%
{In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, Seiten~}{. }{\unskip. }%
+ \insertpages{\unskip, Seiten~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
\setuppublicationlayout[proceedings]{%
\inserteditors{}{, Herausgeber%
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{ }{}}%
\insertpubyear{(}{). }{}%
\inserttitle
{\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, Nummer }{~in }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
\insertpages{\unskip, Seiten~}{\insertcity{, }{. }{. }}
- {\unskip\insertcity{, }{. }{. }}%
+ {\unskip\insertcity{, }{. }{. }}%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-fr.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-fr.tex
index 654a3644190..20216c9ba6c 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-fr.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-fr.tex
@@ -105,7 +105,7 @@
%D Some shortcuts.
% ((#1(type\ |)chapter#2)|#3)
-
+
\def\insertchap#1#2#3%
{\insertchapter
{#1\insertbibtype{}{\ }{chapitre\ }}{#2}%
@@ -137,16 +137,16 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\insertauthors{}{ }{\inserteditors{}{, \'editeur%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\insertpubyear{(}{). }{\unskip.}%
\inserttitle
{\bgroup\it }%
- {\/\egroup
+ {\/\egroup
\ifeditedbook
\global\editedbookfalse
\insertvolume
@@ -186,7 +186,7 @@
\setuppublicationlayout[inbook]{%
\insertauthors{}{ }{\inserteditors{}{, \'editeur%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\insertpubyear{(}{). }{\unskip.}%
\inserttitle
@@ -262,13 +262,13 @@
{, \'editeur\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, num\'ero }{~dans }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
\insertpublisher
{}%
{\insertedition{, }{ \'edition. }{. }}%
@@ -276,7 +276,7 @@
}%
{Dans \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -290,7 +290,7 @@
{, \'editeur\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, num\'ero }{~dans }{ }}%
{}%
@@ -299,7 +299,7 @@
\insertpages
{\unskip, pages~}
{\insertcity{, }{. }{. }}
- {\unskip. }%
+ {\unskip. }%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -307,7 +307,7 @@
}%
{Dans \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -315,19 +315,19 @@
\setuppublicationlayout[proceedings]{%
\inserteditors{}{, \'editeur%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{ }{}}%
\insertpubyear{(}{). }{}%
\inserttitle
{\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, num\'ero }{~dans }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
\insertpages{\unskip, pages~}{\insertcity{, }{. }{. }}
- {\unskip\insertcity{, }{. }{. }}%
+ {\unskip\insertcity{, }{. }{. }}%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-it.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-it.tex
index ebf03313a34..1f2dd00e4a5 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-it.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa-it.tex
@@ -157,7 +157,7 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\insertauthors{}{ }{\inserteditors{}{, a c. di%
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa.tex
index b0403e54227..d9ac9c5bf2c 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-apa.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-apa.tex
@@ -160,7 +160,7 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\insertauthors{}{ }{\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-aps.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-aps.tex
index 39d3bd7d44d..2997e2066d8 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-aps.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-aps.tex
@@ -122,7 +122,7 @@
%D Some shortcuts.
% ((#1(type\ |)chapter#2)|#3)
-
+
\def\insertchap#1#2#3%
{\insertchapter
{#1\insertbibtype{}{\ }{chapter\ }}{#2}%
@@ -169,15 +169,15 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\insertauthors{}{ }{\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\inserttitle
{\unskip, \bgroup\it }%
- {\/\egroup
+ {\/\egroup
\ifeditedbook
\global\editedbookfalse
\insertvolume
@@ -219,7 +219,7 @@
\setuppublicationlayout[inbook]{%
\insertauthors{}{}{\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}%
\inserttitle
{, \bgroup\it }%
@@ -289,7 +289,7 @@
\inserttitle
{, in %
\bgroup\it}%
- {\egroup
+ {\egroup
\inserteditors{, edited by }%
{}%
{}
@@ -301,22 +301,22 @@
\insertpubyear{(%
\insertpublisher{}%{, }%{}%
}{)\insertEdition{, }{ ed. }{}}{}%
- \insertpages{\unskip, p.~}{. }{\unskip. }%
+ \insertpages{\unskip, p.~}{. }{\unskip. }%
}%
{In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, p.~}{. }{\unskip. }%
+ \insertpages{\unskip, p.~}{. }{\unskip. }%
}%
\insertNote{ }{.}{}%
}
\setuppublicationlayout[inproceedings]{%
\insertauthors{}{ }{}%
-%
+%
% \insertarttitle{\bgroup }{\egroup. }{}%%
\inserttitle
{\unskip, in \bgroup\it}%
- {\egroup
+ {\egroup
\inserteditors{, edited by }%
{}%
{}%
@@ -340,11 +340,11 @@
\insertpages
{\unskip, \fixpp.~}
{\unskip.}
- {\unskip.}%
+ {\unskip.}%
}%
{ In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, \fixpp.~}{. }{\unskip. }%
+ \insertpages{\unskip, \fixpp.~}{. }{\unskip. }%
}%
\insertNote{ }{.}{}%
}
@@ -352,11 +352,11 @@
\setuppublicationlayout[proceedings]{%
\inserteditors{}{, ed%
\ifnum\getvalue{editor@num}> 1 s\fi.,
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{ }{}}%
\inserttitle
{\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
@@ -373,7 +373,7 @@
\insertpages
{\unskip, p.~}
{\insertcity{, }{}{}}
- {\unskip\insertcity{, }{}{}}%
+ {\unskip\insertcity{, }{}{}}%
}%
{}%
\insertNote{\unskip. }{.}{.}%
@@ -438,4 +438,4 @@
\insertNote{\unskip. }{.}{\unskip.}%
}
-\protect \ No newline at end of file
+\protect
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-num-fr.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-num-fr.tex
index c4271fb7f65..649e7e3f263 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-num-fr.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-num-fr.tex
@@ -111,7 +111,7 @@
%D Some shortcuts.
% ((#1(type\ |)chapter#2)|#3)
-
+
\def\insertchap#1#2#3%
{\insertchapter
{#1\insertbibtype{}{\ }{chapitre\ }}{#2}%
@@ -145,15 +145,15 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\insertauthors{}{\unskip. }{\inserteditors{}{\unskip, \'editeur%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{\unskip. }{}}}%
\inserttitle
{\bgroup\it }%
- {\/\egroup
+ {\/\egroup
\ifeditedbook
\global\editedbookfalse
\insertvolume
@@ -195,7 +195,7 @@
\setuppublicationlayout[inbook]{%
\insertauthors{}{\unskip. }{\inserteditors{}{\unskip, \'editeur%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{\unskip. }{}}}%
\inserttitle
{\bgroup\it }%
@@ -281,13 +281,13 @@
{\unskip, editor\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
\insertpublisher
{}%
{\insertedition{, }{ \'edition}{}%
@@ -297,7 +297,7 @@
}%
{Dans \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -310,7 +310,7 @@
{\unskip, \'editeur\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, num\'ero }{~dans }{ }}%
{}%
@@ -321,7 +321,7 @@
{\insertcity{, }{}{}
\insertpubyear{\unskip, }{. }{. }}%
{\unskip
- \insertpubyear{\unskip, }{. }{. }}%
+ \insertpubyear{\unskip, }{. }{. }}%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -329,7 +329,7 @@
}%
{Dans \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -337,11 +337,11 @@
\setuppublicationlayout[proceedings]{%
\inserteditors{}{\unskip, \'editeur%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{ }{}}%
\inserttitle
{\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, num\'ero }{~dans }{ }}%
{}%
@@ -357,7 +357,7 @@
\insertcity
{, }
{\insertpubyear{, }{. }{. }}
- {\insertpubyear{, }{. }{. }}}%
+ {\insertpubyear{, }{. }{. }}}%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -419,7 +419,7 @@
\insertpublisher
{}
{, \insertpubyear{}{.}{}}
- {\insertpubyear{}{.}{}}%
+ {\insertpubyear{}{.}{}}%
\insertbibtype{ (}{)}{}%
\insertnote{ }{.}{}%
}
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-num.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-num.tex
index 3c72d975acd..8f2cbf34f50 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-num.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-num.tex
@@ -111,7 +111,7 @@
%D Some shortcuts.
% ((#1(type\ |)chapter#2)|#3)
-
+
\def\insertchap#1#2#3%
{\insertchapter
{#1\insertbibtype{}{\ }{chapter\ }}{#2}%
@@ -145,15 +145,15 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\insertauthors{}{\unskip. }{\inserteditors{}{\unskip, editor%
\ifnum\getvalue{editor@num}> 1 s\fi.%
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{\unskip. }{}}}%
\inserttitle
{\bgroup\it }%
- {\/\egroup
+ {\/\egroup
\ifeditedbook.%
\global\editedbookfalse
\insertvolume
@@ -195,7 +195,7 @@
\setuppublicationlayout[inbook]{%
\insertauthors{}{\unskip. }{\inserteditors{}{\unskip, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{\unskip. }{}}}%
\inserttitle
{\bgroup\it }%
@@ -281,13 +281,13 @@
{\unskip, editor\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
\insertpublisher
{}%
{\insertedition{, }{ edition}{}%
@@ -297,7 +297,7 @@
}%
{In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -310,7 +310,7 @@
{\unskip, editor\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
@@ -321,7 +321,7 @@
{\insertcity{, }{}{}%
\insertpubyear{\unskip, }{. }{. }}%
{\unskip
- \insertpubyear{\unskip, }{. }{. }}%
+ \insertpubyear{\unskip, }{. }{. }}%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -329,7 +329,7 @@
}%
{In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -337,11 +337,11 @@
\setuppublicationlayout[proceedings]{%
\inserteditors{}{\unskip, editor%
\ifnum\getvalue{editor@num}> 1 s\fi.%
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{ }{}}%
\inserttitle
{\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
@@ -357,7 +357,7 @@
\insertcity
{, }
{\insertpubyear{, }{. }{. }}
- {\insertpubyear{, }{. }{. }}}%
+ {\insertpubyear{, }{. }{. }}}%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -419,9 +419,9 @@
\insertpublisher
{}
{, \insertpubyear{}{.}{}}
- {\insertpubyear{}{.}{}}%
+ {\insertpubyear{}{.}{}}%
\insertbibtype{ (}{)}{}%
\insertnote{ }{.}{}%
}
-\protect \ No newline at end of file
+\protect
diff --git a/Master/texmf-dist/tex/context/bib/mkii/bibl-ssa.tex b/Master/texmf-dist/tex/context/bib/mkii/bibl-ssa.tex
index b93bd1b68ae..cc8e124a8ba 100644
--- a/Master/texmf-dist/tex/context/bib/mkii/bibl-ssa.tex
+++ b/Master/texmf-dist/tex/context/bib/mkii/bibl-ssa.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=bibl-apa,
+%D [ file=bibl-apa,
%D version=2004.7.16,
%D title=APA bibliography style,
%D subtitle=Publications,
@@ -117,9 +117,9 @@
%TH
%D The \type{\scratchcounter} is incremented by \specialbibinsert
-%D before each author/editor is typeset, so the only thing that needs
+%D before each author/editor is typeset, so the only thing that needs
%D doing is testing its value to decide which of the two `standard'
-%D author formatting macros to call.
+%D author formatting macros to call.
%D
%D The \type{\normalauthor} definition above is a bit altered/stripped
%D down, because the 'glue items' like \type{firstnamesep} got in the
@@ -127,20 +127,20 @@
\def\toggledauthor#1#2#3#4#5%
{\relax
- \ifnum \scratchcounter > 1
- \normalauthor{#1}{#2}{#3}{#4}{#5}%
+ \ifnum \scratchcounter > 1
+ \normalauthor{#1}{#2}{#3}{#4}{#5}%
\else
- \invertedauthor{#1}{#2}{#3}{#4}{#5}%
+ \invertedauthor{#1}{#2}{#3}{#4}{#5}%
\fi }
%TH
%D Below, each \type{\setuppublicationlayout} macro's body will
-%D start by setting a global toggle to true, that controls whether
+%D start by setting a global toggle to true, that controls whether
%D or not the next \type{\insertartauthors},\type{\insertauthors}
%D or \type{\inserteditors} has to store it's contents for comparison.
%D All three are instances of the generic macro \type{\specialbibinsert}.
%D The net result of this trick is that the first typeset block of
-%D names will be saved, regardless of whether they are book authors,
+%D names will be saved, regardless of whether they are book authors,
%D article authors, or editors.
\newif\ifsetstoredauthor
@@ -156,17 +156,17 @@
\def\specialbibinsert#1#2#3#4#5%
{\relax
- \ifsetstoredauthor
+ \ifsetstoredauthor
\global\setstoredauthorfalse % RESET
\putcurrentinallstuff{#1}{#2}%
\ifx\allstuff\oldstuff
% do nothing
\else
- \normalspecialbibinsert{#1}{#2}{#3}{#4}{#5}%
+ \normalspecialbibinsert{#1}{#2}{#3}{#4}{#5}%
\fi
\global\let\oldstuff\allstuff
\else
- \normalspecialbibinsert{#1}{#2}{#3}{#4}{#5}%
+ \normalspecialbibinsert{#1}{#2}{#3}{#4}{#5}%
\fi}
%D initialize \type{\oldstuff}
@@ -189,7 +189,7 @@
% ((#1(type\ |)chapter#2)|#3)
-
+
\def\insertchap#1#2#3%
{\insertchapter
{#1\insertbibtype{}{\ }{chapter\ }}{#2}%
@@ -222,17 +222,17 @@
\insertcomment{}{.}{}%
}
-\newif\ifeditedbook
+% \newif\ifeditedbook
\setuppublicationlayout[book]{%
\global\setstoredauthortrue
\insertauthors{}{.}{\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}\hfill\break%
\insertpubyear{}{. }{\unskip.}%
\inserttitle
{\bgroup\it }%
- {\/\egroup
+ {\/\egroup
\ifeditedbook
\global\editedbookfalse
\insertvolume
@@ -273,7 +273,7 @@
\global\setstoredauthortrue
\insertauthors{}{ }{\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{. }{}}}\hfill\break%
\insertpubyear{}{. }{\unskip.}%
\inserttitle
@@ -352,13 +352,13 @@
{, editor\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
\insertpublisher
{}%
{\insertedition{, }{ edition. }{. }}%
@@ -366,7 +366,7 @@
}%
{In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -381,7 +381,7 @@
{, editor\ifnum\getvalue{editor@num}> 1 s\fi, }%
{}%
\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
@@ -390,7 +390,7 @@
\insertpages
{\unskip, pages~}
{\insertcity{, }{. }{. }}
- {\unskip. }%
+ {\unskip. }%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -398,7 +398,7 @@
}%
{In \insertcrossref{}{}{}%
\insertchap{\unskip, }{ }{ }%
- \insertpages{\unskip, pages~}{. }{\unskip. }%
+ \insertpages{\unskip, pages~}{. }{\unskip. }%
}%
\insertnote{ }{.}{}%
}
@@ -407,19 +407,19 @@
\global\setstoredauthortrue
\inserteditors{}{, editor%
\ifnum\getvalue{editor@num}> 1 s\fi
- \ \global\editedbooktrue
+ \ \global\editedbooktrue
}{\insertthekey{}{ }{}}\hfill\break%
\insertpubyear{}{. }{}%
\inserttitle
{\bgroup\it}%
- {\egroup
+ {\egroup
\insertseries
{\insertvolume{, number }{~in }{ }}%
{}%
{}%
\insertchap{\unskip, }{ }{ }%
\insertpages{\unskip, pages~}{\insertcity{, }{. }{. }}
- {\unskip\insertcity{, }{. }{. }}%
+ {\unskip\insertcity{, }{. }{. }}%
\insertorganization
{}%
{\insertpubname{, }{. }{. }}%
@@ -483,4 +483,4 @@
\insertnote{ }{.}{}%
}
-\protect \ No newline at end of file
+\protect
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/bonum-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/bonum-math.lfg
index 8dfa6340537..51ca2d7f19b 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/bonum-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/bonum-math.lfg
@@ -1,5 +1,8 @@
-local kern_200 = { bottomright = { { kern = -200 } } }
-local kern_100 = { bottomright = { { kern = -100 } } }
+local kern_V = { bottomright = { { kern = -200 } } }
+local kern_W = { bottomright = { { kern = -100 } } }
+local offset_f = { xoffset = "llx" }
+
+-- Beware of updates in ssty slots!
return {
name = "bonum-math",
@@ -10,12 +13,21 @@ return {
mathematics = {
dimensions = {
default = {
- [0x1D453] = { xoffset = "llx" },-- ð‘“
+ -- [0x1D453] = offset_f, -- ð‘“
+ -- ["1:0x1D453"] = offset_f, -- needed for compact
+ -- ["2:0x1D453"] = offset_f, -- needed for compact
+ ["*:0x1D453"] = offset_f, -- ð‘“
},
},
kerns = {
- [0x1D449] = kern_200, -- ð‘‰
- [0x1D44A] = kern_100, -- ð‘Š
+ -- [0x1D449] = kern_V, -- ð‘‰
+ -- ["1:0x1D449"] = kern_V, -- needed for compact
+ -- ["2:0x1D449"] = kern_V, -- needed for compact
+ -- [0x1D44A] = kern_W, -- ð‘Š
+ -- ["1:0x1D44A"] = kern_W, -- needed for compact
+ -- ["2:0x1D44A"] = kern_W, -- needed for compact
+ ["*:0x1D449"] = kern_V, -- ð‘‰
+ ["*:0x1D44A"] = kern_W, -- ð‘Š
},
alternates = {
dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/color-latin.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/color-latin.lfg
new file mode 100644
index 00000000000..c7d24cc1d51
--- /dev/null
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/color-latin.lfg
@@ -0,0 +1,49 @@
+-- If needed we can add names glyphs (maybe some wildcard mapping) ... not that fast
+-- but for a specific font one can always make a dedicated file.
+
+local type = type
+local imerged = table.imerged
+
+local shapes = { }
+local default = { }
+local upper = { }
+local lower = { }
+
+for k, v in next, characters.data do
+ local sh = v.shcode
+ if sh and type(sh) == "number" then
+ local tsh = shapes[sh]
+ if tsh then
+ tsh[#tsh+1] = k
+ else
+ shapes[sh] = { sh, k }
+ end
+ end
+end
+
+for i=1,26 do
+ local l = shapes[65 + i - 1] or { }
+ local u = shapes[97 + i - 1] or { }
+ upper[i] = u
+ lower[i] = l
+ default[i] = imerged(l, u)
+end
+
+-- default = {
+-- [1] = { codepoint, ..., glyph_name, ... },
+-- [2] = { codepoint, ..., glyph_name, ... },
+-- ...
+-- }
+
+return {
+ name = "color-latin",
+ version = "1.00",
+ comment = "Side effect of mails from Marcus Vinicius Mesquita to the list.",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+ colorschemes = {
+ default = default,
+ upper = upper,
+ lower = lower,
+ }
+}
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/dejavu-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/dejavu-math.lfg
index d28c69060e1..608b396f8f7 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/dejavu-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/dejavu-math.lfg
@@ -1,4 +1,7 @@
-local kern_250 = { bottomright = { { kern = -250 } } }
+local kern_V = { bottomright = { { kern = -250 } } }
+local kern_W = kern_W
+
+-- Beware of updates in ssty slots!
return {
name = "dejavu-math",
@@ -8,8 +11,14 @@ return {
copyright = "ConTeXt development team",
mathematics = {
kerns = {
- [0x1D449] = kern_250, --
- [0x1D44A] = kern_250, -- ð‘Š
+ -- [0x1D449] = kern_V, -- ð‘‰
+ -- ["1:0x1D449"] = kern_V, -- needed for compact
+ -- ["2:0x1D449"] = kern_V, -- needed for compact
+ -- [0x1D44A] = kern_W, -- ð‘Š
+ -- ["1:0x1D44A"] = kern_W, -- needed for compact
+ -- ["2:0x1D44A"] = kern_W, -- needed for compact
+ ["*:0x1D449"] = kern_V, -- ð‘‰
+ ["*:0x1D44A"] = kern_W, -- ð‘Š
},
alternates = {
dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/minion-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/minion-math.lfg
index a4f539ec7b3..863836c1cc0 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/minion-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/minion-math.lfg
@@ -1,6 +1,5 @@
-local kern_100 = { bottomright = { { kern = -100 } } }
-local kern_150 = { bottomright = { { kern = -150 } } }
-local kern_200 = { bottomright = { { kern = -200 } } }
+local kern_W = { bottomright = { { kern = -150 } } }
+local kern_V = { bottomright = { { kern = -200 } } }
return {
name = "minion-math",
@@ -23,8 +22,9 @@ return {
},
mathematics = {
kerns = {
- [0x1D449] = kern_200, -- ð‘‰
- [0x1D44A] = kern_150, -- ð‘Š
+ [0x1D449] = kern_V, -- ð‘‰
+ [0x1D44A] = kern_W, -- ð‘Š
+ -- todo: ssty 1/2
},
},
}
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/pagella-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/pagella-math.lfg
index c85ff3f6b88..d4ae1416288 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/pagella-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/pagella-math.lfg
@@ -1,7 +1,8 @@
-local kern_200 = { bottomright = { { kern = -200 } } }
-local kern_100 = { bottomright = { { kern = -100 } } }
+local kern_V = { bottomright = { { kern = -200 } } }
+local kern_W = { bottomright = { { kern = -100 } } }
+local offset_f = { xoffset = "llx" }
--- Beware of updates !
+-- Beware of updates in ssty slots!
return {
name = "pagella-math",
@@ -12,13 +13,22 @@ return {
mathematics = {
dimensions = {
default = {
- -- [0x1D453] = { xoffset = 162, width = 278 + 162 },-- ð‘“
- [0x1D453] = { xoffset = "llx" },-- ð‘“
+ -- [0x1D453] = { xoffset = 162, width = 278 + 162 },-- ð‘“
+ -- [0x1D453] = offset_f, -- ð‘“
+ -- ["1:0x1D453"] = offset_f, -- needed for compact
+ -- ["2:0x1D453"] = offset_f, -- needed for compact
+ ["*:0x1D453"] = offset_f, -- ð‘“
},
},
kerns = {
- [0x1D449] = kern_200, -- ð‘‰
- [0x1D44A] = kern_100, -- ð‘Š
+ -- [0x1D449] = kern_V, -- ð‘‰
+ -- ["1:0x1D449"] = kern_V, -- needed for compact
+ -- ["2:0x1D449"] = kern_V, -- needed for compact
+ -- [0x1D44A] = kern_W, -- ð‘Š
+ -- ["1:0x1D44A"] = kern_W, -- needed for compact
+ -- ["2:0x1D44A"] = kern_W, -- needed for compact
+ ["*:0x1D449"] = kern_V, -- ð‘‰
+ ["*:0x1D44A"] = kern_W, -- ð‘Š
},
alternates = {
dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/px-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/px-math.lfg
index 08d208b3f7f..4000ae1996b 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/px-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/px-math.lfg
@@ -10,18 +10,18 @@ return {
},
virtuals = {
["px-math"] = {
--- { name = "texgyre-pagella-math-regular.otf", features = "virtualmath", main = true },
--- { name = "texgyrepagella-regular.otf", features = "virtualmath", vector = "tex-mr-missing" } ,
- { name = "texgyrepagella-regular.otf", features = "virtualmath" } ,
- { name = "rpxr.tfm", vector = "tex-mr" } ,
+ { name = "texgyrepagella-regular.otf", features = "virtualmath" },
+ { name = "texgyrepagella-regular.otf", features = "virtualmath", vector = "tex-mr-missing" },
+ { name = "rpxr.tfm", vector = "tex-mr" },
{ name = "rpxmi.tfm", vector = "tex-mi", skewchar=0x7F },
- { name = "rpxpplri.tfm", vector = "tex-it", skewchar=0x7F },
- { name = "pxsy.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } ,
+ -- { name = "rpxpplri.tfm", vector = "tex-it", skewchar=0x7F, backmap = true }, -- backmap for lmtx
+ { name = "texgyrepagella-italic.otf", vector = "tex-it", skewchar=0x7F },
+ { name = "pxsy.tfm", vector = "tex-sy", skewchar=0x30, parameters = true },
{ name = "pxex.tfm", vector = "tex-ex", extension = true } ,
{ name = "pxsya.tfm", vector = "tex-ma" },
{ name = "pxsyb.tfm", vector = "tex-mb" },
- { name = "texgyrepagella-bold.otf", vector = "tex-bf", skewchar=0x7F } ,
- { name = "texgyrepagella-bolditalic.otf", vector = "tex-bi" } ,
+ { name = "texgyrepagella-bold.otf", vector = "tex-bf", skewchar=0x7F },
+ { name = "texgyrepagella-bolditalic.otf", vector = "tex-bi" },
{ name = "lmsans10-regular.otf", vector = "tex-ss", optional=true },
{ name = "lmmono10-regular.otf", vector = "tex-tt", optional=true },
},
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/schola-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/schola-math.lfg
index 9787c18a94e..b60bc6d99f9 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/schola-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/schola-math.lfg
@@ -1,5 +1,7 @@
-local kern_200_050 = { bottomright = { { kern = -200 } }, topright = { { kern = 50 } } }
-local kern_100_050 = { bottomright = { { kern = -100 } }, topright = { { kern = 50 } } }
+local kern_V = { bottomright = { { kern = -200 } }, topright = { { kern = 50 } } }
+local kern_W = { bottomright = { { kern = -100 } }, topright = { { kern = 50 } } }
+
+-- Beware of updates in ssty slots!
return {
name = "schola-math",
@@ -9,8 +11,14 @@ return {
copyright = "ConTeXt development team",
mathematics = {
kerns = {
- [0x1D449] = kern_200_050, --
- [0x1D44A] = kern_100_050, -- ð‘Š
+ -- [0x1D449] = kern_V, -- ð‘‰
+ -- ["1:0x1D449"] = kern_V, -- needed for compact
+ -- ["2:0x1D449"] = kern_V, -- needed for compact
+ -- [0x1D44A] = kern_W, -- ð‘Š
+ -- ["1:0x1D44A"] = kern_W, -- needed for compact
+ -- ["2:0x1D44A"] = kern_W, -- needed for compact
+ ["*:0x1D449"] = kern_V, -- ð‘‰
+ ["*:0x1D44A"] = kern_W, -- ð‘Š
},
alternates = {
dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/termes-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/termes-math.lfg
index 1501fd53699..3cf8685ebf0 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/termes-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/termes-math.lfg
@@ -1,5 +1,8 @@
-local kern_200 = { bottomright = { { kern = -200 } } }
-local kern_100 = { bottomright = { { kern = -100 } } }
+local kern_V = { bottomright = { { kern = -200 } } }
+local kern_W = { bottomright = { { kern = -100 } } }
+local offset_f = { xoffset = "llx" }
+
+-- Beware of updates in ssty slots!
return {
name = "termes-math",
@@ -10,12 +13,21 @@ return {
mathematics = {
dimensions = {
default = {
- [0x1D453] = { xoffset = "llx" },-- ð‘“
+ -- [0x1D453] = offset_f, -- ð‘“
+ -- ["1:0x1D453"] = offset_f, -- needed for compact
+ -- ["2:0x1D453"] = offset_f, -- needed for compact
+ ["*:0x1D453"] = offset_f, -- ð‘“
},
},
kerns = {
- [0x1D449] = kern_200, -- ð‘‰
- [0x1D44A] = kern_100, -- ð‘Š
+ -- [0x1D449] = kern_V, -- ð‘‰
+ -- ["1:0x1D449"] = kern_V, -- needed for compact
+ -- ["2:0x1D449"] = kern_V, -- needed for compact
+ -- [0x1D44A] = kern_W, -- ð‘Š
+ -- ["1:0x1D44A"] = kern_W, -- needed for compact
+ -- ["2:0x1D44A"] = kern_W, -- needed for compact
+ ["*:0x1D449"] = kern_V, -- ð‘‰
+ ["*:0x1D44A"] = kern_W, -- ð‘Š
},
alternates = {
dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/tx-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/tx-math.lfg
index 2ad17348659..58467129e97 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/tx-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/tx-math.lfg
@@ -12,15 +12,15 @@ return {
["tx-math"] = {
{ name = "texgyretermes-regular.otf", features = "virtualmath", main = true },
{ name = "texgyretermes-regular.otf", features = "virtualmath", vector = "tex-mr-missing" },
- { name = "rtxr.tfm", vector = "tex-mr" } ,
+ { name = "rtxr.tfm", vector = "tex-mr" },
{ name = "rtxptmri.tfm", vector = "tex-it", skewchar=0x7F },
{ name = "rtxmi.tfm", vector = "tex-mi", skewchar=0x7F },
- { name = "txsy.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } ,
- { name = "txex.tfm", vector = "tex-ex", extension = true } ,
+ { name = "txsy.tfm", vector = "tex-sy", skewchar=0x30, parameters = true },
+ { name = "txex.tfm", vector = "tex-ex", extension = true },
{ name = "txsya.tfm", vector = "tex-ma" },
{ name = "txsyb.tfm", vector = "tex-mb" },
- { name = "texgyretermes-bold.otf", vector = "tex-bf", skewchar=0x7F } ,
- { name = "texgyretermes-bolditalic.otf", vector = "tex-bi" } ,
+ { name = "texgyretermes-bold.otf", vector = "tex-bf", skewchar=0x7F },
+ { name = "texgyretermes-bolditalic.otf", vector = "tex-bi" },
{ name = "lmsans10-regular.otf", vector = "tex-ss", optional=true },
{ name = "lmmono10-regular.otf", vector = "tex-tt", optional=true },
}
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-dejavu.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-dejavu.mkiv
index ee1e9f3831e..6da2daa8996 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-dejavu.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-dejavu.mkiv
@@ -11,6 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% \definefontfallback[Serif] [file:notoserif-regular.ttf] [0x0000-0xFFFF] [check=yes,rscale=1.02]
+% \definefontfallback[SerifBold][file:notoserif-bold.ttf] [0x0000-0xFFFF] [check=yes,rscale=1.02]
+
\definefontfeature[dejavu-condensed-mono][extend=.8]
\starttypescriptcollection[dejavu]
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-euler.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-euler.mkiv
index e98a6e96317..64961830c31 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-euler.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-euler.mkiv
@@ -48,7 +48,7 @@
\stoptypescript
\starttypescript [\s!math] [eulernova] [\s!name]
- \loadfontgoodies[euler-math]
+ % \loadfontgoodies[euler-math]
\definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra}]
\stoptypescript
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv
index cc9559d8b50..dc31715a46a 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv
@@ -235,6 +235,8 @@
%D It doesn't hurt to have these, at least for the moment (can go to type-imp-symbol)
-\definefontsynonym [ZapfDingbats] [\s!file:uzdr] [\s!features=dingbats]% [\s!goodies=dingbats]
+\definefontsynonym [ZapfDingbats] [\s!file:uzdr*dingbats] % works better with symbols
+
+% \definefontsynonym [ZapfDingbats] [\s!file:uzdr] [\s!features=dingbats]% [\s!goodies=dingbats]
\endinput
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-libertinus.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
index dc9c23fe2a3..26d17bc03f2 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
@@ -63,12 +63,12 @@
\starttypescript [\s!mono] [libertinus]
\setups[\s!font:\s!fallback:\s!mono]
- \definefontsynonym [LibertinusMono-Regular] [\s!file:libertinusmono-regular]
+ \definefontsynonym [LibertinusMono-Regular] [\s!file:libertinusmono-regular]
\stoptypescript
\starttypescript [\s!mono] [libertinus] [\s!name]
\setups[\s!font:\s!fallback:\s!mono]
- \definefontsynonym [\s!Mono] [LibertinusMono-Regular] [\s!features=\s!default]
+ \definefontsynonym [\s!Mono] [LibertinusMono-Regular] [\s!features=\s!none]
\stoptypescript
\starttypescript [\s!math] [libertinus] [\s!name]
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv
index 2494d1af2e5..e3417fca557 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv
@@ -54,8 +54,8 @@
\starttypescript [\s!math] [modern-latin]
\loadfontgoodies[lm]
- \definefontsynonym [MathRoman] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math,lm-math-regular,mathextra},\s!goodies=lm]
- \definefontsynonym [MathRomanBold] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math,lm-math-bold,mathextra},\s!goodies=lm]
+ \definefontsynonym [MathRoman] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math,oldmath,lm-math-regular,mathextra},\s!goodies=lm]
+ \definefontsynonym [MathRomanBold] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math,oldmath,lm-math-bold,mathextra},\s!goodies=lm]
\stoptypescript
\starttypescript [modern-latin,modernlatin]
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-plex.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-plex.mkiv
index 4087cd64df5..1e94306bcc3 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-plex.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-plex.mkiv
@@ -48,7 +48,7 @@
\edefinefontsynonym [\typescriptprefix{\typescriptone}] [\s!file:\typescriptprefix{n:plex\typescriptone}-thin] [\s!features=\typescriptprefix{f:plex\typescriptone}]
\edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Italic] [\s!file:\typescriptprefix{n:plex\typescriptone}-thinitalic] [\s!features=\typescriptprefix{f:plex\typescriptone}]
\edefinefontsynonym [\typescriptprefix{\typescriptone}\s!Bold] [\s!file:\typescriptprefix{n:plex\typescriptone}-light] [\s!features=\typescriptprefix{f:plex\typescriptone}]
- \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:plex\typescriptone}-light] [\s!features=\typescriptprefix{f:plex\typescriptone}]
+ \edefinefontsynonym [\typescriptprefix{\typescriptone}\s!BoldItalic] [\s!file:\typescriptprefix{n:plex\typescriptone}-lightitalic][\s!features=\typescriptprefix{f:plex\typescriptone}]
\stoptypescript
% extralight
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-punk.mkxl b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-punk.mkxl
new file mode 100644
index 00000000000..aa01a1d4eaa
--- /dev/null
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-punk.mkxl
@@ -0,0 +1,54 @@
+%D \module
+%D [ file=type-imp-punk,
+%D version=2020.01.17,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Punk Again,
+%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 Yet another look at punk.
+
+\ifdefined\enablerandomvariants\else
+ \useMPlibrary[punk]
+\fi
+
+\doifelse {\truefontname{Serif}} {unknown} {
+ \writestatus{fonts}{you need to load a base bodyfont first}
+ \endinput
+} {
+ % we're ok
+}
+
+\starttypescriptcollection[punk]
+
+ \definefontfeature [punk] [metapost={category=punk,preroll=punkpreroll}]
+ \definefontfeature [punkrandom] [metapost={category=punk,preroll=punkpreroll,variants=5}]
+ \definefontfeature [punkbold] [metapost={category=punk,preroll=punkpreroll,weight=2}]
+ \definefontfeature [punkslanted] [metapost={category=punk,preroll=punkpreroll,slant=.15}]
+ \definefontfeature [punkboldslanted] [metapost={category=punk,preroll=punkpreroll,slant=.15,weight=2}]
+ \definefontfeature [punkveryslanted] [metapost={category=punk,preroll=punkpreroll,slant=-.15}]
+ \definefontfeature [punksqueezed] [metapost={category=punk,preroll=punkpreroll,squeeze=.5}]
+ \definefontfeature [punkextended] [metapost={category=punk,preroll=punkpreroll,extend=1.3}]
+
+ \definefontsynonym [punkbase] [\truefontname{Serif}]
+
+ \starttypescript [\s!serif] [punk]
+ \definefontsynonym [\s!Serif] [punkbase] [\s!features=punk]
+ \definefontsynonym [\s!SerifSlanted] [punkbase] [\s!features=punkslanted]
+ \definefontsynonym [\s!SerifBold] [punkbase] [\s!features=punkbold]
+ \definefontsynonym [\s!SerifBoldSlanted][punkbase] [\s!features=punkboldslanted]
+ \definefontsynonym [\s!SerifItalic] [\s!SerifSlanted]
+ \definefontsynonym [\s!SerifBoldItalic] [\s!SerifBoldSlanted]
+ \stoptypescript
+
+ \starttypescript [punk]
+ \definetypeface [punk] [\s!rm] [\s!serif] [punk] [\s!default]
+ \stoptypescript
+
+\stoptypescriptcollection
+
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-stix.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-stix.mkiv
index 697037b43e2..ee11d83899c 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-stix.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-stix.mkiv
@@ -14,6 +14,18 @@
%D We provide typescripts for version one and two of the stix fonts. There is a
%D xits variant based on the first (not opentype) release that also provides
%D bidirectional math.
+%D
+%D Users should be aware of the fact that the stix filenames keep changing so if
+%D something fails, make sure you have the files and that the names below match
+%D those on your system. (In \TEX\ distributions there's 2 and Two and math can have
+%D -Regular appended or not.
+%D
+%D There's now also:
+%D
+%D stixtwotext-medium.otf
+%D stixtwotext-mediumitalic.otf
+%D stixtwotext-semibold.otf
+%D stixtwotext-semibolditalic.otf
\definefontfeature
[stixtwomath]
@@ -43,15 +55,15 @@
% version two
\starttypescript [\s!math] [stixtwo] [\s!name]
- \definefontsynonym[MathRoman][\s!file:stix2math.otf] [\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math]
+ \definefontsynonym[MathRoman][\s!file:stixtwomath-regular.otf] [\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math]
\stoptypescript
\starttypescript [\s!serif] [stixtwo] [\s!name]
\setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym[\s!Serif] [\s!file:stix2text-regular.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifBold] [\s!file:stix2text-bold.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifItalic] [\s!file:stix2text-italic.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifBoldItalic][\s!file:stix2text-bolditalic.otf][\s!features=\s!default]
+ \definefontsynonym[\s!Serif] [\s!file:stixtwotext-regular.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBold] [\s!file:stixtwotext-bold.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifItalic] [\s!file:stixtwotext-italic.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBoldItalic][\s!file:stixtwotext-bolditalic.otf][\s!features=\s!default]
\stoptypescript
\starttypescript[stixtwo]
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv
index 72d3b358844..01cbb869df7 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv
@@ -14,6 +14,13 @@
%D There are some weird ones that are never used .. all these Caps ... we can better
%D split them into pagella-caps etc.
+%D The tx and px font setups depend on the definitions in px-math.lfg and tx-math.lfg
+%D and because these fonts (mappings, names) are not that stable you should not use
+%D these variants. At some point I will remove this because we have \OPENTYPE\ fonts
+%D that (mostly) work. The mechanism to construct virtual math fonts will probably stay
+%D around but I won't waste time on sorting out all the (changing) font hassles. Also,
+%D the T1 fonts involved are unlikely to be available.
+
\definefontfeature
[mathcollapseitalics]
[collapseitalics=yes]
diff --git a/Master/texmf-dist/tex/context/fonts/mkiv/xits-math.lfg b/Master/texmf-dist/tex/context/fonts/mkiv/xits-math.lfg
index b37ab1277c9..88d3a8d45fa 100644
--- a/Master/texmf-dist/tex/context/fonts/mkiv/xits-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/mkiv/xits-math.lfg
@@ -14,6 +14,7 @@ local italics = {
-- [0x1D44E] = 0.99, -- a (fraction of quad)
-- [0x1D44F] = 100, -- b (font points)
[0x1D453] = -0.0375, -- f
+ -- todo: ssty 1/2
}
}
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-cs.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-cs.xml
index 3014b72d1f0..3006aa9b0bc 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-cs.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-cs.xml
@@ -131,6 +131,9 @@
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='kap'/>
<cd:variable name='capital' value='kapitalky'/>
+ <cd:variable name='category' value='category'/>
+ <cd:variable name='cd:character' value='cd:character'/>
+ <cd:variable name='cd:font' value='cd:font'/>
<cd:variable name='center' value='center'/>
<cd:variable name='centerlast' value='centerlast'/>
<cd:variable name='chapter' value='kapitola'/>
@@ -189,6 +192,7 @@
<cd:variable name='external' value='externi'/>
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='fakt'/>
+ <cd:variable name='fallback' value='fallback'/>
<cd:variable name='february' value='unor'/>
<cd:variable name='field' value='field'/>
<cd:variable name='figure' value='obrazek'/>
@@ -210,6 +214,7 @@
<cd:variable name='flushouter' value='flushouter'/>
<cd:variable name='flushright' value='flushright'/>
<cd:variable name='followingpage' value='followingpage'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='upati'/>
<cd:variable name='footnote' value='poznamkapodcarou'/>
<cd:variable name='force' value='sila'/>
@@ -281,6 +286,7 @@
<cd:variable name='intermezzo' value='intermezzo'/>
<cd:variable name='intext' value='dotextu'/>
<cd:variable name='intro' value='uvod'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='kurziva'/>
<cd:variable name='italicbold' value='kurzivnitucne'/>
<cd:variable name='item' value='polozka'/>
@@ -384,6 +390,7 @@
<cd:variable name='nonumber' value='nonumber'/>
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='normalni'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='nospacing'/>
<cd:variable name='nostopper' value='nostopper'/>
<cd:variable name='not' value='ne'/>
@@ -451,6 +458,7 @@
<cd:variable name='rectangular' value='pravouhly'/>
<cd:variable name='reference' value='odkaz'/>
<cd:variable name='referral' value='znacka'/>
+ <cd:variable name='region' value='region'/>
<cd:variable name='register' value='rejstrik'/>
<cd:variable name='regular' value='pravidelne'/>
<cd:variable name='relative' value='relativni'/>
@@ -635,6 +643,7 @@
<cd:constant name='afterkey' value='klavesapo'/>
<cd:constant name='aftersection' value='aftersection'/>
<cd:constant name='align' value='zarovnani'/>
+ <cd:constant name='alignbottom' value='alignbottom'/>
<cd:constant name='aligncharacter' value='aligncharacter'/>
<cd:constant name='alignmentcharacter' value='alignmentcharacter'/>
<cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
@@ -771,6 +780,9 @@
<cd:constant name='deepnumbercommand' value='deepnumbercommand'/>
<cd:constant name='deeptextcommand' value='deeptextcommand'/>
<cd:constant name='default' value='implicitni'/>
+ <cd:constant name='defaultheight' value='defaultheight'/>
+ <cd:constant name='defaultwidth' value='defaultwidth'/>
+ <cd:constant name='define' value='define'/>
<cd:constant name='delay' value='prodleva'/>
<cd:constant name='depth' value='hloubka'/>
<cd:constant name='depthcorrection' value='korekcehloubky'/>
@@ -810,8 +822,10 @@
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='faktor'/>
<cd:constant name='fallback' value='fallback'/>
+ <cd:constant name='fallbacks' value='fallbacks'/>
<cd:constant name='family' value='rodina'/>
<cd:constant name='features' value='features'/>
+ <cd:constant name='featureset' value='featureset'/>
<cd:constant name='fences' value='fences'/>
<cd:constant name='field' value='field'/>
<cd:constant name='fieldbackgroundcolor' value='barvapozadipole'/>
@@ -832,6 +846,7 @@
<cd:constant name='focusin' value='focusin'/>
<cd:constant name='focusoffset' value='focusoffset'/>
<cd:constant name='focusout' value='focusout'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='upati'/>
<cd:constant name='footerdistance' value='vzdalenostupati'/>
<cd:constant name='footerstate' value='statusupati'/>
@@ -886,6 +901,7 @@
<cd:constant name='increment' value='zvysit'/>
<cd:constant name='incrementnumber' value='zvysujicicislo'/>
<cd:constant name='indenting' value='odsazovani'/>
+ <cd:constant name='indentlist' value='indentlist'/>
<cd:constant name='indentnext' value='odsadpristi'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='indikator'/>
@@ -913,7 +929,10 @@
<cd:constant name='keys' value='keys'/>
<cd:constant name='keyword' value='keyword'/>
<cd:constant name='label' value='popisek'/>
+ <cd:constant name='labelalternative' value='labelalternative'/>
+ <cd:constant name='labelcolor' value='labelcolor'/>
<cd:constant name='labeloffset' value='labeloffset'/>
+ <cd:constant name='labelstyle' value='labelstyle'/>
<cd:constant name='language' value='language'/>
<cd:constant name='last' value='last'/>
<cd:constant name='lastnamesep' value='lastnamesep'/>
@@ -947,6 +966,7 @@
<cd:constant name='limittext' value='limittext'/>
<cd:constant name='line' value='radek'/>
<cd:constant name='linecorrection' value='korekceradku'/>
+ <cd:constant name='linedirection' value='linedirection'/>
<cd:constant name='lines' value='radky'/>
<cd:constant name='list' value='seznam'/>
<cd:constant name='listtext' value='listtext'/>
@@ -1087,6 +1107,7 @@
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='umistit'/>
<cd:constant name='placehead' value='umistihlavicku'/>
+ <cd:constant name='placeholder' value='placeholder'/>
<cd:constant name='placestopper' value='predelmista'/>
<cd:constant name='position' value='position'/>
<cd:constant name='prefix' value='prefix'/>
@@ -1105,6 +1126,7 @@
<cd:constant name='print' value='print'/>
<cd:constant name='printable' value='tisknutelne'/>
<cd:constant name='process' value='process'/>
+ <cd:constant name='processors' value='processors'/>
<cd:constant name='profile' value='profile'/>
<cd:constant name='properties' value='properties'/>
<cd:constant name='pubsep' value='pubsep'/>
@@ -1118,6 +1140,7 @@
<cd:constant name='reference' value='odkaz'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='odkazujici'/>
<cd:constant name='region' value='region'/>
<cd:constant name='regionin' value='oblastuvnitr'/>
@@ -1362,7 +1385,6 @@
<!-- definitions for interface commands for language cs -->
<cd:commands>
- <cd:command name='CAPPED' value='KAP'/>
<cd:command name='Character' value='Znak'/>
<cd:command name='Characters' value='Znaky'/>
<cd:command name='MONTH' value='MESIC'/>
@@ -1376,8 +1398,18 @@
<cd:command name='Word' value='Slovo'/>
<cd:command name='Words' value='Slova'/>
<cd:command name='about' value='oref'/>
+ <cd:command name='adaptfontfeature' value='adaptfontfeature'/>
<cd:command name='adaptlayout' value='prizpusobvzhled'/>
+ <cd:command name='addfeature' value='addfeature'/>
+ <cd:command name='alignbottom' value='alignbottom'/>
+ <cd:command name='aligned' value='aligned'/>
+ <cd:command name='alignedbox' value='alignedbox'/>
+ <cd:command name='alignedline' value='alignedline'/>
+ <cd:command name='alignhere' value='alignhere'/>
<cd:command name='alignment' value='alignment'/>
+ <cd:command name='alignmentcharacter' value='alignmentcharacter'/>
+ <cd:command name='applytocharacters' value='applytocharacters'/>
+ <cd:command name='applytofirstcharacter' value='applytofirstcharacter'/>
<cd:command name='arg' value='arg'/>
<cd:command name='at' value='pref'/>
<cd:command name='atleftmargin' value='atleftmargin'/>
@@ -1389,9 +1421,13 @@
<cd:command name='blackrules' value='cernelinky'/>
<cd:command name='blank' value='preskoc'/>
<cd:command name='bookmark' value='zalozka'/>
+ <cd:command name='bottombox' value='bottombox'/>
<cd:command name='bottomdistance' value='vzdalenostspodku'/>
<cd:command name='bottomheight' value='vyskaspodku'/>
+ <cd:command name='bottomleftbox' value='bottomleftbox'/>
+ <cd:command name='bottomrightbox' value='bottomrightbox'/>
<cd:command name='bottomspace' value='bottomspace'/>
+ <cd:command name='buildtextbottomdot' value='buildtextbottomdot'/>
<cd:command name='but' value='spodek'/>
<cd:command name='button' value='tlacitko'/>
<cd:command name='bypassblocks' value='bypassblocks'/>
@@ -1430,8 +1466,11 @@
<cd:command name='defineblock' value='definujblok'/>
<cd:command name='definebodyfont' value='definujzakladnifont'/>
<cd:command name='definebodyfontenvironment' value='definujprostredizakladnihofontu'/>
+ <cd:command name='definebodyfontswitch' value='definebodyfontswitch'/>
<cd:command name='definebuffer' value='definujbuffer'/>
<cd:command name='definecharacter' value='definujznak'/>
+ <cd:command name='definecharacterkerning' value='definecharacterkerning'/>
+ <cd:command name='definecharacterspacing' value='definecharacterspacing'/>
<cd:command name='definecolor' value='definujbarvu'/>
<cd:command name='definecolorgroup' value='definujskupinubarev'/>
<cd:command name='definecolumnbreak' value='definecolumnbreak'/>
@@ -1441,37 +1480,57 @@
<cd:command name='definecommand' value='definujprikaz'/>
<cd:command name='defineconversion' value='definujkonverzi'/>
<cd:command name='definedescription' value='definujpopis'/>
+ <cd:command name='definedfont' value='definedfont'/>
<cd:command name='defineenumeration' value='definujvycet'/>
+ <cd:command name='definefallbackfamily' value='definefallbackfamily'/>
<cd:command name='definefield' value='definujpole'/>
<cd:command name='definefieldstack' value='definujzasobnikpoli'/>
<cd:command name='definefiguresymbol' value='definujobrazeksymbol'/>
+ <cd:command name='definefilefallback' value='definefilefallback'/>
+ <cd:command name='definefirstline' value='definefirstline'/>
<cd:command name='definefloat' value='definujplvouciobjekt'/>
<cd:command name='definefont' value='definujfont'/>
+ <cd:command name='definefontalternative' value='definefontalternative'/>
+ <cd:command name='definefontfallback' value='definefontfallback'/>
+ <cd:command name='definefontfamily' value='definefontfamily'/>
+ <cd:command name='definefontfamilypreset' value='definefontfamilypreset'/>
+ <cd:command name='definefontfeature' value='definefontfeature'/>
+ <cd:command name='definefontfile' value='definefontfile'/>
+ <cd:command name='definefontsize' value='definefontsize'/>
+ <cd:command name='definefontsolution' value='definefontsolution'/>
<cd:command name='definefontstyle' value='definujstylfontu'/>
<cd:command name='definefontsynonym' value='definujsynonumumfontu'/>
<cd:command name='defineframed' value='definujoramovani'/>
<cd:command name='defineframedtext' value='definujoramovanytext'/>
+ <cd:command name='definefrozenfont' value='definefrozenfont'/>
<cd:command name='definehbox' value='definujhbox'/>
<cd:command name='definehead' value='definujnadpis'/>
+ <cd:command name='definehyphenationfeatures' value='definehyphenationfeatures'/>
<cd:command name='defineindentedtext' value='defineindentedtext'/>
<cd:command name='defineinmargin' value='defineinmargin'/>
<cd:command name='defineinteractionmenu' value='definujinterakcnimenu'/>
<cd:command name='defineitemgroup' value='defineitemgroup'/>
+ <cd:command name='defineitems' value='defineitems'/>
<cd:command name='definelabel' value='definujpopisek'/>
<cd:command name='definelayer' value='definelayer'/>
<cd:command name='definelayout' value='definelayout'/>
+ <cd:command name='definelinenote' value='definelinenote'/>
<cd:command name='definelist' value='definujseznam'/>
<cd:command name='definelogo' value='definujlogo'/>
<cd:command name='definemainfield' value='definujhlavnipole'/>
<cd:command name='definemakeup' value='definujupravu'/>
<cd:command name='definemarking' value='definujznaceni'/>
<cd:command name='definemathalignment' value='definemathalignment'/>
+ <cd:command name='definemode' value='definemode'/>
+ <cd:command name='definenamedcolor' value='definenamedcolor'/>
+ <cd:command name='definenote' value='definenote'/>
<cd:command name='defineoutput' value='definujvystup'/>
<cd:command name='defineoverlay' value='definujprekryv'/>
<cd:command name='definepagebreak' value='definepagebreak'/>
<cd:command name='definepalet' value='definujpaletu'/>
<cd:command name='definepapersize' value='definujvelikostpapiru'/>
<cd:command name='defineparagraphs' value='definujodstavce'/>
+ <cd:command name='defineperiodkerning' value='defineperiodkerning'/>
<cd:command name='defineplacement' value='defineplacement'/>
<cd:command name='defineprofile' value='definujprofil'/>
<cd:command name='defineprogram' value='definujprogram'/>
@@ -1493,33 +1552,45 @@
<cd:command name='definetabulate' value='definujtabelaci'/>
<cd:command name='definetext' value='definujtext'/>
<cd:command name='definetextbackground' value='definetextbackground'/>
+ <cd:command name='definetextnote' value='definetextnote'/>
<cd:command name='definetextposition' value='definetextposition'/>
<cd:command name='definetextvariable' value='definetextvariable'/>
<cd:command name='definetype' value='definetype'/>
<cd:command name='definetyping' value='definujopis'/>
<cd:command name='defineversion' value='definujverzi'/>
+ <cd:command name='depthspanningtext' value='depthspanningtext'/>
<cd:command name='determineheadnumber' value='stanovcislonadpisu'/>
<cd:command name='determinelistcharacteristics' value='stanovcharakteristickuseznamu'/>
<cd:command name='determineregistercharacteristics' value='urcicharakteristikurejstriku'/>
<cd:command name='dimension' value='rozmer'/>
<cd:command name='disableinteractionmenu' value='zablokujinterakcnimenu'/>
+ <cd:command name='disablemode' value='disablemode'/>
+ <cd:command name='doaddfeature' value='doaddfeature'/>
<cd:command name='domicile' value='bydliste'/>
+ <cd:command name='dontconvertfont' value='dontconvertfont'/>
<cd:command name='donttest' value='zadnytest'/>
<cd:command name='edgedistance' value='vzdalenostokraje'/>
<cd:command name='edgewidth' value='sirkaokraje'/>
+ <cd:command name='emphasisboldface' value='emphasisboldface'/>
<cd:command name='emptylines' value='emptylines'/>
+ <cd:command name='enablemode' value='enablemode'/>
<cd:command name='environment' value='prostredi'/>
<cd:command name='externalfigure' value='externiobraz'/>
<cd:command name='fact' value='fakt'/>
+ <cd:command name='fastswitchtobodyfont' value='fastswitchtobodyfont'/>
+ <cd:command name='feature' value='feature'/>
<cd:command name='field' value='pole'/>
<cd:command name='fieldstack' value='zasobnikpoli'/>
<cd:command name='fillinfield' value='vyplnovepole'/>
<cd:command name='fillinline' value='vyplnovyradek'/>
<cd:command name='fillinrules' value='vyplnovelinky'/>
<cd:command name='fillintext' value='vyplnenytext'/>
+ <cd:command name='firstcharacter' value='firstcharacter'/>
<cd:command name='fitfield' value='prizpusobivepole'/>
+ <cd:command name='fittopbaselinegrid' value='fittopbaselinegrid'/>
<cd:command name='fixedspace' value='tvrdamezera'/>
<cd:command name='fixedspaces' value='tvrdemezery'/>
+ <cd:command name='flushnotes' value='flushnotes'/>
<cd:command name='followprofile' value='dodrzujprofil'/>
<cd:command name='followprofileversion' value='dodrzujverziprofilu'/>
<cd:command name='followversion' value='dodrzujverzi'/>
@@ -1528,13 +1599,19 @@
<cd:command name='footnote' value='poznamkapodcarou'/>
<cd:command name='footnotetext' value='footnotetext'/>
<cd:command name='forceblocks' value='forceblocks'/>
+ <cd:command name='forcecharacterstripping' value='forcecharacterstripping'/>
<cd:command name='formulanumber' value='cislorovnice'/>
<cd:command name='fraction' value='zlomek'/>
<cd:command name='framed' value='oramovani'/>
<cd:command name='from' value='zref'/>
+ <cd:command name='fromlinenote' value='fromlinenote'/>
<cd:command name='getbuffer' value='ziskejbuffer'/>
+ <cd:command name='getfirstcharacter' value='getfirstcharacter'/>
<cd:command name='getmarking' value='ziskejznaceni'/>
<cd:command name='getnumber' value='getnumber'/>
+ <cd:command name='globaldisablemode' value='globaldisablemode'/>
+ <cd:command name='globalenablemode' value='globalenablemode'/>
+ <cd:command name='globalpreventmode' value='globalpreventmode'/>
<cd:command name='godown' value='jdidolu'/>
<cd:command name='goto' value='jdina'/>
<cd:command name='gotobox' value='jdinabox'/>
@@ -1550,6 +1627,7 @@
<cd:command name='headnumber' value='cislonadpisu'/>
<cd:command name='headsym' value='headsym'/>
<cd:command name='headtext' value='texthlavicky'/>
+ <cd:command name='heightspanningtext' value='heightspanningtext'/>
<cd:command name='hideblocks' value='schovejbloky'/>
<cd:command name='high' value='vysoky'/>
<cd:command name='hl' value='hl'/>
@@ -1581,26 +1659,37 @@
<cd:command name='interactionbuttons' value='interakcnitlacitka'/>
<cd:command name='interactionmenu' value='interaktivnimenu'/>
<cd:command name='item' value='polozka'/>
+ <cd:command name='itemgroup' value='itemgroup'/>
<cd:command name='items' value='polozky'/>
+ <cd:command name='itemtag' value='itemtag'/>
<cd:command name='its' value='pol'/>
<cd:command name='keepblocks' value='zachovejbloky'/>
+ <cd:command name='kerncharacters' value='kerncharacters'/>
<cd:command name='label' value='poppisek'/>
<cd:command name='labels' value='popisky'/>
<cd:command name='labeltext' value='textpopisku'/>
<cd:command name='language' value='jazyk'/>
+ <cd:command name='languageCharacters' value='languageCharacters'/>
+ <cd:command name='languagecharacters' value='languagecharacters'/>
<cd:command name='leftaligned' value='zarovnanovlevo'/>
+ <cd:command name='leftbottombox' value='leftbottombox'/>
<cd:command name='leftedgedistance' value='vzdalenostlevehookraje'/>
<cd:command name='leftedgewidth' value='sirkalevehookraje'/>
+ <cd:command name='leftline' value='leftline'/>
<cd:command name='leftmargindistance' value='vzdalenostlevemarginalie'/>
<cd:command name='leftmarginwidth' value='sirkalevemarginalie'/>
<cd:command name='leg' value='leg'/>
<cd:command name='linecorrection' value='linecorrection'/>
+ <cd:command name='linenote' value='linenote'/>
+ <cd:command name='linespanningtext' value='linespanningtext'/>
<cd:command name='linewidth' value='tloustkacary'/>
<cd:command name='listheight' value='vyskaseznamu'/>
<cd:command name='listlength' value='delkaseznamu'/>
<cd:command name='listsymbol' value='listsymbol'/>
<cd:command name='listwidth' value='sirkaseznamu'/>
+ <cd:command name='loadfontgoodies' value='loadfontgoodies'/>
<cd:command name='localfootnotes' value='localfootnotes'/>
+ <cd:command name='localnotes' value='localnotes'/>
<cd:command name='logfields' value='zaznamovepole'/>
<cd:command name='lohi' value='nivy'/>
<cd:command name='low' value='nizky'/>
@@ -1631,6 +1720,7 @@
<cd:command name='nodimension' value='zadnyrozmer'/>
<cd:command name='noheaderandfooterlines' value='zadnezahlaviaupati'/>
<cd:command name='noindenting' value='zadneodsazovani'/>
+ <cd:command name='noitem' value='noitem'/>
<cd:command name='nolist' value='zadnyseznam'/>
<cd:command name='nomarking' value='zadneznaceni'/>
<cd:command name='nomoreblocks' value='zadnedalsibloky'/>
@@ -1638,6 +1728,7 @@
<cd:command name='nop' value='nop'/>
<cd:command name='nospace' value='zadnamezera'/>
<cd:command name='note' value='poznamka'/>
+ <cd:command name='notesymbol' value='notesymbol'/>
<cd:command name='notopandbottomlines' value='zadnehorniadolniradky'/>
<cd:command name='notsmallcapped' value='nokap'/>
<cd:command name='nowhitespace' value='zadnebilemisto'/>
@@ -1649,6 +1740,7 @@
<cd:command name='outermarginwidth' value='outermarginwidth'/>
<cd:command name='packed' value='zhustene'/>
<cd:command name='page' value='strana'/>
+ <cd:command name='pagebreak' value='pagebreak'/>
<cd:command name='pagedepth' value='pagedepth'/>
<cd:command name='pagenumber' value='cislostrany'/>
<cd:command name='pageoffset' value='pageoffset'/>
@@ -1667,7 +1759,10 @@
<cd:command name='placelist' value='umistiseznam'/>
<cd:command name='placelistofsynonyms' value='placelistofsynonyms'/>
<cd:command name='placelocalfootnotes' value='umistilokalnipoznamkypodcarou'/>
+ <cd:command name='placelocalnotes' value='placelocalnotes'/>
<cd:command name='placelogos' value='umistiloga'/>
+ <cd:command name='placenamedfloat' value='placenamedfloat'/>
+ <cd:command name='placenotes' value='placenotes'/>
<cd:command name='placeongrid' value='umistinamrizku'/>
<cd:command name='placeontopofeachother' value='umistinadsebe'/>
<cd:command name='placepagenumber' value='placepagenumber'/>
@@ -1680,9 +1775,17 @@
<cd:command name='placetextvariable' value='placetextvariable'/>
<cd:command name='position' value='pozice'/>
<cd:command name='positiontext' value='positiontext'/>
+ <cd:command name='postponenotes' value='postponenotes'/>
+ <cd:command name='postponingnotes' value='postponingnotes'/>
+ <cd:command name='predefinedfont' value='predefinedfont'/>
+ <cd:command name='predefinefont' value='predefinefont'/>
+ <cd:command name='presetdocument' value='presetdocument'/>
+ <cd:command name='prettyprintbuffer' value='prettyprintbuffer'/>
+ <cd:command name='preventmode' value='preventmode'/>
<cd:command name='printpaperheight' value='vyskatiskpapiru'/>
<cd:command name='printpaperwidth' value='sirkatiskpapiru'/>
<cd:command name='processblocks' value='zpracujbloky'/>
+ <cd:command name='processbodyfontenvironmentlist' value='processbodyfontenvironmentlist'/>
<cd:command name='processpage' value='zpracujstranu'/>
<cd:command name='product' value='produkt'/>
<cd:command name='program' value='program'/>
@@ -1692,19 +1795,45 @@
<cd:command name='quote' value='citovat'/>
<cd:command name='ran' value='ran'/>
<cd:command name='redo' value='opakovat'/>
+ <cd:command name='redoconvertfont' value='redoconvertfont'/>
<cd:command name='ref' value='ref'/>
<cd:command name='reference' value='odkaz'/>
<cd:command name='referral' value='odkaz'/>
<cd:command name='referraldate' value='odkaznadatum'/>
<cd:command name='referring' value='odkazujici'/>
+ <cd:command name='registerfontclass' value='registerfontclass'/>
+ <cd:command name='registerhyphenationexception' value='registerhyphenationexception'/>
+ <cd:command name='registerhyphenationpattern' value='registerhyphenationpattern'/>
<cd:command name='remark' value='oznaceni'/>
+ <cd:command name='replacefeature' value='replacefeature'/>
<cd:command name='reset' value='reset'/>
+ <cd:command name='resetandaddfeature' value='resetandaddfeature'/>
+ <cd:command name='resetcharacteralign' value='resetcharacteralign'/>
+ <cd:command name='resetcharacterkerning' value='resetcharacterkerning'/>
+ <cd:command name='resetcharacterspacing' value='resetcharacterspacing'/>
+ <cd:command name='resetcharacterstripping' value='resetcharacterstripping'/>
+ <cd:command name='resetfeature' value='resetfeature'/>
+ <cd:command name='resetfontcolorsheme' value='resetfontcolorsheme'/>
+ <cd:command name='resetfontfallback' value='resetfontfallback'/>
+ <cd:command name='resetfontsolution' value='resetfontsolution'/>
+ <cd:command name='resethyphenationfeatures' value='resethyphenationfeatures'/>
+ <cd:command name='resetlocalfloats' value='resetlocalfloats'/>
<cd:command name='resetmarking' value='resetznaceni'/>
+ <cd:command name='resetmode' value='resetmode'/>
<cd:command name='resetnumber' value='resetnumber'/>
- <cd:command name='resettext' value='resettextcontent'/>
+ <cd:command name='resetpath' value='resetpath'/>
+ <cd:command name='resetperiodkerning' value='resetperiodkerning'/>
+ <cd:command name='resetsystemmode' value='resetsystemmode'/>
+ <cd:command name='resettextcontent' value='resettextcontent'/>
+ <cd:command name='resetvisualizers' value='resetvisualizers'/>
+ <cd:command name='restoreglobalbodyfont' value='restoreglobalbodyfont'/>
+ <cd:command name='retestfeature' value='retestfeature'/>
+ <cd:command name='revivefeature' value='revivefeature'/>
<cd:command name='rightaligned' value='zarovnanovpravo'/>
+ <cd:command name='rightbottombox' value='rightbottombox'/>
<cd:command name='rightedgedistance' value='vzdalenostpravehookraje'/>
<cd:command name='rightedgewidth' value='sirkapravehookraje'/>
+ <cd:command name='rightline' value='rightline'/>
<cd:command name='rightmargindistance' value='vzdalenostpravemarginalie'/>
<cd:command name='rightmarginwidth' value='sirkapravemarginalie'/>
<cd:command name='romannumerals' value='rimskecislice'/>
@@ -1715,12 +1844,38 @@
<cd:command name='selectblocks' value='vyberbloky'/>
<cd:command name='selectpaper' value='vyberpapir'/>
<cd:command name='selectversion' value='vyberverzi'/>
+ <cd:command name='setbigbodyfont' value='setbigbodyfont'/>
+ <cd:command name='setcharacteralign' value='setcharacteralign'/>
+ <cd:command name='setcharacteraligndetail' value='setcharacteraligndetail'/>
+ <cd:command name='setcharactercasing' value='setcharactercasing'/>
+ <cd:command name='setcharactercleaning' value='setcharactercleaning'/>
+ <cd:command name='setcharacterkerning' value='setcharacterkerning'/>
+ <cd:command name='setcharacterspacing' value='setcharacterspacing'/>
+ <cd:command name='setcharacterstripping' value='setcharacterstripping'/>
+ <cd:command name='setcurrentfontclass' value='setcurrentfontclass'/>
+ <cd:command name='setfirstline' value='setfirstline'/>
+ <cd:command name='setfirstpasscharacteralign' value='setfirstpasscharacteralign'/>
+ <cd:command name='setfont' value='setfont'/>
+ <cd:command name='setfontcolorsheme' value='setfontcolorsheme'/>
+ <cd:command name='setfontfeature' value='setfontfeature'/>
+ <cd:command name='setfontsolution' value='setfontsolution'/>
+ <cd:command name='setfontstrut' value='setfontstrut'/>
+ <cd:command name='sethyphenationfeatures' value='sethyphenationfeatures'/>
+ <cd:command name='setmainbodyfont' value='setmainbodyfont'/>
+ <cd:command name='setmode' value='setmode'/>
+ <cd:command name='setnote' value='setnote'/>
+ <cd:command name='setnotetext' value='setnotetext'/>
<cd:command name='setnumber' value='setnumber'/>
+ <cd:command name='setperiodkerning' value='setperiodkerning'/>
+ <cd:command name='setsecondpasscharacteralign' value='setsecondpasscharacteralign'/>
+ <cd:command name='setsmallbodyfont' value='setsmallbodyfont'/>
+ <cd:command name='setsystemmode' value='setsystemmode'/>
<cd:command name='settextcontent' value='settextcontent'/>
<cd:command name='settextvariable' value='settextvariable'/>
<cd:command name='setupalign' value='nastavzarovnani'/>
<cd:command name='setupanswerarea' value='setupanswerarea'/>
<cd:command name='setuparranging' value='nastavusporadani'/>
+ <cd:command name='setupattachment' value='setupattachment'/>
<cd:command name='setupbackground' value='nastavpozadi'/>
<cd:command name='setupbackgrounds' value='nastavpozadi'/>
<cd:command name='setupblackrules' value='nastavcernelinky'/>
@@ -1735,6 +1890,9 @@
<cd:command name='setupcapitals' value='nastavkapitalky'/>
<cd:command name='setupcaption' value='nastavpopisek'/>
<cd:command name='setupcaptions' value='nastavpopisky'/>
+ <cd:command name='setupcharacteralign' value='setupcharacteralign'/>
+ <cd:command name='setupcharacterkerning' value='setupcharacterkerning'/>
+ <cd:command name='setupcharacterspacing' value='setupcharacterspacing'/>
<cd:command name='setupclipping' value='nastavorez'/>
<cd:command name='setupcolor' value='nastavbarvu'/>
<cd:command name='setupcolors' value='nastavbarvy'/>
@@ -1745,6 +1903,7 @@
<cd:command name='setupcombinations' value='nastavspojeni'/>
<cd:command name='setupcombinedlist' value='nastavkombinovanyseznam'/>
<cd:command name='setupcomment' value='nastavkomentar'/>
+ <cd:command name='setupcounter' value='setupcounter'/>
<cd:command name='setupdescription' value='setupdescription'/>
<cd:command name='setupdescriptions' value='nastavpopisy'/>
<cd:command name='setupenumeration' value='setupenumeration'/>
@@ -1754,9 +1913,14 @@
<cd:command name='setupfields' value='nastavvsechnapole'/>
<cd:command name='setupfillinlines' value='nastavvyplnoveradky'/>
<cd:command name='setupfillinrules' value='nastavvyplnovelinky'/>
+ <cd:command name='setupfirstline' value='setupfirstline'/>
<cd:command name='setupfloat' value='nastavplvouciobjekt'/>
<cd:command name='setupfloats' value='nastavplvouciobjekty'/>
<cd:command name='setupfloatsplitting' value='nastavdeleniplvoucichobjektu'/>
+ <cd:command name='setupfontexpansion' value='setupfontexpansion'/>
+ <cd:command name='setupfontprotrusion' value='setupfontprotrusion'/>
+ <cd:command name='setupfonts' value='setupfonts'/>
+ <cd:command name='setupfontsolution' value='setupfontsolution'/>
<cd:command name='setupfooter' value='nastavupati'/>
<cd:command name='setupfootertexts' value='nastavtextyupati'/>
<cd:command name='setupfootnotedefinition' value='nastavdefinicipoznamekpodcarou'/>
@@ -1773,6 +1937,7 @@
<cd:command name='setupheadnumber' value='nastavcislonadpisu'/>
<cd:command name='setupheads' value='nastavnadpisy'/>
<cd:command name='setupheadtext' value='nastavtexthlavicky'/>
+ <cd:command name='setuphyphenation' value='setuphyphenation'/>
<cd:command name='setuphyphenmark' value='nastavdelitko'/>
<cd:command name='setupindentedtext' value='setupindentedtext'/>
<cd:command name='setupindenting' value='nastavodsazovani'/>
@@ -1789,6 +1954,7 @@
<cd:command name='setuplanguage' value='nastavjazyk'/>
<cd:command name='setuplayout' value='nastavvzhled'/>
<cd:command name='setuplegend' value='nastavlegendu'/>
+ <cd:command name='setuplinenote' value='setuplinenote'/>
<cd:command name='setuplinenumbering' value='nastavcislovaniradku'/>
<cd:command name='setuplines' value='nastavradky'/>
<cd:command name='setuplinewidth' value='nastavsirkucary'/>
@@ -1801,6 +1967,10 @@
<cd:command name='setupmarking' value='nastavznaceni'/>
<cd:command name='setupmathalignment' value='setupmathalignment'/>
<cd:command name='setupnarrower' value='nastavzuzeni'/>
+ <cd:command name='setupnotation' value='setupnotation'/>
+ <cd:command name='setupnotations' value='setupnotations'/>
+ <cd:command name='setupnote' value='setupnote'/>
+ <cd:command name='setupnotes' value='setupnotes'/>
<cd:command name='setupnumber' value='setupnumber'/>
<cd:command name='setupnumbering' value='nastavcislovani'/>
<cd:command name='setupoppositeplacing' value='nastavumisteniprotejsku'/>
@@ -1814,6 +1984,7 @@
<cd:command name='setuppapersize' value='nastavvelikostpapiru'/>
<cd:command name='setupparagraphnumbering' value='nastavcislovaniodstavcu'/>
<cd:command name='setupparagraphs' value='nastavodstavce'/>
+ <cd:command name='setupperiodkerning' value='setupperiodkerning'/>
<cd:command name='setupplacement' value='setupplacement'/>
<cd:command name='setuppositioning' value='nastavumistovani'/>
<cd:command name='setupprofiles' value='nastavprofily'/>
@@ -1843,6 +2014,7 @@
<cd:command name='setuptabulate' value='nastavtabelaci'/>
<cd:command name='setuptext' value='nastavtext'/>
<cd:command name='setuptextbackground' value='setuptextbackground'/>
+ <cd:command name='setuptextnote' value='setuptextnote'/>
<cd:command name='setuptextposition' value='setuptextposition'/>
<cd:command name='setuptextrules' value='nastavtextovelinky'/>
<cd:command name='setuptexttexts' value='nastavtexttexty'/>
@@ -1857,16 +2029,29 @@
<cd:command name='setupurl' value='nastavurl'/>
<cd:command name='setupversions' value='nastavverze'/>
<cd:command name='setupwhitespace' value='nastavbilamista'/>
+ <cd:command name='setvisualizerfont' value='setvisualizerfont'/>
<cd:command name='showbodyfont' value='ukazzakladnifont'/>
<cd:command name='showbodyfontenvironment' value='ukazpostredizakladnihofontu'/>
<cd:command name='showcolor' value='ukazbarvu'/>
<cd:command name='showcolorgroup' value='ukazskupinubarev'/>
+ <cd:command name='showcounter' value='showcounter'/>
<cd:command name='showexternalfigures' value='ukazexterniobrazy'/>
<cd:command name='showfields' value='ukazpole'/>
+ <cd:command name='showfont' value='showfont'/>
+ <cd:command name='showfontdata' value='showfontdata'/>
+ <cd:command name='showfontexpansion' value='showfontexpansion'/>
+ <cd:command name='showfontitalics' value='showfontitalics'/>
+ <cd:command name='showfontkerns' value='showfontkerns'/>
+ <cd:command name='showfontparameters' value='showfontparameters'/>
+ <cd:command name='showfontstrip' value='showfontstrip'/>
+ <cd:command name='showfontstyle' value='showfontstyle'/>
<cd:command name='showframe' value='ukazramecek'/>
<cd:command name='showgrid' value='ukazmrizku'/>
+ <cd:command name='showhyphenationtrace' value='showhyphenationtrace'/>
+ <cd:command name='showkerning' value='showkerning'/>
<cd:command name='showlayout' value='ukazvzhled'/>
<cd:command name='showmakeup' value='ukazupravu'/>
+ <cd:command name='showminimalbaseline' value='showminimalbaseline'/>
<cd:command name='showpalet' value='ukazpaletu'/>
<cd:command name='showprint' value='ukazvytisk'/>
<cd:command name='showsetups' value='ukaznastaveni'/>
@@ -1876,6 +2061,7 @@
<cd:command name='someline' value='nejakyradek'/>
<cd:command name='somewhere' value='nekde'/>
<cd:command name='space' value='mezera'/>
+ <cd:command name='specialitem' value='specialitem'/>
<cd:command name='splitfloat' value='rozdelplvouciobjekt'/>
<cd:command name='startalignment' value='startzarovnavani'/>
<cd:command name='startbackground' value='startpozadi'/>
@@ -1893,6 +2079,7 @@
<cd:command name='startglobal' value='startglobalni'/>
<cd:command name='startline' value='startradek'/>
<cd:command name='startlinecorrection' value='startkorekceradku'/>
+ <cd:command name='startlinenote' value='startlinenote'/>
<cd:command name='startlinenumbering' value='startcislovaniradku'/>
<cd:command name='startlines' value='startradky'/>
<cd:command name='startlocal' value='startlokalni'/>
@@ -1903,7 +2090,7 @@
<cd:command name='startnarrower' value='startzuzeni'/>
<cd:command name='startopposite' value='startprotejsek'/>
<cd:command name='startoverlay' value='startprekryv'/>
- <cd:command name='startoverzicht' value='startprehled'/>
+ <cd:command name='startoverview' value='startprehled'/>
<cd:command name='startpacked' value='startzhustene'/>
<cd:command name='startpositioning' value='startumistovani'/>
<cd:command name='startproduct' value='startprodukt'/>
@@ -1935,6 +2122,7 @@
<cd:command name='stopglobal' value='stopglobalni'/>
<cd:command name='stopline' value='stopradek'/>
<cd:command name='stoplinecorrection' value='stopkorekceradku'/>
+ <cd:command name='stoplinenote' value='stoplinenote'/>
<cd:command name='stoplinenumbering' value='stopcislovaniradku'/>
<cd:command name='stoplines' value='stopradky'/>
<cd:command name='stoplocal' value='stoplokalni'/>
@@ -1945,7 +2133,7 @@
<cd:command name='stopnarrower' value='stopzuzeni'/>
<cd:command name='stopopposite' value='stopprotejsek'/>
<cd:command name='stopoverlay' value='stopprekryv'/>
- <cd:command name='stopoverzicht' value='stopprehled'/>
+ <cd:command name='stopoverview' value='stopprehled'/>
<cd:command name='stoppacked' value='stopzhustene'/>
<cd:command name='stoppositioning' value='stopumistovani'/>
<cd:command name='stopproduct' value='stopprodukt'/>
@@ -1962,8 +2150,11 @@
<cd:command name='stopunpacked' value='stopnezhustene'/>
<cd:command name='stopversion' value='stopverze'/>
<cd:command name='stretched' value='roztazene'/>
+ <cd:command name='strictinspectnextcharacter' value='strictinspectnextcharacter'/>
+ <cd:command name='stripcharacter' value='stripcharacter'/>
<cd:command name='subformulanumber' value='cislopodrovnice'/>
<cd:command name='subpagenumber' value='subpagenumber'/>
+ <cd:command name='subtractfeature' value='subtractfeature'/>
<cd:command name='switchtobodyfont' value='prepninazakladnifont'/>
<cd:command name='switchtorawfont' value='switchtorawfont'/>
<cd:command name='sym' value='sym'/>
@@ -1973,16 +2164,24 @@
<cd:command name='synchronize' value='synchronizovat'/>
<cd:command name='tab' value='tab'/>
<cd:command name='testcolumn' value='testcolumn'/>
+ <cd:command name='testfeature' value='testfeature'/>
+ <cd:command name='testfeatureonce' value='testfeatureonce'/>
<cd:command name='testpage' value='testpage'/>
<cd:command name='tex' value='tex'/>
<cd:command name='textbackground' value='textbackground'/>
+ <cd:command name='textcolor' value='textcolor'/>
<cd:command name='textheight' value='vyskatextu'/>
+ <cd:command name='textnote' value='textnote'/>
<cd:command name='textreference' value='odkaznatext'/>
<cd:command name='textrule' value='textovalinka'/>
<cd:command name='textvariable' value='textvariable'/>
<cd:command name='textwidth' value='sirkatextu'/>
+ <cd:command name='thefirstcharacter' value='thefirstcharacter'/>
+ <cd:command name='thenormalizedbodyfontsize' value='thenormalizedbodyfontsize'/>
+ <cd:command name='theremainingcharacters' value='theremainingcharacters'/>
<cd:command name='thinrule' value='tenkalinka'/>
<cd:command name='thinrules' value='tenkelinky'/>
+ <cd:command name='tolinenote' value='tolinenote'/>
<cd:command name='tooltip' value='bublinkovanapoveda'/>
<cd:command name='topdistance' value='vzdalenosthorejsku'/>
<cd:command name='topheight' value='vyskahorejsku'/>
@@ -1993,13 +2192,19 @@
<cd:command name='typ' value='pis'/>
<cd:command name='type' value='opis'/>
<cd:command name='typebuffer' value='typebuffer'/>
+ <cd:command name='typedefinedbuffer' value='typedefinedbuffer'/>
<cd:command name='typefile' value='opissoubor'/>
+ <cd:command name='typeinlinebuffer' value='typeinlinebuffer'/>
+ <cd:command name='typing' value='typing'/>
<cd:command name='unitmeaning' value='vyznam'/>
<cd:command name='unknown' value='neznamo'/>
+ <cd:command name='unregisterhyphenationpattern' value='unregisterhyphenationpattern'/>
<cd:command name='useJSscripts' value='uzijJSscripts'/>
<cd:command name='useURL' value='uzijURL'/>
<cd:command name='useXMLfilter' value='useXMLfilter'/>
<cd:command name='useblocks' value='uzijbloky'/>
+ <cd:command name='usebodyfont' value='usebodyfont'/>
+ <cd:command name='usebodyfontparameter' value='usebodyfontparameter'/>
<cd:command name='usecommands' value='uzijprikazy'/>
<cd:command name='useencoding' value='uzijkodovani'/>
<cd:command name='useexternaldocument' value='uzijexternidokument'/>
@@ -2016,10 +2221,12 @@
<cd:command name='usetypescript' value='usetypescript'/>
<cd:command name='usetypescriptfile' value='usetypescriptfile'/>
<cd:command name='useurl' value='uzijurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='verze'/>
<cd:command name='vl' value='vl'/>
<cd:command name='weekday' value='vsedniden'/>
<cd:command name='whitespace' value='bilemisto'/>
+ <cd:command name='widthspanningtext' value='widthspanningtext'/>
<cd:command name='wordright' value='slovovpravo'/>
<cd:command name='writebetweenlist' value='zapismeziseznam'/>
<cd:command name='writetolist' value='zapisdoseznamu'/>
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-de.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-de.xml
index 42d6425447f..2f7d32e9fcc 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-de.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-de.xml
@@ -131,6 +131,9 @@
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='kap'/>
<cd:variable name='capital' value='versalien'/>
+ <cd:variable name='category' value='category'/>
+ <cd:variable name='cd:character' value='cd:character'/>
+ <cd:variable name='cd:font' value='cd:font'/>
<cd:variable name='center' value='center'/>
<cd:variable name='centerlast' value='centerlast'/>
<cd:variable name='chapter' value='kapitel'/>
@@ -189,6 +192,7 @@
<cd:variable name='external' value='extern'/>
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='gegeben'/>
+ <cd:variable name='fallback' value='fallback'/>
<cd:variable name='february' value='februar'/>
<cd:variable name='field' value='field'/>
<cd:variable name='figure' value='abbildung'/>
@@ -210,6 +214,7 @@
<cd:variable name='flushouter' value='flushouter'/>
<cd:variable name='flushright' value='flushright'/>
<cd:variable name='followingpage' value='followingpage'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='fusszeile'/>
<cd:variable name='footnote' value='fussnote'/>
<cd:variable name='force' value='zwinge'/>
@@ -281,6 +286,7 @@
<cd:variable name='intermezzo' value='intermezzo'/>
<cd:variable name='intext' value='imtext'/>
<cd:variable name='intro' value='intro'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='italic'/>
<cd:variable name='italicbold' value='italicfett'/>
<cd:variable name='item' value='pos'/>
@@ -384,6 +390,7 @@
<cd:variable name='nonumber' value='nonumber'/>
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='normal'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='nospacing'/>
<cd:variable name='nostopper' value='nostopper'/>
<cd:variable name='not' value='nicht'/>
@@ -451,6 +458,7 @@
<cd:variable name='rectangular' value='rechteckig'/>
<cd:variable name='reference' value='referenz'/>
<cd:variable name='referral' value='merkmal'/>
+ <cd:variable name='region' value='region'/>
<cd:variable name='register' value='register'/>
<cd:variable name='regular' value='regular'/>
<cd:variable name='relative' value='relativ'/>
@@ -635,6 +643,7 @@
<cd:constant name='afterkey' value='nachtaste'/>
<cd:constant name='aftersection' value='aftersection'/>
<cd:constant name='align' value='ausrichtung'/>
+ <cd:constant name='alignbottom' value='alignbottom'/>
<cd:constant name='aligncharacter' value='aligncharacter'/>
<cd:constant name='alignmentcharacter' value='alignmentcharacter'/>
<cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
@@ -771,6 +780,9 @@
<cd:constant name='deepnumbercommand' value='deepnumbercommand'/>
<cd:constant name='deeptextcommand' value='deeptextcommand'/>
<cd:constant name='default' value='default'/>
+ <cd:constant name='defaultheight' value='defaultheight'/>
+ <cd:constant name='defaultwidth' value='defaultwidth'/>
+ <cd:constant name='define' value='define'/>
<cd:constant name='delay' value='wartezeit'/>
<cd:constant name='depth' value='tiefe'/>
<cd:constant name='depthcorrection' value='tiefekorrektur'/>
@@ -810,8 +822,10 @@
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='faktor'/>
<cd:constant name='fallback' value='fallback'/>
+ <cd:constant name='fallbacks' value='fallbacks'/>
<cd:constant name='family' value='familie'/>
<cd:constant name='features' value='features'/>
+ <cd:constant name='featureset' value='featureset'/>
<cd:constant name='fences' value='fences'/>
<cd:constant name='field' value='field'/>
<cd:constant name='fieldbackgroundcolor' value='feldhintergrundfarbe'/>
@@ -832,6 +846,7 @@
<cd:constant name='focusin' value='focusin'/>
<cd:constant name='focusoffset' value='focusoffset'/>
<cd:constant name='focusout' value='focusout'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='fusszeile'/>
<cd:constant name='footerdistance' value='fusszeilenabstand'/>
<cd:constant name='footerstate' value='fusszeilenstatus'/>
@@ -886,6 +901,7 @@
<cd:constant name='increment' value='erhoehen'/>
<cd:constant name='incrementnumber' value='nummererhoehen'/>
<cd:constant name='indenting' value='einziehen'/>
+ <cd:constant name='indentlist' value='indentlist'/>
<cd:constant name='indentnext' value='ziehefolgendeein'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='indikator'/>
@@ -913,7 +929,10 @@
<cd:constant name='keys' value='keys'/>
<cd:constant name='keyword' value='keyword'/>
<cd:constant name='label' value='label'/>
+ <cd:constant name='labelalternative' value='labelalternative'/>
+ <cd:constant name='labelcolor' value='labelcolor'/>
<cd:constant name='labeloffset' value='labeloffset'/>
+ <cd:constant name='labelstyle' value='labelstyle'/>
<cd:constant name='language' value='language'/>
<cd:constant name='last' value='last'/>
<cd:constant name='lastnamesep' value='lastnamesep'/>
@@ -947,6 +966,7 @@
<cd:constant name='limittext' value='limittext'/>
<cd:constant name='line' value='zeile'/>
<cd:constant name='linecorrection' value='zeilekorrektur'/>
+ <cd:constant name='linedirection' value='linedirection'/>
<cd:constant name='lines' value='zeilen'/>
<cd:constant name='list' value='liste'/>
<cd:constant name='listtext' value='listtext'/>
@@ -1087,6 +1107,7 @@
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='platziere'/>
<cd:constant name='placehead' value='setzekopf'/>
+ <cd:constant name='placeholder' value='placeholder'/>
<cd:constant name='placestopper' value='setzetrenner'/>
<cd:constant name='position' value='position'/>
<cd:constant name='prefix' value='prefix'/>
@@ -1105,6 +1126,7 @@
<cd:constant name='print' value='print'/>
<cd:constant name='printable' value='druckbar'/>
<cd:constant name='process' value='process'/>
+ <cd:constant name='processors' value='processors'/>
<cd:constant name='profile' value='profile'/>
<cd:constant name='properties' value='properties'/>
<cd:constant name='pubsep' value='pubsep'/>
@@ -1118,6 +1140,7 @@
<cd:constant name='reference' value='referenz'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='referieren'/>
<cd:constant name='region' value='region'/>
<cd:constant name='regionin' value='regionin'/>
@@ -1362,7 +1385,6 @@
<!-- definitions for interface commands for language de -->
<cd:commands>
- <cd:command name='CAPPED' value='KAP'/>
<cd:command name='Character' value='Buchstabe'/>
<cd:command name='Characters' value='Buchstaben'/>
<cd:command name='MONTH' value='MONAT'/>
@@ -1376,8 +1398,18 @@
<cd:command name='Word' value='Wort'/>
<cd:command name='Words' value='Woerter'/>
<cd:command name='about' value='ueber'/>
+ <cd:command name='adaptfontfeature' value='adaptfontfeature'/>
<cd:command name='adaptlayout' value='passelayoutan'/>
+ <cd:command name='addfeature' value='addfeature'/>
+ <cd:command name='alignbottom' value='alignbottom'/>
+ <cd:command name='aligned' value='aligned'/>
+ <cd:command name='alignedbox' value='alignedbox'/>
+ <cd:command name='alignedline' value='alignedline'/>
+ <cd:command name='alignhere' value='alignhere'/>
<cd:command name='alignment' value='alignment'/>
+ <cd:command name='alignmentcharacter' value='alignmentcharacter'/>
+ <cd:command name='applytocharacters' value='applytocharacters'/>
+ <cd:command name='applytofirstcharacter' value='applytofirstcharacter'/>
<cd:command name='arg' value='arg'/>
<cd:command name='at' value='bei'/>
<cd:command name='atleftmargin' value='atleftmargin'/>
@@ -1389,9 +1421,13 @@
<cd:command name='blackrules' value='rechtecke'/>
<cd:command name='blank' value='blanko'/>
<cd:command name='bookmark' value='bookmark'/>
+ <cd:command name='bottombox' value='bottombox'/>
<cd:command name='bottomdistance' value='abstandunten'/>
<cd:command name='bottomheight' value='hoeheunten'/>
+ <cd:command name='bottomleftbox' value='bottomleftbox'/>
+ <cd:command name='bottomrightbox' value='bottomrightbox'/>
<cd:command name='bottomspace' value='bottomspace'/>
+ <cd:command name='buildtextbottomdot' value='buildtextbottomdot'/>
<cd:command name='but' value='but'/>
<cd:command name='button' value='knopf'/>
<cd:command name='bypassblocks' value='bypassblocks'/>
@@ -1430,8 +1466,11 @@
<cd:command name='defineblock' value='definiereblock'/>
<cd:command name='definebodyfont' value='definierefliesstext'/>
<cd:command name='definebodyfontenvironment' value='definierefliesstextumgebung'/>
+ <cd:command name='definebodyfontswitch' value='definebodyfontswitch'/>
<cd:command name='definebuffer' value='definierepuffer'/>
<cd:command name='definecharacter' value='definierezeichen'/>
+ <cd:command name='definecharacterkerning' value='definecharacterkerning'/>
+ <cd:command name='definecharacterspacing' value='definecharacterspacing'/>
<cd:command name='definecolor' value='definierefarbe'/>
<cd:command name='definecolorgroup' value='definierefarbengruppe'/>
<cd:command name='definecolumnbreak' value='definecolumnbreak'/>
@@ -1441,37 +1480,57 @@
<cd:command name='definecommand' value='definierebefehl'/>
<cd:command name='defineconversion' value='definierekonversion'/>
<cd:command name='definedescription' value='definierebeschreibung'/>
+ <cd:command name='definedfont' value='definedfont'/>
<cd:command name='defineenumeration' value='definierenummerierung'/>
+ <cd:command name='definefallbackfamily' value='definefallbackfamily'/>
<cd:command name='definefield' value='definierefeld'/>
<cd:command name='definefieldstack' value='definierefeldstapel'/>
<cd:command name='definefiguresymbol' value='definiereabbsymbol'/>
+ <cd:command name='definefilefallback' value='definefilefallback'/>
+ <cd:command name='definefirstline' value='definefirstline'/>
<cd:command name='definefloat' value='definieregleitobjekt'/>
<cd:command name='definefont' value='definiereschrift'/>
+ <cd:command name='definefontalternative' value='definefontalternative'/>
+ <cd:command name='definefontfallback' value='definefontfallback'/>
+ <cd:command name='definefontfamily' value='definefontfamily'/>
+ <cd:command name='definefontfamilypreset' value='definefontfamilypreset'/>
+ <cd:command name='definefontfeature' value='definefontfeature'/>
+ <cd:command name='definefontfile' value='definefontfile'/>
+ <cd:command name='definefontsize' value='definefontsize'/>
+ <cd:command name='definefontsolution' value='definefontsolution'/>
<cd:command name='definefontstyle' value='definiereschriftstil'/>
<cd:command name='definefontsynonym' value='defineschriftsynonym'/>
<cd:command name='defineframed' value='definiereumrahmt'/>
<cd:command name='defineframedtext' value='definiereumrahmtertext'/>
+ <cd:command name='definefrozenfont' value='definefrozenfont'/>
<cd:command name='definehbox' value='definierehbox'/>
<cd:command name='definehead' value='definiereueberschrift'/>
+ <cd:command name='definehyphenationfeatures' value='definehyphenationfeatures'/>
<cd:command name='defineindentedtext' value='defineindentedtext'/>
<cd:command name='defineinmargin' value='defineinmargin'/>
<cd:command name='defineinteractionmenu' value='definiereinteraktionsmenue'/>
<cd:command name='defineitemgroup' value='defineitemgroup'/>
+ <cd:command name='defineitems' value='defineitems'/>
<cd:command name='definelabel' value='definierelabel'/>
<cd:command name='definelayer' value='definelayer'/>
<cd:command name='definelayout' value='definelayout'/>
+ <cd:command name='definelinenote' value='definelinenote'/>
<cd:command name='definelist' value='definiereliste'/>
<cd:command name='definelogo' value='definierelogo'/>
<cd:command name='definemainfield' value='definierehauptfeld'/>
<cd:command name='definemakeup' value='definiereumbruch'/>
<cd:command name='definemarking' value='definierebeschriftung'/>
<cd:command name='definemathalignment' value='definemathalignment'/>
+ <cd:command name='definemode' value='definemode'/>
+ <cd:command name='definenamedcolor' value='definenamedcolor'/>
+ <cd:command name='definenote' value='definenote'/>
<cd:command name='defineoutput' value='defineoutput'/>
<cd:command name='defineoverlay' value='definiereoverlay'/>
<cd:command name='definepagebreak' value='definepagebreak'/>
<cd:command name='definepalet' value='definierepalette'/>
<cd:command name='definepapersize' value='definierepapierformat'/>
<cd:command name='defineparagraphs' value='definiereabsaetze'/>
+ <cd:command name='defineperiodkerning' value='defineperiodkerning'/>
<cd:command name='defineplacement' value='defineplacement'/>
<cd:command name='defineprofile' value='definiereprofil'/>
<cd:command name='defineprogram' value='definiereprogramme'/>
@@ -1493,33 +1552,45 @@
<cd:command name='definetabulate' value='definieretabulator'/>
<cd:command name='definetext' value='definieretext'/>
<cd:command name='definetextbackground' value='definetextbackground'/>
+ <cd:command name='definetextnote' value='definetextnote'/>
<cd:command name='definetextposition' value='definetextposition'/>
<cd:command name='definetextvariable' value='definetextvariable'/>
<cd:command name='definetype' value='definetype'/>
<cd:command name='definetyping' value='definieretippen'/>
<cd:command name='defineversion' value='definiereversion'/>
+ <cd:command name='depthspanningtext' value='depthspanningtext'/>
<cd:command name='determineheadnumber' value='bestimmekopfnummer'/>
<cd:command name='determinelistcharacteristics' value='bestimmelistencharakeristika'/>
<cd:command name='determineregistercharacteristics' value='bestimmeregistercharakteristika'/>
<cd:command name='dimension' value='dimension'/>
<cd:command name='disableinteractionmenu' value='inaktiviereinteraktionsmenue'/>
+ <cd:command name='disablemode' value='disablemode'/>
+ <cd:command name='doaddfeature' value='doaddfeature'/>
<cd:command name='domicile' value='wohnort'/>
+ <cd:command name='dontconvertfont' value='dontconvertfont'/>
<cd:command name='donttest' value='keintest'/>
<cd:command name='edgedistance' value='randabstand'/>
<cd:command name='edgewidth' value='randbreite'/>
+ <cd:command name='emphasisboldface' value='emphasisboldface'/>
<cd:command name='emptylines' value='emptylines'/>
+ <cd:command name='enablemode' value='enablemode'/>
<cd:command name='environment' value='umgebung'/>
<cd:command name='externalfigure' value='externeabbildung'/>
<cd:command name='fact' value='geg'/>
+ <cd:command name='fastswitchtobodyfont' value='fastswitchtobodyfont'/>
+ <cd:command name='feature' value='feature'/>
<cd:command name='field' value='feld'/>
<cd:command name='fieldstack' value='feldstapel'/>
<cd:command name='fillinfield' value='ausfuellfeld'/>
<cd:command name='fillinline' value='gefuelltezeile'/>
<cd:command name='fillinrules' value='gefuelltesrechteck'/>
<cd:command name='fillintext' value='ausfuelltext'/>
+ <cd:command name='firstcharacter' value='firstcharacter'/>
<cd:command name='fitfield' value='passendfeld'/>
+ <cd:command name='fittopbaselinegrid' value='fittopbaselinegrid'/>
<cd:command name='fixedspace' value='festesspatium'/>
<cd:command name='fixedspaces' value='festesspatium'/>
+ <cd:command name='flushnotes' value='flushnotes'/>
<cd:command name='followprofile' value='folgeprofil'/>
<cd:command name='followprofileversion' value='folgeprofilversion'/>
<cd:command name='followversion' value='folgeversion'/>
@@ -1528,13 +1599,19 @@
<cd:command name='footnote' value='fussnote'/>
<cd:command name='footnotetext' value='footnotetext'/>
<cd:command name='forceblocks' value='forceblocks'/>
+ <cd:command name='forcecharacterstripping' value='forcecharacterstripping'/>
<cd:command name='formulanumber' value='formelnummer'/>
<cd:command name='fraction' value='bruch'/>
<cd:command name='framed' value='umrahmt'/>
<cd:command name='from' value='von'/>
+ <cd:command name='fromlinenote' value='fromlinenote'/>
<cd:command name='getbuffer' value='holepuffer'/>
+ <cd:command name='getfirstcharacter' value='getfirstcharacter'/>
<cd:command name='getmarking' value='holebeschriftung'/>
<cd:command name='getnumber' value='getnumber'/>
+ <cd:command name='globaldisablemode' value='globaldisablemode'/>
+ <cd:command name='globalenablemode' value='globalenablemode'/>
+ <cd:command name='globalpreventmode' value='globalpreventmode'/>
<cd:command name='godown' value='nachunten'/>
<cd:command name='goto' value='zu'/>
<cd:command name='gotobox' value='zurbox'/>
@@ -1550,6 +1627,7 @@
<cd:command name='headnumber' value='kopfnummer'/>
<cd:command name='headsym' value='headsym'/>
<cd:command name='headtext' value='ueberschrifttext'/>
+ <cd:command name='heightspanningtext' value='heightspanningtext'/>
<cd:command name='hideblocks' value='verbergebloecke'/>
<cd:command name='high' value='hoch'/>
<cd:command name='hl' value='hl'/>
@@ -1581,26 +1659,37 @@
<cd:command name='interactionbuttons' value='interaktionsknopfe'/>
<cd:command name='interactionmenu' value='interaktionsmenue'/>
<cd:command name='item' value='pos'/>
+ <cd:command name='itemgroup' value='itemgroup'/>
<cd:command name='items' value='posten'/>
+ <cd:command name='itemtag' value='itemtag'/>
<cd:command name='its' value='its'/>
<cd:command name='keepblocks' value='behaltebloecke'/>
+ <cd:command name='kerncharacters' value='kerncharacters'/>
<cd:command name='label' value='label'/>
<cd:command name='labels' value='labels'/>
<cd:command name='labeltext' value='labeltext'/>
<cd:command name='language' value='sprache'/>
+ <cd:command name='languageCharacters' value='languageCharacters'/>
+ <cd:command name='languagecharacters' value='languagecharacters'/>
<cd:command name='leftaligned' value='linksbuendig'/>
+ <cd:command name='leftbottombox' value='leftbottombox'/>
<cd:command name='leftedgedistance' value='abstandlinkerrand'/>
<cd:command name='leftedgewidth' value='breitelinkerrand'/>
+ <cd:command name='leftline' value='leftline'/>
<cd:command name='leftmargindistance' value='linkemarginalafstand'/>
<cd:command name='leftmarginwidth' value='linkemarginalbreite'/>
<cd:command name='leg' value='leg'/>
<cd:command name='linecorrection' value='linecorrection'/>
+ <cd:command name='linenote' value='linenote'/>
+ <cd:command name='linespanningtext' value='linespanningtext'/>
<cd:command name='linewidth' value='liniendicke'/>
<cd:command name='listheight' value='listenhoehe'/>
<cd:command name='listlength' value='listenlaenge'/>
<cd:command name='listsymbol' value='listsymbol'/>
<cd:command name='listwidth' value='listenbreite'/>
+ <cd:command name='loadfontgoodies' value='loadfontgoodies'/>
<cd:command name='localfootnotes' value='localfootnotes'/>
+ <cd:command name='localnotes' value='localnotes'/>
<cd:command name='logfields' value='registrierefelder'/>
<cd:command name='lohi' value='tiho'/>
<cd:command name='low' value='tief'/>
@@ -1631,6 +1720,7 @@
<cd:command name='nodimension' value='keindimension'/>
<cd:command name='noheaderandfooterlines' value='keinekopfundfusszeilen'/>
<cd:command name='noindenting' value='nichteinziehen'/>
+ <cd:command name='noitem' value='noitem'/>
<cd:command name='nolist' value='keineliste'/>
<cd:command name='nomarking' value='keinebeschriftung'/>
<cd:command name='nomoreblocks' value='keinebloeckemehr'/>
@@ -1638,6 +1728,7 @@
<cd:command name='nop' value='nop'/>
<cd:command name='nospace' value='keinspatium'/>
<cd:command name='note' value='notiz'/>
+ <cd:command name='notesymbol' value='notesymbol'/>
<cd:command name='notopandbottomlines' value='keinzeilenobenundunten'/>
<cd:command name='notsmallcapped' value='nokap'/>
<cd:command name='nowhitespace' value='keinzwischenraum'/>
@@ -1649,6 +1740,7 @@
<cd:command name='outermarginwidth' value='outermarginwidth'/>
<cd:command name='packed' value='kleinerdurchschuss'/>
<cd:command name='page' value='seite'/>
+ <cd:command name='pagebreak' value='pagebreak'/>
<cd:command name='pagedepth' value='pagedepth'/>
<cd:command name='pagenumber' value='seitenummer'/>
<cd:command name='pageoffset' value='pageoffset'/>
@@ -1667,7 +1759,10 @@
<cd:command name='placelist' value='platziereliste'/>
<cd:command name='placelistofsynonyms' value='placelistofsynonyms'/>
<cd:command name='placelocalfootnotes' value='platzierelokalefussnoten'/>
+ <cd:command name='placelocalnotes' value='placelocalnotes'/>
<cd:command name='placelogos' value='platzierelogo'/>
+ <cd:command name='placenamedfloat' value='placenamedfloat'/>
+ <cd:command name='placenotes' value='placenotes'/>
<cd:command name='placeongrid' value='amgitterausrichten'/>
<cd:command name='placeontopofeachother' value='platziereuntereinander'/>
<cd:command name='placepagenumber' value='placepagenumber'/>
@@ -1680,9 +1775,17 @@
<cd:command name='placetextvariable' value='placetextvariable'/>
<cd:command name='position' value='position'/>
<cd:command name='positiontext' value='positiontext'/>
+ <cd:command name='postponenotes' value='postponenotes'/>
+ <cd:command name='postponingnotes' value='postponingnotes'/>
+ <cd:command name='predefinedfont' value='predefinedfont'/>
+ <cd:command name='predefinefont' value='predefinefont'/>
+ <cd:command name='presetdocument' value='presetdocument'/>
+ <cd:command name='prettyprintbuffer' value='prettyprintbuffer'/>
+ <cd:command name='preventmode' value='preventmode'/>
<cd:command name='printpaperheight' value='printpapierhoehe'/>
<cd:command name='printpaperwidth' value='printpapierbreite'/>
<cd:command name='processblocks' value='bearbeitebloecke'/>
+ <cd:command name='processbodyfontenvironmentlist' value='processbodyfontenvironmentlist'/>
<cd:command name='processpage' value='bearbeiteseite'/>
<cd:command name='product' value='produkt'/>
<cd:command name='program' value='programm'/>
@@ -1692,19 +1795,45 @@
<cd:command name='quote' value='zitieren'/>
<cd:command name='ran' value='ran'/>
<cd:command name='redo' value='wiederholen'/>
+ <cd:command name='redoconvertfont' value='redoconvertfont'/>
<cd:command name='ref' value='ref'/>
<cd:command name='reference' value='referenz'/>
<cd:command name='referral' value='verweis'/>
<cd:command name='referraldate' value='verweisdatum'/>
<cd:command name='referring' value='referieren'/>
+ <cd:command name='registerfontclass' value='registerfontclass'/>
+ <cd:command name='registerhyphenationexception' value='registerhyphenationexception'/>
+ <cd:command name='registerhyphenationpattern' value='registerhyphenationpattern'/>
<cd:command name='remark' value='bemerkung'/>
+ <cd:command name='replacefeature' value='replacefeature'/>
<cd:command name='reset' value='ruecksetzten'/>
+ <cd:command name='resetandaddfeature' value='resetandaddfeature'/>
+ <cd:command name='resetcharacteralign' value='resetcharacteralign'/>
+ <cd:command name='resetcharacterkerning' value='resetcharacterkerning'/>
+ <cd:command name='resetcharacterspacing' value='resetcharacterspacing'/>
+ <cd:command name='resetcharacterstripping' value='resetcharacterstripping'/>
+ <cd:command name='resetfeature' value='resetfeature'/>
+ <cd:command name='resetfontcolorsheme' value='resetfontcolorsheme'/>
+ <cd:command name='resetfontfallback' value='resetfontfallback'/>
+ <cd:command name='resetfontsolution' value='resetfontsolution'/>
+ <cd:command name='resethyphenationfeatures' value='resethyphenationfeatures'/>
+ <cd:command name='resetlocalfloats' value='resetlocalfloats'/>
<cd:command name='resetmarking' value='ruecksetztenbeschriftung'/>
+ <cd:command name='resetmode' value='resetmode'/>
<cd:command name='resetnumber' value='resetnumber'/>
- <cd:command name='resettext' value='resettextcontent'/>
+ <cd:command name='resetpath' value='resetpath'/>
+ <cd:command name='resetperiodkerning' value='resetperiodkerning'/>
+ <cd:command name='resetsystemmode' value='resetsystemmode'/>
+ <cd:command name='resettextcontent' value='resettextcontent'/>
+ <cd:command name='resetvisualizers' value='resetvisualizers'/>
+ <cd:command name='restoreglobalbodyfont' value='restoreglobalbodyfont'/>
+ <cd:command name='retestfeature' value='retestfeature'/>
+ <cd:command name='revivefeature' value='revivefeature'/>
<cd:command name='rightaligned' value='rechtsbuendig'/>
+ <cd:command name='rightbottombox' value='rightbottombox'/>
<cd:command name='rightedgedistance' value='abstandrechterrand'/>
<cd:command name='rightedgewidth' value='breiterechterrand'/>
+ <cd:command name='rightline' value='rightline'/>
<cd:command name='rightmargindistance' value='rechtemarginalafstand'/>
<cd:command name='rightmarginwidth' value='rechtemarginalbreite'/>
<cd:command name='romannumerals' value='roemischezahlen'/>
@@ -1715,12 +1844,38 @@
<cd:command name='selectblocks' value='waehlebloeckeaus'/>
<cd:command name='selectpaper' value='waehlepapieraus'/>
<cd:command name='selectversion' value='waehleversionaus'/>
+ <cd:command name='setbigbodyfont' value='setbigbodyfont'/>
+ <cd:command name='setcharacteralign' value='setcharacteralign'/>
+ <cd:command name='setcharacteraligndetail' value='setcharacteraligndetail'/>
+ <cd:command name='setcharactercasing' value='setcharactercasing'/>
+ <cd:command name='setcharactercleaning' value='setcharactercleaning'/>
+ <cd:command name='setcharacterkerning' value='setcharacterkerning'/>
+ <cd:command name='setcharacterspacing' value='setcharacterspacing'/>
+ <cd:command name='setcharacterstripping' value='setcharacterstripping'/>
+ <cd:command name='setcurrentfontclass' value='setcurrentfontclass'/>
+ <cd:command name='setfirstline' value='setfirstline'/>
+ <cd:command name='setfirstpasscharacteralign' value='setfirstpasscharacteralign'/>
+ <cd:command name='setfont' value='setfont'/>
+ <cd:command name='setfontcolorsheme' value='setfontcolorsheme'/>
+ <cd:command name='setfontfeature' value='setfontfeature'/>
+ <cd:command name='setfontsolution' value='setfontsolution'/>
+ <cd:command name='setfontstrut' value='setfontstrut'/>
+ <cd:command name='sethyphenationfeatures' value='sethyphenationfeatures'/>
+ <cd:command name='setmainbodyfont' value='setmainbodyfont'/>
+ <cd:command name='setmode' value='setmode'/>
+ <cd:command name='setnote' value='setnote'/>
+ <cd:command name='setnotetext' value='setnotetext'/>
<cd:command name='setnumber' value='setnumber'/>
+ <cd:command name='setperiodkerning' value='setperiodkerning'/>
+ <cd:command name='setsecondpasscharacteralign' value='setsecondpasscharacteralign'/>
+ <cd:command name='setsmallbodyfont' value='setsmallbodyfont'/>
+ <cd:command name='setsystemmode' value='setsystemmode'/>
<cd:command name='settextcontent' value='settext'/>
<cd:command name='settextvariable' value='settextvariable'/>
<cd:command name='setupalign' value='stelleausrichtungein'/>
<cd:command name='setupanswerarea' value='setupanswerarea'/>
<cd:command name='setuparranging' value='stelleanordnenein'/>
+ <cd:command name='setupattachment' value='setupattachment'/>
<cd:command name='setupbackground' value='stellehintergrundein'/>
<cd:command name='setupbackgrounds' value='stellehintergruendeein'/>
<cd:command name='setupblackrules' value='stellerechteckein'/>
@@ -1735,6 +1890,9 @@
<cd:command name='setupcapitals' value='stelleversalienein'/>
<cd:command name='setupcaption' value='stellebildunterschriftein'/>
<cd:command name='setupcaptions' value='stellebilderunterschriftein'/>
+ <cd:command name='setupcharacteralign' value='setupcharacteralign'/>
+ <cd:command name='setupcharacterkerning' value='setupcharacterkerning'/>
+ <cd:command name='setupcharacterspacing' value='setupcharacterspacing'/>
<cd:command name='setupclipping' value='stelleausschnittein'/>
<cd:command name='setupcolor' value='stellefarbeein'/>
<cd:command name='setupcolors' value='stellefarbenein'/>
@@ -1745,6 +1903,7 @@
<cd:command name='setupcombinations' value='stellekombinationein'/>
<cd:command name='setupcombinedlist' value='stellezusammengestelltelisteein'/>
<cd:command name='setupcomment' value='stellekommentarein'/>
+ <cd:command name='setupcounter' value='setupcounter'/>
<cd:command name='setupdescription' value='setupdescription'/>
<cd:command name='setupdescriptions' value='definierebeschreibungen'/>
<cd:command name='setupenumeration' value='setupenumeration'/>
@@ -1754,9 +1913,14 @@
<cd:command name='setupfields' value='stellefelderin'/>
<cd:command name='setupfillinlines' value='stellegefuelltezeileein'/>
<cd:command name='setupfillinrules' value='stellegefuelltesrechteckein'/>
+ <cd:command name='setupfirstline' value='setupfirstline'/>
<cd:command name='setupfloat' value='stellegleitobjektein'/>
<cd:command name='setupfloats' value='stellegleitobjekteein'/>
<cd:command name='setupfloatsplitting' value='stelleplatziegeteiltegleitobjekt'/>
+ <cd:command name='setupfontexpansion' value='setupfontexpansion'/>
+ <cd:command name='setupfontprotrusion' value='setupfontprotrusion'/>
+ <cd:command name='setupfonts' value='setupfonts'/>
+ <cd:command name='setupfontsolution' value='setupfontsolution'/>
<cd:command name='setupfooter' value='stellefusszeileein'/>
<cd:command name='setupfootertexts' value='stellefusszeilentextein'/>
<cd:command name='setupfootnotedefinition' value='stellefussnotendefinitionein'/>
@@ -1773,6 +1937,7 @@
<cd:command name='setupheadnumber' value='stellekopfzahlein'/>
<cd:command name='setupheads' value='stelleueberschriftenein'/>
<cd:command name='setupheadtext' value='stelleueberschrifttextein'/>
+ <cd:command name='setuphyphenation' value='setuphyphenation'/>
<cd:command name='setuphyphenmark' value='stellebindestrichein'/>
<cd:command name='setupindentedtext' value='setupindentedtext'/>
<cd:command name='setupindenting' value='stelleeinziehenein'/>
@@ -1789,6 +1954,7 @@
<cd:command name='setuplanguage' value='stellespracheein'/>
<cd:command name='setuplayout' value='stellelayoutein'/>
<cd:command name='setuplegend' value='stellelegendeein'/>
+ <cd:command name='setuplinenote' value='setuplinenote'/>
<cd:command name='setuplinenumbering' value='stellezeilennumerierungein'/>
<cd:command name='setuplines' value='stellezeilenein'/>
<cd:command name='setuplinewidth' value='stellelinienbreiteein'/>
@@ -1801,6 +1967,10 @@
<cd:command name='setupmarking' value='stellebeschriftungein'/>
<cd:command name='setupmathalignment' value='setupmathalignment'/>
<cd:command name='setupnarrower' value='stelleengerein'/>
+ <cd:command name='setupnotation' value='setupnotation'/>
+ <cd:command name='setupnotations' value='setupnotations'/>
+ <cd:command name='setupnote' value='setupnote'/>
+ <cd:command name='setupnotes' value='setupnotes'/>
<cd:command name='setupnumber' value='setupnumber'/>
<cd:command name='setupnumbering' value='stellenummerierungein'/>
<cd:command name='setupoppositeplacing' value='stellegegenueberplatzierenein'/>
@@ -1814,6 +1984,7 @@
<cd:command name='setuppapersize' value='stellepapierformatein'/>
<cd:command name='setupparagraphnumbering' value='stelleabsatznummerierungein'/>
<cd:command name='setupparagraphs' value='stelleabsaetzeein'/>
+ <cd:command name='setupperiodkerning' value='setupperiodkerning'/>
<cd:command name='setupplacement' value='setupplacement'/>
<cd:command name='setuppositioning' value='stellepositionierenein'/>
<cd:command name='setupprofiles' value='stelleprofilein'/>
@@ -1843,6 +2014,7 @@
<cd:command name='setuptabulate' value='stelletabulatorein'/>
<cd:command name='setuptext' value='stelletextein'/>
<cd:command name='setuptextbackground' value='setuptextbackground'/>
+ <cd:command name='setuptextnote' value='setuptextnote'/>
<cd:command name='setuptextposition' value='setuptextposition'/>
<cd:command name='setuptextrules' value='stelletextumrissein'/>
<cd:command name='setuptexttexts' value='stelletexttexteein'/>
@@ -1857,16 +2029,29 @@
<cd:command name='setupurl' value='stelleurlein'/>
<cd:command name='setupversions' value='stelleversionein'/>
<cd:command name='setupwhitespace' value='stellezwischenraumein'/>
+ <cd:command name='setvisualizerfont' value='setvisualizerfont'/>
<cd:command name='showbodyfont' value='zeigefliesstext'/>
<cd:command name='showbodyfontenvironment' value='zeigefliesstextumgebung'/>
<cd:command name='showcolor' value='zeigefarbe'/>
<cd:command name='showcolorgroup' value='zeigefarbengruppe'/>
+ <cd:command name='showcounter' value='showcounter'/>
<cd:command name='showexternalfigures' value='zeigeexterneabbildungen'/>
<cd:command name='showfields' value='zeigefelder'/>
+ <cd:command name='showfont' value='showfont'/>
+ <cd:command name='showfontdata' value='showfontdata'/>
+ <cd:command name='showfontexpansion' value='showfontexpansion'/>
+ <cd:command name='showfontitalics' value='showfontitalics'/>
+ <cd:command name='showfontkerns' value='showfontkerns'/>
+ <cd:command name='showfontparameters' value='showfontparameters'/>
+ <cd:command name='showfontstrip' value='showfontstrip'/>
+ <cd:command name='showfontstyle' value='showfontstyle'/>
<cd:command name='showframe' value='zeigerahmen'/>
<cd:command name='showgrid' value='zeigegitter'/>
+ <cd:command name='showhyphenationtrace' value='showhyphenationtrace'/>
+ <cd:command name='showkerning' value='showkerning'/>
<cd:command name='showlayout' value='zeigelayout'/>
<cd:command name='showmakeup' value='zeigeumbruch'/>
+ <cd:command name='showminimalbaseline' value='showminimalbaseline'/>
<cd:command name='showpalet' value='zeigepalette'/>
<cd:command name='showprint' value='zeigedruck'/>
<cd:command name='showsetups' value='zeigeeinstellungen'/>
@@ -1876,6 +2061,7 @@
<cd:command name='someline' value='einezeile'/>
<cd:command name='somewhere' value='irgendwo'/>
<cd:command name='space' value='spatium'/>
+ <cd:command name='specialitem' value='specialitem'/>
<cd:command name='splitfloat' value='teilegleitobjekt'/>
<cd:command name='startalignment' value='startausrichtung'/>
<cd:command name='startbackground' value='starthintergrund'/>
@@ -1893,6 +2079,7 @@
<cd:command name='startglobal' value='startglobal'/>
<cd:command name='startline' value='startzeile'/>
<cd:command name='startlinecorrection' value='startzeilenkorrektur'/>
+ <cd:command name='startlinenote' value='startlinenote'/>
<cd:command name='startlinenumbering' value='startzeilennumerierung'/>
<cd:command name='startlines' value='startzeilen'/>
<cd:command name='startlocal' value='startlokal'/>
@@ -1903,7 +2090,7 @@
<cd:command name='startnarrower' value='startenger'/>
<cd:command name='startopposite' value='startgegenueber'/>
<cd:command name='startoverlay' value='startoverlay'/>
- <cd:command name='startoverzicht' value='startueberblick'/>
+ <cd:command name='startoverview' value='startueberblick'/>
<cd:command name='startpacked' value='startkleinerdurchschuss'/>
<cd:command name='startpositioning' value='startpositionieren'/>
<cd:command name='startproduct' value='startprodukt'/>
@@ -1935,6 +2122,7 @@
<cd:command name='stopglobal' value='stopglobal'/>
<cd:command name='stopline' value='stopzeile'/>
<cd:command name='stoplinecorrection' value='stopzeilenkorrektur'/>
+ <cd:command name='stoplinenote' value='stoplinenote'/>
<cd:command name='stoplinenumbering' value='stopzeilennumerierung'/>
<cd:command name='stoplines' value='stopzeilen'/>
<cd:command name='stoplocal' value='stoplokal'/>
@@ -1945,7 +2133,7 @@
<cd:command name='stopnarrower' value='stopenger'/>
<cd:command name='stopopposite' value='stopgegenueber'/>
<cd:command name='stopoverlay' value='stopoverlay'/>
- <cd:command name='stopoverzicht' value='stopueberblick'/>
+ <cd:command name='stopoverview' value='stopueberblick'/>
<cd:command name='stoppacked' value='stopkleinerdurchschuss'/>
<cd:command name='stoppositioning' value='stoppositionieren'/>
<cd:command name='stopproduct' value='stopprodukt'/>
@@ -1962,8 +2150,11 @@
<cd:command name='stopunpacked' value='stopgrosserdurchschuss'/>
<cd:command name='stopversion' value='stopversion'/>
<cd:command name='stretched' value='gestreckt'/>
+ <cd:command name='strictinspectnextcharacter' value='strictinspectnextcharacter'/>
+ <cd:command name='stripcharacter' value='stripcharacter'/>
<cd:command name='subformulanumber' value='unterformelnummer'/>
<cd:command name='subpagenumber' value='subpagenumber'/>
+ <cd:command name='subtractfeature' value='subtractfeature'/>
<cd:command name='switchtobodyfont' value='wechselezumfliesstext'/>
<cd:command name='switchtorawfont' value='switchtorawfont'/>
<cd:command name='sym' value='sym'/>
@@ -1973,16 +2164,24 @@
<cd:command name='synchronize' value='synchronisieren'/>
<cd:command name='tab' value='tab'/>
<cd:command name='testcolumn' value='testcolumn'/>
+ <cd:command name='testfeature' value='testfeature'/>
+ <cd:command name='testfeatureonce' value='testfeatureonce'/>
<cd:command name='testpage' value='testpage'/>
<cd:command name='tex' value='tex'/>
<cd:command name='textbackground' value='textbackground'/>
+ <cd:command name='textcolor' value='textcolor'/>
<cd:command name='textheight' value='texthoehe'/>
+ <cd:command name='textnote' value='textnote'/>
<cd:command name='textreference' value='textreferenz'/>
<cd:command name='textrule' value='textlinie'/>
<cd:command name='textvariable' value='textvariable'/>
<cd:command name='textwidth' value='textbreite'/>
+ <cd:command name='thefirstcharacter' value='thefirstcharacter'/>
+ <cd:command name='thenormalizedbodyfontsize' value='thenormalizedbodyfontsize'/>
+ <cd:command name='theremainingcharacters' value='theremainingcharacters'/>
<cd:command name='thinrule' value='duennelinie'/>
<cd:command name='thinrules' value='duennerumriss'/>
+ <cd:command name='tolinenote' value='tolinenote'/>
<cd:command name='tooltip' value='tooltip'/>
<cd:command name='topdistance' value='abstandoben'/>
<cd:command name='topheight' value='hoeheoben'/>
@@ -1993,13 +2192,19 @@
<cd:command name='typ' value='tip'/>
<cd:command name='type' value='tippen'/>
<cd:command name='typebuffer' value='tippepuffer'/>
+ <cd:command name='typedefinedbuffer' value='typedefinedbuffer'/>
<cd:command name='typefile' value='tippedatei'/>
+ <cd:command name='typeinlinebuffer' value='typeinlinebuffer'/>
+ <cd:command name='typing' value='typing'/>
<cd:command name='unitmeaning' value='bedeutung'/>
<cd:command name='unknown' value='unbekant'/>
+ <cd:command name='unregisterhyphenationpattern' value='unregisterhyphenationpattern'/>
<cd:command name='useJSscripts' value='verwendeJSscript'/>
<cd:command name='useURL' value='verwendeURL'/>
<cd:command name='useXMLfilter' value='useXMLfilter'/>
<cd:command name='useblocks' value='verwendebloecke'/>
+ <cd:command name='usebodyfont' value='usebodyfont'/>
+ <cd:command name='usebodyfontparameter' value='usebodyfontparameter'/>
<cd:command name='usecommands' value='verwendebefehl'/>
<cd:command name='useencoding' value='benutzekodierung'/>
<cd:command name='useexternaldocument' value='verwendeexteresdokument'/>
@@ -2016,10 +2221,12 @@
<cd:command name='usetypescript' value='usetypescript'/>
<cd:command name='usetypescriptfile' value='usetypescriptfile'/>
<cd:command name='useurl' value='verwendeurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='version'/>
<cd:command name='vl' value='vl'/>
<cd:command name='weekday' value='wochentag'/>
<cd:command name='whitespace' value='zwischenraum'/>
+ <cd:command name='widthspanningtext' value='widthspanningtext'/>
<cd:command name='wordright' value='wortrechts'/>
<cd:command name='writebetweenlist' value='schreibezwischenliste'/>
<cd:command name='writetolist' value='schreibezurliste'/>
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-en.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-en.xml
index d8c5c9c8154..dc2cc49c30a 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-en.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-en.xml
@@ -131,6 +131,9 @@
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='cap'/>
<cd:variable name='capital' value='capital'/>
+ <cd:variable name='category' value='category'/>
+ <cd:variable name='cd:character' value='cd:character'/>
+ <cd:variable name='cd:font' value='cd:font'/>
<cd:variable name='center' value='center'/>
<cd:variable name='centerlast' value='centerlast'/>
<cd:variable name='chapter' value='chapter'/>
@@ -189,6 +192,7 @@
<cd:variable name='external' value='external'/>
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='fact'/>
+ <cd:variable name='fallback' value='fallback'/>
<cd:variable name='february' value='february'/>
<cd:variable name='field' value='field'/>
<cd:variable name='figure' value='figure'/>
@@ -210,6 +214,7 @@
<cd:variable name='flushouter' value='flushouter'/>
<cd:variable name='flushright' value='flushright'/>
<cd:variable name='followingpage' value='followingpage'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='footer'/>
<cd:variable name='footnote' value='footnote'/>
<cd:variable name='force' value='force'/>
@@ -281,6 +286,7 @@
<cd:variable name='intermezzo' value='intermezzo'/>
<cd:variable name='intext' value='intext'/>
<cd:variable name='intro' value='intro'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='italic'/>
<cd:variable name='italicbold' value='italicbold'/>
<cd:variable name='item' value='item'/>
@@ -384,6 +390,7 @@
<cd:variable name='nonumber' value='nonumber'/>
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='normal'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='nospacing'/>
<cd:variable name='nostopper' value='nostopper'/>
<cd:variable name='not' value='not'/>
@@ -451,6 +458,7 @@
<cd:variable name='rectangular' value='rectangular'/>
<cd:variable name='reference' value='reference'/>
<cd:variable name='referral' value='referral'/>
+ <cd:variable name='region' value='region'/>
<cd:variable name='register' value='register'/>
<cd:variable name='regular' value='regular'/>
<cd:variable name='relative' value='relative'/>
@@ -635,6 +643,7 @@
<cd:constant name='afterkey' value='afterkey'/>
<cd:constant name='aftersection' value='aftersection'/>
<cd:constant name='align' value='align'/>
+ <cd:constant name='alignbottom' value='alignbottom'/>
<cd:constant name='aligncharacter' value='aligncharacter'/>
<cd:constant name='alignmentcharacter' value='alignmentcharacter'/>
<cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
@@ -771,6 +780,7 @@
<cd:constant name='deepnumbercommand' value='deepnumbercommand'/>
<cd:constant name='deeptextcommand' value='deeptextcommand'/>
<cd:constant name='default' value='default'/>
+ <cd:constant name='define' value='define'/>
<cd:constant name='delay' value='delay'/>
<cd:constant name='depth' value='depth'/>
<cd:constant name='depthcorrection' value='depthcorrection'/>
@@ -810,8 +820,10 @@
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='factor'/>
<cd:constant name='fallback' value='fallback'/>
+ <cd:constant name='fallbacks' value='fallbacks'/>
<cd:constant name='family' value='family'/>
<cd:constant name='features' value='features'/>
+ <cd:constant name='featureset' value='featureset'/>
<cd:constant name='fences' value='fences'/>
<cd:constant name='field' value='field'/>
<cd:constant name='fieldbackgroundcolor' value='fieldbackgroundcolor'/>
@@ -832,6 +844,7 @@
<cd:constant name='focusin' value='focusin'/>
<cd:constant name='focusoffset' value='focusoffset'/>
<cd:constant name='focusout' value='focusout'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='footer'/>
<cd:constant name='footerdistance' value='footerdistance'/>
<cd:constant name='footerstate' value='footerstate'/>
@@ -886,6 +899,7 @@
<cd:constant name='increment' value='increment'/>
<cd:constant name='incrementnumber' value='incrementnumber'/>
<cd:constant name='indenting' value='indenting'/>
+ <cd:constant name='indentlist' value='indentlist'/>
<cd:constant name='indentnext' value='indentnext'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='indicator'/>
@@ -913,7 +927,10 @@
<cd:constant name='keys' value='keys'/>
<cd:constant name='keyword' value='keyword'/>
<cd:constant name='label' value='label'/>
+ <cd:constant name='labelalternative' value='labelalternative'/>
+ <cd:constant name='labelcolor' value='labelcolor'/>
<cd:constant name='labeloffset' value='labeloffset'/>
+ <cd:constant name='labelstyle' value='labelstyle'/>
<cd:constant name='language' value='language'/>
<cd:constant name='last' value='last'/>
<cd:constant name='lastnamesep' value='lastnamesep'/>
@@ -947,6 +964,7 @@
<cd:constant name='limittext' value='limittext'/>
<cd:constant name='line' value='line'/>
<cd:constant name='linecorrection' value='linecorrection'/>
+ <cd:constant name='linedirection' value='linedirection'/>
<cd:constant name='lines' value='lines'/>
<cd:constant name='list' value='list'/>
<cd:constant name='listtext' value='listtext'/>
@@ -1087,6 +1105,7 @@
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='place'/>
<cd:constant name='placehead' value='placehead'/>
+ <cd:constant name='placeholder' value='placeholder'/>
<cd:constant name='placestopper' value='placestopper'/>
<cd:constant name='position' value='position'/>
<cd:constant name='prefix' value='prefix'/>
@@ -1118,6 +1137,7 @@
<cd:constant name='reference' value='reference'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='referencing'/>
<cd:constant name='region' value='region'/>
<cd:constant name='regionin' value='regionin'/>
@@ -1362,7 +1382,6 @@
<!-- definitions for interface commands for language en -->
<cd:commands>
- <cd:command name='CAPPED' value='CAP'/>
<cd:command name='Character' value='Character'/>
<cd:command name='Characters' value='Characters'/>
<cd:command name='MONTH' value='MONTH'/>
@@ -1376,8 +1395,18 @@
<cd:command name='Word' value='Word'/>
<cd:command name='Words' value='Words'/>
<cd:command name='about' value='about'/>
+ <cd:command name='adaptfontfeature' value='adaptfontfeature'/>
<cd:command name='adaptlayout' value='adaptlayout'/>
+ <cd:command name='addfeature' value='addfeature'/>
+ <cd:command name='alignbottom' value='alignbottom'/>
+ <cd:command name='aligned' value='aligned'/>
+ <cd:command name='alignedbox' value='alignedbox'/>
+ <cd:command name='alignedline' value='alignedline'/>
+ <cd:command name='alignhere' value='alignhere'/>
<cd:command name='alignment' value='alignment'/>
+ <cd:command name='alignmentcharacter' value='alignmentcharacter'/>
+ <cd:command name='applytocharacters' value='applytocharacters'/>
+ <cd:command name='applytofirstcharacter' value='applytofirstcharacter'/>
<cd:command name='arg' value='arg'/>
<cd:command name='at' value='at'/>
<cd:command name='atleftmargin' value='atleftmargin'/>
@@ -1389,9 +1418,13 @@
<cd:command name='blackrules' value='blackrules'/>
<cd:command name='blank' value='blank'/>
<cd:command name='bookmark' value='bookmark'/>
+ <cd:command name='bottombox' value='bottombox'/>
<cd:command name='bottomdistance' value='bottomdistance'/>
<cd:command name='bottomheight' value='bottomheight'/>
+ <cd:command name='bottomleftbox' value='bottomleftbox'/>
+ <cd:command name='bottomrightbox' value='bottomrightbox'/>
<cd:command name='bottomspace' value='bottomspace'/>
+ <cd:command name='buildtextbottomdot' value='buildtextbottomdot'/>
<cd:command name='but' value='but'/>
<cd:command name='button' value='button'/>
<cd:command name='bypassblocks' value='bypassblocks'/>
@@ -1430,8 +1463,11 @@
<cd:command name='defineblock' value='defineblock'/>
<cd:command name='definebodyfont' value='definebodyfont'/>
<cd:command name='definebodyfontenvironment' value='definebodyfontenvironment'/>
+ <cd:command name='definebodyfontswitch' value='definebodyfontswitch'/>
<cd:command name='definebuffer' value='definebuffer'/>
<cd:command name='definecharacter' value='definecharacter'/>
+ <cd:command name='definecharacterkerning' value='definecharacterkerning'/>
+ <cd:command name='definecharacterspacing' value='definecharacterspacing'/>
<cd:command name='definecolor' value='definecolor'/>
<cd:command name='definecolorgroup' value='definecolorgroup'/>
<cd:command name='definecolumnbreak' value='definecolumnbreak'/>
@@ -1441,37 +1477,57 @@
<cd:command name='definecommand' value='definecommand'/>
<cd:command name='defineconversion' value='defineconversion'/>
<cd:command name='definedescription' value='definedescription'/>
+ <cd:command name='definedfont' value='definedfont'/>
<cd:command name='defineenumeration' value='defineenumeration'/>
+ <cd:command name='definefallbackfamily' value='definefallbackfamily'/>
<cd:command name='definefield' value='definefield'/>
<cd:command name='definefieldstack' value='definefieldstack'/>
<cd:command name='definefiguresymbol' value='definefiguresymbol'/>
+ <cd:command name='definefilefallback' value='definefilefallback'/>
+ <cd:command name='definefirstline' value='definefirstline'/>
<cd:command name='definefloat' value='definefloat'/>
<cd:command name='definefont' value='definefont'/>
+ <cd:command name='definefontalternative' value='definefontalternative'/>
+ <cd:command name='definefontfallback' value='definefontfallback'/>
+ <cd:command name='definefontfamily' value='definefontfamily'/>
+ <cd:command name='definefontfamilypreset' value='definefontfamilypreset'/>
+ <cd:command name='definefontfeature' value='definefontfeature'/>
+ <cd:command name='definefontfile' value='definefontfile'/>
+ <cd:command name='definefontsize' value='definefontsize'/>
+ <cd:command name='definefontsolution' value='definefontsolution'/>
<cd:command name='definefontstyle' value='definefontstyle'/>
<cd:command name='definefontsynonym' value='definefontsynonym'/>
<cd:command name='defineframed' value='defineframed'/>
<cd:command name='defineframedtext' value='defineframedtext'/>
+ <cd:command name='definefrozenfont' value='definefrozenfont'/>
<cd:command name='definehbox' value='definehbox'/>
<cd:command name='definehead' value='definehead'/>
+ <cd:command name='definehyphenationfeatures' value='definehyphenationfeatures'/>
<cd:command name='defineindentedtext' value='defineindentedtext'/>
<cd:command name='defineinmargin' value='defineinmargin'/>
<cd:command name='defineinteractionmenu' value='defineinteractionmenu'/>
<cd:command name='defineitemgroup' value='defineitemgroup'/>
+ <cd:command name='defineitems' value='defineitems'/>
<cd:command name='definelabel' value='definelabel'/>
<cd:command name='definelayer' value='definelayer'/>
<cd:command name='definelayout' value='definelayout'/>
+ <cd:command name='definelinenote' value='definelinenote'/>
<cd:command name='definelist' value='definelist'/>
<cd:command name='definelogo' value='definelogo'/>
<cd:command name='definemainfield' value='definemainfield'/>
<cd:command name='definemakeup' value='definemakeup'/>
<cd:command name='definemarking' value='definemarking'/>
<cd:command name='definemathalignment' value='definemathalignment'/>
+ <cd:command name='definemode' value='definemode'/>
+ <cd:command name='definenamedcolor' value='definenamedcolor'/>
+ <cd:command name='definenote' value='definenote'/>
<cd:command name='defineoutput' value='defineoutput'/>
<cd:command name='defineoverlay' value='defineoverlay'/>
<cd:command name='definepagebreak' value='definepagebreak'/>
<cd:command name='definepalet' value='definepalet'/>
<cd:command name='definepapersize' value='definepapersize'/>
<cd:command name='defineparagraphs' value='defineparagraphs'/>
+ <cd:command name='defineperiodkerning' value='defineperiodkerning'/>
<cd:command name='defineplacement' value='defineplacement'/>
<cd:command name='defineprofile' value='defineprofile'/>
<cd:command name='defineprogram' value='defineprogram'/>
@@ -1493,33 +1549,45 @@
<cd:command name='definetabulate' value='definetabulate'/>
<cd:command name='definetext' value='definetext'/>
<cd:command name='definetextbackground' value='definetextbackground'/>
+ <cd:command name='definetextnote' value='definetextnote'/>
<cd:command name='definetextposition' value='definetextposition'/>
<cd:command name='definetextvariable' value='definetextvariable'/>
<cd:command name='definetype' value='definetype'/>
<cd:command name='definetyping' value='definetyping'/>
<cd:command name='defineversion' value='defineversion'/>
+ <cd:command name='depthspanningtext' value='depthspanningtext'/>
<cd:command name='determineheadnumber' value='determineheadnumber'/>
<cd:command name='determinelistcharacteristics' value='determinelistcharacteristics'/>
<cd:command name='determineregistercharacteristics' value='determineregistercharacteristics'/>
<cd:command name='dimension' value='dimension'/>
<cd:command name='disableinteractionmenu' value='disableinteractionmenu'/>
+ <cd:command name='disablemode' value='disablemode'/>
+ <cd:command name='doaddfeature' value='doaddfeature'/>
<cd:command name='domicile' value='domicile'/>
+ <cd:command name='dontconvertfont' value='dontconvertfont'/>
<cd:command name='donttest' value='donttest'/>
<cd:command name='edgedistance' value='edgedistance'/>
<cd:command name='edgewidth' value='edgewidth'/>
+ <cd:command name='emphasisboldface' value='emphasisboldface'/>
<cd:command name='emptylines' value='emptylines'/>
+ <cd:command name='enablemode' value='enablemode'/>
<cd:command name='environment' value='environment'/>
<cd:command name='externalfigure' value='externalfigure'/>
<cd:command name='fact' value='fact'/>
+ <cd:command name='fastswitchtobodyfont' value='fastswitchtobodyfont'/>
+ <cd:command name='feature' value='feature'/>
<cd:command name='field' value='field'/>
<cd:command name='fieldstack' value='fieldstack'/>
<cd:command name='fillinfield' value='fillinfield'/>
<cd:command name='fillinline' value='fillinline'/>
<cd:command name='fillinrules' value='fillinrules'/>
<cd:command name='fillintext' value='fillintext'/>
+ <cd:command name='firstcharacter' value='firstcharacter'/>
<cd:command name='fitfield' value='fitfield'/>
+ <cd:command name='fittopbaselinegrid' value='fittopbaselinegrid'/>
<cd:command name='fixedspace' value='fixedspace'/>
<cd:command name='fixedspaces' value='fixedspaces'/>
+ <cd:command name='flushnotes' value='flushnotes'/>
<cd:command name='followprofile' value='followprofile'/>
<cd:command name='followprofileversion' value='followprofileversion'/>
<cd:command name='followversion' value='followversion'/>
@@ -1528,13 +1596,19 @@
<cd:command name='footnote' value='footnote'/>
<cd:command name='footnotetext' value='footnotetext'/>
<cd:command name='forceblocks' value='forceblocks'/>
+ <cd:command name='forcecharacterstripping' value='forcecharacterstripping'/>
<cd:command name='formulanumber' value='formulanumber'/>
<cd:command name='fraction' value='fraction'/>
<cd:command name='framed' value='framed'/>
<cd:command name='from' value='from'/>
+ <cd:command name='fromlinenote' value='fromlinenote'/>
<cd:command name='getbuffer' value='getbuffer'/>
+ <cd:command name='getfirstcharacter' value='getfirstcharacter'/>
<cd:command name='getmarking' value='getmarking'/>
<cd:command name='getnumber' value='getnumber'/>
+ <cd:command name='globaldisablemode' value='globaldisablemode'/>
+ <cd:command name='globalenablemode' value='globalenablemode'/>
+ <cd:command name='globalpreventmode' value='globalpreventmode'/>
<cd:command name='godown' value='godown'/>
<cd:command name='goto' value='goto'/>
<cd:command name='gotobox' value='gotobox'/>
@@ -1550,6 +1624,7 @@
<cd:command name='headnumber' value='headnumber'/>
<cd:command name='headsym' value='headsym'/>
<cd:command name='headtext' value='headtext'/>
+ <cd:command name='heightspanningtext' value='heightspanningtext'/>
<cd:command name='hideblocks' value='hideblocks'/>
<cd:command name='high' value='high'/>
<cd:command name='hl' value='hl'/>
@@ -1581,26 +1656,37 @@
<cd:command name='interactionbuttons' value='interactionbuttons'/>
<cd:command name='interactionmenu' value='interactionmenu'/>
<cd:command name='item' value='item'/>
+ <cd:command name='itemgroup' value='itemgroup'/>
<cd:command name='items' value='items'/>
+ <cd:command name='itemtag' value='itemtag'/>
<cd:command name='its' value='its'/>
<cd:command name='keepblocks' value='keepblocks'/>
+ <cd:command name='kerncharacters' value='kerncharacters'/>
<cd:command name='label' value='label'/>
<cd:command name='labels' value='labels'/>
<cd:command name='labeltext' value='labeltext'/>
<cd:command name='language' value='language'/>
+ <cd:command name='languageCharacters' value='languageCharacters'/>
+ <cd:command name='languagecharacters' value='languagecharacters'/>
<cd:command name='leftaligned' value='leftaligned'/>
+ <cd:command name='leftbottombox' value='leftbottombox'/>
<cd:command name='leftedgedistance' value='leftedgedistance'/>
<cd:command name='leftedgewidth' value='leftedgewidth'/>
+ <cd:command name='leftline' value='leftline'/>
<cd:command name='leftmargindistance' value='leftmargindistance'/>
<cd:command name='leftmarginwidth' value='leftmarginwidth'/>
<cd:command name='leg' value='leg'/>
<cd:command name='linecorrection' value='linecorrection'/>
+ <cd:command name='linenote' value='linenote'/>
+ <cd:command name='linespanningtext' value='linespanningtext'/>
<cd:command name='linewidth' value='linethickness'/>
<cd:command name='listheight' value='listheight'/>
<cd:command name='listlength' value='listlength'/>
<cd:command name='listsymbol' value='listsymbol'/>
<cd:command name='listwidth' value='listwidth'/>
+ <cd:command name='loadfontgoodies' value='loadfontgoodies'/>
<cd:command name='localfootnotes' value='localfootnotes'/>
+ <cd:command name='localnotes' value='localnotes'/>
<cd:command name='logfields' value='logfields'/>
<cd:command name='lohi' value='lohi'/>
<cd:command name='low' value='low'/>
@@ -1631,6 +1717,7 @@
<cd:command name='nodimension' value='nodimension'/>
<cd:command name='noheaderandfooterlines' value='noheaderandfooterlines'/>
<cd:command name='noindenting' value='noindenting'/>
+ <cd:command name='noitem' value='noitem'/>
<cd:command name='nolist' value='nolist'/>
<cd:command name='nomarking' value='nomarking'/>
<cd:command name='nomoreblocks' value='nomoreblocks'/>
@@ -1638,6 +1725,7 @@
<cd:command name='nop' value='nop'/>
<cd:command name='nospace' value='nospace'/>
<cd:command name='note' value='note'/>
+ <cd:command name='notesymbol' value='notesymbol'/>
<cd:command name='notopandbottomlines' value='notopandbottomlines'/>
<cd:command name='notsmallcapped' value='nocap'/>
<cd:command name='nowhitespace' value='nowhitespace'/>
@@ -1649,6 +1737,7 @@
<cd:command name='outermarginwidth' value='outermarginwidth'/>
<cd:command name='packed' value='packed'/>
<cd:command name='page' value='page'/>
+ <cd:command name='pagebreak' value='pagebreak'/>
<cd:command name='pagedepth' value='pagedepth'/>
<cd:command name='pagenumber' value='pagenumber'/>
<cd:command name='pageoffset' value='pageoffset'/>
@@ -1667,7 +1756,10 @@
<cd:command name='placelist' value='placelist'/>
<cd:command name='placelistofsynonyms' value='placelistofsynonyms'/>
<cd:command name='placelocalfootnotes' value='placelocalfootnotes'/>
+ <cd:command name='placelocalnotes' value='placelocalnotes'/>
<cd:command name='placelogos' value='placelogos'/>
+ <cd:command name='placenamedfloat' value='placenamedfloat'/>
+ <cd:command name='placenotes' value='placenotes'/>
<cd:command name='placeongrid' value='placeongrid'/>
<cd:command name='placeontopofeachother' value='placeontopofeachother'/>
<cd:command name='placepagenumber' value='placepagenumber'/>
@@ -1680,9 +1772,17 @@
<cd:command name='placetextvariable' value='placetextvariable'/>
<cd:command name='position' value='position'/>
<cd:command name='positiontext' value='positiontext'/>
+ <cd:command name='postponenotes' value='postponenotes'/>
+ <cd:command name='postponingnotes' value='postponingnotes'/>
+ <cd:command name='predefinedfont' value='predefinedfont'/>
+ <cd:command name='predefinefont' value='predefinefont'/>
+ <cd:command name='presetdocument' value='presetdocument'/>
+ <cd:command name='prettyprintbuffer' value='prettyprintbuffer'/>
+ <cd:command name='preventmode' value='preventmode'/>
<cd:command name='printpaperheight' value='printpaperheight'/>
<cd:command name='printpaperwidth' value='printpaperwidth'/>
<cd:command name='processblocks' value='processblocks'/>
+ <cd:command name='processbodyfontenvironmentlist' value='processbodyfontenvironmentlist'/>
<cd:command name='processpage' value='processpage'/>
<cd:command name='product' value='product'/>
<cd:command name='program' value='program'/>
@@ -1692,19 +1792,45 @@
<cd:command name='quote' value='quote'/>
<cd:command name='ran' value='ran'/>
<cd:command name='redo' value='redo'/>
+ <cd:command name='redoconvertfont' value='redoconvertfont'/>
<cd:command name='ref' value='ref'/>
<cd:command name='reference' value='reference'/>
<cd:command name='referral' value='referral'/>
<cd:command name='referraldate' value='referraldate'/>
<cd:command name='referring' value='referring'/>
+ <cd:command name='registerfontclass' value='registerfontclass'/>
+ <cd:command name='registerhyphenationexception' value='registerhyphenationexception'/>
+ <cd:command name='registerhyphenationpattern' value='registerhyphenationpattern'/>
<cd:command name='remark' value='remark'/>
+ <cd:command name='replacefeature' value='replacefeature'/>
<cd:command name='reset' value='reset'/>
+ <cd:command name='resetandaddfeature' value='resetandaddfeature'/>
+ <cd:command name='resetcharacteralign' value='resetcharacteralign'/>
+ <cd:command name='resetcharacterkerning' value='resetcharacterkerning'/>
+ <cd:command name='resetcharacterspacing' value='resetcharacterspacing'/>
+ <cd:command name='resetcharacterstripping' value='resetcharacterstripping'/>
+ <cd:command name='resetfeature' value='resetfeature'/>
+ <cd:command name='resetfontcolorsheme' value='resetfontcolorsheme'/>
+ <cd:command name='resetfontfallback' value='resetfontfallback'/>
+ <cd:command name='resetfontsolution' value='resetfontsolution'/>
+ <cd:command name='resethyphenationfeatures' value='resethyphenationfeatures'/>
+ <cd:command name='resetlocalfloats' value='resetlocalfloats'/>
<cd:command name='resetmarking' value='resetmarking'/>
+ <cd:command name='resetmode' value='resetmode'/>
<cd:command name='resetnumber' value='resetnumber'/>
- <cd:command name='resettext' value='resettextcontent'/>
+ <cd:command name='resetpath' value='resetpath'/>
+ <cd:command name='resetperiodkerning' value='resetperiodkerning'/>
+ <cd:command name='resetsystemmode' value='resetsystemmode'/>
+ <cd:command name='resettextcontent' value='resettextcontent'/>
+ <cd:command name='resetvisualizers' value='resetvisualizers'/>
+ <cd:command name='restoreglobalbodyfont' value='restoreglobalbodyfont'/>
+ <cd:command name='retestfeature' value='retestfeature'/>
+ <cd:command name='revivefeature' value='revivefeature'/>
<cd:command name='rightaligned' value='rightaligned'/>
+ <cd:command name='rightbottombox' value='rightbottombox'/>
<cd:command name='rightedgedistance' value='rightedgedistance'/>
<cd:command name='rightedgewidth' value='rightedgewidth'/>
+ <cd:command name='rightline' value='rightline'/>
<cd:command name='rightmargindistance' value='rightmargindistance'/>
<cd:command name='rightmarginwidth' value='rightmarginwidth'/>
<cd:command name='romannumerals' value='romannumerals'/>
@@ -1715,12 +1841,38 @@
<cd:command name='selectblocks' value='selectblocks'/>
<cd:command name='selectpaper' value='selectpaper'/>
<cd:command name='selectversion' value='selectversion'/>
+ <cd:command name='setbigbodyfont' value='setbigbodyfont'/>
+ <cd:command name='setcharacteralign' value='setcharacteralign'/>
+ <cd:command name='setcharacteraligndetail' value='setcharacteraligndetail'/>
+ <cd:command name='setcharactercasing' value='setcharactercasing'/>
+ <cd:command name='setcharactercleaning' value='setcharactercleaning'/>
+ <cd:command name='setcharacterkerning' value='setcharacterkerning'/>
+ <cd:command name='setcharacterspacing' value='setcharacterspacing'/>
+ <cd:command name='setcharacterstripping' value='setcharacterstripping'/>
+ <cd:command name='setcurrentfontclass' value='setcurrentfontclass'/>
+ <cd:command name='setfirstline' value='setfirstline'/>
+ <cd:command name='setfirstpasscharacteralign' value='setfirstpasscharacteralign'/>
+ <cd:command name='setfont' value='setfont'/>
+ <cd:command name='setfontcolorsheme' value='setfontcolorsheme'/>
+ <cd:command name='setfontfeature' value='setfontfeature'/>
+ <cd:command name='setfontsolution' value='setfontsolution'/>
+ <cd:command name='setfontstrut' value='setfontstrut'/>
+ <cd:command name='sethyphenationfeatures' value='sethyphenationfeatures'/>
+ <cd:command name='setmainbodyfont' value='setmainbodyfont'/>
+ <cd:command name='setmode' value='setmode'/>
+ <cd:command name='setnote' value='setnote'/>
+ <cd:command name='setnotetext' value='setnotetext'/>
<cd:command name='setnumber' value='setnumber'/>
+ <cd:command name='setperiodkerning' value='setperiodkerning'/>
+ <cd:command name='setsecondpasscharacteralign' value='setsecondpasscharacteralign'/>
+ <cd:command name='setsmallbodyfont' value='setsmallbodyfont'/>
+ <cd:command name='setsystemmode' value='setsystemmode'/>
<cd:command name='settextcontent' value='settextcontent'/>
<cd:command name='settextvariable' value='settextvariable'/>
<cd:command name='setupalign' value='setupalign'/>
<cd:command name='setupanswerarea' value='setupanswerarea'/>
<cd:command name='setuparranging' value='setuparranging'/>
+ <cd:command name='setupattachment' value='setupattachment'/>
<cd:command name='setupbackground' value='setupbackground'/>
<cd:command name='setupbackgrounds' value='setupbackgrounds'/>
<cd:command name='setupblackrules' value='setupblackrules'/>
@@ -1735,6 +1887,9 @@
<cd:command name='setupcapitals' value='setupcapitals'/>
<cd:command name='setupcaption' value='setupcaption'/>
<cd:command name='setupcaptions' value='setupcaptions'/>
+ <cd:command name='setupcharacteralign' value='setupcharacteralign'/>
+ <cd:command name='setupcharacterkerning' value='setupcharacterkerning'/>
+ <cd:command name='setupcharacterspacing' value='setupcharacterspacing'/>
<cd:command name='setupclipping' value='setupclipping'/>
<cd:command name='setupcolor' value='setupcolor'/>
<cd:command name='setupcolors' value='setupcolors'/>
@@ -1745,6 +1900,7 @@
<cd:command name='setupcombinations' value='setupcombinations'/>
<cd:command name='setupcombinedlist' value='setupcombinedlist'/>
<cd:command name='setupcomment' value='setupcomment'/>
+ <cd:command name='setupcounter' value='setupcounter'/>
<cd:command name='setupdescription' value='setupdescription'/>
<cd:command name='setupdescriptions' value='setupdescriptions'/>
<cd:command name='setupenumeration' value='setupenumeration'/>
@@ -1754,9 +1910,14 @@
<cd:command name='setupfields' value='setupfields'/>
<cd:command name='setupfillinlines' value='setupfillinlines'/>
<cd:command name='setupfillinrules' value='setupfillinrules'/>
+ <cd:command name='setupfirstline' value='setupfirstline'/>
<cd:command name='setupfloat' value='setupfloat'/>
<cd:command name='setupfloats' value='setupfloats'/>
<cd:command name='setupfloatsplitting' value='setupfloatsplitting'/>
+ <cd:command name='setupfontexpansion' value='setupfontexpansion'/>
+ <cd:command name='setupfontprotrusion' value='setupfontprotrusion'/>
+ <cd:command name='setupfonts' value='setupfonts'/>
+ <cd:command name='setupfontsolution' value='setupfontsolution'/>
<cd:command name='setupfooter' value='setupfooter'/>
<cd:command name='setupfootertexts' value='setupfootertexts'/>
<cd:command name='setupfootnotedefinition' value='setupfootnotedefinition'/>
@@ -1773,6 +1934,7 @@
<cd:command name='setupheadnumber' value='setupheadnumber'/>
<cd:command name='setupheads' value='setupheads'/>
<cd:command name='setupheadtext' value='setupheadtext'/>
+ <cd:command name='setuphyphenation' value='setuphyphenation'/>
<cd:command name='setuphyphenmark' value='setuphyphenmark'/>
<cd:command name='setupindentedtext' value='setupindentedtext'/>
<cd:command name='setupindenting' value='setupindenting'/>
@@ -1789,6 +1951,7 @@
<cd:command name='setuplanguage' value='setuplanguage'/>
<cd:command name='setuplayout' value='setuplayout'/>
<cd:command name='setuplegend' value='setuplegend'/>
+ <cd:command name='setuplinenote' value='setuplinenote'/>
<cd:command name='setuplinenumbering' value='setuplinenumbering'/>
<cd:command name='setuplines' value='setuplines'/>
<cd:command name='setuplinewidth' value='setuplinewidth'/>
@@ -1801,6 +1964,10 @@
<cd:command name='setupmarking' value='setupmarking'/>
<cd:command name='setupmathalignment' value='setupmathalignment'/>
<cd:command name='setupnarrower' value='setupnarrower'/>
+ <cd:command name='setupnotation' value='setupnotation'/>
+ <cd:command name='setupnotations' value='setupnotations'/>
+ <cd:command name='setupnote' value='setupnote'/>
+ <cd:command name='setupnotes' value='setupnotes'/>
<cd:command name='setupnumber' value='setupnumber'/>
<cd:command name='setupnumbering' value='setupnumbering'/>
<cd:command name='setupoppositeplacing' value='setupoppositeplacing'/>
@@ -1814,6 +1981,7 @@
<cd:command name='setuppapersize' value='setuppapersize'/>
<cd:command name='setupparagraphnumbering' value='setupparagraphnumbering'/>
<cd:command name='setupparagraphs' value='setupparagraphs'/>
+ <cd:command name='setupperiodkerning' value='setupperiodkerning'/>
<cd:command name='setupplacement' value='setupplacement'/>
<cd:command name='setuppositioning' value='setuppositioning'/>
<cd:command name='setupprofiles' value='setupprofiles'/>
@@ -1843,6 +2011,7 @@
<cd:command name='setuptabulate' value='setuptabulate'/>
<cd:command name='setuptext' value='setuptext'/>
<cd:command name='setuptextbackground' value='setuptextbackground'/>
+ <cd:command name='setuptextnote' value='setuptextnote'/>
<cd:command name='setuptextposition' value='setuptextposition'/>
<cd:command name='setuptextrules' value='setuptextrules'/>
<cd:command name='setuptexttexts' value='setuptexttexts'/>
@@ -1857,16 +2026,29 @@
<cd:command name='setupurl' value='setupurl'/>
<cd:command name='setupversions' value='setupversions'/>
<cd:command name='setupwhitespace' value='setupwhitespace'/>
+ <cd:command name='setvisualizerfont' value='setvisualizerfont'/>
<cd:command name='showbodyfont' value='showbodyfont'/>
<cd:command name='showbodyfontenvironment' value='showbodyfontenvironment'/>
<cd:command name='showcolor' value='showcolor'/>
<cd:command name='showcolorgroup' value='showcolorgroup'/>
+ <cd:command name='showcounter' value='showcounter'/>
<cd:command name='showexternalfigures' value='showexternalfigures'/>
<cd:command name='showfields' value='showfields'/>
+ <cd:command name='showfont' value='showfont'/>
+ <cd:command name='showfontdata' value='showfontdata'/>
+ <cd:command name='showfontexpansion' value='showfontexpansion'/>
+ <cd:command name='showfontitalics' value='showfontitalics'/>
+ <cd:command name='showfontkerns' value='showfontkerns'/>
+ <cd:command name='showfontparameters' value='showfontparameters'/>
+ <cd:command name='showfontstrip' value='showfontstrip'/>
+ <cd:command name='showfontstyle' value='showfontstyle'/>
<cd:command name='showframe' value='showframe'/>
<cd:command name='showgrid' value='showgrid'/>
+ <cd:command name='showhyphenationtrace' value='showhyphenationtrace'/>
+ <cd:command name='showkerning' value='showkerning'/>
<cd:command name='showlayout' value='showlayout'/>
<cd:command name='showmakeup' value='showmakeup'/>
+ <cd:command name='showminimalbaseline' value='showminimalbaseline'/>
<cd:command name='showpalet' value='showpalet'/>
<cd:command name='showprint' value='showprint'/>
<cd:command name='showsetups' value='showsetups'/>
@@ -1876,6 +2058,7 @@
<cd:command name='someline' value='someline'/>
<cd:command name='somewhere' value='somewhere'/>
<cd:command name='space' value='space'/>
+ <cd:command name='specialitem' value='specialitem'/>
<cd:command name='splitfloat' value='splitfloat'/>
<cd:command name='startalignment' value='startalignment'/>
<cd:command name='startbackground' value='startbackground'/>
@@ -1893,6 +2076,7 @@
<cd:command name='startglobal' value='startglobal'/>
<cd:command name='startline' value='startline'/>
<cd:command name='startlinecorrection' value='startlinecorrection'/>
+ <cd:command name='startlinenote' value='startlinenote'/>
<cd:command name='startlinenumbering' value='startlinenumbering'/>
<cd:command name='startlines' value='startlines'/>
<cd:command name='startlocal' value='startlocal'/>
@@ -1903,7 +2087,7 @@
<cd:command name='startnarrower' value='startnarrower'/>
<cd:command name='startopposite' value='startopposite'/>
<cd:command name='startoverlay' value='startoverlay'/>
- <cd:command name='startoverzicht' value='startoverview'/>
+ <cd:command name='startoverview' value='startoverview'/>
<cd:command name='startpacked' value='startpacked'/>
<cd:command name='startpositioning' value='startpositioning'/>
<cd:command name='startproduct' value='startproduct'/>
@@ -1935,6 +2119,7 @@
<cd:command name='stopglobal' value='stopglobal'/>
<cd:command name='stopline' value='stopline'/>
<cd:command name='stoplinecorrection' value='stoplinecorrection'/>
+ <cd:command name='stoplinenote' value='stoplinenote'/>
<cd:command name='stoplinenumbering' value='stoplinenumbering'/>
<cd:command name='stoplines' value='stoplines'/>
<cd:command name='stoplocal' value='stoplocal'/>
@@ -1945,7 +2130,7 @@
<cd:command name='stopnarrower' value='stopnarrower'/>
<cd:command name='stopopposite' value='stopopposite'/>
<cd:command name='stopoverlay' value='stopoverlay'/>
- <cd:command name='stopoverzicht' value='stopoverview'/>
+ <cd:command name='stopoverview' value='stopoverview'/>
<cd:command name='stoppacked' value='stoppacked'/>
<cd:command name='stoppositioning' value='stoppositioning'/>
<cd:command name='stopproduct' value='stopproduct'/>
@@ -1962,8 +2147,11 @@
<cd:command name='stopunpacked' value='stopunpacked'/>
<cd:command name='stopversion' value='stopversion'/>
<cd:command name='stretched' value='stretched'/>
+ <cd:command name='strictinspectnextcharacter' value='strictinspectnextcharacter'/>
+ <cd:command name='stripcharacter' value='stripcharacter'/>
<cd:command name='subformulanumber' value='subformulanumber'/>
<cd:command name='subpagenumber' value='subpagenumber'/>
+ <cd:command name='subtractfeature' value='subtractfeature'/>
<cd:command name='switchtobodyfont' value='switchtobodyfont'/>
<cd:command name='switchtorawfont' value='switchtorawfont'/>
<cd:command name='sym' value='sym'/>
@@ -1973,16 +2161,24 @@
<cd:command name='synchronize' value='synchronize'/>
<cd:command name='tab' value='tab'/>
<cd:command name='testcolumn' value='testcolumn'/>
+ <cd:command name='testfeature' value='testfeature'/>
+ <cd:command name='testfeatureonce' value='testfeatureonce'/>
<cd:command name='testpage' value='testpage'/>
<cd:command name='tex' value='tex'/>
<cd:command name='textbackground' value='textbackground'/>
+ <cd:command name='textcolor' value='textcolor'/>
<cd:command name='textheight' value='textheight'/>
+ <cd:command name='textnote' value='textnote'/>
<cd:command name='textreference' value='textreference'/>
<cd:command name='textrule' value='textrule'/>
<cd:command name='textvariable' value='textvariable'/>
<cd:command name='textwidth' value='textwidth'/>
+ <cd:command name='thefirstcharacter' value='thefirstcharacter'/>
+ <cd:command name='thenormalizedbodyfontsize' value='thenormalizedbodyfontsize'/>
+ <cd:command name='theremainingcharacters' value='theremainingcharacters'/>
<cd:command name='thinrule' value='thinrule'/>
<cd:command name='thinrules' value='thinrules'/>
+ <cd:command name='tolinenote' value='tolinenote'/>
<cd:command name='tooltip' value='tooltip'/>
<cd:command name='topdistance' value='topdistance'/>
<cd:command name='topheight' value='topheight'/>
@@ -1993,13 +2189,19 @@
<cd:command name='typ' value='typ'/>
<cd:command name='type' value='type'/>
<cd:command name='typebuffer' value='typebuffer'/>
+ <cd:command name='typedefinedbuffer' value='typedefinedbuffer'/>
<cd:command name='typefile' value='typefile'/>
+ <cd:command name='typeinlinebuffer' value='typeinlinebuffer'/>
+ <cd:command name='typing' value='typing'/>
<cd:command name='unitmeaning' value='unitmeaning'/>
<cd:command name='unknown' value='unknown'/>
+ <cd:command name='unregisterhyphenationpattern' value='unregisterhyphenationpattern'/>
<cd:command name='useJSscripts' value='useJSscripts'/>
<cd:command name='useURL' value='useURL'/>
<cd:command name='useXMLfilter' value='useXMLfilter'/>
<cd:command name='useblocks' value='useblocks'/>
+ <cd:command name='usebodyfont' value='usebodyfont'/>
+ <cd:command name='usebodyfontparameter' value='usebodyfontparameter'/>
<cd:command name='usecommands' value='usecommands'/>
<cd:command name='useencoding' value='useencoding'/>
<cd:command name='useexternaldocument' value='useexternaldocument'/>
@@ -2016,10 +2218,12 @@
<cd:command name='usetypescript' value='usetypescript'/>
<cd:command name='usetypescriptfile' value='usetypescriptfile'/>
<cd:command name='useurl' value='useurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='version'/>
<cd:command name='vl' value='vl'/>
<cd:command name='weekday' value='weekday'/>
<cd:command name='whitespace' value='whitespace'/>
+ <cd:command name='widthspanningtext' value='widthspanningtext'/>
<cd:command name='wordright' value='wordright'/>
<cd:command name='writebetweenlist' value='writebetweenlist'/>
<cd:command name='writetolist' value='writetolist'/>
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-fr.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-fr.xml
index 8ba741a608d..3a1e644527a 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-fr.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-fr.xml
@@ -6,65 +6,65 @@
<cd:variables>
<cd:variable name='Addition' value='Ajout'/>
- <cd:variable name='Alphabetic' value='Alphabetic'/>
+ <cd:variable name='Alphabetic' value='Alphabetique'/>
<cd:variable name='Balloon' value='Ballon'/>
<cd:variable name='Cap' value='Cap'/>
- <cd:variable name='Capital' value='Capitale'/>
- <cd:variable name='Character' value='Caratere'/>
+ <cd:variable name='Capital' value='Capitales'/>
+ <cd:variable name='Character' value='Caractere'/>
<cd:variable name='Characters' value='Caracteres'/>
- <cd:variable name='CloseDocument' value='FermeDocument'/>
- <cd:variable name='ExitViewer' value='SortVisualisateur'/>
+ <cd:variable name='CloseDocument' value='FermerDocument'/>
+ <cd:variable name='ExitViewer' value='SortirVisualisateur'/>
<cd:variable name='FirstPage' value='PremierePage'/>
- <cd:variable name='FitHeight' value='AjusteHauteur'/>
- <cd:variable name='FitWidth' value='AjusteLargeur'/>
- <cd:variable name='GotoPage' value='VaalaPage'/>
+ <cd:variable name='FitHeight' value='AdapterHauteur'/>
+ <cd:variable name='FitWidth' value='AdapterLargeur'/>
+ <cd:variable name='GotoPage' value='AlleraPage'/>
<cd:variable name='Greek' value='Grec'/>
<cd:variable name='Help' value='Aide'/>
- <cd:variable name='HideField' value='CacheChamp'/>
- <cd:variable name='HideLayer' value='CacheCalque'/>
+ <cd:variable name='HideField' value='CacherChamps'/>
+ <cd:variable name='HideLayer' value='CacherCalque'/>
<cd:variable name='Key' value='Cle'/>
<cd:variable name='LastPage' value='DernierePage'/>
- <cd:variable name='LoadForm' value='ChargeForm'/>
+ <cd:variable name='LoadForm' value='ChargerFormulaire'/>
<cd:variable name='MONTH' value='MOIS'/>
<cd:variable name='New' value='Nouveau'/>
<cd:variable name='NextJump' value='SautSuivant'/>
<cd:variable name='NextPage' value='PageSuivante'/>
<cd:variable name='Numbers' value='Numeros'/>
- <cd:variable name='OpenNamedDocument' value='OuvreDocumentNomme'/>
+ <cd:variable name='OpenNamedDocument' value='OuvrirDocumentNomme'/>
<cd:variable name='Ordinal' value='Ordinal'/>
<cd:variable name='Paragraph' value='Paragraphe'/>
<cd:variable name='PauseMovie' value='PauseFilm'/>
- <cd:variable name='PauseRendering' value='PauseRendering'/>
+ <cd:variable name='PauseRendering' value='PauseRendu'/>
<cd:variable name='PauseSound' value='PauseSon'/>
<cd:variable name='PreviousJump' value='SautPrecedent'/>
<cd:variable name='PreviousPage' value='PagePrecedente'/>
- <cd:variable name='PrintDocument' value='ImprimeDocument'/>
- <cd:variable name='Query' value='Query'/>
- <cd:variable name='QueryAgain' value='QueryAgain'/>
- <cd:variable name='ResetForm' value='RazForm'/>
- <cd:variable name='ResumeMovie' value='ReprendFilm'/>
- <cd:variable name='ResumeRendering' value='ResumeRendering'/>
- <cd:variable name='ResumeSound' value='ReprendSon'/>
+ <cd:variable name='PrintDocument' value='ImprimerDocument'/>
+ <cd:variable name='Query' value='Interroger'/>
+ <cd:variable name='QueryAgain' value='InterrogerSuivant'/>
+ <cd:variable name='ResetForm' value='RazFormulaire'/>
+ <cd:variable name='ResumeMovie' value='RepriseFilm'/>
+ <cd:variable name='ResumeRendering' value='RepriseRendu'/>
+ <cd:variable name='ResumeSound' value='RepriseSon'/>
<cd:variable name='Romannumerals' value='Chiffresromains'/>
- <cd:variable name='SaveDocument' value='SauvegardeDocument'/>
- <cd:variable name='SaveForm' value='SauvegardeForm'/>
- <cd:variable name='SaveNamedDocument' value='SauvegardeDocumentNomme'/>
- <cd:variable name='SearchAgain' value='RechercheSuivant'/>
- <cd:variable name='SearchDocument' value='RechercheDocument'/>
- <cd:variable name='ShowBookmarks' value='ShowBookmarks'/>
- <cd:variable name='ShowField' value='MontreChamp'/>
- <cd:variable name='ShowThumbs' value='ShowThumbs'/>
- <cd:variable name='StartMovie' value='DemarreFilm'/>
- <cd:variable name='StartRendering' value='StartRendering'/>
- <cd:variable name='StartSound' value='DemarreSon'/>
- <cd:variable name='StopMovie' value='StoppeFilm'/>
- <cd:variable name='StopRendering' value='StopRendering'/>
- <cd:variable name='StopSound' value='StoppeSon'/>
- <cd:variable name='SubmitForm' value='SoumettreForm'/>
- <cd:variable name='ToggleLayer' value='ToggleLayer'/>
- <cd:variable name='ToggleViewer' value='ChangeVisualisateur'/>
+ <cd:variable name='SaveDocument' value='EnregistrerDocument'/>
+ <cd:variable name='SaveForm' value='EnregistrerFormulaire'/>
+ <cd:variable name='SaveNamedDocument' value='EnregistrerDocumentNomme'/>
+ <cd:variable name='SearchAgain' value='ChercherSuivant'/>
+ <cd:variable name='SearchDocument' value='ChercherDocument'/>
+ <cd:variable name='ShowBookmarks' value='MontrerMarquepages'/>
+ <cd:variable name='ShowField' value='MontrerChamp'/>
+ <cd:variable name='ShowThumbs' value='MontrerVignettes'/>
+ <cd:variable name='StartMovie' value='débutFilm'/>
+ <cd:variable name='StartRendering' value='débutRendu'/>
+ <cd:variable name='StartSound' value='débutSon'/>
+ <cd:variable name='StopMovie' value='FinFilm'/>
+ <cd:variable name='StopRendering' value='FinRendu'/>
+ <cd:variable name='StopSound' value='FinSon'/>
+ <cd:variable name='SubmitForm' value='SoumettreFormulaire'/>
+ <cd:variable name='ToggleLayer' value='BasculerCalque'/>
+ <cd:variable name='ToggleViewer' value='BasculerVisualisateur'/>
<cd:variable name='URL' value='URL'/>
- <cd:variable name='VideLayer' value='VideLayer'/>
+ <cd:variable name='VideLayer' value='VideCalque'/>
<cd:variable name='ViewerHelp' value='AideVisualisateur'/>
<cd:variable name='WEEKDAY' value='JOURSEMAINE'/>
<cd:variable name='WORD' value='MOT'/>
@@ -73,95 +73,98 @@
<cd:variable name='Words' value='Mots'/>
<cd:variable name='abbreviation' value='abreviation'/>
<cd:variable name='abbreviations' value='abreviations'/>
- <cd:variable name='absolute' value='absolute'/>
+ <cd:variable name='absolute' value='absolu'/>
<cd:variable name='action' value='action'/>
- <cd:variable name='after' value='apres'/>
+ <cd:variable name='after' value='après'/>
<cd:variable name='all' value='tout'/>
- <cd:variable name='alphabetic' value='alphabetic'/>
+ <cd:variable name='alphabetic' value='Alphabetique'/>
<cd:variable name='always' value='toujours'/>
- <cd:variable name='anchor' value='anchor'/>
- <cd:variable name='and' value='and'/>
- <cd:variable name='answerarea' value='answerarea'/>
+ <cd:variable name='anchor' value='ancre'/>
+ <cd:variable name='and' value='et'/>
+ <cd:variable name='answerarea' value='zonereponse'/>
<cd:variable name='appendices' value='annexes'/>
<cd:variable name='appendix' value='annexe'/>
<cd:variable name='april' value='avril'/>
- <cd:variable name='aside' value='aside'/>
- <cd:variable name='atleftmargin' value='atleftmargin'/>
- <cd:variable name='atmargin' value='alamarge'/>
- <cd:variable name='atpage' value='alapage'/>
- <cd:variable name='atrightmargin' value='atrightmargin'/>
- <cd:variable name='attachment' value='attachment'/>
- <cd:variable name='august' value='août'/>
+ <cd:variable name='aside' value='apart'/>
+ <cd:variable name='atleftmargin' value='enmargegauche'/>
+ <cd:variable name='atmargin' value='enmarge'/>
+ <cd:variable name='atpage' value='enpage'/>
+ <cd:variable name='atrightmargin' value='enmargedroite'/>
+ <cd:variable name='attachment' value='piecejointe'/>
+ <cd:variable name='august' value='aout'/>
<cd:variable name='author' value='auteur'/>
<cd:variable name='auto' value='auto'/>
<cd:variable name='autointro' value='autointro'/>
- <cd:variable name='autopunctuation' value='autopunctuation'/>
+ <cd:variable name='autopunctuation' value='autoponctuation'/>
<cd:variable name='back' value='retour'/>
<cd:variable name='background' value='arriereplan'/>
- <cd:variable name='backmatter' value='epilogue'/>
+ <cd:variable name='backmatter' value='pagesdefin'/>
<cd:variable name='backpart' value='postface'/>
- <cd:variable name='backspace' value='retourarriere'/>
- <cd:variable name='backward' value='retourarriere'/>
+ <cd:variable name='backspace' value='retourarrière'/>
+ <cd:variable name='backward' value='enarriere'/>
<cd:variable name='bbl' value='bbl'/>
<cd:variable name='before' value='avant'/>
- <cd:variable name='begin' value='begin'/>
+ <cd:variable name='begin' value='commencer'/>
<cd:variable name='bib' value='bib'/>
- <cd:variable name='big' value='grand'/>
- <cd:variable name='bigbodyfont' value='grandepolicecorp'/>
- <cd:variable name='bigger' value='bigger'/>
- <cd:variable name='bigpreference' value='grandepreference'/>
- <cd:variable name='blank' value='vide'/>
- <cd:variable name='block' value='block'/>
- <cd:variable name='blockquote' value='blockquote'/>
- <cd:variable name='bodymatter' value='texteprincipal'/>
+ <cd:variable name='big' value='important'/>
+ <cd:variable name='bigbodyfont' value='policedecorpsimportante'/>
+ <cd:variable name='bigger' value='plusimportant'/>
+ <cd:variable name='bigpreference' value='preferenceimportante'/>
+ <cd:variable name='blank' value='vierge'/>
+ <cd:variable name='block' value='bloc'/>
+ <cd:variable name='blockquote' value='citerbloc'/>
+ <cd:variable name='bodymatter' value='pagescorpsdetexte'/>
<cd:variable name='bodypart' value='corpsdetexte'/>
<cd:variable name='bold' value='gras'/>
- <cd:variable name='bolditalic' value='italiquegras'/>
- <cd:variable name='boldslanted' value='inclinegras'/>
+ <cd:variable name='bolditalic' value='grasitalique'/>
+ <cd:variable name='boldslanted' value='grasincline'/>
<cd:variable name='bookmark' value='marquepage'/>
- <cd:variable name='both' value='lesdeux'/>
- <cd:variable name='bothtext' value='bothtext'/>
- <cd:variable name='bottom' value='inf'/>
- <cd:variable name='box' value='box'/>
+ <cd:variable name='both' value='chacun'/>
+ <cd:variable name='bothtext' value='textechacun'/>
+ <cd:variable name='bottom' value='bas'/>
+ <cd:variable name='box' value='boite'/>
<cd:variable name='brief' value='brief'/>
<cd:variable name='broad' value='large'/>
- <cd:variable name='buffer' value='buffer'/>
+ <cd:variable name='buffer' value='tampon'/>
<cd:variable name='by' value='par'/>
<cd:variable name='calligraphic' value='calligraphique'/>
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='cap'/>
- <cd:variable name='capital' value='capitale'/>
- <cd:variable name='center' value='center'/>
- <cd:variable name='centerlast' value='centerlast'/>
+ <cd:variable name='capital' value='capitales'/>
+ <cd:variable name='category' value='categorie'/>
+ <cd:variable name='cd:character' value='caracteres'/>
+ <cd:variable name='cd:font' value='police'/>
+ <cd:variable name='center' value='centrer'/>
+ <cd:variable name='centerlast' value='centrerdernier'/>
<cd:variable name='chapter' value='chapitre'/>
<cd:variable name='character' value='caractere'/>
<cd:variable name='characters' value='caracteres'/>
- <cd:variable name='chemical' value='chemical'/>
- <cd:variable name='chemicals' value='chemicals'/>
- <cd:variable name='chemistry' value='chemistry'/>
+ <cd:variable name='chemical' value='chimique'/>
+ <cd:variable name='chemicals' value='chimiques'/>
+ <cd:variable name='chemistry' value='chimie'/>
<cd:variable name='cite' value='cite'/>
- <cd:variable name='closed' value='closed'/>
+ <cd:variable name='closed' value='ferme'/>
<cd:variable name='color' value='couleur'/>
<cd:variable name='column' value='colonne'/>
<cd:variable name='columns' value='colonnes'/>
- <cd:variable name='combination' value='combination'/>
+ <cd:variable name='combination' value='combinaison'/>
<cd:variable name='command' value='commande'/>
<cd:variable name='commands' value='commandes'/>
<cd:variable name='comment' value='commentaire'/>
<cd:variable name='component' value='composant'/>
- <cd:variable name='compressseparator' value='compressseparator'/>
- <cd:variable name='compressstopper' value='compressstopper'/>
+ <cd:variable name='compressseparator' value='separateurreduction'/>
+ <cd:variable name='compressstopper' value='stoppeurreduction'/>
<cd:variable name='concept' value='concept'/>
<cd:variable name='construction' value='construction'/>
<cd:variable name='content' value='contenu'/>
<cd:variable name='contents' value='contenus'/>
- <cd:variable name='continue' value='continue'/>
- <cd:variable name='continued' value='continued'/>
+ <cd:variable name='continue' value='continuer'/>
+ <cd:variable name='continued' value='continue'/>
<cd:variable name='controls' value='controles'/>
<cd:variable name='conversion' value='conversion'/>
<cd:variable name='current' value='courant'/>
- <cd:variable name='cutspace' value='cutspace'/>
- <cd:variable name='dataset' value='dataset'/>
+ <cd:variable name='cutspace' value='espacecoupe'/>
+ <cd:variable name='dataset' value='jeudedonnees'/>
<cd:variable name='date' value='date'/>
<cd:variable name='day' value='jour'/>
<cd:variable name='december' value='decembre'/>
@@ -172,25 +175,26 @@
<cd:variable name='display' value='affichage'/>
<cd:variable name='dot' value='point'/>
<cd:variable name='doublesided' value='rectoverso'/>
- <cd:variable name='down' value='down'/>
+ <cd:variable name='down' value='enbas'/>
<cd:variable name='each' value='chaque'/>
<cd:variable name='edge' value='bord'/>
- <cd:variable name='effective' value='effective'/>
- <cd:variable name='eight' value='eight'/>
- <cd:variable name='embed' value='embed'/>
+ <cd:variable name='effective' value='effectif'/>
+ <cd:variable name='eight' value='huit'/>
+ <cd:variable name='embed' value='integrer'/>
<cd:variable name='empty' value='vide'/>
- <cd:variable name='enable' value='enable'/>
- <cd:variable name='end' value='end'/>
- <cd:variable name='endnote' value='notefin'/>
- <cd:variable name='enumeration' value='enumeration'/>
- <cd:variable name='environment' value='environement'/>
+ <cd:variable name='enable' value='activer'/>
+ <cd:variable name='end' value='terminer'/>
+ <cd:variable name='endnote' value='noteseule'/>
+ <cd:variable name='enumeration' value='énumération'/>
+ <cd:variable name='environment' value='environnement'/>
<cd:variable name='even' value='paire'/>
- <cd:variable name='export' value='export'/>
- <cd:variable name='external' value='external'/>
- <cd:variable name='extremestretch' value='extremestretch'/>
+ <cd:variable name='export' value='exporter'/>
+ <cd:variable name='external' value='externe'/>
+ <cd:variable name='extremestretch' value='etirementextreme'/>
<cd:variable name='fact' value='fait'/>
+ <cd:variable name='fallback' value='repli'/>
<cd:variable name='february' value='fevrier'/>
- <cd:variable name='field' value='field'/>
+ <cd:variable name='field' value='champ'/>
<cd:variable name='figure' value='figure'/>
<cd:variable name='figures' value='figures'/>
<cd:variable name='file' value='fichier'/>
@@ -199,32 +203,33 @@
<cd:variable name='firstcolumn' value='premierecolonne'/>
<cd:variable name='firstpage' value='premierepage'/>
<cd:variable name='firstsubpage' value='premieresouspage'/>
- <cd:variable name='fit' value='adapte'/>
+ <cd:variable name='fit' value='adapter'/>
<cd:variable name='five' value='cinq'/>
- <cd:variable name='fix' value='fixe'/>
+ <cd:variable name='fix' value='fix'/>
<cd:variable name='fixed' value='fixe'/>
<cd:variable name='flexible' value='flexible'/>
<cd:variable name='float' value='flottant'/>
- <cd:variable name='flushinner' value='flushinner'/>
- <cd:variable name='flushleft' value='flushleft'/>
- <cd:variable name='flushouter' value='flushouter'/>
- <cd:variable name='flushright' value='flushright'/>
- <cd:variable name='followingpage' value='followingpage'/>
+ <cd:variable name='flushinner' value='alignerinterieur'/>
+ <cd:variable name='flushleft' value='alignergauche'/>
+ <cd:variable name='flushouter' value='alignerexterieur'/>
+ <cd:variable name='flushright' value='alignerdroite'/>
+ <cd:variable name='followingpage' value='pagesuccesseur'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='pdp'/>
- <cd:variable name='footnote' value='notepdp'/>
- <cd:variable name='force' value='force'/>
+ <cd:variable name='footnote' value='notebdp'/>
+ <cd:variable name='force' value='forcer'/>
<cd:variable name='foreground' value='premierplan'/>
<cd:variable name='formula' value='formule'/>
<cd:variable name='formulas' value='formules'/>
- <cd:variable name='forward' value='avance'/>
+ <cd:variable name='forward' value='enavant'/>
<cd:variable name='four' value='quatre'/>
<cd:variable name='fractions' value='fractions'/>
<cd:variable name='frame' value='cadre'/>
<cd:variable name='framedtext' value='texteencadre'/>
<cd:variable name='friday' value='vendredi'/>
- <cd:variable name='frontmatter' value='preambule'/>
+ <cd:variable name='frontmatter' value='pagesliminaires'/>
<cd:variable name='frontpart' value='preface'/>
- <cd:variable name='fullhz' value='fullhz'/>
+ <cd:variable name='fullhz' value='hzcomplet'/>
<cd:variable name='global' value='global'/>
<cd:variable name='graphic' value='graphique'/>
<cd:variable name='graphics' value='graphiques'/>
@@ -233,190 +238,192 @@
<cd:variable name='grid' value='grille'/>
<cd:variable name='halfline' value='demiligne'/>
<cd:variable name='handwritten' value='manuscript'/>
- <cd:variable name='hang' value='suspend'/>
- <cd:variable name='hanging' value='suspend'/>
- <cd:variable name='hangingboth' value='hangingboth'/>
+ <cd:variable name='hang' value='suspendre'/>
+ <cd:variable name='hanging' value='suspension'/>
+ <cd:variable name='hangingboth' value='suspensionchacun'/>
<cd:variable name='head' value='tete'/>
- <cd:variable name='header' value='entete'/>
- <cd:variable name='headintext' value='headintext'/>
+ <cd:variable name='header' value='entête'/>
+ <cd:variable name='headintext' value='tetedanstexte'/>
<cd:variable name='height' value='hauteur'/>
<cd:variable name='helptext' value='texteaide'/>
- <cd:variable name='hencefore' value='precedent'/>
+ <cd:variable name='hencefore' value='precedemment'/>
<cd:variable name='here' value='ici'/>
- <cd:variable name='hereafter' value='suivant'/>
+ <cd:variable name='hereafter' value='ciapres'/>
<cd:variable name='hidden' value='cache'/>
- <cd:variable name='hiddenbar' value='hiddenbar'/>
- <cd:variable name='hiding' value='cache'/>
- <cd:variable name='high' value='haut'/>
- <cd:variable name='horizontal' value='horizontale'/>
- <cd:variable name='hyphenated' value='hyphenated'/>
+ <cd:variable name='hiddenbar' value='barrecachee'/>
+ <cd:variable name='hiding' value='encachant'/>
+ <cd:variable name='high' value='exp'/>
+ <cd:variable name='horizontal' value='horizontal'/>
+ <cd:variable name='hyphenated' value='aveccesure'/>
<cd:variable name='hz' value='hz'/>
<cd:variable name='inbetween' value='entre'/>
<cd:variable name='index' value='index'/>
<cd:variable name='indices' value='indices'/>
- <cd:variable name='inherit' value='herite'/>
- <cd:variable name='ininner' value='ininner'/>
- <cd:variable name='ininneredge' value='ininneredge'/>
- <cd:variable name='ininnermargin' value='ininnermargin'/>
+ <cd:variable name='inherit' value='heriter'/>
+ <cd:variable name='ininner' value='dansinterieur'/>
+ <cd:variable name='ininneredge' value='dansbordinterieur'/>
+ <cd:variable name='ininnermargin' value='dansmargeinterieure'/>
<cd:variable name='inleft' value='dansgauche'/>
<cd:variable name='inleftedge' value='dansbordgauche'/>
<cd:variable name='inleftmargin' value='dansmargegauche'/>
- <cd:variable name='inline' value='inline'/>
+ <cd:variable name='inline' value='enligne'/>
<cd:variable name='inmargin' value='dansmarge'/>
<cd:variable name='inner' value='interieur'/>
<cd:variable name='inneredge' value='bordinterieur'/>
<cd:variable name='innermargin' value='margeinterieure'/>
- <cd:variable name='inother' value='inother'/>
- <cd:variable name='inouter' value='inouter'/>
- <cd:variable name='inouteredge' value='inouteredge'/>
- <cd:variable name='inoutermargin' value='inoutermargin'/>
- <cd:variable name='inright' value='dansdroit'/>
+ <cd:variable name='inother' value='dansautre'/>
+ <cd:variable name='inouter' value='dansexterieur'/>
+ <cd:variable name='inouteredge' value='dansbordexterieur'/>
+ <cd:variable name='inoutermargin' value='dansmargeexterieure'/>
+ <cd:variable name='inright' value='dansdroite'/>
<cd:variable name='inrightedge' value='dansborddroit'/>
<cd:variable name='inrightmargin' value='dansmargedroite'/>
- <cd:variable name='integral' value='integral'/>
+ <cd:variable name='integral' value='integrale'/>
<cd:variable name='interaction' value='interaction'/>
<cd:variable name='interactionmenu' value='menuinteraction'/>
- <cd:variable name='interactive' value='interactive'/>
- <cd:variable name='intermezzi' value='intermezzi'/>
- <cd:variable name='intermezzo' value='intermezzo'/>
+ <cd:variable name='interactive' value='interactif'/>
+ <cd:variable name='intermezzi' value='interludes'/>
+ <cd:variable name='intermezzo' value='interlude'/>
<cd:variable name='intext' value='danstexte'/>
<cd:variable name='intro' value='intro'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='italique'/>
- <cd:variable name='italicbold' value='grasitalique'/>
- <cd:variable name='item' value='element'/>
- <cd:variable name='itemize' value='lister'/>
- <cd:variable name='its' value='its'/>
+ <cd:variable name='italicbold' value='italiquegras'/>
+ <cd:variable name='item' value='élément'/>
+ <cd:variable name='itemize' value='détailler'/>
+ <cd:variable name='its' value='els'/>
<cd:variable name='january' value='janvier'/>
- <cd:variable name='joinedup' value='joinedup'/>
+ <cd:variable name='joinedup' value='sansespaceentre'/>
<cd:variable name='july' value='juillet'/>
<cd:variable name='june' value='juin'/>
- <cd:variable name='keep' value='maintient'/>
- <cd:variable name='kerncharacters' value='kerncharacters'/>
+ <cd:variable name='keep' value='conserver'/>
+ <cd:variable name='kerncharacters' value='approchercaracteres'/>
<cd:variable name='knockout' value='knockout'/>
<cd:variable name='label' value='etiquette'/>
<cd:variable name='landscape' value='paysage'/>
<cd:variable name='last' value='dernier'/>
<cd:variable name='lastcolumn' value='dernierecolonne'/>
<cd:variable name='lastpage' value='dernierepage'/>
- <cd:variable name='lastpagenumber' value='derniernumeropage'/>
+ <cd:variable name='lastpagenumber' value='numerodenierepage'/>
<cd:variable name='lastsubpage' value='dernieresouspage'/>
- <cd:variable name='layer' value='layer'/>
+ <cd:variable name='layer' value='calque'/>
<cd:variable name='left' value='gauche'/>
<cd:variable name='leftedge' value='bordgauche'/>
- <cd:variable name='lefthanging' value='lefthanging'/>
+ <cd:variable name='lefthanging' value='suspensiongauche'/>
<cd:variable name='leftmargin' value='margegauche'/>
- <cd:variable name='leftpage' value='pagegauche'/>
- <cd:variable name='lefttoright' value='lefttoright'/>
+ <cd:variable name='leftpage' value='surpagegauche'/>
+ <cd:variable name='lefttoright' value='gaucheadroite'/>
<cd:variable name='legend' value='legende'/>
- <cd:variable name='less' value='less'/>
- <cd:variable name='lesshyphenation' value='lesshyphenation'/>
- <cd:variable name='letterspacing' value='letterspacing'/>
+ <cd:variable name='less' value='moins'/>
+ <cd:variable name='lesshyphenation' value='moinsdecesure'/>
+ <cd:variable name='letterspacing' value='espacementlettre'/>
<cd:variable name='line' value='ligne'/>
<cd:variable name='linenote' value='noteligne'/>
<cd:variable name='lines' value='lignes'/>
- <cd:variable name='linked' value='linked'/>
+ <cd:variable name='linked' value='lie'/>
<cd:variable name='list' value='liste'/>
<cd:variable name='local' value='local'/>
- <cd:variable name='localenvironment' value='environementlocal'/>
+ <cd:variable name='localenvironment' value='environnementlocal'/>
<cd:variable name='logo' value='logo'/>
<cd:variable name='logos' value='logos'/>
- <cd:variable name='lohi' value='baha'/>
+ <cd:variable name='lohi' value='inex'/>
<cd:variable name='long' value='long'/>
- <cd:variable name='loose' value='perte'/>
- <cd:variable name='low' value='bas'/>
+ <cd:variable name='loose' value='envrac'/>
+ <cd:variable name='low' value='ind'/>
<cd:variable name='ls' value='ls'/>
- <cd:variable name='makeup' value='makeup'/>
- <cd:variable name='mar' value='mar'/>
+ <cd:variable name='makeup' value='composition'/>
+ <cd:variable name='mar' value='rem'/>
<cd:variable name='march' value='mars'/>
<cd:variable name='margin' value='marge'/>
- <cd:variable name='marginedge' value='bordmarge'/>
+ <cd:variable name='marginedge' value='margebord'/>
<cd:variable name='margintext' value='textemarge'/>
<cd:variable name='margintitle' value='titremarge'/>
<cd:variable name='marking' value='marquage'/>
<cd:variable name='math' value='math'/>
- <cd:variable name='mathalignment' value='mathalignment'/>
- <cd:variable name='mathcases' value='mathcases'/>
- <cd:variable name='mathematics' value='mathematique'/>
- <cd:variable name='mathmatrix' value='mathmatrix'/>
+ <cd:variable name='mathalignment' value='alignementmath'/>
+ <cd:variable name='mathcases' value='casmath'/>
+ <cd:variable name='mathematics' value='mathematics'/>
+ <cd:variable name='mathmatrix' value='matricemath'/>
<cd:variable name='max' value='max'/>
- <cd:variable name='maxdepth' value='maxdepth'/>
- <cd:variable name='maxheight' value='maxheight'/>
- <cd:variable name='maxwidth' value='maxwidth'/>
+ <cd:variable name='maxdepth' value='profondeurmax'/>
+ <cd:variable name='maxheight' value='hauteurmax'/>
+ <cd:variable name='maxwidth' value='largeurmax'/>
<cd:variable name='may' value='mai'/>
<cd:variable name='mediaeval' value='medieval'/>
<cd:variable name='medium' value='moyen'/>
<cd:variable name='middle' value='milieu'/>
<cd:variable name='min' value='min'/>
- <cd:variable name='mindepth' value='mindepth'/>
+ <cd:variable name='mindepth' value='profondeurmin'/>
<cd:variable name='minheight' value='hauteurmin'/>
<cd:variable name='minwidth' value='largeurmin'/>
<cd:variable name='mirrored' value='reflete'/>
- <cd:variable name='mixed' value='mixed'/>
+ <cd:variable name='mixed' value='mixte'/>
<cd:variable name='monday' value='lundi'/>
<cd:variable name='mono' value='mono'/>
<cd:variable name='monobold' value='monogras'/>
- <cd:variable name='mononormal' value='mononormal'/>
+ <cd:variable name='mononormal' value='normalmono'/>
<cd:variable name='month' value='mois'/>
- <cd:variable name='more' value='more'/>
- <cd:variable name='morehyphenation' value='morehyphenation'/>
+ <cd:variable name='more' value='plus'/>
+ <cd:variable name='morehyphenation' value='plusdecesure'/>
<cd:variable name='name' value='nom'/>
<cd:variable name='narrow' value='etroit'/>
<cd:variable name='negative' value='negatif'/>
<cd:variable name='never' value='jamais'/>
<cd:variable name='new' value='nouveau'/>
- <cd:variable name='next' value='prochain'/>
+ <cd:variable name='next' value='suivant'/>
<cd:variable name='nextevenpage' value='pagepairesuivante'/>
<cd:variable name='nextoddpage' value='pageimpairesuivante'/>
<cd:variable name='nextpage' value='pagesuivante'/>
<cd:variable name='nextsubpage' value='souspagesuivante'/>
- <cd:variable name='nine' value='nine'/>
+ <cd:variable name='nine' value='neuf'/>
<cd:variable name='no' value='non'/>
- <cd:variable name='nocheck' value='nonverifie'/>
- <cd:variable name='nodepth' value='nodepth'/>
- <cd:variable name='nofit' value='nofit'/>
- <cd:variable name='nogrid' value='nogrid'/>
- <cd:variable name='noheight' value='noheight'/>
- <cd:variable name='nohz' value='nohz'/>
- <cd:variable name='noline' value='noline'/>
+ <cd:variable name='nocheck' value='sansverifier'/>
+ <cd:variable name='nodepth' value='sansprodondeur'/>
+ <cd:variable name='nofit' value='sansadapter'/>
+ <cd:variable name='nogrid' value='sansgrille'/>
+ <cd:variable name='noheight' value='sanshauteur'/>
+ <cd:variable name='nohz' value='sanshz'/>
+ <cd:variable name='noline' value='sansligne'/>
<cd:variable name='nomarking' value='sansmarquage'/>
- <cd:variable name='nomenubar' value='nomenubar'/>
- <cd:variable name='none' value='rien'/>
+ <cd:variable name='nomenubar' value='sansbarremenu'/>
+ <cd:variable name='none' value='aucun'/>
<cd:variable name='nonumber' value='sansnumero'/>
- <cd:variable name='norepeat' value='norepeat'/>
+ <cd:variable name='norepeat' value='sansrepetition'/>
<cd:variable name='normal' value='normal'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='sansespacement'/>
- <cd:variable name='nostopper' value='nostopper'/>
+ <cd:variable name='nostopper' value='sansstoppeur'/>
<cd:variable name='not' value='pas'/>
<cd:variable name='notation' value='notation'/>
<cd:variable name='note' value='note'/>
- <cd:variable name='nothanging' value='nonsuspendu'/>
- <cd:variable name='nothyphenated' value='nothyphenated'/>
- <cd:variable name='notjoinedup' value='notjoinedup'/>
+ <cd:variable name='nothanging' value='sanssuspension'/>
+ <cd:variable name='nothyphenated' value='sanscesure'/>
+ <cd:variable name='notjoinedup' value='passansespaceentre'/>
<cd:variable name='november' value='novembre'/>
- <cd:variable name='nowhere' value='nulpart'/>
+ <cd:variable name='nowhere' value='nullepart'/>
<cd:variable name='nowhite' value='sansblanc'/>
<cd:variable name='number' value='numero'/>
<cd:variable name='numbers' value='numeros'/>
<cd:variable name='october' value='octobre'/>
<cd:variable name='odd' value='impair'/>
- <cd:variable name='off' value='desactive'/>
- <cd:variable name='offset' value='offset'/>
- <cd:variable name='old' value='old'/>
- <cd:variable name='oldstyle' value='oldstyle'/>
- <cd:variable name='on' value='actif'/>
+ <cd:variable name='off' value='arret'/>
+ <cd:variable name='offset' value='decalage'/>
+ <cd:variable name='old' value='ancien'/>
+ <cd:variable name='oldstyle' value='styleancien'/>
+ <cd:variable name='on' value='marche'/>
<cd:variable name='one' value='un'/>
- <cd:variable name='opposite' value='opposition'/>
+ <cd:variable name='opposite' value='enface'/>
<cd:variable name='ordinal' value='ordinal'/>
<cd:variable name='outer' value='exterieur'/>
<cd:variable name='outeredge' value='bordexterieur'/>
<cd:variable name='outermargin' value='margeexterieure'/>
- <cd:variable name='overbar' value='overbar'/>
- <cd:variable name='overbars' value='overbars'/>
- <cd:variable name='overlay' value='revetement'/>
- <cd:variable name='overprint' value='overprint'/>
- <cd:variable name='overstrike' value='surlignetout'/>
- <cd:variable name='overstrikes' value='surligne'/>
- <cd:variable name='packed' value='groupe'/>
+ <cd:variable name='overbar' value='surligner'/>
+ <cd:variable name='overbars' value='surlignermots'/>
+ <cd:variable name='overlay' value='superposition'/>
+ <cd:variable name='overprint' value='surimpression'/>
+ <cd:variable name='overstrike' value='barrer'/>
+ <cd:variable name='overstrikes' value='barrermots'/>
+ <cd:variable name='packed' value='sansespaceentreitem'/>
<cd:variable name='page' value='page'/>
<cd:variable name='pagecomment' value='commentairepage'/>
<cd:variable name='pagenumber' value='numeropage'/>
@@ -424,119 +431,120 @@
<cd:variable name='paragraph' value='paragraphe'/>
<cd:variable name='part' value='partie'/>
<cd:variable name='positive' value='positif'/>
- <cd:variable name='postponing' value='postponing'/>
+ <cd:variable name='postponing' value='report'/>
<cd:variable name='postscript' value='postscript'/>
- <cd:variable name='precedingpage' value='precedingpage'/>
+ <cd:variable name='precedingpage' value='pageantecedent'/>
<cd:variable name='preference' value='preference'/>
- <cd:variable name='preview' value='previsualisation'/>
+ <cd:variable name='preview' value='apercu'/>
<cd:variable name='previous' value='precedent'/>
<cd:variable name='previousevenpage' value='pagepaireprecedente'/>
<cd:variable name='previousoddpage' value='pageimpaireprecedente'/>
<cd:variable name='previouspage' value='pageprecedente'/>
<cd:variable name='previoussubpage' value='souspageprecedente'/>
- <cd:variable name='print' value='print'/>
- <cd:variable name='printable' value='editable'/>
- <cd:variable name='process' value='process'/>
+ <cd:variable name='print' value='imprimer'/>
+ <cd:variable name='printable' value='imprimable'/>
+ <cd:variable name='process' value='traiter'/>
<cd:variable name='product' value='produit'/>
<cd:variable name='program' value='programme'/>
<cd:variable name='project' value='projet'/>
<cd:variable name='protected' value='protege'/>
<cd:variable name='quadruple' value='quadruple'/>
- <cd:variable name='quarterline' value='quarterline'/>
+ <cd:variable name='quarterline' value='quartdeligne'/>
<cd:variable name='quotation' value='citation'/>
<cd:variable name='quote' value='citer'/>
- <cd:variable name='ran' value='cours'/>
+ <cd:variable name='ran' value='gam'/>
<cd:variable name='random' value='aleatoire'/>
<cd:variable name='readonly' value='lectureseule'/>
<cd:variable name='rectangular' value='rectangulaire'/>
<cd:variable name='reference' value='reference'/>
- <cd:variable name='referral' value='referral'/>
+ <cd:variable name='referral' value='redirection'/>
+ <cd:variable name='region' value='region'/>
<cd:variable name='register' value='registre'/>
- <cd:variable name='regular' value='regulier'/>
+ <cd:variable name='regular' value='ordinaire'/>
<cd:variable name='relative' value='relatif'/>
- <cd:variable name='repeat' value='repete'/>
- <cd:variable name='required' value='recquis'/>
+ <cd:variable name='repeat' value='repeter'/>
+ <cd:variable name='required' value='requis'/>
<cd:variable name='reset' value='raz'/>
- <cd:variable name='reverse' value='inverse'/>
+ <cd:variable name='reverse' value='inverser'/>
<cd:variable name='right' value='droite'/>
<cd:variable name='rightedge' value='borddroit'/>
- <cd:variable name='righthanging' value='righthanging'/>
+ <cd:variable name='righthanging' value='suspensiondroite'/>
<cd:variable name='rightmargin' value='margedroite'/>
- <cd:variable name='rightpage' value='pagedroite'/>
- <cd:variable name='righttoleft' value='righttoleft'/>
- <cd:variable name='roman' value='roman'/>
+ <cd:variable name='rightpage' value='surpagedroite'/>
+ <cd:variable name='righttoleft' value='droiteagauche'/>
+ <cd:variable name='roman' value='romain'/>
<cd:variable name='romannumerals' value='chiffresromains'/>
- <cd:variable name='rotate' value='oriente'/>
+ <cd:variable name='rotate' value='tourner'/>
<cd:variable name='rotated' value='tourne'/>
<cd:variable name='round' value='rond'/>
<cd:variable name='row' value='rang'/>
- <cd:variable name='rule' value='regle'/>
+ <cd:variable name='rule' value='trait'/>
<cd:variable name='samepage' value='memepage'/>
<cd:variable name='sans' value='sans'/>
- <cd:variable name='sansbold' value='sansgras'/>
- <cd:variable name='sansnormal' value='sansnormal'/>
+ <cd:variable name='sansbold' value='sansserifbold'/>
+ <cd:variable name='sansnormal' value='normalsans'/>
<cd:variable name='sansserif' value='sansserif'/>
<cd:variable name='saturday' value='samedi'/>
<cd:variable name='screen' value='ecran'/>
<cd:variable name='section' value='section'/>
- <cd:variable name='sectionblockenvironment' value='environementblocsection'/>
+ <cd:variable name='sectionblockenvironment' value='environnementblocsection'/>
<cd:variable name='sectionnumber' value='numerosection'/>
- <cd:variable name='see' value='voit'/>
- <cd:variable name='selectfont' value='selectfont'/>
- <cd:variable name='separator' value='separator'/>
+ <cd:variable name='see' value='voir'/>
+ <cd:variable name='selectfont' value='selectionnerpolice'/>
+ <cd:variable name='separator' value='separateur'/>
<cd:variable name='september' value='septembre'/>
<cd:variable name='serif' value='serif'/>
- <cd:variable name='serifbold' value='serifbold'/>
+ <cd:variable name='serifbold' value='serifgras'/>
<cd:variable name='serifnormal' value='serifnormal'/>
- <cd:variable name='serried' value='serried'/>
+ <cd:variable name='serried' value='serre'/>
<cd:variable name='setups' value='setups'/>
- <cd:variable name='seven' value='seven'/>
- <cd:variable name='sheet' value='sheet'/>
- <cd:variable name='shiftdown' value='shiftdown'/>
- <cd:variable name='shiftup' value='shiftup'/>
- <cd:variable name='short' value='short'/>
- <cd:variable name='simplefonts' value='simplefonts'/>
- <cd:variable name='simplelist' value='simplelist'/>
+ <cd:variable name='seven' value='sept'/>
+ <cd:variable name='sheet' value='feuille'/>
+ <cd:variable name='shiftdown' value='decalerenbas'/>
+ <cd:variable name='shiftup' value='decalerenhaut'/>
+ <cd:variable name='short' value='court'/>
+ <cd:variable name='simplefonts' value='policessimple'/>
+ <cd:variable name='simplelist' value='listesimple'/>
<cd:variable name='singlesided' value='recto'/>
<cd:variable name='six' value='six'/>
<cd:variable name='slanted' value='incline'/>
- <cd:variable name='slantedbold' value='grasincline'/>
+ <cd:variable name='slantedbold' value='inclinegras'/>
<cd:variable name='small' value='petit'/>
- <cd:variable name='smallbodyfont' value='petitepolicecorps'/>
- <cd:variable name='smallbold' value='graspetit'/>
- <cd:variable name='smallbolditalic' value='italiquegraspetit'/>
- <cd:variable name='smallboldslanted' value='inclinegraspetit'/>
- <cd:variable name='smallcaps' value='petitescapitales'/>
- <cd:variable name='smaller' value='smaller'/>
- <cd:variable name='smallitalic' value='italiquepetit'/>
- <cd:variable name='smallitalicbold' value='grasitaliquepetit'/>
- <cd:variable name='smallnormal' value='normalpetit'/>
- <cd:variable name='smallslanted' value='inclinepetit'/>
- <cd:variable name='smallslantedbold' value='grasinclinepetit'/>
- <cd:variable name='smalltype' value='petittype'/>
+ <cd:variable name='smallbodyfont' value='policedecorpspetite'/>
+ <cd:variable name='smallbold' value='petitgras'/>
+ <cd:variable name='smallbolditalic' value='petitgrasitalique'/>
+ <cd:variable name='smallboldslanted' value='petitgrasincline'/>
+ <cd:variable name='smallcaps' value='petitescaps'/>
+ <cd:variable name='smaller' value='pluspetit'/>
+ <cd:variable name='smallitalic' value='petititalique'/>
+ <cd:variable name='smallitalicbold' value='petititaliquegras'/>
+ <cd:variable name='smallnormal' value='petitnormal'/>
+ <cd:variable name='smallslanted' value='petitincline'/>
+ <cd:variable name='smallslantedbold' value='petitinclinegras'/>
+ <cd:variable name='smalltype' value='petitcaractere'/>
<cd:variable name='somewhere' value='qqpart'/>
<cd:variable name='sorted' value='trie'/>
- <cd:variable name='sorting' value='sorting'/>
+ <cd:variable name='sorting' value='tri'/>
<cd:variable name='space' value='espace'/>
<cd:variable name='spacing' value='espacement'/>
<cd:variable name='speech' value='discours'/>
- <cd:variable name='split' value='split'/>
- <cd:variable name='spot' value='spot'/>
+ <cd:variable name='split' value='partager'/>
+ <cd:variable name='spot' value='tondirect'/>
<cd:variable name='standard' value='standard'/>
- <cd:variable name='start' value='demarre'/>
- <cd:variable name='starter' value='starter'/>
- <cd:variable name='sticker' value='sticker'/>
- <cd:variable name='stop' value='stoppe'/>
- <cd:variable name='stopper' value='stopper'/>
- <cd:variable name='stretch' value='etire'/>
- <cd:variable name='stretched' value='stretched'/>
+ <cd:variable name='start' value='activé'/>
+ <cd:variable name='starter' value='demarreur'/>
+ <cd:variable name='sticker' value='autocollant'/>
+ <cd:variable name='stop' value='fin'/>
+ <cd:variable name='stopper' value='stoppeur'/>
+ <cd:variable name='stretch' value='etirer'/>
+ <cd:variable name='stretched' value='etire'/>
<cd:variable name='strict' value='strict'/>
- <cd:variable name='strong' value='strong'/>
- <cd:variable name='strut' value='strut'/>
+ <cd:variable name='strong' value='fort'/>
+ <cd:variable name='strut' value='entretoise'/>
<cd:variable name='sub' value='sous'/>
- <cd:variable name='subbackward' value='sousretourarriere'/>
- <cd:variable name='subformula' value='subformule'/>
- <cd:variable name='subforward' value='sousavance'/>
+ <cd:variable name='subbackward' value='petitenarriere'/>
+ <cd:variable name='subformula' value='sousformule'/>
+ <cd:variable name='subforward' value='petitenavant'/>
<cd:variable name='subject' value='sujet'/>
<cd:variable name='subpage' value='souspage'/>
<cd:variable name='subs' value='subs'/>
@@ -562,56 +570,56 @@
<cd:variable name='support' value='support'/>
<cd:variable name='sym' value='sym'/>
<cd:variable name='symbol' value='symbole'/>
- <cd:variable name='synchronize' value='synchronize'/>
- <cd:variable name='synonym' value='synonym'/>
+ <cd:variable name='synchronize' value='synchroniser'/>
+ <cd:variable name='synonym' value='synonyme'/>
<cd:variable name='system' value='systeme'/>
- <cd:variable name='table' value='tableau'/>
+ <cd:variable name='table' value='table'/>
<cd:variable name='tablehead' value='tetetableau'/>
<cd:variable name='tables' value='tables'/>
- <cd:variable name='tabletail' value='queuetableau'/>
- <cd:variable name='tabulate' value='tabule'/>
- <cd:variable name='tabulatehead' value='tetetabule'/>
- <cd:variable name='tabulatetail' value='queuetabule'/>
- <cd:variable name='tall' value='long'/>
- <cd:variable name='teletype' value='teletype'/>
+ <cd:variable name='tabletail' value='queuetable'/>
+ <cd:variable name='tabulate' value='tabulation'/>
+ <cd:variable name='tabulatehead' value='tetetabulation'/>
+ <cd:variable name='tabulatetail' value='queuetabulation'/>
+ <cd:variable name='tall' value='grand'/>
+ <cd:variable name='teletype' value='caractereterminal'/>
<cd:variable name='temporary' value='temporaire'/>
<cd:variable name='test' value='test'/>
<cd:variable name='text' value='texte'/>
- <cd:variable name='textnote' value='textnote'/>
+ <cd:variable name='textnote' value='notetexte'/>
<cd:variable name='three' value='trois'/>
<cd:variable name='thursday' value='jeudi'/>
- <cd:variable name='tight' value='tight'/>
+ <cd:variable name='tight' value='resserre'/>
<cd:variable name='title' value='titre'/>
- <cd:variable name='toggle' value='toggle'/>
+ <cd:variable name='toggle' value='basculer'/>
<cd:variable name='tolerant' value='tolerant'/>
- <cd:variable name='top' value='sup'/>
+ <cd:variable name='top' value='haut'/>
<cd:variable name='tuesday' value='mardi'/>
<cd:variable name='two' value='deux'/>
<cd:variable name='txt' value='txt'/>
- <cd:variable name='type' value='type'/>
- <cd:variable name='typing' value='typing'/>
+ <cd:variable name='type' value='transcrire'/>
+ <cd:variable name='typing' value='transcription'/>
<cd:variable name='unavailable' value='indisponible'/>
- <cd:variable name='underbar' value='souslignetout'/>
- <cd:variable name='underbars' value='sousligne'/>
- <cd:variable name='understrike' value='understrike'/>
- <cd:variable name='understrikes' value='understrikes'/>
- <cd:variable name='unframed' value='unframed'/>
+ <cd:variable name='underbar' value='souligner'/>
+ <cd:variable name='underbars' value='soulignermots'/>
+ <cd:variable name='understrike' value='soubarrer'/>
+ <cd:variable name='understrikes' value='soubarrermots'/>
+ <cd:variable name='unframed' value='desencadre'/>
<cd:variable name='unicode' value='unicode'/>
<cd:variable name='unit' value='unite'/>
<cd:variable name='units' value='unites'/>
<cd:variable name='unknown' value='inconnu'/>
- <cd:variable name='unpacked' value='degroupe'/>
- <cd:variable name='up' value='up'/>
+ <cd:variable name='unpacked' value='avecespaceentreitem'/>
+ <cd:variable name='up' value='enhaut'/>
<cd:variable name='url' value='url'/>
- <cd:variable name='used' value='used'/>
+ <cd:variable name='used' value='utilise'/>
<cd:variable name='value' value='valeur'/>
- <cd:variable name='vertical' value='verticale'/>
+ <cd:variable name='vertical' value='vertical'/>
<cd:variable name='very' value='tres'/>
<cd:variable name='verystrict' value='tresstrict'/>
<cd:variable name='verytolerant' value='trestolerant'/>
- <cd:variable name='vfenced' value='vfenced'/>
+ <cd:variable name='vfenced' value='cloturev'/>
<cd:variable name='vulgarfraction' value='vulgarfraction'/>
- <cd:variable name='weak' value='weak'/>
+ <cd:variable name='weak' value='faible'/>
<cd:variable name='wednesday' value='mercredi'/>
<cd:variable name='week' value='semaine'/>
<cd:variable name='weekday' value='joursemaine'/>
@@ -619,7 +627,7 @@
<cd:variable name='wide' value='ample'/>
<cd:variable name='width' value='largeur'/>
<cd:variable name='word' value='mot'/>
- <cd:variable name='words' value='words'/>
+ <cd:variable name='words' value='mots'/>
<cd:variable name='xml' value='xml'/>
<cd:variable name='year' value='annee'/>
<cd:variable name='yes' value='oui'/>
@@ -630,46 +638,47 @@
<cd:constants>
<cd:constant name='action' value='action'/>
<cd:constant name='address' value='adresse'/>
- <cd:constant name='after' value='apres'/>
- <cd:constant name='afterhead' value='aprestete'/>
- <cd:constant name='afterkey' value='aprescle'/>
- <cd:constant name='aftersection' value='aftersection'/>
- <cd:constant name='align' value='alignement'/>
- <cd:constant name='aligncharacter' value='caracterealigne'/>
- <cd:constant name='alignmentcharacter' value='alignementcaractere'/>
- <cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
- <cd:constant name='alignmentleftwidth' value='alignmentleftwidth'/>
- <cd:constant name='alignmentrightsample' value='alignmentrightsample'/>
- <cd:constant name='alignmentrightwidth' value='alignmentrightwidth'/>
- <cd:constant name='alignsymbol' value='alignsymbol'/>
- <cd:constant name='aligntitle' value='alignementtitre'/>
- <cd:constant name='alternative' value='alternative'/>
- <cd:constant name='anchor' value='anchor'/>
- <cd:constant name='anchoring' value='anchoring'/>
- <cd:constant name='andtext' value='andtext'/>
+ <cd:constant name='after' value='après'/>
+ <cd:constant name='afterhead' value='aprèstête'/>
+ <cd:constant name='afterkey' value='aprèsclé'/>
+ <cd:constant name='aftersection' value='aprèssection'/>
+ <cd:constant name='align' value='aligner'/>
+ <cd:constant name='alignbottom' value='alignerbas'/>
+ <cd:constant name='aligncharacter' value='alignersurcaractere'/>
+ <cd:constant name='alignmentcharacter' value='caracterealignement'/>
+ <cd:constant name='alignmentleftsample' value='echantillongauchealignement'/>
+ <cd:constant name='alignmentleftwidth' value='largeurgauchealignement'/>
+ <cd:constant name='alignmentrightsample' value='echantillondroitealignement'/>
+ <cd:constant name='alignmentrightwidth' value='largeurdroitealignement'/>
+ <cd:constant name='alignsymbol' value='alignersursymbol'/>
+ <cd:constant name='aligntitle' value='alignersurtitre'/>
+ <cd:constant name='alternative' value='variante'/>
+ <cd:constant name='anchor' value='ancre'/>
+ <cd:constant name='anchoring' value='ancrage'/>
+ <cd:constant name='andtext' value='ettexte'/>
<cd:constant name='apa' value='apa'/>
<cd:constant name='arguments' value='arguments'/>
<cd:constant name='arrow' value='fleche'/>
- <cd:constant name='artauthor' value='artauthor'/>
- <cd:constant name='artauthoretaldisplay' value='artauthoretaldisplay'/>
- <cd:constant name='artauthoretallimit' value='artauthoretallimit'/>
- <cd:constant name='artauthoretaltext' value='artauthoretaltext'/>
- <cd:constant name='artoffset' value='artoffset'/>
- <cd:constant name='at' value='a'/>
+ <cd:constant name='artauthor' value='artauteur'/>
+ <cd:constant name='artauthoretaldisplay' value='artauteuretalaffichage'/>
+ <cd:constant name='artauthoretallimit' value='artauteuretallimite'/>
+ <cd:constant name='artauthoretaltext' value='artauteuretaltexte'/>
+ <cd:constant name='artoffset' value='artdecalage'/>
+ <cd:constant name='at' value='en'/>
<cd:constant name='author' value='auteur'/>
- <cd:constant name='authorconversion' value='authorconversion'/>
- <cd:constant name='authoretaldisplay' value='authoretaldisplay'/>
- <cd:constant name='authoretallimit' value='authoretallimit'/>
- <cd:constant name='authoretaltext' value='authoretaltext'/>
+ <cd:constant name='authorconversion' value='auteurconversion'/>
+ <cd:constant name='authoretaldisplay' value='auteuretalaffichage'/>
+ <cd:constant name='authoretallimit' value='auteuretallimite'/>
+ <cd:constant name='authoretaltext' value='auteuretaltexte'/>
<cd:constant name='auto' value='auto'/>
<cd:constant name='autocase' value='autocase'/>
- <cd:constant name='autofile' value='autofile'/>
+ <cd:constant name='autofile' value='autofichier'/>
<cd:constant name='autofocus' value='autofocus'/>
- <cd:constant name='autohang' value='autohang'/>
- <cd:constant name='autostrut' value='autostrut'/>
+ <cd:constant name='autohang' value='autosuspendre'/>
+ <cd:constant name='autostrut' value='autoentretoise'/>
<cd:constant name='autowidth' value='autolargeur'/>
- <cd:constant name='availableheight' value='availableheight'/>
- <cd:constant name='availablewidth' value='availablewidth'/>
+ <cd:constant name='availableheight' value='hauteurdisponible'/>
+ <cd:constant name='availablewidth' value='largeurdisponible'/>
<cd:constant name='axis' value='axe'/>
<cd:constant name='background' value='arriereplan'/>
<cd:constant name='backgroundcolor' value='couleurarriereplan'/>
@@ -678,164 +687,170 @@
<cd:constant name='backgroundoffset' value='decalagearriereplan'/>
<cd:constant name='backgroundradius' value='rayonarriereplan'/>
<cd:constant name='backgroundscreen' value='ecranarriereplan'/>
- <cd:constant name='backreference' value='backreference'/>
- <cd:constant name='backspace' value='retour'/>
- <cd:constant name='balance' value='equilibre'/>
+ <cd:constant name='backreference' value='retroreference'/>
+ <cd:constant name='backspace' value='espacearrière'/>
+ <cd:constant name='balance' value='equilibrer'/>
<cd:constant name='before' value='avant'/>
<cd:constant name='beforehead' value='avanttete'/>
- <cd:constant name='beforesection' value='beforesection'/>
- <cd:constant name='bet' value='bet'/>
+ <cd:constant name='beforesection' value='avantsection'/>
+ <cd:constant name='bet' value='suj'/>
<cd:constant name='bidi' value='bidi'/>
- <cd:constant name='big' value='grand'/>
- <cd:constant name='blank' value='vide'/>
- <cd:constant name='bleedoffset' value='bleedoffset'/>
- <cd:constant name='blockway' value='blockway'/>
- <cd:constant name='bodyfont' value='policecorps'/>
- <cd:constant name='boffset' value='boffset'/>
- <cd:constant name='boldfeatures' value='boldfeatures'/>
- <cd:constant name='boldfont' value='boldfont'/>
- <cd:constant name='bolditalicfeatures' value='bolditalicfeatures'/>
- <cd:constant name='bolditalicfont' value='bolditalicfont'/>
- <cd:constant name='boldslantedfeatures' value='boldslantedfeatures'/>
- <cd:constant name='boldslantedfont' value='boldslantedfont'/>
+ <cd:constant name='big' value='important'/>
+ <cd:constant name='blank' value='vierge'/>
+ <cd:constant name='bleedoffset' value='decalagefuite'/>
+ <cd:constant name='blockway' value='faconbloc'/>
+ <cd:constant name='bodyfont' value='policedecorps'/>
+ <cd:constant name='boffset' value='decalageb'/>
+ <cd:constant name='boldfeatures' value='fonctionnalitesgras'/>
+ <cd:constant name='boldfont' value='policegras'/>
+ <cd:constant name='bolditalicfeatures' value='fonctionnalitesgrasitalique'/>
+ <cd:constant name='bolditalicfont' value='policegrasitalique'/>
+ <cd:constant name='boldslantedfeatures' value='fonctionnalitesgrasincline'/>
+ <cd:constant name='boldslantedfont' value='policegrasincline'/>
<cd:constant name='bookmark' value='marquepage'/>
- <cd:constant name='bottom' value='inf'/>
- <cd:constant name='bottomafter' value='bottomafter'/>
- <cd:constant name='bottombefore' value='bottombefore'/>
- <cd:constant name='bottomcommand' value='bottomcommand'/>
- <cd:constant name='bottomdistance' value='distanceinf'/>
- <cd:constant name='bottomframe' value='cadreinf'/>
- <cd:constant name='bottomoffset' value='decalageinf'/>
- <cd:constant name='bottomspace' value='espaceinf'/>
- <cd:constant name='bottomstate' value='etatinf'/>
- <cd:constant name='break' value='break'/>
- <cd:constant name='buffer' value='buffer'/>
- <cd:constant name='cache' value='cache'/>
+ <cd:constant name='bottom' value='bas'/>
+ <cd:constant name='bottomafter' value='basaprès'/>
+ <cd:constant name='bottombefore' value='basavant'/>
+ <cd:constant name='bottomcommand' value='commandebas'/>
+ <cd:constant name='bottomdistance' value='distancebas'/>
+ <cd:constant name='bottomframe' value='cadrebas'/>
+ <cd:constant name='bottomoffset' value='decalagebas'/>
+ <cd:constant name='bottomspace' value='espacebas'/>
+ <cd:constant name='bottomstate' value='etatbas'/>
+ <cd:constant name='break' value='saut'/>
+ <cd:constant name='buffer' value='tampon'/>
+ <cd:constant name='cache' value='memoirecache'/>
<cd:constant name='calculate' value='calculer'/>
- <cd:constant name='category' value='category'/>
- <cd:constant name='ccommand' value='ccommande'/>
- <cd:constant name='character' value='character'/>
- <cd:constant name='characters' value='characters'/>
- <cd:constant name='check' value='check'/>
+ <cd:constant name='category' value='categorie'/>
+ <cd:constant name='ccommand' value='commandec'/>
+ <cd:constant name='character' value='caractere'/>
+ <cd:constant name='characters' value='caracteres'/>
+ <cd:constant name='check' value='verifier'/>
<cd:constant name='click' value='clic'/>
<cd:constant name='clickin' value='clicinterieur'/>
<cd:constant name='clickout' value='clicexterieur'/>
- <cd:constant name='clipoffset' value='clipoffset'/>
- <cd:constant name='closeaction' value='actionfermeture'/>
- <cd:constant name='closecommand' value='closecommand'/>
- <cd:constant name='closepage' value='closepage'/>
- <cd:constant name='closepageaction' value='actionfermeturepage'/>
- <cd:constant name='closesymbol' value='closesymbol'/>
+ <cd:constant name='clipoffset' value='decalagedecoupe'/>
+ <cd:constant name='closeaction' value='fermeraction'/>
+ <cd:constant name='closecommand' value='fermercommande'/>
+ <cd:constant name='closepage' value='fermerpage'/>
+ <cd:constant name='closepageaction' value='fermeractionpage'/>
+ <cd:constant name='closesymbol' value='fermersymbol'/>
<cd:constant name='color' value='couleur'/>
<cd:constant name='column' value='colonne'/>
<cd:constant name='columndistance' value='distancecolonne'/>
<cd:constant name='columns' value='colonnes'/>
- <cd:constant name='comma' value='comma'/>
+ <cd:constant name='comma' value='virgule'/>
<cd:constant name='command' value='commande'/>
- <cd:constant name='commandafter' value='commandeapres'/>
+ <cd:constant name='commandafter' value='commandeaprès'/>
<cd:constant name='commandbefore' value='commandeavant'/>
<cd:constant name='commands' value='commandes'/>
- <cd:constant name='comment' value='comment'/>
- <cd:constant name='commentchar' value='commentchar'/>
- <cd:constant name='commentoffset' value='commentoffset'/>
+ <cd:constant name='comment' value='commentaire'/>
+ <cd:constant name='commentchar' value='caracommentaire'/>
+ <cd:constant name='commentoffset' value='decalagecommentaire'/>
<cd:constant name='compact' value='compact'/>
<cd:constant name='component' value='composant'/>
- <cd:constant name='compoundhyphen' value='compoundhyphen'/>
- <cd:constant name='compress' value='compress'/>
- <cd:constant name='compressdistance' value='compressdistance'/>
- <cd:constant name='compressmethod' value='compressmethod'/>
- <cd:constant name='compressseparator' value='compressseparator'/>
- <cd:constant name='compressstopper' value='compressstopper'/>
- <cd:constant name='concerns' value='concerns'/>
- <cd:constant name='connector' value='connector'/>
- <cd:constant name='continue' value='continue'/>
- <cd:constant name='contrastcolor' value='coleurcontraste'/>
+ <cd:constant name='compoundhyphen' value='traitdunioncompose'/>
+ <cd:constant name='compress' value='reduire'/>
+ <cd:constant name='compressdistance' value='distancereduction'/>
+ <cd:constant name='compressmethod' value='methodereduction'/>
+ <cd:constant name='compressseparator' value='separateurreduction'/>
+ <cd:constant name='compressstopper' value='stoppeurreduction'/>
+ <cd:constant name='concerns' value='concerne'/>
+ <cd:constant name='connector' value='connecteur'/>
+ <cd:constant name='continue' value='continuer'/>
+ <cd:constant name='contrastcolor' value='couleurconstrast'/>
<cd:constant name='controls' value='controles'/>
<cd:constant name='conversion' value='conversion'/>
- <cd:constant name='convertfile' value='conversionfichier'/>
+ <cd:constant name='convertfile' value='convertirfichier'/>
<cd:constant name='copies' value='copies'/>
<cd:constant name='corner' value='coin'/>
<cd:constant name='coupling' value='couplage'/>
- <cd:constant name='couplingway' value='modecouplage'/>
+ <cd:constant name='couplingway' value='faconcouplage'/>
<cd:constant name='criterium' value='critere'/>
- <cd:constant name='cropoffset' value='cropoffset'/>
- <cd:constant name='crossreference' value='crossreference'/>
- <cd:constant name='cssfile' value='cssfile'/>
+ <cd:constant name='cropoffset' value='decalagerecadre'/>
+ <cd:constant name='crossreference' value='renvoi'/>
+ <cd:constant name='cssfile' value='fichiercss'/>
<cd:constant name='current' value='courant'/>
- <cd:constant name='cutspace' value='cutspace'/>
+ <cd:constant name='cutspace' value='espacecoupe'/>
<cd:constant name='dash' value='pointille'/>
<cd:constant name='dat' value='dat'/>
- <cd:constant name='database' value='database'/>
- <cd:constant name='dataset' value='dataset'/>
+ <cd:constant name='database' value='basededonnees'/>
+ <cd:constant name='dataset' value='jeudedonnees'/>
<cd:constant name='date' value='date'/>
- <cd:constant name='deepnumbercommand' value='deepnumbercommand'/>
- <cd:constant name='deeptextcommand' value='deeptextcommand'/>
+ <cd:constant name='deepnumbercommand' value='commandeprofondenumero'/>
+ <cd:constant name='deeptextcommand' value='commandeprofondetexte'/>
<cd:constant name='default' value='defaut'/>
- <cd:constant name='delay' value='delai'/>
+ <cd:constant name='defaultheight' value='defaultheight'/>
+ <cd:constant name='defaultwidth' value='defaultwidth'/>
+ <cd:constant name='define' value='define'/>
+ <cd:constant name='delay' value='retard'/>
<cd:constant name='depth' value='profondeur'/>
<cd:constant name='depthcorrection' value='correctionprofondeur'/>
<cd:constant name='direction' value='direction'/>
<cd:constant name='directory' value='repertoire'/>
<cd:constant name='display' value='affichage'/>
- <cd:constant name='displaythreshold' value='displaythreshold'/>
+ <cd:constant name='displaythreshold' value='seuilaffichage'/>
<cd:constant name='distance' value='distance'/>
- <cd:constant name='domain' value='domain'/>
+ <cd:constant name='domain' value='domaine'/>
<cd:constant name='dot' value='point'/>
<cd:constant name='doublesided' value='rectoverso'/>
- <cd:constant name='down' value='down'/>
- <cd:constant name='dummy' value='dummy'/>
+ <cd:constant name='down' value='enbas'/>
+ <cd:constant name='dummy' value='factice'/>
<cd:constant name='dx' value='dx'/>
<cd:constant name='dy' value='dy'/>
<cd:constant name='edge' value='bord'/>
<cd:constant name='edgedistance' value='distancebord'/>
- <cd:constant name='editor' value='editor'/>
- <cd:constant name='editoretaldisplay' value='editoretaldisplay'/>
- <cd:constant name='editoretallimit' value='editoretallimit'/>
- <cd:constant name='editoretaltext' value='editoretaltext'/>
+ <cd:constant name='editor' value='editeur'/>
+ <cd:constant name='editoretaldisplay' value='editeurealaffichage'/>
+ <cd:constant name='editoretallimit' value='editeureallimite'/>
+ <cd:constant name='editoretaltext' value='editeurealtexte'/>
<cd:constant name='empty' value='vide'/>
- <cd:constant name='entities' value='entities'/>
- <cd:constant name='entries' value='entries'/>
- <cd:constant name='equalheight' value='equalheight'/>
- <cd:constant name='equalwidth' value='equalwidth'/>
- <cd:constant name='escape' value='escape'/>
- <cd:constant name='etaldisplay' value='etaldisplay'/>
- <cd:constant name='etallimit' value='etallimit'/>
+ <cd:constant name='entities' value='entitees'/>
+ <cd:constant name='entries' value='entrees'/>
+ <cd:constant name='equalheight' value='hauteuregale'/>
+ <cd:constant name='equalwidth' value='margeuregale'/>
+ <cd:constant name='escape' value='echappatoire'/>
+ <cd:constant name='etaldisplay' value='etalaffichage'/>
+ <cd:constant name='etallimit' value='etallimite'/>
<cd:constant name='etaloption' value='etaloption'/>
- <cd:constant name='etaltext' value='etaltext'/>
+ <cd:constant name='etaltext' value='etalttexte'/>
<cd:constant name='evenmargin' value='margepaire'/>
<cd:constant name='exact' value='exact'/>
- <cd:constant name='exitoffset' value='exitoffset'/>
+ <cd:constant name='exitoffset' value='decalagesortie'/>
<cd:constant name='expansion' value='expansion'/>
- <cd:constant name='export' value='export'/>
+ <cd:constant name='export' value='exporter'/>
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='facteur'/>
- <cd:constant name='fallback' value='fallback'/>
+ <cd:constant name='fallback' value='repli'/>
+ <cd:constant name='fallbacks' value='replis'/>
<cd:constant name='family' value='famille'/>
- <cd:constant name='features' value='features'/>
- <cd:constant name='fences' value='fences'/>
- <cd:constant name='field' value='field'/>
+ <cd:constant name='features' value='fonctionnalites'/>
+ <cd:constant name='featureset' value='jeufonctionnalite'/>
+ <cd:constant name='fences' value='barrieres'/>
+ <cd:constant name='field' value='champ'/>
<cd:constant name='fieldbackgroundcolor' value='couleurarrierreplanchamp'/>
<cd:constant name='fieldframecolor' value='couleurcadrechamp'/>
<cd:constant name='fieldlayer' value='calquechamp'/>
- <cd:constant name='fieldoffset' value='offsetchamp'/>
+ <cd:constant name='fieldoffset' value='decalagechamp'/>
<cd:constant name='file' value='fichier'/>
- <cd:constant name='filler' value='filler'/>
- <cd:constant name='filter' value='filter'/>
- <cd:constant name='filtercommand' value='filtercommand'/>
- <cd:constant name='finalnamesep' value='finalnamesep'/>
- <cd:constant name='finalpagesep' value='finalpagesep'/>
- <cd:constant name='finalpubsep' value='finalpubsep'/>
+ <cd:constant name='filler' value='remplisseur'/>
+ <cd:constant name='filter' value='filtre'/>
+ <cd:constant name='filtercommand' value='commandefiltre'/>
+ <cd:constant name='finalnamesep' value='sepnomfinal'/>
+ <cd:constant name='finalpagesep' value='seppagefinale'/>
+ <cd:constant name='finalpubsep' value='seppubfinale'/>
<cd:constant name='first' value='premier'/>
- <cd:constant name='firstnamesep' value='firstnamesep'/>
+ <cd:constant name='firstnamesep' value='seppremiernom'/>
<cd:constant name='firstpage' value='premierepage'/>
<cd:constant name='focus' value='focus'/>
<cd:constant name='focusin' value='focusin'/>
- <cd:constant name='focusoffset' value='focusoffset'/>
+ <cd:constant name='focusoffset' value='decalagefocus'/>
<cd:constant name='focusout' value='focusout'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='pdp'/>
- <cd:constant name='footerdistance' value='dsitancepdp'/>
+ <cd:constant name='footerdistance' value='distancepdp'/>
<cd:constant name='footerstate' value='etatpdp'/>
- <cd:constant name='force' value='force'/>
+ <cd:constant name='force' value='forcer'/>
<cd:constant name='foregroundcolor' value='couleurpremierplan'/>
<cd:constant name='foregroundstyle' value='stylepremierplan'/>
<cd:constant name='format' value='formatter'/>
@@ -847,163 +862,168 @@
<cd:constant name='frameoffset' value='decalagecadre'/>
<cd:constant name='frameradius' value='rayoncadre'/>
<cd:constant name='frames' value='cadres'/>
- <cd:constant name='freeregion' value='freeregion'/>
+ <cd:constant name='freeregion' value='regionlibre'/>
<cd:constant name='from' value='de'/>
- <cd:constant name='functioncolor' value='functioncolor'/>
- <cd:constant name='functionstyle' value='functionstyle'/>
- <cd:constant name='get' value='obtient'/>
+ <cd:constant name='functioncolor' value='couleurfonction'/>
+ <cd:constant name='functionstyle' value='stylefonction'/>
+ <cd:constant name='get' value='obtenir'/>
<cd:constant name='global' value='global'/>
- <cd:constant name='goodies' value='goodies'/>
+ <cd:constant name='goodies' value='friandises'/>
<cd:constant name='grid' value='grille'/>
- <cd:constant name='group' value='group'/>
- <cd:constant name='groupsuffix' value='groupsuffix'/>
- <cd:constant name='hang' value='suspend'/>
- <cd:constant name='hcompact' value='hcompact'/>
- <cd:constant name='headalign' value='headalign'/>
+ <cd:constant name='group' value='groupe'/>
+ <cd:constant name='groupsuffix' value='suffixegroupe'/>
+ <cd:constant name='hang' value='suspendre'/>
+ <cd:constant name='hcompact' value='compacth'/>
+ <cd:constant name='headalign' value='alignertete'/>
<cd:constant name='headcolor' value='couleurtete'/>
<cd:constant name='headcommand' value='commandetete'/>
<cd:constant name='headconversion' value='conversiontete'/>
- <cd:constant name='header' value='entete'/>
- <cd:constant name='headerdistance' value='distanceentete'/>
- <cd:constant name='headerstate' value='etatentete'/>
+ <cd:constant name='header' value='entête'/>
+ <cd:constant name='headerdistance' value='distanceentête'/>
+ <cd:constant name='headerstate' value='etatentête'/>
<cd:constant name='headlabel' value='etiquettetete'/>
<cd:constant name='headnumber' value='numerotete'/>
- <cd:constant name='headseparator' value='headseparator'/>
+ <cd:constant name='headseparator' value='separateurtete'/>
<cd:constant name='headstyle' value='styletete'/>
<cd:constant name='height' value='hauteur'/>
- <cd:constant name='hfactor' value='facteurhauteur'/>
- <cd:constant name='hfil' value='hfil'/>
- <cd:constant name='hidenumber' value='hidenumber'/>
- <cd:constant name='hoffset' value='decalagehauteur'/>
- <cd:constant name='horizontal' value='horizontale'/>
- <cd:constant name='horoffset' value='horoffset'/>
- <cd:constant name='hyphen' value='hyphen'/>
- <cd:constant name='hyphens' value='hyphens'/>
- <cd:constant name='icommand' value='icommande'/>
- <cd:constant name='ignore' value='ignore'/>
- <cd:constant name='in' value='in'/>
+ <cd:constant name='hfactor' value='facteurh'/>
+ <cd:constant name='hfil' value='remplissageh'/>
+ <cd:constant name='hidenumber' value='cachernumero'/>
+ <cd:constant name='hoffset' value='decalageh'/>
+ <cd:constant name='horizontal' value='horizontal'/>
+ <cd:constant name='horoffset' value='decalagehor'/>
+ <cd:constant name='hyphen' value='traitdunion'/>
+ <cd:constant name='hyphens' value='traitsdunion'/>
+ <cd:constant name='icommand' value='commandei'/>
+ <cd:constant name='ignore' value='ignorer'/>
+ <cd:constant name='in' value='dans'/>
<cd:constant name='inbetween' value='entre'/>
- <cd:constant name='increment' value='incremente'/>
- <cd:constant name='incrementnumber' value='incrementenumero'/>
- <cd:constant name='indenting' value='composeenalinea'/>
- <cd:constant name='indentnext' value='indentesuivant'/>
+ <cd:constant name='increment' value='incrementer'/>
+ <cd:constant name='incrementnumber' value='incrementernumero'/>
+ <cd:constant name='indenting' value='indentation'/>
+ <cd:constant name='indentlist' value='indentlist'/>
+ <cd:constant name='indentnext' value='indenterauuivant'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='indicateur'/>
- <cd:constant name='initialsep' value='initialsep'/>
- <cd:constant name='inlinethreshold' value='inlinethreshold'/>
+ <cd:constant name='initialsep' value='sepinitial'/>
+ <cd:constant name='inlinethreshold' value='seuilenligne'/>
<cd:constant name='inner' value='interieur'/>
<cd:constant name='innermargin' value='margeinterieure'/>
<cd:constant name='inputfile' value='fichierentree'/>
- <cd:constant name='insidesection' value='insidesection'/>
+ <cd:constant name='insidesection' value='auseinsection'/>
<cd:constant name='instance' value='instance'/>
- <cd:constant name='intent' value='intent'/>
+ <cd:constant name='intent' value='intention'/>
<cd:constant name='interaction' value='interaction'/>
<cd:constant name='interlinespace' value='espaceinterligne'/>
- <cd:constant name='internalgrid' value='internalgrid'/>
- <cd:constant name='italicfeatures' value='italicfeatures'/>
- <cd:constant name='italicfont' value='italicfont'/>
- <cd:constant name='itemalign' value='itemalign'/>
- <cd:constant name='items' value='elements'/>
- <cd:constant name='joiners' value='joiners'/>
- <cd:constant name='journalconversion' value='journalconversion'/>
- <cd:constant name='juniorsep' value='juniorsep'/>
- <cd:constant name='keeptogether' value='keeptogether'/>
- <cd:constant name='ken' value='ken'/>
- <cd:constant name='keyexpansion' value='keyexpansion'/>
- <cd:constant name='keys' value='keys'/>
- <cd:constant name='keyword' value='motcle'/>
+ <cd:constant name='internalgrid' value='grilleinterieure'/>
+ <cd:constant name='italicfeatures' value='fonctionnalitesitalique'/>
+ <cd:constant name='italicfont' value='policeitalique'/>
+ <cd:constant name='itemalign' value='alignerelem'/>
+ <cd:constant name='items' value='élément'/>
+ <cd:constant name='joiners' value='joins'/>
+ <cd:constant name='journalconversion' value='conversionjournal'/>
+ <cd:constant name='juniorsep' value='sepjunior'/>
+ <cd:constant name='keeptogether' value='conserverensemble'/>
+ <cd:constant name='ken' value='rep'/>
+ <cd:constant name='keyexpansion' value='expansioncle'/>
+ <cd:constant name='keys' value='cles'/>
+ <cd:constant name='keyword' value='motclé'/>
<cd:constant name='label' value='etiquette'/>
- <cd:constant name='labeloffset' value='labeloffset'/>
- <cd:constant name='language' value='language'/>
- <cd:constant name='last' value='last'/>
- <cd:constant name='lastnamesep' value='lastnamesep'/>
+ <cd:constant name='labelalternative' value='varianteetiquette'/>
+ <cd:constant name='labelcolor' value='couleuretiquette'/>
+ <cd:constant name='labeloffset' value='decalageetiquette'/>
+ <cd:constant name='labelstyle' value='styleetiquette'/>
+ <cd:constant name='language' value='langue'/>
+ <cd:constant name='last' value='dernier'/>
+ <cd:constant name='lastnamesep' value='sepderniernom'/>
<cd:constant name='lastpage' value='dernierepage'/>
- <cd:constant name='lastpagesep' value='lastpagesep'/>
- <cd:constant name='lastpubsep' value='lastpubsep'/>
- <cd:constant name='layout' value='layout'/>
+ <cd:constant name='lastpagesep' value='sepdernierepage'/>
+ <cd:constant name='lastpubsep' value='sepdernierepub'/>
+ <cd:constant name='layout' value='miseenpage'/>
<cd:constant name='left' value='gauche'/>
<cd:constant name='leftcolor' value='couleurgauche'/>
- <cd:constant name='leftcompoundhyphen' value='leftcompoundhyphen'/>
+ <cd:constant name='leftcompoundhyphen' value='traitdunioncomposegauche'/>
<cd:constant name='leftedge' value='bordgauche'/>
<cd:constant name='leftedgedistance' value='distancebordgauche'/>
<cd:constant name='leftframe' value='cadregauche'/>
- <cd:constant name='lefthyphen' value='lefthyphen'/>
+ <cd:constant name='lefthyphen' value='traitduniongauche'/>
<cd:constant name='leftmargin' value='margegauche'/>
<cd:constant name='leftmargindistance' value='distancemargegauche'/>
<cd:constant name='leftoffset' value='decalagegauche'/>
<cd:constant name='leftquotation' value='citationgauche'/>
<cd:constant name='leftquote' value='citergauche'/>
- <cd:constant name='leftsample' value='leftsample'/>
+ <cd:constant name='leftsample' value='echantillongauche'/>
<cd:constant name='leftsentence' value='phrasegauche'/>
- <cd:constant name='leftspeech' value='leftspeech'/>
- <cd:constant name='leftstyle' value='leftstyle'/>
+ <cd:constant name='leftspeech' value='discoursgauche'/>
+ <cd:constant name='leftstyle' value='stylegauche'/>
<cd:constant name='leftsubsentence' value='sousphrasegauche'/>
<cd:constant name='lefttext' value='textegauche'/>
<cd:constant name='leftwidth' value='largeurgauche'/>
- <cd:constant name='leftwords' value='leftwords'/>
- <cd:constant name='less' value='less'/>
+ <cd:constant name='leftwords' value='motsgauche'/>
+ <cd:constant name='less' value='moins'/>
<cd:constant name='level' value='niveau'/>
<cd:constant name='levels' value='niveaux'/>
- <cd:constant name='limittext' value='limittext'/>
+ <cd:constant name='limittext' value='textelimite'/>
<cd:constant name='line' value='ligne'/>
<cd:constant name='linecorrection' value='correctionligne'/>
+ <cd:constant name='linedirection' value='linedirection'/>
<cd:constant name='lines' value='lignes'/>
<cd:constant name='list' value='liste'/>
<cd:constant name='listtext' value='texteliste'/>
<cd:constant name='local' value='local'/>
<cd:constant name='location' value='emplacement'/>
- <cd:constant name='loffset' value='loffset'/>
+ <cd:constant name='loffset' value='decalagel'/>
<cd:constant name='logo' value='logo'/>
<cd:constant name='logos' value='logos'/>
- <cd:constant name='marcolor' value='couleurmarquage'/>
+ <cd:constant name='marcolor' value='couleurrem'/>
<cd:constant name='margin' value='marge'/>
<cd:constant name='margindistance' value='distancemarge'/>
- <cd:constant name='marginedge' value='bordmarge'/>
- <cd:constant name='marginedgetext' value='textebordmarge'/>
+ <cd:constant name='marginedge' value='margebord'/>
+ <cd:constant name='marginedgetext' value='textemargebord'/>
<cd:constant name='margintext' value='textemarge'/>
- <cd:constant name='mark' value='mark'/>
+ <cd:constant name='mark' value='marque'/>
<cd:constant name='marking' value='marquage'/>
- <cd:constant name='marstyle' value='stylemarquage'/>
- <cd:constant name='mask' value='mask'/>
- <cd:constant name='mathclass' value='mathclass'/>
- <cd:constant name='mathlimits' value='mathlimits'/>
- <cd:constant name='mathstyle' value='mathstyle'/>
+ <cd:constant name='marstyle' value='stylerem'/>
+ <cd:constant name='mask' value='masque'/>
+ <cd:constant name='mathclass' value='classemath'/>
+ <cd:constant name='mathlimits' value='limitesmath'/>
+ <cd:constant name='mathstyle' value='stylemath'/>
<cd:constant name='max' value='max'/>
- <cd:constant name='maxdepth' value='maxdepth'/>
+ <cd:constant name='maxdepth' value='profondeurmax'/>
<cd:constant name='maxheight' value='hauteurmax'/>
<cd:constant name='maxwidth' value='largeurmax'/>
- <cd:constant name='maybeyear' value='maybeyear'/>
+ <cd:constant name='maybeyear' value='anneepeutetre'/>
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='methode'/>
<cd:constant name='middle' value='milieu'/>
- <cd:constant name='middlecolor' value='middlecolor'/>
- <cd:constant name='middlecommand' value='middlecommand'/>
- <cd:constant name='middlespeech' value='middlespeech'/>
- <cd:constant name='middlestyle' value='middlestyle'/>
- <cd:constant name='middletext' value='textecentre'/>
- <cd:constant name='middlewidth' value='middlewidth'/>
- <cd:constant name='midsentence' value='midsentence'/>
+ <cd:constant name='middlecolor' value='couleurmilieu'/>
+ <cd:constant name='middlecommand' value='commandemilieu'/>
+ <cd:constant name='middlespeech' value='discoursmilieu'/>
+ <cd:constant name='middlestyle' value='stylemilieu'/>
+ <cd:constant name='middletext' value='textemilieu'/>
+ <cd:constant name='middlewidth' value='largeurmilieu'/>
+ <cd:constant name='midsentence' value='milieuphrase'/>
<cd:constant name='min' value='min'/>
<cd:constant name='mindepth' value='profondeurmin'/>
<cd:constant name='minheight' value='hauteurmin'/>
<cd:constant name='minwidth' value='largeurmin'/>
- <cd:constant name='moffset' value='moffset'/>
- <cd:constant name='monthconversion' value='monthconversion'/>
- <cd:constant name='more' value='more'/>
- <cd:constant name='mpdepth' value='mpdepth'/>
- <cd:constant name='mpheight' value='mpheight'/>
- <cd:constant name='mpoffset' value='mpoffset'/>
- <cd:constant name='mpwidth' value='mpwidth'/>
+ <cd:constant name='moffset' value='decalagem'/>
+ <cd:constant name='monthconversion' value='conversionmois'/>
+ <cd:constant name='more' value='plus'/>
+ <cd:constant name='mpdepth' value='profondeurmp'/>
+ <cd:constant name='mpheight' value='hauteurmp'/>
+ <cd:constant name='mpoffset' value='decalagemp'/>
+ <cd:constant name='mpwidth' value='largeurmp'/>
<cd:constant name='n' value='n'/>
<cd:constant name='name' value='nom'/>
- <cd:constant name='namesep' value='namesep'/>
- <cd:constant name='nbottom' value='ninf'/>
+ <cd:constant name='namesep' value='sepnom'/>
+ <cd:constant name='nbottom' value='nbas'/>
<cd:constant name='nc' value='nc'/>
<cd:constant name='next' value='suivant'/>
- <cd:constant name='nextleft' value='nextleft'/>
- <cd:constant name='nextleftquotation' value='nextleftquotation'/>
- <cd:constant name='nextright' value='nextright'/>
- <cd:constant name='nextrightquotation' value='nextrightquotation'/>
+ <cd:constant name='nextleft' value='suivantgauche'/>
+ <cd:constant name='nextleftquotation' value='citationgauchesuivante'/>
+ <cd:constant name='nextright' value='suivantdroite'/>
+ <cd:constant name='nextrightquotation' value='citationdroitesuivante'/>
<cd:constant name='nl' value='nl'/>
<cd:constant name='nleft' value='ngauche'/>
<cd:constant name='nlines' value='nlignes'/>
@@ -1012,678 +1032,761 @@
<cd:constant name='notes' value='notes'/>
<cd:constant name='nr' value='nr'/>
<cd:constant name='nright' value='ndroite'/>
- <cd:constant name='ntop' value='nsup'/>
+ <cd:constant name='ntop' value='nhaut'/>
<cd:constant name='number' value='numero'/>
- <cd:constant name='numberalign' value='numberalign'/>
+ <cd:constant name='numberalign' value='alignernumero'/>
<cd:constant name='numbercolor' value='couleurnumero'/>
<cd:constant name='numbercommand' value='commandenumero'/>
- <cd:constant name='numberconversion' value='numberconversion'/>
- <cd:constant name='numberconversionset' value='numberconversionset'/>
- <cd:constant name='numberdistance' value='numberdistance'/>
- <cd:constant name='numbering' value='numerotation'/>
- <cd:constant name='numberorder' value='numberorder'/>
- <cd:constant name='numberprefix' value='numberprefix'/>
- <cd:constant name='numbersegments' value='numbersegments'/>
- <cd:constant name='numberseparator' value='separateurnumbero'/>
- <cd:constant name='numberseparatorset' value='numberseparatorset'/>
- <cd:constant name='numberset' value='numberset'/>
- <cd:constant name='numberstarter' value='numberstarter'/>
- <cd:constant name='numberstopper' value='numberstopper'/>
- <cd:constant name='numberstrut' value='numberstrut'/>
+ <cd:constant name='numberconversion' value='conversionnumero'/>
+ <cd:constant name='numberconversionset' value='jeuconversionnumero'/>
+ <cd:constant name='numberdistance' value='distancenumero'/>
+ <cd:constant name='numbering' value='numérotation'/>
+ <cd:constant name='numberorder' value='ordrenumero'/>
+ <cd:constant name='numberprefix' value='prefixenumero'/>
+ <cd:constant name='numbersegments' value='segmentsnumero'/>
+ <cd:constant name='numberseparator' value='separateurnumero'/>
+ <cd:constant name='numberseparatorset' value='jeuseparateurnumero'/>
+ <cd:constant name='numberset' value='jeunumero'/>
+ <cd:constant name='numberstarter' value='demarreurnumero'/>
+ <cd:constant name='numberstopper' value='stoppeurnumero'/>
+ <cd:constant name='numberstrut' value='entretoisenumero'/>
<cd:constant name='numberstyle' value='stylenumero'/>
- <cd:constant name='numberwidth' value='numberwidth'/>
+ <cd:constant name='numberwidth' value='largeurnumero'/>
<cd:constant name='nx' value='nx'/>
<cd:constant name='ny' value='ny'/>
<cd:constant name='object' value='objet'/>
<cd:constant name='obstruction' value='obstruction'/>
- <cd:constant name='oddmargin' value='margepaire'/>
- <cd:constant name='offset' value='offset'/>
- <cd:constant name='openaction' value='actionouverture'/>
- <cd:constant name='openpage' value='openpage'/>
- <cd:constant name='openpageaction' value='actionouverturepage'/>
- <cd:constant name='openup' value='openup'/>
- <cd:constant name='opticalsize' value='opticalsize'/>
+ <cd:constant name='oddmargin' value='margeimpaire'/>
+ <cd:constant name='offset' value='decalage'/>
+ <cd:constant name='openaction' value='actionouvrir'/>
+ <cd:constant name='openpage' value='ouvrirpage'/>
+ <cd:constant name='openpageaction' value='actionouvrirpage'/>
+ <cd:constant name='openup' value='ouverture'/>
+ <cd:constant name='opticalsize' value='tailleoptique'/>
<cd:constant name='option' value='option'/>
- <cd:constant name='order' value='order'/>
+ <cd:constant name='order' value='ordre'/>
<cd:constant name='orientation' value='orientation'/>
- <cd:constant name='otherstext' value='otherstext'/>
+ <cd:constant name='otherstext' value='texteautres'/>
<cd:constant name='outermargin' value='margeexterieure'/>
- <cd:constant name='overprint' value='overprint'/>
- <cd:constant name='ownerpassword' value='ownerpassword'/>
- <cd:constant name='ownnumber' value='numeroproprio'/>
- <cd:constant name='packcriterium' value='packcriterium'/>
+ <cd:constant name='overprint' value='surimpression'/>
+ <cd:constant name='ownerpassword' value='motdepasseproprietaire'/>
+ <cd:constant name='ownnumber' value='numeropropre'/>
+ <cd:constant name='packcriterium' value='criterepack'/>
<cd:constant name='page' value='page'/>
- <cd:constant name='pageboundaries' value='limitespage'/>
+ <cd:constant name='pageboundaries' value='frontierespage'/>
<cd:constant name='pagecolor' value='couleurpage'/>
- <cd:constant name='pagecolormodel' value='pagecolormodel'/>
+ <cd:constant name='pagecolormodel' value='modelecouleurpage'/>
<cd:constant name='pagecommand' value='commandepage'/>
- <cd:constant name='pageconnector' value='pageconnector'/>
- <cd:constant name='pageconversion' value='pageconversion'/>
- <cd:constant name='pageconversionset' value='pageconversionset'/>
- <cd:constant name='pageleft' value='pageleft'/>
- <cd:constant name='pagemethod' value='pagemethod'/>
+ <cd:constant name='pageconnector' value='connecteurpage'/>
+ <cd:constant name='pageconversion' value='conversionpage'/>
+ <cd:constant name='pageconversionset' value='jeuconversionpage'/>
+ <cd:constant name='pageleft' value='pagegauche'/>
+ <cd:constant name='pagemethod' value='methodepage'/>
<cd:constant name='pagenumber' value='numeropage'/>
- <cd:constant name='pageprefix' value='pageprefix'/>
- <cd:constant name='pageprefixconnector' value='pageprefixconnector'/>
- <cd:constant name='pageprefixconversion' value='pageprefixconversion'/>
- <cd:constant name='pageprefixconversionset' value='pageprefixconversionset'/>
- <cd:constant name='pageprefixsegments' value='pageprefixsegments'/>
- <cd:constant name='pageprefixseparatorset' value='pageprefixseparatorset'/>
- <cd:constant name='pageprefixset' value='pageprefixset'/>
- <cd:constant name='pageprefixstarter' value='pageprefixstarter'/>
- <cd:constant name='pageprefixstopper' value='pageprefixstopper'/>
- <cd:constant name='pageright' value='pageright'/>
- <cd:constant name='pagesegments' value='pagesegments'/>
- <cd:constant name='pagesep' value='pagesep'/>
- <cd:constant name='pageseparatorset' value='pageseparatorset'/>
- <cd:constant name='pageset' value='pageset'/>
- <cd:constant name='pagestarter' value='pagestarter'/>
+ <cd:constant name='pageprefix' value='prefixepage'/>
+ <cd:constant name='pageprefixconnector' value='connecteurprefixepage'/>
+ <cd:constant name='pageprefixconversion' value='conversionprefixepage'/>
+ <cd:constant name='pageprefixconversionset' value='jeuconversionprefixepage'/>
+ <cd:constant name='pageprefixsegments' value='segmentsprefixepage'/>
+ <cd:constant name='pageprefixseparatorset' value='jeuseparateurprefixepage'/>
+ <cd:constant name='pageprefixset' value='jeuprefixepage'/>
+ <cd:constant name='pageprefixstarter' value='demarreurprefixepage'/>
+ <cd:constant name='pageprefixstopper' value='stoppeurprefixpage'/>
+ <cd:constant name='pageright' value='pagedroite'/>
+ <cd:constant name='pagesegments' value='segmentspage'/>
+ <cd:constant name='pagesep' value='seppage'/>
+ <cd:constant name='pageseparatorset' value='jeuseparateurpage'/>
+ <cd:constant name='pageset' value='jeupage'/>
+ <cd:constant name='pagestarter' value='demarreurpage'/>
<cd:constant name='pagestate' value='etatpage'/>
- <cd:constant name='pagestopper' value='pagestopper'/>
+ <cd:constant name='pagestopper' value='stoppeurpage'/>
<cd:constant name='pagestyle' value='stylepage'/>
<cd:constant name='palet' value='palette'/>
<cd:constant name='paper' value='papier'/>
<cd:constant name='paragraph' value='paragraphe'/>
- <cd:constant name='period' value='period'/>
- <cd:constant name='place' value='place'/>
- <cd:constant name='placehead' value='placetete'/>
- <cd:constant name='placestopper' value='emplacementstopper'/>
+ <cd:constant name='period' value='periode'/>
+ <cd:constant name='place' value='placer'/>
+ <cd:constant name='placehead' value='placertete'/>
+ <cd:constant name='placeholder' value='placeholder'/>
+ <cd:constant name='placestopper' value='placerstoppeur'/>
<cd:constant name='position' value='position'/>
<cd:constant name='prefix' value='prefixe'/>
- <cd:constant name='prefixconnector' value='prefixconnector'/>
- <cd:constant name='prefixconversion' value='prefixconversion'/>
- <cd:constant name='prefixconversionset' value='prefixconversionset'/>
- <cd:constant name='prefixsegments' value='prefixsegments'/>
- <cd:constant name='prefixseparatorset' value='prefixseparatorset'/>
- <cd:constant name='prefixset' value='prefixset'/>
- <cd:constant name='prefixstarter' value='prefixstarter'/>
- <cd:constant name='prefixstopper' value='prefixstopper'/>
- <cd:constant name='preset' value='prereglage'/>
- <cd:constant name='preview' value='previsualisation'/>
+ <cd:constant name='prefixconnector' value='connecteurprefixe'/>
+ <cd:constant name='prefixconversion' value='conversionprefixe'/>
+ <cd:constant name='prefixconversionset' value='jeuconversionprefixe'/>
+ <cd:constant name='prefixsegments' value='segmentsprefixe'/>
+ <cd:constant name='prefixseparatorset' value='jeuseparateurprefixe'/>
+ <cd:constant name='prefixset' value='jeuprefixe'/>
+ <cd:constant name='prefixstarter' value='demarreurprefixe'/>
+ <cd:constant name='prefixstopper' value='stoppeurprefixe'/>
+ <cd:constant name='preset' value='preregler'/>
+ <cd:constant name='preview' value='apercu'/>
<cd:constant name='previous' value='precedent'/>
<cd:constant name='previousnumber' value='numeroprecedent'/>
- <cd:constant name='print' value='print'/>
- <cd:constant name='printable' value='editable'/>
- <cd:constant name='process' value='process'/>
- <cd:constant name='profile' value='profile'/>
- <cd:constant name='properties' value='properties'/>
- <cd:constant name='pubsep' value='pubsep'/>
- <cd:constant name='quotechar' value='quotechar'/>
+ <cd:constant name='print' value='imprimer'/>
+ <cd:constant name='printable' value='imprimable'/>
+ <cd:constant name='process' value='traiter'/>
+ <cd:constant name='processors' value='processors'/>
+ <cd:constant name='profile' value='profil'/>
+ <cd:constant name='properties' value='proprietes'/>
+ <cd:constant name='pubsep' value='seppub'/>
+ <cd:constant name='quotechar' value='caracitation'/>
<cd:constant name='radius' value='rayon'/>
<cd:constant name='random' value='aleatoire'/>
- <cd:constant name='range' value='range'/>
+ <cd:constant name='range' value='gamme'/>
<cd:constant name='reduction' value='reduction'/>
<cd:constant name='ref' value='ref'/>
- <cd:constant name='refcommand' value='refcommand'/>
+ <cd:constant name='refcommand' value='commanderef'/>
<cd:constant name='reference' value='reference'/>
- <cd:constant name='referencemethod' value='referencemethod'/>
- <cd:constant name='referenceprefix' value='referenceprefix'/>
- <cd:constant name='referencing' value='referencing'/>
+ <cd:constant name='referencemethod' value='methodereference'/>
+ <cd:constant name='referenceprefix' value='prefixereference'/>
+ <cd:constant name='referencetext' value='referencetext'/>
+ <cd:constant name='referencing' value='referencement'/>
<cd:constant name='region' value='region'/>
- <cd:constant name='regionin' value='entreregion'/>
- <cd:constant name='regionout' value='regionexterieure'/>
- <cd:constant name='register' value='register'/>
- <cd:constant name='regularfeatures' value='regularfeatures'/>
- <cd:constant name='regularfont' value='regularfont'/>
- <cd:constant name='renderingsetup' value='renderingsetup'/>
- <cd:constant name='repeat' value='repete'/>
- <cd:constant name='reset' value='reset'/>
+ <cd:constant name='regionin' value='regiondedans'/>
+ <cd:constant name='regionout' value='regiondehors'/>
+ <cd:constant name='register' value='registre'/>
+ <cd:constant name='regularfeatures' value='fonctionnalitesordinaires'/>
+ <cd:constant name='regularfont' value='policereordinaire'/>
+ <cd:constant name='renderingsetup' value='configurationrendu'/>
+ <cd:constant name='repeat' value='repeter'/>
+ <cd:constant name='reset' value='raz'/>
<cd:constant name='resetnumber' value='raznumero'/>
<cd:constant name='resolution' value='resolution'/>
- <cd:constant name='resources' value='resources'/>
- <cd:constant name='reverse' value='inverse'/>
+ <cd:constant name='resources' value='ressources'/>
+ <cd:constant name='reverse' value='inverser'/>
<cd:constant name='right' value='droite'/>
- <cd:constant name='rightchars' value='rightchars'/>
+ <cd:constant name='rightchars' value='caracteresdroite'/>
<cd:constant name='rightcolor' value='couleurdroite'/>
- <cd:constant name='rightcompoundhyphen' value='rightcompoundhyphen'/>
+ <cd:constant name='rightcompoundhyphen' value='traitdunioncomposedroite'/>
<cd:constant name='rightedge' value='borddroit'/>
<cd:constant name='rightedgedistance' value='distanceborddroit'/>
- <cd:constant name='rightframe' value='cadredroit'/>
- <cd:constant name='righthyphen' value='righthyphen'/>
+ <cd:constant name='rightframe' value='cadredroite'/>
+ <cd:constant name='righthyphen' value='traitduniondroite'/>
<cd:constant name='rightmargin' value='margedroite'/>
<cd:constant name='rightmargindistance' value='distancemargedroite'/>
- <cd:constant name='rightoffset' value='rightoffset'/>
+ <cd:constant name='rightoffset' value='decalagedroite'/>
<cd:constant name='rightquotation' value='citationdroite'/>
<cd:constant name='rightquote' value='citerdroite'/>
- <cd:constant name='rightsample' value='rightsample'/>
+ <cd:constant name='rightsample' value='echantillondroite'/>
<cd:constant name='rightsentence' value='phrasedroite'/>
- <cd:constant name='rightspeech' value='rightspeech'/>
+ <cd:constant name='rightspeech' value='discoursdroite'/>
<cd:constant name='rightstyle' value='styledroit'/>
<cd:constant name='rightsubsentence' value='sousphrasedroite'/>
- <cd:constant name='righttext' value='textedroit'/>
+ <cd:constant name='righttext' value='textedroite'/>
<cd:constant name='rightwidth' value='largeurdroite'/>
- <cd:constant name='rightwords' value='rightwords'/>
- <cd:constant name='roffset' value='roffset'/>
+ <cd:constant name='rightwords' value='motsdroite'/>
+ <cd:constant name='roffset' value='decalager'/>
<cd:constant name='rotation' value='rotation'/>
- <cd:constant name='rule' value='ligne'/>
- <cd:constant name='rulecolor' value='couleurligne'/>
- <cd:constant name='rulecommand' value='rulecommand'/>
- <cd:constant name='rulethickness' value='epaisseurligne'/>
+ <cd:constant name='rule' value='trait'/>
+ <cd:constant name='rulecolor' value='couleurtrait'/>
+ <cd:constant name='rulecommand' value='commandetrait'/>
+ <cd:constant name='rulethickness' value='epaisseurtrait'/>
<cd:constant name='samepage' value='memepage'/>
<cd:constant name='sample' value='echantillon'/>
- <cd:constant name='samplesize' value='samplesize'/>
- <cd:constant name='saveinlist' value='saveinlist'/>
+ <cd:constant name='samplesize' value='tailleechantillon'/>
+ <cd:constant name='saveinlist' value='enregistrerdansliste'/>
<cd:constant name='scale' value='echelle'/>
- <cd:constant name='scope' value='scope'/>
+ <cd:constant name='scope' value='perimetre'/>
<cd:constant name='screen' value='ecran'/>
<cd:constant name='section' value='section'/>
- <cd:constant name='sectionblock' value='sectionblock'/>
- <cd:constant name='sectionconversion' value='sectionconversion'/>
- <cd:constant name='sectionconversionset' value='sectionconversionset'/>
+ <cd:constant name='sectionblock' value='blocsection'/>
+ <cd:constant name='sectionconversion' value='conversionsection'/>
+ <cd:constant name='sectionconversionset' value='jeuconversionsection'/>
<cd:constant name='sectionnumber' value='numerosection'/>
- <cd:constant name='sectionresetset' value='sectionresetset'/>
- <cd:constant name='sectionsegments' value='sectionsegments'/>
- <cd:constant name='sectionseparatorset' value='sectionseparatorset'/>
- <cd:constant name='sectionset' value='sectionset'/>
- <cd:constant name='sectionstarter' value='sectionstarter'/>
- <cd:constant name='sectionstopper' value='sectionstopper'/>
+ <cd:constant name='sectionresetset' value='jeurazsection'/>
+ <cd:constant name='sectionsegments' value='segmentssection'/>
+ <cd:constant name='sectionseparatorset' value='jeuseparateursection'/>
+ <cd:constant name='sectionset' value='jeusection'/>
+ <cd:constant name='sectionstarter' value='demarreursection'/>
+ <cd:constant name='sectionstopper' value='stoppeursection'/>
<cd:constant name='separator' value='separateur'/>
- <cd:constant name='separatorcolor' value='separatorcolor'/>
- <cd:constant name='separatorstyle' value='separatorstyle'/>
- <cd:constant name='set' value='set'/>
+ <cd:constant name='separatorcolor' value='couleurseparateur'/>
+ <cd:constant name='separatorstyle' value='styleseparateur'/>
+ <cd:constant name='set' value='regler'/>
<cd:constant name='setups' value='setups'/>
- <cd:constant name='shrink' value='shrink'/>
+ <cd:constant name='shrink' value='retrecir'/>
<cd:constant name='side' value='cote'/>
- <cd:constant name='sidealign' value='sidealign'/>
- <cd:constant name='sidemethod' value='sidemethod'/>
- <cd:constant name='sidespaceafter' value='espacelateralapres'/>
+ <cd:constant name='sidealign' value='alignercote'/>
+ <cd:constant name='sidemethod' value='methodecote'/>
+ <cd:constant name='sidespaceafter' value='espacelatéralaprès'/>
<cd:constant name='sidespacebefore' value='espacelateralavant'/>
- <cd:constant name='sidespaceinbetween' value='sidespaceinbetween'/>
- <cd:constant name='sidethreshold' value='sidethreshold'/>
+ <cd:constant name='sidespaceinbetween' value='espacelateralentre'/>
+ <cd:constant name='sidethreshold' value='seuilcote'/>
<cd:constant name='sign' value='signe'/>
- <cd:constant name='simplecommand' value='simplecommand'/>
- <cd:constant name='size' value='dimension'/>
- <cd:constant name='slantedfeatures' value='slantedfeatures'/>
- <cd:constant name='slantedfont' value='slantedfont'/>
+ <cd:constant name='simplecommand' value='commandesimple'/>
+ <cd:constant name='size' value='taille'/>
+ <cd:constant name='slantedfeatures' value='fonctionnalitesincline'/>
+ <cd:constant name='slantedfont' value='policeinclinee'/>
<cd:constant name='small' value='petit'/>
- <cd:constant name='smallcapsfeatures' value='smallcapsfeatures'/>
- <cd:constant name='smallcapsfont' value='smallcapsfont'/>
+ <cd:constant name='smallcapsfeatures' value='fonctionnalitespetitescaps'/>
+ <cd:constant name='smallcapsfont' value='policepetitescaps'/>
<cd:constant name='solution' value='solution'/>
- <cd:constant name='sort' value='sort'/>
- <cd:constant name='sorttype' value='sorttype'/>
- <cd:constant name='source' value='origine'/>
+ <cd:constant name='sort' value='trier'/>
+ <cd:constant name='sorttype' value='modetri'/>
+ <cd:constant name='source' value='source'/>
<cd:constant name='space' value='espace'/>
- <cd:constant name='spaceafter' value='espaceapres'/>
- <cd:constant name='spaceafterside' value='spaceafterside'/>
+ <cd:constant name='spaceafter' value='espaceaprès'/>
+ <cd:constant name='spaceafterside' value='espaceaprèscoté'/>
<cd:constant name='spacebefore' value='espaceavant'/>
- <cd:constant name='spacebeforeside' value='spacebeforeside'/>
- <cd:constant name='spaceinbetween' value='spaceinbetween'/>
+ <cd:constant name='spacebeforeside' value='espaceavantcote'/>
+ <cd:constant name='spaceinbetween' value='espaceentre'/>
<cd:constant name='spacing' value='espacement'/>
<cd:constant name='specification' value='specification'/>
- <cd:constant name='split' value='split'/>
- <cd:constant name='splitcolor' value='splitcolor'/>
- <cd:constant name='splitmethod' value='splitmethod'/>
- <cd:constant name='splitoffset' value='splitoffset'/>
- <cd:constant name='spot' value='spot'/>
- <cd:constant name='stack' value='stack'/>
- <cd:constant name='stackname' value='stackname'/>
- <cd:constant name='start' value='demarre'/>
- <cd:constant name='starter' value='starter'/>
- <cd:constant name='state' value='etat'/>
- <cd:constant name='step' value='pas'/>
- <cd:constant name='stop' value='stoppe'/>
- <cd:constant name='stopper' value='taquet'/>
- <cd:constant name='stretch' value='etire'/>
- <cd:constant name='strip' value='strip'/>
- <cd:constant name='strut' value='strut'/>
+ <cd:constant name='split' value='partager'/>
+ <cd:constant name='splitcolor' value='couleurpartage'/>
+ <cd:constant name='splitmethod' value='methodepartage'/>
+ <cd:constant name='splitoffset' value='decalagepartage'/>
+ <cd:constant name='spot' value='tondirect'/>
+ <cd:constant name='stack' value='pile'/>
+ <cd:constant name='stackname' value='nompile'/>
+ <cd:constant name='start' value='début'/>
+ <cd:constant name='starter' value='demarreur'/>
+ <cd:constant name='state' value='état'/>
+ <cd:constant name='step' value='etape'/>
+ <cd:constant name='stop' value='fin'/>
+ <cd:constant name='stopper' value='stoppeur'/>
+ <cd:constant name='stretch' value='etirer'/>
+ <cd:constant name='strip' value='bande'/>
+ <cd:constant name='strut' value='entretoise'/>
<cd:constant name='style' value='style'/>
- <cd:constant name='stylealternative' value='stylealternative'/>
+ <cd:constant name='stylealternative' value='variantestyle'/>
<cd:constant name='sub' value='sous'/>
<cd:constant name='subtitle' value='soustitre'/>
- <cd:constant name='suffix' value='suffix'/>
- <cd:constant name='suffixseparator' value='suffixseparator'/>
- <cd:constant name='suffixstopper' value='suffixstopper'/>
- <cd:constant name='surnamefirstnamesep' value='surnamefirstnamesep'/>
- <cd:constant name='surnameinitialsep' value='surnameinitialsep'/>
- <cd:constant name='surnamesep' value='surnamesep'/>
- <cd:constant name='svgstyle' value='svgstyle'/>
+ <cd:constant name='suffix' value='suffixe'/>
+ <cd:constant name='suffixseparator' value='separateursuffixe'/>
+ <cd:constant name='suffixstopper' value='stoppeursuffixe'/>
+ <cd:constant name='surnamefirstnamesep' value='sepnomfamilleprenom'/>
+ <cd:constant name='surnameinitialsep' value='sepnomfamilleinitial'/>
+ <cd:constant name='surnamesep' value='seprenom'/>
+ <cd:constant name='svgstyle' value='stylesvg'/>
<cd:constant name='sx' value='sx'/>
<cd:constant name='sy' value='sy'/>
- <cd:constant name='symalign' value='symalignement'/>
+ <cd:constant name='symalign' value='alignersym'/>
<cd:constant name='symbol' value='symbole'/>
- <cd:constant name='symbolcommand' value='symbolcommand'/>
+ <cd:constant name='symbolcommand' value='commandesymbole'/>
<cd:constant name='symbolset' value='jeusymbole'/>
<cd:constant name='symcolor' value='couleursym'/>
<cd:constant name='symstyle' value='stylesym'/>
<cd:constant name='synonym' value='synonyme'/>
<cd:constant name='synonymcolor' value='couleursynonyme'/>
- <cd:constant name='synonymcommand' value='synonymcommand'/>
+ <cd:constant name='synonymcommand' value='commandesynonyme'/>
<cd:constant name='synonymstyle' value='stylesynonyme'/>
<cd:constant name='tab' value='tab'/>
<cd:constant name='text' value='texte'/>
- <cd:constant name='textalign' value='textalign'/>
+ <cd:constant name='textalign' value='alignertexte'/>
<cd:constant name='textcolor' value='couleurtexte'/>
<cd:constant name='textcommand' value='commandetexte'/>
<cd:constant name='textdistance' value='distancetexte'/>
<cd:constant name='textheight' value='hauteurtexte'/>
<cd:constant name='textlayer' value='calquetexte'/>
<cd:constant name='textmargin' value='margetexte'/>
- <cd:constant name='textmethod' value='textmethod'/>
+ <cd:constant name='textmethod' value='methodetexte'/>
<cd:constant name='textseparator' value='separateurtexte'/>
<cd:constant name='textsize' value='tailletexte'/>
<cd:constant name='textstate' value='etattexte'/>
<cd:constant name='textstyle' value='styletexte'/>
<cd:constant name='textwidth' value='largeurtexte'/>
- <cd:constant name='threshold' value='threshold'/>
- <cd:constant name='time' value='time'/>
+ <cd:constant name='threshold' value='seuil'/>
+ <cd:constant name='time' value='temps'/>
<cd:constant name='title' value='titre'/>
<cd:constant name='titlecolor' value='couleurtitre'/>
- <cd:constant name='titlecommand' value='titlecommand'/>
+ <cd:constant name='titlecommand' value='commandetitre'/>
<cd:constant name='titledistance' value='distancetitre'/>
- <cd:constant name='titleleft' value='titleleft'/>
- <cd:constant name='titleright' value='titleright'/>
- <cd:constant name='titlestrut' value='titlestrut'/>
+ <cd:constant name='titleleft' value='gauchetitre'/>
+ <cd:constant name='titleright' value='droitetitre'/>
+ <cd:constant name='titlestrut' value='entretoisetitre'/>
<cd:constant name='titlestyle' value='styletitre'/>
<cd:constant name='to' value='vers'/>
- <cd:constant name='toffset' value='toffset'/>
+ <cd:constant name='toffset' value='decalaget'/>
<cd:constant name='tolerance' value='tolerance'/>
- <cd:constant name='top' value='sup'/>
- <cd:constant name='topcommand' value='topcommand'/>
- <cd:constant name='topdistance' value='distancesup'/>
- <cd:constant name='topframe' value='cadresup'/>
- <cd:constant name='topoffset' value='decalagesup'/>
- <cd:constant name='topspace' value='espacesup'/>
- <cd:constant name='topstate' value='etatsup'/>
- <cd:constant name='totalnumber' value='totalnumber'/>
- <cd:constant name='transform' value='transform'/>
- <cd:constant name='translate' value='translate'/>
- <cd:constant name='trimoffset' value='trimoffset'/>
- <cd:constant name='type' value='type'/>
+ <cd:constant name='top' value='haut'/>
+ <cd:constant name='topcommand' value='commandehaut'/>
+ <cd:constant name='topdistance' value='distancehaut'/>
+ <cd:constant name='topframe' value='cadrehaut'/>
+ <cd:constant name='topoffset' value='decalagehaut'/>
+ <cd:constant name='topspace' value='espacehaut'/>
+ <cd:constant name='topstate' value='etathaut'/>
+ <cd:constant name='totalnumber' value='nombretotal'/>
+ <cd:constant name='transform' value='transformer'/>
+ <cd:constant name='translate' value='traduire'/>
+ <cd:constant name='trimoffset' value='decalagecoupe'/>
+ <cd:constant name='type' value='transcrire'/>
<cd:constant name='unit' value='unite'/>
<cd:constant name='unknownreference' value='referenceinconnue'/>
- <cd:constant name='up' value='up'/>
- <cd:constant name='urlalternative' value='alternativeurl'/>
+ <cd:constant name='up' value='enhaut'/>
+ <cd:constant name='urlalternative' value='varianteurl'/>
<cd:constant name='urlspace' value='espaceurl'/>
- <cd:constant name='userpassword' value='userpassword'/>
+ <cd:constant name='userpassword' value='motdepasseutilisateur'/>
<cd:constant name='validate' value='valider'/>
- <cd:constant name='values' value='values'/>
- <cd:constant name='vcommand' value='vcommande'/>
- <cd:constant name='vcompact' value='vcompact'/>
- <cd:constant name='vector' value='vector'/>
- <cd:constant name='veroffset' value='veroffset'/>
- <cd:constant name='vertical' value='verticale'/>
- <cd:constant name='vfactor' value='vfactor'/>
- <cd:constant name='vfil' value='vfil'/>
- <cd:constant name='viewerprefix' value='viewerprefix'/>
- <cd:constant name='voffset' value='voffset'/>
- <cd:constant name='vonsep' value='vonsep'/>
- <cd:constant name='way' value='mode'/>
- <cd:constant name='wfactor' value='facteurlargeur'/>
+ <cd:constant name='values' value='valeurs'/>
+ <cd:constant name='vcommand' value='commandev'/>
+ <cd:constant name='vcompact' value='compactv'/>
+ <cd:constant name='vector' value='vecteur'/>
+ <cd:constant name='veroffset' value='decalagever'/>
+ <cd:constant name='vertical' value='vertical'/>
+ <cd:constant name='vfactor' value='facteurv'/>
+ <cd:constant name='vfil' value='remplissagev'/>
+ <cd:constant name='viewerprefix' value='prefixevisualisateur'/>
+ <cd:constant name='voffset' value='decalagev'/>
+ <cd:constant name='vonsep' value='sepvon'/>
+ <cd:constant name='way' value='maniere'/>
+ <cd:constant name='wfactor' value='facteurw'/>
<cd:constant name='white' value='blanc'/>
<cd:constant name='width' value='largeur'/>
- <cd:constant name='words' value='words'/>
- <cd:constant name='xanchor' value='xanchor'/>
- <cd:constant name='xfactor' value='xfactor'/>
+ <cd:constant name='words' value='mots'/>
+ <cd:constant name='xanchor' value='ancrex'/>
+ <cd:constant name='xfactor' value='facteurx'/>
<cd:constant name='xhtml' value='xhtml'/>
<cd:constant name='xmax' value='xmax'/>
- <cd:constant name='xmlsetup' value='xmlsetup'/>
- <cd:constant name='xoffset' value='xoffset'/>
- <cd:constant name='xscale' value='xscale'/>
- <cd:constant name='xstep' value='xstep'/>
- <cd:constant name='yanchor' value='yanchor'/>
- <cd:constant name='yfactor' value='yfactor'/>
+ <cd:constant name='xmlsetup' value='configurationxml'/>
+ <cd:constant name='xoffset' value='decalagex'/>
+ <cd:constant name='xscale' value='echellex'/>
+ <cd:constant name='xstep' value='etapex'/>
+ <cd:constant name='yanchor' value='ancrey'/>
+ <cd:constant name='yfactor' value='facteury'/>
<cd:constant name='ymax' value='ymax'/>
- <cd:constant name='yoffset' value='yoffset'/>
- <cd:constant name='yscale' value='yscale'/>
- <cd:constant name='ystep' value='ystep'/>
+ <cd:constant name='yoffset' value='decalagey'/>
+ <cd:constant name='yscale' value='echelley'/>
+ <cd:constant name='ystep' value='etapey'/>
</cd:constants>
<!-- definitions for interface elements for language fr -->
<cd:elements>
- <cd:element name='answerlines' value='answerlines'/>
- <cd:element name='answerspace' value='answerspace'/>
- <cd:element name='begin' value='debut'/>
- <cd:element name='complete' value='complete'/>
+ <cd:element name='answerlines' value='lignesreponse'/>
+ <cd:element name='answerspace' value='espacereponse'/>
+ <cd:element name='begin' value='commencer'/>
+ <cd:element name='complete' value='complet'/>
<cd:element name='coupled' value='couple'/>
<cd:element name='currentlocal' value='localcourant'/>
- <cd:element name='end' value='fin'/>
+ <cd:element name='end' value='terminer'/>
<cd:element name='endsetup' value=''/>
- <cd:element name='get' value='obtient'/>
- <cd:element name='increment' value='incremente'/>
+ <cd:element name='get' value='obtenir'/>
+ <cd:element name='increment' value='incrementer'/>
<cd:element name='list' value='liste'/>
<cd:element name='listof' value='listede'/>
- <cd:element name='load' value='charge'/>
+ <cd:element name='load' value='charger'/>
<cd:element name='local' value='local'/>
- <cd:element name='makeup' value='makeup'/>
+ <cd:element name='makeup' value='composition'/>
<cd:element name='next' value='suivant'/>
- <cd:element name='place' value='place'/>
+ <cd:element name='place' value='placer'/>
<cd:element name='previous' value='precedent'/>
<cd:element name='previouslocal' value='localprecedent'/>
<cd:element name='reserve' value='reserver'/>
- <cd:element name='see' value='voit'/>
- <cd:element name='setup' value='regle'/>
- <cd:element name='start' value='demarre'/>
- <cd:element name='stop' value='stoppe'/>
+ <cd:element name='see' value='voir'/>
+ <cd:element name='setup' value='configurer'/>
+ <cd:element name='start' value='début'/>
+ <cd:element name='stop' value='fin'/>
<cd:element name='text' value='texte'/>
- <cd:element name='type' value='type'/>
+ <cd:element name='type' value='transcrire'/>
</cd:elements>
<!-- definitions for interface commands for language fr -->
<cd:commands>
- <cd:command name='CAPPED' value='CAP'/>
<cd:command name='Character' value='Caractere'/>
<cd:command name='Characters' value='Caracteres'/>
<cd:command name='MONTH' value='MOIS'/>
<cd:command name='Numbers' value='Numeros'/>
<cd:command name='Romannumerals' value='Chiffresromains'/>
- <cd:command name='SmallCapped' value='Cap'/>
- <cd:command name='SmallCaps' value='Caps'/>
+ <cd:command name='SmallCapped' value='PetitesCap'/>
+ <cd:command name='SmallCaps' value='PetitesCaps'/>
<cd:command name='WEEKDAY' value='JOURSEMAINE'/>
<cd:command name='WORD' value='MOT'/>
<cd:command name='WORDS' value='MOTS'/>
<cd:command name='Word' value='Mot'/>
<cd:command name='Words' value='Mots'/>
- <cd:command name='about' value='concernant'/>
- <cd:command name='adaptlayout' value='adaptedisposition'/>
- <cd:command name='alignment' value='alignment'/>
+ <cd:command name='about' value='apropos'/>
+ <cd:command name='adaptfontfeature' value='adapterfonctionnalitepolice'/>
+ <cd:command name='adaptlayout' value='adaptermiseenpage'/>
+ <cd:command name='addfeature' value='ajouterfonctionnalite'/>
+ <cd:command name='alignbottom' value='alignerbas'/>
+ <cd:command name='aligned' value='aligne'/>
+ <cd:command name='alignedbox' value='boitealignee'/>
+ <cd:command name='alignedline' value='lignealignee'/>
+ <cd:command name='alignhere' value='alignerici'/>
+ <cd:command name='alignment' value='alignement'/>
+ <cd:command name='alignmentcharacter' value='caracterealignement'/>
+ <cd:command name='applytocharacters' value='appliquerauxcaracteres'/>
+ <cd:command name='applytofirstcharacter' value='appliqueraupremiercaractere'/>
<cd:command name='arg' value='arg'/>
- <cd:command name='at' value='a'/>
- <cd:command name='atleftmargin' value='atleftmargin'/>
- <cd:command name='atpage' value='alapage'/>
- <cd:command name='atrightmargin' value='atrightmargin'/>
+ <cd:command name='at' value='en'/>
+ <cd:command name='atleftmargin' value='enmargegauche'/>
+ <cd:command name='atpage' value='enpage'/>
+ <cd:command name='atrightmargin' value='enmargedroite'/>
<cd:command name='background' value='arriereplan'/>
- <cd:command name='backspace' value='retourarriere'/>
- <cd:command name='blackrule' value='lignenoire'/>
- <cd:command name='blackrules' value='lignesnoires'/>
- <cd:command name='blank' value='vide'/>
+ <cd:command name='backspace' value='retourarrière'/>
+ <cd:command name='blackrule' value='traitepais'/>
+ <cd:command name='blackrules' value='traitsepais'/>
+ <cd:command name='blank' value='vierge'/>
<cd:command name='bookmark' value='marquepage'/>
- <cd:command name='bottomdistance' value='distanceinf'/>
- <cd:command name='bottomheight' value='hauteurinf'/>
- <cd:command name='bottomspace' value='espaceinf'/>
- <cd:command name='but' value='but'/>
+ <cd:command name='bottombox' value='boitebas'/>
+ <cd:command name='bottomdistance' value='distancebas'/>
+ <cd:command name='bottomheight' value='hauteurbas'/>
+ <cd:command name='bottomleftbox' value='basgaucheboite'/>
+ <cd:command name='bottomrightbox' value='boitebasdroite'/>
+ <cd:command name='bottomspace' value='espacebas'/>
+ <cd:command name='buildtextbottomdot' value='construirepointtextebas'/>
+ <cd:command name='but' value='mais'/>
<cd:command name='button' value='bouton'/>
- <cd:command name='bypassblocks' value='sauteblocs'/>
+ <cd:command name='bypassblocks' value='eviteblocs'/>
<cd:command name='character' value='caractere'/>
<cd:command name='characters' value='caracteres'/>
<cd:command name='chem' value='chem'/>
- <cd:command name='clip' value='clip'/>
- <cd:command name='clonefield' value='clonechamp'/>
+ <cd:command name='clip' value='decouper'/>
+ <cd:command name='clonefield' value='clonerchamp'/>
<cd:command name='color' value='couleur'/>
<cd:command name='colorbar' value='barrecouleur'/>
<cd:command name='colorvalue' value='valeurcouleur'/>
<cd:command name='column' value='colonne'/>
- <cd:command name='comparecolorgroup' value='comparegroupecouleur'/>
- <cd:command name='comparepalet' value='comparepalette'/>
- <cd:command name='completepagenumber' value='completenumeropage'/>
- <cd:command name='completeregister' value='completeregistre'/>
+ <cd:command name='comparecolorgroup' value='comparergroupecouleur'/>
+ <cd:command name='comparepalet' value='comparerpalette'/>
+ <cd:command name='completepagenumber' value='numeropagecomplet'/>
+ <cd:command name='completeregister' value='registrecomplet'/>
<cd:command name='component' value='composant'/>
- <cd:command name='convertnumber' value='convertitnumero'/>
- <cd:command name='copyfield' value='copitchamp'/>
- <cd:command name='correctwhitespace' value='corrigeespaceblanc'/>
+ <cd:command name='convertnumber' value='convertirnumero'/>
+ <cd:command name='copyfield' value='copierchamp'/>
+ <cd:command name='correctwhitespace' value='corrigerespaceblanc'/>
<cd:command name='coupledocument' value='coupledocument'/>
<cd:command name='couplemarking' value='couplemarquage'/>
- <cd:command name='couplepage' value='pagedouble'/>
+ <cd:command name='couplepage' value='couplepage'/>
<cd:command name='couplepaper' value='couplepapier'/>
<cd:command name='coupleregister' value='coupleregistre'/>
<cd:command name='crlf' value='crlf'/>
<cd:command name='currentdate' value='datecourante'/>
- <cd:command name='currentheadnumber' value='numerotetecourant'/>
- <cd:command name='cutspace' value='cutspace'/>
+ <cd:command name='currentheadnumber' value='numerotetecourante'/>
+ <cd:command name='cutspace' value='espacecoupe'/>
<cd:command name='date' value='date'/>
<cd:command name='decouplemarking' value='decouplemarquage'/>
<cd:command name='decrementnumber' value='decrementenumero'/>
- <cd:command name='define' value='definit'/>
- <cd:command name='defineaccent' value='definitaccent'/>
- <cd:command name='defineblank' value='definitvide'/>
- <cd:command name='defineblock' value='definitbloc'/>
- <cd:command name='definebodyfont' value='definitpolicecorps'/>
- <cd:command name='definebodyfontenvironment' value='definitenvironnementpolicecorps'/>
- <cd:command name='definebuffer' value='definitbuffer'/>
- <cd:command name='definecharacter' value='definicaractere'/>
- <cd:command name='definecolor' value='definitcouleur'/>
- <cd:command name='definecolorgroup' value='definitgroupecouleur'/>
- <cd:command name='definecolumnbreak' value='definitsautdecolonne'/>
- <cd:command name='definecolumnset' value='definitjeucolonne'/>
- <cd:command name='definecombination' value='definecombination'/>
- <cd:command name='definecombinedlist' value='definitlisteimbriquee'/>
- <cd:command name='definecommand' value='definitcommande'/>
- <cd:command name='defineconversion' value='definitconversion'/>
- <cd:command name='definedescription' value='definitdescription'/>
- <cd:command name='defineenumeration' value='definitenumeration'/>
- <cd:command name='definefield' value='definitchamp'/>
- <cd:command name='definefieldstack' value='definitpilechamp'/>
- <cd:command name='definefiguresymbol' value='definitsymbolefigure'/>
- <cd:command name='definefloat' value='definitflottant'/>
- <cd:command name='definefont' value='definitpolice'/>
- <cd:command name='definefontstyle' value='definitstylepolice'/>
- <cd:command name='definefontsynonym' value='definitsynonymepolice'/>
- <cd:command name='defineframed' value='defineframed'/>
- <cd:command name='defineframedtext' value='defineframedtext'/>
- <cd:command name='definehbox' value='definithbox'/>
- <cd:command name='definehead' value='definittete'/>
- <cd:command name='defineindentedtext' value='defineindentedtext'/>
- <cd:command name='defineinmargin' value='definitdansmarge'/>
- <cd:command name='defineinteractionmenu' value='definitmenuinteraction'/>
- <cd:command name='defineitemgroup' value='defineitemgroup'/>
- <cd:command name='definelabel' value='definitetiquette'/>
- <cd:command name='definelayer' value='definitcalque'/>
- <cd:command name='definelayout' value='definitdisposition'/>
- <cd:command name='definelist' value='definitliste'/>
- <cd:command name='definelogo' value='definitlogo'/>
- <cd:command name='definemainfield' value='definitchampprincipal'/>
- <cd:command name='definemakeup' value='definitmakeup'/>
- <cd:command name='definemarking' value='definitmarquage'/>
- <cd:command name='definemathalignment' value='definemathalignment'/>
- <cd:command name='defineoutput' value='definitsortie'/>
- <cd:command name='defineoverlay' value='definitrevetement'/>
- <cd:command name='definepagebreak' value='definitsautdepage'/>
- <cd:command name='definepalet' value='definitpalette'/>
- <cd:command name='definepapersize' value='definittaillepapier'/>
- <cd:command name='defineparagraphs' value='definitparagraphes'/>
- <cd:command name='defineplacement' value='defineplacement'/>
- <cd:command name='defineprofile' value='definitprofil'/>
- <cd:command name='defineprogram' value='definitprogramme'/>
- <cd:command name='definerawfont' value='definitpolicebrute'/>
- <cd:command name='definereference' value='definitreference'/>
- <cd:command name='definereferenceformat' value='definitformatreference'/>
- <cd:command name='definereferencelist' value='definitlistereference'/>
- <cd:command name='defineregister' value='definitregistre'/>
- <cd:command name='definerule' value='definitregle'/>
- <cd:command name='definesection' value='definitsection'/>
- <cd:command name='definesectionblock' value='definitblocsection'/>
- <cd:command name='definesorting' value='definittri'/>
- <cd:command name='definestartstop' value='definitdemarrestoppe'/>
- <cd:command name='definestyle' value='definitstyle'/>
- <cd:command name='definesubfield' value='definitsouschamp'/>
- <cd:command name='definesymbol' value='definitsymbole'/>
- <cd:command name='definesynonyms' value='definitsynonymes'/>
- <cd:command name='definetabletemplate' value='definittrametableau'/>
- <cd:command name='definetabulate' value='definittabulation'/>
- <cd:command name='definetext' value='definittexte'/>
- <cd:command name='definetextbackground' value='definetextbackground'/>
- <cd:command name='definetextposition' value='definitpositiontexte'/>
- <cd:command name='definetextvariable' value='definitvariabletexte'/>
- <cd:command name='definetype' value='definittype'/>
- <cd:command name='definetyping' value='definitdactylo'/>
- <cd:command name='defineversion' value='definitversion'/>
- <cd:command name='determineheadnumber' value='determinenumerotete'/>
- <cd:command name='determinelistcharacteristics' value='determinecaracteristiqueliste'/>
- <cd:command name='determineregistercharacteristics' value='determinecaracteristiquesregistre'/>
+ <cd:command name='define' value='définir'/>
+ <cd:command name='defineaccent' value='définiraccent'/>
+ <cd:command name='defineblank' value='définirvierge'/>
+ <cd:command name='defineblock' value='définirbloc'/>
+ <cd:command name='definebodyfont' value='définirpolicedecorps'/>
+ <cd:command name='definebodyfontenvironment' value='définirenvironnementpolicedecorps'/>
+ <cd:command name='definebodyfontswitch' value='définircommutateurpolicedecorps'/>
+ <cd:command name='definebuffer' value='définirtampon'/>
+ <cd:command name='definecharacter' value='définircaractere'/>
+ <cd:command name='definecharacterkerning' value='définirapprochecaracteres'/>
+ <cd:command name='definecharacterspacing' value='définirespacementcaracteres'/>
+ <cd:command name='definecolor' value='définircouleur'/>
+ <cd:command name='definecolorgroup' value='définirgroupecouleur'/>
+ <cd:command name='definecolumnbreak' value='définirsautdecolonne'/>
+ <cd:command name='definecolumnset' value='définirjeucolonnes'/>
+ <cd:command name='definecombination' value='définircombinaison'/>
+ <cd:command name='definecombinedlist' value='définirlistecombinee'/>
+ <cd:command name='definecommand' value='définircommande'/>
+ <cd:command name='defineconversion' value='définirconversion'/>
+ <cd:command name='definedescription' value='définirdescription'/>
+ <cd:command name='definedfont' value='policedefinie'/>
+ <cd:command name='defineenumeration' value='définirénumération'/>
+ <cd:command name='definefallbackfamily' value='définirfamillederepli'/>
+ <cd:command name='definefield' value='définirchamp'/>
+ <cd:command name='definefieldstack' value='définirpilechamp'/>
+ <cd:command name='definefiguresymbol' value='définirfiguresymbole'/>
+ <cd:command name='definefilefallback' value='définirfichierderepli'/>
+ <cd:command name='definefirstline' value='définirpremiereligne'/>
+ <cd:command name='definefloat' value='définirflottant'/>
+ <cd:command name='definefont' value='définirpolice'/>
+ <cd:command name='definefontalternative' value='définirvariantepolice'/>
+ <cd:command name='definefontfallback' value='définirpolicederepli'/>
+ <cd:command name='definefontfamily' value='définirfamillepolice'/>
+ <cd:command name='definefontfamilypreset' value='définirprereglagefamillepolice'/>
+ <cd:command name='definefontfeature' value='définirfonctionnalitepolice'/>
+ <cd:command name='definefontfile' value='définirfichierpolice'/>
+ <cd:command name='definefontsize' value='définirtaillepolice'/>
+ <cd:command name='definefontsolution' value='définirsolutionpolice'/>
+ <cd:command name='definefontstyle' value='définirstylepolice'/>
+ <cd:command name='definefontsynonym' value='définirsynonymepolice'/>
+ <cd:command name='defineframed' value='définirencadre'/>
+ <cd:command name='defineframedtext' value='définirtexteencadre'/>
+ <cd:command name='definefrozenfont' value='définirpolicegelee'/>
+ <cd:command name='definehbox' value='définirhbox'/>
+ <cd:command name='definehead' value='définirtete'/>
+ <cd:command name='definehyphenationfeatures' value='définirfonctionnalitescesure'/>
+ <cd:command name='defineindentedtext' value='définirtexteindente'/>
+ <cd:command name='defineinmargin' value='définirdansmarge'/>
+ <cd:command name='defineinteractionmenu' value='définirmenuinteraction'/>
+ <cd:command name='defineitemgroup' value='définirgroupedéléments'/>
+ <cd:command name='defineitems' value='définiréléments'/>
+ <cd:command name='definelabel' value='définiretiquette'/>
+ <cd:command name='definelayer' value='définircalque'/>
+ <cd:command name='definelayout' value='définirmiseenpage'/>
+ <cd:command name='definelinenote' value='définirnotedeligne'/>
+ <cd:command name='definelist' value='définirliste'/>
+ <cd:command name='definelogo' value='définirlogo'/>
+ <cd:command name='definemainfield' value='définirchampprincipal'/>
+ <cd:command name='definemakeup' value='définircomposition'/>
+ <cd:command name='definemarking' value='définirmarquage'/>
+ <cd:command name='definemathalignment' value='définiralignementmath'/>
+ <cd:command name='definemode' value='définirmode'/>
+ <cd:command name='definenamedcolor' value='définircouleurnommee'/>
+ <cd:command name='definenote' value='définirnote'/>
+ <cd:command name='defineoutput' value='définirsortie'/>
+ <cd:command name='defineoverlay' value='définirsuperposition'/>
+ <cd:command name='definepagebreak' value='définirsautdepage'/>
+ <cd:command name='definepalet' value='définirpalette'/>
+ <cd:command name='definepapersize' value='définirtaillepapier'/>
+ <cd:command name='defineparagraphs' value='définirparagraphes'/>
+ <cd:command name='defineperiodkerning' value='reglerapprochepoint'/>
+ <cd:command name='defineplacement' value='définirplacement'/>
+ <cd:command name='defineprofile' value='définirprofil'/>
+ <cd:command name='defineprogram' value='définirprogramme'/>
+ <cd:command name='definerawfont' value='définirpolicebrute'/>
+ <cd:command name='definereference' value='définirreference'/>
+ <cd:command name='definereferenceformat' value='définirformatrereference'/>
+ <cd:command name='definereferencelist' value='définirlistereference'/>
+ <cd:command name='defineregister' value='définirregistre'/>
+ <cd:command name='definerule' value='définirtrait'/>
+ <cd:command name='definesection' value='définirsection'/>
+ <cd:command name='definesectionblock' value='définirblocsection'/>
+ <cd:command name='definesorting' value='définirtri'/>
+ <cd:command name='definestartstop' value='définirdébutfin'/>
+ <cd:command name='definestyle' value='définirstyle'/>
+ <cd:command name='definesubfield' value='définirsouschamp'/>
+ <cd:command name='definesymbol' value='définirsymbole'/>
+ <cd:command name='definesynonyms' value='définirsynonymes'/>
+ <cd:command name='definetabletemplate' value='définirgabarittable'/>
+ <cd:command name='definetabulate' value='définirtabulation'/>
+ <cd:command name='definetext' value='définirtexte'/>
+ <cd:command name='definetextbackground' value='définirtextearriereplan'/>
+ <cd:command name='definetextnote' value='définirnotetexte'/>
+ <cd:command name='definetextposition' value='définirpositiontexte'/>
+ <cd:command name='definetextvariable' value='définirvariabletexte'/>
+ <cd:command name='definetype' value='définirtranscrire'/>
+ <cd:command name='definetyping' value='définirtranscription'/>
+ <cd:command name='defineversion' value='définirversion'/>
+ <cd:command name='depthspanningtext' value='jambagetextecouvrant'/>
+ <cd:command name='determineheadnumber' value='determinernumerotete'/>
+ <cd:command name='determinelistcharacteristics' value='determinercaracteristiquesliste'/>
+ <cd:command name='determineregistercharacteristics' value='determinercaracteristiquesregistre'/>
<cd:command name='dimension' value='dimension'/>
- <cd:command name='disableinteractionmenu' value='inhibemenuinteraction'/>
+ <cd:command name='disableinteractionmenu' value='desactivermenuinteraction'/>
+ <cd:command name='disablemode' value='desactivermode'/>
+ <cd:command name='doaddfeature' value='faireajouterfonctionnalite'/>
<cd:command name='domicile' value='domicile'/>
- <cd:command name='donttest' value='sanstest'/>
+ <cd:command name='dontconvertfont' value='nepasconvertirpolice'/>
+ <cd:command name='donttest' value='sanstester'/>
<cd:command name='edgedistance' value='distancebord'/>
<cd:command name='edgewidth' value='largeurbord'/>
- <cd:command name='emptylines' value='emptylines'/>
- <cd:command name='environment' value='environement'/>
+ <cd:command name='emphasisboldface' value='policegrasaccentue'/>
+ <cd:command name='emptylines' value='lignesvide'/>
+ <cd:command name='enablemode' value='activermode'/>
+ <cd:command name='environment' value='environnement'/>
<cd:command name='externalfigure' value='figureexterne'/>
<cd:command name='fact' value='fait'/>
+ <cd:command name='fastswitchtobodyfont' value='passerrapideapolicedecorps'/>
+ <cd:command name='feature' value='fonctionnalite'/>
<cd:command name='field' value='champ'/>
<cd:command name='fieldstack' value='pilechamp'/>
- <cd:command name='fillinfield' value='remplitchamp'/>
- <cd:command name='fillinline' value='remplitligne'/>
- <cd:command name='fillinrules' value='remplitlignesreglees'/>
- <cd:command name='fillintext' value='remplittexte'/>
- <cd:command name='fitfield' value='ajustechamp'/>
+ <cd:command name='fillinfield' value='champarenseigner'/>
+ <cd:command name='fillinline' value='lignearenseigner'/>
+ <cd:command name='fillinrules' value='traitsarenseigner'/>
+ <cd:command name='fillintext' value='textearenseigner'/>
+ <cd:command name='firstcharacter' value='premiercaractere'/>
+ <cd:command name='fitfield' value='adapterchamp'/>
+ <cd:command name='fittopbaselinegrid' value='adaptergrillehautlignedebase'/>
<cd:command name='fixedspace' value='espacefixe'/>
<cd:command name='fixedspaces' value='espacesfixes'/>
- <cd:command name='followprofile' value='suivantprofil'/>
- <cd:command name='followprofileversion' value='suivantversionprofil'/>
- <cd:command name='followversion' value='suivantversion'/>
+ <cd:command name='flushnotes' value='vidernotes'/>
+ <cd:command name='followprofile' value='suivreprofile'/>
+ <cd:command name='followprofileversion' value='suivreversionprofil'/>
+ <cd:command name='followversion' value='suivreversion'/>
<cd:command name='footerdistance' value='distancepdp'/>
<cd:command name='footerheight' value='hauteurpdp'/>
- <cd:command name='footnote' value='notepdp'/>
- <cd:command name='footnotetext' value='textenotepdp'/>
- <cd:command name='forceblocks' value='forceblocs'/>
+ <cd:command name='footnote' value='notebdp'/>
+ <cd:command name='footnotetext' value='textenotebdp'/>
+ <cd:command name='forceblocks' value='forcerblocs'/>
+ <cd:command name='forcecharacterstripping' value='forcerdemontagecaracteres'/>
<cd:command name='formulanumber' value='numeroformule'/>
<cd:command name='fraction' value='fraction'/>
- <cd:command name='framed' value='framed'/>
+ <cd:command name='framed' value='encadre'/>
<cd:command name='from' value='de'/>
- <cd:command name='getbuffer' value='prendbuffer'/>
- <cd:command name='getmarking' value='obtientmarquage'/>
- <cd:command name='getnumber' value='getnumber'/>
- <cd:command name='godown' value='vaenbas'/>
- <cd:command name='goto' value='va'/>
- <cd:command name='gotobox' value='vaalaboite'/>
- <cd:command name='gotopage' value='vaalapage'/>
+ <cd:command name='fromlinenote' value='denotedeligne'/>
+ <cd:command name='getbuffer' value='obtenirtampon'/>
+ <cd:command name='getfirstcharacter' value='obtenirpremiercaractere'/>
+ <cd:command name='getmarking' value='obtenirmarquage'/>
+ <cd:command name='getnumber' value='obtenirnumero'/>
+ <cd:command name='globaldisablemode' value='desactivermodeglobal'/>
+ <cd:command name='globalenablemode' value='activermodeglobal'/>
+ <cd:command name='globalpreventmode' value='empechermodeglobal'/>
+ <cd:command name='godown' value='allerenbas'/>
+ <cd:command name='goto' value='allera'/>
+ <cd:command name='gotobox' value='alleraboite'/>
+ <cd:command name='gotopage' value='allerapage'/>
<cd:command name='graycolor' value='couleurgrise'/>
<cd:command name='greyvalue' value='valeurgris'/>
<cd:command name='grid' value='grille'/>
- <cd:command name='hairline' value='ligneh'/>
- <cd:command name='head' value='tete'/>
- <cd:command name='headerdistance' value='distanceentete'/>
- <cd:command name='headerheight' value='hauteurentete'/>
+ <cd:command name='hairline' value='ligneavectrait'/>
+ <cd:command name='head' value='tête'/>
+ <cd:command name='headerdistance' value='distanceentête'/>
+ <cd:command name='headerheight' value='hauteurentête'/>
<cd:command name='headlevel' value='niveautete'/>
<cd:command name='headnumber' value='numerotete'/>
- <cd:command name='headsym' value='headsym'/>
+ <cd:command name='headsym' value='symtete'/>
<cd:command name='headtext' value='textetete'/>
- <cd:command name='hideblocks' value='cacheblocs'/>
- <cd:command name='high' value='haut'/>
- <cd:command name='hl' value='hl'/>
- <cd:command name='immediatebetweenlist' value='immediatebetweenlist'/>
- <cd:command name='immediatetolist' value='immediatetolist'/>
+ <cd:command name='heightspanningtext' value='hauteurtextecouvrant'/>
+ <cd:command name='hideblocks' value='cacherblocs'/>
+ <cd:command name='high' value='exposant'/>
+ <cd:command name='hl' value='lh'/>
+ <cd:command name='immediatebetweenlist' value='immediatemententreliste'/>
+ <cd:command name='immediatetolist' value='immediatementalister'/>
<cd:command name='in' value='dans'/>
- <cd:command name='incrementnumber' value='incrementenumero'/>
- <cd:command name='indenting' value='composeenalinea'/>
- <cd:command name='inframed' value='inframed'/>
- <cd:command name='infull' value='infull'/>
- <cd:command name='ininner' value='ininner'/>
+ <cd:command name='incrementnumber' value='incrementernumero'/>
+ <cd:command name='indenting' value='indentation'/>
+ <cd:command name='inframed' value='dansencadre'/>
+ <cd:command name='infull' value='encomplet'/>
+ <cd:command name='ininner' value='dansinterieur'/>
<cd:command name='inleft' value='dansgauche'/>
<cd:command name='inleftedge' value='dansbordgauche'/>
<cd:command name='inleftmargin' value='dansmargegauche'/>
- <cd:command name='inline' value='alaligne'/>
+ <cd:command name='inline' value='enligne'/>
<cd:command name='inmargin' value='dansmarge'/>
- <cd:command name='inmframed' value='inmframed'/>
- <cd:command name='inneredgedistance' value='inneredgedistance'/>
- <cd:command name='inneredgewidth' value='inneredgewidth'/>
- <cd:command name='innermargindistance' value='innermargindistance'/>
- <cd:command name='innermarginwidth' value='innermarginwidth'/>
+ <cd:command name='inmframed' value='dansencadremath'/>
+ <cd:command name='inneredgedistance' value='distancebordinterieur'/>
+ <cd:command name='inneredgewidth' value='largeurbordinterieur'/>
+ <cd:command name='innermargindistance' value='distancemargeinterieure'/>
+ <cd:command name='innermarginwidth' value='largeurmargeinterieure'/>
<cd:command name='inothermargin' value='dansautremarge'/>
- <cd:command name='inouter' value='inouter'/>
+ <cd:command name='inouter' value='dansexterieur'/>
<cd:command name='inright' value='dansdroite'/>
<cd:command name='inrightedge' value='dansborddroit'/>
<cd:command name='inrightmargin' value='dansmargedroite'/>
- <cd:command name='installlanguage' value='installelangue'/>
+ <cd:command name='installlanguage' value='installerlangue'/>
<cd:command name='interactionbar' value='barreinteraction'/>
<cd:command name='interactionbuttons' value='boutonsinteraction'/>
<cd:command name='interactionmenu' value='menuinteraction'/>
- <cd:command name='item' value='element'/>
- <cd:command name='items' value='elements'/>
- <cd:command name='its' value='el'/>
- <cd:command name='keepblocks' value='gardeblocs'/>
+ <cd:command name='item' value='élément'/>
+ <cd:command name='itemgroup' value='groupedéléments'/>
+ <cd:command name='items' value='éléments'/>
+ <cd:command name='itemtag' value='étiquettedélément'/>
+ <cd:command name='its' value='els'/>
+ <cd:command name='keepblocks' value='conserverblocs'/>
+ <cd:command name='kerncharacters' value='approchercaracteres'/>
<cd:command name='label' value='etiquette'/>
<cd:command name='labels' value='etiquettes'/>
- <cd:command name='labeltext' value='labeltexte'/>
+ <cd:command name='labeltext' value='texteetiquette'/>
<cd:command name='language' value='langue'/>
+ <cd:command name='languageCharacters' value='Caractereslangue'/>
+ <cd:command name='languagecharacters' value='caractereslangue'/>
<cd:command name='leftaligned' value='aligneagauche'/>
+ <cd:command name='leftbottombox' value='boitebasgauche'/>
<cd:command name='leftedgedistance' value='distancebordgauche'/>
<cd:command name='leftedgewidth' value='largeurbordgauche'/>
+ <cd:command name='leftline' value='lignegauche'/>
<cd:command name='leftmargindistance' value='distancemargegauche'/>
<cd:command name='leftmarginwidth' value='largeurmargegauche'/>
<cd:command name='leg' value='leg'/>
- <cd:command name='linecorrection' value='linecorrection'/>
+ <cd:command name='linecorrection' value='correctionligne'/>
+ <cd:command name='linenote' value='notedeligne'/>
+ <cd:command name='linespanningtext' value='largeurtextecouvrant'/>
<cd:command name='linewidth' value='largeurligne'/>
<cd:command name='listheight' value='hauteurliste'/>
- <cd:command name='listlength' value='llongueurliste'/>
- <cd:command name='listsymbol' value='listesymbole'/>
+ <cd:command name='listlength' value='longueurtexte'/>
+ <cd:command name='listsymbol' value='symboleliste'/>
<cd:command name='listwidth' value='largeurliste'/>
- <cd:command name='localfootnotes' value='localfootnotes'/>
- <cd:command name='logfields' value='logchamp'/>
- <cd:command name='lohi' value='baha'/>
- <cd:command name='low' value='bas'/>
+ <cd:command name='loadfontgoodies' value='charerfriandisespolice'/>
+ <cd:command name='localfootnotes' value='notesbdplocales'/>
+ <cd:command name='localnotes' value='noteslocales'/>
+ <cd:command name='logfields' value='logchamps'/>
+ <cd:command name='lohi' value='inex'/>
+ <cd:command name='low' value='indice'/>
<cd:command name='macroname' value='nommacro'/>
<cd:command name='mainlanguage' value='langueprincipale'/>
- <cd:command name='makeupheight' value='hauteurmakeup'/>
- <cd:command name='makeupwidth' value='largeurmakeup'/>
- <cd:command name='mar' value='mar'/>
- <cd:command name='marginblock' value='marginblock'/>
+ <cd:command name='makeupheight' value='hauteurcomposition'/>
+ <cd:command name='makeupwidth' value='largeurcomposition'/>
+ <cd:command name='mar' value='rem'/>
+ <cd:command name='marginblock' value='blocmarginal'/>
<cd:command name='margindistance' value='distancemarge'/>
- <cd:command name='marginrule' value='margereglee'/>
+ <cd:command name='marginrule' value='traitmarge'/>
<cd:command name='margintext' value='textemarge'/>
<cd:command name='margintitle' value='titremarge'/>
<cd:command name='marginwidth' value='largeurmarge'/>
<cd:command name='marginword' value='motmarge'/>
<cd:command name='marking' value='marquage'/>
- <cd:command name='markversion' value='marquageversion'/>
- <cd:command name='mathematics' value='mathematique'/>
+ <cd:command name='markversion' value='marquerversion'/>
+ <cd:command name='mathematics' value='mathematics'/>
<cd:command name='menubutton' value='boutonmenu'/>
- <cd:command name='mframed' value='mframed'/>
+ <cd:command name='mframed' value='encadremath'/>
<cd:command name='midaligned' value='aligneaumilieu'/>
- <cd:command name='mirror' value='reflete'/>
+ <cd:command name='mirror' value='refleter'/>
<cd:command name='month' value='mois'/>
- <cd:command name='moveformula' value='deplaceformule'/>
- <cd:command name='moveongrid' value='deplacesurgrille'/>
- <cd:command name='movesidefloat' value='movesidefloat'/>
- <cd:command name='navigating' value='navigating'/>
+ <cd:command name='moveformula' value='deplacerformule'/>
+ <cd:command name='moveongrid' value='deplacersurgrille'/>
+ <cd:command name='movesidefloat' value='deplacerflottantcote'/>
+ <cd:command name='navigating' value='navigation'/>
<cd:command name='nodimension' value='sansdimension'/>
- <cd:command name='noheaderandfooterlines' value='sanslignesenteteetpdp'/>
- <cd:command name='noindenting' value='sansalinea'/>
+ <cd:command name='noheaderandfooterlines' value='sansentêtenipdp'/>
+ <cd:command name='noindenting' value='sansindentation'/>
+ <cd:command name='noitem' value='sansélément'/>
<cd:command name='nolist' value='sansliste'/>
<cd:command name='nomarking' value='sansmarquage'/>
- <cd:command name='nomoreblocks' value='pasplusdeblocs'/>
- <cd:command name='nomorefiles' value='pasplusdefichiers'/>
- <cd:command name='nop' value='nop'/>
+ <cd:command name='nomoreblocks' value='sansplusdeblocs'/>
+ <cd:command name='nomorefiles' value='sansplusdefichiers'/>
+ <cd:command name='nop' value='san'/>
<cd:command name='nospace' value='sansespace'/>
<cd:command name='note' value='note'/>
- <cd:command name='notopandbottomlines' value='sanslignessupetinf'/>
- <cd:command name='notsmallcapped' value='nocap'/>
+ <cd:command name='notesymbol' value='symbolenote'/>
+ <cd:command name='notopandbottomlines' value='sansligneshautetbas'/>
+ <cd:command name='notsmallcapped' value='paspetitescaps'/>
<cd:command name='nowhitespace' value='sansespaceblanc'/>
<cd:command name='numberofsubpages' value='nombredesouspages'/>
<cd:command name='numbers' value='numeros'/>
- <cd:command name='outeredgedistance' value='outeredgedistance'/>
- <cd:command name='outeredgewidth' value='outeredgewidth'/>
- <cd:command name='outermargindistance' value='outermargindistance'/>
- <cd:command name='outermarginwidth' value='outermarginwidth'/>
- <cd:command name='packed' value='groupe'/>
+ <cd:command name='outeredgedistance' value='distancebordexterieur'/>
+ <cd:command name='outeredgewidth' value='largeurbordexterieur'/>
+ <cd:command name='outermargindistance' value='distancemargeexterieure'/>
+ <cd:command name='outermarginwidth' value='largeurmargeexterieure'/>
+ <cd:command name='packed' value='sansespaceentreitem'/>
<cd:command name='page' value='page'/>
- <cd:command name='pagedepth' value='pagedepth'/>
+ <cd:command name='pagebreak' value='sautdepage'/>
+ <cd:command name='pagedepth' value='profondeurpage'/>
<cd:command name='pagenumber' value='numeropage'/>
- <cd:command name='pageoffset' value='pageoffset'/>
+ <cd:command name='pageoffset' value='decalagepage'/>
<cd:command name='pagereference' value='referencepage'/>
<cd:command name='paperheight' value='hauteurpapier'/>
<cd:command name='paperwidth' value='largeurpapier'/>
<cd:command name='periods' value='periodes'/>
- <cd:command name='placebookmarks' value='placemarquespages'/>
- <cd:command name='placecombinedlist' value='placelisteinmbriquee'/>
- <cd:command name='placefloat' value='placeflottant'/>
- <cd:command name='placefootnotes' value='placenotespdp'/>
- <cd:command name='placeformula' value='placeformule'/>
- <cd:command name='placeheadnumber' value='placenumerotete'/>
- <cd:command name='placeheadtext' value='placetextetete'/>
- <cd:command name='placelegend' value='placelegende'/>
- <cd:command name='placelist' value='placeliste'/>
- <cd:command name='placelistofsynonyms' value='placelistofsynonyms'/>
- <cd:command name='placelocalfootnotes' value='placenotespdplocales'/>
- <cd:command name='placelogos' value='placelogos'/>
- <cd:command name='placeongrid' value='placesurgrille'/>
- <cd:command name='placeontopofeachother' value='placelesunsaudessusdesautres'/>
- <cd:command name='placepagenumber' value='placenumeropage'/>
- <cd:command name='placerawlist' value='placerawlist'/>
- <cd:command name='placereferencelist' value='placelistereference'/>
- <cd:command name='placeregister' value='placeregistre'/>
- <cd:command name='placerule' value='placeregle'/>
- <cd:command name='placesidebyside' value='placecoteacote'/>
- <cd:command name='placesubformula' value='placesousformule'/>
- <cd:command name='placetextvariable' value='placevariabletexte'/>
+ <cd:command name='placebookmarks' value='placermarquepages'/>
+ <cd:command name='placecombinedlist' value='placerlistecombinee'/>
+ <cd:command name='placefloat' value='placerflottant'/>
+ <cd:command name='placefootnotes' value='placernotesbdp'/>
+ <cd:command name='placeformula' value='placerformule'/>
+ <cd:command name='placeheadnumber' value='placernumerotete'/>
+ <cd:command name='placeheadtext' value='placertextetete'/>
+ <cd:command name='placelegend' value='placerlegende'/>
+ <cd:command name='placelist' value='placerliste'/>
+ <cd:command name='placelistofsynonyms' value='placerlistedesynonymes'/>
+ <cd:command name='placelocalfootnotes' value='placernotesbdplocales'/>
+ <cd:command name='placelocalnotes' value='placernoteslocales'/>
+ <cd:command name='placelogos' value='placerlogo'/>
+ <cd:command name='placenamedfloat' value='placerflottantnomme'/>
+ <cd:command name='placenotes' value='placernotes'/>
+ <cd:command name='placeongrid' value='placersurgrille'/>
+ <cd:command name='placeontopofeachother' value='placerlunaudessusdelautre'/>
+ <cd:command name='placepagenumber' value='placernumeropage'/>
+ <cd:command name='placerawlist' value='placerlistebrute'/>
+ <cd:command name='placereferencelist' value='placerlistereference'/>
+ <cd:command name='placeregister' value='placerregistre'/>
+ <cd:command name='placerule' value='placertrait'/>
+ <cd:command name='placesidebyside' value='placercoteacote'/>
+ <cd:command name='placesubformula' value='placersousformule'/>
+ <cd:command name='placetextvariable' value='placervariabletexte'/>
<cd:command name='position' value='position'/>
- <cd:command name='positiontext' value='positionnetexte'/>
- <cd:command name='printpaperheight' value='hauteureditionpapier'/>
- <cd:command name='printpaperwidth' value='largeureditionpapier'/>
- <cd:command name='processblocks' value='traiteblocs'/>
- <cd:command name='processpage' value='traitepage'/>
+ <cd:command name='positiontext' value='texteposition'/>
+ <cd:command name='postponenotes' value='reporternotes'/>
+ <cd:command name='postponingnotes' value='reportnotes'/>
+ <cd:command name='predefinedfont' value='policepredefinie'/>
+ <cd:command name='predefinefont' value='predéfinirpolice'/>
+ <cd:command name='presetdocument' value='prereglerdocument'/>
+ <cd:command name='prettyprintbuffer' value='imprimerjolimenttampon'/>
+ <cd:command name='preventmode' value='empechermode'/>
+ <cd:command name='printpaperheight' value='hauteurpapierimpression'/>
+ <cd:command name='printpaperwidth' value='largeurpapierimpression'/>
+ <cd:command name='processblocks' value='traiterblocs'/>
+ <cd:command name='processbodyfontenvironmentlist' value='traiterlisteenvironnementpolicedecorps'/>
+ <cd:command name='processpage' value='traiterpage'/>
<cd:command name='product' value='produit'/>
<cd:command name='program' value='programme'/>
<cd:command name='project' value='projet'/>
@@ -1691,340 +1794,444 @@
<cd:command name='quotation' value='citation'/>
<cd:command name='quote' value='citer'/>
<cd:command name='ran' value='ran'/>
- <cd:command name='redo' value='refait'/>
+ <cd:command name='redo' value='refaire'/>
+ <cd:command name='redoconvertfont' value='refaireconvertirpolice'/>
<cd:command name='ref' value='ref'/>
<cd:command name='reference' value='reference'/>
- <cd:command name='referral' value='recommandation'/>
- <cd:command name='referraldate' value='daterecommandation'/>
- <cd:command name='referring' value='faitreference'/>
- <cd:command name='remark' value='commentaire'/>
+ <cd:command name='referral' value='redirection'/>
+ <cd:command name='referraldate' value='dateredirection'/>
+ <cd:command name='referring' value='fairereference'/>
+ <cd:command name='registerfontclass' value='enregistrerclassepolice'/>
+ <cd:command name='registerhyphenationexception' value='enregistrerexceptioncesure'/>
+ <cd:command name='registerhyphenationpattern' value='enregistrermotifcesure'/>
+ <cd:command name='remark' value='remarque'/>
+ <cd:command name='replacefeature' value='remplacerfonctionnalite'/>
<cd:command name='reset' value='raz'/>
+ <cd:command name='resetandaddfeature' value='razetajouterfonctionnalite'/>
+ <cd:command name='resetcharacteralign' value='razalignercaractere'/>
+ <cd:command name='resetcharacterkerning' value='razapprochecaracteres'/>
+ <cd:command name='resetcharacterspacing' value='razespacementcaracteres'/>
+ <cd:command name='resetcharacterstripping' value='razdemontagecaracteres'/>
+ <cd:command name='resetfeature' value='razfonctionnalite'/>
+ <cd:command name='resetfontcolorsheme' value='razthemecouleurpolice'/>
+ <cd:command name='resetfontfallback' value='razpolicederepli'/>
+ <cd:command name='resetfontsolution' value='zarsolutionpolice'/>
+ <cd:command name='resethyphenationfeatures' value='razfonctionnalitescesure'/>
+ <cd:command name='resetlocalfloats' value='razflottantslocaux'/>
<cd:command name='resetmarking' value='razmarquage'/>
+ <cd:command name='resetmode' value='razmode'/>
<cd:command name='resetnumber' value='raznumero'/>
- <cd:command name='resettext' value='resettextcontent'/>
+ <cd:command name='resetpath' value='razchemin'/>
+ <cd:command name='resetperiodkerning' value='razapprochepoint'/>
+ <cd:command name='resetsystemmode' value='razmodesysteme'/>
+ <cd:command name='resettextcontent' value='raztexte'/>
+ <cd:command name='resetvisualizers' value='razvisualisateurs'/>
+ <cd:command name='restoreglobalbodyfont' value='restaurerpolicedecorpsglobale'/>
+ <cd:command name='retestfeature' value='retesterfonctionnalite'/>
+ <cd:command name='revivefeature' value='relancerfonctionnalite'/>
<cd:command name='rightaligned' value='aligneadroite'/>
+ <cd:command name='rightbottombox' value='boitebasdroite'/>
<cd:command name='rightedgedistance' value='distanceborddroit'/>
<cd:command name='rightedgewidth' value='largeurborddroit'/>
+ <cd:command name='rightline' value='lignedroite'/>
<cd:command name='rightmargindistance' value='distancemargedroite'/>
<cd:command name='rightmarginwidth' value='largeurmargedroite'/>
<cd:command name='romannumerals' value='chiffresromains'/>
- <cd:command name='rotate' value='oriente'/>
- <cd:command name='savebuffer' value='savebuffer'/>
- <cd:command name='scale' value='echelle'/>
+ <cd:command name='rotate' value='tourner'/>
+ <cd:command name='savebuffer' value='enregistrertampon'/>
+ <cd:command name='scale' value='mettrealechelle'/>
<cd:command name='screen' value='ecran'/>
- <cd:command name='selectblocks' value='selectionneblocs'/>
- <cd:command name='selectpaper' value='selectionnepapier'/>
- <cd:command name='selectversion' value='selectionneversion'/>
- <cd:command name='setnumber' value='affectenumero'/>
- <cd:command name='settextcontent' value='settext'/>
- <cd:command name='settextvariable' value='affectevariabletexte'/>
- <cd:command name='setupalign' value='reglealignement'/>
- <cd:command name='setupanswerarea' value='setupanswerarea'/>
- <cd:command name='setuparranging' value='reglearrangement'/>
- <cd:command name='setupbackground' value='reglearriereplan'/>
- <cd:command name='setupbackgrounds' value='reglearriereplans'/>
- <cd:command name='setupblackrules' value='reglelignesnoires'/>
- <cd:command name='setupblank' value='definitvide'/>
- <cd:command name='setupblock' value='reglebloc'/>
- <cd:command name='setupbodyfont' value='reglepolicecorps'/>
- <cd:command name='setupbodyfontenvironment' value='regleenvironnementpolicecorps'/>
- <cd:command name='setupbottom' value='regleinf'/>
- <cd:command name='setupbottomtexts' value='regletextesinf'/>
- <cd:command name='setupbuffer' value='reglebuffer'/>
- <cd:command name='setupbuttons' value='regleboutons'/>
- <cd:command name='setupcapitals' value='reglecapitales'/>
- <cd:command name='setupcaption' value='regleintitule'/>
- <cd:command name='setupcaptions' value='regleintitules'/>
- <cd:command name='setupclipping' value='regleclipping'/>
- <cd:command name='setupcolor' value='reglecouleur'/>
- <cd:command name='setupcolors' value='reglecouleurs'/>
- <cd:command name='setupcolumns' value='reglecolonnes'/>
- <cd:command name='setupcolumnset' value='reglejeucolonne'/>
- <cd:command name='setupcolumnsetlines' value='setupcolumnsetlines'/>
- <cd:command name='setupcolumnsetstart' value='setupcolumnsetstart'/>
- <cd:command name='setupcombinations' value='reglecombinaisons'/>
- <cd:command name='setupcombinedlist' value='reglelisteimbriquee'/>
- <cd:command name='setupcomment' value='reglecommentaire'/>
- <cd:command name='setupdescription' value='setupdescription'/>
- <cd:command name='setupdescriptions' value='regledescriptions'/>
- <cd:command name='setupenumeration' value='setupenumeration'/>
- <cd:command name='setupenumerations' value='regleenumerations'/>
- <cd:command name='setupexternalfigures' value='reglefiguresexternes'/>
- <cd:command name='setupfield' value='reglechamp'/>
- <cd:command name='setupfields' value='reglechamps'/>
- <cd:command name='setupfillinlines' value='regleremplitligne'/>
- <cd:command name='setupfillinrules' value='regleremplitlignesreglees'/>
- <cd:command name='setupfloat' value='regleflottant'/>
- <cd:command name='setupfloats' value='regleflottants'/>
- <cd:command name='setupfloatsplitting' value='regleseparationflottant'/>
- <cd:command name='setupfooter' value='reglepdp'/>
- <cd:command name='setupfootertexts' value='regletextespdp'/>
- <cd:command name='setupfootnotedefinition' value='definitnotepdp'/>
- <cd:command name='setupfootnotes' value='reglenotepdp'/>
- <cd:command name='setupforms' value='regleformulaires'/>
- <cd:command name='setupformula' value='setupformula'/>
- <cd:command name='setupformulas' value='regleformules'/>
- <cd:command name='setupframed' value='regleencadre'/>
- <cd:command name='setupframedtext' value='setupframedtext'/>
- <cd:command name='setupframedtexts' value='setupframedtexts'/>
- <cd:command name='setuphead' value='regletete'/>
- <cd:command name='setupheader' value='regleentete'/>
- <cd:command name='setupheadertexts' value='regletextesentete'/>
- <cd:command name='setupheadnumber' value='reglenumerotete'/>
- <cd:command name='setupheads' value='regletetes'/>
- <cd:command name='setupheadtext' value='regletextetete'/>
- <cd:command name='setuphyphenmark' value='reglemarquagehyphenation'/>
- <cd:command name='setupindentedtext' value='setupindentedtext'/>
- <cd:command name='setupindenting' value='reglecomposeenalinea'/>
- <cd:command name='setupinmargin' value='regledansmarge'/>
- <cd:command name='setupinteraction' value='regleinteraction'/>
- <cd:command name='setupinteractionbar' value='reglebarreinteraction'/>
- <cd:command name='setupinteractionmenu' value='reglemenuinteraction'/>
- <cd:command name='setupinteractionscreen' value='regleecraninteraction'/>
- <cd:command name='setupinterlinespace' value='regleespacementinterligne'/>
- <cd:command name='setupitemgroup' value='setupitemgroup'/>
- <cd:command name='setupitemgroups' value='reglegroupeselements'/>
- <cd:command name='setupitems' value='regleelements'/>
- <cd:command name='setuplabeltext' value='reglelabeltexte'/>
- <cd:command name='setuplanguage' value='reglelangue'/>
- <cd:command name='setuplayout' value='regledisposition'/>
- <cd:command name='setuplegend' value='reglelegende'/>
- <cd:command name='setuplinenumbering' value='reglenumerotationligne'/>
- <cd:command name='setuplines' value='reglelignes'/>
- <cd:command name='setuplinewidth' value='regleepaisseurligne'/>
- <cd:command name='setuplist' value='regleliste'/>
- <cd:command name='setupmakeup' value='reglemakeup'/>
- <cd:command name='setupmarginblock' value='setupmarginblock'/>
- <cd:command name='setupmarginblocks' value='regleblocmarge'/>
- <cd:command name='setupmargindata' value='setupmargindata'/>
- <cd:command name='setupmarginrules' value='reglemargereglee'/>
- <cd:command name='setupmarking' value='reglemarquage'/>
- <cd:command name='setupmathalignment' value='setupmathalignment'/>
- <cd:command name='setupnarrower' value='reglecompoetroite'/>
- <cd:command name='setupnumber' value='reglenumero'/>
- <cd:command name='setupnumbering' value='reglenumerotation'/>
- <cd:command name='setupoppositeplacing' value='regleplacementopposition'/>
- <cd:command name='setupoutput' value='reglesortie'/>
- <cd:command name='setuppagecomment' value='reglecommentairepage'/>
- <cd:command name='setuppagenumber' value='reglenumeropage'/>
- <cd:command name='setuppagenumbering' value='reglenumerotationpage'/>
- <cd:command name='setuppagetransitions' value='regletransitionspage'/>
- <cd:command name='setuppalet' value='reglepalette'/>
- <cd:command name='setuppaper' value='reglepapier'/>
- <cd:command name='setuppapersize' value='regletaillepapier'/>
- <cd:command name='setupparagraphnumbering' value='reglenumerotationparagraphe'/>
- <cd:command name='setupparagraphs' value='regleparagraphes'/>
- <cd:command name='setupplacement' value='setupplacement'/>
- <cd:command name='setuppositioning' value='reglepositionnement'/>
- <cd:command name='setupprofiles' value='regleprofils'/>
- <cd:command name='setupprograms' value='regleprogrammes'/>
- <cd:command name='setuppublications' value='reglepublications'/>
- <cd:command name='setupquote' value='demarreciter'/>
- <cd:command name='setupreferencelist' value='reglelistereference'/>
- <cd:command name='setupreferencing' value='reglereferencage'/>
- <cd:command name='setupregister' value='regleregistre'/>
- <cd:command name='setuprotate' value='regleoriente'/>
- <cd:command name='setuprule' value='regleregle'/>
- <cd:command name='setupscreens' value='regleecrans'/>
- <cd:command name='setupsection' value='reglesection'/>
- <cd:command name='setupsectionblock' value='regleblocsection'/>
- <cd:command name='setupsorting' value='regletri'/>
- <cd:command name='setupspacing' value='regleespacement'/>
- <cd:command name='setupstartstop' value='regledemarrestoppe'/>
- <cd:command name='setupstrut' value='reglestrut'/>
- <cd:command name='setupsubpagenumber' value='reglesousnumeropage'/>
- <cd:command name='setupsymbolset' value='reglejeusymboles'/>
- <cd:command name='setupsynchronization' value='reglesynchronisation'/>
- <cd:command name='setupsynchronizationbar' value='reglebarresynchronisation'/>
- <cd:command name='setupsynonyms' value='reglesynonymes'/>
- <cd:command name='setupsystem' value='reglesysteme'/>
- <cd:command name='setuptab' value='regletab'/>
- <cd:command name='setuptables' value='regletableaux'/>
- <cd:command name='setuptabulate' value='regletabulation'/>
- <cd:command name='setuptext' value='regletexte'/>
- <cd:command name='setuptextbackground' value='setuptextbackground'/>
- <cd:command name='setuptextposition' value='reglepositiontexte'/>
- <cd:command name='setuptextrules' value='reglelignesreglestexte'/>
- <cd:command name='setuptexttexts' value='regletextestexte'/>
- <cd:command name='setuptextvariable' value='reglevariabletexte'/>
- <cd:command name='setupthinrules' value='regletraitsfins'/>
- <cd:command name='setuptolerance' value='regletolerance'/>
- <cd:command name='setuptop' value='reglesup'/>
- <cd:command name='setuptoptexts' value='regletextessup'/>
- <cd:command name='setuptype' value='regletype'/>
- <cd:command name='setuptyping' value='regledactylo'/>
- <cd:command name='setupunderbar' value='reglesouslignage'/>
- <cd:command name='setupurl' value='regleurl'/>
- <cd:command name='setupversions' value='regleversions'/>
- <cd:command name='setupwhitespace' value='regleespaceblanc'/>
- <cd:command name='showbodyfont' value='montrepolicecorps'/>
- <cd:command name='showbodyfontenvironment' value='montreenvironnementpolicecorps'/>
- <cd:command name='showcolor' value='montrecouleur'/>
- <cd:command name='showcolorgroup' value='montregroupecouleur'/>
- <cd:command name='showexternalfigures' value='montrefiguresexternes'/>
- <cd:command name='showfields' value='montrechamps'/>
- <cd:command name='showframe' value='montrecadre'/>
- <cd:command name='showgrid' value='montregrille'/>
- <cd:command name='showlayout' value='montredisposition'/>
- <cd:command name='showmakeup' value='montremakeup'/>
- <cd:command name='showpalet' value='montrepalette'/>
- <cd:command name='showprint' value='montreedition'/>
- <cd:command name='showsetups' value='montrereglages'/>
- <cd:command name='showstruts' value='montrestruts'/>
- <cd:command name='showsymbolset' value='montrejeusymboles'/>
- <cd:command name='smallcapped' value='cap'/>
+ <cd:command name='selectblocks' value='selectionnerblocs'/>
+ <cd:command name='selectpaper' value='selectionnerpapier'/>
+ <cd:command name='selectversion' value='selectionnerversion'/>
+ <cd:command name='setbigbodyfont' value='reglerpolicedecorpsimportante'/>
+ <cd:command name='setcharacteralign' value='regleralignercaractere'/>
+ <cd:command name='setcharacteraligndetail' value='reglerdetailalignercaractere'/>
+ <cd:command name='setcharactercasing' value='reglercassecaracteres'/>
+ <cd:command name='setcharactercleaning' value='reglernettoyagecaracteres'/>
+ <cd:command name='setcharacterkerning' value='reglerapprochecaracteres'/>
+ <cd:command name='setcharacterspacing' value='reglerespacementcaracteres'/>
+ <cd:command name='setcharacterstripping' value='reglerdemontagecaracteres'/>
+ <cd:command name='setcurrentfontclass' value='reglerclassepolicecourante'/>
+ <cd:command name='setfirstline' value='reglerpremiereligne'/>
+ <cd:command name='setfirstpasscharacteralign' value='regleralignercaracterepremierepasse'/>
+ <cd:command name='setfont' value='reglerpolice'/>
+ <cd:command name='setfontcolorsheme' value='reglerthemecouleurpolice'/>
+ <cd:command name='setfontfeature' value='reglerfonctionnalitepolice'/>
+ <cd:command name='setfontsolution' value='reglersolutionpolice'/>
+ <cd:command name='setfontstrut' value='reglerentretoisepolice'/>
+ <cd:command name='sethyphenationfeatures' value='reglerfonctionnalitescesure'/>
+ <cd:command name='setmainbodyfont' value='reglerpolicedecorpsprincipale'/>
+ <cd:command name='setmode' value='reglermode'/>
+ <cd:command name='setnote' value='reglernote'/>
+ <cd:command name='setnotetext' value='reglertextenote'/>
+ <cd:command name='setnumber' value='reglernumero'/>
+ <cd:command name='setperiodkerning' value='reglerapprochepoint'/>
+ <cd:command name='setsecondpasscharacteralign' value='regleralignercaracteresecondepasse'/>
+ <cd:command name='setsmallbodyfont' value='reglerpolicedecorpspetite'/>
+ <cd:command name='setsystemmode' value='reglermodesysteme'/>
+ <cd:command name='settextcontent' value='reglercontenutexte'/>
+ <cd:command name='settextvariable' value='reglervariabletexte'/>
+ <cd:command name='setupalign' value='configureraligner'/>
+ <cd:command name='setupanswerarea' value='configurerzonereponse'/>
+ <cd:command name='setuparranging' value='configurerarrangement'/>
+ <cd:command name='setupattachment' value='configurepiecejointe'/>
+ <cd:command name='setupbackground' value='configurerarriereplan'/>
+ <cd:command name='setupbackgrounds' value='configurerarriereplans'/>
+ <cd:command name='setupblackrules' value='configurertraitsepais'/>
+ <cd:command name='setupblank' value='configurervierge'/>
+ <cd:command name='setupblock' value='configurerbloc'/>
+ <cd:command name='setupbodyfont' value='configurerpolicedecorps'/>
+ <cd:command name='setupbodyfontenvironment' value='configurerenvironnementpolicedecorps'/>
+ <cd:command name='setupbottom' value='configurerbas'/>
+ <cd:command name='setupbottomtexts' value='configurertextesbas'/>
+ <cd:command name='setupbuffer' value='configurertampon'/>
+ <cd:command name='setupbuttons' value='configurerboutons'/>
+ <cd:command name='setupcapitals' value='configurercapitales'/>
+ <cd:command name='setupcaption' value='configurerintitule'/>
+ <cd:command name='setupcaptions' value='configurerintitules'/>
+ <cd:command name='setupcharacteralign' value='configureralignercaractere'/>
+ <cd:command name='setupcharacterkerning' value='configurerapprochecaracteres'/>
+ <cd:command name='setupcharacterspacing' value='configurerespacementcaracteres'/>
+ <cd:command name='setupclipping' value='configurerdecoupage'/>
+ <cd:command name='setupcolor' value='configurercouleur'/>
+ <cd:command name='setupcolors' value='configurercouleurs'/>
+ <cd:command name='setupcolumns' value='configurercolonnes'/>
+ <cd:command name='setupcolumnset' value='configurerjeucolonnes'/>
+ <cd:command name='setupcolumnsetlines' value='configurerlignesjeucolonnes'/>
+ <cd:command name='setupcolumnsetstart' value='configurerfinjeucolonnes'/>
+ <cd:command name='setupcombinations' value='configurercombinaisons'/>
+ <cd:command name='setupcombinedlist' value='configurerlistecombinee'/>
+ <cd:command name='setupcomment' value='configurercommentaire'/>
+ <cd:command name='setupcounter' value='configurercompteur'/>
+ <cd:command name='setupdescription' value='configurerdescription'/>
+ <cd:command name='setupdescriptions' value='configurerdescriptions'/>
+ <cd:command name='setupenumeration' value='configurerénumération'/>
+ <cd:command name='setupenumerations' value='configurerénumérations'/>
+ <cd:command name='setupexternalfigures' value='configurerfiguresexterne'/>
+ <cd:command name='setupfield' value='configurerchamp'/>
+ <cd:command name='setupfields' value='configurerchamps'/>
+ <cd:command name='setupfillinlines' value='configurerlignesarenseigner'/>
+ <cd:command name='setupfillinrules' value='configurertraitsarenseigner'/>
+ <cd:command name='setupfirstline' value='configurerpremiereligne'/>
+ <cd:command name='setupfloat' value='configurerflottant'/>
+ <cd:command name='setupfloats' value='configurerflottants'/>
+ <cd:command name='setupfloatsplitting' value='configurerpartageflottants'/>
+ <cd:command name='setupfontexpansion' value='configurerexpansionpolice'/>
+ <cd:command name='setupfontprotrusion' value='configurerprotrusionpolice'/>
+ <cd:command name='setupfonts' value='configurerpolices'/>
+ <cd:command name='setupfontsolution' value='configuresolutionpolice'/>
+ <cd:command name='setupfooter' value='configurerpdp'/>
+ <cd:command name='setupfootertexts' value='configurertextespdp'/>
+ <cd:command name='setupfootnotedefinition' value='configurerdefinitionnotebdp'/>
+ <cd:command name='setupfootnotes' value='configurernotesbdp'/>
+ <cd:command name='setupforms' value='configurerformulaires'/>
+ <cd:command name='setupformula' value='configurerformule'/>
+ <cd:command name='setupformulas' value='configurerformules'/>
+ <cd:command name='setupframed' value='configurerencadre'/>
+ <cd:command name='setupframedtext' value='configurertexteencadre'/>
+ <cd:command name='setupframedtexts' value='configurertextesencadres'/>
+ <cd:command name='setuphead' value='configurertête'/>
+ <cd:command name='setupheader' value='configurerentête'/>
+ <cd:command name='setupheadertexts' value='configurertextesentête'/>
+ <cd:command name='setupheadnumber' value='configurernumerotête'/>
+ <cd:command name='setupheads' value='configurertêtes'/>
+ <cd:command name='setupheadtext' value='configurertextêtete'/>
+ <cd:command name='setuphyphenation' value='configurercesure'/>
+ <cd:command name='setuphyphenmark' value='configurermarquecesure'/>
+ <cd:command name='setupindentedtext' value='configurertexteindente'/>
+ <cd:command name='setupindenting' value='configurerindentation'/>
+ <cd:command name='setupinmargin' value='configurerdansmarge'/>
+ <cd:command name='setupinteraction' value='configurerinteraction'/>
+ <cd:command name='setupinteractionbar' value='configurerbarreinteraction'/>
+ <cd:command name='setupinteractionmenu' value='configurermenuinteraction'/>
+ <cd:command name='setupinteractionscreen' value='configurerecraninteraction'/>
+ <cd:command name='setupinterlinespace' value='configurerespaceinterligne'/>
+ <cd:command name='setupitemgroup' value='configurergroupedéléments'/>
+ <cd:command name='setupitemgroups' value='configurergroupesdéléments'/>
+ <cd:command name='setupitems' value='configureréléments'/>
+ <cd:command name='setuplabeltext' value='configureretiquettetexte'/>
+ <cd:command name='setuplanguage' value='configurerlangue'/>
+ <cd:command name='setuplayout' value='configurermiseenpage'/>
+ <cd:command name='setuplegend' value='configurerlegende'/>
+ <cd:command name='setuplinenote' value='configurernotedeligne'/>
+ <cd:command name='setuplinenumbering' value='configurernumérotationligne'/>
+ <cd:command name='setuplines' value='configurerlignes'/>
+ <cd:command name='setuplinewidth' value='configurerepaisseurtrait'/>
+ <cd:command name='setuplist' value='configurerliste'/>
+ <cd:command name='setupmakeup' value='configurercomposition'/>
+ <cd:command name='setupmarginblock' value='configurerblocmarginal'/>
+ <cd:command name='setupmarginblocks' value='configurerblocmarge'/>
+ <cd:command name='setupmargindata' value='configurerdonneesmarginales'/>
+ <cd:command name='setupmarginrules' value='configurertraitsmarge'/>
+ <cd:command name='setupmarking' value='configurermarquage'/>
+ <cd:command name='setupmathalignment' value='configureralignementmath'/>
+ <cd:command name='setupnarrower' value='configurerplusetroit'/>
+ <cd:command name='setupnotation' value='configurernotation'/>
+ <cd:command name='setupnotations' value='configurernotations'/>
+ <cd:command name='setupnote' value='configurenote'/>
+ <cd:command name='setupnotes' value='configurenotes'/>
+ <cd:command name='setupnumber' value='configurernumero'/>
+ <cd:command name='setupnumbering' value='configurernumérotation'/>
+ <cd:command name='setupoppositeplacing' value='configurerplacementopposition'/>
+ <cd:command name='setupoutput' value='configurersortie'/>
+ <cd:command name='setuppagecomment' value='configurercommentairepage'/>
+ <cd:command name='setuppagenumber' value='configurernumeropage'/>
+ <cd:command name='setuppagenumbering' value='configurernumérotationpage'/>
+ <cd:command name='setuppagetransitions' value='configurertransitionpage'/>
+ <cd:command name='setuppalet' value='configurerpalette'/>
+ <cd:command name='setuppaper' value='configurerpapier'/>
+ <cd:command name='setuppapersize' value='configurertaillepapier'/>
+ <cd:command name='setupparagraphnumbering' value='configurernumérotationparagraphe'/>
+ <cd:command name='setupparagraphs' value='configurerparagraphe'/>
+ <cd:command name='setupperiodkerning' value='configurerapprochepoint'/>
+ <cd:command name='setupplacement' value='configurerplacement'/>
+ <cd:command name='setuppositioning' value='configurerpositionnement'/>
+ <cd:command name='setupprofiles' value='configurerprofils'/>
+ <cd:command name='setupprograms' value='configurerprogrammes'/>
+ <cd:command name='setuppublications' value='configurerpublications'/>
+ <cd:command name='setupquote' value='configurerciter'/>
+ <cd:command name='setupreferencelist' value='configurerlistereference'/>
+ <cd:command name='setupreferencing' value='configurerreferencement'/>
+ <cd:command name='setupregister' value='configurerregistre'/>
+ <cd:command name='setuprotate' value='configurerrotation'/>
+ <cd:command name='setuprule' value='configurertrait'/>
+ <cd:command name='setupscreens' value='configurerecran'/>
+ <cd:command name='setupsection' value='configurersection'/>
+ <cd:command name='setupsectionblock' value='configurerblocsection'/>
+ <cd:command name='setupsorting' value='configurertri'/>
+ <cd:command name='setupspacing' value='configurerespacement'/>
+ <cd:command name='setupstartstop' value='configurerdébutfin'/>
+ <cd:command name='setupstrut' value='configurerentretoise'/>
+ <cd:command name='setupsubpagenumber' value='configurernumerosouspage'/>
+ <cd:command name='setupsymbolset' value='configurerjeusymboles'/>
+ <cd:command name='setupsynchronization' value='configurersynchronisation'/>
+ <cd:command name='setupsynchronizationbar' value='configurerbarresynchronisation'/>
+ <cd:command name='setupsynonyms' value='configurersynonymes'/>
+ <cd:command name='setupsystem' value='configurersysteme'/>
+ <cd:command name='setuptab' value='configurertab'/>
+ <cd:command name='setuptables' value='configurertables'/>
+ <cd:command name='setuptabulate' value='configurertabulation'/>
+ <cd:command name='setuptext' value='configurertexte'/>
+ <cd:command name='setuptextbackground' value='configurertextearriereplan'/>
+ <cd:command name='setuptextnote' value='configurernotetexte'/>
+ <cd:command name='setuptextposition' value='configurerpositiontexte'/>
+ <cd:command name='setuptextrules' value='configurertextetraits'/>
+ <cd:command name='setuptexttexts' value='configurertextestexte'/>
+ <cd:command name='setuptextvariable' value='configurervariabletexte'/>
+ <cd:command name='setupthinrules' value='configurertraitsfins'/>
+ <cd:command name='setuptolerance' value='configurertolerance'/>
+ <cd:command name='setuptop' value='configurerhaut'/>
+ <cd:command name='setuptoptexts' value='configurertexteshaut'/>
+ <cd:command name='setuptype' value='configurertranscrire'/>
+ <cd:command name='setuptyping' value='configurertranscription'/>
+ <cd:command name='setupunderbar' value='configurersouligner'/>
+ <cd:command name='setupurl' value='configurerurl'/>
+ <cd:command name='setupversions' value='configurerversions'/>
+ <cd:command name='setupwhitespace' value='configurerespaceblanc'/>
+ <cd:command name='setvisualizerfont' value='reglervisualisateurpolice'/>
+ <cd:command name='showbodyfont' value='montrerpolicedecorps'/>
+ <cd:command name='showbodyfontenvironment' value='montrerenvironnementpolicedecorps'/>
+ <cd:command name='showcolor' value='montrercouleur'/>
+ <cd:command name='showcolorgroup' value='montrergroupecouleur'/>
+ <cd:command name='showcounter' value='montrercompteur'/>
+ <cd:command name='showexternalfigures' value='montrerfiguresexternes'/>
+ <cd:command name='showfields' value='montrerchamps'/>
+ <cd:command name='showfont' value='montrerpolice'/>
+ <cd:command name='showfontdata' value='montrerdonneespolice'/>
+ <cd:command name='showfontexpansion' value='montrerexpansionpolice'/>
+ <cd:command name='showfontitalics' value='montreritaliquespolice'/>
+ <cd:command name='showfontkerns' value='montrerlesapproches'/>
+ <cd:command name='showfontparameters' value='montrerparametrespolice'/>
+ <cd:command name='showfontstrip' value='montrervisuellementpolice'/>
+ <cd:command name='showfontstyle' value='montrerstylepolice'/>
+ <cd:command name='showframe' value='montrermiseenpage'/>
+ <cd:command name='showgrid' value='montrergrille'/>
+ <cd:command name='showhyphenationtrace' value='montrertracecesure'/>
+ <cd:command name='showkerning' value='montrerapproche'/>
+ <cd:command name='showlayout' value='montrermiseenpage'/>
+ <cd:command name='showmakeup' value='montrercomposition'/>
+ <cd:command name='showminimalbaseline' value='montrerlignedebase'/>
+ <cd:command name='showpalet' value='montrerpalette'/>
+ <cd:command name='showprint' value='montrerimpression'/>
+ <cd:command name='showsetups' value='montrerconfigurations'/>
+ <cd:command name='showstruts' value='montrerentretoises'/>
+ <cd:command name='showsymbolset' value='montrerjeusymboles'/>
+ <cd:command name='smallcapped' value='petitescap'/>
<cd:command name='someline' value='uneligne'/>
<cd:command name='somewhere' value='qqpart'/>
<cd:command name='space' value='espace'/>
- <cd:command name='splitfloat' value='separeflottant'/>
- <cd:command name='startalignment' value='demarrealignement'/>
- <cd:command name='startbackground' value='demarrearriereplan'/>
- <cd:command name='startcoding' value='demarrecodage'/>
- <cd:command name='startcolor' value='demarrecouleur'/>
- <cd:command name='startcolumnmakeup' value='startcolumnmakeup'/>
- <cd:command name='startcolumns' value='demarrecolonnes'/>
- <cd:command name='startcolumnset' value='demarrejeucolonne'/>
- <cd:command name='startcombination' value='demarrecombinaison'/>
- <cd:command name='startcomponent' value='demarrecomposant'/>
- <cd:command name='startdocument' value='demarredocument'/>
- <cd:command name='startenvironment' value='demarreenvironement'/>
- <cd:command name='startfigure' value='demarrefigure'/>
- <cd:command name='startframed' value='startframed'/>
- <cd:command name='startglobal' value='demarreglobal'/>
- <cd:command name='startline' value='demarreligne'/>
- <cd:command name='startlinecorrection' value='demarrecorrectionligne'/>
- <cd:command name='startlinenumbering' value='demarrenumerotationligne'/>
- <cd:command name='startlines' value='demarrelignes'/>
- <cd:command name='startlocal' value='demarrelocal'/>
- <cd:command name='startlocalfootnotes' value='demarrenotespdplocales'/>
- <cd:command name='startmakeup' value='demarremakeup'/>
- <cd:command name='startmarginblock' value='demarreblocmarge'/>
- <cd:command name='startmarginrule' value='demarremargereglee'/>
- <cd:command name='startnarrower' value='demarrecompoetroite'/>
- <cd:command name='startopposite' value='demarreopposition'/>
- <cd:command name='startoverlay' value='demarrerevetement'/>
- <cd:command name='startoverzicht' value='demarrevuedensemble'/>
- <cd:command name='startpacked' value='demarregroupe'/>
- <cd:command name='startpositioning' value='demarrepositionnement'/>
- <cd:command name='startproduct' value='demarreproduit'/>
- <cd:command name='startprofile' value='demarreprofil'/>
- <cd:command name='startproject' value='demarreprojet'/>
- <cd:command name='startquotation' value='demarrecitation'/>
- <cd:command name='startraster' value='demarreraster'/>
- <cd:command name='startsymbolset' value='demarrejeusymboles'/>
- <cd:command name='startsynchronization' value='demarresynchronisation'/>
- <cd:command name='starttable' value='demarretableau'/>
- <cd:command name='starttables' value='demarretableaux'/>
- <cd:command name='starttext' value='demarretexte'/>
- <cd:command name='starttextbackground' value='starttextbackground'/>
- <cd:command name='starttextrule' value='demarreligneregleetexte'/>
- <cd:command name='startunpacked' value='demarredegroupe'/>
- <cd:command name='startversion' value='demarreversion'/>
- <cd:command name='stopalignment' value='stoppealignement'/>
- <cd:command name='stopbackground' value='stoppearriereplan'/>
- <cd:command name='stopcoding' value='stoppecodage'/>
- <cd:command name='stopcolor' value='stoppecouleur'/>
- <cd:command name='stopcolumnmakeup' value='stopcolumnmakeup'/>
- <cd:command name='stopcolumns' value='stoppecolonnes'/>
- <cd:command name='stopcolumnset' value='stoppejeucolonne'/>
- <cd:command name='stopcombination' value='stoppecombinaison'/>
- <cd:command name='stopcomponent' value='stoppecomposant'/>
- <cd:command name='stopdocument' value='stoppedocument'/>
- <cd:command name='stopenvironment' value='stoppeenvironement'/>
- <cd:command name='stopframed' value='stopframed'/>
- <cd:command name='stopglobal' value='stoppeglobal'/>
- <cd:command name='stopline' value='stoppeligne'/>
- <cd:command name='stoplinecorrection' value='stoppecorrectionligne'/>
- <cd:command name='stoplinenumbering' value='stoppenumerotationligne'/>
- <cd:command name='stoplines' value='stoppelignes'/>
- <cd:command name='stoplocal' value='stoppelocal'/>
- <cd:command name='stoplocalfootnotes' value='stoppenotespdplocales'/>
- <cd:command name='stopmakeup' value='stoppemakeup'/>
- <cd:command name='stopmarginblock' value='stoppeblocmarge'/>
- <cd:command name='stopmarginrule' value='stoppemargereglee'/>
- <cd:command name='stopnarrower' value='stopcompoetroite'/>
- <cd:command name='stopopposite' value='stoppeopposition'/>
- <cd:command name='stopoverlay' value='stopperevetement'/>
- <cd:command name='stopoverzicht' value='stoppevuedensemble'/>
- <cd:command name='stoppacked' value='stoppegroupe'/>
- <cd:command name='stoppositioning' value='stoppepositionnement'/>
- <cd:command name='stopproduct' value='stoppeproduit'/>
- <cd:command name='stopprofile' value='stoppeprofil'/>
- <cd:command name='stopproject' value='stoppeprojet'/>
- <cd:command name='stopquotation' value='stoppecitation'/>
- <cd:command name='stopraster' value='stopperaster'/>
- <cd:command name='stopsynchronization' value='stoppesynchronisation'/>
- <cd:command name='stoptable' value='stoppetableau'/>
- <cd:command name='stoptables' value='stoppetableaux'/>
- <cd:command name='stoptext' value='stoppetexte'/>
- <cd:command name='stoptextbackground' value='stoptextbackground'/>
- <cd:command name='stoptextrule' value='stoppeligneregleetexte'/>
- <cd:command name='stopunpacked' value='stoppedegroupe'/>
- <cd:command name='stopversion' value='stoppeversion'/>
+ <cd:command name='specialitem' value='élémentspécial'/>
+ <cd:command name='splitfloat' value='flottantpartage'/>
+ <cd:command name='startalignment' value='débutalignement'/>
+ <cd:command name='startbackground' value='débutarriereplan'/>
+ <cd:command name='startcoding' value='débutcodage'/>
+ <cd:command name='startcolor' value='débutcouleur'/>
+ <cd:command name='startcolumnmakeup' value='débutcompositioncolonne'/>
+ <cd:command name='startcolumns' value='débutcolonnes'/>
+ <cd:command name='startcolumnset' value='débutjeucolonnes'/>
+ <cd:command name='startcombination' value='débutcombinaison'/>
+ <cd:command name='startcomponent' value='débutcomposant'/>
+ <cd:command name='startdocument' value='débutdocument'/>
+ <cd:command name='startenvironment' value='débutenvironnement'/>
+ <cd:command name='startfigure' value='débutfigure'/>
+ <cd:command name='startframed' value='débutencadre'/>
+ <cd:command name='startglobal' value='débutglobal'/>
+ <cd:command name='startline' value='débutligneref'/>
+ <cd:command name='startlinecorrection' value='débutcorrectionligne'/>
+ <cd:command name='startlinenote' value='débutnotedeligne'/>
+ <cd:command name='startlinenumbering' value='débutnumérotationligne'/>
+ <cd:command name='startlines' value='débutlignes'/>
+ <cd:command name='startlocal' value='débutlocal'/>
+ <cd:command name='startlocalfootnotes' value='débutnotesbdplocal'/>
+ <cd:command name='startmakeup' value='débutcomposition'/>
+ <cd:command name='startmarginblock' value='débutblocmarge'/>
+ <cd:command name='startmarginrule' value='débuttraitmarge'/>
+ <cd:command name='startnarrower' value='débutplusetroit'/>
+ <cd:command name='startopposite' value='débutopposition'/>
+ <cd:command name='startoverlay' value='débutsuperposition'/>
+ <cd:command name='startoverview' value='débutvuedensemble'/>
+ <cd:command name='startpacked' value='débutemballage'/>
+ <cd:command name='startpositioning' value='débutpositionnement'/>
+ <cd:command name='startproduct' value='débutproduit'/>
+ <cd:command name='startprofile' value='débutprofil'/>
+ <cd:command name='startproject' value='débutprojet'/>
+ <cd:command name='startquotation' value='débutcitation'/>
+ <cd:command name='startraster' value='débutraster'/>
+ <cd:command name='startsymbolset' value='débutjeusymboles'/>
+ <cd:command name='startsynchronization' value='débutsynchronisation'/>
+ <cd:command name='starttable' value='débuttable'/>
+ <cd:command name='starttables' value='débuttables'/>
+ <cd:command name='starttext' value='débuttexte'/>
+ <cd:command name='starttextbackground' value='débuttextearriereplan'/>
+ <cd:command name='starttextrule' value='débuttextetrait'/>
+ <cd:command name='startunpacked' value='débutdesemballage'/>
+ <cd:command name='startversion' value='débutversion'/>
+ <cd:command name='stopalignment' value='finalignement'/>
+ <cd:command name='stopbackground' value='finarriereplan'/>
+ <cd:command name='stopcoding' value='fincodage'/>
+ <cd:command name='stopcolor' value='fincouleur'/>
+ <cd:command name='stopcolumnmakeup' value='fincompositioncolonne'/>
+ <cd:command name='stopcolumns' value='fincolonnes'/>
+ <cd:command name='stopcolumnset' value='finjeucolonnes'/>
+ <cd:command name='stopcombination' value='fincombinaison'/>
+ <cd:command name='stopcomponent' value='fincomposant'/>
+ <cd:command name='stopdocument' value='findocument'/>
+ <cd:command name='stopenvironment' value='finenvironnement'/>
+ <cd:command name='stopframed' value='finencadre'/>
+ <cd:command name='stopglobal' value='finglobal'/>
+ <cd:command name='stopline' value='finligneref'/>
+ <cd:command name='stoplinecorrection' value='fincorrectionligne'/>
+ <cd:command name='stoplinenote' value='finnotedeligne'/>
+ <cd:command name='stoplinenumbering' value='finnumérotationligne'/>
+ <cd:command name='stoplines' value='finlignes'/>
+ <cd:command name='stoplocal' value='finlocal'/>
+ <cd:command name='stoplocalfootnotes' value='finnotesbdplocal'/>
+ <cd:command name='stopmakeup' value='fincomposition'/>
+ <cd:command name='stopmarginblock' value='finblocmarge'/>
+ <cd:command name='stopmarginrule' value='fintraitmarge'/>
+ <cd:command name='stopnarrower' value='finplusetroit'/>
+ <cd:command name='stopopposite' value='finopposition'/>
+ <cd:command name='stopoverlay' value='finsuperposition'/>
+ <cd:command name='stopoverview' value='finvuedensemble'/>
+ <cd:command name='stoppacked' value='finemballage'/>
+ <cd:command name='stoppositioning' value='finpositionnement'/>
+ <cd:command name='stopproduct' value='finproduit'/>
+ <cd:command name='stopprofile' value='finprofil'/>
+ <cd:command name='stopproject' value='finprojet'/>
+ <cd:command name='stopquotation' value='fincitation'/>
+ <cd:command name='stopraster' value='finraster'/>
+ <cd:command name='stopsynchronization' value='finsynchronisation'/>
+ <cd:command name='stoptable' value='fintable'/>
+ <cd:command name='stoptables' value='fintables'/>
+ <cd:command name='stoptext' value='fintexte'/>
+ <cd:command name='stoptextbackground' value='fintextearriereplan'/>
+ <cd:command name='stoptextrule' value='fintextetrait'/>
+ <cd:command name='stopunpacked' value='findesemballage'/>
+ <cd:command name='stopversion' value='finversion'/>
<cd:command name='stretched' value='etire'/>
+ <cd:command name='strictinspectnextcharacter' value='inspecterstrictementcaracteresuivant'/>
+ <cd:command name='stripcharacter' value='demontercaractere'/>
<cd:command name='subformulanumber' value='numerosousformule'/>
- <cd:command name='subpagenumber' value='sousnumeropage'/>
- <cd:command name='switchtobodyfont' value='changepolicecorps'/>
- <cd:command name='switchtorawfont' value='changepolicebrute'/>
+ <cd:command name='subpagenumber' value='numerosouspage'/>
+ <cd:command name='subtractfeature' value='enleverfonctionnalite'/>
+ <cd:command name='switchtobodyfont' value='passerapolicedecorps'/>
+ <cd:command name='switchtorawfont' value='passerapolicebrute'/>
<cd:command name='sym' value='sym'/>
<cd:command name='symbol' value='symbole'/>
- <cd:command name='symoffset' value='symoffset'/>
+ <cd:command name='symoffset' value='decalagesym'/>
<cd:command name='synchronizationbar' value='barresynchronisation'/>
- <cd:command name='synchronize' value='synchronise'/>
+ <cd:command name='synchronize' value='synchroniser'/>
<cd:command name='tab' value='tab'/>
- <cd:command name='testcolumn' value='testcolumn'/>
+ <cd:command name='testcolumn' value='testcolonne'/>
+ <cd:command name='testfeature' value='testerfonctionnalite'/>
+ <cd:command name='testfeatureonce' value='testerfonctionnaliteunfois'/>
<cd:command name='testpage' value='testpage'/>
<cd:command name='tex' value='tex'/>
- <cd:command name='textbackground' value='textbackground'/>
+ <cd:command name='textbackground' value='textearriereplan'/>
+ <cd:command name='textcolor' value='textecouleura'/>
<cd:command name='textheight' value='hauteurtexte'/>
+ <cd:command name='textnote' value='notetexte'/>
<cd:command name='textreference' value='referencetexte'/>
- <cd:command name='textrule' value='ligneregleetexte'/>
+ <cd:command name='textrule' value='traittexte'/>
<cd:command name='textvariable' value='variabletexte'/>
<cd:command name='textwidth' value='largeurtexte'/>
+ <cd:command name='thefirstcharacter' value='lepremiercaractere'/>
+ <cd:command name='thenormalizedbodyfontsize' value='lataillenormaliseepolicedecorps'/>
+ <cd:command name='theremainingcharacters' value='lescaracteresrestants'/>
<cd:command name='thinrule' value='traitfin'/>
<cd:command name='thinrules' value='traitsfins'/>
- <cd:command name='tooltip' value='suggestion'/>
- <cd:command name='topdistance' value='distancesup'/>
- <cd:command name='topheight' value='hauteursup'/>
- <cd:command name='topspace' value='espacesup'/>
+ <cd:command name='tolinenote' value='alanotedeligne'/>
+ <cd:command name='tooltip' value='infobulle'/>
+ <cd:command name='topdistance' value='distancehaut'/>
+ <cd:command name='topheight' value='hauteurhaut'/>
+ <cd:command name='topspace' value='espacehaut'/>
<cd:command name='totalnumberofpages' value='nombretotaldepages'/>
<cd:command name='translate' value='traduire'/>
<cd:command name='txt' value='txt'/>
- <cd:command name='typ' value='typ'/>
- <cd:command name='type' value='dactylographier'/>
- <cd:command name='typebuffer' value='tapebuffer'/>
- <cd:command name='typefile' value='fichierdactylo'/>
- <cd:command name='unitmeaning' value='sensunite'/>
+ <cd:command name='typ' value='transcrireaveccesure'/>
+ <cd:command name='type' value='transcrire'/>
+ <cd:command name='typebuffer' value='transcriretampon'/>
+ <cd:command name='typedefinedbuffer' value='transcriretampondefini'/>
+ <cd:command name='typefile' value='transcrirefichier'/>
+ <cd:command name='typeinlinebuffer' value='transcriretamponenligne'/>
+ <cd:command name='typing' value='transcription'/>
+ <cd:command name='unitmeaning' value='significationunite'/>
<cd:command name='unknown' value='inconnu'/>
- <cd:command name='useJSscripts' value='utiliseJSscripts'/>
- <cd:command name='useURL' value='utiliseURL'/>
- <cd:command name='useXMLfilter' value='useXMLfilter'/>
- <cd:command name='useblocks' value='utiliseblocs'/>
- <cd:command name='usecommands' value='utilisecommandes'/>
- <cd:command name='useencoding' value='utiliseencodage'/>
- <cd:command name='useexternaldocument' value='utilisedocumentexterne'/>
- <cd:command name='useexternalfigure' value='utilisefigureexterne'/>
- <cd:command name='useexternalfile' value='utilisefichierexterne'/>
- <cd:command name='useexternalfiles' value='utilisefichiersexternes'/>
- <cd:command name='useexternalsoundtrack' value='utilisepsiteaudioexterne'/>
- <cd:command name='usemodule' value='utilisemodule'/>
- <cd:command name='usemodules' value='utilisemodules'/>
- <cd:command name='usepath' value='utilisechemin'/>
- <cd:command name='usereferences' value='utilisereferences'/>
- <cd:command name='usespecials' value='utilisespecialites'/>
- <cd:command name='usesymbols' value='utilisesymboles'/>
- <cd:command name='usetypescript' value='usetypescript'/>
- <cd:command name='usetypescriptfile' value='usetypescriptfile'/>
- <cd:command name='useurl' value='utiliseurl'/>
+ <cd:command name='unregisterhyphenationpattern' value='desenregistrermotifcesure'/>
+ <cd:command name='useJSscripts' value='utiliserJSscript'/>
+ <cd:command name='useURL' value='utiliserURL'/>
+ <cd:command name='useXMLfilter' value='utiliserfiltreXML'/>
+ <cd:command name='useblocks' value='utiliserblocs'/>
+ <cd:command name='usebodyfont' value='utiliserpolicedecorps'/>
+ <cd:command name='usebodyfontparameter' value='utiliserparametrepolicedecorps'/>
+ <cd:command name='usecommands' value='utilisercommandes'/>
+ <cd:command name='useencoding' value='utilisercodage'/>
+ <cd:command name='useexternaldocument' value='utiliserdocumentexterne'/>
+ <cd:command name='useexternalfigure' value='utiliserfigureexterne'/>
+ <cd:command name='useexternalfile' value='utiliserfichierexterne'/>
+ <cd:command name='useexternalfiles' value='utiliserfichiersexternes'/>
+ <cd:command name='useexternalsoundtrack' value='utilisersonexterne'/>
+ <cd:command name='usemodule' value='utilisermodule'/>
+ <cd:command name='usemodules' value='utilisermodules'/>
+ <cd:command name='usepath' value='utiliserchemin'/>
+ <cd:command name='usereferences' value='utiliserreferences'/>
+ <cd:command name='usespecials' value='utiliserspeciaux'/>
+ <cd:command name='usesymbols' value='utilisersymboles'/>
+ <cd:command name='usetypescript' value='utiliserscriptdepolices'/>
+ <cd:command name='usetypescriptfile' value='utiliserfichierscriptdepolices'/>
+ <cd:command name='useurl' value='utiliserurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='version'/>
- <cd:command name='vl' value='vl'/>
+ <cd:command name='vl' value='lv'/>
<cd:command name='weekday' value='joursemaine'/>
<cd:command name='whitespace' value='espaceblanc'/>
- <cd:command name='wordright' value='motdroit'/>
- <cd:command name='writebetweenlist' value='ecritentreliste'/>
- <cd:command name='writetolist' value='ecritdansliste'/>
- <cd:command name='writetoreferencelist' value='ecritdanslistereference'/>
- <cd:command name='writetoregister' value='ecritregistre'/>
+ <cd:command name='widthspanningtext' value='largeurtextecouvrant'/>
+ <cd:command name='wordright' value='ecrireadroite'/>
+ <cd:command name='writebetweenlist' value='ecrireentreliste'/>
+ <cd:command name='writetolist' value='ecriredansliste'/>
+ <cd:command name='writetoreferencelist' value='ecriredanslistereference'/>
+ <cd:command name='writetoregister' value='ecriredansregistre'/>
</cd:commands>
</cd:interface> \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-it.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-it.xml
index 7ae291cf07d..f45b5a574db 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-it.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-it.xml
@@ -131,6 +131,9 @@
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='cap'/>
<cd:variable name='capital' value='maiuscolo'/>
+ <cd:variable name='category' value='category'/>
+ <cd:variable name='cd:character' value='cd:character'/>
+ <cd:variable name='cd:font' value='cd:font'/>
<cd:variable name='center' value='center'/>
<cd:variable name='centerlast' value='centerlast'/>
<cd:variable name='chapter' value='capitolo'/>
@@ -189,6 +192,7 @@
<cd:variable name='external' value='esterno'/>
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='fatto'/>
+ <cd:variable name='fallback' value='fallback'/>
<cd:variable name='february' value='febbraio'/>
<cd:variable name='field' value='field'/>
<cd:variable name='figure' value='figura'/>
@@ -210,6 +214,7 @@
<cd:variable name='flushouter' value='flushouter'/>
<cd:variable name='flushright' value='flushright'/>
<cd:variable name='followingpage' value='followingpage'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='piedipagina'/>
<cd:variable name='footnote' value='notapdp'/>
<cd:variable name='force' value='forza'/>
@@ -281,6 +286,7 @@
<cd:variable name='intermezzo' value='intermezzo'/>
<cd:variable name='intext' value='intesto'/>
<cd:variable name='intro' value='intro'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='corsivo'/>
<cd:variable name='italicbold' value='corsivograssetto'/>
<cd:variable name='item' value='elemento'/>
@@ -384,6 +390,7 @@
<cd:variable name='nonumber' value='nonumber'/>
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='normale'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='nospacing'/>
<cd:variable name='nostopper' value='nostopper'/>
<cd:variable name='not' value='non'/>
@@ -451,6 +458,7 @@
<cd:variable name='rectangular' value='rettangolare'/>
<cd:variable name='reference' value='riferimento'/>
<cd:variable name='referral' value='referral'/>
+ <cd:variable name='region' value='region'/>
<cd:variable name='register' value='registro'/>
<cd:variable name='regular' value='regolare'/>
<cd:variable name='relative' value='relativo'/>
@@ -635,6 +643,7 @@
<cd:constant name='afterkey' value='dopotasto'/>
<cd:constant name='aftersection' value='aftersection'/>
<cd:constant name='align' value='allinea'/>
+ <cd:constant name='alignbottom' value='alignbottom'/>
<cd:constant name='aligncharacter' value='allineacarattere'/>
<cd:constant name='alignmentcharacter' value='carattereallineamento'/>
<cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
@@ -771,6 +780,9 @@
<cd:constant name='deepnumbercommand' value='deepnumbercommand'/>
<cd:constant name='deeptextcommand' value='deeptextcommand'/>
<cd:constant name='default' value='implicito'/>
+ <cd:constant name='defaultheight' value='defaultheight'/>
+ <cd:constant name='defaultwidth' value='defaultwidth'/>
+ <cd:constant name='define' value='define'/>
<cd:constant name='delay' value='attesa'/>
<cd:constant name='depth' value='profondita'/>
<cd:constant name='depthcorrection' value='correzioneprofondita'/>
@@ -810,8 +822,10 @@
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='fattore'/>
<cd:constant name='fallback' value='fallback'/>
+ <cd:constant name='fallbacks' value='fallbacks'/>
<cd:constant name='family' value='famiglia'/>
<cd:constant name='features' value='features'/>
+ <cd:constant name='featureset' value='featureset'/>
<cd:constant name='fences' value='fences'/>
<cd:constant name='field' value='field'/>
<cd:constant name='fieldbackgroundcolor' value='coloresfondocampo'/>
@@ -832,6 +846,7 @@
<cd:constant name='focusin' value='focusin'/>
<cd:constant name='focusoffset' value='focusoffset'/>
<cd:constant name='focusout' value='focusout'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='piedipagina'/>
<cd:constant name='footerdistance' value='distanzapdp'/>
<cd:constant name='footerstate' value='statopdp'/>
@@ -886,6 +901,7 @@
<cd:constant name='increment' value='incremento'/>
<cd:constant name='incrementnumber' value='incrementanumero'/>
<cd:constant name='indenting' value='rientro'/>
+ <cd:constant name='indentlist' value='indentlist'/>
<cd:constant name='indentnext' value='rientrasuccessivo'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='indicatore'/>
@@ -913,7 +929,10 @@
<cd:constant name='keys' value='keys'/>
<cd:constant name='keyword' value='parolachiave'/>
<cd:constant name='label' value='etichetta'/>
+ <cd:constant name='labelalternative' value='labelalternative'/>
+ <cd:constant name='labelcolor' value='labelcolor'/>
<cd:constant name='labeloffset' value='labeloffset'/>
+ <cd:constant name='labelstyle' value='labelstyle'/>
<cd:constant name='language' value='language'/>
<cd:constant name='last' value='last'/>
<cd:constant name='lastnamesep' value='lastnamesep'/>
@@ -947,6 +966,7 @@
<cd:constant name='limittext' value='limittext'/>
<cd:constant name='line' value='riga'/>
<cd:constant name='linecorrection' value='correzioneriga'/>
+ <cd:constant name='linedirection' value='linedirection'/>
<cd:constant name='lines' value='righe'/>
<cd:constant name='list' value='elenco'/>
<cd:constant name='listtext' value='listtext'/>
@@ -1087,6 +1107,7 @@
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='metti'/>
<cd:constant name='placehead' value='mettitesta'/>
+ <cd:constant name='placeholder' value='placeholder'/>
<cd:constant name='placestopper' value='mettistopper'/>
<cd:constant name='position' value='posizione'/>
<cd:constant name='prefix' value='prefisso'/>
@@ -1105,6 +1126,7 @@
<cd:constant name='print' value='print'/>
<cd:constant name='printable' value='stampabile'/>
<cd:constant name='process' value='process'/>
+ <cd:constant name='processors' value='processors'/>
<cd:constant name='profile' value='profile'/>
<cd:constant name='properties' value='properties'/>
<cd:constant name='pubsep' value='pubsep'/>
@@ -1118,6 +1140,7 @@
<cd:constant name='reference' value='riferimento'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='referencing'/>
<cd:constant name='region' value='region'/>
<cd:constant name='regionin' value='entraregione'/>
@@ -1362,7 +1385,6 @@
<!-- definitions for interface commands for language it -->
<cd:commands>
- <cd:command name='CAPPED' value='CAP'/>
<cd:command name='Character' value='Lettera'/>
<cd:command name='Characters' value='Lettere'/>
<cd:command name='MONTH' value='MESE'/>
@@ -1376,8 +1398,18 @@
<cd:command name='Word' value='Parola'/>
<cd:command name='Words' value='Parole'/>
<cd:command name='about' value='intorno'/>
+ <cd:command name='adaptfontfeature' value='adaptfontfeature'/>
<cd:command name='adaptlayout' value='adattalayout'/>
+ <cd:command name='addfeature' value='addfeature'/>
+ <cd:command name='alignbottom' value='alignbottom'/>
+ <cd:command name='aligned' value='aligned'/>
+ <cd:command name='alignedbox' value='alignedbox'/>
+ <cd:command name='alignedline' value='alignedline'/>
+ <cd:command name='alignhere' value='alignhere'/>
<cd:command name='alignment' value='alignment'/>
+ <cd:command name='alignmentcharacter' value='alignmentcharacter'/>
+ <cd:command name='applytocharacters' value='applytocharacters'/>
+ <cd:command name='applytofirstcharacter' value='applytofirstcharacter'/>
<cd:command name='arg' value='arg'/>
<cd:command name='at' value='al'/>
<cd:command name='atleftmargin' value='atleftmargin'/>
@@ -1389,9 +1421,13 @@
<cd:command name='blackrules' value='lineenere'/>
<cd:command name='blank' value='rigovuoto'/>
<cd:command name='bookmark' value='segnalibro'/>
+ <cd:command name='bottombox' value='bottombox'/>
<cd:command name='bottomdistance' value='distanzafondo'/>
<cd:command name='bottomheight' value='altezzafondo'/>
+ <cd:command name='bottomleftbox' value='bottomleftbox'/>
+ <cd:command name='bottomrightbox' value='bottomrightbox'/>
<cd:command name='bottomspace' value='spaziofondo'/>
+ <cd:command name='buildtextbottomdot' value='buildtextbottomdot'/>
<cd:command name='but' value='fondo'/>
<cd:command name='button' value='pulsante'/>
<cd:command name='bypassblocks' value='saltablocchi'/>
@@ -1430,8 +1466,11 @@
<cd:command name='defineblock' value='definisciblocco'/>
<cd:command name='definebodyfont' value='definiscifontdeltesto'/>
<cd:command name='definebodyfontenvironment' value='definisciambientefontdeltesto'/>
+ <cd:command name='definebodyfontswitch' value='definebodyfontswitch'/>
<cd:command name='definebuffer' value='definiscibuffer'/>
<cd:command name='definecharacter' value='definiscicarattere'/>
+ <cd:command name='definecharacterkerning' value='definecharacterkerning'/>
+ <cd:command name='definecharacterspacing' value='definecharacterspacing'/>
<cd:command name='definecolor' value='definiscicolore'/>
<cd:command name='definecolorgroup' value='definiscigruppocolori'/>
<cd:command name='definecolumnbreak' value='definecolumnbreak'/>
@@ -1441,37 +1480,57 @@
<cd:command name='definecommand' value='definiscicomando'/>
<cd:command name='defineconversion' value='definisciconversione'/>
<cd:command name='definedescription' value='definiscidescrizione'/>
+ <cd:command name='definedfont' value='definedfont'/>
<cd:command name='defineenumeration' value='definiscienumerazione'/>
+ <cd:command name='definefallbackfamily' value='definefallbackfamily'/>
<cd:command name='definefield' value='definiscicampo'/>
<cd:command name='definefieldstack' value='definiscistackcampi'/>
<cd:command name='definefiguresymbol' value='definiscifigurasimbolo'/>
+ <cd:command name='definefilefallback' value='definefilefallback'/>
+ <cd:command name='definefirstline' value='definefirstline'/>
<cd:command name='definefloat' value='definiscioggettomobile'/>
<cd:command name='definefont' value='definiscifont'/>
+ <cd:command name='definefontalternative' value='definefontalternative'/>
+ <cd:command name='definefontfallback' value='definefontfallback'/>
+ <cd:command name='definefontfamily' value='definefontfamily'/>
+ <cd:command name='definefontfamilypreset' value='definefontfamilypreset'/>
+ <cd:command name='definefontfeature' value='definefontfeature'/>
+ <cd:command name='definefontfile' value='definefontfile'/>
+ <cd:command name='definefontsize' value='definefontsize'/>
+ <cd:command name='definefontsolution' value='definefontsolution'/>
<cd:command name='definefontstyle' value='definiscistilefont'/>
<cd:command name='definefontsynonym' value='definiscisinonimofont'/>
<cd:command name='defineframed' value='definisciincorniciato'/>
<cd:command name='defineframedtext' value='definiscitestoincorniciato'/>
+ <cd:command name='definefrozenfont' value='definefrozenfont'/>
<cd:command name='definehbox' value='definiscihbox'/>
<cd:command name='definehead' value='definiscitesta'/>
+ <cd:command name='definehyphenationfeatures' value='definehyphenationfeatures'/>
<cd:command name='defineindentedtext' value='defineindentedtext'/>
<cd:command name='defineinmargin' value='defineinmargin'/>
<cd:command name='defineinteractionmenu' value='definiscimenuinterazione'/>
<cd:command name='defineitemgroup' value='defineitemgroup'/>
+ <cd:command name='defineitems' value='defineitems'/>
<cd:command name='definelabel' value='definiscietichetta'/>
<cd:command name='definelayer' value='definelayer'/>
<cd:command name='definelayout' value='definiscilayout'/>
+ <cd:command name='definelinenote' value='definelinenote'/>
<cd:command name='definelist' value='definiscielenco'/>
<cd:command name='definelogo' value='definiscilogo'/>
<cd:command name='definemainfield' value='definiscicampoprincipale'/>
<cd:command name='definemakeup' value='definiscimakeup'/>
<cd:command name='definemarking' value='definiscimarcatura'/>
<cd:command name='definemathalignment' value='definemathalignment'/>
+ <cd:command name='definemode' value='definemode'/>
+ <cd:command name='definenamedcolor' value='definenamedcolor'/>
+ <cd:command name='definenote' value='definenote'/>
<cd:command name='defineoutput' value='definiscioutput'/>
<cd:command name='defineoverlay' value='definiscisovrapposizione'/>
<cd:command name='definepagebreak' value='definepagebreak'/>
<cd:command name='definepalet' value='definiscitavolozza'/>
<cd:command name='definepapersize' value='definiscidimensionicarta'/>
<cd:command name='defineparagraphs' value='definiscicapoversi'/>
+ <cd:command name='defineperiodkerning' value='defineperiodkerning'/>
<cd:command name='defineplacement' value='defineplacement'/>
<cd:command name='defineprofile' value='definisciprofilo'/>
<cd:command name='defineprogram' value='definisciprogramma'/>
@@ -1493,33 +1552,45 @@
<cd:command name='definetabulate' value='definiscitabulato'/>
<cd:command name='definetext' value='definiscitesto'/>
<cd:command name='definetextbackground' value='definetextbackground'/>
+ <cd:command name='definetextnote' value='definetextnote'/>
<cd:command name='definetextposition' value='definisciposizionetesto'/>
<cd:command name='definetextvariable' value='definiscivariabiletesto'/>
<cd:command name='definetype' value='definiscitype'/>
<cd:command name='definetyping' value='definiscityping'/>
<cd:command name='defineversion' value='definisciversion'/>
+ <cd:command name='depthspanningtext' value='depthspanningtext'/>
<cd:command name='determineheadnumber' value='determinanumerotesta'/>
<cd:command name='determinelistcharacteristics' value='determinacarattersticheelenco'/>
<cd:command name='determineregistercharacteristics' value='determinacaratteristicheregistro'/>
<cd:command name='dimension' value='dimensione'/>
<cd:command name='disableinteractionmenu' value='disabilitamenuinterazione'/>
+ <cd:command name='disablemode' value='disablemode'/>
+ <cd:command name='doaddfeature' value='doaddfeature'/>
<cd:command name='domicile' value='domicilio'/>
+ <cd:command name='dontconvertfont' value='dontconvertfont'/>
<cd:command name='donttest' value='notest'/>
<cd:command name='edgedistance' value='distanzabordo'/>
<cd:command name='edgewidth' value='ampiezzabordo'/>
+ <cd:command name='emphasisboldface' value='emphasisboldface'/>
<cd:command name='emptylines' value='emptylines'/>
+ <cd:command name='enablemode' value='enablemode'/>
<cd:command name='environment' value='ambiente'/>
<cd:command name='externalfigure' value='figuraesterna'/>
<cd:command name='fact' value='fatto'/>
+ <cd:command name='fastswitchtobodyfont' value='fastswitchtobodyfont'/>
+ <cd:command name='feature' value='feature'/>
<cd:command name='field' value='campi'/>
<cd:command name='fieldstack' value='stackcampi'/>
<cd:command name='fillinfield' value='camporiempimento'/>
<cd:command name='fillinline' value='rigariempimento'/>
<cd:command name='fillinrules' value='lineeriempimento'/>
<cd:command name='fillintext' value='testoriempimento'/>
+ <cd:command name='firstcharacter' value='firstcharacter'/>
<cd:command name='fitfield' value='adattacampo'/>
+ <cd:command name='fittopbaselinegrid' value='fittopbaselinegrid'/>
<cd:command name='fixedspace' value='spaziofisso'/>
<cd:command name='fixedspaces' value='spazifissi'/>
+ <cd:command name='flushnotes' value='flushnotes'/>
<cd:command name='followprofile' value='seguiprofilo'/>
<cd:command name='followprofileversion' value='seguiversioneprofilo'/>
<cd:command name='followversion' value='seguiversione'/>
@@ -1528,13 +1599,19 @@
<cd:command name='footnote' value='notapdp'/>
<cd:command name='footnotetext' value='testonotapdp'/>
<cd:command name='forceblocks' value='forzablocchi'/>
+ <cd:command name='forcecharacterstripping' value='forcecharacterstripping'/>
<cd:command name='formulanumber' value='numeroformula'/>
<cd:command name='fraction' value='frazione'/>
<cd:command name='framed' value='incorniciato'/>
<cd:command name='from' value='da'/>
+ <cd:command name='fromlinenote' value='fromlinenote'/>
<cd:command name='getbuffer' value='prendibuffer'/>
+ <cd:command name='getfirstcharacter' value='getfirstcharacter'/>
<cd:command name='getmarking' value='prendimarcatura'/>
<cd:command name='getnumber' value='getnumber'/>
+ <cd:command name='globaldisablemode' value='globaldisablemode'/>
+ <cd:command name='globalenablemode' value='globalenablemode'/>
+ <cd:command name='globalpreventmode' value='globalpreventmode'/>
<cd:command name='godown' value='vaigiu'/>
<cd:command name='goto' value='vaia'/>
<cd:command name='gotobox' value='vaiabox'/>
@@ -1550,6 +1627,7 @@
<cd:command name='headnumber' value='numerotesta'/>
<cd:command name='headsym' value='headsym'/>
<cd:command name='headtext' value='testoinstestazioni'/>
+ <cd:command name='heightspanningtext' value='heightspanningtext'/>
<cd:command name='hideblocks' value='nascondiblocchi'/>
<cd:command name='high' value='ap'/>
<cd:command name='hl' value='hl'/>
@@ -1581,26 +1659,37 @@
<cd:command name='interactionbuttons' value='pulsantinterazione'/>
<cd:command name='interactionmenu' value='menuinterattivo'/>
<cd:command name='item' value='elemento'/>
+ <cd:command name='itemgroup' value='itemgroup'/>
<cd:command name='items' value='elementi'/>
+ <cd:command name='itemtag' value='itemtag'/>
<cd:command name='its' value='el'/>
<cd:command name='keepblocks' value='tieniblocchi'/>
+ <cd:command name='kerncharacters' value='kerncharacters'/>
<cd:command name='label' value='etichetta'/>
<cd:command name='labels' value='etichette'/>
<cd:command name='labeltext' value='testoetichetta'/>
<cd:command name='language' value='lingua'/>
+ <cd:command name='languageCharacters' value='languageCharacters'/>
+ <cd:command name='languagecharacters' value='languagecharacters'/>
<cd:command name='leftaligned' value='allineasinistra'/>
+ <cd:command name='leftbottombox' value='leftbottombox'/>
<cd:command name='leftedgedistance' value='distanzabordosinistro'/>
<cd:command name='leftedgewidth' value='ampiezzabordosinistro'/>
+ <cd:command name='leftline' value='leftline'/>
<cd:command name='leftmargindistance' value='distanzamarginesinistro'/>
<cd:command name='leftmarginwidth' value='ampiezzamarginesinistro'/>
<cd:command name='leg' value='leg'/>
<cd:command name='linecorrection' value='linecorrection'/>
+ <cd:command name='linenote' value='linenote'/>
+ <cd:command name='linespanningtext' value='linespanningtext'/>
<cd:command name='linewidth' value='spessoreriga'/>
<cd:command name='listheight' value='altezzaelenco'/>
<cd:command name='listlength' value='lunghezzaelenco'/>
<cd:command name='listsymbol' value='listsymbol'/>
<cd:command name='listwidth' value='ampiezzaelenco'/>
+ <cd:command name='loadfontgoodies' value='loadfontgoodies'/>
<cd:command name='localfootnotes' value='localfootnotes'/>
+ <cd:command name='localnotes' value='localnotes'/>
<cd:command name='logfields' value='logcampi'/>
<cd:command name='lohi' value='pedap'/>
<cd:command name='low' value='ped'/>
@@ -1631,6 +1720,7 @@
<cd:command name='nodimension' value='nientedimensioni'/>
<cd:command name='noheaderandfooterlines' value='nientelineintestazionepdp'/>
<cd:command name='noindenting' value='nienterientro'/>
+ <cd:command name='noitem' value='noitem'/>
<cd:command name='nolist' value='nienteelenco'/>
<cd:command name='nomarking' value='nientemarcatura'/>
<cd:command name='nomoreblocks' value='bastablocchi'/>
@@ -1638,6 +1728,7 @@
<cd:command name='nop' value='nop'/>
<cd:command name='nospace' value='nientespazio'/>
<cd:command name='note' value='nota'/>
+ <cd:command name='notesymbol' value='notesymbol'/>
<cd:command name='notopandbottomlines' value='nientelineecimafondo'/>
<cd:command name='notsmallcapped' value='nocap'/>
<cd:command name='nowhitespace' value='nientespaziobianco'/>
@@ -1649,6 +1740,7 @@
<cd:command name='outermarginwidth' value='outermarginwidth'/>
<cd:command name='packed' value='impaccato'/>
<cd:command name='page' value='pagina'/>
+ <cd:command name='pagebreak' value='pagebreak'/>
<cd:command name='pagedepth' value='pagedepth'/>
<cd:command name='pagenumber' value='numeropagina'/>
<cd:command name='pageoffset' value='pageoffset'/>
@@ -1667,7 +1759,10 @@
<cd:command name='placelist' value='mettielenco'/>
<cd:command name='placelistofsynonyms' value='placelistofsynonyms'/>
<cd:command name='placelocalfootnotes' value='mettinotepdplocali'/>
+ <cd:command name='placelocalnotes' value='placelocalnotes'/>
<cd:command name='placelogos' value='mettiloghi'/>
+ <cd:command name='placenamedfloat' value='placenamedfloat'/>
+ <cd:command name='placenotes' value='placenotes'/>
<cd:command name='placeongrid' value='mettiingriglia'/>
<cd:command name='placeontopofeachother' value='mettiunosullaltro'/>
<cd:command name='placepagenumber' value='mettinumeropagina'/>
@@ -1680,9 +1775,17 @@
<cd:command name='placetextvariable' value='mettivariabiletesto'/>
<cd:command name='position' value='posizione'/>
<cd:command name='positiontext' value='posizionatesto'/>
+ <cd:command name='postponenotes' value='postponenotes'/>
+ <cd:command name='postponingnotes' value='postponingnotes'/>
+ <cd:command name='predefinedfont' value='predefinedfont'/>
+ <cd:command name='predefinefont' value='predefinefont'/>
+ <cd:command name='presetdocument' value='presetdocument'/>
+ <cd:command name='prettyprintbuffer' value='prettyprintbuffer'/>
+ <cd:command name='preventmode' value='preventmode'/>
<cd:command name='printpaperheight' value='altezzacartastampa'/>
<cd:command name='printpaperwidth' value='ampiezzacartastampa'/>
<cd:command name='processblocks' value='elaborablocchi'/>
+ <cd:command name='processbodyfontenvironmentlist' value='processbodyfontenvironmentlist'/>
<cd:command name='processpage' value='elaborapagina'/>
<cd:command name='product' value='prodotto'/>
<cd:command name='program' value='programma'/>
@@ -1692,19 +1795,45 @@
<cd:command name='quote' value='menzione'/>
<cd:command name='ran' value='ran'/>
<cd:command name='redo' value='rifai'/>
+ <cd:command name='redoconvertfont' value='redoconvertfont'/>
<cd:command name='ref' value='rif'/>
<cd:command name='reference' value='riferimento'/>
<cd:command name='referral' value='referral'/>
<cd:command name='referraldate' value='datareferral'/>
<cd:command name='referring' value='referring'/>
+ <cd:command name='registerfontclass' value='registerfontclass'/>
+ <cd:command name='registerhyphenationexception' value='registerhyphenationexception'/>
+ <cd:command name='registerhyphenationpattern' value='registerhyphenationpattern'/>
<cd:command name='remark' value='commento'/>
+ <cd:command name='replacefeature' value='replacefeature'/>
<cd:command name='reset' value='reimposta'/>
+ <cd:command name='resetandaddfeature' value='resetandaddfeature'/>
+ <cd:command name='resetcharacteralign' value='resetcharacteralign'/>
+ <cd:command name='resetcharacterkerning' value='resetcharacterkerning'/>
+ <cd:command name='resetcharacterspacing' value='resetcharacterspacing'/>
+ <cd:command name='resetcharacterstripping' value='resetcharacterstripping'/>
+ <cd:command name='resetfeature' value='resetfeature'/>
+ <cd:command name='resetfontcolorsheme' value='resetfontcolorsheme'/>
+ <cd:command name='resetfontfallback' value='resetfontfallback'/>
+ <cd:command name='resetfontsolution' value='resetfontsolution'/>
+ <cd:command name='resethyphenationfeatures' value='resethyphenationfeatures'/>
+ <cd:command name='resetlocalfloats' value='resetlocalfloats'/>
<cd:command name='resetmarking' value='reimpostamarcatura'/>
+ <cd:command name='resetmode' value='resetmode'/>
<cd:command name='resetnumber' value='resetnumber'/>
- <cd:command name='resettext' value='resettextcontent'/>
+ <cd:command name='resetpath' value='resetpath'/>
+ <cd:command name='resetperiodkerning' value='resetperiodkerning'/>
+ <cd:command name='resetsystemmode' value='resetsystemmode'/>
+ <cd:command name='resettextcontent' value='resettextcontent'/>
+ <cd:command name='resetvisualizers' value='resetvisualizers'/>
+ <cd:command name='restoreglobalbodyfont' value='restoreglobalbodyfont'/>
+ <cd:command name='retestfeature' value='retestfeature'/>
+ <cd:command name='revivefeature' value='revivefeature'/>
<cd:command name='rightaligned' value='allineadestra'/>
+ <cd:command name='rightbottombox' value='rightbottombox'/>
<cd:command name='rightedgedistance' value='distanzabordodestro'/>
<cd:command name='rightedgewidth' value='ampiezzabordodestro'/>
+ <cd:command name='rightline' value='rightline'/>
<cd:command name='rightmargindistance' value='distanzamarginedestro'/>
<cd:command name='rightmarginwidth' value='ampiezzamarginedestro'/>
<cd:command name='romannumerals' value='numeriromani'/>
@@ -1715,12 +1844,38 @@
<cd:command name='selectblocks' value='selezionablocchi'/>
<cd:command name='selectpaper' value='selezionacarta'/>
<cd:command name='selectversion' value='selezionaversione'/>
+ <cd:command name='setbigbodyfont' value='setbigbodyfont'/>
+ <cd:command name='setcharacteralign' value='setcharacteralign'/>
+ <cd:command name='setcharacteraligndetail' value='setcharacteraligndetail'/>
+ <cd:command name='setcharactercasing' value='setcharactercasing'/>
+ <cd:command name='setcharactercleaning' value='setcharactercleaning'/>
+ <cd:command name='setcharacterkerning' value='setcharacterkerning'/>
+ <cd:command name='setcharacterspacing' value='setcharacterspacing'/>
+ <cd:command name='setcharacterstripping' value='setcharacterstripping'/>
+ <cd:command name='setcurrentfontclass' value='setcurrentfontclass'/>
+ <cd:command name='setfirstline' value='setfirstline'/>
+ <cd:command name='setfirstpasscharacteralign' value='setfirstpasscharacteralign'/>
+ <cd:command name='setfont' value='setfont'/>
+ <cd:command name='setfontcolorsheme' value='setfontcolorsheme'/>
+ <cd:command name='setfontfeature' value='setfontfeature'/>
+ <cd:command name='setfontsolution' value='setfontsolution'/>
+ <cd:command name='setfontstrut' value='setfontstrut'/>
+ <cd:command name='sethyphenationfeatures' value='sethyphenationfeatures'/>
+ <cd:command name='setmainbodyfont' value='setmainbodyfont'/>
+ <cd:command name='setmode' value='setmode'/>
+ <cd:command name='setnote' value='setnote'/>
+ <cd:command name='setnotetext' value='setnotetext'/>
<cd:command name='setnumber' value='setnumber'/>
+ <cd:command name='setperiodkerning' value='setperiodkerning'/>
+ <cd:command name='setsecondpasscharacteralign' value='setsecondpasscharacteralign'/>
+ <cd:command name='setsmallbodyfont' value='setsmallbodyfont'/>
+ <cd:command name='setsystemmode' value='setsystemmode'/>
<cd:command name='settextcontent' value='settext'/>
<cd:command name='settextvariable' value='setvariabiletesto'/>
<cd:command name='setupalign' value='impostaallineamento'/>
<cd:command name='setupanswerarea' value='setupanswerarea'/>
<cd:command name='setuparranging' value='impostaparranging'/>
+ <cd:command name='setupattachment' value='setupattachment'/>
<cd:command name='setupbackground' value='impostasfondo'/>
<cd:command name='setupbackgrounds' value='impostasfondi'/>
<cd:command name='setupblackrules' value='impostalineenere'/>
@@ -1735,6 +1890,9 @@
<cd:command name='setupcapitals' value='impostamaiuscole'/>
<cd:command name='setupcaption' value='impostacaption'/>
<cd:command name='setupcaptions' value='impostacaptions'/>
+ <cd:command name='setupcharacteralign' value='setupcharacteralign'/>
+ <cd:command name='setupcharacterkerning' value='setupcharacterkerning'/>
+ <cd:command name='setupcharacterspacing' value='setupcharacterspacing'/>
<cd:command name='setupclipping' value='impostaclippling'/>
<cd:command name='setupcolor' value='impostacolore'/>
<cd:command name='setupcolors' value='impostacolori'/>
@@ -1745,6 +1903,7 @@
<cd:command name='setupcombinations' value='impostacombinazioni'/>
<cd:command name='setupcombinedlist' value='impostaelencocombinato'/>
<cd:command name='setupcomment' value='impostacommento'/>
+ <cd:command name='setupcounter' value='setupcounter'/>
<cd:command name='setupdescription' value='setupdescription'/>
<cd:command name='setupdescriptions' value='impostadescrizioni'/>
<cd:command name='setupenumeration' value='setupenumeration'/>
@@ -1754,9 +1913,14 @@
<cd:command name='setupfields' value='impostacampi'/>
<cd:command name='setupfillinlines' value='impostarigheriempimento'/>
<cd:command name='setupfillinrules' value='impostalineeriempimento'/>
+ <cd:command name='setupfirstline' value='setupfirstline'/>
<cd:command name='setupfloat' value='impostaoggettomobile'/>
<cd:command name='setupfloats' value='impostaoggettimobili'/>
<cd:command name='setupfloatsplitting' value='impostaspezzamentooggettomobile'/>
+ <cd:command name='setupfontexpansion' value='setupfontexpansion'/>
+ <cd:command name='setupfontprotrusion' value='setupfontprotrusion'/>
+ <cd:command name='setupfonts' value='setupfonts'/>
+ <cd:command name='setupfontsolution' value='setupfontsolution'/>
<cd:command name='setupfooter' value='impostapdp'/>
<cd:command name='setupfootertexts' value='impostatestipdp'/>
<cd:command name='setupfootnotedefinition' value='impostadefinizionenotepdp'/>
@@ -1773,6 +1937,7 @@
<cd:command name='setupheadnumber' value='impostanumerotesta'/>
<cd:command name='setupheads' value='impostateste'/>
<cd:command name='setupheadtext' value='impostatestointestazioni'/>
+ <cd:command name='setuphyphenation' value='setuphyphenation'/>
<cd:command name='setuphyphenmark' value='impostasegnosillabazione'/>
<cd:command name='setupindentedtext' value='setupindentedtext'/>
<cd:command name='setupindenting' value='impostarientro'/>
@@ -1789,6 +1954,7 @@
<cd:command name='setuplanguage' value='impostalingua'/>
<cd:command name='setuplayout' value='impostalayout'/>
<cd:command name='setuplegend' value='impostalegenda'/>
+ <cd:command name='setuplinenote' value='setuplinenote'/>
<cd:command name='setuplinenumbering' value='impostanumerazionerighe'/>
<cd:command name='setuplines' value='impostarighe'/>
<cd:command name='setuplinewidth' value='impostaampiezzariga'/>
@@ -1801,6 +1967,10 @@
<cd:command name='setupmarking' value='impostamarcatura'/>
<cd:command name='setupmathalignment' value='setupmathalignment'/>
<cd:command name='setupnarrower' value='impostapiustretto'/>
+ <cd:command name='setupnotation' value='setupnotation'/>
+ <cd:command name='setupnotations' value='setupnotations'/>
+ <cd:command name='setupnote' value='setupnote'/>
+ <cd:command name='setupnotes' value='setupnotes'/>
<cd:command name='setupnumber' value='impostanumerazione'/>
<cd:command name='setupnumbering' value='impostanumerazione'/>
<cd:command name='setupoppositeplacing' value='impostaposizionamentoopposti'/>
@@ -1814,6 +1984,7 @@
<cd:command name='setuppapersize' value='impostadimensionicarta'/>
<cd:command name='setupparagraphnumbering' value='impostanumerazionecapoversi'/>
<cd:command name='setupparagraphs' value='impostacapoversi'/>
+ <cd:command name='setupperiodkerning' value='setupperiodkerning'/>
<cd:command name='setupplacement' value='setupplacement'/>
<cd:command name='setuppositioning' value='impostaposizionamento'/>
<cd:command name='setupprofiles' value='impostaprofili'/>
@@ -1843,6 +2014,7 @@
<cd:command name='setuptabulate' value='impostatabulato'/>
<cd:command name='setuptext' value='impostatesto'/>
<cd:command name='setuptextbackground' value='setuptextbackground'/>
+ <cd:command name='setuptextnote' value='setuptextnote'/>
<cd:command name='setuptextposition' value='impostaposizionetesto'/>
<cd:command name='setuptextrules' value='impostalineetesto'/>
<cd:command name='setuptexttexts' value='impostatestotesti'/>
@@ -1857,16 +2029,29 @@
<cd:command name='setupurl' value='impostaurl'/>
<cd:command name='setupversions' value='impostaversioni'/>
<cd:command name='setupwhitespace' value='impostaspaziobianco'/>
+ <cd:command name='setvisualizerfont' value='setvisualizerfont'/>
<cd:command name='showbodyfont' value='mostrafontdeltesto'/>
<cd:command name='showbodyfontenvironment' value='mostraambientefontdeltesto'/>
<cd:command name='showcolor' value='mostracolore'/>
<cd:command name='showcolorgroup' value='mostragruppocolori'/>
+ <cd:command name='showcounter' value='showcounter'/>
<cd:command name='showexternalfigures' value='mostrafiguresterne'/>
<cd:command name='showfields' value='mostracampi'/>
+ <cd:command name='showfont' value='showfont'/>
+ <cd:command name='showfontdata' value='showfontdata'/>
+ <cd:command name='showfontexpansion' value='showfontexpansion'/>
+ <cd:command name='showfontitalics' value='showfontitalics'/>
+ <cd:command name='showfontkerns' value='showfontkerns'/>
+ <cd:command name='showfontparameters' value='showfontparameters'/>
+ <cd:command name='showfontstrip' value='showfontstrip'/>
+ <cd:command name='showfontstyle' value='showfontstyle'/>
<cd:command name='showframe' value='mostracornice'/>
<cd:command name='showgrid' value='mostragriglia'/>
+ <cd:command name='showhyphenationtrace' value='showhyphenationtrace'/>
+ <cd:command name='showkerning' value='showkerning'/>
<cd:command name='showlayout' value='mostralyout'/>
<cd:command name='showmakeup' value='mostramakeup'/>
+ <cd:command name='showminimalbaseline' value='showminimalbaseline'/>
<cd:command name='showpalet' value='mostratavolozza'/>
<cd:command name='showprint' value='mostrastampa'/>
<cd:command name='showsetups' value='mostraimpostazioni'/>
@@ -1876,6 +2061,7 @@
<cd:command name='someline' value='qualcheriga'/>
<cd:command name='somewhere' value='daqualcheparte'/>
<cd:command name='space' value='spazio'/>
+ <cd:command name='specialitem' value='specialitem'/>
<cd:command name='splitfloat' value='spezzaoggettomobile'/>
<cd:command name='startalignment' value='iniziaallineamento'/>
<cd:command name='startbackground' value='iniziasfondo'/>
@@ -1893,6 +2079,7 @@
<cd:command name='startglobal' value='iniziaglobale'/>
<cd:command name='startline' value='iniziariga'/>
<cd:command name='startlinecorrection' value='iniziacorrezioneriga'/>
+ <cd:command name='startlinenote' value='startlinenote'/>
<cd:command name='startlinenumbering' value='inizianumerazionerighe'/>
<cd:command name='startlines' value='iniziarighe'/>
<cd:command name='startlocal' value='inizialocale'/>
@@ -1903,7 +2090,7 @@
<cd:command name='startnarrower' value='iniziapiustretto'/>
<cd:command name='startopposite' value='iniziaopposto'/>
<cd:command name='startoverlay' value='iniziasovrapposizione'/>
- <cd:command name='startoverzicht' value='iniziaoverview'/>
+ <cd:command name='startoverview' value='iniziaoverview'/>
<cd:command name='startpacked' value='iniziaimpaccato'/>
<cd:command name='startpositioning' value='iniziaposizionamento'/>
<cd:command name='startproduct' value='iniziaprodotto'/>
@@ -1935,6 +2122,7 @@
<cd:command name='stopglobal' value='terminaglobale'/>
<cd:command name='stopline' value='terminariga'/>
<cd:command name='stoplinecorrection' value='terminacorrezioneriga'/>
+ <cd:command name='stoplinenote' value='stoplinenote'/>
<cd:command name='stoplinenumbering' value='terminanumerazionerighe'/>
<cd:command name='stoplines' value='terminarighe'/>
<cd:command name='stoplocal' value='terminalocale'/>
@@ -1945,7 +2133,7 @@
<cd:command name='stopnarrower' value='terminapiustretto'/>
<cd:command name='stopopposite' value='terminaopposto'/>
<cd:command name='stopoverlay' value='terminasovrapposizione'/>
- <cd:command name='stopoverzicht' value='terminaoverview'/>
+ <cd:command name='stopoverview' value='terminaoverview'/>
<cd:command name='stoppacked' value='terminaimpaccato'/>
<cd:command name='stoppositioning' value='terminaposizionamento'/>
<cd:command name='stopproduct' value='terminaprodotto'/>
@@ -1962,8 +2150,11 @@
<cd:command name='stopunpacked' value='terminaunpacked'/>
<cd:command name='stopversion' value='terminaversioni'/>
<cd:command name='stretched' value='stirato'/>
+ <cd:command name='strictinspectnextcharacter' value='strictinspectnextcharacter'/>
+ <cd:command name='stripcharacter' value='stripcharacter'/>
<cd:command name='subformulanumber' value='numerosottoformula'/>
<cd:command name='subpagenumber' value='subpagenumber'/>
+ <cd:command name='subtractfeature' value='subtractfeature'/>
<cd:command name='switchtobodyfont' value='cambiaafontdeltesto'/>
<cd:command name='switchtorawfont' value='passaafontgrezzo'/>
<cd:command name='sym' value='sim'/>
@@ -1973,16 +2164,24 @@
<cd:command name='synchronize' value='sincronizza'/>
<cd:command name='tab' value='tab'/>
<cd:command name='testcolumn' value='testcolumn'/>
+ <cd:command name='testfeature' value='testfeature'/>
+ <cd:command name='testfeatureonce' value='testfeatureonce'/>
<cd:command name='testpage' value='testpage'/>
<cd:command name='tex' value='tex'/>
<cd:command name='textbackground' value='textbackground'/>
+ <cd:command name='textcolor' value='textcolor'/>
<cd:command name='textheight' value='altezzatesto'/>
+ <cd:command name='textnote' value='textnote'/>
<cd:command name='textreference' value='riferimentotesto'/>
<cd:command name='textrule' value='lineatesto'/>
<cd:command name='textvariable' value='variabiletesto'/>
<cd:command name='textwidth' value='ampiezzatesto'/>
+ <cd:command name='thefirstcharacter' value='thefirstcharacter'/>
+ <cd:command name='thenormalizedbodyfontsize' value='thenormalizedbodyfontsize'/>
+ <cd:command name='theremainingcharacters' value='theremainingcharacters'/>
<cd:command name='thinrule' value='lineasottile'/>
<cd:command name='thinrules' value='lineesottili'/>
+ <cd:command name='tolinenote' value='tolinenote'/>
<cd:command name='tooltip' value='tooltip'/>
<cd:command name='topdistance' value='distanzacima'/>
<cd:command name='topheight' value='altezzacima'/>
@@ -1993,13 +2192,19 @@
<cd:command name='typ' value='typ'/>
<cd:command name='type' value='type'/>
<cd:command name='typebuffer' value='typebuffer'/>
+ <cd:command name='typedefinedbuffer' value='typedefinedbuffer'/>
<cd:command name='typefile' value='typefile'/>
+ <cd:command name='typeinlinebuffer' value='typeinlinebuffer'/>
+ <cd:command name='typing' value='typing'/>
<cd:command name='unitmeaning' value='nomeunita'/>
<cd:command name='unknown' value='ignoto'/>
+ <cd:command name='unregisterhyphenationpattern' value='unregisterhyphenationpattern'/>
<cd:command name='useJSscripts' value='usaJSscripts'/>
<cd:command name='useURL' value='usaURL'/>
<cd:command name='useXMLfilter' value='useXMLfilter'/>
<cd:command name='useblocks' value='usablocco'/>
+ <cd:command name='usebodyfont' value='usebodyfont'/>
+ <cd:command name='usebodyfontparameter' value='usebodyfontparameter'/>
<cd:command name='usecommands' value='usacomandi'/>
<cd:command name='useencoding' value='usacodifica'/>
<cd:command name='useexternaldocument' value='usadocumentoesterno'/>
@@ -2016,10 +2221,12 @@
<cd:command name='usetypescript' value='usetypescript'/>
<cd:command name='usetypescriptfile' value='usetypescriptfile'/>
<cd:command name='useurl' value='usaurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='versione'/>
<cd:command name='vl' value='vl'/>
<cd:command name='weekday' value='giornosettimana'/>
<cd:command name='whitespace' value='spaziobianco'/>
+ <cd:command name='widthspanningtext' value='widthspanningtext'/>
<cd:command name='wordright' value='paroladestra'/>
<cd:command name='writebetweenlist' value='scrividentroelenco'/>
<cd:command name='writetolist' value='scriviinelenco'/>
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-nl.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-nl.xml
index 344a874f0cc..87fe9ba1541 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-nl.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-nl.xml
@@ -131,6 +131,9 @@
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='kap'/>
<cd:variable name='capital' value='kapitaal'/>
+ <cd:variable name='category' value='category'/>
+ <cd:variable name='cd:character' value='cd:character'/>
+ <cd:variable name='cd:font' value='cd:font'/>
<cd:variable name='center' value='centreer'/>
<cd:variable name='centerlast' value='centerlast'/>
<cd:variable name='chapter' value='hoofdstuk'/>
@@ -189,6 +192,7 @@
<cd:variable name='external' value='extern'/>
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='gegeven'/>
+ <cd:variable name='fallback' value='fallback'/>
<cd:variable name='february' value='februari'/>
<cd:variable name='field' value='veld'/>
<cd:variable name='figure' value='figuur'/>
@@ -210,6 +214,7 @@
<cd:variable name='flushouter' value='lijnbuiten'/>
<cd:variable name='flushright' value='lijnrechts'/>
<cd:variable name='followingpage' value='opvolgendepagina'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='voet'/>
<cd:variable name='footnote' value='voetnoot'/>
<cd:variable name='force' value='forceer'/>
@@ -281,6 +286,7 @@
<cd:variable name='intermezzo' value='intermezzo'/>
<cd:variable name='intext' value='intekst'/>
<cd:variable name='intro' value='intro'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='italic'/>
<cd:variable name='italicbold' value='italicvet'/>
<cd:variable name='item' value='som'/>
@@ -384,6 +390,7 @@
<cd:variable name='nonumber' value='geennummer'/>
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='normaal'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='geenspatiering'/>
<cd:variable name='nostopper' value='geenafsluiter'/>
<cd:variable name='not' value='niet'/>
@@ -451,6 +458,7 @@
<cd:variable name='rectangular' value='recht'/>
<cd:variable name='reference' value='referentie'/>
<cd:variable name='referral' value='kenmerk'/>
+ <cd:variable name='region' value='gebied'/>
<cd:variable name='register' value='register'/>
<cd:variable name='regular' value='regular'/>
<cd:variable name='relative' value='relatief'/>
@@ -635,6 +643,7 @@
<cd:constant name='afterkey' value='natoets'/>
<cd:constant name='aftersection' value='nasectie'/>
<cd:constant name='align' value='uitlijnen'/>
+ <cd:constant name='alignbottom' value='alignbottom'/>
<cd:constant name='aligncharacter' value='karakteruitlijnen'/>
<cd:constant name='alignmentcharacter' value='uitlijnkarakter'/>
<cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
@@ -771,6 +780,7 @@
<cd:constant name='deepnumbercommand' value='diepnummercommando'/>
<cd:constant name='deeptextcommand' value='dieptekstcommando'/>
<cd:constant name='default' value='default'/>
+ <cd:constant name='define' value='definieer'/>
<cd:constant name='delay' value='wachttijd'/>
<cd:constant name='depth' value='diepte'/>
<cd:constant name='depthcorrection' value='dieptecorrectie'/>
@@ -810,8 +820,10 @@
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='factor'/>
<cd:constant name='fallback' value='terugval'/>
+ <cd:constant name='fallbacks' value='fallbacks'/>
<cd:constant name='family' value='soort'/>
<cd:constant name='features' value='features'/>
+ <cd:constant name='featureset' value='featureset'/>
<cd:constant name='fences' value='fences'/>
<cd:constant name='field' value='veld'/>
<cd:constant name='fieldbackgroundcolor' value='veldachtergrondkleur'/>
@@ -832,6 +844,7 @@
<cd:constant name='focusin' value='focusin'/>
<cd:constant name='focusoffset' value='focusoffset'/>
<cd:constant name='focusout' value='focusuit'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='voet'/>
<cd:constant name='footerdistance' value='voetafstand'/>
<cd:constant name='footerstate' value='voetstatus'/>
@@ -886,6 +899,7 @@
<cd:constant name='increment' value='verhoog'/>
<cd:constant name='incrementnumber' value='verhoognummer'/>
<cd:constant name='indenting' value='inspringen'/>
+ <cd:constant name='indentlist' value='indentlist'/>
<cd:constant name='indentnext' value='springvolgendein'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='aanduiding'/>
@@ -913,7 +927,10 @@
<cd:constant name='keys' value='sleutels'/>
<cd:constant name='keyword' value='trefwoord'/>
<cd:constant name='label' value='label'/>
+ <cd:constant name='labelalternative' value='labelvariant'/>
+ <cd:constant name='labelcolor' value='labelkleur'/>
<cd:constant name='labeloffset' value='labeloffset'/>
+ <cd:constant name='labelstyle' value='labelletter'/>
<cd:constant name='language' value='language'/>
<cd:constant name='last' value='last'/>
<cd:constant name='lastnamesep' value='lastnamesep'/>
@@ -947,6 +964,7 @@
<cd:constant name='limittext' value='limiettekst'/>
<cd:constant name='line' value='regel'/>
<cd:constant name='linecorrection' value='regelcorrectie'/>
+ <cd:constant name='linedirection' value='regelrichting'/>
<cd:constant name='lines' value='regels'/>
<cd:constant name='list' value='lijst'/>
<cd:constant name='listtext' value='lijsttekst'/>
@@ -1087,6 +1105,7 @@
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='plaatsen'/>
<cd:constant name='placehead' value='plaatskop'/>
+ <cd:constant name='placeholder' value='placeholder'/>
<cd:constant name='placestopper' value='plaatsafsluiter'/>
<cd:constant name='position' value='positie'/>
<cd:constant name='prefix' value='prefix'/>
@@ -1118,6 +1137,7 @@
<cd:constant name='reference' value='referentie'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='refereren'/>
<cd:constant name='region' value='gebied'/>
<cd:constant name='regionin' value='gebiedin'/>
@@ -1362,7 +1382,6 @@
<!-- definitions for interface commands for language nl -->
<cd:commands>
- <cd:command name='CAPPED' value='KAP'/>
<cd:command name='Character' value='Letter'/>
<cd:command name='Characters' value='Letters'/>
<cd:command name='MONTH' value='MAAND'/>
@@ -1376,8 +1395,18 @@
<cd:command name='Word' value='Woord'/>
<cd:command name='Words' value='Woorden'/>
<cd:command name='about' value='about'/>
+ <cd:command name='adaptfontfeature' value='adaptfontfeature'/>
<cd:command name='adaptlayout' value='paslayoutaan'/>
+ <cd:command name='addfeature' value='addfeature'/>
+ <cd:command name='alignbottom' value='alignbottom'/>
+ <cd:command name='aligned' value='aligned'/>
+ <cd:command name='alignedbox' value='alignedbox'/>
+ <cd:command name='alignedline' value='alignedline'/>
+ <cd:command name='alignhere' value='alignhere'/>
<cd:command name='alignment' value='uitlijnen'/>
+ <cd:command name='alignmentcharacter' value='alignmentcharacter'/>
+ <cd:command name='applytocharacters' value='applytocharacters'/>
+ <cd:command name='applytofirstcharacter' value='applytofirstcharacter'/>
<cd:command name='arg' value='arg'/>
<cd:command name='at' value='op'/>
<cd:command name='atleftmargin' value='oplinkermarge'/>
@@ -1389,9 +1418,13 @@
<cd:command name='blackrules' value='blokjes'/>
<cd:command name='blank' value='blanko'/>
<cd:command name='bookmark' value='bookmark'/>
+ <cd:command name='bottombox' value='bottombox'/>
<cd:command name='bottomdistance' value='onderafstand'/>
<cd:command name='bottomheight' value='onderhoogte'/>
+ <cd:command name='bottomleftbox' value='bottomleftbox'/>
+ <cd:command name='bottomrightbox' value='bottomrightbox'/>
<cd:command name='bottomspace' value='bodemwit'/>
+ <cd:command name='buildtextbottomdot' value='buildtextbottomdot'/>
<cd:command name='but' value='but'/>
<cd:command name='button' value='button'/>
<cd:command name='bypassblocks' value='passeerblokken'/>
@@ -1430,8 +1463,11 @@
<cd:command name='defineblock' value='definieerblok'/>
<cd:command name='definebodyfont' value='definieerkorps'/>
<cd:command name='definebodyfontenvironment' value='definieerkorpsomgeving'/>
+ <cd:command name='definebodyfontswitch' value='definebodyfontswitch'/>
<cd:command name='definebuffer' value='definieerbuffer'/>
<cd:command name='definecharacter' value='definieerkarakter'/>
+ <cd:command name='definecharacterkerning' value='definecharacterkerning'/>
+ <cd:command name='definecharacterspacing' value='definecharacterspacing'/>
<cd:command name='definecolor' value='definieerkleur'/>
<cd:command name='definecolorgroup' value='definieerkleurgroep'/>
<cd:command name='definecolumnbreak' value='definieerkolomovergang'/>
@@ -1441,37 +1477,57 @@
<cd:command name='definecommand' value='definieercommando'/>
<cd:command name='defineconversion' value='definieerconversie'/>
<cd:command name='definedescription' value='doordefinieren'/>
+ <cd:command name='definedfont' value='definedfont'/>
<cd:command name='defineenumeration' value='doornummeren'/>
+ <cd:command name='definefallbackfamily' value='definefallbackfamily'/>
<cd:command name='definefield' value='definieerveld'/>
<cd:command name='definefieldstack' value='definieerveldstapel'/>
<cd:command name='definefiguresymbol' value='definieerfiguursymbool'/>
+ <cd:command name='definefilefallback' value='definefilefallback'/>
+ <cd:command name='definefirstline' value='definefirstline'/>
<cd:command name='definefloat' value='definieerplaatsblok'/>
<cd:command name='definefont' value='definieerfont'/>
+ <cd:command name='definefontalternative' value='definefontalternative'/>
+ <cd:command name='definefontfallback' value='definefontfallback'/>
+ <cd:command name='definefontfamily' value='definefontfamily'/>
+ <cd:command name='definefontfamilypreset' value='definefontfamilypreset'/>
+ <cd:command name='definefontfeature' value='definefontfeature'/>
+ <cd:command name='definefontfile' value='definefontfile'/>
+ <cd:command name='definefontsize' value='definefontsize'/>
+ <cd:command name='definefontsolution' value='definefontsolution'/>
<cd:command name='definefontstyle' value='definieerfontstijl'/>
<cd:command name='definefontsynonym' value='definieerfontsynoniem'/>
<cd:command name='defineframed' value='definieeromlijnd'/>
<cd:command name='defineframedtext' value='definieerkadertekst'/>
+ <cd:command name='definefrozenfont' value='definefrozenfont'/>
<cd:command name='definehbox' value='definieerhbox'/>
<cd:command name='definehead' value='definieerkop'/>
+ <cd:command name='definehyphenationfeatures' value='definehyphenationfeatures'/>
<cd:command name='defineindentedtext' value='definieeringesprongentext'/>
<cd:command name='defineinmargin' value='definieerinmarge'/>
<cd:command name='defineinteractionmenu' value='definieerinteractiemenu'/>
<cd:command name='defineitemgroup' value='definieeritemgroep'/>
+ <cd:command name='defineitems' value='defineitems'/>
<cd:command name='definelabel' value='doorlabelen'/>
<cd:command name='definelayer' value='definieerlayer'/>
<cd:command name='definelayout' value='definieerlayout'/>
+ <cd:command name='definelinenote' value='definelinenote'/>
<cd:command name='definelist' value='definieerlijst'/>
<cd:command name='definelogo' value='definieerbeeldmerk'/>
<cd:command name='definemainfield' value='definieerhoofdveld'/>
<cd:command name='definemakeup' value='definieeropmaak'/>
<cd:command name='definemarking' value='definieermarkering'/>
<cd:command name='definemathalignment' value='definieerwiskundeuitlijnen'/>
+ <cd:command name='definemode' value='definemode'/>
+ <cd:command name='definenamedcolor' value='definenamedcolor'/>
+ <cd:command name='definenote' value='definenote'/>
<cd:command name='defineoutput' value='definieeruitvoer'/>
<cd:command name='defineoverlay' value='definieeroverlay'/>
<cd:command name='definepagebreak' value='definieerpaginaovergang'/>
<cd:command name='definepalet' value='definieerpalet'/>
<cd:command name='definepapersize' value='definieerpapierformaat'/>
<cd:command name='defineparagraphs' value='definieeralineas'/>
+ <cd:command name='defineperiodkerning' value='defineperiodkerning'/>
<cd:command name='defineplacement' value='definieerplaats'/>
<cd:command name='defineprofile' value='definieerprofiel'/>
<cd:command name='defineprogram' value='definieerprogramma'/>
@@ -1493,33 +1549,45 @@
<cd:command name='definetabulate' value='definieertabulatie'/>
<cd:command name='definetext' value='definieertekst'/>
<cd:command name='definetextbackground' value='definieertekstachtergrond'/>
+ <cd:command name='definetextnote' value='definetextnote'/>
<cd:command name='definetextposition' value='definieertekstpositie'/>
<cd:command name='definetextvariable' value='definieertekstvariabele'/>
<cd:command name='definetype' value='definieertype'/>
<cd:command name='definetyping' value='definieertypen'/>
<cd:command name='defineversion' value='definieerversie'/>
+ <cd:command name='depthspanningtext' value='depthspanningtext'/>
<cd:command name='determineheadnumber' value='bepaalkopnummer'/>
<cd:command name='determinelistcharacteristics' value='bepaallijstkenmerken'/>
<cd:command name='determineregistercharacteristics' value='bepaalregisterkenmerken'/>
<cd:command name='dimension' value='dimensie'/>
<cd:command name='disableinteractionmenu' value='blokkeerinteractiemenu'/>
+ <cd:command name='disablemode' value='disablemode'/>
+ <cd:command name='doaddfeature' value='doaddfeature'/>
<cd:command name='domicile' value='woonplaats'/>
+ <cd:command name='dontconvertfont' value='dontconvertfont'/>
<cd:command name='donttest' value='geentest'/>
<cd:command name='edgedistance' value='randafstand'/>
<cd:command name='edgewidth' value='randbreedte'/>
+ <cd:command name='emphasisboldface' value='emphasisboldface'/>
<cd:command name='emptylines' value='legeregels'/>
+ <cd:command name='enablemode' value='enablemode'/>
<cd:command name='environment' value='omgeving'/>
<cd:command name='externalfigure' value='externfiguur'/>
<cd:command name='fact' value='geg'/>
+ <cd:command name='fastswitchtobodyfont' value='fastswitchtobodyfont'/>
+ <cd:command name='feature' value='feature'/>
<cd:command name='field' value='veld'/>
<cd:command name='fieldstack' value='veldstapel'/>
<cd:command name='fillinfield' value='invulveld'/>
<cd:command name='fillinline' value='invulregel'/>
<cd:command name='fillinrules' value='invullijnen'/>
<cd:command name='fillintext' value='invultekst'/>
+ <cd:command name='firstcharacter' value='firstcharacter'/>
<cd:command name='fitfield' value='passendveld'/>
+ <cd:command name='fittopbaselinegrid' value='fittopbaselinegrid'/>
<cd:command name='fixedspace' value='vastespatie'/>
<cd:command name='fixedspaces' value='vastespaties'/>
+ <cd:command name='flushnotes' value='flushnotes'/>
<cd:command name='followprofile' value='volgprofiel'/>
<cd:command name='followprofileversion' value='volgprofielversie'/>
<cd:command name='followversion' value='volgversie'/>
@@ -1528,13 +1596,19 @@
<cd:command name='footnote' value='voetnoot'/>
<cd:command name='footnotetext' value='voetnoottekst'/>
<cd:command name='forceblocks' value='forceerblokken'/>
+ <cd:command name='forcecharacterstripping' value='forcecharacterstripping'/>
<cd:command name='formulanumber' value='formulenummer'/>
<cd:command name='fraction' value='breuk'/>
<cd:command name='framed' value='omlijnd'/>
<cd:command name='from' value='uit'/>
+ <cd:command name='fromlinenote' value='fromlinenote'/>
<cd:command name='getbuffer' value='haalbuffer'/>
+ <cd:command name='getfirstcharacter' value='getfirstcharacter'/>
<cd:command name='getmarking' value='haalmarkering'/>
<cd:command name='getnumber' value='haalnummer'/>
+ <cd:command name='globaldisablemode' value='globaldisablemode'/>
+ <cd:command name='globalenablemode' value='globalenablemode'/>
+ <cd:command name='globalpreventmode' value='globalpreventmode'/>
<cd:command name='godown' value='omlaag'/>
<cd:command name='goto' value='naar'/>
<cd:command name='gotobox' value='naarbox'/>
@@ -1550,6 +1624,7 @@
<cd:command name='headnumber' value='kopnummer'/>
<cd:command name='headsym' value='kopsym'/>
<cd:command name='headtext' value='koptekst'/>
+ <cd:command name='heightspanningtext' value='heightspanningtext'/>
<cd:command name='hideblocks' value='verbergblokken'/>
<cd:command name='high' value='hoog'/>
<cd:command name='hl' value='hl'/>
@@ -1581,26 +1656,37 @@
<cd:command name='interactionbuttons' value='interactiebuttons'/>
<cd:command name='interactionmenu' value='interactiemenu'/>
<cd:command name='item' value='som'/>
+ <cd:command name='itemgroup' value='itemgroup'/>
<cd:command name='items' value='items'/>
+ <cd:command name='itemtag' value='itemtag'/>
<cd:command name='its' value='its'/>
<cd:command name='keepblocks' value='handhaafblokken'/>
+ <cd:command name='kerncharacters' value='kerncharacters'/>
<cd:command name='label' value='label'/>
<cd:command name='labels' value='labels'/>
<cd:command name='labeltext' value='labeltekst'/>
<cd:command name='language' value='taal'/>
+ <cd:command name='languageCharacters' value='languageCharacters'/>
+ <cd:command name='languagecharacters' value='languagecharacters'/>
<cd:command name='leftaligned' value='regellinks'/>
+ <cd:command name='leftbottombox' value='leftbottombox'/>
<cd:command name='leftedgedistance' value='linkerrandafstand'/>
<cd:command name='leftedgewidth' value='linkerrandbreedte'/>
+ <cd:command name='leftline' value='leftline'/>
<cd:command name='leftmargindistance' value='linkermargeafstand'/>
<cd:command name='leftmarginwidth' value='linkermargebreedte'/>
<cd:command name='leg' value='leg'/>
<cd:command name='linecorrection' value='regelcorrectie'/>
+ <cd:command name='linenote' value='linenote'/>
+ <cd:command name='linespanningtext' value='linespanningtext'/>
<cd:command name='linewidth' value='lijndikte'/>
<cd:command name='listheight' value='lijsthoogte'/>
<cd:command name='listlength' value='lijstlengte'/>
<cd:command name='listsymbol' value='lijstsymbool'/>
<cd:command name='listwidth' value='lijstbreedte'/>
+ <cd:command name='loadfontgoodies' value='loadfontgoodies'/>
<cd:command name='localfootnotes' value='lokalevoetnoten'/>
+ <cd:command name='localnotes' value='localnotes'/>
<cd:command name='logfields' value='registreervelden'/>
<cd:command name='lohi' value='laho'/>
<cd:command name='low' value='laag'/>
@@ -1631,6 +1717,7 @@
<cd:command name='nodimension' value='geendimensie'/>
<cd:command name='noheaderandfooterlines' value='geenhoofdenvoetregels'/>
<cd:command name='noindenting' value='nietinspringen'/>
+ <cd:command name='noitem' value='noitem'/>
<cd:command name='nolist' value='geenlijst'/>
<cd:command name='nomarking' value='geenmarkering'/>
<cd:command name='nomoreblocks' value='geenblokkenmeer'/>
@@ -1638,6 +1725,7 @@
<cd:command name='nop' value='nop'/>
<cd:command name='nospace' value='geenspatie'/>
<cd:command name='note' value='noot'/>
+ <cd:command name='notesymbol' value='notesymbol'/>
<cd:command name='notopandbottomlines' value='geenbovenenonderregels'/>
<cd:command name='notsmallcapped' value='nokap'/>
<cd:command name='nowhitespace' value='geenwitruimte'/>
@@ -1649,6 +1737,7 @@
<cd:command name='outermarginwidth' value='buitenmargebreedte'/>
<cd:command name='packed' value='opelkaar'/>
<cd:command name='page' value='pagina'/>
+ <cd:command name='pagebreak' value='pagebreak'/>
<cd:command name='pagedepth' value='paginadiepte'/>
<cd:command name='pagenumber' value='paginanummer'/>
<cd:command name='pageoffset' value='paginaoffset'/>
@@ -1667,7 +1756,10 @@
<cd:command name='placelist' value='plaatslijst'/>
<cd:command name='placelistofsynonyms' value='plaatslijstmetsynoniemen'/>
<cd:command name='placelocalfootnotes' value='plaatslokalevoetnoten'/>
+ <cd:command name='placelocalnotes' value='placelocalnotes'/>
<cd:command name='placelogos' value='plaatsbeeldmerken'/>
+ <cd:command name='placenamedfloat' value='placenamedfloat'/>
+ <cd:command name='placenotes' value='placenotes'/>
<cd:command name='placeongrid' value='plaatsopgrid'/>
<cd:command name='placeontopofeachother' value='plaatsonderelkaar'/>
<cd:command name='placepagenumber' value='plaatspaginanummer'/>
@@ -1680,9 +1772,17 @@
<cd:command name='placetextvariable' value='plaatstekstvariabele'/>
<cd:command name='position' value='positioneer'/>
<cd:command name='positiontext' value='positioneertekst'/>
+ <cd:command name='postponenotes' value='postponenotes'/>
+ <cd:command name='postponingnotes' value='postponingnotes'/>
+ <cd:command name='predefinedfont' value='predefinedfont'/>
+ <cd:command name='predefinefont' value='predefinefont'/>
+ <cd:command name='presetdocument' value='presetdocument'/>
+ <cd:command name='prettyprintbuffer' value='prettyprintbuffer'/>
+ <cd:command name='preventmode' value='preventmode'/>
<cd:command name='printpaperheight' value='printpapierhoogte'/>
<cd:command name='printpaperwidth' value='printpapierbreedte'/>
<cd:command name='processblocks' value='verwerkblokken'/>
+ <cd:command name='processbodyfontenvironmentlist' value='processbodyfontenvironmentlist'/>
<cd:command name='processpage' value='verwerkpagina'/>
<cd:command name='product' value='produkt'/>
<cd:command name='program' value='programma'/>
@@ -1692,19 +1792,45 @@
<cd:command name='quote' value='citeer'/>
<cd:command name='ran' value='ran'/>
<cd:command name='redo' value='herhaal'/>
+ <cd:command name='redoconvertfont' value='redoconvertfont'/>
<cd:command name='ref' value='ref'/>
<cd:command name='reference' value='referentie'/>
<cd:command name='referral' value='kenmerk'/>
<cd:command name='referraldate' value='kenmerkdatum'/>
<cd:command name='referring' value='refereer'/>
+ <cd:command name='registerfontclass' value='registerfontclass'/>
+ <cd:command name='registerhyphenationexception' value='registerhyphenationexception'/>
+ <cd:command name='registerhyphenationpattern' value='registerhyphenationpattern'/>
<cd:command name='remark' value='toelichting'/>
+ <cd:command name='replacefeature' value='replacefeature'/>
<cd:command name='reset' value='reset'/>
+ <cd:command name='resetandaddfeature' value='resetandaddfeature'/>
+ <cd:command name='resetcharacteralign' value='resetcharacteralign'/>
+ <cd:command name='resetcharacterkerning' value='resetcharacterkerning'/>
+ <cd:command name='resetcharacterspacing' value='resetcharacterspacing'/>
+ <cd:command name='resetcharacterstripping' value='resetcharacterstripping'/>
+ <cd:command name='resetfeature' value='resetfeature'/>
+ <cd:command name='resetfontcolorsheme' value='resetfontcolorsheme'/>
+ <cd:command name='resetfontfallback' value='resetfontfallback'/>
+ <cd:command name='resetfontsolution' value='resetfontsolution'/>
+ <cd:command name='resethyphenationfeatures' value='resethyphenationfeatures'/>
+ <cd:command name='resetlocalfloats' value='resetlocalfloats'/>
<cd:command name='resetmarking' value='resetmarkering'/>
+ <cd:command name='resetmode' value='resetmode'/>
<cd:command name='resetnumber' value='resetnummer'/>
- <cd:command name='resettext' value='resettekstinhoud'/>
+ <cd:command name='resetpath' value='resetpath'/>
+ <cd:command name='resetperiodkerning' value='resetperiodkerning'/>
+ <cd:command name='resetsystemmode' value='resetsystemmode'/>
+ <cd:command name='resettextcontent' value='resettekstinhoud'/>
+ <cd:command name='resetvisualizers' value='resetvisualizers'/>
+ <cd:command name='restoreglobalbodyfont' value='restoreglobalbodyfont'/>
+ <cd:command name='retestfeature' value='retestfeature'/>
+ <cd:command name='revivefeature' value='revivefeature'/>
<cd:command name='rightaligned' value='regelrechts'/>
+ <cd:command name='rightbottombox' value='rightbottombox'/>
<cd:command name='rightedgedistance' value='rechterrandafstand'/>
<cd:command name='rightedgewidth' value='rechterrandbreedte'/>
+ <cd:command name='rightline' value='rightline'/>
<cd:command name='rightmargindistance' value='rechtermargeafstand'/>
<cd:command name='rightmarginwidth' value='rechtermargebreedte'/>
<cd:command name='romannumerals' value='romeins'/>
@@ -1715,12 +1841,38 @@
<cd:command name='selectblocks' value='selecteerblokken'/>
<cd:command name='selectpaper' value='selecteerpapier'/>
<cd:command name='selectversion' value='selecteerversie'/>
+ <cd:command name='setbigbodyfont' value='setbigbodyfont'/>
+ <cd:command name='setcharacteralign' value='setcharacteralign'/>
+ <cd:command name='setcharacteraligndetail' value='setcharacteraligndetail'/>
+ <cd:command name='setcharactercasing' value='setcharactercasing'/>
+ <cd:command name='setcharactercleaning' value='setcharactercleaning'/>
+ <cd:command name='setcharacterkerning' value='setcharacterkerning'/>
+ <cd:command name='setcharacterspacing' value='setcharacterspacing'/>
+ <cd:command name='setcharacterstripping' value='setcharacterstripping'/>
+ <cd:command name='setcurrentfontclass' value='setcurrentfontclass'/>
+ <cd:command name='setfirstline' value='setfirstline'/>
+ <cd:command name='setfirstpasscharacteralign' value='setfirstpasscharacteralign'/>
+ <cd:command name='setfont' value='setfont'/>
+ <cd:command name='setfontcolorsheme' value='setfontcolorsheme'/>
+ <cd:command name='setfontfeature' value='setfontfeature'/>
+ <cd:command name='setfontsolution' value='setfontsolution'/>
+ <cd:command name='setfontstrut' value='setfontstrut'/>
+ <cd:command name='sethyphenationfeatures' value='sethyphenationfeatures'/>
+ <cd:command name='setmainbodyfont' value='setmainbodyfont'/>
+ <cd:command name='setmode' value='setmode'/>
+ <cd:command name='setnote' value='setnote'/>
+ <cd:command name='setnotetext' value='setnotetext'/>
<cd:command name='setnumber' value='setnummer'/>
+ <cd:command name='setperiodkerning' value='setperiodkerning'/>
+ <cd:command name='setsecondpasscharacteralign' value='setsecondpasscharacteralign'/>
+ <cd:command name='setsmallbodyfont' value='setsmallbodyfont'/>
+ <cd:command name='setsystemmode' value='setsystemmode'/>
<cd:command name='settextcontent' value='steltekstinhoudin'/>
<cd:command name='settextvariable' value='kentekstvariabeletoe'/>
<cd:command name='setupalign' value='steluitlijnenin'/>
<cd:command name='setupanswerarea' value='stelantwoordgebiedin'/>
<cd:command name='setuparranging' value='stelarrangerenin'/>
+ <cd:command name='setupattachment' value='setupattachment'/>
<cd:command name='setupbackground' value='stelachtergrondin'/>
<cd:command name='setupbackgrounds' value='stelachtergrondenin'/>
<cd:command name='setupblackrules' value='stelblokjesin'/>
@@ -1735,6 +1887,9 @@
<cd:command name='setupcapitals' value='stelkapitalenin'/>
<cd:command name='setupcaption' value='stelblokkopjein'/>
<cd:command name='setupcaptions' value='stelblokkopjesin'/>
+ <cd:command name='setupcharacteralign' value='setupcharacteralign'/>
+ <cd:command name='setupcharacterkerning' value='setupcharacterkerning'/>
+ <cd:command name='setupcharacterspacing' value='setupcharacterspacing'/>
<cd:command name='setupclipping' value='stelclipin'/>
<cd:command name='setupcolor' value='stelkleurin'/>
<cd:command name='setupcolors' value='stelkleurenin'/>
@@ -1745,6 +1900,7 @@
<cd:command name='setupcombinations' value='stelcombinatiesin'/>
<cd:command name='setupcombinedlist' value='stelsamengesteldelijstin'/>
<cd:command name='setupcomment' value='stelcommentaarin'/>
+ <cd:command name='setupcounter' value='setupcounter'/>
<cd:command name='setupdescription' value='steldoordefinierenin'/>
<cd:command name='setupdescriptions' value='steldoordefinierenin'/>
<cd:command name='setupenumeration' value='steldoornummerenin'/>
@@ -1754,9 +1910,14 @@
<cd:command name='setupfields' value='stelveldenin'/>
<cd:command name='setupfillinlines' value='stelinvulregelsin'/>
<cd:command name='setupfillinrules' value='stelinvullijnenin'/>
+ <cd:command name='setupfirstline' value='setupfirstline'/>
<cd:command name='setupfloat' value='stelplaatsblokin'/>
<cd:command name='setupfloats' value='stelplaatsblokkenin'/>
<cd:command name='setupfloatsplitting' value='stelplaatsbloksplitsenin'/>
+ <cd:command name='setupfontexpansion' value='setupfontexpansion'/>
+ <cd:command name='setupfontprotrusion' value='setupfontprotrusion'/>
+ <cd:command name='setupfonts' value='setupfonts'/>
+ <cd:command name='setupfontsolution' value='setupfontsolution'/>
<cd:command name='setupfooter' value='stelvoetin'/>
<cd:command name='setupfootertexts' value='stelvoettekstenin'/>
<cd:command name='setupfootnotedefinition' value='stelvoetnootdefinitiein'/>
@@ -1773,6 +1934,7 @@
<cd:command name='setupheadnumber' value='stelkopnummerin'/>
<cd:command name='setupheads' value='stelkoppenin'/>
<cd:command name='setupheadtext' value='stelkoptekstin'/>
+ <cd:command name='setuphyphenation' value='setuphyphenation'/>
<cd:command name='setuphyphenmark' value='stelkoppeltekenin'/>
<cd:command name='setupindentedtext' value='stelingesprongentextin'/>
<cd:command name='setupindenting' value='stelinspringenin'/>
@@ -1789,6 +1951,7 @@
<cd:command name='setuplanguage' value='steltaalin'/>
<cd:command name='setuplayout' value='stellayoutin'/>
<cd:command name='setuplegend' value='stellegendain'/>
+ <cd:command name='setuplinenote' value='setuplinenote'/>
<cd:command name='setuplinenumbering' value='stelregelnummerenin'/>
<cd:command name='setuplines' value='stelregelsin'/>
<cd:command name='setuplinewidth' value='stellijndiktein'/>
@@ -1801,6 +1964,10 @@
<cd:command name='setupmarking' value='stelmarkeringin'/>
<cd:command name='setupmathalignment' value='stelwiskundeuitlijnenin'/>
<cd:command name='setupnarrower' value='stelsmallerin'/>
+ <cd:command name='setupnotation' value='setupnotation'/>
+ <cd:command name='setupnotations' value='setupnotations'/>
+ <cd:command name='setupnote' value='setupnote'/>
+ <cd:command name='setupnotes' value='setupnotes'/>
<cd:command name='setupnumber' value='stelnummerin'/>
<cd:command name='setupnumbering' value='stelnummerenin'/>
<cd:command name='setupoppositeplacing' value='stelnaastplaatsenin'/>
@@ -1814,6 +1981,7 @@
<cd:command name='setuppapersize' value='stelpapierformaatin'/>
<cd:command name='setupparagraphnumbering' value='stelparagraafnummerenin'/>
<cd:command name='setupparagraphs' value='stelalineasin'/>
+ <cd:command name='setupperiodkerning' value='setupperiodkerning'/>
<cd:command name='setupplacement' value='stelplaatsin'/>
<cd:command name='setuppositioning' value='stelpositionerenin'/>
<cd:command name='setupprofiles' value='stelprofielenin'/>
@@ -1843,6 +2011,7 @@
<cd:command name='setuptabulate' value='steltabulatiein'/>
<cd:command name='setuptext' value='steltekstin'/>
<cd:command name='setuptextbackground' value='steltekstachtergrondin'/>
+ <cd:command name='setuptextnote' value='setuptextnote'/>
<cd:command name='setuptextposition' value='steltekstpositiein'/>
<cd:command name='setuptextrules' value='steltekstlijnenin'/>
<cd:command name='setuptexttexts' value='stelteksttekstenin'/>
@@ -1857,16 +2026,29 @@
<cd:command name='setupurl' value='stelurlin'/>
<cd:command name='setupversions' value='stelversiesin'/>
<cd:command name='setupwhitespace' value='stelwitruimtein'/>
+ <cd:command name='setvisualizerfont' value='setvisualizerfont'/>
<cd:command name='showbodyfont' value='toonkorps'/>
<cd:command name='showbodyfontenvironment' value='toonkorpsomgeving'/>
<cd:command name='showcolor' value='toonkleur'/>
<cd:command name='showcolorgroup' value='toonkleurgroep'/>
+ <cd:command name='showcounter' value='showcounter'/>
<cd:command name='showexternalfigures' value='toonexternefiguren'/>
<cd:command name='showfields' value='toonvelden'/>
+ <cd:command name='showfont' value='showfont'/>
+ <cd:command name='showfontdata' value='showfontdata'/>
+ <cd:command name='showfontexpansion' value='showfontexpansion'/>
+ <cd:command name='showfontitalics' value='showfontitalics'/>
+ <cd:command name='showfontkerns' value='showfontkerns'/>
+ <cd:command name='showfontparameters' value='showfontparameters'/>
+ <cd:command name='showfontstrip' value='showfontstrip'/>
+ <cd:command name='showfontstyle' value='showfontstyle'/>
<cd:command name='showframe' value='toonkader'/>
<cd:command name='showgrid' value='toongrid'/>
+ <cd:command name='showhyphenationtrace' value='showhyphenationtrace'/>
+ <cd:command name='showkerning' value='showkerning'/>
<cd:command name='showlayout' value='toonlayout'/>
<cd:command name='showmakeup' value='toonopmaak'/>
+ <cd:command name='showminimalbaseline' value='showminimalbaseline'/>
<cd:command name='showpalet' value='toonpalet'/>
<cd:command name='showprint' value='toonprint'/>
<cd:command name='showsetups' value='tooninstellingen'/>
@@ -1876,6 +2058,7 @@
<cd:command name='someline' value='eenregel'/>
<cd:command name='somewhere' value='ergens'/>
<cd:command name='space' value='spatie'/>
+ <cd:command name='specialitem' value='specialitem'/>
<cd:command name='splitfloat' value='splitsplaatsblok'/>
<cd:command name='startalignment' value='startuitlijnen'/>
<cd:command name='startbackground' value='startachtergrond'/>
@@ -1893,6 +2076,7 @@
<cd:command name='startglobal' value='startglobaal'/>
<cd:command name='startline' value='startregel'/>
<cd:command name='startlinecorrection' value='startregelcorrectie'/>
+ <cd:command name='startlinenote' value='startlinenote'/>
<cd:command name='startlinenumbering' value='startregelnummeren'/>
<cd:command name='startlines' value='startregels'/>
<cd:command name='startlocal' value='startlokaal'/>
@@ -1903,7 +2087,7 @@
<cd:command name='startnarrower' value='startsmaller'/>
<cd:command name='startopposite' value='startnaast'/>
<cd:command name='startoverlay' value='startoverlay'/>
- <cd:command name='startoverzicht' value='startoverzicht'/>
+ <cd:command name='startoverview' value='startoverzicht'/>
<cd:command name='startpacked' value='startopelkaar'/>
<cd:command name='startpositioning' value='startpositioneren'/>
<cd:command name='startproduct' value='startprodukt'/>
@@ -1935,6 +2119,7 @@
<cd:command name='stopglobal' value='stopglobaal'/>
<cd:command name='stopline' value='stopregel'/>
<cd:command name='stoplinecorrection' value='stopregelcorrectie'/>
+ <cd:command name='stoplinenote' value='stoplinenote'/>
<cd:command name='stoplinenumbering' value='stopregelnummeren'/>
<cd:command name='stoplines' value='stopregels'/>
<cd:command name='stoplocal' value='stoplokaal'/>
@@ -1945,7 +2130,7 @@
<cd:command name='stopnarrower' value='stopsmaller'/>
<cd:command name='stopopposite' value='stopnaast'/>
<cd:command name='stopoverlay' value='stopoverlay'/>
- <cd:command name='stopoverzicht' value='stopoverzicht'/>
+ <cd:command name='stopoverview' value='stopoverzicht'/>
<cd:command name='stoppacked' value='stopopelkaar'/>
<cd:command name='stoppositioning' value='stoppositioneren'/>
<cd:command name='stopproduct' value='stopprodukt'/>
@@ -1962,8 +2147,11 @@
<cd:command name='stopunpacked' value='stopvanelkaar'/>
<cd:command name='stopversion' value='stopversie'/>
<cd:command name='stretched' value='uitgerekt'/>
+ <cd:command name='strictinspectnextcharacter' value='strictinspectnextcharacter'/>
+ <cd:command name='stripcharacter' value='stripcharacter'/>
<cd:command name='subformulanumber' value='subformulenummer'/>
<cd:command name='subpagenumber' value='subpaginanummer'/>
+ <cd:command name='subtractfeature' value='subtractfeature'/>
<cd:command name='switchtobodyfont' value='switchnaarkorps'/>
<cd:command name='switchtorawfont' value='switchtorawfont'/>
<cd:command name='sym' value='sym'/>
@@ -1973,16 +2161,24 @@
<cd:command name='synchronize' value='synchroniseer'/>
<cd:command name='tab' value='tab'/>
<cd:command name='testcolumn' value='testkolom'/>
+ <cd:command name='testfeature' value='testfeature'/>
+ <cd:command name='testfeatureonce' value='testfeatureonce'/>
<cd:command name='testpage' value='testpagina'/>
<cd:command name='tex' value='tex'/>
<cd:command name='textbackground' value='tekstachtergrond'/>
+ <cd:command name='textcolor' value='textcolor'/>
<cd:command name='textheight' value='teksthoogte'/>
+ <cd:command name='textnote' value='textnote'/>
<cd:command name='textreference' value='tekstreferentie'/>
<cd:command name='textrule' value='tekstlijn'/>
<cd:command name='textvariable' value='tekstvariabele'/>
<cd:command name='textwidth' value='tekstbreedte'/>
+ <cd:command name='thefirstcharacter' value='thefirstcharacter'/>
+ <cd:command name='thenormalizedbodyfontsize' value='thenormalizedbodyfontsize'/>
+ <cd:command name='theremainingcharacters' value='theremainingcharacters'/>
<cd:command name='thinrule' value='dunnelijn'/>
<cd:command name='thinrules' value='dunnelijnen'/>
+ <cd:command name='tolinenote' value='tolinenote'/>
<cd:command name='tooltip' value='suggestie'/>
<cd:command name='topdistance' value='bovenafstand'/>
<cd:command name='topheight' value='bovenhoogte'/>
@@ -1993,13 +2189,19 @@
<cd:command name='typ' value='typ'/>
<cd:command name='type' value='type'/>
<cd:command name='typebuffer' value='typebuffer'/>
+ <cd:command name='typedefinedbuffer' value='typedefinedbuffer'/>
<cd:command name='typefile' value='typefile'/>
+ <cd:command name='typeinlinebuffer' value='typeinlinebuffer'/>
+ <cd:command name='typing' value='typing'/>
<cd:command name='unitmeaning' value='betekenis'/>
<cd:command name='unknown' value='onbekend'/>
+ <cd:command name='unregisterhyphenationpattern' value='unregisterhyphenationpattern'/>
<cd:command name='useJSscripts' value='gebruikJSscripts'/>
<cd:command name='useURL' value='gebruikURL'/>
<cd:command name='useXMLfilter' value='gebruikXMLfilter'/>
<cd:command name='useblocks' value='gebruikblokken'/>
+ <cd:command name='usebodyfont' value='usebodyfont'/>
+ <cd:command name='usebodyfontparameter' value='usebodyfontparameter'/>
<cd:command name='usecommands' value='gebruikcommandos'/>
<cd:command name='useencoding' value='usecodering'/>
<cd:command name='useexternaldocument' value='gebruikexterndocument'/>
@@ -2016,10 +2218,12 @@
<cd:command name='usetypescript' value='gebruiktypescript'/>
<cd:command name='usetypescriptfile' value='gebruiktypescriptfile'/>
<cd:command name='useurl' value='gebruikurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='versie'/>
<cd:command name='vl' value='vl'/>
<cd:command name='weekday' value='weekdag'/>
<cd:command name='whitespace' value='witruimte'/>
+ <cd:command name='widthspanningtext' value='widthspanningtext'/>
<cd:command name='wordright' value='woordrechts'/>
<cd:command name='writebetweenlist' value='schrijftussenlijst'/>
<cd:command name='writetolist' value='schrijfnaarlijst'/>
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-pe.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-pe.xml
index 9f18d633dcf..d4fbccd2120 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-pe.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-pe.xml
@@ -131,6 +131,9 @@
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='cap'/>
<cd:variable name='capital' value='capital'/>
+ <cd:variable name='category' value='category'/>
+ <cd:variable name='cd:character' value='cd:character'/>
+ <cd:variable name='cd:font' value='cd:font'/>
<cd:variable name='center' value='مرکز'/>
<cd:variable name='centerlast' value='centerlast'/>
<cd:variable name='chapter' value='Ùصل'/>
@@ -189,6 +192,7 @@
<cd:variable name='external' value='خارجی'/>
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='fact'/>
+ <cd:variable name='fallback' value='fallback'/>
<cd:variable name='february' value='Ùوریه'/>
<cd:variable name='field' value='field'/>
<cd:variable name='figure' value='Ø´Ú©Ù„'/>
@@ -210,6 +214,7 @@
<cd:variable name='flushouter' value='پمپ‌خارجی'/>
<cd:variable name='flushright' value='پمپ‌راست'/>
<cd:variable name='followingpage' value='followingpage'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='ته‌برگ'/>
<cd:variable name='footnote' value='پانوشت'/>
<cd:variable name='force' value='اجبار'/>
@@ -281,6 +286,7 @@
<cd:variable name='intermezzo' value='میان‌پرده'/>
<cd:variable name='intext' value='درون‌متن'/>
<cd:variable name='intro' value='پیشگÙتار'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='ایتالیک'/>
<cd:variable name='italicbold' value='مشکی‌ایتالیک'/>
<cd:variable name='item' value='آیتم'/>
@@ -384,6 +390,7 @@
<cd:variable name='nonumber' value='بدون‌شماره'/>
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='نرمال'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='بدون‌Ùضاگذاری'/>
<cd:variable name='nostopper' value='nostopper'/>
<cd:variable name='not' value='بدون'/>
@@ -451,6 +458,7 @@
<cd:variable name='rectangular' value='چهارگوشه'/>
<cd:variable name='reference' value='مرجع'/>
<cd:variable name='referral' value='مراجعه'/>
+ <cd:variable name='region' value='region'/>
<cd:variable name='register' value='ثبت'/>
<cd:variable name='regular' value='منظم'/>
<cd:variable name='relative' value='نسبی'/>
@@ -635,6 +643,7 @@
<cd:constant name='afterkey' value='بعدازکلید'/>
<cd:constant name='aftersection' value='aftersection'/>
<cd:constant name='align' value='تنظیم'/>
+ <cd:constant name='alignbottom' value='alignbottom'/>
<cd:constant name='aligncharacter' value='حرÙ‌تنظیم'/>
<cd:constant name='alignmentcharacter' value='حرÙ‌تنظیم‌کردن'/>
<cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
@@ -771,6 +780,9 @@
<cd:constant name='deepnumbercommand' value='Ùرمان‌شماره‌عمیق'/>
<cd:constant name='deeptextcommand' value='Ùرمان‌متن‌عمیق'/>
<cd:constant name='default' value='پیش‌Ùرض'/>
+ <cd:constant name='defaultheight' value='defaultheight'/>
+ <cd:constant name='defaultwidth' value='defaultwidth'/>
+ <cd:constant name='define' value='define'/>
<cd:constant name='delay' value='تاخیر'/>
<cd:constant name='depth' value='عمق'/>
<cd:constant name='depthcorrection' value='تصحیح‌عمق'/>
@@ -810,8 +822,10 @@
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='عامل'/>
<cd:constant name='fallback' value='عقب‌ریختن'/>
+ <cd:constant name='fallbacks' value='fallbacks'/>
<cd:constant name='family' value='خانواده'/>
<cd:constant name='features' value='features'/>
+ <cd:constant name='featureset' value='featureset'/>
<cd:constant name='fences' value='fences'/>
<cd:constant name='field' value='field'/>
<cd:constant name='fieldbackgroundcolor' value='رنگ‌پس‌زمینه‌میدان'/>
@@ -832,6 +846,7 @@
<cd:constant name='focusin' value='تمرکزدرون'/>
<cd:constant name='focusoffset' value='focusoffset'/>
<cd:constant name='focusout' value='تمرکزبیرون'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='ته‌برگ'/>
<cd:constant name='footerdistance' value='Ùاصله‌ته‌برگ'/>
<cd:constant name='footerstate' value='وضعیت‌ته‌برگ'/>
@@ -886,6 +901,7 @@
<cd:constant name='increment' value='اÙزایش'/>
<cd:constant name='incrementnumber' value='شماره‌اÙزایش'/>
<cd:constant name='indenting' value='تورÙتگی'/>
+ <cd:constant name='indentlist' value='indentlist'/>
<cd:constant name='indentnext' value='متن‌تورÙته'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='اندیکاتور'/>
@@ -913,7 +929,10 @@
<cd:constant name='keys' value='keys'/>
<cd:constant name='keyword' value='کلید‌واژه'/>
<cd:constant name='label' value='برچسب'/>
+ <cd:constant name='labelalternative' value='labelalternative'/>
+ <cd:constant name='labelcolor' value='labelcolor'/>
<cd:constant name='labeloffset' value='labeloffset'/>
+ <cd:constant name='labelstyle' value='labelstyle'/>
<cd:constant name='language' value='language'/>
<cd:constant name='last' value='last'/>
<cd:constant name='lastnamesep' value='lastnamesep'/>
@@ -947,6 +966,7 @@
<cd:constant name='limittext' value='مرزمتن'/>
<cd:constant name='line' value='خط'/>
<cd:constant name='linecorrection' value='تصحیح‌خط'/>
+ <cd:constant name='linedirection' value='linedirection'/>
<cd:constant name='lines' value='خطها'/>
<cd:constant name='list' value='لیست'/>
<cd:constant name='listtext' value='متن‌لیست'/>
@@ -1087,6 +1107,7 @@
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='بگذار'/>
<cd:constant name='placehead' value='بگذارسر'/>
+ <cd:constant name='placeholder' value='placeholder'/>
<cd:constant name='placestopper' value='بگذارایست'/>
<cd:constant name='position' value='موقعیت'/>
<cd:constant name='prefix' value='پیشوند'/>
@@ -1105,6 +1126,7 @@
<cd:constant name='print' value='print'/>
<cd:constant name='printable' value='قابل‌چاپ'/>
<cd:constant name='process' value='پردازش'/>
+ <cd:constant name='processors' value='processors'/>
<cd:constant name='profile' value='profile'/>
<cd:constant name='properties' value='properties'/>
<cd:constant name='pubsep' value='pubsep'/>
@@ -1118,6 +1140,7 @@
<cd:constant name='reference' value='مرجع'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='مراجعه'/>
<cd:constant name='region' value='region'/>
<cd:constant name='regionin' value='ناحیه‌درون'/>
@@ -1362,7 +1385,6 @@
<!-- definitions for interface commands for language pe -->
<cd:commands>
- <cd:command name='CAPPED' value='CAP'/>
<cd:command name='Character' value='Character'/>
<cd:command name='Characters' value='Characters'/>
<cd:command name='MONTH' value='MONTH'/>
@@ -1376,8 +1398,18 @@
<cd:command name='Word' value='Word'/>
<cd:command name='Words' value='Words'/>
<cd:command name='about' value='درمورد'/>
+ <cd:command name='adaptfontfeature' value='adaptfontfeature'/>
<cd:command name='adaptlayout' value='تنظیم‌طرح‌بندی'/>
+ <cd:command name='addfeature' value='addfeature'/>
+ <cd:command name='alignbottom' value='alignbottom'/>
+ <cd:command name='aligned' value='aligned'/>
+ <cd:command name='alignedbox' value='alignedbox'/>
+ <cd:command name='alignedline' value='alignedline'/>
+ <cd:command name='alignhere' value='alignhere'/>
<cd:command name='alignment' value='alignment'/>
+ <cd:command name='alignmentcharacter' value='alignmentcharacter'/>
+ <cd:command name='applytocharacters' value='applytocharacters'/>
+ <cd:command name='applytofirstcharacter' value='applytofirstcharacter'/>
<cd:command name='arg' value='اÙزودن'/>
<cd:command name='at' value='در'/>
<cd:command name='atleftmargin' value='درحاشیه‌چپ'/>
@@ -1389,9 +1421,13 @@
<cd:command name='blackrules' value='خطهای‌سیاه'/>
<cd:command name='blank' value='خالی'/>
<cd:command name='bookmark' value='چوبخط'/>
+ <cd:command name='bottombox' value='bottombox'/>
<cd:command name='bottomdistance' value='Ùاصله‌پایین'/>
<cd:command name='bottomheight' value='ارتÙاع‌پایین'/>
+ <cd:command name='bottomleftbox' value='bottomleftbox'/>
+ <cd:command name='bottomrightbox' value='bottomrightbox'/>
<cd:command name='bottomspace' value='Ùضای‌پایین'/>
+ <cd:command name='buildtextbottomdot' value='buildtextbottomdot'/>
<cd:command name='but' value='اما'/>
<cd:command name='button' value='دکمه'/>
<cd:command name='bypassblocks' value='عبوربلوکها'/>
@@ -1430,8 +1466,11 @@
<cd:command name='defineblock' value='تعریÙ‌بلوک'/>
<cd:command name='definebodyfont' value='تعریÙ‌قلم‌متن'/>
<cd:command name='definebodyfontenvironment' value='تعریÙ‌محیط‌قلم‌بدنه'/>
+ <cd:command name='definebodyfontswitch' value='definebodyfontswitch'/>
<cd:command name='definebuffer' value='تعریÙ‌باÙر'/>
<cd:command name='definecharacter' value='تعریÙ‌حرÙ'/>
+ <cd:command name='definecharacterkerning' value='definecharacterkerning'/>
+ <cd:command name='definecharacterspacing' value='definecharacterspacing'/>
<cd:command name='definecolor' value='تعریÙ‌رنگ'/>
<cd:command name='definecolorgroup' value='تعریÙ‌گروه‌رنگ'/>
<cd:command name='definecolumnbreak' value='تعریÙ‌شکستن‌ستون'/>
@@ -1441,37 +1480,57 @@
<cd:command name='definecommand' value='تعریÙ‌Ùرمان'/>
<cd:command name='defineconversion' value='تعریÙ‌تبدیل'/>
<cd:command name='definedescription' value='تعریÙ‌شرح'/>
+ <cd:command name='definedfont' value='definedfont'/>
<cd:command name='defineenumeration' value='تعریÙ‌شماره‌بندی'/>
+ <cd:command name='definefallbackfamily' value='definefallbackfamily'/>
<cd:command name='definefield' value='تعریÙ‌میدان'/>
<cd:command name='definefieldstack' value='تعریÙ‌توده‌میدان'/>
<cd:command name='definefiguresymbol' value='تعریÙ‌نمادشکل'/>
+ <cd:command name='definefilefallback' value='definefilefallback'/>
+ <cd:command name='definefirstline' value='definefirstline'/>
<cd:command name='definefloat' value='تعریÙ‌شناور'/>
<cd:command name='definefont' value='تعریÙ‌قلم'/>
+ <cd:command name='definefontalternative' value='definefontalternative'/>
+ <cd:command name='definefontfallback' value='definefontfallback'/>
+ <cd:command name='definefontfamily' value='definefontfamily'/>
+ <cd:command name='definefontfamilypreset' value='definefontfamilypreset'/>
+ <cd:command name='definefontfeature' value='definefontfeature'/>
+ <cd:command name='definefontfile' value='definefontfile'/>
+ <cd:command name='definefontsize' value='definefontsize'/>
+ <cd:command name='definefontsolution' value='definefontsolution'/>
<cd:command name='definefontstyle' value='تعریÙ‌سبک‌قلم'/>
<cd:command name='definefontsynonym' value='تعریÙ‌مترادÙ‌قلم'/>
<cd:command name='defineframed' value='تعریÙ‌قالبی'/>
<cd:command name='defineframedtext' value='تعریÙ‌متن‌قالبی'/>
+ <cd:command name='definefrozenfont' value='definefrozenfont'/>
<cd:command name='definehbox' value='تعریÙ‌جعبه‌‌اÙÙ‚ÛŒ'/>
<cd:command name='definehead' value='تعریÙ‌سر'/>
+ <cd:command name='definehyphenationfeatures' value='definehyphenationfeatures'/>
<cd:command name='defineindentedtext' value='defineindentedtext'/>
<cd:command name='defineinmargin' value='تعریÙ‌درون‌حاشیه'/>
<cd:command name='defineinteractionmenu' value='تعریÙ‌منوی‌پانل'/>
<cd:command name='defineitemgroup' value='تعریÙ‌گروه‌آیتم'/>
+ <cd:command name='defineitems' value='defineitems'/>
<cd:command name='definelabel' value='تعریÙ‌برچسب'/>
<cd:command name='definelayer' value='تعریÙ‌لایه'/>
<cd:command name='definelayout' value='تعریÙ‌طرح‌بندی'/>
+ <cd:command name='definelinenote' value='definelinenote'/>
<cd:command name='definelist' value='تعریÙ‌لیست'/>
<cd:command name='definelogo' value='تعریÙ‌آرم'/>
<cd:command name='definemainfield' value='تعریÙ‌میدان‌اصلی'/>
<cd:command name='definemakeup' value='تعریÙ‌آرایش'/>
<cd:command name='definemarking' value='تعریÙ‌نشانه‌گذاری'/>
<cd:command name='definemathalignment' value='تعریÙ‌تنظیم‌ریاضی'/>
+ <cd:command name='definemode' value='definemode'/>
+ <cd:command name='definenamedcolor' value='definenamedcolor'/>
+ <cd:command name='definenote' value='definenote'/>
<cd:command name='defineoutput' value='تعریÙ‌خروجی'/>
<cd:command name='defineoverlay' value='تعریÙ‌پوشش'/>
<cd:command name='definepagebreak' value='تعریÙ‌شکست‌صÙحه'/>
<cd:command name='definepalet' value='تعریÙ‌لوح'/>
<cd:command name='definepapersize' value='تعریÙ‌اندازه‌برگ'/>
<cd:command name='defineparagraphs' value='تعریÙ‌پاراگراÙها'/>
+ <cd:command name='defineperiodkerning' value='defineperiodkerning'/>
<cd:command name='defineplacement' value='تعریÙ‌جانشانی'/>
<cd:command name='defineprofile' value='تعریÙ‌پروÙایل'/>
<cd:command name='defineprogram' value='تعریÙ‌برنامه'/>
@@ -1493,33 +1552,45 @@
<cd:command name='definetabulate' value='تعریÙ‌جدول‌بندی'/>
<cd:command name='definetext' value='تعریÙ‌متن'/>
<cd:command name='definetextbackground' value='definetextbackground'/>
+ <cd:command name='definetextnote' value='definetextnote'/>
<cd:command name='definetextposition' value='تعریÙ‌مکان‌متن'/>
<cd:command name='definetextvariable' value='تعریÙ‌متغیرمتن'/>
<cd:command name='definetype' value='تعریÙ‌تایپ'/>
<cd:command name='definetyping' value='تعریÙ‌تایپ‌کردن'/>
<cd:command name='defineversion' value='تعریÙ‌نسخه'/>
+ <cd:command name='depthspanningtext' value='depthspanningtext'/>
<cd:command name='determineheadnumber' value='تعیین‌شماره‌سر'/>
<cd:command name='determinelistcharacteristics' value='تعیین‌مشخصات‌لیست'/>
<cd:command name='determineregistercharacteristics' value='تعیین‌مشخصات‌ثبت'/>
<cd:command name='dimension' value='بعد'/>
<cd:command name='disableinteractionmenu' value='ازکارانداختن‌منوی‌پانل'/>
+ <cd:command name='disablemode' value='disablemode'/>
+ <cd:command name='doaddfeature' value='doaddfeature'/>
<cd:command name='domicile' value='مسکن'/>
+ <cd:command name='dontconvertfont' value='dontconvertfont'/>
<cd:command name='donttest' value='امتحان‌نکن'/>
<cd:command name='edgedistance' value='Ùاصله‌لبه'/>
<cd:command name='edgewidth' value='عرض‌لبه'/>
+ <cd:command name='emphasisboldface' value='emphasisboldface'/>
<cd:command name='emptylines' value='خطها‌خالی'/>
+ <cd:command name='enablemode' value='enablemode'/>
<cd:command name='environment' value='محیط'/>
<cd:command name='externalfigure' value='شکل‌خارجی'/>
<cd:command name='fact' value='حقیقت'/>
+ <cd:command name='fastswitchtobodyfont' value='fastswitchtobodyfont'/>
+ <cd:command name='feature' value='feature'/>
<cd:command name='field' value='میدان'/>
<cd:command name='fieldstack' value='میدان‌پشته'/>
<cd:command name='fillinfield' value='درج‌درمیدان'/>
<cd:command name='fillinline' value='درج‌درخط'/>
<cd:command name='fillinrules' value='درج‌درخطها'/>
<cd:command name='fillintext' value='درج‌درمتن'/>
+ <cd:command name='firstcharacter' value='firstcharacter'/>
<cd:command name='fitfield' value='پرکردن‌میدان'/>
+ <cd:command name='fittopbaselinegrid' value='fittopbaselinegrid'/>
<cd:command name='fixedspace' value='Ùضای‌ثابت'/>
<cd:command name='fixedspaces' value='Ùضاهای‌ثابت'/>
+ <cd:command name='flushnotes' value='flushnotes'/>
<cd:command name='followprofile' value='پیروی‌پروÙایل'/>
<cd:command name='followprofileversion' value='پیروی‌نسخه‌پروÙایل'/>
<cd:command name='followversion' value='پیروی‌نسخه'/>
@@ -1528,13 +1599,19 @@
<cd:command name='footnote' value='پانوشت'/>
<cd:command name='footnotetext' value='متن‌پانوشت'/>
<cd:command name='forceblocks' value='اجباربلوکها'/>
+ <cd:command name='forcecharacterstripping' value='forcecharacterstripping'/>
<cd:command name='formulanumber' value='شماره‌Ùرمول'/>
<cd:command name='fraction' value='کسر'/>
<cd:command name='framed' value='قالبی'/>
<cd:command name='from' value='از'/>
+ <cd:command name='fromlinenote' value='fromlinenote'/>
<cd:command name='getbuffer' value='دریاÙت‌باÙر'/>
+ <cd:command name='getfirstcharacter' value='getfirstcharacter'/>
<cd:command name='getmarking' value='دریاÙت‌نشانه'/>
<cd:command name='getnumber' value='دریاÙت‌شماره'/>
+ <cd:command name='globaldisablemode' value='globaldisablemode'/>
+ <cd:command name='globalenablemode' value='globalenablemode'/>
+ <cd:command name='globalpreventmode' value='globalpreventmode'/>
<cd:command name='godown' value='بروپایین'/>
<cd:command name='goto' value='بروبه'/>
<cd:command name='gotobox' value='بروبه‌جعبه'/>
@@ -1550,6 +1627,7 @@
<cd:command name='headnumber' value='شماره‌سر'/>
<cd:command name='headsym' value='نمادسر'/>
<cd:command name='headtext' value='متن‌سر'/>
+ <cd:command name='heightspanningtext' value='heightspanningtext'/>
<cd:command name='hideblocks' value='بلوکها‌پنهان'/>
<cd:command name='high' value='بلند'/>
<cd:command name='hl' value='خ‌ا'/>
@@ -1581,26 +1659,37 @@
<cd:command name='interactionbuttons' value='دکمه‌پانل'/>
<cd:command name='interactionmenu' value='منوی‌پانل'/>
<cd:command name='item' value='آیتم'/>
+ <cd:command name='itemgroup' value='itemgroup'/>
<cd:command name='items' value='آیتمها'/>
+ <cd:command name='itemtag' value='itemtag'/>
<cd:command name='its' value='its'/>
<cd:command name='keepblocks' value='Ø­Ùظ‌بلوکها'/>
+ <cd:command name='kerncharacters' value='kerncharacters'/>
<cd:command name='label' value='برچسب'/>
<cd:command name='labels' value='برچسبها'/>
<cd:command name='labeltext' value='متن‌برچسب'/>
<cd:command name='language' value='زبان'/>
+ <cd:command name='languageCharacters' value='languageCharacters'/>
+ <cd:command name='languagecharacters' value='languagecharacters'/>
<cd:command name='leftaligned' value='چپ‌چین'/>
+ <cd:command name='leftbottombox' value='leftbottombox'/>
<cd:command name='leftedgedistance' value='Ùاصله‌لبه‌چپ'/>
<cd:command name='leftedgewidth' value='عرض‌لبه‌چپ'/>
+ <cd:command name='leftline' value='leftline'/>
<cd:command name='leftmargindistance' value='Ùاصله‌حاشیه‌چپ'/>
<cd:command name='leftmarginwidth' value='عرض‌حاشیه‌چپ'/>
<cd:command name='leg' value='پا'/>
<cd:command name='linecorrection' value='linecorrection'/>
+ <cd:command name='linenote' value='linenote'/>
+ <cd:command name='linespanningtext' value='linespanningtext'/>
<cd:command name='linewidth' value='عرض‌خط'/>
<cd:command name='listheight' value='ارتÙاع‌خط'/>
<cd:command name='listlength' value='طول‌لیست'/>
<cd:command name='listsymbol' value='نمادلیست'/>
<cd:command name='listwidth' value='عرض‌لیست'/>
+ <cd:command name='loadfontgoodies' value='loadfontgoodies'/>
<cd:command name='localfootnotes' value='localfootnotes'/>
+ <cd:command name='localnotes' value='localnotes'/>
<cd:command name='logfields' value='میدانهای‌گزارش'/>
<cd:command name='lohi' value='پابا'/>
<cd:command name='low' value='پایین'/>
@@ -1631,6 +1720,7 @@
<cd:command name='nodimension' value='بدون‌بعد'/>
<cd:command name='noheaderandfooterlines' value='بدون‌خط‌سروته‌برگ'/>
<cd:command name='noindenting' value='بدون‌تورÙتگی'/>
+ <cd:command name='noitem' value='noitem'/>
<cd:command name='nolist' value='بدون‌لیست'/>
<cd:command name='nomarking' value='بدون‌نشانه‌گذاری'/>
<cd:command name='nomoreblocks' value='بدون‌بلوکهای‌بیشتر'/>
@@ -1638,6 +1728,7 @@
<cd:command name='nop' value='منÙÛŒ'/>
<cd:command name='nospace' value='بدون‌Ùضا'/>
<cd:command name='note' value='یادداشت'/>
+ <cd:command name='notesymbol' value='notesymbol'/>
<cd:command name='notopandbottomlines' value='بدون‌خط‌بالاوپایین'/>
<cd:command name='notsmallcapped' value='سرپوش‌کوچک‌نه'/>
<cd:command name='nowhitespace' value='بدون‌Ùضای‌سÙید'/>
@@ -1649,6 +1740,7 @@
<cd:command name='outermarginwidth' value='عرض‌حاشیه‌خارجی'/>
<cd:command name='packed' value='Ùشرده'/>
<cd:command name='page' value='صÙحه'/>
+ <cd:command name='pagebreak' value='pagebreak'/>
<cd:command name='pagedepth' value='عمق‌صÙحه'/>
<cd:command name='pagenumber' value='شماره‌صÙحه'/>
<cd:command name='pageoffset' value='Ø¢Ùست‌صÙحه'/>
@@ -1667,7 +1759,10 @@
<cd:command name='placelist' value='درج‌لیست'/>
<cd:command name='placelistofsynonyms' value='placelistofsynonyms'/>
<cd:command name='placelocalfootnotes' value='درج‌پانوشتهای‌موضعی'/>
+ <cd:command name='placelocalnotes' value='placelocalnotes'/>
<cd:command name='placelogos' value='درج‌آرمها'/>
+ <cd:command name='placenamedfloat' value='placenamedfloat'/>
+ <cd:command name='placenotes' value='placenotes'/>
<cd:command name='placeongrid' value='درج‌در‌توری'/>
<cd:command name='placeontopofeachother' value='درج‌در‌بالای‌یکدیگر'/>
<cd:command name='placepagenumber' value='درج‌شماره‌صÙحه'/>
@@ -1680,9 +1775,17 @@
<cd:command name='placetextvariable' value='درج‌متغیرمتن'/>
<cd:command name='position' value='مکان'/>
<cd:command name='positiontext' value='مکان‌متن'/>
+ <cd:command name='postponenotes' value='postponenotes'/>
+ <cd:command name='postponingnotes' value='postponingnotes'/>
+ <cd:command name='predefinedfont' value='predefinedfont'/>
+ <cd:command name='predefinefont' value='predefinefont'/>
+ <cd:command name='presetdocument' value='presetdocument'/>
+ <cd:command name='prettyprintbuffer' value='prettyprintbuffer'/>
+ <cd:command name='preventmode' value='preventmode'/>
<cd:command name='printpaperheight' value='چاپ‌ارتÙاع‌برگ'/>
<cd:command name='printpaperwidth' value='چاپ‌عرض‌برگ'/>
<cd:command name='processblocks' value='بلوکهای‌پردازش'/>
+ <cd:command name='processbodyfontenvironmentlist' value='processbodyfontenvironmentlist'/>
<cd:command name='processpage' value='صÙحه‌پردازش'/>
<cd:command name='product' value='تولید'/>
<cd:command name='program' value='برنامه'/>
@@ -1692,19 +1795,45 @@
<cd:command name='quote' value='نقل'/>
<cd:command name='ran' value='ran'/>
<cd:command name='redo' value='انجام‌دوباره'/>
+ <cd:command name='redoconvertfont' value='redoconvertfont'/>
<cd:command name='ref' value='رج'/>
<cd:command name='reference' value='مرجع'/>
<cd:command name='referral' value='رجوع'/>
<cd:command name='referraldate' value='تاریخ‌رجوع'/>
<cd:command name='referring' value='مراجعه'/>
+ <cd:command name='registerfontclass' value='registerfontclass'/>
+ <cd:command name='registerhyphenationexception' value='registerhyphenationexception'/>
+ <cd:command name='registerhyphenationpattern' value='registerhyphenationpattern'/>
<cd:command name='remark' value='توجه'/>
+ <cd:command name='replacefeature' value='replacefeature'/>
<cd:command name='reset' value='بازنشانی'/>
+ <cd:command name='resetandaddfeature' value='resetandaddfeature'/>
+ <cd:command name='resetcharacteralign' value='resetcharacteralign'/>
+ <cd:command name='resetcharacterkerning' value='resetcharacterkerning'/>
+ <cd:command name='resetcharacterspacing' value='resetcharacterspacing'/>
+ <cd:command name='resetcharacterstripping' value='resetcharacterstripping'/>
+ <cd:command name='resetfeature' value='resetfeature'/>
+ <cd:command name='resetfontcolorsheme' value='resetfontcolorsheme'/>
+ <cd:command name='resetfontfallback' value='resetfontfallback'/>
+ <cd:command name='resetfontsolution' value='resetfontsolution'/>
+ <cd:command name='resethyphenationfeatures' value='resethyphenationfeatures'/>
+ <cd:command name='resetlocalfloats' value='resetlocalfloats'/>
<cd:command name='resetmarking' value='بازنشانی‌نشانه‌گذاری'/>
+ <cd:command name='resetmode' value='resetmode'/>
<cd:command name='resetnumber' value='بازنشانی‌شماره'/>
- <cd:command name='resettext' value='بازنشانی‌متن'/>
+ <cd:command name='resetpath' value='resetpath'/>
+ <cd:command name='resetperiodkerning' value='resetperiodkerning'/>
+ <cd:command name='resetsystemmode' value='resetsystemmode'/>
+ <cd:command name='resettextcontent' value='بازنشانی‌متن'/>
+ <cd:command name='resetvisualizers' value='resetvisualizers'/>
+ <cd:command name='restoreglobalbodyfont' value='restoreglobalbodyfont'/>
+ <cd:command name='retestfeature' value='retestfeature'/>
+ <cd:command name='revivefeature' value='revivefeature'/>
<cd:command name='rightaligned' value='تنظیم‌راست'/>
+ <cd:command name='rightbottombox' value='rightbottombox'/>
<cd:command name='rightedgedistance' value='Ùاصله‌لبه‌راست'/>
<cd:command name='rightedgewidth' value='عرض‌لبه‌راست'/>
+ <cd:command name='rightline' value='rightline'/>
<cd:command name='rightmargindistance' value='Ùاصله‌حاشیه‌راست'/>
<cd:command name='rightmarginwidth' value='عرض‌حاشیه‌راست'/>
<cd:command name='romannumerals' value='اعدادلاتین'/>
@@ -1715,12 +1844,38 @@
<cd:command name='selectblocks' value='انتخاب‌بلوکها'/>
<cd:command name='selectpaper' value='انتخاب‌برگ'/>
<cd:command name='selectversion' value='انتخاب‌نسخه'/>
+ <cd:command name='setbigbodyfont' value='setbigbodyfont'/>
+ <cd:command name='setcharacteralign' value='setcharacteralign'/>
+ <cd:command name='setcharacteraligndetail' value='setcharacteraligndetail'/>
+ <cd:command name='setcharactercasing' value='setcharactercasing'/>
+ <cd:command name='setcharactercleaning' value='setcharactercleaning'/>
+ <cd:command name='setcharacterkerning' value='setcharacterkerning'/>
+ <cd:command name='setcharacterspacing' value='setcharacterspacing'/>
+ <cd:command name='setcharacterstripping' value='setcharacterstripping'/>
+ <cd:command name='setcurrentfontclass' value='setcurrentfontclass'/>
+ <cd:command name='setfirstline' value='setfirstline'/>
+ <cd:command name='setfirstpasscharacteralign' value='setfirstpasscharacteralign'/>
+ <cd:command name='setfont' value='setfont'/>
+ <cd:command name='setfontcolorsheme' value='setfontcolorsheme'/>
+ <cd:command name='setfontfeature' value='setfontfeature'/>
+ <cd:command name='setfontsolution' value='setfontsolution'/>
+ <cd:command name='setfontstrut' value='setfontstrut'/>
+ <cd:command name='sethyphenationfeatures' value='sethyphenationfeatures'/>
+ <cd:command name='setmainbodyfont' value='setmainbodyfont'/>
+ <cd:command name='setmode' value='setmode'/>
+ <cd:command name='setnote' value='setnote'/>
+ <cd:command name='setnotetext' value='setnotetext'/>
<cd:command name='setnumber' value='تعیین‌شماره'/>
+ <cd:command name='setperiodkerning' value='setperiodkerning'/>
+ <cd:command name='setsecondpasscharacteralign' value='setsecondpasscharacteralign'/>
+ <cd:command name='setsmallbodyfont' value='setsmallbodyfont'/>
+ <cd:command name='setsystemmode' value='setsystemmode'/>
<cd:command name='settextcontent' value='تعیین‌محتوای‌متن'/>
<cd:command name='settextvariable' value='تعیین‌متغیر‌متن'/>
<cd:command name='setupalign' value='بارگذاری‌تنظیم'/>
<cd:command name='setupanswerarea' value='setupanswerarea'/>
<cd:command name='setuparranging' value='بارگذاری‌ترتیب'/>
+ <cd:command name='setupattachment' value='setupattachment'/>
<cd:command name='setupbackground' value='بارگذاری‌پس‌زمینه'/>
<cd:command name='setupbackgrounds' value='بارگذاری‌پس‌زمینه‌ها'/>
<cd:command name='setupblackrules' value='بارگذاری‌خطهای‌سیاه'/>
@@ -1735,6 +1890,9 @@
<cd:command name='setupcapitals' value='setupcapitals'/>
<cd:command name='setupcaption' value='بارگذاری‌شرح'/>
<cd:command name='setupcaptions' value='بارگذاری‌شرحها'/>
+ <cd:command name='setupcharacteralign' value='setupcharacteralign'/>
+ <cd:command name='setupcharacterkerning' value='setupcharacterkerning'/>
+ <cd:command name='setupcharacterspacing' value='setupcharacterspacing'/>
<cd:command name='setupclipping' value='بارگذاری‌چیدن'/>
<cd:command name='setupcolor' value='بارگذاری‌رنگ'/>
<cd:command name='setupcolors' value='بارگذاری‌رنگها'/>
@@ -1745,6 +1903,7 @@
<cd:command name='setupcombinations' value='بارگذاری‌ترکیب‌ها'/>
<cd:command name='setupcombinedlist' value='بارگذاری‌لیست‌ترکیبی'/>
<cd:command name='setupcomment' value='بارگذاری‌توضیح'/>
+ <cd:command name='setupcounter' value='setupcounter'/>
<cd:command name='setupdescription' value='setupdescription'/>
<cd:command name='setupdescriptions' value='بارگذاری‌شرح'/>
<cd:command name='setupenumeration' value='setupenumeration'/>
@@ -1754,9 +1913,14 @@
<cd:command name='setupfields' value='بارگذاری‌میدانها'/>
<cd:command name='setupfillinlines' value='بارگذاری‌پرکردن‌خطها'/>
<cd:command name='setupfillinrules' value='بارگذاری‌درج‌درخطها'/>
+ <cd:command name='setupfirstline' value='setupfirstline'/>
<cd:command name='setupfloat' value='بارگذاری‌شناور'/>
<cd:command name='setupfloats' value='بارگذاری‌شناورها'/>
<cd:command name='setupfloatsplitting' value='بارگذاری‌شکاÙتن‌شناورها'/>
+ <cd:command name='setupfontexpansion' value='setupfontexpansion'/>
+ <cd:command name='setupfontprotrusion' value='setupfontprotrusion'/>
+ <cd:command name='setupfonts' value='setupfonts'/>
+ <cd:command name='setupfontsolution' value='setupfontsolution'/>
<cd:command name='setupfooter' value='بارگذاری‌ته‌برگ'/>
<cd:command name='setupfootertexts' value='بارگذاری‌متن‌پانوشت'/>
<cd:command name='setupfootnotedefinition' value='بارگذاری‌تعریÙ‌پانوشت'/>
@@ -1773,6 +1937,7 @@
<cd:command name='setupheadnumber' value='بارگذاری‌شماره‌سر'/>
<cd:command name='setupheads' value='بارگذاری‌سرها'/>
<cd:command name='setupheadtext' value='بارگذاری‌متن‌سر'/>
+ <cd:command name='setuphyphenation' value='setuphyphenation'/>
<cd:command name='setuphyphenmark' value='بارگذاری‌نشانه‌شکستن'/>
<cd:command name='setupindentedtext' value='setupindentedtext'/>
<cd:command name='setupindenting' value='بارگذاری‌تورÙتگی'/>
@@ -1789,6 +1954,7 @@
<cd:command name='setuplanguage' value='بارگذاری‌زبان'/>
<cd:command name='setuplayout' value='بارگذاری‌طرح‌بندی'/>
<cd:command name='setuplegend' value='بارگذاری‌راهنما'/>
+ <cd:command name='setuplinenote' value='setuplinenote'/>
<cd:command name='setuplinenumbering' value='بارگذاری‌شماره‌‌گذاری‌خط'/>
<cd:command name='setuplines' value='بارگذاری‌خطها'/>
<cd:command name='setuplinewidth' value='بارگذاری‌عرض‌خط'/>
@@ -1801,6 +1967,10 @@
<cd:command name='setupmarking' value='بارگذاری‌نشانه‌گذاری'/>
<cd:command name='setupmathalignment' value='بارگذاری‌تنظیم‌ریاضی'/>
<cd:command name='setupnarrower' value='بارگذاری‌باریکتر'/>
+ <cd:command name='setupnotation' value='setupnotation'/>
+ <cd:command name='setupnotations' value='setupnotations'/>
+ <cd:command name='setupnote' value='setupnote'/>
+ <cd:command name='setupnotes' value='setupnotes'/>
<cd:command name='setupnumber' value='بارگذاری‌شماره'/>
<cd:command name='setupnumbering' value='بارگذاری‌شماره‌گذاری'/>
<cd:command name='setupoppositeplacing' value='بارگذاری‌درج‌مخالÙ'/>
@@ -1814,6 +1984,7 @@
<cd:command name='setuppapersize' value='بارگذاری‌اندازه‌برگ'/>
<cd:command name='setupparagraphnumbering' value='بارگذاری‌شماره‌گذاری‌پاراگراÙ'/>
<cd:command name='setupparagraphs' value='بارگذاری‌پاراگراÙها'/>
+ <cd:command name='setupperiodkerning' value='setupperiodkerning'/>
<cd:command name='setupplacement' value='بارگذاری‌جانشانی'/>
<cd:command name='setuppositioning' value='بارگذاری‌مکان‌گذاری'/>
<cd:command name='setupprofiles' value='بارگذاری‌پروÙایلها'/>
@@ -1843,6 +2014,7 @@
<cd:command name='setuptabulate' value='بارگذاری‌جدول‌بندی'/>
<cd:command name='setuptext' value='بارگذاری‌متن'/>
<cd:command name='setuptextbackground' value='setuptextbackground'/>
+ <cd:command name='setuptextnote' value='setuptextnote'/>
<cd:command name='setuptextposition' value='بارگذاری‌مکان‌متن'/>
<cd:command name='setuptextrules' value='بارگذاری‌خطهای‌متن'/>
<cd:command name='setuptexttexts' value='بارگذاری‌متن‌متنها'/>
@@ -1857,16 +2029,29 @@
<cd:command name='setupurl' value='setupurl'/>
<cd:command name='setupversions' value='بارگذاری‌نسخه‌ها'/>
<cd:command name='setupwhitespace' value='بارگذاری‌Ùضای‌سÙید'/>
+ <cd:command name='setvisualizerfont' value='setvisualizerfont'/>
<cd:command name='showbodyfont' value='نمایش‌قلم‌بدنه'/>
<cd:command name='showbodyfontenvironment' value='نمایش‌محیط‌قلم‌بدنه'/>
<cd:command name='showcolor' value='نمایش‌رنگ'/>
<cd:command name='showcolorgroup' value='نمایش‌گروه‌رنگ'/>
+ <cd:command name='showcounter' value='showcounter'/>
<cd:command name='showexternalfigures' value='نمایش‌شکلهای‌خارجی'/>
<cd:command name='showfields' value='نمایش‌میدانها'/>
+ <cd:command name='showfont' value='showfont'/>
+ <cd:command name='showfontdata' value='showfontdata'/>
+ <cd:command name='showfontexpansion' value='showfontexpansion'/>
+ <cd:command name='showfontitalics' value='showfontitalics'/>
+ <cd:command name='showfontkerns' value='showfontkerns'/>
+ <cd:command name='showfontparameters' value='showfontparameters'/>
+ <cd:command name='showfontstrip' value='showfontstrip'/>
+ <cd:command name='showfontstyle' value='showfontstyle'/>
<cd:command name='showframe' value='نمایش‌قالب'/>
<cd:command name='showgrid' value='نمایش‌توری'/>
+ <cd:command name='showhyphenationtrace' value='showhyphenationtrace'/>
+ <cd:command name='showkerning' value='showkerning'/>
<cd:command name='showlayout' value='نمایش‌طرح‌بندی'/>
<cd:command name='showmakeup' value='نمایش‌آرایش'/>
+ <cd:command name='showminimalbaseline' value='showminimalbaseline'/>
<cd:command name='showpalet' value='نمایش‌لوح'/>
<cd:command name='showprint' value='نمایش‌چاپ'/>
<cd:command name='showsetups' value='نمایش‌بارگذاریها'/>
@@ -1876,6 +2061,7 @@
<cd:command name='someline' value='یک‌خط'/>
<cd:command name='somewhere' value='یک‌جا'/>
<cd:command name='space' value='Ùضا'/>
+ <cd:command name='specialitem' value='specialitem'/>
<cd:command name='splitfloat' value='شکاÙتن‌شناور'/>
<cd:command name='startalignment' value='شروع‌تنظیم'/>
<cd:command name='startbackground' value='شروع‌پس‌زمینه'/>
@@ -1893,6 +2079,7 @@
<cd:command name='startglobal' value='شروع‌سراسری'/>
<cd:command name='startline' value='شروع‌خط'/>
<cd:command name='startlinecorrection' value='شروع‌تصحیح‌خط'/>
+ <cd:command name='startlinenote' value='startlinenote'/>
<cd:command name='startlinenumbering' value='شروع‌شماره‌گذاری‌خط'/>
<cd:command name='startlines' value='شروع‌خطها'/>
<cd:command name='startlocal' value='شروع‌موضعی'/>
@@ -1903,7 +2090,7 @@
<cd:command name='startnarrower' value='شروع‌باریکتر'/>
<cd:command name='startopposite' value='شروع‌مخالÙ'/>
<cd:command name='startoverlay' value='شروع‌پوشش'/>
- <cd:command name='startoverzicht' value='شروع‌بازبینی'/>
+ <cd:command name='startoverview' value='شروع‌بازبینی'/>
<cd:command name='startpacked' value='شروع‌Ùشرده'/>
<cd:command name='startpositioning' value='شروع‌مکان‌گذاری'/>
<cd:command name='startproduct' value='شروع‌تولید'/>
@@ -1935,6 +2122,7 @@
<cd:command name='stopglobal' value='پایان‌سراسری'/>
<cd:command name='stopline' value='پایان‌خط'/>
<cd:command name='stoplinecorrection' value='پایان‌تصحیح‌خط'/>
+ <cd:command name='stoplinenote' value='stoplinenote'/>
<cd:command name='stoplinenumbering' value='پایان‌شماره‌گذاری‌خط'/>
<cd:command name='stoplines' value='پایان‌خطها'/>
<cd:command name='stoplocal' value='پایان‌موضعی'/>
@@ -1945,7 +2133,7 @@
<cd:command name='stopnarrower' value='پایان‌نازکتر'/>
<cd:command name='stopopposite' value='پایان‌مخالÙ'/>
<cd:command name='stopoverlay' value='پایان‌پوشش'/>
- <cd:command name='stopoverzicht' value='پایان‌بازبینی'/>
+ <cd:command name='stopoverview' value='پایان‌بازبینی'/>
<cd:command name='stoppacked' value='پایان‌Ùشرده'/>
<cd:command name='stoppositioning' value='پایان‌مکان‌گذاری'/>
<cd:command name='stopproduct' value='پایان‌تولید'/>
@@ -1962,8 +2150,11 @@
<cd:command name='stopunpacked' value='پایان‌غیرÙشرده'/>
<cd:command name='stopversion' value='پایان‌نسخه'/>
<cd:command name='stretched' value='کشیده'/>
+ <cd:command name='strictinspectnextcharacter' value='strictinspectnextcharacter'/>
+ <cd:command name='stripcharacter' value='stripcharacter'/>
<cd:command name='subformulanumber' value='شماره‌زیرÙرمول'/>
<cd:command name='subpagenumber' value='شماره‌زیرصÙحه'/>
+ <cd:command name='subtractfeature' value='subtractfeature'/>
<cd:command name='switchtobodyfont' value='تغییربه‌قلم‌بدنه'/>
<cd:command name='switchtorawfont' value='تغییربه‌قلم‌خام'/>
<cd:command name='sym' value='نم'/>
@@ -1973,16 +2164,24 @@
<cd:command name='synchronize' value='تطابق'/>
<cd:command name='tab' value='تب'/>
<cd:command name='testcolumn' value='ستون‌امتحان'/>
+ <cd:command name='testfeature' value='testfeature'/>
+ <cd:command name='testfeatureonce' value='testfeatureonce'/>
<cd:command name='testpage' value='صÙحه‌تست'/>
<cd:command name='tex' value='تک'/>
<cd:command name='textbackground' value='textbackground'/>
+ <cd:command name='textcolor' value='textcolor'/>
<cd:command name='textheight' value='ارتÙاع‌متن'/>
+ <cd:command name='textnote' value='textnote'/>
<cd:command name='textreference' value='مرجع‌متن'/>
<cd:command name='textrule' value='خط‌متن'/>
<cd:command name='textvariable' value='متغیر متن'/>
<cd:command name='textwidth' value='عرض‌متن'/>
+ <cd:command name='thefirstcharacter' value='thefirstcharacter'/>
+ <cd:command name='thenormalizedbodyfontsize' value='thenormalizedbodyfontsize'/>
+ <cd:command name='theremainingcharacters' value='theremainingcharacters'/>
<cd:command name='thinrule' value='خط‌نازک'/>
<cd:command name='thinrules' value='خطهای‌نازک'/>
+ <cd:command name='tolinenote' value='tolinenote'/>
<cd:command name='tooltip' value='tooltip'/>
<cd:command name='topdistance' value='Ùاصله‌بالا'/>
<cd:command name='topheight' value='ارتÙاع‌بالا'/>
@@ -1993,13 +2192,19 @@
<cd:command name='typ' value='typ'/>
<cd:command name='type' value='تایپ'/>
<cd:command name='typebuffer' value='تایپ‌باÙر'/>
+ <cd:command name='typedefinedbuffer' value='typedefinedbuffer'/>
<cd:command name='typefile' value='تایپ‌پرونده'/>
+ <cd:command name='typeinlinebuffer' value='typeinlinebuffer'/>
+ <cd:command name='typing' value='typing'/>
<cd:command name='unitmeaning' value='معنی‌واحد'/>
<cd:command name='unknown' value='ناشناس'/>
+ <cd:command name='unregisterhyphenationpattern' value='unregisterhyphenationpattern'/>
<cd:command name='useJSscripts' value='useJSscripts'/>
<cd:command name='useURL' value='useURL'/>
<cd:command name='useXMLfilter' value='useXMLfilter'/>
<cd:command name='useblocks' value='استÙاده‌بلوکها'/>
+ <cd:command name='usebodyfont' value='usebodyfont'/>
+ <cd:command name='usebodyfontparameter' value='usebodyfontparameter'/>
<cd:command name='usecommands' value='استÙاده‌Ùرمانها'/>
<cd:command name='useencoding' value='استÙاده‌رمزینه'/>
<cd:command name='useexternaldocument' value='استÙاده‌نوشتارخارجی'/>
@@ -2016,10 +2221,12 @@
<cd:command name='usetypescript' value='استÙاده‌دستخط‌تایپ'/>
<cd:command name='usetypescriptfile' value='استÙاده‌پرونده‌دستخط‌تایپ'/>
<cd:command name='useurl' value='useurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='نسخه'/>
<cd:command name='vl' value='خ‌ع'/>
<cd:command name='weekday' value='روزهÙته'/>
<cd:command name='whitespace' value='Ùضای‌سÙید'/>
+ <cd:command name='widthspanningtext' value='widthspanningtext'/>
<cd:command name='wordright' value='کلمه‌راست'/>
<cd:command name='writebetweenlist' value='بنویس‌بین‌لیست'/>
<cd:command name='writetolist' value='بنویس‌در‌لیست'/>
diff --git a/Master/texmf-dist/tex/context/interface/mkii/keys-ro.xml b/Master/texmf-dist/tex/context/interface/mkii/keys-ro.xml
index 0bde14e868c..bc9e87ddf20 100644
--- a/Master/texmf-dist/tex/context/interface/mkii/keys-ro.xml
+++ b/Master/texmf-dist/tex/context/interface/mkii/keys-ro.xml
@@ -131,6 +131,9 @@
<cd:variable name='camel' value='camel'/>
<cd:variable name='cap' value='cap'/>
<cd:variable name='capital' value='majuscula'/>
+ <cd:variable name='category' value='category'/>
+ <cd:variable name='cd:character' value='cd:character'/>
+ <cd:variable name='cd:font' value='cd:font'/>
<cd:variable name='center' value='center'/>
<cd:variable name='centerlast' value='centerlast'/>
<cd:variable name='chapter' value='capitol'/>
@@ -189,6 +192,7 @@
<cd:variable name='external' value='extern'/>
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='fapt'/>
+ <cd:variable name='fallback' value='fallback'/>
<cd:variable name='february' value='februarie'/>
<cd:variable name='field' value='field'/>
<cd:variable name='figure' value='figura'/>
@@ -210,6 +214,7 @@
<cd:variable name='flushouter' value='flushouter'/>
<cd:variable name='flushright' value='flushright'/>
<cd:variable name='followingpage' value='followingpage'/>
+ <cd:variable name='font' value='font'/>
<cd:variable name='footer' value='subsol'/>
<cd:variable name='footnote' value='notasubsol'/>
<cd:variable name='force' value='fortat'/>
@@ -281,6 +286,7 @@
<cd:variable name='intermezzo' value='intermezzo'/>
<cd:variable name='intext' value='intext'/>
<cd:variable name='intro' value='intro'/>
+ <cd:variable name='invertedshort' value='invertedshort'/>
<cd:variable name='italic' value='italic'/>
<cd:variable name='italicbold' value='italicaldin'/>
<cd:variable name='item' value='element'/>
@@ -384,6 +390,7 @@
<cd:variable name='nonumber' value='nonumber'/>
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='normal'/>
+ <cd:variable name='normalshort' value='normalshort'/>
<cd:variable name='nospacing' value='nospacing'/>
<cd:variable name='nostopper' value='nostopper'/>
<cd:variable name='not' value='nu'/>
@@ -451,6 +458,7 @@
<cd:variable name='rectangular' value='rectangular'/>
<cd:variable name='reference' value='referinta'/>
<cd:variable name='referral' value='referinta'/>
+ <cd:variable name='region' value='region'/>
<cd:variable name='register' value='registru'/>
<cd:variable name='regular' value='regular'/>
<cd:variable name='relative' value='relativ'/>
@@ -635,6 +643,7 @@
<cd:constant name='afterkey' value='dupatasta'/>
<cd:constant name='aftersection' value='aftersection'/>
<cd:constant name='align' value='aliniere'/>
+ <cd:constant name='alignbottom' value='alignbottom'/>
<cd:constant name='aligncharacter' value='aliniazacaracter'/>
<cd:constant name='alignmentcharacter' value='alierecaracter'/>
<cd:constant name='alignmentleftsample' value='alignmentleftsample'/>
@@ -771,6 +780,9 @@
<cd:constant name='deepnumbercommand' value='deepnumbercommand'/>
<cd:constant name='deeptextcommand' value='deeptextcommand'/>
<cd:constant name='default' value='implicit'/>
+ <cd:constant name='defaultheight' value='defaultheight'/>
+ <cd:constant name='defaultwidth' value='defaultwidth'/>
+ <cd:constant name='define' value='define'/>
<cd:constant name='delay' value='intarziere'/>
<cd:constant name='depth' value='inaltime'/>
<cd:constant name='depthcorrection' value='corectieadancime'/>
@@ -810,8 +822,10 @@
<cd:constant name='extras' value='extras'/>
<cd:constant name='factor' value='factor'/>
<cd:constant name='fallback' value='fallback'/>
+ <cd:constant name='fallbacks' value='fallbacks'/>
<cd:constant name='family' value='familie'/>
<cd:constant name='features' value='features'/>
+ <cd:constant name='featureset' value='featureset'/>
<cd:constant name='fences' value='fences'/>
<cd:constant name='field' value='field'/>
<cd:constant name='fieldbackgroundcolor' value='culoarefundalcamp'/>
@@ -832,6 +846,7 @@
<cd:constant name='focusin' value='focusin'/>
<cd:constant name='focusoffset' value='focusoffset'/>
<cd:constant name='focusout' value='focusout'/>
+ <cd:constant name='font' value='font'/>
<cd:constant name='footer' value='subsol'/>
<cd:constant name='footerdistance' value='distantasubsol'/>
<cd:constant name='footerstate' value='staresubsol'/>
@@ -886,6 +901,7 @@
<cd:constant name='increment' value='increment'/>
<cd:constant name='incrementnumber' value='numarincrement'/>
<cd:constant name='indenting' value='aliniat'/>
+ <cd:constant name='indentlist' value='indentlist'/>
<cd:constant name='indentnext' value='aliniaturmator'/>
<cd:constant name='index' value='index'/>
<cd:constant name='indicator' value='indicator'/>
@@ -913,7 +929,10 @@
<cd:constant name='keys' value='keys'/>
<cd:constant name='keyword' value='keyword'/>
<cd:constant name='label' value='eticheta'/>
+ <cd:constant name='labelalternative' value='labelalternative'/>
+ <cd:constant name='labelcolor' value='labelcolor'/>
<cd:constant name='labeloffset' value='labeloffset'/>
+ <cd:constant name='labelstyle' value='labelstyle'/>
<cd:constant name='language' value='language'/>
<cd:constant name='last' value='last'/>
<cd:constant name='lastnamesep' value='lastnamesep'/>
@@ -947,6 +966,7 @@
<cd:constant name='limittext' value='limittext'/>
<cd:constant name='line' value='linie'/>
<cd:constant name='linecorrection' value='corectielinie'/>
+ <cd:constant name='linedirection' value='linedirection'/>
<cd:constant name='lines' value='linii'/>
<cd:constant name='list' value='lista'/>
<cd:constant name='listtext' value='listtext'/>
@@ -1087,6 +1107,7 @@
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='pune'/>
<cd:constant name='placehead' value='punetitlu'/>
+ <cd:constant name='placeholder' value='placeholder'/>
<cd:constant name='placestopper' value='punestopper'/>
<cd:constant name='position' value='pozitie'/>
<cd:constant name='prefix' value='prefix'/>
@@ -1105,6 +1126,7 @@
<cd:constant name='print' value='print'/>
<cd:constant name='printable' value='tiparibil'/>
<cd:constant name='process' value='process'/>
+ <cd:constant name='processors' value='processors'/>
<cd:constant name='profile' value='profile'/>
<cd:constant name='properties' value='properties'/>
<cd:constant name='pubsep' value='pubsep'/>
@@ -1118,6 +1140,7 @@
<cd:constant name='reference' value='referinta'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='referinta'/>
<cd:constant name='region' value='region'/>
<cd:constant name='regionin' value='regiuneintrare'/>
@@ -1362,7 +1385,6 @@
<!-- definitions for interface commands for language ro -->
<cd:commands>
- <cd:command name='CAPPED' value='KAP'/>
<cd:command name='Character' value='Litera'/>
<cd:command name='Characters' value='Litere'/>
<cd:command name='MONTH' value='LUNA'/>
@@ -1376,8 +1398,18 @@
<cd:command name='Word' value='Cuvant'/>
<cd:command name='Words' value='Cuvinte'/>
<cd:command name='about' value='despre'/>
+ <cd:command name='adaptfontfeature' value='adaptfontfeature'/>
<cd:command name='adaptlayout' value='adapteazaaspect'/>
+ <cd:command name='addfeature' value='addfeature'/>
+ <cd:command name='alignbottom' value='alignbottom'/>
+ <cd:command name='aligned' value='aligned'/>
+ <cd:command name='alignedbox' value='alignedbox'/>
+ <cd:command name='alignedline' value='alignedline'/>
+ <cd:command name='alignhere' value='alignhere'/>
<cd:command name='alignment' value='alignment'/>
+ <cd:command name='alignmentcharacter' value='alignmentcharacter'/>
+ <cd:command name='applytocharacters' value='applytocharacters'/>
+ <cd:command name='applytofirstcharacter' value='applytofirstcharacter'/>
<cd:command name='arg' value='arg'/>
<cd:command name='at' value='la'/>
<cd:command name='atleftmargin' value='atleftmargin'/>
@@ -1389,9 +1421,13 @@
<cd:command name='blackrules' value='liniinegre'/>
<cd:command name='blank' value='blanc'/>
<cd:command name='bookmark' value='semncarte'/>
+ <cd:command name='bottombox' value='bottombox'/>
<cd:command name='bottomdistance' value='distantajos'/>
<cd:command name='bottomheight' value='inaltimejos'/>
+ <cd:command name='bottomleftbox' value='bottomleftbox'/>
+ <cd:command name='bottomrightbox' value='bottomrightbox'/>
<cd:command name='bottomspace' value='spatiujos'/>
+ <cd:command name='buildtextbottomdot' value='buildtextbottomdot'/>
<cd:command name='but' value='but'/>
<cd:command name='button' value='buton'/>
<cd:command name='bypassblocks' value='saripesteblocuri'/>
@@ -1430,8 +1466,11 @@
<cd:command name='defineblock' value='definestebloc'/>
<cd:command name='definebodyfont' value='definestefonttext'/>
<cd:command name='definebodyfontenvironment' value='definestemediulfonttext'/>
+ <cd:command name='definebodyfontswitch' value='definebodyfontswitch'/>
<cd:command name='definebuffer' value='definestebuffer'/>
<cd:command name='definecharacter' value='definestecaracter'/>
+ <cd:command name='definecharacterkerning' value='definecharacterkerning'/>
+ <cd:command name='definecharacterspacing' value='definecharacterspacing'/>
<cd:command name='definecolor' value='definesteculoare'/>
<cd:command name='definecolorgroup' value='definestegrupculori'/>
<cd:command name='definecolumnbreak' value='definecolumnbreak'/>
@@ -1441,37 +1480,57 @@
<cd:command name='definecommand' value='definestecomanda'/>
<cd:command name='defineconversion' value='definesteconversie'/>
<cd:command name='definedescription' value='definestedescriere'/>
+ <cd:command name='definedfont' value='definedfont'/>
<cd:command name='defineenumeration' value='definesteenumerare'/>
+ <cd:command name='definefallbackfamily' value='definefallbackfamily'/>
<cd:command name='definefield' value='definestecamp'/>
<cd:command name='definefieldstack' value='definestestivacampuri'/>
<cd:command name='definefiguresymbol' value='definestesimbolfigura'/>
+ <cd:command name='definefilefallback' value='definefilefallback'/>
+ <cd:command name='definefirstline' value='definefirstline'/>
<cd:command name='definefloat' value='definestefloat'/>
<cd:command name='definefont' value='definestefont'/>
+ <cd:command name='definefontalternative' value='definefontalternative'/>
+ <cd:command name='definefontfallback' value='definefontfallback'/>
+ <cd:command name='definefontfamily' value='definefontfamily'/>
+ <cd:command name='definefontfamilypreset' value='definefontfamilypreset'/>
+ <cd:command name='definefontfeature' value='definefontfeature'/>
+ <cd:command name='definefontfile' value='definefontfile'/>
+ <cd:command name='definefontsize' value='definefontsize'/>
+ <cd:command name='definefontsolution' value='definefontsolution'/>
<cd:command name='definefontstyle' value='definestestilfont'/>
<cd:command name='definefontsynonym' value='definestesinonimfont'/>
<cd:command name='defineframed' value='definesteinconjurare'/>
<cd:command name='defineframedtext' value='definestetextinconjurat'/>
+ <cd:command name='definefrozenfont' value='definefrozenfont'/>
<cd:command name='definehbox' value='definestehbox'/>
<cd:command name='definehead' value='definesteantet'/>
+ <cd:command name='definehyphenationfeatures' value='definehyphenationfeatures'/>
<cd:command name='defineindentedtext' value='defineindentedtext'/>
<cd:command name='defineinmargin' value='defineinmargin'/>
<cd:command name='defineinteractionmenu' value='definestemeniuinteractiune'/>
<cd:command name='defineitemgroup' value='defineitemgroup'/>
+ <cd:command name='defineitems' value='defineitems'/>
<cd:command name='definelabel' value='definesteeticheta'/>
<cd:command name='definelayer' value='definelayer'/>
<cd:command name='definelayout' value='definelayout'/>
+ <cd:command name='definelinenote' value='definelinenote'/>
<cd:command name='definelist' value='definestelista'/>
<cd:command name='definelogo' value='definestelogo'/>
<cd:command name='definemainfield' value='definestecampprincipal'/>
<cd:command name='definemakeup' value='definestemakeup'/>
<cd:command name='definemarking' value='definestemarcaje'/>
<cd:command name='definemathalignment' value='definemathalignment'/>
+ <cd:command name='definemode' value='definemode'/>
+ <cd:command name='definenamedcolor' value='definenamedcolor'/>
+ <cd:command name='definenote' value='definenote'/>
<cd:command name='defineoutput' value='definesteoutput'/>
<cd:command name='defineoverlay' value='definesteoverlay'/>
<cd:command name='definepagebreak' value='definepagebreak'/>
<cd:command name='definepalet' value='definestepaleta'/>
<cd:command name='definepapersize' value='definestedimensiunehartie'/>
<cd:command name='defineparagraphs' value='definesteparagraf'/>
+ <cd:command name='defineperiodkerning' value='defineperiodkerning'/>
<cd:command name='defineplacement' value='defineplacement'/>
<cd:command name='defineprofile' value='definesteprofil'/>
<cd:command name='defineprogram' value='definesteprogram'/>
@@ -1493,33 +1552,45 @@
<cd:command name='definetabulate' value='definestetabulatori'/>
<cd:command name='definetext' value='definestetext'/>
<cd:command name='definetextbackground' value='definetextbackground'/>
+ <cd:command name='definetextnote' value='definetextnote'/>
<cd:command name='definetextposition' value='definestepozitietext'/>
<cd:command name='definetextvariable' value='definestevariabilatext'/>
<cd:command name='definetype' value='definetype'/>
<cd:command name='definetyping' value='definestetyping'/>
<cd:command name='defineversion' value='definesteversiune'/>
+ <cd:command name='depthspanningtext' value='depthspanningtext'/>
<cd:command name='determineheadnumber' value='determinanumartitlu'/>
<cd:command name='determinelistcharacteristics' value='determinacaracteristicilelistei'/>
<cd:command name='determineregistercharacteristics' value='determinacaracteristiciregistru'/>
<cd:command name='dimension' value='dimensiune'/>
<cd:command name='disableinteractionmenu' value='dezactiveazameniuinteractiune'/>
+ <cd:command name='disablemode' value='disablemode'/>
+ <cd:command name='doaddfeature' value='doaddfeature'/>
<cd:command name='domicile' value='domiciliu'/>
+ <cd:command name='dontconvertfont' value='dontconvertfont'/>
<cd:command name='donttest' value='nutesta'/>
<cd:command name='edgedistance' value='distantacolt'/>
<cd:command name='edgewidth' value='latimecolturi'/>
+ <cd:command name='emphasisboldface' value='emphasisboldface'/>
<cd:command name='emptylines' value='emptylines'/>
+ <cd:command name='enablemode' value='enablemode'/>
<cd:command name='environment' value='mediu'/>
<cd:command name='externalfigure' value='figuraexterna'/>
<cd:command name='fact' value='fact'/>
+ <cd:command name='fastswitchtobodyfont' value='fastswitchtobodyfont'/>
+ <cd:command name='feature' value='feature'/>
<cd:command name='field' value='camp'/>
<cd:command name='fieldstack' value='stivacampuri'/>
<cd:command name='fillinfield' value='campumplere'/>
<cd:command name='fillinline' value='linieumplere'/>
<cd:command name='fillinrules' value='rigleumplere'/>
<cd:command name='fillintext' value='textumplere'/>
+ <cd:command name='firstcharacter' value='firstcharacter'/>
<cd:command name='fitfield' value='potrivestecamp'/>
+ <cd:command name='fittopbaselinegrid' value='fittopbaselinegrid'/>
<cd:command name='fixedspace' value='spatiufixat'/>
<cd:command name='fixedspaces' value='spatiifixate'/>
+ <cd:command name='flushnotes' value='flushnotes'/>
<cd:command name='followprofile' value='urmeazaprofil'/>
<cd:command name='followprofileversion' value='urmeazaversiuneprofil'/>
<cd:command name='followversion' value='urmeazaversiune'/>
@@ -1528,13 +1599,19 @@
<cd:command name='footnote' value='notasubsol'/>
<cd:command name='footnotetext' value='footnotetext'/>
<cd:command name='forceblocks' value='forteazablocuri'/>
+ <cd:command name='forcecharacterstripping' value='forcecharacterstripping'/>
<cd:command name='formulanumber' value='numarformula'/>
<cd:command name='fraction' value='fractie'/>
<cd:command name='framed' value='framed'/>
<cd:command name='from' value='din'/>
+ <cd:command name='fromlinenote' value='fromlinenote'/>
<cd:command name='getbuffer' value='adubuffer'/>
+ <cd:command name='getfirstcharacter' value='getfirstcharacter'/>
<cd:command name='getmarking' value='adumarcaje'/>
<cd:command name='getnumber' value='getnumber'/>
+ <cd:command name='globaldisablemode' value='globaldisablemode'/>
+ <cd:command name='globalenablemode' value='globalenablemode'/>
+ <cd:command name='globalpreventmode' value='globalpreventmode'/>
<cd:command name='godown' value='injos'/>
<cd:command name='goto' value='dute'/>
<cd:command name='gotobox' value='dutebox'/>
@@ -1550,6 +1627,7 @@
<cd:command name='headnumber' value='numartitlu'/>
<cd:command name='headsym' value='headsym'/>
<cd:command name='headtext' value='texttitlu'/>
+ <cd:command name='heightspanningtext' value='heightspanningtext'/>
<cd:command name='hideblocks' value='ascundeblocuri'/>
<cd:command name='high' value='inalt'/>
<cd:command name='hl' value='hl'/>
@@ -1581,26 +1659,37 @@
<cd:command name='interactionbuttons' value='butoaneinteractiune'/>
<cd:command name='interactionmenu' value='meniuinteractiune'/>
<cd:command name='item' value='element'/>
+ <cd:command name='itemgroup' value='itemgroup'/>
<cd:command name='items' value='element'/>
+ <cd:command name='itemtag' value='itemtag'/>
<cd:command name='its' value='el'/>
<cd:command name='keepblocks' value='pastreazablocuri'/>
+ <cd:command name='kerncharacters' value='kerncharacters'/>
<cd:command name='label' value='eticheta'/>
<cd:command name='labels' value='etichete'/>
<cd:command name='labeltext' value='texteticheta'/>
<cd:command name='language' value='limba'/>
+ <cd:command name='languageCharacters' value='languageCharacters'/>
+ <cd:command name='languagecharacters' value='languagecharacters'/>
<cd:command name='leftaligned' value='aliniatstanga'/>
+ <cd:command name='leftbottombox' value='leftbottombox'/>
<cd:command name='leftedgedistance' value='distantacoltstanga'/>
<cd:command name='leftedgewidth' value='latimecoltstanga'/>
+ <cd:command name='leftline' value='leftline'/>
<cd:command name='leftmargindistance' value='distantamarginestanga'/>
<cd:command name='leftmarginwidth' value='latimemarginestanga'/>
<cd:command name='leg' value='leg'/>
<cd:command name='linecorrection' value='linecorrection'/>
+ <cd:command name='linenote' value='linenote'/>
+ <cd:command name='linespanningtext' value='linespanningtext'/>
<cd:command name='linewidth' value='grosimelinie'/>
<cd:command name='listheight' value='inaltimelista'/>
<cd:command name='listlength' value='lungimelista'/>
<cd:command name='listsymbol' value='listsymbol'/>
<cd:command name='listwidth' value='latimelista'/>
+ <cd:command name='loadfontgoodies' value='loadfontgoodies'/>
<cd:command name='localfootnotes' value='localfootnotes'/>
+ <cd:command name='localnotes' value='localnotes'/>
<cd:command name='logfields' value='logcampuri'/>
<cd:command name='lohi' value='jossus'/>
<cd:command name='low' value='jos'/>
@@ -1631,6 +1720,7 @@
<cd:command name='nodimension' value='faradimensiune'/>
<cd:command name='noheaderandfooterlines' value='faraliniiantetsisubsol'/>
<cd:command name='noindenting' value='faraaliniat'/>
+ <cd:command name='noitem' value='noitem'/>
<cd:command name='nolist' value='faralista'/>
<cd:command name='nomarking' value='faramarcaje'/>
<cd:command name='nomoreblocks' value='gatablocuri'/>
@@ -1638,6 +1728,7 @@
<cd:command name='nop' value='nop'/>
<cd:command name='nospace' value='faraspatiu'/>
<cd:command name='note' value='nota'/>
+ <cd:command name='notesymbol' value='notesymbol'/>
<cd:command name='notopandbottomlines' value='faraliniisussijos'/>
<cd:command name='notsmallcapped' value='nokap'/>
<cd:command name='nowhitespace' value='faraspatiualb'/>
@@ -1649,6 +1740,7 @@
<cd:command name='outermarginwidth' value='outermarginwidth'/>
<cd:command name='packed' value='impachetat'/>
<cd:command name='page' value='pagina'/>
+ <cd:command name='pagebreak' value='pagebreak'/>
<cd:command name='pagedepth' value='pagedepth'/>
<cd:command name='pagenumber' value='numarpagina'/>
<cd:command name='pageoffset' value='pageoffset'/>
@@ -1667,7 +1759,10 @@
<cd:command name='placelist' value='punelista'/>
<cd:command name='placelistofsynonyms' value='placelistofsynonyms'/>
<cd:command name='placelocalfootnotes' value='punenotesubsollocale'/>
+ <cd:command name='placelocalnotes' value='placelocalnotes'/>
<cd:command name='placelogos' value='punelogouri'/>
+ <cd:command name='placenamedfloat' value='placenamedfloat'/>
+ <cd:command name='placenotes' value='placenotes'/>
<cd:command name='placeongrid' value='plaseazapegrid'/>
<cd:command name='placeontopofeachother' value='punedeasuprafiecareia'/>
<cd:command name='placepagenumber' value='punenumarpagina'/>
@@ -1680,9 +1775,17 @@
<cd:command name='placetextvariable' value='punevariabilatext'/>
<cd:command name='position' value='pozitie'/>
<cd:command name='positiontext' value='pozitietext'/>
+ <cd:command name='postponenotes' value='postponenotes'/>
+ <cd:command name='postponingnotes' value='postponingnotes'/>
+ <cd:command name='predefinedfont' value='predefinedfont'/>
+ <cd:command name='predefinefont' value='predefinefont'/>
+ <cd:command name='presetdocument' value='presetdocument'/>
+ <cd:command name='prettyprintbuffer' value='prettyprintbuffer'/>
+ <cd:command name='preventmode' value='preventmode'/>
<cd:command name='printpaperheight' value='inaltimehartieimprimanta'/>
<cd:command name='printpaperwidth' value='latimehartieimprimanta'/>
<cd:command name='processblocks' value='proceseazabloc'/>
+ <cd:command name='processbodyfontenvironmentlist' value='processbodyfontenvironmentlist'/>
<cd:command name='processpage' value='proceseazapagina'/>
<cd:command name='product' value='produs'/>
<cd:command name='program' value='program'/>
@@ -1692,19 +1795,45 @@
<cd:command name='quote' value='minicitat'/>
<cd:command name='ran' value='ran'/>
<cd:command name='redo' value='refa'/>
+ <cd:command name='redoconvertfont' value='redoconvertfont'/>
<cd:command name='ref' value='ref'/>
<cd:command name='reference' value='referinta'/>
<cd:command name='referral' value='referit'/>
<cd:command name='referraldate' value='datareferit'/>
<cd:command name='referring' value='referring'/>
+ <cd:command name='registerfontclass' value='registerfontclass'/>
+ <cd:command name='registerhyphenationexception' value='registerhyphenationexception'/>
+ <cd:command name='registerhyphenationpattern' value='registerhyphenationpattern'/>
<cd:command name='remark' value='remarca'/>
+ <cd:command name='replacefeature' value='replacefeature'/>
<cd:command name='reset' value='reset'/>
+ <cd:command name='resetandaddfeature' value='resetandaddfeature'/>
+ <cd:command name='resetcharacteralign' value='resetcharacteralign'/>
+ <cd:command name='resetcharacterkerning' value='resetcharacterkerning'/>
+ <cd:command name='resetcharacterspacing' value='resetcharacterspacing'/>
+ <cd:command name='resetcharacterstripping' value='resetcharacterstripping'/>
+ <cd:command name='resetfeature' value='resetfeature'/>
+ <cd:command name='resetfontcolorsheme' value='resetfontcolorsheme'/>
+ <cd:command name='resetfontfallback' value='resetfontfallback'/>
+ <cd:command name='resetfontsolution' value='resetfontsolution'/>
+ <cd:command name='resethyphenationfeatures' value='resethyphenationfeatures'/>
+ <cd:command name='resetlocalfloats' value='resetlocalfloats'/>
<cd:command name='resetmarking' value='reseteazamarcaje'/>
+ <cd:command name='resetmode' value='resetmode'/>
<cd:command name='resetnumber' value='resetnumber'/>
- <cd:command name='resettext' value='resettextcontent'/>
+ <cd:command name='resetpath' value='resetpath'/>
+ <cd:command name='resetperiodkerning' value='resetperiodkerning'/>
+ <cd:command name='resetsystemmode' value='resetsystemmode'/>
+ <cd:command name='resettextcontent' value='resettextcontent'/>
+ <cd:command name='resetvisualizers' value='resetvisualizers'/>
+ <cd:command name='restoreglobalbodyfont' value='restoreglobalbodyfont'/>
+ <cd:command name='retestfeature' value='retestfeature'/>
+ <cd:command name='revivefeature' value='revivefeature'/>
<cd:command name='rightaligned' value='aliniatdreapta'/>
+ <cd:command name='rightbottombox' value='rightbottombox'/>
<cd:command name='rightedgedistance' value='distantacoltdreapta'/>
<cd:command name='rightedgewidth' value='latimecoltdreapta'/>
+ <cd:command name='rightline' value='rightline'/>
<cd:command name='rightmargindistance' value='distantamarginedreapta'/>
<cd:command name='rightmarginwidth' value='latimemarginedreapta'/>
<cd:command name='romannumerals' value='numereromane'/>
@@ -1715,12 +1844,38 @@
<cd:command name='selectblocks' value='selecteazablocuri'/>
<cd:command name='selectpaper' value='selecteazahartie'/>
<cd:command name='selectversion' value='selecteazaversiune'/>
+ <cd:command name='setbigbodyfont' value='setbigbodyfont'/>
+ <cd:command name='setcharacteralign' value='setcharacteralign'/>
+ <cd:command name='setcharacteraligndetail' value='setcharacteraligndetail'/>
+ <cd:command name='setcharactercasing' value='setcharactercasing'/>
+ <cd:command name='setcharactercleaning' value='setcharactercleaning'/>
+ <cd:command name='setcharacterkerning' value='setcharacterkerning'/>
+ <cd:command name='setcharacterspacing' value='setcharacterspacing'/>
+ <cd:command name='setcharacterstripping' value='setcharacterstripping'/>
+ <cd:command name='setcurrentfontclass' value='setcurrentfontclass'/>
+ <cd:command name='setfirstline' value='setfirstline'/>
+ <cd:command name='setfirstpasscharacteralign' value='setfirstpasscharacteralign'/>
+ <cd:command name='setfont' value='setfont'/>
+ <cd:command name='setfontcolorsheme' value='setfontcolorsheme'/>
+ <cd:command name='setfontfeature' value='setfontfeature'/>
+ <cd:command name='setfontsolution' value='setfontsolution'/>
+ <cd:command name='setfontstrut' value='setfontstrut'/>
+ <cd:command name='sethyphenationfeatures' value='sethyphenationfeatures'/>
+ <cd:command name='setmainbodyfont' value='setmainbodyfont'/>
+ <cd:command name='setmode' value='setmode'/>
+ <cd:command name='setnote' value='setnote'/>
+ <cd:command name='setnotetext' value='setnotetext'/>
<cd:command name='setnumber' value='setnumber'/>
+ <cd:command name='setperiodkerning' value='setperiodkerning'/>
+ <cd:command name='setsecondpasscharacteralign' value='setsecondpasscharacteralign'/>
+ <cd:command name='setsmallbodyfont' value='setsmallbodyfont'/>
+ <cd:command name='setsystemmode' value='setsystemmode'/>
<cd:command name='settextcontent' value='settextcontent'/>
<cd:command name='settextvariable' value='setvariabilatext'/>
<cd:command name='setupalign' value='seteazaalinierea'/>
<cd:command name='setupanswerarea' value='setupanswerarea'/>
<cd:command name='setuparranging' value='seteazaaranjareapag'/>
+ <cd:command name='setupattachment' value='setupattachment'/>
<cd:command name='setupbackground' value='seteazafundal'/>
<cd:command name='setupbackgrounds' value='seteazafundaluri'/>
<cd:command name='setupblackrules' value='seteazaliniinegre'/>
@@ -1735,6 +1890,9 @@
<cd:command name='setupcapitals' value='seteazamajuscule'/>
<cd:command name='setupcaption' value='seteazalegenda'/>
<cd:command name='setupcaptions' value='seteazalegendele'/>
+ <cd:command name='setupcharacteralign' value='setupcharacteralign'/>
+ <cd:command name='setupcharacterkerning' value='setupcharacterkerning'/>
+ <cd:command name='setupcharacterspacing' value='setupcharacterspacing'/>
<cd:command name='setupclipping' value='seteazaclipping'/>
<cd:command name='setupcolor' value='seteazaculoare'/>
<cd:command name='setupcolors' value='seteazaculori'/>
@@ -1745,6 +1903,7 @@
<cd:command name='setupcombinations' value='seteazacombinari'/>
<cd:command name='setupcombinedlist' value='seteazalistacombinata'/>
<cd:command name='setupcomment' value='seteazacomentariu'/>
+ <cd:command name='setupcounter' value='setupcounter'/>
<cd:command name='setupdescription' value='setupdescription'/>
<cd:command name='setupdescriptions' value='seteazadescriere'/>
<cd:command name='setupenumeration' value='setupenumeration'/>
@@ -1754,9 +1913,14 @@
<cd:command name='setupfields' value='seteazacampuri'/>
<cd:command name='setupfillinlines' value='seteazaliniiumplere'/>
<cd:command name='setupfillinrules' value='seteazarigleumplere'/>
+ <cd:command name='setupfirstline' value='setupfirstline'/>
<cd:command name='setupfloat' value='seteazafloat'/>
<cd:command name='setupfloats' value='seteazafloats'/>
<cd:command name='setupfloatsplitting' value='seteazaimpartireafloat'/>
+ <cd:command name='setupfontexpansion' value='setupfontexpansion'/>
+ <cd:command name='setupfontprotrusion' value='setupfontprotrusion'/>
+ <cd:command name='setupfonts' value='setupfonts'/>
+ <cd:command name='setupfontsolution' value='setupfontsolution'/>
<cd:command name='setupfooter' value='seteazasubsol'/>
<cd:command name='setupfootertexts' value='seteazatextesubsol'/>
<cd:command name='setupfootnotedefinition' value='seteazadefinireanotasubsol'/>
@@ -1773,6 +1937,7 @@
<cd:command name='setupheadnumber' value='seteazanumartitlu'/>
<cd:command name='setupheads' value='seteazatitluri'/>
<cd:command name='setupheadtext' value='seteazatexttitlu'/>
+ <cd:command name='setuphyphenation' value='setuphyphenation'/>
<cd:command name='setuphyphenmark' value='seteazaliniesilabe'/>
<cd:command name='setupindentedtext' value='setupindentedtext'/>
<cd:command name='setupindenting' value='seteazaaliniat'/>
@@ -1789,6 +1954,7 @@
<cd:command name='setuplanguage' value='setarelimba'/>
<cd:command name='setuplayout' value='seteazaaspect'/>
<cd:command name='setuplegend' value='seteazalegenda'/>
+ <cd:command name='setuplinenote' value='setuplinenote'/>
<cd:command name='setuplinenumbering' value='seteazanumerotarelinii'/>
<cd:command name='setuplines' value='seteazalinii'/>
<cd:command name='setuplinewidth' value='seteazagrosimelinie'/>
@@ -1801,6 +1967,10 @@
<cd:command name='setupmarking' value='seteazamarcaje'/>
<cd:command name='setupmathalignment' value='setupmathalignment'/>
<cd:command name='setupnarrower' value='seteazaingust'/>
+ <cd:command name='setupnotation' value='setupnotation'/>
+ <cd:command name='setupnotations' value='setupnotations'/>
+ <cd:command name='setupnote' value='setupnote'/>
+ <cd:command name='setupnotes' value='setupnotes'/>
<cd:command name='setupnumber' value='setupnumber'/>
<cd:command name='setupnumbering' value='seteazanumerotare'/>
<cd:command name='setupoppositeplacing' value='seteazaplasareaopozita'/>
@@ -1814,6 +1984,7 @@
<cd:command name='setuppapersize' value='seteazadimensiunihartie'/>
<cd:command name='setupparagraphnumbering' value='seteazanumerotareparagrafe'/>
<cd:command name='setupparagraphs' value='seteazaparagrafe'/>
+ <cd:command name='setupperiodkerning' value='setupperiodkerning'/>
<cd:command name='setupplacement' value='setupplacement'/>
<cd:command name='setuppositioning' value='setarepozitie'/>
<cd:command name='setupprofiles' value='seteazaprofile'/>
@@ -1843,6 +2014,7 @@
<cd:command name='setuptabulate' value='seteazatabulatori'/>
<cd:command name='setuptext' value='seteazatext'/>
<cd:command name='setuptextbackground' value='setuptextbackground'/>
+ <cd:command name='setuptextnote' value='setuptextnote'/>
<cd:command name='setuptextposition' value='seteazapozitietext'/>
<cd:command name='setuptextrules' value='seteazarigletext'/>
<cd:command name='setuptexttexts' value='seteazatextetext'/>
@@ -1857,16 +2029,29 @@
<cd:command name='setupurl' value='seteazaurl'/>
<cd:command name='setupversions' value='seteazaversiuni'/>
<cd:command name='setupwhitespace' value='seteazaspatiualb'/>
+ <cd:command name='setvisualizerfont' value='setvisualizerfont'/>
<cd:command name='showbodyfont' value='afiseazafonttext'/>
<cd:command name='showbodyfontenvironment' value='afiseazamediufonttext'/>
<cd:command name='showcolor' value='afiseazaculoare'/>
<cd:command name='showcolorgroup' value='afiseazagrupculoare'/>
+ <cd:command name='showcounter' value='showcounter'/>
<cd:command name='showexternalfigures' value='afiseazafiguriexterne'/>
<cd:command name='showfields' value='afiseazacampuri'/>
+ <cd:command name='showfont' value='showfont'/>
+ <cd:command name='showfontdata' value='showfontdata'/>
+ <cd:command name='showfontexpansion' value='showfontexpansion'/>
+ <cd:command name='showfontitalics' value='showfontitalics'/>
+ <cd:command name='showfontkerns' value='showfontkerns'/>
+ <cd:command name='showfontparameters' value='showfontparameters'/>
+ <cd:command name='showfontstrip' value='showfontstrip'/>
+ <cd:command name='showfontstyle' value='showfontstyle'/>
<cd:command name='showframe' value='afiseazarama'/>
<cd:command name='showgrid' value='afiseazagrid'/>
+ <cd:command name='showhyphenationtrace' value='showhyphenationtrace'/>
+ <cd:command name='showkerning' value='showkerning'/>
<cd:command name='showlayout' value='afiseazaaspect'/>
<cd:command name='showmakeup' value='afiseazamakeup'/>
+ <cd:command name='showminimalbaseline' value='showminimalbaseline'/>
<cd:command name='showpalet' value='afiseazapaleta'/>
<cd:command name='showprint' value='afiseazatiparire'/>
<cd:command name='showsetups' value='afiseazasetari'/>
@@ -1876,6 +2061,7 @@
<cd:command name='someline' value='olinie'/>
<cd:command name='somewhere' value='undeva'/>
<cd:command name='space' value='spatiu'/>
+ <cd:command name='specialitem' value='specialitem'/>
<cd:command name='splitfloat' value='impartefloat'/>
<cd:command name='startalignment' value='startaliniere'/>
<cd:command name='startbackground' value='startfundal'/>
@@ -1893,6 +2079,7 @@
<cd:command name='startglobal' value='startglobal'/>
<cd:command name='startline' value='startlinie'/>
<cd:command name='startlinecorrection' value='startcorectielinie'/>
+ <cd:command name='startlinenote' value='startlinenote'/>
<cd:command name='startlinenumbering' value='startnumerotarelinii'/>
<cd:command name='startlines' value='startlinii'/>
<cd:command name='startlocal' value='startlocal'/>
@@ -1903,7 +2090,7 @@
<cd:command name='startnarrower' value='startingust'/>
<cd:command name='startopposite' value='startopozit'/>
<cd:command name='startoverlay' value='startoverlay'/>
- <cd:command name='startoverzicht' value='startoverview'/>
+ <cd:command name='startoverview' value='startoverview'/>
<cd:command name='startpacked' value='startimpachetat'/>
<cd:command name='startpositioning' value='startpozitionare'/>
<cd:command name='startproduct' value='startprodus'/>
@@ -1935,6 +2122,7 @@
<cd:command name='stopglobal' value='stopblobal'/>
<cd:command name='stopline' value='stoplinie'/>
<cd:command name='stoplinecorrection' value='stopcorectielinie'/>
+ <cd:command name='stoplinenote' value='stoplinenote'/>
<cd:command name='stoplinenumbering' value='stopnumerotarelinii'/>
<cd:command name='stoplines' value='stoplinii'/>
<cd:command name='stoplocal' value='stoplocal'/>
@@ -1945,7 +2133,7 @@
<cd:command name='stopnarrower' value='stopingust'/>
<cd:command name='stopopposite' value='stopopozit'/>
<cd:command name='stopoverlay' value='stopoverlay'/>
- <cd:command name='stopoverzicht' value='stopoverview'/>
+ <cd:command name='stopoverview' value='stopoverview'/>
<cd:command name='stoppacked' value='stopimpachetat'/>
<cd:command name='stoppositioning' value='stoppozitionare'/>
<cd:command name='stopproduct' value='stopprodus'/>
@@ -1962,8 +2150,11 @@
<cd:command name='stopunpacked' value='stopneimpachetat'/>
<cd:command name='stopversion' value='stopversiune'/>
<cd:command name='stretched' value='intins'/>
+ <cd:command name='strictinspectnextcharacter' value='strictinspectnextcharacter'/>
+ <cd:command name='stripcharacter' value='stripcharacter'/>
<cd:command name='subformulanumber' value='numarsubformula'/>
<cd:command name='subpagenumber' value='subpagenumber'/>
+ <cd:command name='subtractfeature' value='subtractfeature'/>
<cd:command name='switchtobodyfont' value='trecilafonttext'/>
<cd:command name='switchtorawfont' value='trecilafontraw'/>
<cd:command name='sym' value='sim'/>
@@ -1973,16 +2164,24 @@
<cd:command name='synchronize' value='sincronizeaza'/>
<cd:command name='tab' value='tab'/>
<cd:command name='testcolumn' value='testcolumn'/>
+ <cd:command name='testfeature' value='testfeature'/>
+ <cd:command name='testfeatureonce' value='testfeatureonce'/>
<cd:command name='testpage' value='testpage'/>
<cd:command name='tex' value='tex'/>
<cd:command name='textbackground' value='textbackground'/>
+ <cd:command name='textcolor' value='textcolor'/>
<cd:command name='textheight' value='inaltimetext'/>
+ <cd:command name='textnote' value='textnote'/>
<cd:command name='textreference' value='referintatext'/>
<cd:command name='textrule' value='riglatext'/>
<cd:command name='textvariable' value='variabilatext'/>
<cd:command name='textwidth' value='latimetext'/>
+ <cd:command name='thefirstcharacter' value='thefirstcharacter'/>
+ <cd:command name='thenormalizedbodyfontsize' value='thenormalizedbodyfontsize'/>
+ <cd:command name='theremainingcharacters' value='theremainingcharacters'/>
<cd:command name='thinrule' value='liniesubtire'/>
<cd:command name='thinrules' value='liniisubtiri'/>
+ <cd:command name='tolinenote' value='tolinenote'/>
<cd:command name='tooltip' value='tooltip'/>
<cd:command name='topdistance' value='distantasus'/>
<cd:command name='topheight' value='inaltimesus'/>
@@ -1993,13 +2192,19 @@
<cd:command name='typ' value='typ'/>
<cd:command name='type' value='type'/>
<cd:command name='typebuffer' value='scriebuffer'/>
+ <cd:command name='typedefinedbuffer' value='typedefinedbuffer'/>
<cd:command name='typefile' value='typefile'/>
+ <cd:command name='typeinlinebuffer' value='typeinlinebuffer'/>
+ <cd:command name='typing' value='typing'/>
<cd:command name='unitmeaning' value='numeunitate'/>
<cd:command name='unknown' value='necunoscut'/>
+ <cd:command name='unregisterhyphenationpattern' value='unregisterhyphenationpattern'/>
<cd:command name='useJSscripts' value='folosestescriptJS'/>
<cd:command name='useURL' value='folosesteURL'/>
<cd:command name='useXMLfilter' value='useXMLfilter'/>
<cd:command name='useblocks' value='folosestebloc'/>
+ <cd:command name='usebodyfont' value='usebodyfont'/>
+ <cd:command name='usebodyfontparameter' value='usebodyfontparameter'/>
<cd:command name='usecommands' value='folosestecomenzi'/>
<cd:command name='useencoding' value='folosestecodificarea'/>
<cd:command name='useexternaldocument' value='folosestedocumentextern'/>
@@ -2016,10 +2221,12 @@
<cd:command name='usetypescript' value='usetypescript'/>
<cd:command name='usetypescriptfile' value='usetypescriptfile'/>
<cd:command name='useurl' value='folosesteurl'/>
+ <cd:command name='verbatim' value='verbatim'/>
<cd:command name='version' value='versiune'/>
<cd:command name='vl' value='vl'/>
<cd:command name='weekday' value='zidinsaptamana'/>
<cd:command name='whitespace' value='spatiualb'/>
+ <cd:command name='widthspanningtext' value='widthspanningtext'/>
<cd:command name='wordright' value='cuvantdreapta'/>
<cd:command name='writebetweenlist' value='scrieintreliste'/>
<cd:command name='writetolist' value='scrieinlista'/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/context-en.xml b/Master/texmf-dist/tex/context/interface/mkiv/context-en.xml
index 0ebeb7d8777..476e8ee62ac 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/context-en.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/context-en.xml
@@ -2,7 +2,7 @@
<!-- expanded and compacted i-context.xml -->
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
<cd:interface file="i-accent.xml">
- <cd:command file="enco-ini.mkiv" level="style" name="defineaccent">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="defineaccent">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:character"/>
@@ -15,7 +15,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="definecharacter">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="definecharacter">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:character"/>
@@ -25,7 +25,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="definecommand">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="definecommand">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:character"/>
@@ -35,7 +35,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="definemathaccent">
+ <cd:command category="mathematics" file="enco-ini.mkiv" level="style" name="definemathaccent">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:name"/>
@@ -45,7 +45,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildmathaccent">
+ <cd:command category="mathematics" file="enco-ini.mkiv" level="style" name="buildmathaccent">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
@@ -55,7 +55,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildtextaccent">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="buildtextaccent">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
@@ -65,49 +65,49 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildtextmacron">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="buildtextmacron">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildtextbottomdot">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="buildtextbottomdot">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildtextcedilla">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="buildtextcedilla">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildtextognek">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="buildtextognek">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildtextbottomcomma">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="buildtextbottomcomma">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="d">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="d">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="enco-ini.mkiv" level="style" name="buildtextgrave">
+ <cd:command category="language" file="enco-ini.mkiv" level="style" name="buildtextgrave">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
@@ -365,7 +365,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="document" name="wordright">
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="linebreak" level="document" name="wordright">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="right"/>
@@ -374,7 +374,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="simplealignedbox">
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="boxes" level="system" name="simplealignedbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -391,7 +391,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="simplealignedspreadbox">
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="boxes" level="system" name="simplealignedspreadbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -408,7 +408,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="simplealignedboxplus">
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="boxes" level="system" name="simplealignedboxplus">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -428,7 +428,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="simplereversealignedbox">
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="boxes direction" level="system" name="simplereversealignedbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -445,7 +445,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="simplereversealignedboxplus">
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="boxes direction" level="system" name="simplereversealignedboxplus">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -465,7 +465,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="pack-box.mkiv" level="system" name="alignedbox">
+ <cd:command category="alignment" file="pack-box.mkiv" keywords="boxes" level="system" name="alignedbox">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="left"/>
@@ -506,8 +506,8 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="style" name="lefttoright"/>
- <cd:command category="alignment" file="spac-ali.mkiv" level="style" name="righttoleft"/>
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="direction" level="style" name="lefttoright"/>
+ <cd:command category="alignment" file="spac-ali.mkiv" keywords="direction" level="style" name="righttoleft"/>
<cd:command category="alignment" file="spac-ali.mkiv" level="style" name="raggedbottom"/>
<cd:command category="alignment" file="spac-ali.mkiv" level="style" name="alignbottom"/>
<cd:command category="alignment" file="spac-ali.mkiv" level="style" name="baselinebottom"/>
@@ -582,7 +582,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-anchor.xml">
- <cd:command file="pack-box.mkiv" level="style" name="defineanchor">
+ <cd:command category="graphics" file="pack-box.mkiv" level="style" name="defineanchor">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -599,7 +599,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="pack-box.mkiv" level="document" name="anchor">
+ <cd:command category="graphics" file="pack-box.mkiv" level="document" name="anchor">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -616,7 +616,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-attachment.xml">
- <cd:command file="scrn-wid.mkvi" level="style" name="defineattachment">
+ <cd:command category="pdf" file="scrn-wid.mkvi" level="style" name="defineattachment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -629,7 +629,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="scrn-wid.mkvi" level="style" name="setupattachment">
+ <cd:command category="pdf" file="scrn-wid.mkvi" level="style" name="setupattachment">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -704,7 +704,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="scrn-wid.mkvi" level="style" name="setupattachments">
+ <cd:command category="pdf" file="scrn-wid.mkvi" level="style" name="setupattachments">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -714,7 +714,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="scrn-wid.mkvi" level="document" name="registerattachment">
+ <cd:command category="pdf" file="scrn-wid.mkvi" level="document" name="registerattachment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -724,7 +724,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="scrn-wid.mkvi" generated="yes" level="document" name="attachment" variant="instance">
+ <cd:command category="pdf" file="scrn-wid.mkvi" generated="yes" level="document" name="attachment" variant="instance">
<cd:sequence>
<cd:instance value="attachment"/>
</cd:sequence>
@@ -740,7 +740,7 @@
<cd:constant value="attachment"/>
</cd:instances>
</cd:command>
- <cd:command file="scrn-wid.mkvi" generated="yes" level="document" name="attachment" type="environment" variant="instance">
+ <cd:command category="pdf" file="scrn-wid.mkvi" generated="yes" level="document" name="attachment" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="attachment"/>
</cd:sequence>
@@ -756,7 +756,7 @@
<cd:constant value="attachment"/>
</cd:instances>
</cd:command>
- <cd:command file="scrn-wid.mkvi" level="document" name="placeattachments"/>
+ <cd:command category="pdf" file="scrn-wid.mkvi" level="document" name="placeattachments"/>
</cd:interface>
<cd:interface file="i-attribute.xml">
<cd:command category="attribute" file="attr-ini.mkiv" level="system" name="pushattribute">
@@ -856,7 +856,7 @@
<cd:command category="attribute" file="attr-ini.mkiv" level="document" name="showattributes"/>
</cd:interface>
<cd:interface file="i-backend.xml">
- <cd:command catehory="pdf" file="back-ini.mkiv" level="style" name="setupbackend">
+ <cd:command category="pdf" file="back-ini.mkiv" level="style" name="setupbackend">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="export">
@@ -931,6 +931,20 @@
</cd:assignments>
</cd:arguments>
</cd:command>
+ <cd:command category="pdf" file="back-ini.mkxl" level="style" name="setupoutput">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="default"/>
+ <cd:constant type="pdf"/>
+ <cd:constant type="lua"/>
+ <cd:constant type="json"/>
+ <cd:constant type="js"/>
+ <cd:constant type="mps"/>
+ <cd:constant type="none"/>
+ <cd:constant type="empty"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-background.xml">
<cd:command category="background" file="pack-bck.mkvi" level="style" name="definebackground">
@@ -1014,7 +1028,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background colors" file="pack-bck.mkvi" level="document" name="backgroundline">
+ <cd:command category="background" file="pack-bck.mkvi" keywords="colors" level="document" name="backgroundline">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:color"/>
@@ -1069,7 +1083,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background conditional" file="page-bck.mkiv" level="system" name="doifelsesomebackground">
+ <cd:command category="background" file="page-bck.mkiv" keywords="conditional" level="system" name="doifelsesomebackground">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -1082,7 +1096,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background conditional" file="page-bck.mkiv" level="system" name="doifsomebackgroundelse">
+ <cd:command category="background" file="page-bck.mkiv" keywords="conditional" level="system" name="doifsomebackgroundelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -1095,7 +1109,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background conditional" file="page-bck.mkiv" level="system" name="doifsomebackground">
+ <cd:command category="background" file="page-bck.mkiv" keywords="conditional" level="system" name="doifsomebackground">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -1190,6 +1204,10 @@
<cd:parameter name="right">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="repeat">
+ <cd:constant type="yes"/>
+ <cd:constant default="yes" type="no"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -1260,7 +1278,7 @@
<cd:command category="rules" file="node-rul.mkiv" level="style" name="resetbar"/>
</cd:interface>
<cd:interface file="i-blackrule.xml">
- <cd:command category="rules colors" file="pack-mrl.mkiv" level="style" name="setupblackrules">
+ <cd:command category="rules" file="pack-mrl.mkiv" keywords="colors" level="style" name="setupblackrules">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="width">
@@ -1303,14 +1321,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="rules colors" file="pack-mrl.mkiv" level="document" name="blackrule">
+ <cd:command category="rules" file="pack-mrl.mkiv" keywords="colors" level="document" name="blackrule">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupblackrules"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="rules colors" file="pack-mrl.mkiv" level="document" name="blackrules">
+ <cd:command category="rules" file="pack-mrl.mkiv" keywords="colors" level="document" name="blackrules">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupblackrules"/>
@@ -1364,6 +1382,22 @@
<cd:constant method="none" prefix="typeâ£" type="cd:text"/>
<cd:constant method="none" prefix="dataâ£" type="cd:text"/>
<cd:constant method="none" prefix="nameâ£" type="cd:text"/>
+ <cd:constant method="none" prefix="radiusâ£" type="cd:dimension"/>
+ <cd:constant method="none" prefix="cornerâ£" type="cd:text"/>
+ </cd:keywords>
+ <cd:delimiter name="relax"/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="rules" file="node-rul.mkiv" level="style" name="autorule">
+ <cd:arguments>
+ <cd:keywords delimiters="none" list="yes">
+ <cd:constant method="none" prefix="widthâ£" type="cd:dimension"/>
+ <cd:constant method="none" prefix="heightâ£" type="cd:dimension"/>
+ <cd:constant method="none" prefix="depthâ£" type="cd:dimension"/>
+ <cd:constant method="none" prefix="xoffsetâ£" type="cd:dimension"/>
+ <cd:constant method="none" prefix="yoffsetâ£" type="cd:dimension"/>
+ <cd:constant method="none" prefix="leftâ£" type="cd:dimension"/>
+ <cd:constant method="none" prefix="rightâ£" type="cd:dimension"/>
</cd:keywords>
<cd:delimiter name="relax"/>
</cd:arguments>
@@ -1467,13 +1501,7 @@
<cd:constant type="cd:name"/>
</cd:parameter>
<cd:parameter name="align">
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant type="middle"/>
- <cd:constant type="flushleft"/>
- <cd:constant type="flushright"/>
- <cd:constant type="inner"/>
- <cd:constant type="outer"/>
+ <cd:inherit name="setupalign"/>
</cd:parameter>
<cd:parameter name="style">
<cd:constant type="cd:style"/>
@@ -1648,7 +1676,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-boxes.xml">
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doiftext">
+ <cd:command category="strings" file="supp-box.mkiv" keywords="conditional" level="system" name="doiftext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1661,7 +1689,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doifelsetext">
+ <cd:command category="strings" file="supp-box.mkiv" keywords="conditional" level="system" name="doifelsetext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1674,7 +1702,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doiftextelse">
+ <cd:command category="strings" file="supp-box.mkiv" keywords="conditional" level="system" name="doiftextelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1687,7 +1715,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="dowithnextbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="dowithnextbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -1696,21 +1724,21 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="dowithnextboxcs">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="dowithnextboxcs">
<cd:arguments>
<cd:csname/>
<cd:csname/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="nextboxwd"/>
- <cd:command file="supp-box.mkiv" level="system" name="nextboxht"/>
- <cd:command file="supp-box.mkiv" level="system" name="nextboxdp"/>
- <cd:command file="supp-box.mkiv" level="system" name="nextboxhtdp"/>
- <cd:command file="supp-box.mkiv" level="system" name="flushnextbox"/>
- <cd:command file="supp-box.mkiv" level="system" name="nextbox"/>
- <cd:command file="supp-box.mkiv" level="system" name="nextdepth"/>
- <cd:command file="supp-box.mkiv" level="system" name="dowithnextboxcontent">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="nextboxwd"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="nextboxht"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="nextboxdp"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="nextboxhtdp"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="flushnextbox"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="nextbox"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="nextdepth"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="dowithnextboxcontent">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -1722,7 +1750,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="dowithnextboxcontentcs">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="dowithnextboxcontentcs">
<cd:arguments>
<cd:csname/>
<cd:csname/>
@@ -1730,47 +1758,47 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="rlap">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="rlap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="llap">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="llap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="clap">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="clap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="tlap">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="tlap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="blap">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="blap">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="reshapebox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="reshapebox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command begin="beginof" end="endof" file="supp-box.mkiv" level="system" name="shapebox" type="environment"/>
- <cd:command file="supp-box.mkiv" level="system" name="flushshapebox"/>
- <cd:command file="supp-box.mkiv" level="system" name="innerflushshapebox"/>
- <cd:command file="supp-box.mkiv" level="system" name="shapedhbox">
+ <cd:command begin="beginof" category="boxes" end="endof" file="supp-box.mkiv" level="system" name="shapebox" type="environment"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="flushshapebox"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="innerflushshapebox"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="shapedhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="processtokens">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="processtokens">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -1789,7 +1817,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="doboundtext">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="doboundtext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1802,7 +1830,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="limitatetext">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="limitatetext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1815,7 +1843,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="limitatetext" variant="list">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="limitatetext" variant="list">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1828,7 +1856,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="limitatefirstline">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="limitatefirstline">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1841,7 +1869,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="processisolatedchars">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="processisolatedchars">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1849,7 +1877,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="processisolatedwords">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="processisolatedwords">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1857,7 +1885,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytocharacters">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytocharacters">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1865,7 +1893,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytowords">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytowords">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1873,7 +1901,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytosplitstringchar">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytosplitstringchar">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1881,7 +1909,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytosplitstringword">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytosplitstringword">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1889,7 +1917,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytosplitstringline">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytosplitstringline">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1897,7 +1925,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytosplitstringcharspaced">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytosplitstringcharspaced">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1905,7 +1933,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytosplitstringwordspaced">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytosplitstringwordspaced">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1913,7 +1941,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="applytosplitstringlinespaced">
+ <cd:command category="strings" file="supp-box.mkiv" level="system" name="applytosplitstringlinespaced">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -1921,58 +1949,58 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="sbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="sbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="linebox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="linebox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="shiftbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="shiftbox">
<cd:arguments>
<cd:dimension/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="hpackbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hpackbox">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vpackbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vpackbox">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="hpackedbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hpackedbox">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vpackedbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vpackedbox">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="inlinedbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="inlinedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="struttedbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="struttedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="topskippedbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="topskippedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="centeredbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="centeredbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -1980,7 +2008,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="centerednextbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="centerednextbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -1988,7 +2016,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="centerbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="centerbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -1996,7 +2024,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="setrigidcolumnhsize">
+ <cd:command category="columns" file="supp-box.mkiv" level="system" name="setrigidcolumnhsize">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -2009,7 +2037,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="setrigidcolumnbalance">
+ <cd:command category="columns" file="supp-box.mkiv" level="system" name="setrigidcolumnbalance">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2017,11 +2045,11 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vboxtohbox" type="environment"/>
- <cd:command file="supp-box.mkiv" level="system" name="vboxtohboxseparator" type="environment"/>
- <cd:command file="supp-box.mkiv" level="system" name="convertvboxtohbox"/>
- <cd:command file="supp-box.mkiv" level="system" name="hboxestohbox" type="environment"/>
- <cd:command file="supp-box.mkiv" level="system" name="unhhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vboxtohbox" type="environment"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vboxtohboxseparator" type="environment"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="convertvboxtohbox"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hboxestohbox" type="environment"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="unhhbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2033,7 +2061,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="hboxofvbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hboxofvbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2041,7 +2069,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="doifcontent">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="conditional" level="system" name="doifcontent">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -2056,8 +2084,8 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="overlay" type="environment"/>
- <cd:command file="supp-box.mkiv" level="system" name="fakebox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="overlay" type="environment"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="fakebox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2065,7 +2093,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="lbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2073,7 +2101,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="cbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="cbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2081,7 +2109,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="rbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="rbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2089,7 +2117,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="ltop">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="ltop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2097,7 +2125,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="ctop">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="ctop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2105,7 +2133,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="rtop">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="rtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2113,47 +2141,47 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="tbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="tbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="bbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="bbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="lhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="mhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="mhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="rhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="rhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lefthbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="lefthbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="midhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="midhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="righthbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="righthbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="boxofsize">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="boxofsize">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="none" list="yes" optional="yes">
@@ -2162,7 +2190,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="limitatelines">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="limitatelines">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -2175,98 +2203,98 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="fittopbaselinegrid">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="fittopbaselinegrid">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="boxcursor"/>
- <cd:command file="supp-box.mkiv" level="system" name="placedbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="boxcursor"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="placedbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="rightbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="rightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="leftbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="leftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="topbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="topbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="bottombox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="bottombox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lefttopbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="lefttopbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="righttopbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="righttopbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="leftbottombox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="leftbottombox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="rightbottombox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="rightbottombox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="topleftbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="topleftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="toprightbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="toprightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="bottomleftbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="bottomleftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="bottomrightbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="bottomrightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="middlebox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="middlebox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="baselinemiddlebox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="baselinemiddlebox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="baselineleftbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="baselineleftbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="baselinerightbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="baselinerightbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lrtbbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="lrtbbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -2283,12 +2311,12 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="toplinebox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="toplinebox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="setstackbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="setstackbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2299,14 +2327,14 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="initializeboxstack">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="initializeboxstack">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="savebox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="savebox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2317,7 +2345,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="flushbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="flushbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2327,7 +2355,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="restorebox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="restorebox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2337,7 +2365,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="foundbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="foundbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2347,7 +2375,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doifelsebox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="conditional" level="system" name="doifelsebox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2363,7 +2391,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doifboxelse">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="conditional" level="system" name="doifboxelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2379,7 +2407,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="localpushbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="localpushbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2387,7 +2415,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="localpopbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="localpopbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2395,7 +2423,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="globalpushbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="globalpushbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2403,7 +2431,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="globalpopbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="globalpopbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2411,16 +2439,16 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="removedepth"/>
- <cd:command file="supp-box.mkiv" level="system" name="obeydepth"/>
- <cd:command file="supp-box.mkiv" level="system" name="undepthed">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="removedepth"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="obeydepth"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="undepthed">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="removebottomthings"/>
- <cd:command file="supp-box.mkiv" level="system" name="removelastskip"/>
- <cd:command file="supp-box.mkiv" level="system" name="makestrutofbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="removebottomthings"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="removelastskip"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="makestrutofbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2428,7 +2456,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="raisebox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="raisebox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -2437,7 +2465,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lowerbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="alignment" level="system" name="lowerbox">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -2446,17 +2474,17 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="halfwaybox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="halfwaybox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="depthonlybox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="depthonlybox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="naturalhbox">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="naturalhbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2464,7 +2492,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="naturalvbox">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="naturalvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2472,7 +2500,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="naturalvtop">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="naturalvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2480,7 +2508,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="naturalvcenter">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="naturalvcenter">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2488,7 +2516,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="naturalhpack">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="naturalhpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2496,7 +2524,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="naturalvpack">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="naturalvpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2504,7 +2532,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="naturaltpack">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="naturaltpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2512,7 +2540,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="reversehbox">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="reversehbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2520,7 +2548,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="reversevbox">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="reversevbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2528,7 +2556,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="reversevtop">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="reversevtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2536,7 +2564,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="reversehpack">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="reversehpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2544,7 +2572,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="reversevpack">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="reversevpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2552,7 +2580,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-dir.mkiv" level="system" name="reversetpack">
+ <cd:command category="boxes" file="supp-dir.mkiv" level="system" name="reversetpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2560,12 +2588,12 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="frozenhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="frozenhbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="setboxllx">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="setboxllx">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2576,7 +2604,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="setboxlly">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="setboxlly">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2587,7 +2615,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="gsetboxllx">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="gsetboxllx">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2598,7 +2626,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="gsetboxlly">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="gsetboxlly">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2609,7 +2637,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="getboxllx">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="getboxllx">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2617,7 +2645,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="getboxlly">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="getboxlly">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2625,7 +2653,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="directgetboxllx">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="directgetboxllx">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2633,7 +2661,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="directgetboxlly">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="directgetboxlly">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2641,13 +2669,13 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="shownextbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="shownextbox">
<cd:arguments>
<cd:csname/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="spreadhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="spreadhbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2655,7 +2683,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="minimalhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="minimalhbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2663,13 +2691,13 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="nodetostring">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="nodetostring">
<cd:arguments>
<cd:csname/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="getnaturaldimensions">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="getnaturaldimensions">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2677,10 +2705,10 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lastnaturalboxwd"/>
- <cd:command file="supp-box.mkiv" level="system" name="lastnaturalboxht"/>
- <cd:command file="supp-box.mkiv" level="system" name="lastnaturalboxdp"/>
- <cd:command file="supp-box.mkiv" level="system" name="naturalwd">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="lastnaturalboxwd"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="lastnaturalboxht"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="lastnaturalboxdp"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="naturalwd">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2688,7 +2716,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doifelserighttoleftinbox">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="conditional direction" level="system" name="doifelserighttoleftinbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2702,7 +2730,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doifrighttoleftinboxelse">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="conditional direction" level="system" name="doifrighttoleftinboxelse">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2716,15 +2744,15 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="runninghbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="runninghbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command begin="begin" end="end" file="supp-box.mkiv" level="system" name="vbox" type="environment"/>
- <cd:command begin="begin" end="end" file="supp-box.mkiv" level="system" name="hbox" type="environment"/>
- <cd:command begin="begin" end="end" file="supp-box.mkiv" level="system" name="vtop" type="environment"/>
- <cd:command file="supp-box.mkiv" level="system" name="setvboxregister">
+ <cd:command begin="begin" category="boxes" end="end" file="supp-box.mkiv" level="system" name="vbox" type="environment"/>
+ <cd:command begin="begin" category="boxes" end="end" file="supp-box.mkiv" level="system" name="hbox" type="environment"/>
+ <cd:command begin="begin" category="boxes" end="end" file="supp-box.mkiv" level="system" name="vtop" type="environment"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="setvboxregister">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2733,7 +2761,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="sethboxregister">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="sethboxregister">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2742,7 +2770,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="setvtopregister">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="setvtopregister">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2751,7 +2779,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="flushboxregister">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="flushboxregister">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2759,7 +2787,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vboxregister" type="environment">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vboxregister" type="environment">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2767,7 +2795,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="hboxregister" type="environment">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hboxregister" type="environment">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2775,7 +2803,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vtopregister" type="environment">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vtopregister" type="environment">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -2783,7 +2811,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="righttolefthbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="righttolefthbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2791,7 +2819,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="rtlhbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="rtlhbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2799,7 +2827,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="lefttorighthbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="lefttorighthbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2807,7 +2835,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="ltrhbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="ltrhbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2815,7 +2843,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="righttoleftvbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="righttoleftvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2823,7 +2851,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="rtlvbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="rtlvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2831,7 +2859,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="lefttorightvbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="lefttorightvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2839,7 +2867,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="ltrvbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="ltrvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2847,7 +2875,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="righttoleftvtop">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="righttoleftvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2855,7 +2883,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="rtlvtop">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="rtlvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2863,7 +2891,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="lefttorightvtop">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="lefttorightvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2871,7 +2899,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="ltrvtop">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="ltrvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2879,7 +2907,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="autodirhbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="autodirhbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2887,7 +2915,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="autodirvbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="autodirvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2895,7 +2923,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="autodirvtop">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="autodirvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2903,7 +2931,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="leftorrighthbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="leftorrighthbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2911,7 +2939,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="leftorrightvbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="leftorrightvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2919,7 +2947,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ali.mkiv" level="system" name="leftorrightvtop">
+ <cd:command category="boxes" file="spac-ali.mkiv" keywords="direction" level="system" name="leftorrightvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -2927,17 +2955,17 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" level="system" name="ibox">
+ <cd:command category="boxes" file="spac-ali.mkiv" level="system" name="ibox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" level="system" name="obox">
+ <cd:command category="boxes" file="spac-ali.mkiv" level="system" name="obox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" level="system" name="definehbox">
+ <cd:command category="boxes" file="spac-ali.mkiv" level="system" name="definehbox">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -2947,7 +2975,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ali.mkiv" generated="yes" level="system" name="hbox" variant="example">
+ <cd:command category="boxes" file="spac-ali.mkiv" generated="yes" level="system" name="hbox" variant="example">
<cd:sequence>
<cd:string value="hbox"/>
<cd:variable value="box"/>
@@ -2956,8 +2984,8 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="lastlinewidth"/>
- <cd:command file="supp-box.mkiv" level="system" name="putboxincache">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="lastlinewidth"/>
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="putboxincache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2972,7 +3000,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="getboxfromcache">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="getboxfromcache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -2987,7 +3015,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="supp-box.mkiv" level="system" name="doifelseboxincache">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="conditional" level="system" name="doifelseboxincache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -3004,7 +3032,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="copyboxfromcache">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="copyboxfromcache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -3019,7 +3047,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="directboxfromcache">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="directboxfromcache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -3030,7 +3058,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="directcopyboxfromcache">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="directcopyboxfromcache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -3041,14 +3069,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="resetboxesincache">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="resetboxesincache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="putnextboxincache">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="putnextboxincache">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -3061,9 +3089,17 @@
<cd:content/>
</cd:arguments>
</cd:command>
+ <cd:command category="boxes" file="supp-box.lmt" level="system" name="reversevboxcontent">
+ <cd:arguments>
+ <cd:keywords delimiters="none">
+ <cd:constant type="cd:csname"/>
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-buffer.xml">
- <cd:command category="buffer conditional" file="buff-ini.mkiv" level="system" name="doifelsebuffer">
+ <cd:command category="buffer" file="buff-ini.mkiv" keywords="conditional" level="system" name="doifelsebuffer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:buffer"/>
@@ -3076,7 +3112,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="buffer conditional" file="buff-ini.mkiv" level="system" name="doifbufferelse">
+ <cd:command category="buffer" file="buff-ini.mkiv" keywords="conditional" level="system" name="doifbufferelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:buffer"/>
@@ -3242,7 +3278,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="buffer lua" file="buff-ini.mkiv" level="style" name="ctxluabuffer">
+ <cd:command category="buffer" file="buff-ini.mkiv" keywords="lua" level="style" name="ctxluabuffer">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:buffer"/>
@@ -3263,7 +3299,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="buffer verbatim" file="buff-ver.mkiv" level="document" name="typebuffer">
+ <cd:command category="buffer" file="buff-ver.mkiv" keywords="verbatim" level="document" name="typebuffer">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:buffer"/>
@@ -3273,7 +3309,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="buffer verbatim" file="buff-ver.mkiv" generated="yes" level="document" name="typebuffer" variant="instance">
+ <cd:command category="buffer" file="buff-ver.mkiv" generated="yes" keywords="verbatim" level="document" name="typebuffer" variant="instance">
<cd:sequence>
<cd:string value="type"/>
<cd:instance value="buffer"/>
@@ -3284,7 +3320,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="buffer verbatim" file="buff-ver.mkiv" level="system" name="typedefinedbuffer">
+ <cd:command category="buffer" file="buff-ver.mkiv" keywords="verbatim" level="system" name="typedefinedbuffer">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:buffer"/>
@@ -3294,7 +3330,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="buffer verbatim" file="lxml-ini.mkiv" level="style" name="prettyprintbuffer">
+ <cd:command category="buffer" file="lxml-ini.mkiv" keywords="verbatim" level="style" name="prettyprintbuffer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:buffer"/>
@@ -3312,7 +3348,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="buffer verbatim" file="lxml-ini.mkiv" level="style" name="inlineprettyprintbuffer">
+ <cd:command category="buffer" file="lxml-ini.mkiv" keywords="verbatim" level="style" name="inlineprettyprintbuffer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:buffer"/>
@@ -3330,7 +3366,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="buffer verbatim" file="buff-ver.mkiv" level="style" name="typeinlinebuffer">
+ <cd:command category="buffer" file="buff-ver.mkiv" keywords="verbatim" level="style" name="typeinlinebuffer">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:buffer"/>
@@ -3342,7 +3378,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-button.xml">
- <cd:command catehory="pdf" file="scrn-but.mkvi" level="style" name="definebutton">
+ <cd:command category="pdf" file="scrn-but.mkvi" level="style" name="definebutton">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -3355,7 +3391,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-but.mkvi" level="style" name="setupbutton">
+ <cd:command category="pdf" file="scrn-but.mkvi" level="style" name="setupbutton">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -3390,7 +3426,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-but.mkvi" generated="yes" level="document" name="button" variant="example">
+ <cd:command category="pdf" file="scrn-but.mkvi" generated="yes" level="document" name="button" variant="example">
<cd:sequence>
<cd:variable value="button"/>
</cd:sequence>
@@ -3409,7 +3445,7 @@
<cd:constant value="button"/>
</cd:instances>
</cd:command>
- <cd:command catehory="pdf" file="scrn-but.mkvi" level="document" name="button">
+ <cd:command category="pdf" file="scrn-but.mkvi" level="document" name="button">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupbutton"/>
@@ -3422,28 +3458,28 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-but.mkvi" level="style" name="overlaybutton">
+ <cd:command category="pdf" file="scrn-but.mkvi" level="style" name="overlaybutton">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:reference"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-but.mkvi" level="style" name="overlaybutton" variant="direct">
+ <cd:command category="pdf" file="scrn-but.mkvi" level="style" name="overlaybutton" variant="direct">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:reference"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-but.mkvi" level="style" name="MPmenubuttons">
+ <cd:command category="pdf" file="scrn-but.mkvi" level="style" name="MPmenubuttons">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-fld.mkvi" level="style" name="overlayrollbutton">
+ <cd:command category="pdf" file="scrn-fld.mkvi" level="style" name="overlayrollbutton">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:reference"/>
@@ -3453,7 +3489,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-fld.mkvi" level="style" name="definepushbutton">
+ <cd:command category="pdf" file="scrn-fld.mkvi" level="style" name="definepushbutton">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -3463,7 +3499,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-fld.mkvi" level="style" name="pushbutton">
+ <cd:command category="pdf" file="scrn-fld.mkvi" level="style" name="pushbutton">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -3473,7 +3509,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-fld.mkvi" level="style" name="definepushsymbol">
+ <cd:command category="pdf" file="scrn-fld.mkvi" level="style" name="definepushsymbol">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -3485,7 +3521,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-fld.mkvi" level="style" name="rollbutton" variant="interactionmenu">
+ <cd:command category="pdf" file="scrn-fld.mkvi" level="style" name="rollbutton" variant="interactionmenu">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -3501,7 +3537,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catehory="pdf" file="scrn-fld.mkvi" level="style" name="rollbutton" variant="button">
+ <cd:command category="pdf" file="scrn-fld.mkvi" level="style" name="rollbutton" variant="button">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupbutton"/>
@@ -3768,7 +3804,7 @@
<cd:command category="fonts" file="typo-cap.mkiv" level="document" name="randomized" type="environment"/>
</cd:interface>
<cd:interface file="i-catcodes.xml">
- <cd:command category="catcode" file="catc-ctx.mkiv" level="system" name="texcode" type="environment"/>
+ <cd:command category="catcode" file="catc-ctx.mkxl" level="system" name="texcode" type="environment"/>
<cd:command category="catcode" file="catc-ctx.mkiv" level="system" name="contextcode" type="environment"/>
<cd:command category="catcode" file="catc-ctx.mkiv" level="system" name="contextdefinitioncode" type="environment"/>
<cd:command begin="un" category="catcode" end="​" file="catc-def.mkiv" level="system" name="protect" type="environment"/>
@@ -3879,6 +3915,10 @@
<cd:content/>
</cd:arguments>
</cd:command>
+ <cd:command category="catcode" file="math-ini.mkxl" level="document" name="asciimode"/>
+ <cd:command category="catcode" file="math-ini.mkxl" level="document" name="enableasciimode"/>
+ <cd:command category="catcode" file="math-ini.mkxl" level="document" name="asciimode" type="environment"/>
+ <cd:command category="catcode" file="buff-ver.mkiv" level="document" name="literalmode"/>
</cd:interface>
<cd:interface file="i-character.xml">
<cd:command category="characters" file="catc-sym.mkiv" level="document" name="letteropenbrace"/>
@@ -3910,21 +3950,21 @@
<cd:command category="characters" file="catc-sym.mkiv" level="document" name="letterleftbrace"/>
<cd:command category="characters" file="catc-sym.mkiv" level="document" name="letterrightbrace"/>
<cd:command category="characters" file="catc-sym.mkiv" level="document" name="letterexclamationmark"/>
- <cd:command category="characters fonts" file="char-ini.mkiv" level="document" name="utfchar">
+ <cd:command category="characters" file="char-ini.mkiv" keywords="fonts" level="document" name="utfchar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="characters fonts" file="char-ini.mkiv" level="style" name="safechar">
+ <cd:command category="characters" file="char-ini.mkiv" keywords="fonts" level="style" name="safechar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="characters fonts" file="char-ini.mkiv" level="style" name="checkedchar">
+ <cd:command category="characters" file="char-ini.mkiv" keywords="fonts" level="style" name="checkedchar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -3934,14 +3974,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="characters fonts" file="char-ini.mkiv" level="style" name="textormathchar">
+ <cd:command category="characters" file="char-ini.mkiv" keywords="fonts" level="style" name="textormathchar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="characters fonts" file="char-ini.mkiv" level="style" name="textormathchars">
+ <cd:command category="characters" file="char-ini.mkiv" keywords="fonts" level="style" name="textormathchars">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
@@ -4135,12 +4175,12 @@
</cd:command>
</cd:interface>
<cd:interface file="i-chemical.xml">
- <cd:command file="chem-ini.mkiv" level="document" name="molecule">
+ <cd:command category="symbols" file="chem-ini.mkiv" level="document" name="molecule">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="chem-ini.mkiv" level="document" name="chem">
+ <cd:command category="symbols" file="chem-ini.mkiv" level="document" name="chem">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -4357,9 +4397,9 @@
</cd:command>
</cd:interface>
<cd:interface file="i-cleaning.xml">
- <cd:command begin="push" end="pop" file="typo-chr.mkiv" level="system" name="punctuation" type="environment"/>
- <cd:command file="typo-chr.mkiv" level="system" name="removepunctuation"/>
- <cd:command file="typo-chr.mkiv" level="system" name="markcontent">
+ <cd:command begin="push" category="language" end="pop" file="typo-chr.mkiv" level="system" name="punctuation" type="environment"/>
+ <cd:command category="language" file="typo-chr.mkiv" level="system" name="removepunctuation"/>
+ <cd:command category="language" file="typo-chr.mkiv" level="system" name="markcontent">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="reset"/>
@@ -4369,7 +4409,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="typo-chr.mkiv" level="system" name="markedcontent" type="environment">
+ <cd:command category="language" file="typo-chr.mkiv" level="system" name="markedcontent" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="reset"/>
@@ -4378,14 +4418,27 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="typo-chr.mkiv" level="system" name="removemarkedcontent">
+ <cd:command category="language" file="typo-chr.mkiv" level="system" name="removemarkedcontent">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="typo-cln.mkiv" level="system" name="setcharactercleaning">
+ <cd:command category="language" file="typo-chr.mkiv" keywords="conditional" level="system" name="doifelsemarkedcontent">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:true"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:false"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="language" file="typo-cln.mkiv" level="system" name="setcharactercleaning">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
@@ -4668,6 +4721,9 @@
<cd:parameter name="v">
<cd:constant type="cd:number"/>
</cd:parameter>
+ <cd:parameter name="w">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="x">
<cd:constant type="cd:number"/>
</cd:parameter>
@@ -5116,7 +5172,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="colors conditional" file="color-ini.mkiv" level="system" name="doifelsecolor">
+ <cd:command category="colors" file="color-ini.mkiv" keywords="conditional" level="system" name="doifelsecolor">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:color"/>
@@ -5129,7 +5185,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="colors conditional" file="color-ini.mkiv" level="system" name="doifcolorelse">
+ <cd:command category="colors" file="color-ini.mkiv" keywords="conditional" level="system" name="doifcolorelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:color"/>
@@ -5142,7 +5198,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="colors conditional" file="color-ini.mkiv" level="system" name="doifcolor">
+ <cd:command category="colors" file="color-ini.mkiv" keywords="conditional" level="system" name="doifcolor">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:color"/>
@@ -5222,7 +5278,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="colors conditional" file="colo-ini.mkiv" level="system" name="doifelseblack">
+ <cd:command category="colors" file="colo-ini.mkiv" keywords="conditional" level="system" name="doifelseblack">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:color"/>
@@ -5235,7 +5291,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="colors conditional" file="colo-ini.mkiv" level="system" name="doifblackelse">
+ <cd:command category="colors" file="colo-ini.mkiv" keywords="conditional" level="system" name="doifblackelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:color"/>
@@ -5248,7 +5304,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="colors conditional" file="colo-ini.mkiv" level="system" name="doifelsedrawingblack">
+ <cd:command category="colors" file="colo-ini.mkiv" keywords="conditional" level="system" name="doifelsedrawingblack">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -5258,7 +5314,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="colors conditional" file="colo-ini.mkiv" level="system" name="doifdrawingblackelse">
+ <cd:command category="colors" file="colo-ini.mkiv" keywords="conditional" level="system" name="doifdrawingblackelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -5339,6 +5395,60 @@
</cd:arguments>
</cd:command>
</cd:interface>
+ <cd:interface file="i-columns.xml">
+ <cd:command category="tables" file="page-mcl.mkxl" level="style" name="definemulticolumns">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupmulticolumns"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="columns" file="page-mcl.mkxl" level="style" name="setupmulticolumns">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes">
+ <cd:parameter name="n">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="distance">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="direction">
+ <cd:constant default="yes" type="right"/>
+ <cd:constant type="reverse"/>
+ </cd:parameter>
+ <cd:parameter name="balance">
+ <cd:constant default="yes" type="yes"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
+ <cd:parameter name="blank">
+ <cd:inherit name="blank"/>
+ </cd:parameter>
+ <cd:parameter name="align">
+ <cd:inherit name="setupalign"/>
+ </cd:parameter>
+ <cd:parameter name="ntop">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="tables" file="page-mcl.mkxl" level="document" name="multicolumns" type="environment">
+ <cd:arguments>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupmulticolumns"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ </cd:interface>
<cd:interface file="i-combination.xml">
<cd:command category="tables" file="pack-com.mkiv" level="style" name="definecombination">
<cd:arguments>
@@ -5433,7 +5543,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="float tables" file="pack-com.mkiv" level="document" name="floatcombination" type="environment" variant="matrix">
+ <cd:command category="tables" file="pack-com.mkiv" keywords="float" level="document" name="floatcombination" type="environment" variant="matrix">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:matrix"/>
@@ -5441,7 +5551,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="float tables" file="pack-com.mkiv" level="document" name="floatcombination" type="environment">
+ <cd:command category="tables" file="pack-com.mkiv" keywords="float" level="document" name="floatcombination" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupcombination"/>
@@ -5450,7 +5560,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-commandhandler.xml">
- <cd:command file="mult-aux.mkiv" level="system" name="installparameterhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installparameterhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5458,7 +5568,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installrootparameterhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installrootparameterhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5466,7 +5576,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installparameterhashhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installparameterhashhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5474,7 +5584,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installparametersethandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installparametersethandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5482,7 +5592,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installstyleandcolorhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installstyleandcolorhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5490,7 +5600,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdefinehandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdefinehandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5499,7 +5609,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installsetuphandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installsetuphandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5507,7 +5617,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installswitchsetuphandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installswitchsetuphandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5515,7 +5625,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installautosetuphandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installautosetuphandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5523,7 +5633,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installbasicparameterhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installbasicparameterhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5531,7 +5641,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installbasicautosetuphandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installbasicautosetuphandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5540,7 +5650,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installcommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installcommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5549,7 +5659,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installswitchcommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installswitchcommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5558,7 +5668,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installautocommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installautocommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5567,7 +5677,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installsimplecommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installsimplecommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5576,7 +5686,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdirectparameterhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdirectparameterhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5584,7 +5694,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdirectsetuphandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdirectsetuphandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5592,7 +5702,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdirectparametersethandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdirectparametersethandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5600,7 +5710,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdirectstyleandcolorhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdirectstyleandcolorhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5608,7 +5718,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdirectcommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdirectcommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5616,7 +5726,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installsetuponlycommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installsetuponlycommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5624,7 +5734,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="relateparameterhandlers">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="relateparameterhandlers">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -5640,28 +5750,28 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installactionhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installactionhandler">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installnamespace">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installnamespace">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installcorenamespace">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installcorenamespace">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="definenamespace">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="definenamespace">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -5699,8 +5809,8 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="listnamespaces"/>
- <cd:command file="mult-aux.mkiv" level="system" name="showparentchain">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="listnamespaces"/>
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="showparentchain">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5708,7 +5818,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="doifelsecommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" keywords="conditional" level="system" name="doifelsecommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5722,7 +5832,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="doifcommandhandlerelse">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" keywords="conditional" level="system" name="doifcommandhandlerelse">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5736,7 +5846,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="doifcommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" keywords="conditional" level="system" name="doifcommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5747,7 +5857,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="doifnotcommandhandler">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" keywords="conditional" level="system" name="doifnotcommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5758,7 +5868,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdefinitionset">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdefinitionset">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5766,7 +5876,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installdefinitionsetmember">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installdefinitionsetmember">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5778,7 +5888,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installparentinjector">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="installparentinjector">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5786,7 +5896,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="pack-rul.mkiv" level="system" name="installframedcommandhandler">
+ <cd:command category="commandhandler" file="pack-rul.mkiv" level="system" name="installframedcommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5795,7 +5905,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="pack-rul.mkiv" level="system" name="installframedautocommandhandler">
+ <cd:command category="commandhandler" file="pack-rul.mkiv" level="system" name="installframedautocommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5804,7 +5914,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="pack-rul.mkiv" level="system" name="installsimpleframedcommandhandler">
+ <cd:command category="commandhandler" file="pack-rul.mkiv" level="system" name="installsimpleframedcommandhandler">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -5813,12 +5923,12 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installmacrostack">
+ <cd:command category="system" file="mult-aux.mkiv" level="system" name="installmacrostack">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="installglobalmacrostack">
+ <cd:command category="system" file="mult-aux.mkiv" level="system" name="installglobalmacrostack">
<cd:arguments>
<cd:csname/>
</cd:arguments>
@@ -5974,259 +6084,273 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="romannumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="romannumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="Romannumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="Romannumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="abjadnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="abjadnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="abjadnodotnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="abjadnodotnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="abjadnaivenumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="abjadnaivenumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="languagecharacters">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="hebrewnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="languageCharacters">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="yiddishnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="alphabeticnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="languagecharacters">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="Alphabeticnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="languageCharacters">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="thainumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="alphabeticnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="devanagarinumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="Alphabeticnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="gurmurkhinumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="thainumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="gujaratinumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="devanagarinumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="tibetannumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="gurmurkhinumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="greeknumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="gujaratinumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="Greeknumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="tibetannumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="arabicnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="greeknumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="persiannumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="Greeknumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="arabicdecimals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="arabicnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="persiandecimals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="persiannumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="arabicexnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="arabicdecimals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="koreannumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="persiandecimals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="koreannumeralsp">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="arabicexnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="koreannumeralsc">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="koreannumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="koreanparentnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="koreannumeralsp">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="koreancirclenumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="koreannumeralsc">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="chinesenumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="koreanparentnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="chinesecapnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="koreancirclenumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="chineseallnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="chinesenumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="character">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="chinesecapnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="Character">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="chineseallnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="characters">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="character">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="Characters">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="Character">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="core-con.mkiv" level="style" name="monthlong">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="characters">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="core-con.mkiv" level="style" name="monthshort">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="Characters">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="core-con.mkiv" level="style" name="convertmonth">
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="month">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="core-con.mkiv" level="style" name="month">
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="monthlong">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="monthshort">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="convertmonth">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -6268,6 +6392,34 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="daylong">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="dayshort">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="DAYLONG">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" level="style" name="DAYSHORT">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
<cd:command category="counter" file="core-con.mkiv" level="style" name="dayoftheweek">
<cd:arguments>
<cd:keywords delimiters="braces">
@@ -6294,7 +6446,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="core-con.mkiv" level="style" name="doifelseleapyear">
+ <cd:command category="counter" file="core-con.mkiv" keywords="conditional" level="style" name="doifelseleapyear">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -6307,7 +6459,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="core-con.mkiv" level="style" name="doifleapyearelse">
+ <cd:command category="counter" file="core-con.mkiv" keywords="conditional" level="style" name="doifleapyearelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -6340,50 +6492,238 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="document" name="currentdate">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="document" name="definedate">
<cd:arguments>
- <cd:keywords list="yes" optional="yes">
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords list="yes">
<cd:constant type="year"/>
- <cd:constant type="month"/>
- <cd:constant type="day"/>
- <cd:constant type="weekday"/>
+ <cd:constant method="range" prefix="year" type="cd:name"/>
<cd:constant type="y"/>
+ <cd:constant method="range" prefix="y" type="cd:name"/>
<cd:constant type="yy"/>
<cd:constant type="Y"/>
+ <cd:constant method="range" prefix="Y" type="cd:name"/>
+ <cd:constant type="YY"/>
+ <cd:constant type="month"/>
+ <cd:constant type="month:mnem"/>
+ <cd:constant type="month:hebrew"/>
+ <cd:constant type="month:jalali"/>
<cd:constant type="m"/>
+ <cd:constant type="m:mnem"/>
+ <cd:constant type="m:hebrew"/>
+ <cd:constant type="m:jalali"/>
+ <cd:constant type="MONTH"/>
+ <cd:constant type="MONTH:mnem"/>
+ <cd:constant type="MONTH:hebrew"/>
+ <cd:constant type="MONTH:jalali"/>
<cd:constant type="mm"/>
<cd:constant type="M"/>
+ <cd:constant type="day"/>
+ <cd:constant method="range" prefix="day" type="cd:name"/>
+ <cd:constant type="day:+"/>
+ <cd:constant type="day:ord"/>
+ <cd:constant type="day:++"/>
+ <cd:constant type="day:highord"/>
<cd:constant type="d"/>
+ <cd:constant method="range" prefix="d" type="cd:name"/>
+ <cd:constant type="d:+"/>
+ <cd:constant type="d:ord"/>
+ <cd:constant type="d:++"/>
+ <cd:constant type="d:highord"/>
<cd:constant type="dd"/>
+ <cd:constant type="dd:+"/>
+ <cd:constant type="dd:ord"/>
+ <cd:constant type="dd:++"/>
+ <cd:constant type="dd:highord"/>
<cd:constant type="D"/>
+ <cd:constant type="D:+"/>
+ <cd:constant type="D:ord"/>
+ <cd:constant type="D:++"/>
+ <cd:constant type="D:highord"/>
+ <cd:constant type="weekday"/>
+ <cd:constant type="weekday:mnem"/>
+ <cd:constant type="weekday:hebrew"/>
+ <cd:constant type="weekday:jalali"/>
<cd:constant type="w"/>
+ <cd:constant type="w:mnem"/>
+ <cd:constant type="w:hebrew"/>
+ <cd:constant type="w:jalali"/>
+ <cd:constant type="WEEKDAY"/>
+ <cd:constant type="WEEKDAY:mnem"/>
+ <cd:constant type="WEEKDAY:hebrew"/>
+ <cd:constant type="WEEKDAY:jalali"/>
<cd:constant type="W"/>
+ <cd:constant type="referral"/>
<cd:constant type="space"/>
<cd:constant type="\\\\\\\\â£"/>
+ <cd:constant type="cd:text"/>
+ <cd:constant type="hebrew:to"/>
+ <cd:constant type="jalali:to"/>
+ <cd:constant type="jalali:from"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="document" name="currentdate">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="year"/>
+ <cd:constant method="range" prefix="year" type="cd:name"/>
+ <cd:constant type="y"/>
+ <cd:constant method="range" prefix="y" type="cd:name"/>
+ <cd:constant type="yy"/>
+ <cd:constant type="Y"/>
+ <cd:constant method="range" prefix="Y" type="cd:name"/>
+ <cd:constant type="YY"/>
+ <cd:constant type="month"/>
<cd:constant type="month:mnem"/>
+ <cd:constant type="month:hebrew"/>
+ <cd:constant type="month:jalali"/>
+ <cd:constant type="m"/>
<cd:constant type="m:mnem"/>
- <cd:constant type="d:ord"/>
+ <cd:constant type="m:hebrew"/>
+ <cd:constant type="m:jalali"/>
+ <cd:constant type="MONTH"/>
+ <cd:constant type="MONTH:mnem"/>
+ <cd:constant type="MONTH:hebrew"/>
+ <cd:constant type="MONTH:jalali"/>
+ <cd:constant type="mm"/>
+ <cd:constant type="M"/>
+ <cd:constant type="day"/>
+ <cd:constant method="range" prefix="day" type="cd:name"/>
+ <cd:constant type="day:+"/>
<cd:constant type="day:ord"/>
+ <cd:constant type="day:++"/>
+ <cd:constant type="day:highord"/>
+ <cd:constant type="d"/>
+ <cd:constant method="range" prefix="d" type="cd:name"/>
+ <cd:constant type="d:+"/>
+ <cd:constant type="d:ord"/>
+ <cd:constant type="d:++"/>
+ <cd:constant type="d:highord"/>
+ <cd:constant type="dd"/>
+ <cd:constant type="dd:+"/>
<cd:constant type="dd:ord"/>
+ <cd:constant type="dd:++"/>
+ <cd:constant type="dd:highord"/>
+ <cd:constant type="D"/>
+ <cd:constant type="D:+"/>
<cd:constant type="D:ord"/>
- <cd:constant type="cd:text"/>
+ <cd:constant type="D:++"/>
+ <cd:constant type="D:highord"/>
+ <cd:constant type="weekday"/>
+ <cd:constant type="weekday:mnem"/>
+ <cd:constant type="weekday:hebrew"/>
+ <cd:constant type="weekday:jalali"/>
+ <cd:constant type="w"/>
+ <cd:constant type="w:mnem"/>
+ <cd:constant type="w:hebrew"/>
+ <cd:constant type="w:jalali"/>
+ <cd:constant type="WEEKDAY"/>
+ <cd:constant type="WEEKDAY:mnem"/>
+ <cd:constant type="WEEKDAY:hebrew"/>
+ <cd:constant type="WEEKDAY:jalali"/>
+ <cd:constant type="W"/>
<cd:constant type="referral"/>
+ <cd:constant type="space"/>
+ <cd:constant type="\\\\\\\\â£"/>
+ <cd:constant type="cd:text"/>
+ <cd:constant type="hebrew:to"/>
+ <cd:constant type="jalali:to"/>
+ <cd:constant type="jalali:from"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="document" name="currentdate" variant="name">
+ <cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="document" name="date">
+ <cd:arguments>
+ <cd:assignments list="yes">
+ <cd:parameter name="d">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="m">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="y">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ </cd:assignments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="year"/>
+ <cd:constant method="range" prefix="year" type="cd:name"/>
+ <cd:constant type="y"/>
+ <cd:constant method="range" prefix="y" type="cd:name"/>
+ <cd:constant type="yy"/>
+ <cd:constant type="Y"/>
+ <cd:constant method="range" prefix="Y" type="cd:name"/>
+ <cd:constant type="YY"/>
+ <cd:constant type="month"/>
+ <cd:constant type="month:mnem"/>
+ <cd:constant type="month:hebrew"/>
+ <cd:constant type="month:jalali"/>
+ <cd:constant type="m"/>
+ <cd:constant type="m:mnem"/>
+ <cd:constant type="m:hebrew"/>
+ <cd:constant type="m:jalali"/>
+ <cd:constant type="MONTH"/>
+ <cd:constant type="MONTH:mnem"/>
+ <cd:constant type="MONTH:hebrew"/>
+ <cd:constant type="MONTH:jalali"/>
+ <cd:constant type="mm"/>
+ <cd:constant type="M"/>
+ <cd:constant type="day"/>
+ <cd:constant method="range" prefix="day" type="cd:name"/>
<cd:constant type="day:+"/>
+ <cd:constant type="day:ord"/>
<cd:constant type="day:++"/>
+ <cd:constant type="day:highord"/>
+ <cd:constant type="d"/>
+ <cd:constant method="range" prefix="d" type="cd:name"/>
<cd:constant type="d:+"/>
+ <cd:constant type="d:ord"/>
<cd:constant type="d:++"/>
+ <cd:constant type="d:highord"/>
+ <cd:constant type="dd"/>
<cd:constant type="dd:+"/>
+ <cd:constant type="dd:ord"/>
<cd:constant type="dd:++"/>
+ <cd:constant type="dd:highord"/>
+ <cd:constant type="D"/>
<cd:constant type="D:+"/>
+ <cd:constant type="D:ord"/>
<cd:constant type="D:++"/>
- <cd:constant type="month:jalali"/>
- <cd:constant type="m:jalali"/>
+ <cd:constant type="D:highord"/>
+ <cd:constant type="weekday"/>
+ <cd:constant type="weekday:mnem"/>
+ <cd:constant type="weekday:hebrew"/>
+ <cd:constant type="weekday:jalali"/>
+ <cd:constant type="w"/>
+ <cd:constant type="w:mnem"/>
+ <cd:constant type="w:hebrew"/>
+ <cd:constant type="w:jalali"/>
+ <cd:constant type="WEEKDAY"/>
+ <cd:constant type="WEEKDAY:mnem"/>
+ <cd:constant type="WEEKDAY:hebrew"/>
+ <cd:constant type="WEEKDAY:jalali"/>
+ <cd:constant type="W"/>
+ <cd:constant type="referral"/>
+ <cd:constant type="space"/>
+ <cd:constant type="\\\\\\\\â£"/>
+ <cd:constant type="cd:text"/>
+ <cd:constant type="hebrew:to"/>
<cd:constant type="jalali:to"/>
<cd:constant type="jalali:from"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="document" name="date">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="document" name="date" variant="name">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="d">
@@ -6396,8 +6736,8 @@
<cd:constant type="cd:number"/>
</cd:parameter>
</cd:assignments>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="currentdate"/>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
@@ -6459,7 +6799,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="defineconversion" variant="list">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="defineconversion" variant="list">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:language"/>
@@ -6508,6 +6848,8 @@
<cd:constant type="abjadnumerals"/>
<cd:constant type="abjadnodotnumerals"/>
<cd:constant type="abjadnaivenumerals"/>
+ <cd:constant type="hebrewnumerals"/>
+ <cd:constant type="yiddishnumerals"/>
<cd:constant type="thainumerals"/>
<cd:constant type="devanagarinumerals"/>
<cd:constant type="gurmurkhinumerals"/>
@@ -6536,6 +6878,8 @@
<cd:constant type="slovenianNumerals"/>
<cd:constant type="spanishnumerals"/>
<cd:constant type="spanishNumerals"/>
+ <cd:constant type="russiannumerals"/>
+ <cd:constant type="russianNumerals"/>
<cd:constant type="mathgreek"/>
<cd:constant type="setâ£0"/>
<cd:constant type="setâ£1"/>
@@ -6560,7 +6904,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="core-con.mkiv" level="system" name="doifelseconversiondefined">
+ <cd:command category="counter" file="core-con.mkiv" keywords="conditional" level="system" name="doifelseconversiondefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -6573,7 +6917,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="core-con.mkiv" level="system" name="doifconversiondefinedelse">
+ <cd:command category="counter" file="core-con.mkiv" keywords="conditional" level="system" name="doifconversiondefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -6586,7 +6930,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="core-con.mkiv" level="system" name="doifelseconversionnumber">
+ <cd:command category="counter" file="core-con.mkiv" keywords="conditional" level="system" name="doifelseconversionnumber">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -6602,7 +6946,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="core-con.mkiv" level="system" name="doifconversionnumberelse">
+ <cd:command category="counter" file="core-con.mkiv" keywords="conditional" level="system" name="doifconversionnumberelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -6681,28 +7025,42 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="sloveniannumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="sloveniannumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="slovenianNumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="slovenianNumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="spanishnumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="spanishnumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter language" file="core-con.mkiv" level="style" name="spanishNumerals">
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="spanishNumerals">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="russiannumerals">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="core-con.mkiv" keywords="language" level="style" name="russianNumerals">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -6730,9 +7088,65 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="system" file="core-con.mkiv" level="style" name="actualyear"/>
- <cd:command category="system" file="core-con.mkiv" level="style" name="actualmonth"/>
- <cd:command category="system" file="core-con.mkiv" level="style" name="actualday"/>
+ <cd:command category="counter" file="core-con.lua" keywords="system" level="style" name="actualyear"/>
+ <cd:command category="counter" file="core-con.lua" keywords="system" level="style" name="actualmonth"/>
+ <cd:command category="counter" file="core-con.lua" keywords="system" level="style" name="actualday"/>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="lchexnumber">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="uchexnumber">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="lchexnumbers">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="uchexnumbers">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="hexnumber">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="octnumber">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="hexstringtonumber">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="counter" file="syst-con.mkxl" level="style" name="octstringtonumber">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-counter.xml">
<cd:command category="counter" file="strc-num.mkiv" level="system" name="definecounter">
@@ -6757,6 +7171,9 @@
<cd:parameter name="start">
<cd:constant type="cd:number"/>
</cd:parameter>
+ <cd:parameter name="number">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="counter">
<cd:constant type="cd:name"/>
</cd:parameter>
@@ -6854,7 +7271,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifelsecounter">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifelsecounter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -6867,7 +7284,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifcounterelse">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifcounterelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -6880,7 +7297,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifcounter">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifcounter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -6890,7 +7307,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifnotcounter">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifnotcounter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -7189,7 +7606,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifelsedefinedcounter">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifelsedefinedcounter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -7202,7 +7619,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifdefinedcounterelse">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifdefinedcounterelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -7215,7 +7632,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifdefinedcounter">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifdefinedcounter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -7225,7 +7642,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="counter conditional" file="strc-num.mkiv" level="system" name="doifundefinedcounter">
+ <cd:command category="counter" file="strc-num.mkiv" keywords="conditional" level="system" name="doifundefinedcounter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -7731,6 +8148,16 @@
</cd:assignments>
</cd:arguments>
</cd:command>
+ <cd:command category="structure" file="strc-des.mkvi" level="style" name="setupdescriptions">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes">
+ <cd:inherit name="setupdescription"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
<cd:command category="structure" file="strc-des.mkvi" generated="yes" level="document" name="description" type="environment" variant="example">
<cd:sequence>
<cd:variable value="description"/>
@@ -7784,7 +8211,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-digits.xml">
- <cd:command file="typo-dig.mkiv" level="system" name="setdigitsmanipulation">
+ <cd:command category="symbols" file="typo-dig.mkiv" keywords="fonts" level="system" name="setdigitsmanipulation">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
@@ -7792,15 +8219,15 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="typo-dig.mkiv" level="system" name="resetdigitsmanipulation"/>
- <cd:command file="typo-dig.mkiv" level="document" name="equaldigits">
+ <cd:command category="symbols" file="typo-dig.mkiv" keywords="fonts" level="system" name="resetdigitsmanipulation"/>
+ <cd:command category="symbols" file="typo-dig.mkiv" keywords="fonts" level="document" name="equaldigits">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="typo-dig.mkiv" level="document" name="dummydigit"/>
+ <cd:command category="symbols" file="typo-dig.mkiv" keywords="fonts" level="document" name="dummydigit"/>
</cd:interface>
<cd:interface file="i-dimension.xml">
<cd:command file="mult-dim.mkvi" level="system" name="assigndimension">
@@ -7883,7 +8310,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-direction.xml">
- <cd:command category="language alignment" file="typo-dir.mkiv" level="style" name="setupdirections">
+ <cd:command category="language" file="typo-dir.mkiv" keywords="alignment" level="style" name="setupdirections">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="bidi">
@@ -7908,15 +8335,15 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="language alignment" file="typo-dir.mkiv" level="style" name="setdirection">
+ <cd:command category="language" file="typo-dir.mkiv" keywords="alignment" level="style" name="setdirection">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="language alignment" file="typo-dir.mkiv" level="style" name="resetdirection"/>
- <cd:command category="alignment" file="supp-dir.mkiv" level="document" name="showdirsinmargin"/>
+ <cd:command category="language" file="typo-dir.mkiv" keywords="alignment" level="style" name="resetdirection"/>
+ <cd:command category="alignment" file="supp-dir.mkiv" keywords="alignment" level="document" name="showdirsinmargin"/>
</cd:interface>
<cd:interface file="i-document.xml">
<cd:command category="structure" file="file-job.mkvi" level="document" name="text" type="environment"/>
@@ -8076,6 +8503,32 @@
<cd:command category="structure" file="file-job.mkvi" level="system" name="currentcomponent"/>
<cd:command category="structure" file="file-job.mkvi" level="document" name="document" type="environment">
<cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupdocument"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="structure" file="file-job.mkvi" generated="yes" level="document" name="document" type="environment" variant="example">
+ <cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupdocument"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="structure" file="file-job.mkvi" level="style" name="definedocument">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupdocument"/>
</cd:assignments>
@@ -8083,6 +8536,9 @@
</cd:command>
<cd:command category="structure" file="file-job.mkvi" level="style" name="setupdocument">
<cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
<cd:assignments list="yes">
<cd:parameter name="before">
<cd:constant type="cd:command"/>
@@ -8110,6 +8566,9 @@
</cd:command>
<cd:command category="structure" file="file-job.mkvi" level="style" name="presetdocument">
<cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
<cd:assignments list="yes">
<cd:inherit name="setupdocument"/>
</cd:assignments>
@@ -8177,7 +8636,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-dummy.xml">
- <cd:command file="mult-aux.mkiv" level="system" name="getdummyparameters">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="getdummyparameters">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="cd:key">
@@ -8186,21 +8645,21 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="dummyparameter">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="dummyparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="directdummyparameter">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="directdummyparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="setdummyparameter">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="setdummyparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -8210,7 +8669,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-aux.mkiv" level="system" name="letdummyparameter">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" level="system" name="letdummyparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -8218,7 +8677,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="mult-aux.mkiv" level="system" name="usedummystyleandcolor">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" keywords="fonts colors" level="system" name="usedummystyleandcolor">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -8228,14 +8687,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts" file="mult-aux.mkiv" level="system" name="usedummystyleparameter">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" keywords="fonts" level="system" name="usedummystyleparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="colors" file="mult-aux.mkiv" level="system" name="usedummycolorparameter">
+ <cd:command category="commandhandler" file="mult-aux.mkiv" keywords="colors" level="system" name="usedummycolorparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -8765,7 +9224,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-fld.mkvi" level="system" name="doifelsefieldcategory">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="conditional" level="system" name="doifelsefieldcategory">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -8778,7 +9237,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-fld.mkvi" level="system" name="doiffieldcategoryelse">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="conditional" level="system" name="doiffieldcategoryelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -8837,7 +9296,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-fld.mkvi" level="system" name="doifelsefieldbody">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="conditional" level="system" name="doifelsefieldbody">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -8850,7 +9309,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-fld.mkvi" level="system" name="doiffieldbodyelse">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="conditional" level="system" name="doiffieldbodyelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -8927,7 +9386,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf background rules" file="scrn-fld.mkvi" level="document" name="fitfieldframed">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="background rules" level="document" name="fitfieldframed">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -8945,7 +9404,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="pdf background" file="scrn-fld.mkvi" level="style" name="setupfieldlabelframed">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="background" level="style" name="setupfieldlabelframed">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -8955,7 +9414,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="pdf background" file="scrn-fld.mkvi" level="style" name="setupfieldcontentframed">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="background" level="style" name="setupfieldcontentframed">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -8966,7 +9425,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="pdf background" file="scrn-fld.mkvi" level="style" name="setupfieldtotalframed">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="background" level="style" name="setupfieldtotalframed">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -8995,7 +9454,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="pdf background" file="scrn-fld.mkvi" level="style" name="setupfield">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="background" level="style" name="setupfield">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -9018,7 +9477,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="pdf background" file="scrn-fld.mkvi" level="style" name="setupfields">
+ <cd:command category="pdf" file="scrn-fld.mkvi" keywords="background" level="style" name="setupfields">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="reset"/>
@@ -9142,7 +9601,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doiffile">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doiffile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9152,7 +9611,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifnotfile">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifnotfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9162,7 +9621,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifelsefile">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifelsefile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9175,7 +9634,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doiffileelse">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doiffileelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9205,7 +9664,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifelsepath">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifelsepath">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:path"/>
@@ -9218,7 +9677,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifpathelse">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifpathelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:path"/>
@@ -9231,7 +9690,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifelsefileexists">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifelsefileexists">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9244,7 +9703,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doiffileexistselse">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doiffileexistselse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9257,7 +9716,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifelsepathexists">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifelsepathexists">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:path"/>
@@ -9270,7 +9729,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifpathexistselse">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifpathexistselse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:path"/>
@@ -9283,7 +9742,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifelseparentfile">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifelseparentfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9296,7 +9755,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-ini.mkvi" level="system" name="doifparentfileelse">
+ <cd:command category="structure" file="file-ini.mkvi" keywords="conditional" level="system" name="doifparentfileelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9323,7 +9782,7 @@
<cd:command category="structure" file="file-ini.mkvi" level="system" name="splitofftype"/>
<cd:command category="structure" file="file-ini.mkvi" level="system" name="splitoffkind"/>
<cd:command category="structure" file="file-ini.mkvi" level="system" name="splitoffroot"/>
- <cd:command category="structure conditional" file="file-job.mkvi" level="system" name="doifelseinputfile">
+ <cd:command category="structure" file="file-job.mkvi" keywords="conditional" level="system" name="doifelseinputfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9336,7 +9795,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-job.mkvi" level="system" name="doifinputfileelse">
+ <cd:command category="structure" file="file-job.mkvi" keywords="conditional" level="system" name="doifinputfileelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9425,14 +9884,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure lua" file="file-job.mkvi" level="system" name="loadluafile">
+ <cd:command category="structure" file="file-job.mkvi" keywords="lua" level="system" name="loadluafile">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure lua" file="file-job.mkvi" level="system" name="loadcldfile">
+ <cd:command category="structure" file="file-job.mkvi" keywords="lua" level="system" name="loadcldfile">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -9453,14 +9912,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure lua" file="file-job.mkvi" level="system" name="loadluafileonce">
+ <cd:command category="structure" file="file-job.mkvi" keywords="lua" level="system" name="loadluafileonce">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure lua" file="file-job.mkvi" level="system" name="loadcldfileonce">
+ <cd:command category="structure" file="file-job.mkvi" keywords="lua" level="system" name="loadcldfileonce">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -9488,7 +9947,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="readjobfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="readjobfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9501,7 +9960,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="readlocfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="readlocfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9514,7 +9973,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="readsysfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="readsysfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9527,7 +9986,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="readfixfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="readfixfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:path"/>
@@ -9543,7 +10002,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="readsetfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="readsetfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:path"/>
@@ -9559,7 +10018,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="readfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="readfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9579,7 +10038,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="readtexfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="readtexfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9592,7 +10051,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional xml" file="file-res.mkvi" level="system" name="readxmlfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional xml" level="system" name="readxmlfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9605,7 +10064,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="doifelselocfile">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="doifelselocfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9618,7 +10077,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="file-res.mkvi" level="system" name="doiflocfileelse">
+ <cd:command category="structure" file="file-res.mkvi" keywords="conditional" level="system" name="doiflocfileelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -9665,6 +10124,13 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="structure" file="font-ini.mklx" keywords="fonts" level="system" name="usefontpath">
+ <cd:arguments>
+ <cd:keywords list="yes">
+ <cd:constant type="cd:path"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-filler.xml">
<cd:command category="rules" file="spac-flr.mkiv" level="style" name="definefiller">
@@ -9787,104 +10253,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="definelinefiller">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplinefiller"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="setuplinefiller">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes">
- <cd:parameter name="location">
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant default="yes" type="both"/>
- </cd:parameter>
- <cd:parameter name="scope">
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant default="yes" type="local"/>
- </cd:parameter>
- <cd:parameter name="mp">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="height">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="depth">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="distance">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="threshold">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="rulethickness">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="before">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="after">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="color">
- <cd:constant type="cd:color"/>
- </cd:parameter>
- <cd:parameter name="textstyle">
- <cd:constant type="cd:style"/>
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="textcolor">
- <cd:constant type="cd:color"/>
- </cd:parameter>
- <cd:parameter name="align">
- <cd:inherit name="setupalign"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="setuplinefillers">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes">
- <cd:inherit name="setuplinefiller"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="linefiller" type="environment">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="filler"/>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplinefiller"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="setlinefiller">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="filler"/>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
+ <cd:command category="rules" file="spac-flr.mkiv" level="document" name="dotfill"/>
</cd:interface>
<cd:interface file="i-fillinline.xml">
<cd:command category="rules" file="pack-mrl.mkiv" level="style" name="setupfillinlines">
@@ -9990,7 +10359,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-firstline.xml">
- <cd:command category="fonts colors" file="typo-fln.mkiv" level="style" name="definefirstline">
+ <cd:command category="fonts" file="typo-fln.mkiv" keywords="colors" level="style" name="definefirstline">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -10003,7 +10372,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="typo-fln.mkiv" level="style" name="setupfirstline">
+ <cd:command category="fonts" file="typo-fln.mkiv" keywords="colors" level="style" name="setupfirstline">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -10027,14 +10396,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="typo-fln.mkiv" level="document" name="setfirstline">
+ <cd:command category="fonts" file="typo-fln.mkiv" keywords="colors" level="document" name="setfirstline">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="typo-fln.mkiv" level="system" name="applytofirstcharacter">
+ <cd:command category="fonts" file="typo-fln.mkiv" keywords="colors" level="system" name="applytofirstcharacter">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -10044,7 +10413,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-fittingpage.xml">
- <cd:command category="background layout" file="page-app.mkiv" level="style" name="definefittingpage">
+ <cd:command category="layout" file="page-app.mkiv" keywords="background" level="style" name="definefittingpage">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -10057,7 +10426,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background layout" file="page-app.mkiv" level="style" name="setupfittingpage">
+ <cd:command category="layout" file="page-app.mkiv" keywords="background" level="style" name="setupfittingpage">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -10085,7 +10454,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background layout" file="page-app.mkiv" level="document" name="fittingpage" type="environment">
+ <cd:command category="layout" file="page-app.mkiv" keywords="background" level="document" name="fittingpage" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -10095,7 +10464,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background layout" file="page-app.mkiv" generated="yes" level="document" name="fittingpage" type="environment" variant="instance">
+ <cd:command category="layout" file="page-app.mkiv" generated="yes" keywords="background" level="document" name="fittingpage" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="fittingpage"/>
</cd:sequence>
@@ -10109,7 +10478,7 @@
<cd:constant value="MPpage"/>
</cd:instances>
</cd:command>
- <cd:command category="background layout" file="page-app.mkiv" level="style" name="setupTEXpage">
+ <cd:command category="layout" file="page-app.mkiv" keywords="background" level="style" name="setupTEXpage">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="pagestate">
@@ -10134,7 +10503,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background layout metapost" file="meta-fig.mkiv" level="style" name="setupMPpage">
+ <cd:command category="layout" file="meta-fig.mkiv" keywords="background metapost" level="style" name="setupMPpage">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="pagestate">
@@ -10412,7 +10781,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure fonts counter" file="strc-flt.mkvi" level="style" name="setupcaption">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="fonts counter" level="style" name="setupcaption">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -10484,9 +10853,6 @@
<cd:parameter name="headseparator">
<cd:constant type="cd:text"/>
</cd:parameter>
- <cd:parameter name="headcommand">
- <cd:constant type="cd:command"/>
- </cd:parameter>
<cd:parameter name="inbetween">
<cd:constant type="cd:command"/>
</cd:parameter>
@@ -10538,12 +10904,16 @@
<cd:parameter name="maxwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="hang">
+ <cd:constant type="yes"/>
+ <cd:constant default="yes" type="no"/>
+ </cd:parameter>
<cd:inherit name="setupcounter"/>
<cd:inherit name="setupframed"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure fonts counter" file="strc-flt.mkvi" level="style" name="setupcaptions">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="fonts counter" level="style" name="setupcaptions">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -10553,7 +10923,36 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure background" file="strc-flt.mkvi" level="style" name="setupfloatframed">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="fonts counter" level="style" name="placefloatcaption">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:parameter name="title">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="bookmark">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="marking">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="list">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="reference">
+ <cd:constant type="cd:reference"/>
+ </cd:parameter>
+ </cd:assignments>
+ <cd:assignments list="yes" optional="yes">
+ <cd:parameter name="cd:key">
+ <cd:constant type="cd:value"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="background" level="style" name="setupfloatframed">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -11069,7 +11468,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-flt.mkvi" level="system" name="doifelserightpagefloat">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="conditional" level="system" name="doifelserightpagefloat">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -11079,7 +11478,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-flt.mkvi" level="system" name="doifrightpagefloatelse">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="conditional" level="system" name="doifrightpagefloatelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -11089,7 +11488,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-flt.mkvi" level="system" name="doifelseoddpagefloat">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="conditional" level="system" name="doifelseoddpagefloat">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -11099,7 +11498,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-flt.mkvi" level="system" name="doifoddpagefloatelse">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="conditional" level="system" name="doifoddpagefloatelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -11109,7 +11508,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-flt.mkvi" level="system" name="doifelsemainfloatbody">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="conditional" level="system" name="doifelsemainfloatbody">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -11119,7 +11518,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-flt.mkvi" level="system" name="doifmainfloatbodyelse">
+ <cd:command category="structure" file="strc-flt.mkvi" keywords="conditional" level="system" name="doifmainfloatbodyelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -11157,7 +11556,7 @@
</cd:arguments>
</cd:command>
<cd:command category="structure" file="strc-flt.mkvi" level="system" name="forcelocalfloats"/>
- <cd:command category="structure counter" file="tabl-tsp.mkiv" level="style" name="setupfloatsplitting">
+ <cd:command category="structure" file="tabl-tsp.mkiv" keywords="counter" level="style" name="setupfloatsplitting">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="before">
@@ -11190,7 +11589,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="tabl-tsp.mkiv" level="system" name="doifnotinsidesplitfloat">
+ <cd:command category="structure" file="tabl-tsp.mkiv" keywords="conditional" level="system" name="doifnotinsidesplitfloat">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -11324,6 +11723,11 @@
<cd:parameter name="color">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="width">
+ <cd:constant default="yes" type="fit"/>
+ <cd:constant type="frame"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:inherit name="setupframed"/>
</cd:assignments>
</cd:arguments>
@@ -11739,6 +12143,7 @@
</cd:parameter>
<cd:parameter name="dimensions">
<cd:constant type="cd:number"/>
+ <cd:constant type="strut"/>
</cd:parameter>
<cd:parameter name="boundingbox">
<cd:constant type="yes"/>
@@ -11820,7 +12225,11 @@
<cd:constant default="yes" type="yes"/>
<cd:constant type="no"/>
</cd:parameter>
- <cd:parameter name="cd:name">
+ <cd:parameter name="uppercasing">
+ <cd:constant type="yes"/>
+ <cd:constant default="yes" type="no"/>
+ </cd:parameter>
+ <cd:parameter name="lowercasing">
<cd:constant type="yes"/>
<cd:constant default="yes" type="no"/>
</cd:parameter>
@@ -11831,6 +12240,13 @@
<cd:constant type="yes"/>
<cd:constant default="yes" type="no"/>
</cd:parameter>
+ <cd:parameter name="metapost">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="cd:name">
+ <cd:constant type="yes"/>
+ <cd:constant default="yes" type="no"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -11963,7 +12379,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-fea.mkvi" level="system" name="doifelsecurrentfonthasfeature">
+ <cd:command category="fonts" file="font-fea.mkvi" keywords="conditional" level="system" name="doifelsecurrentfonthasfeature">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -11976,7 +12392,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-fea.mkvi" level="system" name="doifcurrentfonthasfeatureelse">
+ <cd:command category="fonts" file="font-fea.mkvi" keywords="conditional" level="system" name="doifcurrentfonthasfeatureelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -11989,7 +12405,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-fea.mkvi" level="system" name="doifelsefontfeature">
+ <cd:command category="fonts" file="font-fea.mkvi" keywords="conditional" level="system" name="doifelsefontfeature">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -12002,7 +12418,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-fea.mkvi" level="system" name="doiffontfeatureelse">
+ <cd:command category="fonts" file="font-fea.mkvi" keywords="conditional" level="system" name="doiffontfeatureelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -12015,7 +12431,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-fea.mkvi" level="system" name="doifunknownfontfeature">
+ <cd:command category="fonts" file="font-fea.mkvi" keywords="conditional" level="system" name="doifunknownfontfeature">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -12139,7 +12555,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-fil.mkvi" level="system" name="doifelsefontsynonym">
+ <cd:command category="fonts" file="font-fil.mkvi" keywords="conditional" level="system" name="doifelsefontsynonym">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -12152,7 +12568,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-fil.mkvi" level="system" name="doiffontsynonymelse">
+ <cd:command category="fonts" file="font-fil.mkvi" keywords="conditional" level="system" name="doiffontsynonymelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -12366,6 +12782,20 @@
</cd:assignments>
</cd:arguments>
</cd:command>
+ <cd:command category="fonts" file="font-ini.mkvi" level="style" name="setupbodyfontenvironment">
+ <cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords>
+ <cd:constant type="default"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="definebodyfontenvironment"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
<cd:command category="fonts" file="font-fil.mkvi" level="system" name="processbodyfontenvironmentlist">
<cd:arguments>
<cd:csname/>
@@ -12722,6 +13152,9 @@
<cd:command category="fonts" file="font-pre.mkiv" level="style" name="setoldstyle"/>
<cd:command category="fonts" file="font-pre.mkiv" level="style" name="settabular"/>
<cd:command category="fonts" file="font-pre.mkiv" level="style" name="setsuperiors"/>
+ <cd:command category="fonts" file="font-pre.mkiv" level="style" name="setfractions"/>
+ <cd:command category="fonts" file="font-pre.mkiv" level="style" name="uppercasing"/>
+ <cd:command category="fonts" file="font-pre.mkiv" level="style" name="lowercasing"/>
<cd:command category="fonts" file="font-pre.mkiv" level="style" name="tinyfont"/>
<cd:command category="fonts" file="font-pre.mkiv" level="style" name="infofont"/>
<cd:command category="fonts" file="font-pre.mkiv" level="style" name="infofontbold"/>
@@ -12732,7 +13165,6 @@
<cd:command category="fonts" file="font-pre.mkiv" level="document" name="normal"/>
<cd:command category="fonts" file="font-pre.mkiv" level="document" name="bold"/>
<cd:command category="fonts" file="font-pre.mkiv" level="document" name="mono"/>
- <cd:command category="fonts" file="font-pre.mkiv" level="document" name="monobold"/>
<cd:command category="fonts" file="font-pre.mkiv" level="document" name="slanted"/>
<cd:command category="fonts" file="font-pre.mkiv" level="document" name="italic"/>
<cd:command category="fonts" file="font-pre.mkiv" level="document" name="boldslanted"/>
@@ -12969,7 +13401,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-sym.mkvi" level="system" name="doifelseitalic">
+ <cd:command category="fonts" file="font-sym.mkvi" keywords="conditional" level="system" name="doifelseitalic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -12979,7 +13411,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-sym.mkvi" level="system" name="doifitalicelse">
+ <cd:command category="fonts" file="font-sym.mkvi" keywords="conditional" level="system" name="doifitalicelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -13095,7 +13527,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-sym.mkvi" level="system" name="doifelsefontchar">
+ <cd:command category="fonts" file="font-sym.mkvi" keywords="conditional" level="system" name="doifelsefontchar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:font"/>
@@ -13111,7 +13543,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-sym.mkvi" level="system" name="doiffontcharelse">
+ <cd:command category="fonts" file="font-sym.mkvi" keywords="conditional" level="system" name="doiffontcharelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:font"/>
@@ -13135,7 +13567,7 @@
</cd:arguments>
</cd:command>
<cd:command category="fonts" file="font-tra.mkiv" level="document" name="showfontdata"/>
- <cd:command category="fonts conditional" file="font-tra.mkiv" level="system" name="doifelsefontpresent">
+ <cd:command category="fonts" file="font-tra.mkiv" keywords="conditional" level="system" name="doifelsefontpresent">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:font"/>
@@ -13148,7 +13580,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts conditional" file="font-tra.mkiv" level="system" name="doiffontpresentelse">
+ <cd:command category="fonts" file="font-tra.mkiv" keywords="conditional" level="system" name="doiffontpresentelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:font"/>
@@ -13385,10 +13817,41 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts" file="font-ini.mkvi" level="style" name="addfontpath">
+ <cd:command category="fonts" file="hand-ini.mkx" level="style" name="defineexpansion">
<cd:arguments>
- <cd:keywords list="yes">
- <cd:constant type="cd:path"/>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupexpansion"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="fonts" file="hand-ini.mkx" level="style" name="setupexpansion">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes">
+ <cd:parameter name="step">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="stretch">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="shrink">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="fonts" file="font-ini.mkvi" level="style" name="setexpansion">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
@@ -13843,6 +14306,7 @@
<cd:constant type="yes"/>
<cd:constant type="no"/>
<cd:constant default="yes" type="auto"/>
+ <cd:constant type="hidden"/>
</cd:parameter>
<cd:parameter name="left">
<cd:constant type="cd:number"/>
@@ -13939,7 +14403,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-framed.xml">
- <cd:command category="background rules" file="pack-rul.mkiv" level="style" name="defineframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="style" name="defineframed">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -13952,7 +14416,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="style" name="setupframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="style" name="setupframed">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -14045,6 +14509,9 @@
<cd:constant type="frame"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="backgroundcolor">
+ <cd:resolve name="cd:color"/>
+ </cd:parameter>
<cd:parameter name="component">
<cd:constant type="cd:name"/>
</cd:parameter>
@@ -14154,24 +14621,44 @@
<cd:parameter name="orientation">
<cd:constant type="cd:number"/>
</cd:parameter>
+ <cd:parameter name="anchoring">
+ <cd:constant type="normal"/>
+ <cd:constant type="up"/>
+ <cd:constant type="down"/>
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="top"/>
+ <cd:constant type="bottom"/>
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="xanchor">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="yanchor">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="linedirection">
+ <cd:constant default="yes" type="normal"/>
+ <cd:constant type="reverse"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="frameddimension">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="frameddimension">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="framedparameter">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="framedparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="document" name="framed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="document" name="framed">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -14179,7 +14666,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" generated="yes" level="document" name="framed" variant="instance">
+ <cd:command category="rules" file="pack-rul.mkiv" generated="yes" keywords="background" level="document" name="framed" variant="instance">
<cd:sequence>
<cd:instance value="framed"/>
</cd:sequence>
@@ -14194,7 +14681,7 @@
<cd:constant value="fitfieldframed"/>
</cd:instances>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="normalframedwithsettings">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="normalframedwithsettings">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupframed"/>
@@ -14202,7 +14689,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="document" name="framed" type="environment">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="document" name="framed" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -14212,7 +14699,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="fastlocalframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="fastlocalframed">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14223,7 +14710,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="localframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="localframed">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14234,7 +14721,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="directlocalframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="directlocalframed">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14242,7 +14729,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="localframedwithsettings">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="localframedwithsettings">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14253,7 +14740,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="document" name="placeframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="document" name="placeframed">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14264,7 +14751,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="document" name="inframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="document" name="inframed">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -14272,7 +14759,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background rules mathematics" file="pack-rul.mkiv" level="style" name="definemathframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background mathematics" level="style" name="definemathframed">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14285,7 +14772,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules mathematics" file="pack-rul.mkiv" level="style" name="setupmathframed">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background mathematics" level="style" name="setupmathframed">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -14295,7 +14782,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules mathematics" file="pack-rul.mkiv" generated="yes" level="document" name="mathframed" variant="instance">
+ <cd:command category="rules" file="pack-rul.mkiv" generated="yes" keywords="background mathematics" level="document" name="mathframed" variant="instance">
<cd:sequence>
<cd:instance value="mathframed"/>
</cd:sequence>
@@ -14311,7 +14798,7 @@
<cd:constant value="mcframed"/>
</cd:instances>
</cd:command>
- <cd:command category="background rules mathematics" file="math-for.mkiv" level="style" name="defineformulaframed">
+ <cd:command category="rules" file="math-for.mkiv" keywords="background mathematics" level="style" name="defineformulaframed">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14324,7 +14811,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules mathematics" file="math-for.mkiv" level="style" name="setupformulaframed">
+ <cd:command category="rules" file="math-for.mkiv" keywords="background mathematics" level="style" name="setupformulaframed">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -14334,7 +14821,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="style" name="defineframedtext">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="style" name="defineframedtext">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14347,7 +14834,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="style" name="setupframedtext">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="style" name="setupframedtext">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -14390,7 +14877,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="style" name="setupframedtexts">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="style" name="setupframedtexts">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -14400,7 +14887,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" generated="yes" level="document" name="framedtext" variant="instance">
+ <cd:command category="rules" file="pack-rul.mkiv" generated="yes" keywords="background" level="document" name="framedtext" variant="instance">
<cd:sequence>
<cd:instance value="framedtext"/>
</cd:sequence>
@@ -14414,7 +14901,7 @@
<cd:constant value="framedtext"/>
</cd:instances>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" generated="yes" level="document" name="framedtext" type="environment" variant="instance">
+ <cd:command category="rules" file="pack-rul.mkiv" generated="yes" keywords="background" level="document" name="framedtext" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="framedtext"/>
</cd:sequence>
@@ -14433,7 +14920,7 @@
<cd:constant value="framedtext"/>
</cd:instances>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="style" name="defineframedcontent">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="style" name="defineframedcontent">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14446,7 +14933,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="style" name="setupframedcontent">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="style" name="setupframedcontent">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -14478,7 +14965,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-rul.mkiv" level="system" name="framedcontent" type="environment">
+ <cd:command category="rules" file="pack-rul.mkiv" keywords="background" level="system" name="framedcontent" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -14486,7 +14973,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-fen.mkiv" level="system" name="installleftframerenderer">
+ <cd:command category="rules" file="pack-fen.mkiv" keywords="background" level="system" name="installleftframerenderer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -14496,7 +14983,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-fen.mkiv" level="system" name="installrightframerenderer">
+ <cd:command category="rules" file="pack-fen.mkiv" keywords="background" level="system" name="installrightframerenderer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -14506,7 +14993,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-fen.mkiv" level="system" name="installtopframerenderer">
+ <cd:command category="rules" file="pack-fen.mkiv" keywords="background" level="system" name="installtopframerenderer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -14516,7 +15003,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" file="pack-fen.mkiv" level="system" name="installbottomframerenderer">
+ <cd:command category="rules" file="pack-fen.mkiv" keywords="background" level="system" name="installbottomframerenderer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -14526,7 +15013,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background rules" level="system" name="doifelseframed">
+ <cd:command category="rules" file="pack-rul.mkxl" keywords="background conditional" level="system" name="doifelseframed">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -14539,7 +15026,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-framedtable.xml">
- <cd:command category="tables" file="tabl-frm.mkiv" level="style" name="defineframedtable">
+ <cd:command category="tables" file="tabl-frm.mkiv" keywords="background rules" level="style" name="defineframedtable">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -14549,7 +15036,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-frm.mkiv" level="style" name="setupframedtable">
+ <cd:command category="tables" file="tabl-frm.mkiv" keywords="background rules" level="style" name="setupframedtable">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -14571,7 +15058,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-frm.mkiv" level="style" name="setupframedtablerow">
+ <cd:command category="tables" file="tabl-frm.mkiv" keywords="background rules" level="style" name="setupframedtablerow">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -14585,7 +15072,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-frm.mkiv" level="style" name="setupframedtablecolumn">
+ <cd:command category="tables" file="tabl-frm.mkiv" keywords="background rules" level="style" name="setupframedtablecolumn">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -14599,7 +15086,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-frm.mkiv" level="document" name="framedtable" type="environment">
+ <cd:command category="tables" file="tabl-frm.mkiv" keywords="background rules" level="document" name="framedtable" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -14609,14 +15096,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-frm.mkiv" level="document" name="framedrow" type="environment">
+ <cd:command category="tables" file="tabl-frm.mkiv" keywords="background rules" level="document" name="framedrow" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-frm.mkiv" level="document" name="framedcell" type="environment">
+ <cd:command category="tables" file="tabl-frm.mkiv" keywords="background rules" level="document" name="framedcell" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -14697,6 +15184,11 @@
<cd:parameter name="color">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="cmyk">
+ <cd:constant type="yes"/>
+ <cd:constant default="yes" type="no"/>
+ <cd:constant type="auto"/>
+ </cd:parameter>
<cd:parameter name="arguments">
<cd:constant type="cd:text"/>
</cd:parameter>
@@ -14855,6 +15347,16 @@
</cd:assignments>
</cd:arguments>
</cd:command>
+ <cd:command category="graphics" file="grph-inc.mkvi" level="style" name="setupexternalfigures">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes">
+ <cd:inherit name="setupexternalfigure"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
<cd:command category="graphics" file="grph-inc.mkiv" level="style" name="useexternalfigure">
<cd:arguments>
<cd:keywords>
@@ -14913,7 +15415,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics conditional" file="grph-inc.mkiv" level="system" name="doifelsefigure">
+ <cd:command category="graphics" file="grph-inc.mkiv" keywords="conditional" level="system" name="doifelsefigure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -14926,7 +15428,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics conditional" file="grph-inc.mkiv" level="system" name="doiffigureelse">
+ <cd:command category="graphics" file="grph-inc.mkiv" keywords="conditional" level="system" name="doiffigureelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -15099,7 +15601,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics buffer" file="grph-fig.mkiv" level="document" name="typesetbuffer">
+ <cd:command category="graphics" file="grph-fig.mkiv" keywords="buffer" level="document" name="typesetbuffer">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="*"/>
@@ -15110,7 +15612,15 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics structure" file="grph-fig.mkiv" level="style" name="definetypesetting">
+ <cd:command category="graphics" file="grph-fig.mkiv" keywords="buffer" level="document" name="typesetbufferonly">
+ <cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="*"/>
+ <cd:constant type="cd:buffer"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="graphics" file="grph-fig.mkiv" keywords="structure" level="style" name="definetypesetting">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -15123,7 +15633,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics structure" file="grph-fig.mkiv" level="document" name="typesetfile">
+ <cd:command category="graphics" file="grph-fig.mkiv" keywords="structure" level="document" name="typesetfile">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -15184,6 +15694,30 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="graphics" file="grph-inc.mkiv" level="document" name="includesvgfile">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:file"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:parameter name="offset">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="graphics" file="grph-inc.mkiv" level="document" name="includesvgbuffer">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:buffer"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:parameter name="offset">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-grid.xml">
<cd:command category="layout" file="page-grd.mkiv" level="document" name="showgrid">
@@ -15504,7 +16038,7 @@
<cd:constant value="helptext"/>
</cd:instances>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-hlp.mkvi" level="system" name="doifelsehelp">
+ <cd:command category="pdf" file="scrn-hlp.mkvi" keywords="conditional" level="system" name="doifelsehelp">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -15514,7 +16048,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-hlp.mkvi" level="system" name="doifhelpelse">
+ <cd:command category="pdf" file="scrn-hlp.mkvi" keywords="conditional" level="system" name="doifhelpelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -15557,7 +16091,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-highlight.xml">
- <cd:command category="fonts colors" file="core-sys.mkiv" level="style" name="definehighlight">
+ <cd:command category="fonts" file="core-sys.mkiv" keywords="colors" level="style" name="definehighlight">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -15570,7 +16104,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="core-sys.mkiv" level="style" name="setuphighlight">
+ <cd:command category="fonts" file="core-sys.mkiv" keywords="colors" level="style" name="setuphighlight">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -15590,7 +16124,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="core-sys.mkiv" generated="yes" level="document" name="highlight" variant="example">
+ <cd:command category="fonts" file="core-sys.mkiv" generated="yes" keywords="colors" level="document" name="highlight" variant="example">
<cd:sequence>
<cd:variable value="highlight"/>
</cd:sequence>
@@ -15600,7 +16134,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="core-sys.mkiv" level="document" name="highlight">
+ <cd:command category="fonts" file="core-sys.mkiv" keywords="colors" level="document" name="highlight">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -15610,14 +16144,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="core-sys.mkiv" level="document" name="highlight" type="environment">
+ <cd:command category="fonts" file="core-sys.mkiv" keywords="colors" level="document" name="highlight" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="core-sys.mkiv" level="document" name="directhighlight">
+ <cd:command category="fonts" file="core-sys.mkiv" keywords="colors" level="document" name="directhighlight">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -15700,7 +16234,6 @@
<cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="fixedspaces"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="keepunwantedspaces"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="removeunwantedspaces"/>
- <cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="thinspace"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="negthinspace"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="enspace"/>
<cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="negenspace"/>
@@ -15716,9 +16249,9 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="system" name="leftskipadaption"/>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="system" name="rightskipadaption"/>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="system" name="dosetleftskipadaption">
+ <cd:command category="whitespace" file="spac-hor.mkxl" keywords="layout" level="system" name="leftskipadaption"/>
+ <cd:command category="whitespace" file="spac-hor.mkxl" keywords="layout" level="system" name="rightskipadaption"/>
+ <cd:command category="whitespace" file="spac-hor.mkxl" keywords="layout" level="system" name="dosetleftskipadaption">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="yes"/>
@@ -15728,7 +16261,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="system" name="dosetrightskipadaption">
+ <cd:command category="whitespace" file="spac-hor.mkxl" keywords="layout" level="system" name="dosetrightskipadaption">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="yes"/>
@@ -15738,7 +16271,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="system" name="doadaptleftskip">
+ <cd:command category="whitespace" file="spac-hor.mkxl" keywords="layout" level="system" name="doadaptleftskip">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="yes"/>
@@ -15748,7 +16281,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="system" name="doadaptrightskip">
+ <cd:command category="whitespace" file="spac-hor.mkxl" keywords="layout" level="system" name="doadaptrightskip">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="yes"/>
@@ -15758,7 +16291,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="activatespacehandler">
+ <cd:command category="whitespace" file="spac-hor.mkxl" level="system" name="activatespacehandler">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="on"/>
@@ -15768,13 +16301,36 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="quads">
+ <cd:command category="whitespace" file="spac-hor.mkxl" level="style" name="quads">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="whitespace" file="spac-hor.mkxl" level="system" name="interwordspacebefore"/>
+ <cd:command category="whitespace" file="spac-hor.mkxl" level="system" name="interwordspaceafter"/>
+ <cd:command category="whitespace" file="spac-hor.mkxl" level="system" name="interwordspacesbefore">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-hor.mkxl" level="system" name="interwordspacesafter">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-hor.mkxl" level="system" name="interwordspaces">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-hyphenation.xml">
<cd:command category="language" file="lang-hyp.mkiv" level="style" name="setuphyphenation">
@@ -15805,7 +16361,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="language" file="lang-hyp.mkiv" level="style" name="definehypenationfeatures">
+ <cd:command category="language" file="lang-hyp.mkiv" level="style" name="definehyphenationfeatures">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -16051,6 +16607,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="language" file="lang-ini.mkxl" level="style" name="dohyphens"/>
+ <cd:command category="language" file="lang-ini.mkxl" level="style" name="nohyphens"/>
+ <cd:command category="language" file="lang-ini.mkxl" level="system" name="usehyphensparameter">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="language" file="lang-mis.mkxl" level="system" name="compounddiscretionary"/>
</cd:interface>
<cd:interface file="i-imposition.xml">
<cd:command category="layout" file="page-imp.mkiv" level="system" name="installshipoutmethod">
@@ -16063,7 +16627,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-imp.mkiv" level="system" name="invokepageheandler">
+ <cd:command category="layout" file="page-imp.mkiv" level="system" name="invokepagehandler">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="normal"/>
@@ -16206,6 +16770,16 @@
</cd:command>
<cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="dorechecknextindentation"/>
<cd:command begin="push" category="whitespace" end="pop" file="spac-hor.mkiv" level="system" name="indentation" type="environment"/>
+ <cd:command category="whitespace" file="supp-box.lua" keywords="conditional" level="system" name="doifelseindented">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:true"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:false"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-indentedtext.xml">
<cd:command category="structure" file="strc-ind.mkiv" level="style" name="defineindentedtext">
@@ -16450,7 +17024,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-ins.mkiv" level="system" name="doifelseinsertion">
+ <cd:command category="structure" file="page-ins.mkiv" keywords="conditional" level="system" name="doifelseinsertion">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -16463,7 +17037,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-ins.mkiv" level="system" name="doifinsertionelse">
+ <cd:command category="structure" file="page-ins.mkiv" keywords="conditional" level="system" name="doifinsertionelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -16612,7 +17186,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-ini.mkvi" level="system" name="doifelselocation">
+ <cd:command category="pdf" file="scrn-ini.mkvi" keywords="conditional" level="system" name="doifelselocation">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -16622,7 +17196,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="scrn-ini.mkvi" level="system" name="doiflocationelse">
+ <cd:command category="pdf" file="scrn-ini.mkvi" keywords="conditional" level="system" name="doiflocationelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -17000,10 +17574,10 @@
</cd:command>
</cd:interface>
<cd:interface file="i-interface.xml">
- <cd:command file="mult-ini.mkiv" level="system" name="defaultinterface"/>
- <cd:command file="mult-ini.mkiv" level="system" name="currentinterface"/>
- <cd:command file="mult-ini.mkiv" level="system" name="currentresponses"/>
- <cd:command file="mult-ini.mkiv" level="system" name="interface" type="environment">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="defaultinterface"/>
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="currentinterface"/>
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="currentresponses"/>
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="interface" type="environment">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="all"/>
@@ -17011,7 +17585,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="defineinterfaceconstant">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="defineinterfaceconstant">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17021,7 +17595,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="defineinterfacevariable">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="defineinterfacevariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17031,7 +17605,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="defineinterfaceelement">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="defineinterfaceelement">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17041,7 +17615,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="definefileconstant">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="definefileconstant">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17051,28 +17625,28 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="definesystemconstant">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="definesystemconstant">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="definemessageconstant">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="definemessageconstant">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="definesystemvariable">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="definesystemvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="setinterfacemessage">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="setinterfacemessage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17087,7 +17661,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="setmessagetext">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="setmessagetext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17098,8 +17672,8 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="currentmessagetext"/>
- <cd:command file="mult-ini.mkiv" level="system" name="getmessage">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="currentmessagetext"/>
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="getmessage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17110,7 +17684,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="doifelsemessage">
+ <cd:command category="tracker" file="mult-ini.mkiv" keywords="conditional" level="system" name="doifelsemessage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17127,7 +17701,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="doifmessageelse">
+ <cd:command category="tracker" file="mult-ini.mkiv" keywords="conditional" level="system" name="doifmessageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17144,7 +17718,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="showmessage">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="showmessage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17158,7 +17732,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="writestatus">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="writestatus">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -17168,28 +17742,28 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="message">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="message">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="inlinemessage">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="inlinemessage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="displaymessage">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="displaymessage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="showwarning">
+ <cd:command category="tracker" file="mult-ini.mkiv" level="system" name="showwarning">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17203,7 +17777,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="setinterfaceconstant">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="setinterfaceconstant">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17213,7 +17787,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="setinterfacevariable">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="setinterfacevariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17223,7 +17797,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="setinterfaceelement">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="setinterfaceelement">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17233,7 +17807,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="mult-ini.mkiv" level="system" name="setinterfacecommand">
+ <cd:command category="interface" file="mult-ini.mkiv" level="system" name="setinterfacecommand">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -17419,181 +17993,6 @@
</cd:arguments>
</cd:command>
</cd:interface>
- <cd:interface file="i-interlinespace.xml">
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="defineinterlinespace">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupinterlinespace"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="setupinterlinespace">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes">
- <cd:parameter name="line">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="height">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="depth">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="minheight">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="mindepth">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="distance">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="top">
- <cd:constant type="cd:number"/>
- <cd:constant type="height"/>
- </cd:parameter>
- <cd:parameter name="bottom">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="stretch">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="shrink">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="setupinterlinespace" variant="argument">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="on"/>
- <cd:constant type="off"/>
- <cd:constant type="reset"/>
- <cd:constant type="auto"/>
- <cd:constant type="small"/>
- <cd:constant type="medium"/>
- <cd:constant type="big"/>
- <cd:constant type="cd:number"/>
- <cd:constant type="cd:dimension"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="setupinterlinespace" variant="name">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="setuplocalinterlinespace">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes">
- <cd:inherit name="setupinterlinespace"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="setuplocalinterlinespace" variant="argument">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="on"/>
- <cd:constant type="off"/>
- <cd:constant type="reset"/>
- <cd:constant type="auto"/>
- <cd:constant type="small"/>
- <cd:constant type="medium"/>
- <cd:constant type="big"/>
- <cd:constant type="cd:number"/>
- <cd:constant type="cd:dimension"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="setuplocalinterlinespace" variant="name">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="switchtointerlinespace">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes">
- <cd:inherit name="setupinterlinespace"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="switchtointerlinespace" variant="argument">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="on"/>
- <cd:constant type="off"/>
- <cd:constant type="reset"/>
- <cd:constant type="auto"/>
- <cd:constant type="small"/>
- <cd:constant type="medium"/>
- <cd:constant type="big"/>
- <cd:constant type="cd:number"/>
- <cd:constant type="cd:dimension"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="style" name="switchtointerlinespace" variant="name">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="system" name="dosetupcheckedinterlinespace">
- <cd:arguments>
- <cd:assignments delimiters="braces" list="yes">
- <cd:inherit name="setupinterlinespace"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="system" name="dosetupcheckedinterlinespace" variant="argument">
- <cd:arguments>
- <cd:keywords delimiters="braces" list="yes">
- <cd:constant type="on"/>
- <cd:constant type="off"/>
- <cd:constant type="reset"/>
- <cd:constant type="auto"/>
- <cd:constant type="small"/>
- <cd:constant type="medium"/>
- <cd:constant type="big"/>
- <cd:constant type="cd:number"/>
- <cd:constant type="cd:dimension"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="system" name="dosetupcheckedinterlinespace" variant="name">
- <cd:arguments>
- <cd:keywords delimiters="braces">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command category="whitespace" file="spac-ver.mkiv" level="system" name="useinterlinespaceparameter">
- <cd:arguments>
- <cd:csname/>
- </cd:arguments>
- </cd:command>
- </cd:interface>
<cd:interface file="i-italiccorrection.xml">
<cd:command category="fonts" file="typo-itc.mkvi" level="system" name="setitaliccorrection">
<cd:arguments>
@@ -17631,7 +18030,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure counter" file="strc-itm.mkvi" level="style" name="setupitemgroup">
+ <cd:command category="structure" file="strc-itm.mkvi" keywords="counter" level="style" name="setupitemgroup">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -17818,6 +18217,8 @@
<cd:parameter name="placestopper">
<cd:constant default="yes" type="yes"/>
<cd:constant type="no"/>
+ <cd:constant type="display"/>
+ <cd:constant type="inline"/>
</cd:parameter>
<cd:parameter name="style">
<cd:constant type="cd:style"/>
@@ -17857,7 +18258,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure counter" file="strc-itm.mkvi" level="style" name="setupitemgroup" variant="assignment">
+ <cd:command category="structure" file="strc-itm.mkvi" keywords="counter" level="style" name="setupitemgroup" variant="assignment">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -17918,6 +18319,7 @@
<cd:constant type="inmargin"/>
<cd:constant type="atmargin"/>
<cd:constant type="intext"/>
+ <cd:constant type="headintext"/>
<cd:constant type="loose"/>
<cd:constant type="fit"/>
<cd:constant type="nofit"/>
@@ -18039,6 +18441,8 @@
<cd:parameter name="placestopper">
<cd:constant default="yes" type="yes"/>
<cd:constant type="no"/>
+ <cd:constant type="display"/>
+ <cd:constant type="inline"/>
</cd:parameter>
<cd:parameter name="style">
<cd:constant type="cd:style"/>
@@ -18071,11 +18475,14 @@
<cd:parameter name="grid">
<cd:inherit name="definegridsnapping"/>
</cd:parameter>
+ <cd:parameter name="packcriterium">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
<cd:inherit name="setupcounter"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure counter" file="strc-itm.mkvi" level="style" name="setupitemgroups">
+ <cd:command category="structure" file="strc-itm.mkvi" keywords="counter" level="style" name="setupitemgroups">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -18136,6 +18543,7 @@
<cd:constant type="inmargin"/>
<cd:constant type="atmargin"/>
<cd:constant type="intext"/>
+ <cd:constant type="headintext"/>
<cd:constant type="loose"/>
<cd:constant type="fit"/>
<cd:constant type="nofit"/>
@@ -18257,6 +18665,8 @@
<cd:parameter name="placestopper">
<cd:constant default="yes" type="yes"/>
<cd:constant type="no"/>
+ <cd:constant type="display"/>
+ <cd:constant type="inline"/>
</cd:parameter>
<cd:parameter name="style">
<cd:constant type="cd:style"/>
@@ -18289,11 +18699,14 @@
<cd:parameter name="grid">
<cd:inherit name="definegridsnapping"/>
</cd:parameter>
+ <cd:parameter name="packcriterium">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
<cd:inherit name="setupcounter"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure counter" file="strc-itm.mkvi" generated="yes" level="style" name="setupitemgroup" variant="instance">
+ <cd:command category="structure" file="strc-itm.mkvi" generated="yes" keywords="counter" level="style" name="setupitemgroup" variant="instance">
<cd:sequence>
<cd:string value="setup"/>
<cd:instance value="itemgroup"/>
@@ -18481,6 +18894,8 @@
<cd:parameter name="placestopper">
<cd:constant default="yes" type="yes"/>
<cd:constant type="no"/>
+ <cd:constant type="display"/>
+ <cd:constant type="inline"/>
</cd:parameter>
<cd:parameter name="style">
<cd:constant type="cd:style"/>
@@ -18756,7 +19171,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-kerning.xml">
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="style" name="definecharacterkerning">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="style" name="definecharacterkerning">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -18769,7 +19184,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="style" name="setupcharacterkerning">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="style" name="setupcharacterkerning">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -18795,7 +19210,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="style" name="setcharacterkerning">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="style" name="setcharacterkerning">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
@@ -18803,8 +19218,8 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="style" name="resetcharacterkerning"/>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" generated="yes" level="document" name="characterkerning" variant="example">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="style" name="resetcharacterkerning"/>
+ <cd:command category="fonts" file="typo-krn.mkiv" generated="yes" keywords="whitespace" level="document" name="characterkerning" variant="example">
<cd:sequence>
<cd:variable value="characterkerning"/>
</cd:sequence>
@@ -18817,7 +19232,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="document" name="kerncharacters">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="document" name="kerncharacters">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:number"/>
@@ -18827,7 +19242,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="document" name="letterspacing">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="document" name="letterspacing">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:number"/>
@@ -18837,7 +19252,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="document" name="stretched">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="document" name="stretched">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupstretched"/>
@@ -18847,14 +19262,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts whitespace" file="typo-krn.mkiv" level="style" name="setupstretched">
+ <cd:command category="fonts" file="typo-krn.mkiv" keywords="whitespace" level="style" name="setupstretched">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupcharacterkerning"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command catgeory="fonts whitespace" file="typo-pnc.mkic" level="style" name="defineperiodkerning">
+ <cd:command category="fonts" file="typo-pnc.mkic" keywords="whitespace" level="style" name="defineperiodkerning">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -18867,7 +19282,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command catgeory="fonts whitespace" file="typo-pnc.mkic" level="style" name="setupperiodkerning">
+ <cd:command category="fonts" file="typo-pnc.mkic" keywords="whitespace" level="style" name="setupperiodkerning">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -18879,7 +19294,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command catgeory="fonts whitespace" file="typo-pnc.mkic" level="style" name="setperiodkerning">
+ <cd:command category="fonts" file="typo-pnc.mkic" keywords="whitespace" level="style" name="setperiodkerning">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
@@ -18887,7 +19302,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command catgeory="fonts whitespace" file="typo-pnc.mkic" level="style" name="resetperiodkerning"/>
+ <cd:command category="fonts" file="typo-pnc.mkic" keywords="whitespace" level="style" name="resetperiodkerning"/>
</cd:interface>
<cd:interface file="i-label.xml">
<cd:command category="structure" file="strc-lab.mkiv" level="style" name="definelabel">
@@ -19460,7 +19875,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="language conditional" file="lang-ini.mkiv" level="system" name="doifelselanguage">
+ <cd:command category="language" file="lang-ini.mkiv" keywords="conditional" level="system" name="doifelselanguage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:language"/>
@@ -19473,7 +19888,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="language conditional" file="lang-ini.mkiv" level="system" name="doiflanguageelse">
+ <cd:command category="language" file="lang-ini.mkiv" keywords="conditional" level="system" name="doiflanguageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:language"/>
@@ -19486,7 +19901,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="language conditional" file="lang-ini.mkiv" level="system" name="doifelsepatterns">
+ <cd:command category="language" file="lang-ini.mkiv" keywords="conditional" level="system" name="doifelsepatterns">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:language"/>
@@ -19499,7 +19914,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="language conditional" file="lang-ini.mkiv" level="system" name="doifpatternselse">
+ <cd:command category="language" file="lang-ini.mkiv" keywords="conditional" level="system" name="doifpatternselse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:language"/>
@@ -19881,7 +20296,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background conditional" file="pack-lyr.mkiv" level="system" name="doifelselayerdata">
+ <cd:command category="background" file="pack-lyr.mkiv" keywords="conditional" level="system" name="doifelselayerdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -19894,7 +20309,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background conditional" file="pack-lyr.mkiv" level="system" name="doiflayerdataelse">
+ <cd:command category="background" file="pack-lyr.mkiv" keywords="conditional" level="system" name="doiflayerdataelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -19909,7 +20324,7 @@
</cd:command>
<cd:command category="background" file="pack-lyr.mkiv" level="system" name="layerwidth"/>
<cd:command category="background" file="pack-lyr.mkiv" level="system" name="layerheight"/>
- <cd:command category="background metapost" file="pack-lyr.mkiv" level="document" name="setMPlayer">
+ <cd:command category="background" file="pack-lyr.mkiv" keywords="metapost" level="document" name="setMPlayer">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -19923,7 +20338,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="pack-lyr.mkiv" level="document" name="getMPlayer">
+ <cd:command category="background" file="pack-lyr.mkiv" keywords="metapost" level="document" name="getMPlayer">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -20160,7 +20575,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-lay.mkiv" level="system" name="doifelselayoutdefined">
+ <cd:command category="layout" file="page-lay.mkiv" keywords="conditional" level="system" name="doifelselayoutdefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -20173,7 +20588,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-lay.mkiv" level="system" name="doiflayoutdefinedelse">
+ <cd:command category="layout" file="page-lay.mkiv" keywords="conditional" level="system" name="doiflayoutdefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -20209,7 +20624,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-lay.mkiv" level="system" name="doifelseoddpage">
+ <cd:command category="layout" file="page-lay.mkiv" keywords="conditional" level="system" name="doifelseoddpage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -20219,7 +20634,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-lay.mkiv" level="system" name="doifoddpageelse">
+ <cd:command category="layout" file="page-lay.mkiv" keywords="conditional" level="system" name="doifoddpageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -20229,7 +20644,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-lay.mkiv" level="system" name="doifbothsidesoverruled">
+ <cd:command category="layout" file="page-lay.mkiv" keywords="conditional" level="system" name="doifbothsidesoverruled">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -20242,7 +20657,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-lay.mkiv" level="system" name="doifbothsides">
+ <cd:command category="layout" file="page-lay.mkiv" keywords="conditional" level="system" name="doifbothsides">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -20255,7 +20670,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-lay.mkiv" level="system" name="rightorleftpageaction">
+ <cd:command category="layout" file="page-lay.mkiv" keywords="conditional" level="system" name="rightorleftpageaction">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -20327,12 +20742,13 @@
<cd:constant type="nc"/>
<cd:constant type="sp"/>
<cd:constant type="in"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
<cd:command category="layout" file="page-run.mkiv" level="document" name="showmargins"/>
<cd:command category="layout" file="page-spr.mkiv" level="document" name="spread" type="environment"/>
- <cd:command category="layout conditional" file="page-ini.mkiv" level="system" name="doifelsetopofpage">
+ <cd:command category="layout" file="page-ini.mkiv" keywords="conditional" level="system" name="doifelsetopofpage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -20342,7 +20758,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-ini.mkiv" level="system" name="doiftopofpageelse">
+ <cd:command category="layout" file="page-ini.mkiv" keywords="conditional" level="system" name="doiftopofpageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -20354,7 +20770,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-linefiller.xml">
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="definelinefiller">
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost" level="style" name="definelinefiller">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -20367,7 +20783,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="setuplinefiller">
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost" level="style" name="setuplinefiller">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -20384,8 +20800,8 @@
<cd:constant default="yes" type="local"/>
<cd:constant type="global"/>
</cd:parameter>
- <cd:parameter name="color">
- <cd:constant type="cd:color"/>
+ <cd:parameter name="mp">
+ <cd:constant type="cd:name"/>
</cd:parameter>
<cd:parameter name="height">
<cd:constant type="cd:dimension"/>
@@ -20402,6 +20818,15 @@
<cd:parameter name="rulethickness">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="color">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="textstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
@@ -20412,19 +20837,10 @@
<cd:parameter name="align">
<cd:inherit name="setupalign"/>
</cd:parameter>
- <cd:parameter name="mp">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="before">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="after">
- <cd:constant type="cd:command"/>
- </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="setuplinefillers">
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost" level="style" name="setuplinefillers">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -20434,7 +20850,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="linefiller" type="environment">
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost" level="style" name="linefiller" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="filler"/>
@@ -20445,7 +20861,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="rules metapost" file="node-rul.mkiv" level="style" name="setlinefiller">
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost" level="style" name="setlinefiller">
<cd:arguments>
<cd:keywords>
<cd:constant type="filler"/>
@@ -20453,6 +20869,39 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost boxes" level="document" name="linefillerhbox">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="none" optional="yes">
+ <cd:constant type="cd:text"/>
+ </cd:keywords>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost boxes" level="document" name="linefillervbox">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="none" optional="yes">
+ <cd:constant type="cd:text"/>
+ </cd:keywords>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="rules" file="node-rul.mkiv" keywords="metapost boxes" level="document" name="linefillervtop">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="none" optional="yes">
+ <cd:constant type="cd:text"/>
+ </cd:keywords>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-linenumber.xml">
<cd:command category="structure" file="page-lin.mkvi" level="style" name="definelinenumbering">
@@ -20601,7 +21050,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-lin.mkvi" level="system" name="doifelsesamelinereference">
+ <cd:command category="structure" file="page-lin.mkvi" keywords="conditional" level="system" name="doifelsesamelinereference">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:reference"/>
@@ -20614,7 +21063,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-lin.mkvi" level="system" name="doifsamelinereferenceelse">
+ <cd:command category="structure" file="page-lin.mkvi" keywords="conditional" level="system" name="doifsamelinereferenceelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:reference"/>
@@ -20646,34 +21095,42 @@
</cd:command>
</cd:interface>
<cd:interface file="i-lines.xml">
- <cd:command file="supp-box.mkiv" level="system" name="noflines"/>
- <cd:command file="supp-box.mkiv" level="system" name="getnoflines">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="strings" level="system" name="noflines"/>
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="strings" level="system" name="getnoflines">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="getroundednoflines">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="strings" level="system" name="getroundednoflines">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="getrawnoflines">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="strings" level="system" name="getrawnoflines">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="determinenoflines">
+ <cd:command category="boxes" file="supp-box.mkiv" keywords="strings" level="system" name="determinenoflines">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="spac-lin.mkiv" level="style" name="definelines">
+ <cd:command category="boxes" file="supp-box.lua" level="system" name="noflinesinbox">
+ <cd:arguments>
+ <cd:keywords delimiters="none">
+ <cd:constant type="cd:csname"/>
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="structure" file="spac-lin.mkiv" level="style" name="definelines">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -20686,7 +21143,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="spac-lin.mkiv" level="style" name="setuplines">
+ <cd:command category="structure" file="spac-lin.mkiv" level="style" name="setuplines">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -20733,10 +21190,14 @@
<cd:parameter name="right">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter list="yes" name="indentlist">
+ <cd:constant type="cd:dimension"/>
+ <cd:constant type="*"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="spac-lin.mkiv" generated="yes" level="document" name="lines" type="environment" variant="instance">
+ <cd:command category="structure" file="spac-lin.mkiv" generated="yes" level="document" name="lines" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="lines"/>
</cd:sequence>
@@ -20749,7 +21210,7 @@
<cd:constant value="lines"/>
</cd:instances>
</cd:command>
- <cd:command file="spac-lin.mkiv" level="document" name="emptylines">
+ <cd:command category="whitespace" file="spac-lin.mkiv" level="document" name="emptylines">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:number"/>
@@ -20860,7 +21321,7 @@
<cd:command category="tables" file="tabl-ltb.mkiv" level="document" name="linetable" type="environment"/>
<cd:command category="tables" file="tabl-ltb.mkiv" level="document" name="linetablehead" type="environment"/>
<cd:command category="tables" file="tabl-ltb.mkiv" level="document" name="linetablebody" type="environment"/>
- <cd:command category="tables buffer" file="tabl-ltb.mkiv" level="document" name="processlinetablebuffer">
+ <cd:command category="tables" file="tabl-ltb.mkiv" keywords="buffer" level="document" name="processlinetablebuffer">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:buffer"/>
@@ -20988,10 +21449,11 @@
<cd:parameter name="pagecommand">
<cd:constant type="cd:oneargument"/>
</cd:parameter>
- <cd:parameter name="pagenumber">
+ <cd:parameter list="yes" name="pagenumber">
<cd:constant default="yes" type="yes"/>
<cd:constant type="no"/>
<cd:constant type="always"/>
+ <cd:constant type="realpage"/>
</cd:parameter>
<cd:parameter name="headnumber">
<cd:constant default="yes" type="yes"/>
@@ -21163,7 +21625,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-lst.mkvi" level="system" name="doifelselist">
+ <cd:command category="structure" file="strc-lst.mkvi" keywords="conditional" level="system" name="doifelselist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:list"/>
@@ -21176,7 +21638,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-lst.mkvi" level="system" name="doiflistelse">
+ <cd:command category="structure" file="strc-lst.mkvi" keywords="conditional" level="system" name="doiflistelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:list"/>
@@ -21400,7 +21862,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-lst.mkvi" level="system" name="doifelsestructurelisthaspage">
+ <cd:command category="structure" file="strc-lst.mkvi" keywords="conditional" level="system" name="doifelsestructurelisthaspage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -21410,7 +21872,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-lst.mkvi" level="system" name="doifstructurelisthaspageelse">
+ <cd:command category="structure" file="strc-lst.mkvi" keywords="conditional" level="system" name="doifstructurelisthaspageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -21420,7 +21882,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-lst.mkvi" level="system" name="doifelsestructurelisthasnumber">
+ <cd:command category="structure" file="strc-lst.mkvi" keywords="conditional" level="system" name="doifelsestructurelisthasnumber">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -21430,7 +21892,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="strc-lst.mkvi" level="system" name="doifstructurelisthasnumberelse">
+ <cd:command category="structure" file="strc-lst.mkvi" keywords="conditional" level="system" name="doifstructurelisthasnumberelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -21565,11 +22027,15 @@
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MKII"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MKIV"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MKVI"/>
+ <cd:command category="symbols" file="cont-log.mkiv" level="document" name="MKXL"/>
+ <cd:command category="symbols" file="cont-log.mkiv" level="document" name="MKLX"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MKIX"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MKXI"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MPII"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MPIV"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="MPVI"/>
+ <cd:command category="symbols" file="cont-log.mkiv" level="document" name="MPXL"/>
+ <cd:command category="symbols" file="cont-log.mkiv" level="document" name="MPLX"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="PPCHTeX"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="PPCHTEX"/>
<cd:command category="symbols" file="cont-log.mkiv" level="document" name="PRAGMA"/>
@@ -22025,6 +22491,16 @@
<cd:variable value="ctxfunctiondefinition"/>
</cd:sequence>
</cd:command>
+ <cd:command category="lua" file="luat-ini.mkiv" level="system" name="setctxluafunction">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
<cd:command category="lua" file="luat-ini.mkiv" level="system" name="ctxfunction" type="environment">
<cd:arguments>
<cd:keywords delimiters="none">
@@ -22039,14 +22515,118 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="lua" file="luat-ini.mkiv" level="system" name="installctxfunction">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
<cd:command category="lua" file="luat-ini.mkiv" generated="yes" level="system" name="ctxfunction" variant="example">
<cd:sequence>
<cd:variable value="ctxfunction"/>
</cd:sequence>
</cd:command>
+ <cd:command category="lua" file="luat-ini.mkiv" level="system" name="installctxscanner">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="luat-ini.mkiv" generated="yes" level="system" name="ctxscanner" variant="example">
+ <cd:sequence>
+ <cd:variable value="ctxscanner"/>
+ </cd:sequence>
+ </cd:command>
+ <cd:command category="lua" file="luat-ini.mkiv" level="system" name="installprotectedctxfunction">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="luat-ini.mkiv" level="system" name="installprotectedctxscanner">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="luat-ini.mkiv" level="system" name="resetctxscanner">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ </cd:interface>
+ <cd:interface file="i-luatable.xml">
+ <cd:command category="lua" file="cldf-int.mkxl" level="system" name="newluatable">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-int.mkxl" level="system" name="useluatable">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-lmt.lua" level="system" name="disposeluatable">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-lmt.lua" level="system" name="inspectluatable">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-lmt.lua" level="system" name="showluatables"/>
+ <cd:command category="lua" file="cldf-lmt.lua" level="system" name="setluatable">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-lmt.lua" level="system" name="getfromluatable">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:key"/>
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-lmt.lua" level="system" name="idxfromluatable">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:keywords delimiters="none">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-int.mkxl" level="system" name="setdatavalue">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-int.mkxl" level="system" name="getdatavalue">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="lua" file="cldf-int.mkxl" level="system" name="thedatavalue">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-makeup.xml">
- <cd:command category="structure layout" file="page-mak.mkvi" level="style" name="definemakeup">
+ <cd:command category="structure" file="page-mak.mkvi" keywords="layout" level="style" name="definemakeup">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -22059,7 +22639,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mak.mkvi" level="style" name="setupmakeup">
+ <cd:command category="structure" file="page-mak.mkvi" keywords="layout" level="style" name="setupmakeup">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -22160,7 +22740,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mak.mkvi" level="document" name="makeup" type="environment">
+ <cd:command category="structure" file="page-mak.mkvi" keywords="layout" level="document" name="makeup" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -22170,7 +22750,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mak.mkvi" generated="yes" level="document" name="makeup" type="environment" variant="instance">
+ <cd:command category="structure" file="page-mak.mkvi" generated="yes" keywords="layout" level="document" name="makeup" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="makeup"/>
<cd:string value="makeup"/>
@@ -22189,7 +22769,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-marginblock.xml">
- <cd:command category="structure layout" file="page-mbk.mkvi" level="style" name="definemarginblock">
+ <cd:command category="structure" file="page-mbk.mkvi" keywords="layout" level="style" name="definemarginblock">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -22202,7 +22782,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mbk.mkvi" level="style" name="setupmarginblock">
+ <cd:command category="structure" file="page-mbk.mkvi" keywords="layout" level="style" name="setupmarginblock">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -22255,7 +22835,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mbk.mkvi" level="document" name="marginblock" type="environment">
+ <cd:command category="structure" file="page-mbk.mkvi" keywords="layout" level="document" name="marginblock" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -22473,7 +23053,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-marking.xml">
- <cd:command file="strc-mar.mkiv" level="style" name="definemarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="definemarking">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -22486,7 +23066,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="setupmarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="setupmarking">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:mark"/>
@@ -22509,7 +23089,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="system" name="relatemarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="system" name="relatemarking">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22519,7 +23099,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="setmarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="setmarking">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22529,14 +23109,15 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="system" name="resetmarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="system" name="resetmarking">
<cd:arguments>
<cd:keywords>
+ <cd:constant type="all"/>
<cd:constant type="cd:mark"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="system" name="synchronizemarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="system" name="synchronizemarking">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22549,7 +23130,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="strc-mar.mkiv" level="system" name="doifelsemarking">
+ <cd:command category="structure" file="strc-mar.mkiv" keywords="conditional" level="system" name="doifelsemarking">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:mark"/>
@@ -22562,7 +23143,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="strc-mar.mkiv" level="system" name="doifmarkingelse">
+ <cd:command category="structure" file="strc-mar.mkiv" keywords="conditional" level="system" name="doifmarkingelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:mark"/>
@@ -22575,7 +23156,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="getmarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="getmarking">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22583,6 +23164,7 @@
<cd:keywords optional="yes">
<cd:constant default="yes" type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
<cd:keywords optional="yes">
<cd:constant type="first"/>
@@ -22604,7 +23186,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchonemark">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchonemark">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22629,21 +23211,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchtwomarks">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchtwomarks">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchallmarks">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchallmarks">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchmark">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchmark">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22668,7 +23250,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchmarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchmarking">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22676,6 +23258,7 @@
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
<cd:keywords>
<cd:constant type="first"/>
@@ -22697,7 +23280,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchonemarking">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchonemarking">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22705,6 +23288,7 @@
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
<cd:keywords>
<cd:constant type="first"/>
@@ -22726,7 +23310,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchtwomarkings">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchtwomarkings">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22734,10 +23318,11 @@
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="strc-mar.mkiv" level="style" name="fetchallmarkings">
+ <cd:command category="structure" file="strc-mar.mkiv" level="style" name="fetchallmarkings">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:mark"/>
@@ -22745,6 +23330,7 @@
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
@@ -22864,9 +23450,9 @@
<cd:constant type="normal"/>
</cd:parameter>
<cd:parameter name="collapsing">
- <cd:constant type="1"/>
+ <cd:constant default="yes" type="1"/>
<cd:constant type="2"/>
- <cd:constant default="yes" type="3"/>
+ <cd:constant type="3"/>
<cd:constant type="none"/>
<cd:constant type="reset"/>
</cd:parameter>
@@ -23330,7 +23916,7 @@
<cd:command category="mathematics" file="math-ini.mkiv" level="document" name="unstackscripts"/>
</cd:interface>
<cd:interface file="i-mathalignment.xml">
- <cd:command category="mathematics alignment" file="math-ali.mkiv" level="style" name="definemathalignment">
+ <cd:command category="mathematics" file="math-ali.mkiv" keywords="alignment" level="style" name="definemathalignment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -23343,7 +23929,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics alignment" file="math-ali.mkiv" level="style" name="setupmathalignment">
+ <cd:command category="mathematics" file="math-ali.mkiv" keywords="alignment" level="style" name="setupmathalignment">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -23383,7 +23969,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics alignment" file="math-ali.mkiv" generated="yes" level="document" name="mathalignment" type="environment" variant="instance">
+ <cd:command category="mathematics" file="math-ali.mkiv" generated="yes" keywords="alignment" level="document" name="mathalignment" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="mathalignment"/>
</cd:sequence>
@@ -23399,7 +23985,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-mathcases.xml">
- <cd:command category="mathematics alignment" file="math-ali.mkiv" level="style" name="definemathcases">
+ <cd:command category="mathematics" file="math-ali.mkiv" keywords="alignment" level="style" name="definemathcases">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -23412,7 +23998,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics alignment" file="math-ali.mkiv" level="style" name="setupmathcases">
+ <cd:command category="mathematics" file="math-ali.mkiv" keywords="alignment" level="style" name="setupmathcases">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -23441,7 +24027,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics alignment" file="math-ali.mkiv" generated="yes" level="document" name="mathcases" type="environment" variant="instance">
+ <cd:command category="mathematics" file="math-ali.mkiv" generated="yes" keywords="alignment" level="document" name="mathcases" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="mathcases"/>
</cd:sequence>
@@ -23930,7 +24516,7 @@
<cd:command category="mathematics" file="math-fen.mkiv" level="style" name="checkedfences" type="environment"/>
</cd:interface>
<cd:interface file="i-mathmatrix.xml">
- <cd:command category="mathematics tables" file="math-ali.mkiv" level="style" name="definemathmatrix">
+ <cd:command category="mathematics" file="math-ali.mkiv" keywords="tables" level="style" name="definemathmatrix">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -23943,7 +24529,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics tables" file="math-ali.mkiv" level="style" name="setupmathmatrix">
+ <cd:command category="mathematics" file="math-ali.mkiv" keywords="tables" level="style" name="setupmathmatrix">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -23987,7 +24573,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics tables" file="math-ali.mkiv" generated="yes" level="document" name="mathmatrix" type="environment" variant="instance">
+ <cd:command category="mathematics" file="math-ali.mkiv" generated="yes" keywords="tables" level="document" name="mathmatrix" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="mathmatrix"/>
</cd:sequence>
@@ -23999,17 +24585,24 @@
<cd:instances>
<cd:constant value="matrix"/>
<cd:constant value="mathmatrix"/>
+ <cd:constant value="thematrix"/>
</cd:instances>
</cd:command>
- <cd:command category="mathematics tables" file="math-ali.mkiv" generated="yes" level="document" name="mathmatrix">
+ <cd:command category="mathematics" file="math-ali.mkiv" generated="yes" keywords="tables" level="document" name="mathmatrix" variant="instance">
<cd:sequence>
- <cd:variable value="mathmatrix"/>
+ <cd:instance value="mathmatrix"/>
</cd:sequence>
<cd:arguments>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupmathmatrix"/>
+ </cd:assignments>
<cd:content/>
</cd:arguments>
+ <cd:instances>
+ <cd:constant value="thematrix"/>
+ </cd:instances>
</cd:command>
- <cd:command category="mathematics tables" file="math-ali.mkiv" level="document" name="matrices" type="environment">
+ <cd:command category="mathematics" file="math-ali.mkiv" keywords="tables" level="document" name="matrices" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupmathmatrix"/>
@@ -24045,18 +24638,18 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics tables" file="math-pln.mkiv" level="document" name="bordermatrix">
+ <cd:command category="mathematics" file="math-pln.mkiv" keywords="tables" level="document" name="bordermatrix">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics tables" file="math-pln.mkiv" level="document" name="bbordermatrix">
+ <cd:command category="mathematics" file="math-pln.mkiv" keywords="tables" level="document" name="bbordermatrix">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="mathematics tables" file="math-pln.mkiv" level="document" name="bordermatrix" type="environment"/>
- <cd:command category="mathematics tables" file="math-pln.mkiv" level="document" name="bbordermatrix" type="environment"/>
+ <cd:command category="mathematics" file="math-pln.mkiv" keywords="tables" level="document" name="bordermatrix" type="environment"/>
+ <cd:command category="mathematics" file="math-pln.mkiv" keywords="tables" level="document" name="bbordermatrix" type="environment"/>
</cd:interface>
<cd:interface file="i-mathornament.xml">
<cd:command category="mathematics" file="math-rad.mkvi" level="style" name="definemathornament">
@@ -24264,6 +24857,18 @@
<cd:constant type="yes"/>
<cd:constant default="yes" type="no"/>
</cd:parameter>
+ <cd:parameter name="lt">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="rt">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="lb">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="rb">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -24587,7 +25192,23 @@
</cd:keywords>
</cd:arguments>
<cd:instances>
- <cd:resolve name="instance-mathovertextextensible"/>
+ <cd:constant value="overleftarrow"/>
+ <cd:constant value="overrightarrow"/>
+ <cd:constant value="overleftrightarrow"/>
+ <cd:constant value="overtwoheadleftarrow"/>
+ <cd:constant value="overtwoheadrightarrow"/>
+ <cd:constant value="overleftharpoondown"/>
+ <cd:constant value="overleftharpoonup"/>
+ <cd:constant value="overrightharpoondown"/>
+ <cd:constant value="overrightharpoonup"/>
+ <cd:constant value="overbar"/>
+ <cd:constant value="overbrace"/>
+ <cd:constant value="overparent"/>
+ <cd:constant value="overbracket"/>
+ <cd:constant value="overbartext"/>
+ <cd:constant value="overbracetext"/>
+ <cd:constant value="overparenttext"/>
+ <cd:constant value="overbrackettext"/>
</cd:instances>
</cd:command>
<cd:command category="mathematics" file="math-sty.mkvi" level="system" name="definemathundertextextensible">
@@ -24616,7 +25237,23 @@
</cd:keywords>
</cd:arguments>
<cd:instances>
- <cd:resolve name="instance-mathundertextextensible"/>
+ <cd:constant value="underleftarrow"/>
+ <cd:constant value="underrightarrow"/>
+ <cd:constant value="underleftrightarrow"/>
+ <cd:constant value="undertwoheadleftarrow"/>
+ <cd:constant value="undertwoheadrightarrow"/>
+ <cd:constant value="underleftharpoondown"/>
+ <cd:constant value="underleftharpoonup"/>
+ <cd:constant value="underrightharpoondown"/>
+ <cd:constant value="underrightharpoonup"/>
+ <cd:constant value="underbar"/>
+ <cd:constant value="underbrace"/>
+ <cd:constant value="underparent"/>
+ <cd:constant value="underbracket"/>
+ <cd:constant value="underbartext"/>
+ <cd:constant value="underbracetext"/>
+ <cd:constant value="underparenttext"/>
+ <cd:constant value="underbrackettext"/>
</cd:instances>
</cd:command>
<cd:command category="mathematics" file="math-sty.mkvi" level="system" name="definemathtriplet">
@@ -24694,43 +25331,95 @@
<cd:command category="mathematics" file="math-stc.mkvi" level="document" name="iff"/>
</cd:interface>
<cd:interface file="i-metapost.xml">
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPdefinitions" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPdefinitions" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces" optional="yes">
- <cd:constant type="cd:name"/>
+ <cd:constant type="metafun"/>
+ <cd:constant type="minifun"/>
+ <cd:constant type="extrafun"/>
+ <cd:constant type="lessfun"/>
+ <cd:constant type="doublefun"/>
+ <cd:constant type="binaryfun"/>
+ <cd:constant type="decimalfun"/>
+ <cd:constant type="mprun"/>
+ <cd:constant type="metapost"/>
+ <cd:constant type="nofun"/>
+ <cd:constant type="doublepost"/>
+ <cd:constant type="binarypost"/>
+ <cd:constant type="decimalpost"/>
+ <cd:constant type="simplefun"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPextensions" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPextensions" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes" optional="yes">
- <cd:constant type="cd:name"/>
+ <cd:constant type="metafun"/>
+ <cd:constant type="minifun"/>
+ <cd:constant type="extrafun"/>
+ <cd:constant type="lessfun"/>
+ <cd:constant type="doublefun"/>
+ <cd:constant type="binaryfun"/>
+ <cd:constant type="decimalfun"/>
+ <cd:constant type="mprun"/>
+ <cd:constant type="metapost"/>
+ <cd:constant type="nofun"/>
+ <cd:constant type="doublepost"/>
+ <cd:constant type="binarypost"/>
+ <cd:constant type="decimalpost"/>
+ <cd:constant type="simplefun"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPinitializations" type="environment"/>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPinclusions" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPinitializations" type="environment"/>
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPinclusions" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="+"/>
</cd:keywords>
<cd:keywords delimiters="braces" optional="yes">
- <cd:constant type="cd:name"/>
+ <cd:constant type="metafun"/>
+ <cd:constant type="minifun"/>
+ <cd:constant type="extrafun"/>
+ <cd:constant type="lessfun"/>
+ <cd:constant type="doublefun"/>
+ <cd:constant type="binaryfun"/>
+ <cd:constant type="decimalfun"/>
+ <cd:constant type="mprun"/>
+ <cd:constant type="metapost"/>
+ <cd:constant type="nofun"/>
+ <cd:constant type="doublepost"/>
+ <cd:constant type="binarypost"/>
+ <cd:constant type="decimalpost"/>
+ <cd:constant type="simplefun"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPinclusions">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPinclusions">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="+"/>
</cd:keywords>
<cd:keywords delimiters="braces" optional="yes">
- <cd:constant type="cd:name"/>
+ <cd:constant type="metafun"/>
+ <cd:constant type="minifun"/>
+ <cd:constant type="extrafun"/>
+ <cd:constant type="lessfun"/>
+ <cd:constant type="doublefun"/>
+ <cd:constant type="binaryfun"/>
+ <cd:constant type="decimalfun"/>
+ <cd:constant type="mprun"/>
+ <cd:constant type="metapost"/>
+ <cd:constant type="nofun"/>
+ <cd:constant type="doublepost"/>
+ <cd:constant type="binarypost"/>
+ <cd:constant type="decimalpost"/>
+ <cd:constant type="simplefun"/>
</cd:keywords>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="defineMPinstance">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="defineMPinstance">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -24743,7 +25432,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="setupMPinstance">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="setupMPinstance">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -24751,6 +25440,7 @@
<cd:assignments list="yes">
<cd:parameter name="format">
<cd:constant default="yes" type="metafun"/>
+ <cd:constant type="minifun"/>
<cd:constant type="mpost"/>
</cd:parameter>
<cd:parameter name="initializations">
@@ -24781,50 +25471,50 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="system" name="resetMPinstance">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="system" name="resetMPinstance">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="processMPfigurefile">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="processMPfigurefile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="MPdrawing" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="MPdrawing" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="-"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="resetMPdrawing"/>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="getMPdrawing"/>
- <cd:command begin="push" category="graphics metapost" end="pop" file="meta-ini.mkiv" level="system" name="MPdrawing" type="environment"/>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="MPdrawing">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="resetMPdrawing"/>
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="getMPdrawing"/>
+ <cd:command begin="push" category="graphics" end="pop" file="meta-ini.mkiv" keywords="metapost" level="system" name="MPdrawing" type="environment"/>
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="MPdrawing">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="MPclip" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="MPclip" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost fonts" file="meta-ini.mkiv" level="system" name="MPfontsizehskip">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost fonts" level="system" name="MPfontsizehskip">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:font"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="meta-ini.mkiv" level="style" name="setupMPvariables">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="setupMPvariables">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -24836,7 +25526,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="meta-ini.mkiv" level="style" name="setMPvariables">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="setMPvariables">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -24848,7 +25538,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="meta-ini.mkiv" level="style" name="setMPvariable">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="setMPvariable">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -24860,7 +25550,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="meta-ini.mkiv" level="system" name="MPrawvar">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="system" name="MPrawvar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24870,21 +25560,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="meta-ini.mkiv" level="style" name="MPvariable">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="meta-ini.mkiv" level="style" name="MPvar">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPvar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="meta-ini.mkiv" level="style" name="useMPvariables">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="useMPvariables">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -24894,7 +25584,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="uniqueMPgraphic" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="uniqueMPgraphic" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24904,7 +25594,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="uniqueMPgraphic">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="uniqueMPgraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24916,7 +25606,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="useMPgraphic" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="useMPgraphic" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24926,7 +25616,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="useMPgraphic">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="useMPgraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24938,7 +25628,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="usableMPgraphic" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="usableMPgraphic" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24948,7 +25638,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="reuseMPgraphic">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="reuseMPgraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24960,7 +25650,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="reusableMPgraphic" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="reusableMPgraphic" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24970,7 +25660,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="reusableMPgraphic">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="reusableMPgraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24982,7 +25672,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="uniqueMPpagegraphic" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="uniqueMPpagegraphic" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -24992,7 +25682,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="uniqueMPpagegraphic">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="uniqueMPpagegraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -25004,21 +25694,21 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="processMPbuffer">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="processMPbuffer">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="runMPbuffer">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="runMPbuffer">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPenvironment" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPenvironment" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="reset"/>
@@ -25027,37 +25717,63 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics" file="meta-ini.mkiv" level="style" name="resetMPenvironment"/>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="useMPenvironmentbuffer">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="resetMPenvironment"/>
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="useMPenvironmentbuffer">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="MPcode" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="MPcode" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces" optional="yes">
- <cd:constant type="cd:name"/>
+ <cd:constant type="metafun"/>
+ <cd:constant type="minifun"/>
+ <cd:constant type="extrafun"/>
+ <cd:constant type="lessfun"/>
+ <cd:constant type="doublefun"/>
+ <cd:constant type="binaryfun"/>
+ <cd:constant type="decimalfun"/>
+ <cd:constant type="mprun"/>
+ <cd:constant type="metapost"/>
+ <cd:constant type="nofun"/>
+ <cd:constant type="doublepost"/>
+ <cd:constant type="binarypost"/>
+ <cd:constant type="decimalpost"/>
+ <cd:constant type="simplefun"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="MPcode">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="MPcode">
<cd:arguments>
<cd:keywords delimiters="braces" optional="yes">
- <cd:constant type="cd:name"/>
+ <cd:constant type="metafun"/>
+ <cd:constant type="minifun"/>
+ <cd:constant type="extrafun"/>
+ <cd:constant type="lessfun"/>
+ <cd:constant type="doublefun"/>
+ <cd:constant type="binaryfun"/>
+ <cd:constant type="decimalfun"/>
+ <cd:constant type="mprun"/>
+ <cd:constant type="metapost"/>
+ <cd:constant type="nofun"/>
+ <cd:constant type="doublepost"/>
+ <cd:constant type="binarypost"/>
+ <cd:constant type="decimalpost"/>
+ <cd:constant type="simplefun"/>
</cd:keywords>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="MPrun" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="MPrun" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces" optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="document" name="useMPrun">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="document" name="useMPrun">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -25067,14 +25783,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="useMPlibrary">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="useMPlibrary">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="setMPtext">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="setMPtext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -25084,28 +25800,28 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPtext">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPtext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPstring">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="MPbetex">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="MPbetex">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost conditional" file="meta-ini.mkiv" level="style" name="doifelseMPgraphic">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost conditional" level="style" name="doifelseMPgraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -25118,7 +25834,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost conditional" file="meta-ini.mkiv" level="style" name="doifMPgraphicelse">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost conditional" level="style" name="doifMPgraphicelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -25131,14 +25847,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="staticMPfigure" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="staticMPfigure" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="staticMPgraphic" type="environment">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="staticMPgraphic" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -25148,7 +25864,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="usestaticMPfigure">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="usestaticMPfigure">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupscale"/>
@@ -25158,7 +25874,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="graphics metapost" file="meta-ini.mkiv" level="style" name="setupMPgraphics">
+ <cd:command category="graphics" file="meta-ini.mkiv" keywords="metapost" level="style" name="setupMPgraphics">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="color">
@@ -25173,7 +25889,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-mixedcolumns.xml">
- <cd:command category="structure layout" file="page-mix.mkiv" level="style" name="definemixedcolumns">
+ <cd:command category="columns" file="page-mix.mkiv" keywords="structure layout" level="style" name="definemixedcolumns">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -25186,7 +25902,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mix.mkiv" level="style" name="setupmixedcolumns">
+ <cd:command category="columns" file="page-mix.mkiv" keywords="structure layout" level="style" name="setupmixedcolumns">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -25269,7 +25985,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mix.mkiv" level="document" name="mixedcolumns" type="environment">
+ <cd:command category="columns" file="page-mix.mkiv" keywords="structure layout" level="document" name="mixedcolumns" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -25279,7 +25995,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-mix.mkiv" generated="yes" level="document" name="mixedcolumns" type="environment" variant="instance">
+ <cd:command category="columns" file="page-mix.mkiv" generated="yes" keywords="structure layout" level="document" name="mixedcolumns" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="mixedcolumns"/>
</cd:sequence>
@@ -25294,7 +26010,7 @@
<cd:constant value="columns"/>
</cd:instances>
</cd:command>
- <cd:command category="structure layout" file="page-smp.mkiv" level="style" name="setupcolumns">
+ <cd:command category="columns" file="page-smp.mkiv" keywords="structure layout" level="style" name="setupcolumns">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupmixedcolumns"/>
@@ -25406,7 +26122,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifelsemode">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifelsemode">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25419,7 +26135,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifmodeelse">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifmodeelse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25432,7 +26148,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifmode">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifmode">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25442,7 +26158,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifnotmode">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifnotmode">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25466,7 +26182,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifelseallmodes">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifelseallmodes">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25479,7 +26195,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifallmodeselse">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifallmodeselse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25492,7 +26208,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifallmodes">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifallmodes">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25505,7 +26221,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="core-env.mkiv" level="style" name="doifnotallmodes">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="style" name="doifnotallmodes">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -25571,7 +26287,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-modules.xml">
- <cd:command file="file-mod.mkvi" level="style" name="usemodule">
+ <cd:command category="structure" file="file-mod.mkvi" level="style" name="usemodule">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="m"/>
@@ -25590,7 +26306,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="style" name="usetexmodule">
+ <cd:command category="structure" file="file-mod.mkvi" level="style" name="usetexmodule">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="m"/>
@@ -25609,21 +26325,21 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="module" type="environment">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="module" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="module" type="environment" variant="string">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="module" type="environment" variant="string">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:file"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="setupmodule">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="setupmodule">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:file"/>
@@ -25639,7 +26355,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="moduleparameter">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="moduleparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -25649,15 +26365,15 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="currentmoduleparameter">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="currentmoduleparameter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="moduletestsection" type="environment"/>
- <cd:command file="file-mod.mkvi" level="system" name="fetchruntinecommand">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="moduletestsection" type="environment"/>
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="fetchruntinecommand">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -25665,14 +26381,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="luaenvironment">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="luaenvironment">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:file"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="file-mod.mkvi" level="system" name="useluamodule">
+ <cd:command category="structure" file="file-mod.mkvi" level="system" name="useluamodule">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -25681,7 +26397,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-narrow.xml">
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="style" name="definenarrower">
+ <cd:command category="whitespace" file="spac-hor.mkiv" keywords="layout" level="style" name="definenarrower">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -25694,7 +26410,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="style" name="setupnarrower">
+ <cd:command category="whitespace" file="spac-hor.mkiv" keywords="layout" level="style" name="setupnarrower">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -25727,7 +26443,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="document" name="narrower" type="environment">
+ <cd:command category="whitespace" file="spac-hor.mkiv" keywords="layout" level="document" name="narrower" type="environment">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant method="none" prefix="cd:sign" type="left"/>
@@ -25741,7 +26457,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" generated="yes" level="document" name="narrower" type="environment" variant="example">
+ <cd:command category="whitespace" file="spac-hor.mkiv" generated="yes" keywords="layout" level="document" name="narrower" type="environment" variant="example">
<cd:sequence>
<cd:variable value="narrower"/>
</cd:sequence>
@@ -25758,7 +26474,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="document" name="narrow" type="environment">
+ <cd:command category="whitespace" file="spac-hor.mkiv" keywords="layout" level="document" name="narrow" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -25768,7 +26484,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="document" name="narrow" type="environment" variant="name">
+ <cd:command category="whitespace" file="spac-hor.mkiv" keywords="layout" level="document" name="narrow" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -25785,7 +26501,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="whitespace layout" file="spac-hor.mkiv" level="document" name="narrow" type="environment" variant="assignment">
+ <cd:command category="whitespace" file="spac-hor.mkiv" keywords="layout" level="document" name="narrow" type="environment" variant="assignment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupnarrower"/>
@@ -25804,7 +26520,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-naturaltable.xml">
- <cd:command category="tables" file="tabl-ntb.mkiv" level="style" name="setupTABLE">
+ <cd:command category="tables" file="tabl-ntb.mkxl" keywords="background rules" level="style" name="setupTABLE">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="r"/>
@@ -25924,14 +26640,21 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TABLE" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLE" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TD" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEnested" type="environment">
+ <cd:arguments>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupTABLE"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TD" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="nx">
@@ -25959,77 +26682,77 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TR" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TR" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TC" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TC" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TX" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TX" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TY" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TY" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TH" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TH" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TN" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TN" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TABLEhead" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEhead" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TABLEnext" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEnext" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TABLEbody" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEbody" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TABLEfoot" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEfoot" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-ntb.mkiv" level="style" name="defineTABLEsetup">
+ <cd:command category="tables" file="tabl-ntb.mkxl" keywords="background rules" level="style" name="defineTABLEsetup">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26039,49 +26762,49 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TDs" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TDs" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkiv" level="document" name="TRs" type="environment">
+ <cd:command begin="b" category="tables" end="e" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TRs" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-ntb.mkiv" level="document" name="TABLE" type="environment">
+ <cd:command category="tables" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLE" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-ntb.mkiv" level="document" name="TABLEhead" type="environment">
+ <cd:command category="tables" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEhead" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-ntb.mkiv" level="document" name="TABLEnext" type="environment">
+ <cd:command category="tables" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEnext" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-ntb.mkiv" level="document" name="TABLEbody" type="environment">
+ <cd:command category="tables" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEbody" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-ntb.mkiv" level="document" name="TABLEfoot" type="environment">
+ <cd:command category="tables" file="tabl-ntb.mkxl" keywords="background rules" level="document" name="TABLEfoot" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -26090,7 +26813,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-note.xml">
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="setupnotation">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="setupnotation">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -26274,7 +26997,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="setupnotations">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="setupnotations">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -26284,7 +27007,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" generated="yes" level="document" name="note" type="environment" variant="instance:assignment">
+ <cd:command category="structure" file="strc-not.mkvi" generated="yes" keywords="notes" level="document" name="note" type="environment" variant="instance:assignment">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -26309,7 +27032,7 @@
<cd:constant value="endnote"/>
</cd:instances>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" generated="yes" level="document" name="note" type="environment" variant="instance">
+ <cd:command category="structure" file="strc-not.mkvi" generated="yes" keywords="notes" level="document" name="note" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -26323,7 +27046,7 @@
<cd:constant value="endnote"/>
</cd:instances>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" generated="yes" level="document" name="note" variant="instance">
+ <cd:command category="structure" file="strc-not.mkvi" generated="yes" keywords="notes" level="document" name="note" variant="instance">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -26340,7 +27063,7 @@
<cd:constant value="endnote"/>
</cd:instances>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" generated="yes" level="document" name="note" variant="instance:assignment">
+ <cd:command category="structure" file="strc-not.mkvi" generated="yes" keywords="notes" level="document" name="note" variant="instance:assignment">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -26365,7 +27088,7 @@
<cd:constant value="endnote"/>
</cd:instances>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="definenote">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="definenote">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26378,7 +27101,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="setupnote">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="setupnote">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -26521,7 +27244,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="setupnotes">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="setupnotes">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -26531,14 +27254,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="setupfootnotes">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="setupfootnotes">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupnote"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="setnote">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="setnote">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26551,7 +27274,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="setnote" variant="assignment">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="setnote" variant="assignment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26572,7 +27295,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="setnotetext">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="setnotetext">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26585,7 +27308,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="setnotetext" variant="assignment">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="setnotetext" variant="assignment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26606,7 +27329,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="placenotes">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="placenotes">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
@@ -26616,14 +27339,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="localnotes" type="environment">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="localnotes" type="environment">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="placelocalnotes">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="placelocalnotes">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26633,10 +27356,10 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="postponenotes"/>
- <cd:command category="structure notes" file="strc-not.mkvi" level="style" name="flushnotes"/>
- <cd:command category="structure notes" file="strc-not.mkvi" name="postponingnotes" type="environment"/>
- <cd:command category="structure notes conditional" file="strc-not.mkvi" level="system" name="doifelsenoteonsamepage">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="postponenotes"/>
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="style" name="flushnotes"/>
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" name="postponingnotes" type="environment"/>
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes conditional" level="system" name="doifelsenoteonsamepage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -26649,7 +27372,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes conditional" file="strc-not.mkvi" level="system" name="doifnoteonsamepageelse">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes conditional" level="system" name="doifnoteonsamepageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -26662,7 +27385,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes conditional" file="strc-not.mkvi" level="system" name="doifnotescollected">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes conditional" level="system" name="doifnotescollected">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -26672,7 +27395,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="system" name="notesymbol">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="system" name="notesymbol">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26682,7 +27405,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="note">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="note">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -26692,7 +27415,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="footnotetext">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="footnotetext">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:reference"/>
@@ -26702,7 +27425,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="footnotetext" variant="assignment">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="footnotetext" variant="assignment">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="title">
@@ -26720,22 +27443,22 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="placefootnotes">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="placefootnotes">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupnote"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="localfootnotes" type="environment"/>
- <cd:command category="structure notes" file="strc-not.mkvi" level="document" name="placelocalfootnotes">
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="localfootnotes" type="environment"/>
+ <cd:command category="structure" file="strc-not.mkvi" keywords="notes" level="document" name="placelocalfootnotes">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupnote"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-lnt.mkvi" level="style" name="definelinenote">
+ <cd:command category="structure" file="strc-lnt.mkvi" keywords="notes" level="style" name="definelinenote">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26748,7 +27471,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-lnt.mkvi" level="style" name="setuplinenote">
+ <cd:command category="structure" file="strc-lnt.mkvi" keywords="notes" level="style" name="setuplinenote">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -26769,11 +27492,14 @@
<cd:parameter name="compressdistance">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="compressstopper">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:inherit name="setupnote"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-lnt.mkvi" generated="yes" level="document" name="linenote" variant="instance">
+ <cd:command category="structure" file="strc-lnt.mkvi" generated="yes" keywords="notes" level="document" name="linenote" variant="instance">
<cd:sequence>
<cd:instance value="linenote"/>
</cd:sequence>
@@ -26786,7 +27512,7 @@
<cd:constant value="linenote"/>
</cd:instances>
</cd:command>
- <cd:command category="structure notes" file="strc-lnt.mkvi" generated="yes" level="document" name="startlinenote" variant="instance">
+ <cd:command category="structure" file="strc-lnt.mkvi" generated="yes" keywords="notes" level="document" name="startlinenote" variant="instance">
<cd:sequence>
<cd:string value="start"/>
<cd:instance value="linenote"/>
@@ -26803,7 +27529,7 @@
<cd:constant value="linenote"/>
</cd:instances>
</cd:command>
- <cd:command category="structure notes" file="strc-lnt.mkvi" generated="yes" level="document" name="stoplinenote" variant="instance">
+ <cd:command category="structure" file="strc-lnt.mkvi" generated="yes" keywords="notes" level="document" name="stoplinenote" variant="instance">
<cd:sequence>
<cd:string value="stop"/>
<cd:instance value="linenote"/>
@@ -26817,7 +27543,7 @@
<cd:constant value="linenote"/>
</cd:instances>
</cd:command>
- <cd:command category="structure notes" file="strc-lnt.mkvi" level="document" name="fromlinenote">
+ <cd:command category="structure" file="strc-lnt.mkvi" keywords="notes" level="document" name="fromlinenote">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:reference"/>
@@ -26827,14 +27553,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-lnt.mkvi" level="document" name="tolinenote">
+ <cd:command category="structure" file="strc-lnt.mkvi" keywords="notes" level="document" name="tolinenote">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:reference"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-tnt.mkiv" level="style" name="definetextnote">
+ <cd:command category="structure" file="strc-tnt.mkiv" keywords="notes" level="style" name="definetextnote">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -26847,7 +27573,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-tnt.mkiv" level="style" name="setuptextnote">
+ <cd:command category="structure" file="strc-tnt.mkiv" keywords="notes" level="style" name="setuptextnote">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -26872,7 +27598,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure notes" file="strc-tnt.mkiv" generated="yes" level="document" name="textnote">
+ <cd:command category="structure" file="strc-tnt.mkiv" generated="yes" keywords="notes" level="document" name="textnote" variant="example">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setuptextnote"/>
@@ -26994,7 +27720,7 @@
</cd:command>
<cd:command category="pdf" file="pack-obj.mkiv" level="system" name="defaultobjectreference"/>
<cd:command category="pdf" file="pack-obj.mkiv" level="system" name="defaultobjectpage"/>
- <cd:command category="pdf conditional" file="pack-obj.mkiv" level="system" name="doifelseobjectfound">
+ <cd:command category="pdf" file="pack-obj.mkiv" keywords="conditional" level="system" name="doifelseobjectfound">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -27010,7 +27736,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="pack-obj.mkiv" level="system" name="doifobjectfoundelse">
+ <cd:command category="pdf" file="pack-obj.mkiv" keywords="conditional" level="system" name="doifobjectfoundelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -27026,7 +27752,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="pack-obj.mkiv" level="system" name="doifelseobjectreferencefound">
+ <cd:command category="pdf" file="pack-obj.mkiv" keywords="conditional" level="system" name="doifelseobjectreferencefound">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -27042,7 +27768,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="pdf conditional" file="pack-obj.mkiv" level="system" name="doifobjectreferencefoundelse">
+ <cd:command category="pdf" file="pack-obj.mkiv" keywords="conditional" level="system" name="doifobjectreferencefoundelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -27060,7 +27786,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-offset.xml">
- <cd:command category="layout" file="pack-box.mkiv" level="style" name="setupoffsetbox">
+ <cd:command category="boxes" file="pack-box.mkiv" keywords="layout" level="style" name="setupoffsetbox">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="x">
@@ -27111,14 +27837,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="pack-box.mkiv" level="style" name="setupoffset">
+ <cd:command category="boxes" file="pack-box.mkiv" keywords="layout" level="style" name="setupoffset">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupoffsetbox"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="pack-box.mkiv" level="system" name="offsetbox">
+ <cd:command category="boxes" file="pack-box.mkiv" keywords="layout" level="system" name="offsetbox">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupoffsetbox"/>
@@ -27127,7 +27853,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="pack-box.mkiv" level="document" name="offset">
+ <cd:command category="boxes" file="pack-box.mkiv" keywords="layout" level="document" name="offset">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupoffset"/>
@@ -27158,8 +27884,104 @@
</cd:command>
<cd:command category="layout" file="page-fac.mkiv" level="document" name="opposite" type="environment"/>
</cd:interface>
+ <cd:interface file="i-orientation.xml">
+ <cd:command category="alignment" file="pack-ori.mkxl" level="style" name="defineorientation">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setuporientation"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="alignment" file="pack-ori.mkxl" level="style" name="setuporientation">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes">
+ <cd:parameter name="orientation">
+ <cd:constant type="up"/>
+ <cd:constant type="down"/>
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="top"/>
+ <cd:constant type="bottom"/>
+ <cd:constant default="yes" type="normal"/>
+ </cd:parameter>
+ <cd:parameter name="horizontal">
+ <cd:constant type="left"/>
+ <cd:constant type="middle"/>
+ <cd:constant type="right"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant default="yes" type="normal"/>
+ </cd:parameter>
+ <cd:parameter name="vertical">
+ <cd:constant type="line"/>
+ <cd:constant type="top"/>
+ <cd:constant type="middle"/>
+ <cd:constant type="bottom"/>
+ <cd:constant default="yes" type="normal"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="alignment" file="pack-ori.mkxl" level="system" name="theorientation">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="normal"/>
+ <cd:constant type="up"/>
+ <cd:constant type="down"/>
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="top"/>
+ <cd:constant type="bottom"/>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="alignment" file="pack-ori.mkxl" level="system" name="autoorientation">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="normal"/>
+ <cd:constant type="up"/>
+ <cd:constant type="down"/>
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="top"/>
+ <cd:constant type="bottom"/>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="alignment" file="pack-ori.mkxl" keywords="conditional" level="system" name="doifelseorientation">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="normal"/>
+ <cd:constant type="up"/>
+ <cd:constant type="down"/>
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="top"/>
+ <cd:constant type="bottom"/>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:true"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:false"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ </cd:interface>
<cd:interface file="i-ornament.xml">
- <cd:command category="background fonts colors" file="pack-box.mkiv" level="document" name="ornamenttext" variant="collector">
+ <cd:command category="background" file="pack-box.mkiv" keywords="fonts colors" level="document" name="ornamenttext" variant="collector">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="alternative">
@@ -27184,7 +28006,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background fonts colors" file="pack-box.mkiv" level="document" name="ornamenttext" variant="layer">
+ <cd:command category="background" file="pack-box.mkiv" keywords="fonts colors" level="document" name="ornamenttext" variant="layer">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="alternative">
@@ -27202,7 +28024,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background fonts colors" file="pack-box.mkiv" level="document" name="ornamenttext" variant="direct">
+ <cd:command category="background" file="pack-box.mkiv" keywords="fonts colors" level="document" name="ornamenttext" variant="direct">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27213,7 +28035,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="background fonts colors" file="pack-box.mkiv" level="style" name="defineornament" variant="collector">
+ <cd:command category="background" file="pack-box.mkiv" keywords="fonts colors" level="style" name="defineornament" variant="collector">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27237,7 +28059,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background fonts colors" file="pack-box.mkiv" level="style" name="defineornament" variant="layer">
+ <cd:command category="background" file="pack-box.mkiv" keywords="fonts colors" level="style" name="defineornament" variant="layer">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27254,7 +28076,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background fonts colors" file="pack-box.mkiv" generated="yes" level="document" name="ornament" variant="example">
+ <cd:command category="background" file="pack-box.mkiv" generated="yes" keywords="fonts colors" level="document" name="ornament" variant="example">
<cd:sequence>
<cd:variable value="ornament"/>
</cd:sequence>
@@ -27330,14 +28152,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background colors" file="pack-rul.mkiv" level="system" name="overlaycolor"/>
- <cd:command category="background colors" file="pack-rul.mkiv" level="system" name="overlaylinecolor"/>
+ <cd:command category="background colors" file="pack-rul.mkiv" keywords="background colors" level="system" name="overlaycolor"/>
+ <cd:command category="background colors" file="pack-rul.mkiv" keywords="background colors" level="system" name="overlaylinecolor"/>
<cd:command category="background" file="pack-rul.mkiv" level="system" name="overlaywidth"/>
<cd:command category="background" file="pack-rul.mkiv" level="system" name="overlayheight"/>
<cd:command category="background" file="pack-rul.mkiv" level="system" name="overlaydepth"/>
<cd:command category="background" file="pack-rul.mkiv" level="system" name="overlayoffset"/>
<cd:command category="background" file="pack-rul.mkiv" level="system" name="overlaylinewidth"/>
- <cd:command category="background conditional" file="pack-rul.mkiv" level="system" name="doifelseoverlay">
+ <cd:command category="background" file="pack-rul.mkiv" keywords="conditional" level="system" name="doifelseoverlay">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -27350,7 +28172,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background conditional" file="pack-rul.mkiv" level="system" name="doifoverlayelse">
+ <cd:command category="background" file="pack-rul.mkiv" keywords="conditional" level="system" name="doifoverlayelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -27365,7 +28187,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pagebreak.xml">
- <cd:command file="page-brk.mkiv" level="style" name="definepagebreak">
+ <cd:command category="structure" file="page-brk.mkiv" level="style" name="definepagebreak">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27396,10 +28218,11 @@
<cd:constant type="lastpage"/>
<cd:constant type="start"/>
<cd:constant type="stop"/>
+ <cd:constant type="xy"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="document" name="pagebreak">
+ <cd:command category="structure" file="page-brk.mkiv" level="document" name="pagebreak">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="empty"/>
@@ -27427,18 +28250,19 @@
<cd:constant type="lastpage"/>
<cd:constant type="start"/>
<cd:constant type="stop"/>
+ <cd:constant type="xy"/>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="document" name="page">
+ <cd:command category="structure" file="page-brk.mkiv" level="document" name="page">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:inherit name="pagebreak"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="style" name="definecolumnbreak">
+ <cd:command category="structure" file="page-brk.mkiv" keywords="columns" level="style" name="definecolumnbreak">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27455,7 +28279,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="document" name="columnbreak">
+ <cd:command category="structure" file="page-brk.mkiv" keywords="columns" level="document" name="columnbreak">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="yes"/>
@@ -27470,14 +28294,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="document" name="column">
+ <cd:command category="structure" file="page-brk.mkiv" keywords="columns" level="document" name="column">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:inherit name="columnbreak"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="style" name="definepagechecker">
+ <cd:command category="structure" file="page-brk.mkiv" level="style" name="definepagechecker">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27490,7 +28314,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="style" name="setuppagechecker">
+ <cd:command category="structure" file="page-brk.mkiv" level="style" name="setuppagechecker">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -27520,7 +28344,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="document" name="checkpage">
+ <cd:command category="structure" file="page-brk.mkiv" level="document" name="checkpage">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27530,7 +28354,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="document" name="testpage">
+ <cd:command category="structure" file="page-brk.mkiv" level="document" name="testpage">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:number"/>
@@ -27540,7 +28364,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="system" name="testpageonly">
+ <cd:command category="structure" file="page-brk.mkiv" level="system" name="testpageonly">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:number"/>
@@ -27550,7 +28374,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="system" name="testpagesync">
+ <cd:command category="structure" file="page-brk.mkiv" level="system" name="testpagesync">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:number"/>
@@ -27560,7 +28384,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-brk.mkiv" level="document" name="testcolumn">
+ <cd:command category="structure" file="page-brk.mkiv" keywords="columns" level="document" name="testcolumn">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:number"/>
@@ -27572,7 +28396,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pagecolumns.xml">
- <cd:command category="structure layout" file="page-pcl.mkiv" level="style" name="definepagecolumns">
+ <cd:command category="columns" file="page-pcl.mkiv" keywords="structure layout" level="style" name="definepagecolumns">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27585,7 +28409,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-pcl.mkiv" level="style" name="setuppagecolumns">
+ <cd:command category="columns" file="page-pcl.mkiv" keywords="structure layout" level="style" name="setuppagecolumns">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -27626,21 +28450,21 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-pcl.mkiv" level="document" name="pagecolumns" type="environment" variant="name">
+ <cd:command category="columns" file="page-pcl.mkiv" keywords="structure layout" level="document" name="pagecolumns" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-pcl.mkiv" level="document" name="pagecolumns" type="environment">
+ <cd:command category="columns" file="page-pcl.mkiv" keywords="structure layout" level="document" name="pagecolumns" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setuppagecolumns"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-pcl.mkiv" generated="yes" level="document" name="pagecolumns" type="environment" variant="instance">
+ <cd:command category="columns" file="page-pcl.mkiv" generated="yes" keywords="structure layout" level="document" name="pagecolumns" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="pagecolumns"/>
</cd:sequence>
@@ -27712,7 +28536,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pagegrid.xml">
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="definecolumnset">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="definecolumnset">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27725,7 +28549,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="setupcolumnset">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="setupcolumnset">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -27768,7 +28592,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" generated="yes" level="document" name="columnset" type="environment" variant="example">
+ <cd:command category="columns" file="page-cst.mkiv" generated="yes" keywords="structure layout" level="document" name="columnset" type="environment" variant="example">
<cd:sequence>
<cd:variable value="columnset"/>
</cd:sequence>
@@ -27778,7 +28602,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="document" name="columnset" type="environment">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="document" name="columnset" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -27788,7 +28612,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="definecolumnsetspan">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="definecolumnsetspan">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27801,7 +28625,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="setupcolumnsetspan">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="setupcolumnsetspan">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -27827,7 +28651,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="document" name="columnsetspan" type="environment">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="document" name="columnsetspan" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27859,14 +28683,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="columnsetspanwidth">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="columnsetspanwidth">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="definecolumnsetarea">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="definecolumnsetarea">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27879,7 +28703,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="setupcolumnsetarea">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="setupcolumnsetarea">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -27919,7 +28743,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="setupcolumnsetareatext">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="setupcolumnsetareatext">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27929,7 +28753,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="setupcolumnsetlines">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="setupcolumnsetlines">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -27945,7 +28769,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout" file="page-cst.mkiv" level="style" name="setupcolumnsetstart">
+ <cd:command category="columns" file="page-cst.mkiv" keywords="structure layout" level="style" name="setupcolumnsetstart">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28097,14 +28921,14 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pagenumber.xml">
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="setuprealpagenumber">
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="setuprealpagenumber">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupcounter"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="setupuserpagenumber">
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="setupuserpagenumber">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="viewerprefix">
@@ -28121,14 +28945,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="setupsubpagenumber">
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="setupsubpagenumber">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupcounter"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="setuppagenumber">
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="setuppagenumber">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="viewerprefix">
@@ -28145,10 +28969,10 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="resetuserpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="resetsubpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="resetpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="setuppagenumbering">
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="resetuserpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="resetsubpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="resetpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="setuppagenumbering">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="alternative">
@@ -28190,6 +29014,7 @@
<cd:constant type="inmargin"/>
<cd:constant type="atmargin"/>
<cd:constant type="marginedge"/>
+ <cd:constant type="none"/>
</cd:parameter>
<cd:parameter name="style">
<cd:constant type="cd:style"/>
@@ -28201,44 +29026,44 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="firstrealpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="firstuserpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="firstsubpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="lastrealpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="lastuserpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="lastsubpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="prevrealpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="prevuserpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="prevsubpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="nextrealpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="nextuserpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="nextsubpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="firstrealpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="firstuserpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="firstsubpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="prevrealpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="prevuserpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="prevsubpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="nextrealpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="nextuserpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="nextsubpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="lastrealpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="lastuserpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="system" name="lastsubpage"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="realpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="userpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="subpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="pagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="prefixedpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="incrementpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="incrementsubpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="decrementpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="decrementsubpagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="completepagenumber"/>
- <cd:command category="counter" file="strc-pag.mkiv" level="style" name="placepagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="firstrealpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="firstuserpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="firstsubpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="lastrealpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="lastuserpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="lastsubpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="prevrealpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="prevuserpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="prevsubpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="nextrealpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="nextuserpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="nextsubpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="firstrealpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="firstuserpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="firstsubpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="prevrealpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="prevuserpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="prevsubpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="nextrealpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="nextuserpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="nextsubpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="lastrealpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="lastuserpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="system" name="lastsubpage"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="realpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="userpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="subpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="pagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="prefixedpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="incrementpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="incrementsubpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="decrementpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="decrementsubpagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="completepagenumber"/>
+ <cd:command category="counter" file="strc-pag.mkiv" keywords="structure" level="style" name="placepagenumber"/>
</cd:interface>
<cd:interface file="i-pageselection.xml">
- <cd:command file="page-sel.mkvi" level="document" name="insertpages">
+ <cd:command category="graphics" file="page-sel.mkvi" keywords="structure" level="document" name="insertpages">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -28259,7 +29084,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="page-sel.mkvi" level="document" name="filterpages">
+ <cd:command category="graphics" file="page-sel.mkvi" keywords="structure" level="document" name="filterpages">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -28283,7 +29108,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="page-sel.mkvi" level="document" name="copypages">
+ <cd:command category="graphics" file="page-sel.mkvi" keywords="structure" level="document" name="copypages">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -28305,7 +29130,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="page-sel.mkvi" level="document" name="combinepages">
+ <cd:command category="graphics" file="page-sel.mkvi" keywords="structure" level="document" name="combinepages">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -28372,7 +29197,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="page-sel.mkvi" level="document" name="slicepages">
+ <cd:command category="graphics" file="page-sel.mkvi" keywords="structure" level="document" name="slicepages">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -28421,7 +29246,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pageshift.xml">
- <cd:command file="page-imp.mkiv" level="style" name="definepageshift">
+ <cd:command category="layout" file="page-imp.mkiv" level="style" name="definepageshift">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28435,7 +29260,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-imp.mkiv" level="style" name="setuppageshift">
+ <cd:command category="layout" file="page-imp.mkiv" level="style" name="setuppageshift">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant default="yes" type="page"/>
@@ -28451,8 +29276,18 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pagestate.xml">
- <cd:command file="spac-pag.mkiv" level="system" name="signalrightpage"/>
- <cd:command file="spac-pag.mkiv" level="system" name="doifelserightpage">
+ <cd:command category="twopassdata" file="spac-pag.mkiv" level="system" name="signalrightpage"/>
+ <cd:command category="twopassdata" file="spac-pag.mkiv" keywords="conditional" level="system" name="doifelserightpage">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:true"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:false"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="twopassdata" file="spac-pag.mkiv" keywords="conditional" level="system" name="doifrightpageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -28462,8 +29297,8 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="spac-pag.mkiv" level="system" name="rightpageorder"/>
- <cd:command file="core-dat.mkiv" level="system" name="definepagestate">
+ <cd:command category="twopassdata" file="spac-pag.mkiv" level="system" name="rightpageorder"/>
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="definepagestate">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28476,7 +29311,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="setuppagestate">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="setuppagestate">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -28489,7 +29324,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="setpagestate">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="setpagestate">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28500,7 +29335,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="pagestaterealpage">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="pagestaterealpage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -28511,7 +29346,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="setpagestaterealpageno">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="setpagestaterealpageno">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -28522,7 +29357,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="pagestaterealpageorder">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="pagestaterealpageorder">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -28533,21 +29368,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="autopagestaterealpage">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="autopagestaterealpage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="setautopagestaterealpageno">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="setautopagestaterealpageno">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-dat.mkiv" level="system" name="autopagestaterealpageorder">
+ <cd:command category="twopassdata" file="core-dat.mkiv" keywords="counter pagenumber" level="system" name="autopagestaterealpageorder">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -28556,7 +29391,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pagemarks.xml">
- <cd:command file="page-ini.mkiv" level="style" name="markpage">
+ <cd:command category="structure" file="page-ini.mkiv" level="style" name="markpage">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28566,21 +29401,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-ini.mkiv" level="style" name="markedpages">
+ <cd:command category="structure" file="page-ini.mkiv" level="style" name="markedpages">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-ini.mkiv" level="style" name="markpages" type="environment">
+ <cd:command category="structure" file="page-ini.mkiv" level="style" name="markpages" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="page-ini.mkiv" level="style" name="doifelsemarkedpage">
+ <cd:command category="structure" file="page-ini.mkiv" keywords="conditional" level="style" name="doifelsemarkedpage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -28595,7 +29430,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-pairedbox.xml">
- <cd:command file="pack-com.mkiv" level="style" name="definepairedbox">
+ <cd:command category="tables" file="pack-com.mkiv" level="style" name="definepairedbox">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28608,7 +29443,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="pack-com.mkiv" level="style" name="setuppairedbox">
+ <cd:command category="tables" file="pack-com.mkiv" level="style" name="setuppairedbox">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -28666,7 +29501,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="pack-com.mkiv" level="document" name="placepairedbox">
+ <cd:command category="tables" file="pack-com.mkiv" level="document" name="placepairedbox">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28680,7 +29515,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="pack-com.mkiv" level="document" name="placepairedbox" type="environment">
+ <cd:command category="tables" file="pack-com.mkiv" level="document" name="placepairedbox" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -28690,7 +29525,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="pack-com.mkiv" generated="yes" level="style" name="setuppairedbox" variant="instance">
+ <cd:command category="tables" file="pack-com.mkiv" generated="yes" level="style" name="setuppairedbox" variant="instance">
<cd:sequence>
<cd:string value="setup"/>
<cd:instance value="pairedbox"/>
@@ -28704,7 +29539,7 @@
<cd:constant value="legend"/>
</cd:instances>
</cd:command>
- <cd:command file="pack-com.mkiv" generated="yes" level="document" name="placepairedbox" variant="instance">
+ <cd:command category="tables" file="pack-com.mkiv" generated="yes" level="document" name="placepairedbox" variant="instance">
<cd:sequence>
<cd:string value="place"/>
<cd:instance value="pairedbox"/>
@@ -28722,7 +29557,7 @@
<cd:constant value="legend"/>
</cd:instances>
</cd:command>
- <cd:command file="pack-com.mkiv" generated="yes" level="document" name="placepairedbox" type="environment" variant="instance">
+ <cd:command category="tables" file="pack-com.mkiv" generated="yes" level="document" name="placepairedbox" type="environment" variant="instance">
<cd:sequence>
<cd:string value="place"/>
<cd:instance value="pairedbox"/>
@@ -28736,13 +29571,13 @@
<cd:constant value="legend"/>
</cd:instances>
</cd:command>
- <cd:command file="pack-com.mkiv" level="document" name="placeontopofeachother">
+ <cd:command category="tables" file="pack-com.mkiv" level="document" name="placeontopofeachother">
<cd:arguments>
<cd:content/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="pack-com.mkiv" level="document" name="placesidebyside">
+ <cd:command category="tables" file="pack-com.mkiv" level="document" name="placesidebyside">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -29000,7 +29835,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-paragraphnumber.xml">
- <cd:command category="structure counter" file="page-par.mkiv" level="style" name="setupparagraphnumbering">
+ <cd:command category="structure" file="page-par.mkiv" keywords="counter" level="style" name="setupparagraphnumbering">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="state">
@@ -29189,7 +30024,7 @@
<cd:command category="tables" file="tabl-mis.mkiv" level="document" name="paragraphscell" type="environment"/>
</cd:interface>
<cd:interface file="i-parallel.xml">
- <cd:command file="buff-par.mkvi" level="style" name="defineparallel">
+ <cd:command category="columns" file="buff-par.mkvi" keywords="structure" level="style" name="defineparallel">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -29199,7 +30034,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="buff-par.mkvi" level="style" name="setupparallel">
+ <cd:command category="columns" file="buff-par.mkvi" keywords="structure" level="style" name="setupparallel">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -29223,7 +30058,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="buff-par.mkvi" level="document" name="placeparallel">
+ <cd:command category="columns" file="buff-par.mkvi" keywords="structure" level="document" name="placeparallel">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -29236,7 +30071,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="buff-par.mkvi" level="style" name="doifelseparallel">
+ <cd:command category="columns" file="buff-par.mkvi" keywords="structure conditional" level="style" name="doifelseparallel">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29253,7 +30088,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="buff-par.mkvi" level="style" name="doifparallelelse">
+ <cd:command category="columns" file="buff-par.mkvi" keywords="structure conditional" level="style" name="doifparallelelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29270,7 +30105,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="buff-par.mkvi" level="style" name="resetparallel">
+ <cd:command category="columns" file="buff-par.mkvi" keywords="structure" level="style" name="resetparallel">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -29281,7 +30116,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="buff-par.mkvi" generated="yes" level="document" name="parallel" type="environment" variant="example">
+ <cd:command category="columns" file="buff-par.mkvi" generated="yes" keywords="structure" level="document" name="parallel" type="environment" variant="example">
<cd:sequence>
<cd:variable value="parallel"/>
</cd:sequence>
@@ -29316,6 +30151,82 @@
</cd:arguments>
</cd:command>
</cd:interface>
+ <cd:interface file="i-parwrapper.xml">
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="freezeparagraphproperties"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="defrostparagraphproperties"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="updateparagraphproperties"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="updateparagraphpenalties"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="updateparagraphdemerits"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="updateparagraphshapes"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="setparagraphfreezing"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="forgetparagraphfreezing"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="registerparwrapper">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:content/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="registerparwrapperreverse">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:content/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="directparwrapper">
+ <cd:arguments>
+ <cd:content/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="forgetparwrapper"/>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="unregisterparwrapper">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="doifelseparwrapper">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:true"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:false"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-par.mkxl" level="system" name="showparwrapperstate">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-par.lmt" level="system" name="getparwrapper">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-par.lmt" level="system" name="lastparwrapper">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ </cd:interface>
<cd:interface file="i-pdf.xml">
<cd:command category="pdf" file="back-pdf.mkiv" level="system" name="pdfbackendsetcatalog">
<cd:arguments>
@@ -29534,22 +30445,22 @@
<cd:command category="symbols" file="enco-ini.mkiv" level="document" name="unknown"/>
</cd:interface>
<cd:interface file="i-phantom.xml">
- <cd:command file="supp-box.mkiv" level="style" name="phantom">
+ <cd:command category="strings" file="supp-box.mkiv" level="style" name="phantom">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="style" name="hphantom">
+ <cd:command category="strings" file="supp-box.mkiv" level="style" name="hphantom">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="style" name="vphantom">
+ <cd:command category="strings" file="supp-box.mkiv" level="style" name="vphantom">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="pack-box.mkiv" level="style" name="phantombox">
+ <cd:command category="boxes" file="pack-box.mkiv" keywords="strings" level="style" name="phantombox">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="width">
@@ -29565,6 +30476,53 @@
</cd:arguments>
</cd:command>
</cd:interface>
+ <cd:interface file="i-placeholder.xml">
+ <cd:command category="structure" file="typo-plc.mkiv" level="style" name="defineplaceholder">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupplaceholder"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="structure" file="typo-plc.mkiv" level="style" name="setupplaceholder">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes">
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="text">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="style">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="color">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="structure" file="typo-plc.mkiv" level="document" name="placeholder">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ </cd:interface>
<cd:interface file="i-placement.xml">
<cd:command category="layout" file="pack-mis.mkiv" level="style" name="defineplacement">
<cd:arguments>
@@ -29640,7 +30598,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-position.xml">
- <cd:command category="conditional" file="anch-pgr.mkiv" level="system" name="doifpositionaction">
+ <cd:command file="anch-pgr.mkiv" keywords="conditional" level="system" name="doifpositionaction">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29653,7 +30611,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pgr.mkiv" level="system" name="doifelsepositionaction">
+ <cd:command file="anch-pgr.mkiv" keywords="conditional" level="system" name="doifelsepositionaction">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29666,7 +30624,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pgr.mkiv" level="system" name="doifpositionactionelse">
+ <cd:command file="anch-pgr.mkiv" keywords="conditional" level="system" name="doifpositionactionelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29693,7 +30651,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="MPoverlayanchor">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="MPoverlayanchor">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29717,7 +30675,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="MPpositiongraphic" type="environment">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="MPpositiongraphic" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29727,7 +30685,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="MPpositiongraphic">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="MPpositiongraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29739,14 +30697,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="MPpositionmethod" type="environment">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="MPpositionmethod" type="environment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="setMPpositiongraphic">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="setMPpositiongraphic">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29761,7 +30719,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="setMPpositiongraphicrange">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="setMPpositiongraphicrange">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29779,7 +30737,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="MPgetposboxes">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="MPgetposboxes">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -29789,7 +30747,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="MPgetmultipars">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="MPgetmultipars">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -29799,7 +30757,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="background metapost" file="anch-pgr.mkiv" level="system" name="MPgetmultishape">
+ <cd:command category="background" file="anch-pgr.mkiv" keywords="metapost" level="system" name="MPgetmultishape">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30123,7 +31081,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifposition">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifposition">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30136,7 +31094,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifelseposition">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifelseposition">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30149,7 +31107,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifpositionelse">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifpositionelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30162,7 +31120,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifelsepositiononpage">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifelsepositiononpage">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30178,7 +31136,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifpositiononpageelse">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifpositiononpageelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30234,7 +31192,7 @@
<cd:command file="anch-pos.mkiv" level="system" name="tracepositions"/>
<cd:command file="anch-pos.mkiv" level="system" name="enableparpositions"/>
<cd:command file="anch-pos.mkiv" level="system" name="disableparpositions"/>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifelseoverlapping">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifelseoverlapping">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30250,7 +31208,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifoverlappingelse">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifoverlappingelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -30266,7 +31224,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifelsepositionsonsamepage">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifelsepositionsonsamepage">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -30279,7 +31237,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifpositionsonsamepageelse">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifpositionsonsamepageelse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -30292,7 +31250,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifelsepositionsonthispage">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifelsepositionsonthispage">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -30305,7 +31263,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifpositionsonthispageelse">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifpositionsonthispageelse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -30318,7 +31276,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifelsepositionsused">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifelsepositionsused">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -30328,7 +31286,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="anch-pos.mkiv" level="system" name="doifpositionsusedelse">
+ <cd:command file="anch-pos.mkiv" keywords="conditional" level="system" name="doifpositionsusedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -30510,7 +31468,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-processor.xml">
- <cd:command category="fonts colors" file="typo-prc.mkvi" level="style" name="defineprocessor">
+ <cd:command category="fonts" file="typo-prc.mkvi" keywords="colors" level="style" name="defineprocessor">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -30523,7 +31481,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="typo-prc.mkvi" level="style" name="setupprocessor">
+ <cd:command category="fonts" file="typo-prc.mkvi" keywords="colors" level="style" name="setupprocessor">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -30552,7 +31510,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts colors" file="typo-prc.mkvi" level="system" name="applyprocessor">
+ <cd:command category="fonts" file="typo-prc.mkvi" keywords="colors" level="system" name="applyprocessor">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -32815,7 +33773,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifelse">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="address"/>
@@ -32858,7 +33816,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoif">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoif">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="address"/>
@@ -32898,7 +33856,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifnot">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifnot">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="address"/>
@@ -32945,7 +33903,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifelsesameaspreviouschecked">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifelsesameaspreviouschecked">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="always"/>
@@ -32992,7 +33950,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifelsesameasprevious">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifelsesameasprevious">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="address"/>
@@ -33035,7 +33993,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifelsecombiinlist">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifelsecombiinlist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -33051,7 +34009,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifsameaspreviouscheckedelse">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifsameaspreviouscheckedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="always"/>
@@ -33098,7 +34056,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifsameaspreviouselse">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifsameaspreviouselse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="address"/>
@@ -33141,7 +34099,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifcombiinlistelse">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifcombiinlistelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -33164,7 +34122,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifelseuservariable">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifelseuservariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -33177,7 +34135,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxdoifuservariableelse">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxdoifuservariableelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -33256,7 +34214,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxsingularplural">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxsingularplural">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="editor"/>
@@ -33271,7 +34229,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxsingularorplural">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxsingularorplural">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="editor"/>
@@ -33286,7 +34244,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="bibliography conditional" file="publ-ini.mkiv" level="system" name="btxoneorrange">
+ <cd:command category="bibliography" file="publ-ini.mkiv" keywords="conditional" level="system" name="btxoneorrange">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="volume"/>
@@ -33537,7 +34495,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-random.xml">
- <cd:command file="supp-ran.mkiv" level="system" name="getrandomcount">
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="getrandomcount">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -33548,7 +34506,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-ran.mkiv" level="system" name="getrandomdimen">
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="getrandomdimen">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -33559,7 +34517,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-ran.mkiv" level="system" name="getrandomnumber">
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="getrandomnumber">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -33570,7 +34528,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-ran.mkiv" level="system" name="getrandomfloat">
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="getrandomfloat">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -33581,21 +34539,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-ran.mkiv" level="system" name="setrandomseed">
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="setrandomseed">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-ran.mkiv" level="system" name="getrandomseed">
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="getrandomseed">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command begin="push" end="pop" file="supp-ran.mkiv" level="system" name="randomseed" type="environment"/>
- <cd:command file="supp-ran.mkiv" level="system" name="reuserandomseed"/>
- <cd:command file="supp-ran.mkiv" level="system" name="randomnumber">
+ <cd:command begin="push" category="counter" end="pop" file="supp-ran.mkiv" level="system" name="randomseed" type="environment"/>
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="reuserandomseed"/>
+ <cd:command category="counter" file="supp-ran.mkiv" level="system" name="randomnumber">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -33605,7 +34563,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-ran.mkiv" level="system" name="mprandomnumber"/>
+ <cd:command category="counter" file="supp-ran.mkiv" keywords="metapost" level="system" name="mprandomnumber"/>
</cd:interface>
<cd:interface file="i-references.xml">
<cd:command category="references" file="strc-ref.mkvi" level="style" name="setupreferencing">
@@ -33655,6 +34613,33 @@
<cd:constant type="-"/>
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="labelalternative">
+ <cd:constant type="inleftmargin"/>
+ <cd:constant type="inrightmargin"/>
+ <cd:constant type="inoutermargin"/>
+ <cd:constant type="ininnermargin"/>
+ <cd:constant type="inleftedge"/>
+ <cd:constant type="inrightedge"/>
+ <cd:constant type="inouteredge"/>
+ <cd:constant type="ininneredge"/>
+ <cd:constant type="atleftmargin"/>
+ <cd:constant type="atrightmargin"/>
+ <cd:constant type="inleft"/>
+ <cd:constant type="inright"/>
+ <cd:constant type="inouter"/>
+ <cd:constant type="ininner"/>
+ <cd:constant type="inmargin"/>
+ <cd:constant type="inother"/>
+ <cd:constant type="margintext"/>
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="labelstyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="labelcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -33765,7 +34750,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="references conditional" file="strc-ref.mkvi" level="system" name="doifelsereferencefound">
+ <cd:command category="references" file="strc-ref.mkvi" keywords="conditional" level="system" name="doifelsereferencefound">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:reference"/>
@@ -33778,7 +34763,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="references conditional" file="strc-ref.mkvi" level="system" name="doifreferencefoundelse">
+ <cd:command category="references" file="strc-ref.mkvi" keywords="conditional" level="system" name="doifreferencefoundelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:reference"/>
@@ -33942,7 +34927,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="references" file="strc-ref.mkvi" level="system" name="docheckedpagestate">
+ <cd:command category="references" file="strc-ref.mkvi" level="system" name="doifcheckedpagestate">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:reference"/>
@@ -34157,7 +35142,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="references conditional" file="strc-ref.mkvi" level="system" name="doifelseurldefined">
+ <cd:command category="references" file="strc-ref.mkvi" keywords="conditional" level="system" name="doifelseurldefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -34170,7 +35155,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="references conditional" file="strc-ref.mkvi" level="system" name="doifurldefinedelse">
+ <cd:command category="references" file="strc-ref.mkvi" keywords="conditional" level="system" name="doifurldefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -34183,7 +35168,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="references conditional" file="strc-ref.mkvi" level="system" name="doifelsefiledefined">
+ <cd:command category="references" file="strc-ref.mkvi" keywords="conditional" level="system" name="doifelsefiledefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -34196,7 +35181,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="references conditional" file="strc-ref.mkvi" level="system" name="doiffiledefinedelse">
+ <cd:command category="references" file="strc-ref.mkvi" keywords="conditional" level="system" name="doiffiledefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -34357,6 +35342,13 @@
</cd:assignments>
</cd:arguments>
</cd:command>
+ <cd:command category="references" file="strc-ref.mkvi" level="style" name="referencepagestate"/>
+ <cd:command category="references" file="strc-ref.mkvi" level="style" name="referencepagedetail"/>
+ <cd:command category="references" file="strc-ref.mkvi" level="style" name="referencerealpage"/>
+ <cd:command category="references" file="strc-ref.mkvi" level="style" name="referencecolumnnumber"/>
+ <cd:command category="references" file="strc-ref.mkvi" level="style" name="tracedpagestate"/>
+ <cd:command category="references" file="strc-ref.mkvi" level="style" name="markreferencepage"/>
+ <cd:command category="references" file="strc-ref.mkvi" level="style" name="referencesymbol"/>
</cd:interface>
<cd:interface file="i-regime.xml">
<cd:command category="language" file="regi-ini.mkiv" level="system" name="currentregime"/>
@@ -36006,7 +36998,7 @@
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
- <cd:keywords>
+ <cd:keywords optional="yes">
<cd:constant type="cd:text"/>
</cd:keywords>
<cd:keywords>
@@ -36014,17 +37006,20 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="language" file="lang-rep.mkiv" level="style" name="setreplacement">
+ <cd:command category="language" file="lang-rep.mkiv" level="style" name="setreplacements">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
<cd:constant type="cd:name"/>
</cd:keywords>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="language" file="lang-rep.mkiv" level="style" name="resetreplacement"/>
+ <cd:command category="language" file="lang-rep.mkiv" level="style" name="resetreplacements"/>
</cd:interface>
- <cd:interface file="i-rotatation.xml">
+ <cd:interface file="i-rotation.xml">
<cd:command category="graphics" file="grph-trf.mkiv" level="document" name="mirror">
<cd:arguments>
<cd:content/>
@@ -36072,7 +37067,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-ruby.xml">
- <cd:command category="fonts" file="typo-rub.mkiv" level="style" name="defineruby">
+ <cd:command category="language" file="typo-rub.mkiv" keywords="fonts" level="style" name="defineruby">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -36085,7 +37080,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts" file="typo-rub.mkiv" level="style" name="setupruby">
+ <cd:command category="language" file="typo-rub.mkiv" keywords="fonts" level="style" name="setupruby">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -36133,7 +37128,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="fonts" file="typo-rub.mkiv" level="document" name="ruby">
+ <cd:command category="language" file="typo-rub.mkiv" keywords="fonts" level="document" name="ruby">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -36146,7 +37141,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="fonts" file="typo-rub.mkiv" level="document" name="ruby" type="environment">
+ <cd:command category="language" file="typo-rub.mkiv" keywords="fonts" level="document" name="ruby" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -36308,6 +37303,7 @@
<cd:constant type="nihongo"/>
<cd:constant type="ethiopic"/>
<cd:constant type="thai"/>
+ <cd:constant type="tibetan"/>
<cd:constant type="test"/>
</cd:parameter>
<cd:parameter name="preset">
@@ -36369,7 +37365,7 @@
</cd:arguments>
</cd:command>
<cd:command category="language" file="scrp-ini.mkvi" level="system" name="resetscript"/>
- <cd:command category="language" file="scrp-ini.mkvi" name="script" type="environment">
+ <cd:command category="language" file="scrp-ini.mkvi" level="document" name="script" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="hangul"/>
@@ -36377,6 +37373,7 @@
<cd:constant type="nihongo"/>
<cd:constant type="ethiopic"/>
<cd:constant type="thai"/>
+ <cd:constant type="tibetan"/>
<cd:constant type="test"/>
<cd:constant type="cd:name"/>
</cd:keywords>
@@ -36807,6 +37804,9 @@
<cd:parameter name="ownnumber">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="placeholder">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
<cd:instances>
@@ -36849,6 +37849,9 @@
<cd:parameter name="ownnumber">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="placeholder">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="cd:key">
@@ -36896,6 +37899,9 @@
<cd:parameter name="ownnumber">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="placeholder">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="cd:key">
@@ -37097,6 +38103,9 @@
<cd:parameter name="ownnumber">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="placeholder">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="cd:key">
@@ -37129,6 +38138,9 @@
<cd:parameter name="ownnumber">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="placeholder">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="cd:key">
@@ -37283,7 +38295,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-selector.xml">
- <cd:command file="core-env.mkiv" level="style" name="defineselector">
+ <cd:command category="strings" file="core-env.mkiv" level="style" name="defineselector">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -37293,7 +38305,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="setupselector">
+ <cd:command category="strings" file="core-env.mkiv" level="style" name="setupselector">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -37302,13 +38314,13 @@
<cd:parameter name="n">
<cd:constant type="cd:number"/>
</cd:parameter>
- <cd:parameter name="m">
+ <cd:parameter name="max">
<cd:constant type="cd:number"/>
</cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="document" name="select">
+ <cd:command category="strings" file="core-env.mkiv" level="document" name="select">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37320,7 +38332,7 @@
<cd:content optional="yes"/>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="directselect">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="directselect">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37334,77 +38346,77 @@
</cd:command>
</cd:interface>
<cd:interface file="i-setups.xml">
- <cd:command file="core-env.mkiv" level="style" name="setups">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="setups">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="setups" variant="direct">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="setups" variant="direct">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="setup">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="setup">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="setup" variant="direct">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="setup" variant="direct">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="directsetup">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="directsetup">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="fastsetup">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="fastsetup">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="texsetup">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="texsetup">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="lua" file="core-env.mkiv" level="style" name="luasetup">
+ <cd:command category="structure" file="core-env.mkiv" keywords="lua" level="style" name="luasetup">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="systemsetups">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="systemsetups">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="resetsetups">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="resetsetups">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="copysetups">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="copysetups">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -37414,14 +38426,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="showsetupsdefinition">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="showsetupsdefinition">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setupwithargument">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="setupwithargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37429,7 +38441,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="fastsetupwithargument">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="fastsetupwithargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37437,7 +38449,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setupwithargumentswapped">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="setupwithargumentswapped">
<cd:arguments>
<cd:content/>
<cd:keywords delimiters="braces">
@@ -37445,7 +38457,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="fastsetupwithargumentswapped">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="fastsetupwithargumentswapped">
<cd:arguments>
<cd:content/>
<cd:keywords delimiters="braces">
@@ -37453,26 +38465,26 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="usesetupsparameter">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="usesetupsparameter">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="autosetups">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="autosetups">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="doprocesslocalsetups">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="doprocesslocalsetups">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifelsesetups">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="system" name="doifelsesetups">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37485,7 +38497,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifsetupselse">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="system" name="doifsetupselse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37498,7 +38510,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifsetups">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="system" name="doifsetups">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37508,7 +38520,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifnotsetups">
+ <cd:command category="structure" file="core-env.mkiv" keywords="conditional" level="system" name="doifnotsetups">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -37518,7 +38530,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="lua" file="core-env.mkiv" level="system" name="luasetups" type="environment">
+ <cd:command category="structure" file="core-env.mkiv" keywords="lua" level="system" name="luasetups" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -37528,14 +38540,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="lua" file="core-env.mkiv" level="system" name="luasetups" type="environment" variant="string">
+ <cd:command category="structure" file="core-env.mkiv" keywords="lua" level="system" name="luasetups" type="environment" variant="string">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="xml" file="core-env.mkiv" level="style" name="xmlsetups" type="environment">
+ <cd:command category="structure" file="core-env.mkiv" keywords="xml" level="style" name="xmlsetups" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -37545,14 +38557,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="xml" file="core-env.mkiv" level="style" name="xmlsetups" type="environment" variant="string">
+ <cd:command category="structure" file="core-env.mkiv" keywords="xml" level="style" name="xmlsetups" type="environment" variant="string">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="rawsetups" type="environment">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="rawsetups" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -37562,14 +38574,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="rawsetups" type="environment" variant="string">
+ <cd:command category="structure" file="core-env.mkiv" level="system" name="rawsetups" type="environment" variant="string">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="localsetups" type="environment">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="localsetups" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -37579,14 +38591,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="localsetups" type="environment" variant="string">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="localsetups" type="environment" variant="string">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="setups" type="environment">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="setups" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -37596,7 +38608,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="setups" type="environment" variant="string">
+ <cd:command category="structure" file="core-env.mkiv" level="style" name="setups" type="environment" variant="string">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:name"/>
@@ -37774,7 +38786,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-simplecolumns.xml">
- <cd:command category="structure layout" file="page-smp.mkiv" level="system" name="setsimplecolumnshsize">
+ <cd:command category="columns" file="page-smp.mkiv" keywords="structure layout" level="system" name="setsimplecolumnshsize">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="n">
@@ -37792,16 +38804,27 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure layout" file="page-smp.mkiv" level="system" name="simplecolumns" type="environment">
+ <cd:command category="columns" file="page-smp.mkiv" keywords="structure layout" level="system" name="simplecolumns" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
- <cd:inherit name="setsimplecolumnshsize"/>
+ <cd:parameter name="n">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="width">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="distance">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="lines">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:interface>
<cd:interface file="i-smash.xml">
- <cd:command file="supp-box.mkiv" level="system" name="smashbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="smashbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -37809,7 +38832,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="smashboxed">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="smashboxed">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -37817,7 +38840,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="hsmashbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hsmashbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -37825,7 +38848,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vsmashbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vsmashbox">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:csname"/>
@@ -37833,27 +38856,27 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="hsmash">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hsmash">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vsmash">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vsmash">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="hsmashed">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="hsmashed">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="vsmashed">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="vsmashed">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="smashedhbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="smashedhbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -37861,7 +38884,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="system" name="smashedvbox">
+ <cd:command category="boxes" file="supp-box.mkiv" level="system" name="smashedvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -37869,7 +38892,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="supp-box.mkiv" level="document" name="smash">
+ <cd:command category="boxes" file="supp-box.mkiv" level="document" name="smash">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="w"/>
@@ -37982,6 +39005,12 @@
<cd:parameter name="synonymcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -38042,7 +39071,7 @@
<cd:constant value="logos"/>
</cd:instances>
</cd:command>
- <cd:command category="language conditional" file="strc-syn.mkiv" level="system" name="doifelsecurrentsortingused">
+ <cd:command category="language" file="strc-syn.mkiv" keywords="conditional" level="system" name="doifelsecurrentsortingused">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -38124,7 +39153,7 @@
<cd:assignments list="yes">
<cd:parameter name="state">
<cd:constant type="start"/>
- <cd:constant defult="yes" type="stop"/>
+ <cd:constant default="yes" type="stop"/>
</cd:parameter>
<cd:parameter name="method">
<cd:constant type="1"/>
@@ -38218,8 +39247,8 @@
</cd:command>
</cd:interface>
<cd:interface file="i-stream.xml">
- <cd:command file="page-str.mkiv" level="system" name="currentoutputstream"/>
- <cd:command file="page-str.mkiv" level="system" name="ifinoutputstream">
+ <cd:command category="structure" file="page-str.mkiv" level="system" name="currentoutputstream"/>
+ <cd:command category="structure" file="page-str.mkiv" keywords="conditional" level="system" name="ifinoutputstream">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:true"/>
@@ -38231,64 +39260,64 @@
<cd:delimiter name="fi"/>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="enableoutputstream">
+ <cd:command category="structure" file="page-str.mkiv" level="system" name="enableoutputstream">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="disableoutputstream"/>
- <cd:command file="page-str.mkiv" level="system" name="outputstream" type="environment">
+ <cd:command category="structure" file="page-str.mkiv" level="system" name="disableoutputstream"/>
+ <cd:command category="structure" file="page-str.mkiv" level="system" name="outputstream" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="flushoutputstream">
+ <cd:command category="structure" file="page-str.mkiv" level="system" name="flushoutputstream">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="outputstreambox">
+ <cd:command category="structure" file="page-str.mkiv" keywords="boxes" level="system" name="outputstreambox">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="outputstreamcopy">
+ <cd:command category="structure" file="page-str.mkiv" keywords="boxes" level="system" name="outputstreamcopy">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="outputstreamunvbox">
+ <cd:command category="structure" file="page-str.mkiv" keywords="boxes" level="system" name="outputstreamunvbox">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="outputstreamunvcopy">
+ <cd:command category="structure" file="page-str.mkiv" keywords="boxes" level="system" name="outputstreamunvcopy">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="synchronizeoutputstreams">
+ <cd:command category="structure" file="page-str.mkiv" level="system" name="synchronizeoutputstreams">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="page-str.mkiv" level="system" name="pushoutputstream">
+ <cd:command category="structure" file="page-str.mkiv" level="system" name="pushoutputstream">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -38297,70 +39326,70 @@
</cd:command>
</cd:interface>
<cd:interface file="i-string.xml">
- <cd:command file="blob-ini.mkiv" level="system" name="wdofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="wdofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="htofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="htofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="dpofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="dpofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="hdofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="hdofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="htdpofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="htdpofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="widthofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="widthofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="heightofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="heightofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="depthofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="depthofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="heightanddepthofstring">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="heightanddepthofstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="blob-ini.mkiv" level="system" name="setwidthof">
+ <cd:command category="strings" file="blob-ini.mkiv" level="system" name="setwidthof">
<cd:arguments>
<cd:text/>
<cd:delimiter name="to"/>
@@ -38369,12 +39398,12 @@
</cd:command>
</cd:interface>
<cd:interface file="i-strut.xml">
- <cd:command file="supp-box.mkiv" level="system" name="strutdp"/>
- <cd:command file="supp-box.mkiv" level="system" name="strutht"/>
- <cd:command file="supp-box.mkiv" level="system" name="strutwd"/>
- <cd:command file="supp-box.mkiv" level="system" name="struthtdp"/>
- <cd:command file="supp-box.mkiv" level="system" name="strutgap"/>
- <cd:command file="spac-ver.mkiv" level="style" name="setupstruts">
+ <cd:command category="fonts" file="supp-box.mkiv" keywords="whitespace" level="system" name="strutdp"/>
+ <cd:command category="fonts" file="supp-box.mkiv" keywords="whitespace" level="system" name="strutht"/>
+ <cd:command category="fonts" file="supp-box.mkiv" keywords="whitespace" level="system" name="strutwd"/>
+ <cd:command category="fonts" file="supp-box.mkiv" keywords="whitespace" level="system" name="struthtdp"/>
+ <cd:command category="fonts" file="supp-box.mkiv" keywords="whitespace" level="system" name="strutgap"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="style" name="setupstrut">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="yes"/>
@@ -38388,7 +39417,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ver.mkiv" level="system" name="synchronizestrut">
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="synchronizestrut">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="yes"/>
@@ -38402,27 +39431,27 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ver.mkiv" level="style" name="strut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="halfstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="quarterstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="halflinestrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="noheightstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="depthstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="setstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="setcharstrut">
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="style" name="strut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="halfstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="quarterstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="halflinestrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="noheightstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="depthstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="setstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="setcharstrut">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="spac-ver.mkiv" level="system" name="setfontstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="settightstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="setcapstrut"/>
- <cd:command file="spac-ver.mkiv" level="system" name="setnostrut"/>
- <cd:command file="spac-ver.mkiv" level="document" name="showstruts"/>
- <cd:command file="spac-ver.mkiv" level="document" name="showcolorstruts"/>
- <cd:command begin="beg" end="end" file="spac-ver.mkiv" level="system" name="strut" type="environment"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="setfontstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="settightstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="setcapstrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="system" name="setnostrut"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="document" name="showstruts"/>
+ <cd:command category="fonts" file="spac-ver.mkiv" keywords="whitespace" level="document" name="showcolorstruts"/>
+ <cd:command begin="beg" category="fonts" end="end" file="spac-ver.mkiv" keywords="whitespace" level="system" name="strut" type="environment"/>
</cd:interface>
<cd:interface file="i-symbol.xml">
<cd:command category="symbols" file="symb-ini.mkiv" level="style" name="definesymbol">
@@ -38438,7 +39467,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="symb-ini.mkiv" level="system" name="doifelseinsymbolset">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="conditional" level="system" name="doifelseinsymbolset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -38454,7 +39483,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="symb-ini.mkiv" level="system" name="doifinsymbolsetelse">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="conditional" level="system" name="doifinsymbolsetelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -38470,7 +39499,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="symb-ini.mkiv" level="system" name="doifinsymbolset">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="conditional" level="system" name="doifinsymbolset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -38486,7 +39515,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="symb-ini.mkiv" level="system" name="doifelsesymbolset">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="conditional" level="system" name="doifelsesymbolset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -38499,7 +39528,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="symb-ini.mkiv" level="system" name="doifsymbolsetelse">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="conditional" level="system" name="doifsymbolsetelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -38539,7 +39568,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols graphics" file="symb-ini.mkiv" level="style" name="definefiguresymbol">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="graphics" level="style" name="definefiguresymbol">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -38553,7 +39582,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="symbols graphics" file="symb-ini.mkiv" level="document" name="figuresymbol">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="graphics" level="document" name="figuresymbol">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -38564,7 +39593,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="symb-ini.mkiv" level="system" name="doifelsesymboldefined">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="conditional" level="system" name="doifelsesymboldefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -38577,7 +39606,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="symb-ini.mkiv" level="system" name="doifsymboldefinedelse">
+ <cd:command category="symbols" file="symb-ini.mkiv" keywords="conditional" level="system" name="doifsymboldefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -38775,6 +39804,25 @@
<cd:parameter name="synonymcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="left">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="right">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="inbetween">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="hyphens">
+ <cd:constant default="yes" type="yes"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -38851,7 +39899,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="strc-syn.mkiv" level="system" name="doifelsecurrentsynonymused">
+ <cd:command category="symbols" file="strc-syn.mkiv" keywords="conditional" level="system" name="doifelsecurrentsynonymused">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -38861,7 +39909,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="symbols conditional" file="strc-syn.mkiv" level="system" name="doifelsecurrentsynonymshown">
+ <cd:command category="symbols" file="strc-syn.mkiv" keywords="conditional" level="system" name="doifelsecurrentsynonymshown">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -38914,31 +39962,31 @@
</cd:command>
</cd:interface>
<cd:interface file="i-system.xml">
- <cd:command file="syst-aux.mkiv" level="system" name="expanded">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="expanded">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="expanded" type="environment"/>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbleoneargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="expanded" type="environment"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbleoneargument">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbletwoarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbletwoarguments">
<cd:arguments>
<cd:content/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblethreearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblethreearguments">
<cd:arguments>
<cd:content/>
<cd:content/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblefourarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblefourarguments">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -38946,7 +39994,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblefivearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblefivearguments">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -38955,7 +40003,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblesixarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblesixarguments">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -38965,7 +40013,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblesevenarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblesevenarguments">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -38976,7 +40024,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbleeightarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbleeightarguments">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -38988,7 +40036,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbleninearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbleninearguments">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -39001,7 +40049,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbletenarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbletenarguments">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -39015,14 +40063,14 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbleoneoptional">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbleoneoptional">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbletwooptionals">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbletwooptionals">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -39032,7 +40080,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblethreeoptionals">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblethreeoptionals">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -39045,7 +40093,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblefouroptionals">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblefouroptionals">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -39061,7 +40109,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblefiveoptionals">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblefiveoptionals">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -39080,8 +40128,8 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="donothing"/>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenextchar">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="donothing"/>
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenextchar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
@@ -39094,7 +40142,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnextcharelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnextcharelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
@@ -39107,7 +40155,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenextoptional">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenextoptional">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39117,7 +40165,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnextoptionalelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnextoptionalelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39127,19 +40175,19 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenextoptionalcs">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenextoptionalcs">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnextoptionalcselse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnextoptionalcselse">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenextbgroup">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenextbgroup">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39149,7 +40197,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnextbgroupelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnextbgroupelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39159,19 +40207,19 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenextbgroupcs">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenextbgroupcs">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnextbgroupcselse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnextbgroupcselse">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenextparenthesis">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenextparenthesis">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39181,7 +40229,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnextparenthesiselse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnextparenthesiselse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39191,7 +40239,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsefastoptionalcheck">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsefastoptionalcheck">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39201,7 +40249,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doiffastoptionalcheckelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doiffastoptionalcheckelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -39211,25 +40259,25 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsefastoptionalcheckcs">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsefastoptionalcheckcs">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doiffastoptionalcheckcselse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doiffastoptionalcheckcselse">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="assumelongusagecs">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="assumelongusagecs">
<cd:arguments>
<cd:csname/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39237,7 +40285,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setgvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setgvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39245,7 +40293,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setevalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setevalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39253,7 +40301,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setxvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setxvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39261,14 +40309,14 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39276,7 +40324,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letgvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letgvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39284,28 +40332,28 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="resetvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="resetvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="undefinevalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="undefinevalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ignorevalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="ignorevalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setuvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setuvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39313,7 +40361,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setuevalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setuevalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39321,7 +40369,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setugvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setugvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39329,7 +40377,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setuxvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setuxvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39337,14 +40385,14 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getuvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getuvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseundefined">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseundefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39357,7 +40405,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifundefinedelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifundefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39370,7 +40418,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsedefined">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsedefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39383,7 +40431,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifdefinedelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifdefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39396,7 +40444,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifundefined">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifundefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39406,7 +40454,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifdefined">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifdefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -39416,28 +40464,28 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letbeundefined">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letbeundefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="localundefine">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="localundefine">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalundefine">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="globalundefine">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsealldefined">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsealldefined">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -39450,7 +40498,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifalldefinedelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifalldefinedelse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:name"/>
@@ -39463,7 +40511,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doif">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doif">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -39472,7 +40520,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnot">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnot">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -39481,7 +40529,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelse">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -39493,7 +40541,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseempty">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseempty">
<cd:arguments>
<cd:content/>
<cd:keywords delimiters="braces">
@@ -39504,7 +40552,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifemptyelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifemptyelse">
<cd:arguments>
<cd:content/>
<cd:keywords delimiters="braces">
@@ -39515,7 +40563,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifempty">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifempty">
<cd:arguments>
<cd:content/>
<cd:keywords delimiters="braces">
@@ -39523,7 +40571,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotempty">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotempty">
<cd:arguments>
<cd:content/>
<cd:keywords delimiters="braces">
@@ -39531,7 +40579,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseinset">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseinset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39547,7 +40595,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifinsetelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifinsetelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39563,7 +40611,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifinset">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifinset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39576,7 +40624,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotinset">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotinset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39589,7 +40637,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsecommon">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsecommon">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -39605,7 +40653,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifcommonelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifcommonelse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -39621,7 +40669,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifcommon">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifcommon">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -39634,7 +40682,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotcommon">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotcommon">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -39647,7 +40695,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processcommalist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processcommalist">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -39655,9 +40703,9 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="quitcommalist"/>
- <cd:command file="syst-aux.mkiv" level="system" name="quitprevcommalist"/>
- <cd:command file="syst-aux.mkiv" level="system" name="processcommacommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="quitcommalist"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="quitprevcommalist"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processcommacommand">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -39665,7 +40713,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processcommalistwithparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processcommalistwithparameters">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -39673,22 +40721,22 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processcommalist" type="environment">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processcommalist" type="environment">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processcommacommand" type="environment">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processcommacommand" type="environment">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="currentcommalistitem"/>
- <cd:command file="syst-aux.mkiv" level="system" name="processaction">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="currentcommalistitem"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processaction">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:command"/>
@@ -39696,7 +40744,7 @@
<cd:apply list="yes"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processfirstactioninset">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processfirstactioninset">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:command"/>
@@ -39704,7 +40752,7 @@
<cd:apply list="yes"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processallactionsinset">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processallactionsinset">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:command"/>
@@ -39713,16 +40761,16 @@
</cd:arguments>
</cd:command>
<cd:command file="syst-aux.mkiv" level="system" name="commalistelement"/>
- <cd:command file="syst-aux.mkiv" level="system" name="firstcharacter"/>
- <cd:command file="syst-aux.mkiv" level="system" name="remainingcharacters"/>
- <cd:command file="syst-aux.mkiv" level="system" name="getfirstcharacter">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="firstcharacter"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="remainingcharacters"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="getfirstcharacter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsefirstchar">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsefirstchar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39738,7 +40786,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doiffirstcharelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doiffirstcharelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39754,21 +40802,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="thefirstcharacter">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="thefirstcharacter">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="theremainingcharacters">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="theremainingcharacters">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseinstring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseinstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39784,7 +40832,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifinstringelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifinstringelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39800,7 +40848,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifinstring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifinstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39813,7 +40861,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotinstring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotinstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39826,7 +40874,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseincsname">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseincsname">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39842,7 +40890,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifincsnameelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifincsnameelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39858,7 +40906,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenumber">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenumber">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39871,7 +40919,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnumberelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnumberelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39884,7 +40932,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnumber">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnumber">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39894,7 +40942,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotnumber">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotnumber">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39904,7 +40952,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="percentdimen">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="percentdimen">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -39916,7 +40964,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setpercentdimen">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="setpercentdimen">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -39928,7 +40976,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="makerawcommalist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="makerawcommalist">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -39936,7 +40984,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="rawprocesscommalist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="rawprocesscommalist">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -39944,7 +40992,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="rawprocesscommacommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="rawprocesscommacommand">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -39952,7 +41000,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="rawdoifelseinset">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="rawdoifelseinset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39968,7 +41016,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="rawdoifinsetelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="rawdoifinsetelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39984,7 +41032,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="rawdoifinset">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="rawdoifinset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -39997,7 +41045,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="rawprocessaction">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="rawprocessaction">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:command"/>
@@ -40005,8 +41053,8 @@
<cd:apply list="yes"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="currentvalue"/>
- <cd:command file="syst-aux.mkiv" level="system" name="getparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="currentvalue"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40018,7 +41066,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="geteparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="geteparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40030,7 +41078,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getgparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getgparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40042,7 +41090,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getxparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getxparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40054,7 +41102,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="forgetparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="forgetparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40066,7 +41114,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getexpandedparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getexpandedparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40078,7 +41126,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doassign">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doassign">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40090,7 +41138,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doeassign">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doeassign">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40102,7 +41150,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="undoassign">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="undoassign">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40114,7 +41162,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doassignempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doassignempty">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40126,7 +41174,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processassignmentlist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processassignmentlist">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="cd:key">
@@ -40136,7 +41184,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processassignmentcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processassignmentcommand">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="cd:key">
@@ -40146,7 +41194,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processassignmentlist" type="environment">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processassignmentlist" type="environment">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="cd:key">
@@ -40155,7 +41203,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processassignmentcommand" type="environment">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processassignmentcommand" type="environment">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="cd:key">
@@ -40164,9 +41212,9 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="currentassignmentlistkey"/>
- <cd:command file="syst-aux.mkiv" level="system" name="currentassignmentlistvalue"/>
- <cd:command file="syst-aux.mkiv" level="system" name="getemptyparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="currentassignmentlistkey"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="currentassignmentlistvalue"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getemptyparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40178,7 +41226,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="copyparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="copyparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -40191,14 +41239,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="checkparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="checkparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ifparameters">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="ifparameters">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:true"/>
@@ -40210,22 +41258,22 @@
<cd:delimiter name="fi"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="commalistsize"/>
- <cd:command file="syst-aux.mkiv" level="system" name="getcommalistsize">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="commalistsize"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getcommalistsize">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getcommacommandsize">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getcommacommandsize">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getfromcommalist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getfromcommalist">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -40235,7 +41283,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getfromcommacommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getfromcommacommand">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
@@ -40245,14 +41293,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstinlist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstinlist">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dogetcommacommandelement">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dogetcommacommandelement">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:number"/>
@@ -40265,7 +41313,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dosingleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dosingleempty">
<cd:arguments>
<cd:csname/>
<cd:keywords optional="yes">
@@ -40273,7 +41321,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dodoubleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dodoubleempty">
<cd:arguments>
<cd:csname/>
<cd:keywords optional="yes">
@@ -40284,7 +41332,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dotripleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dotripleempty">
<cd:arguments>
<cd:csname/>
<cd:keywords optional="yes">
@@ -40298,7 +41346,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doquadrupleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doquadrupleempty">
<cd:arguments>
<cd:csname/>
<cd:keywords optional="yes">
@@ -40315,7 +41363,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doquintupleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doquintupleempty">
<cd:arguments>
<cd:csname/>
<cd:keywords optional="yes">
@@ -40335,7 +41383,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dosixtupleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dosixtupleempty">
<cd:arguments>
<cd:csname/>
<cd:keywords optional="yes">
@@ -40358,7 +41406,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doseventupleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doseventupleempty">
<cd:arguments>
<cd:csname/>
<cd:keywords optional="yes">
@@ -40384,7 +41432,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dosingleargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dosingleargument">
<cd:arguments>
<cd:csname/>
<cd:keywords>
@@ -40392,7 +41440,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dodoubleargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dodoubleargument">
<cd:arguments>
<cd:csname/>
<cd:keywords>
@@ -40403,7 +41451,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dotripleargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dotripleargument">
<cd:arguments>
<cd:csname/>
<cd:keywords>
@@ -40417,7 +41465,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doquadrupleargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doquadrupleargument">
<cd:arguments>
<cd:csname/>
<cd:keywords>
@@ -40434,7 +41482,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doquintupleargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doquintupleargument">
<cd:arguments>
<cd:csname/>
<cd:keywords>
@@ -40454,7 +41502,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dosixtupleargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dosixtupleargument">
<cd:arguments>
<cd:csname/>
<cd:keywords>
@@ -40477,7 +41525,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doseventupleargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doseventupleargument">
<cd:arguments>
<cd:csname/>
<cd:keywords>
@@ -40503,24 +41551,24 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="strippedcsname">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="strippedcsname">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="strippedcsname" variant="string">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="strippedcsname" variant="string">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="complexorsimple">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="complexorsimple">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="complexorsimple" variant="argument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="complexorsimple" variant="argument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40528,12 +41576,12 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="complexorsimpleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="complexorsimpleempty">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="complexorsimpleempty" variant="argument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="complexorsimpleempty" variant="argument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40541,12 +41589,12 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="definecomplexorsimple">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="definecomplexorsimple">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="definecomplexorsimple" variant="argument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="definecomplexorsimple" variant="argument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40554,12 +41602,12 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="definecomplexorsimpleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="definecomplexorsimpleempty">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="definecomplexorsimpleempty" variant="argument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="definecomplexorsimpleempty" variant="argument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40567,9 +41615,9 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="permitspacesbetweengroups"/>
- <cd:command file="syst-aux.mkiv" level="system" name="dontpermitspacesbetweengroups"/>
- <cd:command file="syst-aux.mkiv" level="system" name="dosinglegroupempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="permitspacesbetweengroups"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dontpermitspacesbetweengroups"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dosinglegroupempty">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces" optional="yes">
@@ -40577,7 +41625,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dodoublegroupempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dodoublegroupempty">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces" optional="yes">
@@ -40588,7 +41636,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dotriplegroupempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dotriplegroupempty">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces" optional="yes">
@@ -40602,7 +41650,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doquadruplegroupempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doquadruplegroupempty">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces" optional="yes">
@@ -40619,7 +41667,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doquintuplegroupempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doquintuplegroupempty">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces" optional="yes">
@@ -40639,14 +41687,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstofoneargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstofoneargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstoftwoarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstoftwoarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40656,7 +41704,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="secondoftwoarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="secondoftwoarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40666,7 +41714,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstofthreearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstofthreearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40679,7 +41727,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="secondofthreearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="secondofthreearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40692,7 +41740,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="thirdofthreearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="thirdofthreearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40705,7 +41753,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstoffourarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstoffourarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40721,7 +41769,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="secondoffourarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="secondoffourarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40737,7 +41785,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="thirdoffourarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="thirdoffourarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40753,7 +41801,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fourthoffourarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="fourthoffourarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40769,7 +41817,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstoffivearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstoffivearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40788,7 +41836,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="secondoffivearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="secondoffivearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40807,7 +41855,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="thirdoffivearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="thirdoffivearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40826,7 +41874,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fourthoffivearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="fourthoffivearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40845,7 +41893,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fifthoffivearguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="fifthoffivearguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40864,7 +41912,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstofsixarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstofsixarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40886,7 +41934,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="secondofsixarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="secondofsixarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40908,7 +41956,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="thirdofsixarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="thirdofsixarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40930,7 +41978,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fourthofsixarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="fourthofsixarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40952,7 +42000,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fifthofsixarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="fifthofsixarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40974,7 +42022,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="sixthofsixarguments">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="sixthofsixarguments">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -40996,14 +42044,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstofoneunexpanded">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstofoneunexpanded">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstoftwounexpanded">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstoftwounexpanded">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41013,7 +42061,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="secondoftwounexpanded">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="secondoftwounexpanded">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41023,7 +42071,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="firstofthreeunexpanded">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="firstofthreeunexpanded">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41036,7 +42084,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="secondofthreeunexpanded">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="secondofthreeunexpanded">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41049,7 +42097,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="thirdofthreeunexpanded">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="thirdofthreeunexpanded">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41062,52 +42110,52 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letempty">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalletempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="globalletempty">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letvalueempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letvalueempty">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letgvalueempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letgvalueempty">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letvaluerelax">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letvaluerelax">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letgvalurelax">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letgvalurelax">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="relaxvalueifundefined">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="relaxvalueifundefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="rawgetparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="rawgetparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -41119,7 +42167,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="texdefinition" type="environment">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="texdefinition" type="environment">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="spaces"/>
@@ -41156,35 +42204,34 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="texdefinition">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="texdefinition">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="texcode" type="environment"/>
- <cd:command file="syst-aux.mkiv" level="system" name="newcounter">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="newcounter">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fastincrement">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="fastincrement">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fastdecrement">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="fastdecrement">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="increment">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="increment">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="increment" variant="argument">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="increment" variant="argument">
<cd:arguments>
<cd:keywords delimiters="parenthesis" list="yes">
<cd:constant type="cd:csname"/>
@@ -41192,12 +42239,12 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="decrement">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="decrement">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="decrement" variant="argument">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="decrement" variant="argument">
<cd:arguments>
<cd:keywords delimiters="parenthesis" list="yes">
<cd:constant type="cd:csname"/>
@@ -41205,46 +42252,39 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="incrementvalue">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="incrementvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="decrementvalue">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="decrementvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="newsignal">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="newsignal">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="checkedstrippedcsname">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="checkedstrippedcsname">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="checkedstrippedcsname" variant="string">
- <cd:arguments>
- <cd:keywords delimiters="none">
- <cd:constant type="cd:text"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="savenormalmeaning">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="savenormalmeaning">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="recursedepth"/>
- <cd:command file="syst-aux.mkiv" level="system" name="recurselevel"/>
- <cd:command file="syst-aux.mkiv" level="system" name="resetrecurselevel"/>
- <cd:command file="syst-aux.mkiv" level="system" name="dostepwiserecurse">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="recursedepth"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="recurselevel"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="resetrecurselevel"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dostepwiserecurse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -41260,7 +42300,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dorecurse">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dorecurse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -41270,7 +42310,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doexpandedrecurse">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doexpandedrecurse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -41280,7 +42320,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dowith">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dowith">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:command"/>
@@ -41290,16 +42330,16 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doloop">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doloop">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="exitloop"/>
- <cd:command file="syst-aux.mkiv" level="system" name="exitloopnow"/>
- <cd:command file="syst-aux.mkiv" level="system" name="dofastloopcs">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="exitloop"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="exitloopnow"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dofastloopcs">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -41307,9 +42347,9 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="fastloopindex"/>
- <cd:command file="syst-aux.mkiv" level="system" name="fastloopfinal"/>
- <cd:command file="syst-aux.mkiv" level="system" name="doloopoverlist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="fastloopindex"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="fastloopfinal"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="doloopoverlist">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -41319,29 +42359,29 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="recursestring"/>
- <cd:command file="syst-aux.mkiv" level="system" name="newevery">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="recursestring"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="newevery">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="EveryPar">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="EveryPar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="EveryLine">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="EveryLine">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="forgeteverypar"/>
- <cd:command file="syst-aux.mkiv" level="system" name="convertvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="forgeteverypar"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="convertvalue">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:name"/>
@@ -41350,7 +42390,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="defconvertedvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="defconvertedvalue">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41358,7 +42398,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseassignment">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseassignment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41371,7 +42411,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifassignmentelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifassignmentelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41384,14 +42424,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="docheckassignment">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="docheckassignment">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ifassignment">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="ifassignment">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:true"/>
@@ -41403,7 +42443,21 @@
<cd:delimiter name="fi"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseassignmentcs">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="validassignment">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:text"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="nonvalidassignment">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:text"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseassignmentcs">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41412,7 +42466,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifassignmentelsecs">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifassignmentelsecs">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41421,7 +42475,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="convertargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="convertargument">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41430,14 +42484,14 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="convertcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="convertcommand">
<cd:arguments>
<cd:csname/>
<cd:delimiter name="to"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="defconvertedargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="defconvertedargument">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41445,13 +42499,13 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="defconvertedcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="defconvertedcommand">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="edefconvertedargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="edefconvertedargument">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41459,7 +42513,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gdefconvertedargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gdefconvertedargument">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41467,13 +42521,13 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gdefconvertedcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gdefconvertedcommand">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="xdefconvertedargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="xdefconvertedargument">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41481,14 +42535,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="showvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="showvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsemeaning">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsemeaning">
<cd:arguments>
<cd:csname/>
<cd:csname/>
@@ -41500,7 +42554,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifmeaningelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifmeaningelse">
<cd:arguments>
<cd:csname/>
<cd:csname/>
@@ -41512,7 +42566,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsesamestring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsesamestring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41528,7 +42582,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifsamestringelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifsamestringelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41544,7 +42598,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifsamestring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifsamestring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41557,7 +42611,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotsamestring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotsamestring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41570,7 +42624,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ConvertToConstant">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="ConvertToConstant">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41581,7 +42635,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ConvertConstantAfter">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="ConvertConstantAfter">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41592,7 +42646,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="assignifempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="assignifempty">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -41600,7 +42654,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="grabuntil">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="grabuntil">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -41608,7 +42662,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processbetween">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processbetween">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -41616,12 +42670,12 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbleuntil">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbleuntil">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbleuntilrelax">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbleuntilrelax">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:content"/>
@@ -41629,12 +42683,12 @@
<cd:delimiter name="relax"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processuntil">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processuntil">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="groupedcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="groupedcommand">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -41644,7 +42698,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="simplegroupedcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="simplegroupedcommand">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -41654,7 +42708,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="pickupgroupedcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="pickupgroupedcommand">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -41667,33 +42721,33 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="BeforePar">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="BeforePar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="AfterPar">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="AfterPar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="GetPar"/>
- <cd:command file="syst-aux.mkiv" level="system" name="GotoPar"/>
- <cd:command file="syst-aux.mkiv" level="system" name="dowithpargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="GetPar"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="GotoPar"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dowithpargument">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dowithwargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dowithwargument">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dorepeatwithcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dorepeatwithcommand">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -41702,7 +42756,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsestringinstring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsestringinstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41718,7 +42772,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifstringinstringelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifstringinstringelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -41734,7 +42788,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="appendtoks">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="appendtoks">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:command"/>
@@ -41743,7 +42797,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="prependtoks">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="prependtoks">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:command"/>
@@ -41752,7 +42806,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="appendtoksonce">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="appendtoksonce">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:command"/>
@@ -41761,7 +42815,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="prependtoksonce">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="prependtoksonce">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:command"/>
@@ -41770,7 +42824,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseintoks">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseintoks">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -41786,7 +42840,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifintokselse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifintokselse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:command"/>
@@ -41802,20 +42856,20 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="collecting" type="environment"/>
- <cd:command file="syst-aux.mkiv" level="system" name="collect" type="environment"/>
- <cd:command file="syst-aux.mkiv" level="system" name="expandedcollect" type="environment"/>
- <cd:command file="syst-aux.mkiv" level="system" name="collect">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="collecting" type="environment"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="collect" type="environment"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="expandedcollect" type="environment"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="collect">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="collectexpanded">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="collectexpanded">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="removetoks">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="removetoks">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:command"/>
@@ -41824,7 +42878,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="appendetoks">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="appendetoks">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:command"/>
@@ -41833,7 +42887,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="prependetoks">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="prependetoks">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:command"/>
@@ -41842,17 +42896,17 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="flushtoks">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="flushtoks">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dotoks">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="dotoks">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="beforesplitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="beforesplitstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41865,7 +42919,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="aftersplitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="aftersplitstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41878,7 +42932,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="splitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="splitstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41893,7 +42947,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="greedysplitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="greedysplitstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41908,7 +42962,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="beforetestandsplitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="beforetestandsplitstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41921,7 +42975,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="aftertestandsplitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="aftertestandsplitstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41934,7 +42988,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="testandsplitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="testandsplitstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41949,7 +43003,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="splitatperiod">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="splitatperiod">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41958,7 +43012,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="splitatcomma">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="splitatcomma">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41967,7 +43021,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="splitatasterisk">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="splitatasterisk">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41976,7 +43030,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="splitatcolon">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="splitatcolon">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41985,7 +43039,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="splitatcolons">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="splitatcolons">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -41994,7 +43048,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="removesubstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="removesubstring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42007,7 +43061,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="appendtocommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="appendtocommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42015,7 +43069,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="prependtocommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="prependtocommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42023,7 +43077,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="addtocommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="addtocommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42031,7 +43085,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="pretocommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="pretocommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42039,7 +43093,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="robustdoifelseinset">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="robustdoifelseinset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42055,7 +43109,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="robustdoifinsetelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="robustdoifinsetelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42071,7 +43125,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="robustaddtocommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="robustaddtocommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42079,7 +43133,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="robustpretocommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="robustpretocommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42087,7 +43141,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="xsplitstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="xsplitstring">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -42095,7 +43149,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="removefromcommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="removefromcommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42103,7 +43157,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="substituteincommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="substituteincommalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42114,7 +43168,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="replaceincommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="replaceincommalist">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -42122,7 +43176,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalprocesscommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="globalprocesscommalist">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:command"/>
@@ -42130,21 +43184,21 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="withoutpt">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="withoutpt">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="PtToCm">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="PtToCm">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dimensiontocount">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="dimensiontocount">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42152,89 +43206,89 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="numberofpoints">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="numberofpoints">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="swapdimens">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="swapdimens">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="swapcounts">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="swapcounts">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="swapmacros">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="swapmacros">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalswapdimens">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="globalswapdimens">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalswapcounts">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="globalswapcounts">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalswapmacros">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="globalswapmacros">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalpushmacro">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="globalpushmacro">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="localpushmacro">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="localpushmacro">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="globalpopmacro">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="globalpopmacro">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="localpopmacro">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="localpopmacro">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="pushmacro">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="pushmacro">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="popmacro">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="popmacro">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="localhsize"/>
- <cd:command file="syst-aux.mkiv" level="system" name="setlocalhsize">
+ <cd:command category="layout" file="syst-aux.mkiv" level="system" name="localhsize"/>
+ <cd:command category="layout" file="syst-aux.mkiv" level="system" name="setlocalhsize">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant method="none" prefix="cd:sign" type="cd:dimension"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="availablehsize"/>
- <cd:command file="syst-aux.mkiv" level="system" name="distributedhsize">
+ <cd:command category="layout" file="syst-aux.mkiv" level="system" name="availablehsize"/>
+ <cd:command category="layout" file="syst-aux.mkiv" level="system" name="distributedhsize">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42247,7 +43301,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="hsizefraction">
+ <cd:command category="layout" file="syst-aux.mkiv" level="system" name="hsizefraction">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42257,7 +43311,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifvalue">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="doifvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42270,7 +43324,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotvalue">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42283,7 +43337,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsevalue">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsevalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42299,7 +43353,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifvalueelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifvalueelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42315,7 +43369,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnothing">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnothing">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42325,7 +43379,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifsomething">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifsomething">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42335,7 +43389,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenothing">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenothing">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42348,7 +43402,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnothingelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnothingelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42361,7 +43415,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsesomething">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsesomething">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42374,7 +43428,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifsomethingelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifsomethingelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42387,7 +43441,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifvaluenothing">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifvaluenothing">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42397,7 +43451,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifvaluesomething">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifvaluesomething">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42407,7 +43461,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsevaluenothing">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsevaluenothing">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42420,7 +43474,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifvaluenothingelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifvaluenothingelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42433,7 +43487,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseemptyvalue">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseemptyvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42446,7 +43500,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifemptyvalueelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifemptyvalueelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42459,7 +43513,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifemptyvalue">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifemptyvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42469,7 +43523,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotemptyvalue">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotemptyvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42479,7 +43533,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseallcommon">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseallcommon">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -42495,7 +43549,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifallcommonelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifallcommonelse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -42511,7 +43565,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifallcommon">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifallcommon">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -42524,7 +43578,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotallcommon">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotallcommon">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -42537,7 +43591,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dodoubleemptywithset">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dodoubleemptywithset">
<cd:arguments>
<cd:csname/>
<cd:keywords list="yes" optional="yes">
@@ -42548,7 +43602,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dotripleemptywithset">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dotripleemptywithset">
<cd:arguments>
<cd:csname/>
<cd:keywords list="yes" optional="yes">
@@ -42562,7 +43616,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dodoubleargumentwithset">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dodoubleargumentwithset">
<cd:arguments>
<cd:csname/>
<cd:keywords list="yes">
@@ -42573,7 +43627,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dotripleargumentwithset">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dotripleargumentwithset">
<cd:arguments>
<cd:csname/>
<cd:keywords list="yes">
@@ -42587,7 +43641,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="stripcharacter">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="stripcharacter">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:character"/>
@@ -42600,7 +43654,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="stripspaces">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="stripspaces">
<cd:arguments>
<cd:delimiter name="from"/>
<cd:keywords delimiters="none">
@@ -42610,7 +43664,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="unspacestring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="unspacestring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42619,7 +43673,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="executeifdefined">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="executeifdefined">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42629,7 +43683,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsesomespace">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsesomespace">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42642,7 +43696,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifsomespaceelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifsomespaceelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42655,7 +43709,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processseparatedlist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processseparatedlist">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -42669,7 +43723,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processlist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processlist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:character"/>
@@ -42683,7 +43737,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processassignlist">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processassignlist">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:text"/>
@@ -42691,7 +43745,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="untexargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="untexargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -42700,7 +43754,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="untexcommand">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="untexcommand">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:csname"/>
@@ -42709,7 +43763,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="PointsToBigPoints">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="PointsToBigPoints">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42717,7 +43771,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="PointsToWholeBigPoints">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="PointsToWholeBigPoints">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42725,7 +43779,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ScaledPointsToBigPoints">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="ScaledPointsToBigPoints">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42733,7 +43787,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ScaledPointsToWholeBigPoints">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="ScaledPointsToWholeBigPoints">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42741,7 +43795,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="PointsToReal">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="PointsToReal">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -42749,22 +43803,22 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="style" name="dontleavehmode"/>
- <cd:command file="syst-aux.mkiv" level="system" name="utfupper">
+ <cd:command category="system" file="syst-aux.mkiv" level="style" name="dontleavehmode"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="utfupper">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="utflower">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="utflower">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="uppercasestring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="uppercasestring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42773,7 +43827,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="lowercasestring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="lowercasestring">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42782,7 +43836,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="counttoken">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="counttoken">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42795,7 +43849,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="counttokens">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="counttokens">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42804,7 +43858,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="splitofftokens">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="splitofftokens">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42817,7 +43871,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="handletokens">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="handletokens">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -42826,9 +43880,9 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="settrialtypesetting"/>
- <cd:command file="syst-aux.mkiv" level="system" name="resettrialtypesetting"/>
- <cd:command file="syst-aux.mkiv" level="system" name="iftrialtypesetting">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="settrialtypesetting"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="resettrialtypesetting"/>
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="iftrialtypesetting">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:true"/>
@@ -42840,35 +43894,35 @@
<cd:delimiter name="fi"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="integerrounding">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="integerrounding">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="onedigitrounding">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="onedigitrounding">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="twodigitrounding">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="twodigitrounding">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="threedigitrounding">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="threedigitrounding">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processcontent">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="processcontent">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -42876,14 +43930,14 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dogobblesingleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dogobblesingleempty">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dogobbledoubleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dogobbledoubleempty">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:text"/>
@@ -42893,14 +43947,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblesingleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobblesingleempty">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobbledoubleempty">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="gobbledoubleempty">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:text"/>
@@ -42910,7 +43964,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsesometoks">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsesometoks">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -42921,7 +43975,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifsometokselse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifsometokselse">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -42932,7 +43986,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifsometoks">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifsometoks">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -42940,7 +43994,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifemptytoks">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifemptytoks">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -42948,8 +44002,8 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="strictinspectnextcharacter" type="environment"/>
- <cd:command file="syst-aux.mkiv" level="system" name="strictdoifelsenextoptional">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="strictinspectnextcharacter" type="environment"/>
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="strictdoifelsenextoptional">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -42959,7 +44013,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="strictdoifnextoptionalelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="strictdoifnextoptionalelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:true"/>
@@ -42969,42 +44023,42 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="gobblespacetokens"/>
- <cd:command file="syst-aux.mkiv" level="system" name="verbatimstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="gobblespacetokens"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="verbatimstring">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="lastdigit">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="lastdigit">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="lasttwodigits">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="lasttwodigits">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="serializedcommalist"/>
- <cd:command file="syst-aux.mkiv" level="system" name="serializecommalist">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="serializedcommalist"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="serializecommalist">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:command"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="purenumber">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="purenumber">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="filterfromvalue">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="filterfromvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43017,7 +44071,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="filterfromnext">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="filterfromnext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -43032,7 +44086,7 @@
<cd:content optional="yes"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="style" name="definemeasure">
+ <cd:command category="counter" file="syst-aux.mkiv" level="style" name="definemeasure">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -43042,7 +44096,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="freezemeasure">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="freezemeasure">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -43052,7 +44106,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setmeasure">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="setmeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43062,7 +44116,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setgmeasure">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="setgmeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43072,7 +44126,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setemeasure">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="setemeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43082,7 +44136,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setxmeasure">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="setxmeasure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43092,21 +44146,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="style" name="measure">
+ <cd:command category="counter" file="syst-aux.mkiv" level="style" name="measure">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="style" name="measured">
+ <cd:command category="counter" file="syst-aux.mkiv" level="style" name="measured">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dividedsize">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="dividedsize">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -43119,7 +44173,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsedimension">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsedimension">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43132,7 +44186,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifdimensionelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifdimensionelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43145,7 +44199,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsedimenstring">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsedimenstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43158,7 +44212,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifdimenstringelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifdimenstringelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43171,8 +44225,8 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="compresult"/>
- <cd:command file="syst-aux.mkiv" level="system" name="comparedimension">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="compresult"/>
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="comparedimension">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -43182,7 +44236,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="comparedimensioneps">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="comparedimensioneps">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -43192,7 +44246,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letcscsname">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letcscsname">
<cd:arguments>
<cd:csname/>
<cd:delimiter name="csname"/>
@@ -43202,7 +44256,7 @@
<cd:delimiter name="endcsname"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letcsnamecs">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letcsnamecs">
<cd:arguments>
<cd:delimiter name="csname"/>
<cd:keywords delimiters="none">
@@ -43212,7 +44266,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="letcsnamecsname">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="letcsnamecsname">
<cd:arguments>
<cd:delimiter name="csname"/>
<cd:keywords delimiters="none">
@@ -43226,7 +44280,7 @@
<cd:delimiter name="endcsname"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="addvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="addvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43236,14 +44290,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="unspaced">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="unspaced">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="unspaceargument">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="unspaceargument">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -43252,7 +44306,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="unspaceafter">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="unspaceafter">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -43260,7 +44314,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsehasspace">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsehasspace">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43273,7 +44327,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifhasspaceelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifhasspaceelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43286,28 +44340,28 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="setflag">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="setflag">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="resetflag">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="resetflag">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="flag">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="flag">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelseflagged">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelseflagged">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43320,7 +44374,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifflaggedelse">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifflaggedelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43333,7 +44387,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnotflagged">
+ <cd:command category="system" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnotflagged">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43343,7 +44397,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="inheritparameter">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="inheritparameter">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -43356,7 +44410,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifelsenonzeropositive">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifelsenonzeropositive">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -43369,7 +44423,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="doifnonzeropositiveelse">
+ <cd:command category="strings" file="syst-aux.mkiv" keywords="conditional" level="system" name="doifnonzeropositiveelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -43382,7 +44436,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getrawparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getrawparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -43394,7 +44448,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getraweparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getraweparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -43406,7 +44460,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getrawgparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getrawgparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -43418,7 +44472,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getrawxparameters">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="getrawxparameters">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -43430,7 +44484,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="unprotected">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="unprotected">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:content"/>
@@ -43438,11 +44492,12 @@
<cd:delimiter name="par"/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="resettimer"/>
- <cd:command file="syst-aux.mkiv" level="system" name="elapsedtime"/>
- <cd:command file="syst-aux.mkiv" level="system" name="elapsedseconds"/>
- <cd:command file="syst-aux.mkiv" level="system" name="currentfeaturetest"/>
- <cd:command file="syst-aux.mkiv" level="system" name="testfeature">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="resettimer"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="elapsedtime"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="elapsedseconds"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="elapsedsteptime"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="currentfeaturetest"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="testfeature">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -43450,14 +44505,15 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="showtimer">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="retestfeature"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="showtimer">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="testfeatureonce">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="testfeatureonce">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -43465,20 +44521,20 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="freezedimenmacro">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="freezedimenmacro">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="negated">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="negated">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="assigndimen">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="assigndimen">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -43486,7 +44542,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="appendvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="appendvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43496,7 +44552,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="appendgvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="appendgvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43506,7 +44562,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="prependvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="prependvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43516,7 +44572,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="prependgvalue">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="prependgvalue">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -43526,7 +44582,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="processranges">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="processranges">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:number"/>
@@ -43535,7 +44591,7 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="dowithrange">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="dowithrange">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:number"/>
@@ -43544,9 +44600,9 @@
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ignoreimplicitspaces"/>
- <cd:command file="syst-aux.mkiv" level="system" name="nointerference" type="environment"/>
- <cd:command file="syst-aux.mkiv" level="system" name="expandcheckedcsname">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="ignoreimplicitspaces"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="nointerference" type="environment"/>
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="expandcheckedcsname">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -43557,39 +44613,39 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="docheckedpair">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="docheckedpair">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="constantnumber">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="constantnumber">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="constantnumberargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="constantnumberargument">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="constantdimen">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="constantdimen">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="constantdimenargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="constantdimenargument">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="constantemptyargument">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="constantemptyargument">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="getsubstring">
+ <cd:command category="strings" file="syst-aux.mkiv" level="system" name="getsubstring">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -43602,7 +44658,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="converteddimen">
+ <cd:command category="counter" file="syst-aux.mkiv" level="system" name="converteddimen">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -43623,7 +44679,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-aux.mkiv" level="system" name="ntimes">
+ <cd:command category="system" file="syst-aux.mkiv" level="system" name="ntimes">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43633,7 +44689,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expdoifelse">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expdoifelse">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -43645,7 +44701,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expdoif">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expdoif">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -43654,7 +44710,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expdoifnot">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expdoifnot">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -43663,7 +44719,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expandeddoif">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expandeddoif">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -43672,7 +44728,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expandeddoifnot">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expandeddoifnot">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -43681,7 +44737,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expandeddoifelse">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expandeddoifelse">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -43693,7 +44749,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expdoifelsecommon">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expdoifelsecommon">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -43709,7 +44765,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expdoifcommonelse">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expdoifcommonelse">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:text"/>
@@ -43725,7 +44781,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expdoifelseinset">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expdoifelseinset">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43741,7 +44797,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="expdoifinsetelse">
+ <cd:command category="strings" file="syst-lua.mkiv" keywords="conditional" level="system" name="expdoifinsetelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -43757,14 +44813,23 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="syst-lua.mkiv" level="system" name="luaexpr">
+ <cd:command category="strings" file="syst-lua.mkiv" level="system" name="luaexpr">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
+ <cd:command category="counter" file="core-sys.mkiv" level="style" name="setupsystem">
+ <cd:arguments>
+ <cd:assignments list="yes">
+ <cd:parameter name="n">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-systemlog.xml">
- <cd:command file="core-sys.mkiv" level="system" name="systemlog">
+ <cd:command category="tracker" file="core-sys.mkiv" level="system" name="systemlog">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -43777,7 +44842,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-sys.mkiv" level="system" name="systemlogfirst">
+ <cd:command category="tracker" file="core-sys.mkiv" level="system" name="systemlogfirst">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -43790,7 +44855,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-sys.mkiv" level="system" name="systemloglast">
+ <cd:command category="tracker" file="core-sys.mkiv" level="system" name="systemloglast">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -43866,7 +44931,7 @@
<cd:command category="tables" file="tabl-tab.mkiv" level="style" name="setuptables">
<cd:arguments>
<cd:assignments list="yes">
- <cd:parameter name="text">
+ <cd:parameter name="textwidth">
<cd:constant type="cd:dimension"/>
<cd:constant type="max"/>
</cd:parameter>
@@ -43933,7 +44998,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-tabulation.xml">
- <cd:command category="tables" file="tabl-tbl.mkiv" level="style" name="definetabulation">
+ <cd:command category="tables" file="tabl-tbl.mkiv" level="style" name="definetabulate">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -43941,14 +45006,15 @@
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulation"/>
- </cd:assignments>
+ <cd:template optional="yes"/>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-tbl.mkiv" level="style" name="setuptabulation">
+ <cd:command category="tables" file="tabl-tbl.mkiv" level="style" name="setuptabulate">
<cd:arguments>
- <cd:keywords list="yes" optional="yes">
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
<cd:assignments list="yes">
@@ -44100,43 +45166,6 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-tbl.mkiv" generated="yes" level="document" name="tabulation" type="environment" variant="example">
- <cd:sequence>
- <cd:variable value="tabulation"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulation"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
- <cd:command category="tables" file="tabl-tbl.mkiv" level="style" name="definetabulate">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:template optional="yes"/>
- </cd:arguments>
- </cd:command>
- <cd:command category="tables" file="tabl-tbl.mkiv" level="style" name="setuptabulate">
- <cd:arguments>
- <cd:keywords optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords optional="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes">
- <cd:inherit name="setuptabulation"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
<cd:command category="tables" file="tabl-tbl.mkiv" level="document" name="tabulate" type="environment">
<cd:arguments>
<cd:template optional="yes"/>
@@ -44217,7 +45246,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="xml conditional" file="strc-tag.mkiv" level="system" name="doifelseinelement">
+ <cd:command category="xml" file="strc-tag.mkiv" keywords="conditional" level="system" name="doifelseinelement">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44230,7 +45259,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="xml conditional" file="strc-tag.mkiv" level="system" name="doifinelementelse">
+ <cd:command category="xml" file="strc-tag.mkiv" keywords="conditional" level="system" name="doifinelementelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44243,7 +45272,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="xml language" file="strc-tag.mkiv" level="system" name="taggedlabeltexts">
+ <cd:command category="xml" file="strc-tag.mkiv" keywords="language" level="system" name="taggedlabeltexts">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44254,7 +45283,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="xml language" file="strc-tag.mkiv" level="system" name="namedtaggedlabeltexts">
+ <cd:command category="xml" file="strc-tag.mkiv" keywords="language" level="system" name="namedtaggedlabeltexts">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44483,7 +45512,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-flw.mkiv" level="system" name="doifelsetextflowcollector">
+ <cd:command category="structure" file="page-flw.mkiv" keywords="conditional" level="system" name="doifelsetextflowcollector">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44496,7 +45525,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-flw.mkiv" level="system" name="doiftextflowcollectorelse">
+ <cd:command category="structure" file="page-flw.mkiv" keywords="conditional" level="system" name="doiftextflowcollectorelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44509,7 +45538,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-flw.mkiv" level="system" name="doifelsetextflow">
+ <cd:command category="structure" file="page-flw.mkiv" keywords="conditional" level="system" name="doifelsetextflow">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44522,7 +45551,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="structure conditional" file="page-flw.mkiv" level="system" name="doiftextflowelse">
+ <cd:command category="structure" file="page-flw.mkiv" keywords="conditional" level="system" name="doiftextflowelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -44665,10 +45694,23 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="lefttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middletext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="righttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="leftstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="middlestyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:parameter name="rightstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
@@ -44676,6 +45718,9 @@
<cd:parameter name="leftcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="middlecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="rightcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
@@ -44685,6 +45730,9 @@
<cd:parameter name="leftwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="middlewidth">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:parameter name="rightwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
@@ -44729,10 +45777,23 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="lefttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middletext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="righttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="leftstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="middlestyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:parameter name="rightstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
@@ -44740,6 +45801,9 @@
<cd:parameter name="leftcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="middlecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="rightcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
@@ -44749,6 +45813,9 @@
<cd:parameter name="leftwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="middlewidth">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:parameter name="rightwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
@@ -44793,10 +45860,23 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="lefttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middletext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="righttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="leftstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="middlestyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:parameter name="rightstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
@@ -44804,6 +45884,9 @@
<cd:parameter name="leftcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="middlecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="rightcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
@@ -44813,6 +45896,9 @@
<cd:parameter name="leftwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="middlewidth">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:parameter name="rightwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
@@ -44857,10 +45943,23 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="lefttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middletext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="righttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="leftstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="middlestyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:parameter name="rightstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
@@ -44868,6 +45967,9 @@
<cd:parameter name="leftcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="middlecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="rightcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
@@ -44877,6 +45979,9 @@
<cd:parameter name="leftwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="middlewidth">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:parameter name="rightwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
@@ -44921,10 +46026,23 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="lefttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middletext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="righttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="leftstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="middlestyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:parameter name="rightstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
@@ -44932,6 +46050,9 @@
<cd:parameter name="leftcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="middlecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="rightcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
@@ -44941,6 +46062,9 @@
<cd:parameter name="leftwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="middlewidth">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:parameter name="rightwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
@@ -44985,10 +46109,23 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="lefttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middletext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="righttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="leftstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="middlestyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:parameter name="rightstyle">
<cd:constant type="cd:style"/>
<cd:constant type="cd:command"/>
@@ -44996,6 +46133,9 @@
<cd:parameter name="leftcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="middlecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="rightcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
@@ -45005,13 +46145,16 @@
<cd:parameter name="leftwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="middlewidth">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:parameter name="rightwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-txt.mkvi" level="system" name="doifelselayouttextline">
+ <cd:command category="layout" file="page-txt.mkvi" keywords="conditional" level="system" name="doifelselayouttextline">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45024,7 +46167,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-txt.mkvi" level="system" name="doiflayouttextlineelse">
+ <cd:command category="layout" file="page-txt.mkvi" keywords="conditional" level="system" name="doiflayouttextlineelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45037,7 +46180,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-txt.mkvi" level="system" name="doifelselayoutsomeline">
+ <cd:command category="layout" file="page-txt.mkvi" keywords="conditional" level="system" name="doifelselayoutsomeline">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45050,7 +46193,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="layout conditional" file="page-txt.mkvi" level="system" name="doiflayoutsomelineelse">
+ <cd:command category="layout" file="page-txt.mkvi" keywords="conditional" level="system" name="doiflayoutsomelineelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45399,63 +46542,63 @@
</cd:command>
</cd:interface>
<cd:interface file="i-token.xml">
- <cd:command file="toks-tra.mkiv" level="system" name="tokens" type="environment">
+ <cd:command category="strings" file="toks-tra.mkiv" level="system" name="tokens" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-tra.mkiv" level="system" name="flushtokens">
+ <cd:command category="strings" file="toks-tra.mkiv" level="system" name="flushtokens">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-tra.mkiv" level="system" name="showtokens">
+ <cd:command category="strings" file="toks-tra.mkiv" level="system" name="showtokens">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-tra.mkiv" level="system" name="testtokens">
+ <cd:command category="strings" file="toks-tra.mkiv" level="system" name="testtokens">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-aux.mkiv" level="style" name="definetokenlist">
+ <cd:command category="strings" file="toks-aux.mkiv" level="style" name="definetokenlist">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-aux.mkiv" level="style" name="tokenlist" type="environment">
+ <cd:command category="strings" file="toks-aux.mkiv" level="style" name="tokenlist" type="environment">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-aux.mkiv" level="style" name="gettokenlist">
+ <cd:command category="strings" file="toks-aux.mkiv" level="style" name="gettokenlist">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-aux.mkiv" level="style" name="resettokenlist">
+ <cd:command category="strings" file="toks-aux.mkiv" level="style" name="resettokenlist">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="toks-aux.mkiv" level="style" name="settokenlist">
+ <cd:command category="strings" file="toks-aux.mkiv" level="style" name="settokenlist">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -45553,7 +46696,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-tracker.xml">
- <cd:command file="trac-ctx.mkiv" level="system" name="installtextracker">
+ <cd:command category="tracker" file="trac-ctx.mkiv" level="system" name="installtextracker">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45566,7 +46709,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-ctx.mkiv" level="system" name="installtexdirective">
+ <cd:command category="tracker" file="trac-ctx.mkiv" level="system" name="installtexdirective">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45579,56 +46722,56 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-deb.mkiv" level="style" name="enabletrackers">
+ <cd:command category="tracker" file="trac-deb.mkiv" level="style" name="enabletrackers">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-deb.mkiv" level="style" name="disabletrackers">
+ <cd:command category="tracker" file="trac-deb.mkiv" level="style" name="disabletrackers">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-deb.mkiv" level="system" name="resettrackers"/>
- <cd:command file="trac-deb.mkiv" level="document" name="showtrackers"/>
- <cd:command file="trac-deb.mkiv" level="style" name="enabledirectives">
+ <cd:command category="tracker" file="trac-deb.mkiv" level="system" name="resettrackers"/>
+ <cd:command category="tracker" file="trac-deb.mkiv" level="document" name="showtrackers"/>
+ <cd:command category="tracker" file="trac-deb.mkiv" level="style" name="enabledirectives">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-deb.mkiv" level="style" name="disabledirectives">
+ <cd:command category="tracker" file="trac-deb.mkiv" level="style" name="disabledirectives">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-deb.mkiv" level="document" name="showdirectives"/>
- <cd:command file="trac-deb.mkiv" level="style" name="enableexperiments">
+ <cd:command category="tracker" file="trac-deb.mkiv" level="document" name="showdirectives"/>
+ <cd:command category="tracker" file="trac-deb.mkiv" level="style" name="enableexperiments">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-deb.mkiv" level="style" name="disableexperiments">
+ <cd:command category="tracker" file="trac-deb.mkiv" level="style" name="disableexperiments">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trac-deb.mkiv" level="document" name="showexperiments"/>
- <cd:command file="trac-deb.mkiv" level="system" name="showedebuginfo"/>
- <cd:command file="trac-deb.mkiv" level="system" name="overloaderror"/>
- <cd:command file="trac-deb.mkiv" level="system" name="showlogcategories"/>
- <cd:command file="trac-jus.mkiv" level="system" name="showjustification"/>
+ <cd:command category="tracker" file="trac-deb.mkiv" level="document" name="showexperiments"/>
+ <cd:command category="tracker" file="trac-deb.mkiv" level="system" name="showedebuginfo"/>
+ <cd:command category="tracker" file="trac-deb.mkiv" level="system" name="overloaderror"/>
+ <cd:command category="tracker" file="trac-deb.mkiv" level="system" name="showlogcategories"/>
+ <cd:command category="tracker" file="trac-jus.mkiv" level="system" name="showjustification"/>
</cd:interface>
<cd:interface file="i-translation.xml">
<cd:command category="language" file="lang-lab.mkiv" level="document" name="translate">
@@ -45653,7 +46796,7 @@
</cd:command>
</cd:interface>
<cd:interface file="i-twopassdata.xml">
- <cd:command file="core-two.mkiv" level="system" name="immediatesavetwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="immediatesavetwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45664,7 +46807,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="savetwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="savetwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45675,7 +46818,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="lazysavetwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="lazysavetwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45686,7 +46829,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="savetaggedtwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="savetaggedtwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45700,7 +46843,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="lazysavetaggedtwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="lazysavetaggedtwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45714,28 +46857,28 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="definetwopasslist">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="definetwopasslist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="gettwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="gettwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="checktwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="checktwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="findtwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="findtwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45745,21 +46888,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="getfirsttwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="getfirsttwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="getlasttwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="getlasttwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="getnamedtwopassdatalist">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="getnamedtwopassdatalist">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="braces">
@@ -45767,14 +46910,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="gettwopassdatalist">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="gettwopassdatalist">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="doifelseintwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" keywords="conditional" level="system" name="doifelseintwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45790,7 +46933,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="doifintwopassdataelse">
+ <cd:command category="twopassdata" file="core-two.mkiv" keywords="conditional" level="system" name="doifintwopassdataelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -45806,7 +46949,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-two.mkiv" level="system" name="getfromtwopassdata">
+ <cd:command category="twopassdata" file="core-two.mkiv" level="system" name="getfromtwopassdata">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46254,7 +47397,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure" file="strc-usr.mkiv" level="document" name="userdata" type="environment">
+ <cd:command category="structure" file="strc-usr.mkiv" keywords="buffer" level="document" name="userdata" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -46294,11 +47437,11 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="structure" file="strc-usr.mkiv" level="style" name="getuserdata"/>
- <cd:command category="structure" file="strc-usr.mkiv" level="style" name="getinlineuserdata"/>
+ <cd:command category="structure" file="strc-usr.mkiv" keywords="buffer" level="style" name="getuserdata"/>
+ <cd:command category="structure" file="strc-usr.mkiv" keywords="buffer" level="style" name="getinlineuserdata"/>
</cd:interface>
<cd:interface file="i-variables.xml">
- <cd:command file="core-env.mkiv" level="style" name="setvariables">
+ <cd:command category="strings" file="core-env.mkiv" level="style" name="setvariables">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -46316,7 +47459,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setevariables">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="setevariables">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -46334,7 +47477,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setgvariables">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="setgvariables">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -46352,7 +47495,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setxvariables">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="setxvariables">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -46370,7 +47513,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="checkvariables">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="checkvariables">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -46388,7 +47531,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="setvariable">
+ <cd:command category="strings" file="core-env.mkiv" level="style" name="setvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46401,7 +47544,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setevariable">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="setevariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46414,7 +47557,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setgvariable">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="setgvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46427,7 +47570,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setxvariable">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="setxvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46440,7 +47583,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="style" name="getvariable">
+ <cd:command category="strings" file="core-env.mkiv" level="style" name="getvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46450,7 +47593,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="showvariable">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="showvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46460,7 +47603,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifelsevariable">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifelsevariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46476,7 +47619,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifvariableelse">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifvariableelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46492,7 +47635,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifvariable">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46505,7 +47648,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifnotvariable">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifnotvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46518,7 +47661,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifelseemptyvariable">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifelseemptyvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46534,7 +47677,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifemptyvariableelse">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifemptyvariableelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46550,7 +47693,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifemptyvariable">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifemptyvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46563,7 +47706,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifnotemptyvariable">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifnotemptyvariable">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46576,7 +47719,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="getvariabledefault">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="getvariabledefault">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46589,7 +47732,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="setupenv">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="setupenv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="set">
@@ -46604,7 +47747,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifelseenv">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifelseenv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -46617,7 +47760,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifenvelse">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifenvelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -46630,7 +47773,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifenv">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifenv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -46640,7 +47783,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="core-env.mkiv" level="system" name="doifnotenv">
+ <cd:command category="strings" file="core-env.mkiv" keywords="conditional" level="system" name="doifnotenv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -46650,14 +47793,14 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="env">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="env">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="core-env.mkiv" level="system" name="envvar">
+ <cd:command category="strings" file="core-env.mkiv" level="system" name="envvar">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:key"/>
@@ -46667,7 +47810,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="luat-ini.mkiv" level="system" name="setdocumentfilename">
+ <cd:command category="strings" file="luat-ini.mkiv" level="system" name="setdocumentfilename">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -46677,7 +47820,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="luat-ini.mkiv" level="system" name="setdocumentargument">
+ <cd:command category="strings" file="luat-ini.mkiv" level="system" name="setdocumentargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46687,7 +47830,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="luat-ini.mkiv" level="system" name="setdocumentargumentdefault">
+ <cd:command category="strings" file="luat-ini.mkiv" level="system" name="setdocumentargumentdefault">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46697,21 +47840,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="luat-ini.mkiv" level="system" name="getdocumentfilename">
+ <cd:command category="strings" file="luat-ini.mkiv" level="system" name="getdocumentfilename">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="luat-ini.mkiv" level="system" name="getdocumentargument">
+ <cd:command category="strings" file="luat-ini.mkiv" level="system" name="getdocumentargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="luat-ini.mkiv" level="system" name="getdocumentargumentdefault">
+ <cd:command category="strings" file="luat-ini.mkiv" level="system" name="getdocumentargumentdefault">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46721,7 +47864,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifelsedocumentargument">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifelsedocumentargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46734,7 +47877,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifdocumentargumentelse">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifdocumentargumentelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46747,7 +47890,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifdocumentargument">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifdocumentargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46757,7 +47900,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifnotdocumentargument">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifnotdocumentargument">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:name"/>
@@ -46767,7 +47910,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifelsedocumentfilename">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifelsedocumentfilename">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -46780,7 +47923,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifdocumentfilenameelse">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifdocumentfilenameelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -46793,7 +47936,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifdocumentfilename">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifdocumentfilename">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -46803,7 +47946,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="luat-ini.mkiv" level="system" name="doifnotdocumentfilename">
+ <cd:command category="strings" file="luat-ini.mkiv" keywords="conditional" level="system" name="doifnotdocumentfilename">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -47071,7 +48214,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="verbatim" file="buff-ver.mkiv" generated="yes" level="document" name="typing" type="environment" variant="instance">
+ <cd:command category="verbatim" file="buff-ver.mkiv" generated="yes" keywords="buffer" level="document" name="typing" type="environment" variant="instance">
<cd:sequence>
<cd:instance value="typing"/>
</cd:sequence>
@@ -47089,7 +48232,7 @@
<cd:constant value="XML"/>
</cd:instances>
</cd:command>
- <cd:command category="verbatim" file="buff-ver.mkiv" generated="yes" level="document" name="typing" type="environment" variant="instance:argument">
+ <cd:command category="verbatim" file="buff-ver.mkiv" generated="yes" keywords="buffer" level="document" name="typing" type="environment" variant="instance:argument">
<cd:sequence>
<cd:instance value="typing"/>
</cd:sequence>
@@ -47162,7 +48305,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="verbatim conditional" file="buff-ver.mkiv" level="system" name="doifelsetypingfile">
+ <cd:command category="verbatim" file="buff-ver.mkiv" keywords="conditional" level="system" name="doifelsetypingfile">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -47175,7 +48318,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="verbatim conditional" file="buff-ver.mkiv" level="system" name="doiftypingfileelse">
+ <cd:command category="verbatim" file="buff-ver.mkiv" keywords="conditional" level="system" name="doiftypingfileelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -47229,7 +48372,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="file-mod.mkvi" level="system" name="doifelseolderversion">
+ <cd:command file="file-mod.mkvi" keywords="conditional" level="system" name="doifelseolderversion">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -47245,7 +48388,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="file-mod.mkvi" level="system" name="doifolderversionelse">
+ <cd:command file="file-mod.mkvi" keywords="conditional" level="system" name="doifolderversionelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -47261,7 +48404,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="file-mod.mkvi" level="system" name="doifelseoldercontext">
+ <cd:command file="file-mod.mkvi" keywords="conditional" level="system" name="doifelseoldercontext">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -47274,7 +48417,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="conditional" file="file-mod.mkvi" level="system" name="doifoldercontextelse">
+ <cd:command file="file-mod.mkvi" keywords="conditional" level="system" name="doifoldercontextelse">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:number"/>
@@ -47354,7 +48497,7 @@
<cd:command category="pdf" file="attr-lay.mkiv" level="document" name="showlayoutcomponents"/>
</cd:interface>
<cd:interface file="i-visualizer.xml">
- <cd:command file="trac-vis.mkiv" level="system" name="ruledhbox">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledhbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47362,7 +48505,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="ruledvbox">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledvbox">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47370,7 +48513,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="ruledvtop">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledvtop">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47378,7 +48521,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="ruledtopv">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledtopv">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47386,7 +48529,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="ruledhpack">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledhpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47394,7 +48537,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="ruledvpack">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledvpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47402,7 +48545,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="ruledtpack">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledtpack">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47410,12 +48553,12 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="ruledmbox">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="rules" level="system" name="ruledmbox">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="filledhboxr">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="background colors" level="system" name="filledhboxr">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47423,7 +48566,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="filledhboxg">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="background colors" level="system" name="filledhboxg">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47431,7 +48574,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="filledhboxb">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="background colors" level="system" name="filledhboxb">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47439,7 +48582,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="filledhboxc">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="background colors" level="system" name="filledhboxc">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47447,7 +48590,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="filledhboxm">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="background colors" level="system" name="filledhboxm">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47455,7 +48598,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="filledhboxy">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="background colors" level="system" name="filledhboxy">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47463,7 +48606,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trac-vis.mkiv" level="system" name="filledhboxk">
+ <cd:command category="boxes" file="trac-vis.mkiv" keywords="background colors" level="system" name="filledhboxk">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="cd:text"/>
@@ -47471,7 +48614,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command file="trc-vis.mkiv" level="document" name="showmakeup">
+ <cd:command category="boxes" file="trc-vis.mkiv" level="document" name="showmakeup">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant default="yes" type="makeup"/>
@@ -47504,21 +48647,21 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trc-vis.mkiv" level="document" name="showallmakeup"/>
- <cd:command file="trc-vis.mkiv" level="document" name="showboxes"/>
- <cd:command file="trc-vis.mkiv" level="document" name="showglyphs"/>
- <cd:command file="trc-vis.mkiv" level="document" name="showfontkerns"/>
- <cd:command file="trc-vis.mkiv" level="document" name="showfontitalics"/>
- <cd:command file="trc-vis.mkiv" level="document" name="showglyphdata"/>
- <cd:command file="trc-vis.mkiv" level="document" name="showfontexpansion"/>
- <cd:command file="trc-vis.mkiv" level="system" name="setvisualizerfont">
+ <cd:command category="boxes" file="trc-vis.mkiv" level="document" name="showallmakeup"/>
+ <cd:command category="boxes" file="trc-vis.mkiv" level="document" name="showboxes"/>
+ <cd:command category="fonts" file="trc-vis.mkiv" level="document" name="showglyphs"/>
+ <cd:command category="fonts" file="trc-vis.mkiv" level="document" name="showfontkerns"/>
+ <cd:command category="fonts" file="trc-vis.mkiv" level="document" name="showfontitalics"/>
+ <cd:command category="fonts" file="trc-vis.mkiv" level="document" name="showglyphdata"/>
+ <cd:command category="fonts" file="trc-vis.mkiv" level="document" name="showfontexpansion"/>
+ <cd:command category="fonts" file="trc-vis.mkiv" level="system" name="setvisualizerfont">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:font"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command file="trc-vis.mkiv" level="system" name="resetvisualizers"/>
+ <cd:command category="fonts" file="trc-vis.mkiv" level="system" name="resetvisualizers"/>
</cd:interface>
<cd:interface file="i-vspace.xml">
<cd:command category="whitespace" file="spac-ver.mkiv" level="system" name="definevspacingamount">
@@ -47699,6 +48842,16 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="whitespace" file="spac-ver.mkxl" keywords="conditional" level="document" name="doifoutervmode">
+ <cd:arguments>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-ver.mkxl" level="document" name="dosomebreak">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
<cd:command category="whitespace" file="spac-ver.mkiv" level="document" name="godown">
<cd:arguments>
<cd:keywords>
@@ -47783,7 +48936,7 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="alignment" file="spac-ver.mkiv" level="system" name="forgetparskip"/>
+ <cd:command category="whitespace" file="spac-ver.mkiv" keywords="alignment" level="system" name="forgetparskip"/>
</cd:interface>
<cd:interface file="i-xml.xml">
<cd:command category="xml" file="lxml-ini.mkiv" level="style" name="xmlmain">
@@ -48850,16 +50003,6 @@
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="xml" file="lxml-ini.mkiv" level="style" name="xmlregisterns">
- <cd:arguments>
- <cd:keywords delimiters="braces">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords delimiters="braces">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
<cd:command category="xml" file="lxml-ini.mkiv" level="style" name="xmlremapname">
<cd:arguments>
<cd:keywords delimiters="braces">
@@ -49087,6 +50230,10 @@
<cd:constant type="yes"/>
<cd:constant type="no"/>
</cd:parameter>
+ <cd:parameter name="entities">
+ <cd:constant type="yes"/>
+ <cd:constant default="yes" type="no"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -49097,9 +50244,16 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="xml" file="lxml-ini.mkiv" level="style" name="xmldepth">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:node"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-xtable.xml">
- <cd:command category="tables" file="tabl-xtb.mkvi" level="style" name="definextable">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="style" name="definextable">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -49112,7 +50266,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="style" name="setupxtable">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="style" name="setupxtable">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -49200,35 +50354,35 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtable" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtable" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtable" type="environment" variant="name">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtable" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="style" name="embeddedxtable" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="style" name="embeddedxtable" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="style" name="embeddedxtable" type="environment" variant="name">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="style" name="embeddedxtable" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" generated="yes" level="document" name="xtable" type="environment" variant="example">
+ <cd:command category="tables" file="tabl-xtb.mkvi" generated="yes" keywords="background rules" level="document" name="xtable" type="environment" variant="example">
<cd:sequence>
<cd:variable value="xtable"/>
</cd:sequence>
@@ -49238,14 +50392,14 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="processxtablebuffer">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="processxtablebuffer">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xrow" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xrow" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -49255,21 +50409,21 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xcolumn" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xcolumn" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xcolumn" type="environment" variant="name">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xcolumn" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xcell" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xcell" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -49291,63 +50445,63 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablehead" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablehead" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablehead" type="environment" variant="name">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablehead" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablefoot" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablefoot" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablefoot" type="environment" variant="name">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablefoot" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablenext" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablenext" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablenext" type="environment" variant="name">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablenext" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablebody" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablebody" type="environment">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xtablebody" type="environment" variant="name">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xtablebody" type="environment" variant="name">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xgroup" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xgroup" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -49357,7 +50511,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xrowgroup" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xrowgroup" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -49367,7 +50521,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="document" name="xcellgroup" type="environment">
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="document" name="xcellgroup" type="environment">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -49377,7 +50531,7 @@
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="system" name="currentxtablerow"/>
- <cd:command category="tables" file="tabl-xtb.mkvi" level="system" name="currentxtablecolumn"/>
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="system" name="currentxtablerow"/>
+ <cd:command category="tables" file="tabl-xtb.mkvi" keywords="background rules" level="system" name="currentxtablecolumn"/>
</cd:interface>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-accent.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-accent.xml
index 190e1faa9fa..d14690e581b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-accent.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-accent.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineaccent" level="style" file="enco-ini.mkiv">
+ <cd:command name="defineaccent" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="string-character"/>
<cd:resolve name="string-character"/>
@@ -12,150 +12,150 @@
</cd:arguments>
</cd:command>
- <cd:command name="definecharacter" level="style" file="enco-ini.mkiv">
+ <cd:command name="definecharacter" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="string-character"/>
<cd:resolve name="string-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="definecommand" level="style" file="enco-ini.mkiv">
+ <cd:command name="definecommand" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="string-character"/>
<cd:resolve name="string-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="definemathaccent" level="style" file="enco-ini.mkiv">
+ <cd:command name="definemathaccent" level="style" category="mathematics" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
<cd:resolve name="string-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildmathaccent" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildmathaccent" level="style" category="mathematics" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildtextaccent" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildtextaccent" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildtextmacron" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildtextmacron" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildtextbottomdot" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildtextbottomdot" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildtextcedilla" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildtextcedilla" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildtextognek" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildtextognek" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildtextbottomcomma" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildtextbottomcomma" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="d" level="style" file="enco-ini.mkiv">
+ <cd:command name="d" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="buildtextgrave" level="style" file="enco-ini.mkiv">
+ <cd:command name="buildtextgrave" level="style" category="language" file="enco-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="acute" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="acute" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="grave" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="grave" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="ddot" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="ddot" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="tilde" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="tilde" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="bar" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="bar" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="breve" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="breve" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="check" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="check" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="hat" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="hat" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="vec" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="vec" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="dot" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="dot" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="ring" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="ring" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="dddot" category="mathematics" level="document" file="math-acc.mkvi">
+ <cd:command name="dddot" level="document" category="mathematics" file="math-acc.mkvi">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
@@ -163,102 +163,102 @@
<!--
- <cd:command name="AA" file="enco-ini.mkiv"/>
+ <cd:command name="AA" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="aa" file="enco-ini.mkiv"/>
+ <cd:command name="aa" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="AE" file="enco-ini.mkiv"/>
+ <cd:command name="AE" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="ae" file="enco-ini.mkiv"/>
+ <cd:command name="ae" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="CC" file="enco-ini.mkiv"/>
+ <cd:command name="CC" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="cc" file="enco-ini.mkiv"/>
+ <cd:command name="cc" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="L" file="enco-ini.mkiv"/>
+ <cd:command name="L" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="l" file="enco-ini.mkiv"/>
+ <cd:command name="l" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="O" file="enco-ini.mkiv"/>
+ <cd:command name="O" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="o" file="enco-ini.mkiv"/>
+ <cd:command name="o" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="OE" file="enco-ini.mkiv"/>
+ <cd:command name="OE" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="oe" file="enco-ini.mkiv"/>
+ <cd:command name="oe" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="SZ" file="enco-ini.mkiv"/>
+ <cd:command name="SZ" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="sz" file="enco-ini.mkiv"/>
+ <cd:command name="sz" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="SS" file="enco-ini.mkiv"/>
+ <cd:command name="SS" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="IJ" file="enco-ini.mkiv"/>
+ <cd:command name="IJ" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="ij" file="enco-ini.mkiv"/>
+ <cd:command name="ij" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="i" file="enco-ini.mkiv"/>
+ <cd:command name="i" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="j" file="enco-ini.mkiv"/>
+ <cd:command name="j" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="eszett" file="enco-ini.mkiv"/>
+ <cd:command name="eszett" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Eszett" file="enco-ini.mkiv"/>
+ <cd:command name="Eszett" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Ssharp" file="enco-ini.mkiv"/>
+ <cd:command name="Ssharp" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="lslash" file="enco-ini.mkiv"/>
+ <cd:command name="lslash" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Lslash" file="enco-ini.mkiv"/>
+ <cd:command name="Lslash" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="dslash" file="enco-ini.mkiv"/>
+ <cd:command name="dslash" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Dslash" file="enco-ini.mkiv"/>
+ <cd:command name="Dslash" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="oslash" file="enco-ini.mkiv"/>
+ <cd:command name="oslash" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Oslash" file="enco-ini.mkiv"/>
+ <cd:command name="Oslash" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="dcroat" file="enco-ini.mkiv"/>
+ <cd:command name="dcroat" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Dcroat" file="enco-ini.mkiv"/>
+ <cd:command name="Dcroat" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="kcedilla" file="enco-ini.mkiv"/>
+ <cd:command name="kcedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Kcedilla" file="enco-ini.mkiv"/>
+ <cd:command name="Kcedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="lcedilla" file="enco-ini.mkiv"/>
+ <cd:command name="lcedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Lcedilla" file="enco-ini.mkiv"/>
+ <cd:command name="Lcedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="ncedilla" file="enco-ini.mkiv"/>
+ <cd:command name="ncedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Ncedilla" file="enco-ini.mkiv"/>
+ <cd:command name="Ncedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="rcedilla" file="enco-ini.mkiv"/>
+ <cd:command name="rcedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Rcedilla" file="enco-ini.mkiv"/>
+ <cd:command name="Rcedilla" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="aumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="aumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Aumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="Aumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="eumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="eumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Eumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="Eumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="iumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="iumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Iumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="Iumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="oumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="oumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Oumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="Oumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="uumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="uumlaut" level="document" category="language" file="enco-ini.mkiv"/>
- <cd:command name="Uumlaut" file="enco-ini.mkiv"/>
+ <cd:command name="Uumlaut" level="document" category="language" file="enco-ini.mkiv"/>
-->
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-align.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-align.xml
index eaebaa698f2..46afca89732 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-align.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-align.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupalign" category="alignment" level="style" file="spac-ali.mkiv">
+ <cd:command name="setupalign" level="style" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="broad"/>
@@ -74,7 +74,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="alignment" type="environment" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="alignment" type="environment" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:keywords list="yes">
<cd:inherit name="setupalign"/>
@@ -82,7 +82,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="linealignment" type="environment" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="linealignment" type="environment" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="left"/>
@@ -93,49 +93,49 @@
</cd:arguments>
</cd:command>
- <cd:command name="leftaligned" type="environment" category="alignment" level="document" file="spac-ali.mkiv"/>
+ <cd:command name="leftaligned" type="environment" level="document" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="middlealigned" type="environment" category="alignment" level="document" file="spac-ali.mkiv"/>
+ <cd:command name="middlealigned" type="environment" level="document" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="rightaligned" type="environment" category="alignment" level="document" file="spac-ali.mkiv"/>
+ <cd:command name="rightaligned" type="environment" level="document" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="maxaligned" type="environment" category="alignment" level="document" file="spac-ali.mkiv"/>
+ <cd:command name="maxaligned" type="environment" level="document" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="midaligned" type="environment" category="alignment" level="document" file="spac-ali.mkiv"/>
+ <cd:command name="midaligned" type="environment" level="document" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="centeraligned" type="environment" category="alignment" level="document" file="spac-ali.mkiv"/>
+ <cd:command name="centeraligned" type="environment" level="document" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="leftaligned" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="leftaligned" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rightaligned" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="rightaligned" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="middlealigned" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="middlealigned" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="maxaligned" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="maxaligned" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="midaligned" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="midaligned" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centeraligned" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="centeraligned" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
@@ -149,7 +149,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="wordright" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="wordright" level="document" category="alignment" keywords="linebreak" file="spac-ali.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="right"/>
@@ -159,7 +159,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplealignedbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="simplealignedbox" level="system" category="alignment" keywords="boxes" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-alignsimple"/>
@@ -167,7 +167,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplealignedspreadbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="simplealignedspreadbox" level="system" category="alignment" keywords="boxes" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-alignsimple"/>
@@ -175,7 +175,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplealignedboxplus" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="simplealignedboxplus" level="system" category="alignment" keywords="boxes" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-alignsimple"/>
@@ -184,7 +184,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplereversealignedbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="simplereversealignedbox" level="system" category="alignment" keywords="boxes direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-alignsimple"/>
@@ -192,7 +192,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplereversealignedboxplus" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="simplereversealignedboxplus" level="system" category="alignment" keywords="boxes direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-alignsimple"/>
@@ -201,7 +201,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="alignedbox" level="system" category="alignment" file="pack-box.mkiv">
+ <cd:command name="alignedbox" level="system" category="alignment" keywords="boxes" file="pack-box.mkiv">
<cd:arguments>
<cd:keywords list="yes">
<cd:resolve name="value-aligned"/>
@@ -220,65 +220,65 @@
</cd:arguments>
</cd:command>
- <cd:command name="lefttoright" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="lefttoright" level="style" category="alignment" keywords="direction" file="spac-ali.mkiv"/>
- <cd:command name="righttoleft" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="righttoleft" level="style" category="alignment" keywords="direction" file="spac-ali.mkiv"/>
- <cd:command name="raggedbottom" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="raggedbottom" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="alignbottom" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="alignbottom" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="baselinebottom" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="baselinebottom" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="notragged" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="notragged" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="raggedleft" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="raggedleft" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="raggedcenter" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="raggedcenter" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="raggedright" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="raggedright" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="veryraggedleft" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="veryraggedleft" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="veryraggedcenter" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="veryraggedcenter" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="veryraggedright" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="veryraggedright" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="raggedwidecenter" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="raggedwidecenter" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="centeredlastline" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="centeredlastline" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="flushedrightlastline" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="flushedrightlastline" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="ttraggedright" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="ttraggedright" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="forgetragged" category="alignment" level="style" file="spac-ali.mkiv"/>
+ <cd:command name="forgetragged" level="style" category="alignment" file="spac-ali.mkiv"/>
- <cd:command name="line" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="line" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftline" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="leftline" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rightline" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="rightline" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centerline" category="alignment" level="document" file="spac-ali.mkiv">
+ <cd:command name="centerline" level="document" category="alignment" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="hanging" type="environment" category="alignment" level="document" file="spac-ver.mkiv">
+ <cd:command name="hanging" type="environment" level="document" category="alignment" file="spac-ver.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="distance">
@@ -296,7 +296,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="hanging" type="environment" variant="argument" category="alignment" level="document" file="spac-ver.mkiv">
+ <cd:command name="hanging" type="environment" variant="argument" level="document" category="alignment" file="spac-ver.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="left" default="yes"/>
@@ -306,7 +306,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fixed" type="environment" category="alignment" level="document" file="spac-ver.mkiv">
+ <cd:command name="fixed" type="environment" level="document" category="alignment" file="spac-ver.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="low"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-anchor.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-anchor.xml
index c8dad56d5c4..28b69a43652 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-anchor.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-anchor.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineanchor" level="style" file="pack-box.mkiv">
+ <cd:command name="defineanchor" level="style" category="graphics" file="pack-box.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name"/>
@@ -18,7 +18,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="anchor" level="document" file="pack-box.mkiv">
+ <cd:command name="anchor" level="document" category="graphics" file="pack-box.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -32,4 +32,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-attachment.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-attachment.xml
index 550cc57ce66..b75a5ac66dc 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-attachment.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-attachment.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineattachment" level="style" file="scrn-wid.mkvi">
+ <cd:command name="defineattachment" level="style" category="pdf" file="scrn-wid.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupattachment" level="style" file="scrn-wid.mkvi">
+ <cd:command name="setupattachment" level="style" category="pdf" file="scrn-wid.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -88,7 +88,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupattachments" level="style" file="scrn-wid.mkvi">
+ <cd:command name="setupattachments" level="style" category="pdf" file="scrn-wid.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -97,7 +97,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="registerattachment" level="document" file="scrn-wid.mkvi">
+ <cd:command name="registerattachment" level="document" category="pdf" file="scrn-wid.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -106,7 +106,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="attachment" generated="yes" variant="instance" level="document" file="scrn-wid.mkvi">
+ <cd:command name="attachment" generated="yes" variant="instance" level="document" category="pdf" file="scrn-wid.mkvi">
<cd:sequence>
<cd:instance value="attachment"/>
</cd:sequence>
@@ -121,7 +121,7 @@
</cd:instances>
</cd:command>
- <cd:command name="attachment" type="environment" generated="yes" variant="instance" level="document" file="scrn-wid.mkvi">
+ <cd:command name="attachment" type="environment" generated="yes" variant="instance" level="document" category="pdf" file="scrn-wid.mkvi">
<cd:sequence>
<cd:instance value="attachment"/>
</cd:sequence>
@@ -136,28 +136,6 @@
</cd:instances>
</cd:command>
- <cd:command name="placeattachments" level="document" file="scrn-wid.mkvi"/>
+ <cd:command name="placeattachments" level="document" category="pdf" file="scrn-wid.mkvi"/>
- <!--
-
- <cd:command name="attachment" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupattachment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="attachment" type="environment" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupattachment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-attribute.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-attribute.xml
index 0ea4ce7c0d5..77b91ff44d7 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-attribute.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-attribute.xml
@@ -4,25 +4,25 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="pushattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="pushattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="popattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="popattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="installattributestack" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="installattributestack" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="defineattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="defineattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes" optional="yes">
@@ -35,7 +35,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="definesystemattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="definesystemattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes" optional="yes">
@@ -48,51 +48,51 @@
</cd:arguments>
</cd:command>
- <cd:command name="newattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="newattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="dosetattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="dosetattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="doresetattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="doresetattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="dogetattribute" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="dogetattribute" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="dogetattributeid" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="dogetattributeid" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="resetallattributes" category="attribute" level="system" file="attr-ini.mkiv"/>
+ <cd:command name="resetallattributes" level="system" category="attribute" file="attr-ini.mkiv"/>
- <cd:command name="savecurrentattributes" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="savecurrentattributes" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="restorecurrentattributes" category="attribute" level="system" file="attr-ini.mkiv">
+ <cd:command name="restorecurrentattributes" level="system" category="attribute" file="attr-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="showattributes" category="attribute" level="document" file="attr-ini.mkiv"/>
+ <cd:command name="showattributes" level="document" category="attribute" file="attr-ini.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-backend.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-backend.xml
index d0bdb485346..2ec8f422b2e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-backend.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-backend.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupbackend" level="style" catehory="pdf" file="back-ini.mkiv">
+ <cd:command name="setupbackend" level="style" category="pdf" file="back-ini.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="export">
@@ -86,4 +86,19 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="setupoutput" level="style" category="pdf" file="back-ini.mkxl">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="default"/>
+ <cd:constant type="pdf"/>
+ <cd:constant type="lua"/>
+ <cd:constant type="json"/>
+ <cd:constant type="js"/>
+ <cd:constant type="mps"/>
+ <cd:constant type="none"/>
+ <cd:constant type="empty"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-background.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-background.xml
index 6bdddbb1b16..b638e4a203b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-background.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-background.xml
@@ -85,7 +85,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="backgroundline" level="document" category="background colors" file="pack-bck.mkvi">
+ <cd:command name="backgroundline" level="document" category="background" keywords="colors" file="pack-bck.mkvi">
<cd:arguments>
<cd:resolve name="keyword-color"/>
<cd:content/>
@@ -140,7 +140,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesomebackground" level="system" category="background conditional" file="page-bck.mkiv">
+ <cd:command name="doifelsesomebackground" level="system" category="background" keywords="conditional" file="page-bck.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -148,7 +148,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsomebackgroundelse" level="system" category="background conditional" file="page-bck.mkiv">
+ <cd:command name="doifsomebackgroundelse" level="system" category="background" keywords="conditional" file="page-bck.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -156,7 +156,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsomebackground" level="system" category="background conditional" file="page-bck.mkiv">
+ <cd:command name="doifsomebackground" level="system" category="background" keywords="conditional" file="page-bck.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-bar.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-bar.xml
index fb120d05b69..4f9bd9c3444 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-bar.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-bar.xml
@@ -78,6 +78,10 @@
<cd:parameter name="right">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="repeat">
+ <cd:constant type="yes"/>
+ <cd:constant type="no" default="yes"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -127,106 +131,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="overbar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="hiddenbar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overstrike" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="understrike" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbars" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbars" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overstrikes" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="understrikes" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrandom" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrandoms" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdash" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdashes" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdot" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdots" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="nobar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="resetbar" level="style" category="rules" file="node-rul.mkiv"/>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-blackrule.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-blackrule.xml
index 0463f21ed30..84992ebc686 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-blackrule.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-blackrule.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupblackrules" level="style" category="rules colors" file="pack-mrl.mkiv">
+ <cd:command name="setupblackrules" level="style" category="rules" keywords="colors" file="pack-mrl.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="width">
@@ -47,7 +47,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="blackrule" level="document" category="rules colors" file="pack-mrl.mkiv">
+ <cd:command name="blackrule" level="document" category="rules" keywords="colors" file="pack-mrl.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupblackrules"/>
@@ -55,7 +55,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="blackrules" level="document" category="rules colors" file="pack-mrl.mkiv">
+ <cd:command name="blackrules" level="document" category="rules" keywords="colors" file="pack-mrl.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupblackrules"/>
@@ -110,9 +110,26 @@
<cd:constant type="cd:text" prefix="typeâ£" method="none"/>
<cd:constant type="cd:text" prefix="dataâ£" method="none"/>
<cd:constant type="cd:text" prefix="nameâ£" method="none"/>
+ <cd:constant type="cd:dimension" prefix="radiusâ£" method="none"/>
+ <cd:constant type="cd:text" prefix="cornerâ£" method="none"/>
+ </cd:keywords>
+ <cd:delimiter name="relax"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="autorule" level="style" category="rules" file="node-rul.mkiv">
+ <cd:arguments>
+ <cd:keywords delimiters="none" list="yes">
+ <cd:constant type="cd:dimension" prefix="widthâ£" method="none"/>
+ <cd:constant type="cd:dimension" prefix="heightâ£" method="none"/>
+ <cd:constant type="cd:dimension" prefix="depthâ£" method="none"/>
+ <cd:constant type="cd:dimension" prefix="xoffsetâ£" method="none"/>
+ <cd:constant type="cd:dimension" prefix="yoffsetâ£" method="none"/>
+ <cd:constant type="cd:dimension" prefix="leftâ£" method="none"/>
+ <cd:constant type="cd:dimension" prefix="rightâ£" method="none"/>
</cd:keywords>
<cd:delimiter name="relax"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-bleed.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-bleed.xml
index ee860b85f6f..f48b9d40c3e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-bleed.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-bleed.xml
@@ -61,4 +61,4 @@
<cd:command name="bleedheight" level="style" category="graphics" file="pack-box.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-block.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-block.xml
index 3416a96ee81..dbc64e8880d 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-block.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-block.xml
@@ -41,7 +41,7 @@
<cd:constant type="cd:name"/>
</cd:parameter>
<cd:parameter name="align">
- <cd:resolve name="value-alignsimple"/>
+ <cd:inherit name="setupalign"/>
</cd:parameter>
<cd:parameter name="style">
<cd:resolve name="value-style"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-bookmark.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-bookmark.xml
index 3dbfa34069c..4b02ab7d1a6 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-bookmark.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-bookmark.xml
@@ -76,4 +76,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-boxes.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-boxes.xml
index 8c6c6c74a7a..b13c8c3abbf 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-boxes.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-boxes.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="doiftext" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doiftext" level="system" category="strings" keywords="conditional" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsetext" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doifelsetext" level="system" category="strings" keywords="conditional" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -20,7 +20,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiftextelse" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doiftextelse" level="system" category="strings" keywords="conditional" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -28,7 +28,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dowithnextbox" level="system" file="supp-box.mkiv">
+ <cd:command name="dowithnextbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:csname/>
@@ -36,7 +36,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dowithnextboxcs" level="system" file="supp-box.mkiv">
+ <cd:command name="dowithnextboxcs" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
@@ -44,21 +44,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="nextboxwd" level="system" file="supp-box.mkiv"/>
+ <cd:command name="nextboxwd" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="nextboxht" level="system" file="supp-box.mkiv"/>
+ <cd:command name="nextboxht" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="nextboxdp" level="system" file="supp-box.mkiv"/>
+ <cd:command name="nextboxdp" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="nextboxhtdp" level="system" file="supp-box.mkiv"/>
+ <cd:command name="nextboxhtdp" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="flushnextbox" level="system" file="supp-box.mkiv"/>
+ <cd:command name="flushnextbox" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="nextbox" level="system" file="supp-box.mkiv"/>
+ <cd:command name="nextbox" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="nextdepth" level="system" file="supp-box.mkiv"/>
+ <cd:command name="nextdepth" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="dowithnextboxcontent" level="system" file="supp-box.mkiv">
+ <cd:command name="dowithnextboxcontent" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -67,7 +67,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dowithnextboxcontentcs" level="system" file="supp-box.mkiv">
+ <cd:command name="dowithnextboxcontentcs" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
@@ -76,55 +76,55 @@
</cd:arguments>
</cd:command>
- <cd:command name="rlap" level="system" file="supp-box.mkiv">
+ <cd:command name="rlap" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="llap" level="system" file="supp-box.mkiv">
+ <cd:command name="llap" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="clap" level="system" file="supp-box.mkiv">
+ <cd:command name="clap" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="tlap" level="system" file="supp-box.mkiv">
+ <cd:command name="tlap" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="blap" level="system" file="supp-box.mkiv">
+ <cd:command name="blap" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="reshapebox" level="system" file="supp-box.mkiv">
+ <cd:command name="reshapebox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="shapebox" type="environment" begin="beginof" end="endof" level="system" file="supp-box.mkiv"/>
+ <cd:command name="shapebox" type="environment" begin="beginof" end="endof" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="flushshapebox" level="system" file="supp-box.mkiv"/>
+ <cd:command name="flushshapebox" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="innerflushshapebox" level="system" file="supp-box.mkiv"/>
+ <cd:command name="innerflushshapebox" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="shapedhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="shapedhbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="processtokens" level="system" file="supp-box.mkiv">
+ <cd:command name="processtokens" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -134,7 +134,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doboundtext" level="system" file="supp-box.mkiv">
+ <cd:command name="doboundtext" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-dimension"/>
@@ -142,7 +142,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatetext" level="system" file="supp-box.mkiv">
+ <cd:command name="limitatetext" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:keywords delimiters="braces">
@@ -152,7 +152,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatetext" variant="list" level="system" file="supp-box.mkiv">
+ <cd:command name="limitatetext" variant="list" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:keywords delimiters="braces" list="yes">
@@ -162,7 +162,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatefirstline" level="system" file="supp-box.mkiv">
+ <cd:command name="limitatefirstline" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-dimension"/>
@@ -170,159 +170,159 @@
</cd:arguments>
</cd:command>
- <cd:command name="processisolatedchars" level="system" file="supp-box.mkiv">
+ <cd:command name="processisolatedchars" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="processisolatedwords" level="system" file="supp-box.mkiv">
+ <cd:command name="processisolatedwords" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="applytocharacters" level="system" file="supp-box.mkiv">
+ <cd:command name="applytocharacters" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytowords" level="system" file="supp-box.mkiv">
+ <cd:command name="applytowords" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytosplitstringchar" level="system" file="supp-box.mkiv">
+ <cd:command name="applytosplitstringchar" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytosplitstringword" level="system" file="supp-box.mkiv">
+ <cd:command name="applytosplitstringword" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytosplitstringline" level="system" file="supp-box.mkiv">
+ <cd:command name="applytosplitstringline" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytosplitstringcharspaced" level="system" file="supp-box.mkiv">
+ <cd:command name="applytosplitstringcharspaced" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytosplitstringwordspaced" level="system" file="supp-box.mkiv">
+ <cd:command name="applytosplitstringwordspaced" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytosplitstringlinespaced" level="system" file="supp-box.mkiv">
+ <cd:command name="applytosplitstringlinespaced" level="system" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="sbox" level="system" file="supp-box.mkiv">
+ <cd:command name="sbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="linebox" level="system" file="supp-box.mkiv">
+ <cd:command name="linebox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="shiftbox" level="system" file="supp-box.mkiv">
+ <cd:command name="shiftbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:dimension/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="hpackbox" level="system" file="supp-box.mkiv">
+ <cd:command name="hpackbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command name="vpackbox" level="system" file="supp-box.mkiv">
+ <cd:command name="vpackbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command name="hpackedbox" level="system" file="supp-box.mkiv">
+ <cd:command name="hpackedbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command name="vpackedbox" level="system" file="supp-box.mkiv">
+ <cd:command name="vpackedbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:dimension/>
</cd:arguments>
</cd:command>
- <cd:command name="inlinedbox" level="system" file="supp-box.mkiv">
+ <cd:command name="inlinedbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="struttedbox" level="system" file="supp-box.mkiv">
+ <cd:command name="struttedbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="topskippedbox" level="system" file="supp-box.mkiv">
+ <cd:command name="topskippedbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centeredbox" level="system" file="supp-box.mkiv">
+ <cd:command name="centeredbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centerednextbox" level="system" file="supp-box.mkiv">
+ <cd:command name="centerednextbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="centerbox" level="system" file="supp-box.mkiv">
+ <cd:command name="centerbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setrigidcolumnhsize" level="system" file="supp-box.mkiv">
+ <cd:command name="setrigidcolumnhsize" level="system" category="columns" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -330,21 +330,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="setrigidcolumnbalance" level="system" file="supp-box.mkiv">
+ <cd:command name="setrigidcolumnbalance" level="system" category="columns" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="vboxtohbox" type="environment" level="system" file="supp-box.mkiv"/>
+ <cd:command name="vboxtohbox" type="environment" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="vboxtohboxseparator" type="environment" level="system" file="supp-box.mkiv"/>
+ <cd:command name="vboxtohboxseparator" type="environment" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="convertvboxtohbox" level="system" file="supp-box.mkiv"/>
+ <cd:command name="convertvboxtohbox" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="hboxestohbox" type="environment" level="system" file="supp-box.mkiv"/>
+ <cd:command name="hboxestohbox" type="environment" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="unhhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="unhhbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:delimiter name="with"/>
@@ -354,17 +354,17 @@
<!--
- <cd:command name="hhbox" level="system" file="supp-box.mkiv"/>
+ <cd:command name="hhbox" level="system" category="boxes" file="supp-box.mkiv"/>
-->
- <cd:command name="hboxofvbox" level="system" file="supp-box.mkiv">
+ <cd:command name="hboxofvbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifcontent" level="system" file="supp-box.mkiv">
+ <cd:command name="doifcontent" level="system" category="boxes" keywords="conditional" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -374,105 +374,105 @@
</cd:arguments>
</cd:command>
- <cd:command name="overlay" type="environment" level="system" file="supp-box.mkiv"/>
+ <cd:command name="overlay" type="environment" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="fakebox" level="system" file="supp-box.mkiv">
+ <cd:command name="fakebox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="lbox" level="system" file="supp-box.mkiv">
+ <cd:command name="lbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="cbox" level="system" file="supp-box.mkiv">
+ <cd:command name="cbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rbox" level="system" file="supp-box.mkiv">
+ <cd:command name="rbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ltop" level="system" file="supp-box.mkiv">
+ <cd:command name="ltop" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ctop" level="system" file="supp-box.mkiv">
+ <cd:command name="ctop" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rtop" level="system" file="supp-box.mkiv">
+ <cd:command name="rtop" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="tbox" level="system" file="supp-box.mkiv">
+ <cd:command name="tbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bbox" level="system" file="supp-box.mkiv">
+ <cd:command name="bbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="lhbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="mhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="mhbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="rhbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lefthbox" level="system" file="supp-box.mkiv">
+ <cd:command name="lefthbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="midhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="midhbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="righthbox" level="system" file="supp-box.mkiv">
+ <cd:command name="righthbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="boxofsize" level="system" file="supp-box.mkiv">
+ <cd:command name="boxofsize" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:keywords delimiters="none" list="yes" optional="yes">
@@ -482,7 +482,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="limitatelines" level="system" file="supp-box.mkiv">
+ <cd:command name="limitatelines" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-command"/>
@@ -490,117 +490,117 @@
</cd:arguments>
</cd:command>
- <cd:command name="fittopbaselinegrid" level="system" file="supp-box.mkiv">
+ <cd:command name="fittopbaselinegrid" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="boxcursor" level="system" file="supp-box.mkiv"/>
+ <cd:command name="boxcursor" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="placedbox" level="system" file="supp-box.mkiv">
+ <cd:command name="placedbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rightbox" level="system" file="supp-box.mkiv">
+ <cd:command name="rightbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftbox" level="system" file="supp-box.mkiv">
+ <cd:command name="leftbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="topbox" level="system" file="supp-box.mkiv">
+ <cd:command name="topbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bottombox" level="system" file="supp-box.mkiv">
+ <cd:command name="bottombox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lefttopbox" level="system" file="supp-box.mkiv">
+ <cd:command name="lefttopbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="righttopbox" level="system" file="supp-box.mkiv">
+ <cd:command name="righttopbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftbottombox" level="system" file="supp-box.mkiv">
+ <cd:command name="leftbottombox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rightbottombox" level="system" file="supp-box.mkiv">
+ <cd:command name="rightbottombox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="topleftbox" level="system" file="supp-box.mkiv">
+ <cd:command name="topleftbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="toprightbox" level="system" file="supp-box.mkiv">
+ <cd:command name="toprightbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bottomleftbox" level="system" file="supp-box.mkiv">
+ <cd:command name="bottomleftbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bottomrightbox" level="system" file="supp-box.mkiv">
+ <cd:command name="bottomrightbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="middlebox" level="system" file="supp-box.mkiv">
+ <cd:command name="middlebox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="baselinemiddlebox" level="system" file="supp-box.mkiv">
+ <cd:command name="baselinemiddlebox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="baselineleftbox" level="system" file="supp-box.mkiv">
+ <cd:command name="baselineleftbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="baselinerightbox" level="system" file="supp-box.mkiv">
+ <cd:command name="baselinerightbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lrtbbox" level="system" file="supp-box.mkiv">
+ <cd:command name="lrtbbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -610,13 +610,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="toplinebox" level="system" file="supp-box.mkiv">
+ <cd:command name="toplinebox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setstackbox" level="system" file="supp-box.mkiv">
+ <cd:command name="setstackbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -624,13 +624,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="initializeboxstack" level="system" file="supp-box.mkiv">
+ <cd:command name="initializeboxstack" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="savebox" level="system" file="supp-box.mkiv">
+ <cd:command name="savebox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -638,28 +638,28 @@
</cd:arguments>
</cd:command>
- <cd:command name="flushbox" level="system" file="supp-box.mkiv">
+ <cd:command name="flushbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="restorebox" level="system" file="supp-box.mkiv">
+ <cd:command name="restorebox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="foundbox" level="system" file="supp-box.mkiv">
+ <cd:command name="foundbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsebox" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doifelsebox" level="system" category="boxes" keywords="conditional" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -668,7 +668,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifboxelse" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doifboxelse" level="system" category="boxes" keywords="conditional" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -677,51 +677,51 @@
</cd:arguments>
</cd:command>
- <cd:command name="localpushbox" level="system" file="supp-box.mkiv">
+ <cd:command name="localpushbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="localpopbox" level="system" file="supp-box.mkiv">
+ <cd:command name="localpopbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="globalpushbox" level="system" file="supp-box.mkiv">
+ <cd:command name="globalpushbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="globalpopbox" level="system" file="supp-box.mkiv">
+ <cd:command name="globalpopbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="removedepth" level="system" file="supp-box.mkiv"/>
+ <cd:command name="removedepth" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="obeydepth" level="system" file="supp-box.mkiv"/>
+ <cd:command name="obeydepth" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="undepthed" level="system" file="supp-box.mkiv">
+ <cd:command name="undepthed" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="removebottomthings" level="system" file="supp-box.mkiv"/>
+ <cd:command name="removebottomthings" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="removelastskip" level="system" file="supp-box.mkiv"/>
+ <cd:command name="removelastskip" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="makestrutofbox" level="system" file="supp-box.mkiv">
+ <cd:command name="makestrutofbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="raisebox" level="system" file="supp-box.mkiv">
+ <cd:command name="raisebox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
@@ -729,7 +729,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="lowerbox" level="system" file="supp-box.mkiv">
+ <cd:command name="lowerbox" level="system" category="boxes" keywords="alignment" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
@@ -737,213 +737,213 @@
</cd:arguments>
</cd:command>
- <cd:command name="halfwaybox" level="system" file="supp-box.mkiv">
+ <cd:command name="halfwaybox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="depthonlybox" level="system" file="supp-box.mkiv">
+ <cd:command name="depthonlybox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="naturalhbox" level="system" file="supp-dir.mkiv">
+ <cd:command name="naturalhbox" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="naturalvbox" level="system" file="supp-dir.mkiv">
+ <cd:command name="naturalvbox" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="naturalvtop" level="system" file="supp-dir.mkiv">
+ <cd:command name="naturalvtop" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="naturalvcenter" level="system" file="supp-box.mkiv">
+ <cd:command name="naturalvcenter" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="naturalhpack" level="system" file="supp-dir.mkiv">
+ <cd:command name="naturalhpack" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="naturalvpack" level="system" file="supp-dir.mkiv">
+ <cd:command name="naturalvpack" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="naturaltpack" level="system" file="supp-dir.mkiv">
+ <cd:command name="naturaltpack" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="reversehbox" level="system" file="supp-dir.mkiv">
+ <cd:command name="reversehbox" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="reversevbox" level="system" file="supp-dir.mkiv">
+ <cd:command name="reversevbox" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="reversevtop" level="system" file="supp-dir.mkiv">
+ <cd:command name="reversevtop" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="reversehpack" level="system" file="supp-dir.mkiv">
+ <cd:command name="reversehpack" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="reversevpack" level="system" file="supp-dir.mkiv">
+ <cd:command name="reversevpack" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="reversetpack" level="system" file="supp-dir.mkiv">
+ <cd:command name="reversetpack" level="system" category="boxes" file="supp-dir.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="frozenhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="frozenhbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setboxllx" level="system" file="supp-box.mkiv">
+ <cd:command name="setboxllx" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setboxlly" level="system" file="supp-box.mkiv">
+ <cd:command name="setboxlly" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="gsetboxllx" level="system" file="supp-box.mkiv">
+ <cd:command name="gsetboxllx" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="gsetboxlly" level="system" file="supp-box.mkiv">
+ <cd:command name="gsetboxlly" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="getboxllx" level="system" file="supp-box.mkiv">
+ <cd:command name="getboxllx" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="getboxlly" level="system" file="supp-box.mkiv">
+ <cd:command name="getboxlly" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="directgetboxllx" level="system" file="supp-box.mkiv">
+ <cd:command name="directgetboxllx" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="directgetboxlly" level="system" file="supp-box.mkiv">
+ <cd:command name="directgetboxlly" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="shownextbox" level="system" file="supp-box.mkiv">
+ <cd:command name="shownextbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="spreadhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="spreadhbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="minimalhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="minimalhbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="nodetostring" level="system" file="supp-box.mkiv">
+ <cd:command name="nodetostring" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:csname/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="getnaturaldimensions" level="system" file="supp-box.mkiv">
+ <cd:command name="getnaturaldimensions" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="lastnaturalboxwd" level="system" file="supp-box.mkiv"/>
+ <cd:command name="lastnaturalboxwd" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="lastnaturalboxht" level="system" file="supp-box.mkiv"/>
+ <cd:command name="lastnaturalboxht" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="lastnaturalboxdp" level="system" file="supp-box.mkiv"/>
+ <cd:command name="lastnaturalboxdp" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="naturalwd" level="system" file="supp-box.mkiv">
+ <cd:command name="naturalwd" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelserighttoleftinbox" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doifelserighttoleftinbox" level="system" category="boxes" keywords="conditional direction" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:resolve name="argument-true"/>
@@ -951,7 +951,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifrighttoleftinboxelse" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doifrighttoleftinboxelse" level="system" category="boxes" keywords="conditional direction" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:resolve name="argument-true"/>
@@ -959,209 +959,209 @@
</cd:arguments>
</cd:command>
- <cd:command name="runninghbox" level="system" file="supp-box.mkiv">
+ <cd:command name="runninghbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="vbox" type="environment" begin="begin" end="end" level="system" file="supp-box.mkiv"/>
+ <cd:command name="vbox" type="environment" begin="begin" end="end" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="hbox" type="environment" begin="begin" end="end" level="system" file="supp-box.mkiv"/>
+ <cd:command name="hbox" type="environment" begin="begin" end="end" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="vtop" type="environment" begin="begin" end="end" level="system" file="supp-box.mkiv"/>
+ <cd:command name="vtop" type="environment" begin="begin" end="end" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="setvboxregister" level="system" file="supp-box.mkiv">
+ <cd:command name="setvboxregister" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="sethboxregister" level="system" file="supp-box.mkiv">
+ <cd:command name="sethboxregister" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setvtopregister" level="system" file="supp-box.mkiv">
+ <cd:command name="setvtopregister" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="flushboxregister" level="system" file="supp-box.mkiv">
+ <cd:command name="flushboxregister" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="vboxregister" type="environment" level="system" file="supp-box.mkiv">
+ <cd:command name="vboxregister" type="environment" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="hboxregister" type="environment" level="system" file="supp-box.mkiv">
+ <cd:command name="hboxregister" type="environment" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="vtopregister" type="environment" level="system" file="supp-box.mkiv">
+ <cd:command name="vtopregister" type="environment" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="righttolefthbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="righttolefthbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rtlhbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="rtlhbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lefttorighthbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="lefttorighthbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ltrhbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="ltrhbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="righttoleftvbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="righttoleftvbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rtlvbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="rtlvbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lefttorightvbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="lefttorightvbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ltrvbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="ltrvbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="righttoleftvtop" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="righttoleftvtop" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="rtlvtop" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="rtlvtop" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lefttorightvtop" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="lefttorightvtop" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ltrvtop" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="ltrvtop" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="autodirhbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="autodirhbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="autodirvbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="autodirvbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="autodirvtop" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="autodirvtop" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftorrighthbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="leftorrighthbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftorrightvbox" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="leftorrightvbox" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="leftorrightvtop" level="system" category="alignment" file="spac-ali.mkiv">
+ <cd:command name="leftorrightvtop" level="system" category="boxes" keywords="direction" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ibox" level="system" file="spac-ali.mkiv">
+ <cd:command name="ibox" level="system" category="boxes" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="obox" level="system" file="spac-ali.mkiv">
+ <cd:command name="obox" level="system" category="boxes" file="spac-ali.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="definehbox" level="system" file="spac-ali.mkiv">
+ <cd:command name="definehbox" level="system" category="boxes" file="spac-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="hbox" generated="yes" variant="example" level="system" file="spac-ali.mkiv">
+ <cd:command name="hbox" generated="yes" variant="example" level="system" category="boxes" file="spac-ali.mkiv">
<cd:sequence>
<cd:string value="hbox"/>
<cd:variable value="box"/>
@@ -1171,9 +1171,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="lastlinewidth" level="system" file="supp-box.mkiv"/>
+ <cd:command name="lastlinewidth" level="system" category="boxes" file="supp-box.mkiv"/>
- <cd:command name="putboxincache" level="system" file="supp-box.mkiv">
+ <cd:command name="putboxincache" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -1184,7 +1184,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="getboxfromcache" level="system" file="supp-box.mkiv">
+ <cd:command name="getboxfromcache" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -1195,7 +1195,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseboxincache" level="system" category="conditional" file="supp-box.mkiv">
+ <cd:command name="doifelseboxincache" level="system" category="boxes" keywords="conditional" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -1207,7 +1207,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="copyboxfromcache" level="system" file="supp-box.mkiv">
+ <cd:command name="copyboxfromcache" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -1218,7 +1218,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="directboxfromcache" level="system" file="supp-box.mkiv">
+ <cd:command name="directboxfromcache" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -1228,7 +1228,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="directcopyboxfromcache" level="system" file="supp-box.mkiv">
+ <cd:command name="directcopyboxfromcache" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -1238,13 +1238,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetboxesincache" level="system" file="supp-box.mkiv">
+ <cd:command name="resetboxesincache" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="putnextboxincache" level="system" file="supp-box.mkiv">
+ <cd:command name="putnextboxincache" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -1256,4 +1256,10 @@
</cd:arguments>
</cd:command>
+ <cd:command name="reversevboxcontent" level="system" category="boxes" file="supp-box.lmt">
+ <cd:arguments>
+ <cd:resolve name="string-box"/>
+ </cd:arguments>
+ </cd:command>
+
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-buffer.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-buffer.xml
index f08cb8ca447..451c93c7e2c 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-buffer.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-buffer.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="doifelsebuffer" level="system" category="buffer conditional" file="buff-ini.mkiv">
+ <cd:command name="doifelsebuffer" level="system" category="buffer" keywords="conditional" file="buff-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-buffer"/>
<cd:resolve name="argument-true"/>
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifbufferelse" level="system" category="buffer conditional" file="buff-ini.mkiv">
+ <cd:command name="doifbufferelse" level="system" category="buffer" keywords="conditional" file="buff-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-buffer"/>
<cd:resolve name="argument-true"/>
@@ -117,12 +117,6 @@
</cd:sequence>
</cd:command>
- <!--
-
- <cd:command name="hiding" type="environment" level="document" category="buffer" file="buff-ini.mkiv"/>
-
- -->
-
<cd:command name="processtexbuffer" level="style" category="buffer" file="buff-ini.mkiv">
<cd:sequence>
<cd:string value="processTEXbuffer"/>
@@ -156,7 +150,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="ctxluabuffer" level="style" category="buffer lua" file="buff-ini.mkiv">
+ <cd:command name="ctxluabuffer" level="style" category="buffer" keywords="lua" file="buff-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-buffer-optional"/>
</cd:arguments>
@@ -174,7 +168,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="typebuffer" level="document" category="buffer verbatim" file="buff-ver.mkiv">
+ <cd:command name="typebuffer" level="document" category="buffer" keywords="verbatim" file="buff-ver.mkiv">
<cd:arguments>
<cd:resolve name="keyword-buffer-list-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -183,7 +177,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="typebuffer" generated="yes" variant="instance" level="document" category="buffer verbatim" file="buff-ver.mkiv">
+ <cd:command name="typebuffer" generated="yes" variant="instance" level="document" category="buffer" keywords="verbatim" file="buff-ver.mkiv">
<cd:sequence>
<cd:string value="type"/>
<cd:instance value="buffer"/>
@@ -195,7 +189,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="typedefinedbuffer" level="system" category="buffer verbatim" file="buff-ver.mkiv">
+ <cd:command name="typedefinedbuffer" level="system" category="buffer" keywords="verbatim" file="buff-ver.mkiv">
<cd:arguments>
<cd:resolve name="keyword-buffer"/>
<cd:assignments list="yes" optional="yes">
@@ -204,7 +198,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="prettyprintbuffer" level="style" category="buffer verbatim" file="lxml-ini.mkiv">
+ <cd:command name="prettyprintbuffer" level="style" category="buffer" keywords="verbatim" file="lxml-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-buffer"/>
<cd:keywords delimiters="braces">
@@ -213,7 +207,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="inlineprettyprintbuffer" level="style" category="buffer verbatim" file="lxml-ini.mkiv">
+ <cd:command name="inlineprettyprintbuffer" level="style" category="buffer" keywords="verbatim" file="lxml-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-buffer"/>
<cd:keywords delimiters="braces">
@@ -222,7 +216,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="typeinlinebuffer" level="style" category="buffer verbatim" file="buff-ver.mkiv">
+ <cd:command name="typeinlinebuffer" level="style" category="buffer" keywords="verbatim" file="buff-ver.mkiv">
<cd:arguments>
<cd:resolve name="keyword-buffer-list-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -231,4 +225,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-button.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-button.xml
index d7228c9496a..180738b79f8 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-button.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-button.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definebutton" level="style" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="definebutton" level="style" category="pdf" file="scrn-but.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupbutton" level="style" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="setupbutton" level="style" category="pdf" file="scrn-but.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -49,7 +49,7 @@
<!--
- <cd:command name="setupbuttons" level="style" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="setupbuttons" level="style" category="pdf" file="scrn-but.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -60,7 +60,7 @@
-->
- <cd:command name="button" generated="yes" variant="example" level="document" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="button" generated="yes" variant="example" level="document" category="pdf" file="scrn-but.mkvi">
<cd:sequence>
<cd:variable value="button"/>
</cd:sequence>
@@ -76,7 +76,7 @@
</cd:instances>
</cd:command>
- <cd:command name="button" level="document" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="button" level="document" category="pdf" file="scrn-but.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupbutton"/>
@@ -86,32 +86,32 @@
</cd:arguments>
</cd:command>
- <cd:command name="overlaybutton" level="style" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="overlaybutton" level="style" category="pdf" file="scrn-but.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
</cd:arguments>
</cd:command>
- <cd:command name="overlaybutton" variant="direct" level="style" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="overlaybutton" variant="direct" level="style" category="pdf" file="scrn-but.mkvi">
<cd:arguments>
<cd:resolve name="argument-reference"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPmenubuttons" level="style" catehory="pdf" file="scrn-but.mkvi">
+ <cd:command name="MPmenubuttons" level="style" category="pdf" file="scrn-but.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="overlayrollbutton" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="overlayrollbutton" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
<cd:resolve name="keyword-reference"/>
</cd:arguments>
</cd:command>
- <cd:command name="definepushbutton" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="definepushbutton" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -120,14 +120,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="pushbutton" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="pushbutton" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-reference"/>
</cd:arguments>
</cd:command>
- <cd:command name="definepushsymbol" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="definepushsymbol" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords>
@@ -140,7 +140,7 @@
<!--
- <cd:command name="psh" scope="interactionmenu" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="psh" scope="interactionmenu" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
<cd:resolve name="string-text"/>
@@ -148,7 +148,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="psh" type="environment" scope="interactionmenu" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="psh" type="environment" scope="interactionmenu" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
</cd:arguments>
@@ -156,7 +156,7 @@
-->
- <cd:command name="rollbutton" variant="interactionmenu" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="rollbutton" variant="interactionmenu" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -167,7 +167,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="rollbutton" variant="button" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="rollbutton" variant="button" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupbutton"/>
@@ -179,7 +179,7 @@
<!--
- <cd:command name="rob" scope="interactionmenu" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="rob" scope="interactionmenu" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
<cd:resolve name="string-text"/>
@@ -187,7 +187,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="rob" type="environment" scope="interactionmenu" level="style" catehory="pdf" file="scrn-fld.mkvi">
+ <cd:command name="rob" type="environment" scope="interactionmenu" level="style" category="pdf" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
</cd:arguments>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-capitals.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-capitals.xml
index 6115b1519ba..03d8d7f8bab 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-capitals.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-capitals.xml
@@ -223,4 +223,4 @@
<cd:command name="randomized" type="environment" level="document" category="fonts" file="typo-cap.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-catcodes.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-catcodes.xml
index 351e8f6e4bd..561cd9af675 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-catcodes.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-catcodes.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="texcode" type="environment" level="system" category="catcode" file="catc-ctx.mkiv"/>
+ <cd:command name="texcode" type="environment" level="system" category="catcode" file="catc-ctx.mkxl"/>
<cd:command name="contextcode" type="environment" level="system" category="catcode" file="catc-ctx.mkiv"/>
@@ -120,4 +120,12 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="asciimode" level="document" category="catcode" file="math-ini.mkxl"/>
+
+ <cd:command name="enableasciimode" level="document" category="catcode" file="math-ini.mkxl"/>
+
+ <cd:command name="asciimode" type="environment" level="document" category="catcode" file="math-ini.mkxl"/>
+
+ <cd:command name="literalmode" level="document" category="catcode" file="buff-ver.mkiv"/>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-character.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-character.xml
index 61d6a32a677..1c89a9fe3da 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-character.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-character.xml
@@ -62,32 +62,32 @@
<cd:command name="letterexclamationmark" level="document" category="characters" file="catc-sym.mkiv"/>
- <cd:command name="utfchar" level="document" category="characters fonts" file="char-ini.mkiv">
+ <cd:command name="utfchar" level="document" category="characters" keywords="fonts" file="char-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="safechar" level="style" category="characters fonts" file="char-ini.mkiv">
+ <cd:command name="safechar" level="style" category="characters" keywords="fonts" file="char-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="checkedchar" level="style" category="characters fonts" file="char-ini.mkiv">
+ <cd:command name="checkedchar" level="style" category="characters" keywords="fonts" file="char-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-character"/>
</cd:arguments>
</cd:command>
- <cd:command name="textormathchar" level="style" category="characters fonts" file="char-ini.mkiv">
+ <cd:command name="textormathchar" level="style" category="characters" keywords="fonts" file="char-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="textormathchars" level="style" category="characters fonts" file="char-ini.mkiv">
+ <cd:command name="textormathchars" level="style" category="characters" keywords="fonts" file="char-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
</cd:arguments>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-characteralign.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-characteralign.xml
index b95ff8487b3..2f5b85e2ebe 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-characteralign.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-characteralign.xml
@@ -41,7 +41,7 @@
<cd:command name="alignmentcharacter" level="system" category="alignment" file="typo-tal.mkiv"/>
- <cd:command name="characteralign" type="environment" category="alignment" level="system" file="typo-tal.mkiv">
+ <cd:command name="characteralign" type="environment" level="system" category="alignment" file="typo-tal.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupcharacteralign"/>
@@ -49,7 +49,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="characteralign" type="environment" variant="argument" category="alignment" level="system" file="typo-tal.mkiv">
+ <cd:command name="characteralign" type="environment" variant="argument" level="system" category="alignment" file="typo-tal.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:text"/>
@@ -93,4 +93,4 @@
<cd:command name="setsecondpasscharacteralign" level="system" category="alignment" file="typo-tal.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-characterspacing.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-characterspacing.xml
index 0247115a36d..6c43db07617 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-characterspacing.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-characterspacing.xml
@@ -40,4 +40,4 @@
<cd:command name="resetcharacterspacing" level="style" category="fonts" file="typo-spa.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-characterstripping.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-characterstripping.xml
index 5c776e3ab3e..ee9750f3ef0 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-characterstripping.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-characterstripping.xml
@@ -17,4 +17,4 @@
<cd:command name="forcecharacterstripping" level="style" category="language" file="typo-rep.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-chart.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-chart.xml
index 43672efa043..d91e23cb27c 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-chart.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-chart.xml
@@ -6,7 +6,7 @@
<!--
- <cd:command name="setupFLOWchart" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWchart" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -96,7 +96,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupFLOWcharts" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWcharts" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -107,7 +107,7 @@
-->
- <cd:command name="setupFLOWcharts" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWcharts" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="width">
@@ -202,7 +202,7 @@
</cd:command>
<!--
- <cd:command name="setupFLOWline" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWline" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -234,7 +234,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupFLOWlines" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWlines" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -245,7 +245,7 @@
-->
- <cd:command name="setupFLOWlines" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWlines" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="corner">
@@ -278,7 +278,7 @@
<!--
- <cd:command name="setupFLOWshape" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWshape" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -298,7 +298,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupFLOWshapes" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWshapes" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -309,7 +309,7 @@
-->
- <cd:command name="setupFLOWshapes" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWshapes" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="default">
@@ -328,7 +328,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupFLOWfocus" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWfocus" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -345,7 +345,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupFLOWsplit" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="setupFLOWsplit" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -374,20 +374,20 @@
</cd:arguments>
</cd:command>
- <cd:command name="FLOWchart" type="environment" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="FLOWchart" type="environment" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="defineFLOWchart" level="style" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="defineFLOWchart" level="style" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="FLOWcell" type="environment" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="FLOWcell" type="environment" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupFLOWshape"/>
@@ -398,7 +398,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="FLOWchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="FLOWchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -407,7 +407,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="FLOWcharts" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="FLOWcharts" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -416,13 +416,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="name" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="name" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="shape" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="shape" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:resolve name="value-flowshape"/>
@@ -430,25 +430,25 @@
</cd:arguments>
</cd:command>
- <cd:command name="destination" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="destination" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="focus" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="focus" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="overlay" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="overlay" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="location" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="location" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="-"/>
@@ -458,7 +458,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="figure" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="figure" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:file"/>
@@ -467,7 +467,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="text" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="text" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
<cd:resolve name="value-chartlabel"/>
@@ -476,7 +476,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="label" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="label" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
<cd:resolve name="value-chartlabel"/>
@@ -485,7 +485,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="comment" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="comment" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
<cd:resolve name="value-chartlabel"/>
@@ -494,7 +494,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="exit" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="exit" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
<cd:resolve name="value-chartlabel"/>
@@ -503,7 +503,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="connection" scope="flowchart" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="connection" scope="flowchart" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:keywords>
<cd:constant type="+"/>
@@ -527,7 +527,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="include" level="document" category="graphics metapost" file="m-chart.mkvi">
+ <cd:command name="include" level="document" category="graphics" keywords="metapost" file="m-chart.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -541,4 +541,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-charwidth.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-charwidth.xml
index dc19713f3d0..14d5d71edc2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-charwidth.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-charwidth.xml
@@ -14,4 +14,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-chemical.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-chemical.xml
index a2df03edebd..5b3ca602a10 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-chemical.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-chemical.xml
@@ -4,13 +4,13 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="molecule" level="document" file="chem-ini.mkiv">
+ <cd:command name="molecule" level="document" category="symbols" file="chem-ini.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="chem" level="document" file="chem-ini.mkiv">
+ <cd:command name="chem" level="document" category="symbols" file="chem-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -252,4 +252,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-cleaning.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-cleaning.xml
index dd54fdacc3a..f3237229797 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-cleaning.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-cleaning.xml
@@ -4,11 +4,11 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="punctuation" type="environment" begin="push" end="pop" level="system" file="typo-chr.mkiv"/>
+ <cd:command name="punctuation" type="environment" begin="push" end="pop" level="system" category="language" file="typo-chr.mkiv"/>
- <cd:command name="removepunctuation" level="system" file="typo-chr.mkiv"/>
+ <cd:command name="removepunctuation" level="system" category="language" file="typo-chr.mkiv"/>
- <cd:command name="markcontent" level="system" file="typo-chr.mkiv">
+ <cd:command name="markcontent" level="system" category="language" file="typo-chr.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="reset"/>
@@ -19,7 +19,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="markedcontent" type="environment" level="system" file="typo-chr.mkiv">
+ <cd:command name="markedcontent" type="environment" level="system" category="language" file="typo-chr.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="reset"/>
@@ -29,13 +29,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="removemarkedcontent" level="system" file="typo-chr.mkiv">
+ <cd:command name="removemarkedcontent" level="system" category="language" file="typo-chr.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setcharactercleaning" level="system" file="typo-cln.mkiv">
+ <cd:command name="doifelsemarkedcontent" level="system" category="language" keywords="conditional" file="typo-chr.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ <cd:resolve name="argument-true"/>
+ <cd:resolve name="argument-false"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setcharactercleaning" level="system" category="language" file="typo-cln.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-clipping.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-clipping.xml
index c823b102d0c..2eda483b601 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-clipping.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-clipping.xml
@@ -75,4 +75,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-collector.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-collector.xml
index 6642e6980bf..8531d400958 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-collector.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-collector.xml
@@ -111,4 +111,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-color.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-color.xml
index 4dd76d0b3af..09dd21563a7 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-color.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-color.xml
@@ -73,6 +73,9 @@
<cd:parameter name="v">
<cd:constant type="cd:number"/>
</cd:parameter>
+ <cd:parameter name="w">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="x">
<cd:constant type="cd:number"/>
</cd:parameter>
@@ -432,7 +435,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsecolor" level="system" category="colors conditional" file="color-ini.mkiv">
+ <cd:command name="doifelsecolor" level="system" category="colors" keywords="conditional" file="color-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-color"/>
<cd:resolve name="argument-true"/>
@@ -440,7 +443,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcolorelse" level="system" category="colors conditional" file="color-ini.mkiv">
+ <cd:command name="doifcolorelse" level="system" category="colors" keywords="conditional" file="color-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-color"/>
<cd:resolve name="argument-true"/>
@@ -448,7 +451,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcolor" level="system" category="colors conditional" file="color-ini.mkiv">
+ <cd:command name="doifcolor" level="system" category="colors" keywords="conditional" file="color-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-color"/>
<cd:resolve name="argument-true"/>
@@ -515,7 +518,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseblack" level="system" category="colors conditional" file="colo-ini.mkiv">
+ <cd:command name="doifelseblack" level="system" category="colors" keywords="conditional" file="colo-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-color"/>
<cd:resolve name="argument-true"/>
@@ -523,7 +526,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifblackelse" level="system" category="colors conditional" file="colo-ini.mkiv">
+ <cd:command name="doifblackelse" level="system" category="colors" keywords="conditional" file="colo-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-color"/>
<cd:resolve name="argument-true"/>
@@ -531,14 +534,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsedrawingblack" level="system" category="colors conditional" file="colo-ini.mkiv">
+ <cd:command name="doifelsedrawingblack" level="system" category="colors" keywords="conditional" file="colo-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifdrawingblackelse" level="system" category="colors conditional" file="colo-ini.mkiv">
+ <cd:command name="doifdrawingblackelse" level="system" category="colors" keywords="conditional" file="colo-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
@@ -607,4 +610,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-columns.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-columns.xml
index aa290a0a959..9890ec46f2c 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-columns.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-columns.xml
@@ -4,8 +4,19 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupcolumns" level="style" category="columns" file="page-mul.mkiv">
+ <cd:command name="definemulticolumns" level="style" category="tables" file="page-mcl.mkxl">
<cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments optional="yes" list="yes">
+ <cd:inherit name="setupmulticolumns"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setupmulticolumns" level="style" category="columns" file="page-mcl.mkxl">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
<cd:parameter name="n">
<cd:constant type="cd:number"/>
@@ -13,99 +24,33 @@
<cd:parameter name="distance">
<cd:constant type="cd:dimension"/>
</cd:parameter>
- <cd:parameter name="option">
- <cd:constant type="background"/>
- </cd:parameter>
- <cd:parameter name="offset">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="command">
- <cd:constant type="cd:oneargument"/>
- </cd:parameter>
- <cd:parameter name="height">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
<cd:parameter name="direction">
- <cd:constant type="left"/>
<cd:constant type="right" default="yes"/>
+ <cd:constant type="reverse"/>
</cd:parameter>
<cd:parameter name="balance">
<cd:constant type="yes" default="yes"/>
<cd:constant type="no"/>
</cd:parameter>
- <cd:parameter name="align">
- <cd:inherit name="setupalign"/>
- </cd:parameter>
- <cd:parameter name="tolerance">
- <cd:inherit name="setuptolerance"/>
- </cd:parameter>
<cd:parameter name="blank">
<cd:inherit name="blank"/>
</cd:parameter>
- <cd:parameter name="ntop">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="rule">
- <cd:constant type="on"/>
- <cd:constant type="off" default="yes"/>
- <cd:constant type="cd:command"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="columns" type="environment" level="document" category="columns" file="page-mul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupcolumns"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupcolumnspan" level="style" category="columns" file="page-mul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:parameter name="n">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:inherit name="setupframed"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="columnspan" type="environment" level="document" category="columns" file="page-mul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupcolumnspan"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setsimplecolumnshsize" level="system" category="columns" file="page-mul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:parameter name="n">
- <cd:constant type="cd:number"/>
- </cd:parameter>
- <cd:parameter name="width">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="distance">
- <cd:constant type="cd:dimension"/>
+ <cd:parameter name="align">
+ <cd:inherit name="setupalign"/>
</cd:parameter>
- <cd:parameter name="lines">
+ <cd:parameter name="ntop">
<cd:constant type="cd:number"/>
</cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command name="simplecolumns" type="environment" level="system" category="columns" file="page-mul.mkiv">
+ <cd:command name="multicolumns" type="environment" level="document" category="tables" file="page-mcl.mkxl">
<cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setsimplecolumnshsize"/>
+ <cd:assignments optional="yes" list="yes">
+ <cd:inherit name="setupmulticolumns"/>
</cd:assignments>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-combination.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-combination.xml
index bd732c264c9..2a42e78734b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-combination.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-combination.xml
@@ -111,7 +111,7 @@
-->
- <cd:command name="floatcombination" type="environment" variant="matrix" level="document" category="float tables" file="pack-com.mkiv">
+ <cd:command name="floatcombination" type="environment" variant="matrix" level="document" category="tables" keywords="float" file="pack-com.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:matrix"/>
@@ -120,7 +120,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="floatcombination" type="environment" level="document" category="float tables" file="pack-com.mkiv">
+ <cd:command name="floatcombination" type="environment" level="document" category="tables" keywords="float" file="pack-com.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupcombination"/>
@@ -128,4 +128,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-commandhandler.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-commandhandler.xml
index 6accac8657b..b16da06b538 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-commandhandler.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-commandhandler.xml
@@ -4,42 +4,42 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="installparameterhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installparameterhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installrootparameterhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installrootparameterhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installparameterhashhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installparameterhashhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installparametersethandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installparametersethandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installstyleandcolorhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installstyleandcolorhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installdefinehandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdefinehandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -47,35 +47,35 @@
</cd:arguments>
</cd:command>
- <cd:command name="installsetuphandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installsetuphandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installswitchsetuphandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installswitchsetuphandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installautosetuphandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installautosetuphandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installbasicparameterhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installbasicparameterhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installbasicautosetuphandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installbasicautosetuphandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -83,7 +83,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="installcommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installcommandhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -91,7 +91,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="installswitchcommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installswitchcommandhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -99,7 +99,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="installautocommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installautocommandhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -107,7 +107,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="installsimplecommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installsimplecommandhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -115,49 +115,49 @@
</cd:arguments>
</cd:command>
- <cd:command name="installdirectparameterhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdirectparameterhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installdirectsetuphandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdirectsetuphandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installdirectparametersethandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdirectparametersethandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installdirectstyleandcolorhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdirectstyleandcolorhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installdirectcommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdirectcommandhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installsetuponlycommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installsetuponlycommandhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="relateparameterhandlers" level="system" file="mult-aux.mkiv">
+ <cd:command name="relateparameterhandlers" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -166,25 +166,25 @@
</cd:arguments>
</cd:command>
- <cd:command name="installactionhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="installactionhandler" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installnamespace" level="system" file="mult-aux.mkiv">
+ <cd:command name="installnamespace" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installcorenamespace" level="system" file="mult-aux.mkiv">
+ <cd:command name="installcorenamespace" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="definenamespace" level="system" file="mult-aux.mkiv">
+ <cd:command name="definenamespace" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -221,16 +221,16 @@
</cd:arguments>
</cd:command>
- <cd:command name="listnamespaces" level="system" file="mult-aux.mkiv"/>
+ <cd:command name="listnamespaces" level="system" category="commandhandler" file="mult-aux.mkiv"/>
- <cd:command name="showparentchain" level="system" file="mult-aux.mkiv">
+ <cd:command name="showparentchain" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsecommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="doifelsecommandhandler" level="system" category="commandhandler" keywords="conditional" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -239,7 +239,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcommandhandlerelse" level="system" file="mult-aux.mkiv">
+ <cd:command name="doifcommandhandlerelse" level="system" category="commandhandler" keywords="conditional" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -248,7 +248,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="doifcommandhandler" level="system" category="commandhandler" keywords="conditional" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -256,7 +256,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotcommandhandler" level="system" file="mult-aux.mkiv">
+ <cd:command name="doifnotcommandhandler" level="system" category="commandhandler" keywords="conditional" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -264,14 +264,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="installdefinitionset" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdefinitionset" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installdefinitionsetmember" level="system" file="mult-aux.mkiv">
+ <cd:command name="installdefinitionsetmember" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -280,14 +280,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="installparentinjector" level="system" file="mult-aux.mkiv">
+ <cd:command name="installparentinjector" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="installframedcommandhandler" level="system" file="pack-rul.mkiv">
+ <cd:command name="installframedcommandhandler" level="system" category="commandhandler" file="pack-rul.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -295,7 +295,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="installframedautocommandhandler" level="system" file="pack-rul.mkiv">
+ <cd:command name="installframedautocommandhandler" level="system" category="commandhandler" file="pack-rul.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -303,7 +303,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="installsimpleframedcommandhandler" level="system" file="pack-rul.mkiv">
+ <cd:command name="installsimpleframedcommandhandler" level="system" category="commandhandler" file="pack-rul.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
@@ -311,13 +311,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="installmacrostack" level="system" file="mult-aux.mkiv">
+ <cd:command name="installmacrostack" level="system" category="system" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="installglobalmacrostack" level="system" file="mult-aux.mkiv">
+ <cd:command name="installglobalmacrostack" level="system" category="system" file="mult-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-comment.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-comment.xml
index a1eb14d23c1..e7349a69e32 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-comment.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-comment.xml
@@ -130,27 +130,4 @@
<cd:command name="placecomments" level="document" category="pdf" file="scrn-wid.mkvi"/>
- <!--
-
- <cd:command name="comment" level="document" category="pdf" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-text-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupcomment"/>
- </cd:assignments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="comment" type="environment" level="document" category="pdf" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-text-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupcomment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-common-argument.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-common-argument.xml
index da821c516cc..c1b2f8cb3ff 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-common-argument.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-common-argument.xml
@@ -554,4 +554,55 @@
</cd:keywords>
</cd:define>
-</cd:interface> \ No newline at end of file
+ <!-- * -->
+ <!-- \... {...} -->
+ <!-- -->
+ <!-- * ORIENTATION -->
+
+ <cd:define name="argument-orientation">
+ <cd:keywords delimiters="braces">
+ <cd:resolve name="value-orientation"/>
+ </cd:keywords>
+ </cd:define>
+
+ <!-- * -->
+ <!-- \... {...} -->
+ <!-- -->
+ <!-- * INSTANCE -->
+
+ <cd:define name="argument-instance">
+ <cd:keywords delimiters="braces">
+ <cd:resolve name="value-instance"/>
+ </cd:keywords>
+ </cd:define>
+
+ <cd:define name="argument-instance-optional">
+ <cd:keywords delimiters="braces" optional="yes">
+ <cd:resolve name="value-instance"/>
+ </cd:keywords>
+ </cd:define>
+
+ <cd:define name="argument-instance-list">
+ <cd:keywords delimiters="braces" list="yes">
+ <cd:resolve name="value-instance"/>
+ </cd:keywords>
+ </cd:define>
+
+ <cd:define name="argument-instance-list-optional">
+ <cd:keywords delimiters="braces" list="yes" optional="yes">
+ <cd:resolve name="value-instance"/>
+ </cd:keywords>
+ </cd:define>
+
+ <!-- * -->
+ <!-- \... {...} -->
+ <!-- -->
+ <!-- * URL -->
+
+ <cd:define name="argument-url">
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:url"/>
+ </cd:keywords>
+ </cd:define>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-common-assignment.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-common-assignment.xml
index 900a754523f..e5d219f0547 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-common-assignment.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-common-assignment.xml
@@ -27,6 +27,9 @@
<cd:parameter name="ownnumber">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="placeholder">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:define>
@@ -50,6 +53,9 @@
<cd:parameter name="ownnumber">
<cd:constant type="cd:text"/>
</cd:parameter>
+ <cd:parameter name="placeholder">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
</cd:assignments>
</cd:define>
@@ -333,4 +339,4 @@
</cd:assignments>
</cd:define>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-common-definitions.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-common-definitions.xml
index 54e729aa4d0..9f6d461f9a7 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-common-definitions.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-common-definitions.xml
@@ -9,4 +9,4 @@
<cd:interfacefile filename="i-common-value.xml"/>
<cd:interfacefile filename="i-common-instance.xml"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-common-instance.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-common-instance.xml
index 3d4864de76e..07ca3ac15bd 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-common-instance.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-common-instance.xml
@@ -182,6 +182,11 @@
<cd:define name="instance-mathmatrix">
<cd:constant value="matrix"/>
<cd:constant value="mathmatrix"/>
+ <cd:constant value="thematrix"/>
+ </cd:define>
+
+ <cd:define name="instance-simplematrix">
+ <cd:constant value="thematrix"/>
</cd:define>
<cd:define name="instance-mixedcolumns">
@@ -385,7 +390,7 @@
<cd:constant value="overbracketunderbracket"/>
</cd:define>
- <cd:define name="instance-mathoverextensible">
+ <cd:define name="instance-mathovertextextensible">
<!-- top -->
<cd:constant value="overleftarrow"/>
<cd:constant value="overrightarrow"/>
@@ -408,7 +413,7 @@
<cd:constant value="overbrackettext"/>
</cd:define>
- <cd:define name="instance-mathunderextensible">
+ <cd:define name="instance-mathundertextextensible">
<!-- bottom -->
<cd:constant value="underleftarrow"/>
<cd:constant value="underrightarrow"/>
@@ -431,4 +436,4 @@
<cd:constant value="underbrackettext"/>
</cd:define>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-common-keyword.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-common-keyword.xml
index 8469dab2f85..d85325e3c58 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-common-keyword.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-common-keyword.xml
@@ -809,4 +809,43 @@
</cd:keywords>
</cd:define>
-</cd:interface> \ No newline at end of file
+ <!-- * -->
+ <!-- \... [...] -->
+ <!-- -->
+ <!-- * TRACKER -->
+
+ <cd:define name="keyword-tracker-list">
+ <cd:keywords list="yes">
+ <cd:resolve name="value-tracker"/>
+ </cd:keywords>
+ </cd:define>
+
+ <!-- * -->
+ <!-- \... [...] -->
+ <!-- -->
+ <!-- * DIRECTIVE -->
+
+ <cd:define name="keyword-directive-list">
+ <cd:keywords list="yes">
+ <cd:resolve name="value-directive"/>
+ </cd:keywords>
+ </cd:define>
+
+ <!-- * -->
+ <!-- \... [...] -->
+ <!-- -->
+ <!-- * DATE -->
+
+ <cd:define name="keyword-date-list">
+ <cd:keywords list="yes">
+ <cd:resolve name="value-date"/>
+ </cd:keywords>
+ </cd:define>
+
+ <cd:define name="keyword-date-list-optional">
+ <cd:keywords list="yes" optional="yes">
+ <cd:resolve name="value-date"/>
+ </cd:keywords>
+ </cd:define>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-common-string.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-common-string.xml
index 0c0bb2ef356..abcd8a78fdc 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-common-string.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-common-string.xml
@@ -191,4 +191,4 @@
</cd:keywords>
</cd:define>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-common-value.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-common-value.xml
index 253a03ccf2c..210320622c0 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-common-value.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-common-value.xml
@@ -174,6 +174,7 @@
<cd:constant type="lastpage"/>
<cd:constant type="start"/>
<cd:constant type="stop"/>
+ <cd:constant type="xy"/>
</cd:define>
<!-- columnbreak = ... -->
@@ -360,6 +361,8 @@
<cd:constant type="et"/>
<cd:constant type="kr"/>
<cd:constant type="jp"/>
+ <cd:constant type="he"/>
+ <cd:constant type="yi"/>
-->
<cd:constant type="cd:language"/>
</cd:define>
@@ -781,6 +784,8 @@
<cd:constant type="cd:name"/>
</cd:define>
+ <!-- leftfence -->
+
<cd:define name="value-leftfence">
<!--
<cd:constant type="||"/>
@@ -839,6 +844,8 @@
<cd:constant type="cd:character"/>
</cd:define>
+ <!-- rightfence -->
+
<cd:define name="value-rightfence">
<!--
<cd:constant type="||"/>
@@ -897,4 +904,737 @@
<cd:constant type="cd:character"/>
</cd:define>
+ <!-- orientation -->
+
+ <cd:define name="value-orientation">
+ <cd:constant type="normal"/>
+ <cd:constant type="up"/>
+ <cd:constant type="down"/>
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="top"/>
+ <cd:constant type="bottom"/>
+ <cd:constant type="cd:name"/>
+ </cd:define>
+
+ <!-- margindata -->
+
+ <cd:define name="value-margindata">
+ <cd:constant type="inleftmargin"/>
+ <cd:constant type="inrightmargin"/>
+ <cd:constant type="inoutermargin"/>
+ <cd:constant type="ininnermargin"/>
+ <cd:constant type="inleftedge"/>
+ <cd:constant type="inrightedge"/>
+ <cd:constant type="inouteredge"/>
+ <cd:constant type="ininneredge"/>
+ <cd:constant type="atleftmargin"/>
+ <cd:constant type="atrightmargin"/>
+ <cd:constant type="inleft"/>
+ <cd:constant type="inright"/>
+ <cd:constant type="inouter"/>
+ <cd:constant type="ininner"/>
+ <cd:constant type="inmargin"/>
+ <cd:constant type="inother"/>
+ <cd:constant type="margintext"/>
+ <cd:constant type="cd:name"/>
+ </cd:define>
+
+ <!-- instance -->
+
+ <cd:define name="value-instance">
+ <cd:constant type="metafun"/>
+ <cd:constant type="minifun"/>
+ <cd:constant type="extrafun"/>
+ <cd:constant type="lessfun"/>
+ <cd:constant type="doublefun"/>
+ <cd:constant type="binaryfun"/>
+ <cd:constant type="decimalfun"/>
+ <cd:constant type="mprun"/>
+ <cd:constant type="metapost"/>
+ <cd:constant type="nofun"/>
+ <cd:constant type="doublepost"/>
+ <cd:constant type="binarypost"/>
+ <cd:constant type="decimalpost"/>
+ <cd:constant type="simplefun"/>
+ </cd:define>
+
+ <!-- date -->
+
+ <cd:define name="value-date">
+ <cd:constant type="year"/>
+ <cd:constant type="cd:name" prefix="year" method="range"/>
+ <cd:constant type="y"/>
+ <cd:constant type="cd:name" prefix="y" method="range"/>
+ <cd:constant type="yy"/>
+ <cd:constant type="Y"/>
+ <cd:constant type="cd:name" prefix="Y" method="range"/>
+ <cd:constant type="YY"/>
+ <cd:constant type="month"/>
+ <cd:constant type="month:mnem"/>
+ <cd:constant type="month:hebrew"/>
+ <cd:constant type="month:jalali"/>
+ <cd:constant type="m"/>
+ <cd:constant type="m:mnem"/>
+ <cd:constant type="m:hebrew"/>
+ <cd:constant type="m:jalali"/>
+ <cd:constant type="MONTH"/>
+ <cd:constant type="MONTH:mnem"/>
+ <cd:constant type="MONTH:hebrew"/>
+ <cd:constant type="MONTH:jalali"/>
+ <cd:constant type="mm"/>
+ <cd:constant type="M"/>
+ <cd:constant type="day"/>
+ <cd:constant type="cd:name" prefix="day" method="range"/>
+ <cd:constant type="day:+"/>
+ <cd:constant type="day:ord"/>
+ <cd:constant type="day:++"/>
+ <cd:constant type="day:highord"/>
+ <cd:constant type="d"/>
+ <cd:constant type="cd:name" prefix="d" method="range"/>
+ <cd:constant type="d:+"/>
+ <cd:constant type="d:ord"/>
+ <cd:constant type="d:++"/>
+ <cd:constant type="d:highord"/>
+ <cd:constant type="dd"/>
+ <cd:constant type="dd:+"/>
+ <cd:constant type="dd:ord"/>
+ <cd:constant type="dd:++"/>
+ <cd:constant type="dd:highord"/>
+ <cd:constant type="D"/>
+ <cd:constant type="D:+"/>
+ <cd:constant type="D:ord"/>
+ <cd:constant type="D:++"/>
+ <cd:constant type="D:highord"/>
+ <cd:constant type="weekday"/>
+ <cd:constant type="weekday:mnem"/>
+ <cd:constant type="weekday:hebrew"/>
+ <cd:constant type="weekday:jalali"/>
+ <cd:constant type="w"/>
+ <cd:constant type="w:mnem"/>
+ <cd:constant type="w:hebrew"/>
+ <cd:constant type="w:jalali"/>
+ <cd:constant type="WEEKDAY"/>
+ <cd:constant type="WEEKDAY:mnem"/>
+ <cd:constant type="WEEKDAY:hebrew"/>
+ <cd:constant type="WEEKDAY:jalali"/>
+ <cd:constant type="W"/>
+ <cd:constant type="referral"/>
+ <cd:constant type="space"/>
+ <cd:constant type="\â£"/>
+ <cd:constant type="cd:text"/>
+ <cd:constant type="hebrew:to"/>
+ <cd:constant type="jalali:to"/>
+ <cd:constant type="jalali:from"/>
+ </cd:define>
+
+ <!-- tracker -->
+
+ <cd:define name="value-tracker">
+ <cd:constant type="afm.features"/>
+ <cd:constant type="afm.indexing"/>
+ <cd:constant type="afm.loading"/>
+ <cd:constant type="attachments.anchors"/>
+ <cd:constant type="backend"/>
+ <cd:constant type="backend.details"/>
+ <cd:constant type="backend.finalizers"/>
+ <cd:constant type="backend.format"/>
+ <cd:constant type="backend.info"/>
+ <cd:constant type="backend.objects"/>
+ <cd:constant type="backend.pdf.fonts"/>
+ <cd:constant type="backend.resources"/>
+ <cd:constant type="backend.spaces"/>
+ <cd:constant type="backend.swf"/>
+ <cd:constant type="backend.variables"/>
+ <cd:constant type="backend.xmp"/>
+ <cd:constant type="backends.fields"/>
+ <cd:constant type="backends.javascript"/>
+ <cd:constant type="backends.pdf.threshold"/>
+ <cd:constant type="backgrounds.alignments"/>
+ <cd:constant type="backgrounds.shapes"/>
+ <cd:constant type="backgrounds.shapes.free"/>
+ <cd:constant type="backgrounds.shapes.ranges"/>
+ <cd:constant type="btxrendering"/>
+ <cd:constant type="buffers.grab"/>
+ <cd:constant type="buffers.parallel"/>
+ <cd:constant type="buffers.run"/>
+ <cd:constant type="buffers.visualize"/>
+ <cd:constant type="builders.hpack.overflow"/>
+ <cd:constant type="builders.hpack.quality"/>
+ <cd:constant type="builders.page"/>
+ <cd:constant type="builders.paragraphs.adjusting"/>
+ <cd:constant type="builders.paragraphs.basic"/>
+ <cd:constant type="builders.paragraphs.expansion"/>
+ <cd:constant type="builders.paragraphs.expansion.both"/>
+ <cd:constant type="builders.paragraphs.expansion.verbose"/>
+ <cd:constant type="builders.paragraphs.lastlinefit"/>
+ <cd:constant type="builders.paragraphs.protruding"/>
+ <cd:constant type="builders.paragraphs.solutions.splitters.colors"/>
+ <cd:constant type="builders.paragraphs.solutions.splitters.optimizer"/>
+ <cd:constant type="builders.paragraphs.solutions.splitters.splitter"/>
+ <cd:constant type="builders.post"/>
+ <cd:constant type="builders.vbox"/>
+ <cd:constant type="builders.vpack.quality"/>
+ <cd:constant type="characters.defining"/>
+ <cd:constant type="chemistry.boundingbox"/>
+ <cd:constant type="chemistry.boxes"/>
+ <cd:constant type="chemistry.metapost"/>
+ <cd:constant type="chemistry.molecules"/>
+ <cd:constant type="chemistry.structure"/>
+ <cd:constant type="chemistry.textstack"/>
+ <cd:constant type="colors.define"/>
+ <cd:constant type="colors.pgf"/>
+ <cd:constant type="columnsets.cells"/>
+ <cd:constant type="columnsets.details"/>
+ <cd:constant type="columnsets.trace"/>
+ <cd:constant type="comments.anchors"/>
+ <cd:constant type="context.define"/>
+ <cd:constant type="context.files"/>
+ <cd:constant type="context.stack"/>
+ <cd:constant type="context.trace"/>
+ <cd:constant type="delimited.language"/>
+ <cd:constant type="export.trace"/>
+ <cd:constant type="export.trace.details"/>
+ <cd:constant type="export.trace.spacing"/>
+ <cd:constant type="figures.comments"/>
+ <cd:constant type="figures.fields"/>
+ <cd:constant type="figures.inclusion"/>
+ <cd:constant type="figures.links"/>
+ <cd:constant type="figures.merging"/>
+ <cd:constant type="figures.outlines"/>
+ <cd:constant type="floats.anchoring"/>
+ <cd:constant type="floats.caching"/>
+ <cd:constant type="floats.collecting"/>
+ <cd:constant type="floats.freeregion"/>
+ <cd:constant type="fonts.addcharacters"/>
+ <cd:constant type="fonts.automode"/>
+ <cd:constant type="fonts.cff.charstrings"/>
+ <cd:constant type="fonts.collecting"/>
+ <cd:constant type="fonts.composing.define"/>
+ <cd:constant type="fonts.composing.visualize"/>
+ <cd:constant type="fonts.defining"/>
+ <cd:constant type="fonts.designsize"/>
+ <cd:constant type="fonts.effect"/>
+ <cd:constant type="fonts.expansion"/>
+ <cd:constant type="fonts.extend"/>
+ <cd:constant type="fonts.features"/>
+ <cd:constant type="fonts.goodies"/>
+ <cd:constant type="fonts.injections"/>
+ <cd:constant type="fonts.injections.cursive"/>
+ <cd:constant type="fonts.injections.marks"/>
+ <cd:constant type="fonts.injections.spaces"/>
+ <cd:constant type="fonts.loading"/>
+ <cd:constant type="fonts.mapfiles"/>
+ <cd:constant type="fonts.mapping"/>
+ <cd:constant type="fonts.merge"/>
+ <cd:constant type="fonts.missing"/>
+ <cd:constant type="fonts.names"/>
+ <cd:constant type="fonts.otf.loader.memory"/>
+ <cd:constant type="fonts.protrusion"/>
+ <cd:constant type="fonts.rejections"/>
+ <cd:constant type="fonts.reorderlookups"/>
+ <cd:constant type="fonts.scaling"/>
+ <cd:constant type="fonts.slant"/>
+ <cd:constant type="fonts.specifications"/>
+ <cd:constant type="fonts.squeeze"/>
+ <cd:constant type="fonts.stripping"/>
+ <cd:constant type="fonts.treatments"/>
+ <cd:constant type="fonts.unicoding"/>
+ <cd:constant type="fonts.usage"/>
+ <cd:constant type="fonts.warnings"/>
+ <cd:constant type="formulas.boxes"/>
+ <cd:constant type="formulas.framed"/>
+ <cd:constant type="graphic.runfile"/>
+ <cd:constant type="graphics.backend"/>
+ <cd:constant type="graphics.bases"/>
+ <cd:constant type="graphics.conversion"/>
+ <cd:constant type="graphics.fonts"/>
+ <cd:constant type="graphics.inclusion"/>
+ <cd:constant type="graphics.inheritance"/>
+ <cd:constant type="graphics.locating"/>
+ <cd:constant type="graphics.memstreams"/>
+ <cd:constant type="graphics.pdf"/>
+ <cd:constant type="graphics.programs"/>
+ <cd:constant type="graphics.usage"/>
+ <cd:constant type="hyphenator.steps"/>
+ <cd:constant type="hyphenator.visualize"/>
+ <cd:constant type="hyphenators.urls"/>
+ <cd:constant type="interfaces.namespaces"/>
+ <cd:constant type="job.datasets"/>
+ <cd:constant type="job.pagestates"/>
+ <cd:constant type="languages.labels"/>
+ <cd:constant type="languages.patterns"/>
+ <cd:constant type="languages.replacements"/>
+ <cd:constant type="languages.replacements.details"/>
+ <cd:constant type="languages.url"/>
+ <cd:constant type="linecorrection.boxes"/>
+ <cd:constant type="lines.numbers"/>
+ <cd:constant type="lines.numbers.show"/>
+ <cd:constant type="lmx.variables"/>
+ <cd:constant type="lxml.access"/>
+ <cd:constant type="lxml.comments"/>
+ <cd:constant type="lxml.inclusions"/>
+ <cd:constant type="lxml.loading"/>
+ <cd:constant type="lxml.manipulations"/>
+ <cd:constant type="lxml.selectors"/>
+ <cd:constant type="lxml.setups"/>
+ <cd:constant type="marks.details"/>
+ <cd:constant type="marks.get"/>
+ <cd:constant type="marks.set"/>
+ <cd:constant type="math.alternates"/>
+ <cd:constant type="math.analyzing"/>
+ <cd:constant type="math.classes"/>
+ <cd:constant type="math.collapsing"/>
+ <cd:constant type="math.collecting"/>
+ <cd:constant type="math.defining"/>
+ <cd:constant type="math.domains"/>
+ <cd:constant type="math.fallbacks"/>
+ <cd:constant type="math.families"/>
+ <cd:constant type="math.fences"/>
+ <cd:constant type="math.fixing"/>
+ <cd:constant type="math.goodies"/>
+ <cd:constant type="math.greek"/>
+ <cd:constant type="math.italics"/>
+ <cd:constant type="math.italics.visualize"/>
+ <cd:constant type="math.kernpairs"/>
+ <cd:constant type="math.makeup"/>
+ <cd:constant type="math.normalizing"/>
+ <cd:constant type="math.openedup"/>
+ <cd:constant type="math.patching"/>
+ <cd:constant type="math.processing"/>
+ <cd:constant type="math.remapping"/>
+ <cd:constant type="math.showtree"/>
+ <cd:constant type="math.stackers.texts"/>
+ <cd:constant type="math.timings"/>
+ <cd:constant type="math.unstack"/>
+ <cd:constant type="math.variants"/>
+ <cd:constant type="math.virtual"/>
+ <cd:constant type="memory.checking"/>
+ <cd:constant type="metapost.blobs"/>
+ <cd:constant type="metapost.btexetex"/>
+ <cd:constant type="metapost.forcestroke"/>
+ <cd:constant type="metapost.graphics"/>
+ <cd:constant type="metapost.lua"/>
+ <cd:constant type="metapost.nodes"/>
+ <cd:constant type="metapost.properties"/>
+ <cd:constant type="metapost.runs"/>
+ <cd:constant type="metapost.scripts"/>
+ <cd:constant type="metapost.showlog"/>
+ <cd:constant type="metapost.svg"/>
+ <cd:constant type="metapost.svg.colors"/>
+ <cd:constant type="metapost.svg.path"/>
+ <cd:constant type="metapost.svg.result"/>
+ <cd:constant type="metapost.svg.text"/>
+ <cd:constant type="metapost.terminal"/>
+ <cd:constant type="metapost.textexts"/>
+ <cd:constant type="metapost.tracingall"/>
+ <cd:constant type="metapost.variables"/>
+ <cd:constant type="mixedcolumns.boxes"/>
+ <cd:constant type="mixedcolumns.details"/>
+ <cd:constant type="mixedcolumns.trace"/>
+ <cd:constant type="modules.loading"/>
+ <cd:constant type="nodes.areas"/>
+ <cd:constant type="nodes.boxes"/>
+ <cd:constant type="nodes.callbacks"/>
+ <cd:constant type="nodes.characters"/>
+ <cd:constant type="nodes.destinations"/>
+ <cd:constant type="nodes.destinations.show"/>
+ <cd:constant type="nodes.directions"/>
+ <cd:constant type="nodes.fontrun"/>
+ <cd:constant type="nodes.frequencies"/>
+ <cd:constant type="nodes.migrations"/>
+ <cd:constant type="nodes.references"/>
+ <cd:constant type="nodes.references.show"/>
+ <cd:constant type="nodes.rules"/>
+ <cd:constant type="nodes.shifting"/>
+ <cd:constant type="nodes.stripping"/>
+ <cd:constant type="nodes.variants"/>
+ <cd:constant type="objects"/>
+ <cd:constant type="otf.actions"/>
+ <cd:constant type="otf.alternatives"/>
+ <cd:constant type="otf.analyzing"/>
+ <cd:constant type="otf.applied"/>
+ <cd:constant type="otf.baseinit"/>
+ <cd:constant type="otf.bugs"/>
+ <cd:constant type="otf.chains"/>
+ <cd:constant type="otf.cleanups"/>
+ <cd:constant type="otf.cmap"/>
+ <cd:constant type="otf.cmap.details"/>
+ <cd:constant type="otf.compruns"/>
+ <cd:constant type="otf.contexts"/>
+ <cd:constant type="otf.cursive"/>
+ <cd:constant type="otf.details"/>
+ <cd:constant type="otf.dynamics"/>
+ <cd:constant type="otf.features"/>
+ <cd:constant type="otf.kernruns"/>
+ <cd:constant type="otf.kerns"/>
+ <cd:constant type="otf.ligatures"/>
+ <cd:constant type="otf.loading"/>
+ <cd:constant type="otf.marks"/>
+ <cd:constant type="otf.markwidth"/>
+ <cd:constant type="otf.multiples"/>
+ <cd:constant type="otf.optimizations"/>
+ <cd:constant type="otf.packing"/>
+ <cd:constant type="otf.plugins"/>
+ <cd:constant type="otf.positions"/>
+ <cd:constant type="otf.preparing"/>
+ <cd:constant type="otf.sample"/>
+ <cd:constant type="otf.sample.silent"/>
+ <cd:constant type="otf.singles"/>
+ <cd:constant type="otf.skips"/>
+ <cd:constant type="otf.steps"/>
+ <cd:constant type="otf.substitutions"/>
+ <cd:constant type="otf.testruns"/>
+ <cd:constant type="otf.unicodes"/>
+ <cd:constant type="otr.forcestrutdepth"/>
+ <cd:constant type="pagebuilder.injections"/>
+ <cd:constant type="pagebuilder.insert"/>
+ <cd:constant type="pages.mark"/>
+ <cd:constant type="pages.timing"/>
+ <cd:constant type="paragraphs.anchors"/>
+ <cd:constant type="parbuilders.keeptogether"/>
+ <cd:constant type="physics.units"/>
+ <cd:constant type="profiling.show"/>
+ <cd:constant type="profiling.trace"/>
+ <cd:constant type="publications"/>
+ <cd:constant type="publications.authorhash"/>
+ <cd:constant type="publications.cite"/>
+ <cd:constant type="publications.cite.missing"/>
+ <cd:constant type="publications.cite.references"/>
+ <cd:constant type="publications.details"/>
+ <cd:constant type="publications.duplicates"/>
+ <cd:constant type="publications.match"/>
+ <cd:constant type="publications.setups"/>
+ <cd:constant type="publications.sorters"/>
+ <cd:constant type="publications.strings"/>
+ <cd:constant type="publications.suffixes"/>
+ <cd:constant type="references.bookmarks"/>
+ <cd:constant type="references.destinations"/>
+ <cd:constant type="references.references"/>
+ <cd:constant type="regimes.translating"/>
+ <cd:constant type="resolvers.cache"/>
+ <cd:constant type="resolvers.containers"/>
+ <cd:constant type="resolvers.details"/>
+ <cd:constant type="resolvers.expansions"/>
+ <cd:constant type="resolvers.globbing"/>
+ <cd:constant type="resolvers.lib"/>
+ <cd:constant type="resolvers.libraries"/>
+ <cd:constant type="resolvers.locating"/>
+ <cd:constant type="resolvers.methods"/>
+ <cd:constant type="resolvers.paths"/>
+ <cd:constant type="resolvers.readfile"/>
+ <cd:constant type="resolvers.readfile.details"/>
+ <cd:constant type="resolvers.schemes"/>
+ <cd:constant type="resolvers.storage"/>
+ <cd:constant type="resolvers.virtual"/>
+ <cd:constant type="rules.mp"/>
+ <cd:constant type="sandbox"/>
+ <cd:constant type="sandbox.tracecalls"/>
+ <cd:constant type="sandbox.tracefiles"/>
+ <cd:constant type="scripts.analyzing"/>
+ <cd:constant type="scripts.autofeature"/>
+ <cd:constant type="scripts.details"/>
+ <cd:constant type="scripts.injections"/>
+ <cd:constant type="scripts.splitting"/>
+ <cd:constant type="scripts.splitting.details"/>
+ <cd:constant type="selectfont.alternatives"/>
+ <cd:constant type="selectfont.features"/>
+ <cd:constant type="selectfont.files"/>
+ <cd:constant type="selectfont.goodies"/>
+ <cd:constant type="selectfont.register"/>
+ <cd:constant type="selectfont.typescripts"/>
+ <cd:constant type="sequencers.details"/>
+ <cd:constant type="sequencers.used"/>
+ <cd:constant type="sorters.methods"/>
+ <cd:constant type="sorters.orders"/>
+ <cd:constant type="sorters.replacements"/>
+ <cd:constant type="sorters.tests"/>
+ <cd:constant type="stacker.resolve"/>
+ <cd:constant type="streams.collecting"/>
+ <cd:constant type="streams.flushing"/>
+ <cd:constant type="structure.sidefloats.pageflush"/>
+ <cd:constant type="structures.counters"/>
+ <cd:constant type="structures.details"/>
+ <cd:constant type="structures.lists"/>
+ <cd:constant type="structures.notes"/>
+ <cd:constant type="structures.notes.references"/>
+ <cd:constant type="structures.pages"/>
+ <cd:constant type="structures.referencing"/>
+ <cd:constant type="structures.referencing.analyzing"/>
+ <cd:constant type="structures.referencing.empty"/>
+ <cd:constant type="structures.referencing.identifying"/>
+ <cd:constant type="structures.referencing.importing"/>
+ <cd:constant type="structures.referencing.show"/>
+ <cd:constant type="structures.registers"/>
+ <cd:constant type="structures.sectioning"/>
+ <cd:constant type="structures.showused"/>
+ <cd:constant type="structures.tags"/>
+ <cd:constant type="structures.tags.info"/>
+ <cd:constant type="system.callbacks"/>
+ <cd:constant type="system.directives"/>
+ <cd:constant type="system.dump"/>
+ <cd:constant type="system.experiments"/>
+ <cd:constant type="system.jobfiles"/>
+ <cd:constant type="system.jobstatus"/>
+ <cd:constant type="system.prepfiles"/>
+ <cd:constant type="system.randomizer"/>
+ <cd:constant type="system.randomizer.details"/>
+ <cd:constant type="system.showcodes"/>
+ <cd:constant type="system.synctex.visualize"/>
+ <cd:constant type="system.synctex.xml"/>
+ <cd:constant type="system.tempfiles"/>
+ <cd:constant type="system.texstatus"/>
+ <cd:constant type="tables.natural.widths"/>
+ <cd:constant type="tables.tabulate.breaks"/>
+ <cd:constant type="tasks.creation"/>
+ <cd:constant type="templates.trace"/>
+ <cd:constant type="tfm.features"/>
+ <cd:constant type="tfm.loading"/>
+ <cd:constant type="tokens.compile"/>
+ <cd:constant type="typesetters.breakpoints"/>
+ <cd:constant type="typesetters.casing"/>
+ <cd:constant type="typesetters.characteralign"/>
+ <cd:constant type="typesetters.characters"/>
+ <cd:constant type="typesetters.cleaners"/>
+ <cd:constant type="typesetters.cleaners.autocase"/>
+ <cd:constant type="typesetters.digits"/>
+ <cd:constant type="typesetters.directions"/>
+ <cd:constant type="typesetters.directions.details"/>
+ <cd:constant type="typesetters.directions.list"/>
+ <cd:constant type="typesetters.directions.math"/>
+ <cd:constant type="typesetters.directions.text"/>
+ <cd:constant type="typesetters.firstlines"/>
+ <cd:constant type="typesetters.initials"/>
+ <cd:constant type="typesetters.italics"/>
+ <cd:constant type="typesetters.kerns.ligatures"/>
+ <cd:constant type="typesetters.kerns.ligatures.details"/>
+ <cd:constant type="typesetters.margindata"/>
+ <cd:constant type="typesetters.margindata.group"/>
+ <cd:constant type="typesetters.margindata.stack"/>
+ <cd:constant type="typesetters.nbsp"/>
+ <cd:constant type="typesetters.periodkerns"/>
+ <cd:constant type="typesetters.processors"/>
+ <cd:constant type="typesetters.rubies"/>
+ <cd:constant type="typesetters.spacing"/>
+ <cd:constant type="typesetters.suspects"/>
+ <cd:constant type="typesetters.threshold"/>
+ <cd:constant type="typesetters.wrappers"/>
+ <cd:constant type="visualizers.all"/>
+ <cd:constant type="visualizers.boxes"/>
+ <cd:constant type="visualizers.depth"/>
+ <cd:constant type="visualizers.discretionary"/>
+ <cd:constant type="visualizers.expansion"/>
+ <cd:constant type="visualizers.fontkern"/>
+ <cd:constant type="visualizers.glue"/>
+ <cd:constant type="visualizers.glyph"/>
+ <cd:constant type="visualizers.hbox"/>
+ <cd:constant type="visualizers.italic"/>
+ <cd:constant type="visualizers.justification"/>
+ <cd:constant type="visualizers.kern"/>
+ <cd:constant type="visualizers.line"/>
+ <cd:constant type="visualizers.makeup"/>
+ <cd:constant type="visualizers.marginkern"/>
+ <cd:constant type="visualizers.math"/>
+ <cd:constant type="visualizers.origin"/>
+ <cd:constant type="visualizers.penalty"/>
+ <cd:constant type="visualizers.reset"/>
+ <cd:constant type="visualizers.simple"/>
+ <cd:constant type="visualizers.simplehbox"/>
+ <cd:constant type="visualizers.simplevbox"/>
+ <cd:constant type="visualizers.simplevtop"/>
+ <cd:constant type="visualizers.space"/>
+ <cd:constant type="visualizers.strut"/>
+ <cd:constant type="visualizers.user"/>
+ <cd:constant type="visualizers.vbox"/>
+ <cd:constant type="visualizers.vtop"/>
+ <cd:constant type="visualizers.whatsit"/>
+ <cd:constant type="vspacing.collect"/>
+ <cd:constant type="vspacing.forcestrutdepth"/>
+ <cd:constant type="vspacing.page"/>
+ <cd:constant type="vspacing.snapping"/>
+ <cd:constant type="vspacing.spacing"/>
+ <cd:constant type="vspacing.specials"/>
+ <cd:constant type="vspacing.synchronizepage"/>
+ <cd:constant type="vspacing.vbox"/>
+ <cd:constant type="widgets.attachments"/>
+ <cd:constant type="xml.entities"/>
+ <cd:constant type="xml.parse"/>
+ <cd:constant type="xml.path"/>
+ <cd:constant type="xml.profile"/>
+ <cd:constant type="xtable.construct"/>
+ </cd:define>
+
+ <!-- directive -->
+
+ <cd:define name="value-directive">
+ <cd:constant type="attributes.inheritance"/>
+ <cd:constant type="backend.addtags"/>
+ <cd:constant type="backend.date"/>
+ <cd:constant type="backend.format"/>
+ <cd:constant type="backend.omitextraboxes"/>
+ <cd:constant type="backend.pdf.forcecidset"/>
+ <cd:constant type="backend.pdf.threshold"/>
+ <cd:constant type="backend.trailerid"/>
+ <cd:constant type="backend.verbosexmp"/>
+ <cd:constant type="backend.xmp"/>
+ <cd:constant type="backends.spaces"/>
+ <cd:constant type="builders.paragraphs.adjusting.kerns"/>
+ <cd:constant type="builders.paragraphs.solutions.splitters.encapsulate"/>
+ <cd:constant type="characters.blockstoo"/>
+ <cd:constant type="characters.spaceafteruppercase"/>
+ <cd:constant type="chemistry.strictindex"/>
+ <cd:constant type="chemistry.strictorder"/>
+ <cd:constant type="colors.cmykrgbmode"/>
+ <cd:constant type="colors.pgf"/>
+ <cd:constant type="context.sorthash"/>
+ <cd:constant type="context.steps.noclose"/>
+ <cd:constant type="context.steps.nosteps"/>
+ <cd:constant type="destinations.log"/>
+ <cd:constant type="destinations.offset"/><!-- 5.0pt -->
+ <cd:constant type="export.comment"/>
+ <cd:constant type="export.embed"/>
+ <cd:constant type="export.lessstate"/>
+ <cd:constant type="export.math.autoapply"/>
+ <cd:constant type="export.math.autonumber"/>
+ <cd:constant type="export.math.autorows"/>
+ <cd:constant type="export.math.autostrip"/>
+ <cd:constant type="figures.embedded"/>
+ <cd:constant type="filters.utf.collapse"/>
+ <cd:constant type="filters.utf.decompose"/>
+ <cd:constant type="filters.utf.reorder"/>
+ <cd:constant type="fontgoodies.mathkerning"/>
+ <cd:constant type="fonts.autoreload"/>
+ <cd:constant type="fonts.checksharing"/>
+ <cd:constant type="fonts.embedall"/>
+ <cd:constant type="fonts.features.combine"/>
+ <cd:constant type="fonts.injections.useitalics"/>
+ <cd:constant type="fonts.mapping.forceligatures"/>
+ <cd:constant type="fonts.otf.loader.cleanup"/>
+ <cd:constant type="fonts.otf.loader.force"/>
+ <cd:constant type="fonts.otf.loader.forcenotdef"/>
+ <cd:constant type="fonts.otf.loader.syncspace"/>
+ <cd:constant type="fonts.streamreader"/><!-- 6 -->
+ <cd:constant type="fonts.streams.compact"/>
+ <cd:constant type="fonts.svg.cached"/>
+ <cd:constant type="fonts.usesystemfonts"/>
+ <cd:constant type="framed.checkmath"/>
+ <cd:constant type="graphics.autotransform"/>
+ <cd:constant type="graphics.conversion.cmykprofile"/>
+ <cd:constant type="graphics.conversion.eps.cleanup.ai"/>
+ <cd:constant type="graphics.conversion.rgbprofile"/>
+ <cd:constant type="graphics.extracheck"/>
+ <cd:constant type="graphics.pdf.recompress"/>
+ <cd:constant type="graphics.pdf.stripmarked"/>
+ <cd:constant type="graphics.png.compresslevel"/>
+ <cd:constant type="graphics.png.purelua"/>
+ <cd:constant type="graphics.png.recompress"/>
+ <cd:constant type="hyphenator.flatten"/>
+ <cd:constant type="hyphenator.optimize"/>
+ <cd:constant type="hyphenators.method"/>
+ <cd:constant type="hyphenators.urls.packslashes"/>
+ <cd:constant type="interaction.identity.preroll"/>
+ <cd:constant type="job.pack"/>
+ <cd:constant type="job.save"/>
+ <cd:constant type="languages.words.dump"/>
+ <cd:constant type="lmx.cache.files"/>
+ <cd:constant type="lmx.cache.templates"/>
+ <cd:constant type="logs.blocked"/>
+ <cd:constant type="logs.errors"/>
+ <cd:constant type="logs.target"/>
+ <cd:constant type="luatex.expanddepth"/><!-- 10000 -->
+ <cd:constant type="luatex.hashextra"/><!-- 100000 -->
+ <cd:constant type="luatex.maxinopen"/><!-- 500 -->
+ <cd:constant type="luatex.maxprintline"/><!-- 10000 -->
+ <cd:constant type="luatex.maxstrings"/><!-- 500000 -->
+ <cd:constant type="luatex.nestsize"/><!-- 1000 -->
+ <cd:constant type="luatex.paramsize"/><!-- 25000 -->
+ <cd:constant type="luatex.savesize"/><!-- 50000 -->
+ <cd:constant type="luatex.stacksize"/><!-- 10000 -->
+ <cd:constant type="lxml.entities.escaped"/>
+ <cd:constant type="lxml.entities.useelement"/>
+ <cd:constant type="marks.boxestoo"/>
+ <cd:constant type="math.checkcoverage"/>
+ <cd:constant type="math.virtual.optional"/>
+ <cd:constant type="metapost.lua.tolerant"/>
+ <cd:constant type="metapost.savetable"/>
+ <cd:constant type="modules.permitunprefixed"/>
+ <cd:constant type="mplib.texerrors"/>
+ <cd:constant type="nodes.basepass"/>
+ <cd:constant type="nodes.boundaryrun"/>
+ <cd:constant type="nodes.discrun"/>
+ <cd:constant type="nodes.keepredundant"/>
+ <cd:constant type="nodes.processors.force"/>
+ <cd:constant type="otf.acceptlanguages"/>
+ <cd:constant type="otf.acceptscripts"/>
+ <cd:constant type="otf.analyze.useunicodemarks"/>
+ <cd:constant type="otf.checksofthyphen"/>
+ <cd:constant type="otf.compact.pairs"/>
+ <cd:constant type="otf.compact.singles"/>
+ <cd:constant type="otf.fastdisc"/>
+ <cd:constant type="otf.forcediscretionaries"/>
+ <cd:constant type="otf.forcepairadvance"/>
+ <cd:constant type="otf.keepnames"/>
+ <cd:constant type="otf.merge.alternates"/>
+ <cd:constant type="otf.merge.cursives"/>
+ <cd:constant type="otf.merge.ligatures"/>
+ <cd:constant type="otf.merge.marks"/>
+ <cd:constant type="otf.merge.multiples"/>
+ <cd:constant type="otf.merge.pairs"/>
+ <cd:constant type="otf.merge.singles"/>
+ <cd:constant type="otf.merge.substitutions"/>
+ <cd:constant type="otf.threshold"/>
+ <cd:constant type="pdf.compact"/>
+ <cd:constant type="publications.prerollauthor"/>
+ <cd:constant type="references.bookmarks.preroll"/>
+ <cd:constant type="references.border"/>
+ <cd:constant type="references.linkmethod"/>
+ <cd:constant type="references.sharelinks"/>
+ <cd:constant type="references.untexurls"/>
+ <cd:constant type="resolvers.maxreadlevel"/>
+ <cd:constant type="resolvers.otherwise"/>
+ <cd:constant type="schemes.cleanmethod"/>
+ <cd:constant type="schemes.threshold"/>
+ <cd:constant type="structures.referencing.checkduplicates"/>
+ <cd:constant type="structures.tags.embed"/>
+ <cd:constant type="structures.tags.embedmath"/>
+ <cd:constant type="system.caches.direct"/>
+ <cd:constant type="system.caches.fast"/>
+ <cd:constant type="system.callbacks.permitoverloads"/>
+ <cd:constant type="system.commandlist"/><!-- mtxrun, convert, inkscape, gs, imagemagick, curl, bibtex, pstoedit -->
+ <cd:constant type="system.commandmode"/><!-- any -->
+ <cd:constant type="system.compile.cleanup"/>
+ <cd:constant type="system.compile.strip"/>
+ <cd:constant type="system.dumpdelta"/>
+ <cd:constant type="system.dumpfiles"/>
+ <cd:constant type="system.dumphash"/>
+ <cd:constant type="system.errorcontext"/><!-- 10 -->
+ <cd:constant type="system.executionlist"/>
+ <cd:constant type="system.executionmode"/>
+ <cd:constant type="system.inputmode"/><!-- any -->
+ <cd:constant type="system.librarylist"/>
+ <cd:constant type="system.librarymode"/>
+ <cd:constant type="system.linesplitmethod"/>
+ <cd:constant type="system.nolibraries"/>
+ <cd:constant type="system.nostatistics"/>
+ <cd:constant type="system.outputmode"/><!-- restricted -->
+ <cd:constant type="system.profile"/>
+ <cd:constant type="system.quitonerror"/>
+ <cd:constant type="system.reportfiles"/>
+ <cd:constant type="system.rootlist"/>
+ <cd:constant type="system.showerror"/>
+ <cd:constant type="system.synctex.compression"/>
+ <cd:constant type="system.usescitelexer"/>
+ <cd:constant type="tabulate.linenumbers"/>
+ <cd:constant type="typesetters.casing.checkkerns"/>
+ <cd:constant type="typesetters.characteralign.autofont"/>
+ <cd:constant type="typesetters.directions.onetoo"/>
+ <cd:constant type="typesetters.directions.removecontrols"/>
+ <cd:constant type="typesetters.processors.overloadcatcodes"/>
+ <cd:constant type="visualizers.fraction"/>
+ <cd:constant type="visualizers.raisepenalties"/>
+ <cd:constant type="vspacing.removemathskips"/>
+ <cd:constant type="vspacing.synchronizepage"/>
+ <cd:constant type="xml.path.keeplastmatch"/>
+ </cd:define>
+
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-context-modules.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-context-modules.xml
index 85194c6ec3d..319ba53df2a 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-context-modules.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-context-modules.xml
@@ -37,4 +37,4 @@
<cd:interfacefile filename="i-translate.xml"/>
<cd:interfacefile filename="i-visual.xml"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf b/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf
index a877fa0eafc..552b8f5eb86 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-context.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-context.xml
index 53741ad5571..a1f53f470d4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-context.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-context.xml
@@ -53,9 +53,13 @@
<cd:interfacefile filename="i-clipping.xml"/>
<cd:interfacefile filename="i-collector.xml"/>
<cd:interfacefile filename="i-color.xml"/>
+ <cd:interfacefile filename="i-columns.xml"/>
<cd:interfacefile filename="i-combination.xml"/>
<cd:interfacefile filename="i-commandhandler.xml"/>
<cd:interfacefile filename="i-comment.xml"/>
+ <!--
+ <cd:interfacefile filename="i-contextname.xml"/>
+ -->
<cd:interfacefile filename="i-conversion.xml"/>
<cd:interfacefile filename="i-counter.xml"/>
<cd:interfacefile filename="i-dataset.xml"/>
@@ -104,7 +108,6 @@
<cd:interfacefile filename="i-interactionscreen.xml"/>
<cd:interfacefile filename="i-interface.xml"/>
<cd:interfacefile filename="i-interlinespace.xml"/>
- <cd:interfacefile filename="i-interlinespace.xml"/>
<cd:interfacefile filename="i-italiccorrection.xml"/>
<cd:interfacefile filename="i-itemgroup.xml"/>
<cd:interfacefile filename="i-items.xml"/>
@@ -124,6 +127,7 @@
<cd:interfacefile filename="i-logo.xml"/>
<cd:interfacefile filename="i-lohi.xml"/>
<cd:interfacefile filename="i-lua.xml"/>
+ <cd:interfacefile filename="i-luatable.xml"/>
<cd:interfacefile filename="i-makeup.xml"/>
<cd:interfacefile filename="i-marginblock.xml"/>
<cd:interfacefile filename="i-margindata.xml"/>
@@ -134,6 +138,9 @@
<cd:interfacefile filename="i-mathcases.xml"/>
<cd:interfacefile filename="i-mathfence.xml"/>
<cd:interfacefile filename="i-mathmatrix.xml"/>
+ <!--
+ <cd:interfacefile filename="i-mathname.xml"/>
+ -->
<cd:interfacefile filename="i-mathornament.xml"/>
<cd:interfacefile filename="i-mathradical.xml"/>
<cd:interfacefile filename="i-mathstackers.xml"/>
@@ -147,6 +154,7 @@
<cd:interfacefile filename="i-object.xml"/>
<cd:interfacefile filename="i-offset.xml"/>
<cd:interfacefile filename="i-opposite.xml"/>
+ <cd:interfacefile filename="i-orientation.xml"/>
<cd:interfacefile filename="i-ornament.xml"/>
<cd:interfacefile filename="i-output.xml"/>
<cd:interfacefile filename="i-overlay.xml"/>
@@ -169,10 +177,12 @@
<cd:interfacefile filename="i-paragraphs.xml"/>
<cd:interfacefile filename="i-parallel.xml"/>
<cd:interfacefile filename="i-parbuilder.xml"/>
+ <cd:interfacefile filename="i-parwrapper.xml"/>
<cd:interfacefile filename="i-pdf.xml"/>
<cd:interfacefile filename="i-penalty.xml"/>
<cd:interfacefile filename="i-periods.xml"/>
<cd:interfacefile filename="i-phantom.xml"/>
+ <cd:interfacefile filename="i-placeholder.xml"/>
<cd:interfacefile filename="i-placement.xml"/>
<cd:interfacefile filename="i-position.xml"/>
<cd:interfacefile filename="i-positionbar.xml"/>
@@ -187,7 +197,7 @@
<cd:interfacefile filename="i-register.xml"/>
<cd:interfacefile filename="i-renderingwindow.xml"/>
<cd:interfacefile filename="i-replacement.xml"/>
- <cd:interfacefile filename="i-rotatation.xml"/>
+ <cd:interfacefile filename="i-rotation.xml"/>
<cd:interfacefile filename="i-ruby.xml"/>
<cd:interfacefile filename="i-scale.xml"/>
<cd:interfacefile filename="i-script.xml"/>
@@ -214,6 +224,9 @@
<cd:interfacefile filename="i-table.xml"/>
<cd:interfacefile filename="i-tabulation.xml"/>
<cd:interfacefile filename="i-tagging.xml"/>
+ <!--
+ <cd:interfacefile filename="i-tex.xml"/>
+ -->
<cd:interfacefile filename="i-textbackground.xml"/>
<cd:interfacefile filename="i-textflow.xml"/>
<cd:interfacefile filename="i-textrule.xml"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-contextname.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-contextname.xml
index 3e289f3f5ca..c1b7d85cbd6 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-contextname.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-contextname.xml
@@ -2350,4 +2350,4 @@
<cd:command name="zerowidthnobreakspace" level="document" category="characters" file="char-def.lua"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-conversion.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-conversion.xml
index b97b638066a..e09bbd73355 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-conversion.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-conversion.xml
@@ -16,223 +16,235 @@
</cd:arguments>
</cd:command>
- <cd:command name="romannumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="romannumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="Romannumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="Romannumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="abjadnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="abjadnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="abjadnodotnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="abjadnodotnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="abjadnaivenumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="abjadnaivenumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="languagecharacters" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="hebrewnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="languageCharacters" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="yiddishnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="alphabeticnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="languagecharacters" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="Alphabeticnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="languageCharacters" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="thainumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="alphabeticnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="devanagarinumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="Alphabeticnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="gurmurkhinumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="thainumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="gujaratinumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="devanagarinumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="tibetannumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="gurmurkhinumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="greeknumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="gujaratinumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="Greeknumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="tibetannumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="arabicnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="greeknumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="persiannumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="Greeknumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="arabicdecimals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="arabicnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="persiandecimals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="persiannumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="arabicexnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="arabicdecimals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="koreannumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="persiandecimals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="koreannumeralsp" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="arabicexnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="koreannumeralsc" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="koreannumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="koreanparentnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="koreannumeralsp" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="koreancirclenumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="koreannumeralsc" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="chinesenumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="koreanparentnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="chinesecapnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="koreancirclenumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="chineseallnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="chinesenumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="character" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="chinesecapnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="Character" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="chineseallnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="characters" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="character" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="Characters" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="Character" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="monthlong" level="style" category="counter" file="core-con.mkiv">
+ <cd:command name="characters" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="monthshort" level="style" category="counter" file="core-con.mkiv">
+ <cd:command name="Characters" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="convertmonth" level="style" category="counter" file="core-con.mkiv">
+ <cd:command name="month" level="style" category="counter" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="month" level="style" category="counter" file="core-con.mkiv">
+ <cd:command name="monthlong" level="style" category="counter" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="monthshort" level="style" category="counter" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="convertmonth" level="style" category="counter" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
@@ -268,6 +280,30 @@
</cd:arguments>
</cd:command>
+ <cd:command name="daylong" level="style" category="counter" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="dayshort" level="style" category="counter" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="DAYLONG" level="style" category="counter" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="DAYSHORT" level="style" category="counter" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
<cd:command name="dayoftheweek" level="style" category="counter" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
@@ -284,7 +320,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseleapyear" level="style" category="counter conditional" file="core-con.mkiv">
+ <cd:command name="doifelseleapyear" level="style" category="counter" keywords="conditional" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -292,7 +328,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifleapyearelse" level="style" category="counter conditional" file="core-con.mkiv">
+ <cd:command name="doifleapyearelse" level="style" category="counter" keywords="conditional" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -314,51 +350,26 @@
</cd:arguments>
</cd:command>
- <cd:command name="currentdate" level="document" category="counter language" file="core-con.mkiv">
+ <cd:command name="definedate" level="document" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="year"/>
- <cd:constant type="month"/>
- <cd:constant type="day"/>
- <cd:constant type="weekday"/>
- <cd:constant type="y"/>
- <cd:constant type="yy"/>
- <cd:constant type="Y"/>
- <cd:constant type="m"/>
- <cd:constant type="mm"/>
- <cd:constant type="M"/>
- <cd:constant type="d"/>
- <cd:constant type="dd"/>
- <cd:constant type="D"/>
- <cd:constant type="w"/>
- <cd:constant type="W"/>
- <cd:constant type="space"/>
- <cd:constant type="\â£"/>
- <cd:constant type="month:mnem"/>
- <cd:constant type="m:mnem"/>
- <cd:constant type="d:ord"/>
- <cd:constant type="day:ord"/>
- <cd:constant type="dd:ord"/>
- <cd:constant type="D:ord"/>
- <cd:constant type="cd:text"/>
- <cd:constant type="referral"/>
- <cd:constant type="day:+"/>
- <cd:constant type="day:++"/>
- <cd:constant type="d:+"/>
- <cd:constant type="d:++"/>
- <cd:constant type="dd:+"/>
- <cd:constant type="dd:++"/>
- <cd:constant type="D:+"/>
- <cd:constant type="D:++"/>
- <cd:constant type="month:jalali"/>
- <cd:constant type="m:jalali"/>
- <cd:constant type="jalali:to"/>
- <cd:constant type="jalali:from"/>
- </cd:keywords>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="keyword-date-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="date" level="document" category="counter language" file="core-con.mkiv">
+ <cd:command name="currentdate" level="document" category="counter" keywords="language" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-date-list-optional"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="currentdate" variant="name" level="document" category="counter" keywords="language" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="date" level="document" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="d">
@@ -371,9 +382,24 @@
<cd:constant type="cd:number"/>
</cd:parameter>
</cd:assignments>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="currentdate"/>
- </cd:keywords>
+ <cd:resolve name="keyword-date-list-optional"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="date" variant="name" level="document" category="counter" keywords="language" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:assignments list="yes">
+ <cd:parameter name="d">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="m">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="y">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ </cd:assignments>
+ <cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
@@ -420,7 +446,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="defineconversion" variant="list" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="defineconversion" variant="list" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="keyword-language-optional"/>
<cd:resolve name="keyword-name"/>
@@ -468,6 +494,8 @@
<cd:constant type="abjadnumerals"/>
<cd:constant type="abjadnodotnumerals"/>
<cd:constant type="abjadnaivenumerals"/>
+ <cd:constant type="hebrewnumerals"/>
+ <cd:constant type="yiddishnumerals"/>
<cd:constant type="thainumerals"/>
<cd:constant type="devanagarinumerals"/>
<cd:constant type="gurmurkhinumerals"/>
@@ -496,6 +524,8 @@
<cd:constant type="slovenianNumerals"/>
<cd:constant type="spanishnumerals"/>
<cd:constant type="spanishNumerals"/>
+ <cd:constant type="russiannumerals"/>
+ <cd:constant type="russianNumerals"/>
<cd:constant type="mathgreek"/>
<cd:constant type="setâ£0"/>
<cd:constant type="setâ£1"/>
@@ -518,7 +548,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseconversiondefined" level="system" category="counter conditional" file="core-con.mkiv">
+ <cd:command name="doifelseconversiondefined" level="system" category="counter" keywords="conditional" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -526,7 +556,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifconversiondefinedelse" level="system" category="counter conditional" file="core-con.mkiv">
+ <cd:command name="doifconversiondefinedelse" level="system" category="counter" keywords="conditional" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -534,7 +564,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseconversionnumber" level="system" category="counter conditional" file="core-con.mkiv">
+ <cd:command name="doifelseconversionnumber" level="system" category="counter" keywords="conditional" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -543,7 +573,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifconversionnumberelse" level="system" category="counter conditional" file="core-con.mkiv">
+ <cd:command name="doifconversionnumberelse" level="system" category="counter" keywords="conditional" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -607,25 +637,37 @@
</cd:arguments>
</cd:command>
- <cd:command name="sloveniannumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="sloveniannumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="slovenianNumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="slovenianNumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="spanishnumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="spanishnumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="spanishNumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="spanishNumerals" level="style" category="counter language" file="core-con.mkiv">
+ <cd:command name="russiannumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="russianNumerals" level="style" category="counter" keywords="language" file="core-con.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
@@ -649,8 +691,58 @@
</cd:arguments>
</cd:command>
- <cd:command name="actualyear" level="style" category="system" file="core-con.mkiv" />
- <cd:command name="actualmonth" level="style" category="system" file="core-con.mkiv" />
- <cd:command name="actualday" level="style" category="system" file="core-con.mkiv" />
+ <cd:command name="actualyear" level="style" category="system" keywords="system" category="counter" file="core-con.lua"/>
+
+ <cd:command name="actualmonth" level="style" category="system" keywords="system" category="counter" file="core-con.lua"/>
+
+ <cd:command name="actualday" level="style" category="system" keywords="system" category="counter" file="core-con.lua"/>
+
+ <cd:command name="lchexnumber" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="uchexnumber" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="lchexnumbers" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="uchexnumbers" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="hexnumber" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="octnumber" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="hexstringtonumber" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="octstringtonumber" level="style" category="counter" file="syst-con.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-counter.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-counter.xml
index ec841a59736..f3e622e5f0a 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-counter.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-counter.xml
@@ -26,6 +26,9 @@
<cd:parameter name="start">
<cd:constant type="cd:number"/>
</cd:parameter>
+ <cd:parameter name="number">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
<cd:parameter name="counter">
<cd:constant type="cd:name"/>
</cd:parameter>
@@ -111,7 +114,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsecounter" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifelsecounter" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -119,7 +122,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcounterelse" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifcounterelse" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -127,14 +130,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcounter" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifcounter" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotcounter" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifnotcounter" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -360,7 +363,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsedefinedcounter" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifelsedefinedcounter" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -368,7 +371,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdefinedcounterelse" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifdefinedcounterelse" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -376,14 +379,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdefinedcounter" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifdefinedcounter" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifundefinedcounter" level="system" category="counter conditional" file="strc-num.mkiv">
+ <cd:command name="doifundefinedcounter" level="system" category="counter" keywords="conditional" file="strc-num.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -514,4 +517,4 @@
-->
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-database.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-database.xml
index a81cd75f8a3..e974b2d644c 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-database.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-database.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definedatabase" level="style" file="m-database.mkiv">
+ <cd:command name="definedatabase" level="style" category="tables" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupdatabase" level="style" file="m-database.mkiv">
+ <cd:command name="setupdatabase" level="style" category="tables" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -64,21 +64,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="processdatabasebuffer" level="document" file="m-database.mkiv">
+ <cd:command name="processdatabasebuffer" level="document" category="tables" keywords="buffer" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-buffer"/>
</cd:arguments>
</cd:command>
- <cd:command name="processdatabasefile" level="document" file="m-database.mkiv">
+ <cd:command name="processdatabasefile" level="document" category="tables" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="defineseparatedlist" level="style" file="m-database.mkiv">
+ <cd:command name="defineseparatedlist" level="style" category="tables" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -87,26 +87,26 @@
</cd:arguments>
</cd:command>
- <cd:command name="processseparatedlist" level="document" file="m-database.mkiv">
+ <cd:command name="processseparatedlist" level="document" category="tables" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="separatedlist" type="environment" generated="yes" variant="instance" level="document" file="m-database.mkiv">
+ <cd:command name="separatedlist" type="environment" generated="yes" variant="instance" level="document" category="tables" file="m-database.mkiv">
<cd:sequence>
<cd:instance value="separatedlist"/>
</cd:sequence>
</cd:command>
- <cd:command name="separatedlist" type="environment" level="document" file="m-database.mkiv">
+ <cd:command name="separatedlist" type="environment" level="document" category="tables" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupseparatedlist" level="style" file="m-database.mkiv">
+ <cd:command name="setupseparatedlist" level="style" category="tables" file="m-database.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -115,4 +115,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-dataset.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-dataset.xml
index c006454d3d6..afb8f8fa3e6 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-dataset.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-dataset.xml
@@ -48,4 +48,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-define.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-define.xml
index 91975e75271..f37645cf1af 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-define.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-define.xml
@@ -20,4 +20,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-delimitedtext.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-delimitedtext.xml
index ce1767b1c48..3d881a97261 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-delimitedtext.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-delimitedtext.xml
@@ -157,86 +157,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="quotation" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="quotation" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="quote" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="quote" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="blockquote" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="blockquote" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="speech" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="aside" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="aside" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="speech" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="setupquotation" level="style" category="language" file="typo-del.mkiv">
<cd:arguments>
<cd:assignments list="yes">
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-description.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-description.xml
index 9d71bd1a109..aa66532a0f1 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-description.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-description.xml
@@ -139,18 +139,14 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="setupdescriptions" level="style" category="structure" file="strc-des.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-name-list-optional"/>
- <cd:assignments list="yes">
- <cd:inherit name="setupdescription"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
+ <cd:command name="setupdescriptions" level="style" category="structure" file="strc-des.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
+ <cd:assignments list="yes">
+ <cd:inherit name="setupdescription"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
<cd:command name="description" type="environment" generated="yes" variant="example" level="document" category="structure" file="strc-des.mkvi">
<cd:sequence>
@@ -183,4 +179,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-digits.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-digits.xml
index c917bf0d417..159745b6540 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-digits.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-digits.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setdigitsmanipulation" level="system" file="typo-dig.mkiv">
+ <cd:command name="setdigitsmanipulation" level="system" category="symbols" keywords="fonts" file="typo-dig.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
@@ -13,14 +13,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetdigitsmanipulation" level="system" file="typo-dig.mkiv"/>
+ <cd:command name="resetdigitsmanipulation" level="system" category="symbols" keywords="fonts" file="typo-dig.mkiv"/>
- <cd:command name="equaldigits" level="document" file="typo-dig.mkiv">
+ <cd:command name="equaldigits" level="document" category="symbols" keywords="fonts" file="typo-dig.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="dummydigit" level="document" file="typo-dig.mkiv"/>
+ <cd:command name="dummydigit" level="document" category="symbols" keywords="fonts" file="typo-dig.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-dimension.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-dimension.xml
index 1980687ab5f..bb7c3bfa700 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-dimension.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-dimension.xml
@@ -64,4 +64,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-direction.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-direction.xml
index 87e64e4572d..721e7c60e60 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-direction.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-direction.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupdirections" level="style" category="language alignment" file="typo-dir.mkiv">
+ <cd:command name="setupdirections" level="style" category="language" keywords="alignment" file="typo-dir.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="bidi">
@@ -30,26 +30,26 @@
</cd:arguments>
</cd:command>
- <cd:command name="setdirection" level="style" category="language alignment" file="typo-dir.mkiv">
+ <cd:command name="setdirection" level="style" category="language" keywords="alignment" file="typo-dir.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="resetdirection" level="style" category="language alignment" file="typo-dir.mkiv"/>
+ <cd:command name="resetdirection" level="style" category="language" keywords="alignment" file="typo-dir.mkiv"/>
<!--
- <cd:command name="lefttorightmark" level="system" category="language alignment" file="typo-dir.mkiv"/>
+ <cd:command name="lefttorightmark" level="system" category="language" keywords="alignment" file="typo-dir.mkiv"/>
- <cd:command name="righttoleftmark" level="system" category="language alignment" file="typo-dir.mkiv"/>
+ <cd:command name="righttoleftmark" level="system" category="language" keywords="alignment" file="typo-dir.mkiv"/>
- <cd:command name="lrm" level="system" category="language alignment" file="typo-dir.mkiv"/>
+ <cd:command name="lrm" level="system" category="language" keywords="alignment" file="typo-dir.mkiv"/>
- <cd:command name="rlm" level="system" category="language alignment" file="typo-dir.mkiv"/>
+ <cd:command name="rlm" level="system" category="language" keywords="alignment" file="typo-dir.mkiv"/>
-->
- <cd:command name="showdirsinmargin" level="document" category="alignment" file="supp-dir.mkiv"/>
+ <cd:command name="showdirsinmargin" level="document" category="alignment" keywords="alignment" file="supp-dir.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-document.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-document.xml
index 178f7e9fec5..3ea0d0eeb18 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-document.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-document.xml
@@ -164,6 +164,26 @@
<cd:command name="document" type="environment" level="document" category="structure" file="file-job.mkvi">
<cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupdocument"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="document" type="environment" generated="yes" variant="example" level="document" category="structure" file="file-job.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupdocument"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="definedocument" level="style" category="structure" file="file-job.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupdocument"/>
</cd:assignments>
@@ -172,6 +192,7 @@
<cd:command name="setupdocument" level="style" category="structure" file="file-job.mkvi">
<cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
<cd:parameter name="before">
<cd:constant type="cd:command"/>
@@ -200,6 +221,7 @@
<cd:command name="presetdocument" level="style" category="structure" file="file-job.mkvi">
<cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes">
<cd:inherit name="setupdocument"/>
</cd:assignments>
@@ -248,4 +270,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-dummy.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-dummy.xml
index 47d005e206d..1ee66cdac95 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-dummy.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-dummy.xml
@@ -4,55 +4,55 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="getdummyparameters" level="system" file="mult-aux.mkiv">
+ <cd:command name="getdummyparameters" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="dummyparameter" level="system" file="mult-aux.mkiv">
+ <cd:command name="dummyparameter" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="directdummyparameter" level="system" file="mult-aux.mkiv">
+ <cd:command name="directdummyparameter" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="setdummyparameter" level="system" file="mult-aux.mkiv">
+ <cd:command name="setdummyparameter" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="letdummyparameter" level="system" file="mult-aux.mkiv">
+ <cd:command name="letdummyparameter" level="system" category="commandhandler" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="usedummystyleandcolor" level="system" category="fonts colors" file="mult-aux.mkiv">
+ <cd:command name="usedummystyleandcolor" level="system" category="commandhandler" keywords="fonts colors" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="usedummystyleparameter" level="system" category="fonts" file="mult-aux.mkiv">
+ <cd:command name="usedummystyleparameter" level="system" category="commandhandler" keywords="fonts" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="usedummycolorparameter" level="system" category="colors" file="mult-aux.mkiv">
+ <cd:command name="usedummycolorparameter" level="system" category="commandhandler" keywords="colors" file="mult-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-enumeration.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-enumeration.xml
index 0f286b8b531..ab10e0bf159 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-enumeration.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-enumeration.xml
@@ -226,4 +226,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-export.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-export.xml
index 3c3afff2b35..07156c95bf7 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-export.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-export.xml
@@ -74,4 +74,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-field.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-field.xml
index 7a67786f97d..5d4aeb101a8 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-field.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-field.xml
@@ -133,7 +133,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefieldcategory" level="system" category="pdf conditional" file="scrn-fld.mkvi">
+ <cd:command name="doifelsefieldcategory" level="system" category="pdf" keywords="conditional" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -141,7 +141,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffieldcategoryelse" level="system" category="pdf conditional" file="scrn-fld.mkvi">
+ <cd:command name="doiffieldcategoryelse" level="system" category="pdf" keywords="conditional" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -187,7 +187,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefieldbody" level="system" category="pdf conditional" file="scrn-fld.mkvi">
+ <cd:command name="doifelsefieldbody" level="system" category="pdf" keywords="conditional" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -195,7 +195,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffieldbodyelse" level="system" category="pdf conditional" file="scrn-fld.mkvi">
+ <cd:command name="doiffieldbodyelse" level="system" category="pdf" keywords="conditional" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -245,7 +245,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fitfieldframed" level="document" category="pdf background rules" file="scrn-fld.mkvi">
+ <cd:command name="fitfieldframed" level="document" category="pdf" keywords="background rules" file="scrn-fld.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -263,7 +263,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfieldlabelframed" level="style" category="pdf background" file="scrn-fld.mkvi">
+ <cd:command name="setupfieldlabelframed" level="style" category="pdf" keywords="background" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -272,7 +272,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfieldcontentframed" level="style" category="pdf background" file="scrn-fld.mkvi">
+ <cd:command name="setupfieldcontentframed" level="style" category="pdf" keywords="background" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -282,7 +282,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfieldtotalframed" level="style" category="pdf background" file="scrn-fld.mkvi">
+ <cd:command name="setupfieldtotalframed" level="style" category="pdf" keywords="background" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -310,7 +310,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfield" level="style" category="pdf background" file="scrn-fld.mkvi">
+ <cd:command name="setupfield" level="style" category="pdf" keywords="background" file="scrn-fld.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes" optional="yes">
@@ -332,7 +332,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfields" level="style" category="pdf background" file="scrn-fld.mkvi">
+ <cd:command name="setupfields" level="style" category="pdf" keywords="background" file="scrn-fld.mkvi">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="reset"/>
@@ -380,4 +380,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-file.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-file.xml
index bf12e5825f1..671f637abb5 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-file.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-file.xml
@@ -16,21 +16,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffile" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doiffile" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotfile" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifnotfile" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefile" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifelsefile" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -38,7 +38,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffileelse" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doiffileelse" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -72,7 +72,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepath" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifelsepath" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-path"/>
<cd:resolve name="argument-true"/>
@@ -80,7 +80,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpathelse" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifpathelse" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-path"/>
<cd:resolve name="argument-true"/>
@@ -88,7 +88,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefileexists" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifelsefileexists" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -96,7 +96,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffileexistselse" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doiffileexistselse" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -104,7 +104,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepathexists" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifelsepathexists" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-path"/>
<cd:resolve name="argument-true"/>
@@ -112,7 +112,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpathexistselse" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifpathexistselse" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-path"/>
<cd:resolve name="argument-true"/>
@@ -120,7 +120,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseparentfile" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifelseparentfile" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -128,7 +128,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifparentfileelse" level="system" category="structure conditional" file="file-ini.mkvi">
+ <cd:command name="doifparentfileelse" level="system" category="structure" keywords="conditional" file="file-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -156,7 +156,7 @@
<cd:command name="splitoffroot" level="system" category="structure" file="file-ini.mkvi"/>
- <cd:command name="doifelseinputfile" level="system" category="structure conditional" file="file-job.mkvi">
+ <cd:command name="doifelseinputfile" level="system" category="structure" keywords="conditional" file="file-job.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -164,7 +164,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinputfileelse" level="system" category="structure conditional" file="file-job.mkvi">
+ <cd:command name="doifinputfileelse" level="system" category="structure" keywords="conditional" file="file-job.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -239,13 +239,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="loadluafile" level="system" category="structure lua" file="file-job.mkvi">
+ <cd:command name="loadluafile" level="system" category="structure" keywords="lua" file="file-job.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="loadcldfile" level="system" category="structure lua" file="file-job.mkvi">
+ <cd:command name="loadcldfile" level="system" category="structure" keywords="lua" file="file-job.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
</cd:arguments>
@@ -263,13 +263,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="loadluafileonce" level="system" category="structure lua" file="file-job.mkvi">
+ <cd:command name="loadluafileonce" level="system" category="structure" keywords="lua" file="file-job.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="loadcldfileonce" level="system" category="structure lua" file="file-job.mkvi">
+ <cd:command name="loadcldfileonce" level="system" category="structure" keywords="lua" file="file-job.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
</cd:arguments>
@@ -293,7 +293,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readjobfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="readjobfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -301,7 +301,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readlocfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="readlocfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -309,7 +309,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readsysfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="readsysfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -317,7 +317,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readfixfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="readfixfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-path"/>
<cd:resolve name="argument-file"/>
@@ -326,7 +326,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readsetfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="readsetfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-path"/>
<cd:resolve name="argument-file"/>
@@ -335,7 +335,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="readfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -349,7 +349,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readtexfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="readtexfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -357,7 +357,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="readxmlfile" level="system" category="structure conditional xml" file="file-res.mkvi">
+ <cd:command name="readxmlfile" level="system" category="structure" keywords="conditional xml" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -365,7 +365,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelselocfile" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="doifelselocfile" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -373,7 +373,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiflocfileelse" level="system" category="structure conditional" file="file-res.mkvi">
+ <cd:command name="doiflocfileelse" level="system" category="structure" keywords="conditional" file="file-res.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -407,4 +407,10 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="usefontpath" level="system" category="structure" keywords="fonts" file="font-ini.mklx">
+ <cd:arguments>
+ <cd:resolve name="keyword-path-list"/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-filler.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-filler.xml
index d9a43378e07..2e425a3f766 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-filler.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-filler.xml
@@ -127,98 +127,6 @@
</cd:arguments>
</cd:command>
- <cd:command name="definelinefiller" level="style" category="rules metapost" file="node-rul.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name"/>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplinefiller"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setuplinefiller" level="style" category="rules metapost" file="node-rul.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-list-optional"/>
- <cd:assignments list="yes">
- <cd:parameter name="location">
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant type="both" default="yes"/>
- </cd:parameter>
- <cd:parameter name="scope">
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant type="local" default="yes"/>
- </cd:parameter>
- <cd:parameter name="mp">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="height">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="depth">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="distance">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="threshold">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="rulethickness">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="before">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="after">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="color">
- <cd:constant type="cd:color"/>
- </cd:parameter>
- <cd:parameter name="textstyle">
- <cd:resolve name="value-style"/>
- </cd:parameter>
- <cd:parameter name="textcolor">
- <cd:constant type="cd:color"/>
- </cd:parameter>
- <cd:parameter name="align">
- <cd:inherit name="setupalign"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setuplinefillers" level="style" category="rules metapost" file="node-rul.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-list-optional"/>
- <cd:assignments list="yes">
- <cd:inherit name="setuplinefiller"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="linefiller" type="environment" level="style" category="rules metapost" file="node-rul.mkiv">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="filler"/>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplinefiller"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setlinefiller" level="style" category="rules metapost" file="node-rul.mkiv">
- <cd:arguments>
- <cd:keywords>
- <cd:constant type="filler"/>
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
+ <cd:command name="dotfill" level="document" category="rules" file="spac-flr.mkiv"/>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-fillinline.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-fillinline.xml
index eb2f9d6ae9e..614a9bc990e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-fillinline.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-fillinline.xml
@@ -40,4 +40,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-fillinrule.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-fillinrule.xml
index d73b70ff983..9802b4fbb76 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-fillinrule.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-fillinrule.xml
@@ -63,4 +63,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-firstline.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-firstline.xml
index b22035651e2..052d135d1ab 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-firstline.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-firstline.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definefirstline" level="style" category="fonts colors" file="typo-fln.mkiv">
+ <cd:command name="definefirstline" level="style" category="fonts" keywords="colors" file="typo-fln.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfirstline" level="style" category="fonts colors" file="typo-fln.mkiv">
+ <cd:command name="setupfirstline" level="style" category="fonts" keywords="colors" file="typo-fln.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -36,17 +36,17 @@
</cd:arguments>
</cd:command>
- <cd:command name="setfirstline" level="document" category="fonts colors" file="typo-fln.mkiv">
+ <cd:command name="setfirstline" level="document" category="fonts" keywords="colors" file="typo-fln.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="applytofirstcharacter" level="system" category="fonts colors" file="typo-fln.mkiv">
+ <cd:command name="applytofirstcharacter" level="system" category="fonts" keywords="colors" file="typo-fln.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-fittingpage.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-fittingpage.xml
index f5daafcf1b0..7283ae5ac9b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-fittingpage.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-fittingpage.xml
@@ -28,7 +28,7 @@
</cd:assignments>
</cd:define>
- <cd:command name="definefittingpage" level="style" category="background layout" file="page-app.mkiv">
+ <cd:command name="definefittingpage" level="style" category="layout" keywords="background" file="page-app.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -38,14 +38,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfittingpage" level="style" category="background layout" file="page-app.mkiv">
+ <cd:command name="setupfittingpage" level="style" category="layout" keywords="background" file="page-app.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:resolve name="assignment-setupfittingpage"/>
</cd:arguments>
</cd:command>
- <cd:command name="fittingpage" type="environment" level="document" category="background layout" file="page-app.mkiv">
+ <cd:command name="fittingpage" type="environment" level="document" category="layout" keywords="background" file="page-app.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -54,7 +54,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fittingpage" type="environment" generated="yes" variant="instance" level="document" category="background layout" file="page-app.mkiv">
+ <cd:command name="fittingpage" type="environment" generated="yes" variant="instance" level="document" category="layout" keywords="background" file="page-app.mkiv">
<cd:sequence>
<cd:instance value="fittingpage"/>
</cd:sequence>
@@ -68,36 +68,16 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setupTEXpage" level="style" category="background layout" file="page-app.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setupfittingpage"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupMPpage" level="style" category="background layout metapost" file="meta-fig.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setupfittingpage"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="setupTEXpage" level="style" category="background layout" file="page-app.mkiv">
+ <cd:command name="setupTEXpage" level="style" category="layout" keywords="background" file="page-app.mkiv">
<cd:arguments>
<cd:resolve name="assignment-setupfittingpage"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupMPpage" level="style" category="background layout metapost" file="meta-fig.mkiv">
+ <cd:command name="setupMPpage" level="style" category="layout" keywords="background metapost" file="meta-fig.mkiv">
<cd:arguments>
<cd:resolve name="assignment-setupfittingpage"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-floats.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-floats.xml
index 7714e5ccc23..a29fc7b9d50 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-floats.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-floats.xml
@@ -239,7 +239,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfloatcaption" level="style" category="structure fonts counter" file="strc-flt.mkvi">
+ <cd:command name="setupfloatcaption" level="style" category="structure" keywords="fonts counter" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -363,7 +363,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupcaption" level="style" category="structure fonts counter" file="strc-flt.mkvi">
+ <cd:command name="setupcaption" level="style" category="structure" keywords="fonts counter" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -372,7 +372,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupcaptions" level="style" category="structure fonts counter" file="strc-flt.mkvi">
+ <cd:command name="setupcaptions" level="style" category="structure" keywords="fonts counter" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -383,7 +383,7 @@
-->
- <cd:command name="setupcaption" level="style" category="structure fonts counter" file="strc-flt.mkvi">
+ <cd:command name="setupcaption" level="style" category="structure" keywords="fonts counter" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -452,9 +452,6 @@
<cd:parameter name="headseparator">
<cd:constant type="cd:text"/>
</cd:parameter>
- <cd:parameter name="headcommand">
- <cd:constant type="cd:command"/>
- </cd:parameter>
<cd:parameter name="inbetween">
<cd:constant type="cd:command"/>
</cd:parameter>
@@ -505,13 +502,17 @@
<cd:parameter name="maxwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="hang">
+ <cd:constant type="yes"/>
+ <cd:constant type="no" default="yes"/>
+ </cd:parameter>
<cd:inherit name="setupcounter"/>
<cd:inherit name="setupframed"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command name="setupcaptions" level="style" category="structure fonts counter" file="strc-flt.mkvi">
+ <cd:command name="setupcaptions" level="style" category="structure" keywords="fonts counter" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -520,9 +521,33 @@
</cd:arguments>
</cd:command>
+ <cd:command name="placefloatcaption" level="style" category="structure" keywords="fonts counter" file="strc-flt.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:parameter name="title">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="bookmark">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="marking">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="list">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="reference">
+ <cd:constant type="cd:reference"/>
+ </cd:parameter>
+ </cd:assignments>
+ <cd:resolve name="assignment-userdata-list-optional"/>
+ </cd:arguments>
+ </cd:command>
+
<!--
- <cd:command name="definefloatframed" level="style" category="structure background" file="strc-flt.mkvi">
+ <cd:command name="definefloatframed" level="style" category="structure" keywords="background" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -534,7 +559,7 @@
-->
- <cd:command name="setupfloatframed" level="style" category="structure background" file="strc-flt.mkvi">
+ <cd:command name="setupfloatframed" level="style" category="structure" keywords="background" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -642,244 +667,48 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelserightpagefloat" level="system" category="structure conditional" file="strc-flt.mkvi">
+ <cd:command name="doifelserightpagefloat" level="system" category="structure" keywords="conditional" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifrightpagefloatelse" level="system" category="structure conditional" file="strc-flt.mkvi">
+ <cd:command name="doifrightpagefloatelse" level="system" category="structure" keywords="conditional" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseoddpagefloat" level="system" category="structure conditional" file="strc-flt.mkvi">
+ <cd:command name="doifelseoddpagefloat" level="system" category="structure" keywords="conditional" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifoddpagefloatelse" level="system" category="structure conditional" file="strc-flt.mkvi">
+ <cd:command name="doifoddpagefloatelse" level="system" category="structure" keywords="conditional" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsemainfloatbody" level="system" category="structure conditional" file="strc-flt.mkvi">
+ <cd:command name="doifelsemainfloatbody" level="system" category="structure" keywords="conditional" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifmainfloatbodyelse" level="system" category="structure conditional" file="strc-flt.mkvi">
+ <cd:command name="doifmainfloatbodyelse" level="system" category="structure" keywords="conditional" file="strc-flt.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="placefigure" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placefigure" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="figuretext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistoffigures" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistoffigures" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placetable" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placetable" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tabletext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistoftables" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistoftables" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placegraphic" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placegraphic" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="graphictext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofgraphics" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofgraphics" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placeintermezzo" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placeintermezzo" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="intermezzotext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofintermezzi" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofintermezzi" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placechemical" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placechemical" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofchemicals" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofchemicals" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="setuplocalfloats" level="style" category="structure" file="strc-flt.mkvi">
<cd:arguments>
<cd:assignments list="yes">
@@ -914,7 +743,7 @@
<cd:command name="forcelocalfloats" level="system" category="structure" file="strc-flt.mkvi"/>
- <cd:command name="setupfloatsplitting" level="style" category="structure counter" file="tabl-tsp.mkiv">
+ <cd:command name="setupfloatsplitting" level="style" category="structure" keywords="counter" file="tabl-tsp.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="before">
@@ -947,7 +776,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotinsidesplitfloat" level="system" category="structure conditional" file="tabl-tsp.mkiv">
+ <cd:command name="doifnotinsidesplitfloat" level="system" category="structure" keywords="conditional" file="tabl-tsp.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
</cd:arguments>
@@ -999,6 +828,11 @@
<cd:parameter name="color">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="width">
+ <cd:constant type="fit" default="yes"/>
+ <cd:constant type="frame"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:inherit name="setupframed"/>
</cd:assignments>
</cd:arguments>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-fontfamily.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-fontfamily.xml
index e20346319d2..e5683d21ab6 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-fontfamily.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-fontfamily.xml
@@ -222,4 +222,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-fonts.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-fonts.xml
index 721bfca6313..a32aa1672e4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-fonts.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-fonts.xml
@@ -210,6 +210,7 @@
</cd:parameter>
<cd:parameter name="dimensions">
<cd:constant type="cd:number"/>
+ <cd:constant type="strut"/>
</cd:parameter>
<cd:parameter name="boundingbox">
<cd:constant type="yes"/>
@@ -291,7 +292,11 @@
<cd:constant type="yes" default="yes"/>
<cd:constant type="no"/>
</cd:parameter>
- <cd:parameter name="cd:name">
+ <cd:parameter name="uppercasing">
+ <cd:constant type="yes"/>
+ <cd:constant type="no" default="yes"/>
+ </cd:parameter>
+ <cd:parameter name="lowercasing">
<cd:constant type="yes"/>
<cd:constant type="no" default="yes"/>
</cd:parameter>
@@ -302,6 +307,13 @@
<cd:constant type="yes"/>
<cd:constant type="no" default="yes"/>
</cd:parameter>
+ <cd:parameter name="metapost">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="cd:name">
+ <cd:constant type="yes"/>
+ <cd:constant type="no" default="yes"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -322,7 +334,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="addfeature" category="fonts" level="style" file="font-fea.mkvi">
+ <cd:command name="addfeature" level="style" category="fonts" file="font-fea.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
@@ -422,14 +434,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsecurrentfonthasfeature" level="system" category="fonts conditional" file="font-fea.mkvi">
+ <cd:command name="doifelsecurrentfonthasfeature" level="system" category="fonts" keywords="conditional" file="font-fea.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifcurrentfonthasfeatureelse" level="system" category="fonts conditional" file="font-fea.mkvi">
+ <cd:command name="doifcurrentfonthasfeatureelse" level="system" category="fonts" keywords="conditional" file="font-fea.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -437,14 +449,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefontfeature" level="system" category="fonts conditional" file="font-fea.mkvi">
+ <cd:command name="doifelsefontfeature" level="system" category="fonts" keywords="conditional" file="font-fea.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doiffontfeatureelse" level="system" category="fonts conditional" file="font-fea.mkvi">
+ <cd:command name="doiffontfeatureelse" level="system" category="fonts" keywords="conditional" file="font-fea.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -452,7 +464,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifunknownfontfeature" level="system" category="fonts conditional" file="font-fea.mkvi">
+ <cd:command name="doifunknownfontfeature" level="system" category="fonts" keywords="conditional" file="font-fea.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -557,7 +569,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefontsynonym" level="system" category="fonts conditional" file="font-fil.mkvi">
+ <cd:command name="doifelsefontsynonym" level="system" category="fonts" keywords="conditional" file="font-fil.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -565,7 +577,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffontsynonymelse" level="system" category="fonts conditional" file="font-fil.mkvi">
+ <cd:command name="doiffontsynonymelse" level="system" category="fonts" keywords="conditional" file="font-fil.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -745,22 +757,18 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="setupbodyfontenvironment" level="style" category="fonts" file="font-ini.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:keywords>
- <cd:constant type="default"/>
- <cd:constant type="cd:dimension"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="definebodyfontenvironment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
+ <cd:command name="setupbodyfontenvironment" level="style" category="fonts" file="font-ini.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:keywords>
+ <cd:constant type="default"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:keywords>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="definebodyfontenvironment"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
<cd:command name="processbodyfontenvironmentlist" level="system" category="fonts" file="font-fil.mkvi">
<cd:arguments>
@@ -1119,6 +1127,12 @@
<cd:command name="setsuperiors" level="style" category="fonts" file="font-pre.mkiv"/>
+ <cd:command name="setfractions" level="style" category="fonts" file="font-pre.mkiv"/>
+
+ <cd:command name="uppercasing" level="style" category="fonts" file="font-pre.mkiv"/>
+
+ <cd:command name="lowercasing" level="style" category="fonts" file="font-pre.mkiv"/>
+
<cd:command name="tinyfont" level="style" category="fonts" file="font-pre.mkiv"/>
<cd:command name="infofont" level="style" category="fonts" file="font-pre.mkiv"/>
@@ -1139,8 +1153,6 @@
<cd:command name="mono" level="document" category="fonts" file="font-pre.mkiv"/>
- <cd:command name="monobold" level="document" category="fonts" file="font-pre.mkiv"/>
-
<cd:command name="slanted" level="document" category="fonts" file="font-pre.mkiv"/>
<cd:command name="italic" level="document" category="fonts" file="font-pre.mkiv"/>
@@ -1403,14 +1415,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseitalic" level="system" category="fonts conditional" file="font-sym.mkvi">
+ <cd:command name="doifelseitalic" level="system" category="fonts" keywords="conditional" file="font-sym.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifitalicelse" level="system" category="fonts conditional" file="font-sym.mkvi">
+ <cd:command name="doifitalicelse" level="system" category="fonts" keywords="conditional" file="font-sym.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
@@ -1489,7 +1501,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefontchar" level="system" category="fonts conditional" file="font-sym.mkvi">
+ <cd:command name="doifelsefontchar" level="system" category="fonts" keywords="conditional" file="font-sym.mkvi">
<cd:arguments>
<cd:resolve name="argument-font"/>
<cd:resolve name="argument-number"/>
@@ -1498,7 +1510,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffontcharelse" level="system" category="fonts conditional" file="font-sym.mkvi">
+ <cd:command name="doiffontcharelse" level="system" category="fonts" keywords="conditional" file="font-sym.mkvi">
<cd:arguments>
<cd:resolve name="argument-font"/>
<cd:resolve name="argument-number"/>
@@ -1515,7 +1527,7 @@
<cd:command name="showfontdata" level="document" category="fonts" file="font-tra.mkiv"/>
- <cd:command name="doifelsefontpresent" level="system" category="fonts conditional" file="font-tra.mkiv">
+ <cd:command name="doifelsefontpresent" level="system" category="fonts" keywords="conditional" file="font-tra.mkiv">
<cd:arguments>
<cd:resolve name="argument-font"/>
<cd:resolve name="argument-true"/>
@@ -1523,7 +1535,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffontpresentelse" level="system" category="fonts conditional" file="font-tra.mkiv">
+ <cd:command name="doiffontpresentelse" level="system" category="fonts" keywords="conditional" file="font-tra.mkiv">
<cd:arguments>
<cd:resolve name="argument-font"/>
<cd:resolve name="argument-true"/>
@@ -1748,11 +1760,36 @@
</cd:arguments>
</cd:command>
- <!-- question for ws: maybe move to i-file with ... level="system" category="structure" ... -->
+ <cd:command name="defineexpansion" level="style" category="fonts" file="hand-ini.mkx">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupexpansion"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setupexpansion" level="style" category="fonts" file="hand-ini.mkx">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
+ <cd:assignments list="yes">
+ <cd:parameter name="step">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="stretch">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="shrink">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
- <cd:command name="addfontpath" level="style" category="fonts" file="font-ini.mkvi">
+ <cd:command name="setexpansion" level="style" category="fonts" file="font-ini.mkvi">
<cd:arguments>
- <cd:resolve name="keyword-path-list"/>
+ <cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-form.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-form.xml
index fcb4979d02b..fac86741202 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-form.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-form.xml
@@ -20,4 +20,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-formula.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-formula.xml
index 72693fb6cc7..2530275c343 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-formula.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-formula.xml
@@ -207,34 +207,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="spformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="sdformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mpformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mdformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="defineformulaalternative" level="system" category="mathematics" file="strc-mat.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-fraction.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-fraction.xml
index 33252dde2d0..6e6a9103012 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-fraction.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-fraction.xml
@@ -45,6 +45,7 @@
<cd:constant type="yes"/>
<cd:constant type="no"/>
<cd:constant type="auto" default="yes"/>
+ <cd:constant type="hidden"/>
</cd:parameter>
<cd:parameter name="left">
<cd:constant type="cd:number"/>
@@ -100,73 +101,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="frac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xxfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="sfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="dfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="binom" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="dbinom" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tbinom" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="splitfrac" level="document" category="mathematics" file="math-frc.mkiv">
<cd:arguments>
<cd:content/>
@@ -202,4 +136,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-framed.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-framed.xml
index 5e96ba80d2e..ad8080a9d47 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-framed.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-framed.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineframed" level="style" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="defineframed" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupframed" level="style" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="setupframed" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -103,6 +103,9 @@
<cd:constant type="frame"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="backgroundcolor">
+ <cd:resolve name="cd:color"/>
+ </cd:parameter>
<cd:parameter name="component">
<cd:constant type="cd:name"/>
</cd:parameter>
@@ -225,23 +228,36 @@
<cd:constant type="cd:color"/>
</cd:parameter>
-->
+ <cd:parameter name="anchoring">
+ <cd:resolve name="value-orientation"/>
+ </cd:parameter>
+ <cd:parameter name="xanchor">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="yanchor">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="linedirection">
+ <cd:constant type="normal" default="yes"/>
+ <cd:constant type="reverse"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command name="frameddimension" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="frameddimension" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="framedparameter" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="framedparameter" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="framed" level="document" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="framed" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -250,7 +266,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="framed" generated="yes" variant="instance" level="document" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="framed" generated="yes" variant="instance" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:sequence>
<cd:instance value="framed"/>
</cd:sequence>
@@ -265,7 +281,7 @@
</cd:instances>
</cd:command>
- <cd:command name="normalframedwithsettings" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="normalframedwithsettings" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupframed"/>
@@ -274,7 +290,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="framed" type="environment" level="document" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="framed" type="environment" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -283,7 +299,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fastlocalframed" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="fastlocalframed" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -293,7 +309,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="localframed" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="localframed" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -303,14 +319,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="directlocalframed" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="directlocalframed" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="localframedwithsettings" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="localframedwithsettings" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -320,7 +336,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="placeframed" level="document" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="placeframed" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -330,7 +346,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="inframed" level="document" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="inframed" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -339,20 +355,7 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="unframed" level="document" category="background rules" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="definemathframed" level="style" category="background rules mathematics" file="pack-rul.mkiv">
+ <cd:command name="definemathframed" level="style" category="rules" keywords="background mathematics" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -362,7 +365,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmathframed" level="style" category="background rules mathematics" file="pack-rul.mkiv">
+ <cd:command name="setupmathframed" level="style" category="rules" keywords="background mathematics" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -371,7 +374,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="mathframed" generated="yes" variant="instance" level="document" category="background rules mathematics" file="pack-rul.mkiv">
+ <cd:command name="mathframed" generated="yes" variant="instance" level="document" category="rules" keywords="background mathematics" file="pack-rul.mkiv">
<cd:sequence>
<cd:instance value="mathframed"/>
</cd:sequence>
@@ -386,38 +389,7 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mframed" level="document" category="background rules mathematics" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inmframed" level="document" category="background rules mathematics" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mcframed" level="document" category="background rules mathematics" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="defineformulaframed" level="style" category="background rules mathematics" file="math-for.mkiv">
+ <cd:command name="defineformulaframed" level="style" category="rules" keywords="background mathematics" file="math-for.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -427,7 +399,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupformulaframed" level="style" category="background rules mathematics" file="math-for.mkiv">
+ <cd:command name="setupformulaframed" level="style" category="rules" keywords="background mathematics" file="math-for.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -436,7 +408,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="defineframedtext" level="style" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="defineframedtext" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -446,7 +418,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupframedtext" level="style" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="setupframedtext" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -487,7 +459,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupframedtexts" level="style" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="setupframedtexts" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -496,7 +468,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="framedtext" generated="yes" variant="instance" level="document" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="framedtext" generated="yes" variant="instance" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:sequence>
<cd:instance value="framedtext"/>
</cd:sequence>
@@ -511,7 +483,7 @@
</cd:instances>
</cd:command>
- <cd:command name="framedtext" type="environment" generated="yes" variant="instance" level="document" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="framedtext" type="environment" generated="yes" variant="instance" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:sequence>
<cd:instance value="framedtext"/>
</cd:sequence>
@@ -531,34 +503,7 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="framedtext" level="document" category="background rules" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupframedtext"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="framedtext" type="environment" level="document" category="background rules" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:keywords optional="yes">
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant type="middle"/>
- <cd:constant type="none"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupframedtext"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="defineframedcontent" level="style" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="defineframedcontent" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -568,7 +513,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupframedcontent" level="style" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="setupframedcontent" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -599,7 +544,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="framedcontent" type="environment" level="system" category="background rules" file="pack-rul.mkiv">
+ <cd:command name="framedcontent" type="environment" level="system" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:name"/>
@@ -608,35 +553,35 @@
</cd:arguments>
</cd:command>
- <cd:command name="installleftframerenderer" level="system" category="background rules" file="pack-fen.mkiv">
+ <cd:command name="installleftframerenderer" level="system" category="rules" keywords="background" file="pack-fen.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="installrightframerenderer" level="system" category="background rules" file="pack-fen.mkiv">
+ <cd:command name="installrightframerenderer" level="system" category="rules" keywords="background" file="pack-fen.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="installtopframerenderer" level="system" category="background rules" file="pack-fen.mkiv">
+ <cd:command name="installtopframerenderer" level="system" category="rules" keywords="background" file="pack-fen.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="installbottomframerenderer" level="system" category="background rules" file="pack-fen.mkiv">
+ <cd:command name="installbottomframerenderer" level="system" category="rules" keywords="background" file="pack-fen.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseframed" level="system" category="background rules">
+ <cd:command name="doifelseframed" level="system" category="rules" keywords="background conditional" file="pack-rul.mkxl">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-true"/>
@@ -644,4 +589,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-framedtable.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-framedtable.xml
index 51699b5bc4d..4bea7ab9e5c 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-framedtable.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-framedtable.xml
@@ -4,14 +4,14 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineframedtable" level="style" category="tables" file="tabl-frm.mkiv">
+ <cd:command name="defineframedtable" level="style" category="tables" keywords="background rules" file="tabl-frm.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupframedtable" level="style" category="tables" file="tabl-frm.mkiv">
+ <cd:command name="setupframedtable" level="style" category="tables" keywords="background rules" file="tabl-frm.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes">
@@ -32,7 +32,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupframedtablerow" level="style" category="tables" file="tabl-frm.mkiv">
+ <cd:command name="setupframedtablerow" level="style" category="tables" keywords="background rules" file="tabl-frm.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:keywords>
@@ -45,7 +45,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupframedtablecolumn" level="style" category="tables" file="tabl-frm.mkiv">
+ <cd:command name="setupframedtablecolumn" level="style" category="tables" keywords="background rules" file="tabl-frm.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:keywords>
@@ -58,7 +58,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="framedtable" type="environment" level="document" category="tables" file="tabl-frm.mkiv">
+ <cd:command name="framedtable" type="environment" level="document" category="tables" keywords="background rules" file="tabl-frm.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -67,7 +67,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="framedrow" type="environment" level="document" category="tables" file="tabl-frm.mkiv">
+ <cd:command name="framedrow" type="environment" level="document" category="tables" keywords="background rules" file="tabl-frm.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -75,7 +75,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="framedcell" type="environment" level="document" category="tables" file="tabl-frm.mkiv">
+ <cd:command name="framedcell" type="environment" level="document" category="tables" keywords="background rules" file="tabl-frm.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupframed"/>
@@ -83,4 +83,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-graphics.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-graphics.xml
index 924616474af..518706f35cb 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-graphics.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-graphics.xml
@@ -85,6 +85,11 @@
<cd:parameter name="color">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="cmyk">
+ <cd:constant type="yes"/>
+ <cd:constant type="no" default="yes"/>
+ <cd:constant type="auto"/>
+ </cd:parameter>
<cd:parameter name="arguments">
<cd:constant type="cd:text"/>
</cd:parameter>
@@ -250,18 +255,14 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="setupexternalfigures" level="style" category="graphics" file="grph-inc.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-name-list-optional"/>
- <cd:assignments list="yes">
- <cd:inherit name="setupexternalfigure"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
+ <cd:command name="setupexternalfigures" level="style" category="graphics" file="grph-inc.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
+ <cd:assignments list="yes">
+ <cd:inherit name="setupexternalfigure"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
<cd:command name="useexternalfigure" level="style" category="graphics" file="grph-inc.mkiv">
<cd:arguments>
@@ -318,7 +319,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefigure" level="system" category="graphics conditional" file="grph-inc.mkiv">
+ <cd:command name="doifelsefigure" level="system" category="graphics" keywords="conditional" file="grph-inc.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -326,7 +327,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffigureelse" level="system" category="graphics conditional" file="grph-inc.mkiv">
+ <cd:command name="doiffigureelse" level="system" category="graphics" keywords="conditional" file="grph-inc.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -478,7 +479,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="typesetbuffer" level="document" category="graphics buffer" file="grph-fig.mkiv">
+ <cd:command name="typesetbuffer" level="document" category="graphics" keywords="buffer" file="grph-fig.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="*"/>
@@ -490,7 +491,16 @@
</cd:arguments>
</cd:command>
- <cd:command name="definetypesetting" level="style" category="graphics structure" file="grph-fig.mkiv">
+ <cd:command name="typesetbufferonly" level="document" category="graphics" keywords="buffer" file="grph-fig.mkiv">
+ <cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="*"/>
+ <cd:constant type="cd:buffer"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="definetypesetting" level="style" category="graphics" keywords="structure" file="grph-fig.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-text-optional"/>
@@ -500,7 +510,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="typesetfile" level="document" category="graphics structure" file="grph-fig.mkiv">
+ <cd:command name="typesetfile" level="document" category="graphics" keywords="structure" file="grph-fig.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:name"/>
@@ -546,4 +556,26 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="includesvgfile" level="document" category="graphics" file="grph-inc.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-file"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:parameter name="offset">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="includesvgbuffer" level="document" category="graphics" file="grph-inc.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-buffer"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:parameter name="offset">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-help.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-help.xml
index 6e8612c5a53..ea8f0bc9481 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-help.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-help.xml
@@ -49,14 +49,14 @@
</cd:instances>
</cd:command>
- <cd:command name="doifelsehelp" level="system" category="pdf conditional" file="scrn-hlp.mkvi">
+ <cd:command name="doifelsehelp" level="system" category="pdf" keywords="conditional" file="scrn-hlp.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifhelpelse" level="system" category="pdf conditional" file="scrn-hlp.mkvi">
+ <cd:command name="doifhelpelse" level="system" category="pdf" keywords="conditional" file="scrn-hlp.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
@@ -86,4 +86,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-hemistich.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-hemistich.xml
index a508c51f857..0fbe5e86302 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-hemistich.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-hemistich.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definehemistich" level="style" category="whitespace fonts" file="m-hemistich.mkiv">
+ <cd:command name="definehemistich" level="style" category="whitespace" keywords="fonts" file="m-hemistich.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuphemistich" level="style" category="whitespace fonts" file="m-hemistich.mkiv">
+ <cd:command name="setuphemistich" level="style" category="whitespace" keywords="fonts" file="m-hemistich.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -50,7 +50,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="hemistiches" level="document" category="whitespace fonts" file="m-hemistich.mkiv">
+ <cd:command name="hemistiches" level="document" category="whitespace" keywords="fonts" file="m-hemistich.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="argument-text"/>
@@ -58,7 +58,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="hemistiches" variant="assignment" level="document" category="whitespace fonts" file="m-hemistich.mkiv">
+ <cd:command name="hemistiches" variant="assignment" level="document" category="whitespace" keywords="fonts" file="m-hemistich.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setuphemistich"/>
@@ -68,7 +68,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="hemistich" generated="yes" variant="instance" level="document" category="whitespace fonts" file="m-hemistich.mkiv">
+ <cd:command name="hemistich" generated="yes" variant="instance" level="document" category="whitespace" keywords="fonts" file="m-hemistich.mkiv">
<cd:sequence>
<cd:instance value="hemistich"/>
</cd:sequence>
@@ -78,7 +78,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="hemistichescaesura" level="document" category="whitespace fonts" file="m-hemistich.mkiv">
+ <cd:command name="hemistichescaesura" level="document" category="whitespace" keywords="fonts" file="m-hemistich.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:keywords delimiters="braces">
@@ -89,4 +89,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-highlight.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-highlight.xml
index 9da39818ee2..46b53e24c25 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-highlight.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-highlight.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definehighlight" level="style" category="fonts colors" file="core-sys.mkiv">
+ <cd:command name="definehighlight" level="style" category="fonts" keywords="colors" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuphighlight" level="style" category="fonts colors" file="core-sys.mkiv">
+ <cd:command name="setuphighlight" level="style" category="fonts" keywords="colors" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -32,7 +32,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="highlight" generated="yes" variant="example" level="document" category="fonts colors" file="core-sys.mkiv">
+ <cd:command name="highlight" generated="yes" variant="example" level="document" category="fonts" keywords="colors" file="core-sys.mkiv">
<cd:sequence>
<cd:variable value="highlight"/>
</cd:sequence>
@@ -41,24 +41,24 @@
</cd:arguments>
</cd:command>
- <cd:command name="highlight" level="document" category="fonts colors" file="core-sys.mkiv">
+ <cd:command name="highlight" level="document" category="fonts" keywords="colors" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="highlight" type="environment" level="document" category="fonts colors" file="core-sys.mkiv">
+ <cd:command name="highlight" type="environment" level="document" category="fonts" keywords="colors" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="directhighlight" level="document" category="fonts colors" file="core-sys.mkiv">
+ <cd:command name="directhighlight" level="document" category="fonts" keywords="colors" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-hspace.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-hspace.xml
index 31c21586487..222317468c4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-hspace.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-hspace.xml
@@ -87,8 +87,6 @@
<cd:command name="removeunwantedspaces" level="system" category="whitespace" file="spac-hor.mkiv"/>
- <cd:command name="thinspace" level="style" category="whitespace" file="spac-hor.mkiv"/>
-
<cd:command name="negthinspace" level="style" category="whitespace" file="spac-hor.mkiv"/>
<cd:command name="enspace" level="style" category="whitespace" file="spac-hor.mkiv"/>
@@ -111,11 +109,11 @@
</cd:arguments>
</cd:command>
- <cd:command name="leftskipadaption" level="system" category="whitespace layout" file="spac-hor.mkiv"/>
+ <cd:command name="leftskipadaption" level="system" category="whitespace" keywords="layout" file="spac-hor.mkxl"/>
- <cd:command name="rightskipadaption" level="system" category="whitespace layout" file="spac-hor.mkiv"/>
+ <cd:command name="rightskipadaption" level="system" category="whitespace" keywords="layout" file="spac-hor.mkxl"/>
- <cd:command name="dosetleftskipadaption" level="system" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="dosetleftskipadaption" level="system" category="whitespace" keywords="layout" file="spac-hor.mkxl">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:resolve name="value-leftskip"/>
@@ -123,7 +121,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dosetrightskipadaption" level="system" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="dosetrightskipadaption" level="system" category="whitespace" keywords="layout" file="spac-hor.mkxl">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:resolve name="value-rightskip"/>
@@ -131,7 +129,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doadaptleftskip" level="system" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="doadaptleftskip" level="system" category="whitespace" keywords="layout" file="spac-hor.mkxl">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:resolve name="value-leftskip"/>
@@ -139,7 +137,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doadaptrightskip" level="system" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="doadaptrightskip" level="system" category="whitespace" keywords="layout" file="spac-hor.mkxl">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:resolve name="value-rightskip"/>
@@ -147,7 +145,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="activatespacehandler" level="system" category="whitespace" file="spac-hor.mkiv">
+ <cd:command name="activatespacehandler" level="system" category="whitespace" file="spac-hor.mkxl">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="on"/>
@@ -161,10 +159,32 @@
</cd:arguments>
</cd:command>
- <cd:command name="quads" level="style" category="whitespace" file="spac-hor.mkiv">
+ <cd:command name="quads" level="style" category="whitespace" file="spac-hor.mkxl">
<cd:arguments>
<cd:resolve name="keyword-number-optional"/>
</cd:arguments>
</cd:command>
+ <cd:command name="interwordspacebefore" level="system" category="whitespace" file="spac-hor.mkxl"/>
+
+ <cd:command name="interwordspaceafter" level="system" category="whitespace" file="spac-hor.mkxl"/>
+
+ <cd:command name="interwordspacesbefore" level="system" category="whitespace" file="spac-hor.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="interwordspacesafter" level="system" category="whitespace" file="spac-hor.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="interwordspaces" level="system" category="whitespace" file="spac-hor.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-hyphenation.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-hyphenation.xml
index 75cdbae7529..19a91072b7f 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-hyphenation.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-hyphenation.xml
@@ -34,7 +34,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="definehypenationfeatures" level="style" category="language" file="lang-hyp.mkiv">
+ <cd:command name="definehyphenationfeatures" level="style" category="language" file="lang-hyp.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -261,4 +261,16 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="dohyphens" level="style" category="language" file="lang-ini.mkxl"/>
+
+ <cd:command name="nohyphens" level="style" category="language" file="lang-ini.mkxl"/>
+
+ <cd:command name="usehyphensparameter" level="system" category="language" file="lang-ini.mkxl">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="compounddiscretionary" level="system" category="language" file="lang-mis.mkxl"/>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-imposition.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-imposition.xml
index 98fdcf25310..ad05424ce08 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-imposition.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-imposition.xml
@@ -11,7 +11,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="invokepageheandler" level="system" category="layout" file="page-imp.mkiv">
+ <cd:command name="invokepagehandler" level="system" category="layout" file="page-imp.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="normal"/>
@@ -79,4 +79,4 @@
<cd:command name="arrangedpages" type="environment" begin="push" end="pop" level="system" category="layout" file="page-imp.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-indent.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-indent.xml
index ed91b9193b0..0117cbb10cc 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-indent.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-indent.xml
@@ -88,4 +88,11 @@
<cd:command name="indentation" type="environment" begin="push" end="pop" level="system" category="whitespace" file="spac-hor.mkiv"/>
+ <cd:command name="doifelseindented" level="system" category="whitespace" keywords="conditional" file="supp-box.lua">
+ <cd:arguments>
+ <cd:resolve name="argument-true"/>
+ <cd:resolve name="argument-false"/>
+ </cd:arguments>
+ </cd:command>
+
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-indentedtext.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-indentedtext.xml
index 8d19c321f99..4921115a5a3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-indentedtext.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-indentedtext.xml
@@ -69,4 +69,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-injector.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-injector.xml
index 3728d7bb863..2ba2a5da24e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-injector.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-injector.xml
@@ -70,4 +70,4 @@
-->
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-insertion.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-insertion.xml
index c8c4ed7217a..d3398614b1e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-insertion.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-insertion.xml
@@ -29,7 +29,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseinsertion" level="system" category="structure conditional" file="page-ins.mkiv">
+ <cd:command name="doifelseinsertion" level="system" category="structure" keywords="conditional" file="page-ins.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -37,7 +37,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinsertionelse" level="system" category="structure conditional" file="page-ins.mkiv">
+ <cd:command name="doifinsertionelse" level="system" category="structure" keywords="conditional" file="page-ins.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -45,4 +45,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-interaction.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-interaction.xml
index 2496e5d9451..14151a4d407 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-interaction.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-interaction.xml
@@ -143,18 +143,18 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelselocation" level="system" category="pdf conditional" file="scrn-ini.mkvi">
+ <cd:command name="doifelselocation" level="system" category="pdf" keywords="conditional" file="scrn-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doiflocationelse" level="system" category="pdf conditional" file="scrn-ini.mkvi">
+ <cd:command name="doiflocationelse" level="system" category="pdf" keywords="conditional" file="scrn-ini.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-interactionbar.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-interactionbar.xml
index e03d2a0719c..8981c6e2b37 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-interactionbar.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-interactionbar.xml
@@ -97,4 +97,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-interactionmenu.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-interactionmenu.xml
index 32fac36f9c7..26b7eabe81d 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-interactionmenu.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-interactionmenu.xml
@@ -277,4 +277,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-interface.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-interface.xml
index 66b48535e46..6434eb61d2a 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-interface.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-interface.xml
@@ -4,13 +4,13 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defaultinterface" level="system" file="mult-ini.mkiv"/>
+ <cd:command name="defaultinterface" level="system" category="interface" file="mult-ini.mkiv"/>
- <cd:command name="currentinterface" level="system" file="mult-ini.mkiv"/>
+ <cd:command name="currentinterface" level="system" category="interface" file="mult-ini.mkiv"/>
- <cd:command name="currentresponses" level="system" file="mult-ini.mkiv"/>
+ <cd:command name="currentresponses" level="system" category="interface" file="mult-ini.mkiv"/>
- <cd:command name="interface" type="environment" level="system" file="mult-ini.mkiv">
+ <cd:command name="interface" type="environment" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="all"/>
@@ -19,53 +19,53 @@
</cd:arguments>
</cd:command>
- <cd:command name="defineinterfaceconstant" level="system" file="mult-ini.mkiv">
+ <cd:command name="defineinterfaceconstant" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="defineinterfacevariable" level="system" file="mult-ini.mkiv">
+ <cd:command name="defineinterfacevariable" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="defineinterfaceelement" level="system" file="mult-ini.mkiv">
+ <cd:command name="defineinterfaceelement" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="definefileconstant" level="system" file="mult-ini.mkiv">
+ <cd:command name="definefileconstant" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="definesystemconstant" level="system" file="mult-ini.mkiv">
+ <cd:command name="definesystemconstant" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="definemessageconstant" level="system" file="mult-ini.mkiv">
+ <cd:command name="definemessageconstant" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="definesystemvariable" level="system" file="mult-ini.mkiv">
+ <cd:command name="definesystemvariable" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setinterfacemessage" level="system" file="mult-ini.mkiv">
+ <cd:command name="setinterfacemessage" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -77,7 +77,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setmessagetext" level="system" file="mult-ini.mkiv">
+ <cd:command name="setmessagetext" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -87,9 +87,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="currentmessagetext" level="system" file="mult-ini.mkiv"/>
+ <cd:command name="currentmessagetext" level="system" category="tracker" file="mult-ini.mkiv"/>
- <cd:command name="getmessage" level="system" file="mult-ini.mkiv">
+ <cd:command name="getmessage" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -99,7 +99,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsemessage" level="system" file="mult-ini.mkiv">
+ <cd:command name="doifelsemessage" level="system" category="tracker" keywords="conditional" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -111,7 +111,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifmessageelse" level="system" file="mult-ini.mkiv">
+ <cd:command name="doifmessageelse" level="system" category="tracker" keywords="conditional" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -123,7 +123,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="showmessage" level="system" file="mult-ini.mkiv">
+ <cd:command name="showmessage" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -134,32 +134,32 @@
</cd:arguments>
</cd:command>
- <cd:command name="writestatus" level="system" file="mult-ini.mkiv">
+ <cd:command name="writestatus" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="message" level="system" file="mult-ini.mkiv">
+ <cd:command name="message" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="inlinemessage" level="system" file="mult-ini.mkiv">
+ <cd:command name="inlinemessage" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="displaymessage" level="system" file="mult-ini.mkiv">
+ <cd:command name="displaymessage" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="showwarning" level="system" file="mult-ini.mkiv">
+ <cd:command name="showwarning" level="system" category="tracker" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -170,33 +170,32 @@
</cd:arguments>
</cd:command>
- <cd:command name="setinterfaceconstant" level="system" file="mult-ini.mkiv">
+ <cd:command name="setinterfaceconstant" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setinterfacevariable" level="system" file="mult-ini.mkiv">
+ <cd:command name="setinterfacevariable" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setinterfaceelement" level="system" file="mult-ini.mkiv">
+ <cd:command name="setinterfaceelement" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setinterfacecommand" level="system" file="mult-ini.mkiv">
+ <cd:command name="setinterfacecommand" level="system" category="interface" file="mult-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-interlinespace.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-interlinespace.xml
index 94911afb9d5..e0fbe0dca15 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-interlinespace.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-interlinespace.xml
@@ -173,4 +173,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-ipsum.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-ipsum.xml
index b3fb7cfdd48..83dc8f0d09d 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-ipsum.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-ipsum.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineipsum" level="style" file="m-ipsum.mkiv">
+ <cd:command name="defineipsum" level="style" category="language" file="m-ipsum.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupipsum" level="style" file="m-ipsum.mkiv">
+ <cd:command name="setupipsum" level="style" category="language" file="m-ipsum.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -63,7 +63,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="ipsum" level="document" file="m-ipsum.mkiv">
+ <cd:command name="ipsum" level="document" category="language" file="m-ipsum.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -72,10 +72,10 @@
</cd:arguments>
</cd:command>
- <cd:command name="directipsum" level="document" file="m-ipsum.mkiv">
+ <cd:command name="directipsum" level="document" category="language" file="m-ipsum.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-italiccorrection.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-italiccorrection.xml
index 2d406bdf5a6..4522634fcaf 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-italiccorrection.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-italiccorrection.xml
@@ -29,4 +29,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-itemgroup.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-itemgroup.xml
index a3271d12f72..81fc3ba5a8f 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-itemgroup.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-itemgroup.xml
@@ -163,6 +163,8 @@
<cd:parameter name="placestopper">
<cd:constant type="yes" default="yes"/>
<cd:constant type="no"/>
+ <cd:constant type="display"/>
+ <cd:constant type="inline"/>
</cd:parameter>
<cd:parameter name="style">
<cd:resolve name="value-style"/>
@@ -194,7 +196,7 @@
<cd:parameter name="packcriterium">
<cd:constant type="cd:number"/>
</cd:parameter>
- <cd:inherit name="setupcounter"/>
+ <cd:inherit name="setupcounter"/>
</cd:assignments>
</cd:define>
@@ -254,6 +256,7 @@
<cd:constant type="inmargin"/>
<cd:constant type="atmargin"/>
<cd:constant type="intext"/>
+ <cd:constant type="headintext"/>
<cd:constant type="loose"/>
<cd:constant type="fit"/>
<cd:constant type="nofit"/>
@@ -352,6 +355,8 @@
<cd:parameter name="placestopper">
<cd:constant type="yes" default="yes"/>
<cd:constant type="no"/>
+ <cd:constant type="display"/>
+ <cd:constant type="inline"/>
</cd:parameter>
<cd:parameter name="style">
<cd:resolve name="value-style"/>
@@ -380,7 +385,10 @@
<cd:parameter name="grid">
<cd:inherit name="definegridsnapping"/>
</cd:parameter>
- <cd:inherit name="setupcounter"/>
+ <cd:parameter name="packcriterium">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:inherit name="setupcounter"/>
</cd:assignments>
</cd:define>
@@ -394,7 +402,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupitemgroup" level="style" category="structure counter" file="strc-itm.mkvi">
+ <cd:command name="setupitemgroup" level="style" category="structure" keywords="counter" file="strc-itm.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes" optional="yes">
@@ -406,7 +414,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupitemgroup" variant="assignment" level="style" category="structure counter" file="strc-itm.mkvi">
+ <cd:command name="setupitemgroup" variant="assignment" level="style" category="structure" keywords="counter" file="strc-itm.mkvi">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -416,7 +424,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupitemgroups" level="style" category="structure counter" file="strc-itm.mkvi">
+ <cd:command name="setupitemgroups" level="style" category="structure" keywords="counter" file="strc-itm.mkvi">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -426,7 +434,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupitemgroup" generated="yes" variant="instance" level="style" category="structure counter" file="strc-itm.mkvi">
+ <cd:command name="setupitemgroup" generated="yes" variant="instance" level="style" category="structure" keywords="counter" file="strc-itm.mkvi">
<cd:sequence>
<cd:string value="setup"/>
<cd:instance value="itemgroup"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-items.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-items.xml
index ab50b669d46..6ff396bed8e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-items.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-items.xml
@@ -82,4 +82,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-javascript.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-javascript.xml
index e97c5109c8f..1c3f11f63a4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-javascript.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-javascript.xml
@@ -48,4 +48,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-kerning.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-kerning.xml
index 64a2513b960..af7ca0474e9 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-kerning.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-kerning.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definecharacterkerning" level="style" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="definecharacterkerning" level="style" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupcharacterkerning" level="style" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="setupcharacterkerning" level="style" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -38,7 +38,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setcharacterkerning" level="style" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="setcharacterkerning" level="style" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
@@ -47,9 +47,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetcharacterkerning" level="style" category="fonts whitespace" file="typo-krn.mkiv"/>
+ <cd:command name="resetcharacterkerning" level="style" category="fonts" keywords="whitespace" file="typo-krn.mkiv"/>
- <cd:command name="characterkerning" generated="yes" variant="example" level="document" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="characterkerning" generated="yes" variant="example" level="document" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:sequence>
<cd:variable value="characterkerning"/>
</cd:sequence>
@@ -59,21 +59,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="kerncharacters" level="document" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="kerncharacters" level="document" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number-optional"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="letterspacing" level="document" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="letterspacing" level="document" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number-optional"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="stretched" level="document" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="stretched" level="document" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupstretched"/>
@@ -82,7 +82,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupstretched" level="style" category="fonts whitespace" file="typo-krn.mkiv">
+ <cd:command name="setupstretched" level="style" category="fonts" keywords="whitespace" file="typo-krn.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupcharacterkerning"/>
@@ -90,7 +90,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="defineperiodkerning" level="style" catgeory="fonts whitespace" file="typo-pnc.mkic">
+ <cd:command name="defineperiodkerning" level="style" category="fonts" keywords="whitespace" file="typo-pnc.mkic">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -100,7 +100,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupperiodkerning" level="style" catgeory="fonts whitespace" file="typo-pnc.mkic">
+ <cd:command name="setupperiodkerning" level="style" category="fonts" keywords="whitespace" file="typo-pnc.mkic">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -111,7 +111,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setperiodkerning" level="style" catgeory="fonts whitespace" file="typo-pnc.mkic">
+ <cd:command name="setperiodkerning" level="style" category="fonts" keywords="whitespace" file="typo-pnc.mkic">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
@@ -120,6 +120,6 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetperiodkerning" level="style" catgeory="fonts whitespace" file="typo-pnc.mkic"/>
+ <cd:command name="resetperiodkerning" level="style" category="fonts" keywords="whitespace" file="typo-pnc.mkic"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-label.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-label.xml
index a1d36ef4364..9faf850a54f 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-label.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-label.xml
@@ -221,4 +221,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-labeltext.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-labeltext.xml
index 7ad6b6ba824..6609f86a9a9 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-labeltext.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-labeltext.xml
@@ -135,389 +135,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setuplabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copylabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="labeltext" type="environment" flevel="style" category="language" ile="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="labellanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="labeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="labeltexts" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="leftlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="rightlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="headtext" type="environment" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="headlanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="headtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="headtexts" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="leftheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="rightheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copymathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mathlabeltext" type="environment" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mathlabellanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="mathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mathlabeltexts" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="leftmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="rightmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setuptaglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presettaglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copytaglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="taglabeltext" type="environment" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="taglabellanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="taglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupunittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetunittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyunittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="unittext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="unitlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="unittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupoperatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetoperatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyoperatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="operatortext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="operatorlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="operatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupprefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetprefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyprefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="prefixtext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="prefixlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="prefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupsuffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetsuffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copysuffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="suffixtext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="suffixlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="suffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupbtxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetbtxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copybtxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="btxlabeltext" type="environment" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="btxlabellanguage" level="system" category="language" file="publ-ini.mkiv"/>
-
- <cd:command name="btxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-language.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-language.xml
index de8835a790a..9bb92c7227c 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-language.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-language.xml
@@ -134,7 +134,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelselanguage" level="system" category="language conditional" file="lang-ini.mkiv">
+ <cd:command name="doifelselanguage" level="system" category="language" keywords="conditional" file="lang-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-language"/>
<cd:resolve name="argument-true"/>
@@ -142,7 +142,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiflanguageelse" level="system" category="language conditional" file="lang-ini.mkiv">
+ <cd:command name="doiflanguageelse" level="system" category="language" keywords="conditional" file="lang-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-language"/>
<cd:resolve name="argument-true"/>
@@ -150,7 +150,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepatterns" level="system" category="language conditional" file="lang-ini.mkiv">
+ <cd:command name="doifelsepatterns" level="system" category="language" keywords="conditional" file="lang-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-language"/>
<cd:resolve name="argument-true"/>
@@ -158,7 +158,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpatternselse" level="system" category="language conditional" file="lang-ini.mkiv">
+ <cd:command name="doifpatternselse" level="system" category="language" keywords="conditional" file="lang-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-language"/>
<cd:resolve name="argument-true"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-layer.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-layer.xml
index 77aaf7d52d2..3b1af0d00f3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-layer.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-layer.xml
@@ -283,7 +283,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelselayerdata" level="system" category="background conditional" file="pack-lyr.mkiv">
+ <cd:command name="doifelselayerdata" level="system" category="background" keywords="conditional" file="pack-lyr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -291,7 +291,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiflayerdataelse" level="system" category="background conditional" file="pack-lyr.mkiv">
+ <cd:command name="doiflayerdataelse" level="system" category="background" keywords="conditional" file="pack-lyr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -303,7 +303,7 @@
<cd:command name="layerheight" level="system" category="background" file="pack-lyr.mkiv"/>
- <cd:command name="setMPlayer" level="document" category="background metapost" file="pack-lyr.mkiv">
+ <cd:command name="setMPlayer" level="document" category="background" keywords="metapost" file="pack-lyr.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name"/>
@@ -314,7 +314,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="getMPlayer" level="document" category="background metapost" file="pack-lyr.mkiv">
+ <cd:command name="getMPlayer" level="document" category="background" keywords="metapost" file="pack-lyr.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -324,4 +324,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-layout.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-layout.xml
index 0d256e967db..b4a830f9807 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-layout.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-layout.xml
@@ -225,7 +225,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelselayoutdefined" level="system" category="layout conditional" file="page-lay.mkiv">
+ <cd:command name="doifelselayoutdefined" level="system" category="layout" keywords="conditional" file="page-lay.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -233,7 +233,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiflayoutdefinedelse" level="system" category="layout conditional" file="page-lay.mkiv">
+ <cd:command name="doiflayoutdefinedelse" level="system" category="layout" keywords="conditional" file="page-lay.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -262,21 +262,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseoddpage" level="system" category="layout conditional" file="page-lay.mkiv">
+ <cd:command name="doifelseoddpage" level="system" category="layout" keywords="conditional" file="page-lay.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifoddpageelse" level="system" category="layout conditional" file="page-lay.mkiv">
+ <cd:command name="doifoddpageelse" level="system" category="layout" keywords="conditional" file="page-lay.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifbothsidesoverruled" level="system" category="layout conditional" file="page-lay.mkiv">
+ <cd:command name="doifbothsidesoverruled" level="system" category="layout" keywords="conditional" file="page-lay.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -284,7 +284,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifbothsides" level="system" category="layout conditional" file="page-lay.mkiv">
+ <cd:command name="doifbothsides" level="system" category="layout" keywords="conditional" file="page-lay.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -292,7 +292,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="rightorleftpageaction" level="system" category="layout conditional" file="page-lay.mkiv">
+ <cd:command name="rightorleftpageaction" level="system" category="layout" keywords="conditional" file="page-lay.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -364,6 +364,7 @@
<cd:constant type="nc"/>
<cd:constant type="sp"/>
<cd:constant type="in"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
@@ -372,14 +373,14 @@
<cd:command name="spread" type="environment" level="document" category="layout" file="page-spr.mkiv"/>
- <cd:command name="doifelsetopofpage" level="system" category="layout conditional" file="page-ini.mkiv">
+ <cd:command name="doifelsetopofpage" level="system" category="layout" keywords="conditional" file="page-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doiftopofpageelse" level="system" category="layout conditional" file="page-ini.mkiv">
+ <cd:command name="doiftopofpageelse" level="system" category="layout" keywords="conditional" file="page-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-linefiller.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-linefiller.xml
index ab53e64b028..74803cbe5a3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-linefiller.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-linefiller.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definelinefiller" level="style" category="rules metapost" file="node-rul.mkiv">
+ <cd:command name="definelinefiller" level="style" category="rules" keywords="metapost" file="node-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuplinefiller" level="style" category="rules metapost" file="node-rul.mkiv">
+ <cd:command name="setuplinefiller" level="style" category="rules" keywords="metapost" file="node-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -29,9 +29,14 @@
<cd:constant type="local" default="yes"/>
<cd:constant type="global"/>
</cd:parameter>
- <cd:parameter name="color">
- <cd:constant type="cd:color"/>
+ <cd:parameter name="mp">
+ <cd:constant type="cd:name"/>
</cd:parameter>
+ <!--
+ cd:parameter name="method">
+ <cd:constant type="cd:number"/>
+ </cd:parameter
+ -->
<cd:parameter name="height">
<cd:constant type="cd:dimension"/>
</cd:parameter>
@@ -47,9 +52,15 @@
<cd:parameter name="rulethickness">
<cd:constant type="cd:dimension"/>
</cd:parameter>
- <!-- cd:parameter name="method">
- <cd:constant type="cd:number"/>
- </cd:parameter -->
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="color">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="textstyle">
<cd:resolve name="value-style"/>
</cd:parameter>
@@ -59,20 +70,11 @@
<cd:parameter name="align">
<cd:inherit name="setupalign"/>
</cd:parameter>
- <cd:parameter name="mp">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="before">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="after">
- <cd:constant type="cd:command"/>
- </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command name="setuplinefillers" level="style" category="rules metapost" file="node-rul.mkiv">
+ <cd:command name="setuplinefillers" level="style" category="rules" keywords="metapost" file="node-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -81,7 +83,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="linefiller" type="environment" level="style" category="rules metapost" file="node-rul.mkiv">
+ <cd:command name="linefiller" type="environment" level="style" category="rules" keywords="metapost" file="node-rul.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="filler"/>
@@ -93,7 +95,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setlinefiller" level="style" category="rules metapost" file="node-rul.mkiv">
+ <cd:command name="setlinefiller" level="style" category="rules" keywords="metapost" file="node-rul.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="filler"/>
@@ -102,4 +104,28 @@
</cd:arguments>
</cd:command>
+ <cd:command name="linefillerhbox" level="document" category="rules" keywords="metapost boxes" file="node-rul.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="string-boxoptions"/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="linefillervbox" level="document" category="rules" keywords="metapost boxes" file="node-rul.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="string-boxoptions"/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="linefillervtop" level="document" category="rules" keywords="metapost boxes" file="node-rul.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="string-boxoptions"/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-linenumber.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-linenumber.xml
index 3dc562e6838..9a53a42cb49 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-linenumber.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-linenumber.xml
@@ -140,7 +140,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesamelinereference" level="system" category="structure conditional" file="page-lin.mkvi">
+ <cd:command name="doifelsesamelinereference" level="system" category="structure" keywords="conditional" file="page-lin.mkvi">
<cd:arguments>
<cd:resolve name="argument-reference"/>
<cd:resolve name="argument-true"/>
@@ -148,7 +148,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsamelinereferenceelse" level="system" category="structure conditional" file="page-lin.mkvi">
+ <cd:command name="doifsamelinereferenceelse" level="system" category="structure" keywords="conditional" file="page-lin.mkvi">
<cd:arguments>
<cd:resolve name="argument-reference"/>
<cd:resolve name="argument-true"/>
@@ -169,4 +169,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-lines.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-lines.xml
index 50078627675..7b6a76565d6 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-lines.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-lines.xml
@@ -4,33 +4,39 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="noflines" level="system" file="supp-box.mkiv"/>
+ <cd:command name="noflines" level="system" category="boxes" keywords="strings" file="supp-box.mkiv"/>
- <cd:command name="getnoflines" level="system" file="supp-box.mkiv">
+ <cd:command name="getnoflines" level="system" category="boxes" keywords="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="getroundednoflines" level="system" file="supp-box.mkiv">
+ <cd:command name="getroundednoflines" level="system" category="boxes" keywords="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="getrawnoflines" level="system" file="supp-box.mkiv">
+ <cd:command name="getrawnoflines" level="system" category="boxes" keywords="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="determinenoflines" level="system" file="supp-box.mkiv">
+ <cd:command name="determinenoflines" level="system" category="boxes" keywords="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="definelines" level="style" file="spac-lin.mkiv">
+ <cd:command name="noflinesinbox" level="system" category="boxes" file="supp-box.lua">
+ <cd:arguments>
+ <cd:resolve name="string-box"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="definelines" level="style" category="structure" file="spac-lin.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -40,7 +46,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuplines" level="style" file="spac-lin.mkiv">
+ <cd:command name="setuplines" level="style" category="structure" file="spac-lin.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -84,11 +90,15 @@
<cd:parameter name="right">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="indentlist" list="yes">
+ <cd:constant type="cd:dimension"/>
+ <cd:constant type="*"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command name="lines" type="environment" generated="yes" variant="instance" level="document" file="spac-lin.mkiv">
+ <cd:command name="lines" type="environment" generated="yes" variant="instance" level="document" category="structure" file="spac-lin.mkiv">
<cd:sequence>
<cd:instance value="lines"/>
</cd:sequence>
@@ -102,22 +112,10 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="lines" type="environment" level="document" file="spac-lin.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplines"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="emptylines" level="document" file="spac-lin.mkiv">
+ <cd:command name="emptylines" level="document" category="whitespace" file="spac-lin.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number-optional"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-linetable.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-linetable.xml
index a515f40fd18..ac622472b96 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-linetable.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-linetable.xml
@@ -112,7 +112,7 @@
<cd:command name="linetablebody" type="environment" level="document" category="tables" file="tabl-ltb.mkiv"/>
- <cd:command name="processlinetablebuffer" level="document" category="tables buffer" file="tabl-ltb.mkiv">
+ <cd:command name="processlinetablebuffer" level="document" category="tables" keywords="buffer" file="tabl-ltb.mkiv">
<cd:arguments>
<cd:resolve name="keyword-buffer-optional"/>
</cd:arguments>
@@ -162,4 +162,4 @@
-->
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-linewidth.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-linewidth.xml
index 6d9043a1fae..e276572af99 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-linewidth.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-linewidth.xml
@@ -17,4 +17,4 @@
<cd:command name="linewidth" level="style" category="layout" file="pack-rul.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-list.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-list.xml
index a3ae226767e..7b207b32352 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-list.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-list.xml
@@ -101,10 +101,11 @@
<cd:parameter name="pagecommand">
<cd:constant type="cd:oneargument"/>
</cd:parameter>
- <cd:parameter name="pagenumber">
+ <cd:parameter name="pagenumber" list="yes">
<cd:constant type="yes" default="yes"/>
<cd:constant type="no"/>
<cd:constant type="always"/>
+ <cd:constant type="realpage"/>
</cd:parameter>
<cd:parameter name="headnumber">
<cd:constant type="yes" default="yes"/>
@@ -309,7 +310,7 @@
-->
- <cd:command name="doifelselist" level="system" category="structure conditional" file="strc-lst.mkvi">
+ <cd:command name="doifelselist" level="system" category="structure" keywords="conditional" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-list"/>
<cd:resolve name="argument-true"/>
@@ -317,7 +318,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiflistelse" level="system" category="structure conditional" file="strc-lst.mkvi">
+ <cd:command name="doiflistelse" level="system" category="structure" keywords="conditional" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-list"/>
<cd:resolve name="argument-true"/>
@@ -504,34 +505,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setupcontent" level="style" category="structure" file="strc-lst.mkvi">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placecontent" level="document" category="structure" file="strc-lst.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completecontent" level="document" category="structure" file="strc-lst.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="structurelistuservariable" level="style" category="structure" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-key"/>
@@ -544,28 +517,28 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsestructurelisthaspage" level="system" category="structure conditional" file="strc-lst.mkvi">
+ <cd:command name="doifelsestructurelisthaspage" level="system" category="structure" keywords="conditional" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifstructurelisthaspageelse" level="system" category="structure conditional" file="strc-lst.mkvi">
+ <cd:command name="doifstructurelisthaspageelse" level="system" category="structure" keywords="conditional" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsestructurelisthasnumber" level="system" category="structure conditional" file="strc-lst.mkvi">
+ <cd:command name="doifelsestructurelisthasnumber" level="system" category="structure" keywords="conditional" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifstructurelisthasnumberelse" level="system" category="structure conditional" file="strc-lst.mkvi">
+ <cd:command name="doifstructurelisthasnumberelse" level="system" category="structure" keywords="conditional" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
@@ -680,4 +653,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-logo.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-logo.xml
index 3208555e079..d345d76c865 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-logo.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-logo.xml
@@ -7,6 +7,11 @@
<cd:command name="TeX" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="TEX" level="document" category="symbols" file="cont-log.mkiv"/>
+ <!--
+ <cd:command name="TeXprefix" level="document" category="symbols" file="cont-log.mkiv"/>
+ <cd:command name="TeXsuffix" level="document" category="symbols" file="cont-log.mkiv"/>
+ -->
+
<cd:command name="Context" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="ConTeXt" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="CONTEXT" level="document" category="symbols" file="cont-log.mkiv"/>
@@ -23,12 +28,16 @@
<cd:command name="MKII" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="MKIV" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="MKVI" level="document" category="symbols" file="cont-log.mkiv"/>
+ <cd:command name="MKXL" level="document" category="symbols" file="cont-log.mkiv"/>
+ <cd:command name="MKLX" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="MKIX" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="MKXI" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="MPII" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="MPIV" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="MPVI" level="document" category="symbols" file="cont-log.mkiv"/>
+ <cd:command name="MPXL" level="document" category="symbols" file="cont-log.mkiv"/>
+ <cd:command name="MPLX" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="PPCHTeX" level="document" category="symbols" file="cont-log.mkiv"/>
<cd:command name="PPCHTEX" level="document" category="symbols" file="cont-log.mkiv"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-lohi.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-lohi.xml
index c174a9f5496..035c7b23b18 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-lohi.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-lohi.xml
@@ -226,4 +226,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-lua.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-lua.xml
index c7f114251be..4246225073f 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-lua.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-lua.xml
@@ -172,6 +172,13 @@
</cd:sequence>
</cd:command>
+ <cd:command name="setctxluafunction" level="system" category="lua" file="luat-ini.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
<cd:command name="ctxfunction" type="environment" level="system" category="lua" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
@@ -184,10 +191,50 @@
</cd:arguments>
</cd:command>
+ <cd:command name="installctxfunction" level="system" category="lua" file="luat-ini.mkiv">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
<cd:command name="ctxfunction" generated="yes" variant="example" level="system" category="lua" file="luat-ini.mkiv">
<cd:sequence>
<cd:variable value="ctxfunction"/>
</cd:sequence>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="installctxscanner" level="system" category="lua" file="luat-ini.mkiv">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="ctxscanner" generated="yes" variant="example" level="system" category="lua" file="luat-ini.mkiv">
+ <cd:sequence>
+ <cd:variable value="ctxscanner"/>
+ </cd:sequence>
+ </cd:command>
+
+ <cd:command name="installprotectedctxfunction" level="system" category="lua" file="luat-ini.mkiv">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="installprotectedctxscanner" level="system" category="lua" file="luat-ini.mkiv">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="resetctxscanner" level="system" category="lua" file="luat-ini.mkiv">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-luatable.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-luatable.xml
new file mode 100644
index 00000000000..a2eb74d82bc
--- /dev/null
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-luatable.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?context-directive job ctxfile x-setups.ctx ?>
+
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
+
+ <cd:command name="newluatable" level="system" category="lua" file="cldf-int.mkxl">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="useluatable" level="system" category="lua" file="cldf-int.mkxl">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="disposeluatable" level="system" category="lua" file="cldf-lmt.lua">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="inspectluatable" level="system" category="lua" file="cldf-lmt.lua">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="showluatables" level="system" category="lua" file="cldf-lmt.lua"/>
+
+ <cd:command name="setluatable" level="system" category="lua" file="cldf-lmt.lua">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="getfromluatable" level="system" category="lua" file="cldf-lmt.lua">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:key"/>
+ <cd:constant type="cd:number"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="idxfromluatable" level="system" category="lua" file="cldf-lmt.lua">
+ <cd:arguments>
+ <cd:csname/>
+ <cd:resolve name="string-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setdatavalue" level="system" category="lua" file="cldf-int.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ <cd:resolve name="argument-number"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="getdatavalue" level="system" category="lua" file="cldf-int.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="thedatavalue" level="system" category="lua" file="cldf-int.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-makeup.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-makeup.xml
index dc2bd9ad486..15c327f6b90 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-makeup.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-makeup.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definemakeup" level="style" category="structure layout" file="page-mak.mkvi">
+ <cd:command name="definemakeup" level="style" category="structure" keywords="layout" file="page-mak.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmakeup" level="style" category="structure layout" file="page-mak.mkvi">
+ <cd:command name="setupmakeup" level="style" category="structure" keywords="layout" file="page-mak.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -113,7 +113,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="makeup" type="environment" level="document" category="structure layout" file="page-mak.mkvi">
+ <cd:command name="makeup" type="environment" level="document" category="structure" keywords="layout" file="page-mak.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -122,7 +122,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="makeup" type="environment" generated="yes" variant="instance" level="document" category="structure layout" file="page-mak.mkvi">
+ <cd:command name="makeup" type="environment" generated="yes" variant="instance" level="document" category="structure" keywords="layout" file="page-mak.mkvi">
<cd:sequence>
<cd:instance value="makeup"/>
<cd:string value="makeup"/>
@@ -137,40 +137,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="standardmakeup" type="environment" level="document" category="structure layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="textmakeup" type="environment" level="document" category="structure layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="pagemakeup" type="environment" level="document" category="structure layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="middlemakeup" type="environment" level="document" category="structure layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-marginblock.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-marginblock.xml
index 0d0e3c2b4c4..0443a234e4b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-marginblock.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-marginblock.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definemarginblock" level="style" category="structure layout" file="page-mbk.mkvi">
+ <cd:command name="definemarginblock" level="style" category="structure" keywords="layout" file="page-mbk.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmarginblock" level="style" category="structure layout" file="page-mbk.mkvi">
+ <cd:command name="setupmarginblock" level="style" category="structure" keywords="layout" file="page-mbk.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -67,7 +67,7 @@
<!--
- <cd:command name="setupmarginblocks" level="style" category="structure layout" file="page-mbk.mkvi">
+ <cd:command name="setupmarginblocks" level="style" category="structure" keywords="layout" file="page-mbk.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -78,10 +78,10 @@
-->
- <cd:command name="marginblock" type="environment" level="document" category="structure layout" file="page-mbk.mkvi">
+ <cd:command name="marginblock" type="environment" level="document" category="structure" keywords="layout" file="page-mbk.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-margindata.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-margindata.xml
index a157aaf9ca5..006101afa51 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-margindata.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-margindata.xml
@@ -165,269 +165,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="inleftmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inrightmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inoutermargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ininnermargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inleftedge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inrightedge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ininneredge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inouteredge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="atleftmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="atrightmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inleft" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inright" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ininner" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inouter" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inother" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="margintext" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="marginword" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="margintitle" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inothermargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-marker.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-marker.xml
index 2db8a9de129..8dc6ba97849 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-marker.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-marker.xml
@@ -30,4 +30,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-marking.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-marking.xml
index 914922cf2d6..8eb17f6edd3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-marking.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-marking.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definemarking" level="style" file="strc-mar.mkiv">
+ <cd:command name="definemarking" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-mark-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmarking" level="style" file="strc-mar.mkiv">
+ <cd:command name="setupmarking" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark-list-optional"/>
<cd:assignments list="yes">
@@ -36,27 +36,30 @@
</cd:arguments>
</cd:command>
- <cd:command name="relatemarking" level="system" file="strc-mar.mkiv">
+ <cd:command name="relatemarking" level="system" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:resolve name="keyword-mark"/>
</cd:arguments>
</cd:command>
- <cd:command name="setmarking" level="style" file="strc-mar.mkiv">
+ <cd:command name="setmarking" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="resetmarking" level="system" file="strc-mar.mkiv">
+ <cd:command name="resetmarking" level="system" category="structure" file="strc-mar.mkiv">
<cd:arguments>
- <cd:resolve name="keyword-mark"/>
+ <cd:keywords>
+ <cd:constant type="all"/>
+ <cd:constant type="cd:mark"/>
+ </cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command name="synchronizemarking" level="system" file="strc-mar.mkiv">
+ <cd:command name="synchronizemarking" level="system" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:resolve name="keyword-number"/>
@@ -66,7 +69,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsemarking" level="system" category="conditional" file="strc-mar.mkiv">
+ <cd:command name="doifelsemarking" level="system" category="structure" keywords="conditional" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="argument-mark"/>
<cd:resolve name="argument-true"/>
@@ -74,7 +77,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifmarkingelse" level="system" category="conditional" file="strc-mar.mkiv">
+ <cd:command name="doifmarkingelse" level="system" category="structure" keywords="conditional" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="argument-mark"/>
<cd:resolve name="argument-true"/>
@@ -82,12 +85,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="getmarking" level="style" file="strc-mar.mkiv">
+ <cd:command name="getmarking" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:keywords optional="yes">
<cd:constant type="page" default="yes"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
<cd:keywords optional="yes">
<cd:resolve name="value-markposition"/>
@@ -95,7 +99,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fetchonemark" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchonemark" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:keywords optional="yes">
@@ -104,19 +108,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="fetchtwomarks" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchtwomarks" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
</cd:arguments>
</cd:command>
- <cd:command name="fetchallmarks" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchallmarks" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
</cd:arguments>
</cd:command>
- <cd:command name="fetchmark" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchmark" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:keywords optional="yes">
@@ -125,12 +129,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="fetchmarking" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchmarking" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
<cd:keywords>
<cd:resolve name="value-markposition"/>
@@ -138,12 +143,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="fetchonemarking" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchonemarking" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
<cd:keywords>
<cd:resolve name="value-markposition"/>
@@ -151,24 +157,26 @@
</cd:arguments>
</cd:command>
- <cd:command name="fetchtwomarkings" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchtwomarkings" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
- <cd:command name="fetchallmarkings" level="style" file="strc-mar.mkiv">
+ <cd:command name="fetchallmarkings" level="style" category="structure" file="strc-mar.mkiv">
<cd:arguments>
<cd:resolve name="keyword-mark"/>
<cd:keywords>
<cd:constant type="page"/>
<cd:constant type="cd:name"/>
+ <cd:constant type="cd:number"/>
</cd:keywords>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-math.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-math.xml
index 888d2bac509..1f2255cef99 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-math.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-math.xml
@@ -111,9 +111,9 @@
<cd:constant type="normal"/>
</cd:parameter>
<cd:parameter name="collapsing">
- <cd:constant type="1"/>
+ <cd:constant type="1" default="yes"/>
<cd:constant type="2"/>
- <cd:constant type="3" default="yes"/>
+ <cd:constant type="3"/>
<cd:constant type="none"/>
<cd:constant type="reset"/>
</cd:parameter>
@@ -567,4 +567,4 @@
<cd:command name="unstackscripts" level="document" category="mathematics" file="math-ini.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mathalignment.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mathalignment.xml
index 325b288c7ac..725797cfafe 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mathalignment.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mathalignment.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definemathalignment" level="style" category="mathematics alignment" file="math-ali.mkiv">
+ <cd:command name="definemathalignment" level="style" category="mathematics" keywords="alignment" file="math-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmathalignment" level="style" category="mathematics alignment" file="math-ali.mkiv">
+ <cd:command name="setupmathalignment" level="style" category="mathematics" keywords="alignment" file="math-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -53,7 +53,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="mathalignment" type="environment" generated="yes" variant="instance" level="document" category="mathematics alignment" file="math-ali.mkiv">
+ <cd:command name="mathalignment" type="environment" generated="yes" variant="instance" level="document" category="mathematics" keywords="alignment" file="math-ali.mkiv">
<cd:sequence>
<cd:instance value="mathalignment"/>
</cd:sequence>
@@ -67,24 +67,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mathalignment" type="environment" level="document" category="mathematics alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathalignment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="align" type="environment" level="document" category="mathematics alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathalignment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mathcases.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mathcases.xml
index 837f2b78281..1736f09b716 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mathcases.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mathcases.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definemathcases" level="style" category="mathematics alignment" file="math-ali.mkiv">
+ <cd:command name="definemathcases" level="style" category="mathematics" keywords="alignment" file="math-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmathcases" level="style" category="mathematics alignment" file="math-ali.mkiv">
+ <cd:command name="setupmathcases" level="style" category="mathematics" keywords="alignment" file="math-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -41,7 +41,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="mathcases" type="environment" generated="yes" variant="instance" level="document" category="mathematics alignment" file="math-ali.mkiv">
+ <cd:command name="mathcases" type="environment" generated="yes" variant="instance" level="document" category="mathematics" keywords="alignment" file="math-ali.mkiv">
<cd:sequence>
<cd:instance value="mathcases"/>
</cd:sequence>
@@ -55,24 +55,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mathcases" type="environment" level="document" category="mathematics alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathcases"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="cases" type="environment" level="document" category="mathematics alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathcases"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mathmatrix.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mathmatrix.xml
index 581a6928ac7..3b8076407c4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mathmatrix.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mathmatrix.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definemathmatrix" level="style" category="mathematics tables" file="math-ali.mkiv">
+ <cd:command name="definemathmatrix" level="style" category="mathematics" keywords="tables" file="math-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmathmatrix" level="style" category="mathematics tables" file="math-ali.mkiv">
+ <cd:command name="setupmathmatrix" level="style" category="mathematics" keywords="tables" file="math-ali.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -56,7 +56,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="mathmatrix" type="environment" generated="yes" variant="instance" level="document" category="mathematics tables" file="math-ali.mkiv">
+ <cd:command name="mathmatrix" type="environment" generated="yes" variant="instance" level="document" category="mathematics" keywords="tables" file="math-ali.mkiv">
<cd:sequence>
<cd:instance value="mathmatrix"/>
</cd:sequence>
@@ -70,36 +70,22 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mathmatrix" type="environment" level="document" category="mathematics tables" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathmatrix"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="matrix" type="environment" level="document" category="mathematics tables" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathmatrix"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="mathmatrix" generated="yes" level="document" category="mathematics tables" file="math-ali.mkiv">
+ <cd:command name="mathmatrix" generated="yes" variant="instance" level="document" category="mathematics" keywords="tables" file="math-ali.mkiv">
<cd:sequence>
- <cd:variable value="mathmatrix"/>
+ <cd:instance value="mathmatrix"/>
</cd:sequence>
<cd:arguments>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupmathmatrix"/>
+ </cd:assignments>
<cd:content/>
</cd:arguments>
+ <cd:instances>
+ <cd:resolve name="instance-simplematrix"/>
+ </cd:instances>
</cd:command>
- <cd:command name="matrices" type="environment" level="document" category="mathematics tables" file="math-ali.mkiv">
+ <cd:command name="matrices" type="environment" level="document" category="mathematics" keywords="tables" file="math-ali.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupmathmatrix"/>
@@ -131,20 +117,20 @@
</cd:arguments>
</cd:command>
- <cd:command name="bordermatrix" level="document" category="mathematics tables" file="math-pln.mkiv">
+ <cd:command name="bordermatrix" level="document" category="mathematics" keywords="tables" file="math-pln.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bbordermatrix" level="document" category="mathematics tables" file="math-pln.mkiv">
+ <cd:command name="bbordermatrix" level="document" category="mathematics" keywords="tables" file="math-pln.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="bordermatrix" type="environment" level="document" category="mathematics tables" file="math-pln.mkiv"/>
+ <cd:command name="bordermatrix" type="environment" level="document" category="mathematics" keywords="tables" file="math-pln.mkiv"/>
- <cd:command name="bbordermatrix" type="environment" level="document" category="mathematics tables" file="math-pln.mkiv"/>
+ <cd:command name="bbordermatrix" type="environment" level="document" category="mathematics" keywords="tables" file="math-pln.mkiv"/>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mathname.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mathname.xml
index 63dab099192..161dcf00cc0 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mathname.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mathname.xml
@@ -4,1088 +4,1088 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="mathhash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mathhash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mathdollar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mathdollar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mathpercent" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mathpercent" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mathampersand" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mathampersand" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lparent" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lparent" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rparent" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rparent" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ast" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ast" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mathhyphen" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mathhyphen" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="colon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="colon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lt" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lt" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gt" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gt" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lbracket" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lbracket" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="backslash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="backslash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rbracket" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rbracket" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Hat" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Hat" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="grave" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="grave" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lbrace" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lbrace" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rbrace" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rbrace" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="yen" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="yen" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="S" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="S" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ddot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ddot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="pm" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="pm" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="acute" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="acute" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="P" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="P" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="centerdot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="centerdot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="times" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="times" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eth" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eth" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="div" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="div" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lambdabar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lambdabar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="hat" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="hat" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="check" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="check" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="breve" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="breve" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ring" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ring" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="tilde" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="tilde" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="widehat" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="widehat" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="widetilde" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="widetilde" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="not" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="not" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Alpha" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Alpha" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Beta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Beta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Gamma" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Gamma" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Delta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Delta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Epsilon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Epsilon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Zeta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Zeta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Eta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Eta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Theta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Theta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Iota" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Iota" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Kappa" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Kappa" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Lambda" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Lambda" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Mu" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Mu" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Nu" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Nu" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Xi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Xi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Omicron" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Omicron" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Pi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Pi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Rho" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Rho" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Sigma" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Sigma" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Tau" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Tau" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Upsilon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Upsilon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Phi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Phi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Chi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Chi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Psi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Psi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Omega" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Omega" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="alpha" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="alpha" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="beta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="beta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gamma" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gamma" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="delta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="delta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varepsilon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varepsilon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="zeta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="zeta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="theta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="theta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="iota" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="iota" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="kappa" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="kappa" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lambda" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lambda" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mu" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mu" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nu" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nu" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="xi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="xi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="omicron" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="omicron" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="pi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="pi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rho" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rho" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varsigma" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varsigma" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sigma" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sigma" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="tau" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="tau" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="upsilon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="upsilon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varphi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varphi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="chi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="chi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="psi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="psi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="omega" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="omega" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varTheta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varTheta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="phi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="phi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varpi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varpi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="digamma" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="digamma" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varkappa" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varkappa" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="epsilon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="epsilon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="backepsilon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="backepsilon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bullet" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bullet" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="prime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="prime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="doubleprime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="doubleprime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="tripleprime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="tripleprime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="reversedprime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="reversedprime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="reverseddoubleprime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="reverseddoubleprime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="reversedtripleprime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="reversedtripleprime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="quadrupleprime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="quadrupleprime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="invisibletimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="invisibletimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="positivesign" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="positivesign" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="negativesign" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="negativesign" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="vec" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="vec" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dddot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dddot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigsquare" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigsquare" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigdiamond" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigdiamond" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="actuarial" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="actuarial" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="complexes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="complexes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Eulerconst" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Eulerconst" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Plankconst" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Plankconst" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Im" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Im" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ell" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ell" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="naturalnumbers" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="naturalnumbers" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="wp" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="wp" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="primes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="primes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rationals" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rationals" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Re" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Re" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="reals" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="reals" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="integers" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="integers" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ohm" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ohm" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mho" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mho" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="turnediota" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="turnediota" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Angstrom" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Angstrom" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Finv" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Finv" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="aleph" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="aleph" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="beth" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="beth" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gimel" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gimel" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="daleth" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="daleth" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Game" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Game" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sansLturned" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sansLturned" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sansLmirrored" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sansLmirrored" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Yup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Yup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="differentialD" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="differentialD" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="differentiald" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="differentiald" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="exponentiale" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="exponentiale" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="imaginaryi" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="imaginaryi" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="imaginaryj" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="imaginaryj" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="PropertyLine" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="PropertyLine" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="upand" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="upand" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="uparrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="uparrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="updownarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="updownarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nwarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nwarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="searrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="searrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="swarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="swarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftwavearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftwavearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightwavearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightwavearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="twoheadleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="twoheadleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="twoheaduparrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="twoheaduparrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="twoheadrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="twoheadrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="twoheaddownarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="twoheaddownarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftarrowtail" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftarrowtail" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightarrowtail" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightarrowtail" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mapsfrom" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mapsfrom" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mapsup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mapsup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mapsto" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mapsto" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mapsdown" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mapsdown" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="updownarrowbar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="updownarrowbar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="hookleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="hookleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="hookrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="hookrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="looparrowleft" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="looparrowleft" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="looparrowright" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="looparrowright" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftrightsquigarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftrightsquigarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nleftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nleftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downzigzagarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downzigzagarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Lsh" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Lsh" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Rsh" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Rsh" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Ldsh" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Ldsh" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Rdsh" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Rdsh" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="linefeed" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="linefeed" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="carriagereturn" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="carriagereturn" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="curvearrowleft" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="curvearrowleft" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="curvearrowright" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="curvearrowright" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="barovernorthwestarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="barovernorthwestarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="barleftarrowrightarrowbar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="barleftarrowrightarrowbar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftharpoonup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftharpoonup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftharpoondown" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftharpoondown" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="upharpoonleft" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="upharpoonleft" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightharpoonup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightharpoonup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightharpoondown" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightharpoondown" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downharpoonright" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downharpoonright" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downharpoonleft" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downharpoonleft" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightleftarrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightleftarrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="updownarrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="updownarrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftrightarrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftrightarrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftleftarrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftleftarrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="upuparrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="upuparrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightrightarrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightrightarrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downdownarrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downdownarrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftrightharpoons" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftrightharpoons" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightleftharpoons" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightleftharpoons" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nLeftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nLeftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nLeftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nLeftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nRightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nRightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Leftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Leftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Uparrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Uparrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Downarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Downarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Leftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Leftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Updownarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Updownarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Nwarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Nwarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Nearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Nearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Searrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Searrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Swarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Swarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Lleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Lleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Rrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Rrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftsquigarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftsquigarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nHuparrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nHuparrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nHdownarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nHdownarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftdasharrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftdasharrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="updasharrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="updasharrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downdasharrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downdasharrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="barleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="barleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightarrowbar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightarrowbar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftwhitearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftwhitearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="upwhitearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="upwhitearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightwhitearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightwhitearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downwhitearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downwhitearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="whitearrowupfrombar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="whitearrowupfrombar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circleonrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circleonrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="downuparrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="downuparrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightthreearrows" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightthreearrows" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nvleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nvleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nvrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nvrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nvleftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nvleftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nVleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nVleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nVrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nVrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nVleftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nVleftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftarrowtriangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftarrowtriangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightarrowtriangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightarrowtriangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftrightarrowtriangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftrightarrowtriangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="forall" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="forall" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="complement" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="complement" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="partial" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="partial" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="exists" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="exists" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nexists" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nexists" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="emptyset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="emptyset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nabla" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nabla" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="in" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="in" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="prod" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="prod" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="coprod" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="coprod" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sum" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sum" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="mp" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="mp" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dotplus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dotplus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="diagup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="diagup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="diagdown" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="diagdown" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ast" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ast" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circ" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circ" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="propto" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="propto" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="infty" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="infty" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="angle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="angle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="measuredangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="measuredangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sphericalangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sphericalangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="divides" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="divides" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nparallel" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nparallel" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="cap" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="cap" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="cup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="cup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="oint" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="oint" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="oiint" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="oiint" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="oiiint" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="oiiint" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="intclockwise" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="intclockwise" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ointclockwise" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ointclockwise" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ointctrclockwise" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ointctrclockwise" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="therefore" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="therefore" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="because" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="because" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="colon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="colon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="squaredots" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="squaredots" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dotminus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dotminus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="minuscolon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="minuscolon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="backsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="backsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="wr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="wr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="simeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="simeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsimeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsimeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="approxnEq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="approxnEq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="approx" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="approx" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="napprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="napprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="approxeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="approxeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="asymp" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="asymp" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Bumpeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Bumpeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="doteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="doteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="fallingdotseq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="fallingdotseq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="risingdotseq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="risingdotseq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="colonequals" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="colonequals" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="equalscolon" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="equalscolon" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqcirc" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqcirc" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="wedgeeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="wedgeeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="veeeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="veeeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="stareq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="stareq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="triangleq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="triangleq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="definedeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="definedeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="measuredeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="measuredeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="questionedeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="questionedeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="equiv" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="equiv" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nequiv" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nequiv" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="geqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="geqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lneqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lneqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gneqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gneqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ll" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ll" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gg" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gg" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="between" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="between" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nasymp" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nasymp" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nless" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nless" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ngtr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ngtr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nleq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nleq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ngeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ngeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lesssim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lesssim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gtrsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gtrsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nlesssim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nlesssim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ngtrsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ngtrsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lessgtr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lessgtr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gtrless" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gtrless" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nlessgtr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nlessgtr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ngtrless" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ngtrless" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="prec" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="prec" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succ" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succ" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="preccurlyeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="preccurlyeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succcurlyeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succcurlyeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="precsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="precsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nprec" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nprec" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsucc" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsucc" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="subset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="subset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="supset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="supset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsubset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsubset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsupset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsupset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="subseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="subseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="supseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="supseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsubseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsubseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsupseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsupseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="subsetneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="subsetneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="supsetneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="supsetneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="uplus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="uplus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqsubset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqsubset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqsupset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqsupset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqsubseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqsubseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqsupseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqsupseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqcap" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqcap" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqcup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqcup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="oplus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="oplus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ominus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ominus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="otimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="otimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="oslash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="oslash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="odot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="odot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circledcirc" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circledcirc" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circledast" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circledast" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circledequals" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circledequals" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circleddash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circleddash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="boxplus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="boxplus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="boxminus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="boxminus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="boxtimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="boxtimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="boxdot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="boxdot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="vdash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="vdash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dashv" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dashv" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="top" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="top" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="models" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="models" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="vDash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="vDash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Vdash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Vdash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Vvdash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Vvdash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="VDash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="VDash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nvdash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nvdash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nvDash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nvDash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nVdash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nVdash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nVDash" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nVDash" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="multimap" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="multimap" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="intercal" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="intercal" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="veebar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="veebar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="barwedge" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="barwedge" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigwedge" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigwedge" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigvee" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigvee" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigcap" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigcap" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigcup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigcup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="diamond" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="diamond" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="star" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="star" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="divideontimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="divideontimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ltimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ltimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rtimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rtimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leftthreetimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leftthreetimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rightthreetimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rightthreetimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="curlyvee" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="curlyvee" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="curlywedge" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="curlywedge" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Subset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Subset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Supset" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Supset" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="pitchfork" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="pitchfork" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lessdot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lessdot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gtrdot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gtrdot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lesseqgtr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lesseqgtr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gtreqless" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gtreqless" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqless" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqless" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqgtr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqgtr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="curlyeqprec" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="curlyeqprec" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="curlyeqsucc" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="curlyeqsucc" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="npreccurlyeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="npreccurlyeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsucccurlyeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsucccurlyeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsqsubseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsqsubseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nsqsupseteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nsqsupseteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqsubsetneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqsubsetneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sqsupsetneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sqsupsetneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lnsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lnsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gnsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gnsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="precnsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="precnsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succnsim" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succnsim" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ntriangleright" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ntriangleright" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ntriangleleft" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ntriangleleft" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ntrianglelefteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ntrianglelefteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ntrianglerighteq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ntrianglerighteq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="vdots" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="vdots" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="cdots" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="cdots" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="udots" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="udots" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ddots" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ddots" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lceil" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lceil" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rceil" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rceil" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lfloor" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lfloor" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rfloor" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rfloor" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="ulcorner" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="ulcorner" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="urcorner" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="urcorner" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="llcorner" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="llcorner" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lrcorner" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lrcorner" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="frown" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="frown" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="smile" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="smile" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lmoustache" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lmoustache" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rmoustache" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rmoustache" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="overbracket" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="overbracket" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="underbracket" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="underbracket" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="overparent" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="overparent" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="underparent" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="underparent" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="overbrace" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="overbrace" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="underbrace" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="underbrace" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circledR" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circledR" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="circledS" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="circledS" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="blacksquare" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="blacksquare" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="blacktriangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="blacktriangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="blacktriangleright" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="blacktriangleright" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="triangleright" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="triangleright" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="blacktriangledown" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="blacktriangledown" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="blacktriangleleft" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="blacktriangleleft" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="triangleleft" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="triangleleft" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lozenge" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lozenge" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigcirc" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigcirc" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigstar" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigstar" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="spadesuit" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="spadesuit" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="heartsuit" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="heartsuit" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="diamondsuit" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="diamondsuit" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="clubsuit" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="clubsuit" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="blacklozenge" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="blacklozenge" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="flat" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="flat" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="natural" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="natural" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="sharp" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="sharp" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="checkmark" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="checkmark" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="maltese" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="maltese" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="llbracket" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="llbracket" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rrbracket" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rrbracket" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="langle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="langle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="llangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="llangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rrangle" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rrangle" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lgroup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lgroup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rgroup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rgroup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="longleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="longleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="longrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="longrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="longleftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="longleftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Longleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Longleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Longrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Longrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Longleftrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Longleftrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="longmapsfrom" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="longmapsfrom" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="longmapsto" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="longmapsto" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Longmapsfrom" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Longmapsfrom" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Longmapsto" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Longmapsto" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="longrightsquigarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="longrightsquigarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Mapsfrom" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Mapsfrom" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Mapsto" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Mapsto" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Uuparrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Uuparrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="Ddownarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="Ddownarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dashedleftarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dashedleftarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dashedrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dashedrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="dottedrightarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="dottedrightarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="twoheadrightarrowtail" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="twoheadrightarrowtail" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="nwsearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="nwsearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="neswarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="neswarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lhooknwarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lhooknwarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rhooknearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rhooknearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lhooksearrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lhooksearrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rhookswarrow" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rhookswarrow" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigodot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigodot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigoplus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigoplus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigotimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigotimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigudot" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigudot" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="biguplus" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="biguplus" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigsqcap" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigsqcap" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigsqcup" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigsqcup" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="bigtimes" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="bigtimes" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="amalg" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="amalg" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="coloncolonequals" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="coloncolonequals" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqeqeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqeqeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="leqslant" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="leqslant" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="geqslant" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="geqslant" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lessapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lessapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gtrapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gtrapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="rneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="rneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lnapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lnapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gnapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gnapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="lesseqqgtr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="lesseqqgtr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="gtreqqless" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="gtreqqless" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqslantless" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqslantless" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="eqslantgtr" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="eqslantgtr" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="preceq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="preceq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succeq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succeq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="precneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="precneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succneq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succneq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="preceqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="preceqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succeqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succeqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="precneqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="precneqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succneqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succneqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="precapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="precapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="precnapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="precnapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="succnapprox" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="succnapprox" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="subseteqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="subseteqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="supseteqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="supseteqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="subsetneqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="subsetneqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="supsetneqq" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="supsetneqq" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="backprime" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="backprime" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="imath" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="imath" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="jmath" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="jmath" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="vartheta" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="vartheta" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varkappa" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varkappa" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
- <cd:command name="varrho" level="document" category="character mathematics" file="char-def.lua"/>
+ <cd:command name="varrho" level="document" category="mathematics" keywords="character" file="char-def.lua"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mathornament.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mathornament.xml
index 70100b8e4f5..11f630c6523 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mathornament.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mathornament.xml
@@ -43,4 +43,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mathradical.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mathradical.xml
index a7ba93b7512..9a29ad82bfb 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mathradical.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mathradical.xml
@@ -53,4 +53,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mathstackers.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mathstackers.xml
index 561936b9c28..b5adfbc60a9 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mathstackers.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mathstackers.xml
@@ -105,6 +105,18 @@
<cd:constant type="yes"/>
<cd:constant type="no" default="yes"/>
</cd:parameter>
+ <cd:parameter name="lt">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="rt">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="lb">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="rb">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -354,844 +366,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="xrel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xequal" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xLeftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xRightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xLeftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xtwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xtwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xmapsto" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xhookleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xhookrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftrightharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightleftharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xtriplerel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mequal" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mLeftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mRightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mLeftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mtwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mtwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mmapsto" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mhookleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mhookrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftrightharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightleftharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mtriplerel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="erightarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftrightarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="etwoheadrightarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftharpoondownfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftharpoonupfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="erightharpoondownfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="erightharpoonupfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverbarfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderbarfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverbracefill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderbracefill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverparentfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderparentfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverbracketfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderbracketfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tequal" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tmapsto" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tLeftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tRightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tLeftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ttwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ttwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="thookleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="thookrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftrightharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightleftharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ttriplerel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="cleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="crightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="crightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="undertwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="undertwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overtwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overtwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doublebar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doublebrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doubleparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doublebracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbarunderbar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbraceunderbrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overparentunderparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbracketunderbracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbartext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbracetext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overparenttext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbrackettext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbartext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbracetext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underparenttext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbrackettext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="singlebond" level="document" category="mathematics" file="math-stc.mkvi"/>
<cd:command name="doublebond" level="document" category="mathematics" file="math-stc.mkvi"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-metapost.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-metapost.xml
index 1c8fd2d0b9c..f79fe9f2f6c 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-metapost.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-metapost.xml
@@ -4,40 +4,40 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="MPdefinitions" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPdefinitions" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
- <cd:resolve name="argument-name-optional"/>
+ <cd:resolve name="argument-instance-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPextensions" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPextensions" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
- <cd:resolve name="argument-name-list-optional"/>
+ <cd:resolve name="argument-instance-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPinitializations" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv"/>
+ <cd:command name="MPinitializations" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv"/>
- <cd:command name="MPinclusions" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPinclusions" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="+"/>
</cd:keywords>
- <cd:resolve name="argument-name-optional"/>
+ <cd:resolve name="argument-instance-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPinclusions" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPinclusions" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="+"/>
</cd:keywords>
- <cd:resolve name="argument-name-optional"/>
+ <cd:resolve name="argument-instance-optional"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="defineMPinstance" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="defineMPinstance" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -47,12 +47,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupMPinstance" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="setupMPinstance" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
<cd:parameter name="format">
<cd:constant type="metafun" default="yes"/>
+ <cd:constant type="minifun"/>
<cd:constant type="mpost"/>
</cd:parameter>
<cd:parameter name="initializations">
@@ -83,19 +84,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetMPinstance" level="system" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="resetMPinstance" level="system" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="processMPfigurefile" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="processMPfigurefile" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPdrawing" type="environment" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPdrawing" type="environment" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="-"/>
@@ -103,85 +104,85 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetMPdrawing" level="document" category="graphics metapost" file="meta-ini.mkiv"/>
+ <cd:command name="resetMPdrawing" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv"/>
- <cd:command name="getMPdrawing" level="document" category="graphics metapost" file="meta-ini.mkiv"/>
+ <cd:command name="getMPdrawing" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv"/>
- <cd:command name="MPdrawing" level="system" type="environment" begin="push" end="pop" category="graphics metapost" file="meta-ini.mkiv"/>
+ <cd:command name="MPdrawing" level="system" type="environment" begin="push" end="pop" category="graphics" keywords="metapost" file="meta-ini.mkiv"/>
- <cd:command name="MPdrawing" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPdrawing" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="MPclip" type="environment" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPclip" type="environment" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPfontsizehskip" level="system" category="graphics metapost fonts" file="meta-ini.mkiv">
+ <cd:command name="MPfontsizehskip" level="system" category="graphics" keywords="metapost fonts" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-font"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupMPvariables" level="style" file="meta-ini.mkiv">
+ <cd:command name="setupMPvariables" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="setMPvariables" level="style" file="meta-ini.mkiv">
+ <cd:command name="setMPvariables" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="setMPvariable" level="style" file="meta-ini.mkiv">
+ <cd:command name="setMPvariable" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="assignment-userdata"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPrawvar" level="system" file="meta-ini.mkiv">
+ <cd:command name="MPrawvar" level="system" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPvariable" level="style" file="meta-ini.mkiv">
+ <cd:command name="MPvariable" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPvar" level="style" file="meta-ini.mkiv">
+ <cd:command name="MPvar" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="useMPvariables" level="style" file="meta-ini.mkiv">
+ <cd:command name="useMPvariables" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-key-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="uniqueMPgraphic" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="uniqueMPgraphic" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="uniqueMPgraphic" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="uniqueMPgraphic" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:assignments delimiters="braces" list="yes" optional="yes">
@@ -192,14 +193,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="useMPgraphic" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="useMPgraphic" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="useMPgraphic" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="useMPgraphic" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:assignments delimiters="braces" list="yes" optional="yes">
@@ -210,14 +211,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="usableMPgraphic" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="usableMPgraphic" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="reuseMPgraphic" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="reuseMPgraphic" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:assignments delimiters="braces" list="yes" optional="yes">
@@ -228,14 +229,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="reusableMPgraphic" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="reusableMPgraphic" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="reusableMPgraphic" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="reusableMPgraphic" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:assignments delimiters="braces" list="yes" optional="yes">
@@ -246,14 +247,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="uniqueMPpagegraphic" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="uniqueMPpagegraphic" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="uniqueMPpagegraphic" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="uniqueMPpagegraphic" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:assignments delimiters="braces" list="yes" optional="yes">
@@ -264,19 +265,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="processMPbuffer" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="processMPbuffer" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="runMPbuffer" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="runMPbuffer" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPenvironment" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPenvironment" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="reset"/>
@@ -286,72 +287,72 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetMPenvironment" level="style" category="graphics" file="meta-ini.mkiv"/>
+ <cd:command name="resetMPenvironment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv"/>
- <cd:command name="useMPenvironmentbuffer" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="useMPenvironmentbuffer" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPcode" type="environment" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPcode" type="environment" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
- <cd:resolve name="argument-name-optional"/>
+ <cd:resolve name="argument-instance-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPcode" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPcode" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
- <cd:resolve name="argument-name-optional"/>
+ <cd:resolve name="argument-instance-optional"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="MPrun" type="environment" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPrun" type="environment" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="useMPrun" level="document" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="useMPrun" level="document" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="useMPlibrary" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="useMPlibrary" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="setMPtext" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="setMPtext" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPtext" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPtext" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPstring" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPstring" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPbetex" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="MPbetex" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseMPgraphic" level="style" category="graphics metapost conditional" file="meta-ini.mkiv">
+ <cd:command name="doifelseMPgraphic" level="style" category="graphics" keywords="metapost conditional" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -359,7 +360,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifMPgraphicelse" level="style" category="graphics metapost conditional" file="meta-ini.mkiv">
+ <cd:command name="doifMPgraphicelse" level="style" category="graphics" keywords="metapost conditional" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -367,20 +368,20 @@
</cd:arguments>
</cd:command>
- <cd:command name="staticMPfigure" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="staticMPfigure" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="staticMPgraphic" type="environment" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="staticMPgraphic" type="environment" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="usestaticMPfigure" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="usestaticMPfigure" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupscale"/>
@@ -389,7 +390,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupMPgraphics" level="style" category="graphics metapost" file="meta-ini.mkiv">
+ <cd:command name="setupMPgraphics" level="style" category="graphics" keywords="metapost" file="meta-ini.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="color">
@@ -403,4 +404,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-mixedcolumns.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-mixedcolumns.xml
index 701375237ed..7d888a50f11 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-mixedcolumns.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-mixedcolumns.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definemixedcolumns" level="style" category="structure layout" file="page-mix.mkiv">
+ <cd:command name="definemixedcolumns" level="style" category="columns" keywords="structure layout" file="page-mix.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupmixedcolumns" level="style" category="structure layout" file="page-mix.mkiv">
+ <cd:command name="setupmixedcolumns" level="style" category="columns" keywords="structure layout" file="page-mix.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -96,7 +96,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="mixedcolumns" type="environment" level="document" category="structure layout" file="page-mix.mkiv">
+ <cd:command name="mixedcolumns" type="environment" level="document" category="columns" keywords="structure layout" file="page-mix.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -105,7 +105,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="mixedcolumns" type="environment" generated="yes" variant="instance" level="document" category="structure layout" file="page-mix.mkiv">
+ <cd:command name="mixedcolumns" type="environment" generated="yes" variant="instance" level="document" category="columns" keywords="structure layout" file="page-mix.mkiv">
<cd:sequence>
<cd:instance value="mixedcolumns"/>
</cd:sequence>
@@ -119,19 +119,7 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="boxedcolumns" type="environment" level="document" category="structure layout" file="page-mix.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmixedcolumns"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="setupcolumns" level="style" category="structure layout" file="page-smp.mkiv">
+ <cd:command name="setupcolumns" level="style" category="columns" keywords="structure layout" file="page-smp.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupmixedcolumns"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-modes.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-modes.xml
index 8b35da6f84e..4b9c5afaa01 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-modes.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-modes.xml
@@ -93,7 +93,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsemode" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifelsemode" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -101,7 +101,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifmodeelse" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifmodeelse" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -109,14 +109,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifmode" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifmode" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotmode" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifnotmode" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -135,7 +135,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseallmodes" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifelseallmodes" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -143,7 +143,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifallmodeselse" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifallmodeselse" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -151,7 +151,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifallmodes" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifallmodes" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -159,7 +159,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotallmodes" level="style" category="structure conditional" file="core-env.mkiv">
+ <cd:command name="doifnotallmodes" level="style" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -213,4 +213,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-modules.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-modules.xml
index 03ed005e2a5..8e12f416022 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-modules.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-modules.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="usemodule" level="style" file="file-mod.mkvi">
+ <cd:command name="usemodule" level="style" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="m"/>
@@ -24,7 +24,7 @@
<!--
- <cd:command name="usemodules" level="style" file="file-mod.mkvi">
+ <cd:command name="usemodules" level="style" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="m"/>
@@ -44,7 +44,7 @@
-->
- <cd:command name="usetexmodule" level="style" file="file-mod.mkvi">
+ <cd:command name="usetexmodule" level="style" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="m"/>
@@ -62,19 +62,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="module" type="environment" level="system" file="file-mod.mkvi">
+ <cd:command name="module" type="environment" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="module" type="environment" variant="string" level="system" file="file-mod.mkvi">
+ <cd:command name="module" type="environment" variant="string" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="string-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupmodule" level="system" file="file-mod.mkvi">
+ <cd:command name="setupmodule" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file-optional"/>
<cd:assignments list="yes">
@@ -89,38 +89,38 @@
</cd:arguments>
</cd:command>
- <cd:command name="moduleparameter" level="system" file="file-mod.mkvi">
+ <cd:command name="moduleparameter" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="currentmoduleparameter" level="system" file="file-mod.mkvi">
+ <cd:command name="currentmoduleparameter" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="moduletestsection" type="environment" level="system" file="file-mod.mkvi"/>
+ <cd:command name="moduletestsection" type="environment" level="system" category="structure" file="file-mod.mkvi"/>
- <cd:command name="fetchruntinecommand" level="system" file="file-mod.mkvi">
+ <cd:command name="fetchruntinecommand" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="luaenvironment" level="system" file="file-mod.mkvi">
+ <cd:command name="luaenvironment" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="string-file"/>
</cd:arguments>
</cd:command>
- <cd:command name="useluamodule" level="system" file="file-mod.mkvi">
+ <cd:command name="useluamodule" level="system" category="structure" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-narrow.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-narrow.xml
index a229a2112bd..53584ce7cf5 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-narrow.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-narrow.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definenarrower" level="style" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="definenarrower" level="style" category="whitespace" keywords="layout" file="spac-hor.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupnarrower" level="style" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="setupnarrower" level="style" category="whitespace" keywords="layout" file="spac-hor.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -46,7 +46,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="narrower" type="environment" level="document" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="narrower" type="environment" level="document" category="whitespace" keywords="layout" file="spac-hor.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="left" prefix="cd:sign" method="none"/>
@@ -61,7 +61,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="narrower" type="environment" generated="yes" variant="example" level="document" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="narrower" type="environment" generated="yes" variant="example" level="document" category="whitespace" keywords="layout" file="spac-hor.mkiv">
<cd:sequence>
<cd:variable value="narrower"/>
</cd:sequence>
@@ -79,7 +79,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="narrow" type="environment" level="document" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="narrow" type="environment" level="document" category="whitespace" keywords="layout" file="spac-hor.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -88,7 +88,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="narrow" type="environment" variant="name" level="document" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="narrow" type="environment" variant="name" level="document" category="whitespace" keywords="layout" file="spac-hor.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:keywords list="yes" optional="yes">
@@ -104,7 +104,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="narrow" type="environment" variant="assignment" level="document" category="whitespace layout" file="spac-hor.mkiv">
+ <cd:command name="narrow" type="environment" variant="assignment" level="document" category="whitespace" keywords="layout" file="spac-hor.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupnarrower"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-naturaltable.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-naturaltable.xml
index ac9ea9383cb..db7918c68f7 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-naturaltable.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-naturaltable.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupTABLE" level="style" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="setupTABLE" level="style" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="r"/>
@@ -123,7 +123,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLE" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLE" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -131,7 +131,15 @@
</cd:arguments>
</cd:command>
- <cd:command name="TD" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEnested" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
+ <cd:arguments>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupTABLE"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="TD" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="nx">
@@ -160,7 +168,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TR" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TR" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -168,7 +176,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TC" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TC" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
@@ -176,7 +184,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TX" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TX" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
@@ -184,7 +192,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TY" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TY" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -192,7 +200,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TH" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TH" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
@@ -200,7 +208,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TN" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TN" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="bTD"/>
@@ -208,7 +216,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEhead" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEhead" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -216,7 +224,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEnext" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEnext" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -224,7 +232,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEbody" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEbody" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -232,7 +240,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEfoot" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEfoot" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -240,7 +248,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="defineTABLEsetup" level="style" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="defineTABLEsetup" level="style" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -249,19 +257,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="TDs" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TDs" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="TRs" type="environment" begin="b" end="e" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TRs" type="environment" begin="b" end="e" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="TABLE" type="environment" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLE" type="environment" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -269,7 +277,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEhead" type="environment" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEhead" type="environment" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -277,7 +285,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEnext" type="environment" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEnext" type="environment" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -285,7 +293,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEbody" type="environment" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEbody" type="environment" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -293,7 +301,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="TABLEfoot" type="environment" level="document" category="tables" file="tabl-ntb.mkiv">
+ <cd:command name="TABLEfoot" type="environment" level="document" category="tables" keywords="background rules" file="tabl-ntb.mkxl">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupTABLE"/>
@@ -301,4 +309,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-note.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-note.xml
index ee1ac5a3181..bd1ebca2417 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-note.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-note.xml
@@ -6,7 +6,7 @@
<!--
- <cd:command name="definenotation" level="system" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="definenotation" level="system" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -18,7 +18,7 @@
-->
- <cd:command name="setupnotation" level="style" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setupnotation" level="style" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -193,7 +193,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupnotations" level="style" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setupnotations" level="style" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -202,7 +202,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="note" type="environment" generated="yes" variant="instance:assignment" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="note" type="environment" generated="yes" variant="instance:assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -214,7 +214,7 @@
</cd:instances>
</cd:command>
- <cd:command name="note" type="environment" generated="yes" variant="instance" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="note" type="environment" generated="yes" variant="instance" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -226,7 +226,7 @@
</cd:instances>
</cd:command>
- <cd:command name="note" generated="yes" variant="instance" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="note" generated="yes" variant="instance" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -239,7 +239,7 @@
</cd:instances>
</cd:command>
- <cd:command name="note" generated="yes" variant="instance:assignment" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="note" generated="yes" variant="instance:assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:sequence>
<cd:instance value="note"/>
</cd:sequence>
@@ -251,7 +251,7 @@
</cd:instances>
</cd:command>
- <cd:command name="definenote" level="style" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="definenote" level="style" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -261,7 +261,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupnote" level="style" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setupnote" level="style" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -404,7 +404,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupnotes" level="style" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setupnotes" level="style" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -413,7 +413,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupfootnotes" level="style" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setupfootnotes" level="style" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupnote"/>
@@ -421,7 +421,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setnote" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setnote" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-reference-list-optional"/>
@@ -429,14 +429,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="setnote" variant="assignment" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setnote" variant="assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="assignment-constructiondata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="setnotetext" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setnotetext" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-reference-list-optional"/>
@@ -444,14 +444,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="setnotetext" variant="assignment" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="setnotetext" variant="assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="assignment-constructiondata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="placenotes" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="placenotes" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
<cd:assignments list="yes" optional="yes">
@@ -460,13 +460,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="localnotes" type="environment" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="localnotes" type="environment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="placelocalnotes" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="placelocalnotes" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -475,13 +475,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="postponenotes" level="style" category="structure notes" file="strc-not.mkvi"/>
+ <cd:command name="postponenotes" level="style" category="structure" keywords="notes" file="strc-not.mkvi"/>
- <cd:command name="flushnotes" level="style" category="structure notes" file="strc-not.mkvi"/>
+ <cd:command name="flushnotes" level="style" category="structure" keywords="notes" file="strc-not.mkvi"/>
- <cd:command name="postponingnotes" type="environment" category="structure notes" file="strc-not.mkvi"/>
+ <cd:command name="postponingnotes" type="environment" category="structure" keywords="notes" file="strc-not.mkvi" file="strc-not.mkvi"/>
- <cd:command name="doifelsenoteonsamepage" level="system" category="structure notes conditional" file="strc-not.mkvi">
+ <cd:command name="doifelsenoteonsamepage" level="system" category="structure" keywords="notes conditional" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -489,7 +489,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnoteonsamepageelse" level="system" category="structure notes conditional" file="strc-not.mkvi">
+ <cd:command name="doifnoteonsamepageelse" level="system" category="structure" keywords="notes conditional" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -497,70 +497,41 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotescollected" level="system" category="structure notes conditional" file="strc-not.mkvi">
+ <cd:command name="doifnotescollected" level="system" category="structure" keywords="notes conditional" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="notesymbol" level="system" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="notesymbol" level="system" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-reference-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="note" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="note" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="keyword-reference"/>
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="footnote" type="environment" variant="assignment" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="footnote" type="environment" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="footnote" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="footnote" variant="assignment" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="footnotetext" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="footnotetext" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference-list-optional"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="footnotetext" variant="assignment" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="footnotetext" variant="assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="assignment-constructiondata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="placefootnotes" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="placefootnotes" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupnote"/>
@@ -568,9 +539,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="localfootnotes" type="environment" level="document" category="structure notes" file="strc-not.mkvi"/>
+ <cd:command name="localfootnotes" type="environment" level="document" category="structure" keywords="notes" file="strc-not.mkvi"/>
- <cd:command name="placelocalfootnotes" level="document" category="structure notes" file="strc-not.mkvi">
+ <cd:command name="placelocalfootnotes" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupnote"/>
@@ -578,36 +549,7 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="endnote" type="environment" variant="assignment" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="endnote" type="environment" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="endnote" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="endnote" variant="assignment" level="document" category="structure notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="definelinenote" level="style" category="structure notes" file="strc-lnt.mkvi">
+ <cd:command name="definelinenote" level="style" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -617,7 +559,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuplinenote" level="style" category="structure notes" file="strc-lnt.mkvi">
+ <cd:command name="setuplinenote" level="style" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -636,12 +578,15 @@
<cd:parameter name="compressdistance">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="compressstopper">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:inherit name="setupnote"/>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command name="linenote" generated="yes" variant="instance" level="document" category="structure notes" file="strc-lnt.mkvi">
+ <cd:command name="linenote" generated="yes" variant="instance" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:sequence>
<cd:instance value="linenote"/>
</cd:sequence>
@@ -653,7 +598,7 @@
</cd:instances>
</cd:command>
- <cd:command name="startlinenote" generated="yes" variant="instance" level="document" category="structure notes" file="strc-lnt.mkvi">
+ <cd:command name="startlinenote" generated="yes" variant="instance" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:sequence>
<cd:string value="start"/>
<cd:instance value="linenote"/>
@@ -667,7 +612,7 @@
</cd:instances>
</cd:command>
- <cd:command name="stoplinenote" generated="yes" variant="instance" level="document" category="structure notes" file="strc-lnt.mkvi">
+ <cd:command name="stoplinenote" generated="yes" variant="instance" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:sequence>
<cd:string value="stop"/>
<cd:instance value="linenote"/>
@@ -680,43 +625,20 @@
</cd:instances>
</cd:command>
- <cd:command name="fromlinenote" level="document" category="structure notes" file="strc-lnt.mkvi">
+ <cd:command name="fromlinenote" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="tolinenote" level="document" category="structure notes" file="strc-lnt.mkvi">
+ <cd:command name="tolinenote" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference"/>
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="linenote" level="document" category="structure notes" file="strc-lnt.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="startlinenote" level="document" category="structure notes" file="strc-lnt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="stoplinenote" level="document" category="structure notes" file="strc-lnt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="definetextnote" level="style" category="structure notes" file="strc-tnt.mkiv">
+ <cd:command name="definetextnote" level="style" category="structure" keywords="notes" file="strc-tnt.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -726,7 +648,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuptextnote" level="style" category="structure notes" file="strc-tnt.mkiv">
+ <cd:command name="setuptextnote" level="style" category="structure" keywords="notes" file="strc-tnt.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -750,7 +672,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="textnote" generated="yes" level="document" category="structure notes" file="strc-tnt.mkiv">
+ <cd:command name="textnote" generated="yes" variant="example" level="document" category="structure" keywords="notes" file="strc-tnt.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setuptextnote"/>
@@ -759,4 +681,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-object.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-object.xml
index 2083c357280..b5768d01264 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-object.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-object.xml
@@ -93,7 +93,7 @@
<cd:command name="defaultobjectpage" level="system" category="pdf" file="pack-obj.mkiv"/>
- <cd:command name="doifelseobjectfound" level="system" category="pdf conditional" file="pack-obj.mkiv">
+ <cd:command name="doifelseobjectfound" level="system" category="pdf" keywords="conditional" file="pack-obj.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -102,7 +102,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifobjectfoundelse" level="system" category="pdf conditional" file="pack-obj.mkiv">
+ <cd:command name="doifobjectfoundelse" level="system" category="pdf" keywords="conditional" file="pack-obj.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -111,7 +111,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseobjectreferencefound" level="system" category="pdf conditional" file="pack-obj.mkiv">
+ <cd:command name="doifelseobjectreferencefound" level="system" category="pdf" keywords="conditional" file="pack-obj.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -120,7 +120,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifobjectreferencefoundelse" level="system" category="pdf conditional" file="pack-obj.mkiv">
+ <cd:command name="doifobjectreferencefoundelse" level="system" category="pdf" keywords="conditional" file="pack-obj.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -129,4 +129,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-offset.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-offset.xml
index 15a162b1a8a..eca889a35f9 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-offset.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-offset.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupoffsetbox" level="style" category="layout" file="pack-box.mkiv">
+ <cd:command name="setupoffsetbox" level="style" category="boxes" keywords="layout" file="pack-box.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="x">
@@ -44,7 +44,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupoffset" level="style" category="layout" file="pack-box.mkiv">
+ <cd:command name="setupoffset" level="style" category="boxes" keywords="layout" file="pack-box.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupoffsetbox"/>
@@ -52,7 +52,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="offsetbox" level="system" category="layout" file="pack-box.mkiv">
+ <cd:command name="offsetbox" level="system" category="boxes" keywords="layout" file="pack-box.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupoffsetbox"/>
@@ -62,7 +62,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="offset" level="document" category="layout" file="pack-box.mkiv">
+ <cd:command name="offset" level="document" category="boxes" keywords="layout" file="pack-box.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupoffset"/>
@@ -71,4 +71,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-opposite.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-opposite.xml
index 3ed22559f3f..3f32f3c2bc6 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-opposite.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-opposite.xml
@@ -26,4 +26,4 @@
<cd:command name="opposite" type="environment" level="document" category="layout" file="page-fac.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-orientation.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-orientation.xml
new file mode 100644
index 00000000000..8749bf278a6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-orientation.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?context-directive job ctxfile x-setups.ctx ?>
+
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
+
+ <cd:command name="defineorientation" level="style" category="alignment" file="pack-ori.mkxl">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setuporientation"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setuporientation" level="style" category="alignment" file="pack-ori.mkxl">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
+ <cd:assignments list="yes">
+ <cd:parameter name="orientation">
+ <cd:constant type="up"/>
+ <cd:constant type="down"/>
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="top"/>
+ <cd:constant type="bottom"/>
+ <cd:constant type="normal" default="yes"/>
+ </cd:parameter>
+ <cd:parameter name="horizontal">
+ <cd:constant type="left"/>
+ <cd:constant type="middle"/>
+ <cd:constant type="right"/>
+ <cd:constant type="flushleft"/>
+ <cd:constant type="flushright"/>
+ <cd:constant type="normal" default="yes"/>
+ </cd:parameter>
+ <cd:parameter name="vertical">
+ <cd:constant type="line"/>
+ <cd:constant type="top"/>
+ <cd:constant type="middle"/>
+ <cd:constant type="bottom"/>
+ <cd:constant type="normal" default="yes"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="theorientation" level="system" category="alignment" file="pack-ori.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-orientation"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="autoorientation" level="system" category="alignment" file="pack-ori.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-orientation"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="doifelseorientation" level="system" category="alignment" keywords="conditional" file="pack-ori.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-orientation"/>
+ <cd:resolve name="argument-true"/>
+ <cd:resolve name="argument-false"/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-ornament.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-ornament.xml
index 847fda4e634..7bc6d9f4e7b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-ornament.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-ornament.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="ornamenttext" variant="collector" level="document" category="background fonts colors" file="pack-box.mkiv">
+ <cd:command name="ornamenttext" variant="collector" level="document" category="background" keywords="fonts colors" file="pack-box.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="alternative">
@@ -27,7 +27,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="ornamenttext" variant="layer" level="document" category="background fonts colors" file="pack-box.mkiv">
+ <cd:command name="ornamenttext" variant="layer" level="document" category="background" keywords="fonts colors" file="pack-box.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="alternative">
@@ -44,7 +44,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="ornamenttext" variant="direct" level="document" category="background fonts colors" file="pack-box.mkiv">
+ <cd:command name="ornamenttext" variant="direct" level="document" category="background" keywords="fonts colors" file="pack-box.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="argument-text"/>
@@ -52,7 +52,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="defineornament" variant="collector" level="style" category="background fonts colors" file="pack-box.mkiv">
+ <cd:command name="defineornament" variant="collector" level="style" category="background" keywords="fonts colors" file="pack-box.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -74,7 +74,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="defineornament" variant="layer" level="style" category="background fonts colors" file="pack-box.mkiv">
+ <cd:command name="defineornament" variant="layer" level="style" category="background" keywords="fonts colors" file="pack-box.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -90,7 +90,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="ornament" generated="yes" variant="example" level="document" category="background fonts colors" file="pack-box.mkiv">
+ <cd:command name="ornament" generated="yes" variant="example" level="document" category="background" keywords="fonts colors" file="pack-box.mkiv">
<cd:sequence>
<cd:variable value="ornament"/>
</cd:sequence>
@@ -100,4 +100,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-output.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-output.xml
index 28b5b379985..c5b9f796df3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-output.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-output.xml
@@ -46,4 +46,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-overlay.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-overlay.xml
index 40d0bda93eb..55773c62505 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-overlay.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-overlay.xml
@@ -12,9 +12,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="overlaycolor" level="system" category="background colors" file="pack-rul.mkiv"/>
+ <cd:command name="overlaycolor" level="system" category="background colors" keywords="background colors" file="pack-rul.mkiv"/>
- <cd:command name="overlaylinecolor" level="system" category="background colors" file="pack-rul.mkiv"/>
+ <cd:command name="overlaylinecolor" level="system" category="background colors" keywords="background colors" file="pack-rul.mkiv"/>
<cd:command name="overlaywidth" level="system" category="background" file="pack-rul.mkiv"/>
@@ -26,7 +26,7 @@
<cd:command name="overlaylinewidth" level="system" category="background" file="pack-rul.mkiv"/>
- <cd:command name="doifelseoverlay" level="system" category="background conditional" file="pack-rul.mkiv">
+ <cd:command name="doifelseoverlay" level="system" category="background" keywords="conditional" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -34,7 +34,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifoverlayelse" level="system" category="background conditional" file="pack-rul.mkiv">
+ <cd:command name="doifoverlayelse" level="system" category="background" keywords="conditional" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -42,4 +42,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagebreak.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagebreak.xml
index 9972800ecdf..a6a5a8697d3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagebreak.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagebreak.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definepagebreak" level="style" file="page-brk.mkiv">
+ <cd:command name="definepagebreak" level="style" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes">
@@ -13,7 +13,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="pagebreak" level="document" file="page-brk.mkiv">
+ <cd:command name="pagebreak" level="document" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:resolve name="value-pagebreak"/>
@@ -22,7 +22,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="page" level="document" file="page-brk.mkiv">
+ <cd:command name="page" level="document" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:inherit name="pagebreak"/>
@@ -30,7 +30,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="definecolumnbreak" level="style" file="page-brk.mkiv">
+ <cd:command name="definecolumnbreak" level="style" category="structure" keywords="columns" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes">
@@ -39,7 +39,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="columnbreak" level="document" file="page-brk.mkiv">
+ <cd:command name="columnbreak" level="document" category="structure" keywords="columns" file="page-brk.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:resolve name="value-columnbreak"/>
@@ -48,7 +48,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="column" level="document" file="page-brk.mkiv">
+ <cd:command name="column" level="document" category="structure" keywords="columns" file="page-brk.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:inherit name="columnbreak"/>
@@ -56,7 +56,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="definepagechecker" level="style" file="page-brk.mkiv">
+ <cd:command name="definepagechecker" level="style" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -66,7 +66,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuppagechecker" level="style" file="page-brk.mkiv">
+ <cd:command name="setuppagechecker" level="style" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -95,7 +95,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="checkpage" level="document" file="page-brk.mkiv">
+ <cd:command name="checkpage" level="document" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -104,32 +104,32 @@
</cd:arguments>
</cd:command>
- <cd:command name="testpage" level="document" file="page-brk.mkiv">
+ <cd:command name="testpage" level="document" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number"/>
<cd:resolve name="keyword-dimension-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="testpageonly" level="system" file="page-brk.mkiv">
+ <cd:command name="testpageonly" level="system" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number"/>
<cd:resolve name="keyword-dimension-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="testpagesync" level="system" file="page-brk.mkiv">
+ <cd:command name="testpagesync" level="system" category="structure" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number"/>
<cd:resolve name="keyword-dimension-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="testcolumn" level="document" file="page-brk.mkiv">
+ <cd:command name="testcolumn" level="document" category="structure" keywords="columns" file="page-brk.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number"/>
<cd:resolve name="keyword-dimension-optional"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagecolumns.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagecolumns.xml
index 07ab20abba8..abeedb8b8c2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagecolumns.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagecolumns.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definepagecolumns" level="style" category="structure layout" file="page-pcl.mkiv">
+ <cd:command name="definepagecolumns" level="style" category="columns" keywords="structure layout" file="page-pcl.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuppagecolumns" level="style" category="structure layout" file="page-pcl.mkiv">
+ <cd:command name="setuppagecolumns" level="style" category="columns" keywords="structure layout" file="page-pcl.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -67,13 +67,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="pagecolumns" type="environment" variant="name" level="document" category="structure layout" file="page-pcl.mkiv">
+ <cd:command name="pagecolumns" type="environment" variant="name" level="document" category="columns" keywords="structure layout" file="page-pcl.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="pagecolumns" type="environment" level="document" category="structure layout" file="page-pcl.mkiv">
+ <cd:command name="pagecolumns" type="environment" level="document" category="columns" keywords="structure layout" file="page-pcl.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setuppagecolumns"/>
@@ -81,7 +81,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="pagecolumns" type="environment" generated="yes" variant="instance" level="document" category="structure layout" file="page-pcl.mkiv">
+ <cd:command name="pagecolumns" type="environment" generated="yes" variant="instance" level="document" category="columns" keywords="structure layout" file="page-pcl.mkiv">
<cd:sequence>
<cd:instance value="pagecolumns"/>
</cd:sequence>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagecomment.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagecomment.xml
index 75b9056a8d1..8e72c42a9fc 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagecomment.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagecomment.xml
@@ -37,4 +37,4 @@
<cd:command name="pagecomment" type="environment" level="document" category="pdf" file="page-com.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagefigure.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagefigure.xml
index 0e8af435f83..5eba4ff2826 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagefigure.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagefigure.xml
@@ -32,4 +32,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagegrid.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagegrid.xml
index 8b2cd86b900..be394ba5a2d 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagegrid.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagegrid.xml
@@ -6,7 +6,7 @@
<!--
- <cd:command name="definepagegrid" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="definepagegrid" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -18,7 +18,7 @@
-->
- <cd:command name="definecolumnset" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="definecolumnset" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -30,7 +30,7 @@
<!--
- <cd:command name="setuppagegrid" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setuppagegrid" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -76,7 +76,7 @@
-->
- <cd:command name="setupcolumnset" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setupcolumnset" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:constant type="cd:name"/>
@@ -124,7 +124,7 @@
<!--
- <cd:command name="pagegrid" type="environment" generated="yes" variant="example" level="document" category="layout" file="page-cst.mkiv">
+ <cd:command name="pagegrid" type="environment" generated="yes" variant="example" level="document" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:sequence>
<cd:variable value="pagegrid"/>
</cd:sequence>
@@ -135,7 +135,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="pagegrid" type="environment" level="document" category="layout" file="page-cst.mkiv">
+ <cd:command name="pagegrid" type="environment" level="document" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -146,7 +146,7 @@
-->
- <cd:command name="columnset" type="environment" generated="yes" variant="example" level="document" category="layout" file="page-cst.mkiv">
+ <cd:command name="columnset" type="environment" generated="yes" variant="example" level="document" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:sequence>
<cd:variable value="columnset"/>
</cd:sequence>
@@ -157,7 +157,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="columnset" type="environment" level="document" category="layout" file="page-cst.mkiv">
+ <cd:command name="columnset" type="environment" level="document" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -168,7 +168,7 @@
<!--
- <cd:command name="setpagegrid" level="document" category="layout" file="page-cst.mkiv">
+ <cd:command name="setpagegrid" level="document" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:parameter name="c">
@@ -186,7 +186,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="definepagegridspan" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="definepagegridspan" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -198,7 +198,7 @@
-->
- <cd:command name="definecolumnsetspan" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="definecolumnsetspan" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -210,7 +210,7 @@
<!--
- <cd:command name="setuppagegridspan" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setuppagegridspan" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -236,7 +236,7 @@
-->
- <cd:command name="setupcolumnsetspan" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setupcolumnsetspan" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -262,7 +262,7 @@
<!--
- <cd:command name="pagegridspan" type="environment" level="document" category="layout" file="page-cst.mkiv">
+ <cd:command name="pagegridspan" type="environment" level="document" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -273,7 +273,7 @@
-->
- <cd:command name="columnsetspan" type="environment" level="document" category="layout" file="page-cst.mkiv">
+ <cd:command name="columnsetspan" type="environment" level="document" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -306,7 +306,7 @@
<!--
- <cd:command name="pagegridspanwidth" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="pagegridspanwidth" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
@@ -314,7 +314,7 @@
-->
- <cd:command name="columnsetspanwidth" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="columnsetspanwidth" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
@@ -322,7 +322,7 @@
<!--
- <cd:command name="definepagegridarea" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="definepagegridarea" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -334,7 +334,7 @@
-->
- <cd:command name="definecolumnsetarea" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="definecolumnsetarea" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -346,7 +346,7 @@
<!--
- <cd:command name="setuppagegridarea" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setuppagegridarea" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -386,7 +386,7 @@
-->
- <cd:command name="setupcolumnsetarea" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setupcolumnsetarea" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -426,7 +426,7 @@
<!--
- <cd:command name="setuppagegridareatext" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setuppagegridareatext" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-text"/>
@@ -435,7 +435,7 @@
-->
- <cd:command name="setupcolumnsetareatext" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setupcolumnsetareatext" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-text"/>
@@ -444,7 +444,7 @@
<!--
- <cd:command name="setuppagegridlines" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setuppagegridlines" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-number"/>
@@ -455,7 +455,7 @@
-->
- <cd:command name="setupcolumnsetlines" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setupcolumnsetlines" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-number"/>
@@ -466,7 +466,7 @@
<!--
- <cd:command name="setuppagegridstart" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setuppagegridstart" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-number"/>
@@ -477,7 +477,7 @@
-->
- <cd:command name="setupcolumnsetstart" level="style" category="layout" file="page-cst.mkiv">
+ <cd:command name="setupcolumnsetstart" level="style" category="columns" keywords="structure layout" file="page-cst.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-number"/>
@@ -486,4 +486,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pageinjection.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pageinjection.xml
index f2ded298e88..e98272cd516 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pageinjection.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pageinjection.xml
@@ -86,4 +86,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagelayout.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagelayout.xml
index 3aadda0ffb7..06afe400df7 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagelayout.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagelayout.xml
@@ -38,4 +38,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagemarks.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagemarks.xml
index 4d41bbfdd2a..654db57e654 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagemarks.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagemarks.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="markpage" level="style" file="page-ini.mkiv">
+ <cd:command name="markpage" level="style" category="structure" file="page-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes" optional="yes">
@@ -13,19 +13,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="markedpages" level="style" file="page-ini.mkiv">
+ <cd:command name="markedpages" level="style" category="structure" file="page-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="markpages" type="environment" level="style" file="page-ini.mkiv">
+ <cd:command name="markpages" type="environment" level="style" category="structure" file="page-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsemarkedpage" level="style" category="conditional" file="page-ini.mkiv">
+ <cd:command name="doifelsemarkedpage" level="style" category="structure" keywords="conditional" file="page-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -33,4 +33,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagenumber.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagenumber.xml
index 91c0d8f5948..ae3f38cd369 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagenumber.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagenumber.xml
@@ -20,7 +20,7 @@
</cd:assignments>
</cd:define>
- <cd:command name="setuprealpagenumber" level="system" category="counter" file="strc-pag.mkiv">
+ <cd:command name="setuprealpagenumber" level="system" category="counter" keywords="structure" file="strc-pag.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupcounter"/>
@@ -28,13 +28,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupuserpagenumber" level="style" category="counter" file="strc-pag.mkiv">
+ <cd:command name="setupuserpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv">
<cd:arguments>
<cd:resolve name="assignment-setupuserpagenumber"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupsubpagenumber" level="style" category="counter" file="strc-pag.mkiv">
+ <cd:command name="setupsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:inherit name="setupcounter"/>
@@ -42,7 +42,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuppagenumber" level="style" category="counter" file="strc-pag.mkiv">
+ <cd:command name="setuppagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv">
<cd:arguments>
<cd:resolve name="assignment-setupuserpagenumber"/>
</cd:arguments>
@@ -54,13 +54,13 @@
-->
- <cd:command name="resetuserpagenumber" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="resetuserpagenumber" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="resetsubpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="resetsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="resetpagenumber" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="resetpagenumber" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="setuppagenumbering" level="style" category="counter" file="strc-pag.mkiv">
+ <cd:command name="setuppagenumbering" level="style" category="counter" keywords="structure" file="strc-pag.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="alternative">
@@ -102,6 +102,7 @@
<cd:constant type="inmargin"/>
<cd:constant type="atmargin"/>
<cd:constant type="marginedge"/>
+ <cd:constant type="none"/>
</cd:parameter>
<cd:parameter name="style">
<cd:resolve name="value-style"/>
@@ -113,74 +114,74 @@
</cd:arguments>
</cd:command>
- <cd:command name="firstrealpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="firstrealpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="firstuserpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="firstuserpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="firstsubpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="firstsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="lastrealpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="lastrealpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="lastuserpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="lastuserpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="lastsubpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="lastsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="prevrealpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="prevrealpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="prevuserpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="prevuserpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="prevsubpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="prevsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="nextrealpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="nextrealpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="nextuserpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="nextuserpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="nextsubpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="nextsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="firstrealpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="firstrealpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="firstuserpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="firstuserpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="firstsubpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="firstsubpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="prevrealpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="prevrealpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="prevuserpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="prevuserpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="prevsubpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="prevsubpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="nextrealpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="nextrealpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="nextuserpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="nextuserpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="nextsubpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="nextsubpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="lastrealpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="lastrealpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="lastuserpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="lastuserpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="lastsubpage" level="system" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="lastsubpage" level="system" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="realpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="realpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="userpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="userpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="subpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="subpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="pagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="pagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="prefixedpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="prefixedpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="incrementpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="incrementpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="incrementsubpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="incrementsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="decrementpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="decrementpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="decrementsubpagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="decrementsubpagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="completepagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="completepagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
- <cd:command name="placepagenumber" level="style" category="counter" file="strc-pag.mkiv"/>
+ <cd:command name="placepagenumber" level="style" category="counter" keywords="structure" file="strc-pag.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pageselection.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pageselection.xml
index 082f53b6de0..5432ca34e84 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pageselection.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pageselection.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="insertpages" level="document" file="page-sel.mkvi">
+ <cd:command name="insertpages" level="document" category="graphics" keywords="structure" file="page-sel.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
<cd:resolve name="keyword-number-list-optional"/>
@@ -22,7 +22,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="filterpages" level="document" file="page-sel.mkvi">
+ <cd:command name="filterpages" level="document" category="graphics" keywords="structure" file="page-sel.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
<cd:keywords list="yes">
@@ -45,7 +45,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="copypages" level="document" file="page-sel.mkvi">
+ <cd:command name="copypages" level="document" category="graphics" keywords="structure" file="page-sel.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
<cd:assignments list="yes" optional="yes">
@@ -66,7 +66,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="combinepages" level="document" file="page-sel.mkvi">
+ <cd:command name="combinepages" level="document" category="graphics" keywords="structure" file="page-sel.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
<cd:assignments list="yes" optional="yes">
@@ -132,7 +132,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="slicepages" level="document" file="page-sel.mkvi">
+ <cd:command name="slicepages" level="document" category="graphics" keywords="structure" file="page-sel.mkvi">
<cd:arguments>
<cd:resolve name="keyword-file"/>
<cd:assignments list="yes" optional="yes">
@@ -178,4 +178,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pageshift.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pageshift.xml
index 01e014a28ab..c0b167464d6 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pageshift.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pageshift.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definepageshift" level="style" file="page-imp.mkiv">
+ <cd:command name="definepageshift" level="style" category="layout" file="page-imp.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords>
@@ -15,7 +15,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuppageshift" level="style" file="page-imp.mkiv">
+ <cd:command name="setuppageshift" level="style" category="layout" file="page-imp.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="page" default="yes"/>
@@ -26,4 +26,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pagestate.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pagestate.xml
index e705ba7e715..699b1fcdaf2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pagestate.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pagestate.xml
@@ -4,18 +4,25 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="signalrightpage" level="system" file="spac-pag.mkiv"/>
+ <cd:command name="signalrightpage" level="system" category="twopassdata" file="spac-pag.mkiv"/>
- <cd:command name="doifelserightpage" level="system" file="spac-pag.mkiv">
+ <cd:command name="doifelserightpage" level="system" category="twopassdata" keywords="conditional" file="spac-pag.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="rightpageorder" level="system" file="spac-pag.mkiv"/>
+ <cd:command name="doifrightpageelse" level="system" category="twopassdata" keywords="conditional" file="spac-pag.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-true"/>
+ <cd:resolve name="argument-false"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="rightpageorder" level="system" category="twopassdata" file="spac-pag.mkiv"/>
- <cd:command name="definepagestate" level="system" file="core-dat.mkiv">
+ <cd:command name="definepagestate" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -25,7 +32,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuppagestate" level="system" file="core-dat.mkiv">
+ <cd:command name="setuppagestate" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -37,7 +44,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setpagestate" level="system" file="core-dat.mkiv">
+ <cd:command name="setpagestate" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords optional="yes">
@@ -47,7 +54,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="pagestaterealpage" level="system" file="core-dat.mkiv">
+ <cd:command name="pagestaterealpage" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -57,7 +64,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setpagestaterealpageno" level="system" file="core-dat.mkiv">
+ <cd:command name="setpagestaterealpageno" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -67,7 +74,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="pagestaterealpageorder" level="system" file="core-dat.mkiv">
+ <cd:command name="pagestaterealpageorder" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces">
@@ -77,19 +84,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="autopagestaterealpage" level="system" file="core-dat.mkiv">
+ <cd:command name="autopagestaterealpage" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setautopagestaterealpageno" level="system" file="core-dat.mkiv">
+ <cd:command name="setautopagestaterealpageno" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="autopagestaterealpageorder" level="system" file="core-dat.mkiv">
+ <cd:command name="autopagestaterealpageorder" level="system" category="twopassdata" keywords="counter pagenumber" file="core-dat.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pairedbox.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pairedbox.xml
index a5a0b9b5f62..b7f9b24d819 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pairedbox.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pairedbox.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definepairedbox" level="style" file="pack-com.mkiv">
+ <cd:command name="definepairedbox" level="style" category="tables" file="pack-com.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuppairedbox" level="style" file="pack-com.mkiv">
+ <cd:command name="setuppairedbox" level="style" category="tables" file="pack-com.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -70,7 +70,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="placepairedbox" level="document" file="pack-com.mkiv">
+ <cd:command name="placepairedbox" level="document" category="tables" file="pack-com.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -81,7 +81,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="placepairedbox" type="environment" level="document" file="pack-com.mkiv">
+ <cd:command name="placepairedbox" type="environment" level="document" category="tables" file="pack-com.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -90,7 +90,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setuppairedbox" generated="yes" variant="instance" level="style" file="pack-com.mkiv">
+ <cd:command name="setuppairedbox" generated="yes" variant="instance" level="style" category="tables" file="pack-com.mkiv">
<cd:sequence>
<cd:string value="setup"/>
<cd:instance value="pairedbox"/>
@@ -105,7 +105,7 @@
</cd:instances>
</cd:command>
- <cd:command name="placepairedbox" generated="yes" variant="instance" level="document" file="pack-com.mkiv">
+ <cd:command name="placepairedbox" generated="yes" variant="instance" level="document" category="tables" file="pack-com.mkiv">
<cd:sequence>
<cd:string value="place"/>
<cd:instance value="pairedbox"/>
@@ -122,7 +122,7 @@
</cd:instances>
</cd:command>
- <cd:command name="placepairedbox" type="environment" generated="yes" variant="instance" level="document" file="pack-com.mkiv">
+ <cd:command name="placepairedbox" type="environment" generated="yes" variant="instance" level="document" category="tables" file="pack-com.mkiv">
<cd:sequence>
<cd:string value="place"/>
<cd:instance value="pairedbox"/>
@@ -137,48 +137,18 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setuplegend" level="document" file="pack-com.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setuppairedbox"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelegend" level="document" file="pack-com.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuppairedbox"/>
- </cd:assignments>
- <cd:content/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelegend" type="environment" level="document" file="pack-com.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuppairedbox"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
- <cd:command name="placeontopofeachother" level="document" file="pack-com.mkiv">
+ <cd:command name="placeontopofeachother" level="document" category="tables" file="pack-com.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="placesidebyside" level="document" file="pack-com.mkiv">
+ <cd:command name="placesidebyside" level="document" category="tables" file="pack-com.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-papersize.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-papersize.xml
index 8156235bddb..4b92bda9a35 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-papersize.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-papersize.xml
@@ -300,4 +300,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-paragraph.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-paragraph.xml
index b253f404b47..c729f76d487 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-paragraph.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-paragraph.xml
@@ -68,4 +68,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphnumber.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphnumber.xml
index 6d35f11a04c..1a3c7cb4245 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphnumber.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphnumber.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupparagraphnumbering" level="style" category="structure counter" file="page-par.mkiv">
+ <cd:command name="setupparagraphnumbering" level="style" category="structure" keywords="counter" file="page-par.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="state">
@@ -26,4 +26,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphs.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphs.xml
index e2fc9116e76..bbbbe1bf2e0 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphs.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-paragraphs.xml
@@ -166,4 +166,4 @@
<cd:command name="paragraphscell" type="environment" level="document" category="tables" file="tabl-mis.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-parallel.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-parallel.xml
index 3f7154c9f4b..365e4beb6e9 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-parallel.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-parallel.xml
@@ -4,14 +4,14 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineparallel" level="style" file="buff-par.mkvi">
+ <cd:command name="defineparallel" level="style" category="columns" keywords="structure" file="buff-par.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupparallel" level="style" file="buff-par.mkvi">
+ <cd:command name="setupparallel" level="style" category="columns" keywords="structure" file="buff-par.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-list"/>
@@ -32,7 +32,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="placeparallel" level="document" file="buff-par.mkvi">
+ <cd:command name="placeparallel" level="document" category="columns" keywords="structure" file="buff-par.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-list"/>
@@ -42,7 +42,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseparallel" level="style" category="conditional" file="buff-par.mkvi">
+ <cd:command name="doifelseparallel" level="style" category="columns" keywords="structure conditional" file="buff-par.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces" list="yes">
@@ -54,7 +54,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifparallelelse" level="style" category="conditional" file="buff-par.mkvi">
+ <cd:command name="doifparallelelse" level="style" category="columns" keywords="structure conditional" file="buff-par.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:keywords delimiters="braces" list="yes">
@@ -66,7 +66,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="resetparallel" level="style" file="buff-par.mkvi">
+ <cd:command name="resetparallel" level="style" category="columns" keywords="structure" file="buff-par.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords list="yes" optional="yes">
@@ -76,10 +76,10 @@
</cd:arguments>
</cd:command>
- <cd:command name="parallel" type="environment" generated="yes" variant="example" level="document" file="buff-par.mkvi">
+ <cd:command name="parallel" type="environment" generated="yes" variant="example" level="document" category="columns" keywords="structure" file="buff-par.mkvi">
<cd:sequence>
<cd:variable value="parallel"/>
</cd:sequence>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-parbuilder.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-parbuilder.xml
index 95621fce03e..243e4c9bd36 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-parbuilder.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-parbuilder.xml
@@ -32,4 +32,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-parwrapper.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-parwrapper.xml
new file mode 100644
index 00000000000..2cb5ee0717d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-parwrapper.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?context-directive job ctxfile x-setups.ctx ?>
+
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
+
+ <cd:command name="freezeparagraphproperties" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="defrostparagraphproperties" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="updateparagraphproperties" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="updateparagraphpenalties" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="updateparagraphdemerits" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="updateparagraphshapes" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="setparagraphfreezing" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="forgetparagraphfreezing" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="registerparwrapper" level="system" category="whitespace" file="spac-par.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ <cd:content/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="registerparwrapperreverse" level="system" category="whitespace" file="spac-par.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ <cd:content/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="directparwrapper" level="system" category="whitespace" file="spac-par.mkxl">
+ <cd:arguments>
+ <cd:content/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="forgetparwrapper" level="system" category="whitespace" file="spac-par.mkxl"/>
+
+ <cd:command name="unregisterparwrapper" level="system" category="whitespace" file="spac-par.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="doifelseparwrapper" level="system" category="whitespace" file="spac-par.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ <cd:resolve name="argument-true"/>
+ <cd:resolve name="argument-false"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="showparwrapperstate" level="system" category="whitespace" file="spac-par.mkxl">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="getparwrapper" level="system" category="whitespace" file="spac-par.lmt">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="lastparwrapper" level="system" category="whitespace" file="spac-par.lmt">
+ <cd:arguments>
+ <cd:resolve name="argument-name"/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-pdf.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-pdf.xml
index fc83777a1f4..1d835158f37 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-pdf.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-pdf.xml
@@ -128,4 +128,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-penalty.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-penalty.xml
index d69c196f993..527a5167023 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-penalty.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-penalty.xml
@@ -26,4 +26,4 @@
<cd:command name="setdefaultpenalties" level="system" category="layout" file="spac-ver.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-periods.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-periods.xml
index 5cded3b1c6a..2fd4e8d3812 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-periods.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-periods.xml
@@ -40,4 +40,4 @@
<cd:command name="unknown" level="document" category="symbols" file="enco-ini.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-phantom.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-phantom.xml
index 8458be67b7e..2d5e152ccbb 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-phantom.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-phantom.xml
@@ -4,25 +4,25 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="phantom" level="style" file="supp-box.mkiv">
+ <cd:command name="phantom" level="style" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="hphantom" level="style" file="supp-box.mkiv">
+ <cd:command name="hphantom" level="style" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="vphantom" level="style" file="supp-box.mkiv">
+ <cd:command name="vphantom" level="style" category="strings" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="phantombox" level="style" file="pack-box.mkiv">
+ <cd:command name="phantombox" level="style" category="boxes" keywords="strings" file="pack-box.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="width">
@@ -38,4 +38,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-placeholder.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-placeholder.xml
new file mode 100644
index 00000000000..cbabf73ff9e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-placeholder.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?context-directive job ctxfile x-setups.ctx ?>
+
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
+
+ <cd:command name="defineplaceholder" level="style" category="structure" file="typo-plc.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setupplaceholder"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setupplaceholder" level="style" category="structure" file="typo-plc.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
+ <cd:assignments list="yes">
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="text">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="style">
+ <cd:resolve name="value-style"/>
+ </cd:parameter>
+ <cd:parameter name="color">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="placeholder" level="document" category="structure" file="typo-plc.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-placement.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-placement.xml
index 665d9aeb887..e07998a69a4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-placement.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-placement.xml
@@ -72,4 +72,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-position.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-position.xml
index b9f4b3780bf..435f58ebb16 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-position.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-position.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="doifpositionaction" level="system" category="conditional" file="anch-pgr.mkiv">
+ <cd:command name="doifpositionaction" level="system" keywords="conditional" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepositionaction" level="system" category="conditional" file="anch-pgr.mkiv">
+ <cd:command name="doifelsepositionaction" level="system" keywords="conditional" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -20,7 +20,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpositionactionelse" level="system" category="conditional" file="anch-pgr.mkiv">
+ <cd:command name="doifpositionactionelse" level="system" keywords="conditional" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -40,7 +40,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="MPoverlayanchor" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="MPoverlayanchor" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
@@ -59,14 +59,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="MPpositiongraphic" type="environment" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="MPpositiongraphic" type="environment" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key-list-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPpositiongraphic" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="MPpositiongraphic" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:assignments delimiters="braces" list="yes" optional="yes">
@@ -77,13 +77,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="MPpositionmethod" type="environment" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="MPpositionmethod" type="environment" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setMPpositiongraphic" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="setMPpositiongraphic" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -95,7 +95,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setMPpositiongraphicrange" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="setMPpositiongraphicrange" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -108,21 +108,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="MPgetposboxes" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="MPgetposboxes" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPgetmultipars" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="MPgetmultipars" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="MPgetmultishape" level="system" category="background metapost" file="anch-pgr.mkiv">
+ <cd:command name="MPgetmultishape" level="system" category="background" keywords="metapost" file="anch-pgr.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -386,7 +386,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifposition" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifposition" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -394,7 +394,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseposition" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifelseposition" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -402,7 +402,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpositionelse" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifpositionelse" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -410,7 +410,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepositiononpage" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifelsepositiononpage" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -419,7 +419,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpositiononpageelse" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifpositiononpageelse" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -467,7 +467,7 @@
<cd:command name="disableparpositions" level="system" file="anch-pos.mkiv"/>
- <cd:command name="doifelseoverlapping" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifelseoverlapping" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -476,7 +476,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifoverlappingelse" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifoverlappingelse" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -485,7 +485,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepositionsonsamepage" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifelsepositionsonsamepage" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -493,7 +493,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpositionsonsamepageelse" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifpositionsonsamepageelse" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -501,7 +501,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepositionsonthispage" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifelsepositionsonthispage" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -509,7 +509,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifpositionsonthispageelse" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifpositionsonthispageelse" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -517,18 +517,18 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsepositionsused" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifelsepositionsused" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifpositionsusedelse" level="system" category="conditional" file="anch-pos.mkiv">
+ <cd:command name="doifpositionsusedelse" level="system" keywords="conditional" file="anch-pos.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-positionbar.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-positionbar.xml
index 286466befe1..037045aaaba 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-positionbar.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-positionbar.xml
@@ -70,4 +70,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-positioning.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-positioning.xml
index 9d873fd46ee..7c3b2cb9a54 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-positioning.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-positioning.xml
@@ -95,4 +95,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-postponing.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-postponing.xml
index 0d4c98d7ae1..929a0c75dae 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-postponing.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-postponing.xml
@@ -12,4 +12,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-processor.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-processor.xml
index 7e23c66311f..2b0f66e36e5 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-processor.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-processor.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineprocessor" level="style" category="fonts colors" file="typo-prc.mkvi">
+ <cd:command name="defineprocessor" level="style" category="fonts" keywords="colors" file="typo-prc.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupprocessor" level="style" category="fonts colors" file="typo-prc.mkvi">
+ <cd:command name="setupprocessor" level="style" category="fonts" keywords="colors" file="typo-prc.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -41,11 +41,11 @@
</cd:arguments>
</cd:command>
- <cd:command name="applyprocessor" level="system" category="fonts colors" file="typo-prc.mkvi">
+ <cd:command name="applyprocessor" level="system" category="fonts" keywords="colors" file="typo-prc.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-profile.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-profile.xml
index acc486cb7eb..af98e9c10c5 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-profile.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-profile.xml
@@ -97,4 +97,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-publication.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-publication.xml
index b6280047aa5..e77274869c4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-publication.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-publication.xml
@@ -807,7 +807,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifelse" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifelse" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-btxfield"/>
<cd:resolve name="argument-true"/>
@@ -815,14 +815,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoif" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoif" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-btxfield"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifnot" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifnot" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-btxfield"/>
<cd:resolve name="argument-true"/>
@@ -835,7 +835,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifelsesameaspreviouschecked" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifelsesameaspreviouschecked" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="always"/>
@@ -847,7 +847,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifelsesameasprevious" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifelsesameasprevious" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-btxfield"/>
<cd:resolve name="argument-true"/>
@@ -855,7 +855,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifelsecombiinlist" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifelsecombiinlist" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -864,7 +864,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifsameaspreviouscheckedelse" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifsameaspreviouscheckedelse" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="always"/>
@@ -876,7 +876,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifsameaspreviouselse" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifsameaspreviouselse" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-btxfield"/>
<cd:resolve name="argument-true"/>
@@ -884,7 +884,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifcombiinlistelse" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifcombiinlistelse" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -899,7 +899,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifelseuservariable" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifelseuservariable" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-true"/>
@@ -907,7 +907,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxdoifuservariableelse" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxdoifuservariableelse" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-true"/>
@@ -967,7 +967,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxsingularplural" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxsingularplural" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="editor"/>
@@ -979,7 +979,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxsingularorplural" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxsingularorplural" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="editor"/>
@@ -991,7 +991,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="btxoneorrange" level="system" category="bibliography conditional" file="publ-ini.mkiv">
+ <cd:command name="btxoneorrange" level="system" category="bibliography" keywords="conditional" file="publ-ini.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="volume"/>
@@ -1139,4 +1139,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-random.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-random.xml
index a1a17f669f0..8237a4cb982 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-random.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-random.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="getrandomcount" level="system" file="supp-ran.mkiv">
+ <cd:command name="getrandomcount" level="system" category="counter" file="supp-ran.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-number"/>
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="getrandomdimen" level="system" file="supp-ran.mkiv">
+ <cd:command name="getrandomdimen" level="system" category="counter" file="supp-ran.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-dimension"/>
@@ -20,7 +20,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="getrandomnumber" level="system" file="supp-ran.mkiv">
+ <cd:command name="getrandomnumber" level="system" category="counter" file="supp-ran.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-number"/>
@@ -28,7 +28,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="getrandomfloat" level="system" file="supp-ran.mkiv">
+ <cd:command name="getrandomfloat" level="system" category="counter" file="supp-ran.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-number"/>
@@ -36,29 +36,29 @@
</cd:arguments>
</cd:command>
- <cd:command name="setrandomseed" level="system" file="supp-ran.mkiv">
+ <cd:command name="setrandomseed" level="system" category="counter" file="supp-ran.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="getrandomseed" level="system" file="supp-ran.mkiv">
+ <cd:command name="getrandomseed" level="system" category="counter" file="supp-ran.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="randomseed" type="environment" begin="push" end="pop" level="system" file="supp-ran.mkiv"/>
+ <cd:command name="randomseed" type="environment" begin="push" end="pop" level="system" category="counter" file="supp-ran.mkiv"/>
- <cd:command name="reuserandomseed" level="system" file="supp-ran.mkiv"/>
+ <cd:command name="reuserandomseed" level="system" category="counter" file="supp-ran.mkiv"/>
- <cd:command name="randomnumber" level="system" file="supp-ran.mkiv">
+ <cd:command name="randomnumber" level="system" category="counter" file="supp-ran.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="mprandomnumber" level="system" file="supp-ran.mkiv"/>
+ <cd:command name="mprandomnumber" level="system" category="counter" keywords="metapost" file="supp-ran.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf b/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf
index 9d01bdf5ef9..654cbb8deef 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-references.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-references.xml
index 1e3e3466d2f..2774dd39669 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-references.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-references.xml
@@ -49,6 +49,16 @@
<cd:parameter name="prefix">
<cd:resolve name="value-referenceprefix"/>
</cd:parameter>
+ <!-- all margindata locations are possible -->
+ <cd:parameter name="labelalternative">
+ <cd:resolve name="value-margindata"/>
+ </cd:parameter>
+ <cd:parameter name="labelstyle">
+ <cd:resolve name="value-style"/>
+ </cd:parameter>
+ <cd:parameter name="labelcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -138,7 +148,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsereferencefound" level="system" category="references conditional" file="strc-ref.mkvi">
+ <cd:command name="doifelsereferencefound" level="system" category="references" keywords="conditional" file="strc-ref.mkvi">
<cd:arguments>
<cd:resolve name="argument-reference"/>
<cd:resolve name="argument-true"/>
@@ -146,7 +156,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifreferencefoundelse" level="system" category="references conditional" file="strc-ref.mkvi">
+ <cd:command name="doifreferencefoundelse" level="system" category="references" keywords="conditional" file="strc-ref.mkvi">
<cd:arguments>
<cd:resolve name="argument-reference"/>
<cd:resolve name="argument-true"/>
@@ -264,7 +274,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="docheckedpagestate" level="system" category="references" file="strc-ref.mkvi">
+ <cd:command name="doifcheckedpagestate" level="system" category="references" file="strc-ref.mkvi">
<cd:arguments>
<cd:resolve name="argument-reference"/>
<cd:resolve name="argument-command"/>
@@ -411,7 +421,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseurldefined" level="system" category="references conditional" file="strc-ref.mkvi">
+ <cd:command name="doifelseurldefined" level="system" category="references" keywords="conditional" file="strc-ref.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -419,7 +429,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifurldefinedelse" level="system" category="references conditional" file="strc-ref.mkvi">
+ <cd:command name="doifurldefinedelse" level="system" category="references" keywords="conditional" file="strc-ref.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -427,7 +437,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefiledefined" level="system" category="references conditional" file="strc-ref.mkvi">
+ <cd:command name="doifelsefiledefined" level="system" category="references" keywords="conditional" file="strc-ref.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -435,7 +445,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffiledefinedelse" level="system" category="references conditional" file="strc-ref.mkvi">
+ <cd:command name="doiffiledefinedelse" level="system" category="references" keywords="conditional" file="strc-ref.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -563,4 +573,18 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="referencepagestate" level="style" category="references" file="strc-ref.mkvi"/>
+
+ <cd:command name="referencepagedetail" level="style" category="references" file="strc-ref.mkvi"/>
+
+ <cd:command name="referencerealpage" level="style" category="references" file="strc-ref.mkvi"/>
+
+ <cd:command name="referencecolumnnumber" level="style" category="references" file="strc-ref.mkvi"/>
+
+ <cd:command name="tracedpagestate" level="style" category="references" file="strc-ref.mkvi"/>
+
+ <cd:command name="markreferencepage" level="style" category="references" file="strc-ref.mkvi"/>
+
+ <cd:command name="referencesymbol" level="style" category="references" file="strc-ref.mkvi"/>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-regime.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-regime.xml
index e126abb65af..d30d96332f2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-regime.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-regime.xml
@@ -85,4 +85,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-renderingwindow.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-renderingwindow.xml
index 525415c7074..ee2dd9ce554 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-renderingwindow.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-renderingwindow.xml
@@ -59,4 +59,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-replacement.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-replacement.xml
index 1cee232db84..dec893bef38 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-replacement.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-replacement.xml
@@ -7,20 +7,22 @@
<cd:command name="replaceword" level="style" category="language" file="lang-rep.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
- <cd:resolve name="keyword-text"/>
+ <cd:resolve name="keyword-text-optional"/>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="setreplacement" level="style" category="language" file="lang-rep.mkiv">
+ <cd:command name="setreplacements" level="style" category="language" file="lang-rep.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="reset"/>
<cd:constant type="cd:name"/>
</cd:keywords>
+ <!-- command is overloaded in typo-ovl.mkiv with second argument -->
+ <cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="resetreplacement" level="style" category="language" file="lang-rep.mkiv"/>
+ <cd:command name="resetreplacements" level="style" category="language" file="lang-rep.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-rotation.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-rotation.xml
new file mode 100644
index 00000000000..b35f9de1868
--- /dev/null
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-rotation.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?context-directive job ctxfile x-setups.ctx ?>
+
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
+
+ <cd:command name="mirror" level="document" category="graphics" file="grph-trf.mkiv">
+ <cd:arguments>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setuprotate" level="style" category="graphics" file="grph-trf.mkiv">
+ <cd:arguments>
+ <cd:assignments list="yes">
+ <cd:parameter name="location">
+ <cd:constant type="fit"/>
+ <cd:constant type="broad"/>
+ <cd:constant type="depth"/>
+ <cd:constant type="high"/>
+ <cd:constant type="middle"/>
+ <cd:constant type="default"/>
+ <cd:constant type="normal"/>
+ </cd:parameter>
+ <cd:parameter name="rotation">
+ <cd:constant type="left"/>
+ <cd:constant type="right"/>
+ <cd:constant type="inner"/>
+ <cd:constant type="outer"/>
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:inherit name="setupframed"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="rotate" level="document" category="graphics" file="grph-trf.mkiv">
+ <cd:arguments>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setuprotate"/>
+ </cd:assignments>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="dorotatebox" level="system" category="graphics" file="grph-trf.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-number"/>
+ <cd:csname/>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-ruby.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-ruby.xml
index 4422029b80c..65553cdf54d 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-ruby.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-ruby.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineruby" level="style" category="fonts" file="typo-rub.mkiv">
+ <cd:command name="defineruby" level="style" category="language" keywords="fonts" file="typo-rub.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupruby" level="style" category="fonts" file="typo-rub.mkiv">
+ <cd:command name="setupruby" level="style" category="language" keywords="fonts" file="typo-rub.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -60,7 +60,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="ruby" level="document" category="fonts" file="typo-rub.mkiv">
+ <cd:command name="ruby" level="document" category="language" keywords="fonts" file="typo-rub.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="argument-text"/>
@@ -68,10 +68,10 @@
</cd:arguments>
</cd:command>
- <cd:command name="ruby" type="environment" level="document" category="fonts" file="typo-rub.mkiv">
+ <cd:command name="ruby" type="environment" level="document" category="language" keywords="fonts" file="typo-rub.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-scale.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-scale.xml
index 36a46479e9d..4d88c912d74 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-scale.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-scale.xml
@@ -121,4 +121,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-scite.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-scite.xml
index f04e575e015..3e1ed2e8187 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-scite.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-scite.xml
@@ -30,4 +30,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-script.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-script.xml
index affa2658bf1..89a92902419 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-script.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-script.xml
@@ -24,6 +24,7 @@
<cd:constant type="nihongo"/>
<cd:constant type="ethiopic"/>
<cd:constant type="thai"/>
+ <cd:constant type="tibetan"/>
<cd:constant type="test"/>
</cd:parameter>
<cd:parameter name="preset">
@@ -65,7 +66,7 @@
<cd:command name="resetscript" level="system" category="language" file="scrp-ini.mkvi"/>
- <cd:command name="script" type="environment" category="language" file="scrp-ini.mkvi">
+ <cd:command name="script" type="environment" level="document" category="language" file="scrp-ini.mkvi">
<cd:arguments>
<cd:keywords>
<cd:constant type="hangul"/>
@@ -73,6 +74,7 @@
<cd:constant type="nihongo"/>
<cd:constant type="ethiopic"/>
<cd:constant type="thai"/>
+ <cd:constant type="tibetan"/>
<cd:constant type="test"/>
<cd:constant type="cd:name"/>
</cd:keywords>
@@ -88,22 +90,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="hangul" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="hanzi" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="nihongo" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="ethiopic" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="thai" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="latin" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="test" level="document" category="language" file="scrp-ini.mkvi"/>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-section.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-section.xml
index 0ec20a80452..0395a741cf8 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-section.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-section.xml
@@ -546,4 +546,4 @@
<cd:command name="headsetupspacing" level="system" category="structure" file="strc-ren.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-sectionblock.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-sectionblock.xml
index 1cb2debdef5..e9622dac8a2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-sectionblock.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-sectionblock.xml
@@ -81,52 +81,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="frontmatter" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="bodymatter" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="appendices" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="backmatter" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-selector.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-selector.xml
index 44970669b49..d70bb7ab758 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-selector.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-selector.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="defineselector" level="style" file="core-env.mkiv">
+ <cd:command name="defineselector" level="style" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes" optional="yes">
@@ -13,21 +13,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupselector" level="style" file="core-env.mkiv">
+ <cd:command name="setupselector" level="style" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
<cd:parameter name="n">
<cd:constant type="cd:number"/>
</cd:parameter>
- <cd:parameter name="m">
+ <cd:parameter name="max">
<cd:constant type="cd:number"/>
</cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
- <cd:command name="select" level="document" file="core-env.mkiv">
+ <cd:command name="select" level="document" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content optional="yes"/>
@@ -38,7 +38,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="directselect" level="system" file="core-env.mkiv">
+ <cd:command name="directselect" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content optional="yes"/>
@@ -49,4 +49,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-setup.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-setup.xml
index a4420bfcfbb..0cfb216bd2b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-setup.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-setup.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setupsetup" level="style" file="x-setups-basics.mkiv">
+ <cd:command name="setupsetup" level="style" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="criterium">
@@ -19,152 +19,158 @@
</cd:arguments>
</cd:command>
- <cd:command name="basicsetup" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="basicsetup" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="basicsetup" variant="argument" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="basicsetup" variant="argument" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="shortsetup" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="shortsetup" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="shortsetup" variant="argument" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="shortsetup" variant="argument" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="setup" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="setup" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="setup" variant="argument" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="setup" variant="argument" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="showsetup" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="showsetup" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="showsetup" variant="argument" level="system" file="x-setups-basics.mkiv">
+ <cd:command name="showsetup" variant="argument" level="system" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="placesetup" level="document" file="x-setups-basics.mkiv"/>
+ <cd:command name="placesetup" level="document" category="xml" file="x-setups-basics.mkiv"/>
- <cd:command name="placeallsetups" level="document" file="x-setups-basics.mkiv"/>
+ <cd:command name="placeallsetups" level="document" category="xml" file="x-setups-basics.mkiv"/>
- <cd:command name="placeeverysetup" level="document" file="x-setups-basics.mkiv"/>
+ <cd:command name="placeeverysetup" level="document" category="xml" file="x-setups-basics.mkiv"/>
- <cd:command name="showrootvalues" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="showrootvalues" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="showinstancevalues" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="showinstancevalues" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdinternal" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdinternal" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdbasicsetup" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdbasicsetup" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdbasicsetup" variant="argument" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdbasicsetup" variant="argument" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdshortsetup" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdshortsetup" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdshortsetup" variant="argument" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdshortsetup" variant="argument" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdfullsetup" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdfullsetup" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdfullsetup" variant="argument" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdfullsetup" variant="argument" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdbasicsetupinstance" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdbasicsetupinstance" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdshortsetupinstance" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdshortsetupinstance" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="cmdfullsetupinstance" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="cmdfullsetupinstance" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="showdefinition" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="showdefinition" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="showdefinition" variant="argument" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="showdefinition" variant="argument" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="definition" level="document" file="x-setups-basics.mkiv">
+ <cd:command name="definition" level="document" category="xml" file="x-setups-basics.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text-list"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <cd:command name="loadsetups" level="style" category="xml" file="x-setups-basics.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-file-optional"/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-setups.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-setups.xml
index a3773e8f77d..da0a75cb238 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-setups.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-setups.xml
@@ -4,126 +4,126 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setups" level="style" file="core-env.mkiv">
+ <cd:command name="setups" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="setups" variant="direct" level="style" file="core-env.mkiv">
+ <cd:command name="setups" variant="direct" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="setup" level="style" file="core-env.mkiv">
+ <cd:command name="setup" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setup" variant="direct" level="style" file="core-env.mkiv">
+ <cd:command name="setup" variant="direct" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="directsetup" level="style" file="core-env.mkiv">
+ <cd:command name="directsetup" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="fastsetup" level="style" file="core-env.mkiv">
+ <cd:command name="fastsetup" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="texsetup" level="style" file="core-env.mkiv">
+ <cd:command name="texsetup" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="luasetup" level="style" category="lua" file="core-env.mkiv">
+ <cd:command name="luasetup" level="style" category="structure" keywords="lua" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="systemsetups" level="system" file="core-env.mkiv">
+ <cd:command name="systemsetups" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="resetsetups" level="system" file="core-env.mkiv">
+ <cd:command name="resetsetups" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="copysetups" level="system" file="core-env.mkiv">
+ <cd:command name="copysetups" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="showsetupsdefinition" level="system" file="core-env.mkiv">
+ <cd:command name="showsetupsdefinition" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setupwithargument" level="system" file="core-env.mkiv">
+ <cd:command name="setupwithargument" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="fastsetupwithargument" level="system" file="core-env.mkiv">
+ <cd:command name="fastsetupwithargument" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setupwithargumentswapped" level="system" file="core-env.mkiv">
+ <cd:command name="setupwithargumentswapped" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:content/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="fastsetupwithargumentswapped" level="system" file="core-env.mkiv">
+ <cd:command name="fastsetupwithargumentswapped" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:content/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="usesetupsparameter" level="system" file="core-env.mkiv">
+ <cd:command name="usesetupsparameter" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="autosetups" level="style" file="core-env.mkiv">
+ <cd:command name="autosetups" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="doprocesslocalsetups" level="system" file="core-env.mkiv">
+ <cd:command name="doprocesslocalsetups" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesetups" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifelsesetups" level="system" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -131,7 +131,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsetupselse" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifsetupselse" level="system" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -139,21 +139,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsetups" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifsetups" level="system" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotsetups" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifnotsetups" level="system" category="structure" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="luasetups" type="environment" level="system" category="lua" file="core-env.mkiv">
+ <cd:command name="luasetups" type="environment" level="system" category="structure" keywords="lua" file="core-env.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -162,13 +162,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="luasetups" type="environment" variant="string" level="system" category="lua" file="core-env.mkiv">
+ <cd:command name="luasetups" type="environment" variant="string" level="system" category="structure" keywords="lua" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="xmlsetups" type="environment" level="style" category="xml" file="core-env.mkiv">
+ <cd:command name="xmlsetups" type="environment" level="style" category="structure" keywords="xml" file="core-env.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -177,13 +177,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="xmlsetups" type="environment" variant="string" level="style" category="xml" file="core-env.mkiv">
+ <cd:command name="xmlsetups" type="environment" variant="string" level="style" category="structure" keywords="xml" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="rawsetups" type="environment" level="system" file="core-env.mkiv">
+ <cd:command name="rawsetups" type="environment" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -192,13 +192,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="rawsetups" type="environment" variant="string" level="system" file="core-env.mkiv">
+ <cd:command name="rawsetups" type="environment" variant="string" level="system" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="localsetups" type="environment" level="style" file="core-env.mkiv">
+ <cd:command name="localsetups" type="environment" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -207,13 +207,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="localsetups" type="environment" variant="string" level="style" file="core-env.mkiv">
+ <cd:command name="localsetups" type="environment" variant="string" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setups" type="environment" level="style" file="core-env.mkiv">
+ <cd:command name="setups" type="environment" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="grid"/>
@@ -222,7 +222,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setups" type="environment" variant="string" level="style" file="core-env.mkiv">
+ <cd:command name="setups" type="environment" variant="string" level="style" category="structure" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
</cd:arguments>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-shift.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-shift.xml
index 521317d1ded..2d26f5c51cc 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-shift.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-shift.xml
@@ -73,20 +73,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="shiftup" level="document" category="layout" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="shiftdown" level="document" category="layout" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-sidebar.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-sidebar.xml
index 7518b5c6179..5f425802805 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-sidebar.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-sidebar.xml
@@ -100,4 +100,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-simplecolumns.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-simplecolumns.xml
index caefa9fbbb9..fb2d7a2edec 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-simplecolumns.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-simplecolumns.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setsimplecolumnshsize" level="system" category="structure layout" file="page-smp.mkiv">
+ <cd:command name="setsimplecolumnshsize" level="system" category="columns" keywords="structure layout" file="page-smp.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="n">
@@ -23,12 +23,23 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplecolumns" type="environment" level="system" category="structure layout" file="page-smp.mkiv">
+ <cd:command name="simplecolumns" type="environment" level="system" category="columns" keywords="structure layout" file="page-smp.mkiv">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
- <cd:inherit name="setsimplecolumnshsize"/>
+ <cd:parameter name="n">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="width">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="distance">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="lines">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-smash.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-smash.xml
index 9183c8a6b86..1e7dc286705 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-smash.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-smash.xml
@@ -4,69 +4,69 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="smashbox" level="system" file="supp-box.mkiv">
+ <cd:command name="smashbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="smashboxed" level="system" file="supp-box.mkiv">
+ <cd:command name="smashboxed" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="hsmashbox" level="system" file="supp-box.mkiv">
+ <cd:command name="hsmashbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="vsmashbox" level="system" file="supp-box.mkiv">
+ <cd:command name="vsmashbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-box"/>
</cd:arguments>
</cd:command>
- <cd:command name="hsmash" level="system" file="supp-box.mkiv">
+ <cd:command name="hsmash" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="vsmash" level="system" file="supp-box.mkiv">
+ <cd:command name="vsmash" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="hsmashed" level="system" file="supp-box.mkiv">
+ <cd:command name="hsmashed" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="vsmashed" level="system" file="supp-box.mkiv">
+ <cd:command name="vsmashed" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="smashedhbox" level="system" file="supp-box.mkiv">
+ <cd:command name="smashedhbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="smashedvbox" level="system" file="supp-box.mkiv">
+ <cd:command name="smashedvbox" level="system" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="smash" level="document" file="supp-box.mkiv">
+ <cd:command name="smash" level="document" category="boxes" file="supp-box.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="w"/>
@@ -79,4 +79,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-sort.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-sort.xml
index 5a263ab979d..a5763a4bf50 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-sort.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-sort.xml
@@ -74,6 +74,12 @@
<cd:parameter name="synonymcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -133,7 +139,7 @@
</cd:instances>
</cd:command>
- <cd:command name="doifelsecurrentsortingused" level="system" category="language conditional" file="strc-syn.mkiv">
+ <cd:command name="doifelsecurrentsortingused" level="system" category="language" keywords="conditional" file="strc-syn.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
@@ -171,31 +177,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="logo" level="document" category="language" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistoflogos" level="document" category="language" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsorting"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistoflogos" level="document" category="language" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsorting"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-soundtrack.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-soundtrack.xml
index c374268bbc4..ecb474d34e2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-soundtrack.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-soundtrack.xml
@@ -27,4 +27,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-spellchecking.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-spellchecking.xml
index 90a219fc8b7..ec7d8e8e66b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-spellchecking.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-spellchecking.xml
@@ -9,7 +9,7 @@
<cd:assignments list="yes">
<cd:parameter name="state">
<cd:constant type="start"/>
- <cd:constant type="stop" defult="yes"/>
+ <cd:constant type="stop" default="yes"/>
</cd:parameter>
<cd:parameter name="method">
<cd:constant type="1"/>
@@ -30,4 +30,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-spreadsheet.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-spreadsheet.xml
index 8181cfe2d52..e3806ee3ae8 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-spreadsheet.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-spreadsheet.xml
@@ -74,7 +74,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsespreadsheetcell" level="system" category="tables conditional" file="m-spreadsheet.mkiv">
+ <cd:command name="doifelsespreadsheetcell" level="system" category="tables" keywords="conditional" file="m-spreadsheet.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="argument-number"/>
@@ -84,7 +84,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifspreadsheetcellelse" level="system" category="tables conditional" file="m-spreadsheet.mkiv">
+ <cd:command name="doifspreadsheetcellelse" level="system" category="tables" keywords="conditional" file="m-spreadsheet.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="argument-number"/>
@@ -137,4 +137,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-startstop.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-startstop.xml
index ba0abb0b7d8..3df32a51656 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-startstop.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-startstop.xml
@@ -97,4 +97,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-steps.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-steps.xml
index c71bc2e2fa0..dc86f6397fb 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-steps.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-steps.xml
@@ -409,4 +409,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-stream.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-stream.xml
index 7e769fdb689..37e04553d8d 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-stream.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-stream.xml
@@ -4,9 +4,9 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="currentoutputstream" level="system" file="page-str.mkiv"/>
+ <cd:command name="currentoutputstream" level="system" category="structure" file="page-str.mkiv"/>
- <cd:command name="ifinoutputstream" level="system" file="page-str.mkiv">
+ <cd:command name="ifinoutputstream" level="system" category="structure" keywords="conditional" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="string-true"/>
<cd:delimiter name="else"/>
@@ -15,60 +15,60 @@
</cd:arguments>
</cd:command>
- <cd:command name="enableoutputstream" level="system" file="page-str.mkiv">
+ <cd:command name="enableoutputstream" level="system" category="structure" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="disableoutputstream" level="system" file="page-str.mkiv"/>
+ <cd:command name="disableoutputstream" level="system" category="structure" file="page-str.mkiv"/>
- <cd:command name="outputstream" type="environment" level="system" file="page-str.mkiv">
+ <cd:command name="outputstream" type="environment" level="system" category="structure" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="flushoutputstream" level="system" file="page-str.mkiv">
+ <cd:command name="flushoutputstream" level="system" category="structure" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="outputstreambox" level="system" file="page-str.mkiv">
+ <cd:command name="outputstreambox" level="system" category="structure" keywords="boxes" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="outputstreamcopy" level="system" file="page-str.mkiv">
+ <cd:command name="outputstreamcopy" level="system" category="structure" keywords="boxes" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="outputstreamunvbox" level="system" file="page-str.mkiv">
+ <cd:command name="outputstreamunvbox" level="system" category="structure" keywords="boxes" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="outputstreamunvcopy" level="system" file="page-str.mkiv">
+ <cd:command name="outputstreamunvcopy" level="system" category="structure" keywords="boxes" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="synchronizeoutputstreams" level="system" file="page-str.mkiv">
+ <cd:command name="synchronizeoutputstreams" level="system" category="structure" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="pushoutputstream" level="system" file="page-str.mkiv">
+ <cd:command name="pushoutputstream" level="system" category="structure" file="page-str.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-string.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-string.xml
index aba5429c5d6..36c4234e0b0 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-string.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-string.xml
@@ -4,61 +4,61 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="wdofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="wdofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="htofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="htofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="dpofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="dpofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="hdofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="hdofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="htdpofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="htdpofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="widthofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="widthofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="heightofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="heightofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="depthofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="depthofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="heightanddepthofstring" level="system" file="blob-ini.mkiv">
+ <cd:command name="heightanddepthofstring" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="setwidthof" level="system" file="blob-ini.mkiv">
+ <cd:command name="setwidthof" level="system" category="strings" file="blob-ini.mkiv">
<cd:arguments>
<cd:text/>
<cd:delimiter name="to"/>
@@ -66,4 +66,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-strut.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-strut.xml
index d686d6ee0d2..4b399435871 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-strut.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-strut.xml
@@ -4,17 +4,17 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="strutdp" level="system" file="supp-box.mkiv"/>
+ <cd:command name="strutdp" level="system" category="fonts" keywords="whitespace" file="supp-box.mkiv"/>
- <cd:command name="strutht" level="system" file="supp-box.mkiv"/>
+ <cd:command name="strutht" level="system" category="fonts" keywords="whitespace" file="supp-box.mkiv"/>
- <cd:command name="strutwd" level="system" file="supp-box.mkiv"/>
+ <cd:command name="strutwd" level="system" category="fonts" keywords="whitespace" file="supp-box.mkiv"/>
- <cd:command name="struthtdp" level="system" file="supp-box.mkiv"/>
+ <cd:command name="struthtdp" level="system" category="fonts" keywords="whitespace" file="supp-box.mkiv"/>
- <cd:command name="strutgap" level="system" file="supp-box.mkiv"/>
+ <cd:command name="strutgap" level="system" category="fonts" keywords="whitespace" file="supp-box.mkiv"/>
- <cd:command name="setupstruts" level="style" file="spac-ver.mkiv">
+ <cd:command name="setupstrut" level="style" category="fonts" keywords="whitespace" file="spac-ver.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:resolve name="value-strut"/>
@@ -22,7 +22,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="synchronizestrut" level="system" file="spac-ver.mkiv">
+ <cd:command name="synchronizestrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:resolve name="value-strut"/>
@@ -30,38 +30,38 @@
</cd:arguments>
</cd:command>
- <cd:command name="strut" level="style" file="spac-ver.mkiv"/>
+ <cd:command name="strut" level="style" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="halfstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="halfstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="quarterstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="quarterstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="halflinestrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="halflinestrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="noheightstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="noheightstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="depthstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="depthstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="setstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="setstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="setcharstrut" level="system" file="spac-ver.mkiv">
+ <cd:command name="setcharstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="setfontstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="setfontstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="settightstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="settightstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="setcapstrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="setcapstrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="setnostrut" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="setnostrut" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="showstruts" level="document" file="spac-ver.mkiv"/>
+ <cd:command name="showstruts" level="document" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="showcolorstruts" level="document" file="spac-ver.mkiv"/>
+ <cd:command name="showcolorstruts" level="document" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
- <cd:command name="strut" type="environment" begin="beg" end="end" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="strut" type="environment" begin="beg" end="end" level="system" category="fonts" keywords="whitespace" file="spac-ver.mkiv"/>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-symbol.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-symbol.xml
index 64a6f27dd17..b4d74b1a0c7 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-symbol.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-symbol.xml
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseinsymbolset" level="system" category="symbols conditional" file="symb-ini.mkiv">
+ <cd:command name="doifelseinsymbolset" level="system" category="symbols" keywords="conditional" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -21,7 +21,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinsymbolsetelse" level="system" category="symbols conditional" file="symb-ini.mkiv">
+ <cd:command name="doifinsymbolsetelse" level="system" category="symbols" keywords="conditional" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -30,7 +30,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinsymbolset" level="system" category="symbols conditional" file="symb-ini.mkiv">
+ <cd:command name="doifinsymbolset" level="system" category="symbols" keywords="conditional" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -39,7 +39,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesymbolset" level="system" category="symbols conditional" file="symb-ini.mkiv">
+ <cd:command name="doifelsesymbolset" level="system" category="symbols" keywords="conditional" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -47,7 +47,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsymbolsetelse" level="system" category="symbols conditional" file="symb-ini.mkiv">
+ <cd:command name="doifsymbolsetelse" level="system" category="symbols" keywords="conditional" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -75,7 +75,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="definefiguresymbol" level="style" category="symbols graphics" file="symb-ini.mkiv">
+ <cd:command name="definefiguresymbol" level="style" category="symbols" keywords="graphics" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:keywords>
@@ -88,7 +88,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="figuresymbol" level="document" category="symbols graphics" file="symb-ini.mkiv">
+ <cd:command name="figuresymbol" level="document" category="symbols" keywords="graphics" file="symb-ini.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:file"/>
@@ -100,7 +100,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesymboldefined" level="system" category="symbols conditional" file="symb-ini.mkiv">
+ <cd:command name="doifelsesymboldefined" level="system" category="symbols" keywords="conditional" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -108,7 +108,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsymboldefinedelse" level="system" category="symbols conditional" file="symb-ini.mkiv">
+ <cd:command name="doifsymboldefinedelse" level="system" category="symbols" keywords="conditional" file="symb-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-synctex.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-synctex.xml
index 21f49e3f66d..363d9657cf9 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-synctex.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-synctex.xml
@@ -39,4 +39,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-synonym.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-synonym.xml
index 3e3e1c02798..8bc9ed87ef4 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-synonym.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-synonym.xml
@@ -76,6 +76,25 @@
<cd:parameter name="synonymcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="left">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="right">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="inbetween">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="hyphens">
+ <cd:constant type="yes" default="yes"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -144,14 +163,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsecurrentsynonymused" level="system" category="symbols conditional" file="strc-syn.mkiv">
+ <cd:command name="doifelsecurrentsynonymused" level="system" category="symbols" keywords="conditional" file="strc-syn.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsecurrentsynonymshown" level="system" category="symbols conditional" file="strc-syn.mkiv">
+ <cd:command name="doifelsecurrentsynonymshown" level="system" category="symbols" keywords="conditional" file="strc-syn.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
@@ -194,32 +213,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="abbreviation" level="document" category="symbols" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofabbreviations" level="document" category="symbols" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsynonyms"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofabbreviations" level="document" category="symbols" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsynonyms"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-system.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-system.xml
index c8abff23827..72b51760db1 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-system.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-system.xml
@@ -4,28 +4,28 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="expanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="expanded" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="expanded" type="environment" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="expanded" type="environment" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="gobbleoneargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbleoneargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="gobbletwoarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbletwoarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="gobblethreearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblethreearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -33,7 +33,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobblefourarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblefourarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -42,7 +42,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobblefivearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblefivearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -52,7 +52,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobblesixarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblesixarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -63,7 +63,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobblesevenarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblesevenarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -75,7 +75,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobbleeightarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbleeightarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -88,7 +88,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobbleninearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbleninearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -102,7 +102,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobbletenarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbletenarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -117,20 +117,20 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobbleoneoptional" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbleoneoptional" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="gobbletwooptionals" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbletwooptionals" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy"/>
<cd:resolve name="keyword-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="gobblethreeoptionals" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblethreeoptionals" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy"/>
<cd:resolve name="keyword-dummy"/>
@@ -138,7 +138,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobblefouroptionals" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblefouroptionals" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy"/>
<cd:resolve name="keyword-dummy"/>
@@ -147,7 +147,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="gobblefiveoptionals" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblefiveoptionals" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy"/>
<cd:resolve name="keyword-dummy"/>
@@ -157,9 +157,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="donothing" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="donothing" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="doifelsenextchar" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenextchar" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
<cd:resolve name="argument-true"/>
@@ -167,7 +167,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnextcharelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnextcharelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
<cd:resolve name="argument-true"/>
@@ -175,212 +175,212 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenextoptional" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenextoptional" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnextoptionalelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnextoptionalelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenextoptionalcs" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenextoptionalcs" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnextoptionalcselse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnextoptionalcselse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenextbgroup" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenextbgroup" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnextbgroupelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnextbgroupelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenextbgroupcs" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenextbgroupcs" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnextbgroupcselse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnextbgroupcselse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenextparenthesis" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenextparenthesis" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnextparenthesiselse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnextparenthesiselse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefastoptionalcheck" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsefastoptionalcheck" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doiffastoptionalcheckelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doiffastoptionalcheckelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefastoptionalcheckcs" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsefastoptionalcheckcs" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="doiffastoptionalcheckcselse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doiffastoptionalcheckcselse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="assumelongusagecs" level="system" file="syst-aux.mkiv">
+ <cd:command name="assumelongusagecs" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setgvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setgvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setevalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setevalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setxvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setxvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="getvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="getvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="letvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="letvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="letgvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="letgvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="resetvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="resetvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="undefinevalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="undefinevalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="ignorevalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="ignorevalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="setuvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setuvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setuevalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setuevalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setugvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setugvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="setuxvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="setuxvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="getuvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="getuvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseundefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseundefined" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -388,7 +388,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifundefinedelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifundefinedelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -396,7 +396,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsedefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsedefined" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -404,7 +404,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdefinedelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifdefinedelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -412,39 +412,39 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifundefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifundefined" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifdefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifdefined" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="letbeundefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="letbeundefined" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="localundefine" level="system" file="syst-aux.mkiv">
+ <cd:command name="localundefine" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="globalundefine" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalundefine" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsealldefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsealldefined" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -452,7 +452,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifalldefinedelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifalldefinedelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name-list"/>
<cd:resolve name="argument-true"/>
@@ -460,7 +460,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doif" level="system" file="syst-aux.mkiv">
+ <cd:command name="doif" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -468,7 +468,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnot" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnot" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -476,7 +476,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -485,7 +485,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseempty" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:resolve name="argument-true"/>
@@ -493,7 +493,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifemptyelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifemptyelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:resolve name="argument-true"/>
@@ -501,21 +501,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifempty" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotempty" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseinset" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseinset" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -524,7 +524,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinsetelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifinsetelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -533,7 +533,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinset" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifinset" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -541,7 +541,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotinset" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotinset" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -549,7 +549,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsecommon" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsecommon" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -558,7 +558,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcommonelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifcommonelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -567,7 +567,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifcommon" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifcommon" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -575,7 +575,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotcommon" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotcommon" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -583,60 +583,60 @@
</cd:arguments>
</cd:command>
- <cd:command name="processcommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="processcommalist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="quitcommalist" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="quitcommalist" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="quitprevcommalist" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="quitprevcommalist" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="processcommacommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="processcommacommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="processcommalistwithparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="processcommalistwithparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="processcommalist" type="environment" level="system" file="syst-aux.mkiv">
+ <cd:command name="processcommalist" type="environment" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="processcommacommand" type="environment" level="system" file="syst-aux.mkiv">
+ <cd:command name="processcommacommand" type="environment" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="currentcommalistitem" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="currentcommalistitem" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="processaction" level="system" file="syst-aux.mkiv">
+ <cd:command name="processaction" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command"/>
<cd:apply list="yes"/>
</cd:arguments>
</cd:command>
- <cd:command name="processfirstactioninset" level="system" file="syst-aux.mkiv">
+ <cd:command name="processfirstactioninset" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command"/>
<cd:apply list="yes"/>
</cd:arguments>
</cd:command>
- <cd:command name="processallactionsinset" level="system" file="syst-aux.mkiv">
+ <cd:command name="processallactionsinset" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command"/>
<cd:apply list="yes"/>
@@ -645,17 +645,17 @@
<cd:command name="commalistelement" level="system" file="syst-aux.mkiv"/>
- <cd:command name="firstcharacter" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="firstcharacter" level="system" category="strings" file="syst-aux.mkiv"/>
- <cd:command name="remainingcharacters" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="remainingcharacters" level="system" category="strings" file="syst-aux.mkiv"/>
- <cd:command name="getfirstcharacter" level="system" file="syst-aux.mkiv">
+ <cd:command name="getfirstcharacter" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsefirstchar" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsefirstchar" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -664,7 +664,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiffirstcharelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doiffirstcharelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -673,19 +673,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="thefirstcharacter" level="system" file="syst-aux.mkiv">
+ <cd:command name="thefirstcharacter" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="theremainingcharacters" level="system" file="syst-aux.mkiv">
+ <cd:command name="theremainingcharacters" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseinstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseinstring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -694,7 +694,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinstringelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifinstringelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -703,7 +703,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifinstring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -711,7 +711,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotinstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotinstring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -719,7 +719,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseincsname" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseincsname" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-csname"/>
@@ -728,7 +728,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifincsnameelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifincsnameelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-csname"/>
@@ -737,7 +737,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenumber" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenumber" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -745,7 +745,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnumberelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnumberelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -753,21 +753,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnumber" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnumber" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotnumber" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotnumber" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="percentdimen" level="system" file="syst-aux.mkiv">
+ <cd:command name="percentdimen" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -780,7 +780,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setpercentdimen" level="system" file="syst-aux.mkiv">
+ <cd:command name="setpercentdimen" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:dimension"/>
@@ -793,28 +793,28 @@
</cd:arguments>
</cd:command>
- <cd:command name="makerawcommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="makerawcommalist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="rawprocesscommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="rawprocesscommalist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="rawprocesscommacommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="rawprocesscommacommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="rawdoifelseinset" level="system" file="syst-aux.mkiv">
+ <cd:command name="rawdoifelseinset" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -823,7 +823,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="rawdoifinsetelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="rawdoifinsetelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -832,7 +832,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="rawdoifinset" level="system" file="syst-aux.mkiv">
+ <cd:command name="rawdoifinset" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -840,123 +840,123 @@
</cd:arguments>
</cd:command>
- <cd:command name="rawprocessaction" level="system" file="syst-aux.mkiv">
+ <cd:command name="rawprocessaction" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command"/>
<cd:apply list="yes"/>
</cd:arguments>
</cd:command>
- <cd:command name="currentvalue" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="currentvalue" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="getparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="geteparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="geteparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getgparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getgparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getxparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getxparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="forgetparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="forgetparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getexpandedparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getexpandedparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="doassign" level="system" file="syst-aux.mkiv">
+ <cd:command name="doassign" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata"/>
</cd:arguments>
</cd:command>
- <cd:command name="doeassign" level="system" file="syst-aux.mkiv">
+ <cd:command name="doeassign" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata"/>
</cd:arguments>
</cd:command>
- <cd:command name="undoassign" level="system" file="syst-aux.mkiv">
+ <cd:command name="undoassign" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata"/>
</cd:arguments>
</cd:command>
- <cd:command name="doassignempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doassignempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata"/>
</cd:arguments>
</cd:command>
- <cd:command name="processassignmentlist" level="system" file="syst-aux.mkiv">
+ <cd:command name="processassignmentlist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="assignment-userdata-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="processassignmentcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="processassignmentcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="assignment-userdata-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="processassignmentlist" type="environment" level="system" file="syst-aux.mkiv">
+ <cd:command name="processassignmentlist" type="environment" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="processassignmentcommand" type="environment" level="system" file="syst-aux.mkiv">
+ <cd:command name="processassignmentcommand" type="environment" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="currentassignmentlistkey" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="currentassignmentlistkey" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="currentassignmentlistvalue" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="currentassignmentlistvalue" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="getemptyparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getemptyparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="copyparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="copyparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="keyword-text"/>
@@ -964,13 +964,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="checkparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="checkparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="ifparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="ifparameters" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-true"/>
<cd:delimiter name="else"/>
@@ -979,41 +979,41 @@
</cd:arguments>
</cd:command>
- <cd:command name="commalistsize" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="commalistsize" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="getcommalistsize" level="system" file="syst-aux.mkiv">
+ <cd:command name="getcommalistsize" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getcommacommandsize" level="system" file="syst-aux.mkiv">
+ <cd:command name="getcommacommandsize" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getfromcommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="getfromcommalist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:resolve name="keyword-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="getfromcommacommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="getfromcommacommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
<cd:resolve name="keyword-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="firstinlist" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstinlist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="dogetcommacommandelement" level="system" file="syst-aux.mkiv">
+ <cd:command name="dogetcommacommandelement" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-number"/>
<cd:delimiter name="from"/>
@@ -1023,14 +1023,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="dosingleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dosingleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="dodoubleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dodoubleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-optional"/>
@@ -1038,7 +1038,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dotripleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dotripleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-optional"/>
@@ -1047,7 +1047,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doquadrupleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doquadrupleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-optional"/>
@@ -1057,7 +1057,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doquintupleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doquintupleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-optional"/>
@@ -1068,7 +1068,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dosixtupleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dosixtupleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-optional"/>
@@ -1080,7 +1080,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doseventupleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doseventupleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-optional"/>
@@ -1093,14 +1093,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="dosingleargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="dosingleargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="dodoubleargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="dodoubleargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy"/>
@@ -1108,7 +1108,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dotripleargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="dotripleargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy"/>
@@ -1117,7 +1117,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doquadrupleargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="doquadrupleargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy"/>
@@ -1127,7 +1127,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doquintupleargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="doquintupleargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy"/>
@@ -1138,7 +1138,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dosixtupleargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="dosixtupleargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy"/>
@@ -1150,7 +1150,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doseventupleargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="doseventupleargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy"/>
@@ -1163,13 +1163,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="strippedcsname" level="system" file="syst-aux.mkiv">
+ <cd:command name="strippedcsname" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="strippedcsname" variant="string" level="system" file="syst-aux.mkiv">
+ <cd:command name="strippedcsname" variant="string" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="none">
<cd:constant type="cd:text"/>
@@ -1177,13 +1177,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="complexorsimple" level="system" file="syst-aux.mkiv">
+ <cd:command name="complexorsimple" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="complexorsimple" variant="argument" level="system" file="syst-aux.mkiv">
+ <cd:command name="complexorsimple" variant="argument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1192,13 +1192,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="complexorsimpleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="complexorsimpleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="complexorsimpleempty" variant="argument" level="system" file="syst-aux.mkiv">
+ <cd:command name="complexorsimpleempty" variant="argument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1207,13 +1207,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="definecomplexorsimple" level="system" file="syst-aux.mkiv">
+ <cd:command name="definecomplexorsimple" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="definecomplexorsimple" variant="argument" level="system" file="syst-aux.mkiv">
+ <cd:command name="definecomplexorsimple" variant="argument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1222,13 +1222,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="definecomplexorsimpleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="definecomplexorsimpleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="definecomplexorsimpleempty" variant="argument" level="system" file="syst-aux.mkiv">
+ <cd:command name="definecomplexorsimpleempty" variant="argument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces">
<cd:constant type="cd:text"/>
@@ -1237,18 +1237,18 @@
</cd:arguments>
</cd:command>
- <cd:command name="permitspacesbetweengroups" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="permitspacesbetweengroups" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="dontpermitspacesbetweengroups" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="dontpermitspacesbetweengroups" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="dosinglegroupempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dosinglegroupempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-dummy-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="dodoublegroupempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dodoublegroupempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-dummy-optional"/>
@@ -1256,7 +1256,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dotriplegroupempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dotriplegroupempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-dummy-optional"/>
@@ -1265,7 +1265,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doquadruplegroupempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doquadruplegroupempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-dummy-optional"/>
@@ -1275,7 +1275,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doquintuplegroupempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="doquintuplegroupempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-dummy-optional"/>
@@ -1286,27 +1286,27 @@
</cd:arguments>
</cd:command>
- <cd:command name="firstofoneargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstofoneargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="firstoftwoarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstoftwoarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="secondoftwoarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="secondoftwoarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="firstofthreearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstofthreearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1314,7 +1314,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="secondofthreearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="secondofthreearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1322,7 +1322,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="thirdofthreearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="thirdofthreearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1330,7 +1330,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="firstoffourarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstoffourarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1339,7 +1339,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="secondoffourarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="secondoffourarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1348,7 +1348,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="thirdoffourarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="thirdoffourarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1357,7 +1357,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fourthoffourarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="fourthoffourarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1366,7 +1366,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="firstoffivearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstoffivearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1376,7 +1376,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="secondoffivearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="secondoffivearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1386,7 +1386,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="thirdoffivearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="thirdoffivearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1396,7 +1396,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fourthoffivearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="fourthoffivearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1406,7 +1406,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fifthoffivearguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="fifthoffivearguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1416,7 +1416,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="firstofsixarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstofsixarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1427,7 +1427,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="secondofsixarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="secondofsixarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1438,7 +1438,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="thirdofsixarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="thirdofsixarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1449,7 +1449,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fourthofsixarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="fourthofsixarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1460,7 +1460,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fifthofsixarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="fifthofsixarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1471,7 +1471,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="sixthofsixarguments" level="system" file="syst-aux.mkiv">
+ <cd:command name="sixthofsixarguments" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1482,27 +1482,27 @@
</cd:arguments>
</cd:command>
- <cd:command name="firstofoneunexpanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstofoneunexpanded" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="firstoftwounexpanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstoftwounexpanded" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="secondoftwounexpanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="secondoftwounexpanded" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
</cd:arguments>
</cd:command>
- <cd:command name="firstofthreeunexpanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="firstofthreeunexpanded" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1510,7 +1510,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="secondofthreeunexpanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="secondofthreeunexpanded" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1518,7 +1518,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="thirdofthreeunexpanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="thirdofthreeunexpanded" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dummy"/>
<cd:resolve name="argument-dummy"/>
@@ -1526,56 +1526,56 @@
</cd:arguments>
</cd:command>
- <cd:command name="letempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="letempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="globalletempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalletempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="letvalueempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="letvalueempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="letgvalueempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="letgvalueempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="letvaluerelax" level="system" file="syst-aux.mkiv">
+ <cd:command name="letvaluerelax" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="letgvalurelax" level="system" file="syst-aux.mkiv">
+ <cd:command name="letgvalurelax" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="relaxvalueifundefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="relaxvalueifundefined" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="rawgetparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="rawgetparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="texdefinition" type="environment" level="system" file="syst-aux.mkiv">
+ <cd:command name="texdefinition" type="environment" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="none" optional="yes">
<cd:constant type="spaces"/>
@@ -1613,39 +1613,37 @@
</cd:arguments>
</cd:command>
- <cd:command name="texdefinition" level="system" file="syst-aux.mkiv">
+ <cd:command name="texdefinition" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="texcode" type="environment" level="system" file="syst-aux.mkiv"/>
-
- <cd:command name="newcounter" level="system" file="syst-aux.mkiv">
+ <cd:command name="newcounter" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="fastincrement" level="system" file="syst-aux.mkiv">
+ <cd:command name="fastincrement" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="fastdecrement" level="system" file="syst-aux.mkiv">
+ <cd:command name="fastdecrement" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="increment" level="system" file="syst-aux.mkiv">
+ <cd:command name="increment" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="increment" variant="argument" level="system" file="syst-aux.mkiv">
+ <cd:command name="increment" variant="argument" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="parenthesis" list="yes">
<cd:constant type="cd:csname"/>
@@ -1654,13 +1652,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="decrement" level="system" file="syst-aux.mkiv">
+ <cd:command name="decrement" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="decrement" variant="argument" level="system" file="syst-aux.mkiv">
+ <cd:command name="decrement" variant="argument" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="parenthesis" list="yes">
<cd:constant type="cd:csname"/>
@@ -1669,49 +1667,43 @@
</cd:arguments>
</cd:command>
- <cd:command name="incrementvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="incrementvalue" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="decrementvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="decrementvalue" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="newsignal" level="system" file="syst-aux.mkiv">
+ <cd:command name="newsignal" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="checkedstrippedcsname" level="system" file="syst-aux.mkiv">
+ <cd:command name="checkedstrippedcsname" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="checkedstrippedcsname" variant="string" level="system" file="syst-aux.mkiv">
- <cd:arguments>
- <cd:resolve name="string-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="savenormalmeaning" level="system" file="syst-aux.mkiv">
+ <cd:command name="savenormalmeaning" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="recursedepth" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="recursedepth" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="recurselevel" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="recurselevel" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="resetrecurselevel" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="resetrecurselevel" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="dostepwiserecurse" level="system" file="syst-aux.mkiv">
+ <cd:command name="dostepwiserecurse" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-number"/>
@@ -1722,79 +1714,79 @@
</cd:arguments>
</cd:command>
- <cd:command name="dorecurse" level="system" file="syst-aux.mkiv">
+ <cd:command name="dorecurse" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="doexpandedrecurse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doexpandedrecurse" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="dowith" level="system" file="syst-aux.mkiv">
+ <cd:command name="dowith" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command-list"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="doloop" level="system" file="syst-aux.mkiv">
+ <cd:command name="doloop" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="exitloop" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="exitloop" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="exitloopnow" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="exitloopnow" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="dofastloopcs" level="system" file="syst-aux.mkiv">
+ <cd:command name="dofastloopcs" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="fastloopindex" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="fastloopindex" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="fastloopfinal" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="fastloopfinal" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="doloopoverlist" level="system" file="syst-aux.mkiv">
+ <cd:command name="doloopoverlist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="recursestring" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="recursestring" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="newevery" level="system" file="syst-aux.mkiv">
+ <cd:command name="newevery" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="EveryPar" level="system" file="syst-aux.mkiv">
+ <cd:command name="EveryPar" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="EveryLine" level="system" file="syst-aux.mkiv">
+ <cd:command name="EveryLine" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="forgeteverypar" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="forgeteverypar" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="convertvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="convertvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-name"/>
<cd:delimiter name="to"/>
@@ -1802,14 +1794,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="defconvertedvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="defconvertedvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseassignment" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseassignment" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -1817,7 +1809,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifassignmentelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifassignmentelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -1825,13 +1817,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="docheckassignment" level="system" file="syst-aux.mkiv">
+ <cd:command name="docheckassignment" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="ifassignment" level="system" file="syst-aux.mkiv">
+ <cd:command name="ifassignment" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-true"/>
<cd:delimiter name="else"/>
@@ -1840,7 +1832,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseassignmentcs" level="system" file="syst-aux.mkiv">
+ <cd:command name="validassignment" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-text"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="nonvalidassignment" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-text"/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="doifelseassignmentcs" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
@@ -1848,7 +1852,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifassignmentelsecs" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifassignmentelsecs" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
@@ -1856,7 +1860,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="convertargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="convertargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="to"/>
@@ -1864,7 +1868,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="convertcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="convertcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:delimiter name="to"/>
@@ -1872,55 +1876,55 @@
</cd:arguments>
</cd:command>
- <cd:command name="defconvertedargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="defconvertedargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="defconvertedcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="defconvertedcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="edefconvertedargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="edefconvertedargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="gdefconvertedargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="gdefconvertedargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="gdefconvertedcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="gdefconvertedcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="xdefconvertedargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="xdefconvertedargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="showvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="showvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsemeaning" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsemeaning" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
@@ -1929,7 +1933,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifmeaningelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifmeaningelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
@@ -1938,7 +1942,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesamestring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsesamestring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -1947,7 +1951,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsamestringelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifsamestringelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -1956,7 +1960,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsamestring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifsamestring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -1964,7 +1968,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotsamestring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotsamestring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -1972,7 +1976,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="ConvertToConstant" level="system" file="syst-aux.mkiv">
+ <!-- begin of obsolete -->
+
+ <cd:command name="ConvertToConstant" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
@@ -1980,7 +1986,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="ConvertConstantAfter" level="system" file="syst-aux.mkiv">
+ <cd:command name="ConvertConstantAfter" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
@@ -1988,61 +1994,63 @@
</cd:arguments>
</cd:command>
- <cd:command name="assignifempty" level="system" file="syst-aux.mkiv">
+ <!-- end of obsolete -->
+
+ <cd:command name="assignifempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="grabuntil" level="system" file="syst-aux.mkiv">
+ <cd:command name="grabuntil" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="processbetween" level="system" file="syst-aux.mkiv">
+ <cd:command name="processbetween" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="gobbleuntil" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbleuntil" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="gobbleuntilrelax" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbleuntilrelax" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-content"/>
<cd:delimiter name="relax"/>
</cd:arguments>
</cd:command>
- <cd:command name="processuntil" level="system" file="syst-aux.mkiv">
+ <cd:command name="processuntil" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="groupedcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="groupedcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="simplegroupedcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="simplegroupedcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="pickupgroupedcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="pickupgroupedcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -2050,35 +2058,35 @@
</cd:arguments>
</cd:command>
- <cd:command name="BeforePar" level="system" file="syst-aux.mkiv">
+ <cd:command name="BeforePar" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="AfterPar" level="system" file="syst-aux.mkiv">
+ <cd:command name="AfterPar" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="GetPar" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="GetPar" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="GotoPar" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="GotoPar" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="dowithpargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="dowithpargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="dowithwargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="dowithwargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="dorepeatwithcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="dorepeatwithcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:text"/>
@@ -2088,7 +2096,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsestringinstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsestringinstring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -2097,7 +2105,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifstringinstringelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifstringinstringelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -2106,7 +2114,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="appendtoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="appendtoks" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-command"/>
<cd:delimiter name="to"/>
@@ -2114,7 +2122,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="prependtoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="prependtoks" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-command"/>
<cd:delimiter name="to"/>
@@ -2122,7 +2130,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="appendtoksonce" level="system" file="syst-aux.mkiv">
+ <cd:command name="appendtoksonce" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-command"/>
<cd:delimiter name="to"/>
@@ -2130,7 +2138,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="prependtoksonce" level="system" file="syst-aux.mkiv">
+ <cd:command name="prependtoksonce" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-command"/>
<cd:delimiter name="to"/>
@@ -2138,7 +2146,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseintoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseintoks" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -2147,7 +2155,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifintokselse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifintokselse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-command"/>
<cd:resolve name="argument-command"/>
@@ -2156,25 +2164,25 @@
</cd:arguments>
</cd:command>
- <cd:command name="collecting" type="environment" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="collecting" type="environment" level="system" category="strings" file="syst-aux.mkiv"/>
- <cd:command name="collect" type="environment" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="collect" type="environment" level="system" category="strings" file="syst-aux.mkiv"/>
- <cd:command name="expandedcollect" type="environment" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="expandedcollect" type="environment" level="system" category="strings" file="syst-aux.mkiv"/>
- <cd:command name="collect" level="system" file="syst-aux.mkiv">
+ <cd:command name="collect" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="collectexpanded" level="system" file="syst-aux.mkiv">
+ <cd:command name="collectexpanded" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="removetoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="removetoks" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-command"/>
<cd:delimiter name="from"/>
@@ -2182,7 +2190,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="appendetoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="appendetoks" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-command"/>
<cd:delimiter name="to"/>
@@ -2190,7 +2198,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="prependetoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="prependetoks" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-command"/>
<cd:delimiter name="to"/>
@@ -2198,19 +2206,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="flushtoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="flushtoks" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="dotoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="dotoks" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="beforesplitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="beforesplitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="at"/>
@@ -2220,7 +2228,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="aftersplitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="aftersplitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="at"/>
@@ -2230,7 +2238,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="splitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="splitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="at"/>
@@ -2242,7 +2250,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="greedysplitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="greedysplitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="at"/>
@@ -2254,7 +2262,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="beforetestandsplitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="beforetestandsplitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="at"/>
@@ -2264,7 +2272,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="aftertestandsplitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="aftertestandsplitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="at"/>
@@ -2274,7 +2282,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="testandsplitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="testandsplitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="at"/>
@@ -2286,7 +2294,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="splitatperiod" level="system" file="syst-aux.mkiv">
+ <cd:command name="splitatperiod" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:csname/>
@@ -2294,7 +2302,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="splitatcomma" level="system" file="syst-aux.mkiv">
+ <cd:command name="splitatcomma" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:csname/>
@@ -2302,7 +2310,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="splitatasterisk" level="system" file="syst-aux.mkiv">
+ <cd:command name="splitatasterisk" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:csname/>
@@ -2310,7 +2318,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="splitatcolon" level="system" file="syst-aux.mkiv">
+ <cd:command name="splitatcolon" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:csname/>
@@ -2318,7 +2326,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="splitatcolons" level="system" file="syst-aux.mkiv">
+ <cd:command name="splitatcolons" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:csname/>
@@ -2326,7 +2334,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="removesubstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="removesubstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="from"/>
@@ -2336,35 +2344,35 @@
</cd:arguments>
</cd:command>
- <cd:command name="appendtocommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="appendtocommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="prependtocommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="prependtocommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="addtocommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="addtocommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="pretocommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="pretocommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="robustdoifelseinset" level="system" file="syst-aux.mkiv">
+ <cd:command name="robustdoifelseinset" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -2373,7 +2381,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="robustdoifinsetelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="robustdoifinsetelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -2382,35 +2390,35 @@
</cd:arguments>
</cd:command>
- <cd:command name="robustaddtocommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="robustaddtocommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="robustpretocommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="robustpretocommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="xsplitstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="xsplitstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="removefromcommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="removefromcommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="substituteincommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="substituteincommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text"/>
@@ -2418,14 +2426,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="replaceincommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="replaceincommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="globalprocesscommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalprocesscommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords>
<cd:constant type="cd:command"/>
@@ -2434,112 +2442,112 @@
</cd:arguments>
</cd:command>
- <cd:command name="withoutpt" level="system" file="syst-aux.mkiv">
+ <cd:command name="withoutpt" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="PtToCm" level="system" file="syst-aux.mkiv">
+ <cd:command name="PtToCm" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="dimensiontocount" level="system" file="syst-aux.mkiv">
+ <cd:command name="dimensiontocount" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="numberofpoints" level="system" file="syst-aux.mkiv">
+ <cd:command name="numberofpoints" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="swapdimens" level="system" file="syst-aux.mkiv">
+ <cd:command name="swapdimens" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="swapcounts" level="system" file="syst-aux.mkiv">
+ <cd:command name="swapcounts" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="swapmacros" level="system" file="syst-aux.mkiv">
+ <cd:command name="swapmacros" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="globalswapdimens" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalswapdimens" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="globalswapcounts" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalswapcounts" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="globalswapmacros" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalswapmacros" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="globalpushmacro" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalpushmacro" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="localpushmacro" level="system" file="syst-aux.mkiv">
+ <cd:command name="localpushmacro" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="globalpopmacro" level="system" file="syst-aux.mkiv">
+ <cd:command name="globalpopmacro" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="localpopmacro" level="system" file="syst-aux.mkiv">
+ <cd:command name="localpopmacro" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="pushmacro" level="system" file="syst-aux.mkiv">
+ <cd:command name="pushmacro" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="popmacro" level="system" file="syst-aux.mkiv">
+ <cd:command name="popmacro" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="localhsize" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="localhsize" level="system" category="layout" file="syst-aux.mkiv"/>
- <cd:command name="setlocalhsize" level="system" file="syst-aux.mkiv">
+ <cd:command name="setlocalhsize" level="system" category="layout" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:dimension" prefix="cd:sign" method="none"/>
@@ -2547,9 +2555,9 @@
</cd:arguments>
</cd:command>
- <cd:command name="availablehsize" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="availablehsize" level="system" category="layout" file="syst-aux.mkiv"/>
- <cd:command name="distributedhsize" level="system" file="syst-aux.mkiv">
+ <cd:command name="distributedhsize" level="system" category="layout" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -2557,14 +2565,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="hsizefraction" level="system" file="syst-aux.mkiv">
+ <cd:command name="hsizefraction" level="system" category="layout" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifvalue" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
@@ -2572,7 +2580,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotvalue" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
@@ -2580,7 +2588,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsevalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsevalue" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
@@ -2589,7 +2597,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifvalueelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifvalueelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
@@ -2598,21 +2606,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnothing" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnothing" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifsomething" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifsomething" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenothing" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenothing" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -2620,7 +2628,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnothingelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnothingelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -2628,7 +2636,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesomething" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsesomething" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -2636,7 +2644,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsomethingelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifsomethingelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -2644,21 +2652,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifvaluenothing" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifvaluenothing" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifvaluesomething" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifvaluesomething" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsevaluenothing" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsevaluenothing" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -2666,7 +2674,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifvaluenothingelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifvaluenothingelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -2674,7 +2682,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseemptyvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseemptyvalue" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -2682,7 +2690,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifemptyvalueelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifemptyvalueelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -2690,21 +2698,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifemptyvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifemptyvalue" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotemptyvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotemptyvalue" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseallcommon" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseallcommon" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -2713,7 +2721,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifallcommonelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifallcommonelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -2722,7 +2730,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifallcommon" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifallcommon" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -2730,7 +2738,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotallcommon" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotallcommon" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -2738,7 +2746,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dodoubleemptywithset" level="system" file="syst-aux.mkiv">
+ <cd:command name="dodoubleemptywithset" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-list-optional"/>
@@ -2746,7 +2754,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dotripleemptywithset" level="system" file="syst-aux.mkiv">
+ <cd:command name="dotripleemptywithset" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-list-optional"/>
@@ -2755,7 +2763,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dodoubleargumentwithset" level="system" file="syst-aux.mkiv">
+ <cd:command name="dodoubleargumentwithset" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-list"/>
@@ -2763,7 +2771,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dotripleargumentwithset" level="system" file="syst-aux.mkiv">
+ <cd:command name="dotripleargumentwithset" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="keyword-dummy-list"/>
@@ -2772,7 +2780,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="stripcharacter" level="system" file="syst-aux.mkiv">
+ <cd:command name="stripcharacter" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-character"/>
<cd:delimiter name="from"/>
@@ -2782,7 +2790,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="stripspaces" level="system" file="syst-aux.mkiv">
+ <cd:command name="stripspaces" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:delimiter name="from"/>
<cd:resolve name="string-text"/>
@@ -2791,7 +2799,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="unspacestring" level="system" file="syst-aux.mkiv">
+ <cd:command name="unspacestring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="to"/>
@@ -2799,14 +2807,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="executeifdefined" level="system" file="syst-aux.mkiv">
+ <cd:command name="executeifdefined" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesomespace" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsesomespace" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -2814,7 +2822,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsomespaceelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifsomespaceelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -2822,7 +2830,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="processseparatedlist" level="system" file="syst-aux.mkiv">
+ <cd:command name="processseparatedlist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="keyword-text"/>
@@ -2833,7 +2841,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="processlist" level="system" file="syst-aux.mkiv">
+ <cd:command name="processlist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-character"/>
<cd:resolve name="argument-character"/>
@@ -2842,14 +2850,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="processassignlist" level="system" file="syst-aux.mkiv">
+ <cd:command name="processassignlist" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text-list"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="untexargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="untexargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:delimiter name="to"/>
@@ -2857,7 +2865,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="untexcommand" level="system" file="syst-aux.mkiv">
+ <cd:command name="untexcommand" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-csname"/>
<cd:delimiter name="to"/>
@@ -2865,56 +2873,56 @@
</cd:arguments>
</cd:command>
- <cd:command name="PointsToBigPoints" level="system" file="syst-aux.mkiv">
+ <cd:command name="PointsToBigPoints" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="PointsToWholeBigPoints" level="system" file="syst-aux.mkiv">
+ <cd:command name="PointsToWholeBigPoints" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="ScaledPointsToBigPoints" level="system" file="syst-aux.mkiv">
+ <cd:command name="ScaledPointsToBigPoints" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="ScaledPointsToWholeBigPoints" level="system" file="syst-aux.mkiv">
+ <cd:command name="ScaledPointsToWholeBigPoints" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="PointsToReal" level="system" file="syst-aux.mkiv">
+ <cd:command name="PointsToReal" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="dontleavehmode" level="style" file="syst-aux.mkiv"/>
+ <cd:command name="dontleavehmode" level="style" category="system" file="syst-aux.mkiv"/>
- <cd:command name="utfupper" level="system" file="syst-aux.mkiv">
+ <cd:command name="utfupper" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="utflower" level="system" file="syst-aux.mkiv">
+ <cd:command name="utflower" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="uppercasestring" level="system" file="syst-aux.mkiv">
+ <cd:command name="uppercasestring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="to"/>
@@ -2922,7 +2930,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="lowercasestring" level="system" file="syst-aux.mkiv">
+ <cd:command name="lowercasestring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="to"/>
@@ -2930,7 +2938,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="counttoken" level="system" file="syst-aux.mkiv">
+ <cd:command name="counttoken" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="in"/>
@@ -2940,7 +2948,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="counttokens" level="system" file="syst-aux.mkiv">
+ <cd:command name="counttokens" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="to"/>
@@ -2948,7 +2956,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="splitofftokens" level="system" file="syst-aux.mkiv">
+ <cd:command name="splitofftokens" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="from"/>
@@ -2958,7 +2966,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="handletokens" level="system" file="syst-aux.mkiv">
+ <cd:command name="handletokens" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="with"/>
@@ -2966,11 +2974,11 @@
</cd:arguments>
</cd:command>
- <cd:command name="settrialtypesetting" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="settrialtypesetting" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="resettrialtypesetting" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="resettrialtypesetting" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="iftrialtypesetting" level="system" file="syst-aux.mkiv">
+ <cd:command name="iftrialtypesetting" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-true"/>
<cd:delimiter name="else"/>
@@ -2979,64 +2987,64 @@
</cd:arguments>
</cd:command>
- <cd:command name="integerrounding" level="system" file="syst-aux.mkiv">
+ <cd:command name="integerrounding" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="onedigitrounding" level="system" file="syst-aux.mkiv">
+ <cd:command name="onedigitrounding" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="twodigitrounding" level="system" file="syst-aux.mkiv">
+ <cd:command name="twodigitrounding" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="threedigitrounding" level="system" file="syst-aux.mkiv">
+ <cd:command name="threedigitrounding" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="processcontent" level="system" file="syst-aux.mkiv">
+ <cd:command name="processcontent" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="dogobblesingleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dogobblesingleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="dogobbledoubleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="dogobbledoubleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy-optional"/>
<cd:resolve name="keyword-dummy-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="gobblesingleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobblesingleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="gobbledoubleempty" level="system" file="syst-aux.mkiv">
+ <cd:command name="gobbledoubleempty" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dummy-optional"/>
<cd:resolve name="keyword-dummy-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsesometoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsesometoks" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-true"/>
@@ -3044,7 +3052,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsometokselse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifsometokselse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-true"/>
@@ -3052,71 +3060,71 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifsometoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifsometoks" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifemptytoks" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifemptytoks" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="strictinspectnextcharacter" type="environment" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="strictinspectnextcharacter" type="environment" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="strictdoifelsenextoptional" level="system" file="syst-aux.mkiv">
+ <cd:command name="strictdoifelsenextoptional" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="strictdoifnextoptionalelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="strictdoifnextoptionalelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
</cd:arguments>
</cd:command>
- <cd:command name="gobblespacetokens" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="gobblespacetokens" level="system" category="strings" file="syst-aux.mkiv"/>
- <cd:command name="verbatimstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="verbatimstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="lastdigit" level="system" file="syst-aux.mkiv">
+ <cd:command name="lastdigit" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="lasttwodigits" level="system" file="syst-aux.mkiv">
+ <cd:command name="lasttwodigits" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="serializedcommalist" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="serializedcommalist" level="system" category="strings" file="syst-aux.mkiv"/>
- <cd:command name="serializecommalist" level="system" file="syst-aux.mkiv">
+ <cd:command name="serializecommalist" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-command-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="purenumber" level="system" file="syst-aux.mkiv">
+ <cd:command name="purenumber" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="filterfromvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="filterfromvalue" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -3124,7 +3132,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="filterfromnext" level="system" file="syst-aux.mkiv">
+ <cd:command name="filterfromnext" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-number"/>
@@ -3136,61 +3144,61 @@
</cd:arguments>
</cd:command>
- <cd:command name="definemeasure" level="style" file="syst-aux.mkiv">
+ <cd:command name="definemeasure" level="style" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="freezemeasure" level="system" file="syst-aux.mkiv">
+ <cd:command name="freezemeasure" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setmeasure" level="system" file="syst-aux.mkiv">
+ <cd:command name="setmeasure" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setgmeasure" level="system" file="syst-aux.mkiv">
+ <cd:command name="setgmeasure" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setemeasure" level="system" file="syst-aux.mkiv">
+ <cd:command name="setemeasure" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="setxmeasure" level="system" file="syst-aux.mkiv">
+ <cd:command name="setxmeasure" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="measure" level="style" file="syst-aux.mkiv">
+ <cd:command name="measure" level="style" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="measured" level="style" file="syst-aux.mkiv">
+ <cd:command name="measured" level="style" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="dividedsize" level="system" file="syst-aux.mkiv">
+ <cd:command name="dividedsize" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -3198,7 +3206,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsedimension" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsedimension" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -3206,7 +3214,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdimensionelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifdimensionelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -3214,7 +3222,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsedimenstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsedimenstring" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -3222,7 +3230,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdimenstringelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifdimenstringelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -3230,23 +3238,23 @@
</cd:arguments>
</cd:command>
- <cd:command name="compresult" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="compresult" level="system" category="counter" file="syst-aux.mkiv"/>
- <cd:command name="comparedimension" level="system" file="syst-aux.mkiv">
+ <cd:command name="comparedimension" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="comparedimensioneps" level="system" file="syst-aux.mkiv">
+ <cd:command name="comparedimensioneps" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="letcscsname" level="system" file="syst-aux.mkiv">
+ <cd:command name="letcscsname" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:delimiter name="csname"/>
@@ -3255,7 +3263,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="letcsnamecs" level="system" file="syst-aux.mkiv">
+ <cd:command name="letcsnamecs" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:delimiter name="csname"/>
<cd:resolve name="string-name"/>
@@ -3264,7 +3272,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="letcsnamecsname" level="system" file="syst-aux.mkiv">
+ <cd:command name="letcsnamecsname" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:delimiter name="csname"/>
<cd:resolve name="string-name"/>
@@ -3275,20 +3283,20 @@
</cd:arguments>
</cd:command>
- <cd:command name="addvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="addvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="unspaced" level="system" file="syst-aux.mkiv">
+ <cd:command name="unspaced" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="unspaceargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="unspaceargument" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-text"/>
<cd:delimiter name="to"/>
@@ -3296,14 +3304,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="unspaceafter" level="system" file="syst-aux.mkiv">
+ <cd:command name="unspaceafter" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsehasspace" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsehasspace" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -3311,7 +3319,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifhasspaceelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifhasspaceelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-true"/>
@@ -3319,25 +3327,25 @@
</cd:arguments>
</cd:command>
- <cd:command name="setflag" level="system" file="syst-aux.mkiv">
+ <cd:command name="setflag" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="resetflag" level="system" file="syst-aux.mkiv">
+ <cd:command name="resetflag" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="flag" level="system" file="syst-aux.mkiv">
+ <cd:command name="flag" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseflagged" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelseflagged" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -3345,7 +3353,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifflaggedelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifflaggedelse" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -3353,14 +3361,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotflagged" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnotflagged" level="system" category="system" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="inheritparameter" level="system" file="syst-aux.mkiv">
+ <cd:command name="inheritparameter" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="keyword-text"/>
@@ -3368,7 +3376,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsenonzeropositive" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifelsenonzeropositive" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -3376,7 +3384,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnonzeropositiveelse" level="system" file="syst-aux.mkiv">
+ <cd:command name="doifnonzeropositiveelse" level="system" category="strings" keywords="conditional" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -3384,118 +3392,122 @@
</cd:arguments>
</cd:command>
- <cd:command name="getrawparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getrawparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getraweparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getraweparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getrawgparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getrawgparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="getrawxparameters" level="system" file="syst-aux.mkiv">
+ <cd:command name="getrawxparameters" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-text"/>
<cd:resolve name="assignment-userdata-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="unprotected" level="system" file="syst-aux.mkiv">
+ <cd:command name="unprotected" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="string-content"/>
<cd:delimiter name="par"/>
</cd:arguments>
</cd:command>
- <cd:command name="resettimer" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="resettimer" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="elapsedtime" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="elapsedtime" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="elapsedseconds" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="elapsedseconds" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="currentfeaturetest" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="elapsedsteptime" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="testfeature" level="system" file="syst-aux.mkiv">
+ <cd:command name="currentfeaturetest" level="system" category="system" file="syst-aux.mkiv"/>
+
+ <cd:command name="testfeature" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="showtimer" level="system" file="syst-aux.mkiv">
+ <cd:command name="retestfeature" level="system" category="system" file="syst-aux.mkiv"/>
+
+ <cd:command name="showtimer" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="testfeatureonce" level="system" file="syst-aux.mkiv">
+ <cd:command name="testfeatureonce" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="freezedimenmacro" level="system" file="syst-aux.mkiv">
+ <cd:command name="freezedimenmacro" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="negated" level="system" file="syst-aux.mkiv">
+ <cd:command name="negated" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="assigndimen" level="system" file="syst-aux.mkiv">
+ <cd:command name="assigndimen" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
</cd:command>
- <cd:command name="appendvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="appendvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="appendgvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="appendgvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="prependvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="prependvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="prependgvalue" level="system" file="syst-aux.mkiv">
+ <cd:command name="prependgvalue" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="processranges" level="system" file="syst-aux.mkiv">
+ <cd:command name="processranges" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords list="yes">
<cd:constant type="cd:number"/>
@@ -3505,7 +3517,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="dowithrange" level="system" file="syst-aux.mkiv">
+ <cd:command name="dowithrange" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:keywords delimiters="braces" list="yes">
<cd:constant type="cd:number"/>
@@ -3515,11 +3527,11 @@
</cd:arguments>
</cd:command>
- <cd:command name="ignoreimplicitspaces" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="ignoreimplicitspaces" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="nointerference" type="environment" level="system" file="syst-aux.mkiv"/>
+ <cd:command name="nointerference" type="environment" level="system" category="system" file="syst-aux.mkiv"/>
- <cd:command name="expandcheckedcsname" level="system" file="syst-aux.mkiv">
+ <cd:command name="expandcheckedcsname" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-key"/>
@@ -3527,43 +3539,43 @@
</cd:arguments>
</cd:command>
- <cd:command name="docheckedpair" level="system" file="syst-aux.mkiv">
+ <cd:command name="docheckedpair" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="constantnumber" level="system" file="syst-aux.mkiv">
+ <cd:command name="constantnumber" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="constantnumberargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="constantnumberargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="constantdimen" level="system" file="syst-aux.mkiv">
+ <cd:command name="constantdimen" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="constantdimenargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="constantdimenargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="constantemptyargument" level="system" file="syst-aux.mkiv">
+ <cd:command name="constantemptyargument" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:csname/>
</cd:arguments>
</cd:command>
- <cd:command name="getsubstring" level="system" file="syst-aux.mkiv">
+ <cd:command name="getsubstring" level="system" category="strings" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-number"/>
@@ -3571,7 +3583,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="converteddimen" level="system" file="syst-aux.mkiv">
+ <cd:command name="converteddimen" level="system" category="counter" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:keywords delimiters="braces">
@@ -3591,14 +3603,14 @@
</cd:arguments>
</cd:command>
- <cd:command name="ntimes" level="system" file="syst-aux.mkiv">
+ <cd:command name="ntimes" level="system" category="system" file="syst-aux.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="expdoifelse" level="system" file="syst-lua.mkiv">
+ <cd:command name="expdoifelse" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -3607,7 +3619,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expdoif" level="system" file="syst-lua.mkiv">
+ <cd:command name="expdoif" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -3615,7 +3627,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expdoifnot" level="system" file="syst-lua.mkiv">
+ <cd:command name="expdoifnot" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -3623,7 +3635,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expandeddoif" level="system" file="syst-lua.mkiv">
+ <cd:command name="expandeddoif" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -3631,7 +3643,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expandeddoifnot" level="system" file="syst-lua.mkiv">
+ <cd:command name="expandeddoifnot" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -3639,7 +3651,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expandeddoifelse" level="system" file="syst-lua.mkiv">
+ <cd:command name="expandeddoifelse" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:content/>
<cd:content/>
@@ -3648,7 +3660,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expdoifelsecommon" level="system" file="syst-lua.mkiv">
+ <cd:command name="expdoifelsecommon" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -3657,7 +3669,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expdoifcommonelse" level="system" file="syst-lua.mkiv">
+ <cd:command name="expdoifcommonelse" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:resolve name="argument-text-list"/>
<cd:resolve name="argument-text-list"/>
@@ -3666,7 +3678,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expdoifelseinset" level="system" file="syst-lua.mkiv">
+ <cd:command name="expdoifelseinset" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -3675,7 +3687,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="expdoifinsetelse" level="system" file="syst-lua.mkiv">
+ <cd:command name="expdoifinsetelse" level="system" category="strings" keywords="conditional" file="syst-lua.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:resolve name="argument-text-list"/>
@@ -3684,10 +3696,20 @@
</cd:arguments>
</cd:command>
- <cd:command name="luaexpr" level="system" file="syst-lua.mkiv">
+ <cd:command name="luaexpr" level="system" category="strings" file="syst-lua.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
+ <cd:command name="setupsystem" level="style" category="counter" file="core-sys.mkiv">
+ <cd:arguments>
+ <cd:assignments list="yes">
+ <cd:parameter name="n">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-systemlog.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-systemlog.xml
index fc3243cfb7a..16b121322cf 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-systemlog.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-systemlog.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="systemlog" level="system" file="core-sys.mkiv">
+ <cd:command name="systemlog" level="system" category="tracker" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-text"/>
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="systemlogfirst" level="system" file="core-sys.mkiv">
+ <cd:command name="systemlogfirst" level="system" category="tracker" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-text"/>
@@ -20,7 +20,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="systemloglast" level="system" file="core-sys.mkiv">
+ <cd:command name="systemloglast" level="system" category="tracker" file="core-sys.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-text"/>
@@ -28,4 +28,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-table.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-table.xml
index e59a9ca9798..c75fc1d8ed3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-table.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-table.xml
@@ -58,7 +58,7 @@
<cd:command name="setuptables" level="style" category="tables" file="tabl-tab.mkiv">
<cd:arguments>
<cd:assignments list="yes">
- <cd:parameter name="text">
+ <cd:parameter name="textwidth">
<cd:constant type="cd:dimension"/>
<cd:constant type="max"/>
</cd:parameter>
@@ -407,4 +407,4 @@
-->
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-tabulation.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-tabulation.xml
index 6768b9b4cf6..2c080876935 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-tabulation.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-tabulation.xml
@@ -4,19 +4,164 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definetabulation" level="style" category="tables" file="tabl-tbl.mkiv">
+ <!--
+
+ <cd:command name="definetabulation" level="style" category="tables" file="tabl-tbl.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name"/>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setuptabulation"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="setuptabulation" level="style" category="tables" file="tabl-tbl.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-list-optional"/>
+ <cd:assignments list="yes">
+ <cd:parameter name="format">
+ <cd:constant type="cd:template"/>
+ <cd:constant type="none"/>
+ </cd:parameter>
+ <cd:parameter name="before">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="after">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="distance">
+ <cd:constant type="small"/>
+ <cd:constant type="medium" default="yes"/>
+ <cd:constant type="big"/>
+ <cd:constant type="none"/>
+ <cd:constant type="blank"/>
+ <cd:constant type="depth" default="yes"/>
+ <cd:constant type="grid"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="blank">
+ <cd:resolve name="value-blank"/>
+ </cd:parameter>
+ <cd:parameter name="headstyle">
+ <cd:resolve name="value-style"/>
+ </cd:parameter>
+ <cd:parameter name="headcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="background">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="backgroundcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="foregroundstyle">
+ <cd:resolve name="value-style"/>
+ </cd:parameter>
+ <cd:parameter name="foregroundcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="align">
+ <cd:constant type="left"/>
+ <cd:constant type="middle"/>
+ <cd:constant type="right"/>
+ <cd:constant type="dimension"/>
+ </cd:parameter>
+ <cd:parameter name="rule">
+ <cd:constant type="line"/>
+ <cd:constant type="normal" default="yes"/>
+ </cd:parameter>
+ <cd:parameter name="rulecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="rulethickness">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="bodyfont">
+ <cd:inherit name="setupbodyfont"/>
+ </cd:parameter>
+ <cd:parameter name="indenting">
+ <cd:constant type="yes"/>
+ <cd:constant type="no" default="yes"/>
+ </cd:parameter>
+ <cd:parameter name="split">
+ <cd:constant type="yes"/>
+ <cd:constant type="no"/>
+ <cd:constant type="repeat"/>
+ <cd:constant type="auto" default="yes"/>
+ </cd:parameter>
+ <cd:parameter name="unit">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="margin">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="inner">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="EQ">
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="header">
+ <cd:constant type="yes" default="yes"/>
+ <cd:constant type="repeat"/>
+ <cd:constant type="text"/>
+ </cd:parameter>
+ <cd:parameter name="frame">
+ <cd:constant type="on"/>
+ <cd:constant type="off" default="yes"/>
+ </cd:parameter>
+ <cd:parameter name="title">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="keeptogether">
+ <cd:constant type="yes" default="yes"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="tabulation" type="environment" generated="yes" variant="example" level="document" category="tables" file="tabl-tbl.mkiv">
+ <cd:sequence>
+ <cd:variable value="tabulation"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes" optional="yes">
+ <cd:inherit name="setuptabulation"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ -->
+
+ <cd:command name="definetabulate" level="style" category="tables" file="tabl-tbl.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulation"/>
- </cd:assignments>
+ <cd:template optional="yes"/>
</cd:arguments>
</cd:command>
- <cd:command name="setuptabulation" level="style" category="tables" file="tabl-tbl.mkiv">
+ <!--
+
+ <cd:command name="setuptabulate" level="style" category="tables" file="tabl-tbl.mkiv">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:assignments list="yes">
+ <cd:inherit name="setuptabulation"/>
+ </cd:assignments>
+ </cd:arguments>
+ </cd:command>
+
+ -->
+
+ <cd:command name="setuptabulate" level="style" category="tables" file="tabl-tbl.mkiv">
<cd:arguments>
- <cd:resolve name="keyword-name-list-optional"/>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes">
<cd:parameter name="format">
<cd:constant type="cd:template"/>
@@ -120,36 +265,6 @@
</cd:arguments>
</cd:command>
- <cd:command name="tabulation" type="environment" generated="yes" variant="example" level="document" category="tables" file="tabl-tbl.mkiv">
- <cd:sequence>
- <cd:variable value="tabulation"/>
- </cd:sequence>
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulation"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="definetabulate" level="style" category="tables" file="tabl-tbl.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name"/>
- <cd:resolve name="keyword-name-optional"/>
- <cd:template optional="yes"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setuptabulate" level="style" category="tables" file="tabl-tbl.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes">
- <cd:inherit name="setuptabulation"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
<cd:command name="tabulate" type="environment" level="document" category="tables" file="tabl-tbl.mkiv">
<cd:arguments>
<cd:template optional="yes"/>
@@ -196,24 +311,6 @@
<!--
- <cd:command name="legend" type="environment" level="document" category="tables" file="tabl-tbl.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulate"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="fact" type="environment" level="document" category="tables" file="tabl-tbl.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulate"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
<cd:command name="VL" scope="tabulate" level="document" category="tables" file="tabl-tbl.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-tagging.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-tagging.xml
index d07b32ec1e0..4193f0e246b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-tagging.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-tagging.xml
@@ -32,7 +32,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseinelement" level="system" category="xml conditional" file="strc-tag.mkiv">
+ <cd:command name="doifelseinelement" level="system" category="xml" keywords="conditional" file="strc-tag.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -40,7 +40,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifinelementelse" level="system" category="xml conditional" file="strc-tag.mkiv">
+ <cd:command name="doifinelementelse" level="system" category="xml" keywords="conditional" file="strc-tag.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -48,7 +48,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="taggedlabeltexts" level="system" category="xml language" file="strc-tag.mkiv">
+ <cd:command name="taggedlabeltexts" level="system" category="xml" keywords="language" file="strc-tag.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -56,7 +56,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="namedtaggedlabeltexts" level="system" category="xml language" file="strc-tag.mkiv">
+ <cd:command name="namedtaggedlabeltexts" level="system" category="xml" keywords="language" file="strc-tag.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-tex.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-tex.xml
index 277c4db95b7..5599315c58e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-tex.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-tex.xml
@@ -454,4 +454,4 @@
<cd:command name="xspaceskip" level="primitive"/>
<cd:command name="year" level="primitive"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-textbackground.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-textbackground.xml
index 6104b1d9aa8..9d5b36c0791 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-textbackground.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-textbackground.xml
@@ -148,4 +148,4 @@
<cd:command name="textbackgroundmanual" type="environment" level="system" category="background" file="anch-bck.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-textflow.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-textflow.xml
index 9c9ea21900c..71234373f91 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-textflow.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-textflow.xml
@@ -37,7 +37,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsetextflowcollector" level="system" category="structure conditional" file="page-flw.mkiv">
+ <cd:command name="doifelsetextflowcollector" level="system" category="structure" keywords="conditional" file="page-flw.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -45,7 +45,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiftextflowcollectorelse" level="system" category="structure conditional" file="page-flw.mkiv">
+ <cd:command name="doiftextflowcollectorelse" level="system" category="structure" keywords="conditional" file="page-flw.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -53,7 +53,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsetextflow" level="system" category="structure conditional" file="page-flw.mkiv">
+ <cd:command name="doifelsetextflow" level="system" category="structure" keywords="conditional" file="page-flw.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -61,7 +61,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiftextflowelse" level="system" category="structure conditional" file="page-flw.mkiv">
+ <cd:command name="doiftextflowelse" level="system" category="structure" keywords="conditional" file="page-flw.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -81,4 +81,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-textrule.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-textrule.xml
index b71df66a6a4..addbc13162d 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-textrule.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-textrule.xml
@@ -69,4 +69,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-texts.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-texts.xml
index f13d8802115..0dcaf065dec 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-texts.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-texts.xml
@@ -43,15 +43,30 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="lefttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middletext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="righttext">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="leftstyle">
<cd:resolve name="value-style"/>
</cd:parameter>
+ <cd:parameter name="middlestyle">
+ <cd:resolve name="value-style"/>
+ </cd:parameter>
<cd:parameter name="rightstyle">
<cd:resolve name="value-style"/>
</cd:parameter>
<cd:parameter name="leftcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
+ <cd:parameter name="middlecolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
<cd:parameter name="rightcolor">
<cd:constant type="cd:color"/>
</cd:parameter>
@@ -61,6 +76,9 @@
<cd:parameter name="leftwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="middlewidth">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
<cd:parameter name="rightwidth">
<cd:constant type="cd:dimension"/>
</cd:parameter>
@@ -116,7 +134,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelselayouttextline" level="system" category="layout conditional" file="page-txt.mkvi">
+ <cd:command name="doifelselayouttextline" level="system" category="layout" keywords="conditional" file="page-txt.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -124,7 +142,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiflayouttextlineelse" level="system" category="layout conditional" file="page-txt.mkvi">
+ <cd:command name="doiflayouttextlineelse" level="system" category="layout" keywords="conditional" file="page-txt.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -132,7 +150,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelselayoutsomeline" level="system" category="layout conditional" file="page-txt.mkvi">
+ <cd:command name="doifelselayoutsomeline" level="system" category="layout" keywords="conditional" file="page-txt.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -140,7 +158,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiflayoutsomelineelse" level="system" category="layout conditional" file="page-txt.mkvi">
+ <cd:command name="doiflayoutsomelineelse" level="system" category="layout" keywords="conditional" file="page-txt.mkvi">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -268,4 +286,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-thinrule.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-thinrule.xml
index 372f9a23805..bc150083a5f 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-thinrule.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-thinrule.xml
@@ -71,4 +71,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-token.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-token.xml
index 09e2ad3d6df..f0359587b97 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-token.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-token.xml
@@ -4,59 +4,59 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="tokens" type="environment" level="system" file="toks-tra.mkiv">
+ <cd:command name="tokens" type="environment" level="system" category="strings" file="toks-tra.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="flushtokens" level="system" file="toks-tra.mkiv">
+ <cd:command name="flushtokens" level="system" category="strings" file="toks-tra.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="showtokens" level="system" file="toks-tra.mkiv">
+ <cd:command name="showtokens" level="system" category="strings" file="toks-tra.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="testtokens" level="system" file="toks-tra.mkiv">
+ <cd:command name="testtokens" level="system" category="strings" file="toks-tra.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="definetokenlist" level="style" file="toks-aux.mkiv">
+ <cd:command name="definetokenlist" level="style" category="strings" file="toks-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="tokenlist" type="environment" level="style" file="toks-aux.mkiv">
+ <cd:command name="tokenlist" type="environment" level="style" category="strings" file="toks-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="gettokenlist" level="style" file="toks-aux.mkiv">
+ <cd:command name="gettokenlist" level="style" category="strings" file="toks-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="resettokenlist" level="style" file="toks-aux.mkiv">
+ <cd:command name="resettokenlist" level="style" category="strings" file="toks-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="settokenlist" level="style" file="toks-aux.mkiv">
+ <cd:command name="settokenlist" level="style" category="strings" file="toks-aux.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-tolerance.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-tolerance.xml
index 3d0010edf80..1613c317059 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-tolerance.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-tolerance.xml
@@ -19,4 +19,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-tooltip.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-tooltip.xml
index df43ff9ce5d..038324426cc 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-tooltip.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-tooltip.xml
@@ -62,30 +62,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="tooltip" level="document" category="pdf" file="scrn-fld.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptooltip"/>
- </cd:assignments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tooltip" variant="argument" level="document" category="pdf" file="scrn-fld.mkvi">
- <cd:arguments>
- <cd:keywords optional="yes">
- <cd:constant type="left"/>
- <cd:constant type="middle"/>
- <cd:constant type="right"/>
- </cd:keywords>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-tracker.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-tracker.xml
index 3db36addcac..785674e2c7b 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-tracker.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-tracker.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="installtextracker" level="system" file="trac-ctx.mkiv">
+ <cd:command name="installtextracker" level="system" category="tracker" file="trac-ctx.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="installtexdirective" level="system" file="trac-ctx.mkiv">
+ <cd:command name="installtexdirective" level="system" category="tracker" file="trac-ctx.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-command"/>
@@ -20,56 +20,56 @@
</cd:arguments>
</cd:command>
- <cd:command name="enabletrackers" level="style" file="trac-deb.mkiv">
+ <cd:command name="enabletrackers" level="style" category="tracker" file="trac-deb.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="disabletrackers" level="style" file="trac-deb.mkiv">
+ <cd:command name="disabletrackers" level="style" category="tracker" file="trac-deb.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="resettrackers" level="system" file="trac-deb.mkiv"/>
+ <cd:command name="resettrackers" level="system" category="tracker" file="trac-deb.mkiv"/>
- <cd:command name="showtrackers" level="document" file="trac-deb.mkiv"/>
+ <cd:command name="showtrackers" level="document" category="tracker" file="trac-deb.mkiv"/>
- <cd:command name="enabledirectives" level="style" file="trac-deb.mkiv">
+ <cd:command name="enabledirectives" level="style" category="tracker" file="trac-deb.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="disabledirectives" level="style" file="trac-deb.mkiv">
+ <cd:command name="disabledirectives" level="style" category="tracker" file="trac-deb.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="showdirectives" level="document" file="trac-deb.mkiv"/>
+ <cd:command name="showdirectives" level="document" category="tracker" file="trac-deb.mkiv"/>
- <cd:command name="enableexperiments" level="style" file="trac-deb.mkiv">
+ <cd:command name="enableexperiments" level="style" category="tracker" file="trac-deb.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="disableexperiments" level="style" file="trac-deb.mkiv">
+ <cd:command name="disableexperiments" level="style" category="tracker" file="trac-deb.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-list"/>
</cd:arguments>
</cd:command>
- <cd:command name="showexperiments" level="document" file="trac-deb.mkiv"/>
+ <cd:command name="showexperiments" level="document" category="tracker" file="trac-deb.mkiv"/>
- <cd:command name="showedebuginfo" level="system" file="trac-deb.mkiv"/>
+ <cd:command name="showedebuginfo" level="system" category="tracker" file="trac-deb.mkiv"/>
- <cd:command name="overloaderror" level="system" file="trac-deb.mkiv"/>
+ <cd:command name="overloaderror" level="system" category="tracker" file="trac-deb.mkiv"/>
- <cd:command name="showlogcategories" level="system" file="trac-deb.mkiv"/>
+ <cd:command name="showlogcategories" level="system" category="tracker" file="trac-deb.mkiv"/>
- <cd:command name="showjustification" level="system" file="trac-jus.mkiv"/>
+ <cd:command name="showjustification" level="system" category="tracker" file="trac-jus.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-translate.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-translate.xml
index a865a4dd033..566208f96b2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-translate.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-translate.xml
@@ -23,4 +23,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-translation.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-translation.xml
index f4f03037e07..9737fffaa51 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-translation.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-translation.xml
@@ -26,4 +26,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-twopassdata.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-twopassdata.xml
index 992735693a7..853e21d1fa2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-twopassdata.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-twopassdata.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="immediatesavetwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="immediatesavetwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -12,7 +12,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="savetwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="savetwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -20,7 +20,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="lazysavetwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="lazysavetwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -28,7 +28,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="savetaggedtwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="savetaggedtwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -37,7 +37,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="lazysavetaggedtwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="lazysavetaggedtwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-number"/>
@@ -46,57 +46,57 @@
</cd:arguments>
</cd:command>
- <cd:command name="definetwopasslist" level="system" file="core-two.mkiv">
+ <cd:command name="definetwopasslist" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="gettwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="gettwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="checktwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="checktwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="findtwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="findtwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="getfirsttwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="getfirsttwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="getlasttwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="getlasttwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="getnamedtwopassdatalist" level="system" file="core-two.mkiv">
+ <cd:command name="getnamedtwopassdatalist" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:csname/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="gettwopassdatalist" level="system" file="core-two.mkiv">
+ <cd:command name="gettwopassdatalist" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelseintwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="doifelseintwopassdata" level="system" category="twopassdata" keywords="conditional" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -105,7 +105,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifintwopassdataelse" level="system" file="core-two.mkiv">
+ <cd:command name="doifintwopassdataelse" level="system" category="twopassdata" keywords="conditional" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
@@ -114,11 +114,11 @@
</cd:arguments>
</cd:command>
- <cd:command name="getfromtwopassdata" level="system" file="core-two.mkiv">
+ <cd:command name="getfromtwopassdata" level="system" category="twopassdata" file="core-two.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-typography.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-typography.xml
index c5f06fa13d4..8f6fb1974d3 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-typography.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-typography.xml
@@ -170,4 +170,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-unit.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-unit.xml
index c8092a4ed2b..c92a3b76870 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-unit.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-unit.xml
@@ -87,16 +87,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="unit" level="document" category="symbols" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="installunitsseparator" level="system" category="symbols" file="phys-dim.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
@@ -137,4 +127,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-userdata.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-userdata.xml
index e9617f0bc18..6c7da128a33 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-userdata.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-userdata.xml
@@ -47,7 +47,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="userdata" type="environment" level="document" category="structure" file="strc-usr.mkiv">
+ <cd:command name="userdata" type="environment" level="document" category="structure" keywords="buffer" file="strc-usr.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:resolve name="assignment-userdata-list-optional"/>
@@ -78,8 +78,8 @@
</cd:arguments>
</cd:command>
- <cd:command name="getuserdata" level="style" category="structure" file="strc-usr.mkiv"/>
+ <cd:command name="getuserdata" level="style" category="structure" keywords="buffer" file="strc-usr.mkiv"/>
- <cd:command name="getinlineuserdata" level="style" category="structure" file="strc-usr.mkiv"/>
+ <cd:command name="getinlineuserdata" level="style" category="structure" keywords="buffer" file="strc-usr.mkiv"/>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-variables.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-variables.xml
index 7c295f9ad58..69aab736ece 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-variables.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-variables.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="setvariables" level="style" file="core-env.mkiv">
+ <cd:command name="setvariables" level="style" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -21,7 +21,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setevariables" level="system" file="core-env.mkiv">
+ <cd:command name="setevariables" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -38,7 +38,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setgvariables" level="system" file="core-env.mkiv">
+ <cd:command name="setgvariables" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -55,7 +55,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setxvariables" level="system" file="core-env.mkiv">
+ <cd:command name="setxvariables" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -72,7 +72,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="checkvariables" level="system" file="core-env.mkiv">
+ <cd:command name="checkvariables" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:assignments list="yes">
@@ -89,7 +89,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setvariable" level="style" file="core-env.mkiv">
+ <cd:command name="setvariable" level="style" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -97,7 +97,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setevariable" level="system" file="core-env.mkiv">
+ <cd:command name="setevariable" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -105,7 +105,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setgvariable" level="system" file="core-env.mkiv">
+ <cd:command name="setgvariable" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -113,7 +113,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setxvariable" level="system" file="core-env.mkiv">
+ <cd:command name="setxvariable" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -121,21 +121,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="getvariable" level="style" file="core-env.mkiv">
+ <cd:command name="getvariable" level="style" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="showvariable" level="system" file="core-env.mkiv">
+ <cd:command name="showvariable" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsevariable" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifelsevariable" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -144,7 +144,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifvariableelse" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifvariableelse" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -153,7 +153,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifvariable" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifvariable" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -161,7 +161,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotvariable" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifnotvariable" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -169,7 +169,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseemptyvariable" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifelseemptyvariable" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -178,7 +178,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifemptyvariableelse" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifemptyvariableelse" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -187,7 +187,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifemptyvariable" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifemptyvariable" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -195,7 +195,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifnotemptyvariable" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifnotemptyvariable" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -203,7 +203,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="getvariabledefault" level="system" file="core-env.mkiv">
+ <cd:command name="getvariabledefault" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-key"/>
@@ -211,7 +211,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupenv" level="system" file="core-env.mkiv">
+ <cd:command name="setupenv" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:assignments list="yes">
<cd:parameter name="set">
@@ -227,7 +227,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseenv" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifelseenv" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-true"/>
@@ -235,7 +235,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifenvelse" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifenvelse" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-true"/>
@@ -243,74 +243,74 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifenv" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifenv" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotenv" level="system" category="conditional" file="core-env.mkiv">
+ <cd:command name="doifnotenv" level="system" category="strings" keywords="conditional" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="env" level="system" file="core-env.mkiv">
+ <cd:command name="env" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
</cd:arguments>
</cd:command>
- <cd:command name="envvar" level="system" file="core-env.mkiv">
+ <cd:command name="envvar" level="system" category="strings" file="core-env.mkiv">
<cd:arguments>
<cd:resolve name="argument-key"/>
<cd:resolve name="argument-command"/>
</cd:arguments>
</cd:command>
- <cd:command name="setdocumentfilename" level="system" file="luat-ini.mkiv">
+ <cd:command name="setdocumentfilename" category="strings" level="system" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="setdocumentargument" level="system" file="luat-ini.mkiv">
+ <cd:command name="setdocumentargument" category="strings" level="system" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="setdocumentargumentdefault" level="system" file="luat-ini.mkiv">
+ <cd:command name="setdocumentargumentdefault" category="strings" level="system" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="getdocumentfilename" level="system" file="luat-ini.mkiv">
+ <cd:command name="getdocumentfilename" level="system" category="strings" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="getdocumentargument" level="system" file="luat-ini.mkiv">
+ <cd:command name="getdocumentargument" level="system" category="strings" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
</cd:arguments>
</cd:command>
- <cd:command name="getdocumentargumentdefault" level="system" file="luat-ini.mkiv">
+ <cd:command name="getdocumentargumentdefault" level="system" category="strings" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-text"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsedocumentargument" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifelsedocumentargument" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -318,7 +318,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdocumentargumentelse" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifdocumentargumentelse" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
@@ -326,21 +326,21 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdocumentargument" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifdocumentargument" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotdocumentargument" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifnotdocumentargument" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifelsedocumentfilename" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifelsedocumentfilename" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -348,7 +348,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdocumentfilenameelse" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifdocumentfilenameelse" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -356,18 +356,18 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifdocumentfilename" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifdocumentfilename" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
- <cd:command name="doifnotdocumentfilename" level="system" category="conditional" file="luat-ini.mkiv">
+ <cd:command name="doifnotdocumentfilename" level="system" category="strings" keywords="conditional" file="luat-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-verbatim.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-verbatim.xml
index 830b8bb110d..20f1bb8730a 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-verbatim.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-verbatim.xml
@@ -235,7 +235,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="typing" type="environment" generated="yes" variant="instance" level="document" category="verbatim" file="buff-ver.mkiv">
+ <cd:command name="typing" type="environment" generated="yes" variant="instance" level="document" category="verbatim" keywords="buffer" file="buff-ver.mkiv">
<cd:sequence>
<cd:instance value="typing"/>
</cd:sequence>
@@ -249,7 +249,7 @@
</cd:instances>
</cd:command>
- <cd:command name="typing" type="environment" generated="yes" variant="instance:argument" level="document" category="verbatim" file="buff-ver.mkiv">
+ <cd:command name="typing" type="environment" generated="yes" variant="instance:argument" level="document" category="verbatim" keywords="buffer" file="buff-ver.mkiv">
<cd:sequence>
<cd:instance value="typing"/>
</cd:sequence>
@@ -321,7 +321,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelsetypingfile" category="verbatim conditional" level="system" file="buff-ver.mkiv">
+ <cd:command name="doifelsetypingfile" level="system" category="verbatim" keywords="conditional" file="buff-ver.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -329,7 +329,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doiftypingfileelse" category="verbatim conditional" level="system" file="buff-ver.mkiv">
+ <cd:command name="doiftypingfileelse" level="system" category="verbatim" keywords="conditional" file="buff-ver.mkiv">
<cd:arguments>
<cd:resolve name="argument-file"/>
<cd:resolve name="argument-true"/>
@@ -337,107 +337,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="typing" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="typing" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="LUA" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="LUA" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:sequence>
- <cd:variable value="lua"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="MP" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="MP" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="XML" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="XML" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="PARSEDXML" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="PARSEDXML" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="TEX" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="TEX" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- -->
-
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-version.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-version.xml
index 22a3846d974..643d172153e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-version.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-version.xml
@@ -41,7 +41,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseolderversion" level="system" category="conditional" file="file-mod.mkvi">
+ <cd:command name="doifelseolderversion" level="system" keywords="conditional" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-number"/>
@@ -50,7 +50,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifolderversionelse" level="system" category="conditional" file="file-mod.mkvi">
+ <cd:command name="doifolderversionelse" level="system" keywords="conditional" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-number"/>
@@ -59,7 +59,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifelseoldercontext" level="system" category="conditional" file="file-mod.mkvi">
+ <cd:command name="doifelseoldercontext" level="system" keywords="conditional" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -67,7 +67,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="doifoldercontextelse" level="system" category="conditional" file="file-mod.mkvi">
+ <cd:command name="doifoldercontextelse" level="system" keywords="conditional" file="file-mod.mkvi">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:resolve name="argument-true"/>
@@ -75,4 +75,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-viewerlayer.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-viewerlayer.xml
index fde846e4d4d..6b68b7fb9df 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-viewerlayer.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-viewerlayer.xml
@@ -65,4 +65,4 @@
<cd:command name="showlayoutcomponents" level="document" category="pdf" file="attr-lay.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-visual.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-visual.xml
index 7849ab90b94..6679fd410e8 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-visual.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-visual.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="fakerule" level="system" file="m-visual.mkiv">
+ <cd:command name="fakerule" level="system" category="rules" file="m-visual.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
</cd:arguments>
@@ -17,7 +17,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fakelines" level="document" file="m-visual.mkiv">
+ <cd:command name="fakelines" level="document" category="strings" file="m-visual.mkiv">
<cd:arguments>
<cd:keywords name="keywords" delimiters="braces">
<cd:constant type="cd:number"/>
@@ -30,7 +30,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fakewords" level="document" file="m-visual.mkiv">
+ <cd:command name="fakewords" level="document" category="strings" file="m-visual.mkiv">
<cd:arguments>
<cd:keywords name="keywords" delimiters="braces">
<cd:constant type="cd:number"/>
@@ -43,7 +43,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fakenwords" level="system" file="m-visual.mkiv">
+ <cd:command name="fakenwords" level="system" category="strings" file="m-visual.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
<cd:keywords name="keywords" delimiters="braces">
@@ -53,19 +53,19 @@
</cd:arguments>
</cd:command>
- <cd:command name="showfakewords" level="system" file="m-visual.mkiv"/>
+ <cd:command name="showfakewords" level="system" category="strings" file="m-visual.mkiv"/>
- <cd:command name="fakeword" level="system" file="m-visual.mkiv"/>
+ <cd:command name="fakeword" level="system" category="strings" file="m-visual.mkiv"/>
- <cd:command name="fakeparindent" level="system" file="m-visual.mkiv"/>
+ <cd:command name="fakeparindent" level="system" category="whitespace" file="m-visual.mkiv"/>
- <cd:command name="fakeddroppedcaps" level="system" file="m-visual.mkiv">
+ <cd:command name="fakeddroppedcaps" level="system" category="fonts" file="m-visual.mkiv">
<cd:arguments>
<cd:resolve name="argument-number"/>
</cd:arguments>
</cd:command>
- <cd:command name="fakefigure" level="document" file="m-visual.mkiv">
+ <cd:command name="fakefigure" level="document" category="graphics" keywords="structure" file="m-visual.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:inherit name="placefloat"/>
@@ -78,7 +78,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="fakeimage" level="document" file="m-visual.mkiv">
+ <cd:command name="fakeimage" level="document" category="graphics" file="m-visual.mkiv">
<cd:arguments>
<cd:resolve name="argument-dimension"/>
<cd:resolve name="argument-dimension"/>
@@ -87,11 +87,11 @@
</cd:arguments>
</cd:command>
- <cd:command name="fakeformula" level="document" file="m-visual.mkiv"/>
+ <cd:command name="fakeformula" level="document" category="mathematics" file="m-visual.mkiv"/>
- <cd:command name="fakespacingformula" level="document" file="m-visual.mkiv"/>
+ <cd:command name="fakespacingformula" level="document" category="mathematics" file="m-visual.mkiv"/>
- <cd:command name="smashedgrid" level="system" file="m-visual.mkiv">
+ <cd:command name="smashedgrid" level="system" category="layout" file="m-visual.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
<cd:inherit name="basegrid"/>
@@ -99,17 +99,17 @@
</cd:arguments>
</cd:command>
- <cd:command name="bodyfontgrid" level="system" file="m-visual.mkiv"/>
+ <cd:command name="bodyfontgrid" level="system" category="fonts" file="m-visual.mkiv"/>
- <cd:command name="emexgrid" level="system" file="m-visual.mkiv"/>
+ <cd:command name="emexgrid" level="system" category="fonts" file="m-visual.mkiv"/>
- <cd:command name="simplethesis" level="system" file="m-visual.mkiv"/>
+ <cd:command name="simplethesis" level="system" category="layout" file="m-visual.mkiv"/>
- <cd:command name="showbaselines" level="system" file="m-visual.mkiv"/>
+ <cd:command name="showbaselines" level="system" category="layout" file="m-visual.mkiv"/>
- <cd:command name="showpagebuilder" level="system" file="m-visual.mkiv"/>
+ <cd:command name="showpagebuilder" level="system" category="layout" file="m-visual.mkiv"/>
- <cd:command name="tagbox" level="system" file="m-visual.mkiv">
+ <cd:command name="tagbox" level="system" category="boxes" file="m-visual.mkiv">
<cd:arguments>
<cd:resolve name="argument-text"/>
<cd:keywords optional="yes">
@@ -131,24 +131,24 @@
</cd:arguments>
</cd:command>
- <cd:command name="coloredhbox" level="system" file="m-visual.mkiv">
+ <cd:command name="coloredhbox" level="system" category="boxes" keywords="colors" file="m-visual.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="coloredvbox" level="system" file="m-visual.mkiv">
+ <cd:command name="coloredvbox" level="system" category="boxes" keywords="colors" file="m-visual.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="coloredvtop" level="system" file="m-visual.mkiv">
+ <cd:command name="coloredvtop" level="system" category="boxes" keywords="colors" file="m-visual.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="coloredstrut" level="system" file="m-visual.mkiv"/>
+ <cd:command name="coloredstrut" level="system" category="fonts" file="m-visual.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-visualizer.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-visualizer.xml
index 81d02f4fbaf..817cdb38345 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-visualizer.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-visualizer.xml
@@ -4,111 +4,111 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="ruledhbox" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledhbox" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ruledvbox" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledvbox" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ruledvtop" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledvtop" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ruledtopv" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledtopv" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ruledhpack" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledhpack" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ruledvpack" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledvpack" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ruledtpack" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledtpack" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="ruledmbox" level="system" file="trac-vis.mkiv">
+ <cd:command name="ruledmbox" level="system" category="boxes" keywords="rules" file="trac-vis.mkiv">
<cd:arguments>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="filledhboxr" level="system" file="trac-vis.mkiv">
+ <cd:command name="filledhboxr" level="system" category="boxes" keywords="background colors" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="filledhboxg" level="system" file="trac-vis.mkiv">
+ <cd:command name="filledhboxg" level="system" category="boxes" keywords="background colors" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="filledhboxb" level="system" file="trac-vis.mkiv">
+ <cd:command name="filledhboxb" level="system" category="boxes" keywords="background colors" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="filledhboxc" level="system" file="trac-vis.mkiv">
+ <cd:command name="filledhboxc" level="system" category="boxes" keywords="background colors" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="filledhboxm" level="system" file="trac-vis.mkiv">
+ <cd:command name="filledhboxm" level="system" category="boxes" keywords="background colors" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="filledhboxy" level="system" file="trac-vis.mkiv">
+ <cd:command name="filledhboxy" level="system" category="boxes" keywords="background colors" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="filledhboxk" level="system" file="trac-vis.mkiv">
+ <cd:command name="filledhboxk" level="system" category="boxes" keywords="background colors" file="trac-vis.mkiv">
<cd:arguments>
<cd:resolve name="string-boxoptions"/>
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command name="showmakeup" level="document" file="trc-vis.mkiv">
+ <cd:command name="showmakeup" level="document" category="boxes" file="trc-vis.mkiv">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="makeup" default="yes"/>
@@ -142,26 +142,26 @@
</cd:arguments>
</cd:command>
- <cd:command name="showallmakeup" level="document" file="trc-vis.mkiv"/>
+ <cd:command name="showallmakeup" level="document" category="boxes" file="trc-vis.mkiv"/>
- <cd:command name="showboxes" level="document" file="trc-vis.mkiv"/>
+ <cd:command name="showboxes" level="document" category="boxes" file="trc-vis.mkiv"/>
- <cd:command name="showglyphs" level="document" file="trc-vis.mkiv"/>
+ <cd:command name="showglyphs" level="document" category="fonts" file="trc-vis.mkiv"/>
- <cd:command name="showfontkerns" level="document" file="trc-vis.mkiv"/>
+ <cd:command name="showfontkerns" level="document" category="fonts" file="trc-vis.mkiv"/>
- <cd:command name="showfontitalics" level="document" file="trc-vis.mkiv"/>
+ <cd:command name="showfontitalics" level="document" category="fonts" file="trc-vis.mkiv"/>
- <cd:command name="showglyphdata" level="document" file="trc-vis.mkiv"/>
+ <cd:command name="showglyphdata" level="document" category="fonts" file="trc-vis.mkiv"/>
- <cd:command name="showfontexpansion" level="document" file="trc-vis.mkiv"/>
+ <cd:command name="showfontexpansion" level="document" category="fonts" file="trc-vis.mkiv"/>
- <cd:command name="setvisualizerfont" level="system" file="trc-vis.mkiv">
+ <cd:command name="setvisualizerfont" level="system" category="fonts" file="trc-vis.mkiv">
<cd:arguments>
<cd:resolve name="keyword-font-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="resetvisualizers" level="system" file="trc-vis.mkiv"/>
+ <cd:command name="resetvisualizers" level="system" category="fonts" file="trc-vis.mkiv"/>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-vspace.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-vspace.xml
index e79e4e73623..653ae169e6f 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-vspace.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-vspace.xml
@@ -106,6 +106,18 @@
</cd:arguments>
</cd:command>
+ <cd:command name="doifoutervmode" level="document" category="whitespace" keywords="conditional" file="spac-ver.mkxl">
+ <cd:arguments>
+ <cd:content/>
+ </cd:arguments>
+ </cd:command>
+
+ <cd:command name="dosomebreak" level="document" category="whitespace" file="spac-ver.mkxl">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+
<cd:command name="godown" level="document" category="whitespace" file="spac-ver.mkiv">
<cd:arguments>
<cd:resolve name="keyword-dimension"/>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-whitespace.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-whitespace.xml
index a44b08f1d9c..c64b44a41a2 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-whitespace.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-whitespace.xml
@@ -59,6 +59,6 @@
</cd:arguments>
</cd:command>
- <cd:command name="forgetparskip" category="alignment" level="system" file="spac-ver.mkiv"/>
+ <cd:command name="forgetparskip" category="alignment" keywords="alignment" level="system" category="whitespace" file="spac-ver.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-xml.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-xml.xml
index 1786e1bf60d..5c63416d772 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-xml.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-xml.xml
@@ -726,16 +726,7 @@
<cd:command name="xmlregisterns" level="style" category="xml" file="lxml-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
- <cd:keywords delimiters="braces">
- <cd:constant type="cd:url"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xmlregisterns" level="style" category="xml" file="lxml-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-name"/>
- <cd:resolve name="argument-name"/>
+ <cd:resolve name="argument-url"/>
</cd:arguments>
</cd:command>
@@ -827,7 +818,7 @@
<!--
- <cd:command name="xmltoparameters" file="lxml-ini.mkiv">
+ <cd:command name="xmltoparameters" level="style" category="xml" file="lxml-ini.mkiv">
<cd:arguments>
<cd:resolve name="argument-node"/>
<cd:resolve name="argument-lpath"/>
@@ -921,6 +912,10 @@
<cd:constant type="yes"/>
<cd:constant type="no"/>
</cd:parameter>
+ <cd:parameter name="entities">
+ <cd:constant type="yes"/>
+ <cd:constant type="no" default="yes"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -931,4 +926,10 @@
</cd:arguments>
</cd:command>
+ <cd:command name="xmldepth" level="style" category="xml" file="lxml-ini.mkiv">
+ <cd:arguments>
+ <cd:resolve name="argument-node"/>
+ </cd:arguments>
+ </cd:command>
+
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/interface/mkiv/i-xtable.xml b/Master/texmf-dist/tex/context/interface/mkiv/i-xtable.xml
index 7ee0df3f28f..4e1056cb21e 100644
--- a/Master/texmf-dist/tex/context/interface/mkiv/i-xtable.xml
+++ b/Master/texmf-dist/tex/context/interface/mkiv/i-xtable.xml
@@ -4,7 +4,7 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
- <cd:command name="definextable" level="style" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="definextable" level="style" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
<cd:resolve name="keyword-name-optional"/>
@@ -14,7 +14,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="setupxtable" level="style" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="setupxtable" level="style" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-list-optional"/>
<cd:assignments list="yes">
@@ -101,7 +101,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="xtable" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtable" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
@@ -109,13 +109,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="xtable" type="environment" variant="name" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtable" type="environment" variant="name" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="embeddedxtable" type="environment" level="style" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="embeddedxtable" type="environment" level="style" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
@@ -123,13 +123,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="embeddedxtable" type="environment" variant="name" level="style" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="embeddedxtable" type="environment" variant="name" level="style" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="xtable" type="environment" generated="yes" variant="example" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtable" type="environment" generated="yes" variant="example" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:sequence>
<cd:variable value="xtable"/>
</cd:sequence>
@@ -140,13 +140,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="processxtablebuffer" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="processxtablebuffer" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="xrow" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xrow" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -157,7 +157,7 @@
<!--
- <cd:command name="xcolumn" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xcolumn" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -168,7 +168,7 @@
-->
- <cd:command name="xcolumn" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xcolumn" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
@@ -176,13 +176,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="xcolumn" type="environment" variant="name" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xcolumn" type="environment" variant="name" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="xcell" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xcell" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -203,7 +203,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="xtablehead" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablehead" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
@@ -211,13 +211,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="xtablehead" type="environment" variant="name" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablehead" type="environment" variant="name" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="xtablefoot" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablefoot" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
@@ -225,13 +225,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="xtablefoot" type="environment" variant="name" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablefoot" type="environment" variant="name" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="xtablenext" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablenext" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
@@ -239,13 +239,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="xtablenext" type="environment" variant="name" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablenext" type="environment" variant="name" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="xtablebody" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablebody" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:assignments list="yes" optional="yes">
<cd:inherit name="setupxtable"/>
@@ -253,13 +253,13 @@
</cd:arguments>
</cd:command>
- <cd:command name="xtablebody" type="environment" variant="name" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xtablebody" type="environment" variant="name" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
</cd:arguments>
</cd:command>
- <cd:command name="xgroup" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xgroup" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -268,7 +268,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="xrowgroup" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xrowgroup" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -277,7 +277,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="xcellgroup" type="environment" level="document" category="tables" file="tabl-xtb.mkvi">
+ <cd:command name="xcellgroup" type="environment" level="document" category="tables" keywords="background rules" file="tabl-xtb.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name-optional"/>
<cd:assignments list="yes" optional="yes">
@@ -286,8 +286,8 @@
</cd:arguments>
</cd:command>
- <cd:command name="currentxtablerow" level="system" category="tables" file="tabl-xtb.mkvi"/>
+ <cd:command name="currentxtablerow" level="system" category="tables" keywords="background rules" file="tabl-xtb.mkvi"/>
- <cd:command name="currentxtablecolumn" level="system" category="tables" file="tabl-xtb.mkvi"/>
+ <cd:command name="currentxtablecolumn" level="system" category="tables" keywords="background rules" file="tabl-xtb.mkvi"/>
</cd:interface>
diff --git a/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex b/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex
index 11c5b9725d2..dfac57f0af6 100644
--- a/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex
+++ b/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% avoid two character abbreviations
+
\startmodule[abbreviations-logos]
\logo [MKI] {MkI} % joke
@@ -27,7 +29,7 @@
\logo [MPVI] {MpVI}
\logo [MPLX] {MpLX}
\logo [MPXL] {MpXL}
-\logo [LMTX] {lmtx}
+\logo [LMTX] {LMTX}
\logo [ACROBAT] {Acro\-bat}
\logo [AFM] {afm}
@@ -369,6 +371,6 @@
\logo [KB] {KB}
\logo [MB] {MB}
\logo [GB] {GB}
-\logo [TB] {TB}
+% \logo [TB] {TB}
\stopmodule
diff --git a/Master/texmf-dist/tex/context/base/mkiv/toks-tra.lua b/Master/texmf-dist/tex/context/modules/common/s-obsolete-tokens.mkiv
index 3a5bc130635..0d055049c24 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/toks-tra.lua
+++ b/Master/texmf-dist/tex/context/modules/common/s-obsolete-tokens.mkiv
@@ -1,12 +1,34 @@
-if not modules then modules = { } end modules ['toks-ini'] = {
+%D \module
+%D [ file=toks-tra, % was toks-ini
+%D version=2007.03.03,
+%D title=\CONTEXT\ Obsolete Modules,
+%D subtitle=Tokens,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D The code here used to be in the \type {toks-tra} files which were made in
+%D the real early days of \LUATEX\ and used in articles and presentations
+%D about this engine. Because the code is used in manuals we keep it around
+%D as module.
+
+\writestatus{loading}{ConTeXt Obsolete Modules / Tokens}
+
+%D This used to be in \type {toks-tra.lua}:
+
+\startluacode
+
+if not modules then modules = { } end modules ['s-obsolete-tokens'] = {
version = 1.001,
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
--- this will become a module
-
local utfbyte, utfchar, utfvalues = utf.byte, utf.char, utf.values
local format, gsub = string.format, string.gsub
local tostring = tostring
@@ -34,7 +56,7 @@ local report = logs.reporter("tokens","collectors")
-- flush : print back to tex
-- test : fancy stuff
-local get_next = token.get_next
+local get_next = token.scan_next or token.get_next
local create_token = token.create
function collectors.install(tag,end_cs)
@@ -69,27 +91,34 @@ function collectors.show(data)
local ctx_NR = context.NR
local ctx_bold = context.bold
local ctx_verbatim = context.verbatim
- context.starttabulate { "|Tl|Tc|Tl|" }
- ctx_NC() ctx_bold("cmd")
- ctx_NC() ctx_bold("meaning")
- ctx_NC() ctx_bold("properties")
- ctx_NC() ctx_NR()
- context.HL()
- for i=1,#data do
- local token = data[i]
- local cmdname = token.cmdname
- local simple = simple[cmdname]
- ctx_NC()
- ctx_verbatim(simple or cmdname)
- ctx_NC()
- ctx_verbatim(simple and utfchar(token.mode) or token.csname)
- ctx_NC()
- if token.active then context("active ") end
- if token.expandable then context("expandable ") end
- if token.protected then context("protected ") end
- ctx_NC()
- ctx_NR()
+ local function show(data)
+ for i=1,#data do
+ local token = data[i]
+ if type(token) == "table" then
+ show(token)
+ else
+ local cmdname = token.cmdname
+ local simple = simple[cmdname]
+ ctx_NC()
+ ctx_verbatim(simple or cmdname)
+ ctx_NC()
+ ctx_verbatim(simple and utfchar(token.index) or token.csname)
+ ctx_NC()
+ if token.active then context("active ") end
+ if token.expandable then context("expandable ") end
+ if token.protected then context("protected ") end
+ ctx_NC()
+ ctx_NR()
+ end
+ end
end
+ context.starttabulate { "|Tl|Tc|Tl|" }
+ ctx_NC() ctx_bold("cmd")
+ ctx_NC() ctx_bold("meaning")
+ ctx_NC() ctx_bold("properties")
+ ctx_NC() ctx_NR()
+ context.HL()
+ show(data)
context.stoptabulate()
end
@@ -291,3 +320,27 @@ function collectors.defaultwords(t,str)
n = n + 1 ; t[n] = tokens.egroup
end
end
+
+\stopluacode
+
+%D This used to be in \type {toks-tra.mkiv}:
+
+% used to be: \registerctxluafile{toks-tra}{}
+
+\unprotect
+
+%D Handy for manuals \unknown\ but not really used in practice, so it might
+%D become a runtime loaded module instead.
+
+\unexpanded\def\starttokens [#1]{\ctxcommand{collecttokens("#1","stoptokens")}}
+ \let\stoptokens \relax
+\unexpanded\def\flushtokens [#1]{\ctxcommand{flushtokens("#1")}}
+\unexpanded\def\showtokens [#1]{\ctxcommand{showtokens("#1")}}
+\unexpanded\def\testtokens [#1]{\ctxcommand{testtokens("#1")}}
+\unexpanded\def\registertoken #1{\ctxcommand{registertoken("#1")}}
+
+\let\toks_show\showtokens % we also support the primitive
+
+\unexpanded\def\showtokens{\doifelsenextoptional\toks_show\normalshowtokens}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv
index 70d713e44c1..86a3a2d55f8 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv
@@ -27,7 +27,7 @@ local hlist_code = nodecodes.hlist
local fontkern_code = kerncodes.fontkern
local function set_catchword(t)
- local nextpage = tex.lists.contrib_head
+ local nextpage = tex.lists.contribute_head or tex.lists.contrib_head
if not nextpage then
return
end
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua
index 1cdfd9f65d8..df769067a0e 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua
@@ -323,7 +323,7 @@ implement {
implement {
name = "flow_set_text",
- arguments = { "string", "string" },
+ arguments = "2 strings",
actions = function(align,str)
temp.texts[#temp.texts+1] = {
align = align,
@@ -358,7 +358,7 @@ implement {
implement {
name = "flow_set_label",
- arguments = { "string", "string" },
+ arguments = "2 strings",
actions = function(location,text)
temp.labels[#temp.labels+1] = {
location = location,
@@ -369,7 +369,7 @@ implement {
implement {
name = "flow_set_comment",
- arguments = { "string", "string" },
+ arguments = "2 strings",
actions = function(location,text)
local connections = temp.connections
if connections then
@@ -389,7 +389,7 @@ implement {
implement {
name = "flow_set_exit",
- arguments = { "string", "string" },
+ arguments = "2 strings",
actions = function(location,text)
temp.exits[#temp.exits+1] = {
location = location,
@@ -582,7 +582,7 @@ implement {
implement {
name = "flow_set_connection",
- arguments = { "string", "string", "string" },
+ arguments = "3 strings",
actions = function(location,displacement,name)
local dx, dy = lpegmatch(splitter,displacement)
dx = tonumber(dx)
@@ -718,8 +718,8 @@ local function process_connections(g,chart,xoffset,yoffset)
end
end
-local f_texttemplate_t = formatters["\\setvariables[flowcell:text][x=%s,y=%s,n=%i,align={%s},figure={%s},overlay={%s},destination={%s}]"]
-local f_texttemplate_l = formatters["\\doFLOWlabel{%i}{%i}{%i}"]
+local f_texttemplate_t = formatters["\\setvariables[flowcell:text][x=%s,y=%s,n=%i,align={%s},figure={%s},overlay={%s},destination={%s},realx=%s,realy=%s]"]
+local f_texttemplate_l = formatters["\\doFLOWlabel{%i}{%i}{%i}{%i}{%i}"]
local splitter = lpeg.splitat(":")
local charttexts = { } -- permits " etc in mp
@@ -751,6 +751,8 @@ local function process_texts(g,chart,xoffset,yoffset)
local destination = cell.destination or ""
local texts = cell.texts
local noftexts = #texts
+ local realx = cell.realx or x
+ local realy = cell.realy or y
if noftexts > 0 then
for i=1,noftexts do
local text = texts[i]
@@ -758,7 +760,7 @@ local function process_texts(g,chart,xoffset,yoffset)
local align = text.align or ""
local align = validlabellocations[align] or align
charttexts[#charttexts+1] = data
- ctx_tographic(g,'flow_chart_draw_text(%s,%s,textext("%s")) ;',x,y,f_texttemplate_t(x,y,#charttexts,align,figure,overlay,destination))
+ ctx_tographic(g,'flow_chart_draw_text(%s,%s,textext("%s")) ;',x,y,f_texttemplate_t(x,y,#charttexts,align,figure,overlay,destination,realx,realy))
if i == 1 then
figure = ""
overlay = ""
@@ -766,7 +768,7 @@ local function process_texts(g,chart,xoffset,yoffset)
end
end
elseif figure ~= "" or overlay ~= "" or destination ~= "" then
- ctx_tographic(g,'flow_chart_draw_text(%s,%s,textext("%s")) ;',x,y,f_texttemplate_t(x,y,0,"",figure,overlay,destination))
+ ctx_tographic(g,'flow_chart_draw_text(%s,%s,textext("%s")) ;',x,y,f_texttemplate_t(x,y,0,"",figure,overlay,destination,realx,realy))
end
local labels = cell.labels
for i=1,#labels do
@@ -776,7 +778,7 @@ local function process_texts(g,chart,xoffset,yoffset)
local location = validlabellocations[location] or location
if text and text ~= "" then
charttexts[#charttexts+1] = text
- ctx_tographic(g,'flow_chart_draw_label(%s,%s,"%s",textext("%s")) ;',x,y,location,f_texttemplate_l(x,y,#charttexts))
+ ctx_tographic(g,'flow_chart_draw_label(%s,%s,"%s",textext("%s")) ;',x,y,location,f_texttemplate_l(x,y,#charttexts,realx,realy))
end
end
local exits = cell.exits
@@ -792,7 +794,7 @@ local function process_texts(g,chart,xoffset,yoffset)
location == "t" and y == chart.to_y - 1 or
location == "b" and y == chart.from_y + 1 then
charttexts[#charttexts+1] = text
- ctx_tographic(g,'flow_chart_draw_exit(%s,%s,"%s",textext("%s")) ;',x,y,location,f_texttemplate_l(x,y,#charttexts))
+ ctx_tographic(g,'flow_chart_draw_exit(%s,%s,"%s",textext("%s")) ;',x,y,location,f_texttemplate_l(x,y,#charttexts,realx,realy))
end
end
end
@@ -821,7 +823,7 @@ local function process_texts(g,chart,xoffset,yoffset)
end
if text and text ~= "" then
charttexts[#charttexts+1] = text
- ctx_tographic(g,'flow_chart_draw_comment(%s,%s,%s,"%s",%s,textext("%s")) ;',x,y,i,location,length,f_texttemplate_l(x,y,#charttexts))
+ ctx_tographic(g,'flow_chart_draw_comment(%s,%s,%s,"%s",%s,textext("%s")) ;',x,y,i,location,length,f_texttemplate_l(x,y,#charttexts,realx,realy))
end
end
end
@@ -1014,7 +1016,7 @@ local function makechart_indeed(chart)
--
end
--- We need to wrap because of tex.runtoks!
+-- We need to wrap because of tex.runlocal!
local function makechart(chart)
context.hbox()
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi
index a9d3dfdd931..4dee9c7ef1f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi
@@ -46,7 +46,7 @@
\let\setupFLOWcharts\setupFLOWchart
\let\setupFLOWlines \setupFLOWline
\let\setupFLOWshapes\setupFLOWshape
-\let\setupFLOWsets \setupFLOWset
+%let\setupFLOWset \setupFLOWsets
\setupFLOWcharts
[\c!width=12\bodyfontsize,
@@ -276,7 +276,7 @@
\let\location \FLOW_location
\let\text \FLOW_text
\let\label \FLOW_label
- \let\comment \FLOW_comment
+ \overloaded\let\comment \FLOW_comment
\let\exit \FLOW_exit
\let\connection \FLOW_connection
\let\include \FLOW_include
@@ -285,7 +285,7 @@
\let\connect \FLOW_connection
\let\locate \FLOW_location
%
- \let\includeFLOWchart\include
+ \overloaded\let\includeFLOWchart\include
\to \everyFLOWchart
\unexpanded\def\FLOW_name #name{\clf_flow_set_name{#name}\ignorespaces}
@@ -322,12 +322,16 @@
[n=0,
x=1,
y=1,
+ realx=1,
+ realy=1,
text=,
align=,
set=\setups{flowcell:text:place}]
-\def\FLOWx{\getvariable{flowcell:text}{x}} % compatibility (for Willi)
-\def\FLOWy{\getvariable{flowcell:text}{y}} % compatibility (for Willi)
+\def\FLOWx {\getvariable{flowcell:text}{x}} % compatibility (for Willi)
+\def\FLOWy {\getvariable{flowcell:text}{y}} % compatibility (for Willi)
+\def\FLOWrealx{\getvariable{flowcell:text}{realx}} % compatibility (for Willi)
+\def\FLOWrealy{\getvariable{flowcell:text}{realy}} % compatibility (for Willi)
\defineoverlay
[flowcell:figure]
@@ -380,10 +384,12 @@
\endgroup
\stopsetups
-\unexpanded\def\doFLOWlabel#1#2#3%
+\unexpanded\def\doFLOWlabel#1#2#3#4#5%
{\begingroup
\def\FLOWx{#1}%
\def\FLOWy{#2}%
+ \def\FLOWrealx{#4}%
+ \def\FLOWrealy{#5}%
\strut
\getFLOWtext{#3}%
\endgroup}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-educat.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-educat.mkiv
index e39738e99a9..215bf31167a 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-educat.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-educat.mkiv
@@ -71,7 +71,7 @@
\vbox{\hsize\wd\scratchbox\thinrule
\ifcase\scratchcounter\else
\setbox\scratchbox=\hbox{\space}%
- \nobreak\hskip\zeropoint \!!minus \wd\scratchbox
+ \nobreak\hskip\zeropoint \s!minus \wd\scratchbox
\vbox{\hsize\wd\scratchbox\thinrule}%
\fi}}%
\processisolatedwords{#2}\processisolatedword
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-examn.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-examn.mkiv
new file mode 100644
index 00000000000..3a98e53b1b3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-examn.mkiv
@@ -0,0 +1,577 @@
+%D \module
+%D [ file=m-examn,
+%D version=2000.01.29,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Testing and Examination,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is a pretty old style, written in 2000 so after 20 years it's time to check
+%D if it works with \MKIV. The original version looks mostly the same as below and
+%D runs ok with \MKII. The differences are in not using percent sign triggered
+%D comments in the \JAVASCRIPT\ section (that was dropped), using \type {Yes}
+%D instead of \type {On} as field value (because in those decades the \type {On}
+%D value has proven to be fragile (maybe because of some hard coded \type {Yes}
+%D checking). The macros lost \type {\long}, became \type {\unexpanded} and were
+%D reformatted.
+%D
+%D If there is really demand for this I'll do a more major update. I see no reason
+%D to change the 2000 \MKII\ logic now.
+
+% n number of permitted answers
+% answer (set of) right answer(s) (one or list)
+% weight weight of the answer(s) (one or list)
+% method calculation method, for the moment 1
+
+% hidden = true -> display = display.hidden
+
+% disguise methods, numbers and meaning secret
+% randomizing answers
+% allert will be a properly typeset message
+% all checkfields instead of radio, gives more control
+
+\unprotect
+
+\def\c!answer {answer}
+\def\c!question{question}
+\def\c!weight {weight}
+
+\startJSpreamble {mpc} used now
+
+ var RealTimeMode = false ;
+ var FeedBackMode = false ;
+ var CurrentFeedback = -1 ;
+
+ var MPCnames = new Array() ;
+ var MPCanswers = new Array() ;
+ var MPCnumbers = new Array() ;
+ var MPCweights = new Array() ;
+ var MPCmethods = new Array() ;
+ var MPCerrors = new Array() ;
+
+ function Warning (str) {
+ app.alert("warning: " + str)
+ }
+
+ function FieldYN (name,n) {
+ return this.getField(name + ":" + n + ":yn")
+ }
+
+ function FieldRW (name,n) {
+ return this.getField(name + ":" + n + ":rw")
+ }
+
+ function NOfFields (name) {
+ var nof = 1 ;
+ while (FieldYN(name,nof)) {
+ ++nof
+ }
+ return --nof
+ }
+
+ function SetScore (score,total) {
+ mpcs = this.getField("mpc-score") ;
+ mpct = this.getField("mpc-total") ;
+ mpcp = this.getField("mpc-percent") ;
+ if (RealTimeMode) {
+ var percent = 0 ;
+ if (Number(total) > 0) {
+ percent = Math.round(100.0 * (Number(score) / Number(total)))
+ }
+ if (mpcs) {
+ mpcs.value = score
+ }
+ if (mpct) {
+ mpct.value = total
+ }
+ if (mpcp) {
+ mpcp.value = percent
+ }
+ } else {
+ if (mpcs) {
+ mpcs.value = ""
+ }
+ if (mpct) {
+ mpct.value = ""
+ }
+ if (mpcp) {
+ mpcp.value = ""
+ }
+ }
+ this.dirty = false
+ }
+
+ function CheckMPCmode () {
+ mpcr = this.getField("mpc-realtime") ;
+ if (mpcr) {
+ RealTimeMode = (mpcr.value == "Yes")
+ }
+ CheckScore() ;
+ this.dirty = false
+ }
+
+ function DefineMPC (name, answer, number, weight, method) {
+ SetScore(0,0) ;
+ MPCnames[MPCnames.length] = name ;
+ if (answer=="") {
+ MPCanswers[name] = "0"
+ } else {
+ MPCanswers[name] = answer
+ }
+ if (number=="") {
+ MPCnumbers[name] = "0"
+ } else {
+ MPCnumbers[name] = number
+ }
+ if (weight=="") {
+ MPCweights[name] = "0"
+ } else {
+ MPCweights[name] = weight
+ }
+ if (method=="") {
+ MPCmethods[name] = "0"
+ } else {
+ MPCmethods[name] = method
+ }
+ }
+
+ function CheckScore () {
+ var score = 0 ;
+ var total = 0 ;
+ var ok = false ;
+ for (var i=0;i<MPCnames.length;i++) {
+ var name = MPCnames[i] ;
+ var answer = MPCanswers[name] ;
+ var number = Number(MPCnumbers[name]) ;
+ var weight = MPCweights[name] ;
+ var method = MPCmethods[name] ;
+ var fields = Number(NOfFields(name)) ;
+ var answers = answer.split(",") ;
+ var weights = weight.split(",") ;
+ var sorted = weight.split(",") ;
+ sorted = sorted.sort() ;
+ sorted = sorted.reverse() ;
+ for (var k = 0; k < number; k++) {
+ if (weights.length < answers.length) {
+ total += Number(weight)
+ } else {
+ total += Number(sorted[k])
+ }
+ }
+ for (var j = 1; j <= fields; j++) {
+ if (FeedBackMode) {
+ ok = (! FieldRW(name,j).hidden && (FieldRW(name,j).value == "Yes"))
+ } else {
+ ok = (FieldYN(name,j).value == "Yes")
+ }
+ if (ok) {
+ for (var k = 0; k < answers.length; k++) {
+ if (Number(answers[k]) == j) {
+ if (weights.length < answers.length) {
+ score += Number(weight)
+ } else {
+ score += Number(weights[k])
+ }
+ }
+ }
+ }
+ }
+ }
+ CurrentFeedback = -1 ;
+ SetScore(score,total)
+ }
+
+ function CalculateItems () {
+ CheckScore() ;
+ for (var i = 0;i < MPCnames.length; i++) {
+ var name = MPCnames[i] ;
+ var answer = MPCanswers[name] ;
+ var fields = Number(NOfFields(name)) ;
+ var answers = answer.split(",") ;
+ for (var j = 1; j <= fields; j++) {
+ FieldRW(name,j).hidden = true ;
+ FieldRW(name,j).readonly = true ;
+ FieldRW(name,j).value = "Off" ;
+ FieldYN(name,j).readonly = true ;
+ if (FieldYN(name,j).value=="Off") {
+ for (var k = 0; k < answers.length; k++) {
+ if (Number(answers[k]) == j) {
+ FieldYN(name,j).value = "Yes"
+ }
+ }
+ } else {
+ FieldRW(name,j).hidden = false ;
+ for (var k = 0; k < answers.length; k++) {
+ if (Number(answers[k]) == j) {
+ FieldRW(name,j).value = "Yes"
+ }
+ }
+ }
+ }
+ var SomeW = false ;
+ var SomeRW = false ;
+ for (var j = 1; j <= fields; j++) {
+ if (! FieldRW(name,j).hidden) {
+ SomeRW = true ;
+ if (FieldRW(name,j).value == "Off") {
+ SomeW = true
+ }
+ }
+ }
+ MPCerrors[name] = (SomeW || (! SomeRW)) ;
+ }
+ CurrentFeedback = -1 ;
+ FeedBackMode = true ;
+ this.dirty = false
+ }
+
+ function ResetItems () {
+ for (var i = 0; i < MPCnames.length; i++) {
+ var name = MPCnames[i] ;
+ var fields = Number(NOfFields(name)) ;
+ for (var j = 1; j <= fields; j++) {
+ FieldRW(name,j).hidden = true ;
+ FieldYN(name,j).hidden = false ;
+ FieldYN(name,j).readonly = false ;
+ FieldYN(name,j).value = "Off" ;
+ SetScore(0,0)
+ }
+ }
+ CurrentFeedback = -1 ;
+ FeedBackMode = false ;
+ this.dirty = false
+ }
+
+ function CheckMPCone (name, number) {
+ nofitems = Number(NOfFields(name)) ;
+ for (var i = 1; i <= nofitems; i++) {
+ if (i != Number(number)) {
+ FieldYN(name,i).value = "Off"
+ }
+ }
+ }
+
+ function CheckMPCmore (name, number) {
+ var nofitems = Number(NOfFields(name)) ;
+ var currentnumber = 0 ;
+ for (var i = 1; i <= nofitems; i++) {
+ if (FieldYN(name,i).value == "Yes") {
+ ++currentnumber
+ }
+ }
+ if (currentnumber>Number(MPCnumbers[name])) {
+ Warning("only " + MPCnumbers[name] + " choices permitted") ;
+ var v = FieldYN(name,number) ;
+ if (v.value == "Yes") {
+ v.value = "Off"
+ }
+ }
+ }
+
+ function CheckMPC (name, number) {
+ if (! FeedBackMode) {
+ if (MPCnumbers[name] == 1) {
+ CheckMPCone(name,number)
+ } else {
+ CheckMPCmore(name,number)
+ }
+ if (RealTimeMode) {
+ CheckScore()
+ } else {
+ SetScore(0,0)
+ }
+ } else {
+ SetScore(0,0)
+ }
+ }
+
+ function GoneToFeedback () {
+ var name = MPCnames[CurrentFeedback] ;
+ if (MPCerrors[name]) {
+ console.println("feedback:" + name) ;
+ this.gotoNamedDest("feedback:" + name) ;
+ return true
+ } else {
+ return false
+ }
+ }
+
+ function NextFeedback () {
+ ++CurrentFeedback ;
+ while (CurrentFeedback < MPCnames.length) {
+ if (GoneToFeedback()) {
+ return
+ } else {
+ ++CurrentFeedback
+ }
+ }
+ CurrentFeedback = 0 ;
+ while (CurrentFeedback < MPCnames.length) {
+ if (GoneToFeedback()) {
+ return
+ } else {
+ ++CurrentFeedback
+ }
+ }
+ CurrentFeedback = -1
+ }
+
+ function PreviousFeedback () {
+ --CurrentFeedback ;
+ while (CurrentFeedback >= 0) {
+ if (GoneToFeedback()) {
+ return
+ } else {
+ --CurrentFeedback
+ }
+ }
+ CurrentFeedback = MPCnames.length ;
+ while (CurrentFeedback >= 0) {
+ if (GoneToFeedback()) {
+ return
+ } else {
+ --CurrentFeedback
+ }
+ }
+ CurrentFeedback = MPCnames.length + 1
+ }
+
+\stopJSpreamble
+
+\definecolor[clickMPCcolor][blue]
+\definecolor[rightMPCcolor][green]
+\definecolor[wrongMPCcolor][red]
+
+\definecolor[MPCcolor][clickMPCcolor]
+
+\appendtoks
+ \definesymbol [mpc-y] [\mathematics{\color[clickMPCcolor]{\star}}] % yes
+ \definesymbol [mpc-n] [\hphantom{\symbol[mpc-y]}] % no
+ \definesymbol [mpc-r] [\mathematics{\color[rightMPCcolor]{\star}}] % right
+ \definesymbol [mpc-w] [\mathematics{\color[wrongMPCcolor]{\star}}] % wrong
+\to \everystarttext
+
+\definereference [ResetItems] [JS(ResetItems)]
+\definereference [CalculateItems] [JS(CalculateItems)]
+\definereference [PreviousFeedback] [JS(PreviousFeedback)]
+\definereference [NextFeedback] [JS(NextFeedback)]
+
+\setupfield
+ [mpc-field-yn]
+ [%\c!frame=\v!off,
+ \c!height=.8em,
+ \c!width=.8em,
+ \c!background=\v!color,
+ \c!backgroundcolor=gray]
+
+\setupfield
+ [mpc-field-rw]
+ [%\c!frame=\v!off,
+ \c!height=.8em,
+ \c!width=.8em,
+ \c!background=\v!color,
+ \c!background=gray]
+
+\setupfield
+ [mpc-data]
+ [%\c!frame=\v!off,
+ \c!height=3ex,
+ \c!location=\v!low,
+ \c!align=\v!middle,
+ \c!color=MPCcolor,
+ \c!background=\v!color,
+ \c!background=gray,
+ \c!option=\v!readonly]
+
+\setupfield
+ [mpc-mode]
+ [%\c!frame=\v!off,
+ \c!height=3ex,
+ \c!width=3ex,
+ \c!location=\v!low,
+ \c!color=MPCcolor,
+ \c!background=\v!color,
+ \c!background=gray,
+ \c!clickout=JS(CheckMPCmode)]
+
+\appendtoks
+ \definemainfield[mpc-score] [line] [mpc-data][][]
+ \definemainfield[mpc-total] [line] [mpc-data][][]
+ \definemainfield[mpc-percent] [line] [mpc-data][][]
+ \definemainfield[mpc-realtime][check][mpc-mode][mpc-y,mpc-n][mpc-n]
+\to \everystarttext
+
+\newif\iftraceitems % \traceitemstrue
+
+\unexpanded\def\startMPCitems
+ {\dotripleempty\dostartMPCitems}
+
+\let\stopMPCitems\relax
+\let\startMPCitem\relax
+\let\stopMPCitem \relax
+
+\unexpanded\def\dostartMPCitems[#1][#2][#3]#4\stopMPCitems
+ {\bgroup
+ \getgparameters
+ [mpc:#1:]
+ [\c!answer=1,
+ \c!n=1,
+ \c!weight=1,
+ \c!method=1,
+ #2]%
+ \doglobal\newcounter\MPCitems
+ \unexpanded\def\startMPCitem##1\stopMPCitem
+ {\doglobal\increment\MPCitems
+ \edef\MPCitem{MPC:\MPCitems}%
+ \expandafter\setvalue\expandafter\MPCitem\expandafter
+ {\expandafter\handleMPCitem\expandafter{\MPCitems}{##1}}}
+ #4\relax
+ \unexpanded\def\handleMPCitem##1##2%
+ {\setJSpreamble{mpc:#1}
+ {DefineMPC
+ ("mpc:#1",%
+ "\getvalue{mpc:#1:\c!answer}",%
+ "\getvalue{mpc:#1:\c!n}",%
+ "\getvalue{mpc:#1:\c!weight}",%
+ "\getvalue{mpc:#1:\c!method}");}%
+ \definefield[mpc:#1:##1:rw][check][mpc-field-rw][mpc-r,mpc-w][mpc-r]
+ \definefield[mpc:#1:##1:yn][check][mpc-field-yn][mpc-y,mpc-n][mpc-n]
+ \setupfield[mpc-field-rw][\c!option={\v!readonly,\v!hidden}]
+ \setupfield[mpc-field-yn][\c!clickout=JS(CheckMPC{mpc:#1,##1})]
+ \mar{\iftraceitems{\txx##1}\hskip.5em\fi
+ %\fitfield[mpc:#1:##1:rw]\hskip.25em
+ %\fitfield[mpc:#1:##1:yn]}
+ \field[mpc:#1:##1:rw]\hskip.25em
+ \field[mpc:#1:##1:yn]}
+ ##2\par}%
+ \global\let\MPCdone\MPCitems
+ \global\unexpanded\def\fetchMPCitems
+ {\getrandomnumber\MPCitem{1}{\MPCitems}%
+ \doifdefined{MPC:\MPCitem}
+ {\getvalue{MPC:\MPCitem}
+ \doglobal\decrement\MPCdone
+ \global\letbeundefined{MPC:\MPCitem}}%
+ \ifcase\MPCdone\else
+ \expandafter\fetchMPCitems
+ \fi}
+ \startitemize[#3]
+ \fetchMPCitems
+ \stopitemize
+ \egroup}
+
+% \setupsystem
+% [\c!random=\v!small]
+
+\protect
+
+\continueifinputfile{m-examn.mkiv}
+
+% \nopdfcompression
+
+\setupbodyfont[pagella,10pt]
+
+% \usemodule[m][examn]
+
+\setupinteraction
+ [state=start,
+ color=MPCcolor,
+ menu=on]
+
+\setupinteractionmenu
+ [right]
+ [state=start]
+
+\setupinteractionscreen
+ [option=max]
+
+\setuppapersize
+ [S6][S6]
+
+\setuplayout
+ [topspace=15pt,
+ backspace=40pt,
+ header=0pt,
+ footer=0pt,
+ height=middle,
+ rightmargin=0pt,
+ leftmargin=20pt,
+ leftmargindistance=5pt,
+ rightedge=100pt,
+ rightedgedistance=15pt,
+ width=430pt]
+
+\setupbackgrounds
+ [text][rightedge]
+ [frame=on,
+ frameoffset=5pt,
+ framecolor=MPCcolor]
+
+\startinteractionmenu[right]
+ \startalignment[middle]
+ \dontleavehmode \gotobox{\strut example test} [examplepage] \blank
+ \dontleavehmode \gotobox{\strut next feedback}[NextFeedback] \blank
+ \dontleavehmode \gotobox{\strut prev feedback}[PreviousFeedback] \blank
+ \dontleavehmode \gotobox{\strut submit} [SubmitForm{mailto:pragma@wxs.nl}] \blank
+ \dontleavehmode \gotobox{\strut reset} [ResetItems] \blank
+ \dontleavehmode \gotobox{\strut calculate} [CalculateItems] \blank
+ \vfill
+ score \blank[small] \dontleavehmode \field[mpc-score] \blank
+ max score \blank[small] \dontleavehmode \field[mpc-total] \blank
+ percentage \blank[small] \dontleavehmode \field[mpc-percent] \blank
+ realtime \blank[small] \dontleavehmode \field[mpc-realtime] \blank
+ \kern0pt
+ \stopalignment
+\stopinteractionmenu
+
+\starttext
+
+\title [examplepage] {A simple MPC demo (toggle mode)}
+
+\startMPCitems[mpc-1][answer=3][a,packed]
+
+ \startMPCitem this is alpha \stopMPCitem
+ \startMPCitem and this is beta \stopMPCitem
+ \startMPCitem but how about gamma (ok) \stopMPCitem
+
+\stopMPCitems
+
+\startMPCitems[mpc-5][answer={2,3,4},n=2][n,packed]
+
+ \startMPCitem this is alpha \stopMPCitem
+ \startMPCitem and this is beta (ok, 2 ok's permitted) \stopMPCitem
+ \startMPCitem but how about gamma (ok, 2 ok's permitted) \stopMPCitem
+ \startMPCitem or delta (ok, 2 ok's permitted) \stopMPCitem
+ \startMPCitem or epsilon \stopMPCitem
+
+\stopMPCitems
+
+\startMPCitems[mpc-6][answer={2,3,4},weight={2,1,3},n=2][g,packed]
+
+ \startMPCitem this is alpha \stopMPCitem
+ \startMPCitem and this is beta (ok, 2 ok's permitted, weight is 2) \stopMPCitem
+ \startMPCitem but how about gamma (ok, 2 ok's permitted, weight is 1) \stopMPCitem
+ \startMPCitem or delta (ok, 2 ok's permitted, weight is 3) \stopMPCitem
+ \startMPCitem or epsilon \stopMPCitem
+
+\stopMPCitems
+
+\startMPCitems[mpc-8][answer=1,weight=2][packed]
+
+ \startMPCitem this is alpha (ok, weight is 2) \stopMPCitem
+ \startMPCitem and this is beta \stopMPCitem
+ \startMPCitem but how about gamma \stopMPCitem
+ \startMPCitem or delta \stopMPCitem
+
+\stopMPCitems
+
+\title [feedback:mpc:mpc-1] {Feedback on MPC 1} whatever
+\title [feedback:mpc:mpc-5] {Feedback on MPC 5} whatever
+\title [feedback:mpc:mpc-6] {Feedback on MPC 6} whatever
+\title [feedback:mpc:mpc-8] {Feedback on MPC 8} whatever
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-format.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-format.mkiv
index 3a0a5bebd51..083f6ed63fe 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-format.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-format.mkiv
@@ -190,7 +190,7 @@
{\placeformatlinecounter}}}}
{\let\doplaceformatlinecounter\relax}%
\global\setfalse\formatforcedbreak
- \def\\{\break\global\settrue\formatforcedbreak}%
+ \enforced\def\\{\break\global\settrue\formatforcedbreak}%
\hsize\formatwidth
\doglobal\increment\formatlinecounter
\par
diff --git a/Master/texmf-dist/tex/context/base/mkiv/m-gnuplot.mkxl b/Master/texmf-dist/tex/context/modules/mkiv/m-gnuplot.mkxl
index 2077b174182..e844edd1bb3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/m-gnuplot.mkxl
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-gnuplot.mkxl
@@ -14,7 +14,7 @@
%D This is a variant on the \GNUPLOT\ terminal code. At some point (when there is a
%D reason) I will make a proper environment that can be used for embedded code.
-\unexpanded\def\includegnuplotsvgfile[#1]%
+\permanent\protected\def\includegnuplotsvgfile[#1]%
{\hbox\bgroup
\ctxlua{metapost.startsvghashing()}%
\includesvgfile[#1]%
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-ipsum.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-ipsum.mkiv
index 7ba78ee2eaf..7b5074a49cf 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-ipsum.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-ipsum.mkiv
@@ -101,6 +101,23 @@ function moduledata.ipsum.direct(settings)
end
end
+interfaces.implement {
+ name = "ipsum",
+ protected = true,
+ actions = moduledata.ipsum.typeset,
+ arguments = { {
+ { "alternative" },
+ { "filename" },
+ { "n" },
+ { "left" },
+ { "right" },
+ { "before" },
+ { "after" },
+ { "inbetween" },
+ { "separator" },
+ } },
+}
+
\stopluacode
\unprotect
@@ -129,26 +146,25 @@ end
\useipsumstyleandcolor\c!style\c!color
% hm, also changes dates
\uselanguageparameter\ipsumparameter
- \ctxlua{moduledata.ipsum.typeset {
- alternative = "\ipsumparameter\c!alternative",
- filename = "\ipsumparameter\c!file",
- n = "\ipsumparameter\c!n",
- left = "\luaescapestring{\ipsumparameter\c!left}",
- right = "\luaescapestring{\ipsumparameter\c!right}",
- before = "\luaescapestring{\ipsumparameter\c!before}",
- after = "\luaescapestring{\ipsumparameter\c!after}",
- inbetween = "\luaescapestring{\ipsumparameter\c!inbetween}",
- }}
+ \clf_ipsum
+ alternative {\ipsumparameter\c!alternative}
+ filename {\ipsumparameter\c!file}
+ n {\ipsumparameter\c!n}
+ left {\ipsumparameter\c!left}
+ right {\ipsumparameter\c!right}
+ before {\ipsumparameter\c!before}
+ after {\ipsumparameter\c!after}
+ inbetween {\ipsumparameter\c!inbetween}
+ \relax
\stopsetups
\def\directipsum#1% only one argument, expanded
- {\ctxlua{moduledata.ipsum.typeset {
- alternative = "\namedipsumparameter{#1}\c!alternative",
- filename = "\namedipsumparameter{#1}\c!file",
- n = "\namedipsumparameter{#1}\c!n",
- separator = "\luaescapestring{\ipsumparameter\c!separator}",
- }}
-}
+ {\clf_ipsum
+ alternative {\namedipsumparameter{#1}\c!alternative}
+ filename {\namedipsumparameter{#1}\c!file}
+ n {\namedipsumparameter{#1}\c!n}
+ separator {\ipsumparameter\c!separator}
+ \relax}
\protect
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-morse.mkvi b/Master/texmf-dist/tex/context/modules/mkiv/m-morse.mkvi
index a2c20dff745..a80b3d56fc1 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-morse.mkvi
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-morse.mkvi
@@ -227,8 +227,8 @@ end
\def\MorseHeight {0.2em}
%def\MorseShort {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=\dimexpr\MorseWidth]}
%def\MorseLong {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=3\dimexpr\MorseWidth]}
-\def\MorseShort {\dontleavehmode\vrule\!!width \dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax}
-\def\MorseLong {\dontleavehmode\vrule\!!width3\dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax}
+\def\MorseShort {\dontleavehmode\vrule\s!width \dimexpr\MorseWidth\s!height\MorseHeight\s!depth\zeropoint\relax}
+\def\MorseLong {\dontleavehmode\vrule\s!width3\dimexpr\MorseWidth\s!height\MorseHeight\s!depth\zeropoint\relax}
\def\MorseBetweenCharacters {\kern\MorseWidth}
\def\MorseBetweenWords {\hskip3\dimexpr\MorseWidth\relax}
\def\MorseSpace {\hskip7\dimexpr\MorseWidth\relax}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-nodechart.lua b/Master/texmf-dist/tex/context/modules/mkiv/m-nodechart.lua
index 8273f365a91..98e09f4b518 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-nodechart.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-nodechart.lua
@@ -62,8 +62,8 @@ function formatters.dir(n,comment)
return format("\\doFLOWdirnode{%s}{%s}{%s}",comment,"dir",n.dir)
end
-function formatters.localpar(n,comment)
- return format("\\doFLOWdirnode{%s}{%s}{%s}",comment,"localpar",n.dir)
+function formatters.par(n,comment)
+ return format("\\doFLOWdirnode{%s}{%s}{%s}",comment,"par",n.dir)
end
-- I will make a dedicated set of shapes for this.
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-ntb-to-xtb.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-ntb-to-xtb.mkiv
index 55b4ab25926..d48191ebc3d 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-ntb-to-xtb.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-ntb-to-xtb.mkiv
@@ -1,4 +1,8 @@
-\loadmkvifile{tabl-xnt}
+\ifcase\contextlmtxmode
+ \loadmkvifile{tabl-xnt}
+\else
+ \loadmklxfile{tabl-xnt}
+\fi
\mapTABLEtoxtable
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-oldfun.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-oldfun.mkiv
index 7ec779c41cb..f20d7d8e961 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-oldfun.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-oldfun.mkiv
@@ -648,7 +648,7 @@
\dontcomplain
\setuptolerance[\v!verytolerant]% == \tolerance4500
\hsize#1%
- \def\\{\softbreak}%
+ \enforced\def\\{\softbreak}%
\!!heighta#4%
\!!heightb#2%
\doloop
@@ -690,8 +690,8 @@
\advance\scratchdimen#2\relax
\NormalizeFontWidth
#1%
- {\def\+{\global\settrue\NFSpread\gobbleuntil\relax}%
- \def\\{\gobbleuntil\relax}% newline
+ {\enforced\def\+{\global\settrue\NFSpread\gobbleuntil\relax}%
+ \enforced\def\\{\gobbleuntil\relax}% newline
\setupspacing
#6\relax}%
{\scratchdimen}%
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-oldnum.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-oldnum.mkiv
index a240cdb58c3..5109cca1225 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-oldnum.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-oldnum.mkiv
@@ -109,7 +109,7 @@
{\mbox{\grabdigit#1\relax}} % adding $ $ goes wrong in tabulate
\def\grabdigit
- {\futurelet\next\scandigit}
+ {\futurelet\nexttoken\scandigit}
%D Watch the test for \type {\nextobeyedline}, because the
%D endofline token can be \type {\def'd}, not \type {\let}'d,
@@ -119,15 +119,15 @@
\ifx\normalmathshift\undefined \let\normalmathshift=$ \fi
\unexpanded\def\scandigit
- {\ifx\next\blankspace
+ {\ifx\nexttoken\blankspace
\let\next\handledigits
- \else\ifx\next\nextobeyedline % the indirect one
+ \else\ifx\nexttoken\nextobeyedline % the indirect one
\let\next\handledigits
- \else\ifx\next\bgroup
+ \else\ifx\nexttoken\bgroup
\let\next\handledigits
- \else\ifx\next\egroup
+ \else\ifx\nexttoken\egroup
\let\next\handledigits
- \else\ifx\next\normalmathshift
+ \else\ifx\nexttoken\normalmathshift
\let\next\handledigits
\else
\let\next\collectdigit
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv
index 47f1a0177ff..9eb7411babb 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv
@@ -17,6 +17,11 @@
%D https://www.youtube.com/watch?v=g5c2Htj8Vtw
%D \stoptyping
+\ifcase\contextlmtxmode\else
+ \writestatus{punk}{use metapost library punk instead}
+ \endinput
+\fi
+
\startluacode
local concat = table.concat
local round = math.round
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv
index 315cb3bed8b..659d5f58dfd 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv
@@ -311,13 +311,16 @@ moduledata.scite = scite
\stopluacode
-\definetyping[TEX] [option=cld]
-\definetyping[LUA] [option=lua]
+%definetyping[TEX] [option=cld]
+\setuptyping [TEX] [option=cld]
+%definetyping[LUA] [option=lua]
+\setuptyping [LUA] [option=lua]
\definetyping[BTX] [option=bibtex]
\definetyping[MPS] [option=mps]
-\definetyping[MP] [option=mp]
+%definetyping[MP] [option=mp]
+\setuptyping [MP] [option=mp]
\definetyping[PDF] [option=pdf]
-\definetyping[CPP] [option=web]
+\definetyping[CPP] [option=cpp] % Which is kind of like the web one.
\definetyping[WEB] [option=web]
\definetyping[TXT] [option=txt]
\definetyping[BNF] [option=bnf] % I might use this in the metafun manual.
@@ -336,7 +339,7 @@ moduledata.scite = scite
\unexpanded\def\buff_scite_slxb#1%
{% we can have a side float
\advance\hangindent\numexpr#1+2\relax\scitespaceskip
- \begstrut\hskip#1\scitespaceskip
+ \begstrut\hskip#1\scitespaceskip\relax
\ifcase\hangafter
\hangafter\plusone\relax
\fi}
@@ -378,7 +381,7 @@ moduledata.scite = scite
\let\slxT \lettertilde
\let\slxS \fixedspace
-\let\slxS \buff_scite_slxs
+%let\slxS \buff_scite_slxs
\let\slxF \buff_scite_slxf
\def\module_scite_inherit_typing
@@ -397,6 +400,14 @@ moduledata.scite = scite
{\scitebuffer[\ifx\currentscitelexer\empty tex\else\currentscitelexer\fi][@scite@]%
\endgroup}
+\definelines
+ [scitelines]
+
+\setuplines
+ [scitelines]
+ [\c!before=,
+ \c!after=]
+
\unexpanded\def\scitefile
{\dosingleargument\module_scite_file}
@@ -410,9 +421,9 @@ moduledata.scite = scite
\dontcomplain
\raggedright
\startcontextcode
- \startlines
+ \startscitelines
\getbuffer[lex]
- \stoplines
+ \stopscitelines
\stopcontextcode
\endgroup}
@@ -432,9 +443,9 @@ moduledata.scite = scite
\module_scite_inherit_typing
\dontcomplain
\raggedright
- \startlines
+ \startscitelines
\getbuffer[lex]
- \stoplines
+ \stopscitelines
\endgroup}
\unexpanded\def\sciteinlinebuffer
@@ -476,14 +487,14 @@ moduledata.scite = scite
\tt
\installscitecommandsdisplay
\dontcomplain
-\buff_verbatim_initialize_typing_one
-\buff_verbatim_set_line_margin
+ \buff_verbatim_initialize_typing_one
+ \buff_verbatim_set_line_margin
\raggedright
- \startlines
+ \startscitelines
\clf_getbuffer{lex}}
\unexpanded\def\stopDisplayScite
- {\stoplines
+ {\stopscitelines
\endgroup}
\unexpanded\def\slxbreak
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv
index ed9dae99a4e..bb62610ea13 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv
@@ -17,8 +17,8 @@
\registerctxluafile{util-sql}{}
\ifcase\contextlmtxmode\else
- \registerctxluafile{libs-imp-mysql}{}
- \registerctxluafile{libs-imp-sqlite}{}
+ \registerctxluafile{libs-imp-mysql}{autosuffix}
+ \registerctxluafile{libs-imp-sqlite}{autosuffix}
\fi
\setupmodule
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-steps.lua b/Master/texmf-dist/tex/context/modules/mkiv/m-steps.lua
index ce84866a4d5..bbc267274ae 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-steps.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-steps.lua
@@ -399,7 +399,7 @@ end
interfaces.implement {
name = "step_start_chart",
- arguments = { "string", "string" },
+ arguments = "2 strings",
actions = step_start_chart,
}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-steps.mkvi b/Master/texmf-dist/tex/context/modules/mkiv/m-steps.mkvi
index 873015fd659..fb2000d40d2 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-steps.mkvi
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-steps.mkvi
@@ -428,12 +428,16 @@
\startxmlsetups xml:step:define
\xmlsetsetup
{#1}
- {stepchart|steptable|stepaligntable|cells|texts|stepcell|cell|text}
+ {stepchart|steptable|stepaligntable|cells|texts|stepcell|cell|text|br}
{xml:step:*}
\stopxmlsetups
\xmlregistersetup{xml:step:define}
+\startxmlsetups xml:step:br
+ \crlf
+\stopxmlsetups
+
\startxmlsetups xml:step:stepchart
\startSTEPchart[\c!category=\xmlatt{#1}{class}]
\xmlflush{#1}
@@ -492,9 +496,17 @@
\stopxmlsetups
\startxmlsetups xml:step:text
- \text
- [\xmlatt{#1}{class}]
- {\xmlflush{#1}}
+ \doifelse {\xmlatt{#1}{option}} {paragraph} {
+ \text
+ [\xmlatt{#1}{class}]
+ {\framed
+ [\c!location=\v!middle,\c!align={\v!lohi,\v!flushleft},\c!offset=0pt,\c!frame=\v!no]
+ {\ignorespaces\xmlflush{#1}\removeunwantedspaces}}
+ } {
+ \text
+ [\xmlatt{#1}{class}]
+ {\xmlflush{#1}}
+ }
\stopxmlsetups
\protect
@@ -519,11 +531,21 @@
\startbuffer
<steptable>
- <cell> some cell </cell>
- <text> some text </text>
- <cell> some cell </cell>
- <text> some text </text>
- <cell> some cell </cell>
+ <cell> some cell A</cell>
+ <text> some text 1</text>
+ <cell> some cell B</cell>
+ <text> some text 2</text>
+ <cell> some cell C</cell>
+</steptable>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<steptable>
+ <cell> some cell A</cell>
+ <text option="paragraph"> some more<br/>text 1</text>
+ <cell> some cell B</cell>
</steptable>
\stopbuffer
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-system-aliasing.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-system-aliasing.mkiv
new file mode 100644
index 00000000000..4661cc503a1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-system-aliasing.mkiv
@@ -0,0 +1,120 @@
+%D \module
+%D [ file=m-system-aliasing,
+%D version=2020.07.08,
+%D title=\CONTEXT\ Modules,
+%D subtitle=Loading generic stuff,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startmodule[system-aliasing]
+
+\startluacode
+ local next = next
+ local find, topattern = string.find, string.topattern
+
+ local aliases = { }
+ local replacer = false
+ local filenames = false
+ local wildcards = false
+ local enabled = false
+
+ local report = logs.reporter("system", "aliasing")
+
+ -- This is not yet perfect as we actually need to quit at a non token.
+
+ interfaces.implement {
+ name = "registeralias",
+ public = true,
+ arguments = { "csname", "csname" },
+ actions = function(old,new)
+ aliases[old] = new
+ replacer = false
+ end
+ }
+
+ interfaces.implement {
+ name = "registeraliasfile",
+ public = true,
+ arguments = "string",
+ actions = function(name)
+ if find(name,"%*") then
+ name = topattern(name)
+ if wildcards then wildcards[name] = true else wildcards = { [name] = true } end
+ else
+ if filenames then filenames[name] = true else filenames = { [name] = true } end
+ end
+ if not enabled then
+ utilities.sequencers.appendaction(
+ resolvers.openers.helpers.textfileactions,
+ "system","resolvers.macros.processgeneric"
+ )
+ utilities.sequencers.enableaction(
+ resolvers.openers.helpers.textfileactions,
+ "resolvers.macros.processgeneric"
+ )
+ enabled = true
+ end
+ end
+ }
+
+ local function found(name)
+ if filenames and filenames[name] then
+ return true
+ end
+ if wildcards then
+ for k, v in next, wildcards do
+ if find(name,k) then
+ return true
+ end
+ end
+ end
+ return false
+ end
+
+ local Cs, lpegmatch = lpeg.Cs, lpeg.match
+
+ local utfchartabletopattern = lpeg.utfchartabletopattern
+ local utf8character = lpeg.patterns.utf8character
+ local escapecharacter = lpeg.P("\\")
+ local terminal = lpeg.S([[`"'~@#$%^&_-+/*=(){}[]<>:;,.!?|\\]])
+ + lpeg.P(-1)
+ local lpegmatch = lpeg.match
+
+ function resolvers.macros.processgeneric(str,name)
+ if found(name) then
+ report("file %a",name)
+ if not replacer then
+ replacer = Cs( (
+ escapecharacter
+ * (utfchartabletopattern(aliases) / aliases)
+ * terminal
+ + utf8character
+ )^0 )
+ end
+ str = lpegmatch(replacer,str) or str
+ end
+ return str
+ end
+
+\stopluacode
+
+\registeralias \protected \normalprotected
+\registeralias \unexpanded \normalunexpanded
+\registeralias \expanded \normalexpanded
+
+%D \starttyping
+%D \registeraliasfile{rubish.tex}
+%D \registeraliasfile{generic/*.tex}
+%D
+%D % e.g. \def\foo{\unexpanded{test}}
+%D
+%D \input rubish.tex
+%D \input generic/foo.tex
+%D \stoptyping
+
+\stopmodule
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-system-readers.mkxl b/Master/texmf-dist/tex/context/modules/mkiv/m-system-readers.mkxl
new file mode 100644
index 00000000000..a077b20a313
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-system-readers.mkxl
@@ -0,0 +1,148 @@
+%D \module
+%D [ file=m-system-readers,
+%D version=2021.02.13,
+%D title=\CONTEXT\ Modules,
+%D subtitle=Reading from files,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startmodule[system-readers]
+
+% \unprotect
+%
+% \installcorenamespace {markedlines}
+%
+% \permanent\protected\def\startmarkedlines[#1]%
+% {\edef\scratchstring{#1}%
+% \scratchcounter\numexpr\inputlineno+\plusone\relax
+% \gobbleuntilandfinalize\stopmarkedlines}
+%
+% \permanent\protected\def\stopmarkedlines
+% {\edefcsname\??markedlines\scratchstring\endcsname
+% {{\the\scratchcounter}{\the\numexpr\inputlineno+\minusone\relax}}}
+%
+% \protected\def\firstmarkedline#1%
+% {\numexpr
+% \ifcsname\??markedlines#1\endcsname
+% \normalexpanded{\noexpand\firstoftwoarguments\lastnamedcs}%
+% \else
+% \zerocount
+% \fi
+% \relax}
+%
+% \protected\def\lastmarkedline#1%
+% {\numexpr
+% \ifcsname\??markedlines#1\endcsname
+% \normalexpanded{\noexpand\secondoftwoarguments\lastnamedcs}%
+% \else
+% \zerocount
+% \fi
+% \relax}
+%
+% \protected\def\markedlines#1%
+% {\ifcsname\??markedlines\scratchstring\endcsname\lastnamedcs\else{0}{0}\fi}
+%
+% \protect
+
+\startluacode
+
+ local createtoken = token.create
+ local gobbletoken = token.gobble
+ local integer_value = tokens.values.integer
+
+ local marked = { }
+
+ interfaces.implement {
+ name = "startmarkedlines",
+ public = true,
+ protected = true,
+ arguments = "optional",
+ actions = function(tag)
+ local start = status.readstate.linenumber + 1
+ gobbletoken(createtoken("startmarkedlines"),createtoken("stopmarkedlines"))
+ local state = status.readstate
+ marked[tag] = { state.filename, start, state.linenumber - 1 }
+ end
+ }
+
+
+ interfaces.implement {
+ name = "markedfilename",
+ public = true,
+ -- usage = "value",
+ arguments = "string",
+ actions = function(tag)
+ local m = marked[tag]
+ -- return m and m[1] or ""
+ context(m and m[1] or "")
+ end
+ }
+
+ interfaces.implement {
+ name = "firstmarkedline",
+ public = true,
+ usage = "value",
+ arguments = "string",
+ actions = function(tag)
+ local m = marked[tag]
+ return integer_value, m and m[2] or 0
+ end
+ }
+
+ interfaces.implement {
+ name = "lastmarkedline",
+ public = true,
+ usage = "value",
+ arguments = "string",
+ actions = function(tag)
+ local m = marked[tag]
+ return integer_value, m and m[3] or 0
+ end
+ }
+
+\stopluacode
+
+\continueifinputfile{m-system-readers.mkxl}
+
+\starttext
+
+\startmarkedlines[test]
+SOME LINE 1
+SOME LINE 2
+SOME LINE 3
+SOME LINE 4
+\stopmarkedlines
+
+\startmarkedlines[more]
+SOME MORE 1
+SOME MORE 2
+SOME MORE 3
+SOME MORE 4
+\stopmarkedlines
+
+\begingroup
+ \newlocalread\myreada
+ \immediate\openin\myreada {\markedfilename{test}}
+ \dostepwiserecurse{\lastmarkedline{test}}{\firstmarkedline{test}}{-1}{
+ \readline\myreada line #1 to \scratchstring #1 : \scratchstring \par
+ }
+ \immediate\closein\myreada
+\endgroup
+
+\blank
+
+\begingroup
+ \newlocalread\myreada
+ \immediate\openin\myreada {\markedfilename{more}}
+ \dostepwiserecurse{\firstmarkedline{more}}{\lastmarkedline{more}}{1}{
+ \read \myreada line #1 to \scratchstring #1 : \scratchstring \par
+ }
+ \immediate\closein\myreada
+\endgroup
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-tikz.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-tikz.mkiv
new file mode 100644
index 00000000000..9267f90d49b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-tikz.mkiv
@@ -0,0 +1,75 @@
+%D A fixed variant if the t-tikz module distributed with tikz.
+
+\ifdefined\pdflastxpos \else
+ \unprotect
+ \frozen\overloaded\protected\def\pdflastxpos{\numexpr\clf_lastxpos\relax}
+ \frozen\overloaded\protected\def\pdflastypos{\numexpr\clf_lastypos\relax}
+ \protect
+\fi
+
+
+\pushoverloadmode
+
+ \pushcatcodetable
+
+ \setcatcodetable\texcatcodes
+
+ \catcode`\@=11
+ \catcode`\|=12
+ \catcode`\!=12
+
+ \input t-pgf.tex
+ \input t-pgffor.tex
+ \input tikz.code.tex
+
+ \popcatcodetable
+
+\popoverloadmode
+
+\permanent\protected\def\tikzerrormessage#1#2#3%
+ {\writestatus{#1}{#2}}
+
+\ifcase\contextlmtxmode
+
+ \let\starttikzsettings\relax
+ \let\stoptikzsettings \relax
+
+ \protected\def\starttikzpicture
+ {% \dontleavehmode
+ \begingroup
+ \ifdefined\PackageError\else \let\PackageError\tikzerrormessage \fi
+ \tikzpicture}
+
+ \protected\def\stoptikzpicture
+ {\endtikzpicture
+ \endgroup}
+
+\else
+
+ % for now:
+
+ \overloadmode\zerocount
+
+ % but this will be mandate for settings outside the start .. stop
+
+ \permanent\protected\def\starttikzsettings
+ {\pushoverloadmode}
+
+ \permanent\protected\def\stoptikzsettings
+ {\popoverloadmode}
+
+ \permanent\protected\def\starttikzpicture
+ {\dontleavehmode
+ \hcontainer\bgroup
+ % \pushoverloadmode
+ \ifdefined\PackageError\else \let\PackageError\tikzerrormessage \fi
+ \tikzpicture}
+
+ \permanent\protected\def\stoptikzpicture
+ {\endtikzpicture
+ % \popoverloadmode
+ \egroup}
+
+\fi
+
+\stopmodule
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-timing.mkxl b/Master/texmf-dist/tex/context/modules/mkiv/m-timing.mkxl
new file mode 100644
index 00000000000..3edfd14e235
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-timing.mkxl
@@ -0,0 +1,113 @@
+%D \module
+%D [ file=m-timing,
+%D version=2007.12.23,
+%D title=\CONTEXT\ Modules,
+%D subtitle=Timing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Todo: adapt to latest metafun magic.
+
+\ifdefined\ShowNamedUsage \endinput \fi
+
+%D Written at the end of 2007, this module is dedicated to Taco. Reaching this
+%D point in \LUATEX\ was a non trivial effort. By visualizing a bit what happens
+%D when pages come out of \LUATEX, you may get an idea what is involved. It took
+%D much time an dedication to reach this point in the development. Add to that
+%D those daily Skype intense discussion, testing and debugging moments. Time flies
+%D but progress is impressive. The motto of this module could be: what you see
+%D is what you get. An there is much more to come \unknown.
+
+% \usemodule[timing]
+% \setupcolors[state=start]
+% \starttext
+% \dorecurse{200}{\input tufte \par} \ShowUsage{}
+% \stoptext
+
+\definecolor[usage:line] [darkred]
+\definecolor[usage:time] [darkblue]
+\definecolor[usage:frame][darkgray]
+
+\ctxloadluafile{trac-tim.lmt}
+
+\startluacode
+local progress = moduledata.progress
+
+function progress.show(filename,names,other)
+ if not filename or filename == "" then
+ filename = progress.defaultfilename or ""
+ end
+ for n, name in pairs(progress.names(filename)) do
+ if string.find(name,names) and name ~= other and name ~= "variables: lasttime" then
+ context.ShowNamedUsage(filename,name or "",other or "")
+ end
+ end
+end
+\stopluacode
+
+\startnotmode[no-timing]
+ \appendtoks\ctxlua{moduledata.progress.store()}\to\everystarttext
+ \appendtoks\ctxlua{moduledata.progress.store()}\to\everyshipout
+ \ctxlua{luatex.registerstopactions(function() moduledata.progress.save() end)}
+\stopnotmode
+
+\permanent\protected\def\ShowNamedUsage#1#2#3%
+ {\setbox\scratchbox\vbox\bgroup
+ \startMPcode{doublefun}
+ begingroup ; save p, q, b, h, w ;
+ path p, q, b ; numeric h, w ;
+ p := \cldcontext{moduledata.progress.path("#1","#2")} ;
+ % p := p shifted -llcorner p ;
+ if bbwidth(p) > 0 :
+ h := 100 ; w := 2 * h ;
+ w := \the\textwidth-3pt ; % correct for pen
+ p := p xstretched w ;
+ b := boundingbox (llcorner p -- llcorner p shifted (w,h)) ;
+ pickup pencircle scaled 3pt ; linecap := butt ;
+ draw b withcolor \MPcolor{usage:frame} ;
+ draw p withcolor \MPcolor{usage:line} ;
+ if ("#3" <> "") and ("#3" <> "#2") :
+ q := \cldcontext{moduledata.progress.path("#1","#3")} ;
+ % q := q shifted -llcorner q ;
+ if bbwidth(q) > 1 :
+ q := q xstretched w ;
+ pickup pencircle scaled 1.5pt ; linecap := butt ;
+ draw q withcolor \MPcolor{usage:time} ;
+ fi ;
+ fi ;
+ fi ;
+ endgroup ;
+ \stopMPcode
+ \egroup
+ \scratchdimen\wd\scratchbox
+ \ifdim\scratchdimen>\zeropoint
+ \startlinecorrection[blank]
+ \box\scratchbox \endgraf
+ \hbox to \scratchdimen\bgroup
+ \tttf\strut\detokenize{#2}\hss
+ \scratchcounter =\cldcontext{moduledata.progress.set("#1","\detokenize{#2}")}\relax
+ \scratchcounterone =\cldcontext{moduledata.progress.bot("#1","\detokenize{#2}")}\relax
+ \scratchcountertwo =\cldcontext{moduledata.progress.top("#1","\detokenize{#2}")}\relax
+ \scratchcounterthree=\numexpr\scratchcountertwo-\scratchcounterone\relax
+ \ifnum\scratchcounter >\zerocount set:\the\scratchcounter \quad\fi
+ \ifnum\scratchcounterthree>\zerocount inc:\the\scratchcounterthree\quad\fi
+ \ifnum\scratchcounterone >\zerocount min:\the\scratchcounterone \quad\fi
+ \ifnum\scratchcountertwo >\zerocount max:\the\scratchcountertwo \quad\fi
+ pages:\cldcontext{moduledata.progress.pages("#1")}%
+ \egroup
+ \stoplinecorrection
+ \fi}
+
+\permanent\protected\def\LoadUsage #1{\ctxlua{moduledata.progress.convert("#1")}}
+\permanent\protected\def\ShowUsage #1{\ctxlua{moduledata.progress.show("#1",".*", "variables: elapsed")}}
+\permanent\protected\def\ShowMemoryUsage #1{\ctxlua{moduledata.progress.show("#1","memory:.*","variables: elapsed")}}
+\permanent\protected\def\ShowNodeUsage #1{\ctxlua{moduledata.progress.show("#1","nodes:.*", "variables: elapsed")}}
+\permanent\protected\def\ShowFilteredUsage#1#2{\ctxlua{moduledata.progress.show("#1","#2", "variables: elapsed")}}
+\permanent\protected\def\ShowSimpleUsage #1#2{\ctxlua{moduledata.progress.show("#1","#2")}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-visual.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-visual.mkiv
index 6ec0a52b0af..8a49861cdbe 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-visual.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-visual.mkiv
@@ -56,9 +56,7 @@
\unexpanded\def\fakelines#1#2% min max / 3 10
{\fakeparindent
\scratchdimen\hsize
- \ifindentation
- \advance\scratchdimen -\parindent
- \fi
+ \advance\scratchdimen -\parindent
\fakerule\scratchdimen\break
\getrandomcount\scratchcounter{\ifcase0#1 3\else#1\fi}{\ifcase0#2 10\else#2\fi}%
\dorecurse\scratchcounter{\fakerule\hsize}%
@@ -128,7 +126,7 @@
\unexpanded\def\fakeparindent
{\noindent
- \ifindentation
+ \ifzeropt\parindent\else
\ifx\dofakedroppedcaps\relax
{\fakeparindentcolor
\vrule
@@ -653,10 +651,10 @@
\appendtoks\dontshowwhatsits\to\everystoptext}
\unexpanded\def\immediatewhatsit
- {\bgroup\futurelet\next\doimmediatewhatsit}
+ {\bgroup\futurelet\nexttoken\doimmediatewhatsit}
\unexpanded\def\doimmediatewhatsit
- {\ifx\next\write
+ {\ifx\nexttoken\write
\egroup\immediatewritetrue
\else
\egroup\expandafter\normalimmediate
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-article-titlepage.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-article-titlepage.mkiv
index abfb957c2fa..7579d421fa8 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-article-titlepage.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-article-titlepage.mkiv
@@ -16,7 +16,7 @@
\unprotect
% \startalignment[middle]
-% \let\\=\par
+% \enforced\let\\\par
% \bfb
% \setupinterlinespace
% \documentvariable {subject}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-coverage.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-coverage.mkiv
index 98a5c00a495..2d18708421b 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-coverage.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-coverage.mkiv
@@ -100,7 +100,7 @@
% list = {
% "cambria.ttc(Cambria Math)",
% "xits-math.otf",
- % -- "stixmath-regular.otf",
+ % -- "stixtwomath-regular.otf", -- watch out: the name changes
% "latinmodern-math.otf",
% -- "lucidabrightmathot.otf",
% -- "lucidabrightmathot-demi.otf",
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-shapes.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-shapes.mkiv
index 90b9c1f6496..7dd39c07d0c 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-shapes.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-shapes.mkiv
@@ -106,8 +106,8 @@
% \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0xF0299} \stopTEXpage
% \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{NameMe.1190} \stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{file:stix2math.otf}{20bp}{0x1D44A}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{file:stix2math.otf}{20bp}{0x1D44C}\stopTEXpage
+ \startTEXpage[offset=0pt]\ShowGlyphShape{file:stixtwomath-regular.otf}{20bp}{0x1D44A}\stopTEXpage
+ \startTEXpage[offset=0pt]\ShowGlyphShape{file:stixtwomath-regular.otf}{20bp}{0x1D44C}\stopTEXpage
% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x00066}\stopTEXpage
% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D453}\stopTEXpage
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua
index d9d7205dec1..8673ef398cc 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua
@@ -27,6 +27,8 @@ local setlink = nodes.setlink
local hpack = nodes.hpack
local applyvisuals = nodes.applyvisuals
+local lefttoright_code = nodes.dirvalues.lefttoright
+
local handle_positions = fonts.handlers.otf.datasetpositionprocessor
local handle_injections = nodes.injections.handler
@@ -285,17 +287,9 @@ function tabletracers.showpositionings(specification)
if resources then
- local direction = "TLT"
-
+ local direction = lefttoright_code -- not that relevant probably
local sequences = resources.sequences
local marks = resources.marks
-
- if tonumber(direction) == -1 or direction == "TRT" then
- direction = "TRT"
- else
- direction = "TLT"
- end
-
local visuals = "fontkern,glyph,box"
local datasets = fonts.handlers.otf.dataset(tfmdata,fontid,0)
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
index 5336f602472..6e4b1773f0f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
@@ -103,6 +103,12 @@
% \showfontvariations
% [font=file:sourcecode-regular.otf]
+% \showfontvariations
+% [font=file:sourcecodevariable-roman.otf]
+
+% \showfontvariations
+% [font=file:sourcecodevariable-italic.otf]
+
% \showfontvariations
% [font=file:AmstelvarAlpha-VF.ttf]
@@ -112,4 +118,14 @@
% \showfontvariations
% [font=file:sitka.ttc]
+% For Alan:
+
+% \usemodule[article-basic]
+% \usemodule[fonts-variable]
+% \starttext
+% \showfontvariations[font=file:goldmansansitvf_wght.ttf]
+% \showfontvariations[font=file:goldmansansvf_wght.ttf]
+% \showfontvariations[font=file:goldmansanscdvf_wght.ttf]
+% \stoptext
+
\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi b/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi
index 67fc45d46fc..7cebfd9bb5f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi
@@ -31,7 +31,6 @@
local list = { }
local size = { }
local comp = { }
- local used = setmetatableindex("table")
local nope = setmetatableindex("number")
local omit = {
@@ -44,7 +43,7 @@
"colo%-pan.tex", ".*test.*"
}
local types = {
- "tex", "mkii", "mkiv", "mkvi", "mkxl", "mklx", "lua", -- "mpiv"
+ "tex", "mkii", "mkiv", "mkvi", "lua", "mkxl", "mklx", "lmt" -- "mpiv"
}
local patterns = {
"^([a-z][a-z][a-z][a-z])%-[a-z0-9%-]+%.[a-z]+",
@@ -90,7 +89,7 @@
end
local data = io.loaddata(name)
if data then
- if suffix == "lua" then
+ if suffix == "lua" or suffix == "lmt" then
data = gsub(data,"%-%-%[%[.-%]%]%-%-","")
data = gsub(data,"%-%-.-[\n\r]","")
else
@@ -120,15 +119,6 @@
for i=1,#types do
collect(list,types[i],i)
end
- for category in next, list do
- pattern ="{"..category.."%-"
- for suffix, t in next, used do
- local data = io.loaddata(resolvers.find_file("context."..suffix))
- if data and find(data,pattern) then
- t[category] = true
- end
- end
- end
end
local max, what = 0, (what == "size" and size) or list
for k, v in table.sortedpairs(what) do
@@ -141,9 +131,9 @@
function document.context_state_1(what)
local max, what, norm = prepare(what)
- context.starttabulate { "|Tl|T|T|T|T|T|T|T|" }
+ context.starttabulate { "|Tl|T|T|T|T|T|T|T|T|" }
context.NC()
- context(category)
+ context("category")
context.NC()
for i=1,#types do
local n, m = 0, 0
@@ -156,20 +146,13 @@
context.Top(types[i],norm(max),n,m)
context.NC()
end
- context.NC()
+ -- context.NC()
context.NR()
context.HL()
for k, v in table.sortedpairs(what) do
local c = what == size and comp[k] or nope
context.NC()
- context("\\bf %s~%s~~%s~~%s~~%s~~%s",
- (used.mkii[k] and "ii") or "~~",
- (used.mkiv[k] and "iv") or "~~",
- (used.mkvi[k] and "vi") or "~~",
- (used.mkiv[k] and "xl") or "~~",
- (used.mkvi[k] and "lx") or "~~",
- k
- )
+ context(k)
context.NC()
for i=1,#types do
context.Bar(types[i],v[i],c[i],f_norm(norm(v[i])))
@@ -201,13 +184,14 @@
\definecolor[bar:mkxl][middlemagenta]
\definecolor[bar:mklx][middlecyan]
\definecolor[bar:lua] [middlegray]
+\definecolor[bar:lmt] [middleorange]
\newcount\UpCounter
\starttexdefinition Top #what#fraction#total#bigones
\hbox to 7em{\hss#total}%
\enspace
- \hbox {{\bf#what}\ifnum#total=#bigones\else~#bigones\rlap{~+}\fi\hss}%
+ \hbox to 4em{{{\bf#what}\ifnum#total=#bigones\else\ifnum#bigones>0~#bigones\rlap{~+}\fi\fi\hss}}%
\stoptexdefinition
\starttexdefinition Bar #color#size#nobigones#fraction
@@ -215,6 +199,8 @@
\hbox to 7em{\hss\ifcase#nobigones\else\llap{-~}\fi#size}%
\enspace
\blackrule[color=bar:#color,width=#fraction\dimexpr 20em\relax,height=.8\strutht]%
+% \quad
+% \quad
\fi
\stoptexdefinition
@@ -269,9 +255,9 @@
{The size of (core) files used in ConTeXt (- : large data files excluded; + : large data files included; comment and spaces removed)}
{1}{size}
\Show
- {The relative number of files used in ConTeXt (tex, mkii, mkiv, mkvi, mkxl, mklx, lua).}
+ {The relative number of files used in ConTeXt (tex, mkii, mkiv, mkvi, mkxl, mklx, lua, lmt).}
{2}{number}
\Show
- {The relative size of files used in ConTeXt (tex, mkii, mkiv, mkvi, mkxl, mklx, lua).}
+ {The relative size of files used in ConTeXt (tex, mkii, mkiv, mkvi, mkxl, mklx, lua, lmt).}
{2}{size}
\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-languages-hyphenation.lua b/Master/texmf-dist/tex/context/modules/mkiv/s-languages-hyphenation.lua
index 65fd1ab1443..2ba265b5354 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-languages-hyphenation.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-languages-hyphenation.lua
@@ -40,8 +40,8 @@ local getdisc = nuts.getdisc
local getattr = nuts.getattr
local getfont = nuts.getfont
local getfield = nuts.getfield
-local getlang = nuts.getlang
-local setlang = nuts.setlang
+local getlanguage = nuts.getlanguage
+local setlanguage = nuts.setlanguage
local setlink = nuts.setlink
local setdisc = nuts.setdisc
local setfield = nuts.setfield
@@ -63,10 +63,12 @@ local states = table.setmetatableindex(function(t,k)
}
end)
+local currentlanguage = language.current or function() return tex.language end
+
interfaces.implement {
name = "storelanguagestate",
actions = function()
- states[tex.language] = {
+ states[currentlanguage()] = {
lefthyphenmin = tex.lefthyphenmin,
righthyphenmin = tex.righthyphenmin,
hyphenationmin = tex.hyphenationmin,
@@ -128,17 +130,6 @@ local function mark(head,marked,w,h,d,how)
end
end
-local function getlanguage(head,l,left,right)
- local t = { }
- for n in nextglyph, tonut(head) do
- t[n] = {
- getlang(n),
- getfield(n,"left"),
- getfield(n,"right"),
- }
- end
-end
-
local langs = { }
local tags = { }
local noflanguages = 0
@@ -151,7 +142,7 @@ function moduledata.languages.hyphenation.showhyphens(head)
-- somehow assigning -1 fails
for n in nextglyph, tonut(head) do
cached[n] = {
- getlang(n),
+ getlanguage(n),
getfield(n,"left"),
getfield(n,"right")
}
@@ -164,7 +155,7 @@ function moduledata.languages.hyphenation.showhyphens(head)
local lmin = s.lefthyphenmin
local rmin = s.righthyphenmin
for n in next, cached do
- setlang(n,l)
+ setlanguage(n,l)
setfield(n,"left",lmin)
setfield(n,"right",rmin)
end
@@ -176,7 +167,7 @@ function moduledata.languages.hyphenation.showhyphens(head)
mark(head,marked[i],1/16,l/2,l/4,"hyphenation:"..(colorbytag and tags[i] or i))
end
for n, d in next, cached do
- setlang(n,d[1])
+ setlanguage(n,d[1])
setfield(n,"left",d[2])
setfield(n,"right",d[3])
end
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv
index d45fe6f601a..c5995162a4f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv
@@ -110,8 +110,9 @@
\doifoddpageelse {
\reuseMPgraphic{rightpaper}
} {
- \reuseMPgraphic{leftpaper}}
+ \reuseMPgraphic{leftpaper}
}
+ }
\stopsetups
@@ -459,8 +460,8 @@
\definetyping[xtyping] [style=\ttx]
\definetyping[xxtyping][style=\ttxx]
-\definetyping[ntyping] \setuptyping[ntyping][style=\narrowtt]
-\definetype [ntype] \setuptype [ntype] [style=\narrowtt]
+% \definetyping[ntyping] \setuptyping[ntyping][style=\narrowtt]
+% \definetype [ntype] \setuptype [ntype] [style=\narrowtt]
\setupdocument
[main={\doifelsemode{atpragma}{This Way}{My Way}},
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv
index af646b2e1ee..8775f565e5a 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv
@@ -363,8 +363,8 @@
\def\doarticleheader
{\startbaselinecorrection
\bgroup
- \hsize = 457pt
- \let\\\crlf
+ \hsize= 457pt
+ \enforced\let\\\crlf
\blank[35pt,force]
\switchtobodyfont[24pt]
\startalign[flushleft,verytolerant,extremestretch]
@@ -419,7 +419,8 @@
\def\signArticle
{\doifnothing
{\MapsSkipFooter}
- {\blank[line]\let\\\crlf
+ {\blank[line]%
+ \enforced\let\\\crlf
\noindent\switchtobodyfont[ss,9pt]%
\MapsAuthor
\doifsomething{\MapsAddress}{\\\MapsAddress}%
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-module-basic.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-module-basic.mkiv
index 74621b2a3a8..7024cd91a0f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-module-basic.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-module-basic.mkiv
@@ -25,8 +25,6 @@
%D him when you run into problems. Bugs in this style can be sent to
%D Hans.
-\showframe
-
\usemodule[abbreviations-words]
\startmodule[modules-basics]
@@ -45,20 +43,24 @@
\let\module\setupdocument
-\definepalet [module:unknown] [localone=black,localtwo=white]
+\definepalet [module:unknown] [locallocalone=darkyellow,localtwo=darkred,localthree=white,localfour=darkgray]
-\definepalet [module:tex] [localone=blue,localtwo=green]
-\definepalet [module:mkii] [localone=blue,localtwo=green]
-\definepalet [module:mkiv] [localone=blue,localtwo=green]
-\definepalet [module:mkvi] [localone=blue,localtwo=green]
+\definepalet [module:tex] [localone=darkblue,localtwo=darkgreen,localthree=white,localfour=darkgray]
+\definepalet [module:mkii] [localone=darkblue,localtwo=darkgreen,localthree=white,localfour=darkgray]
+\definepalet [module:mkiv] [localone=darkblue,localtwo=darkgreen,localthree=white,localfour=darkgray]
+\definepalet [module:mkvi] [localone=darkblue,localtwo=darkgreen,localthree=white,localfour=darkgray]
+\definepalet [module:mkxl] [localone=darkblue,localtwo=darkgreen,localthree=white,localfour=darkgray]
+\definepalet [module:mklx] [localone=darkblue,localtwo=darkgreen,localthree=white,localfour=darkgray]
-\definepalet [module:lua] [localone=red,localtwo=green]
-\definepalet [module:cld] [localone=red,localtwo=green]
+\definepalet [module:lua] [localone=darkred,localtwo=darkgreen,localthree=white,localfour=darkgray]
+\definepalet [module:lmt] [localone=darkred,localtwo=darkgreen,localthree=white,localfour=darkgray]
+\definepalet [module:cld] [localone=darkred,localtwo=darkgreen,localthree=white,localfour=darkgray]
-\definepalet [module:mp] [localone=red,localtwo=blue]
-\definepalet [module:mpii] [localone=red,localtwo=blue]
-\definepalet [module:mpiv] [localone=red,localtwo=blue]
-\definepalet [module:metapost][localone=red,localtwo=blue]
+\definepalet [module:mp] [localone=darkred,localtwo=darkblue,localthree=white,localfour=darkgray]
+\definepalet [module:mpii] [localone=darkred,localtwo=darkblue,localthree=white,localfour=darkgray]
+\definepalet [module:mpiv] [localone=darkred,localtwo=darkblue,localthree=white,localfour=darkgray]
+\definepalet [module:mpxl] [localone=darkred,localtwo=darkblue,localthree=white,localfour=darkgray]
+\definepalet [module:metapost][localone=darkred,localtwo=darkblue,localthree=white,localfour=darkgray]
\setuppalet
[module:unknown]
@@ -67,12 +69,10 @@
StartPage ;
- color local_white ; local_white := .8white ;
- color local_one ; local_one := \MPcolor{localone} randomized (.6,.8) ;
- color local_two ; local_two := \MPcolor{localtwo} randomized (.3,.4) ;
-
- color local_one ; local_one := .75[\MPcolor{localone},white] ;
- color local_two ; local_two := .75[\MPcolor{localtwo},white] ;
+ color local_one ; local_one := .6 * \MPcolor{localone} ;
+ color local_two ; local_two := .6 * \MPcolor{localtwo} ;
+ color local_three ; local_three := \MPcolor{localthree} ;
+ color local_four ; local_four := \MPcolor{localfour} ;
numeric width ; width := bbwidth Page ;
numeric height ; height := bbheight Page ;
@@ -84,12 +84,13 @@
ddy := 0 ; sx := 60u ;
for i=1 upto (4 randomized 2) :
sy := 7u randomized 3u ;
- fill unitsquare xyscaled(sx,sy) shifted (0,ddy) withcolor local_two ;
+ fill unitsquare xyscaled(sx,sy) shifted (0,ddy)
+ withcolor local_two ;
ddy := ddy + sy + 4u ;
endfor ;
) ;
p := p shifted (dx,dy) shifted - center p ;
- fill boundingbox p enlarged 8u withcolor local_white ;
+ fill boundingbox p enlarged 8u withcolor local_four ;
fill boundingbox p enlarged 4u withcolor local_one ;
draw p ;
enddef ;
@@ -111,7 +112,7 @@
draw anchored.urt(textext("\bf\strut\documentvariable{subtitle}") ysized 1.5cm,urcorner Page shifted (-1cm,-10cm)) ;
draw anchored.urt(textext("\bf\strut\documentvariable{author}") ysized 1.5cm,lrcorner Page shifted (-1cm, 5cm)) ;
draw anchored.urt(textext("\bf\strut\currentdate") ysized 1.5cm,lrcorner Page shifted (-1cm, 3cm)) ;
- ) withcolor .25white ;
+ ) withcolor local_three ;
StopPage ;
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv
index 6774b83407f..14b33f30389 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-balls.mkiv
@@ -156,7 +156,7 @@
\unexpanded\def\StartTitlePage
{\startstandardmakeup
\setupalign[middle]
- \unexpanded\def\\{\vfil\bfb\setupinterlinespace}
+ \enforced\protected\def\\{\vfil\bfb\setupinterlinespace}
\bfd\setupinterlinespace
\vfil}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-bars.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-bars.mkiv
index 13c09ff3b80..37f18ffca8d 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-bars.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-bars.mkiv
@@ -68,7 +68,7 @@
\setupheadertexts
[Breskens 2012]
- [\getvariable{document}{title}]
+ [\documentvariable{title}]
\setupbackgrounds
[page]
@@ -99,9 +99,9 @@
\startsetups document:setup
- \doifsomething {\getvariable{document}{color}} {
+ \doifsomething {\documentvariable{color}} {
- \definecolor[maincolor][\getvariable{document}{color}]
+ \definecolor[maincolor][\documentvariable{color}]
}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-boring.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-boring.mkiv
new file mode 100644
index 00000000000..334d6216d5d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-boring.mkiv
@@ -0,0 +1,143 @@
+%D \module
+%D [ file=s-present-boring, % s-pre-15,
+%D version=2020.07.10,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment Boring,
+%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 Because I use a mupdf based viewer and acrobat is not always reliable I nowadays
+%D tend to go for simple presentation styles. They mostly serve as a reminder for
+%D myself of what I'm supposed to talk about. Just demoing often makes more sense,
+%D especially at meetings where there is some interaction.
+
+\startmodule[present-boring]
+
+\setupbodyfont
+ [plex]
+
+\setuppapersize
+ [S6]
+
+\setuplayout
+ [backspace=20pt,
+ topspace=20pt,
+ bottomspace=20pt,
+ header=0pt,
+ footer=0pt,
+ bottom=20pt,
+ bottomdistance=30pt,
+ width=middle,
+ height=fit]
+
+\definecolor[maincolor] [darkblue]
+\definecolor[extracolor][darkyellow]
+\definecolor[darkcolor] [darkgray]
+
+\setupbackgrounds
+ [page]
+ [backgroundoffset=10pt,
+ background=color,
+ backgroundcolor=darkcolor]
+
+\setupbackgrounds
+ [text] [text]
+ [backgroundoffset=10pt,
+ background=color,
+ backgroundcolor=maincolor]
+
+\setupbackgrounds
+ [bottom] [text]
+ [backgroundoffset=10pt,
+ background=color,
+ backgroundcolor=extracolor]
+
+\setupcolors
+ [textcolor=white]
+
+\setuphead
+ [chapter]
+ [style=\bfc,
+ after={\blank[line,fixed]}]
+
+\setupwhitespace
+ [halfline]
+
+\setupblank
+ [halfline,fixed]
+
+% \setupblank
+% [fixed]
+
+\setuplinenumbering
+ [typing]
+ [style=\txx,
+ color=middlegray]
+
+\setuptyping
+ [numbering=line,
+ location=left,
+ blank=halfline]
+
+\startsetups document:start
+
+ \startpagemakeup
+ \raggedcenter
+ \vfill
+ \dontleavehmode \scale [
+ width=\textwidth
+ ] {
+ \space
+ {\bf \documentvariable{title}}
+ \space
+ }
+ \vfill
+ \dontleavehmode \scale [
+ width=.8\textwidth
+ ] {
+ \space
+ {\bf \documentvariable{banner}}
+ \space
+ }
+ \vfill
+ \vfill
+ \dontleavehmode \scale [
+ width=\textwidth
+ ] {
+ \qquad
+ \color[darkcolor]{\documentvariable{location}}
+ \qquad
+ }
+ \vfill
+ \stoppagemakeup
+
+ \setupbottomtexts [
+ {
+ \words {
+ \documentvariable{title}
+ \quad\emdash\quad
+ \documentvariable{location}
+ \quad\emdash\quad
+ \getmarking[title]
+ }
+ }
+ ]
+
+\stopsetups
+
+\startsetups document:stop
+ %
+\stopsetups
+
+\stopmodule
+
+\continueifinputfile{s-present-boring.mkiv}
+
+\usemodule[present-common]
+
+\inputpresentationfile{context/2020/context-2020-tokens.tex}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-colorful.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-colorful.mkiv
index ed4b5f7c487..f71a297d778 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-colorful.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-colorful.mkiv
@@ -231,7 +231,7 @@
\bfd\setupinterlinespace
\setupalign[middle]
\vfil
- \let\\=\vfil
+ \enforced\let\\\vfil
\scale
[factor=max]\bgroup
\framed
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-funny.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-funny.mkiv
index 4948766adca..3788f94f037 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-funny.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-funny.mkiv
@@ -190,7 +190,7 @@
\bfd\setupinterlinespace
\setupalign[middle]
\vfil
- \def\\{\vfil\bfb\setupinterlinespace}}
+ \enforced\protected\def\\{\vfil\bfb\setupinterlinespace}}
\unexpanded\def\StopTitlePage
{\vfil\vfil\vfil
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-fuzzy.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-fuzzy.mkiv
index ee029b0e605..312cf1ce73e 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-fuzzy.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-fuzzy.mkiv
@@ -125,7 +125,7 @@
\bfd\setupinterlinespace
\setupalign[middle]
\vfil
- \let\\=\vfil}
+ \enforced\let\\\vfil}
\unexpanded\def\StopTitlePage
{\vfil\vfil\vfil
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-green.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-green.mkiv
index e62257ff383..5a57742576d 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-green.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-green.mkiv
@@ -261,7 +261,7 @@
\bfd\setupinterlinespace
\setupalign[middle]
\vfil
- \let\\=\vfil}
+ \enforced\let\\\vfil}
\unexpanded\def\StopTitlePage
{\vfil\vfil\vfil
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-organic.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-organic.mkiv
index 657b786f229..7994205a1ab 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-organic.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-organic.mkiv
@@ -289,7 +289,7 @@
\unexpanded\def\StartTitlePage
{\startstandardmakeup
\switchtobodyfont[big]
- \def\\{\vfill\bfb\let\\=\par}
+ \enforced\protected\def\\{\vfill\bfb\enforced\let\\\par}%
\bfd\setupinterlinespace\gray
\vskip.5cm\relax}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-original.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-original.mkiv
index 1c5e94c8579..50cd6f9ba65 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-original.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-original.mkiv
@@ -213,7 +213,7 @@
\setupinterlinespace
\setupalign[middle]
\vfil
- \let\\=\vfil}
+ \enforced\let\\\vfil}
\unexpanded\def\StopTitlePage
{\vfil\vfil\vfil
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-split.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-split.mkiv
index 48be7ca8199..186075c58dc 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-split.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-split.mkiv
@@ -154,7 +154,7 @@
\unexpanded\def\StartTitlePage
{\startstandardmakeup
\setupalign[middle]
- \unexpanded\def\\{\vfil\bfb\setupinterlinespace}
+ \enforced\protected\def\\{\vfil\bfb\setupinterlinespace}
\bfd\setupinterlinespace
\vfil}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-stack.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-stack.mkiv
index 4cc75404f2e..cda03ae1257 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-stack.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-stack.mkiv
@@ -98,7 +98,7 @@
\unexpanded\def\TitlePage#1%
{\startstandardmakeup
\setupalign[middle]
- \def\\{\vfil\bfb\setupinterlinespace}
+ \enforced\protected\def\\{\vfil\bfb\setupinterlinespace}
\bfd\setupinterlinespace
\vfil#1\vfil\vfil
\stopstandardmakeup}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-stepper.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-stepper.mkiv
index 3dd8d9dcd42..c2f3c018a51 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-stepper.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-stepper.mkiv
@@ -189,7 +189,7 @@
{\setups[fonts:normalize]
\resetsetups[fonts:normalize]
\startstandardmakeup[headerstate=high]
- \def\\{\def\\{\endgraf\quad\quad}\endgraf\quad\ignorespaces#2}%
+ \enforced\protected\def\\{\enforced\protected\def\\{\endgraf\quad\quad}\endgraf\quad\ignorespaces#2}%
#1\setstrut\setupinterlinespace\vfil#3\vfil\vfil
\stopstandardmakeup}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-tiles.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-tiles.mkiv
index 566a610a4f9..900d8edc605 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-tiles.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-tiles.mkiv
@@ -259,12 +259,12 @@
\switchtobodyfont[\measure{titlepagefont}]
- \let\\=\crlf
+ \enforced\let\\\crlf
\startalignment[flushleft]
\bf
\setupinterlinespace
- \begstrut\getvariable{document}{title}\endstrut\par
+ \begstrut\documentvariable{title}\endstrut\par
\stopalignment
\vfill
@@ -272,7 +272,7 @@
\startalignment[flushright]
\bf
\setupinterlinespace
- \begstrut\getvariable{document}{subtitle}\endstrut\par
+ \begstrut\documentvariable{subtitle}\endstrut\par
\stopalignment
\stoptopicmakeup
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-weird.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-weird.mkiv
index 27ef7b2c26d..641c3d979c4 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-weird.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-weird.mkiv
@@ -288,7 +288,7 @@
\starttexdefinition TitlePage #1
\begingroup
- \def\\{\vskip1ex\bfc\def\\{\vskip1ex\bfb}}
+ \enforced\protected\def\\{\vskip1ex\bfc\def\\{\vskip1ex\bfb}}
\enablemode[SpreadPage]
\StartPage{#1}
\StopPage
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-windows.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-windows.mkiv
index 22d6fdba15c..422e238016a 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-present-windows.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-windows.mkiv
@@ -320,7 +320,7 @@
align=middle]
\startSampleText[middle]
\bfd\setupinterlinespace
- \def\\{\bfb\setupinterlinespace\vfil\def\\{\vfil}}}
+ \enforced\protected\def\\{\bfb\setupinterlinespace\vfil\enforced\protected\def\\{\vfil}}}
\unexpanded\def\StopTitlePage
{\stopSampleText
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-references-show.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-references-show.mkiv
index 72cccce54f1..a693fbc4417 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-references-show.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-references-show.mkiv
@@ -21,7 +21,7 @@
\enablehiddenbackground % trick
-\edef\hiddenbackgroundlist{\hiddenbackgroundlist,trace-references}
+\appendhiddenbackground{trace-references}
\defineoverlay
[trace-references]
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-syntax.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-syntax.mkiv
index d9492af3e54..658343ac560 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-syntax.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-syntax.mkiv
@@ -42,49 +42,49 @@
\unexpanded\def\StartSyntax
{\startlines
% formatters
- \let\Indent \module_syntax_Indent
- \let\Sugar \module_syntax_Sugar
- \let\Something \module_syntax_Something
- \let\Lbrace \module_syntax_Lbrace
- \let\Rbrace \module_syntax_Rbrace
- \let\Lparent \module_syntax_Lparent
- \let\Rparent \module_syntax_Rparent
- \let\Lbracket \module_syntax_Lbracket
- \let\Rbracket \module_syntax_Rbracket
- \let\Or \module_syntax_Or
- \let\Optional \module_syntax_Optional
- \let\Means \module_syntax_Means
- \let\Tex \module_syntax_Tex
- \let\Literal \module_syntax_Literal
- \let\Syntax \module_syntax_Syntax
- \let\Next \module_syntax_Next
- \let\Whatever \module_syntax_Whatever
- \let\Quote \module_syntax_Quote
- \let\Or \module_syntax_Or
- \let\Means \module_syntax_Means
- \let\FlaggedLiteral \module_syntax_FlaggedLiteral
- \let\FlaggedSomething\module_syntax_FlaggedSomething
+ \enforced\let\Indent \module_syntax_Indent
+ \enforced\let\Sugar \module_syntax_Sugar
+ \enforced\let\Something \module_syntax_Something
+ \enforced\let\Lbrace \module_syntax_Lbrace
+ \enforced\let\Rbrace \module_syntax_Rbrace
+ \enforced\let\Lparent \module_syntax_Lparent
+ \enforced\let\Rparent \module_syntax_Rparent
+ \enforced\let\Lbracket \module_syntax_Lbracket
+ \enforced\let\Rbracket \module_syntax_Rbracket
+ \enforced\let\Or \module_syntax_Or
+ \enforced\let\Optional \module_syntax_Optional
+ \enforced\let\Means \module_syntax_Means
+ \enforced\let\Tex \module_syntax_Tex
+ \enforced\let\Literal \module_syntax_Literal
+ \enforced\let\Syntax \module_syntax_Syntax
+ \enforced\let\Next \module_syntax_Next
+ \enforced\let\Whatever \module_syntax_Whatever
+ \enforced\let\Quote \module_syntax_Quote
+ \enforced\let\Or \module_syntax_Or
+ \enforced\let\Means \module_syntax_Means
+ \enforced\let\FlaggedLiteral \module_syntax_FlaggedLiteral
+ \enforced\let\FlaggedSomething\module_syntax_FlaggedSomething
% shortcuts
- \let\FL \module_syntax_FlaggedLiteral
- \let\FS \module_syntax_FlaggedSomething
- \let\L \module_syntax_Literal
- \let\S \module_syntax_Something
- \let\M \module_syntax_Means
- \let\N \module_syntax_Next
- \let\O \module_syntax_Or
- \let\Q \module_syntax_Quote
- \let\LB \module_syntax_Lbrace
- \let\RB \module_syntax_Rbrace
- \let\LP \module_syntax_Lparent
- \let\RP \module_syntax_Rparent
- \let\LS \module_syntax_Lbracket
- \let\RS \module_syntax_Rbracket
- \let\{ \module_syntax_Lbrace
- \let\} \module_syntax_Rbrace
- \let\( \module_syntax_Lparent
- \let\) \module_syntax_Rparent
- \let\[ \module_syntax_Lbracket
- \let\] \module_syntax_Rbracket
+ \enforced\let\FL \module_syntax_FlaggedLiteral
+ \enforced\let\FS \module_syntax_FlaggedSomething
+ \enforced\let\L \module_syntax_Literal
+ \enforced\let\S \module_syntax_Something
+ \enforced\let\M \module_syntax_Means
+ \enforced\let\N \module_syntax_Next
+ \enforced\let\O \module_syntax_Or
+ \enforced\let\Q \module_syntax_Quote
+ \enforced\let\LB \module_syntax_Lbrace
+ \enforced\let\RB \module_syntax_Rbrace
+ \enforced\let\LP \module_syntax_Lparent
+ \enforced\let\RP \module_syntax_Rparent
+ \enforced\let\LS \module_syntax_Lbracket
+ \enforced\let\RS \module_syntax_Rbracket
+ \enforced\let\{ \module_syntax_Lbrace
+ \enforced\let\} \module_syntax_Rbrace
+ \enforced\let\( \module_syntax_Lparent
+ \enforced\let\) \module_syntax_Rparent
+ \enforced\let\[ \module_syntax_Lbracket
+ \enforced\let\] \module_syntax_Rbracket
% precaution
\catcode`\#\othercatcode}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-system-macros.mkxl b/Master/texmf-dist/tex/context/modules/mkiv/s-system-macros.mkxl
new file mode 100644
index 00000000000..0f26444037b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-system-macros.mkxl
@@ -0,0 +1,311 @@
+%D \module
+%D [ file=s-system-tokens.mkxl,
+%D version=2020.06.02,
+%D title=\CONTEXT\ Style File,
+%D subtitle=System Tokens Checking,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This file is for Wolfgang and Hans and it's used in the transition from \MKIV\
+%D to the more robust \LMTX.
+
+% todo: \permanent\protected\let\select\directselect : same value (add ref)
+%
+% todo: when mutable, remove immutable, decide on how immutable it really is
+%
+% todo: just for the fun of it we can compare the table generated here to mkiv but it
+% needs the same hash exposure as we use in luametatex so i'll do that after all lmtx
+% macros are checked (maybe i need to backport some more but it has a low priority)
+%
+% todo: do we need something similar for lua functions etc (problem: performance hit)
+%
+% todo: and how about metapost ... i need a mp.hashtokens in order to do that and I also
+% need to think about protection there (tricky as we use an avl hash there)
+%
+% public undefined : SmallCaps scitebuffer sciteinlinebuffer
+% single todos : \ \- \\ \_
+
+\enablemode[texmacros]
+\enablemode[metapostmacros]
+% \enablemode[notmarked]
+\enablemode[everything]
+
+\startmodule[system-macros]
+
+\continueifinputfile{s-system-macros.mkxl}
+
+% \usemodule[article-basic] \setuplayout[tight] \setupbodyfont[7pt,tt]
+\usemodule[article-basic] \setuplayout[tight] \setupbodyfont[5pt,tt]
+
+\setupbackgrounds[page][background=color,backgroundcolor=darkgray] \setupcolors[textcolor=white]
+
+\setuppapersize
+ [A4,landscape]
+ [A4,landscape]
+
+\starttext
+
+\startluacode
+
+ if tex.modes.texmacros then
+
+ local context = context
+ local ctx_NC = context.NC
+ local ctx_NR = context.NR
+ local ctx_bold = context.bold
+ local ctx_verb = context.verbatim
+
+ local find = string.find
+ local gsub = string.gsub
+ local create = token.create
+
+ local crap = "[$>%|%&%#" .. string.char(0xEF) .. "]"
+
+ local basefile = resolvers.findfile("context.mkxl")
+ local swapnames = { }
+
+ local pattern = file.join(file.pathpart(basefile),"/*.mk*")
+ local filenames = dir.glob(pattern)
+ for i=1,#filenames do
+ swapnames[file.basename(filenames[i])] = true
+ end
+
+ local pattern = file.join(file.pathpart(basefile),"/*.l**")
+ local filenames = dir.glob(pattern)
+ for i=1,#filenames do
+ swapnames[file.basename(filenames[i])] = true
+ end
+
+ local hashnames = table.setmetatableindex(function(t,k)
+ local s = file.suffix(k)
+ local v = k
+ if s == "mkiv" then
+ local n = file.replacesuffix(k,"mkxl")
+ if swapnames[n] then
+ v = n
+ end
+ elseif s == "mkvi" then
+ local n = file.replacesuffix(k,"mklx")
+ if swapnames[n] then
+ v = n
+ end
+ elseif s == "lua" then
+ local n = file.replacesuffix(k,"lmt")
+ if swapnames[n] then
+ v = n
+ end
+ end
+ t[k] = v
+ return v
+ end)
+
+ require("mtx-interface")
+
+ local data = scripts.interface.editor("data")
+ local files = data and data.common and data.common.filenames or { }
+ local flagged = 0
+ local total = 0
+ local list = tex.hashtokens()
+ local all = not tex.modes.notmarked
+ local everything = tex.modes.everything
+
+ table.sort(list)
+
+ local function show(visible, check)
+ -- context.starttabulate { "|l|l|l|lj2|l|l|l|l|l|l|l|l|" }
+ context.starttabulate { "|l|l|l|lj2|l|l|l|l|l|l|l|l|" }
+ for i=1,#list do
+ local k = list[i]
+ if check(k) then
+ local v = create(k)
+ local mutable = v.mutable and "mutable"
+ local immutable = v.immutable and "immutable"
+ local frozen = v.frozen and "frozen"
+ local permanent = v.permanent and "permanent"
+ local primitive = v.primitive and "primitive"
+ local instance = v.instance and "instance"
+ local dealtwith = mutable or immutable or mutable or frozen or permanent or primitive -- beware: we can have combinations
+ local whatever = find(k,"^[a-z][a-z][a-z]+_")
+ local cscommand = gsub(v.cmdname or "","_"," ")
+ local undefined = cscommand == "undefined cs"
+ local marked = (dealtwith and "+") or (whatever and "-") or (instance and "!")
+ if everything or ((all or not marked) and not find(k,"^[pvm]_") and not find(k,"^![tT]")) then
+ local parameters = v.parameters
+ local noaligned = v.noaligned and "noaligned"
+ local filename = files[k]
+ local csname = context.escape(k)
+ if undefined then
+ marked = "?"
+ end
+ ctx_NC() if marked then context(marked) end
+ ctx_NC() if primitive then ctx_bold(csname) else
+ ctx_verb(csname) end
+ ctx_NC() if parameters then context(parameters > 0 and parameters or "-") end
+ ctx_NC() if undefined then context.red(false) end
+ context(cscommand)
+ ctx_NC() if primitive then context(primitive) end
+ ctx_NC() if permanent then context(permanent) end
+ ctx_NC() if immutable then context(immutable) end
+ ctx_NC() if frozen then context(frozen) end
+ ctx_NC() if mutable then context(mutable) end
+ ctx_NC() if instance then context(instance) end
+ ctx_NC() if noaligned then context(noaligned) end
+ ctx_NC() if filename then context(hashnames[filename]) end
+ ctx_NC() ctx_NR()
+ end
+ if visible then
+ total = total + 1
+ if dealtwith then
+ flagged = flagged + 1
+ end
+ end
+ end
+ end
+ context.stoptabulate()
+ end
+
+ context.starttitle { title = "Public \\TEX\\ commands" }
+ show(true, function(k) return find(k,"^[a-zA-Z]+$") end)
+ context.stoptitle()
+
+ context.starttitle { title = "Private \\TEX\\ commands" }
+ show(false, function(k) return not find(k,"^[a-zA-Z]+$") and not find(k,crap) end)
+ context.stoptitle()
+
+ tokens.setters.macro("NumberOfVisible", total)
+ tokens.setters.macro("NumberOfFlagged", flagged)
+
+ end
+
+\stopluacode
+
+\startmode[texmacros]
+
+ \page
+
+ \starttabulate[|c|l|]
+ \HL
+ \NC \type {+} \NC mutable, immutable, frozen, permanent, primitive \NC \NR
+ \NC \type {-} \NC protected by obscurity (underscores) \NC \NR
+ \NC \type {!} \NC instance (can be frozen) \NC \NR
+ \NC \type {0-9} \NC the number of arguments (argument grabbing can be delegated) \NC \NR
+ \HL
+ \stoptabulate
+
+ \start \hsize 15cm \veryraggedright
+ Often frozen commands are redefined on demand and they can be overloaded. Mutable
+ doesn't mean that a user can change it without consequences, for instance the
+ \type {\current...} ones. Primitives come with the engine, permanent macros are
+ the core of \CONTEXT. Noaligned macros are special and dealt deep down when
+ scanning for alignment specific primitives.
+ \par \stop
+
+ \starttabulate[||r|]
+ \BC number of visible macros \NC \NumberOfVisible \NC \NR
+ \BC number of flagged macros \NC \NumberOfFlagged \NC \NR
+ \stoptabulate
+
+\stopmode
+
+\page
+
+\startluacode
+
+ if tex.modes.metapostmacros then
+
+ local context = context
+ -- local ctx_NC = context.NC
+ -- local ctx_NR = context.NR
+ -- local ctx_bold = context.bold
+
+ local find = string.find
+ local gsub = string.gsub
+ local create = token.create
+
+ context.starttitle { title = "\\METAFUN\\ commands" }
+
+ metapost.simple("prestine")
+
+ local mptotal = 0
+ local codes = metapost.codes
+ local types = metapost.types
+ local parameters = metapost.knownparameters
+ local procodes = mplib.propertycodes
+ local everything = tex.modes.everything
+
+ context.startcolumns { n = 5, distance = "1em" }
+ context.nohyphens(false)
+ context.obeyspaces(false)
+ local t = metapost.gethashentries("prestine",true) -- prestine:1
+ if t then
+ table.sort(t,function(a,b) return a[3] < b[3] end)
+ mptotal = #t
+ for i=1,mptotal do
+ local ti = t[i]
+ local code = codes[ti[1]]
+ local property = procodes[ti[2]]
+ local name = ti[3]
+ local vtype = ti[4]
+ local vardef = vtype and types[vtype] == "unsuffixedmacro"
+ context.bgroup()
+ -- context("%-15s\\quad",vardef and "(vardef) tag" or code)
+ context("%s %-15s\\quad",parameters[name] and "+" or "\\nbsp",vardef and "(vardef) tag" or code)
+ if property == "primitive" then
+ context.bf(false)
+ context.blue(false)
+ elseif property == "permanent" then
+ context.bf(false)
+ context.lightgreen(false)
+ elseif property == "immutable" then
+ context.bf(false)
+ context.lightcyan(false)
+ elseif property == "mutable" then
+ context.bf(false)
+ context.lightmagenta(false)
+ elseif everything or not find(name,"^%a+_") then
+ -- todo:
+ if vardef then
+ context.bf(false)
+ context.lightred(false)
+ end
+ end
+ context.verbatim(name)
+ context.egroup()
+ context.par()
+ end
+ end
+ context.stopcolumns()
+
+ context.stoptitle()
+
+ tokens.setters.macro("NumberOfMetafun", mptotal)
+
+ end
+\stopluacode
+
+\startmode [metapostmacros]
+
+ \page
+
+ \starttabulate[|c|l|]
+ \HL
+ \NC \type {-3} \NC \bf \lightmagenta mutable \NC \NR
+ \NC \type {1} \NC \bf \blue primitive \NC \NR
+ \NC \type {2} \NC \bf \lightgreen permanent \NC \NR
+ \NC \type {3} \NC \bf \lightcyan immutable \NC \NR
+ \NC \type {+} \NC \bf (also) used as key \NC \NR
+ \HL
+ \stoptabulate
+
+ \starttabulate[||r|]
+ \BC number of metafun entries \NC \NumberOfMetafun \NC \NR
+ \stoptabulate
+
+\stopmode
+
+\stopmodule
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-system-tokens.mkxl b/Master/texmf-dist/tex/context/modules/mkiv/s-system-tokens.mkxl
new file mode 100644
index 00000000000..b83a4f47b6c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-system-tokens.mkxl
@@ -0,0 +1,84 @@
+%D \module
+%D [ file=s-system-tokens.mkxl,
+%D version=2020.06.02,
+%D title=\CONTEXT\ Style File,
+%D subtitle=System Tokens Checking,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startmodule[system-tokens]
+
+\registerctxluafile{s-system-tokens}{}
+
+\permanent\protected\def\showsystemtokens{\ctxlua{moduledata.system.tokens.showlist()}} % can be public implementor
+
+\stopmodule
+
+\continueifinputfile{s-system-tokens.mkxl}
+
+\usemodule[article-basic]
+
+\setuppapersize[A4,landscape]
+
+\setuplayout[tight]
+
+\setupbodyfont[8pt]
+
+\starttext
+
+ \showsystemtokens
+
+ Some tokens cannot be created yet because they are more complex but eventually the creator will
+ deal with them. The indices are sometimes the same as internal but in most cases nicely start
+ at zero. When they start at another value, then there is an internal token or state that is not
+ user accessible. You always need to use symbolic constants as the numbers can change.
+
+ The first column is a classifier (which is experimental and categories might change when we feel
+ the need).
+
+ \startcolumns[n=5]
+ \starttabulate[|T||]
+ \NC 0 \NC unused \NC \NR
+ \NC 1 \NC regular \NC \NR
+ \NC 2 \NC character \NC \NR
+ \NC 3 \NC register \NC \NR
+ \NC 4 \NC internal \NC \NR
+ \NC 5 \NC reference \NC \NR
+ \NC 6 \NC data \NC \NR
+ \NC 7 \NC token \NC \NR
+ \NC 8 \NC node \NC \NR
+ \stoptabulate
+ \stopcolumns
+
+ \page
+
+ Here is a typeset table of \type {\startframed} using \type {\luatokentable\startframed}:
+
+ \luatokentable\startframed
+
+ which calls \type {\pack_framed_start_framed} where \type {\luatokentable\pack_framed_start_framed} gives:
+
+
+ \unprotect
+ \luatokentable\pack_framed_start_framed
+ \protect
+
+ So you can guess what generates this:
+
+ \unprotect
+ \luatokentable\pack_framed_start_framed_nop
+ \protect
+
+ And this:
+
+ \unprotect
+ \luatokentable\pack_framed_start_framed_yes
+ \protect
+
+\stoptext
+
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-system-visual.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-system-visual.mkiv
new file mode 100644
index 00000000000..5b5107a2d12
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-system-visual.mkiv
@@ -0,0 +1,94 @@
+%D \module
+%D [ file=s-system-visual.mkxl,
+%D version=2020.07.15,
+%D title=\CONTEXT\ Style File,
+%D subtitle=System Visual Debugger Legend,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startmodule[system-visual]
+
+\starttexdefinition unexpanded visuallegend
+ \begingroup
+ \switchtobodyfont[10pt]
+ \setuptabulate[before=,after=]
+ \hsize24cm
+ \scale
+ [width=\textwidth]
+ \bgroup
+ \forgetall
+ \startboxedcolumns[n=3,strut=no]
+ \starttabulate[|lT|l|]
+ \NC L__ \NC line box \NC \NR
+ \NC H__ \NC horizontal box \NC \NR
+ \NC _T_ \NC vertical top box \NC \NR
+ \NC __V \NC vertical box \NC \NR
+ \TB
+ \NC VK \NC vertical kern \NC \NR
+ \NC HK \NC horizontal kern \NC \NR
+ \NC MK \NC math kern \NC \NR
+ \NC MK \NC margin kern \NC \NR
+ \NC LK \NC math list kern \NC \NR
+ \TB
+ \NC VP \NC vertical penalty \NC \NR
+ \NC HP \NC horizontal penalty \NC \NR
+ \TB
+ \NC LI \NC line skip \NC \NR
+ \NC BS \NC baseline skip \NC \NR
+ \NC PS \NC par skip \NC \NR
+ \NC DA \NC abovedisplay skip \NC \NR
+ \NC DB \NC belowdisplay skip \NC \NR
+ \NC SA \NC above display short skip \NC \NR
+ \NC SB \NC below display short skip \NC \NR
+ \NC TS \NC top skip \NC \NR
+ \NC ST \NC split top skip \NC \NR
+ \NC AS \NC tab skip \NC \NR
+ \NC LH \NC left hang skip \NC \NR
+ \NC RH \NC right hang skip \NC \NR
+ \NC MS \NC thin mu skip \NC \NR
+ \NC MM \NC med mu skip \NC \NR
+ \NC ML \NC thick mu skip \NC \NR
+ \NC IM \NC inter math skip \NC \NR
+ \NC MT \NC math skip \NC \NR
+ \NC LS \NC left skip \NC \NR
+ \NC RS \NC right skip \NC \NR
+ \NC SP \NC space skip \NC \NR
+ \NC XS \NC x space skip \NC \NR
+ \NC ZS \NC zero space skip \NC \NR
+ \NC PF \NC par fill skip \NC \NR
+ \NC IN \NC indent skip \NC \NR
+ \NC CS \NC correction skip \NC \NR
+ \NC VS \NC vertical user skip \NC \NR
+ \NC HS \NC horizontal user skip \NC \NR
+ \NC IC \NC italic correcection \NC \NR
+ \TB
+ \NC NL \NC leaders \NC \NR
+ \NC CL \NC c leaders \NC \NR
+ \NC XL \NC x leaders \NC \NR
+ \NC GL \NC g leaders \NC \NR
+ \TB
+ \NC M:B \NC math begin \NC \NR
+ \NC M:E \NC math end \NC \NR
+ \NC W:* \NC whatsit \NC \NR
+ \stoptabulate
+ \stopboxedcolumns
+ \egroup
+ \endgroup
+\stoptexdefinition
+
+\stopmodule
+
+\continueifinputfile{s-system-visual.mkiv}
+
+\usemodule[article-basic]
+
+\startTEXpage[width=20cm,offset=5mm]
+
+ \visuallegend
+
+\stopTEXpage
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat-columns.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat-columns.mkiv
index f8cace1e98e..317c5196ff4 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat-columns.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat-columns.mkiv
@@ -320,7 +320,7 @@
\startsetups tugboat:introduction:article
\start
- \unexpanded\def\\{\unskip\space\&\space\ignorespaces}
+ \enforced\protected\def\\{\unskip\space\&\space\ignorespaces}
\hbox{\indent\getvariable{tugboat}{author}}
\par
\stop
@@ -333,14 +333,14 @@
\start
\switchtobodyfont[12pt]
- \def\\{\unskip\space\&\space\ignorespaces}
+ \enforced\protected\def\\{\unskip\space\&\space\ignorespaces}
\getvariable{tugboat}{author}
\par
\stop
\start
\switchtobodyfont[9pt]
- \unexpanded\def\\{\unskip,\space\ignorespaces}
+ \enforced\protected\def\\{\unskip,\space\ignorespaces}
\getvariable{tugboat}{address}
\par
\start
@@ -380,7 +380,7 @@
\hrule height .6pt
\blank[halfline]
\start
- \let\\=\par
+ \enforced\let\\\par
\start
\bf
\getvariable{tugboat}{title}
@@ -393,7 +393,7 @@
\blank[line]
\doiftext {\getbuffer[abstract]} {
- \let\\=\endgraf
+ \enforced\let\\\endgraf
\setups[tugboat:abstract:setup]
\startsubject[title={Abstract}]
\getbuffer[abstract]
@@ -421,7 +421,7 @@
\start
\switchtobodyfont[14.4pt]
- \let\\=\par
+ \enforced\let\\\par
\getvariable{tugboat}{title}
\par
\stop
@@ -430,7 +430,7 @@
\blank[tugmedium]
- \let\\=\par
+ \enforced\let\\\par
\setups[tugboat:abstract:setup]
@@ -458,7 +458,7 @@
\leftskip=\dimexpr\textwidth-\signaturewidth\relax
- \let\\=\par
+ \enforced\let\\\par
\dontleavehmode\llap {
$\diamond$\enspace
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv
index e243dc4879b..14d751fcd53 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv
@@ -393,7 +393,7 @@
% \blank[halfline]
\start
- \def\\{\unskip\space\&\space\ignorespaces}
+ \enforced\protected\def\\{\unskip\space\&\space\ignorespaces}
\hbox{\indent\getvariable{tugboat}{author}}
\par
\stop
@@ -431,7 +431,7 @@
\hrule height .6pt
\blank[halfline]
\start
- \let\\=\par
+ \enforced\let\\\par
{\bf\getvariable{tugboat}{title}}
\par
\blank[halfline]
@@ -441,7 +441,7 @@
\blank[line]
\doiftext {\getbuffer[abstract]} {
- \let\\=\endgraf
+ \enforced\let\\\endgraf
\setups{tugboat:abstract:setup}
\subject{Abstract}
\getbuffer[abstract]
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-math-svg.lua b/Master/texmf-dist/tex/context/modules/mkiv/x-math-svg.lua
index 8a628816773..818c7ad8434 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/x-math-svg.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-math-svg.lua
@@ -35,10 +35,10 @@ local pagedata = { }
local statusname = "x-math-svg-status.lua"
local pdfname = "x-math-svg.pdf"
-local pdftosvg = os.which("mudraw")
+local pdftosvg = os.which("mutool")
local f_make_tex = formatters[ [[context --global kpse:x-math-svg.mkvi --inputfile="%s" --svgstyle="%s" --batch --noconsole --once --purgeall]] ]
-local f_make_svg = formatters[ [[mudraw -o "math-%%d.svg" "%s" 1-9999]] ]
+local f_make_svg = formatters[ [[mutool draw -o "math-%%d.svg" "%s" 1-9999]] ]
----- f_inline = formatters[ [[<div class='math-inline' style='vertical-align:%p'></div>]] ]
local f_inline = formatters[ [[<div class='math-inline'></div>]] ]
@@ -101,7 +101,7 @@ function svgmath.convert(filename,svgstyle)
-- invalid filename
return false, "invalid filename"
elseif not pdftosvg then
- return false, "mudraw is not installed"
+ return false, "mutool is not installed"
end
os.execute(f_make_tex(filename,svgstyle))
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-mathml-basics.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/x-mathml-basics.mkiv
index e166995b0c8..bb119f5144f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/x-mathml-basics.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-mathml-basics.mkiv
@@ -6,7 +6,7 @@
% this can become a core helper
-% bwe could do all of them in lua
+% we could do all of them in lua
\startluacode
local find = string.find
@@ -87,11 +87,11 @@ end
}
\stoptexdefinition
-\starttexdefinition mtext #1
- \text {
- #1
- }
-\stoptexdefinition
+% \starttexdefinition mtext #1
+% \text {
+% #1
+% }
+% \stoptexdefinition
% mover
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-mathml.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/x-mathml.mkiv
index adc49431407..bd55196f9d3 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/x-mathml.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-mathml.mkiv
@@ -1890,8 +1890,6 @@
\fi
\stoptexdefinition
-\newsignal\mmltextsignal % not used
-
\starttexdefinition applymmlsometext #1#2
\applymmlmathbackground {#1} {
\applymmlmathcolor {#1} {
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv
index 4e960f4287c..67912b8d76f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv
@@ -90,7 +90,9 @@
\pushmacro\setuptext
-\defineframedtext
+\ifcase\contextlmtxmode \else \pushoverloadmode \let\setuptext\setuptext \popoverloadmode \fi
+
+\defineframedtext % todo commands=no
[setuptext]
[\c!width=\hsize,
\c!height=\v!fit,
@@ -492,9 +494,15 @@
\unexpanded\def\basicsetup{\c_cmd_kind\zerocount\cmd_show_setup}
\unexpanded\def\shortsetup{\c_cmd_kind\plusone \cmd_show_setup}
-\unexpanded\def\setup {\c_cmd_kind\plustwo \cmd_show_setup}
+%unexpanded\def\setup {\c_cmd_kind\plustwo \cmd_show_setup}
\unexpanded\def\showsetup {\c_cmd_kind\plustwo \cmd_show_setup}
+\ifcase\contextlmtxmode \else
+ \pushoverloadmode
+ \unexpanded\def\setup{\c_cmd_kind\plustwo\cmd_show_setup}
+ \popoverloadmode
+\fi
+
\unexpanded\def\showsetupinlist#1#2#3%
{%(#1)(#2)(#3)\par
\edef\m_cmd_instance{\secondoftwoarguments#3}%
diff --git a/Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.lmt b/Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.lmt
new file mode 100644
index 00000000000..be318eb38bf
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.lmt
@@ -0,0 +1,30 @@
+if not modules then modules = { } end modules ['s-characters-properties'] = {
+ version = 1.001,
+ comment = "companion to s-characters-properties.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+moduledata.characters = moduledata.characters or { }
+moduledata.characters.combinations = moduledata.characters.combinations or { }
+
+local context = context
+local ctx_NC = context.NC
+local ctx_NR = context.NR
+local ctx_MR = context.MR
+local ctx_ML = context.ML
+
+function moduledata.characters.combinations.showcombinations(settings)
+ context.starttabulate { "|l|T|cTw(1em)|T|" }
+ for k, v in table.sortedhash(characters.verbosemarks) do
+ local m = "with" .. string.gsub(k," ","")
+ ctx_NC() context(k)
+ ctx_NC() context("%U",v)
+ ctx_NC() context("%s",v)
+ ctx_NC() if token.is_defined(m) then context("\\string\\%s",m) end
+ ctx_NC() ctx_NR()
+ end
+ context.stoptabulate()
+end
+
diff --git a/Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.mkxl b/Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.mkxl
new file mode 100644
index 00000000000..aef466f8484
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkxl/s-characters-combinations.mkxl
@@ -0,0 +1,61 @@
+%D \module
+%D [ file=s-characters-combinations,
+%D version=2021.02.08
+%D title=\CONTEXT\ Style File,
+%D subtitle=Character combinations,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\startmodule[characters-combinations]
+
+\registerctxluafile{s-characters-combinations}{autosuffix}
+
+\installmodulecommandluasingle \showcharactercombinations {moduledata.characters.combinations.showcombinations}
+
+\stopmodule
+
+\continueifinputfile{s-characters-combinations.mkxl}
+
+\usemodule[art-01]
+
+\setupbodyfont[dejavu]
+
+\starttext
+
+ \showcharactercombinations
+
+ \page
+
+ \startlines
+ \chr {a acute } á \withacute a
+ \chr {o double acute } Å‘ \withdoubleacute o
+ \chr {a grave } à \withgrave a
+ \chr {o double grave } È \withdoublegrave o
+ \chr {a circumflex } â \withcircumflex a
+ \chr {e circumflex below} ḙ \withcircumflexbelow e
+ \chr {a diaeresis } ä \withdiaeresis a
+ \chr {a tilde } ã \withtilde a
+ \chr {i tilde below } ḭ \withtildebelow i
+ \chr {a macron } Ä \withmacron a
+ \chr {k line below } ḵ \withlinebelow k
+ \chr {c cedilla } ç \withcedilla c
+ \chr {s comma below } ÅŸ \withcommabelow s
+ \chr {z hook below } ȥ \withhookbelow z
+ \chr {a hook } ả \withhook a
+ \chr {a ring } å \withring a
+ \chr {a ring below } Ḡ\withringbelow a
+ \chr {m dot } á¹ \withdot m
+ \chr {l middle dot } ŀ \withmiddledot l
+ \chr {m dot below } ṃ \withdotbelow m
+ \chr {a breve } ă \withbreve a
+ \chr {a inverted breve } ȃ \withinvertedbreve a
+ \chr {k caron } Ç© \withcaron k
+ \chr {o stroke } ø \withstroke o
+ \stoplines
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkxl/s-colors-show.mkxl b/Master/texmf-dist/tex/context/modules/mkxl/s-colors-show.mkxl
new file mode 100644
index 00000000000..aa0e3227eb6
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkxl/s-colors-show.mkxl
@@ -0,0 +1,276 @@
+%D \module
+%D [ file=colo-run,
+%D version=1997.04.01,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=Runtime loaded commands,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{colo-run}{}
+
+\unprotect
+
+%D Colors
+
+%D These are nicer in \LUA\ code than in \TEX\ code but not more efficient.
+
+\permanent\protected\gdef\showcolorbar[#1]%
+ {\backgroundline[#1]{\strut\enspace\color[white]{white}\enspace\color[black]{black}\enspace}}
+
+\permanent\protected\tolerant\gdef\showcolorset[#1]%
+ {\ctxcommand{showcolorset("#1")}}
+
+\permanent\protected\tolerant\gdef\showcolorcomponents[#1]%
+ {\ctxcommand{showcolorcomponents("#1")}}
+
+\permanent\protected\tolerant\gdef\showcolor[#1]%
+ {\ifparameter#1\or
+ \usecolors [#1]% delayed and we can only ask for the set if
+ \showcolorset[#1]% loading has happened
+ \fi}
+
+%D The rest might also be done in \LUA\ although there is not much beauty to gain
+%D here (too much typesetting specific). Also, these macros are pretty old and
+%D hardly used so best keep them as they are. But we keep them because they always
+%D worked and it doesn't hurt to see some \MKII|-|code every now and then.
+
+%D Palets
+
+\permanent\protected\tolerant\gdef\showpalet[#1]#*[#2]%
+ {\doifelsecolorpalet{#1}
+ {\doifelseinset\v!vertical{#2}\colo_palets_show_vertical\colo_palets_show_horizontal{#1}{#2}}%
+ {}}
+
+\gdef\colo_palets_show_vertical#1#2%
+ {\begingroup
+ \forgetall
+ \setlocalhsize
+ \hsize\localhsize
+ \offinterlineskip
+ \setuppalet[#1]
+ \tabskip\zeropoint
+ \def\colo_palets_show_palet##1%
+ {\doifelseinset\v!number{#2}{##1\hskip.5\emwidth}{}%
+ \aligntab
+ \color [##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}%
+ \graycolor[##1]{\vrule\s!width3\emwidth\s!height\strutht\s!depth\strutdp}%
+ \aligntab
+ \doifinset\v!value{#2}{\hskip.5\emwidth\colorvalue{##1}}%
+ \crcr}
+ \halign
+ {\hss\alignmark\alignmark\aligntab\hss\alignmark\alignmark\hss\aligntab\alignmark\alignmark\cr
+ \aligntab\doifinset\v!name{#2}{\strut#1}\aligntab\cr
+ \colo_palets_process[#1]\colo_palets_show_palet\crcr}%
+ \endgroup}
+
+\gdef\colo_palets_show_horizontal#1#2% todo: bTABLE etc
+ {\vbox
+ {\forgetall
+ \setlocalhsize
+ \hsize\localhsize
+ \offinterlineskip
+ \setuppalet[#1]
+ \tabskip\zeropoint
+ \scratchwidth\zeropoint
+ \doifinset\v!number{#2}
+ {\def\colo_palets_show_palet##1%
+ {\setbox\scratchbox\hbox{##1}%
+ \ifdim\scratchwidth<\wd\scratchbox
+ \scratchwidth\wd\scratchbox
+ \fi}%
+ \colo_palets_process[#1]\colo_palets_show_palet}%
+ \advance\scratchwidth\emwidth
+ \ifdim\scratchwidth<5\emwidth
+ \scratchwidth5\emwidth
+ \fi
+ \halign
+ {\alignmark\alignmark\aligntab\aligntab\hbox to \scratchwidth{\hss\alignmark\alignmark\hss}\cr
+ \doifinset\v!number{#2}
+ {\def\colo_palets_show_palet##1{\aligntab\strut##1}%
+ \colo_palets_process[#1]\colo_palets_show_palet}\cr
+ \doifinset\v!name{#2}{#1\hskip.5\emwidth}%
+ \def\colo_palets_show_palet##1%
+ {\aligntab\strut\color[##1]{\vrule\s!width\scratchwidth\s!height\strutht\s!depth\zeropoint}}%
+ \colo_palets_process[#1]\colo_palets_show_palet\crcr
+ \noalign{\vskip-\strutdepth}%
+ \def\colo_palets_show_palet##1%
+ {\aligntab\graycolor[##1]{\vrule\s!width\scratchwidth\s!height\zeropoint\s!depth\strutdp}}%
+ \colo_palets_process[#1]\colo_palets_show_palet\crcr
+ \doifinset\v!value{#2}
+ {\def\colo_palets_show_palet##1%
+ {\aligntab\vbox
+ {\hsize\scratchwidth
+ \vskip.25\exheight
+ \everypar{\strut}
+ \veryraggedcenter
+ \let\colorformatseparator\endgraf
+ \colorvalue{##1}}}%
+ \colo_palets_process[#1]\colo_palets_show_palet}%
+ \crcr}}}
+
+\gdef\colo_palets_process[#1]%
+ {\getpaletlist[#1]%
+ \normalexpanded{\globalprocesscommalist[\paletlist]}}
+
+\permanent\protected\tolerant\gdef\comparepalet[#1]%
+ {\doifelsecolorpalet{#1}%
+ {\hbox
+ {\colo_palets_compare_indeed\color{#1}%
+ \quad
+ \colo_palets_compare_indeed\graycolor{#1}}}%
+ {}}
+
+\gdef\colo_palets_compare_indeed#1#2%
+ {\vbox
+ {\forgetall
+ \setlocalhsize
+ \hsize\localhsize
+ \offinterlineskip
+ \setuppalet[#2]
+ \getpaletsize[#2]%
+ \getpaletlist[#2]%
+ \scratchwidth2\emwidth\relax
+ \hsize\paletsize\scratchwidth
+ \def\colo_palets_compare##1%
+ {\hbox
+ {\setbox0\hbox
+ {#1[##1]{\vrule\s!width\hsize\s!height3ex}}%
+ \wd0\zeropoint
+ \box0
+ \hbox to \hsize
+ {\def\colo_palets_compare####1%
+ {\hbox to \scratchwidth
+ {\hss#1[####1]{\vrule\s!width.5\scratchwidth\s!height2.25\exheight\s!depth-.75\exheight}\hss}}%
+ \processcommacommand[\paletlist]\colo_palets_compare}}
+ \endgraf}
+ \processcommacommand[\paletlist]\colo_palets_compare}}
+
+%D Groups
+
+\permanent\protected\tolerant\gdef\showcolorgroup[#1]#*[#2]%
+ {\doifcolor{#1:1}
+ {\doifelseinset\v!vertical{#2}\colo_groups_show_vertical\colo_groups_show_horizontal{#1}{#2}}}
+
+\gdef\colo_groups_show_horizontal#1#2%
+ {\vbox
+ {\forgetall
+ \setlocalhsize
+ \hsize\localhsize
+ \offinterlineskip
+ \setuppalet
+ \tabskip\zeropoint
+ \def\colorformatseparator{\strut\cr}
+ \def\colo_groups_show_group##1%
+ {\doifcolor{#1:##1}{\vbox
+ {\halign
+ {\hss\alignmark\alignmark\alignmark\alignmark\hss\cr
+ \doifinset\v!number{#2}{\strut##1}\cr
+ \color [#1:##1]{\vrule\s!width4\emwidth\s!height\strutht \s!depth\zeropoint}\cr
+ \graycolor[#1:##1]{\vrule\s!width4\emwidth\s!height\zeropoint\s!depth\strutdp }\cr
+ \doifinset\v!value{#2}{\colorvalue{#1:##1}\strut}\crcr}}}}%
+ \hbox
+ {\doifinset\v!name{#2}
+ {\strut
+ \doifelseinset\v!value{#2}
+ {\raise3\lineheight\hbox{#1\hskip.5\emwidth}}
+ {#1}%
+ \hskip.5\emwidth}%
+ \colo_groups_show_group1\colo_groups_show_group2\colo_groups_show_group3\colo_groups_show_group4%
+ \colo_groups_show_group5\colo_groups_show_group6\colo_groups_show_group7\colo_groups_show_group8}}}
+
+\gdef\colo_groups_show_vertical#1#2%
+ {\vbox
+ {\forgetall
+ \setlocalhsize
+ \hsize\localhsize
+ \offinterlineskip
+ \setuppalet
+ \tabskip\zeropoint
+ \def\colo_groups_show_group##1%
+ {\doifcolor{#1:##1}
+ {\doifinset\v!number{#2}
+ {##1\hskip.5\emwidth}%
+ \aligntab
+ \color [#1:##1]{\vrule\s!width2.5\emwidth\s!height\strutht\s!depth\strutdp}%
+ \graycolor[#1:##1]{\vrule\s!width2.5\emwidth\s!height\strutht\s!depth\strutdp}
+ \aligntab
+ \doifinset\v!value{#2}{\hskip.5\emwidth\colorvalue{#1:##1}}%
+ \crcr}}%
+ \halign
+ {\hss\alignmark\alignmark\aligntab\hss\alignmark\alignmark\hss\aligntab\alignmark\alignmark\hss\cr
+ \aligntab\doifinset\v!name{#2}{\strut#1}\aligntab\crcr
+ \colo_groups_show_group1\colo_groups_show_group2\colo_groups_show_group3\colo_groups_show_group4%
+ \colo_groups_show_group5\colo_groups_show_group6\colo_groups_show_group7\colo_groups_show_group8}}}
+
+\permanent\protected\tolerant\gdef\comparecolorgroup[#1]%
+ {\doifcolor{#1:1}
+ {\hbox
+ {\colo_groups_compare_indeed\color {#1}\quad
+ \colo_groups_compare_indeed\graycolor{#1}}}}
+
+\gdef\colo_groups_compare_indeed#1#2%
+ {\vbox
+ {\forgetall
+ \setlocalhsize
+ \hsize\localhsize
+ \scratchcounter\zerocount
+ \dorecurse{15}{\doifcolor{#2:\recurselevel}{\advance\scratchcounter\plusone}}
+ \scratchwidth2\emwidth\relax
+ \hsize\scratchcounter\scratchwidth
+ \dorecurse\scratchcounter{\colo_groups_compare_step{#1}{#2}\recurselevel}}}
+
+\def\colo_groups_compare_step#1#2#3%
+ {\hbox to \hsize
+ {\setbox\scratchbox\hbox
+ {#1[#2:#3]{\vrule\s!width\hsize\s!height3\exheight}}%
+ \wd\scratchbox\zeropoint
+ \box\scratchbox
+ \hbox to \hsize
+ {\hss
+ \dorecurse\scratchcounter
+ {#1[#2:\recurselevel]{\vrule\s!width.5\scratchwidth\s!height2.25\exheight\s!depth-.75\exheight}%
+ \hss}}}
+ \endgraf}
+
+\protect
+
+\continueifinputfile{s-colors-show.mkxl}
+
+\setupwhitespace[big]
+
+\usecolors[dem]
+
+\starttext
+
+\startsubject[title=\type{\showpalet}]
+ \showpalet [alfa] [horizontal,name,number,value]
+\stopsubject
+
+\startsubject[title=\type{\showcolorcomponents}]
+ \showcolorcomponents[red,green,blue]
+\stopsubject
+
+\startsubject[title=\type{\comparepalet}]
+ \comparepalet[alfa]
+\stopsubject
+
+\startsubject[title=\type{\showcolor}]
+ \showcolor[rgb]
+\stopsubject
+
+\startsubject[title=\type{\showcolorgroup}]
+ \showcolorgroup[magenta]
+ \showcolorgroup[cyan]
+ \showcolorgroup[yellow]
+\stopsubject
+
+\startsubject[title=\type{\comparecolorgroup}]
+ \comparecolorgroup[magenta]
+\stopsubject
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkxl/s-fonts-show.mkxl b/Master/texmf-dist/tex/context/modules/mkxl/s-fonts-show.mkxl
new file mode 100644
index 00000000000..42b5af125f7
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkxl/s-fonts-show.mkxl
@@ -0,0 +1,658 @@
+%D \module
+%D [ file=font-run,
+%D version=1998.09.11, % (second)
+%D version=2001.02.20, % (third)
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Runtime Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D [This code is hooked into the core macros and saves some format
+%D space. It needs a cleanup as it's real old derioved \MKII\ code]
+%D
+%D Better use \type{\bTABLE...\eTABLE}.
+
+\unprotect
+
+\gdef\module_fonts_show_prepare#1%
+ {\iftok{#1}\emptytoks
+ \edef\m_module_fonts_show_title{\the\bodyfontsize}%
+ \else
+ \switchtobodyfont[#1]%
+ \edef\m_module_fonts_show_title{#1}%
+ \fi
+ \ifempty\fontclass
+ \edef\m_module_fonts_show_title{[\m_module_fonts_show_title]}%
+ \orelse\ifx\fontclass\m_module_fonts_show_title
+ \edef\m_module_fonts_show_title{[\m_module_fonts_show_title]}%
+ \else
+ \edef\m_module_fonts_show_title{[\fontclass]\space[\m_module_fonts_show_title]}%
+ \fi}
+
+\permanent\protected\tolerant\gdef\showbodyfont[#1]%
+ {\ifinsidefloat\else\startbaselinecorrection\fi
+ \vbox
+ {\module_fonts_show_prepare{#1}%
+ \def\next##1##2##3##4%
+ {\bTR
+ \bTD{##4}\type{##1}\eTD
+ \bTD{##4}##1##3{\tf ##2}\eTD
+ \bTD{##4}##1##3{\tf ##2}\eTD
+ \bTD{##4}##1##3{\bf ##2}\eTD
+ \bTD{##4}##1##3{\sl ##2}\eTD
+ \bTD{##4}##1##3{\it ##2}\eTD
+ \bTD{##4}##1##3{\bs ##2}\eTD
+ \bTD{##4}##1##3{\bi ##2}\eTD
+ \bTD{##4}##1##3{\tfx ##2}\eTD
+ \bTD{##4}##1##3{\tfxx ##2}\eTD
+ \bTD{##4}##1##3{\tfa ##2}\eTD
+ \bTD{##4}##1##3{\tfb ##2}\eTD
+ \bTD{##4}##1##3{\tfc ##2}\eTD
+ \bTD{##4}##1##3{\tfd ##2}\eTD
+ \eTR}%
+ \bTABLE[\c!align=\v!middle,\c!loffset=.5ex,\c!roffset=.5ex]
+ \bTR\bTD[\c!nx=14,\c!offset=1ex]\tttf{\m_module_fonts_show_title}\eTD\eTR
+ \next{}{}\type{}%
+ \next\rm{\languageparameter\c!text}\relax{\tfd\setstrut\strut}%
+ \next\ss{\languageparameter\c!text}\relax{\tfd\setstrut\strut}%
+ \next\tt{\languageparameter\c!text}\relax{\tfd\setstrut\strut}%
+ \next\mr{\languageparameter\c!text}\mathematics{\tfd\setstrut\strut}%
+ \eTABLE}%
+ \ifinsidefloat\else\stopbaselinecorrection\fi}
+
+\permanent\protected\tolerant\gdef\showbodyfontenvironment[#1]%
+ {\ifinsidefloat\else\startbaselinecorrection\fi
+ \vbox
+ {\module_fonts_show_prepare{#1}%
+ \def\next##1##2%
+ {\bTR
+ \bTD##1\bodyfontsizevariable{##2}\s!text\eTD
+ \bTD##1\bodyfontsizevariable{##2}\s!script\eTD
+ \bTD##1\bodyfontsizevariable{##2}\s!scriptscript\eTD
+ \bTD##1\bodyfontsizevariable{##2}\s!x\eTD
+ \bTD##1\bodyfontsizevariable{##2}\s!xx\eTD
+ \bTD##1\bodyfontsizevariable{##2}\v!small\eTD
+ \bTD##1\bodyfontsizevariable{##2}\v!big\eTD
+ %\bTD##1\bodyfontsizevariable{##2}\c!interlinespace\eTD
+ \eTR}%
+ \def\nextone{\next\relax}%
+ \bTABLE[\c!align=\v!middle,\c!loffset=.5ex,\c!roffset=.5ex]
+ \bTR\bTD[\c!nx=7,\c!offset=1ex]\tttf{\m_module_fonts_show_title}\eTD\eTR
+ \next{\tttf\thirdofthreearguments}\relax
+ \processbodyfontenvironmentlist{nextone}
+ \eTABLE}%
+ \ifinsidefloat\else\stopbaselinecorrection\fi}
+
+\permanent\protected\tolerant\gdef\showfont[#1]#*[#2]%
+ {\bgroup
+ \iftok{#1}\emptytoks\else
+ \definedfont[#1]%
+ \ifdim40\emwidth>\hsize
+ \glyphscale750\relax
+ \fi
+ \fi
+ \integerdef\c_module_fonts_font_id\fontid\font
+ \doifelsenothing{#2}
+ {\module_fonts_show_font_indeed{#1}\zerocount}
+ {\doifelse{#2}\v!all
+ {\dostepwiserecurse\zerocount{255}\plusone
+ {\scratchcounterone \recurselevel
+ \scratchcountertwo \numexpr\scratchcounterone*256\relax
+ \scratchcounterthree\numexpr\scratchcountertwo+255\relax
+ \doloop
+ {\iffontchar\font\scratchcountertwo
+ \module_fonts_show_font_indeed{#1}\scratchcounterone
+ \exitloop
+ \orelse\ifnum\scratchcountertwo=\scratchcounterthree
+ \exitloop
+ \else
+ \advance\scratchcountertwo\plusone
+ \fi}}}
+ {\processcommalist[#2]{\module_fonts_show_font_indeed{#1}}}}%
+ \egroup}
+
+\gdef\module_fonts_show_font_indeed#1#2% made some 50% faster but still slow
+ {\bgroup
+ \ifinsidefloat\else\startbaselinecorrection\fi
+ \vbox\bgroup
+ \scratchdimenone 2.5\emwidth
+ \scratchdimentwo 2.4\emwidth
+ \scratchdimenthree2.3\emwidth
+ \scratchcounterfour#2\relax
+ \forgetall
+ \startoverlay % easier in cld
+ {\vbox
+ {\tf
+ \setstrut
+ \setfontid\c_module_fonts_font_id
+ \offinterlineskip
+ \unexpanded\def\wrapbox##1%
+ {\vpack to \scratchdimenone
+ {\vss
+ \hpack to \scratchdimenone
+ {\setfontid\c_module_fonts_font_id
+ \ifzeropt\interwordspace
+ \setbox##1\hpack{\raise.5\dp##1\hpack{\lower.5\ht##1\copy##1}}%
+ \ht##1\zeropoint
+ \dp##1\zeropoint
+ \else
+ \ht##1\strutht
+ \dp##1\strutdp
+ \strut
+ \fi
+ \hss\copy##1\hss}
+ \vss}}%
+ \unexpanded\def\textbox##1%
+ {\vpack to \scratchdimentwo
+ {\hsize\scratchdimenthree
+ ##1%
+ \par}}%
+ \unexpanded\def\scratchnum
+ {\blue
+ \tinyfont
+ \hfill
+ \number\scratchcounter
+ \vfill
+ \octnumber\scratchcounter
+ \hfill
+ \lchexnumbers\scratchcounter}%
+ \setbox\scratchboxone\hpack{\tf\textbox{}}%
+ \setbox\scratchboxtwo\hpack{\tf\gray\vrule\s!width\exheight\s!height.5\exheight\s!depth.5\exheight}%
+ \setbox\scratchboxtwo\wrapbox\scratchboxtwo
+ \setbox\scratchboxthree\hpack
+ {\startoverlay
+ {\box\scratchboxtwo}
+ {\box\scratchboxone}
+ \stopoverlay}%
+ \dostepwiserecurse\zerocount{15}\plusone
+ {\scratchcounterone\recurselevel
+ \hpack
+ {\dostepwiserecurse\zerocount{15}\plusone
+ {\scratchcountertwo \recurselevel
+ \scratchcounterthree\numexpr\scratchcounterone*16+\scratchcountertwo\relax
+ \scratchcounterthree\numexpr\scratchcounterfour*256+\scratchcounterthree\relax
+ \iffontchar\font\scratchcounterthree
+ \setbox\scratchbox\ruledhpack{\char\scratchcounterthree}%
+ \bgroup
+ \tf
+ \startoverlay
+ {\wrapbox\scratchbox}
+ {\textbox\scratchnum}
+ \stopoverlay
+ \egroup
+ \else
+ \copy\scratchboxthree
+ \fi}}}%
+ \par}}
+ {\tf\basegrid[\c!nx=16,\c!ny=16,\c!dx=2.5,\c!dy=2.5,\c!unit=em]}
+ \stopoverlay
+ \nointerlineskip
+ \vskip2\points
+ % the \noexpand before \blank is needed for non etex
+ \edef\theshowfontspecs{name: {\noexpand\black\fontname\font}\quad plane: \the\scratchcounterfour\enspace"\hexnumber\scratchcounterfour}%
+ \tf % also sets em
+ \hbox to 40\emwidth{\blue\hfill\tinyfont\setstrut\strut\theshowfontspecs}
+ \egroup
+ \ifinsidefloat\else\stopbaselinecorrection\fi
+ \egroup}
+
+% \showfontstyle[modern][rm][tf][all] % #2, #3 and #4 can be 'all'
+%
+% no lists any more, so no 'all' any longer
+% no need to clean this up
+
+\permanent\protected\tolerant\gdef\showfontstyle[#1]#*[#2]#*[#3]#*[#4]
+ {\bgroup
+ \edef\m_module_fonts_show_styles {\iftok{#2}\emptytoks\s!rm,\s!ss,\s!tt,\s!mm\else#2\fi}%
+ \edef\m_module_fonts_show_alternatives{\iftok{#3}\emptytoks\s!tf,\s!bf,\s!it,\s!sl,\s!bs,\s!bi\else#3\fi}%
+ \iftok{#1}\emptytoks\else
+ \switchtobodyfont[#1]
+ \fi
+ \raggedright
+ \protected\def\dododocommand##1%
+ {\dostepwiserecurse\zerocount{255}\plusone
+ {\scratchcounter\numexpr##1*256+\recurselevel\relax
+ \iffontchar\font\scratchcounter\relax
+ \char\scratchcounter
+ \space
+ \fi}}%
+ \protected\def\dodocommand##1##2%
+ {\starttextrule{\tttf #1 ##1 ##2}
+ \nobreak\getvalue{##2}%
+ \doifelsenothing{#4}
+ {\dododocommand\zerocount}
+ {\doifelse{#4}\v!all
+ {\dostepwiserecurse\zerocount{255}\plusone{\normalexpanded{\dododocommand{\recurselevel}}}}
+ {\processcommalist[#4]{\dododocommand}}}%
+ \par \nobreak
+ \stoptextrule}
+ \protected\def\docommand##1%
+ {\getvalue{##1}%
+ \processcommacommand[\m_module_fonts_show_alternatives]{\dodocommand{##1}}}
+ \processcommacommand[\m_module_fonts_show_styles]\docommand
+ \egroup}
+
+\permanent\protected\gdef\showligature#1%
+ {\hbox{\type{#1}\enspace\showglyphs#1}}
+
+\permanent\protected\tolerant\gdef\showligatures[#1]% we keep it around for compatibility reasons
+ {\bgroup
+ \def\module_fonts_show_ligature##1{\hbox{\showglyphs##1}}%
+ \doifsomething{#1}{\definedfont[#1*default]}%
+ \starttabulate[|*{7}{c|}]
+ \NC\type{ff}
+ \NC\type{fi}
+ \NC\type{fl}
+ \NC\type{ffi}
+ \NC\type{ffl}
+ \NC\type{--}
+ \NC\type{---}
+ \NC\NR
+ \NC\module_fonts_show_ligature{ff}
+ \NC\module_fonts_show_ligature{fi}
+ \NC\module_fonts_show_ligature{fl}
+ \NC\module_fonts_show_ligature{ffi}
+ \NC\module_fonts_show_ligature{ffl}
+ \NC\module_fonts_show_ligature{--}
+ \NC\module_fonts_show_ligature{---}
+ \NC\NR
+ \stoptabulate
+ \egroup}
+
+\permanent\protected\gdef\showkerning
+ {\groupedcommandcs\showfontkerns\relax}
+
+\permanent\gdef\module_fonts_char_ratio#1#2%
+ {\ifzeropt\nextboxhtdp\else
+ \cldcontext{\number#1/\number\nextboxhtdp}%
+ \fi}
+
+\permanent\protected\gdef\showcharratio
+ {\dowithnextboxcontent
+ {\switchtobodyfont[10pt]}%
+ {\starttabulate[|l|l|l|]
+ \NC height \NC \the\nextboxht \NC \module_fonts_char_ratio\nextboxht \NC \NR
+ \NC depth \NC \the\nextboxdp \NC \module_fonts_char_ratio\nextboxdp \NC \NR
+ \stoptabulate}
+ \hbox}
+
+\permanent\protected\gdef\showfontparameters
+ {\starttabulate[|tl|l|]
+ \NC \type {\slantperpoint} \NC \the\fontslantperpoint \font \NC\NR
+ \NC \type {\interwordspace} \NC \the\fontinterwordspace \font \NC\NR
+ \NC \type {\interwordstretch} \NC \the\fontinterwordstretch\font \NC\NR
+ \NC \type {\interwordshrink} \NC \the\fontinterwordshrink \font \NC\NR
+ \NC \type {\exheight} \NC \the\fontexheight \font \NC\NR
+ \NC \type {\emwidth} \NC \the\fontemwidth \font \NC\NR
+ \NC \type {\extraspace} \NC \the\fontextraspace \font \NC\NR
+ \stoptabulate}
+
+\unexpanded\gdef\module_fonts_show_minimal_baseline#1% to be used in a 10 column tabulate
+ {\setbox\scratchbox\ruledhbox{#1}%
+ \normalexpanded {
+ \NC \ruledhbox{#1}%
+ \NC ->
+ \NC \the\htdp\scratchbox
+ \NC =
+ \NC \the\ht\scratchbox
+ \NC +
+ \NC \the\dp\scratchbox
+ \NC \ifcmpdim\htdp\scratchbox\baselineskip <\or=\or>\fi
+ \NC \the\baselineskip
+ \NC (\ifdim\htdp\scratchbox>\baselineskip not \fi ok)
+ \NC \NR}}
+
+\permanent\protected\gdef\showminimalbaseline
+ {\starttabulate[|l|T|T|T|T|T|T|T|T|T|]
+ \module_fonts_show_minimal_baseline{\hbox to \emwidth{\hss\showstruts\strut\hss}}%
+ \module_fonts_show_minimal_baseline{(/)}%
+ \module_fonts_show_minimal_baseline{\normalstartimath\frac{1}{2}x\normalsuperscript2\normalsubscript3\normalstopimath}
+ \stoptabulate}
+
+\permanent\protected\tolerant\gdef\showfontstrip[#1]%
+ {\bgroup
+ \def\module_fonts_show_strip_a##1##2%
+ {\tttf\string##1}
+ \def\module_fonts_show_strip_b##1##2%
+ {\ruledhbox{\switchtobodyfont[#1]##1{##2}}}
+ \def\module_fonts_show_strip_c##1##2%
+ {\setbox\scratchbox\hbox{\switchtobodyfont[#1]##1{##2}}%
+ \tt\tfx\the\ht\scratchbox}%
+ \def\module_fonts_show_strip_d##1##2%
+ {\setbox\scratchbox\hbox{\switchtobodyfont[#1]##1{##2}}%
+ \tt\tfx\the\wd\scratchbox}%
+ \def\module_fonts_show_strip_indeed##1##2##3%
+ {\NC##2\rm{##3}\NC
+ ##2\ss{##3}\NC
+ ##2\tt{##3}\NC
+ ##2\mathematics{##3}\NC
+ \tttf##1\NR}
+ \starttabulate[|c|c|c|c|c|]
+ \module_fonts_show_strip_indeed\relax\module_fonts_show_strip_a\empty
+ \TB
+ \module_fonts_show_strip_indeed\relax\module_fonts_show_strip_b{xxxx}
+ \module_fonts_show_strip_indeed\relax\module_fonts_show_strip_b{12345}
+ \module_fonts_show_strip_indeed\relax\module_fonts_show_strip_b{(Agw)}
+ \TB
+ \module_fonts_show_strip_indeed{(x height)}\module_fonts_show_strip_c{x}
+ \module_fonts_show_strip_indeed{(m width)}\module_fonts_show_strip_d{m}
+ \stoptabulate
+ \egroup}
+
+%D This is now moved here as there is no reason to have it in the core. Some of
+%D the helpers might move to a more protected namespace.
+
+\newbox\otfcollector
+
+\permanent\protected\gdef\startotfcollecting{\ctxlua{nodes.tracers.steppers.start()}}
+\permanent\protected\gdef\stopotfcollecting {\ctxlua{nodes.tracers.steppers.stop()}}
+\permanent\protected\gdef\resetotfcollecting{\ctxlua{nodes.tracers.steppers.reset()}}
+
+% \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{الضَّرَّ} \page
+% \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{Ù„ÙلّٰهÙ} \page
+
+\permanent\protected\gdef\showotfstepglyphs#1%
+ {\ctxlua{nodes.tracers.steppers.glyphs(\number\otfcollector,#1)}%
+ \unhbox\otfcollector}
+
+\permanent\protected\gdef\otfstepspace
+ {\removeunwantedspaces
+ \hskip.5\emwidth \s!plus .125\emwidth \s!minus .125\emwidth\relax}
+
+\permanent\protected\gdef\otfstepcharcommand#1#2#3% font char class
+ {\otfstepspace
+ \doif{#3}{mark}{\underbar}{U+\hexnumber{#2}}:%
+ \setbox\scratchbox\hbox{\ctxlua{nodes.tracers.fontchar(#1,#2)}}%
+ \ifzeropt\wd\scratchbox
+ \scratchwidth.125\onepoint
+ \scratchdistance\dimexpr(\emwidth/2-\scratchwidth)\relax
+ \kern\scratchdistance
+ \ruledhbox to \scratchwidth{\hss\box\scratchbox\hss}%
+ \kern-\scratchwidth
+ \hskip\scratchdistance
+ \else
+ \ruledhbox{\box\scratchbox}%
+ \fi
+ \otfstepspace}
+
+\permanent\protected\gdef\otfstepfontcommand#1#2#3% id font size
+ {\begingroup
+ \tttf #1: #2 @ \the\dimexpr#3\scaledpoint\relax
+ \endgroup}
+
+\permanent\protected\gdef\otfstepmessagecommand#1#2%
+ {\begingroup
+ \tttf\language\minusone
+ \veryraggedright
+ \forgetparindent
+ \forgeteverypar
+ \hangindent\emwidth
+ \hangafter\plusone
+ \dontleavehmode\detokenize{#1}\removeunwantedspaces
+ \doifsomething{#2}{,\space\detokenize{#2}}\endgraf
+ \endgroup
+ \blank}
+
+\permanent\protected\gdef\showotfstepfont
+ {\ctxlua{nodes.tracers.steppers.font("otfstepfontcommand")}}
+
+\permanent\protected\gdef\showotfstepchars#1%
+ {\ctxlua{nodes.tracers.steppers.codes(#1,"otfstepcharcommand","otfstepspace")}}
+
+\permanent\protected\gdef\showotfstepmessages#1%
+ {\ctxlua{nodes.tracers.steppers.messages(#1,"otfstepmessagecommand",true)}}
+
+\permanent\protected\gdef\showotfstepfeatures
+ {\ctxlua{nodes.tracers.steppers.features()}}
+
+\permanent\protected\gdef\otfnoffeaturesteps
+ {\ctxlua{nodes.tracers.steppers.nofsteps()}}
+
+\newconstant\showotfstepsmode \showotfstepsmode\plusfour
+
+\protected\gdef\showotfsteps_n
+ {\blank
+ \begingroup
+ \advance\leftskip6\emwidth
+ \showotfstepmessages\recurselevel
+ \par
+ \endgroup
+ \blank
+ \dontleavehmode
+ \hbox to \hsize \bgroup
+ \hbox to 6\emwidth \bgroup
+ \bf
+ \ifnum\recurselevel=\scratchcounter result\else step \recurselevel\fi
+ \hss
+ \egroup
+ \vtop \bgroup
+ \hsize\dimexpr\hsize-6\emwidth\relax
+ \resetallattributes
+ \lefttoright
+ \dontleavehmode
+ \ifnum\recurselevel=\scratchcounter
+ \ruledhbox{\box\otfcompositionbox}%
+ \else
+ \ruledhbox{\showotfstepglyphs\recurselevel}%
+ \fi
+ \quad
+ \showotfstepchars\recurselevel
+ \hfill
+ \par
+ \egroup
+ \egroup
+ \blank}
+
+\permanent\protected\gdef\showotfsteps
+ {\begingroup
+ \veryraggedright
+ \forgetparindent
+ \forgeteverypar
+ \tt
+ \lefttoright
+ \hbox to \hsize \bgroup
+ \hbox to 6\emwidth{\bf font\hss}%
+ \vtop \bgroup
+ \hsize\dimexpr\hsize-6\emwidth\relax
+ \language\minusone
+ \bf
+ \showotfstepfont
+ \egroup
+ \egroup
+ \blank
+ \hbox to \hsize \bgroup
+ \hbox to 6\emwidth{\bf features\hss}%
+ \vtop \bgroup
+ \hsize\dimexpr\hsize-6\emwidth\relax
+ \language\minusone
+ \showotfstepfeatures
+ \egroup
+ \egroup
+ \blank
+ \scratchcounter\otfnoffeaturesteps\relax
+ \dorecurse\scratchcounter
+ {\ifcase\showotfstepsmode
+ \or % 1 = only first
+ \ifnum\recurselevel=\plusone
+ \showotfsteps_n
+ \fi
+ \or % 2 = only last
+ \ifnum\recurselevel=\scratchcounter
+ \showotfsteps_n
+ \fi
+ \or % 3 = first and last
+ \ifnum\recurselevel=\plusone
+ \showotfsteps_n
+ \orelse\ifnum\recurselevel=\scratchcounter
+ \showotfsteps_n
+ \fi
+ \else % everything
+ \showotfsteps_n
+ \fi}%
+ \endgroup}
+
+\permanent\protected\gdef\startotfsample
+ {\enabletrackers[otf.sample.silent]% beware, kind of global
+ \startotfcollecting
+ \begingroup
+ \veryraggedright
+ \forgetparindent
+ \forgeteverypar}
+
+\permanent\protected\gdef\stopotfsample
+ {\endgroup
+ \stopotfcollecting
+ \disabletrackers[otf.sample]% beware, kind of global: otf.sample
+ \showotfsteps
+ \resetotfcollecting}
+
+\newbox\otfcompositionbox
+
+% this should go in spac-ali:
+
+\installcorenamespace{otfcompositiondir}
+
+\gletcsname\??otfcompositiondir -1\endcsname\righttoleft
+\gletcsname\??otfcompositiondir r2l\endcsname\righttoleft
+\gletcsname\??otfcompositiondir l2r\endcsname\lefttoright
+\gletcsname\??otfcompositiondir +1\endcsname\lefttoright
+\gletcsname\??otfcompositiondir 1\endcsname\lefttoright
+
+\permanent\protected\gdef\setotfcompositiondirection#1%
+ {\begincsname\??otfcompositiondir#1\endcsname}
+
+\permanent\protected\gdef\showotfcomposition#1#2#3% {font*features at size}, rl=-1, text
+ {\begingroup
+ \forgetparindent
+ \forgeteverypar
+ % \setupcolors[\c!state=\v!start]%
+ \setupalign[\v!verytolerant,\v!flushleft]%
+ \startotfsample
+ \nohyphens
+ \global\setbox\otfcompositionbox\hbox{\definedfont[#1]\relax\setotfcompositiondirection{#2}\relax#3}%
+ \stopotfsample
+ \endgroup}
+
+%D \startbuffer
+%D \startotfcompositionlist{Serif*default @ 11pt}{l2r}%
+%D \showotfcompositionsample{effe}
+%D \stopotfcompositionlist
+%D \stopbuffer
+%D
+%D \typebuffer \getbuffer
+
+\permanent\protected\gdef\showotfcompositionlist#1#2#3%
+ {\begingroup
+ \definedfont[#1]%
+ \setbox\scratchbox\hbox\bgroup
+ \setotfcompositiondirection{#2}%
+ #3%
+ \egroup
+ \strut
+ \def|##1|{\kern\onepoint\string|\kern\onepoint##1\kern\onepoint\string|\kern\onepoint}%
+ \cldcontext{nodes.listtoutf(tex.box[\number\scratchbox].list,"{\\kern\\onepoint}",true)}%
+ \endgroup}
+
+\mutable\glet\showotfcompositionsample\gobbleoneargument
+
+\permanent\protected\gdef\startotfcompositionlist#1#2#3\stopotfcompositionlist
+ {\begingroup
+ \protected\def\showotfcompositionsample##1%
+ {\NC\type{##1}%
+ \NC\showotfcompositionlist{Mono}{#2}{##1}%
+ \NC\showotfcompositionlist{#1}{#2}{##1}%
+ \NC\definedfont[#1]##1%
+ \NC\NR}%
+ \starttabulate[|||||]%
+ #3%
+ \stoptabulate
+ \endgroup}
+
+\aliased\glet\stopotfcompositionlist\relax
+
+%D Till here.
+
+\permanent\protected\def\showbodyfontstate
+ {\dontleavehmode
+ \start
+ \infofont
+ [fontclass: \fontclass,\space
+ fontbody: \fontbody ,\space
+ fontface: \fontface ,\space
+ fontsize: \fontsize ]%
+ \stop}
+
+\protect
+
+\continueifinputfile{s-fonts-show.mkxl}
+
+\setupwhitespace[big]
+
+\dontcomplain
+
+\starttext
+
+\startsubject[title=\type{\showkerning}]
+ \showkerning{Just a small sentence with hopefully some kerns.}
+\stopsubject
+
+\startsubject[title=\type{\showcharratio}]
+ \showcharratio{testg}
+\stopsubject
+
+\startsubject[title=\type{\showfontparameters}]
+ \showfontparameters
+\stopsubject
+
+\startsubject[title=\type{\showminimalbaseline}]
+ \showminimalbaseline
+\stopsubject
+
+\startsubject[title=\type{\showfontstrip}]
+ \showfontstrip
+\stopsubject
+
+\startsubject[title=\type{\showbodyfont}]
+ \showbodyfont
+\stopsubject
+
+\startsubject[title=\type{\showbodyfontenvironment}]
+ \showbodyfontenvironment
+\stopsubject
+
+\startsubject[title=\type{\showligature}]
+ \showligature{fi}
+ \showligature{fx}
+\stopsubject
+
+\startsubject[title=\type{\showligatures}]
+ \showligatures
+\stopsubject
+
+\startsubject[title=\type{\showfontstyle}]
+ \showfontstyle[][rm][tf][all]
+\stopsubject
+
+\startsubject[title=\type{\showfont}]
+ \showfont
+\stopsubject
+
+\startsubject[title=\type{\showbodyfontstate}]
+ \showbodyfontstate
+\stopsubject
+
+\page
+
+\startsubject[title=\type{\showotfcomposition}]
+ \showotfcomposition{arabtype*arabic at 48pt}{-1}{الضَّرَّ}
+ \page
+ \showotfcomposition{arabtype*arabic at 48pt}{-1}{Ù„ÙلّٰهÙ}
+ \page
+\stopsubject
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkxl/s-layout-show.mkxl b/Master/texmf-dist/tex/context/modules/mkxl/s-layout-show.mkxl
new file mode 100644
index 00000000000..95a6d3371c1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkxl/s-layout-show.mkxl
@@ -0,0 +1,243 @@
+%D \module
+%D [ file=page-run,
+%D version=2000.10.20,
+%D title=\CONTEXT\ Page Macros,
+%D subtitle=Runtime Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Page Macros / Runtime Macros}
+
+\registerctxluafile{page-run}{} % maybe rename this one
+
+\unprotect
+
+\permanent\protected\tolerant\gdef\showprint[#1]#*[#2]#*[#3]% only english
+ {\setbuffer[crap]%
+ \unprotect
+ \definepapersize[X][\c!width=4em, \c!height=6em]
+ \definepapersize[Y][\c!width=12em,\c!height=14em]
+ \setuppapersize[X,#1][Y,#2]
+ \setuplayout[#3]
+ \setuplayout[\v!page]
+ \framed
+ [\c!offset=\v!overlay,\c!strut=\v!no,
+ \c!width=\paperwidth,\c!height=\paperheight]
+ {\ss ABC\par DEF}%
+ \protect
+ \endbuffer
+ \framed[\c!offset=\v!overlay,\c!strut=\v!no]{\typesetbuffer[crap]}}
+
+% \switchtobodyfont[8pt]
+%
+% \startcombination[4*4]
+% {\showprint} {\strut}
+% {\showprint[][][location=middle]} {\type{location=middle}}
+% {\showprint[][][location=middle,marking=on]} {\type{markering=aan}\break\type{location=middle}}
+% {\showprint[][][location=middle,marking=on,nx=2]} {\type{markering=aan}\break\type{location=middle}\break\type{nx=2}}
+% {\showprint[][][location=left]} {\type{location=left}}
+% {\showprint[][][location=right]} {\type{location=right}}
+% {\showprint[][][location={left,bottom}]} {\type{location={left,bottom}}}
+% {\showprint[][][location={right,bottom}]} {\type{location={right,bottom}}}
+% {\showprint[][][nx=2,ny=1]} {\type{nx=2,ny=1}}
+% {\showprint[][][nx=1,ny=2]} {\type{nx=1,ny=2}}
+% {\showprint[][][nx=2,ny=2]} {\type{nx=2,ny=2}}
+% {\showprint[][][nx=2,ny=2,location=middle]} {\type{nx=2,ny=2}\break\type{location=middle}}
+% {\showprint[][][backoffset=3pt]} {\type{rugoffset=.5cm}}
+% {\showprint[][][topoffset=3pt]} {\type{kopoffset=.5cm}}
+% {\showprint[][][scale=1.5]} {\type{schaal=1.5}}
+% {\showprint[][][scale=0.8]} {\type{schaal=0.8}}
+% \stopcombination
+%
+% \startcombination[3*4]
+% {\showprint[landscape][] [location=middle]} {\type{landscape}}
+% {\showprint[] [landscape][location=middle]} {\strut\break\type{landscape}}
+% {\showprint[landscape][landscape][location=middle]} {\type{landscape}\break\type{landscape}}
+% {\showprint[90] [] [location=middle]} {\type{90}}
+% {\showprint[] [90] [location=middle]} {\strut\break\type{90}}
+% {\showprint[90] [90] [location=middle]} {\type{90}\break\type{90}}
+% {\showprint[180] [] [location=middle]} {\type{180}}
+% {\showprint[] [180] [location=middle]} {\strut\break\type{180}}
+% {\showprint[180] [180] [location=middle]} {\type{180}\break\type{180}}
+% {\showprint[mirrored] [] [location=middle]} {\type{mirrored}}
+% {\showprint[] [mirrored] [location=middle]} {\strut\break\type{mirrored}}
+% {\showprint[mirrored] [mirrored] [location=middle]} {\type{mirrored}\break\type{mirrored}}
+% \stopcombination
+
+\permanent\protected\tolerant\gdef\showframe[#1]#*[#2]%
+ {\ifarguments
+ \showframe
+ [\v!top,\v!header,
+ \v!text,
+ \v!footer,\v!bottom]
+ [\v!leftedge,\v!leftmargin,
+ \v!text,
+ \v!rightmargin,\v!rightedge]
+ \or
+ \showframe
+ [\v!header,\v!text,\v!footer]
+ [#1]
+ \or
+ \setupbackgrounds
+ [\v!page]
+ [\c!frame=\v!on,
+ \c!corner=\v!rectangular,
+ \c!frameoffset=\zeropoint,
+ \c!framedepth=\zeropoint,
+ \c!framecolor=layout:page]
+ \setupbackgrounds
+ [#1][#2]
+ [\c!background=,
+ \c!frame=\v!on,
+ \c!corner=\v!rectangular,
+ \c!frameoffset=\zeropoint,
+ \c!framedepth=\zeropoint,
+ \c!framecolor=]
+ \fi
+ \setupbackgrounds
+ [\c!state=\v!repeat]}
+
+\permanent\protected\tolerant\gdef\showsetups[#1]%
+ {\ctxcommand{showlayoutvariables("#1")}}
+
+\permanent\protected\tolerant\gdef\showlayout[#1]%
+ {\ctxcommand{showlayout("#1")}}
+
+\permanent\protected\gdef\showmargins
+ {\starttabulate
+ \NC asynchrone \NC \doifelseoddpage {odd} {even} \NC \NR
+ \NC synchrone \NC \doifelserightpage {right} {left} \NC \NR
+ \NC right margin \NC \the\rightmarginwidth \NC \NR
+ \NC left margin \NC \the\leftmarginwidth \NC \NR
+ \NC outer margin \NC \the\outermarginwidth \NC \NR
+ \NC inner margin \NC \the\innermarginwidth \NC \NR
+ \stoptabulate}
+
+%D Page grids:
+
+\newconstant\c_page_grids_location
+\newconstant\c_page_grids_line_mode
+\newconstant\c_page_grids_lineno_mode
+\newconstant\c_page_grids_columns_mode
+
+\permanent\protected\tolerant\gdef\showgrid[#1]%
+ {\c_page_grids_location \plusone % downward compatible default
+ \c_page_grids_line_mode \plusone
+ \c_page_grids_lineno_mode \plusone
+ \c_page_grids_columns_mode\plusone
+ \processallactionsinset
+ [#1]%
+ [ \v!reset=>\c_page_grids_location \zerocount
+ \c_page_grids_columns_mode\zerocount,
+ \v!bottom=>\c_page_grids_location \plusone,
+ \v!top=>\c_page_grids_location \plustwo,
+ \v!none=>\c_page_grids_line_mode \zerocount,
+ \v!all=>\c_page_grids_line_mode \plusone,
+ \v!lines=>\c_page_grids_line_mode \plustwo,
+ \v!frame=>\c_page_grids_line_mode \plusthree,
+ \v!nonumber=>\c_page_grids_lineno_mode \zerocount,
+ \v!right=>\c_page_grids_lineno_mode \plusone,
+ \v!left=>\c_page_grids_lineno_mode \plustwo,
+ \v!outer=>\c_page_grids_lineno_mode \plusthree,
+ \v!inner=>\c_page_grids_lineno_mode \plusfour,
+ \v!columns=>\c_page_grids_columns_mode\plusone]% new option
+ \ifcase\c_page_grids_location
+ \let\page_grids_add_to_box\gobbleoneargument
+ \else % 1=bottom 2=top
+ \let\page_grids_add_to_box\page_grids_add_to_box_indeed
+ \fi
+ \ifcase\c_page_grids_columns_mode
+ \let\page_grids_add_to_one\gobbleoneargument
+ \let\page_grids_add_to_mix\gobbleoneargument
+ \else
+ \let\page_grids_add_to_one\page_grids_add_to_one_indeed
+ \let\page_grids_add_to_mix\page_grids_add_to_mix_indeed
+ \fi}
+
+% if really needed for speed we can cache the grid
+
+\glet\page_grids_add_to_box\gobbleoneargument
+\glet\page_grids_add_to_one\gobbleoneargument
+\glet\page_grids_add_to_mix\gobbleoneargument
+
+\gdef\page_grids_add_to_box_indeed#1% to be checked for color and layer ..... use mp
+ {\startcolor[layout:grid]%
+ \resetvisualizers
+ \gridboxlinemode \c_page_grids_line_mode
+ \gridboxlinenomode\c_page_grids_lineno_mode
+ \setgridbox\scratchbox\makeupwidth\textheight % todo: check color
+ \global\setbox#1\hpack % global ?
+ {\ifcase\c_page_grids_location\or\or\box#1\hskip-\makeupwidth\fi
+ \begingroup % color
+ \ifcase\layoutcolumns\else
+ \gray
+ \setlayoutcomponentattribute{\v!grid:\v!columns}%
+ \hpack \layoutcomponentboxattribute to \makeupwidth
+ {\dorecurse\layoutcolumns
+ {\hskip\layoutcolumnwidth
+ \ifnum\recurselevel<\layoutcolumns
+ \vrule
+ \s!height\ht\scratchbox
+ \s!depth \dp\scratchbox
+ \s!width \layoutcolumndistance
+ \fi}}%
+ \hskip-\makeupwidth
+ \fi
+ \setlayoutcomponentattribute{\v!grid:\v!lines}%
+ \hpack \layoutcomponentboxattribute{\box\scratchbox}%
+ \endgroup
+ \ifcase\c_page_grids_location\or\hskip-\makeupwidth\box#1\fi}%
+ \stopcolor}
+
+\gdef\page_grids_add_to_one_indeed#1%
+ {\begingroup
+ \resetvisualizers
+ \global\setbox#1\vpack{\noindent\backgroundline[layout:one]{\box#1}}%
+ \endgroup}
+
+\gdef\page_grids_add_to_mix_indeed#1%
+ {\begingroup
+ \resetvisualizers
+ \global\setbox#1\vpack{\noindent\backgroundline[layout:mix]{\box#1}}%
+ \endgroup}
+
+\protect
+
+\continueifinputfile{s-layout-show.mkxl}
+
+\setupwhitespace[big]
+
+\setuphead[section][page=yes]
+
+\starttext
+
+\startsubject[title=\type{\showprint}]
+ \showprint
+\stopsubject
+
+\startsubject[title=\type{\showframe}]
+ \showframe
+\stopsubject
+
+\startsubject[title=\type{\showlayout}]
+ \showlayout
+\stopsubject
+
+\startsubject[title=\type{\showsetups}]
+ \showsetups
+\stopsubject
+
+\startsubject[title=\type{\showmargins}]
+ \showmargins
+\stopsubject
+
+\startsubject[title=\type{\showgrid}]
+ \showgrid
+\stopsubject
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkxl/s-publications-show.mkxl b/Master/texmf-dist/tex/context/modules/mkxl/s-publications-show.mkxl
new file mode 100644
index 00000000000..9f4098489ae
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkxl/s-publications-show.mkxl
@@ -0,0 +1,84 @@
+%D \module
+%D [ file=publ-tra,
+%D version=2013.12.24,
+%D title=\CONTEXT\ Publication Support,
+%D subtitle=Tracing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: make this a runtime module
+% todo: use the module interface
+
+\writestatus{loading}{ConTeXt Publication Support / Tracing}
+
+\registerctxluafile{publ-tra}{}
+
+\unprotect
+
+\permanent\protected\gdef\showbtxdatasetfields {\publ_show_dataset_whatever{showbtxdatasetfields}}
+\permanent\protected\gdef\showbtxdatasetcompleteness{\publ_show_dataset_whatever{showbtxdatasetcompleteness}}
+\permanent\protected\gdef\showbtxdatasetauthors {\publ_show_dataset_whatever{showbtxdatasetauthors}}
+
+\tolerant\gdef\publ_show_dataset_whatever#1[#2]%
+ {\begingroup
+ \letdummyparameter\c!specification\currentbtxspecification
+ \setdummyparameter\c!dataset {\currentbtxdataset}%
+ \letdummyparameter\c!field \empty
+ \ifparameter#2\or
+ \ifhastok={#2}%
+ \getdummyparameters[#2]%
+ \else
+ \setdummyparameter\c!dataset{#2}%
+ \fi
+ \fi
+ \ctxcommand{#1{
+ dataset = "\dummyparameter\c!dataset",
+ specification = "\dummyparameter\c!specification",
+ field = "\dummyparameter\c!field",
+ }}%
+ \endgroup}
+
+\permanent\tolerant\protected\gdef\showbtxfields[#1]%
+ {\begingroup
+ \setdummyparameter\c!rotation{90}%
+ \ifparameter#1\or
+ \ifhastok={#1}%
+ \letdummyparameter\c!specification\currentbtxspecification
+ \getdummyparameters[#1]%
+ \else
+ \setdummyparameter\c!specification{#1}%
+ \fi
+ \else
+ \letdummyparameter\c!specification\currentbtxspecification
+ \fi
+ \ctxcommand{showbtxfields{
+ rotation = "\dummyparameter\c!rotation",
+ specification = "\dummyparameter\c!specification"
+ }}%
+ \endgroup}
+
+\permanent\tolerant\protected\gdef\showbtxtables[#1]%
+ {\begingroup
+ \ctxcommand{showbtxtables{}}%
+ \endgroup}
+
+\permanent\tolerant\protected\gdef\showbtxhashedauthors[#1]%
+ {\ctxcommand{showbtxhashedauthors{}}}
+
+\protect
+
+\continueifinputfile{s-publications-show.mkxl}
+
+\starttext
+
+ \showbtxfields[rotation=85] \page
+ \showbtxfields[rotation=90] \page
+
+ \showbtxtables \page
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkxl/s-symbols-show.mkxl b/Master/texmf-dist/tex/context/modules/mkxl/s-symbols-show.mkxl
new file mode 100644
index 00000000000..37d42fe0079
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkxl/s-symbols-show.mkxl
@@ -0,0 +1,110 @@
+%D \module
+%D [ file=symb-run,
+%D version=2010.12.08, % 1998.07.20,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Runtime Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: implementor
+
+\startluacode
+ function commands.showsymbolset(collection,symbols,fontid)
+ if type(symbols) == "string" then
+ symbols = utilities.parsers.settings_to_array(symbols)
+ end
+ local options = { framecolor = "orange", rulethickness = ".8pt", offset = interfaces.variables.overlay }
+ local list = table.tohash(symbols)
+ local alsofont = fontid > 0
+ local defined = #symbols > 0
+ local byname = false
+ if alsofont then
+ local is_symbol = characters.is_symbol
+ local chardata = characters.data
+ local resources = fonts.hashes.resources [fontid]
+ local characters = fonts.hashes.characters[fontid]
+ if resources and characters then
+ local unicodes = resources.unicodes
+ if unicodes then
+ for name, unicode in next, unicodes do
+ if not list[name] and name ~= ".notdef" then
+ local c = rawget(chardata,unicode)
+ if not c or is_symbol[c.category] then
+ list[name] = false
+ byname = true
+ end
+ end
+ end
+ end
+ end
+ end
+ local detail = defined and byname
+ context.start()
+ context.setupsymbolset { collection }
+ context.starttabulate { detail and "|lT|l|l|lT|" or "|lT|l|l|"}
+ for symbol, how in table.sortedhash(list) do
+ if detail and how then
+ context.BC()
+ else
+ context.NC()
+ end
+ context(symbol)
+ context.NC()
+ context.symbol(symbol)
+ context.NC()
+ context.framed(options,context.nested.symbol(symbol))
+ if detail and how then
+ context.BC()
+ context("defined")
+ else
+ context.NC()
+ end
+ context.NC()
+ context.NR()
+ end
+ context.stoptabulate()
+ context.stop()
+ end
+\stopluacode
+
+\unprotect
+
+\permanent\protected\tolerant\gdef\showsymbolset[#1]%
+ {\begingroup
+ \edef\p_font{\begincsname\??symboldefault#1\endcsname}%
+ \begingroup
+ \ifx\p_font\empty
+ \global\globalscratchcounter\zerocount
+ \else
+ \definedfont[\p_font]%
+ \global\globalscratchcounter\fontid\font\relax
+ \fi
+ \endgroup
+ \ctxcommand {
+ showsymbolset (
+ "#1",
+ "\symbolset{#1}",
+ \the\globalscratchcounter
+ ) }%
+ \endgroup}
+
+\protect
+
+\continueifinputfile{s-symbols-show.mkxl}
+
+\usesymbols[cc]
+
+\starttext
+
+ \showsymbolset[cc]
+
+ \symbol[cc][cc-by-sa-nc]
+
+\stoptext
+
+
diff --git a/Master/texmf-dist/tex/context/patterns/common/lang-eo.rme b/Master/texmf-dist/tex/context/patterns/common/lang-eo.rme
new file mode 100644
index 00000000000..fff218f7178
--- /dev/null
+++ b/Master/texmf-dist/tex/context/patterns/common/lang-eo.rme
@@ -0,0 +1,3 @@
+% generated by mtxrun --script pattern --convert
+
+% no comment \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/patterns/common/lang-sr.rme b/Master/texmf-dist/tex/context/patterns/common/lang-sr.rme
index fff218f7178..b97ed04b1b6 100644
--- a/Master/texmf-dist/tex/context/patterns/common/lang-sr.rme
+++ b/Master/texmf-dist/tex/context/patterns/common/lang-sr.rme
@@ -1,3 +1,6 @@
% generated by mtxrun --script pattern --convert
-% no comment \ No newline at end of file
+
+
+
+
diff --git a/Master/texmf-dist/tex/context/patterns/mkii/lang-ala.pat b/Master/texmf-dist/tex/context/patterns/mkii/lang-ala.pat
index 772b8be81b2..63aff72e3d5 100644
--- a/Master/texmf-dist/tex/context/patterns/mkii/lang-ala.pat
+++ b/Master/texmf-dist/tex/context/patterns/mkii/lang-ala.pat
@@ -2,746 +2,26082 @@
% for comment and copyright, see lang-ala.rme
-% used: a b c d e f g h i k l m n o p q r s t u x y z
+% used: a b c d e f g h i j l m n o p q r s t u v x y z á æ é í ó ú ý Ä Äƒ Ä“ Ä• Ä« Ä­ Å Å Å“ Å« Å­ Ç£ ǽ ȳ Ì Ì„ ̆ Íž Í¡
\patterns{
-.a2b3l
-.anti1
-.anti3m2n
-.ari3s2to
-.circu2m1
-.co2n1iun
-.e2x3
-.exs2t
-.para1i
-.para1u
-.peri1
-.quin2c3un
-.su2b3lu
-.su2b3r
-.s2
-2s3que.
-2s3dem.
-.sta3g2n
-3p2sic
-3p2neu
-3ne.
-2sne.
-a1ua
-a1ue
-a1ui
-a1uo
-a1uu
-e1ua
-e1ue
-e1ui
-e1u2o
-e1uu
-i1ua
-i1ue
-i1ui
-i1uo
-i1uu
-o1ua
-o1ue
-o1ui
-o1uo
-o1uu
-u1ua
-u1ue
-u1ui
-u1iu
-u2iua
-u2iue
-u2iui
-u2iuo
-u1uo
-u3u2u
-a2l3ua
-a2l3ue
-a2l3ui
-a2l3uo
-a2l3uu
-e2l3ue
-i2l3ua
-i2l3ue
-i2l3ui
-i2l3uo
-i2l3uu
-o2l3ua
-o2l3ue
-o2l3ui
-o2l3uo
-o2l3uu
-u2l3ua
-u2l3uo
-u2l3uu
-a1a
-e1e
-e1a
-e1o
-i3i
-o1o
-ui1a
-a1is
-cu3
-a1ia
+.ab1
+.aba2
+.ab3a4u
+.aba4v
+.ab3áu
+.ab3áv
+.abe4
+.ab3es
+.abé2
+.ab3és
+.abi2
+.ab3i4n
+.ab3is
+.ab3it
+.abi4u
+.abi4v
+.abī2
+.abī4n
+.abÄ«Ì4
+.abí2
+.ab3í4n
+.ab3ís
+.abí4t
+.abo2
+.abó2
+.ab5us
+.ab3ú
+.ad3Ä
+.ad3á
+.adÇ£Ì4
+.adǽ2
+.ade4
+.ad3es
+.ad3Ä“2
+.adÄ“Ì4
+.adé2
+.ad3ér
+.ad3és
+.ad3ib
+.ad3i4c
+.ad3ie
+.ad3ié
+.adi4m
+.ad5i4n
+.ad3i4q
+.ad3is
+.ad5i4t
+.adi4u
+.ad3i4v
+.ad3Ä«4
+.adÄ«Ì4
+.adí4c
+.adí4m
+.ad3í4n
+.ad3í4q
+.ad3ís
+.adí4t
+.ad3í4u
+.ad3í4v
+.ad6ora.
+.ad6orane
+.ad6oraq
+.ad6oraue.
+.ad6orave.
+.ad5ÅÌro
+.ad5ÅÌ6rÅ
+.ad6ó6ra.
+.adó4ro
+.adú2
+.ae2a
+.ae2ă3
+.ae4st
+.ae5te
+.ag2n
+.aī3b
+.aÄ«Ì3b
+.aí2
+.aí3b
+.am4b3Ä“
+.am4bi.
+.am4b5i4n
+.am4b5i4q
+.am6b5is.
+.am6b5isn
+.am6b5isq
+.am6b5isu
+.am6b5isv
+.ambi6ue
+.amb6iui.
+.amb6iuin
+.amb6iuiq
+.amb6iuiu
+.amb6iuín
+.amb6iuíq
+.amb6iuíu
+.ambi6ve
+.amb6ivi.
+.amb6ivin
+.amb6iviq
+.amb6iviv
+.amb6ivín
+.amb6ivíq
+.amb6ivív
+.ambī4n
+.ambÄ«Ì6n
+.am4b5í4n
+.am4bí4q
+.am4b5ís
+.am6bí6ue
+.am6bí6ve
+.am4b3ú
+.an6t5ea.
+.ante5i4
+.ante5í4
+.as4ce
+.as4cé
+.as4ta
+.as4tá
+.as4te
+.as4té
+.as4to
+.as4tÅ
+.as4tó
+.as6trar
+.as6trat
+.as4trÄ
+.as6trár
+.as6trás
+.as4tru
+.as4trū
+.ate2
+.atē2
+.a͞e4ă
+.aÍže4s5t
+.a͡e4ă
+.a͡e4s5t
+.aÍ¡Ìe4s5
+.Äg2
+.ÄÌ2
+.ÄÌg2
+.ÄÌ4l
+.ÄÌ4t
+.ăbă2
+.ăbă4u
+.ăbă4v
+.ăbĕ4
+.ăbÄ•Ì4
+.ăbī2
+.ăbī4q
+.ăbÄ«Ì4
+.ăbĭ2
+.ăb3ĭt
+.ăbÄ­Ì4
+.ăbÅÌ4
+.ăd3Ä
+.ăd3á
+.ădæ4
+.ădǣ4
+.ădÇ£Ì4
+.ădǽ4
+.ăd3ē2
+.ădÄ“Ì4
+.ădĕ4
+.ădÄ•Ì4
+.ăd3ī4
+.ădÄ«Ì4
+.ăd3ĭē
+.ăd3ĭĕ
+.ăd3ĭī
+.ădĭ4m
+.ăd3ĭ4t
+.ădÄ­Ì4t
+.ăd5ÅÌ6rÅ
+.ăd5ÅÌrÅ
+.ăd3Å­Ì
+.ăī3b
+.ăīÌ3b
+.ăm4b3ē
+.ămbī4q
+.ămbÄ«Ì6q
+.ăm4b5Å­Ì
+.ăs4pĭ
+.ăs4tă
+.ăs4tĭ
+.ăs4tÅ
+.ăs4trÄ
+.ăs4trū
+.ăÌ2
+.ăÌb5ă4u
+.ăÌb5ă4v
+.ăÌb3Ä•4
+.ăÌbÄ­4
+.ăÌb5Ä­t
+.ăÌb3Å
+.ăÌ4c
+.ăÌd3Ä“
+.ăÌd3Ä•4
+.ăÌd3Ä«
+.ăÌd5Ä­Ä“
+.ăÌd5Ä­Ä«
+.ăÌd5Ä­4t
+.ăÌ4g
+.ăÌ4Ä­
+.ăÌ4l
+.ăÌ4r
+.ăÌ4s
+.ăÌs4tÄ
+.ăÌs4tă
+.ăÌs4tÄ•
+.ăÌs4tÅ
+.ăÌ4t
+.áb1
+.ába2
+.áb3a4u
+.áb3a4v
+.áb3e4
+.ábi2
+.áb3is
+.áb3it
+.áb3o
+.ád1
+.áde2
+.ád3es
+.ád3ē
+.ádi2
+.ád3ie
+.ád3is
+.ád3it
+.ád3ī
+.áes3
+.áes5t
+.ág4nit
+.ám4bi.
+.ám4b5is
+.án4ter
+.ás4ta
+.ás4tÄ
+.ás4te
+.ás4to
+.ás4tÅ
+.ás4tru
+.æs3t
+.Ç£s3t
+.Ç£Ì2
+.Ç£Ì4q
+.Ç£Ìs3
+.ǽs3
+.ba3g
+.ba6iane.
+.ba6iáne.
+.ba4ii
+.ba4iī
+.bÄÌ3
+.bá4iī
+.bi3
+.bÄ­1
+.bÄ­3Ä•
+.ca2i
+.cá2i
+.cen3s
+.cēn3s
+.ci6sta
+.ci6sté
+.co3i4
+.co3í4
+.com5Ä“s
+.com5Ä“Ìs
+.co4més
+.co4n5i4c
+.co4ní4c
+.cÅ3Ä­
+.cÅm5Ä“s
+.cÅm5Ä“Ìs
+.cÅm3Ä•
+.cÅ4n5Ä­4c
+.cÅ6n5Ä­Ì6c
+.cÅÌ3Ä­
+.cÅÌ4m3
+.cÅÌmÄ­4
+.cÅÌ6n5Ä­6c
+.có3i
+.có4mit
+.cómi6te
+.có4n5i4c
+.de3d
+.de4met
+.des2
+.de5u4ta
+.de5u4tá
+.de5utí
+.dēs2
+.dē3sc
+.dē3sú
+.dÄ“Ì3i
+.dÄ“Ì5sum
+.dĕ1
+.dĕ3d
+.dÄ•3Å
+.dé3s2
+.di3gé
+.di4r5e4m
+.di4r5é4m
+.dis6cendam
+.dis6cendas
+.dis6cendám
+.dis6cendás
+.dis6cendi
+.dis6cendí
+.dis6cendo.
+.dis6cendon
+.dis6cendoq
+.dis6cendou
+.dis6cendov
+.dis6cendón
+.dis6cendóq
+.dis6cendóu
+.dis6cendóv
+.dis6céndam
+.dis6céndas
+.dis6cénde
+.dis6céndi
+.dis6céndo.
+.di5s6tau
+.di5s6tav
+.dis4tá
+.di5s4tī
+.dī1
+.dīs4t
+.dĭ5s4tă
+.dĭ5s4tī
+.do3l
+.dó3l
+.ed2
+.ed4i
+.ed4o
+.ed4u
+.ei2
+.er2e
+.ere5x4
+.et3i
+.ex3Ä
+.ex3á
+.ex3éq
+.ex3i4
+.ex3Ä«4
+.exÄ«Ì4
+.ex3í4
+.ex5ÅÌr
+.ex3ón
+.ex3u4
+.exū2
+.exÅ«Ì4
+.exú2
+.Ä“s3tÄ­
+.Ä“Ì2
+.Ä•d2
+.Ä•d4Ä­
+.Ä•t3Ä­
+.Ä•x3Ä
+.Ä•x3Ä«4
+.Ä•xÄ«Ì4
+.Ä•x3Ä­2
+.Ä•xÄ­Ì4
+.Ä•x5ÅÌr
+.ĕxū2
+.Ä•xÅ«Ì4
+.Ä•x3Å­
+.Ä•Ì2
+.Ä•Ì4c
+.Ä•Ì4q
+.Ä•Ì4t
+.Ä•Ìt3Ä­
+.Ä•Ìx3Ä«
+.Ä•Ìx3Ä­4
+.Ä•Ìx3Å­
+.ét3e2
+.ét3i
+.éx3eq
+.éx3i2
+.éx3u
+.gé1
+.hemi3
+.hÄ“Ì3
+.hi6ste
+.hi6str
+.hĭ6stĕ
+.ho4s
+.ibe3
+.id3eo
+.id3eÅ
+.id3í
+.id3ue
+.ie3su
+.ié3su
+.ig2
+.ig3ne
+.ig3ni
+.ig3nī
+.ig3ní
+.in1
+.in3a4
+.in3Ä4
+.inÄÌ4
+.iná4
+.in3e4
+.inē2
+.inÄ“Ì4
+.in3é2
+.in3i4
+.inī4
+.inÄ«Ì4
+.in3í4
+.in3o4
+.inó4
+.in3t
+.inte6re6ri
+.inte6re6rí
+.inte6res
+.inte6rés
+.inte6ri.
+.inte6riq
+.inte6ris
+.inte6rí6n
+.inte6rí6q
+.inte6rís
+.inte6rí6t
+.inté6re6ri
+.inté6ri6te
+.inté6ri6ti
+.inté6ri6to.
+.inté6ri6tÅ
+.inu4d
+.in3ue
+.in3ui
+.in3uī
+.in3uí
+.in3us
+.inÅ«Ì4
+.inú4d
+.io3s4
+.io5su
+.ió3s2
+.is5ta
+.is5tÄ
+.is5te
+.is5ti
+.is5tí
+.is3tr
+.Ä«Ì2
+.Ä«Ì4b
+.Ä«Ì4m
+.Ä«Ì4n
+.Ä«Ì4q
+.Ä«Ì4t
+.Ä­d3Ä•Å
+.Ä­g2
+.ĭg3nĕ
+.ĭg3nī
+.Ä­n1
+.Ä­n3Ä4
+.Ä­nÄÌ4
+.Ä­nÄ“Ì4
+.ĭnĕ4
+.Ä­nÄ•Ì4
+.ĭnī4
+.Ä­nÄ«Ì4
+.Ä­n3Ä­2
+.Ä­nÄ­Ì4
+.ĭntĕ6rĭt.
+.ĭntĕ6rĭ6tĕ
+.ĭntĕ6rĭtn
+.Ä­ntÄ•6rÄ­6tÅ.
+.Ä­ntÄ•6rÄ­6tÅn
+.Ä­ntÄ•6rÄ­6tÅq
+.Ä­ntÄ•6rÄ­6tÅu
+.Ä­ntÄ•6rÄ­6tÅv
+.Ä­ntÄ•6rÄ­6tÅÌn
+.Ä­ntÄ•6rÄ­6tÅÌq
+.Ä­ntÄ•6rÄ­6tÅÌu
+.Ä­ntÄ•6rÄ­6tÅÌv
+.ĭntĕ6rĭtq
+.ĭntĕ6rĭtu
+.ĭntĕ6rĭtv
+.Ä­ntÄ•6rÄ­Ì6t
+.Ä­ntÄ•Ì6rÄ•6rÄ­
+.Ä­ntÄ•Ì6rÄ­6tÄ•
+.Ä­ntÄ•Ì6rÄ­6tÅ
+.Ä­nÅ«Ì4
+.Ä­n3Å­s
+.Ä­s5tÄ
+.ĭs5tă
+.ĭs5tĕ
+.Ä­s5tÄ­
+.Ä­Ì2
+.Ä­Ìd5Ä•Å
+.Ä­Ì4n
+.Ä­Ìn3Ä•4
+.Ä­Ìn3Ä­4
+.Ä­Ìn5Å­Ä•
+.Ä­Ìn5Å­Ä«
+.Ä­Ìn5Å­Å
+.íd3eo
+.íd3eÅ
+.íd3ue
+.ín1
+.ín3e2
+.ín3i2
+.ín3t
+.ín3ui
+.jo3s4
+.jo5su
+.jó3s2
+.li4g5n
+.líg3n
+.lí3t
+.ma3ge
+.magnæ6u
+.magnæ6v
+.magnǣ6u
+.magnǣ6v
+.magnÇ£Ì6u
+.magnÇ£Ì6v
+.magnǽ6u
+.magnǽ6v
+.mă3gĕ
+.măgnæ6u
+.măgnæ6v
+.măgnǣ6u
+.măgnǣ6v
+.măgnÇ£Ì6u
+.măgnÇ£Ì6v
+.măgnǽ6u
+.măgnǽ6v
+.mĕ3ĭ
+.mi6sta
+.ne3q
+.ne3s
+.ne5s4c
+.ne5ute
+.ne5uté
+.ne5u4ti
+.ne3xo
+.ne3xÅ
+.nÄ“Ì3
+.nÄ•3xÅ
+.né3s2
+.né5ute
+.no6ste
+.nÅ6stÄ•
+.nu3d
+.nū3d
+.ob3a2
+.obe4r
+.ob3es
+.ob3é2
+.obi2
+.ob3iī
+.ob3i4n
+.ob3iq
+.ob3is
+.obi4u
+.obi4v
+.ob3Ä«4
+.obÄ«Ì4
+.obí4
+.ob3ín
+.ob3íq
+.ob3ís
+.obo2
+.ob3Å
+.obó4r
+.ob3u
+.oc4té
+.os3t
+.ÅÌ2
+.ÅÌ4l
+.ÅÌ4s
+.Åb3Ä«4
+.ÅbÄ«Ì4
+.Åb3Ä­Ä«
+.Åb3Å
+.Åc4t3Ä•
+.ÅÌ2
+.ÅÌb3Ä•
+.ÅÌb3Ä­
+.ÅÌ4l
+.ÅÌ4p
+.ób3i
+.Å“Ì2
+.pa4r5ui
+.pa4r5uí
+.pÄ2r3
+.pá4rui
+.pera4
+.pe4r5an
+.per5ar
+.peras5
+.pe4rÄ
+.per5Är
+.pe6ráeq
+.peræ4q
+.perÇ£Ì4
+.per5Ç£Ìq
+.pe4rǽ4q
+.pere4
+.per5em
+.pe4r5es
+.pe4r5Ä“4
+.perÄ“Ì4
+.peré4
+.pe4r5ém
+.pe4r5és
+.pe4ri.
+.pe6riens
+.per6iere.
+.per6ierene
+.per6iereq
+.per6iereu
+.per6ierev
+.per6ieris
+.per6ierís
+.per6iēn
+.per6iēre
+.per6iÄ“Ìn
+.per6iÄ“Ìre
+.per6iére
+.pe5rille
+.pe5r6illi
+.pe5rillí
+.pe5rimin
+.per6imini
+.per6iminí
+.per5imu
+.pe5r6imur
+.peri6mus
+.pe5rimúr
+.per5i6mús
+.peri4n
+.per5ine
+.pe4r5i4q
+.per6i6re.
+.peri6rem.
+.pe5r6iremi
+.peri6remn
+.peri6remq
+.peri6remue
+.pe5r6iremur
+.peri6remus
+.pe5r6iremúr
+.peri6remús
+.peri6remv
+.per6i6rene
+.peri6rent.
+.peri6rentn
+.peri6rentq
+.peri6rentue
+.pe5r6irentur
+.pe5r6irentú
+.peri6rentv
+.per6i6req
+.pe5r6irer
+.peri6res
+.peri6ret
+.per6iretur
+.per6iretú
+.per6i6reu
+.per6i6rev
+.pe5r6irémi
+.peri6rémn
+.peri6rémq
+.peri6rémue
+.pe5r6irémur
+.peri6rémus
+.peri6rémv
+.peri6réntn
+.peri6réntq
+.peri6réntue
+.pe5r6iréntur
+.peri6réntv
+.pe5r6irér
+.peri6rés
+.peri6rét
+.per6irétur
+.pe5r6iri
+.pe5r6irí
+.pe6ris.
+.pe6risn
+.pe6risq
+.pe6r5isse.
+.pe6r5issem
+.pe6r5issen
+.pe6r5isseq
+.pe6r5isses
+.pe6r5isset
+.pe6r5isseue
+.pe6r5issev
+.pe6r5issém
+.pe6r5issén
+.pe6r5issés
+.pe6r5issét
+.pe6r5isti
+.pe6r5istí
+.pe6risu
+.pe6risv
+.per5it.
+.peri6ta
+.peri6tÄ
+.peri6tá
+.per6i6tæ
+.per6i6tǽ
+.per6i6te
+.peri6ti.
+.peri6tin
+.peri6tiq
+.peri6tis.
+.peri6tisn
+.peri6tisq
+.peri6tisu
+.peri6tisv
+.peri6tiue
+.peri6tiv
+.peri6tín
+.peri6tíq
+.peri6tísn
+.peri6tísq
+.peri6tísu
+.peri6tísv
+.peri6tíu
+.peri6tív
+.per5itn
+.per6i6to.
+.per6i6ton
+.per6i6toq
+.per6itor
+.pe5ritor.
+.pe5ritorn
+.pe5ritorq
+.pe5ritorue
+.peri6torum
+.peri6torú
+.pe5ritorv
+.per6i6tos
+.peri6tot
+.per6i6tou
+.per6i6tov
+.per6i6tón
+.per6i6tóq
+.per6itór
+.pe5ritórn
+.pe5ritórq
+.pe5ritórue
+.peri6tórum
+.pe5ritórv
+.per6i6tós
+.peri6tót
+.per6i6tóu
+.per6i6tóv
+.per5itq
+.per6i6tu
+.per7itue
+.peri6tū
+.per6i6tú
+.per5itv
+.peri4u
+.per7iue
+.per5i4v
+.pe4rī.
+.pe6r5Ä«6mus
+.pe6r5ī6mús
+.per5Ä«4n
+.pe4r5Ä«4q
+.pe6r6Ä«6re.
+.pe6rī6rem
+.pe6r6Ä«6rene
+.pe6rī6rent.
+.pe6rī6rentn
+.pe6rī6rentq
+.pe6rī6rentue
+.per6Ä«rentur
+.per6īrentú
+.pe6rī6rentv
+.pe6r6Ä«6req
+.per6Ä«rer
+.pe6rī6ret
+.pe6r6Ä«6reu
+.pe6r6Ä«6rev
+.per6īrēmi
+.per6īrēmur
+.pe6rī6rēmus
+.per6īrēmúr
+.pe6rī6rēmús
+.per6īrēr
+.pe6rī6rēs
+.pe6rī6rēt
+.per6īrētu
+.per6īrētú
+.per6Ä«rÄ“Ìmi
+.per6Ä«rÄ“Ìmur
+.pe6rÄ«6rÄ“Ìmus
+.per6Ä«rÄ“Ìr
+.pe6rÄ«6rÄ“Ìs
+.pe6rÄ«6rÄ“Ìt
+.per6Ä«rÄ“Ìtu
+.pe6rī6rém
+.pe6rī6réntn
+.pe6rī6réntq
+.pe6rī6réntue
+.per6īréntur
+.pe6rī6réntv
+.per6īrér
+.pe6rī6rét
+.per6Ä«ri
+.per6īrī
+.per6īrí
+.pe4r5Ä«s
+.pe6rī6te
+.pe6r5Ä«6tis.
+.pe6r5Ä«6tisn
+.pe6r5Ä«6tisq
+.pe6r5Ä«6tisu
+.pe6r5Ä«6tisv
+.pe6r5ī6tísn
+.pe6r5ī6tísq
+.pe6r5ī6tísu
+.pe6r5ī6tísv
+.pe6rÄ«6tÅ.
+.pe6rÄ«6tÅn
+.pe6rÄ«6tÅq
+.pe6r5Ä«6tÅt
+.pe6rÄ«6tÅu
+.pe6rÄ«6tÅv
+.pe6rÄ«6tÅÌn
+.pe6rÄ«6tÅÌq
+.pe6r5Ä«6tÅÌt
+.pe6rÄ«6tÅÌu
+.pe6rÄ«6tÅÌv
+.pe6rī6tur
+.pe6rī6túr
+.pe4r5Ä«4u
+.pe4r5Ä«4v
+.pe6r5Ä«Ì6mus
+.pe6r5Ä«Ì6n
+.pe6r5Ä«Ì6q
+.pe6r6Ä«Ì6re.
+.pe6rÄ«Ì6rem
+.pe6rÄ«Ì6ren
+.per6Ä«Ìrene
+.pe6r6Ä«Ì6req
+.per6Ä«Ìrer
+.pe6rÄ«Ì6ret
+.pe6r6Ä«Ì6reu
+.pe6r6Ä«Ì6rev
+.pe6rÄ«Ì6rÄ“
+.per6Ä«Ìri
+.per6Ä«ÌrÄ«
+.pe6rÄ«Ìs
+.pe6rÄ«Ì6te
+.pe6r5Ä«Ì6tis
+.pe6rÄ«Ì6tÅ.
+.pe6rÄ«Ì6tur
+.pe6rÄ«Ì6u
+.pe6rÄ«Ì6v
+.pe4ríe
+.pe5ríl
+.per6ímin
+.pe6r5í6mus
+.perí4n
+.pe6r5íne
+.pe4r5í4q
+.pe6r6í6re.
+.pe6rí6rem
+.pe6rí6ren
+.per6írene
+.pe6r6í6req
+.per6írer
+.pe6rí6res
+.pe6rí6ret
+.pe6r6í6reu
+.pe6r6í6rev
+.per6íri
+.pe6rísn
+.pe6rísq
+.pe6r5íss
+.pe6r5ísti
+.pe6rísu
+.pe6rísv
+.pe6rí6tan
+.pe6rí6taq
+.pe6rí6tau
+.pe6rí6tav
+.pe6rí6te
+.pe6rí6tis
+.pe6r5ítn
+.pe6rí6to.
+.pe6r5ítq
+.pe6r5ítue
+.pe6rítur
+.pe6r5ítv
+.pe4rí4u
+.pe4rí4v
+.per5os
+.per3Å
+.pe4rór
+.pe4rós
+.pē4nī
+.pÄ“Ì3i
+.pÄ•4r3Ä
+.pĕ4r3ă
+.pĕrăs5
+.pĕ6r5áeq
+.pĕræ4
+.pĕrǣ4
+.pÄ•rÇ£Ì4
+.pÄ•r5Ç£Ìq
+.pĕrǽ4
+.pĕ4r5ǽq
+.pĕ4r5ē4
+.pÄ•rÄ“Ì4
+.pÄ•4rÄ•Ä
+.pĕ4rĕă
+.pĕ4r5ĕm
+.pÄ•4r5Ä•Å
+.pÄ•6r5Ä•Ìm
+.pĕ4rī.
+.pĕ6r5ī6mŭs
+.pÄ•6r5Ä«6mÅ­Ìs
+.pĕr5ī4n
+.pĕ4r5ī4q
+.pĕ6r5ī6rēmŭs
+.pÄ•6r5Ä«6rÄ“mÅ­Ìs
+.pĕ6r5ī6rēs
+.pĕ6rī6rēt
+.pĕr5īrētĭ
+.pÄ•6r5Ä«6rÄ“ÌmÅ­s
+.pÄ•6r5Ä«6rÄ“Ìs
+.pÄ•6rÄ«6rÄ“Ìt
+.pÄ•r5Ä«rÄ“ÌtÄ­
+.pĕ6rī6rĕ.
+.pĕ6r5ī6rĕm
+.pĕ6rī6rĕnĕ
+.pĕ6r5ī6rĕnt.
+.pĕ6r5ī6rĕntn
+.pĕ6r5ī6rĕntq
+.pĕ6r5ī6rĕntu
+.pĕ6r5ī6rĕntv
+.pĕ6rī6rĕq
+.pĕ6r5ī6rĕt
+.pĕ6rī6rĕu
+.pĕ6rī6rĕv
+.pÄ•6r5Ä«6rÄ•Ìm
+.pÄ•6r5Ä«6rÄ•Ìntn
+.pÄ•6r5Ä«6rÄ•Ìntq
+.pÄ•6r5Ä«6rÄ•Ìntu
+.pÄ•6r5Ä«6rÄ•Ìntv
+.pÄ•6r5Ä«6rÄ•Ìt
+.pĕ4r5īs
+.pĕ6rī6tĕ
+.pĕ6r5ī6tĭs.
+.pĕ6r5ī6tĭsn
+.pĕ6r5ī6tĭsq
+.pĕ6r5ī6tĭsu
+.pĕ6r5ī6tĭsv
+.pÄ•6r5Ä«6tÄ­Ìsn
+.pÄ•6r5Ä«6tÄ­Ìsq
+.pÄ•6r5Ä«6tÄ­Ìsu
+.pÄ•6r5Ä«6tÄ­Ìsv
+.pÄ•6rÄ«6tÅ.
+.pÄ•6rÄ«6tÅn
+.pÄ•6rÄ«6tÅq
+.pÄ•6r5Ä«6tÅt
+.pÄ•6rÄ«6tÅu
+.pÄ•6rÄ«6tÅv
+.pÄ•6rÄ«6tÅÌn
+.pÄ•6rÄ«6tÅÌq
+.pÄ•6r5Ä«6tÅÌt
+.pÄ•6rÄ«6tÅÌu
+.pÄ•6rÄ«6tÅÌv
+.pĕ6rī6tŭr
+.pÄ•6rÄ«6tÅ­Ìr
+.pĕ4r5ī4u
+.pĕ4r5ī4v
+.pÄ•6r5Ä«Ì6mÅ­s
+.pÄ•6r5Ä«Ì6n
+.pÄ•6r5Ä«Ì6q
+.pÄ•6r5Ä«Ì6rÄ“
+.pÄ•6rÄ«Ì6rÄ•.
+.pÄ•6r5Ä«Ì6rÄ•m
+.pÄ•6rÄ«Ì6rÄ•n
+.pÄ•r5Ä«ÌrÄ•nt
+.pÄ•6rÄ«Ì6rÄ•q
+.pÄ•6r5Ä«Ì6rÄ•t
+.pÄ•6rÄ«Ì6rÄ•u
+.pÄ•6rÄ«Ì6rÄ•v
+.pÄ•6r5Ä«Ìs
+.pÄ•6rÄ«Ì6tÄ•
+.pÄ•6r5Ä«Ì6tÄ­s
+.pÄ•6rÄ«Ì6tÅ.
+.pÄ•6rÄ«Ì6tÅ­r
+.pÄ•6r5Ä«Ì6u
+.pÄ•6r5Ä«Ì6v
+.pĕ6rĭēn
+.pĕ6rĭērĕ
+.pĕ6r5ĭērŭ
+.pÄ•6rÄ­Ä“Ìn
+.pÄ•6rÄ­Ä“ÌrÄ•
+.pÄ•6r5Ä­Ä“ÌrÅ­
+.pĕ6r5ĭĕr
+.pÄ•6r5Ä­Ä•Ìr
+.pĕ4r5ĭī
+.pĕr5ĭmŭ
+.pĕrĭ4t
+.pĕ6r5ĭt.
+.pÄ•6r5Ä­tÄ
+.pĕ6rĭtĕ
+.pĕ6r5ĭtn
+.pĕ6r5ĭtq
+.pĕ6r5ĭtu
+.pĕ6r5ĭtū
+.pĕ6r5ĭtv
+.pÄ•6r5Ä­ÌÄ•
+.pÄ•6r5Ä­Ìt
+.pÄ•r3Å
+.pÄ•Ì4r5Ä•
+.pÄ•Ì6rÄ­Ä“
+.pÄ•Ì6r5Ä­Ä«
+.pÄ•Ì6r5Ä­6t
+.pé3i
+.pé2r
+.pér3e
+.pér5ii
+.pér5iī
+.pér5i4t
+.pi6str
+.po6te6ris
+.po6te6rís
+.po6tes.
+.po6tesn
+.po6tesq
+.po6tesu
+.po6tesv
+.po4tés
+.pó4tes
+.pule5i
+.pulé3
+.ra3d4
+.radi5c
+.ra3i
+.ra3m
+.ra5ra
+.ra5rá
+.ras5t
+.ra6ste
+.rÄ6ste
+.rÄ6stÄ•
+.rÄÌ6st
+.rá3i
+.ræ3
+.re1
+.re5dam.
+.re5damq
+.re5damu
+.re5damv
+.re5das
+.red3e4
+.red3Ä“
+.re4dé
+.re4di.
+.re4d5ie
+.re4d5iē
+.re4d5ié
+.re4d5ií
+.re4d5i4m
+.red5i4n
+.re4d5i4q
+.re6dis.
+.re6disn
+.re6disq
+.red5iss
+.red5ist
+.re6disu
+.re6disv
+.re4d5i4t
+.re4di6u
+.red5iue
+.redi6v
+.red5ive
+.re4dī.
+.red5Ä«4m
+.re4d5Ä«4n
+.re4d5Ä«4q
+.red5Ä«4t
+.redī6u
+.redī6v
+.red5Ä«Ì6m
+.re6d5Ä«Ì6n
+.re6d5Ä«Ì6q
+.red5Ä«Ìs
+.red5Ä«Ì6t
+.re6d5Ä«Ì6u
+.re6d5Ä«Ì6v
+.re4d5í4m
+.re4d5í4n
+.re4d5í4q
+.re6dísn
+.re6dísq
+.red5íss
+.red5íst
+.re6dísu
+.re6dísv
+.re4d5í4t
+.re4d5í4u
+.re4d5í4v
+.re3Å
+.re3ó
+.res4tÅ
+.rex2
+.re5xi
+.rĕ1
+.rĕd3ē
+.rĕ4dĕ
+.rĕ4dī.
+.rĕd5ī4m
+.rĕ4d5ī4n
+.rĕ4d5ī4q
+.rĕd5ī4t
+.rĕdī6u
+.rĕdī6v
+.rÄ•d5Ä«Ì6m
+.rÄ•6d5Ä«Ì6n
+.rÄ•6d5Ä«Ì6q
+.rÄ•d5Ä«Ìs
+.rÄ•d5Ä«Ì6t
+.rÄ•6d5Ä«Ì6u
+.rÄ•6d5Ä«Ì6v
+.rĕdĭ4
+.rĕ4d5ĭē
+.rĕ4d5ĭĕ
+.rĕd5ĭm
+.rĕ4d5ĭt
+.rÄ•dÄ­Ì4
+.rÄ•d5Ä­Ìt
+.rÄ•3Å
+.rÄ•5s4tÅ
+.rÄ•Ì4d5Ä­4
+.rÄ•Ì3q
+.rÄ•Ìs6tÄ“
+.rÄ•Ìs6tÄ•m
+.rÄ•Ì5s6tÅ
+.ré4d3i4
+.rés6tem
+.rés6tes
+.rés4tē
+.ré5s4to
+.ré5s4tÅ
+.ré5str
+.ris2
+.ro3b2
+.ro3d4
+.ro5di
+.rodi5u
+.rodi5v
+.ro4s3t
+.rÅ3d4
+.rÅ5dÄ«
+.rÅdÄ«5u
+.rÅdÄ«5v
+.ru3r
+.ru4s
+.sa3mu
+.sá3mu
+.se3i
+.se6mis.
+.se6misn
+.se6misq
+.se6misue
+.se6misv
+.se6mísn
+.se6mísq
+.se6mísu
+.se6mísv
+.se3ps
+.sē3i
+.sē3p2
+.sÄ“Ì3i
+.sÄ“Ì3p4
+.sé3i
+.sé4mis
+.sé3ps
+.sér4ui
+.sér4uī
+.si4lu
+.sil5ui
+.sil5uī
+.sil5uí
+.si6str
+.sí4lui
+.sí4luī
+.supe6ris
+.supé6r5is
+.te4ia
+.te4iá
+.te4ie
+.te4ii
+.te4ií
+.te4io
+.te4ió
+.te4iú
+.te3n4u
+.te3ra
+.te5r4e
+.te5rim
+.te5rin
+.te5r6it
+.teri5tur
+.te5ri5ue
+.te5ri5v
+.te5rī
+.terī5u
+.terī5v
+.te3ro
+.te3rÅ
+.te5runt
+.tē2i
+.tĕ5rĕ
+.tĕrĕ5r
+.tĕ5rī
+.tĕrī5u
+.tĕrī5v
+.tĕ3rŭ
+.té3n4u
+.té5r4e
+.té3rī
+.tran5s6ue.
+.trÄn5s6ue.
+.trÄn5s6uÄ•.
+.trÄÌn5s6ue.
+.trÄÌn5s6uÄ•.
+.trán5s6ue.
+.tro4ii
+.tro4ií
+.tro4i5q
+.tro6iue
+.tro4iv
+.tro4í
+.troí5u
+.troí5v
+.ub2
+.ubī3q
+.ubÄ«Ì3
+.ueni4
+.ue4ni.
+.ue6niens
+.ue6n5ier
+.ue6niéns
+.ue6n5iér
+.ue4nim
+.ue4nin
+.ue4niq
+.ue4nir
+.ue4nis
+.ue4nit
+.ue6niue
+.ue4ní4
+.uen5íe
+.ue6ste
+.uē4nit
+.uē4nī4
+.uēn5īs
+.uÄ“nÄ«Ì4
+.uÄ“n5Ä«Ìs
+.uē4nĭt
+.uÄ“6nÄ­Ìt
+.uē4nít
+.uÄ“Ì6nit
+.uÄ“Ì4n5Ä«
+.uÄ“Ì6nÄ­t
+.uĕ6stĕ
+.ué4ni.
+.ué6niens
+.ué4nis
+.ué4nit
+.uÄ«4cÄ•Ì
+.ul3ui
+.ul3uī
+.ul3uí
+.um2e
+.un3et
+.uol6uere.
+.uol6uerene
+.uol6uereq
+.uol6uereu
+.uol6uēre
+.uol6uēru
+.uol6uērú
+.uol6uÄ“Ìre
+.uol6uÄ“Ìru
+.uol6uit.
+.uol6uitn
+.uol6uitq
+.uol6uitue
+.uo6ste
+.uÅ6stÄ•
+.uól6ui.
+.uól6uit.
+.uól6uī.
+.ur1
+.uu2
+.Å«n5ăÌn
+.Å«Ì2
+.Å«Ì4d
+.Å«Ì4n
+.Å«Ì4s
+.Å«Ì4t
+.Å­b2
+.Å­Ì4n
+.Å­Ì4t
+.úb2
+.veni4
+.ve4ni.
+.ve6niens
+.ve6n5ier
+.ve6niéns
+.ve6n5iér
+.ve4nim
+.ve4nin
+.ve4niq
+.ve4nir
+.ve4nis
+.ve4nit
+.ve4niv
+.ve4ní4
+.ven5íe
+.ve6ste
+.vē4nit
+.vē4nī4
+.vēn5īs
+.vÄ“nÄ«Ì4
+.vÄ“n5Ä«Ìs
+.vē4nĭt
+.vÄ“6nÄ­Ìt
+.vē4nít
+.vÄ“Ì6nit
+.vÄ“Ì4n5Ä«
+.vÄ“Ì6nÄ­t
+.vĕ6stĕ
+.vé4ni.
+.vé6niens
+.vé4nis
+.vé4nit
+.vÄ«4cÄ•Ì
+.vo6ste
+.vÅ6stÄ•
+a1Ä2
+a3Ät
+a3ÄÌ2
+a1á2
+a3át
+2aba
+aba3i
+ab2a3q
+aba6ste
+ab3aui
+ab3auí
+ab3av
+2abá
+abá3i
+abæ3
+a2beú
+2abé
+ab2ia
+ab2iá
+a2b3i2b
+ab3ice
+a2bie
+ab4ies
+ab4iet
+a2biē
+ab4iēs
+ab4iÄ“Ìs
+a2bié
+ab4iés
+ab4iét
+a2bii
+a2biī
+ab3iī.
+ab3iīn
+ab3iīq
+ab3iīu
+ab3iīv
+ab5iÄ«Ìn
+ab5iÄ«Ìq
+ab5iÄ«Ìu
+ab5iÄ«Ìv
+a2b3ií
+2abil
+2abim
+ab3iss
+ab3ist
+2abit
+abi4tot
+abi4tót
+1abī
+abī2m
+a2b3í2b
+a2bíe
+ab3íer
+a2bíi
+ab3ímu
+ab3íss
+ab3íst
+ab3íto
+1abj
+1a2bl
+1abn
+2abo
+2abó
+abó2l
+1ab1r
+ab3rÄ
+ab3rá
+1abs
+ab2sq
+ab4stem
+ab4stēm
+ab6stÄ“Ìm
+ab4stén
+ab4sti
+abs5tin
+ab4stó
+abs3tr
+ab4stru
+ab4strū
+ab4strú
+4abunt
+ab3u4s
+abu2t
+ab1Å«2
+abū4s
+abÅ«Ì2
+2abú
+5abúndat
+5a4b5úndÄ
+5abúndem
+5abúndes
+5abúndet
+5a4b5úndē
+5a4b5úndÅ
+abú2t
+a3ca
+a3cá
+a3cæ
+a3cǽ
+1acc
+2a3ce.
+2a3cen
+2a3ceq
+2a3ceu
+2a3cev
+2aci
+a3ci.
+a3ciq
+a3cis
+a3ciu
+a3civ
+2a3cī
+2ací
+a3cl
+2a3co
+aco3ni
+2a3cÅ
+2a3có
+2acum
+2acus
+a2cut
+1a2c2Å«
+2acúm
+2acús
+a2cút
+ad1
+ad2ad
+ada4ma.
+ad6amans
+ada6mante.
+ada6mantem
+ada6manten
+ada6manteq
+ada6mantes
+ada6manteue
+ada6mantev
+ada6mantēs
+ada6mantÄ“Ìs
+ad6amanté
+ada6mantém
+ada6mantés
+ada6manti
+ad6amanti.
+ad6amantib
+ad6amantin
+ad6amantiq
+ad6amantis
+ad6amantiu
+ad6amantiú
+ad6amantiv
+ad6a6mantī
+ada6mantí
+ad6amantín
+ad6amantíq
+ad6amantís
+ad6amantíu
+ad6amantív
+ad6amas.
+ad6amasn
+ad6amasq
+ad6amasu
+ad6amasv
+ad6amÄns
+ad6amÄs.
+ad6amÄsn
+ad6amÄsq
+ad6amÄsu
+ad6amÄsv
+ad6amÄÌns
+ad6amÄÌsn
+ad6amÄÌsq
+ad6amÄÌsu
+ad6amÄÌsv
+ad6amáns
+ad6amánte
+ad6amántē
+ad6amánti.
+ad6amántib
+ad6amántis
+ad6amántiu
+ad6amántī
+ad6amásn
+ad6amásq
+ad6amásu
+ad6amásv
+ad2an
+a2dap
+ada2q
+ad2ar
+ad3ác
+adæ2
+adǣ2
+1add
+ade4d
+ade2g
+ade2q
+ade4s
+adē2d
+adē2g
+adē4s
+adÄ“Ì4d
+adÄ“Ì4g
+adÄ“Ì4s
+adé2d
+adé2g
+adé2s
+1adh
+ad3iác
+adi2c
+adi2g
+adi4mí
+adi2r
+adi4tÄ
+adi4tǣ
+adi4tī
+adi4tū
+adī2m
+adī2r
+adī2t
+adÄ«Ì4m
+adÄ«Ì4r
+adÄ«Ì4t
+adí2b
+adí2g
+adí4mu
+adí2r
+ad3íss
+ad3íst
+adí4to
+adí4tu
+1adj
+1adn
+a2do2
+a3do.
+ad4oc
+a3don
+a3doq
+a3dou
+a3dov
+adÅ2
+ad4Åc
+ad5ÅÌ6rant
+ad5ÅÌ6rat
+ad5ÅÌ4rÄ
+ad5ÅÌ6rem
+ad5ÅÌ6rent
+ad5ÅÌ6rer
+ad5ÅÌ6ret
+ad5ÅÌ4rÄ“
+adÅÌ6ror
+adó6rans
+adó6rant
+adó4ras
+adó4rat
+adó4rem
+adó6rent
+adó4rer
+adó4res
+adó4ret
+adó4ria
+adó4ror
+1adp
+1ads
+adu2
+a2dul
+ad3u4r
+ad3us
+adū2
+adÅ«Ì2
+a2dú2l
+adú2r
+ae1
+2ae.
+2aea
+aea2b3
+a3eamú
+a3eant
+2aeÄ
+a3eÄm
+a3eÄÌm
+2aeă
+aeăÌ2
+2aeá
+ae3ác
+a3eánt
+ae3áp
+ae4cue
+1ae3d2
+aed4o
+2aee
+ae2eo
+ae2eÅ
+ae2eó
+ae3es
+ae2eu
+2aeĕ
+aeé2r
+ae3és
+ae3g2
+2aei2
+ae3ic
+2ae2Ä«
+2aeí
+2aen
+aení3t
+2ae2o
+2ae2Å
+2aeó
+aepo6tés
+aepó6tes
+ae3q
+4aeque.
+4aequĕ.
+ae3r
+aer4i
+ae4rn
+ae4rq
+ae4rv
+ae5sci
+ae4scu
+ae4scú
+ae4spÅ
+ae2sq
+aes4te
+aesti5t4
+aestí5t4
+aetere6ri
+aete6re6rí
+aete6res
+aete6rés
+aete6ri.
+aeter5ii
+aeter5ií
+aeteri6mu
+aeteri6mú
+aeteri6n
+aete6ri6q
+aeteri6ti
+aeteri6tí
+aeteri6to
+aeteri6tó
+aeteri6tú
+aete4r5Ä«4
+aeterÄ«Ì6
+aete6r5í6mu
+aete6rí6n
+aete6rí6q
+aete6rí6t
+aeter5íti
+aete6rí6u
+aete6rí6v
+a3e2tē
+ae5tĕr
+aeté6r5es
+aeté6ri.
+aeté6r5ii
+aeté6rite
+aeté6ri6ti
+ae2un
+ae3ut
+2aeÅ­
+2aeú
+aex2
+ae2xu
+aé2ru
+1af
+afe4r
+afé2
+ag2a
+a3gae
+a3gaÍž
+a3ga͡
+a3gÄ.
+a3gÄn
+a3gÄq
+a3gÄu
+a3gÄv
+a3gáe
+a3gál
+a3g2æ3
+a3g2Ç£
+a2geb
+a2ger
+a2get
+1a2gē
+a3gē.
+a3gēq
+a3gēu
+a3gēv
+a2géb
+a2gét
+a2gim
+agi6ste
+agi6str
+a2gím
+a2gít
+a2gn
+ag3ne
+ag3ni.
+ag3nin
+ag3niq
+ag3nis
+ag3niu
+ag3niv
+ag3nī
+ag3nín
+ag3níq
+ag3nís
+ag3níu
+ag3nív
+ag3no.
+ag5norum
+ag5norúm
+ag5nos.
+ag5nosn
+ag5nosq
+ag5nosu
+ag5nosv
+ag5noue.
+ag5nove.
+ag3nÅ
+ag3nón
+ag3nóq
+ag5nórum
+ag5nósn
+ag5nósq
+ag5nósu
+ag5nósv
+ag5nóue.
+ag5nóve.
+ag3nu
+ag3nú
+a3gri
+a3grī
+a3grí
+a2gun
+a2gún
+a1h
+ai2a
+aiad2
+ai4an
+ai2á
+a1ib
a1ie
-a1io
+a1i2i
+a1iī
+a2i3m
+ai4mn
+ai4mq
+ai4mv
+ai2nu
+aio2s
+a1iÅ
+a1is
+a1it
a1iu
-ae1a
-ae1o
-ae1u
-e1ia
-e1ie
-e1i2u
-io1i
-o1ia
-o1ie
-o1io
-o1iu
+a1Ä«2b
+aīn3
+aī2nu
+a1Ä«2r
+a1Ä«s
+aÄ«Ì2b
+aÄ«Ì2r
+aÄ«Ì2t
+a1í2b
+a1íi
+a2í3me
+a1í2r
+a1í2t
+a3la
+alae2
+a3lá
+alæ2
+alǣ2
+2a3le
+ale2i
+alē2i
+2a3lé
+a3li.
+a3lia
+a3lib
+a3lii
+a3lií
+a3lin
+a3lio
+a3liÅ
+a3lió
+a3liq
+a3lis
+a3lit
+a3liu
+a3liú
+a3liv
+2a3lī
+2a3lí
+2alu
+a2l3ua
+a2luÄ
+a2l3uá
+a2l3uæ
+a2luǣ
+a2l3uǽ
+al3ue.
+al3uen
+al3ueq
+al3ueu
+al3uin
+al6uine.
+a4l5uis.
+a4l5uisn
+a4l5uisq
+a4l5uisu
+al3uīs
+al5uÄ«Ìs
+a4l5uísn
+a4l5uísq
+a4l5uísu
+a3l4um
+al3uó
+a3l4us
+alu6ste
+a3l4ut
+al3uu
+al3uú
+alū6ste
+2alú
2am.
-2at.
+am2a
+4amantē
+6amantéa
+6amantéæ
+6amantée
+6amantéi
+6amantéo
+6amantéu
+a4mantÅ
+1a2mÄ
+1amb
+am2be
+amb3és
+am4b5i4mu
+am4b5i4mú
+am4b5it.
+am6b5i6te.
+am6b5i6ten
+am6b5i6teq
+am6b5i6teu
+am6b5i6tev
+ambi4ti
+am4b5i4tí
+am4b5itn
+am4bi4to
+am4b5i4tó
+am4b5itq
+am6b5itue
+am4bitú
+am4b5itv
+am6bi6ui.
+am6bi6vi.
+am4bít
+am4b3u4r
+am4b3us
+ambÅ«bÄ6i
+ambūbē6i
+am4bū4r
+am4b3Å«Ì4
+am4b3ú4r
+am2e
+ame3g
+am4es
+ame3sæ
+ame3sǽ
+am2Ä“
+am2é
+am4és
+amé3sa
+am2i
+3a2mic
+2amin
+ami4s3
+ami6ste
+ami6str
+3a2míc
+2amm
+2amn
+3amnæ
+3amnǣ
+3amnǽ
+1amo
+a2móe
+1amœ
+1amp
+2amq
+2a1mu
+am4uel
+am2uē
+am2ué
+a2mui
+a2muī
+a2m3uí
+a3mur
+a3mus
+2a3mú
+2amv
+2an2a
+an2Ä
+2aná
+2anæ
+2anǽ
+1anc
+an2cu
+2and
+ande4s3
+2ane
+a3nē
+1anh
+1ani
+a2nim
+2anī
+3a2ním
+2a3n2o
+ano3p
+2anÅ
+2a3nó
+2ans1
+an2sa2
+ans3ab3
+ansabi4
+ansabí4
+an4sá4b3
+an4s3ci
+an4scí
+an4sea
+an4seá
+an4seo
+an4seó
+an4si4b
+an4sig
+ansi4mi
+an4si4t
+ansi4u
+an4si4v
+an4sí4b
+an4síe
+an4síg
+an4sí4m
+an4sí4t
+ansí4ui
+ansí4vi
+an4sn
+an2sp
+an4sq
+ans3t
+an4sv
+2ant.
+ante5re
+an4t5ero
+an4t5erÅ
+an4t5e4ró
+an5tes
+antes4t
+ante5stÄti
+ante5stÄÌti
+ante5stem.
+ante5stemn
+ante5stemq
+ante5stemue
+ante5stemv
+ante5stes
+ante5stēs
+ante5stÄ“Ìs
+ante5stémn
+ante5stémq
+ante5stémue
+ante5stémv
+ante5stés
+anté5ii
+antés4t
+anté5stem
+anté5stes
+anté5stē
+2antn
+2antq
+2antu
+2antú
+2antv
+2a1n2u
+a2n3ue
+an2Å«
+2anú
+ao1n
+a2one
+ao3ni
+ao2ny
+ao2ný
+a1or
+aÅ2ny
+aÅ2ný
+a3ÅÌ4ny
+a3ó2ny
+aó1r
+1ape1
+ape2i
+ape3r4e
+aper4Ä“
+aper4i
+ape3r4Ä«
+aper4í
+aperí5tur
+aper4u
+2aph
+a3pi
+apis3
+api6str
+a3pí
+a2pn
+apo5str
+apo4su
+1apó
+após3
+1app
+appár4
+apule4
+aput3
+a3pú
+a2qua
+a2quÄ
+a2quá
+a3que.
+a2quē
+a2quo
+a2quÅ
+a2quó
+a1r
+2ar.
+ar2a
+arab2
+1arÄ
+2arám
+ardē2
+ar2e
+2are.
+are2i
+2aren
+2areq
+2arer
+3a4resc
+2areu
+2arev
+arē2i
+a3rēu
+a3rēv
+2aré
+3a4résc
+2ar2i
+3arid
+ari5do
+ari3ni
+2arí
+3aríd
+1arm
+2arn
+arpē4i
+2arq
+ar2sp
+3a2r3ua
+3a2r3uÄ
+3a2r3uá
+ar3uæ
+ar3uǣ
+ar3uǽ
+ar3ue.
+a4r3uen
+a4r3ueq
+ar4uer
+a4r3ueu
+ar4ui.
+ar4uin
+ar4uiq
+ar4uis
+ar5uis.
+ar5uisn
+ar5uisq
+ar5uisu
+ar4uiu
+ar3uī
+ar5uísn
+ar5uísq
+ar5uísu
+2a3rum
+2a3run
+a2r3uo
+a2r3uÅ
+a2r3uó
+a3rus
+aru3sp
+a2r3uu
+a2r3uú
+2a3rú
+arú3sp
+2arv
+3arva
+3arvÄ
+3arvá
2as.
-2ans.
-2ax.
-4ant.
-2es.
-2et.
-2em.
-2ex.
-e5us.
-2is.
-2im.
-2it.
-2ix.
-2yx.
-2ys.
-2ox.
-2ui.
-2ux.
-i3um.
-i3ur.
-i3unt.
-i3ui.
-tru5us.
-tru1um.
-.i2a
-.i2e
-.i2i
-.i2o
-.i2u
-.iuu2a
-.iuu2e
-.iuu2o
-.iei2u
-.iai2u
-.iuu2i
-i2oi2u
-i3u2ia
-i3ui3ua
-i3ui3ue
-i3ui3ui
-i3ui3uo
-i3ui3uu
-e1ui1ue
-e1ui1ui
-e1ui1uo
-i2y
-uo3u
-.ua3ua
-.uo3ue
-.ue1io
-.u2a
-.u2e
-.u2i
-.u2o
-.u2u
+2asca
+2ascá
+as6cendÄ
+as6cende
+as6cendī
+as6cendÅ
+as2cē
+as6céndÄ
+as6céndī
+as6céndÅ
+2as3ci
+2ascí
+2asco
+2ascó
+a3scr
+as4cri
+2ascu
+2ascú
+a3s2e
+ase2i
+as4er
+asē2i
+a3sé
+a3s2i
+a3sí
+2asn
+1asp
+as5per.
+as5pera
+as5perÄ
+as5perá
+as5peræ
+as5perǣ
+as5perǽ
+as5pere
+as5perē
+as5peré
+as5pe5ri
+as5pe5r4Ä«
+as5per4í
+as5perne.
+as5pero
+as5perÅ
+as5peró
+as5perq
+as5peru
+as5perú
+as5perv
+a4s3pē
+as5péra
+as6pérna
+as5pérq
+as5péru
+as5pérv
+a4spi
+as3pis
+a4s3pī
+a4spí
+as3pís
+as3po
+as3pÅ
+as3pó
+as3pum
+as3púm
+2as3q
+2ass
+as2tÄ
+as5te.
+as5teq
+as4ter
+as5teu
+as5tev
+as2tē
+4a4s3ti.
+4a4s3tin
+4a4s3tiq
+4a4stis
+4a4stiu
+4a4s3tiv
+2as3tí
+a4stín
+a4stíq
+a4stís
+3as4tít
+a4stíu
+a4stív
+as3to
+2astr
+as4tras
+as4trau
+as5traue.
+as4trav
+as5trave.
+as4trát
+as4tráu
+as4tráv
+as4trid
+as4tríd
+as5trum
+as4trúe
+2asu
+a3s2ua
+a4s3ue
+as3uis
+as3uís
+2asv
+2at
+at3a4g
+ata5str
+a2t3á4g
+ate4ie
+ate4io
+ate4ió
+ate4iú
+ate2Ä«
+ate3r4a
+ate3rǣ
+ate5re
+ate5ré
+ate3ri
+ateri5u
+ateri5v
+ate5rī
+aterī5u
+aterī5v
+ate3ro
+ate3rÅ
+a3ti
+ati4s
+atis5t
+ati6sta
+a3tí
+ato2i
+ató2i
+1att
+a3tur
+a3tú
+a1u
+au3aÍž
+a2u1Ç£2
+au3d2
+2a3ue
+2a3ué
+1aug
+2aui
+2auí
+a2ul
+a2u1m
+a2un
+aupe5re
+aupe5ri
+auperi5n
+auperi5q
+auperi5ue
+auperi5v
+aupe5r4Ä«
+auperī5n
+auperī5q
+auperī5u
+auperī5v
+a2u1r
+a2ut
+1auu
+a2ux
+au2xu
+2av
+av3aÍž
+a2v1Ç£
+a3ve
+a3vé
+1avu
+ax2
+ax4eu
+a2xia
+a2xiá
+a2xiæ
+a2xiǽ
+a2xié
+a2xii
+a2xií
+a2xio
+a2xió
+a2xiú
+a2xía
+a2xíe
+ax3ue
+ax4us
+a2Íž
+4aÍže.
+2aÍžea
+2aÍžeÄ
+2a͞eă
+2a͞eá
+2a͞eī
+4aÍžen
+6aÍžeque.
+6a͞equĕ.
+aÍžu6ste
+a͞u6stĕ
+4aÍžÌea
+4aÍžÌeÄ
+4aÍžÌeă
+4aÍžÌeÄ«
+4aÍžÌen
+a2Í¡
+4a͡e.
+2a͡ea
+2aÍ¡eÄ
+2a͡eă
+2a͡eá
+2a͡ei
+2a͡eī
+2a͡eí
+4a͡en
+6a͡eque.
+6a͡equĕ.
+a͡ete6res
+a͡ete6rés
+a͡eté6r5es
+a͡u4st
+a͡u6ste
+a͡u6stĕ
+4aÍ¡Ìea
+4aÍ¡ÌeÄ
+4aÍ¡Ìeă
+4aÍ¡Ìei
+4aÍ¡ÌeÄ«
+4aÍ¡Ìen
+6aÍ¡Ìeque.
+2Äb2
+Äba2
+Äbá2
+ÄbÄ«3u
+ÄbÄ«3v
+Äbo2
+Äb4un
+2ÄcÄ•
+Äcé2
+2ÄcÄ«
+2ÄcÄ­
+1Ä2cr
+1Äct
+Ä2c3ue
+Äda2
+Ädá2
+ÄdÄ“2s
+Ä3do2
+Äd4or
+Ädó2
+Äe1
+Äe3r
+ÄÄ“2
+ÄÄ“r3
+ÄÄ“Ì2
+ÄÄ•1
+ÄÄ•3r
+ÄÄ•r4Ä•
+Äg2a
+Ä2gÄ
+Ä2gă
+Ä3g2æ3
+Ä3g2Ç£
+Ä2ge
+Äge2r
+Ä2gÄ•
+Ä2gé2
+Ä2gn
+Ä2go2
+Ä2gÅ
+Ä2gó
+Ä1i
+Ä2ia.
+Äiad2
+Ä2iam
+Ä2ian
+Ä2iaq
+Ä2iau
+Ä2iav
+Äi2Ä
+Ä4iÄque
+Ä4iÄue
+Ä4iÄve
+Ä6iÄÌque
+Ä4iÄÌue
+Ä4iÄÌve
+Ä2iám
+Ä2id
+Ä2ien
+Ä4iÄ“Ìne
+Ä6iÄ“Ìque
+Ä4iÄ“Ìue
+Ä4iÄ“Ìve
+Ä2iÄ«.
+Ä4iÄ«ne
+Ä4iÄ«que
+Ä4iÄ«ue
+Ä4iÄ«ve
+Ä4iÄ«Ìne
+Ä6iÄ«Ìque
+Ä4iÄ«Ìue
+Ä4iÄ«Ìve
+Ä2io
+Ä2iÅ.
+Ä4iÅne
+Ä4iÅque
+Ä4iÅru
+Ä4iÅrú
+Ä4iÅs.
+Ä4iÅsne
+Ä6iÅsque
+Ä4iÅsue
+Ä4iÅsve
+Ä4iÅue
+Ä4iÅve
+Ä4iÅÌne
+Ä6iÅÌque
+Ä4iÅÌru
+Ä6iÅÌsne
+Ä6iÅÌsque
+Ä6iÅÌsue
+Ä6iÅÌsve
+Ä4iÅÌue
+Ä4iÅÌve
+Ä2ió
+Ä2is
+Ä2ium
+Ä2ius
+Ä2iús
+Ä1Ä­c
+Ä2íe
+2Äl
+Äle2r
+Ä3li
+Älo2
+2Ä1m2
+Äme4r3
+ÄmÄ­Ì5c
+Ämo2
+Ä3na
+Ä3n2Ä
+Ä3nă
+Ä3ná
+Ä3næ
+Ä3nÇ£
+Ä3nǽ
+Ä3ne
+Äne2r
+Ä3nÄ“.
+Ä3nÄ“n
+Ä3nÄ“q
+Ä3nÄ“u
+Ä3nÄ“v
+Ä3n2Ä•
+Äné2
+Äno2
+Ä3nÅ
+2Äns
+Än2s3a2
+Änsab3
+Än2să
+Änsá2
+Än4s3áb3
+Än4scÄ«
+Än4s3ea
+Än4s3eÄ
+Än4s3eá
+Än4s3eo
+Än4s3eÅ
+Än4s3eó
+Än4s3Ä•Ä
+Än4s3ĕă
+Än4s3Ä•Å
+Än4s3Ä•Å
+Än4s3i4b
+Än4sig
+Än4s3iÄ«
+Än4s3i4t
+Än2s3Ä«2
+ÄnsÄ«Ì4m
+ÄnsÄ«Ì4t
+Än4s3Ä­4b
+Äns3Ä­Ä“
+Än4sÄ­g
+Än4s3Ä­Ä«
+Än4s3Ä­4t
+Äns5Ä­Ì4b
+Än4s5Ä­ÌÄ•
+Än4s5Ä­Ìg
+Än4s3í4b
+Än4síe
+Än4síg
+Änsí4t
+Äns5íta
+Äns5íte
+Äns5íti
+Än2sp
+Än4s3t
+Ä1nu
+Ä2n3ue
+Ä3nus
+Ä3nÅ­
+Ä3nú
+Ä1Å
+ÄpÄ“2
+Ä3pi
+Ä3pÄ­
+Ä3p2t
+2Äq
+Ä1r
+2Ära
+2ÄrÄ
+2Ärá
+2Ä3r2e
+Ä3rÄ“
+ÄrÄ“2i
+2ÄrÄ“m
+2ÄrÄ“r
+4ÄrÄ“s.
+3Ä4rÄ“sc
+4ÄrÄ“sn
+4ÄrÄ“sq
+4ÄrÄ“su
+4ÄrÄ“sv
+2ÄrÄ“t
+2ÄrÄ“Ì
+5Ä4rÄ“Ìsc
+2Ä3r2Ä•
+2Äré2
+2Äria
+2ÄriÄ
+2Äriá
+2Äriæ
+2ÄriÇ£
+2Äriǽ
+Ä2rid
+Äri5dÅ
+2Ärie
+2ÄriÄ“
+2ÄriÄ«
+2Ärim
+2Ärin
+2ÄriÅ
+2Äris
+2Ärit
+2Äriu
+2Äriú
+2ÄrÄ«
+2ÄrÄ­
+3Ä2rÄ­d
+ÄrÄ­5dÅ
+3Ä4rÄ­Ìd
+2Ärí
+3Ä2ríd
+Äro2
+2ÄrÅ
+Äró2
+Är2s3p
+Är2u
+Är3ue.
+2Ärum
+2Ärun
+2ÄrÅ­
+Är4Å­n
+2Ärú
+2Äs
+Äs2ca
+Äs2că
+Äs3cÄ«
+Äs2i
+Äsi2n
+Äso2
+Ä2s3q
+Äs5ter
+Äs5tÄ•r
+Ä2s3ti
+Ä2s3tÄ«
+Ä2s3tÄ­
+Ä2s3tí
+Ä2s3ue
+Ä2s3uÄ•
+2Ät
+Äté2
+Äto2
+ÄtÅ2i
+Ätó2
+2Ä1u2
+2Äv
+Äx2
+Ä2x3u
+2Ä2Ì
+ÄÌb2
+ÄÌ4crÄ•
+ÄÌ4crÄ­
+3ÄÌctÄ“
+3ÄÌcti
+ÄÌ2f
+ÄÌ2go
+ÄÌ2gÅ
+ÄÌ3ici
+ÄÌ3iul
+ÄÌ3Ä­cÄ­
+ÄÌ3lu
+ÄÌ1m2
+ÄÌn4s5ea
+ÄÌn4s5eÄ
+ÄÌn4s5eo
+ÄÌn4s5eÅ
+ÄÌn4s5Ä•Ä
+ÄÌn4s5ĕă
+ÄÌn4s5Ä•Å
+ÄÌn4s5Ä•Å
+ÄÌn4s5iÄ«
+ÄÌn4s5i4t
+ÄÌn4s5Ä­Ä«
+ÄÌn4s5Ä­4t
+ÄÌ3p2t
+ÄÌ3rÄ•
+3ÄÌ4rid
+3ÄÌ4rÄ­d
+ÄÌr4uÄ«
+ÄÌ5s4trÅ­
+ă1Ä2
+ă3Ät
+ă3ÄÌ2
+ăb1
+ăb2a
+2ăbă
+ăb2ăc
+ăbă4l
+ăb2ăq
+ăbă6stĕ
+ăb2ăÌ
+ăb3ăÌl
+ăb2á
+ăbæ3
+ăb2e
+2ăbē
+ăb2ēs
+ă2bi
+ăbī2m
+ăb4ĭēs
+ăb4Ä­Ä“Ìs
+ăb3ĭī.
+ăb3ĭīn
+ăb3ĭīq
+ăb3ĭīu
+ăb3ĭīv
+ăb5Ä­Ä«Ìn
+ăb5Ä­Ä«Ìq
+ăb5Ä­Ä«Ìu
+ăb5Ä­Ä«Ìv
+ăbÄ­Ì4g
+ă2bl
+ăbÅ2
+ăbÅ3lÅ­
+ăbÅÌ2
+ăb3r
+ăb4ră
+ăb2sq
+ăb4stēm
+ăb6stÄ“Ìm
+ăb4stĭ
+ăbs3tr
+ăb4strū
+ăb4strŭ
+ăb4stŭ
+ăb2su
+ăbū2
+ăbÅ«Ì4
+ă2bŭ
+ă3bŭm
+2ăca
+2ăcÄ
+2ăcă
+2ăcá
+2ăcæ
+2ăcǣ
+2ăcǽ
+1ăcc
+2ăcē
+ă3cĕ.
+ă3cĕn
+ă3cĕq
+ă3cĕu
+ă3cĕv
+2ă3cī
+2ăcĭ
+2ă3cÅ
+ă2cu
+1ă2c2ū
+2ăcŭm
+2ăcŭs
+ă3cÅ­Ìm
+ăd1
+ădă2
+ăd2ăd
+ăd6ămÄns
+ăd6ămÄs.
+ăd6ămÄsn
+ăd6ămÄsq
+ăd6ămÄsu
+ăd6ămÄsv
+ăd6ămÄÌns
+ăd6ămÄÌsn
+ăd6ămÄÌsq
+ăd6ămÄÌsu
+ăd6ămÄÌsv
+ădă6măntēs
+ădă6măntÄ“Ìs
+ăd6ămăntĕ
+ăd6ămăntī
+ăd6ămăntĭb
+ăd6ămăntĭs
+ăd6ămăntĭŭ
+ăd6ămăntÄ­Ìs
+ăd6ămăÌntÄ“
+ăd6ămăÌntÄ•
+ăd6ămăÌntÄ«
+ăd6ămăÌntÄ­b
+ăd6ămăÌntÄ­s
+ăd6ămăÌntÄ­Å­
+ăd2ăn
+ădă4q
+ădæ2
+ădǣ2
+ă3d2e
+ăde4u
+ădē2d
+ădē2g
+ădē2s
+ădÄ“Ì4d
+ădÄ“Ì4g
+ădÄ“Ì4s
+ădĕ2d
+ădĕ2q
+ădÄ•Ì4d
+ă2di
+ădī2m
+ădī2r
+ădī2t
+ădÄ«Ì4m
+ădÄ«Ì4r
+ădÄ«Ì4t
+ădĭ2c
+ădĭ4ta
+ădÄ­4tÄ
+ădĭ4tă
+ădĭ4tá
+ădĭ4tæ
+ădĭ4tǣ
+ădĭ4tǽ
+ădĭ4tī
+ădĭ4tū
+ădÄ­Ì4c
+ădÄ­Ì4tă
+ădÄ­Ì4tÄ­
+ădÅ2
+ăd4Åc
+ăd5ÅÌ4rÄ
+ăd5ÅÌ6rănt
+ăd5ÅÌ6răt
+ăd5ÅÌ4rÄ“
+ăd5ÅÌ6rÄ•m
+ăd5ÅÌ6rÄ•nt
+ăd5ÅÌ6rÄ•r
+ăd5ÅÌ6rÄ•t
+ădÅÌ6rÅr
+ă2dÅ2
+ă2du
+ădū2
+ădÅ«Ì2
+ădÅ«Ì4l
+ădŭ2
+ă1ĕ2
+1ăf
+1ăg
+ă3g2a
+ă2găr
+ă2găt
+ă3g2æ3
+ă3g2ǣ
+ă2gē
+ă3gē.
+ă3gēq
+ă3gēu
+ă3gēv
+ă2gĕ
+ă3gĭb
+ăgĭ6stĕ
+ă2gĭt
+ă2gn
+ă3grī
+ă2gŭn
+ă1h
+2ă1i
+ă1ī2b
+ă1ī2r
+ă1īs
+ăīÌ2b
+ăīÌ2r
+ăīÌ4t
+ă1ĭĕ
+ă1ĭĭ
+ă3ĭ2t
+ă3Ä­ÌÄ•
+ă3Ä­ÌÄ­
+ă3Ä­Ì2t
+2ăj
+ălae2
+ă3lă
+ălæ2
+ălǣ2
+2ălē
+2ălĕ
+2ă3lī
+ă3lĭă
+ă3lÄ­Å
+ă3lĭŭ
+ă3lÄ­Ì
+ă2l1u
+ălū6stĕ
+2ălŭ
+2ăm.
+ă1ma
+1ă2mÄ
+ă1mă
+4ămăntē
+3ă2măt
+1ămb
+ăm2bĕ
+ăm4b5ĭt.
+ăm4b5ĭtn
+ăm4b5ĭtq
+ăm4b5ĭtu
+ăm6b5Ä­tÅ­Ì
+ăm4b5ĭtv
+ăm6b5Ä­Ìtn
+ăm6b5Ä­Ìtq
+ăm6b5Ä­Ìtu
+ăm6b5Ä­Ìtv
+ămbÅ«bÄÌ5i
+ămbÅ«bÄ“Ì5i
+ăm4bū4r
+ăm4b3Å«Ì4
+ăm4b3ŭs
+ăm2e
+ăm2ē
+ăm2ĕ
+3ămīc
+ăm3ĭc
+ămĭ6stĕ
+2ămm
+2ămn
+3ămna
+3ămná
+3ămnæ
+3ămnǣ
+3ămnǽ
+1ămo
+1ă2mó
+1ămœ
+1ămp
+2ămq
+2ămu
+2ămv
+ăn2Ä
+2ă3n2ă
+1ănc
+2ănd
+ă3nē
+2ă3n2ĕ
+1ănh
+2ă3nī
+1ănĭ
+ă2nĭm
+2ă3nÅ
+2ă3n2Å
+2ănt.
+ăn4t5Ä•4rÅ
+ăn5tĕs4
+ăntÄ•5stÄtÄ­
+ăntÄ•5stÄÌtÄ­
+ăntĕ5stēs
+ăntÄ•5stÄ“Ìs
+ăntĕ5stĕm
+ăntÄ•5stÄ•Ìm
+ăntÄ•Ìs4
+ăntÄ•Ì5stÄ“
+ăntÄ•Ì5stÄ•m
+2ăntn
+2ăntq
+2ăntu
+2ăntŭ
+2ăntv
+ăn2ū
+2ă3n2ŭ
+ăÅ2ny
+ă3ÅÌ4ny
+ă3pe
+1ăpĕ
+ăpĕ3rĕ
+ăpĕ3rī
+ăpĕ3rŭ
+ă3pé
+ă2pn
+1ăpÅ
+1ăpp
+3ă2quÄ
+3ă2quă
+3ă2quē
+3ă2quÅ
+3ă2quÅ
+2ăr.
+ă1ra
+ă1r2ă
+ără3bŭ
+ă3răg
+ără3gĕ
+ă1ræ
+ă1rǣ
+ărdē2
+ă3r2e
+ă3rēu
+ă3rēv
+ă1r2ĕ
+ă3rh
+ă1rī
+ă3r2ĭ
+2ărn
+ă1ro
+ă1rÅ
+ărpē3i
+ărpÄ“Ì5i
+2ărq
+ăr2su
+2ăr1u
+3ăruÄ
+ă1rū
+ă1rŭ
+2ărv
+3ărvÄ
+ă1ry
+2ăs.
+1ăsc
+ăsce2
+ăs2cē
+ăs2cĕ
+ăscé2
+ă3s2ĕ
+ăs4ĕr
+ă3sĭ
+2ăsn
+ă2sp
+ă4s3pē
+ăs5pĕr.
+ăs5pĕra
+ăs5pÄ•rÄ
+ăs5pĕră
+ăs5pĕrá
+ăs5pĕræ
+ăs5pĕrǣ
+ăs5pĕrǽ
+ăs5pĕrē
+ăs5pĕ5rī
+ăs5pĕrnĕ.
+ăs5pÄ•rÅ
+ăs5pĕrq
+ăs5pĕru
+ăs5pĕrŭ
+ăs5pĕrv
+ă4s3pī
+ă4spĭ
+ăs3pĭs
+ăs3pÅ
+ăs3pÅ
+ăs2pŭ
+2ăs3q
+2ăst
+ăs2tÄ
+ăs4tăn
+ăs2tē
+ăs2tĕ
+ăs3tĕ.
+ăs3tĕq
+ăs3tĕu
+ăs3tĕv
+4ăstr
+ăs3tră
+ăs3trÅ
+ă3strÅ
+ăs4trŭ
+2ăs3u
+2ăsv
+ă3ta
+ă3tÄ
+ătă5str
+ătăÌ2
+ă4t3ăÌg
+ă3tá
+ă3tæ
+ă3tǣ
+ă3tǽ
+ă3tē
+ătÄ“Ì3i
+ătĕ2ī
+ătĕ3r4a
+ătĕ3rǣ
+ătĕ3rĕ
+ătĕ5rī
+ătĕrī5u
+ătĕrī5v
+ătĕ3rŭ
+ă3tī
+ă3tĭ
+ătĭ4s
+ătĭs5t
+ă3tr
+1ătt
+ă2tu
+ă1u
+ă2u1a
+ă2u1á
+ă2uæ2
+ă2u1ǣ2
+ă2uǽ
+ă3uĕ
+ă3uÅ
+ă2v1a
+ă2v1á
+ă2væ
+ă2v1ǣ
+ă2vǽ
+ă3vĕ
+ăx2
+ă2xu
+ăÌb5Ä­Ä«.
+3ăÌbl
+ăÌb6stÄ­n
+ăÌb4s5tr
+ăÌ3bÅ­
+ăÌdă4
+ăÌd6ămÄn
+ăÌd6ămÄs
+ăÌd3ăq
+3ăÌdd
+ăÌd3Ä•Å
+ăÌd3Ä•s
+3ăÌdh
+ăÌd3Ä­4c
+ăÌd3Ä­Ä­
+ăÌd5Ä­4ta
+ăÌd5Ä­4tÄ
+ăÌd5Ä­4tă
+ăÌd5Ä­4tæ
+ăÌd5Ä­4tÇ£
+ăÌd5Ä­4tÄ«
+ăÌd5Ä­4tÅ«
+3ăÌdj
+3ăÌds
+ăÌ1Ä•
+1ăÌf
+3ăÌgg
+ăÌ4gÄ­Ä•
+2ăÌ1i
+ăÌ3Ä­Ä“n
+ăÌ3Ä­Ä«.
+ăÌ3Ä­2t
+2ăÌj
+ăÌl3u
+ăÌm4b5Ä­t
+3ăÌmna
+3ăÌmnæ
+3ăÌmnÇ£
+3ăÌmp
+3ăÌmt
+ăÌ4nÄ­m
+ăÌn2Å
+ăÌn6tÄ•rÅ
+3ăÌntr
+ăÌ2r
+ăÌ3r2ă
+ăÌră3g
+ăÌ3rÄ“n
+ăÌ3rÄ•
+ăÌ3rÄ«
+ăÌ3rÄ­
+ăÌ3rÅ­
+ăÌ2sp
+ăÌs4tÄn
+ăÌs4tăt
+ăÌs4tÄ“s
+5ăÌs4tÄ•m
+ăÌs6tÄ•nt
+5ăÌs4tÄ•t
+5ăÌstÄ­t
+2ăÌ2t
+ăÌ3ta
+ăÌ3tÄ
+ăÌ3tă
+ăÌ3tæ
+ăÌ3tÇ£
+ăÌ3tÄ“
+ăÌ3tÄ•
+ăÌ3tÄ«
+ăÌ3tÅ
+ăÌ3tÅr
+ăÌ3tr
+3ăÌtt
+ăÌ3tÅ«
+ăÌ3tÅ­
+ăÌ3uÅ
+áa2t
+áb2ac
+áb2a3q
+áb3aui
+áb3avi
+áb2eq
+áb2ia
+á2bie
+áb4ies
+3á2biē
+áb4iēs
+3á2bii
+áb4iis
+3á2biī
+áb3iī.
+áb2iu
+1ábī
+3á2bl
+áb2o
+ábs2c
+áb5sci
+áb2sq
+áb5s4te
+áb4stin
+áb3sto
+áb4str
+á3bu
+2áce
+áda2
+ád6amans
+ád4amas
+ád4amÄn
+ád4amÄs
+3ádd
+áde2d
+ád1ē
+3ádh
+á2d3i2c
+ádi2g
+ád2ip
+ádi3pi
+3ádj
+1ádm
+á3do
+ád4ora
+ádo4ri
+á3dÅ
+3áds
+ád1u
+á3eant
+á3eat
+áe2ă
+áe4cue
+áe3d2
+áe2eo
+áe2eÅ
+áe3es
+áe3g2
+áei2
+2áen
+2áe3q
+3áequa
+3áequÄ
+3áequă
+5áequem
+5áequer
+5áeques
+5áequet
+3áequē
+5áequĕm
+5áequĕr
+5áequĕt
+3áequo
+3áequÅ
+3áequÅ
+áe1r
+áer4i
+áes4ca
+áes4ci
+áes4ta
+áes4te
+áes4tē
+áes4tī
+áes4tÅ
+áete3
+áetĕ3
+áetĕ5r
+áe3ut
+áe2ŭ
+áe2x
+1áf
+ág2a
+á3gæ
+1áge
+á2ger
+3ágg
+á2giÄ
+á2giæ
+á2giǣ
+á2giē
+á2gim
+á2git
+á2gn
+ág3no
+á3gr
+á1h
+ái2a
+á2ia.
+á2iae
+á2iam
+á3iane
+á3iaq
+á2ias
+á3iau
+á3iav
+á2ia͞
+á2ia͡
+á2iÄ
+á2iæ
+á2iǣ
+á3ieq
+á3ieu
+á3iev
+á2iis
+á3iit
+á1iī
+á1i2t
+á1iu
+1álp
+á2l3ua
+á2luÄ
+á2l3uæ
+á2luǣ
+á2l3ue
+ál3uē
+ál3uin
+á4l3uis
+ál3uīs
+ál3uu
+ám1
+á1m2a
+1ámb
+ám4bes
+ám2bē
+ám4b3ia
+ám4biÄ
+ám4b3io
+ám4b3i4t
+ámb4iui
+ámb4iv
+ám2e
+áme3s
+ám2ē
+2ám2i
+ám2ī
+2ámn
+3ámnæ
+3ámnǣ
+á1mo
+3ámp
+2ámq
+3ámt
+2ámu
+á3m2uē
+2ámv
+án2cu
+á2nim
+3ánnu
+án2o3
+án4s3ea
+án4s3eo
+án2si2
+áns3it
+án4t3ea
+ánte3i
+ánt5ero
+ánt5erÅ
+3ántr
+á1nu
+án2ua
+á2nue
+án2uī
+án2ū
+ápe3r
+á3pi
+á2pn
+2áq
+á2qui
+á1r
+2ár2a
+ár5cha
+2árd
+2áre
+2ár2i
+3árid
+2áro
+ár2sp
+2áru
+á2r3ua
+á2r3uÄ
+ár3uæ
+á2rue
+á4ruis
+á3rum
+á3run
+á2ruo
+á2r3uÅ
+á2ruu
+2ás
+ás3c
+ás4er
+ás2i
+áspe3
+ás3pī
+ás2pu
+ás4tÄn
+ás4tēs
+á4sti
+ás5ti.
+ás5tis
+3ástit
+ás3to
+ás3tri
+ás5trum
+2át
+át3a4g
+áte3r
+á5trix
+3átt
+á1u
+2áue
+á2ul
+á2u1m
+á2un
+áupe3
+áupe5r
+á2u1r
+á2ut
+á2ux
+áu2xu
+2áv
+áx2a
+áx4eu
+áx2i
+á2xia
+á2xiæ
+á2xii
+á2xio
+á2xiu
+áx2ī
+áx2o
+áx2Å
+áx4us
+æ1
+2æa
+æa2b1
+æa2m
+æ2a3n
+æ2a3q
+æ2a3r
+æ2as
+2æ2Ä
+2æă
+æ2ăn
+æ2ă3q
+æ2ău
+æ2ăv
+æăÌ2
+2æá
+æá2c
+æ2ám
+æ2án
+æ2ár
+2æ2æ
+2æ2ǽ
+æb2
+æbe3r
+æ2c3ue
+1æd2
+æde2s
+ædē2s
+æ2di
+æ2dĭ
+æ3do
+æd4or
+æ3dŭ
+æd4ŭĕ
+2æe2
+æ2e3n
+æ2eo
+æ2eÅ
+æ2eó
+æ2e3q
+æe4ra
+æe4ro
+æe4rÅ
+æ3es
+æ2eu
+æ2eú
+æ2ev
+æex3
+2æ2ē
+2æĕ2
+æ2Ä•Å
+æ2ĕ3q
+æĕ4rÅ
+æ2ĕŭ
+æĕÌ2
+2æ2é
+æ3é2r
+æ3és
+æ2g2
+æge2
+ægé2
+æ3gn
+2æi2
+æ3ic
+æ2in
+æ2i3q
+æ2is
+æ2i3ue
+æ2i3v
+2æ2ī
+æĭ2
+æĭÌ2
+2æ2í
+æ3í2c
+æmo4nu
+æmÅ2
+2æn
+æn2Ä
+æ3ne
+æne3ī
+æ3nē
+æ3nĕ1
+æ3né
+æ2nin
+æni3t
+æn1ī
+æní3t
+2æ2o
+2æ2Å
+æ2Å
+2æ2ó
+æó2nu
+æó1r
+æpo6te6ri
+æpo6te6rí
+æpo4tes
+æpo4tés
+æpÅ4tÄ•s
+æpó4tes
+æ2qua
+æ2quÄ
+æ2quá
+4æ3que.
+4æquĕ.
+æ4quĕm
+æ4quĕr
+æ4quĕt
+æ4quÄ•Ì
+ær2
+æ3ră
+æres3
+æ3rē
+ærĕ2s3
+æs2c
+æs3cu
+æs3cŭ
+æs3cú
+æs2i
+æs2p
+æspe3
+æs3po
+æs3pÅ
+æs3pó
+æst2
+æsti5t4
+æstí3t4
+æte5ram
+æte5ran
+æte5rar
+æte6re6ri
+æte6re6rí
+æte6reru
+æte4res
+æte4rés
+æte4r3i4
+æte4r3ī4
+æterÄ«Ì4
+æte4rí4
+æter5ímu
+æter5íti
+æter5íu
+æter5ív
+æte3ro
+æte3rÅ
+æte5run
+ætĕ4r3ī4
+ætÄ•rÄ«Ì4
+ætĕ4rĭē
+ætĕ4r5ĭī
+ætĕ4rĭt
+ætÄ•r5Ä­6tÄ
+ætĕrĭ6tĕ
+ætĕ5rĭtĭ
+ætÄ•rÄ­6tÅ.
+ætÄ•rÄ­6tÅn
+ætÄ•rÄ­6tÅq
+ætÄ•rÄ­6tÅu
+ætÄ•rÄ­6tÅv
+ætÄ•rÄ­6tÅÌn
+ætÄ•rÄ­6tÅÌq
+ætÄ•rÄ­6tÅÌu
+ætÄ•rÄ­6tÅÌv
+ætÄ•rÄ­Ì4
+ætÄ•6rÄ­ÌÄ•
+ætÄ•6rÄ­Ìt
+ætĕ3rŭ
+ætÄ•Ì6rÄ•6rÄ­
+ætÄ•Ì4rÄ«
+ætÄ•Ì6r5Ä­Ä«
+ætÄ•Ì6r5Ä­t.
+ætÄ•Ì6r5Ä­6tÄ
+ætÄ•Ì6rÄ­6tÄ•
+ætÄ•Ì6rÄ­6tÅ
+æté6re6ri
+æté4r5es
+æté4ri.
+æté4rie
+æté4riē
+æté4r5ii
+æté4r5iī
+æté4r5is
+æté4rit
+ætér5it.
+ætér5ita
+ætér5i6tÄ
+ætéri6te
+ætéri6ti
+ætéri6to.
+ætéri6tÅ
+æ3tr
+æu2
+æū2
+2æŭ
+æ2ŭs
+æ2Å­Ì
+2æ2ú
+æx2
+æ2x3u
+Ç£1
+2Ç£a
+Ç£a2b1
+Ç£a2m
+Ç£2a3n
+Ç£2a3q
+2Ç£2Ä
+2ǣă
+ǣ2ăn
+ǣ2ă3q
+ǣ2ău
+ǣ2ăv
+ǣăÌ2
+2ǣá2
+ǣ2ám
+ǣ3ámb
+2Ç£2Ç£
+Ç£2c3ue
+1Ç£d2
+Ç£da2r
+ǣdē2s
+Ç£2di
+Ç£2dÄ­
+Ç£3do2
+Ç£d4or
+ǣdó2
+Ç£3dÅ­
+Ç£d4Å­Ä•
+2Ç£e2
+Ç£2e3n
+Ç£2eÅ
+Ç£2e3q
+Ç£e4ra
+Ç£e4rÅ
+Ç£3es
+Ç£2eu
+ǣ2eú
+Ç£2ev
+2Ç£2Ä“
+2ǣĕ2
+Ç£2Ä•Å
+Ç£2Ä•3q
+ǣĕ4rÅ
+Ç£2Ä•Å­
+ǣĕÌ2
+ǣé2
+ǣ3és
+Ç£2g2
+Ç£ge2
+ǣgé2
+Ç£3gn
+Ç£i2
+Ç£3ic
+Ç£2is
+2Ç£2Ä«
+ǣĭ2
+ǣĭÌ2
+ǣí2
+Ç£mÅ2
+2Ç£n
+Ç£n2Ä
+Ç£3ne3
+ǣ3nē
+ǣ3nĕ1
+Ç£ni3t
+Ç£n1Ä«
+ǣní3t
+Ç£2o
+2Ç£2Å
+Ç£2Å
+ǣ2ó2
+Ç£pote4
+Ç£po4t5er
+Ç£po4t5es
+ǣpoté4
+ǣpo4tér
+ǣpo4t5és
+Ç£pÅ4tÄ•s
+ǣpó4t3e
+Ç£2quÄ
+4Ç£3que.
+4ǣquĕ.
+ǣ4quĕm
+ǣ4quĕr
+ǣ4quĕt
+Ç£4quÄ•Ì
+Ç£r2
+Ç£ra2r
+ǣ3ră
+ǣrá2
+Ç£res3
+ǣ3rē
+ǣrĕ2s3
+Ç£ro2
+ǣró2
+Ç£s2c
+Ç£s3cu
+Ç£s3cÅ­
+ǣs3cú
+Ç£s2i
+Ç£s2p
+Ç£s3pÅ
+Ç£st2
+Ç£sti5t4
+ǣstí3
+ǣstít4
+Ç£te5ram
+Ç£te5ran
+Ç£te5rar
+Ç£te6re6ri
+ǣte6re6rí
+Ç£te6reru
+Ç£te4r5es
+ǣte6réri
+ǣte4r5és
+ǣter5iē
+ǣter5iī
+Ç£te5rim
+Ç£ter5i6tÄ
+Ç£teri6te
+Ç£te5riti
+ǣte5rití
+Ç£te5rito
+Ç£teri6tÅ.
+Ç£teri6tÅn
+Ç£teri6tÅq
+Ç£teri6tÅu
+Ç£teri6tÅv
+Ç£teri6tÅÌn
+Ç£teri6tÅÌq
+Ç£teri6tÅÌu
+Ç£teri6tÅÌv
+ǣte5ritó
+Ç£te5r6i5tur
+ǣte5ritúr
+Ç£te4r3Ä«4
+Ç£terÄ«Ì4
+ǣterí4
+ǣte4ríe
+ǣte4rít
+Ç£te3ro
+Ç£te3rÅ
+Ç£te5run
+ǣtĕ4r3ī4
+Ç£tÄ•rÄ«Ì4
+ǣtĕ4rĭē
+ǣtĕ4r5ĭī
+ǣtĕ4rĭt
+Ç£tÄ•r5Ä­6tÄ
+ǣtĕrĭ6tĕ
+ǣtĕ5rĭtĭ
+Ç£tÄ•rÄ­6tÅ.
+Ç£tÄ•rÄ­6tÅn
+Ç£tÄ•rÄ­6tÅq
+Ç£tÄ•rÄ­6tÅu
+Ç£tÄ•rÄ­6tÅv
+Ç£tÄ•rÄ­6tÅÌn
+Ç£tÄ•rÄ­6tÅÌq
+Ç£tÄ•rÄ­6tÅÌu
+Ç£tÄ•rÄ­6tÅÌv
+Ç£tÄ•rÄ­Ì4
+Ç£tÄ•6rÄ­ÌÄ•
+Ç£tÄ•6rÄ­Ìt
+ǣtĕ3rŭ
+Ç£tÄ•Ì6rÄ•6rÄ­
+Ç£tÄ•Ì4rÄ«
+Ç£tÄ•Ì6r5Ä­Ä«
+Ç£tÄ•Ì6r5Ä­t.
+Ç£tÄ•Ì6r5Ä­6tÄ
+Ç£tÄ•Ì6rÄ­6tÄ•
+Ç£tÄ•Ì6rÄ­6tÅ
+ǣté6re6ri
+ǣté4r5es
+ǣté4riē
+ǣté4r5iī
+ǣté6r5it.
+ǣté6rita
+Ç£té6r5i6tÄ
+ǣté6ri6te
+Ç£té6ri6tÅ
+Ç£u2
+Ç£3ue.
+Ç£ue2r
+ǣ3uĕ.
+ǣū2
+2ǣŭ
+Ç£2Å­s
+Ç£2Å­Ì
+2ǣ2ú
+ǣ3úmb
+Ç£3ve.
+ǣ3vĕ.
+Ç£x2
+Ç£2x3u
+Ç£2Ì
+Ç£Ì3da
+Ç£Ì3dă
+Ç£Ì3e2r
+Ç£Ì3es
+Ç£Ì3Ä•2r
+Ç£Ì2g2
+Ç£Ì3gn
+Ç£Ì4gr
+Ç£Ì1i2
+Ç£Ì1Ä­2
+Ç£Ì3l
+Ç£Ì2mu
+Ç£Ì2mÅ­
+2Ç£Ì3n
+3Ç£Ì4qua
+3Ç£Ì4quÄ
+3Ç£Ì4quă
+5Ç£Ì4quem
+5Ç£Ì4quer
+5Ç£Ì4quet
+3Ç£Ì4quÄ“
+5Ç£Ì4quÄ•m
+5Ç£Ì4quÄ•r
+5Ç£Ì4quÄ•t
+3Ç£Ì4quo
+3Ç£Ì4quÅ
+3Ç£Ì4quÅ
+Ç£Ìs4ca
+Ç£Ìs4ci
+Ç£Ìs4cÄ«
+Ç£Ìs4cÄ­
+Ç£Ìs4ta
+Ç£Ìs4tă
+Ç£Ìs4tÇ£
+Ç£Ìs4te
+Ç£Ìs4tÄ“
+Ç£Ìs4tÄ•
+Ç£Ìs4tÄ«
+Ç£Ìs4tÅ
+Ç£ÌtÄ•3
+Ç£Ì4th
+ǽ1
+2ǽ2a
+2ǽ2Ä
+ǽ2ă
+2ǽæ
+ǽc3ue
+ǽ3da
+ǽ3dă
+ǽ2e
+ǽ3e2r
+ǽ3es
+ǽ2ĕ
+ǽ3ĕ2r
+ǽ3ĕs
+ǽg2
+2ǽi2
+ǽ2is
+2ǽ2ī
+ǽĭ2
+ǽ2mu
+ǽ2mŭ
+2ǽn
+ǽ3ne
+ǽ3nĕ
+ǽ2o
+ǽ2Å
+ǽ2Å
+ǽ2qua
+3ǽ2quÄ
+3ǽ2quă
+4ǽque.
+ǽ4quem
+ǽ4quer
+ǽ4ques
+ǽ4quet
+3ǽ2quē
+3ǽ4quĕm
+3ǽ4quĕr
+3ǽ4quĕt
+ǽ2quo
+3ǽ2quÅ
+3ǽ2quÅ
+ǽr2
+ǽ3ră
+ǽst2
+ǽ2stu
+ǽte1
+ǽtĕ3
+ǽu2
+ǽ2um
+ǽ2ŭ
+ǽ3ŭt
+ǽ2x
1b
-2bb
+3ba.
+bab2o
+bab4u
+ba2c
+ba3ci
+ba3cí
+b2acu
+b2acú
+2b1a2d3
+3bae
+b2aeq
+b2aeu
+b2aev
+ba2g
+ba3gē
+ba3gu
+ba3gú
+ba3ian
+ba3ián
+ba3ion
+ba3ió
+ba2it
+ba3iú
+b1a2l
+b2ami
+b2an
+b2ap
+b1a2q
+ba3que
+ba2rÄ
+b2a2ru
+5barum
+ba4sp
+bas5pe
+bas3t
+bas5te
+bas5tr
+b3a2tr
+ba4uen
+ba4ueq
+ba4ueu
+ba2uī
+ba2uo
+ba2uÅ
+ba2uó
+ba2uu
+ba2uú
+3bav
+ba4ven
+ba4veq
+ba4vev
+b3a2vī
+b3a2vo
+b3a2vÅ
+ba2vó
+b3a2vu
+ba2vú
+2b1a2x
+b1Äc
+2b1Ä2g
+bÄ2ic
+bÄ2Ä­
+b2Än
+b2Är
+b3Ä2tr
+b3ÄÌc
+2b3ÄÌ2g
+b1ăb
+3bă2c
+bă3cŭ
+b1ă2d3
+bă2g
+bă3gē
+bă3gŭ
+3bă2l
+băm3
+b2ăn
+b2ăp
+b1ă2q
+b3ă2rÅ
+3bărr
+bă4sp
+băs5pĕ
+băs3t
+băs5tĕ
+băs5tr
+b2ăt
+bă4uĕn
+bă4uĕq
+bă4uĕu
+b3ă2uī
+b3ă2uÅ
+b3ă2uŭ
+bă4vĕn
+bă4vĕq
+bă4vĕv
+b3ă2vī
+b3ă2vÅ
+b3ă2vŭ
+b1ă2x
+3băÌc
+b3ăÌ2d3
+b2ăÌn
+b3ăÌ2u
+b3ăÌ2v
+b3ăÌ2x
+b2áb
+b1ác
+2b1á2d3
+b2áeu
+b2áev
+2b1á2g
+bá3ian
+b2án
+bá2ru
+b3ásp
+b2áu
+bá4uen
+bá4ueq
+bá4ueu
+bá4ven
+bá4veq
+bá4vev
+2b1á2x
+b1æ2
+b2æ3q
+b2æu
+bæ3ue
+bæ3uĕ
+b2æ3v
+b1Ç£2
+b2Ç£3q
+b2Ç£u
+bǣ3ue
+bǣ3uĕ
+b2Ç£3v
+b2Ç£Ì
+b3Ç£Ìm
+b2ǽq
+b2ǽu
+b2ǽv
+2bb2
+b3ba
+bba3q
+b3bÄ
+b3bá
+b3bæ3
+b3bǣ
+b3bǽ
+b3be3
+b3bē
+b3bé
+b3bi
+b3bī
+bbī3u
+bbī3v
+b3bí
+b3bo
+b3bÅ
+b3bó
+b3bu
+b3bÅ­
+b3bú
+2bc
2bd
-2bh
-b2l
-2bm
-2bn
-2bp
-b2r
-2bt
-2bs
-b3s2t
-2b.
-.b2
+bde2s
+bdē2s
+b3do
+bd4or
+bdū3r
+be2a
+3beæ
+3beǽ
+3bec
+becÄ«Ì3
+b1ed2
+be2dÄ
+be2de
+be2dē
+be2dé
+be2d4i
+be2dī
+be2dí
+be2d4o
+be2dÅ
+be2dó
+be2du
+be2dú
+3be2e
+3beé
+b1e2g
+3bei
+be3iǣ
+be3iē
+3beí
+b2el
+b2em
+b2en
+be4n3ia
+be2o
+b1e2q
+be3ra
+be5ra.
+be5raq
+be5rau
+be5rav
+be3r2æ3
+be3r2Ç£
+ber2e
+3berea
+3bereá
+3bereæ
+3bereǽ
+be4rec
+3beree
+3bereé
+3berei
+3bereí
+3bereo
+3bereó
+3bereú
+bere5x4
+be3rē
+3beréa
+be4réc
+3berée
+b3eréx
+ber4i
+be3ria
+be3riá
+be3rib
+be3ri5c
+3be3rie
+3be3rié
+be3rii
+be3rií
+3be3ri3n
+be5rite
+be3riu
+be3riú
+be3riv
+be3rī
+be4ríg
+3berín
+be4rít
+be4rn
+be3ro
+be3rÅr
+be3rÅs
+be4rq
+3berúm
+be4rún
+be4rv
+be2s
+be4sa
+be4si
+be4sn
+be4so
+be4sq
+2best
+be4su
+be4sv
+b1e2u
+2beun
+b1eú
+b2ev
+b1e2x
+b2Ä“b
+2b1Ä“2d
+b1Ä“2g
+bē6iaene
+bē6iaeue
+bē6iaeve
+bē4iam
+bē4ian
+bÄ“4iÄne
+bÄ“6iÄque
+bÄ“4iÄru
+bÄ“4iÄrú
+bÄ“6iÄsne
+bÄ“6iÄsue
+bÄ“6iÄsve
+bÄ“4iÄue
+bÄ“4iÄve
+bÄ“6iÄÌne
+bÄ“6iÄÌru
+bÄ“6iÄÌue
+bÄ“6iÄÌve
+bē6iáene
+bē6iáeue
+bē6iáeve
+bē4iám
+bē4iæne
+bē6iæque
+bē4iæue
+bē4iæve
+bē4iǣne
+bē6iǣque
+bē4iǣue
+bē4iǣve
+bÄ“6iÇ£Ìne
+bÄ“6iÇ£Ìue
+bÄ“6iÇ£Ìve
+bē4iǽne
+bē6iǽque
+bē4iǽue
+bē4iǽve
+bē6iīsne
+bē6iīsue
+bē6iīsve
+b2Ä“m
+b2Ä“n
+bē3ne
+bē2s
+bē4sa
+bēs3tĭ
+b2Ä“u
+b2Ä“v
+2b3Ä“Ì2d
+bÄ“Ì2g
+bÄ“Ì3l2
+b2Ä“Ìm
+bÄ“Ì2s
+b3Ä“Ìse
+b3Ä“ÌsÄ•
+b3Ä“ÌsÄ«
+b3Ä“Ìss
+b3Ä“Ìst
+b2Ä“Ìu
+b2Ä“Ìv
+3bĕ.
+3bĕa
+bĕ2ă
+3bĕæ
+3bĕǣ
+3bĕc
+bÄ•cÄ«Ì3
+b1Ä•d2
+bĕ3da
+bÄ•2dÄ
+bĕ4dă
+bĕ2dē
+bĕ2dĕ
+bĕ2dī
+bĕ2d4ĭ
+bÄ•2dÅ
+bÄ•2dÅ
+bĕ2dŭ
+3bĕē
+3bĕĕ
+3bĕī
+3bĕl
+b2Ä•m
+3bĕ2q
+bĕ3r2a
+bĕ3r2æ
+bĕ3r2ǣ
+bĕ3rē
+bĕ3r4ĕ
+bĕ3rī
+bÄ•3rÅ
+b3Ä•rÅ­n
+b1Ä•s
+b2Ä•t
+3bĕu
+2bĕŭn
+3bĕv
+2b1Ä•x
+bÄ•Ì4dÄ­
+bÄ•Ì2q
+bÄ•Ì3rÄ•
+b1éd
+bé2di
+b1é2g
+bé1i
+bé3ie
+bé3iē
+b2él
+b2é1m
+bé4n3ia
+3béra
+3bérie
+bé4rig
+bé4rim
+bé4riti
+bé2ru
+bé2s
+bé4sa
+b3ése
+b3ési
+b3éss
+b3ést
+b1é2x
+2bf
+b1h
+bi2a
+3b2ia.
+3b2ian
+3b2iaq
+3b2iau
+3b2iav
+b2iÄ
+b4iÄÌn
+2biă
+3b4iáni
+3b4iáno
+b2iæ
+b2iǣ
+b2iǽ
+b1i2c
+b1ie
+3bieg
+b1iē
+2biĕ
+b1ié
+3biég
+2b1i2g
+5bigena
+5bigenÄ
+5bigená
+5bigenæ
+5bigenǣ
+5bigenǽ
+5bigenen
+5bigeneq
+5bigeneu
+5bigenev
+5bigenē
+5bigené
+5bigeni
+5bigenī
+5bigení
+5bigeno
+5bigenÅ
+5bigenó
+5bigenu
+5bigenú
+5bigéna
+5b4igéne
+bi4g3n
+b1ii
+3b4iis.
+3b4iisn
+3b4iisq
+3b4iisu
+3b4iisv
+b2iī
+3biīs
+3biÄ«Ìs
+2biÄ­
+3b4iísn
+3b4iísq
+3b4iísu
+3b4iísv
+b2il
+b1in
+b3int
+3b2io
+bio2s
+b2iÅ
+b2ió
+2b1i2r
+b4i3ter
+bi4tio
+bi4tiÅ
+4b3i4tud
+4bi4tui.
+4bi4tuin
+4bi4tuiq
+4bi4tuiu
+4bi4tuiv
+4bi4tuī.
+4bi4tuīn
+4bi4tuīq
+4bi4tuīu
+4bi4tuīv
+6bi6tuÄ«Ìn
+6bi6tuÄ«Ìq
+6bi6tuÄ«Ìu
+6bi6tuÄ«Ìv
+4bi4tuín
+4bi4tuíq
+4bi4tuíu
+4bi4tuív
+4b3i4tuú
+bi4tūd
+bi4tūs
+4bi4túd
+b1iu
+bi3u2b
+2bi2ue
+2bi2ué
+4bi4uim
+4bi4uin
+4bi4uiq
+4bi4uis
+4bi4uit
+4bi4uiue
+bi3uī
+2bi2uí
+3biuía
+b2ium
+2biun
+b2ius
+b2iús
+b1iv
+bi2ve
+2bi2vé
+4bi4vim
+4bi4vin
+4bi4viq
+4bi4vis
+4bi4vit
+4bi4viv
+bi3vī
+2bi2ví
+3bivía
+bi2x3
+b1Ä«
+2bī2b
+3bī3c
+bī2mi
+bī2mĭ
+bī2r
+b3Ä«2to
+b3Ä«2tÅ
+b3ī2tó
+bī2u
+bī2v
+bÄ«Ì2b
+3bÄ«Ìc
+bÄ«Ì2m
+bÄ«Ì2r
+bÄ«Ì4to
+bÄ«Ì4tÅ
+bÄ«Ì4ui
+bÄ«Ì4uÄ«
+bÄ«Ì4uÄ­
+bÄ«Ì4vi
+bÄ«Ì4vÄ«
+bÄ«Ì4vÄ­
+b2Ä­b
+b1Ä­2c
+b1Ä­Ä“
+b1Ä­Ä•
+3bÄ­Ä•g
+3bÄ­Ä•Ìg
+2b1Ä­2g
+5bĭgĕna
+5bÄ­gÄ•nÄ
+5bĭgĕnă
+5bĭgĕná
+5bĭgĕnæ
+5bĭgĕnǣ
+5bĭgĕnǽ
+5bĭgĕnē
+5bĭgĕnĕn
+5bĭgĕnĕq
+5bĭgĕnĕu
+5bĭgĕnĕv
+5bĭgĕnī
+5bÄ­gÄ•nÅ
+5bĭgĕnŭ
+5bÄ­gÄ•Ìnă
+5bÄ­gÄ•ÌnÄ•
+b4Ä­Ä«s
+b1Ä­Ä­
+b2Ä­l
+b2Ä­m
+b1Ä­n
+b4ĭ3tĕr
+bÄ­4tÄ­b
+bÄ­4tÄ­Å
+bĭ4tūd
+b3ĭ4tūs
+4bÄ­4tÅ­Ä«.
+4bÄ­4tÅ­Ä«n
+4bÄ­4tÅ­Ä«q
+4bÄ­4tÅ­Ä«u
+4bÄ­4tÅ­Ä«v
+6bÄ­6tÅ­Ä«Ìn
+6bÄ­6tÅ­Ä«Ìq
+6bÄ­6tÅ­Ä«Ìu
+6bÄ­6tÅ­Ä«Ìv
+4b3Ä­4tÅ­Å­
+bÄ­Ì4cÄ­
+6bÄ­Ì6gÄ•nÄ•
+4b5Ä­Ì4gÄ•q
+4b5Ä­Ì4gÄ•r
+4b5Ä­Ì4gÄ•u
+4b5Ä­Ì4gÄ•v
+4b3Ä­Ì4gÄ­
+4b3Ä­Ìgn
+4b3Ä­Ì4gÅ­
+bÄ­Ì4tÄ­b
+6bÄ­Ì6tÅ­Ä«.
+4b5Ä­Ì4tÅ­Å­
+3bía
+bí2ba
+bí2bo
+bí2bu
+bí2ci
+b1í2g
+4bígene
+4bígeq
+4bíger
+4bígeu
+4bígev
+2bígi
+2bí4g3n
+2bígu
+b1íi
+b2íl
+2bí2mu
+b3ínt
+2b1í2r
+2bí2to
+bí4tui.
+5bítuis
+5bítuīs
+5bítuo
+5bítuÅ
+5bítut
+4bí4uer
+4bí4ui.
+4bí4uim
+4bí4uit
+4bí4ver
+4bí4vi.
+4bí4vim
+4bí4vit
+bí2x
+2bj
+bl2
+2blÅ
+b3lu
+2blÅ­
+b2ly
+2b1m2
+2b1n2
+bne3g
+bne3u2
+bnĕ3g
+bné1
+bnéu2
+b3ni
+b3nÄ­
+bno3b2
+bnÅ3b2
+b3nu
+bn4ue
+b1o
+3bo2a
+bo4am
+boa3q
+bo2á
+bo2æ3
+bo2ǽ3
+bob2ú
+bo2e
+bo2Ä“
+bo3iá
+bo2ii
+bo2ií
+bo2i3q
+bo2iu
+bo2iv
+bo2Ä«
+boī3u
+boī3v
+boÄ«Ì3u
+boÄ«Ì3v
+bo2í
+bo2l
+b3olet
+bo3lín
+bo3líq
+bo3lís
+bo3líu
+bo3lív
+bol4u
+bo2m
+b2o1n
+bo3ni
+bo2o
+bo2Å
+bo2ó
+b2ora
+b2orá
+b2ore
+b2oré
+bo2ri
+bo3ri.
+bo3rin
+bo3riq
+bo3ris
+bo3riv
+borí3t
+bo4rn
+b2oro
+b2oró
+bo4rq
+bo2ru
+bo4rv
+3bo2s
+bo4sn
+bo4sq
+b2o4su
+bo4sv
+bo3ue
+bo3v
+b1Å2m
+b2Ån
+b1År
+bÅÌ3i
+b3ÅÌ2m
+bÅ2ă
+b1Åd
+bÅ2Ä“
+bÅ2Ä«
+bÅÄ«3u
+bÅÄ«3v
+bÅÄ«Ì3u
+bÅÄ«Ì3v
+bÅ2l
+b3ÅlÄ•t
+bÅ2Å
+b2Å3rÄ•
+bÅ3rÄ«.
+bÅ3rÄ«n
+bÅ3rÄ«q
+bÅ3rÄ«s
+bÅ3rÄ«u
+bÅ3rÄ«v
+bÅ5rÄ«Ìn
+bÅ5rÄ«Ìq
+bÅ5rÄ«Ìs
+bÅ5rÄ«Ìu
+bÅ5rÄ«Ìv
+bÅ2rÄ­
+bÅ2s
+bÅ4Ìl
+bÅÌ4lÄ•Ä
+bÅÌ4lĕă
+bÅÌ4lÄ•Å
+bÅÌ4lÄ•Å
+bÅÌ4lÅ­
+bó3ia
+bó3iæ
+bó4lea
+bó4leÄ
+bó3len
+bó4leo
+bó4leÅ
+bó3leq
+bó3leu
+bó3lev
+ból2u
+b1ó2m
+b2óra
+b2óre
+bó4rie
+bó4riē
+b2ós
+b3ósc
+2b1Å“2
+bœ4da
+bœ4dă
+bœ̄2
+bœ̄4d
+bÅ“Ì„Ì2
+bÅ“Ì2
+br2
+bra3d4
+b2rÄ
+b2rá
+b4rác
+b2ræ
+bræ2ă
+b2rǣ
+brǣ2ă
+b2rǽ
+b1re
+bre2i
+brē2i
+2bria
+2briá
+b2rim
+b1rī
+b2rÄ­d
+b4rÄ­Ä“
+2brÄ­Ä•
+b2rÄ­m
+b1ro
+b2rot
+b1rÅ
+b4rÅt
+b1ru
+b2rus
+b1rÅ­
+b2rÅ­s
+b4rÅ­Ìs
+b2rús
+b2ry
+b2rý
+2b1s
+b4s5caen
+b6s5caÍžen
+b6s5caÍžÌen
+b6s5ca͡en
+b6s5caÍ¡Ìen
+b4s5cáen
+b4s3cæn
+b4s3cǣn
+b4s5cÇ£Ìn
+b4s3cǽn
+b2s3ce
+b2s3cē
+b2scĕ
+b2s3cé
+b4scid
+bs6cidera
+bs6ciderá
+bs6cidere.
+bs6ciderene
+bs6cidereq
+bs6cidereu
+bs6ciderev
+bs6cideri
+bs6ciderí
+bs6cidero
+bs6cideró
+bs6cideru
+bs6ciderú
+bs6cidére
+bs6cidérim
+bs6cidérit
+bs6cidéru
+bs6cidi.
+bs6cidimus
+bs6cidimús
+bs6cidin
+bs6cidiq
+bs6cidis
+bs6cidit.
+bs6ciditn
+bs6ciditq
+bs6ciditue
+bs6ciditv
+bs6cidiu
+bs6cidiv
+bs6cidín
+bs6cidíq
+bs6cidíss
+bs6cidíst
+bs6cidítn
+bs6cidítq
+bs6cidítu
+bs6cidítv
+bs6cidíu
+bs6cidív
+bs4ciss
+b2scī
+bs2cÄ­
+b4scíd
+bs6cídera
+bs6cíderi
+bs6cídero
+bs6cídimus
+bs4císs
+b4scísu
+bs2e
+bs2q
+bs2ta
+bs2tÄ
+bs2tă
+bs2tá
+b5s4tem.
+b5s4temn
+b5s4temq
+b5s4temu
+b5s4temú
+b5s4temv
+b4sten
+b5s6tent.
+b5s6tentn
+b5s6tentq
+b5s6tentue
+b5s6tentv
+bs4tern
+bs4tes
+bs4tet
+b5s4tēmu
+b5s4tēmŭ
+b5s4tēmú
+bs4tēs
+bs4tēt
+b7s6tÄ“Ìmu
+b7s6tÄ“ÌmÅ­
+bs4tÄ“Ìs
+bs4tÄ“Ìt
+bs4tĕm
+b4stĕn
+b5s6tĕnt.
+b5s6tĕntn
+b5s6tĕntq
+b5s6tĕntu
+b5s6tĕntv
+bs4tĕrn
+bs4tĕt
+bs4tÄ•Ìm
+bs6tÄ•Ìntn
+bs6tÄ•Ìntq
+bs6tÄ•Ìntu
+b6stÄ•ÌntÅ­
+bs6tÄ•Ìntv
+bs6tÄ•Ìrn
+bs4tÄ•Ìt
+b4stémi
+bs4témn
+bs4témq
+bs4tému
+bs4témv
+b5s6téntn
+b5s6téntq
+b5s6téntue
+b5s6téntv
+bs4térn
+bs4tés
+bs4tét
+b5stit
+b5stÄ­t
+b5s4tÄ­Ìt
+b4stín
+bs4tít
+b2sto
+b3s4to.
+b3s4ton
+b3s4toq
+b3s4tou
+b3s4tov
+bs2tÅ
+b2stÅ
+b5s4tón
+b5s4tóq
+b5s4tóu
+b5s4tóv
+bs4trar
+bs4tras
+bs4trat
+bs4trau
+bs4trav
+bs4trÄr
+bs4trÄs
+bs4trÄt
+bs4trÄu
+bs4trÄv
+bs6trÄÌr
+bs6trÄÌs
+bs6trÄÌt
+bs6trÄÌu
+bs6trÄÌv
+b4stră
+bs4trár
+bs4trás
+bs4trát
+bs4tráu
+bs4tráv
+b2sue
+2bt2
+btes5t
+bte6ste
+btē6ste
+btē6stĕ
+b3tu
+btū3s
+bu3b2
+bu4lue
+2bum
+4b3undÄ
+b2uni
+b2uní
+buol5ue
+buol5ué
+buol5ui
+buol5uī
+buol5uí
+b1ur
+bur5ue
+3bus
+b4us.
+busa4t
+bu2s3Ä2
+bu2se
+b4usn
+bu4so
+bu2só
+bu2sp
+b4usq
+bu2su
+bu2sú
+b4usv
+b1Å«n
+b1Å«r
+bū3rĭ
+bū2su
+2b3Å«Ì4s
+b2Å­Ä“
+b2Å­Ä•
+b2Å­Ä«
+b2Å­Ä­
+2bÅ­m
+b2Å­2s
+b4Å­s.
+b4Å­sn
+b4Å­sq
+b4Å­su
+b4Å­sv
+3b2Å­Ìl
+b2úl
+2búll
+6búndans
+6b5úndant
+4b5úndat
+4b5úndem
+6b5úndent
+4b5úndes
+4b5úndet
+3bú2s
+bú4sa
+b2y
+b2ȳ
+b2ý
1c
-2cc
-c2h2
-c2l
-2cm
-2cn
+c2a
+cab2
+ca3d2
+cad4u
+3caena
+3caenÄ
+3caenă
+3caená
+3caene
+3caenē
+3caenĕ
+3caené
+3caeno
+3caenÅ
+3caenó
+3caenu
+3caenÅ­
+3caenú
+cae4sp
+ca2ie
+ca2ii
+ca2iÅ
+3cam
+ca3ni
+ca3ní
+3cant
+3car
+ca3rē
+car4uī
+caspe3
+cas3t
+cas5tr
+3cat.
+cate3i
+2catē
+catē3i
+catÄ“Ì5i
+caté3i
+3catn
+3catq
+3catu
+3catv
+ca2u3a
+ca2u3á
+ca2v3a
+ca2vá
+ca2x3
+5caÍžena
+5caÍženÄ
+5ca͞enă
+5ca͞ená
+5caÍžene
+5ca͞enē
+5ca͞enĕ
+5caÍženÅ
+5caÍženu
+5caÍženÅ­
+5ca͞enú
+5caÍžÌena
+5caÍžÌenÄ
+5caÍžÌenă
+5caÍžÌene
+5caÍžÌenÄ“
+5caÍžÌenÄ•
+5caÍžÌenÅ
+5caÍžÌenu
+5caÍžÌenÅ­
+5ca͡ena
+5caÍ¡enÄ
+5ca͡enă
+5ca͡ená
+5ca͡ene
+5ca͡enē
+5ca͡enĕ
+5ca͡ené
+5ca͡eno
+5caÍ¡enÅ
+5ca͡enó
+5ca͡enu
+5ca͡enŭ
+5ca͡enú
+5caÍ¡Ìena
+5caÍ¡ÌenÄ
+5caÍ¡Ìenă
+5caÍ¡Ìene
+5caÍ¡ÌenÄ“
+5caÍ¡ÌenÄ•
+5caÍ¡Ìeno
+5caÍ¡ÌenÅ
+5caÍ¡Ìenu
+5caÍ¡ÌenÅ­
+cÄ5bun
+cÄ4iae.
+cÄ6iaene
+cÄ6iaeque
+cÄ6iaeue
+cÄ6iaeve
+cÄ6iaÍže.
+cÄ6iaÍžene
+cÄ6iaÍžeque
+cÄ6iaÍžeue
+cÄ6iaÍževe
+cÄ6iaÍžÌene
+cÄ6iaÍžÌeque
+cÄ6iaÍžÌeue
+cÄ6iaÍžÌeve
+cÄ6iaÍ¡e.
+cÄ6iaÍ¡ene
+cÄ6iaÍ¡eque
+cÄ6iaÍ¡eue
+cÄ6iaÍ¡eve
+cÄ6iaÍ¡Ìene
+cÄ6iaÍ¡Ìeque
+cÄ6iaÍ¡Ìeue
+cÄ6iaÍ¡Ìeve
+cÄ2iÄ
+cÄ6iáene
+cÄ6iáeque
+cÄ6iáeue
+cÄ6iáeve
+cÄ4iæ.
+cÄ4iæne
+cÄ6iæque
+cÄ4iæue
+cÄ4iæve
+cÄ4iÇ£.
+cÄ4iÇ£ne
+cÄ6iÇ£que
+cÄ4iÇ£ue
+cÄ4iÇ£ve
+cÄ6iÇ£Ìne
+cÄ6iÇ£Ìque
+cÄ6iÇ£Ìue
+cÄ6iÇ£Ìve
+cÄ4iǽne
+cÄ6iǽque
+cÄ4iǽue
+cÄ4iǽve
+cÄ4iÄ«s.
+cÄ6iÄ«sne
+cÄ6iÄ«sque
+cÄ6iÄ«sue
+cÄ6iÄ«sve
+cÄ6iÄ«Ìsne
+cÄ6iÄ«Ìsque
+cÄ6iÄ«Ìsue
+cÄ6iÄ«Ìsve
+cÄ2iu
+cÄ2iú
+cÄ3s4uÄ«
+cÄÌ5suÄ«
+c2ă
+căd2
+că2ĭ
+3căm
+că3nĭ
+3cănt
+3căr
+că3rē
+că3rĕ
+căs3
+căs5tr
+3căt.
+2cătē
+2cătĕ
+3cătn
+3cătq
+3cătu
+3cătv
+3căÌm
+căÌ5nÄ­
+3căÌr
+căÌ3rÄ“
+căÌ3rÅ
+3cáena
+3cáenÄ
+3cáenă
+3cáene
+3cáenē
+3cáenĕ
+3cáeno
+3cáenÅ
+3cáenu
+3cáenŭ
+cá3ni
+cár4ui
+cár4uī
+cá2x
+c2æ
+3cæ.
+cæ3d
+cæ3n2
+3cæna
+3cænÄ
+3cænă
+3cæná
+3cænæ
+3cænǽ
+3cæne
+3cænē
+3cænĕ
+3cæné
+3cæno
+3cænÅ
+3cænó
+3cænu
+3cænŭ
+3cænú
+3cæq
+cæ2s3p
+c2Ç£
+3cǣ.
+cǣ3d
+cǣn2
+3cǣna
+3cÇ£nÄ
+3cǣnă
+3cǣná
+3cǣnǣ
+3cǣne
+3cǣnē
+3cǣnĕ
+3cÇ£nÅ
+3cǣnu
+3cǣnŭ
+3cǣnú
+3cǣq
+cǣ2s3p
+3cÇ£Ìna
+3cÇ£ÌnÄ
+3cÇ£Ìnă
+3cÇ£ÌnÇ£
+3cÇ£Ìne
+3cÇ£ÌnÄ“
+3cÇ£ÌnÄ•
+3cÇ£ÌnÅ
+3cÇ£Ìnu
+3cÇ£ÌnÅ­
+3cǽna
+3cǽnÄ
+3cǽnă
+3cǽnæ
+3cǽne
+3cǽnē
+3cǽnĕ
+3cǽno
+3cǽnÅ
+3cǽnu
+3cǽnŭ
+cǽ2sp
+2cc2
+2c2d2
+c3du
+c3dÅ­
+c2e
+3ce2a
+3ceá
+3ceæ
+3ceǽ
+3ceb
+ce3d2
+ced4o
+3ce2e
+3ceé
+3ce2i
+3ceí
+3cemú
+4c5e4nare
+4c5e4naré
+6c5e6nari.
+6cenarib
+6c5e6narin
+6c5e6nariq
+6c5e6naris
+6c5e6narit
+6c5e6nariue
+6c5e6nariv
+6c5e6narín
+6c5e6naríq
+6c5e6narís
+6c5e6naríu
+6c5e6narív
+4c5e4náre
+6c5e6nári.
+6cenárib
+6c5e6náris
+6c5e6nárit
+4c3ennÄ
+3cent
+3ce2o
+3ceó
+cepe3
+ce3ra
+ce3r2æ3
+ce3r2Ç£
+2cerb
+ce3rē
+ce3r4i
+ce3rī
+ce3ro
+ce3rÅ
+cer5ue
+cer3uē
+cer3ué
+ce3run
+ce2sp
+ce2sq
+ce2su
+3cet
+cete3
+cete5r4
+ceteri5u
+ceteri5v
+ce4ua.
+ce4uam
+ce4uan
+ce4uaq
+ce4uau
+ce4uÄ.
+ce4uÄn
+ce4uÄq
+ce4uÄu
+ce4uÄÌ
+ce2uă
+ce2uá
+ce4uÄ«Ì
+ce2uí
+3ceum
+ce2un
+3ceus
+3ceú
+3cē.
+cē2i
+4c5Ä“4nÄre
+4c5Ä“4nÄrÄ“
+4c5Ä“4nÄrÄ•
+4c5Ä“4nÄré
+6cÄ“nÄrib
+6c5Ä“6nÄris
+6c5Ä“6nÄrit
+4c5Ä“4nÄrÄ«
+6cÄ“nÄrÄ­b
+6c5Ä“6nÄrÄ­s
+6c5Ä“6nÄrÄ­t
+6c5Ä“6nÄrÄ­Ìs
+6c5Ä“6nÄrís
+6c5Ä“6nÄÌre
+6c5Ä“6nÄÌrÄ“
+6c5Ä“6nÄÌrÄ•
+6cÄ“nÄÌrib
+6c5Ä“6nÄÌris
+6c5Ä“6nÄÌrit
+6c5Ä“6nÄÌrÄ«
+6cÄ“nÄÌrÄ­b
+6c5Ä“6nÄÌrÄ­s
+6c5Ä“6nÄÌrÄ­t
+cē3ne
+cēpe3
+cēper4
+cēpĕ5r
+3cēq
+cēte3
+3cēu
+3cēv
+c2Ä•
+cĕ2ă
+cĕ3d
+cĕ2ĭ
+4c3Ä•nnÄ
+cĕ3r2a
+cĕ3r2æ
+cĕ3r2ǣ
+2cĕrb
+cĕ3rē
+cĕ3r4ĕ
+cĕ3rī
+cÄ•3rÅ
+cĕ3rŭ
+cĕ2s
+cÄ•Ì3rÄ•
+3cÄ•Ìu
+3cÄ•Ìv
+c2é
+3céa
+3céb
+céd2
+3cée
+cé2i
+3céne
+3cént
+3céq
+2cérb
+3cét
+3céu
+cé4ua.
+cé4uan
+cé4uÄ.
+cé3ue
+3cév
+2ch.
+5chane
+3chă.
+3chăm
+3chănĕ
+3chăq
+3chău
+3chăv
+3chăÌm
+4cháng
+che1
+che2i
+che2s
+chē2i
+chĕ1
+ch4lÄ­
+2chm
+2chn
+2cht
+c2i
+ci2a
+ci4an
+ci3b
+3cida
+3cidá
+cide4i
+cidē4i
+3cido
+3cidó
+3cid4u
+3cidú
+cig3
+ci4gn
+ci2i
+cin2Ä
+2cind
+cin4e
+cin4é
+3cisa
+3cisá
+3cisæ
+3cisǽ
+ci4s3c
+cis5ci
+3cise
+3cis2i
+3cisí
+3ciso
+3cisó
+4cissa
+4cissÄ
+4cissá
+4cissæ
+4cissǣ
+4cissǽ
+4cissī
+4cisso
+4cissÅ
+4cissó
+4cissu
+4cissū
+4cissú
+ci4s3t
+cis5ta
+cis5tÄ
+cis5té
+3cisú
+3citÄ
+cī3s4uī
+c2Ä­
+cÄ­3b
+cÄ­n2a
+cÄ­n2Ä
+cĭn2æ
+2cÄ­nd
+cĭnĭ5tĕ
+cÄ­nÄ­5tÅ
+cÄ­4st
+cÄ­s5tÄ
+cĭs5tă
+3cÄ­tÄ
+3cĭtă
+4cÄ­Ìnd
+4cÄ­Ìssa
+4cÄ­ÌssÄ
+4cÄ­Ìssă
+4cÄ­Ìssæ
+4cÄ­ÌssÇ£
+4cÄ­ÌssÄ«
+4cÄ­ÌssÅ
+4cÄ­ÌssÅ«
+4cÄ­ÌssÅ­
+cí3b
+cí3d
+cíg3
+cí4gn
+2cínd
+4císsa
+4císsÄ
+4císsæ
+4císsǣ
+4císsī
+4císso
+4císsÅ
+4císsu
+4císsū
+cís3t
+cí3tuī
+cí3tur
+cí3tuu
+2cj
+c2l2
+c4lei
+c4leī
+c4leí
+c4leo
+c4leÅ
+c4leó
+c4leu
+c4leú
+c4leÍž
+c4le͡
+c3lĕg
+c3léc
+c3léx
+2c2m2
+2c1n2
+cn4Ä“3m
+3co.
+co2a3q
+co3Ä
+coǣ4u
+coǣ4v
+c2o3b2
+cobo3l
+coco5m
+coc5te
+co3ea
+co3eÄ
+co3eá
+co2ia
+co3it
+coī2
+coī4n
+coÄ«Ì4
+coí2t
+co3l4u
+com1
+co4me4d
+co4me4s
+co2mē
+comē4d
+comē4s
+comÄ“Ì4d
+comÄ“Ì4s
+co4mé4d
+comé4s
+co4mit
+comí4t
+co4míte
+3con1
+4conc
+co4nia
+co4niá
+co4niē
+co4niú
+cons2
+co3Å
+co2pī
+3coq
+3cor
+co3re
+co3rī
+cot4e3
+co5ter
+3cou
+3cov
+2cÅnc
+cÅn3s2
+cÅ3r
+cÅ3Ä
+cÅÇ£4u
+cÅÇ£4v
+c2Åb2
+cÅcÅ3m4
+cÅc5tÄ•
+cÅÄ«2
+cÅÄ«4q
+cÅÄ«Ì4
+cÅÄ­2
+cÅ3Ä­t
+cÅÄ­Ì2
+cÅ2m1
+cÅmÄ“4d
+cÅmÄ“4s
+cÅmÄ“Ì4d
+cÅmÄ“Ì4s
+cÅmÄ•2
+cÅm3Ä•d
+cÅmÄ­Ì4
+cÅ3Å
+cÅ3pÄ•
+cÅ2pÄ«
+3cÅr
+cÅ3rÄ«
+cÅ4rs
+cÅ3t4Ä•
+cÅtÄ•3r
+3cÅÌ
+cÅÌ3g2
+cÅÌ3Ä«
+cÅÌ4m3Ä“
+cÅÌ3rÄ­
+cób2
+cóbo3
+có3ea
+có3eÄ
+có3em
+cóg2
+có3ie
+có1ī
+có3l2u
+có4mes
+có2m3ē
+cómi4ta
+cóm5ita.
+cóm5i4tÄ
+cómi6te.
+cóm5itē
+cómi4ti
+cóm5iti.
+cóm5i4tī
+cómi4to
+cóm5i4tÅ
+cóm5i6tum
+4cónc
+có4nia
+có4niu
+cón3s
+có2nu
+cót4e3
2cq
-c2r
-2cs
+cqui4
+cquid3
+cquí2
+cquíd3
+c2r2
+3cra
+3cră
+cræ2ă
+crǣ2ă
+cre3d4
+cre5di
+cred6it
+cre5mi
+cre5mo
+cre2o
+cre3r
+cres3
+crēs3
+2crĕ.
+2crĕq
+2crĕu
+2crĕv
+2cri3n
+2crip
+cri6spé
+2crī
+3crīm
+3crÄ«Ìm
+2crĭă
+2crÄ­b
+crĭ6spĕ
+2crÄ­Å­
+3crím
+cros2
+3crÅ
+crÅs2
+3crÅ­
2ct
-2cz
-2c.
-.c2
+ct3enn
+cte5re
+ct3Ä•nn
+ctĕ3rĕ
+ct3énn
+c3tr
+cu3b2
+cud2
+cuda3
+2c1uĕ
+cu3ia
+cu3iá
+cu3iæ
+cu3iǽ
+cu3ii
+cu3ií
+cu3io
+cu3ió
+cu3ium
+cu3ius
+cu3iú
+cule4i
+4culix
+4culíx
+2culp
+3cu2m1
+cuma2
+cu3men
+cum3i2
+cumÄ«Ì4
+cumí2
+cumín3
+2c3unc
+2c3unx
+c2uo
+cupe3
+cuper4a
+cuper4Ä“
+cu3ré
+3cus
+cus4á
+cu2s3p
+c2Å«l
+c1Å«n
+3cūq
+cū3rē
+cū3rĕ
+cū3ré
+cū3rĭ
+3cūs
+cū2su
+3cūu
+3cūv
+c2Å­
+2cŭăr
+2cŭăt
+cÅ­3b2
+2cÅ­Ä“s
+2cÅ­Ä•t
+2c3Å­2lÄ­
+3cÅ­2m
+cÅ­m3Ä“
+cÅ­mÄ«Ì4
+cÅ­m3Ä­
+cÅ­mÄ­Ì4
+cÅ­mÄ­Ìn5
+2cÅ­Å
+cŭpĕ5rĕ
+3cÅ­2s
+2cÅ­Å­n
+cÅ­Ì3b
+cÅ­Ìm3Ä­
+3cÅ­Ìs
+cúb2
+cú3ia
+cú3io
+cú3ium
+cú3ius
+2cúlp
+3cúm
+cú2ma
+cú2m3i2
+2c3únc
+2c3únx
+3cús
+2cv
+2c2x2
+cy4gn
+cype3
+cý4gn
1d
-2dd
-2dg
+d2ab2
+d1ac
+2d1ad
+da2dó
+dad2u
+dad2Å«
+dad2ú
+3dae
+d2aeu
+d2aev
+2d1a2g
+da4g3n
+d2al
+da4mab
+da4mand
+da4mane
+da4mans
+da6mant.
+d6amante
+da6mantn
+da6manto
+da6mantó
+da6mantq
+da6mantu
+da6mantú
+da6mantv
+da4maq
+da4mat
+da4mau
+da4mav
+da2má
+2d3a2me
+2d3a2mē
+da2mé
+d2a3mi
+3damn
+2da2mo
+2d3a2mÅ
+da2mó
+2danc
+da2ni
+da3ni.
+da3nib
+da3nin
+da3niq
+da3nis
+da3niu
+da3niú
+da3niv
+da2p
+d2a3re
+da3ri
+3darii
+3darií
+3dario
+3darió
+3dariu
+3dariú
+da3rí
+d2aru
+d2as3
+da2x3
+3daÍ¡Ìe
+2d1Ä2g
+d2Än
+d2Är
+2d3ÄÌ4g
+d2ă3b2
+d1ăc
+d1ăd
+dă3d2ū
+d2ăg
+2d3ă2mē
+2d3ă2mĕ
+3dămn
+2d3ă2mÅ
+2d3ă2mÅ
+2dănc
+dă2p
+dă3ră
+dăs3
+d2ăt
+d2ăÌ
+d3ăÌmb
+5dăÌmnÄ
+5dăÌmnă
+5dăÌmnÄ“
+5dăÌmnÄ•m
+5dăÌmnÄ•n
+5dăÌmnÄ•r
+5dăÌmnÄ•t
+5dăÌmnÅ
+5dăÌmnÅ
+d3ăÌnÄ­
+dăÌ3rÄ“
+d3ăÌrg
+d2á
+3dáe
+dá2g
+dá4gn
+2d3ámb
+2dámp
+2dámt
+4dántr
+dá2p
+2d3árg
+dás3
+2d3áus
+dá2x
+dæ2a
+dæ2ă
+dæ2á
+dæ2i
+d2æu
+dæ3ue
+dæ3uĕ
+dæ2ŭ
+d2æ3v
+dǣ2a
+dǣ2ă
+d2Ç£u
+dǣ3ue
+dǣ3uĕ
+dǣ2ŭ
+d2Ç£3v
+d2Ç£Ìu
+d2Ç£Ìv
+d2ǽu
+d2ǽv
+2dc2
+2dd2
+dde2s
+ddē2s
+d3do
+dd4or
+d2eb
+ded2
+de2dÄ
+de2dē
+ded4i
+ded4o
+de2dÅ
+3dee
+de3es
+de3é2r
+de3és
+d2ef
+2d1eg
+de3go
+3dei
+de2ia
+de2iá
+de4ien
+de2ii
+de2ií
+de4io.
+de4ioq
+de4ior
+de4iou
+de4iov
+de4ión
+de4ióq
+de4iór
+de4ióu
+de4ióv
+de2it
+de4ium
+3deī
+3deí
+de2ma
+de2má
+de4me.
+de4meb
+de4mem
+de4mend
+de4mene
+de4mens
+de6ment.
+de6mente.
+de6mentem
+de6menten
+de6menteq
+de6mentes
+de6menteu
+de6mentev
+de6mentém
+de6mentés
+de6menti.
+de6mentia
+de6mentib
+de6mentin
+de6mentiq
+de6mentis.
+de6mentisn
+de6mentisq
+de6mentisu
+de6mentisv
+de6mentiue
+de6mentium
+de6mentiúm
+de6mentiv
+de6mentía
+de6mentín
+de6mentíq
+de6mentísn
+de6mentísq
+de6mentísu
+de6mentísv
+de6mentíu
+de6mentív
+de6mentn
+de6mentq
+de6mentu
+de6mentú
+de6mentv
+de4meq
+de4mer
+de4mes
+de4meu
+de4mev
+de2mé
+d3e4mi.
+d3e4mim
+de4mine
+d3e4miq
+d3e4mis
+d3e4mit
+d3e4miu
+d3e4miv
+d3e2mí
+d2emn
+de4mo.
+de4mone
+de4moq
+de4mor.
+de4morn
+de4morq
+de4moru
+de4morv
+de4mou
+de4mov
+de4móne
+de4móq
+de4mórn
+de4mórq
+de4móru
+de4mórv
+de4móu
+de4móv
+de4munt
+de4múnt
+d2en
+3deo
+depe4
+deper5
+deperi4
+deper7iu
+deperí4
+depé2
+depér3
+depéri4
+2d3ept
+de1r
+d2e3r2e
+dere5x4
+de3ré
+der4i
+deri5c
+de3rī
+der4í
+de3ríc
+de1s
+de4sca
+de4scá
+de4sci
+de4scí
+de4so
+de2só
+2d3ess
+des2t
+4dest.
+de4s3ta
+de4s5tÄ
+de4s3tá
+de4s5te
+de4s3tē
+de4s3té
+desti5t4
+de4s3tī
+destí5t4
+4destn
+de4s3to
+de4s3tÅ
+de4s3tó
+4destq
+de4s3tú
+4destv
+de4uĕ
+de2ul
+2deun
+deu4ra
+deu4rá
+deu4re
+deu4ré
+deu4ri.
+deu4rin
+deu4riq
+deu4ris
+deu4rit
+deu4riu
+deu4riv
+deu4rín
+deu4ríq
+deu4rís
+deu4rít
+deu4ríu
+deu4rív
+de5u4ro.
+de5u4ron
+de5u4roq
+de5u4ror
+de5u4rou
+de5u4rov
+deu4ró
+de3u4s
+deu4tan
+deu4tat
+deu4tát
+de5u4tet
+de3uti
+deu4ti.
+deu4tin
+deu4tiq
+deu4tiu
+deu4tiv
+deu4tín
+deu4tíq
+deu4tíu
+deu4tív
+de3u4to
+de3u4tó
+de3utu
+de3utú
+deū4s
+deÅ«Ì4
+deú2
+de3únc
+de3úr
+deú4s
+de3úsa
+de3úsæ
+de3úsi
+d2ev
+de2x
+dē1
+d2Ä“b
+2d1Ä“g
+dē2ia
+dÄ“2iÄ
+dē2iá
+dē2iæ
+dē2iǣ
+dē2iǽ
+dē4ien
+dē2iī
+dÄ“2iÅ
+dē2ma
+dÄ“2mÄ
+dē2mă
+dē2má
+dē4me.
+dē4mene
+dē6mente.
+dē6mentem
+dē6menten
+dē6menteq
+dē6menteu
+dē6mentev
+dē6mentē
+dē6mentém
+dē6mentib
+dē6mentis.
+dē6mentisn
+dē6mentisq
+dē6mentisu
+dē6mentisv
+dē6mentium
+dē6mentiúm
+dē6mentī
+dē6mentísn
+dē6mentísq
+dē6mentísu
+dē6mentísv
+dē6mentu
+dē6mentú
+dē4meq
+dē4mer
+dē4met
+dē4meu
+dē4mev
+dē2mē
+dē4mĕ.
+dē4mĕnĕ
+dē6mĕntē
+dē6mĕntĕ.
+dē6mĕntĕm
+dē6mĕntĕn
+dē6mĕntĕq
+dē6mĕntĕu
+dē6mĕntĕv
+dÄ“6mÄ•ntÄ•Ìm
+dē6mĕntī
+dē6mĕntĭb
+dē6mĕntĭs.
+dē6mĕntĭsn
+dē6mĕntĭsq
+dē6mĕntĭsu
+dē6mĕntĭsv
+dē6mĕntĭŭm
+dÄ“6mÄ•ntÄ­Å­Ìm
+dÄ“6mÄ•ntÄ­Ìsn
+dÄ“6mÄ•ntÄ­Ìsq
+dÄ“6mÄ•ntÄ­Ìsu
+dÄ“6mÄ•ntÄ­Ìsv
+dē6mĕntŭ
+dē4mĕq
+dē4mĕr
+dē4mĕt
+dē4mĕu
+dē4mĕv
+dÄ“4mÄ•Ì
+d3ē2mé
+dē4mim
+dē4mis
+d3Ä“4mit
+d3ē2mī
+dē4mĭm
+dē4mĭs
+d3Ä“4mÄ­t
+d3Ä“4mÄ­Ì
+dē2mí
+dÄ“4mÅ.
+dÄ“4mÅne
+dÄ“4mÅnÄ•
+dÄ“4mÅq
+dÄ“4mÅu
+dÄ“4mÅv
+dÄ“6mÅÌne
+dÄ“6mÅÌnÄ•
+dÄ“4mÅÌq
+dÄ“4mÅÌu
+dÄ“4mÅÌv
+dēm4ū
+d2Ä“n
+dē3ne
+dēpe2
+dēper5
+dēperi4
+dēperī4
+dÄ“perÄ«Ì6
+dēpĕ2
+dēpĕr5
+dēpĕrī4
+dÄ“pÄ•rÄ«Ì6
+dēpĕrĭ4
+dÄ“pÄ•Ì4
+dÄ“pÄ•Ìr5
+dÄ“pÄ•ÌrÄ­6
+dēpé2
+dēpér3
+dēpéri4
+d2Ä“r
+dÄ“2sÄ
+d2Ä“u
+d2Ä“v
+2d3Ä“Ìg
+dÄ“Ì3ic
+dÄ“Ì3Ä­c
+dÄ“Ì4ma
+dÄ“Ì4mÄ
+dÄ“Ì4mă
+d3Ä“Ì4me
+dÄ“Ì4mÄ“
+d3Ä“Ì4mÄ•
+dÄ“Ì4mim
+dÄ“Ì4mis
+dÄ“Ì4mit
+d3Ä“Ì4mÄ«
+dÄ“Ì4mÄ­m
+dÄ“Ì4mÄ­s
+dÄ“Ì4mÄ­t
+dÄ“Ì4mÅ
+dÄ“Ì4se
+dÄ“Ì4sÄ•
+dÄ“Ì3sp
+dÄ“Ì5str
+d2Ä“Ìu
+d2Ä“Ìv
+dĕ5cĭm
+dĕd2
+dÄ•2dÄ
+dĕ4dă
+dĕ2dē
+dĕd4ĭ
+dÄ•2dÅ
+dÄ•2dÅ
+dĕ2dŭ
+3dĕĕ
+dÄ•3Ä•Ì
+d2Ä•f
+3dĕ2ī
+dĕ2ĭ
+dĕ3ĭn
+dÄ•3Ä­Ìn
+dÄ•2Å
+2d1Ä•p
+dĕ3r4ĕ
+dĕ3rī
+dÄ•3rÅ
+4d3Ä•rÅ­n
+dĕs5tĕ
+d2Ä•t
+dÄ•Å«Ì2
+2dĕŭ
+3dĕŭm
+3dĕŭs
+d2Ä•Ìf
+d3Ä•Ìmp
+2d3Ä•Ìp
+dÄ•Ì2q
+dÄ•Ì3rÄ•
+3dée
+dé3es
+d2éf
+2d1ég
+dé3in
+dé2ma
+2d3é2me
+d3é4mi.
+d3é4mim
+dé4mis
+d3é4mit
+dé4mo.
+dé4mor.
+2démp
+2d1ép
+d2ér
+d3érr
+dé4sa
+dé4sn
+dé3sp
+dé4sq
+2d3éss
+4déstn
+4déstq
+4déstv
+d2ésu
+dé4sv
+dé2x
2df
-2dm
-d2r
-2ds
-2d.
-.g2
+2dg2
+2d1h
+di2a
+d2ia.
+d2iab
+d2iam
+d2ian
+d2iaq
+d2iar
+d2ias
+d2iat
+d2iau
+d2iav
+d2iÄ
+2diă
+d2iá
+2d3i2ba
+2d3i2bá
+di2be
+di2bé
+4d3i4bim
+4d3i4bis
+4d3i4bit
+di4bím
+4d3i4bís
+4d3i4bít
+2d3i2bo
+2d3i2bó
+d2ibu
+4d3i4bun
+d2ibú
+4d3i4bún
+di3cem
+di3cen
+di3ces
+d2icé
+di3cém
+di3cén
+di3cés
+di3cib
+d2i3cu
+di4c3ue
+4d3i4cul
+d2i3cú
+4d3i4cúl
+d2id
+d2ieb
+d2iem
+d2ien
+d2ies
+d2iet
+d2iēb
+d2iēm
+d2iēs
+d2iēt
+d2iéb
+d2iém
+d2ién
+d2iés
+d2iét
+2d3i2ga
+2d3i2gÄ
+2d3i2gá
+2digæ
+2digǣ
+2d3i2gǽ
+4d3i4ge.
+4d3i4gea
+4d3i4geÄ
+4d3i4geá
+4d3i4geb
+4d3i4gem
+4d5i4gend
+4d5i4gene
+4d5i4gens
+4d5i4gent
+4d3i4geo
+4d3i4geÅ
+4d3i4geó
+4d3i4geq
+4d3iger
+4d5i4ges.
+4d5i4gesn
+4d5i4gesq
+4d5i4gesu
+4d5i4gesv
+4d3i4get
+4d3i4geu
+4d3i4gev
+2d3i2gē
+di2gé
+4d3igéb
+4d3igém
+4d3igén
+5digéna
+4d3igéq
+4d3igér
+4d5igésn
+4d5igésq
+4d5igésu
+4d5igésv
+4d3igét
+4d3igéu
+4d3igév
+di2gi
+2d3i2gī
+di2gí
+dig5no.
+di5gnore
+di5gnori
+di5gnorí
+dig5norum
+dig5norúm
+di6g5nos.
+di6g5nosn
+di6g5nosq
+di6g5nosu
+di6g5nosv
+di6g5noue.
+di6g5nove.
+di5g6nóre
+2d3i2go
+2d3i2gÅ
+2d3i2gó
+2d3i2gu
+2d3i2gú
+d2iīs
+2dim.
+2d3i2ma
+2d3i2mÄ
+2d3i2má
+2di2me
+2d3i2mē
+di2mé
+4diméb
+4dimém
+4dimér
+4dimés
+4dimét
+4d3i4mi.
+4d3i4mia
+4d3i4miÄ
+4d3i4miá
+4d3imic
+4dimie
+4dimiē
+4dimié
+4dimii
+4d3i4miī
+4d3i4mií
+4d3i4mim
+di4mine
+4d3i4mio
+4d3i4miÅ
+4d3i4mió
+4d3i4miq
+4dimir
+4d3imis
+4d3imit
+4d3i4miu
+4d3i4miú
+4d3i4miv
+2d3i2mī
+2dimí
+di4míe
+di4mím
+di4mín
+di4míq
+di4míu
+di4mív
+2dimn
+2d3i2mo
+2d3i2mÅ
+2d3i2mó
+2dimq
+4d3i4mun
+di3mú
+4d3i4mún
+2dimv
+din2Ä
+din2d
+d4ine
+d4inē
+d4iné
+d4ini
+d4inī
+d4iní
+di2nu
+d4inú
+d2io.
+d2ioq
+d2ior
+d2iou
+d2iov
+d2iÅ
+2diÅ
+d2ió
+d1ip
+di2pi
+di2pī
+d2ips
+d2iq
+dir5emé
+dir5e4mí
+di2rē2
+dirÄ“Ì4
+dir5éme
+diri4m
+di5s6cende
+di5s6cens
+dispe6r5
+disperi6
+disperī6
+disperÄ«Ì6
+disperí6
+dispé4r5
+di3spi
+di3spí
+di5s4ta.
+di5s4tam
+di5s4taq
+di5s4tar
+di5s4tas
+di5s4tat
+di3s4tÄ
+di3stá
+dis4tám
+dis4tán
+dis4táq
+dis4tár
+dis4tás
+dis4tát
+di5s4tem
+di5s6tent.
+di5s6tentn
+di5s6tentq
+di5s6tentue
+di5s6tentv
+di5s6tern
+di5s4tes
+di5s4tet
+di3s4tē
+di5s4tém
+di5s6téntn
+di5s6téntq
+di5s6téntue
+di5s6téntv
+di5s6térn
+di5s4tés
+di5s4tét
+di5stím
+di5s4to.
+di5s4ton
+di5s4toq
+di5s4tou
+di5s4tov
+di3s4tÅ
+di5s4tón
+di5s4tóq
+di5s4tóu
+di5s4tóv
+di5s6trar
+di5s6tras
+di5s6trat
+di5s6trau
+di5s6trav
+di5s6trÄr
+di5s6trÄs
+di5s6trÄt
+di5s6trÄu
+di5s6trÄv
+di5s6trÄÌr
+di5s6trÄÌs
+di5s6trÄÌt
+di5s6trÄÌu
+di5s6trÄÌv
+di5s6trár
+di5s6trás
+di5s6trát
+di5s6tráu
+di5s6tráv
+di5s4trī
+d2ite
+d2ité
+di4tiÄ
+4d3i4tib
+d4itn
+d4itq
+4d3i4tui
+4d3i4tuī
+4d3i4tuí
+di4tuum
+4d3i4tuú
+di4tūs
+d4itv
+4d3i4uia
+4diuiÄ
+4diuiá
+4diuiæ
+4diuiǣ
+4diuiǽ
+4d3i4uii
+4d3i4uiī
+4d3i4uií
+4d3i4uio
+4d3i4uiÅ
+4d3i4uió
+2di2uī
+4d3i4uía
+d4ius
+2diÅ­
+d2iv
+d3i4via
+d3i4vii
+d3i4viī
+d3i4vií
+d3i4vio
+d3i4viÅ
+d3i4vió
+2di2vī
+d3i4vía
+di2xu
+2d1Ä«2b
+d2Ä«ne
+d2īnĕ
+dīo4n
+dīó2
+d2Ä«q
+d2Ä«s.
+dīs2c
+d2Ä«sn
+2dīso
+2dÄ«sÅ
+2dīsó
+d2Ä«sq
+d2Ä«su
+d2Ä«sv
+d2Ä«u
+d2Ä«v
+dī2xu
+2d3Ä«Ì2b
+d2Ä«Ìn
+d2Ä«Ìq
+d2Ä«Ìu
+d2Ä«Ìv
+d2Ä­3b
+dÄ­4cÅ­l
+d2Ä­Ä“
+d2Ä­Ä•n
+d2Ä­Ä•t
+d2Ä­Ä•Ì
+dÄ­2g
+2dÄ­ga
+2d3Ä­gÄ
+2d3ĭgă
+2dĭgá
+2dĭgæ
+2dĭgǣ
+2dĭgǽ
+2d3ĭgē
+2dĭgĕ
+d3ĭgĕ.
+d3Ä­gÄ•Ä
+d3ĭgĕă
+d3ĭgĕm
+5dĭgĕna
+5dÄ­gÄ•nÄ
+5dĭgĕnă
+5dĭgĕná
+5dĭgĕnæ
+5dĭgĕnǣ
+5dĭgĕnǽ
+d5ĭgĕnd
+d5ĭgĕnĕ
+5dĭgĕnī
+d5ĭgĕnt
+d3Ä­gÄ•Å
+d3ĭgĕq
+d3ĭgĕt
+d3ĭgĕu
+d3ĭgĕv
+d3Ä­gÄ•Ì
+5dÄ­gÄ•Ìnă
+2d3ĭgī
+2d3Ä­gÅ
+2d3Ä­gÅ­
+2d3Ä­2mÄ
+2d3ĭ2mă
+2d3ĭ2mē
+2d3ĭ2mĕ
+2d3ĭ2mī
+d3Ä­4mÄ­Ä
+d3ĭ4mĭă
+d3Ä­4mÄ­Ä«
+d3Ä­4mÄ­m
+d3Ä­4mÄ­Å
+d3Ä­4mÄ­Å
+d3Ä­4mÄ­s
+d3Ä­4mÄ­t
+d3Ä­4mÄ­Å­
+d3Ä­4mÄ­Ì
+2d3Ä­2mÅ
+2d3Ä­2mÅ
+dÄ­3mÅ­
+4d3Ä­4mÅ­n
+dÄ­n2a
+dÄ­n2Ä
+dĭn2æ
+dÄ­n2d
+d4ĭnē
+d4Ä­n2Ä•
+d4ĭnī
+d4Ä­nÄ­
+d4Ä­nÅ­
+d1Ä­p
+dĭ2pī
+dĭ2rē2
+dÄ­rÄ“Ì4
+dÄ­r3Ä•
+dÄ­2sÄ­
+dĭspĕ4r5
+dĭspĕrī6
+dÄ­spÄ•rÄ«Ì6
+dÄ­s6pÄ•Ìrn
+dÄ­3s4pÄ­
+dÄ­3s4tÄ
+dĭs4tăt
+dĭ3s4tē
+dĭ5s6tĕnt.
+dĭ5s6tĕntn
+dĭ5s6tĕntq
+dĭ5s6tĕntu
+dĭ5s6tĕntv
+dĭ5s6tĕrn
+dĭ5s4tĕt
+dÄ­5s6tÄ•Ìntn
+dÄ­5s6tÄ•Ìntq
+dÄ­5s6tÄ•Ìntu
+dÄ­5s6tÄ•Ìntv
+dÄ­5s6tÄ•Ìrn
+dÄ­5s6tÄ•Ìt
+dÄ­3s4tÅ
+dÄ­5s6trÄr
+dÄ­5s6trÄs
+dÄ­5s6trÄt
+dÄ­5s6trÄu
+dÄ­5s6trÄv
+dÄ­5s6trÄÌr
+dÄ­5s6trÄÌs
+dÄ­5s6trÄÌt
+dÄ­5s6trÄÌu
+dÄ­5s6trÄÌv
+dĭ5s4trī
+d2ĭtĕ
+dÄ­4tÄ­Ä
+d3Ä­4tÄ­b
+4d3ĭ4tūs
+4d3Ä­4tÅ­Ä«
+4d3Ä­4tÅ­Å­
+2d1Ä­2u
+2d1Ä­2v
+4d3Ä­Ì4cÅ­
+dÄ­Ì2g
+4d3Ä­Ì4gă
+4d5Ä­ÌgÄ•Ä
+4d5Ä­Ìgĕă
+6d5Ä­ÌgÄ•nÄ•
+4d5Ä­ÌgÄ•Å
+4d5Ä­ÌgÄ•q
+4d5Ä­ÌgÄ•t
+4d5Ä­ÌgÄ•u
+4d5Ä­ÌgÄ•v
+4d3Ä­ÌgÅ­
+4d3Ä­Ì4mÄ•
+4d5Ä­Ì4mÄ­Ä
+4d5Ä­Ì4mĭă
+4d5Ä­ÌmÄ­Ä“
+4d5Ä­ÌmÄ­Ä•
+4d5Ä­Ì4mÄ­Ä«
+4dÄ­ÌmÄ­Ä­
+4d5Ä­Ì4mÄ­m
+4d5Ä­Ì4mÄ­Å
+4d5Ä­Ì4mÄ­Å
+4d5Ä­Ì4mÄ­t
+4d5Ä­ÌmÄ­Å­
+4dÄ­Ìnt
+4d3Ä­Ìnu
+4d3Ä­Ìnv
+d2Ä­Ìp
+dÄ­Ì2r3
+dÄ­Ì5spÄ­
+dÄ­Ì5s4tÄ
+dÄ­Ì5s4tă
+dÄ­Ì5s4tÄ“
+dÄ­Ì5s4tÄ•
+dÄ­Ì5s4tÅ
+dÄ­Ì4tÄ­b
+4d3Ä­Ì4tÅ­
+2d3Ä­Ì2u
+2d3Ä­Ì2v
+d1íb
+2dí2ba
+dí2be
+4dí4bim
+4dí4bis
+4dí4bit
+2dí2bo
+2dí2bu
+dí4ciÄ
+dí4cie
+dí4ciē
+d2ícu
+dí4c3ue
+4d3í4cul
+2d3í2ga
+4d3í4gea
+4d3í4geÄ
+4d5í4gene
+4d3í4geo
+4d3í4geÅ
+4d3í4geq
+4d3í4get
+4d3í4geu
+4d3í4gev
+dí4gia
+dí4gib
+dí4giu
+dí4g3n
+2d3í2gu
+2d3í2me
+4d3í4mia
+4d3í4miÄ
+4d3í4mie
+4d3í4miē
+4d3í4mii
+4d3í4miī
+4d3í4mim
+4d3í4mio
+4d3í4miÅ
+4d3í4mit
+4d3í4miu
+2dímn
+2dímq
+2dímv
+d2ín
+d3íns
+2dínt
+d3ínte
+dí4nue
+2d3ínv
+d2íq
+dí4r3i4m
+dí3spi
+dí3s4ta
+dí3s4tÄ
+dí3s4te
+dí3s4tē
+dí3s4to
+dí3s4tÅ
+4d3í4tib
+4d3í4tui
+4d3ítuī
+dí3tur
+4d3ítuu
+d2íu
+4d3í4uia
+4díuiÄ
+4díuiæ
+4díuiǣ
+4d3í4uii
+4d3í4uiī
+d2ív
+4d3í4via
+4díviÄ
+4díviæ
+4díviǣ
+4d3í4vii
+4d3í4viī
+dí2xu
+2dj
+2dl2
+d3lu
+2d1m
+2d1n2
+d3ne
+d3nĕ
+dnéx2
+dob3r
+dob2Å«
+d2oc
+doco2
+doc5te
+do1e2
+4d3olem
+4d5oles.
+4d5olesn
+4d5olesq
+4d5olesu
+4d5olesv
+4d5olēs.
+4d5olēsn
+4d5olēsq
+4d5olēsu
+4d5olēsv
+6d5olÄ“Ìsn
+6d5olÄ“Ìsq
+6d5olÄ“Ìsu
+6d5olÄ“Ìsv
+4d3olém
+4d5olésn
+4d5olésq
+4d5olésu
+4d5olésv
+do4lib
+dol4u
+domi3
+d2on
+3don.
+do3ne
+do3ni
+d1op
+do2pé
+2d3ord
+d4ori.
+d4orin
+d4oriq
+do4rit
+d6oriue.
+d6orive.
+d4orī.
+d4orīn
+d4orīq
+d6orīue.
+d6orīve.
+d4orÄ«Ìn
+d4orÄ«Ìq
+d6orÄ«Ìue.
+d6orÄ«Ìve.
+d4orín
+d4oríq
+d6oríue.
+d6oríve.
+2d3o4rn
+do4rq
+do4rv
+d2os
+dos2p
+do3u
+do3v
+3dÅc
+d2Ån
+3dÅn.
+d2Ås
+4dÅÌrd
+4dÅÌrn
+dÅb2Å«
+d2Åc
+dÅc5tÄ•
+4d5ÅlÄ“s.
+4d5ÅlÄ“sn
+4d5ÅlÄ“sq
+4d5ÅlÄ“su
+4d5ÅlÄ“sv
+6d5ÅlÄ“Ìsn
+6d5ÅlÄ“Ìsq
+6d5ÅlÄ“Ìsu
+6d5ÅlÄ“Ìsv
+4d3Å4lÄ•m
+4d5Å4lÄ•Ìm
+dÅ4lÄ­b
+dÅ4lÄ­s
+dÅ4lÄ­Å­
+dÅ3mÄ­3
+d2Ån
+d1Åp
+dÅ2r
+dÅ3ră
+d2Å3rÄ•
+d4ÅrÄ«.
+d4ÅrÄ«n
+d4ÅrÄ«q
+d3ÅrÄ«s
+d6ÅrÄ«uÄ•.
+d6ÅrÄ«vÄ•.
+d4ÅrÄ«Ìn
+d4ÅrÄ«Ìq
+d6ÅrÄ«ÌuÄ•.
+d6ÅrÄ«ÌvÄ•.
+d3ÅrÄ­t
+dÅs2p
+4d3ÅÌlÄ­
+dÅÌ4lÄ­b
+dÅÌ4lÄ­Å­
+d4ÅÌrÄ•
+dÅÌ4rÄ­Å­
+dób3
+d2óc
+dól2
+2d3óli
+dó2pe
+dó1r
+2d3órd
+dó4riÄ
+dó4rie
+dó4riē
+dó4rio
+dó4riÅ
+dó4riu
+d2órn
+4dórna
+4dórnem
+4dórnen
+4dórner
+4dórnes
+4dórnet
+4dórno
+d2ós
+dós2p
+dó2xu
+2dp
+2dq
+d3qu
+dqui4
+dquid3
+dquí2
+dquíd3
+dr2
+d2ra
+d2rÄ
+d2ră
+d2rá
+d2ræ
+d2rǣ
+d2rǽ
+d3rex2
+dre5xi
+dri3e
+dri3é
+dri5re5
+d2rĭă
+drÄ­3Ä•
+d2rÄ­Ä«
+d2rÄ­Å
+d2rÄ­Å­
+d2rÅ
+d3rÅg
+d2ró
+d2ru
+d2rÅ­
+dr4Å­n
+dr4Å­Ì
+d2rú
+2d1s2
+d2ua
+d2uá
+dub2
+4d3u4cul
+4d3u4cúl
+2d3ueb
+2d3uem
+2d3uen
+2d3ues
+2d3uet
+d1uē
+2d3uĕ
+d1ué
+2d3uím
+d4ulæ
+d4ulǽ
+d4uli
+d4ulí
+d4ulu
+d4ulú
+du2m
+2d3ume
+2d3umé
+du2n
+d3unc
+d3und
+du3ni
+du3ní
+d2uo
+dupe3
+duper4
+du3r2u
+d4us.
+d4usn
+du3s4tr
+d4usu
+d4usv
+d1ut
+2du2ta
+2du2tá
+2du2tæ
+2du2tǽ
+2du2te
+du2té
+4du4ti.
+4du4tib
+4dutil
+4du4tin
+4du4tiq
+4du4tis
+4du4tiu
+4du4tiv
+2du2tí
+2du2to
+2du2tó
+2du2tu
+2du2tú
+2d1u2u
+2d1u2v
+d2ux
+du2xu
+4d3Å«4cul
+4d3Å«4cÅ­l
+4d5Å«4cÅ­Ìl
+4d3ū4cúl
+2d1Å«2m
+dū2n
+dūn4e
+dūn4ĕ
+dū3nī
+2d1Å«2t
+3dūtia
+3dÅ«tiÄ
+3dūtiá
+3dūtiæ
+3dūtiǣ
+3dūtiǽ
+3dūtiī
+3dūtĭa
+3dÅ«tÄ­Ä
+3dūtĭá
+3dūtĭæ
+3dūtĭǣ
+3dūtĭǽ
+3dūtĭī
+4d5Å«Ì4cul
+4d5Å«Ì4cÅ­l
+2d3Å«Ì2t
+5dÅ«Ìtia
+5dÅ«ÌtiÄ
+5dÅ«Ìtiæ
+5dÅ«ÌtiÇ£
+5dÅ«ÌtiÄ«
+5dÅ«ÌtÄ­a
+5dÅ«ÌtÄ­Ä
+5dÅ«Ìtĭæ
+5dÅ«ÌtÄ­Ç£
+dÅ«Ì4tÄ­b
+5dÅ«ÌtÄ­Ä«
+d2ŭă
+dÅ­b2
+d1Å­Ä“
+2d3Å­Ä•n
+2d3Å­Ä•t
+2d3Å­Ä•Ì
+3dÅ­Ä«
+3dÅ­Ä­
+4dÅ­Ä­s.
+d4Å­nt
+dŭpĕ3r
+dÅ­3str
+2d1Å­2u
+2d1Å­2v
+d2Å­x
+dÅ­Ì3b
+d2Å­Ìm
+d3Å­Ìnc
+d3Å­Ìnd
+dÅ­Ì5str
+2dÅ­Ìu
+2dÅ­Ìv
+dúb2
+4d3ú4cul
+dú2lo
+d2úm
+d3úmb
+dú2na
+2d3únc
+2d3únd
+dú3s4tr
+2d1ú2t
+3dútia
+3dútiæ
+3dútii
+2d1ú2u
+2d1ú2v
+dú2xu
+2dv
+d3ve
+d3vĕ
+2d2x2
+d2y
+d2ý
+2ea.
+eab2
+e2ace
+ea2cu
+ea2cú
+ead2
+2e2ae
+e2ami
+e2an
+2eane
+2e2a3q
+e2ar
+2earú
+e2as
+ea3tr
+2eau
+2eav
+2eaÍž
+e2aÍže
+e2aÍžÌ
+e3aÍžÌu
+2ea͡
+e2a͡e
+e2aÍ¡Ì
+e3aÍ¡Ìu
+e2Ä
+2eÄ.
+2eÄn
+2eÄq
+2eÄru
+2eÄrú
+2eÄu
+2eÄv
+2eÄÌn
+2eÄÌq
+2eÄÌu
+2eÄÌv
+e1ă
+e2ăcĕ
+eă2cŭ
+e2ăn
+e2ăq
+e2ău
+e2ăv
+e2ăÌm
+e3ăÌmb
+e2á
+eá2cu
+2eáe
+e3ál
+e3ámb
+2eáne
+eá2nu
+2eáq
+2eáu
+e3áud
+2eáv
+2e2æ
+eæ2a
+eæ2á
+eæ2i
+2e2Ç£
+eǣ2a
+2e2ǽ
+eb2
+eba3q
+ebæ3
+ebe3d
+ebe3ia
+ebe3iá
+ebe3iæ
+ebe3iǽ
+ebe3ie
+ebe3ié
+ebe3io
+ebe3ió
+ebe3iú
+ebé3io
+e3bi
+ebī3u
+ebī3v
+eb4ri
+ebs3
+e2bul
+e3bÅ­
+2ec
+e4c3enn
+ecen3s
+ecēn3s
+e4c3énn
+e5cént
+ec3le
+ec3lē
+ec3o2p
+ec3ue.
+ecu3ma
+ecu3mÄ
+ecu3má
+ecu3me
+ecu3m4i
+ecumi5q
+ecu3m4Ä«
+ecumÄ«Ì5n
+ecumÄ«Ì5q
+ecumÄ«Ì5u
+ecumÄ«Ì5v
+ecu3m4í
+ecumí5q
+ecumí5u
+ecumí5v
+2ed.
+ed1a
+e3da.
+ed2ae
+ed5ama
+e3dane
+e3d2a3q
+e5dari.
+e5darin
+e5dariq
+e5dariv
+e5darín
+e5daríq
+e5daríu
+e5darív
+e5darum
+e3darú
+e3daue
+e3dav
+e3d4a͡e
+ed4aÍ¡Ìe
+ed3ÄÌc
+e2d3ác
+e4d3áni
+ede2g
+e2dem
+ed3eme
+ed3emé
+e3deÅ
+e3deó
+ede2s3
+ede6ste
+e3deú
+edē2g
+ed3ēmē
+edē2s
+edÄ“Ì4g
+edĕ3r
+edé2g
+e2diǣ
+e2d3i2g
+ed3ime
+ed3imé
+edi4mis
+edi4mit
+ed3i4mí
+e2d3in
+e2di2p
+edi4s3
+edis5c
+edi6sce
+edis7cen
+ed4it.
+ed5i4taÍž
+e4d3i4tǣ
+edi4tiÅ
+e4d3i4tī
+ed5i4tÅr
+ed5i4tÅs
+e4d3i4tū
+edi5ue.
+edi5ve.
+edī5ue.
+edī5ve.
+e2d3í2g
+e4d3ínu
+ed5í4tiÅ
+e2d3o2l
+e2do2p
+e2dÅr
+e2d3ó2l
+e2d3óp
+ed2r
+ed3ue.
+e2d3ul
+e2dun
+edu3no
+edu3nó
+ed2Å«
+edū3n
+e3d2Å­
+ed4Å­Ä•
+ed3úlc
+2e1e2
+e2el
+e2em
+ee3mi
+ee3mu
+ee3mú
+e2en
+e2e3q
+ee4ra
+ee3re
+ee4ro
+ee4rÅ
+ee3ti
+ee3tí
+e2ev
+eex3
+2e2Ä“
+eēn3
+e1Ä•2
+e2Ä•Å
+e2Ä•3q
+eÄ•4rÅ
+e2Ä•Å­
+eÄ•Ì2
+2eé
+e2éq
+eé2ru
+2efe
+2efé
+2efi
+2efí
+2e3g2a
+e3g2æ3
+e3ge.
+e3gen
+e3geq
+e3geu
+e3gev
+2egm
+eg3no
+e2go
+e3go.
+e3gon
+e3goq
+e3gor
+e3gou
+e3gov
+e2gÅ
+e3gÅ.
+e3gÅn
+e3gÅq
+e3gÅu
+e3gÅv
+e3gÅÌn
+e3gÅÌq
+e3gÅÌu
+e3gÅÌv
+e2gót
+egu6ste
+e1h
+2e1i
+ei2a
+e2ia͡
+e3iát
+e2iæ
+e2iǣ
+e2iǽ
+ei2b
+e3i2ce
+ei2cé
+ei2ci
+ei2cí
+ei2cu
+ei2cú
+e2id
+ei2i
+ei2m
+ei2n
+e2i3na
+e2i3ni
+e2i3nī
+e2i3ní
+e2i3nú
+ei2o
+eio2s
+e2i3q
+ei2r
+e2is
+e3ist
+ei2t
+ei3ta
+ei3tÄ
+ei3tá
+eite3
+e4i3ue
+e2iué
+e2iui
+e2iuí
+e3iur
+e2i3v
+2eī
+e1Ä«2b
+e1Ä«2m
+e2Ä«q
+e1Ä«2r
+e2Ä«s
+e3Ä«ss
+e3Ä«st
+e1Ä«2t
+e2Ä«u
+e2Ä«v
+e2Ä«Ì
+e3Ä«Ì2b
+e3Ä«Ì2m
+e3Ä«Ì2r
+e3Ä«Ì2t
+e1Ä­2
+eÄ­Ì2
+2eí
+e1í2b
+e1í2c
+e2íe
+e3íer
+e1íi
+e1í2m
+e3ínc
+e3índ
+e2íq
+e1í2r
+e3íst
+eí2te
+eí2to
+e2íu
+e2ív
+e3la.
+e3lae
+e3lam
+e3lan
+e3laq
+e3lar
+e3las
+e3lau
+e3lav
+e3la͡
+e3láe
+e3lám
+e3lán
+e3láq
+e3lár
+e3lás
+e3láu
+e3láv
+2e3læ
+2e3lǽ
+4e3le.
+e2leg
+ele2i
+4e3len
+4e3leq
+4e3les
+elē2
+3e2léc
+e3lis
+eli6sta
+e3lís
+2ell
+e2l3ue
+el3uē
+el3ué
+el4ui
+e2l3u2t
+e1m
+2em.
+em2am
+e4mani
+e4maní
+e2m3a2x
+e4m3áni
+e2m3áx
+e5mem.
+e5memn
+e5memq
+e5memv
+em2eq
+eme4s
+e4m3esa
+e4m3esá
+e4mesæ
+e4mesǽ
+e4m3ese
+e4m3esé
+e4m3esi
+e4m3esí
+4emete
+4emeté
+2e3mēt
+e5mémn
+e5mémq
+e5mémv
+emé4s
+e4mésa
+e4m3ése
+e4m3ési
+em2i
+emi3ac
+emi3án
+emi3es
+4emini
+4eminí
+e5mité
+emi3u
+2emne
+1emp
+em3pn
+2emq
+1emt
+2emu
+em2uē
+em2ué
+e2muī
+e5mul.
+em3ulc
+2emú
+e2m3úl
+2emv
+en2a
+en4an
+ena3ni
+ena3ní
+5e4narib
+en2Ä
+ená3ni
+5e4nárib
+2en3d2
+end4u
+end4ú
+2ene
+en3eat
+en3eát
+en2e2x
+e3nĕ1
+eni3tu
+ení5tuī
+en2o
+eno3b2
+en2Å
+en2sc
+en3s2i
+ensi5ti
+en4sn
+en4sq
+ens3t
+ens4ué
+en4sv
+2ent
+ente5re
+e1n2u
+e1oc
+eo2g3n
+e2on
+eo3ni
+eo3p2
+eo5rÄÌ
+eo3rá
+e3ors
+2eorú
+2e2os
+e2Ån
+2eÅr
+2e2Ås
+2eÅÌr
+2eÅÌs
+e2Å
+e2ó
+eó2g
+eó2nu
+eó3p2
+e3órs
+2eós
+eper4Ä“
+eperi4b
+eperi4r
+eper4Ä«
+eperí4r
+epĕ3r
+epĕ5rĭ
+e3pé
+epére5r
+3e4pisc
+epi5s4tr
+3e4písc
+epo4ter
+epote6ri
+epote6rí
+epo4tes
+epÅ4tÄ•s
+2eps
+ep4se.
+ep4sen
+ep4seq
+ep4seu
+ep4sev
+ep2su
+4e3que
+2er.
+2e3ra.
+e3raba
+e3rabá
+e3rabe
+e3rabé
+e5rabil
+e5rabim
+e5rabis
+e5rabit
+e3rabí
+e3rabo
+e3rabó
+e5rabunt
+e5rabúnt
+era2c
+er3act
+era2d3
+eradi4
+eradí4
+e3rae.
+e3raea
+e3raeÄ
+e3raeá
+e3raei
+e3raeī
+e3raeí
+e3raen
+er3aes
+e3raeu
+e3raev
+era2g
+er5ama
+e3rame
+e3ramé
+e5ramin
+e5ramur
+e5ramúr
+e3rand
+4e5rane
+e3rané
+e3rans
+e5rante
+e5rantē
+e5ranté
+e5ranto
+e5rantÅ
+e5rantó
+e5rantú
+era2p
+2e3raq
+e3rar.
+e5rare.
+e5rareq
+e5rareu
+e5rarev
+e5rari.
+e5raria
+e5rariá
+e5rariæ
+e5rariǽ
+e5rarie
+e5rarié
+e5rarii
+e5rarií
+e5rarim
+e5rarin
+e5rario
+e5rarió
+e5rariq
+e5raris
+e5rarit
+e5rariu
+e5rariú
+e5rariv
+e3rarí
+e3rarn
+e3rarq
+e5r6arum
+e5rarun
+e5r6arúm
+e5rarún
+e3rarv
+e3rass
+e5rasti.
+e5rastin
+e5rastiq
+e5rastis
+e5rastiu
+e5rastiv
+e5rastín
+e5rastíq
+e5rastís
+e5rastíu
+e5rastív
+eras4to
+eras4tÅ
+eras4tó
+e3rata
+e3ratá
+e3ratæ
+e3ratǽ
+e3rate
+e3rato
+e3rató
+e3ratr
+e3ratu
+e3ratú
+2erau
+e3raue
+e3raué
+e3raui
+e3rauí
+2e3rav
+e5raÍže.
+e5raÍžea
+e5raÍžeÄ
+e5ra͞eá
+e5ra͞eī
+e5raÍžen
+e5raÍžeu
+e5raÍžev
+e5raÍžÌea
+e5raÍžÌeÄ
+e5raÍžÌeÄ«
+e5ra͡e.
+e5ra͡ea
+e5raÍ¡eÄ
+e5ra͡eá
+e5ra͡ei
+e5ra͡eī
+e5ra͡eí
+e5ra͡en
+e5ra͡eu
+e5ra͡ev
+e5raÍ¡Ìea
+e5raÍ¡ÌeÄ
+e5raÍ¡Ìei
+e5raÍ¡ÌeÄ«
+e5raÍ¡Ìen
+e5raÍ¡Ìeu
+e5raÍ¡Ìev
+e3r2ă
+er3áct
+e2r3ád
+er3áes
+e2r3á2g
+er3áll
+e4r3ámb
+er3á4pe
+er5ás4te
+er5ás4to
+er5ás4tÅ
+er3áud
+er1æ2
+e3ræ.
+e3ræa
+e3ræÄ
+e3ræá
+e3rææ
+e3ræǽ
+e3ræi
+e3ræī
+e3ræí
+e3ræn
+e3ræu
+e3ræv
+er1Ç£2
+e3rǣ.
+e3rǣa
+e3rÇ£Ä
+e3rǣá
+e3rǣǣ
+e3rǣī
+e3rǣn
+e3rǣu
+e3rǣv
+e3rÇ£Ìa
+e3rÇ£ÌÄ
+e3rÇ£ÌÇ£
+e3rÇ£ÌÄ«
+e3rÇ£Ìn
+er3Ç£Ìs
+e3rÇ£Ìu
+e3rÇ£Ìv
+er3ǽs
+e1re
+2e3re.
+2erea
+2ereá
+2e3reæ
+2e3reǽ
+ere4d4
+ered6it
+2e3ree
+2e3reé
+ere2g
+2e3re2i
+2e3reí
+ere2l
+e3rem.
+e4r3e4ma
+er3e4mÄ
+e4r3e4má
+er3e4me
+er3e4mē
+er3e4mé
+er5e4mim
+e5remini
+e5reminí
+er5e4mis
+e4r5e4mit
+er3e4mī
+ere4mím
+ere4mín
+ere4mít
+ere4mo.
+ere4moq
+ere4mou
+ere4mov
+ere4mÅ.
+ere4mÅq
+ere4mÅu
+ere4mÅv
+ere4móq
+ere4mór
+ere4móu
+ere4móv
+e3remq
+e3remu
+e4r5e4mun
+e3remú
+er5e4mún
+e3remv
+2eren
+ere4na
+e3rend
+e3rene
+e3rent
+2ere2o
+2ereó
+2ereq
+e5reque
+e3rer.
+er3era
+er3erÄ
+er3erá
+e3rere
+e3rerí
+e3rern
+er3ero
+er3erÅ
+er3eró
+e3rerq
+e5rerue
+er3erú
+e3rerv
+e3res.
+e3resn
+e3resq
+er3ess
+eres3t
+ere4su
+ere4sú
+e3resv
+e3ret
+2ereu
+e3reue
+2ereú
+2erev
+e3reve
+2erē
+e2rē2d
+erē2g
+erē2i
+e5rēminī
+e5rēmu
+e5rēmú
+e5rēne
+e5rēre
+e5rēri
+e5rērí
+e5rēue
+e5rēve
+erÄ“Ì4d
+e4rÄ“Ì4g
+e5rÄ“ÌminÄ«
+e5rÄ“Ìmu
+er5Ä“Ìna
+e5rÄ“Ìne
+e5rÄ“Ìq
+e5rÄ“Ìre
+e5rÄ“Ìri
+e5rÄ“Ìt
+e5rÄ“Ìue
+e5rÄ“Ìve
+e1rĕ
+erĕ2s3
+2eré
+3eréc
+eré2d
+e2ré2g
+eré4mer
+er5é4mim
+eré6miti
+eré6mito
+eré6mitÅ
+eré6mitu
+e4r3éna
+er3éss
+e2réx
+2e3ri.
+e3ria.
+e3riae
+e3riam
+e3rian
+e3riaq
+e3riar
+e3rias
+e3riat
+e3riau
+e3riav
+e3riaÍž
+e3ria͡
+e3riÄ
+er3iác
+e3riáe
+e3riám
+e3rián
+e3riáq
+e3riár
+e3riás
+e3riát
+e3riáu
+e3riáv
+e3riæ
+e3riǣ
+e3riǽ
+2erib
+er3i4ba
+er3i4bá
+er3i4be
+er3i4bé
+er3i4bi
+er3i4bí
+eri4bo.
+eri4bon
+eri4boq
+eri4bor
+eri4bou
+eri4bov
+er3i4bó
+eri6bunt
+eri6búnt
+eri4cer
+er5i4cér
+er3i4ci
+e3ricu
+e3ricú
+e3ride
+e3ridē
+e3ridé
+e3ridi
+e3ridī
+e3ridí
+eri4dÅ
+eri4dó
+e3ridu
+e3ridú
+2erie
+e3rie.
+e3rieb
+e3riem
+e3rien
+e3rieq
+er3ier
+e3ries
+e3riet
+e3rieu
+e3riev
+e3riē.
+e3riēb
+e3riēm
+er6iēne
+e3riēq
+er3iēr
+e5riēri
+e5riērí
+e3riēs
+e3riēt
+e3riēu
+e3riēv
+e5riÄ“Ìb
+e5riÄ“Ìm
+e5riÄ“Ìri
+e5riÄ“Ìs
+e5riÄ“Ìt
+2erié
+e3riéb
+e3riém
+e5riénd
+e5riént
+e3riéq
+er3iér
+e5riéris
+e3riés
+e3riét
+e3riéu
+e3riév
+er3iim
+er3iis
+e5riis.
+e5riisn
+e5riisq
+e5riisu
+e5riisv
+er3iit
+e3riīs
+e5riÄ«Ìs
+e5riísn
+e5riísq
+er5iíss
+er5iíst
+e5riísu
+e5riísv
+er3iít
+er3i4ma
+er3i4mÄ
+er3i4má
+eri4me.
+eri4meb
+eri4mem
+eri4men
+eri4meq
+eri4mer
+eri4mes
+eri6met.
+eri6meti
+eri6metí
+eri6metn
+eri6metq
+eri6metu
+eri6metú
+eri6metv
+eri4meu
+eri4mev
+eri4mēb
+eri4mēm
+eri4mēn
+eri4mēr
+eri4mēs
+eri4mēt
+eri6mÄ“Ìb
+eri6mÄ“Ìm
+eri6mÄ“Ìn
+eri6mÄ“Ìr
+eri6mÄ“Ìs
+eri6mÄ“Ìt
+eri4mé
+er5i4mi.
+er5i4mim
+e6r5i6mine
+e5riminī
+er5i4miq
+er5i4mis
+er5i4mit
+er5i4miu
+er5i4miv
+er3i4mī
+er3i4mí
+eri4mo.
+eri4moq
+eri4mor
+eri4mou
+eri4mov
+eri4mÅ.
+eri4mÅq
+eri4mÅu
+eri4mÅv
+eri4móq
+eri4mór
+eri4móu
+eri4móv
+e5rimue
+er5i4mun
+er5i4mún
+2erin
+e3rio
+e3riÅ
+e3rió
+e3rip
+2e3riq
+er3ire
+er3iré
+er3iri
+er3irí
+eri6sne
+eri6squ
+eri6sue
+eri6sve
+e3rité
+er5itib
+eri6tne
+e5ritÅt
+e5ritÅÌt
+eri6tqu
+eri6tue
+er5itui
+er5ituī
+er5ituí
+er5ituú
+eri6tve
+2eriu
+er6iue.
+er3iué
+er3iui
+er3iuí
+e5rium.
+e5riumn
+e5riumq
+e5riumu
+e5riumv
+er3iun
+e5riunt
+e3rius
+e3riúm
+er3iún
+e5riúnt
+e3riús
+2eriv
+er3ivé
+er3ivi
+er3iví
+e3riz
+2e1rī
+erÄ«3Ä
+er3Ä«2b
+e2rīn
+er3Ä«r
+er3Ä«ss
+er3Ä«st
+er3Ä«Ì4b
+er3Ä«Ìr
+er3í2b
+er3í4ci
+er3íer
+e2r3íi
+e4rí4men
+e4rí4meq
+erí4mer
+e4rí4meu
+e4rí4mev
+er5í4mim
+e5ríminī
+er5í4mit
+2erín
+e4ríng
+2eríq
+er3ír
+e4r5í4tib
+erí6tio.
+e4r5í4tui
+e4r5ítuī
+e4r5ítuu
+2eríu
+er3íui
+2erív
+er3ívi
+2ern
+ero2b
+erod4
+erodi5ue
+erodi5v
+e3ron
+ero4pu
+e3ror.
+ero4re
+ero4ré
+e3rorq
+e3roru
+e3rorú
+e3rorv
+er3o4sc
+ero4s3t
+3erot
+e3rÅq
+erÅ4re
+erÅ4rÄ“
+erÅ4ré
+erÅ4rÅ
+e3rÅru
+e3rÅrú
+er3Åsc
+3erÅt
+erÅÌ4re
+erÅÌ4rÄ“
+e5rÅÌru
+er5ÅÌsc
+3erÅÌt
+e1rÅ
+e2rób
+e4ró4re
+er3ó4sc
+3erót
+2erq
+er5rue
+e2r3ua
+e2r3uÄ
+e2r3uá
+2erue
+er5ue.
+e4r3uen
+e4r3ueq
+e4r3ueu
+er3uēm
+er3uēn
+er3uēs
+er3uēt
+er3uém
+er3uén
+er3ués
+er3uét
+e3rug
+er3uīs
+er3uía
+2eru2m3
+er3unc
+er3und
+e5runto
+e5runtÅ
+e5runtó
+e5runtú
+e2r3uo
+e2r3uÅ
+e2r3uó
+er3ur
+er3uss
+er3ust
+eru4su
+er5usur
+er3u4sú
+e2r3u2t
+e2r3uu
+e2r3uú
+e3rūg
+erū2r
+erÅ«Ì4r
+e1rÅ­
+2erúm
+er3únc
+e4rúnd
+erú2r
+e2r3út
+2erv
+e1ry
+e1rý
+2es.
+1e2sæ
+1e2sǽ
+e3s2că
+es3cæ
+es4cid
+e3s2cī
+e3s2cÄ­
+es4cíd
+es2cr
+e2scÅ­
+es2e
+ese2i
+3eséq
+3esév
+e3s2i
+2esn
+e1s2p
+espe5r4i
+espe5r4Ä«
+esper4í
+e2sph
+2esq
+4essat
+4essát
+3est.
+es4tÄn
+e3s2tă
+e2s3tæ
+e2s3tǣ
+e2s3tǽ
+es3te.
+es3teq
+es4ter
+es3teu
+es3tev
+e3s2tĕ
+e4s5tim
+e4stÄ­b
+e3s4tÄ­n
+e3stÄ­t
+es4tÄ­Ìt
+3es4tn
+es4tol
+3estot
+es4tól
+3estót
+3es4tq
+e4strÄ
+es4tră
+es3tre
+es3trē
+es3tré
+es4tru
+es4trū
+e3s4trÅ­
+e4stry
+e2stu
+e2stÅ­
+3es4tv
+es3ue.
+e2suĕ
+es2ué
+e2s3ui
+2esv
+2et
+e3ta
+eta3g
+et3eni
+ete5ram
+ete5ran
+ete5rar
+ete6reri
+ete6reru
+ete4r5ie
+eter5iē
+eter5ié
+eter5iī
+eteri6mini
+eteri6miní
+eter5i6ta
+eter5i6tÄ
+eter5i6tá
+eteri6te.
+eteri6ten
+eteri6teq
+eteri6teu
+eteri6tev
+eteri6to.
+eteri6ton
+eteri6toq
+eteri6tot
+eteri6tou
+eteri6tov
+eteri6tÅ.
+eteri6tÅn
+eteri6tÅq
+eteri6tÅu
+eteri6tÅv
+eteri6tÅÌn
+eteri6tÅÌq
+eteri6tÅÌu
+eteri6tÅÌv
+eteri6tón
+eteri6tóq
+eteri6tót
+eteri6tóu
+eteri6tóv
+ete4rīs
+eterÄ«Ì6u
+eterÄ«Ì6v
+ete4ríe
+ete6rí6mini
+ete6rí6te
+ete3ro
+ete3rÅ
+ete5run
+etĕ4r3ī4
+etÄ•rÄ«Ì4
+etĕ4rĭē
+etĕ4r5ĭī
+etĕ4rĭt
+etÄ•r5Ä­6tÄ
+etĕrĭ6tĕ
+etĕ5rĭtĭ
+etÄ•rÄ­6tÅ.
+etÄ•rÄ­6tÅn
+etÄ•rÄ­6tÅq
+etÄ•rÄ­6tÅu
+etÄ•rÄ­6tÅv
+etÄ•rÄ­6tÅÌn
+etÄ•rÄ­6tÅÌq
+etÄ•rÄ­6tÅÌu
+etÄ•rÄ­6tÅÌv
+etÄ•rÄ­Ì4
+etÄ•6rÄ­ÌÄ•
+etÄ•6rÄ­Ìt
+etĕ3rŭ
+etÄ•Ì6rÄ•6rÄ­
+etÄ•Ì4rÄ«
+etÄ•Ì6r5Ä­Ä«
+etÄ•Ì6r5Ä­t.
+etÄ•Ì6r5Ä­6tÄ
+etÄ•Ì6rÄ­6tÄ•
+etÄ•Ì6rÄ­6tÅ
+eté6re6ri
+eté4rie
+eté4riē
+eté4r5iī
+eté6r5it.
+eté6r5ita
+eté6r5i6tÄ
+etéri6te.
+eté6ri6to.
+eté6ri6tÅ
+e2t3ip
+e2t3íp
+eto2i
+etó2i
+e3tr
+etra3s
+3ets
+e4tue.
+e2tuī
+e3tur
+e3tú
+3etvi
+e1u
+2eu.
+eua6ste
+e4uasv
+e4uÄsv
+e2uÇ£Ì
+e2uǽ
+e2u3b2
+eu2dă
+eu4dis
+eu2dī
+2e3ue
+e3uĕ
+e4uīsv
+2eum
+eu3ma
+1eun
+e2und
+2e2une
+e2uni
+e2uní
+e2uno
+e2unó
+euol5ue
+euol5ué
+euol5ui
+euol5uí
+2euq
+eu4rat
+eu4rár
+eu4rát
+eu4reb
+eu4rem
+eu4ren
+eu4rer
+eu4réb
+eu4rém
+eu4rén
+eu4rér
+eu4rim
+eu4rím
+eu4rún
+2eus
+e4us.
+e4usn
+e4usq
+eu2su
+e4usv
+2e2ut
+eu4tami
+eu4tamú
+eu4tare
+eu4tari
+eu4tarí
+eu4támi
+eu4tánt
+eu4táre
+eu4tári
+e3u4tem
+e3u4ten
+e5u4tere
+e5u4teré
+eu6teris
+eu6terís
+e3u4tém
+e3u4tén
+e5u4tére
+e5u6téris
+e3u4tét
+eu4tim
+eu4tit
+e3u4tím
+eutru4
+eu4tun
+eu4tún
+2euu
+2e2uv
+e2ux
+e1Å«2
+e2Å«3m
+e2Å«Ìm
+eÅ«Ì2r
+eÅ«Ì2t
+e1Å­
+e2Å­s
+e3Å­t
+e2Å­Ì
+e3Å­Ìmb
+e2ú
+e3úl
+2eúm
+e3úmb
+1eún
+e3úng
+e3únx
+eú2r
+2eús
+e3úse
+e3úso
+e3úss
+e3úst
+e3úsu.
+e3úsum
+e3úsus
+e3ú2t
+eútru4
+eva6ste
+2e3ve
+e3vĕ
+ex2ă
+e2x3ea
+e2x3eÄ
+e2x3eá
+e2x3eo
+e2x3eÅ
+e2x3eó
+ex3e2q
+e2xeu
+e2x3eú
+e2xib
+e2xiē
+e2xié
+exin3
+e2x3íe
+exÅ2
+e3xÅÌ
+exÅÌ4ra
+exÅÌ4rÄ
+exÅÌ4re
+exÅÌ4rÄ“
+exÅÌ4rÅ
+exó4ra
+exó4re
+exó4ri
+exó4ro
+ex5ter
+2e2Íž
+2e2Í¡
+2Ä“2a
+Ä“ad2
+Ä“a2m
+2Ä“2Ä
+Ä“Ä2nu
+2ē2ă
+ēă3d2
+ēăÌ3d
+2ē2á
+2ē2æ
+2Ä“2Ç£
+2ē2ǽ
+Ä“b2
+Ä“ba2
+Ä“ba3q
+ēbá2
+ēbæ3
+Ä“be3i
+ēbī3u
+ēbī3v
+Ä“bo2
+1Ä“br
+Ä“bs3
+Ä“bu2
+Ä“2bul
+3Ä“2bÅ­l
+Ä“4bÅ­Ìl
+ē2búl
+Ä“ce1
+Ä“2ch
+Ä“d2
+Ä“da2r
+ēdá2
+ēdē2s
+Ä“di3m
+Ä“d4it.
+Ä“d4itu
+Ä“d4Ä­t.
+Ä“d4Ä­tn
+Ä“d4Ä­tq
+Ä“d4Ä­tu
+Ä“d4Ä­tv
+Ä“3do
+Ä“d4or
+Ä“d3ue
+Ä“3dÅ­
+2Ä“2e
+2Ä“2Ä“
+2Ä“2Ä•
+Ä“3g2a
+Ä“ga2r
+ē3g2æ3
+Ä“3g2Ç£
+Ä“3ge.
+Ä“3gen
+Ä“3geq
+Ä“3geu
+Ä“3gev
+ē3gĕ.
+ē3gĕn
+ē3gĕq
+ē3gĕu
+ē3gĕv
+Ä“2g3n
+Ä“go2
+1Ä“gr
+Ä“gu6ste
+ēgŭ6stĕ
+2Ä“1i2
+Ä“2ia.
+Ä“2iaq
+Ä“ia2r
+Ä“2iau
+Ä“2iav
+Ä“3ic
+Ä“2id
+Ä“4iÄ“Ìne
+Ä“6iÄ“Ìque
+Ä“4iÄ“Ìue
+Ä“4iÄ“Ìve
+Ä“2i3p
+Ä“2ir
+Ä“2is
+Ä“2ium
+Ä“3iÅ­
+2Ä“2Ä«
+2Ä“Ä­2
+Ä“1Ä­c
+Ä“2Ä­Ä“
+Ä“2Ä­Ä•
+Ä“2Ä­3p
+Ä“3Ä­Ì2c
+Ä“2Ä­ÌÄ•
+Ä“2Ä­Ìp
+ē1í2c
+ē2íe
+2Ä“j
+Ä“ja2r
+Ä“2lab
+Ä“3lÄ.
+Ä“3lÄn
+Ä“3lÄq
+Ä“3lÄr
+Ä“3lÄs
+Ä“3lÄu
+Ä“3lÄv
+Ä“3lÄÌn
+Ä“3lÄÌq
+Ä“3lÄÌr
+Ä“3lÄÌs
+Ä“3lÄÌu
+Ä“3lÄÌv
+ē3lă.
+ē3lăm
+ē3lăn
+ē3lăq
+ē3lău
+ē3lăv
+Ä“3lăÌ
+2ē3lá
+2ē3læ
+2ē3lǣ
+2ē3lǽ
+Ä“2leg
+Ä“le2r
+ēlē2i
+ē3lĕī
+Ä“3lÄ•Å
+ē3lĕŭ
+ēlé2
+Ä“li2n
+2ē3lī
+ēlí2n
+2Ä“ll
+Ä“l2u
+Ä“2l3ue
+Ä“1m
+Ä“4mani
+ē4maní
+Ä“ma2r
+Ä“măÌ2
+ē4m3áni
+1Ä“m2e
+Ä“3me.
+Ä“3mem
+Ä“4mend
+Ä“4ment.
+Ä“6mentia
+ē6mentía
+Ä“4mentn
+Ä“4mentq
+Ä“4mentv
+Ä“3meq
+Ä“2m3es
+Ä“3meu
+Ä“3mev
+3ē2mēr
+ēmē2s
+Ä“4m3Ä“se
+ē4m3ēsē
+ē4m3ēsĕ
+ē4m3ēsī
+3Ä“4mÄ“Ìr
+Ä“mÄ“Ì4s
+Ä“4m5Ä“Ìse
+Ä“4mÄ“ÌsÄ“
+Ä“4m5Ä“ÌsÄ•
+Ä“4m5Ä“ÌsÄ«
+1ēmĕ
+ē3mĕ.
+ē3mĕm
+ē4mĕnd
+ē4mĕnt.
+ē6mĕntĭă
+Ä“6mÄ•ntÄ­Ìă
+ē4mĕntn
+ē4mĕntq
+ē4mĕntu
+ē4mĕntv
+ē3mĕq
+Ä“2m3Ä•s
+ē3mĕu
+ē3mĕv
+Ä“3mÄ•Ìm
+Ä“4m3Ä•Ìs
+ē2m3és
+Ä“m2i1
+3Ä“mim
+4ēminī
+3Ä“mis
+Ä“4miss
+3Ä“4mit.
+3Ä“4mitn
+3Ä“4mitq
+3Ä“4mitu
+3Ä“4mitv
+Ä“m2Ä­
+3Ä“mÄ­c
+Ä“mÄ­3Ä•
+3Ä“mÄ­m
+3ēmĭnĕ
+3Ä“mÄ­s
+Ä“4mÄ­ss
+3Ä“4mÄ­t.
+3Ä“4mÄ­tn
+3Ä“4mÄ­tq
+3Ä“4mÄ­tu
+3Ä“4mÄ­tv
+3Ä“mÄ­Ìn
+5Ä“4mÄ­Ìss
+5Ä“4mÄ­Ìst
+3Ä“mÄ­Ìt
+1ēmí
+ē4míss
+ē4míst
+1Ä“mo
+Ä“3mo.
+Ä“3mon
+Ä“mo4nu
+Ä“3moq
+Ä“4mor.
+Ä“4morn
+Ä“4morq
+Ä“4moru
+Ä“4morv
+Ä“3mou
+Ä“3mov
+1Ä“mÅ
+Ä“4mÅr.
+Ä“4mÅrn
+Ä“4mÅrq
+Ä“4mÅru
+Ä“4mÅrv
+Ä“4mÅÌrn
+Ä“4mÅÌrq
+Ä“4mÅÌru
+Ä“4mÅÌrv
+ē4mórn
+ē4mórq
+ē4móru
+ē4mórv
+1Ä“mp
+1Ä“mt
+2Ä“mu
+Ä“2m3ul
+Ä“2mun
+Ä“m3Å«Ì
+2Ä“mÅ­
+Ä“2m3Å­l
+Ä“2mÅ­n
+Ä“4m3Å­Ìl
+Ä“4mÅ­Ìn
+2ēmú
+ē2m3úl
+ē2mún
+Ä“2nat
+Ä“n2Ä
+Ä“nÄ3nÄ“
+Ä“nÄ3nÄ«
+5Ä“4nÄrib
+5Ä“4nÄrÄ­b
+5Ä“6nÄÌrib
+5Ä“6nÄÌrÄ­b
+ē3nă.
+ē3năm
+ē3năn
+ē3năq
+3ēnăt
+ē3nău
+ē3năv
+Ä“3năÌ
+2Ä“ne
+Ä“2n3ea
+Ä“2n3eÄ
+ē2n3eá
+Ä“2n3eÅ
+Ä“2neu
+ē2neú
+Ä“2n3Ä•Ä
+ē2n3ĕă
+Ä“2n3Ä•Å
+ē2nĕŭ
+Ä“2n3ie
+ē2n3iē
+ē2n3ié
+Ä“2n3ii
+ē2n3ií
+Ä“2n3Ä«2m
+Ä“2n3Ä«2r
+Ä“n3Ä«ss
+Ä“n3Ä«st
+Ä“2n3Ä«2t
+Ä“n3Ä«Ì4m
+Ä“n3Ä«Ì4r
+Ä“n5Ä«Ìss
+Ä“n5Ä«Ìst
+Ä“n3Ä«Ì4t
+Ä“2n3Ä­Ä“
+Ä“2n3Ä­Ä•
+Ä“2n3Ä­Ä­
+Ä“4n3Ä­ÌÄ•
+Ä“4n3Ä­ÌÄ­
+ē2n3íe
+ē2n3íi
+Ä“n2sc
+Ä“n3si
+Ä“n4sn
+Ä“n4sq
+ēns4ué
+Ä“n4sv
+Ä“1n2u
+Ä“2n3ue
+Ä“3n4uen
+Ä“n4ueq
+Ä“n4ueu
+Ä“n4uev
+Ä“n2Å­
+Ä“1o
+Ä“2on
+Ä“2os
+2Ä“2Å
+Ä“1Å
+Ä“2Ån
+Ä“2Ås
+Ä“2ÅÌ
+ēó2
+Ä“pa2
+Ä“par3
+ēpá2
+Ä“per4Ä“
+ēperī4n
+ēperī4q
+ēperī4r
+ēperī4u
+ēperī4v
+Ä“perÄ«Ì6n
+Ä“perÄ«Ì6q
+Ä“perÄ«Ì6r
+Ä“perÄ«Ì6u
+Ä“perÄ«Ì6v
+ēperí4
+ēpĕrī4n
+ēpĕrī4q
+ēpĕrī4r
+ēpĕrī4u
+ēpĕrī4v
+Ä“pÄ•rÄ«Ì6n
+Ä“pÄ•rÄ«Ì6q
+Ä“pÄ•rÄ«Ì6r
+Ä“pÄ•rÄ«Ì6u
+Ä“pÄ•rÄ«Ì6v
+Ä“pÄ•3rÅ
+Ä“2ph
+Ä“po2
+2Ä“q
+Ä“3qu
+Ä“1r2
+Ä“ra3g
+ē3ră
+ēræ2ă
+ērǣ2ă
+2Ä“3re
+ē3rēm
+ē3rēs
+ē3rēt
+ē3rēu
+ē3rēv
+Ä“3rÄ“Ìm
+Ä“3rÄ“Ìs
+Ä“3rÄ“Ìt
+2ē3rĕ
+ē3ré2
+2ērī
+2ērí
+1Ä“2ro
+Ä“ro4s3
+Ä“rÅ3d4
+Ä“rÅ5dÄ«
+Ä“rÅdÄ«5u
+Ä“rÅdÄ«5v
+1Ä“2rÅ
+ēró2
+Ä“2r3ue
+2Ä“run
+3Ä“rÅ­d
+2ērú
+2Ä“s.
+Ä“2sa.
+Ä“2sae
+Ä“2sam
+Ä“2saq
+Ä“2sav
+1Ä“sÄ
+1ēsă
+ē2să.
+ē2săm
+ē2săq
+ē2său
+ē2săv
+1ēsá
+ē2sáe
+ē2sám
+1ē2sæ
+1ē2sǣ
+1ē2sǽ
+Ä“2sca
+ē2scă
+ē2scá
+ēs3cæ
+ēs3cǣ
+ē2scé
+Ä“2sci
+ēs3cī
+Ä“2scÄ­
+ē2scí
+Ä“2scu
+Ä“s4cul
+Ä“sc3Å«
+Ä“2scÅ­
+ē2scú
+Ä“s2e
+3ēsē.
+ēsē2i
+3ēsēn
+3ēsēq
+3ēsēv
+Ä“s2Ä•
+2ēsé
+Ä“s2i
+Ä“si2n
+2Ä“sn
+Ä“2so2
+1Ä“2sÅ
+Ä“2sÅ
+ē2só
+Ä“s2p
+Ä“s3po
+Ä“s3pÅ
+ēs3pó
+ēs3pū
+2Ä“sq
+3Ä“st.
+Ä“2ste
+Ä“s5ter
+ē2stĕ
+ēs5tĕr
+Ä“s2ti
+Ä“sti5t4
+Ä“s2tÄ­
+ēs4tíl
+ēstí3t4
+3Ä“s4tn
+3Ä“2stÅ
+3Ä“s4tq
+Ä“s2tr
+3Ä“2stu
+Ä“s4tue
+3Ä“2stÅ­
+ē2stú
+3Ä“s4tv
+Ä“2s3ue
+ē2s3uĕ
+Ä“s3ui
+3Ä“sum
+3Ä“2sus
+1ē2sū
+1Ä“sÅ­
+Ä“2sÅ­s
+1ē2sú
+ē3sún
+2Ä“sv
+2Ä“t
+Ä“3ta
+ē3tă
+Ä“3te
+Ä“ter4a
+Ä“te5re
+Ä“te3ri
+ēte5rī
+ēterī5u
+ēterī5v
+ē3tĕ
+ētĕ3r4a
+ētĕ3rǣ
+ētĕ3rĕ
+ētĕ5rī
+ētĕrī5u
+ētĕrī5v
+ētĕ3rŭ
+Ä“ti4tu
+ē3tī
+Ä“3to2
+Ä“3tÅ
+Ä“tÅ2i
+Ä“3tÅ
+ē3tó2
+Ä“3tr
+Ä“1u2
+Ä“uÄ6ste
+Ä“uÄ6stÄ•
+2Ä“3ue
+ē3uĕ
+ē3uī.
+ē3uīn
+ē3uīq
+ē3uīu
+Ä“3uÄ«Ì
+Ä“2um
+1Ä“uo
+Ä“uol3u
+1Ä“uÅ
+2Ä“2Å­
+2ē2ú
+Ä“vÄ6ste
+Ä“vÄ6stÄ•
+2Ä“3ve
+ē3vĕ
+ē3vī.
+ē3vīn
+ē3vīq
+ē3vīv
+Ä“3vÄ«Ì
+1Ä“vo
+1Ä“vÅ
+Ä“x2
+Ä“2x3u
+Ä“2Ì
+2Ä“Ìa
+2Ä“ÌÄ
+2Ä“Ìă
+2Ä“Ìæ
+2Ä“ÌÇ£
+Ä“Ìb2
+Ä“Ì3bu
+Ä“Ì3bÅ­
+2Ä“Ìe
+2Ä“ÌÄ“
+2Ä“ÌÄ•
+3Ä“Ìgr
+Ä“Ì4gre
+Ä“Ì4grÄ•
+2Ä“Ìi
+Ä“Ìi2c
+Ä“Ì3iÄ“n
+Ä“Ì4ir
+2Ä“ÌÄ«
+Ä“ÌÄ­2c
+2Ä“Ìj
+Ä“Ì4loq
+Ä“Ì4lÅq
+Ä“Ì1m
+Ä“Ì4mar
+Ä“Ì4măr
+Ä“Ì4mÄ“n
+Ä“Ì4mic
+3Ä“Ìmim
+4Ä“ÌminÄ«
+5Ä“Ì4mit.
+3Ä“Ì4mÄ­c
+3Ä“ÌmÄ­m
+5Ä“Ì4mÄ­t.
+Ä“Ì4mor.
+Ä“Ì4mÅr.
+3Ä“Ìmp
+3Ä“Ìmt
+2Ä“Ìmu
+Ä“Ì4mÅ­n
+2Ä“Ìn
+Ä“Ì4n3ea
+Ä“Ì4n3eÄ
+Ä“Ì4n3eÅ
+Ä“Ì4n3Ä•Ä
+Ä“Ì4n3ĕă
+Ä“Ì4n3Ä•Å
+Ä“Ì4n3iÄ“
+Ä“Ì4n3ii
+Ä“Ì4n3Ä­Ä“
+Ä“Ì4n3Ä­Ä­
+2Ä“ÌÅ
+2Ä“Ìq
+2Ä“Ìr
+Ä“Ì3r2ă
+Ä“Ì3rÄ•
+3Ä“Ì4sa
+3Ä“Ì2sÄ
+3Ä“Ì2să
+3Ä“Ì2sæ
+3Ä“Ì2sÇ£
+3Ä“ÌsÄ“.
+2Ä“Ìsn
+Ä“Ì2so
+3Ä“Ì2sÅ
+Ä“Ì2sÅ
+2Ä“Ìsq
+Ä“Ì5s4tÄ­n
+3Ä“Ìstn
+3Ä“ÌstÅ
+3Ä“Ìstq
+Ä“Ìs4trÅ­
+3Ä“Ìstu
+3Ä“ÌstÅ­
+3Ä“Ìstv
+Ä“Ì2su
+3Ä“Ìsum
+3Ä“Ìsus
+3Ä“ÌsÅ«
+Ä“Ì4sÅ«.
+Ä“Ì3sÅ«s
+3Ä“ÌsÅ­
+Ä“Ì4sÅ­s
+2Ä“Ìsv
+2Ä“Ìt
+2Ä“Ìue
+2Ä“ÌÅ­
+2Ä“Ìve
+2Ä•2a
+Ä•2Ä
+2Ä•Ä.
+2Ä•Än
+2Ä•Äq
+4Ä•ÄrÅ­
+2Ä•Äu
+2Ä•Äv
+4Ä•ÄÌn
+4Ä•ÄÌu
+4Ä•ÄÌv
+2ĕă.
+ĕ1ăm
+ĕ2ăn
+4ĕănĕ
+2ĕ2ăq
+ĕ2ăr
+ĕ2ăt
+2ĕ2ău
+2ĕ2ăv
+Ä•2ăÌ
+Ä•3ăÌmb
+2ĕ2á
+2ĕ2æ
+ĕæ2ă
+ĕæ2ŭ
+2Ä•2Ç£
+ĕǣ2ă
+Ä•Ç£2Å­
+2ĕ2ǽ
+Ä•b2
+ĕbĕ3d
+ĕbī3u
+ĕbī3v
+Ä•3bÅ­
+2Ä•c
+Ä•4c3Ä•nn
+Ä•4c5Ä•Ìnn
+Ä•2ch
+Ä•c4Ä­m
+Ä•2c3l
+Ä•cÅ­3mÄ
+ĕcŭ3mă
+ĕcŭ3mĕ
+Ä•cÅ­3m4Ä«
+Ä•cÅ­mÄ«Ì5n
+Ä•cÅ­mÄ«Ì5q
+Ä•cÅ­mÄ«Ì5u
+Ä•cÅ­mÄ«Ì5v
+Ä•cÅ­3mÅ­
+ĕcŭpĕ3
+Ä•2c3Å­2t
+Ä•2d1a
+Ä•d3ÄÌc
+ĕ2d1ă2
+ĕdă4m
+ĕd5ămă
+ĕd3áu
+ĕdē2g
+ĕd3ēmē
+ĕdē2s
+Ä•dÄ“Ì4g
+ĕ2dĕm
+Ä•3dÄ•Å
+ĕdĕ6stĕ
+ĕdī5uĕ.
+ĕdī5vĕ.
+Ä•2dÄ­a
+ĕ2dĭá
+ĕ2dĭæ
+Ä•2dÄ­Ç£
+ĕ2dĭǽ
+Ä•2d3Ä­g
+Ä•2dÄ­m
+Ä•2d3Ä­n
+Ä•2dÄ­p
+Ä•dÄ­4s
+Ä•4d3Ä­4ta
+ĕ4d3ĭ4tá
+ĕ4d3ĭ4tæ
+ĕ4d3ĭ4tǣ
+ĕ4d3ĭ4tǽ
+ĕ4d3ĭ4tī
+Ä•4dÄ­tÄ­
+Ä•d5Ä­tÄ­Å
+Ä•d5Ä­tÅr
+Ä•d5Ä­tÅs
+ĕ4d3ĭ4tū
+Ä•d5Ä­tÅ­m
+Ä•d5Ä­tÅ­s
+Ä•4d3Ä­Ìg
+Ä•d5Ä­Ì4tă
+Ä•d5Ä­Ì4tÄ­
+1Ä•dÅ
+Ä•2dÅr
+Ä•4dÅÌr
+1Ä•dÅ2
+Ä•2d3Ål
+Ä•2dÅp
+3Ä•dÅr
+Ä•4d3ÅÌ4l
+Ä•4d3ÅÌp
+Ä•d2r
+Ä•d2Å«
+ĕdū3n
+Ä•2d3Å­l
+Ä•2d3Å­n
+Ä•4d3Å­Ìl
+Ä•4dÅ­Ìn
+2Ä•Ä“
+2Ä•1Ä•
+ĕĕ2ă
+Ä•2Ä•m
+Ä•2Ä•q
+Ä•Ä•2r
+Ä•Ä•4rÅ
+Ä•2Ä•t
+Ä•Ä•2x
+Ä•2Ä•Ì2
+2ĕfă
+2ĕfĕ
+Ä•2gn
+Ä•2gÅ
+Ä•3gÅ.
+Ä•3gÅn
+Ä•3gÅq
+Ä•3gÅu
+Ä•3gÅv
+Ä•3gÅÌn
+Ä•3gÅÌq
+Ä•3gÅÌu
+Ä•3gÅÌv
+Ä•1h
+Ä•1i
+ĕ3iē
+2Ä•Ä«
+Ä•1Ä«2b
+Ä•1Ä«2m
+Ä•2Ä«q
+Ä•1Ä«2r
+Ä•1Ä«2t
+Ä•2Ä«u
+Ä•2Ä«v
+Ä•Ä«Ì2b
+Ä•Ä«Ì2m
+Ä•Ä«Ì2r
+Ä•Ä«Ì4t
+Ä•1Ä­
+Ä•2Ä­c
+Ä•2Ä­nÅ­
+Ä•Ä­2t
+Ä•Ä­3tÄ
+Ä•Ä­3tÄ­
+Ä•2Ä­u
+Ä•2Ä­v
+Ä•Ä­Ì4tÄ•
+2Ä•l
+ĕlă3s2
+ĕllē3i
+Ä•llÄ“Ì5i
+Ä•2l1u
+2Ä•m.
+Ä•1ma
+ĕ1mă
+2Ä•mn
+1Ä•mp
+Ä•m3pn
+2Ä•mq
+2Ä•2mu
+2Ä•mv
+2Ä•n
+Ä•n2Ä
+Ä•n3d2
+Ä•nd4Å­
+Ä•3n2e
+Ä•3n2Ä•
+ĕnĕ3rŭ
+Ä•nÄ•Ìs5
+Ä•2ni
+Ä•n2Å­
+Ä•2Ån
+2Ä•År
+2Ä•2Ås
+Ä•Å2g3n
+Ä•2År
+Ä•Å5rÄÌ
+Ä•3Års
+Ä•2ÅÌ
+ĕ3pĕ
+ĕpĕ3r
+Ä•pÄ­5str
+Ä•3pÅ
+2Ä•ps
+Ä•p2su
+4ĕquĕ
+2Ä•r.
+Ä•r1a
+Ä•3rae.
+Ä•3raea
+Ä•3raeÄ
+ĕ3raeă
+ĕ3raeá
+ĕ3raeī
+Ä•3raen
+Ä•3raeu
+Ä•3raev
+Ä•5raÍže.
+Ä•5raÍžea
+Ä•5raÍžeÄ
+ĕ5ra͞eă
+ĕ5ra͞eī
+Ä•5raÍžen
+Ä•5raÍžeu
+Ä•5raÍžev
+Ä•5raÍžÌea
+Ä•5raÍžÌeÄ
+Ä•5raÍžÌeă
+Ä•5raÍžÌeÄ«
+ĕ5ra͡e.
+ĕ5ra͡ea
+Ä•5raÍ¡eÄ
+ĕ5ra͡eă
+ĕ5ra͡eī
+ĕ5ra͡en
+ĕ5ra͡eu
+ĕ5ra͡ev
+Ä•5raÍ¡Ìea
+Ä•5raÍ¡ÌeÄ
+Ä•5raÍ¡Ìeă
+Ä•5raÍ¡ÌeÄ«
+Ä•rÄs3
+Ä•r4Ät
+ĕ1ră2
+ĕ3ră.
+ĕr3ăc
+ĕ2răd
+ĕr5ămă
+ĕr3ămī
+ĕ3rănĕ
+ĕr3ăng
+ĕ3răq
+ĕ2r3ăs2
+ĕ3rău
+ĕ3răv
+Ä•răÌ2
+Ä•4r3ăÌd
+Ä•4r3ăÌg
+Ä•4r3ăÌl
+Ä•4r5ăÌmb
+Ä•răÌs6tÅ
+ĕr3áes
+ĕ2r3áu
+ĕr1æ2
+ĕ3ræ.
+Ä•3ræÄ
+ĕ3ræă
+ĕ3rææ
+ĕ3ræǽ
+ĕ3ræī
+ĕ3ræn
+ĕ3ræu
+ĕ3ræv
+Ä•r1Ç£2
+ĕ3rǣ.
+Ä•3rÇ£Ä
+ĕ3rǣă
+ĕ3rǣǣ
+ĕ3rǣī
+ĕ3rǣn
+ĕ3rǣu
+ĕ3rǣv
+Ä•3rÇ£ÌÄ
+Ä•3rÇ£Ìă
+Ä•3rÇ£ÌÇ£
+Ä•3rÇ£ÌÄ«
+Ä•3rÇ£Ìn
+Ä•r3Ç£Ìs
+Ä•3rÇ£Ìu
+Ä•3rÇ£Ìv
+ĕr3ǽ2s
+Ä•3r2e
+2ĕrē
+Ä•2r3Ä“2d
+Ä•r3Ä“2g
+ĕ5rēmĭnī
+ĕ5rēmŭ
+ĕ5rēnĕ
+ĕ5rērĕ
+ĕ5rērĭ
+Ä•r3Ä“ss
+Ä•r3Ä“st
+ĕ5rēuĕ
+ĕ5rēvĕ
+Ä•r3Ä“Ì4d
+Ä•4r3Ä“Ì4g
+Ä•5rÄ“ÌmÄ­nÄ«
+Ä•5rÄ“ÌmÅ­
+Ä•r5Ä“Ìnă
+Ä•5rÄ“ÌnÄ•
+Ä•5rÄ“Ìq
+Ä•5rÄ“ÌrÄ•
+Ä•5rÄ“ÌrÄ­
+Ä•r5Ä“Ìss
+Ä•r5Ä“Ìst
+Ä•5rÄ“Ìt
+Ä•5rÄ“ÌuÄ•
+Ä•5rÄ“ÌvÄ•
+2ĕ1rĕ
+ĕ3rĕ.
+ĕr3ĕăt
+Ä•r3Ä•4d4
+ĕ2rĕf
+ĕrĕ2g
+ĕrĕ2m
+Ä•r3Ä•mÄ
+ĕ4r3ĕmă
+ĕr3ĕmē
+ĕr3ĕmĕ
+ĕr3ĕmī
+Ä•r3Ä•mÄ­
+Ä•4r3Ä•mÅ
+Ä•r3Ä•mÅ
+Ä•r3Ä•mÅ­
+Ä•2r3Ä•2q
+ĕ5rĕquĕ
+Ä•2r3Ä•2s
+ĕ3rĕu
+ĕ3rĕv
+Ä•r3Ä•Ì4d
+Ä•rÄ•Ì4m
+Ä•r5Ä•ÌmÄ•
+Ä•r5Ä•ÌmÄ­
+Ä•4r3Ä•Ìs
+Ä•r1i
+2ĕ1rī
+Ä•rÄ«3Ä
+Ä•r3Ä«2b
+ĕ2rīn
+Ä•r4Ä«q
+Ä•r3Ä«Ì4b
+Ä•r4Ä«Ìq
+ĕ4r3ĭ4cĕ
+Ä•r3Ä­4cÄ­
+Ä•r3Ä­4dÅ
+Ä•5rÄ­Ä•.
+Ä•5rÄ­Ä•n
+Ä•5rÄ­Ä•q
+Ä•5rÄ­Ä•u
+Ä•5rÄ­Ä•v
+Ä•4r3Ä­4mÄ
+ĕ4r3ĭ4mă
+ĕr5ĭ4mēb
+ĕr5ĭ4mēm
+ĕ4r5ĭ4mēn
+ĕr5ĭ4mēr
+ĕr5ĭ4mēs
+ĕr5ĭ4mēt
+Ä•r5Ä­6mÄ“Ìb
+Ä•r5Ä­6mÄ“Ìm
+Ä•6r5Ä­6mÄ“Ìn
+Ä•r5Ä­6mÄ“Ìr
+Ä•r5Ä­6mÄ“Ìs
+Ä•r5Ä­6mÄ“Ìt
+ĕ4r3ĭ4mĕ
+ĕ4r3ĭ4mī
+Ä•r5Ä­4mÄ­m
+Ä•r5Ä­4mÄ­s
+Ä•r5Ä­4mÄ­t
+Ä•r5Ä­4mÄ­Ì
+Ä•rÄ­4mÅ.
+Ä•rÄ­4mÅq
+Ä•rÄ­4mÅu
+Ä•rÄ­4mÅv
+Ä•r3Ä­4mÅ
+Ä•r5Ä­4mÅ­n
+Ä•r5Ä­6mÅ­Ìn
+Ä•r3Ä­ng
+Ä•r4Ä­Å
+Ä•r4Ä­Å
+Ä•r4Ä­s
+Ä•4r5Ä­4tÄ­b
+Ä•5rÄ­tÅt
+Ä•5rÄ­tÅÌt
+Ä•5rÄ­tÅ
+ĕrĭ4tūs
+Ä•4r5Ä­4tÅ­Ä«
+Ä•5rÄ­tÅ­r
+Ä•4r5Ä­4tÅ­Å­
+Ä•5rÄ­tÅ­Ìr
+Ä•r4Ä­Å­
+Ä•r5Ä­Ì4cÄ­
+Ä•4r3Ä­ÌÄ­
+Ä•6r5Ä­Ì6mÄ•n
+Ä•6r5Ä­Ì6mÄ•q
+Ä•r5Ä­Ì6mÄ•r
+Ä•6r5Ä­Ì6mÄ•u
+Ä•6r5Ä­Ì6mÄ•v
+Ä•r5Ä­Ì6mÄ­m
+Ä•r5Ä­Ì6mÄ­t
+Ä•rÄ­Ì6tÄ­b
+Ä•4r5Ä­Ì4tÅ­
+2Ä•rn
+Ä•1ro
+Ä•1rÅ
+Ä•3rÅn
+Ä•r3Å4rÄ“
+Ä•r3Å4rÄ•
+Ä•r3Å4rÅ
+Ä•3rÅrÅ­
+Ä•3rÅs.
+Ä•r3Åsc
+Ä•3rÅsn
+Ä•3rÅsq
+Ä•3rÅsu
+Ä•3rÅsv
+3Ä•rÅt
+Ä•rÅÌ4rÄ“
+Ä•rÅÌ4rÄ•
+Ä•5rÅÌrÅ­
+Ä•r5ÅÌsc
+3Ä•rÅÌt
+Ä•r1Å
+Ä•r3ÅÌl
+Ä•3rÅÌr
+2Ä•rq
+2Ä•2r1u
+ĕ3rūg
+ĕrū2r
+Ä•r3Å«t
+Ä•r3Å«Ì4r
+Ä•r3Å«Ìt
+Ä•3rÅ­Ä“
+Ä•3rÅ­Ä•
+Ä•3rÅ­Ä«
+Ä•3rÅ­Ä­
+Ä•3rÅ­2m3
+Ä•5rÅ­ntÅ
+Ä•5rÅ­ntÅ
+Ä•5rÅ­ntÅ­
+Ä•3rÅ­s.
+Ä•3rÅ­sn
+Ä•3rÅ­sq
+Ä•r3Å­ss
+Ä•r3Å­st
+Ä•3rÅ­su
+Ä•3rÅ­sv
+Ä•r3Å­2t
+Ä•3rÅ­Ìl
+Ä•3rÅ­Ìm
+Ä•5rÅ­Ìsn
+Ä•5rÅ­Ìsq
+Ä•r5Å­Ìss
+Ä•r5Å­Ìst
+Ä•5rÅ­Ìsu
+Ä•5rÅ­Ìsv
+2Ä•rv
+1Ä•1sc
+ĕs2cī
+Ä•s2cÄ­
+Ä•s2cÅ­
+Ä•3s2Ä•
+Ä•3sÅ
+Ä•1sp
+ĕspĕ5rī
+Ä•2sph
+Ä•s2pl
+Ä•s2pÅ
+Ä•s2pÅ
+Ä•s2pÅ­
+Ä•2sq
+Ä•s2ta
+ĕ4stēs
+Ä•4stÄ“Ìs
+ĕ4s3tĕ.
+ĕ4stĕm
+ĕ4s5tĕnĕ
+ĕ4s3tĕq
+ĕ4s3tĕu
+ĕ4s3tĕv
+Ä•4stÄ•Ìm
+ĕ4s3tī.
+ĕ4s5tīnĕ
+ĕ4s3tīq
+ĕ4s3tīs
+ĕ4s3tīu
+ĕ4s3tīv
+Ä•6s5tÄ«ÌnÄ•
+Ä•4s5tÄ«Ìq
+Ä•4s5tÄ«Ìs
+Ä•4s5tÄ«Ìu
+Ä•4s5tÄ«Ìv
+Ä•4stÄ­Ìc
+Ä•s4tn
+Ä•2s3tÅ
+Ä•s4tq
+ĕs3trē
+ĕs3trĕ
+Ä•2s4tu
+Ä•s4tv
+Ä•2su
+ĕ3t2ă
+ĕtă3g
+ĕtĕ3rĕ
+ĕtĕ5rī
+ĕtĕrī5u
+ĕtĕrī5v
+ĕtĕ3rŭ
+ĕtĭ4ă
+Ä•t3Ä­p
+3Ä•ts
+Ä•2t1u
+2Ä•1u
+ĕ3uĕ
+Ä•1Å«2
+Ä•2Å«3m
+Ä•2Å«Ìm
+Ä•Å«Ì2r
+Ä•Å«Ì4t
+1Ä•Å­2
+Ä•1Å­l
+2Ä•2Å­m
+Ä•1Å­r
+2Ä•Å­s
+Ä•1Å­t
+2Ä•2Å­Ìm
+2Ä•Å­Ìs
+Ä•4Å­Ìsq
+Ä•3Å­Ìt
+2Ä•v
+ĕ3vĕ
+ĕ2xă
+ĕx3áu
+Ä•x3Ä•Ìm
+Ä•2xi
+Ä•x3Ä­Ä«
+Ä•xÅ2
+Ä•3xÅÌ
+Ä•xÅÌ4rÄ
+Ä•xÅÌ4ră
+Ä•xÅÌ4rÄ“
+Ä•xÅÌ4rÄ•
+Ä•xÅÌ4rÅ
+ĕx5tĕr
+Ä•2xu
+Ä•2Ì
+2Ä•Ìă
+Ä•Ìb2
+Ä•Ì2cl
+Ä•Ì4dăm
+Ä•Ì4dÄ«s
+Ä•Ì4dÄ­a
+Ä•Ì4dĭæ
+Ä•Ì4dÄ­Ç£
+Ä•Ì4d5Ä­4ta
+Ä•Ì4d5Ä­4tæ
+Ä•Ì4d5Ä­4tÇ£
+Ä•Ì4d5Ä­4tÄ«
+Ä•Ì4d5Ä­4tÅ«
+Ä•Ì2dÅ
+2Ä•ÌÄ•
+Ä•Ì3Ä•Å
+Ä•Ì3Ä•Å
+Ä•Ì3Ä•2r
+1Ä•Ìf
+Ä•Ì1i
+Ä•Ì3iÄ“
+2Ä•Ìl
+2Ä•Ìm
+2Ä•Ìn
+Ä•Ìnd4
+4Ä•Ìps
+Ä•Ìră4g
+Ä•Ìr5ĕăn
+Ä•Ìr5ĕăt
+Ä•Ìr3Ä«
+Ä•Ì4rÄ«s
+Ä•Ì4r5Ä­m.
+Ä•Ì4r5Ä­4mÄ
+Ä•Ì4r5Ä­4mă
+Ä•Ì4r5Ä­mÄ•
+Ä•Ì4r5Ä­4mÄ«
+Ä•Ì4r5Ä­4mÅ
+Ä•Ìr5Ä­6tÅ«s
+Ä•Ì2ru
+Ä•Ì4r3Å­t
+3Ä•Ìsc
+Ä•Ì3s4cÄ«
+Ä•Ì3sÄ•
+Ä•Ì3spÅ­
+4Ä•ÌstÄ
+Ä•Ì5stÄ­tÄ
+Ä•Ì5stÄ­tÄ«
+Ä•Ì5stÄ­tÄ­
+Ä•Ì5stÄ­tÅ
+Ä•Ì4str
+2Ä•Ì2t
+Ä•Ì3tÄ
+Ä•Ì3tă
+Ä•Ì3tÄ“
+Ä•Ì3tÄ•
+Ä•Ì3tÄ«
+Ä•Ì3tÅ
+Ä•Ì3tÅ
+Ä•Ì3tr
+3Ä•Ìts
+Ä•Ì3tÅ­
+Ä•Ìx3Ä•Ä
+Ä•Ìx3ĕă
+Ä•Ìx3Ä•Å
+Ä•Ìx3Ä­Ä«
+2é2a
+2éæ
+2éb2
+éba3q
+ébe3
+éb4ri
+ébs3
+é3bu
+éce1
+é2ch
+é2c3l
+éco1
+écu3m4
+é2c3u2t
+éda2m
+é4d3ama
+é4damÄ
+éd2i
+é2diǣ
+é2d3i2g
+éd3ime
+éd3i4mi
+éd4is
+éd3i4tǣ
+éd3i4tī
+éd3i4tū
+é2d3o2l
+éd3ue
+2ée
+é1ea
+é1eÄ
+é1eo
+é1eÅ
+é1e2r
+é1es
+éfe1
+1éff
+é3g2a
+é3gæ
+é2gl
+é2g3n
+é1h
+2éi
+é3ian
+é3iaq
+é3iau
+é3iav
+é1i2c
+é1ie
+é3ieq
+é3ieu
+é3iev
+é1iē
+é3iit
+é2in
+é3ior
+é3iou
+é3iov
+é2is
+é3iul
+é2leg
+é3li
+élu2
+é2l3ue
+é2l3ut
+é1m2a
+ém2e1
+3é4mera
+ém2i
+é2mic
+2émin
+3é4mit.
+2émn
+é1mo1
+1émp
+2émq
+1émt
+2ému
+2émv
+2én
+énd2
+énd4u
+é2n3ea
+én2ex
+én3iit
+én3si
+é3n2ua
+é3n2uē
+é3n2uī
+én2ul
+é3n2uo
+2éo
+épe1
+épe3r
+2éps
+ép4se.
+ép4sen
+ép4seq
+ép4seu
+ép4sev
+ép2su
+4é3que
+é1r
+2éra
+é3ra.
+é3rae
+é2ra2g
+ér2al
+éra2m
+é3ram.
+ér3ama
+é3ran
+é3raq
+éra2r
+ér3ara
+ér5are
+ér3aro
+é3ras
+é3rau
+é3rav
+é3ra͡
+é3ræ
+2ére
+ér3ean
+ér3eat
+ér3e2d4
+ére2g
+ére2m
+é4r3ema
+ér3emÄ
+ér3eme
+ér3emē
+é4r3emi
+ér3emī
+é4r3emo
+é4r3emÅ
+é4r3emu
+é4r3eru
+é4rest
+é2rh
+é4riac
+é3riar
+2érib
+ér5i4cit
+2érie
+ér3ier
+é4r3iit
+é4r3i4ma
+é4r3i4mÄ
+é4r3i4me
+é4r3i4mē
+é4r3i4mi
+é4r3i4mī
+é4r3i4mo
+é4r3i4mÅ
+ér5i4mun
+é3rio
+é3rip
+é5ritor
+é5ritur
+éri4tūs
+ér3ī
+2érn
+é3ro.
+3é2rog
+é2r3o2p
+2érq
+ér5rue
+2éru
+é2r3ua
+é2r3uÄ
+é2rue
+é2r3uē
+é3rul
+é3rum
+é3run
+é2ruo
+é2r3uÅ
+é3rus
+ér3u2t
+é2ruu
+2érv
+1é2sa
+1é2sæ
+é3s2cī
+és2i
+2ésn
+1é2so
+éspe3
+és2pu
+2és3q
+4ésta
+4éstÄ
+és3tib
+3éstn
+3éstq
+3éstv
+3é2su.
+é4s3ue
+és3ui
+3ésum
+3ésus
+2ésv
+2ét
+éte1
+3éts
+2éu
+é1ua
+é2uam
+é2uaq
+é2uau
+é1uÄ
+é1uæ
+é1uǣ
+éub2
+é1ue
+é2uel
+é1uē
+é1ui
+é1uī
+éu1m
+é3unx
+éute3
+éu4tra
+é1ū
+2év
+é3ve
+éx2a
+é2x3ea
+é2x3eÄ
+é2x3eo
+é2x3eÅ
+éx2ib
+é2xiu
+éx2o
+éx2Å
+é2xue
+éx4us
+2é͞
+2é͡
1f
+f2a
+fa4c3ue
+fa1m
+fa2ru
+fas3
+fÄs3
+fá2c3u
+fá1m
+fá2ru
+fece3
+fe2i
+fe3li
+fe3ra
+fe3r2æ3
+fe3r2Ç£
+fe3rē
+fe3r4i
+fe3rī
+fe3ro
+fe3rÅ
+fe3ru
+fes5tÄ
+fes5te
+fe2x
+fē2i
+fĕ3r2a
+fĕ3ră
+fĕ3r2æ
+fĕ3r2ǣ
+fĕ3rē
+fĕ3r4ĕ
+fĕ3rī
+fÄ•3rÅ
+fĕ3rŭ
+fĕ2s3
+fĕs5tĕ
+fÄ•Ì3ră
+fÄ•Ì5r4Ä«
+fé2i
+fér4ī
+fé2ru
+fé2x
2ff
-f2l
-2fn
-f2r
-2ft
-2f.
-.f2
+file2
+fi1s
+fis2i
+fÄ­Ä•3
+fí1m
+f2l2
+flo3
+flor2
+fons3
+fo3rī
+fÅ3rÄ«
+fœ̄3d
+f2r2
+fra3g
+fră3g
+fre3
+frem2
+fre5mi
+fre5mo
+fr4Ä“3n
+frÄ“Ì5n
+fr4Ä•Ì3
+fré1
+fré5na
+fu1s
+fú1s
1g
-2gg
+gab2
+2g1ae
+g2aeq
+g4aeue.
+g4aeuĕ.
+g4aeve.
+g4aevĕ.
+ga2i
+gao3
+g2ar
+ga3re
+g2au
+2g1aÍž
+g4aÍžeq
+g6aÍžeue.
+g6a͞euĕ.
+g6aÍževe.
+g6a͞evĕ.
+g4aÍžÌeq
+g6aÍžÌeue.
+g6aÍžÌeuÄ•.
+g6aÍžÌeve.
+g6aÍžÌevÄ•.
+2g1a͡
+g4a͡eq
+g6a͡eue.
+g6a͡euĕ.
+g6a͡eve.
+g6a͡evĕ.
+g4aÍ¡Ìeq
+g6aÍ¡Ìeue.
+g6aÍ¡ÌeuÄ•.
+g6aÍ¡Ìeve.
+g6aÍ¡ÌevÄ•.
+gÄ4iae.
+gÄ6iaene
+gÄ6iaeque
+gÄ6iaeue
+gÄ6iaeve
+gÄ6iaÍže.
+gÄ6iaÍžene
+gÄ6iaÍžeque
+gÄ6iaÍžeue
+gÄ6iaÍževe
+gÄ6iaÍžÌene
+gÄ6iaÍžÌeque
+gÄ6iaÍžÌeue
+gÄ6iaÍžÌeve
+gÄ6iaÍ¡e.
+gÄ6iaÍ¡ene
+gÄ6iaÍ¡eque
+gÄ6iaÍ¡eue
+gÄ6iaÍ¡eve
+gÄ6iaÍ¡Ìene
+gÄ6iaÍ¡Ìeque
+gÄ6iaÍ¡Ìeue
+gÄ6iaÍ¡Ìeve
+gÄ2iÄ
+gÄ6iáene
+gÄ6iáeque
+gÄ6iáeue
+gÄ6iáeve
+gÄ4iæ.
+gÄ4iæne
+gÄ6iæque
+gÄ4iæue
+gÄ4iæve
+gÄ4iÇ£.
+gÄ4iÇ£ne
+gÄ6iÇ£que
+gÄ4iÇ£ue
+gÄ4iÇ£ve
+gÄ6iÇ£Ìne
+gÄ6iÇ£Ìque
+gÄ6iÇ£Ìue
+gÄ6iÇ£Ìve
+gÄ4iǽne
+gÄ6iǽque
+gÄ4iǽue
+gÄ4iǽve
+gÄ4iÄ«s.
+gÄ6iÄ«sne
+gÄ6iÄ«sque
+gÄ6iÄ«sue
+gÄ6iÄ«sve
+gÄ6iÄ«Ìsne
+gÄ6iÄ«Ìsque
+gÄ6iÄ«Ìsue
+gÄ6iÄ«Ìsve
+gÄ2iu
+gÄ2iú
+găb2
+gă3rĕ
+g4áeue.
+g4áeuĕ.
+g4áeve.
+g4áevĕ.
+gá2i
+gá3ian
+2g1æ2
+g2æ3q
+g4æue.
+g4æuĕ.
+g4æve.
+g4ævĕ.
+2g1Ç£2
+g2Ç£3q
+g4Ç£ue.
+g4ǣuĕ.
+g4Ç£ve.
+g4ǣvĕ.
+g2Ç£Ì3q
+g4Ç£Ìue.
+g4Ç£ÌuÄ•.
+g4Ç£Ìve.
+g4Ç£ÌvÄ•.
+g2ǽ3q
+g4ǽue.
+g4ǽuĕ.
+g4ǽve.
+g4ǽvĕ.
2gd
-2gf
-g2l
-2gm
-2gn
-g2r
-2gs
-2g.
-1h
-2hp
-2ht
-2h.
-.hu1i2u
-.h2
-1k
+g2e
+ge2e
+ge2i
+3gena
+3genÄ
+3gená
+3genæ
+3genǣ
+3genǽ
+3genen
+3geneq
+3geneu
+3genev
+3genē
+3gené
+3geni
+3genī
+3gení
+3geno
+3genÅ
+3genó
+3genu
+3genú
+ge1r
+ger2æ3
+ger2Ç£
+ge3rē
+ge3rī
+ges3t
+ges5tÄ
+ges5te
+ges5tr
+2getē
+2geté
+2getī
+ge2un
+3gēd
+gē2i
+g2Ä•
+gĕ2ă
+gĕ2ī
+3gĕna
+3gÄ•nÄ
+3gĕnă
+3gĕná
+3gĕnæ
+3gĕnǣ
+3gĕnǽ
+3gĕnē
+3gĕnĕn
+3gĕnĕq
+3gĕnĕu
+3gĕnĕv
+3gĕnī
+3gÄ•nÅ
+3gĕnŭ
+3gĕ3r2a
+gĕ3ră
+3gĕrá
+3gĕ3r2æ
+3gĕ3r2ǣ
+3gĕrǽ
+gĕ3rē
+gĕ3r4ĕ
+gĕ3rī
+gÄ•3rÅ
+3gĕ3rŭ
+gĕs3
+gĕs5tĕ
+3gÄ•Ìnă
+3gÄ•ÌnÄ•
+gÄ•Ì3rÄ•
+gé2i
+3géna
+3génen
+3géneq
+3géneu
+3génev
+3géss
+3gést
+2gg2
+g3ga
+g3gæ3
+g3gǣ
+g2i
+3gie
+gig3
+gi4gn
+gi2i
+gi4lue
+gim2
+gin2Ä
+gis3
+gi4sc
+gis5ci
+gispe3
+gis5te
+g2Ä­
+3gÄ­Ä•
+gÄ­5mÄ­n
+gÄ­n2Ä
+gÄ­n2Ä•
+gĭs5tĕ
+3gĭtī
+gíg3
+gí2lu
+gí1m
+gí3tur
+g2la
+g2lÄ
+g2lá
+g2læ
+g2lǣ
+g2lǽ
+g2les
+g2lēs
+2glĕ
+g2lés
+2gli
+g2lī
+2glÄ­
+g2lí
+g2lo
+g2lÅ
+g2lu
+g2lū
+g2lú
+2g1m2
+g1n2
+gn4an
+gna5ni.
+gna5nin
+gna5niq
+gna5nis
+gna5niu
+gna5niv
+gna5nín
+gna5níq
+gna5nís
+gna5níu
+gna5nív
+gnÄ3nÄ«
+gná5ni.
+gná5nis
+gnæ4uŭ
+gnæ4vŭ
+gnǣ4uŭ
+gnǣ4vŭ
+2gne
+g3nem
+g3nes
+g3nĕm
+gnĕ3rŭ
+g3nÄ•Ì
+2gné
+g3ném
+g3nés
+g3nib
+g4nitæ
+g2no
+g3non
+gno2p
+g3noq
+g3nor.
+3gnora
+3gnorá
+5gnorim
+5gnorit
+5gnorím
+5gnorít
+g3norn
+3gnoro
+3gnoró
+g3norq
+5gnorun
+5gnorún
+g3norv
+3gnos
+3gnou
+3gnov
+3g4nóra
+5g4nóre.
+5g4nórim
+5g4nórin
+5g4nóris
+5g4nórit
+3g4nóro
+5g4nórun
+3g4nósc
+3g4nóss
+3g4nóst
+5g4nóuer
+3g4nóui
+5g4nóver
+3g4nóvi
+g2ob2
+3gog
+go3n
+go5ni5c
+go4nn
+go4nq
+go4nue
+go4nv
+go2p
+g1o2t
+go3th
+3gÅg
+g1Å2t
+g3ÅÌ4t
+g2Å
+2gÅ.
+gÅb2
+2gÅm
+gÅ2p
+2gÅq
+2gÅu
+2gÅv
+3góg
+g1ót
+gó2ti
+gœ̄3d
+g2r2
+gra3d4
+3grae
+gra4ia
+gra4iá
+gra4iæ
+gra4iǽ
+gra4ie
+gra4ii
+gra4ií
+3gra͡
+grÄ6iÄne
+grÄ6iÄÌne
+grăd2
+3gráe
+3græ
+3grǣ
+3grǽ
+gre3d4
+gre5di
+gre5dī
+gres3
+grĕ3d4
+grĕ5dī
+grĕ2s3
+grÄ•Ìs3
+grés3
+gré6sti
+gri3n
+2grī
+g2u
+gumi3
+gus3
+gūn4e
+gūn4ĕ
+2gŭæ
+gÅ­4Ä•Ì
+2gÅ­Ä«s
+gÅ­3m2Ä­
+gý3t
+h2a
+hab2
+ha4c3ue
+hae2c3
+ha2i
+ha2Ä«
+ha1m
+h3ang
+ha2o
+ha3re
+ha3rē
+hÄ2c1
+hÄ2i
+hÄ2Ä­
+h2ă
+hă3b2
+hă2ī
+h3ăng
+hă3ră
+hă3rē
+hă3rĕ
+h3ăÌng
+há2c3u
+háe2c3
+há2i
+h3áng
+hæ2a
+hæ2ă
+hæ2á
+hæ2c1
+hæ2i
+hæ2ŭ
+hǣ2a
+hǣ2ă
+hǣ2c1
+hǣ2ŭ
+hǽ2c1
+h2e
+he2a
+hed2
+he2e
+he3g
+he2ia
+he2iá
+he2ic3
+he2ie
+he2ié
+he2ii
+he2ií
+he2io
+he2ió
+he2í
+heíc3
+he2lu
+he2nu
+he2o
+he3r2a
+hera3g
+he3rá
+he3r2æ
+he3r2e
+he3r4i
+heris3
+he3rī
+he3ro
+hero5d
+he3se
+he2s3p
+hespe3
+he2sq
+he2st
+he2u
+he2Å«
+heū3s
+he2x
+h2Ä“
+hē2ia
+hÄ“2iÄ
+hē2iá
+hē2iæ
+hē2iǣ
+hē2iǽ
+hē2ie
+hē2iē
+hē2iī
+hÄ“2iÅ
+hēmĭ3s
+hē2nu
+hē3r
+hē4rn
+hē4rq
+hē4ru
+hē4rv
+hē3se
+hē3sĕ
+hēs3t
+h2Ä•
+hĕ2ă
+hĕ2ĭ
+hĕ3r4ĕ
+hĕ3rī
+hĕ3rŭ
+hĕ2sp
+hĕ2ū
+hĕū3s
+hé2i
+hé1m
+hé3r2a
+héra3g
+hé2ru
+hé2x
+h2i
+hi4c3ue
+hi2i
+hin2Ä
+hi2o
+hio2s
+hi3p2t
+hi4s3t
+his5ta
+his5tÄ
+his5te
+hi3uu
+h2Ä«
+hī2cu
+hī3p2
+hÄ«3sÅ
+hÄ«Ì3p2
+hÄ­n2a
+hÄ­n2Ä
+hĭn2æ
+hÄ­Å3p
+hÄ­3p2t
+hÄ­4st
+hÄ­s5tÄ
+hĭs5tă
+hĭs5tĕ
+hÄ­Ìp4t
+hí2c3u
+híp2t
+h2l
+2h1m2
+hmĭ2ă
+hmo4nu
+h1n2
+hno3b2
+hnu3
+hn4us
+hnū3
+h2o
+ho2a
+ho3b2
+hobī3u
+hobī3v
+ho2c3u
+ho2e
+ho2i
+hoi3q
+ho2Ä«
+hoī3u
+hoī3v
+hoÄ«Ì3u
+hoÄ«Ì3v
+ho2í
+hon3g4
+hongæ3
+hongÇ£Ì5
+hongǽ3
+ho2o
+ho2Å
+ho2ó
+ho5rén
+ho3rī
+ho2s
+ho3se
+ho3si
+ho3sí
+ho3spe
+hÅ2cu
+hÅne4
+hÅ2nu
+hÅ2sp
+h2Å
+2hÅ.
+hÅ2ă
+hÅ3b2
+hÅbÄ«3u
+hÅbÄ«3v
+2hÅd
+hÅ2Ä«
+hÅÄ«3u
+hÅÄ«3v
+hÅÄ«Ì3u
+hÅÄ«Ì3v
+hÅ2Ä­
+hÅn3g4
+hÅngæ3
+hÅngÇ£Ì5
+hÅngǽ3
+hÅ2Å
+hÅ3rÄ«
+hÅ2s
+hÅÌ3rÄ­
+hÅÌ4s
+hób2
+hó2c1
+hó3l
+hó2nu
+hó2sp
+2hœ
+h2r2
+hras5t
+hrăs3t
+hu2cu
+hu1i2
+huic3
+huí2
+huíc3
+hum2e
+h2Å«
+hū2cu
+hū3l
+hÅ«Ì3l
+hÅ­3mÄ­
+hú2c1
+hú3iu
+iab2
+iabo3l
+iab4u
+1iac
+3iact
+iad2æ3
+iad2Ç£
+iad2ǽ
+ia3d2e
+iad2Ä“
+iad2é
+iad2i
+iad2Ä«
+i2ae
+ia3iú
+i3alt
+iamb2
+iam5bi
+iambī5q
+iambī5u
+iambī5v
+iambÄ«Ì5q
+iambÄ«Ì5u
+iambÄ«Ì5v
+3iamī
+i3ang
+i3ann
+i1ap
+i2aq
+ia3re
+ia4rid
+ia4ríd
+ia3s4pe
+ia3spé
+ias3t
+ias5te
+ias5tr
+ia4tra
+ia4trá
+ia4tro
+ia4tró
+i2au
+i1a2x
+i2aÍž
+i2a͡
+2iÄc
+i2Än2
+3iÄnÄ•
+3iÄquÄ•
+i2Äru
+3iÄrÅ­
+3iÄsnÄ•
+5iÄsquÄ•
+3iÄsuÄ•
+3iÄsvÄ•
+iÄ4trÄ
+3iÄuÄ•
+3iÄvÄ•
+i1Ä2x
+3iÄÌnÄ•
+5iÄÌquÄ•
+3iÄÌrÅ­
+5iÄÌsnÄ•
+5iÄÌsquÄ•
+5iÄÌsuÄ•
+5iÄÌsvÄ•
+3iÄÌuÄ•
+3iÄÌvÄ•
+1iă
+iăd2
+iábo3
+3iácu
+2iád
+i2áe
+i3ált
+iám3b2
+i4áne
+i3áng
+2iáq
+iá4rid
+iá4tro
+i1á2x
+i2æ
+iæ2a
+iæ2á
+iæ2i
+i2Ç£
+iǣ2a
+i2ǽ
+ib2
+i3biu
+ibī3u
+ibī3v
+2iboe
+2iboē
+2iboé
+ibo3l
+i3bum
+ib4un
+i5bund
+4ibu2s3
+i3bū
+ib4Å«Ì
+4ibús3
+2ic.
+2i3ca
+2i3cÄ
+2i3cá
+2i3cæ
+2i3cǣ
+2i3cǽ
+2iceb
+2icen
+i4c3enn
+2icet
+i3cēn
+2icén
+i4c5énni
+2icéq
+2icéu
+2icév
+i3cia.
+i3ciaq
+i3ciau
+i3ciav
+i3cii
+i3cií
+i3cium
+i3ciúm
+2i3cīs
+i3cÄ«Ìs
+i3cía
+2icl
+2icn
+2i3co
+2i3cÅ
+2i3có
+2icq
+2ict
+i2c3u2t
+ic2Å«
+2icv
+i3d2a
+2i3d2e
+ide3mé
+ide2s
+2i3dē
+idē4iē
+idē3m
+idē2s
+2i3dé
+2i3d2i
+idi3g
+id3ips
+idi4s
+2i3dī
+2i3dí
+i3do
+id4or
+2i3d2u
+2i3dú
+2ie.
+1iec
+iece3
+ie2e
+2ieg
+ie4gn
+2ieī
+2ieí
+i2em
+2ieo
+2ieÅ
+2ieó
+2i2eq
+ie1r
+ie3r2e
+ie3rī
+i3erm
+ie2s
+i3e4sa
+i3esá
+ies3c
+i3ese
+i3esé
+i3e4si
+i3esí
+i3e4so
+i3esó
+ies5tÄ
+i3esú
+2iete
+iete5re
+2ietē
+2ieté
+2ietī
+2i2eu
+ie2un
+2ieú
+2i2ev
+1iex
+iex2i
+ie2xu
+2ieÍž
+2ie͡
+2iē.
+1iēc
+2iēg
+i2Ä“n
+iē3na
+2iē3ne
+2iēq
+3iēquĕ
+iē2s
+iē4sa
+iē3sū
+4iēta.
+4iētae.
+6iētaene
+6iētaeque
+6iētaeue
+6iētaeve
+4iētam
+4iētan
+4iētaq
+4iētau
+4iētav
+6iēta͞e.
+6iēta͞ene
+6iēta͞eque
+6iēta͞eue
+6iēta͞eve
+6iÄ“taÍžÌene
+6iÄ“taÍžÌeque
+6iÄ“taÍžÌeue
+6iÄ“taÍžÌeve
+6iēta͡e.
+6iēta͡ene
+6iēta͡eque
+6iēta͡eue
+6iēta͡eve
+6iÄ“taÍ¡Ìene
+6iÄ“taÍ¡Ìeque
+6iÄ“taÍ¡Ìeue
+6iÄ“taÍ¡Ìeve
+2iÄ“tÄ
+5iÄ“tÄnÄ•
+5iÄ“tÄquÄ•
+5iÄ“tÄrÅ­
+5iÄ“tÄsnÄ•
+5iÄ“tÄsquÄ•
+5iÄ“tÄsuÄ•
+5iÄ“tÄsvÄ•
+5iÄ“tÄuÄ•
+5iÄ“tÄvÄ•
+5iÄ“tÄÌnÄ•
+5iÄ“tÄÌquÄ•
+5iÄ“tÄÌrÅ­
+5iÄ“tÄÌsnÄ•
+5iÄ“tÄÌsquÄ•
+5iÄ“tÄÌsuÄ•
+5iÄ“tÄÌsvÄ•
+5iÄ“tÄÌuÄ•
+5iÄ“tÄÌvÄ•
+6iētáene
+6iētáeque
+6iētáeue
+6iētáeve
+4iētám
+4iētæ.
+4iētæne
+6iētæque
+4iētæue
+4iētæve
+4iētǣ.
+4iētǣne
+6iētǣque
+4iētǣue
+4iētǣve
+6iÄ“tÇ£Ìne
+6iÄ“tÇ£Ìque
+6iÄ“tÇ£Ìue
+6iÄ“tÇ£Ìve
+4iētǽne
+6iētǽque
+4iētǽue
+4iētǽve
+4iētē.
+4iētēn.
+4iētēne
+6iētēnne
+6iētēnque
+6iētēnue
+6iētēnve
+6iētēque
+4iētēs.
+6iētēsne
+6iētēsque
+6iētēsue
+6iētēsve
+4iētēue
+4iētēve
+6iÄ“tÄ“Ìne
+6iÄ“tÄ“Ìnne
+6iÄ“tÄ“Ìnque
+6iÄ“tÄ“Ìnue
+6iÄ“tÄ“Ìnve
+6iÄ“tÄ“Ìque
+6iÄ“tÄ“Ìsne
+6iÄ“tÄ“Ìsque
+6iÄ“tÄ“Ìsue
+6iÄ“tÄ“Ìsve
+6iÄ“tÄ“Ìue
+6iÄ“tÄ“Ìve
+4iētīs.
+6iētīsne
+6iētīsque
+6iētīsue
+6iētīsve
+6iÄ“tÄ«Ìsne
+6iÄ“tÄ«Ìsque
+6iÄ“tÄ«Ìsue
+6iÄ“tÄ«Ìsve
+2i2Ä“u
+3iēuĕ
+2i2Ä“v
+3iēvĕ
+1iēx
+3iÄ“Ìc
+2iÄ“Ìg
+iÄ“Ì2s
+4iÄ“Ìta
+4iÄ“ÌtÄ
+4iÄ“Ìtæ
+4iÄ“ÌtÇ£
+4iÄ“ÌtÄ“
+4iÄ“ÌtÄ«
+i2Ä“Ìu
+i2Ä“Ìv
+1iĕ
+iĕ1r
+iĕ3r4ĕ
+iĕs3
+1iéc
+2iég
+ié4gn
+i2é1m
+2iéne
+2iéq
+i3érm
+ié2s
+ié4sa
+i3ése
+i3ési
+2iéte
+2iéu
+2iév
+1iéx
+ié2xu
+2ié͞
+2ié͡
+2if
+ife6ste
+ig2a
+1ig2æ3
+1ig2Ç£
+4igena
+4igenÄ
+4igená
+4igenæ
+4igenǣ
+4igenǽ
+4igenen
+4igeneq
+4igeneu
+4igenev
+4igenē
+4igené
+4igeni
+4igenī
+4igení
+4igeno
+4igenÅ
+4igenó
+4igenu
+4igenú
+4igéna
+ig2l
+i2gn
+ig3nat
+ig3nÄt
+ig5nÄÌt
+ig3nát
+ig3nē
+i3gr
+2i1h
+i3ha
+ihí3
+i1i2a
+iiam3
+i1i2á
+i1ie
+i1iē
+i1io
+i1ió
+i1iu
+i2iue
+i1iú
+i2Ä«
+3iīnĕ
+3iīuĕ
+3iīvĕ
+1iÄ­
+2ij
+2i3le
+ilē3i
+ilÄ“Ì3i
+2i3lé
+i3li
+ili4g5n
+ilí4g3
+4ille.
+4illen
+4illeq
+6illeue.
+6illeve.
+4illi.
+4illiq
+4illis
+4illiu
+4illiv
+2illī
+6illíne.
+4illíq
+4illís
+4illíu
+4illív
+2illo
+2illÅ
+2illó
+4illum
+4illus.
+4illusn
+4illusq
+4illusu
+4illusv
+4illúm
+4illúsn
+4illúsq
+4illúsu
+4illúsv
+2ilo
+2iló
+i2l3ua
+i2luÄ
+i2l3uá
+i2l3uæ
+i2luǣ
+i2l3uǽ
+il3ue.
+il3ues
+i2l3uē
+il4uēr
+il3ués
+il5uis.
+il5uisn
+il5uisq
+il5uisu
+il3uīs
+il5uÄ«Ìs
+il5uísn
+il5uísq
+il5uísu
+i2luo
+i2luÅ
+i2l3uó
+i2luu
+i2luú
+i1m
+2im.
+i3ma.
+i2mad
+ima4lu
+im2am
+im2an
+i3maq
+im2as
+i3mau
+i3mav
+imás3
+i3mæ
+i3mǣ
+i3mǽ
+im3b2
+im5biv
+imbī3q
+imbī3u
+imbī3v
+imbÄ«Ì5q
+imbÄ«Ì5u
+imbÄ«Ì5v
+im2e
+2imed
+ime5dá
+ime5de
+ime5dé
+2imel
+4imetr
+2imēd
+2imēl
+4imÄ“Ìd
+4imÄ“Ìl
+2iméd
+2imél
+4i5métr
+im2i
+imi2a
+i4micu
+i4micú
+3i2mie
+3i2miē
+3i2mié
+3i2mii
+i4minē
+4i5minī
+3i2mir
+i4mitæ
+i4mitǽ
+i4mitu
+3i2míc
+3i2míi
+3i2mír
+imí5tur
+1imm
+2imn
+imo4nu
+i4m3ord
+i4m3órd
+1imp
+impe5r6ii
+impe5r6iī
+impe5r6ií
+impe5rin
+impe5riue
+impe5riv
+impe5r4Ä«
+2imq
+2imue
+2imv
+i1n
+i3na.
+i3nae
+in4al
+i3nam
+i3n4aq
+i3nar
+i3nas
+i3nau
+i3n4av
+i3na͡
+i3náe
+in4ál
+i3nám
+i3náq
+i3nár
+i3nás
+i3náu
+i3náv
+i3næ
+i3nǽ
+indi5st
+in4d3ue
+in4d3ui
+in4d3uī
+in4d3uí
+in4d3úe
+2i3ne
+ine2d
+ine2l
+ine2x
+in3eÍž
+in3e͡
+i3né
+iné2d
+1inf
+i3ni.
+i3nia
+i3niá
+i3nib
+ini2c
+in3ice
+in3ici
+i3nii
+i3nií
+ini2m
+i3nin
+i3nio
+i3nió
+i3nis
+i3nit
+i3niu
+i3niú
+i3niv
+iní4ciÄ
+iní4cie
+iní4ciē
+iní4ciÅ
+i3nín
+i3níq
+i3nís
+i3níu
+i3nív
+1inj
+2i3no
+2i3nÅ
+2i3nó
+in5réq
+1in1s2
+insi5ti
+instre5
+instré5
+4int.
+in5ter
+inte5ron
+inte5rÅn
+inte5rÅÌn
+inté6r5is
+2inth
+4intn
+4intq
+2intu
+4intv
+1in1u2
+inu4b
+4inum
+2i3nus
+in1Å«2
+inÅ«Ì4b
+inú2b
+in3únd
+1inv
+io1
+io2a
+iob2
+iobo3
+io2bó
+iom2
+iome3
+iome5d
+2ion
+io3n2i
+io5ni5c
+3iono
+3ionó
+2iope
+2iopē
+2iopé
+io3rī
+2ios
+io2st
+iot4e
+io5ten
+iot4é
+io5tén
+i2Å
+iÅ3d
+3iÅnÄ•
+3iÅrÅ­
+3iÅuÄ•
+3iÅvÄ•
+1iÅ
+i1ó2b
+ióbo3
+2ióc
+2ióni
+2iós
+2ipa
+2ipÄ
+2ipá
+2i3pe
+ipe3r
+iper4a
+iper4Ä
+iper4æ
+iper4ǽ
+iper4e
+iper4Ä“
+iper4o
+iper4ó
+2i3pē
+2ipé
+2iph
+2i3pi.
+2i3pib
+2i3pin
+2i3piq
+4i3pis.
+4i3pisn
+4i3pisq
+4i3pisu
+4i3pisv
+2i3piu
+2i3piv
+2ipī.
+2i3pīn
+2ipīq
+2ipīu
+2ipīv
+4i3pÄ«Ìn
+4i3pÄ«Ìq
+4i3pÄ«Ìu
+4i3pÄ«Ìv
+2ipín
+2ipíq
+i4písc
+4ipísn
+4ipísq
+4ipísu
+4ipísv
+2ipíu
+2ipív
+2ipl
+ip2ne
+ipo4s3
+2i3pu
+ipu3l
+2ipú
+2ir.
+i1r2a
+irad2
+ira3g
+iras7cen
+iras5t
+i1r2æ
+iræ3d
+i1r2Ç£
+irǣ3d
+i1re
+i3re3d4
+ire5di
+ir3e4me
+ire4mér
+ir5e4mim
+ir5e4mis
+ire4mít
+i3r2ex2
+ire5xi
+ir1Ä“
+iré4mer
+ir5é4mim
+i1rh
+i1r2i
+i2r3i2b
+iri4be
+i2r3i2m
+iri3n
+i1rī
+ir3í2b
+i2r3í2m
+i1ro
+i1rÅ
+1irr
+ir5réq
+2irrh
+ir5rue
+i1ru
+i2rue
+i1ry
+i1rý
+2is.
+is2ad
+i2s3al
+is3a4tr
+i2s3Ä2
+isÄÌ2
+is4ád
+2i2sc
+is3cæ
+i5scendamus
+i5scendamú
+i5scendant
+i5scendat
+i5scendámus
+i5scendánt
+i5scendát
+i6scende.
+i6scendene
+i6scendeq
+i6scendeu
+i6scendev
+i5scendé
+i5scendim
+i5scendit
+i5scendít
+i5scendun
+i5scendún
+is7cens.
+is7censn
+is7censq
+is7censv
+i5scéndant
+i5scéndat
+i5scéndens
+i5scéndent
+i5scénder
+i5scéndes
+i5scéndet
+i5scéndim
+i5scéndit
+i5scéndun
+i5s6cénsa
+i5s6cénsæ
+i5s6cénse
+i5s6cénsi
+i5s6cénso
+i5s6cénsu.
+i5s6cénsum
+i5s6cénsus
+is4cid
+i3s4cis
+i4s5cis.
+i4s5cisn
+i4s5cisq
+is5cisu
+i4s5cisv
+is3ciu
+is3civ
+is3cī
+is4cíd
+i5s4císs
+2is2e
+2isi
+i2s3i2c
+i2sie
+i2siē
+is4iue
+2isí
+i2s3í2c
+2ism
+2isn
+2iso
+3i2sod
+2isó
+3isód
+i3spec
+is3per
+i5sperg
+isperi6n
+isperi6q
+isper7i6u
+isperi6v
+isperī6n
+isperī6q
+isperī6u
+isperī6v
+isperÄ«Ì6n
+isperÄ«Ì6q
+isperÄ«Ì6u
+isperÄ«Ì6v
+isperí6n
+isperí6q
+isperí6u
+isperí6v
+i5spers
+i3spex
+i3spéc
+i5spérg
+i5s4pérn
+i5spérs
+i3spéx
+is3pī
+2i2s3q
+i3s4tab
+i3s4tan
+i5s4taue
+i5s4taué
+i5s4tave
+i5s4tavé
+is4tÄb
+is4tÄt
+is4tÄu
+is4tÄv
+i3s4táb
+i4s5táe
+is5the
+is5thé
+i2sti
+i3stil
+i2stī
+i2stí
+i3s4tíl
+i3stír
+is3to
+i5strin
+2isu
+i4sue
+is3uis
+is3uís
+2isú
+2isv
+2it.
+itas3t
+ita6ste
+4itatem
+4itates
+4itatém
+4itatés
+4iter.
+ite3ra
+ite5re
+ite3ri
+iteri5ue
+iteri5v
+4itern
+ite3rÅ
+4iterq
+4iteru
+ite5run
+4iterv
+i3tē.
+i3tēn
+i3tēq
+i3tēu
+i3tēv
+i3téq
+4itérn
+4itérq
+4itéru
+4itérv
+i3téu
+i3tév
+2ith
+i4tial
+i4tiál
+2itn
+4itÅt
+4i5tÅÌt
+2itq
+i3tr
+it4ri
+2itt
+2itud
+i4t3ue.
+2itūd
+2itúd
+2itv
+2iu.
+2i1ua
+2i1uÄ
+2i1uá
+2i1uæ
+2i1uǣ
+2i1uǽ
+1iub2
+1iuc
+1iud
+2iud.
+iu2d3u
+i1ue
+i3ue.
+i4uerÅ
+2i1uē
+i1ué
+1iug
+i1ui
+2iuia
+3i2uiÄ
+3i2uiá
+3i2uiæ
+3i2uiǣ
+3i2uiǽ
+iuid4
+iui3g4
+2iuii
+2iuiī
+2iuií
+2iuio
+2iuiÅ
+2iuió
+i5uis.
+i5uisn
+i5uisq
+i5uisu
+4iuium
+4iuius
+2iuiú
+2i1uī
+i1uí
+2i3uía
+iuí3g4
+i3uísn
+i3uísq
+i3uísu
+3iulī
+3iulu
+i2um
+iu3ma
+i3und
+3iung
+3iunx
+2iuo
+2i1uÅ
+2i1uó
+1iur
+iu2s3
+i4us.
+3iusd
+i4usn
+3iusp
+i4usq
+i4usu
+i4usv
+3iuua
+3iuue
+2i3uum
+3iuuo
+2i3uus
+2i1uú
+1iuv
+1iu2x3
+1iū
+iūn4e
+iūn4ĕ
+i2Å«r
+iū3rē
+iū2s
+iū2x3
+1i2Å­
+iÅ­2s
+iÅ­Ì3b
+i2ú
+iúb2
+1iúd
+iú2du
+1iúg
+iú3lu
+2iúm
+i3únd
+3iúng
+3iúnx
+1iúr
+iú2s3
+1iú2x
+2iva
+2ivá
+2ivæ
+2ivǽ
+i3ve.
+2ivia
+3i2viÄ
+3i2viá
+3i2viæ
+3i2viǣ
+3i2viǽ
+ivi3g4
+2ivii
+2iviī
+2ivií
+2ivio
+2iviÅ
+2ivió
+i5vis.
+i5visn
+i5visq
+i5visv
+2iviu
+2iviú
+2ivī
+2i3vía
+iví3g4
+i3vísn
+i3vísq
+i3vísv
+2ivo
+2ivó
+2ivu
+2ivú
+2ix2
+ix4eu
+ixo3r
+ixu3
+i2x3ue
+ix4us
+2iz
+Ä«2a
+Ä«a2m
+Ä«a2t
+Ä«2Ä
+Ä«Ä2tr
+Ä«ÄÌ4tr
+ī2ă
+ī2á2
+ī2æ
+Ä«2Ç£
+ī2ǽ
+Ä«b2
+Ä«ba2
+Ä«3bas
+ī3băs
+ībá2
+ī3bás
+Ä«be3rÅ
+ībĕ3rŭ
+ībī3u
+ībī3v
+Ä«bo2
+2Ä«c
+Ä«ca2r
+Ä«5cene
+Ä«4c3enn
+ī3cē
+ī5cĕnĕ
+Ä«4c3Ä•nn
+īc3énn
+Ä«3ci
+ī3cī
+Ä«3cÄ­
+ī3cí
+Ä«2c3ue
+Ä«2c3u2t
+Ä«2c3Å­t
+ī3cú
+2Ä«d2
+Ä«da2r
+Ä«de2s
+īdē2s
+Ä«3do
+Ä«d4or
+Ä«3du
+īdū2
+Ä«2e
+Ä«e2t
+Ä«2Ä“
+Ä«2Ä•
+īé2
+Ä«g2
+Ä«3ga2
+īgá2
+ī3gæ3
+ī3gǣ
+Ä«3gn
+Ä«g4ne
+Ä«g4nu
+Ä«go2
+2Ä«1h
+Ä«3ha
+ī3hă
+Ä«1i
+Ä«2Ä«
+2Ä«l
+Ä«le2i
+Ä«le2r
+īlé2
+Ä«lo2
+Ä«1m
+Ä«m2a
+Ä«m2e
+Ä«m2i
+Ä«m2Ä­
+Ä«mo3
+Ä«1n
+Ä«n2Ä
+Ä«ne2r
+Ä«n2Ä•
+īné2
+1Ä«nf
+Ä«no2
+1Ä«n1s2
+Ä«n2u
+Ä«2n3ue
+Ä«n2Å­
+2Ä«o
+Ä«o3n
+Ä«o4nn
+Ä«o4nq
+Ä«o4nv
+2Ä«2Å
+2Ä«Å
+2īó
+2Ä«2p
+Ä«3pa
+Ä«3pÄ
+ī3pă
+ī3pá
+ī3pæ
+ī3pǣ
+ī3pǽ
+Ä«3pe3
+Ä«per2
+ī3pē
+ī3pĕ
+īpĕ3r4
+Ä«pÄ•Ì3
+ī3pé
+Ä«3ph
+Ä«3pi
+ī3pī
+Ä«3pÄ­
+Ä«3pÅ
+Ä«3pu
+ī3pū
+Ä«3pÅ­
+ī3pú
+Ä«1r
+Ä«r2a
+Ä«ra3g
+Ä«ra2r
+Ä«rÄs3
+ī3r2ă
+īræ2ă
+īrǣ2ă
+ī3rēu
+ī3rēv
+Ä«ro2
+īró2
+Ä«sa2r
+īsá2
+īs3cæ
+īs3cǣ
+īs3cī
+2Ä«s2e
+2Ä«3s2Ä•
+Ä«s2i
+2īsī
+1Ä«2so
+2Ä«sÅ
+1Ä«2sÅ
+1īsó
+Ä«2sq
+īs4tíl
+Ä«s3tr
+Ä«2sue
+ī2suĕ
+2Ä«sÅ­
+2īsú
+Ä«ta2r
+Ä«ta6ste
+ītăs5t
+ītă6stĕ
+Ä«te5re
+2ītē
+ītĕ3rĕ
+Ä«1u2
+2Ä«ua
+2Ä«uÄ
+2īuă
+2īuá
+2īuæ
+2īuǣ
+2īuǽ
+Ä«uid4
+Ä«ui3g4
+Ä«uÄ­3g2
+Ä«uÄ­Ì3g4
+īuí3g4
+Ä«2um
+Ä«2un
+Ä«uo2
+2Ä«uÅ
+2Ä«uu
+2Ä«uÅ­
+2īuú
+2Ä«Å«
+Ä«2Å­
+ī2ú
+2Ä«va
+2Ä«vÄ
+2īvă
+2īvá
+2īvæ
+2īvǣ
+2īvǽ
+Ä«vi3g4
+Ä«vÄ­3g2
+Ä«vÄ­Ì3g4
+īví3g4
+2Ä«vÅ
+2Ä«vu
+2Ä«vÅ­
+2īvú
+Ä«x2
+Ä«x4eu
+Ä«xo4r
+Ä«2x3ue
+Ä«x4us
+īxū3r
+Ä«2Ì
+Ä«Ìb2
+2Ä«Ìc
+Ä«Ì3ce
+Ä«Ì3cÄ•
+Ä«Ì3cÄ«
+Ä«Ì3cÄ­
+2Ä«Ìd2
+Ä«Ì3g2
+Ä«Ìg4n
+2Ä«Ìh
+Ä«Ì5hai
+Ä«Ì5hăĭ
+Ä«Ì1i
+Ä«Ì3lu
+Ä«Ì1m2
+Ä«Ì3met
+Ä«Ì3mÄ•t
+3Ä«Ìn3s2
+Ä«Ì3r2ă
+Ä«Ì3sÄ•
+Ä«Ì4s3t
+Ä«Ìs5tr
+2Ä«ÌÅ«
+2Ä­a
+2Ä­Ä
+Ä­Ä4trÄ
+Ä­1Ä2x
+4Ä­ÄÌn
+Ä­3ÄÌ2x
+2ĭă
+ĭăb2
+ĭă4cÄ•Ì
+ĭ2ăcŭ
+ĭăd2a
+ĭă2dă
+ĭăd2æ
+ĭăd2ǣ
+ĭăd2ǽ
+ĭăd2ē
+ĭă3d2ĕ
+ĭăd2ī
+ĭămb2
+ĭămbī5n
+ĭămbī5u
+ĭămbī5v
+ĭămbÄ«Ì5n
+ĭămbÄ«Ì5u
+ĭămbÄ«Ì5v
+ĭăm5bŭ
+ĭă2m3ĭ
+ĭ3ăng
+ĭă2nĭ
+ĭ2ănt
+ĭ1ă2p
+ĭ2ăq
+ĭ2ăr
+ĭă3rĕ
+ĭă3s4pĕ
+ĭăs3t
+ĭăs5tĕ
+ĭăs5tr
+ĭ2ăt
+ĭ2ău
+ĭ2ăv
+Ä­2ăÌc
+ĭăÌ3d
+Ä­3ăÌl
+Ä­2ăÌm
+ĭăÌm3b4
+ĭăÌ2n
+Ä­3ăÌng
+Ä­2ăÌr
+2ĭá
+2ĭæ
+ĭæ2ă
+ĭæ2ŭ
+2Ä­Ç£
+ĭǣ2ă
+Ä­Ç£2Å­
+2ĭǽ
+ĭbĕ3rŭ
+Ä­b2Ä«
+ĭbī3u
+ĭbī3v
+Ä­b2Ä­
+Ä­b2Å
+Ä­bÅ3l
+Ä­b2r
+Ä­3b2Å«
+Ä­b4Å«Ì
+Ä­3bÅ­m
+2Ä­3ca
+2Ä­3cÄ
+2ĭ3că
+2ĭ3cá
+2ĭ3cæ
+2ĭ3cǣ
+2ĭ3cǽ
+ĭ3cēn
+2ĭ3cīs
+Ä­3cÄ«Ìs
+2Ä­3cÅ
+2Ä­3cÅ
+Ä­2cu
+Ä­c2Å«
+2Ä­d
+ĭ3dă
+ĭ3dē
+ĭdē3m
+ĭdē2s
+Ä­3d2Ä•
+ĭ3dī
+Ä­3dÄ­
+Ä­dÄ­3g
+Ä­dÄ­Ì3g
+Ä­d3Ä­Ìp
+Ä­2d1u
+Ä­3d2Å­
+Ä­d4Å­Ä•
+2Ä­2e2
+2Ä­Ä“.
+2Ä­Ä“g
+4ĭēnĕ
+2Ä­Ä“q
+Ä­Ä“2s
+Ä­3Ä“sa
+ĭ3ēsē
+ĭ3ēsĕ
+ĭ3ēsī
+Ä­Ä“s3p
+Ä­Ä“s3t
+2Ä­Ä“u
+2Ä­Ä“v
+2Ä­Ä“Ìg
+4Ä­Ä“Ìq
+Ä­Ä“Ì2s
+Ä­3Ä“ÌsÄ“
+Ä­3Ä“ÌsÄ•
+Ä­3Ä“ÌsÄ«
+4Ä­Ä“Ìu
+4Ä­Ä“Ìv
+2Ä­Ä•.
+2Ä­1Ä•g
+2Ä­Ä•Ä«
+2Ä­2Ä•m
+2Ä­Ä•Å
+2Ä­Ä•q
+Ä­Ä•3r2Ä•
+Ä­3Ä•rm
+2ĭĕtē
+2ĭĕtĕ
+2ĭĕtī
+2Ä­Ä•tÄ­
+2Ä­Ä•tÅ­
+2Ä­Ä•u
+2Ä­2Ä•Å­
+2Ä­Ä•v
+2Ä­3Ä•Ìg
+Ä­Ä•Ì3rÄ•
+4Ä­Ä•ÌtÄ•
+4Ä­Ä•ÌtÄ­
+2ĭé
+ĭfĕ6stĕ
+1Ä­g2a
+1ĭgá
+1ĭg2æ3
+1Ä­g2Ç£
+1ĭgǽ
+4ĭgĕna
+4Ä­gÄ•nÄ
+4ĭgĕnă
+4ĭgĕná
+4ĭgĕnæ
+4ĭgĕnǣ
+4ĭgĕnǽ
+4ĭgĕnē
+4ĭgĕnĕn
+4ĭgĕnĕq
+4ĭgĕnĕu
+4ĭgĕnĕv
+4ĭgĕnī
+4Ä­gÄ•nÅ
+4ĭgĕnŭ
+3ĭgĕs
+4Ä­gÄ•Ìnă
+4Ä­gÄ•ÌnÄ•
+3ĭgĭă
+3Ä­gÄ­b
+3Ä­gÄ­Å­
+Ä­2gn
+Ä­g3nÄt
+Ä­g5nÄÌt
+ĭg3nē
+Ä­g3nÄ­
+Ä­3gr
+Ä­1h
+Ä­hÄ­Ì3
+Ä­1i
+2Ä­Ä«
+ĭ3ĭ2ă
+ĭĭăm3
+2Ä­le
+2ĭ3lē
+ĭlē3i
+Ä­lÄ“Ì3i
+2ĭ3lĕ
+2ĭlé
+2ĭ3lī
+2Ä­3lÄ­
+2ĭllĕ
+2ĭllī
+2Ä­llÅ
+2Ä­llÅ­
+Ä­2l1u
+Ä­1m
+ĭ2măd
+ĭmăs3
+Ä­m3b2
+ĭmbī3n
+ĭmbī3u
+ĭmbī3v
+Ä­mbÄ«Ì5n
+Ä­mbÄ«Ì5u
+Ä­mbÄ«Ì5v
+4ĭ5mĕtr
+4Ä­mÄ•Ìtr
+Ä­m2Ä­
+ĭmĭ2ă
+3Ä­2mÄ­Ä“
+3Ä­2mÄ­Ä•
+3Ä­2mÄ­Ä­
+2Ä­mÄ­n
+ĭ4mĭnē
+ĭ4mĭnĕ
+1Ä­mm
+1Ä­mp
+ĭmpĕ5rī
+Ä­2mu
+2Ä­mÅ­r
+Ä­n1a
+2ĭ3nă
+ĭn4ăn
+ĭn4ăq
+ĭn4ău
+ĭn4ăv
+ĭn1æ
+Ä­ndÄ­5st
+Ä­n4d3Å­Ä•
+Ä­n4d3Å­Ä«
+Ä­n4d3Å­Ä­
+Ä­n4d5Å­ÌÄ•
+Ä­n4dÅ­ÌÄ­
+Ä­n3e
+2ĭ3nĕ
+ĭnĕ2d
+Ä­n4Ä•n
+Ä­n4Ä•u
+Ä­n4Ä•v
+ĭnĕ2x
+Ä­nÄ•Ì4d
+3Ä­ngr
+1Ä­2n1i
+2ĭnī
+Ä­3n4Ä­b
+Ä­n5Ä­bÄ­
+Ä­nÄ­2c
+Ä­3n4Ä­s
+Ä­nÄ­2t
+Ä­nÄ­Ì4cÄ­
+Ä­3nÄ­Ìs
+1Ä­nj
+2Ä­3nÅ
+Ä­nÅ4p
+Ä­nÅ3s2
+4Ä­nt.
+3ĭntĕ
+Ä­ntÄ•5rÅn
+4Ä­ntn
+4Ä­ntq
+4Ä­ntu
+4Ä­ntv
+1Ä­nu
+Ä­n1Å«2
+Ä­nÅ«Ì4b
+1Ä­nÅ­
+1Ä­nv
+2Ä­Å
+2Ä­Å
+Ä­Åb2
+Ä­Å2bÅ
+Ä­Åm2
+Ä­2Ån
+Ä­2År
+Ä­Å3rÄ«
+Ä­Å2s
+Ä­ÅÌ2b
+Ä­2ÅÌn
+Ä­2ÅÌr
+2Ä­pÄ
+2ĭpē
+2ĭpĕ
+ĭpĕ3rĕ
+Ä­pÄ•3rÅ
+Ä­pÄ•3rÅ
+2ĭpī.
+2ĭ3pīn
+2ĭpīq
+2ĭpīu
+2ĭpīv
+4Ä­3pÄ«Ìn
+4Ä­3pÄ«Ìq
+4Ä­3pÄ«Ìu
+4Ä­3pÄ«Ìv
+2Ä­3pÄ­
+2Ä­pl
+Ä­p2n
+2Ä­ps.
+2Ä­psn
+2Ä­psq
+2Ä­p2su
+2Ä­psv
+2Ä­pÅ­
+2Ä­q
+Ä­3qu
+Ä­1r2a
+ĭ1ră
+ĭ1r2æ3
+Ä­1r2Ç£
+ĭrǣ3d
+Ä­r1Ä“
+Ä­1rh
+ĭ1rī
+Ä­2r1Ä­2
+Ä­rÄ­Ì2
+Ä­1rÅ
+Ä­1rÅ
+2Ä­rrh
+Ä­1rÅ­
+Ä­r4Å­n
+Ä­1ry
+2Ä­s
+Ä­2s3Ä2
+Ä­sÄÌ2
+ĭ2s1ă
+ĭs2ăd
+Ä­2sc
+ĭs3cī
+Ä­3s4cÄ­s
+Ä­5s6cÄ­Ìss
+Ä­2si
+Ä­s1Ä­
+Ä­sÄ­2c
+Ä­sÄ­Ì4c
+ĭ3spĕc
+ĭs3pĕr
+ĭ5spĕrg
+ĭspĕrī6n
+ĭspĕrī6q
+ĭspĕrī6u
+ĭspĕrī6v
+Ä­spÄ•rÄ«Ì6n
+Ä­spÄ•rÄ«Ì6q
+Ä­spÄ•rÄ«Ì6u
+Ä­spÄ•rÄ«Ì6v
+ĭspĕ4r5ĭ
+ĭ5spĕrs
+ĭ3spĕx
+Ä­5spÄ•Ìc
+Ä­spÄ•Ì4r5
+Ä­5spÄ•Ìrg
+Ä­5spÄ•Ìrn
+Ä­5spÄ•Ìrs
+Ä­5spÄ•Ìx
+ĭs3pī
+3Ä­ssÄ­s
+Ä­s4tÄb
+Ä­s4tÄns
+Ä­s4tÄt
+Ä­s4tÄu
+Ä­s4tÄv
+Ä­s4tÄÌb
+ĭ3s4tăn
+ĭ3s4tĕm
+Ä­5s4tÄ•Ìm
+Ä­3s4tÄ­m
+2Ä­t.
+ĭ3tē.
+ĭ3tēn
+ĭ3tēq
+ĭ3tēu
+ĭ3tēv
+Ä­3tÅt
+Ä­3tÅÌt
+2Ä­tÅ
+Ä­3tr
+Ä­2tu
+2Ä­3tÅ­r
+Ä­3tÅ­Ìr
+Ä­1u
+ĭ3uĕ
+2ĭuī
+Ä­1Å«s
+2Ä­Å­2
+Ä­1Å­b
+Ä­3Å­nd
+Ä­3Å­Ìnd
+ĭ3vĕ
+2ĭvī
+Ä­x2a
+Ä­x2Ä
+ĭx2ă
+Ä­x2Ç£
+Ä­x2Ä•
+Ä­x2Ä«
+Ä­x2Ä­
+Ä­x2Å
+Ä­x2Å
+Ä­2xu
+Ä­x2Å­
+Ä­2Ì
+2Ä­Ìă
+Ä­Ìb2Ä«
+Ä­ÌbÅ3l
+Ä­Ìb2r
+2Ä­Ìd
+Ä­Ì2d3u
+Ä­Ì2Ä•
+2Ä­ÌÄ•t
+3Ä­Ìgĭă
+3Ä­ÌgÄ­b
+3Ä­ÌgÄ­Å­
+2Ä­Ìl
+Ä­Ì5lÄ­n
+Ä­Ìl3u
+Ä­Ìm3b2
+3Ä­ÌmÄ­Ä­
+Ä­Ì4mÄ­nÄ“
+Ä­Ì5mÄ­nÄ«
+3Ä­Ìmm
+Ä­Ìn4d5Å­Ä«
+Ä­Ìn4dÅ­Ä­
+Ä­Ìn3Ä•s
+Ä­Ìn3Ä«
+3Ä­Ìnj
+Ä­ÌnÅ4p
+3Ä­ÌntÄ•5
+Ä­Ìn5Å­Ä«s
+Ä­Ìn5Å­Ås
+Ä­Ìn5Å­Å­m
+Ä­Ìn5Å­Å­s
+Ä­ÌÅ1
+Ä­ÌrÄ­4m
+2Ä­Ìs
+Ä­Ì4spÄ•r
+5Ä­ÌssÄ­s
+Ä­Ì5s4tÄn
+Ä­Ìs4tÄ•m
+2í2a
+íad2
+ía3g
+ía1m
+ía1s
+íb2e
+íbe3r
+íb2i
+íb2ī
+íb2o
+íbo3l
+íb2r
+íb2u
+í3bum
+2íc.
+2íca
+2íce.
+2ícem
+2íces
+2ícet
+2í3ci.
+2í3cis
+2ícl
+2ícn
+2íco
+2ícq
+2íct
+í2c3u2t
+2ícv
+2íd
+í3d2e
+íd2i
+íd2u
+í3duu
+í2e1
+2íei
+2íeī
+2íen
+2íeo
+2íeÅ
+2íeq
+2íet
+2íeu
+2íev
+2íf
+ífe1
+íg2a
+í3gæ
+4ígena
+4ígenÄ
+4ígenæ
+4ígenǣ
+4ígenē
+4ígeni
+4ígenī
+4ígeno
+4ígenÅ
+4ígenu
+í2giī
+í2giÅ
+í2gn
+2í1h
+í3ha
+í1i
+2íi.
+í2im
+2í2is
+í2it
+í3li
+2ílle
+4ílli.
+4íllis
+2íllī
+2íllo
+2íllÅ
+2íllu
+íl1u
+í2lua
+í2luÄ
+í2luæ
+í2luǣ
+í4luis
+íl4uit
+í4luiu
+í4luīs
+í2luu
+2í1m2a
+2ím3b2
+ím2e
+2ímet
+ím2i
+í4minē
+í5minī
+1ímm
+2ímn
+í1mo
+ímpe3
+2ímq
+ím2uī
+2ímv
+ín2a
+ín3de
+ín4d3i4g
+índo4
+ín4d3ol
+ín4due
+ín4d3ui
+ín4d3uī
+2íne
+íni4cit
+ín1ī
+1ínj
+ín3o4p
+1ín1s2
+ín2t
+ínte3
+ínte5r
+2ínth
+2íntn
+ín3to
+2íntq
+2íntu
+2íntv
+í1nu
+ín2ua
+ín2uÄ
+ín2uē
+ín2ul
+í3nus
+2í2o1
+2íp
+ípe3
+í3pi
+í2pn
+ípte3
+ípu3l
+í1r
+ír2a
+íra3g
+ír3i4be
+ír3i4bē
+ír3i4ma
+ír3i4mÄ
+ír3i4me
+ír3i4mē
+ír3i4mi
+ír3i4mī
+ír3i4mo
+ír3i4mÅ
+1írr
+ír5rue
+í2rue
+2ís
+í2s3c
+ís4cid
+ís2i
+í2s3i2c
+í4sper
+ís3pī
+ís3q
+ís4tans
+í3s4tÄn
+ís4tem
+ís5tim
+ís5tin
+ís3to
+ís3uis
+íte1
+í2tu
+í3tu.
+í3tui
+4ítuis
+4ítuīs
+í3tum
+2ítuo
+2ítuÅ
+í3tus
+2ítut
+í1u2
+2íu.
+í3ub
+2íud
+2íuia
+3í2uiÄ
+3í2uiæ
+3í2uiǣ
+2íuii
+2íuiī
+2íuio
+2íuiÅ
+2íuiu
+2í2um
+í2un
+íuo1
+2ívia
+3í2viÄ
+3í2viæ
+3í2viǣ
+2ívii
+2íviī
+2ívio
+2íviÅ
+2íviu
+ívo1
+2íx
+íx2a
+íx4eu
+íx2i
+íx2ī
+íx2o
+íx2Å
+í2xue
+íx4us
+1j
+j2a
+jab2
+jad2
+jadæ3
+ja2x3
+jÄn2
+2jÄx
+jăd2
+já2x
+jece3
+je1r
+jes5tÄ
+jex2i
+je2xu
+jē3sū
+jĕ1r
+jĕ3r4ĕ
+jĕs3
+jé2xu
+jo1
+jo2a
+jon2
+jo2s
+jón2
+jub2
+ju3ma
+ju3ri
+ju2s3
+ju2x3
+j2Å«
+jūn4e
+jūn4ĕ
+jū3rē
+jū2s
+jū2x3
+j2Å­
+jÅ­2s
+jÅ­Ì3b
+júb2
+jú2s3
+jú2x
1l
-2lb
+l2a
+la3b2
+lab4a
+labī3u
+labī3v
+lab4u
+la3cr
+la4c3ue
+la3cū
+lad2
+lae4s5t
+la3g
+la2i
+la3s4pe
+la3spé
+las3t
+las5tr
+late4i
+latē2
+la3tr
+la5trí
+laÍže4st
+la͡e4st
+l2Ä
+lÄ3cr
+lÄ3g
+lÄ2ia
+lÄ2ic
+lÄ4iÄ«s.
+lÄ6iÄ«sne
+lÄ6iÄ«sque
+lÄ6iÄ«sue
+lÄ6iÄ«sve
+lÄ6iÄ«Ìsne
+lÄ6iÄ«Ìsque
+lÄ6iÄ«Ìsue
+lÄ6iÄ«Ìsve
+lÄ2iu
+lÄ2iú
+lÄ2Ä­
+lÄÌ3cr
+l2ă
+lă3b2
+lăbī3u
+lăbī3v
+lă3cū
+lăs3t
+lăs5tă
+lăs5tr
+lă5trĭ
+l2á
+láb2
+lá4c3ue
+láe2c3
+láes5t
+lá3g
+lá2i
+læ2a
+læ2ă
+læ2á
+læ3d
+læ2i
+læ3q
+læ2st
+læ3ue
+læ3uĕ
+læ2ŭ
+læ3v
+lǣ2a
+lǣ2ă
+lǣ3d
+lǣ3q
+lǣ2st
+lǣ3ue
+lǣ3uĕ
+lǣ2ŭ
+lǣ3v
+lǽ2c1
+lǽ2st
+2lb2
+l3bi
+lbī3u
+lbī3v
+l3bu
+l3bÅ­
2lc
+lce1
2ld
+lda1
+lde3
+l2e
+le3br
+le3bu
+le2e
+le3go
+le3gÅ
+le2iá
+le2ii
+le2ií
+le2io
+le2ió
+le2iu
+le2iú
+le3l
+lelu3
+le1r
+ler2æ3
+lere3Ä
+ler4i
+le3rī
+2l3ers
+2l3ert
+les3c
+le2s3p
+les3t
+le2un
+le2ur
+leu5rá
+leu5re
+leu5ré
+lex2
+le3x4e
+le3xi
+lexu3r
+lexū3r
+l2Ä“
+lē3bu
+lē3bŭ
+lē2iá
+lē2ie
+lÄ“2iÅ
+lē2iu
+lē2iú
+lē3ne
+lē3nĕ
+lē2sp
+lēs3t
+3lēx
+l2Ä•
+lĕ2ă
+lÄ•3gÅ
+lĕ2ĭ
+2lĕp
+lĕ3r4ĕ
+lÄ•rÄ•3Ä
+lĕ3rī
+lÄ•3rÅ
+2l3Ä•rs
+2l3Ä•rt
+lĕ3rŭ
+lĕs3
+lĕx2
+lĕxū3r
+l3Ä•Ìrs
+l3Ä•Ìrt
+lÄ•Ìs3
+lé3br
+3lég
+lé3iÅ
+2l3érs
+2l3ért
+lés3t
+lé3uÅ
+léx2ī
2lf
-l3f2t
-2lg
-2lk
-2ll
-2lm
-2ln
+2lg2
+l3ga
+l3gæ3
+l3gǣ
+l2i
+li2a
+3libe
+li3g4ni
+li2i
+3liī
+lin2Ä
+lino3s
+li3q
+li4s3c
+lis5ci
+li4st
+lis5ta
+lis5tÄ
+li3u2b
+4liud
+2lix
+lī3q
+lī2xu
+lÄ«Ì3q
+l2Ä­
+lÄ­4ăÌ
+3lĭbĕ
+lÄ­4Ä“n
+3lÄ­Ä•
+3lÄ­Ä«
+3lÄ­m
+3lÄ­n
+lÄ­n2a
+lÄ­n2Ä
+lĭn2æ
+lÄ­n2Ä•
+lĭnĭ5tĕ
+lÄ­nÄ­5tÅ
+lÄ­s3
+lÄ­4st
+lÄ­s5tÄ
+lĭs5tă
+2lÄ­Å­d
+lí4c3ue
+lí3q
+lí3tur
+2lj
+2ll2
+lle2i
+lle2x
+llē2i
+lli4c3u
+llu2d3
+llū2
+l3lÅ­
+llú2
+2l1m2
+2l1n2
+l2o
+lo2a3
+lo2Ä
+lo2á
+lo3b2
+lo4bn
+lo4cue
+lo2e
+logæ3
+longǣ4u
+longǣ4v
+lo3ni
+lo5ni5c
+lo5níc
+lo4rn
+lo4rq
+lo4rv
+lo2sp
+los3t
+lo2x3
+lÅ3d2
+lÅe2
+lÅ3r
+lÅÌr2
+lÅÌ4s5t
+l2Å
+lÅ2Ä
+lÅb2
+lÅngÇ£4u
+lÅngÇ£4v
+lÅ2s
+ló2x
2lp
+lpe3r2
+lpĕ3rĕ
+l3pi
+l3pÄ­
+lpo4s3
2lq
-2lr
-2ls
+2l1s2
+l2s3t
2lt
-2l.
-.l2
-1m
-2mm
+lte1
+lter4a
+lte5re
+lte5ré
+lteri5ue
+lteri5v
+lte5rī
+lterī5ue
+lterī5v
+ltĕ3r4a
+ltĕ3rǣ
+ltĕ5rī
+ltĕrī5u
+ltĕrī5v
+ltéri5t
+l1uÄ
+l1uă
+l1uǣ
+l2u3b2
+lu3do
+l3uea
+l3ueÄ
+l3ueá
+l3uee
+l3uei
+l3ueī
+l3ueí
+l3ueo
+l3ueÅ
+l3ueó
+2lues
+lue6ste
+l3ueú
+2l3uĕ
+luĕ6stĕ
+l3uée
+2l3uia
+2l3uiÄ
+2l3uiá
+2l3uiæ
+2l3uiǣ
+2l3uiǽ
+2l3uic
+2luif
+2l3uii
+2l3uiī
+2l3uií
+2l3uio
+2l3uiÅ
+2l3uió
+l3uium
+l3uius
+2l3uiú
+l1uÄ­
+2l3uía
+2luíc
+2luíf
+l3uína
+l5uínen
+l5uíneq
+l5uíneu
+l2um
+lumi3
+3l2un
+l1uÅ
+lu1r
+luru3
+lusa4t
+lu2s3Ä2
+lu2tī
+lu3xo
+lū3d
+lūru3
+lÅ­3b2
+2lÅ­c
+2l1Å­2t
+lÅ­Ì4s
+lÅ­Ìs5t
+lÅ­Ì3u
+lÅ­Ì3v
+lúb2
+lú3ia
+lú1r
+2lv2
+lve6ste
+lvĕ6stĕ
+2l2x2
+lx3u
+lý2c
+2lz
+1ma.
+1mab2
+m1ad
+ma2du
+3m2ae
+ma2ga
+ma2gÄ
+ma2gá
+ma2ge
+ma2gé
+ma2gī
+ma4g3n
+ma2gÅ
+ma2gu
+ma2gú
+ma1i
+ma4ia.
+ma4iae
+ma4iam
+ma4ian
+ma4iaq
+ma4iar
+ma4ias
+ma4iau
+ma4iav
+ma4iaÍž
+ma4ia͡
+ma4iÄ.
+ma4iÄn
+ma4iÄq
+ma4iÄr
+ma4iÄs
+ma4iÄu
+ma4iÄv
+ma4iÄÌn
+ma4iÄÌq
+ma4iÄÌr
+ma4iÄÌs
+ma4iÄÌu
+ma4iÄÌv
+ma4iáe
+ma4iám
+ma4ián
+ma4iár
+ma4iás
+ma4iáu
+ma4iáv
+ma2iæ
+ma2iǣ
+ma2iǽ
+ma4iis
+ma4iīs
+ma4iÄ«Ìs
+ma4iís
+ma3io
+ma3ió
+ma2iq
+ma4iue
+ma3iú
+ma2iv
+1mal
+mali3g4
+malí3g4
+mal4ui
+ma4l3uī
+m1am
+mam4b3i4
+mambī4
+mambÄ«Ì4
+mam4b3í4
+m2ami
+1man
+ma3ni.
+ma3nin
+ma3niq
+ma3nis
+ma3niu
+ma3niv
+ma3nín
+ma3níq
+ma3nís
+ma3níu
+ma3nív
+man3s
+man5s4i
+mansi5u
+mansi5v
+man5s4í
+1m2a3q
+ma2rÄ
+m2aru
+3masi
+3masí
+mas2p
+mas3t
+1mat
+ma3tr
+1m2au
+1mav
+3m2aÍž
+3m2a͡
+1m2Ä
+m3Äc
+mÄn3sa
+mÄn3să
+mÄn5s4i
+mÄn3s4Ä«
+mÄnsÄ«5n
+mÄnsÄ«5q
+mÄnsÄ«5u
+mÄnsÄ«5v
+mÄn5s4Ä­
+2m3Ä2x
+m3ÄÌc
+mÄÌn5s6i
+mÄÌn5s6Ä­
+2m3ÄÌ2x
+1mă.
+m1ăd
+mă2gÄ
+mă2gă
+mă2gī
+mă2gÅ
+mă2gÅ
+mă2gŭ
+mămbī4
+mămbÄ«Ì4
+măm4b3ĭ
+1m2ăn
+3mănĕ
+2m3ănĭ
+mă4nÄ­Ì
+3măntē
+3m2ă3q
+m3ă2rÄ
+mă4răn
+mă4răt
+mă4rĕr
+mă4rĕt
+m3ă2rÅ
+măs2p
+1m2ăt
+3m2ău
+3m2ăv
+1m2ăÌ
+4m3ăÌnÄ­
+1má
+3m2áe
+má4gn
+má1i
+má4iīs
+má3io
+má4luī
+mám4b3i
+m2án
+mán3s4i
+m2ár
+2máræ
+m2áu
+1m2æ
+mæ2a
+mæ2ă
+mæ2á
+mæ2i
+mæ2st
+mæ2ŭ
+1m2Ç£
+mǣ2a
+mǣ2ă
+mǣ2st
+mǣ2ŭ
+1m2ǽ
2mb
-2md
-2ml
-2mn
+m2b3ag
+mb2al
+m4baru
+m4barv
+m2bă
+m3băÌr
+mb2ác
+mbæ3
+m3be.
+m3bea
+m3beá
+m2be4d
+m3ben
+m3beo
+m3beó
+m3b2eq
+mb3es
+m3beu
+m3beú
+m3bev
+m2b3Ä“s
+m2bĕd
+m3bĕn
+mb3Ä•Ì4d
+m2bé2d
+m2bés
+m4b3iam
+m4b5iant
+m4b3iar
+m4b3ias
+m4b5iat.
+m6b5iatis
+m6b5iatís
+m4b5iatn
+m4b5iatq
+m4b5iatu
+m4b5iatú
+m4b5iatv
+m4b3iÄm
+m4b3iÄr
+m4b3iÄs
+m4b5iÄti
+m4b5iÄtí
+m4b5iÄtu
+m4b5iÄtú
+mb3iÄÌ
+m4biÄÌm
+m4biÄÌr
+m4biÄÌs
+m4biÄÌt
+m2b3iá
+mb2i3c
+m2bie
+mbi3eg
+m2biē
+m2bié
+mbi3ég
+mb6igene
+m2bii
+m2b3iī
+m2b3ií
+m4b3i4mi
+mbi4mur
+mbi4múr
+m4b3io.
+m4b3ion
+m4b3ioq
+m4b5ior.
+m4b5iorn
+m4b5iorq
+m4b5ioru
+m4b5iorv
+m4b3iou
+m4b3iov
+m2b3iÅ
+m2b3ió
+m4b3iss
+m4b3ist
+m4b3i4ta
+m4b3i4tá
+m4b3i4tæ
+m4b3i4tǽ
+m4b3iti
+mbi4ti.
+mbi4tib
+mbi4tin
+mbi4tió
+mbi4tiq
+mbi4tiu
+mbi4tiv
+mbi4tín
+mbi4tíq
+mbi4tíu
+mbi4tív
+mb3ito
+mbi4tor
+mbi4tos
+mbi4tór
+mbi4tós
+m4b5i4tu.
+m4b5i4tum
+m4b5i4tun
+m4b5i4tuq
+m4b5i4tur
+m4b5i4tus
+m4b5i4tuu
+m4b5i4tuv
+m4b3i4tū
+mb3i4tú
+m2b3iú
+m4bive
+m2bī2
+mbÄ«Ì2
+mbÄ«Ì4t
+m4b3Ä­Äm
+m4b3Ä­Är
+m4b3Ä­Äs
+m4b5Ä­ÄtÄ­
+m4b5Ä­ÄtÅ­
+mb3Ä­ÄÌ
+m4bÄ­ÄÌm
+m4bÄ­ÄÌr
+m4bÄ­ÄÌs
+m4bÄ­ÄÌt
+m2b3ĭă
+mb2Ä­3c
+m2bÄ­Ä“
+m2bÄ­Ä•
+mb6ĭgĕnĕ
+m2b3Ä­Ä«
+m2bÄ­Ä­
+m2b3Ä­Å
+m4b5Ä­År.
+m4b5Ä­Årn
+m4b5Ä­Årq
+m4b5Ä­Åru
+m4b5Ä­Årv
+m4b3Ä­ÅÌ
+m4b3Ä­tÄ­
+m4b3ĭ4tū
+m4b5Ä­4tÅ­m
+m4b5Ä­4tÅ­s
+mbÄ­6tÅ­Ìm
+mbÄ­6tÅ­Ìs
+m2b3Ä­Å­
+m4b3Ä­ÌÄ•
+m4b3Ä­ÌÄ­
+m4b5Ä­Ì4tÄ­
+mb1í
+mb2í3c
+m2bíe
+mb4ígen
+m2bíi
+m4bí4mi
+m4b3íss
+m4b3íst
+mbí2t
+mbí4tu.
+mb4ítui
+mb4ítuī
+mbí4tum
+mbí4tus
+mb2l
+mb2o
+mbo3r
+mb2Å
+m3b2r
+m3bu
+m5bus.
+m5busn
+m5busq
+m5busu
+m5busv
+m2b3Å«s
+m3bÅ­
+2mc2
+2md2
+mde3d
+mde2s
+mdē2s
+mdĕ3d
+m3do
+md4or
+1me
+mea3p2
+meá3p2
+m2eb
+med2
+me4dam
+me4dan
+me4dat
+2me2dÄ
+me4dám
+me4dán
+me4dár
+me4dát
+me4deb
+me4den
+me4der
+me4det
+2me2dē
+me4déb
+me4dén
+me4dér
+me4dét
+med4i
+me4dim
+2me2dī
+me4dím
+me4dít
+med4o
+me4dor
+me4dÅ.
+me4dÅq
+me4dÅu
+me4dÅv
+me4dór
+me4due
+me4dún
+me2e
+mee3ri
+mee3rí
+m1eg
+me2ge
+me2gé
+me2gi
+me3go
+me3iá
+me3ie
+me3io
+me3ió
+me2it
+me3iú
+me3íp
+m2em
+m2en
+3mena
+3mená
+men2e
+me3neu
+3mené
+3meni
+3mení
+me3p2
+m1eq
+m2er
+me3ra
+me3rē
+me3ri
+4merim
+me3rī
+2m3erm
+me3ro
+me3rÅ
+me3r2u
+2m3eso
+me4so.
+me4son
+me4soq
+me4sor
+me4sou
+me4sov
+2m3e2só
+me2sp
+2m3ess
+5messat
+5messát
+mes3t
+me2su
+m4esue
+4m3esum
+4m3esus
+2m3e2sú
+3mete
+mete3r
+meteri5ue
+meteri5v
+3meté
+2mets
+me2un
+m2ev
+m2e2x
+1mē
+mē4der
+mē4dēr
+mē4dĕr
+mē4dér
+mē4dim
+mē4dit
+mē4dĭm
+mē4dĭt
+mē4dít
+mē2du
+m1Ä“g
+mē2ge
+mē2gē
+mē2gĕ
+mē2gé
+mē2gi
+mē2gĭ
+mē2gí
+mē3i
+m2Ä“l
+m2Ä“m
+m2Ä“n
+mē3ne
+mē3p2
+3mēq
+m2Ä“r
+2m3Ä“4sa
+2mÄ“2sÄ
+2mē2să
+2mē2sá
+2mēsæ
+2mēsǣ
+2mēsǽ
+2mÄ“sÅ
+mēs3t
+mē2su
+4mēsum
+4mēsus
+2mē2sŭ
+2mēsú
+3m2Ä“u
+3m2Ä“v
+mÄ“Ì4der
+mÄ“Ì4dÄ•r
+mÄ“Ì4dim
+mÄ“Ì4dit
+mÄ“Ì4dÄ­m
+mÄ“Ì4dÄ­t
+mÄ“Ì4gi
+mÄ“Ì4gÄ­
+mÄ“Ì3i
+mÄ“Ì3p2
+4mÄ“Ìsa
+4mÄ“ÌsÄ
+4mÄ“Ìsă
+4mÄ“Ìsæ
+4mÄ“ÌsÇ£
+4mÄ“ÌsÅ
+4mÄ“Ìsum
+4mÄ“Ìsus
+4mÄ“Ì4sÅ­
+m2Ä“Ìu
+m2Ä“Ìv
+1mĕ
+mĕ2ă
+m1Ä•d2
+2mÄ•2dÄ
+2mĕ4dă
+2mĕ2dē
+2mĕ2dĕ
+2mĕ2dī
+2mĕd4ĭ
+mĕ4dĭs
+mÄ•4dÅ.
+m2Ä•dÅ
+mÄ•4dÅr
+2mĕ2dŭ
+mĕ2ĕ
+2mĕg
+mĕ2ĭ
+mĕ3ĭp
+m2Ä•m
+m2Ä•r
+4mĕrăm
+mĕ3rē
+mĕ3r4ĕ
+mĕ3rī
+4mĕrĭm
+4mĕrĭn
+2m3Ä•rm
+3mÄ•3rÅ
+mĕ3rŭ
+mĕ2sp
+m2Ä•t
+mĕ2t3ĭ
+2mĕts
+m2Ä•Ì
+m3Ä•Ì2d
+5mÄ•ÌntÄ•r
+5mÄ•ÌntÄ­Å
+5mÄ•ÌntÄ­Å­s
+m3Ä•Ì2q
+mÄ•Ìr6ĕă
+4m3Ä•Ìrm
+5mÄ•Ìtr
+4mÄ•Ìts
+1mé
+mé4der
+mé4dim
+mé4dit
+mé2du
+mé3i
+mé4is
+m2ém
+5ménter
+5méntio
+5méntius
+mé3p2
+m2ér
+mér4e
+4mérim
+2m3érm
+mér4ui
+mér4uī
+4mérun
+2mésæ
+2méso
+2m3éss
+4méste
+4méstn
+4mésto
+4méstq
+4méstu
+4méstv
+mé2su
+4mésu.
+m4ésue
+4mésum
+4mésus
+2méts
+3méu
+3mév
+mé2x
+2mf
+mge6ste
+mgĕ6stĕ
+2m1h
+1mi
+m2ia.
+mi3ad
+m2iae
+mi3a2g
+mi3al
+m2iam
+miam4b3
+mia2p
+m2ias
+mi3ass
+mi3atr
+m2iaÍž
+m2ia͡
+m2iÄ
+mi3Ätr
+mi3ÄÌx
+mi3áss
+m2iæ
+m2iǣ
+mi2be
+mi2bé
+m3ict
+m2id
+3mie.
+3mieq
+3mieu
+3miev
+m2ig
+m2iīs
+m2il
+mi3n4a
+min2Ä
+min4e
+min2i
+mini3m
+min4in
+min4iq
+min4is
+min4iu
+min4iv
+mi3n4Ä«
+miní4ci
+min4ín
+min4íq
+min4ís
+min4íu
+min4ív
+m2i3n4u
+minu3d
+min2Å«
+minū3d
+mi3nú
+m2io
+mio2s
+m2iÅ
+m2ió
+m2is
+mi3sa
+mi3sá
+mi4s5ci
+mi3scr
+mis2i
+mi4sn
+mi3s2p
+mi4sq
+mi4s5ta
+mis5tÄ
+mis5te
+mi4sv
+m6itate.
+5mitatem
+m6itatene
+m6itateq
+5mitates
+m6itateu
+m6itatev
+5mitatém
+5mitatés
+m4itati
+m4itatí
+m6itatum
+m6itatúm
+m4itáte
+5mitátem
+5mitátes
+m4itáti
+m6itátum
+mi2tū
+mi4um
+2miur
+m2i1Å«
+m2iú
+mi3úst
+1mī
+2mīc
+m2Ä«n
+mī3nĕ
+m2Ä«3q
+m2Ä«s.
+mī2sc
+m2Ä«sn
+mī3so
+mÄ«3sÅ
+m2Ä«sq
+m2Ä«su
+m2Ä«sv
+mī3ue.
+mī3uĕ.
+mī3ve.
+mī3vĕ.
+mÄ«Ì4ba
+mÄ«Ì4bÄ
+mÄ«Ì4bă
+mÄ«Ì4be
+mÄ«Ì4bÄ•
+mÄ«Ì4bo
+mÄ«Ì4bÅ
+mÄ«Ì4bÅ
+mÄ«Ì4bu
+mÄ«Ì4bÅ­
+2mÄ«Ìc
+m2Ä«Ìn
+m2Ä«Ìq
+1mÄ­
+3mÄ­a
+3mÄ­Ä
+mÄ­3Ätr
+mĭ1ă
+3mĭă.
+mĭă2g
+3mĭăm
+2mĭăr
+3mĭá
+3mĭæ
+3mÄ­Ç£
+3mĭǽ
+3m2Ä­b
+mÄ­4cÄ­t
+2mÄ­cÅ
+3mÄ­Ä•.
+mÄ­4Ä•n
+3mÄ­4Ä•q
+3mÄ­4Ä•u
+3mÄ­4Ä•v
+3mÄ­Ä«s
+3m2Ä­l
+mÄ­n2Ä
+mÄ­n4Ä•
+4mÄ­nÄ•Å
+mÄ­3n4Ä«
+mÄ­n2Å«
+mĭnū3d
+mĭnū3t
+3m2Ä­3n4Å­
+3mÄ­Å
+mÄ­3r
+mĭ3s4ă
+mÄ­3scr
+mÄ­3s2p
+mÄ­s5tÄ
+mĭ4s5tă
+mĭs5tĕ
+m3ĭ2tū
+mÄ­1Å«
+3mÄ­Å­
+3mÄ­Ìă
+mÄ­Ì4cÄ­
+mÄ­Ì3d
+mÄ­4Ìn
+mÄ­Ì3sp
+mÄ­4Ìt
+1mí
+mí2ba
+mí2be
+mí2bu
+m3íct
+mí1m
+mí3n4u
+mí3s2p
+mí4tiÅ
+mí4tiu
+mí3tuu
+2ml2
+m3lu
+2m1m2
+mmi6sta
+2m1n2
+m3ne
+m3nē
+m3né
+1mo.
+2mob
+mob3r
+1moc
+modes3
+m2oe
+mo2Ä«
+1mol
+1m2on
+mo3ni
+monó3
+mon4s3
+mo3n2u
+1moq
+1m2or
+mo3rī
+3m2os
+1mou
+1mov
+1mox
+m2o͡
+1mÅ
+m2Ån
+mÅn4s3
+2mÅrd
+m2Ås
+mÅs3t
+mÅÌn4s
+4mÅÌrd
+1mÅ
+3mÅ.
+mÅ2c
+mÅ2Ä«
+3mÅn
+3mÅq
+m2År
+mÅ3rÄ•
+mÅ3rÄ«
+3mÅs
+mÅs2p
+3mÅu
+3mÅv
+mÅÌb3
+m2ÅÌr
+mÅÌ3rÄ­
+1mó
+2m1ób
+mó2c
+m2óe
+món4s3
+m2ór
+3m2ós
+m2Å“
2mp
+mpe4ior
+mpe4iór
+mpe4iu
+mpe4iú
+mpe3r4a
+mper4Ä
+mpe5rem
+mpe5r4er
+mpere5ra
+mpere5ri
+mpere5rÅ
+mpe5res
+mper4Ä“
+mperi4b
+mpe6riens
+mper6iere
+mper6ieris
+mper6ierís
+mper6iēn
+mper6iēre
+mper6iÄ“Ìn
+mper6iÄ“Ìre
+mper6iére
+mper4im
+mpe5rimi
+mpe5rimur
+mperi6mus
+mpe5rimúr
+mperi6mús
+mper4ir
+mperi6re.
+mperi6rem.
+mpe5riremi
+mperi6remn
+mperi6remq
+mperi6remue
+mpe5riremur
+mperi6remus
+mpe5riremúr
+mperi6remús
+mperi6remv
+mperi6rene
+mperi6rent.
+mperi6rentn
+mperi6rentq
+mperi6rentue
+mpe5rirentur
+mpe5rirentú
+mperi6rentv
+mperi6req
+mpe5rirer
+mperi6res
+mperi6ret
+mperi6reu
+mperi6rev
+mpe5rirémi
+mperi6rémn
+mperi6rémq
+mperi6rémue
+mpe5rirémur
+mperi6rémus
+mperi6rémv
+mperi6réntn
+mperi6réntq
+mperi6réntue
+mpe5riréntur
+mperi6réntv
+mpe5rirér
+mperi6rés
+mperi6rét
+mpe5riri
+mpe5rirí
+mpe6risse
+mpe6rissé
+mpe6risti
+mpe6ristí
+mper4it
+mperi6te
+mperi6ti
+mperi6tí
+mperi6to.
+mperi6ton
+mperi6toq
+mpe5ritor
+mperi6tot
+mperi6tou
+mperi6tov
+mperi6tón
+mperi6tóq
+mpe5ritór
+mperi6tót
+mperi6tóu
+mperi6tóv
+mperi6tu
+mperi6tú
+mpe5riú
+mpe6rī6mus
+mpe6rī6mús
+mper4Ä«r
+mpe6rī6re.
+mpe6rī6rem
+mpe6rī6rene
+mpe6rī6rent.
+mpe6rī6rentn
+mpe6rī6rentq
+mpe6rī6rentue
+mpe6rī6rentv
+mpe6rī6req
+mpe6rī6ret
+mpe6rī6reu
+mpe6rī6rev
+mpe6rī6rēmus
+mpe6rī6rēmús
+mpe6rī6rēs
+mpe6rī6rēt
+mpe6rÄ«6rÄ“Ìmus
+mpe6rÄ«6rÄ“Ìs
+mpe6rÄ«6rÄ“Ìt
+mpe6rī6rém
+mpe6rī6réntn
+mpe6rī6réntq
+mpe6rī6réntue
+mpe6rī6réntv
+mpe6rī6rét
+mpe4rīs
+mpe6rī6te
+mpe6rī6ti
+mpe6rī6tí
+mpe6rÄ«6tÅ
+mpe6rī6tu
+mpe6rī6tú
+mpe6rÄ«Ì6mus
+mper6Ä«Ìr
+mpe6rÄ«Ì6re.
+mpe6rÄ«Ì6rem
+mpe6rÄ«Ì6ren
+mpe6rÄ«Ì6req
+mpe6rÄ«Ì6ret
+mpe6rÄ«Ì6reu
+mpe6rÄ«Ì6rev
+mpe6rÄ«Ì6rÄ“
+mpe6rÄ«Ìs
+mper6Ä«Ìsn
+mper6Ä«Ìsq
+mper6Ä«Ìsu
+mper6Ä«Ìsv
+mpe6rÄ«Ì6te
+mpe6rÄ«Ì6ti
+mpe6rÄ«Ì6tÅ
+mpe6rÄ«Ì6tu
+mper6Ä«Ìu
+mper6Ä«Ìv
+mpe4ríe
+mper4ím
+mpe6rí6mus
+mper4ír
+mpe6rí6re.
+mpe6rí6rem
+mpe6rí6ren
+mpe6rí6req
+mpe6rí6res
+mpe6rí6ret
+mpe6rí6reu
+mpe6rí6rev
+mpe6rísse
+mpe6rísti
+mpe4rít
+mperí6te
+mperí6ti
+mperí6to.
+mpe5rítor
+mper4íu
+mper4ív
+mpe3r4o
+mpe3rÅ
+mper4ó
+mpe6ste
+mpē4iē
+mpÄ•4rÄ•Ä
+mpĕ4rĕă
+mpÄ•4r5Ä•Å
+mpĕ6rī6mŭs
+mpÄ•6rÄ«6mÅ­Ìs
+mpĕ6rī6rēmŭs
+mpÄ•6rÄ«6rÄ“mÅ­Ìs
+mpĕ6rī6rēs
+mpĕ6rī6rēt
+mpÄ•6rÄ«6rÄ“ÌmÅ­s
+mpÄ•6rÄ«6rÄ“Ìs
+mpÄ•6rÄ«6rÄ“Ìt
+mpĕ6rī6rĕ.
+mpĕ6rī6rĕm
+mpĕ6rī6rĕnĕ
+mpĕ6rī6rĕnt.
+mpĕ6rī6rĕntn
+mpĕ6rī6rĕntq
+mpĕ6rī6rĕntu
+mpĕ6rī6rĕntv
+mpĕ6rī6rĕq
+mpĕ6rī6rĕt
+mpĕ6rī6rĕu
+mpĕ6rī6rĕv
+mpÄ•6rÄ«6rÄ•Ìm
+mpÄ•6rÄ«6rÄ•Ìntn
+mpÄ•6rÄ«6rÄ•Ìntq
+mpÄ•6rÄ«6rÄ•Ìntu
+mpÄ•6rÄ«6rÄ•Ìntv
+mpÄ•6rÄ«6rÄ•Ìt
+mpĕ4r5īs
+mpĕr6īs.
+mpĕr6īsn
+mpĕr6īsq
+mpĕr6īsu
+mpĕr6īsv
+mpĕ6rī6tĕ
+mpĕ6rī6tĭ
+mpÄ•6rÄ«6tÅ
+mpĕ6rī6tŭ
+mpÄ•6rÄ«Ì6mÅ­s
+mpÄ•6rÄ«Ì6rÄ“
+mpÄ•6rÄ«Ì6rÄ•.
+mpÄ•6rÄ«Ì6rÄ•m
+mpÄ•6rÄ«Ì6rÄ•n
+mpÄ•6rÄ«Ì6rÄ•q
+mpÄ•6rÄ«Ì6rÄ•t
+mpÄ•6rÄ«Ì6rÄ•u
+mpÄ•6rÄ«Ì6rÄ•v
+mpÄ•6rÄ«Ìs
+mpÄ•r5Ä«Ìss
+mpÄ•r5Ä«Ìst
+mpÄ•6rÄ«Ì6tÄ•
+mpÄ•6rÄ«Ì6tÄ­
+mpÄ•6rÄ«Ì6tÅ
+mpÄ•6rÄ«Ì6tÅ­
+mpĕ6rĭēn
+mpĕ6rĭērĕ
+mpĕ6r5ĭērŭ
+mpÄ•6rÄ­Ä“Ìn
+mpÄ•6rÄ­Ä“ÌrÄ•
+mpÄ•6r5Ä­Ä“ÌrÅ­
+mpĕ6r5ĭĕr
+mpÄ•6r5Ä­Ä•Ìr
+mpĕ6rĭtn
+mpĕ6rĭtq
+mpĕ6rĭtu
+mpĕ6rĭtv
+mpÄ•6r5Ä­ÌÄ•
+mpÄ•6rÄ­Ìt
+mpÄ•3rÅ
+mpÄ•3rÅ
+mpĕ6stĕ
+mpÄ•Ì6r5Ä•Ä
+mpÄ•Ì6r5ĕă
+mpÄ•Ì6r5Ä•Å
+mpÄ•Ì6rÄ­Ä“n
+m3pé
+mpé4r5ea
+mpé4r5eÄ
+mpé4r5eo
+mpé4r5eÅ
+mpére5r
+mpé4ri.
+mpé6riens
+mpé6riēn
+mpé4rit
+m2pn
+mp2ne
+mp2su
2mq
-2mr
-2ms
+m3qu
+m1r
+mro3
+mrod4
+mro5di
+mrodi5u
+mrodi5v
+mrÅ3d4
+mrÅ5dÄ«
+mrÅdÄ«5u
+mrÅdÄ«5v
+2m1s2
+msed4
+mse5di
+msēd4
+msē5di
+msē5dĭ
+mso3
+m2s3q
+m3st
+m2s3u
2mt
-2m.
-.m2
-1n
-2nb
+mte3r4
+mte5re
+mter6it
+mteri5tur
+mteri5u
+mteri5v
+mte5rī
+mterī5u
+mterī5v
+mtĕ3r4
+mtĕ5rĕ
+mtĕrĕ5r
+mtĕ5rī
+mtĕrī5u
+mtĕrī5v
+mto1
+mto2s
+m1ua
+m1uÄ
+m1uă
+m1uá
+2m1ue
+4m3ue.
+m1uē
+m1uĕ
+m1ué
+m1ui
+m2ui.
+2mui2c3
+m2uim
+m2uin
+m2uiq
+2muir
+m2uit
+m2uiu
+m1uī2
+m2uī.
+muīc3
+m2uīn
+m2uīq
+m2uīu
+m1uÄ­
+2m3uír
+1m2ul
+3m2um
+2m3unc
+muol3u
+m1uó
+1m2ur
+1mus
+2m3ust
+1mū
+m3Å«nc
+2m1Å«s
+mū2su
+1mÅ­
+m2Å­l
+3m2Å­m
+m2Å­s
+m2Å­Ì
+3mÅ­Ìm
+1mú
+3m2úm
+2m3únc
+m2ús
+2m3úst
+2mv2
+m3ve
+mvi2c3
+mvī2
+mvīc3
+m2x2
+1m2y
+my2s
+1mý
+2mz
+1na
+nab2o
+na2br
+na2cr
+n1ad
+n2ada
+nae2s
+n2aeu
+n2aev
+na3ge
+na3gr
+na2i
+nai4m
+na2Ä«
+3nal
+na2ni
+n3a2ní
+na2o
+na3q
+n2ar
+nas7cend
+n4aue
+na2x3
+n2aÍžÌ
+n2aÍ¡Ì
+1nÄ
+nÄ5bun
+3nÄc
+nÄ2i
+nÄ2Ä­
+n1Ä2n
+nÄs3
+nÄÌ4ni
+nÄÌ4nÄ­
+1nă
+n1ăb
+nă2br
+n1ăd
+n2ădă
+n2ăg
+nă3gĕ
+nă3gr
+nă2ī
+nă2nĭ
+n2ăp
+nă3q
+năs2p
+2năth
+năÌ2n
+1ná
+n2áb
+ná2i
+3nál
+ná2ni
+n2ár
+ná2x
+1næ
+næ2a
+næ2ă
+næ2á
+næ2i
+n2æu
+næ2ua
+næ2uÄ
+næ2uă
+næ2uá
+næ2uæ
+næ2uǽ
+næ4uen
+næ4ueq
+næ4ueu
+næ2uē
+næ4uĕn
+næ4uĕq
+næ4uĕu
+næ2ué
+næ2ui
+næ2uī
+næ2uí
+næ2uo
+næ2uÅ
+næ2uó
+næ4uum
+næ4uus
+næ4uŭm
+næ4uŭs
+næ4uúm
+næ4uús
+næ2ŭ
+n2æv
+næ2va
+næ2vÄ
+næ2vă
+næ2vá
+næ2væ
+næ2vǽ
+næ4ven
+næ4veq
+næ4vev
+næ2vē
+næ4vĕn
+næ4vĕq
+næ4vĕv
+næ2vé
+næ2vi
+næ2vī
+næ2ví
+næ2vo
+næ2vÅ
+næ2vó
+næ4vum
+næ4vus
+næ4vŭm
+næ4vŭs
+næ4vúm
+næ4vús
+1nǣ
+nǣ2a
+nǣ2ă
+nǣ2ua
+nÇ£2uÄ
+nǣ2uă
+nǣ2uá
+nǣ2uǣ
+nǣ4uen
+nǣ4ueq
+nǣ4ueu
+nǣ2uē
+nǣ4uĕn
+nǣ4uĕq
+nǣ4uĕu
+nǣ2uī
+nÇ£2uÅ
+nǣ4uum
+nǣ4uus
+nǣ4uŭm
+nǣ4uŭs
+nǣ4uúm
+nǣ4uús
+nǣ2ŭ
+nǣ2va
+nÇ£2vÄ
+nǣ2vă
+nǣ2vá
+nǣ2vǣ
+nǣ4ven
+nǣ4veq
+nǣ4vev
+nǣ2vē
+nǣ4vĕn
+nǣ4vĕq
+nǣ4vĕv
+nǣ2vī
+nÇ£2vÅ
+nǣ4vum
+nǣ4vus
+nǣ4vŭm
+nǣ4vŭs
+nǣ4vúm
+nǣ4vús
+nÇ£Ì4ua
+nÇ£Ì4uÄ
+nÇ£Ì4uă
+nÇ£Ì4uÇ£
+nÇ£Ì4uen
+nÇ£Ì4ueq
+nÇ£Ì4ueu
+nÇ£Ì4uÄ“
+nÇ£Ì4uÄ•n
+nÇ£Ì4uÄ•q
+nÇ£Ì4uÄ•u
+nÇ£Ì4uÄ«
+nÇ£Ì4uÅ
+nÇ£Ì4uum
+nÇ£Ì4uus
+nÇ£Ì4uÅ­m
+nÇ£Ì4uÅ­s
+nÇ£Ì4va
+nÇ£Ì4vÄ
+nÇ£Ì4vă
+nÇ£Ì4vÇ£
+nÇ£Ì4ven
+nÇ£Ì4veq
+nÇ£Ì4vev
+nÇ£Ì4vÄ“
+nÇ£Ì4vÄ•n
+nÇ£Ì4vÄ•q
+nÇ£Ì4vÄ•v
+nÇ£Ì4vÄ«
+nÇ£Ì4vÅ
+nÇ£Ì4vum
+nÇ£Ì4vus
+nÇ£Ì4vÅ­m
+nÇ£Ì4vÅ­s
+1nǽ
+nǽ2ua
+nǽ2uÄ
+nǽ2uă
+nǽ2uæ
+nǽ4uen
+nǽ4ueq
+nǽ4ueu
+nǽ2uē
+nǽ4uĕn
+nǽ4uĕq
+nǽ4uĕu
+nǽ2ui
+nǽ2uī
+nǽ2uo
+nǽ2uÅ
+nǽ4uum
+nǽ4uus
+nǽ4uŭm
+nǽ4uŭs
+nǽ2va
+nǽ2vÄ
+nǽ2vă
+nǽ2væ
+nǽ4ven
+nǽ4veq
+nǽ4vev
+nǽ2vē
+nǽ4vĕn
+nǽ4vĕq
+nǽ4vĕv
+nǽ2vi
+nǽ2vī
+nǽ2vo
+nǽ2vÅ
+nǽ4vum
+nǽ4vus
+nǽ4vŭm
+nǽ4vŭs
2nc
+n3cr
+n2c3ue
+n2c1Å«
2nd
+n2d3ág
+nd2e
+nde4sc
+nde3un
+nde3ún
+ndē4sc
+ndĕ3ŭn
+ndi4ger
+n4d3igi
+n4d3igí
+ndi4g3n
+ndi3m
+n2di2p
+n4d3Ä­gÄ­
+nd2Ä­n
+n2dÄ­p
+ndÄ­4sp
+n4d5Ä­ÌgÄ­
+n4d3í4gi
+n3do
+ndo3l
+n4d5o4le.
+ndo4lem
+n6d5o6lene
+n4d5o4leq
+ndo6les.
+ndo6lesn
+ndo6lesq
+ndo6lesu
+ndo6lesv
+n4d5o4leu
+n4d5o4lev
+ndo6lēs.
+ndo6lēsn
+ndo6lēsq
+ndo6lēsu
+ndo6lēsv
+ndo6lÄ“Ìsn
+ndo6lÄ“Ìsq
+ndo6lÄ“Ìsu
+ndo6lÄ“Ìsv
+ndo4lém
+ndo6lésn
+ndo6lésq
+ndo6lésu
+ndo6lésv
+n4d3o4li
+n4d3o4lī
+n4d3o4lí
+nd4or
+ndÅ6lÄ“s.
+ndÅ6lÄ“sn
+ndÅ6lÄ“sq
+ndÅ6lÄ“su
+ndÅ6lÄ“sv
+ndÅ6lÄ“Ìsn
+ndÅ6lÄ“Ìsq
+ndÅ6lÄ“Ìsu
+ndÅ6lÄ“Ìsv
+n4d5Å4lÄ•.
+n6d5Å6lÄ•nÄ•
+n4d5Å4lÄ•q
+n4d5Å4lÄ•u
+n4d5Å4lÄ•v
+n4d3Å4lÄ«
+n4d3Å4lÄ­
+n4d5ÅÌ4lÄ•
+ndó2l
+n4d3óle
+ndó3lu
+nd2r
+n2d3ua
+n2d3uÄ
+n2d3uá
+nd3ue.
+nd3ueq
+nd3ueu
+nd3uev
+n2duē
+n2dué
+nd3uit
+n2d3uo
+n2d3uÅ
+n2d3uó
+n2d3uú
+n2d3Å­Ä
+n2d3ŭă
+n2dÅ­Ä“
+nd3Å­Ä•.
+nd3Å­Ä•q
+nd3Å­Ä•u
+nd3Å­Ä•v
+nd3Å­Ä­t
+n2d3Å­Å
+n2d3Å­Å
+n2d3Å­Å­
+nd3Å­ÌÄ­
+nd3úen
+nd3úeq
+nd3úeu
+nd3úev
+n2d3úi
+1ne
+3ne.
+ne2a
+ne3bu
+ne2cl
+ne2co
+ne4c3u4t
+ned2
+ned4i
+ne2e
+nee3ri
+nee3rí
+n1ef
+ne2gl
+3nei
+ne2ia
+ne2iá
+ne2ie
+ne2ié
+ne2ii
+ne2ií
+ne2io
+ne2ió
+ne2it
+ne2iu
+ne2iú
+3neí
+ne2lu
+ne2na
+n4ene
+ne2nu
+3neo
+3neó
+3nep
+nepo5t
+ne1r
+nera5b
+nerab6u
+ner2æ3
+ner2Ç£
+ne3rē
+ne3rī
+ne4ss
+nes5tÄ
+nes5te
+nes5tr
+n4et.
+n4etn
+n4etq
+2nets
+n4eue
+2ne2un
+ne2ur
+neu5re
+neu4ter
+neu4tér
+ne3u4tr
+2neún
+n4eve
+n1ex
+n2ex.
+nex2a
+ne3x2i
+nexi3u
+nexi3v
+nex2Ä«
+n2exn
+ne2xo
+ne2xÅ
+nex2ó
+n2exq
+n2ex2u
+nexu3r
+nex2Å«
+nexū3r
+nex2ú
+n2exv
+1nē
+nē2br
+n1Ä“2d
+nē3du
+nē2i
+n1Ä“l
+nē2lă
+nē2lĕ
+nē2lu
+nē2me
+nē2mĕ
+nē2mo
+nÄ“2mÅ
+nÄ“2nÄ
+nē2nu
+nēs3t
+nē2uī
+nē2vī
+nÄ“Ì4br
+nÄ“Ì2d
+1nĕ
+3nĕa
+nĕ2ă
+3nĕæ
+3nĕǣ
+nÄ•2cÅ
+nĕd2
+3nĕē
+3nĕ2ĕ
+n1Ä•f
+nĕ2gl
+3nĕī
+nĕ2ĭ
+3nĕp
+nĕ3r2a
+nĕ3r2æ
+nĕ3r2ǣ
+nĕ3rē
+nĕ3r4ĕ
+nĕ3rī
+nÄ•3rÅ
+n3Ä•rs
+n3Ä•rÅ­n
+nĕs3t
+nĕs5tĕ
+n4Ä•t.
+n4Ä•tn
+n4Ä•tq
+4nĕts
+2n3Ä•Å­n
+n1Ä•x
+n2Ä•x.
+nĕx2a
+nĕx2ă
+nÄ•x4Ä•Ì
+nĕx2ī
+nĕx2ĭ
+n2Ä•xn
+nÄ•2xÅ
+n2Ä•xq
+n2Ä•xu
+nĕx2ū
+nĕxū3r
+nĕx2ŭ
+n2Ä•xv
+3nÄ•Ìp
+nÄ•Ì3rÄ•
+nÄ•Ì3s4c
+1né
+né2i
+3n1ép
+né3q
+2néts
+néu4ter
+né3u4tr
+néx2ī
+néx4ui
2nf
2ng
-2nl
-2nm
-2nn
-2np
+n3gae.
+n3gaen
+n3gaeq
+n4gani
+n4ganí
+n5gaÍže.
+n5gaÍžen
+n5gaÍžeq
+n5gaÍžÌen
+n5gaÍžÌeq
+n5ga͡e.
+n5ga͡en
+n5ga͡eq
+n5gaÍ¡Ìen
+n5gaÍ¡Ìeq
+n4gă4nĭ
+n4g5ăÌnÄ­
+n2gáe
+n3gáen
+n3gáeq
+ng3áeu
+ng3áev
+n4g3áni
+n3gæ.
+n3gæn
+n3gæq
+n3gǣ.
+n3gǣn
+n3gǣq
+ngÇ£Ì2
+n3gÇ£Ìn
+n3gÇ£Ìq
+n2g1ǽ2
+n3gǽn
+n3gǽq
+ngu6ste
+ngŭ6stĕ
+n1h
+nhe3
+1ni
+ni2a
+n2ia.
+n2ian
+n2iaq
+nia6ste
+n2iau
+n2iav
+2niă
+2n3i2ba
+2n3i2bá
+ni2be
+ni2bé
+2n3i2bi
+2n3i2bí
+2n3i2bo
+2n3i2bó
+4n3i4bun
+4n3i4bún
+nic4e
+4ni4cer
+n2i3cē
+4ni4cér
+ni4cim
+4ni4cím
+4ni4cít
+n2i3cu
+n2i3cú
+3nid
+2niec
+2niex
+2niēc
+2niēx
+2niéc
+2niéx
+n2i3g2
+nig4n
+n2il
+ni3mam
+ni3man
+ni3mar
+ni3mas
+ni3mÄ
+ni3má
+ni3me
+ni3mē
+ni3mé
+ni3mi.
+ni3mie
+ni3mii
+ni3min
+ni3miq
+ni3mis
+ni3miu
+ni3miv
+ni3mī.
+ni3mīn
+ni3mīq
+ni3mīs
+ni3mīu
+ni3mīv
+ni3mín
+ni3míq
+ni3mís
+ni3míu
+ni3mív
+2nimm
+ni3mo
+ni3mÅ
+ni3mó
+ni3mu
+ni3mú
+2nins
+n2i2o
+n2ió
+n2ip
+n3i4qua
+n3i4quá
+n3i4quæ
+n3i4quǽ
+n5i4quen
+n5i4queq
+n5i4queu
+n5i4quev
+n3i4qué
+n3i4qui
+n3i4quí
+n3i4quo
+n3i4quó
+n3i4quu
+n3i4quú
+n2is
+ni4sc
+nis5ci
+nise4r3
+nisé2
+nis2i
+3ni3sp
+n2iue
+n2iué
+2niug
+n2ium
+2niux
+2niū
+2niÅ­
+2niúd
+2niúg
+2niúr
+2niúx
+1nī
+2n1Ä«2b
+2nīns
+2n3Ä«Ì2b
+4nÄ«Ìns
+1nÄ­
+3nÄ­a
+nĭă6stĕ
+3nĭæ
+3nÄ­Ç£
+n3Ä­2bÄ­
+nĭ3cē
+4n3ĭ4cĕr
+nÄ­4cÄ­m
+nÄ­4cÄ­Å
+nÄ­4cÄ­s
+nÄ­4cÄ­t
+nÄ­3cÅ­
+3nÄ­d
+3nÄ­Ä«
+nÄ­3mÄ­Ä•
+2nÄ­mÅ
+nÄ­2Å
+nÄ­3s2p
+nĭ3tĕr
+nÄ­3tÄ•Ì
+nÄ­3tÄ­s
+nÄ­5tÄ­Ìs
+nÄ­3tÅ
+n3ĭ4tūs
+4n5Ä­Ì4cÄ•r
+nÄ­Ì4cÄ­m
+nÄ­Ì4cÄ­Å
+nÄ­Ì4cÄ­t
+n4Ä­Ìs
+nÄ­Ì3sp
+nÄ­Ì4s5t
+1ní
+2n1í2b
+4ní4cer
+ní4cian
+ní4ciar
+ní4ciat
+ní4cim
+ní5cis
+ní4cit
+ní4ciun
+3níd
+n2í3g2
+níg4n
+n2íl
+ní1m
+2nímm
+2níns
+4n3í4qua
+4n3í4quæ
+n5í4quen
+n5í4queq
+n5í4queu
+n5í4quev
+4n3í4qui
+4n3í4quo
+4n3í4quu
+3ní3sp
+ní3tur
+2nj
+2n1n2
+n3ne
+n3nu
+nn4ue
+1no
+no2a
+no2á
+no2æ3
+no2Ç£
+noÇ£Ì3
+no2ǽ3
+no2ba
+nob2Ä«
+nobī3u
+nobī3v
+nob2í
+no2bó
+3noc
+noc5te
+no2e
+no2Ä“
+no2i
+no2Ä«
+no2í
+no3l4u
+nom2
+n2on
+no3ni
+3nop
+n2ope
+no2pi
+no2pu
+no2pú
+n2or
+no3rī
+n2os
+nos3c
+no4sn
+no4sq
+nos3t
+nos5te
+no4sue
+no4sv
+no2xu
+1n2Å
+nÅs3t
+1nÅ
+nÅ2a
+nÅ2á
+nÅ2æ3
+nÅ2Ç£
+nÅÇ£Ì3
+nÅ2ǽ3
+nÅb2ă
+nÅb2Ä«
+nÅbÄ«3u
+nÅbÄ«3v
+nÅc5tÄ•
+nÅ2Ä“
+nÅ2Ä«
+nÅ2Ä­
+n1Åp
+nÅ4pÄ«.
+nÅ4pÄ­
+nÅ2pÅ­
+nÅ3rÄ«
+nÅ4sn
+nÅ4sq
+nÅ4su
+nÅ4sv
+nÅ3t
+nÅ2u3Ä•
+nÅ2v3Ä•
+nÅÌ4p
+1nó
+nób2i
+nó3l2u
+nóp2
+n2ór
+n2ós
+nó2xu
+1nœ
+npo3
+npó1
2nq
-2nr
+n3qu
+n1r2
+n3rĕ
+nr4Ä•Ì3
2ns
-2nh
-n2s3m
-n2s3f
+n3sa.
+ns3a2c
+n3s4ae
+n3s4am
+ns4an
+n3s4aq
+n3sar
+n3sas
+n3s4av
+n3să.
+ns3ăc
+n3săm
+n3săn
+n3săq
+n3său
+n3săv
+nsăÌ2
+ns3ăÌb
+ns3ăÌl
+n2sál
+n1sc
+ns2ce
+ns2cē
+ns2cĕ
+ns2cé
+ns2ci
+ns2cÄ­
+ns2cr
+n2scu
+n2scÅ­
+n2scú
+n2se2g
+n2seú
+n2s3ég
+nsér4ui
+nsér4uī
+n2s3i2c
+n2sie
+n2siē
+n2sié
+ns3iér
+nsi2g
+ns3ige
+n2s3ii
+n2sií
+ns3iís
+nsi3l4u
+nsi4mur
+nsi4múr
+nsi2r
+ns5i4taÍž
+n4s3i4tǣ
+nsi4ti
+n4s3i4tī
+ns3i4tÅ
+n4s3i4tū
+n2siu
+nsi4ui
+nsi4vi
+nsī2r
+nsÄ«Ì4r
+nsÄ«Ì4to
+nsÄ«Ì4tÅ
+nsÄ«Ì4ui
+nsÄ«Ì4uÄ­
+nsÄ«Ì4vi
+nsÄ«Ì4vÄ­
+n2s3Ä­2c
+n2sÄ­Ä“
+ns3Ä­Ä“n
+ns3Ä­Ä“r
+n2s3Ä­Ä•
+ns3ĭgĕ
+n4s3Ä­4ta
+ns5ĭ4tă.
+ns5ĭ4tăm
+ns3ĭ4tá
+n4s3ĭ4tæ
+n4s3ĭ4tǣ
+ns3ĭ4tǽ
+ns5ĭ4tĕ.
+n4s3ĭ4tī
+ns3Ä­4tÄ­
+ns3Ä­4tÅ
+n4s3ĭ4tū
+n4s3Ä­4tÅ­
+n4s3Ä­Ì4c
+nsÄ­Ì4g
+nsÄ­Ì4t
+n4s5Ä­Ìtă
+n4s5Ä­ÌtÄ•
+n4s5Ä­ÌtÄ­
+n4s5Ä­ÌtÅ­
+n2s3í2c
+ns3íer
+nsí2g
+ns3íge
+n2s3íi
+nsíl4u
+nsí4mi
+nsí2r
+ns5ítuī
+ns5ítuu
+nsí4uer
+nsí4uim
+nsí4uit
+nsí4ver
+nsí4vim
+nsí4vit
+n1sp
+ns2pa
+ns2pă
+ns2pá
+n3spec
+n3spĕc
+n5spÄ•Ìc
+n3spéc
+n3s2pi
+n3s2pÄ­
+n3s2pí
+n2sq
+n3s2ta
+n3s2tÄ
+n3s2tă
+n3s2tá
+n3s2te
+n3s2tē
+n3s2tĕ
+n3s2té
+n3sti5t4
+n3stÄ­t
+nstí3t4
+n3s2to
+n3s2tÅ
+ns2tó
+nstren6u
+nstrē5n4
+nstrÄ“Ì5n6
+nstrén6u
+ns2tu
+n3s2tÅ­
+n4s3ue.
+n3s2uī
2nt
+n3ta
+nta3g
+n3tÄ
+n3tæ
+n3te
+n4t3eÄ
+nte4ia
+nte4iá
+nte3Ä«4
+nteÄ«Ì4
+nte5ram.
+nte5ramne
+nte5ramq
+nte5ramu
+nte5ramú
+nte5ramv
+nte5rant
+nteri4
+nter5ib
+nter5ic
+nte4r5ie
+nter5iē
+nter5ié
+nter5ii
+nter5iī
+nter5ií
+nte4rim
+nter5im.
+nte5ri5min
+nte5ri5mur
+nte5ri5múr
+nter5ita
+nter5itÄ
+nter5itá
+nte5ri5tor.
+nte5ri5torn
+nte5ri5torq
+nte5ri5torue
+nte5ri5torv
+nte5ri5tórn
+nte5ri5tórq
+nte5ri5tórue
+nte5ri5tórv
+nte4r3Ä«4
+nterÄ«Ì4
+nte4r5í4c
+nte4ríe
+nte6r5í6mu
+nte6r5í6ti
+nte4rí4u
+nte4rí4v
+nte4ron
+nte5rÅ.
+nte5rÅÌq
+nte5rÅÌu
+nte5rÅÌv
+nte4rós
+nte5runt
+nt4es
+nte5stas
+nte5stÄs
+nte5stÄtí
+nte5stÄÌs
+nte5stás
+nte5sto.
+nte5ston
+nte5stoq
+nte5stou
+nte5stov
+nte5s4tÅ
+nte5stón
+nte5stóq
+nte5stóu
+nte5stóv
+ntē4ia
+ntÄ“4iÄ
+ntē4iá
+ntē4iæ
+ntē4iǣ
+ntē4iǽ
+n2t3Ä•Ä
+ntĕ3ă
+ntĕ3ī4
+ntÄ•Ä«Ì4
+ntĕ4r3ī4
+ntÄ•rÄ«Ì4
+ntĕ4r5ĭ4c
+ntĕ4rĭē
+ntĕ4r5ĭī
+ntĕ6r5ĭm.
+ntÄ•6r5Ä­6tÄ
+ntÄ•6r5Ä­Ì6c
+ntÄ•6rÄ­ÌÄ•
+ntÄ•4rÅn
+ntÄ•4rÅs
+ntĕ5rŭnt
+ntÄ•5rÅ­Ì
+nt4Ä•s
+ntÄ•5stÄs
+ntÄ•5stÄÌs
+ntÄ•5stÅ
+ntÄ•Ì4rÄ«
+ntÄ•Ì6r5Ä­6c
+ntÄ•Ì6r5Ä­Ä«
+ntÄ•Ì6r5Ä­t.
+ntÄ•Ì6r5Ä­6tÄ
+ntÄ•Ì5stÄs
+ntÄ•Ì5stÅ
+nté4r5es
+nté4ri.
+nté4r5i4c
+nté4rie
+nté4riē
+nté4r5ii
+nté4r5iī
+nté6r5it.
+nté6r5ita
+nté6r5i6tÄ
+nté5stas
+nté5stÄs
+nté5sto.
+nté5s4tÅ
+n3th
+n3ti
+ntis4t
+nti5stá
+nti5sti
+nti5stí
+n3tī
+n3tÄ­
+ntÄ­s4tÄ
+ntĭs4tă
+ntÄ­5s4tÄ­
+ntÄ­Ì5s6tÄ
+ntÄ­Ì5s6tă
+ntí5s4ta
+ntí5s4tÄ
+ntí5sti
+nto2s3
+n3tÅ
+ntÅÌ2
+n4t3ÅÌp
+n2t3óp
+ntó2s3
+n3tr
+ntra3e
+ntrÄn4
+ntrá3e
+ntro3i4
+ntro3í4
+ntró3i
+n3tum
+n3tus3
+ntús3
+n1ua
+n2uam
+n2uan
+n2uar
+n2uat
+1n1uÄ
+n2uÄm
+n2uÄr
+n2uÄt
+n1uă
+n2uám
+n2uán
+n2uár
+n2uát
+1nuæ
+1nuǣ
+1nub2
+nu3bi
+n3ud
+n4udæ
+n4udǽ
+n4udi
+n4udí
+n4u3du
+n4udú
+n1ue
+2n3ue.
+n2ueb
+3n4uel
+3n2uem
+3nueq
+3n2ues
+n2uet
+3nueu
+3nuev
+n1uē
+n2uēb
+n2uēm
+n2uēn
+n2uēr
+n2uēs
+n2uēt
+2n3uĕ
+n2uéb
+n2uém
+n2ués
+n2uét
+1nui
+n2uim
+n2uis
+n1uī
+n1uÄ­
+1nuí
+n2uím
+n2uís
+1n1ul
+n2u3la
+n2u3lÄ
+n2u3lá
+n2u3le
+nule4i
+n2u3lé
+n2u3li
+n2u3lī
+n2u3lí
+3num
+n4um.
+n4u4mn
+n4u4mq
+n4u4mu
+n4u4mv
+1n1u2n
+1nuÅ
+n1uó
+n3u2r
+1nu2s
+n3usi
+nu4sn
+nu4sq
+n3uss
+n3ust
+nu4su
+nu4sv
+n2u3ta
+n2u3tá
+n2u3tæ
+n2u3tǽ
+n2u3te
+nu3ti.
+nu3tin
+nu3tiq
+nu3tis
+nu3tiu
+nu3tiv
+nu3tín
+nu3tíq
+nu3tís
+nu3tíu
+nu3tív
+n2u3to
+n2u3tó
+nu3tr
+n2u3tu
+n2u3tú
+1nuu
+n2uun
+n2uún
+n1u2x
+1nū
+n1Å«d
+nū2n
+nū3nĕ
+n1Å«2r
+n1Å«2s
+n2Å«3ta
+n2Å«3tÄ
+n2ū3tă
+n2ū3tá
+n2ū3tæ
+n2ū3tǣ
+n2ū3tǽ
+n2Å«3te
+n2ū3tĕ
+n2ū3tī
+n2Å«3tÅ
+n2Å«3tu
+n2ū3tū
+n2Å«3tÅ­
+n2ū3tú
+nÅ«Ì2m
+nÅ«Ì2r
+nÅ«4Ìs
+1nÅ­
+n1Å­l
+n2Å­lÄ
+n2ŭlă
+n2ŭlī
+n4Å­m.
+nÅ­3mÄ­
+n4Å­mn
+n4Å­mq
+n4Å­mu
+n4Å­mv
+n1Å­n
+n1Å­r
+nÅ­2s
+nÅ­Ì3mÄ•
+1nú
+núb2
+n2úla
+n2úle
+nú2mi
+n4úmn
+n4úmq
+n4úmu
+n4úmv
+2n3úng
+n1ú2r
+2nv
+n3ve
2nx2
-2n.
-.n2
+n3xi
+n2x3u
+1ny
+2nyma
+2nymÄ
+2nymæ
+2nymǣ
+1ný
+2o1a2
+o2a3b
+oad3
+oade4
+oadé2
+oadi4
+oadí2
+oadÅÌ4
+oadó2
+oadú2
+oa3ne
+oa3né
+oa3ru
+o2as
+oas3t
+oa3t
+oau6ste
+o1Ä
+o2Än
+o2Är
+2o1á
+oá2d3
+oáde2
+o2án
+2o1æ2
+o2æ3q
+o1Ç£2
+o2Ç£3q
+oÇ£Ì2
+oÇ£Ì3q
+2o1ǽ2
+o2ǽ3q
+1ob1
+ob2ab
+o3bam
+o3ban
+o3b2a3q
+o3bar
+o3b2as
+obe4ra
+obe4rÄ
+obe4rá
+obe4ro
+obe4rÅ
+obe4ró
+ob2Ä“r
+obé2q
+obi2b
+ob3i4c
+obi2m
+ob2iq
+ob3it.
+ob3itn
+ob3itq
+ob3itv
+o2bi2u
+obi2v
+obī2m
+ob2Ä«n
+ob2Ä«q
+ob2Ä«t
+obí2b
+obí2c
+obí2m
+ob2íq
+ob3íss
+ob3íst
+o2bl
+o2bo
+ob4ole.
+ob6olene
+ob4oleq
+ob4oleu
+ob4olev
+o2br
+ob3rá
+obri3
+ob5rue
+obs2
+ob3st
+ob5ste
+obur3
+o3ca
+o3cá
+1occ
+2o3ce
+o3cē
+2o3cé
+2o3ci
+o3cī
+2o3cí
+oco2i
+ocoi3q
+oco2í
+oco5me
+oco3m4Ä“
+ocomi5te
+ocomi5té
+oc4ten
+oc3ue.
+o3cú
+o3dam.
+o3dami
+o3damq
+o3damu
+o3damú
+o3damv
+o3dan
+o3dar
+o3das
+o3dat
+o2d3ác
+2ode
+o4d5eam.
+o4d5eamn
+o4d5eamq
+o4d5eamu
+o4d5eamú
+o4d5eamv
+o4d3ean
+o4d3eas
+o4d3eat
+o4d5eámn
+o4d5eámq
+o4d5eámu
+o4d5eámv
+o4d3eán
+o4d3eás
+o4d3eát
+ode4cé
+ode2g
+ode2i
+od3eo.
+od3eon
+od3eoq
+od3eou
+od3eov
+o2d3eó
+ode4st
+ode4u5t
+o2deú
+odē2i
+odé2g
+od2i
+o4d3ibi
+o4d3ibí
+o2d3i2g
+od4iue.
+o5dium
+o5dius
+od4ive.
+2o3dī
+2odí
+o2dí2b
+odí5ci
+o2d3í2g
+od6íue.
+od6íve.
+2o3do
+od4or
+2odÅ
+2odó
+2odu
+od3ue
+od3ui
+od3uī
+od3uí
+2odú
+2oea
+o3eat
+2oeÄ
+o3eÄm
+o3eÄt
+2oe2ă
+2oeá
+o3eát
+oe3b
+oecu3
+oe3d2
+oe2e
+o1e2g
+2oe2i
+2oeī
+oe2Ä­
+2oeí
+o2el
+o3e2le
+o4e3leu
+o4e3lev
+o1e2m
+o5e4mēti
+o5e4mētí
+o5e4mētu
+o5e4mētú
+o3emu
+o3emú
+oepe3
+o1er
+oe3ro
+oete5r
+o1e2u
+o4eue
+oe2Å­
+o1eú
+o1e2x3
+2o1Ä“2
+o2Ä“n3
+o2Ä“s
+o2Ä“u
+o2Ä“v
+oÄ“Ì2g
+oÄ“Ì2m
+2o1é
+oé2g
+oé2m
+o2éq
+o2és
+1off
+ofo1
+og2
+o3ga
+o3gæ
+ogæ3v
+o3gǣ
+o1h
+oho4s
+ohó2
+2o1i2
+o2iad2
+o2iÄ
+o2iǣ
+o3ic
+o2id
+o4iene
+o2iī
+o2io
+oio2s
+o2iÅ
+o2ió
+o1Ä«
+oī2b
+oī2m
+oī2r
+oī2t
+oī2u
+oī2v
+oÄ«Ì2b
+oÄ«Ì2m
+oÄ«Ì2r
+oÄ«Ì2t
+oÄ«Ì2u
+oÄ«Ì2v
+2o1í
+oí2b
+oí2c
+oí2m
+oí2r
+o3íss
+o3íst
+oí2ta
+oí2te
+oí2to
+oí4tu
+oí2ui
+oí2vi
+o3la
+o3lÄ
+o3lá
+o3læ
+o3lǣ
+o3lǽ
+ole3ii
+ole3ií
+ole3io
+ole3ió
+ole5ium
+ole3iú
+olé3ia
+olé3ii
+olé3io
+olé3iu
+2o3li.
+o3lia
+o3lii
+o3lií
+2o3lin
+o3lio
+o3liÅ
+o3lió
+2o3liq
+2o3lis
+2o3liu
+2o3liv
+2o3lī
+o3lía
+2olín
+2olíq
+2olís
+2olíu
+2olív
+2oll
+2o3lo
+2o3lÅ
+2o3ló
+o2l3ua
+o2luÄ
+o2l3uá
+o2l3uæ
+o2luǣ
+o2l3uǽ
+ol3ue.
+ol3ueb
+ol3uem
+ol3uen
+ol3ueq
+ol5uerē
+ol5ueré
+ol3ues
+ol3uet
+ol3ueu
+o2l3uē
+o2lué
+ol3uéb
+ol3uém
+ol3uén
+ol5uéris
+ol3ués
+ol3uét
+ol5uimi
+ol5uimur
+ol5uimúr
+ol5uis.
+ol5uisn
+ol5uisq
+ol5uisu
+ol3uit
+ol3uīs
+ol5uÄ«Ìs
+ol3uím
+ol5uísn
+ol5uísq
+ol5uísu
+ol5uíte
+2o3l4um
+o2luo
+o2luÅ
+o2l3uó
+2o3l4u2s3
+o2l3uu
+o2l3uú
+2o3lúm
+2o3lús
+o1m2a
+om2á
+omb2
+ombu3r
+ombú3r
+ome4da
+ome4dá
+om2eq
+ome4sa
+ome4sá
+ome4so
+om1Ä“
+o3mēt
+o3mÄ“Ìt
+o4mé4sa
+om2i2a
+om2ib
+om2ic
+om2im
+om2in4
+omini5c
+om2iq
+omi2t
+o5mit.
+om6itas.
+om6itasn
+om6itasq
+om6itasu
+om6itasv
+om6itásn
+om6itásq
+om6itásu
+om6itásv
+om4ite.
+om6itene
+om4iteq
+om4iteu
+om4itev
+om6itis.
+om6itisn
+om6itisq
+om6itisu
+om6itisv
+om6itísn
+om6itísq
+om6itísu
+om6itísv
+o5mitn
+om4ito
+o5mi5tot
+om4itó
+o5mi5tót
+o5mitq
+o5m4itue
+o5m4i5tur
+o5m4i5túr
+o5mitv
+om2iu
+om2iv
+om2Ä«
+om2íc
+om2ím
+om2íq
+om4íte
+o4mí4ti
+om4ítn
+om4ítq
+om4ítu
+om4ítv
+om2íu
+om2ív
+o1mo
+omo4nu
+o1mœ
+ompere5r
+ompe6ri.
+omperi6n
+ompe6ri6q
+ompe6ris.
+ompe6risn
+ompe6risq
+ompe6risu
+ompe6risv
+omperi6u
+omperi6v
+ompe6rī.
+omperī6n
+ompe6rī6q
+ompe6rī6u
+ompe6rī6v
+ompe6rÄ«Ì6n
+ompe6rÄ«Ì6q
+ompe6rÄ«Ì6u
+ompe6rÄ«Ì6v
+ompe6rí6n
+ompe6rí6q
+ompe6rísn
+ompe6rísq
+ompe6rísu
+ompe6rísv
+ompe6rí6u
+ompe6rí6v
+ompē4ia
+ompÄ“6iÄ.
+ompÄ“6iÄq
+ompÄ“6iÄs
+ompÄ“6iÄÌq
+ompÄ“6iÄÌs
+ompē4iá
+ompē4iæ
+ompē4iǣ
+ompē4iǽ
+ompē4iī
+ompÄ“4iÅ
+ompé6r5ii
+ompé6r5iī
+ompé6r5is
+o1m2u
+om3ue
+o3m2Å«2
+om2ú
+o3n2a
+o3n2Ä
+o3n2á
+3onc
+on3d
+on2e
+2one.
+one4u5t
+2o3n2é
+2oni
+o5nia.
+o5nian
+o5niaq
+o5niau
+o5niav
+o4ni4ci
+on4ier
+on4iér
+on2ii
+on2ií
+on2im
+on2in
+on2iq
+on2it
+o2niu
+o3niue
+o3niué
+o3n4iui
+o3n4iuí
+o3nium
+o5niúm
+on2iv
+on2Ä«
+2oní
+o4ní4ci
+on2íe
+on2íq
+on2ít
+on2íu
+on2ív
+on2o
+ono3pi
+ono3s4t
+on2ó
+onós4t
+ons2c
+on5sci
+on3s2i
+onsi5u
+onsi5v
+on3s4p
+ons2u
+on3t2
+onte4i
+ontes5
+ontē4i
+2onu
+o4nue.
+on2uī
+on2ul
+2on2ú
+2o1o2
+o2o3n
+oo3ru
+o2os
+oo3u
+oo3v
+o1Å
+o2Ån
+o2Ås
+2oó
+o1ór
+oó2re
+oó2ri
+1ope1
+o2pem
+oper4a
+oper4æ
+oper4Ç£
+oper4ǽ
+ope3r4e
+oper4Ä“
+oper4i
+ope3r4Ä«
+oper4í
+operí5tur
+oper4o
+oper4ó
+oper4u
+o2pém
+o2pér
+opér4u
+o3pic
+1opī
+o3pīs
+opo4s3
+1opp
+op2su
+2oq
+o3qu
+2or.
+o1ra
+or3ang
+o3r2Ä
+o3ræ
+o1rǣ
+o3rǽ
+2orc
+o1r2e
+2o3re.
+2o3rea
+2o3reá
+2o3reæ
+2o3reǽ
+2o3ree
+2o3reé
+2o3rei
+2o3reí
+4o3rene
+2o3reo
+2o3reó
+2o3req
+2o3reu
+2o3reú
+2o3rev
+o3rē
+2o3réa
+2o3rée
+o1r2i
+o3riæ
+o3riǽ
+2o3rib
+oric4
+ori5ce
+o3rii
+o3rií
+ori3ni
+4oris.
+4orisn
+4orisq
+4orisu
+4orisv
+o3ría
+o3ríc
+o2rír
+4orísn
+4orísq
+4orísu
+4orísv
+orí5tur
+4orne.
+o1r2o
+o3ron.
+o3ronn
+o3ronq
+o3ronu
+o3ronv
+o3rorú
+2o3ros
+oro4s3t
+2o1rÅ
+o3rónn
+o3rónq
+o3rónu
+o3rónv
+2o3rós
+2orq
+ort2
+or3tu
+2o1ru
+o2rue
+or3ue.
+o3rum
+o3rus
+2o3rú
+2orv
+o1ry
+2os.
+os2a
+os2cǽ
+os4ch
+os3cit
+o4sco
+o4scó
+os2cr
+o4scu
+o4scú
+os2e
+ose2i
+os2i
+osíl2
+o1s2m
+2osn
+o1sp
+o2spa
+o2spá
+os2pe
+ospe5ri
+ospe5r4Ä«
+osper4í
+os2pé
+os2pl
+2o2sq
+2ost
+os4t3ea
+os4t3eÄ
+os4t3eá
+ost5ill
+osti5t4
+os4t5íll
+ostí3t4
+os3to
+os4to.
+os4ton
+os4toq
+os4tou
+os4tov
+os5tri
+os5trī
+os3trí
+os3tru
+os3trú
+os4tué
+2osue
+o4s3ue.
+os2ué
+os2uī
+2osv
+o3ta
+o4t3ann
+o4t3ánn
+o4t3enn
+o5ter.
+o4t3e4ra
+o4t3e4rÄ
+o4t3e4rá
+o5te5re
+ote5rii
+ote5rií
+o4t5erim
+ote5rin
+o4t5erit
+ote5riu
+oteri5ue
+ote5ri5v
+ote5rī
+oterī5u
+oterī5v
+o4t5e4rít
+o5tern
+o5terq
+o5terue
+o4t5erun
+o4t3e4rú
+o5terv
+o4t5este
+o4t5esti
+o4t5estí
+o4t5esto
+o4t5estó
+o4t3énn
+o4t5é4rim
+o4t5é4rit
+o4t3ést
+o2tl
+o3t2u
+2o1u2
+ou3enn
+ouē5nī
+ou3énn
+o2um
+ou4st
+o1Å«2
+oÅ«Ì2
+2oú2
+o1út
+2ov
+ov3enn
+ovē5nī
+ov3énn
+2ox2
+ox4eu
+o3xi
+oxu3
+o2x3ue
+oÍže2i
+o͡e2i
+Å2a
+Åab2
+Åa2m
+Åăb2
+Åb2
+Åba3q
+Åbæ3
+Åbe3
+ÅbÄ«3u
+ÅbÄ«3v
+Åbo3
+ÅbÅ3r
+ÅbÅÌ3
+Å3bu
+Å3bÅ­
+2Åc
+Å2ch
+Å2c3ue
+Å2d1a2
+Å3dam.
+Å3damq
+Å3damu
+Å3damv
+Å3d2an
+Å3d2ar
+Å3dat
+Å2dÄc
+Å4d3ÄÌc
+Å2d1ă
+Å3dăm.
+Å3dămq
+Å3dămu
+Å3dămv
+Å3d2ăn
+Å3dăr
+Å3dăt
+Å5dăÌmn
+Å5dăÌmq
+Å5dăÌmu
+Å5dăÌmv
+Å3dăÌn
+Å3dăÌr
+Å3dăÌt
+Ådá2
+Å4d5eam.
+Å4d5eamn
+Å4d5eamq
+Å4d5eamu
+Å4d5eamv
+Å4d3ean
+Å4d3eat
+Å2d3eÄ
+Å4d5eámn
+Å4d5eámq
+Å4d5eámu
+Å4d5eámv
+Å4d3eán
+Å4d3eát
+Å2d3eÅ
+Å4d3e4ru
+Å4d3e4rú
+Å2d3e2s
+Å2deu
+Å3deue
+Å2deú
+ÅdÄ“2g
+ÅdÄ“2s
+ÅdÄ“Ì4g
+Å2d3Ä•Ä
+Å4d5ĕăm.
+Å4d5ĕămn
+Å4d5ĕămq
+Å4d5ĕămu
+Å4d5ĕămv
+Å4d3ĕăn
+Å4d3ĕăt
+Å6d5ĕăÌmn
+Å6d5ĕăÌmq
+Å6d5ĕăÌmu
+Å6d5ĕăÌmv
+Å4d5ĕăÌn
+Å4d5ĕăÌt
+Å2d3Ä•Å
+Å4d3Ä•rÅ­
+Å2d3Ä•s
+Å4d3Ä•Ìs
+Å2d3és
+Å2d3i2g
+Åd4Ä«ue.
+Åd4Ä«uÄ•.
+Åd4Ä«ve.
+Åd4Ä«vÄ•.
+Åd6Ä«Ìue.
+Åd6Ä«ÌuÄ•.
+Åd6Ä«Ìve.
+Åd6Ä«ÌvÄ•.
+Å2d3Ä­g
+Å4d3Ä­Ìg
+Å2d3í2g
+Å3do
+Åd4or
+Å2e
+Åe2m
+Å2Ä•
+Åg2
+Åga2
+Ågá2
+Ågo2
+Å1h
+Å1i2
+Å2iad2
+Å2i3b
+Å3ic
+Å2ien
+Å2iÄ“n
+Å2is
+Å1Ä­2
+Å2Ä­3b
+Å2Ä­Ä“
+Å2Ä­Ä•
+ÅÄ­Ì2
+Å2Ä­ÌÄ•
+Å1í2
+Å2íe
+Åle3i
+Åle2r
+Ålé3i
+Ål3ue.
+Å1m2
+Åma2r
+Åna2r
+Ån2Ä
+Åná2
+1Ånc
+2Å3n2e
+Åneu5t
+2ÅnÄ“
+2Å3n2Ä•
+2Å3né
+2Ån2i
+2ÅnÄ«
+2ÅnÄ­
+2Åní
+Åno2
+Åns2c
+Åns4i
+Ånsi5t
+Åns4Ä­
+ÅnsÄ­5t
+Ån3s4p
+2Å1n2u
+Å2n3ue
+2Ån2Å­
+2Ånú
+Åp2
+Å3pi
+Å3pÄ­
+Å3pt
+2Åq
+Å3qu
+Å1r
+2Å3ra.
+4Å3rane
+2Å3raq
+2Å3rau
+2Å3rav
+2Å3ră.
+4Å3rănÄ•
+2Å3răq
+2Å3rău
+2Å3răv
+1Ård
+År2e
+2Å3re.
+2Å3rea
+2Å3reÄ
+2Å3reá
+2Å3reæ
+2Å3reÇ£
+2Å3reǽ
+2Å3ree
+2ÅreÄ“
+2Å3reÄ«
+4Å3rene
+2Å3reÅ
+2Å3req
+2Å3reu
+2Å3reú
+2Å3rev
+ÅrÄ“2i
+Å3rÄ“u
+Å3rÄ“v
+År2Ä•
+2Å3rÄ•.
+2Å3rÄ•a
+2Å3rÄ•Ä
+2Å3rĕă
+2Å3rĕá
+2Å3rĕæ
+2Å3rÄ•Ç£
+2Å3rĕǽ
+2ÅrÄ•Ä“
+2Å3rÄ•Ä•
+2Å3rÄ•Ä«
+4Å3rÄ•nÄ•
+2Å3rÄ•Å
+2Å3rÄ•q
+2Å3rÄ•u
+2Å3rÄ•Å­
+2Å3rÄ•v
+4Å3rÄ•Ìă
+4Å3rÄ•ÌÄ•
+Åré2
+2Å3réa
+2Å3rée
+2Å3ri
+2Å3rÄ«
+2Å3rÄ­
+2Å3rí
+1Årn
+Åro2
+2Å3ron
+2Å3ros
+2Å3rÅr
+2Å3rÅs
+Å3rÅÌr
+Å3rÅÌs
+ÅrÅ2
+2Å3rÅn
+2Å3rÅs
+Å3rÅÌn
+Å3rÅÌs
+Åró2
+2Å3rón
+2Å3rós
+2Å3r2u
+År3ue.
+Å4ruÄ•
+2Å3rÅ­
+År4Å­n
+2Å3rú
+2Ås.
+Ås2cǽ
+Å3s4ch
+Ås3cit
+Ås3cÄ«
+Ås3cÅ­
+ÅsÄ“2i
+Ås4Ä“m
+Ås2i
+Åsi3l4
+Åsi2n
+Åsíl2
+2Åsn
+Å1s2p
+Åspe3r
+Åsper4Ä«
+ÅspÄ•5rÄ«
+2Å2s3q
+2Åst
+Ås2ta
+Ås2tÄ
+Ås2tă
+Ås2tá
+Ås2te
+Ås2tÄ“
+Ås2tÄ•
+Ås2té
+Ås2ti
+Åsti5t4
+Ås2tÄ­
+Åstí3t4
+Ås2tÅ
+Ås5tri
+2Å2s3ue
+2Å2s3uÄ•
+2Åsv
+Åt2
+Å3ta
+Å3tă
+Åté2
+Å2th
+Åtó2
+Å3tu
+2Å1u
+Å3ue
+Å3uÄ•
+Å2um
+2Åv
+Å3ve
+Å3vÄ•
+Å2x
+2Å2Ì
+ÅÌb2
+ÅÌ3bu
+ÅÌ3bÅ­
+ÅÌ4d3ea
+ÅÌ4d3eÄ
+ÅÌ4d3eÅ
+ÅÌ4d5eru
+ÅÌ4d3es
+ÅÌ4d3Ä•Ä
+ÅÌ4d3ĕă
+ÅÌ4d3Ä•Å
+ÅÌ4d3Ä•s
+ÅÌ2Ä•
+ÅÌ3g2
+ÅÌi2
+ÅÌ3ic
+ÅÌÄ­2
+ÅÌ3Ä­c
+ÅÌ3lo
+ÅÌ3lÅ
+ÅÌ3luÄ«
+ÅÌm2
+ÅÌ3mu
+3ÅÌnc
+ÅÌns4i5
+ÅÌns4Ä­5
+ÅÌ3p2
+3ÅÌrd
+ÅÌ3rÄ•
+3ÅÌrn
+ÅÌ3spe
+ÅÌ3s4pÄ•
+ÅÌ3spi
+ÅÌ3spÄ­
+ÅÌ3s4ta
+ÅÌ3s4tÄ
+ÅÌ3s4tă
+ÅÌ3s4te
+ÅÌ3s4tÄ“
+ÅÌ3s4tÄ•
+ÅÌ3s4tÅ
+ÅÌ5s4trÄ“
+ÅÌ4s5tru
+Å1a
+Åau6stÄ•
+Å1Ä
+Å2Än
+Å2Är
+2Å1ă2
+Åăd3
+ÅădÄ•4
+ÅădÄ•Ì4
+ÅădÅÌ4
+Å2ăs
+ÅăÌ2
+ÅăÌd3
+ÅăÌdÄ•4
+Å1á
+Å1æ2
+Å2æ3q
+Å1Ç£2
+Å2Ç£3q
+ÅÇ£Ì2
+Å1ǽ2
+Å2ǽ3q
+1Åb1
+Å2ba
+Åbă2
+Åb2ăb
+Åb2ăq
+Åb2ău
+Åb2ăv
+ÅbăÌ2
+Åb2Ä“r
+ÅbÄ•4r
+ÅbÄ•Ì2
+Å2bi
+2ÅbÄ«
+ÅbÄ«2m
+Åb2Ä«n
+Åb2Ä«q
+Åb2Ä«t
+ÅbÄ­2
+ÅbÄ­4c
+Åb3Ä­t
+ÅbÄ­Ì2
+Å2bl
+Å2bo
+Å2bó
+Å2br
+Åbs2
+Åb5stÄ•
+Å3că
+1Åcc
+Å3cÄ“
+Å3cÄ•
+Å3cÄ«
+Å3cÄ­
+ÅcÅ3m4Ä“
+ÅcÅ3mÄ•
+ÅcÅmÄ­5tÄ•
+Åc4tÄ•n
+Å2cu
+Å3cÅ­
+2ÅdÄ•
+ÅdÄ•4c3Ä•
+ÅdÄ•s3
+2Å3dÄ«
+Åd2Ä­
+2ÅdÅ
+Å2d1u
+2ÅdÅ­
+Å1Ä“2
+Å2Ä“n
+ÅÄ“3nÄ•
+Å2Ä“s
+Å2Ä“u
+Å2Ä“v
+ÅÄ“Ì2g
+ÅÄ“Ì2m
+Å1Ä•2
+Å2Ä•3q
+Å3Ä•Ì2
+ÅfÅ1
+Åg2
+Å3ga
+Å3gæ
+Ågæ3u
+Ågæ3v
+Å3gÇ£
+Å1h
+Å1i
+Å1Ä«
+ÅÄ«2b
+ÅÄ«2m
+ÅÄ«2r
+ÅÄ«2t
+ÅÄ«2u
+ÅÄ«2v
+ÅÄ«Ì2b
+ÅÄ«Ì2m
+ÅÄ«Ì2r
+ÅÄ«Ì4t
+ÅÄ«Ì2u
+ÅÄ«Ì2v
+Å1Ä­
+Å2Ä­u
+Å2Ä­v
+Å3la
+Å3lÄ
+Å3lá
+Å3læ
+Å3lÇ£
+Å3lǽ
+Å3lÄ“n.
+2Å3lÄ•.
+4Å3lÄ•nÄ•
+2Å3lÄ•q
+2Å3lÄ•u
+2Å3lÄ•v
+2Å3lÄ«
+2Åll
+2Å3lÅ
+2Å3lÅ
+Å2l1u
+2Å3lÅ­m
+2Å3lÅ­s
+4Å3lÅ­Ìm
+4Å3lÅ­Ìs
+Å1ma
+Å3m2ă
+Åmb2
+ÅmbÅ«3r
+ÅmbÅ«Ì3
+Åm1Ä“
+Å3mÄ“t
+Å3mÄ“Ìt
+Å3mÄ•.
+Å3mÄ•m
+Å3mÄ•n
+Å3m2Ä•q
+Å3mÄ•u
+Å3mÄ•v
+Å3m2Ä«
+Å3mĭă
+Åm2Ä­n
+ÅmÄ­nÄ­5c
+Å3mÄ­s
+ÅmÄ­2t
+Åm3Ä­tÅ
+Å3mÄ­Ìs
+Åm3p2
+ÅmpÄ“Ì5i
+ÅmpÄ•6rÄ«.
+ÅmpÄ•rÄ«6n
+ÅmpÄ•6rÄ«6q
+ÅmpÄ•6rÄ«6u
+ÅmpÄ•6rÄ«6v
+ÅmpÄ•6rÄ«Ì6n
+ÅmpÄ•6rÄ«Ì6q
+ÅmpÄ•6rÄ«Ì6u
+ÅmpÄ•6rÄ«Ì6v
+ÅmpÄ•6r5Ä­Ä«
+ÅmpÄ•6rÄ­t
+ÅmpÄ•Ì6r5Ä­Ä«
+Å3m2Å«2
+Å3n2Ä
+Ån3d2
+Ån2gá
+Å2n1i
+Ån5Ä­4cÄ•Ì
+Å4n3Ä­4cÄ­
+Å4n5Ä­Ì4cÄ­
+Ån2Å
+ÅnÅ3s2
+ÅntÄ•s5
+Ån2Å­
+Å1Å
+Å2Ån
+Å2Ås
+Å1Å2
+ÅÅÌ4r
+2Åpa
+2ÅpÄ
+2Åpæ
+2ÅpÇ£
+Åpe2
+Å2pÄ•
+ÅpÄ•3r4a
+ÅpÄ•3r4æ
+ÅpÄ•3r4Ç£
+ÅpÄ•3rÄ•
+ÅpÄ•3rÄ«
+ÅpÄ•3rÅ
+ÅpÄ•3rÅ­
+1ÅpÄ«
+Å3pÄ«s
+2Å3pÅ
+ÅpÅ3t
+Åp2su
+ÅptÄ•4
+ÅptÄ•Ì4
+2År.
+Å1ra
+Å3r2Ä
+2Å1ră
+Å1ræ
+Å1rÇ£
+2Årc
+Å1re
+Å3rÄ“
+Å1r2Ä•
+2Å3rÄ­b
+2Å3rÄ­s
+4Å3rÄ­Ìs
+2Årn
+2Å1rÅ
+Å1r2Å
+2Årq
+År2su
+2Åru
+2Å3rÅ­
+2Årv
+Ås2ă
+Å3s2Ä•
+Å1s2m
+Å1sp
+Å2spă
+Ås2pÄ•
+ÅspÄ•5rÄ«
+Å2s3pÄ­
+Ås2pl
+Ås3q
+Ås4t3Ä•Ä
+Ås5tÄ•r
+Åst5Ä­ll
+Ås6t5Ä­Ìll
+Ås5trÄ«
+Å3strÅ
+Ås3u
+Å4t3ănn
+ÅtÄ•2
+Å2t3Ä•r
+ÅtÄ•3rÄ•
+ÅtÄ•5rÄ«
+ÅtÄ•rÄ«5u
+ÅtÄ•rÄ«5v
+Å4t3Ä•s.
+Å4t3Ä•sn
+Å4t3Ä•sq
+Å4t5Ä•stÄ•
+Å4t5Ä•stÄ­
+Å4t3Ä•su
+Å4t3Ä•sv
+Å4t5Ä•ÌrÄ­
+Å4t3Ä•Ìs
+Å2tl
+Å1u
+ÅuÄ“5nÄ«
+Å3u4Ä•m
+Å1Å«2
+ÅÅ«Ì2
+ÅÅ«Ì4t
+Å1Å­
+Å2Å­m
+Å2Å­s
+Å2Å­Ì
+ÅvÄ“5nÄ«
+Å3v4Ä•m
+2Åx2
+Åx4eu
+Å2xu
+ÅxÅ­3
+ÅxÅ­Ì3
+Å2Ì
+ÅÌ3ă
+ÅÌb3Ä•Å
+ÅÌb3Ä•4r
+ÅÌbÄ­2
+ÅÌb3Ä­t
+ÅÌb5ÅlÄ“
+3ÅÌ2br
+ÅÌbs2
+2ÅÌc
+3ÅÌcc
+2ÅÌd
+ÅÌ2d3u
+ÅÌ1Ä•
+ÅÌÄ•2m
+ÅÌ1i
+ÅÌÄ­2
+ÅÌ3Ä­Ä“
+ÅÌ3Ä­t
+4ÅÌlÄ•n
+4ÅÌlÄ•q
+4ÅÌlÄ•u
+4ÅÌlÄ•v
+2ÅÌll
+ÅÌl3u
+ÅÌ4m3Ä•s
+ÅÌmÄ­4tÄ­
+ÅÌmÄ­4tÅ
+ÅÌm3p2
+ÅÌ3nÄ­b
+ÅÌ3Å
+ÅÌ4pÄ•r
+ÅÌ4pÄ«
+ÅÌ2r
+2ÅÌ3ră
+ÅÌ3rÄ“
+ÅÌ3rÄ•
+ÅÌ3rÄ«
+ÅÌ3rÄ­a
+ÅÌ3rĭæ
+ÅÌ3rÄ­Ç£
+4ÅÌ3rÄ­b
+ÅÌ3rÄ­c
+ÅÌ3rÄ­d
+ÅÌ3rÄ­Ä«
+ÅÌ3rÄ­s
+2ÅÌrn
+ÅÌ3rÅ
+2ÅÌrq
+2ÅÌru
+ÅÌ3rÅ­
+2ÅÌrv
+ÅÌ3sÄ•
+ÅÌ3s4pÄ•
+ÅÌ3sph
+ÅÌs4t5Ä•Ä
+ÅÌt5Ä•4rÄ
+ÅÌt5Ä•4ră
+ÅÌt5Ä•4rÄ­
+ÅÌt5Ä•rÅ­
+2ÅÌx
+ó1ad
+ób1
+ób2ab
+ób2a3q
+ób3a2r
+ób2a͡
+ób2eq
+óbe4r
+ób3es
+óbi4c
+ób3i2t
+ób2iu
+ób2o1
+ób5olen
+ób5oles
+ób3olē
+óbo3r
+1ó2br
+ób2ri
+ób3ru
+ób5rue
+1ób3s2
+ób5ste
+ó3b2u
+1ócc
+óco3m
+óco5me
+ó2c3ue
+2ód
+ód2a
+ó2d3ea
+ó4d3eo
+ó4d3e4ru
+ó4dest
+ó2d3i2g
+ó3ear
+ó3eat
+óe2ă
+óe3b
+óed2
+óe2e
+óe2i
+ó1e2m
+óepe3
+óe2ŭ
+ófe1
+ófo1
+óg2o3
+ó1h
+ói2
+ó3ian
+ó3iaq
+ó3iau
+ó3iav
+ói3b
+ó1ic
+ó3ien
+ó1iē
+ó3iit
+ó2in
+ó2i3q
+ó3it
+ó1iu
+ó2i3ue
+ó2i3v
+2ólen
+2óleq
+2óleu
+2ólev
+2óll
+ó2l1u
+ó3lub
+ó3lum
+ó3lus
+ó1m
+óm2a
+óm2e
+ó2m3e2d
+óm2i
+ó5mit.
+óm5i4tan
+óm5i4tat
+ómi4tÄn
+óm5i4tem
+óm5i4ten
+óm5i4tes
+óm5i4tet
+ómi4tēs
+ómi4tor
+ó5mitur
+ómpe3
+ómpe5r
+óm2ui
+óm2uī
+ó3m2ū
+2ó1n
+3ónc
+ón3g2
+ón5i4cit
+ón3t2
+ó2nue
+ón2uī
+ón2ul
+ó3nus
+óo2
+ó1or
+ópe1
+ó2pe3r
+ó3pi
+óp2su
+ópu3
+2óq
+ó3qu
+ó1ra
+4órane
+2óraq
+2órau
+2órav
+ó1ræ
+ó1re
+2óre.
+2órea
+2óreæ
+2óree
+2órei
+4órene
+2óreo
+2óreq
+2óreu
+2órev
+ó1ri
+2óri.
+ó4riat
+2órib
+2óris
+ó1rī
+3órna
+4órne.
+3órnem
+3órnen
+3órner
+3órnes
+3órnet
+3órno
+ó1ro
+ó1rÅ
+2órq
+órt2
+ór3tu
+2óru
+ó2rue
+ó3r2ui
+ó3run
+2órv
+ós4ch
+ós2i
+2ósn
+ó1sp
+ós2pe3
+2ós3q
+2óst
+óste3
+ós4t3ea
+ós4t3eÄ
+ós5tri
+2ósue
+ós3uis
+ó3s2uī
+2ósv
+ó5ter.
+ót3e4ra
+ót3e4rÄ
+ót3eru
+ó4test
+ó2tl
+2ó1u2
+ó2um
+2óv
+2óx
+óx4eu
+ó3x2i
+óxu3
+ó2xue
+2Å“a
+Å“a2m
+2Å“Ä
+2œă
+2χ
+2Ͼ
+Ͼ2i
+œæ2ŭ
+2œǽ
+Å“b2
+Å“3bi
+œbī3u
+œbī3v
+Å“3bu
+Å“3bÅ­
+Å“ce2
+Å“cu3
+Å“de3
+œdĕ3r
+Å“en3
+Å“Ä“n3
+ώn3
+2Å“i
+2Å“Ä«
+2ϒ
+Å“1m
+Å“1n2
+Å“no3b2
+ϗ1r
+Å“pe3
+Å“per2
+œpĕ3r
+œpĕ5rĭ
+Å“1r
+Å“te5re
+Å“Ì3b2
+Å“Ì2i
+Å“Ì3l
+Å“Ì1n
+Å“Ì2s
1p
-p2h2
-p2l
-2pn
-2pp
-p2r
-2ps
-2pt
-3p2tr
-2pz
-2php
+p2a
+pab2
+3pa3d2
+pada3
+pae4nī
+pan3sa
+pan5s4i
+pansi5u
+pansi5v
+pans4í
+2parg
+2pars
+par2u
+pa4ruī
+pa3tr
+p2Ä
+pÄn3sa
+pÄn3să
+pÄn3s4Ä«
+pÄnsÄ«5n
+pÄnsÄ«5q
+pÄnsÄ«5u
+pÄnsÄ«5v
+3pă3d2
+pă3ră
+2părg
+pă3rÅ
+2părs
+păs3t
+păs5tă
+2păth
+păÌ3rÄ“
+4păÌrg
+4păÌrs
+p2á
+pán3si
+2párg
+2párs
+pá4ruī
+pæ2a
+pæ2ă
+pæ2á
+pæ2i
+pæ2nī
+pæ2ŭ
+pǣ2a
+pǣ2ă
+pǣ2nī
+pǣ2ŭ
+p2e
+3pe.
+3pe2a
+pe4ae
+pe4am
+pe4as
+pe4aÍž
+pe4a͡
+pe4Äs
+pe3d2
+pe2e
+3pei
+pe4ia.
+pe4iae
+pe4iam
+pe6iane.
+pe4iaq
+pe4iar
+pe4ias
+pe4iau
+pe4iav
+pe4iáe
+pe4iám
+pe6iáne.
+pe4iár
+pe4iás
+pe4iáu
+pe4iáv
+pe4ien
+pe2ié
+pe2ii
+pe2ií
+pe4io.
+pe4ioq
+pe4iou
+pe4iov
+pe4ión
+pe4ióq
+pe4ióu
+pe4ióv
+pe4is
+pe4ium
+pe2Ä«
+pe4Ä«s
+3pe2í
+pe4mn
+pe4mq
+pe4mv
+3pen
+pe4nt
+pe2nu
+3pe2o
+pe4os
+pe2Å
+pe4Ås
+3peó
+pepe3
+peper4
+pepere5
+3peq
+per1
+per5a6b5únd
+pe5ram.
+pe5ramn
+pe5ramq
+pe5ramu
+pe5ramú
+pe5ramv
+pe3ran
+per6ane
+pe5ras.
+pe5rasn
+pe5rasq
+pe5rasu
+pe5rasv
+pe5rat.
+pe5rati
+pe5ratí
+pe5ratn
+pe5ratq
+pe5ratv
+pe4rÄc
+pe5rÄt
+per5ÄÌc
+pe5rÄÌt
+pe4r3ác
+pe2re
+pere4s
+pere4x3
+perexi4
+perexí4
+pe5rē.
+pe4rēb
+pe5rēq
+perē4s
+pe5rēt
+perÄ“Ì4s
+pe4r5énn
+peré4s
+peré4x3
+per5i4ce
+peri4cī
+peri4cí
+peri4mo
+peri4mÅ
+peri4mó
+perin5i4
+peri4n5í4
+per5i6taÍž
+peri6tÄ.
+peri6tÄn
+peri6tÄq
+peri6tÄr
+peri6tÄu
+peri6tÄv
+peri4tǣ
+peri4tī
+peri4tÅ
+peri6tū.
+peri6tūn
+peri6tūq
+peri6tūr
+peri6tūu
+peri6tūv
+pe4rí4ce
+pe4rn
+pero4s
+per5osa
+per5osá
+per5osæ
+per5osǽ
+per5ose
+per5osé
+per5osi
+per5osí
+per5oso
+per5osó
+per5osú
+pe3rÅ.
+pe3rÅn
+perÅ4s
+pe3rÅu
+pe3rÅv
+pe5rÅÌn
+pe5rÅÌq
+perÅÌ4s
+pe5rÅÌu
+pe5rÅÌv
+pe4róp
+peró4s
+perpe5t4
+perpé5t4
+pe4rq
+pe4rt
+pe4rv
+3pes
+pe4sn
+pe4sq
+pes3t
+pes5te
+pe4su
+pe4sv
+3pet
+pete5r
+pete7rer
+pe4tn
+pe4tq
+pe3tuī
+pe4tv
+3peu
+pe4um
+pe2un
+pe2uo
+pe2uÅ
+pe2uó
+pe4us
+3peú
+3pev
+pex2
+pe3x4e
+pexu3
+pexū3r
+3peÍž
+3pe͡
+p2Ä“
+pē4iam
+pē4ian
+pÄ“6iÄne.
+pÄ“4iÄru
+pÄ“4iÄrú
+pÄ“4iÄue
+pÄ“4iÄve
+pÄ“6iÄÌne.
+pÄ“6iÄÌru
+pÄ“6iÄÌue
+pÄ“6iÄÌve
+pē4iám
+pē4iæne
+pē4iæue
+pē4iæve
+pē4iǣne
+pē4iǣue
+pē4iǣve
+pē4iǽne
+pē4iǽue
+pē4iǽve
+pē4ien
+pē4iīne
+pē4iīue
+pē4iīve
+pÄ“4iÅne
+pÄ“4iÅru
+pÄ“4iÅrú
+pÄ“4iÅue
+pÄ“4iÅve
+pē2iu
+pē2iú
+pē2nu
+pē3r
+p2Ä•
+3pĕ.
+3pÄ•Ä
+3pĕ2ă
+3pĕ3d2
+3pĕf
+3pĕn
+pĕ4nt
+3pÄ•Å
+3pĕq
+pÄ•4r3Ä4c
+pÄ•5rÄt
+pÄ•r5ÄÌc
+pÄ•5rÄÌt
+pĕ5rē.
+pĕr3ēb
+pĕ5rēq
+pĕrē4s
+pĕ5rēt
+pÄ•rÄ“Ì4s
+pÄ•r3Ä•Ä
+pĕr3ĕă
+pÄ•4r3Ä•Å
+pÄ•6r5Ä•Ìnn
+pĕ4r5ĭ4cī
+pĕr6ĭĕ.
+pĕr6ĭĕn
+pĕr6ĭĕq
+pĕr6ĭĕu
+pĕr6ĭĕv
+pĕr5ĭmĭ
+pÄ•4r5Ä­4mÅ
+pĕ4rĭn
+pÄ•5rÄ­Å
+pÄ•5rÄ­Å
+pĕ5rĭs
+pĕ4r5ĭ4ta
+pÄ•r5Ä­tÄ.
+pÄ•r5Ä­tÄn
+pÄ•r5Ä­tÄq
+pÄ•r5Ä­tÄr
+pÄ•r5Ä­tÄu
+pÄ•r5Ä­tÄv
+pĕ4r5ĭ4tă
+pĕ4r5ĭ4tá
+pĕ4r5ĭ4tæ
+pĕ4r5ĭ4tǣ
+pĕ4r5ĭ4tǽ
+pĕr5ĭtĕ.
+pĕr5ĭtĕn
+pĕr5ĭtĕq
+pĕr5ĭtĕu
+pĕr5ĭtĕv
+pĕ4r5ĭ4tī
+pÄ•4r5Ä­4tÅ
+pĕr5ĭtū.
+pĕr5ĭtūn
+pĕr5ĭtūq
+pĕr5ĭtūr
+pĕr5ĭtūu
+pĕr5ĭtūv
+pĕ4r5ĭ4tŭ
+pĕ5rĭŭ
+pÄ•6r5Ä­Ì6cÄ•
+pÄ•r5Ä­ÌmÄ­
+pÄ•5rÄ­Ìs
+pÄ•rÄ­Ì4t
+pÄ•r5Ä­Ìtă
+pÄ•r5Ä­ÌtÄ•
+pÄ•2rÅ
+pÄ•3rÅ.
+pÄ•3rÅq
+pÄ•rÅ4s
+pÄ•3rÅu
+pÄ•3rÅv
+pÄ•5rÅÌn
+pÄ•5rÅÌq
+pÄ•rÅÌ4s
+pÄ•5rÅÌu
+pÄ•5rÅÌv
+pÄ•r5ÅÌp
+pÄ•r3Å«Ì
+pÄ•r5Å­Ìn
+3pĕ2s
+pĕs5tĕ
+3pĕt
+3pĕu
+3pĕv
+2pĕx2
+pĕxū3r
+pÄ•Ì4r3Ä“
+pÄ•Ì6rĕăn
+pÄ•Ì6r5ĕăr
+pÄ•Ì6rĕăt
+pÄ•Ì4r5Ä•Å
+4pÄ•Ìrg
+pÄ•Ì4rÄ«
+pÄ•Ì6r5Ä­6cÄ•
+pÄ•Ì6r5Ä­6cÄ«
+pÄ•Ì6r5Ä­t.
+pÄ•Ì6r5Ä­6ta
+pÄ•Ì6r5Ä­6tă
+pÄ•Ì6r5Ä­6tæ
+pÄ•Ì6r5Ä­6tÇ£
+pÄ•Ì6r5Ä­6tÄ«
+pÄ•Ì6r5Ä­6tÅ
+pÄ•Ì6r5Ä­6tÅ«
+pÄ•Ì6r5Ä­6tÅ­
+6pÄ•ÌrnÄn
+6pÄ•Ìrnăr
+6pÄ•Ìrnăt
+6pÄ•ÌrnÄ•r
+6pÄ•ÌrnÄ•t
+4pÄ•ÌrnÄ­
+4pÄ•ÌrnÅ
+3pÄ•Ì4s
+pÄ•Ìs5t
+3pÄ•Ìt
+3péa
+2péc
+3péi
+3péo
+pér5ear
+pér5eor
+pé2r3ē
+2pérg
+pér5i4ce
+pér5i4ci
+pér5i4cī
+pé4r5it.
+pér5i4tæ
+pér5i4tǣ
+pér5i4tī
+pér5i4to
+pér5i4tÅ
+pér5i4tu
+pér5i4tū
+pé2rī
+2pérm
+4pérnÄn
+4pérner
+pér4ui.
+pér4uī.
+3pés
+3pét
+3péu
+pé2uo
+péx2ī
+3pé͞
+3pé͡
+2ph.
+phe2i
+phē2i
+2phēx
+phi6sta
+2phn
+3pho
+3phÅ
+3phó
2pht
-2p.
-.p2
-1qu2
-1r
-2rb
-2rc
-2rd
+p2i
+3pi2a
+piad2
+3piÄ
+3piá
+3piæ
+3piǣ
+3piǽ
+2pic
+pic4e
+pi5cen
+3pid
+3pie
+3piē
+3pié
+pig3n
+3pi2i
+3piī
+3pií
+3pil
+pin2Ä
+pin4i
+pini3c
+3pio.
+3pion
+3pioq
+pio2s
+3piou
+3piov
+3pión
+3pióq
+3pióu
+3pióv
+pi3r2
+pirí3t
+pi4s3c
+pis5ci
+pi4s3tr
+3pit
+pi5ter
+3pium
+3piúm
+pi2x3
+3pī.
+3pīm
+3pīq
+pīrí3t
+pīs3
+3pīu
+3pīv
+3pĭă
+2pÄ­c
+pÄ­n2a
+pÄ­n2Ä
+pĭn2æ
+pÄ­r2
+pÄ­4str
+3pÄ­t
+pĭ5tĕr
+pÄ­Ì3d
+pÄ­Ì4s5t
+3pÄ­Ìt
+3pía
+3píd
+3píe
+píg3n
+3píl
+pí1m
+pí4s3t
+3pít
+pí3tur
+pí2x
+p2l2
+p1n2
+p3nem
+p3nen
+p3ner
+p3nes
+p3net
+2pni
+2pní
+p2o
+3po.
+2pond
+po3ni
+3poq
+3por
+pos3c
+posí3t
+po3s2u
+po4t5e4ro
+po4t5e4rÅ
+po4t5e4ró
+3pou
+3pov
+3pÅ.
+3pÅq
+3pÅr
+3pÅs
+3pÅu
+3pÅv
+3pÅÌs
+p2Å
+pÅ3Ä­
+2pÅn
+3pÅny
+pÅ3rÄ•
+pÅ3rÄ«
+pÅs4trÅ
+pÅtÄ•4r
+pÅtÄ•Ì4
+pÅÌ3rÄ­
+pÅÌ4t5Ä•4r
+3póq
+3pór
+pó3s4tr
+pó4te4r
+pót5eri
+pót5ero
+pót5erÅ
+3póu
+3póv
+2pp
+ppule4
+p2r2
+prae3
+prae5s4
+praete6ris
+praete6rís
+praeté6r5is
+pra3s2
+praÍže5
+praÍžes4
+praÍžÌe5
+praÍžÌes6
+pra͡e5
+pra͡es4
+praÍ¡Ìe5
+praÍ¡Ìes6
+prÄ1
+prÄs2
+práe3
+práes4
+prá3s4t
+præ3
+præs4
+prǣ3s
+prǣ3ŭ
+prÇ£Ì3
+prÇ£Ìs4
+prǽ3
+prǽs4
+pre3d
+pre5mi
+pre5mo
+prē3m
+pr4Ä•Ì
+pri5mi
+pri4s3
+prÄ­4s
+3pro
+pro6de6ri
+pro6de6rí
+pro4des
+pro4dés
+pro4di.
+pro6di6mus
+pro6di6mús
+pro4di4n
+pro4di4q
+pro4dis
+pro6dit.
+pro6di6te
+pro6di6tis
+pro6di6tís
+pro6ditn
+pro6di6to.
+pro6di6ton
+pro6di6toq
+pro6di6tot
+pro6di6tou
+pro6di6tov
+pro6di6tón
+pro6di6tóq
+pro6di6tót
+pro6di6tóu
+pro6di6tóv
+pro6ditq
+pro6ditue
+pro6di6tur.
+pro6di6turn
+pro6di6turq
+pro6di6turue
+pro6di6turv
+pro6di6túrn
+pro6di6túrq
+pro6di6túrue
+pro6di6túrv
+pro6ditv
+pro4dí4n
+pro4dí4q
+pro4dís
+pro6dí6te
+pro6dítn
+pro6dítq
+pro6dítu
+pro6dítv
+pro4d5í4u
+pro4d5í4v
+pro4li
+3prÅ1
+prÅ6de6ri
+prÅ6de6rí
+prÅ6dÄ•6rÄ­
+prÅ6dit.
+prÅ6ditn
+prÅ6ditq
+prÅ6ditue
+prÅ6ditv
+prÅ4dÄ«.
+prÅ4dÄ«4n
+prÅ4dÄ«4q
+prÅ6dÄ«Ì6n
+prÅ6dÄ«Ì6q
+prÅ6d5Ä«Ìs
+prÅ6d5Ä«Ì6u
+prÅ6d5Ä«Ì6v
+prÅ6dÄ­t.
+prÅ6dÄ­tn
+prÅ6dÄ­tq
+prÅ6dÄ­tu
+prÅ6dÄ­tv
+prÅ6dÄ­Ìtn
+prÅ6dÄ­Ìtq
+prÅ6dÄ­Ìtu
+prÅ6dÄ­Ìtv
+prÅ6dítn
+prÅ6dítq
+prÅ6dítu
+prÅ6dítv
+prÅ4li
+prÅ4lÄ­
+prÅs2
+prÅ3s4t
+prÅÌ6de6ri
+prÅÌ6dÄ•6rÄ­
+prÅÌ6dit.
+prÅÌ4d5Ä«
+prÅÌ6dÄ­t.
+prÅÌ5s4t
+3pró
+pró6de6ri
+pró4des
+pró4di.
+pró4dis
+pró6dit.
+pró4li
+prós2
+pró3st
+2p1s2
+psa3c
+p3sá
+p2s3q
+p2s3ue
+p2s3uĕ
+2pt2
+p4t3enn
+pte3r4a
+pte3rǣ
+pte5re
+pte6rea
+pte6reÄ
+pte5ré
+pte3ri
+pteri5u
+pteri5v
+pte5rī
+pterī5u
+pterī5v
+pte3ro
+pte3rÅ
+p4t3Ä•nn
+ptĕ3r4a
+ptĕ3rǣ
+ptĕ3rĕ
+ptĕ5rī
+ptĕrī5u
+ptĕrī5v
+ptĕ3rŭ
+p5tÄ•Ìnd
+pt5Ä•Ìnn
+p4t3énn
+pti4s
+ptis5t
+pti6sta
+ptÄ­4s
+ptÄ­s5t
+p3tr
+p3tu
+p2u
+2pua
+2puÄ
+2puá
+3pu3b2
+pu4gn
+pu2lu
+pul3ue
+pul3ué
+pu3lum
+pu1m
+2puo
+2puÅ
+2puó
+2puu
+2puú
+3pūb
+pū2s
+2pūt
+p2Å­
+2pÅ­Ä
+2pŭă
+3pÅ­g
+2pÅ­Å
+2pÅ­Å
+2pÅ­r
+2pÅ­Å­
+3púb2
+pú4gn
+2pút
+1q
+q2u2
+qu4ăÌ
+qu4ám
+quás3
+qu4át
+que6ste
+3quĕ
+quĕ6stĕ
+qu4ia
+qui4d5ue
+qui4d5ui
+qui4d5uī
+qui4d5uí
+2quit
+quí4d5ue
+quí4d5ui
+quí4d5uī
+quo2s3
+quó2s3
+ra3a2
+rab4a
+r2ab2e
+ra3bib
+rabi3c
+r4abis
+ra3biu
+rab2Ä«
+rabī3u
+rabī3v
+r2abí
+rab2o
+ra3bu
+ra4b5und
+ra3ci
+ra3cí
+ra2cr
+rad2a
+rad2e
+rad2Ä“
+rad2é
+rad2Ä«
+radÅ5rÅ
+rad2ó
+ra3eat
+ra3eÄt
+ra3eát
+raes2
+r2aeu
+r2aev
+r1ag
+ra2gÄ
+ra2gá
+ra3g2n
+ra2gr
+2rah
+ra1i2
+ra3ic
+ra3i4n
+ra2io
+ra2ió
+ra3is
+ra3it
+rai4u
+ra4ium
+ra4ius
+ra4iús
+rai4v
+ra1Ä«2
+raī4n
+raÄ«Ì4
+ra1í2
+ra3í4n
+ra3ís
+r1al
+r2a3li
+ra3mam
+ra4man
+ra3mas
+ra4mán
+ra4már
+ram3b2
+ram5bi
+rambī5q
+rambī5u
+rambī5v
+rambÄ«Ì5q
+rambÄ«Ì5u
+rambÄ«Ì5v
+ram5bu
+r2a3me
+r2a3mé
+r3amna
+r3amnÄ
+r3amná
+r3amni
+r3amnī
+r3amní
+ra5ne.
+4rang
+ran4si.
+ran4si4m
+ran4s5i4n
+ran4si4q
+ran4s5is
+rans5it
+ran4s5í4n
+ran4sí4q
+ran4s5ís
+ran4sí4u
+ran4sí4v
+r2ant
+ra1o
+ra1Å
+r2aq
+ra5que
+ra4rab
+r4aram
+ra4rar
+ra4rau
+ra4rav
+ra2rÄ
+ra4ráb
+ra4rár
+ra4ráu
+ra4ráv
+rar5ch
+r4arem
+r4aret
+r3a2rē
+ra4rid
+4ra4ríd
+r2aro
+r3aror
+r3a2rÅ
+r2aró
+r3arór
+ra4rue
+ra4rué
+ra4rui
+ra4ruí
+ra5rum
+r3a4rúe
+r3a4rúi
+ra5rúm
+rasce5u
+ra4sn
+ra4s2p
+ra4sq
+ra4ss
+ras4ta
+ras4tá
+ras4te
+ras4tém
+ras4tén
+ras4tés
+ras4tét
+ras4tic
+ras4tíc
+ras5tra
+ra4sui
+ra4suí
+ra4sv
+ra5te.
+ra5ten
+ra5teq
+ra5teu
+ra5tev
+ra5ti.
+ra5tic
+ra5tim
+ra5tin
+ra5tiq
+ra5tis
+ra5tiu
+ra5tiv
+ra5tíc
+ra5tín
+ra5tíq
+ra5tís
+ra5tíu
+ra5tív
+ra5to.
+ra5ton
+ra5toq
+ra5tor
+ra5tos
+ra5tou
+ra5tov
+ra5tón
+ra5tóq
+ra5tór
+ra5tós
+ra5tóu
+ra5tóv
+ra3tr
+r3att
+ra5tum
+ra5tus
+ra5túm
+ra5tús
+ra5ue.
+ra5ve.
+ra2xu
+r4aÍžeu
+r4aÍžev
+r4aÍžÌeu
+r4aÍžÌev
+r4a͡eu
+r4a͡ev
+r4aÍ¡Ìeu
+r4aÍ¡Ìev
+1rÄ
+rÄ5bun
+rÄ4cer
+rÄ4cÄ•r
+rÄ4cér
+2rÄcr
+2rÄct
+rÄi2
+rÄ4iae.
+rÄ6iaene
+rÄ6iaeque
+rÄ6iaeue
+rÄ6iaeve
+rÄ6iaÍže.
+rÄ6iaÍžene
+rÄ6iaÍžeque
+rÄ6iaÍžeue
+rÄ6iaÍževe
+rÄ6iaÍžÌene
+rÄ6iaÍžÌeque
+rÄ6iaÍžÌeue
+rÄ6iaÍžÌeve
+rÄ6iaÍ¡e.
+rÄ6iaÍ¡ene
+rÄ6iaÍ¡eque
+rÄ6iaÍ¡eue
+rÄ6iaÍ¡eve
+rÄ6iaÍ¡Ìene
+rÄ6iaÍ¡Ìeque
+rÄ6iaÍ¡Ìeue
+rÄ6iaÍ¡Ìeve
+rÄ4iÄ.
+rÄ4iÄru
+rÄ4iÄrú
+rÄ4iÄs.
+rÄ6iÄsne
+rÄ6iÄsque
+rÄ6iÄsue
+rÄ6iÄsve
+rÄ6iÄÌru
+rÄ6iÄÌsne
+rÄ6iÄÌsque
+rÄ6iÄÌsue
+rÄ6iÄÌsve
+rÄ6iáene
+rÄ6iáeque
+rÄ6iáeue
+rÄ6iáeve
+rÄ4iæ.
+rÄ4iæne
+rÄ6iæque
+rÄ4iæue
+rÄ4iæve
+rÄ4iÇ£.
+rÄ4iÇ£ne
+rÄ6iÇ£que
+rÄ4iÇ£ue
+rÄ4iÇ£ve
+rÄ6iÇ£Ìne
+rÄ6iÇ£Ìque
+rÄ6iÇ£Ìue
+rÄ6iÇ£Ìve
+rÄ4iǽne
+rÄ6iǽque
+rÄ4iǽue
+rÄ4iǽve
+rÄ3ic
+rÄ4iÄ«s.
+rÄ6iÄ«sne
+rÄ6iÄ«sque
+rÄ6iÄ«sue
+rÄ6iÄ«sve
+rÄ6iÄ«Ìsne
+rÄ6iÄ«Ìsque
+rÄ6iÄ«Ìsue
+rÄ6iÄ«Ìsve
+rÄÄ­2
+rÄÄ­Ì2
+rÄ1í2
+r2Än
+rÄnsÄ«4
+rÄnsÄ«Ì4
+rÄn6s5Ä­Ìt
+rÄn4s5ít
+4rÄrÄ“sc
+6rÄrÄ“Ìsc
+rÄ4rue
+rÄ4ruÄ“
+rÄ4rué
+rÄ4rui
+rÄ4ruÄ«
+rÄ4ruí
+r3Ä4rÅ­Ä“
+r3Ä4rÅ­Ä•
+r3Ä4rÅ­Ä«
+r3Ä4rÅ­Ä­
+rÄ4rÅ­ÌÄ•
+rÄ4rÅ­ÌÄ­
+r3Ä4rúe
+r3Ä4rúi
+rÄÌ4cer
+rÄÌ4cÄ•r
+r3ÄÌcr
+4rÄÌct
+rÄÌi2
+rÄÌ3ic
+rÄÌÄ­2
+rÄÌ3Ä­c
+rÄÌn4s5Ä«
+rÄÌr2
+r5ÄÌ4rui
+r5ÄÌ4ruÄ«
+rÄÌ4rÅ­Ä«
+rÄÌ4rÅ­Ä­
+r4ÄÌt
+2r1ăb
+răb2ă
+răb2ē
+răb2ĕ
+răb2ī
+răbī3u
+răbī3v
+răb2ĭ
+răbĭ3c
+2răc
+r1ăd
+răd2ē
+răd2ĕ
+răd2ī
+rădÅ5rÅ
+ră3d2Å
+2răf
+2răg
+ră3g2n
+ră4gÅr
+ră4grē
+ră4grĕ
+ră4grÅ
+ră4grÅ
+2răh
+ră1ī2
+răī4q
+răīÌ4
+ră3ĭē
+ră3ĭī
+2r1ăl
+2rămÄ
+2r3ă4mă
+2răm3b2
+rămbī5n
+rămbī5u
+rămbī5v
+rămbÄ«Ì5n
+rămbÄ«Ì5u
+rămbÄ«Ì5v
+răm5bŭ
+2rămī
+4rămna
+4r3ămnÄ
+4r3ămnă
+4rămná
+4rămnæ
+4rămnǣ
+4rămnǽ
+4r3ămnī
+2rămo
+2rămó
+2rămœ
+2rămp
+2răng
+2rănh
+ră1Å
+2răpĕ
+2răpp
+r2ă3q
+2r1ă2r
+răr3c
+r4ăsĭ
+ră4sn
+ră4sp
+ră4sq
+răs5trī
+ră4su
+ră4sv
+2rătt
+r2ău
+r2ăv
+2răÌb
+răÌb4Ä­
+răÌbÄ­5c
+2răÌf
+răÌ3gn
+răÌm3b4
+4răÌmna
+4r5ăÌmnÄ
+4r5ăÌmnă
+4răÌmnæ
+4răÌmnÇ£
+4r5ăÌmnÄ«
+4răÌpÄ•
+r3ăÌrd
+r3ăÌrm
+4r5ăÌs4tÄ
+4r5ăÌs4tă
+4r5ăÌstÄ“
+4răÌstÄ•
+4răÌs4tÄ­
+4răÌstÅ
+4răÌtt
+1r2á
+ráb2i
+rábi3c
+2rábl
+rá4cer
+2r3á2cr
+2ráct
+4ráequa
+4ráequÄ
+4ráequă
+r5áequen
+4ráequē
+4ráequo
+4ráequÅ
+4ráequÅ
+2ráes
+2r3áf
+rá3g2n
+r4ágr
+rá3ian
+rá3iÄ
+rá3iǣ
+rá3i2c
+rá3ien
+rá3iē
+rá2iu
+rá3li
+2ráll
+rám3b2
+4r3ámna
+4r3ámnÄ
+4rámnæ
+4rámnǣ
+4r3ámni
+4r3ámnī
+2rámp
+ráns5is
+2rápe
+2r3árd
+4rá4rid
+2r3árm
+4r3á4r4ui
+2r3ásp
+4r3ás4ta
+4r3ás4tÄ
+4ráste
+rás4tem
+rás4tes
+rás4tet
+4r3ástē
+rá5s4tic
+4rástit
+4rásto
+4rástÅ
+2rátt
+2ráud
+rá2xu
+ræa2
+ræă2
+ræs2
+ræ5sci
+ræ5stÅ
+r2æu
+ræ3ue
+ræ3uĕ
+r2æ3v
+rǣa2
+rǣă2
+rǣs2
+rÇ£5stÅ
+r2Ç£u
+rǣ3ue
+rǣ3uĕ
+r2Ç£3v
+r2Ç£Ì
+1rǽ
+4rǽqua
+4rǽquÄ
+4rǽquă
+rǽ4quen
+4rǽquē
+4rǽquo
+4rǽquÅ
+4rǽquÅ
+2rǽs2
+r2ǽu
+r2ǽv
+2rb2
+rba3q
+rba3r
+rbæ3
+rbe1
+r3bi
+rbi3c
+rbi3r
+rbi5ti
+rbī3r
+rbī3u
+rbī3v
+rbÄ«Ì3m
+rbÄ«Ì3r
+rbÄ­3c
+rbÄ­5tÄ­
+r3bí
+rbí3m
+rbí3r
+rbí3to
+rbí5tur
+rbo3ri
+rbs3
+r3bu
+r3bÅ­
+2rc2
+r4chan
+r2chă
+rci6sta
+rcum3
+rcumi4
+rcumī4
+rcumí4
+rcÅ­m3
+rcŭmī4
+rcú2m3
+2rd2
+rde4sc
+rdē4sc
+r3di
+rdi4g3
+r3do
+rd4or
+r3du
+rd4ue
+r3dÅ­
+rd4Å­Ä•
+re3a4tr
+re3Ä4tr
+reÄÌ4tr
+re3á4tr
+rec4e
+re5cen
+rec4é
+re5cén
+2red
+re2da2
+red7aman
+re2dÄ
+re4d3ea
+re4d3eÄ
+re4d3eá
+re4d3eo
+re4d3eÅ
+re4d3eó
+re4deú
+re2dē
+re4d3ii
+re4d3iī
+red5iít
+re4d3i4r
+re4diss
+re4dist
+red5i4tÄ
+red5iti
+redi4u
+red5iuer
+red5iué
+red5iui.
+red5iuim
+red5iuin
+red5iuiq
+red5iuis
+red5iuit
+red5iuín
+red5iuíq
+red5iuís
+red5iuít
+re4di4v
+red5iver
+red5ivé
+red5ivi.
+red5ivim
+red5ivin
+red5iviq
+red5ivis
+red5ivit
+red5ivín
+red5ivíq
+red5ivís
+red5ivít
+re4dīm
+re4d3Ä«4r
+re4d3Ä«s
+re4dīt
+red5Ä«4te
+red5Ä«4tÅ
+red5Ä«4tu
+red5ī4tú
+re4d3Ä«4u
+re4d3Ä«4v
+re4dÄ«Ìm
+re4d5Ä«Ì4r
+re4dÄ«Ìs
+red5Ä«Ìss
+red5Ä«Ìst
+re4dÄ«Ìt
+red5Ä«Ì6te
+red5Ä«Ì6tÅ
+red5Ä«Ì6tu
+red5Ä«Ì6ui
+red5Ä«Ì6uÄ«
+red5Ä«Ì6vi
+red5Ä«Ì6vÄ«
+re4d3íe
+re4d3íi
+re4d3í4r
+re4díss
+re4díst
+red5í4to
+redí4tu
+red5í4ui
+red5í4vi
+re4dúl
+re2er
+ree3ri
+ree3rí
+re2es
+3reē
+r1ef
+2r1eg
+reg2l
+re4gn
+re3go
+re3gÅ
+re2ia
+re2iÄ
+re2iá
+re3ic
+re4ien
+re2ii
+re2iī
+re2ií
+re2io
+re2iÅ
+re2ió
+re2iu
+re2iú
+re2Ä«
+2r1el
+re2le
+re2lo
+2remÄ
+2reme
+2remē
+2remé
+re4mic
+4remim
+re4mine
+re4miné
+4remis
+2remī
+4remím
+re4míss
+re4míst
+4remít
+4remo.
+4remoq
+4re4mor
+4remou
+4remov
+4remÅ.
+4remÅq
+4remÅu
+4remÅv
+4remóq
+4remór
+4remóu
+4remóv
+2remp
+2remt
+4remún
+re5nar
+re5nas
+re5nau
+re5nav
+re1o
+re1Å
+repe3r
+r2ere
+r2eri
+re3rin
+re3riu
+re3riv
+3rerī
+r2erí
+re4rn
+re4rq
+2r3err
+re4rv
+re4sa
+re2sá
+re4so
+re2só
+re2sq
+2ress
+res2t
+4rest.
+4reste
+re4ste.
+re6stem.
+re6stemn
+re6stemq
+re6stemue
+re6stemv
+re6s5tene
+re4steq
+re4stes
+re4steu
+re4stev
+re4stēs
+re6stÄ“Ìs
+re6stémn
+re6stémq
+re6stémue
+re6stémv
+re4stés
+4resti
+re4s5ti.
+re6s5tine
+re4s5tiq
+re4stis
+resti5t4
+re4s5tiv
+re4s5tī.
+re6s5tīne
+re4s5tīq
+re4s5tīs
+re4s5tīu
+re4s5tīv
+re6s5tÄ«Ìne
+re6s5tÄ«Ìq
+re6s5tÄ«Ìs
+re6s5tÄ«Ìu
+re6s5tÄ«Ìv
+4restí
+re6s5tíne
+re4s5tíq
+re4stís
+restí5t4
+re4s5tíu
+re4s5tív
+4restn
+4r3esto
+4r3es3tÅ
+4r3estó
+4restq
+4r3estu
+4restv
+re4su.
+r4esue
+re4sum
+re4sun
+re4suq
+re4suu
+re4suv
+re4súm
+re4sún
+re4súq
+re4súu
+re4súv
+rete5re
+2reun
+re4uol
+reu5sum
+reu5sus
+2reún
+re3únc
+re4vol
+2r1ex
+r2exé
+rexi4t
+re4xiu
+re4xiv
+re2x3Ä«4
+rexÄ«Ì4
+rexí4t
+rexí4ui
+rexí4vi
+re2xu
+1rē
+2rēbu
+2rēbŭ
+2rēg
+rē2gr
+rÄ“2iÄ
+rē2iu
+rē2iú
+2r1Ä“2l
+r2Ä“3la
+r2ē3lă
+2rē2me
+rē3men
+4rēmēr
+2rē2mĕ
+rē3mĕn
+4r3ē4mér
+4rē4mic
+4rē4mim
+rē4mine
+rē4minē
+rē4miné
+4rē4mis
+4rēmit.
+4rēmitn
+4rēmitq
+4rēmitu
+4rēmitv
+4rē4mĭc
+4rē4mĭm
+r5ē4mĭnē
+rē4mĭnĕ
+4rē4mĭs
+4rēmĭt.
+4rēmĭtn
+4rēmĭtq
+4rēmĭtu
+4rēmĭtv
+rÄ“4mÄ­Ìn
+4rÄ“4mÄ­Ìt
+4rē4mín
+4rē4mít
+2rē2mo
+2rÄ“2mÅ
+2rē2mó
+2rēmp
+2rēmt
+2rēna
+2rē2nă
+rē3ne
+rēpe3r
+rēpĕ3r
+r2Ä“ri
+2rēro
+2rÄ“rÅ
+2r3Ä“4sa
+2rÄ“2sÄ
+2rē2să
+2rē2sá
+2rēsæ
+2rēsǣ
+2rēsǽ
+r2Ä“sc
+2rē2se
+2r3ē2sĕ
+2rÄ“sÅ
+2rēss
+2rēst
+rēs3tĭ
+r2Ä“2su
+2rēsū
+2rē2sŭ
+2rēsú
+2rēu
+rē2uo
+rÄ“2uÅ
+2rēv
+rē2vo
+rÄ“2vÅ
+rÄ“Ì3b
+rÄ“Ì3ic
+rÄ“Ì3Ä­c
+4rÄ“Ì4le
+4r3Ä“Ì4lÄ•
+r3Ä“ÌlÅ
+4r5Ä“Ì4mer
+4r5Ä“Ì4mÄ•r
+4rÄ“Ì4mim
+rÄ“Ì6mine
+rÄ“Ì6minÄ“
+6rÄ“Ìmit.
+4rÄ“Ì4mÄ­m
+r5Ä“Ì6mÄ­nÄ“
+r5Ä“Ì6mÄ­nÄ•
+6rÄ“ÌmÄ­t.
+4rÄ“Ì4mo
+4r3Ä“Ì4mÅ
+4rÄ“Ìmp
+4rÄ“Ìmt
+rÄ“Ì4nat
+rÄ“Ì4năt
+4r3Ä“Ìro
+4r3Ä“ÌrÅ
+r4Ä“Ìsc
+rÄ“Ì4se
+r3Ä“Ì4sÄ•
+4rÄ“Ìss
+4rÄ“Ìst
+r4Ä“Ìsu
+rÄ“Ì4sÅ­
+4rÄ“Ì4uo
+4r3Ä“Ì4uÅ
+4rÄ“Ì4vo
+4r3Ä“Ì4vÅ
+r4Ä•Än
+r4Ä•Äq
+rÄ•3Ä4tr
+r4Ä•Äu
+r4Ä•Äv
+rÄ•ÄÌ4tr
+rĕ2ă
+r4ĕă.
+r4ĕăq
+r4ĕău
+r4ĕăv
+2rĕd
+rÄ•2dÄ
+rĕ2dá
+rĕ2dē
+rÄ•4d3Ä•Ä
+rĕ4d3ĕă
+rÄ•4d3Ä•Å
+rĕ4dīm
+rĕ4d3ī4r
+rĕ4d3īs
+rĕ4dīt
+rĕd5ī4tĕ
+rÄ•d5Ä«4tÅ
+rĕd5ī4tŭ
+rĕ4d3ī4u
+rĕ4d3ī4v
+rÄ•4dÄ«Ìm
+rÄ•4d5Ä«Ì4r
+rÄ•4dÄ«Ìs
+rÄ•d5Ä«Ìss
+rÄ•d5Ä«Ìst
+rÄ•4dÄ«Ìt
+rÄ•d5Ä«Ì6tÄ•
+rÄ•d5Ä«Ì6tÅ
+rÄ•d5Ä«Ì6tÅ­
+rÄ•d5Ä«Ì6uÄ«
+rÄ•d5Ä«Ì6uÄ­
+rÄ•d5Ä«Ì6vÄ«
+rÄ•d5Ä«Ì6vÄ­
+rĕ4d3ĭ4c
+rĕd5ĭĕr
+rĕ4d3ĭī
+rĕ4d3ĭĭ
+rÄ•d5Ä­tÄ
+rĕd5ĭtă
+rÄ•4d5Ä­ÌÄ•
+rÄ•4d5Ä­ÌÄ­
+rÄ•4dÄ­Ìt
+3rĕē
+r1Ä•f
+2r1Ä•g2
+rÄ•3gÅ
+rĕ2ī
+rĕ2ĭĕ
+2rÄ•mÄ
+2rĕmē
+2rĕmĕ
+2rĕmī
+2rĕmĭ
+4r3ĕmnē
+4r3ĕmnī
+4r3Ä•mnÄ­
+2rÄ•mÅ
+2rĕmŭ
+rĕ5nĕ.
+2r3Ä•nn
+rÄ•1Å
+r2Ä•q
+rĕ5quĕ
+r2Ä•r
+rĕ3r4ĕ
+2r3Ä•rr
+2r3Ä•rÅ­
+rĕ1s
+rĕs3cĭ
+rĕs2p
+rĕs2t
+r2Ä•t
+rĕ5uĕ.
+2rĕŭ
+rĕ5vĕ.
+2r1Ä•2x3
+rĕ4xă
+rĕxī4
+rÄ•xÄ«Ì4
+2rÄ•Ìd
+rÄ•Ì4d5Ä•Ä
+rÄ•Ì4d5ĕă
+rÄ•Ì4d5Ä•Å
+rÄ•Ì4d3Ä«
+rÄ•Ì4d5Ä­Ä«
+rÄ•Ì4d5Ä­Ä­
+2rÄ•Ìf
+4rÄ•ÌmÄ•
+4rÄ•ÌmÄ­
+4r5Ä•ÌmnÄ“
+4r5Ä•ÌmnÄ«
+4r5Ä•ÌmnÄ­
+4r5Ä•ÌnnÄ
+4r5Ä•Ìnnă
+4r5Ä•ÌnnÄ“
+4r5Ä•ÌnnÄ•
+4r5Ä•ÌnnÄ«
+4r5Ä•ÌnnÅ
+2r3Ä•Ì2q
+4r3Ä•Ìrr
+rÄ•Ì3sp
+rÄ•Ì5s4tÄ
+rÄ•Ì5s4tă
+rÄ•Ì5s6tÄ•nt
+rÄ•Ì5s6tÄ•t
+rÄ•Ì5strÅ­
+2r3Ä•Ì2x3
+1ré
+2réd
+ré4d3ea
+ré4d3eÄ
+ré4d3eo
+ré4d3eÅ
+ré4d3iī
+ré2d3ī
+ré2e
+2r1éf
+2ré2le
+2ré2lo
+4rémer
+4rémic
+4rémim
+4r5é4mine
+4rémit.
+4rémiti
+4rémito
+4rémitÅ
+4rémitu
+4r3émnē
+4r3émni
+4r3émnī
+2rémo
+ré4mor
+2rémp
+2rémt
+ré4nat
+4r3énna
+4r3énnÄ
+4rénne
+4r3énnē
+4r3énnī
+4r3énno
+4r3énnÅ
+4réqui
+r2ér
+2réro
+2r3érr
+ré2ru
+2ré4sa
+2résæ
+4ré4se.
+2réso
+ré3sp
+2réss
+ré3s4ta
+ré3s4tÄ
+4réste
+ré5s6tent
+ré5s4tet
+4résti
+ré5stit
+4réstn
+4r3ésto
+4r3éstÅ
+4réstq
+rés4tru
+4r3éstu
+4réstv
+r2é2su
+4résu.
+4résum
+4résus
+2r3é2uo
+2r3é2vo
+ré4xeu
+ré4xiē
+ré4x3is
+ré2xī
+ré2xu
2rf
-2rg
-r2h
-2rl
-2rm
-2rn
+2rg2
+r3ge
+r3gĕ
+r1h
+r2hy
+r2hý
+ri2a
+r2ia.
+r2iae
+r2iam
+r2ian
+r2iaq
+r2iar
+r2ias
+r2iat
+ri3atr
+r2iau
+r2iav
+r2iaÍž
+r2ia͡
+r2iÄ
+2riă
+r2iáe
+r2iám
+r2ián
+r2iár
+r2iás
+r2iát
+ri3átr
+r2iáu
+r2iáv
+r2iæ
+r2iǣ
+r2iǽ
+2ribe
+2ribē
+ri4bē.
+3riboe
+3riboē
+3riboé
+ri5bus
+ri5bús
+ri4cie
+ri4ciē
+ri4cié
+ri4cim
+ri4cio
+ri4ciÅ
+ri4ció
+4ricit
+r3i4cím
+r3i4cít
+3ricl
+r2icu
+r2icú
+2rido
+ri4don
+2ridÅ
+ri4dÅn
+2ridó
+r2ieb
+3riei
+3rieí
+r2iem
+r2ien
+ri3enn
+r2ies
+r2iet
+r2iēb
+3riēī
+r2iēm
+r4iēri
+r4iērí
+r2iēs
+r2iēt
+r4iÄ“Ìb
+r4iÄ“Ìm
+r4iÄ“Ìne
+r4iÄ“Ìq
+r4iÄ“Ìri
+r4iÄ“Ìs
+r4iÄ“Ìt
+r4iÄ“Ìu
+r4iÄ“Ìv
+2riĕ
+r2iéb
+3riéi
+r2iém
+r2ién
+ri3énn
+r4iéris
+r2iés
+r2iét
+ri3ga
+ri3gæ
+ri3gǣ
+ri4g3n
+r4iis.
+r4iisn
+r4iisq
+r4iisu
+r4iisv
+r2iīs
+r4iÄ«Ìs
+r4iísn
+r4iísq
+r4iísu
+r4iísv
+2rij
+r1il
+3rile
+3rilé
+5rille.
+5rillen
+5rilleq
+5rilli.
+5rilliq
+5rillis
+5rilliu
+5rilliv
+3rillī
+5rillíq
+5rillís
+5rillíu
+5rillív
+3rillo
+3rillÅ
+3rilló
+5rillum
+5rillus.
+5rillusn
+5rillusq
+5rillusu
+5rillusv
+5rillúm
+5rillúsn
+5rillúsq
+5rillúsu
+5rillúsv
+3rim.
+3rimed
+3rimel
+5rimetr
+3rimēd
+3rimēl
+5rimÄ“Ìd
+5rimÄ“Ìl
+3ri5méd
+3ri5mél
+5rimétr
+ri3min
+3rimn
+3rimq
+4rimun
+ri3mur
+r4i3mus
+r2imú
+ri3múr
+ri3mús
+3rimv
+ri2ni
+rin3ic
+ri2n3Ä«2
+rinÄ«Ì4
+ri4n3í4c
+r3inq
+rinte5r6
+rinteri5
+rinterī5n
+rinterī5q
+rinterī5u
+rinterī5v
+rinterÄ«Ì5
+rinterí5u
+rinterí5v
+3rinth
+ri2nu
+ri4nún
+r2i2o
+r2iÅ
+r2ió
+r2ip
+ri3pi
+r2iq
+ri2ra
+ri2rá
+ri3r4e
+rir6emi
+ri3r4Ä“
+ri5rē5m
+3rirrh
+1r2is
+ri3sa
+ri4sat
+ri3sá
+ri4sát
+ri4s3p
+ris5pe
+ris5pé
+ris5ti
+ri6stri
+ri4sui
+ri4suí
+r2ita
+r4itÄt
+r2itá
+r4i5ter
+r2ité
+ri5tér
+3rith
+r2iti
+3ritia
+3ritiá
+3ritiæ
+3ritiǽ
+3ritii
+3ritií
+5ritior
+r5itiÅ.
+r5itiÅn
+r5itiÅq
+r5itiÅu
+r5itiÅv
+5ritiór
+5ritiss
+5ritius
+3ritiú
+r2ití
+3ritía
+5ritíss
+ri5tÅt
+3ritt
+r4itue
+r4iue.
+2riug
+r4ium.
+r4iumn
+r4iumq
+r4iumu
+r4iumv
+r4iunt
+r2ius
+2riÅ­
+r4iúnt
+r2iús
+r4ive.
+rÄ«3Ät
+2rīb
+rÄ«4c5Ä•Ìn
+rī4cén
+2rīg
+r2Ä«m
+rīmi3
+r2Ä«ne
+r4īnĕ
+r2Ä«q
+2r3Ä«2rÄ
+r2Ä«s.
+r2Ä«sn
+r2Ä«sq
+r2Ä«su
+r2Ä«sv
+r2Ä«t
+r2Ä«u
+r4Ä«ue.
+r4īuĕ.
+r4Ä«us
+r2Ä«v
+r4Ä«ve.
+r4īvĕ.
+2rÄ«Ìb
+rÄ«Ì3d
+r2Ä«Ìm
+r4Ä«Ìne
+r4Ä«ÌnÄ•
+r2Ä«Ìq
+r2Ä«Ìt
+r4Ä«ÌuÄ•.
+r4Ä«ÌvÄ•.
+1rÄ­
+rĭ4bē.
+r2Ä­c
+rĭ3cē
+rĭ3cĕ
+rĭ3cī
+2rÄ­cÄ­
+rĭ4cĭă
+rÄ­4cÄ­Ä“
+rÄ­4cÄ­Ä•
+rÄ­4cÄ­m
+rÄ­4cÄ­Å
+rÄ­4cÄ­Å
+rÄ­4cÄ­Å­
+rÄ­3cÅ­
+2rĭdă
+2rÄ­dÅ
+rÄ­4dÅn
+r2Ä­Ä“
+r4Ä­Ä“.
+r4Ä­Ä“q
+r4Ä­Ä“u
+r4Ä­Ä“v
+r2Ä­Ä•
+r4Ä­Ä•.
+r4Ä­Ä•n
+rÄ­3Ä•nn
+r4Ä­Ä•q
+r4Ä­Ä•u
+r4Ä­Ä•v
+rÄ­5Ä•Ìnn
+rÄ­3ga
+rĭ3gæ
+rĭ3gǣ
+2rÄ­i
+2r1Ä­Ä­
+2rÄ­j
+2r1Ä­l
+3rÄ­le
+3rĭlé
+3rĭllĕ
+3rĭllī
+3rÄ­llÅ
+3rÄ­llÅ­
+4rĭmăr
+4rĭmăt
+2r3Ä­mb
+4rĭmēb
+4rĭmēm
+4rĭmēr
+4rĭmēs
+4rĭmēt
+4rÄ­mÄ“Ìb
+4rÄ­mÄ“Ìm
+4rÄ­mÄ“Ìr
+4rÄ­mÄ“Ìs
+4rÄ­mÄ“Ìt
+4rĭmĕt
+5rĭmĕtr
+5rÄ­mÄ•Ìtr
+4rÄ­mÄ­m
+4rÄ­mÄ­s
+4rÄ­mÄ­t
+4rÄ­mÄ­Ì
+2rÄ­mm
+2rÄ­mÅ
+2rÄ­mp
+4rÄ­mÅ­n
+4rÄ­mÅ­Ìn
+rÄ­2n1
+rÄ­3nÄ
+2r3Ä­nc
+2r3Ä­nd
+2rÄ­ni
+2r3ĭnī4
+rÄ­nÄ«Ì4
+2r3Ä­nÄ­
+rÄ­nÄ­Ì4
+2rÄ­nj
+2r3Ä­nq
+rĭntĕ5r
+rĭntĕrĕ5r
+rĭntĕrī5n
+rĭntĕrī5q
+rĭntĕrī5u
+rĭntĕrī5v
+rÄ­ntÄ•rÄ«Ì5
+5rÄ­nth
+2rÄ­nu
+2rÄ­nÅ­
+2rÄ­nv
+rÄ­2Å
+2rĭpē
+2r1Ä­r
+rÄ­3r4Ä“
+rĭ5rē5m
+3rÄ­rrh
+rĭ3s4ă
+rÄ­4sp
+rĭs5pĕ
+rÄ­s5tÄ­
+rÄ­5strÅ
+r2Ä­t
+4r5Ä­4tÄ­Å.
+4r5Ä­4tÄ­Ån
+4r5Ä­4tÄ­Åq
+4r5Ä­4tÄ­Åu
+4r5Ä­4tÄ­Åv
+2rÄ­u
+2rÄ­v
+r2Ä­Ìc
+rÄ­Ì3cÄ•
+4r5Ä­Ì4cÄ•r
+4rÄ­ÌcÄ­
+rÄ­Ì4cÄ­Ä
+rÄ­Ì4cĭă
+rÄ­Ì4cÄ­Ä“
+rÄ­Ì4cÄ­Ä•
+rÄ­Ì4cÄ­m
+rÄ­Ì4cÄ­Å
+rÄ­Ì4cÄ­Å
+rÄ­Ì4cÄ­Å­
+4rÄ­ÌmÄ•r
+4rÄ­ÌmÄ­m
+4rÄ­ÌmÄ­t
+rÄ­Ì2n
+r3Ä­Ìnc
+4r3Ä­Ìnd3
+r3Ä­Ìn3Ä­4
+2r3Ä­Ìr
+r4Ä­Ìs
+4r5Ä­Ì4tÄ­Å
+1rí
+2ríb
+4r3í4cer
+2ríci
+rí5ci.
+rí4ciÄ
+rí4ciē
+rí4cim
+rí4cio
+rí4ciÅ
+rí5cis
+r2ícu
+rí3d
+2rída
+rí3ga
+rí4g3n
+2ríj
+4rílli
+4rímer
+4rímim
+rí3min
+4rímit
+2rímm
+r2ímu
+2rínc
+2rín2d3
+4rí4n3i4c
+2rínj
+2ríns
+4rínte
+r2íq
+2rírr
+rís3t
+rí4sui
+r2ít
+4rítio.
+4r3í4tiÅ
+rí2xu
+2rj
+2rl2
+r3lu
+2r1m2
+rmĭ2ă
+rmí5tur
+2r1n2
+r3ne
+rne3g
+r3nĕ
+rnĕ3g
+rn4i3m
+rn4Ä­3m
+rní5ci
+1ro.
+ro3áq
+rob2a
+rob2e
+rob2Ä“
+rob2é
+ro3b2i
+rob2Ä«
+rob2í
+ro3b2o3
+rob2ó
+rob3r
+r1oc
+ro2da
+ro4deo
+ro4d5e4ra
+ro4d5e4rá
+rod5e6rim
+rod5e6rit
+rod5e6rít
+ro4d5e4ro
+ro4d5e4ró
+ro4d5e4ru
+ro4d5e4rú
+rod5est
+ro6d5é6rim
+ro6d5é6rit
+rod5ést
+ro4d3ie
+ro4d3ié
+ro4d3ii
+ro4d3ií
+ro4dio
+ro4diÅ
+ro4dió
+ro4d3i4r
+rod5iss
+rod5ist
+ro4d3i4u
+ro4d3i4v
+ro4d3íe
+ro4d3íi
+ro4d5í4mu
+ro4d3í4r
+rod5íss
+rod5íst
+rod5í6te.
+ro6d5í6tis
+ro4d5í4to
+rodí4tu
+rod5ítur
+rod5í4ui
+rod5í4vi
+ro4em
+ro4en
+ro3eo
+ro3eÅ
+ro3eó
+ro4eq
+ro4es
+ro4ev
+ro2Ä“
+ro2é
+ro4ia.
+ro4iae
+ro4iam
+ro6iane.
+ro4iaq
+ro4iar
+ro4ias
+ro4iau
+ro4iav
+ro4ia͡
+ro4iáe
+ro4iám
+ro6iáne.
+ro4iár
+ro4iás
+ro4iáu
+ro4iáv
+ro2iæ
+ro2iǽ
+ro4iis.
+ro4iisn
+ro4iisq
+ro4iisu
+ro4iisv
+ro3iī
+ro4iísn
+ro4iísq
+ro4iísu
+ro4iísv
+ro3it
+ro4ium
+ro4ius
+ro4iús
+roī4n
+roī2q
+roÄ«Ì4n
+roÄ«Ì4q
+roí2t
+roí2u
+roí2v
+2r1ol
+ro2le
+ro2lē
+ro2lé
+ro4li.
+ro4lin
+ro4liq
+ro4lis
+ro4liu
+ro4liú
+ro4liv
+ro2lí
+ro2l4u
+ro2lú
+r2on
+ro3ni
+rons3
+ro2pe3
+ro2pé
+1roq
+ro2ra
+ro2rá
+r3ord
+ro4rer
+ro4ret
+ro4rén
+ro4rér
+ro4rét
+ro4ro.
+ro4ron
+ro4roq
+ro4ror
+ro4rou
+ro4rov
+ro4rón
+ro4róq
+ro4rór
+ro4róu
+ro4róv
+r2os
+ro3s2c
+ro2s3m
+ro3só
+ro3s2t
+ro4s3ui
+ro4s3uí
+1rou
+1rov
+1roÍž
+1ro͡
+rÅ4d5e4ra
+rÅ4d5e4rÄ
+rÅ4d5e4rá
+rÅd5e6rim
+rÅd5e6rit
+rÅd5e6rít
+rÅ4d5e4rÅ
+rÅ4d5Ä•4rÄ
+rÅ4d5Ä•4ră
+rÅd5Ä•6rÄ­m
+rÅd5Ä•6rÄ­t
+rÅd5Ä•rÄ­Ìt
+rÅ4d5Ä•4rÅ
+rÅ6d5Ä•Ì6rÄ­
+rÅ4d5é4ri
+rÅ4d3ie
+rÅ4d3iÄ“
+rÅ4d3ié
+rÅ4d3ii
+rÅ4d3iÄ«
+rÅ4d3ií
+rÅ4d3Ä«4m
+rÅ4d3Ä«4r
+rÅ4d3Ä«s
+rÅ4d5Ä«4te
+rÅ4d5Ä«4tÄ•
+rÅ6d5Ä«6tis
+rÅ6d5Ä«6tÄ­s
+rÅ6d5Ä«6tÄ­Ìs
+rÅ6d5Ä«6tís
+rÅ4d5Ä«4tÅ
+rÅ4d5Ä«4tu
+rÅ4d5Ä«4tÅ­
+rÅ4d5Ä«4tú
+rÅ4d3Ä«4u
+rÅ4d3Ä«4v
+rÅ4d5Ä«Ì4m
+rÅ4d5Ä«Ì4r
+rÅd5Ä«Ìss
+rÅd5Ä«Ìst
+rÅ6d5Ä«Ì6te
+rÅ6d5Ä«Ì6tÄ•
+rÅ6d5Ä«Ì6tis
+rÅ6d5Ä«Ì6tÄ­s
+rÅ6d5Ä«Ì6tÅ
+rÅ6d5Ä«Ì6tu
+rÅ6d5Ä«Ì6tÅ­
+rÅd5Ä«Ì6ui
+rÅd5Ä«Ì6uÄ«
+rÅd5Ä«Ì6uÄ­
+rÅd5Ä«Ì6vi
+rÅd5Ä«Ì6vÄ«
+rÅd5Ä«Ì6vÄ­
+rÅ4d3Ä­Ä“
+rÅ4d3Ä­Ä•
+rÅ4d3Ä­Ä«
+rÅ4d3Ä­Ä­
+rÅ4d5Ä­ÌÄ•
+rÅ4d5Ä­ÌÄ­
+rÅ4d3íe
+rÅ4d3íi
+rÅ4ia.
+rÅ4iae.
+rÅ6iaene
+rÅ6iaeque
+rÅ6iaeue
+rÅ6iaeve
+rÅ4iam
+rÅ4ian
+rÅ4iaq
+rÅ4iau
+rÅ4iav
+rÅ6iaÍže.
+rÅ6iaÍžene
+rÅ6iaÍžeque
+rÅ6iaÍžeue
+rÅ6iaÍževe
+rÅ6iaÍžÌene
+rÅ6iaÍžÌeque
+rÅ6iaÍžÌeue
+rÅ6iaÍžÌeve
+rÅ6iaÍ¡e.
+rÅ6iaÍ¡ene
+rÅ6iaÍ¡eque
+rÅ6iaÍ¡eue
+rÅ6iaÍ¡eve
+rÅ6iaÍ¡Ìene
+rÅ6iaÍ¡Ìeque
+rÅ6iaÍ¡Ìeue
+rÅ6iaÍ¡Ìeve
+rÅ4iÄ.
+rÅ6iÄne.
+rÅ6iÄque
+rÅ4iÄru
+rÅ4iÄrú
+rÅ4iÄs.
+rÅ6iÄsne
+rÅ6iÄsque
+rÅ6iÄsue
+rÅ6iÄsve
+rÅ4iÄue
+rÅ4iÄve
+rÅ6iÄÌne.
+rÅ6iÄÌque
+rÅ6iÄÌru
+rÅ6iÄÌsne
+rÅ6iÄÌsque
+rÅ6iÄÌsue
+rÅ6iÄÌsve
+rÅ6iÄÌue
+rÅ6iÄÌve
+rÅ6iáene
+rÅ6iáeque
+rÅ6iáeue
+rÅ6iáeve
+rÅ4iám
+rÅ4iæ.
+rÅ4iæne
+rÅ6iæque
+rÅ4iæue
+rÅ4iæve
+rÅ4iÇ£.
+rÅ4iÇ£ne
+rÅ6iÇ£que
+rÅ4iÇ£ue
+rÅ4iÇ£ve
+rÅ6iÇ£Ìne
+rÅ6iÇ£Ìque
+rÅ6iÇ£Ìue
+rÅ6iÇ£Ìve
+rÅ4iǽne
+rÅ6iǽque
+rÅ4iǽue
+rÅ4iǽve
+rÅ4iÄ«.
+rÅ4iÄ«n
+rÅ4iÄ«q
+rÅ4iÄ«s.
+rÅ6iÄ«sne
+rÅ6iÄ«sque
+rÅ6iÄ«sue
+rÅ6iÄ«sve
+rÅ4iÄ«u
+rÅ4iÄ«v
+rÅ4iÄ«Ìn
+rÅ4iÄ«Ìq
+rÅ6iÄ«Ìsne
+rÅ6iÄ«Ìsque
+rÅ6iÄ«Ìsue
+rÅ6iÄ«Ìsve
+rÅ4iÄ«Ìu
+rÅ4iÄ«Ìv
+rÅ2iÅ
+rÅ4ium
+rÅ4ius
+rÅ4iús
+rÅ2le
+rÅ2lÄ“
+rÅ2lÄ•
+rÅ2lé
+rÅ4lis
+rÅ4liu
+rÅ4liú
+rÅ2lÄ«
+rÅ4lÄ­s
+rÅ4lÄ­Å­
+rÅ4lÄ­Ì
+rÅ2lí
+r2Ån
+rÅ2ra
+r3Å2rÄ
+r3Å2ră
+rÅ2rá
+2rÅrd
+rÅ4rer
+rÅ4ret
+rÅ4rÄ“m
+rÅ4rÄ“r
+rÅ4rÄ“t
+rÅ4rÄ•r
+rÅ4rÄ•t
+rÅ4rén
+rÅ4rér
+rÅ4rét
+rÅ2ro
+rÅ4rÅ.
+rÅ4rÅn
+rÅ4rÅq
+rÅ4rÅu
+rÅ4rÅv
+r3Å2rÅ
+rÅ2ró
+2rÅs2c
+2rÅt
+rÅÌ6d5e6ra
+rÅÌ6d5e6rÄ
+rÅÌd5e6rit
+rÅÌ6d5e6rÅ
+rÅÌ6d5Ä•6rÄ
+rÅÌ6d5Ä•6ră
+rÅÌd5Ä•6rÄ­t
+rÅÌ6d5Ä•6rÅ
+rÅÌ4d5iÄ“
+rÅÌ4d5ii
+rÅÌ4d5iÄ«
+rÅÌ4d5Ä­Ä“
+rÅÌ4d5Ä­Ä«
+rÅÌ4d5Ä­Ä­
+rÅÌ2l
+rÅÌ4lÄ•
+r3ÅÌ4ra
+r3ÅÌ4rÄ
+r3ÅÌ4ră
+4rÅÌrd
+rÅÌ4rer
+rÅÌ4ret
+rÅÌ4rÄ•r
+rÅÌ4rÄ•t
+r3ÅÌ4ro
+r3ÅÌ4rÅ
+r3ÅÌ4rÅ
+4rÅÌsc
+rÅÌ5stÄ­
+2rÅÌt
+rÅb2Ä“
+rÅb2Ä•
+rÅb2Ä«
+rÅb2Å
+rÅ2bÅ­
+r1Åc
+r1Åd
+rÅ2dÄ­
+rÅ2Ä“
+rÅÄ«2n
+rÅÄ«4q
+rÅÄ«Ì4n
+rÅÄ«Ì4q
+rÅ3Ä­2
+rÅÄ­Ì4
+2r1Ål
+rÅ2lÄ“
+rÅ2lÄ•
+rÅ2lÅ­
+rÅm2Ä•
+r2Ån
+rÅ2pÅ­
+1r2År
+r2Ås
+r2ÅÌ
+rÅÌ3Ä­
+rÅÌ4lÄ•
+rÅÌ4lÅ­
+rÅÌm2
+4rÅÌt
+1ró
+rób2e
+2rócc
+ró4d5e4ra
+ród5e6rit
+ró4d5e4ro
+ró4d3ie
+ró4d3ii
+ró3eo
+ró3eÅ
+ró3iī
+ró3in
+ró4ium
+ró4ius
+2ról2
+ró2le
+ró4li.
+ró4lis
+ró4liu
+ró3m
+róm4e
+ró1r
+2ró2ra
+2r3órd
+ró4rer
+ró4ret
+4rórna
+4rórno
+2ró2ro
+2ró3sc
+ró3sta
+ró3ste
+ró3sti
+ró3sto
+rós3ue
+ró4sui
+2rót
+1rœ
+rœ̄3d
2rp
+rpe2i
+rpe3r
+rper4e
+rper4Ä“
+rpĕ3ră
+rpĕ3rĕ
+rpo1
2rq
-2r3r
-2rs
+r3qu
+2r1r2
+rra3d4
+r3ră
+r3re
+rre2o
+rre3r
+rres3t
+rrex2
+rre5xi
+r3rē
+r3rĕ
+rrĕ4s3t
+rr4Ä•Ì
+rrÄ•Ì3q
+r3ru
+2r1s2
+r3se
+rsed4
+rse5di
+rse2i
+rsēd4
+rsē5di
+rsē5dĭ
+rsē2i
+r3sĕ
+r3si
+rs4ig
+rsĭ3gĕ
+r2s3q
+r3st
+r2s3ue
+r2s3uĕ
2rt
-2rz
-2r.
-2r1x
-.r2
-1s
-2s3s
-2sb
-2sc
+r3ta
+rta3g
+r3tÄ
+rte3r
+rte5re
+rtĕ3rĕ
+r3ti
+r3tī
+rtran4
+rtrÄn4
+rtrÄns5
+rua6ste
+ruÄ6ste
+ruÄ6stÄ•
+2r1uă
+2ruæ
+2r1uǣ
+2ruǽ
+ru3b2
+rubī3q
+rubÄ«Ì3
+2ru3d
+r1ue
+4rue.
+r4uera
+r4uerÄ
+r4uerá
+r4ueri
+r4uerī
+r4uerí
+r4uero
+r4uerÅ
+r4ueró
+r4ueru
+r4uerú
+ruete5
+r4uēru
+r4uērú
+2r3uĕ
+ru4gn
+r1ui
+rui4g3n
+r2uim
+r4uiss
+r4uist
+r2uit
+r1uī
+2ruīs
+r4uīv
+2r1uÄ­
+ruí4g3n
+r2uíq
+r4uíss
+r4uíst
+r2uít
+1r2ul
+1r2um
+rum2e
+ru3m2Ä«
+ruol6uere.
+ruol6uerene
+ruol6uereq
+ruol6uereu
+ruol6uēre
+ruol6uēru
+ruol6uērú
+ruol6uÄ“Ìre
+ruol6uÄ“Ìru
+ruol6uit.
+ruol6uitn
+ruol6uitq
+ruol6uitue
+2ruÅ
+ruól6ui.
+ruól6uit.
+ruól4uī
+rupe3r
+ruperi5mus
+ruperi5mú
+ruperi5ti
+ruperi5tí
+r1u2r
+ru4rs
+1rus
+ru2sp
+2russ
+2rust
+4rusur
+2rusú
+ru2tr
+ru3tu
+r1uu
+2ruÅ­
+ru2xu
+rū3d
+r1Å«n
+r1Å«r
+rū2ra
+rÅ«2rÄ
+rū2ră
+rū2rá
+rū2rē
+rū2rī
+rū2ro
+rÅ«2rÅ
+rÅ«2rÅ
+rū2ró
+rū2ru
+rū2rŭ
+rū2rú
+rū4sp
+rū2ti
+rū2tĭ
+rū2tí
+rū3tu
+rū2xu
+r4Å«Ìg
+rÅ«Ì4ra
+rÅ«Ì4rÄ
+rÅ«Ì4ră
+rÅ«Ì4re
+rÅ«Ì4rÄ“
+rÅ«Ì4rÄ•
+rÅ«Ì4rÄ«
+rÅ«Ì4ro
+rÅ«Ì4rÅ
+rÅ«Ì4rÅ
+rÅ«Ì4ru
+rÅ«Ì4rÅ­
+rÅ­b2
+rŭ3bī
+rÅ­2bÄ­
+2rÅ­d
+1rÅ­l
+r2Å­m
+rŭ3mă
+rÅ­m2Ä•
+rÅ­3m2Ä«
+r3Å­nd
+r3Å­ng
+r1Å­r
+3rŭsī
+3rÅ­sÄ­
+rÅ­s2p
+rŭ4tĕr
+2rÅ­tr
+r2Å­Ì
+rÅ­Ì3b
+r3Å­Ìng
+r3Å­Ìr
+3rÅ­ÌsÄ­
+rÅ­Ì3sp
+1rú
+r2úe
+rú4gn
+r2úi
+r2úl
+r2úm
+2rúnc
+2rúng
+2rúnx
+2r1úr
+rú2ra
+rú2re
+rú2ro
+r2úsi
+r2úsq
+2rúss
+2rúst
+rú2tr
+rú2xu
+2rv2
+rva6ste
+rvÄ6ste
+rvÄ6stÄ•
+r3ve
+rvete5
+r3vĕ
+rvi4g3n
+rví4g3n
+2r2x
+1sa
+2saa
+sab4a
+sab3ea
+sab3eÄ
+sab3eá
+sab3eo
+sab3eÅ
+sab3eó
+sab3iī
+sab3i4n
+sab3i4q
+sabi4te
+sabi4to
+sabi4tó
+sabi4u
+sabi4v
+sa2bī4
+sabÄ«Ì4
+sab3í4n
+sab3í4q
+sabí4t
+sab3í4u
+sab3í4v
+sab2o
+s1ac
+sa2ci
+2s1a2d3
+sa3do
+s2ae
+sa2i
+sali4g5
+salí4g3
+s3alp
+sa2l3u
+s2am
+sa3ma
+3s2an
+s2a3q
+s2ar
+sa3re
+s2as
+sa4tro
+sa4tró
+sa4tru
+sa4trú
+s4aue
+s3aus
+s4aÍže
+s4aÍžÌ
+s4a͡e
+s4aÍ¡Ì
+1sÄ
+sÄ5bun
+2s1Äc
+sÄ2i
+2s3ÄÌc
+sÄÌ4tr
+1să
+2săă
+2s1ăb
+săb2ă
+să2bĕ
+să2bī4
+săbÄ«Ì4
+să2b3ĭ
+s1ăc
+să2cĭ
+2s1ă2d3
+să3g
+s3ălp
+să3rĕ
+săÌb3Ä•
+săÌb3Ä­
+s3ăÌd
+1sá
+sá4b3ea
+sáb3eÄ
+sá4b3eo
+sáb3eÅ
+sá4bi.
+2sá2bī
+2s1ác
+2s1á2d1
+s2áe
+sá2lu
+s2ám
+s2án
+s2ár
+s3átr
+sá4tri
+sá4tro
+sá4tru
+s2áu
+1s2æ
+sæ2a
+sæ2ă
+sæ2á
+sæ2i
+sæ2ŭ
+1sǣ
+sǣ2a
+sǣ2ă
+sǣ2ŭ
+1s2ǽ
+2sb2
+s3bi
+sbī3u
+sbī3v
+s3bu
+s3bÅ­
+2scam
+2scas
+2scÄ
+2scám
+2scás
+1s2cæ
+1s2cǣ
+2sce.
+2sceb
+2scem
+s6ce6naria.
+s6ce6narian
+s6ce6nariaq
+s6ce6nariau
+s6ce6nariav
+s6ce6narium
+s6ce6nariúm
+s6ce6naría
+s6ce6nária.
+s6ce6nárium
+s6cendamus
+s6cendamú
+s6cendant
+s6cendat
+s6cendámus
+s6cendánt
+s6cendát
+s6cendeb
+s6cendem
+s6cender
+s6cendes
+s6cendet
+s4cendē
+s4cendé
+s6cendim
+5s6cendiss
+5s6cendist
+s6cendit
+s6cendím
+5s6cendíss
+5s6cendíst
+s6cendít
+s6cendun
+s6cendún
+s4c5enna
+s4c5enná
+6scens.
+6scensn
+6scensq
+6s7censue
+6scensv
+2sceq
+2scer
+2sces
+2scet
+2sceu
+2scev
+2scēb
+2scēm
+s6cÄ“6nÄria.
+s6cÄ“6nÄrian
+s6cÄ“6nÄriaq
+s6cÄ“6nÄriau
+s6cÄ“6nÄriav
+s6cÄ“6nÄrium
+s6cÄ“6nÄriúm
+s6cÄ“6nÄrĭă.
+s6cÄ“6nÄrĭăn
+s6cÄ“6nÄrĭăq
+s6cÄ“6nÄrĭău
+s6cÄ“6nÄrĭăv
+s6cÄ“6nÄrÄ­Å­m
+s6cÄ“6nÄrÄ­Å­Ìm
+s6cÄ“6nÄrÄ­Ìă
+s6cÄ“6nÄría
+s6cÄ“6nÄÌria.
+s6cÄ“6nÄÌrium
+s6cÄ“6nÄÌrĭă.
+s6cÄ“6nÄÌrÄ­Å­m
+2scēs
+2scēt
+2scĕ.
+2scĕq
+2scĕr
+2scĕt
+2s3cĕu
+2s3cĕv
+2scéb
+2scém
+s6céndant
+s6céndar
+s6céndat
+s6céndens
+s6céndent
+s6cénder
+s6céndes
+s6céndet
+s4céndē
+s6céndim
+s6céndit
+s6céndor
+s6céndun
+2scér
+2scés
+2scét
+2s3ch
+3s4cho
+3s4chÅ
+3s2cia
+3s2ciÄ
+s2ciá
+3s2ciǣ
+3scid
+5s6ciderÄ
+5s6ciderī
+5s6ciderÅ
+5s4cidē
+s7cidis.
+s7cidisn
+s7cidisq
+5scidissē
+5scidistī
+s7cidisu
+s7cidisv
+5s4cidī
+5scidíssē
+5scidístī
+3s2cie
+3s2ciē
+s2cié
+3s2cii
+3s2ciī
+s2cií
+3scind
+3s2cio
+3s2ciÅ
+s2ció
+s2cir
+4scisa
+4scisá
+4scisæ
+4scisǽ
+4scise
+4scisé
+4scisi
+4scisí
+4sciso
+4scisó
+4scisu
+4scisú
+s4citæ
+s4citǽ
+s2ciu
+s2ciú
+s2civ
+2scīd
+s2cīm
+s2cīr
+s2cīt
+s2cīu
+s2cīv
+3s2cÄ­Ä
+3s2cĭă
+3s2cÄ­Ç£
+3s2cÄ­d
+3s2cÄ­Ä“
+3s2cÄ­Ä•
+3s2cÄ­Ä«
+3s2cÄ­Ä­
+3scÄ­nd
+3s2cÄ­Å
+3s2cÄ­Å
+4s5cÄ­s.
+4s5cÄ­sn
+4s5cÄ­sq
+4s5cÄ­su
+4s5cÄ­sv
+3s2cÄ­Å­
+3s4cÄ­Ìd
+5scÄ­Ìnd
+s2cía
+3scíd
+5s6cíderÄ
+5s6cíderī
+5s6cíderÅ
+s2cíe
+s2cíi
+s4címu
+3scínd
+s2cír
+4scísa
+4scísæ
+4scíse
+4scísi
+4scíso
+s4cíta
+s4cítæ
+s4cíti
+s4cíto
+s4cíui
+s4cívi
+2s3c2o
+sco3p
+2scÅ
+2sc2Å
+scÅ3p
+2s3có
+2s3cœ
+3s4crib
+3scrip
+s5cris
+3scrīb
+3scrīp
+s3crīs
+5scrÄ«Ìb
+5scrÄ«Ìp
+s5crÄ«Ìs
+s2crí
+3scríb
+3scríp
+s3crís
+2scun
+s2cū
+2scún
2sd
-2sf
-2sg
-s2l
-2sm
-2sn
-s2r
-2sp
-2sq
-2st
-3s2th
-3s2ph
-3s2ch
-2s2t3l
-2s3tn
-2st3p
-2s2t3q
-2s2t3s
-2s2t3t
-2s.
+sde3d
+sde2s
+sdē2s
+sdĕ3d
+s3do
+sd4or
+1se
+se3b
+3sec
+se3d2
+sed4i3m
+se4d3i4t
+se5dit.
+se5ditn
+se5ditq
+se5d4itu
+se5ditv
+sedí4t
+se4d5íti
+sed4o
+sed4u
+se2e
+s1eg
+se2gi
+se2gí
+se2gn
+se2iÄ
+se2ie
+se2ié
+se4in
+se4iq
+se4ir
+se4iv
+se3íp
+3sem
+semi5as
+semi5ás
+se4m5iss
+se4m5íss
+se4mul
+s2en
+3sep
+s2e3q
+s2e1r
+ser2a
+ser2æ3
+ser2Ç£
+se3rē
+ser4i
+seri5c
+se3rī
+se3rÅ
+ser2u
+3ses
+ses3q
+2se2un
+se2ur
+s1eú
+s2ev
+se2xe
+se2xé
+se2xi
+se3x4ie
+se3x4iē
+1sē
+sēdĕ4c3
+sēdi2
+sē4d3it
+sē5dit.
+sē5ditn
+sē5ditq
+sē5ditu
+sē5ditv
+sēdĭ2
+sē4d3ĭt
+sē5dĭt.
+sē5dĭtn
+sē5dĭtq
+sē5dĭtu
+sē5dĭtv
+sÄ“dÄ­Ì4
+sÄ“6d5Ä­ÌtÄ­
+sēdí2
+sē4d5íti
+2s1Ä“2g
+sē2ie
+sē2iē
+sē4ir
+s2Ä“m
+sÄ“mi5Äs
+sÄ“mi5ÄÌs
+sē4m5is.
+sē4m5isn
+sē4m5isq
+sēm5iss
+sē6m5isue
+sē4m5isv
+sÄ“mÄ­5Äs
+sÄ“mÄ­5ÄÌs
+sē4m5ĭs.
+sē4m5ĭsn
+sē4m5ĭsq
+sēm5ĭss
+sē4m5ĭsu
+sē4m5ĭsv
+sÄ“6m5Ä­Ìsn
+sÄ“6m5Ä­Ìsq
+sÄ“m5Ä­Ìss
+sÄ“6m5Ä­Ìsu
+sÄ“6m5Ä­Ìsv
+sē4m5ísn
+sē4m5ísq
+sēm5íss
+sē4m5ísu
+sē4m5ísv
+sē2mū
+sē3ne
+sÄ“s4cÅ
+sēs3q
+sēs3t
+2s3Ä“Ì2g
+sÄ“Ìmi3
+sÄ“Ì4m5is
+sÄ“ÌmÄ­3
+sÄ“Ì4m5Ä­s
+1sĕ
+sĕ2ă
+sĕ3d
+sĕd4ĭ3
+sÄ•p4tÄ•Ì
+sĕ3r2a
+sĕ3ră
+sĕ3r2æ
+sĕ3r2ǣ
+sĕ3rē
+sĕ3r4ĕ
+sĕ3rī
+sÄ•3rÅ
+sÄ•3rÅ
+sĕ3rū
+sĕ3rŭ
+sĕ2s
+2sĕŭ
+sĕ2x3ĕ
+sĕx2ĭ
+sÄ•Ì3ră
+sÄ•Ìx4Ä­
+1s2é
+s1é2g
+sé4ir
+3sém
+sémi3
+sé3q
+3sés
+sé3x4ie
+séx4iē
+sg2
+s3ga
+s3gæ3
+s3gǣ
+1si
+s2i2a
+2si2ba
+2si2bá
+2si2be
+2si2bé
+si3bi
+si4bis
+si4bit
+si4bís
+si4bít
+2si2bo
+2si2bó
+si4bun
+si4bún
+s1ie
+3sie.
+s1iē
+3siē.
+2siĕ
+2siéc
+2s3i2ga
+2s3i2gÄ
+2s3i2gá
+2s3i2gē
+2s3igé
+2s3i2gi
+2s3i2gī
+2s3i2gí
+si4g3n
+2s3i2go
+2s3i2gÅ
+2s3i2gó
+2s3i2gu
+2s3i2gú
+s3iít
+3s2il
+si5lum
+si5lus
+3sim
+si3mus
+s2in
+sin2Ä
+sino3p
+si2o
+sio2s
+2s1ir
+si2re
+si2ré
+si2rí
+si4s3t
+sis5ta
+sis5tÄ
+sis5ti
+s1iu
+3s2ium
+2siun
+2s3iur
+s2ius
+s2i3uu
+2s3iū
+2siÅ­
+2s3iún
+1sī
+2s1Ä«2b
+s3Ä«2mi
+s3Ä«2mÄ­
+2s1Ä«r
+sī2re
+sī2rē
+sī2rĕ
+sī2ré
+sī2rī
+sī2rí
+sī4st
+s3Ä«Ì2b
+sÄ«Ì4mi
+sÄ«Ì4mÄ­
+sÄ«Ì4mur
+sÄ«Ì4mÅ­r
+s3Ä«Ìr
+sÄ«Ì4re
+sÄ«Ì4rÄ“
+sÄ«Ì4rÄ•
+sÄ«Ì4rÄ«
+sÄ«Ì4tur
+sÄ«Ì4tÅ­r
+1sÄ­
+3sÄ­a
+3sÄ­Ä
+3sĭă
+3sĭæ
+3sÄ­Ç£
+s2Ä­b
+3sÄ­Ä“.
+3s4Ä­Ä•.
+s4Ä­Ä•n
+s4Ä­Ä•q
+s4Ä­Ä•u
+s4Ä­Ä•v
+sÄ­2g
+2s3Ä­gÄ
+2s3ĭgă
+2s3ĭgē
+2s3ĭgī
+2s3Ä­gÄ­
+2s3Ä­gÅ
+2s3Ä­gÅ
+2s3Ä­gÅ­
+3sÄ­Ä«
+2s1Ä­Ä­
+s2Ä­n
+sÄ­n2a
+sÄ­n2Ä
+sĭn2æ
+sÄ­s3
+sÄ­4st
+sÄ­s5tÄ
+sĭs5tă
+sÄ­s5tÄ­
+sÄ­4Ìg
+4s3Ä­Ì4gÄ­
+2s3Ä­ÌÄ­
+s2Ä­Ìn
+sÄ­Ìs3
+1sí
+2sí2ba
+2sí2be
+sí3bi
+sí4bis
+sí4bit
+2sí2bo
+sí4bun
+2s3í2gi
+síg3n
+s2íl
+sí4mur
+sí2nu
+2s1ír
+sí2re
+sí4s3t
+2sj
+s1m2
+2s3me
+2s3mé
+2s1n2
+s3ne
+s3nĕ
+snÅ­Ì3
+1s2o
+so3b2
+so4l3ue
+sol3ué
+so4l3ui
+so4l3uī
+so4l3uí
+3so1n
+so3ni
+son2u
+3so3p
+sos2p
+1sÅ
+sÅ4lue
+sÅ2s3p
+sÅÌ4s
+1s2Å
+sÅ3b2
+sÅl4lÄ•
+3sÅn
+sÅs2
+1s2ó
+2sód
+sól2l
+só2s
+sp2
+3sparg
+3spars
+3spărg
+3spărs
+5spăÌrg
+5spăÌrs
+3spárg
+3spárs
+spár4ui
+4spe.
+s2pec
+4s3pem
+4spen
+4speq
+spe3r4a
+speras7c
+sper4Ä
+spe3r4æ
+spe3r4Ç£
+sper4ǽ
+spe5rem
+spe5req
+spe5rer
+spe5r4es
+spe3r4Ä“
+sper4é
+s4perg
+speri4b
+sper5i4m
+speri4r
+spe5r4it
+spe4r5Ä«4m
+spe4rī4r
+sperÄ«Ì6m
+sperÄ«Ì6r
+spe4r5í4m
+spe4rí4r
+3s4pern
+spe3r4o
+spe3rÅ
+sper4ó
+s4pers
+spe3rū
+2spes
+4speu
+4spev
+s2pex
+4spĕ.
+s2pĕc
+4s3pĕm
+4spĕn
+4spĕq
+spĕ3r4a
+spĕ3r4æ
+spĕ3r4ǣ
+spĕ3rē
+spÄ•4rÄ•Ä
+spĕ4rĕă
+spÄ•4r5Ä•Å
+spĕ5rĕq
+s4pĕrg
+spĕ4r5ī4m
+spĕ4r5ī4r
+spÄ•rÄ«Ì6m
+spÄ•rÄ«Ì6r
+spĕ4r5ĭĕ
+3s4pĕrn
+spÄ•3rÅ
+spÄ•3rÅ
+s4pĕrs
+spĕ3rū
+spĕ3rŭ
+2spĕs
+4spĕu
+4spĕv
+s4pÄ•Ìc
+4spÄ•Ìn
+s6pÄ•ÌrnÄ“
+s6pÄ•ÌrnÅ
+s6pÄ•ÌrnÅ­
+s4pÄ•Ìrs
+4spÄ•Ìs
+s4pÄ•Ìx
+4s3pém
+2spén
+spé4r5ea
+spé4r5eÄ
+spé4r5eo
+spé4r5eÅ
+spé4ri.
+s4pérno
+s4pérs
+4spés
+s2péx
+s2phæ
+s2phǣ
+s2phǽ
+4sphen
+4sphén
+s2phr
+s3pi.
+4spia
+s3pib
+s3pin
+s3pio
+s3piÅ
+s3pió
+s3piq
+s2pir
+2spit
+s3piu
+s3piú
+s3piv
+s2pī
+4spĭă
+s3pÄ­b
+2spÄ­t
+s3pÄ­Å­
+4spÄ­Ìt
+s2píc
+s3pín
+s3píq
+2spít
+s3píu
+s3pív
+2spn
+s2pod
+3s2pol
+3spond
+2s3pos
+2spÅs
+1spÅ
+s2pÅd
+s2pÅl
+2spÅr
+2spÅs
+s4pÅÌl
+4spÅÌs
+s2pód
+3s2pól
+2s3pós
+2spub
+s2pue
+s2puē
+s2pué
+s2pui
+s2puī
+s2puí
+s3pus
+s2pÅ­Ä“
+s2pÅ­Ä•
+s2pÅ­Ä«
+s2pÅ­Ä­
+s3pÅ­m
+s3pÅ­s
+2spúb
+s2púe
+s2púi
+s3pús
+s2qua
+s2quÄ
+2s3que
+2squĕ
+s3qui
+s1r2
+2s1s2
+s3sa
+s3sÄ
+s3să
+s3sá
+s3sæ
+s3sǣ
+s3sǽ
+s3se
+ssed4
+sse5di
+s3sē
+ssēd4
+ssē5di
+ssē5dĭ
+ss4Ä“m
+s3sĕ
+s3sé
+ssér4ui
+ssér4uī
+s3si
+ssi3l4
+s3sī
+s3sí
+ssíl2
+s3su
+ssupe5rí
2st.
-.s2m
+4s5taté
+s5tatib
+4s5tÄtÄ“
+4s5tÄté
+s5tÄtib
+s5tÄtÄ­b
+st2ă
+s2tág
+st4án
+s5tátib
+ste2Ä«
+4stemí
+ste3r4a
+ste3rǣ
+ste5re
+ste5ré
+4sterg
+ste3r4i
+ster6i5c
+steri5ue
+steri5v
+ste5rī
+sterī5u
+sterī5v
+5s4terne
+5sternē
+5sterné
+5s4terno
+5s4ternÅ
+5s4ternó
+5s4ternu
+5s4ternú
+ste3ro
+ste3rÅ
+4sterr
+4sters
+3s4tete
+3steté
+5s4teti.
+5stetim
+5s4tetin
+5s4tetiq
+5stetit
+5s4tetiu
+5s4tetiv
+5s4tetín
+5s4tetíq
+5stetít
+5s4tetíu
+5s4tetív
+4stēmí
+3s4tēte
+3stētē
+3s4tētĕ
+3stēté
+5stētim
+5stētit
+3stētī
+5stētĭm
+5stētĭt
+5stētít
+5s4tÄ“Ìte
+5stÄ“ÌtÄ•
+5stÄ“Ìtim
+5stÄ“Ìtit
+5stÄ“ÌtÄ«
+5stÄ“ÌtÄ­m
+5stÄ“ÌtÄ­t
+stĕ2ī
+stĕ3r4a
+stĕ3rǣ
+stĕ3rĕ
+4stĕrg
+stĕ5rī
+stĕrī5u
+stĕrī5v
+stĕ5r4ĭ
+stĕrĭ5c
+5stĕrnē
+5s4tĕrnĕ
+5s4tĕrnĭ
+5s4tÄ•rnÅ
+5stÄ•rnÅ
+5s4tĕrnŭ
+4stĕrr
+4stĕrs
+stĕ3rŭ
+3s2tĕs
+6stÄ•Ìnta
+6stÄ•ÌntÄ
+6stÄ•Ìntă
+6stÄ•Ìntæ
+6stÄ•ÌntÇ£
+6stÄ•ÌntÄ•
+6stÄ•ÌntÄ«
+6stÄ•ÌntÅ
+6stÄ•ÌntÅ«
+4stÄ•Ìrg
+5s6tÄ•ÌrnÄ“
+5s6tÄ•ÌrnÄ­
+5s6tÄ•ÌrnÅ
+5stÄ•ÌrnÅ
+5s6tÄ•ÌrnÅ­
+4stÄ•Ìrr
+4stÄ•Ìrs
+4stérg
+stéri5t
+5s4térnē
+5s4térni
+5s4térno
+5s4térnÅ
+5s4térnu
+4stérr
+4stérs
+3s4téte
+5stéti.
+5stétim
+5stétit
+s2t1h
+2s3tia
+2s3tiÄ
+2s3tiá
+s2tib
+sti4bi.
+sti4bī
+4s3tibu
+4s3tibú
+2stic
+2s3tim
+3s4timu
+3s4tinÄ
+3s4tinc
+3s4ting
+3s4tinÅ
+3s4tinx
+2s3tio
+2s3tiÅ
+2s3tió
+s2tip
+3s2tir
+s3tis
+s2tit
+3stitǣ
+3stitū
+2s3tiu
+2s3tiú
+3s4tīnc
+3s4tīnx
+s4tÄ«Ìnc
+2s3tÄ­Ä
+s3tĭă
+stĭ4bī
+4s3tÄ­bÅ­
+2stÄ­c
+2s3tÄ­m
+3stÄ­nÄ
+4stÄ­nÄx
+3s4tĭnă
+4stĭnē.
+4stĭnēn
+3s4tÄ­ng
+3s4tÄ­nÅ
+3s4tÄ­nÅ
+2s3tÄ­Å
+s2tÄ­p
+3stÄ­r
+2s3tÄ­s
+s2tÄ­t
+3stÄ­ta
+5stÄ­tÄ.
+5stÄ­tÄn
+3stĭtă
+3stĭtá
+3stĭtæ
+3stĭtǣ
+3stĭtǽ
+5stĭtĕm
+5stĭtĕt
+5stĭtīs
+5stÄ­tÅ­m
+2s3tÄ­Å­
+4s3tÄ­Ìm
+5stÄ­ÌmÅ­
+5s4tÄ­Ìng
+3s4tÄ­Ìr
+4s3tÄ­Ìs
+s3tía
+2stíc
+2s3tím
+3s4tínc
+3s4tíng
+3s4tínx
+s2típ
+s3tís
+s2tl
+2stn
+2stoc
+2stor
+2s3tot
+2stÅr
+s3tÅt
+st4ÅÌ
+4stÅÌr
+2stÅc
+4stÅÌc
+2stóc
+4stóre
+4stóri
+2s3tót
+2stq
+4strac
+4strah
+stra3p4
+4strax
+4straÍž
+4stra͡
+4strÄx
+4strÄÌx
+4s5tră.
+4s5trăm
+s5trănĕ
+4s5trăq
+4s5trău
+4s5trăv
+s5trăÌm
+4strác
+4stráh
+4stráx
+s3træ
+s3trǣ
+s3trǽ
+s3tri.
+5strict
+3strig
+s5trine
+s3triq
+4s3tris
+s3triu
+s3triú
+s3triv
+4striz
+s3trī.
+s3trīq
+4s3trīs
+s3trīu
+s3trīv
+5strÄ­ct
+3s4trÄ­Ä“
+3s4trÄ­Ä•
+3strÄ­g
+3strÄ­n
+4strÄ­z
+5strÄ­Ìct
+5strÄ­ÌgÄ­
+5strÄ­ÌgÅ­
+5strÄ­Ìn
+5stríct
+5strígi
+5strígu
+5stríng
+5strínx
+s3tríq
+4s3trís
+s3tríu
+s3trív
+4stríz
+2stro
+3s4trom
+3strop
+2strÅ
+3s4trÅm
+5strÅÌm
+2stró
+3stróm
+4strud
+4strus
+4strūd
+4strūs
+4strÅ«Ìd
+4strÅ«Ìs
+s5trÅ­m
+s5trÅ­Ìm
+4strúd
+4strús
+2strȳ
+2strý
+s4tue.
+s4tuĕ
+2stul
+3s2tup
+s3tur
+2stū
+4stÅ­l
+3s2tÅ­p
+3s4tÅ­Ìp
+2stúl
+2stún
+s2túp
+2stúq
+2s3túr
+2stúu
+2stúv
+2stv
+1s2ty
+1stȳ
+1s2tý
+s1u
+1su.
+3s2uam
+3s2uan
+3s2uar
+3s2uas
+3s2uat
+1s2uÄ
+1s2uá
+1s2u2b1
+su5ber.
+sube4ra
+su5bera.
+su5berane
+su5beraq
+su5berau
+su5berav
+sube4rá
+su5beren
+su5beri.
+su5berib
+su5beriq
+sube6ris
+su5beriu
+su5beriv
+su5beríq
+sube6rís
+su5beríu
+su5berív
+su5bern
+sube4ro
+sube4ró
+su5berq
+su5berue
+su5berv
+sub3es
+sub3Ä“
+subÄ“Ì4
+su5bérib
+su5bérn
+su5bérq
+su5béru
+su5bérv
+sub3és
+subi4
+sub3is
+sub3it
+subí4
+sub3ís
+sub3Å
+1su3d
+2sue.
+3s2ueb
+3s2uem
+3s2uen
+3s2ueq
+3s4uera
+3s4uerÄ
+3s4uerá
+3s4uere
+3s4uerē
+3s4ueré
+3s4ueri
+3s4uerī
+3s4uerí
+3s4uero
+3s4uerÅ
+3s4ueró
+3s4ueru
+3s4uerú
+3s2ues
+3s2uet
+3s2ueu
+3suev
+1s2uē
+2suēx
+4suÄ“Ìx
+3s2uĕn
+3s2uĕq
+3s2uĕu
+3suĕv
+1sué
+s2uéb
+2suéc
+2suéh
+s2uém
+s2uén
+4suérb
+s4uére
+s4uéri
+4suérs
+4suért
+s4uéru
+s2ués
+s2uét
+s2uéu
+2suéx
+1sug
+1s2ui
+s3uir
+s2uī.
+3s2uīn
+3s2uīq
+3s2uīu
+3suīv
+1s2uí
+1s2ul
+2sulm
+1s2um
+su3ma
+sum2e
+su3mun
+1s2un
+3s2uo.
+3s2uon
+3s2uoq
+3s4uor.
+3s4uorn
+3s4uorq
+3s4uoru
+3s4uorv
+3s2uou
+3s2uov
+1s2uÅ
+3s2uón
+3s2uóq
+3s4uórn
+3s4uórq
+3s4uóru
+3s4uórv
+3s2uóu
+3s2uóv
+3sup
+supere6ri
+supe6re6rí
+supe6res
+supe4rē
+supe6rés
+supe6ri.
+super5im
+supe6riq
+super5it
+superÄ«Ì6
+supe4rí4
+super5ím
+super5ít
+supé6r5es
+1suq
+1s2ur
+1sus
+su3spi
+su3spí
+1s2ut
+1s2uu
+1s2uÅ­
+1s2uú
+1s2uv
+1sū
+sūbe3
+sū3d
+2sūri
+2sūrĭ
+2sūrí
+sū2su
+sū3sum
+1sÅ­
+sÅ­2b1
+sÅ­b3Ä“
+sÅ­bÄ“Ì4
+sŭbī4
+sÅ­bÄ«Ì4
+sÅ­bÄ­2
+sÅ­bÄ­Ì4
+sÅ­b3Å
+2sÅ­lm
+sŭpĕ4rē
+sÅ­5pÄ•Ì
+sÅ­s4pÄ­
+sÅ­Ìb3
+sÅ­ÌbÄ­4
+sÅ­Ì5bĭă
+sÅ­Ì5bÄ­Ä«s
+sÅ­Ì5bÄ­Å
+sÅ­Ì5bÄ­Å­
+sÅ­Ì3sp
+1s2ú
+sú2b1
+sú5ber.
+sú5bera.
+súbe6ran
+súbe6ras
+súbe6rat
+sú5bere
+sú5beri.
+súbe6ris
+súbe4ro
+súb3es
+súbi2
+súb3is
+súb3it
+sú3lui
+sú3luī
+súm2i
+sú1r
+sú3sp
+2sv
+s3ve
+s3vĕ
+1sy
+sy2lu
+1sȳ
+1sý
1t
-2tb
+t2a
+tab2
+ta4c3ue
+tad2
+2ta2g
+ta4g3n
+ta3go
+ta2i
+ta3ma
+ta3q
+tasce4
+tascé4
+ta3s2p
+tas5te
+ta2s3u
+5tatem
+5tates
+3tatém
+3tatés
+t2Ä
+tÄ5bun
+2tÄg
+5tÄtem
+5tÄtÄ•m
+5tÄtÄ•Ì
+5tÄÌtÄ“
+tăd2
+2tă2g
+tă4gĭ
+tă3gÅ
+tămĕ4n
+t2ăn
+tă3rĕ
+t2ăs
+tă3s2p
+tăs3pĕ
+tăs3pĭ
+tăs3t
+tăs5tĕ
+tăs4trÅ
+tá4c3ue
+tá2ge
+tá2s3u
+5tátem
+5tátes
+t2æ
+t2Ç£
+tǽ2cu
2tc
-2td
+t2e
+te1a
+te2aÍž
+te2a͡
+te4gn
+te3go
+te3gÅ
+te3gr
+te3iss
+te3it
+te2iu
+te1Ä«
+te3íp
+te3íss
+te3í2t
+te4nim
+te4nt
+te5ra.
+te3rab
+te5rami
+ter3ap
+te5raq
+te5rara
+te5rará
+te5rarem
+te5raren
+te5rarer
+te5rares.
+te5raresn
+te5raresq
+te5raresu
+te5raresv
+te5raret
+te5rarém
+te5rarén
+te5rarér
+te5rarésn
+te5rarésq
+te5rarésu
+te5rarésv
+te5rarét
+te5rari
+te5raro
+te5raró
+te5raru
+te5rarú
+te3ras
+te3rat
+te5rau
+te5rav
+ter3aÍž
+ter3a͡
+ter5ÄÌc
+te3r4æq
+te3r4Ç£q
+te4r3ea
+te4r3eÄ
+te4r3eá
+te6r5e6mi.
+te6r5emine
+te6r5e6miq
+te6r5e6miu
+te6r5e6miv
+te4r5e4mí
+te4r5e4mo
+te4r5e4mÅ
+te4r5e4mó
+te4r3eo
+te4r3eÅ
+te4r3eó
+te4r3eq
+te4re4ra
+te4re4rÄ
+te4re4rá
+te6r5erim
+te6r5erit
+te6r5e6rít
+te4re4ro
+te4re4rÅ
+te4re4ró
+te6r5erun
+te4re4rú
+ter5est
+te4rēmē
+te4r5ē4mī
+te4rēmí
+te3rēu
+te3rēv
+te6r5Ä“Ì6mÄ«
+te4r5é4me
+te6r5é6mi.
+te6r5é6mit
+te4r3éq
+te6r5é6rim
+te6r5é6rit
+ter5ést
+ter5ibo
+ter5ibun
+ter5ibún
+ter5ice
+te3rid
+ter5iēn
+ter5ime
+ter5imē
+ter5imé
+ter4imi
+ter5imo
+ter5imÅ
+ter5imó
+ter4imu
+ter4imú
+ter4ine
+teri5ni
+ter4iq
+teri4r
+ter4is.
+ter4isn
+ter4isq
+te4r5iss
+te4r5ist
+ter4isu
+ter4isv
+ter4it.
+ter5i6ta.
+ter5i6tae
+ter5i6tam
+ter5i6tan
+ter5i6taq
+ter5i6tar
+ter5i6tau
+ter5i6tav
+ter5i6taÍž
+ter5ita͡
+ter5i6tÄ.
+ter5i6tÄn
+ter5i6tÄq
+ter5i6tÄr
+ter5i6tÄu
+ter5i6tÄv
+ter5i6táe
+ter5i6tám
+ter5i6tán
+ter5i6táq
+ter5i6tár
+ter5i6táu
+ter5i6táv
+ter5itæ
+ter5i4tǣ
+ter5itǽ
+ter4ite
+ter5i6ti.
+ter5i6tin
+ter5itio
+ter5itiÅ
+ter5itió
+ter5i6tiq
+ter6itis
+ter5i6tiu
+ter5i6tiv
+ter5i4tī
+ter5i6tín
+ter5i6tíq
+ter6itís
+ter5i6tíu
+ter5i6tív
+ter4itn
+ter6ito.
+ter6iton
+ter6itoq
+ter6itor.
+ter6itorn
+ter6itorq
+ter6itorue
+ter5itorum
+ter5i6torú
+ter6itorv
+ter5i6tos
+ter6itot
+ter6itou
+ter6itov
+ter6itÅ.
+ter6itÅn
+ter6itÅq
+ter5i6tÅr
+ter5i6tÅs
+ter6itÅu
+ter6itÅv
+ter6itÅÌn
+ter6itÅÌq
+ter5i6tÅÌr
+ter5i6tÅÌs
+ter6itÅÌu
+ter6itÅÌv
+ter6itón
+ter6itóq
+ter6itórn
+ter6itórq
+ter6itórue
+ter5itórum
+ter6itórv
+ter5i6tós
+ter6itót
+ter6itóu
+ter6itóv
+ter4itq
+teri4tu
+ter5itu.
+ter5itum
+ter5itun
+ter5ituq
+ter5itur
+ter6itur.
+ter6iturn
+ter6iturq
+ter6iturue
+ter6iturv
+ter5itus
+ter5ituu
+ter5ituv
+ter5i4tū
+ter5i6túm
+ter5i6tún
+ter5i6túq
+ter5i6túra
+ter5itúræ
+ter5i6túre
+ter5i6túri
+ter6itúrn
+ter5i6túro
+ter6itúrq
+ter6itúrue
+ter5itúrum
+ter5itúrus
+ter6itúrv
+ter5i6tús
+ter5i6túu
+ter5i6túv
+ter4itv
+teri4u
+ter5iue
+ter3i4v
+te4r5Ä«4mi
+te3r4Ä«n
+ter6Ä«ne
+ter4Ä«q
+ter6Ä«qu
+te4rī4r
+te4r5Ä«4te
+te4r5Ä«4to
+te4r5Ä«4tÅ
+te4r5ī4tó
+te4r5Ä«4tu
+te4r5ī4tú
+te4r3Ä«4u
+ter6Ä«ue.
+te4r3Ä«4v
+ter6Ä«ve.
+terÄ«Ì6mi
+ter6Ä«Ìn
+ter6Ä«Ìq
+te4rÄ«Ì4r
+terÄ«Ì6te
+terÄ«Ì6to
+terÄ«Ì6tÅ
+terÄ«Ì6tu
+ter6Ä«Ìue.
+terÄ«Ì6ui
+terÄ«Ì6uÄ«
+ter6Ä«Ìve.
+terÄ«Ì6vi
+terÄ«Ì6vÄ«
+te4r5íme
+te6r5í6mur
+te4rí4r
+te4r5íss
+te4r5íst
+te4r5í4ta
+te6r5í6te.
+ter5ítio
+te4r5í4to
+te6r5ítur
+ter6íue.
+ter5í6uer
+te4rí4ui
+ter6íve.
+ter5í6ver
+te4rí4vi
+te4rn
+4ternÄm
+4ternē
+4terné
+4ternim
+4terním
+4ternít
+te3rop
+te5rorn
+4terot
+4terÅt
+te3rÅu
+te3rÅv
+te4róni
+4terót
+te4rq
+te4rr
+te4rt
+ter3uē
+ter3uí
+ter3Å«2
+te4rv
+te2sq
+2t3ess
+4test.
+te5s4ta.
+te5stabam.
+te5stabamn
+te5stabamq
+te5stabamue
+te5stabamus
+te5stabamús
+te5stabamv
+te5stabant.
+te5stabantn
+te5stabantq
+te5stabantue
+te5stabantv
+te5stabas
+te5stabat.
+te5stabati
+te5stabatí
+te5stabatn
+te5stabatq
+te5stabatue
+te5stabatv
+te5stabámn
+te5stabámq
+te5stabámue
+te5stabámus
+te5stabámv
+te5stabántn
+te5stabántq
+te5stabántue
+te5stabántv
+te5stabás
+te5stabáti
+te5stabátn
+te5stabátq
+te5stabátue
+te5stabátv
+te5stabimus
+te5stabimús
+te5stabis
+te5stabit.
+te5stabiti
+te5stabití
+te5stabitn
+te5stabitq
+te5stabitue
+te5stabitv
+te5stabís
+te5stabít
+te5stabo.
+te5stabon
+te5staboq
+te5stabou
+te5stabov
+te5stabón
+te5stabóq
+te5stabóu
+te5stabóv
+te5stabunt.
+te5stabuntn
+te5stabuntq
+te5stabuntue
+te5stabuntv
+te5stabúntn
+te5stabúntq
+te5stabúntue
+te5stabúntv
+te5stamus
+te5stamús
+te5stane
+te5stant.
+te5stantn
+te5stanto.
+te5stanton
+te5stantoq
+te5stantou
+te5stantov
+te5stantÅ
+te5stantón
+te5stantóq
+te5stantóu
+te5stantóv
+te5stantq
+te5stantue
+te5stantv
+te5s4taq
+te5starem.
+te5staremn
+te5staremq
+te5staremue
+te5staremus
+te5staremús
+te5staremv
+te5starent.
+te5starentn
+te5starentq
+te5starentue
+te5starentv
+te5stares
+te5staret.
+te5stareti
+te5staretí
+te5staretn
+te5staretq
+te5staretue
+te5staretv
+te5starémn
+te5starémq
+te5starémue
+te5starémus
+te5starémv
+te5staréntn
+te5staréntq
+te5staréntue
+te5staréntv
+te5starés
+te5staréti
+te5starétn
+te5starétq
+te5starétue
+te5starétv
+te5stat.
+te5statn
+te5statot
+te5statót
+te5statq
+te5statue
+te5statv
+te5s4tau
+te5s4tav
+te5s4tÄ.
+te5stÄbam
+te5stÄbant.
+te5stÄbantn
+te5stÄbantq
+te5stÄbantue
+te5stÄbantv
+te5stÄbat
+te5stÄbÄmus
+te5stÄbÄmús
+te5stÄbÄs
+te5stÄbÄti
+te5stÄbÄtí
+te5stÄbÄÌmus
+te5stÄbÄÌs
+te5stÄbÄÌti
+te5stÄbám
+te5stÄbántn
+te5stÄbántq
+te5stÄbántue
+te5stÄbántv
+te5stÄbát
+te5stÄbimus
+te5stÄbimús
+te5stÄbis
+te5stÄbit.
+te5stÄbiti
+te5stÄbití
+te5stÄbitn
+te5stÄbitq
+te5stÄbitue
+te5stÄbitv
+te5stÄbís
+te5stÄbít
+te5stÄbÅ
+te5stÄbunt.
+te5stÄbuntn
+te5stÄbuntq
+te5stÄbuntue
+te5stÄbuntv
+te5stÄbúntn
+te5stÄbúntq
+te5stÄbúntue
+te5stÄbúntv
+te5stÄmus
+te5stÄmús
+te5stÄne
+te5s4tÄq
+te5stÄrem
+te5stÄrent.
+te5stÄrentn
+te5stÄrentq
+te5stÄrentue
+te5stÄrentv
+te5stÄret
+te5stÄrÄ“mus
+te5stÄrÄ“mús
+te5stÄrÄ“s
+te5stÄrÄ“ti
+te5stÄrÄ“tí
+te5stÄrÄ“Ìmus
+te5stÄrÄ“Ìs
+te5stÄrÄ“Ìti
+te5stÄrém
+te5stÄréntn
+te5stÄréntq
+te5stÄréntue
+te5stÄréntv
+te5stÄrét
+te5stÄtÅt
+te5stÄtÅÌt
+te5s4tÄu
+te5s4tÄv
+te5stÄÌbam
+te5stÄÌban
+te5stÄÌbat
+te5stÄÌbÄ
+te5stÄÌbimus
+te5stÄÌbis
+te5stÄÌbit.
+te5stÄÌbiti
+te5stÄÌbÅ
+te5stÄÌbu
+te5stÄÌmus
+te5stÄÌne
+te5stÄÌq
+te5stÄÌrem
+te5stÄÌrent
+te5stÄÌret
+te5stÄÌrÄ“
+te5stÄÌu
+te5stÄÌv
+te5stábam
+te5stában
+te5stábas
+te5stábat
+te5stábimus
+te5stábis
+te5stábit.
+te5stábiti
+te5stábo.
+te5stábu
+te5stámus
+te5stáne
+te5stántn
+te5stánto.
+te5stántÅ
+te5stántq
+te5stántue
+te5stántv
+te5s4táq
+te5stárem
+te5stárent
+te5stáres
+te5stáret
+te5státn
+te5státq
+te5státue
+te5státv
+te5s4táu
+te5s4táv
+te5stemus
+te5stemús
+te5stent.
+te5stentn
+te5stentq
+te5stentue
+te5stentv
+te6ster
+te5stet.
+te5steti
+te5stetí
+te5stetn
+te5stetq
+te5stetue
+te5stetv
+te5stēmus
+te5stēmús
+tes4tēt
+te5stēti
+te5stētí
+te5stÄ“Ìmus
+te5stÄ“Ìti
+te5stémus
+te5sténtn
+te5sténtq
+te5sténtue
+te5sténtv
+te5stéti
+te5stétn
+te5stétq
+te5stétue
+te5stétv
+tes3ti
+4testn
+4t3estÅ
+4testq
+4t3estu
+4testv
+te2su
+tete5r
+2teté
+4tetim
+4tetit
+4tetít
+te2un
+te3x4e
+tex2i
+tex2Ä«
+tex2o
+tex2ó
+tex2u
+tex2ú
+t2Ä“
+tē2ie
+tē2iē
+tē3ne
+tēte3
+2tētē
+2tēté
+4tētim
+4tētit
+2tētī
+4tētĭm
+4tētĭt
+4tētít
+4tÄ“ÌtÄ«
+t2Ä•
+3tĕa
+3tĕă
+3tĕæ
+3tĕǣ
+3tĕē
+3tĕĕ
+tÄ•3gÅ
+tĕ3gr
+3tĕ1ī
+tĕ3ĭ
+3tĕl
+t3Ä•2nÄ­
+3tÄ•Å
+3tÄ•1Å
+tĕ3q
+t4Ä•r.
+tÄ•r5ÄÌc
+tĕ5ră.
+tĕ3răr
+tÄ•r5ăÌp
+tĕ3r4æq
+tĕ3r4ǣq
+tĕ4rēmē
+tĕ4r5ē4mī
+tÄ•6rÄ“mÄ­Ì
+tĕ3rēu
+tĕ3rēv
+tÄ•6r5Ä“Ì6mÄ«
+t4ĕrĕ
+tÄ•4r3Ä•Ä
+tĕ4r3ĕă
+tĕ3rĕn
+tÄ•4r3Ä•Å
+tÄ•4r3Ä•Å
+tÄ•4r5Ä•4rÄ
+tĕ4r5ĕ4ră
+tĕ4rĕ4rĭ
+tĕr5ĕrĭm
+tĕr5ĕrĭt
+tÄ•r5Ä•rÄ­Ìt
+tÄ•4r5Ä•4rÅ
+tÄ•6r5Ä•Ì6rÄ­
+t4ĕrī
+tĕ3rī.
+tĕ3rīn
+tĕ3rīq
+tĕ4r3ī4r
+tĕ3rīs
+tĕ4r3ī4u
+tĕ4r3ī4v
+tÄ•rÄ«Ì4r
+tĕr3ĭē
+tĕ4r3ĭĕ
+tĕ4r5ĭ4mē
+tÄ•4r5Ä­4mÅ
+tĕ4r5ĭ4ta
+tÄ•r5Ä­6tÄ.
+tÄ•r5Ä­6tÄn
+tÄ•r5Ä­6tÄq
+tÄ•r5Ä­6tÄr
+tÄ•r5Ä­6tÄu
+tÄ•r5Ä­6tÄv
+tĕ4r5ĭ4tă
+tĕ4r5ĭ4tá
+tĕ4r5ĭ4tæ
+tĕ4r5ĭ4tǣ
+tĕ4r5ĭ4tǽ
+tĕ4r5ĭ4tī
+tÄ•6r5Ä­6tÄ­Å
+tÄ•6r5Ä­6tÅr
+tÄ•6r5Ä­6tÅs
+tÄ•6r5Ä­6tÅÌr
+tÄ•6r5Ä­6tÅÌs
+tĕ4r5ĭ4tū
+tĕ6r5ĭ6tŭm
+tĕ6r5ĭ6tŭs
+tÄ•6r5Ä­6tÅ­Ìm
+tÄ•6r5Ä­6tÅ­Ìs
+tÄ•r5Ä­ÌÄ•r
+tÄ•6r5Ä­ÌmÄ•
+tÄ•6r5Ä­Ì6tă
+tÄ•6r5Ä­ÌtÄ­
+t4Ä•rn
+4tÄ•rnÄm
+4tĕrnăr
+4tĕrnăt
+4tĕrnē
+4tÄ•rnÅ
+4tÄ•rÅt
+t4Ä•3rÅ
+t4Ä•rq
+t4Ä•ru
+tĕr3ū2
+tĕ3rŭs
+t4Ä•rv
+2t3Ä•ss
+4t3Ä•st.
+tÄ•5stÄ.
+tÄ•5stÄbÄmÅ­s
+tÄ•5stÄbÄmÅ­Ìs
+tÄ•5stÄbÄs
+tÄ•5stÄbÄtÄ­
+tÄ•5stÄbÄÌmÅ­s
+tÄ•5stÄbÄÌs
+tÄ•5stÄbÄÌtÄ­
+tÄ•5stÄbăm
+tÄ•5stÄbănt.
+tÄ•5stÄbăntn
+tÄ•5stÄbăntq
+tÄ•5stÄbăntu
+tÄ•5stÄbăntv
+tÄ•5stÄbăt
+tÄ•5stÄbăÌm
+tÄ•5stÄbăÌntn
+tÄ•5stÄbăÌntq
+tÄ•5stÄbăÌntu
+tÄ•5stÄbăÌntv
+tÄ•5stÄbăÌt
+tÄ•5stÄbÄ­mÅ­s
+tÄ•5stÄbÄ­mÅ­Ìs
+tÄ•5stÄbÄ­s
+tÄ•5stÄbÄ­t.
+tÄ•5stÄbÄ­tÄ­
+tÄ•5stÄbÄ­tn
+tÄ•5stÄbÄ­tq
+tÄ•5stÄbÄ­tu
+tÄ•5stÄbÄ­tv
+tÄ•5stÄbÄ­Ìs
+tÄ•5stÄbÄ­Ìt
+tÄ•5stÄbÅ
+tÄ•5stÄbÅ­nt.
+tÄ•5stÄbÅ­ntn
+tÄ•5stÄbÅ­ntq
+tÄ•5stÄbÅ­ntu
+tÄ•5stÄbÅ­ntv
+tÄ•5stÄbÅ­Ìntn
+tÄ•5stÄbÅ­Ìntq
+tÄ•5stÄbÅ­Ìntu
+tÄ•5stÄbÅ­Ìntv
+tÄ•5stÄmÅ­s
+tÄ•5stÄmÅ­Ìs
+tÄ•5stÄnÄ•
+tÄ•5stÄq
+tÄ•5stÄrÄ“mÅ­s
+tÄ•5stÄrÄ“mÅ­Ìs
+tÄ•5stÄrÄ“s
+tÄ•5stÄrÄ“tÄ­
+tÄ•5stÄrÄ“ÌmÅ­s
+tÄ•5stÄrÄ“Ìs
+tÄ•5stÄrÄ“ÌtÄ­
+tÄ•5stÄrÄ•m
+tÄ•5stÄrÄ•nt.
+tÄ•5stÄrÄ•ntn
+tÄ•5stÄrÄ•ntq
+tÄ•5stÄrÄ•ntu
+tÄ•5stÄrÄ•ntv
+tÄ•5stÄrÄ•t
+tÄ•5stÄrÄ•Ìm
+tÄ•5stÄrÄ•Ìntn
+tÄ•5stÄrÄ•Ìntq
+tÄ•5stÄrÄ•Ìntu
+tÄ•5stÄrÄ•Ìntv
+tÄ•5stÄrÄ•Ìt
+tÄ•5stÄtÅt
+tÄ•5stÄtÅÌt
+tÄ•5stÄu
+tÄ•5stÄv
+tÄ•5stÄÌbÄ
+tÄ•5stÄÌbăm
+tÄ•5stÄÌbăn
+tÄ•5stÄÌbăt
+tÄ•5stÄÌbÄ­mÅ­s
+tÄ•5stÄÌbÄ­s
+tÄ•5stÄÌbÄ­t.
+tÄ•5stÄÌbÄ­tÄ­
+tÄ•5stÄÌbÅ
+tÄ•5stÄÌbÅ­
+tÄ•5stÄÌmÅ­s
+tÄ•5stÄÌnÄ•
+tÄ•5stÄÌq
+tÄ•5stÄÌrÄ“
+tÄ•5stÄÌrÄ•m
+tÄ•5stÄÌrÄ•nt
+tÄ•5stÄÌrÄ•t
+tÄ•5stÄÌu
+tÄ•5stÄÌv
+tĕ5stănt.
+tĕ5stăntn
+tÄ•5stăntÅ
+tĕ5stăntq
+tĕ5stăntu
+tĕ5stăntv
+tĕ5stăt
+tÄ•5stăÌntn
+tÄ•5stăÌntÅ
+tÄ•5stăÌntq
+tÄ•5stăÌntu
+tÄ•5stăÌntv
+tÄ•5stăÌt
+tĕ5stēmŭs
+tÄ•5stÄ“mÅ­Ìs
+tĕ5stētĭ
+tÄ•5stÄ“ÌmÅ­s
+tÄ•5stÄ“ÌtÄ­
+tĕ5stĕnt.
+tĕ5stĕntn
+tĕ5stĕntq
+tĕ5stĕntu
+tĕ5stĕntv
+tĕ6stĕr
+tĕ5stĕt
+tÄ•5stÄ•Ìntn
+tÄ•5stÄ•Ìntq
+tÄ•5stÄ•Ìntu
+tÄ•5stÄ•Ìntv
+tÄ•5stÄ•Ìt
+4t3Ä•stn
+4t3Ä•stÅ
+4t3Ä•stq
+4t3Ä•stu
+4t3Ä•stv
+2tĕtr
+3tĕŭ
+tĕx2ă
+tĕx2ĕ
+tĕx2ī
+tĕx2ĭ
+tÄ•x2Å
+tĕx2ŭ
+tÄ•Ì3Ä­
+tÄ•Ì5răr
+tÄ•Ì4r5Ä•Ä
+tÄ•Ì4r5ĕă
+tÄ•Ì4r5Ä•Å
+tÄ•Ì4r5Ä•Å
+tÄ•Ì6r5Ä•6rÄ
+tÄ•Ì6r5Ä•6ră
+tÄ•Ì6r5Ä•6rÄ­t
+tÄ•Ì6r5Ä•6rÅ
+tÄ•Ì6r5Ä­Ä“n
+tÄ•Ì6r5Ä­6ta
+tÄ•Ìr5Ä­6tÄ.
+tÄ•Ì6r5Ä­6tă
+tÄ•Ì6r5Ä­6tæ
+tÄ•Ì6r5Ä­6tÇ£
+tÄ•Ì6r5Ä­6tÄ«
+tÄ•Ì6r5Ä­6tÅs
+tÄ•Ì6r5Ä­6tÅ«
+tÄ•Ì6r5Ä­6tÅ­m
+tÄ•Ì6r5Ä­6tÅ­s
+6tÄ•Ìrnăr
+6tÄ•Ìrnăt
+6tÄ•ÌrnÄ•r
+6tÄ•ÌrnÄ•t
+4tÄ•ÌrnÅ
+5tÄ•ÌstÄ
+tÄ•Ì5stÄ.
+tÄ•Ì5s4tă
+tÄ•Ì5stÄ•nt
+tÄ•Ì5stÄ•t
+tÄ•Ìx4Ä­
+té4gn
+té3iī
+té4r3ea
+té4r3eÄ
+té4r3eo
+té4r3eÅ
+té4r5era
+té4r5e4rÄ
+té6r5erit
+té4r5e4ro
+té4r5erÅ
+tér5ien
+tér5iēn
+té4r5im.
+téri4ta
+tér5ita.
+tér5itae
+tér5itam
+tér5ita͞
+tér5ita͡
+tér5i6tÄ.
+té4r5i4tæ
+té4r5i4tǣ
+té6r5i6ti.
+té4r5i4tī
+té6r5i6tos
+té6r5i6tÅs
+té6r5i6tu.
+té6r5i6tum
+té6r5i6tus
+té4r5i4tū
+té2rī
+4térnar
+4térnat
+4térner
+4térnes
+4térnet
+té2ru
+2t3éss
+5tésta
+té5s4ta.
+té5stant
+té5s4tat
+5téstÄ
+té5s4tÄ.
+té5stent
+té5s4tet
+4téti.
+4tétim
+4tétit
+téx2i
+téx2u
2tf
2tg
-t2h2
+2th.
+3t2he
+the2i
+3t2hē
+thē2i
+3t2hĕ
+3t2hé
+3thī
+3thĭă
+3thÄ­Ä«
+3thÄ­Å
+3thÄ­Å­
+3thl
+2thm
+2thn
+3tho
+tho3sp
+3thÅ
+thÅ3sp
+3thó
+2thp
+3thr
+3thu
+3thú
+t2i
+tiad2
+3tiae
+3tiaÍž
+3tia͡
+ti2á
+ti4ám
+3tiæ
+3tiǣ
+3tiǽ
+ti3b
+tibe3
+t3ibi.
+t3ibī
+3tic
+tic4e
+ti5cen
+4tiche
+ti4c3ue
+ti4d3ea
+ti4d3eÄ
+ti4d3eo
+ti4d3eÅ
+2tigi
+2till
+3tilo
+3tiló
+ti3m2
+ti4mn
+ti4mq
+ti4mv
+tin2Ä
+5tinÄx
+tin2u
+ti2o
+ti3q
+ti2s
+ti3s2p
+ti4sper
+ti3sta
+ti3stÄ
+ti3s4te
+ti3s4tē
+ti3s4té
+ti3s4to
+ti3s4tÅ
+ti3s4tó
+ti3s4tr
+ti3t2
+ti4tn
+ti4tq
+ti4tv
+ti3uu
+2tīgi
+2tīgĭ
+2tīp
+tī3q
+tÄ«Ì3q
+t2Ä­
+3tÄ­a
+3tĭá
+3tĭæ
+3tÄ­Ç£
+3tĭǽ
+2t3ĭbī
+4tĭchĕ
+3tÄ­cÅ­
+tÄ­4d3Ä•Ä
+tÄ­4d3Ä•Å
+2tÄ­ll
+3tÄ­lÅ
+tÄ­n2Ä
+tÄ­2Å
+2tÄ­r
+tÄ­3rÄ­
+tÄ­3s2p
+tĭ4spĕr
+tÄ­3stÄ
+tÄ­s4tÄm
+tÄ­s4tÄr
+tĭ3stă
+tĭs4tăt
+tĭ3s4tē
+tĭ3s4tĕ
+tÄ­3s4tÅ
+tÄ­3s4tÅ
+tÄ­3s4tr
+3tÄ­t.
+3tÄ­ÌcÅ­
+tÄ­Ì4d5Ä•Ä
+tÄ­Ì4d5Ä•Å
+4tÄ­ÌmÅ­
+tÄ­Ì3sp
+tÄ­Ì5s6tăt
+tÄ­Ì5s4tÄ“
+tÄ­Ì5s4tÄ•
+tÄ­Ì5stÄ­t
+tÄ­Ì5s4tÅ
+tÄ­Ì5s4tÅ
+tÄ­Ì5str
+4tÄ­Ìtă
+4tÄ­ÌtÅ­
+tí3b
+3tíc
+4tíche
+tí4c3ue
+tí4d3ea
+tí4d3eÄ
+tí4d3eo
+tí4d3eÅ
+4tígie
+3tílo
+tí1m
+4tímul
+tín4uī
+tí3q
+2tírp
+tí2s
+tí3sp
+tís4tat
+tí3s4te
+tí3s4tē
+tí3s4to
+tí3s4tÅ
+tí3s4tr
+tís3u
+4títer
+4títib
+4títim
+4títua
+4títuÄ
+4títuē
+4títui
+4tí3tuī
+4títuo
+4títuÅ
+tí3tur
+4títuu
t2l
-t2r
-2tm
-2tn
+t3li
+t3lī
+t3lÄ­
+t3lí
+2t1m2
+tme1
+tmÄ­2
+2t1n
+t3ne
+t2o
+to3b2
+to4cue
+to2ia
+to2iá
+to2iæ
+to2iǽ
+to2ie
+to2ié
+to2ii
+to2ií
+to2í
+2tola
+tom2
+ton3g4
+tongæ3
+tongÇ£Ì5
+tongǽ3
+to3ni
+to5ni5c
+tons3t
+ton2u
+2t3o2pe
+to3rī
+tos3t
+t2Å
+tÅ3d
+tÅ2ia
+tÅ2iÄ
+tÅ2iá
+tÅ2iæ
+tÅ2iÇ£
+tÅ2iǽ
+tÅ2ie
+tÅ2iÄ“
+tÅ2iÄ«
+tÅ2iÅ
+tÅ2Ä­
+2tÅl
+2tÅÌl
+t2Å
+tÅb2
+tÅm2
+tÅn3g4
+tÅngæ3
+tÅngÇ£Ì5
+tÅngǽ3
+2t3ÅpÄ•
+tÅ3rÄ•
+tÅ3rÄ«
+tÅÌ3rÄ­
+tó2cu
+2tólo
+tó2pe
2tp
+tpo3
+tpó1
2tq
-2tt
-2t.
-.t2
-x1
-2x.
-.x2
-1x2a
-1x2e
-1x2i
-1x2it.
-1x2o
-1x2y
-xy3s2t
-1xu2a
-1xu2e
-1xu2i
-1xu2o
-1xu2u
-1x2u.
-1x2um.
-1x2us.
-y3c2n
+t3qu
+t2r2
+trab2
+tra3d4
+tradi5ce
+tradi5cé
+tradi5ci
+tradi5cí
+trado3
+tra3e4t
+tra3g
+tra3i4
+3tral
+tra5ma
+tra5má
+4trang
+4tratē
+trÄ3Ä­
+tră3bŭ
+trăd2
+tră3g
+4trăng
+tră3s2
+3trăt
+4trătē
+4trăÌng
+trăÌ5st
+trá3i
+3trál
+4tráng
+trá3p2
+trá2s3
+træ2ă
+trǣ2ă
+3tre.
+tre2i
+tre5mi
+tre5mo
+2trep
+3treq
+3treu
+3trev
+trē2i
+trē3m
+trĕ2ĭ
+2trĕp
+4trÄ•Ìp
+2trép
+3tria
+3trib
+tri5ci
+4trict
+4trida
+4tridá
+4tride
+4tri5do
+4tridó
+2trig
+3trige
+3trigé
+3trii
+3triī
+3trií
+2tr4in
+tri3ni
+3trio
+3triÅ
+3trió
+3trit
+2trīd
+2trīg
+4trīnx
+tr4Ä«Ì
+4trÄ«Ìd
+4trÄ«Ìg
+4trÄ«Ìnx
+3trĭă
+3trÄ­b
+4trÄ­ct
+4trÄ­gÄ­
+4trÄ­gÅ­
+2tr4Ä­n
+3trÄ­s
+3trÄ­t
+3trÄ­Å­
+4trÄ­Ìct
+4trÄ­ÌgÄ­
+4trÄ­ÌgÅ­
+4trÄ­Ìn
+3tría
+4tríct
+4trída
+4trído
+4trídu
+4trígi
+4trígu
+4tríng
+4trínx
+trí5tur
+tro3e
+4troph
+trÅ4iÄ“
+4trÅÌm
+4trÅph
+trÅ2s
+tró3ea
+tró3eÄ
+2tróm
+4tróph
+4truct
+3trud
+3trus
+2trux
+4trūct
+3trūd
+3trūs
+2trūx
+3trÅ«Ìd
+3trÅ«Ìs
+4trÅ«Ìx
+2trÅ­Ä­
+2trÅ­Å
+2trúc
+3trúd
+2trúi
+3trús
+2trúx
+2t1s2
+2tt2
+tte2i
+tte5re
+ttē2i
+ttĕ3r
+3tua
+3tuÄ
+3tuá
+tu2cu
+tu2d3u
+2t1ue
+t2uea
+t2ueÄ
+t2ueá
+t2ueb
+3t2uem
+3t2uen
+tu3enn
+t2ueo
+t2ueó
+3t2ueq
+t2uer
+3tuer.
+3tuere
+3tueri
+3tuerí
+3tuern
+3tuerq
+3tueru
+3tuerv
+3t2ues
+3t2uet
+3t2ueu
+3tuev
+3tuē
+2t1uĕ
+3tué
+tu3énn
+2t3uic
+3tuīs
+3tul
+tule4i
+tu3ma
+tum2e
+tu3m2Ä«
+3t2uo
+tuo2r
+3tuÅ
+3tuó
+tupe3r4
+ture5ia.
+ture5iaq
+ture5iau
+ture5iav
+ture5ii
+ture5ií
+ture5io
+ture5ió
+turé3
+tu2sp
+3tut
+3tuun
+tū2c1
+tū2su
+tū3sum
+tū3sus
+3tÅ­a
+3tÅ­Ä
+3tŭă
+3tŭæ
+3tÅ­Ç£
+3tÅ­c
+3tÅ­Ä“
+3tÅ­Ä•
+3tÅ­l
+tŭ3mă
+tÅ­m2Ä•
+tÅ­3m2Ä«
+tÅ­3mÄ­
+tÅ­3mÅ
+3tÅ­Å
+3tÅ­Å
+tŭpĕ3r
+tÅ­2s
+tÅ­Ì3mÄ­
+tú2cu
+tú2du
+túm2i
+2tv
+t3ve
+2tȳ
+tý3l
+uab2
+uab4u
+1uac
+ua3d2
+uad4o
+uae4st
+2uaev
+u2a3g
+ual4u
+u2a1m
+u2an
+ua3p2
+u2a3q
+u2ar
+u2as
+uas3p
+uas3t
+uas5te
+uas5tr
+ua4sui
+ua4suí
+u2au
+2uav
+ua2x3
+uaÍže4st
+ua͡e4st
+u2Ä
+1uÄd
+2uÄv
+2uÄÌv
+u2ă
+uă3d2
+uă3g
+uă2m1
+uăs3p
+uăs5tr
+2uăv
+uăÌs3
+1uác
+1uád2
+u2ág
+u2ám
+u2án
+uá3p2
+u2ár
+uás3p
+uá4sui
+u2áu
+2uáv
+uá2x
+2uæd
+uæ2dī
+uæ2dí
+u2æq
+uæ2s3t
+u2æu
+2u2æv
+u2Ç£q
+uǣ2s3t
+u2Ç£u
+2u2Ç£v
+uÇ£Ì2d
+uÇ£Ì3r
+2u1ǽ2d
+u2ǽq
+uǽ2s3t
+u2ǽu
+u2ǽv
+uba3g
+uba4i
+ub2ă
+ubá3g
+ube2i
+ube4rÄ
+u5bere.
+u5bereq
+u5bereu
+u5berev
+ub4eris
+ub4erís
+ube4rÅ
+u5berum
+ubē2r
+ubé4ia.
+ubé4iae
+ubé4iam
+ubé4ias
+ubé4ia͡
+ubé4iæ
+ubé4ii
+u3bére
+2ubi
+ubi2b
+ub3ice
+ub4ii.
+ub4iin
+ub4iiq
+ub4iiu
+ub4iiv
+ub4iín
+ub4iíq
+ub4iíu
+ub4iív
+u3biÅ
+u3bió
+ub2iq
+ubi2u
+ub4iue.
+u3bium
+u3biú
+ubi2v
+ub4ive.
+u2bī2
+ub2Ä«4n
+ub2Ä«q
+ub4Ä«ue.
+ub4Ä«ve.
+ubÄ«Ì2
+ub4Ä«Ì4n
+ub4Ä«Ìq
+ub6Ä«Ìue.
+ub6Ä«Ìve.
+2ubí
+ubí2b
+ubí2c
+ub2íq
+ub3íss
+ub3íst
+ub4íue.
+ub4íve.
+u2bl
+ubo2
+u2bÅ
+ubÅ3
+u3b2Å“
+u2b1r
+ub3s2
+ub5ste
+u3b2ul
+u2b1Å«
+u3búl
+2uc
+u3ca
+u3cá
+u3ce
+u3cé
+u3ci
+u3cí
+u3c2o
+uco2i
+uco5n4i5
+ucon4í
+u3có
+u3cr
+u2c3ue
+u3cun
+u3cú
+2ud
+ud2ac
+u3dam.
+u3damq
+u3damv
+u2d3ap
+u3da͡
+ud2Ä
+u2dăp
+u3dámn
+u3dámq
+u3dámv
+u3dæ
+u3dǽ
+u3de.
+u3dene
+u3deq
+ude2s3
+ude6ste
+u3deu
+u3dev
+udē2s
+u3déne
+u3déq
+u3déu
+u3dév
+u3d2i
+udi4g3
+u4diso
+u4disó
+u3dí
+ud2o
+ud4or
+u3dorú
+u3dos
+ud2Å
+udÅ3p
+u3dós
+ud2u
+u3dú
+u2e1
+ue2a
+ue3b
+ue3d2
+ued4i
+ue2e
+2uef
+ue2Ä«
+ue2í
+4uel.
+2ueln
+2uelq
+2uelu
+2uelú
+2uelv
+ue2ma
+ue2má
+ue4mui
+ue4m3uí
+ue4n3ea
+ue4n3eá
+ue4n3eo
+ue4n3eó
+ue4n3ii
+ue4n3ií
+ue4n3íi
+2uenn
+ue2o
+ue2Å
+uer2æ3
+ue3r4e
+ue5rem
+uere5me
+uere5mé
+uer6e5mi
+uere5mí
+ue3r4Ä“
+ue5rē5m
+ue3rī
+3uert
+ue2s
+ue3sá
+ues3c
+ue3sí
+ue4s3p
+ues5pe
+ue4s3t
+ues5tÄ
+ues5te
+ues5tr
+uete5re
+uete5ri
+ueteri5u
+uete5rī
+ueterī5u
+ueterÄ«Ì7
+ue2un
+2uev
+ue3x2
+uex4e
+uē3b
+3uēnē
+3uēné
+3uēni
+uē4n3iī
+3uēnī
+uē4nīs
+uē4n3ĭī
+3uēní
+uē3r
+uēs3t
+3uēx
+uÄ“Ì4n5iÄ«
+uÄ“Ì4n5Ä­Ä«
+3uÄ“Ìx
+u2Ä•
+uĕ2ă
+uĕ2ĭ
+uĕ2m3ă
+uĕ3ră
+uĕ3r4ē
+uĕ5rē5m
+uĕ3r4ĕ
+uĕ3rī
+uÄ•3rÅ
+uĕ3rŭ
+uĕ2s3
+uĕ4sp
+uĕs5pĕ
+uĕs5tĕ
+2uĕv
+uĕ3x2
+uÄ•Ì3ră
+uÄ•Ì3rÄ•
+uÄ•Ìx2
+u2é
+1uéc
+2uéf
+1uéh
+ué1i
+1uél
+ué4n3eo
+3uéni
+ué4n3ii
+2uénn
+2uéra
+2uéro
+3uérs
+3uért
+ués3
+2uév
+1uéx2
+2uf
+2ug
+u3g2a
+u3g2æ3
+u3g2Ç£
+u3g2l
+u2g3n
+u1h
+u3hœ
+ui2a
+u2ic
+3uice
+ui4c5énn
+1uif
+uile3i
+uilé3i
+u2in
+uin2Ä
+ui3oc
+ui3o2p
+ui3óp
+ui3p2t
+ui3r4i
+ui3r4í
+u2is
+3uisc
+ui3s2i
+2uisv
+uiu2
+ui3ul
+ui3uu
+2uiv
+u2Ä«
+1uīc
+uī4cen
+uī4cĕn
+uÄ«c5Ä•Ìn
+uī4cén
+uī2ni
+uī2n3ĭ
+uī2ní
+uī3p2
+uī3q
+uī3so
+uÄ«3sÅ
+uī3u
+2uī3v
+uÄ«Ì3p2
+2uÄ«Ìv
+u2Ä­
+uĭ3ăl
+uÄ­n2a
+uÄ­n2Ä
+uĭn2æ
+uÄ­n2Ä•
+uÄ­nÄ­3t
+uÄ­1Å
+uÄ­Å2p
+uÄ­ÅÌ2
+uÄ­3Å­l
+uÄ­Ì3Å4
+u2í
+1uíc
+1uíf
+1uíg
+uí1m
+uí3o2p
+uí3p2t
+3uísa
+3uísæ
+3uíse
+3uísi
+3uíso
+uí3tur
+2uív
+1uíx
+2u3læ
+2u3lǣ
+2u3lǽ
+ule4ie
+ule6ine
+ule6iqu
+ule6iue
+ule6ive
+ulē2i
+3ulix
+3u2líx
+3ulm
+ul3ua
+ul3uá
+ul3uæ
+ul3uǽ
+u4l3ue.
+ul3uīs
+ul3uó
+u3lus
+2um.
+2uma
+u3ma.
+uma2g
+u3m2an
+u3maq
+uma4tr
+u3mau
+u3mav
+u3mÄ.
+u3mÄn
+u3mÄq
+u3mÄr
+u3mÄs
+umÄ4tr
+u3mÄu
+u3mÄv
+2u1mă
+2umá
+umá2g
+u3mán
+u3máq
+u3már
+u3máu
+u3máv
+u3mæ
+u3mǣ
+u3mǽ
+um3b2
+umb4e
+umb4Ä“
+umb4i
+um5bit
+umb6itu
+umbi5tur
+umbi5tú
+umbí5te
+2ume
+u3me.
+ume3d
+ume5de
+ume2g
+ume2q
+u3mev
+umē2g
+umÄ“Ì4g
+umé2g
+umi2b
+umi2c
+umi2n3
+uminí4c
+umi2r
+umi2u
+u2m3iū
+umi2v
+u2m1Ä«2
+umÄ«Ì4b
+umÄ«Ì4m
+umÄ«Ì4r
+umÄ«Ì4t
+umí2b
+umíni4c
+umí2r
+2umn
+2umo
+u3mo.
+u3mon
+u3moq
+u3mor
+u3mou
+u3mov
+u3m2Å
+2umÅ
+2umó
+u3món
+u3móq
+u3mór
+u3móu
+u3móv
+umpe3r
+2umq
+2umu
+u4mue
+um3uí
+u3mus
+u3mús
+2umv
+un3áni
+un3d2
+3undab
+3undáb
+une3b
+une3d
+une6ste
+un2Ä“
+2un2Ä•
+un2é
+uné3b
+2unī
+2unÄ­
+u3nos
+2unÅ
+u3nós
+un3s
+uns4i
+un4sn
+un4sq
+un4sue
+un4sv
+2unt
+unte5io
+unte5ió
+unte5iu
+unte6iue
+unte5iú
+untē3i
+untÄ“Ì5i
+unté3i
+u1n2u
+1u2o
+uob2
+uo2du
+2uoe
+uo3i
+uo4in
+uo4i3q
+uo4iue
+uo4iv
+uo4lue
+uol5uere
+uo4lui
+uo4luī
+uo4luí
+uom3p2
+uo3ni
+uo4n3ia
+uo3p2
+uo3rī
+uo2sp
+uos3t
+uos5te
+uo3u
+uo1ú
+2uoÍž
+2uo͡
+u2Å
+uÅ3d
+uÅ3i
+uÅ2sp
+uÅs3t
+uÅÌ3i
+1u2Å
+uÅ2Ä­
+2uÅn3
+uÅ2nÄ­
+uÅ3rÄ«
+uÅ4t5ăÌn
+uÅ2t3Ä•
+uÅ3Å­
+uÅÌ2n3
+u2ó
+uód1
+uó2du
+uó1i
+uó3io
+1uól
+uóm3p2
+uó4n3ia
+uó3p2
+uó2sp
+2uœ
+2up
+upe5raeq
+upe5r6ara
+upe5r6ará
+upe5r6are
+upe5raré
+upe5raro
+upe5raró
+uperas6c
+upe5raÍžeq
+upe5r6aÍžÌ
+upe5ra͡eq
+upe5r6aÍ¡Ì
+upe5ræq
+upe5rǣq
+upe5rÇ£Ì
+uper4ǽ
+upe5remn
+upere6ra
+upere6rÄ
+upere6rá
+uper5erim
+uper5erit
+uper5e6rít
+upere6ro
+upere6rÅ
+upere6ró
+upere6rú
+upe6r5é6rim
+upe6r5é6rit
+upe6résc
+uperi4
+upe4r5ie
+uper5ié
+upe4rī4
+uper5Ä«m
+uper5Ä«t
+uper5Ä«Ì6m
+uperÄ«Ì6r
+uper6Ä«Ìs
+uper5Ä«Ì6t
+uper6Ä«Ìu
+uper6Ä«Ìv
+upe4rí4r
+uper5íte
+uper5íto
+uper4íu
+uper4ív
+upe5rorn
+upe5ros
+upe5rÅs
+upe5rÅÌs
+upĕ3rĕ
+upĕ3rī
+upĕ3rŭ
+u3pé
+upé4r5ea
+upé4r5eÄ
+upé4r5eo
+upé4r5eÅ
+upé4r5e4r
+upé4ri.
+upé4r5ie
+upé4r5iē
+upo4s3
+u3pÅ
+2uq
+u3qu
+2ur.
+u1r2a
+u3ra.
+urad2
+u3rae
+u3rane
+u3raq
+u3rarú
+u3rau
+u3rav
+u3ra͡
+2urÄ
+2u3r2ă
+u3ráe
+u3ráne
+u3ráq
+u3ráu
+u3ráv
+2u3ræ
+2u1rǣ
+2u3rǽ
+u1r2e
+ure3d
+ure2i
+ure5iae
+ure5iam
+ure5iar
+ure5ias
+ure5ia͡
+ure5iáe
+ure5iám
+ure5iáq
+ure5iár
+ure5iás
+ure5iáu
+ure5iáv
+ure3iæ
+ure3iǽ
+ure5ium
+ure3iú
+ures3t
+2u3rē
+urē3ia
+urÄ“5iÄ.
+urÄ“5iÄq
+urÄ“5iÄr
+urÄ“5iÄs
+urÄ“5iÄu
+urÄ“5iÄv
+urÄ“5iÄÌq
+urÄ“5iÄÌr
+urÄ“5iÄÌs
+urÄ“5iÄÌu
+urÄ“5iÄÌv
+urē3iu
+urē3iú
+urÄ“Ì3i
+2u1rĕ
+ur2é
+u3réf
+u1rh
+u1r2i
+u3ria
+u3riá
+u3riæ
+u3riǽ
+u3rii
+u3rií
+ur4in
+uri3ni
+2urio
+2urió
+2u1rī
+2urÄ­
+ur2í
+u3ría
+2urío
+urí5tur
+2urn
+2u1r2o
+2u1rÅ
+2u1r2Å
+ur2ó
+u3rós
+2urq
+ur3ua
+ur3uÄ
+ur3uá
+ur3uē
+ur2ui
+u3rum
+ur3uÅ
+ur3uó
+u3rus
+2u1rÅ­
+ur2ú
+u3rúm
+u3rús
+u1ry
+u1rý
+2us
+us2a
+usa3b2
+u3s2ă
+usă3b2
+usá4tr
+u2s3c
+use2i
+us2i
+u2sm
+u1sp
+us5per
+u2spē
+us2pĕ
+us4pit
+us2pÄ­
+us2pí
+us4pít
+u2s3q
+u2sta
+u2stÄ
+u2stă
+u2stá
+u2stæ
+u2stǣ
+u2stǽ
+u2ste
+us5ter
+u2stē
+u2stĕ
+us5tĕr
+u2sté
+u2sti
+u2stī
+u2stí
+u3s4tom
+u2stÅ
+u3s4tÅm
+u5s4tÅÌm
+u3s4tóm
+u2s3tr
+us5tro
+u2stu
+u2stÅ­
+u2stú
+us2ua
+4u2sue
+u2suĕ
+u2sui
+u2suí
+1ut.
+3u4tar.
+3u4tarn
+3u4tarq
+3u4tarv
+3u4tárn
+3u4tárq
+3u4tárv
+3u2teb
+ute2Ä«
+ute3r4a
+ute3rǣ
+ute5re
+ute3ri
+uteri5ue
+uteri5v
+ute5rī
+uterī5u
+uterī5v
+ute3ro
+ute3rÅ
+utĕ1
+utĕr4a
+utĕ5rī
+utĕrī5u
+utĕrī5v
+utĕ5r4ĭ
+3u2téb
+2utia
+2utiá
+2utiæ
+2utiǽ
+2utii
+2utií
+u2til
+2utio
+u2tíl
+3u2trÄ
+3u2træ
+3u2trǣ
+3u2trǽ
+ut4ri
+3u2trī
+3u2trÅ
+3u2tru
+3u2trú
+ut2u
+ut3ut
+u1u
+2u3ue
+2uuĕ
+1u2ul
+uul3ui
+uul3uī
+uul3uí
+u2um1
+u2un
+u2u1r
+u2uu
+u2uv
+uū2s
+1uÅ­
+1uúl
+uúl3u
+uú1r
+2u3ve
+ux2
+u3xe
+ux4eu
+u3xé
+u3xi
+uxi3n
+u3xí
+u2xo3
+u2xÅ
+uxu3
+u2x3ue
+ux4us
+uy2s
+Å«1
+Å«b2
+Å«ba2
+Å«bÄ6iÄne
+Å«bÄ6iÄru
+Å«bÄ6iÄrú
+Å«bÄ6iæne
+Å«bÄ6iæue
+Å«bÄ6iæve
+Å«bÄ6iÇ£ne
+Å«bÄ6iÇ£ue
+Å«bÄ6iÇ£ve
+Å«bÄ6iǽne
+Å«bÄ6iǽue
+Å«bÄ6iǽve
+ūbá2
+Å«be3ri
+Å«be3rÅ
+ūbĕ3rŭ
+ūbī3u
+ūbī3v
+Å«bo2
+Å«ca2r
+Å«co2
+Å«3cr
+Å«2c3ue
+Å«d2
+Å«3da.
+Å«3dam
+Å«3dane
+Å«3daq
+Å«da2r
+Å«3dau
+Å«3dav
+Å«3daÍž
+ū3da͡
+ū3dă.
+ū3dăm
+ū3dănĕ
+ū3dăq
+ū3dău
+ū3dăv
+Å«3dăÌm
+ūdá2
+ū3dám
+2ū3dæ
+2ū3dǣ
+2ū3dǽ
+Å«3de.
+Å«3dene
+Å«3deq
+Å«de2s3
+Å«de6ste
+Å«3deu
+Å«3dev
+ū3dē.
+ū3dēn
+ū3dēq
+ūdē2s
+ū3dēu
+ū3dēv
+Å«3dÄ“Ìn
+Å«3dÄ“Ìq
+Å«3dÄ“Ìu
+Å«3dÄ“Ìv
+ū3dĕ.
+ū3dĕnĕ
+ū3dĕq
+ūdĕ6stĕ
+ū3dĕu
+ū3dĕv
+2ū3dī
+Å«do2
+Å«d4or
+Å«3dÅr
+Å«3dÅs
+Å«3dÅÌr
+Å«3dÅÌs
+ūdó2
+2Å«3du
+2Å«3dÅ­
+2ū3dú
+Å«2Ä“
+2Å«g
+Å«3g2a
+ū3g2æ3
+Å«3g2Ç£
+Å«2gn
+ū3iú
+1Å«l
+Å«2la
+Å«2lÄ
+ū2lă
+ū2lá
+Å«le3i
+Å«le2r
+ūlé3i
+Å«2lo2
+Å«2lÅ
+ū2ló
+Å«2l3ue
+Å«m2a
+Å«ma2r
+ūmá2
+Å«m2e
+Å«m2Ä•
+Å«m2i
+Å«m2Ä­
+Å«mo2
+Å«na2
+Å«n2Ä
+ūnă2
+ūná2
+ūn3áni
+Å«ne3b
+Å«ne6ste
+Å«n3et
+ūnĕ6stĕ
+Å«n3Ä•t
+ūn2é
+ūné3b
+2Å«ni
+2Å«nÄ­
+2ūní
+Å«no2
+Å«3nÅr
+Å«3nÅs
+2Å«ns
+Å«n3s2i
+Å«n3s4Ä­
+Å«n2u
+Å«n2Å­
+Å«pe3r2
+ūpĕ3r
+ūpĕ5rĭ
+2Å«q
+Å«r2a
+Å«ra2r
+ūr2ă
+2ūræ
+ūræ2ă
+2ūrǣ
+ūrǣ2ă
+2ūrǽ
+Å«r2e
+Å«res3
+ū3rēu
+ū3rēv
+Å«r2Ä•
+ūrĕ2ĭ
+ūrĕ2s3
+ūr2é
+ū3réf
+Å«r2i
+Å«r4in
+Å«r2Ä­
+Å«r4Ä­n
+ūrí2n
+Å«ro2
+ūró2
+Å«r2u
+Å«2sc
+Å«s2ie
+ūs2iē
+Å«s2iu
+Å«so2
+Å«2sp
+Å«s5per
+ūs5pĕr
+Å«2s3q
+Å«2s3t
+Å«s5ter
+ūs5tĕr
+Å«2sue
+ū2suĕ
+ūs2uī
+Å«t2
+Å«ta2r
+ūtá2
+Å«te5re
+ūtĕ3rĕ
+2Å«3tia
+2Å«3tiÄ
+2ū3tiá
+2ūtiæ
+2ūtiǣ
+2ūtiǽ
+2ū3tiī
+2Å«tÄ­a
+2Å«3tÄ­Ä
+2ūtĭá
+2ūtĭæ
+2Å«tÄ­Ç£
+2ūtĭǽ
+2Å«3tÄ­Ä«
+ūtí2n
+Å«to2
+2Å«u
+2Å«v
+Å«x2
+Å«x4eu
+Å«2x3ue
+Å«x4us
+ūxū3r
+Å«2Ì
+Å«Ìb2
+Å«Ì3cr
+Å«Ìd2
+2Å«Ìg
+Å«Ì1i
+Å«Ì2lÄ
+Å«Ì4lă
+Å«Ì4lÄ•r
+Å«Ì4lÄ•t
+Å«Ì2lo
+Å«Ì2lÅ
+Å«Ì3mu
+Å«Ìn3si
+2Å«Ìq
+Å«ÌrÄ­5m
+Å«Ìr2u
+Å«Ì2sp
+Å«Ìs5pe
+Å«Ì4st
+Å«Ìs5tr
+4Å«Ìtia
+4Å«Ì3tiÄ
+4Å«Ìtiæ
+4Å«ÌtiÇ£
+4Å«Ì3tiÄ«
+Å«Ì4til
+4Å«ÌtÄ­a
+4Å«ÌtÄ­Ä
+4Å«Ìtĭæ
+4Å«ÌtÄ­Ç£
+4Å«ÌtÄ­Ä«
+Å«Ì4tÄ­l
+2Å«Ìu
+2Å«Ìv
+ŭă3p2
+ŭăÌ3p2
+ŭbē2r
+ŭbĕ2
+ŭbĕ4r
+Å­bÄ•Ì2
+Å­2bi
+ŭ2bī2
+Å­b2Ä«n
+Å­b2Ä«q
+ŭb4īuĕ.
+ŭb4īvĕ.
+Å­bÄ«Ì2
+Å­b4Ä«Ìn
+Å­b4Ä«Ìq
+Å­bÄ«Ì4t
+Å­b6Ä«ÌuÄ•.
+Å­b6Ä«ÌvÄ•.
+ŭ3bĭă
+Å­bÄ­3cÅ­
+Å­3bÄ­Ä«s
+Å­5bÄ­Ä«Ìs
+Å­3bÄ­Å
+Å­b3Ä­t.
+Å­3bÄ­Å­
+Å­3bÄ­Ìă
+Å­bÄ­Ì4c
+Å­bÄ­Ì4g
+Å­2bl
+Å­2bÅ
+Å­2bÅ2
+Å­2b1r
+Å­bs2
+ŭb5stĕ
+Å­2b1Å«
+Å­3b2Å­l
+Å­2cu
+ŭdē2s
+Å­2du
+Å­3d2Å­
+Å­d4Å­Ä•
+ŭĕ2ă
+Å­3Ä•nn
+Å­Ä•3r4Ä•
+ŭĕ3rī
+Å­Ä•3rÅ­
+Å­3Ä•Ìnn
+Å­3g2a
+ŭ3g2æ3
+Å­3g2Ç£
+Å­2gn
+Å­1i
+Å­Ä«3p2
+Å­Ä«Ì3p2
+Å­2Ä­
+Å­Ä­n2
+2Å­Ä­s
+2Å­la
+2ŭlá
+2ŭlæ
+2ŭlǣ
+2ŭlǽ
+ŭlē3i
+Å­lÄ“Ì3i
+1Å­lm
+Å­2l1u
+Å­m1
+2Å­m.
+Å­3ma
+Å­3mÄ.
+Å­3mÄn
+Å­3mÄq
+Å­3mÄr
+Å­3mÄs
+Å­mÄ4tr
+Å­3mÄu
+Å­3mÄv
+ŭmă2
+ŭ3mă.
+ŭ3măn
+Å­măÌ2
+ŭ3má
+ŭ3mæ
+ŭ3mǣ
+ŭ3mǽ
+1Å­m3b
+Å­mb4Ä“
+Å­mb4Ä­
+Å­m5bÄ­t
+ŭmē2g
+Å­m2Ä“s
+Å­m2Ä“Ì
+Å­mÄ“Ì4g
+ŭ3mĕ.
+ŭ3mĕn
+ŭmĕ2q
+ŭ3mĕu
+ŭ3mĕv
+Å­2m3i
+ŭ2mī2
+Å­mÄ«Ì4b
+Å­mÄ«Ì4m
+Å­mÄ«Ì4r
+Å­mÄ«Ì4t
+Å­2mÄ­2
+Å­mÄ­n3
+Å­mÄ­nÄ­Ì4
+Å­m3Ä­t
+Å­mÄ­Ì4c
+Å­mÄ­ÌnÄ­6c
+Å­mÄ­Ì4t
+2Å­mn
+Å­3m2Å
+Å­2mÅ
+ŭmpĕ3r
+2Å­mq
+2Å­mu
+Å­3mÅ­s
+2Å­mv
+Å­n3d2
+ŭndĕ3ŭ
+Å­n2Ä“
+Å­n2Ä•
+ŭnĕ3d
+2Å­nt
+Å­ntÄ“Ì5i
+Å­Å2r1
+ŭpĕ5raeq
+ŭpĕ5ra͞eq
+Å­pÄ•5r6aÍžÌ
+ŭpĕ5ra͡eq
+Å­pÄ•5r6aÍ¡Ì
+Å­pÄ•r5ăÌs
+ŭpĕ5ræq
+ŭpĕ5rǣq
+Å­pÄ•5rÇ£Ì
+ŭpĕrĕ4
+Å­pÄ•4rÄ•Ä
+ŭpĕ4rĕă
+Å­pÄ•4r5Ä•Å
+Å­pÄ•6r5Ä•rÄ
+ŭpĕ6r5ĕră
+ŭpĕ6r5ĕrĭ
+Å­pÄ•6r5Ä•rÅ
+Å­pÄ•rÄ•Ì4
+Å­pÄ•6r5Ä•ÌrÄ­
+ŭpĕ4r3ī4
+ŭpĕr4īs
+Å­pÄ•rÄ«Ì4
+Å­pÄ•r6Ä«Ìs
+ŭpĕ4r3ĭ4
+Å­pÄ•rÄ­Ì4
+Å­pÄ•5rÅÌs
+Å­pÄ•Ì6r5Ä•Ä
+Å­pÄ•Ì6r5ĕă
+Å­pÄ•Ì6r5Ä•Å
+Å­pÄ•Ì6r5Ä•6r
+Å­pÄ•Ì6r5Ä­Ä“
+Å­r1
+Å­1r2a
+Å­r2Ä
+ŭ1r2ă
+ŭ1r2æ
+Å­1r2Ç£
+ŭr2ǽ
+Å­3r2Ä“
+ŭrē3i
+Å­rÄ“Ì3i
+Å­1r2Ä•
+Å­1r2Ä«
+Å­3r2Ä­
+Å­1r2Å
+Å­1rÅ
+Å­1rÅ­
+2Å­s.
+Å­2s3Ä2
+Å­sÄÌ2
+Å­2s3c
+Å­2si
+2Å­sn
+Å­1sp
+ŭ2spē
+2Å­sq
+Å­s3t
+ŭs5tĕr
+Å­s4trÄ­
+Å­s5trÅ
+2Å­su
+2Å­sv
+1Å­t.
+ŭtĕ2ī
+ŭtĕ3rĕ
+ŭtĕ5rī
+ŭtĕrī5u
+ŭtĕrī5v
+ŭtĕ3rŭ
+Å­2tÄ­.
+1Å­2tr
+Å­2tu
+Å­1u
+1Å­2x2
+Å­Ì2
+Å­ÌbÄ•2
+Å­Ìb4Ä­Ä«
+Å­Ìbs2
+Å­Ì3bÅ­
+Å­Ì3cÄ•
+Å­Ì3cÄ«
+Å­Ì3cÄ­
+Å­Ì3cl
+Å­Ì3dÄ“
+Å­Ì3dÄ•
+Å­Ì3dÄ­
+Å­Ì3g
+Å­Ì4gn
+Å­Ì3i
+Å­Ì3j
+2Å­Ìlă
+Å­Ì3lÄ«
+Å­Ì3lÄ­
+Å­Ìl3u
+Å­Ì3lÅ­Ä«
+Å­Ì3lÅ­Ä­
+Å­Ìm3ă4r
+Å­Ìm3b4
+Å­Ìm5bÄ­
+Å­Ìm3Ä•Ä
+Å­Ìm3ĕă
+Å­Ì3mÄ•n
+Å­Ìm3Ä•Å
+Å­Ìm3Ä•Å
+Å­Ì3mÄ•q
+Å­Ì3mÄ•u
+Å­Ì3mÄ•v
+Å­Ìm3Ä«
+Å­Ìm3Ä­4c
+Å­Ìm3Ä­Ä“
+Å­Ìm3Ä­Ä­
+Å­Ì3mÄ­n
+Å­Ìm3Ä­4t
+2Å­Ìmn
+2Å­Ìmq
+2Å­Ìmu
+Å­Ì3mÅ­
+2Å­Ìmv
+Å­Ì3nÄ“
+Å­Ì3nÄ•
+Å­Ì3nÄ­
+Å­Ì3pÄ•
+Å­Ì3ră
+Å­Ì3rÄ•
+Å­Ì3r2Ä­
+Å­Ì3rÅ
+Å­Ì3sÄ­
+2Å­Ìsn
+Å­Ì3spÄ•
+Å­Ìs3t
+Å­Ìs4trÄ­
+2Å­Ìsu
+2Å­Ìsv
+Å­Ì3tă
+Å­Ì3tÄ•
+3Å­Ì4tr
+1Å­Ìu
+Å­Ì3uÄ
+Å­Ì3uă
+Å­Ì3uÄ“
+Å­Ì3uÄ•
+Å­Ì3uÅ
+Å­Ì3uÅ
+1Å­Ìv
+Å­Ì3vÄ
+Å­Ì3vă
+Å­Ì3vÄ“
+Å­Ì3vÄ•
+Å­Ì3vÅ
+Å­Ì3vÅ
+úbe4ram
+úbe4rÄ
+úb4eris
+ú5berum
+úb4ii.
+ú3b4iis
+ú3biÅ
+ú3b2iu
+úbi5ui
+úbi5vi
+ú2bī
+úb2o
+úb3s2
+úb5ste
+ú3b2u
+2úc
+ú2c3ue
+úd2i
+úd3ue
+úe1
+úe2a
+úe2o
+2úg
+ú3g2a
+ú3gæ
+ú3gǣ
+ú2g3n
+ú1iæ
+ú1ii
+ú2in
+ú2la.
+ú2lat
+ú2let
+ú2lu
+úl3ua
+úl3uæ
+úl3ue
+úl3uis
+úl3uīs
+ú3lum
+úm1
+ú1ma
+úma2g
+ú3m2an
+ú3maq
+úma2r
+ú3mau
+ú3mav
+úm3b2
+úmb4e
+úmb4ē
+úmb4i
+úm5bi5t
+úmb6itu
+úm2e
+ú2m3eÄ
+ú2m3eÅ
+úmi2c
+úm2im
+úm2in
+úm2iu
+ú2m3ī
+2úmn
+ú1mo
+2úmq
+2úmu
+ú3mun
+2úmv
+5úndans
+3úndÄn
+2úni
+ún3s4i
+2únt
+ú1n2u
+úpe1
+úpe3r
+2úq
+úr1
+ú1r2a
+2ú1ræ
+ú1r2e
+ú1r2i
+2úrn
+ú1r2o
+2úrq
+ú3r2ui
+úru3m
+ú2run
+ú2s3c
+ús2i
+2úsn
+ús3q
+ús3t
+2úsu
+ú2sui
+2úsv
+ú2tar
+úte3r
+2ú3tia
+2útiæ
+2ú3tii
+ú2til
+ú1u
+2úue
+ú2um
+ú2un
+2úve
+2úx
+úx2a
+úx4eu
+úx2i
+úx2o
+ú2xue
+úx4us
+1v
+vab2
+va3d2
+vad4o
+va3g
+val4u
+vas3p
+vas5te
+v2ă
+vă3d2
+vă3g
+văs3
+văÌs3
+v3áed
+vás3p
+2væ2d
+vǣ2d
+vÇ£Ì2d
+2v1ǽ2d
+vb2
+vbi2
+ve1
+ve2a
+ve2ia
+ve2iá
+ve4iene
+ve2ii
+ve2ií
+ve4io.
+ve4ioq
+ve4ior
+ve6ioue.
+ve6iove.
+ve4ión
+ve4ióq
+ve4iór
+ve6ióue.
+ve6ióve.
+ve2iu
+ve2iú
+ve2Ä«
+ve2í
+ve2lu
+ve4n3ea
+ve4n3eá
+ve4n3eo
+ve4n3eó
+ve4n3ii
+ve4n3ií
+ve4n3íi
+2venn
+ve2o
+ve2Å
+ver2æ3
+ve3rē
+ve2s
+ve3sá
+ve3sí
+ve4s3p
+ves5pe
+ve4s3t
+ves5te
+ves5tr
+vete5re
+vete5ri
+veteri5v
+vete5rī
+veterī5v
+veterÄ«Ì7
+ve2u
+vex2
+vex4e
+vē4iae.
+vē6iaene
+vē6iaeque
+vē6iaeue
+vē6iaeve
+vē4iam
+vē4ian
+vē6ia͞e.
+vē6ia͞ene
+vē6ia͞eque
+vē6ia͞eue
+vē6ia͞eve
+vÄ“6iaÍžÌene
+vÄ“6iaÍžÌeque
+vÄ“6iaÍžÌeue
+vÄ“6iaÍžÌeve
+vē6ia͡e.
+vē6ia͡ene
+vē6ia͡eque
+vē6ia͡eue
+vē6ia͡eve
+vÄ“6iaÍ¡Ìene
+vÄ“6iaÍ¡Ìeque
+vÄ“6iaÍ¡Ìeue
+vÄ“6iaÍ¡Ìeve
+vÄ“4iÄ.
+vÄ“4iÄne
+vÄ“6iÄque
+vÄ“4iÄru
+vÄ“4iÄrú
+vÄ“4iÄs.
+vÄ“6iÄsne
+vÄ“6iÄsque
+vÄ“6iÄsue
+vÄ“6iÄsve
+vÄ“4iÄue
+vÄ“4iÄve
+vÄ“6iÄÌne
+vÄ“6iÄÌque
+vÄ“6iÄÌru
+vÄ“6iÄÌsne
+vÄ“6iÄÌsque
+vÄ“6iÄÌsue
+vÄ“6iÄÌsve
+vÄ“6iÄÌue
+vÄ“6iÄÌve
+vē6iáene
+vē6iáeque
+vē6iáeue
+vē6iáeve
+vē4iám
+vē4iæ.
+vē4iæne
+vē6iæque
+vē4iæue
+vē4iæve
+vē4iǣ.
+vē4iǣne
+vē6iǣque
+vē4iǣue
+vē4iǣve
+vÄ“6iÇ£Ìne
+vÄ“6iÇ£Ìque
+vÄ“6iÇ£Ìue
+vÄ“6iÇ£Ìve
+vē4iǽne
+vē6iǽque
+vē4iǽue
+vē4iǽve
+vē4iene
+vē4iī.
+vē4iīne
+vē6iīque
+vē4iīs.
+vē6iīsne
+vē6iīsque
+vē6iīsue
+vē6iīsve
+vē4iīue
+vē4iīve
+vÄ“6iÄ«Ìne
+vÄ“6iÄ«Ìque
+vÄ“6iÄ«Ìsne
+vÄ“6iÄ«Ìsque
+vÄ“6iÄ«Ìsue
+vÄ“6iÄ«Ìsve
+vÄ“6iÄ«Ìue
+vÄ“6iÄ«Ìve
+vÄ“4iÅ.
+vÄ“4iÅne
+vÄ“6iÅque
+vÄ“4iÅru
+vÄ“4iÅrú
+vÄ“4iÅs.
+vÄ“6iÅsne
+vÄ“6iÅsque
+vÄ“6iÅsue
+vÄ“6iÅsve
+vÄ“4iÅue
+vÄ“4iÅve
+vÄ“6iÅÌne
+vÄ“6iÅÌque
+vÄ“6iÅÌru
+vÄ“6iÅÌsne
+vÄ“6iÅÌsque
+vÄ“6iÅÌsue
+vÄ“6iÅÌsve
+vÄ“6iÅÌue
+vÄ“6iÅÌve
+vē2iu
+vē2iú
+vē4n3iī
+vē4nīs
+vē4n3ĭī
+vē3r
+vÄ“Ì4n5iÄ«
+vÄ“Ì4n5Ä­Ä«
+v2Ä•
+vĕ2ă
+vĕ3rē
+vĕ3r4ĕ
+vĕ2s3
+vĕ4sp
+vĕs5pĕ
+vĕs5tĕ
+vĕ3x2
+vÄ•Ì3rÄ•
+vÄ•Ìx2
+vé2lu
+vé4n3eo
+vé4n3ii
+2vénn
+vés3
+véx2
+v2i
+vi2a
+vi4c5énn
+vid4u
+vin2Ä
+vi3r4i
+v2Ä«
+vī4cen
+vī4cĕn
+vÄ«c5Ä•Ìn
+vī4cén
+vī3so
+vÄ«3sÅ
+v2Ä­
+vÄ­n2a
+vÄ­n2Ä
+vĭn2æ
+ví3d
+ví3tu
+2vj
+2voe
+vo3l4u
+vo1n
+vo3rī
+vos3t
+vos5te
+2voÍž
+2vo͡
+vÅs3t
+vÅ3rÄ«
+vó3l2u
+vó3ru
+2vœ
+vr2a
+vri2
+v̄2
+v̆2
+v̆Ì2
+v̆Ì4t
+vÌ2
+1x1
+xab2
+xae2
+x2aeq
+xaes3
+x2aeu
+x2aev
+x2ag
+2xal
+xam4b3i4
+xambī4
+xambÄ«Ì4
+xam4b3í4
+x2ami
+x2an
+x2aq
+x2are
+x2aru
+xas3
+x2Äg
+x2Än
+x2Äri
+x2Äru
+x3ÄÌc
+3xă.
+3xăm
+xămbī4
+xămbÄ«Ì4
+xăm4b3ĭ
+3x2ăn
+3x2ăq
+3x2ăr
+xăs3
+3x2ăt
+3x2ău
+3x2ăv
+3xăÌ
+x2ăÌn
+x2ăÌr
+x2á
+x3ác
+x3áes3
+2x3ál
+x3ámb
+xám4b3i
+x3árs
+xás3
+x3áud
+xæ2
+x2æ3q
+xæs3
+x2æ3u
+x2æ3v
+xǣ2
+x2Ç£3q
+xǣs3
+x2Ç£3u
+x2Ç£3v
+x2Ç£Ìq
+xÇ£Ìs3
+x2Ç£Ìu
+x2Ç£Ìv
+x2ǽq
+xǽ2s3
+x2ǽu
+x2ǽv
+2xc2
+xcí3
+x2e1
+xe2a
+xe2e
+x3e4ger
+x3e4gér
+x3e2gi
+x3e2gí
+xe2i
+xe2Ä«
+xe2í
+x3emp
+x3enn
+xe2o
+xe2Å
+xe4qui
+xe4quī
+x3erc
+xe2s
+x3e2u
+3x4eue
+x2Ä“
+x3Ä“2ge
+x3ē4gēr
+x5Ä“4gÄ“Ìr
+x3ē2gĕ
+x3ē2gé
+x3Ä“2gi
+x3ē2gī
+x3Ä“2gÄ­
+x3ē2gí
+x3Ä“Ì2g
+xĕ2ă
+x3ĕăr
+x3ĕăt
+2x2Ä•d
+x3Ä•nn
+2x3Ä•Å
+x3ĕ4quī
+xĕ4quĭ
+x2Ä•rÄ
+x2ĕră
+xĕ3r4ĕ
+x2Ä•rÄ­
+x2Ä•rÅ
+x2Ä•t
+x3Ä•Å­n
+x2Ä•Ìd
+xÄ•Ì2q
+x2é
+x3é2g
+x3émp
+x3énn
+xé4qui
+x3érc
+2xh
+x2ia
+x2iÄ
+x2iæ
+x2iǣ
+xi2ba
+xi2bá
+xi2be
+xi2bé
+xi2bi
+xi2bí
+xi2bo
+xi2bó
+xi4bun
+xi4bún
+x2ic
+2xie
+3x2ies
+3x2iēs
+2xi2g
+xi2i
+x2im
+xi2n
+xin3Ä
+xinÄÌ4
+xi3ni
+xi3nī
+xi3ní
+xi3nu
+xi4nue
+xi3nú
+x2io
+x2iÅ
+x2iq
+2xi2r
+x2iss
+xi2tæ
+xi2tǣ
+xi2tǽ
+xi2tī
+xi2tū
+xi4uer
+xi4uér
+2xi2ui
+xi2uí
+x2i3uu
+2x3iÅ­
+xi4ver
+xi4vér
+2xi2vi
+xi2ví
+2xī2b
+2xī2m
+x2Ä«n
+xÄ«Å2
+x2Ä«q
+2xī2r
+2xī2t
+xī2ué
+xī2ui
+xī2uĭ
+xī2uí
+xī2vé
+xī2vi
+xī2vĭ
+xī2ví
+xÄ«Ì2b
+xÄ«Ì2m
+xÄ«Ì2r
+xÄ«Ì4t
+xÄ«Ì4ui
+xÄ«Ì4uÄ­
+xÄ«Ì4vi
+xÄ«Ì4vÄ­
+x2Ä­b
+x2Ä­c
+x2Ä­Ä“s
+2xÄ­2g
+2xÄ­Ä­
+x2Ä­m
+xÄ­2n
+xÄ­n3Ä
+xÄ­nÄÌ4
+xÄ­n2Ä•
+xĭ3nī
+xÄ­3nÅ­
+xÄ­2ta
+xÄ­4tÄ.
+xĭ2tă
+xĭ2tá
+xĭ2tæ
+xĭ2tǣ
+xĭ2tǽ
+x2ĭtĕ
+xĭ2tī
+x2Ä­tÄ­
+xÄ­4tÅs
+xĭ2tū
+xÄ­4tÅ­m
+xÄ­4tÅ­s
+xÄ­Ì2g
+x2Ä­Ìm
+xÄ­Ì4tă
+x2í
+2x3í2b
+2x3í2g
+x3íi
+2x3í2mu
+2x3í2r
+x3í2ta
+x3í4te.
+2x3í2ti
+2x3í2to
+x3ítur
+x3í4uer
+x3í4uim
+x3í4uit
+x3í4ver
+x3í4vim
+x3í4vit
+2xj
+x2l2
+2xn
+x3ne
+x3nĕ
+xo2
+3xo.
+x2o3d
+3xon
+3xoq
+xorí3t
+xo4rn
+xo4rq
+xo3ru
+xo4rv
+3xos
+xo4sa
+xo4sn
+xo4so
+xo4sq
+xo4su
+xo4sv
+x2o3t
+3xo3u
+3xo3v
+3xÅ.
+3x2Ån
+3xÅq
+3xÅ2s
+xÅ4sa
+x2Å3t
+3xÅu
+3xÅv
+xÅÌ4rat
+xÅÌ4rÄn
+xÅÌ4răt
+xÅÌ4rer
+xÅÌ4ret
+xÅÌ4rÄ•r
+xÅÌ4rÄ•t
+x3ÅÌ4ro
+x3ÅÌ4rÅ
+x3ÅÌrs
+xÅÌ4s
+x3ÅÌsa
+x3ÅÌsÄ
+x3ÅÌsă
+x3ÅÌsæ
+x3ÅÌsÇ£
+x3ÅÌsc
+x3ÅÌse
+x3ÅÌsÄ“
+x3ÅÌsÄ•
+x3ÅÌsÄ«
+x3ÅÌsÅ
+x5ÅÌsum
+x5ÅÌsus
+x3ÅÌsÅ­
+xÅ2
+2x2Å3d
+xÅÌ2n
+xó4ner
+xó4rat
+xó4rer
+xó4ret
+xó4riē
+xó4ror
+xó2s
+xó4sa
+x2ót
+2xp
+x3pé
+2xq
+x3qu
+2xs2
+x3sp
+xs4pe
+xsu4lu
+xsupe3
+2xt
+x3ta
+x3tÄ
+x3tă
+x3tá
+x3tæ
+x3tǣ
+x3tǽ
+x3te1
+xter4a
+xte5re
+xte5ré
+xteri5ue
+xteri5v
+xte5rī
+xterī5u
+xterī5v
+x3tĕ
+xtĕ3r4a
+xtĕ3rǣ
+xtĕ3rĕ
+xtĕ5rī
+xtĕrī5u
+xtĕrī5v
+xtĕ3rŭ
+xtéri5t
+x3ti1
+x3tī
+x3tÄ­
+x3tí
+x3to
+x3tÅ
+x3tó
+x3tr
+x3tu
+x3tū
+x3tÅ­
+x3tú
+xu2
+3xu.
+2x3ue.
+x3uev
+2x3uĕ
+x2ui.
+x2uis
+x2uī
+x2uís
+3x2um
+xum2e
+xum2Ä«
+xu4mn
+xu4mq
+xu4mv
+x2une
+xu1r
+xu3ro
+3x3us
+x4us.
+x4u4sn
+x4u4sq
+x4u4su
+x4u4sv
+x2uum
+x2uúm
+xū2b
+xūbe3
+x2Å«ne
+x2ūnĕ
+xū2re
+xū2rē
+xū2rĕ
+xū2ré
+xū2ri
+xū2rĭ
+xū2rí
+xū2ro
+xÅ«2rÅ
+xū2ró
+x2Å«2s
+xū2t
+xÅ«Ì2b
+xÅ«Ì4rÄ“
+xÅ«Ì4ri
+xÅ«Ì4rÄ­
+xÅ«Ì4ro
+xÅ«Ì4rÅ
+x2Å«Ìs
+xÅ«Ì2t
+xÅ­2
+2xÅ­Ä
+2xŭă
+x2Å­Ä«
+2xÅ­l
+x2Å­m
+xÅ­3mÄ
+xŭ3mă
+xŭ3mē
+xÅ­3m2Ä•
+xÅ­3m2Ä«
+xÅ­3mÅ­
+2xÅ­Å
+2xÅ­Å
+x2Å­Å­m
+xÅ­Ì4l
+x2Å­4Ìm
+xú2b
+xú2l
+x2úm
+x2úne
+xú1r
+x2úsq
+xú2t
+xú2ui
+xú2vi
+2xv
+x3ve
+x3vĕ
+x2x2
+y2a
+yad2
+ya1m
+ya2nu
+yÄ2nu
+yá2nu
+yb2
+ybe2
+ybē2
+ybé2
+ybé4i
+yd2
+yda3m
+yde2s
+ydē2
+ye2
+yes3
+yē2
+yé2
+yés3
+y2g3n
+y2i
+yi2i
+yin2
+yio2s
+yis3
+yi4sc
+yis5ci
+yl3ui
+yl3uí
+y1m
+ym2a
+ym2e
+yme3d
+yme5de
+y1n
+yn2Ä
+yne2
+yn2i
+yo3ne
+yo3ni
+yó1
+yper4í
+y1r
+yr2a
+y3rá
+yr4ás
+ys2i
+ysta4
+yste3
+y1su
+yte3r
+yteri5ue
+yteri5v
+yte5rī
+yterī5u
+yterī5v
+yx4eu
+y2xu
+ȳ1
+ȳ2a
+ȳad2
+ȳ2ă
+ȳăd2
+ȳ2á
+ȳ2i
+ȳ2ĭ
+ȳ2í
+ȳló2
+ȳmo3
+ȳn2
+ȳne2
+ȳ3rē
+ȳré2
+ȳro2
+ȳró2
+ȳs2
+ȳso2
+ȳsó2
+ȳ2Ì
+ȳÌ3l
+ȳÌ1n
+ý2a1
+ýb2
+ýd2
+ýda3
+ý2g3n
+ý2i
+ý2l1u
+ý1m
+ým2e
+ý1nu
+ý1r
+ýs2i
+ýste3
+ýte1
+ý2th
+ýx4eu
+ý2xu
1z
-2z.
-.z2
-a2m3ui
-a2n1u2a
-a2n1u2e
-a2n1u2i
-a2n1u2o
-a2n1u2u
-e2n1u2a
-e2n1u2e
-e2n1u2i
-e2n1u2o
-e2n1u2u
-ge3n2ua
-i2n1u2a
-i2n1u2e
-i2n1u2i
-i2n1u2o
-i2n1u2u
-ti3n2ui
-o2n1u2a
-o2n1u2e
-o2n1u2i
-o2n1u2o
-o2n1u2u
-u2n1u2a
-u2n1u2e
-u2n1u2i
-u2n1u2o
-u2n1u2u
-a2r1u2a
-a2r1u2e
-a2r1u2i
-a2r1u2o
-a2r1u2u
-e2r1u2a
-e2r1u2e
-e2r1u2i
-e2r1u2o
-e2r1u2u
-i2r1u2a
-i2r1u2e
-i2r1u2i
-i2r1u2o
-i2r1u2u
-o2r1u2a
-o2r1u2e
-o2r1u2i
-o2r1u2o
-o2r1u2u
-u2r1u2a
-u2r1u2e
-u2r1u2i
-u2r1u2o
-u2r1u2u
-.a2b1auu
-.a2b1ali
-.a2b1ic
-.a2b1iec
-.a2b1in1
-.a2b1iu
-.a2b1ol
-.ab2s
-.ab3si2
-.ab3so
-.ab3s2te
-.ab3su2
-.a2b1es2
-.a2b1er2
-.a2bfu
-.a2b3ru
-.ab5s2cin
-.a2d1
-.adsu2
-.a2d1es2
-.ad3si2
-.a2d1er2
-.a2dfu
-.ad3s2t
-.a3g2nas
-.a3s2c
-.a3s2p
-.a3s2t
-.ape3r2u
-.ci2s3
-.co1e
-.co1i
-.co1i2e
-.coi3u
-.co2e1n
-.co3e2lec
-.co3e2lig
-.co3emen
-.co3e2r
-.co3e2x3
-.coex3s2
-.co3g2no
-.co2n1
-.con3ic
-.co3n2if
-.co3n2ig
-.co3n2it
-.co3n2i3ue
-.coni2a
-.coni2e
-.coni2i
-.coni2u
-.con3s2cr
-.con3s2p2
-.con3s2t
-.de3s2c
-.de3s2p
-.de3s2q
-.de3s2t
-.di3g2nosc
-.di2s1i2
-.di3s2ce
-.di4s3cep3t
-.di3s2p
-.di3s2qua
-.di3s2cr
-.di3s2t
-.di4s3ten1d
-.di4s3ti4nc
-.i2dci
-.i3di2og
-.i2n1
-.in3s2p
-.in3s2t
-.i3n2an
-.ina2b3r
-.inab3s2
-.i3n2it
-.ina2cr
-.ina2df
-.i3n2ers
-.i3n2ert
-.ine2x3
-.inexs2t
-.ino2b
-.inob3s2c
-.ino3b2oe
-.inpe2r3iur
-.i3n2ul
-.i4n3ulc
-.inu2a
-.inu2e
-.inu2i
-.inu2o
-.inu2u
-.iu2s3i2ur
-.o2b1
-.o3b2ed
-.o3b2el
-.o3b2es
-.o3b2ic
-.obi2a
-.obi2e
-.ob3i2u
-.ob3s2cu
-.ob3l
-.ob3r
-.o3b4ruz
-.ob3s2c
-.ob3s2t
-.ob3tr
-.obu2a
-.obu2e
-.obu2i
-.obu2o
-.pe2r1absu
-.pe2r1ac
-.pe2r1a2d1u
-.pe2r1a2dp
-.pe2r1ae
-.pe2r3ag
-.pe2r3err
-.pe2r3or
-.pe2r3u
-.pe2r1ar
-.pe2r1a2u
-.pe2r1ed
-.pe2r1eff
-.pe2r1egr
-.pe2r1el
-.pe2r1em
-.pe3r2enn
-.pe2r1eru
-.pe2r1e2x3
-.pe2r3h
-.pe2r1i2ac
-.pe2r1i2ec
-.peri3p2s
-.peri3p2t
-.peri3s2c
-.peri3s2t
-.pe2r1o2b3s2c
-.pe2r1od
-.pe2r1of
-.pe2r1ol
-.pe2r1op
-.perse2u
-.perse2i
-.perse2o
-.pe2r3s2c
-.pe2r3s2p
-.pe2r3s2t
-.pe2r3tran2s1
-.pe2r1u2a
-.pe2r1u2e
-.pe2r1u2i
-.pe2r1u2o
-.prae1
-.praea2u
-.prae3s2c
-.prae3s2p
-.prae3s2t
-.praeu2a
-.praeu2e
-.praeu2i
-.praeu2o
-.praete2r1
-.praeteru2e
-.praeteru2o
-.primi1
-.primi3s2c
-.pro2d1es3s
-.pro2d1ig
-.pro1de1amb
-.pro2d1eo
-.pro2d3is
-.pro2d1it
-.pro2d1im
-.pro2d1eun
-.pro2d1ir
-.pro2d1ib
-.pro2d1ier
-.pro2d1ea
-.pro3d2ito
-.pro3d2iti
-.pro3d2itr
-.pro3g2n
-.pro3in
-.pro3s2c
-.pro3s2p
-.pro3s2t
-.quo2t1an
-.quo2t1en
-.quo2t1i2e
-.quo2t3li
-.re2d1ac
-.re2d1ad
-.re2d1am
-.re2d1an
-.re2d1ar
-.re2d1a2u
-.re2d1em
-.re2d1eo
-.re2d5is
-.re2d5it
-.re4d3imi
-.re2d1eu
-.re2d1ier
-.re2d1ib
-.re2d1ien
-.re3d2ic
-.re3d2ig
-.re3d2im
-.re2d1in
-.re2d1ol
-.re2d1op
-.re3d2orm
-.re2d1orn
-.re2d1ul
-.re2d1ord
-.re2d1arg
-.re2d1amb
-.ree2x
-.re1ie
-.re1in
-.repa2u
-.re3s2cr
-.re3s2p
-.re3s2tag
-.re3s2ta2u
-.re3s2tib
-.re3s2tic
-.re3s2til
-.re3s2tip
-.re3s2tr
-.sati2s1
-.sa2t1ag
-.ses2c1u4n
-.si2c1u4t2
-.si3s2ten
-.su2b1ic
-.su2b1ingr
-.su2b1odo
-.su2b3s2t
-.supe2r1ab
-.supe2r1ad
-.supe2r1ad3s2t
-.supe2r1ae
-.supe2r1ag
-.supe2r1am
-.supe2r1arg
-.supe2r1a3s2p
-.supe2r1a3s2t
-.supe2r1att
-.supe2r1bib
-.supe2r1bif
-.supe2r1bil
-.supe2r1c
-.supe2r1d
-.supe2r1ed
-.supe2r1eff
-.supe2r1eg
-.supe2r1em
-.supe2r1en
-.supe2r1er
-.supe2r1eu
-.supe2r1e2x3
-.supe2r3h
-.supe2r3i2
-.supe2r1il
-.supe2r1im
-.supe2r1in
-.supe2r1ir
-.supe4r5i4ume
-.supe3r4i3o
-.supe3r4i3u
-.supe2r1o2b1d
-.supe2r1o2b3r
-.supe2r1oc
-.supe2r1or
-.supe2r3s2c
-.supe2r3s2p
-.supe2r3s2t
-.supe2r1sub3s2t
-.supe2r3u2
-3r4us.
-.supra3s2c
-.su3s2c
-.su3s2p
-.suss2cr
-.tetra3e2t
-.tetra3g2n
-.tetra3s2t
-.te2r1i2u
-.te2r1un
-.terp2s
-.the2o
-.theo3g2n
-.the3s2p
-.the3s2t
-.thi3s2b
-.tra1i2a
-.tra1i2e
-.tra1ii
-.tran2s
-.transa2
-.trans1a2b1i
-.trans1a2b1e2
-.trans1act
-.trans1a2d1
-.trans3i
-.trans1a2u
-.tran3s2c
-.tran3s2en
-.trans1e
-.transe2u
-.trans1o2
-.trans1u2
-.tran3s2um
-.tra2n1ue
-.tri3en
-.u2n1i2us
-.ute2r3ui
-.za2i3eu
-.zeu3g2m} \ No newline at end of file
+z2a
+zab2
+za3r
+ză3r
+zá1m
+ze3b
+zé2ru
+z2i
+zmă3
+zo1
+zo2s
+zū2
+Ì„1
+Ì„2a
+Ì„a2m
+Ì„2Ä
+̄2ă
+̄2á
+Ì„2Ç£
+Ì„Ç£2Å­
+Ì„b2
+Ì„be3
+̄bī3u
+̄bī3v
+Ì„3bu
+Ì„3bÅ­
+Ì„ce2
+Ì„2cl
+̄2cū
+Ì„de3
+̄dĕ3r
+̄2dī
+Ì„2e
+Ì„2Ä“
+Ì„Ä“n3
+Ì„2Ä•
+Ì„2f
+Ì„2i
+Ì„2Ä«
+Ì„2Ä­
+̄2í
+Ì„n2
+Ì„no3
+Ì„2Å
+Ì„pe3
+Ì„per2
+̄pĕ3r
+̄pĕ5rĭ
+Ì„r2
+Ì„2s
+Ì„to2
+Ì„2u
+Ì„2Å­
+̄2ú
+Ì„2Ì
+Ì„Ì3b2
+Ì„Ì2cl
+Ì„Ì3l
+Ì„Ì1n
+Ì„Ì2s
+̆ăd2
+̆b2
+̆d2
+̆dă3m
+̆dē2
+̆ĕs3
+̆2gn
+̆2ĭ
+̆ĭ2ă
+̆ĭn2
+̆ĭs3
+̆2lu
+̆1ma
+̆1mă
+̆m2e
+̆m2ĕ
+̆1n
+̆n2Ä
+̆1ra
+̆3r2ă
+̆1ræ
+̆1rǣ
+̆1rī
+̆1rÅ
+̆1rÅ
+̆rsĭ3
+̆1rŭ
+̆stă4
+̆tĕ5rī
+̆tĕrī5u
+̆tĕrī5v
+̆tĕ3rŭ
+̆2th
+̆3thĭ
+̆x2
+̆2xu
+̆Ìb2
+̆Ìd2
+̆Ìdă3
+̆Ìm2Ä•
+Íže1
+Ížea2b3
+ÍžeăÌ2
+͞eá2
+͞e3ác
+͞e3áp
+Íže3b
+Íže4cue
+Íže3d2
+Ížed4o
+Íže2eÅ
+Íže3es
+͞eé2
+͞e3és
+Íže3g2
+Ížei2
+Íže2iÄ
+Íže3ic
+͞e2iī
+Íže2Ä«
+Íže2Å
+͞eó2
+Ížepe3
+Ížepote4
+Ížepot5er
+Ížepot5es
+͞epo6t5és
+͞epó4t5e
+Íže3q
+Íže3r
+Ížes4ca
+͞es4cá
+Ížes4ci
+͞es4cí
+Íže4scu
+͞e4scú
+Íže4spÅ
+Íže2sq
+Ížes4ta
+Ížes4tÄ
+͞es4tá
+Ížes4te
+͞es4tē
+͞es4té
+Ížes4tin
+Ížesti5t4
+͞es4tī
+͞estí3
+͞es4tít4
+Ížes4tÅ.
+Ížes4tÅn
+Ížes4tÅq
+Ížes4tÅs
+Ížes4tÅu
+Ížes4tÅv
+͞es4trú
+Íže5ter
+Ížetere6ri
+͞ete6re6rí
+Ížete6r5es
+͞ete6r5és
+Ížete5rim
+Ížete5riti
+͞ete5rití
+Ížete5rito
+͞ete5ritó
+Ížete5r6i5tur
+͞ete5ritúr
+Ížete4r5Ä«4
+ÍžeterÄ«Ì6
+͞ete6rít
+͞e5tĕr
+͞eté6r5es
+͞eté6rite
+Íže3ut
+Ížex2
+Íže2xu
+Íž2u1
+Ížu2a
+Ížu2Ç£
+Ížu3b2
+Ížu3do
+ÍžuÅ2
+Ížupe5re
+Ížupe5ri
+Ížupe5r4Ä«
+͞uperī5n
+͞uperī5q
+͞uperī5u
+͞uperī5v
+Ížu2su
+Ížu3sum
+Ížu3sus
+Ížu2xu
+ÍžÌ2
+Í¡e1
+Í¡ea2b3
+Í¡eăÌ2
+͡e3ác
+͡e3áp
+Í¡e3b
+Í¡e4cue
+Í¡e3d2
+Í¡ed4o
+Í¡e2eo
+Í¡e2eÅ
+͡e2eó
+Í¡e3es
+͡eé2r
+͡e3és
+Í¡e3g2
+Í¡ei2
+Í¡e2iÄ
+Í¡e3ic
+Í¡e2ii
+͡e2iī
+͡e2ií
+Í¡e2Ä«
+Í¡e2o
+Í¡e2Å
+Í¡epe3
+͡epo6tés
+͡epó6tes
+Í¡e3q
+Í¡e3r
+Í¡er4i
+Í¡es4ca
+͡es4cá
+Í¡e5s4ci
+͡es4cí
+Í¡e4scu
+͡e4scú
+Í¡e4spÅ
+Í¡e2sq
+Í¡es4ta
+Í¡es4tÄ
+͡es4tá
+Í¡es4te
+͡es4tē
+͡es4té
+Í¡es4ti.
+Í¡es4tig
+Í¡es4tin
+Í¡es4tiq
+Í¡es4tis
+Í¡esti5t4
+Í¡es4tiv
+͡es4tī
+͡es4tíg
+͡es4tín
+͡es4tíq
+͡es4tís
+͡es4tí5t4
+͡es4tíu
+͡es4tív
+Í¡es4to.
+Í¡es4ton
+Í¡es4toq
+Í¡es4tos
+Í¡es4tou
+Í¡es4tov
+Í¡es4tÅ.
+Í¡es4tÅn
+Í¡es4tÅq
+Í¡es4tÅs
+Í¡es4tÅu
+Í¡es4tÅv
+͡es4tón
+͡es4tóq
+͡es4tós
+͡es4tóu
+͡es4tóv
+͡es4trú
+Í¡e5ter
+Í¡etere6ri
+͡ete6re6rí
+Í¡ete4ri4
+Í¡eter5ii
+͡eter5ií
+Í¡ete4r5Ä«4
+Í¡eterÄ«Ì6
+͡ete4rí4
+͡eter5ímu
+͡eter5íti
+͡e5tĕr
+͡eté6ri.
+͡eté6r5ii
+͡eté6r5is
+͡eté6rite
+͡eté6ri6ti
+Í¡e3ust
+Í¡e3ut
+Í¡ex2
+Í¡e2xu
+Í¡2u1
+Í¡u2a
+Í¡u3b2
+Í¡u3do
+Í¡uÅ2
+͡uó2
+Í¡upe5re
+Í¡upe5ri
+Í¡uperi5n
+Í¡uperi5q
+Í¡uperi5ue
+Í¡uperi5v
+Í¡upe5r4Ä«
+͡uperī5n
+͡uperī5q
+͡uperī5u
+͡uperī5v
+Í¡u2xu
+Í¡Ì2
+Ì2ă
+Ìăd2
+Ìă3g
+Ìb2a
+Ìba3q
+Ì3bas
+Ìb2ă
+Ì4băc
+Ìbă2r
+Ìb3ărÄ
+Ìb3ără
+Ìb3ărÄ“
+Ìb3ărÄ•
+Ìb3ărÅ
+Ì3băs
+Ìb2e
+Ìbe3r
+Ìb2Ä“
+Ìb4ĭă
+ÌbÄ­4cÅ­
+Ìb4Ä­Ä“s
+Ì2bÄ­Ä­
+Ìb4Ä­Å
+Ìb4Ä­Å­
+Ìb2o3
+Ìb2Å1
+Ìb5ÅlÄ•n
+Ì2bri
+Ìb2rÄ«
+Ìb2sq
+Ìb5s4tÄ•
+Ìb2su
+Ìb2u
+Ì3bÅ­m
+Ì2by
+Ì3că
+Ìce1
+Ì3cÄ“
+Ì3ci
+ÌcÅ3
+Ì2cre
+Ì2crÄ“
+Ì2cri
+Ì2c3ue
+Ì2c3u2t
+ÌcÅ­3m
+Ì2c3Å­2t
+Ìdă2m
+Ìd3ămă
+Ìde4run
+Ì2d3Ä•2d
+Ìd4Ä•p
+Ìd3Ä•st
+Ì2d3i2g
+Ìd2in
+Ìd2Ä­
+Ì2d3Ä­g
+Ì4d3Ä­mÄ­
+Ìd3Å2l
+Ìd2rÄ“
+Ìd2rÅ
+Ì2d3ue
+Ì2dÅ«
+Ìd2Å­
+Ìe2ă
+Ìe3b
+Ìe4cue
+Ìe3d2
+Ìe2eo
+Ìe2eÅ
+Ìe3es
+Ìe3g2
+Ìei2
+Ìe4ia.
+Ìe4iam
+Ìe4ias
+Ìe4iaÍž
+Ìe2iÄ
+Ìe2ii
+Ìe2iÄ«
+Ìepe3
+Ìe3q
+Ìe1r
+Ìer4i
+Ìe3s4ca
+Ìe3s4ci
+Ìe3s4ta
+Ìe5s4tÄ.
+Ìe5stÄn
+Ìe3s4te
+Ìe3s4tÄ“
+Ìe5s4ti.
+Ìe5s4tin
+Ìe5s4tis
+Ìe5stit
+Ìe3s4tÄ«
+Ìe5s4to.
+Ìe5s4tos
+Ìe3s4tÅ
+Ìes5tră
+Ìe5stru
+Ìes3tu
+Ìete3r
+ÌetÄ•5r
+Ìe3ut
+Ìe2Å­
+Ìe2x
+ÌÄ•1
+Ì1Ä•Ä
+Ì1Ä•2ă
+ÌÄ•2mÅ
+Ì2Ä•q
+Ì4Ä•r.
+Ì1Ä•2s
+ÌÄ•2Å­
+Ìfe1
+Ì2fÄ“
+ÌfÄ•1
+ÌfÅ1
+Ì3g2a
+Ì3gă
+Ì3gæ
+Ì3gÇ£
+ÌgÄ•1
+Ì2gl
+Ì2gn
+Ìg3no
+Ì2gÅ­a
+Ì2gÅ­Ä
+Ì2gŭă
+Ì2gÅ­Ç£
+Ì2gÅ­Ä“
+Ì2gÅ­Ä•
+Ì2gÅ­Å
+Ì2gÅ­Å­
+Ì1h
+Ì2he
+Ì3ian
+Ì3iaq
+Ì3iar
+Ì3iat
+Ì3iau
+Ì3iav
+Ìi2Ä
+Ìi3b
+Ìi2ci
+Ì3iem
+Ì3ien
+Ì3ieq
+Ì3iet
+Ì3ieu
+Ì3iev
+Ì3iÄ“s
+Ì1ii
+Ì1io
+Ì3iun
+Ì3iuu
+ÌÄ­3b
+ÌÄ­2cÄ­
+Ì1Ä­Ä­
+Ì2Ä­n2
+Ì3Ä­n.
+Ì3lă
+Ì2leg
+Ì3lÄ•
+Ì4lÄ•g
+Ì4lÄ•p
+Ì3lix
+Ì2lu
+Ì3lub
+Ìl3ue
+Ìl3uÄ“
+Ì3lui
+Ì3lum
+Ì3lus
+Ì1m2a
+Ì1mă
+Ìmă2g
+Ìm3ără
+Ìm3ă4rÅ
+Ìm3bă
+Ìm4bÄ­Ä
+Ìm4b3Ä­Å
+Ìm2e
+Ì4mera
+Ì4merÄ
+ÌmÄ•4dÄ­
+Ì4mÄ•dÅ
+Ìm2in
+Ì4minÄ“.
+Ì4minÄ“n
+Ìm2Ä­
+Ì4mĭăn
+Ì4mĭăt
+Ì4mÄ­Ä“n
+Ì4mÄ­Ä“s
+Ì4mÄ­Ä•n
+Ì4mÄ­Ä•t
+Ì2mÄ­Ä­
+Ì4mÄ­nÄ“.
+Ì4mÄ­nÄ“n
+Ì4mÄ­Å­n
+Ì1mo1
+ÌmÅ1
+ÌmpÄ•5r
+ÌmpÄ•r6Ä«
+Ì2mun
+Ì3m2Å«
+Ìn2Ä
+Ìn2ă
+Ìn3dÄ•
+Ìn4d3Ä­g
+Ìn4d3Å4l
+Ìn4dÅ­Ä•
+Ìnd3Å­Ä­
+Ìn2Ä•
+Ìn3Ä•st
+Ìn3g2
+Ì4n3Ä­cÄ­
+Ìn2o
+ÌnÅ1
+Ìns2c
+Ìn4sig
+Ìns5i4tæ
+Ìns5i4tu
+Ìn4sÄ­g
+ÌntÄ•3r
+Ìnt5Ä•rÅs
+Ì3n2ua
+Ìn2uÄ
+Ì3n2uÄ“
+Ì3n2uÄ«
+Ìn2Å«
+Ìn2Å­
+Ìo1
+Ì2Å
+ÌÅ3p
+Ì3pă
+Ìpe1
+Ìpe3r
+ÌpÄ•3r
+ÌpÄ•5rÄ­
+Ì3pi
+Ì3pÄ­
+Ì3pl
+Ì2pn
+ÌpÅ3
+Ì3pr
+Ìpu3l
+Ì3pÅ­Ä«
+Ì3pÅ­Ä­
+Ì1r
+Ìr2a
+Ìra3g
+Ì4r2ăb
+Ìră4gÄ
+Ìră4gă
+Ìră4gÄ­
+Ìr2ăl
+Ìr3c
+Ìr2e
+Ì3rÄ“.
+Ìr3Ä•2d4
+ÌrÄ•2g
+ÌrÄ•2m
+Ìr3Ä•mÄ
+Ì4r3Ä•mă
+Ìr3Ä•mÄ“
+Ìr3Ä•mÄ•
+Ìr3Ä•mÄ«
+Ìr3Ä•mÄ­
+Ì4r3Ä•mÅ
+Ìr3Ä•mÅ
+Ìr3Ä•mÅ­
+Ì2r3Ä•s
+Ì2rh
+ÌrÄ­4bÄ“
+ÌrÄ­4bÄ•
+Ìr3Ä­4cÄ­
+ÌrÄ­4măn
+ÌrÄ­4măr
+ÌrÄ­4măt
+Ì4r3Ä­4mÄ“
+ÌrÄ­4mÄ•
+Ì4r3Ä­4mÄ­
+Ìr3Ä­4mÅ
+Ìr5Ä­4mÅ­n
+Ì3rÄ­Å­
+Ì2rog
+Ì2rÅg
+Ì2r3Åp
+Ìr3ua
+Ìr3uÄ
+Ìr3uæ
+Ì2rue
+Ìr3uÄ“
+Ìr2ui
+Ìru3m
+Ìr3uÅ
+Ì3rÅ«
+Ì2sc
+Ìs4cid
+Ìs3cr
+Ìs2Ä•
+Ìs4Ä•r
+Ì3sÄ•Å­
+Ìs2i
+Ì2s3Ä­2c
+Ìs4per
+ÌspÄ•3
+Ìs5pÄ•s
+Ìs3pÄ«
+Ìs3q
+Ìs4tes
+Ìs3tib
+Ì3s4tin
+Ì3stit
+Ì5stÄ­tÄ“
+Ì5stÄ­tÄ•n
+Ìs4trat
+Ìs4tret
+Ìs5tri
+Ì3s4trÅ
+Ì3s4tru
+Ìs5trum
+Ìs4trÅ­Ä
+Ìs4trŭă
+Ìs4trÅ­Ä“
+Ìs4trÅ­Ä•
+Ìs4trÅ­Ä«
+Ìs4trÅ­Å
+Ìs4trÅ­Å­
+Ìs3ui
+Ì3sumu
+Ì3sun
+Ì4tăg
+Ìte3r
+ÌtÄ•2Ä«
+ÌtÄ•3ra
+Ìt6Ä•ră.
+Ì2t3Ä•s
+Ì3tha
+Ì3thÄ
+Ì3thă
+Ì3thæ
+Ì3thÇ£
+Ì3tÄ­
+Ì4tÄ­q
+Ì2tl
+Ìto1
+ÌtÅ1
+Ì5trÄ«x
+Ì1u
+Ì2u1m
+Ì2un
+ÌuÅ1
+Ìupe3
+Ìupe5r
+Ìu1r
+Ìu2xu
+Ì1Å«n
+ÌÅ­2
+Ì1Å­b
+Ì1Å­t
+ÌvÅ1
+Ìx2a
+Ìx2ă
+Ìx4eu
+Ìx2Ä•
+Ìx3ĕăn
+Ìx2i
+Ì2xia
+Ì2xiÄ
+Ì2xiæ
+Ì2xiÇ£
+Ì2xiÄ“
+Ì2xiÄ«
+Ì2xiÅ
+Ì2xiu
+Ìx2Ä«
+Ìx2Ä­n
+Ìx2o
+Ìx2Å
+Ìx2Å
+ÌxtÄ•3
+Ì2xu
+Ìx4us
+Ìx2Å­Ä­
+Ìx3Å­Ä­s} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/patterns/mkii/lang-eo.hyp b/Master/texmf-dist/tex/context/patterns/mkii/lang-eo.hyp
new file mode 100644
index 00000000000..5a16071a19c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/patterns/mkii/lang-eo.hyp
@@ -0,0 +1,8 @@
+% generated by mtxrun --script pattern --convert
+
+% for comment and copyright, see lang-eo.rme
+
+% used:
+
+\hyphenation{
+} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/patterns/mkii/lang-eo.pat b/Master/texmf-dist/tex/context/patterns/mkii/lang-eo.pat
new file mode 100644
index 00000000000..8e49677f76c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/patterns/mkii/lang-eo.pat
@@ -0,0 +1,2210 @@
+% generated by mtxrun --script pattern --convert
+
+% for comment and copyright, see lang-eo.rme
+
+% used: a b c d e f g h i j k l m n o p r s t u v z ĉ Ä Ä¥ ĵ Å Å­
+
+\patterns{
+a1
+e1
+i1
+o1
+u1
+2aj.
+2ajn.
+2an.
+2as.
+en.
+is.
+2oj.
+2ojn.
+2on.
+2os.
+2us.
+a3a
+e3a
+i3a
+o3a
+u3a
+a3e
+e3e
+i3e
+o3e
+u3e
+a3i
+e3i
+i3i
+o3i
+u3i
+a3o
+e3o
+i3o
+o3o
+u3o
+a3u
+e3u
+i3u
+o3u
+u3u
+e2sper
+2jn.
+2lp.
+2lt.
+2nk.
+2ns.
+2nt.
+2st.
+.bl4
+.br4
+.dr4
+.dl4
+.fl4
+.fr4
+.gl4
+.gn4
+.gr4
+.kl4
+.kn4
+.kr4
+.kv4
+.pl4
+.pr4
+.ps4
+.pt4
+.sf4
+.sk4
+.skl4
+.skr4
+.skv4
+.sl4
+.sm4
+.sn4
+.sp4
+.spl4
+.spr4
+.st4
+.str4
+.sv4
+.Ål4
+.Åm4
+.Ån4
+.Åp4
+.År4
+.Åpr4
+.Åt4
+.Åtr4
+.Åv4
+.tr4
+.vr4
+1a2ĉa.
+1a2ĉaj.
+1a2ĉajn.
+1a2ĉan.
+1a2ĉe.
+1a2ĉo.
+1a2ĉoj.
+1a2ĉojn.
+1a2ĉon.
+1a2da.
+1a2daj.
+1a2dajn.
+1a2dan.
+1a2de.
+1a2do.
+1a2doj.
+1a2dojn.
+1a2don.
+1a2das.
+1a2di.
+1a2dis.
+1a2dos.
+1a2du.
+1a2dus.
+.avok2a3d
+.bal2a3d
+ĉokol2a3d
+.fas2a3d
+.inv2a3d
+kamar2a3d
+.kan2a3d
+limon2a3d
+persv2a3d
+.pom2a3d
+seren2a3d
+1a2ĵa.
+1a2ĵaj.
+1a2ĵajn.
+1a2ĵan.
+1a2ĵe.
+1a2ĵo.
+1a2ĵoj.
+1a2ĵojn.
+1a2ĵon.
+.al2t
+al3tabl
+al3t2a3r
+al3ter
+al3trui
+1a2na.
+1a2naj.
+1a2najn.
+1a2nan.
+1a2ne.
+1a2no.
+1a2noj.
+1a2nojn.
+1a2non.
+1a2nas.
+1a2ni.
+1a2nis.
+1a2nos.
+1a2nu.
+1a2nus.
+1a2nism
+1a2n1i2n
+afg2a3n
+akomp2a3n
+arg2a3n
+ark2a3n
+ban2a3n
+but2a3n
+cig2a3n
+ĉambel2a3n
+ĉamp2a3n
+ĉarlat2a3n
+ĉik2a3n
+dek2a3n
+dog2a3n
+el2a3n
+faz2a3n
+font2a3n
+galv2a3n
+germ2a3n
+Äentlem2a3n
+hisp2a3n
+.Ä¥a3n
+inf2a3n
+ir2a3n
+jap2a3n
+.ka3n
+kalk2a3n
+kank2a3n
+kapit2a3n
+kard2a3n
+karav2a3n
+kor2a3n
+.ma3n
+marcip2a3n
+membr2a3n
+met2a3n
+nirv2a3n
+.on2a3n
+org2a3n
+.pa3n
+partiz2a3n
+pelik2a3n
+porcel2a3n
+prof2a3n
+.ra3n
+rum2a3n
+.sa3n
+3s2log2a3n
+sopr2a3n
+stef2a3n
+sufrag2a3n
+sult2a3n
+Åam2a3n
+teher2a3n
+tir2a3n
+turb2a3n
+.va3n
+vatik2a3n
+veter2a3n
+vulk2a3n
+.ka3n2i3n
+safr2a3n2i3n
+.ta3n2i3n
+1an2ta.
+1an2taj.
+1an2tajn.
+1an2tan.
+1an2te.
+1an2to.
+1an2toj.
+1an2tojn.
+1an2ton.
+adjut2an3t
+.arog2an3t
+.atl2an3t
+.ban3t
+.brok2an3t
+.diam2an3t
+dilet2an3t
+disk2an3t
+elef2an3t
+.gal2an3t
+.gig2an3t
+inf2a4n3t
+inst2an3t
+konson2an3t
+.kan3t
+konst2an3t
+kvadr2an3t
+.kv2an3t
+leÅ­ten2an3t
+mom2an3t
+.okt2an3t
+.ped2an3t
+.plan3t
+tal2an3t
+batal3an4t
+1an2t3ar
+an3t2arkt
+kan3t2arel
+1an2t1ig
+1an2t1ec
+.apu2d1
+1a2ra.
+1a2raj.
+1a2rajn.
+1a2ran.
+1a2re.
+1a2ro.
+1a2roj.
+1a2rojn.
+1a2ron.
+1a2rig
+1a2riÄ
+am2a3r
+barb2a3r
+baz2a3r
+biz2a3r
+boj2a3r
+bulg2a3r
+.ci3d2a3r
+cig2a3r
+din2a3r
+dol2a3r
+er2a3r
+fanf2a3r
+.f2a3r
+formul2a3r
+garg2a3r
+git2a3r
+.ha3r2
+hung2a3r
+invent2a3r
+izob2a3r
+jug2u3l2a3r
+kalend2a3r
+kap2i3l2a3r
+kla3r
+komp2a3r
+kulin2a3r
+kvatern2a3r
+lap2i3d2a3r
+.mol2a3r
+najb4a1r
+om2a3r
+ordin2a3r
+partik2u3l2a3r
+.pol2a3r
+pop2u3l2a3r
+prep2a3r
+prim2a3r
+rad2a3r
+remp2a3r
+rip2a3r
+sa3m2ov2a3r
+sanit2a3r
+sek2u3l2ar
+sekund2a3r
+sing2u3l2ar
+skal2a3r
+.st2a3r
+sol2i3d2a3r
+tal2a3r
+tat2a3r
+.vel2a3r
+vulg2a3r
+1a2ta.
+1a2taj.
+1a2tajn.
+1a2tan.
+1a2te.
+1a2to.
+1a2toj.
+1a2tojn.
+1a2ton.
+1a2t1ec
+adiab2a3t
+agreg2a3t
+aÅ­tom2a3t
+aÅ­torit2a3t
+.ab2a3t
+.adekv2a3t
+advok2a3t
+afrik2a3t
+.ag2a3t
+akrob2a3t
+.akur2a3t
+alop2a3t
+.apar2a3t
+apost2a3t
+arom2a3t
+.ba3t
+.bl2a3t
+.brok2a3t
+.deb2a3t
+delik2a3t
+diplom2a3t
+.duk2a3t
+.et2a3t
+fakult2a3t
+.fr2a3t
+.gefr2a3t
+.gla3t
+.gran2a3t
+.hep2a3t
+kandid2a3t
+.kar2a3t
+.kazem2a3t
+.klim2a3t
+.kom2a3t
+.komit2a3t
+.komp2a3t
+konkord2a3t
+.konst2a3t
+.krav2a3t
+kro3m2a3t
+.kvadr2a3t
+magistr2a3t
+.magn2a3t
+majorit2a3t
+malgl2a3t
+.mals2a3t
+.mand2a3t
+.mecen2a3t
+minorit2a3t
+.mon2a3t
+.mul2a3t
+.musk2a3t
+ordin2a3t
+.pal2a3t
+.pir2a3t
+.prel2a3t
+.prim2a3t
+priorit2a3t
+.priv2a3t
+.rab2a3t
+.ren2a3t
+.ril2a3t
+.sab2a3t
+.sal2a3t
+.sen2a3t
+sindik2a3t
+.skarl2a3t
+.sold2a3t
+.son2a3t
+.sp2a3t
+stigm2a3t
+substr2a3t
+surog2a3t
+.tok2a3t
+.tom2a3t
+.ultim2a3t
+universit2a3t
+.vulg2a3t
+.ĉe2f1
+.ĉi4a
+.ĉia4m1
+.ĉi4e
+.ĉie4s
+.ĉi4o
+.ĉio4m
+.ĉi4u
+ĉi3el1
+3ĉ2jo
+.di2s1
+.di3s2ert
+.di3s2erv
+.di3s2ip
+.di3s2oci
+.di3s2a.
+.di3s2aj.
+.di3s2ajn.
+.di3s2an.
+.di3s2e.
+.di3s2en.
+.du2m1
+dump2in3g
+.du2on1
+1e2bla.
+1e2blaj.
+1e2blajn.
+1e2blan.
+1e2ble.
+1e2blo.
+1e2bloj.
+1e2blojn.
+1e2blon.
+1e2blas.
+1e2bli.
+1e2blis.
+1e2blos.
+1e2blu.
+1e2blus.
+1e2bl1ec
+1e2bl1aĵ
+.fe3b1l
+.me3b1l
+1e2ca.
+1e2caj.
+1e2cajn.
+1e2can.
+1e2ce.
+1e2co.
+1e2coj.
+1e2cojn.
+1e2con.
+.apr2e3c
+.de3c
+.pe3c
+sp2e3c
+1e2ga.
+1e2gaj.
+1e2gajn.
+1e2gan.
+1e2ge.
+1e2go.
+1e2goj.
+1e2gojn.
+1e2gon.
+1e2gas.
+1e2gi.
+1e2gis.
+1e2gos.
+1e2gu.
+1e2gus.
+.del2e3g
+.fl2e3g
+kol2e3g
+.om2e3g
+.prel2e3g
+.strat2e3g
+.norv2e3g
+1e2ja.
+1e2jaj.
+1e2jajn.
+1e2jan.
+1e2je.
+1e2jo.
+1e2joj.
+1e2jojn.
+1e2jon.
+1e2j1ig
+1e2j1iÄ
+.be3j
+.pl2ej
+malpl2ej
+.ek2s1
+.ek3s2ci
+ek4s3cit
+ek4s3ciz
+.ek3s2id
+.ek1i2r
+.ek1rid
+1e2kzem
+.ekste2r1
+.ekste3ra.
+.ekste3raj.
+.ekste3rajn.
+.ekste3ran.
+.ekste3re.
+.ekste3ro.
+.ekste3roj.
+.ekste3rojn.
+.ekste3ron.
+.ekste3ras.
+.ekste3ri.
+.ekste3ris.
+.ekste3ros.
+.ekste3ru.
+.ekste3rus.
+.el1i2r
+.el1aĉet
+.el1uz
+1e2ma.
+1e2maj.
+1e2majn.
+1e2man.
+1e2me.
+1e2mo.
+1e2moj.
+1e2mojn.
+1e2mon.
+1e2mas.
+1e2mi.
+1e2mis.
+1e2mos.
+1e2mu.
+1e2mus.
+1e2m1ec
+.alpr2e3m
+.anat2e3m
+blasf2e3m
+.boh2e3m
+diad2e3m
+.dil2e3m
+.ed2e3m
+ekstr2e3m
+.ektr2e3m
+.ekpr2e3m
+embl2e3m
+emfiz2e3m
+.ekz2e3m
+.har2e3m
+jerusal2e3m
+krizant2e3m
+.le3m
+.po2e3m
+.pr2e3m
+.probl2e3m
+.sk2e3m
+.te3m
+.tand2e3m
+.teor2e3m
+.tot2e3m
+.tr2e3m
+sist2e3m
+.en1ir2
+1en2da.
+1en2daj.
+1en2dajn.
+1en2dan.
+1en2de.
+1en2das.
+1en2di.
+1en2dis.
+1en2dos.
+1en2du.
+1en2dus.
+1en2do.
+1en2don.
+.am2en3d
+.at2en3d
+.def2en3d
+.et2en3d
+.kal2en3d
+kresĉ2en3d
+.men3d
+.of2en3d
+.pen3d
+.pl2en3d
+pret2en3d
+rekom2en3d
+.sen3d
+sc2en3d
+.ten3d
+.ven3d
+1e2ta.
+1e2taj.
+1e2tajn.
+1e2tan.
+1e2te.
+1e2to.
+1e2toj.
+1e2tojn.
+1e2ton.
+1e2taas.
+1e2tai.
+1e2tais.
+1e2taos.
+1e2tau.
+1e2taus.
+a2ĉ2e3t
+alfab2e3t
+alum2e3t
+amul2e3t
+.ask2e3t
+.atl2e3t
+.be3t
+bajon2e3t
+bil2e3t
+.bol2e3t
+bracel2e3t
+brev2e3t
+.buÄ2e3t
+.deb2e3t
+.dem2e3t
+diab2e3t
+elizab2e3t
+.enk2e3t
+epit2e3t
+.form2e3t
+.gaz2e3t
+.herm2e3t
+.Ä¥e3t
+.ĵak2e3t
+ĵ2e3t
+kabin2e3t
+.kad2e3t
+kastanj2e3t
+.kin2e3t
+klarn2e3t
+kloz2e3t
+.kom2e3t
+kompl2e3t
+.konf2e3t
+kors2e3t
+korv2e3t
+kotl2e3t
+.krik2e3t
+.krok2e3t
+kvodlib2e3t
+.me3t
+magn2e3t
+marion2e3t
+.mot2e3t
+.ne3t
+.oml2e3t
+pamfl2e3t
+parg2e3t
+.pl2e3t
+.po2e3t
+.prof2e3t
+.prol2e3t
+.rak2e3t
+.rem2e3t
+.rip2e3t
+sekr2e3t
+skel2e3t
+.son2e3t
+.sov2e3t
+spag2e3t
+spin2e3t
+staf2e3t
+.stil2e3t
+Åibol2e3t
+.tib2e3t
+tual2e3t
+.ve3t
+.veg2e3t
+.vend2e3t
+vinj2e3t
+1es2tr
+.fo2r1
+.fo3r2in3t
+.fo3r2u3m
+.fo3r2a.
+.fo3r2aj.
+.fo3r2ajn.
+.fo3r2an.
+.fo3r2e.
+.fo3r2o.
+.fo3r2oj.
+.fo3r2ojn.
+.fo3r2on.
+.fo3r2en
+.fo3r2as.
+.fo3r2i.
+.fo3r2is.
+.fo3r2os.
+.fo3r2u.
+.fo3r2us.
+.Äi2s1
+1i2da.
+1i2daj.
+1i2dajn.
+1i2dan.
+1i2de.
+1i2do.
+1i2doj.
+1i2dojn.
+1i2don.
+.abs2i3d
+.ac2i3d
+.akr2i3d
+.aps2i3d
+.ar2i3d
+.askar2i3d
+.asp2i3d
+.av2i3d
+.bi3d
+.bol2i3d
+.br2i3d
+cirkumc2i3d
+.dav2i3d
+.dec2i3d
+.eÅ­kl2i3d
+.eg2i3d
+.fi3d
+.flor2i3d
+.fr2i3d
+frig2i3d
+genoc2i3d
+.gv2i3d
+hibr2i3d
+hum2i3d
+Ä¥lam2i3d
+.inc2i3d
+.ins2i3d
+inval2i3d
+.ji3d
+kan3t2ar2i3d
+koinc2i3d
+.konf2i3d
+krizal2i3d
+.li3d
+.lib2i3d
+likv2i3d
+.liv2i3d
+.luc2i3d
+.madr2i3d
+morb2i3d
+.muc2i3d
+perf2i3d
+piram2i3d
+.prez2i3d
+.ri3d
+rap2i3d
+rez2i3d
+rig2i3d
+.si3d
+.sol2i3d
+.str2i3d
+telev2i3d
+.tim2i3d
+.vi3d
+.val2i3d
+1i2d1ar
+1i2d1i2n
+.pir2i3d2in
+1i2ga.
+1i2gaj.
+1i2gajn.
+1i2gan.
+1i2ge.
+1i2go.
+1i2goj.
+1i2gojn.
+1i2gon.
+1i2gas.
+1i2gi.
+1i2gis.
+1i2gos.
+1i2gu.
+1i2gus.
+.br2i3g
+.di3g
+.fi3g
+.in3d2i3g
+.inst2i3g
+.intr2i3g
+.kvadr2i3g
+.li3g
+pfen2i3g
+.pi3g
+.prod2i3g
+.ri3g
+.rodr2i3g
+.str2i3g
+.ti3g
+.nav2i3g
+1i2gebl
+1i2gant
+1i2gint
+1i2gont
+1i2gat
+al2i3g2a3tor
+l2i3g2a3turo
+1i2git
+1i2got
+1i2g1a2d
+br2i3g2a3d
+1i2g1e2m
+1i2g1i2l
+1i2Äa.
+1i2Äaj.
+1i2Äajn.
+1i2Äan.
+1i2Äe.
+1i2Äo.
+1i2Äoj.
+1i2Äojn.
+1i2Äon.
+1i2Äas.
+1i2Äi.
+1i2Äis.
+1i2Äos.
+1i2Äu.
+1i2Äus.
+1i2Äant
+1i2Äint
+1i2Äont
+.br2i3Ä
+.negl2i3Ä
+.prest2i3Ä
+.vert2i3Ä
+.vest2i3Ä
+1i2Ä1a2d
+1i2Ä1e2m
+1i2la.
+1i2laj.
+1i2lajn.
+1i2lan.
+1i2le.
+1i2lo.
+1i2loj.
+1i2lojn.
+1i2lon.
+abut2i3l
+acet2i3l
+.ang2i3l
+.apr2i3l
+.arg2i3l
+.az2i3l
+.bab2i3l
+.bac2i3l
+.baz2i3l
+.ber2i3l
+.bi3l
+.br2i3l
+.braz2i3l
+.ced2i3l
+.civ2i3l
+.ĉi3l
+ĉinĉ2i3l
+.dakt2i3l
+.deb2i3l
+.def2i3l
+.dist2i3l
+.domic2i3l
+.dr2i3l
+.ed2i3l
+.ekz2i3l
+.eps2i3l
+.et2i3l
+.fi3l
+.fac2i3l
+.fus2i3l
+.gor2i3l
+.gr2i3l
+.Äent2i3l
+.hum2i3l
+.jub2i3l
+.ki3l
+.kamar2i3l
+kamom2i3l
+.komp2i3l
+.kons2i3l
+krokod2i3l
+.mi3l
+.mant2i3l
+.met2i3l
+mob2i3l
+.mut2i3l
+naÅ­t2i3l
+of2i3l
+.osc2i3l
+paskv2i3l
+.ps2i3l
+pterodakt2i3l
+.pup2i3l
+sen2il
+sim2i3l
+.st2i3l
+.stab2i3l
+stenc2i3l
+strob2i3l
+subt2i3l
+svah2i3l
+trankv2i3l
+.ut2i3l
+.vi3l
+.van2i3l
+.vig2i3l
+vodev2i3l
+volat2i3l
+1i2l1ar
+b2i3l2a3rd
+dakt2i3l2a3rb
+pl2i3l2a3rÄ
+f2i3l2a3ri
+frit2i3l2a3ri
+f2i3l2a3rb
+1e2str1i2na.
+1e2str1i2naj.
+1e2str1i2najn.
+1e2str1i2nan.
+1e2str1i2ne.
+1e2str1i2no.
+1e2str1i2noj.
+1e2str1i2nojn.
+1e2str1i2non.
+1i2s2t1i2na.
+1i2s2t1i2naj.
+1i2s2t1i2najn.
+1i2s2t1i2nan.
+1i2s2t1i2ne.
+1i2s2t1i2no.
+1i2s2t1i2noj.
+1i2s2t1i2nojn.
+1i2s2t1i2non.
+d2is3t2ingo
+1u2l1i2na.
+1u2l1i2naj.
+1u2l1i2najn.
+1u2l1i2nan.
+1u2l1i2ne.
+1u2l1i2no.
+1u2l1i2noj.
+1u2l1i2nojn.
+1u2l1i2non.
+ins2ul2i3n
+1an2t1i2na.
+1an2t1i2naj.
+1an2t1i2najn.
+1an2t1i2nan.
+1an2t1i2ne.
+1an2t1i2no.
+1an2t1i2noj.
+1an2t1i2nojn.
+1an2t1i2non.
+adam2a4n3t2i3n
+a4n3t2i3nom
+brig2a4n3t2i3n
+gal2a4n3t2i3n
+.k2a4n3t2i3n
+strof2a4n3t2i3n
+1in2da.
+1in2daj.
+1in2dajn.
+1in2dan.
+1in2de.
+1in2das.
+1in2di.
+1in2dis.
+1in2dos.
+1in2du.
+1in2dus.
+1in2do.
+1in2don.
+1in2d3ec
+1in2d3ig
+1in2d3iÄ
+.bin3d
+.hin3d
+.lin3d
+rozal4in3d
+.bl4in3d
+.pin3d
+tamar4in3d
+.Åin3d
+.vin3d
+.in3d2ign
+in3d2iÄen
+1in2ga.
+1in2gaj.
+1in2gajn.
+1in2gan.
+1in2ge.
+1in2go.
+1in2goj.
+1in2gojn.
+1in2gon.
+1in2gig
+.din3g
+.pud2in3g
+.vik2in3g
+3s2mok2in3g
+Åil2in3g
+.klin3g
+sterl2in3g
+dom2in3g
+men2in3g
+salp2in3g
+.rin3g
+.far2in3g
+.har2in3g
+.lar2in3g
+.mer2in3g
+.fr2in3g
+.sir2in3g
+.krin3g
+str2in3g
+vrin3g
+.at2in3g
+.mit2in3g
+.est2in3g
+.dist2in3g
+.svin3g
+1in2ta.
+1in2taj.
+1in2tajn.
+1in2tan.
+1in2te.
+1in2to.
+1in2toj.
+1in2tojn.
+1in2ton.
+1in2t3ar
+1in2t3ec
+1in2t3us
+.abs2in3t
+.fin3t
+hiac2in3t
+.jac2in3t
+.kvin3t
+labir2in3t
+.pin3t
+.pl2in3t
+.tin3t
+tereb2in3t
+.inte2r1
+.inte3r2es
+.inte3r2ez
+.inte3r2upt
+.inte3ra.
+.inte3raj.
+.inte3rajn.
+.inte3ran.
+.inte3re.
+.inte3ro.
+.inte3roj.
+.inte3rojn.
+.inte3ron.
+.inte3ras.
+.inte3ri.
+.inte3ris.
+.inte3ros.
+.inte3ru.
+.inte3rus.
+.inte3ren.
+1is2ma.
+1is2maj.
+1is2majn.
+1is2man.
+1is2me.
+1is2mo.
+1is2moj.
+1is2mojn.
+1is2mon.
+1i2s2m3ec
+.pr2is3m
+.ris3m
+.sk2is3m
+.sis3m
+1i2s2ta.
+1i2s2taj.
+1i2s2tajn.
+1i2s2tan.
+1i2s2te.
+1i2s2to.
+1i2s2toj.
+1i2s2tojn.
+1i2s2ton.
+1i2s2t3ec
+1i2s2t3ar
+.amet2i3s3t
+antikr2i3s3t
+aor2i3s3t
+.ar2i3s3t
+.bal2i3s3t
+.bat2i3s3t
+.ci3s3t
+.di3s3t
+ekz2i3s3t
+.gen2i3s3t
+.gi3s3t
+.hi3s3t
+ins2i3s3t
+kons2i3s3t
+.ki3s3t
+.kr2i3s3t
+.li3s3t
+.pi3s3t
+pers2i3s3t
+.rez2i3s3t
+.sk2i3s3t
+.vi3s3t
+1i2ta.
+1i2taj.
+1i2tajn.
+1i2tan.
+1i2te.
+1i2to.
+1i2toj.
+1i2tojn.
+1i2ton.
+1i2t3ec
+p2i3t4eci
+.ag2i3t
+akred2i3t
+antrac2i3t
+.apet2i3t
+.bi3t
+.band2i3t
+biskv2i3t
+.br2i3t
+.ci3t
+.cenob2i3t
+.cirkv2i3t
+.civ2i3t
+.deb2i3t
+defic2i3t
+.di3g2i3t
+dinam2i3t
+.efr2i3t
+.eksc2i3t
+eksplic2i3t
+.el2i3t
+.emer2i3t
+.erm2i3t
+.erud2i3t
+.ev2i3t
+.fr2i3t
+.gamb2i3t
+.gl2i3t
+.graf2i3t
+.gran2i3t
+.grav2i3t
+hermafrod2i3t
+.hez2i3t
+hipokr2i3t
+.im2i3t
+.inc2i3t
+infin2i3t
+inkogn2i3t
+interm2i3t
+.inv2i3t
+kapac2i3t
+komprom2i3t
+.konf2i3t
+.kred2i3t
+.kv2i3t
+.kval2i3t
+.kviv2i3t
+.li3t
+.mi3t
+malak2i3t
+.margar2i3t
+.marm2i3t
+.med2i3t
+megal2i3t
+.mer2i3t
+mil2i3t
+asimil3i4t
+.mosk2i3t
+.neof2i3t
+okcip2i3t
+ol2i3t
+.orb2i3t
+palp2i3t
+.paraz2i3t
+.pir2i3t
+plebisc2i3t
+precip2i3t
+prestid2i3g2i3t
+preter2i3t
+prof2i3t
+prozel2i3t
+.ri3t
+rehabil2i3t
+.rekviz2i3t
+sanskr2i3t
+.satel2i3t
+sibar2i3t
+.sk2i3t
+.sp2i3t
+.spir2i3t
+.spl2i3t
+.spr2i3t
+stalagm2i3t
+stalakt2i3t
+.stil2i3t
+.su3b2i3t
+.Åv2i3t
+.term2i3t
+.trans2i3t
+troglod2i3t
+.vi3t
+.viz2i3t
+.zen2i3t
+.kel2k
+.kro2m1
+.kro3ma.
+.kro3maj.
+.kro3majn.
+.kro3man.
+.kro3me.
+krom2o
+.ku2n1
+ku3n2ikl
+.li4a
+li5an
+li5as
+.ma2l1
+ma3l2ic
+.malno2v
+.me2m1
+me3m2or
+.mi4a
+mi5asm
+mi5aÅ­
+.mi2s1
+.mi3s2al
+mi3s2il
+.mi3s2ia
+.mi3s2ie
+.mi3s2ii
+.mi3s2io
+.mi3s2iu
+.me2z1
+mez2alianc
+me3z2embri
+me3z2enter
+.me3z2ere
+.mez2o
+me3z2ur
+.ni4a
+3nja.
+3njaj.
+3njajn.
+3njan.
+3nje.
+3njo.
+3njoj.
+3njojn.
+3njon.
+.no2v
+1o2bla.
+1o2blaj.
+1o2blajn.
+1o2blan.
+1o2ble.
+1o2blo.
+1o2bloj.
+1o2blojn.
+1o2blon.
+1o2bl1ec
+gren2o3bl
+malno3bl
+.no3bl
+.vo3bl
+du3ona.
+du3onaj.
+du3onajn.
+du3onan.
+du3one.
+du3ono.
+du3onoj.
+du3onojn.
+du3onon.
+.trio2n
+.kvar3o2n
+.kvin3o2n
+.ses3o2n
+.sep3o2n
+.ok3o2na.
+.ok3o2naj.
+.ok3o2najn.
+.ok3o2nan.
+.ok3o2ne.
+.ok3o2no.
+.ok3o2noj.
+.ok3o2nojn.
+.ok3o2non.
+.naÅ­o4n
+dek3o2na.
+dek3o2naj.
+dek3o2najn.
+dek3o2nan.
+dek3o2ne.
+dek3o2no.
+dek3o2noj.
+dek3o2nojn.
+dek3o2non.
+cent3o2na.
+cent3o2naj.
+cent3o2najn.
+cent3o2nan.
+cent3o2ne.
+cent3o2no.
+cent3o2noj.
+cent3o2nojn.
+cent3o2non.
+mil3o2na.
+mil3o2naj.
+mil3o2najn.
+mil3o2nan.
+mil3o2ne.
+mil3o2no.
+mil3o2noj.
+mil3o2nojn.
+mil3o2non.
+1on2ta.
+1on2taj.
+1on2tajn.
+1on2tan.
+1on2te.
+1on2to.
+1on2toj.
+1on2tojn.
+1on2ton.
+disk2on3t
+.fon3t
+.fr2on3t
+.hon3t
+horiz2on3t
+.kon3t
+konfr2on3t
+.mon3t
+mastod2on3t
+.melol2on3t
+.pon3t
+.rak2on3t
+.rem2on3t
+.renk2on3t
+.sp2on3t
+vol2on3t
+duo2pa.
+duo2paj.
+duo2pajn.
+duo2pan.
+duo2pe.
+duo2po.
+duo2poj.
+duo2pojn.
+duo2pon.
+.trio2p
+kvar3o2p
+kvin3o2p
+ses3o2p
+sep3o2p
+.ok3o2pa.
+.ok3o2paj.
+.ok3o2pajn.
+.ok3o2pan.
+.ok3o2pe.
+.ok3o2po.
+.ok3o2poj.
+.ok3o2pojn.
+.ok3o2pon.
+naÅ­o4p
+dek3o2pa.
+dek3o2paj.
+dek3o2pajn.
+dek3o2pan.
+dek3o2pe.
+dek3o2po.
+dek3o2poj.
+dek3o2pojn.
+dek3o2pon.
+cent3o2pa.
+cent3o2paj.
+cent3o2pajn.
+cent3o2pan.
+cent3o2pe.
+cent3o2po.
+cent3o2poj.
+cent3o2pojn.
+cent3o2pon.
+mil3o2pa.
+mil3o2paj.
+mil3o2pajn.
+mil3o2pan.
+mil3o2pe.
+mil3o2po.
+mil3o2poj.
+mil3o2pojn.
+mil3o2pon.
+1o2ta.
+1o2taj.
+1o2tajn.
+1o2tan.
+1o2te.
+1o2to.
+1o2toj.
+1o2tojn.
+1o2ton.
+abrik2o3t
+anekd2o3t
+antid2o3t
+asimpt2o3t
+.az2o3t
+.bo3t
+.bal2o3t
+bankr2o3t
+.behem2o3t
+bergam2o3t
+.bi3g2o3t
+.bisk2o3t
+bojk2o3t
+.do3t
+.dep2o3t
+.desp2o3t
+.dev2o3t
+dorl2o3t
+.ekz2o3t
+.er2o3t
+.erg2o3t
+.fo3t
+.fag2o3t
+.fakt2o3t
+.fl2o3t
+fokstr2o3t
+.fr2o3t
+.go3t
+.gav2o3t
+.golg2o3t
+.gr2o3t
+.herod2o3t
+hipn2o3t
+hotent2o3t
+.jo3t
+ĵab2o3t
+.ko3t
+.kaĉal2o3t
+kalik2o3t
+.kaml2o3t
+.kan2o3t
+.kap2o3t
+.kar2o3t
+.koj2o3t
+.komp2o3t
+kompl2o3t
+kreoz2o3t
+.kul2o3t
+.kv2o3t
+.alikv2o3t
+.lo3t
+.lit2o3t
+.mo3t
+.mar2o3t
+.mark2o3t
+marm2o3t
+.mioz2o3t
+.no3t
+nark2o3t
+.po3t
+perlam2o3t
+.pier2o3t
+.pil2o3t
+.piv2o3t
+.pl2o3t
+poligl2o3t
+.ro3t
+.rab2o3t
+reding2o3t
+.rob2o3t
+.sab2o3t
+sacerd2o3t
+.sk2o3t
+.skler2o3t
+.skr2o3t
+.sp2o3t
+.Åo3t
+Åevj2o3t
+.terak2o3t
+.tr2o3t
+.trik2o3t
+.vo3t
+.zel2o3t
+.po2r
+.pos2t1
+pos3t2ament
+pos3t2iljon
+pos3t2u3l
+.prete2r1
+.re2f3l2ig
+.re2spond
+.re2spublik
+.re2storaci
+.re2tro
+.sa2m
+sam2ar
+.sa3m2u3m
+sa3m2uraj
+.se2n1
+.se3n2aa
+.se3n2ao
+sen2at
+sen2eskal
+.si4a
+.su2b1
+.su3b2ute
+.supe2r1
+.supe3ra.
+.supe3raj.
+.supe3rajn.
+.supe3ran.
+.supe3re.
+.supe3ro.
+.supe3roj.
+.supe3rojn.
+.supe3ron.
+.supe3ras.
+.supe3ri.
+.supe3ris.
+.supe3ros.
+.supe3ru.
+.supe3rus.
+.Åi4a
+.tran2s
+tran3scend
+tran3sept
+tran3sistor
+tran3sit
+tran3s2pir
+.tu2t1
+.tu3ta.
+.tu3taj.
+.tu3tajn.
+.tu3tan.
+.tu3te.
+.tu3to.
+.tu3toj.
+.tu3tojn.
+.tu3ton.
+1u2ja.
+1u2jaj.
+1u2jajn.
+1u2jan.
+1u2je.
+1u2jo.
+1u2joj.
+1u2jojn.
+1u2jon.
+1u2j1ig
+1u2j1iÄ
+.and2u3j
+.halel2u3j
+1u2la.
+1u2laj.
+1u2lajn.
+1u2lan.
+1u2le.
+1u2lo.
+1u2loj.
+1u2lojn.
+1u2lon.
+1e2m1u2l
+e3m2u3ls
+1u2l3ec
+1u2l3ej
+.akum2u3l
+.ang2u3l
+.bu3l
+.bet2u3l
+.bru3l
+.ejak2u3l
+.fist2u3l
+form2u3l
+.fu3l
+galin2u3l
+.gran2u3l
+.grat2u3l
+.herk2u3l
+hierod2u3l
+homunk2u3l
+.inok2u3l
+.ins2u3l
+.instanb2u3l
+.ju3l
+.ĵu3l
+.ku3l
+.kab2u3l
+kalend2u3l
+kalk2u3l
+kapit2u3l
+kaps2u3l
+koag2u3l
+.kons2u3l
+.kop2u3l
+korpusk2u3l
+.kum2u3l
+.lu3l
+.liverp2u3l
+.mu3l
+.mak2u3l
+manip2u3l
+matrik2u3l
+.mod2u3l
+molek2u3l
+.nu3l
+.neb2u3l
+.ok2u3l
+.pu3l
+.paĉ2u3l
+partik2u3l
+.pust2u3l
+.ru3l
+.reg2u3l
+retik2u3l
+.ruk2u3l
+.sim2u3l
+skrup2u3l
+somnamb2u3l
+speg2u3l
+.spek2u3l
+.stim2u3l
+.tu3l
+.tab2u3l
+tarant2u3l
+.tru3l
+tuberk2u3l
+turb2u3l
+.ul2u3l
+.uv2u3l
+.vist2u3l
+1u2l1ar
+2u3l2ari
+2u3l2ard
+.pedik2u3l2ar
+1u2ma.
+1u2maj.
+1u2majn.
+1u2man.
+1u2me.
+1u2mo.
+1u2moj.
+1u2mojn.
+1u2mon.
+1u2mas.
+1u2mi.
+1u2mis.
+1u2mos.
+1u2mu.
+1u2mus.
+1u2m3ec
+.alb2u3m
+.bu3m
+.opid2u3m
+referend2u3m
+.fu3m
+parf2u3m
+.gu3m
+.hu3m
+.kuk2u3m
+.luk2u3m
+.lu3m
+vol2u3m
+.plu3m
+.stern2u3m
+.pu3m
+.ru3m
+.ser2u3m
+.gru3m
+.kvor2u3m
+.tru3m
+.stru3m
+.su3m
+.res2u3m
+kons2u3m
+opos2u3m
+.bit2u3m
+.kost2u3m
+.zu3m
+.vi4a
+vi5and
+vi5atik
+.vi2c1
+.vi3ca.
+.vi3caj.
+.vi3cajn.
+.vi3can.
+.vi3ce.
+.vi3co.
+.vi3coj.
+.vi3cojn.
+.vi3con.
+.vi3c2ia
+.vi3c2io
+.vi2r1
+vir2us
+vi1r2ulent
+1a2fabl
+1a2gra
+1a2kr
+1a2per
+1a2va1r
+4ologi
+4ografi
+2fik
+fre2m2d3l
+4b1c
+4b1b2
+4b1d
+4b1f
+4b1g
+4b1h4
+4b1j2
+4b1k
+4b1m
+4b1n
+4b1p
+4b1s
+4b1s2k
+4b1t
+4b1v
+4b1z
+4b1ĉ
+4b1Ä
+4b1ĵ
+4b1Å
+4c1b
+4c1c2
+4c1ĉ
+4c1d
+4c1f
+4c1g
+4c1Ä
+4c1h4
+4c1j2
+4c1ĵ
+4c1k
+4c1l
+4c1m
+4c1n
+4c1p
+4c1r
+4c1s
+4c1Å
+4c1t
+4c1v
+4c1z
+4ĉ1b
+4ĉ1c
+4ĉ1d
+4ĉ1f
+4ĉ1g
+4ĉ1h4
+4ĉ1j2
+4ĉ1k
+4ĉ1l
+4ĉ1m
+4ĉ1n
+4ĉ1p
+4ĉ1s
+4ĉ1t
+4ĉ1v
+4ĉ1z
+4ĉ1ĉ
+4ĉ1Ä
+4ĉ1ĵ
+4ĉ1Å
+4d1b
+4d1c
+4d1d2
+4d1f
+4d1g
+4d1h4
+4d1j2
+4d1k
+4d1l
+4d1m
+4d1n
+4d1p
+4d1s
+4d1t
+4d1v
+4d1z
+4d1ĉ
+4d1Ä
+4d1ĵ
+4d1Å
+1e2ben
+1e2d2z
+1e2gal
+1e2le1g2an3t
+4f1b
+4f1c
+4f1ĉ
+4f1d
+4f1f2
+4f1g
+4f1Ä
+4f1h4
+4f1j2
+4f1ĵ
+4f1k
+4f1m
+4f1n
+4f1p
+4f1s
+4f1Å
+f1t
+4f1v
+4f1z
+4g1b
+4g1c
+4g1ĉ
+g1d
+4g1f
+4g1g2
+4g1Ä
+4g1h4
+4g1j2
+4g1ĵ
+4g1k
+g1m
+g1n
+4g1p
+4g1s
+4g1Å
+4g1t
+g1v
+4g1z
+4Ä1b
+4Ä1c
+4Ä1d
+4Ä1f
+4Ä1g
+4Ä1h4
+4Ä1j2
+4Ä1k
+4Ä1l
+4Ä1m
+4Ä1n
+4Ä1p
+4Ä1s
+4Ä1t
+4Ä1v
+4Ä1z
+4Ä1ĉ
+4Ä1Ä
+4Ä1ĵ
+4Ä1Å
+4h1ĉ
+4h1Ä
+4h1ĵ
+4h1Å
+4Ä¥1b
+4Ä¥1c
+4Ä¥1d
+4Ä¥1f
+4Ä¥1g
+4Ä¥1h4
+4Ä¥1j2
+4Ä¥1k
+4Ä¥1m
+4Ä¥1n
+4Ä¥1p
+4Ä¥1s
+4Ä¥1t
+4Ä¥1v
+4Ä¥1z
+4ĥ1ĉ
+4Ä¥1Ä
+4ĥ1ĵ
+4Ä¥1Å
+1i2dent
+4j1b
+4j1c
+4j1d
+4j1f
+4j1g
+4j1h4
+4j1k
+4j1l
+4j1m
+4j1n
+4j1p
+4j1r
+4j1s
+4j1t
+4j1v
+4j1z
+4j1ĉ
+4j1Ä
+4j1ĵ
+4j1Å
+4ĵ1b
+4ĵ1c
+4ĵ1d
+4ĵ1f
+4ĵ1g
+4ĵ1h4
+4ĵ1j2
+4ĵ1k
+4ĵ1l
+4ĵ1m
+4ĵ1n
+4ĵ1p
+4ĵ1s
+4ĵ1t
+4ĵ1v
+4ĵ1z
+4ĵ1ĉ
+4ĵ1Ä
+4ĵ1ĵ
+4ĵ1Å
+4k1b
+4k1c
+4k1d
+4k1f
+4k1g
+4k1h4
+4k1j2
+4k1m
+4k1n
+4k1p
+4k1s
+k1s2t2r
+4k1t
+k1v
+4k1z
+4k1ĉ
+4k1Ä
+4k1ĵ
+4k1Å
+4l1b
+4l1c
+4l1d
+4l1f
+4l1g
+4l1h4
+4l1j2
+4l1k
+4l1l2
+4l1m
+4l1n
+4l1p
+4l1r
+4l1s2
+4l1t
+4l1v
+4l1z
+4l1ĉ
+4l1Ä
+4l1ĵ
+4l5Å2
+4m1b
+4m1c
+4m1d
+4m1f
+4m1g
+4m1h4
+4m1j2
+4m1k
+4m1l
+4m1m2
+4m1n
+4m1p
+4m1r
+4m1s
+4m1t
+4m1v
+4m1z
+4m1ĉ
+4m1Ä
+4m1ĵ
+4m1Å
+mul2t1
+mult2e
+mul2t3eg
+mul3ta
+mul3te.
+mul3to
+mul4t3obl
+4n1b
+4n1c
+4n1d
+4n1f
+4n1g
+4n1h4
+4n1j
+4n1k
+n2kv
+4n1l
+n1m
+4n1n
+4n1p
+4n1r
+4n1s
+n1s2c
+n1s2t
+4n1t
+4n1v2
+4n1z
+4n1ĉ
+4n1Ä
+4n1ĵ
+4n1Å
+n2k1c
+n2s1f
+nor2d1af
+nor2d1am
+nor2d1az
+nor2d1eÅ­
+nor2d1rus
+nor2d1germ
+1o2be
+1o2kup
+1o2por1tun
+4p1b
+4p1c
+4p1d
+p1f
+4p1g
+4p1h4
+p1j2
+p1k
+p1m
+p1n
+p1s
+p1t
+4p1v
+4p1z
+4p1ĉ
+4p1Ä
+4p1ĵ
+p1Å
+4r1b
+4r1c
+4r1d
+4r1f
+4r1g
+4r1h4
+4r1j2
+4r1k
+4r1l
+4r1m
+4r1n
+4r1p
+4r1s
+4r1t
+4r1v
+4r1z
+4r1ĉ
+4r1Ä
+4r1ĵ
+4r1Å
+s1b
+s1c
+4s1ĉ
+4s1d
+s1f
+s1g
+4s1Ä
+4s1h4
+4s1j2
+4s1ĵ
+s1k
+4s1l
+3s2lab
+3s2lalom
+3s2lang
+3s2lav
+3s2led
+3s2lip
+3s2lojd
+3s2lovak
+3s2loven
+3s2lup
+3s2lofoks
+4s1m
+3s2malt
+3s2merald
+3s2milak
+3s2mirg
+3s2mut
+4s1n
+3s2nob
+3s2nuf
+s1p
+s1r
+4s1s
+4s1Å
+s1t
+1s2tu1d
+s1v
+4s1z
+.su2d1af
+.su2d1am
+.su2d1azi
+.su2d1eÅ­r
+.su2d1rus
+4Å1b
+4Å1c
+4Å1d
+4Å1f
+4Å1g
+4Å1h4
+4Å1j2
+4Å1k
+Å1m
+Å1n
+Å1p
+4Å1s
+Å1t
+Å1v
+4Å1z
+4Å1ĉ
+4Å1Ä
+4Å1ĵ
+4Å1Å
+1Å2tel
+4t1b
+4t1c
+4t1d
+4t1f
+4t1g
+4t1h4
+4t1j2
+4t1k
+4t1m
+4t1n
+4t1p
+4t1s
+4t1t
+4t1v
+4t1z
+4t1ĉ
+4t1Ä
+4t1ĵ
+4t1Å
+4Å­1
+Å­2s1k
+4v1b
+4v1c
+4v1d
+4v1f
+4v1g
+4v1h4
+4v1j2
+4v1k
+4v1l
+4v1m
+4v1n
+4v1p
+4v1s
+4v1t
+4v1v
+4v1z
+4v1ĉ
+4v1Ä
+4v1ĵ
+4v1Å
+4z1b
+4z1c
+4z1d
+4z1f
+4z1g
+4z1h4
+4z1j2
+4z1k
+4z1l
+z2lot
+4z1m
+4z1n
+4z1p
+4z1r
+4z1s
+4z1t
+4z1v
+4z1ĉ
+4z1Ä
+4z1ĵ
+4z1Å} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/patterns/mkii/lang-es.pat b/Master/texmf-dist/tex/context/patterns/mkii/lang-es.pat
index 55e09b49e49..b285650a4a2 100644
--- a/Master/texmf-dist/tex/context/patterns/mkii/lang-es.pat
+++ b/Master/texmf-dist/tex/context/patterns/mkii/lang-es.pat
@@ -13,7 +13,7 @@
2bd
2bf
2bg
-2b1h
+2bh
2bj
2bk
2bm
@@ -56,7 +56,7 @@
2dd
2df
2dg
-2d1h
+2dh
2dj
2dk
2dl
@@ -79,7 +79,7 @@
2fd
2ff
2fg
-2f1h
+2fh
2fj
2fk
2fm
@@ -101,7 +101,7 @@
2gd
2gf
2gg
-2g1h
+2gh
2gj
2gk
2gm
@@ -121,7 +121,7 @@
2hd
2hf
2hg
-2h1h
+2hh
2hj
2hk
2hl
@@ -145,7 +145,7 @@
2jd
2jf
2jg
-2j1h
+2jh
2jj
2jk
2jl
@@ -169,7 +169,7 @@
2kd
2kf
2kg
-2k1h
+2kh
2kj
2kk
2km
@@ -191,7 +191,7 @@
2ld
2lf
2lg
-2l1h
+2lh
2lj
2lk
2lm
@@ -214,7 +214,7 @@
2md
2mf
2mg
-2m1h
+2mh
2mj
2mk
2ml
@@ -238,7 +238,7 @@
2nd
2nf
2ng
-2n1h
+2nh
2nj
2nk
2nl
@@ -262,7 +262,7 @@
2pd
2pf
2pg
-2p1h
+2ph
2pj
2pk
2pm
@@ -284,7 +284,7 @@
2qd
2qf
2qg
-2q1h
+2qh
2qj
2qk
2ql
@@ -308,7 +308,7 @@
2rd
2rf
2rg
-2r1h
+2rh
2rj
2rk
2rl
@@ -331,7 +331,7 @@
2sd
2sf
2sg
-2s1h
+2sh
2sj
2sk
2sl
@@ -355,7 +355,7 @@
2td
2tf
2tg
-2t1h
+2th
2tj
2tk
2tm
@@ -374,7 +374,7 @@
2vd
2vf
2vg
-2v1h
+2vh
2vj
2vk
2vm
@@ -396,7 +396,7 @@
2wd
2wf
2wg
-2w1h
+2wh
2wj
2wk
2wl
@@ -420,7 +420,7 @@
2xd
2xf
2xg
-2x1h
+2xh
2xj
2xk
2xl
@@ -444,7 +444,7 @@
2yd
2yf
2yg
-2y1h
+2yh
2yj
2yk
2yl
@@ -468,7 +468,7 @@
2zd
2zf
2zg
-2z1h
+2zh
2zj
2zk
2zl
@@ -1057,6 +1057,8 @@ v2r
4ts.
san4c5t
plan4c5t
+com4p3t
+prom4p3t
o1eu2
a1ae2
a1aó2
@@ -1474,6 +1476,29 @@ e5r4a3dor.
e5r4a3dora.
e5r4a3dores.
e5r4a3doras.
+.a4
+.abre1h
+.abre1a2
+.abre1e2
+.abre1i2
+.abre1o2
+.abre1u2
+.abre1á2
+.abre1é2
+.abre1í2
+.abre1ó2
+.abre1ú2
+.acro1h
+.acro1a2
+.acro1e2
+.acro1i2
+.acro1o2
+.acro1u2
+.acro1á2
+.acro1é2
+.acro1í2
+.acro1ó2
+.acro1ú2
acto1h
acto1a2
acto1e2
@@ -1485,6 +1510,18 @@ acto1é2
acto1í2
acto1ó2
acto1ú2
+adeno1h
+adeno1a2
+adeno1e2
+adeno1i2
+adeno1o2
+adeno1u2
+adeno1á2
+adeno1é2
+adeno1í2
+adeno1ó2
+adeno1ú2
+4i3ditis.
aero1h
aero1a2
aero1e2
@@ -1507,54 +1544,34 @@ afro1é2
afro1í2
afro1ó2
afro1ú2
-.a2
-.an2a2
-.an2e2
-.an2i2
-.an2o2
-.an2u2
-.an2á2
-.an2é2
-.an2í2
-.an2ó2
-.an2ú2.
-ana3lí
-.aná3li
-.ana3li
-.an3aero
+agro1h
+agro1a2
+agro1e2
+agro1i2
+agro1o2
+agro1u2
+agro1á2
+agro1é2
+agro1í2
+agro1ó2
+agro1ú2
.an3e2pigr
-.ane3xa
-.ane3xá
-.ane3xe
-.ane3xé
-.ane3xio
-.ane3xió
-.an3h
-.ani3mad
-.ani3mád
-.ani3dar
-.ani3ll
-.ani3m
-.aniña
-.ani3q
-.an3i2so
-.an3i2só
-.ani3vel
-.ano5che
-.ano5din
-.ano5mal
-.ano5nad
-.anó3nim
-.anó5mal
-.ano5nim
-.ano5ta
-.ano3tá
-.anua3l
-.anua4lm
-.anu3bl
-.anu3da
-.anu3l
-asu3b2
+.an3a2lcoh
+.an3amnio
+.an3i4so
+.an3i4só
+.an3aero
+andro1h
+andro1a2
+andro1e2
+andro1i2
+andro1o2
+andro1u2
+andro1á2
+andro1é2
+andro1í2
+andro1ó2
+andro1ú2
anfi1h
anfi1a2
anfi1e2
@@ -1566,6 +1583,8 @@ anfi1é2
anfi1í2
anfi1ó2
anfi1ú2
+4o3xo.
+4o3xos.
anglo1h
anglo1a2
anglo1e2
@@ -1594,6 +1613,10 @@ acante2
4ísmos.
4ísta.
4ístas.
+4ismo.
+4ismos.
+4ista.
+4istas.
4ístico.
4ísticos.
4ística.
@@ -1604,6 +1627,10 @@ mante4a
e4a3miento
e4ándo
tras3antea
+2huelo.
+2huela.
+2huelos.
+2huelas.
.anti1h
.anti1a2
.anti1e2
@@ -1617,6 +1644,17 @@ tras3antea
.anti1ú2
ti2o3qu
ti2o3co
+apico1h
+apico1a2
+apico1e2
+apico1i2
+apico1o2
+apico1u2
+apico1á2
+apico1é2
+apico1í2
+apico1ó2
+apico1ú2
archi1h
archi1a2
archi1e2
@@ -1628,6 +1666,39 @@ archi1é2
archi1í2
archi1ó2
archi1ú2
+.atto1h
+.atto1a2
+.atto1e2
+.atto1i2
+.atto1o2
+.atto1u2
+.atto1á2
+.atto1é2
+.atto1í2
+.atto1ó2
+.atto1ú2
+audio1h
+audio1a2
+audio1e2
+audio1i2
+audio1o2
+audio1u2
+audio1á2
+audio1é2
+audio1í2
+audio1ó2
+audio1ú2
+austro1h
+austro1a2
+austro1e2
+austro1i2
+austro1o2
+austro1u2
+austro1á2
+austro1é2
+austro1í2
+austro1ó2
+austro1ú2
auto1h
auto1a2
auto1e2
@@ -1644,6 +1715,7 @@ auto1ú2
.bi1ox
.bi1ó2x
.bi1un
+bi1u2ní
biblio1h
biblio1a2
biblio1e2
@@ -1656,20 +1728,29 @@ biblio1í2
biblio1ó2
biblio1ú2
bien2
+bien3b
+bien3c
+bien3d
+bien3f
+bien3g
bien3h
-bien3v
-bien3q
+bien3l
bien3m
+bien3p
+bien3q
+bien3s
bien3t
-b4ien3do.
-.su3b4ien
-b4ien3das.
+bien3v
+bien3z
.bie4n3and
.bie4n3a4pa
.bie4n3a4ve
.bie4n3est
.bie4n3int
.bie4n3o4lie
+b4ien3do.
+.su3b4ien
+b4ien3das.
bio1h
bio1a2
bio1e2
@@ -1681,7 +1762,17 @@ bio1é2
bio1í2
bio1ó2
bio1ú2
-bi1u2ní
+busca1h
+busca1a2
+busca1e2
+busca1i2
+busca1o2
+busca1u2
+busca1á2
+busca1é2
+busca1í2
+busca1ó2
+busca1ú2
cardio1h
cardio1a2
cardio1e2
@@ -1715,6 +1806,30 @@ centi1é2
centi1í2
centi1ó2
centi1ú2
+cian1h
+ciano1h
+ciano1a2
+ciano1e2
+ciano1i2
+ciano1o2
+ciano1u2
+ciano1á2
+ciano1é2
+ciano1í2
+ciano1ó2
+ciano1ú2
+cibe2r3r
+cibe2r1h
+cibe2r1a2
+cibe2r1e2
+cibe2r1i2
+cibe2r1o2
+cibe2r1u2
+cibe2r1á2
+cibe2r1é2
+cibe2r1í2
+cibe2r1ó2
+cibe2r1ú2
centi5área
ciclo1h
ciclo1a2
@@ -1727,16 +1842,6 @@ ciclo1é2
ciclo1í2
ciclo1ó2
ciclo1ú2
-o4i3dea.
-o4i3deas.
-o4i3dal.
-o4i3dales.
-4o2i3de.
-4o2i3des.
-4i2dal.
-4i2dales.
-4i3deo.
-4i3deos.
cito1h
cito1a2
cito1e2
@@ -1748,6 +1853,17 @@ cito1é2
cito1í2
cito1ó2
cito1ú2
+clepto1h
+clepto1a2
+clepto1e2
+clepto1i2
+clepto1o2
+clepto1u2
+clepto1á2
+clepto1é2
+clepto1í2
+clepto1ó2
+clepto1ú2
cnico1h
cnico1a2
cnico1e2
@@ -1759,6 +1875,7 @@ cnico1é2
cnico1í2
cnico1ó2
cnico1ú2
+.co1h
.co2a2
.co2e2
.co2i2
@@ -1769,12 +1886,16 @@ cnico1ú2
.co2í2
.co2ó2
.co2ú2
+.co3acer
.co3acree
.coá3gul
.co3agen
.coa3gul
+.co3apóst
+.coa3lesc
.coa3lic
.co3arrend
+.coa3xial
.co3auto
.co3edic
.co3edit
@@ -1782,8 +1903,15 @@ cnico1ú2
.co3efici
.coe3tá
.co3exis
+.co6hib
+.co4hech
+.co4hesi
+.co4heso
+.co4herent
+.co4het
.co3imput
.coi3to
+.co4o5ki
.co4o3per
.co4o3pér
.co4orden
@@ -1792,6 +1920,40 @@ cnico1ú2
.co4opt
.co4ópt
.co2nurb
+cou3lomb
+corta1h
+corta1a2
+corta1e2
+corta1i2
+corta1o2
+corta1u2
+corta1á2
+corta1é2
+corta1í2
+corta1ó2
+corta1ú2
+cosmo1h
+cosmo1a2
+cosmo1e2
+cosmo1i2
+cosmo1o2
+cosmo1u2
+cosmo1á2
+cosmo1é2
+cosmo1í2
+cosmo1ó2
+cosmo1ú2
+crio1h
+crio1a2
+crio1e2
+crio1i2
+crio1o2
+crio1u2
+crio1á2
+crio1é2
+crio1í2
+crio1ó2
+crio1ú2
cripto1h
cripto1a2
cripto1e2
@@ -1825,6 +1987,28 @@ contra1é2
contra1í2
contra1ó2
contra1ú2
+cuadru1h
+cuadru1a2
+cuadru1e2
+cuadru1i2
+cuadru1o2
+cuadru1u2
+cuadru1á2
+cuadru1é2
+cuadru1í2
+cuadru1ó2
+cuadru1ú2
+cuasi1h
+cuasi1a2
+cuasi1e2
+cuasi1i2
+cuasi1o2
+cuasi1u2
+cuasi1á2
+cuasi1é2
+cuasi1í2
+cuasi1ó2
+cuasi1ú2
deca1h
deca1a2
deca1e2
@@ -1836,20 +2020,46 @@ deca1é2
deca1í2
deca1ó2
deca1ú2
-4e3dro.
-4e3dros.
-4é3drico.
-4é3dricos.
-4é3drica.
-4é3dricas.
-4í3ble.
-4í3bles.
-.de2sa2
+dento1h
+dento1a2
+dento1e2
+dento1i2
+dento1o2
+dento1u2
+dento1á2
+dento1é2
+dento1í2
+dento1ó2
+dento1ú2
+dermato1h
+dermato1a2
+dermato1e2
+dermato1i2
+dermato1o2
+dermato1u2
+dermato1á2
+dermato1é2
+dermato1í2
+dermato1ó2
+dermato1ú2
+dermo1h
+dermo1a2
+dermo1e2
+dermo1i2
+dermo1o2
+dermo1u2
+dermo1á2
+dermo1é2
+dermo1í2
+dermo1ó2
+dermo1ú2
+.de2s1h
+.de2s3a2
.de2se2
.de2si2
.de2so2
.de2su2
-.de2sá2
+.de2s3á2
.de2sé2
.de2sí2
.de2só2
@@ -1859,216 +2069,98 @@ deca2i3mient
3sas.
de2s3órde
de2s3orde
-de2s3abast
-de2s3aboll
-de2s3aboto
-de2s3abr
-des4a3brid
-de2s3abroch
-de2s3aceit
-de2s3aceler
-desa3cert
-desa3ciert
-de2s3acobar
-de2s3acomod
-de2s3acomp
-de2s3acons
-de2s3acopl
-de2s3acorr
-de2s3acostum
-de2s3acot
-desa3craliz
-de2s3acredit
-de2s3activ
-de2s3acuart
-de2s3aderez
-de2s3adeud
-de2s3adorar
-de2s3adormec
-de2s3adorn
-de2s3advert
-de2s3aferr
-de2s3afic
-de2s3afil
-de2s3afin
-de2s3afor
-de2s3agu
-desa3gú
-desa3garr
-de2s3agraci
-de2s3agrad
-de2s3agravi
-de2s3agreg
-de2s3agrup
-des4a3guis
-de2s3aherr
-de2s3ahij
-de2s3ajust
-de2s3alagar
-de2s3alent
-de2s3alfom
-de2s3alfor
-de2s3alien
-de2s3a4line
-de2s3a4liné
-de2s3aliñ
-desa3liv
-de2s3alm
-de2s3almid
-de2s3aloj
-de2s3alquil
-de2s3alter
-de2s3alumbr
-desa3marr
-desa3mobl
-de2s3amold
-de2s3amort
-de2s3amuebl
-de2s3ampa
-de2s3and
-de2s3angel
-de3sangr
-de2s3anid
-de2s3anim
-de2s3aním
-de2s3anud
-desa3pañ
-desa3pacib
-de2s3apadr
-de2s3apare
-de2s3aparec
-de2s3aparic
-de2s3apeg
-de2s3apercib
-de2s3apes
-de2s3aplic
-de2s3apolill
-de2s3apoy
-de2s3aprend
-de2s3apret
-de2s3apriet
-de2s3aprob
-de2s3apropi
-de2s3aprovech
-de2s3arbol
-de2s3aren
-de2s3arm
-des4arme
-de2s3arraig
-de2s3arregl
-de2s3arrend
-de2s3arrim
-desa3rroll
-de2s3arrop
-de2s3arrug
-de2s3articul
-de2s3asent
-de2s3asist
-de2s3asn
-de2s3atenc
-de2s3atend
-de2s3atiend
-de2s3atent
-desa3tin
-de2s3atorn
-de2s3atranc
-de2s3autor
-de2s3avis
-desa3yun
-desa3zón
-desa3zon
-de2s3embal
-de2s3embál
-de2s3embar
-de2s3embár
-de2s3embarg
-de2s3embols
-de2s3emborr
-de2s3embosc
-de2s3embot
-de2s3embrag
-de2s3embrág
-de2s3embrave
-de2s3embráve
-de2s3embroll
-de2s3embróll
-de2s3embruj
-de2s3embrúj
-de3semej
-de2s3empañ
-de2s3empáñ
-de2s3empac
-de2s3empaquet
-de2s3empaquét
-de2s3emparej
-de2s3emparéj
-de2s3emparent
-de2s3empat
-de2s3empé
-de2s3empedr
-de2s3empeg
-de2s3empeor
-de2s3emperez
-de2s3empern
-de2s3emple
-de2s3empolv
-de2s3empotr
-de2s3empoz
-de2s3enam
-de2s3encab
-de2s3encad
-de2s3encaj
-de2s3encáj
-de2s3encall
-de2s3encáll
-de2s3encam
-de3sencant
-de2s3encap
-de2s3encar
-de2s3encár
-de2s3ench
-de2s3encl
-de2s3enco
-de2s3encr
-de2s3encu
-de2s3end
-de3senfad
-de3senfád
-de2s3enfi
-de2s3enfo
-de2s3enfó
-de3senfren
-de2s3enfund
-de2s3enfur
-de3sengañ
-de3sengáñ
-de2s3enganch
-de2s3engar
-de2s3engas
-de2s3engom
-de2s3engoz
-de2s3engra
-de2s3enhebr
-de2s3enj
-de2s3enlad
-de2s3enlaz
-de2s3enlo
-de2s3enm
-de2s3enr
-de2s3ens
-de2s3enta
-de3sentend
-de3sentien
-de3sentién
-de2s3enter
-de2s3entier
-de2s3entiér
-de2s3ento
-de2s3entr
-de2s3entu
-de2s3envain
-de3senvolvim
+de3s4a3brid
+de3s4a3bor
+de3s4a3craliz
+de3s4a3cralic
+de3s4a3fia
+de3s4a3fía
+de3s4a3fiá
+de3s4a3fíe
+de3s4a3fié
+de3s4a3fío
+de3s4a3fió
+des5a4gua
+de3s4ahuci
+de3s4áhuci
+de3s4a3guis
+des4ala
+des4ála
+de3s4a3liv
+de3s4a3liniz
+de3s4a3liníz
+de3s4a3linic
+de3s4a3liníc
+de3s4angr
+de3s4angel
+de3s4a3prensiv
+de3s4a3rroll
+desa4sa
+desa4se
+des5a4tes
+de3s4astr
+de3s4a3yun
+de3s4a3zón
+de3s4a3zon
+.des3em
+de3s4e3meja
+de3s4e3méja
+de3s4e3mejá
+de3s4e3meje
+de3s4e3méje
+de3s4e3mejé
+de3s4e3mejo
+de3s4e3méjo
+de3s4e3mejó
+de3s4empeñ
+de3s4empéñ
+.des3en
+de3s4enfren
+de3s4enfrén
de3seo
+de3sea
+de3sean
+de3seán
+de3sear
+de3seár
+de3seab
+de3seáb
+de3sead
+de3seád
+de3seam
+de3seám
+de3seas
+de3seás
+de3se3co
+de3se3ca
+de3se3cá
+de3se3có
+de3s4e3que
+de3s4e3qué
+de3se3can
+de3se3cán
+de3se3car
+de3se3cár
+de3se3cab
+de3se3cáb
+de3se3cad
+de3se3cád
+de3se3cam
+de3se3cám
+de3se3cas
+de3se3cás
+de3se3cha
+de3sé3cha
+de3se3chá
+de3se3ché
+de3se3che
+de3sé3che
+de3se3chó
+de3se3cho
+de2s3edif
+de2s3educ
+de2s3eduq
+de2s3escombr
de2s3eq
de3s4erci
de3s4ert
@@ -2076,15 +2168,24 @@ de3s4ért
de2s3espa
de3sesperac
de2s3esperanz
+de2s3espin
+de2s3espum
de2s3estabil
+de2s3estaci
+de2s3estalin
de2s3estim
+de2s3estres
+de2s3estruc
de3sider
de3sidia
+de2s3ideol
de3sidio
de3siert
de3sign
-de3sigual
-de3silusi
+de2s3igual
+de2s3iguál
+de2s3ilusion
+de2s3ilusión
de2s3imagin
de2s3iman
de2s3impon
@@ -2093,11 +2194,13 @@ de2s3incent
de2s3inclin
de2s3incorp
de2s3incrust
-de3sinenc
+de3si3nenc
+de3si3nent
de3sinfec
de3su3dar
de3su3das
de3su3dan
+de2s3infart
de2s3inflam
de2s3infl
de2s3inform
@@ -2109,23 +2212,41 @@ iní3ci
de3s4integr
de3s4inter
de2s3intox
+de2s3intub
de2s3inver
de3sisten
de3isti
de2s3obedec
+de2s3obedez
+de2s3obedien
de2s3oblig
de2s3obstr
-de3socup
+de3so3cas
+de2s3ocup
+de2s3ocúp
de2s3odor
+de3so3la
+de3só3la
+de3so3lá
+de3so3le
+de3so3lé
+de3so3lo
+de3so3ló
de3solac
de3solad
de3soll
+de2s3oprim
de2s3orej
+de2s3orill
de2s3orient
de3sortij
de2s3organi
+de2s3ornam
de3suell
de3sonce
+de2s3ova
+de2s3ová
+de2s3ové
de2s3ovi
de2s3oxi
de2s3oye
@@ -2134,10 +2255,30 @@ de3s4ubstan
de3s4ustan
de3s4oseg
de2s3ub4ic
+de2s3ub4iq
de2s3unir
+de2s3unan
+de2s3unas
+de2s3une
+de2s3unid
+de2s3unien
+de2s3uniera
+de2s3unies
+de2s3unién
+de2s3uniér
+de2s3uniés
+de2s3unió
+de2s3uno
+de2s3uná
+de2s3uní
+de2s3unía
de2s3unier
de2s3unim
+de2s3uña
+de2s3uñá
+de2s3urbani
.diecio2
+.diecio3ch
ecano1h
ecano1a2
ecano1e2
@@ -2160,6 +2301,17 @@ eco1é2
eco1í2
eco1ó2
eco1ú2
+ecto1h
+ecto1a2
+ecto1e2
+ecto1i2
+ecto1o2
+ecto1u2
+ecto1á2
+ecto1é2
+ecto1í2
+ecto1ó2
+ecto1ú2
ectro1h
ectro1a2
ectro1e2
@@ -2171,6 +2323,7 @@ ectro1é2
ectro1í2
ectro1ó2
ectro1ú2
+.e2n1h
.e2n2a2
.e2n2e2
.e2n2i2
@@ -2181,6 +2334,8 @@ ectro1ú2
.e2n2í2
.e2n2ó2
.e2n2ú2
+.ena3mor
+.en3amór
.ene3mist
.ene3míst
.eno3jar
@@ -2188,7 +2343,18 @@ ectro1ú2
.enu3merá
.enu3mere
.en3aceit
+.ena3jen
+.ena3jén
+.eno3ja
+.eno3já
+.eno3je
+.eno3jé
+.eno3jo
+.eno3jó
+.enó3j
.en3arb
+en1hebr
+.en2hest
4emboca
4o3lógico.
4o3lógica.
@@ -2212,6 +2378,28 @@ endo1é2
endo1í2
endo1ó2
endo1ú2
+enea1h
+enea1a2
+enea1e2
+enea1i2
+enea1o2
+enea1u2
+enea1á2
+enea1é2
+enea1í2
+enea1ó2
+enea1ú2
+entero1h
+entero1a2
+entero1e2
+entero1i2
+entero1o2
+entero1u2
+entero1á2
+entero1é2
+entero1í2
+entero1ó2
+entero1ú2
ento1h
ento1a2
ento1e2
@@ -2234,6 +2422,39 @@ entre1é2
entre1í2
entre1ó2
entre1ú2
+esclero1h
+esclero1a2
+esclero1e2
+esclero1i2
+esclero1o2
+esclero1u2
+esclero1á2
+esclero1é2
+esclero1í2
+esclero1ó2
+esclero1ú2
+estereo1h
+estereo1a2
+estereo1e2
+estereo1i2
+estereo1o2
+estereo1u2
+estereo1á2
+estereo1é2
+estereo1í2
+estereo1ó2
+estereo1ú2
+etno1h
+etno1a2
+etno1e2
+etno1i2
+etno1o2
+etno1u2
+etno1á2
+etno1é2
+etno1í2
+etno1ó2
+etno1ú2
euco1h
euco1a2
euco1e2
@@ -2256,6 +2477,7 @@ euro1é2
euro1í2
euro1ó2
euro1ú2
+.e2x1h
.e2x2a2
.e2x2e2
.e2x2i2
@@ -2266,6 +2488,15 @@ euro1ú2
.e2x2í2
.e2x2ó2
.e2x2ú2
+.ex2hal
+.ex2hál
+.ex2haus
+.ex2hib
+.ex2híb
+.ex2hort
+.ex2hórt
+.ex2hum
+.ex2húm
3gono.
3gonos.
3gonal.
@@ -2276,6 +2507,7 @@ exé3ge
exó3ti
exa3cerb
exa3ger
+ex3alum
exa3min
exe3cr
exe3géti
@@ -2289,10 +2521,6 @@ exi3gi
exi3gí
exi3jo
exí3jo
-3gua.
-3guas.
-3guo.
-3guos.
exi3lia
exi3liá
exí3lia
@@ -2316,6 +2544,7 @@ exi3mó
exí3mo
exi3tos
exi3lar
+exo3bió
exo3ner
exo3crin
exo3tér
@@ -2323,6 +2552,8 @@ exo3tic
exo3tiq
exo3tism
exo3gami
+exo3esq
+exo3plan
exo3gámi
exu3ber
exu3dar
@@ -2342,6 +2573,61 @@ extra1ú2
u4teri
.cau5t
.deu5t
+femto1h
+femto1a2
+femto1e2
+femto1i2
+femto1o2
+femto1u2
+femto1á2
+femto1é2
+femto1í2
+femto1ó2
+femto1ú2
+ferro1h
+ferro1a2
+ferro1e2
+ferro1i2
+ferro1o2
+ferro1u2
+ferro1á2
+ferro1é2
+ferro1í2
+ferro1ó2
+ferro1ú2
+filo1h
+filo1a2
+filo1e2
+filo1i2
+filo1o2
+filo1u2
+filo1á2
+filo1é2
+filo1í2
+filo1ó2
+filo1ú2
+fisio1h
+fisio1a2
+fisio1e2
+fisio1i2
+fisio1o2
+fisio1u2
+fisio1á2
+fisio1é2
+fisio1í2
+fisio1ó2
+fisio1ú2
+fito1h
+fito1a2
+fito1e2
+fito1i2
+fito1o2
+fito1u2
+fito1á2
+fito1é2
+fito1í2
+fito1ó2
+fito1ú2
fono1h
fono1a2
fono1e2
@@ -2364,6 +2650,28 @@ foto1é2
foto1í2
foto1ó2
foto1ú2
+galo1h
+galo1a2
+galo1e2
+galo1i2
+galo1o2
+galo1u2
+galo1á2
+galo1é2
+galo1í2
+galo1ó2
+galo1ú2
+gastero1h
+gastero1a2
+gastero1e2
+gastero1i2
+gastero1o2
+gastero1u2
+gastero1á2
+gastero1é2
+gastero1í2
+gastero1ó2
+gastero1ú2
gastro1h
gastro1a2
gastro1e2
@@ -2386,6 +2694,28 @@ geo1é2
geo1í2
geo1ó2
geo1ú2
+geronto1h
+geronto1a2
+geronto1e2
+geronto1i2
+geronto1o2
+geronto1u2
+geronto1á2
+geronto1é2
+geronto1í2
+geronto1ó2
+geronto1ú2
+gineco1h
+gineco1a2
+gineco1e2
+gineco1i2
+gineco1o2
+gineco1u2
+gineco1á2
+gineco1é2
+gineco1í2
+gineco1ó2
+gineco1ú2
giga1h
giga1a2
giga1e2
@@ -2408,6 +2738,39 @@ gluco1é2
gluco1í2
gluco1ó2
gluco1ú2
+grafo1h
+grafo1a2
+grafo1e2
+grafo1i2
+grafo1o2
+grafo1u2
+grafo1á2
+grafo1é2
+grafo1í2
+grafo1ó2
+grafo1ú2
+guarda1h
+guarda1a2
+guarda1e2
+guarda1i2
+guarda1o2
+guarda1u2
+guarda1á2
+guarda1é2
+guarda1í2
+guarda1ó2
+guarda1ú2
+halo1h
+halo1a2
+halo1e2
+halo1i2
+halo1o2
+halo1u2
+halo1á2
+halo1é2
+halo1í2
+halo1ó2
+halo1ú2
hecto1h
hecto1a2
hecto1e2
@@ -2419,6 +2782,17 @@ hecto1é2
hecto1í2
hecto1ó2
hecto1ú2
+helico1h
+helico1a2
+helico1e2
+helico1i2
+helico1o2
+helico1u2
+helico1á2
+helico1é2
+helico1í2
+helico1ó2
+helico1ú2
helio1h
helio1a2
helio1e2
@@ -2452,6 +2826,8 @@ hemi1é2
hemi1í2
hemi1ó2
hemi1ú2
+hemio3la.
+hemio3las.
hemo1h
hemo1a2
hemo1e2
@@ -2463,9 +2839,41 @@ hemo1é2
hemo1í2
hemo1ó2
hemo1ú2
+hepato1h
+hepato1a2
+hepato1e2
+hepato1i2
+hepato1o2
+hepato1u2
+hepato1á2
+hepato1é2
+hepato1í2
+hepato1ó2
+hepato1ú2
+hepta1h
+hepta1a2
+hepta1e2
+hepta1i2
+hepta1o2
+hepta1u2
+hepta1á2
+hepta1é2
+hepta1í2
+hepta1ó2
+hepta1ú2
+hetero1h
+hetero1a2
+hetero1e2
+hetero1i2
+hetero1o2
+hetero1u2
+hetero1á2
+hetero1é2
+hetero1í2
+hetero1ó2
+hetero1ú2
2al.
2ales.
-.hepta1e
hexa1h
hexa1a2
hexa1e2
@@ -2488,7 +2896,19 @@ hidro1é2
hidro1í2
hidro1ó2
hidro1ú2
+holo1h
+holo1a2
+holo1e2
+holo1i2
+holo1o2
+holo1u2
+holo1á2
+holo1é2
+holo1í2
+holo1ó2
+holo1ú2
hipe2r3r
+hipe2r1h
hipe2r1a2
hipe2r1e2
hipe2r1i2
@@ -2549,6 +2969,17 @@ homo1é2
homo1í2
homo1ó2
homo1ú2
+homeo1h
+homeo1a2
+homeo1e2
+homeo1i2
+homeo1o2
+homeo1u2
+homeo1á2
+homeo1é2
+homeo1í2
+homeo1ó2
+homeo1ú2
ibero1h
ibero1a2
ibero1e2
@@ -2571,6 +3002,7 @@ icono1é2
icono1í2
icono1ó2
icono1ú2
+.i2n1h
.i2n2a2
.i2n2e2
.i2n2i2
@@ -2581,43 +3013,81 @@ icono1ú2
.i2n2í2
.i2n2ó2
.i2n2ú2
-.in3abord
+in4hib
+in4híb
+in4hal
+in4hál
+in4hest
+in4hést
+in4hum
+in4húm
+in4hiest
+in4hiést
+in4herent
+in4hóspit
+in4hesi
.in3abarc
+.in3abord
.in3acent
-.in3aguant
+.in3acept
.in3adapt
-.ina3movib
+.in3adopt
+.in3aguant
+.in3alámb
+.in3alien
.in3analiz
-.ina3nic
.in3anim
-.iná3nim
+.in3apagab
+.in3afect
.in3apel
+.in3aplaz
.in3aplic
-.in3aprens
.in3apreci
+.in3aprehen
+.in3aprens
+.in3armón
.in3arrug
.in3asist
-.iné3dit
+.in3atent
.in3efic
.in3efici
.in3eludi
+.in3encont
+.in3equid
+.in3exact
+.in3evit
+.ina3movib
+.ina3nic
.ine3narr
+.ine3quív
+.iná3nim
+.iné3dit
+.in3eleg
+.in3exha
+.in3ex
ini3cia
iní3cia
ini3ciá
ini3cie
-.rei3na
re3ini3cia
re3iní3cia
re3ini3ciá
re3ini3cie
.ini3cuo
.ini3cua
+.in3igualab
+.in3in
+.in3obser
.ino3cuo
.ino3cua
+.ino3cenc
+.ino3cent
+.in3ocult
+.ino3fens
.ino3cula
.ino3culá
.ino3cule
+.in3oport
.inú3til
.inu3tiliz
infra1h
@@ -2631,7 +3101,19 @@ infra1é2
infra1í2
infra1ó2
infra1ú2
+inmuno1h
+inmuno1a2
+inmuno1e2
+inmuno1i2
+inmuno1o2
+inmuno1u2
+inmuno1á2
+inmuno1é2
+inmuno1í2
+inmuno1ó2
+inmuno1ú2
.inte2r3r
+.inte2r1h
.inte2r1a2
.inte2r1e2
.inte2r1i2
@@ -2654,18 +3136,23 @@ infra1ú2
.de3s4in3ter2e3sá
.de3s4in3ter2e3sé
.de3s4in3ter2e3só
-4n3te3ri3n
-4n4te4r5i4nsu
+4n5te5r2i3n
+inte6r5i4nsu
+inte6r5i4nst
+inte6r5i4nd
+4ino.
+4inos.
+4ina.
+4inas.
.in3te3r4rog
.in3te3r4rupc
.in3te3r4rupt
.in3te3r4rump
inter4és
inte3r4esar
-inte4r4i4n4
-inter5ins5t
inte5r4regno
inte3r4ior4
+in3te3r4im.
4i4ano.
4i4ana.
4i4anos.
@@ -2681,6 +3168,28 @@ intra1é2
intra1í2
intra1ó2
intra1ú2
+islamo1h
+islamo1a2
+islamo1e2
+islamo1i2
+islamo1o2
+islamo1u2
+islamo1á2
+islamo1é2
+islamo1í2
+islamo1ó2
+islamo1ú2
+italo1h
+italo1a2
+italo1e2
+italo1i2
+italo1o2
+italo1u2
+italo1á2
+italo1é2
+italo1í2
+italo1ó2
+italo1ú2
iso1h
iso1a2
iso1e2
@@ -2703,6 +3212,50 @@ kilo1é2
kilo1í2
kilo1ó2
kilo1ú2
+leuco1h
+leuco1a2
+leuco1e2
+leuco1i2
+leuco1o2
+leuco1u2
+leuco1á2
+leuco1é2
+leuco1í2
+leuco1ó2
+leuco1ú2
+linfo1h
+linfo1a2
+linfo1e2
+linfo1i2
+linfo1o2
+linfo1u2
+linfo1á2
+linfo1é2
+linfo1í2
+linfo1ó2
+linfo1ú2
+lipo1h
+lipo1a2
+lipo1e2
+lipo1i2
+lipo1o2
+lipo1u2
+lipo1á2
+lipo1é2
+lipo1í2
+lipo1ó2
+lipo1ú2
+lito1h
+lito1a2
+lito1e2
+lito1i2
+lito1o2
+lito1u2
+lito1á2
+lito1é2
+lito1í2
+lito1ó2
+lito1ú2
macro1h
macro1a2
macro1e2
@@ -2779,6 +3332,28 @@ melano1é2
melano1í2
melano1ó2
melano1ú2
+meso1h
+meso1a2
+meso1e2
+meso1i2
+meso1o2
+meso1u2
+meso1á2
+meso1é2
+meso1í2
+meso1ó2
+meso1ú2
+meta1h
+meta1a2
+meta1e2
+meta1i2
+meta1o2
+meta1u2
+meta1á2
+meta1é2
+meta1í2
+meta1ó2
+meta1ú2
micro1h
micro1a2
micro1e2
@@ -2806,7 +3381,7 @@ ia5res.
amili6a
a3rio
a3ria
-li5área
+li5á4rea
mili4ar
mini1h
mini1a2
@@ -2826,6 +3401,17 @@ mini1ú2
2o3sas.
2o3samente.
mini4a5tur
+.mio1h
+.mio1a2
+.mio1e2
+.mio1i2
+.mio1o2
+.mio1u2
+.mio1á2
+.mio1é2
+.mio1í2
+.mio1ó2
+.mio1ú2
multi1h
multi1a2
multi1e2
@@ -2859,10 +3445,28 @@ mono1é2
mono1í2
mono1ó2
mono1ú2
-2i3co.
-2i3cos.
-2i3ca.
-2i3cas.
+morfo1h
+morfo1a2
+morfo1e2
+morfo1i2
+morfo1o2
+morfo1u2
+morfo1á2
+morfo1é2
+morfo1í2
+morfo1ó2
+morfo1ú2
+moto1h
+moto1a2
+moto1e2
+moto1i2
+moto1o2
+moto1u2
+moto1á2
+moto1é2
+moto1í2
+moto1ó2
+moto1ú2
namo1h
namo1a2
namo1e2
@@ -2874,6 +3478,28 @@ namo1é2
namo1í2
namo1ó2
namo1ú2
+nano1h
+nano1a2
+nano1e2
+nano1i2
+nano1o2
+nano1u2
+nano1á2
+nano1é2
+nano1í2
+nano1ó2
+nano1ú2
+narco1h
+narco1a2
+narco1e2
+narco1i2
+narco1o2
+narco1u2
+narco1á2
+narco1é2
+narco1í2
+narco1ó2
+narco1ú2
necro1h
necro1a2
necro1e2
@@ -2885,6 +3511,17 @@ necro1é2
necro1í2
necro1ó2
necro1ú2
+nefro1h
+nefro1a2
+nefro1e2
+nefro1i2
+nefro1o2
+nefro1u2
+nefro1á2
+nefro1é2
+nefro1í2
+nefro1ó2
+nefro1ú2
neo1h
neo1a2
neo1e2
@@ -2908,6 +3545,17 @@ neto1é2
neto1í2
neto1ó2
neto1ú2
+neumo1h
+neumo1a2
+neumo1e2
+neumo1i2
+neumo1o2
+neumo1u2
+neumo1á2
+neumo1é2
+neumo1í2
+neumo1ó2
+neumo1ú2
norte1h
norte1a2
norte1e2
@@ -2963,8 +3611,73 @@ omni1é2
omni1í2
omni1ó2
omni1ú2
-i2o.
-i2os.
+onco1h
+onco1a2
+onco1e2
+onco1i2
+onco1o2
+onco1u2
+onco1á2
+onco1é2
+onco1í2
+onco1ó2
+onco1ú2
+onto1h
+onto1a2
+onto1e2
+onto1i2
+onto1o2
+onto1u2
+onto1á2
+onto1é2
+onto1í2
+onto1ó2
+onto1ú2
+opto1h
+opto1a2
+opto1e2
+opto1i2
+opto1o2
+opto1u2
+opto1á2
+opto1é2
+opto1í2
+opto1ó2
+opto1ú2
+ornito1h
+ornito1a2
+ornito1e2
+ornito1i2
+ornito1o2
+ornito1u2
+ornito1á2
+ornito1é2
+ornito1í2
+ornito1ó2
+ornito1ú2
+orto1h
+orto1a2
+orto1e2
+orto1i2
+orto1o2
+orto1u2
+orto1á2
+orto1é2
+orto1í2
+orto1ó2
+orto1ú2
+orto4e3pía
+osteo1h
+osteo1a2
+osteo1e2
+osteo1i2
+osteo1o2
+osteo1u2
+osteo1á2
+osteo1é2
+osteo1í2
+osteo1ó2
+osteo1ú2
paleo1h
paleo1a2
paleo1e2
@@ -2976,10 +3689,16 @@ paleo1é2
paleo1í2
paleo1ó2
paleo1ú2
+.pa4n1a4fri
.pa4n1a4meri
+.pa4n1á4rab
+.pa4n1a4ráb
+.pa4n1a4rab
.pa4n1europ
-.pa4n1afri
-.pa4n1hisp
+.pa4n1islam
+.pa4n1islám
+.pa4n5hisp
+.pa4n1hel
.pa4n1ópti
para1h
para1a2
@@ -2996,6 +3715,7 @@ para2is.
aí5so.
aí5sos.
para4íso
+para4i3señ
para4ulata
penta1h
penta1a2
@@ -3008,6 +3728,28 @@ penta1é2
penta1í2
penta1ó2
penta1ú2
+peta1h
+peta1a2
+peta1e2
+peta1i2
+peta1o2
+peta1u2
+peta1á2
+peta1é2
+peta1í2
+peta1ó2
+peta1ú2
+pico1h
+pico1a2
+pico1e2
+pico1i2
+pico1o2
+pico1u2
+pico1á2
+pico1é2
+pico1í2
+pico1ó2
+pico1ú2
piezo1h
piezo1a2
piezo1e2
@@ -3019,6 +3761,17 @@ piezo1é2
piezo1í2
piezo1ó2
piezo1ú2
+piro1h
+piro1a2
+piro1e2
+piro1i2
+piro1o2
+piro1u2
+piro1á2
+piro1é2
+piro1í2
+piro1ó2
+piro1ú2
pluri1h
pluri1a2
pluri1e2
@@ -3050,6 +3803,19 @@ poli4andr
poli4antea
poli4arca
expoli4
+porta1h
+porta1a2
+porta1e2
+porta1i2
+porta1o2
+porta1u2
+porta1á2
+porta1é2
+porta1í2
+porta1ó2
+porta1ú2
+porta4e3ro
+.pos2t1h
.pos2t2a2
.pos2t2e2
.pos2t2i2
@@ -3060,10 +3826,17 @@ expoli4
.pos2t2í2
.pos2t2ó2
.pos2t2ú2
+po4s3impr
+po4s3o2per
+po4s3ind
+po4s3e4lect
+po4s3estr
.pos3tin
.pos3tín
+.pos4t3ind
pos3ta.
pos3tas.
+pos4t5s
s3te.
s3tes.
s3tal.
@@ -3089,31 +3862,57 @@ s3tores.
.pos3tu3lá
.pos3tu3le
.pos3tu3lé
-.post3elec
-.post3impr
-.post3ind
-.post3ope
+.pos2t3elec
+.pos2t3impr
+.pos2t3ope
.pos2t3rev
.pos2t3rom
-.pre2a2
-.pre2e2
-.pre2i2
-.pre2o2
-.pre2u2
-.pre2á2
-.pre2é2
-.pre2í2
-.pre2ó2
-.pre2ú2
-.pre1h2
-pre3elij
-pre3elig
-pre3exis
-pre3emin
-preo3cup
-preo2cúp
-pre3olí
-pre3opin
+.pos3taci
+.pos3tar
+.pos3tear
+.pos3te3me
+.pos3ta3je
+.pos3te3ler
+.pos3te3ma
+.pos3te3mi
+.pos3te3río
+.pos3te3ta
+.pos3ti3le
+.pos3ti3llo
+.pos3ti3lo
+.pos3ti3lá
+.pos3ti3lé
+.pos3ti3ló
+.posti3nudo
+.posto3res
+.pos3tu3lo
+.pos3tu3ló
+.pos3tón
+.pos3te3mas
+.pos3ti3cer
+.pos3tism
+.pos3tu3reo
+.pos3te3lera
+.pos3teo
+.pos3ti3ll
+.pos3tista
+.pre1h
+.pre1a2
+.pre1e2
+.pre1i2
+.pre1o2
+.pre1u2
+.pre1á2
+.pre1é2
+.pre1í2
+.pre1ó2
+.pre1ú2
+.pre4ámbul
+.pre4o3cup
+.pre4o3cúp
+.pre4ordin
+.pre4ordín
+.pro1h
.pro2a2
.pro2e2
.pro2i2
@@ -3125,6 +3924,15 @@ pre3opin
.pro2ó2
.pro2ú2
.pro3abort
+.pro3etarr
+.pro4hiba
+.pro4híba
+.pro4hibá
+.pro4hibe
+.pro4híb
+.pro4híbo
+.pro4hibi
+.pro4hibí
proto1h
proto1a2
proto1e2
@@ -3149,6 +3957,17 @@ psico1ó2
psico1ú2
3p2sic
3p2siq
+ptero1h
+ptero1a2
+ptero1e2
+ptero1i2
+ptero1o2
+ptero1u2
+ptero1á2
+ptero1é2
+ptero1í2
+ptero1ó2
+ptero1ú2
quete1h
quete1a2
quete1e2
@@ -3160,6 +3979,28 @@ quete1é2
quete1í2
quete1ó2
quete1ú2
+quimio1h
+quimio1a2
+quimio1e2
+quimio1i2
+quimio1o2
+quimio1u2
+quimio1á2
+quimio1é2
+quimio1í2
+quimio1ó2
+quimio1ú2
+quiro1h
+quiro1a2
+quiro1e2
+quiro1i2
+quiro1o2
+quiro1u2
+quiro1á2
+quiro1é2
+quiro1í2
+quiro1ó2
+quiro1ú2
radio1h
radio1a2
radio1e2
@@ -3198,25 +4039,70 @@ ea3cia.
ea3cias.
.re3abr
.re3ábr
+.re3abiert
+.re3absor
+.re3absór
+.re3admis
+.re3admit
+.re3admít
.re3afirm
.re3afírm
+.re3agrav
+.re3agráv
+.re3acondic
+.re3acuñ
+.re3acúñ
.re3ajust
.rea3júst
+.re3alegr
+.re3alégr
.rea3liza
.rea3lizá
.rea3líza
.re3alim
.rea3lism
.rea3list
+.re3aloj
+.re3alój
+.re3alq
.re3anim
.re3aním
+.re3ama
+.re3áma
+.re3amá
+.re3ame
+.re3áme
+.re3amé
+.re3amo
+.re3ámo
+.re3amó
.re3aparec
+.re3aprend
+.re3aprénd
+.re3apret
+.reapríet
+.rei3no
.re3ubica
.re3ubíca
+.re3ubicá
+.re3ubico
+.re3ubicó
+.re3ubiq
+.re3ubíq
.reu3mati
.reu3máti
-.re3unir
-.re3unír
+.reu3nir
+.reu3nír
+.reu3nia
+.reu3ní
+.reu3nis
+.reunim
+.reu3ná
+.reu3nie
+.reu3nié
+.reu3nid
+.reu3nió
+.re3unif
.re3usar
.re3usár
.re3utiliz
@@ -3224,17 +4110,37 @@ ea3cias.
.re3a2eg
.re3a2q
.re3a2z
+.re3asum
+.re3asúm
.re3a2grup
.re3i2m
.re3inc
+.re3inic
+.re3inf
.re3ing
+.re3inv
+.rei3na
.re3ins
.re3int
.re3o2b
+.re3orient
+.rei3vind
.re3oc
-.re3oj
+.re4o3j
.re3orga
.re3unt
+.reu3ma
+rete1h
+rete1a2
+rete1e2
+rete1i2
+rete1o2
+rete1u2
+rete1á2
+rete1é2
+rete1í2
+rete1ó2
+rete1ú2
rmano1h
rmano1a2
rmano1e2
@@ -3268,6 +4174,28 @@ romo1é2
romo1í2
romo1ó2
romo1ú2
+salva1h
+salva1a2
+salva1e2
+salva1i2
+salva1o2
+salva1u2
+salva1á2
+salva1é2
+salva1í2
+salva1ó2
+salva1ú2
+seleno1h
+seleno1a2
+seleno1e2
+seleno1i2
+seleno1o2
+seleno1u2
+seleno1á2
+seleno1é2
+seleno1í2
+seleno1ó2
+seleno1ú2
semi1h
semi1a2
semi1e2
@@ -3283,6 +4211,17 @@ i2a.
i2as.
2ótic
emi2o2
+servo1h
+servo1a2
+servo1e2
+servo1i2
+servo1o2
+servo1u2
+servo1á2
+servo1é2
+servo1í2
+servo1ó2
+servo1ú2
2seudo1h
2seudo1a2
2seudo1e2
@@ -3307,6 +4246,8 @@ sobre1é2
sobre1í2
sobre1ó2
sobre1ú2
+sobre3a4sa
+sobre3a4sas
socio1h
socio1a2
socio1e2
@@ -3318,8 +4259,10 @@ socio1é2
socio1í2
socio1ó2
socio1ú2
-a3rio.
-a3rios.
+4a3rio.
+4a3rios.
+4a3ria.
+4a3rias.
3logía
4ón.
4ones.
@@ -3328,6 +4271,7 @@ a3rios.
4o2icos.
4o2ica.
4o2icas.
+.su2b1h
.su2b2a2
.su2b2e2
.su2b2i2
@@ -3338,38 +4282,58 @@ a3rios.
.su2b2í2
.su2b2ó2
.su2b2ú2
-.sub2i3ll
-.sub2i3mien
+.sub3acuát
+.subi3ll
+.su3bi3da
+.su3bi3dor
+.su3bi3do
+.su3bi3dón
+.su3basta
+.su3básta
+.su3bastá
+.su3baste
+.su3básté
+.su3basto
+.su3bástó
.sub3índ
.sub3ími
.su4b3ray
+.sub3acepc
+.sub3acet
.sub3aflue
+.sub3alcai
.sub3arr
+.sub3ártic
+.sub3atómic
+.sub3ejecut
+.sub3elemen
+.sub3emple
.sub3enten
+.seb3entrad
+.sub3espec
+.sub3estac
.sub3estim
.sub3estím
+.sub3estruc
+.sub3occipit
.sub3ofici
+.su3bordin
+.su3bordín
.sub3urba
-.sub3alter
+.sub3aliment
+.su3balter
.sub3insp
-.su3bién
+.sub3intenden
.su3bir
-.su3bam
-.su3bordin
-.su3bordín
-.sub3acuá
-.sub3espe
-.sub3esta
-.su3burbi
-.su4b5rein
-.su2d1a2fr
-.su2d1a2me
-.su2d1este
-su4d3oes
-.su2r1a2me
+.su3bír
+.su3bién
+.su3bi3mien
+.su3bier
+.su3bies
.su2r1est
.su2r1oes
supe2r3r
+supe2r1h
supe2r1a2
supe2r1e2
supe2r1i2
@@ -3441,9 +4405,31 @@ tele1ó2
tele1ú2
4ósteo.
4ósteos.
+tecno1h
+tecno1a2
+tecno1e2
+tecno1i2
+tecno1o2
+tecno1u2
+tecno1á2
+tecno1é2
+tecno1í2
+tecno1ó2
+tecno1ú2
.tele1imp
.tele1obj
.tele4o3lót
+tera1h
+tera1a2
+tera1e2
+tera1i2
+tera1o2
+tera1u2
+tera1á2
+tera1é2
+tera1í2
+tera1ó2
+tera1ú2
termo1h
termo1a2
termo1e2
@@ -3477,6 +4463,7 @@ topo1é2
topo1í2
topo1ó2
topo1ú2
+.tra2s1h
.tra2sa2
.tra2se2
.tra2si2
@@ -3487,7 +4474,33 @@ topo1ú2
.tra2sí2
.tra2só2
.tra2sú2
-.tra3s2o3ñ
+tras1abuel
+tras1alcob
+tras1alp
+tras1altar
+tras1andin
+tras1atlánt
+tras1oceán
+tra3se3ro.
+tra3se3ros.
+tra3se3ra.
+tra3se3ras.
+.tra3su3da
+.tra3su3dá
+.tra3su3de
+.tra3su3dé
+.tra3su3do
+.tra3su3dó
+.tra3sunta
+.tra3suntá
+.tra3sunte
+.tra3sunté
+.tra3sunto
+.tra3suntó
+.tra3so3ñ
+.tra3se3g
+.tra3sieg
+tran2s1h
tran2sa2
tran2se2
tran2si2
@@ -3498,22 +4511,29 @@ tran2sé2
tran2sí2
tran2só2
tran2sú2
-tran2s1alp
+trans3aminas
tran2s1and
tran2s1atl
tran2s1oce
tran2s1ur
tran3sacci
+tran3sactiv
tran3seún
tran3se3xu
+tran3si3berian
tran3si3cion
tran3si3ción
+tran3sido.
+tran3sidos.
+tran3sida.
+tran3sidas.
tran3si3gi
tran3si3gí
tran3si3ge
tran3si3ja
tran3si3já
tran3si3jo
+tran3silvan
tran3sisto
tran3si3ta
tran3si3tá
@@ -3523,6 +4543,7 @@ tran3si3to
tran3si3tó
tran3si3tiv
tran3si3tori
+trans3oraci
tran3subst
tran3sust
.tri1ó2x
@@ -3537,6 +4558,17 @@ tropo1é2
tropo1í2
tropo1ó2
tropo1ú2
+turbo1h
+turbo1a2
+turbo1e2
+turbo1i2
+turbo1o2
+turbo1u2
+turbo1á2
+turbo1é2
+turbo1í2
+turbo1ó2
+turbo1ú2
ultra1h
ultra1a2
ultra1e2
@@ -3581,6 +4613,28 @@ xeno1é2
xeno1í2
xeno1ó2
xeno1ú2
+xero1h
+xero1a2
+xero1e2
+xero1i2
+xero1o2
+xero1u2
+xero1á2
+xero1é2
+xero1í2
+xero1ó2
+xero1ú2
+xilo1h
+xilo1a2
+xilo1e2
+xilo1i2
+xilo1o2
+xilo1u2
+xilo1á2
+xilo1é2
+xilo1í2
+xilo1ó2
+xilo1ú2
zoo1h
zoo1a2
zoo1e2
@@ -3593,6 +4647,55 @@ zoo1í2
zoo1ó2
zoo1ú2
wa3s4h
+3grafo.
+3grafa.
+3grafos.
+3grafas.
+3grafía.
+3grafías.
+o4i3dea.
+o4i3deas.
+o4i3dal.
+o4i3dales.
+4o2i3de.
+4o2i3des.
+4i2dal.
+4i2dales.
+4i3deo.
+4i3deos.
+i2o.
+i2os.
+2i3co.
+2i3cos.
+2i3ca.
+2i3cas.
+4e3dro.
+4e3dros.
+4é3drico.
+4é3dricos.
+4é3drica.
+4é3dricas.
+4í3ble.
+4í3bles.
3hablante
3habiente
-3aficionad} \ No newline at end of file
+5humano
+5humana
+3a4ficionad
+3a4merican
+su2d3a4merican
+su2r3a4merican
+3e4lectr
+3e4léctr
+di4e5lec
+di4e5léc
+5i4ndustr
+5islámi
+5islami
+5ingenier
+5técnic
+5biología
+5céntrico
+5e4cuatorial
+7u4niversid
+5u4niversit} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/patterns/mkiv/lang-ala.lua b/Master/texmf-dist/tex/context/patterns/mkiv/lang-ala.lua
index 360b311b0a8..3f502d08e7d 100644
--- a/Master/texmf-dist/tex/context/patterns/mkiv/lang-ala.lua
+++ b/Master/texmf-dist/tex/context/patterns/mkiv/lang-ala.lua
@@ -9,11 +9,11 @@ return {
["texcomment"]="% no comment",
},
["patterns"]={
- ["characters"]="abcdefghiklmnopqrstuxyz",
- ["data"]=".a2b3l .anti1 .anti3m2n .ari3s2to .circu2m1 .co2n1iun .e2x3 .exs2t .para1i .para1u .peri1 .quin2c3un .su2b3lu .su2b3r .s2 2s3que. 2s3dem. .sta3g2n 3p2sic 3p2neu 3ne. 2sne. a1ua a1ue a1ui a1uo a1uu e1ua e1ue e1ui e1u2o e1uu i1ua i1ue i1ui i1uo i1uu o1ua o1ue o1ui o1uo o1uu u1ua u1ue u1ui u1iu u2iua u2iue u2iui u2iuo u1uo u3u2u a2l3ua a2l3ue a2l3ui a2l3uo a2l3uu e2l3ue i2l3ua i2l3ue i2l3ui i2l3uo i2l3uu o2l3ua o2l3ue o2l3ui o2l3uo o2l3uu u2l3ua u2l3uo u2l3uu a1a e1e e1a e1o i3i o1o ui1a a1is cu3 a1ia a1ie a1io a1iu ae1a ae1o ae1u e1ia e1ie e1i2u io1i o1ia o1ie o1io o1iu 2am. 2at. 2as. 2ans. 2ax. 4ant. 2es. 2et. 2em. 2ex. e5us. 2is. 2im. 2it. 2ix. 2yx. 2ys. 2ox. 2ui. 2ux. i3um. i3ur. i3unt. i3ui. tru5us. tru1um. .i2a .i2e .i2i .i2o .i2u .iuu2a .iuu2e .iuu2o .iei2u .iai2u .iuu2i i2oi2u i3u2ia i3ui3ua i3ui3ue i3ui3ui i3ui3uo i3ui3uu e1ui1ue e1ui1ui e1ui1uo i2y uo3u .ua3ua .uo3ue .ue1io .u2a .u2e .u2i .u2o .u2u 1b 2bb 2bd 2bh b2l 2bm 2bn 2bp b2r 2bt 2bs b3s2t 2b. .b2 1c 2cc c2h2 c2l 2cm 2cn 2cq c2r 2cs 2ct 2cz 2c. .c2 1d 2dd 2dg 2df 2dm d2r 2ds 2d. .g2 1f 2ff f2l 2fn f2r 2ft 2f. .f2 1g 2gg 2gd 2gf g2l 2gm 2gn g2r 2gs 2g. 1h 2hp 2ht 2h. .hu1i2u .h2 1k 1l 2lb 2lc 2ld 2lf l3f2t 2lg 2lk 2ll 2lm 2ln 2lp 2lq 2lr 2ls 2lt 2l. .l2 1m 2mm 2mb 2md 2ml 2mn 2mp 2mq 2mr 2ms 2mt 2m. .m2 1n 2nb 2nc 2nd 2nf 2ng 2nl 2nm 2nn 2np 2nq 2nr 2ns 2nh n2s3m n2s3f 2nt 2nx2 2n. .n2 1p p2h2 p2l 2pn 2pp p2r 2ps 2pt 3p2tr 2pz 2php 2pht 2p. .p2 1qu2 1r 2rb 2rc 2rd 2rf 2rg r2h 2rl 2rm 2rn 2rp 2rq 2r3r 2rs 2rt 2rz 2r. 2r1x .r2 1s 2s3s 2sb 2sc 2sd 2sf 2sg s2l 2sm 2sn s2r 2sp 2sq 2st 3s2th 3s2ph 3s2ch 2s2t3l 2s3tn 2st3p 2s2t3q 2s2t3s 2s2t3t 2s. 2st. .s2m 1t 2tb 2tc 2td 2tf 2tg t2h2 t2l t2r 2tm 2tn 2tp 2tq 2tt 2t. .t2 x1 2x. .x2 1x2a 1x2e 1x2i 1x2it. 1x2o 1x2y xy3s2t 1xu2a 1xu2e 1xu2i 1xu2o 1xu2u 1x2u. 1x2um. 1x2us. y3c2n 1z 2z. .z2 a2m3ui a2n1u2a a2n1u2e a2n1u2i a2n1u2o a2n1u2u e2n1u2a e2n1u2e e2n1u2i e2n1u2o e2n1u2u ge3n2ua i2n1u2a i2n1u2e i2n1u2i i2n1u2o i2n1u2u ti3n2ui o2n1u2a o2n1u2e o2n1u2i o2n1u2o o2n1u2u u2n1u2a u2n1u2e u2n1u2i u2n1u2o u2n1u2u a2r1u2a a2r1u2e a2r1u2i a2r1u2o a2r1u2u e2r1u2a e2r1u2e e2r1u2i e2r1u2o e2r1u2u i2r1u2a i2r1u2e i2r1u2i i2r1u2o i2r1u2u o2r1u2a o2r1u2e o2r1u2i o2r1u2o o2r1u2u u2r1u2a u2r1u2e u2r1u2i u2r1u2o u2r1u2u .a2b1auu .a2b1ali .a2b1ic .a2b1iec .a2b1in1 .a2b1iu .a2b1ol .ab2s .ab3si2 .ab3so .ab3s2te .ab3su2 .a2b1es2 .a2b1er2 .a2bfu .a2b3ru .ab5s2cin .a2d1 .adsu2 .a2d1es2 .ad3si2 .a2d1er2 .a2dfu .ad3s2t .a3g2nas .a3s2c .a3s2p .a3s2t .ape3r2u .ci2s3 .co1e .co1i .co1i2e .coi3u .co2e1n .co3e2lec .co3e2lig .co3emen .co3e2r .co3e2x3 .coex3s2 .co3g2no .co2n1 .con3ic .co3n2if .co3n2ig .co3n2it .co3n2i3ue .coni2a .coni2e .coni2i .coni2u .con3s2cr .con3s2p2 .con3s2t .de3s2c .de3s2p .de3s2q .de3s2t .di3g2nosc .di2s1i2 .di3s2ce .di4s3cep3t .di3s2p .di3s2qua .di3s2cr .di3s2t .di4s3ten1d .di4s3ti4nc .i2dci .i3di2og .i2n1 .in3s2p .in3s2t .i3n2an .ina2b3r .inab3s2 .i3n2it .ina2cr .ina2df .i3n2ers .i3n2ert .ine2x3 .inexs2t .ino2b .inob3s2c .ino3b2oe .inpe2r3iur .i3n2ul .i4n3ulc .inu2a .inu2e .inu2i .inu2o .inu2u .iu2s3i2ur .o2b1 .o3b2ed .o3b2el .o3b2es .o3b2ic .obi2a .obi2e .ob3i2u .ob3s2cu .ob3l .ob3r .o3b4ruz .ob3s2c .ob3s2t .ob3tr .obu2a .obu2e .obu2i .obu2o .pe2r1absu .pe2r1ac .pe2r1a2d1u .pe2r1a2dp .pe2r1ae .pe2r3ag .pe2r3err .pe2r3or .pe2r3u .pe2r1ar .pe2r1a2u .pe2r1ed .pe2r1eff .pe2r1egr .pe2r1el .pe2r1em .pe3r2enn .pe2r1eru .pe2r1e2x3 .pe2r3h .pe2r1i2ac .pe2r1i2ec .peri3p2s .peri3p2t .peri3s2c .peri3s2t .pe2r1o2b3s2c .pe2r1od .pe2r1of .pe2r1ol .pe2r1op .perse2u .perse2i .perse2o .pe2r3s2c .pe2r3s2p .pe2r3s2t .pe2r3tran2s1 .pe2r1u2a .pe2r1u2e .pe2r1u2i .pe2r1u2o .prae1 .praea2u .prae3s2c .prae3s2p .prae3s2t .praeu2a .praeu2e .praeu2i .praeu2o .praete2r1 .praeteru2e .praeteru2o .primi1 .primi3s2c .pro2d1es3s .pro2d1ig .pro1de1amb .pro2d1eo .pro2d3is .pro2d1it .pro2d1im .pro2d1eun .pro2d1ir .pro2d1ib .pro2d1ier .pro2d1ea .pro3d2ito .pro3d2iti .pro3d2itr .pro3g2n .pro3in .pro3s2c .pro3s2p .pro3s2t .quo2t1an .quo2t1en .quo2t1i2e .quo2t3li .re2d1ac .re2d1ad .re2d1am .re2d1an .re2d1ar .re2d1a2u .re2d1em .re2d1eo .re2d5is .re2d5it .re4d3imi .re2d1eu .re2d1ier .re2d1ib .re2d1ien .re3d2ic .re3d2ig .re3d2im .re2d1in .re2d1ol .re2d1op .re3d2orm .re2d1orn .re2d1ul .re2d1ord .re2d1arg .re2d1amb .ree2x .re1ie .re1in .repa2u .re3s2cr .re3s2p .re3s2tag .re3s2ta2u .re3s2tib .re3s2tic .re3s2til .re3s2tip .re3s2tr .sati2s1 .sa2t1ag .ses2c1u4n .si2c1u4t2 .si3s2ten .su2b1ic .su2b1ingr .su2b1odo .su2b3s2t .supe2r1ab .supe2r1ad .supe2r1ad3s2t .supe2r1ae .supe2r1ag .supe2r1am .supe2r1arg .supe2r1a3s2p .supe2r1a3s2t .supe2r1att .supe2r1bib .supe2r1bif .supe2r1bil .supe2r1c .supe2r1d .supe2r1ed .supe2r1eff .supe2r1eg .supe2r1em .supe2r1en .supe2r1er .supe2r1eu .supe2r1e2x3 .supe2r3h .supe2r3i2 .supe2r1il .supe2r1im .supe2r1in .supe2r1ir .supe4r5i4ume .supe3r4i3o .supe3r4i3u .supe2r1o2b1d .supe2r1o2b3r .supe2r1oc .supe2r1or .supe2r3s2c .supe2r3s2p .supe2r3s2t .supe2r1sub3s2t .supe2r3u2 3r4us. .supra3s2c .su3s2c .su3s2p .suss2cr .tetra3e2t .tetra3g2n .tetra3s2t .te2r1i2u .te2r1un .terp2s .the2o .theo3g2n .the3s2p .the3s2t .thi3s2b .tra1i2a .tra1i2e .tra1ii .tran2s .transa2 .trans1a2b1i .trans1a2b1e2 .trans1act .trans1a2d1 .trans3i .trans1a2u .tran3s2c .tran3s2en .trans1e .transe2u .trans1o2 .trans1u2 .tran3s2um .tra2n1ue .tri3en .u2n1i2us .ute2r3ui .za2i3eu .zeu3g2m",
+ ["characters"]="abcdefghijlmnopqrstuvxyzáæéíóúýÄăēĕīĭÅÅœūŭǣǽȳÌ̄̆͞͡",
+ ["data"]=".ab1 .aba2 .ab3a4u .aba4v .ab3áu .ab3áv .abe4 .ab3es .abé2 .ab3és .abi2 .ab3i4n .ab3is .ab3it .abi4u .abi4v .abÄ«2 .abÄ«4n .abÄ«Ì4 .abí2 .ab3í4n .ab3ís .abí4t .abo2 .abó2 .ab5us .ab3ú .ad3Ä .ad3á .adÇ£Ì4 .adǽ2 .ade4 .ad3es .ad3Ä“2 .adÄ“Ì4 .adé2 .ad3ér .ad3és .ad3ib .ad3i4c .ad3ie .ad3ié .adi4m .ad5i4n .ad3i4q .ad3is .ad5i4t .adi4u .ad3i4v .ad3Ä«4 .adÄ«Ì4 .adí4c .adí4m .ad3í4n .ad3í4q .ad3ís .adí4t .ad3í4u .ad3í4v .ad6ora. .ad6orane .ad6oraq .ad6oraue. .ad6orave. .ad5ÅÌro .ad5ÅÌ6rÅ .ad6ó6ra. .adó4ro .adú2 .ae2a .ae2ă3 .ae4st .ae5te .ag2n .aÄ«3b .aÄ«Ì3b .aí2 .aí3b .am4b3Ä“ .am4bi. .am4b5i4n .am4b5i4q .am6b5is. .am6b5isn .am6b5isq .am6b5isu .am6b5isv .ambi6ue .amb6iui. .amb6iuin .amb6iuiq .amb6iuiu .amb6iuín .amb6iuíq .amb6iuíu .ambi6ve .amb6ivi. .amb6ivin .amb6iviq .amb6iviv .amb6ivín .amb6ivíq .amb6ivív .ambÄ«4n .ambÄ«Ì6n .am4b5í4n .am4bí4q .am4b5ís .am6bí6ue .am6bí6ve .am4b3ú .an6t5ea. .ante5i4 .ante5í4 .as4ce .as4cé .as4ta .as4tá .as4te .as4té .as4to .as4tÅ .as4tó .as6trar .as6trat .as4trÄ .as6trár .as6trás .as4tru .as4trÅ« .ate2 .atÄ“2 .aÍže4ă .aÍže4s5t .aÍ¡e4ă .aÍ¡e4s5t .aÍ¡Ìe4s5 .Äg2 .ÄÌ2 .ÄÌg2 .ÄÌ4l .ÄÌ4t .ăbă2 .ăbă4u .ăbă4v .ăbÄ•4 .ăbÄ•Ì4 .ăbÄ«2 .ăbÄ«4q .ăbÄ«Ì4 .ăbÄ­2 .ăb3Ä­t .ăbÄ­Ì4 .ăbÅÌ4 .ăd3Ä .ăd3á .ădæ4 .ădÇ£4 .ădÇ£Ì4 .ădǽ4 .ăd3Ä“2 .ădÄ“Ì4 .ădÄ•4 .ădÄ•Ì4 .ăd3Ä«4 .ădÄ«Ì4 .ăd3Ä­Ä“ .ăd3Ä­Ä• .ăd3Ä­Ä« .ădÄ­4m .ăd3Ä­4t .ădÄ­Ì4t .ăd5ÅÌ6rÅ .ăd5ÅÌrÅ .ăd3Å­Ì .ăī3b .ăīÌ3b .ăm4b3Ä“ .ămbÄ«4q .ămbÄ«Ì6q .ăm4b5Å­Ì .ăs4pÄ­ .ăs4tă .ăs4tÄ­ .ăs4tÅ .ăs4trÄ .ăs4trÅ« .ăÌ2 .ăÌb5ă4u .ăÌb5ă4v .ăÌb3Ä•4 .ăÌbÄ­4 .ăÌb5Ä­t .ăÌb3Å .ăÌ4c .ăÌd3Ä“ .ăÌd3Ä•4 .ăÌd3Ä« .ăÌd5Ä­Ä“ .ăÌd5Ä­Ä« .ăÌd5Ä­4t .ăÌ4g .ăÌ4Ä­ .ăÌ4l .ăÌ4r .ăÌ4s .ăÌs4tÄ .ăÌs4tă .ăÌs4tÄ• .ăÌs4tÅ .ăÌ4t .áb1 .ába2 .áb3a4u .áb3a4v .áb3e4 .ábi2 .áb3is .áb3it .áb3o .ád1 .áde2 .ád3es .ád3Ä“ .ádi2 .ád3ie .ád3is .ád3it .ád3Ä« .áes3 .áes5t .ág4nit .ám4bi. .ám4b5is .án4ter .ás4ta .ás4tÄ .ás4te .ás4to .ás4tÅ .ás4tru .æs3t .Ç£s3t .Ç£Ì2 .Ç£Ì4q .Ç£Ìs3 .ǽs3 .ba3g .ba6iane. .ba6iáne. .ba4ii .ba4iÄ« .bÄÌ3 .bá4iÄ« .bi3 .bÄ­1 .bÄ­3Ä• .ca2i .cá2i .cen3s .cÄ“n3s .ci6sta .ci6sté .co3i4 .co3í4 .com5Ä“s .com5Ä“Ìs .co4més .co4n5i4c .co4ní4c .cÅ3Ä­ .cÅm5Ä“s .cÅm5Ä“Ìs .cÅm3Ä• .cÅ4n5Ä­4c .cÅ6n5Ä­Ì6c .cÅÌ3Ä­ .cÅÌ4m3 .cÅÌmÄ­4 .cÅÌ6n5Ä­6c .có3i .có4mit .cómi6te .có4n5i4c .de3d .de4met .des2 .de5u4ta .de5u4tá .de5utí .dÄ“s2 .dÄ“3sc .dÄ“3sú .dÄ“Ì3i .dÄ“Ì5sum .dÄ•1 .dÄ•3d .dÄ•3Å .dé3s2 .di3gé .di4r5e4m .di4r5é4m .dis6cendam .dis6cendas .dis6cendám .dis6cendás .dis6cendi .dis6cendí .dis6cendo. .dis6cendon .dis6cendoq .dis6cendou .dis6cendov .dis6cendón .dis6cendóq .dis6cendóu .dis6cendóv .dis6céndam .dis6céndas .dis6cénde .dis6céndi .dis6céndo. .di5s6tau .di5s6tav .dis4tá .di5s4tÄ« .dÄ«1 .dÄ«s4t .dÄ­5s4tă .dÄ­5s4tÄ« .do3l .dó3l .ed2 .ed4i .ed4o .ed4u .ei2 .er2e .ere5x4 .et3i .ex3Ä .ex3á .ex3éq .ex3i4 .ex3Ä«4 .exÄ«Ì4 .ex3í4 .ex5ÅÌr .ex3ón .ex3u4 .exÅ«2 .exÅ«Ì4 .exú2 .Ä“s3tÄ­ .Ä“Ì2 .Ä•d2 .Ä•d4Ä­ .Ä•t3Ä­ .Ä•x3Ä .Ä•x3Ä«4 .Ä•xÄ«Ì4 .Ä•x3Ä­2 .Ä•xÄ­Ì4 .Ä•x5ÅÌr .Ä•xÅ«2 .Ä•xÅ«Ì4 .Ä•x3Å­ .Ä•Ì2 .Ä•Ì4c .Ä•Ì4q .Ä•Ì4t .Ä•Ìt3Ä­ .Ä•Ìx3Ä« .Ä•Ìx3Ä­4 .Ä•Ìx3Å­ .ét3e2 .ét3i .éx3eq .éx3i2 .éx3u .gé1 .hemi3 .hÄ“Ì3 .hi6ste .hi6str .hÄ­6stÄ• .ho4s .ibe3 .id3eo .id3eÅ .id3í .id3ue .ie3su .ié3su .ig2 .ig3ne .ig3ni .ig3nÄ« .ig3ní .in1 .in3a4 .in3Ä4 .inÄÌ4 .iná4 .in3e4 .inÄ“2 .inÄ“Ì4 .in3é2 .in3i4 .inÄ«4 .inÄ«Ì4 .in3í4 .in3o4 .inó4 .in3t .inte6re6ri .inte6re6rí .inte6res .inte6rés .inte6ri. .inte6riq .inte6ris .inte6rí6n .inte6rí6q .inte6rís .inte6rí6t .inté6re6ri .inté6ri6te .inté6ri6ti .inté6ri6to. .inté6ri6tÅ .inu4d .in3ue .in3ui .in3uÄ« .in3uí .in3us .inÅ«Ì4 .inú4d .io3s4 .io5su .ió3s2 .is5ta .is5tÄ .is5te .is5ti .is5tí .is3tr .Ä«Ì2 .Ä«Ì4b .Ä«Ì4m .Ä«Ì4n .Ä«Ì4q .Ä«Ì4t .Ä­d3Ä•Å .Ä­g2 .Ä­g3nÄ• .Ä­g3nÄ« .Ä­n1 .Ä­n3Ä4 .Ä­nÄÌ4 .Ä­nÄ“Ì4 .Ä­nÄ•4 .Ä­nÄ•Ì4 .Ä­nÄ«4 .Ä­nÄ«Ì4 .Ä­n3Ä­2 .Ä­nÄ­Ì4 .Ä­ntÄ•6rÄ­t. .Ä­ntÄ•6rÄ­6tÄ• .Ä­ntÄ•6rÄ­tn .Ä­ntÄ•6rÄ­6tÅ. .Ä­ntÄ•6rÄ­6tÅn .Ä­ntÄ•6rÄ­6tÅq .Ä­ntÄ•6rÄ­6tÅu .Ä­ntÄ•6rÄ­6tÅv .Ä­ntÄ•6rÄ­6tÅÌn .Ä­ntÄ•6rÄ­6tÅÌq .Ä­ntÄ•6rÄ­6tÅÌu .Ä­ntÄ•6rÄ­6tÅÌv .Ä­ntÄ•6rÄ­tq .Ä­ntÄ•6rÄ­tu .Ä­ntÄ•6rÄ­tv .Ä­ntÄ•6rÄ­Ì6t .Ä­ntÄ•Ì6rÄ•6rÄ­ .Ä­ntÄ•Ì6rÄ­6tÄ• .Ä­ntÄ•Ì6rÄ­6tÅ .Ä­nÅ«Ì4 .Ä­n3Å­s .Ä­s5tÄ .Ä­s5tă .Ä­s5tÄ• .Ä­s5tÄ­ .Ä­Ì2 .Ä­Ìd5Ä•Å .Ä­Ì4n .Ä­Ìn3Ä•4 .Ä­Ìn3Ä­4 .Ä­Ìn5Å­Ä• .Ä­Ìn5Å­Ä« .Ä­Ìn5Å­Å .íd3eo .íd3eÅ .íd3ue .ín1 .ín3e2 .ín3i2 .ín3t .ín3ui .jo3s4 .jo5su .jó3s2 .li4g5n .líg3n .lí3t .ma3ge .magnæ6u .magnæ6v .magnÇ£6u .magnÇ£6v .magnÇ£Ì6u .magnÇ£Ì6v .magnǽ6u .magnǽ6v .mă3gÄ• .măgnæ6u .măgnæ6v .măgnÇ£6u .măgnÇ£6v .măgnÇ£Ì6u .măgnÇ£Ì6v .măgnǽ6u .măgnǽ6v .mÄ•3Ä­ .mi6sta .ne3q .ne3s .ne5s4c .ne5ute .ne5uté .ne5u4ti .ne3xo .ne3xÅ .nÄ“Ì3 .nÄ•3xÅ .né3s2 .né5ute .no6ste .nÅ6stÄ• .nu3d .nÅ«3d .ob3a2 .obe4r .ob3es .ob3é2 .obi2 .ob3iÄ« .ob3i4n .ob3iq .ob3is .obi4u .obi4v .ob3Ä«4 .obÄ«Ì4 .obí4 .ob3ín .ob3íq .ob3ís .obo2 .ob3Å .obó4r .ob3u .oc4té .os3t .ÅÌ2 .ÅÌ4l .ÅÌ4s .Åb3Ä«4 .ÅbÄ«Ì4 .Åb3Ä­Ä« .Åb3Å .Åc4t3Ä• .ÅÌ2 .ÅÌb3Ä• .ÅÌb3Ä­ .ÅÌ4l .ÅÌ4p .ób3i .Å“Ì2 .pa4r5ui .pa4r5uí .pÄ2r3 .pá4rui .pera4 .pe4r5an .per5ar .peras5 .pe4rÄ .per5Är .pe6ráeq .peræ4q .perÇ£Ì4 .per5Ç£Ìq .pe4rǽ4q .pere4 .per5em .pe4r5es .pe4r5Ä“4 .perÄ“Ì4 .peré4 .pe4r5ém .pe4r5és .pe4ri. .pe6riens .per6iere. .per6ierene .per6iereq .per6iereu .per6ierev .per6ieris .per6ierís .per6iÄ“n .per6iÄ“re .per6iÄ“Ìn .per6iÄ“Ìre .per6iére .pe5rille .pe5r6illi .pe5rillí .pe5rimin .per6imini .per6iminí .per5imu .pe5r6imur .peri6mus .pe5rimúr .per5i6mús .peri4n .per5ine .pe4r5i4q .per6i6re. .peri6rem. .pe5r6iremi .peri6remn .peri6remq .peri6remue .pe5r6iremur .peri6remus .pe5r6iremúr .peri6remús .peri6remv .per6i6rene .peri6rent. .peri6rentn .peri6rentq .peri6rentue .pe5r6irentur .pe5r6irentú .peri6rentv .per6i6req .pe5r6irer .peri6res .peri6ret .per6iretur .per6iretú .per6i6reu .per6i6rev .pe5r6irémi .peri6rémn .peri6rémq .peri6rémue .pe5r6irémur .peri6rémus .peri6rémv .peri6réntn .peri6réntq .peri6réntue .pe5r6iréntur .peri6réntv .pe5r6irér .peri6rés .peri6rét .per6irétur .pe5r6iri .pe5r6irí .pe6ris. .pe6risn .pe6risq .pe6r5isse. .pe6r5issem .pe6r5issen .pe6r5isseq .pe6r5isses .pe6r5isset .pe6r5isseue .pe6r5issev .pe6r5issém .pe6r5issén .pe6r5issés .pe6r5issét .pe6r5isti .pe6r5istí .pe6risu .pe6risv .per5it. .peri6ta .peri6tÄ .peri6tá .per6i6tæ .per6i6tǽ .per6i6te .peri6ti. .peri6tin .peri6tiq .peri6tis. .peri6tisn .peri6tisq .peri6tisu .peri6tisv .peri6tiue .peri6tiv .peri6tín .peri6tíq .peri6tísn .peri6tísq .peri6tísu .peri6tísv .peri6tíu .peri6tív .per5itn .per6i6to. .per6i6ton .per6i6toq .per6itor .pe5ritor. .pe5ritorn .pe5ritorq .pe5ritorue .peri6torum .peri6torú .pe5ritorv .per6i6tos .peri6tot .per6i6tou .per6i6tov .per6i6tón .per6i6tóq .per6itór .pe5ritórn .pe5ritórq .pe5ritórue .peri6tórum .pe5ritórv .per6i6tós .peri6tót .per6i6tóu .per6i6tóv .per5itq .per6i6tu .per7itue .peri6tÅ« .per6i6tú .per5itv .peri4u .per7iue .per5i4v .pe4rÄ«. .pe6r5Ä«6mus .pe6r5Ä«6mús .per5Ä«4n .pe4r5Ä«4q .pe6r6Ä«6re. .pe6rÄ«6rem .pe6r6Ä«6rene .pe6rÄ«6rent. .pe6rÄ«6rentn .pe6rÄ«6rentq .pe6rÄ«6rentue .per6Ä«rentur .per6Ä«rentú .pe6rÄ«6rentv .pe6r6Ä«6req .per6Ä«rer .pe6rÄ«6ret .pe6r6Ä«6reu .pe6r6Ä«6rev .per6Ä«rÄ“mi .per6Ä«rÄ“mur .pe6rÄ«6rÄ“mus .per6Ä«rÄ“múr .pe6rÄ«6rÄ“mús .per6Ä«rÄ“r .pe6rÄ«6rÄ“s .pe6rÄ«6rÄ“t .per6Ä«rÄ“tu .per6Ä«rÄ“tú .per6Ä«rÄ“Ìmi .per6Ä«rÄ“Ìmur .pe6rÄ«6rÄ“Ìmus .per6Ä«rÄ“Ìr .pe6rÄ«6rÄ“Ìs .pe6rÄ«6rÄ“Ìt .per6Ä«rÄ“Ìtu .pe6rÄ«6rém .pe6rÄ«6réntn .pe6rÄ«6réntq .pe6rÄ«6réntue .per6Ä«réntur .pe6rÄ«6réntv .per6Ä«rér .pe6rÄ«6rét .per6Ä«ri .per6Ä«rÄ« .per6Ä«rí .pe4r5Ä«s .pe6rÄ«6te .pe6r5Ä«6tis. .pe6r5Ä«6tisn .pe6r5Ä«6tisq .pe6r5Ä«6tisu .pe6r5Ä«6tisv .pe6r5Ä«6tísn .pe6r5Ä«6tísq .pe6r5Ä«6tísu .pe6r5Ä«6tísv .pe6rÄ«6tÅ. .pe6rÄ«6tÅn .pe6rÄ«6tÅq .pe6r5Ä«6tÅt .pe6rÄ«6tÅu .pe6rÄ«6tÅv .pe6rÄ«6tÅÌn .pe6rÄ«6tÅÌq .pe6r5Ä«6tÅÌt .pe6rÄ«6tÅÌu .pe6rÄ«6tÅÌv .pe6rÄ«6tur .pe6rÄ«6túr .pe4r5Ä«4u .pe4r5Ä«4v .pe6r5Ä«Ì6mus .pe6r5Ä«Ì6n .pe6r5Ä«Ì6q .pe6r6Ä«Ì6re. .pe6rÄ«Ì6rem .pe6rÄ«Ì6ren .per6Ä«Ìrene .pe6r6Ä«Ì6req .per6Ä«Ìrer .pe6rÄ«Ì6ret .pe6r6Ä«Ì6reu .pe6r6Ä«Ì6rev .pe6rÄ«Ì6rÄ“ .per6Ä«Ìri .per6Ä«ÌrÄ« .pe6rÄ«Ìs .pe6rÄ«Ì6te .pe6r5Ä«Ì6tis .pe6rÄ«Ì6tÅ. .pe6rÄ«Ì6tur .pe6rÄ«Ì6u .pe6rÄ«Ì6v .pe4ríe .pe5ríl .per6ímin .pe6r5í6mus .perí4n .pe6r5íne .pe4r5í4q .pe6r6í6re. .pe6rí6rem .pe6rí6ren .per6írene .pe6r6í6req .per6írer .pe6rí6res .pe6rí6ret .pe6r6í6reu .pe6r6í6rev .per6íri .pe6rísn .pe6rísq .pe6r5íss .pe6r5ísti .pe6rísu .pe6rísv .pe6rí6tan .pe6rí6taq .pe6rí6tau .pe6rí6tav .pe6rí6te .pe6rí6tis .pe6r5ítn .pe6rí6to. .pe6r5ítq .pe6r5ítue .pe6rítur .pe6r5ítv .pe4rí4u .pe4rí4v .per5os .per3Å .pe4rór .pe4rós .pÄ“4nÄ« .pÄ“Ì3i .pÄ•4r3Ä .pÄ•4r3ă .pÄ•răs5 .pÄ•6r5áeq .pÄ•ræ4 .pÄ•rÇ£4 .pÄ•rÇ£Ì4 .pÄ•r5Ç£Ìq .pÄ•rǽ4 .pÄ•4r5ǽq .pÄ•4r5Ä“4 .pÄ•rÄ“Ì4 .pÄ•4rÄ•Ä .pÄ•4rĕă .pÄ•4r5Ä•m .pÄ•4r5Ä•Å .pÄ•6r5Ä•Ìm .pÄ•4rÄ«. .pÄ•6r5Ä«6mÅ­s .pÄ•6r5Ä«6mÅ­Ìs .pÄ•r5Ä«4n .pÄ•4r5Ä«4q .pÄ•6r5Ä«6rÄ“mÅ­s .pÄ•6r5Ä«6rÄ“mÅ­Ìs .pÄ•6r5Ä«6rÄ“s .pÄ•6rÄ«6rÄ“t .pÄ•r5Ä«rÄ“tÄ­ .pÄ•6r5Ä«6rÄ“ÌmÅ­s .pÄ•6r5Ä«6rÄ“Ìs .pÄ•6rÄ«6rÄ“Ìt .pÄ•r5Ä«rÄ“ÌtÄ­ .pÄ•6rÄ«6rÄ•. .pÄ•6r5Ä«6rÄ•m .pÄ•6rÄ«6rÄ•nÄ• .pÄ•6r5Ä«6rÄ•nt. .pÄ•6r5Ä«6rÄ•ntn .pÄ•6r5Ä«6rÄ•ntq .pÄ•6r5Ä«6rÄ•ntu .pÄ•6r5Ä«6rÄ•ntv .pÄ•6rÄ«6rÄ•q .pÄ•6r5Ä«6rÄ•t .pÄ•6rÄ«6rÄ•u .pÄ•6rÄ«6rÄ•v .pÄ•6r5Ä«6rÄ•Ìm .pÄ•6r5Ä«6rÄ•Ìntn .pÄ•6r5Ä«6rÄ•Ìntq .pÄ•6r5Ä«6rÄ•Ìntu .pÄ•6r5Ä«6rÄ•Ìntv .pÄ•6r5Ä«6rÄ•Ìt .pÄ•4r5Ä«s .pÄ•6rÄ«6tÄ• .pÄ•6r5Ä«6tÄ­s. .pÄ•6r5Ä«6tÄ­sn .pÄ•6r5Ä«6tÄ­sq .pÄ•6r5Ä«6tÄ­su .pÄ•6r5Ä«6tÄ­sv .pÄ•6r5Ä«6tÄ­Ìsn .pÄ•6r5Ä«6tÄ­Ìsq .pÄ•6r5Ä«6tÄ­Ìsu .pÄ•6r5Ä«6tÄ­Ìsv .pÄ•6rÄ«6tÅ. .pÄ•6rÄ«6tÅn .pÄ•6rÄ«6tÅq .pÄ•6r5Ä«6tÅt .pÄ•6rÄ«6tÅu .pÄ•6rÄ«6tÅv .pÄ•6rÄ«6tÅÌn .pÄ•6rÄ«6tÅÌq .pÄ•6r5Ä«6tÅÌt .pÄ•6rÄ«6tÅÌu .pÄ•6rÄ«6tÅÌv .pÄ•6rÄ«6tÅ­r .pÄ•6rÄ«6tÅ­Ìr .pÄ•4r5Ä«4u .pÄ•4r5Ä«4v .pÄ•6r5Ä«Ì6mÅ­s .pÄ•6r5Ä«Ì6n .pÄ•6r5Ä«Ì6q .pÄ•6r5Ä«Ì6rÄ“ .pÄ•6rÄ«Ì6rÄ•. .pÄ•6r5Ä«Ì6rÄ•m .pÄ•6rÄ«Ì6rÄ•n .pÄ•r5Ä«ÌrÄ•nt .pÄ•6rÄ«Ì6rÄ•q .pÄ•6r5Ä«Ì6rÄ•t .pÄ•6rÄ«Ì6rÄ•u .pÄ•6rÄ«Ì6rÄ•v .pÄ•6r5Ä«Ìs .pÄ•6rÄ«Ì6tÄ• .pÄ•6r5Ä«Ì6tÄ­s .pÄ•6rÄ«Ì6tÅ. .pÄ•6rÄ«Ì6tÅ­r .pÄ•6r5Ä«Ì6u .pÄ•6r5Ä«Ì6v .pÄ•6rÄ­Ä“n .pÄ•6rÄ­Ä“rÄ• .pÄ•6r5Ä­Ä“rÅ­ .pÄ•6rÄ­Ä“Ìn .pÄ•6rÄ­Ä“ÌrÄ• .pÄ•6r5Ä­Ä“ÌrÅ­ .pÄ•6r5Ä­Ä•r .pÄ•6r5Ä­Ä•Ìr .pÄ•4r5Ä­Ä« .pÄ•r5Ä­mÅ­ .pÄ•rÄ­4t .pÄ•6r5Ä­t. .pÄ•6r5Ä­tÄ .pÄ•6rÄ­tÄ• .pÄ•6r5Ä­tn .pÄ•6r5Ä­tq .pÄ•6r5Ä­tu .pÄ•6r5Ä­tÅ« .pÄ•6r5Ä­tv .pÄ•6r5Ä­ÌÄ• .pÄ•6r5Ä­Ìt .pÄ•r3Å .pÄ•Ì4r5Ä• .pÄ•Ì6rÄ­Ä“ .pÄ•Ì6r5Ä­Ä« .pÄ•Ì6r5Ä­6t .pé3i .pé2r .pér3e .pér5ii .pér5iÄ« .pér5i4t .pi6str .po6te6ris .po6te6rís .po6tes. .po6tesn .po6tesq .po6tesu .po6tesv .po4tés .pó4tes .pule5i .pulé3 .ra3d4 .radi5c .ra3i .ra3m .ra5ra .ra5rá .ras5t .ra6ste .rÄ6ste .rÄ6stÄ• .rÄÌ6st .rá3i .ræ3 .re1 .re5dam. .re5damq .re5damu .re5damv .re5das .red3e4 .red3Ä“ .re4dé .re4di. .re4d5ie .re4d5iÄ“ .re4d5ié .re4d5ií .re4d5i4m .red5i4n .re4d5i4q .re6dis. .re6disn .re6disq .red5iss .red5ist .re6disu .re6disv .re4d5i4t .re4di6u .red5iue .redi6v .red5ive .re4dÄ«. .red5Ä«4m .re4d5Ä«4n .re4d5Ä«4q .red5Ä«4t .redÄ«6u .redÄ«6v .red5Ä«Ì6m .re6d5Ä«Ì6n .re6d5Ä«Ì6q .red5Ä«Ìs .red5Ä«Ì6t .re6d5Ä«Ì6u .re6d5Ä«Ì6v .re4d5í4m .re4d5í4n .re4d5í4q .re6dísn .re6dísq .red5íss .red5íst .re6dísu .re6dísv .re4d5í4t .re4d5í4u .re4d5í4v .re3Å .re3ó .res4tÅ .rex2 .re5xi .rÄ•1 .rÄ•d3Ä“ .rÄ•4dÄ• .rÄ•4dÄ«. .rÄ•d5Ä«4m .rÄ•4d5Ä«4n .rÄ•4d5Ä«4q .rÄ•d5Ä«4t .rÄ•dÄ«6u .rÄ•dÄ«6v .rÄ•d5Ä«Ì6m .rÄ•6d5Ä«Ì6n .rÄ•6d5Ä«Ì6q .rÄ•d5Ä«Ìs .rÄ•d5Ä«Ì6t .rÄ•6d5Ä«Ì6u .rÄ•6d5Ä«Ì6v .rÄ•dÄ­4 .rÄ•4d5Ä­Ä“ .rÄ•4d5Ä­Ä• .rÄ•d5Ä­m .rÄ•4d5Ä­t .rÄ•dÄ­Ì4 .rÄ•d5Ä­Ìt .rÄ•3Å .rÄ•5s4tÅ .rÄ•Ì4d5Ä­4 .rÄ•Ì3q .rÄ•Ìs6tÄ“ .rÄ•Ìs6tÄ•m .rÄ•Ì5s6tÅ .ré4d3i4 .rés6tem .rés6tes .rés4tÄ“ .ré5s4to .ré5s4tÅ .ré5str .ris2 .ro3b2 .ro3d4 .ro5di .rodi5u .rodi5v .ro4s3t .rÅ3d4 .rÅ5dÄ« .rÅdÄ«5u .rÅdÄ«5v .ru3r .ru4s .sa3mu .sá3mu .se3i .se6mis. .se6misn .se6misq .se6misue .se6misv .se6mísn .se6mísq .se6mísu .se6mísv .se3ps .sÄ“3i .sÄ“3p2 .sÄ“Ì3i .sÄ“Ì3p4 .sé3i .sé4mis .sé3ps .sér4ui .sér4uÄ« .si4lu .sil5ui .sil5uÄ« .sil5uí .si6str .sí4lui .sí4luÄ« .supe6ris .supé6r5is .te4ia .te4iá .te4ie .te4ii .te4ií .te4io .te4ió .te4iú .te3n4u .te3ra .te5r4e .te5rim .te5rin .te5r6it .teri5tur .te5ri5ue .te5ri5v .te5rÄ« .terÄ«5u .terÄ«5v .te3ro .te3rÅ .te5runt .tÄ“2i .tÄ•5rÄ• .tÄ•rÄ•5r .tÄ•5rÄ« .tÄ•rÄ«5u .tÄ•rÄ«5v .tÄ•3rÅ­ .té3n4u .té5r4e .té3rÄ« .tran5s6ue. .trÄn5s6ue. .trÄn5s6uÄ•. .trÄÌn5s6ue. .trÄÌn5s6uÄ•. .trán5s6ue. .tro4ii .tro4ií .tro4i5q .tro6iue .tro4iv .tro4í .troí5u .troí5v .ub2 .ubÄ«3q .ubÄ«Ì3 .ueni4 .ue4ni. .ue6niens .ue6n5ier .ue6niéns .ue6n5iér .ue4nim .ue4nin .ue4niq .ue4nir .ue4nis .ue4nit .ue6niue .ue4ní4 .uen5íe .ue6ste .uÄ“4nit .uÄ“4nÄ«4 .uÄ“n5Ä«s .uÄ“nÄ«Ì4 .uÄ“n5Ä«Ìs .uÄ“4nÄ­t .uÄ“6nÄ­Ìt .uÄ“4nít .uÄ“Ì6nit .uÄ“Ì4n5Ä« .uÄ“Ì6nÄ­t .uÄ•6stÄ• .ué4ni. .ué6niens .ué4nis .ué4nit .uÄ«4cÄ•Ì .ul3ui .ul3uÄ« .ul3uí .um2e .un3et .uol6uere. .uol6uerene .uol6uereq .uol6uereu .uol6uÄ“re .uol6uÄ“ru .uol6uÄ“rú .uol6uÄ“Ìre .uol6uÄ“Ìru .uol6uit. .uol6uitn .uol6uitq .uol6uitue .uo6ste .uÅ6stÄ• .uól6ui. .uól6uit. .uól6uÄ«. .ur1 .uu2 .Å«n5ăÌn .Å«Ì2 .Å«Ì4d .Å«Ì4n .Å«Ì4s .Å«Ì4t .Å­b2 .Å­Ì4n .Å­Ì4t .úb2 .veni4 .ve4ni. .ve6niens .ve6n5ier .ve6niéns .ve6n5iér .ve4nim .ve4nin .ve4niq .ve4nir .ve4nis .ve4nit .ve4niv .ve4ní4 .ven5íe .ve6ste .vÄ“4nit .vÄ“4nÄ«4 .vÄ“n5Ä«s .vÄ“nÄ«Ì4 .vÄ“n5Ä«Ìs .vÄ“4nÄ­t .vÄ“6nÄ­Ìt .vÄ“4nít .vÄ“Ì6nit .vÄ“Ì4n5Ä« .vÄ“Ì6nÄ­t .vÄ•6stÄ• .vé4ni. .vé6niens .vé4nis .vé4nit .vÄ«4cÄ•Ì .vo6ste .vÅ6stÄ• a1Ä2 a3Ät a3ÄÌ2 a1á2 a3át 2aba aba3i ab2a3q aba6ste ab3aui ab3auí ab3av 2abá abá3i abæ3 a2beú 2abé ab2ia ab2iá a2b3i2b ab3ice a2bie ab4ies ab4iet a2biÄ“ ab4iÄ“s ab4iÄ“Ìs a2bié ab4iés ab4iét a2bii a2biÄ« ab3iÄ«. ab3iÄ«n ab3iÄ«q ab3iÄ«u ab3iÄ«v ab5iÄ«Ìn ab5iÄ«Ìq ab5iÄ«Ìu ab5iÄ«Ìv a2b3ií 2abil 2abim ab3iss ab3ist 2abit abi4tot abi4tót 1abÄ« abÄ«2m a2b3í2b a2bíe ab3íer a2bíi ab3ímu ab3íss ab3íst ab3íto 1abj 1a2bl 1abn 2abo 2abó abó2l 1ab1r ab3rÄ ab3rá 1abs ab2sq ab4stem ab4stÄ“m ab6stÄ“Ìm ab4stén ab4sti abs5tin ab4stó abs3tr ab4stru ab4strÅ« ab4strú 4abunt ab3u4s abu2t ab1Å«2 abÅ«4s abÅ«Ì2 2abú 5abúndat 5a4b5úndÄ 5abúndem 5abúndes 5abúndet 5a4b5úndÄ“ 5a4b5úndÅ abú2t a3ca a3cá a3cæ a3cǽ 1acc 2a3ce. 2a3cen 2a3ceq 2a3ceu 2a3cev 2aci a3ci. a3ciq a3cis a3ciu a3civ 2a3cÄ« 2ací a3cl 2a3co aco3ni 2a3cÅ 2a3có 2acum 2acus a2cut 1a2c2Å« 2acúm 2acús a2cút ad1 ad2ad ada4ma. ad6amans ada6mante. ada6mantem ada6manten ada6manteq ada6mantes ada6manteue ada6mantev ada6mantÄ“s ada6mantÄ“Ìs ad6amanté ada6mantém ada6mantés ada6manti ad6amanti. ad6amantib ad6amantin ad6amantiq ad6amantis ad6amantiu ad6amantiú ad6amantiv ad6a6mantÄ« ada6mantí ad6amantín ad6amantíq ad6amantís ad6amantíu ad6amantív ad6amas. ad6amasn ad6amasq ad6amasu ad6amasv ad6amÄns ad6amÄs. ad6amÄsn ad6amÄsq ad6amÄsu ad6amÄsv ad6amÄÌns ad6amÄÌsn ad6amÄÌsq ad6amÄÌsu ad6amÄÌsv ad6amáns ad6amánte ad6amántÄ“ ad6amánti. ad6amántib ad6amántis ad6amántiu ad6amántÄ« ad6amásn ad6amásq ad6amásu ad6amásv ad2an a2dap ada2q ad2ar ad3ác adæ2 adÇ£2 1add ade4d ade2g ade2q ade4s adÄ“2d adÄ“2g adÄ“4s adÄ“Ì4d adÄ“Ì4g adÄ“Ì4s adé2d adé2g adé2s 1adh ad3iác adi2c adi2g adi4mí adi2r adi4tÄ adi4tÇ£ adi4tÄ« adi4tÅ« adÄ«2m adÄ«2r adÄ«2t adÄ«Ì4m adÄ«Ì4r adÄ«Ì4t adí2b adí2g adí4mu adí2r ad3íss ad3íst adí4to adí4tu 1adj 1adn a2do2 a3do. ad4oc a3don a3doq a3dou a3dov adÅ2 ad4Åc ad5ÅÌ6rant ad5ÅÌ6rat ad5ÅÌ4rÄ ad5ÅÌ6rem ad5ÅÌ6rent ad5ÅÌ6rer ad5ÅÌ6ret ad5ÅÌ4rÄ“ adÅÌ6ror adó6rans adó6rant adó4ras adó4rat adó4rem adó6rent adó4rer adó4res adó4ret adó4ria adó4ror 1adp 1ads adu2 a2dul ad3u4r ad3us adÅ«2 adÅ«Ì2 a2dú2l adú2r ae1 2ae. 2aea aea2b3 a3eamú a3eant 2aeÄ a3eÄm a3eÄÌm 2aeă aeăÌ2 2aeá ae3ác a3eánt ae3áp ae4cue 1ae3d2 aed4o 2aee ae2eo ae2eÅ ae2eó ae3es ae2eu 2aeÄ• aeé2r ae3és ae3g2 2aei2 ae3ic 2ae2Ä« 2aeí 2aen aení3t 2ae2o 2ae2Å 2aeó aepo6tés aepó6tes ae3q 4aeque. 4aequÄ•. ae3r aer4i ae4rn ae4rq ae4rv ae5sci ae4scu ae4scú ae4spÅ ae2sq aes4te aesti5t4 aestí5t4 aetere6ri aete6re6rí aete6res aete6rés aete6ri. aeter5ii aeter5ií aeteri6mu aeteri6mú aeteri6n aete6ri6q aeteri6ti aeteri6tí aeteri6to aeteri6tó aeteri6tú aete4r5Ä«4 aeterÄ«Ì6 aete6r5í6mu aete6rí6n aete6rí6q aete6rí6t aeter5íti aete6rí6u aete6rí6v a3e2tÄ“ ae5tÄ•r aeté6r5es aeté6ri. aeté6r5ii aeté6rite aeté6ri6ti ae2un ae3ut 2aeÅ­ 2aeú aex2 ae2xu aé2ru 1af afe4r afé2 ag2a a3gae a3gaÍž a3gaÍ¡ a3gÄ. a3gÄn a3gÄq a3gÄu a3gÄv a3gáe a3gál a3g2æ3 a3g2Ç£ a2geb a2ger a2get 1a2gÄ“ a3gÄ“. a3gÄ“q a3gÄ“u a3gÄ“v a2géb a2gét a2gim agi6ste agi6str a2gím a2gít a2gn ag3ne ag3ni. ag3nin ag3niq ag3nis ag3niu ag3niv ag3nÄ« ag3nín ag3níq ag3nís ag3níu ag3nív ag3no. ag5norum ag5norúm ag5nos. ag5nosn ag5nosq ag5nosu ag5nosv ag5noue. ag5nove. ag3nÅ ag3nón ag3nóq ag5nórum ag5nósn ag5nósq ag5nósu ag5nósv ag5nóue. ag5nóve. ag3nu ag3nú a3gri a3grÄ« a3grí a2gun a2gún a1h ai2a aiad2 ai4an ai2á a1ib a1ie a1i2i a1iÄ« a2i3m ai4mn ai4mq ai4mv ai2nu aio2s a1iÅ a1is a1it a1iu a1Ä«2b aÄ«n3 aÄ«2nu a1Ä«2r a1Ä«s aÄ«Ì2b aÄ«Ì2r aÄ«Ì2t a1í2b a1íi a2í3me a1í2r a1í2t a3la alae2 a3lá alæ2 alÇ£2 2a3le ale2i alÄ“2i 2a3lé a3li. a3lia a3lib a3lii a3lií a3lin a3lio a3liÅ a3lió a3liq a3lis a3lit a3liu a3liú a3liv 2a3lÄ« 2a3lí 2alu a2l3ua a2luÄ a2l3uá a2l3uæ a2luÇ£ a2l3uǽ al3ue. al3uen al3ueq al3ueu al3uin al6uine. a4l5uis. a4l5uisn a4l5uisq a4l5uisu al3uÄ«s al5uÄ«Ìs a4l5uísn a4l5uísq a4l5uísu a3l4um al3uó a3l4us alu6ste a3l4ut al3uu al3uú alÅ«6ste 2alú 2am. am2a 4amantÄ“ 6amantéa 6amantéæ 6amantée 6amantéi 6amantéo 6amantéu a4mantÅ 1a2mÄ 1amb am2be amb3és am4b5i4mu am4b5i4mú am4b5it. am6b5i6te. am6b5i6ten am6b5i6teq am6b5i6teu am6b5i6tev ambi4ti am4b5i4tí am4b5itn am4bi4to am4b5i4tó am4b5itq am6b5itue am4bitú am4b5itv am6bi6ui. am6bi6vi. am4bít am4b3u4r am4b3us ambÅ«bÄ6i ambÅ«bÄ“6i am4bÅ«4r am4b3Å«Ì4 am4b3ú4r am2e ame3g am4es ame3sæ ame3sǽ am2Ä“ am2é am4és amé3sa am2i 3a2mic 2amin ami4s3 ami6ste ami6str 3a2míc 2amm 2amn 3amnæ 3amnÇ£ 3amnǽ 1amo a2móe 1amÅ“ 1amp 2amq 2a1mu am4uel am2uÄ“ am2ué a2mui a2muÄ« a2m3uí a3mur a3mus 2a3mú 2amv 2an2a an2Ä 2aná 2anæ 2anǽ 1anc an2cu 2and ande4s3 2ane a3nÄ“ 1anh 1ani a2nim 2anÄ« 3a2ním 2a3n2o ano3p 2anÅ 2a3nó 2ans1 an2sa2 ans3ab3 ansabi4 ansabí4 an4sá4b3 an4s3ci an4scí an4sea an4seá an4seo an4seó an4si4b an4sig ansi4mi an4si4t ansi4u an4si4v an4sí4b an4síe an4síg an4sí4m an4sí4t ansí4ui ansí4vi an4sn an2sp an4sq ans3t an4sv 2ant. ante5re an4t5ero an4t5erÅ an4t5e4ró an5tes antes4t ante5stÄti ante5stÄÌti ante5stem. ante5stemn ante5stemq ante5stemue ante5stemv ante5stes ante5stÄ“s ante5stÄ“Ìs ante5stémn ante5stémq ante5stémue ante5stémv ante5stés anté5ii antés4t anté5stem anté5stes anté5stÄ“ 2antn 2antq 2antu 2antú 2antv 2a1n2u a2n3ue an2Å« 2anú ao1n a2one ao3ni ao2ny ao2ný a1or aÅ2ny aÅ2ný a3ÅÌ4ny a3ó2ny aó1r 1ape1 ape2i ape3r4e aper4Ä“ aper4i ape3r4Ä« aper4í aperí5tur aper4u 2aph a3pi apis3 api6str a3pí a2pn apo5str apo4su 1apó após3 1app appár4 apule4 aput3 a3pú a2qua a2quÄ a2quá a3que. a2quÄ“ a2quo a2quÅ a2quó a1r 2ar. ar2a arab2 1arÄ 2arám ardÄ“2 ar2e 2are. are2i 2aren 2areq 2arer 3a4resc 2areu 2arev arÄ“2i a3rÄ“u a3rÄ“v 2aré 3a4résc 2ar2i 3arid ari5do ari3ni 2arí 3aríd 1arm 2arn arpÄ“4i 2arq ar2sp 3a2r3ua 3a2r3uÄ 3a2r3uá ar3uæ ar3uÇ£ ar3uǽ ar3ue. a4r3uen a4r3ueq ar4uer a4r3ueu ar4ui. ar4uin ar4uiq ar4uis ar5uis. ar5uisn ar5uisq ar5uisu ar4uiu ar3uÄ« ar5uísn ar5uísq ar5uísu 2a3rum 2a3run a2r3uo a2r3uÅ a2r3uó a3rus aru3sp a2r3uu a2r3uú 2a3rú arú3sp 2arv 3arva 3arvÄ 3arvá 2as. 2asca 2ascá as6cendÄ as6cende as6cendÄ« as6cendÅ as2cÄ“ as6céndÄ as6céndÄ« as6céndÅ 2as3ci 2ascí 2asco 2ascó a3scr as4cri 2ascu 2ascú a3s2e ase2i as4er asÄ“2i a3sé a3s2i a3sí 2asn 1asp as5per. as5pera as5perÄ as5perá as5peræ as5perÇ£ as5perǽ as5pere as5perÄ“ as5peré as5pe5ri as5pe5r4Ä« as5per4í as5perne. as5pero as5perÅ as5peró as5perq as5peru as5perú as5perv a4s3pÄ“ as5péra as6pérna as5pérq as5péru as5pérv a4spi as3pis a4s3pÄ« a4spí as3pís as3po as3pÅ as3pó as3pum as3púm 2as3q 2ass as2tÄ as5te. as5teq as4ter as5teu as5tev as2tÄ“ 4a4s3ti. 4a4s3tin 4a4s3tiq 4a4stis 4a4stiu 4a4s3tiv 2as3tí a4stín a4stíq a4stís 3as4tít a4stíu a4stív as3to 2astr as4tras as4trau as5traue. as4trav as5trave. as4trát as4tráu as4tráv as4trid as4tríd as5trum as4trúe 2asu a3s2ua a4s3ue as3uis as3uís 2asv 2at at3a4g ata5str a2t3á4g ate4ie ate4io ate4ió ate4iú ate2Ä« ate3r4a ate3rÇ£ ate5re ate5ré ate3ri ateri5u ateri5v ate5rÄ« aterÄ«5u aterÄ«5v ate3ro ate3rÅ a3ti ati4s atis5t ati6sta a3tí ato2i ató2i 1att a3tur a3tú a1u au3aÍž a2u1Ç£2 au3d2 2a3ue 2a3ué 1aug 2aui 2auí a2ul a2u1m a2un aupe5re aupe5ri auperi5n auperi5q auperi5ue auperi5v aupe5r4Ä« auperÄ«5n auperÄ«5q auperÄ«5u auperÄ«5v a2u1r a2ut 1auu a2ux au2xu 2av av3aÍž a2v1Ç£ a3ve a3vé 1avu ax2 ax4eu a2xia a2xiá a2xiæ a2xiǽ a2xié a2xii a2xií a2xio a2xió a2xiú a2xía a2xíe ax3ue ax4us a2Íž 4aÍže. 2aÍžea 2aÍžeÄ 2aÍžeă 2aÍžeá 2aÍžeÄ« 4aÍžen 6aÍžeque. 6aÍžequÄ•. aÍžu6ste aÍžu6stÄ• 4aÍžÌea 4aÍžÌeÄ 4aÍžÌeă 4aÍžÌeÄ« 4aÍžÌen a2Í¡ 4aÍ¡e. 2aÍ¡ea 2aÍ¡eÄ 2aÍ¡eă 2aÍ¡eá 2aÍ¡ei 2aÍ¡eÄ« 2aÍ¡eí 4aÍ¡en 6aÍ¡eque. 6aÍ¡equÄ•. aÍ¡ete6res aÍ¡ete6rés aÍ¡eté6r5es aÍ¡u4st aÍ¡u6ste aÍ¡u6stÄ• 4aÍ¡Ìea 4aÍ¡ÌeÄ 4aÍ¡Ìeă 4aÍ¡Ìei 4aÍ¡ÌeÄ« 4aÍ¡Ìen 6aÍ¡Ìeque. 2Äb2 Äba2 Äbá2 ÄbÄ«3u ÄbÄ«3v Äbo2 Äb4un 2ÄcÄ• Äcé2 2ÄcÄ« 2ÄcÄ­ 1Ä2cr 1Äct Ä2c3ue Äda2 Ädá2 ÄdÄ“2s Ä3do2 Äd4or Ädó2 Äe1 Äe3r ÄÄ“2 ÄÄ“r3 ÄÄ“Ì2 ÄÄ•1 ÄÄ•3r ÄÄ•r4Ä• Äg2a Ä2gÄ Ä2gă Ä3g2æ3 Ä3g2Ç£ Ä2ge Äge2r Ä2gÄ• Ä2gé2 Ä2gn Ä2go2 Ä2gÅ Ä2gó Ä1i Ä2ia. Äiad2 Ä2iam Ä2ian Ä2iaq Ä2iau Ä2iav Äi2Ä Ä4iÄque Ä4iÄue Ä4iÄve Ä6iÄÌque Ä4iÄÌue Ä4iÄÌve Ä2iám Ä2id Ä2ien Ä4iÄ“Ìne Ä6iÄ“Ìque Ä4iÄ“Ìue Ä4iÄ“Ìve Ä2iÄ«. Ä4iÄ«ne Ä4iÄ«que Ä4iÄ«ue Ä4iÄ«ve Ä4iÄ«Ìne Ä6iÄ«Ìque Ä4iÄ«Ìue Ä4iÄ«Ìve Ä2io Ä2iÅ. Ä4iÅne Ä4iÅque Ä4iÅru Ä4iÅrú Ä4iÅs. Ä4iÅsne Ä6iÅsque Ä4iÅsue Ä4iÅsve Ä4iÅue Ä4iÅve Ä4iÅÌne Ä6iÅÌque Ä4iÅÌru Ä6iÅÌsne Ä6iÅÌsque Ä6iÅÌsue Ä6iÅÌsve Ä4iÅÌue Ä4iÅÌve Ä2ió Ä2is Ä2ium Ä2ius Ä2iús Ä1Ä­c Ä2íe 2Äl Äle2r Ä3li Älo2 2Ä1m2 Äme4r3 ÄmÄ­Ì5c Ämo2 Ä3na Ä3n2Ä Ä3nă Ä3ná Ä3næ Ä3nÇ£ Ä3nǽ Ä3ne Äne2r Ä3nÄ“. Ä3nÄ“n Ä3nÄ“q Ä3nÄ“u Ä3nÄ“v Ä3n2Ä• Äné2 Äno2 Ä3nÅ 2Äns Än2s3a2 Änsab3 Än2să Änsá2 Än4s3áb3 Än4scÄ« Än4s3ea Än4s3eÄ Än4s3eá Än4s3eo Än4s3eÅ Än4s3eó Än4s3Ä•Ä Än4s3ĕă Än4s3Ä•Å Än4s3Ä•Å Än4s3i4b Än4sig Än4s3iÄ« Än4s3i4t Än2s3Ä«2 ÄnsÄ«Ì4m ÄnsÄ«Ì4t Än4s3Ä­4b Äns3Ä­Ä“ Än4sÄ­g Än4s3Ä­Ä« Än4s3Ä­4t Äns5Ä­Ì4b Än4s5Ä­ÌÄ• Än4s5Ä­Ìg Än4s3í4b Än4síe Än4síg Änsí4t Äns5íta Äns5íte Äns5íti Än2sp Än4s3t Ä1nu Ä2n3ue Ä3nus Ä3nÅ­ Ä3nú Ä1Å ÄpÄ“2 Ä3pi Ä3pÄ­ Ä3p2t 2Äq Ä1r 2Ära 2ÄrÄ 2Ärá 2Ä3r2e Ä3rÄ“ ÄrÄ“2i 2ÄrÄ“m 2ÄrÄ“r 4ÄrÄ“s. 3Ä4rÄ“sc 4ÄrÄ“sn 4ÄrÄ“sq 4ÄrÄ“su 4ÄrÄ“sv 2ÄrÄ“t 2ÄrÄ“Ì 5Ä4rÄ“Ìsc 2Ä3r2Ä• 2Äré2 2Äria 2ÄriÄ 2Äriá 2Äriæ 2ÄriÇ£ 2Äriǽ Ä2rid Äri5dÅ 2Ärie 2ÄriÄ“ 2ÄriÄ« 2Ärim 2Ärin 2ÄriÅ 2Äris 2Ärit 2Äriu 2Äriú 2ÄrÄ« 2ÄrÄ­ 3Ä2rÄ­d ÄrÄ­5dÅ 3Ä4rÄ­Ìd 2Ärí 3Ä2ríd Äro2 2ÄrÅ Äró2 Är2s3p Är2u Är3ue. 2Ärum 2Ärun 2ÄrÅ­ Är4Å­n 2Ärú 2Äs Äs2ca Äs2că Äs3cÄ« Äs2i Äsi2n Äso2 Ä2s3q Äs5ter Äs5tÄ•r Ä2s3ti Ä2s3tÄ« Ä2s3tÄ­ Ä2s3tí Ä2s3ue Ä2s3uÄ• 2Ät Äté2 Äto2 ÄtÅ2i Ätó2 2Ä1u2 2Äv Äx2 Ä2x3u 2Ä2Ì ÄÌb2 ÄÌ4crÄ• ÄÌ4crÄ­ 3ÄÌctÄ“ 3ÄÌcti ÄÌ2f ÄÌ2go ÄÌ2gÅ ÄÌ3ici ÄÌ3iul ÄÌ3Ä­cÄ­ ÄÌ3lu ÄÌ1m2 ÄÌn4s5ea ÄÌn4s5eÄ ÄÌn4s5eo ÄÌn4s5eÅ ÄÌn4s5Ä•Ä ÄÌn4s5ĕă ÄÌn4s5Ä•Å ÄÌn4s5Ä•Å ÄÌn4s5iÄ« ÄÌn4s5i4t ÄÌn4s5Ä­Ä« ÄÌn4s5Ä­4t ÄÌ3p2t ÄÌ3rÄ• 3ÄÌ4rid 3ÄÌ4rÄ­d ÄÌr4uÄ« ÄÌ5s4trÅ­ ă1Ä2 ă3Ät ă3ÄÌ2 ăb1 ăb2a 2ăbă ăb2ăc ăbă4l ăb2ăq ăbă6stÄ• ăb2ÄƒÌ Äƒb3ăÌl ăb2á ăbæ3 ăb2e 2ăbÄ“ ăb2Ä“s ă2bi ăbÄ«2m ăb4Ä­Ä“s ăb4Ä­Ä“Ìs ăb3Ä­Ä«. ăb3Ä­Ä«n ăb3Ä­Ä«q ăb3Ä­Ä«u ăb3Ä­Ä«v ăb5Ä­Ä«Ìn ăb5Ä­Ä«Ìq ăb5Ä­Ä«Ìu ăb5Ä­Ä«Ìv ăbÄ­Ì4g ă2bl ăbÅ2 ăbÅ3lÅ­ ăbÅÌ2 ăb3r ăb4ră ăb2sq ăb4stÄ“m ăb6stÄ“Ìm ăb4stÄ­ ăbs3tr ăb4strÅ« ăb4strÅ­ ăb4stÅ­ ăb2su ăbÅ«2 ăbÅ«Ì4 ă2bÅ­ ă3bÅ­m 2ăca 2ăcÄ 2ăcă 2ăcá 2ăcæ 2ăcÇ£ 2ăcǽ 1ăcc 2ăcÄ“ ă3cÄ•. ă3cÄ•n ă3cÄ•q ă3cÄ•u ă3cÄ•v 2ă3cÄ« 2ăcÄ­ 2ă3cŠă2cu 1ă2c2Å« 2ăcÅ­m 2ăcÅ­s ă3cÅ­Ìm ăd1 ădă2 ăd2ăd ăd6ămÄns ăd6ămÄs. ăd6ămÄsn ăd6ămÄsq ăd6ămÄsu ăd6ămÄsv ăd6ămÄÌns ăd6ămÄÌsn ăd6ămÄÌsq ăd6ămÄÌsu ăd6ămÄÌsv ădă6măntÄ“s ădă6măntÄ“Ìs ăd6ămăntÄ• ăd6ămăntÄ« ăd6ămăntÄ­b ăd6ămăntÄ­s ăd6ămăntÄ­Å­ ăd6ămăntÄ­Ìs ăd6ămăÌntÄ“ ăd6ămăÌntÄ• ăd6ămăÌntÄ« ăd6ămăÌntÄ­b ăd6ămăÌntÄ­s ăd6ămăÌntÄ­Å­ ăd2ăn ădă4q ădæ2 ădÇ£2 ă3d2e ăde4u ădÄ“2d ădÄ“2g ădÄ“2s ădÄ“Ì4d ădÄ“Ì4g ădÄ“Ì4s ădÄ•2d ădÄ•2q ădÄ•Ì4d ă2di ădÄ«2m ădÄ«2r ădÄ«2t ădÄ«Ì4m ădÄ«Ì4r ădÄ«Ì4t ădÄ­2c ădÄ­4ta ădÄ­4tÄ ÄƒdÄ­4tă ădÄ­4tá ădÄ­4tæ ădÄ­4tÇ£ ădÄ­4tǽ ădÄ­4tÄ« ădÄ­4tÅ« ădÄ­Ì4c ădÄ­Ì4tă ădÄ­Ì4tÄ­ ădÅ2 ăd4Åc ăd5ÅÌ4rÄ Äƒd5ÅÌ6rănt ăd5ÅÌ6răt ăd5ÅÌ4rÄ“ ăd5ÅÌ6rÄ•m ăd5ÅÌ6rÄ•nt ăd5ÅÌ6rÄ•r ăd5ÅÌ6rÄ•t ădÅÌ6rÅr ă2dÅ2 ă2du ădÅ«2 ădÅ«Ì2 ădÅ«Ì4l ădÅ­2 ă1Ä•2 1ăf 1ăg ă3g2a ă2găr ă2găt ă3g2æ3 ă3g2Ç£ ă2gÄ“ ă3gÄ“. ă3gÄ“q ă3gÄ“u ă3gÄ“v ă2gÄ• ă3gÄ­b ăgÄ­6stÄ• ă2gÄ­t ă2gn ă3grÄ« ă2gÅ­n ă1h 2ă1i ă1Ä«2b ă1Ä«2r ă1Ä«s ăīÌ2b ăīÌ2r ăīÌ4t ă1Ä­Ä• ă1Ä­Ä­ ă3Ä­2t ă3Ä­ÌÄ• ă3Ä­ÌÄ­ ă3Ä­Ì2t 2ăj ălae2 ă3lă ălæ2 ălÇ£2 2ălÄ“ 2ălÄ• 2ă3lÄ« ă3lĭă ă3lĭŠă3lÄ­Å­ ă3lÄ­Ì Äƒ2l1u ălÅ«6stÄ• 2ălÅ­ 2ăm. ă1ma 1ă2mÄ Äƒ1mă 4ămăntÄ“ 3ă2măt 1ămb ăm2bÄ• ăm4b5Ä­t. ăm4b5Ä­tn ăm4b5Ä­tq ăm4b5Ä­tu ăm6b5Ä­tÅ­Ì Äƒm4b5Ä­tv ăm6b5Ä­Ìtn ăm6b5Ä­Ìtq ăm6b5Ä­Ìtu ăm6b5Ä­Ìtv ămbÅ«bÄÌ5i ămbÅ«bÄ“Ì5i ăm4bÅ«4r ăm4b3Å«Ì4 ăm4b3Å­s ăm2e ăm2Ä“ ăm2Ä• 3ămÄ«c ăm3Ä­c ămÄ­6stÄ• 2ămm 2ămn 3ămna 3ămná 3ămnæ 3ămnÇ£ 3ămnǽ 1ămo 1ă2mó 1ămÅ“ 1ămp 2ămq 2ămu 2ămv ăn2Ä 2ă3n2ă 1ănc 2ănd ă3nÄ“ 2ă3n2Ä• 1ănh 2ă3nÄ« 1ănÄ­ ă2nÄ­m 2ă3nÅ 2ă3n2Å 2ănt. ăn4t5Ä•4rŠăn5tÄ•s4 ăntÄ•5stÄtÄ­ ăntÄ•5stÄÌtÄ­ ăntÄ•5stÄ“s ăntÄ•5stÄ“Ìs ăntÄ•5stÄ•m ăntÄ•5stÄ•Ìm ăntÄ•Ìs4 ăntÄ•Ì5stÄ“ ăntÄ•Ì5stÄ•m 2ăntn 2ăntq 2ăntu 2ăntÅ­ 2ăntv ăn2Å« 2ă3n2Å­ ăÅ2ny ă3ÅÌ4ny ă3pe 1ăpÄ• ăpÄ•3rÄ• ăpÄ•3rÄ« ăpÄ•3rÅ­ ă3pé ă2pn 1ăpÅ 1ăpp 3ă2quÄ 3ă2quă 3ă2quÄ“ 3ă2quÅ 3ă2quÅ 2ăr. ă1ra ă1r2ă ără3bÅ­ ă3răg ără3gÄ• ă1ræ ă1rÇ£ ărdÄ“2 ă3r2e ă3rÄ“u ă3rÄ“v ă1r2Ä• ă3rh ă1rÄ« ă3r2Ä­ 2ărn ă1ro ă1rŠărpÄ“3i ărpÄ“Ì5i 2ărq ăr2su 2ăr1u 3ăruÄ Äƒ1rÅ« ă1rÅ­ 2ărv 3ărvÄ Äƒ1ry 2ăs. 1ăsc ăsce2 ăs2cÄ“ ăs2cÄ• ăscé2 ă3s2Ä• ăs4Ä•r ă3sÄ­ 2ăsn ă2sp ă4s3pÄ“ ăs5pÄ•r. ăs5pÄ•ra ăs5pÄ•rÄ Äƒs5pÄ•ră ăs5pÄ•rá ăs5pÄ•ræ ăs5pÄ•rÇ£ ăs5pÄ•rǽ ăs5pÄ•rÄ“ ăs5pÄ•5rÄ« ăs5pÄ•rnÄ•. ăs5pÄ•rŠăs5pÄ•rq ăs5pÄ•ru ăs5pÄ•rÅ­ ăs5pÄ•rv ă4s3pÄ« ă4spÄ­ ăs3pÄ­s ăs3pŠăs3pŠăs2pÅ­ 2ăs3q 2ăst ăs2tÄ Äƒs4tăn ăs2tÄ“ ăs2tÄ• ăs3tÄ•. ăs3tÄ•q ăs3tÄ•u ăs3tÄ•v 4ăstr ăs3tră ăs3trŠă3strŠăs4trÅ­ 2ăs3u 2ăsv ă3ta ă3tÄ Äƒtă5str ătăÌ2 ă4t3ăÌg ă3tá ă3tæ ă3tÇ£ ă3tǽ ă3tÄ“ ătÄ“Ì3i ătÄ•2Ä« ătÄ•3r4a ătÄ•3rÇ£ ătÄ•3rÄ• ătÄ•5rÄ« ătÄ•rÄ«5u ătÄ•rÄ«5v ătÄ•3rÅ­ ă3tÄ« ă3tÄ­ ătÄ­4s ătÄ­s5t ă3tr 1ătt ă2tu ă1u ă2u1a ă2u1á ă2uæ2 ă2u1Ç£2 ă2uǽ ă3uÄ• ă3uŠă2v1a ă2v1á ă2væ ă2v1Ç£ ă2vǽ ă3vÄ• ăx2 ă2xu ăÌb5Ä­Ä«. 3ăÌbl ăÌb6stÄ­n ăÌb4s5tr ăÌ3bÅ­ ăÌdă4 ăÌd6ămÄn ăÌd6ămÄs ăÌd3ăq 3ăÌdd ăÌd3ĕŠăÌd3Ä•s 3ăÌdh ăÌd3Ä­4c ăÌd3Ä­Ä­ ăÌd5Ä­4ta ăÌd5Ä­4tÄ ÄƒÌd5Ä­4tă ăÌd5Ä­4tæ ăÌd5Ä­4tÇ£ ăÌd5Ä­4tÄ« ăÌd5Ä­4tÅ« 3ăÌdj 3ăÌds ăÌ1Ä• 1ăÌf 3ăÌgg ăÌ4gÄ­Ä• 2ăÌ1i ăÌ3Ä­Ä“n ăÌ3Ä­Ä«. ăÌ3Ä­2t 2ăÌj ăÌl3u ăÌm4b5Ä­t 3ăÌmna 3ăÌmnæ 3ăÌmnÇ£ 3ăÌmp 3ăÌmt ăÌ4nÄ­m ăÌn2ŠăÌn6tÄ•rÅ 3ăÌntr ăÌ2r ăÌ3r2ă ăÌră3g ăÌ3rÄ“n ăÌ3rÄ• ăÌ3rÄ« ăÌ3rÄ­ ăÌ3rÅ­ ăÌ2sp ăÌs4tÄn ăÌs4tăt ăÌs4tÄ“s 5ăÌs4tÄ•m ăÌs6tÄ•nt 5ăÌs4tÄ•t 5ăÌstÄ­t 2ăÌ2t ăÌ3ta ăÌ3tÄ ÄƒÌ3tă ăÌ3tæ ăÌ3tÇ£ ăÌ3tÄ“ ăÌ3tÄ• ăÌ3tÄ« ăÌ3tŠăÌ3tÅr ăÌ3tr 3ăÌtt ăÌ3tÅ« ăÌ3tÅ­ ăÌ3uŠáa2t áb2ac áb2a3q áb3aui áb3avi áb2eq áb2ia á2bie áb4ies 3á2biÄ“ áb4iÄ“s 3á2bii áb4iis 3á2biÄ« áb3iÄ«. áb2iu 1ábÄ« 3á2bl áb2o ábs2c áb5sci áb2sq áb5s4te áb4stin áb3sto áb4str á3bu 2áce áda2 ád6amans ád4amas ád4amÄn ád4amÄs 3ádd áde2d ád1Ä“ 3ádh á2d3i2c ádi2g ád2ip ádi3pi 3ádj 1ádm á3do ád4ora ádo4ri á3dÅ 3áds ád1u á3eant á3eat áe2ă áe4cue áe3d2 áe2eo áe2eŠáe3es áe3g2 áei2 2áen 2áe3q 3áequa 3áequÄ 3áequă 5áequem 5áequer 5áeques 5áequet 3áequÄ“ 5áequÄ•m 5áequÄ•r 5áequÄ•t 3áequo 3áequÅ 3áequŠáe1r áer4i áes4ca áes4ci áes4ta áes4te áes4tÄ“ áes4tÄ« áes4tŠáete3 áetÄ•3 áetÄ•5r áe3ut áe2Å­ áe2x 1áf ág2a á3gæ 1áge á2ger 3ágg á2giÄ Ã¡2giæ á2giÇ£ á2giÄ“ á2gim á2git á2gn ág3no á3gr á1h ái2a á2ia. á2iae á2iam á3iane á3iaq á2ias á3iau á3iav á2iaÍž á2iaÍ¡ á2iÄ Ã¡2iæ á2iÇ£ á3ieq á3ieu á3iev á2iis á3iit á1iÄ« á1i2t á1iu 1álp á2l3ua á2luÄ Ã¡2l3uæ á2luÇ£ á2l3ue ál3uÄ“ ál3uin á4l3uis ál3uÄ«s ál3uu ám1 á1m2a 1ámb ám4bes ám2bÄ“ ám4b3ia ám4biÄ Ã¡m4b3io ám4b3i4t ámb4iui ámb4iv ám2e áme3s ám2Ä“ 2ám2i ám2Ä« 2ámn 3ámnæ 3ámnÇ£ á1mo 3ámp 2ámq 3ámt 2ámu á3m2uÄ“ 2ámv án2cu á2nim 3ánnu án2o3 án4s3ea án4s3eo án2si2 áns3it án4t3ea ánte3i ánt5ero ánt5erÅ 3ántr á1nu án2ua á2nue án2uÄ« án2Å« ápe3r á3pi á2pn 2áq á2qui á1r 2ár2a ár5cha 2árd 2áre 2ár2i 3árid 2áro ár2sp 2áru á2r3ua á2r3uÄ Ã¡r3uæ á2rue á4ruis á3rum á3run á2ruo á2r3uŠá2ruu 2ás ás3c ás4er ás2i áspe3 ás3pÄ« ás2pu ás4tÄn ás4tÄ“s á4sti ás5ti. ás5tis 3ástit ás3to ás3tri ás5trum 2át át3a4g áte3r á5trix 3átt á1u 2áue á2ul á2u1m á2un áupe3 áupe5r á2u1r á2ut á2ux áu2xu 2áv áx2a áx4eu áx2i á2xia á2xiæ á2xii á2xio á2xiu áx2Ä« áx2o áx2Šáx4us æ1 2æa æa2b1 æa2m æ2a3n æ2a3q æ2a3r æ2as 2æ2Ä 2æă æ2ăn æ2ă3q æ2ău æ2ăv æăÌ2 2æá æá2c æ2ám æ2án æ2ár 2æ2æ 2æ2ǽ æb2 æbe3r æ2c3ue 1æd2 æde2s ædÄ“2s æ2di æ2dÄ­ æ3do æd4or æ3dÅ­ æd4Å­Ä• 2æe2 æ2e3n æ2eo æ2eŠæ2eó æ2e3q æe4ra æe4ro æe4rŠæ3es æ2eu æ2eú æ2ev æex3 2æ2Ä“ 2æĕ2 æ2ĕŠæ2Ä•3q æĕ4rŠæ2Ä•Å­ æĕÌ2 2æ2é æ3é2r æ3és æ2g2 æge2 ægé2 æ3gn 2æi2 æ3ic æ2in æ2i3q æ2is æ2i3ue æ2i3v 2æ2Ä« æĭ2 æĭÌ2 2æ2í æ3í2c æmo4nu æmÅ2 2æn æn2Ä Ã¦3ne æne3Ä« æ3nÄ“ æ3nÄ•1 æ3né æ2nin æni3t æn1Ä« æní3t 2æ2o 2æ2Šæ2Å 2æ2ó æó2nu æó1r æpo6te6ri æpo6te6rí æpo4tes æpo4tés æpÅ4tÄ•s æpó4tes æ2qua æ2quÄ Ã¦2quá 4æ3que. 4æquÄ•. æ4quÄ•m æ4quÄ•r æ4quÄ•t æ4quÄ•Ì Ã¦r2 æ3ră æres3 æ3rÄ“ ærÄ•2s3 æs2c æs3cu æs3cÅ­ æs3cú æs2i æs2p æspe3 æs3po æs3pŠæs3pó æst2 æsti5t4 æstí3t4 æte5ram æte5ran æte5rar æte6re6ri æte6re6rí æte6reru æte4res æte4rés æte4r3i4 æte4r3Ä«4 æterÄ«Ì4 æte4rí4 æter5ímu æter5íti æter5íu æter5ív æte3ro æte3rŠæte5run ætÄ•4r3Ä«4 ætÄ•rÄ«Ì4 ætÄ•4rÄ­Ä“ ætÄ•4r5Ä­Ä« ætÄ•4rÄ­t ætÄ•r5Ä­6tÄ Ã¦tÄ•rÄ­6tÄ• ætÄ•5rÄ­tÄ­ ætÄ•rÄ­6tÅ. ætÄ•rÄ­6tÅn ætÄ•rÄ­6tÅq ætÄ•rÄ­6tÅu ætÄ•rÄ­6tÅv ætÄ•rÄ­6tÅÌn ætÄ•rÄ­6tÅÌq ætÄ•rÄ­6tÅÌu ætÄ•rÄ­6tÅÌv ætÄ•rÄ­Ì4 ætÄ•6rÄ­ÌÄ• ætÄ•6rÄ­Ìt ætÄ•3rÅ­ ætÄ•Ì6rÄ•6rÄ­ ætÄ•Ì4rÄ« ætÄ•Ì6r5Ä­Ä« ætÄ•Ì6r5Ä­t. ætÄ•Ì6r5Ä­6tÄ Ã¦tÄ•Ì6rÄ­6tÄ• ætÄ•Ì6rÄ­6tŠæté6re6ri æté4r5es æté4ri. æté4rie æté4riÄ“ æté4r5ii æté4r5iÄ« æté4r5is æté4rit ætér5it. ætér5ita ætér5i6tÄ Ã¦téri6te ætéri6ti ætéri6to. ætéri6tŠæ3tr æu2 æū2 2æŭ æ2Å­s æ2Å­Ì 2æ2ú æx2 æ2x3u Ç£1 2Ç£a Ç£a2b1 Ç£a2m Ç£2a3n Ç£2a3q 2Ç£2Ä 2ǣă Ç£2ăn Ç£2ă3q Ç£2ău Ç£2ăv ǣăÌ2 2ǣá2 Ç£2ám Ç£3ámb 2Ç£2Ç£ Ç£2c3ue 1Ç£d2 Ç£da2r Ç£dÄ“2s Ç£2di Ç£2dÄ­ Ç£3do2 Ç£d4or Ç£dó2 Ç£3dÅ­ Ç£d4Å­Ä• 2Ç£e2 Ç£2e3n Ç£2eŠǣ2e3q Ç£e4ra Ç£e4rŠǣ3es Ç£2eu Ç£2eú Ç£2ev 2Ç£2Ä“ 2ǣĕ2 Ç£2ĕŠǣ2Ä•3q ǣĕ4rŠǣ2Ä•Å­ ǣĕÌ2 ǣé2 Ç£3és Ç£2g2 Ç£ge2 Ç£gé2 Ç£3gn Ç£i2 Ç£3ic Ç£2is 2Ç£2Ä« ǣĭ2 ǣĭÌ2 ǣí2 Ç£mÅ2 2Ç£n Ç£n2Ä Ç£3ne3 Ç£3nÄ“ Ç£3nÄ•1 Ç£ni3t Ç£n1Ä« Ç£ní3t Ç£2o 2Ç£2Šǣ2Šǣ2ó2 Ç£pote4 Ç£po4t5er Ç£po4t5es Ç£poté4 Ç£po4tér Ç£po4t5és Ç£pÅ4tÄ•s Ç£pó4t3e Ç£2quÄ 4Ç£3que. 4Ç£quÄ•. Ç£4quÄ•m Ç£4quÄ•r Ç£4quÄ•t Ç£4quÄ•Ì Ç£r2 Ç£ra2r Ç£3ră Ç£rá2 Ç£res3 Ç£3rÄ“ Ç£rÄ•2s3 Ç£ro2 Ç£ró2 Ç£s2c Ç£s3cu Ç£s3cÅ­ Ç£s3cú Ç£s2i Ç£s2p Ç£s3pŠǣst2 Ç£sti5t4 Ç£stí3 Ç£stít4 Ç£te5ram Ç£te5ran Ç£te5rar Ç£te6re6ri Ç£te6re6rí Ç£te6reru Ç£te4r5es Ç£te6réri Ç£te4r5és Ç£ter5iÄ“ Ç£ter5iÄ« Ç£te5rim Ç£ter5i6tÄ Ç£teri6te Ç£te5riti Ç£te5rití Ç£te5rito Ç£teri6tÅ. Ç£teri6tÅn Ç£teri6tÅq Ç£teri6tÅu Ç£teri6tÅv Ç£teri6tÅÌn Ç£teri6tÅÌq Ç£teri6tÅÌu Ç£teri6tÅÌv Ç£te5ritó Ç£te5r6i5tur Ç£te5ritúr Ç£te4r3Ä«4 Ç£terÄ«Ì4 Ç£terí4 Ç£te4ríe Ç£te4rít Ç£te3ro Ç£te3rŠǣte5run Ç£tÄ•4r3Ä«4 Ç£tÄ•rÄ«Ì4 Ç£tÄ•4rÄ­Ä“ Ç£tÄ•4r5Ä­Ä« Ç£tÄ•4rÄ­t Ç£tÄ•r5Ä­6tÄ Ç£tÄ•rÄ­6tÄ• Ç£tÄ•5rÄ­tÄ­ Ç£tÄ•rÄ­6tÅ. Ç£tÄ•rÄ­6tÅn Ç£tÄ•rÄ­6tÅq Ç£tÄ•rÄ­6tÅu Ç£tÄ•rÄ­6tÅv Ç£tÄ•rÄ­6tÅÌn Ç£tÄ•rÄ­6tÅÌq Ç£tÄ•rÄ­6tÅÌu Ç£tÄ•rÄ­6tÅÌv Ç£tÄ•rÄ­Ì4 Ç£tÄ•6rÄ­ÌÄ• Ç£tÄ•6rÄ­Ìt Ç£tÄ•3rÅ­ Ç£tÄ•Ì6rÄ•6rÄ­ Ç£tÄ•Ì4rÄ« Ç£tÄ•Ì6r5Ä­Ä« Ç£tÄ•Ì6r5Ä­t. Ç£tÄ•Ì6r5Ä­6tÄ Ç£tÄ•Ì6rÄ­6tÄ• Ç£tÄ•Ì6rÄ­6tŠǣté6re6ri Ç£té4r5es Ç£té4riÄ“ Ç£té4r5iÄ« Ç£té6r5it. Ç£té6rita Ç£té6r5i6tÄ Ç£té6ri6te Ç£té6ri6tŠǣu2 Ç£3ue. Ç£ue2r Ç£3uÄ•. ǣū2 2ǣŭ Ç£2Å­s Ç£2Å­Ì 2Ç£2ú Ç£3úmb Ç£3ve. Ç£3vÄ•. Ç£x2 Ç£2x3u Ç£2Ì Ç£Ì3da Ç£Ì3dă Ç£Ì3e2r Ç£Ì3es Ç£Ì3Ä•2r Ç£Ì2g2 Ç£Ì3gn Ç£Ì4gr Ç£Ì1i2 Ç£Ì1Ä­2 Ç£Ì3l Ç£Ì2mu Ç£Ì2mÅ­ 2Ç£Ì3n 3Ç£Ì4qua 3Ç£Ì4quÄ 3Ç£Ì4quă 5Ç£Ì4quem 5Ç£Ì4quer 5Ç£Ì4quet 3Ç£Ì4quÄ“ 5Ç£Ì4quÄ•m 5Ç£Ì4quÄ•r 5Ç£Ì4quÄ•t 3Ç£Ì4quo 3Ç£Ì4quÅ 3Ç£Ì4quŠǣÌs4ca Ç£Ìs4ci Ç£Ìs4cÄ« Ç£Ìs4cÄ­ Ç£Ìs4ta Ç£Ìs4tă Ç£Ìs4tÇ£ Ç£Ìs4te Ç£Ìs4tÄ“ Ç£Ìs4tÄ• Ç£Ìs4tÄ« Ç£Ìs4tŠǣÌtÄ•3 Ç£Ì4th ǽ1 2ǽ2a 2ǽ2Ä Ç½2ă 2ǽæ ǽc3ue ǽ3da ǽ3dă ǽ2e ǽ3e2r ǽ3es ǽ2Ä• ǽ3Ä•2r ǽ3Ä•s ǽg2 2ǽi2 ǽ2is 2ǽ2Ä« ǽĭ2 ǽ2mu ǽ2mÅ­ 2ǽn ǽ3ne ǽ3nÄ• ǽ2o ǽ2Šǽ2Šǽ2qua 3ǽ2quÄ 3ǽ2quă 4ǽque. ǽ4quem ǽ4quer ǽ4ques ǽ4quet 3ǽ2quÄ“ 3ǽ4quÄ•m 3ǽ4quÄ•r 3ǽ4quÄ•t ǽ2quo 3ǽ2quÅ 3ǽ2quŠǽr2 ǽ3ră ǽst2 ǽ2stu ǽte1 ǽtÄ•3 ǽu2 ǽ2um ǽ2Å­ ǽ3Å­t ǽ2x 1b 3ba. bab2o bab4u ba2c ba3ci ba3cí b2acu b2acú 2b1a2d3 3bae b2aeq b2aeu b2aev ba2g ba3gÄ“ ba3gu ba3gú ba3ian ba3ián ba3ion ba3ió ba2it ba3iú b1a2l b2ami b2an b2ap b1a2q ba3que ba2rÄ b2a2ru 5barum ba4sp bas5pe bas3t bas5te bas5tr b3a2tr ba4uen ba4ueq ba4ueu ba2uÄ« ba2uo ba2uÅ ba2uó ba2uu ba2uú 3bav ba4ven ba4veq ba4vev b3a2vÄ« b3a2vo b3a2vÅ ba2vó b3a2vu ba2vú 2b1a2x b1Äc 2b1Ä2g bÄ2ic bÄ2Ä­ b2Än b2Är b3Ä2tr b3ÄÌc 2b3ÄÌ2g b1ăb 3bă2c bă3cÅ­ b1ă2d3 bă2g bă3gÄ“ bă3gÅ­ 3bă2l băm3 b2ăn b2ăp b1ă2q b3ă2rÅ 3bărr bă4sp băs5pÄ• băs3t băs5tÄ• băs5tr b2ăt bă4uÄ•n bă4uÄ•q bă4uÄ•u b3ă2uÄ« b3ă2uÅ b3ă2uÅ­ bă4vÄ•n bă4vÄ•q bă4vÄ•v b3ă2vÄ« b3ă2vÅ b3ă2vÅ­ b1ă2x 3băÌc b3ăÌ2d3 b2ăÌn b3ăÌ2u b3ăÌ2v b3ăÌ2x b2áb b1ác 2b1á2d3 b2áeu b2áev 2b1á2g bá3ian b2án bá2ru b3ásp b2áu bá4uen bá4ueq bá4ueu bá4ven bá4veq bá4vev 2b1á2x b1æ2 b2æ3q b2æu bæ3ue bæ3uÄ• b2æ3v b1Ç£2 b2Ç£3q b2Ç£u bÇ£3ue bÇ£3uÄ• b2Ç£3v b2Ç£Ì b3Ç£Ìm b2ǽq b2ǽu b2ǽv 2bb2 b3ba bba3q b3bÄ b3bá b3bæ3 b3bÇ£ b3bǽ b3be3 b3bÄ“ b3bé b3bi b3bÄ« bbÄ«3u bbÄ«3v b3bí b3bo b3bÅ b3bó b3bu b3bÅ­ b3bú 2bc 2bd bde2s bdÄ“2s b3do bd4or bdÅ«3r be2a 3beæ 3beǽ 3bec becÄ«Ì3 b1ed2 be2dÄ be2de be2dÄ“ be2dé be2d4i be2dÄ« be2dí be2d4o be2dÅ be2dó be2du be2dú 3be2e 3beé b1e2g 3bei be3iÇ£ be3iÄ“ 3beí b2el b2em b2en be4n3ia be2o b1e2q be3ra be5ra. be5raq be5rau be5rav be3r2æ3 be3r2Ç£ ber2e 3berea 3bereá 3bereæ 3bereǽ be4rec 3beree 3bereé 3berei 3bereí 3bereo 3bereó 3bereú bere5x4 be3rÄ“ 3beréa be4réc 3berée b3eréx ber4i be3ria be3riá be3rib be3ri5c 3be3rie 3be3rié be3rii be3rií 3be3ri3n be5rite be3riu be3riú be3riv be3rÄ« be4ríg 3berín be4rít be4rn be3ro be3rÅr be3rÅs be4rq 3berúm be4rún be4rv be2s be4sa be4si be4sn be4so be4sq 2best be4su be4sv b1e2u 2beun b1eú b2ev b1e2x b2Ä“b 2b1Ä“2d b1Ä“2g bÄ“6iaene bÄ“6iaeue bÄ“6iaeve bÄ“4iam bÄ“4ian bÄ“4iÄne bÄ“6iÄque bÄ“4iÄru bÄ“4iÄrú bÄ“6iÄsne bÄ“6iÄsue bÄ“6iÄsve bÄ“4iÄue bÄ“4iÄve bÄ“6iÄÌne bÄ“6iÄÌru bÄ“6iÄÌue bÄ“6iÄÌve bÄ“6iáene bÄ“6iáeue bÄ“6iáeve bÄ“4iám bÄ“4iæne bÄ“6iæque bÄ“4iæue bÄ“4iæve bÄ“4iÇ£ne bÄ“6iÇ£que bÄ“4iÇ£ue bÄ“4iÇ£ve bÄ“6iÇ£Ìne bÄ“6iÇ£Ìue bÄ“6iÇ£Ìve bÄ“4iǽne bÄ“6iǽque bÄ“4iǽue bÄ“4iǽve bÄ“6iÄ«sne bÄ“6iÄ«sue bÄ“6iÄ«sve b2Ä“m b2Ä“n bÄ“3ne bÄ“2s bÄ“4sa bÄ“s3tÄ­ b2Ä“u b2Ä“v 2b3Ä“Ì2d bÄ“Ì2g bÄ“Ì3l2 b2Ä“Ìm bÄ“Ì2s b3Ä“Ìse b3Ä“ÌsÄ• b3Ä“ÌsÄ« b3Ä“Ìss b3Ä“Ìst b2Ä“Ìu b2Ä“Ìv 3bÄ•. 3bÄ•a bÄ•2ă 3bĕæ 3bÄ•Ç£ 3bÄ•c bÄ•cÄ«Ì3 b1Ä•d2 bÄ•3da bÄ•2dÄ bÄ•4dă bÄ•2dÄ“ bÄ•2dÄ• bÄ•2dÄ« bÄ•2d4Ä­ bÄ•2dÅ bÄ•2dÅ bÄ•2dÅ­ 3bÄ•Ä“ 3bÄ•Ä• 3bÄ•Ä« 3bÄ•l b2Ä•m 3bÄ•2q bÄ•3r2a bÄ•3r2æ bÄ•3r2Ç£ bÄ•3rÄ“ bÄ•3r4Ä• bÄ•3rÄ« bÄ•3rÅ b3Ä•rÅ­n b1Ä•s b2Ä•t 3bÄ•u 2bÄ•Å­n 3bÄ•v 2b1Ä•x bÄ•Ì4dÄ­ bÄ•Ì2q bÄ•Ì3rÄ• b1éd bé2di b1é2g bé1i bé3ie bé3iÄ“ b2él b2é1m bé4n3ia 3béra 3bérie bé4rig bé4rim bé4riti bé2ru bé2s bé4sa b3ése b3ési b3éss b3ést b1é2x 2bf b1h bi2a 3b2ia. 3b2ian 3b2iaq 3b2iau 3b2iav b2iÄ b4iÄÌn 2biă 3b4iáni 3b4iáno b2iæ b2iÇ£ b2iǽ b1i2c b1ie 3bieg b1iÄ“ 2biÄ• b1ié 3biég 2b1i2g 5bigena 5bigenÄ 5bigená 5bigenæ 5bigenÇ£ 5bigenǽ 5bigenen 5bigeneq 5bigeneu 5bigenev 5bigenÄ“ 5bigené 5bigeni 5bigenÄ« 5bigení 5bigeno 5bigenÅ 5bigenó 5bigenu 5bigenú 5bigéna 5b4igéne bi4g3n b1ii 3b4iis. 3b4iisn 3b4iisq 3b4iisu 3b4iisv b2iÄ« 3biÄ«s 3biÄ«Ìs 2biÄ­ 3b4iísn 3b4iísq 3b4iísu 3b4iísv b2il b1in b3int 3b2io bio2s b2iÅ b2ió 2b1i2r b4i3ter bi4tio bi4tiÅ 4b3i4tud 4bi4tui. 4bi4tuin 4bi4tuiq 4bi4tuiu 4bi4tuiv 4bi4tuÄ«. 4bi4tuÄ«n 4bi4tuÄ«q 4bi4tuÄ«u 4bi4tuÄ«v 6bi6tuÄ«Ìn 6bi6tuÄ«Ìq 6bi6tuÄ«Ìu 6bi6tuÄ«Ìv 4bi4tuín 4bi4tuíq 4bi4tuíu 4bi4tuív 4b3i4tuú bi4tÅ«d bi4tÅ«s 4bi4túd b1iu bi3u2b 2bi2ue 2bi2ué 4bi4uim 4bi4uin 4bi4uiq 4bi4uis 4bi4uit 4bi4uiue bi3uÄ« 2bi2uí 3biuía b2ium 2biun b2ius b2iús b1iv bi2ve 2bi2vé 4bi4vim 4bi4vin 4bi4viq 4bi4vis 4bi4vit 4bi4viv bi3vÄ« 2bi2ví 3bivía bi2x3 b1Ä« 2bÄ«2b 3bÄ«3c bÄ«2mi bÄ«2mÄ­ bÄ«2r b3Ä«2to b3Ä«2tÅ b3Ä«2tó bÄ«2u bÄ«2v bÄ«Ì2b 3bÄ«Ìc bÄ«Ì2m bÄ«Ì2r bÄ«Ì4to bÄ«Ì4tÅ bÄ«Ì4ui bÄ«Ì4uÄ« bÄ«Ì4uÄ­ bÄ«Ì4vi bÄ«Ì4vÄ« bÄ«Ì4vÄ­ b2Ä­b b1Ä­2c b1Ä­Ä“ b1Ä­Ä• 3bÄ­Ä•g 3bÄ­Ä•Ìg 2b1Ä­2g 5bÄ­gÄ•na 5bÄ­gÄ•nÄ 5bÄ­gÄ•nă 5bÄ­gÄ•ná 5bÄ­gÄ•næ 5bÄ­gÄ•nÇ£ 5bÄ­gÄ•nǽ 5bÄ­gÄ•nÄ“ 5bÄ­gÄ•nÄ•n 5bÄ­gÄ•nÄ•q 5bÄ­gÄ•nÄ•u 5bÄ­gÄ•nÄ•v 5bÄ­gÄ•nÄ« 5bÄ­gÄ•nÅ 5bÄ­gÄ•nÅ­ 5bÄ­gÄ•Ìnă 5bÄ­gÄ•ÌnÄ• b4Ä­Ä«s b1Ä­Ä­ b2Ä­l b2Ä­m b1Ä­n b4Ä­3tÄ•r bÄ­4tÄ­b bÄ­4tÄ­Å bÄ­4tÅ«d b3Ä­4tÅ«s 4bÄ­4tÅ­Ä«. 4bÄ­4tÅ­Ä«n 4bÄ­4tÅ­Ä«q 4bÄ­4tÅ­Ä«u 4bÄ­4tÅ­Ä«v 6bÄ­6tÅ­Ä«Ìn 6bÄ­6tÅ­Ä«Ìq 6bÄ­6tÅ­Ä«Ìu 6bÄ­6tÅ­Ä«Ìv 4b3Ä­4tÅ­Å­ bÄ­Ì4cÄ­ 6bÄ­Ì6gÄ•nÄ• 4b5Ä­Ì4gÄ•q 4b5Ä­Ì4gÄ•r 4b5Ä­Ì4gÄ•u 4b5Ä­Ì4gÄ•v 4b3Ä­Ì4gÄ­ 4b3Ä­Ìgn 4b3Ä­Ì4gÅ­ bÄ­Ì4tÄ­b 6bÄ­Ì6tÅ­Ä«. 4b5Ä­Ì4tÅ­Å­ 3bía bí2ba bí2bo bí2bu bí2ci b1í2g 4bígene 4bígeq 4bíger 4bígeu 4bígev 2bígi 2bí4g3n 2bígu b1íi b2íl 2bí2mu b3ínt 2b1í2r 2bí2to bí4tui. 5bítuis 5bítuÄ«s 5bítuo 5bítuÅ 5bítut 4bí4uer 4bí4ui. 4bí4uim 4bí4uit 4bí4ver 4bí4vi. 4bí4vim 4bí4vit bí2x 2bj bl2 2blÅ b3lu 2blÅ­ b2ly 2b1m2 2b1n2 bne3g bne3u2 bnÄ•3g bné1 bnéu2 b3ni b3nÄ­ bno3b2 bnÅ3b2 b3nu bn4ue b1o 3bo2a bo4am boa3q bo2á bo2æ3 bo2ǽ3 bob2ú bo2e bo2Ä“ bo3iá bo2ii bo2ií bo2i3q bo2iu bo2iv bo2Ä« boÄ«3u boÄ«3v boÄ«Ì3u boÄ«Ì3v bo2í bo2l b3olet bo3lín bo3líq bo3lís bo3líu bo3lív bol4u bo2m b2o1n bo3ni bo2o bo2Å bo2ó b2ora b2orá b2ore b2oré bo2ri bo3ri. bo3rin bo3riq bo3ris bo3riv borí3t bo4rn b2oro b2oró bo4rq bo2ru bo4rv 3bo2s bo4sn bo4sq b2o4su bo4sv bo3ue bo3v b1Å2m b2Ån b1År bÅÌ3i b3ÅÌ2m bÅ2ă b1Åd bÅ2Ä“ bÅ2Ä« bÅÄ«3u bÅÄ«3v bÅÄ«Ì3u bÅÄ«Ì3v bÅ2l b3ÅlÄ•t bÅ2Å b2Å3rÄ• bÅ3rÄ«. bÅ3rÄ«n bÅ3rÄ«q bÅ3rÄ«s bÅ3rÄ«u bÅ3rÄ«v bÅ5rÄ«Ìn bÅ5rÄ«Ìq bÅ5rÄ«Ìs bÅ5rÄ«Ìu bÅ5rÄ«Ìv bÅ2rÄ­ bÅ2s bÅ4Ìl bÅÌ4lÄ•Ä bÅÌ4lĕă bÅÌ4lÄ•Å bÅÌ4lÄ•Å bÅÌ4lÅ­ bó3ia bó3iæ bó4lea bó4leÄ bó3len bó4leo bó4leÅ bó3leq bó3leu bó3lev ból2u b1ó2m b2óra b2óre bó4rie bó4riÄ“ b2ós b3ósc 2b1Å“2 bÅ“4da bÅ“4dă bÅ“Ì„2 bÅ“Ì„4d bÅ“Ì„Ì2 bÅ“Ì2 br2 bra3d4 b2rÄ b2rá b4rác b2ræ bræ2ă b2rÇ£ brÇ£2ă b2rǽ b1re bre2i brÄ“2i 2bria 2briá b2rim b1rÄ« b2rÄ­d b4rÄ­Ä“ 2brÄ­Ä• b2rÄ­m b1ro b2rot b1rÅ b4rÅt b1ru b2rus b1rÅ­ b2rÅ­s b4rÅ­Ìs b2rús b2ry b2rý 2b1s b4s5caen b6s5caÍžen b6s5caÍžÌen b6s5caÍ¡en b6s5caÍ¡Ìen b4s5cáen b4s3cæn b4s3cÇ£n b4s5cÇ£Ìn b4s3cǽn b2s3ce b2s3cÄ“ b2scÄ• b2s3cé b4scid bs6cidera bs6ciderá bs6cidere. bs6ciderene bs6cidereq bs6cidereu bs6ciderev bs6cideri bs6ciderí bs6cidero bs6cideró bs6cideru bs6ciderú bs6cidére bs6cidérim bs6cidérit bs6cidéru bs6cidi. bs6cidimus bs6cidimús bs6cidin bs6cidiq bs6cidis bs6cidit. bs6ciditn bs6ciditq bs6ciditue bs6ciditv bs6cidiu bs6cidiv bs6cidín bs6cidíq bs6cidíss bs6cidíst bs6cidítn bs6cidítq bs6cidítu bs6cidítv bs6cidíu bs6cidív bs4ciss b2scÄ« bs2cÄ­ b4scíd bs6cídera bs6cíderi bs6cídero bs6cídimus bs4císs b4scísu bs2e bs2q bs2ta bs2tÄ bs2tă bs2tá b5s4tem. b5s4temn b5s4temq b5s4temu b5s4temú b5s4temv b4sten b5s6tent. b5s6tentn b5s6tentq b5s6tentue b5s6tentv bs4tern bs4tes bs4tet b5s4tÄ“mu b5s4tÄ“mÅ­ b5s4tÄ“mú bs4tÄ“s bs4tÄ“t b7s6tÄ“Ìmu b7s6tÄ“ÌmÅ­ bs4tÄ“Ìs bs4tÄ“Ìt bs4tÄ•m b4stÄ•n b5s6tÄ•nt. b5s6tÄ•ntn b5s6tÄ•ntq b5s6tÄ•ntu b5s6tÄ•ntv bs4tÄ•rn bs4tÄ•t bs4tÄ•Ìm bs6tÄ•Ìntn bs6tÄ•Ìntq bs6tÄ•Ìntu b6stÄ•ÌntÅ­ bs6tÄ•Ìntv bs6tÄ•Ìrn bs4tÄ•Ìt b4stémi bs4témn bs4témq bs4tému bs4témv b5s6téntn b5s6téntq b5s6téntue b5s6téntv bs4térn bs4tés bs4tét b5stit b5stÄ­t b5s4tÄ­Ìt b4stín bs4tít b2sto b3s4to. b3s4ton b3s4toq b3s4tou b3s4tov bs2tÅ b2stÅ b5s4tón b5s4tóq b5s4tóu b5s4tóv bs4trar bs4tras bs4trat bs4trau bs4trav bs4trÄr bs4trÄs bs4trÄt bs4trÄu bs4trÄv bs6trÄÌr bs6trÄÌs bs6trÄÌt bs6trÄÌu bs6trÄÌv b4stră bs4trár bs4trás bs4trát bs4tráu bs4tráv b2sue 2bt2 btes5t bte6ste btÄ“6ste btÄ“6stÄ• b3tu btÅ«3s bu3b2 bu4lue 2bum 4b3undÄ b2uni b2uní buol5ue buol5ué buol5ui buol5uÄ« buol5uí b1ur bur5ue 3bus b4us. busa4t bu2s3Ä2 bu2se b4usn bu4so bu2só bu2sp b4usq bu2su bu2sú b4usv b1Å«n b1Å«r bÅ«3rÄ­ bÅ«2su 2b3Å«Ì4s b2Å­Ä“ b2Å­Ä• b2Å­Ä« b2Å­Ä­ 2bÅ­m b2Å­2s b4Å­s. b4Å­sn b4Å­sq b4Å­su b4Å­sv 3b2Å­Ìl b2úl 2búll 6búndans 6b5úndant 4b5úndat 4b5úndem 6b5úndent 4b5úndes 4b5úndet 3bú2s bú4sa b2y b2ȳ b2ý 1c c2a cab2 ca3d2 cad4u 3caena 3caenÄ 3caenă 3caená 3caene 3caenÄ“ 3caenÄ• 3caené 3caeno 3caenÅ 3caenó 3caenu 3caenÅ­ 3caenú cae4sp ca2ie ca2ii ca2iÅ 3cam ca3ni ca3ní 3cant 3car ca3rÄ“ car4uÄ« caspe3 cas3t cas5tr 3cat. cate3i 2catÄ“ catÄ“3i catÄ“Ì5i caté3i 3catn 3catq 3catu 3catv ca2u3a ca2u3á ca2v3a ca2vá ca2x3 5caÍžena 5caÍženÄ 5caÍženă 5caÍžená 5caÍžene 5caÍženÄ“ 5caÍženÄ• 5caÍženÅ 5caÍženu 5caÍženÅ­ 5caÍženú 5caÍžÌena 5caÍžÌenÄ 5caÍžÌenă 5caÍžÌene 5caÍžÌenÄ“ 5caÍžÌenÄ• 5caÍžÌenÅ 5caÍžÌenu 5caÍžÌenÅ­ 5caÍ¡ena 5caÍ¡enÄ 5caÍ¡enă 5caÍ¡ená 5caÍ¡ene 5caÍ¡enÄ“ 5caÍ¡enÄ• 5caÍ¡ené 5caÍ¡eno 5caÍ¡enÅ 5caÍ¡enó 5caÍ¡enu 5caÍ¡enÅ­ 5caÍ¡enú 5caÍ¡Ìena 5caÍ¡ÌenÄ 5caÍ¡Ìenă 5caÍ¡Ìene 5caÍ¡ÌenÄ“ 5caÍ¡ÌenÄ• 5caÍ¡Ìeno 5caÍ¡ÌenÅ 5caÍ¡Ìenu 5caÍ¡ÌenÅ­ cÄ5bun cÄ4iae. cÄ6iaene cÄ6iaeque cÄ6iaeue cÄ6iaeve cÄ6iaÍže. cÄ6iaÍžene cÄ6iaÍžeque cÄ6iaÍžeue cÄ6iaÍževe cÄ6iaÍžÌene cÄ6iaÍžÌeque cÄ6iaÍžÌeue cÄ6iaÍžÌeve cÄ6iaÍ¡e. cÄ6iaÍ¡ene cÄ6iaÍ¡eque cÄ6iaÍ¡eue cÄ6iaÍ¡eve cÄ6iaÍ¡Ìene cÄ6iaÍ¡Ìeque cÄ6iaÍ¡Ìeue cÄ6iaÍ¡Ìeve cÄ2iÄ cÄ6iáene cÄ6iáeque cÄ6iáeue cÄ6iáeve cÄ4iæ. cÄ4iæne cÄ6iæque cÄ4iæue cÄ4iæve cÄ4iÇ£. cÄ4iÇ£ne cÄ6iÇ£que cÄ4iÇ£ue cÄ4iÇ£ve cÄ6iÇ£Ìne cÄ6iÇ£Ìque cÄ6iÇ£Ìue cÄ6iÇ£Ìve cÄ4iǽne cÄ6iǽque cÄ4iǽue cÄ4iǽve cÄ4iÄ«s. cÄ6iÄ«sne cÄ6iÄ«sque cÄ6iÄ«sue cÄ6iÄ«sve cÄ6iÄ«Ìsne cÄ6iÄ«Ìsque cÄ6iÄ«Ìsue cÄ6iÄ«Ìsve cÄ2iu cÄ2iú cÄ3s4uÄ« cÄÌ5suÄ« c2ă căd2 că2Ä­ 3căm că3nÄ­ 3cănt 3căr că3rÄ“ că3rÄ• căs3 căs5tr 3căt. 2cătÄ“ 2cătÄ• 3cătn 3cătq 3cătu 3cătv 3căÌm căÌ5nÄ­ 3căÌr căÌ3rÄ“ căÌ3rÅ 3cáena 3cáenÄ 3cáenă 3cáene 3cáenÄ“ 3cáenÄ• 3cáeno 3cáenÅ 3cáenu 3cáenÅ­ cá3ni cár4ui cár4uÄ« cá2x c2æ 3cæ. cæ3d cæ3n2 3cæna 3cænÄ 3cænă 3cæná 3cænæ 3cænǽ 3cæne 3cænÄ“ 3cænÄ• 3cæné 3cæno 3cænÅ 3cænó 3cænu 3cænÅ­ 3cænú 3cæq cæ2s3p c2Ç£ 3cÇ£. cÇ£3d cÇ£n2 3cÇ£na 3cÇ£nÄ 3cÇ£nă 3cÇ£ná 3cÇ£nÇ£ 3cÇ£ne 3cÇ£nÄ“ 3cÇ£nÄ• 3cÇ£nÅ 3cÇ£nu 3cÇ£nÅ­ 3cÇ£nú 3cÇ£q cÇ£2s3p 3cÇ£Ìna 3cÇ£ÌnÄ 3cÇ£Ìnă 3cÇ£ÌnÇ£ 3cÇ£Ìne 3cÇ£ÌnÄ“ 3cÇ£ÌnÄ• 3cÇ£ÌnÅ 3cÇ£Ìnu 3cÇ£ÌnÅ­ 3cǽna 3cǽnÄ 3cǽnă 3cǽnæ 3cǽne 3cǽnÄ“ 3cǽnÄ• 3cǽno 3cǽnÅ 3cǽnu 3cǽnÅ­ cǽ2sp 2cc2 2c2d2 c3du c3dÅ­ c2e 3ce2a 3ceá 3ceæ 3ceǽ 3ceb ce3d2 ced4o 3ce2e 3ceé 3ce2i 3ceí 3cemú 4c5e4nare 4c5e4naré 6c5e6nari. 6cenarib 6c5e6narin 6c5e6nariq 6c5e6naris 6c5e6narit 6c5e6nariue 6c5e6nariv 6c5e6narín 6c5e6naríq 6c5e6narís 6c5e6naríu 6c5e6narív 4c5e4náre 6c5e6nári. 6cenárib 6c5e6náris 6c5e6nárit 4c3ennÄ 3cent 3ce2o 3ceó cepe3 ce3ra ce3r2æ3 ce3r2Ç£ 2cerb ce3rÄ“ ce3r4i ce3rÄ« ce3ro ce3rÅ cer5ue cer3uÄ“ cer3ué ce3run ce2sp ce2sq ce2su 3cet cete3 cete5r4 ceteri5u ceteri5v ce4ua. ce4uam ce4uan ce4uaq ce4uau ce4uÄ. ce4uÄn ce4uÄq ce4uÄu ce4uÄÌ ce2uă ce2uá ce4uÄ«Ì ce2uí 3ceum ce2un 3ceus 3ceú 3cÄ“. cÄ“2i 4c5Ä“4nÄre 4c5Ä“4nÄrÄ“ 4c5Ä“4nÄrÄ• 4c5Ä“4nÄré 6cÄ“nÄrib 6c5Ä“6nÄris 6c5Ä“6nÄrit 4c5Ä“4nÄrÄ« 6cÄ“nÄrÄ­b 6c5Ä“6nÄrÄ­s 6c5Ä“6nÄrÄ­t 6c5Ä“6nÄrÄ­Ìs 6c5Ä“6nÄrís 6c5Ä“6nÄÌre 6c5Ä“6nÄÌrÄ“ 6c5Ä“6nÄÌrÄ• 6cÄ“nÄÌrib 6c5Ä“6nÄÌris 6c5Ä“6nÄÌrit 6c5Ä“6nÄÌrÄ« 6cÄ“nÄÌrÄ­b 6c5Ä“6nÄÌrÄ­s 6c5Ä“6nÄÌrÄ­t cÄ“3ne cÄ“pe3 cÄ“per4 cÄ“pÄ•5r 3cÄ“q cÄ“te3 3cÄ“u 3cÄ“v c2Ä• cÄ•2ă cÄ•3d cÄ•2Ä­ 4c3Ä•nnÄ cÄ•3r2a cÄ•3r2æ cÄ•3r2Ç£ 2cÄ•rb cÄ•3rÄ“ cÄ•3r4Ä• cÄ•3rÄ« cÄ•3rÅ cÄ•3rÅ­ cÄ•2s cÄ•Ì3rÄ• 3cÄ•Ìu 3cÄ•Ìv c2é 3céa 3céb céd2 3cée cé2i 3céne 3cént 3céq 2cérb 3cét 3céu cé4ua. cé4uan cé4uÄ. cé3ue 3cév 2ch. 5chane 3chă. 3chăm 3chănÄ• 3chăq 3chău 3chăv 3chăÌm 4cháng che1 che2i che2s chÄ“2i chÄ•1 ch4lÄ­ 2chm 2chn 2cht c2i ci2a ci4an ci3b 3cida 3cidá cide4i cidÄ“4i 3cido 3cidó 3cid4u 3cidú cig3 ci4gn ci2i cin2Ä 2cind cin4e cin4é 3cisa 3cisá 3cisæ 3cisǽ ci4s3c cis5ci 3cise 3cis2i 3cisí 3ciso 3cisó 4cissa 4cissÄ 4cissá 4cissæ 4cissÇ£ 4cissǽ 4cissÄ« 4cisso 4cissÅ 4cissó 4cissu 4cissÅ« 4cissú ci4s3t cis5ta cis5tÄ cis5té 3cisú 3citÄ cÄ«3s4uÄ« c2Ä­ cÄ­3b cÄ­n2a cÄ­n2Ä cÄ­n2æ 2cÄ­nd cÄ­nÄ­5tÄ• cÄ­nÄ­5tÅ cÄ­4st cÄ­s5tÄ cÄ­s5tă 3cÄ­tÄ 3cÄ­tă 4cÄ­Ìnd 4cÄ­Ìssa 4cÄ­ÌssÄ 4cÄ­Ìssă 4cÄ­Ìssæ 4cÄ­ÌssÇ£ 4cÄ­ÌssÄ« 4cÄ­ÌssÅ 4cÄ­ÌssÅ« 4cÄ­ÌssÅ­ cí3b cí3d cíg3 cí4gn 2cínd 4císsa 4císsÄ 4císsæ 4císsÇ£ 4císsÄ« 4císso 4císsÅ 4císsu 4císsÅ« cís3t cí3tuÄ« cí3tur cí3tuu 2cj c2l2 c4lei c4leÄ« c4leí c4leo c4leÅ c4leó c4leu c4leú c4leÍž c4leÍ¡ c3lÄ•g c3léc c3léx 2c2m2 2c1n2 cn4Ä“3m 3co. co2a3q co3Ä coÇ£4u coÇ£4v c2o3b2 cobo3l coco5m coc5te co3ea co3eÄ co3eá co2ia co3it coÄ«2 coÄ«4n coÄ«Ì4 coí2t co3l4u com1 co4me4d co4me4s co2mÄ“ comÄ“4d comÄ“4s comÄ“Ì4d comÄ“Ì4s co4mé4d comé4s co4mit comí4t co4míte 3con1 4conc co4nia co4niá co4niÄ“ co4niú cons2 co3Å co2pÄ« 3coq 3cor co3re co3rÄ« cot4e3 co5ter 3cou 3cov 2cÅnc cÅn3s2 cÅ3r cÅ3Ä cÅÇ£4u cÅÇ£4v c2Åb2 cÅcÅ3m4 cÅc5tÄ• cÅÄ«2 cÅÄ«4q cÅÄ«Ì4 cÅÄ­2 cÅ3Ä­t cÅÄ­Ì2 cÅ2m1 cÅmÄ“4d cÅmÄ“4s cÅmÄ“Ì4d cÅmÄ“Ì4s cÅmÄ•2 cÅm3Ä•d cÅmÄ­Ì4 cÅ3Å cÅ3pÄ• cÅ2pÄ« 3cÅr cÅ3rÄ« cÅ4rs cÅ3t4Ä• cÅtÄ•3r 3cÅÌ cÅÌ3g2 cÅÌ3Ä« cÅÌ4m3Ä“ cÅÌ3rÄ­ cób2 cóbo3 có3ea có3eÄ có3em cóg2 có3ie có1Ä« có3l2u có4mes có2m3Ä“ cómi4ta cóm5ita. cóm5i4tÄ cómi6te. cóm5itÄ“ cómi4ti cóm5iti. cóm5i4tÄ« cómi4to cóm5i4tÅ cóm5i6tum 4cónc có4nia có4niu cón3s có2nu cót4e3 2cq cqui4 cquid3 cquí2 cquíd3 c2r2 3cra 3cră cræ2ă crÇ£2ă cre3d4 cre5di cred6it cre5mi cre5mo cre2o cre3r cres3 crÄ“s3 2crÄ•. 2crÄ•q 2crÄ•u 2crÄ•v 2cri3n 2crip cri6spé 2crÄ« 3crÄ«m 3crÄ«Ìm 2crĭă 2crÄ­b crÄ­6spÄ• 2crÄ­Å­ 3crím cros2 3crÅ crÅs2 3crÅ­ 2ct ct3enn cte5re ct3Ä•nn ctÄ•3rÄ• ct3énn c3tr cu3b2 cud2 cuda3 2c1uÄ• cu3ia cu3iá cu3iæ cu3iǽ cu3ii cu3ií cu3io cu3ió cu3ium cu3ius cu3iú cule4i 4culix 4culíx 2culp 3cu2m1 cuma2 cu3men cum3i2 cumÄ«Ì4 cumí2 cumín3 2c3unc 2c3unx c2uo cupe3 cuper4a cuper4Ä“ cu3ré 3cus cus4á cu2s3p c2Å«l c1Å«n 3cÅ«q cÅ«3rÄ“ cÅ«3rÄ• cÅ«3ré cÅ«3rÄ­ 3cÅ«s cÅ«2su 3cÅ«u 3cÅ«v c2Å­ 2cŭăr 2cŭăt cÅ­3b2 2cÅ­Ä“s 2cÅ­Ä•t 2c3Å­2lÄ­ 3cÅ­2m cÅ­m3Ä“ cÅ­mÄ«Ì4 cÅ­m3Ä­ cÅ­mÄ­Ì4 cÅ­mÄ­Ìn5 2cÅ­Å cÅ­pÄ•5rÄ• 3cÅ­2s 2cÅ­Å­n cÅ­Ì3b cÅ­Ìm3Ä­ 3cÅ­Ìs cúb2 cú3ia cú3io cú3ium cú3ius 2cúlp 3cúm cú2ma cú2m3i2 2c3únc 2c3únx 3cús 2cv 2c2x2 cy4gn cype3 cý4gn 1d d2ab2 d1ac 2d1ad da2dó dad2u dad2Å« dad2ú 3dae d2aeu d2aev 2d1a2g da4g3n d2al da4mab da4mand da4mane da4mans da6mant. d6amante da6mantn da6manto da6mantó da6mantq da6mantu da6mantú da6mantv da4maq da4mat da4mau da4mav da2má 2d3a2me 2d3a2mÄ“ da2mé d2a3mi 3damn 2da2mo 2d3a2mÅ da2mó 2danc da2ni da3ni. da3nib da3nin da3niq da3nis da3niu da3niú da3niv da2p d2a3re da3ri 3darii 3darií 3dario 3darió 3dariu 3dariú da3rí d2aru d2as3 da2x3 3daÍ¡Ìe 2d1Ä2g d2Än d2Är 2d3ÄÌ4g d2ă3b2 d1ăc d1ăd dă3d2Å« d2ăg 2d3ă2mÄ“ 2d3ă2mÄ• 3dămn 2d3ă2mÅ 2d3ă2mÅ 2dănc dă2p dă3ră dăs3 d2ăt d2ÄƒÌ d3ăÌmb 5dăÌmnÄ 5dăÌmnă 5dăÌmnÄ“ 5dăÌmnÄ•m 5dăÌmnÄ•n 5dăÌmnÄ•r 5dăÌmnÄ•t 5dăÌmnÅ 5dăÌmnÅ d3ăÌnÄ­ dăÌ3rÄ“ d3ăÌrg d2á 3dáe dá2g dá4gn 2d3ámb 2dámp 2dámt 4dántr dá2p 2d3árg dás3 2d3áus dá2x dæ2a dæ2ă dæ2á dæ2i d2æu dæ3ue dæ3uÄ• dæ2Å­ d2æ3v dÇ£2a dÇ£2ă d2Ç£u dÇ£3ue dÇ£3uÄ• dÇ£2Å­ d2Ç£3v d2Ç£Ìu d2Ç£Ìv d2ǽu d2ǽv 2dc2 2dd2 dde2s ddÄ“2s d3do dd4or d2eb ded2 de2dÄ de2dÄ“ ded4i ded4o de2dÅ 3dee de3es de3é2r de3és d2ef 2d1eg de3go 3dei de2ia de2iá de4ien de2ii de2ií de4io. de4ioq de4ior de4iou de4iov de4ión de4ióq de4iór de4ióu de4ióv de2it de4ium 3deÄ« 3deí de2ma de2má de4me. de4meb de4mem de4mend de4mene de4mens de6ment. de6mente. de6mentem de6menten de6menteq de6mentes de6menteu de6mentev de6mentém de6mentés de6menti. de6mentia de6mentib de6mentin de6mentiq de6mentis. de6mentisn de6mentisq de6mentisu de6mentisv de6mentiue de6mentium de6mentiúm de6mentiv de6mentía de6mentín de6mentíq de6mentísn de6mentísq de6mentísu de6mentísv de6mentíu de6mentív de6mentn de6mentq de6mentu de6mentú de6mentv de4meq de4mer de4mes de4meu de4mev de2mé d3e4mi. d3e4mim de4mine d3e4miq d3e4mis d3e4mit d3e4miu d3e4miv d3e2mí d2emn de4mo. de4mone de4moq de4mor. de4morn de4morq de4moru de4morv de4mou de4mov de4móne de4móq de4mórn de4mórq de4móru de4mórv de4móu de4móv de4munt de4múnt d2en 3deo depe4 deper5 deperi4 deper7iu deperí4 depé2 depér3 depéri4 2d3ept de1r d2e3r2e dere5x4 de3ré der4i deri5c de3rÄ« der4í de3ríc de1s de4sca de4scá de4sci de4scí de4so de2só 2d3ess des2t 4dest. de4s3ta de4s5tÄ de4s3tá de4s5te de4s3tÄ“ de4s3té desti5t4 de4s3tÄ« destí5t4 4destn de4s3to de4s3tÅ de4s3tó 4destq de4s3tú 4destv de4uÄ• de2ul 2deun deu4ra deu4rá deu4re deu4ré deu4ri. deu4rin deu4riq deu4ris deu4rit deu4riu deu4riv deu4rín deu4ríq deu4rís deu4rít deu4ríu deu4rív de5u4ro. de5u4ron de5u4roq de5u4ror de5u4rou de5u4rov deu4ró de3u4s deu4tan deu4tat deu4tát de5u4tet de3uti deu4ti. deu4tin deu4tiq deu4tiu deu4tiv deu4tín deu4tíq deu4tíu deu4tív de3u4to de3u4tó de3utu de3utú deÅ«4s deÅ«Ì4 deú2 de3únc de3úr deú4s de3úsa de3úsæ de3úsi d2ev de2x dÄ“1 d2Ä“b 2d1Ä“g dÄ“2ia dÄ“2iÄ dÄ“2iá dÄ“2iæ dÄ“2iÇ£ dÄ“2iǽ dÄ“4ien dÄ“2iÄ« dÄ“2iÅ dÄ“2ma dÄ“2mÄ dÄ“2mă dÄ“2má dÄ“4me. dÄ“4mene dÄ“6mente. dÄ“6mentem dÄ“6menten dÄ“6menteq dÄ“6menteu dÄ“6mentev dÄ“6mentÄ“ dÄ“6mentém dÄ“6mentib dÄ“6mentis. dÄ“6mentisn dÄ“6mentisq dÄ“6mentisu dÄ“6mentisv dÄ“6mentium dÄ“6mentiúm dÄ“6mentÄ« dÄ“6mentísn dÄ“6mentísq dÄ“6mentísu dÄ“6mentísv dÄ“6mentu dÄ“6mentú dÄ“4meq dÄ“4mer dÄ“4met dÄ“4meu dÄ“4mev dÄ“2mÄ“ dÄ“4mÄ•. dÄ“4mÄ•nÄ• dÄ“6mÄ•ntÄ“ dÄ“6mÄ•ntÄ•. dÄ“6mÄ•ntÄ•m dÄ“6mÄ•ntÄ•n dÄ“6mÄ•ntÄ•q dÄ“6mÄ•ntÄ•u dÄ“6mÄ•ntÄ•v dÄ“6mÄ•ntÄ•Ìm dÄ“6mÄ•ntÄ« dÄ“6mÄ•ntÄ­b dÄ“6mÄ•ntÄ­s. dÄ“6mÄ•ntÄ­sn dÄ“6mÄ•ntÄ­sq dÄ“6mÄ•ntÄ­su dÄ“6mÄ•ntÄ­sv dÄ“6mÄ•ntÄ­Å­m dÄ“6mÄ•ntÄ­Å­Ìm dÄ“6mÄ•ntÄ­Ìsn dÄ“6mÄ•ntÄ­Ìsq dÄ“6mÄ•ntÄ­Ìsu dÄ“6mÄ•ntÄ­Ìsv dÄ“6mÄ•ntÅ­ dÄ“4mÄ•q dÄ“4mÄ•r dÄ“4mÄ•t dÄ“4mÄ•u dÄ“4mÄ•v dÄ“4mÄ•Ì d3Ä“2mé dÄ“4mim dÄ“4mis d3Ä“4mit d3Ä“2mÄ« dÄ“4mÄ­m dÄ“4mÄ­s d3Ä“4mÄ­t d3Ä“4mÄ­Ì dÄ“2mí dÄ“4mÅ. dÄ“4mÅne dÄ“4mÅnÄ• dÄ“4mÅq dÄ“4mÅu dÄ“4mÅv dÄ“6mÅÌne dÄ“6mÅÌnÄ• dÄ“4mÅÌq dÄ“4mÅÌu dÄ“4mÅÌv dÄ“m4Å« d2Ä“n dÄ“3ne dÄ“pe2 dÄ“per5 dÄ“peri4 dÄ“perÄ«4 dÄ“perÄ«Ì6 dÄ“pÄ•2 dÄ“pÄ•r5 dÄ“pÄ•rÄ«4 dÄ“pÄ•rÄ«Ì6 dÄ“pÄ•rÄ­4 dÄ“pÄ•Ì4 dÄ“pÄ•Ìr5 dÄ“pÄ•ÌrÄ­6 dÄ“pé2 dÄ“pér3 dÄ“péri4 d2Ä“r dÄ“2sÄ d2Ä“u d2Ä“v 2d3Ä“Ìg dÄ“Ì3ic dÄ“Ì3Ä­c dÄ“Ì4ma dÄ“Ì4mÄ dÄ“Ì4mă d3Ä“Ì4me dÄ“Ì4mÄ“ d3Ä“Ì4mÄ• dÄ“Ì4mim dÄ“Ì4mis dÄ“Ì4mit d3Ä“Ì4mÄ« dÄ“Ì4mÄ­m dÄ“Ì4mÄ­s dÄ“Ì4mÄ­t dÄ“Ì4mÅ dÄ“Ì4se dÄ“Ì4sÄ• dÄ“Ì3sp dÄ“Ì5str d2Ä“Ìu d2Ä“Ìv dÄ•5cÄ­m dÄ•d2 dÄ•2dÄ dÄ•4dă dÄ•2dÄ“ dÄ•d4Ä­ dÄ•2dÅ dÄ•2dÅ dÄ•2dÅ­ 3dÄ•Ä• dÄ•3Ä•Ì d2Ä•f 3dÄ•2Ä« dÄ•2Ä­ dÄ•3Ä­n dÄ•3Ä­Ìn dÄ•2Å 2d1Ä•p dÄ•3r4Ä• dÄ•3rÄ« dÄ•3rÅ 4d3Ä•rÅ­n dÄ•s5tÄ• d2Ä•t dÄ•Å«Ì2 2dÄ•Å­ 3dÄ•Å­m 3dÄ•Å­s d2Ä•Ìf d3Ä•Ìmp 2d3Ä•Ìp dÄ•Ì2q dÄ•Ì3rÄ• 3dée dé3es d2éf 2d1ég dé3in dé2ma 2d3é2me d3é4mi. d3é4mim dé4mis d3é4mit dé4mo. dé4mor. 2démp 2d1ép d2ér d3érr dé4sa dé4sn dé3sp dé4sq 2d3éss 4déstn 4déstq 4déstv d2ésu dé4sv dé2x 2df 2dg2 2d1h di2a d2ia. d2iab d2iam d2ian d2iaq d2iar d2ias d2iat d2iau d2iav d2iÄ 2diă d2iá 2d3i2ba 2d3i2bá di2be di2bé 4d3i4bim 4d3i4bis 4d3i4bit di4bím 4d3i4bís 4d3i4bít 2d3i2bo 2d3i2bó d2ibu 4d3i4bun d2ibú 4d3i4bún di3cem di3cen di3ces d2icé di3cém di3cén di3cés di3cib d2i3cu di4c3ue 4d3i4cul d2i3cú 4d3i4cúl d2id d2ieb d2iem d2ien d2ies d2iet d2iÄ“b d2iÄ“m d2iÄ“s d2iÄ“t d2iéb d2iém d2ién d2iés d2iét 2d3i2ga 2d3i2gÄ 2d3i2gá 2digæ 2digÇ£ 2d3i2gǽ 4d3i4ge. 4d3i4gea 4d3i4geÄ 4d3i4geá 4d3i4geb 4d3i4gem 4d5i4gend 4d5i4gene 4d5i4gens 4d5i4gent 4d3i4geo 4d3i4geÅ 4d3i4geó 4d3i4geq 4d3iger 4d5i4ges. 4d5i4gesn 4d5i4gesq 4d5i4gesu 4d5i4gesv 4d3i4get 4d3i4geu 4d3i4gev 2d3i2gÄ“ di2gé 4d3igéb 4d3igém 4d3igén 5digéna 4d3igéq 4d3igér 4d5igésn 4d5igésq 4d5igésu 4d5igésv 4d3igét 4d3igéu 4d3igév di2gi 2d3i2gÄ« di2gí dig5no. di5gnore di5gnori di5gnorí dig5norum dig5norúm di6g5nos. di6g5nosn di6g5nosq di6g5nosu di6g5nosv di6g5noue. di6g5nove. di5g6nóre 2d3i2go 2d3i2gÅ 2d3i2gó 2d3i2gu 2d3i2gú d2iÄ«s 2dim. 2d3i2ma 2d3i2mÄ 2d3i2má 2di2me 2d3i2mÄ“ di2mé 4diméb 4dimém 4dimér 4dimés 4dimét 4d3i4mi. 4d3i4mia 4d3i4miÄ 4d3i4miá 4d3imic 4dimie 4dimiÄ“ 4dimié 4dimii 4d3i4miÄ« 4d3i4mií 4d3i4mim di4mine 4d3i4mio 4d3i4miÅ 4d3i4mió 4d3i4miq 4dimir 4d3imis 4d3imit 4d3i4miu 4d3i4miú 4d3i4miv 2d3i2mÄ« 2dimí di4míe di4mím di4mín di4míq di4míu di4mív 2dimn 2d3i2mo 2d3i2mÅ 2d3i2mó 2dimq 4d3i4mun di3mú 4d3i4mún 2dimv din2Ä din2d d4ine d4inÄ“ d4iné d4ini d4inÄ« d4iní di2nu d4inú d2io. d2ioq d2ior d2iou d2iov d2iÅ 2diÅ d2ió d1ip di2pi di2pÄ« d2ips d2iq dir5emé dir5e4mí di2rÄ“2 dirÄ“Ì4 dir5éme diri4m di5s6cende di5s6cens dispe6r5 disperi6 disperÄ«6 disperÄ«Ì6 disperí6 dispé4r5 di3spi di3spí di5s4ta. di5s4tam di5s4taq di5s4tar di5s4tas di5s4tat di3s4tÄ di3stá dis4tám dis4tán dis4táq dis4tár dis4tás dis4tát di5s4tem di5s6tent. di5s6tentn di5s6tentq di5s6tentue di5s6tentv di5s6tern di5s4tes di5s4tet di3s4tÄ“ di5s4tém di5s6téntn di5s6téntq di5s6téntue di5s6téntv di5s6térn di5s4tés di5s4tét di5stím di5s4to. di5s4ton di5s4toq di5s4tou di5s4tov di3s4tÅ di5s4tón di5s4tóq di5s4tóu di5s4tóv di5s6trar di5s6tras di5s6trat di5s6trau di5s6trav di5s6trÄr di5s6trÄs di5s6trÄt di5s6trÄu di5s6trÄv di5s6trÄÌr di5s6trÄÌs di5s6trÄÌt di5s6trÄÌu di5s6trÄÌv di5s6trár di5s6trás di5s6trát di5s6tráu di5s6tráv di5s4trÄ« d2ite d2ité di4tiÄ 4d3i4tib d4itn d4itq 4d3i4tui 4d3i4tuÄ« 4d3i4tuí di4tuum 4d3i4tuú di4tÅ«s d4itv 4d3i4uia 4diuiÄ 4diuiá 4diuiæ 4diuiÇ£ 4diuiǽ 4d3i4uii 4d3i4uiÄ« 4d3i4uií 4d3i4uio 4d3i4uiÅ 4d3i4uió 2di2uÄ« 4d3i4uía d4ius 2diÅ­ d2iv d3i4via d3i4vii d3i4viÄ« d3i4vií d3i4vio d3i4viÅ d3i4vió 2di2vÄ« d3i4vía di2xu 2d1Ä«2b d2Ä«ne d2Ä«nÄ• dÄ«o4n dīó2 d2Ä«q d2Ä«s. dÄ«s2c d2Ä«sn 2dÄ«so 2dÄ«sÅ 2dÄ«só d2Ä«sq d2Ä«su d2Ä«sv d2Ä«u d2Ä«v dÄ«2xu 2d3Ä«Ì2b d2Ä«Ìn d2Ä«Ìq d2Ä«Ìu d2Ä«Ìv d2Ä­3b dÄ­4cÅ­l d2Ä­Ä“ d2Ä­Ä•n d2Ä­Ä•t d2Ä­Ä•Ì dÄ­2g 2dÄ­ga 2d3Ä­gÄ 2d3Ä­gă 2dÄ­gá 2dÄ­gæ 2dÄ­gÇ£ 2dÄ­gǽ 2d3Ä­gÄ“ 2dÄ­gÄ• d3Ä­gÄ•. d3Ä­gÄ•Ä d3Ä­gĕă d3Ä­gÄ•m 5dÄ­gÄ•na 5dÄ­gÄ•nÄ 5dÄ­gÄ•nă 5dÄ­gÄ•ná 5dÄ­gÄ•næ 5dÄ­gÄ•nÇ£ 5dÄ­gÄ•nǽ d5Ä­gÄ•nd d5Ä­gÄ•nÄ• 5dÄ­gÄ•nÄ« d5Ä­gÄ•nt d3Ä­gÄ•Å d3Ä­gÄ•q d3Ä­gÄ•t d3Ä­gÄ•u d3Ä­gÄ•v d3Ä­gÄ•Ì 5dÄ­gÄ•Ìnă 2d3Ä­gÄ« 2d3Ä­gÅ 2d3Ä­gÅ­ 2d3Ä­2mÄ 2d3Ä­2mă 2d3Ä­2mÄ“ 2d3Ä­2mÄ• 2d3Ä­2mÄ« d3Ä­4mÄ­Ä d3Ä­4mĭă d3Ä­4mÄ­Ä« d3Ä­4mÄ­m d3Ä­4mÄ­Å d3Ä­4mÄ­Å d3Ä­4mÄ­s d3Ä­4mÄ­t d3Ä­4mÄ­Å­ d3Ä­4mÄ­Ì 2d3Ä­2mÅ 2d3Ä­2mÅ dÄ­3mÅ­ 4d3Ä­4mÅ­n dÄ­n2a dÄ­n2Ä dÄ­n2æ dÄ­n2d d4Ä­nÄ“ d4Ä­n2Ä• d4Ä­nÄ« d4Ä­nÄ­ d4Ä­nÅ­ d1Ä­p dÄ­2pÄ« dÄ­2rÄ“2 dÄ­rÄ“Ì4 dÄ­r3Ä• dÄ­2sÄ­ dÄ­spÄ•4r5 dÄ­spÄ•rÄ«6 dÄ­spÄ•rÄ«Ì6 dÄ­s6pÄ•Ìrn dÄ­3s4pÄ­ dÄ­3s4tÄ dÄ­s4tăt dÄ­3s4tÄ“ dÄ­5s6tÄ•nt. dÄ­5s6tÄ•ntn dÄ­5s6tÄ•ntq dÄ­5s6tÄ•ntu dÄ­5s6tÄ•ntv dÄ­5s6tÄ•rn dÄ­5s4tÄ•t dÄ­5s6tÄ•Ìntn dÄ­5s6tÄ•Ìntq dÄ­5s6tÄ•Ìntu dÄ­5s6tÄ•Ìntv dÄ­5s6tÄ•Ìrn dÄ­5s6tÄ•Ìt dÄ­3s4tÅ dÄ­5s6trÄr dÄ­5s6trÄs dÄ­5s6trÄt dÄ­5s6trÄu dÄ­5s6trÄv dÄ­5s6trÄÌr dÄ­5s6trÄÌs dÄ­5s6trÄÌt dÄ­5s6trÄÌu dÄ­5s6trÄÌv dÄ­5s4trÄ« d2Ä­tÄ• dÄ­4tÄ­Ä d3Ä­4tÄ­b 4d3Ä­4tÅ«s 4d3Ä­4tÅ­Ä« 4d3Ä­4tÅ­Å­ 2d1Ä­2u 2d1Ä­2v 4d3Ä­Ì4cÅ­ dÄ­Ì2g 4d3Ä­Ì4gă 4d5Ä­ÌgÄ•Ä 4d5Ä­Ìgĕă 6d5Ä­ÌgÄ•nÄ• 4d5Ä­ÌgÄ•Å 4d5Ä­ÌgÄ•q 4d5Ä­ÌgÄ•t 4d5Ä­ÌgÄ•u 4d5Ä­ÌgÄ•v 4d3Ä­ÌgÅ­ 4d3Ä­Ì4mÄ• 4d5Ä­Ì4mÄ­Ä 4d5Ä­Ì4mĭă 4d5Ä­ÌmÄ­Ä“ 4d5Ä­ÌmÄ­Ä• 4d5Ä­Ì4mÄ­Ä« 4dÄ­ÌmÄ­Ä­ 4d5Ä­Ì4mÄ­m 4d5Ä­Ì4mÄ­Å 4d5Ä­Ì4mÄ­Å 4d5Ä­Ì4mÄ­t 4d5Ä­ÌmÄ­Å­ 4dÄ­Ìnt 4d3Ä­Ìnu 4d3Ä­Ìnv d2Ä­Ìp dÄ­Ì2r3 dÄ­Ì5spÄ­ dÄ­Ì5s4tÄ dÄ­Ì5s4tă dÄ­Ì5s4tÄ“ dÄ­Ì5s4tÄ• dÄ­Ì5s4tÅ dÄ­Ì4tÄ­b 4d3Ä­Ì4tÅ­ 2d3Ä­Ì2u 2d3Ä­Ì2v d1íb 2dí2ba dí2be 4dí4bim 4dí4bis 4dí4bit 2dí2bo 2dí2bu dí4ciÄ dí4cie dí4ciÄ“ d2ícu dí4c3ue 4d3í4cul 2d3í2ga 4d3í4gea 4d3í4geÄ 4d5í4gene 4d3í4geo 4d3í4geÅ 4d3í4geq 4d3í4get 4d3í4geu 4d3í4gev dí4gia dí4gib dí4giu dí4g3n 2d3í2gu 2d3í2me 4d3í4mia 4d3í4miÄ 4d3í4mie 4d3í4miÄ“ 4d3í4mii 4d3í4miÄ« 4d3í4mim 4d3í4mio 4d3í4miÅ 4d3í4mit 4d3í4miu 2dímn 2dímq 2dímv d2ín d3íns 2dínt d3ínte dí4nue 2d3ínv d2íq dí4r3i4m dí3spi dí3s4ta dí3s4tÄ dí3s4te dí3s4tÄ“ dí3s4to dí3s4tÅ 4d3í4tib 4d3í4tui 4d3ítuÄ« dí3tur 4d3ítuu d2íu 4d3í4uia 4díuiÄ 4díuiæ 4díuiÇ£ 4d3í4uii 4d3í4uiÄ« d2ív 4d3í4via 4díviÄ 4díviæ 4díviÇ£ 4d3í4vii 4d3í4viÄ« dí2xu 2dj 2dl2 d3lu 2d1m 2d1n2 d3ne d3nÄ• dnéx2 dob3r dob2Å« d2oc doco2 doc5te do1e2 4d3olem 4d5oles. 4d5olesn 4d5olesq 4d5olesu 4d5olesv 4d5olÄ“s. 4d5olÄ“sn 4d5olÄ“sq 4d5olÄ“su 4d5olÄ“sv 6d5olÄ“Ìsn 6d5olÄ“Ìsq 6d5olÄ“Ìsu 6d5olÄ“Ìsv 4d3olém 4d5olésn 4d5olésq 4d5olésu 4d5olésv do4lib dol4u domi3 d2on 3don. do3ne do3ni d1op do2pé 2d3ord d4ori. d4orin d4oriq do4rit d6oriue. d6orive. d4orÄ«. d4orÄ«n d4orÄ«q d6orÄ«ue. d6orÄ«ve. d4orÄ«Ìn d4orÄ«Ìq d6orÄ«Ìue. d6orÄ«Ìve. d4orín d4oríq d6oríue. d6oríve. 2d3o4rn do4rq do4rv d2os dos2p do3u do3v 3dÅc d2Ån 3dÅn. d2Ås 4dÅÌrd 4dÅÌrn dÅb2Å« d2Åc dÅc5tÄ• 4d5ÅlÄ“s. 4d5ÅlÄ“sn 4d5ÅlÄ“sq 4d5ÅlÄ“su 4d5ÅlÄ“sv 6d5ÅlÄ“Ìsn 6d5ÅlÄ“Ìsq 6d5ÅlÄ“Ìsu 6d5ÅlÄ“Ìsv 4d3Å4lÄ•m 4d5Å4lÄ•Ìm dÅ4lÄ­b dÅ4lÄ­s dÅ4lÄ­Å­ dÅ3mÄ­3 d2Ån d1Åp dÅ2r dÅ3ră d2Å3rÄ• d4ÅrÄ«. d4ÅrÄ«n d4ÅrÄ«q d3ÅrÄ«s d6ÅrÄ«uÄ•. d6ÅrÄ«vÄ•. d4ÅrÄ«Ìn d4ÅrÄ«Ìq d6ÅrÄ«ÌuÄ•. d6ÅrÄ«ÌvÄ•. d3ÅrÄ­t dÅs2p 4d3ÅÌlÄ­ dÅÌ4lÄ­b dÅÌ4lÄ­Å­ d4ÅÌrÄ• dÅÌ4rÄ­Å­ dób3 d2óc dól2 2d3óli dó2pe dó1r 2d3órd dó4riÄ dó4rie dó4riÄ“ dó4rio dó4riÅ dó4riu d2órn 4dórna 4dórnem 4dórnen 4dórner 4dórnes 4dórnet 4dórno d2ós dós2p dó2xu 2dp 2dq d3qu dqui4 dquid3 dquí2 dquíd3 dr2 d2ra d2rÄ d2ră d2rá d2ræ d2rÇ£ d2rǽ d3rex2 dre5xi dri3e dri3é dri5re5 d2rĭă drÄ­3Ä• d2rÄ­Ä« d2rÄ­Å d2rÄ­Å­ d2rÅ d3rÅg d2ró d2ru d2rÅ­ dr4Å­n dr4Å­Ì d2rú 2d1s2 d2ua d2uá dub2 4d3u4cul 4d3u4cúl 2d3ueb 2d3uem 2d3uen 2d3ues 2d3uet d1uÄ“ 2d3uÄ• d1ué 2d3uím d4ulæ d4ulǽ d4uli d4ulí d4ulu d4ulú du2m 2d3ume 2d3umé du2n d3unc d3und du3ni du3ní d2uo dupe3 duper4 du3r2u d4us. d4usn du3s4tr d4usu d4usv d1ut 2du2ta 2du2tá 2du2tæ 2du2tǽ 2du2te du2té 4du4ti. 4du4tib 4dutil 4du4tin 4du4tiq 4du4tis 4du4tiu 4du4tiv 2du2tí 2du2to 2du2tó 2du2tu 2du2tú 2d1u2u 2d1u2v d2ux du2xu 4d3Å«4cul 4d3Å«4cÅ­l 4d5Å«4cÅ­Ìl 4d3Å«4cúl 2d1Å«2m dÅ«2n dÅ«n4e dÅ«n4Ä• dÅ«3nÄ« 2d1Å«2t 3dÅ«tia 3dÅ«tiÄ 3dÅ«tiá 3dÅ«tiæ 3dÅ«tiÇ£ 3dÅ«tiǽ 3dÅ«tiÄ« 3dÅ«tÄ­a 3dÅ«tÄ­Ä 3dÅ«tĭá 3dÅ«tĭæ 3dÅ«tÄ­Ç£ 3dÅ«tĭǽ 3dÅ«tÄ­Ä« 4d5Å«Ì4cul 4d5Å«Ì4cÅ­l 2d3Å«Ì2t 5dÅ«Ìtia 5dÅ«ÌtiÄ 5dÅ«Ìtiæ 5dÅ«ÌtiÇ£ 5dÅ«ÌtiÄ« 5dÅ«ÌtÄ­a 5dÅ«ÌtÄ­Ä 5dÅ«Ìtĭæ 5dÅ«ÌtÄ­Ç£ dÅ«Ì4tÄ­b 5dÅ«ÌtÄ­Ä« d2ŭă dÅ­b2 d1Å­Ä“ 2d3Å­Ä•n 2d3Å­Ä•t 2d3Å­Ä•Ì 3dÅ­Ä« 3dÅ­Ä­ 4dÅ­Ä­s. d4Å­nt dÅ­pÄ•3r dÅ­3str 2d1Å­2u 2d1Å­2v d2Å­x dÅ­Ì3b d2Å­Ìm d3Å­Ìnc d3Å­Ìnd dÅ­Ì5str 2dÅ­Ìu 2dÅ­Ìv dúb2 4d3ú4cul dú2lo d2úm d3úmb dú2na 2d3únc 2d3únd dú3s4tr 2d1ú2t 3dútia 3dútiæ 3dútii 2d1ú2u 2d1ú2v dú2xu 2dv d3ve d3vÄ• 2d2x2 d2y d2ý 2ea. eab2 e2ace ea2cu ea2cú ead2 2e2ae e2ami e2an 2eane 2e2a3q e2ar 2earú e2as ea3tr 2eau 2eav 2eaÍž e2aÍže e2aÍžÌ e3aÍžÌu 2eaÍ¡ e2aÍ¡e e2aÍ¡Ì e3aÍ¡Ìu e2Ä 2eÄ. 2eÄn 2eÄq 2eÄru 2eÄrú 2eÄu 2eÄv 2eÄÌn 2eÄÌq 2eÄÌu 2eÄÌv e1ă e2ăcÄ• eă2cÅ­ e2ăn e2ăq e2ău e2ăv e2ăÌm e3ăÌmb e2á eá2cu 2eáe e3ál e3ámb 2eáne eá2nu 2eáq 2eáu e3áud 2eáv 2e2æ eæ2a eæ2á eæ2i 2e2Ç£ eÇ£2a 2e2ǽ eb2 eba3q ebæ3 ebe3d ebe3ia ebe3iá ebe3iæ ebe3iǽ ebe3ie ebe3ié ebe3io ebe3ió ebe3iú ebé3io e3bi ebÄ«3u ebÄ«3v eb4ri ebs3 e2bul e3bÅ­ 2ec e4c3enn ecen3s ecÄ“n3s e4c3énn e5cént ec3le ec3lÄ“ ec3o2p ec3ue. ecu3ma ecu3mÄ ecu3má ecu3me ecu3m4i ecumi5q ecu3m4Ä« ecumÄ«Ì5n ecumÄ«Ì5q ecumÄ«Ì5u ecumÄ«Ì5v ecu3m4í ecumí5q ecumí5u ecumí5v 2ed. ed1a e3da. ed2ae ed5ama e3dane e3d2a3q e5dari. e5darin e5dariq e5dariv e5darín e5daríq e5daríu e5darív e5darum e3darú e3daue e3dav e3d4aÍ¡e ed4aÍ¡Ìe ed3ÄÌc e2d3ác e4d3áni ede2g e2dem ed3eme ed3emé e3deÅ e3deó ede2s3 ede6ste e3deú edÄ“2g ed3Ä“mÄ“ edÄ“2s edÄ“Ì4g edÄ•3r edé2g e2diÇ£ e2d3i2g ed3ime ed3imé edi4mis edi4mit ed3i4mí e2d3in e2di2p edi4s3 edis5c edi6sce edis7cen ed4it. ed5i4taÍž e4d3i4tÇ£ edi4tiÅ e4d3i4tÄ« ed5i4tÅr ed5i4tÅs e4d3i4tÅ« edi5ue. edi5ve. edÄ«5ue. edÄ«5ve. e2d3í2g e4d3ínu ed5í4tiÅ e2d3o2l e2do2p e2dÅr e2d3ó2l e2d3óp ed2r ed3ue. e2d3ul e2dun edu3no edu3nó ed2Å« edÅ«3n e3d2Å­ ed4Å­Ä• ed3úlc 2e1e2 e2el e2em ee3mi ee3mu ee3mú e2en e2e3q ee4ra ee3re ee4ro ee4rÅ ee3ti ee3tí e2ev eex3 2e2Ä“ eÄ“n3 e1Ä•2 e2Ä•Å e2Ä•3q eÄ•4rÅ e2Ä•Å­ eÄ•Ì2 2eé e2éq eé2ru 2efe 2efé 2efi 2efí 2e3g2a e3g2æ3 e3ge. e3gen e3geq e3geu e3gev 2egm eg3no e2go e3go. e3gon e3goq e3gor e3gou e3gov e2gÅ e3gÅ. e3gÅn e3gÅq e3gÅu e3gÅv e3gÅÌn e3gÅÌq e3gÅÌu e3gÅÌv e2gót egu6ste e1h 2e1i ei2a e2iaÍ¡ e3iát e2iæ e2iÇ£ e2iǽ ei2b e3i2ce ei2cé ei2ci ei2cí ei2cu ei2cú e2id ei2i ei2m ei2n e2i3na e2i3ni e2i3nÄ« e2i3ní e2i3nú ei2o eio2s e2i3q ei2r e2is e3ist ei2t ei3ta ei3tÄ ei3tá eite3 e4i3ue e2iué e2iui e2iuí e3iur e2i3v 2eÄ« e1Ä«2b e1Ä«2m e2Ä«q e1Ä«2r e2Ä«s e3Ä«ss e3Ä«st e1Ä«2t e2Ä«u e2Ä«v e2Ä«Ì e3Ä«Ì2b e3Ä«Ì2m e3Ä«Ì2r e3Ä«Ì2t e1Ä­2 eÄ­Ì2 2eí e1í2b e1í2c e2íe e3íer e1íi e1í2m e3ínc e3índ e2íq e1í2r e3íst eí2te eí2to e2íu e2ív e3la. e3lae e3lam e3lan e3laq e3lar e3las e3lau e3lav e3laÍ¡ e3láe e3lám e3lán e3láq e3lár e3lás e3láu e3láv 2e3læ 2e3lǽ 4e3le. e2leg ele2i 4e3len 4e3leq 4e3les elÄ“2 3e2léc e3lis eli6sta e3lís 2ell e2l3ue el3uÄ“ el3ué el4ui e2l3u2t e1m 2em. em2am e4mani e4maní e2m3a2x e4m3áni e2m3áx e5mem. e5memn e5memq e5memv em2eq eme4s e4m3esa e4m3esá e4mesæ e4mesǽ e4m3ese e4m3esé e4m3esi e4m3esí 4emete 4emeté 2e3mÄ“t e5mémn e5mémq e5mémv emé4s e4mésa e4m3ése e4m3ési em2i emi3ac emi3án emi3es 4emini 4eminí e5mité emi3u 2emne 1emp em3pn 2emq 1emt 2emu em2uÄ“ em2ué e2muÄ« e5mul. em3ulc 2emú e2m3úl 2emv en2a en4an ena3ni ena3ní 5e4narib en2Ä ená3ni 5e4nárib 2en3d2 end4u end4ú 2ene en3eat en3eát en2e2x e3nÄ•1 eni3tu ení5tuÄ« en2o eno3b2 en2Å en2sc en3s2i ensi5ti en4sn en4sq ens3t ens4ué en4sv 2ent ente5re e1n2u e1oc eo2g3n e2on eo3ni eo3p2 eo5rÄÌ eo3rá e3ors 2eorú 2e2os e2Ån 2eÅr 2e2Ås 2eÅÌr 2eÅÌs e2Å e2ó eó2g eó2nu eó3p2 e3órs 2eós eper4Ä“ eperi4b eperi4r eper4Ä« eperí4r epÄ•3r epÄ•5rÄ­ e3pé epére5r 3e4pisc epi5s4tr 3e4písc epo4ter epote6ri epote6rí epo4tes epÅ4tÄ•s 2eps ep4se. ep4sen ep4seq ep4seu ep4sev ep2su 4e3que 2er. 2e3ra. e3raba e3rabá e3rabe e3rabé e5rabil e5rabim e5rabis e5rabit e3rabí e3rabo e3rabó e5rabunt e5rabúnt era2c er3act era2d3 eradi4 eradí4 e3rae. e3raea e3raeÄ e3raeá e3raei e3raeÄ« e3raeí e3raen er3aes e3raeu e3raev era2g er5ama e3rame e3ramé e5ramin e5ramur e5ramúr e3rand 4e5rane e3rané e3rans e5rante e5rantÄ“ e5ranté e5ranto e5rantÅ e5rantó e5rantú era2p 2e3raq e3rar. e5rare. e5rareq e5rareu e5rarev e5rari. e5raria e5rariá e5rariæ e5rariǽ e5rarie e5rarié e5rarii e5rarií e5rarim e5rarin e5rario e5rarió e5rariq e5raris e5rarit e5rariu e5rariú e5rariv e3rarí e3rarn e3rarq e5r6arum e5rarun e5r6arúm e5rarún e3rarv e3rass e5rasti. e5rastin e5rastiq e5rastis e5rastiu e5rastiv e5rastín e5rastíq e5rastís e5rastíu e5rastív eras4to eras4tÅ eras4tó e3rata e3ratá e3ratæ e3ratǽ e3rate e3rato e3rató e3ratr e3ratu e3ratú 2erau e3raue e3raué e3raui e3rauí 2e3rav e5raÍže. e5raÍžea e5raÍžeÄ e5raÍžeá e5raÍžeÄ« e5raÍžen e5raÍžeu e5raÍžev e5raÍžÌea e5raÍžÌeÄ e5raÍžÌeÄ« e5raÍ¡e. e5raÍ¡ea e5raÍ¡eÄ e5raÍ¡eá e5raÍ¡ei e5raÍ¡eÄ« e5raÍ¡eí e5raÍ¡en e5raÍ¡eu e5raÍ¡ev e5raÍ¡Ìea e5raÍ¡ÌeÄ e5raÍ¡Ìei e5raÍ¡ÌeÄ« e5raÍ¡Ìen e5raÍ¡Ìeu e5raÍ¡Ìev e3r2ă er3áct e2r3ád er3áes e2r3á2g er3áll e4r3ámb er3á4pe er5ás4te er5ás4to er5ás4tÅ er3áud er1æ2 e3ræ. e3ræa e3rÃ¦Ä e3ræá e3rææ e3ræǽ e3ræi e3ræī e3ræí e3ræn e3ræu e3ræv er1Ç£2 e3rÇ£. e3rÇ£a e3rÇ£Ä e3rǣá e3rǣǣ e3rǣī e3rÇ£n e3rÇ£u e3rÇ£v e3rÇ£Ìa e3rÇ£ÌÄ e3rÇ£ÌÇ£ e3rÇ£ÌÄ« e3rÇ£Ìn er3Ç£Ìs e3rÇ£Ìu e3rÇ£Ìv er3ǽs e1re 2e3re. 2erea 2ereá 2e3reæ 2e3reǽ ere4d4 ered6it 2e3ree 2e3reé ere2g 2e3re2i 2e3reí ere2l e3rem. e4r3e4ma er3e4mÄ e4r3e4má er3e4me er3e4mÄ“ er3e4mé er5e4mim e5remini e5reminí er5e4mis e4r5e4mit er3e4mÄ« ere4mím ere4mín ere4mít ere4mo. ere4moq ere4mou ere4mov ere4mÅ. ere4mÅq ere4mÅu ere4mÅv ere4móq ere4mór ere4móu ere4móv e3remq e3remu e4r5e4mun e3remú er5e4mún e3remv 2eren ere4na e3rend e3rene e3rent 2ere2o 2ereó 2ereq e5reque e3rer. er3era er3erÄ er3erá e3rere e3rerí e3rern er3ero er3erÅ er3eró e3rerq e5rerue er3erú e3rerv e3res. e3resn e3resq er3ess eres3t ere4su ere4sú e3resv e3ret 2ereu e3reue 2ereú 2erev e3reve 2erÄ“ e2rÄ“2d erÄ“2g erÄ“2i e5rÄ“minÄ« e5rÄ“mu e5rÄ“mú e5rÄ“ne e5rÄ“re e5rÄ“ri e5rÄ“rí e5rÄ“ue e5rÄ“ve erÄ“Ì4d e4rÄ“Ì4g e5rÄ“ÌminÄ« e5rÄ“Ìmu er5Ä“Ìna e5rÄ“Ìne e5rÄ“Ìq e5rÄ“Ìre e5rÄ“Ìri e5rÄ“Ìt e5rÄ“Ìue e5rÄ“Ìve e1rÄ• erÄ•2s3 2eré 3eréc eré2d e2ré2g eré4mer er5é4mim eré6miti eré6mito eré6mitÅ eré6mitu e4r3éna er3éss e2réx 2e3ri. e3ria. e3riae e3riam e3rian e3riaq e3riar e3rias e3riat e3riau e3riav e3riaÍž e3riaÍ¡ e3riÄ er3iác e3riáe e3riám e3rián e3riáq e3riár e3riás e3riát e3riáu e3riáv e3riæ e3riÇ£ e3riǽ 2erib er3i4ba er3i4bá er3i4be er3i4bé er3i4bi er3i4bí eri4bo. eri4bon eri4boq eri4bor eri4bou eri4bov er3i4bó eri6bunt eri6búnt eri4cer er5i4cér er3i4ci e3ricu e3ricú e3ride e3ridÄ“ e3ridé e3ridi e3ridÄ« e3ridí eri4dÅ eri4dó e3ridu e3ridú 2erie e3rie. e3rieb e3riem e3rien e3rieq er3ier e3ries e3riet e3rieu e3riev e3riÄ“. e3riÄ“b e3riÄ“m er6iÄ“ne e3riÄ“q er3iÄ“r e5riÄ“ri e5riÄ“rí e3riÄ“s e3riÄ“t e3riÄ“u e3riÄ“v e5riÄ“Ìb e5riÄ“Ìm e5riÄ“Ìri e5riÄ“Ìs e5riÄ“Ìt 2erié e3riéb e3riém e5riénd e5riént e3riéq er3iér e5riéris e3riés e3riét e3riéu e3riév er3iim er3iis e5riis. e5riisn e5riisq e5riisu e5riisv er3iit e3riÄ«s e5riÄ«Ìs e5riísn e5riísq er5iíss er5iíst e5riísu e5riísv er3iít er3i4ma er3i4mÄ er3i4má eri4me. eri4meb eri4mem eri4men eri4meq eri4mer eri4mes eri6met. eri6meti eri6metí eri6metn eri6metq eri6metu eri6metú eri6metv eri4meu eri4mev eri4mÄ“b eri4mÄ“m eri4mÄ“n eri4mÄ“r eri4mÄ“s eri4mÄ“t eri6mÄ“Ìb eri6mÄ“Ìm eri6mÄ“Ìn eri6mÄ“Ìr eri6mÄ“Ìs eri6mÄ“Ìt eri4mé er5i4mi. er5i4mim e6r5i6mine e5riminÄ« er5i4miq er5i4mis er5i4mit er5i4miu er5i4miv er3i4mÄ« er3i4mí eri4mo. eri4moq eri4mor eri4mou eri4mov eri4mÅ. eri4mÅq eri4mÅu eri4mÅv eri4móq eri4mór eri4móu eri4móv e5rimue er5i4mun er5i4mún 2erin e3rio e3riÅ e3rió e3rip 2e3riq er3ire er3iré er3iri er3irí eri6sne eri6squ eri6sue eri6sve e3rité er5itib eri6tne e5ritÅt e5ritÅÌt eri6tqu eri6tue er5itui er5ituÄ« er5ituí er5ituú eri6tve 2eriu er6iue. er3iué er3iui er3iuí e5rium. e5riumn e5riumq e5riumu e5riumv er3iun e5riunt e3rius e3riúm er3iún e5riúnt e3riús 2eriv er3ivé er3ivi er3iví e3riz 2e1rÄ« erÄ«3Ä er3Ä«2b e2rÄ«n er3Ä«r er3Ä«ss er3Ä«st er3Ä«Ì4b er3Ä«Ìr er3í2b er3í4ci er3íer e2r3íi e4rí4men e4rí4meq erí4mer e4rí4meu e4rí4mev er5í4mim e5ríminÄ« er5í4mit 2erín e4ríng 2eríq er3ír e4r5í4tib erí6tio. e4r5í4tui e4r5ítuÄ« e4r5ítuu 2eríu er3íui 2erív er3ívi 2ern ero2b erod4 erodi5ue erodi5v e3ron ero4pu e3ror. ero4re ero4ré e3rorq e3roru e3rorú e3rorv er3o4sc ero4s3t 3erot e3rÅq erÅ4re erÅ4rÄ“ erÅ4ré erÅ4rÅ e3rÅru e3rÅrú er3Åsc 3erÅt erÅÌ4re erÅÌ4rÄ“ e5rÅÌru er5ÅÌsc 3erÅÌt e1rÅ e2rób e4ró4re er3ó4sc 3erót 2erq er5rue e2r3ua e2r3uÄ e2r3uá 2erue er5ue. e4r3uen e4r3ueq e4r3ueu er3uÄ“m er3uÄ“n er3uÄ“s er3uÄ“t er3uém er3uén er3ués er3uét e3rug er3uÄ«s er3uía 2eru2m3 er3unc er3und e5runto e5runtÅ e5runtó e5runtú e2r3uo e2r3uÅ e2r3uó er3ur er3uss er3ust eru4su er5usur er3u4sú e2r3u2t e2r3uu e2r3uú e3rÅ«g erÅ«2r erÅ«Ì4r e1rÅ­ 2erúm er3únc e4rúnd erú2r e2r3út 2erv e1ry e1rý 2es. 1e2sæ 1e2sǽ e3s2că es3cæ es4cid e3s2cÄ« e3s2cÄ­ es4cíd es2cr e2scÅ­ es2e ese2i 3eséq 3esév e3s2i 2esn e1s2p espe5r4i espe5r4Ä« esper4í e2sph 2esq 4essat 4essát 3est. es4tÄn e3s2tă e2s3tæ e2s3tÇ£ e2s3tǽ es3te. es3teq es4ter es3teu es3tev e3s2tÄ• e4s5tim e4stÄ­b e3s4tÄ­n e3stÄ­t es4tÄ­Ìt 3es4tn es4tol 3estot es4tól 3estót 3es4tq e4strÄ es4tră es3tre es3trÄ“ es3tré es4tru es4trÅ« e3s4trÅ­ e4stry e2stu e2stÅ­ 3es4tv es3ue. e2suÄ• es2ué e2s3ui 2esv 2et e3ta eta3g et3eni ete5ram ete5ran ete5rar ete6reri ete6reru ete4r5ie eter5iÄ“ eter5ié eter5iÄ« eteri6mini eteri6miní eter5i6ta eter5i6tÄ eter5i6tá eteri6te. eteri6ten eteri6teq eteri6teu eteri6tev eteri6to. eteri6ton eteri6toq eteri6tot eteri6tou eteri6tov eteri6tÅ. eteri6tÅn eteri6tÅq eteri6tÅu eteri6tÅv eteri6tÅÌn eteri6tÅÌq eteri6tÅÌu eteri6tÅÌv eteri6tón eteri6tóq eteri6tót eteri6tóu eteri6tóv ete4rÄ«s eterÄ«Ì6u eterÄ«Ì6v ete4ríe ete6rí6mini ete6rí6te ete3ro ete3rÅ ete5run etÄ•4r3Ä«4 etÄ•rÄ«Ì4 etÄ•4rÄ­Ä“ etÄ•4r5Ä­Ä« etÄ•4rÄ­t etÄ•r5Ä­6tÄ etÄ•rÄ­6tÄ• etÄ•5rÄ­tÄ­ etÄ•rÄ­6tÅ. etÄ•rÄ­6tÅn etÄ•rÄ­6tÅq etÄ•rÄ­6tÅu etÄ•rÄ­6tÅv etÄ•rÄ­6tÅÌn etÄ•rÄ­6tÅÌq etÄ•rÄ­6tÅÌu etÄ•rÄ­6tÅÌv etÄ•rÄ­Ì4 etÄ•6rÄ­ÌÄ• etÄ•6rÄ­Ìt etÄ•3rÅ­ etÄ•Ì6rÄ•6rÄ­ etÄ•Ì4rÄ« etÄ•Ì6r5Ä­Ä« etÄ•Ì6r5Ä­t. etÄ•Ì6r5Ä­6tÄ etÄ•Ì6rÄ­6tÄ• etÄ•Ì6rÄ­6tÅ eté6re6ri eté4rie eté4riÄ“ eté4r5iÄ« eté6r5it. eté6r5ita eté6r5i6tÄ etéri6te. eté6ri6to. eté6ri6tÅ e2t3ip e2t3íp eto2i etó2i e3tr etra3s 3ets e4tue. e2tuÄ« e3tur e3tú 3etvi e1u 2eu. eua6ste e4uasv e4uÄsv e2uÇ£Ì e2uǽ e2u3b2 eu2dă eu4dis eu2dÄ« 2e3ue e3uÄ• e4uÄ«sv 2eum eu3ma 1eun e2und 2e2une e2uni e2uní e2uno e2unó euol5ue euol5ué euol5ui euol5uí 2euq eu4rat eu4rár eu4rát eu4reb eu4rem eu4ren eu4rer eu4réb eu4rém eu4rén eu4rér eu4rim eu4rím eu4rún 2eus e4us. e4usn e4usq eu2su e4usv 2e2ut eu4tami eu4tamú eu4tare eu4tari eu4tarí eu4támi eu4tánt eu4táre eu4tári e3u4tem e3u4ten e5u4tere e5u4teré eu6teris eu6terís e3u4tém e3u4tén e5u4tére e5u6téris e3u4tét eu4tim eu4tit e3u4tím eutru4 eu4tun eu4tún 2euu 2e2uv e2ux e1Å«2 e2Å«3m e2Å«Ìm eÅ«Ì2r eÅ«Ì2t e1Å­ e2Å­s e3Å­t e2Å­Ì e3Å­Ìmb e2ú e3úl 2eúm e3úmb 1eún e3úng e3únx eú2r 2eús e3úse e3úso e3úss e3úst e3úsu. e3úsum e3úsus e3ú2t eútru4 eva6ste 2e3ve e3vÄ• ex2ă e2x3ea e2x3eÄ e2x3eá e2x3eo e2x3eÅ e2x3eó ex3e2q e2xeu e2x3eú e2xib e2xiÄ“ e2xié exin3 e2x3íe exÅ2 e3xÅÌ exÅÌ4ra exÅÌ4rÄ exÅÌ4re exÅÌ4rÄ“ exÅÌ4rÅ exó4ra exó4re exó4ri exó4ro ex5ter 2e2Íž 2e2Í¡ 2Ä“2a Ä“ad2 Ä“a2m 2Ä“2Ä Ä“Ä2nu 2Ä“2ă ēă3d2 ēăÌ3d 2Ä“2á 2Ä“2æ 2Ä“2Ç£ 2Ä“2ǽ Ä“b2 Ä“ba2 Ä“ba3q Ä“bá2 Ä“bæ3 Ä“be3i Ä“bÄ«3u Ä“bÄ«3v Ä“bo2 1Ä“br Ä“bs3 Ä“bu2 Ä“2bul 3Ä“2bÅ­l Ä“4bÅ­Ìl Ä“2búl Ä“ce1 Ä“2ch Ä“d2 Ä“da2r Ä“dá2 Ä“dÄ“2s Ä“di3m Ä“d4it. Ä“d4itu Ä“d4Ä­t. Ä“d4Ä­tn Ä“d4Ä­tq Ä“d4Ä­tu Ä“d4Ä­tv Ä“3do Ä“d4or Ä“d3ue Ä“3dÅ­ 2Ä“2e 2Ä“2Ä“ 2Ä“2Ä• Ä“3g2a Ä“ga2r Ä“3g2æ3 Ä“3g2Ç£ Ä“3ge. Ä“3gen Ä“3geq Ä“3geu Ä“3gev Ä“3gÄ•. Ä“3gÄ•n Ä“3gÄ•q Ä“3gÄ•u Ä“3gÄ•v Ä“2g3n Ä“go2 1Ä“gr Ä“gu6ste Ä“gÅ­6stÄ• 2Ä“1i2 Ä“2ia. Ä“2iaq Ä“ia2r Ä“2iau Ä“2iav Ä“3ic Ä“2id Ä“4iÄ“Ìne Ä“6iÄ“Ìque Ä“4iÄ“Ìue Ä“4iÄ“Ìve Ä“2i3p Ä“2ir Ä“2is Ä“2ium Ä“3iÅ­ 2Ä“2Ä« 2Ä“Ä­2 Ä“1Ä­c Ä“2Ä­Ä“ Ä“2Ä­Ä• Ä“2Ä­3p Ä“3Ä­Ì2c Ä“2Ä­ÌÄ• Ä“2Ä­Ìp Ä“1í2c Ä“2íe 2Ä“j Ä“ja2r Ä“2lab Ä“3lÄ. Ä“3lÄn Ä“3lÄq Ä“3lÄr Ä“3lÄs Ä“3lÄu Ä“3lÄv Ä“3lÄÌn Ä“3lÄÌq Ä“3lÄÌr Ä“3lÄÌs Ä“3lÄÌu Ä“3lÄÌv Ä“3lă. Ä“3lăm Ä“3lăn Ä“3lăq Ä“3lău Ä“3lăv Ä“3lÄƒÌ 2Ä“3lá 2Ä“3læ 2Ä“3lÇ£ 2Ä“3lǽ Ä“2leg Ä“le2r Ä“lÄ“2i Ä“3lÄ•Ä« Ä“3lÄ•Å Ä“3lÄ•Å­ Ä“lé2 Ä“li2n 2Ä“3lÄ« Ä“lí2n 2Ä“ll Ä“l2u Ä“2l3ue Ä“1m Ä“4mani Ä“4maní Ä“ma2r Ä“măÌ2 Ä“4m3áni 1Ä“m2e Ä“3me. Ä“3mem Ä“4mend Ä“4ment. Ä“6mentia Ä“6mentía Ä“4mentn Ä“4mentq Ä“4mentv Ä“3meq Ä“2m3es Ä“3meu Ä“3mev 3Ä“2mÄ“r Ä“mÄ“2s Ä“4m3Ä“se Ä“4m3Ä“sÄ“ Ä“4m3Ä“sÄ• Ä“4m3Ä“sÄ« 3Ä“4mÄ“Ìr Ä“mÄ“Ì4s Ä“4m5Ä“Ìse Ä“4mÄ“ÌsÄ“ Ä“4m5Ä“ÌsÄ• Ä“4m5Ä“ÌsÄ« 1Ä“mÄ• Ä“3mÄ•. Ä“3mÄ•m Ä“4mÄ•nd Ä“4mÄ•nt. Ä“6mÄ•ntĭă Ä“6mÄ•ntÄ­Ìă Ä“4mÄ•ntn Ä“4mÄ•ntq Ä“4mÄ•ntu Ä“4mÄ•ntv Ä“3mÄ•q Ä“2m3Ä•s Ä“3mÄ•u Ä“3mÄ•v Ä“3mÄ•Ìm Ä“4m3Ä•Ìs Ä“2m3és Ä“m2i1 3Ä“mim 4Ä“minÄ« 3Ä“mis Ä“4miss 3Ä“4mit. 3Ä“4mitn 3Ä“4mitq 3Ä“4mitu 3Ä“4mitv Ä“m2Ä­ 3Ä“mÄ­c Ä“mÄ­3Ä• 3Ä“mÄ­m 3Ä“mÄ­nÄ• 3Ä“mÄ­s Ä“4mÄ­ss 3Ä“4mÄ­t. 3Ä“4mÄ­tn 3Ä“4mÄ­tq 3Ä“4mÄ­tu 3Ä“4mÄ­tv 3Ä“mÄ­Ìn 5Ä“4mÄ­Ìss 5Ä“4mÄ­Ìst 3Ä“mÄ­Ìt 1Ä“mí Ä“4míss Ä“4míst 1Ä“mo Ä“3mo. Ä“3mon Ä“mo4nu Ä“3moq Ä“4mor. Ä“4morn Ä“4morq Ä“4moru Ä“4morv Ä“3mou Ä“3mov 1Ä“mÅ Ä“4mÅr. Ä“4mÅrn Ä“4mÅrq Ä“4mÅru Ä“4mÅrv Ä“4mÅÌrn Ä“4mÅÌrq Ä“4mÅÌru Ä“4mÅÌrv Ä“4mórn Ä“4mórq Ä“4móru Ä“4mórv 1Ä“mp 1Ä“mt 2Ä“mu Ä“2m3ul Ä“2mun Ä“m3Å«Ì 2Ä“mÅ­ Ä“2m3Å­l Ä“2mÅ­n Ä“4m3Å­Ìl Ä“4mÅ­Ìn 2Ä“mú Ä“2m3úl Ä“2mún Ä“2nat Ä“n2Ä Ä“nÄ3nÄ“ Ä“nÄ3nÄ« 5Ä“4nÄrib 5Ä“4nÄrÄ­b 5Ä“6nÄÌrib 5Ä“6nÄÌrÄ­b Ä“3nă. Ä“3năm Ä“3năn Ä“3năq 3Ä“năt Ä“3nău Ä“3năv Ä“3nÄƒÌ 2Ä“ne Ä“2n3ea Ä“2n3eÄ Ä“2n3eá Ä“2n3eÅ Ä“2neu Ä“2neú Ä“2n3Ä•Ä Ä“2n3ĕă Ä“2n3Ä•Å Ä“2nÄ•Å­ Ä“2n3ie Ä“2n3iÄ“ Ä“2n3ié Ä“2n3ii Ä“2n3ií Ä“2n3Ä«2m Ä“2n3Ä«2r Ä“n3Ä«ss Ä“n3Ä«st Ä“2n3Ä«2t Ä“n3Ä«Ì4m Ä“n3Ä«Ì4r Ä“n5Ä«Ìss Ä“n5Ä«Ìst Ä“n3Ä«Ì4t Ä“2n3Ä­Ä“ Ä“2n3Ä­Ä• Ä“2n3Ä­Ä­ Ä“4n3Ä­ÌÄ• Ä“4n3Ä­ÌÄ­ Ä“2n3íe Ä“2n3íi Ä“n2sc Ä“n3si Ä“n4sn Ä“n4sq Ä“ns4ué Ä“n4sv Ä“1n2u Ä“2n3ue Ä“3n4uen Ä“n4ueq Ä“n4ueu Ä“n4uev Ä“n2Å­ Ä“1o Ä“2on Ä“2os 2Ä“2Å Ä“1Å Ä“2Ån Ä“2Ås Ä“2ÅÌ Ä“Ã³2 Ä“pa2 Ä“par3 Ä“pá2 Ä“per4Ä“ Ä“perÄ«4n Ä“perÄ«4q Ä“perÄ«4r Ä“perÄ«4u Ä“perÄ«4v Ä“perÄ«Ì6n Ä“perÄ«Ì6q Ä“perÄ«Ì6r Ä“perÄ«Ì6u Ä“perÄ«Ì6v Ä“perí4 Ä“pÄ•rÄ«4n Ä“pÄ•rÄ«4q Ä“pÄ•rÄ«4r Ä“pÄ•rÄ«4u Ä“pÄ•rÄ«4v Ä“pÄ•rÄ«Ì6n Ä“pÄ•rÄ«Ì6q Ä“pÄ•rÄ«Ì6r Ä“pÄ•rÄ«Ì6u Ä“pÄ•rÄ«Ì6v Ä“pÄ•3rÅ Ä“2ph Ä“po2 2Ä“q Ä“3qu Ä“1r2 Ä“ra3g Ä“3ră Ä“ræ2ă Ä“rÇ£2ă 2Ä“3re Ä“3rÄ“m Ä“3rÄ“s Ä“3rÄ“t Ä“3rÄ“u Ä“3rÄ“v Ä“3rÄ“Ìm Ä“3rÄ“Ìs Ä“3rÄ“Ìt 2Ä“3rÄ• Ä“3ré2 2Ä“rÄ« 2Ä“rí 1Ä“2ro Ä“ro4s3 Ä“rÅ3d4 Ä“rÅ5dÄ« Ä“rÅdÄ«5u Ä“rÅdÄ«5v 1Ä“2rÅ Ä“ró2 Ä“2r3ue 2Ä“run 3Ä“rÅ­d 2Ä“rú 2Ä“s. Ä“2sa. Ä“2sae Ä“2sam Ä“2saq Ä“2sav 1Ä“sÄ 1Ä“să Ä“2să. Ä“2săm Ä“2săq Ä“2său Ä“2săv 1Ä“sá Ä“2sáe Ä“2sám 1Ä“2sæ 1Ä“2sÇ£ 1Ä“2sǽ Ä“2sca Ä“2scă Ä“2scá Ä“s3cæ Ä“s3cÇ£ Ä“2scé Ä“2sci Ä“s3cÄ« Ä“2scÄ­ Ä“2scí Ä“2scu Ä“s4cul Ä“sc3Å« Ä“2scÅ­ Ä“2scú Ä“s2e 3Ä“sÄ“. Ä“sÄ“2i 3Ä“sÄ“n 3Ä“sÄ“q 3Ä“sÄ“v Ä“s2Ä• 2Ä“sé Ä“s2i Ä“si2n 2Ä“sn Ä“2so2 1Ä“2sÅ Ä“2sÅ Ä“2só Ä“s2p Ä“s3po Ä“s3pÅ Ä“s3pó Ä“s3pÅ« 2Ä“sq 3Ä“st. Ä“2ste Ä“s5ter Ä“2stÄ• Ä“s5tÄ•r Ä“s2ti Ä“sti5t4 Ä“s2tÄ­ Ä“s4tíl Ä“stí3t4 3Ä“s4tn 3Ä“2stÅ 3Ä“s4tq Ä“s2tr 3Ä“2stu Ä“s4tue 3Ä“2stÅ­ Ä“2stú 3Ä“s4tv Ä“2s3ue Ä“2s3uÄ• Ä“s3ui 3Ä“sum 3Ä“2sus 1Ä“2sÅ« 1Ä“sÅ­ Ä“2sÅ­s 1Ä“2sú Ä“3sún 2Ä“sv 2Ä“t Ä“3ta Ä“3tă Ä“3te Ä“ter4a Ä“te5re Ä“te3ri Ä“te5rÄ« Ä“terÄ«5u Ä“terÄ«5v Ä“3tÄ• Ä“tÄ•3r4a Ä“tÄ•3rÇ£ Ä“tÄ•3rÄ• Ä“tÄ•5rÄ« Ä“tÄ•rÄ«5u Ä“tÄ•rÄ«5v Ä“tÄ•3rÅ­ Ä“ti4tu Ä“3tÄ« Ä“3to2 Ä“3tÅ Ä“tÅ2i Ä“3tÅ Ä“3tó2 Ä“3tr Ä“1u2 Ä“uÄ6ste Ä“uÄ6stÄ• 2Ä“3ue Ä“3uÄ• Ä“3uÄ«. Ä“3uÄ«n Ä“3uÄ«q Ä“3uÄ«u Ä“3uÄ«Ì Ä“2um 1Ä“uo Ä“uol3u 1Ä“uÅ 2Ä“2Å­ 2Ä“2ú Ä“vÄ6ste Ä“vÄ6stÄ• 2Ä“3ve Ä“3vÄ• Ä“3vÄ«. Ä“3vÄ«n Ä“3vÄ«q Ä“3vÄ«v Ä“3vÄ«Ì 1Ä“vo 1Ä“vÅ Ä“x2 Ä“2x3u Ä“2Ì 2Ä“Ìa 2Ä“ÌÄ 2Ä“Ìă 2Ä“Ìæ 2Ä“ÌÇ£ Ä“Ìb2 Ä“Ì3bu Ä“Ì3bÅ­ 2Ä“Ìe 2Ä“ÌÄ“ 2Ä“ÌÄ• 3Ä“Ìgr Ä“Ì4gre Ä“Ì4grÄ• 2Ä“Ìi Ä“Ìi2c Ä“Ì3iÄ“n Ä“Ì4ir 2Ä“ÌÄ« Ä“ÌÄ­2c 2Ä“Ìj Ä“Ì4loq Ä“Ì4lÅq Ä“Ì1m Ä“Ì4mar Ä“Ì4măr Ä“Ì4mÄ“n Ä“Ì4mic 3Ä“Ìmim 4Ä“ÌminÄ« 5Ä“Ì4mit. 3Ä“Ì4mÄ­c 3Ä“ÌmÄ­m 5Ä“Ì4mÄ­t. Ä“Ì4mor. Ä“Ì4mÅr. 3Ä“Ìmp 3Ä“Ìmt 2Ä“Ìmu Ä“Ì4mÅ­n 2Ä“Ìn Ä“Ì4n3ea Ä“Ì4n3eÄ Ä“Ì4n3eÅ Ä“Ì4n3Ä•Ä Ä“Ì4n3ĕă Ä“Ì4n3Ä•Å Ä“Ì4n3iÄ“ Ä“Ì4n3ii Ä“Ì4n3Ä­Ä“ Ä“Ì4n3Ä­Ä­ 2Ä“ÌÅ 2Ä“Ìq 2Ä“Ìr Ä“Ì3r2ă Ä“Ì3rÄ• 3Ä“Ì4sa 3Ä“Ì2sÄ 3Ä“Ì2să 3Ä“Ì2sæ 3Ä“Ì2sÇ£ 3Ä“ÌsÄ“. 2Ä“Ìsn Ä“Ì2so 3Ä“Ì2sÅ Ä“Ì2sÅ 2Ä“Ìsq Ä“Ì5s4tÄ­n 3Ä“Ìstn 3Ä“ÌstÅ 3Ä“Ìstq Ä“Ìs4trÅ­ 3Ä“Ìstu 3Ä“ÌstÅ­ 3Ä“Ìstv Ä“Ì2su 3Ä“Ìsum 3Ä“Ìsus 3Ä“ÌsÅ« Ä“Ì4sÅ«. Ä“Ì3sÅ«s 3Ä“ÌsÅ­ Ä“Ì4sÅ­s 2Ä“Ìsv 2Ä“Ìt 2Ä“Ìue 2Ä“ÌÅ­ 2Ä“Ìve 2Ä•2a Ä•2Ä 2Ä•Ä. 2Ä•Än 2Ä•Äq 4Ä•ÄrÅ­ 2Ä•Äu 2Ä•Äv 4Ä•ÄÌn 4Ä•ÄÌu 4Ä•ÄÌv 2ĕă. Ä•1ăm Ä•2ăn 4ĕănÄ• 2Ä•2ăq Ä•2ăr Ä•2ăt 2Ä•2ău 2Ä•2ăv Ä•2ÄƒÌ Ä•3ăÌmb 2Ä•2á 2Ä•2æ ĕæ2ă ĕæ2Å­ 2Ä•2Ç£ Ä•Ç£2ă Ä•Ç£2Å­ 2Ä•2ǽ Ä•b2 Ä•bÄ•3d Ä•bÄ«3u Ä•bÄ«3v Ä•3bÅ­ 2Ä•c Ä•4c3Ä•nn Ä•4c5Ä•Ìnn Ä•2ch Ä•c4Ä­m Ä•2c3l Ä•cÅ­3mÄ Ä•cÅ­3mă Ä•cÅ­3mÄ• Ä•cÅ­3m4Ä« Ä•cÅ­mÄ«Ì5n Ä•cÅ­mÄ«Ì5q Ä•cÅ­mÄ«Ì5u Ä•cÅ­mÄ«Ì5v Ä•cÅ­3mÅ­ Ä•cÅ­pÄ•3 Ä•2c3Å­2t Ä•2d1a Ä•d3ÄÌc Ä•2d1ă2 Ä•dă4m Ä•d5ămă Ä•d3áu Ä•dÄ“2g Ä•d3Ä“mÄ“ Ä•dÄ“2s Ä•dÄ“Ì4g Ä•2dÄ•m Ä•3dÄ•Å Ä•dÄ•6stÄ• Ä•dÄ«5uÄ•. Ä•dÄ«5vÄ•. Ä•2dÄ­a Ä•2dĭá Ä•2dĭæ Ä•2dÄ­Ç£ Ä•2dĭǽ Ä•2d3Ä­g Ä•2dÄ­m Ä•2d3Ä­n Ä•2dÄ­p Ä•dÄ­4s Ä•4d3Ä­4ta Ä•4d3Ä­4tá Ä•4d3Ä­4tæ Ä•4d3Ä­4tÇ£ Ä•4d3Ä­4tǽ Ä•4d3Ä­4tÄ« Ä•4dÄ­tÄ­ Ä•d5Ä­tÄ­Å Ä•d5Ä­tÅr Ä•d5Ä­tÅs Ä•4d3Ä­4tÅ« Ä•d5Ä­tÅ­m Ä•d5Ä­tÅ­s Ä•4d3Ä­Ìg Ä•d5Ä­Ì4tă Ä•d5Ä­Ì4tÄ­ 1Ä•dÅ Ä•2dÅr Ä•4dÅÌr 1Ä•dÅ2 Ä•2d3Ål Ä•2dÅp 3Ä•dÅr Ä•4d3ÅÌ4l Ä•4d3ÅÌp Ä•d2r Ä•d2Å« Ä•dÅ«3n Ä•2d3Å­l Ä•2d3Å­n Ä•4d3Å­Ìl Ä•4dÅ­Ìn 2Ä•Ä“ 2Ä•1Ä• Ä•Ä•2ă Ä•2Ä•m Ä•2Ä•q Ä•Ä•2r Ä•Ä•4rÅ Ä•2Ä•t Ä•Ä•2x Ä•2Ä•Ì2 2Ä•fă 2Ä•fÄ• Ä•2gn Ä•2gÅ Ä•3gÅ. Ä•3gÅn Ä•3gÅq Ä•3gÅu Ä•3gÅv Ä•3gÅÌn Ä•3gÅÌq Ä•3gÅÌu Ä•3gÅÌv Ä•1h Ä•1i Ä•3iÄ“ 2Ä•Ä« Ä•1Ä«2b Ä•1Ä«2m Ä•2Ä«q Ä•1Ä«2r Ä•1Ä«2t Ä•2Ä«u Ä•2Ä«v Ä•Ä«Ì2b Ä•Ä«Ì2m Ä•Ä«Ì2r Ä•Ä«Ì4t Ä•1Ä­ Ä•2Ä­c Ä•2Ä­nÅ­ Ä•Ä­2t Ä•Ä­3tÄ Ä•Ä­3tÄ­ Ä•2Ä­u Ä•2Ä­v Ä•Ä­Ì4tÄ• 2Ä•l Ä•lă3s2 Ä•llÄ“3i Ä•llÄ“Ì5i Ä•2l1u 2Ä•m. Ä•1ma Ä•1mă 2Ä•mn 1Ä•mp Ä•m3pn 2Ä•mq 2Ä•2mu 2Ä•mv 2Ä•n Ä•n2Ä Ä•n3d2 Ä•nd4Å­ Ä•3n2e Ä•3n2Ä• Ä•nÄ•3rÅ­ Ä•nÄ•Ìs5 Ä•2ni Ä•n2Å­ Ä•2Ån 2Ä•År 2Ä•2Ås Ä•Å2g3n Ä•2År Ä•Å5rÄÌ Ä•3Års Ä•2ÅÌ Ä•3pÄ• Ä•pÄ•3r Ä•pÄ­5str Ä•3pÅ 2Ä•ps Ä•p2su 4Ä•quÄ• 2Ä•r. Ä•r1a Ä•3rae. Ä•3raea Ä•3raeÄ Ä•3raeă Ä•3raeá Ä•3raeÄ« Ä•3raen Ä•3raeu Ä•3raev Ä•5raÍže. Ä•5raÍžea Ä•5raÍžeÄ Ä•5raÍžeă Ä•5raÍžeÄ« Ä•5raÍžen Ä•5raÍžeu Ä•5raÍžev Ä•5raÍžÌea Ä•5raÍžÌeÄ Ä•5raÍžÌeă Ä•5raÍžÌeÄ« Ä•5raÍ¡e. Ä•5raÍ¡ea Ä•5raÍ¡eÄ Ä•5raÍ¡eă Ä•5raÍ¡eÄ« Ä•5raÍ¡en Ä•5raÍ¡eu Ä•5raÍ¡ev Ä•5raÍ¡Ìea Ä•5raÍ¡ÌeÄ Ä•5raÍ¡Ìeă Ä•5raÍ¡ÌeÄ« Ä•rÄs3 Ä•r4Ät Ä•1ră2 Ä•3ră. Ä•r3ăc Ä•2răd Ä•r5ămă Ä•r3ămÄ« Ä•3rănÄ• Ä•r3ăng Ä•3răq Ä•2r3ăs2 Ä•3rău Ä•3răv Ä•răÌ2 Ä•4r3ăÌd Ä•4r3ăÌg Ä•4r3ăÌl Ä•4r5ăÌmb Ä•răÌs6tÅ Ä•r3áes Ä•2r3áu Ä•r1æ2 Ä•3ræ. Ä•3rÃ¦Ä Ä•3ræă Ä•3rææ Ä•3ræǽ Ä•3ræī Ä•3ræn Ä•3ræu Ä•3ræv Ä•r1Ç£2 Ä•3rÇ£. Ä•3rÇ£Ä Ä•3rǣă Ä•3rǣǣ Ä•3rǣī Ä•3rÇ£n Ä•3rÇ£u Ä•3rÇ£v Ä•3rÇ£ÌÄ Ä•3rÇ£Ìă Ä•3rÇ£ÌÇ£ Ä•3rÇ£ÌÄ« Ä•3rÇ£Ìn Ä•r3Ç£Ìs Ä•3rÇ£Ìu Ä•3rÇ£Ìv Ä•r3ǽ2s Ä•3r2e 2Ä•rÄ“ Ä•2r3Ä“2d Ä•r3Ä“2g Ä•5rÄ“mÄ­nÄ« Ä•5rÄ“mÅ­ Ä•5rÄ“nÄ• Ä•5rÄ“rÄ• Ä•5rÄ“rÄ­ Ä•r3Ä“ss Ä•r3Ä“st Ä•5rÄ“uÄ• Ä•5rÄ“vÄ• Ä•r3Ä“Ì4d Ä•4r3Ä“Ì4g Ä•5rÄ“ÌmÄ­nÄ« Ä•5rÄ“ÌmÅ­ Ä•r5Ä“Ìnă Ä•5rÄ“ÌnÄ• Ä•5rÄ“Ìq Ä•5rÄ“ÌrÄ• Ä•5rÄ“ÌrÄ­ Ä•r5Ä“Ìss Ä•r5Ä“Ìst Ä•5rÄ“Ìt Ä•5rÄ“ÌuÄ• Ä•5rÄ“ÌvÄ• 2Ä•1rÄ• Ä•3rÄ•. Ä•r3ĕăt Ä•r3Ä•4d4 Ä•2rÄ•f Ä•rÄ•2g Ä•rÄ•2m Ä•r3Ä•mÄ Ä•4r3Ä•mă Ä•r3Ä•mÄ“ Ä•r3Ä•mÄ• Ä•r3Ä•mÄ« Ä•r3Ä•mÄ­ Ä•4r3Ä•mÅ Ä•r3Ä•mÅ Ä•r3Ä•mÅ­ Ä•2r3Ä•2q Ä•5rÄ•quÄ• Ä•2r3Ä•2s Ä•3rÄ•u Ä•3rÄ•v Ä•r3Ä•Ì4d Ä•rÄ•Ì4m Ä•r5Ä•ÌmÄ• Ä•r5Ä•ÌmÄ­ Ä•4r3Ä•Ìs Ä•r1i 2Ä•1rÄ« Ä•rÄ«3Ä Ä•r3Ä«2b Ä•2rÄ«n Ä•r4Ä«q Ä•r3Ä«Ì4b Ä•r4Ä«Ìq Ä•4r3Ä­4cÄ• Ä•r3Ä­4cÄ­ Ä•r3Ä­4dÅ Ä•5rÄ­Ä•. Ä•5rÄ­Ä•n Ä•5rÄ­Ä•q Ä•5rÄ­Ä•u Ä•5rÄ­Ä•v Ä•4r3Ä­4mÄ Ä•4r3Ä­4mă Ä•r5Ä­4mÄ“b Ä•r5Ä­4mÄ“m Ä•4r5Ä­4mÄ“n Ä•r5Ä­4mÄ“r Ä•r5Ä­4mÄ“s Ä•r5Ä­4mÄ“t Ä•r5Ä­6mÄ“Ìb Ä•r5Ä­6mÄ“Ìm Ä•6r5Ä­6mÄ“Ìn Ä•r5Ä­6mÄ“Ìr Ä•r5Ä­6mÄ“Ìs Ä•r5Ä­6mÄ“Ìt Ä•4r3Ä­4mÄ• Ä•4r3Ä­4mÄ« Ä•r5Ä­4mÄ­m Ä•r5Ä­4mÄ­s Ä•r5Ä­4mÄ­t Ä•r5Ä­4mÄ­Ì Ä•rÄ­4mÅ. Ä•rÄ­4mÅq Ä•rÄ­4mÅu Ä•rÄ­4mÅv Ä•r3Ä­4mÅ Ä•r5Ä­4mÅ­n Ä•r5Ä­6mÅ­Ìn Ä•r3Ä­ng Ä•r4Ä­Å Ä•r4Ä­Å Ä•r4Ä­s Ä•4r5Ä­4tÄ­b Ä•5rÄ­tÅt Ä•5rÄ­tÅÌt Ä•5rÄ­tÅ Ä•rÄ­4tÅ«s Ä•4r5Ä­4tÅ­Ä« Ä•5rÄ­tÅ­r Ä•4r5Ä­4tÅ­Å­ Ä•5rÄ­tÅ­Ìr Ä•r4Ä­Å­ Ä•r5Ä­Ì4cÄ­ Ä•4r3Ä­ÌÄ­ Ä•6r5Ä­Ì6mÄ•n Ä•6r5Ä­Ì6mÄ•q Ä•r5Ä­Ì6mÄ•r Ä•6r5Ä­Ì6mÄ•u Ä•6r5Ä­Ì6mÄ•v Ä•r5Ä­Ì6mÄ­m Ä•r5Ä­Ì6mÄ­t Ä•rÄ­Ì6tÄ­b Ä•4r5Ä­Ì4tÅ­ 2Ä•rn Ä•1ro Ä•1rÅ Ä•3rÅn Ä•r3Å4rÄ“ Ä•r3Å4rÄ• Ä•r3Å4rÅ Ä•3rÅrÅ­ Ä•3rÅs. Ä•r3Åsc Ä•3rÅsn Ä•3rÅsq Ä•3rÅsu Ä•3rÅsv 3Ä•rÅt Ä•rÅÌ4rÄ“ Ä•rÅÌ4rÄ• Ä•5rÅÌrÅ­ Ä•r5ÅÌsc 3Ä•rÅÌt Ä•r1Å Ä•r3ÅÌl Ä•3rÅÌr 2Ä•rq 2Ä•2r1u Ä•3rÅ«g Ä•rÅ«2r Ä•r3Å«t Ä•r3Å«Ì4r Ä•r3Å«Ìt Ä•3rÅ­Ä“ Ä•3rÅ­Ä• Ä•3rÅ­Ä« Ä•3rÅ­Ä­ Ä•3rÅ­2m3 Ä•5rÅ­ntÅ Ä•5rÅ­ntÅ Ä•5rÅ­ntÅ­ Ä•3rÅ­s. Ä•3rÅ­sn Ä•3rÅ­sq Ä•r3Å­ss Ä•r3Å­st Ä•3rÅ­su Ä•3rÅ­sv Ä•r3Å­2t Ä•3rÅ­Ìl Ä•3rÅ­Ìm Ä•5rÅ­Ìsn Ä•5rÅ­Ìsq Ä•r5Å­Ìss Ä•r5Å­Ìst Ä•5rÅ­Ìsu Ä•5rÅ­Ìsv 2Ä•rv 1Ä•1sc Ä•s2cÄ« Ä•s2cÄ­ Ä•s2cÅ­ Ä•3s2Ä• Ä•3sÅ Ä•1sp Ä•spÄ•5rÄ« Ä•2sph Ä•s2pl Ä•s2pÅ Ä•s2pÅ Ä•s2pÅ­ Ä•2sq Ä•s2ta Ä•4stÄ“s Ä•4stÄ“Ìs Ä•4s3tÄ•. Ä•4stÄ•m Ä•4s5tÄ•nÄ• Ä•4s3tÄ•q Ä•4s3tÄ•u Ä•4s3tÄ•v Ä•4stÄ•Ìm Ä•4s3tÄ«. Ä•4s5tÄ«nÄ• Ä•4s3tÄ«q Ä•4s3tÄ«s Ä•4s3tÄ«u Ä•4s3tÄ«v Ä•6s5tÄ«ÌnÄ• Ä•4s5tÄ«Ìq Ä•4s5tÄ«Ìs Ä•4s5tÄ«Ìu Ä•4s5tÄ«Ìv Ä•4stÄ­Ìc Ä•s4tn Ä•2s3tÅ Ä•s4tq Ä•s3trÄ“ Ä•s3trÄ• Ä•2s4tu Ä•s4tv Ä•2su Ä•3t2ă Ä•tă3g Ä•tÄ•3rÄ• Ä•tÄ•5rÄ« Ä•tÄ•rÄ«5u Ä•tÄ•rÄ«5v Ä•tÄ•3rÅ­ Ä•tÄ­4ă Ä•t3Ä­p 3Ä•ts Ä•2t1u 2Ä•1u Ä•3uÄ• Ä•1Å«2 Ä•2Å«3m Ä•2Å«Ìm Ä•Å«Ì2r Ä•Å«Ì4t 1Ä•Å­2 Ä•1Å­l 2Ä•2Å­m Ä•1Å­r 2Ä•Å­s Ä•1Å­t 2Ä•2Å­Ìm 2Ä•Å­Ìs Ä•4Å­Ìsq Ä•3Å­Ìt 2Ä•v Ä•3vÄ• Ä•2xă Ä•x3áu Ä•x3Ä•Ìm Ä•2xi Ä•x3Ä­Ä« Ä•xÅ2 Ä•3xÅÌ Ä•xÅÌ4rÄ Ä•xÅÌ4ră Ä•xÅÌ4rÄ“ Ä•xÅÌ4rÄ• Ä•xÅÌ4rÅ Ä•x5tÄ•r Ä•2xu Ä•2Ì 2Ä•Ìă Ä•Ìb2 Ä•Ì2cl Ä•Ì4dăm Ä•Ì4dÄ«s Ä•Ì4dÄ­a Ä•Ì4dĭæ Ä•Ì4dÄ­Ç£ Ä•Ì4d5Ä­4ta Ä•Ì4d5Ä­4tæ Ä•Ì4d5Ä­4tÇ£ Ä•Ì4d5Ä­4tÄ« Ä•Ì4d5Ä­4tÅ« Ä•Ì2dÅ 2Ä•ÌÄ• Ä•Ì3Ä•Å Ä•Ì3Ä•Å Ä•Ì3Ä•2r 1Ä•Ìf Ä•Ì1i Ä•Ì3iÄ“ 2Ä•Ìl 2Ä•Ìm 2Ä•Ìn Ä•Ìnd4 4Ä•Ìps Ä•Ìră4g Ä•Ìr5ĕăn Ä•Ìr5ĕăt Ä•Ìr3Ä« Ä•Ì4rÄ«s Ä•Ì4r5Ä­m. Ä•Ì4r5Ä­4mÄ Ä•Ì4r5Ä­4mă Ä•Ì4r5Ä­mÄ• Ä•Ì4r5Ä­4mÄ« Ä•Ì4r5Ä­4mÅ Ä•Ìr5Ä­6tÅ«s Ä•Ì2ru Ä•Ì4r3Å­t 3Ä•Ìsc Ä•Ì3s4cÄ« Ä•Ì3sÄ• Ä•Ì3spÅ­ 4Ä•ÌstÄ Ä•Ì5stÄ­tÄ Ä•Ì5stÄ­tÄ« Ä•Ì5stÄ­tÄ­ Ä•Ì5stÄ­tÅ Ä•Ì4str 2Ä•Ì2t Ä•Ì3tÄ Ä•Ì3tă Ä•Ì3tÄ“ Ä•Ì3tÄ• Ä•Ì3tÄ« Ä•Ì3tÅ Ä•Ì3tÅ Ä•Ì3tr 3Ä•Ìts Ä•Ì3tÅ­ Ä•Ìx3Ä•Ä Ä•Ìx3ĕă Ä•Ìx3Ä•Å Ä•Ìx3Ä­Ä« 2é2a 2éæ 2éb2 éba3q ébe3 éb4ri ébs3 é3bu éce1 é2ch é2c3l éco1 écu3m4 é2c3u2t éda2m é4d3ama é4damÄ Ã©d2i é2diÇ£ é2d3i2g éd3ime éd3i4mi éd4is éd3i4tÇ£ éd3i4tÄ« éd3i4tÅ« é2d3o2l éd3ue 2ée é1ea é1eÄ Ã©1eo é1eŠé1e2r é1es éfe1 1éff é3g2a é3gæ é2gl é2g3n é1h 2éi é3ian é3iaq é3iau é3iav é1i2c é1ie é3ieq é3ieu é3iev é1iÄ“ é3iit é2in é3ior é3iou é3iov é2is é3iul é2leg é3li élu2 é2l3ue é2l3ut é1m2a ém2e1 3é4mera ém2i é2mic 2émin 3é4mit. 2émn é1mo1 1émp 2émq 1émt 2ému 2émv 2én énd2 énd4u é2n3ea én2ex én3iit én3si é3n2ua é3n2uÄ“ é3n2uÄ« én2ul é3n2uo 2éo épe1 épe3r 2éps ép4se. ép4sen ép4seq ép4seu ép4sev ép2su 4é3que é1r 2éra é3ra. é3rae é2ra2g ér2al éra2m é3ram. ér3ama é3ran é3raq éra2r ér3ara ér5are ér3aro é3ras é3rau é3rav é3raÍ¡ é3ræ 2ére ér3ean ér3eat ér3e2d4 ére2g ére2m é4r3ema ér3emÄ Ã©r3eme ér3emÄ“ é4r3emi ér3emÄ« é4r3emo é4r3emŠé4r3emu é4r3eru é4rest é2rh é4riac é3riar 2érib ér5i4cit 2érie ér3ier é4r3iit é4r3i4ma é4r3i4mÄ Ã©4r3i4me é4r3i4mÄ“ é4r3i4mi é4r3i4mÄ« é4r3i4mo é4r3i4mŠér5i4mun é3rio é3rip é5ritor é5ritur éri4tÅ«s ér3Ä« 2érn é3ro. 3é2rog é2r3o2p 2érq ér5rue 2éru é2r3ua é2r3uÄ Ã©2rue é2r3uÄ“ é3rul é3rum é3run é2ruo é2r3uŠé3rus ér3u2t é2ruu 2érv 1é2sa 1é2sæ é3s2cÄ« és2i 2ésn 1é2so éspe3 és2pu 2és3q 4ésta 4éstÄ Ã©s3tib 3éstn 3éstq 3éstv 3é2su. é4s3ue és3ui 3ésum 3ésus 2ésv 2ét éte1 3éts 2éu é1ua é2uam é2uaq é2uau é1uÄ Ã©1uæ é1uÇ£ éub2 é1ue é2uel é1uÄ“ é1ui é1uÄ« éu1m é3unx éute3 éu4tra é1Å« 2év é3ve éx2a é2x3ea é2x3eÄ Ã©2x3eo é2x3eŠéx2ib é2xiu éx2o éx2Šé2xue éx4us 2é͞ 2é͡ 1f f2a fa4c3ue fa1m fa2ru fas3 fÄs3 fá2c3u fá1m fá2ru fece3 fe2i fe3li fe3ra fe3r2æ3 fe3r2Ç£ fe3rÄ“ fe3r4i fe3rÄ« fe3ro fe3rÅ fe3ru fes5tÄ fes5te fe2x fÄ“2i fÄ•3r2a fÄ•3ră fÄ•3r2æ fÄ•3r2Ç£ fÄ•3rÄ“ fÄ•3r4Ä• fÄ•3rÄ« fÄ•3rÅ fÄ•3rÅ­ fÄ•2s3 fÄ•s5tÄ• fÄ•Ì3ră fÄ•Ì5r4Ä« fé2i fér4Ä« fé2ru fé2x 2ff file2 fi1s fis2i fÄ­Ä•3 fí1m f2l2 flo3 flor2 fons3 fo3rÄ« fÅ3rÄ« fÅ“Ì„3d f2r2 fra3g fră3g fre3 frem2 fre5mi fre5mo fr4Ä“3n frÄ“Ì5n fr4Ä•Ì3 fré1 fré5na fu1s fú1s 1g gab2 2g1ae g2aeq g4aeue. g4aeuÄ•. g4aeve. g4aevÄ•. ga2i gao3 g2ar ga3re g2au 2g1aÍž g4aÍžeq g6aÍžeue. g6aÍžeuÄ•. g6aÍževe. g6aÍževÄ•. g4aÍžÌeq g6aÍžÌeue. g6aÍžÌeuÄ•. g6aÍžÌeve. g6aÍžÌevÄ•. 2g1aÍ¡ g4aÍ¡eq g6aÍ¡eue. g6aÍ¡euÄ•. g6aÍ¡eve. g6aÍ¡evÄ•. g4aÍ¡Ìeq g6aÍ¡Ìeue. g6aÍ¡ÌeuÄ•. g6aÍ¡Ìeve. g6aÍ¡ÌevÄ•. gÄ4iae. gÄ6iaene gÄ6iaeque gÄ6iaeue gÄ6iaeve gÄ6iaÍže. gÄ6iaÍžene gÄ6iaÍžeque gÄ6iaÍžeue gÄ6iaÍževe gÄ6iaÍžÌene gÄ6iaÍžÌeque gÄ6iaÍžÌeue gÄ6iaÍžÌeve gÄ6iaÍ¡e. gÄ6iaÍ¡ene gÄ6iaÍ¡eque gÄ6iaÍ¡eue gÄ6iaÍ¡eve gÄ6iaÍ¡Ìene gÄ6iaÍ¡Ìeque gÄ6iaÍ¡Ìeue gÄ6iaÍ¡Ìeve gÄ2iÄ gÄ6iáene gÄ6iáeque gÄ6iáeue gÄ6iáeve gÄ4iæ. gÄ4iæne gÄ6iæque gÄ4iæue gÄ4iæve gÄ4iÇ£. gÄ4iÇ£ne gÄ6iÇ£que gÄ4iÇ£ue gÄ4iÇ£ve gÄ6iÇ£Ìne gÄ6iÇ£Ìque gÄ6iÇ£Ìue gÄ6iÇ£Ìve gÄ4iǽne gÄ6iǽque gÄ4iǽue gÄ4iǽve gÄ4iÄ«s. gÄ6iÄ«sne gÄ6iÄ«sque gÄ6iÄ«sue gÄ6iÄ«sve gÄ6iÄ«Ìsne gÄ6iÄ«Ìsque gÄ6iÄ«Ìsue gÄ6iÄ«Ìsve gÄ2iu gÄ2iú găb2 gă3rÄ• g4áeue. g4áeuÄ•. g4áeve. g4áevÄ•. gá2i gá3ian 2g1æ2 g2æ3q g4æue. g4æuÄ•. g4æve. g4ævÄ•. 2g1Ç£2 g2Ç£3q g4Ç£ue. g4Ç£uÄ•. g4Ç£ve. g4Ç£vÄ•. g2Ç£Ì3q g4Ç£Ìue. g4Ç£ÌuÄ•. g4Ç£Ìve. g4Ç£ÌvÄ•. g2ǽ3q g4ǽue. g4ǽuÄ•. g4ǽve. g4ǽvÄ•. 2gd g2e ge2e ge2i 3gena 3genÄ 3gená 3genæ 3genÇ£ 3genǽ 3genen 3geneq 3geneu 3genev 3genÄ“ 3gené 3geni 3genÄ« 3gení 3geno 3genÅ 3genó 3genu 3genú ge1r ger2æ3 ger2Ç£ ge3rÄ“ ge3rÄ« ges3t ges5tÄ ges5te ges5tr 2getÄ“ 2geté 2getÄ« ge2un 3gÄ“d gÄ“2i g2Ä• gÄ•2ă gÄ•2Ä« 3gÄ•na 3gÄ•nÄ 3gÄ•nă 3gÄ•ná 3gÄ•næ 3gÄ•nÇ£ 3gÄ•nǽ 3gÄ•nÄ“ 3gÄ•nÄ•n 3gÄ•nÄ•q 3gÄ•nÄ•u 3gÄ•nÄ•v 3gÄ•nÄ« 3gÄ•nÅ 3gÄ•nÅ­ 3gÄ•3r2a gÄ•3ră 3gÄ•rá 3gÄ•3r2æ 3gÄ•3r2Ç£ 3gÄ•rǽ gÄ•3rÄ“ gÄ•3r4Ä• gÄ•3rÄ« gÄ•3rÅ 3gÄ•3rÅ­ gÄ•s3 gÄ•s5tÄ• 3gÄ•Ìnă 3gÄ•ÌnÄ• gÄ•Ì3rÄ• gé2i 3géna 3génen 3géneq 3géneu 3génev 3géss 3gést 2gg2 g3ga g3gæ3 g3gÇ£ g2i 3gie gig3 gi4gn gi2i gi4lue gim2 gin2Ä gis3 gi4sc gis5ci gispe3 gis5te g2Ä­ 3gÄ­Ä• gÄ­5mÄ­n gÄ­n2Ä gÄ­n2Ä• gÄ­s5tÄ• 3gÄ­tÄ« gíg3 gí2lu gí1m gí3tur g2la g2lÄ g2lá g2læ g2lÇ£ g2lǽ g2les g2lÄ“s 2glÄ• g2lés 2gli g2lÄ« 2glÄ­ g2lí g2lo g2lÅ g2lu g2lÅ« g2lú 2g1m2 g1n2 gn4an gna5ni. gna5nin gna5niq gna5nis gna5niu gna5niv gna5nín gna5níq gna5nís gna5níu gna5nív gnÄ3nÄ« gná5ni. gná5nis gnæ4uÅ­ gnæ4vÅ­ gnÇ£4uÅ­ gnÇ£4vÅ­ 2gne g3nem g3nes g3nÄ•m gnÄ•3rÅ­ g3nÄ•Ì 2gné g3ném g3nés g3nib g4nitæ g2no g3non gno2p g3noq g3nor. 3gnora 3gnorá 5gnorim 5gnorit 5gnorím 5gnorít g3norn 3gnoro 3gnoró g3norq 5gnorun 5gnorún g3norv 3gnos 3gnou 3gnov 3g4nóra 5g4nóre. 5g4nórim 5g4nórin 5g4nóris 5g4nórit 3g4nóro 5g4nórun 3g4nósc 3g4nóss 3g4nóst 5g4nóuer 3g4nóui 5g4nóver 3g4nóvi g2ob2 3gog go3n go5ni5c go4nn go4nq go4nue go4nv go2p g1o2t go3th 3gÅg g1Å2t g3ÅÌ4t g2Å 2gÅ. gÅb2 2gÅm gÅ2p 2gÅq 2gÅu 2gÅv 3góg g1ót gó2ti gÅ“Ì„3d g2r2 gra3d4 3grae gra4ia gra4iá gra4iæ gra4iǽ gra4ie gra4ii gra4ií 3graÍ¡ grÄ6iÄne grÄ6iÄÌne grăd2 3gráe 3græ 3grÇ£ 3grǽ gre3d4 gre5di gre5dÄ« gres3 grÄ•3d4 grÄ•5dÄ« grÄ•2s3 grÄ•Ìs3 grés3 gré6sti gri3n 2grÄ« g2u gumi3 gus3 gÅ«n4e gÅ«n4Ä• 2gŭæ gÅ­4Ä•Ì 2gÅ­Ä«s gÅ­3m2Ä­ gý3t h2a hab2 ha4c3ue hae2c3 ha2i ha2Ä« ha1m h3ang ha2o ha3re ha3rÄ“ hÄ2c1 hÄ2i hÄ2Ä­ h2ă hă3b2 hă2Ä« h3ăng hă3ră hă3rÄ“ hă3rÄ• h3ăÌng há2c3u háe2c3 há2i h3áng hæ2a hæ2ă hæ2á hæ2c1 hæ2i hæ2Å­ hÇ£2a hÇ£2ă hÇ£2c1 hÇ£2Å­ hǽ2c1 h2e he2a hed2 he2e he3g he2ia he2iá he2ic3 he2ie he2ié he2ii he2ií he2io he2ió he2í heíc3 he2lu he2nu he2o he3r2a hera3g he3rá he3r2æ he3r2e he3r4i heris3 he3rÄ« he3ro hero5d he3se he2s3p hespe3 he2sq he2st he2u he2Å« heÅ«3s he2x h2Ä“ hÄ“2ia hÄ“2iÄ hÄ“2iá hÄ“2iæ hÄ“2iÇ£ hÄ“2iǽ hÄ“2ie hÄ“2iÄ“ hÄ“2iÄ« hÄ“2iÅ hÄ“mÄ­3s hÄ“2nu hÄ“3r hÄ“4rn hÄ“4rq hÄ“4ru hÄ“4rv hÄ“3se hÄ“3sÄ• hÄ“s3t h2Ä• hÄ•2ă hÄ•2Ä­ hÄ•3r4Ä• hÄ•3rÄ« hÄ•3rÅ­ hÄ•2sp hÄ•2Å« hÄ•Å«3s hé2i hé1m hé3r2a héra3g hé2ru hé2x h2i hi4c3ue hi2i hin2Ä hi2o hio2s hi3p2t hi4s3t his5ta his5tÄ his5te hi3uu h2Ä« hÄ«2cu hÄ«3p2 hÄ«3sÅ hÄ«Ì3p2 hÄ­n2a hÄ­n2Ä hÄ­n2æ hÄ­Å3p hÄ­3p2t hÄ­4st hÄ­s5tÄ hÄ­s5tă hÄ­s5tÄ• hÄ­Ìp4t hí2c3u híp2t h2l 2h1m2 hmÄ­2ă hmo4nu h1n2 hno3b2 hnu3 hn4us hnÅ«3 h2o ho2a ho3b2 hobÄ«3u hobÄ«3v ho2c3u ho2e ho2i hoi3q ho2Ä« hoÄ«3u hoÄ«3v hoÄ«Ì3u hoÄ«Ì3v ho2í hon3g4 hongæ3 hongÇ£Ì5 hongǽ3 ho2o ho2Å ho2ó ho5rén ho3rÄ« ho2s ho3se ho3si ho3sí ho3spe hÅ2cu hÅne4 hÅ2nu hÅ2sp h2Å 2hÅ. hÅ2ă hÅ3b2 hÅbÄ«3u hÅbÄ«3v 2hÅd hÅ2Ä« hÅÄ«3u hÅÄ«3v hÅÄ«Ì3u hÅÄ«Ì3v hÅ2Ä­ hÅn3g4 hÅngæ3 hÅngÇ£Ì5 hÅngǽ3 hÅ2Å hÅ3rÄ« hÅ2s hÅÌ3rÄ­ hÅÌ4s hób2 hó2c1 hó3l hó2nu hó2sp 2hÅ“ h2r2 hras5t hrăs3t hu2cu hu1i2 huic3 huí2 huíc3 hum2e h2Å« hÅ«2cu hÅ«3l hÅ«Ì3l hÅ­3mÄ­ hú2c1 hú3iu iab2 iabo3l iab4u 1iac 3iact iad2æ3 iad2Ç£ iad2ǽ ia3d2e iad2Ä“ iad2é iad2i iad2Ä« i2ae ia3iú i3alt iamb2 iam5bi iambÄ«5q iambÄ«5u iambÄ«5v iambÄ«Ì5q iambÄ«Ì5u iambÄ«Ì5v 3iamÄ« i3ang i3ann i1ap i2aq ia3re ia4rid ia4ríd ia3s4pe ia3spé ias3t ias5te ias5tr ia4tra ia4trá ia4tro ia4tró i2au i1a2x i2aÍž i2aÍ¡ 2iÄc i2Än2 3iÄnÄ• 3iÄquÄ• i2Äru 3iÄrÅ­ 3iÄsnÄ• 5iÄsquÄ• 3iÄsuÄ• 3iÄsvÄ• iÄ4trÄ 3iÄuÄ• 3iÄvÄ• i1Ä2x 3iÄÌnÄ• 5iÄÌquÄ• 3iÄÌrÅ­ 5iÄÌsnÄ• 5iÄÌsquÄ• 5iÄÌsuÄ• 5iÄÌsvÄ• 3iÄÌuÄ• 3iÄÌvÄ• 1iă iăd2 iábo3 3iácu 2iád i2áe i3ált iám3b2 i4áne i3áng 2iáq iá4rid iá4tro i1á2x i2æ iæ2a iæ2á iæ2i i2Ç£ iÇ£2a i2ǽ ib2 i3biu ibÄ«3u ibÄ«3v 2iboe 2iboÄ“ 2iboé ibo3l i3bum ib4un i5bund 4ibu2s3 i3bÅ« ib4Å«Ì 4ibús3 2ic. 2i3ca 2i3cÄ 2i3cá 2i3cæ 2i3cÇ£ 2i3cǽ 2iceb 2icen i4c3enn 2icet i3cÄ“n 2icén i4c5énni 2icéq 2icéu 2icév i3cia. i3ciaq i3ciau i3ciav i3cii i3cií i3cium i3ciúm 2i3cÄ«s i3cÄ«Ìs i3cía 2icl 2icn 2i3co 2i3cÅ 2i3có 2icq 2ict i2c3u2t ic2Å« 2icv i3d2a 2i3d2e ide3mé ide2s 2i3dÄ“ idÄ“4iÄ“ idÄ“3m idÄ“2s 2i3dé 2i3d2i idi3g id3ips idi4s 2i3dÄ« 2i3dí i3do id4or 2i3d2u 2i3dú 2ie. 1iec iece3 ie2e 2ieg ie4gn 2ieÄ« 2ieí i2em 2ieo 2ieÅ 2ieó 2i2eq ie1r ie3r2e ie3rÄ« i3erm ie2s i3e4sa i3esá ies3c i3ese i3esé i3e4si i3esí i3e4so i3esó ies5tÄ i3esú 2iete iete5re 2ietÄ“ 2ieté 2ietÄ« 2i2eu ie2un 2ieú 2i2ev 1iex iex2i ie2xu 2ieÍž 2ieÍ¡ 2iÄ“. 1iÄ“c 2iÄ“g i2Ä“n iÄ“3na 2iÄ“3ne 2iÄ“q 3iÄ“quÄ• iÄ“2s iÄ“4sa iÄ“3sÅ« 4iÄ“ta. 4iÄ“tae. 6iÄ“taene 6iÄ“taeque 6iÄ“taeue 6iÄ“taeve 4iÄ“tam 4iÄ“tan 4iÄ“taq 4iÄ“tau 4iÄ“tav 6iÄ“taÍže. 6iÄ“taÍžene 6iÄ“taÍžeque 6iÄ“taÍžeue 6iÄ“taÍževe 6iÄ“taÍžÌene 6iÄ“taÍžÌeque 6iÄ“taÍžÌeue 6iÄ“taÍžÌeve 6iÄ“taÍ¡e. 6iÄ“taÍ¡ene 6iÄ“taÍ¡eque 6iÄ“taÍ¡eue 6iÄ“taÍ¡eve 6iÄ“taÍ¡Ìene 6iÄ“taÍ¡Ìeque 6iÄ“taÍ¡Ìeue 6iÄ“taÍ¡Ìeve 2iÄ“tÄ 5iÄ“tÄnÄ• 5iÄ“tÄquÄ• 5iÄ“tÄrÅ­ 5iÄ“tÄsnÄ• 5iÄ“tÄsquÄ• 5iÄ“tÄsuÄ• 5iÄ“tÄsvÄ• 5iÄ“tÄuÄ• 5iÄ“tÄvÄ• 5iÄ“tÄÌnÄ• 5iÄ“tÄÌquÄ• 5iÄ“tÄÌrÅ­ 5iÄ“tÄÌsnÄ• 5iÄ“tÄÌsquÄ• 5iÄ“tÄÌsuÄ• 5iÄ“tÄÌsvÄ• 5iÄ“tÄÌuÄ• 5iÄ“tÄÌvÄ• 6iÄ“táene 6iÄ“táeque 6iÄ“táeue 6iÄ“táeve 4iÄ“tám 4iÄ“tæ. 4iÄ“tæne 6iÄ“tæque 4iÄ“tæue 4iÄ“tæve 4iÄ“tÇ£. 4iÄ“tÇ£ne 6iÄ“tÇ£que 4iÄ“tÇ£ue 4iÄ“tÇ£ve 6iÄ“tÇ£Ìne 6iÄ“tÇ£Ìque 6iÄ“tÇ£Ìue 6iÄ“tÇ£Ìve 4iÄ“tǽne 6iÄ“tǽque 4iÄ“tǽue 4iÄ“tǽve 4iÄ“tÄ“. 4iÄ“tÄ“n. 4iÄ“tÄ“ne 6iÄ“tÄ“nne 6iÄ“tÄ“nque 6iÄ“tÄ“nue 6iÄ“tÄ“nve 6iÄ“tÄ“que 4iÄ“tÄ“s. 6iÄ“tÄ“sne 6iÄ“tÄ“sque 6iÄ“tÄ“sue 6iÄ“tÄ“sve 4iÄ“tÄ“ue 4iÄ“tÄ“ve 6iÄ“tÄ“Ìne 6iÄ“tÄ“Ìnne 6iÄ“tÄ“Ìnque 6iÄ“tÄ“Ìnue 6iÄ“tÄ“Ìnve 6iÄ“tÄ“Ìque 6iÄ“tÄ“Ìsne 6iÄ“tÄ“Ìsque 6iÄ“tÄ“Ìsue 6iÄ“tÄ“Ìsve 6iÄ“tÄ“Ìue 6iÄ“tÄ“Ìve 4iÄ“tÄ«s. 6iÄ“tÄ«sne 6iÄ“tÄ«sque 6iÄ“tÄ«sue 6iÄ“tÄ«sve 6iÄ“tÄ«Ìsne 6iÄ“tÄ«Ìsque 6iÄ“tÄ«Ìsue 6iÄ“tÄ«Ìsve 2i2Ä“u 3iÄ“uÄ• 2i2Ä“v 3iÄ“vÄ• 1iÄ“x 3iÄ“Ìc 2iÄ“Ìg iÄ“Ì2s 4iÄ“Ìta 4iÄ“ÌtÄ 4iÄ“Ìtæ 4iÄ“ÌtÇ£ 4iÄ“ÌtÄ“ 4iÄ“ÌtÄ« i2Ä“Ìu i2Ä“Ìv 1iÄ• iÄ•1r iÄ•3r4Ä• iÄ•s3 1iéc 2iég ié4gn i2é1m 2iéne 2iéq i3érm ié2s ié4sa i3ése i3ési 2iéte 2iéu 2iév 1iéx ié2xu 2ié͞ 2ié͡ 2if ife6ste ig2a 1ig2æ3 1ig2Ç£ 4igena 4igenÄ 4igená 4igenæ 4igenÇ£ 4igenǽ 4igenen 4igeneq 4igeneu 4igenev 4igenÄ“ 4igené 4igeni 4igenÄ« 4igení 4igeno 4igenÅ 4igenó 4igenu 4igenú 4igéna ig2l i2gn ig3nat ig3nÄt ig5nÄÌt ig3nát ig3nÄ“ i3gr 2i1h i3ha ihí3 i1i2a iiam3 i1i2á i1ie i1iÄ“ i1io i1ió i1iu i2iue i1iú i2Ä« 3iÄ«nÄ• 3iÄ«uÄ• 3iÄ«vÄ• 1iÄ­ 2ij 2i3le ilÄ“3i ilÄ“Ì3i 2i3lé i3li ili4g5n ilí4g3 4ille. 4illen 4illeq 6illeue. 6illeve. 4illi. 4illiq 4illis 4illiu 4illiv 2illÄ« 6illíne. 4illíq 4illís 4illíu 4illív 2illo 2illÅ 2illó 4illum 4illus. 4illusn 4illusq 4illusu 4illusv 4illúm 4illúsn 4illúsq 4illúsu 4illúsv 2ilo 2iló i2l3ua i2luÄ i2l3uá i2l3uæ i2luÇ£ i2l3uǽ il3ue. il3ues i2l3uÄ“ il4uÄ“r il3ués il5uis. il5uisn il5uisq il5uisu il3uÄ«s il5uÄ«Ìs il5uísn il5uísq il5uísu i2luo i2luÅ i2l3uó i2luu i2luú i1m 2im. i3ma. i2mad ima4lu im2am im2an i3maq im2as i3mau i3mav imás3 i3mæ i3mÇ£ i3mǽ im3b2 im5biv imbÄ«3q imbÄ«3u imbÄ«3v imbÄ«Ì5q imbÄ«Ì5u imbÄ«Ì5v im2e 2imed ime5dá ime5de ime5dé 2imel 4imetr 2imÄ“d 2imÄ“l 4imÄ“Ìd 4imÄ“Ìl 2iméd 2imél 4i5métr im2i imi2a i4micu i4micú 3i2mie 3i2miÄ“ 3i2mié 3i2mii i4minÄ“ 4i5minÄ« 3i2mir i4mitæ i4mitǽ i4mitu 3i2míc 3i2míi 3i2mír imí5tur 1imm 2imn imo4nu i4m3ord i4m3órd 1imp impe5r6ii impe5r6iÄ« impe5r6ií impe5rin impe5riue impe5riv impe5r4Ä« 2imq 2imue 2imv i1n i3na. i3nae in4al i3nam i3n4aq i3nar i3nas i3nau i3n4av i3naÍ¡ i3náe in4ál i3nám i3náq i3nár i3nás i3náu i3náv i3næ i3nǽ indi5st in4d3ue in4d3ui in4d3uÄ« in4d3uí in4d3úe 2i3ne ine2d ine2l ine2x in3eÍž in3eÍ¡ i3né iné2d 1inf i3ni. i3nia i3niá i3nib ini2c in3ice in3ici i3nii i3nií ini2m i3nin i3nio i3nió i3nis i3nit i3niu i3niú i3niv iní4ciÄ iní4cie iní4ciÄ“ iní4ciÅ i3nín i3níq i3nís i3níu i3nív 1inj 2i3no 2i3nÅ 2i3nó in5réq 1in1s2 insi5ti instre5 instré5 4int. in5ter inte5ron inte5rÅn inte5rÅÌn inté6r5is 2inth 4intn 4intq 2intu 4intv 1in1u2 inu4b 4inum 2i3nus in1Å«2 inÅ«Ì4b inú2b in3únd 1inv io1 io2a iob2 iobo3 io2bó iom2 iome3 iome5d 2ion io3n2i io5ni5c 3iono 3ionó 2iope 2iopÄ“ 2iopé io3rÄ« 2ios io2st iot4e io5ten iot4é io5tén i2Å iÅ3d 3iÅnÄ• 3iÅrÅ­ 3iÅuÄ• 3iÅvÄ• 1iÅ i1ó2b ióbo3 2ióc 2ióni 2iós 2ipa 2ipÄ 2ipá 2i3pe ipe3r iper4a iper4Ä iper4æ iper4ǽ iper4e iper4Ä“ iper4o iper4ó 2i3pÄ“ 2ipé 2iph 2i3pi. 2i3pib 2i3pin 2i3piq 4i3pis. 4i3pisn 4i3pisq 4i3pisu 4i3pisv 2i3piu 2i3piv 2ipÄ«. 2i3pÄ«n 2ipÄ«q 2ipÄ«u 2ipÄ«v 4i3pÄ«Ìn 4i3pÄ«Ìq 4i3pÄ«Ìu 4i3pÄ«Ìv 2ipín 2ipíq i4písc 4ipísn 4ipísq 4ipísu 4ipísv 2ipíu 2ipív 2ipl ip2ne ipo4s3 2i3pu ipu3l 2ipú 2ir. i1r2a irad2 ira3g iras7cen iras5t i1r2æ iræ3d i1r2Ç£ irÇ£3d i1re i3re3d4 ire5di ir3e4me ire4mér ir5e4mim ir5e4mis ire4mít i3r2ex2 ire5xi ir1Ä“ iré4mer ir5é4mim i1rh i1r2i i2r3i2b iri4be i2r3i2m iri3n i1rÄ« ir3í2b i2r3í2m i1ro i1rÅ 1irr ir5réq 2irrh ir5rue i1ru i2rue i1ry i1rý 2is. is2ad i2s3al is3a4tr i2s3Ä2 isÄÌ2 is4ád 2i2sc is3cæ i5scendamus i5scendamú i5scendant i5scendat i5scendámus i5scendánt i5scendát i6scende. i6scendene i6scendeq i6scendeu i6scendev i5scendé i5scendim i5scendit i5scendít i5scendun i5scendún is7cens. is7censn is7censq is7censv i5scéndant i5scéndat i5scéndens i5scéndent i5scénder i5scéndes i5scéndet i5scéndim i5scéndit i5scéndun i5s6cénsa i5s6cénsæ i5s6cénse i5s6cénsi i5s6cénso i5s6cénsu. i5s6cénsum i5s6cénsus is4cid i3s4cis i4s5cis. i4s5cisn i4s5cisq is5cisu i4s5cisv is3ciu is3civ is3cÄ« is4cíd i5s4císs 2is2e 2isi i2s3i2c i2sie i2siÄ“ is4iue 2isí i2s3í2c 2ism 2isn 2iso 3i2sod 2isó 3isód i3spec is3per i5sperg isperi6n isperi6q isper7i6u isperi6v isperÄ«6n isperÄ«6q isperÄ«6u isperÄ«6v isperÄ«Ì6n isperÄ«Ì6q isperÄ«Ì6u isperÄ«Ì6v isperí6n isperí6q isperí6u isperí6v i5spers i3spex i3spéc i5spérg i5s4pérn i5spérs i3spéx is3pÄ« 2i2s3q i3s4tab i3s4tan i5s4taue i5s4taué i5s4tave i5s4tavé is4tÄb is4tÄt is4tÄu is4tÄv i3s4táb i4s5táe is5the is5thé i2sti i3stil i2stÄ« i2stí i3s4tíl i3stír is3to i5strin 2isu i4sue is3uis is3uís 2isú 2isv 2it. itas3t ita6ste 4itatem 4itates 4itatém 4itatés 4iter. ite3ra ite5re ite3ri iteri5ue iteri5v 4itern ite3rÅ 4iterq 4iteru ite5run 4iterv i3tÄ“. i3tÄ“n i3tÄ“q i3tÄ“u i3tÄ“v i3téq 4itérn 4itérq 4itéru 4itérv i3téu i3tév 2ith i4tial i4tiál 2itn 4itÅt 4i5tÅÌt 2itq i3tr it4ri 2itt 2itud i4t3ue. 2itÅ«d 2itúd 2itv 2iu. 2i1ua 2i1uÄ 2i1uá 2i1uæ 2i1uÇ£ 2i1uǽ 1iub2 1iuc 1iud 2iud. iu2d3u i1ue i3ue. i4uerÅ 2i1uÄ“ i1ué 1iug i1ui 2iuia 3i2uiÄ 3i2uiá 3i2uiæ 3i2uiÇ£ 3i2uiǽ iuid4 iui3g4 2iuii 2iuiÄ« 2iuií 2iuio 2iuiÅ 2iuió i5uis. i5uisn i5uisq i5uisu 4iuium 4iuius 2iuiú 2i1uÄ« i1uí 2i3uía iuí3g4 i3uísn i3uísq i3uísu 3iulÄ« 3iulu i2um iu3ma i3und 3iung 3iunx 2iuo 2i1uÅ 2i1uó 1iur iu2s3 i4us. 3iusd i4usn 3iusp i4usq i4usu i4usv 3iuua 3iuue 2i3uum 3iuuo 2i3uus 2i1uú 1iuv 1iu2x3 1iÅ« iÅ«n4e iÅ«n4Ä• i2Å«r iÅ«3rÄ“ iÅ«2s iÅ«2x3 1i2Å­ iÅ­2s iÅ­Ì3b i2ú iúb2 1iúd iú2du 1iúg iú3lu 2iúm i3únd 3iúng 3iúnx 1iúr iú2s3 1iú2x 2iva 2ivá 2ivæ 2ivǽ i3ve. 2ivia 3i2viÄ 3i2viá 3i2viæ 3i2viÇ£ 3i2viǽ ivi3g4 2ivii 2iviÄ« 2ivií 2ivio 2iviÅ 2ivió i5vis. i5visn i5visq i5visv 2iviu 2iviú 2ivÄ« 2i3vía iví3g4 i3vísn i3vísq i3vísv 2ivo 2ivó 2ivu 2ivú 2ix2 ix4eu ixo3r ixu3 i2x3ue ix4us 2iz Ä«2a Ä«a2m Ä«a2t Ä«2Ä Ä«Ä2tr Ä«ÄÌ4tr Ä«2ă Ä«2á2 Ä«2æ Ä«2Ç£ Ä«2ǽ Ä«b2 Ä«ba2 Ä«3bas Ä«3băs Ä«bá2 Ä«3bás Ä«be3rÅ Ä«bÄ•3rÅ­ Ä«bÄ«3u Ä«bÄ«3v Ä«bo2 2Ä«c Ä«ca2r Ä«5cene Ä«4c3enn Ä«3cÄ“ Ä«5cÄ•nÄ• Ä«4c3Ä•nn Ä«c3énn Ä«3ci Ä«3cÄ« Ä«3cÄ­ Ä«3cí Ä«2c3ue Ä«2c3u2t Ä«2c3Å­t Ä«3cú 2Ä«d2 Ä«da2r Ä«de2s Ä«dÄ“2s Ä«3do Ä«d4or Ä«3du Ä«dÅ«2 Ä«2e Ä«e2t Ä«2Ä“ Ä«2Ä• īé2 Ä«g2 Ä«3ga2 Ä«gá2 Ä«3gæ3 Ä«3gÇ£ Ä«3gn Ä«g4ne Ä«g4nu Ä«go2 2Ä«1h Ä«3ha Ä«3hă Ä«1i Ä«2Ä« 2Ä«l Ä«le2i Ä«le2r Ä«lé2 Ä«lo2 Ä«1m Ä«m2a Ä«m2e Ä«m2i Ä«m2Ä­ Ä«mo3 Ä«1n Ä«n2Ä Ä«ne2r Ä«n2Ä• Ä«né2 1Ä«nf Ä«no2 1Ä«n1s2 Ä«n2u Ä«2n3ue Ä«n2Å­ 2Ä«o Ä«o3n Ä«o4nn Ä«o4nq Ä«o4nv 2Ä«2Å 2Ä«Å 2īó 2Ä«2p Ä«3pa Ä«3pÄ Ä«3pă Ä«3pá Ä«3pæ Ä«3pÇ£ Ä«3pǽ Ä«3pe3 Ä«per2 Ä«3pÄ“ Ä«3pÄ• Ä«pÄ•3r4 Ä«pÄ•Ì3 Ä«3pé Ä«3ph Ä«3pi Ä«3pÄ« Ä«3pÄ­ Ä«3pÅ Ä«3pu Ä«3pÅ« Ä«3pÅ­ Ä«3pú Ä«1r Ä«r2a Ä«ra3g Ä«ra2r Ä«rÄs3 Ä«3r2ă Ä«ræ2ă Ä«rÇ£2ă Ä«3rÄ“u Ä«3rÄ“v Ä«ro2 Ä«ró2 Ä«sa2r Ä«sá2 Ä«s3cæ Ä«s3cÇ£ Ä«s3cÄ« 2Ä«s2e 2Ä«3s2Ä• Ä«s2i 2Ä«sÄ« 1Ä«2so 2Ä«sÅ 1Ä«2sÅ 1Ä«só Ä«2sq Ä«s4tíl Ä«s3tr Ä«2sue Ä«2suÄ• 2Ä«sÅ­ 2Ä«sú Ä«ta2r Ä«ta6ste Ä«tăs5t Ä«tă6stÄ• Ä«te5re 2Ä«tÄ“ Ä«tÄ•3rÄ• Ä«1u2 2Ä«ua 2Ä«uÄ 2Ä«uă 2Ä«uá 2Ä«uæ 2Ä«uÇ£ 2Ä«uǽ Ä«uid4 Ä«ui3g4 Ä«uÄ­3g2 Ä«uÄ­Ì3g4 Ä«uí3g4 Ä«2um Ä«2un Ä«uo2 2Ä«uÅ 2Ä«uu 2Ä«uÅ­ 2Ä«uú 2Ä«Å« Ä«2Å­ Ä«2ú 2Ä«va 2Ä«vÄ 2Ä«vă 2Ä«vá 2Ä«væ 2Ä«vÇ£ 2Ä«vǽ Ä«vi3g4 Ä«vÄ­3g2 Ä«vÄ­Ì3g4 Ä«ví3g4 2Ä«vÅ 2Ä«vu 2Ä«vÅ­ 2Ä«vú Ä«x2 Ä«x4eu Ä«xo4r Ä«2x3ue Ä«x4us Ä«xÅ«3r Ä«2Ì Ä«Ìb2 2Ä«Ìc Ä«Ì3ce Ä«Ì3cÄ• Ä«Ì3cÄ« Ä«Ì3cÄ­ 2Ä«Ìd2 Ä«Ì3g2 Ä«Ìg4n 2Ä«Ìh Ä«Ì5hai Ä«Ì5hăĭ Ä«Ì1i Ä«Ì3lu Ä«Ì1m2 Ä«Ì3met Ä«Ì3mÄ•t 3Ä«Ìn3s2 Ä«Ì3r2ă Ä«Ì3sÄ• Ä«Ì4s3t Ä«Ìs5tr 2Ä«ÌÅ« 2Ä­a 2Ä­Ä Ä­Ä4trÄ Ä­1Ä2x 4Ä­ÄÌn Ä­3ÄÌ2x 2ĭă ĭăb2 ĭă4cÄ•Ì Ä­2ăcÅ­ ĭăd2a ĭă2dă ĭăd2æ ĭăd2Ç£ ĭăd2ǽ ĭăd2Ä“ ĭă3d2Ä• ĭăd2Ä« ĭămb2 ĭămbÄ«5n ĭămbÄ«5u ĭămbÄ«5v ĭămbÄ«Ì5n ĭămbÄ«Ì5u ĭămbÄ«Ì5v ĭăm5bÅ­ ĭă2m3Ä­ Ä­3ăng ĭă2nÄ­ Ä­2ănt Ä­1ă2p Ä­2ăq Ä­2ăr ĭă3rÄ• ĭă3s4pÄ• ĭăs3t ĭăs5tÄ• ĭăs5tr Ä­2ăt Ä­2ău Ä­2ăv Ä­2ăÌc ĭăÌ3d Ä­3ăÌl Ä­2ăÌm ĭăÌm3b4 ĭăÌ2n Ä­3ăÌng Ä­2ăÌr 2ĭá 2ĭæ ĭæ2ă ĭæ2Å­ 2Ä­Ç£ Ä­Ç£2ă Ä­Ç£2Å­ 2ĭǽ Ä­bÄ•3rÅ­ Ä­b2Ä« Ä­bÄ«3u Ä­bÄ«3v Ä­b2Ä­ Ä­b2Å Ä­bÅ3l Ä­b2r Ä­3b2Å« Ä­b4Å«Ì Ä­3bÅ­m 2Ä­3ca 2Ä­3cÄ 2Ä­3că 2Ä­3cá 2Ä­3cæ 2Ä­3cÇ£ 2Ä­3cǽ Ä­3cÄ“n 2Ä­3cÄ«s Ä­3cÄ«Ìs 2Ä­3cÅ 2Ä­3cÅ Ä­2cu Ä­c2Å« 2Ä­d Ä­3dă Ä­3dÄ“ Ä­dÄ“3m Ä­dÄ“2s Ä­3d2Ä• Ä­3dÄ« Ä­3dÄ­ Ä­dÄ­3g Ä­dÄ­Ì3g Ä­d3Ä­Ìp Ä­2d1u Ä­3d2Å­ Ä­d4Å­Ä• 2Ä­2e2 2Ä­Ä“. 2Ä­Ä“g 4Ä­Ä“nÄ• 2Ä­Ä“q Ä­Ä“2s Ä­3Ä“sa Ä­3Ä“sÄ“ Ä­3Ä“sÄ• Ä­3Ä“sÄ« Ä­Ä“s3p Ä­Ä“s3t 2Ä­Ä“u 2Ä­Ä“v 2Ä­Ä“Ìg 4Ä­Ä“Ìq Ä­Ä“Ì2s Ä­3Ä“ÌsÄ“ Ä­3Ä“ÌsÄ• Ä­3Ä“ÌsÄ« 4Ä­Ä“Ìu 4Ä­Ä“Ìv 2Ä­Ä•. 2Ä­1Ä•g 2Ä­Ä•Ä« 2Ä­2Ä•m 2Ä­Ä•Å 2Ä­Ä•q Ä­Ä•3r2Ä• Ä­3Ä•rm 2Ä­Ä•tÄ“ 2Ä­Ä•tÄ• 2Ä­Ä•tÄ« 2Ä­Ä•tÄ­ 2Ä­Ä•tÅ­ 2Ä­Ä•u 2Ä­2Ä•Å­ 2Ä­Ä•v 2Ä­3Ä•Ìg Ä­Ä•Ì3rÄ• 4Ä­Ä•ÌtÄ• 4Ä­Ä•ÌtÄ­ 2ĭé Ä­fÄ•6stÄ• 1Ä­g2a 1Ä­gá 1Ä­g2æ3 1Ä­g2Ç£ 1Ä­gǽ 4Ä­gÄ•na 4Ä­gÄ•nÄ 4Ä­gÄ•nă 4Ä­gÄ•ná 4Ä­gÄ•næ 4Ä­gÄ•nÇ£ 4Ä­gÄ•nǽ 4Ä­gÄ•nÄ“ 4Ä­gÄ•nÄ•n 4Ä­gÄ•nÄ•q 4Ä­gÄ•nÄ•u 4Ä­gÄ•nÄ•v 4Ä­gÄ•nÄ« 4Ä­gÄ•nÅ 4Ä­gÄ•nÅ­ 3Ä­gÄ•s 4Ä­gÄ•Ìnă 4Ä­gÄ•ÌnÄ• 3Ä­gĭă 3Ä­gÄ­b 3Ä­gÄ­Å­ Ä­2gn Ä­g3nÄt Ä­g5nÄÌt Ä­g3nÄ“ Ä­g3nÄ­ Ä­3gr Ä­1h Ä­hÄ­Ì3 Ä­1i 2Ä­Ä« Ä­3Ä­2ă ĭĭăm3 2Ä­le 2Ä­3lÄ“ Ä­lÄ“3i Ä­lÄ“Ì3i 2Ä­3lÄ• 2Ä­lé 2Ä­3lÄ« 2Ä­3lÄ­ 2Ä­llÄ• 2Ä­llÄ« 2Ä­llÅ 2Ä­llÅ­ Ä­2l1u Ä­1m Ä­2măd Ä­măs3 Ä­m3b2 Ä­mbÄ«3n Ä­mbÄ«3u Ä­mbÄ«3v Ä­mbÄ«Ì5n Ä­mbÄ«Ì5u Ä­mbÄ«Ì5v 4Ä­5mÄ•tr 4Ä­mÄ•Ìtr Ä­m2Ä­ Ä­mÄ­2ă 3Ä­2mÄ­Ä“ 3Ä­2mÄ­Ä• 3Ä­2mÄ­Ä­ 2Ä­mÄ­n Ä­4mÄ­nÄ“ Ä­4mÄ­nÄ• 1Ä­mm 1Ä­mp Ä­mpÄ•5rÄ« Ä­2mu 2Ä­mÅ­r Ä­n1a 2Ä­3nă Ä­n4ăn Ä­n4ăq Ä­n4ău Ä­n4ăv Ä­n1æ Ä­ndÄ­5st Ä­n4d3Å­Ä• Ä­n4d3Å­Ä« Ä­n4d3Å­Ä­ Ä­n4d5Å­ÌÄ• Ä­n4dÅ­ÌÄ­ Ä­n3e 2Ä­3nÄ• Ä­nÄ•2d Ä­n4Ä•n Ä­n4Ä•u Ä­n4Ä•v Ä­nÄ•2x Ä­nÄ•Ì4d 3Ä­ngr 1Ä­2n1i 2Ä­nÄ« Ä­3n4Ä­b Ä­n5Ä­bÄ­ Ä­nÄ­2c Ä­3n4Ä­s Ä­nÄ­2t Ä­nÄ­Ì4cÄ­ Ä­3nÄ­Ìs 1Ä­nj 2Ä­3nÅ Ä­nÅ4p Ä­nÅ3s2 4Ä­nt. 3Ä­ntÄ• Ä­ntÄ•5rÅn 4Ä­ntn 4Ä­ntq 4Ä­ntu 4Ä­ntv 1Ä­nu Ä­n1Å«2 Ä­nÅ«Ì4b 1Ä­nÅ­ 1Ä­nv 2Ä­Å 2Ä­Å Ä­Åb2 Ä­Å2bÅ Ä­Åm2 Ä­2Ån Ä­2År Ä­Å3rÄ« Ä­Å2s Ä­ÅÌ2b Ä­2ÅÌn Ä­2ÅÌr 2Ä­pÄ 2Ä­pÄ“ 2Ä­pÄ• Ä­pÄ•3rÄ• Ä­pÄ•3rÅ Ä­pÄ•3rÅ 2Ä­pÄ«. 2Ä­3pÄ«n 2Ä­pÄ«q 2Ä­pÄ«u 2Ä­pÄ«v 4Ä­3pÄ«Ìn 4Ä­3pÄ«Ìq 4Ä­3pÄ«Ìu 4Ä­3pÄ«Ìv 2Ä­3pÄ­ 2Ä­pl Ä­p2n 2Ä­ps. 2Ä­psn 2Ä­psq 2Ä­p2su 2Ä­psv 2Ä­pÅ­ 2Ä­q Ä­3qu Ä­1r2a Ä­1ră Ä­1r2æ3 Ä­1r2Ç£ Ä­rÇ£3d Ä­r1Ä“ Ä­1rh Ä­1rÄ« Ä­2r1Ä­2 Ä­rÄ­Ì2 Ä­1rÅ Ä­1rÅ 2Ä­rrh Ä­1rÅ­ Ä­r4Å­n Ä­1ry 2Ä­s Ä­2s3Ä2 Ä­sÄÌ2 Ä­2s1ă Ä­s2ăd Ä­2sc Ä­s3cÄ« Ä­3s4cÄ­s Ä­5s6cÄ­Ìss Ä­2si Ä­s1Ä­ Ä­sÄ­2c Ä­sÄ­Ì4c Ä­3spÄ•c Ä­s3pÄ•r Ä­5spÄ•rg Ä­spÄ•rÄ«6n Ä­spÄ•rÄ«6q Ä­spÄ•rÄ«6u Ä­spÄ•rÄ«6v Ä­spÄ•rÄ«Ì6n Ä­spÄ•rÄ«Ì6q Ä­spÄ•rÄ«Ì6u Ä­spÄ•rÄ«Ì6v Ä­spÄ•4r5Ä­ Ä­5spÄ•rs Ä­3spÄ•x Ä­5spÄ•Ìc Ä­spÄ•Ì4r5 Ä­5spÄ•Ìrg Ä­5spÄ•Ìrn Ä­5spÄ•Ìrs Ä­5spÄ•Ìx Ä­s3pÄ« 3Ä­ssÄ­s Ä­s4tÄb Ä­s4tÄns Ä­s4tÄt Ä­s4tÄu Ä­s4tÄv Ä­s4tÄÌb Ä­3s4tăn Ä­3s4tÄ•m Ä­5s4tÄ•Ìm Ä­3s4tÄ­m 2Ä­t. Ä­3tÄ“. Ä­3tÄ“n Ä­3tÄ“q Ä­3tÄ“u Ä­3tÄ“v Ä­3tÅt Ä­3tÅÌt 2Ä­tÅ Ä­3tr Ä­2tu 2Ä­3tÅ­r Ä­3tÅ­Ìr Ä­1u Ä­3uÄ• 2Ä­uÄ« Ä­1Å«s 2Ä­Å­2 Ä­1Å­b Ä­3Å­nd Ä­3Å­Ìnd Ä­3vÄ• 2Ä­vÄ« Ä­x2a Ä­x2Ä Ä­x2ă Ä­x2Ç£ Ä­x2Ä• Ä­x2Ä« Ä­x2Ä­ Ä­x2Å Ä­x2Å Ä­2xu Ä­x2Å­ Ä­2Ì 2Ä­Ìă Ä­Ìb2Ä« Ä­ÌbÅ3l Ä­Ìb2r 2Ä­Ìd Ä­Ì2d3u Ä­Ì2Ä• 2Ä­ÌÄ•t 3Ä­Ìgĭă 3Ä­ÌgÄ­b 3Ä­ÌgÄ­Å­ 2Ä­Ìl Ä­Ì5lÄ­n Ä­Ìl3u Ä­Ìm3b2 3Ä­ÌmÄ­Ä­ Ä­Ì4mÄ­nÄ“ Ä­Ì5mÄ­nÄ« 3Ä­Ìmm Ä­Ìn4d5Å­Ä« Ä­Ìn4dÅ­Ä­ Ä­Ìn3Ä•s Ä­Ìn3Ä« 3Ä­Ìnj Ä­ÌnÅ4p 3Ä­ÌntÄ•5 Ä­Ìn5Å­Ä«s Ä­Ìn5Å­Ås Ä­Ìn5Å­Å­m Ä­Ìn5Å­Å­s Ä­ÌÅ1 Ä­ÌrÄ­4m 2Ä­Ìs Ä­Ì4spÄ•r 5Ä­ÌssÄ­s Ä­Ì5s4tÄn Ä­Ìs4tÄ•m 2í2a íad2 ía3g ía1m ía1s íb2e íbe3r íb2i íb2Ä« íb2o íbo3l íb2r íb2u í3bum 2íc. 2íca 2íce. 2ícem 2íces 2ícet 2í3ci. 2í3cis 2ícl 2ícn 2íco 2ícq 2íct í2c3u2t 2ícv 2íd í3d2e íd2i íd2u í3duu í2e1 2íei 2íeÄ« 2íen 2íeo 2íeÅ 2íeq 2íet 2íeu 2íev 2íf ífe1 íg2a í3gæ 4ígena 4ígenÄ 4ígenæ 4ígenÇ£ 4ígenÄ“ 4ígeni 4ígenÄ« 4ígeno 4ígenÅ 4ígenu í2giÄ« í2giŠí2gn 2í1h í3ha í1i 2íi. í2im 2í2is í2it í3li 2ílle 4ílli. 4íllis 2íllÄ« 2íllo 2íllÅ 2íllu íl1u í2lua í2luÄ Ã­2luæ í2luÇ£ í4luis íl4uit í4luiu í4luÄ«s í2luu 2í1m2a 2ím3b2 ím2e 2ímet ím2i í4minÄ“ í5minÄ« 1ímm 2ímn í1mo ímpe3 2ímq ím2uÄ« 2ímv ín2a ín3de ín4d3i4g índo4 ín4d3ol ín4due ín4d3ui ín4d3uÄ« 2íne íni4cit ín1Ä« 1ínj ín3o4p 1ín1s2 ín2t ínte3 ínte5r 2ínth 2íntn ín3to 2íntq 2íntu 2íntv í1nu ín2ua ín2uÄ Ã­n2uÄ“ ín2ul í3nus 2í2o1 2íp ípe3 í3pi í2pn ípte3 ípu3l í1r ír2a íra3g ír3i4be ír3i4bÄ“ ír3i4ma ír3i4mÄ Ã­r3i4me ír3i4mÄ“ ír3i4mi ír3i4mÄ« ír3i4mo ír3i4mÅ 1írr ír5rue í2rue 2ís í2s3c ís4cid ís2i í2s3i2c í4sper ís3pÄ« ís3q ís4tans í3s4tÄn ís4tem ís5tim ís5tin ís3to ís3uis íte1 í2tu í3tu. í3tui 4ítuis 4ítuÄ«s í3tum 2ítuo 2ítuŠí3tus 2ítut í1u2 2íu. í3ub 2íud 2íuia 3í2uiÄ 3í2uiæ 3í2uiÇ£ 2íuii 2íuiÄ« 2íuio 2íuiÅ 2íuiu 2í2um í2un íuo1 2ívia 3í2viÄ 3í2viæ 3í2viÇ£ 2ívii 2íviÄ« 2ívio 2íviÅ 2íviu ívo1 2íx íx2a íx4eu íx2i íx2Ä« íx2o íx2Ší2xue íx4us 1j j2a jab2 jad2 jadæ3 ja2x3 jÄn2 2jÄx jăd2 já2x jece3 je1r jes5tÄ jex2i je2xu jÄ“3sÅ« jÄ•1r jÄ•3r4Ä• jÄ•s3 jé2xu jo1 jo2a jon2 jo2s jón2 jub2 ju3ma ju3ri ju2s3 ju2x3 j2Å« jÅ«n4e jÅ«n4Ä• jÅ«3rÄ“ jÅ«2s jÅ«2x3 j2Å­ jÅ­2s jÅ­Ì3b júb2 jú2s3 jú2x 1l l2a la3b2 lab4a labÄ«3u labÄ«3v lab4u la3cr la4c3ue la3cÅ« lad2 lae4s5t la3g la2i la3s4pe la3spé las3t las5tr late4i latÄ“2 la3tr la5trí laÍže4st laÍ¡e4st l2Ä lÄ3cr lÄ3g lÄ2ia lÄ2ic lÄ4iÄ«s. lÄ6iÄ«sne lÄ6iÄ«sque lÄ6iÄ«sue lÄ6iÄ«sve lÄ6iÄ«Ìsne lÄ6iÄ«Ìsque lÄ6iÄ«Ìsue lÄ6iÄ«Ìsve lÄ2iu lÄ2iú lÄ2Ä­ lÄÌ3cr l2ă lă3b2 lăbÄ«3u lăbÄ«3v lă3cÅ« lăs3t lăs5tă lăs5tr lă5trÄ­ l2á láb2 lá4c3ue láe2c3 láes5t lá3g lá2i læ2a læ2ă læ2á læ3d læ2i læ3q læ2st læ3ue læ3uÄ• læ2Å­ læ3v lÇ£2a lÇ£2ă lÇ£3d lÇ£3q lÇ£2st lÇ£3ue lÇ£3uÄ• lÇ£2Å­ lÇ£3v lǽ2c1 lǽ2st 2lb2 l3bi lbÄ«3u lbÄ«3v l3bu l3bÅ­ 2lc lce1 2ld lda1 lde3 l2e le3br le3bu le2e le3go le3gÅ le2iá le2ii le2ií le2io le2ió le2iu le2iú le3l lelu3 le1r ler2æ3 lere3Ä ler4i le3rÄ« 2l3ers 2l3ert les3c le2s3p les3t le2un le2ur leu5rá leu5re leu5ré lex2 le3x4e le3xi lexu3r lexÅ«3r l2Ä“ lÄ“3bu lÄ“3bÅ­ lÄ“2iá lÄ“2ie lÄ“2iÅ lÄ“2iu lÄ“2iú lÄ“3ne lÄ“3nÄ• lÄ“2sp lÄ“s3t 3lÄ“x l2Ä• lÄ•2ă lÄ•3gÅ lÄ•2Ä­ 2lÄ•p lÄ•3r4Ä• lÄ•rÄ•3Ä lÄ•3rÄ« lÄ•3rÅ 2l3Ä•rs 2l3Ä•rt lÄ•3rÅ­ lÄ•s3 lÄ•x2 lÄ•xÅ«3r l3Ä•Ìrs l3Ä•Ìrt lÄ•Ìs3 lé3br 3lég lé3iÅ 2l3érs 2l3ért lés3t lé3uÅ léx2Ä« 2lf 2lg2 l3ga l3gæ3 l3gÇ£ l2i li2a 3libe li3g4ni li2i 3liÄ« lin2Ä lino3s li3q li4s3c lis5ci li4st lis5ta lis5tÄ li3u2b 4liud 2lix lÄ«3q lÄ«2xu lÄ«Ì3q l2Ä­ lÄ­4ÄƒÌ 3lÄ­bÄ• lÄ­4Ä“n 3lÄ­Ä• 3lÄ­Ä« 3lÄ­m 3lÄ­n lÄ­n2a lÄ­n2Ä lÄ­n2æ lÄ­n2Ä• lÄ­nÄ­5tÄ• lÄ­nÄ­5tÅ lÄ­s3 lÄ­4st lÄ­s5tÄ lÄ­s5tă 2lÄ­Å­d lí4c3ue lí3q lí3tur 2lj 2ll2 lle2i lle2x llÄ“2i lli4c3u llu2d3 llÅ«2 l3lÅ­ llú2 2l1m2 2l1n2 l2o lo2a3 lo2Ä lo2á lo3b2 lo4bn lo4cue lo2e logæ3 longÇ£4u longÇ£4v lo3ni lo5ni5c lo5níc lo4rn lo4rq lo4rv lo2sp los3t lo2x3 lÅ3d2 lÅe2 lÅ3r lÅÌr2 lÅÌ4s5t l2Å lÅ2Ä lÅb2 lÅngÇ£4u lÅngÇ£4v lÅ2s ló2x 2lp lpe3r2 lpÄ•3rÄ• l3pi l3pÄ­ lpo4s3 2lq 2l1s2 l2s3t 2lt lte1 lter4a lte5re lte5ré lteri5ue lteri5v lte5rÄ« lterÄ«5ue lterÄ«5v ltÄ•3r4a ltÄ•3rÇ£ ltÄ•5rÄ« ltÄ•rÄ«5u ltÄ•rÄ«5v ltéri5t l1uÄ l1uă l1uÇ£ l2u3b2 lu3do l3uea l3ueÄ l3ueá l3uee l3uei l3ueÄ« l3ueí l3ueo l3ueÅ l3ueó 2lues lue6ste l3ueú 2l3uÄ• luÄ•6stÄ• l3uée 2l3uia 2l3uiÄ 2l3uiá 2l3uiæ 2l3uiÇ£ 2l3uiǽ 2l3uic 2luif 2l3uii 2l3uiÄ« 2l3uií 2l3uio 2l3uiÅ 2l3uió l3uium l3uius 2l3uiú l1uÄ­ 2l3uía 2luíc 2luíf l3uína l5uínen l5uíneq l5uíneu l2um lumi3 3l2un l1uÅ lu1r luru3 lusa4t lu2s3Ä2 lu2tÄ« lu3xo lÅ«3d lÅ«ru3 lÅ­3b2 2lÅ­c 2l1Å­2t lÅ­Ì4s lÅ­Ìs5t lÅ­Ì3u lÅ­Ì3v lúb2 lú3ia lú1r 2lv2 lve6ste lvÄ•6stÄ• 2l2x2 lx3u lý2c 2lz 1ma. 1mab2 m1ad ma2du 3m2ae ma2ga ma2gÄ ma2gá ma2ge ma2gé ma2gÄ« ma4g3n ma2gÅ ma2gu ma2gú ma1i ma4ia. ma4iae ma4iam ma4ian ma4iaq ma4iar ma4ias ma4iau ma4iav ma4iaÍž ma4iaÍ¡ ma4iÄ. ma4iÄn ma4iÄq ma4iÄr ma4iÄs ma4iÄu ma4iÄv ma4iÄÌn ma4iÄÌq ma4iÄÌr ma4iÄÌs ma4iÄÌu ma4iÄÌv ma4iáe ma4iám ma4ián ma4iár ma4iás ma4iáu ma4iáv ma2iæ ma2iÇ£ ma2iǽ ma4iis ma4iÄ«s ma4iÄ«Ìs ma4iís ma3io ma3ió ma2iq ma4iue ma3iú ma2iv 1mal mali3g4 malí3g4 mal4ui ma4l3uÄ« m1am mam4b3i4 mambÄ«4 mambÄ«Ì4 mam4b3í4 m2ami 1man ma3ni. ma3nin ma3niq ma3nis ma3niu ma3niv ma3nín ma3níq ma3nís ma3níu ma3nív man3s man5s4i mansi5u mansi5v man5s4í 1m2a3q ma2rÄ m2aru 3masi 3masí mas2p mas3t 1mat ma3tr 1m2au 1mav 3m2aÍž 3m2aÍ¡ 1m2Ä m3Äc mÄn3sa mÄn3să mÄn5s4i mÄn3s4Ä« mÄnsÄ«5n mÄnsÄ«5q mÄnsÄ«5u mÄnsÄ«5v mÄn5s4Ä­ 2m3Ä2x m3ÄÌc mÄÌn5s6i mÄÌn5s6Ä­ 2m3ÄÌ2x 1mă. m1ăd mă2gÄ mă2gă mă2gÄ« mă2gÅ mă2gÅ mă2gÅ­ mămbÄ«4 mămbÄ«Ì4 măm4b3Ä­ 1m2ăn 3mănÄ• 2m3ănÄ­ mă4nÄ­Ì 3măntÄ“ 3m2ă3q m3ă2rÄ mă4răn mă4răt mă4rÄ•r mă4rÄ•t m3ă2rÅ măs2p 1m2ăt 3m2ău 3m2ăv 1m2ÄƒÌ 4m3ăÌnÄ­ 1má 3m2áe má4gn má1i má4iÄ«s má3io má4luÄ« mám4b3i m2án mán3s4i m2ár 2máræ m2áu 1m2æ mæ2a mæ2ă mæ2á mæ2i mæ2st mæ2Å­ 1m2Ç£ mÇ£2a mÇ£2ă mÇ£2st mÇ£2Å­ 1m2ǽ 2mb m2b3ag mb2al m4baru m4barv m2bă m3băÌr mb2ác mbæ3 m3be. m3bea m3beá m2be4d m3ben m3beo m3beó m3b2eq mb3es m3beu m3beú m3bev m2b3Ä“s m2bÄ•d m3bÄ•n mb3Ä•Ì4d m2bé2d m2bés m4b3iam m4b5iant m4b3iar m4b3ias m4b5iat. m6b5iatis m6b5iatís m4b5iatn m4b5iatq m4b5iatu m4b5iatú m4b5iatv m4b3iÄm m4b3iÄr m4b3iÄs m4b5iÄti m4b5iÄtí m4b5iÄtu m4b5iÄtú mb3iÄÌ m4biÄÌm m4biÄÌr m4biÄÌs m4biÄÌt m2b3iá mb2i3c m2bie mbi3eg m2biÄ“ m2bié mbi3ég mb6igene m2bii m2b3iÄ« m2b3ií m4b3i4mi mbi4mur mbi4múr m4b3io. m4b3ion m4b3ioq m4b5ior. m4b5iorn m4b5iorq m4b5ioru m4b5iorv m4b3iou m4b3iov m2b3iÅ m2b3ió m4b3iss m4b3ist m4b3i4ta m4b3i4tá m4b3i4tæ m4b3i4tǽ m4b3iti mbi4ti. mbi4tib mbi4tin mbi4tió mbi4tiq mbi4tiu mbi4tiv mbi4tín mbi4tíq mbi4tíu mbi4tív mb3ito mbi4tor mbi4tos mbi4tór mbi4tós m4b5i4tu. m4b5i4tum m4b5i4tun m4b5i4tuq m4b5i4tur m4b5i4tus m4b5i4tuu m4b5i4tuv m4b3i4tÅ« mb3i4tú m2b3iú m4bive m2bÄ«2 mbÄ«Ì2 mbÄ«Ì4t m4b3Ä­Äm m4b3Ä­Är m4b3Ä­Äs m4b5Ä­ÄtÄ­ m4b5Ä­ÄtÅ­ mb3Ä­ÄÌ m4bÄ­ÄÌm m4bÄ­ÄÌr m4bÄ­ÄÌs m4bÄ­ÄÌt m2b3ĭă mb2Ä­3c m2bÄ­Ä“ m2bÄ­Ä• mb6Ä­gÄ•nÄ• m2b3Ä­Ä« m2bÄ­Ä­ m2b3Ä­Å m4b5Ä­År. m4b5Ä­Årn m4b5Ä­Årq m4b5Ä­Åru m4b5Ä­Årv m4b3Ä­ÅÌ m4b3Ä­tÄ­ m4b3Ä­4tÅ« m4b5Ä­4tÅ­m m4b5Ä­4tÅ­s mbÄ­6tÅ­Ìm mbÄ­6tÅ­Ìs m2b3Ä­Å­ m4b3Ä­ÌÄ• m4b3Ä­ÌÄ­ m4b5Ä­Ì4tÄ­ mb1í mb2í3c m2bíe mb4ígen m2bíi m4bí4mi m4b3íss m4b3íst mbí2t mbí4tu. mb4ítui mb4ítuÄ« mbí4tum mbí4tus mb2l mb2o mbo3r mb2Å m3b2r m3bu m5bus. m5busn m5busq m5busu m5busv m2b3Å«s m3bÅ­ 2mc2 2md2 mde3d mde2s mdÄ“2s mdÄ•3d m3do md4or 1me mea3p2 meá3p2 m2eb med2 me4dam me4dan me4dat 2me2dÄ me4dám me4dán me4dár me4dát me4deb me4den me4der me4det 2me2dÄ“ me4déb me4dén me4dér me4dét med4i me4dim 2me2dÄ« me4dím me4dít med4o me4dor me4dÅ. me4dÅq me4dÅu me4dÅv me4dór me4due me4dún me2e mee3ri mee3rí m1eg me2ge me2gé me2gi me3go me3iá me3ie me3io me3ió me2it me3iú me3íp m2em m2en 3mena 3mená men2e me3neu 3mené 3meni 3mení me3p2 m1eq m2er me3ra me3rÄ“ me3ri 4merim me3rÄ« 2m3erm me3ro me3rÅ me3r2u 2m3eso me4so. me4son me4soq me4sor me4sou me4sov 2m3e2só me2sp 2m3ess 5messat 5messát mes3t me2su m4esue 4m3esum 4m3esus 2m3e2sú 3mete mete3r meteri5ue meteri5v 3meté 2mets me2un m2ev m2e2x 1mÄ“ mÄ“4der mÄ“4dÄ“r mÄ“4dÄ•r mÄ“4dér mÄ“4dim mÄ“4dit mÄ“4dÄ­m mÄ“4dÄ­t mÄ“4dít mÄ“2du m1Ä“g mÄ“2ge mÄ“2gÄ“ mÄ“2gÄ• mÄ“2gé mÄ“2gi mÄ“2gÄ­ mÄ“2gí mÄ“3i m2Ä“l m2Ä“m m2Ä“n mÄ“3ne mÄ“3p2 3mÄ“q m2Ä“r 2m3Ä“4sa 2mÄ“2sÄ 2mÄ“2să 2mÄ“2sá 2mÄ“sæ 2mÄ“sÇ£ 2mÄ“sǽ 2mÄ“sÅ mÄ“s3t mÄ“2su 4mÄ“sum 4mÄ“sus 2mÄ“2sÅ­ 2mÄ“sú 3m2Ä“u 3m2Ä“v mÄ“Ì4der mÄ“Ì4dÄ•r mÄ“Ì4dim mÄ“Ì4dit mÄ“Ì4dÄ­m mÄ“Ì4dÄ­t mÄ“Ì4gi mÄ“Ì4gÄ­ mÄ“Ì3i mÄ“Ì3p2 4mÄ“Ìsa 4mÄ“ÌsÄ 4mÄ“Ìsă 4mÄ“Ìsæ 4mÄ“ÌsÇ£ 4mÄ“ÌsÅ 4mÄ“Ìsum 4mÄ“Ìsus 4mÄ“Ì4sÅ­ m2Ä“Ìu m2Ä“Ìv 1mÄ• mÄ•2ă m1Ä•d2 2mÄ•2dÄ 2mÄ•4dă 2mÄ•2dÄ“ 2mÄ•2dÄ• 2mÄ•2dÄ« 2mÄ•d4Ä­ mÄ•4dÄ­s mÄ•4dÅ. m2Ä•dÅ mÄ•4dÅr 2mÄ•2dÅ­ mÄ•2Ä• 2mÄ•g mÄ•2Ä­ mÄ•3Ä­p m2Ä•m m2Ä•r 4mÄ•răm mÄ•3rÄ“ mÄ•3r4Ä• mÄ•3rÄ« 4mÄ•rÄ­m 4mÄ•rÄ­n 2m3Ä•rm 3mÄ•3rÅ mÄ•3rÅ­ mÄ•2sp m2Ä•t mÄ•2t3Ä­ 2mÄ•ts m2Ä•Ì m3Ä•Ì2d 5mÄ•ÌntÄ•r 5mÄ•ÌntÄ­Å 5mÄ•ÌntÄ­Å­s m3Ä•Ì2q mÄ•Ìr6ĕă 4m3Ä•Ìrm 5mÄ•Ìtr 4mÄ•Ìts 1mé mé4der mé4dim mé4dit mé2du mé3i mé4is m2ém 5ménter 5méntio 5méntius mé3p2 m2ér mér4e 4mérim 2m3érm mér4ui mér4uÄ« 4mérun 2mésæ 2méso 2m3éss 4méste 4méstn 4mésto 4méstq 4méstu 4méstv mé2su 4mésu. m4ésue 4mésum 4mésus 2méts 3méu 3mév mé2x 2mf mge6ste mgÄ•6stÄ• 2m1h 1mi m2ia. mi3ad m2iae mi3a2g mi3al m2iam miam4b3 mia2p m2ias mi3ass mi3atr m2iaÍž m2iaÍ¡ m2iÄ mi3Ätr mi3ÄÌx mi3áss m2iæ m2iÇ£ mi2be mi2bé m3ict m2id 3mie. 3mieq 3mieu 3miev m2ig m2iÄ«s m2il mi3n4a min2Ä min4e min2i mini3m min4in min4iq min4is min4iu min4iv mi3n4Ä« miní4ci min4ín min4íq min4ís min4íu min4ív m2i3n4u minu3d min2Å« minÅ«3d mi3nú m2io mio2s m2iÅ m2ió m2is mi3sa mi3sá mi4s5ci mi3scr mis2i mi4sn mi3s2p mi4sq mi4s5ta mis5tÄ mis5te mi4sv m6itate. 5mitatem m6itatene m6itateq 5mitates m6itateu m6itatev 5mitatém 5mitatés m4itati m4itatí m6itatum m6itatúm m4itáte 5mitátem 5mitátes m4itáti m6itátum mi2tÅ« mi4um 2miur m2i1Å« m2iú mi3úst 1mÄ« 2mÄ«c m2Ä«n mÄ«3nÄ• m2Ä«3q m2Ä«s. mÄ«2sc m2Ä«sn mÄ«3so mÄ«3sÅ m2Ä«sq m2Ä«su m2Ä«sv mÄ«3ue. mÄ«3uÄ•. mÄ«3ve. mÄ«3vÄ•. mÄ«Ì4ba mÄ«Ì4bÄ mÄ«Ì4bă mÄ«Ì4be mÄ«Ì4bÄ• mÄ«Ì4bo mÄ«Ì4bÅ mÄ«Ì4bÅ mÄ«Ì4bu mÄ«Ì4bÅ­ 2mÄ«Ìc m2Ä«Ìn m2Ä«Ìq 1mÄ­ 3mÄ­a 3mÄ­Ä mÄ­3Ätr mÄ­1ă 3mĭă. mĭă2g 3mĭăm 2mĭăr 3mĭá 3mĭæ 3mÄ­Ç£ 3mĭǽ 3m2Ä­b mÄ­4cÄ­t 2mÄ­cÅ 3mÄ­Ä•. mÄ­4Ä•n 3mÄ­4Ä•q 3mÄ­4Ä•u 3mÄ­4Ä•v 3mÄ­Ä«s 3m2Ä­l mÄ­n2Ä mÄ­n4Ä• 4mÄ­nÄ•Å mÄ­3n4Ä« mÄ­n2Å« mÄ­nÅ«3d mÄ­nÅ«3t 3m2Ä­3n4Å­ 3mÄ­Å mÄ­3r mÄ­3s4ă mÄ­3scr mÄ­3s2p mÄ­s5tÄ mÄ­4s5tă mÄ­s5tÄ• m3Ä­2tÅ« mÄ­1Å« 3mÄ­Å­ 3mÄ­Ìă mÄ­Ì4cÄ­ mÄ­Ì3d mÄ­4Ìn mÄ­Ì3sp mÄ­4Ìt 1mí mí2ba mí2be mí2bu m3íct mí1m mí3n4u mí3s2p mí4tiÅ mí4tiu mí3tuu 2ml2 m3lu 2m1m2 mmi6sta 2m1n2 m3ne m3nÄ“ m3né 1mo. 2mob mob3r 1moc modes3 m2oe mo2Ä« 1mol 1m2on mo3ni monó3 mon4s3 mo3n2u 1moq 1m2or mo3rÄ« 3m2os 1mou 1mov 1mox m2oÍ¡ 1mÅ m2Ån mÅn4s3 2mÅrd m2Ås mÅs3t mÅÌn4s 4mÅÌrd 1mÅ 3mÅ. mÅ2c mÅ2Ä« 3mÅn 3mÅq m2År mÅ3rÄ• mÅ3rÄ« 3mÅs mÅs2p 3mÅu 3mÅv mÅÌb3 m2ÅÌr mÅÌ3rÄ­ 1mó 2m1ób mó2c m2óe món4s3 m2ór 3m2ós m2Å“ 2mp mpe4ior mpe4iór mpe4iu mpe4iú mpe3r4a mper4Ä mpe5rem mpe5r4er mpere5ra mpere5ri mpere5rÅ mpe5res mper4Ä“ mperi4b mpe6riens mper6iere mper6ieris mper6ierís mper6iÄ“n mper6iÄ“re mper6iÄ“Ìn mper6iÄ“Ìre mper6iére mper4im mpe5rimi mpe5rimur mperi6mus mpe5rimúr mperi6mús mper4ir mperi6re. mperi6rem. mpe5riremi mperi6remn mperi6remq mperi6remue mpe5riremur mperi6remus mpe5riremúr mperi6remús mperi6remv mperi6rene mperi6rent. mperi6rentn mperi6rentq mperi6rentue mpe5rirentur mpe5rirentú mperi6rentv mperi6req mpe5rirer mperi6res mperi6ret mperi6reu mperi6rev mpe5rirémi mperi6rémn mperi6rémq mperi6rémue mpe5rirémur mperi6rémus mperi6rémv mperi6réntn mperi6réntq mperi6réntue mpe5riréntur mperi6réntv mpe5rirér mperi6rés mperi6rét mpe5riri mpe5rirí mpe6risse mpe6rissé mpe6risti mpe6ristí mper4it mperi6te mperi6ti mperi6tí mperi6to. mperi6ton mperi6toq mpe5ritor mperi6tot mperi6tou mperi6tov mperi6tón mperi6tóq mpe5ritór mperi6tót mperi6tóu mperi6tóv mperi6tu mperi6tú mpe5riú mpe6rÄ«6mus mpe6rÄ«6mús mper4Ä«r mpe6rÄ«6re. mpe6rÄ«6rem mpe6rÄ«6rene mpe6rÄ«6rent. mpe6rÄ«6rentn mpe6rÄ«6rentq mpe6rÄ«6rentue mpe6rÄ«6rentv mpe6rÄ«6req mpe6rÄ«6ret mpe6rÄ«6reu mpe6rÄ«6rev mpe6rÄ«6rÄ“mus mpe6rÄ«6rÄ“mús mpe6rÄ«6rÄ“s mpe6rÄ«6rÄ“t mpe6rÄ«6rÄ“Ìmus mpe6rÄ«6rÄ“Ìs mpe6rÄ«6rÄ“Ìt mpe6rÄ«6rém mpe6rÄ«6réntn mpe6rÄ«6réntq mpe6rÄ«6réntue mpe6rÄ«6réntv mpe6rÄ«6rét mpe4rÄ«s mpe6rÄ«6te mpe6rÄ«6ti mpe6rÄ«6tí mpe6rÄ«6tÅ mpe6rÄ«6tu mpe6rÄ«6tú mpe6rÄ«Ì6mus mper6Ä«Ìr mpe6rÄ«Ì6re. mpe6rÄ«Ì6rem mpe6rÄ«Ì6ren mpe6rÄ«Ì6req mpe6rÄ«Ì6ret mpe6rÄ«Ì6reu mpe6rÄ«Ì6rev mpe6rÄ«Ì6rÄ“ mpe6rÄ«Ìs mper6Ä«Ìsn mper6Ä«Ìsq mper6Ä«Ìsu mper6Ä«Ìsv mpe6rÄ«Ì6te mpe6rÄ«Ì6ti mpe6rÄ«Ì6tÅ mpe6rÄ«Ì6tu mper6Ä«Ìu mper6Ä«Ìv mpe4ríe mper4ím mpe6rí6mus mper4ír mpe6rí6re. mpe6rí6rem mpe6rí6ren mpe6rí6req mpe6rí6res mpe6rí6ret mpe6rí6reu mpe6rí6rev mpe6rísse mpe6rísti mpe4rít mperí6te mperí6ti mperí6to. mpe5rítor mper4íu mper4ív mpe3r4o mpe3rÅ mper4ó mpe6ste mpÄ“4iÄ“ mpÄ•4rÄ•Ä mpÄ•4rĕă mpÄ•4r5Ä•Å mpÄ•6rÄ«6mÅ­s mpÄ•6rÄ«6mÅ­Ìs mpÄ•6rÄ«6rÄ“mÅ­s mpÄ•6rÄ«6rÄ“mÅ­Ìs mpÄ•6rÄ«6rÄ“s mpÄ•6rÄ«6rÄ“t mpÄ•6rÄ«6rÄ“ÌmÅ­s mpÄ•6rÄ«6rÄ“Ìs mpÄ•6rÄ«6rÄ“Ìt mpÄ•6rÄ«6rÄ•. mpÄ•6rÄ«6rÄ•m mpÄ•6rÄ«6rÄ•nÄ• mpÄ•6rÄ«6rÄ•nt. mpÄ•6rÄ«6rÄ•ntn mpÄ•6rÄ«6rÄ•ntq mpÄ•6rÄ«6rÄ•ntu mpÄ•6rÄ«6rÄ•ntv mpÄ•6rÄ«6rÄ•q mpÄ•6rÄ«6rÄ•t mpÄ•6rÄ«6rÄ•u mpÄ•6rÄ«6rÄ•v mpÄ•6rÄ«6rÄ•Ìm mpÄ•6rÄ«6rÄ•Ìntn mpÄ•6rÄ«6rÄ•Ìntq mpÄ•6rÄ«6rÄ•Ìntu mpÄ•6rÄ«6rÄ•Ìntv mpÄ•6rÄ«6rÄ•Ìt mpÄ•4r5Ä«s mpÄ•r6Ä«s. mpÄ•r6Ä«sn mpÄ•r6Ä«sq mpÄ•r6Ä«su mpÄ•r6Ä«sv mpÄ•6rÄ«6tÄ• mpÄ•6rÄ«6tÄ­ mpÄ•6rÄ«6tÅ mpÄ•6rÄ«6tÅ­ mpÄ•6rÄ«Ì6mÅ­s mpÄ•6rÄ«Ì6rÄ“ mpÄ•6rÄ«Ì6rÄ•. mpÄ•6rÄ«Ì6rÄ•m mpÄ•6rÄ«Ì6rÄ•n mpÄ•6rÄ«Ì6rÄ•q mpÄ•6rÄ«Ì6rÄ•t mpÄ•6rÄ«Ì6rÄ•u mpÄ•6rÄ«Ì6rÄ•v mpÄ•6rÄ«Ìs mpÄ•r5Ä«Ìss mpÄ•r5Ä«Ìst mpÄ•6rÄ«Ì6tÄ• mpÄ•6rÄ«Ì6tÄ­ mpÄ•6rÄ«Ì6tÅ mpÄ•6rÄ«Ì6tÅ­ mpÄ•6rÄ­Ä“n mpÄ•6rÄ­Ä“rÄ• mpÄ•6r5Ä­Ä“rÅ­ mpÄ•6rÄ­Ä“Ìn mpÄ•6rÄ­Ä“ÌrÄ• mpÄ•6r5Ä­Ä“ÌrÅ­ mpÄ•6r5Ä­Ä•r mpÄ•6r5Ä­Ä•Ìr mpÄ•6rÄ­tn mpÄ•6rÄ­tq mpÄ•6rÄ­tu mpÄ•6rÄ­tv mpÄ•6r5Ä­ÌÄ• mpÄ•6rÄ­Ìt mpÄ•3rÅ mpÄ•3rÅ mpÄ•6stÄ• mpÄ•Ì6r5Ä•Ä mpÄ•Ì6r5ĕă mpÄ•Ì6r5Ä•Å mpÄ•Ì6rÄ­Ä“n m3pé mpé4r5ea mpé4r5eÄ mpé4r5eo mpé4r5eÅ mpére5r mpé4ri. mpé6riens mpé6riÄ“n mpé4rit m2pn mp2ne mp2su 2mq m3qu m1r mro3 mrod4 mro5di mrodi5u mrodi5v mrÅ3d4 mrÅ5dÄ« mrÅdÄ«5u mrÅdÄ«5v 2m1s2 msed4 mse5di msÄ“d4 msÄ“5di msÄ“5dÄ­ mso3 m2s3q m3st m2s3u 2mt mte3r4 mte5re mter6it mteri5tur mteri5u mteri5v mte5rÄ« mterÄ«5u mterÄ«5v mtÄ•3r4 mtÄ•5rÄ• mtÄ•rÄ•5r mtÄ•5rÄ« mtÄ•rÄ«5u mtÄ•rÄ«5v mto1 mto2s m1ua m1uÄ m1uă m1uá 2m1ue 4m3ue. m1uÄ“ m1uÄ• m1ué m1ui m2ui. 2mui2c3 m2uim m2uin m2uiq 2muir m2uit m2uiu m1uÄ«2 m2uÄ«. muÄ«c3 m2uÄ«n m2uÄ«q m2uÄ«u m1uÄ­ 2m3uír 1m2ul 3m2um 2m3unc muol3u m1uó 1m2ur 1mus 2m3ust 1mÅ« m3Å«nc 2m1Å«s mÅ«2su 1mÅ­ m2Å­l 3m2Å­m m2Å­s m2Å­Ì 3mÅ­Ìm 1mú 3m2úm 2m3únc m2ús 2m3úst 2mv2 m3ve mvi2c3 mvÄ«2 mvÄ«c3 m2x2 1m2y my2s 1mý 2mz 1na nab2o na2br na2cr n1ad n2ada nae2s n2aeu n2aev na3ge na3gr na2i nai4m na2Ä« 3nal na2ni n3a2ní na2o na3q n2ar nas7cend n4aue na2x3 n2aÍžÌ n2aÍ¡Ì 1nÄ nÄ5bun 3nÄc nÄ2i nÄ2Ä­ n1Ä2n nÄs3 nÄÌ4ni nÄÌ4nÄ­ 1nă n1ăb nă2br n1ăd n2ădă n2ăg nă3gÄ• nă3gr nă2Ä« nă2nÄ­ n2ăp nă3q năs2p 2năth năÌ2n 1ná n2áb ná2i 3nál ná2ni n2ár ná2x 1næ næ2a næ2ă næ2á næ2i n2æu næ2ua næ2uÄ næ2uă næ2uá næ2uæ næ2uǽ næ4uen næ4ueq næ4ueu næ2uÄ“ næ4uÄ•n næ4uÄ•q næ4uÄ•u næ2ué næ2ui næ2uÄ« næ2uí næ2uo næ2uÅ næ2uó næ4uum næ4uus næ4uÅ­m næ4uÅ­s næ4uúm næ4uús næ2Å­ n2æv næ2va næ2vÄ næ2vă næ2vá næ2væ næ2vǽ næ4ven næ4veq næ4vev næ2vÄ“ næ4vÄ•n næ4vÄ•q næ4vÄ•v næ2vé næ2vi næ2vÄ« næ2ví næ2vo næ2vÅ næ2vó næ4vum næ4vus næ4vÅ­m næ4vÅ­s næ4vúm næ4vús 1nÇ£ nÇ£2a nÇ£2ă nÇ£2ua nÇ£2uÄ nÇ£2uă nÇ£2uá nÇ£2uÇ£ nÇ£4uen nÇ£4ueq nÇ£4ueu nÇ£2uÄ“ nÇ£4uÄ•n nÇ£4uÄ•q nÇ£4uÄ•u nÇ£2uÄ« nÇ£2uÅ nÇ£4uum nÇ£4uus nÇ£4uÅ­m nÇ£4uÅ­s nÇ£4uúm nÇ£4uús nÇ£2Å­ nÇ£2va nÇ£2vÄ nÇ£2vă nÇ£2vá nÇ£2vÇ£ nÇ£4ven nÇ£4veq nÇ£4vev nÇ£2vÄ“ nÇ£4vÄ•n nÇ£4vÄ•q nÇ£4vÄ•v nÇ£2vÄ« nÇ£2vÅ nÇ£4vum nÇ£4vus nÇ£4vÅ­m nÇ£4vÅ­s nÇ£4vúm nÇ£4vús nÇ£Ì4ua nÇ£Ì4uÄ nÇ£Ì4uă nÇ£Ì4uÇ£ nÇ£Ì4uen nÇ£Ì4ueq nÇ£Ì4ueu nÇ£Ì4uÄ“ nÇ£Ì4uÄ•n nÇ£Ì4uÄ•q nÇ£Ì4uÄ•u nÇ£Ì4uÄ« nÇ£Ì4uÅ nÇ£Ì4uum nÇ£Ì4uus nÇ£Ì4uÅ­m nÇ£Ì4uÅ­s nÇ£Ì4va nÇ£Ì4vÄ nÇ£Ì4vă nÇ£Ì4vÇ£ nÇ£Ì4ven nÇ£Ì4veq nÇ£Ì4vev nÇ£Ì4vÄ“ nÇ£Ì4vÄ•n nÇ£Ì4vÄ•q nÇ£Ì4vÄ•v nÇ£Ì4vÄ« nÇ£Ì4vÅ nÇ£Ì4vum nÇ£Ì4vus nÇ£Ì4vÅ­m nÇ£Ì4vÅ­s 1nǽ nǽ2ua nǽ2uÄ nǽ2uă nǽ2uæ nǽ4uen nǽ4ueq nǽ4ueu nǽ2uÄ“ nǽ4uÄ•n nǽ4uÄ•q nǽ4uÄ•u nǽ2ui nǽ2uÄ« nǽ2uo nǽ2uÅ nǽ4uum nǽ4uus nǽ4uÅ­m nǽ4uÅ­s nǽ2va nǽ2vÄ nǽ2vă nǽ2væ nǽ4ven nǽ4veq nǽ4vev nǽ2vÄ“ nǽ4vÄ•n nǽ4vÄ•q nǽ4vÄ•v nǽ2vi nǽ2vÄ« nǽ2vo nǽ2vÅ nǽ4vum nǽ4vus nǽ4vÅ­m nǽ4vÅ­s 2nc n3cr n2c3ue n2c1Å« 2nd n2d3ág nd2e nde4sc nde3un nde3ún ndÄ“4sc ndÄ•3Å­n ndi4ger n4d3igi n4d3igí ndi4g3n ndi3m n2di2p n4d3Ä­gÄ­ nd2Ä­n n2dÄ­p ndÄ­4sp n4d5Ä­ÌgÄ­ n4d3í4gi n3do ndo3l n4d5o4le. ndo4lem n6d5o6lene n4d5o4leq ndo6les. ndo6lesn ndo6lesq ndo6lesu ndo6lesv n4d5o4leu n4d5o4lev ndo6lÄ“s. ndo6lÄ“sn ndo6lÄ“sq ndo6lÄ“su ndo6lÄ“sv ndo6lÄ“Ìsn ndo6lÄ“Ìsq ndo6lÄ“Ìsu ndo6lÄ“Ìsv ndo4lém ndo6lésn ndo6lésq ndo6lésu ndo6lésv n4d3o4li n4d3o4lÄ« n4d3o4lí nd4or ndÅ6lÄ“s. ndÅ6lÄ“sn ndÅ6lÄ“sq ndÅ6lÄ“su ndÅ6lÄ“sv ndÅ6lÄ“Ìsn ndÅ6lÄ“Ìsq ndÅ6lÄ“Ìsu ndÅ6lÄ“Ìsv n4d5Å4lÄ•. n6d5Å6lÄ•nÄ• n4d5Å4lÄ•q n4d5Å4lÄ•u n4d5Å4lÄ•v n4d3Å4lÄ« n4d3Å4lÄ­ n4d5ÅÌ4lÄ• ndó2l n4d3óle ndó3lu nd2r n2d3ua n2d3uÄ n2d3uá nd3ue. nd3ueq nd3ueu nd3uev n2duÄ“ n2dué nd3uit n2d3uo n2d3uÅ n2d3uó n2d3uú n2d3Å­Ä n2d3ŭă n2dÅ­Ä“ nd3Å­Ä•. nd3Å­Ä•q nd3Å­Ä•u nd3Å­Ä•v nd3Å­Ä­t n2d3Å­Å n2d3Å­Å n2d3Å­Å­ nd3Å­ÌÄ­ nd3úen nd3úeq nd3úeu nd3úev n2d3úi 1ne 3ne. ne2a ne3bu ne2cl ne2co ne4c3u4t ned2 ned4i ne2e nee3ri nee3rí n1ef ne2gl 3nei ne2ia ne2iá ne2ie ne2ié ne2ii ne2ií ne2io ne2ió ne2it ne2iu ne2iú 3neí ne2lu ne2na n4ene ne2nu 3neo 3neó 3nep nepo5t ne1r nera5b nerab6u ner2æ3 ner2Ç£ ne3rÄ“ ne3rÄ« ne4ss nes5tÄ nes5te nes5tr n4et. n4etn n4etq 2nets n4eue 2ne2un ne2ur neu5re neu4ter neu4tér ne3u4tr 2neún n4eve n1ex n2ex. nex2a ne3x2i nexi3u nexi3v nex2Ä« n2exn ne2xo ne2xÅ nex2ó n2exq n2ex2u nexu3r nex2Å« nexÅ«3r nex2ú n2exv 1nÄ“ nÄ“2br n1Ä“2d nÄ“3du nÄ“2i n1Ä“l nÄ“2lă nÄ“2lÄ• nÄ“2lu nÄ“2me nÄ“2mÄ• nÄ“2mo nÄ“2mÅ nÄ“2nÄ nÄ“2nu nÄ“s3t nÄ“2uÄ« nÄ“2vÄ« nÄ“Ì4br nÄ“Ì2d 1nÄ• 3nÄ•a nÄ•2ă 3nĕæ 3nÄ•Ç£ nÄ•2cÅ nÄ•d2 3nÄ•Ä“ 3nÄ•2Ä• n1Ä•f nÄ•2gl 3nÄ•Ä« nÄ•2Ä­ 3nÄ•p nÄ•3r2a nÄ•3r2æ nÄ•3r2Ç£ nÄ•3rÄ“ nÄ•3r4Ä• nÄ•3rÄ« nÄ•3rÅ n3Ä•rs n3Ä•rÅ­n nÄ•s3t nÄ•s5tÄ• n4Ä•t. n4Ä•tn n4Ä•tq 4nÄ•ts 2n3Ä•Å­n n1Ä•x n2Ä•x. nÄ•x2a nÄ•x2ă nÄ•x4Ä•Ì nÄ•x2Ä« nÄ•x2Ä­ n2Ä•xn nÄ•2xÅ n2Ä•xq n2Ä•xu nÄ•x2Å« nÄ•xÅ«3r nÄ•x2Å­ n2Ä•xv 3nÄ•Ìp nÄ•Ì3rÄ• nÄ•Ì3s4c 1né né2i 3n1ép né3q 2néts néu4ter né3u4tr néx2Ä« néx4ui 2nf 2ng n3gae. n3gaen n3gaeq n4gani n4ganí n5gaÍže. n5gaÍžen n5gaÍžeq n5gaÍžÌen n5gaÍžÌeq n5gaÍ¡e. n5gaÍ¡en n5gaÍ¡eq n5gaÍ¡Ìen n5gaÍ¡Ìeq n4gă4nÄ­ n4g5ăÌnÄ­ n2gáe n3gáen n3gáeq ng3áeu ng3áev n4g3áni n3gæ. n3gæn n3gæq n3gÇ£. n3gÇ£n n3gÇ£q ngÇ£Ì2 n3gÇ£Ìn n3gÇ£Ìq n2g1ǽ2 n3gǽn n3gǽq ngu6ste ngÅ­6stÄ• n1h nhe3 1ni ni2a n2ia. n2ian n2iaq nia6ste n2iau n2iav 2niă 2n3i2ba 2n3i2bá ni2be ni2bé 2n3i2bi 2n3i2bí 2n3i2bo 2n3i2bó 4n3i4bun 4n3i4bún nic4e 4ni4cer n2i3cÄ“ 4ni4cér ni4cim 4ni4cím 4ni4cít n2i3cu n2i3cú 3nid 2niec 2niex 2niÄ“c 2niÄ“x 2niéc 2niéx n2i3g2 nig4n n2il ni3mam ni3man ni3mar ni3mas ni3mÄ ni3má ni3me ni3mÄ“ ni3mé ni3mi. ni3mie ni3mii ni3min ni3miq ni3mis ni3miu ni3miv ni3mÄ«. ni3mÄ«n ni3mÄ«q ni3mÄ«s ni3mÄ«u ni3mÄ«v ni3mín ni3míq ni3mís ni3míu ni3mív 2nimm ni3mo ni3mÅ ni3mó ni3mu ni3mú 2nins n2i2o n2ió n2ip n3i4qua n3i4quá n3i4quæ n3i4quǽ n5i4quen n5i4queq n5i4queu n5i4quev n3i4qué n3i4qui n3i4quí n3i4quo n3i4quó n3i4quu n3i4quú n2is ni4sc nis5ci nise4r3 nisé2 nis2i 3ni3sp n2iue n2iué 2niug n2ium 2niux 2niÅ« 2niÅ­ 2niúd 2niúg 2niúr 2niúx 1nÄ« 2n1Ä«2b 2nÄ«ns 2n3Ä«Ì2b 4nÄ«Ìns 1nÄ­ 3nÄ­a nĭă6stÄ• 3nĭæ 3nÄ­Ç£ n3Ä­2bÄ­ nÄ­3cÄ“ 4n3Ä­4cÄ•r nÄ­4cÄ­m nÄ­4cÄ­Å nÄ­4cÄ­s nÄ­4cÄ­t nÄ­3cÅ­ 3nÄ­d 3nÄ­Ä« nÄ­3mÄ­Ä• 2nÄ­mÅ nÄ­2Å nÄ­3s2p nÄ­3tÄ•r nÄ­3tÄ•Ì nÄ­3tÄ­s nÄ­5tÄ­Ìs nÄ­3tÅ n3Ä­4tÅ«s 4n5Ä­Ì4cÄ•r nÄ­Ì4cÄ­m nÄ­Ì4cÄ­Å nÄ­Ì4cÄ­t n4Ä­Ìs nÄ­Ì3sp nÄ­Ì4s5t 1ní 2n1í2b 4ní4cer ní4cian ní4ciar ní4ciat ní4cim ní5cis ní4cit ní4ciun 3níd n2í3g2 níg4n n2íl ní1m 2nímm 2níns 4n3í4qua 4n3í4quæ n5í4quen n5í4queq n5í4queu n5í4quev 4n3í4qui 4n3í4quo 4n3í4quu 3ní3sp ní3tur 2nj 2n1n2 n3ne n3nu nn4ue 1no no2a no2á no2æ3 no2Ç£ noÇ£Ì3 no2ǽ3 no2ba nob2Ä« nobÄ«3u nobÄ«3v nob2í no2bó 3noc noc5te no2e no2Ä“ no2i no2Ä« no2í no3l4u nom2 n2on no3ni 3nop n2ope no2pi no2pu no2pú n2or no3rÄ« n2os nos3c no4sn no4sq nos3t nos5te no4sue no4sv no2xu 1n2Å nÅs3t 1nÅ nÅ2a nÅ2á nÅ2æ3 nÅ2Ç£ nÅÇ£Ì3 nÅ2ǽ3 nÅb2ă nÅb2Ä« nÅbÄ«3u nÅbÄ«3v nÅc5tÄ• nÅ2Ä“ nÅ2Ä« nÅ2Ä­ n1Åp nÅ4pÄ«. nÅ4pÄ­ nÅ2pÅ­ nÅ3rÄ« nÅ4sn nÅ4sq nÅ4su nÅ4sv nÅ3t nÅ2u3Ä• nÅ2v3Ä• nÅÌ4p 1nó nób2i nó3l2u nóp2 n2ór n2ós nó2xu 1nÅ“ npo3 npó1 2nq n3qu n1r2 n3rÄ• nr4Ä•Ì3 2ns n3sa. ns3a2c n3s4ae n3s4am ns4an n3s4aq n3sar n3sas n3s4av n3să. ns3ăc n3săm n3săn n3săq n3său n3săv nsăÌ2 ns3ăÌb ns3ăÌl n2sál n1sc ns2ce ns2cÄ“ ns2cÄ• ns2cé ns2ci ns2cÄ­ ns2cr n2scu n2scÅ­ n2scú n2se2g n2seú n2s3ég nsér4ui nsér4uÄ« n2s3i2c n2sie n2siÄ“ n2sié ns3iér nsi2g ns3ige n2s3ii n2sií ns3iís nsi3l4u nsi4mur nsi4múr nsi2r ns5i4taÍž n4s3i4tÇ£ nsi4ti n4s3i4tÄ« ns3i4tÅ n4s3i4tÅ« n2siu nsi4ui nsi4vi nsÄ«2r nsÄ«Ì4r nsÄ«Ì4to nsÄ«Ì4tÅ nsÄ«Ì4ui nsÄ«Ì4uÄ­ nsÄ«Ì4vi nsÄ«Ì4vÄ­ n2s3Ä­2c n2sÄ­Ä“ ns3Ä­Ä“n ns3Ä­Ä“r n2s3Ä­Ä• ns3Ä­gÄ• n4s3Ä­4ta ns5Ä­4tă. ns5Ä­4tăm ns3Ä­4tá n4s3Ä­4tæ n4s3Ä­4tÇ£ ns3Ä­4tǽ ns5Ä­4tÄ•. n4s3Ä­4tÄ« ns3Ä­4tÄ­ ns3Ä­4tÅ n4s3Ä­4tÅ« n4s3Ä­4tÅ­ n4s3Ä­Ì4c nsÄ­Ì4g nsÄ­Ì4t n4s5Ä­Ìtă n4s5Ä­ÌtÄ• n4s5Ä­ÌtÄ­ n4s5Ä­ÌtÅ­ n2s3í2c ns3íer nsí2g ns3íge n2s3íi nsíl4u nsí4mi nsí2r ns5ítuÄ« ns5ítuu nsí4uer nsí4uim nsí4uit nsí4ver nsí4vim nsí4vit n1sp ns2pa ns2pă ns2pá n3spec n3spÄ•c n5spÄ•Ìc n3spéc n3s2pi n3s2pÄ­ n3s2pí n2sq n3s2ta n3s2tÄ n3s2tă n3s2tá n3s2te n3s2tÄ“ n3s2tÄ• n3s2té n3sti5t4 n3stÄ­t nstí3t4 n3s2to n3s2tÅ ns2tó nstren6u nstrÄ“5n4 nstrÄ“Ì5n6 nstrén6u ns2tu n3s2tÅ­ n4s3ue. n3s2uÄ« 2nt n3ta nta3g n3tÄ n3tæ n3te n4t3eÄ nte4ia nte4iá nte3Ä«4 nteÄ«Ì4 nte5ram. nte5ramne nte5ramq nte5ramu nte5ramú nte5ramv nte5rant nteri4 nter5ib nter5ic nte4r5ie nter5iÄ“ nter5ié nter5ii nter5iÄ« nter5ií nte4rim nter5im. nte5ri5min nte5ri5mur nte5ri5múr nter5ita nter5itÄ nter5itá nte5ri5tor. nte5ri5torn nte5ri5torq nte5ri5torue nte5ri5torv nte5ri5tórn nte5ri5tórq nte5ri5tórue nte5ri5tórv nte4r3Ä«4 nterÄ«Ì4 nte4r5í4c nte4ríe nte6r5í6mu nte6r5í6ti nte4rí4u nte4rí4v nte4ron nte5rÅ. nte5rÅÌq nte5rÅÌu nte5rÅÌv nte4rós nte5runt nt4es nte5stas nte5stÄs nte5stÄtí nte5stÄÌs nte5stás nte5sto. nte5ston nte5stoq nte5stou nte5stov nte5s4tÅ nte5stón nte5stóq nte5stóu nte5stóv ntÄ“4ia ntÄ“4iÄ ntÄ“4iá ntÄ“4iæ ntÄ“4iÇ£ ntÄ“4iǽ n2t3Ä•Ä ntÄ•3ă ntÄ•3Ä«4 ntÄ•Ä«Ì4 ntÄ•4r3Ä«4 ntÄ•rÄ«Ì4 ntÄ•4r5Ä­4c ntÄ•4rÄ­Ä“ ntÄ•4r5Ä­Ä« ntÄ•6r5Ä­m. ntÄ•6r5Ä­6tÄ ntÄ•6r5Ä­Ì6c ntÄ•6rÄ­ÌÄ• ntÄ•4rÅn ntÄ•4rÅs ntÄ•5rÅ­nt ntÄ•5rÅ­Ì nt4Ä•s ntÄ•5stÄs ntÄ•5stÄÌs ntÄ•5stÅ ntÄ•Ì4rÄ« ntÄ•Ì6r5Ä­6c ntÄ•Ì6r5Ä­Ä« ntÄ•Ì6r5Ä­t. ntÄ•Ì6r5Ä­6tÄ ntÄ•Ì5stÄs ntÄ•Ì5stÅ nté4r5es nté4ri. nté4r5i4c nté4rie nté4riÄ“ nté4r5ii nté4r5iÄ« nté6r5it. nté6r5ita nté6r5i6tÄ nté5stas nté5stÄs nté5sto. nté5s4tÅ n3th n3ti ntis4t nti5stá nti5sti nti5stí n3tÄ« n3tÄ­ ntÄ­s4tÄ ntÄ­s4tă ntÄ­5s4tÄ­ ntÄ­Ì5s6tÄ ntÄ­Ì5s6tă ntí5s4ta ntí5s4tÄ ntí5sti nto2s3 n3tÅ ntÅÌ2 n4t3ÅÌp n2t3óp ntó2s3 n3tr ntra3e ntrÄn4 ntrá3e ntro3i4 ntro3í4 ntró3i n3tum n3tus3 ntús3 n1ua n2uam n2uan n2uar n2uat 1n1uÄ n2uÄm n2uÄr n2uÄt n1uă n2uám n2uán n2uár n2uát 1nuæ 1nuÇ£ 1nub2 nu3bi n3ud n4udæ n4udǽ n4udi n4udí n4u3du n4udú n1ue 2n3ue. n2ueb 3n4uel 3n2uem 3nueq 3n2ues n2uet 3nueu 3nuev n1uÄ“ n2uÄ“b n2uÄ“m n2uÄ“n n2uÄ“r n2uÄ“s n2uÄ“t 2n3uÄ• n2uéb n2uém n2ués n2uét 1nui n2uim n2uis n1uÄ« n1uÄ­ 1nuí n2uím n2uís 1n1ul n2u3la n2u3lÄ n2u3lá n2u3le nule4i n2u3lé n2u3li n2u3lÄ« n2u3lí 3num n4um. n4u4mn n4u4mq n4u4mu n4u4mv 1n1u2n 1nuÅ n1uó n3u2r 1nu2s n3usi nu4sn nu4sq n3uss n3ust nu4su nu4sv n2u3ta n2u3tá n2u3tæ n2u3tǽ n2u3te nu3ti. nu3tin nu3tiq nu3tis nu3tiu nu3tiv nu3tín nu3tíq nu3tís nu3tíu nu3tív n2u3to n2u3tó nu3tr n2u3tu n2u3tú 1nuu n2uun n2uún n1u2x 1nÅ« n1Å«d nÅ«2n nÅ«3nÄ• n1Å«2r n1Å«2s n2Å«3ta n2Å«3tÄ n2Å«3tă n2Å«3tá n2Å«3tæ n2Å«3tÇ£ n2Å«3tǽ n2Å«3te n2Å«3tÄ• n2Å«3tÄ« n2Å«3tÅ n2Å«3tu n2Å«3tÅ« n2Å«3tÅ­ n2Å«3tú nÅ«Ì2m nÅ«Ì2r nÅ«4Ìs 1nÅ­ n1Å­l n2Å­lÄ n2Å­lă n2Å­lÄ« n4Å­m. nÅ­3mÄ­ n4Å­mn n4Å­mq n4Å­mu n4Å­mv n1Å­n n1Å­r nÅ­2s nÅ­Ì3mÄ• 1nú núb2 n2úla n2úle nú2mi n4úmn n4úmq n4úmu n4úmv 2n3úng n1ú2r 2nv n3ve 2nx2 n3xi n2x3u 1ny 2nyma 2nymÄ 2nymæ 2nymÇ£ 1ný 2o1a2 o2a3b oad3 oade4 oadé2 oadi4 oadí2 oadÅÌ4 oadó2 oadú2 oa3ne oa3né oa3ru o2as oas3t oa3t oau6ste o1Ä o2Än o2Är 2o1á oá2d3 oáde2 o2án 2o1æ2 o2æ3q o1Ç£2 o2Ç£3q oÇ£Ì2 oÇ£Ì3q 2o1ǽ2 o2ǽ3q 1ob1 ob2ab o3bam o3ban o3b2a3q o3bar o3b2as obe4ra obe4rÄ obe4rá obe4ro obe4rÅ obe4ró ob2Ä“r obé2q obi2b ob3i4c obi2m ob2iq ob3it. ob3itn ob3itq ob3itv o2bi2u obi2v obÄ«2m ob2Ä«n ob2Ä«q ob2Ä«t obí2b obí2c obí2m ob2íq ob3íss ob3íst o2bl o2bo ob4ole. ob6olene ob4oleq ob4oleu ob4olev o2br ob3rá obri3 ob5rue obs2 ob3st ob5ste obur3 o3ca o3cá 1occ 2o3ce o3cÄ“ 2o3cé 2o3ci o3cÄ« 2o3cí oco2i ocoi3q oco2í oco5me oco3m4Ä“ ocomi5te ocomi5té oc4ten oc3ue. o3cú o3dam. o3dami o3damq o3damu o3damú o3damv o3dan o3dar o3das o3dat o2d3ác 2ode o4d5eam. o4d5eamn o4d5eamq o4d5eamu o4d5eamú o4d5eamv o4d3ean o4d3eas o4d3eat o4d5eámn o4d5eámq o4d5eámu o4d5eámv o4d3eán o4d3eás o4d3eát ode4cé ode2g ode2i od3eo. od3eon od3eoq od3eou od3eov o2d3eó ode4st ode4u5t o2deú odÄ“2i odé2g od2i o4d3ibi o4d3ibí o2d3i2g od4iue. o5dium o5dius od4ive. 2o3dÄ« 2odí o2dí2b odí5ci o2d3í2g od6íue. od6íve. 2o3do od4or 2odÅ 2odó 2odu od3ue od3ui od3uÄ« od3uí 2odú 2oea o3eat 2oeÄ o3eÄm o3eÄt 2oe2ă 2oeá o3eát oe3b oecu3 oe3d2 oe2e o1e2g 2oe2i 2oeÄ« oe2Ä­ 2oeí o2el o3e2le o4e3leu o4e3lev o1e2m o5e4mÄ“ti o5e4mÄ“tí o5e4mÄ“tu o5e4mÄ“tú o3emu o3emú oepe3 o1er oe3ro oete5r o1e2u o4eue oe2Å­ o1eú o1e2x3 2o1Ä“2 o2Ä“n3 o2Ä“s o2Ä“u o2Ä“v oÄ“Ì2g oÄ“Ì2m 2o1é oé2g oé2m o2éq o2és 1off ofo1 og2 o3ga o3gæ ogæ3v o3gÇ£ o1h oho4s ohó2 2o1i2 o2iad2 o2iÄ o2iÇ£ o3ic o2id o4iene o2iÄ« o2io oio2s o2iÅ o2ió o1Ä« oÄ«2b oÄ«2m oÄ«2r oÄ«2t oÄ«2u oÄ«2v oÄ«Ì2b oÄ«Ì2m oÄ«Ì2r oÄ«Ì2t oÄ«Ì2u oÄ«Ì2v 2o1í oí2b oí2c oí2m oí2r o3íss o3íst oí2ta oí2te oí2to oí4tu oí2ui oí2vi o3la o3lÄ o3lá o3læ o3lÇ£ o3lǽ ole3ii ole3ií ole3io ole3ió ole5ium ole3iú olé3ia olé3ii olé3io olé3iu 2o3li. o3lia o3lii o3lií 2o3lin o3lio o3liÅ o3lió 2o3liq 2o3lis 2o3liu 2o3liv 2o3lÄ« o3lía 2olín 2olíq 2olís 2olíu 2olív 2oll 2o3lo 2o3lÅ 2o3ló o2l3ua o2luÄ o2l3uá o2l3uæ o2luÇ£ o2l3uǽ ol3ue. ol3ueb ol3uem ol3uen ol3ueq ol5uerÄ“ ol5ueré ol3ues ol3uet ol3ueu o2l3uÄ“ o2lué ol3uéb ol3uém ol3uén ol5uéris ol3ués ol3uét ol5uimi ol5uimur ol5uimúr ol5uis. ol5uisn ol5uisq ol5uisu ol3uit ol3uÄ«s ol5uÄ«Ìs ol3uím ol5uísn ol5uísq ol5uísu ol5uíte 2o3l4um o2luo o2luÅ o2l3uó 2o3l4u2s3 o2l3uu o2l3uú 2o3lúm 2o3lús o1m2a om2á omb2 ombu3r ombú3r ome4da ome4dá om2eq ome4sa ome4sá ome4so om1Ä“ o3mÄ“t o3mÄ“Ìt o4mé4sa om2i2a om2ib om2ic om2im om2in4 omini5c om2iq omi2t o5mit. om6itas. om6itasn om6itasq om6itasu om6itasv om6itásn om6itásq om6itásu om6itásv om4ite. om6itene om4iteq om4iteu om4itev om6itis. om6itisn om6itisq om6itisu om6itisv om6itísn om6itísq om6itísu om6itísv o5mitn om4ito o5mi5tot om4itó o5mi5tót o5mitq o5m4itue o5m4i5tur o5m4i5túr o5mitv om2iu om2iv om2Ä« om2íc om2ím om2íq om4íte o4mí4ti om4ítn om4ítq om4ítu om4ítv om2íu om2ív o1mo omo4nu o1mÅ“ ompere5r ompe6ri. omperi6n ompe6ri6q ompe6ris. ompe6risn ompe6risq ompe6risu ompe6risv omperi6u omperi6v ompe6rÄ«. omperÄ«6n ompe6rÄ«6q ompe6rÄ«6u ompe6rÄ«6v ompe6rÄ«Ì6n ompe6rÄ«Ì6q ompe6rÄ«Ì6u ompe6rÄ«Ì6v ompe6rí6n ompe6rí6q ompe6rísn ompe6rísq ompe6rísu ompe6rísv ompe6rí6u ompe6rí6v ompÄ“4ia ompÄ“6iÄ. ompÄ“6iÄq ompÄ“6iÄs ompÄ“6iÄÌq ompÄ“6iÄÌs ompÄ“4iá ompÄ“4iæ ompÄ“4iÇ£ ompÄ“4iǽ ompÄ“4iÄ« ompÄ“4iÅ ompé6r5ii ompé6r5iÄ« ompé6r5is o1m2u om3ue o3m2Å«2 om2ú o3n2a o3n2Ä o3n2á 3onc on3d on2e 2one. one4u5t 2o3n2é 2oni o5nia. o5nian o5niaq o5niau o5niav o4ni4ci on4ier on4iér on2ii on2ií on2im on2in on2iq on2it o2niu o3niue o3niué o3n4iui o3n4iuí o3nium o5niúm on2iv on2Ä« 2oní o4ní4ci on2íe on2íq on2ít on2íu on2ív on2o ono3pi ono3s4t on2ó onós4t ons2c on5sci on3s2i onsi5u onsi5v on3s4p ons2u on3t2 onte4i ontes5 ontÄ“4i 2onu o4nue. on2uÄ« on2ul 2on2ú 2o1o2 o2o3n oo3ru o2os oo3u oo3v o1Å o2Ån o2Ås 2oó o1ór oó2re oó2ri 1ope1 o2pem oper4a oper4æ oper4Ç£ oper4ǽ ope3r4e oper4Ä“ oper4i ope3r4Ä« oper4í operí5tur oper4o oper4ó oper4u o2pém o2pér opér4u o3pic 1opÄ« o3pÄ«s opo4s3 1opp op2su 2oq o3qu 2or. o1ra or3ang o3r2Ä o3ræ o1rÇ£ o3rǽ 2orc o1r2e 2o3re. 2o3rea 2o3reá 2o3reæ 2o3reǽ 2o3ree 2o3reé 2o3rei 2o3reí 4o3rene 2o3reo 2o3reó 2o3req 2o3reu 2o3reú 2o3rev o3rÄ“ 2o3réa 2o3rée o1r2i o3riæ o3riǽ 2o3rib oric4 ori5ce o3rii o3rií ori3ni 4oris. 4orisn 4orisq 4orisu 4orisv o3ría o3ríc o2rír 4orísn 4orísq 4orísu 4orísv orí5tur 4orne. o1r2o o3ron. o3ronn o3ronq o3ronu o3ronv o3rorú 2o3ros oro4s3t 2o1rÅ o3rónn o3rónq o3rónu o3rónv 2o3rós 2orq ort2 or3tu 2o1ru o2rue or3ue. o3rum o3rus 2o3rú 2orv o1ry 2os. os2a os2cǽ os4ch os3cit o4sco o4scó os2cr o4scu o4scú os2e ose2i os2i osíl2 o1s2m 2osn o1sp o2spa o2spá os2pe ospe5ri ospe5r4Ä« osper4í os2pé os2pl 2o2sq 2ost os4t3ea os4t3eÄ os4t3eá ost5ill osti5t4 os4t5íll ostí3t4 os3to os4to. os4ton os4toq os4tou os4tov os5tri os5trÄ« os3trí os3tru os3trú os4tué 2osue o4s3ue. os2ué os2uÄ« 2osv o3ta o4t3ann o4t3ánn o4t3enn o5ter. o4t3e4ra o4t3e4rÄ o4t3e4rá o5te5re ote5rii ote5rií o4t5erim ote5rin o4t5erit ote5riu oteri5ue ote5ri5v ote5rÄ« oterÄ«5u oterÄ«5v o4t5e4rít o5tern o5terq o5terue o4t5erun o4t3e4rú o5terv o4t5este o4t5esti o4t5estí o4t5esto o4t5estó o4t3énn o4t5é4rim o4t5é4rit o4t3ést o2tl o3t2u 2o1u2 ou3enn ouÄ“5nÄ« ou3énn o2um ou4st o1Å«2 oÅ«Ì2 2oú2 o1út 2ov ov3enn ovÄ“5nÄ« ov3énn 2ox2 ox4eu o3xi oxu3 o2x3ue oÍže2i oÍ¡e2i Å2a Åab2 Åa2m Åăb2 Åb2 Åba3q Åbæ3 Åbe3 ÅbÄ«3u ÅbÄ«3v Åbo3 ÅbÅ3r ÅbÅÌ3 Å3bu Å3bÅ­ 2Åc Å2ch Å2c3ue Å2d1a2 Å3dam. Å3damq Å3damu Å3damv Å3d2an Å3d2ar Å3dat Å2dÄc Å4d3ÄÌc Å2d1ă Å3dăm. Å3dămq Å3dămu Å3dămv Å3d2ăn Å3dăr Å3dăt Å5dăÌmn Å5dăÌmq Å5dăÌmu Å5dăÌmv Å3dăÌn Å3dăÌr Å3dăÌt Ådá2 Å4d5eam. Å4d5eamn Å4d5eamq Å4d5eamu Å4d5eamv Å4d3ean Å4d3eat Å2d3eÄ Å4d5eámn Å4d5eámq Å4d5eámu Å4d5eámv Å4d3eán Å4d3eát Å2d3eÅ Å4d3e4ru Å4d3e4rú Å2d3e2s Å2deu Å3deue Å2deú ÅdÄ“2g ÅdÄ“2s ÅdÄ“Ì4g Å2d3Ä•Ä Å4d5ĕăm. Å4d5ĕămn Å4d5ĕămq Å4d5ĕămu Å4d5ĕămv Å4d3ĕăn Å4d3ĕăt Å6d5ĕăÌmn Å6d5ĕăÌmq Å6d5ĕăÌmu Å6d5ĕăÌmv Å4d5ĕăÌn Å4d5ĕăÌt Å2d3Ä•Å Å4d3Ä•rÅ­ Å2d3Ä•s Å4d3Ä•Ìs Å2d3és Å2d3i2g Åd4Ä«ue. Åd4Ä«uÄ•. Åd4Ä«ve. Åd4Ä«vÄ•. Åd6Ä«Ìue. Åd6Ä«ÌuÄ•. Åd6Ä«Ìve. Åd6Ä«ÌvÄ•. Å2d3Ä­g Å4d3Ä­Ìg Å2d3í2g Å3do Åd4or Å2e Åe2m Å2Ä• Åg2 Åga2 Ågá2 Ågo2 Å1h Å1i2 Å2iad2 Å2i3b Å3ic Å2ien Å2iÄ“n Å2is Å1Ä­2 Å2Ä­3b Å2Ä­Ä“ Å2Ä­Ä• ÅÄ­Ì2 Å2Ä­ÌÄ• Å1í2 Å2íe Åle3i Åle2r Ålé3i Ål3ue. Å1m2 Åma2r Åna2r Ån2Ä Åná2 1Ånc 2Å3n2e Åneu5t 2ÅnÄ“ 2Å3n2Ä• 2Å3né 2Ån2i 2ÅnÄ« 2ÅnÄ­ 2Åní Åno2 Åns2c Åns4i Ånsi5t Åns4Ä­ ÅnsÄ­5t Ån3s4p 2Å1n2u Å2n3ue 2Ån2Å­ 2Ånú Åp2 Å3pi Å3pÄ­ Å3pt 2Åq Å3qu Å1r 2Å3ra. 4Å3rane 2Å3raq 2Å3rau 2Å3rav 2Å3ră. 4Å3rănÄ• 2Å3răq 2Å3rău 2Å3răv 1Ård År2e 2Å3re. 2Å3rea 2Å3reÄ 2Å3reá 2Å3reæ 2Å3reÇ£ 2Å3reǽ 2Å3ree 2ÅreÄ“ 2Å3reÄ« 4Å3rene 2Å3reÅ 2Å3req 2Å3reu 2Å3reú 2Å3rev ÅrÄ“2i Å3rÄ“u Å3rÄ“v År2Ä• 2Å3rÄ•. 2Å3rÄ•a 2Å3rÄ•Ä 2Å3rĕă 2Å3rĕá 2Å3rĕæ 2Å3rÄ•Ç£ 2Å3rĕǽ 2ÅrÄ•Ä“ 2Å3rÄ•Ä• 2Å3rÄ•Ä« 4Å3rÄ•nÄ• 2Å3rÄ•Å 2Å3rÄ•q 2Å3rÄ•u 2Å3rÄ•Å­ 2Å3rÄ•v 4Å3rÄ•Ìă 4Å3rÄ•ÌÄ• Åré2 2Å3réa 2Å3rée 2Å3ri 2Å3rÄ« 2Å3rÄ­ 2Å3rí 1Årn Åro2 2Å3ron 2Å3ros 2Å3rÅr 2Å3rÅs Å3rÅÌr Å3rÅÌs ÅrÅ2 2Å3rÅn 2Å3rÅs Å3rÅÌn Å3rÅÌs Åró2 2Å3rón 2Å3rós 2Å3r2u År3ue. Å4ruÄ• 2Å3rÅ­ År4Å­n 2Å3rú 2Ås. Ås2cǽ Å3s4ch Ås3cit Ås3cÄ« Ås3cÅ­ ÅsÄ“2i Ås4Ä“m Ås2i Åsi3l4 Åsi2n Åsíl2 2Åsn Å1s2p Åspe3r Åsper4Ä« ÅspÄ•5rÄ« 2Å2s3q 2Åst Ås2ta Ås2tÄ Ås2tă Ås2tá Ås2te Ås2tÄ“ Ås2tÄ• Ås2té Ås2ti Åsti5t4 Ås2tÄ­ Åstí3t4 Ås2tÅ Ås5tri 2Å2s3ue 2Å2s3uÄ• 2Åsv Åt2 Å3ta Å3tă Åté2 Å2th Åtó2 Å3tu 2Å1u Å3ue Å3uÄ• Å2um 2Åv Å3ve Å3vÄ• Å2x 2Å2Ì ÅÌb2 ÅÌ3bu ÅÌ3bÅ­ ÅÌ4d3ea ÅÌ4d3eÄ ÅÌ4d3eÅ ÅÌ4d5eru ÅÌ4d3es ÅÌ4d3Ä•Ä ÅÌ4d3ĕă ÅÌ4d3Ä•Å ÅÌ4d3Ä•s ÅÌ2Ä• ÅÌ3g2 ÅÌi2 ÅÌ3ic ÅÌÄ­2 ÅÌ3Ä­c ÅÌ3lo ÅÌ3lÅ ÅÌ3luÄ« ÅÌm2 ÅÌ3mu 3ÅÌnc ÅÌns4i5 ÅÌns4Ä­5 ÅÌ3p2 3ÅÌrd ÅÌ3rÄ• 3ÅÌrn ÅÌ3spe ÅÌ3s4pÄ• ÅÌ3spi ÅÌ3spÄ­ ÅÌ3s4ta ÅÌ3s4tÄ ÅÌ3s4tă ÅÌ3s4te ÅÌ3s4tÄ“ ÅÌ3s4tÄ• ÅÌ3s4tÅ ÅÌ5s4trÄ“ ÅÌ4s5tru Å1a Åau6stÄ• Å1Ä Å2Än Å2Är 2Å1ă2 Åăd3 ÅădÄ•4 ÅădÄ•Ì4 ÅădÅÌ4 Å2ăs ÅăÌ2 ÅăÌd3 ÅăÌdÄ•4 Å1á Å1æ2 Å2æ3q Å1Ç£2 Å2Ç£3q ÅÇ£Ì2 Å1ǽ2 Å2ǽ3q 1Åb1 Å2ba Åbă2 Åb2ăb Åb2ăq Åb2ău Åb2ăv ÅbăÌ2 Åb2Ä“r ÅbÄ•4r ÅbÄ•Ì2 Å2bi 2ÅbÄ« ÅbÄ«2m Åb2Ä«n Åb2Ä«q Åb2Ä«t ÅbÄ­2 ÅbÄ­4c Åb3Ä­t ÅbÄ­Ì2 Å2bl Å2bo Å2bó Å2br Åbs2 Åb5stÄ• Å3că 1Åcc Å3cÄ“ Å3cÄ• Å3cÄ« Å3cÄ­ ÅcÅ3m4Ä“ ÅcÅ3mÄ• ÅcÅmÄ­5tÄ• Åc4tÄ•n Å2cu Å3cÅ­ 2ÅdÄ• ÅdÄ•4c3Ä• ÅdÄ•s3 2Å3dÄ« Åd2Ä­ 2ÅdÅ Å2d1u 2ÅdÅ­ Å1Ä“2 Å2Ä“n ÅÄ“3nÄ• Å2Ä“s Å2Ä“u Å2Ä“v ÅÄ“Ì2g ÅÄ“Ì2m Å1Ä•2 Å2Ä•3q Å3Ä•Ì2 ÅfÅ1 Åg2 Å3ga Å3gæ Ågæ3u Ågæ3v Å3gÇ£ Å1h Å1i Å1Ä« ÅÄ«2b ÅÄ«2m ÅÄ«2r ÅÄ«2t ÅÄ«2u ÅÄ«2v ÅÄ«Ì2b ÅÄ«Ì2m ÅÄ«Ì2r ÅÄ«Ì4t ÅÄ«Ì2u ÅÄ«Ì2v Å1Ä­ Å2Ä­u Å2Ä­v Å3la Å3lÄ Å3lá Å3læ Å3lÇ£ Å3lǽ Å3lÄ“n. 2Å3lÄ•. 4Å3lÄ•nÄ• 2Å3lÄ•q 2Å3lÄ•u 2Å3lÄ•v 2Å3lÄ« 2Åll 2Å3lÅ 2Å3lÅ Å2l1u 2Å3lÅ­m 2Å3lÅ­s 4Å3lÅ­Ìm 4Å3lÅ­Ìs Å1ma Å3m2ă Åmb2 ÅmbÅ«3r ÅmbÅ«Ì3 Åm1Ä“ Å3mÄ“t Å3mÄ“Ìt Å3mÄ•. Å3mÄ•m Å3mÄ•n Å3m2Ä•q Å3mÄ•u Å3mÄ•v Å3m2Ä« Å3mĭă Åm2Ä­n ÅmÄ­nÄ­5c Å3mÄ­s ÅmÄ­2t Åm3Ä­tÅ Å3mÄ­Ìs Åm3p2 ÅmpÄ“Ì5i ÅmpÄ•6rÄ«. ÅmpÄ•rÄ«6n ÅmpÄ•6rÄ«6q ÅmpÄ•6rÄ«6u ÅmpÄ•6rÄ«6v ÅmpÄ•6rÄ«Ì6n ÅmpÄ•6rÄ«Ì6q ÅmpÄ•6rÄ«Ì6u ÅmpÄ•6rÄ«Ì6v ÅmpÄ•6r5Ä­Ä« ÅmpÄ•6rÄ­t ÅmpÄ•Ì6r5Ä­Ä« Å3m2Å«2 Å3n2Ä Ån3d2 Ån2gá Å2n1i Ån5Ä­4cÄ•Ì Å4n3Ä­4cÄ­ Å4n5Ä­Ì4cÄ­ Ån2Å ÅnÅ3s2 ÅntÄ•s5 Ån2Å­ Å1Å Å2Ån Å2Ås Å1Å2 ÅÅÌ4r 2Åpa 2ÅpÄ 2Åpæ 2ÅpÇ£ Åpe2 Å2pÄ• ÅpÄ•3r4a ÅpÄ•3r4æ ÅpÄ•3r4Ç£ ÅpÄ•3rÄ• ÅpÄ•3rÄ« ÅpÄ•3rÅ ÅpÄ•3rÅ­ 1ÅpÄ« Å3pÄ«s 2Å3pÅ ÅpÅ3t Åp2su ÅptÄ•4 ÅptÄ•Ì4 2År. Å1ra Å3r2Ä 2Å1ră Å1ræ Å1rÇ£ 2Årc Å1re Å3rÄ“ Å1r2Ä• 2Å3rÄ­b 2Å3rÄ­s 4Å3rÄ­Ìs 2Årn 2Å1rÅ Å1r2Å 2Årq År2su 2Åru 2Å3rÅ­ 2Årv Ås2ă Å3s2Ä• Å1s2m Å1sp Å2spă Ås2pÄ• ÅspÄ•5rÄ« Å2s3pÄ­ Ås2pl Ås3q Ås4t3Ä•Ä Ås5tÄ•r Åst5Ä­ll Ås6t5Ä­Ìll Ås5trÄ« Å3strÅ Ås3u Å4t3ănn ÅtÄ•2 Å2t3Ä•r ÅtÄ•3rÄ• ÅtÄ•5rÄ« ÅtÄ•rÄ«5u ÅtÄ•rÄ«5v Å4t3Ä•s. Å4t3Ä•sn Å4t3Ä•sq Å4t5Ä•stÄ• Å4t5Ä•stÄ­ Å4t3Ä•su Å4t3Ä•sv Å4t5Ä•ÌrÄ­ Å4t3Ä•Ìs Å2tl Å1u ÅuÄ“5nÄ« Å3u4Ä•m Å1Å«2 ÅÅ«Ì2 ÅÅ«Ì4t Å1Å­ Å2Å­m Å2Å­s Å2Å­Ì ÅvÄ“5nÄ« Å3v4Ä•m 2Åx2 Åx4eu Å2xu ÅxÅ­3 ÅxÅ­Ì3 Å2Ì ÅÌ3ă ÅÌb3Ä•Å ÅÌb3Ä•4r ÅÌbÄ­2 ÅÌb3Ä­t ÅÌb5ÅlÄ“ 3ÅÌ2br ÅÌbs2 2ÅÌc 3ÅÌcc 2ÅÌd ÅÌ2d3u ÅÌ1Ä• ÅÌÄ•2m ÅÌ1i ÅÌÄ­2 ÅÌ3Ä­Ä“ ÅÌ3Ä­t 4ÅÌlÄ•n 4ÅÌlÄ•q 4ÅÌlÄ•u 4ÅÌlÄ•v 2ÅÌll ÅÌl3u ÅÌ4m3Ä•s ÅÌmÄ­4tÄ­ ÅÌmÄ­4tÅ ÅÌm3p2 ÅÌ3nÄ­b ÅÌ3Å ÅÌ4pÄ•r ÅÌ4pÄ« ÅÌ2r 2ÅÌ3ră ÅÌ3rÄ“ ÅÌ3rÄ• ÅÌ3rÄ« ÅÌ3rÄ­a ÅÌ3rĭæ ÅÌ3rÄ­Ç£ 4ÅÌ3rÄ­b ÅÌ3rÄ­c ÅÌ3rÄ­d ÅÌ3rÄ­Ä« ÅÌ3rÄ­s 2ÅÌrn ÅÌ3rÅ 2ÅÌrq 2ÅÌru ÅÌ3rÅ­ 2ÅÌrv ÅÌ3sÄ• ÅÌ3s4pÄ• ÅÌ3sph ÅÌs4t5Ä•Ä ÅÌt5Ä•4rÄ ÅÌt5Ä•4ră ÅÌt5Ä•4rÄ­ ÅÌt5Ä•rÅ­ 2ÅÌx ó1ad ób1 ób2ab ób2a3q ób3a2r ób2aÍ¡ ób2eq óbe4r ób3es óbi4c ób3i2t ób2iu ób2o1 ób5olen ób5oles ób3olÄ“ óbo3r 1ó2br ób2ri ób3ru ób5rue 1ób3s2 ób5ste ó3b2u 1ócc óco3m óco5me ó2c3ue 2ód ód2a ó2d3ea ó4d3eo ó4d3e4ru ó4dest ó2d3i2g ó3ear ó3eat óe2ă óe3b óed2 óe2e óe2i ó1e2m óepe3 óe2Å­ ófe1 ófo1 óg2o3 ó1h ói2 ó3ian ó3iaq ó3iau ó3iav ói3b ó1ic ó3ien ó1iÄ“ ó3iit ó2in ó2i3q ó3it ó1iu ó2i3ue ó2i3v 2ólen 2óleq 2óleu 2ólev 2óll ó2l1u ó3lub ó3lum ó3lus ó1m óm2a óm2e ó2m3e2d óm2i ó5mit. óm5i4tan óm5i4tat ómi4tÄn óm5i4tem óm5i4ten óm5i4tes óm5i4tet ómi4tÄ“s ómi4tor ó5mitur ómpe3 ómpe5r óm2ui óm2uÄ« ó3m2Å« 2ó1n 3ónc ón3g2 ón5i4cit ón3t2 ó2nue ón2uÄ« ón2ul ó3nus óo2 ó1or ópe1 ó2pe3r ó3pi óp2su ópu3 2óq ó3qu ó1ra 4órane 2óraq 2órau 2órav ó1ræ ó1re 2óre. 2órea 2óreæ 2óree 2órei 4órene 2óreo 2óreq 2óreu 2órev ó1ri 2óri. ó4riat 2órib 2óris ó1rÄ« 3órna 4órne. 3órnem 3órnen 3órner 3órnes 3órnet 3órno ó1ro ó1rÅ 2órq órt2 ór3tu 2óru ó2rue ó3r2ui ó3run 2órv ós4ch ós2i 2ósn ó1sp ós2pe3 2ós3q 2óst óste3 ós4t3ea ós4t3eÄ Ã³s5tri 2ósue ós3uis ó3s2uÄ« 2ósv ó5ter. ót3e4ra ót3e4rÄ Ã³t3eru ó4test ó2tl 2ó1u2 ó2um 2óv 2óx óx4eu ó3x2i óxu3 ó2xue 2Å“a Å“a2m 2Å“Ä 2œă 2χ 2Ͼ Ͼ2i Ͼ2Å­ 2œǽ Å“b2 Å“3bi Å“bÄ«3u Å“bÄ«3v Å“3bu Å“3bÅ­ Å“ce2 Å“cu3 Å“de3 Å“dÄ•3r Å“en3 Å“Ä“n3 ώn3 2Å“i 2Å“Ä« 2ϒ Å“1m Å“1n2 Å“no3b2 ϗ1r Å“pe3 Å“per2 Å“pÄ•3r Å“pÄ•5rÄ­ Å“1r Å“te5re Å“Ì3b2 Å“Ì2i Å“Ì3l Å“Ì1n Å“Ì2s 1p p2a pab2 3pa3d2 pada3 pae4nÄ« pan3sa pan5s4i pansi5u pansi5v pans4í 2parg 2pars par2u pa4ruÄ« pa3tr p2Ä pÄn3sa pÄn3să pÄn3s4Ä« pÄnsÄ«5n pÄnsÄ«5q pÄnsÄ«5u pÄnsÄ«5v 3pă3d2 pă3ră 2părg pă3rÅ 2părs păs3t păs5tă 2păth păÌ3rÄ“ 4păÌrg 4păÌrs p2á pán3si 2párg 2párs pá4ruÄ« pæ2a pæ2ă pæ2á pæ2i pæ2nÄ« pæ2Å­ pÇ£2a pÇ£2ă pÇ£2nÄ« pÇ£2Å­ p2e 3pe. 3pe2a pe4ae pe4am pe4as pe4aÍž pe4aÍ¡ pe4Äs pe3d2 pe2e 3pei pe4ia. pe4iae pe4iam pe6iane. pe4iaq pe4iar pe4ias pe4iau pe4iav pe4iáe pe4iám pe6iáne. pe4iár pe4iás pe4iáu pe4iáv pe4ien pe2ié pe2ii pe2ií pe4io. pe4ioq pe4iou pe4iov pe4ión pe4ióq pe4ióu pe4ióv pe4is pe4ium pe2Ä« pe4Ä«s 3pe2í pe4mn pe4mq pe4mv 3pen pe4nt pe2nu 3pe2o pe4os pe2Å pe4Ås 3peó pepe3 peper4 pepere5 3peq per1 per5a6b5únd pe5ram. pe5ramn pe5ramq pe5ramu pe5ramú pe5ramv pe3ran per6ane pe5ras. pe5rasn pe5rasq pe5rasu pe5rasv pe5rat. pe5rati pe5ratí pe5ratn pe5ratq pe5ratv pe4rÄc pe5rÄt per5ÄÌc pe5rÄÌt pe4r3ác pe2re pere4s pere4x3 perexi4 perexí4 pe5rÄ“. pe4rÄ“b pe5rÄ“q perÄ“4s pe5rÄ“t perÄ“Ì4s pe4r5énn peré4s peré4x3 per5i4ce peri4cÄ« peri4cí peri4mo peri4mÅ peri4mó perin5i4 peri4n5í4 per5i6taÍž peri6tÄ. peri6tÄn peri6tÄq peri6tÄr peri6tÄu peri6tÄv peri4tÇ£ peri4tÄ« peri4tÅ peri6tÅ«. peri6tÅ«n peri6tÅ«q peri6tÅ«r peri6tÅ«u peri6tÅ«v pe4rí4ce pe4rn pero4s per5osa per5osá per5osæ per5osǽ per5ose per5osé per5osi per5osí per5oso per5osó per5osú pe3rÅ. pe3rÅn perÅ4s pe3rÅu pe3rÅv pe5rÅÌn pe5rÅÌq perÅÌ4s pe5rÅÌu pe5rÅÌv pe4róp peró4s perpe5t4 perpé5t4 pe4rq pe4rt pe4rv 3pes pe4sn pe4sq pes3t pes5te pe4su pe4sv 3pet pete5r pete7rer pe4tn pe4tq pe3tuÄ« pe4tv 3peu pe4um pe2un pe2uo pe2uÅ pe2uó pe4us 3peú 3pev pex2 pe3x4e pexu3 pexÅ«3r 3peÍž 3peÍ¡ p2Ä“ pÄ“4iam pÄ“4ian pÄ“6iÄne. pÄ“4iÄru pÄ“4iÄrú pÄ“4iÄue pÄ“4iÄve pÄ“6iÄÌne. pÄ“6iÄÌru pÄ“6iÄÌue pÄ“6iÄÌve pÄ“4iám pÄ“4iæne pÄ“4iæue pÄ“4iæve pÄ“4iÇ£ne pÄ“4iÇ£ue pÄ“4iÇ£ve pÄ“4iǽne pÄ“4iǽue pÄ“4iǽve pÄ“4ien pÄ“4iÄ«ne pÄ“4iÄ«ue pÄ“4iÄ«ve pÄ“4iÅne pÄ“4iÅru pÄ“4iÅrú pÄ“4iÅue pÄ“4iÅve pÄ“2iu pÄ“2iú pÄ“2nu pÄ“3r p2Ä• 3pÄ•. 3pÄ•Ä 3pÄ•2ă 3pÄ•3d2 3pÄ•f 3pÄ•n pÄ•4nt 3pÄ•Å 3pÄ•q pÄ•4r3Ä4c pÄ•5rÄt pÄ•r5ÄÌc pÄ•5rÄÌt pÄ•5rÄ“. pÄ•r3Ä“b pÄ•5rÄ“q pÄ•rÄ“4s pÄ•5rÄ“t pÄ•rÄ“Ì4s pÄ•r3Ä•Ä pÄ•r3ĕă pÄ•4r3Ä•Å pÄ•6r5Ä•Ìnn pÄ•4r5Ä­4cÄ« pÄ•r6Ä­Ä•. pÄ•r6Ä­Ä•n pÄ•r6Ä­Ä•q pÄ•r6Ä­Ä•u pÄ•r6Ä­Ä•v pÄ•r5Ä­mÄ­ pÄ•4r5Ä­4mÅ pÄ•4rÄ­n pÄ•5rÄ­Å pÄ•5rÄ­Å pÄ•5rÄ­s pÄ•4r5Ä­4ta pÄ•r5Ä­tÄ. pÄ•r5Ä­tÄn pÄ•r5Ä­tÄq pÄ•r5Ä­tÄr pÄ•r5Ä­tÄu pÄ•r5Ä­tÄv pÄ•4r5Ä­4tă pÄ•4r5Ä­4tá pÄ•4r5Ä­4tæ pÄ•4r5Ä­4tÇ£ pÄ•4r5Ä­4tǽ pÄ•r5Ä­tÄ•. pÄ•r5Ä­tÄ•n pÄ•r5Ä­tÄ•q pÄ•r5Ä­tÄ•u pÄ•r5Ä­tÄ•v pÄ•4r5Ä­4tÄ« pÄ•4r5Ä­4tÅ pÄ•r5Ä­tÅ«. pÄ•r5Ä­tÅ«n pÄ•r5Ä­tÅ«q pÄ•r5Ä­tÅ«r pÄ•r5Ä­tÅ«u pÄ•r5Ä­tÅ«v pÄ•4r5Ä­4tÅ­ pÄ•5rÄ­Å­ pÄ•6r5Ä­Ì6cÄ• pÄ•r5Ä­ÌmÄ­ pÄ•5rÄ­Ìs pÄ•rÄ­Ì4t pÄ•r5Ä­Ìtă pÄ•r5Ä­ÌtÄ• pÄ•2rÅ pÄ•3rÅ. pÄ•3rÅq pÄ•rÅ4s pÄ•3rÅu pÄ•3rÅv pÄ•5rÅÌn pÄ•5rÅÌq pÄ•rÅÌ4s pÄ•5rÅÌu pÄ•5rÅÌv pÄ•r5ÅÌp pÄ•r3Å«Ì pÄ•r5Å­Ìn 3pÄ•2s pÄ•s5tÄ• 3pÄ•t 3pÄ•u 3pÄ•v 2pÄ•x2 pÄ•xÅ«3r pÄ•Ì4r3Ä“ pÄ•Ì6rĕăn pÄ•Ì6r5ĕăr pÄ•Ì6rĕăt pÄ•Ì4r5Ä•Å 4pÄ•Ìrg pÄ•Ì4rÄ« pÄ•Ì6r5Ä­6cÄ• pÄ•Ì6r5Ä­6cÄ« pÄ•Ì6r5Ä­t. pÄ•Ì6r5Ä­6ta pÄ•Ì6r5Ä­6tă pÄ•Ì6r5Ä­6tæ pÄ•Ì6r5Ä­6tÇ£ pÄ•Ì6r5Ä­6tÄ« pÄ•Ì6r5Ä­6tÅ pÄ•Ì6r5Ä­6tÅ« pÄ•Ì6r5Ä­6tÅ­ 6pÄ•ÌrnÄn 6pÄ•Ìrnăr 6pÄ•Ìrnăt 6pÄ•ÌrnÄ•r 6pÄ•ÌrnÄ•t 4pÄ•ÌrnÄ­ 4pÄ•ÌrnÅ 3pÄ•Ì4s pÄ•Ìs5t 3pÄ•Ìt 3péa 2péc 3péi 3péo pér5ear pér5eor pé2r3Ä“ 2pérg pér5i4ce pér5i4ci pér5i4cÄ« pé4r5it. pér5i4tæ pér5i4tÇ£ pér5i4tÄ« pér5i4to pér5i4tÅ pér5i4tu pér5i4tÅ« pé2rÄ« 2pérm 4pérnÄn 4pérner pér4ui. pér4uÄ«. 3pés 3pét 3péu pé2uo péx2Ä« 3pé͞ 3pé͡ 2ph. phe2i phÄ“2i 2phÄ“x phi6sta 2phn 3pho 3phÅ 3phó 2pht p2i 3pi2a piad2 3piÄ 3piá 3piæ 3piÇ£ 3piǽ 2pic pic4e pi5cen 3pid 3pie 3piÄ“ 3pié pig3n 3pi2i 3piÄ« 3pií 3pil pin2Ä pin4i pini3c 3pio. 3pion 3pioq pio2s 3piou 3piov 3pión 3pióq 3pióu 3pióv pi3r2 pirí3t pi4s3c pis5ci pi4s3tr 3pit pi5ter 3pium 3piúm pi2x3 3pÄ«. 3pÄ«m 3pÄ«q pÄ«rí3t pÄ«s3 3pÄ«u 3pÄ«v 3pĭă 2pÄ­c pÄ­n2a pÄ­n2Ä pÄ­n2æ pÄ­r2 pÄ­4str 3pÄ­t pÄ­5tÄ•r pÄ­Ì3d pÄ­Ì4s5t 3pÄ­Ìt 3pía 3píd 3píe píg3n 3píl pí1m pí4s3t 3pít pí3tur pí2x p2l2 p1n2 p3nem p3nen p3ner p3nes p3net 2pni 2pní p2o 3po. 2pond po3ni 3poq 3por pos3c posí3t po3s2u po4t5e4ro po4t5e4rÅ po4t5e4ró 3pou 3pov 3pÅ. 3pÅq 3pÅr 3pÅs 3pÅu 3pÅv 3pÅÌs p2Å pÅ3Ä­ 2pÅn 3pÅny pÅ3rÄ• pÅ3rÄ« pÅs4trÅ pÅtÄ•4r pÅtÄ•Ì4 pÅÌ3rÄ­ pÅÌ4t5Ä•4r 3póq 3pór pó3s4tr pó4te4r pót5eri pót5ero pót5erÅ 3póu 3póv 2pp ppule4 p2r2 prae3 prae5s4 praete6ris praete6rís praeté6r5is pra3s2 praÍže5 praÍžes4 praÍžÌe5 praÍžÌes6 praÍ¡e5 praÍ¡es4 praÍ¡Ìe5 praÍ¡Ìes6 prÄ1 prÄs2 práe3 práes4 prá3s4t præ3 præs4 prÇ£3s prÇ£3Å­ prÇ£Ì3 prÇ£Ìs4 prǽ3 prǽs4 pre3d pre5mi pre5mo prÄ“3m pr4Ä•Ì pri5mi pri4s3 prÄ­4s 3pro pro6de6ri pro6de6rí pro4des pro4dés pro4di. pro6di6mus pro6di6mús pro4di4n pro4di4q pro4dis pro6dit. pro6di6te pro6di6tis pro6di6tís pro6ditn pro6di6to. pro6di6ton pro6di6toq pro6di6tot pro6di6tou pro6di6tov pro6di6tón pro6di6tóq pro6di6tót pro6di6tóu pro6di6tóv pro6ditq pro6ditue pro6di6tur. pro6di6turn pro6di6turq pro6di6turue pro6di6turv pro6di6túrn pro6di6túrq pro6di6túrue pro6di6túrv pro6ditv pro4dí4n pro4dí4q pro4dís pro6dí6te pro6dítn pro6dítq pro6dítu pro6dítv pro4d5í4u pro4d5í4v pro4li 3prÅ1 prÅ6de6ri prÅ6de6rí prÅ6dÄ•6rÄ­ prÅ6dit. prÅ6ditn prÅ6ditq prÅ6ditue prÅ6ditv prÅ4dÄ«. prÅ4dÄ«4n prÅ4dÄ«4q prÅ6dÄ«Ì6n prÅ6dÄ«Ì6q prÅ6d5Ä«Ìs prÅ6d5Ä«Ì6u prÅ6d5Ä«Ì6v prÅ6dÄ­t. prÅ6dÄ­tn prÅ6dÄ­tq prÅ6dÄ­tu prÅ6dÄ­tv prÅ6dÄ­Ìtn prÅ6dÄ­Ìtq prÅ6dÄ­Ìtu prÅ6dÄ­Ìtv prÅ6dítn prÅ6dítq prÅ6dítu prÅ6dítv prÅ4li prÅ4lÄ­ prÅs2 prÅ3s4t prÅÌ6de6ri prÅÌ6dÄ•6rÄ­ prÅÌ6dit. prÅÌ4d5Ä« prÅÌ6dÄ­t. prÅÌ5s4t 3pró pró6de6ri pró4des pró4di. pró4dis pró6dit. pró4li prós2 pró3st 2p1s2 psa3c p3sá p2s3q p2s3ue p2s3uÄ• 2pt2 p4t3enn pte3r4a pte3rÇ£ pte5re pte6rea pte6reÄ pte5ré pte3ri pteri5u pteri5v pte5rÄ« pterÄ«5u pterÄ«5v pte3ro pte3rÅ p4t3Ä•nn ptÄ•3r4a ptÄ•3rÇ£ ptÄ•3rÄ• ptÄ•5rÄ« ptÄ•rÄ«5u ptÄ•rÄ«5v ptÄ•3rÅ­ p5tÄ•Ìnd pt5Ä•Ìnn p4t3énn pti4s ptis5t pti6sta ptÄ­4s ptÄ­s5t p3tr p3tu p2u 2pua 2puÄ 2puá 3pu3b2 pu4gn pu2lu pul3ue pul3ué pu3lum pu1m 2puo 2puÅ 2puó 2puu 2puú 3pÅ«b pÅ«2s 2pÅ«t p2Å­ 2pÅ­Ä 2pŭă 3pÅ­g 2pÅ­Å 2pÅ­Å 2pÅ­r 2pÅ­Å­ 3púb2 pú4gn 2pút 1q q2u2 qu4ÄƒÌ qu4ám quás3 qu4át que6ste 3quÄ• quÄ•6stÄ• qu4ia qui4d5ue qui4d5ui qui4d5uÄ« qui4d5uí 2quit quí4d5ue quí4d5ui quí4d5uÄ« quo2s3 quó2s3 ra3a2 rab4a r2ab2e ra3bib rabi3c r4abis ra3biu rab2Ä« rabÄ«3u rabÄ«3v r2abí rab2o ra3bu ra4b5und ra3ci ra3cí ra2cr rad2a rad2e rad2Ä“ rad2é rad2Ä« radÅ5rÅ rad2ó ra3eat ra3eÄt ra3eát raes2 r2aeu r2aev r1ag ra2gÄ ra2gá ra3g2n ra2gr 2rah ra1i2 ra3ic ra3i4n ra2io ra2ió ra3is ra3it rai4u ra4ium ra4ius ra4iús rai4v ra1Ä«2 raÄ«4n raÄ«Ì4 ra1í2 ra3í4n ra3ís r1al r2a3li ra3mam ra4man ra3mas ra4mán ra4már ram3b2 ram5bi rambÄ«5q rambÄ«5u rambÄ«5v rambÄ«Ì5q rambÄ«Ì5u rambÄ«Ì5v ram5bu r2a3me r2a3mé r3amna r3amnÄ r3amná r3amni r3amnÄ« r3amní ra5ne. 4rang ran4si. ran4si4m ran4s5i4n ran4si4q ran4s5is rans5it ran4s5í4n ran4sí4q ran4s5ís ran4sí4u ran4sí4v r2ant ra1o ra1Å r2aq ra5que ra4rab r4aram ra4rar ra4rau ra4rav ra2rÄ ra4ráb ra4rár ra4ráu ra4ráv rar5ch r4arem r4aret r3a2rÄ“ ra4rid 4ra4ríd r2aro r3aror r3a2rÅ r2aró r3arór ra4rue ra4rué ra4rui ra4ruí ra5rum r3a4rúe r3a4rúi ra5rúm rasce5u ra4sn ra4s2p ra4sq ra4ss ras4ta ras4tá ras4te ras4tém ras4tén ras4tés ras4tét ras4tic ras4tíc ras5tra ra4sui ra4suí ra4sv ra5te. ra5ten ra5teq ra5teu ra5tev ra5ti. ra5tic ra5tim ra5tin ra5tiq ra5tis ra5tiu ra5tiv ra5tíc ra5tín ra5tíq ra5tís ra5tíu ra5tív ra5to. ra5ton ra5toq ra5tor ra5tos ra5tou ra5tov ra5tón ra5tóq ra5tór ra5tós ra5tóu ra5tóv ra3tr r3att ra5tum ra5tus ra5túm ra5tús ra5ue. ra5ve. ra2xu r4aÍžeu r4aÍžev r4aÍžÌeu r4aÍžÌev r4aÍ¡eu r4aÍ¡ev r4aÍ¡Ìeu r4aÍ¡Ìev 1rÄ rÄ5bun rÄ4cer rÄ4cÄ•r rÄ4cér 2rÄcr 2rÄct rÄi2 rÄ4iae. rÄ6iaene rÄ6iaeque rÄ6iaeue rÄ6iaeve rÄ6iaÍže. rÄ6iaÍžene rÄ6iaÍžeque rÄ6iaÍžeue rÄ6iaÍževe rÄ6iaÍžÌene rÄ6iaÍžÌeque rÄ6iaÍžÌeue rÄ6iaÍžÌeve rÄ6iaÍ¡e. rÄ6iaÍ¡ene rÄ6iaÍ¡eque rÄ6iaÍ¡eue rÄ6iaÍ¡eve rÄ6iaÍ¡Ìene rÄ6iaÍ¡Ìeque rÄ6iaÍ¡Ìeue rÄ6iaÍ¡Ìeve rÄ4iÄ. rÄ4iÄru rÄ4iÄrú rÄ4iÄs. rÄ6iÄsne rÄ6iÄsque rÄ6iÄsue rÄ6iÄsve rÄ6iÄÌru rÄ6iÄÌsne rÄ6iÄÌsque rÄ6iÄÌsue rÄ6iÄÌsve rÄ6iáene rÄ6iáeque rÄ6iáeue rÄ6iáeve rÄ4iæ. rÄ4iæne rÄ6iæque rÄ4iæue rÄ4iæve rÄ4iÇ£. rÄ4iÇ£ne rÄ6iÇ£que rÄ4iÇ£ue rÄ4iÇ£ve rÄ6iÇ£Ìne rÄ6iÇ£Ìque rÄ6iÇ£Ìue rÄ6iÇ£Ìve rÄ4iǽne rÄ6iǽque rÄ4iǽue rÄ4iǽve rÄ3ic rÄ4iÄ«s. rÄ6iÄ«sne rÄ6iÄ«sque rÄ6iÄ«sue rÄ6iÄ«sve rÄ6iÄ«Ìsne rÄ6iÄ«Ìsque rÄ6iÄ«Ìsue rÄ6iÄ«Ìsve rÄÄ­2 rÄÄ­Ì2 rÄ1í2 r2Än rÄnsÄ«4 rÄnsÄ«Ì4 rÄn6s5Ä­Ìt rÄn4s5ít 4rÄrÄ“sc 6rÄrÄ“Ìsc rÄ4rue rÄ4ruÄ“ rÄ4rué rÄ4rui rÄ4ruÄ« rÄ4ruí r3Ä4rÅ­Ä“ r3Ä4rÅ­Ä• r3Ä4rÅ­Ä« r3Ä4rÅ­Ä­ rÄ4rÅ­ÌÄ• rÄ4rÅ­ÌÄ­ r3Ä4rúe r3Ä4rúi rÄÌ4cer rÄÌ4cÄ•r r3ÄÌcr 4rÄÌct rÄÌi2 rÄÌ3ic rÄÌÄ­2 rÄÌ3Ä­c rÄÌn4s5Ä« rÄÌr2 r5ÄÌ4rui r5ÄÌ4ruÄ« rÄÌ4rÅ­Ä« rÄÌ4rÅ­Ä­ r4ÄÌt 2r1ăb răb2ă răb2Ä“ răb2Ä• răb2Ä« răbÄ«3u răbÄ«3v răb2Ä­ răbÄ­3c 2răc r1ăd răd2Ä“ răd2Ä• răd2Ä« rădÅ5rÅ ră3d2Å 2răf 2răg ră3g2n ră4gÅr ră4grÄ“ ră4grÄ• ră4grÅ ră4grÅ 2răh ră1Ä«2 răī4q răīÌ4 ră3Ä­Ä“ ră3Ä­Ä« 2r1ăl 2rămÄ 2r3ă4mă 2răm3b2 rămbÄ«5n rămbÄ«5u rămbÄ«5v rămbÄ«Ì5n rămbÄ«Ì5u rămbÄ«Ì5v răm5bÅ­ 2rămÄ« 4rămna 4r3ămnÄ 4r3ămnă 4rămná 4rămnæ 4rămnÇ£ 4rămnǽ 4r3ămnÄ« 2rămo 2rămó 2rămÅ“ 2rămp 2răng 2rănh ră1Å 2răpÄ• 2răpp r2ă3q 2r1ă2r răr3c r4ăsÄ­ ră4sn ră4sp ră4sq răs5trÄ« ră4su ră4sv 2rătt r2ău r2ăv 2răÌb răÌb4Ä­ răÌbÄ­5c 2răÌf răÌ3gn răÌm3b4 4răÌmna 4r5ăÌmnÄ 4r5ăÌmnă 4răÌmnæ 4răÌmnÇ£ 4r5ăÌmnÄ« 4răÌpÄ• r3ăÌrd r3ăÌrm 4r5ăÌs4tÄ 4r5ăÌs4tă 4r5ăÌstÄ“ 4răÌstÄ• 4răÌs4tÄ­ 4răÌstÅ 4răÌtt 1r2á ráb2i rábi3c 2rábl rá4cer 2r3á2cr 2ráct 4ráequa 4ráequÄ 4ráequă r5áequen 4ráequÄ“ 4ráequo 4ráequÅ 4ráequÅ 2ráes 2r3áf rá3g2n r4ágr rá3ian rá3iÄ rá3iÇ£ rá3i2c rá3ien rá3iÄ“ rá2iu rá3li 2ráll rám3b2 4r3ámna 4r3ámnÄ 4rámnæ 4rámnÇ£ 4r3ámni 4r3ámnÄ« 2rámp ráns5is 2rápe 2r3árd 4rá4rid 2r3árm 4r3á4r4ui 2r3ásp 4r3ás4ta 4r3ás4tÄ 4ráste rás4tem rás4tes rás4tet 4r3ástÄ“ rá5s4tic 4rástit 4rásto 4rástÅ 2rátt 2ráud rá2xu ræa2 ræă2 ræs2 ræ5sci ræ5stÅ r2æu ræ3ue ræ3uÄ• r2æ3v rÇ£a2 rǣă2 rÇ£s2 rÇ£5stÅ r2Ç£u rÇ£3ue rÇ£3uÄ• r2Ç£3v r2Ç£Ì 1rǽ 4rǽqua 4rǽquÄ 4rǽquă rǽ4quen 4rǽquÄ“ 4rǽquo 4rǽquÅ 4rǽquÅ 2rǽs2 r2ǽu r2ǽv 2rb2 rba3q rba3r rbæ3 rbe1 r3bi rbi3c rbi3r rbi5ti rbÄ«3r rbÄ«3u rbÄ«3v rbÄ«Ì3m rbÄ«Ì3r rbÄ­3c rbÄ­5tÄ­ r3bí rbí3m rbí3r rbí3to rbí5tur rbo3ri rbs3 r3bu r3bÅ­ 2rc2 r4chan r2chă rci6sta rcum3 rcumi4 rcumÄ«4 rcumí4 rcÅ­m3 rcÅ­mÄ«4 rcú2m3 2rd2 rde4sc rdÄ“4sc r3di rdi4g3 r3do rd4or r3du rd4ue r3dÅ­ rd4Å­Ä• re3a4tr re3Ä4tr reÄÌ4tr re3á4tr rec4e re5cen rec4é re5cén 2red re2da2 red7aman re2dÄ re4d3ea re4d3eÄ re4d3eá re4d3eo re4d3eÅ re4d3eó re4deú re2dÄ“ re4d3ii re4d3iÄ« red5iít re4d3i4r re4diss re4dist red5i4tÄ red5iti redi4u red5iuer red5iué red5iui. red5iuim red5iuin red5iuiq red5iuis red5iuit red5iuín red5iuíq red5iuís red5iuít re4di4v red5iver red5ivé red5ivi. red5ivim red5ivin red5iviq red5ivis red5ivit red5ivín red5ivíq red5ivís red5ivít re4dÄ«m re4d3Ä«4r re4d3Ä«s re4dÄ«t red5Ä«4te red5Ä«4tÅ red5Ä«4tu red5Ä«4tú re4d3Ä«4u re4d3Ä«4v re4dÄ«Ìm re4d5Ä«Ì4r re4dÄ«Ìs red5Ä«Ìss red5Ä«Ìst re4dÄ«Ìt red5Ä«Ì6te red5Ä«Ì6tÅ red5Ä«Ì6tu red5Ä«Ì6ui red5Ä«Ì6uÄ« red5Ä«Ì6vi red5Ä«Ì6vÄ« re4d3íe re4d3íi re4d3í4r re4díss re4díst red5í4to redí4tu red5í4ui red5í4vi re4dúl re2er ree3ri ree3rí re2es 3reÄ“ r1ef 2r1eg reg2l re4gn re3go re3gÅ re2ia re2iÄ re2iá re3ic re4ien re2ii re2iÄ« re2ií re2io re2iÅ re2ió re2iu re2iú re2Ä« 2r1el re2le re2lo 2remÄ 2reme 2remÄ“ 2remé re4mic 4remim re4mine re4miné 4remis 2remÄ« 4remím re4míss re4míst 4remít 4remo. 4remoq 4re4mor 4remou 4remov 4remÅ. 4remÅq 4remÅu 4remÅv 4remóq 4remór 4remóu 4remóv 2remp 2remt 4remún re5nar re5nas re5nau re5nav re1o re1Å repe3r r2ere r2eri re3rin re3riu re3riv 3rerÄ« r2erí re4rn re4rq 2r3err re4rv re4sa re2sá re4so re2só re2sq 2ress res2t 4rest. 4reste re4ste. re6stem. re6stemn re6stemq re6stemue re6stemv re6s5tene re4steq re4stes re4steu re4stev re4stÄ“s re6stÄ“Ìs re6stémn re6stémq re6stémue re6stémv re4stés 4resti re4s5ti. re6s5tine re4s5tiq re4stis resti5t4 re4s5tiv re4s5tÄ«. re6s5tÄ«ne re4s5tÄ«q re4s5tÄ«s re4s5tÄ«u re4s5tÄ«v re6s5tÄ«Ìne re6s5tÄ«Ìq re6s5tÄ«Ìs re6s5tÄ«Ìu re6s5tÄ«Ìv 4restí re6s5tíne re4s5tíq re4stís restí5t4 re4s5tíu re4s5tív 4restn 4r3esto 4r3es3tÅ 4r3estó 4restq 4r3estu 4restv re4su. r4esue re4sum re4sun re4suq re4suu re4suv re4súm re4sún re4súq re4súu re4súv rete5re 2reun re4uol reu5sum reu5sus 2reún re3únc re4vol 2r1ex r2exé rexi4t re4xiu re4xiv re2x3Ä«4 rexÄ«Ì4 rexí4t rexí4ui rexí4vi re2xu 1rÄ“ 2rÄ“bu 2rÄ“bÅ­ 2rÄ“g rÄ“2gr rÄ“2iÄ rÄ“2iu rÄ“2iú 2r1Ä“2l r2Ä“3la r2Ä“3lă 2rÄ“2me rÄ“3men 4rÄ“mÄ“r 2rÄ“2mÄ• rÄ“3mÄ•n 4r3Ä“4mér 4rÄ“4mic 4rÄ“4mim rÄ“4mine rÄ“4minÄ“ rÄ“4miné 4rÄ“4mis 4rÄ“mit. 4rÄ“mitn 4rÄ“mitq 4rÄ“mitu 4rÄ“mitv 4rÄ“4mÄ­c 4rÄ“4mÄ­m r5Ä“4mÄ­nÄ“ rÄ“4mÄ­nÄ• 4rÄ“4mÄ­s 4rÄ“mÄ­t. 4rÄ“mÄ­tn 4rÄ“mÄ­tq 4rÄ“mÄ­tu 4rÄ“mÄ­tv rÄ“4mÄ­Ìn 4rÄ“4mÄ­Ìt 4rÄ“4mín 4rÄ“4mít 2rÄ“2mo 2rÄ“2mÅ 2rÄ“2mó 2rÄ“mp 2rÄ“mt 2rÄ“na 2rÄ“2nă rÄ“3ne rÄ“pe3r rÄ“pÄ•3r r2Ä“ri 2rÄ“ro 2rÄ“rÅ 2r3Ä“4sa 2rÄ“2sÄ 2rÄ“2să 2rÄ“2sá 2rÄ“sæ 2rÄ“sÇ£ 2rÄ“sǽ r2Ä“sc 2rÄ“2se 2r3Ä“2sÄ• 2rÄ“sÅ 2rÄ“ss 2rÄ“st rÄ“s3tÄ­ r2Ä“2su 2rÄ“sÅ« 2rÄ“2sÅ­ 2rÄ“sú 2rÄ“u rÄ“2uo rÄ“2uÅ 2rÄ“v rÄ“2vo rÄ“2vÅ rÄ“Ì3b rÄ“Ì3ic rÄ“Ì3Ä­c 4rÄ“Ì4le 4r3Ä“Ì4lÄ• r3Ä“ÌlÅ 4r5Ä“Ì4mer 4r5Ä“Ì4mÄ•r 4rÄ“Ì4mim rÄ“Ì6mine rÄ“Ì6minÄ“ 6rÄ“Ìmit. 4rÄ“Ì4mÄ­m r5Ä“Ì6mÄ­nÄ“ r5Ä“Ì6mÄ­nÄ• 6rÄ“ÌmÄ­t. 4rÄ“Ì4mo 4r3Ä“Ì4mÅ 4rÄ“Ìmp 4rÄ“Ìmt rÄ“Ì4nat rÄ“Ì4năt 4r3Ä“Ìro 4r3Ä“ÌrÅ r4Ä“Ìsc rÄ“Ì4se r3Ä“Ì4sÄ• 4rÄ“Ìss 4rÄ“Ìst r4Ä“Ìsu rÄ“Ì4sÅ­ 4rÄ“Ì4uo 4r3Ä“Ì4uÅ 4rÄ“Ì4vo 4r3Ä“Ì4vÅ r4Ä•Än r4Ä•Äq rÄ•3Ä4tr r4Ä•Äu r4Ä•Äv rÄ•ÄÌ4tr rÄ•2ă r4ĕă. r4ĕăq r4ĕău r4ĕăv 2rÄ•d rÄ•2dÄ rÄ•2dá rÄ•2dÄ“ rÄ•4d3Ä•Ä rÄ•4d3ĕă rÄ•4d3Ä•Å rÄ•4dÄ«m rÄ•4d3Ä«4r rÄ•4d3Ä«s rÄ•4dÄ«t rÄ•d5Ä«4tÄ• rÄ•d5Ä«4tÅ rÄ•d5Ä«4tÅ­ rÄ•4d3Ä«4u rÄ•4d3Ä«4v rÄ•4dÄ«Ìm rÄ•4d5Ä«Ì4r rÄ•4dÄ«Ìs rÄ•d5Ä«Ìss rÄ•d5Ä«Ìst rÄ•4dÄ«Ìt rÄ•d5Ä«Ì6tÄ• rÄ•d5Ä«Ì6tÅ rÄ•d5Ä«Ì6tÅ­ rÄ•d5Ä«Ì6uÄ« rÄ•d5Ä«Ì6uÄ­ rÄ•d5Ä«Ì6vÄ« rÄ•d5Ä«Ì6vÄ­ rÄ•4d3Ä­4c rÄ•d5Ä­Ä•r rÄ•4d3Ä­Ä« rÄ•4d3Ä­Ä­ rÄ•d5Ä­tÄ rÄ•d5Ä­tă rÄ•4d5Ä­ÌÄ• rÄ•4d5Ä­ÌÄ­ rÄ•4dÄ­Ìt 3rÄ•Ä“ r1Ä•f 2r1Ä•g2 rÄ•3gÅ rÄ•2Ä« rÄ•2Ä­Ä• 2rÄ•mÄ 2rÄ•mÄ“ 2rÄ•mÄ• 2rÄ•mÄ« 2rÄ•mÄ­ 4r3Ä•mnÄ“ 4r3Ä•mnÄ« 4r3Ä•mnÄ­ 2rÄ•mÅ 2rÄ•mÅ­ rÄ•5nÄ•. 2r3Ä•nn rÄ•1Å r2Ä•q rÄ•5quÄ• r2Ä•r rÄ•3r4Ä• 2r3Ä•rr 2r3Ä•rÅ­ rÄ•1s rÄ•s3cÄ­ rÄ•s2p rÄ•s2t r2Ä•t rÄ•5uÄ•. 2rÄ•Å­ rÄ•5vÄ•. 2r1Ä•2x3 rÄ•4xă rÄ•xÄ«4 rÄ•xÄ«Ì4 2rÄ•Ìd rÄ•Ì4d5Ä•Ä rÄ•Ì4d5ĕă rÄ•Ì4d5Ä•Å rÄ•Ì4d3Ä« rÄ•Ì4d5Ä­Ä« rÄ•Ì4d5Ä­Ä­ 2rÄ•Ìf 4rÄ•ÌmÄ• 4rÄ•ÌmÄ­ 4r5Ä•ÌmnÄ“ 4r5Ä•ÌmnÄ« 4r5Ä•ÌmnÄ­ 4r5Ä•ÌnnÄ 4r5Ä•Ìnnă 4r5Ä•ÌnnÄ“ 4r5Ä•ÌnnÄ• 4r5Ä•ÌnnÄ« 4r5Ä•ÌnnÅ 2r3Ä•Ì2q 4r3Ä•Ìrr rÄ•Ì3sp rÄ•Ì5s4tÄ rÄ•Ì5s4tă rÄ•Ì5s6tÄ•nt rÄ•Ì5s6tÄ•t rÄ•Ì5strÅ­ 2r3Ä•Ì2x3 1ré 2réd ré4d3ea ré4d3eÄ ré4d3eo ré4d3eÅ ré4d3iÄ« ré2d3Ä« ré2e 2r1éf 2ré2le 2ré2lo 4rémer 4rémic 4rémim 4r5é4mine 4rémit. 4rémiti 4rémito 4rémitÅ 4rémitu 4r3émnÄ“ 4r3émni 4r3émnÄ« 2rémo ré4mor 2rémp 2rémt ré4nat 4r3énna 4r3énnÄ 4rénne 4r3énnÄ“ 4r3énnÄ« 4r3énno 4r3énnÅ 4réqui r2ér 2réro 2r3érr ré2ru 2ré4sa 2résæ 4ré4se. 2réso ré3sp 2réss ré3s4ta ré3s4tÄ 4réste ré5s6tent ré5s4tet 4résti ré5stit 4réstn 4r3ésto 4r3éstÅ 4réstq rés4tru 4r3éstu 4réstv r2é2su 4résu. 4résum 4résus 2r3é2uo 2r3é2vo ré4xeu ré4xiÄ“ ré4x3is ré2xÄ« ré2xu 2rf 2rg2 r3ge r3gÄ• r1h r2hy r2hý ri2a r2ia. r2iae r2iam r2ian r2iaq r2iar r2ias r2iat ri3atr r2iau r2iav r2iaÍž r2iaÍ¡ r2iÄ 2riă r2iáe r2iám r2ián r2iár r2iás r2iát ri3átr r2iáu r2iáv r2iæ r2iÇ£ r2iǽ 2ribe 2ribÄ“ ri4bÄ“. 3riboe 3riboÄ“ 3riboé ri5bus ri5bús ri4cie ri4ciÄ“ ri4cié ri4cim ri4cio ri4ciÅ ri4ció 4ricit r3i4cím r3i4cít 3ricl r2icu r2icú 2rido ri4don 2ridÅ ri4dÅn 2ridó r2ieb 3riei 3rieí r2iem r2ien ri3enn r2ies r2iet r2iÄ“b 3riÄ“Ä« r2iÄ“m r4iÄ“ri r4iÄ“rí r2iÄ“s r2iÄ“t r4iÄ“Ìb r4iÄ“Ìm r4iÄ“Ìne r4iÄ“Ìq r4iÄ“Ìri r4iÄ“Ìs r4iÄ“Ìt r4iÄ“Ìu r4iÄ“Ìv 2riÄ• r2iéb 3riéi r2iém r2ién ri3énn r4iéris r2iés r2iét ri3ga ri3gæ ri3gÇ£ ri4g3n r4iis. r4iisn r4iisq r4iisu r4iisv r2iÄ«s r4iÄ«Ìs r4iísn r4iísq r4iísu r4iísv 2rij r1il 3rile 3rilé 5rille. 5rillen 5rilleq 5rilli. 5rilliq 5rillis 5rilliu 5rilliv 3rillÄ« 5rillíq 5rillís 5rillíu 5rillív 3rillo 3rillÅ 3rilló 5rillum 5rillus. 5rillusn 5rillusq 5rillusu 5rillusv 5rillúm 5rillúsn 5rillúsq 5rillúsu 5rillúsv 3rim. 3rimed 3rimel 5rimetr 3rimÄ“d 3rimÄ“l 5rimÄ“Ìd 5rimÄ“Ìl 3ri5méd 3ri5mél 5rimétr ri3min 3rimn 3rimq 4rimun ri3mur r4i3mus r2imú ri3múr ri3mús 3rimv ri2ni rin3ic ri2n3Ä«2 rinÄ«Ì4 ri4n3í4c r3inq rinte5r6 rinteri5 rinterÄ«5n rinterÄ«5q rinterÄ«5u rinterÄ«5v rinterÄ«Ì5 rinterí5u rinterí5v 3rinth ri2nu ri4nún r2i2o r2iÅ r2ió r2ip ri3pi r2iq ri2ra ri2rá ri3r4e rir6emi ri3r4Ä“ ri5rÄ“5m 3rirrh 1r2is ri3sa ri4sat ri3sá ri4sát ri4s3p ris5pe ris5pé ris5ti ri6stri ri4sui ri4suí r2ita r4itÄt r2itá r4i5ter r2ité ri5tér 3rith r2iti 3ritia 3ritiá 3ritiæ 3ritiǽ 3ritii 3ritií 5ritior r5itiÅ. r5itiÅn r5itiÅq r5itiÅu r5itiÅv 5ritiór 5ritiss 5ritius 3ritiú r2ití 3ritía 5ritíss ri5tÅt 3ritt r4itue r4iue. 2riug r4ium. r4iumn r4iumq r4iumu r4iumv r4iunt r2ius 2riÅ­ r4iúnt r2iús r4ive. rÄ«3Ät 2rÄ«b rÄ«4c5Ä•Ìn rÄ«4cén 2rÄ«g r2Ä«m rÄ«mi3 r2Ä«ne r4Ä«nÄ• r2Ä«q 2r3Ä«2rÄ r2Ä«s. r2Ä«sn r2Ä«sq r2Ä«su r2Ä«sv r2Ä«t r2Ä«u r4Ä«ue. r4Ä«uÄ•. r4Ä«us r2Ä«v r4Ä«ve. r4Ä«vÄ•. 2rÄ«Ìb rÄ«Ì3d r2Ä«Ìm r4Ä«Ìne r4Ä«ÌnÄ• r2Ä«Ìq r2Ä«Ìt r4Ä«ÌuÄ•. r4Ä«ÌvÄ•. 1rÄ­ rÄ­4bÄ“. r2Ä­c rÄ­3cÄ“ rÄ­3cÄ• rÄ­3cÄ« 2rÄ­cÄ­ rÄ­4cĭă rÄ­4cÄ­Ä“ rÄ­4cÄ­Ä• rÄ­4cÄ­m rÄ­4cÄ­Å rÄ­4cÄ­Å rÄ­4cÄ­Å­ rÄ­3cÅ­ 2rÄ­dă 2rÄ­dÅ rÄ­4dÅn r2Ä­Ä“ r4Ä­Ä“. r4Ä­Ä“q r4Ä­Ä“u r4Ä­Ä“v r2Ä­Ä• r4Ä­Ä•. r4Ä­Ä•n rÄ­3Ä•nn r4Ä­Ä•q r4Ä­Ä•u r4Ä­Ä•v rÄ­5Ä•Ìnn rÄ­3ga rÄ­3gæ rÄ­3gÇ£ 2rÄ­i 2r1Ä­Ä­ 2rÄ­j 2r1Ä­l 3rÄ­le 3rÄ­lé 3rÄ­llÄ• 3rÄ­llÄ« 3rÄ­llÅ 3rÄ­llÅ­ 4rÄ­măr 4rÄ­măt 2r3Ä­mb 4rÄ­mÄ“b 4rÄ­mÄ“m 4rÄ­mÄ“r 4rÄ­mÄ“s 4rÄ­mÄ“t 4rÄ­mÄ“Ìb 4rÄ­mÄ“Ìm 4rÄ­mÄ“Ìr 4rÄ­mÄ“Ìs 4rÄ­mÄ“Ìt 4rÄ­mÄ•t 5rÄ­mÄ•tr 5rÄ­mÄ•Ìtr 4rÄ­mÄ­m 4rÄ­mÄ­s 4rÄ­mÄ­t 4rÄ­mÄ­Ì 2rÄ­mm 2rÄ­mÅ 2rÄ­mp 4rÄ­mÅ­n 4rÄ­mÅ­Ìn rÄ­2n1 rÄ­3nÄ 2r3Ä­nc 2r3Ä­nd 2rÄ­ni 2r3Ä­nÄ«4 rÄ­nÄ«Ì4 2r3Ä­nÄ­ rÄ­nÄ­Ì4 2rÄ­nj 2r3Ä­nq rÄ­ntÄ•5r rÄ­ntÄ•rÄ•5r rÄ­ntÄ•rÄ«5n rÄ­ntÄ•rÄ«5q rÄ­ntÄ•rÄ«5u rÄ­ntÄ•rÄ«5v rÄ­ntÄ•rÄ«Ì5 5rÄ­nth 2rÄ­nu 2rÄ­nÅ­ 2rÄ­nv rÄ­2Å 2rÄ­pÄ“ 2r1Ä­r rÄ­3r4Ä“ rÄ­5rÄ“5m 3rÄ­rrh rÄ­3s4ă rÄ­4sp rÄ­s5pÄ• rÄ­s5tÄ­ rÄ­5strÅ r2Ä­t 4r5Ä­4tÄ­Å. 4r5Ä­4tÄ­Ån 4r5Ä­4tÄ­Åq 4r5Ä­4tÄ­Åu 4r5Ä­4tÄ­Åv 2rÄ­u 2rÄ­v r2Ä­Ìc rÄ­Ì3cÄ• 4r5Ä­Ì4cÄ•r 4rÄ­ÌcÄ­ rÄ­Ì4cÄ­Ä rÄ­Ì4cĭă rÄ­Ì4cÄ­Ä“ rÄ­Ì4cÄ­Ä• rÄ­Ì4cÄ­m rÄ­Ì4cÄ­Å rÄ­Ì4cÄ­Å rÄ­Ì4cÄ­Å­ 4rÄ­ÌmÄ•r 4rÄ­ÌmÄ­m 4rÄ­ÌmÄ­t rÄ­Ì2n r3Ä­Ìnc 4r3Ä­Ìnd3 r3Ä­Ìn3Ä­4 2r3Ä­Ìr r4Ä­Ìs 4r5Ä­Ì4tÄ­Å 1rí 2ríb 4r3í4cer 2ríci rí5ci. rí4ciÄ rí4ciÄ“ rí4cim rí4cio rí4ciÅ rí5cis r2ícu rí3d 2rída rí3ga rí4g3n 2ríj 4rílli 4rímer 4rímim rí3min 4rímit 2rímm r2ímu 2rínc 2rín2d3 4rí4n3i4c 2rínj 2ríns 4rínte r2íq 2rírr rís3t rí4sui r2ít 4rítio. 4r3í4tiÅ rí2xu 2rj 2rl2 r3lu 2r1m2 rmÄ­2ă rmí5tur 2r1n2 r3ne rne3g r3nÄ• rnÄ•3g rn4i3m rn4Ä­3m rní5ci 1ro. ro3áq rob2a rob2e rob2Ä“ rob2é ro3b2i rob2Ä« rob2í ro3b2o3 rob2ó rob3r r1oc ro2da ro4deo ro4d5e4ra ro4d5e4rá rod5e6rim rod5e6rit rod5e6rít ro4d5e4ro ro4d5e4ró ro4d5e4ru ro4d5e4rú rod5est ro6d5é6rim ro6d5é6rit rod5ést ro4d3ie ro4d3ié ro4d3ii ro4d3ií ro4dio ro4diÅ ro4dió ro4d3i4r rod5iss rod5ist ro4d3i4u ro4d3i4v ro4d3íe ro4d3íi ro4d5í4mu ro4d3í4r rod5íss rod5íst rod5í6te. ro6d5í6tis ro4d5í4to rodí4tu rod5ítur rod5í4ui rod5í4vi ro4em ro4en ro3eo ro3eÅ ro3eó ro4eq ro4es ro4ev ro2Ä“ ro2é ro4ia. ro4iae ro4iam ro6iane. ro4iaq ro4iar ro4ias ro4iau ro4iav ro4iaÍ¡ ro4iáe ro4iám ro6iáne. ro4iár ro4iás ro4iáu ro4iáv ro2iæ ro2iǽ ro4iis. ro4iisn ro4iisq ro4iisu ro4iisv ro3iÄ« ro4iísn ro4iísq ro4iísu ro4iísv ro3it ro4ium ro4ius ro4iús roÄ«4n roÄ«2q roÄ«Ì4n roÄ«Ì4q roí2t roí2u roí2v 2r1ol ro2le ro2lÄ“ ro2lé ro4li. ro4lin ro4liq ro4lis ro4liu ro4liú ro4liv ro2lí ro2l4u ro2lú r2on ro3ni rons3 ro2pe3 ro2pé 1roq ro2ra ro2rá r3ord ro4rer ro4ret ro4rén ro4rér ro4rét ro4ro. ro4ron ro4roq ro4ror ro4rou ro4rov ro4rón ro4róq ro4rór ro4róu ro4róv r2os ro3s2c ro2s3m ro3só ro3s2t ro4s3ui ro4s3uí 1rou 1rov 1roÍž 1roÍ¡ rÅ4d5e4ra rÅ4d5e4rÄ rÅ4d5e4rá rÅd5e6rim rÅd5e6rit rÅd5e6rít rÅ4d5e4rÅ rÅ4d5Ä•4rÄ rÅ4d5Ä•4ră rÅd5Ä•6rÄ­m rÅd5Ä•6rÄ­t rÅd5Ä•rÄ­Ìt rÅ4d5Ä•4rÅ rÅ6d5Ä•Ì6rÄ­ rÅ4d5é4ri rÅ4d3ie rÅ4d3iÄ“ rÅ4d3ié rÅ4d3ii rÅ4d3iÄ« rÅ4d3ií rÅ4d3Ä«4m rÅ4d3Ä«4r rÅ4d3Ä«s rÅ4d5Ä«4te rÅ4d5Ä«4tÄ• rÅ6d5Ä«6tis rÅ6d5Ä«6tÄ­s rÅ6d5Ä«6tÄ­Ìs rÅ6d5Ä«6tís rÅ4d5Ä«4tÅ rÅ4d5Ä«4tu rÅ4d5Ä«4tÅ­ rÅ4d5Ä«4tú rÅ4d3Ä«4u rÅ4d3Ä«4v rÅ4d5Ä«Ì4m rÅ4d5Ä«Ì4r rÅd5Ä«Ìss rÅd5Ä«Ìst rÅ6d5Ä«Ì6te rÅ6d5Ä«Ì6tÄ• rÅ6d5Ä«Ì6tis rÅ6d5Ä«Ì6tÄ­s rÅ6d5Ä«Ì6tÅ rÅ6d5Ä«Ì6tu rÅ6d5Ä«Ì6tÅ­ rÅd5Ä«Ì6ui rÅd5Ä«Ì6uÄ« rÅd5Ä«Ì6uÄ­ rÅd5Ä«Ì6vi rÅd5Ä«Ì6vÄ« rÅd5Ä«Ì6vÄ­ rÅ4d3Ä­Ä“ rÅ4d3Ä­Ä• rÅ4d3Ä­Ä« rÅ4d3Ä­Ä­ rÅ4d5Ä­ÌÄ• rÅ4d5Ä­ÌÄ­ rÅ4d3íe rÅ4d3íi rÅ4ia. rÅ4iae. rÅ6iaene rÅ6iaeque rÅ6iaeue rÅ6iaeve rÅ4iam rÅ4ian rÅ4iaq rÅ4iau rÅ4iav rÅ6iaÍže. rÅ6iaÍžene rÅ6iaÍžeque rÅ6iaÍžeue rÅ6iaÍževe rÅ6iaÍžÌene rÅ6iaÍžÌeque rÅ6iaÍžÌeue rÅ6iaÍžÌeve rÅ6iaÍ¡e. rÅ6iaÍ¡ene rÅ6iaÍ¡eque rÅ6iaÍ¡eue rÅ6iaÍ¡eve rÅ6iaÍ¡Ìene rÅ6iaÍ¡Ìeque rÅ6iaÍ¡Ìeue rÅ6iaÍ¡Ìeve rÅ4iÄ. rÅ6iÄne. rÅ6iÄque rÅ4iÄru rÅ4iÄrú rÅ4iÄs. rÅ6iÄsne rÅ6iÄsque rÅ6iÄsue rÅ6iÄsve rÅ4iÄue rÅ4iÄve rÅ6iÄÌne. rÅ6iÄÌque rÅ6iÄÌru rÅ6iÄÌsne rÅ6iÄÌsque rÅ6iÄÌsue rÅ6iÄÌsve rÅ6iÄÌue rÅ6iÄÌve rÅ6iáene rÅ6iáeque rÅ6iáeue rÅ6iáeve rÅ4iám rÅ4iæ. rÅ4iæne rÅ6iæque rÅ4iæue rÅ4iæve rÅ4iÇ£. rÅ4iÇ£ne rÅ6iÇ£que rÅ4iÇ£ue rÅ4iÇ£ve rÅ6iÇ£Ìne rÅ6iÇ£Ìque rÅ6iÇ£Ìue rÅ6iÇ£Ìve rÅ4iǽne rÅ6iǽque rÅ4iǽue rÅ4iǽve rÅ4iÄ«. rÅ4iÄ«n rÅ4iÄ«q rÅ4iÄ«s. rÅ6iÄ«sne rÅ6iÄ«sque rÅ6iÄ«sue rÅ6iÄ«sve rÅ4iÄ«u rÅ4iÄ«v rÅ4iÄ«Ìn rÅ4iÄ«Ìq rÅ6iÄ«Ìsne rÅ6iÄ«Ìsque rÅ6iÄ«Ìsue rÅ6iÄ«Ìsve rÅ4iÄ«Ìu rÅ4iÄ«Ìv rÅ2iÅ rÅ4ium rÅ4ius rÅ4iús rÅ2le rÅ2lÄ“ rÅ2lÄ• rÅ2lé rÅ4lis rÅ4liu rÅ4liú rÅ2lÄ« rÅ4lÄ­s rÅ4lÄ­Å­ rÅ4lÄ­Ì rÅ2lí r2Ån rÅ2ra r3Å2rÄ r3Å2ră rÅ2rá 2rÅrd rÅ4rer rÅ4ret rÅ4rÄ“m rÅ4rÄ“r rÅ4rÄ“t rÅ4rÄ•r rÅ4rÄ•t rÅ4rén rÅ4rér rÅ4rét rÅ2ro rÅ4rÅ. rÅ4rÅn rÅ4rÅq rÅ4rÅu rÅ4rÅv r3Å2rÅ rÅ2ró 2rÅs2c 2rÅt rÅÌ6d5e6ra rÅÌ6d5e6rÄ rÅÌd5e6rit rÅÌ6d5e6rÅ rÅÌ6d5Ä•6rÄ rÅÌ6d5Ä•6ră rÅÌd5Ä•6rÄ­t rÅÌ6d5Ä•6rÅ rÅÌ4d5iÄ“ rÅÌ4d5ii rÅÌ4d5iÄ« rÅÌ4d5Ä­Ä“ rÅÌ4d5Ä­Ä« rÅÌ4d5Ä­Ä­ rÅÌ2l rÅÌ4lÄ• r3ÅÌ4ra r3ÅÌ4rÄ r3ÅÌ4ră 4rÅÌrd rÅÌ4rer rÅÌ4ret rÅÌ4rÄ•r rÅÌ4rÄ•t r3ÅÌ4ro r3ÅÌ4rÅ r3ÅÌ4rÅ 4rÅÌsc rÅÌ5stÄ­ 2rÅÌt rÅb2Ä“ rÅb2Ä• rÅb2Ä« rÅb2Å rÅ2bÅ­ r1Åc r1Åd rÅ2dÄ­ rÅ2Ä“ rÅÄ«2n rÅÄ«4q rÅÄ«Ì4n rÅÄ«Ì4q rÅ3Ä­2 rÅÄ­Ì4 2r1Ål rÅ2lÄ“ rÅ2lÄ• rÅ2lÅ­ rÅm2Ä• r2Ån rÅ2pÅ­ 1r2År r2Ås r2ÅÌ rÅÌ3Ä­ rÅÌ4lÄ• rÅÌ4lÅ­ rÅÌm2 4rÅÌt 1ró rób2e 2rócc ró4d5e4ra ród5e6rit ró4d5e4ro ró4d3ie ró4d3ii ró3eo ró3eÅ ró3iÄ« ró3in ró4ium ró4ius 2ról2 ró2le ró4li. ró4lis ró4liu ró3m róm4e ró1r 2ró2ra 2r3órd ró4rer ró4ret 4rórna 4rórno 2ró2ro 2ró3sc ró3sta ró3ste ró3sti ró3sto rós3ue ró4sui 2rót 1rÅ“ rÅ“Ì„3d 2rp rpe2i rpe3r rper4e rper4Ä“ rpÄ•3ră rpÄ•3rÄ• rpo1 2rq r3qu 2r1r2 rra3d4 r3ră r3re rre2o rre3r rres3t rrex2 rre5xi r3rÄ“ r3rÄ• rrÄ•4s3t rr4Ä•Ì rrÄ•Ì3q r3ru 2r1s2 r3se rsed4 rse5di rse2i rsÄ“d4 rsÄ“5di rsÄ“5dÄ­ rsÄ“2i r3sÄ• r3si rs4ig rsÄ­3gÄ• r2s3q r3st r2s3ue r2s3uÄ• 2rt r3ta rta3g r3tÄ rte3r rte5re rtÄ•3rÄ• r3ti r3tÄ« rtran4 rtrÄn4 rtrÄns5 rua6ste ruÄ6ste ruÄ6stÄ• 2r1uă 2ruæ 2r1uÇ£ 2ruǽ ru3b2 rubÄ«3q rubÄ«Ì3 2ru3d r1ue 4rue. r4uera r4uerÄ r4uerá r4ueri r4uerÄ« r4uerí r4uero r4uerÅ r4ueró r4ueru r4uerú ruete5 r4uÄ“ru r4uÄ“rú 2r3uÄ• ru4gn r1ui rui4g3n r2uim r4uiss r4uist r2uit r1uÄ« 2ruÄ«s r4uÄ«v 2r1uÄ­ ruí4g3n r2uíq r4uíss r4uíst r2uít 1r2ul 1r2um rum2e ru3m2Ä« ruol6uere. ruol6uerene ruol6uereq ruol6uereu ruol6uÄ“re ruol6uÄ“ru ruol6uÄ“rú ruol6uÄ“Ìre ruol6uÄ“Ìru ruol6uit. ruol6uitn ruol6uitq ruol6uitue 2ruÅ ruól6ui. ruól6uit. ruól4uÄ« rupe3r ruperi5mus ruperi5mú ruperi5ti ruperi5tí r1u2r ru4rs 1rus ru2sp 2russ 2rust 4rusur 2rusú ru2tr ru3tu r1uu 2ruÅ­ ru2xu rÅ«3d r1Å«n r1Å«r rÅ«2ra rÅ«2rÄ rÅ«2ră rÅ«2rá rÅ«2rÄ“ rÅ«2rÄ« rÅ«2ro rÅ«2rÅ rÅ«2rÅ rÅ«2ró rÅ«2ru rÅ«2rÅ­ rÅ«2rú rÅ«4sp rÅ«2ti rÅ«2tÄ­ rÅ«2tí rÅ«3tu rÅ«2xu r4Å«Ìg rÅ«Ì4ra rÅ«Ì4rÄ rÅ«Ì4ră rÅ«Ì4re rÅ«Ì4rÄ“ rÅ«Ì4rÄ• rÅ«Ì4rÄ« rÅ«Ì4ro rÅ«Ì4rÅ rÅ«Ì4rÅ rÅ«Ì4ru rÅ«Ì4rÅ­ rÅ­b2 rÅ­3bÄ« rÅ­2bÄ­ 2rÅ­d 1rÅ­l r2Å­m rÅ­3mă rÅ­m2Ä• rÅ­3m2Ä« r3Å­nd r3Å­ng r1Å­r 3rÅ­sÄ« 3rÅ­sÄ­ rÅ­s2p rÅ­4tÄ•r 2rÅ­tr r2Å­Ì rÅ­Ì3b r3Å­Ìng r3Å­Ìr 3rÅ­ÌsÄ­ rÅ­Ì3sp 1rú r2úe rú4gn r2úi r2úl r2úm 2rúnc 2rúng 2rúnx 2r1úr rú2ra rú2re rú2ro r2úsi r2úsq 2rúss 2rúst rú2tr rú2xu 2rv2 rva6ste rvÄ6ste rvÄ6stÄ• r3ve rvete5 r3vÄ• rvi4g3n rví4g3n 2r2x 1sa 2saa sab4a sab3ea sab3eÄ sab3eá sab3eo sab3eÅ sab3eó sab3iÄ« sab3i4n sab3i4q sabi4te sabi4to sabi4tó sabi4u sabi4v sa2bÄ«4 sabÄ«Ì4 sab3í4n sab3í4q sabí4t sab3í4u sab3í4v sab2o s1ac sa2ci 2s1a2d3 sa3do s2ae sa2i sali4g5 salí4g3 s3alp sa2l3u s2am sa3ma 3s2an s2a3q s2ar sa3re s2as sa4tro sa4tró sa4tru sa4trú s4aue s3aus s4aÍže s4aÍžÌ s4aÍ¡e s4aÍ¡Ì 1sÄ sÄ5bun 2s1Äc sÄ2i 2s3ÄÌc sÄÌ4tr 1să 2săă 2s1ăb săb2ă să2bÄ• să2bÄ«4 săbÄ«Ì4 să2b3Ä­ s1ăc să2cÄ­ 2s1ă2d3 să3g s3ălp să3rÄ• săÌb3Ä• săÌb3Ä­ s3ăÌd 1sá sá4b3ea sáb3eÄ sá4b3eo sáb3eÅ sá4bi. 2sá2bÄ« 2s1ác 2s1á2d1 s2áe sá2lu s2ám s2án s2ár s3átr sá4tri sá4tro sá4tru s2áu 1s2æ sæ2a sæ2ă sæ2á sæ2i sæ2Å­ 1sÇ£ sÇ£2a sÇ£2ă sÇ£2Å­ 1s2ǽ 2sb2 s3bi sbÄ«3u sbÄ«3v s3bu s3bÅ­ 2scam 2scas 2scÄ 2scám 2scás 1s2cæ 1s2cÇ£ 2sce. 2sceb 2scem s6ce6naria. s6ce6narian s6ce6nariaq s6ce6nariau s6ce6nariav s6ce6narium s6ce6nariúm s6ce6naría s6ce6nária. s6ce6nárium s6cendamus s6cendamú s6cendant s6cendat s6cendámus s6cendánt s6cendát s6cendeb s6cendem s6cender s6cendes s6cendet s4cendÄ“ s4cendé s6cendim 5s6cendiss 5s6cendist s6cendit s6cendím 5s6cendíss 5s6cendíst s6cendít s6cendun s6cendún s4c5enna s4c5enná 6scens. 6scensn 6scensq 6s7censue 6scensv 2sceq 2scer 2sces 2scet 2sceu 2scev 2scÄ“b 2scÄ“m s6cÄ“6nÄria. s6cÄ“6nÄrian s6cÄ“6nÄriaq s6cÄ“6nÄriau s6cÄ“6nÄriav s6cÄ“6nÄrium s6cÄ“6nÄriúm s6cÄ“6nÄrĭă. s6cÄ“6nÄrĭăn s6cÄ“6nÄrĭăq s6cÄ“6nÄrĭău s6cÄ“6nÄrĭăv s6cÄ“6nÄrÄ­Å­m s6cÄ“6nÄrÄ­Å­Ìm s6cÄ“6nÄrÄ­Ìă s6cÄ“6nÄría s6cÄ“6nÄÌria. s6cÄ“6nÄÌrium s6cÄ“6nÄÌrĭă. s6cÄ“6nÄÌrÄ­Å­m 2scÄ“s 2scÄ“t 2scÄ•. 2scÄ•q 2scÄ•r 2scÄ•t 2s3cÄ•u 2s3cÄ•v 2scéb 2scém s6céndant s6céndar s6céndat s6céndens s6céndent s6cénder s6céndes s6céndet s4céndÄ“ s6céndim s6céndit s6céndor s6céndun 2scér 2scés 2scét 2s3ch 3s4cho 3s4chÅ 3s2cia 3s2ciÄ s2ciá 3s2ciÇ£ 3scid 5s6ciderÄ 5s6ciderÄ« 5s6ciderÅ 5s4cidÄ“ s7cidis. s7cidisn s7cidisq 5scidissÄ“ 5scidistÄ« s7cidisu s7cidisv 5s4cidÄ« 5scidíssÄ“ 5scidístÄ« 3s2cie 3s2ciÄ“ s2cié 3s2cii 3s2ciÄ« s2cií 3scind 3s2cio 3s2ciÅ s2ció s2cir 4scisa 4scisá 4scisæ 4scisǽ 4scise 4scisé 4scisi 4scisí 4sciso 4scisó 4scisu 4scisú s4citæ s4citǽ s2ciu s2ciú s2civ 2scÄ«d s2cÄ«m s2cÄ«r s2cÄ«t s2cÄ«u s2cÄ«v 3s2cÄ­Ä 3s2cĭă 3s2cÄ­Ç£ 3s2cÄ­d 3s2cÄ­Ä“ 3s2cÄ­Ä• 3s2cÄ­Ä« 3s2cÄ­Ä­ 3scÄ­nd 3s2cÄ­Å 3s2cÄ­Å 4s5cÄ­s. 4s5cÄ­sn 4s5cÄ­sq 4s5cÄ­su 4s5cÄ­sv 3s2cÄ­Å­ 3s4cÄ­Ìd 5scÄ­Ìnd s2cía 3scíd 5s6cíderÄ 5s6cíderÄ« 5s6cíderÅ s2cíe s2cíi s4címu 3scínd s2cír 4scísa 4scísæ 4scíse 4scísi 4scíso s4cíta s4cítæ s4cíti s4cíto s4cíui s4cívi 2s3c2o sco3p 2scÅ 2sc2Å scÅ3p 2s3có 2s3cÅ“ 3s4crib 3scrip s5cris 3scrÄ«b 3scrÄ«p s3crÄ«s 5scrÄ«Ìb 5scrÄ«Ìp s5crÄ«Ìs s2crí 3scríb 3scríp s3crís 2scun s2cÅ« 2scún 2sd sde3d sde2s sdÄ“2s sdÄ•3d s3do sd4or 1se se3b 3sec se3d2 sed4i3m se4d3i4t se5dit. se5ditn se5ditq se5d4itu se5ditv sedí4t se4d5íti sed4o sed4u se2e s1eg se2gi se2gí se2gn se2iÄ se2ie se2ié se4in se4iq se4ir se4iv se3íp 3sem semi5as semi5ás se4m5iss se4m5íss se4mul s2en 3sep s2e3q s2e1r ser2a ser2æ3 ser2Ç£ se3rÄ“ ser4i seri5c se3rÄ« se3rÅ ser2u 3ses ses3q 2se2un se2ur s1eú s2ev se2xe se2xé se2xi se3x4ie se3x4iÄ“ 1sÄ“ sÄ“dÄ•4c3 sÄ“di2 sÄ“4d3it sÄ“5dit. sÄ“5ditn sÄ“5ditq sÄ“5ditu sÄ“5ditv sÄ“dÄ­2 sÄ“4d3Ä­t sÄ“5dÄ­t. sÄ“5dÄ­tn sÄ“5dÄ­tq sÄ“5dÄ­tu sÄ“5dÄ­tv sÄ“dÄ­Ì4 sÄ“6d5Ä­ÌtÄ­ sÄ“dí2 sÄ“4d5íti 2s1Ä“2g sÄ“2ie sÄ“2iÄ“ sÄ“4ir s2Ä“m sÄ“mi5Äs sÄ“mi5ÄÌs sÄ“4m5is. sÄ“4m5isn sÄ“4m5isq sÄ“m5iss sÄ“6m5isue sÄ“4m5isv sÄ“mÄ­5Äs sÄ“mÄ­5ÄÌs sÄ“4m5Ä­s. sÄ“4m5Ä­sn sÄ“4m5Ä­sq sÄ“m5Ä­ss sÄ“4m5Ä­su sÄ“4m5Ä­sv sÄ“6m5Ä­Ìsn sÄ“6m5Ä­Ìsq sÄ“m5Ä­Ìss sÄ“6m5Ä­Ìsu sÄ“6m5Ä­Ìsv sÄ“4m5ísn sÄ“4m5ísq sÄ“m5íss sÄ“4m5ísu sÄ“4m5ísv sÄ“2mÅ« sÄ“3ne sÄ“s4cÅ sÄ“s3q sÄ“s3t 2s3Ä“Ì2g sÄ“Ìmi3 sÄ“Ì4m5is sÄ“ÌmÄ­3 sÄ“Ì4m5Ä­s 1sÄ• sÄ•2ă sÄ•3d sÄ•d4Ä­3 sÄ•p4tÄ•Ì sÄ•3r2a sÄ•3ră sÄ•3r2æ sÄ•3r2Ç£ sÄ•3rÄ“ sÄ•3r4Ä• sÄ•3rÄ« sÄ•3rÅ sÄ•3rÅ sÄ•3rÅ« sÄ•3rÅ­ sÄ•2s 2sÄ•Å­ sÄ•2x3Ä• sÄ•x2Ä­ sÄ•Ì3ră sÄ•Ìx4Ä­ 1s2é s1é2g sé4ir 3sém sémi3 sé3q 3sés sé3x4ie séx4iÄ“ sg2 s3ga s3gæ3 s3gÇ£ 1si s2i2a 2si2ba 2si2bá 2si2be 2si2bé si3bi si4bis si4bit si4bís si4bít 2si2bo 2si2bó si4bun si4bún s1ie 3sie. s1iÄ“ 3siÄ“. 2siÄ• 2siéc 2s3i2ga 2s3i2gÄ 2s3i2gá 2s3i2gÄ“ 2s3igé 2s3i2gi 2s3i2gÄ« 2s3i2gí si4g3n 2s3i2go 2s3i2gÅ 2s3i2gó 2s3i2gu 2s3i2gú s3iít 3s2il si5lum si5lus 3sim si3mus s2in sin2Ä sino3p si2o sio2s 2s1ir si2re si2ré si2rí si4s3t sis5ta sis5tÄ sis5ti s1iu 3s2ium 2siun 2s3iur s2ius s2i3uu 2s3iÅ« 2siÅ­ 2s3iún 1sÄ« 2s1Ä«2b s3Ä«2mi s3Ä«2mÄ­ 2s1Ä«r sÄ«2re sÄ«2rÄ“ sÄ«2rÄ• sÄ«2ré sÄ«2rÄ« sÄ«2rí sÄ«4st s3Ä«Ì2b sÄ«Ì4mi sÄ«Ì4mÄ­ sÄ«Ì4mur sÄ«Ì4mÅ­r s3Ä«Ìr sÄ«Ì4re sÄ«Ì4rÄ“ sÄ«Ì4rÄ• sÄ«Ì4rÄ« sÄ«Ì4tur sÄ«Ì4tÅ­r 1sÄ­ 3sÄ­a 3sÄ­Ä 3sĭă 3sĭæ 3sÄ­Ç£ s2Ä­b 3sÄ­Ä“. 3s4Ä­Ä•. s4Ä­Ä•n s4Ä­Ä•q s4Ä­Ä•u s4Ä­Ä•v sÄ­2g 2s3Ä­gÄ 2s3Ä­gă 2s3Ä­gÄ“ 2s3Ä­gÄ« 2s3Ä­gÄ­ 2s3Ä­gÅ 2s3Ä­gÅ 2s3Ä­gÅ­ 3sÄ­Ä« 2s1Ä­Ä­ s2Ä­n sÄ­n2a sÄ­n2Ä sÄ­n2æ sÄ­s3 sÄ­4st sÄ­s5tÄ sÄ­s5tă sÄ­s5tÄ­ sÄ­4Ìg 4s3Ä­Ì4gÄ­ 2s3Ä­ÌÄ­ s2Ä­Ìn sÄ­Ìs3 1sí 2sí2ba 2sí2be sí3bi sí4bis sí4bit 2sí2bo sí4bun 2s3í2gi síg3n s2íl sí4mur sí2nu 2s1ír sí2re sí4s3t 2sj s1m2 2s3me 2s3mé 2s1n2 s3ne s3nÄ• snÅ­Ì3 1s2o so3b2 so4l3ue sol3ué so4l3ui so4l3uÄ« so4l3uí 3so1n so3ni son2u 3so3p sos2p 1sÅ sÅ4lue sÅ2s3p sÅÌ4s 1s2Å sÅ3b2 sÅl4lÄ• 3sÅn sÅs2 1s2ó 2sód sól2l só2s sp2 3sparg 3spars 3spărg 3spărs 5spăÌrg 5spăÌrs 3spárg 3spárs spár4ui 4spe. s2pec 4s3pem 4spen 4speq spe3r4a speras7c sper4Ä spe3r4æ spe3r4Ç£ sper4ǽ spe5rem spe5req spe5rer spe5r4es spe3r4Ä“ sper4é s4perg speri4b sper5i4m speri4r spe5r4it spe4r5Ä«4m spe4rÄ«4r sperÄ«Ì6m sperÄ«Ì6r spe4r5í4m spe4rí4r 3s4pern spe3r4o spe3rÅ sper4ó s4pers spe3rÅ« 2spes 4speu 4spev s2pex 4spÄ•. s2pÄ•c 4s3pÄ•m 4spÄ•n 4spÄ•q spÄ•3r4a spÄ•3r4æ spÄ•3r4Ç£ spÄ•3rÄ“ spÄ•4rÄ•Ä spÄ•4rĕă spÄ•4r5Ä•Å spÄ•5rÄ•q s4pÄ•rg spÄ•4r5Ä«4m spÄ•4r5Ä«4r spÄ•rÄ«Ì6m spÄ•rÄ«Ì6r spÄ•4r5Ä­Ä• 3s4pÄ•rn spÄ•3rÅ spÄ•3rÅ s4pÄ•rs spÄ•3rÅ« spÄ•3rÅ­ 2spÄ•s 4spÄ•u 4spÄ•v s4pÄ•Ìc 4spÄ•Ìn s6pÄ•ÌrnÄ“ s6pÄ•ÌrnÅ s6pÄ•ÌrnÅ­ s4pÄ•Ìrs 4spÄ•Ìs s4pÄ•Ìx 4s3pém 2spén spé4r5ea spé4r5eÄ spé4r5eo spé4r5eÅ spé4ri. s4pérno s4pérs 4spés s2péx s2phæ s2phÇ£ s2phǽ 4sphen 4sphén s2phr s3pi. 4spia s3pib s3pin s3pio s3piÅ s3pió s3piq s2pir 2spit s3piu s3piú s3piv s2pÄ« 4spĭă s3pÄ­b 2spÄ­t s3pÄ­Å­ 4spÄ­Ìt s2píc s3pín s3píq 2spít s3píu s3pív 2spn s2pod 3s2pol 3spond 2s3pos 2spÅs 1spÅ s2pÅd s2pÅl 2spÅr 2spÅs s4pÅÌl 4spÅÌs s2pód 3s2pól 2s3pós 2spub s2pue s2puÄ“ s2pué s2pui s2puÄ« s2puí s3pus s2pÅ­Ä“ s2pÅ­Ä• s2pÅ­Ä« s2pÅ­Ä­ s3pÅ­m s3pÅ­s 2spúb s2púe s2púi s3pús s2qua s2quÄ 2s3que 2squÄ• s3qui s1r2 2s1s2 s3sa s3sÄ s3să s3sá s3sæ s3sÇ£ s3sǽ s3se ssed4 sse5di s3sÄ“ ssÄ“d4 ssÄ“5di ssÄ“5dÄ­ ss4Ä“m s3sÄ• s3sé ssér4ui ssér4uÄ« s3si ssi3l4 s3sÄ« s3sí ssíl2 s3su ssupe5rí 2st. 4s5taté s5tatib 4s5tÄtÄ“ 4s5tÄté s5tÄtib s5tÄtÄ­b st2ă s2tág st4án s5tátib ste2Ä« 4stemí ste3r4a ste3rÇ£ ste5re ste5ré 4sterg ste3r4i ster6i5c steri5ue steri5v ste5rÄ« sterÄ«5u sterÄ«5v 5s4terne 5sternÄ“ 5sterné 5s4terno 5s4ternÅ 5s4ternó 5s4ternu 5s4ternú ste3ro ste3rÅ 4sterr 4sters 3s4tete 3steté 5s4teti. 5stetim 5s4tetin 5s4tetiq 5stetit 5s4tetiu 5s4tetiv 5s4tetín 5s4tetíq 5stetít 5s4tetíu 5s4tetív 4stÄ“mí 3s4tÄ“te 3stÄ“tÄ“ 3s4tÄ“tÄ• 3stÄ“té 5stÄ“tim 5stÄ“tit 3stÄ“tÄ« 5stÄ“tÄ­m 5stÄ“tÄ­t 5stÄ“tít 5s4tÄ“Ìte 5stÄ“ÌtÄ• 5stÄ“Ìtim 5stÄ“Ìtit 5stÄ“ÌtÄ« 5stÄ“ÌtÄ­m 5stÄ“ÌtÄ­t stÄ•2Ä« stÄ•3r4a stÄ•3rÇ£ stÄ•3rÄ• 4stÄ•rg stÄ•5rÄ« stÄ•rÄ«5u stÄ•rÄ«5v stÄ•5r4Ä­ stÄ•rÄ­5c 5stÄ•rnÄ“ 5s4tÄ•rnÄ• 5s4tÄ•rnÄ­ 5s4tÄ•rnÅ 5stÄ•rnÅ 5s4tÄ•rnÅ­ 4stÄ•rr 4stÄ•rs stÄ•3rÅ­ 3s2tÄ•s 6stÄ•Ìnta 6stÄ•ÌntÄ 6stÄ•Ìntă 6stÄ•Ìntæ 6stÄ•ÌntÇ£ 6stÄ•ÌntÄ• 6stÄ•ÌntÄ« 6stÄ•ÌntÅ 6stÄ•ÌntÅ« 4stÄ•Ìrg 5s6tÄ•ÌrnÄ“ 5s6tÄ•ÌrnÄ­ 5s6tÄ•ÌrnÅ 5stÄ•ÌrnÅ 5s6tÄ•ÌrnÅ­ 4stÄ•Ìrr 4stÄ•Ìrs 4stérg stéri5t 5s4térnÄ“ 5s4térni 5s4térno 5s4térnÅ 5s4térnu 4stérr 4stérs 3s4téte 5stéti. 5stétim 5stétit s2t1h 2s3tia 2s3tiÄ 2s3tiá s2tib sti4bi. sti4bÄ« 4s3tibu 4s3tibú 2stic 2s3tim 3s4timu 3s4tinÄ 3s4tinc 3s4ting 3s4tinÅ 3s4tinx 2s3tio 2s3tiÅ 2s3tió s2tip 3s2tir s3tis s2tit 3stitÇ£ 3stitÅ« 2s3tiu 2s3tiú 3s4tÄ«nc 3s4tÄ«nx s4tÄ«Ìnc 2s3tÄ­Ä s3tĭă stÄ­4bÄ« 4s3tÄ­bÅ­ 2stÄ­c 2s3tÄ­m 3stÄ­nÄ 4stÄ­nÄx 3s4tÄ­nă 4stÄ­nÄ“. 4stÄ­nÄ“n 3s4tÄ­ng 3s4tÄ­nÅ 3s4tÄ­nÅ 2s3tÄ­Å s2tÄ­p 3stÄ­r 2s3tÄ­s s2tÄ­t 3stÄ­ta 5stÄ­tÄ. 5stÄ­tÄn 3stÄ­tă 3stÄ­tá 3stÄ­tæ 3stÄ­tÇ£ 3stÄ­tǽ 5stÄ­tÄ•m 5stÄ­tÄ•t 5stÄ­tÄ«s 5stÄ­tÅ­m 2s3tÄ­Å­ 4s3tÄ­Ìm 5stÄ­ÌmÅ­ 5s4tÄ­Ìng 3s4tÄ­Ìr 4s3tÄ­Ìs s3tía 2stíc 2s3tím 3s4tínc 3s4tíng 3s4tínx s2típ s3tís s2tl 2stn 2stoc 2stor 2s3tot 2stÅr s3tÅt st4ÅÌ 4stÅÌr 2stÅc 4stÅÌc 2stóc 4stóre 4stóri 2s3tót 2stq 4strac 4strah stra3p4 4strax 4straÍž 4straÍ¡ 4strÄx 4strÄÌx 4s5tră. 4s5trăm s5trănÄ• 4s5trăq 4s5trău 4s5trăv s5trăÌm 4strác 4stráh 4stráx s3træ s3trÇ£ s3trǽ s3tri. 5strict 3strig s5trine s3triq 4s3tris s3triu s3triú s3triv 4striz s3trÄ«. s3trÄ«q 4s3trÄ«s s3trÄ«u s3trÄ«v 5strÄ­ct 3s4trÄ­Ä“ 3s4trÄ­Ä• 3strÄ­g 3strÄ­n 4strÄ­z 5strÄ­Ìct 5strÄ­ÌgÄ­ 5strÄ­ÌgÅ­ 5strÄ­Ìn 5stríct 5strígi 5strígu 5stríng 5strínx s3tríq 4s3trís s3tríu s3trív 4stríz 2stro 3s4trom 3strop 2strÅ 3s4trÅm 5strÅÌm 2stró 3stróm 4strud 4strus 4strÅ«d 4strÅ«s 4strÅ«Ìd 4strÅ«Ìs s5trÅ­m s5trÅ­Ìm 4strúd 4strús 2strȳ 2strý s4tue. s4tuÄ• 2stul 3s2tup s3tur 2stÅ« 4stÅ­l 3s2tÅ­p 3s4tÅ­Ìp 2stúl 2stún s2túp 2stúq 2s3túr 2stúu 2stúv 2stv 1s2ty 1stȳ 1s2tý s1u 1su. 3s2uam 3s2uan 3s2uar 3s2uas 3s2uat 1s2uÄ 1s2uá 1s2u2b1 su5ber. sube4ra su5bera. su5berane su5beraq su5berau su5berav sube4rá su5beren su5beri. su5berib su5beriq sube6ris su5beriu su5beriv su5beríq sube6rís su5beríu su5berív su5bern sube4ro sube4ró su5berq su5berue su5berv sub3es sub3Ä“ subÄ“Ì4 su5bérib su5bérn su5bérq su5béru su5bérv sub3és subi4 sub3is sub3it subí4 sub3ís sub3Å 1su3d 2sue. 3s2ueb 3s2uem 3s2uen 3s2ueq 3s4uera 3s4uerÄ 3s4uerá 3s4uere 3s4uerÄ“ 3s4ueré 3s4ueri 3s4uerÄ« 3s4uerí 3s4uero 3s4uerÅ 3s4ueró 3s4ueru 3s4uerú 3s2ues 3s2uet 3s2ueu 3suev 1s2uÄ“ 2suÄ“x 4suÄ“Ìx 3s2uÄ•n 3s2uÄ•q 3s2uÄ•u 3suÄ•v 1sué s2uéb 2suéc 2suéh s2uém s2uén 4suérb s4uére s4uéri 4suérs 4suért s4uéru s2ués s2uét s2uéu 2suéx 1sug 1s2ui s3uir s2uÄ«. 3s2uÄ«n 3s2uÄ«q 3s2uÄ«u 3suÄ«v 1s2uí 1s2ul 2sulm 1s2um su3ma sum2e su3mun 1s2un 3s2uo. 3s2uon 3s2uoq 3s4uor. 3s4uorn 3s4uorq 3s4uoru 3s4uorv 3s2uou 3s2uov 1s2uÅ 3s2uón 3s2uóq 3s4uórn 3s4uórq 3s4uóru 3s4uórv 3s2uóu 3s2uóv 3sup supere6ri supe6re6rí supe6res supe4rÄ“ supe6rés supe6ri. super5im supe6riq super5it superÄ«Ì6 supe4rí4 super5ím super5ít supé6r5es 1suq 1s2ur 1sus su3spi su3spí 1s2ut 1s2uu 1s2uÅ­ 1s2uú 1s2uv 1sÅ« sÅ«be3 sÅ«3d 2sÅ«ri 2sÅ«rÄ­ 2sÅ«rí sÅ«2su sÅ«3sum 1sÅ­ sÅ­2b1 sÅ­b3Ä“ sÅ­bÄ“Ì4 sÅ­bÄ«4 sÅ­bÄ«Ì4 sÅ­bÄ­2 sÅ­bÄ­Ì4 sÅ­b3Å 2sÅ­lm sÅ­pÄ•4rÄ“ sÅ­5pÄ•Ì sÅ­s4pÄ­ sÅ­Ìb3 sÅ­ÌbÄ­4 sÅ­Ì5bĭă sÅ­Ì5bÄ­Ä«s sÅ­Ì5bÄ­Å sÅ­Ì5bÄ­Å­ sÅ­Ì3sp 1s2ú sú2b1 sú5ber. sú5bera. súbe6ran súbe6ras súbe6rat sú5bere sú5beri. súbe6ris súbe4ro súb3es súbi2 súb3is súb3it sú3lui sú3luÄ« súm2i sú1r sú3sp 2sv s3ve s3vÄ• 1sy sy2lu 1sȳ 1sý 1t t2a tab2 ta4c3ue tad2 2ta2g ta4g3n ta3go ta2i ta3ma ta3q tasce4 tascé4 ta3s2p tas5te ta2s3u 5tatem 5tates 3tatém 3tatés t2Ä tÄ5bun 2tÄg 5tÄtem 5tÄtÄ•m 5tÄtÄ•Ì 5tÄÌtÄ“ tăd2 2tă2g tă4gÄ­ tă3gÅ tămÄ•4n t2ăn tă3rÄ• t2ăs tă3s2p tăs3pÄ• tăs3pÄ­ tăs3t tăs5tÄ• tăs4trÅ tá4c3ue tá2ge tá2s3u 5tátem 5tátes t2æ t2Ç£ tǽ2cu 2tc t2e te1a te2aÍž te2aÍ¡ te4gn te3go te3gÅ te3gr te3iss te3it te2iu te1Ä« te3íp te3íss te3í2t te4nim te4nt te5ra. te3rab te5rami ter3ap te5raq te5rara te5rará te5rarem te5raren te5rarer te5rares. te5raresn te5raresq te5raresu te5raresv te5raret te5rarém te5rarén te5rarér te5rarésn te5rarésq te5rarésu te5rarésv te5rarét te5rari te5raro te5raró te5raru te5rarú te3ras te3rat te5rau te5rav ter3aÍž ter3aÍ¡ ter5ÄÌc te3r4æq te3r4Ç£q te4r3ea te4r3eÄ te4r3eá te6r5e6mi. te6r5emine te6r5e6miq te6r5e6miu te6r5e6miv te4r5e4mí te4r5e4mo te4r5e4mÅ te4r5e4mó te4r3eo te4r3eÅ te4r3eó te4r3eq te4re4ra te4re4rÄ te4re4rá te6r5erim te6r5erit te6r5e6rít te4re4ro te4re4rÅ te4re4ró te6r5erun te4re4rú ter5est te4rÄ“mÄ“ te4r5Ä“4mÄ« te4rÄ“mí te3rÄ“u te3rÄ“v te6r5Ä“Ì6mÄ« te4r5é4me te6r5é6mi. te6r5é6mit te4r3éq te6r5é6rim te6r5é6rit ter5ést ter5ibo ter5ibun ter5ibún ter5ice te3rid ter5iÄ“n ter5ime ter5imÄ“ ter5imé ter4imi ter5imo ter5imÅ ter5imó ter4imu ter4imú ter4ine teri5ni ter4iq teri4r ter4is. ter4isn ter4isq te4r5iss te4r5ist ter4isu ter4isv ter4it. ter5i6ta. ter5i6tae ter5i6tam ter5i6tan ter5i6taq ter5i6tar ter5i6tau ter5i6tav ter5i6taÍž ter5itaÍ¡ ter5i6tÄ. ter5i6tÄn ter5i6tÄq ter5i6tÄr ter5i6tÄu ter5i6tÄv ter5i6táe ter5i6tám ter5i6tán ter5i6táq ter5i6tár ter5i6táu ter5i6táv ter5itæ ter5i4tÇ£ ter5itǽ ter4ite ter5i6ti. ter5i6tin ter5itio ter5itiÅ ter5itió ter5i6tiq ter6itis ter5i6tiu ter5i6tiv ter5i4tÄ« ter5i6tín ter5i6tíq ter6itís ter5i6tíu ter5i6tív ter4itn ter6ito. ter6iton ter6itoq ter6itor. ter6itorn ter6itorq ter6itorue ter5itorum ter5i6torú ter6itorv ter5i6tos ter6itot ter6itou ter6itov ter6itÅ. ter6itÅn ter6itÅq ter5i6tÅr ter5i6tÅs ter6itÅu ter6itÅv ter6itÅÌn ter6itÅÌq ter5i6tÅÌr ter5i6tÅÌs ter6itÅÌu ter6itÅÌv ter6itón ter6itóq ter6itórn ter6itórq ter6itórue ter5itórum ter6itórv ter5i6tós ter6itót ter6itóu ter6itóv ter4itq teri4tu ter5itu. ter5itum ter5itun ter5ituq ter5itur ter6itur. ter6iturn ter6iturq ter6iturue ter6iturv ter5itus ter5ituu ter5ituv ter5i4tÅ« ter5i6túm ter5i6tún ter5i6túq ter5i6túra ter5itúræ ter5i6túre ter5i6túri ter6itúrn ter5i6túro ter6itúrq ter6itúrue ter5itúrum ter5itúrus ter6itúrv ter5i6tús ter5i6túu ter5i6túv ter4itv teri4u ter5iue ter3i4v te4r5Ä«4mi te3r4Ä«n ter6Ä«ne ter4Ä«q ter6Ä«qu te4rÄ«4r te4r5Ä«4te te4r5Ä«4to te4r5Ä«4tÅ te4r5Ä«4tó te4r5Ä«4tu te4r5Ä«4tú te4r3Ä«4u ter6Ä«ue. te4r3Ä«4v ter6Ä«ve. terÄ«Ì6mi ter6Ä«Ìn ter6Ä«Ìq te4rÄ«Ì4r terÄ«Ì6te terÄ«Ì6to terÄ«Ì6tÅ terÄ«Ì6tu ter6Ä«Ìue. terÄ«Ì6ui terÄ«Ì6uÄ« ter6Ä«Ìve. terÄ«Ì6vi terÄ«Ì6vÄ« te4r5íme te6r5í6mur te4rí4r te4r5íss te4r5íst te4r5í4ta te6r5í6te. ter5ítio te4r5í4to te6r5ítur ter6íue. ter5í6uer te4rí4ui ter6íve. ter5í6ver te4rí4vi te4rn 4ternÄm 4ternÄ“ 4terné 4ternim 4terním 4ternít te3rop te5rorn 4terot 4terÅt te3rÅu te3rÅv te4róni 4terót te4rq te4rr te4rt ter3uÄ“ ter3uí ter3Å«2 te4rv te2sq 2t3ess 4test. te5s4ta. te5stabam. te5stabamn te5stabamq te5stabamue te5stabamus te5stabamús te5stabamv te5stabant. te5stabantn te5stabantq te5stabantue te5stabantv te5stabas te5stabat. te5stabati te5stabatí te5stabatn te5stabatq te5stabatue te5stabatv te5stabámn te5stabámq te5stabámue te5stabámus te5stabámv te5stabántn te5stabántq te5stabántue te5stabántv te5stabás te5stabáti te5stabátn te5stabátq te5stabátue te5stabátv te5stabimus te5stabimús te5stabis te5stabit. te5stabiti te5stabití te5stabitn te5stabitq te5stabitue te5stabitv te5stabís te5stabít te5stabo. te5stabon te5staboq te5stabou te5stabov te5stabón te5stabóq te5stabóu te5stabóv te5stabunt. te5stabuntn te5stabuntq te5stabuntue te5stabuntv te5stabúntn te5stabúntq te5stabúntue te5stabúntv te5stamus te5stamús te5stane te5stant. te5stantn te5stanto. te5stanton te5stantoq te5stantou te5stantov te5stantÅ te5stantón te5stantóq te5stantóu te5stantóv te5stantq te5stantue te5stantv te5s4taq te5starem. te5staremn te5staremq te5staremue te5staremus te5staremús te5staremv te5starent. te5starentn te5starentq te5starentue te5starentv te5stares te5staret. te5stareti te5staretí te5staretn te5staretq te5staretue te5staretv te5starémn te5starémq te5starémue te5starémus te5starémv te5staréntn te5staréntq te5staréntue te5staréntv te5starés te5staréti te5starétn te5starétq te5starétue te5starétv te5stat. te5statn te5statot te5statót te5statq te5statue te5statv te5s4tau te5s4tav te5s4tÄ. te5stÄbam te5stÄbant. te5stÄbantn te5stÄbantq te5stÄbantue te5stÄbantv te5stÄbat te5stÄbÄmus te5stÄbÄmús te5stÄbÄs te5stÄbÄti te5stÄbÄtí te5stÄbÄÌmus te5stÄbÄÌs te5stÄbÄÌti te5stÄbám te5stÄbántn te5stÄbántq te5stÄbántue te5stÄbántv te5stÄbát te5stÄbimus te5stÄbimús te5stÄbis te5stÄbit. te5stÄbiti te5stÄbití te5stÄbitn te5stÄbitq te5stÄbitue te5stÄbitv te5stÄbís te5stÄbít te5stÄbÅ te5stÄbunt. te5stÄbuntn te5stÄbuntq te5stÄbuntue te5stÄbuntv te5stÄbúntn te5stÄbúntq te5stÄbúntue te5stÄbúntv te5stÄmus te5stÄmús te5stÄne te5s4tÄq te5stÄrem te5stÄrent. te5stÄrentn te5stÄrentq te5stÄrentue te5stÄrentv te5stÄret te5stÄrÄ“mus te5stÄrÄ“mús te5stÄrÄ“s te5stÄrÄ“ti te5stÄrÄ“tí te5stÄrÄ“Ìmus te5stÄrÄ“Ìs te5stÄrÄ“Ìti te5stÄrém te5stÄréntn te5stÄréntq te5stÄréntue te5stÄréntv te5stÄrét te5stÄtÅt te5stÄtÅÌt te5s4tÄu te5s4tÄv te5stÄÌbam te5stÄÌban te5stÄÌbat te5stÄÌbÄ te5stÄÌbimus te5stÄÌbis te5stÄÌbit. te5stÄÌbiti te5stÄÌbÅ te5stÄÌbu te5stÄÌmus te5stÄÌne te5stÄÌq te5stÄÌrem te5stÄÌrent te5stÄÌret te5stÄÌrÄ“ te5stÄÌu te5stÄÌv te5stábam te5stában te5stábas te5stábat te5stábimus te5stábis te5stábit. te5stábiti te5stábo. te5stábu te5stámus te5stáne te5stántn te5stánto. te5stántÅ te5stántq te5stántue te5stántv te5s4táq te5stárem te5stárent te5stáres te5stáret te5státn te5státq te5státue te5státv te5s4táu te5s4táv te5stemus te5stemús te5stent. te5stentn te5stentq te5stentue te5stentv te6ster te5stet. te5steti te5stetí te5stetn te5stetq te5stetue te5stetv te5stÄ“mus te5stÄ“mús tes4tÄ“t te5stÄ“ti te5stÄ“tí te5stÄ“Ìmus te5stÄ“Ìti te5stémus te5sténtn te5sténtq te5sténtue te5sténtv te5stéti te5stétn te5stétq te5stétue te5stétv tes3ti 4testn 4t3estÅ 4testq 4t3estu 4testv te2su tete5r 2teté 4tetim 4tetit 4tetít te2un te3x4e tex2i tex2Ä« tex2o tex2ó tex2u tex2ú t2Ä“ tÄ“2ie tÄ“2iÄ“ tÄ“3ne tÄ“te3 2tÄ“tÄ“ 2tÄ“té 4tÄ“tim 4tÄ“tit 2tÄ“tÄ« 4tÄ“tÄ­m 4tÄ“tÄ­t 4tÄ“tít 4tÄ“ÌtÄ« t2Ä• 3tÄ•a 3tĕă 3tĕæ 3tÄ•Ç£ 3tÄ•Ä“ 3tÄ•Ä• tÄ•3gÅ tÄ•3gr 3tÄ•1Ä« tÄ•3Ä­ 3tÄ•l t3Ä•2nÄ­ 3tÄ•Å 3tÄ•1Å tÄ•3q t4Ä•r. tÄ•r5ÄÌc tÄ•5ră. tÄ•3răr tÄ•r5ăÌp tÄ•3r4æq tÄ•3r4Ç£q tÄ•4rÄ“mÄ“ tÄ•4r5Ä“4mÄ« tÄ•6rÄ“mÄ­Ì tÄ•3rÄ“u tÄ•3rÄ“v tÄ•6r5Ä“Ì6mÄ« t4Ä•rÄ• tÄ•4r3Ä•Ä tÄ•4r3ĕă tÄ•3rÄ•n tÄ•4r3Ä•Å tÄ•4r3Ä•Å tÄ•4r5Ä•4rÄ tÄ•4r5Ä•4ră tÄ•4rÄ•4rÄ­ tÄ•r5Ä•rÄ­m tÄ•r5Ä•rÄ­t tÄ•r5Ä•rÄ­Ìt tÄ•4r5Ä•4rÅ tÄ•6r5Ä•Ì6rÄ­ t4Ä•rÄ« tÄ•3rÄ«. tÄ•3rÄ«n tÄ•3rÄ«q tÄ•4r3Ä«4r tÄ•3rÄ«s tÄ•4r3Ä«4u tÄ•4r3Ä«4v tÄ•rÄ«Ì4r tÄ•r3Ä­Ä“ tÄ•4r3Ä­Ä• tÄ•4r5Ä­4mÄ“ tÄ•4r5Ä­4mÅ tÄ•4r5Ä­4ta tÄ•r5Ä­6tÄ. tÄ•r5Ä­6tÄn tÄ•r5Ä­6tÄq tÄ•r5Ä­6tÄr tÄ•r5Ä­6tÄu tÄ•r5Ä­6tÄv tÄ•4r5Ä­4tă tÄ•4r5Ä­4tá tÄ•4r5Ä­4tæ tÄ•4r5Ä­4tÇ£ tÄ•4r5Ä­4tǽ tÄ•4r5Ä­4tÄ« tÄ•6r5Ä­6tÄ­Å tÄ•6r5Ä­6tÅr tÄ•6r5Ä­6tÅs tÄ•6r5Ä­6tÅÌr tÄ•6r5Ä­6tÅÌs tÄ•4r5Ä­4tÅ« tÄ•6r5Ä­6tÅ­m tÄ•6r5Ä­6tÅ­s tÄ•6r5Ä­6tÅ­Ìm tÄ•6r5Ä­6tÅ­Ìs tÄ•r5Ä­ÌÄ•r tÄ•6r5Ä­ÌmÄ• tÄ•6r5Ä­Ì6tă tÄ•6r5Ä­ÌtÄ­ t4Ä•rn 4tÄ•rnÄm 4tÄ•rnăr 4tÄ•rnăt 4tÄ•rnÄ“ 4tÄ•rnÅ 4tÄ•rÅt t4Ä•3rÅ t4Ä•rq t4Ä•ru tÄ•r3Å«2 tÄ•3rÅ­s t4Ä•rv 2t3Ä•ss 4t3Ä•st. tÄ•5stÄ. tÄ•5stÄbÄmÅ­s tÄ•5stÄbÄmÅ­Ìs tÄ•5stÄbÄs tÄ•5stÄbÄtÄ­ tÄ•5stÄbÄÌmÅ­s tÄ•5stÄbÄÌs tÄ•5stÄbÄÌtÄ­ tÄ•5stÄbăm tÄ•5stÄbănt. tÄ•5stÄbăntn tÄ•5stÄbăntq tÄ•5stÄbăntu tÄ•5stÄbăntv tÄ•5stÄbăt tÄ•5stÄbăÌm tÄ•5stÄbăÌntn tÄ•5stÄbăÌntq tÄ•5stÄbăÌntu tÄ•5stÄbăÌntv tÄ•5stÄbăÌt tÄ•5stÄbÄ­mÅ­s tÄ•5stÄbÄ­mÅ­Ìs tÄ•5stÄbÄ­s tÄ•5stÄbÄ­t. tÄ•5stÄbÄ­tÄ­ tÄ•5stÄbÄ­tn tÄ•5stÄbÄ­tq tÄ•5stÄbÄ­tu tÄ•5stÄbÄ­tv tÄ•5stÄbÄ­Ìs tÄ•5stÄbÄ­Ìt tÄ•5stÄbÅ tÄ•5stÄbÅ­nt. tÄ•5stÄbÅ­ntn tÄ•5stÄbÅ­ntq tÄ•5stÄbÅ­ntu tÄ•5stÄbÅ­ntv tÄ•5stÄbÅ­Ìntn tÄ•5stÄbÅ­Ìntq tÄ•5stÄbÅ­Ìntu tÄ•5stÄbÅ­Ìntv tÄ•5stÄmÅ­s tÄ•5stÄmÅ­Ìs tÄ•5stÄnÄ• tÄ•5stÄq tÄ•5stÄrÄ“mÅ­s tÄ•5stÄrÄ“mÅ­Ìs tÄ•5stÄrÄ“s tÄ•5stÄrÄ“tÄ­ tÄ•5stÄrÄ“ÌmÅ­s tÄ•5stÄrÄ“Ìs tÄ•5stÄrÄ“ÌtÄ­ tÄ•5stÄrÄ•m tÄ•5stÄrÄ•nt. tÄ•5stÄrÄ•ntn tÄ•5stÄrÄ•ntq tÄ•5stÄrÄ•ntu tÄ•5stÄrÄ•ntv tÄ•5stÄrÄ•t tÄ•5stÄrÄ•Ìm tÄ•5stÄrÄ•Ìntn tÄ•5stÄrÄ•Ìntq tÄ•5stÄrÄ•Ìntu tÄ•5stÄrÄ•Ìntv tÄ•5stÄrÄ•Ìt tÄ•5stÄtÅt tÄ•5stÄtÅÌt tÄ•5stÄu tÄ•5stÄv tÄ•5stÄÌbÄ tÄ•5stÄÌbăm tÄ•5stÄÌbăn tÄ•5stÄÌbăt tÄ•5stÄÌbÄ­mÅ­s tÄ•5stÄÌbÄ­s tÄ•5stÄÌbÄ­t. tÄ•5stÄÌbÄ­tÄ­ tÄ•5stÄÌbÅ tÄ•5stÄÌbÅ­ tÄ•5stÄÌmÅ­s tÄ•5stÄÌnÄ• tÄ•5stÄÌq tÄ•5stÄÌrÄ“ tÄ•5stÄÌrÄ•m tÄ•5stÄÌrÄ•nt tÄ•5stÄÌrÄ•t tÄ•5stÄÌu tÄ•5stÄÌv tÄ•5stănt. tÄ•5stăntn tÄ•5stăntÅ tÄ•5stăntq tÄ•5stăntu tÄ•5stăntv tÄ•5stăt tÄ•5stăÌntn tÄ•5stăÌntÅ tÄ•5stăÌntq tÄ•5stăÌntu tÄ•5stăÌntv tÄ•5stăÌt tÄ•5stÄ“mÅ­s tÄ•5stÄ“mÅ­Ìs tÄ•5stÄ“tÄ­ tÄ•5stÄ“ÌmÅ­s tÄ•5stÄ“ÌtÄ­ tÄ•5stÄ•nt. tÄ•5stÄ•ntn tÄ•5stÄ•ntq tÄ•5stÄ•ntu tÄ•5stÄ•ntv tÄ•6stÄ•r tÄ•5stÄ•t tÄ•5stÄ•Ìntn tÄ•5stÄ•Ìntq tÄ•5stÄ•Ìntu tÄ•5stÄ•Ìntv tÄ•5stÄ•Ìt 4t3Ä•stn 4t3Ä•stÅ 4t3Ä•stq 4t3Ä•stu 4t3Ä•stv 2tÄ•tr 3tÄ•Å­ tÄ•x2ă tÄ•x2Ä• tÄ•x2Ä« tÄ•x2Ä­ tÄ•x2Å tÄ•x2Å­ tÄ•Ì3Ä­ tÄ•Ì5răr tÄ•Ì4r5Ä•Ä tÄ•Ì4r5ĕă tÄ•Ì4r5Ä•Å tÄ•Ì4r5Ä•Å tÄ•Ì6r5Ä•6rÄ tÄ•Ì6r5Ä•6ră tÄ•Ì6r5Ä•6rÄ­t tÄ•Ì6r5Ä•6rÅ tÄ•Ì6r5Ä­Ä“n tÄ•Ì6r5Ä­6ta tÄ•Ìr5Ä­6tÄ. tÄ•Ì6r5Ä­6tă tÄ•Ì6r5Ä­6tæ tÄ•Ì6r5Ä­6tÇ£ tÄ•Ì6r5Ä­6tÄ« tÄ•Ì6r5Ä­6tÅs tÄ•Ì6r5Ä­6tÅ« tÄ•Ì6r5Ä­6tÅ­m tÄ•Ì6r5Ä­6tÅ­s 6tÄ•Ìrnăr 6tÄ•Ìrnăt 6tÄ•ÌrnÄ•r 6tÄ•ÌrnÄ•t 4tÄ•ÌrnÅ 5tÄ•ÌstÄ tÄ•Ì5stÄ. tÄ•Ì5s4tă tÄ•Ì5stÄ•nt tÄ•Ì5stÄ•t tÄ•Ìx4Ä­ té4gn té3iÄ« té4r3ea té4r3eÄ té4r3eo té4r3eÅ té4r5era té4r5e4rÄ té6r5erit té4r5e4ro té4r5erÅ tér5ien tér5iÄ“n té4r5im. téri4ta tér5ita. tér5itae tér5itam tér5itaÍž tér5itaÍ¡ tér5i6tÄ. té4r5i4tæ té4r5i4tÇ£ té6r5i6ti. té4r5i4tÄ« té6r5i6tos té6r5i6tÅs té6r5i6tu. té6r5i6tum té6r5i6tus té4r5i4tÅ« té2rÄ« 4térnar 4térnat 4térner 4térnes 4térnet té2ru 2t3éss 5tésta té5s4ta. té5stant té5s4tat 5téstÄ té5s4tÄ. té5stent té5s4tet 4téti. 4tétim 4tétit téx2i téx2u 2tf 2tg 2th. 3t2he the2i 3t2hÄ“ thÄ“2i 3t2hÄ• 3t2hé 3thÄ« 3thĭă 3thÄ­Ä« 3thÄ­Å 3thÄ­Å­ 3thl 2thm 2thn 3tho tho3sp 3thÅ thÅ3sp 3thó 2thp 3thr 3thu 3thú t2i tiad2 3tiae 3tiaÍž 3tiaÍ¡ ti2á ti4ám 3tiæ 3tiÇ£ 3tiǽ ti3b tibe3 t3ibi. t3ibÄ« 3tic tic4e ti5cen 4tiche ti4c3ue ti4d3ea ti4d3eÄ ti4d3eo ti4d3eÅ 2tigi 2till 3tilo 3tiló ti3m2 ti4mn ti4mq ti4mv tin2Ä 5tinÄx tin2u ti2o ti3q ti2s ti3s2p ti4sper ti3sta ti3stÄ ti3s4te ti3s4tÄ“ ti3s4té ti3s4to ti3s4tÅ ti3s4tó ti3s4tr ti3t2 ti4tn ti4tq ti4tv ti3uu 2tÄ«gi 2tÄ«gÄ­ 2tÄ«p tÄ«3q tÄ«Ì3q t2Ä­ 3tÄ­a 3tĭá 3tĭæ 3tÄ­Ç£ 3tĭǽ 2t3Ä­bÄ« 4tÄ­chÄ• 3tÄ­cÅ­ tÄ­4d3Ä•Ä tÄ­4d3Ä•Å 2tÄ­ll 3tÄ­lÅ tÄ­n2Ä tÄ­2Å 2tÄ­r tÄ­3rÄ­ tÄ­3s2p tÄ­4spÄ•r tÄ­3stÄ tÄ­s4tÄm tÄ­s4tÄr tÄ­3stă tÄ­s4tăt tÄ­3s4tÄ“ tÄ­3s4tÄ• tÄ­3s4tÅ tÄ­3s4tÅ tÄ­3s4tr 3tÄ­t. 3tÄ­ÌcÅ­ tÄ­Ì4d5Ä•Ä tÄ­Ì4d5Ä•Å 4tÄ­ÌmÅ­ tÄ­Ì3sp tÄ­Ì5s6tăt tÄ­Ì5s4tÄ“ tÄ­Ì5s4tÄ• tÄ­Ì5stÄ­t tÄ­Ì5s4tÅ tÄ­Ì5s4tÅ tÄ­Ì5str 4tÄ­Ìtă 4tÄ­ÌtÅ­ tí3b 3tíc 4tíche tí4c3ue tí4d3ea tí4d3eÄ tí4d3eo tí4d3eÅ 4tígie 3tílo tí1m 4tímul tín4uÄ« tí3q 2tírp tí2s tí3sp tís4tat tí3s4te tí3s4tÄ“ tí3s4to tí3s4tÅ tí3s4tr tís3u 4títer 4títib 4títim 4títua 4títuÄ 4títuÄ“ 4títui 4tí3tuÄ« 4títuo 4títuÅ tí3tur 4títuu t2l t3li t3lÄ« t3lÄ­ t3lí 2t1m2 tme1 tmÄ­2 2t1n t3ne t2o to3b2 to4cue to2ia to2iá to2iæ to2iǽ to2ie to2ié to2ii to2ií to2í 2tola tom2 ton3g4 tongæ3 tongÇ£Ì5 tongǽ3 to3ni to5ni5c tons3t ton2u 2t3o2pe to3rÄ« tos3t t2Å tÅ3d tÅ2ia tÅ2iÄ tÅ2iá tÅ2iæ tÅ2iÇ£ tÅ2iǽ tÅ2ie tÅ2iÄ“ tÅ2iÄ« tÅ2iÅ tÅ2Ä­ 2tÅl 2tÅÌl t2Å tÅb2 tÅm2 tÅn3g4 tÅngæ3 tÅngÇ£Ì5 tÅngǽ3 2t3ÅpÄ• tÅ3rÄ• tÅ3rÄ« tÅÌ3rÄ­ tó2cu 2tólo tó2pe 2tp tpo3 tpó1 2tq t3qu t2r2 trab2 tra3d4 tradi5ce tradi5cé tradi5ci tradi5cí trado3 tra3e4t tra3g tra3i4 3tral tra5ma tra5má 4trang 4tratÄ“ trÄ3Ä­ tră3bÅ­ trăd2 tră3g 4trăng tră3s2 3trăt 4trătÄ“ 4trăÌng trăÌ5st trá3i 3trál 4tráng trá3p2 trá2s3 træ2ă trÇ£2ă 3tre. tre2i tre5mi tre5mo 2trep 3treq 3treu 3trev trÄ“2i trÄ“3m trÄ•2Ä­ 2trÄ•p 4trÄ•Ìp 2trép 3tria 3trib tri5ci 4trict 4trida 4tridá 4tride 4tri5do 4tridó 2trig 3trige 3trigé 3trii 3triÄ« 3trií 2tr4in tri3ni 3trio 3triÅ 3trió 3trit 2trÄ«d 2trÄ«g 4trÄ«nx tr4Ä«Ì 4trÄ«Ìd 4trÄ«Ìg 4trÄ«Ìnx 3trĭă 3trÄ­b 4trÄ­ct 4trÄ­gÄ­ 4trÄ­gÅ­ 2tr4Ä­n 3trÄ­s 3trÄ­t 3trÄ­Å­ 4trÄ­Ìct 4trÄ­ÌgÄ­ 4trÄ­ÌgÅ­ 4trÄ­Ìn 3tría 4tríct 4trída 4trído 4trídu 4trígi 4trígu 4tríng 4trínx trí5tur tro3e 4troph trÅ4iÄ“ 4trÅÌm 4trÅph trÅ2s tró3ea tró3eÄ 2tróm 4tróph 4truct 3trud 3trus 2trux 4trÅ«ct 3trÅ«d 3trÅ«s 2trÅ«x 3trÅ«Ìd 3trÅ«Ìs 4trÅ«Ìx 2trÅ­Ä­ 2trÅ­Å 2trúc 3trúd 2trúi 3trús 2trúx 2t1s2 2tt2 tte2i tte5re ttÄ“2i ttÄ•3r 3tua 3tuÄ 3tuá tu2cu tu2d3u 2t1ue t2uea t2ueÄ t2ueá t2ueb 3t2uem 3t2uen tu3enn t2ueo t2ueó 3t2ueq t2uer 3tuer. 3tuere 3tueri 3tuerí 3tuern 3tuerq 3tueru 3tuerv 3t2ues 3t2uet 3t2ueu 3tuev 3tuÄ“ 2t1uÄ• 3tué tu3énn 2t3uic 3tuÄ«s 3tul tule4i tu3ma tum2e tu3m2Ä« 3t2uo tuo2r 3tuÅ 3tuó tupe3r4 ture5ia. ture5iaq ture5iau ture5iav ture5ii ture5ií ture5io ture5ió turé3 tu2sp 3tut 3tuun tÅ«2c1 tÅ«2su tÅ«3sum tÅ«3sus 3tÅ­a 3tÅ­Ä 3tŭă 3tŭæ 3tÅ­Ç£ 3tÅ­c 3tÅ­Ä“ 3tÅ­Ä• 3tÅ­l tÅ­3mă tÅ­m2Ä• tÅ­3m2Ä« tÅ­3mÄ­ tÅ­3mÅ 3tÅ­Å 3tÅ­Å tÅ­pÄ•3r tÅ­2s tÅ­Ì3mÄ­ tú2cu tú2du túm2i 2tv t3ve 2tȳ tý3l uab2 uab4u 1uac ua3d2 uad4o uae4st 2uaev u2a3g ual4u u2a1m u2an ua3p2 u2a3q u2ar u2as uas3p uas3t uas5te uas5tr ua4sui ua4suí u2au 2uav ua2x3 uaÍže4st uaÍ¡e4st u2Ä 1uÄd 2uÄv 2uÄÌv u2ă uă3d2 uă3g uă2m1 uăs3p uăs5tr 2uăv uăÌs3 1uác 1uád2 u2ág u2ám u2án uá3p2 u2ár uás3p uá4sui u2áu 2uáv uá2x 2uæd uæ2dÄ« uæ2dí u2æq uæ2s3t u2æu 2u2æv u2Ç£q uÇ£2s3t u2Ç£u 2u2Ç£v uÇ£Ì2d uÇ£Ì3r 2u1ǽ2d u2ǽq uǽ2s3t u2ǽu u2ǽv uba3g uba4i ub2ă ubá3g ube2i ube4rÄ u5bere. u5bereq u5bereu u5berev ub4eris ub4erís ube4rÅ u5berum ubÄ“2r ubé4ia. ubé4iae ubé4iam ubé4ias ubé4iaÍ¡ ubé4iæ ubé4ii u3bére 2ubi ubi2b ub3ice ub4ii. ub4iin ub4iiq ub4iiu ub4iiv ub4iín ub4iíq ub4iíu ub4iív u3biÅ u3bió ub2iq ubi2u ub4iue. u3bium u3biú ubi2v ub4ive. u2bÄ«2 ub2Ä«4n ub2Ä«q ub4Ä«ue. ub4Ä«ve. ubÄ«Ì2 ub4Ä«Ì4n ub4Ä«Ìq ub6Ä«Ìue. ub6Ä«Ìve. 2ubí ubí2b ubí2c ub2íq ub3íss ub3íst ub4íue. ub4íve. u2bl ubo2 u2bÅ ubÅ3 u3b2Å“ u2b1r ub3s2 ub5ste u3b2ul u2b1Å« u3búl 2uc u3ca u3cá u3ce u3cé u3ci u3cí u3c2o uco2i uco5n4i5 ucon4í u3có u3cr u2c3ue u3cun u3cú 2ud ud2ac u3dam. u3damq u3damv u2d3ap u3daÍ¡ ud2Ä u2dăp u3dámn u3dámq u3dámv u3dæ u3dǽ u3de. u3dene u3deq ude2s3 ude6ste u3deu u3dev udÄ“2s u3déne u3déq u3déu u3dév u3d2i udi4g3 u4diso u4disó u3dí ud2o ud4or u3dorú u3dos ud2Å udÅ3p u3dós ud2u u3dú u2e1 ue2a ue3b ue3d2 ued4i ue2e 2uef ue2Ä« ue2í 4uel. 2ueln 2uelq 2uelu 2uelú 2uelv ue2ma ue2má ue4mui ue4m3uí ue4n3ea ue4n3eá ue4n3eo ue4n3eó ue4n3ii ue4n3ií ue4n3íi 2uenn ue2o ue2Å uer2æ3 ue3r4e ue5rem uere5me uere5mé uer6e5mi uere5mí ue3r4Ä“ ue5rÄ“5m ue3rÄ« 3uert ue2s ue3sá ues3c ue3sí ue4s3p ues5pe ue4s3t ues5tÄ ues5te ues5tr uete5re uete5ri ueteri5u uete5rÄ« ueterÄ«5u ueterÄ«Ì7 ue2un 2uev ue3x2 uex4e uÄ“3b 3uÄ“nÄ“ 3uÄ“né 3uÄ“ni uÄ“4n3iÄ« 3uÄ“nÄ« uÄ“4nÄ«s uÄ“4n3Ä­Ä« 3uÄ“ní uÄ“3r uÄ“s3t 3uÄ“x uÄ“Ì4n5iÄ« uÄ“Ì4n5Ä­Ä« 3uÄ“Ìx u2Ä• uÄ•2ă uÄ•2Ä­ uÄ•2m3ă uÄ•3ră uÄ•3r4Ä“ uÄ•5rÄ“5m uÄ•3r4Ä• uÄ•3rÄ« uÄ•3rÅ uÄ•3rÅ­ uÄ•2s3 uÄ•4sp uÄ•s5pÄ• uÄ•s5tÄ• 2uÄ•v uÄ•3x2 uÄ•Ì3ră uÄ•Ì3rÄ• uÄ•Ìx2 u2é 1uéc 2uéf 1uéh ué1i 1uél ué4n3eo 3uéni ué4n3ii 2uénn 2uéra 2uéro 3uérs 3uért ués3 2uév 1uéx2 2uf 2ug u3g2a u3g2æ3 u3g2Ç£ u3g2l u2g3n u1h u3hÅ“ ui2a u2ic 3uice ui4c5énn 1uif uile3i uilé3i u2in uin2Ä ui3oc ui3o2p ui3óp ui3p2t ui3r4i ui3r4í u2is 3uisc ui3s2i 2uisv uiu2 ui3ul ui3uu 2uiv u2Ä« 1uÄ«c uÄ«4cen uÄ«4cÄ•n uÄ«c5Ä•Ìn uÄ«4cén uÄ«2ni uÄ«2n3Ä­ uÄ«2ní uÄ«3p2 uÄ«3q uÄ«3so uÄ«3sÅ uÄ«3u 2uÄ«3v uÄ«Ì3p2 2uÄ«Ìv u2Ä­ uÄ­3ăl uÄ­n2a uÄ­n2Ä uÄ­n2æ uÄ­n2Ä• uÄ­nÄ­3t uÄ­1Å uÄ­Å2p uÄ­ÅÌ2 uÄ­3Å­l uÄ­Ì3Å4 u2í 1uíc 1uíf 1uíg uí1m uí3o2p uí3p2t 3uísa 3uísæ 3uíse 3uísi 3uíso uí3tur 2uív 1uíx 2u3læ 2u3lÇ£ 2u3lǽ ule4ie ule6ine ule6iqu ule6iue ule6ive ulÄ“2i 3ulix 3u2líx 3ulm ul3ua ul3uá ul3uæ ul3uǽ u4l3ue. ul3uÄ«s ul3uó u3lus 2um. 2uma u3ma. uma2g u3m2an u3maq uma4tr u3mau u3mav u3mÄ. u3mÄn u3mÄq u3mÄr u3mÄs umÄ4tr u3mÄu u3mÄv 2u1mă 2umá umá2g u3mán u3máq u3már u3máu u3máv u3mæ u3mÇ£ u3mǽ um3b2 umb4e umb4Ä“ umb4i um5bit umb6itu umbi5tur umbi5tú umbí5te 2ume u3me. ume3d ume5de ume2g ume2q u3mev umÄ“2g umÄ“Ì4g umé2g umi2b umi2c umi2n3 uminí4c umi2r umi2u u2m3iÅ« umi2v u2m1Ä«2 umÄ«Ì4b umÄ«Ì4m umÄ«Ì4r umÄ«Ì4t umí2b umíni4c umí2r 2umn 2umo u3mo. u3mon u3moq u3mor u3mou u3mov u3m2Å 2umÅ 2umó u3món u3móq u3mór u3móu u3móv umpe3r 2umq 2umu u4mue um3uí u3mus u3mús 2umv un3áni un3d2 3undab 3undáb une3b une3d une6ste un2Ä“ 2un2Ä• un2é uné3b 2unÄ« 2unÄ­ u3nos 2unÅ u3nós un3s uns4i un4sn un4sq un4sue un4sv 2unt unte5io unte5ió unte5iu unte6iue unte5iú untÄ“3i untÄ“Ì5i unté3i u1n2u 1u2o uob2 uo2du 2uoe uo3i uo4in uo4i3q uo4iue uo4iv uo4lue uol5uere uo4lui uo4luÄ« uo4luí uom3p2 uo3ni uo4n3ia uo3p2 uo3rÄ« uo2sp uos3t uos5te uo3u uo1ú 2uoÍž 2uoÍ¡ u2Å uÅ3d uÅ3i uÅ2sp uÅs3t uÅÌ3i 1u2Å uÅ2Ä­ 2uÅn3 uÅ2nÄ­ uÅ3rÄ« uÅ4t5ăÌn uÅ2t3Ä• uÅ3Å­ uÅÌ2n3 u2ó uód1 uó2du uó1i uó3io 1uól uóm3p2 uó4n3ia uó3p2 uó2sp 2uÅ“ 2up upe5raeq upe5r6ara upe5r6ará upe5r6are upe5raré upe5raro upe5raró uperas6c upe5raÍžeq upe5r6aÍžÌ upe5raÍ¡eq upe5r6aÍ¡Ì upe5ræq upe5rÇ£q upe5rÇ£Ì uper4ǽ upe5remn upere6ra upere6rÄ upere6rá uper5erim uper5erit uper5e6rít upere6ro upere6rÅ upere6ró upere6rú upe6r5é6rim upe6r5é6rit upe6résc uperi4 upe4r5ie uper5ié upe4rÄ«4 uper5Ä«m uper5Ä«t uper5Ä«Ì6m uperÄ«Ì6r uper6Ä«Ìs uper5Ä«Ì6t uper6Ä«Ìu uper6Ä«Ìv upe4rí4r uper5íte uper5íto uper4íu uper4ív upe5rorn upe5ros upe5rÅs upe5rÅÌs upÄ•3rÄ• upÄ•3rÄ« upÄ•3rÅ­ u3pé upé4r5ea upé4r5eÄ upé4r5eo upé4r5eÅ upé4r5e4r upé4ri. upé4r5ie upé4r5iÄ“ upo4s3 u3pÅ 2uq u3qu 2ur. u1r2a u3ra. urad2 u3rae u3rane u3raq u3rarú u3rau u3rav u3raÍ¡ 2urÄ 2u3r2ă u3ráe u3ráne u3ráq u3ráu u3ráv 2u3ræ 2u1rÇ£ 2u3rǽ u1r2e ure3d ure2i ure5iae ure5iam ure5iar ure5ias ure5iaÍ¡ ure5iáe ure5iám ure5iáq ure5iár ure5iás ure5iáu ure5iáv ure3iæ ure3iǽ ure5ium ure3iú ures3t 2u3rÄ“ urÄ“3ia urÄ“5iÄ. urÄ“5iÄq urÄ“5iÄr urÄ“5iÄs urÄ“5iÄu urÄ“5iÄv urÄ“5iÄÌq urÄ“5iÄÌr urÄ“5iÄÌs urÄ“5iÄÌu urÄ“5iÄÌv urÄ“3iu urÄ“3iú urÄ“Ì3i 2u1rÄ• ur2é u3réf u1rh u1r2i u3ria u3riá u3riæ u3riǽ u3rii u3rií ur4in uri3ni 2urio 2urió 2u1rÄ« 2urÄ­ ur2í u3ría 2urío urí5tur 2urn 2u1r2o 2u1rÅ 2u1r2Å ur2ó u3rós 2urq ur3ua ur3uÄ ur3uá ur3uÄ“ ur2ui u3rum ur3uÅ ur3uó u3rus 2u1rÅ­ ur2ú u3rúm u3rús u1ry u1rý 2us us2a usa3b2 u3s2ă usă3b2 usá4tr u2s3c use2i us2i u2sm u1sp us5per u2spÄ“ us2pÄ• us4pit us2pÄ­ us2pí us4pít u2s3q u2sta u2stÄ u2stă u2stá u2stæ u2stÇ£ u2stǽ u2ste us5ter u2stÄ“ u2stÄ• us5tÄ•r u2sté u2sti u2stÄ« u2stí u3s4tom u2stÅ u3s4tÅm u5s4tÅÌm u3s4tóm u2s3tr us5tro u2stu u2stÅ­ u2stú us2ua 4u2sue u2suÄ• u2sui u2suí 1ut. 3u4tar. 3u4tarn 3u4tarq 3u4tarv 3u4tárn 3u4tárq 3u4tárv 3u2teb ute2Ä« ute3r4a ute3rÇ£ ute5re ute3ri uteri5ue uteri5v ute5rÄ« uterÄ«5u uterÄ«5v ute3ro ute3rÅ utÄ•1 utÄ•r4a utÄ•5rÄ« utÄ•rÄ«5u utÄ•rÄ«5v utÄ•5r4Ä­ 3u2téb 2utia 2utiá 2utiæ 2utiǽ 2utii 2utií u2til 2utio u2tíl 3u2trÄ 3u2træ 3u2trÇ£ 3u2trǽ ut4ri 3u2trÄ« 3u2trÅ 3u2tru 3u2trú ut2u ut3ut u1u 2u3ue 2uuÄ• 1u2ul uul3ui uul3uÄ« uul3uí u2um1 u2un u2u1r u2uu u2uv uÅ«2s 1uÅ­ 1uúl uúl3u uú1r 2u3ve ux2 u3xe ux4eu u3xé u3xi uxi3n u3xí u2xo3 u2xÅ uxu3 u2x3ue ux4us uy2s Å«1 Å«b2 Å«ba2 Å«bÄ6iÄne Å«bÄ6iÄru Å«bÄ6iÄrú Å«bÄ6iæne Å«bÄ6iæue Å«bÄ6iæve Å«bÄ6iÇ£ne Å«bÄ6iÇ£ue Å«bÄ6iÇ£ve Å«bÄ6iǽne Å«bÄ6iǽue Å«bÄ6iǽve Å«bá2 Å«be3ri Å«be3rÅ Å«bÄ•3rÅ­ Å«bÄ«3u Å«bÄ«3v Å«bo2 Å«ca2r Å«co2 Å«3cr Å«2c3ue Å«d2 Å«3da. Å«3dam Å«3dane Å«3daq Å«da2r Å«3dau Å«3dav Å«3daÍž Å«3daÍ¡ Å«3dă. Å«3dăm Å«3dănÄ• Å«3dăq Å«3dău Å«3dăv Å«3dăÌm Å«dá2 Å«3dám 2Å«3dæ 2Å«3dÇ£ 2Å«3dǽ Å«3de. Å«3dene Å«3deq Å«de2s3 Å«de6ste Å«3deu Å«3dev Å«3dÄ“. Å«3dÄ“n Å«3dÄ“q Å«dÄ“2s Å«3dÄ“u Å«3dÄ“v Å«3dÄ“Ìn Å«3dÄ“Ìq Å«3dÄ“Ìu Å«3dÄ“Ìv Å«3dÄ•. Å«3dÄ•nÄ• Å«3dÄ•q Å«dÄ•6stÄ• Å«3dÄ•u Å«3dÄ•v 2Å«3dÄ« Å«do2 Å«d4or Å«3dÅr Å«3dÅs Å«3dÅÌr Å«3dÅÌs Å«dó2 2Å«3du 2Å«3dÅ­ 2Å«3dú Å«2Ä“ 2Å«g Å«3g2a Å«3g2æ3 Å«3g2Ç£ Å«2gn Å«3iú 1Å«l Å«2la Å«2lÄ Å«2lă Å«2lá Å«le3i Å«le2r Å«lé3i Å«2lo2 Å«2lÅ Å«2ló Å«2l3ue Å«m2a Å«ma2r Å«má2 Å«m2e Å«m2Ä• Å«m2i Å«m2Ä­ Å«mo2 Å«na2 Å«n2Ä Å«nă2 Å«ná2 Å«n3áni Å«ne3b Å«ne6ste Å«n3et Å«nÄ•6stÄ• Å«n3Ä•t Å«n2é Å«né3b 2Å«ni 2Å«nÄ­ 2Å«ní Å«no2 Å«3nÅr Å«3nÅs 2Å«ns Å«n3s2i Å«n3s4Ä­ Å«n2u Å«n2Å­ Å«pe3r2 Å«pÄ•3r Å«pÄ•5rÄ­ 2Å«q Å«r2a Å«ra2r Å«r2ă 2Å«ræ Å«ræ2ă 2Å«rÇ£ Å«rÇ£2ă 2Å«rǽ Å«r2e Å«res3 Å«3rÄ“u Å«3rÄ“v Å«r2Ä• Å«rÄ•2Ä­ Å«rÄ•2s3 Å«r2é Å«3réf Å«r2i Å«r4in Å«r2Ä­ Å«r4Ä­n Å«rí2n Å«ro2 Å«ró2 Å«r2u Å«2sc Å«s2ie Å«s2iÄ“ Å«s2iu Å«so2 Å«2sp Å«s5per Å«s5pÄ•r Å«2s3q Å«2s3t Å«s5ter Å«s5tÄ•r Å«2sue Å«2suÄ• Å«s2uÄ« Å«t2 Å«ta2r Å«tá2 Å«te5re Å«tÄ•3rÄ• 2Å«3tia 2Å«3tiÄ 2Å«3tiá 2Å«tiæ 2Å«tiÇ£ 2Å«tiǽ 2Å«3tiÄ« 2Å«tÄ­a 2Å«3tÄ­Ä 2Å«tĭá 2Å«tĭæ 2Å«tÄ­Ç£ 2Å«tĭǽ 2Å«3tÄ­Ä« Å«tí2n Å«to2 2Å«u 2Å«v Å«x2 Å«x4eu Å«2x3ue Å«x4us Å«xÅ«3r Å«2Ì Å«Ìb2 Å«Ì3cr Å«Ìd2 2Å«Ìg Å«Ì1i Å«Ì2lÄ Å«Ì4lă Å«Ì4lÄ•r Å«Ì4lÄ•t Å«Ì2lo Å«Ì2lÅ Å«Ì3mu Å«Ìn3si 2Å«Ìq Å«ÌrÄ­5m Å«Ìr2u Å«Ì2sp Å«Ìs5pe Å«Ì4st Å«Ìs5tr 4Å«Ìtia 4Å«Ì3tiÄ 4Å«Ìtiæ 4Å«ÌtiÇ£ 4Å«Ì3tiÄ« Å«Ì4til 4Å«ÌtÄ­a 4Å«ÌtÄ­Ä 4Å«Ìtĭæ 4Å«ÌtÄ­Ç£ 4Å«ÌtÄ­Ä« Å«Ì4tÄ­l 2Å«Ìu 2Å«Ìv ŭă3p2 ŭăÌ3p2 Å­bÄ“2r Å­bÄ•2 Å­bÄ•4r Å­bÄ•Ì2 Å­2bi Å­2bÄ«2 Å­b2Ä«n Å­b2Ä«q Å­b4Ä«uÄ•. Å­b4Ä«vÄ•. Å­bÄ«Ì2 Å­b4Ä«Ìn Å­b4Ä«Ìq Å­bÄ«Ì4t Å­b6Ä«ÌuÄ•. Å­b6Ä«ÌvÄ•. Å­3bĭă Å­bÄ­3cÅ­ Å­3bÄ­Ä«s Å­5bÄ­Ä«Ìs Å­3bÄ­Å Å­b3Ä­t. Å­3bÄ­Å­ Å­3bÄ­Ìă Å­bÄ­Ì4c Å­bÄ­Ì4g Å­2bl Å­2bÅ Å­2bÅ2 Å­2b1r Å­bs2 Å­b5stÄ• Å­2b1Å« Å­3b2Å­l Å­2cu Å­dÄ“2s Å­2du Å­3d2Å­ Å­d4Å­Ä• Å­Ä•2ă Å­3Ä•nn Å­Ä•3r4Ä• Å­Ä•3rÄ« Å­Ä•3rÅ­ Å­3Ä•Ìnn Å­3g2a Å­3g2æ3 Å­3g2Ç£ Å­2gn Å­1i Å­Ä«3p2 Å­Ä«Ì3p2 Å­2Ä­ Å­Ä­n2 2Å­Ä­s 2Å­la 2Å­lá 2Å­læ 2Å­lÇ£ 2Å­lǽ Å­lÄ“3i Å­lÄ“Ì3i 1Å­lm Å­2l1u Å­m1 2Å­m. Å­3ma Å­3mÄ. Å­3mÄn Å­3mÄq Å­3mÄr Å­3mÄs Å­mÄ4tr Å­3mÄu Å­3mÄv Å­mă2 Å­3mă. Å­3măn Å­măÌ2 Å­3má Å­3mæ Å­3mÇ£ Å­3mǽ 1Å­m3b Å­mb4Ä“ Å­mb4Ä­ Å­m5bÄ­t Å­mÄ“2g Å­m2Ä“s Å­m2Ä“Ì Å­mÄ“Ì4g Å­3mÄ•. Å­3mÄ•n Å­mÄ•2q Å­3mÄ•u Å­3mÄ•v Å­2m3i Å­2mÄ«2 Å­mÄ«Ì4b Å­mÄ«Ì4m Å­mÄ«Ì4r Å­mÄ«Ì4t Å­2mÄ­2 Å­mÄ­n3 Å­mÄ­nÄ­Ì4 Å­m3Ä­t Å­mÄ­Ì4c Å­mÄ­ÌnÄ­6c Å­mÄ­Ì4t 2Å­mn Å­3m2Å Å­2mÅ Å­mpÄ•3r 2Å­mq 2Å­mu Å­3mÅ­s 2Å­mv Å­n3d2 Å­ndÄ•3Å­ Å­n2Ä“ Å­n2Ä• Å­nÄ•3d 2Å­nt Å­ntÄ“Ì5i Å­Å2r1 Å­pÄ•5raeq Å­pÄ•5raÍžeq Å­pÄ•5r6aÍžÌ Å­pÄ•5raÍ¡eq Å­pÄ•5r6aÍ¡Ì Å­pÄ•r5ăÌs Å­pÄ•5ræq Å­pÄ•5rÇ£q Å­pÄ•5rÇ£Ì Å­pÄ•rÄ•4 Å­pÄ•4rÄ•Ä Å­pÄ•4rĕă Å­pÄ•4r5Ä•Å Å­pÄ•6r5Ä•rÄ Å­pÄ•6r5Ä•ră Å­pÄ•6r5Ä•rÄ­ Å­pÄ•6r5Ä•rÅ Å­pÄ•rÄ•Ì4 Å­pÄ•6r5Ä•ÌrÄ­ Å­pÄ•4r3Ä«4 Å­pÄ•r4Ä«s Å­pÄ•rÄ«Ì4 Å­pÄ•r6Ä«Ìs Å­pÄ•4r3Ä­4 Å­pÄ•rÄ­Ì4 Å­pÄ•5rÅÌs Å­pÄ•Ì6r5Ä•Ä Å­pÄ•Ì6r5ĕă Å­pÄ•Ì6r5Ä•Å Å­pÄ•Ì6r5Ä•6r Å­pÄ•Ì6r5Ä­Ä“ Å­r1 Å­1r2a Å­r2Ä Å­1r2ă Å­1r2æ Å­1r2Ç£ Å­r2ǽ Å­3r2Ä“ Å­rÄ“3i Å­rÄ“Ì3i Å­1r2Ä• Å­1r2Ä« Å­3r2Ä­ Å­1r2Å Å­1rÅ Å­1rÅ­ 2Å­s. Å­2s3Ä2 Å­sÄÌ2 Å­2s3c Å­2si 2Å­sn Å­1sp Å­2spÄ“ 2Å­sq Å­s3t Å­s5tÄ•r Å­s4trÄ­ Å­s5trÅ 2Å­su 2Å­sv 1Å­t. Å­tÄ•2Ä« Å­tÄ•3rÄ• Å­tÄ•5rÄ« Å­tÄ•rÄ«5u Å­tÄ•rÄ«5v Å­tÄ•3rÅ­ Å­2tÄ­. 1Å­2tr Å­2tu Å­1u 1Å­2x2 Å­Ì2 Å­ÌbÄ•2 Å­Ìb4Ä­Ä« Å­Ìbs2 Å­Ì3bÅ­ Å­Ì3cÄ• Å­Ì3cÄ« Å­Ì3cÄ­ Å­Ì3cl Å­Ì3dÄ“ Å­Ì3dÄ• Å­Ì3dÄ­ Å­Ì3g Å­Ì4gn Å­Ì3i Å­Ì3j 2Å­Ìlă Å­Ì3lÄ« Å­Ì3lÄ­ Å­Ìl3u Å­Ì3lÅ­Ä« Å­Ì3lÅ­Ä­ Å­Ìm3ă4r Å­Ìm3b4 Å­Ìm5bÄ­ Å­Ìm3Ä•Ä Å­Ìm3ĕă Å­Ì3mÄ•n Å­Ìm3Ä•Å Å­Ìm3Ä•Å Å­Ì3mÄ•q Å­Ì3mÄ•u Å­Ì3mÄ•v Å­Ìm3Ä« Å­Ìm3Ä­4c Å­Ìm3Ä­Ä“ Å­Ìm3Ä­Ä­ Å­Ì3mÄ­n Å­Ìm3Ä­4t 2Å­Ìmn 2Å­Ìmq 2Å­Ìmu Å­Ì3mÅ­ 2Å­Ìmv Å­Ì3nÄ“ Å­Ì3nÄ• Å­Ì3nÄ­ Å­Ì3pÄ• Å­Ì3ră Å­Ì3rÄ• Å­Ì3r2Ä­ Å­Ì3rÅ Å­Ì3sÄ­ 2Å­Ìsn Å­Ì3spÄ• Å­Ìs3t Å­Ìs4trÄ­ 2Å­Ìsu 2Å­Ìsv Å­Ì3tă Å­Ì3tÄ• 3Å­Ì4tr 1Å­Ìu Å­Ì3uÄ Å­Ì3uă Å­Ì3uÄ“ Å­Ì3uÄ• Å­Ì3uÅ Å­Ì3uÅ 1Å­Ìv Å­Ì3vÄ Å­Ì3vă Å­Ì3vÄ“ Å­Ì3vÄ• Å­Ì3vÅ Å­Ì3vŠúbe4ram úbe4rÄ Ãºb4eris ú5berum úb4ii. ú3b4iis ú3biŠú3b2iu úbi5ui úbi5vi ú2bÄ« úb2o úb3s2 úb5ste ú3b2u 2úc ú2c3ue úd2i úd3ue úe1 úe2a úe2o 2úg ú3g2a ú3gæ ú3gÇ£ ú2g3n ú1iæ ú1ii ú2in ú2la. ú2lat ú2let ú2lu úl3ua úl3uæ úl3ue úl3uis úl3uÄ«s ú3lum úm1 ú1ma úma2g ú3m2an ú3maq úma2r ú3mau ú3mav úm3b2 úmb4e úmb4Ä“ úmb4i úm5bi5t úmb6itu úm2e ú2m3eÄ Ãº2m3eŠúmi2c úm2im úm2in úm2iu ú2m3Ä« 2úmn ú1mo 2úmq 2úmu ú3mun 2úmv 5úndans 3úndÄn 2úni ún3s4i 2únt ú1n2u úpe1 úpe3r 2úq úr1 ú1r2a 2ú1ræ ú1r2e ú1r2i 2úrn ú1r2o 2úrq ú3r2ui úru3m ú2run ú2s3c ús2i 2úsn ús3q ús3t 2úsu ú2sui 2úsv ú2tar úte3r 2ú3tia 2útiæ 2ú3tii ú2til ú1u 2úue ú2um ú2un 2úve 2úx úx2a úx4eu úx2i úx2o ú2xue úx4us 1v vab2 va3d2 vad4o va3g val4u vas3p vas5te v2ă vă3d2 vă3g văs3 văÌs3 v3áed vás3p 2væ2d vÇ£2d vÇ£Ì2d 2v1ǽ2d vb2 vbi2 ve1 ve2a ve2ia ve2iá ve4iene ve2ii ve2ií ve4io. ve4ioq ve4ior ve6ioue. ve6iove. ve4ión ve4ióq ve4iór ve6ióue. ve6ióve. ve2iu ve2iú ve2Ä« ve2í ve2lu ve4n3ea ve4n3eá ve4n3eo ve4n3eó ve4n3ii ve4n3ií ve4n3íi 2venn ve2o ve2Å ver2æ3 ve3rÄ“ ve2s ve3sá ve3sí ve4s3p ves5pe ve4s3t ves5te ves5tr vete5re vete5ri veteri5v vete5rÄ« veterÄ«5v veterÄ«Ì7 ve2u vex2 vex4e vÄ“4iae. vÄ“6iaene vÄ“6iaeque vÄ“6iaeue vÄ“6iaeve vÄ“4iam vÄ“4ian vÄ“6iaÍže. vÄ“6iaÍžene vÄ“6iaÍžeque vÄ“6iaÍžeue vÄ“6iaÍževe vÄ“6iaÍžÌene vÄ“6iaÍžÌeque vÄ“6iaÍžÌeue vÄ“6iaÍžÌeve vÄ“6iaÍ¡e. vÄ“6iaÍ¡ene vÄ“6iaÍ¡eque vÄ“6iaÍ¡eue vÄ“6iaÍ¡eve vÄ“6iaÍ¡Ìene vÄ“6iaÍ¡Ìeque vÄ“6iaÍ¡Ìeue vÄ“6iaÍ¡Ìeve vÄ“4iÄ. vÄ“4iÄne vÄ“6iÄque vÄ“4iÄru vÄ“4iÄrú vÄ“4iÄs. vÄ“6iÄsne vÄ“6iÄsque vÄ“6iÄsue vÄ“6iÄsve vÄ“4iÄue vÄ“4iÄve vÄ“6iÄÌne vÄ“6iÄÌque vÄ“6iÄÌru vÄ“6iÄÌsne vÄ“6iÄÌsque vÄ“6iÄÌsue vÄ“6iÄÌsve vÄ“6iÄÌue vÄ“6iÄÌve vÄ“6iáene vÄ“6iáeque vÄ“6iáeue vÄ“6iáeve vÄ“4iám vÄ“4iæ. vÄ“4iæne vÄ“6iæque vÄ“4iæue vÄ“4iæve vÄ“4iÇ£. vÄ“4iÇ£ne vÄ“6iÇ£que vÄ“4iÇ£ue vÄ“4iÇ£ve vÄ“6iÇ£Ìne vÄ“6iÇ£Ìque vÄ“6iÇ£Ìue vÄ“6iÇ£Ìve vÄ“4iǽne vÄ“6iǽque vÄ“4iǽue vÄ“4iǽve vÄ“4iene vÄ“4iÄ«. vÄ“4iÄ«ne vÄ“6iÄ«que vÄ“4iÄ«s. vÄ“6iÄ«sne vÄ“6iÄ«sque vÄ“6iÄ«sue vÄ“6iÄ«sve vÄ“4iÄ«ue vÄ“4iÄ«ve vÄ“6iÄ«Ìne vÄ“6iÄ«Ìque vÄ“6iÄ«Ìsne vÄ“6iÄ«Ìsque vÄ“6iÄ«Ìsue vÄ“6iÄ«Ìsve vÄ“6iÄ«Ìue vÄ“6iÄ«Ìve vÄ“4iÅ. vÄ“4iÅne vÄ“6iÅque vÄ“4iÅru vÄ“4iÅrú vÄ“4iÅs. vÄ“6iÅsne vÄ“6iÅsque vÄ“6iÅsue vÄ“6iÅsve vÄ“4iÅue vÄ“4iÅve vÄ“6iÅÌne vÄ“6iÅÌque vÄ“6iÅÌru vÄ“6iÅÌsne vÄ“6iÅÌsque vÄ“6iÅÌsue vÄ“6iÅÌsve vÄ“6iÅÌue vÄ“6iÅÌve vÄ“2iu vÄ“2iú vÄ“4n3iÄ« vÄ“4nÄ«s vÄ“4n3Ä­Ä« vÄ“3r vÄ“Ì4n5iÄ« vÄ“Ì4n5Ä­Ä« v2Ä• vÄ•2ă vÄ•3rÄ“ vÄ•3r4Ä• vÄ•2s3 vÄ•4sp vÄ•s5pÄ• vÄ•s5tÄ• vÄ•3x2 vÄ•Ì3rÄ• vÄ•Ìx2 vé2lu vé4n3eo vé4n3ii 2vénn vés3 véx2 v2i vi2a vi4c5énn vid4u vin2Ä vi3r4i v2Ä« vÄ«4cen vÄ«4cÄ•n vÄ«c5Ä•Ìn vÄ«4cén vÄ«3so vÄ«3sÅ v2Ä­ vÄ­n2a vÄ­n2Ä vÄ­n2æ ví3d ví3tu 2vj 2voe vo3l4u vo1n vo3rÄ« vos3t vos5te 2voÍž 2voÍ¡ vÅs3t vÅ3rÄ« vó3l2u vó3ru 2vÅ“ vr2a vri2 vÌ„2 v̆2 v̆Ì2 v̆Ì4t vÌ2 1x1 xab2 xae2 x2aeq xaes3 x2aeu x2aev x2ag 2xal xam4b3i4 xambÄ«4 xambÄ«Ì4 xam4b3í4 x2ami x2an x2aq x2are x2aru xas3 x2Äg x2Än x2Äri x2Äru x3ÄÌc 3xă. 3xăm xămbÄ«4 xămbÄ«Ì4 xăm4b3Ä­ 3x2ăn 3x2ăq 3x2ăr xăs3 3x2ăt 3x2ău 3x2ăv 3xÄƒÌ x2ăÌn x2ăÌr x2á x3ác x3áes3 2x3ál x3ámb xám4b3i x3árs xás3 x3áud xæ2 x2æ3q xæs3 x2æ3u x2æ3v xÇ£2 x2Ç£3q xÇ£s3 x2Ç£3u x2Ç£3v x2Ç£Ìq xÇ£Ìs3 x2Ç£Ìu x2Ç£Ìv x2ǽq xǽ2s3 x2ǽu x2ǽv 2xc2 xcí3 x2e1 xe2a xe2e x3e4ger x3e4gér x3e2gi x3e2gí xe2i xe2Ä« xe2í x3emp x3enn xe2o xe2Å xe4qui xe4quÄ« x3erc xe2s x3e2u 3x4eue x2Ä“ x3Ä“2ge x3Ä“4gÄ“r x5Ä“4gÄ“Ìr x3Ä“2gÄ• x3Ä“2gé x3Ä“2gi x3Ä“2gÄ« x3Ä“2gÄ­ x3Ä“2gí x3Ä“Ì2g xÄ•2ă x3ĕăr x3ĕăt 2x2Ä•d x3Ä•nn 2x3Ä•Å x3Ä•4quÄ« xÄ•4quÄ­ x2Ä•rÄ x2Ä•ră xÄ•3r4Ä• x2Ä•rÄ­ x2Ä•rÅ x2Ä•t x3Ä•Å­n x2Ä•Ìd xÄ•Ì2q x2é x3é2g x3émp x3énn xé4qui x3érc 2xh x2ia x2iÄ x2iæ x2iÇ£ xi2ba xi2bá xi2be xi2bé xi2bi xi2bí xi2bo xi2bó xi4bun xi4bún x2ic 2xie 3x2ies 3x2iÄ“s 2xi2g xi2i x2im xi2n xin3Ä xinÄÌ4 xi3ni xi3nÄ« xi3ní xi3nu xi4nue xi3nú x2io x2iÅ x2iq 2xi2r x2iss xi2tæ xi2tÇ£ xi2tǽ xi2tÄ« xi2tÅ« xi4uer xi4uér 2xi2ui xi2uí x2i3uu 2x3iÅ­ xi4ver xi4vér 2xi2vi xi2ví 2xÄ«2b 2xÄ«2m x2Ä«n xÄ«Å2 x2Ä«q 2xÄ«2r 2xÄ«2t xÄ«2ué xÄ«2ui xÄ«2uÄ­ xÄ«2uí xÄ«2vé xÄ«2vi xÄ«2vÄ­ xÄ«2ví xÄ«Ì2b xÄ«Ì2m xÄ«Ì2r xÄ«Ì4t xÄ«Ì4ui xÄ«Ì4uÄ­ xÄ«Ì4vi xÄ«Ì4vÄ­ x2Ä­b x2Ä­c x2Ä­Ä“s 2xÄ­2g 2xÄ­Ä­ x2Ä­m xÄ­2n xÄ­n3Ä xÄ­nÄÌ4 xÄ­n2Ä• xÄ­3nÄ« xÄ­3nÅ­ xÄ­2ta xÄ­4tÄ. xÄ­2tă xÄ­2tá xÄ­2tæ xÄ­2tÇ£ xÄ­2tǽ x2Ä­tÄ• xÄ­2tÄ« x2Ä­tÄ­ xÄ­4tÅs xÄ­2tÅ« xÄ­4tÅ­m xÄ­4tÅ­s xÄ­Ì2g x2Ä­Ìm xÄ­Ì4tă x2í 2x3í2b 2x3í2g x3íi 2x3í2mu 2x3í2r x3í2ta x3í4te. 2x3í2ti 2x3í2to x3ítur x3í4uer x3í4uim x3í4uit x3í4ver x3í4vim x3í4vit 2xj x2l2 2xn x3ne x3nÄ• xo2 3xo. x2o3d 3xon 3xoq xorí3t xo4rn xo4rq xo3ru xo4rv 3xos xo4sa xo4sn xo4so xo4sq xo4su xo4sv x2o3t 3xo3u 3xo3v 3xÅ. 3x2Ån 3xÅq 3xÅ2s xÅ4sa x2Å3t 3xÅu 3xÅv xÅÌ4rat xÅÌ4rÄn xÅÌ4răt xÅÌ4rer xÅÌ4ret xÅÌ4rÄ•r xÅÌ4rÄ•t x3ÅÌ4ro x3ÅÌ4rÅ x3ÅÌrs xÅÌ4s x3ÅÌsa x3ÅÌsÄ x3ÅÌsă x3ÅÌsæ x3ÅÌsÇ£ x3ÅÌsc x3ÅÌse x3ÅÌsÄ“ x3ÅÌsÄ• x3ÅÌsÄ« x3ÅÌsÅ x5ÅÌsum x5ÅÌsus x3ÅÌsÅ­ xÅ2 2x2Å3d xÅÌ2n xó4ner xó4rat xó4rer xó4ret xó4riÄ“ xó4ror xó2s xó4sa x2ót 2xp x3pé 2xq x3qu 2xs2 x3sp xs4pe xsu4lu xsupe3 2xt x3ta x3tÄ x3tă x3tá x3tæ x3tÇ£ x3tǽ x3te1 xter4a xte5re xte5ré xteri5ue xteri5v xte5rÄ« xterÄ«5u xterÄ«5v x3tÄ• xtÄ•3r4a xtÄ•3rÇ£ xtÄ•3rÄ• xtÄ•5rÄ« xtÄ•rÄ«5u xtÄ•rÄ«5v xtÄ•3rÅ­ xtéri5t x3ti1 x3tÄ« x3tÄ­ x3tí x3to x3tÅ x3tó x3tr x3tu x3tÅ« x3tÅ­ x3tú xu2 3xu. 2x3ue. x3uev 2x3uÄ• x2ui. x2uis x2uÄ« x2uís 3x2um xum2e xum2Ä« xu4mn xu4mq xu4mv x2une xu1r xu3ro 3x3us x4us. x4u4sn x4u4sq x4u4su x4u4sv x2uum x2uúm xÅ«2b xÅ«be3 x2Å«ne x2Å«nÄ• xÅ«2re xÅ«2rÄ“ xÅ«2rÄ• xÅ«2ré xÅ«2ri xÅ«2rÄ­ xÅ«2rí xÅ«2ro xÅ«2rÅ xÅ«2ró x2Å«2s xÅ«2t xÅ«Ì2b xÅ«Ì4rÄ“ xÅ«Ì4ri xÅ«Ì4rÄ­ xÅ«Ì4ro xÅ«Ì4rÅ x2Å«Ìs xÅ«Ì2t xÅ­2 2xÅ­Ä 2xŭă x2Å­Ä« 2xÅ­l x2Å­m xÅ­3mÄ xÅ­3mă xÅ­3mÄ“ xÅ­3m2Ä• xÅ­3m2Ä« xÅ­3mÅ­ 2xÅ­Å 2xÅ­Å x2Å­Å­m xÅ­Ì4l x2Å­4Ìm xú2b xú2l x2úm x2úne xú1r x2úsq xú2t xú2ui xú2vi 2xv x3ve x3vÄ• x2x2 y2a yad2 ya1m ya2nu yÄ2nu yá2nu yb2 ybe2 ybÄ“2 ybé2 ybé4i yd2 yda3m yde2s ydÄ“2 ye2 yes3 yÄ“2 yé2 yés3 y2g3n y2i yi2i yin2 yio2s yis3 yi4sc yis5ci yl3ui yl3uí y1m ym2a ym2e yme3d yme5de y1n yn2Ä yne2 yn2i yo3ne yo3ni yó1 yper4í y1r yr2a y3rá yr4ás ys2i ysta4 yste3 y1su yte3r yteri5ue yteri5v yte5rÄ« yterÄ«5u yterÄ«5v yx4eu y2xu ȳ1 ȳ2a ȳad2 ȳ2ă ȳăd2 ȳ2á ȳ2i ȳ2Ä­ ȳ2í ȳló2 ȳmo3 ȳn2 ȳne2 ȳ3rÄ“ ȳré2 ȳro2 ȳró2 ȳs2 ȳso2 ȳsó2 ȳ2Ì È³Ì3l ȳÌ1n ý2a1 ýb2 ýd2 ýda3 ý2g3n ý2i ý2l1u ý1m ým2e ý1nu ý1r ýs2i ýste3 ýte1 ý2th ýx4eu ý2xu 1z z2a zab2 za3r ză3r zá1m ze3b zé2ru z2i zmă3 zo1 zo2s zÅ«2 Ì„1 Ì„2a Ì„a2m Ì„2Ä Ì„2ă Ì„2á Ì„2Ç£ Ì„Ç£2Å­ Ì„b2 Ì„be3 Ì„bÄ«3u Ì„bÄ«3v Ì„3bu Ì„3bÅ­ Ì„ce2 Ì„2cl Ì„2cÅ« Ì„de3 Ì„dÄ•3r Ì„2dÄ« Ì„2e Ì„2Ä“ Ì„Ä“n3 Ì„2Ä• Ì„2f Ì„2i Ì„2Ä« Ì„2Ä­ Ì„2í Ì„n2 Ì„no3 Ì„2Å Ì„pe3 Ì„per2 Ì„pÄ•3r Ì„pÄ•5rÄ­ Ì„r2 Ì„2s Ì„to2 Ì„2u Ì„2Å­ Ì„2ú Ì„2Ì Ì„Ì3b2 Ì„Ì2cl Ì„Ì3l Ì„Ì1n Ì„Ì2s ̆ăd2 ̆b2 ̆d2 ̆dă3m ̆dÄ“2 ̆ĕs3 ̆2gn ̆2Ä­ ̆ĭ2ă ̆ĭn2 ̆ĭs3 ̆2lu ̆1ma ̆1mă ̆m2e ̆m2Ä• ̆1n ̆n2Ä Ì†1ra ̆3r2ă ̆1ræ ̆1rÇ£ ̆1rÄ« ̆1rŠ̆1rŠ̆rsÄ­3 ̆1rÅ­ ̆stă4 ̆tÄ•5rÄ« ̆tÄ•rÄ«5u ̆tÄ•rÄ«5v ̆tÄ•3rÅ­ ̆2th ̆3thÄ­ ̆x2 ̆2xu ̆Ìb2 ̆Ìd2 ̆Ìdă3 ̆Ìm2Ä• Íže1 Ížea2b3 ÍžeăÌ2 Ížeá2 Íže3ác Íže3áp Íže3b Íže4cue Íže3d2 Ížed4o Íže2eÅ Íže3es Ížeé2 Íže3és Íže3g2 Ížei2 Íže2iÄ Íže3ic Íže2iÄ« Íže2Ä« Íže2Å Ížeó2 Ížepe3 Ížepote4 Ížepot5er Ížepot5es Ížepo6t5és Ížepó4t5e Íže3q Íže3r Ížes4ca Ížes4cá Ížes4ci Ížes4cí Íže4scu Íže4scú Íže4spÅ Íže2sq Ížes4ta Ížes4tÄ Ížes4tá Ížes4te Ížes4tÄ“ Ížes4té Ížes4tin Ížesti5t4 Ížes4tÄ« Ížestí3 Ížes4tít4 Ížes4tÅ. Ížes4tÅn Ížes4tÅq Ížes4tÅs Ížes4tÅu Ížes4tÅv Ížes4trú Íže5ter Ížetere6ri Ížete6re6rí Ížete6r5es Ížete6r5és Ížete5rim Ížete5riti Ížete5rití Ížete5rito Ížete5ritó Ížete5r6i5tur Ížete5ritúr Ížete4r5Ä«4 ÍžeterÄ«Ì6 Ížete6rít Íže5tÄ•r Ížeté6r5es Ížeté6rite Íže3ut Ížex2 Íže2xu Íž2u1 Ížu2a Ížu2Ç£ Ížu3b2 Ížu3do ÍžuÅ2 Ížupe5re Ížupe5ri Ížupe5r4Ä« ÍžuperÄ«5n ÍžuperÄ«5q ÍžuperÄ«5u ÍžuperÄ«5v Ížu2su Ížu3sum Ížu3sus Ížu2xu ÍžÌ2 Í¡e1 Í¡ea2b3 Í¡eăÌ2 Í¡e3ác Í¡e3áp Í¡e3b Í¡e4cue Í¡e3d2 Í¡ed4o Í¡e2eo Í¡e2eÅ Í¡e2eó Í¡e3es Í¡eé2r Í¡e3és Í¡e3g2 Í¡ei2 Í¡e2iÄ Í¡e3ic Í¡e2ii Í¡e2iÄ« Í¡e2ií Í¡e2Ä« Í¡e2o Í¡e2Å Í¡epe3 Í¡epo6tés Í¡epó6tes Í¡e3q Í¡e3r Í¡er4i Í¡es4ca Í¡es4cá Í¡e5s4ci Í¡es4cí Í¡e4scu Í¡e4scú Í¡e4spÅ Í¡e2sq Í¡es4ta Í¡es4tÄ Í¡es4tá Í¡es4te Í¡es4tÄ“ Í¡es4té Í¡es4ti. Í¡es4tig Í¡es4tin Í¡es4tiq Í¡es4tis Í¡esti5t4 Í¡es4tiv Í¡es4tÄ« Í¡es4tíg Í¡es4tín Í¡es4tíq Í¡es4tís Í¡es4tí5t4 Í¡es4tíu Í¡es4tív Í¡es4to. Í¡es4ton Í¡es4toq Í¡es4tos Í¡es4tou Í¡es4tov Í¡es4tÅ. Í¡es4tÅn Í¡es4tÅq Í¡es4tÅs Í¡es4tÅu Í¡es4tÅv Í¡es4tón Í¡es4tóq Í¡es4tós Í¡es4tóu Í¡es4tóv Í¡es4trú Í¡e5ter Í¡etere6ri Í¡ete6re6rí Í¡ete4ri4 Í¡eter5ii Í¡eter5ií Í¡ete4r5Ä«4 Í¡eterÄ«Ì6 Í¡ete4rí4 Í¡eter5ímu Í¡eter5íti Í¡e5tÄ•r Í¡eté6ri. Í¡eté6r5ii Í¡eté6r5is Í¡eté6rite Í¡eté6ri6ti Í¡e3ust Í¡e3ut Í¡ex2 Í¡e2xu Í¡2u1 Í¡u2a Í¡u3b2 Í¡u3do Í¡uÅ2 Í¡uó2 Í¡upe5re Í¡upe5ri Í¡uperi5n Í¡uperi5q Í¡uperi5ue Í¡uperi5v Í¡upe5r4Ä« Í¡uperÄ«5n Í¡uperÄ«5q Í¡uperÄ«5u Í¡uperÄ«5v Í¡u2xu Í¡Ì2 Ì2ă Ìăd2 Ìă3g Ìb2a Ìba3q Ì3bas Ìb2ă Ì4băc Ìbă2r Ìb3ărÄ Ìb3ără Ìb3ărÄ“ Ìb3ărÄ• Ìb3ărÅ Ì3băs Ìb2e Ìbe3r Ìb2Ä“ Ìb4ĭă ÌbÄ­4cÅ­ Ìb4Ä­Ä“s Ì2bÄ­Ä­ Ìb4Ä­Å Ìb4Ä­Å­ Ìb2o3 Ìb2Å1 Ìb5ÅlÄ•n Ì2bri Ìb2rÄ« Ìb2sq Ìb5s4tÄ• Ìb2su Ìb2u Ì3bÅ­m Ì2by Ì3că Ìce1 Ì3cÄ“ Ì3ci ÌcÅ3 Ì2cre Ì2crÄ“ Ì2cri Ì2c3ue Ì2c3u2t ÌcÅ­3m Ì2c3Å­2t Ìdă2m Ìd3ămă Ìde4run Ì2d3Ä•2d Ìd4Ä•p Ìd3Ä•st Ì2d3i2g Ìd2in Ìd2Ä­ Ì2d3Ä­g Ì4d3Ä­mÄ­ Ìd3Å2l Ìd2rÄ“ Ìd2rÅ Ì2d3ue Ì2dÅ« Ìd2Å­ Ìe2ă Ìe3b Ìe4cue Ìe3d2 Ìe2eo Ìe2eÅ Ìe3es Ìe3g2 Ìei2 Ìe4ia. Ìe4iam Ìe4ias Ìe4iaÍž Ìe2iÄ Ìe2ii Ìe2iÄ« Ìepe3 Ìe3q Ìe1r Ìer4i Ìe3s4ca Ìe3s4ci Ìe3s4ta Ìe5s4tÄ. Ìe5stÄn Ìe3s4te Ìe3s4tÄ“ Ìe5s4ti. Ìe5s4tin Ìe5s4tis Ìe5stit Ìe3s4tÄ« Ìe5s4to. Ìe5s4tos Ìe3s4tÅ Ìes5tră Ìe5stru Ìes3tu Ìete3r ÌetÄ•5r Ìe3ut Ìe2Å­ Ìe2x ÌÄ•1 Ì1Ä•Ä Ì1Ä•2ă ÌÄ•2mÅ Ì2Ä•q Ì4Ä•r. Ì1Ä•2s ÌÄ•2Å­ Ìfe1 Ì2fÄ“ ÌfÄ•1 ÌfÅ1 Ì3g2a Ì3gă Ì3gæ Ì3gÇ£ ÌgÄ•1 Ì2gl Ì2gn Ìg3no Ì2gÅ­a Ì2gÅ­Ä Ì2gŭă Ì2gÅ­Ç£ Ì2gÅ­Ä“ Ì2gÅ­Ä• Ì2gÅ­Å Ì2gÅ­Å­ Ì1h Ì2he Ì3ian Ì3iaq Ì3iar Ì3iat Ì3iau Ì3iav Ìi2Ä Ìi3b Ìi2ci Ì3iem Ì3ien Ì3ieq Ì3iet Ì3ieu Ì3iev Ì3iÄ“s Ì1ii Ì1io Ì3iun Ì3iuu ÌÄ­3b ÌÄ­2cÄ­ Ì1Ä­Ä­ Ì2Ä­n2 Ì3Ä­n. Ì3lă Ì2leg Ì3lÄ• Ì4lÄ•g Ì4lÄ•p Ì3lix Ì2lu Ì3lub Ìl3ue Ìl3uÄ“ Ì3lui Ì3lum Ì3lus Ì1m2a Ì1mă Ìmă2g Ìm3ără Ìm3ă4rÅ Ìm3bă Ìm4bÄ­Ä Ìm4b3Ä­Å Ìm2e Ì4mera Ì4merÄ ÌmÄ•4dÄ­ Ì4mÄ•dÅ Ìm2in Ì4minÄ“. Ì4minÄ“n Ìm2Ä­ Ì4mĭăn Ì4mĭăt Ì4mÄ­Ä“n Ì4mÄ­Ä“s Ì4mÄ­Ä•n Ì4mÄ­Ä•t Ì2mÄ­Ä­ Ì4mÄ­nÄ“. Ì4mÄ­nÄ“n Ì4mÄ­Å­n Ì1mo1 ÌmÅ1 ÌmpÄ•5r ÌmpÄ•r6Ä« Ì2mun Ì3m2Å« Ìn2Ä Ìn2ă Ìn3dÄ• Ìn4d3Ä­g Ìn4d3Å4l Ìn4dÅ­Ä• Ìnd3Å­Ä­ Ìn2Ä• Ìn3Ä•st Ìn3g2 Ì4n3Ä­cÄ­ Ìn2o ÌnÅ1 Ìns2c Ìn4sig Ìns5i4tæ Ìns5i4tu Ìn4sÄ­g ÌntÄ•3r Ìnt5Ä•rÅs Ì3n2ua Ìn2uÄ Ì3n2uÄ“ Ì3n2uÄ« Ìn2Å« Ìn2Å­ Ìo1 Ì2Å ÌÅ3p Ì3pă Ìpe1 Ìpe3r ÌpÄ•3r ÌpÄ•5rÄ­ Ì3pi Ì3pÄ­ Ì3pl Ì2pn ÌpÅ3 Ì3pr Ìpu3l Ì3pÅ­Ä« Ì3pÅ­Ä­ Ì1r Ìr2a Ìra3g Ì4r2ăb Ìră4gÄ Ìră4gă Ìră4gÄ­ Ìr2ăl Ìr3c Ìr2e Ì3rÄ“. Ìr3Ä•2d4 ÌrÄ•2g ÌrÄ•2m Ìr3Ä•mÄ Ì4r3Ä•mă Ìr3Ä•mÄ“ Ìr3Ä•mÄ• Ìr3Ä•mÄ« Ìr3Ä•mÄ­ Ì4r3Ä•mÅ Ìr3Ä•mÅ Ìr3Ä•mÅ­ Ì2r3Ä•s Ì2rh ÌrÄ­4bÄ“ ÌrÄ­4bÄ• Ìr3Ä­4cÄ­ ÌrÄ­4măn ÌrÄ­4măr ÌrÄ­4măt Ì4r3Ä­4mÄ“ ÌrÄ­4mÄ• Ì4r3Ä­4mÄ­ Ìr3Ä­4mÅ Ìr5Ä­4mÅ­n Ì3rÄ­Å­ Ì2rog Ì2rÅg Ì2r3Åp Ìr3ua Ìr3uÄ Ìr3uæ Ì2rue Ìr3uÄ“ Ìr2ui Ìru3m Ìr3uÅ Ì3rÅ« Ì2sc Ìs4cid Ìs3cr Ìs2Ä• Ìs4Ä•r Ì3sÄ•Å­ Ìs2i Ì2s3Ä­2c Ìs4per ÌspÄ•3 Ìs5pÄ•s Ìs3pÄ« Ìs3q Ìs4tes Ìs3tib Ì3s4tin Ì3stit Ì5stÄ­tÄ“ Ì5stÄ­tÄ•n Ìs4trat Ìs4tret Ìs5tri Ì3s4trÅ Ì3s4tru Ìs5trum Ìs4trÅ­Ä Ìs4trŭă Ìs4trÅ­Ä“ Ìs4trÅ­Ä• Ìs4trÅ­Ä« Ìs4trÅ­Å Ìs4trÅ­Å­ Ìs3ui Ì3sumu Ì3sun Ì4tăg Ìte3r ÌtÄ•2Ä« ÌtÄ•3ra Ìt6Ä•ră. Ì2t3Ä•s Ì3tha Ì3thÄ Ì3thă Ì3thæ Ì3thÇ£ Ì3tÄ­ Ì4tÄ­q Ì2tl Ìto1 ÌtÅ1 Ì5trÄ«x Ì1u Ì2u1m Ì2un ÌuÅ1 Ìupe3 Ìupe5r Ìu1r Ìu2xu Ì1Å«n ÌÅ­2 Ì1Å­b Ì1Å­t ÌvÅ1 Ìx2a Ìx2ă Ìx4eu Ìx2Ä• Ìx3ĕăn Ìx2i Ì2xia Ì2xiÄ Ì2xiæ Ì2xiÇ£ Ì2xiÄ“ Ì2xiÄ« Ì2xiÅ Ì2xiu Ìx2Ä« Ìx2Ä­n Ìx2o Ìx2Å Ìx2Å ÌxtÄ•3 Ì2xu Ìx4us Ìx2Å­Ä­ Ìx3Å­Ä­s",
["lefthyphenmin"]=1,
- ["length"]=5322,
- ["n"]=740,
+ ["length"]=216039,
+ ["n"]=26076,
["righthyphenmax"]=1,
},
["version"]="1.001",
diff --git a/Master/texmf-dist/tex/context/patterns/mkiv/lang-eo.lua b/Master/texmf-dist/tex/context/patterns/mkiv/lang-eo.lua
new file mode 100644
index 00000000000..a47d54cded5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/patterns/mkiv/lang-eo.lua
@@ -0,0 +1,20 @@
+return {
+ ["comment"]="% generated by mtxrun --script pattern --convert",
+ ["exceptions"]={
+ ["n"]=0,
+ },
+ ["metadata"]={
+ ["mnemonic"]="eo",
+ ["source"]="hyph-eo",
+ ["texcomment"]="% no comment",
+ },
+ ["patterns"]={
+ ["characters"]="abcdefghijklmnoprstuvzĉÄĥĵÅÅ­",
+ ["data"]="a1 e1 i1 o1 u1 2aj. 2ajn. 2an. 2as. en. is. 2oj. 2ojn. 2on. 2os. 2us. a3a e3a i3a o3a u3a a3e e3e i3e o3e u3e a3i e3i i3i o3i u3i a3o e3o i3o o3o u3o a3u e3u i3u o3u u3u e2sper 2jn. 2lp. 2lt. 2nk. 2ns. 2nt. 2st. .bl4 .br4 .dr4 .dl4 .fl4 .fr4 .gl4 .gn4 .gr4 .kl4 .kn4 .kr4 .kv4 .pl4 .pr4 .ps4 .pt4 .sf4 .sk4 .skl4 .skr4 .skv4 .sl4 .sm4 .sn4 .sp4 .spl4 .spr4 .st4 .str4 .sv4 .Ål4 .Åm4 .Ån4 .Åp4 .År4 .Åpr4 .Åt4 .Åtr4 .Åv4 .tr4 .vr4 1a2ĉa. 1a2ĉaj. 1a2ĉajn. 1a2ĉan. 1a2ĉe. 1a2ĉo. 1a2ĉoj. 1a2ĉojn. 1a2ĉon. 1a2da. 1a2daj. 1a2dajn. 1a2dan. 1a2de. 1a2do. 1a2doj. 1a2dojn. 1a2don. 1a2das. 1a2di. 1a2dis. 1a2dos. 1a2du. 1a2dus. .avok2a3d .bal2a3d ĉokol2a3d .fas2a3d .inv2a3d kamar2a3d .kan2a3d limon2a3d persv2a3d .pom2a3d seren2a3d 1a2ĵa. 1a2ĵaj. 1a2ĵajn. 1a2ĵan. 1a2ĵe. 1a2ĵo. 1a2ĵoj. 1a2ĵojn. 1a2ĵon. .al2t al3tabl al3t2a3r al3ter al3trui 1a2na. 1a2naj. 1a2najn. 1a2nan. 1a2ne. 1a2no. 1a2noj. 1a2nojn. 1a2non. 1a2nas. 1a2ni. 1a2nis. 1a2nos. 1a2nu. 1a2nus. 1a2nism 1a2n1i2n afg2a3n akomp2a3n arg2a3n ark2a3n ban2a3n but2a3n cig2a3n ĉambel2a3n ĉamp2a3n ĉarlat2a3n ĉik2a3n dek2a3n dog2a3n el2a3n faz2a3n font2a3n galv2a3n germ2a3n Äentlem2a3n hisp2a3n .Ä¥a3n inf2a3n ir2a3n jap2a3n .ka3n kalk2a3n kank2a3n kapit2a3n kard2a3n karav2a3n kor2a3n .ma3n marcip2a3n membr2a3n met2a3n nirv2a3n .on2a3n org2a3n .pa3n partiz2a3n pelik2a3n porcel2a3n prof2a3n .ra3n rum2a3n .sa3n 3s2log2a3n sopr2a3n stef2a3n sufrag2a3n sult2a3n Åam2a3n teher2a3n tir2a3n turb2a3n .va3n vatik2a3n veter2a3n vulk2a3n .ka3n2i3n safr2a3n2i3n .ta3n2i3n 1an2ta. 1an2taj. 1an2tajn. 1an2tan. 1an2te. 1an2to. 1an2toj. 1an2tojn. 1an2ton. adjut2an3t .arog2an3t .atl2an3t .ban3t .brok2an3t .diam2an3t dilet2an3t disk2an3t elef2an3t .gal2an3t .gig2an3t inf2a4n3t inst2an3t konson2an3t .kan3t konst2an3t kvadr2an3t .kv2an3t leÅ­ten2an3t mom2an3t .okt2an3t .ped2an3t .plan3t tal2an3t batal3an4t 1an2t3ar an3t2arkt kan3t2arel 1an2t1ig 1an2t1ec .apu2d1 1a2ra. 1a2raj. 1a2rajn. 1a2ran. 1a2re. 1a2ro. 1a2roj. 1a2rojn. 1a2ron. 1a2rig 1a2riÄ am2a3r barb2a3r baz2a3r biz2a3r boj2a3r bulg2a3r .ci3d2a3r cig2a3r din2a3r dol2a3r er2a3r fanf2a3r .f2a3r formul2a3r garg2a3r git2a3r .ha3r2 hung2a3r invent2a3r izob2a3r jug2u3l2a3r kalend2a3r kap2i3l2a3r kla3r komp2a3r kulin2a3r kvatern2a3r lap2i3d2a3r .mol2a3r najb4a1r om2a3r ordin2a3r partik2u3l2a3r .pol2a3r pop2u3l2a3r prep2a3r prim2a3r rad2a3r remp2a3r rip2a3r sa3m2ov2a3r sanit2a3r sek2u3l2ar sekund2a3r sing2u3l2ar skal2a3r .st2a3r sol2i3d2a3r tal2a3r tat2a3r .vel2a3r vulg2a3r 1a2ta. 1a2taj. 1a2tajn. 1a2tan. 1a2te. 1a2to. 1a2toj. 1a2tojn. 1a2ton. 1a2t1ec adiab2a3t agreg2a3t aÅ­tom2a3t aÅ­torit2a3t .ab2a3t .adekv2a3t advok2a3t afrik2a3t .ag2a3t akrob2a3t .akur2a3t alop2a3t .apar2a3t apost2a3t arom2a3t .ba3t .bl2a3t .brok2a3t .deb2a3t delik2a3t diplom2a3t .duk2a3t .et2a3t fakult2a3t .fr2a3t .gefr2a3t .gla3t .gran2a3t .hep2a3t kandid2a3t .kar2a3t .kazem2a3t .klim2a3t .kom2a3t .komit2a3t .komp2a3t konkord2a3t .konst2a3t .krav2a3t kro3m2a3t .kvadr2a3t magistr2a3t .magn2a3t majorit2a3t malgl2a3t .mals2a3t .mand2a3t .mecen2a3t minorit2a3t .mon2a3t .mul2a3t .musk2a3t ordin2a3t .pal2a3t .pir2a3t .prel2a3t .prim2a3t priorit2a3t .priv2a3t .rab2a3t .ren2a3t .ril2a3t .sab2a3t .sal2a3t .sen2a3t sindik2a3t .skarl2a3t .sold2a3t .son2a3t .sp2a3t stigm2a3t substr2a3t surog2a3t .tok2a3t .tom2a3t .ultim2a3t universit2a3t .vulg2a3t .ĉe2f1 .ĉi4a .ĉia4m1 .ĉi4e .ĉie4s .ĉi4o .ĉio4m .ĉi4u ĉi3el1 3ĉ2jo .di2s1 .di3s2ert .di3s2erv .di3s2ip .di3s2oci .di3s2a. .di3s2aj. .di3s2ajn. .di3s2an. .di3s2e. .di3s2en. .du2m1 dump2in3g .du2on1 1e2bla. 1e2blaj. 1e2blajn. 1e2blan. 1e2ble. 1e2blo. 1e2bloj. 1e2blojn. 1e2blon. 1e2blas. 1e2bli. 1e2blis. 1e2blos. 1e2blu. 1e2blus. 1e2bl1ec 1e2bl1aĵ .fe3b1l .me3b1l 1e2ca. 1e2caj. 1e2cajn. 1e2can. 1e2ce. 1e2co. 1e2coj. 1e2cojn. 1e2con. .apr2e3c .de3c .pe3c sp2e3c 1e2ga. 1e2gaj. 1e2gajn. 1e2gan. 1e2ge. 1e2go. 1e2goj. 1e2gojn. 1e2gon. 1e2gas. 1e2gi. 1e2gis. 1e2gos. 1e2gu. 1e2gus. .del2e3g .fl2e3g kol2e3g .om2e3g .prel2e3g .strat2e3g .norv2e3g 1e2ja. 1e2jaj. 1e2jajn. 1e2jan. 1e2je. 1e2jo. 1e2joj. 1e2jojn. 1e2jon. 1e2j1ig 1e2j1iÄ .be3j .pl2ej malpl2ej .ek2s1 .ek3s2ci ek4s3cit ek4s3ciz .ek3s2id .ek1i2r .ek1rid 1e2kzem .ekste2r1 .ekste3ra. .ekste3raj. .ekste3rajn. .ekste3ran. .ekste3re. .ekste3ro. .ekste3roj. .ekste3rojn. .ekste3ron. .ekste3ras. .ekste3ri. .ekste3ris. .ekste3ros. .ekste3ru. .ekste3rus. .el1i2r .el1aĉet .el1uz 1e2ma. 1e2maj. 1e2majn. 1e2man. 1e2me. 1e2mo. 1e2moj. 1e2mojn. 1e2mon. 1e2mas. 1e2mi. 1e2mis. 1e2mos. 1e2mu. 1e2mus. 1e2m1ec .alpr2e3m .anat2e3m blasf2e3m .boh2e3m diad2e3m .dil2e3m .ed2e3m ekstr2e3m .ektr2e3m .ekpr2e3m embl2e3m emfiz2e3m .ekz2e3m .har2e3m jerusal2e3m krizant2e3m .le3m .po2e3m .pr2e3m .probl2e3m .sk2e3m .te3m .tand2e3m .teor2e3m .tot2e3m .tr2e3m sist2e3m .en1ir2 1en2da. 1en2daj. 1en2dajn. 1en2dan. 1en2de. 1en2das. 1en2di. 1en2dis. 1en2dos. 1en2du. 1en2dus. 1en2do. 1en2don. .am2en3d .at2en3d .def2en3d .et2en3d .kal2en3d kresĉ2en3d .men3d .of2en3d .pen3d .pl2en3d pret2en3d rekom2en3d .sen3d sc2en3d .ten3d .ven3d 1e2ta. 1e2taj. 1e2tajn. 1e2tan. 1e2te. 1e2to. 1e2toj. 1e2tojn. 1e2ton. 1e2taas. 1e2tai. 1e2tais. 1e2taos. 1e2tau. 1e2taus. a2ĉ2e3t alfab2e3t alum2e3t amul2e3t .ask2e3t .atl2e3t .be3t bajon2e3t bil2e3t .bol2e3t bracel2e3t brev2e3t .buÄ2e3t .deb2e3t .dem2e3t diab2e3t elizab2e3t .enk2e3t epit2e3t .form2e3t .gaz2e3t .herm2e3t .Ä¥e3t .ĵak2e3t ĵ2e3t kabin2e3t .kad2e3t kastanj2e3t .kin2e3t klarn2e3t kloz2e3t .kom2e3t kompl2e3t .konf2e3t kors2e3t korv2e3t kotl2e3t .krik2e3t .krok2e3t kvodlib2e3t .me3t magn2e3t marion2e3t .mot2e3t .ne3t .oml2e3t pamfl2e3t parg2e3t .pl2e3t .po2e3t .prof2e3t .prol2e3t .rak2e3t .rem2e3t .rip2e3t sekr2e3t skel2e3t .son2e3t .sov2e3t spag2e3t spin2e3t staf2e3t .stil2e3t Åibol2e3t .tib2e3t tual2e3t .ve3t .veg2e3t .vend2e3t vinj2e3t 1es2tr .fo2r1 .fo3r2in3t .fo3r2u3m .fo3r2a. .fo3r2aj. .fo3r2ajn. .fo3r2an. .fo3r2e. .fo3r2o. .fo3r2oj. .fo3r2ojn. .fo3r2on. .fo3r2en .fo3r2as. .fo3r2i. .fo3r2is. .fo3r2os. .fo3r2u. .fo3r2us. .Äi2s1 1i2da. 1i2daj. 1i2dajn. 1i2dan. 1i2de. 1i2do. 1i2doj. 1i2dojn. 1i2don. .abs2i3d .ac2i3d .akr2i3d .aps2i3d .ar2i3d .askar2i3d .asp2i3d .av2i3d .bi3d .bol2i3d .br2i3d cirkumc2i3d .dav2i3d .dec2i3d .eÅ­kl2i3d .eg2i3d .fi3d .flor2i3d .fr2i3d frig2i3d genoc2i3d .gv2i3d hibr2i3d hum2i3d Ä¥lam2i3d .inc2i3d .ins2i3d inval2i3d .ji3d kan3t2ar2i3d koinc2i3d .konf2i3d krizal2i3d .li3d .lib2i3d likv2i3d .liv2i3d .luc2i3d .madr2i3d morb2i3d .muc2i3d perf2i3d piram2i3d .prez2i3d .ri3d rap2i3d rez2i3d rig2i3d .si3d .sol2i3d .str2i3d telev2i3d .tim2i3d .vi3d .val2i3d 1i2d1ar 1i2d1i2n .pir2i3d2in 1i2ga. 1i2gaj. 1i2gajn. 1i2gan. 1i2ge. 1i2go. 1i2goj. 1i2gojn. 1i2gon. 1i2gas. 1i2gi. 1i2gis. 1i2gos. 1i2gu. 1i2gus. .br2i3g .di3g .fi3g .in3d2i3g .inst2i3g .intr2i3g .kvadr2i3g .li3g pfen2i3g .pi3g .prod2i3g .ri3g .rodr2i3g .str2i3g .ti3g .nav2i3g 1i2gebl 1i2gant 1i2gint 1i2gont 1i2gat al2i3g2a3tor l2i3g2a3turo 1i2git 1i2got 1i2g1a2d br2i3g2a3d 1i2g1e2m 1i2g1i2l 1i2Äa. 1i2Äaj. 1i2Äajn. 1i2Äan. 1i2Äe. 1i2Äo. 1i2Äoj. 1i2Äojn. 1i2Äon. 1i2Äas. 1i2Äi. 1i2Äis. 1i2Äos. 1i2Äu. 1i2Äus. 1i2Äant 1i2Äint 1i2Äont .br2i3Ä .negl2i3Ä .prest2i3Ä .vert2i3Ä .vest2i3Ä 1i2Ä1a2d 1i2Ä1e2m 1i2la. 1i2laj. 1i2lajn. 1i2lan. 1i2le. 1i2lo. 1i2loj. 1i2lojn. 1i2lon. abut2i3l acet2i3l .ang2i3l .apr2i3l .arg2i3l .az2i3l .bab2i3l .bac2i3l .baz2i3l .ber2i3l .bi3l .br2i3l .braz2i3l .ced2i3l .civ2i3l .ĉi3l ĉinĉ2i3l .dakt2i3l .deb2i3l .def2i3l .dist2i3l .domic2i3l .dr2i3l .ed2i3l .ekz2i3l .eps2i3l .et2i3l .fi3l .fac2i3l .fus2i3l .gor2i3l .gr2i3l .Äent2i3l .hum2i3l .jub2i3l .ki3l .kamar2i3l kamom2i3l .komp2i3l .kons2i3l krokod2i3l .mi3l .mant2i3l .met2i3l mob2i3l .mut2i3l naÅ­t2i3l of2i3l .osc2i3l paskv2i3l .ps2i3l pterodakt2i3l .pup2i3l sen2il sim2i3l .st2i3l .stab2i3l stenc2i3l strob2i3l subt2i3l svah2i3l trankv2i3l .ut2i3l .vi3l .van2i3l .vig2i3l vodev2i3l volat2i3l 1i2l1ar b2i3l2a3rd dakt2i3l2a3rb pl2i3l2a3rÄ f2i3l2a3ri frit2i3l2a3ri f2i3l2a3rb 1e2str1i2na. 1e2str1i2naj. 1e2str1i2najn. 1e2str1i2nan. 1e2str1i2ne. 1e2str1i2no. 1e2str1i2noj. 1e2str1i2nojn. 1e2str1i2non. 1i2s2t1i2na. 1i2s2t1i2naj. 1i2s2t1i2najn. 1i2s2t1i2nan. 1i2s2t1i2ne. 1i2s2t1i2no. 1i2s2t1i2noj. 1i2s2t1i2nojn. 1i2s2t1i2non. d2is3t2ingo 1u2l1i2na. 1u2l1i2naj. 1u2l1i2najn. 1u2l1i2nan. 1u2l1i2ne. 1u2l1i2no. 1u2l1i2noj. 1u2l1i2nojn. 1u2l1i2non. ins2ul2i3n 1an2t1i2na. 1an2t1i2naj. 1an2t1i2najn. 1an2t1i2nan. 1an2t1i2ne. 1an2t1i2no. 1an2t1i2noj. 1an2t1i2nojn. 1an2t1i2non. adam2a4n3t2i3n a4n3t2i3nom brig2a4n3t2i3n gal2a4n3t2i3n .k2a4n3t2i3n strof2a4n3t2i3n 1in2da. 1in2daj. 1in2dajn. 1in2dan. 1in2de. 1in2das. 1in2di. 1in2dis. 1in2dos. 1in2du. 1in2dus. 1in2do. 1in2don. 1in2d3ec 1in2d3ig 1in2d3iÄ .bin3d .hin3d .lin3d rozal4in3d .bl4in3d .pin3d tamar4in3d .Åin3d .vin3d .in3d2ign in3d2iÄen 1in2ga. 1in2gaj. 1in2gajn. 1in2gan. 1in2ge. 1in2go. 1in2goj. 1in2gojn. 1in2gon. 1in2gig .din3g .pud2in3g .vik2in3g 3s2mok2in3g Åil2in3g .klin3g sterl2in3g dom2in3g men2in3g salp2in3g .rin3g .far2in3g .har2in3g .lar2in3g .mer2in3g .fr2in3g .sir2in3g .krin3g str2in3g vrin3g .at2in3g .mit2in3g .est2in3g .dist2in3g .svin3g 1in2ta. 1in2taj. 1in2tajn. 1in2tan. 1in2te. 1in2to. 1in2toj. 1in2tojn. 1in2ton. 1in2t3ar 1in2t3ec 1in2t3us .abs2in3t .fin3t hiac2in3t .jac2in3t .kvin3t labir2in3t .pin3t .pl2in3t .tin3t tereb2in3t .inte2r1 .inte3r2es .inte3r2ez .inte3r2upt .inte3ra. .inte3raj. .inte3rajn. .inte3ran. .inte3re. .inte3ro. .inte3roj. .inte3rojn. .inte3ron. .inte3ras. .inte3ri. .inte3ris. .inte3ros. .inte3ru. .inte3rus. .inte3ren. 1is2ma. 1is2maj. 1is2majn. 1is2man. 1is2me. 1is2mo. 1is2moj. 1is2mojn. 1is2mon. 1i2s2m3ec .pr2is3m .ris3m .sk2is3m .sis3m 1i2s2ta. 1i2s2taj. 1i2s2tajn. 1i2s2tan. 1i2s2te. 1i2s2to. 1i2s2toj. 1i2s2tojn. 1i2s2ton. 1i2s2t3ec 1i2s2t3ar .amet2i3s3t antikr2i3s3t aor2i3s3t .ar2i3s3t .bal2i3s3t .bat2i3s3t .ci3s3t .di3s3t ekz2i3s3t .gen2i3s3t .gi3s3t .hi3s3t ins2i3s3t kons2i3s3t .ki3s3t .kr2i3s3t .li3s3t .pi3s3t pers2i3s3t .rez2i3s3t .sk2i3s3t .vi3s3t 1i2ta. 1i2taj. 1i2tajn. 1i2tan. 1i2te. 1i2to. 1i2toj. 1i2tojn. 1i2ton. 1i2t3ec p2i3t4eci .ag2i3t akred2i3t antrac2i3t .apet2i3t .bi3t .band2i3t biskv2i3t .br2i3t .ci3t .cenob2i3t .cirkv2i3t .civ2i3t .deb2i3t defic2i3t .di3g2i3t dinam2i3t .efr2i3t .eksc2i3t eksplic2i3t .el2i3t .emer2i3t .erm2i3t .erud2i3t .ev2i3t .fr2i3t .gamb2i3t .gl2i3t .graf2i3t .gran2i3t .grav2i3t hermafrod2i3t .hez2i3t hipokr2i3t .im2i3t .inc2i3t infin2i3t inkogn2i3t interm2i3t .inv2i3t kapac2i3t komprom2i3t .konf2i3t .kred2i3t .kv2i3t .kval2i3t .kviv2i3t .li3t .mi3t malak2i3t .margar2i3t .marm2i3t .med2i3t megal2i3t .mer2i3t mil2i3t asimil3i4t .mosk2i3t .neof2i3t okcip2i3t ol2i3t .orb2i3t palp2i3t .paraz2i3t .pir2i3t plebisc2i3t precip2i3t prestid2i3g2i3t preter2i3t prof2i3t prozel2i3t .ri3t rehabil2i3t .rekviz2i3t sanskr2i3t .satel2i3t sibar2i3t .sk2i3t .sp2i3t .spir2i3t .spl2i3t .spr2i3t stalagm2i3t stalakt2i3t .stil2i3t .su3b2i3t .Åv2i3t .term2i3t .trans2i3t troglod2i3t .vi3t .viz2i3t .zen2i3t .kel2k .kro2m1 .kro3ma. .kro3maj. .kro3majn. .kro3man. .kro3me. krom2o .ku2n1 ku3n2ikl .li4a li5an li5as .ma2l1 ma3l2ic .malno2v .me2m1 me3m2or .mi4a mi5asm mi5aÅ­ .mi2s1 .mi3s2al mi3s2il .mi3s2ia .mi3s2ie .mi3s2ii .mi3s2io .mi3s2iu .me2z1 mez2alianc me3z2embri me3z2enter .me3z2ere .mez2o me3z2ur .ni4a 3nja. 3njaj. 3njajn. 3njan. 3nje. 3njo. 3njoj. 3njojn. 3njon. .no2v 1o2bla. 1o2blaj. 1o2blajn. 1o2blan. 1o2ble. 1o2blo. 1o2bloj. 1o2blojn. 1o2blon. 1o2bl1ec gren2o3bl malno3bl .no3bl .vo3bl du3ona. du3onaj. du3onajn. du3onan. du3one. du3ono. du3onoj. du3onojn. du3onon. .trio2n .kvar3o2n .kvin3o2n .ses3o2n .sep3o2n .ok3o2na. .ok3o2naj. .ok3o2najn. .ok3o2nan. .ok3o2ne. .ok3o2no. .ok3o2noj. .ok3o2nojn. .ok3o2non. .naÅ­o4n dek3o2na. dek3o2naj. dek3o2najn. dek3o2nan. dek3o2ne. dek3o2no. dek3o2noj. dek3o2nojn. dek3o2non. cent3o2na. cent3o2naj. cent3o2najn. cent3o2nan. cent3o2ne. cent3o2no. cent3o2noj. cent3o2nojn. cent3o2non. mil3o2na. mil3o2naj. mil3o2najn. mil3o2nan. mil3o2ne. mil3o2no. mil3o2noj. mil3o2nojn. mil3o2non. 1on2ta. 1on2taj. 1on2tajn. 1on2tan. 1on2te. 1on2to. 1on2toj. 1on2tojn. 1on2ton. disk2on3t .fon3t .fr2on3t .hon3t horiz2on3t .kon3t konfr2on3t .mon3t mastod2on3t .melol2on3t .pon3t .rak2on3t .rem2on3t .renk2on3t .sp2on3t vol2on3t duo2pa. duo2paj. duo2pajn. duo2pan. duo2pe. duo2po. duo2poj. duo2pojn. duo2pon. .trio2p kvar3o2p kvin3o2p ses3o2p sep3o2p .ok3o2pa. .ok3o2paj. .ok3o2pajn. .ok3o2pan. .ok3o2pe. .ok3o2po. .ok3o2poj. .ok3o2pojn. .ok3o2pon. naÅ­o4p dek3o2pa. dek3o2paj. dek3o2pajn. dek3o2pan. dek3o2pe. dek3o2po. dek3o2poj. dek3o2pojn. dek3o2pon. cent3o2pa. cent3o2paj. cent3o2pajn. cent3o2pan. cent3o2pe. cent3o2po. cent3o2poj. cent3o2pojn. cent3o2pon. mil3o2pa. mil3o2paj. mil3o2pajn. mil3o2pan. mil3o2pe. mil3o2po. mil3o2poj. mil3o2pojn. mil3o2pon. 1o2ta. 1o2taj. 1o2tajn. 1o2tan. 1o2te. 1o2to. 1o2toj. 1o2tojn. 1o2ton. abrik2o3t anekd2o3t antid2o3t asimpt2o3t .az2o3t .bo3t .bal2o3t bankr2o3t .behem2o3t bergam2o3t .bi3g2o3t .bisk2o3t bojk2o3t .do3t .dep2o3t .desp2o3t .dev2o3t dorl2o3t .ekz2o3t .er2o3t .erg2o3t .fo3t .fag2o3t .fakt2o3t .fl2o3t fokstr2o3t .fr2o3t .go3t .gav2o3t .golg2o3t .gr2o3t .herod2o3t hipn2o3t hotent2o3t .jo3t ĵab2o3t .ko3t .kaĉal2o3t kalik2o3t .kaml2o3t .kan2o3t .kap2o3t .kar2o3t .koj2o3t .komp2o3t kompl2o3t kreoz2o3t .kul2o3t .kv2o3t .alikv2o3t .lo3t .lit2o3t .mo3t .mar2o3t .mark2o3t marm2o3t .mioz2o3t .no3t nark2o3t .po3t perlam2o3t .pier2o3t .pil2o3t .piv2o3t .pl2o3t poligl2o3t .ro3t .rab2o3t reding2o3t .rob2o3t .sab2o3t sacerd2o3t .sk2o3t .skler2o3t .skr2o3t .sp2o3t .Åo3t Åevj2o3t .terak2o3t .tr2o3t .trik2o3t .vo3t .zel2o3t .po2r .pos2t1 pos3t2ament pos3t2iljon pos3t2u3l .prete2r1 .re2f3l2ig .re2spond .re2spublik .re2storaci .re2tro .sa2m sam2ar .sa3m2u3m sa3m2uraj .se2n1 .se3n2aa .se3n2ao sen2at sen2eskal .si4a .su2b1 .su3b2ute .supe2r1 .supe3ra. .supe3raj. .supe3rajn. .supe3ran. .supe3re. .supe3ro. .supe3roj. .supe3rojn. .supe3ron. .supe3ras. .supe3ri. .supe3ris. .supe3ros. .supe3ru. .supe3rus. .Åi4a .tran2s tran3scend tran3sept tran3sistor tran3sit tran3s2pir .tu2t1 .tu3ta. .tu3taj. .tu3tajn. .tu3tan. .tu3te. .tu3to. .tu3toj. .tu3tojn. .tu3ton. 1u2ja. 1u2jaj. 1u2jajn. 1u2jan. 1u2je. 1u2jo. 1u2joj. 1u2jojn. 1u2jon. 1u2j1ig 1u2j1iÄ .and2u3j .halel2u3j 1u2la. 1u2laj. 1u2lajn. 1u2lan. 1u2le. 1u2lo. 1u2loj. 1u2lojn. 1u2lon. 1e2m1u2l e3m2u3ls 1u2l3ec 1u2l3ej .akum2u3l .ang2u3l .bu3l .bet2u3l .bru3l .ejak2u3l .fist2u3l form2u3l .fu3l galin2u3l .gran2u3l .grat2u3l .herk2u3l hierod2u3l homunk2u3l .inok2u3l .ins2u3l .instanb2u3l .ju3l .ĵu3l .ku3l .kab2u3l kalend2u3l kalk2u3l kapit2u3l kaps2u3l koag2u3l .kons2u3l .kop2u3l korpusk2u3l .kum2u3l .lu3l .liverp2u3l .mu3l .mak2u3l manip2u3l matrik2u3l .mod2u3l molek2u3l .nu3l .neb2u3l .ok2u3l .pu3l .paĉ2u3l partik2u3l .pust2u3l .ru3l .reg2u3l retik2u3l .ruk2u3l .sim2u3l skrup2u3l somnamb2u3l speg2u3l .spek2u3l .stim2u3l .tu3l .tab2u3l tarant2u3l .tru3l tuberk2u3l turb2u3l .ul2u3l .uv2u3l .vist2u3l 1u2l1ar 2u3l2ari 2u3l2ard .pedik2u3l2ar 1u2ma. 1u2maj. 1u2majn. 1u2man. 1u2me. 1u2mo. 1u2moj. 1u2mojn. 1u2mon. 1u2mas. 1u2mi. 1u2mis. 1u2mos. 1u2mu. 1u2mus. 1u2m3ec .alb2u3m .bu3m .opid2u3m referend2u3m .fu3m parf2u3m .gu3m .hu3m .kuk2u3m .luk2u3m .lu3m vol2u3m .plu3m .stern2u3m .pu3m .ru3m .ser2u3m .gru3m .kvor2u3m .tru3m .stru3m .su3m .res2u3m kons2u3m opos2u3m .bit2u3m .kost2u3m .zu3m .vi4a vi5and vi5atik .vi2c1 .vi3ca. .vi3caj. .vi3cajn. .vi3can. .vi3ce. .vi3co. .vi3coj. .vi3cojn. .vi3con. .vi3c2ia .vi3c2io .vi2r1 vir2us vi1r2ulent 1a2fabl 1a2gra 1a2kr 1a2per 1a2va1r 4ologi 4ografi 2fik fre2m2d3l 4b1c 4b1b2 4b1d 4b1f 4b1g 4b1h4 4b1j2 4b1k 4b1m 4b1n 4b1p 4b1s 4b1s2k 4b1t 4b1v 4b1z 4b1ĉ 4b1Ä 4b1ĵ 4b1Å 4c1b 4c1c2 4c1ĉ 4c1d 4c1f 4c1g 4c1Ä 4c1h4 4c1j2 4c1ĵ 4c1k 4c1l 4c1m 4c1n 4c1p 4c1r 4c1s 4c1Å 4c1t 4c1v 4c1z 4ĉ1b 4ĉ1c 4ĉ1d 4ĉ1f 4ĉ1g 4ĉ1h4 4ĉ1j2 4ĉ1k 4ĉ1l 4ĉ1m 4ĉ1n 4ĉ1p 4ĉ1s 4ĉ1t 4ĉ1v 4ĉ1z 4ĉ1ĉ 4ĉ1Ä 4ĉ1ĵ 4ĉ1Å 4d1b 4d1c 4d1d2 4d1f 4d1g 4d1h4 4d1j2 4d1k 4d1l 4d1m 4d1n 4d1p 4d1s 4d1t 4d1v 4d1z 4d1ĉ 4d1Ä 4d1ĵ 4d1Å 1e2ben 1e2d2z 1e2gal 1e2le1g2an3t 4f1b 4f1c 4f1ĉ 4f1d 4f1f2 4f1g 4f1Ä 4f1h4 4f1j2 4f1ĵ 4f1k 4f1m 4f1n 4f1p 4f1s 4f1Å f1t 4f1v 4f1z 4g1b 4g1c 4g1ĉ g1d 4g1f 4g1g2 4g1Ä 4g1h4 4g1j2 4g1ĵ 4g1k g1m g1n 4g1p 4g1s 4g1Å 4g1t g1v 4g1z 4Ä1b 4Ä1c 4Ä1d 4Ä1f 4Ä1g 4Ä1h4 4Ä1j2 4Ä1k 4Ä1l 4Ä1m 4Ä1n 4Ä1p 4Ä1s 4Ä1t 4Ä1v 4Ä1z 4Ä1ĉ 4Ä1Ä 4Ä1ĵ 4Ä1Å 4h1ĉ 4h1Ä 4h1ĵ 4h1Å 4Ä¥1b 4Ä¥1c 4Ä¥1d 4Ä¥1f 4Ä¥1g 4Ä¥1h4 4Ä¥1j2 4Ä¥1k 4Ä¥1m 4Ä¥1n 4Ä¥1p 4Ä¥1s 4Ä¥1t 4Ä¥1v 4Ä¥1z 4Ä¥1ĉ 4Ä¥1Ä 4Ä¥1ĵ 4Ä¥1Å 1i2dent 4j1b 4j1c 4j1d 4j1f 4j1g 4j1h4 4j1k 4j1l 4j1m 4j1n 4j1p 4j1r 4j1s 4j1t 4j1v 4j1z 4j1ĉ 4j1Ä 4j1ĵ 4j1Å 4ĵ1b 4ĵ1c 4ĵ1d 4ĵ1f 4ĵ1g 4ĵ1h4 4ĵ1j2 4ĵ1k 4ĵ1l 4ĵ1m 4ĵ1n 4ĵ1p 4ĵ1s 4ĵ1t 4ĵ1v 4ĵ1z 4ĵ1ĉ 4ĵ1Ä 4ĵ1ĵ 4ĵ1Å 4k1b 4k1c 4k1d 4k1f 4k1g 4k1h4 4k1j2 4k1m 4k1n 4k1p 4k1s k1s2t2r 4k1t k1v 4k1z 4k1ĉ 4k1Ä 4k1ĵ 4k1Å 4l1b 4l1c 4l1d 4l1f 4l1g 4l1h4 4l1j2 4l1k 4l1l2 4l1m 4l1n 4l1p 4l1r 4l1s2 4l1t 4l1v 4l1z 4l1ĉ 4l1Ä 4l1ĵ 4l5Å2 4m1b 4m1c 4m1d 4m1f 4m1g 4m1h4 4m1j2 4m1k 4m1l 4m1m2 4m1n 4m1p 4m1r 4m1s 4m1t 4m1v 4m1z 4m1ĉ 4m1Ä 4m1ĵ 4m1Å mul2t1 mult2e mul2t3eg mul3ta mul3te. mul3to mul4t3obl 4n1b 4n1c 4n1d 4n1f 4n1g 4n1h4 4n1j 4n1k n2kv 4n1l n1m 4n1n 4n1p 4n1r 4n1s n1s2c n1s2t 4n1t 4n1v2 4n1z 4n1ĉ 4n1Ä 4n1ĵ 4n1Å n2k1c n2s1f nor2d1af nor2d1am nor2d1az nor2d1eÅ­ nor2d1rus nor2d1germ 1o2be 1o2kup 1o2por1tun 4p1b 4p1c 4p1d p1f 4p1g 4p1h4 p1j2 p1k p1m p1n p1s p1t 4p1v 4p1z 4p1ĉ 4p1Ä 4p1ĵ p1Å 4r1b 4r1c 4r1d 4r1f 4r1g 4r1h4 4r1j2 4r1k 4r1l 4r1m 4r1n 4r1p 4r1s 4r1t 4r1v 4r1z 4r1ĉ 4r1Ä 4r1ĵ 4r1Å s1b s1c 4s1ĉ 4s1d s1f s1g 4s1Ä 4s1h4 4s1j2 4s1ĵ s1k 4s1l 3s2lab 3s2lalom 3s2lang 3s2lav 3s2led 3s2lip 3s2lojd 3s2lovak 3s2loven 3s2lup 3s2lofoks 4s1m 3s2malt 3s2merald 3s2milak 3s2mirg 3s2mut 4s1n 3s2nob 3s2nuf s1p s1r 4s1s 4s1Å s1t 1s2tu1d s1v 4s1z .su2d1af .su2d1am .su2d1azi .su2d1eÅ­r .su2d1rus 4Å1b 4Å1c 4Å1d 4Å1f 4Å1g 4Å1h4 4Å1j2 4Å1k Å1m Å1n Å1p 4Å1s Å1t Å1v 4Å1z 4Å1ĉ 4Å1Ä 4Å1ĵ 4Å1Å 1Å2tel 4t1b 4t1c 4t1d 4t1f 4t1g 4t1h4 4t1j2 4t1k 4t1m 4t1n 4t1p 4t1s 4t1t 4t1v 4t1z 4t1ĉ 4t1Ä 4t1ĵ 4t1Å 4Å­1 Å­2s1k 4v1b 4v1c 4v1d 4v1f 4v1g 4v1h4 4v1j2 4v1k 4v1l 4v1m 4v1n 4v1p 4v1s 4v1t 4v1v 4v1z 4v1ĉ 4v1Ä 4v1ĵ 4v1Å 4z1b 4z1c 4z1d 4z1f 4z1g 4z1h4 4z1j2 4z1k 4z1l z2lot 4z1m 4z1n 4z1p 4z1r 4z1s 4z1t 4z1v 4z1ĉ 4z1Ä 4z1ĵ 4z1Å",
+ ["lefthyphenmin"]=1,
+ ["length"]=18238,
+ ["n"]=2203,
+ ["righthyphenmax"]=1,
+ },
+ ["version"]="1.001",
+} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/patterns/mkiv/lang-es.lua b/Master/texmf-dist/tex/context/patterns/mkiv/lang-es.lua
index 3c3cd9ef49f..c6d6c3aa29f 100644
--- a/Master/texmf-dist/tex/context/patterns/mkiv/lang-es.lua
+++ b/Master/texmf-dist/tex/context/patterns/mkiv/lang-es.lua
@@ -10,10 +10,10 @@ return {
},
["patterns"]={
["characters"]="abcdefghijklmnopqrstuvwxyzáéíñóú",
- ["data"]="1b 4b. .b2 2bb 2bc 2bd 2bf 2bg 2b1h 2bj 2bk 2bm 2bn 2bp 2bq 2bs 2bt 2bv 2bw 2bx 2by 2bz 1c 4c. .c2 2cb 2cc 2cd 2cf 2cg 2cj 2ck 2cm 2cn 2cp 2cq 2cs 2ct 2cv 2cw 2cx 2cy 2cz 1d 4d. .d2 2db 2dc 2dd 2df 2dg 2d1h 2dj 2dk 2dl 2dm 2dn 2dp 2dq 2ds 2dt 2dv 2dw 2dx 2dy 2dz 1f 4f. .f2 2fb 2fc 2fd 2ff 2fg 2f1h 2fj 2fk 2fm 2fn 2fp 2fq 2fs 2ft 2fv 2fw 2fx 2fy 2fz 1g 4g. .g2 2gb 2gc 2gd 2gf 2gg 2g1h 2gj 2gk 2gm 2gn 2gp 2gq 2gs 2gt 2gv 2gw 2gx 2gy 2gz 4h. 2hb 2hc 2hd 2hf 2hg 2h1h 2hj 2hk 2hl 2hm 2hn 2hp 2hq 2hr 2hs 2ht 2hv 2hw 2hx 2hy 2hz 1j 4j. .j2 2jb 2jc 2jd 2jf 2jg 2j1h 2jj 2jk 2jl 2jm 2jn 2jp 2jq 2jr 2js 2jt 2jv 2jw 2jx 2jy 2jz 1k 4k. .k2 2kb 2kc 2kd 2kf 2kg 2k1h 2kj 2kk 2km 2kn 2kp 2kq 2ks 2kt 2kv 2kw 2kx 2ky 2kz 1l 4l. .l2 2lb 2lc 2ld 2lf 2lg 2l1h 2lj 2lk 2lm 2ln 2lp 2lq 2lr 2ls 2lt 2lv 2lw 2lx 2ly 2lz 1m 4m. .m2 2mb 2mc 2md 2mf 2mg 2m1h 2mj 2mk 2ml 2mm 2mn 2mp 2mq 2mr 2ms 2mt 2mv 2mw 2mx 2my 2mz 1n 4n. .n2 2nb 2nc 2nd 2nf 2ng 2n1h 2nj 2nk 2nl 2nm 2nn 2np 2nq 2nr 2ns 2nt 2nv 2nw 2nx 2ny 2nz 1p 4p. .p2 2pb 2pc 2pd 2pf 2pg 2p1h 2pj 2pk 2pm 2pn 2pp 2pq 2ps 2pt 2pv 2pw 2px 2py 2pz 1q 4q. .q2 2qb 2qc 2qd 2qf 2qg 2q1h 2qj 2qk 2ql 2qm 2qn 2qp 2qq 2qr 2qs 2qt 2qv 2qw 2qx 2qy 2qz 1r 4r. .r2 2rb 2rc 2rd 2rf 2rg 2r1h 2rj 2rk 2rl 2rm 2rn 2rp 2rq 2rs 2rt 2rv 2rw 2rx 2ry 2rz 1s 4s. .s2 2sb 2sc 2sd 2sf 2sg 2s1h 2sj 2sk 2sl 2sm 2sn 2sp 2sq 2sr 2ss 2st 2sv 2sw 2sx 2sy 2sz 1t 4t. .t2 2tb 2tc 2td 2tf 2tg 2t1h 2tj 2tk 2tm 2tn 2tp 2tq 2tt 2tv 2tw 2ty 1v 4v. .v2 2vb 2vc 2vd 2vf 2vg 2v1h 2vj 2vk 2vm 2vn 2vp 2vq 2vs 2vt 2vv 2vw 2vx 2vy 2vz 1w 4w. .w2 2wb 2wc 2wd 2wf 2wg 2w1h 2wj 2wk 2wl 2wm 2wn 2wp 2wq 2wr 2ws 2wt 2wv 2ww 2wx 2wy 2wz 1x 4x. .x2 2xb 2xc 2xd 2xf 2xg 2x1h 2xj 2xk 2xl 2xm 2xn 2xp 2xq 2xr 2xs 2xt 2xv 2xw 2xx 2xy 2xz 1y 4y. .y2 2yb 2yc 2yd 2yf 2yg 2y1h 2yj 2yk 2yl 2ym 2yn 2yp 2yq 2yr 2ys 2yt 2yv 2yw 2yx 2yy 2yz 1z 4z. .z2 2zb 2zc 2zd 2zf 2zg 2z1h 2zj 2zk 2zl 2zm 2zn 2zp 2zq 2zr 2zs 2zt 2zv 2zw 2zx 2zy 2zz 1ñ 4ñ. c4h 4ch. 2chb 2chc 2chd 2chf 2chg 2chh 2chj 2chk ch2l 2chm 2chn 2chp 2chq ch2r 2chs 2cht 2chv 2chw 2chx 2chy 2chz l4l 4ll. 2llb 2llc 2lld 2llf 2llg 2llh 2llj 2llk 2lll 2llm 2lln 2llp 2llq 2llr 2lls 2llt 2llv 2llw 2llx 2lly 2llz b2l 4bl. 2bl2b 2bl2c 2bl2d 2bl2f 2bl2g 2bl2h 2bl2j 2bl2k 2bl2l 2bl2m 2bl2n 2bl2p 2bl2q 2bl2r 2bl2s 2bl2t 2bl2v 2bl2w 2bl2x 2bl2y 2bl2z c2l 4cl. 2cl2b 2cl2c 2cl2d 2cl2f 2cl2g 2cl2h 2cl2j 2cl2k 2cl2l 2cl2m 2cl2n 2cl2p 2cl2q 2cl2r 2cl2s 2cl2t 2cl2v 2cl2w 2cl2x 2cl2y 2cl2z f2l 4fl. 2fl2b 2fl2c 2fl2d 2fl2f 2fl2g 2fl2h 2fl2j 2fl2k 2fl2l 2fl2m 2fl2n 2fl2p 2fl2q 2fl2r 2fl2s 2fl2t 2fl2v 2fl2w 2fl2x 2fl2y 2fl2z g2l 4gl. 2gl2b 2gl2c 2gl2d 2gl2f 2gl2g 2gl2h 2gl2j 2gl2k 2gl2l 2gl2m 2gl2n 2gl2p 2gl2q 2gl2r 2gl2s 2gl2t 2gl2v 2gl2w 2gl2x 2gl2y 2gl2z k2l 4kl. 2kl2b 2kl2c 2kl2d 2kl2f 2kl2g 2kl2h 2kl2j 2kl2k 2kl2l 2kl2m 2kl2n 2kl2p 2kl2q 2kl2r 2kl2s 2kl2t 2kl2v 2kl2w 2kl2x 2kl2y 2kl2z p2l 4pl. 2pl2b 2pl2c 2pl2d 2pl2f 2pl2g 2pl2h 2pl2j 2pl2k 2pl2l 2pl2m 2pl2n 2pl2p 2pl2q 2pl2r 2pl2s 2pl2t 2pl2v 2pl2w 2pl2x 2pl2y 2pl2z v2l 4vl. 2vl2b 2vl2c 2vl2d 2vl2f 2vl2g 2vl2h 2vl2j 2vl2k 2vl2l 2vl2m 2vl2n 2vl2p 2vl2q 2vl2r 2vl2s 2vl2t 2vl2v 2vl2w 2vl2x 2vl2y 2vl2z b2r 4br. 2br2b 2br2c 2br2d 2br2f 2br2g 2br2h 2br2j 2br2k 2br2l 2br2m 2br2n 2br2p 2br2q 2br2r 2br2s 2br2t 2br2v 2br2w 2br2x 2br2y 2br2z c2r 4cr. 2cr2b 2cr2c 2cr2d 2cr2f 2cr2g 2cr2h 2cr2j 2cr2k 2cr2l 2cr2m 2cr2n 2cr2p 2cr2q 2cr2r 2cr2s 2cr2t 2cr2v 2cr2w 2cr2x 2cr2y 2cr2z d2r 4dr. 2dr2b 2dr2c 2dr2d 2dr2f 2dr2g 2dr2h 2dr2j 2dr2k 2dr2l 2dr2m 2dr2n 2dr2p 2dr2q 2dr2r 2dr2s 2dr2t 2dr2v 2dr2w 2dr2x 2dr2y 2dr2z f2r 4fr. 2fr2b 2fr2c 2fr2d 2fr2f 2fr2g 2fr2h 2fr2j 2fr2k 2fr2l 2fr2m 2fr2n 2fr2p 2fr2q 2fr2r 2fr2s 2fr2t 2fr2v 2fr2w 2fr2x 2fr2y 2fr2z g2r 4gr. 2gr2b 2gr2c 2gr2d 2gr2f 2gr2g 2gr2h 2gr2j 2gr2k 2gr2l 2gr2m 2gr2n 2gr2p 2gr2q 2gr2r 2gr2s 2gr2t 2gr2v 2gr2w 2gr2x 2gr2y 2gr2z k2r 4kr. 2kr2b 2kr2c 2kr2d 2kr2f 2kr2g 2kr2h 2kr2j 2kr2k 2kr2l 2kr2m 2kr2n 2kr2p 2kr2q 2kr2r 2kr2s 2kr2t 2kr2v 2kr2w 2kr2x 2kr2y 2kr2z p2r 4pr. 2pr2b 2pr2c 2pr2d 2pr2f 2pr2g 2pr2h 2pr2j 2pr2k 2pr2l 2pr2m 2pr2n 2pr2p 2pr2q 2pr2r 2pr2s 2pr2t 2pr2v 2pr2w 2pr2x 2pr2y 2pr2z r2r 4rr. 2rr2b 2rr2c 2rr2d 2rr2f 2rr2g 2rr2h 2rr2j 2rr2k 2rr2l 2rr2m 2rr2n 2rr2p 2rr2q 2rr2r 2rr2s 2rr2t 2rr2v 2rr2w 2rr2x 2rr2y 2rr2z t2r 4tr. 2tr2b 2tr2c 2tr2d 2tr2f 2tr2g 2tr2h 2tr2j 2tr2k 2tr2l 2tr2m 2tr2n 2tr2p 2tr2q 2tr2r 2tr2s 2tr2t 2tr2v 2tr2w 2tr2x 2tr2y 2tr2z v2r 4vr. 2vr2b 2vr2c 2vr2d 2vr2f 2vr2g 2vr2h 2vr2j 2vr2k 2vr2l 2vr2m 2vr2n 2vr2p 2vr2q 2vr2r 2vr2s 2vr2t 2vr2v 2vr2w 2vr2x 2vr2y 2vr2z 2b3p2t 2c3p2t 2d3p2t 2l3p2t 2m3p2t 2n3p2t 2r3p2t 2s3p2t 2t3p2t 2x3p2t 2y3p2t 4pt. 2b3c2t 2c3c2t 2d3c2t 2l3c2t 2m3c2t 2n3c2t 2r3c2t 2s3c2t 2t3c2t 2x3c2t 2y3c2t 4ct. 2b3c2n 2c3c2n 2d3c2n 2l3c2n 2m3c2n 2n3c2n 2r3c2n 2s3c2n 2t3c2n 2x3c2n 2y3c2n 4cn. 2b3p2s 2c3p2s 2d3p2s 2l3p2s 2m3p2s 2n3p2s 2r3p2s 2s3p2s 2t3p2s 2x3p2s 2y3p2s 4ps. 2b3m2n 2c3m2n 2d3m2n 2l3m2n 2m3m2n 2n3m2n 2r3m2n 2s3m2n 2t3m2n 2x3m2n 2y3m2n 4mn. 2b3g2n 2c3g2n 2d3g2n 2l3g2n 2m3g2n 2n3g2n 2r3g2n 2s3g2n 2t3g2n 2x3g2n 2y3g2n 4gn. 2b3f2t 2c3f2t 2d3f2t 2l3f2t 2m3f2t 2n3f2t 2r3f2t 2s3f2t 2t3f2t 2x3f2t 2y3f2t 4ft. 2b3p2n 2c3p2n 2d3p2n 2l3p2n 2m3p2n 2n3p2n 2r3p2n 2s3p2n 2t3p2n 2x3p2n 2y3p2n 4pn. 2b3c2z 2c3c2z 2d3c2z 2l3c2z 2m3c2z 2n3c2z 2r3c2z 2s3c2z 2t3c2z 2x3c2z 2y3c2z 4cz. 2b3t2z 2c3t2z 2d3t2z 2l3t2z 2m3t2z 2n3t2z 2r3t2z 2s3t2z 2t3t2z 2x3t2z 2y3t2z 4tz. 2b3t2s 2c3t2s 2d3t2s 2l3t2s 2m3t2s 2n3t2s 2r3t2s 2s3t2s 2t3t2s 2x3t2s 2y3t2s 4ts. san4c5t plan4c5t o1eu2 a1ae2 a1aó2 eo1á2 eo1e2 o1ae2 o1eó2 2no. 2t2l 2t2s 2t2x 2t2z tz3s4ch 4caca4 4cago4 4caga4 4cagas. 4teta. 4tetas. 4puta4 4puto4 .hu4mea .hu4meo .he4mee 4meo. 4meable. 4meables. 4pedo4 4culo4 5mente. 4i3go. 4es. 4és 4e. 4e3mos. 4éis. 4en. 4ía. 4ías. 4ía3mos. 4íais. 4ían. 4í. 4í4s3te. 4í4s3tes. 4í3tes. 4í3mos. 4ís3teis. 4e3ré. 4e3rás. 4e3rés. 4e3rís. 4e3rá. 4e3re3mos. 4e3réis. 4e3rán. 4i3ga. 4i3gas. 4i3gás. 4i3gamos. 4i3gáis. 4a4i3gan. 4e3ría. 4e3rías. 4e3ríamos. 4e3ríais. 4e3rían. 4i3gá3mosme. 4i3gá3mosmele. 4i3gá3mosmelo. 4i3gá3mos3mela. 4i3gá3mosmeles. 4i3gá3mosmelos. 4i3gá3mos3melas. 4i3gá3moste. 4i3gá3mostele. 4i3gá3mostelo. 4i3gá3mos3tela. 4i3gá3mosteles. 4i3gá3mostelos. 4i3gá3mos3telas. 4i3gá3mosle. 4i3gá3mosla. 4i3gá3moslo. 4i3gá3mosele. 4i3gá3moselo. 4i3gá3mosela. 4i3gá3moseles. 4i3gá3moselos. 4i3gá3moselas. 4i3gá3monos. 4i3gá3monosle. 4i3gá3monoslo. 4i3gá3monosla. 4i3gá3monosles. 4i3gá3monoslos. 4i3gá3monoslas. 4i3gá3moos. 4i3gá3moosle. 4i3gá3mooslo. 4i3gá3moosla. 4i3gá3moosles. 4i3gá3mooslos. 4i3gá3mooslas. 4i3gá3mosles. 4i3gá3moslas. 4i3gá3moslos. 4ed. 4é. 4edme. 4édmele. 4édmelo. 4éd3mela. 4édmeles. 4édmelos. 4éd3melas. 4edte. 4édtele. 4édtelo. 4éd3tela. 4édteles. 4édtelos. 4éd3telas. 4edle. 4eedla. 4edlo. 4édsele. 4édselo. 4édsela. 4édseles. 4édselos. 4édselas. 4ednos. 4édnosle. 4édnoslo. 4édnosla. 4édnosles. 4édnoslos. 4édnoslas. 4eos. 4éosle. 4éoslo. 4éosla. 4éosles. 4éoslos. 4éoslas. 4edles. 4edlas. 4edlos. 4er. 4erme. 4érmele. 4érmelo. 4ér3mela. 4érmeles. 4érmelos. 4ér3melas. 4erte. 4értele. 4értelo. 4ér3tela. 4érteles. 4értelos. 4ér3telas. 4erle. 4erla. 4erlo. 4erse. 4érsele. 4érselo. 4érsela. 4érseles. 4érselos. 4érselas. 4ernos. 4érnosle. 4érnoslo. 4érnosla. 4érnosles. 4érnoslos. 4érnoslas. 4e3ros. 4é3rosle. 4é3roslo. 4é3rosla. 4é3rosles. 4é3roslos. 4é3roslas. 4erles. 4erlas. 4erlos. 4í3do. 4í3da. 4í3dos. 4í3das. 4o. 4as. 4a. 4ás. 4a3mos. 4áis. 4an. 4aste. 4astes. 4ó. 4ates. 4asteis. 4a3ron. 4a3ba. 4a3bas. 4á3bamos. 4a3bais. 4a3ban. 4a3ría. 4a3rías. 4a3ríamos. 4a3ríais 4a3rían. 4a3ré. 4a3rás. 4a3rés. 4a3rís. 4a3rá. 4a3remos. 4a3réis. 4a3rán. 4a3ra. 4a3ras. 4á3ramos. 4a3rais. 4a3ran. 4a3re. 4a3res. 4á3remos. 4a3reis. 4a3ren. 4a3se. 4a3ses. 4á3semos. 4a3seis. 4a3sen. 4ad. e5r4as. e5r4a3mos. e5r4áis. e5r4an. e5r4aste. e5r4astes. e5r4ates. e5r4asteis. e5r4a3ron. e5r4a3ba. e5r4a3bas. e5r4á3bamos. e5r4a3bais. e5r4a3ban. e5r4a3ría. e5r4a3rías. e5r4a3ríamos. e5r4a3ríais e5r4a3rían. e5r4a3ré. e5r4a3rás. e5r4a3rés. e5r4a3rís. e5r4a3rá. e5r4a3remos. e5r4a3réis. e5r4a3rán. e5r4a3ra. e5r4a3ras. e5r4á3ramos. e5r4a3rais. e5r4a3ran. e5r4a3re. e5r4a3res. e5r4á3remos. e5r4a3reis. e5r4a3ren. e5r4a3se. e5r4a3ses. e5r4á3semos. e5r4a3seis. e5r4a3sen. e5r4ad. 4adme. 4ádmele. 4ádmelo. 4ád3mela. 4ádmeles. 4ádmelos. 4ád3melas. 4adte. 4ádtele. 4ádtelo. 4ád3tela. 4ádteles. 4ádtelos. 4ád3telas. 4adle. 4eadla. 4adlo. 4ádsele. 4ádselo. 4ádsela. 4ádseles. 4ádselos. 4ádselas. 4adnos. 4ádnosle. 4ádnoslo. 4ádnosla. 4ádnosles. 4ádnoslos. 4ádnoslas. 4aos. 4áosle. 4áoslo. 4áosla. 4áosles. 4áoslos. 4áoslas. 4adles. 4adlas. 4adlos. 4ar. 4a4rme. 4á4rmele. 4á4rmelo. 4á4r3mela. 4á4r3meles. 4á4r3melos. 4á4r3melas. 4a4r3te. 4á4r3tele. 4á4r3telo. 4á4r3tela. 4á4r3teles. 4á4r3telos. 4á4r3telas. 4a4r3le. 4a4r3la. 4a4r3lo. 4a4r3se. 4á4r3sele. 4á4r3selo. 4á4r3sela. 4á4r3seles. 4á4r3selos. 4á4r3selas. 4a4r3nos. 4á4r3nosle. 4á4r3noslo. 4á4r3nosla. 4á4r3nosles. 4á4r3noslos. 4á4r3noslas. 4a3ros. 4árosle. 4ároslo. 4árosla. 4árosles. 4ároslos. 4ároslas. 4a4r3les. 4a4r3las. 4a4r3los. 4a3do. 4a3da. 4a3dos. 4a3das. e5r4a3do. e5r4a3da. e5r4a3dos. e5r4a3das. 4ando 4ándole. 4ándolo. 4ándola. 4ándoles. 4ándolos. 4ándolas. 4ándonos. 4ándoos. 4ándome. 4ándomelo. 4ándomela. 4ándomele. 4ándomelos. 4ándomelas. 4ándomeles. 4ándote. 4ándoteme. 4ándotelo. 4ándotela. 4ándotele. 4ándotelos. 4ándotelas. 4ándoteles. 4ándotenos. 4ándose. 4ándoseme. 4ándoselo. 4ándosela. 4ándosele. 4ándoselos. 4ándoselas. 4ándoseles. 4ándosenos. 4a3dor. 4a3dora. 4a3dores. 4a3doras. e5r4a3dor. e5r4a3dora. e5r4a3dores. e5r4a3doras. acto1h acto1a2 acto1e2 acto1i2 acto1o2 acto1u2 acto1á2 acto1é2 acto1í2 acto1ó2 acto1ú2 aero1h aero1a2 aero1e2 aero1i2 aero1o2 aero1u2 aero1á2 aero1é2 aero1í2 aero1ó2 aero1ú2 afro1h afro1a2 afro1e2 afro1i2 afro1o2 afro1u2 afro1á2 afro1é2 afro1í2 afro1ó2 afro1ú2 .a2 .an2a2 .an2e2 .an2i2 .an2o2 .an2u2 .an2á2 .an2é2 .an2í2 .an2ó2 .an2ú2. ana3lí .aná3li .ana3li .an3aero .an3e2pigr .ane3xa .ane3xá .ane3xe .ane3xé .ane3xio .ane3xió .an3h .ani3mad .ani3mád .ani3dar .ani3ll .ani3m .aniña .ani3q .an3i2so .an3i2só .ani3vel .ano5che .ano5din .ano5mal .ano5nad .anó3nim .anó5mal .ano5nim .ano5ta .ano3tá .anua3l .anua4lm .anu3bl .anu3da .anu3l asu3b2 anfi1h anfi1a2 anfi1e2 anfi1i2 anfi1o2 anfi1u2 anfi1á2 anfi1é2 anfi1í2 anfi1ó2 anfi1ú2 anglo1h anglo1a2 anglo1e2 anglo1i2 anglo1o2 anglo1u2 anglo1á2 anglo1é2 anglo1í2 anglo1ó2 anglo1ú2 ante1h ante1a2 ante1e2 ante1i2 ante1o2 ante1u2 ante1á2 ante1é2 ante1í2 ante1ó2 ante1ú2 .ante2o3je acante2 4ísmo. 4ísmos. 4ísta. 4ístas. 4ístico. 4ísticos. 4ística. 4ísticas. pante4o3n .anteo3nes mante4a e4a3miento e4ándo tras3antea .anti1h .anti1a2 .anti1e2 .anti1i2 .anti1o2 .anti1u2 .anti1á2 .anti1é2 .anti1í2 .anti1ó2 .anti1ú2 ti2o3qu ti2o3co archi1h archi1a2 archi1e2 archi1i2 archi1o2 archi1u2 archi1á2 archi1é2 archi1í2 archi1ó2 archi1ú2 auto1h auto1a2 auto1e2 auto1i2 auto1o2 auto1u2 auto1á2 auto1é2 auto1í2 auto1ó2 auto1ú2 .bi1anual .bi1aur .bi1ox .bi1ó2x .bi1un biblio1h biblio1a2 biblio1e2 biblio1i2 biblio1o2 biblio1u2 biblio1á2 biblio1é2 biblio1í2 biblio1ó2 biblio1ú2 bien2 bien3h bien3v bien3q bien3m bien3t b4ien3do. .su3b4ien b4ien3das. .bie4n3and .bie4n3a4pa .bie4n3a4ve .bie4n3est .bie4n3int .bie4n3o4lie bio1h bio1a2 bio1e2 bio1i2 bio1o2 bio1u2 bio1á2 bio1é2 bio1í2 bio1ó2 bio1ú2 bi1u2ní cardio1h cardio1a2 cardio1e2 cardio1i2 cardio1o2 cardio1u2 cardio1á2 cardio1é2 cardio1í2 cardio1ó2 cardio1ú2 cefalo1h cefalo1a2 cefalo1e2 cefalo1i2 cefalo1o2 cefalo1u2 cefalo1á2 cefalo1é2 cefalo1í2 cefalo1ó2 cefalo1ú2 centi1h centi1a2 centi1e2 centi1i2 centi1o2 centi1u2 centi1á2 centi1é2 centi1í2 centi1ó2 centi1ú2 centi5área ciclo1h ciclo1a2 ciclo1e2 ciclo1i2 ciclo1o2 ciclo1u2 ciclo1á2 ciclo1é2 ciclo1í2 ciclo1ó2 ciclo1ú2 o4i3dea. o4i3deas. o4i3dal. o4i3dales. 4o2i3de. 4o2i3des. 4i2dal. 4i2dales. 4i3deo. 4i3deos. cito1h cito1a2 cito1e2 cito1i2 cito1o2 cito1u2 cito1á2 cito1é2 cito1í2 cito1ó2 cito1ú2 cnico1h cnico1a2 cnico1e2 cnico1i2 cnico1o2 cnico1u2 cnico1á2 cnico1é2 cnico1í2 cnico1ó2 cnico1ú2 .co2a2 .co2e2 .co2i2 .co3o4 .co2u2 .co2á2 .co2é2 .co2í2 .co2ó2 .co2ú2 .co3acree .coá3gul .co3agen .coa3gul .coa3lic .co3arrend .co3auto .co3edic .co3edit .co3educ .co3efici .coe3tá .co3exis .co3imput .coi3to .co4o3per .co4o3pér .co4orden .co4ordin .co4ordín .co4opt .co4ópt .co2nurb cripto1h cripto1a2 cripto1e2 cripto1i2 cripto1o2 cripto1u2 cripto1á2 cripto1é2 cripto1í2 cripto1ó2 cripto1ú2 crono1h crono1a2 crono1e2 crono1i2 crono1o2 crono1u2 crono1á2 crono1é2 crono1í2 crono1ó2 crono1ú2 contra1h contra1a2 contra1e2 contra1i2 contra1o2 contra1u2 contra1á2 contra1é2 contra1í2 contra1ó2 contra1ú2 deca1h deca1a2 deca1e2 deca1i2 deca1o2 deca1u2 deca1á2 deca1é2 deca1í2 deca1ó2 deca1ú2 4e3dro. 4e3dros. 4é3drico. 4é3dricos. 4é3drica. 4é3dricas. 4í3ble. 4í3bles. .de2sa2 .de2se2 .de2si2 .de2so2 .de2su2 .de2sá2 .de2sé2 .de2sí2 .de2só2 .de2sú2 deca2i3mient 3sa. 3sas. de2s3órde de2s3orde de2s3abast de2s3aboll de2s3aboto de2s3abr des4a3brid de2s3abroch de2s3aceit de2s3aceler desa3cert desa3ciert de2s3acobar de2s3acomod de2s3acomp de2s3acons de2s3acopl de2s3acorr de2s3acostum de2s3acot desa3craliz de2s3acredit de2s3activ de2s3acuart de2s3aderez de2s3adeud de2s3adorar de2s3adormec de2s3adorn de2s3advert de2s3aferr de2s3afic de2s3afil de2s3afin de2s3afor de2s3agu desa3gú desa3garr de2s3agraci de2s3agrad de2s3agravi de2s3agreg de2s3agrup des4a3guis de2s3aherr de2s3ahij de2s3ajust de2s3alagar de2s3alent de2s3alfom de2s3alfor de2s3alien de2s3a4line de2s3a4liné de2s3aliñ desa3liv de2s3alm de2s3almid de2s3aloj de2s3alquil de2s3alter de2s3alumbr desa3marr desa3mobl de2s3amold de2s3amort de2s3amuebl de2s3ampa de2s3and de2s3angel de3sangr de2s3anid de2s3anim de2s3aním de2s3anud desa3pañ desa3pacib de2s3apadr de2s3apare de2s3aparec de2s3aparic de2s3apeg de2s3apercib de2s3apes de2s3aplic de2s3apolill de2s3apoy de2s3aprend de2s3apret de2s3apriet de2s3aprob de2s3apropi de2s3aprovech de2s3arbol de2s3aren de2s3arm des4arme de2s3arraig de2s3arregl de2s3arrend de2s3arrim desa3rroll de2s3arrop de2s3arrug de2s3articul de2s3asent de2s3asist de2s3asn de2s3atenc de2s3atend de2s3atiend de2s3atent desa3tin de2s3atorn de2s3atranc de2s3autor de2s3avis desa3yun desa3zón desa3zon de2s3embal de2s3embál de2s3embar de2s3embár de2s3embarg de2s3embols de2s3emborr de2s3embosc de2s3embot de2s3embrag de2s3embrág de2s3embrave de2s3embráve de2s3embroll de2s3embróll de2s3embruj de2s3embrúj de3semej de2s3empañ de2s3empáñ de2s3empac de2s3empaquet de2s3empaquét de2s3emparej de2s3emparéj de2s3emparent de2s3empat de2s3empé de2s3empedr de2s3empeg de2s3empeor de2s3emperez de2s3empern de2s3emple de2s3empolv de2s3empotr de2s3empoz de2s3enam de2s3encab de2s3encad de2s3encaj de2s3encáj de2s3encall de2s3encáll de2s3encam de3sencant de2s3encap de2s3encar de2s3encár de2s3ench de2s3encl de2s3enco de2s3encr de2s3encu de2s3end de3senfad de3senfád de2s3enfi de2s3enfo de2s3enfó de3senfren de2s3enfund de2s3enfur de3sengañ de3sengáñ de2s3enganch de2s3engar de2s3engas de2s3engom de2s3engoz de2s3engra de2s3enhebr de2s3enj de2s3enlad de2s3enlaz de2s3enlo de2s3enm de2s3enr de2s3ens de2s3enta de3sentend de3sentien de3sentién de2s3enter de2s3entier de2s3entiér de2s3ento de2s3entr de2s3entu de2s3envain de3senvolvim de3seo de2s3eq de3s4erci de3s4ert de3s4ért de2s3espa de3sesperac de2s3esperanz de2s3estabil de2s3estim de3sider de3sidia de3sidio de3siert de3sign de3sigual de3silusi de2s3imagin de2s3iman de2s3impon de2s3impres de2s3incent de2s3inclin de2s3incorp de2s3incrust de3sinenc de3sinfec de3su3dar de3su3das de3su3dan de2s3inflam de2s3infl de2s3inform de2s3inhib de2s3insect de2s3instal ini3ci iní3ci de3s4integr de3s4inter de2s3intox de2s3inver de3sisten de3isti de2s3obedec de2s3oblig de2s3obstr de3socup de2s3odor de3solac de3solad de3soll de2s3orej de2s3orient de3sortij de2s3organi de3suell de3sonce de2s3ovi de2s3oxi de2s3oye de2s3oyé de3s4ubstan de3s4ustan de3s4oseg de2s3ub4ic de2s3unir de2s3unier de2s3unim .diecio2 ecano1h ecano1a2 ecano1e2 ecano1i2 ecano1o2 ecano1u2 ecano1á2 ecano1é2 ecano1í2 ecano1ó2 ecano1ú2 eco1h eco1a2 eco1e2 eco1i2 eco1o2 eco1u2 eco1á2 eco1é2 eco1í2 eco1ó2 eco1ú2 ectro1h ectro1a2 ectro1e2 ectro1i2 ectro1o2 ectro1u2 ectro1á2 ectro1é2 ectro1í2 ectro1ó2 ectro1ú2 .e2n2a2 .e2n2e2 .e2n2i2 .e2n2o2 .e2n2u2 .e2n2á2 .e2n2é2 .e2n2í2 .e2n2ó2 .e2n2ú2 .ene3mist .ene3míst .eno3jar .enu3mera .enu3merá .enu3mere .en3aceit .en3arb 4emboca 4o3lógico. 4o3lógica. 4o3lógicos. 4o3lógicas. 4o3lógicamente. 4o3logía. 4o3logías. 4ó3logo. 4ó3loga. 4ó3logos. 4ó3logas. endo1h endo1a2 endo1e2 endo1i2 endo1o2 endo1u2 endo1á2 endo1é2 endo1í2 endo1ó2 endo1ú2 ento1h ento1a2 ento1e2 ento1i2 ento1o2 ento1u2 ento1á2 ento1é2 ento1í2 ento1ó2 ento1ú2 entre1h entre1a2 entre1e2 entre1i2 entre1o2 entre1u2 entre1á2 entre1é2 entre1í2 entre1ó2 entre1ú2 euco1h euco1a2 euco1e2 euco1i2 euco1o2 euco1u2 euco1á2 euco1é2 euco1í2 euco1ó2 euco1ú2 euro1h euro1a2 euro1e2 euro1i2 euro1o2 euro1u2 euro1á2 euro1é2 euro1í2 euro1ó2 euro1ú2 .e2x2a2 .e2x2e2 .e2x2i2 .e2x2o2 .e2x2u2 .e2x2á2 .e2x2é2 .e2x2í2 .e2x2ó2 .e2x2ú2 3gono. 3gonos. 3gonal. 3gonales. exá3men exá3ri exé3ge exó3ti exa3cerb exa3ger exa3min exe3cr exe3géti exe3quia exi3ja exi3já exí3ja exi3ge exí3ge exi3gi exi3gí exi3jo exí3jo 3gua. 3guas. 3guo. 3guos. exi3lia exi3liá exí3lia exi3lie exi3lié exí3lie exi3lio exi3lió exí3lio exi3ma exi3má exí3ma exi3mi exi3mí exí3mi exi3me exi3mé exí3me exi3mo exi3mó exí3mo exi3tos exi3lar exo3ner exo3crin exo3tér exo3tic exo3tiq exo3tism exo3gami exo3gámi exu3ber exu3dar exu3dat exu3dac extra1h extra1a2 extra1e2 extra1i2 extra1o2 extra1u2 extra1á2 extra1é2 extra1í2 extra1ó2 extra1ú2 u4teri .cau5t .deu5t fono1h fono1a2 fono1e2 fono1i2 fono1o2 fono1u2 fono1á2 fono1é2 fono1í2 fono1ó2 fono1ú2 foto1h foto1a2 foto1e2 foto1i2 foto1o2 foto1u2 foto1á2 foto1é2 foto1í2 foto1ó2 foto1ú2 gastro1h gastro1a2 gastro1e2 gastro1i2 gastro1o2 gastro1u2 gastro1á2 gastro1é2 gastro1í2 gastro1ó2 gastro1ú2 geo1h geo1a2 geo1e2 geo1i2 geo1o2 geo1u2 geo1á2 geo1é2 geo1í2 geo1ó2 geo1ú2 giga1h giga1a2 giga1e2 giga1i2 giga1o2 giga1u2 giga1á2 giga1é2 giga1í2 giga1ó2 giga1ú2 gluco1h gluco1a2 gluco1e2 gluco1i2 gluco1o2 gluco1u2 gluco1á2 gluco1é2 gluco1í2 gluco1ó2 gluco1ú2 hecto1h hecto1a2 hecto1e2 hecto1i2 hecto1o2 hecto1u2 hecto1á2 hecto1é2 hecto1í2 hecto1ó2 hecto1ú2 helio1h helio1a2 helio1e2 helio1i2 helio1o2 helio1u2 helio1á2 helio1é2 helio1í2 helio1ó2 helio1ú2 hemato1h hemato1a2 hemato1e2 hemato1i2 hemato1o2 hemato1u2 hemato1á2 hemato1é2 hemato1í2 hemato1ó2 hemato1ú2 hemi1h hemi1a2 hemi1e2 hemi1i2 hemi1o2 hemi1u2 hemi1á2 hemi1é2 hemi1í2 hemi1ó2 hemi1ú2 hemo1h hemo1a2 hemo1e2 hemo1i2 hemo1o2 hemo1u2 hemo1á2 hemo1é2 hemo1í2 hemo1ó2 hemo1ú2 2al. 2ales. .hepta1e hexa1h hexa1a2 hexa1e2 hexa1i2 hexa1o2 hexa1u2 hexa1á2 hexa1é2 hexa1í2 hexa1ó2 hexa1ú2 hidro1h hidro1a2 hidro1e2 hidro1i2 hidro1o2 hidro1u2 hidro1á2 hidro1é2 hidro1í2 hidro1ó2 hidro1ú2 hipe2r3r hipe2r1a2 hipe2r1e2 hipe2r1i2 hipe2r1o2 hipe2r1u2 hipe2r1á2 hipe2r1é2 hipe2r1í2 hipe2r1ó2 hipe2r1ú2 pe3r4e3mia hipe3r4i3cíne hipe3r4o3nimi hipe3r4o3ními hipe3r4ó3nimo hipe3r4o3xia hipo1h hipo1a2 hipo1e2 hipo1i2 hipo1o2 hipo1u2 hipo1á2 hipo1é2 hipo1í2 hipo1ó2 hipo1ú2 spano1h spano1a2 spano1e2 spano1i2 spano1o2 spano1u2 spano1á2 spano1é2 spano1í2 spano1ó2 spano1ú2 histo1h histo1a2 histo1e2 histo1i2 histo1o2 histo1u2 histo1á2 histo1é2 histo1í2 histo1ó2 histo1ú2 homo1h homo1a2 homo1e2 homo1i2 homo1o2 homo1u2 homo1á2 homo1é2 homo1í2 homo1ó2 homo1ú2 ibero1h ibero1a2 ibero1e2 ibero1i2 ibero1o2 ibero1u2 ibero1á2 ibero1é2 ibero1í2 ibero1ó2 ibero1ú2 icono1h icono1a2 icono1e2 icono1i2 icono1o2 icono1u2 icono1á2 icono1é2 icono1í2 icono1ó2 icono1ú2 .i2n2a2 .i2n2e2 .i2n2i2 .i2n2o2 .i2n2u2 .i2n2á2 .i2n2é2 .i2n2í2 .i2n2ó2 .i2n2ú2 .in3abord .in3abarc .in3acent .in3aguant .in3adapt .ina3movib .in3analiz .ina3nic .in3anim .iná3nim .in3apel .in3aplic .in3aprens .in3apreci .in3arrug .in3asist .iné3dit .in3efic .in3efici .in3eludi .ine3narr ini3cia iní3cia ini3ciá ini3cie .rei3na re3ini3cia re3iní3cia re3ini3ciá re3ini3cie .ini3cuo .ini3cua .ino3cuo .ino3cua .ino3cula .ino3culá .ino3cule .inú3til .inu3tiliz infra1h infra1a2 infra1e2 infra1i2 infra1o2 infra1u2 infra1á2 infra1é2 infra1í2 infra1ó2 infra1ú2 .inte2r3r .inte2r1a2 .inte2r1e2 .inte2r1i2 .inte2r1o2 .inte2r1u2 .inte2r1á2 .inte2r1é2 .inte2r1í2 .inte2r1ó2 .inte2r1ú2 .in3ter2e3sa .in3ter2e3se .in3ter2e3so .in3ter2e3sá .in3ter2e3sé .in3ter2e3só .de3s4in3ter2e3sa .de3s4in3ter2e3se .de3s4in3ter2e3so .de3s4in3ter2e3sá .de3s4in3ter2e3sé .de3s4in3ter2e3só 4n3te3ri3n 4n4te4r5i4nsu .in3te3r4rog .in3te3r4rupc .in3te3r4rupt .in3te3r4rump inter4és inte3r4esar inte4r4i4n4 inter5ins5t inte5r4regno inte3r4ior4 4i4ano. 4i4ana. 4i4anos. 4i4anas. intra1h intra1a2 intra1e2 intra1i2 intra1o2 intra1u2 intra1á2 intra1é2 intra1í2 intra1ó2 intra1ú2 iso1h iso1a2 iso1e2 iso1i2 iso1o2 iso1u2 iso1á2 iso1é2 iso1í2 iso1ó2 iso1ú2 kilo1h kilo1a2 kilo1e2 kilo1i2 kilo1o2 kilo1u2 kilo1á2 kilo1é2 kilo1í2 kilo1ó2 kilo1ú2 macro1h macro1a2 macro1e2 macro1i2 macro1o2 macro1u2 macro1á2 macro1é2 macro1í2 macro1ó2 macro1ú2 mal2 ma4l3h .ma4l3e4du mal3b mal3c mal3d mal3f mal3g mal3m mal3p mal3q mal3s mal3t mal3v .mal1acon .mal1acos .mala1e .mal1andant .mal1andanz .mal1est .mal1int maxi1h maxi1a2 maxi1e2 maxi1i2 maxi1o2 maxi1u2 maxi1á2 maxi1é2 maxi1í2 maxi1ó2 maxi1ú2 megalo1h megalo1a2 megalo1e2 megalo1i2 megalo1o2 megalo1u2 megalo1á2 megalo1é2 megalo1í2 megalo1ó2 megalo1ú2 mega1h mega1a2 mega1e2 mega1i2 mega1o2 mega1u2 mega1á2 mega1é2 mega1í2 mega1ó2 mega1ú2 melano1h melano1a2 melano1e2 melano1i2 melano1o2 melano1u2 melano1á2 melano1é2 melano1í2 melano1ó2 melano1ú2 micro1h micro1a2 micro1e2 micro1i2 micro1o2 micro1u2 micro1á2 micro1é2 micro1í2 micro1ó2 micro1ú2 .mili1h .mili1a2 .mili1e2 .mili1i2 .mili1o2 .mili1u2 .mili1á2 .mili1é2 .mili1í2 .mili1ó2 .mili1ú2 familia3ri ia5res. amili6a a3rio a3ria li5área mili4ar mini1h mini1a2 mini1e2 mini1i2 mini1o2 mini1u2 mini1á2 mini1é2 mini1í2 mini1ó2 mini1ú2 2os. 2o3so. 2o3sos. 2o3sa. 2o3sas. 2o3samente. mini4a5tur multi1h multi1a2 multi1e2 multi1i2 multi1o2 multi1u2 multi1á2 multi1é2 multi1í2 multi1ó2 multi1ú2 miria1h miria1a2 miria1e2 miria1i2 miria1o2 miria1u2 miria1á2 miria1é2 miria1í2 miria1ó2 miria1ú2 mono1h mono1a2 mono1e2 mono1i2 mono1o2 mono1u2 mono1á2 mono1é2 mono1í2 mono1ó2 mono1ú2 2i3co. 2i3cos. 2i3ca. 2i3cas. namo1h namo1a2 namo1e2 namo1i2 namo1o2 namo1u2 namo1á2 namo1é2 namo1í2 namo1ó2 namo1ú2 necro1h necro1a2 necro1e2 necro1i2 necro1o2 necro1u2 necro1á2 necro1é2 necro1í2 necro1ó2 necro1ú2 neo1h neo1a2 neo1e2 neo1i2 neo1o2 neo1u2 neo1á2 neo1é2 neo1í2 neo1ó2 neo1ú2 3c2neor neto1h neto1a2 neto1e2 neto1i2 neto1o2 neto1u2 neto1á2 neto1é2 neto1í2 neto1ó2 neto1ú2 norte1h norte1a2 norte1e2 norte1i2 norte1o2 norte1u2 norte1á2 norte1é2 norte1í2 norte1ó2 norte1ú2 octo1h octo1a2 octo1e2 octo1i2 octo1o2 octo1u2 octo1á2 octo1é2 octo1í2 octo1ó2 octo1ú2 octa1h octa1a2 octa1e2 octa1i2 octa1o2 octa1u2 octa1á2 octa1é2 octa1í2 octa1ó2 octa1ú2 oligo1h oligo1a2 oligo1e2 oligo1i2 oligo1o2 oligo1u2 oligo1á2 oligo1é2 oligo1í2 oligo1ó2 oligo1ú2 omni1h omni1a2 omni1e2 omni1i2 omni1o2 omni1u2 omni1á2 omni1é2 omni1í2 omni1ó2 omni1ú2 i2o. i2os. paleo1h paleo1a2 paleo1e2 paleo1i2 paleo1o2 paleo1u2 paleo1á2 paleo1é2 paleo1í2 paleo1ó2 paleo1ú2 .pa4n1a4meri .pa4n1europ .pa4n1afri .pa4n1hisp .pa4n1ópti para1h para1a2 para1e2 para1i2 para1o2 para1u2 para1á2 para1é2 para1í2 para1ó2 para1ú2 para2is. aí5so. aí5sos. para4íso para4ulata penta1h penta1a2 penta1e2 penta1i2 penta1o2 penta1u2 penta1á2 penta1é2 penta1í2 penta1ó2 penta1ú2 piezo1h piezo1a2 piezo1e2 piezo1i2 piezo1o2 piezo1u2 piezo1á2 piezo1é2 piezo1í2 piezo1ó2 piezo1ú2 pluri1h pluri1a2 pluri1e2 pluri1i2 pluri1o2 pluri1u2 pluri1á2 pluri1é2 pluri1í2 pluri1ó2 pluri1ú2 poli1h poli1a2 poli1e2 poli1i2 poli1o2 poli1u2 poli1á2 poli1é2 poli1í2 poli1ó2 poli1ú2 poli4u3r poli4o5mie poli4arq poli4árq poli4éste poli4andr poli4antea poli4arca expoli4 .pos2t2a2 .pos2t2e2 .pos2t2i2 .pos2t2o2 .pos2t2u2 .pos2t2á2 .pos2t2é2 .pos2t2í2 .pos2t2ó2 .pos2t2ú2 .pos3tin .pos3tín pos3ta. pos3tas. s3te. s3tes. s3tal. s3ta3les. s3ti3lla. s3ti3llas. s3ti3llón. s3ti3llones. s3tor. s3tora. s3toras. s3tores. .pos3tó3ni .pos3terg .pos3te3ri .pos3ti3go .pos3ti3la .pos3ti3ne .pos3ti3za .pos3ti3zo .pos3tu3ra .pos3tu3la .pos3tu3lá .pos3tu3le .pos3tu3lé .post3elec .post3impr .post3ind .post3ope .pos2t3rev .pos2t3rom .pre2a2 .pre2e2 .pre2i2 .pre2o2 .pre2u2 .pre2á2 .pre2é2 .pre2í2 .pre2ó2 .pre2ú2 .pre1h2 pre3elij pre3elig pre3exis pre3emin preo3cup preo2cúp pre3olí pre3opin .pro2a2 .pro2e2 .pro2i2 .pro2o2 .pro2u2 .pro2á2 .pro2é2 .pro2í2 .pro2ó2 .pro2ú2 .pro3abort proto1h proto1a2 proto1e2 proto1i2 proto1o2 proto1u2 proto1á2 proto1é2 proto1í2 proto1ó2 proto1ú2 psico1h psico1a2 psico1e2 psico1i2 psico1o2 psico1u2 psico1á2 psico1é2 psico1í2 psico1ó2 psico1ú2 3p2sic 3p2siq quete1h quete1a2 quete1e2 quete1i2 quete1o2 quete1u2 quete1á2 quete1é2 quete1í2 quete1ó2 quete1ú2 radio1h radio1a2 radio1e2 radio1i2 radio1o2 radio1u2 radio1á2 radio1é2 radio1í2 radio1ó2 radio1ú2 ranco1h ranco1a2 ranco1e2 ranco1i2 ranco1o2 ranco1u2 ranco1á2 ranco1é2 ranco1í2 ranco1ó2 ranco1ú2 .re2a2 .re3e4 .re2i2 .re2o2 .re2u2 .re2á2 .re2é2 .re2í2 .re2ó2 .re2ú2 ea3cio. ea3cios. ea3cia. ea3cias. .re3abr .re3ábr .re3afirm .re3afírm .re3ajust .rea3júst .rea3liza .rea3lizá .rea3líza .re3alim .rea3lism .rea3list .re3anim .re3aním .re3aparec .re3ubica .re3ubíca .reu3mati .reu3máti .re3unir .re3unír .re3usar .re3usár .re3utiliz .re3utilíz .re3a2eg .re3a2q .re3a2z .re3a2grup .re3i2m .re3inc .re3ing .re3ins .re3int .re3o2b .re3oc .re3oj .re3orga .re3unt rmano1h rmano1a2 rmano1e2 rmano1i2 rmano1o2 rmano1u2 rmano1á2 rmano1é2 rmano1í2 rmano1ó2 rmano1ú2 retro1h retro1a2 retro1e2 retro1i2 retro1o2 retro1u2 retro1á2 retro1é2 retro1í2 retro1ó2 retro1ú2 romo1h romo1a2 romo1e2 romo1i2 romo1o2 romo1u2 romo1á2 romo1é2 romo1í2 romo1ó2 romo1ú2 semi1h semi1a2 semi1e2 semi1i2 semi1o2 semi1u2 semi1á2 semi1é2 semi1í2 semi1ó2 semi1ú2 i2a. i2as. 2ótic emi2o2 2seudo1h 2seudo1a2 2seudo1e2 2seudo1i2 2seudo1o2 2seudo1u2 2seudo1á2 2seudo1é2 2seudo1í2 2seudo1ó2 2seudo1ú2 o2os. .so3a4s sobre1h sobre1a2 sobre1e2 sobre1i2 sobre1o2 sobre1u2 sobre1á2 sobre1é2 sobre1í2 sobre1ó2 sobre1ú2 socio1h socio1a2 socio1e2 socio1i2 socio1o2 socio1u2 socio1á2 socio1é2 socio1í2 socio1ó2 socio1ú2 a3rio. a3rios. 3logía 4ón. 4ones. 4i4er. 4o2ico. 4o2icos. 4o2ica. 4o2icas. .su2b2a2 .su2b2e2 .su2b2i2 .su2b2o2 .su2b2u2 .su2b2á2 .su2b2é2 .su2b2í2 .su2b2ó2 .su2b2ú2 .sub2i3ll .sub2i3mien .sub3índ .sub3ími .su4b3ray .sub3aflue .sub3arr .sub3enten .sub3estim .sub3estím .sub3ofici .sub3urba .sub3alter .sub3insp .su3bién .su3bir .su3bam .su3bordin .su3bordín .sub3acuá .sub3espe .sub3esta .su3burbi .su4b5rein .su2d1a2fr .su2d1a2me .su2d1este su4d3oes .su2r1a2me .su2r1est .su2r1oes supe2r3r supe2r1a2 supe2r1e2 supe2r1i2 supe2r1o2 supe2r1u2 supe2r1á2 supe2r1é2 supe2r1í2 supe2r1ó2 supe2r1ú2 ra5ra ra5rá ra5re ra5ré ra5rí ra5ro supe3r4a4r supe3r4á4r supe3r4á3vit. supe3r4á3vits. super4ior 4a3ción. 4a3ciones. 4e3rior. 4e3riores. 4e3riora. 4e3rioras. 4e3riormente. 4e3rioridad. 4e3rioridades. 4e3r4a3ble. 4e3r4a3bles. 4e3r4a3blemente. pe5r4ante perpon5d6r supra1h supra1a2 supra1e2 supra1i2 supra1o2 supra1u2 supra1á2 supra1é2 supra1í2 supra1ó2 supra1ú2 sup6ra talmo1h talmo1a2 talmo1e2 talmo1i2 talmo1o2 talmo1u2 talmo1á2 talmo1é2 talmo1í2 talmo1ó2 talmo1ú2 tele1h tele1a2 tele1e2 tele1i2 tele1o2 tele1u2 tele1á2 tele1é2 tele1í2 tele1ó2 tele1ú2 4ósteo. 4ósteos. .tele1imp .tele1obj .tele4o3lót termo1h termo1a2 termo1e2 termo1i2 termo1o2 termo1u2 termo1á2 termo1é2 termo1í2 termo1ó2 termo1ú2 tetra1h tetra1a2 tetra1e2 tetra1i2 tetra1o2 tetra1u2 tetra1á2 tetra1é2 tetra1í2 tetra1ó2 tetra1ú2 topo1h topo1a2 topo1e2 topo1i2 topo1o2 topo1u2 topo1á2 topo1é2 topo1í2 topo1ó2 topo1ú2 .tra2sa2 .tra2se2 .tra2si2 .tra2so2 .tra2su2 .tra2sá2 .tra2sé2 .tra2sí2 .tra2só2 .tra2sú2 .tra3s2o3ñ tran2sa2 tran2se2 tran2si2 tran2so2 tran2su2 tran2sá2 tran2sé2 tran2sí2 tran2só2 tran2sú2 tran2s1alp tran2s1and tran2s1atl tran2s1oce tran2s1ur tran3sacci tran3seún tran3se3xu tran3si3cion tran3si3ción tran3si3gi tran3si3gí tran3si3ge tran3si3ja tran3si3já tran3si3jo tran3sisto tran3si3ta tran3si3tá tran3si3te tran3si3té tran3si3to tran3si3tó tran3si3tiv tran3si3tori tran3subst tran3sust .tri1ó2x tropo1h tropo1a2 tropo1e2 tropo1i2 tropo1o2 tropo1u2 tropo1á2 tropo1é2 tropo1í2 tropo1ó2 tropo1ú2 ultra1h ultra1a2 ultra1e2 ultra1i2 ultra1o2 ultra1u2 ultra1á2 ultra1é2 ultra1í2 ultra1ó2 ultra1ú2 vice1h vice1a2 vice1e2 vice1i2 vice1o2 vice1u2 vice1á2 vice1é2 vice1í2 vice1ó2 vice1ú2 video1h video1a2 video1e2 video1i2 video1o2 video1u2 video1á2 video1é2 video1í2 video1ó2 video1ú2 xeno1h xeno1a2 xeno1e2 xeno1i2 xeno1o2 xeno1u2 xeno1á2 xeno1é2 xeno1í2 xeno1ó2 xeno1ú2 zoo1h zoo1a2 zoo1e2 zoo1i2 zoo1o2 zoo1u2 zoo1á2 zoo1é2 zoo1í2 zoo1ó2 zoo1ú2 wa3s4h 3hablante 3habiente 3aficionad",
+ ["data"]="1b 4b. .b2 2bb 2bc 2bd 2bf 2bg 2bh 2bj 2bk 2bm 2bn 2bp 2bq 2bs 2bt 2bv 2bw 2bx 2by 2bz 1c 4c. .c2 2cb 2cc 2cd 2cf 2cg 2cj 2ck 2cm 2cn 2cp 2cq 2cs 2ct 2cv 2cw 2cx 2cy 2cz 1d 4d. .d2 2db 2dc 2dd 2df 2dg 2dh 2dj 2dk 2dl 2dm 2dn 2dp 2dq 2ds 2dt 2dv 2dw 2dx 2dy 2dz 1f 4f. .f2 2fb 2fc 2fd 2ff 2fg 2fh 2fj 2fk 2fm 2fn 2fp 2fq 2fs 2ft 2fv 2fw 2fx 2fy 2fz 1g 4g. .g2 2gb 2gc 2gd 2gf 2gg 2gh 2gj 2gk 2gm 2gn 2gp 2gq 2gs 2gt 2gv 2gw 2gx 2gy 2gz 4h. 2hb 2hc 2hd 2hf 2hg 2hh 2hj 2hk 2hl 2hm 2hn 2hp 2hq 2hr 2hs 2ht 2hv 2hw 2hx 2hy 2hz 1j 4j. .j2 2jb 2jc 2jd 2jf 2jg 2jh 2jj 2jk 2jl 2jm 2jn 2jp 2jq 2jr 2js 2jt 2jv 2jw 2jx 2jy 2jz 1k 4k. .k2 2kb 2kc 2kd 2kf 2kg 2kh 2kj 2kk 2km 2kn 2kp 2kq 2ks 2kt 2kv 2kw 2kx 2ky 2kz 1l 4l. .l2 2lb 2lc 2ld 2lf 2lg 2lh 2lj 2lk 2lm 2ln 2lp 2lq 2lr 2ls 2lt 2lv 2lw 2lx 2ly 2lz 1m 4m. .m2 2mb 2mc 2md 2mf 2mg 2mh 2mj 2mk 2ml 2mm 2mn 2mp 2mq 2mr 2ms 2mt 2mv 2mw 2mx 2my 2mz 1n 4n. .n2 2nb 2nc 2nd 2nf 2ng 2nh 2nj 2nk 2nl 2nm 2nn 2np 2nq 2nr 2ns 2nt 2nv 2nw 2nx 2ny 2nz 1p 4p. .p2 2pb 2pc 2pd 2pf 2pg 2ph 2pj 2pk 2pm 2pn 2pp 2pq 2ps 2pt 2pv 2pw 2px 2py 2pz 1q 4q. .q2 2qb 2qc 2qd 2qf 2qg 2qh 2qj 2qk 2ql 2qm 2qn 2qp 2qq 2qr 2qs 2qt 2qv 2qw 2qx 2qy 2qz 1r 4r. .r2 2rb 2rc 2rd 2rf 2rg 2rh 2rj 2rk 2rl 2rm 2rn 2rp 2rq 2rs 2rt 2rv 2rw 2rx 2ry 2rz 1s 4s. .s2 2sb 2sc 2sd 2sf 2sg 2sh 2sj 2sk 2sl 2sm 2sn 2sp 2sq 2sr 2ss 2st 2sv 2sw 2sx 2sy 2sz 1t 4t. .t2 2tb 2tc 2td 2tf 2tg 2th 2tj 2tk 2tm 2tn 2tp 2tq 2tt 2tv 2tw 2ty 1v 4v. .v2 2vb 2vc 2vd 2vf 2vg 2vh 2vj 2vk 2vm 2vn 2vp 2vq 2vs 2vt 2vv 2vw 2vx 2vy 2vz 1w 4w. .w2 2wb 2wc 2wd 2wf 2wg 2wh 2wj 2wk 2wl 2wm 2wn 2wp 2wq 2wr 2ws 2wt 2wv 2ww 2wx 2wy 2wz 1x 4x. .x2 2xb 2xc 2xd 2xf 2xg 2xh 2xj 2xk 2xl 2xm 2xn 2xp 2xq 2xr 2xs 2xt 2xv 2xw 2xx 2xy 2xz 1y 4y. .y2 2yb 2yc 2yd 2yf 2yg 2yh 2yj 2yk 2yl 2ym 2yn 2yp 2yq 2yr 2ys 2yt 2yv 2yw 2yx 2yy 2yz 1z 4z. .z2 2zb 2zc 2zd 2zf 2zg 2zh 2zj 2zk 2zl 2zm 2zn 2zp 2zq 2zr 2zs 2zt 2zv 2zw 2zx 2zy 2zz 1ñ 4ñ. c4h 4ch. 2chb 2chc 2chd 2chf 2chg 2chh 2chj 2chk ch2l 2chm 2chn 2chp 2chq ch2r 2chs 2cht 2chv 2chw 2chx 2chy 2chz l4l 4ll. 2llb 2llc 2lld 2llf 2llg 2llh 2llj 2llk 2lll 2llm 2lln 2llp 2llq 2llr 2lls 2llt 2llv 2llw 2llx 2lly 2llz b2l 4bl. 2bl2b 2bl2c 2bl2d 2bl2f 2bl2g 2bl2h 2bl2j 2bl2k 2bl2l 2bl2m 2bl2n 2bl2p 2bl2q 2bl2r 2bl2s 2bl2t 2bl2v 2bl2w 2bl2x 2bl2y 2bl2z c2l 4cl. 2cl2b 2cl2c 2cl2d 2cl2f 2cl2g 2cl2h 2cl2j 2cl2k 2cl2l 2cl2m 2cl2n 2cl2p 2cl2q 2cl2r 2cl2s 2cl2t 2cl2v 2cl2w 2cl2x 2cl2y 2cl2z f2l 4fl. 2fl2b 2fl2c 2fl2d 2fl2f 2fl2g 2fl2h 2fl2j 2fl2k 2fl2l 2fl2m 2fl2n 2fl2p 2fl2q 2fl2r 2fl2s 2fl2t 2fl2v 2fl2w 2fl2x 2fl2y 2fl2z g2l 4gl. 2gl2b 2gl2c 2gl2d 2gl2f 2gl2g 2gl2h 2gl2j 2gl2k 2gl2l 2gl2m 2gl2n 2gl2p 2gl2q 2gl2r 2gl2s 2gl2t 2gl2v 2gl2w 2gl2x 2gl2y 2gl2z k2l 4kl. 2kl2b 2kl2c 2kl2d 2kl2f 2kl2g 2kl2h 2kl2j 2kl2k 2kl2l 2kl2m 2kl2n 2kl2p 2kl2q 2kl2r 2kl2s 2kl2t 2kl2v 2kl2w 2kl2x 2kl2y 2kl2z p2l 4pl. 2pl2b 2pl2c 2pl2d 2pl2f 2pl2g 2pl2h 2pl2j 2pl2k 2pl2l 2pl2m 2pl2n 2pl2p 2pl2q 2pl2r 2pl2s 2pl2t 2pl2v 2pl2w 2pl2x 2pl2y 2pl2z v2l 4vl. 2vl2b 2vl2c 2vl2d 2vl2f 2vl2g 2vl2h 2vl2j 2vl2k 2vl2l 2vl2m 2vl2n 2vl2p 2vl2q 2vl2r 2vl2s 2vl2t 2vl2v 2vl2w 2vl2x 2vl2y 2vl2z b2r 4br. 2br2b 2br2c 2br2d 2br2f 2br2g 2br2h 2br2j 2br2k 2br2l 2br2m 2br2n 2br2p 2br2q 2br2r 2br2s 2br2t 2br2v 2br2w 2br2x 2br2y 2br2z c2r 4cr. 2cr2b 2cr2c 2cr2d 2cr2f 2cr2g 2cr2h 2cr2j 2cr2k 2cr2l 2cr2m 2cr2n 2cr2p 2cr2q 2cr2r 2cr2s 2cr2t 2cr2v 2cr2w 2cr2x 2cr2y 2cr2z d2r 4dr. 2dr2b 2dr2c 2dr2d 2dr2f 2dr2g 2dr2h 2dr2j 2dr2k 2dr2l 2dr2m 2dr2n 2dr2p 2dr2q 2dr2r 2dr2s 2dr2t 2dr2v 2dr2w 2dr2x 2dr2y 2dr2z f2r 4fr. 2fr2b 2fr2c 2fr2d 2fr2f 2fr2g 2fr2h 2fr2j 2fr2k 2fr2l 2fr2m 2fr2n 2fr2p 2fr2q 2fr2r 2fr2s 2fr2t 2fr2v 2fr2w 2fr2x 2fr2y 2fr2z g2r 4gr. 2gr2b 2gr2c 2gr2d 2gr2f 2gr2g 2gr2h 2gr2j 2gr2k 2gr2l 2gr2m 2gr2n 2gr2p 2gr2q 2gr2r 2gr2s 2gr2t 2gr2v 2gr2w 2gr2x 2gr2y 2gr2z k2r 4kr. 2kr2b 2kr2c 2kr2d 2kr2f 2kr2g 2kr2h 2kr2j 2kr2k 2kr2l 2kr2m 2kr2n 2kr2p 2kr2q 2kr2r 2kr2s 2kr2t 2kr2v 2kr2w 2kr2x 2kr2y 2kr2z p2r 4pr. 2pr2b 2pr2c 2pr2d 2pr2f 2pr2g 2pr2h 2pr2j 2pr2k 2pr2l 2pr2m 2pr2n 2pr2p 2pr2q 2pr2r 2pr2s 2pr2t 2pr2v 2pr2w 2pr2x 2pr2y 2pr2z r2r 4rr. 2rr2b 2rr2c 2rr2d 2rr2f 2rr2g 2rr2h 2rr2j 2rr2k 2rr2l 2rr2m 2rr2n 2rr2p 2rr2q 2rr2r 2rr2s 2rr2t 2rr2v 2rr2w 2rr2x 2rr2y 2rr2z t2r 4tr. 2tr2b 2tr2c 2tr2d 2tr2f 2tr2g 2tr2h 2tr2j 2tr2k 2tr2l 2tr2m 2tr2n 2tr2p 2tr2q 2tr2r 2tr2s 2tr2t 2tr2v 2tr2w 2tr2x 2tr2y 2tr2z v2r 4vr. 2vr2b 2vr2c 2vr2d 2vr2f 2vr2g 2vr2h 2vr2j 2vr2k 2vr2l 2vr2m 2vr2n 2vr2p 2vr2q 2vr2r 2vr2s 2vr2t 2vr2v 2vr2w 2vr2x 2vr2y 2vr2z 2b3p2t 2c3p2t 2d3p2t 2l3p2t 2m3p2t 2n3p2t 2r3p2t 2s3p2t 2t3p2t 2x3p2t 2y3p2t 4pt. 2b3c2t 2c3c2t 2d3c2t 2l3c2t 2m3c2t 2n3c2t 2r3c2t 2s3c2t 2t3c2t 2x3c2t 2y3c2t 4ct. 2b3c2n 2c3c2n 2d3c2n 2l3c2n 2m3c2n 2n3c2n 2r3c2n 2s3c2n 2t3c2n 2x3c2n 2y3c2n 4cn. 2b3p2s 2c3p2s 2d3p2s 2l3p2s 2m3p2s 2n3p2s 2r3p2s 2s3p2s 2t3p2s 2x3p2s 2y3p2s 4ps. 2b3m2n 2c3m2n 2d3m2n 2l3m2n 2m3m2n 2n3m2n 2r3m2n 2s3m2n 2t3m2n 2x3m2n 2y3m2n 4mn. 2b3g2n 2c3g2n 2d3g2n 2l3g2n 2m3g2n 2n3g2n 2r3g2n 2s3g2n 2t3g2n 2x3g2n 2y3g2n 4gn. 2b3f2t 2c3f2t 2d3f2t 2l3f2t 2m3f2t 2n3f2t 2r3f2t 2s3f2t 2t3f2t 2x3f2t 2y3f2t 4ft. 2b3p2n 2c3p2n 2d3p2n 2l3p2n 2m3p2n 2n3p2n 2r3p2n 2s3p2n 2t3p2n 2x3p2n 2y3p2n 4pn. 2b3c2z 2c3c2z 2d3c2z 2l3c2z 2m3c2z 2n3c2z 2r3c2z 2s3c2z 2t3c2z 2x3c2z 2y3c2z 4cz. 2b3t2z 2c3t2z 2d3t2z 2l3t2z 2m3t2z 2n3t2z 2r3t2z 2s3t2z 2t3t2z 2x3t2z 2y3t2z 4tz. 2b3t2s 2c3t2s 2d3t2s 2l3t2s 2m3t2s 2n3t2s 2r3t2s 2s3t2s 2t3t2s 2x3t2s 2y3t2s 4ts. san4c5t plan4c5t com4p3t prom4p3t o1eu2 a1ae2 a1aó2 eo1á2 eo1e2 o1ae2 o1eó2 2no. 2t2l 2t2s 2t2x 2t2z tz3s4ch 4caca4 4cago4 4caga4 4cagas. 4teta. 4tetas. 4puta4 4puto4 .hu4mea .hu4meo .he4mee 4meo. 4meable. 4meables. 4pedo4 4culo4 5mente. 4i3go. 4es. 4és 4e. 4e3mos. 4éis. 4en. 4ía. 4ías. 4ía3mos. 4íais. 4ían. 4í. 4í4s3te. 4í4s3tes. 4í3tes. 4í3mos. 4ís3teis. 4e3ré. 4e3rás. 4e3rés. 4e3rís. 4e3rá. 4e3re3mos. 4e3réis. 4e3rán. 4i3ga. 4i3gas. 4i3gás. 4i3gamos. 4i3gáis. 4a4i3gan. 4e3ría. 4e3rías. 4e3ríamos. 4e3ríais. 4e3rían. 4i3gá3mosme. 4i3gá3mosmele. 4i3gá3mosmelo. 4i3gá3mos3mela. 4i3gá3mosmeles. 4i3gá3mosmelos. 4i3gá3mos3melas. 4i3gá3moste. 4i3gá3mostele. 4i3gá3mostelo. 4i3gá3mos3tela. 4i3gá3mosteles. 4i3gá3mostelos. 4i3gá3mos3telas. 4i3gá3mosle. 4i3gá3mosla. 4i3gá3moslo. 4i3gá3mosele. 4i3gá3moselo. 4i3gá3mosela. 4i3gá3moseles. 4i3gá3moselos. 4i3gá3moselas. 4i3gá3monos. 4i3gá3monosle. 4i3gá3monoslo. 4i3gá3monosla. 4i3gá3monosles. 4i3gá3monoslos. 4i3gá3monoslas. 4i3gá3moos. 4i3gá3moosle. 4i3gá3mooslo. 4i3gá3moosla. 4i3gá3moosles. 4i3gá3mooslos. 4i3gá3mooslas. 4i3gá3mosles. 4i3gá3moslas. 4i3gá3moslos. 4ed. 4é. 4edme. 4édmele. 4édmelo. 4éd3mela. 4édmeles. 4édmelos. 4éd3melas. 4edte. 4édtele. 4édtelo. 4éd3tela. 4édteles. 4édtelos. 4éd3telas. 4edle. 4eedla. 4edlo. 4édsele. 4édselo. 4édsela. 4édseles. 4édselos. 4édselas. 4ednos. 4édnosle. 4édnoslo. 4édnosla. 4édnosles. 4édnoslos. 4édnoslas. 4eos. 4éosle. 4éoslo. 4éosla. 4éosles. 4éoslos. 4éoslas. 4edles. 4edlas. 4edlos. 4er. 4erme. 4érmele. 4érmelo. 4ér3mela. 4érmeles. 4érmelos. 4ér3melas. 4erte. 4értele. 4értelo. 4ér3tela. 4érteles. 4értelos. 4ér3telas. 4erle. 4erla. 4erlo. 4erse. 4érsele. 4érselo. 4érsela. 4érseles. 4érselos. 4érselas. 4ernos. 4érnosle. 4érnoslo. 4érnosla. 4érnosles. 4érnoslos. 4érnoslas. 4e3ros. 4é3rosle. 4é3roslo. 4é3rosla. 4é3rosles. 4é3roslos. 4é3roslas. 4erles. 4erlas. 4erlos. 4í3do. 4í3da. 4í3dos. 4í3das. 4o. 4as. 4a. 4ás. 4a3mos. 4áis. 4an. 4aste. 4astes. 4ó. 4ates. 4asteis. 4a3ron. 4a3ba. 4a3bas. 4á3bamos. 4a3bais. 4a3ban. 4a3ría. 4a3rías. 4a3ríamos. 4a3ríais 4a3rían. 4a3ré. 4a3rás. 4a3rés. 4a3rís. 4a3rá. 4a3remos. 4a3réis. 4a3rán. 4a3ra. 4a3ras. 4á3ramos. 4a3rais. 4a3ran. 4a3re. 4a3res. 4á3remos. 4a3reis. 4a3ren. 4a3se. 4a3ses. 4á3semos. 4a3seis. 4a3sen. 4ad. e5r4as. e5r4a3mos. e5r4áis. e5r4an. e5r4aste. e5r4astes. e5r4ates. e5r4asteis. e5r4a3ron. e5r4a3ba. e5r4a3bas. e5r4á3bamos. e5r4a3bais. e5r4a3ban. e5r4a3ría. e5r4a3rías. e5r4a3ríamos. e5r4a3ríais e5r4a3rían. e5r4a3ré. e5r4a3rás. e5r4a3rés. e5r4a3rís. e5r4a3rá. e5r4a3remos. e5r4a3réis. e5r4a3rán. e5r4a3ra. e5r4a3ras. e5r4á3ramos. e5r4a3rais. e5r4a3ran. e5r4a3re. e5r4a3res. e5r4á3remos. e5r4a3reis. e5r4a3ren. e5r4a3se. e5r4a3ses. e5r4á3semos. e5r4a3seis. e5r4a3sen. e5r4ad. 4adme. 4ádmele. 4ádmelo. 4ád3mela. 4ádmeles. 4ádmelos. 4ád3melas. 4adte. 4ádtele. 4ádtelo. 4ád3tela. 4ádteles. 4ádtelos. 4ád3telas. 4adle. 4eadla. 4adlo. 4ádsele. 4ádselo. 4ádsela. 4ádseles. 4ádselos. 4ádselas. 4adnos. 4ádnosle. 4ádnoslo. 4ádnosla. 4ádnosles. 4ádnoslos. 4ádnoslas. 4aos. 4áosle. 4áoslo. 4áosla. 4áosles. 4áoslos. 4áoslas. 4adles. 4adlas. 4adlos. 4ar. 4a4rme. 4á4rmele. 4á4rmelo. 4á4r3mela. 4á4r3meles. 4á4r3melos. 4á4r3melas. 4a4r3te. 4á4r3tele. 4á4r3telo. 4á4r3tela. 4á4r3teles. 4á4r3telos. 4á4r3telas. 4a4r3le. 4a4r3la. 4a4r3lo. 4a4r3se. 4á4r3sele. 4á4r3selo. 4á4r3sela. 4á4r3seles. 4á4r3selos. 4á4r3selas. 4a4r3nos. 4á4r3nosle. 4á4r3noslo. 4á4r3nosla. 4á4r3nosles. 4á4r3noslos. 4á4r3noslas. 4a3ros. 4árosle. 4ároslo. 4árosla. 4árosles. 4ároslos. 4ároslas. 4a4r3les. 4a4r3las. 4a4r3los. 4a3do. 4a3da. 4a3dos. 4a3das. e5r4a3do. e5r4a3da. e5r4a3dos. e5r4a3das. 4ando 4ándole. 4ándolo. 4ándola. 4ándoles. 4ándolos. 4ándolas. 4ándonos. 4ándoos. 4ándome. 4ándomelo. 4ándomela. 4ándomele. 4ándomelos. 4ándomelas. 4ándomeles. 4ándote. 4ándoteme. 4ándotelo. 4ándotela. 4ándotele. 4ándotelos. 4ándotelas. 4ándoteles. 4ándotenos. 4ándose. 4ándoseme. 4ándoselo. 4ándosela. 4ándosele. 4ándoselos. 4ándoselas. 4ándoseles. 4ándosenos. 4a3dor. 4a3dora. 4a3dores. 4a3doras. e5r4a3dor. e5r4a3dora. e5r4a3dores. e5r4a3doras. .a4 .abre1h .abre1a2 .abre1e2 .abre1i2 .abre1o2 .abre1u2 .abre1á2 .abre1é2 .abre1í2 .abre1ó2 .abre1ú2 .acro1h .acro1a2 .acro1e2 .acro1i2 .acro1o2 .acro1u2 .acro1á2 .acro1é2 .acro1í2 .acro1ó2 .acro1ú2 acto1h acto1a2 acto1e2 acto1i2 acto1o2 acto1u2 acto1á2 acto1é2 acto1í2 acto1ó2 acto1ú2 adeno1h adeno1a2 adeno1e2 adeno1i2 adeno1o2 adeno1u2 adeno1á2 adeno1é2 adeno1í2 adeno1ó2 adeno1ú2 4i3ditis. aero1h aero1a2 aero1e2 aero1i2 aero1o2 aero1u2 aero1á2 aero1é2 aero1í2 aero1ó2 aero1ú2 afro1h afro1a2 afro1e2 afro1i2 afro1o2 afro1u2 afro1á2 afro1é2 afro1í2 afro1ó2 afro1ú2 agro1h agro1a2 agro1e2 agro1i2 agro1o2 agro1u2 agro1á2 agro1é2 agro1í2 agro1ó2 agro1ú2 .an3e2pigr .an3a2lcoh .an3amnio .an3i4so .an3i4só .an3aero andro1h andro1a2 andro1e2 andro1i2 andro1o2 andro1u2 andro1á2 andro1é2 andro1í2 andro1ó2 andro1ú2 anfi1h anfi1a2 anfi1e2 anfi1i2 anfi1o2 anfi1u2 anfi1á2 anfi1é2 anfi1í2 anfi1ó2 anfi1ú2 4o3xo. 4o3xos. anglo1h anglo1a2 anglo1e2 anglo1i2 anglo1o2 anglo1u2 anglo1á2 anglo1é2 anglo1í2 anglo1ó2 anglo1ú2 ante1h ante1a2 ante1e2 ante1i2 ante1o2 ante1u2 ante1á2 ante1é2 ante1í2 ante1ó2 ante1ú2 .ante2o3je acante2 4ísmo. 4ísmos. 4ísta. 4ístas. 4ismo. 4ismos. 4ista. 4istas. 4ístico. 4ísticos. 4ística. 4ísticas. pante4o3n .anteo3nes mante4a e4a3miento e4ándo tras3antea 2huelo. 2huela. 2huelos. 2huelas. .anti1h .anti1a2 .anti1e2 .anti1i2 .anti1o2 .anti1u2 .anti1á2 .anti1é2 .anti1í2 .anti1ó2 .anti1ú2 ti2o3qu ti2o3co apico1h apico1a2 apico1e2 apico1i2 apico1o2 apico1u2 apico1á2 apico1é2 apico1í2 apico1ó2 apico1ú2 archi1h archi1a2 archi1e2 archi1i2 archi1o2 archi1u2 archi1á2 archi1é2 archi1í2 archi1ó2 archi1ú2 .atto1h .atto1a2 .atto1e2 .atto1i2 .atto1o2 .atto1u2 .atto1á2 .atto1é2 .atto1í2 .atto1ó2 .atto1ú2 audio1h audio1a2 audio1e2 audio1i2 audio1o2 audio1u2 audio1á2 audio1é2 audio1í2 audio1ó2 audio1ú2 austro1h austro1a2 austro1e2 austro1i2 austro1o2 austro1u2 austro1á2 austro1é2 austro1í2 austro1ó2 austro1ú2 auto1h auto1a2 auto1e2 auto1i2 auto1o2 auto1u2 auto1á2 auto1é2 auto1í2 auto1ó2 auto1ú2 .bi1anual .bi1aur .bi1ox .bi1ó2x .bi1un bi1u2ní biblio1h biblio1a2 biblio1e2 biblio1i2 biblio1o2 biblio1u2 biblio1á2 biblio1é2 biblio1í2 biblio1ó2 biblio1ú2 bien2 bien3b bien3c bien3d bien3f bien3g bien3h bien3l bien3m bien3p bien3q bien3s bien3t bien3v bien3z .bie4n3and .bie4n3a4pa .bie4n3a4ve .bie4n3est .bie4n3int .bie4n3o4lie b4ien3do. .su3b4ien b4ien3das. bio1h bio1a2 bio1e2 bio1i2 bio1o2 bio1u2 bio1á2 bio1é2 bio1í2 bio1ó2 bio1ú2 busca1h busca1a2 busca1e2 busca1i2 busca1o2 busca1u2 busca1á2 busca1é2 busca1í2 busca1ó2 busca1ú2 cardio1h cardio1a2 cardio1e2 cardio1i2 cardio1o2 cardio1u2 cardio1á2 cardio1é2 cardio1í2 cardio1ó2 cardio1ú2 cefalo1h cefalo1a2 cefalo1e2 cefalo1i2 cefalo1o2 cefalo1u2 cefalo1á2 cefalo1é2 cefalo1í2 cefalo1ó2 cefalo1ú2 centi1h centi1a2 centi1e2 centi1i2 centi1o2 centi1u2 centi1á2 centi1é2 centi1í2 centi1ó2 centi1ú2 cian1h ciano1h ciano1a2 ciano1e2 ciano1i2 ciano1o2 ciano1u2 ciano1á2 ciano1é2 ciano1í2 ciano1ó2 ciano1ú2 cibe2r3r cibe2r1h cibe2r1a2 cibe2r1e2 cibe2r1i2 cibe2r1o2 cibe2r1u2 cibe2r1á2 cibe2r1é2 cibe2r1í2 cibe2r1ó2 cibe2r1ú2 centi5área ciclo1h ciclo1a2 ciclo1e2 ciclo1i2 ciclo1o2 ciclo1u2 ciclo1á2 ciclo1é2 ciclo1í2 ciclo1ó2 ciclo1ú2 cito1h cito1a2 cito1e2 cito1i2 cito1o2 cito1u2 cito1á2 cito1é2 cito1í2 cito1ó2 cito1ú2 clepto1h clepto1a2 clepto1e2 clepto1i2 clepto1o2 clepto1u2 clepto1á2 clepto1é2 clepto1í2 clepto1ó2 clepto1ú2 cnico1h cnico1a2 cnico1e2 cnico1i2 cnico1o2 cnico1u2 cnico1á2 cnico1é2 cnico1í2 cnico1ó2 cnico1ú2 .co1h .co2a2 .co2e2 .co2i2 .co3o4 .co2u2 .co2á2 .co2é2 .co2í2 .co2ó2 .co2ú2 .co3acer .co3acree .coá3gul .co3agen .coa3gul .co3apóst .coa3lesc .coa3lic .co3arrend .coa3xial .co3auto .co3edic .co3edit .co3educ .co3efici .coe3tá .co3exis .co6hib .co4hech .co4hesi .co4heso .co4herent .co4het .co3imput .coi3to .co4o5ki .co4o3per .co4o3pér .co4orden .co4ordin .co4ordín .co4opt .co4ópt .co2nurb cou3lomb corta1h corta1a2 corta1e2 corta1i2 corta1o2 corta1u2 corta1á2 corta1é2 corta1í2 corta1ó2 corta1ú2 cosmo1h cosmo1a2 cosmo1e2 cosmo1i2 cosmo1o2 cosmo1u2 cosmo1á2 cosmo1é2 cosmo1í2 cosmo1ó2 cosmo1ú2 crio1h crio1a2 crio1e2 crio1i2 crio1o2 crio1u2 crio1á2 crio1é2 crio1í2 crio1ó2 crio1ú2 cripto1h cripto1a2 cripto1e2 cripto1i2 cripto1o2 cripto1u2 cripto1á2 cripto1é2 cripto1í2 cripto1ó2 cripto1ú2 crono1h crono1a2 crono1e2 crono1i2 crono1o2 crono1u2 crono1á2 crono1é2 crono1í2 crono1ó2 crono1ú2 contra1h contra1a2 contra1e2 contra1i2 contra1o2 contra1u2 contra1á2 contra1é2 contra1í2 contra1ó2 contra1ú2 cuadru1h cuadru1a2 cuadru1e2 cuadru1i2 cuadru1o2 cuadru1u2 cuadru1á2 cuadru1é2 cuadru1í2 cuadru1ó2 cuadru1ú2 cuasi1h cuasi1a2 cuasi1e2 cuasi1i2 cuasi1o2 cuasi1u2 cuasi1á2 cuasi1é2 cuasi1í2 cuasi1ó2 cuasi1ú2 deca1h deca1a2 deca1e2 deca1i2 deca1o2 deca1u2 deca1á2 deca1é2 deca1í2 deca1ó2 deca1ú2 dento1h dento1a2 dento1e2 dento1i2 dento1o2 dento1u2 dento1á2 dento1é2 dento1í2 dento1ó2 dento1ú2 dermato1h dermato1a2 dermato1e2 dermato1i2 dermato1o2 dermato1u2 dermato1á2 dermato1é2 dermato1í2 dermato1ó2 dermato1ú2 dermo1h dermo1a2 dermo1e2 dermo1i2 dermo1o2 dermo1u2 dermo1á2 dermo1é2 dermo1í2 dermo1ó2 dermo1ú2 .de2s1h .de2s3a2 .de2se2 .de2si2 .de2so2 .de2su2 .de2s3á2 .de2sé2 .de2sí2 .de2só2 .de2sú2 deca2i3mient 3sa. 3sas. de2s3órde de2s3orde de3s4a3brid de3s4a3bor de3s4a3craliz de3s4a3cralic de3s4a3fia de3s4a3fía de3s4a3fiá de3s4a3fíe de3s4a3fié de3s4a3fío de3s4a3fió des5a4gua de3s4ahuci de3s4áhuci de3s4a3guis des4ala des4ála de3s4a3liv de3s4a3liniz de3s4a3liníz de3s4a3linic de3s4a3liníc de3s4angr de3s4angel de3s4a3prensiv de3s4a3rroll desa4sa desa4se des5a4tes de3s4astr de3s4a3yun de3s4a3zón de3s4a3zon .des3em de3s4e3meja de3s4e3méja de3s4e3mejá de3s4e3meje de3s4e3méje de3s4e3mejé de3s4e3mejo de3s4e3méjo de3s4e3mejó de3s4empeñ de3s4empéñ .des3en de3s4enfren de3s4enfrén de3seo de3sea de3sean de3seán de3sear de3seár de3seab de3seáb de3sead de3seád de3seam de3seám de3seas de3seás de3se3co de3se3ca de3se3cá de3se3có de3s4e3que de3s4e3qué de3se3can de3se3cán de3se3car de3se3cár de3se3cab de3se3cáb de3se3cad de3se3cád de3se3cam de3se3cám de3se3cas de3se3cás de3se3cha de3sé3cha de3se3chá de3se3ché de3se3che de3sé3che de3se3chó de3se3cho de2s3edif de2s3educ de2s3eduq de2s3escombr de2s3eq de3s4erci de3s4ert de3s4ért de2s3espa de3sesperac de2s3esperanz de2s3espin de2s3espum de2s3estabil de2s3estaci de2s3estalin de2s3estim de2s3estres de2s3estruc de3sider de3sidia de2s3ideol de3sidio de3siert de3sign de2s3igual de2s3iguál de2s3ilusion de2s3ilusión de2s3imagin de2s3iman de2s3impon de2s3impres de2s3incent de2s3inclin de2s3incorp de2s3incrust de3si3nenc de3si3nent de3sinfec de3su3dar de3su3das de3su3dan de2s3infart de2s3inflam de2s3infl de2s3inform de2s3inhib de2s3insect de2s3instal ini3ci iní3ci de3s4integr de3s4inter de2s3intox de2s3intub de2s3inver de3sisten de3isti de2s3obedec de2s3obedez de2s3obedien de2s3oblig de2s3obstr de3so3cas de2s3ocup de2s3ocúp de2s3odor de3so3la de3só3la de3so3lá de3so3le de3so3lé de3so3lo de3so3ló de3solac de3solad de3soll de2s3oprim de2s3orej de2s3orill de2s3orient de3sortij de2s3organi de2s3ornam de3suell de3sonce de2s3ova de2s3ová de2s3ové de2s3ovi de2s3oxi de2s3oye de2s3oyé de3s4ubstan de3s4ustan de3s4oseg de2s3ub4ic de2s3ub4iq de2s3unir de2s3unan de2s3unas de2s3une de2s3unid de2s3unien de2s3uniera de2s3unies de2s3unién de2s3uniér de2s3uniés de2s3unió de2s3uno de2s3uná de2s3uní de2s3unía de2s3unier de2s3unim de2s3uña de2s3uñá de2s3urbani .diecio2 .diecio3ch ecano1h ecano1a2 ecano1e2 ecano1i2 ecano1o2 ecano1u2 ecano1á2 ecano1é2 ecano1í2 ecano1ó2 ecano1ú2 eco1h eco1a2 eco1e2 eco1i2 eco1o2 eco1u2 eco1á2 eco1é2 eco1í2 eco1ó2 eco1ú2 ecto1h ecto1a2 ecto1e2 ecto1i2 ecto1o2 ecto1u2 ecto1á2 ecto1é2 ecto1í2 ecto1ó2 ecto1ú2 ectro1h ectro1a2 ectro1e2 ectro1i2 ectro1o2 ectro1u2 ectro1á2 ectro1é2 ectro1í2 ectro1ó2 ectro1ú2 .e2n1h .e2n2a2 .e2n2e2 .e2n2i2 .e2n2o2 .e2n2u2 .e2n2á2 .e2n2é2 .e2n2í2 .e2n2ó2 .e2n2ú2 .ena3mor .en3amór .ene3mist .ene3míst .eno3jar .enu3mera .enu3merá .enu3mere .en3aceit .ena3jen .ena3jén .eno3ja .eno3já .eno3je .eno3jé .eno3jo .eno3jó .enó3j .en3arb en1hebr .en2hest 4emboca 4o3lógico. 4o3lógica. 4o3lógicos. 4o3lógicas. 4o3lógicamente. 4o3logía. 4o3logías. 4ó3logo. 4ó3loga. 4ó3logos. 4ó3logas. endo1h endo1a2 endo1e2 endo1i2 endo1o2 endo1u2 endo1á2 endo1é2 endo1í2 endo1ó2 endo1ú2 enea1h enea1a2 enea1e2 enea1i2 enea1o2 enea1u2 enea1á2 enea1é2 enea1í2 enea1ó2 enea1ú2 entero1h entero1a2 entero1e2 entero1i2 entero1o2 entero1u2 entero1á2 entero1é2 entero1í2 entero1ó2 entero1ú2 ento1h ento1a2 ento1e2 ento1i2 ento1o2 ento1u2 ento1á2 ento1é2 ento1í2 ento1ó2 ento1ú2 entre1h entre1a2 entre1e2 entre1i2 entre1o2 entre1u2 entre1á2 entre1é2 entre1í2 entre1ó2 entre1ú2 esclero1h esclero1a2 esclero1e2 esclero1i2 esclero1o2 esclero1u2 esclero1á2 esclero1é2 esclero1í2 esclero1ó2 esclero1ú2 estereo1h estereo1a2 estereo1e2 estereo1i2 estereo1o2 estereo1u2 estereo1á2 estereo1é2 estereo1í2 estereo1ó2 estereo1ú2 etno1h etno1a2 etno1e2 etno1i2 etno1o2 etno1u2 etno1á2 etno1é2 etno1í2 etno1ó2 etno1ú2 euco1h euco1a2 euco1e2 euco1i2 euco1o2 euco1u2 euco1á2 euco1é2 euco1í2 euco1ó2 euco1ú2 euro1h euro1a2 euro1e2 euro1i2 euro1o2 euro1u2 euro1á2 euro1é2 euro1í2 euro1ó2 euro1ú2 .e2x1h .e2x2a2 .e2x2e2 .e2x2i2 .e2x2o2 .e2x2u2 .e2x2á2 .e2x2é2 .e2x2í2 .e2x2ó2 .e2x2ú2 .ex2hal .ex2hál .ex2haus .ex2hib .ex2híb .ex2hort .ex2hórt .ex2hum .ex2húm 3gono. 3gonos. 3gonal. 3gonales. exá3men exá3ri exé3ge exó3ti exa3cerb exa3ger ex3alum exa3min exe3cr exe3géti exe3quia exi3ja exi3já exí3ja exi3ge exí3ge exi3gi exi3gí exi3jo exí3jo exi3lia exi3liá exí3lia exi3lie exi3lié exí3lie exi3lio exi3lió exí3lio exi3ma exi3má exí3ma exi3mi exi3mí exí3mi exi3me exi3mé exí3me exi3mo exi3mó exí3mo exi3tos exi3lar exo3bió exo3ner exo3crin exo3tér exo3tic exo3tiq exo3tism exo3gami exo3esq exo3plan exo3gámi exu3ber exu3dar exu3dat exu3dac extra1h extra1a2 extra1e2 extra1i2 extra1o2 extra1u2 extra1á2 extra1é2 extra1í2 extra1ó2 extra1ú2 u4teri .cau5t .deu5t femto1h femto1a2 femto1e2 femto1i2 femto1o2 femto1u2 femto1á2 femto1é2 femto1í2 femto1ó2 femto1ú2 ferro1h ferro1a2 ferro1e2 ferro1i2 ferro1o2 ferro1u2 ferro1á2 ferro1é2 ferro1í2 ferro1ó2 ferro1ú2 filo1h filo1a2 filo1e2 filo1i2 filo1o2 filo1u2 filo1á2 filo1é2 filo1í2 filo1ó2 filo1ú2 fisio1h fisio1a2 fisio1e2 fisio1i2 fisio1o2 fisio1u2 fisio1á2 fisio1é2 fisio1í2 fisio1ó2 fisio1ú2 fito1h fito1a2 fito1e2 fito1i2 fito1o2 fito1u2 fito1á2 fito1é2 fito1í2 fito1ó2 fito1ú2 fono1h fono1a2 fono1e2 fono1i2 fono1o2 fono1u2 fono1á2 fono1é2 fono1í2 fono1ó2 fono1ú2 foto1h foto1a2 foto1e2 foto1i2 foto1o2 foto1u2 foto1á2 foto1é2 foto1í2 foto1ó2 foto1ú2 galo1h galo1a2 galo1e2 galo1i2 galo1o2 galo1u2 galo1á2 galo1é2 galo1í2 galo1ó2 galo1ú2 gastero1h gastero1a2 gastero1e2 gastero1i2 gastero1o2 gastero1u2 gastero1á2 gastero1é2 gastero1í2 gastero1ó2 gastero1ú2 gastro1h gastro1a2 gastro1e2 gastro1i2 gastro1o2 gastro1u2 gastro1á2 gastro1é2 gastro1í2 gastro1ó2 gastro1ú2 geo1h geo1a2 geo1e2 geo1i2 geo1o2 geo1u2 geo1á2 geo1é2 geo1í2 geo1ó2 geo1ú2 geronto1h geronto1a2 geronto1e2 geronto1i2 geronto1o2 geronto1u2 geronto1á2 geronto1é2 geronto1í2 geronto1ó2 geronto1ú2 gineco1h gineco1a2 gineco1e2 gineco1i2 gineco1o2 gineco1u2 gineco1á2 gineco1é2 gineco1í2 gineco1ó2 gineco1ú2 giga1h giga1a2 giga1e2 giga1i2 giga1o2 giga1u2 giga1á2 giga1é2 giga1í2 giga1ó2 giga1ú2 gluco1h gluco1a2 gluco1e2 gluco1i2 gluco1o2 gluco1u2 gluco1á2 gluco1é2 gluco1í2 gluco1ó2 gluco1ú2 grafo1h grafo1a2 grafo1e2 grafo1i2 grafo1o2 grafo1u2 grafo1á2 grafo1é2 grafo1í2 grafo1ó2 grafo1ú2 guarda1h guarda1a2 guarda1e2 guarda1i2 guarda1o2 guarda1u2 guarda1á2 guarda1é2 guarda1í2 guarda1ó2 guarda1ú2 halo1h halo1a2 halo1e2 halo1i2 halo1o2 halo1u2 halo1á2 halo1é2 halo1í2 halo1ó2 halo1ú2 hecto1h hecto1a2 hecto1e2 hecto1i2 hecto1o2 hecto1u2 hecto1á2 hecto1é2 hecto1í2 hecto1ó2 hecto1ú2 helico1h helico1a2 helico1e2 helico1i2 helico1o2 helico1u2 helico1á2 helico1é2 helico1í2 helico1ó2 helico1ú2 helio1h helio1a2 helio1e2 helio1i2 helio1o2 helio1u2 helio1á2 helio1é2 helio1í2 helio1ó2 helio1ú2 hemato1h hemato1a2 hemato1e2 hemato1i2 hemato1o2 hemato1u2 hemato1á2 hemato1é2 hemato1í2 hemato1ó2 hemato1ú2 hemi1h hemi1a2 hemi1e2 hemi1i2 hemi1o2 hemi1u2 hemi1á2 hemi1é2 hemi1í2 hemi1ó2 hemi1ú2 hemio3la. hemio3las. hemo1h hemo1a2 hemo1e2 hemo1i2 hemo1o2 hemo1u2 hemo1á2 hemo1é2 hemo1í2 hemo1ó2 hemo1ú2 hepato1h hepato1a2 hepato1e2 hepato1i2 hepato1o2 hepato1u2 hepato1á2 hepato1é2 hepato1í2 hepato1ó2 hepato1ú2 hepta1h hepta1a2 hepta1e2 hepta1i2 hepta1o2 hepta1u2 hepta1á2 hepta1é2 hepta1í2 hepta1ó2 hepta1ú2 hetero1h hetero1a2 hetero1e2 hetero1i2 hetero1o2 hetero1u2 hetero1á2 hetero1é2 hetero1í2 hetero1ó2 hetero1ú2 2al. 2ales. hexa1h hexa1a2 hexa1e2 hexa1i2 hexa1o2 hexa1u2 hexa1á2 hexa1é2 hexa1í2 hexa1ó2 hexa1ú2 hidro1h hidro1a2 hidro1e2 hidro1i2 hidro1o2 hidro1u2 hidro1á2 hidro1é2 hidro1í2 hidro1ó2 hidro1ú2 holo1h holo1a2 holo1e2 holo1i2 holo1o2 holo1u2 holo1á2 holo1é2 holo1í2 holo1ó2 holo1ú2 hipe2r3r hipe2r1h hipe2r1a2 hipe2r1e2 hipe2r1i2 hipe2r1o2 hipe2r1u2 hipe2r1á2 hipe2r1é2 hipe2r1í2 hipe2r1ó2 hipe2r1ú2 pe3r4e3mia hipe3r4i3cíne hipe3r4o3nimi hipe3r4o3ními hipe3r4ó3nimo hipe3r4o3xia hipo1h hipo1a2 hipo1e2 hipo1i2 hipo1o2 hipo1u2 hipo1á2 hipo1é2 hipo1í2 hipo1ó2 hipo1ú2 spano1h spano1a2 spano1e2 spano1i2 spano1o2 spano1u2 spano1á2 spano1é2 spano1í2 spano1ó2 spano1ú2 histo1h histo1a2 histo1e2 histo1i2 histo1o2 histo1u2 histo1á2 histo1é2 histo1í2 histo1ó2 histo1ú2 homo1h homo1a2 homo1e2 homo1i2 homo1o2 homo1u2 homo1á2 homo1é2 homo1í2 homo1ó2 homo1ú2 homeo1h homeo1a2 homeo1e2 homeo1i2 homeo1o2 homeo1u2 homeo1á2 homeo1é2 homeo1í2 homeo1ó2 homeo1ú2 ibero1h ibero1a2 ibero1e2 ibero1i2 ibero1o2 ibero1u2 ibero1á2 ibero1é2 ibero1í2 ibero1ó2 ibero1ú2 icono1h icono1a2 icono1e2 icono1i2 icono1o2 icono1u2 icono1á2 icono1é2 icono1í2 icono1ó2 icono1ú2 .i2n1h .i2n2a2 .i2n2e2 .i2n2i2 .i2n2o2 .i2n2u2 .i2n2á2 .i2n2é2 .i2n2í2 .i2n2ó2 .i2n2ú2 in4hib in4híb in4hal in4hál in4hest in4hést in4hum in4húm in4hiest in4hiést in4herent in4hóspit in4hesi .in3abarc .in3abord .in3acent .in3acept .in3adapt .in3adopt .in3aguant .in3alámb .in3alien .in3analiz .in3anim .in3apagab .in3afect .in3apel .in3aplaz .in3aplic .in3apreci .in3aprehen .in3aprens .in3armón .in3arrug .in3asist .in3atent .in3efic .in3efici .in3eludi .in3encont .in3equid .in3exact .in3evit .ina3movib .ina3nic .ine3narr .ine3quív .iná3nim .iné3dit .in3eleg .in3exha .in3ex ini3cia iní3cia ini3ciá ini3cie re3ini3cia re3iní3cia re3ini3ciá re3ini3cie .ini3cuo .ini3cua .in3igualab .in3in .in3obser .ino3cuo .ino3cua .ino3cenc .ino3cent .in3ocult .ino3fens .ino3cula .ino3culá .ino3cule .in3oport .inú3til .inu3tiliz infra1h infra1a2 infra1e2 infra1i2 infra1o2 infra1u2 infra1á2 infra1é2 infra1í2 infra1ó2 infra1ú2 inmuno1h inmuno1a2 inmuno1e2 inmuno1i2 inmuno1o2 inmuno1u2 inmuno1á2 inmuno1é2 inmuno1í2 inmuno1ó2 inmuno1ú2 .inte2r3r .inte2r1h .inte2r1a2 .inte2r1e2 .inte2r1i2 .inte2r1o2 .inte2r1u2 .inte2r1á2 .inte2r1é2 .inte2r1í2 .inte2r1ó2 .inte2r1ú2 .in3ter2e3sa .in3ter2e3se .in3ter2e3so .in3ter2e3sá .in3ter2e3sé .in3ter2e3só .de3s4in3ter2e3sa .de3s4in3ter2e3se .de3s4in3ter2e3so .de3s4in3ter2e3sá .de3s4in3ter2e3sé .de3s4in3ter2e3só 4n5te5r2i3n inte6r5i4nsu inte6r5i4nst inte6r5i4nd 4ino. 4inos. 4ina. 4inas. .in3te3r4rog .in3te3r4rupc .in3te3r4rupt .in3te3r4rump inter4és inte3r4esar inte5r4regno inte3r4ior4 in3te3r4im. 4i4ano. 4i4ana. 4i4anos. 4i4anas. intra1h intra1a2 intra1e2 intra1i2 intra1o2 intra1u2 intra1á2 intra1é2 intra1í2 intra1ó2 intra1ú2 islamo1h islamo1a2 islamo1e2 islamo1i2 islamo1o2 islamo1u2 islamo1á2 islamo1é2 islamo1í2 islamo1ó2 islamo1ú2 italo1h italo1a2 italo1e2 italo1i2 italo1o2 italo1u2 italo1á2 italo1é2 italo1í2 italo1ó2 italo1ú2 iso1h iso1a2 iso1e2 iso1i2 iso1o2 iso1u2 iso1á2 iso1é2 iso1í2 iso1ó2 iso1ú2 kilo1h kilo1a2 kilo1e2 kilo1i2 kilo1o2 kilo1u2 kilo1á2 kilo1é2 kilo1í2 kilo1ó2 kilo1ú2 leuco1h leuco1a2 leuco1e2 leuco1i2 leuco1o2 leuco1u2 leuco1á2 leuco1é2 leuco1í2 leuco1ó2 leuco1ú2 linfo1h linfo1a2 linfo1e2 linfo1i2 linfo1o2 linfo1u2 linfo1á2 linfo1é2 linfo1í2 linfo1ó2 linfo1ú2 lipo1h lipo1a2 lipo1e2 lipo1i2 lipo1o2 lipo1u2 lipo1á2 lipo1é2 lipo1í2 lipo1ó2 lipo1ú2 lito1h lito1a2 lito1e2 lito1i2 lito1o2 lito1u2 lito1á2 lito1é2 lito1í2 lito1ó2 lito1ú2 macro1h macro1a2 macro1e2 macro1i2 macro1o2 macro1u2 macro1á2 macro1é2 macro1í2 macro1ó2 macro1ú2 mal2 ma4l3h .ma4l3e4du mal3b mal3c mal3d mal3f mal3g mal3m mal3p mal3q mal3s mal3t mal3v .mal1acon .mal1acos .mala1e .mal1andant .mal1andanz .mal1est .mal1int maxi1h maxi1a2 maxi1e2 maxi1i2 maxi1o2 maxi1u2 maxi1á2 maxi1é2 maxi1í2 maxi1ó2 maxi1ú2 megalo1h megalo1a2 megalo1e2 megalo1i2 megalo1o2 megalo1u2 megalo1á2 megalo1é2 megalo1í2 megalo1ó2 megalo1ú2 mega1h mega1a2 mega1e2 mega1i2 mega1o2 mega1u2 mega1á2 mega1é2 mega1í2 mega1ó2 mega1ú2 melano1h melano1a2 melano1e2 melano1i2 melano1o2 melano1u2 melano1á2 melano1é2 melano1í2 melano1ó2 melano1ú2 meso1h meso1a2 meso1e2 meso1i2 meso1o2 meso1u2 meso1á2 meso1é2 meso1í2 meso1ó2 meso1ú2 meta1h meta1a2 meta1e2 meta1i2 meta1o2 meta1u2 meta1á2 meta1é2 meta1í2 meta1ó2 meta1ú2 micro1h micro1a2 micro1e2 micro1i2 micro1o2 micro1u2 micro1á2 micro1é2 micro1í2 micro1ó2 micro1ú2 .mili1h .mili1a2 .mili1e2 .mili1i2 .mili1o2 .mili1u2 .mili1á2 .mili1é2 .mili1í2 .mili1ó2 .mili1ú2 familia3ri ia5res. amili6a a3rio a3ria li5á4rea mili4ar mini1h mini1a2 mini1e2 mini1i2 mini1o2 mini1u2 mini1á2 mini1é2 mini1í2 mini1ó2 mini1ú2 2os. 2o3so. 2o3sos. 2o3sa. 2o3sas. 2o3samente. mini4a5tur .mio1h .mio1a2 .mio1e2 .mio1i2 .mio1o2 .mio1u2 .mio1á2 .mio1é2 .mio1í2 .mio1ó2 .mio1ú2 multi1h multi1a2 multi1e2 multi1i2 multi1o2 multi1u2 multi1á2 multi1é2 multi1í2 multi1ó2 multi1ú2 miria1h miria1a2 miria1e2 miria1i2 miria1o2 miria1u2 miria1á2 miria1é2 miria1í2 miria1ó2 miria1ú2 mono1h mono1a2 mono1e2 mono1i2 mono1o2 mono1u2 mono1á2 mono1é2 mono1í2 mono1ó2 mono1ú2 morfo1h morfo1a2 morfo1e2 morfo1i2 morfo1o2 morfo1u2 morfo1á2 morfo1é2 morfo1í2 morfo1ó2 morfo1ú2 moto1h moto1a2 moto1e2 moto1i2 moto1o2 moto1u2 moto1á2 moto1é2 moto1í2 moto1ó2 moto1ú2 namo1h namo1a2 namo1e2 namo1i2 namo1o2 namo1u2 namo1á2 namo1é2 namo1í2 namo1ó2 namo1ú2 nano1h nano1a2 nano1e2 nano1i2 nano1o2 nano1u2 nano1á2 nano1é2 nano1í2 nano1ó2 nano1ú2 narco1h narco1a2 narco1e2 narco1i2 narco1o2 narco1u2 narco1á2 narco1é2 narco1í2 narco1ó2 narco1ú2 necro1h necro1a2 necro1e2 necro1i2 necro1o2 necro1u2 necro1á2 necro1é2 necro1í2 necro1ó2 necro1ú2 nefro1h nefro1a2 nefro1e2 nefro1i2 nefro1o2 nefro1u2 nefro1á2 nefro1é2 nefro1í2 nefro1ó2 nefro1ú2 neo1h neo1a2 neo1e2 neo1i2 neo1o2 neo1u2 neo1á2 neo1é2 neo1í2 neo1ó2 neo1ú2 3c2neor neto1h neto1a2 neto1e2 neto1i2 neto1o2 neto1u2 neto1á2 neto1é2 neto1í2 neto1ó2 neto1ú2 neumo1h neumo1a2 neumo1e2 neumo1i2 neumo1o2 neumo1u2 neumo1á2 neumo1é2 neumo1í2 neumo1ó2 neumo1ú2 norte1h norte1a2 norte1e2 norte1i2 norte1o2 norte1u2 norte1á2 norte1é2 norte1í2 norte1ó2 norte1ú2 octo1h octo1a2 octo1e2 octo1i2 octo1o2 octo1u2 octo1á2 octo1é2 octo1í2 octo1ó2 octo1ú2 octa1h octa1a2 octa1e2 octa1i2 octa1o2 octa1u2 octa1á2 octa1é2 octa1í2 octa1ó2 octa1ú2 oligo1h oligo1a2 oligo1e2 oligo1i2 oligo1o2 oligo1u2 oligo1á2 oligo1é2 oligo1í2 oligo1ó2 oligo1ú2 omni1h omni1a2 omni1e2 omni1i2 omni1o2 omni1u2 omni1á2 omni1é2 omni1í2 omni1ó2 omni1ú2 onco1h onco1a2 onco1e2 onco1i2 onco1o2 onco1u2 onco1á2 onco1é2 onco1í2 onco1ó2 onco1ú2 onto1h onto1a2 onto1e2 onto1i2 onto1o2 onto1u2 onto1á2 onto1é2 onto1í2 onto1ó2 onto1ú2 opto1h opto1a2 opto1e2 opto1i2 opto1o2 opto1u2 opto1á2 opto1é2 opto1í2 opto1ó2 opto1ú2 ornito1h ornito1a2 ornito1e2 ornito1i2 ornito1o2 ornito1u2 ornito1á2 ornito1é2 ornito1í2 ornito1ó2 ornito1ú2 orto1h orto1a2 orto1e2 orto1i2 orto1o2 orto1u2 orto1á2 orto1é2 orto1í2 orto1ó2 orto1ú2 orto4e3pía osteo1h osteo1a2 osteo1e2 osteo1i2 osteo1o2 osteo1u2 osteo1á2 osteo1é2 osteo1í2 osteo1ó2 osteo1ú2 paleo1h paleo1a2 paleo1e2 paleo1i2 paleo1o2 paleo1u2 paleo1á2 paleo1é2 paleo1í2 paleo1ó2 paleo1ú2 .pa4n1a4fri .pa4n1a4meri .pa4n1á4rab .pa4n1a4ráb .pa4n1a4rab .pa4n1europ .pa4n1islam .pa4n1islám .pa4n5hisp .pa4n1hel .pa4n1ópti para1h para1a2 para1e2 para1i2 para1o2 para1u2 para1á2 para1é2 para1í2 para1ó2 para1ú2 para2is. aí5so. aí5sos. para4íso para4i3señ para4ulata penta1h penta1a2 penta1e2 penta1i2 penta1o2 penta1u2 penta1á2 penta1é2 penta1í2 penta1ó2 penta1ú2 peta1h peta1a2 peta1e2 peta1i2 peta1o2 peta1u2 peta1á2 peta1é2 peta1í2 peta1ó2 peta1ú2 pico1h pico1a2 pico1e2 pico1i2 pico1o2 pico1u2 pico1á2 pico1é2 pico1í2 pico1ó2 pico1ú2 piezo1h piezo1a2 piezo1e2 piezo1i2 piezo1o2 piezo1u2 piezo1á2 piezo1é2 piezo1í2 piezo1ó2 piezo1ú2 piro1h piro1a2 piro1e2 piro1i2 piro1o2 piro1u2 piro1á2 piro1é2 piro1í2 piro1ó2 piro1ú2 pluri1h pluri1a2 pluri1e2 pluri1i2 pluri1o2 pluri1u2 pluri1á2 pluri1é2 pluri1í2 pluri1ó2 pluri1ú2 poli1h poli1a2 poli1e2 poli1i2 poli1o2 poli1u2 poli1á2 poli1é2 poli1í2 poli1ó2 poli1ú2 poli4u3r poli4o5mie poli4arq poli4árq poli4éste poli4andr poli4antea poli4arca expoli4 porta1h porta1a2 porta1e2 porta1i2 porta1o2 porta1u2 porta1á2 porta1é2 porta1í2 porta1ó2 porta1ú2 porta4e3ro .pos2t1h .pos2t2a2 .pos2t2e2 .pos2t2i2 .pos2t2o2 .pos2t2u2 .pos2t2á2 .pos2t2é2 .pos2t2í2 .pos2t2ó2 .pos2t2ú2 po4s3impr po4s3o2per po4s3ind po4s3e4lect po4s3estr .pos3tin .pos3tín .pos4t3ind pos3ta. pos3tas. pos4t5s s3te. s3tes. s3tal. s3ta3les. s3ti3lla. s3ti3llas. s3ti3llón. s3ti3llones. s3tor. s3tora. s3toras. s3tores. .pos3tó3ni .pos3terg .pos3te3ri .pos3ti3go .pos3ti3la .pos3ti3ne .pos3ti3za .pos3ti3zo .pos3tu3ra .pos3tu3la .pos3tu3lá .pos3tu3le .pos3tu3lé .pos2t3elec .pos2t3impr .pos2t3ope .pos2t3rev .pos2t3rom .pos3taci .pos3tar .pos3tear .pos3te3me .pos3ta3je .pos3te3ler .pos3te3ma .pos3te3mi .pos3te3río .pos3te3ta .pos3ti3le .pos3ti3llo .pos3ti3lo .pos3ti3lá .pos3ti3lé .pos3ti3ló .posti3nudo .posto3res .pos3tu3lo .pos3tu3ló .pos3tón .pos3te3mas .pos3ti3cer .pos3tism .pos3tu3reo .pos3te3lera .pos3teo .pos3ti3ll .pos3tista .pre1h .pre1a2 .pre1e2 .pre1i2 .pre1o2 .pre1u2 .pre1á2 .pre1é2 .pre1í2 .pre1ó2 .pre1ú2 .pre4ámbul .pre4o3cup .pre4o3cúp .pre4ordin .pre4ordín .pro1h .pro2a2 .pro2e2 .pro2i2 .pro2o2 .pro2u2 .pro2á2 .pro2é2 .pro2í2 .pro2ó2 .pro2ú2 .pro3abort .pro3etarr .pro4hiba .pro4híba .pro4hibá .pro4hibe .pro4híb .pro4híbo .pro4hibi .pro4hibí proto1h proto1a2 proto1e2 proto1i2 proto1o2 proto1u2 proto1á2 proto1é2 proto1í2 proto1ó2 proto1ú2 psico1h psico1a2 psico1e2 psico1i2 psico1o2 psico1u2 psico1á2 psico1é2 psico1í2 psico1ó2 psico1ú2 3p2sic 3p2siq ptero1h ptero1a2 ptero1e2 ptero1i2 ptero1o2 ptero1u2 ptero1á2 ptero1é2 ptero1í2 ptero1ó2 ptero1ú2 quete1h quete1a2 quete1e2 quete1i2 quete1o2 quete1u2 quete1á2 quete1é2 quete1í2 quete1ó2 quete1ú2 quimio1h quimio1a2 quimio1e2 quimio1i2 quimio1o2 quimio1u2 quimio1á2 quimio1é2 quimio1í2 quimio1ó2 quimio1ú2 quiro1h quiro1a2 quiro1e2 quiro1i2 quiro1o2 quiro1u2 quiro1á2 quiro1é2 quiro1í2 quiro1ó2 quiro1ú2 radio1h radio1a2 radio1e2 radio1i2 radio1o2 radio1u2 radio1á2 radio1é2 radio1í2 radio1ó2 radio1ú2 ranco1h ranco1a2 ranco1e2 ranco1i2 ranco1o2 ranco1u2 ranco1á2 ranco1é2 ranco1í2 ranco1ó2 ranco1ú2 .re2a2 .re3e4 .re2i2 .re2o2 .re2u2 .re2á2 .re2é2 .re2í2 .re2ó2 .re2ú2 ea3cio. ea3cios. ea3cia. ea3cias. .re3abr .re3ábr .re3abiert .re3absor .re3absór .re3admis .re3admit .re3admít .re3afirm .re3afírm .re3agrav .re3agráv .re3acondic .re3acuñ .re3acúñ .re3ajust .rea3júst .re3alegr .re3alégr .rea3liza .rea3lizá .rea3líza .re3alim .rea3lism .rea3list .re3aloj .re3alój .re3alq .re3anim .re3aním .re3ama .re3áma .re3amá .re3ame .re3áme .re3amé .re3amo .re3ámo .re3amó .re3aparec .re3aprend .re3aprénd .re3apret .reapríet .rei3no .re3ubica .re3ubíca .re3ubicá .re3ubico .re3ubicó .re3ubiq .re3ubíq .reu3mati .reu3máti .reu3nir .reu3nír .reu3nia .reu3ní .reu3nis .reunim .reu3ná .reu3nie .reu3nié .reu3nid .reu3nió .re3unif .re3usar .re3usár .re3utiliz .re3utilíz .re3a2eg .re3a2q .re3a2z .re3asum .re3asúm .re3a2grup .re3i2m .re3inc .re3inic .re3inf .re3ing .re3inv .rei3na .re3ins .re3int .re3o2b .re3orient .rei3vind .re3oc .re4o3j .re3orga .re3unt .reu3ma rete1h rete1a2 rete1e2 rete1i2 rete1o2 rete1u2 rete1á2 rete1é2 rete1í2 rete1ó2 rete1ú2 rmano1h rmano1a2 rmano1e2 rmano1i2 rmano1o2 rmano1u2 rmano1á2 rmano1é2 rmano1í2 rmano1ó2 rmano1ú2 retro1h retro1a2 retro1e2 retro1i2 retro1o2 retro1u2 retro1á2 retro1é2 retro1í2 retro1ó2 retro1ú2 romo1h romo1a2 romo1e2 romo1i2 romo1o2 romo1u2 romo1á2 romo1é2 romo1í2 romo1ó2 romo1ú2 salva1h salva1a2 salva1e2 salva1i2 salva1o2 salva1u2 salva1á2 salva1é2 salva1í2 salva1ó2 salva1ú2 seleno1h seleno1a2 seleno1e2 seleno1i2 seleno1o2 seleno1u2 seleno1á2 seleno1é2 seleno1í2 seleno1ó2 seleno1ú2 semi1h semi1a2 semi1e2 semi1i2 semi1o2 semi1u2 semi1á2 semi1é2 semi1í2 semi1ó2 semi1ú2 i2a. i2as. 2ótic emi2o2 servo1h servo1a2 servo1e2 servo1i2 servo1o2 servo1u2 servo1á2 servo1é2 servo1í2 servo1ó2 servo1ú2 2seudo1h 2seudo1a2 2seudo1e2 2seudo1i2 2seudo1o2 2seudo1u2 2seudo1á2 2seudo1é2 2seudo1í2 2seudo1ó2 2seudo1ú2 o2os. .so3a4s sobre1h sobre1a2 sobre1e2 sobre1i2 sobre1o2 sobre1u2 sobre1á2 sobre1é2 sobre1í2 sobre1ó2 sobre1ú2 sobre3a4sa sobre3a4sas socio1h socio1a2 socio1e2 socio1i2 socio1o2 socio1u2 socio1á2 socio1é2 socio1í2 socio1ó2 socio1ú2 4a3rio. 4a3rios. 4a3ria. 4a3rias. 3logía 4ón. 4ones. 4i4er. 4o2ico. 4o2icos. 4o2ica. 4o2icas. .su2b1h .su2b2a2 .su2b2e2 .su2b2i2 .su2b2o2 .su2b2u2 .su2b2á2 .su2b2é2 .su2b2í2 .su2b2ó2 .su2b2ú2 .sub3acuát .subi3ll .su3bi3da .su3bi3dor .su3bi3do .su3bi3dón .su3basta .su3básta .su3bastá .su3baste .su3básté .su3basto .su3bástó .sub3índ .sub3ími .su4b3ray .sub3acepc .sub3acet .sub3aflue .sub3alcai .sub3arr .sub3ártic .sub3atómic .sub3ejecut .sub3elemen .sub3emple .sub3enten .seb3entrad .sub3espec .sub3estac .sub3estim .sub3estím .sub3estruc .sub3occipit .sub3ofici .su3bordin .su3bordín .sub3urba .sub3aliment .su3balter .sub3insp .sub3intenden .su3bir .su3bír .su3bién .su3bi3mien .su3bier .su3bies .su2r1est .su2r1oes supe2r3r supe2r1h supe2r1a2 supe2r1e2 supe2r1i2 supe2r1o2 supe2r1u2 supe2r1á2 supe2r1é2 supe2r1í2 supe2r1ó2 supe2r1ú2 ra5ra ra5rá ra5re ra5ré ra5rí ra5ro supe3r4a4r supe3r4á4r supe3r4á3vit. supe3r4á3vits. super4ior 4a3ción. 4a3ciones. 4e3rior. 4e3riores. 4e3riora. 4e3rioras. 4e3riormente. 4e3rioridad. 4e3rioridades. 4e3r4a3ble. 4e3r4a3bles. 4e3r4a3blemente. pe5r4ante perpon5d6r supra1h supra1a2 supra1e2 supra1i2 supra1o2 supra1u2 supra1á2 supra1é2 supra1í2 supra1ó2 supra1ú2 sup6ra talmo1h talmo1a2 talmo1e2 talmo1i2 talmo1o2 talmo1u2 talmo1á2 talmo1é2 talmo1í2 talmo1ó2 talmo1ú2 tele1h tele1a2 tele1e2 tele1i2 tele1o2 tele1u2 tele1á2 tele1é2 tele1í2 tele1ó2 tele1ú2 4ósteo. 4ósteos. tecno1h tecno1a2 tecno1e2 tecno1i2 tecno1o2 tecno1u2 tecno1á2 tecno1é2 tecno1í2 tecno1ó2 tecno1ú2 .tele1imp .tele1obj .tele4o3lót tera1h tera1a2 tera1e2 tera1i2 tera1o2 tera1u2 tera1á2 tera1é2 tera1í2 tera1ó2 tera1ú2 termo1h termo1a2 termo1e2 termo1i2 termo1o2 termo1u2 termo1á2 termo1é2 termo1í2 termo1ó2 termo1ú2 tetra1h tetra1a2 tetra1e2 tetra1i2 tetra1o2 tetra1u2 tetra1á2 tetra1é2 tetra1í2 tetra1ó2 tetra1ú2 topo1h topo1a2 topo1e2 topo1i2 topo1o2 topo1u2 topo1á2 topo1é2 topo1í2 topo1ó2 topo1ú2 .tra2s1h .tra2sa2 .tra2se2 .tra2si2 .tra2so2 .tra2su2 .tra2sá2 .tra2sé2 .tra2sí2 .tra2só2 .tra2sú2 tras1abuel tras1alcob tras1alp tras1altar tras1andin tras1atlánt tras1oceán tra3se3ro. tra3se3ros. tra3se3ra. tra3se3ras. .tra3su3da .tra3su3dá .tra3su3de .tra3su3dé .tra3su3do .tra3su3dó .tra3sunta .tra3suntá .tra3sunte .tra3sunté .tra3sunto .tra3suntó .tra3so3ñ .tra3se3g .tra3sieg tran2s1h tran2sa2 tran2se2 tran2si2 tran2so2 tran2su2 tran2sá2 tran2sé2 tran2sí2 tran2só2 tran2sú2 trans3aminas tran2s1and tran2s1atl tran2s1oce tran2s1ur tran3sacci tran3sactiv tran3seún tran3se3xu tran3si3berian tran3si3cion tran3si3ción tran3sido. tran3sidos. tran3sida. tran3sidas. tran3si3gi tran3si3gí tran3si3ge tran3si3ja tran3si3já tran3si3jo tran3silvan tran3sisto tran3si3ta tran3si3tá tran3si3te tran3si3té tran3si3to tran3si3tó tran3si3tiv tran3si3tori trans3oraci tran3subst tran3sust .tri1ó2x tropo1h tropo1a2 tropo1e2 tropo1i2 tropo1o2 tropo1u2 tropo1á2 tropo1é2 tropo1í2 tropo1ó2 tropo1ú2 turbo1h turbo1a2 turbo1e2 turbo1i2 turbo1o2 turbo1u2 turbo1á2 turbo1é2 turbo1í2 turbo1ó2 turbo1ú2 ultra1h ultra1a2 ultra1e2 ultra1i2 ultra1o2 ultra1u2 ultra1á2 ultra1é2 ultra1í2 ultra1ó2 ultra1ú2 vice1h vice1a2 vice1e2 vice1i2 vice1o2 vice1u2 vice1á2 vice1é2 vice1í2 vice1ó2 vice1ú2 video1h video1a2 video1e2 video1i2 video1o2 video1u2 video1á2 video1é2 video1í2 video1ó2 video1ú2 xeno1h xeno1a2 xeno1e2 xeno1i2 xeno1o2 xeno1u2 xeno1á2 xeno1é2 xeno1í2 xeno1ó2 xeno1ú2 xero1h xero1a2 xero1e2 xero1i2 xero1o2 xero1u2 xero1á2 xero1é2 xero1í2 xero1ó2 xero1ú2 xilo1h xilo1a2 xilo1e2 xilo1i2 xilo1o2 xilo1u2 xilo1á2 xilo1é2 xilo1í2 xilo1ó2 xilo1ú2 zoo1h zoo1a2 zoo1e2 zoo1i2 zoo1o2 zoo1u2 zoo1á2 zoo1é2 zoo1í2 zoo1ó2 zoo1ú2 wa3s4h 3grafo. 3grafa. 3grafos. 3grafas. 3grafía. 3grafías. o4i3dea. o4i3deas. o4i3dal. o4i3dales. 4o2i3de. 4o2i3des. 4i2dal. 4i2dales. 4i3deo. 4i3deos. i2o. i2os. 2i3co. 2i3cos. 2i3ca. 2i3cas. 4e3dro. 4e3dros. 4é3drico. 4é3dricos. 4é3drica. 4é3dricas. 4í3ble. 4í3bles. 3hablante 3habiente 5humano 5humana 3a4ficionad 3a4merican su2d3a4merican su2r3a4merican 3e4lectr 3e4léctr di4e5lec di4e5léc 5i4ndustr 5islámi 5islami 5ingenier 5técnic 5biología 5céntrico 5e4cuatorial 7u4niversid 5u4niversit",
["lefthyphenmin"]=1,
- ["length"]=29622,
- ["n"]=3591,
+ ["length"]=39988,
+ ["n"]=4694,
["righthyphenmax"]=1,
},
["version"]="1.001",
diff --git a/Master/texmf-dist/tex/context/patterns/mkiv/lang-sr.lua b/Master/texmf-dist/tex/context/patterns/mkiv/lang-sr.lua
index d70cd9ab2af..78455bca25d 100644
--- a/Master/texmf-dist/tex/context/patterns/mkiv/lang-sr.lua
+++ b/Master/texmf-dist/tex/context/patterns/mkiv/lang-sr.lua
@@ -8,8 +8,8 @@ return {
},
["metadata"]={
["mnemonic"]="sr",
- ["source"]="hyph-sr-cyrl",
- ["texcomment"]="% no comment",
+ ["source"]="hyph-sr",
+ ["texcomment"]="% \n% \n% \n% \n% ",
},
["patterns"]={
["characters"]="абвгдежзиклмнопрÑтуфхцчшђјљњћџ",
diff --git a/Master/texmf-dist/tex/context/sample/common/cuomo.tex b/Master/texmf-dist/tex/context/sample/common/cuomo.tex
new file mode 100644
index 00000000000..b4ab3f27a8d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/common/cuomo.tex
@@ -0,0 +1,17 @@
+Yeah, my mother is not expendable. And your mother is not expendable. And our
+brothers and sisters are not expendable. And we're not going to accept a premise
+that human life is disposable. And we're not going to put a dollar figure on
+human life. First order of business is: save lives. Period. Whatever it costs.
+Now, I also don't believe it's an either or. I believe you can have an
+intelligent refined public health strategy. You talk about risk stratification.
+You can have people go to work. You can test people and find out that they are
+resolved from the virus. Let them go back to work. You can let go younger people
+back to work. You can have an economic startup strategy that is consistent with a
+public health strategy. It's smart. It's complicated. It's sophisticated. But
+that's what government is supposed to do, right. That whole concept of developed
+government policy and program. You can do both. But not in a clumsy ham-handed
+way. Right? \quotation {Well, we'll just sacrifice old people, they're old people
+anyway, and the old get left behind.} What is this? Some modern Darwinian theory
+of natural selection? You can't keep up so the band is going to leave you behind.
+We're gonna move on and if you can't keep up you, well then you just fall by the
+wayside of life. God forbid.
diff --git a/Master/texmf-dist/tex/context/sample/third/aesop-de.tex b/Master/texmf-dist/tex/context/sample/third/aesop-de.tex
index 80a41f295ef..ec7d21ee263 100644
--- a/Master/texmf-dist/tex/context/sample/third/aesop-de.tex
+++ b/Master/texmf-dist/tex/context/sample/third/aesop-de.tex
@@ -1,5 +1,3 @@
-% German example file from Aesop
-
Der L\"owe und die M\"ucke
Eine M\"ucke forderte mit den \"uberm\"utigsten Worten
@@ -14,7 +12,7 @@ kratzt. Du sollst aber empfinden, da\SS\ ich st\"arker bin
als du!} Mit diesen Worten flog sie in eines seiner
Nasenl\"ocher und stach ihn so sehr, da\SS\ er sich vor
Schmerz selbst zerfleischte und sich f\"ur \"uberwunden
-erkl\"arte.
+erkl\"arte.
Stolz auf diesen Sieg flog die M\"ucke davon, um ihn aller
Welt auszuposaunen, \"ubersah aber das Gewebe einer Spinne
@@ -22,4 +20,4 @@ und verfing sich in demselben. Gierig umarmte die Spinne
sie und sog ihr das Heldenblut aus. Sterbend empfand die
M\"ucke ihre Nichtigkeit, indem sie, die Besiegerin des
L\"owen, einem so ver\"achtlichen Tiere, einer Spinne,
-erliegen mu\SS te.
+erliegen mu\SS te.
diff --git a/Master/texmf-dist/tex/context/sample/third/herbert-en.tex b/Master/texmf-dist/tex/context/sample/third/herbert-en.tex
new file mode 100644
index 00000000000..6a75dde28d9
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/herbert-en.tex
@@ -0,0 +1,23 @@
+\startlanguage[en]
+\startlines
+Sweet day, so cool, so calm, so bright,
+The bridal of the earth and sky;
+The dew shall weep thy fall to-night,
+For thou must die.
+
+Sweet rose, whose hue angry and brave
+Bids the rash gazer wipe his eye;
+Thy root is ever in its grave,
+And thou must die.
+
+Sweet spring, full of sweet days and roses,
+A box where sweets compacted lie;
+My music shows ye have your closes,
+And all must die.
+
+Only a sweet and virtuous soul,
+Like season'd timber, never gives;
+But though the whole world turn to coal,
+Then chiefly lives.
+\stoplines
+\stoplanguage \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/sample/third/herbert-es.tex b/Master/texmf-dist/tex/context/sample/third/herbert-es.tex
new file mode 100644
index 00000000000..8bcd1b5c10b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/herbert-es.tex
@@ -0,0 +1,23 @@
+\startlanguage[es]
+\startlines
+Dulces nupcias del cielo con la tierra,
+Oh puro día añil,
+Llorará tu crepúsculo el rocío,
+Pues tendrás que morir.
+
+Oh rosa fulgurante que deslumbras
+Con tu vivo matiz,
+Tu raíz yace siempre en tu sepulcro,
+Donde habrás de morir.
+
+Oh tú de rosas y horas dulces llena,
+Primavera gentil,
+Mis cadencias demuestran que agonizas;
+Pronto habrás de morir.
+
+Tan sólo el alma dulce y virtuosa
+Madera es en sazón,
+Pues si el mundo quedara hecho cenizas
+Viviría mejor.
+\stoplines
+\stoplanguage
diff --git a/Master/texmf-dist/tex/context/sample/third/jaros-sk.tex b/Master/texmf-dist/tex/context/sample/third/jaros-sk.tex
index bd2952501a5..85dc0f48238 100644
--- a/Master/texmf-dist/tex/context/sample/third/jaros-sk.tex
+++ b/Master/texmf-dist/tex/context/sample/third/jaros-sk.tex
@@ -1,5 +1,5 @@
-Ja viem preÄo si ty tak zrazu ochorel, na spoveÄ sa ti nechce! ÄŒi chce alebo
-nie, to je teraz vedľajÅ¡ie. Sama vidíš, že kľaÄaÅ¥ nemôžem \dots -- Hanbu ti
-do kostola robiÅ¥ nepôjdem, eÅ¡te by som niekoho postojaÄky urazil \dots -- A
-s kým pôjdem na spoveÄ, vari sama? -- KeÄ nemáš s kým ísÅ¥, zober si psa. Aj
-jemu sa možno treba vyspovedať. Nebreše, beťár, ako treba \dots
+Ja viem preÄo si ty tak zrazu ochorel, na spoveÄ sa ti nechce! ÄŒi chce alebo nie,
+to je teraz vedľajÅ¡ie. Sama vidíš, že kľaÄaÅ¥ nemôžem \dots -- Hanbu ti do kostola
+robiÅ¥ nepôjdem, eÅ¡te by som niekoho postojaÄky urazil \dots -- A s kým pôjdem na
+spoveÄ, vari sama? -- KeÄ nemáš s kým ísÅ¥, zober si psa. Aj jemu sa možno treba
+vyspovedať. Nebreše, beťár, ako treba \dots
diff --git a/Master/texmf-dist/tex/context/sample/third/jaros-vlnka-sk.tex b/Master/texmf-dist/tex/context/sample/third/jaros-vlnka-sk.tex
index ea564c3ded4..92b6549ef5f 100644
--- a/Master/texmf-dist/tex/context/sample/third/jaros-vlnka-sk.tex
+++ b/Master/texmf-dist/tex/context/sample/third/jaros-vlnka-sk.tex
@@ -1,5 +1,5 @@
-Ja viem preÄo si ty tak zrazu ochorel, na spoveÄ sa ti nechce! ÄŒi chce alebo
-nie, to je teraz vedľajÅ¡ie. Sama vidíš, že kľaÄaÅ¥ nemôžem \dots -- Hanbu ti
-do kostola robiÅ¥ nepôjdem, eÅ¡te by som niekoho postojaÄky urazil \dots --
-A~s~kým pôjdem na spoveÄ, vari sama? -- KeÄ nemáš s~kým ísÅ¥, zober si psa. Aj
-jemu sa možno treba vyspovedať. Nebreše, beťár, ako treba \dots
+Ja viem preÄo si ty tak zrazu ochorel, na spoveÄ sa ti nechce! ÄŒi chce alebo nie,
+to je teraz vedľajÅ¡ie. Sama vidíš, že kľaÄaÅ¥ nemôžem \dots -- Hanbu ti do kostola
+robiÅ¥ nepôjdem, eÅ¡te by som niekoho postojaÄky urazil \dots -- A~s~kým pôjdem na
+spoveÄ, vari sama? -- KeÄ nemáš s~kým ísÅ¥, zober si psa. Aj jemu sa možno treba
+vyspovedať. Nebreše, beťár, ako treba \dots
diff --git a/Master/texmf-dist/tex/context/sample/third/khatt-en.tex b/Master/texmf-dist/tex/context/sample/third/khatt-en.tex
index 52891af25b6..26023b09a87 100644
--- a/Master/texmf-dist/tex/context/sample/third/khatt-en.tex
+++ b/Master/texmf-dist/tex/context/sample/third/khatt-en.tex
@@ -1,4 +1,4 @@
-Ê¿AlÄ« ibn AbÄ« ṬÄlib said to his scribe Ê¿UbaydullÄh ibn AbÄ« RÄfiÊ¿: Set
-down your inkwell before you, sharpen the edge of your pen, make sure
-there is open space between the lines, and set your letter|-|spacing
-closely. Now {\em that} is the way to make the script shine!
+Ê¿AlÄ« ibn AbÄ« ṬÄlib said to his scribe Ê¿UbaydullÄh ibn AbÄ« RÄfiÊ¿: Set down your
+inkwell before you, sharpen the edge of your pen, make sure there is open space
+between the lines, and set your letter|-|spacing closely. Now {\em that} is the
+way to make the script shine!
diff --git a/Master/texmf-dist/tex/context/sample/third/komensky-cz.tex b/Master/texmf-dist/tex/context/sample/third/komensky-cz.tex
index 96bfa609fb0..cbc76e0c9dc 100644
--- a/Master/texmf-dist/tex/context/sample/third/komensky-cz.tex
+++ b/Master/texmf-dist/tex/context/sample/third/komensky-cz.tex
@@ -1,33 +1,31 @@
Nejkrásnějším dílem Božím je svět, všeliké neviditelné Božské věcí viditelné
-ukazující. Nejkrásnější je ale naše duše, jíž je dáno, myšlením zobrazovat
-ve svém nitru svÄ›t i vÄ›ci veÅ¡kery. NejkrásnÄ›jší je Å™eÄ, jejíž pomocí
-vmalováváme všeliké obrazy své duše v duši druhého. Nejkrásnější je písmo,
-jímž zachycujeme a natrvalo upevňujeme Å™eÄ, samu o sobÄ› prchavou a
-pomíjející, a jímž jako bychom ji zadržovali, aby trvala. Nejkrásnější jsou
-knihy, písmem ladně sestavené, jimiž zpodobenou moudrost posíláme lidem,
-místnÄ› Äi ÄasovÄ› vzdáleným, ba dokonce i pozdnímu potomstvu. NejkrásnÄ›jším
-darem Božím je vynález tiskových liter, jimž se knihy nesmírně rychle
-rozmnožují.
+ukazující. Nejkrásnější je ale naše duše, jíž je dáno, myšlením zobrazovat ve
+svém nitru svÄ›t i vÄ›ci veÅ¡kery. NejkrásnÄ›jší je Å™eÄ, jejíž pomocí vmalováváme
+všeliké obrazy své duše v duši druhého. Nejkrásnější je písmo, jímž zachycujeme a
+natrvalo upevňujeme Å™eÄ, samu o sobÄ› prchavou a pomíjející, a jímž jako bychom ji
+zadržovali, aby trvala. Nejkrásnější jsou knihy, písmem ladně sestavené, jimiž
+zpodobenou moudrost posíláme lidem, místnÄ› Äi ÄasovÄ› vzdáleným, ba dokonce i
+pozdnímu potomstvu. Nejkrásnějším darem Božím je vynález tiskových liter, jimž se
+knihy nesmírně rychle rozmnožují.
SazeÄ, maje pÅ™ed sebou kasu, naplnÄ›nou kovovými literkami, uloženými v
-přihrádkách, dívá se do rukopisu, postaveného na vidlici tak, aby pohodlně
-viděl, v levé ruce sázítko, pravou rukou vybírá (z přihrádek) literky a
-skládá je do sázítka v slova: když naplní sloupec, přenáší je na desku.
-Jakmile pak je naplnÄ›n poÄet sloupců pro jednu stranu archu, rozdÄ›lí je
-příložkami, ováže je a stáhne železnými rámy, aby se nerozpadly; a tím se
-podle svého mínění své povinnosti zhostil.
+přihrádkách, dívá se do rukopisu, postaveného na vidlici tak, aby pohodlně viděl,
+v levé ruce sázítko, pravou rukou vybírá (z přihrádek) literky a skládá je do
+sázítka v slova: když naplní sloupec, přenáší je na desku. Jakmile pak je naplněn
+poÄet sloupců pro jednu stranu archu, rozdÄ›lí je příložkami, ováže je a stáhne
+železnými rámy, aby se nerozpadly; a tím se podle svého mínění své povinnosti
+zhostil.
-A tak tito vÅ¡ichni pracujíce vzájemnÄ› vykonávající jakoby hraÄkou
-podivuhodné dílo, lidem kdysi nepochopitelné, jen když mají vÅ¡ichni to, Äeho
-je přitom potření, jednak odborné znalosti zbystřené praxí, jednak vytrvalou
-pozornost a píli. Znalosti: poněvadž třebaže je tiskařství řemeslem, je
-nejsubtilnÄ›jším umÄ›ním, skládajícím se z pÅ™eÄetných maliÄkostí, na něž nutno
-dávat dobrý pozor. Pozornost a píli: poněvadž zde, kde se stýká tolik
-maliÄkostí, velmi snadno se nÄ›co pÅ™ihodí, co by dílo ruÅ¡ilo, kdyby se
-nebdělo.
+A tak tito vÅ¡ichni pracujíce vzájemnÄ› vykonávající jakoby hraÄkou podivuhodné
+dílo, lidem kdysi nepochopitelné, jen když mají vÅ¡ichni to, Äeho je pÅ™itom
+potření, jednak odborné znalosti zbystřené praxí, jednak vytrvalou pozornost a
+píli. Znalosti: poněvadž třebaže je tiskařství řemeslem, je nejsubtilnějším
+umÄ›ním, skládajícím se z pÅ™eÄetných maliÄkostí, na něž nutno dávat dobrý pozor.
+Pozornost a píli: ponÄ›vadž zde, kde se stýká tolik maliÄkostí, velmi snadno se
+něco přihodí, co by dílo rušilo, kdyby se nebdělo.
-Tolik ve všeobecnosti o tom, jak se tisknou knihy vůbec. Jestliže by se
-naskytla otázka, jak vznikají knihy dobré, bude třeba říci, že je žádoucí za
-prvé rozumně sepsaný rukopis, hodný světla a nikoli tmy; na druhém místě
-elegantní typy; na tÅ™etím Äistý papír; na Ätvrtém pak pozorná práce, aby vÅ¡e
-až do poslední Äárky bylo zÅ™etelné, rozliÅ¡ené a správné.
+Tolik ve všeobecnosti o tom, jak se tisknou knihy vůbec. Jestliže by se naskytla
+otázka, jak vznikají knihy dobré, bude třeba říci, že je žádoucí za prvé rozumně
+sepsaný rukopis, hodný světla a nikoli tmy; na druhém místě elegantní typy; na
+tÅ™etím Äistý papír; na Ätvrtém pak pozorná práce, aby vÅ¡e až do poslední Äárky
+bylo zřetelné, rozlišené a správné.
diff --git a/Master/texmf-dist/tex/context/sample/third/komensky-vlnka-cz.tex b/Master/texmf-dist/tex/context/sample/third/komensky-vlnka-cz.tex
index f9998f903b5..6e45b005667 100644
--- a/Master/texmf-dist/tex/context/sample/third/komensky-vlnka-cz.tex
+++ b/Master/texmf-dist/tex/context/sample/third/komensky-vlnka-cz.tex
@@ -1,33 +1,31 @@
Nejkrásnějším dílem Božím je svět, všeliké neviditelné Božské věcí viditelné
-ukazující. Nejkrásnější je ale naše duše, jíž je dáno, myšlením zobrazovat
-ve svém nitru svÄ›t i~vÄ›ci veÅ¡kery. NejkrásnÄ›jší je Å™eÄ, jejíž pomocí
-vmalováváme všeliké obrazy své duše v~duši druhého. Nejkrásnější je písmo,
-jímž zachycujeme a~natrvalo upevňujeme Å™eÄ, samu o~sobÄ› prchavou
-a~pomíjející, a~jímž jako bychom ji zadržovali, aby trvala. Nejkrásnější jsou
-knihy, písmem ladně sestavené, jimiž zpodobenou moudrost posíláme lidem,
-místnÄ› Äi ÄasovÄ› vzdáleným, ba dokonce i~pozdnímu potomstvu. NejkrásnÄ›jším
-darem Božím je vynález tiskových liter, jimž se knihy nesmírně rychle
-rozmnožují.
+ukazující. Nejkrásnější je ale naše duše, jíž je dáno, myšlením zobrazovat ve
+svém nitru svÄ›t i~vÄ›ci veÅ¡kery. NejkrásnÄ›jší je Å™eÄ, jejíž pomocí vmalováváme
+všeliké obrazy své duše v~duši druhého. Nejkrásnější je písmo, jímž zachycujeme
+a~natrvalo upevňujeme Å™eÄ, samu o~sobÄ› prchavou a~pomíjející, a~jímž jako bychom
+ji zadržovali, aby trvala. Nejkrásnější jsou knihy, písmem ladně sestavené, jimiž
+zpodobenou moudrost posíláme lidem, místnÄ› Äi ÄasovÄ› vzdáleným, ba dokonce
+i~pozdnímu potomstvu. Nejkrásnějším darem Božím je vynález tiskových liter, jimž
+se knihy nesmírně rychle rozmnožují.
SazeÄ, maje pÅ™ed sebou kasu, naplnÄ›nou kovovými literkami, uloženými
v~přihrádkách, dívá se do rukopisu, postaveného na vidlici tak, aby pohodlně
-viděl, v~levé ruce sázítko, pravou rukou vybírá (z~přihrádek) literky
-a~skládá je do sázítka v~slova: když naplní sloupec, přenáší je na desku.
-Jakmile pak je naplnÄ›n poÄet sloupců pro jednu stranu archu, rozdÄ›lí je
-příložkami, ováže je a~stáhne železnými rámy, aby se nerozpadly; a~tím se
-podle svého mínění své povinnosti zhostil.
+viděl, v~levé ruce sázítko, pravou rukou vybírá (z~přihrádek) literky a~skládá je
+do sázítka v~slova: když naplní sloupec, přenáší je na desku. Jakmile pak je
+naplnÄ›n poÄet sloupců pro jednu stranu archu, rozdÄ›lí je příložkami, ováže je
+a~stáhne železnými rámy, aby se nerozpadly; a~tím se podle svého mínění své
+povinnosti zhostil.
-A~tak tito vÅ¡ichni pracujíce vzájemnÄ› vykonávající jakoby hraÄkou
-podivuhodné dílo, lidem kdysi nepochopitelné, jen když mají vÅ¡ichni to, Äeho
-je přitom potřebí, jednak odborné znalosti zbystřené praxí, jednak vytrvalou
-pozornost a~píli. Znalosti: poněvadž třebaže je tiskařství řemeslem, je
-nejsubtilnÄ›jším umÄ›ním, skládajícím se z~pÅ™eÄetných maliÄkostí, na něž nutno
-dávat dobrý pozor. Pozornost a~píli: poněvadž zde, kde se stýká tolik
-maliÄkostí, velmi snadno se nÄ›co pÅ™ihodí, co by dílo ruÅ¡ilo, kdyby se
-nebdělo.
+A~tak tito vÅ¡ichni pracujíce vzájemnÄ› vykonávající jakoby hraÄkou podivuhodné
+dílo, lidem kdysi nepochopitelné, jen když mají vÅ¡ichni to, Äeho je pÅ™itom
+potřebí, jednak odborné znalosti zbystřené praxí, jednak vytrvalou pozornost
+a~píli. Znalosti: poněvadž třebaže je tiskařství řemeslem, je nejsubtilnějším
+umÄ›ním, skládajícím se z~pÅ™eÄetných maliÄkostí, na něž nutno dávat dobrý pozor.
+Pozornost a~píli: ponÄ›vadž zde, kde se stýká tolik maliÄkostí, velmi snadno se
+něco přihodí, co by dílo rušilo, kdyby se nebdělo.
-Tolik ve všeobecnosti o~tom, jak se tisknou knihy vůbec. Jestliže by se
-naskytla otázka, jak vznikají knihy dobré, bude třeba říci, že je žádoucí za
-prvé rozumně sepsaný rukopis, hodný světla a~nikoli tmy; na druhém místě
-elegantní typy; na tÅ™etím Äistý papír; na Ätvrtém pak pozorná práce, aby vÅ¡e
-až do poslední Äárky bylo zÅ™etelné, rozliÅ¡ené a~správné.
+Tolik ve všeobecnosti o~tom, jak se tisknou knihy vůbec. Jestliže by se naskytla
+otázka, jak vznikají knihy dobré, bude třeba říci, že je žádoucí za prvé rozumně
+sepsaný rukopis, hodný světla a~nikoli tmy; na druhém místě elegantní typy; na
+tÅ™etím Äistý papír; na Ätvrtém pak pozorná práce, aby vÅ¡e až do poslední Äárky
+bylo zřetelné, rozlišené a~správné.
diff --git a/Master/texmf-dist/tex/context/sample/third/krdel-sk.tex b/Master/texmf-dist/tex/context/sample/third/krdel-sk.tex
index 2f2395427e9..d0db0b64fb9 100644
--- a/Master/texmf-dist/tex/context/sample/third/krdel-sk.tex
+++ b/Master/texmf-dist/tex/context/sample/third/krdel-sk.tex
@@ -1,7 +1,6 @@
-
KÅ”DEĽ ŠŤASTNÃCH ÄŽATĽOV UČà PRI ÚSTà VÃHU MĹKVÉHO KOŇA OBHRÃZAŤ KÔRU A ŽRAŤ ÄŒERSTVÉ MÄSO.
KÅ•deľ Å¡Å¥astných Äatľov uÄí pri ústí Váhu mĺkveho koňa obhrýzaÅ¥ kôru a žraÅ¥ Äerstvé mäso.
-0123456789 :;!?()[]\{\} -/--/--- ÖÜŮŘ öüůř
+0123456789 :;!?()[]\{\} -/--/--- ÖÜŮŘ öüůř
diff --git a/Master/texmf-dist/tex/context/sample/third/kun-cz.tex b/Master/texmf-dist/tex/context/sample/third/kun-cz.tex
index ee1471c1b4f..d629d89425f 100644
--- a/Master/texmf-dist/tex/context/sample/third/kun-cz.tex
+++ b/Master/texmf-dist/tex/context/sample/third/kun-cz.tex
@@ -1,7 +1,6 @@
-
ŽLUŤOUÄŒKà KŮŇ ÚPÄšL ÄŽÃBELSKÉ ÓDY,
žluÅ¥ouÄký kůň úpÄ›l Äábelské ódy.
-0123456789 :;!?()[]\{\} -/--/--- ŕĺľäöü ŔĹĽÄÖÜ
+0123456789 :;!?()[]\{\} -/--/--- ŕĺľäöü ŔĹĽÄÖÜ
diff --git a/Master/texmf-dist/tex/context/sample/third/pope-en.tex b/Master/texmf-dist/tex/context/sample/third/pope-en.tex
new file mode 100644
index 00000000000..198ca62454c
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/pope-en.tex
@@ -0,0 +1,28 @@
+\startlanguage[en]
+\startlines
+Happy the man, whose wish and care
+A few paternal acres bound,
+Content to breathe his native air
+In his own ground.
+
+Whose herds with milk, whose fields with bread,
+Whose flocks supply him with attire,
+Whose trees in summer yield him shade,
+In winter fire.
+
+Blest, who can unconcern'dly find
+Hours, days, and years slide soft away,
+In health of body, peace of mind,
+Quiet by day;
+
+Sound sleep by night; study and ease,
+Together mix'd; sweet recreation;
+And innocence, which most does please,
+With meditation.
+
+Thus let me live, unseen, unknown,
+Thus unlamented let me die,
+Steal from the world, and not a stone
+Tell where I lie.
+\stoplines
+\stoplanguage
diff --git a/Master/texmf-dist/tex/context/sample/third/pope-es.tex b/Master/texmf-dist/tex/context/sample/third/pope-es.tex
new file mode 100644
index 00000000000..78166c1feea
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/pope-es.tex
@@ -0,0 +1,28 @@
+\startlanguage[es]
+\startlines
+Feliz quien goza en ocuparse en calma
+De unas hectáreas del sol paterno,
+Feliz quien puede respirar, gozoso,
+Su aire nativo.
+
+Cuyo hato bríndale espumosa leche,
+Pan sus trigales, sus ovejas lana,
+Sombra en verano sus frondosos árboles,
+Fuego en invierno.
+
+Feliz de aquel que indiferente observa
+Cómo las horas se deslizan mansas,
+Sano de cuerpo y con tranquilo espíritu,
+Día por día.
+
+Quien duerme, plácido, y el estudio alterna
+Con el reposo, y ameniza el tiempo,
+Y une a su pura sencillez dulcísimas
+Meditaciones.
+
+Dejad que viva en dulce paz oculto,
+Dejad que muera sin lamentos múltiples,
+Que me hurte al mundo y ni una losa diga
+Donde reposo.
+\stoplines
+\stoplanguage
diff --git a/Master/texmf-dist/tex/context/sample/third/readme.txt b/Master/texmf-dist/tex/context/sample/third/readme.txt
new file mode 100644
index 00000000000..24fc809e426
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/readme.txt
@@ -0,0 +1,128 @@
+------------------------------------------------------------------------------------
+aesop-de.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+aristotle-grc.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+capek-cz.tex capek-vlnka-cz.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+cervantes-es.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+dequincey.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+dyrynk-cz.tex dyrynk-vlnka-cz.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+herbert-en.tex herbert-es.tex
+------------------------------------------------------------------------------------
+
+Virtue Traducción de Fernando Maristany (1918)
+Virtud Translation by Fernando Maristany (1918)
+
+------------------------------------------------------------------------------------
+hviezdoslav-sk.tex hviezdoslav-vlnka-sk.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+jaros-sk.tex jaros-vlnka-sk.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+khatt-ar.tex khatt-en.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+kollar-cz.tex kollar-vlnka-cz.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+komensky-cz.tex komensky-vlnka-cz.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+krdel-sk.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+kun-cz.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+pope-en.tex pope-es.tex
+------------------------------------------------------------------------------------
+
+Ode on solitude Translation by Fernando Maristany (1918)
+Oda a la soledad Traducción de Fernando Maristany (1918)
+
+------------------------------------------------------------------------------------
+quevedo-es.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+shakespeare-en.tex shakespeare-es.tex
+------------------------------------------------------------------------------------
+
+Sonnet 18 Translation by Fernando Maristany (1918)
+Soneto XVIII Traducción de Fernando Maristany (1918)
+
+------------------------------------------------------------------------------------
+shelley-en.tex shelley-es.tex shelley-fr.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+slova-sk.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+smrek-sk.tex smrek-vlnka-sk.tex
+------------------------------------------------------------------------------------
+
+no comment
+
+------------------------------------------------------------------------------------
+vallejo-trilce-es.tex
+------------------------------------------------------------------------------------
+
+Poema XXXIII
diff --git a/Master/texmf-dist/tex/context/sample/third/shakespeare-en.tex b/Master/texmf-dist/tex/context/sample/third/shakespeare-en.tex
new file mode 100644
index 00000000000..c06d1954de8
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/shakespeare-en.tex
@@ -0,0 +1,21 @@
+\startlanguage[en]
+\startlines
+Shall I compare thee to a summer’s day?
+Thou art more lovely and more temperate:
+Rough winds do shake the darling buds of May,
+And summer’s lease hath all too short a date:
+
+Sometime too hot the eye of heaven shines,
+And often is his gold complexion dimmed;
+And every fair from fair sometime declines,
+By chance, or nature’s changing course, untrimmed:
+
+But thy eternal summer shall not fade,
+Nor lose possession of that fair thou ow’st;
+Nor shall Death brag thou wander’st in his shade
+When in eternal lines to time thou grow’st:
+
+So long as men can breathe or eyes can see,
+So long lives this, and this gives life to thee.
+\stoplines
+\stoplanguage
diff --git a/Master/texmf-dist/tex/context/sample/third/shakespeare-es.tex b/Master/texmf-dist/tex/context/sample/third/shakespeare-es.tex
new file mode 100644
index 00000000000..eacc5493190
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/shakespeare-es.tex
@@ -0,0 +1,21 @@
+\startlanguage[es]
+\startlines
+¿Te puedo comparar con el estío?
+Tú eres más atractiva y más suave;
+El huracán desflora a su albedrío,
+Y el paso del verano es del ave.
+
+La pupila del cielo es harto cálida;
+La faz de oro a menudo palidece;
+La más pura belleza queda pálida,
+Pues todo en la Natura descaece.
+
+Mas tú no puedes nunca marchitarte,
+Tu belleza jamás se velará,
+Y la muerte en sus sombras ocultarte,
+Cuando acabes la senda, no podrá.
+
+Mientras la humanidad no esté extinguida
+Tu estío vivirá y te dará vida.
+\stoplines
+\stoplanguage
diff --git a/Master/texmf-dist/tex/context/sample/third/shelley-en.tex b/Master/texmf-dist/tex/context/sample/third/shelley-en.tex
new file mode 100644
index 00000000000..12e336b18a3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/shelley-en.tex
@@ -0,0 +1,21 @@
+\startlanguage[en]
+\startlines
+I met a traveller from an antique land,
+Who said—\quotation{Two vast and trunkless legs of stone
+Stand in the desert. . . . Near them, on the sand,
+Half sunk a shattered visage lies, whose frown,
+
+And wrinkled lip, and sneer of cold command,
+Tell that its sculptor well those passions read
+Which yet survive, stamped on these lifeless things,
+The hand that mocked them, and the heart that fed;
+
+And on the pedestal, these words appear:
+My name is Ozymandias, King of Kings;
+Look on my Works, ye Mighty, and despair!
+
+Nothing beside remains. Round the decay
+Of that colossal Wreck, boundless and bare
+The lone and level sands stretch far away.}
+\stoplines
+\stoplanguage \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/sample/third/shelley-es.tex b/Master/texmf-dist/tex/context/sample/third/shelley-es.tex
new file mode 100644
index 00000000000..57dcb2ad53f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/shelley-es.tex
@@ -0,0 +1,21 @@
+\startlanguage[es]
+\startlines
+Conocí a un viajero de una tierra antigua
+quien dijo: «dos enormes piernas pétreas, sin su tronco
+se yerguen en el desierto. A su lado, en la arena,
+semihundido, yace un rostro hecho pedazos, cuyo ceño
+
+y mueca en la boca, y desdén de frío dominio,
+cuentan que su escultor comprendió bien esas pasiones
+las cuales aún sobreviven, grabadas en estos inertes objetos,
+a las manos que las tallaron y al corazón que las alimentó.
+
+Y en el pedestal se leen estas palabras:
+\quotation{Mi nombre es Ozymandias, rey de reyes:
+¡Contemplad mis obras, poderosos, y desesperad!}
+
+Nada queda a su lado. Alrededor de la decadencia
+de estas colosales ruinas, infinitas y desnudas
+se extienden, a lo lejos, las solitarias y llanas arenas».
+\stoplines
+\stoplanguage \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/sample/third/shelley-fr.tex b/Master/texmf-dist/tex/context/sample/third/shelley-fr.tex
new file mode 100644
index 00000000000..c9133e464e3
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/shelley-fr.tex
@@ -0,0 +1,21 @@
+\startlanguage[fr]
+\startlines
+J’ai rencontré un voyageur de retour d’une terre antique
+Qui m'a dit : \quotation{Deux immenses jambes de pierre dépourvues de buste
+Se dressent dans le désert. Près d’elles, sur le sable,
+À moitié enfoui, gît un visage brisé dont le sourcil froncé,
+
+La lèvre plissée et le rictus de froide autorité
+Disent que son sculpteur sut lire les passions
+Qui, gravées sur ces objets sans vie, survivent encore
+À la main qui les imita et au cœur qui les nourrit.
+
+Et sur le piédestal il y a ces mots :
+\quote{Mon nom est Ozymandias, Roi des Rois.
+Voyez mon œuvre, ô puissants, et désespérez !}
+
+À côté, rien ne demeure. Autour des ruines
+De cette colossale épave, infinis et nus,
+Les sables monotones et solitaires s’étendent au loin.}
+\stoplines
+\stoplanguage \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/sample/third/vallejo-trilce-es.tex b/Master/texmf-dist/tex/context/sample/third/vallejo-trilce-es.tex
new file mode 100644
index 00000000000..09f052e6acd
--- /dev/null
+++ b/Master/texmf-dist/tex/context/sample/third/vallejo-trilce-es.tex
@@ -0,0 +1,28 @@
+%Poema XXXIII
+\startlanguage[es]
+\startlines
+999 calorías.
+Rumbbb . . . . Trrraprrrr rrach . . . chaz
+Serpentínica u del bizcochero
+engirafada al tímpano.
+
+Quién como los hielos. Pero nó.
+Quién como lo que va ni más ni menos.
+Quién como el justo medio.
+
+1.000 calorías.
+Azulea y ríe su gran cachaza el firmamento gringo. Baja
+el sol empavado y le alborota los cascos
+al más frío.
+
+Remeda al cuco: Roooooooeeeis.
+tierno autocarril, móvil de sed,
+que corre hasta la playa.
+
+Aire, aire! Hielo!
+Si al menos el calor (------Mejor
+no digo nada.
+
+Treinta y tres trillones trescientos treinta y tres calorías.
+\stoplines
+\stoplanguage
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua
index 3959ca02221..5a6e90ceee7 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua
@@ -105,14 +105,14 @@ utilities.parsers = utilities.parsers or {
end,
settings_to_hash = function(s)
local t = { }
- for k, v in gmatch(s,"([^%s,=]+)=([^%s,]+)") do
+ for k, v in gmatch((gsub(s,"^{(.*)}$", "%1")),"([^%s,=]+)=([^%s,]+)") do
t[k] = v
end
return t
end,
settings_to_hash_colon_too = function(s)
local t = { }
- for k, v in gmatch(s,"([^%s,=:]+)[=:]([^%s,]+)") do
+ for k, v in gmatch((gsub(s,"^{(.*)}$", "%1")),"([^%s,=:]+)[=:]([^%s,]+)") do
t[k] = v
end
return t
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-nod.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-nod.lua
index 0fb768cf83f..25f5473a5a3 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-nod.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-nod.lua
@@ -66,9 +66,10 @@ for k, v in next, disccodes do
disccodes[v] = k
end
-nodes.nodecodes = nodecodes
-nodes.glyphcodes = glyphcodes
-nodes.disccodes = disccodes
+nodes.nodecodes = nodecodes
+nodes.glyphcodes = glyphcodes
+nodes.disccodes = disccodes
+nodes.dirvalues = { lefttoright = 0, righttoleft = 1 }
nodes.handlers.protectglyphs = node.protect_glyphs -- beware: nodes!
nodes.handlers.unprotectglyphs = node.unprotect_glyphs -- beware: nodes!
@@ -106,6 +107,7 @@ nuts.getkern = direct.getkern
nuts.getlist = direct.getlist
nuts.getnext = direct.getnext
nuts.getoffsets = direct.getoffsets
+nuts.getoptions = direct.getoptions or function() return 0 end
nuts.getprev = direct.getprev
nuts.getsubtype = direct.getsubtype
nuts.getwidth = direct.getwidth
@@ -205,6 +207,19 @@ local copy_node = nuts.copy_node
local glyph_code = nodes.nodecodes.glyph
local ligature_code = nodes.glyphcodes.ligature
+do -- this is consistent with the rest of context, not that we need it
+
+ local p = nodecodes.localpar or nodecodes.local_par
+
+ if p then
+ nodecodes.par = p
+ nodecodes[p] = "par"
+ nodecodes.localpar = p -- for old times sake
+ nodecodes.local_par = p -- for old times sake
+ end
+
+end
+
do
local get_components = node.direct.getcomponents
@@ -263,11 +278,16 @@ do
return 0
end
+ local function flush_components()
+ -- this is a no-op in mkiv / generic
+ end
+
nuts.set_components = set_components
nuts.get_components = get_components
nuts.copy_only_glyphs = copy_only_glyphs
nuts.copy_no_components = copy_no_components
nuts.count_components = count_components
+ nuts.flush_components = flush_components
end
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
index 0d467a2448a..0dae380efed 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 2020-03-10 14:44
+-- merge date : 2021-03-05 19:11
do -- begin closure to overcome local limits and interference
@@ -99,9 +99,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -225,11 +222,13 @@ local fullstripper=whitespace^0*C((whitespace^0*nonwhitespace^1)^0)
local collapser=Cs(spacer^0/""*nonspacer^0*((spacer^0/" "*nonspacer^1)^0))
local nospacer=Cs((whitespace^1/""+nonwhitespace^1)^0)
local b_collapser=Cs(whitespace^0/""*(nonwhitespace^1+whitespace^1/" ")^0)
-local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
local m_collapser=Cs((nonwhitespace^1+whitespace^1/" ")^0)
+local e_collapser=Cs((whitespace^1*endofstring/""+nonwhitespace^1+whitespace^1/" ")^0)
+local x_collapser=Cs((nonwhitespace^1+whitespace^1/"" )^0)
local b_stripper=Cs(spacer^0/""*(nonspacer^1+spacer^1/" ")^0)
-local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
local m_stripper=Cs((nonspacer^1+spacer^1/" ")^0)
+local e_stripper=Cs((spacer^1*endofstring/""+nonspacer^1+spacer^1/" ")^0)
+local x_stripper=Cs((nonspacer^1+spacer^1/"" )^0)
patterns.stripper=stripper
patterns.fullstripper=fullstripper
patterns.collapser=collapser
@@ -237,9 +236,11 @@ patterns.nospacer=nospacer
patterns.b_collapser=b_collapser
patterns.m_collapser=m_collapser
patterns.e_collapser=e_collapser
+patterns.x_collapser=x_collapser
patterns.b_stripper=b_stripper
patterns.m_stripper=m_stripper
patterns.e_stripper=e_stripper
+patterns.x_stripper=x_stripper
patterns.lowercase=lowercase
patterns.uppercase=uppercase
patterns.letter=patterns.lowercase+patterns.uppercase
@@ -3157,25 +3158,59 @@ local function points(n)
n=n*ptf
if n%1==0 then
return format("%ipt",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fpt",n))
+ end
+end
+local function nupoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*ptf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fpt",n))
end
local function basepoints(n)
if n==0 then
- return "0pt"
+ return "0bp"
end
n=tonumber(n)
if not n or n==0 then
- return "0pt"
+ return "0bp"
end
n=n*bpf
if n%1==0 then
return format("%ibp",n)
+ else
+ return lpegmatch(stripzeros,format("%.5fbp",n))
+ end
+end
+local function nubasepoints(n)
+ if n==0 then
+ return "0"
+ end
+ n=tonumber(n)
+ if not n or n==0 then
+ return "0"
+ end
+ n=n*bpf
+ if n%1==0 then
+ return format("%i",n)
+ else
+ return format("%.5f",n)
end
- return lpegmatch(stripzeros,format("%.5fbp",n))
end
number.points=points
+number.nupoints=nupoints
number.basepoints=basepoints
+number.nubasepoints=nubasepoints
local rubish=spaceortab^0*newline
local anyrubish=spaceortab+newline
local stripped=(spaceortab^1/"")*newline
@@ -3453,7 +3488,9 @@ local environment={
concat=table.concat,
signed=number.signed,
points=number.points,
+ nupoints=number.nupoints,
basepoints=number.basepoints,
+ nubasepoints=number.nubasepoints,
utfchar=utf.char,
utfbyte=utf.byte,
lpegmatch=lpeg.match,
@@ -3648,10 +3685,18 @@ local format_p=function()
n=n+1
return format("points(a%s)",n)
end
+local format_P=function()
+ n=n+1
+ return format("nupoints(a%s)",n)
+end
local format_b=function()
n=n+1
return format("basepoints(a%s)",n)
end
+local format_B=function()
+ n=n+1
+ return format("nubasepoints(a%s)",n)
+end
local format_t=function(f)
n=n+1
if f and f~="" then
@@ -3761,33 +3806,36 @@ local format_extension=function(extensions,f,name)
local extension=extensions[name] or "tostring(%s)"
local f=tonumber(f) or 1
local w=find(extension,"%.%.%.")
- if w then
- if f==0 then
+ if f==0 then
+ if w then
extension=gsub(extension,"%.%.%.","")
- return extension
- elseif f==1 then
+ end
+ return extension
+ elseif f==1 then
+ if w then
extension=gsub(extension,"%.%.%.","%%s")
- n=n+1
- local a="a"..n
- return format(extension,a,a)
- elseif f<0 then
+ end
+ n=n+1
+ local a="a"..n
+ return format(extension,a,a)
+ elseif f<0 then
+ if w then
+ extension=gsub(extension,"%.%.%.","")
+ return extension
+ else
local a="a"..(n+f+1)
return format(extension,a,a)
- else
- extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
- local t={}
- for i=1,f do
- n=n+1
- t[i]="a"..n
- end
- return format(extension,unpack(t))
end
else
- extension=gsub(extension,"%%s",function()
+ if w then
+ extension=gsub(extension,"%.%.%.",rep("%%s,",f-1).."%%s")
+ end
+ local t={}
+ for i=1,f do
n=n+1
- return "a"..n
- end)
- return extension
+ t[i]="a"..n
+ end
+ return format(extension,unpack(t))
end
end
local builder=Cs { "start",
@@ -3801,7 +3849,7 @@ local builder=Cs { "start",
+V("n")
+V("N")
+V("k")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("P")+V("b")+V("B")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
@@ -3839,7 +3887,9 @@ local builder=Cs { "start",
["u"]=(prefix_any*P("u"))/format_u,
["U"]=(prefix_any*P("U"))/format_U,
["p"]=(prefix_any*P("p"))/format_p,
+ ["P"]=(prefix_any*P("P"))/format_P,
["b"]=(prefix_any*P("b"))/format_b,
+ ["B"]=(prefix_any*P("B"))/format_B,
["t"]=(prefix_tab*P("t"))/format_t,
["T"]=(prefix_tab*P("T"))/format_T,
["l"]=(prefix_any*P("l"))/format_l,
@@ -3989,6 +4039,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['util-fil']={
version=1.001,
+ optimize=true,
comment="companion to luat-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -4437,14 +4488,14 @@ utilities.parsers=utilities.parsers or {
end,
settings_to_hash=function(s)
local t={}
- for k,v in gmatch(s,"([^%s,=]+)=([^%s,]+)") do
+ for k,v in gmatch((gsub(s,"^{(.*)}$","%1")),"([^%s,=]+)=([^%s,]+)") do
t[k]=v
end
return t
end,
settings_to_hash_colon_too=function(s)
local t={}
- for k,v in gmatch(s,"([^%s,=:]+)[=:]([^%s,]+)") do
+ for k,v in gmatch((gsub(s,"^{(.*)}$","%1")),"([^%s,=:]+)[=:]([^%s,]+)") do
t[k]=v
end
return t
@@ -4909,6 +4960,7 @@ end
nodes.nodecodes=nodecodes
nodes.glyphcodes=glyphcodes
nodes.disccodes=disccodes
+nodes.dirvalues={ lefttoright=0,righttoleft=1 }
nodes.handlers.protectglyphs=node.protect_glyphs
nodes.handlers.unprotectglyphs=node.unprotect_glyphs
local direct=node.direct
@@ -4933,6 +4985,7 @@ nuts.getkern=direct.getkern
nuts.getlist=direct.getlist
nuts.getnext=direct.getnext
nuts.getoffsets=direct.getoffsets
+nuts.getoptions=direct.getoptions or function() return 0 end
nuts.getprev=direct.getprev
nuts.getsubtype=direct.getsubtype
nuts.getwidth=direct.getwidth
@@ -5016,6 +5069,15 @@ local traverse_id=nuts.traverse_id
local copy_node=nuts.copy_node
local glyph_code=nodes.nodecodes.glyph
local ligature_code=nodes.glyphcodes.ligature
+do
+ local p=nodecodes.localpar or nodecodes.local_par
+ if p then
+ nodecodes.par=p
+ nodecodes[p]="par"
+ nodecodes.localpar=p
+ nodecodes.local_par=p
+ end
+end
do
local get_components=node.direct.getcomponents
local set_components=node.direct.setcomponents
@@ -5068,11 +5130,14 @@ do
end
return 0
end
+ local function flush_components()
+ end
nuts.set_components=set_components
nuts.get_components=get_components
nuts.copy_only_glyphs=copy_only_glyphs
nuts.copy_no_components=copy_no_components
nuts.count_components=count_components
+ nuts.flush_components=flush_components
end
nuts.uses_font=direct.uses_font
do
@@ -8916,6 +8981,9 @@ function constructors.assignmathparameters(target,original)
if not mathparameters.FractionDelimiterDisplayStyleSize then
targetmathparameters.FractionDelimiterDisplayStyleSize=2.40*targetparameters.size
end
+ if not targetmathparameters.SpaceBeforeScript then
+ targetmathparameters.SpaceBeforeScript=targetmathparameters.SpaceAfterScript
+ end
target.mathparameters=targetmathparameters
end
end
@@ -8923,31 +8991,40 @@ function constructors.beforecopyingcharacters(target,original)
end
function constructors.aftercopyingcharacters(target,original)
end
-constructors.sharefonts=false
-constructors.nofsharedfonts=0
-local sharednames={}
+local nofinstances=0
+local instances=setmetatableindex(function(t,k)
+ nofinstances=nofinstances+1
+ t[k]=nofinstances
+ return nofinstances
+end)
function constructors.trytosharefont(target,tfmdata)
- if constructors.sharefonts then
- local characters=target.characters
- local n=1
- local t={ target.psname }
- local u=sortedkeys(characters)
- for i=1,#u do
- local k=u[i]
- n=n+1;t[n]=k
- n=n+1;t[n]=characters[k].index or k
- end
- local h=md5.HEX(concat(t," "))
- local s=sharednames[h]
- if s then
- if trace_defining then
- report_defining("font %a uses backend resources of font %a",target.fullname,s)
- end
- target.fullname=s
- constructors.nofsharedfonts=constructors.nofsharedfonts+1
- target.properties.sharedwith=s
+ local properties=target.properties
+ local instance=properties.instance
+ if instance then
+ local fullname=target.fullname
+ local fontname=target.fontname
+ local psname=target.psname
+ local format=tfmdata.properties.format
+ if format=="opentype" then
+ target.streamprovider=1
+ elseif format=="truetype" then
+ target.streamprovider=2
else
- sharednames[h]=target.fullname
+ target.streamprovider=0
+ end
+ if target.streamprovider>0 then
+ if fullname then
+ fullname=fullname..":"..instances[instance]
+ target.fullname=fullname
+ end
+ if fontname then
+ fontname=fontname..":"..instances[instance]
+ target.fontname=fontname
+ end
+ if psname then
+ psname=psname..":"..instances[instance]
+ target.psname=psname
+ end
end
end
end
@@ -9113,12 +9190,14 @@ function constructors.scale(tfmdata,specification)
target.cidinfo=properties.cidinfo
target.format=properties.format
target.cache=constructors.cacheintex and "yes" or "renew"
+ local original=properties.original or tfmdata.original
local fontname=properties.fontname or tfmdata.fontname
local fullname=properties.fullname or tfmdata.fullname
local filename=properties.filename or tfmdata.filename
local psname=properties.psname or tfmdata.psname
local name=properties.name or tfmdata.name
local psname,psfixed=fixedpsname(psname,fontname or fullname or file.nameonly(filename))
+ target.original=original
target.fontname=fontname
target.fullname=fullname
target.filename=filename
@@ -9208,6 +9287,14 @@ function constructors.scale(tfmdata,specification)
targetparameters.x_height=targetx_height
targetparameters.quad=targetquad
targetparameters.extra_space=targetextra_space
+ local hshift=parameters.hshift
+ if hshift then
+ targetparameters.hshift=delta*hshift
+ end
+ local vshift=parameters.vshift
+ if vshift then
+ targetparameters.vshift=delta*vshift
+ end
local ascender=parameters.ascender
if ascender then
targetparameters.ascender=delta*ascender
@@ -9227,6 +9314,9 @@ function constructors.scale(tfmdata,specification)
properties.hasmath=true
target.nomath=false
target.MathConstants=target.mathparameters
+ local oldmath=properties.oldmath
+ targetproperties.oldmath=oldmath
+ target.oldmath=oldmath
else
properties.hasmath=false
target.nomath=true
@@ -10369,6 +10459,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['font-map']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -10453,6 +10544,7 @@ end
local hash={}
local conc={}
table.setmetatableindex(hash,function(t,k)
+ local v
if k<0xD7FF or (k>0xDFFF and k<=0xFFFF) then
v=f_single(k)
else
@@ -10864,7 +10956,6 @@ local insert=table.insert
local fonts=fonts
local helpers=fonts.helpers
local setmetatableindex=table.setmetatableindex
-local makeweak=table.makeweak
local push={ "push" }
local pop={ "pop" }
local dummy={ "comment" }
@@ -10954,6 +11045,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['font-otr']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -12395,17 +12487,11 @@ local function readtable(tag,f,fontdata,specification,...)
reader(f,fontdata,specification,...)
end
end
-local variablefonts_supported=(context and true) or (logs and logs.application and true) or false
local function readdata(f,offset,specification)
local fontdata,tables=loadtables(f,specification,offset)
if specification.glyphs then
prepareglyps(fontdata)
end
- if not variablefonts_supported then
- specification.instance=nil
- specification.variable=nil
- specification.factors=nil
- end
fontdata.temporary={}
readtable("name",f,fontdata,specification)
local askedname=specification.askedname
@@ -12420,60 +12506,58 @@ local function readdata(f,offset,specification)
readtable("stat",f,fontdata,specification)
readtable("avar",f,fontdata,specification)
readtable("fvar",f,fontdata,specification)
- if variablefonts_supported then
- local variabledata=fontdata.variabledata
- if variabledata then
- local instances=variabledata.instances
- local axis=variabledata.axis
- if axis and (not instances or #instances==0) then
- instances={}
- variabledata.instances=instances
- local function add(n,subfamily,value)
- local values={}
- for i=1,#axis do
- local a=axis[i]
- values[i]={
- axis=a.tag,
- value=i==n and value or a.default,
- }
- end
- instances[#instances+1]={
- subfamily=subfamily,
- values=values,
- }
- end
+ local variabledata=fontdata.variabledata
+ if variabledata then
+ local instances=variabledata.instances
+ local axis=variabledata.axis
+ if axis and (not instances or #instances==0) then
+ instances={}
+ variabledata.instances=instances
+ local function add(n,subfamily,value)
+ local values={}
for i=1,#axis do
local a=axis[i]
- local tag=a.tag
- add(i,"default"..tag,a.default)
- add(i,"minimum"..tag,a.minimum)
- add(i,"maximum"..tag,a.maximum)
- end
- end
- end
- if not specification.factors then
- local instance=specification.instance
- if type(instance)=="string" then
- local factors=helpers.getfactors(fontdata,instance)
- if factors then
- specification.factors=factors
- fontdata.factors=factors
- fontdata.instance=instance
- report("user instance: %s, factors: % t",instance,factors)
- else
- report("user instance: %s, bad factors",instance)
+ values[i]={
+ axis=a.tag,
+ value=i==n and value or a.default,
+ }
end
+ instances[#instances+1]={
+ subfamily=subfamily,
+ values=values,
+ }
+ end
+ for i=1,#axis do
+ local a=axis[i]
+ local tag=a.tag
+ add(i,"default"..tag,a.default)
+ add(i,"minimum"..tag,a.minimum)
+ add(i,"maximum"..tag,a.maximum)
end
end
- if not fontdata.factors then
- if fontdata.variabledata then
- local factors=helpers.getfactors(fontdata,true)
- if factors then
- specification.factors=factors
- fontdata.factors=factors
- end
+ end
+ if not specification.factors then
+ local instance=specification.instance
+ if type(instance)=="string" then
+ local factors=helpers.getfactors(fontdata,instance)
+ if factors then
+ specification.factors=factors
+ fontdata.factors=factors
+ fontdata.instance=instance
+ report("user instance: %s, factors: % t",instance,factors)
else
+ report("user instance: %s, bad factors",instance)
+ end
+ end
+ end
+ if not fontdata.factors then
+ if fontdata.variabledata then
+ local factors=helpers.getfactors(fontdata,true)
+ if factors then
+ specification.factors=factors
+ fontdata.factors=factors
end
+ else
end
end
readtable("os/2",f,fontdata,specification)
@@ -12697,6 +12781,7 @@ function readers.loadfont(filename,n,instance)
hascolor=fontdata.hascolor or false,
instance=fontdata.instance,
factors=fontdata.factors,
+ nofsubfonts=fontdata.subfonts and #fontdata.subfonts or nil,
},
resources={
filename=filename,
@@ -12804,1274 +12889,9 @@ end -- closure
do -- begin closure to overcome local limits and interference
-if not modules then modules={} end modules ['font-oti']={
- version=1.001,
- comment="companion to font-ini.mkiv",
- author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright="PRAGMA ADE / ConTeXt Development Team",
- license="see context related readme files"
-}
-local lower=string.lower
-local fonts=fonts
-local constructors=fonts.constructors
-local otf=constructors.handlers.otf
-local otffeatures=constructors.features.otf
-local registerotffeature=otffeatures.register
-local otftables=otf.tables or {}
-otf.tables=otftables
-local allocate=utilities.storage.allocate
-registerotffeature {
- name="features",
- description="initialization of feature handler",
- default=true,
-}
-local function setmode(tfmdata,value)
- if value then
- tfmdata.properties.mode=lower(value)
- end
-end
-otf.modeinitializer=setmode
-local function setlanguage(tfmdata,value)
- if value then
- local cleanvalue=lower(value)
- local languages=otftables and otftables.languages
- local properties=tfmdata.properties
- if not languages then
- properties.language=cleanvalue
- elseif languages[value] then
- properties.language=cleanvalue
- else
- properties.language="dflt"
- end
- end
-end
-local function setscript(tfmdata,value)
- if value then
- local cleanvalue=lower(value)
- local scripts=otftables and otftables.scripts
- local properties=tfmdata.properties
- if not scripts then
- properties.script=cleanvalue
- elseif scripts[value] then
- properties.script=cleanvalue
- else
- properties.script="dflt"
- end
- end
-end
-registerotffeature {
- name="mode",
- description="mode",
- initializers={
- base=setmode,
- node=setmode,
- plug=setmode,
- }
-}
-registerotffeature {
- name="language",
- description="language",
- initializers={
- base=setlanguage,
- node=setlanguage,
- plug=setlanguage,
- }
-}
-registerotffeature {
- name="script",
- description="script",
- initializers={
- base=setscript,
- node=setscript,
- plug=setscript,
- }
-}
-otftables.featuretypes=allocate {
- gpos_single="position",
- gpos_pair="position",
- gpos_cursive="position",
- gpos_mark2base="position",
- gpos_mark2ligature="position",
- gpos_mark2mark="position",
- gpos_context="position",
- gpos_contextchain="position",
- gsub_single="substitution",
- gsub_multiple="substitution",
- gsub_alternate="substitution",
- gsub_ligature="substitution",
- gsub_context="substitution",
- gsub_contextchain="substitution",
- gsub_reversecontextchain="substitution",
- gsub_reversesub="substitution",
-}
-function otffeatures.checkeddefaultscript(featuretype,autoscript,scripts)
- if featuretype=="position" then
- local default=scripts.dflt
- if default then
- if autoscript=="position" or autoscript==true then
- return default
- else
- report_otf("script feature %s not applied, enable default positioning")
- end
- else
- end
- elseif featuretype=="substitution" then
- local default=scripts.dflt
- if default then
- if autoscript=="substitution" or autoscript==true then
- return default
- end
- end
- end
-end
-function otffeatures.checkeddefaultlanguage(featuretype,autolanguage,languages)
- if featuretype=="position" then
- local default=languages.dflt
- if default then
- if autolanguage=="position" or autolanguage==true then
- return default
- else
- report_otf("language feature %s not applied, enable default positioning")
- end
- else
- end
- elseif featuretype=="substitution" then
- local default=languages.dflt
- if default then
- if autolanguage=="substitution" or autolanguage==true then
- return default
- end
- end
- end
-end
-
-end -- closure
-
-do -- begin closure to overcome local limits and interference
-
-if not modules then modules={} end modules ["font-ott"]={
- 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 type,next,tonumber,tostring,rawget,rawset=type,next,tonumber,tostring,rawget,rawset
-local gsub,lower,format,match,gmatch,find=string.gsub,string.lower,string.format,string.match,string.gmatch,string.find
-local sequenced=table.sequenced
-local is_boolean=string.is_boolean
-local setmetatableindex=table.setmetatableindex
-local setmetatablenewindex=table.setmetatablenewindex
-local allocate=utilities.storage.allocate
-local fonts=fonts
-local otf=fonts.handlers.otf
-local otffeatures=otf.features
-local tables=otf.tables or {}
-otf.tables=tables
-local statistics=otf.statistics or {}
-otf.statistics=statistics
-local scripts=allocate {
- ["adlm"]="adlam",
- ["aghb"]="caucasian albanian",
- ["ahom"]="ahom",
- ["arab"]="arabic",
- ["armi"]="imperial aramaic",
- ["armn"]="armenian",
- ["avst"]="avestan",
- ["bali"]="balinese",
- ["bamu"]="bamum",
- ["bass"]="bassa vah",
- ["batk"]="batak",
- ["beng"]="bengali",
- ["bhks"]="bhaiksuki",
- ["bng2"]="bengali variant 2",
- ["bopo"]="bopomofo",
- ["brah"]="brahmi",
- ["brai"]="braille",
- ["bugi"]="buginese",
- ["buhd"]="buhid",
- ["byzm"]="byzantine music",
- ["cakm"]="chakma",
- ["cans"]="canadian syllabics",
- ["cari"]="carian",
- ["cham"]="cham",
- ["cher"]="cherokee",
- ["copt"]="coptic",
- ["cprt"]="cypriot syllabary",
- ["cyrl"]="cyrillic",
- ["dev2"]="devanagari variant 2",
- ["deva"]="devanagari",
- ["dogr"]="dogra",
- ["dsrt"]="deseret",
- ["dupl"]="duployan",
- ["egyp"]="egyptian heiroglyphs",
- ["elba"]="elbasan",
- ["ethi"]="ethiopic",
- ["geor"]="georgian",
- ["gjr2"]="gujarati variant 2",
- ["glag"]="glagolitic",
- ["gong"]="gunjala gondi",
- ["gonm"]="masaram gondi",
- ["goth"]="gothic",
- ["gran"]="grantha",
- ["grek"]="greek",
- ["gujr"]="gujarati",
- ["gur2"]="gurmukhi variant 2",
- ["guru"]="gurmukhi",
- ["hang"]="hangul",
- ["hani"]="cjk ideographic",
- ["hano"]="hanunoo",
- ["hatr"]="hatran",
- ["hebr"]="hebrew",
- ["hluw"]="anatolian hieroglyphs",
- ["hmng"]="pahawh hmong",
- ["hung"]="old hungarian",
- ["ital"]="old italic",
- ["jamo"]="hangul jamo",
- ["java"]="javanese",
- ["kali"]="kayah li",
- ["kana"]="hiragana and katakana",
- ["khar"]="kharosthi",
- ["khmr"]="khmer",
- ["khoj"]="khojki",
- ["knd2"]="kannada variant 2",
- ["knda"]="kannada",
- ["kthi"]="kaithi",
- ["lana"]="tai tham",
- ["lao" ]="lao",
- ["latn"]="latin",
- ["lepc"]="lepcha",
- ["limb"]="limbu",
- ["lina"]="linear a",
- ["linb"]="linear b",
- ["lisu"]="lisu",
- ["lyci"]="lycian",
- ["lydi"]="lydian",
- ["mahj"]="mahajani",
- ["maka"]="makasar",
- ["mand"]="mandaic and mandaean",
- ["mani"]="manichaean",
- ["marc"]="marchen",
- ["math"]="mathematical alphanumeric symbols",
- ["medf"]="medefaidrin",
- ["mend"]="mende kikakui",
- ["merc"]="meroitic cursive",
- ["mero"]="meroitic hieroglyphs",
- ["mlm2"]="malayalam variant 2",
- ["mlym"]="malayalam",
- ["modi"]="modi",
- ["mong"]="mongolian",
- ["mroo"]="mro",
- ["mtei"]="meitei Mayek",
- ["mult"]="multani",
- ["musc"]="musical symbols",
- ["mym2"]="myanmar variant 2",
- ["mymr"]="myanmar",
- ["narb"]="old north arabian",
- ["nbat"]="nabataean",
- ["newa"]="newa",
- ["nko" ]='n"ko',
- ["nshu"]="nüshu",
- ["ogam"]="ogham",
- ["olck"]="ol chiki",
- ["orkh"]="old turkic and orkhon runic",
- ["ory2"]="odia variant 2",
- ["orya"]="oriya",
- ["osge"]="osage",
- ["osma"]="osmanya",
- ["palm"]="palmyrene",
- ["pauc"]="pau cin hau",
- ["perm"]="old permic",
- ["phag"]="phags-pa",
- ["phli"]="inscriptional pahlavi",
- ["phlp"]="psalter pahlavi",
- ["phnx"]="phoenician",
- ["plrd"]="miao",
- ["prti"]="inscriptional parthian",
- ["rjng"]="rejang",
- ["rohg"]="hanifi rohingya",
- ["runr"]="runic",
- ["samr"]="samaritan",
- ["sarb"]="old south arabian",
- ["saur"]="saurashtra",
- ["sgnw"]="sign writing",
- ["shaw"]="shavian",
- ["shrd"]="sharada",
- ["sidd"]="siddham",
- ["sind"]="khudawadi",
- ["sinh"]="sinhala",
- ["sogd"]="sogdian",
- ["sogo"]="old sogdian",
- ["sora"]="sora sompeng",
- ["soyo"]="soyombo",
- ["sund"]="sundanese",
- ["sylo"]="syloti nagri",
- ["syrc"]="syriac",
- ["tagb"]="tagbanwa",
- ["takr"]="takri",
- ["tale"]="tai le",
- ["talu"]="tai lu",
- ["taml"]="tamil",
- ["tang"]="tangut",
- ["tavt"]="tai viet",
- ["tel2"]="telugu variant 2",
- ["telu"]="telugu",
- ["tfng"]="tifinagh",
- ["tglg"]="tagalog",
- ["thaa"]="thaana",
- ["thai"]="thai",
- ["tibt"]="tibetan",
- ["tirh"]="tirhuta",
- ["tml2"]="tamil variant 2",
- ["ugar"]="ugaritic cuneiform",
- ["vai" ]="vai",
- ["wara"]="warang citi",
- ["xpeo"]="old persian cuneiform",
- ["xsux"]="sumero-akkadian cuneiform",
- ["yi" ]="yi",
- ["zanb"]="zanabazar square",
-}
-local languages=allocate {
- ["aba" ]="abaza",
- ["abk" ]="abkhazian",
- ["ach" ]="acholi",
- ["acr" ]="achi",
- ["ady" ]="adyghe",
- ["afk" ]="afrikaans",
- ["afr" ]="afar",
- ["agw" ]="agaw",
- ["aio" ]="aiton",
- ["aka" ]="akan",
- ["als" ]="alsatian",
- ["alt" ]="altai",
- ["amh" ]="amharic",
- ["ang" ]="anglo-saxon",
- ["apph"]="phonetic transcription—americanist conventions",
- ["ara" ]="arabic",
- ["arg" ]="aragonese",
- ["ari" ]="aari",
- ["ark" ]="rakhine",
- ["asm" ]="assamese",
- ["ast" ]="asturian",
- ["ath" ]="athapaskan",
- ["avr" ]="avar",
- ["awa" ]="awadhi",
- ["aym" ]="aymara",
- ["azb" ]="torki",
- ["aze" ]="azerbaijani",
- ["bad" ]="badaga",
- ["bad0"]="banda",
- ["bag" ]="baghelkhandi",
- ["bal" ]="balkar",
- ["ban" ]="balinese",
- ["bar" ]="bavarian",
- ["bau" ]="baulé",
- ["bbc" ]="batak toba",
- ["bbr" ]="berber",
- ["bch" ]="bench",
- ["bcr" ]="bible cree",
- ["bdy" ]="bandjalang",
- ["bel" ]="belarussian",
- ["bem" ]="bemba",
- ["ben" ]="bengali",
- ["bgc" ]="haryanvi",
- ["bgq" ]="bagri",
- ["bgr" ]="bulgarian",
- ["bhi" ]="bhili",
- ["bho" ]="bhojpuri",
- ["bik" ]="bikol",
- ["bil" ]="bilen",
- ["bis" ]="bislama",
- ["bjj" ]="kanauji",
- ["bkf" ]="blackfoot",
- ["bli" ]="baluchi",
- ["blk" ]="pa'o karen",
- ["bln" ]="balante",
- ["blt" ]="balti",
- ["bmb" ]="bambara (bamanankan)",
- ["bml" ]="bamileke",
- ["bos" ]="bosnian",
- ["bpy" ]="bishnupriya manipuri",
- ["bre" ]="breton",
- ["brh" ]="brahui",
- ["bri" ]="braj bhasha",
- ["brm" ]="burmese",
- ["brx" ]="bodo",
- ["bsh" ]="bashkir",
- ["bsk" ]="burushaski",
- ["bti" ]="beti",
- ["bts" ]="batak simalungun",
- ["bug" ]="bugis",
- ["byv" ]="medumba",
- ["cak" ]="kaqchikel",
- ["cat" ]="catalan",
- ["cbk" ]="zamboanga chavacano",
- ["cchn"]="chinantec",
- ["ceb" ]="cebuano",
- ["cgg" ]="chiga",
- ["cha" ]="chamorro",
- ["che" ]="chechen",
- ["chg" ]="chaha gurage",
- ["chh" ]="chattisgarhi",
- ["chi" ]="chichewa (chewa, nyanja)",
- ["chk" ]="chukchi",
- ["chk0"]="chuukese",
- ["cho" ]="choctaw",
- ["chp" ]="chipewyan",
- ["chr" ]="cherokee",
- ["chu" ]="chuvash",
- ["chy" ]="cheyenne",
- ["cja" ]="western cham",
- ["cjm" ]="eastern cham",
- ["cmr" ]="comorian",
- ["cop" ]="coptic",
- ["cor" ]="cornish",
- ["cos" ]="corsican",
- ["cpp" ]="creoles",
- ["cre" ]="cree",
- ["crr" ]="carrier",
- ["crt" ]="crimean tatar",
- ["csb" ]="kashubian",
- ["csl" ]="church slavonic",
- ["csy" ]="czech",
- ["ctg" ]="chittagonian",
- ["cuk" ]="san blas kuna",
- ["dan" ]="danish",
- ["dar" ]="dargwa",
- ["dax" ]="dayi",
- ["dcr" ]="woods cree",
- ["deu" ]="german",
- ["dgo" ]="dogri",
- ["dgr" ]="dogri",
- ["dhg" ]="dhangu",
- ["dhv" ]="divehi (dhivehi, maldivian)",
- ["diq" ]="dimli",
- ["div" ]="divehi (dhivehi, maldivian)",
- ["djr" ]="zarma",
- ["djr0"]="djambarrpuyngu",
- ["dng" ]="dangme",
- ["dnj" ]="dan",
- ["dnk" ]="dinka",
- ["dri" ]="dari",
- ["duj" ]="dhuwal",
- ["dun" ]="dungan",
- ["dzn" ]="dzongkha",
- ["ebi" ]="ebira",
- ["ecr" ]="eastern cree",
- ["edo" ]="edo",
- ["efi" ]="efik",
- ["ell" ]="greek",
- ["emk" ]="eastern maninkakan",
- ["eng" ]="english",
- ["erz" ]="erzya",
- ["esp" ]="spanish",
- ["esu" ]="central yupik",
- ["eti" ]="estonian",
- ["euq" ]="basque",
- ["evk" ]="evenki",
- ["evn" ]="even",
- ["ewe" ]="ewe",
- ["fan" ]="french antillean",
- ["fan0"]=" fang",
- ["far" ]="persian",
- ["fat" ]="fanti",
- ["fin" ]="finnish",
- ["fji" ]="fijian",
- ["fle" ]="dutch (flemish)",
- ["fmp" ]="fe’fe’",
- ["fne" ]="forest nenets",
- ["fon" ]="fon",
- ["fos" ]="faroese",
- ["fra" ]="french",
- ["frc" ]="cajun french",
- ["fri" ]="frisian",
- ["frl" ]="friulian",
- ["frp" ]="arpitan",
- ["fta" ]="futa",
- ["ful" ]="fulah",
- ["fuv" ]="nigerian fulfulde",
- ["gad" ]="ga",
- ["gae" ]="scottish gaelic (gaelic)",
- ["gag" ]="gagauz",
- ["gal" ]="galician",
- ["gar" ]="garshuni",
- ["gaw" ]="garhwali",
- ["gez" ]="ge'ez",
- ["gih" ]="githabul",
- ["gil" ]="gilyak",
- ["gil0"]="kiribati (gilbertese)",
- ["gkp" ]="kpelle (guinea)",
- ["glk" ]="gilaki",
- ["gmz" ]="gumuz",
- ["gnn" ]="gumatj",
- ["gog" ]="gogo",
- ["gon" ]="gondi",
- ["grn" ]="greenlandic",
- ["gro" ]="garo",
- ["gua" ]="guarani",
- ["guc" ]="wayuu",
- ["guf" ]="gupapuyngu",
- ["guj" ]="gujarati",
- ["guz" ]="gusii",
- ["hai" ]="haitian (haitian creole)",
- ["hal" ]="halam",
- ["har" ]="harauti",
- ["hau" ]="hausa",
- ["haw" ]="hawaiian",
- ["hay" ]="haya",
- ["haz" ]="hazaragi",
- ["hbn" ]="hammer-banna",
- ["her" ]="herero",
- ["hil" ]="hiligaynon",
- ["hin" ]="hindi",
- ["hma" ]="high mari",
- ["hmn" ]="hmong",
- ["hmo" ]="hiri motu",
- ["hnd" ]="hindko",
- ["ho" ]="ho",
- ["hri" ]="harari",
- ["hrv" ]="croatian",
- ["hun" ]="hungarian",
- ["hye" ]="armenian",
- ["hye0"]="armenian east",
- ["iba" ]="iban",
- ["ibb" ]="ibibio",
- ["ibo" ]="igbo",
- ["ido" ]="ido",
- ["ijo" ]="ijo languages",
- ["ile" ]="interlingue",
- ["ilo" ]="ilokano",
- ["ina" ]="interlingua",
- ["ind" ]="indonesian",
- ["ing" ]="ingush",
- ["inu" ]="inuktitut",
- ["ipk" ]="inupiat",
- ["ipph"]="phonetic transcription—ipa conventions",
- ["iri" ]="irish",
- ["irt" ]="irish traditional",
- ["isl" ]="icelandic",
- ["ism" ]="inari sami",
- ["ita" ]="italian",
- ["iwr" ]="hebrew",
- ["jam" ]="jamaican creole",
- ["jan" ]="japanese",
- ["jav" ]="javanese",
- ["jbo" ]="lojban",
- ["jct" ]="krymchak",
- ["jii" ]="yiddish",
- ["jud" ]="ladino",
- ["jul" ]="jula",
- ["kab" ]="kabardian",
- ["kab0"]="kabyle",
- ["kac" ]="kachchi",
- ["kal" ]="kalenjin",
- ["kan" ]="kannada",
- ["kar" ]="karachay",
- ["kat" ]="georgian",
- ["kaz" ]="kazakh",
- ["kde" ]="makonde",
- ["kea" ]="kabuverdianu (crioulo)",
- ["keb" ]="kebena",
- ["kek" ]="kekchi",
- ["kge" ]="khutsuri georgian",
- ["kha" ]="khakass",
- ["khk" ]="khanty-kazim",
- ["khm" ]="khmer",
- ["khs" ]="khanty-shurishkar",
- ["kht" ]="khamti shan",
- ["khv" ]="khanty-vakhi",
- ["khw" ]="khowar",
- ["kik" ]="kikuyu (gikuyu)",
- ["kir" ]="kirghiz (kyrgyz)",
- ["kis" ]="kisii",
- ["kiu" ]="kirmanjki",
- ["kjd" ]="southern kiwai",
- ["kjp" ]="eastern pwo karen",
- ["kjz" ]="bumthangkha",
- ["kkn" ]="kokni",
- ["klm" ]="kalmyk",
- ["kmb" ]="kamba",
- ["kmn" ]="kumaoni",
- ["kmo" ]="komo",
- ["kms" ]="komso",
- ["kmz" ]="khorasani turkic",
- ["knr" ]="kanuri",
- ["kod" ]="kodagu",
- ["koh" ]="korean old hangul",
- ["kok" ]="konkani",
- ["kom" ]="komi",
- ["kon" ]="kikongo",
- ["kon0"]="kongo",
- ["kop" ]="komi-permyak",
- ["kor" ]="korean",
- ["kos" ]="kosraean",
- ["koz" ]="komi-zyrian",
- ["kpl" ]="kpelle",
- ["kri" ]="krio",
- ["krk" ]="karakalpak",
- ["krl" ]="karelian",
- ["krm" ]="karaim",
- ["krn" ]="karen",
- ["krt" ]="koorete",
- ["ksh" ]="kashmiri",
- ["ksh0"]="ripuarian",
- ["ksi" ]="khasi",
- ["ksm" ]="kildin sami",
- ["ksw" ]="s’gaw karen",
- ["kua" ]="kuanyama",
- ["kui" ]="kui",
- ["kul" ]="kulvi",
- ["kum" ]="kumyk",
- ["kur" ]="kurdish",
- ["kuu" ]="kurukh",
- ["kuy" ]="kuy",
- ["kyk" ]="koryak",
- ["kyu" ]="western kayah",
- ["lad" ]="ladin",
- ["lah" ]="lahuli",
- ["lak" ]="lak",
- ["lam" ]="lambani",
- ["lao" ]="lao",
- ["lat" ]="latin",
- ["laz" ]="laz",
- ["lcr" ]="l-cree",
- ["ldk" ]="ladakhi",
- ["lez" ]="lezgi",
- ["lij" ]="ligurian",
- ["lim" ]="limburgish",
- ["lin" ]="lingala",
- ["lis" ]="lisu",
- ["ljp" ]="lampung",
- ["lki" ]="laki",
- ["lma" ]="low mari",
- ["lmb" ]="limbu",
- ["lmo" ]="lombard",
- ["lmw" ]="lomwe",
- ["lom" ]="loma",
- ["lrc" ]="luri",
- ["lsb" ]="lower sorbian",
- ["lsm" ]="lule sami",
- ["lth" ]="lithuanian",
- ["ltz" ]="luxembourgish",
- ["lua" ]="luba-lulua",
- ["lub" ]="luba-katanga",
- ["lug" ]="ganda",
- ["luh" ]="luyia",
- ["luo" ]="luo",
- ["lvi" ]="latvian",
- ["mad" ]="madura",
- ["mag" ]="magahi",
- ["mah" ]="marshallese",
- ["maj" ]="majang",
- ["mak" ]="makhuwa",
- ["mal" ]="malayalam reformed",
- ["mam" ]="mam",
- ["man" ]="mansi",
- ["map" ]="mapudungun",
- ["mar" ]="marathi",
- ["maw" ]="marwari",
- ["mbn" ]="mbundu",
- ["mbo" ]="mbo",
- ["mch" ]="manchu",
- ["mcr" ]="moose cree",
- ["mde" ]="mende",
- ["mdr" ]="mandar",
- ["men" ]="me'en",
- ["mer" ]="meru",
- ["mfa" ]="pattani malay",
- ["mfe" ]="morisyen",
- ["min" ]="minangkabau",
- ["miz" ]="mizo",
- ["mkd" ]="macedonian",
- ["mkr" ]="makasar",
- ["mkw" ]="kituba",
- ["mle" ]="male",
- ["mlg" ]="malagasy",
- ["mln" ]="malinke",
- ["mlr" ]="malayalam reformed",
- ["mly" ]="malay",
- ["mnd" ]="mandinka",
- ["mng" ]="mongolian",
- ["mni" ]="manipuri",
- ["mnk" ]="maninka",
- ["mnx" ]="manx",
- ["moh" ]="mohawk",
- ["mok" ]="moksha",
- ["mol" ]="moldavian",
- ["mon" ]="mon",
- ["mor" ]="moroccan",
- ["mos" ]="mossi",
- ["mri" ]="maori",
- ["mth" ]="maithili",
- ["mts" ]="maltese",
- ["mun" ]="mundari",
- ["mus" ]="muscogee",
- ["mwl" ]="mirandese",
- ["mww" ]="hmong daw",
- ["myn" ]="mayan",
- ["mzn" ]="mazanderani",
- ["nag" ]="naga-assamese",
- ["nah" ]="nahuatl",
- ["nan" ]="nanai",
- ["nap" ]="neapolitan",
- ["nas" ]="naskapi",
- ["nau" ]="nauruan",
- ["nav" ]="navajo",
- ["ncr" ]="n-cree",
- ["ndb" ]="ndebele",
- ["ndc" ]="ndau",
- ["ndg" ]="ndonga",
- ["nds" ]="low saxon",
- ["nep" ]="nepali",
- ["new" ]="newari",
- ["nga" ]="ngbaka",
- ["ngr" ]="nagari",
- ["nhc" ]="norway house cree",
- ["nis" ]="nisi",
- ["niu" ]="niuean",
- ["nkl" ]="nyankole",
- ["nko" ]="n'ko",
- ["nld" ]="dutch",
- ["noe" ]="nimadi",
- ["nog" ]="nogai",
- ["nor" ]="norwegian",
- ["nov" ]="novial",
- ["nsm" ]="northern sami",
- ["nso" ]="sotho, northern",
- ["nta" ]="northern tai",
- ["nto" ]="esperanto",
- ["nym" ]="nyamwezi",
- ["nyn" ]="norwegian nynorsk",
- ["nza" ]="mbembe tigon",
- ["oci" ]="occitan",
- ["ocr" ]="oji-cree",
- ["ojb" ]="ojibway",
- ["ori" ]="odia",
- ["oro" ]="oromo",
- ["oss" ]="ossetian",
- ["paa" ]="palestinian aramaic",
- ["pag" ]="pangasinan",
- ["pal" ]="pali",
- ["pam" ]="pampangan",
- ["pan" ]="punjabi",
- ["pap" ]="palpa",
- ["pap0"]="papiamentu",
- ["pas" ]="pashto",
- ["pau" ]="palauan",
- ["pcc" ]="bouyei",
- ["pcd" ]="picard",
- ["pdc" ]="pennsylvania german",
- ["pgr" ]="polytonic greek",
- ["phk" ]="phake",
- ["pih" ]="norfolk",
- ["pil" ]="filipino",
- ["plg" ]="palaung",
- ["plk" ]="polish",
- ["pms" ]="piemontese",
- ["pnb" ]="western panjabi",
- ["poh" ]="pocomchi",
- ["pon" ]="pohnpeian",
- ["pro" ]="provencal",
- ["ptg" ]="portuguese",
- ["pwo" ]="western pwo karen",
- ["qin" ]="chin",
- ["quc" ]="k’iche’",
- ["quh" ]="quechua (bolivia)",
- ["quz" ]="quechua",
- ["qvi" ]="quechua (ecuador)",
- ["qwh" ]="quechua (peru)",
- ["raj" ]="rajasthani",
- ["rar" ]="rarotongan",
- ["rbu" ]="russian buriat",
- ["rcr" ]="r-cree",
- ["rej" ]="rejang",
- ["ria" ]="riang",
- ["rif" ]="tarifit",
- ["rit" ]="ritarungo",
- ["rkw" ]="arakwal",
- ["rms" ]="romansh",
- ["rmy" ]="vlax romani",
- ["rom" ]="romanian",
- ["roy" ]="romany",
- ["rsy" ]="rusyn",
- ["rtm" ]="rotuman",
- ["rua" ]="kinyarwanda",
- ["run" ]="rundi",
- ["rup" ]="aromanian",
- ["rus" ]="russian",
- ["sad" ]="sadri",
- ["san" ]="sanskrit",
- ["sas" ]="sasak",
- ["sat" ]="santali",
- ["say" ]="sayisi",
- ["scn" ]="sicilian",
- ["sco" ]="scots",
- ["scs" ]="north slavey",
- ["sek" ]="sekota",
- ["sel" ]="selkup",
- ["sga" ]="old irish",
- ["sgo" ]="sango",
- ["sgs" ]="samogitian",
- ["shi" ]="tachelhit",
- ["shn" ]="shan",
- ["sib" ]="sibe",
- ["sid" ]="sidamo",
- ["sig" ]="silte gurage",
- ["sks" ]="skolt sami",
- ["sky" ]="slovak",
- ["sla" ]="slavey",
- ["slv" ]="slovenian",
- ["sml" ]="somali",
- ["smo" ]="samoan",
- ["sna" ]="sena",
- ["sna0"]="shona",
- ["snd" ]="sindhi",
- ["snh" ]="sinhala (sinhalese)",
- ["snk" ]="soninke",
- ["sog" ]="sodo gurage",
- ["sop" ]="songe",
- ["sot" ]="sotho, southern",
- ["sqi" ]="albanian",
- ["srb" ]="serbian",
- ["srd" ]="sardinian",
- ["srk" ]="saraiki",
- ["srr" ]="serer",
- ["ssl" ]="south slavey",
- ["ssm" ]="southern sami",
- ["stq" ]="saterland frisian",
- ["suk" ]="sukuma",
- ["sun" ]="sundanese",
- ["sur" ]="suri",
- ["sva" ]="svan",
- ["sve" ]="swedish",
- ["swa" ]="swadaya aramaic",
- ["swk" ]="swahili",
- ["swz" ]="swati",
- ["sxt" ]="sutu",
- ["sxu" ]="upper saxon",
- ["syl" ]="sylheti",
- ["syr" ]="syriac",
- ["syre"]="estrangela syriac",
- ["syrj"]="western syriac",
- ["syrn"]="eastern syriac",
- ["szl" ]="silesian",
- ["tab" ]="tabasaran",
- ["taj" ]="tajiki",
- ["tam" ]="tamil",
- ["tat" ]="tatar",
- ["tcr" ]="th-cree",
- ["tdd" ]="dehong dai",
- ["tel" ]="telugu",
- ["tet" ]="tetum",
- ["tgl" ]="tagalog",
- ["tgn" ]="tongan",
- ["tgr" ]="tigre",
- ["tgy" ]="tigrinya",
- ["tha" ]="thai",
- ["tht" ]="tahitian",
- ["tib" ]="tibetan",
- ["tiv" ]="tiv",
- ["tkm" ]="turkmen",
- ["tmh" ]="tamashek",
- ["tmn" ]="temne",
- ["tna" ]="tswana",
- ["tne" ]="tundra nenets",
- ["tng" ]="tonga",
- ["tod" ]="todo",
- ["tod0"]="toma",
- ["tpi" ]="tok pisin",
- ["trk" ]="turkish",
- ["tsg" ]="tsonga",
- ["tsj" ]="tshangla",
- ["tua" ]="turoyo aramaic",
- ["tul" ]="tulu",
- ["tum" ]="tulu",
- ["tuv" ]="tuvin",
- ["tvl" ]="tuvalu",
- ["twi" ]="twi",
- ["tyz" ]="tày",
- ["tzm" ]="tamazight",
- ["tzo" ]="tzotzil",
- ["udm" ]="udmurt",
- ["ukr" ]="ukrainian",
- ["umb" ]="umbundu",
- ["urd" ]="urdu",
- ["usb" ]="upper sorbian",
- ["uyg" ]="uyghur",
- ["uzb" ]="uzbek",
- ["vec" ]="venetian",
- ["ven" ]="venda",
- ["vit" ]="vietnamese",
- ["vol" ]="volapük",
- ["vro" ]="võro",
- ["wa" ]="wa",
- ["wag" ]="wagdi",
- ["war" ]="waray-waray",
- ["wcr" ]="west-cree",
- ["wel" ]="welsh",
- ["wlf" ]="wolof",
- ["wln" ]="walloon",
- ["wtm" ]="mewati",
- ["xbd" ]="lü",
- ["xhs" ]="xhosa",
- ["xjb" ]="minjangbal",
- ["xkf" ]="khengkha",
- ["xog" ]="soga",
- ["xpe" ]="kpelle (liberia)",
- ["yak" ]="sakha",
- ["yao" ]="yao",
- ["yap" ]="yapese",
- ["yba" ]="yoruba",
- ["ycr" ]="y-cree",
- ["yic" ]="yi classic",
- ["yim" ]="yi modern",
- ["zea" ]="zealandic",
- ["zgh" ]="standard morrocan tamazigh",
- ["zha" ]="zhuang",
- ["zhh" ]="chinese, hong kong sar",
- ["zhp" ]="chinese phonetic",
- ["zhs" ]="chinese simplified",
- ["zht" ]="chinese traditional",
- ["znd" ]="zande",
- ["zul" ]="zulu",
- ["zza" ]="zazaki",
-}
-local features=allocate {
- ["aalt"]="access all alternates",
- ["abvf"]="above-base forms",
- ["abvm"]="above-base mark positioning",
- ["abvs"]="above-base substitutions",
- ["afrc"]="alternative fractions",
- ["akhn"]="akhands",
- ["blwf"]="below-base forms",
- ["blwm"]="below-base mark positioning",
- ["blws"]="below-base substitutions",
- ["c2pc"]="petite capitals from capitals",
- ["c2sc"]="small capitals from capitals",
- ["calt"]="contextual alternates",
- ["case"]="case-sensitive forms",
- ["ccmp"]="glyph composition/decomposition",
- ["cfar"]="conjunct form after ro",
- ["cjct"]="conjunct forms",
- ["clig"]="contextual ligatures",
- ["cpct"]="centered cjk punctuation",
- ["cpsp"]="capital spacing",
- ["cswh"]="contextual swash",
- ["curs"]="cursive positioning",
- ["dflt"]="default processing",
- ["dist"]="distances",
- ["dlig"]="discretionary ligatures",
- ["dnom"]="denominators",
- ["dtls"]="dotless forms",
- ["expt"]="expert forms",
- ["falt"]="final glyph alternates",
- ["fin2"]="terminal forms #2",
- ["fin3"]="terminal forms #3",
- ["fina"]="terminal forms",
- ["flac"]="flattened accents over capitals",
- ["frac"]="fractions",
- ["fwid"]="full width",
- ["half"]="half forms",
- ["haln"]="halant forms",
- ["halt"]="alternate half width",
- ["hist"]="historical forms",
- ["hkna"]="horizontal kana alternates",
- ["hlig"]="historical ligatures",
- ["hngl"]="hangul",
- ["hojo"]="hojo kanji forms",
- ["hwid"]="half width",
- ["init"]="initial forms",
- ["isol"]="isolated forms",
- ["ital"]="italics",
- ["jalt"]="justification alternatives",
- ["jp04"]="jis2004 forms",
- ["jp78"]="jis78 forms",
- ["jp83"]="jis83 forms",
- ["jp90"]="jis90 forms",
- ["kern"]="kerning",
- ["lfbd"]="left bounds",
- ["liga"]="standard ligatures",
- ["ljmo"]="leading jamo forms",
- ["lnum"]="lining figures",
- ["locl"]="localized forms",
- ["ltra"]="left-to-right alternates",
- ["ltrm"]="left-to-right mirrored forms",
- ["mark"]="mark positioning",
- ["med2"]="medial forms #2",
- ["medi"]="medial forms",
- ["mgrk"]="mathematical greek",
- ["mkmk"]="mark to mark positioning",
- ["mset"]="mark positioning via substitution",
- ["nalt"]="alternate annotation forms",
- ["nlck"]="nlc kanji forms",
- ["nukt"]="nukta forms",
- ["numr"]="numerators",
- ["onum"]="old style figures",
- ["opbd"]="optical bounds",
- ["ordn"]="ordinals",
- ["ornm"]="ornaments",
- ["palt"]="proportional alternate width",
- ["pcap"]="petite capitals",
- ["pkna"]="proportional kana",
- ["pnum"]="proportional figures",
- ["pref"]="pre-base forms",
- ["pres"]="pre-base substitutions",
- ["pstf"]="post-base forms",
- ["psts"]="post-base substitutions",
- ["pwid"]="proportional widths",
- ["qwid"]="quarter widths",
- ["rand"]="randomize",
- ["rclt"]="required contextual alternates",
- ["rkrf"]="rakar forms",
- ["rlig"]="required ligatures",
- ["rphf"]="reph form",
- ["rtbd"]="right bounds",
- ["rtla"]="right-to-left alternates",
- ["rtlm"]="right to left mirrored forms",
- ["rvrn"]="required variation alternates",
- ["ruby"]="ruby notation forms",
- ["salt"]="stylistic alternates",
- ["sinf"]="scientific inferiors",
- ["size"]="optical size",
- ["smcp"]="small capitals",
- ["smpl"]="simplified forms",
- ["ssty"]="script style",
- ["stch"]="stretching glyph decomposition",
- ["subs"]="subscript",
- ["sups"]="superscript",
- ["swsh"]="swash",
- ["titl"]="titling",
- ["tjmo"]="trailing jamo forms",
- ["tnam"]="traditional name forms",
- ["tnum"]="tabular figures",
- ["trad"]="traditional forms",
- ["twid"]="third widths",
- ["unic"]="unicase",
- ["valt"]="alternate vertical metrics",
- ["vatu"]="vattu variants",
- ["vert"]="vertical writing",
- ["vhal"]="alternate vertical half metrics",
- ["vjmo"]="vowel jamo forms",
- ["vkna"]="vertical kana alternates",
- ["vkrn"]="vertical kerning",
- ["vpal"]="proportional alternate vertical metrics",
- ["vrtr"]="vertical alternates for rotation",
- ["vrt2"]="vertical rotation",
- ["zero"]="slashed zero",
- ["trep"]="traditional tex replacements",
- ["tlig"]="traditional tex ligatures",
- ["ss.."]="stylistic set ..",
- ["cv.."]="character variant ..",
- ["js.."]="justification ..",
- ["dv.."]="devanagari ..",
- ["ml.."]="malayalam ..",
-}
-local baselines=allocate {
- ["hang"]="hanging baseline",
- ["icfb"]="ideographic character face bottom edge baseline",
- ["icft"]="ideographic character face tope edige baseline",
- ["ideo"]="ideographic em-box bottom edge baseline",
- ["idtp"]="ideographic em-box top edge baseline",
- ["math"]="mathematical centered baseline",
- ["romn"]="roman baseline"
-}
-tables.scripts=scripts
-tables.languages=languages
-tables.features=features
-tables.baselines=baselines
-local acceptscripts=true directives.register("otf.acceptscripts",function(v) acceptscripts=v end)
-local acceptlanguages=true directives.register("otf.acceptlanguages",function(v) acceptlanguages=v end)
-local report_checks=logs.reporter("fonts","checks")
-if otffeatures.features then
- for k,v in next,otffeatures.features do
- features[k]=v
- end
- otffeatures.features=features
-end
-local function swapped(h)
- local r={}
- for k,v in next,h do
- r[gsub(v,"[^a-z0-9]","")]=k
- end
- return r
-end
-local verbosescripts=allocate(swapped(scripts ))
-local verboselanguages=allocate(swapped(languages))
-local verbosefeatures=allocate(swapped(features ))
-local verbosebaselines=allocate(swapped(baselines))
-local function resolve(t,k)
- if k then
- k=gsub(lower(k),"[^a-z0-9]","")
- local v=rawget(t,k)
- if v then
- return v
- end
- end
-end
-setmetatableindex(verbosescripts,resolve)
-setmetatableindex(verboselanguages,resolve)
-setmetatableindex(verbosefeatures,resolve)
-setmetatableindex(verbosebaselines,resolve)
-setmetatableindex(scripts,function(t,k)
- if k then
- k=lower(k)
- if k=="dflt" then
- return k
- end
- local v=rawget(t,k)
- if v then
- return v
- end
- k=gsub(k," ","")
- v=rawget(t,v)
- if v then
- return v
- elseif acceptscripts then
- report_checks("registering extra script %a",k)
- rawset(t,k,k)
- return k
- end
- end
- return "dflt"
-end)
-setmetatableindex(languages,function(t,k)
- if k then
- k=lower(k)
- if k=="dflt" then
- return k
- end
- local v=rawget(t,k)
- if v then
- return v
- end
- k=gsub(k," ","")
- v=rawget(t,v)
- if v then
- return v
- elseif acceptlanguages then
- report_checks("registering extra language %a",k)
- rawset(t,k,k)
- return k
- end
- end
- return "dflt"
-end)
-if setmetatablenewindex then
- setmetatablenewindex(languages,"ignore")
- setmetatablenewindex(scripts,"ignore")
- setmetatablenewindex(baselines,"ignore")
-end
-local function resolve(t,k)
- if k then
- k=lower(k)
- local v=rawget(t,k)
- if v then
- return v
- end
- k=gsub(k," ","")
- local v=rawget(t,k)
- if v then
- return v
- end
- local tag,dd=match(k,"(..)(%d+)")
- if tag and dd then
- local v=rawget(t,tag)
- if v then
- return v
- else
- local v=rawget(t,tag.."..")
- if v then
- return (gsub(v,"%.%.",tonumber(dd)))
- end
- end
- end
- end
- return k
-end
-setmetatableindex(features,resolve)
-local function assign(t,k,v)
- if k and v then
- v=lower(v)
- rawset(t,k,v)
- end
-end
-if setmetatablenewindex then
- setmetatablenewindex(features,assign)
-end
-local checkers={
- rand=function(v)
- return v==true and "random" or v
- end
-}
-if not storage then
- return
-end
-local usedfeatures=statistics.usedfeatures or {}
-statistics.usedfeatures=usedfeatures
-table.setmetatableindex(usedfeatures,function(t,k) if k then local v={} t[k]=v return v end end)
-storage.register("fonts/otf/usedfeatures",usedfeatures,"fonts.handlers.otf.statistics.usedfeatures" )
-local normalizedaxis=otf.readers.helpers.normalizedaxis or function(s) return s end
-function otffeatures.normalize(features,wrap)
- if features then
- local h={}
- for key,value in next,features do
- local k=lower(key)
- if k=="language" then
- local v=gsub(lower(value),"[^a-z0-9]","")
- h.language=rawget(verboselanguages,v) or (languages[v] and v) or "dflt"
- elseif k=="script" then
- local v=gsub(lower(value),"[^a-z0-9]","")
- h.script=rawget(verbosescripts,v) or (scripts[v] and v) or "dflt"
- elseif k=="axis" then
- h[k]=normalizedaxis(value)
- if not callbacks.supported.glyph_stream_provider then
- h.variableshapes=true
- end
- else
- local uk=usedfeatures[key]
- local uv=uk[value]
- if uv then
- else
- uv=tonumber(value)
- if uv then
- elseif type(value)=="string" then
- local b=is_boolean(value)
- if type(b)=="nil" then
- if wrap and find(value,",") then
- uv="{"..lower(value).."}"
- else
- uv=lower(value)
- end
- else
- uv=b
- end
- elseif type(value)=="table" then
- uv=sequenced(t,",")
- else
- uv=value
- end
- if not rawget(features,k) then
- k=rawget(verbosefeatures,k) or k
- end
- local c=checkers[k]
- if c then
- uv=c(uv) or vc
- end
- uk[value]=uv
- end
- h[k]=uv
- end
- end
- return h
- end
-end
-
-end -- closure
-
-do -- begin closure to overcome local limits and interference
-
if not modules then modules={} end modules ['font-cff']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -14519,12 +13339,15 @@ do
local p_dictionary=(
p_byte+p_positive+p_negative+p_short+p_long+p_nibbles+p_single+p_double+p_unsupported
)^1
- parsedictionaries=function(data,dictionaries,what)
+ parsedictionaries=function(data,dictionaries,version)
stack={}
strings=data.strings
+ if trace_charstrings then
+ report("charstring format %a",version)
+ end
for i=1,#dictionaries do
top=0
- result=what=="cff" and {
+ result=version=="cff" and {
monospaced=false,
italicangle=0,
underlineposition=-100,
@@ -15242,7 +14065,7 @@ do
local reginit=false
local function updateregions(n)
if regions then
- local current=regions[n] or regions[1]
+ local current=regions[n+1] or regions[1]
nofregions=#current
if axis and n~=reginit then
factors={}
@@ -15323,6 +14146,7 @@ do
end
end
else
+ top=top-nofregions*n
end
end
local actions={ [0]=unsupported,
@@ -15810,7 +14634,11 @@ do
popped=3
seacs={}
if regions then
- regions={ regions }
+ regions={}
+ local deltas=data.deltas
+ for i=1,#deltas do
+ regions[i]=deltas[i].regions
+ end
axis=data.factors or false
end
end
@@ -15898,8 +14726,8 @@ do
processshape(tab,index-1)
end
end
-local function readglobals(f,data)
- local routines=readlengths(f)
+local function readglobals(f,data,version)
+ local routines=readlengths(f,version=="cff2")
for i=1,#routines do
routines[i]=readbytetable(f,routines[i])
end
@@ -15953,14 +14781,14 @@ local function readprivates(f,data)
private.data=readstring(f,private.size)
end
end
-local function readlocals(f,data,dictionary)
+local function readlocals(f,data,dictionary,version)
local header=data.header
local private=dictionary.private
if private then
local subroutineoffset=private.data.subroutines
if subroutineoffset~=0 then
setposition(f,header.offset+private.offset+subroutineoffset)
- local subroutines=readlengths(f)
+ local subroutines=readlengths(f,version=="cff2")
for i=1,#subroutines do
subroutines[i]=readbytetable(f,subroutines[i])
end
@@ -15973,7 +14801,7 @@ local function readlocals(f,data,dictionary)
dictionary.subroutines={}
end
end
-local function readcharstrings(f,data,what)
+local function readcharstrings(f,data,version)
local header=data.header
local dictionaries=data.dictionaries
local dictionary=dictionaries[1]
@@ -15982,7 +14810,7 @@ local function readcharstrings(f,data,what)
if type(offset)~="number" then
elseif stringtype==2 then
setposition(f,header.offset+offset)
- local charstrings=readlengths(f,what=="cff2")
+ local charstrings=readlengths(f,version=="cff2")
local nofglyphs=#charstrings
for i=1,nofglyphs do
charstrings[i]=readstring(f,charstrings[i])
@@ -16012,7 +14840,8 @@ readers.parsecharstrings=parsecharstrings
local function readnoselect(f,fontdata,data,glyphs,doshapes,version,streams)
local dictionaries=data.dictionaries
local dictionary=dictionaries[1]
- readglobals(f,data)
+ local cid=not dictionary.private and dictionary.cid
+ readglobals(f,data,version)
readcharstrings(f,data,version)
if version=="cff2" then
dictionary.charset=nil
@@ -16020,9 +14849,27 @@ local function readnoselect(f,fontdata,data,glyphs,doshapes,version,streams)
readencodings(f,data)
readcharsets(f,data,dictionary)
end
+ if cid then
+ local fdarray=cid.fdarray
+ if fdarray then
+ setposition(f,data.header.offset+fdarray)
+ local dictionaries=readlengths(f,version=="cff2")
+ local nofdictionaries=#dictionaries
+ if nofdictionaries>0 then
+ for i=1,nofdictionaries do
+ dictionaries[i]=readstring(f,dictionaries[i])
+ end
+ parsedictionaries(data,dictionaries)
+ dictionary.private=dictionaries[1].private
+ if nofdictionaries>1 then
+ report("ignoring dictionaries > 1 in cid font")
+ end
+ end
+ end
+ end
readprivates(f,data)
parseprivates(data,data.dictionaries)
- readlocals(f,data,dictionary)
+ readlocals(f,data,dictionary,version)
startparsing(fontdata,data,streams)
parsecharstrings(fontdata,data,glyphs,doshapes,version,streams)
stopparsing(fontdata,data)
@@ -16033,7 +14880,7 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams)
local dictionary=dictionaries[1]
local cid=dictionary.cid
local cidselect=cid and cid.fdselect
- readglobals(f,data)
+ readglobals(f,data,version)
readcharstrings(f,data,version)
if version~="cff2" then
readencodings(f,data)
@@ -16077,7 +14924,7 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams)
local cidarray=cid.fdarray
if cidarray then
setposition(f,header.offset+cidarray)
- local dictionaries=readlengths(f)
+ local dictionaries=readlengths(f,version=="cff2")
for i=1,#dictionaries do
dictionaries[i]=readstring(f,dictionaries[i])
end
@@ -16085,7 +14932,7 @@ local function readfdselect(f,fontdata,data,glyphs,doshapes,version,streams)
cid.dictionaries=dictionaries
readcidprivates(f,data)
for i=1,#dictionaries do
- readlocals(f,data,dictionaries[i])
+ readlocals(f,data,dictionaries[i],version)
end
startparsing(fontdata,data,streams)
for i=1,#charstrings do
@@ -16245,6 +15092,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['font-ttf']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -16365,7 +15213,7 @@ local function mergecomposites(glyphs,shapes)
shape.components=nil
return contours,points
end
- for index=0,#glyphs-1 do
+ for index=0,#glyphs do
local shape=shapes[index]
if shape then
local components=shape.components
@@ -16795,7 +15643,7 @@ local function repackpoints(glyphs,shapes)
local result={}
local xpoints={}
local ypoints={}
- for index=0,#glyphs-1 do
+ for index=0,#glyphs do
local shape=shapes[index]
if shape then
local r=0
@@ -17417,6 +16265,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['font-dsp']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -17774,7 +16623,6 @@ local function readvariationdata(f,storeoffset,factors)
end
regions[i]=t
end
- if factors then
for i=1,nofdeltadata do
setposition(f,storeoffset+deltadata[i])
local nofdeltasets=readushort(f)
@@ -17798,7 +16646,6 @@ local function readvariationdata(f,storeoffset,factors)
scales=factors and getscales(usedregions,factors) or nil,
}
end
- end
setposition(f,position)
return regions,deltadata
end
@@ -18057,7 +16904,7 @@ local function readfirst(f,offset)
end
return { readushort(f) }
end
-function readarray(f,offset)
+local function readarray(f,offset)
if offset then
setposition(f,offset)
end
@@ -20694,2643 +19541,1263 @@ end -- closure
do -- begin closure to overcome local limits and interference
-if not modules then modules={} end modules ['font-oup']={
+if not modules then modules={} end modules ['font-oti']={
version=1.001,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-local next,type=next,type
-local P,R,S=lpeg.P,lpeg.R,lpeg.S
-local lpegmatch=lpeg.match
-local insert,remove,copy,unpack=table.insert,table.remove,table.copy,table.unpack
-local formatters=string.formatters
-local sortedkeys=table.sortedkeys
-local sortedhash=table.sortedhash
-local tohash=table.tohash
-local setmetatableindex=table.setmetatableindex
-local report_error=logs.reporter("otf reader","error")
-local report_markwidth=logs.reporter("otf reader","markwidth")
-local report_cleanup=logs.reporter("otf reader","cleanup")
-local report_optimizations=logs.reporter("otf reader","merges")
-local report_unicodes=logs.reporter("otf reader","unicodes")
-local trace_markwidth=false trackers.register("otf.markwidth",function(v) trace_markwidth=v end)
-local trace_cleanup=false trackers.register("otf.cleanups",function(v) trace_cleanups=v end)
-local trace_optimizations=false trackers.register("otf.optimizations",function(v) trace_optimizations=v end)
-local trace_unicodes=false trackers.register("otf.unicodes",function(v) trace_unicodes=v end)
-local readers=fonts.handlers.otf.readers
-local privateoffset=fonts.constructors and fonts.constructors.privateoffset or 0xF0000
-local f_private=formatters["P%05X"]
-local f_unicode=formatters["U%05X"]
-local f_index=formatters["I%05X"]
-local f_character_y=formatters["%C"]
-local f_character_n=formatters["[ %C ]"]
-local check_duplicates=true
-local check_soft_hyphen=true
-directives.register("otf.checksofthyphen",function(v)
- check_soft_hyphen=v
-end)
-local function replaced(list,index,replacement)
- if type(list)=="number" then
- return replacement
- elseif type(replacement)=="table" then
- local t={}
- local n=index-1
- for i=1,n do
- t[i]=list[i]
- end
- for i=1,#replacement do
- n=n+1
- t[n]=replacement[i]
- end
- for i=index+1,#list do
- n=n+1
- t[n]=list[i]
- end
- else
- list[index]=replacement
- return list
- end
-end
-local function unifyresources(fontdata,indices)
- local descriptions=fontdata.descriptions
- local resources=fontdata.resources
- if not descriptions or not resources then
- return
- end
- local nofindices=#indices
- local variants=fontdata.resources.variants
- if variants then
- for selector,unicodes in next,variants do
- for unicode,index in next,unicodes do
- unicodes[unicode]=indices[index]
- end
- end
- end
- local function remark(marks)
- if marks then
- local newmarks={}
- for k,v in next,marks do
- local u=indices[k]
- if u then
- newmarks[u]=v
- elseif trace_optimizations then
- report_optimizations("discarding mark %i",k)
- end
- end
- return newmarks
- end
- end
- local marks=resources.marks
- if marks then
- resources.marks=remark(marks)
- end
- local markclasses=resources.markclasses
- if markclasses then
- for class,marks in next,markclasses do
- markclasses[class]=remark(marks)
- end
- end
- local marksets=resources.marksets
- if marksets then
- for class,marks in next,marksets do
- marksets[class]=remark(marks)
- end
- end
- local done={}
- local duplicates=check_duplicates and resources.duplicates
- if duplicates and not next(duplicates) then
- duplicates=false
- end
- local function recover(cover)
- for i=1,#cover do
- local c=cover[i]
- if not done[c] then
- local t={}
- for k,v in next,c do
- local ug=indices[k]
- if ug then
- t[ug]=v
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,"coverage",k,nofindices)
- end
- end
- cover[i]=t
- done[c]=d
- end
- end
- end
- local function recursed(c,kind)
- local t={}
- for g,d in next,c do
- if type(d)=="table" then
- local ug=indices[g]
- if ug then
- t[ug]=recursed(d,kind)
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g,nofindices)
- end
- else
- t[g]=indices[d]
- end
- end
- return t
- end
- local function unifythem(sequences)
- if not sequences then
- return
- end
- for i=1,#sequences do
- local sequence=sequences[i]
- local kind=sequence.type
- local steps=sequence.steps
- local features=sequence.features
- if steps then
- for i=1,#steps do
- local step=steps[i]
- if kind=="gsub_single" then
- local c=step.coverage
- if c then
- local t1=done[c]
- if not t1 then
- t1={}
- if duplicates then
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- local ud1=indices[d1]
- if ud1 then
- t1[ug1]=ud1
- local dg1=duplicates[ug1]
- if dg1 then
- for u in next,dg1 do
- t1[u]=ud1
- end
- end
- else
- report_error("case %i, bad index in unifying %s: %s of %s",3,kind,d1,nofindices)
- end
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
- end
- end
- else
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- t1[ug1]=indices[d1]
- else
- report_error("fuzzy case %i in unifying %s: %i",2,kind,g1)
- end
- end
- end
- done[c]=t1
- end
- step.coverage=t1
- end
- elseif kind=="gpos_pair" then
- local c=step.coverage
- if c then
- local t1=done[c]
- if not t1 then
- t1={}
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- local t2=done[d1]
- if not t2 then
- t2={}
- for g2,d2 in next,d1 do
- local ug2=indices[g2]
- if ug2 then
- t2[ug2]=d2
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g2,nofindices,nofindices)
- end
- end
- done[d1]=t2
- end
- t1[ug1]=t2
- else
- report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
- end
- end
- done[c]=t1
- end
- step.coverage=t1
- end
- elseif kind=="gsub_ligature" then
- local c=step.coverage
- if c then
- step.coverage=recursed(c,kind)
- end
- elseif kind=="gsub_alternate" or kind=="gsub_multiple" then
- local c=step.coverage
- if c then
- local t1=done[c]
- if not t1 then
- t1={}
- if duplicates then
- for g1,d1 in next,c do
- for i=1,#d1 do
- local d1i=d1[i]
- local d1u=indices[d1i]
- if d1u then
- d1[i]=d1u
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,kind,i,d1i,nofindices)
- end
- end
- local ug1=indices[g1]
- if ug1 then
- t1[ug1]=d1
- local dg1=duplicates[ug1]
- if dg1 then
- for u in next,dg1 do
- t1[u]=copy(d1)
- end
- end
- else
- report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
- end
- end
- else
- for g1,d1 in next,c do
- for i=1,#d1 do
- local d1i=d1[i]
- local d1u=indices[d1i]
- if d1u then
- d1[i]=d1u
- else
- report_error("case %i, bad index in unifying %s: %s of %s",2,kind,d1i,nofindices)
- end
- end
- t1[indices[g1]]=d1
- end
- end
- done[c]=t1
- end
- step.coverage=t1
- end
- elseif kind=="gpos_single" then
- local c=step.coverage
- if c then
- local t1=done[c]
- if not t1 then
- t1={}
- if duplicates then
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- t1[ug1]=d1
- local dg1=duplicates[ug1]
- if dg1 then
- for u in next,dg1 do
- t1[u]=d1
- end
- end
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
- end
- end
- else
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- t1[ug1]=d1
- else
- report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
- end
- end
- end
- done[c]=t1
- end
- step.coverage=t1
- end
- elseif kind=="gpos_mark2base" or kind=="gpos_mark2mark" or kind=="gpos_mark2ligature" then
- local c=step.coverage
- if c then
- local t1=done[c]
- if not t1 then
- t1={}
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- t1[ug1]=d1
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
- end
- end
- done[c]=t1
- end
- step.coverage=t1
- end
- local c=step.baseclasses
- if c then
- local t1=done[c]
- if not t1 then
- for g1,d1 in next,c do
- local t2=done[d1]
- if not t2 then
- t2={}
- for g2,d2 in next,d1 do
- local ug2=indices[g2]
- if ug2 then
- t2[ug2]=d2
- else
- report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g2,nofindices)
- end
- end
- done[d1]=t2
- end
- c[g1]=t2
- end
- done[c]=c
- end
- end
- elseif kind=="gpos_cursive" then
- local c=step.coverage
- if c then
- local t1=done[c]
- if not t1 then
- t1={}
- if duplicates then
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- t1[ug1]=d1
- local dg1=duplicates[ug1]
- if dg1 then
- for u in next,dg1 do
- t1[u]=copy(d1)
- end
- end
- else
- report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
- end
- end
- else
- for g1,d1 in next,c do
- local ug1=indices[g1]
- if ug1 then
- t1[ug1]=d1
- else
- report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
- end
- end
- end
- done[c]=t1
- end
- step.coverage=t1
- end
- end
- local rules=step.rules
- if rules then
- for i=1,#rules do
- local rule=rules[i]
- local before=rule.before if before then recover(before) end
- local after=rule.after if after then recover(after) end
- local current=rule.current if current then recover(current) end
- local replacements=rule.replacements
- if replacements then
- if not done[replacements] then
- local r={}
- for k,v in next,replacements do
- r[indices[k]]=indices[v]
- end
- rule.replacements=r
- done[replacements]=r
- end
- end
- end
- end
- end
- end
- end
- end
- unifythem(resources.sequences)
- unifythem(resources.sublookups)
-end
-local function copyduplicates(fontdata)
- if check_duplicates then
- local descriptions=fontdata.descriptions
- local resources=fontdata.resources
- local duplicates=resources.duplicates
- if check_soft_hyphen then
- local ds=descriptions[0xAD]
- if not ds or ds.width==0 then
- if ds then
- descriptions[0xAD]=nil
- if trace_unicodes then
- report_unicodes("patching soft hyphen")
- end
- else
- if trace_unicodes then
- report_unicodes("adding soft hyphen")
- end
- end
- if not duplicates then
- duplicates={}
- resources.duplicates=duplicates
- end
- local dh=duplicates[0x2D]
- if dh then
- dh[#dh+1]={ [0xAD]=true }
- else
- duplicates[0x2D]={ [0xAD]=true }
- end
- end
- end
- if duplicates then
- for u,d in next,duplicates do
- local du=descriptions[u]
- if du then
- local t={ f_character_y(u),"@",f_index(du.index),"->" }
- local n=0
- local m=25
- for u in next,d do
- if descriptions[u] then
- if n<m then
- t[n+4]=f_character_n(u)
- end
- else
- local c=copy(du)
- c.unicode=u
- descriptions[u]=c
- if n<m then
- t[n+4]=f_character_y(u)
- end
- end
- n=n+1
- end
- if trace_unicodes then
- if n<=m then
- report_unicodes("%i : % t",n,t)
- else
- report_unicodes("%i : % t ...",n,t)
- end
- end
- else
- end
- end
- end
- end
-end
-local ignore={
- ["notdef"]=true,
- [".notdef"]=true,
- ["null"]=true,
- [".null"]=true,
- ["nonmarkingreturn"]=true,
+local lower=string.lower
+local fonts=fonts
+local constructors=fonts.constructors
+local otf=constructors.handlers.otf
+local otffeatures=constructors.features.otf
+local registerotffeature=otffeatures.register
+local otftables=otf.tables or {}
+otf.tables=otftables
+local allocate=utilities.storage.allocate
+registerotffeature {
+ name="features",
+ description="initialization of feature handler",
+ default=true,
}
-local function checklookups(fontdata,missing,nofmissing)
- local descriptions=fontdata.descriptions
- local resources=fontdata.resources
- if missing and nofmissing and nofmissing<=0 then
- return
- end
- local singles={}
- local alternates={}
- local ligatures={}
- if not missing then
- missing={}
- nofmissing=0
- for u,d in next,descriptions do
- if not d.unicode then
- nofmissing=nofmissing+1
- missing[u]=true
- end
- end
- end
- local function collectthem(sequences)
- if not sequences then
- return
- end
- for i=1,#sequences do
- local sequence=sequences[i]
- local kind=sequence.type
- local steps=sequence.steps
- if steps then
- for i=1,#steps do
- local step=steps[i]
- if kind=="gsub_single" then
- local c=step.coverage
- if c then
- singles[#singles+1]=c
- end
- elseif kind=="gsub_alternate" then
- local c=step.coverage
- if c then
- alternates[#alternates+1]=c
- end
- elseif kind=="gsub_ligature" then
- local c=step.coverage
- if c then
- ligatures[#ligatures+1]=c
- end
- end
- end
- end
- end
- end
- collectthem(resources.sequences)
- collectthem(resources.sublookups)
- local loops=0
- while true do
- loops=loops+1
- local old=nofmissing
- for i=1,#singles do
- local c=singles[i]
- for g1,g2 in next,c do
- if missing[g1] then
- local u2=descriptions[g2].unicode
- if u2 then
- missing[g1]=false
- descriptions[g1].unicode=u2
- nofmissing=nofmissing-1
- end
- end
- if missing[g2] then
- local u1=descriptions[g1].unicode
- if u1 then
- missing[g2]=false
- descriptions[g2].unicode=u1
- nofmissing=nofmissing-1
- end
- end
- end
- end
- for i=1,#alternates do
- local c=alternates[i]
- for g1,d1 in next,c do
- if missing[g1] then
- for i=1,#d1 do
- local g2=d1[i]
- local u2=descriptions[g2].unicode
- if u2 then
- missing[g1]=false
- descriptions[g1].unicode=u2
- nofmissing=nofmissing-1
- end
- end
- end
- if not missing[g1] then
- for i=1,#d1 do
- local g2=d1[i]
- if missing[g2] then
- local u1=descriptions[g1].unicode
- if u1 then
- missing[g2]=false
- descriptions[g2].unicode=u1
- nofmissing=nofmissing-1
- end
- end
- end
- end
- end
- end
- if nofmissing<=0 then
- if trace_unicodes then
- report_unicodes("all missings done in %s loops",loops)
- end
- return
- elseif old==nofmissing then
- break
- end
- end
- local t,n
- local function recursed(c)
- for g,d in next,c do
- if g~="ligature" then
- local u=descriptions[g].unicode
- if u then
- n=n+1
- t[n]=u
- recursed(d)
- n=n-1
- end
- elseif missing[d] then
- local l={}
- local m=0
- for i=1,n do
- local u=t[i]
- if type(u)=="table" then
- for i=1,#u do
- m=m+1
- l[m]=u[i]
- end
- else
- m=m+1
- l[m]=u
- end
- end
- missing[d]=false
- descriptions[d].unicode=l
- nofmissing=nofmissing-1
- end
- end
- end
- if nofmissing>0 then
- t={}
- n=0
- local loops=0
- while true do
- loops=loops+1
- local old=nofmissing
- for i=1,#ligatures do
- recursed(ligatures[i])
- end
- if nofmissing<=0 then
- if trace_unicodes then
- report_unicodes("all missings done in %s loops",loops)
- end
- return
- elseif old==nofmissing then
- break
- end
- end
- t=nil
- n=0
- end
- if trace_unicodes and nofmissing>0 then
- local done={}
- for i,r in next,missing do
- if r then
- local data=descriptions[i]
- local name=data and data.name or f_index(i)
- if not ignore[name] then
- done[name]=true
- end
- end
- end
- if next(done) then
- report_unicodes("not unicoded: % t",sortedkeys(done))
- end
+local function setmode(tfmdata,value)
+ if value then
+ tfmdata.properties.mode=lower(value)
end
end
-local firstprivate=fonts.privateoffsets and fonts.privateoffsets.textbase or 0xF0000
-local puafirst=0xE000
-local pualast=0xF8FF
-local function unifymissing(fontdata)
- if not fonts.mappings then
- require("font-map")
- require("font-agl")
- end
- local unicodes={}
- local resources=fontdata.resources
- resources.unicodes=unicodes
- for unicode,d in next,fontdata.descriptions do
- if unicode<privateoffset then
- if unicode>=puafirst and unicode<=pualast then
- else
- local name=d.name
- if name then
- unicodes[name]=unicode
- end
- end
+otf.modeinitializer=setmode
+local function setlanguage(tfmdata,value)
+ if value then
+ local cleanvalue=lower(value)
+ local languages=otftables and otftables.languages
+ local properties=tfmdata.properties
+ if not languages then
+ properties.language=cleanvalue
+ elseif languages[value] then
+ properties.language=cleanvalue
else
+ properties.language="dflt"
end
end
- fonts.mappings.addtounicode(fontdata,fontdata.filename,checklookups)
- resources.unicodes=nil
-end
-local function unifyglyphs(fontdata,usenames)
- local private=fontdata.private or privateoffset
- local glyphs=fontdata.glyphs
- local indices={}
- local descriptions={}
- local names=usenames and {}
- local resources=fontdata.resources
- local zero=glyphs[0]
- local zerocode=zero.unicode
- if not zerocode then
- zerocode=private
- zero.unicode=zerocode
- private=private+1
- end
- descriptions[zerocode]=zero
- if names then
- local name=glyphs[0].name or f_private(zerocode)
- indices[0]=name
- names[name]=zerocode
- else
- indices[0]=zerocode
- end
- if names then
- for index=1,#glyphs do
- local glyph=glyphs[index]
- local unicode=glyph.unicode
- if not unicode then
- unicode=private
- local name=glyph.name or f_private(unicode)
- indices[index]=name
- names[name]=unicode
- private=private+1
- elseif unicode>=firstprivate then
- unicode=private
- local name=glyph.name or f_private(unicode)
- indices[index]=name
- names[name]=unicode
- private=private+1
- elseif unicode>=puafirst and unicode<=pualast then
- local name=glyph.name or f_private(unicode)
- indices[index]=name
- names[name]=unicode
- elseif descriptions[unicode] then
- unicode=private
- local name=glyph.name or f_private(unicode)
- indices[index]=name
- names[name]=unicode
- private=private+1
- else
- local name=glyph.name or f_unicode(unicode)
- indices[index]=name
- names[name]=unicode
- end
- descriptions[unicode]=glyph
- end
- elseif trace_unicodes then
- for index=1,#glyphs do
- local glyph=glyphs[index]
- local unicode=glyph.unicode
- if not unicode then
- unicode=private
- indices[index]=unicode
- private=private+1
- elseif unicode>=firstprivate then
- local name=glyph.name
- if name then
- report_unicodes("moving glyph %a indexed %05X from private %U to %U ",name,index,unicode,private)
- else
- report_unicodes("moving glyph indexed %05X from private %U to %U ",index,unicode,private)
- end
- unicode=private
- indices[index]=unicode
- private=private+1
- elseif unicode>=puafirst and unicode<=pualast then
- local name=glyph.name
- if name then
- report_unicodes("keeping private unicode %U for glyph %a indexed %05X",unicode,name,index)
- else
- report_unicodes("keeping private unicode %U for glyph indexed %05X",unicode,index)
- end
- indices[index]=unicode
- elseif descriptions[unicode] then
- local name=glyph.name
- if name then
- report_unicodes("assigning duplicate unicode %U to %U for glyph %a indexed %05X ",unicode,private,name,index)
- else
- report_unicodes("assigning duplicate unicode %U to %U for glyph indexed %05X ",unicode,private,index)
- end
- unicode=private
- indices[index]=unicode
- private=private+1
- else
- indices[index]=unicode
- end
- descriptions[unicode]=glyph
- end
- else
- for index=1,#glyphs do
- local glyph=glyphs[index]
- local unicode=glyph.unicode
- if not unicode then
- unicode=private
- indices[index]=unicode
- private=private+1
- elseif unicode>=firstprivate then
- local name=glyph.name
- unicode=private
- indices[index]=unicode
- private=private+1
- elseif unicode>=puafirst and unicode<=pualast then
- local name=glyph.name
- indices[index]=unicode
- elseif descriptions[unicode] then
- local name=glyph.name
- unicode=private
- indices[index]=unicode
- private=private+1
- else
- indices[index]=unicode
- end
- descriptions[unicode]=glyph
- end
- end
- for index=1,#glyphs do
- local math=glyphs[index].math
- if math then
- local list=math.vparts
- if list then
- for i=1,#list do local l=list[i] l.glyph=indices[l.glyph] end
- end
- local list=math.hparts
- if list then
- for i=1,#list do local l=list[i] l.glyph=indices[l.glyph] end
- end
- local list=math.vvariants
- if list then
- for i=1,#list do list[i]=indices[list[i]] end
- end
- local list=math.hvariants
- if list then
- for i=1,#list do list[i]=indices[list[i]] end
- end
- end
- end
- local colorpalettes=resources.colorpalettes
- if colorpalettes then
- for index=1,#glyphs do
- local colors=glyphs[index].colors
- if colors then
- for i=1,#colors do
- local c=colors[i]
- c.slot=indices[c.slot]
- end
- end
- end
- end
- fontdata.private=private
- fontdata.glyphs=nil
- fontdata.names=names
- fontdata.descriptions=descriptions
- fontdata.hashmethod=hashmethod
- return indices,names
end
-local p_crappyname do
- local p_hex=R("af","AF","09")
- local p_digit=R("09")
- local p_done=S("._-")^0+P(-1)
- local p_alpha=R("az","AZ")
- local p_ALPHA=R("AZ")
- p_crappyname=(
- lpeg.utfchartabletopattern({ "uni","u" },true)*S("Xx_")^0*p_hex^1
-+lpeg.utfchartabletopattern({ "identity","glyph","jamo" },true)*p_hex^1
-+lpeg.utfchartabletopattern({ "index","afii" },true)*p_digit^1
-+p_digit*p_hex^3+p_alpha*p_digit^1
-+P("aj")*p_digit^1+P("eh_")*(p_digit^1+p_ALPHA*p_digit^1)+(1-P("_"))^1*P("_uni")*p_hex^1+P("_")*P(1)^1
- )*p_done
-end
-local forcekeep=false
-directives.register("otf.keepnames",function(v)
- report_cleanup("keeping weird glyph names, expect larger files and more memory usage")
- forcekeep=v
-end)
-local function stripredundant(fontdata)
- local descriptions=fontdata.descriptions
- if descriptions then
- local n=0
- local c=0
- if (not context and fonts.privateoffsets.keepnames) or forcekeep then
- for unicode,d in next,descriptions do
- if d.class=="base" then
- d.class=nil
- c=c+1
- end
- end
+local function setscript(tfmdata,value)
+ if value then
+ local cleanvalue=lower(value)
+ local scripts=otftables and otftables.scripts
+ local properties=tfmdata.properties
+ if not scripts then
+ properties.script=cleanvalue
+ elseif scripts[value] then
+ properties.script=cleanvalue
else
- for unicode,d in next,descriptions do
- local name=d.name
- if name and lpegmatch(p_crappyname,name) then
- d.name=nil
- n=n+1
- end
- if d.class=="base" then
- d.class=nil
- c=c+1
- end
- end
- end
- if trace_cleanup then
- if n>0 then
- report_cleanup("%s bogus names removed (verbose unicode)",n)
- end
- if c>0 then
- report_cleanup("%s base class tags removed (default is base)",c)
- end
- end
- end
-end
-readers.stripredundant=stripredundant
-function readers.getcomponents(fontdata)
- local resources=fontdata.resources
- if resources then
- local sequences=resources.sequences
- if sequences then
- local collected={}
- for i=1,#sequences do
- local sequence=sequences[i]
- if sequence.type=="gsub_ligature" then
- local steps=sequence.steps
- if steps then
- local l={}
- local function traverse(p,k,v)
- if k=="ligature" then
- collected[v]={ unpack(l) }
- else
- insert(l,k)
- for k,vv in next,v do
- traverse(p,k,vv)
- end
- remove(l)
- end
- end
- for i=1,#steps do
- local c=steps[i].coverage
- if c then
- for k,v in next,c do
- traverse(k,k,v)
- end
- end
- end
- end
- end
- end
- if next(collected) then
- while true do
- local done=false
- for k,v in next,collected do
- for i=1,#v do
- local vi=v[i]
- if vi==k then
- collected[k]=nil
- break
- else
- local c=collected[vi]
- if c then
- done=true
- local t={}
- local n=i-1
- for j=1,n do
- t[j]=v[j]
- end
- for j=1,#c do
- n=n+1
- t[n]=c[j]
- end
- for j=i+1,#v do
- n=n+1
- t[n]=v[j]
- end
- collected[k]=t
- break
- end
- end
- end
- end
- if not done then
- break
- end
- end
- return collected
- end
+ properties.script="dflt"
end
end
end
-readers.unifymissing=unifymissing
-function readers.rehash(fontdata,hashmethod)
- if not (fontdata and fontdata.glyphs) then
- return
- end
- if hashmethod=="indices" then
- fontdata.hashmethod="indices"
- elseif hashmethod=="names" then
- fontdata.hashmethod="names"
- local indices=unifyglyphs(fontdata,true)
- unifyresources(fontdata,indices)
- copyduplicates(fontdata)
- unifymissing(fontdata)
- else
- fontdata.hashmethod="unicodes"
- local indices=unifyglyphs(fontdata)
- unifyresources(fontdata,indices)
- copyduplicates(fontdata)
- unifymissing(fontdata)
- stripredundant(fontdata)
- end
-end
-function readers.checkhash(fontdata)
- local hashmethod=fontdata.hashmethod
- if hashmethod=="unicodes" then
- fontdata.names=nil
- elseif hashmethod=="names" and fontdata.names then
- unifyresources(fontdata,fontdata.names)
- copyduplicates(fontdata)
- fontdata.hashmethod="unicodes"
- fontdata.names=nil
- else
- readers.rehash(fontdata,"unicodes")
- end
-end
-function readers.addunicodetable(fontdata)
- local resources=fontdata.resources
- local unicodes=resources.unicodes
- if not unicodes then
- local descriptions=fontdata.descriptions
- if descriptions then
- unicodes={}
- resources.unicodes=unicodes
- for u,d in next,descriptions do
- local n=d.name
- if n then
- unicodes[n]=u
- end
+registerotffeature {
+ name="mode",
+ description="mode",
+ initializers={
+ base=setmode,
+ node=setmode,
+ plug=setmode,
+ }
+}
+registerotffeature {
+ name="language",
+ description="language",
+ initializers={
+ base=setlanguage,
+ node=setlanguage,
+ plug=setlanguage,
+ }
+}
+registerotffeature {
+ name="script",
+ description="script",
+ initializers={
+ base=setscript,
+ node=setscript,
+ plug=setscript,
+ }
+}
+otftables.featuretypes=allocate {
+ gpos_single="position",
+ gpos_pair="position",
+ gpos_cursive="position",
+ gpos_mark2base="position",
+ gpos_mark2ligature="position",
+ gpos_mark2mark="position",
+ gpos_context="position",
+ gpos_contextchain="position",
+ gsub_single="substitution",
+ gsub_multiple="substitution",
+ gsub_alternate="substitution",
+ gsub_ligature="substitution",
+ gsub_context="substitution",
+ gsub_contextchain="substitution",
+ gsub_reversecontextchain="substitution",
+ gsub_reversesub="substitution",
+}
+function otffeatures.checkeddefaultscript(featuretype,autoscript,scripts)
+ if featuretype=="position" then
+ local default=scripts.dflt
+ if default then
+ if autoscript=="position" or autoscript==true then
+ return default
+ else
+ report_otf("script feature %s not applied, enable default positioning")
end
- end
- end
-end
-local concat,sort=table.concat,table.sort
-local next,type,tostring=next,type,tostring
-local criterium=1
-local threshold=0
-local trace_packing=false trackers.register("otf.packing",function(v) trace_packing=v end)
-local trace_loading=false trackers.register("otf.loading",function(v) trace_loading=v end)
-local report_otf=logs.reporter("fonts","otf loading")
-local function tabstr_normal(t)
- local s={}
- local n=0
- for k,v in next,t do
- n=n+1
- if type(v)=="table" then
- s[n]=k..">"..tabstr_normal(v)
- elseif v==true then
- s[n]=k.."+"
- elseif v then
- s[n]=k.."="..v
- else
- s[n]=k.."-"
- end
- end
- if n==0 then
- return ""
- elseif n==1 then
- return s[1]
- else
- sort(s)
- return concat(s,",")
- end
-end
-local function tabstr_flat(t)
- local s={}
- local n=0
- for k,v in next,t do
- n=n+1
- s[n]=k.."="..v
- end
- if n==0 then
- return ""
- elseif n==1 then
- return s[1]
- else
- sort(s)
- return concat(s,",")
- end
-end
-local function tabstr_mixed(t)
- local s={}
- local n=#t
- if n==0 then
- return ""
- elseif n==1 then
- local k=t[1]
- if k==true then
- return "++"
- elseif k==false then
- return "--"
else
- return tostring(k)
end
- else
- for i=1,n do
- local k=t[i]
- if k==true then
- s[i]="++"
- elseif k==false then
- s[i]="--"
- else
- s[i]=k
+ elseif featuretype=="substitution" then
+ local default=scripts.dflt
+ if default then
+ if autoscript=="substitution" or autoscript==true then
+ return default
end
end
- return concat(s,",")
end
end
-local function tabstr_boolean(t)
- local s={}
- local n=0
- for k,v in next,t do
- n=n+1
- if v then
- s[n]=k.."+"
- else
- s[n]=k.."-"
- end
- end
- if n==0 then
- return ""
- elseif n==1 then
- return s[1]
- else
- sort(s)
- return concat(s,",")
- end
-end
-function readers.pack(data)
- if data then
- local h,t,c={},{},{}
- local hh,tt,cc={},{},{}
- local nt,ntt=0,0
- local function pack_normal(v)
- local tag=tabstr_normal(v)
- local ht=h[tag]
- if ht then
- c[ht]=c[ht]+1
- return ht
- else
- nt=nt+1
- t[nt]=v
- h[tag]=nt
- c[nt]=1
- return nt
- end
- end
- local function pack_normal_cc(v)
- local tag=tabstr_normal(v)
- local ht=h[tag]
- if ht then
- c[ht]=c[ht]+1
- return ht
- else
- v[1]=0
- nt=nt+1
- t[nt]=v
- h[tag]=nt
- c[nt]=1
- return nt
- end
- end
- local function pack_flat(v)
- local tag=tabstr_flat(v)
- local ht=h[tag]
- if ht then
- c[ht]=c[ht]+1
- return ht
- else
- nt=nt+1
- t[nt]=v
- h[tag]=nt
- c[nt]=1
- return nt
- end
- end
- local function pack_indexed(v)
- local tag=concat(v," ")
- local ht=h[tag]
- if ht then
- c[ht]=c[ht]+1
- return ht
- else
- nt=nt+1
- t[nt]=v
- h[tag]=nt
- c[nt]=1
- return nt
- end
- end
- local function pack_mixed(v)
- local tag=tabstr_mixed(v)
- local ht=h[tag]
- if ht then
- c[ht]=c[ht]+1
- return ht
- else
- nt=nt+1
- t[nt]=v
- h[tag]=nt
- c[nt]=1
- return nt
- end
- end
- local function pack_boolean(v)
- local tag=tabstr_boolean(v)
- local ht=h[tag]
- if ht then
- c[ht]=c[ht]+1
- return ht
- else
- nt=nt+1
- t[nt]=v
- h[tag]=nt
- c[nt]=1
- return nt
- end
- end
- local function pack_final(v)
- if c[v]<=criterium then
- return t[v]
- else
- local hv=hh[v]
- if hv then
- return hv
- else
- ntt=ntt+1
- tt[ntt]=t[v]
- hh[v]=ntt
- cc[ntt]=c[v]
- return ntt
- end
- end
- end
- local function pack_final_cc(v)
- if c[v]<=criterium then
- return t[v]
- else
- local hv=hh[v]
- if hv then
- return hv
- else
- ntt=ntt+1
- tt[ntt]=t[v]
- hh[v]=ntt
- cc[ntt]=c[v]
- return ntt
- end
- end
- end
- local function success(stage,pass)
- if nt==0 then
- if trace_loading or trace_packing then
- report_otf("pack quality: nothing to pack")
- end
- return false
- elseif nt>=threshold then
- local one=0
- local two=0
- local rest=0
- if pass==1 then
- for k,v in next,c do
- if v==1 then
- one=one+1
- elseif v==2 then
- two=two+1
- else
- rest=rest+1
- end
- end
- else
- for k,v in next,cc do
- if v>20 then
- rest=rest+1
- elseif v>10 then
- two=two+1
- else
- one=one+1
- end
- end
- data.tables=tt
- end
- if trace_loading or trace_packing then
- report_otf("pack quality: stage %s, pass %s, %s packed, 1-10:%s, 11-20:%s, rest:%s (criterium: %s)",
- stage,pass,one+two+rest,one,two,rest,criterium)
- end
- return true
- else
- if trace_loading or trace_packing then
- report_otf("pack quality: stage %s, pass %s, %s packed, aborting pack (threshold: %s)",
- stage,pass,nt,threshold)
- end
- return false
- end
- end
- local function packers(pass)
- if pass==1 then
- return pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc
+function otffeatures.checkeddefaultlanguage(featuretype,autolanguage,languages)
+ if featuretype=="position" then
+ local default=languages.dflt
+ if default then
+ if autolanguage=="position" or autolanguage==true then
+ return default
else
- return pack_final,pack_final,pack_final,pack_final,pack_final,pack_final_cc
- end
- end
- local resources=data.resources
- local sequences=resources.sequences
- local sublookups=resources.sublookups
- local features=resources.features
- local palettes=resources.colorpalettes
- local variable=resources.variabledata
- local chardata=characters and characters.data
- local descriptions=data.descriptions or data.glyphs
- if not descriptions then
- return
- end
- for pass=1,2 do
- if trace_packing then
- report_otf("start packing: stage 1, pass %s",pass)
- end
- local pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc=packers(pass)
- for unicode,description in next,descriptions do
- local boundingbox=description.boundingbox
- if boundingbox then
- description.boundingbox=pack_indexed(boundingbox)
- end
- local math=description.math
- if math then
- local kerns=math.kerns
- if kerns then
- for tag,kern in next,kerns do
- kerns[tag]=pack_normal(kern)
- end
- end
- end
- end
- local function packthem(sequences)
- for i=1,#sequences do
- local sequence=sequences[i]
- local kind=sequence.type
- local steps=sequence.steps
- local order=sequence.order
- local features=sequence.features
- local flags=sequence.flags
- if steps then
- for i=1,#steps do
- local step=steps[i]
- if kind=="gpos_pair" then
- local c=step.coverage
- if c then
- if step.format~="pair" then
- for g1,d1 in next,c do
- c[g1]=pack_normal(d1)
- end
- elseif step.shared then
- local shared={}
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- if not shared[d2] then
- local f=d2[1] if f and f~=true then d2[1]=pack_indexed(f) end
- local s=d2[2] if s and s~=true then d2[2]=pack_indexed(s) end
- shared[d2]=true
- end
- end
- end
- if pass==2 then
- step.shared=nil
- end
- else
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- local f=d2[1] if f and f~=true then d2[1]=pack_indexed(f) end
- local s=d2[2] if s and s~=true then d2[2]=pack_indexed(s) end
- end
- end
- end
- end
- elseif kind=="gpos_single" then
- local c=step.coverage
- if c then
- if step.format=="single" then
- for g1,d1 in next,c do
- if d1 and d1~=true then
- c[g1]=pack_indexed(d1)
- end
- end
- else
- step.coverage=pack_normal(c)
- end
- end
- elseif kind=="gpos_cursive" then
- local c=step.coverage
- if c then
- for g1,d1 in next,c do
- local f=d1[2] if f then d1[2]=pack_indexed(f) end
- local s=d1[3] if s then d1[3]=pack_indexed(s) end
- end
- end
- elseif kind=="gpos_mark2base" or kind=="gpos_mark2mark" then
- local c=step.baseclasses
- if c then
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- d1[g2]=pack_indexed(d2)
- end
- end
- end
- local c=step.coverage
- if c then
- for g1,d1 in next,c do
- d1[2]=pack_indexed(d1[2])
- end
- end
- elseif kind=="gpos_mark2ligature" then
- local c=step.baseclasses
- if c then
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- for g3,d3 in next,d2 do
- d2[g3]=pack_indexed(d3)
- end
- end
- end
- end
- local c=step.coverage
- if c then
- for g1,d1 in next,c do
- d1[2]=pack_indexed(d1[2])
- end
- end
- end
- local rules=step.rules
- if rules then
- for i=1,#rules do
- local rule=rules[i]
- local r=rule.before if r then for i=1,#r do r[i]=pack_boolean(r[i]) end end
- local r=rule.after if r then for i=1,#r do r[i]=pack_boolean(r[i]) end end
- local r=rule.current if r then for i=1,#r do r[i]=pack_boolean(r[i]) end end
- local r=rule.replacements if r then rule.replacements=pack_flat (r) end
- end
- end
- end
- end
- if order then
- sequence.order=pack_indexed(order)
- end
- if features then
- for script,feature in next,features do
- features[script]=pack_normal(feature)
- end
- end
- if flags then
- sequence.flags=pack_normal(flags)
- end
- end
- end
- if sequences then
- packthem(sequences)
- end
- if sublookups then
- packthem(sublookups)
- end
- if features then
- for k,list in next,features do
- for feature,spec in next,list do
- list[feature]=pack_normal(spec)
- end
- end
- end
- if palettes then
- for i=1,#palettes do
- local p=palettes[i]
- for j=1,#p do
- p[j]=pack_indexed(p[j])
- end
- end
- end
- if variable then
- local instances=variable.instances
- if instances then
- for i=1,#instances do
- local v=instances[i].values
- for j=1,#v do
- v[j]=pack_normal(v[j])
- end
- end
- end
- local function packdeltas(main)
- if main then
- local deltas=main.deltas
- if deltas then
- for i=1,#deltas do
- local di=deltas[i]
- local d=di.deltas
- for j=1,#d do
- d[j]=pack_indexed(d[j])
- end
- di.regions=pack_indexed(di.regions)
- end
- end
- local regions=main.regions
- if regions then
- for i=1,#regions do
- local r=regions[i]
- for j=1,#r do
- r[j]=pack_normal(r[j])
- end
- end
- end
- end
- end
- packdeltas(variable.global)
- packdeltas(variable.horizontal)
- packdeltas(variable.vertical)
- packdeltas(variable.metrics)
- end
- if not success(1,pass) then
- return
+ report_otf("language feature %s not applied, enable default positioning")
end
+ else
end
- if nt>0 then
- for pass=1,2 do
- if trace_packing then
- report_otf("start packing: stage 2, pass %s",pass)
- end
- local pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc=packers(pass)
- for unicode,description in next,descriptions do
- local math=description.math
- if math then
- local kerns=math.kerns
- if kerns then
- math.kerns=pack_normal(kerns)
- end
- end
- end
- local function packthem(sequences)
- for i=1,#sequences do
- local sequence=sequences[i]
- local kind=sequence.type
- local steps=sequence.steps
- local features=sequence.features
- if steps then
- for i=1,#steps do
- local step=steps[i]
- if kind=="gpos_pair" then
- local c=step.coverage
- if c then
- if step.format=="pair" then
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- d1[g2]=pack_normal(d2)
- end
- end
- end
- end
- elseif kind=="gpos_mark2ligature" then
- local c=step.baseclasses
- if c then
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- d1[g2]=pack_normal(d2)
- end
- end
- end
- end
- local rules=step.rules
- if rules then
- for i=1,#rules do
- local rule=rules[i]
- local r=rule.before if r then rule.before=pack_normal(r) end
- local r=rule.after if r then rule.after=pack_normal(r) end
- local r=rule.current if r then rule.current=pack_normal(r) end
- end
- end
- end
- end
- if features then
- sequence.features=pack_normal(features)
- end
- end
- end
- if sequences then
- packthem(sequences)
- end
- if sublookups then
- packthem(sublookups)
- end
- if variable then
- local function unpackdeltas(main)
- if main then
- local regions=main.regions
- if regions then
- main.regions=pack_normal(regions)
- end
- end
- end
- unpackdeltas(variable.global)
- unpackdeltas(variable.horizontal)
- unpackdeltas(variable.vertical)
- unpackdeltas(variable.metrics)
- end
- end
- for pass=1,2 do
- if trace_packing then
- report_otf("start packing: stage 3, pass %s",pass)
- end
- local pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc=packers(pass)
- local function packthem(sequences)
- for i=1,#sequences do
- local sequence=sequences[i]
- local kind=sequence.type
- local steps=sequence.steps
- local features=sequence.features
- if steps then
- for i=1,#steps do
- local step=steps[i]
- if kind=="gpos_pair" then
- local c=step.coverage
- if c then
- if step.format=="pair" then
- for g1,d1 in next,c do
- c[g1]=pack_normal(d1)
- end
- end
- end
- elseif kind=="gpos_cursive" then
- local c=step.coverage
- if c then
- for g1,d1 in next,c do
- c[g1]=pack_normal_cc(d1)
- end
- end
- end
- end
- end
- end
- end
- if sequences then
- packthem(sequences)
- end
- if sublookups then
- packthem(sublookups)
- end
+ elseif featuretype=="substitution" then
+ local default=languages.dflt
+ if default then
+ if autolanguage=="substitution" or autolanguage==true then
+ return default
end
end
end
end
-local unpacked_mt={
- __index=function(t,k)
- t[k]=false
- return k
- end
+
+end -- closure
+
+do -- begin closure to overcome local limits and interference
+
+if not modules then modules={} end modules ["font-ott"]={
+ 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",
}
-function readers.unpack(data)
- if data then
- local tables=data.tables
- if tables then
- local resources=data.resources
- local descriptions=data.descriptions or data.glyphs
- local sequences=resources.sequences
- local sublookups=resources.sublookups
- local features=resources.features
- local palettes=resources.colorpalettes
- local variable=resources.variabledata
- local unpacked={}
- setmetatable(unpacked,unpacked_mt)
- for unicode,description in next,descriptions do
- local tv=tables[description.boundingbox]
- if tv then
- description.boundingbox=tv
- end
- local math=description.math
- if math then
- local kerns=math.kerns
- if kerns then
- local tm=tables[kerns]
- if tm then
- math.kerns=tm
- kerns=unpacked[tm]
- end
- if kerns then
- for k,kern in next,kerns do
- local tv=tables[kern]
- if tv then
- kerns[k]=tv
- end
- end
- end
- end
- end
- end
- local function unpackthem(sequences)
- for i=1,#sequences do
- local sequence=sequences[i]
- local kind=sequence.type
- local steps=sequence.steps
- local order=sequence.order
- local features=sequence.features
- local flags=sequence.flags
- local markclass=sequence.markclass
- if features then
- local tv=tables[features]
- if tv then
- sequence.features=tv
- features=tv
- end
- for script,feature in next,features do
- local tv=tables[feature]
- if tv then
- features[script]=tv
- end
- end
- end
- if steps then
- for i=1,#steps do
- local step=steps[i]
- if kind=="gpos_pair" then
- local c=step.coverage
- if c then
- if step.format=="pair" then
- for g1,d1 in next,c do
- local tv=tables[d1]
- if tv then
- c[g1]=tv
- d1=tv
- end
- for g2,d2 in next,d1 do
- local tv=tables[d2]
- if tv then
- d1[g2]=tv
- d2=tv
- end
- local f=tables[d2[1]] if f then d2[1]=f end
- local s=tables[d2[2]] if s then d2[2]=s end
- end
- end
- else
- for g1,d1 in next,c do
- local tv=tables[d1]
- if tv then
- c[g1]=tv
- end
- end
- end
- end
- elseif kind=="gpos_single" then
- local c=step.coverage
- if c then
- if step.format=="single" then
- for g1,d1 in next,c do
- local tv=tables[d1]
- if tv then
- c[g1]=tv
- end
- end
- else
- local tv=tables[c]
- if tv then
- step.coverage=tv
- end
- end
- end
- elseif kind=="gpos_cursive" then
- local c=step.coverage
- if c then
- for g1,d1 in next,c do
- local tv=tables[d1]
- if tv then
- d1=tv
- c[g1]=d1
- end
- local f=tables[d1[2]] if f then d1[2]=f end
- local s=tables[d1[3]] if s then d1[3]=s end
- end
- end
- elseif kind=="gpos_mark2base" or kind=="gpos_mark2mark" then
- local c=step.baseclasses
- if c then
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- local tv=tables[d2]
- if tv then
- d1[g2]=tv
- end
- end
- end
- end
- local c=step.coverage
- if c then
- for g1,d1 in next,c do
- local tv=tables[d1[2]]
- if tv then
- d1[2]=tv
- end
- end
- end
- elseif kind=="gpos_mark2ligature" then
- local c=step.baseclasses
- if c then
- for g1,d1 in next,c do
- for g2,d2 in next,d1 do
- local tv=tables[d2]
- if tv then
- d2=tv
- d1[g2]=d2
- end
- for g3,d3 in next,d2 do
- local tv=tables[d2[g3]]
- if tv then
- d2[g3]=tv
- end
- end
- end
- end
- end
- local c=step.coverage
- if c then
- for g1,d1 in next,c do
- local tv=tables[d1[2]]
- if tv then
- d1[2]=tv
- end
- end
- end
- end
- local rules=step.rules
- if rules then
- for i=1,#rules do
- local rule=rules[i]
- local before=rule.before
- if before then
- local tv=tables[before]
- if tv then
- rule.before=tv
- before=tv
- end
- for i=1,#before do
- local tv=tables[before[i]]
- if tv then
- before[i]=tv
- end
- end
- end
- local after=rule.after
- if after then
- local tv=tables[after]
- if tv then
- rule.after=tv
- after=tv
- end
- for i=1,#after do
- local tv=tables[after[i]]
- if tv then
- after[i]=tv
- end
- end
- end
- local current=rule.current
- if current then
- local tv=tables[current]
- if tv then
- rule.current=tv
- current=tv
- end
- for i=1,#current do
- local tv=tables[current[i]]
- if tv then
- current[i]=tv
- end
- end
- end
- local replacements=rule.replacements
- if replacements then
- local tv=tables[replacements]
- if tv then
- rule.replacements=tv
- end
- end
- end
- end
- end
- end
- if order then
- local tv=tables[order]
- if tv then
- sequence.order=tv
- end
- end
- if flags then
- local tv=tables[flags]
- if tv then
- sequence.flags=tv
- end
- end
- end
- end
- if sequences then
- unpackthem(sequences)
- end
- if sublookups then
- unpackthem(sublookups)
- end
- if features then
- for k,list in next,features do
- for feature,spec in next,list do
- local tv=tables[spec]
- if tv then
- list[feature]=tv
- end
- end
- end
- end
- if palettes then
- for i=1,#palettes do
- local p=palettes[i]
- for j=1,#p do
- local tv=tables[p[j]]
- if tv then
- p[j]=tv
- end
- end
- end
- end
- if variable then
- local instances=variable.instances
- if instances then
- for i=1,#instances do
- local v=instances[i].values
- for j=1,#v do
- local tv=tables[v[j]]
- if tv then
- v[j]=tv
- end
- end
- end
- end
- local function unpackdeltas(main)
- if main then
- local deltas=main.deltas
- if deltas then
- for i=1,#deltas do
- local di=deltas[i]
- local d=di.deltas
- local r=di.regions
- for j=1,#d do
- local tv=tables[d[j]]
- if tv then
- d[j]=tv
- end
- end
- local tv=di.regions
- if tv then
- di.regions=tv
- end
- end
- end
- local regions=main.regions
- if regions then
- local tv=tables[regions]
- if tv then
- main.regions=tv
- regions=tv
- end
- for i=1,#regions do
- local r=regions[i]
- for j=1,#r do
- local tv=tables[r[j]]
- if tv then
- r[j]=tv
- end
- end
- end
- end
- end
- end
- unpackdeltas(variable.global)
- unpackdeltas(variable.horizontal)
- unpackdeltas(variable.vertical)
- unpackdeltas(variable.metrics)
- end
- data.tables=nil
- end
- end
-end
-local mt={
- __index=function(t,k)
- if k=="height" then
- local ht=t.boundingbox[4]
- return ht<0 and 0 or ht
- elseif k=="depth" then
- local dp=-t.boundingbox[2]
- return dp<0 and 0 or dp
- elseif k=="width" then
- return 0
- elseif k=="name" then
- return forcenotdef and ".notdef"
- end
- end
+local type,next,tonumber,tostring,rawget,rawset=type,next,tonumber,tostring,rawget,rawset
+local gsub,lower,format,match,gmatch,find=string.gsub,string.lower,string.format,string.match,string.gmatch,string.find
+local sequenced=table.sequenced
+local is_boolean=string.is_boolean
+local setmetatableindex=table.setmetatableindex
+local setmetatablenewindex=table.setmetatablenewindex
+local allocate=utilities.storage.allocate
+local fonts=fonts
+local otf=fonts.handlers.otf
+local otffeatures=otf.features
+local tables=otf.tables or {}
+otf.tables=tables
+local statistics=otf.statistics or {}
+otf.statistics=statistics
+local scripts=allocate {
+ ["adlm"]="adlam",
+ ["aghb"]="caucasian albanian",
+ ["ahom"]="ahom",
+ ["arab"]="arabic",
+ ["armi"]="imperial aramaic",
+ ["armn"]="armenian",
+ ["avst"]="avestan",
+ ["bali"]="balinese",
+ ["bamu"]="bamum",
+ ["bass"]="bassa vah",
+ ["batk"]="batak",
+ ["beng"]="bengali",
+ ["bhks"]="bhaiksuki",
+ ["bng2"]="bengali variant 2",
+ ["bopo"]="bopomofo",
+ ["brah"]="brahmi",
+ ["brai"]="braille",
+ ["bugi"]="buginese",
+ ["buhd"]="buhid",
+ ["byzm"]="byzantine music",
+ ["cakm"]="chakma",
+ ["cans"]="canadian syllabics",
+ ["cari"]="carian",
+ ["cham"]="cham",
+ ["cher"]="cherokee",
+ ["copt"]="coptic",
+ ["cprt"]="cypriot syllabary",
+ ["cyrl"]="cyrillic",
+ ["dev2"]="devanagari variant 2",
+ ["deva"]="devanagari",
+ ["dogr"]="dogra",
+ ["dsrt"]="deseret",
+ ["dupl"]="duployan",
+ ["egyp"]="egyptian heiroglyphs",
+ ["elba"]="elbasan",
+ ["ethi"]="ethiopic",
+ ["geor"]="georgian",
+ ["gjr2"]="gujarati variant 2",
+ ["glag"]="glagolitic",
+ ["gong"]="gunjala gondi",
+ ["gonm"]="masaram gondi",
+ ["goth"]="gothic",
+ ["gran"]="grantha",
+ ["grek"]="greek",
+ ["gujr"]="gujarati",
+ ["gur2"]="gurmukhi variant 2",
+ ["guru"]="gurmukhi",
+ ["hang"]="hangul",
+ ["hani"]="cjk ideographic",
+ ["hano"]="hanunoo",
+ ["hatr"]="hatran",
+ ["hebr"]="hebrew",
+ ["hluw"]="anatolian hieroglyphs",
+ ["hmng"]="pahawh hmong",
+ ["hung"]="old hungarian",
+ ["ital"]="old italic",
+ ["jamo"]="hangul jamo",
+ ["java"]="javanese",
+ ["kali"]="kayah li",
+ ["kana"]="hiragana and katakana",
+ ["khar"]="kharosthi",
+ ["khmr"]="khmer",
+ ["khoj"]="khojki",
+ ["knd2"]="kannada variant 2",
+ ["knda"]="kannada",
+ ["kthi"]="kaithi",
+ ["lana"]="tai tham",
+ ["lao" ]="lao",
+ ["latn"]="latin",
+ ["lepc"]="lepcha",
+ ["limb"]="limbu",
+ ["lina"]="linear a",
+ ["linb"]="linear b",
+ ["lisu"]="lisu",
+ ["lyci"]="lycian",
+ ["lydi"]="lydian",
+ ["mahj"]="mahajani",
+ ["maka"]="makasar",
+ ["mand"]="mandaic and mandaean",
+ ["mani"]="manichaean",
+ ["marc"]="marchen",
+ ["math"]="mathematical alphanumeric symbols",
+ ["medf"]="medefaidrin",
+ ["mend"]="mende kikakui",
+ ["merc"]="meroitic cursive",
+ ["mero"]="meroitic hieroglyphs",
+ ["mlm2"]="malayalam variant 2",
+ ["mlym"]="malayalam",
+ ["modi"]="modi",
+ ["mong"]="mongolian",
+ ["mroo"]="mro",
+ ["mtei"]="meitei Mayek",
+ ["mult"]="multani",
+ ["musc"]="musical symbols",
+ ["mym2"]="myanmar variant 2",
+ ["mymr"]="myanmar",
+ ["narb"]="old north arabian",
+ ["nbat"]="nabataean",
+ ["newa"]="newa",
+ ["nko" ]='n"ko',
+ ["nshu"]="nüshu",
+ ["ogam"]="ogham",
+ ["olck"]="ol chiki",
+ ["orkh"]="old turkic and orkhon runic",
+ ["ory2"]="odia variant 2",
+ ["orya"]="oriya",
+ ["osge"]="osage",
+ ["osma"]="osmanya",
+ ["palm"]="palmyrene",
+ ["pauc"]="pau cin hau",
+ ["perm"]="old permic",
+ ["phag"]="phags-pa",
+ ["phli"]="inscriptional pahlavi",
+ ["phlp"]="psalter pahlavi",
+ ["phnx"]="phoenician",
+ ["plrd"]="miao",
+ ["prti"]="inscriptional parthian",
+ ["rjng"]="rejang",
+ ["rohg"]="hanifi rohingya",
+ ["runr"]="runic",
+ ["samr"]="samaritan",
+ ["sarb"]="old south arabian",
+ ["saur"]="saurashtra",
+ ["sgnw"]="sign writing",
+ ["shaw"]="shavian",
+ ["shrd"]="sharada",
+ ["sidd"]="siddham",
+ ["sind"]="khudawadi",
+ ["sinh"]="sinhala",
+ ["sogd"]="sogdian",
+ ["sogo"]="old sogdian",
+ ["sora"]="sora sompeng",
+ ["soyo"]="soyombo",
+ ["sund"]="sundanese",
+ ["sylo"]="syloti nagri",
+ ["syrc"]="syriac",
+ ["tagb"]="tagbanwa",
+ ["takr"]="takri",
+ ["tale"]="tai le",
+ ["talu"]="tai lu",
+ ["taml"]="tamil",
+ ["tang"]="tangut",
+ ["tavt"]="tai viet",
+ ["tel2"]="telugu variant 2",
+ ["telu"]="telugu",
+ ["tfng"]="tifinagh",
+ ["tglg"]="tagalog",
+ ["thaa"]="thaana",
+ ["thai"]="thai",
+ ["tibt"]="tibetan",
+ ["tirh"]="tirhuta",
+ ["tml2"]="tamil variant 2",
+ ["ugar"]="ugaritic cuneiform",
+ ["vai" ]="vai",
+ ["wara"]="warang citi",
+ ["xpeo"]="old persian cuneiform",
+ ["xsux"]="sumero-akkadian cuneiform",
+ ["yi" ]="yi",
+ ["zanb"]="zanabazar square",
}
-local function sameformat(sequence,steps,first,nofsteps,kind)
- return true
-end
-local function mergesteps_1(lookup,strict)
- local steps=lookup.steps
- local nofsteps=lookup.nofsteps
- local first=steps[1]
- if strict then
- local f=first.format
- for i=2,nofsteps do
- if steps[i].format~=f then
- if trace_optimizations then
- report_optimizations("not merging %a steps of %a lookup %a, different formats",nofsteps,lookup.type,lookup.name)
- end
- return 0
- end
- end
- end
- if trace_optimizations then
- report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
- end
- local target=first.coverage
- for i=2,nofsteps do
- local c=steps[i].coverage
- if c then
- for k,v in next,c do
- if not target[k] then
- target[k]=v
- end
- end
- end
+local languages=allocate {
+ ["aba" ]="abaza",
+ ["abk" ]="abkhazian",
+ ["ach" ]="acholi",
+ ["acr" ]="achi",
+ ["ady" ]="adyghe",
+ ["afk" ]="afrikaans",
+ ["afr" ]="afar",
+ ["agw" ]="agaw",
+ ["aio" ]="aiton",
+ ["aka" ]="akan",
+ ["als" ]="alsatian",
+ ["alt" ]="altai",
+ ["amh" ]="amharic",
+ ["ang" ]="anglo-saxon",
+ ["apph"]="phonetic transcription—americanist conventions",
+ ["ara" ]="arabic",
+ ["arg" ]="aragonese",
+ ["ari" ]="aari",
+ ["ark" ]="rakhine",
+ ["asm" ]="assamese",
+ ["ast" ]="asturian",
+ ["ath" ]="athapaskan",
+ ["avr" ]="avar",
+ ["awa" ]="awadhi",
+ ["aym" ]="aymara",
+ ["azb" ]="torki",
+ ["aze" ]="azerbaijani",
+ ["bad" ]="badaga",
+ ["bad0"]="banda",
+ ["bag" ]="baghelkhandi",
+ ["bal" ]="balkar",
+ ["ban" ]="balinese",
+ ["bar" ]="bavarian",
+ ["bau" ]="baulé",
+ ["bbc" ]="batak toba",
+ ["bbr" ]="berber",
+ ["bch" ]="bench",
+ ["bcr" ]="bible cree",
+ ["bdy" ]="bandjalang",
+ ["bel" ]="belarussian",
+ ["bem" ]="bemba",
+ ["ben" ]="bengali",
+ ["bgc" ]="haryanvi",
+ ["bgq" ]="bagri",
+ ["bgr" ]="bulgarian",
+ ["bhi" ]="bhili",
+ ["bho" ]="bhojpuri",
+ ["bik" ]="bikol",
+ ["bil" ]="bilen",
+ ["bis" ]="bislama",
+ ["bjj" ]="kanauji",
+ ["bkf" ]="blackfoot",
+ ["bli" ]="baluchi",
+ ["blk" ]="pa'o karen",
+ ["bln" ]="balante",
+ ["blt" ]="balti",
+ ["bmb" ]="bambara (bamanankan)",
+ ["bml" ]="bamileke",
+ ["bos" ]="bosnian",
+ ["bpy" ]="bishnupriya manipuri",
+ ["bre" ]="breton",
+ ["brh" ]="brahui",
+ ["bri" ]="braj bhasha",
+ ["brm" ]="burmese",
+ ["brx" ]="bodo",
+ ["bsh" ]="bashkir",
+ ["bsk" ]="burushaski",
+ ["bti" ]="beti",
+ ["bts" ]="batak simalungun",
+ ["bug" ]="bugis",
+ ["byv" ]="medumba",
+ ["cak" ]="kaqchikel",
+ ["cat" ]="catalan",
+ ["cbk" ]="zamboanga chavacano",
+ ["cchn"]="chinantec",
+ ["ceb" ]="cebuano",
+ ["cgg" ]="chiga",
+ ["cha" ]="chamorro",
+ ["che" ]="chechen",
+ ["chg" ]="chaha gurage",
+ ["chh" ]="chattisgarhi",
+ ["chi" ]="chichewa (chewa, nyanja)",
+ ["chk" ]="chukchi",
+ ["chk0"]="chuukese",
+ ["cho" ]="choctaw",
+ ["chp" ]="chipewyan",
+ ["chr" ]="cherokee",
+ ["chu" ]="chuvash",
+ ["chy" ]="cheyenne",
+ ["cja" ]="western cham",
+ ["cjm" ]="eastern cham",
+ ["cmr" ]="comorian",
+ ["cop" ]="coptic",
+ ["cor" ]="cornish",
+ ["cos" ]="corsican",
+ ["cpp" ]="creoles",
+ ["cre" ]="cree",
+ ["crr" ]="carrier",
+ ["crt" ]="crimean tatar",
+ ["csb" ]="kashubian",
+ ["csl" ]="church slavonic",
+ ["csy" ]="czech",
+ ["ctg" ]="chittagonian",
+ ["cuk" ]="san blas kuna",
+ ["dan" ]="danish",
+ ["dar" ]="dargwa",
+ ["dax" ]="dayi",
+ ["dcr" ]="woods cree",
+ ["deu" ]="german",
+ ["dgo" ]="dogri",
+ ["dgr" ]="dogri",
+ ["dhg" ]="dhangu",
+ ["dhv" ]="divehi (dhivehi, maldivian)",
+ ["diq" ]="dimli",
+ ["div" ]="divehi (dhivehi, maldivian)",
+ ["djr" ]="zarma",
+ ["djr0"]="djambarrpuyngu",
+ ["dng" ]="dangme",
+ ["dnj" ]="dan",
+ ["dnk" ]="dinka",
+ ["dri" ]="dari",
+ ["duj" ]="dhuwal",
+ ["dun" ]="dungan",
+ ["dzn" ]="dzongkha",
+ ["ebi" ]="ebira",
+ ["ecr" ]="eastern cree",
+ ["edo" ]="edo",
+ ["efi" ]="efik",
+ ["ell" ]="greek",
+ ["emk" ]="eastern maninkakan",
+ ["eng" ]="english",
+ ["erz" ]="erzya",
+ ["esp" ]="spanish",
+ ["esu" ]="central yupik",
+ ["eti" ]="estonian",
+ ["euq" ]="basque",
+ ["evk" ]="evenki",
+ ["evn" ]="even",
+ ["ewe" ]="ewe",
+ ["fan" ]="french antillean",
+ ["fan0"]=" fang",
+ ["far" ]="persian",
+ ["fat" ]="fanti",
+ ["fin" ]="finnish",
+ ["fji" ]="fijian",
+ ["fle" ]="dutch (flemish)",
+ ["fmp" ]="fe’fe’",
+ ["fne" ]="forest nenets",
+ ["fon" ]="fon",
+ ["fos" ]="faroese",
+ ["fra" ]="french",
+ ["frc" ]="cajun french",
+ ["fri" ]="frisian",
+ ["frl" ]="friulian",
+ ["frp" ]="arpitan",
+ ["fta" ]="futa",
+ ["ful" ]="fulah",
+ ["fuv" ]="nigerian fulfulde",
+ ["gad" ]="ga",
+ ["gae" ]="scottish gaelic (gaelic)",
+ ["gag" ]="gagauz",
+ ["gal" ]="galician",
+ ["gar" ]="garshuni",
+ ["gaw" ]="garhwali",
+ ["gez" ]="ge'ez",
+ ["gih" ]="githabul",
+ ["gil" ]="gilyak",
+ ["gil0"]="kiribati (gilbertese)",
+ ["gkp" ]="kpelle (guinea)",
+ ["glk" ]="gilaki",
+ ["gmz" ]="gumuz",
+ ["gnn" ]="gumatj",
+ ["gog" ]="gogo",
+ ["gon" ]="gondi",
+ ["grn" ]="greenlandic",
+ ["gro" ]="garo",
+ ["gua" ]="guarani",
+ ["guc" ]="wayuu",
+ ["guf" ]="gupapuyngu",
+ ["guj" ]="gujarati",
+ ["guz" ]="gusii",
+ ["hai" ]="haitian (haitian creole)",
+ ["hal" ]="halam",
+ ["har" ]="harauti",
+ ["hau" ]="hausa",
+ ["haw" ]="hawaiian",
+ ["hay" ]="haya",
+ ["haz" ]="hazaragi",
+ ["hbn" ]="hammer-banna",
+ ["her" ]="herero",
+ ["hil" ]="hiligaynon",
+ ["hin" ]="hindi",
+ ["hma" ]="high mari",
+ ["hmn" ]="hmong",
+ ["hmo" ]="hiri motu",
+ ["hnd" ]="hindko",
+ ["ho" ]="ho",
+ ["hri" ]="harari",
+ ["hrv" ]="croatian",
+ ["hun" ]="hungarian",
+ ["hye" ]="armenian",
+ ["hye0"]="armenian east",
+ ["iba" ]="iban",
+ ["ibb" ]="ibibio",
+ ["ibo" ]="igbo",
+ ["ido" ]="ido",
+ ["ijo" ]="ijo languages",
+ ["ile" ]="interlingue",
+ ["ilo" ]="ilokano",
+ ["ina" ]="interlingua",
+ ["ind" ]="indonesian",
+ ["ing" ]="ingush",
+ ["inu" ]="inuktitut",
+ ["ipk" ]="inupiat",
+ ["ipph"]="phonetic transcription—ipa conventions",
+ ["iri" ]="irish",
+ ["irt" ]="irish traditional",
+ ["isl" ]="icelandic",
+ ["ism" ]="inari sami",
+ ["ita" ]="italian",
+ ["iwr" ]="hebrew",
+ ["jam" ]="jamaican creole",
+ ["jan" ]="japanese",
+ ["jav" ]="javanese",
+ ["jbo" ]="lojban",
+ ["jct" ]="krymchak",
+ ["jii" ]="yiddish",
+ ["jud" ]="ladino",
+ ["jul" ]="jula",
+ ["kab" ]="kabardian",
+ ["kab0"]="kabyle",
+ ["kac" ]="kachchi",
+ ["kal" ]="kalenjin",
+ ["kan" ]="kannada",
+ ["kar" ]="karachay",
+ ["kat" ]="georgian",
+ ["kaz" ]="kazakh",
+ ["kde" ]="makonde",
+ ["kea" ]="kabuverdianu (crioulo)",
+ ["keb" ]="kebena",
+ ["kek" ]="kekchi",
+ ["kge" ]="khutsuri georgian",
+ ["kha" ]="khakass",
+ ["khk" ]="khanty-kazim",
+ ["khm" ]="khmer",
+ ["khs" ]="khanty-shurishkar",
+ ["kht" ]="khamti shan",
+ ["khv" ]="khanty-vakhi",
+ ["khw" ]="khowar",
+ ["kik" ]="kikuyu (gikuyu)",
+ ["kir" ]="kirghiz (kyrgyz)",
+ ["kis" ]="kisii",
+ ["kiu" ]="kirmanjki",
+ ["kjd" ]="southern kiwai",
+ ["kjp" ]="eastern pwo karen",
+ ["kjz" ]="bumthangkha",
+ ["kkn" ]="kokni",
+ ["klm" ]="kalmyk",
+ ["kmb" ]="kamba",
+ ["kmn" ]="kumaoni",
+ ["kmo" ]="komo",
+ ["kms" ]="komso",
+ ["kmz" ]="khorasani turkic",
+ ["knr" ]="kanuri",
+ ["kod" ]="kodagu",
+ ["koh" ]="korean old hangul",
+ ["kok" ]="konkani",
+ ["kom" ]="komi",
+ ["kon" ]="kikongo",
+ ["kon0"]="kongo",
+ ["kop" ]="komi-permyak",
+ ["kor" ]="korean",
+ ["kos" ]="kosraean",
+ ["koz" ]="komi-zyrian",
+ ["kpl" ]="kpelle",
+ ["kri" ]="krio",
+ ["krk" ]="karakalpak",
+ ["krl" ]="karelian",
+ ["krm" ]="karaim",
+ ["krn" ]="karen",
+ ["krt" ]="koorete",
+ ["ksh" ]="kashmiri",
+ ["ksh0"]="ripuarian",
+ ["ksi" ]="khasi",
+ ["ksm" ]="kildin sami",
+ ["ksw" ]="s’gaw karen",
+ ["kua" ]="kuanyama",
+ ["kui" ]="kui",
+ ["kul" ]="kulvi",
+ ["kum" ]="kumyk",
+ ["kur" ]="kurdish",
+ ["kuu" ]="kurukh",
+ ["kuy" ]="kuy",
+ ["kyk" ]="koryak",
+ ["kyu" ]="western kayah",
+ ["lad" ]="ladin",
+ ["lah" ]="lahuli",
+ ["lak" ]="lak",
+ ["lam" ]="lambani",
+ ["lao" ]="lao",
+ ["lat" ]="latin",
+ ["laz" ]="laz",
+ ["lcr" ]="l-cree",
+ ["ldk" ]="ladakhi",
+ ["lez" ]="lezgi",
+ ["lij" ]="ligurian",
+ ["lim" ]="limburgish",
+ ["lin" ]="lingala",
+ ["lis" ]="lisu",
+ ["ljp" ]="lampung",
+ ["lki" ]="laki",
+ ["lma" ]="low mari",
+ ["lmb" ]="limbu",
+ ["lmo" ]="lombard",
+ ["lmw" ]="lomwe",
+ ["lom" ]="loma",
+ ["lrc" ]="luri",
+ ["lsb" ]="lower sorbian",
+ ["lsm" ]="lule sami",
+ ["lth" ]="lithuanian",
+ ["ltz" ]="luxembourgish",
+ ["lua" ]="luba-lulua",
+ ["lub" ]="luba-katanga",
+ ["lug" ]="ganda",
+ ["luh" ]="luyia",
+ ["luo" ]="luo",
+ ["lvi" ]="latvian",
+ ["mad" ]="madura",
+ ["mag" ]="magahi",
+ ["mah" ]="marshallese",
+ ["maj" ]="majang",
+ ["mak" ]="makhuwa",
+ ["mal" ]="malayalam reformed",
+ ["mam" ]="mam",
+ ["man" ]="mansi",
+ ["map" ]="mapudungun",
+ ["mar" ]="marathi",
+ ["maw" ]="marwari",
+ ["mbn" ]="mbundu",
+ ["mbo" ]="mbo",
+ ["mch" ]="manchu",
+ ["mcr" ]="moose cree",
+ ["mde" ]="mende",
+ ["mdr" ]="mandar",
+ ["men" ]="me'en",
+ ["mer" ]="meru",
+ ["mfa" ]="pattani malay",
+ ["mfe" ]="morisyen",
+ ["min" ]="minangkabau",
+ ["miz" ]="mizo",
+ ["mkd" ]="macedonian",
+ ["mkr" ]="makasar",
+ ["mkw" ]="kituba",
+ ["mle" ]="male",
+ ["mlg" ]="malagasy",
+ ["mln" ]="malinke",
+ ["mlr" ]="malayalam reformed",
+ ["mly" ]="malay",
+ ["mnd" ]="mandinka",
+ ["mng" ]="mongolian",
+ ["mni" ]="manipuri",
+ ["mnk" ]="maninka",
+ ["mnx" ]="manx",
+ ["moh" ]="mohawk",
+ ["mok" ]="moksha",
+ ["mol" ]="moldavian",
+ ["mon" ]="mon",
+ ["mor" ]="moroccan",
+ ["mos" ]="mossi",
+ ["mri" ]="maori",
+ ["mth" ]="maithili",
+ ["mts" ]="maltese",
+ ["mun" ]="mundari",
+ ["mus" ]="muscogee",
+ ["mwl" ]="mirandese",
+ ["mww" ]="hmong daw",
+ ["myn" ]="mayan",
+ ["mzn" ]="mazanderani",
+ ["nag" ]="naga-assamese",
+ ["nah" ]="nahuatl",
+ ["nan" ]="nanai",
+ ["nap" ]="neapolitan",
+ ["nas" ]="naskapi",
+ ["nau" ]="nauruan",
+ ["nav" ]="navajo",
+ ["ncr" ]="n-cree",
+ ["ndb" ]="ndebele",
+ ["ndc" ]="ndau",
+ ["ndg" ]="ndonga",
+ ["nds" ]="low saxon",
+ ["nep" ]="nepali",
+ ["new" ]="newari",
+ ["nga" ]="ngbaka",
+ ["ngr" ]="nagari",
+ ["nhc" ]="norway house cree",
+ ["nis" ]="nisi",
+ ["niu" ]="niuean",
+ ["nkl" ]="nyankole",
+ ["nko" ]="n'ko",
+ ["nld" ]="dutch",
+ ["noe" ]="nimadi",
+ ["nog" ]="nogai",
+ ["nor" ]="norwegian",
+ ["nov" ]="novial",
+ ["nsm" ]="northern sami",
+ ["nso" ]="sotho, northern",
+ ["nta" ]="northern tai",
+ ["nto" ]="esperanto",
+ ["nym" ]="nyamwezi",
+ ["nyn" ]="norwegian nynorsk",
+ ["nza" ]="mbembe tigon",
+ ["oci" ]="occitan",
+ ["ocr" ]="oji-cree",
+ ["ojb" ]="ojibway",
+ ["ori" ]="odia",
+ ["oro" ]="oromo",
+ ["oss" ]="ossetian",
+ ["paa" ]="palestinian aramaic",
+ ["pag" ]="pangasinan",
+ ["pal" ]="pali",
+ ["pam" ]="pampangan",
+ ["pan" ]="punjabi",
+ ["pap" ]="palpa",
+ ["pap0"]="papiamentu",
+ ["pas" ]="pashto",
+ ["pau" ]="palauan",
+ ["pcc" ]="bouyei",
+ ["pcd" ]="picard",
+ ["pdc" ]="pennsylvania german",
+ ["pgr" ]="polytonic greek",
+ ["phk" ]="phake",
+ ["pih" ]="norfolk",
+ ["pil" ]="filipino",
+ ["plg" ]="palaung",
+ ["plk" ]="polish",
+ ["pms" ]="piemontese",
+ ["pnb" ]="western panjabi",
+ ["poh" ]="pocomchi",
+ ["pon" ]="pohnpeian",
+ ["pro" ]="provencal",
+ ["ptg" ]="portuguese",
+ ["pwo" ]="western pwo karen",
+ ["qin" ]="chin",
+ ["quc" ]="k’iche’",
+ ["quh" ]="quechua (bolivia)",
+ ["quz" ]="quechua",
+ ["qvi" ]="quechua (ecuador)",
+ ["qwh" ]="quechua (peru)",
+ ["raj" ]="rajasthani",
+ ["rar" ]="rarotongan",
+ ["rbu" ]="russian buriat",
+ ["rcr" ]="r-cree",
+ ["rej" ]="rejang",
+ ["ria" ]="riang",
+ ["rif" ]="tarifit",
+ ["rit" ]="ritarungo",
+ ["rkw" ]="arakwal",
+ ["rms" ]="romansh",
+ ["rmy" ]="vlax romani",
+ ["rom" ]="romanian",
+ ["roy" ]="romany",
+ ["rsy" ]="rusyn",
+ ["rtm" ]="rotuman",
+ ["rua" ]="kinyarwanda",
+ ["run" ]="rundi",
+ ["rup" ]="aromanian",
+ ["rus" ]="russian",
+ ["sad" ]="sadri",
+ ["san" ]="sanskrit",
+ ["sas" ]="sasak",
+ ["sat" ]="santali",
+ ["say" ]="sayisi",
+ ["scn" ]="sicilian",
+ ["sco" ]="scots",
+ ["scs" ]="north slavey",
+ ["sek" ]="sekota",
+ ["sel" ]="selkup",
+ ["sga" ]="old irish",
+ ["sgo" ]="sango",
+ ["sgs" ]="samogitian",
+ ["shi" ]="tachelhit",
+ ["shn" ]="shan",
+ ["sib" ]="sibe",
+ ["sid" ]="sidamo",
+ ["sig" ]="silte gurage",
+ ["sks" ]="skolt sami",
+ ["sky" ]="slovak",
+ ["sla" ]="slavey",
+ ["slv" ]="slovenian",
+ ["sml" ]="somali",
+ ["smo" ]="samoan",
+ ["sna" ]="sena",
+ ["sna0"]="shona",
+ ["snd" ]="sindhi",
+ ["snh" ]="sinhala (sinhalese)",
+ ["snk" ]="soninke",
+ ["sog" ]="sodo gurage",
+ ["sop" ]="songe",
+ ["sot" ]="sotho, southern",
+ ["sqi" ]="albanian",
+ ["srb" ]="serbian",
+ ["srd" ]="sardinian",
+ ["srk" ]="saraiki",
+ ["srr" ]="serer",
+ ["ssl" ]="south slavey",
+ ["ssm" ]="southern sami",
+ ["stq" ]="saterland frisian",
+ ["suk" ]="sukuma",
+ ["sun" ]="sundanese",
+ ["sur" ]="suri",
+ ["sva" ]="svan",
+ ["sve" ]="swedish",
+ ["swa" ]="swadaya aramaic",
+ ["swk" ]="swahili",
+ ["swz" ]="swati",
+ ["sxt" ]="sutu",
+ ["sxu" ]="upper saxon",
+ ["syl" ]="sylheti",
+ ["syr" ]="syriac",
+ ["syre"]="estrangela syriac",
+ ["syrj"]="western syriac",
+ ["syrn"]="eastern syriac",
+ ["szl" ]="silesian",
+ ["tab" ]="tabasaran",
+ ["taj" ]="tajiki",
+ ["tam" ]="tamil",
+ ["tat" ]="tatar",
+ ["tcr" ]="th-cree",
+ ["tdd" ]="dehong dai",
+ ["tel" ]="telugu",
+ ["tet" ]="tetum",
+ ["tgl" ]="tagalog",
+ ["tgn" ]="tongan",
+ ["tgr" ]="tigre",
+ ["tgy" ]="tigrinya",
+ ["tha" ]="thai",
+ ["tht" ]="tahitian",
+ ["tib" ]="tibetan",
+ ["tiv" ]="tiv",
+ ["tkm" ]="turkmen",
+ ["tmh" ]="tamashek",
+ ["tmn" ]="temne",
+ ["tna" ]="tswana",
+ ["tne" ]="tundra nenets",
+ ["tng" ]="tonga",
+ ["tod" ]="todo",
+ ["tod0"]="toma",
+ ["tpi" ]="tok pisin",
+ ["trk" ]="turkish",
+ ["tsg" ]="tsonga",
+ ["tsj" ]="tshangla",
+ ["tua" ]="turoyo aramaic",
+ ["tul" ]="tulu",
+ ["tum" ]="tulu",
+ ["tuv" ]="tuvin",
+ ["tvl" ]="tuvalu",
+ ["twi" ]="twi",
+ ["tyz" ]="tày",
+ ["tzm" ]="tamazight",
+ ["tzo" ]="tzotzil",
+ ["udm" ]="udmurt",
+ ["ukr" ]="ukrainian",
+ ["umb" ]="umbundu",
+ ["urd" ]="urdu",
+ ["usb" ]="upper sorbian",
+ ["uyg" ]="uyghur",
+ ["uzb" ]="uzbek",
+ ["vec" ]="venetian",
+ ["ven" ]="venda",
+ ["vit" ]="vietnamese",
+ ["vol" ]="volapük",
+ ["vro" ]="võro",
+ ["wa" ]="wa",
+ ["wag" ]="wagdi",
+ ["war" ]="waray-waray",
+ ["wcr" ]="west-cree",
+ ["wel" ]="welsh",
+ ["wlf" ]="wolof",
+ ["wln" ]="walloon",
+ ["wtm" ]="mewati",
+ ["xbd" ]="lü",
+ ["xhs" ]="xhosa",
+ ["xjb" ]="minjangbal",
+ ["xkf" ]="khengkha",
+ ["xog" ]="soga",
+ ["xpe" ]="kpelle (liberia)",
+ ["yak" ]="sakha",
+ ["yao" ]="yao",
+ ["yap" ]="yapese",
+ ["yba" ]="yoruba",
+ ["ycr" ]="y-cree",
+ ["yic" ]="yi classic",
+ ["yim" ]="yi modern",
+ ["zea" ]="zealandic",
+ ["zgh" ]="standard morrocan tamazigh",
+ ["zha" ]="zhuang",
+ ["zhh" ]="chinese, hong kong sar",
+ ["zhp" ]="chinese phonetic",
+ ["zhs" ]="chinese simplified",
+ ["zht" ]="chinese traditional",
+ ["znd" ]="zande",
+ ["zul" ]="zulu",
+ ["zza" ]="zazaki",
+}
+local features=allocate {
+ ["aalt"]="access all alternates",
+ ["abvf"]="above-base forms",
+ ["abvm"]="above-base mark positioning",
+ ["abvs"]="above-base substitutions",
+ ["afrc"]="alternative fractions",
+ ["akhn"]="akhands",
+ ["blwf"]="below-base forms",
+ ["blwm"]="below-base mark positioning",
+ ["blws"]="below-base substitutions",
+ ["c2pc"]="petite capitals from capitals",
+ ["c2sc"]="small capitals from capitals",
+ ["calt"]="contextual alternates",
+ ["case"]="case-sensitive forms",
+ ["ccmp"]="glyph composition/decomposition",
+ ["cfar"]="conjunct form after ro",
+ ["cjct"]="conjunct forms",
+ ["clig"]="contextual ligatures",
+ ["cpct"]="centered cjk punctuation",
+ ["cpsp"]="capital spacing",
+ ["cswh"]="contextual swash",
+ ["curs"]="cursive positioning",
+ ["dflt"]="default processing",
+ ["dist"]="distances",
+ ["dlig"]="discretionary ligatures",
+ ["dnom"]="denominators",
+ ["dtls"]="dotless forms",
+ ["expt"]="expert forms",
+ ["falt"]="final glyph alternates",
+ ["fin2"]="terminal forms #2",
+ ["fin3"]="terminal forms #3",
+ ["fina"]="terminal forms",
+ ["flac"]="flattened accents over capitals",
+ ["frac"]="fractions",
+ ["fwid"]="full width",
+ ["half"]="half forms",
+ ["haln"]="halant forms",
+ ["halt"]="alternate half width",
+ ["hist"]="historical forms",
+ ["hkna"]="horizontal kana alternates",
+ ["hlig"]="historical ligatures",
+ ["hngl"]="hangul",
+ ["hojo"]="hojo kanji forms",
+ ["hwid"]="half width",
+ ["init"]="initial forms",
+ ["isol"]="isolated forms",
+ ["ital"]="italics",
+ ["jalt"]="justification alternatives",
+ ["jp04"]="jis2004 forms",
+ ["jp78"]="jis78 forms",
+ ["jp83"]="jis83 forms",
+ ["jp90"]="jis90 forms",
+ ["kern"]="kerning",
+ ["lfbd"]="left bounds",
+ ["liga"]="standard ligatures",
+ ["ljmo"]="leading jamo forms",
+ ["lnum"]="lining figures",
+ ["locl"]="localized forms",
+ ["ltra"]="left-to-right alternates",
+ ["ltrm"]="left-to-right mirrored forms",
+ ["mark"]="mark positioning",
+ ["med2"]="medial forms #2",
+ ["medi"]="medial forms",
+ ["mgrk"]="mathematical greek",
+ ["mkmk"]="mark to mark positioning",
+ ["mset"]="mark positioning via substitution",
+ ["nalt"]="alternate annotation forms",
+ ["nlck"]="nlc kanji forms",
+ ["nukt"]="nukta forms",
+ ["numr"]="numerators",
+ ["onum"]="old style figures",
+ ["opbd"]="optical bounds",
+ ["ordn"]="ordinals",
+ ["ornm"]="ornaments",
+ ["palt"]="proportional alternate width",
+ ["pcap"]="petite capitals",
+ ["pkna"]="proportional kana",
+ ["pnum"]="proportional figures",
+ ["pref"]="pre-base forms",
+ ["pres"]="pre-base substitutions",
+ ["pstf"]="post-base forms",
+ ["psts"]="post-base substitutions",
+ ["pwid"]="proportional widths",
+ ["qwid"]="quarter widths",
+ ["rand"]="randomize",
+ ["rclt"]="required contextual alternates",
+ ["rkrf"]="rakar forms",
+ ["rlig"]="required ligatures",
+ ["rphf"]="reph form",
+ ["rtbd"]="right bounds",
+ ["rtla"]="right-to-left alternates",
+ ["rtlm"]="right to left mirrored forms",
+ ["rvrn"]="required variation alternates",
+ ["ruby"]="ruby notation forms",
+ ["salt"]="stylistic alternates",
+ ["sinf"]="scientific inferiors",
+ ["size"]="optical size",
+ ["smcp"]="small capitals",
+ ["smpl"]="simplified forms",
+ ["ssty"]="script style",
+ ["stch"]="stretching glyph decomposition",
+ ["subs"]="subscript",
+ ["sups"]="superscript",
+ ["swsh"]="swash",
+ ["titl"]="titling",
+ ["tjmo"]="trailing jamo forms",
+ ["tnam"]="traditional name forms",
+ ["tnum"]="tabular figures",
+ ["trad"]="traditional forms",
+ ["twid"]="third widths",
+ ["unic"]="unicase",
+ ["valt"]="alternate vertical metrics",
+ ["vatu"]="vattu variants",
+ ["vert"]="vertical writing",
+ ["vhal"]="alternate vertical half metrics",
+ ["vjmo"]="vowel jamo forms",
+ ["vkna"]="vertical kana alternates",
+ ["vkrn"]="vertical kerning",
+ ["vpal"]="proportional alternate vertical metrics",
+ ["vrtr"]="vertical alternates for rotation",
+ ["vrt2"]="vertical rotation",
+ ["zero"]="slashed zero",
+ ["trep"]="traditional tex replacements",
+ ["tlig"]="traditional tex ligatures",
+ ["ss.."]="stylistic set ..",
+ ["cv.."]="character variant ..",
+ ["js.."]="justification ..",
+ ["dv.."]="devanagari ..",
+ ["ml.."]="malayalam ..",
+}
+local baselines=allocate {
+ ["hang"]="hanging baseline",
+ ["icfb"]="ideographic character face bottom edge baseline",
+ ["icft"]="ideographic character face tope edige baseline",
+ ["ideo"]="ideographic em-box bottom edge baseline",
+ ["idtp"]="ideographic em-box top edge baseline",
+ ["math"]="mathematical centered baseline",
+ ["romn"]="roman baseline"
+}
+tables.scripts=scripts
+tables.languages=languages
+tables.features=features
+tables.baselines=baselines
+local acceptscripts=true directives.register("otf.acceptscripts",function(v) acceptscripts=v end)
+local acceptlanguages=true directives.register("otf.acceptlanguages",function(v) acceptlanguages=v end)
+local report_checks=logs.reporter("fonts","checks")
+if otffeatures.features then
+ for k,v in next,otffeatures.features do
+ features[k]=v
end
- lookup.nofsteps=1
- lookup.merged=true
- lookup.steps={ first }
- return nofsteps-1
+ otffeatures.features=features
end
-local function mergesteps_2(lookup)
- local steps=lookup.steps
- local nofsteps=lookup.nofsteps
- local first=steps[1]
- if strict then
- local f=first.format
- for i=2,nofsteps do
- if steps[i].format~=f then
- if trace_optimizations then
- report_optimizations("not merging %a steps of %a lookup %a, different formats",nofsteps,lookup.type,lookup.name)
- end
- return 0
- end
- end
- end
- if trace_optimizations then
- report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
- end
- local target=first.coverage
- for i=2,nofsteps do
- local c=steps[i].coverage
- if c then
- for k,v in next,c do
- local tk=target[k]
- if tk then
- for kk,vv in next,v do
- if tk[kk]==nil then
- tk[kk]=vv
- end
- end
- else
- target[k]=v
- end
- end
- end
+local function swapped(h)
+ local r={}
+ for k,v in next,h do
+ r[gsub(v,"[^a-z0-9]","")]=k
end
- lookup.nofsteps=1
- lookup.merged=true
- lookup.steps={ first }
- return nofsteps-1
+ return r
end
-local function mergesteps_3(lookup,strict)
- local steps=lookup.steps
- local nofsteps=lookup.nofsteps
- if trace_optimizations then
- report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
- end
- local coverage={}
- for i=1,nofsteps do
- local c=steps[i].coverage
- if c then
- for k,v in next,c do
- local tk=coverage[k]
- if tk then
- if trace_optimizations then
- report_optimizations("quitting merge due to multiple checks")
- end
- return nofsteps
- else
- coverage[k]=v
- end
- end
- end
- end
- local first=steps[1]
- local baseclasses={}
- for i=1,nofsteps do
- local offset=i*10
- local step=steps[i]
- for k,v in sortedhash(step.baseclasses) do
- baseclasses[offset+k]=v
- end
- for k,v in next,step.coverage do
- v[1]=offset+v[1]
+local verbosescripts=allocate(swapped(scripts ))
+local verboselanguages=allocate(swapped(languages))
+local verbosefeatures=allocate(swapped(features ))
+local verbosebaselines=allocate(swapped(baselines))
+local function resolve(t,k)
+ if k then
+ k=gsub(lower(k),"[^a-z0-9]","")
+ local v=rawget(t,k)
+ if v then
+ return v
end
end
- first.baseclasses=baseclasses
- first.coverage=coverage
- lookup.nofsteps=1
- lookup.merged=true
- lookup.steps={ first }
- return nofsteps-1
end
-local function nested(old,new)
- for k,v in next,old do
- if k=="ligature" then
- if not new.ligature then
- new.ligature=v
- end
- else
- local n=new[k]
- if n then
- nested(v,n)
- else
- new[k]=v
- end
+setmetatableindex(verbosescripts,resolve)
+setmetatableindex(verboselanguages,resolve)
+setmetatableindex(verbosefeatures,resolve)
+setmetatableindex(verbosebaselines,resolve)
+setmetatableindex(scripts,function(t,k)
+ if k then
+ k=lower(k)
+ if k=="dflt" then
+ return k
end
- end
-end
-local function mergesteps_4(lookup)
- local steps=lookup.steps
- local nofsteps=lookup.nofsteps
- local first=steps[1]
- if trace_optimizations then
- report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
- end
- local target=first.coverage
- for i=2,nofsteps do
- local c=steps[i].coverage
- if c then
- for k,v in next,c do
- local tk=target[k]
- if tk then
- nested(v,tk)
- else
- target[k]=v
- end
- end
+ local v=rawget(t,k)
+ if v then
+ return v
end
- end
- lookup.nofsteps=1
- lookup.steps={ first }
- return nofsteps-1
-end
-local function mergesteps_5(lookup)
- local steps=lookup.steps
- local nofsteps=lookup.nofsteps
- local first=steps[1]
- if trace_optimizations then
- report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
- end
- local target=first.coverage
- local hash=nil
- for k,v in next,target do
- hash=v[1]
- break
- end
- for i=2,nofsteps do
- local c=steps[i].coverage
- if c then
- for k,v in next,c do
- local tk=target[k]
- if tk then
- if not tk[2] then
- tk[2]=v[2]
- end
- if not tk[3] then
- tk[3]=v[3]
- end
- else
- target[k]=v
- v[1]=hash
- end
- end
+ k=gsub(k," ","")
+ v=rawget(t,v)
+ if v then
+ return v
+ elseif acceptscripts then
+ report_checks("registering extra script %a",k)
+ rawset(t,k,k)
+ return k
end
end
- lookup.nofsteps=1
- lookup.merged=true
- lookup.steps={ first }
- return nofsteps-1
-end
-local function checkkerns(lookup)
- local steps=lookup.steps
- local nofsteps=lookup.nofsteps
- local kerned=0
- for i=1,nofsteps do
- local step=steps[i]
- if step.format=="pair" then
- local coverage=step.coverage
- local kerns=true
- for g1,d1 in next,coverage do
- if d1==true then
- elseif not d1 then
- elseif d1[1]~=0 or d1[2]~=0 or d1[4]~=0 then
- kerns=false
- break
- end
- end
- if kerns then
- if trace_optimizations then
- report_optimizations("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
- end
- local c={}
- for g1,d1 in next,coverage do
- if d1 and d1~=true then
- c[g1]=d1[3]
- end
- end
- step.coverage=c
- step.format="move"
- kerned=kerned+1
- end
+ return "dflt"
+end)
+setmetatableindex(languages,function(t,k)
+ if k then
+ k=lower(k)
+ if k=="dflt" then
+ return k
end
- end
- return kerned
-end
-local function checkpairs(lookup)
- local steps=lookup.steps
- local nofsteps=lookup.nofsteps
- local kerned=0
- local function onlykerns(step)
- local coverage=step.coverage
- for g1,d1 in next,coverage do
- for g2,d2 in next,d1 do
- if d2[2] then
- return false
- else
- local v=d2[1]
- if v==true then
- elseif v and (v[1]~=0 or v[2]~=0 or v[4]~=0) then
- return false
- end
- end
- end
+ local v=rawget(t,k)
+ if v then
+ return v
end
- return coverage
- end
- for i=1,nofsteps do
- local step=steps[i]
- if step.format=="pair" then
- local coverage=onlykerns(step)
- if coverage then
- if trace_optimizations then
- report_optimizations("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
- end
- for g1,d1 in next,coverage do
- local d={}
- for g2,d2 in next,d1 do
- local v=d2[1]
- if v==true then
- elseif v then
- d[g2]=v[3]
- end
- end
- coverage[g1]=d
- end
- step.format="move"
- kerned=kerned+1
- end
+ k=gsub(k," ","")
+ v=rawget(t,v)
+ if v then
+ return v
+ elseif acceptlanguages then
+ report_checks("registering extra language %a",k)
+ rawset(t,k,k)
+ return k
end
end
- return kerned
+ return "dflt"
+end)
+if setmetatablenewindex then
+ setmetatablenewindex(languages,"ignore")
+ setmetatablenewindex(scripts,"ignore")
+ setmetatablenewindex(baselines,"ignore")
end
-local compact_pairs=true
-local compact_singles=true
-local merge_pairs=true
-local merge_singles=true
-local merge_substitutions=true
-local merge_alternates=true
-local merge_multiples=true
-local merge_ligatures=true
-local merge_cursives=true
-local merge_marks=true
-directives.register("otf.compact.pairs",function(v) compact_pairs=v end)
-directives.register("otf.compact.singles",function(v) compact_singles=v end)
-directives.register("otf.merge.pairs",function(v) merge_pairs=v end)
-directives.register("otf.merge.singles",function(v) merge_singles=v end)
-directives.register("otf.merge.substitutions",function(v) merge_substitutions=v end)
-directives.register("otf.merge.alternates",function(v) merge_alternates=v end)
-directives.register("otf.merge.multiples",function(v) merge_multiples=v end)
-directives.register("otf.merge.ligatures",function(v) merge_ligatures=v end)
-directives.register("otf.merge.cursives",function(v) merge_cursives=v end)
-directives.register("otf.merge.marks",function(v) merge_marks=v end)
-function readers.compact(data)
- if not data or data.compacted then
- return
- else
- data.compacted=true
- end
- local resources=data.resources
- local merged=0
- local kerned=0
- local allsteps=0
- local function compact(what)
- local lookups=resources[what]
- if lookups then
- for i=1,#lookups do
- local lookup=lookups[i]
- local nofsteps=lookup.nofsteps
- local kind=lookup.type
- allsteps=allsteps+nofsteps
- if nofsteps>1 then
- local merg=merged
- if kind=="gsub_single" then
- if merge_substitutions then
- merged=merged+mergesteps_1(lookup)
- end
- elseif kind=="gsub_alternate" then
- if merge_alternates then
- merged=merged+mergesteps_1(lookup)
- end
- elseif kind=="gsub_multiple" then
- if merge_multiples then
- merged=merged+mergesteps_1(lookup)
- end
- elseif kind=="gsub_ligature" then
- if merge_ligatures then
- merged=merged+mergesteps_4(lookup)
- end
- elseif kind=="gpos_single" then
- if merge_singles then
- merged=merged+mergesteps_1(lookup,true)
- end
- if compact_singles then
- kerned=kerned+checkkerns(lookup)
- end
- elseif kind=="gpos_pair" then
- if merge_pairs then
- merged=merged+mergesteps_2(lookup)
- end
- if compact_pairs then
- kerned=kerned+checkpairs(lookup)
- end
- elseif kind=="gpos_cursive" then
- if merge_cursives then
- merged=merged+mergesteps_5(lookup)
- end
- elseif kind=="gpos_mark2mark" or kind=="gpos_mark2base" or kind=="gpos_mark2ligature" then
- if merge_marks then
- merged=merged+mergesteps_3(lookup)
- end
- end
- if merg~=merged then
- lookup.merged=true
- end
- elseif nofsteps==1 then
- local kern=kerned
- if kind=="gpos_single" then
- if compact_singles then
- kerned=kerned+checkkerns(lookup)
- end
- elseif kind=="gpos_pair" then
- if compact_pairs then
- kerned=kerned+checkpairs(lookup)
- end
- end
- if kern~=kerned then
- end
- end
- end
- elseif trace_optimizations then
- report_optimizations("no lookups in %a",what)
- end
- end
- compact("sequences")
- compact("sublookups")
- if trace_optimizations then
- if merged>0 then
- report_optimizations("%i steps of %i removed due to merging",merged,allsteps)
+local function resolve(t,k)
+ if k then
+ k=lower(k)
+ local v=rawget(t,k)
+ if v then
+ return v
end
- if kerned>0 then
- report_optimizations("%i steps of %i steps turned from pairs into kerns",kerned,allsteps)
+ k=gsub(k," ","")
+ local v=rawget(t,k)
+ if v then
+ return v
end
- end
-end
-local function mergesteps(t,k)
- if k=="merged" then
- local merged={}
- for i=1,#t do
- local step=t[i]
- local coverage=step.coverage
- for k in next,coverage do
- local m=merged[k]
- if m then
- m[2]=i
- else
- merged[k]={ i,i }
+ local tag,dd=match(k,"(..)(%d+)")
+ if tag and dd then
+ local v=rawget(t,tag)
+ if v then
+ return v
+ else
+ local v=rawget(t,tag.."..")
+ if v then
+ return (gsub(v,"%.%.",tonumber(dd)))
end
end
end
- t.merged=merged
- return merged
end
+ return k
end
-local function checkmerge(sequence)
- local steps=sequence.steps
- if steps then
- setmetatableindex(steps,mergesteps)
+setmetatableindex(features,resolve)
+local function assign(t,k,v)
+ if k and v then
+ v=lower(v)
+ rawset(t,k,v)
end
end
-local function checkflags(sequence,resources)
- if not sequence.skiphash then
- local flags=sequence.flags
- if flags then
- local skipmark=flags[1]
- local skipligature=flags[2]
- local skipbase=flags[3]
- local markclass=sequence.markclass
- local skipsome=skipmark or skipligature or skipbase or markclass or false
- if skipsome then
- sequence.skiphash=setmetatableindex(function(t,k)
- local c=resources.classes[k]
- local v=c==skipmark
- or (markclass and c=="mark" and not markclass[k])
- or c==skipligature
- or c==skipbase
- or false
- t[k]=v
- return v
- end)
- else
- sequence.skiphash=false
- end
- else
- sequence.skiphash=false
- end
- end
+if setmetatablenewindex then
+ setmetatablenewindex(features,assign)
end
-local function checksteps(sequence)
- local steps=sequence.steps
- if steps then
- for i=1,#steps do
- steps[i].index=i
- end
+local checkers={
+ rand=function(v)
+ return v==true and "random" or v
end
+}
+if not storage then
+ return
end
-if fonts.helpers then
- fonts.helpers.checkmerge=checkmerge
- fonts.helpers.checkflags=checkflags
- fonts.helpers.checksteps=checksteps
-end
-function readers.expand(data)
- if not data or data.expanded then
- return
- else
- data.expanded=true
- end
- local resources=data.resources
- local sublookups=resources.sublookups
- local sequences=resources.sequences
- local markclasses=resources.markclasses
- local descriptions=data.descriptions
- if descriptions then
- local defaultwidth=resources.defaultwidth or 0
- local defaultheight=resources.defaultheight or 0
- local defaultdepth=resources.defaultdepth or 0
- local basename=trace_markwidth and file.basename(resources.filename)
- for u,d in next,descriptions do
- local bb=d.boundingbox
- local wd=d.width
- if not wd then
- d.width=defaultwidth
- elseif trace_markwidth and wd~=0 and d.class=="mark" then
- report_markwidth("mark %a with width %b found in %a",d.name or "<noname>",wd,basename)
- end
- if bb then
- local ht=bb[4]
- local dp=-bb[2]
- if ht==0 or ht<0 then
- else
- d.height=ht
- end
- if dp==0 or dp<0 then
+local usedfeatures=statistics.usedfeatures or {}
+statistics.usedfeatures=usedfeatures
+table.setmetatableindex(usedfeatures,function(t,k) if k then local v={} t[k]=v return v end end)
+storage.register("fonts/otf/usedfeatures",usedfeatures,"fonts.handlers.otf.statistics.usedfeatures" )
+local normalizedaxis=otf.readers.helpers.normalizedaxis or function(s) return s end
+function otffeatures.normalize(features,wrap)
+ if features then
+ local h={}
+ for key,value in next,features do
+ local k=lower(key)
+ if k=="language" then
+ local v=gsub(lower(value),"[^a-z0-9]","")
+ h.language=rawget(verboselanguages,v) or (languages[v] and v) or "dflt"
+ elseif k=="script" then
+ local v=gsub(lower(value),"[^a-z0-9]","")
+ h.script=rawget(verbosescripts,v) or (scripts[v] and v) or "dflt"
+ elseif k=="axis" then
+ h[k]=normalizedaxis(value)
+ else
+ local uk=usedfeatures[key]
+ local uv=uk[value]
+ if uv then
else
- d.depth=dp
- end
- end
- end
- end
- local function expandlookups(sequences)
- if sequences then
- for i=1,#sequences do
- local sequence=sequences[i]
- local steps=sequence.steps
- if steps then
- local nofsteps=sequence.nofsteps
- local kind=sequence.type
- local markclass=sequence.markclass
- if markclass then
- if not markclasses then
- report_warning("missing markclasses")
- sequence.markclass=false
+ uv=tonumber(value)
+ if uv then
+ elseif type(value)=="string" then
+ local b=is_boolean(value)
+ if type(b)=="nil" then
+ if wrap and find(value,",") then
+ uv="{"..lower(value).."}"
+ else
+ uv=lower(value)
+ end
else
- sequence.markclass=markclasses[markclass]
+ uv=b
end
+ elseif type(value)=="table" then
+ uv=sequenced(t,",")
+ else
+ uv=value
end
- for i=1,nofsteps do
- local step=steps[i]
- local baseclasses=step.baseclasses
- if baseclasses then
- local coverage=step.coverage
- for k,v in next,coverage do
- v[1]=baseclasses[v[1]]
- end
- elseif kind=="gpos_cursive" then
- local coverage=step.coverage
- for k,v in next,coverage do
- v[1]=coverage
- end
- end
- local rules=step.rules
- if rules then
- local rulehash={ n=0 }
- local rulesize=0
- local coverage={}
- local lookuptype=sequence.type
- local nofrules=#rules
- step.coverage=coverage
- for currentrule=1,nofrules do
- local rule=rules[currentrule]
- local current=rule.current
- local before=rule.before
- local after=rule.after
- local replacements=rule.replacements or false
- local sequence={}
- local nofsequences=0
- if before then
- for n=1,#before do
- nofsequences=nofsequences+1
- sequence[nofsequences]=before[n]
- end
- end
- local start=nofsequences+1
- for n=1,#current do
- nofsequences=nofsequences+1
- sequence[nofsequences]=current[n]
- end
- local stop=nofsequences
- if after then
- for n=1,#after do
- nofsequences=nofsequences+1
- sequence[nofsequences]=after[n]
- end
- end
- local lookups=rule.lookups or false
- local subtype=nil
- if lookups then
- for i=1,#lookups do
- local lookups=lookups[i]
- if lookups then
- for k,v in next,lookups do
- local lookup=sublookups[v]
- if lookup then
- lookups[k]=lookup
- if not subtype then
- subtype=lookup.type
- end
- else
- end
- end
- end
- end
- end
- if sequence[1] then
- sequence.n=#sequence
- local ruledata={
- currentrule,
- lookuptype,
- sequence,
- start,
- stop,
- lookups,
- replacements,
- subtype,
- }
- rulesize=rulesize+1
- rulehash[rulesize]=ruledata
- rulehash.n=rulesize
- if true then
- for unic in next,sequence[start] do
- local cu=coverage[unic]
- if cu then
- local n=#cu+1
- cu[n]=ruledata
- cu.n=n
- else
- coverage[unic]={ ruledata,n=1 }
- end
- end
- else
- for unic in next,sequence[start] do
- local cu=coverage[unic]
- if cu then
- else
- coverage[unic]=rulehash
- end
- end
- end
- end
- end
- end
+ if not rawget(features,k) then
+ k=rawget(verbosefeatures,k) or k
end
- checkmerge(sequence)
- checkflags(sequence,resources)
- checksteps(sequence)
+ local c=checkers[k]
+ if c then
+ uv=c(uv) or vc
+ end
+ uk[value]=uv
end
+ h[k]=uv
end
end
+ return h
end
- expandlookups(sequences)
- expandlookups(sublookups)
end
end -- closure
@@ -23363,7 +20830,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_d
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.111
+otf.version=3.113
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)
@@ -23728,7 +21195,6 @@ local function copytotfm(data,cache_id)
parameters.units=units
parameters.vheight=metadata.defaultvheight
properties.space=spacer
- properties.encodingbytes=2
properties.format=data.format or formats.otf
properties.filename=filename
properties.fontname=fontname
@@ -23736,6 +21202,9 @@ local function copytotfm(data,cache_id)
properties.psname=psname
properties.name=filename or fullname
properties.subfont=subfont
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE==0 then
+ properties.encodingbytes=2
+end
properties.private=properties.private or data.private or privateoffset
return {
characters=characters,
@@ -23814,6 +21283,7 @@ local function read_from_otf(specification)
if tfmdata then
tfmdata.properties.name=specification.name
tfmdata.properties.sub=specification.sub
+ tfmdata.properties.id=specification.id
tfmdata=constructors.scale(tfmdata,specification)
local allfeatures=tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("otf",tfmdata,allfeatures,trace_features,report_otf)
@@ -24505,6 +21975,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['font-otj']={
version=1.001,
+ optimize=true,
comment="companion to font-lib.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -24564,14 +22035,14 @@ local insert_node_after=nuts.insert_after
local properties=nodes.properties.data
local fontkern=nuts.pool and nuts.pool.fontkern
local italickern=nuts.pool and nuts.pool.italickern
-local useitalickerns=false
+local useitalickerns=false
directives.register("fonts.injections.useitalics",function(v)
if v then
report_injections("using italics for space kerns (tracing only)")
end
useitalickerns=v
end)
-do if not fontkern then
+if not fontkern then
local thekern=nuts.new("kern",0)
local setkern=nuts.setkern
local copy_node=nuts.copy_node
@@ -24580,8 +22051,8 @@ do if not fontkern then
setkern(n,k)
return n
end
-end end
-do if not italickern then
+end
+if not italickern then
local thekern=nuts.new("kern",3)
local setkern=nuts.setkern
local copy_node=nuts.copy_node
@@ -24590,7 +22061,7 @@ do if not italickern then
setkern(n,k)
return n
end
-end end
+end
function injections.installnewkern() end
local nofregisteredkerns=0
local nofregisteredpositions=0
@@ -25043,7 +22514,15 @@ local function inject_kerns_only(head,where)
if i then
local leftkern=i.leftkern
if leftkern and leftkern~=0 then
- head=insert_node_before(head,current,fontkern(leftkern))
+ if prev and getid(prev)==glue_code then
+ if useitalickerns then
+ head=insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev,getwidth(prev)+leftkern)
+ end
+ else
+ head=insert_node_before(head,current,fontkern(leftkern))
+ end
end
end
if prevdisc then
@@ -25186,12 +22665,26 @@ local function inject_positions_only(head,where)
if rightkern and leftkern==-rightkern then
setoffsets(current,leftkern,false)
rightkern=0
+ elseif prev and getid(prev)==glue_code then
+ if useitalickerns then
+ head=insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev,getwidth(prev)+leftkern)
+ end
else
head=insert_node_before(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern~=0 then
- insert_node_after(head,current,fontkern(rightkern))
+ if next and getid(next)==glue_code then
+ if useitalickerns then
+ insert_node_after(head,current,italickern(rightkern))
+ else
+ setwidth(next,getwidth(next)+rightkern)
+ end
+ else
+ insert_node_after(head,current,fontkern(rightkern))
+ end
end
else
local i=p.emptyinjections
@@ -25539,12 +23032,26 @@ local function inject_everything(head,where)
if rightkern and leftkern==-rightkern then
setoffsets(current,leftkern,false)
rightkern=0
+ elseif prev and getid(prev)==glue_code then
+ if useitalickerns then
+ head=insert_node_before(head,current,italickern(leftkern))
+ else
+ setwidth(prev,getwidth(prev)+leftkern)
+ end
else
head=insert_node_before(head,current,fontkern(leftkern))
end
end
if rightkern and rightkern~=0 then
- insert_node_after(head,current,fontkern(rightkern))
+ if next and getid(next)==glue_code then
+ if useitalickerns then
+ insert_node_after(head,current,italickern(rightkern))
+ else
+ setwidth(next,getwidth(next)+rightkern)
+ end
+ else
+ insert_node_after(head,current,fontkern(rightkern))
+ end
end
end
else
@@ -25910,16 +23417,17 @@ local function injectspaces(head)
if useitalickerns then
local new=rightkern*factor
if trace_spaces then
- report_spaces("%C [%p + %p]",nextchar,old,new)
+ report_spaces("[%p + %p] %C",old,new,nextchar)
end
insert_node_after(head,n,italickern(new))
else
local new=old+rightkern*factor
if trace_spaces then
- report_spaces("[%p -> %p] %C",nextchar,old,new)
+ report_spaces("[%p -> %p] %C",old,new,nextchar)
end
setwidth(n,new)
end
+ else
end
rightkern=false
end
@@ -25955,6 +23463,2649 @@ end -- closure
do -- begin closure to overcome local limits and interference
+if not modules then modules={} end modules ['font-oup']={
+ version=1.001,
+ comment="companion to font-ini.mkiv",
+ author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright="PRAGMA ADE / ConTeXt Development Team",
+ license="see context related readme files"
+}
+local next,type=next,type
+local P,R,S=lpeg.P,lpeg.R,lpeg.S
+local lpegmatch=lpeg.match
+local insert,remove,copy,unpack=table.insert,table.remove,table.copy,table.unpack
+local formatters=string.formatters
+local sortedkeys=table.sortedkeys
+local sortedhash=table.sortedhash
+local tohash=table.tohash
+local setmetatableindex=table.setmetatableindex
+local report_error=logs.reporter("otf reader","error")
+local report_markwidth=logs.reporter("otf reader","markwidth")
+local report_cleanup=logs.reporter("otf reader","cleanup")
+local report_optimizations=logs.reporter("otf reader","merges")
+local report_unicodes=logs.reporter("otf reader","unicodes")
+local trace_markwidth=false trackers.register("otf.markwidth",function(v) trace_markwidth=v end)
+local trace_cleanup=false trackers.register("otf.cleanups",function(v) trace_cleanups=v end)
+local trace_optimizations=false trackers.register("otf.optimizations",function(v) trace_optimizations=v end)
+local trace_unicodes=false trackers.register("otf.unicodes",function(v) trace_unicodes=v end)
+local readers=fonts.handlers.otf.readers
+local privateoffset=fonts.constructors and fonts.constructors.privateoffset or 0xF0000
+local f_private=formatters["P%05X"]
+local f_unicode=formatters["U%05X"]
+local f_index=formatters["I%05X"]
+local f_character_y=formatters["%C"]
+local f_character_n=formatters["[ %C ]"]
+local check_duplicates=true
+local check_soft_hyphen=true
+directives.register("otf.checksofthyphen",function(v)
+ check_soft_hyphen=v
+end)
+local function replaced(list,index,replacement)
+ if type(list)=="number" then
+ return replacement
+ elseif type(replacement)=="table" then
+ local t={}
+ local n=index-1
+ for i=1,n do
+ t[i]=list[i]
+ end
+ for i=1,#replacement do
+ n=n+1
+ t[n]=replacement[i]
+ end
+ for i=index+1,#list do
+ n=n+1
+ t[n]=list[i]
+ end
+ else
+ list[index]=replacement
+ return list
+ end
+end
+local function unifyresources(fontdata,indices)
+ local descriptions=fontdata.descriptions
+ local resources=fontdata.resources
+ if not descriptions or not resources then
+ return
+ end
+ local nofindices=#indices
+ local variants=fontdata.resources.variants
+ if variants then
+ for selector,unicodes in next,variants do
+ for unicode,index in next,unicodes do
+ unicodes[unicode]=indices[index]
+ end
+ end
+ end
+ local function remark(marks)
+ if marks then
+ local newmarks={}
+ for k,v in next,marks do
+ local u=indices[k]
+ if u then
+ newmarks[u]=v
+ elseif trace_optimizations then
+ report_optimizations("discarding mark %i",k)
+ end
+ end
+ return newmarks
+ end
+ end
+ local marks=resources.marks
+ if marks then
+ resources.marks=remark(marks)
+ end
+ local markclasses=resources.markclasses
+ if markclasses then
+ for class,marks in next,markclasses do
+ markclasses[class]=remark(marks)
+ end
+ end
+ local marksets=resources.marksets
+ if marksets then
+ for class,marks in next,marksets do
+ marksets[class]=remark(marks)
+ end
+ end
+ local done={}
+ local duplicates=check_duplicates and resources.duplicates
+ if duplicates and not next(duplicates) then
+ duplicates=false
+ end
+ local function recover(cover)
+ for i=1,#cover do
+ local c=cover[i]
+ if not done[c] then
+ local t={}
+ for k,v in next,c do
+ local ug=indices[k]
+ if ug then
+ t[ug]=v
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,"coverage",k,nofindices)
+ end
+ end
+ cover[i]=t
+ done[c]=d
+ end
+ end
+ end
+ local function recursed(c,kind)
+ local t={}
+ for g,d in next,c do
+ if type(d)=="table" then
+ local ug=indices[g]
+ if ug then
+ t[ug]=recursed(d,kind)
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g,nofindices)
+ end
+ else
+ t[g]=indices[d]
+ end
+ end
+ return t
+ end
+ local function unifythem(sequences)
+ if not sequences then
+ return
+ end
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ local kind=sequence.type
+ local steps=sequence.steps
+ local features=sequence.features
+ if steps then
+ for i=1,#steps do
+ local step=steps[i]
+ if kind=="gsub_single" then
+ local c=step.coverage
+ if c then
+ local t1=done[c]
+ if not t1 then
+ t1={}
+ if duplicates then
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ local ud1=indices[d1]
+ if ud1 then
+ t1[ug1]=ud1
+ local dg1=duplicates[ug1]
+ if dg1 then
+ for u in next,dg1 do
+ t1[u]=ud1
+ end
+ end
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",3,kind,d1,nofindices)
+ end
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
+ end
+ end
+ else
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ t1[ug1]=indices[d1]
+ else
+ report_error("fuzzy case %i in unifying %s: %i",2,kind,g1)
+ end
+ end
+ end
+ done[c]=t1
+ end
+ step.coverage=t1
+ end
+ elseif kind=="gpos_pair" then
+ local c=step.coverage
+ if c then
+ local t1=done[c]
+ if not t1 then
+ t1={}
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ local t2=done[d1]
+ if not t2 then
+ t2={}
+ for g2,d2 in next,d1 do
+ local ug2=indices[g2]
+ if ug2 then
+ t2[ug2]=d2
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g2,nofindices,nofindices)
+ end
+ end
+ done[d1]=t2
+ end
+ t1[ug1]=t2
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
+ end
+ end
+ done[c]=t1
+ end
+ step.coverage=t1
+ end
+ elseif kind=="gsub_ligature" then
+ local c=step.coverage
+ if c then
+ step.coverage=recursed(c,kind)
+ end
+ elseif kind=="gsub_alternate" or kind=="gsub_multiple" then
+ local c=step.coverage
+ if c then
+ local t1=done[c]
+ if not t1 then
+ t1={}
+ if duplicates then
+ for g1,d1 in next,c do
+ for i=1,#d1 do
+ local d1i=d1[i]
+ local d1u=indices[d1i]
+ if d1u then
+ d1[i]=d1u
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,kind,i,d1i,nofindices)
+ end
+ end
+ local ug1=indices[g1]
+ if ug1 then
+ t1[ug1]=d1
+ local dg1=duplicates[ug1]
+ if dg1 then
+ for u in next,dg1 do
+ t1[u]=copy(d1)
+ end
+ end
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
+ end
+ end
+ else
+ for g1,d1 in next,c do
+ for i=1,#d1 do
+ local d1i=d1[i]
+ local d1u=indices[d1i]
+ if d1u then
+ d1[i]=d1u
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",2,kind,d1i,nofindices)
+ end
+ end
+ t1[indices[g1]]=d1
+ end
+ end
+ done[c]=t1
+ end
+ step.coverage=t1
+ end
+ elseif kind=="gpos_single" then
+ local c=step.coverage
+ if c then
+ local t1=done[c]
+ if not t1 then
+ t1={}
+ if duplicates then
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ t1[ug1]=d1
+ local dg1=duplicates[ug1]
+ if dg1 then
+ for u in next,dg1 do
+ t1[u]=d1
+ end
+ end
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
+ end
+ end
+ else
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ t1[ug1]=d1
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
+ end
+ end
+ end
+ done[c]=t1
+ end
+ step.coverage=t1
+ end
+ elseif kind=="gpos_mark2base" or kind=="gpos_mark2mark" or kind=="gpos_mark2ligature" then
+ local c=step.coverage
+ if c then
+ local t1=done[c]
+ if not t1 then
+ t1={}
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ t1[ug1]=d1
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
+ end
+ end
+ done[c]=t1
+ end
+ step.coverage=t1
+ end
+ local c=step.baseclasses
+ if c then
+ local t1=done[c]
+ if not t1 then
+ for g1,d1 in next,c do
+ local t2=done[d1]
+ if not t2 then
+ t2={}
+ for g2,d2 in next,d1 do
+ local ug2=indices[g2]
+ if ug2 then
+ t2[ug2]=d2
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g2,nofindices)
+ end
+ end
+ done[d1]=t2
+ end
+ c[g1]=t2
+ end
+ done[c]=c
+ end
+ end
+ elseif kind=="gpos_cursive" then
+ local c=step.coverage
+ if c then
+ local t1=done[c]
+ if not t1 then
+ t1={}
+ if duplicates then
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ t1[ug1]=d1
+ local dg1=duplicates[ug1]
+ if dg1 then
+ for u in next,dg1 do
+ t1[u]=copy(d1)
+ end
+ end
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",1,kind,g1,nofindices)
+ end
+ end
+ else
+ for g1,d1 in next,c do
+ local ug1=indices[g1]
+ if ug1 then
+ t1[ug1]=d1
+ else
+ report_error("case %i, bad index in unifying %s: %s of %s",2,kind,g1,nofindices)
+ end
+ end
+ end
+ done[c]=t1
+ end
+ step.coverage=t1
+ end
+ end
+ local rules=step.rules
+ if rules then
+ for i=1,#rules do
+ local rule=rules[i]
+ local before=rule.before if before then recover(before) end
+ local after=rule.after if after then recover(after) end
+ local current=rule.current if current then recover(current) end
+ local replacements=rule.replacements
+ if replacements then
+ if not done[replacements] then
+ local r={}
+ for k,v in next,replacements do
+ r[indices[k]]=indices[v]
+ end
+ rule.replacements=r
+ done[replacements]=r
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ unifythem(resources.sequences)
+ unifythem(resources.sublookups)
+end
+local function copyduplicates(fontdata)
+ if check_duplicates then
+ local descriptions=fontdata.descriptions
+ local resources=fontdata.resources
+ local duplicates=resources.duplicates
+ if check_soft_hyphen then
+ local ds=descriptions[0xAD]
+ if not ds or ds.width==0 then
+ if ds then
+ descriptions[0xAD]=nil
+ if trace_unicodes then
+ report_unicodes("patching soft hyphen")
+ end
+ else
+ if trace_unicodes then
+ report_unicodes("adding soft hyphen")
+ end
+ end
+ if not duplicates then
+ duplicates={}
+ resources.duplicates=duplicates
+ end
+ local dh=duplicates[0x2D]
+ if dh then
+ dh[#dh+1]={ [0xAD]=true }
+ else
+ duplicates[0x2D]={ [0xAD]=true }
+ end
+ end
+ end
+ if duplicates then
+ for u,d in next,duplicates do
+ local du=descriptions[u]
+ if du then
+ local t={ f_character_y(u),"@",f_index(du.index),"->" }
+ local n=0
+ local m=25
+ for u in next,d do
+ if descriptions[u] then
+ if n<m then
+ t[n+4]=f_character_n(u)
+ end
+ else
+ local c=copy(du)
+ c.unicode=u
+ descriptions[u]=c
+ if n<m then
+ t[n+4]=f_character_y(u)
+ end
+ end
+ n=n+1
+ end
+ if trace_unicodes then
+ if n<=m then
+ report_unicodes("%i : % t",n,t)
+ else
+ report_unicodes("%i : % t ...",n,t)
+ end
+ end
+ else
+ end
+ end
+ end
+ end
+end
+local ignore={
+ ["notdef"]=true,
+ [".notdef"]=true,
+ ["null"]=true,
+ [".null"]=true,
+ ["nonmarkingreturn"]=true,
+}
+local function checklookups(fontdata,missing,nofmissing)
+ local descriptions=fontdata.descriptions
+ local resources=fontdata.resources
+ if missing and nofmissing and nofmissing<=0 then
+ return
+ end
+ local singles={}
+ local alternates={}
+ local ligatures={}
+ if not missing then
+ missing={}
+ nofmissing=0
+ for u,d in next,descriptions do
+ if not d.unicode then
+ nofmissing=nofmissing+1
+ missing[u]=true
+ end
+ end
+ end
+ local function collectthem(sequences)
+ if not sequences then
+ return
+ end
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ local kind=sequence.type
+ local steps=sequence.steps
+ if steps then
+ for i=1,#steps do
+ local step=steps[i]
+ if kind=="gsub_single" then
+ local c=step.coverage
+ if c then
+ singles[#singles+1]=c
+ end
+ elseif kind=="gsub_alternate" then
+ local c=step.coverage
+ if c then
+ alternates[#alternates+1]=c
+ end
+ elseif kind=="gsub_ligature" then
+ local c=step.coverage
+ if c then
+ ligatures[#ligatures+1]=c
+ end
+ end
+ end
+ end
+ end
+ end
+ collectthem(resources.sequences)
+ collectthem(resources.sublookups)
+ local loops=0
+ while true do
+ loops=loops+1
+ local old=nofmissing
+ for i=1,#singles do
+ local c=singles[i]
+ for g1,g2 in next,c do
+ if missing[g1] then
+ local u2=descriptions[g2].unicode
+ if u2 then
+ missing[g1]=false
+ descriptions[g1].unicode=u2
+ nofmissing=nofmissing-1
+ end
+ end
+ if missing[g2] then
+ local u1=descriptions[g1].unicode
+ if u1 then
+ missing[g2]=false
+ descriptions[g2].unicode=u1
+ nofmissing=nofmissing-1
+ end
+ end
+ end
+ end
+ for i=1,#alternates do
+ local c=alternates[i]
+ for g1,d1 in next,c do
+ if missing[g1] then
+ for i=1,#d1 do
+ local g2=d1[i]
+ local u2=descriptions[g2].unicode
+ if u2 then
+ missing[g1]=false
+ descriptions[g1].unicode=u2
+ nofmissing=nofmissing-1
+ end
+ end
+ end
+ if not missing[g1] then
+ for i=1,#d1 do
+ local g2=d1[i]
+ if missing[g2] then
+ local u1=descriptions[g1].unicode
+ if u1 then
+ missing[g2]=false
+ descriptions[g2].unicode=u1
+ nofmissing=nofmissing-1
+ end
+ end
+ end
+ end
+ end
+ end
+ if nofmissing<=0 then
+ if trace_unicodes then
+ report_unicodes("all missings done in %s loops",loops)
+ end
+ return
+ elseif old==nofmissing then
+ break
+ end
+ end
+ local t,n
+ local function recursed(c)
+ for g,d in next,c do
+ if g~="ligature" then
+ local u=descriptions[g].unicode
+ if u then
+ n=n+1
+ t[n]=u
+ recursed(d)
+ n=n-1
+ end
+ elseif missing[d] then
+ local l={}
+ local m=0
+ for i=1,n do
+ local u=t[i]
+ if type(u)=="table" then
+ for i=1,#u do
+ m=m+1
+ l[m]=u[i]
+ end
+ else
+ m=m+1
+ l[m]=u
+ end
+ end
+ missing[d]=false
+ descriptions[d].unicode=l
+ nofmissing=nofmissing-1
+ end
+ end
+ end
+ if nofmissing>0 then
+ t={}
+ n=0
+ local loops=0
+ while true do
+ loops=loops+1
+ local old=nofmissing
+ for i=1,#ligatures do
+ recursed(ligatures[i])
+ end
+ if nofmissing<=0 then
+ if trace_unicodes then
+ report_unicodes("all missings done in %s loops",loops)
+ end
+ return
+ elseif old==nofmissing then
+ break
+ end
+ end
+ t=nil
+ n=0
+ end
+ if trace_unicodes and nofmissing>0 then
+ local done={}
+ for i,r in next,missing do
+ if r then
+ local data=descriptions[i]
+ local name=data and data.name or f_index(i)
+ if not ignore[name] then
+ done[name]=true
+ end
+ end
+ end
+ if next(done) then
+ report_unicodes("not unicoded: % t",sortedkeys(done))
+ end
+ end
+end
+local firstprivate=fonts.privateoffsets and fonts.privateoffsets.textbase or 0xF0000
+local puafirst=0xE000
+local pualast=0xF8FF
+local function unifymissing(fontdata)
+ if not fonts.mappings then
+ require("font-map")
+ require("font-agl")
+ end
+ local unicodes={}
+ local resources=fontdata.resources
+ resources.unicodes=unicodes
+ for unicode,d in next,fontdata.descriptions do
+ if unicode<privateoffset then
+ if unicode>=puafirst and unicode<=pualast then
+ else
+ local name=d.name
+ if name then
+ unicodes[name]=unicode
+ end
+ end
+ else
+ end
+ end
+ fonts.mappings.addtounicode(fontdata,fontdata.filename,checklookups)
+ resources.unicodes=nil
+end
+local function unifyglyphs(fontdata,usenames)
+ local private=fontdata.private or privateoffset
+ local glyphs=fontdata.glyphs
+ local indices={}
+ local descriptions={}
+ local names=usenames and {}
+ local resources=fontdata.resources
+ local zero=glyphs[0]
+ local zerocode=zero.unicode
+ if not zerocode then
+ zerocode=private
+ zero.unicode=zerocode
+ private=private+1
+ end
+ descriptions[zerocode]=zero
+ if names then
+ local name=glyphs[0].name or f_private(zerocode)
+ indices[0]=name
+ names[name]=zerocode
+ else
+ indices[0]=zerocode
+ end
+ if names then
+ for index=1,#glyphs do
+ local glyph=glyphs[index]
+ local unicode=glyph.unicode
+ if not unicode then
+ unicode=private
+ local name=glyph.name or f_private(unicode)
+ indices[index]=name
+ names[name]=unicode
+ private=private+1
+ elseif unicode>=firstprivate then
+ unicode=private
+ local name=glyph.name or f_private(unicode)
+ indices[index]=name
+ names[name]=unicode
+ private=private+1
+ elseif unicode>=puafirst and unicode<=pualast then
+ local name=glyph.name or f_private(unicode)
+ indices[index]=name
+ names[name]=unicode
+ elseif descriptions[unicode] then
+ unicode=private
+ local name=glyph.name or f_private(unicode)
+ indices[index]=name
+ names[name]=unicode
+ private=private+1
+ else
+ local name=glyph.name or f_unicode(unicode)
+ indices[index]=name
+ names[name]=unicode
+ end
+ descriptions[unicode]=glyph
+ end
+ elseif trace_unicodes then
+ for index=1,#glyphs do
+ local glyph=glyphs[index]
+ local unicode=glyph.unicode
+ if not unicode then
+ unicode=private
+ indices[index]=unicode
+ private=private+1
+ elseif unicode>=firstprivate then
+ local name=glyph.name
+ if name then
+ report_unicodes("moving glyph %a indexed %05X from private %U to %U ",name,index,unicode,private)
+ else
+ report_unicodes("moving glyph indexed %05X from private %U to %U ",index,unicode,private)
+ end
+ unicode=private
+ indices[index]=unicode
+ private=private+1
+ elseif unicode>=puafirst and unicode<=pualast then
+ local name=glyph.name
+ if name then
+ report_unicodes("keeping private unicode %U for glyph %a indexed %05X",unicode,name,index)
+ else
+ report_unicodes("keeping private unicode %U for glyph indexed %05X",unicode,index)
+ end
+ indices[index]=unicode
+ elseif descriptions[unicode] then
+ local name=glyph.name
+ if name then
+ report_unicodes("assigning duplicate unicode %U to %U for glyph %a indexed %05X ",unicode,private,name,index)
+ else
+ report_unicodes("assigning duplicate unicode %U to %U for glyph indexed %05X ",unicode,private,index)
+ end
+ unicode=private
+ indices[index]=unicode
+ private=private+1
+ else
+ indices[index]=unicode
+ end
+ descriptions[unicode]=glyph
+ end
+ else
+ for index=1,#glyphs do
+ local glyph=glyphs[index]
+ local unicode=glyph.unicode
+ if not unicode then
+ unicode=private
+ indices[index]=unicode
+ private=private+1
+ elseif unicode>=firstprivate then
+ local name=glyph.name
+ unicode=private
+ indices[index]=unicode
+ private=private+1
+ elseif unicode>=puafirst and unicode<=pualast then
+ local name=glyph.name
+ indices[index]=unicode
+ elseif descriptions[unicode] then
+ local name=glyph.name
+ unicode=private
+ indices[index]=unicode
+ private=private+1
+ else
+ indices[index]=unicode
+ end
+ descriptions[unicode]=glyph
+ end
+ end
+ for index=1,#glyphs do
+ local math=glyphs[index].math
+ if math then
+ local list=math.vparts
+ if list then
+ for i=1,#list do local l=list[i] l.glyph=indices[l.glyph] end
+ end
+ local list=math.hparts
+ if list then
+ for i=1,#list do local l=list[i] l.glyph=indices[l.glyph] end
+ end
+ local list=math.vvariants
+ if list then
+ for i=1,#list do list[i]=indices[list[i]] end
+ end
+ local list=math.hvariants
+ if list then
+ for i=1,#list do list[i]=indices[list[i]] end
+ end
+ end
+ end
+ local colorpalettes=resources.colorpalettes
+ if colorpalettes then
+ for index=1,#glyphs do
+ local colors=glyphs[index].colors
+ if colors then
+ for i=1,#colors do
+ local c=colors[i]
+ c.slot=indices[c.slot]
+ end
+ end
+ end
+ end
+ fontdata.private=private
+ fontdata.glyphs=nil
+ fontdata.names=names
+ fontdata.descriptions=descriptions
+ fontdata.hashmethod=hashmethod
+ return indices,names
+end
+local p_crappyname do
+ local p_hex=R("af","AF","09")
+ local p_digit=R("09")
+ local p_done=S("._-")^0+P(-1)
+ local p_alpha=R("az","AZ")
+ local p_ALPHA=R("AZ")
+ p_crappyname=(
+ lpeg.utfchartabletopattern({ "uni","u" },true)*S("Xx_")^0*p_hex^1
++lpeg.utfchartabletopattern({ "identity","glyph","jamo" },true)*p_hex^1
++lpeg.utfchartabletopattern({ "index","afii" },true)*p_digit^1
++p_digit*p_hex^3+p_alpha*p_digit^1
++P("aj")*p_digit^1+P("eh_")*(p_digit^1+p_ALPHA*p_digit^1)+(1-P("_"))^1*P("_uni")*p_hex^1+P("_")*P(1)^1
+ )*p_done
+end
+local forcekeep=false
+directives.register("otf.keepnames",function(v)
+ report_cleanup("keeping weird glyph names, expect larger files and more memory usage")
+ forcekeep=v
+end)
+local function stripredundant(fontdata)
+ local descriptions=fontdata.descriptions
+ if descriptions then
+ local n=0
+ local c=0
+ if (not context and fonts.privateoffsets.keepnames) or forcekeep then
+ for unicode,d in next,descriptions do
+ if d.class=="base" then
+ d.class=nil
+ c=c+1
+ end
+ end
+ else
+ for unicode,d in next,descriptions do
+ local name=d.name
+ if name and lpegmatch(p_crappyname,name) then
+ d.name=nil
+ n=n+1
+ end
+ if d.class=="base" then
+ d.class=nil
+ c=c+1
+ end
+ end
+ end
+ if trace_cleanup then
+ if n>0 then
+ report_cleanup("%s bogus names removed (verbose unicode)",n)
+ end
+ if c>0 then
+ report_cleanup("%s base class tags removed (default is base)",c)
+ end
+ end
+ end
+end
+readers.stripredundant=stripredundant
+function readers.getcomponents(fontdata)
+ local resources=fontdata.resources
+ if resources then
+ local sequences=resources.sequences
+ if sequences then
+ local collected={}
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ if sequence.type=="gsub_ligature" then
+ local steps=sequence.steps
+ if steps then
+ local l={}
+ local function traverse(p,k,v)
+ if k=="ligature" then
+ collected[v]={ unpack(l) }
+ else
+ insert(l,k)
+ for k,vv in next,v do
+ traverse(p,k,vv)
+ end
+ remove(l)
+ end
+ end
+ for i=1,#steps do
+ local c=steps[i].coverage
+ if c then
+ for k,v in next,c do
+ traverse(k,k,v)
+ end
+ end
+ end
+ end
+ end
+ end
+ if next(collected) then
+ while true do
+ local done=false
+ for k,v in next,collected do
+ for i=1,#v do
+ local vi=v[i]
+ if vi==k then
+ collected[k]=nil
+ break
+ else
+ local c=collected[vi]
+ if c then
+ done=true
+ local t={}
+ local n=i-1
+ for j=1,n do
+ t[j]=v[j]
+ end
+ for j=1,#c do
+ n=n+1
+ t[n]=c[j]
+ end
+ for j=i+1,#v do
+ n=n+1
+ t[n]=v[j]
+ end
+ collected[k]=t
+ break
+ end
+ end
+ end
+ end
+ if not done then
+ break
+ end
+ end
+ return collected
+ end
+ end
+ end
+end
+readers.unifymissing=unifymissing
+function readers.rehash(fontdata,hashmethod)
+ if not (fontdata and fontdata.glyphs) then
+ return
+ end
+ if hashmethod=="indices" then
+ fontdata.hashmethod="indices"
+ elseif hashmethod=="names" then
+ fontdata.hashmethod="names"
+ local indices=unifyglyphs(fontdata,true)
+ unifyresources(fontdata,indices)
+ copyduplicates(fontdata)
+ unifymissing(fontdata)
+ else
+ fontdata.hashmethod="unicodes"
+ local indices=unifyglyphs(fontdata)
+ unifyresources(fontdata,indices)
+ copyduplicates(fontdata)
+ unifymissing(fontdata)
+ stripredundant(fontdata)
+ end
+end
+function readers.checkhash(fontdata)
+ local hashmethod=fontdata.hashmethod
+ if hashmethod=="unicodes" then
+ fontdata.names=nil
+ elseif hashmethod=="names" and fontdata.names then
+ unifyresources(fontdata,fontdata.names)
+ copyduplicates(fontdata)
+ fontdata.hashmethod="unicodes"
+ fontdata.names=nil
+ else
+ readers.rehash(fontdata,"unicodes")
+ end
+end
+function readers.addunicodetable(fontdata)
+ local resources=fontdata.resources
+ local unicodes=resources.unicodes
+ if not unicodes then
+ local descriptions=fontdata.descriptions
+ if descriptions then
+ unicodes={}
+ resources.unicodes=unicodes
+ for u,d in next,descriptions do
+ local n=d.name
+ if n then
+ unicodes[n]=u
+ end
+ end
+ end
+ end
+end
+local concat,sort=table.concat,table.sort
+local next,type,tostring=next,type,tostring
+local criterium=1
+local threshold=0
+local trace_packing=false trackers.register("otf.packing",function(v) trace_packing=v end)
+local trace_loading=false trackers.register("otf.loading",function(v) trace_loading=v end)
+local report_otf=logs.reporter("fonts","otf loading")
+local function tabstr_normal(t)
+ local s={}
+ local n=0
+ for k,v in next,t do
+ n=n+1
+ if type(v)=="table" then
+ s[n]=k..">"..tabstr_normal(v)
+ elseif v==true then
+ s[n]=k.."+"
+ elseif v then
+ s[n]=k.."="..v
+ else
+ s[n]=k.."-"
+ end
+ end
+ if n==0 then
+ return ""
+ elseif n==1 then
+ return s[1]
+ else
+ sort(s)
+ return concat(s,",")
+ end
+end
+local function tabstr_flat(t)
+ local s={}
+ local n=0
+ for k,v in next,t do
+ n=n+1
+ s[n]=k.."="..v
+ end
+ if n==0 then
+ return ""
+ elseif n==1 then
+ return s[1]
+ else
+ sort(s)
+ return concat(s,",")
+ end
+end
+local function tabstr_mixed(t)
+ local s={}
+ local n=#t
+ if n==0 then
+ return ""
+ elseif n==1 then
+ local k=t[1]
+ if k==true then
+ return "++"
+ elseif k==false then
+ return "--"
+ else
+ return tostring(k)
+ end
+ else
+ for i=1,n do
+ local k=t[i]
+ if k==true then
+ s[i]="++"
+ elseif k==false then
+ s[i]="--"
+ else
+ s[i]=k
+ end
+ end
+ return concat(s,",")
+ end
+end
+local function tabstr_boolean(t)
+ local s={}
+ local n=0
+ for k,v in next,t do
+ n=n+1
+ if v then
+ s[n]=k.."+"
+ else
+ s[n]=k.."-"
+ end
+ end
+ if n==0 then
+ return ""
+ elseif n==1 then
+ return s[1]
+ else
+ sort(s)
+ return concat(s,",")
+ end
+end
+function readers.pack(data)
+ if data then
+ local h,t,c={},{},{}
+ local hh,tt,cc={},{},{}
+ local nt,ntt=0,0
+ local function pack_normal(v)
+ local tag=tabstr_normal(v)
+ local ht=h[tag]
+ if ht then
+ c[ht]=c[ht]+1
+ return ht
+ else
+ nt=nt+1
+ t[nt]=v
+ h[tag]=nt
+ c[nt]=1
+ return nt
+ end
+ end
+ local function pack_normal_cc(v)
+ local tag=tabstr_normal(v)
+ local ht=h[tag]
+ if ht then
+ c[ht]=c[ht]+1
+ return ht
+ else
+ v[1]=0
+ nt=nt+1
+ t[nt]=v
+ h[tag]=nt
+ c[nt]=1
+ return nt
+ end
+ end
+ local function pack_flat(v)
+ local tag=tabstr_flat(v)
+ local ht=h[tag]
+ if ht then
+ c[ht]=c[ht]+1
+ return ht
+ else
+ nt=nt+1
+ t[nt]=v
+ h[tag]=nt
+ c[nt]=1
+ return nt
+ end
+ end
+ local function pack_indexed(v)
+ local tag=concat(v," ")
+ local ht=h[tag]
+ if ht then
+ c[ht]=c[ht]+1
+ return ht
+ else
+ nt=nt+1
+ t[nt]=v
+ h[tag]=nt
+ c[nt]=1
+ return nt
+ end
+ end
+ local function pack_mixed(v)
+ local tag=tabstr_mixed(v)
+ local ht=h[tag]
+ if ht then
+ c[ht]=c[ht]+1
+ return ht
+ else
+ nt=nt+1
+ t[nt]=v
+ h[tag]=nt
+ c[nt]=1
+ return nt
+ end
+ end
+ local function pack_boolean(v)
+ local tag=tabstr_boolean(v)
+ local ht=h[tag]
+ if ht then
+ c[ht]=c[ht]+1
+ return ht
+ else
+ nt=nt+1
+ t[nt]=v
+ h[tag]=nt
+ c[nt]=1
+ return nt
+ end
+ end
+ local function pack_final(v)
+ if c[v]<=criterium then
+ return t[v]
+ else
+ local hv=hh[v]
+ if hv then
+ return hv
+ else
+ ntt=ntt+1
+ tt[ntt]=t[v]
+ hh[v]=ntt
+ cc[ntt]=c[v]
+ return ntt
+ end
+ end
+ end
+ local function pack_final_cc(v)
+ if c[v]<=criterium then
+ return t[v]
+ else
+ local hv=hh[v]
+ if hv then
+ return hv
+ else
+ ntt=ntt+1
+ tt[ntt]=t[v]
+ hh[v]=ntt
+ cc[ntt]=c[v]
+ return ntt
+ end
+ end
+ end
+ local function success(stage,pass)
+ if nt==0 then
+ if trace_loading or trace_packing then
+ report_otf("pack quality: nothing to pack")
+ end
+ return false
+ elseif nt>=threshold then
+ local one=0
+ local two=0
+ local rest=0
+ if pass==1 then
+ for k,v in next,c do
+ if v==1 then
+ one=one+1
+ elseif v==2 then
+ two=two+1
+ else
+ rest=rest+1
+ end
+ end
+ else
+ for k,v in next,cc do
+ if v>20 then
+ rest=rest+1
+ elseif v>10 then
+ two=two+1
+ else
+ one=one+1
+ end
+ end
+ data.tables=tt
+ end
+ if trace_loading or trace_packing then
+ report_otf("pack quality: stage %s, pass %s, %s packed, 1-10:%s, 11-20:%s, rest:%s (criterium: %s)",
+ stage,pass,one+two+rest,one,two,rest,criterium)
+ end
+ return true
+ else
+ if trace_loading or trace_packing then
+ report_otf("pack quality: stage %s, pass %s, %s packed, aborting pack (threshold: %s)",
+ stage,pass,nt,threshold)
+ end
+ return false
+ end
+ end
+ local function packers(pass)
+ if pass==1 then
+ return pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc
+ else
+ return pack_final,pack_final,pack_final,pack_final,pack_final,pack_final_cc
+ end
+ end
+ local resources=data.resources
+ local sequences=resources.sequences
+ local sublookups=resources.sublookups
+ local features=resources.features
+ local palettes=resources.colorpalettes
+ local variable=resources.variabledata
+ local chardata=characters and characters.data
+ local descriptions=data.descriptions or data.glyphs
+ if not descriptions then
+ return
+ end
+ for pass=1,2 do
+ if trace_packing then
+ report_otf("start packing: stage 1, pass %s",pass)
+ end
+ local pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc=packers(pass)
+ for unicode,description in next,descriptions do
+ local boundingbox=description.boundingbox
+ if boundingbox then
+ description.boundingbox=pack_indexed(boundingbox)
+ end
+ local math=description.math
+ if math then
+ local kerns=math.kerns
+ if kerns then
+ for tag,kern in next,kerns do
+ kerns[tag]=pack_normal(kern)
+ end
+ end
+ end
+ end
+ local function packthem(sequences)
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ local kind=sequence.type
+ local steps=sequence.steps
+ local order=sequence.order
+ local features=sequence.features
+ local flags=sequence.flags
+ if steps then
+ for i=1,#steps do
+ local step=steps[i]
+ if kind=="gpos_pair" then
+ local c=step.coverage
+ if c then
+ if step.format~="pair" then
+ for g1,d1 in next,c do
+ c[g1]=pack_normal(d1)
+ end
+ elseif step.shared then
+ local shared={}
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ if not shared[d2] then
+ local f=d2[1] if f and f~=true then d2[1]=pack_indexed(f) end
+ local s=d2[2] if s and s~=true then d2[2]=pack_indexed(s) end
+ shared[d2]=true
+ end
+ end
+ end
+ if pass==2 then
+ step.shared=nil
+ end
+ else
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ local f=d2[1] if f and f~=true then d2[1]=pack_indexed(f) end
+ local s=d2[2] if s and s~=true then d2[2]=pack_indexed(s) end
+ end
+ end
+ end
+ end
+ elseif kind=="gpos_single" then
+ local c=step.coverage
+ if c then
+ if step.format=="single" then
+ for g1,d1 in next,c do
+ if d1 and d1~=true then
+ c[g1]=pack_indexed(d1)
+ end
+ end
+ else
+ step.coverage=pack_normal(c)
+ end
+ end
+ elseif kind=="gpos_cursive" then
+ local c=step.coverage
+ if c then
+ for g1,d1 in next,c do
+ local f=d1[2] if f then d1[2]=pack_indexed(f) end
+ local s=d1[3] if s then d1[3]=pack_indexed(s) end
+ end
+ end
+ elseif kind=="gpos_mark2base" or kind=="gpos_mark2mark" then
+ local c=step.baseclasses
+ if c then
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ d1[g2]=pack_indexed(d2)
+ end
+ end
+ end
+ local c=step.coverage
+ if c then
+ for g1,d1 in next,c do
+ d1[2]=pack_indexed(d1[2])
+ end
+ end
+ elseif kind=="gpos_mark2ligature" then
+ local c=step.baseclasses
+ if c then
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ for g3,d3 in next,d2 do
+ d2[g3]=pack_indexed(d3)
+ end
+ end
+ end
+ end
+ local c=step.coverage
+ if c then
+ for g1,d1 in next,c do
+ d1[2]=pack_indexed(d1[2])
+ end
+ end
+ end
+ local rules=step.rules
+ if rules then
+ for i=1,#rules do
+ local rule=rules[i]
+ local r=rule.before if r then for i=1,#r do r[i]=pack_boolean(r[i]) end end
+ local r=rule.after if r then for i=1,#r do r[i]=pack_boolean(r[i]) end end
+ local r=rule.current if r then for i=1,#r do r[i]=pack_boolean(r[i]) end end
+ local r=rule.replacements if r then rule.replacements=pack_flat (r) end
+ end
+ end
+ end
+ end
+ if order then
+ sequence.order=pack_indexed(order)
+ end
+ if features then
+ for script,feature in next,features do
+ features[script]=pack_normal(feature)
+ end
+ end
+ if flags then
+ sequence.flags=pack_normal(flags)
+ end
+ end
+ end
+ if sequences then
+ packthem(sequences)
+ end
+ if sublookups then
+ packthem(sublookups)
+ end
+ if features then
+ for k,list in next,features do
+ for feature,spec in next,list do
+ list[feature]=pack_normal(spec)
+ end
+ end
+ end
+ if palettes then
+ for i=1,#palettes do
+ local p=palettes[i]
+ for j=1,#p do
+ p[j]=pack_indexed(p[j])
+ end
+ end
+ end
+ if variable then
+ local instances=variable.instances
+ if instances then
+ for i=1,#instances do
+ local v=instances[i].values
+ for j=1,#v do
+ v[j]=pack_normal(v[j])
+ end
+ end
+ end
+ local function packdeltas(main)
+ if main then
+ local deltas=main.deltas
+ if deltas then
+ for i=1,#deltas do
+ local di=deltas[i]
+ local d=di.deltas
+ for j=1,#d do
+ d[j]=pack_indexed(d[j])
+ end
+ di.regions=pack_indexed(di.regions)
+ end
+ end
+ local regions=main.regions
+ if regions then
+ for i=1,#regions do
+ local r=regions[i]
+ for j=1,#r do
+ r[j]=pack_normal(r[j])
+ end
+ end
+ end
+ end
+ end
+ packdeltas(variable.global)
+ packdeltas(variable.horizontal)
+ packdeltas(variable.vertical)
+ packdeltas(variable.metrics)
+ end
+ if not success(1,pass) then
+ return
+ end
+ end
+ if nt>0 then
+ for pass=1,2 do
+ if trace_packing then
+ report_otf("start packing: stage 2, pass %s",pass)
+ end
+ local pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc=packers(pass)
+ for unicode,description in next,descriptions do
+ local math=description.math
+ if math then
+ local kerns=math.kerns
+ if kerns then
+ math.kerns=pack_normal(kerns)
+ end
+ end
+ end
+ local function packthem(sequences)
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ local kind=sequence.type
+ local steps=sequence.steps
+ local features=sequence.features
+ if steps then
+ for i=1,#steps do
+ local step=steps[i]
+ if kind=="gpos_pair" then
+ local c=step.coverage
+ if c then
+ if step.format=="pair" then
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ d1[g2]=pack_normal(d2)
+ end
+ end
+ end
+ end
+ elseif kind=="gpos_mark2ligature" then
+ local c=step.baseclasses
+ if c then
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ d1[g2]=pack_normal(d2)
+ end
+ end
+ end
+ end
+ local rules=step.rules
+ if rules then
+ for i=1,#rules do
+ local rule=rules[i]
+ local r=rule.before if r then rule.before=pack_normal(r) end
+ local r=rule.after if r then rule.after=pack_normal(r) end
+ local r=rule.current if r then rule.current=pack_normal(r) end
+ end
+ end
+ end
+ end
+ if features then
+ sequence.features=pack_normal(features)
+ end
+ end
+ end
+ if sequences then
+ packthem(sequences)
+ end
+ if sublookups then
+ packthem(sublookups)
+ end
+ if variable then
+ local function unpackdeltas(main)
+ if main then
+ local regions=main.regions
+ if regions then
+ main.regions=pack_normal(regions)
+ end
+ end
+ end
+ unpackdeltas(variable.global)
+ unpackdeltas(variable.horizontal)
+ unpackdeltas(variable.vertical)
+ unpackdeltas(variable.metrics)
+ end
+ end
+ for pass=1,2 do
+ if trace_packing then
+ report_otf("start packing: stage 3, pass %s",pass)
+ end
+ local pack_normal,pack_indexed,pack_flat,pack_boolean,pack_mixed,pack_normal_cc=packers(pass)
+ local function packthem(sequences)
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ local kind=sequence.type
+ local steps=sequence.steps
+ local features=sequence.features
+ if steps then
+ for i=1,#steps do
+ local step=steps[i]
+ if kind=="gpos_pair" then
+ local c=step.coverage
+ if c then
+ if step.format=="pair" then
+ for g1,d1 in next,c do
+ c[g1]=pack_normal(d1)
+ end
+ end
+ end
+ elseif kind=="gpos_cursive" then
+ local c=step.coverage
+ if c then
+ for g1,d1 in next,c do
+ c[g1]=pack_normal_cc(d1)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ if sequences then
+ packthem(sequences)
+ end
+ if sublookups then
+ packthem(sublookups)
+ end
+ end
+ end
+ end
+end
+local unpacked_mt={
+ __index=function(t,k)
+ t[k]=false
+ return k
+ end
+}
+function readers.unpack(data)
+ if data then
+ local tables=data.tables
+ if tables then
+ local resources=data.resources
+ local descriptions=data.descriptions or data.glyphs
+ local sequences=resources.sequences
+ local sublookups=resources.sublookups
+ local features=resources.features
+ local palettes=resources.colorpalettes
+ local variable=resources.variabledata
+ local unpacked={}
+ setmetatable(unpacked,unpacked_mt)
+ for unicode,description in next,descriptions do
+ local tv=tables[description.boundingbox]
+ if tv then
+ description.boundingbox=tv
+ end
+ local math=description.math
+ if math then
+ local kerns=math.kerns
+ if kerns then
+ local tm=tables[kerns]
+ if tm then
+ math.kerns=tm
+ kerns=unpacked[tm]
+ end
+ if kerns then
+ for k,kern in next,kerns do
+ local tv=tables[kern]
+ if tv then
+ kerns[k]=tv
+ end
+ end
+ end
+ end
+ end
+ end
+ local function unpackthem(sequences)
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ local kind=sequence.type
+ local steps=sequence.steps
+ local order=sequence.order
+ local features=sequence.features
+ local flags=sequence.flags
+ local markclass=sequence.markclass
+ if features then
+ local tv=tables[features]
+ if tv then
+ sequence.features=tv
+ features=tv
+ end
+ for script,feature in next,features do
+ local tv=tables[feature]
+ if tv then
+ features[script]=tv
+ end
+ end
+ end
+ if steps then
+ for i=1,#steps do
+ local step=steps[i]
+ if kind=="gpos_pair" then
+ local c=step.coverage
+ if c then
+ if step.format=="pair" then
+ for g1,d1 in next,c do
+ local tv=tables[d1]
+ if tv then
+ c[g1]=tv
+ d1=tv
+ end
+ for g2,d2 in next,d1 do
+ local tv=tables[d2]
+ if tv then
+ d1[g2]=tv
+ d2=tv
+ end
+ local f=tables[d2[1]] if f then d2[1]=f end
+ local s=tables[d2[2]] if s then d2[2]=s end
+ end
+ end
+ else
+ for g1,d1 in next,c do
+ local tv=tables[d1]
+ if tv then
+ c[g1]=tv
+ end
+ end
+ end
+ end
+ elseif kind=="gpos_single" then
+ local c=step.coverage
+ if c then
+ if step.format=="single" then
+ for g1,d1 in next,c do
+ local tv=tables[d1]
+ if tv then
+ c[g1]=tv
+ end
+ end
+ else
+ local tv=tables[c]
+ if tv then
+ step.coverage=tv
+ end
+ end
+ end
+ elseif kind=="gpos_cursive" then
+ local c=step.coverage
+ if c then
+ for g1,d1 in next,c do
+ local tv=tables[d1]
+ if tv then
+ d1=tv
+ c[g1]=d1
+ end
+ local f=tables[d1[2]] if f then d1[2]=f end
+ local s=tables[d1[3]] if s then d1[3]=s end
+ end
+ end
+ elseif kind=="gpos_mark2base" or kind=="gpos_mark2mark" then
+ local c=step.baseclasses
+ if c then
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ local tv=tables[d2]
+ if tv then
+ d1[g2]=tv
+ end
+ end
+ end
+ end
+ local c=step.coverage
+ if c then
+ for g1,d1 in next,c do
+ local tv=tables[d1[2]]
+ if tv then
+ d1[2]=tv
+ end
+ end
+ end
+ elseif kind=="gpos_mark2ligature" then
+ local c=step.baseclasses
+ if c then
+ for g1,d1 in next,c do
+ for g2,d2 in next,d1 do
+ local tv=tables[d2]
+ if tv then
+ d2=tv
+ d1[g2]=d2
+ end
+ for g3,d3 in next,d2 do
+ local tv=tables[d2[g3]]
+ if tv then
+ d2[g3]=tv
+ end
+ end
+ end
+ end
+ end
+ local c=step.coverage
+ if c then
+ for g1,d1 in next,c do
+ local tv=tables[d1[2]]
+ if tv then
+ d1[2]=tv
+ end
+ end
+ end
+ end
+ local rules=step.rules
+ if rules then
+ for i=1,#rules do
+ local rule=rules[i]
+ local before=rule.before
+ if before then
+ local tv=tables[before]
+ if tv then
+ rule.before=tv
+ before=tv
+ end
+ for i=1,#before do
+ local tv=tables[before[i]]
+ if tv then
+ before[i]=tv
+ end
+ end
+ end
+ local after=rule.after
+ if after then
+ local tv=tables[after]
+ if tv then
+ rule.after=tv
+ after=tv
+ end
+ for i=1,#after do
+ local tv=tables[after[i]]
+ if tv then
+ after[i]=tv
+ end
+ end
+ end
+ local current=rule.current
+ if current then
+ local tv=tables[current]
+ if tv then
+ rule.current=tv
+ current=tv
+ end
+ for i=1,#current do
+ local tv=tables[current[i]]
+ if tv then
+ current[i]=tv
+ end
+ end
+ end
+ local replacements=rule.replacements
+ if replacements then
+ local tv=tables[replacements]
+ if tv then
+ rule.replacements=tv
+ end
+ end
+ end
+ end
+ end
+ end
+ if order then
+ local tv=tables[order]
+ if tv then
+ sequence.order=tv
+ end
+ end
+ if flags then
+ local tv=tables[flags]
+ if tv then
+ sequence.flags=tv
+ end
+ end
+ end
+ end
+ if sequences then
+ unpackthem(sequences)
+ end
+ if sublookups then
+ unpackthem(sublookups)
+ end
+ if features then
+ for k,list in next,features do
+ for feature,spec in next,list do
+ local tv=tables[spec]
+ if tv then
+ list[feature]=tv
+ end
+ end
+ end
+ end
+ if palettes then
+ for i=1,#palettes do
+ local p=palettes[i]
+ for j=1,#p do
+ local tv=tables[p[j]]
+ if tv then
+ p[j]=tv
+ end
+ end
+ end
+ end
+ if variable then
+ local instances=variable.instances
+ if instances then
+ for i=1,#instances do
+ local v=instances[i].values
+ for j=1,#v do
+ local tv=tables[v[j]]
+ if tv then
+ v[j]=tv
+ end
+ end
+ end
+ end
+ local function unpackdeltas(main)
+ if main then
+ local deltas=main.deltas
+ if deltas then
+ for i=1,#deltas do
+ local di=deltas[i]
+ local d=di.deltas
+ local r=di.regions
+ for j=1,#d do
+ local tv=tables[d[j]]
+ if tv then
+ d[j]=tv
+ end
+ end
+ local tv=di.regions
+ if tv then
+ di.regions=tv
+ end
+ end
+ end
+ local regions=main.regions
+ if regions then
+ local tv=tables[regions]
+ if tv then
+ main.regions=tv
+ regions=tv
+ end
+ for i=1,#regions do
+ local r=regions[i]
+ for j=1,#r do
+ local tv=tables[r[j]]
+ if tv then
+ r[j]=tv
+ end
+ end
+ end
+ end
+ end
+ end
+ unpackdeltas(variable.global)
+ unpackdeltas(variable.horizontal)
+ unpackdeltas(variable.vertical)
+ unpackdeltas(variable.metrics)
+ end
+ data.tables=nil
+ end
+ end
+end
+local mt={
+ __index=function(t,k)
+ if k=="height" then
+ local ht=t.boundingbox[4]
+ return ht<0 and 0 or ht
+ elseif k=="depth" then
+ local dp=-t.boundingbox[2]
+ return dp<0 and 0 or dp
+ elseif k=="width" then
+ return 0
+ elseif k=="name" then
+ return forcenotdef and ".notdef"
+ end
+ end
+}
+local function sameformat(sequence,steps,first,nofsteps,kind)
+ return true
+end
+local function mergesteps_1(lookup,strict)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local first=steps[1]
+ if strict then
+ local f=first.format
+ for i=2,nofsteps do
+ if steps[i].format~=f then
+ if trace_optimizations then
+ report_optimizations("not merging %a steps of %a lookup %a, different formats",nofsteps,lookup.type,lookup.name)
+ end
+ return 0
+ end
+ end
+ end
+ if trace_optimizations then
+ report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ end
+ local target=first.coverage
+ for i=2,nofsteps do
+ local c=steps[i].coverage
+ if c then
+ for k,v in next,c do
+ if not target[k] then
+ target[k]=v
+ end
+ end
+ end
+ end
+ lookup.nofsteps=1
+ lookup.merged=true
+ lookup.steps={ first }
+ return nofsteps-1
+end
+local function mergesteps_2(lookup)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local first=steps[1]
+ if strict then
+ local f=first.format
+ for i=2,nofsteps do
+ if steps[i].format~=f then
+ if trace_optimizations then
+ report_optimizations("not merging %a steps of %a lookup %a, different formats",nofsteps,lookup.type,lookup.name)
+ end
+ return 0
+ end
+ end
+ end
+ if trace_optimizations then
+ report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ end
+ local target=first.coverage
+ for i=2,nofsteps do
+ local c=steps[i].coverage
+ if c then
+ for k,v in next,c do
+ local tk=target[k]
+ if tk then
+ for kk,vv in next,v do
+ if tk[kk]==nil then
+ tk[kk]=vv
+ end
+ end
+ else
+ target[k]=v
+ end
+ end
+ end
+ end
+ lookup.nofsteps=1
+ lookup.merged=true
+ lookup.steps={ first }
+ return nofsteps-1
+end
+local function mergesteps_3(lookup,strict)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ if trace_optimizations then
+ report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ end
+ local coverage={}
+ for i=1,nofsteps do
+ local c=steps[i].coverage
+ if c then
+ for k,v in next,c do
+ local tk=coverage[k]
+ if tk then
+ if trace_optimizations then
+ report_optimizations("quitting merge due to multiple checks")
+ end
+ return nofsteps
+ else
+ coverage[k]=v
+ end
+ end
+ end
+ end
+ local first=steps[1]
+ local baseclasses={}
+ for i=1,nofsteps do
+ local offset=i*10
+ local step=steps[i]
+ for k,v in sortedhash(step.baseclasses) do
+ baseclasses[offset+k]=v
+ end
+ for k,v in next,step.coverage do
+ v[1]=offset+v[1]
+ end
+ end
+ first.baseclasses=baseclasses
+ first.coverage=coverage
+ lookup.nofsteps=1
+ lookup.merged=true
+ lookup.steps={ first }
+ return nofsteps-1
+end
+local function nested(old,new)
+ for k,v in next,old do
+ if k=="ligature" then
+ if not new.ligature then
+ new.ligature=v
+ end
+ else
+ local n=new[k]
+ if n then
+ nested(v,n)
+ else
+ new[k]=v
+ end
+ end
+ end
+end
+local function mergesteps_4(lookup)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local first=steps[1]
+ if trace_optimizations then
+ report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ end
+ local target=first.coverage
+ for i=2,nofsteps do
+ local c=steps[i].coverage
+ if c then
+ for k,v in next,c do
+ local tk=target[k]
+ if tk then
+ nested(v,tk)
+ else
+ target[k]=v
+ end
+ end
+ end
+ end
+ lookup.nofsteps=1
+ lookup.steps={ first }
+ return nofsteps-1
+end
+local function mergesteps_5(lookup)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local first=steps[1]
+ if trace_optimizations then
+ report_optimizations("merging %a steps of %a lookup %a",nofsteps,lookup.type,lookup.name)
+ end
+ local target=first.coverage
+ local hash=nil
+ for k,v in next,target do
+ hash=v[1]
+ break
+ end
+ for i=2,nofsteps do
+ local c=steps[i].coverage
+ if c then
+ for k,v in next,c do
+ local tk=target[k]
+ if tk then
+ if not tk[2] then
+ tk[2]=v[2]
+ end
+ if not tk[3] then
+ tk[3]=v[3]
+ end
+ else
+ target[k]=v
+ v[1]=hash
+ end
+ end
+ end
+ end
+ lookup.nofsteps=1
+ lookup.merged=true
+ lookup.steps={ first }
+ return nofsteps-1
+end
+local function checkkerns(lookup)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local kerned=0
+ for i=1,nofsteps do
+ local step=steps[i]
+ if step.format=="pair" then
+ local coverage=step.coverage
+ local kerns=true
+ for g1,d1 in next,coverage do
+ if d1==true then
+ elseif not d1 then
+ elseif d1[1]~=0 or d1[2]~=0 or d1[4]~=0 then
+ kerns=false
+ break
+ end
+ end
+ if kerns then
+ if trace_optimizations then
+ report_optimizations("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
+ end
+ local c={}
+ for g1,d1 in next,coverage do
+ if d1 and d1~=true then
+ c[g1]=d1[3]
+ end
+ end
+ step.coverage=c
+ step.format="move"
+ kerned=kerned+1
+ end
+ end
+ end
+ return kerned
+end
+local function checkpairs(lookup)
+ local steps=lookup.steps
+ local nofsteps=lookup.nofsteps
+ local kerned=0
+ local function onlykerns(step)
+ local coverage=step.coverage
+ for g1,d1 in next,coverage do
+ for g2,d2 in next,d1 do
+ if d2[2] then
+ return false
+ else
+ local v=d2[1]
+ if v==true then
+ elseif v and (v[1]~=0 or v[2]~=0 or v[4]~=0) then
+ return false
+ end
+ end
+ end
+ end
+ return coverage
+ end
+ for i=1,nofsteps do
+ local step=steps[i]
+ if step.format=="pair" then
+ local coverage=onlykerns(step)
+ if coverage then
+ if trace_optimizations then
+ report_optimizations("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
+ end
+ for g1,d1 in next,coverage do
+ local d={}
+ for g2,d2 in next,d1 do
+ local v=d2[1]
+ if v==true then
+ elseif v then
+ d[g2]=v[3]
+ end
+ end
+ coverage[g1]=d
+ end
+ step.format="move"
+ kerned=kerned+1
+ end
+ end
+ end
+ return kerned
+end
+local compact_pairs=true
+local compact_singles=true
+local merge_pairs=true
+local merge_singles=true
+local merge_substitutions=true
+local merge_alternates=true
+local merge_multiples=true
+local merge_ligatures=true
+local merge_cursives=true
+local merge_marks=true
+directives.register("otf.compact.pairs",function(v) compact_pairs=v end)
+directives.register("otf.compact.singles",function(v) compact_singles=v end)
+directives.register("otf.merge.pairs",function(v) merge_pairs=v end)
+directives.register("otf.merge.singles",function(v) merge_singles=v end)
+directives.register("otf.merge.substitutions",function(v) merge_substitutions=v end)
+directives.register("otf.merge.alternates",function(v) merge_alternates=v end)
+directives.register("otf.merge.multiples",function(v) merge_multiples=v end)
+directives.register("otf.merge.ligatures",function(v) merge_ligatures=v end)
+directives.register("otf.merge.cursives",function(v) merge_cursives=v end)
+directives.register("otf.merge.marks",function(v) merge_marks=v end)
+function readers.compact(data)
+ if not data or data.compacted then
+ return
+ else
+ data.compacted=true
+ end
+ local resources=data.resources
+ local merged=0
+ local kerned=0
+ local allsteps=0
+ local function compact(what)
+ local lookups=resources[what]
+ if lookups then
+ for i=1,#lookups do
+ local lookup=lookups[i]
+ local nofsteps=lookup.nofsteps
+ local kind=lookup.type
+ allsteps=allsteps+nofsteps
+ if nofsteps>1 then
+ local merg=merged
+ if kind=="gsub_single" then
+ if merge_substitutions then
+ merged=merged+mergesteps_1(lookup)
+ end
+ elseif kind=="gsub_alternate" then
+ if merge_alternates then
+ merged=merged+mergesteps_1(lookup)
+ end
+ elseif kind=="gsub_multiple" then
+ if merge_multiples then
+ merged=merged+mergesteps_1(lookup)
+ end
+ elseif kind=="gsub_ligature" then
+ if merge_ligatures then
+ merged=merged+mergesteps_4(lookup)
+ end
+ elseif kind=="gpos_single" then
+ if merge_singles then
+ merged=merged+mergesteps_1(lookup,true)
+ end
+ if compact_singles then
+ kerned=kerned+checkkerns(lookup)
+ end
+ elseif kind=="gpos_pair" then
+ if merge_pairs then
+ merged=merged+mergesteps_2(lookup)
+ end
+ if compact_pairs then
+ kerned=kerned+checkpairs(lookup)
+ end
+ elseif kind=="gpos_cursive" then
+ if merge_cursives then
+ merged=merged+mergesteps_5(lookup)
+ end
+ elseif kind=="gpos_mark2mark" or kind=="gpos_mark2base" or kind=="gpos_mark2ligature" then
+ if merge_marks then
+ merged=merged+mergesteps_3(lookup)
+ end
+ end
+ if merg~=merged then
+ lookup.merged=true
+ end
+ elseif nofsteps==1 then
+ local kern=kerned
+ if kind=="gpos_single" then
+ if compact_singles then
+ kerned=kerned+checkkerns(lookup)
+ end
+ elseif kind=="gpos_pair" then
+ if compact_pairs then
+ kerned=kerned+checkpairs(lookup)
+ end
+ end
+ if kern~=kerned then
+ end
+ end
+ end
+ elseif trace_optimizations then
+ report_optimizations("no lookups in %a",what)
+ end
+ end
+ compact("sequences")
+ compact("sublookups")
+ if trace_optimizations then
+ if merged>0 then
+ report_optimizations("%i steps of %i removed due to merging",merged,allsteps)
+ end
+ if kerned>0 then
+ report_optimizations("%i steps of %i steps turned from pairs into kerns",kerned,allsteps)
+ end
+ end
+end
+local function mergesteps(t,k)
+ if k=="merged" then
+ local merged={}
+ for i=1,#t do
+ local step=t[i]
+ local coverage=step.coverage
+ for k in next,coverage do
+ local m=merged[k]
+ if m then
+ m[2]=i
+ else
+ merged[k]={ i,i }
+ end
+ end
+ end
+ t.merged=merged
+ return merged
+ end
+end
+local function checkmerge(sequence)
+ local steps=sequence.steps
+ if steps then
+ setmetatableindex(steps,mergesteps)
+ end
+end
+local function checkflags(sequence,resources)
+ if not sequence.skiphash then
+ local flags=sequence.flags
+ if flags then
+ local skipmark=flags[1]
+ local skipligature=flags[2]
+ local skipbase=flags[3]
+ local markclass=sequence.markclass
+ local skipsome=skipmark or skipligature or skipbase or markclass or false
+ if skipsome then
+ sequence.skiphash=setmetatableindex(function(t,k)
+ local c=resources.classes[k]
+ local v=c==skipmark
+ or (markclass and c=="mark" and not markclass[k])
+ or c==skipligature
+ or c==skipbase
+ or false
+ t[k]=v
+ return v
+ end)
+ else
+ sequence.skiphash=false
+ end
+ else
+ sequence.skiphash=false
+ end
+ end
+end
+local function checksteps(sequence)
+ local steps=sequence.steps
+ if steps then
+ for i=1,#steps do
+ steps[i].index=i
+ end
+ end
+end
+if fonts.helpers then
+ fonts.helpers.checkmerge=checkmerge
+ fonts.helpers.checkflags=checkflags
+ fonts.helpers.checksteps=checksteps
+end
+function readers.expand(data)
+ if not data or data.expanded then
+ return
+ else
+ data.expanded=true
+ end
+ local resources=data.resources
+ local sublookups=resources.sublookups
+ local sequences=resources.sequences
+ local markclasses=resources.markclasses
+ local descriptions=data.descriptions
+ if descriptions then
+ local defaultwidth=resources.defaultwidth or 0
+ local defaultheight=resources.defaultheight or 0
+ local defaultdepth=resources.defaultdepth or 0
+ local basename=trace_markwidth and file.basename(resources.filename)
+ for u,d in next,descriptions do
+ local bb=d.boundingbox
+ local wd=d.width
+ if not wd then
+ d.width=defaultwidth
+ elseif trace_markwidth and wd~=0 and d.class=="mark" then
+ report_markwidth("mark %a with width %b found in %a",d.name or "<noname>",wd,basename)
+ end
+ if bb then
+ local ht=bb[4]
+ local dp=-bb[2]
+ if ht==0 or ht<0 then
+ else
+ d.height=ht
+ end
+ if dp==0 or dp<0 then
+ else
+ d.depth=dp
+ end
+ end
+ end
+ end
+ local function expandlookups(sequences)
+ if sequences then
+ for i=1,#sequences do
+ local sequence=sequences[i]
+ local steps=sequence.steps
+ if steps then
+ local nofsteps=sequence.nofsteps
+ local kind=sequence.type
+ local markclass=sequence.markclass
+ if markclass then
+ if not markclasses then
+ report_warning("missing markclasses")
+ sequence.markclass=false
+ else
+ sequence.markclass=markclasses[markclass]
+ end
+ end
+ for i=1,nofsteps do
+ local step=steps[i]
+ local baseclasses=step.baseclasses
+ if baseclasses then
+ local coverage=step.coverage
+ for k,v in next,coverage do
+ v[1]=baseclasses[v[1]]
+ end
+ elseif kind=="gpos_cursive" then
+ local coverage=step.coverage
+ for k,v in next,coverage do
+ v[1]=coverage
+ end
+ end
+ local rules=step.rules
+ if rules then
+ local rulehash={ n=0 }
+ local rulesize=0
+ local coverage={}
+ local lookuptype=sequence.type
+ local nofrules=#rules
+ step.coverage=coverage
+ for currentrule=1,nofrules do
+ local rule=rules[currentrule]
+ local current=rule.current
+ local before=rule.before
+ local after=rule.after
+ local replacements=rule.replacements or false
+ local sequence={}
+ local nofsequences=0
+ if before then
+ for n=1,#before do
+ nofsequences=nofsequences+1
+ sequence[nofsequences]=before[n]
+ end
+ end
+ local start=nofsequences+1
+ for n=1,#current do
+ nofsequences=nofsequences+1
+ sequence[nofsequences]=current[n]
+ end
+ local stop=nofsequences
+ if after then
+ for n=1,#after do
+ nofsequences=nofsequences+1
+ sequence[nofsequences]=after[n]
+ end
+ end
+ local lookups=rule.lookups or false
+ local subtype=nil
+ if lookups then
+ for i=1,#lookups do
+ local lookups=lookups[i]
+ if lookups then
+ for k,v in next,lookups do
+ local lookup=sublookups[v]
+ if lookup then
+ lookups[k]=lookup
+ if not subtype then
+ subtype=lookup.type
+ end
+ else
+ end
+ end
+ end
+ end
+ end
+ if sequence[1] then
+ sequence.n=#sequence
+ local ruledata={
+ currentrule,
+ lookuptype,
+ sequence,
+ start,
+ stop,
+ lookups,
+ replacements,
+ subtype,
+ }
+ rulesize=rulesize+1
+ rulehash[rulesize]=ruledata
+ rulehash.n=rulesize
+ if true then
+ for unic in next,sequence[start] do
+ local cu=coverage[unic]
+ if cu then
+ local n=#cu+1
+ cu[n]=ruledata
+ cu.n=n
+ else
+ coverage[unic]={ ruledata,n=1 }
+ end
+ end
+ else
+ for unic in next,sequence[start] do
+ local cu=coverage[unic]
+ if cu then
+ else
+ coverage[unic]=rulehash
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ checkmerge(sequence)
+ checkflags(sequence,resources)
+ checksteps(sequence)
+ end
+ end
+ end
+ end
+ expandlookups(sequences)
+ expandlookups(sublookups)
+end
+
+end -- closure
+
+do -- begin closure to overcome local limits and interference
+
if not modules then modules={} end modules ['font-ota']={
version=1.001,
comment="companion to font-ini.mkiv",
@@ -25963,6 +26114,7 @@ if not modules then modules={} end modules ['font-ota']={
license="see context related readme files"
}
local type=type
+local setmetatableindex=table.setmetatableindex
if not trackers then trackers={ register=function() end } end
local fonts,nodes,node=fonts,nodes,node
local allocate=utilities.storage.allocate
@@ -26176,7 +26328,7 @@ if not classifiers then
local f_mandiac,l_mandiac=characters.blockrange("mandiac")
local f_nko,l_nko=characters.blockrange("nko")
local f_ext_a,l_ext_a=characters.blockrange("arabicextendeda")
- classifiers=table.setmetatableindex(function(t,k)
+ classifiers=setmetatableindex(function(t,k)
if type(k)=="number" then
local c=chardata[k]
local v=false
@@ -26342,6 +26494,106 @@ end
methods.syrc=methods.arab
methods.mand=methods.arab
methods.nko=methods.arab
+do
+ local joining=setmetatableindex(function(t,k)
+ if type(k)=="number" then
+ local c=chardata[k]
+ local v=false
+ if c then
+ local mongolian=c.mongolian
+ v=mongolian
+ end
+ t[k]=v
+ return v
+ end
+ end)
+ function methods.mong(head,font,attr)
+ local first,last
+ local current=head
+ local done=false
+ local prevjoin=nil
+ local prestate=nil
+ current=tonut(current)
+ local function wrapup()
+ if last then
+ if last~=first then
+ local s=getstate(last)
+ if s==s_medi then
+ setstate(last,s_fina)
+ elseif s==s_init then
+ setstate(last,s_isol)
+ end
+ end
+ last=nil
+ first=nil
+ prevjoin=nil
+ prestate=nil
+ end
+ end
+ while current do
+ local char,id=ischar(current,font)
+ if char and not getstate(current) then
+ local currjoin=joining[char]
+ done=true
+ if not last then
+ setstate(current,s_isol)
+ prevjoin=currjoin
+ first=current
+ last=current
+ prevstate=s_isol
+ elseif currjoin=="t" then
+ last=current
+ elseif prevjoin=="d" or prevjoin=="jc" or prevjoin=="l" then
+ if currjoin=="d" or prevjoin=="jc" or prevjoin=="r" then
+ local s=getstate(last)
+ if s==s_isol then
+ setstate(last,s_init)
+ elseif s==s_fina then
+ setstate(last,s_medi)
+ end
+ setstate(current,s_fina)
+ prevstate=s_fina
+ elseif prevjoin=="nj" or prevjoin=="l" then
+ local s=getstate(last)
+ if s==s_medi then
+ setstate(last,s_fina)
+ elseif s==s_init then
+ setstate(last,s_isol)
+ end
+ setstate(current,s_isol)
+ prevstate=s_isol
+ end
+ prevjoin=currjoin
+ last=current
+ elseif prevjoin=="nj" or prevjoin=="r" then
+ if s==s_medi then
+ setstate(last,s_fina)
+ elseif s==s_init then
+ setstate(last,s_isol)
+ end
+ setstate(current,s_isol)
+ prevjoin=currjoin
+ prevstate=s_isol
+ last=current
+ elseif last then
+ wrapup()
+ end
+ else
+ if last then
+ wrapup()
+ end
+ if id==math_code then
+ current=end_of_math(current)
+ end
+ end
+ current=getnext(current)
+ end
+ if last then
+ wrapup()
+ end
+ return head,done
+ end
+end
directives.register("otf.analyze.useunicodemarks",function(v)
analyzers.useunicodemarks=v
end)
@@ -26352,6 +26604,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['font-ots']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -26431,6 +26684,7 @@ local copy_only_glyphs=nuts.copy_only_glyphs
local count_components=nuts.count_components
local set_components=nuts.set_components
local get_components=nuts.get_components
+local flush_components=nuts.flush_components
local ischar=nuts.ischar
local usesfont=nuts.uses_font
local insert_node_after=nuts.insert_after
@@ -26453,7 +26707,9 @@ local glue_code=nodecodes.glue
local disc_code=nodecodes.disc
local math_code=nodecodes.math
local dir_code=nodecodes.dir
-local localpar_code=nodecodes.localpar
+local par_code=nodecodes.par
+local lefttoright_code=nodes.dirvalues.lefttoright
+local righttoleft_code=nodes.dirvalues.righttoleft
local discretionarydisc_code=disccodes.discretionary
local ligatureglyph_code=glyphcodes.ligature
local a_noligature=attributes.private("noligature")
@@ -26633,11 +26889,23 @@ local function markstoligature(head,start,stop,char)
setsubtype(base,ligatureglyph_code)
set_components(base,start)
setlink(prev,base,next)
+ flush_components(start)
return head,base
end
end
+local no_left_ligature_code=1
+local no_right_ligature_code=2
+local no_left_kern_code=4
+local no_right_kern_code=8
+local has_glyph_option=node.direct.has_glyph_option or function(n,c)
+ if c==no_left_ligature_code or c==no_right_ligature_code then
+ return getattr(n,a_noligature)==1
+ else
+ return false
+ end
+end
local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfound,hasmarks)
- if getattr(start,a_noligature)==1 then
+ if has_glyph_option(start,no_right_ligature_code) then
return head,start
end
if start==stop and getchar(start)==char then
@@ -26674,13 +26942,13 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
elseif not deletemarks then
setligaindex(start,baseindex+getligaindex(start,componentindex))
if trace_marks then
- logwarning("%s: keep mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ logwarning("%s: keep ligature mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
end
local n=copy_node(start)
copyinjection(n,start)
head,current=insert_node_after(head,current,n)
elseif trace_marks then
- logwarning("%s: delete mark %s",pref(dataset,sequence),gref(char))
+ logwarning("%s: delete ligature mark %s",pref(dataset,sequence),gref(char))
end
start=getnext(start)
end
@@ -26691,7 +26959,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
if marks[char] then
setligaindex(start,baseindex+getligaindex(start,componentindex))
if trace_marks then
- logwarning("%s: set mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
+ logwarning("%s: set ligature mark %s, gets index %s",pref(dataset,sequence),gref(char),getligaindex(start))
end
start=getnext(start)
else
@@ -26701,6 +26969,7 @@ local function toligature(head,start,stop,char,dataset,sequence,skiphash,discfou
break
end
end
+ flush_components(components)
else
local discprev,discnext=getboth(discfound)
if discprev and discnext then
@@ -26987,78 +27256,86 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip
return head,start,false,false
end
function handlers.gpos_single(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- local startchar=getchar(start)
- local format=step.format
- if format=="single" or type(kerns)=="table" then
- local dx,dy,w,h=setposition(0,start,factor,rlmode,kerns,injection)
- if trace_kerns then
- logprocess("%s: shifting single %s by %s xy (%p,%p) and wh (%p,%p)",pref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
- end
+ if has_glyph_option(start,no_right_kern_code) then
+ return head,start,false
else
- local k=(format=="move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
- if trace_kerns then
- logprocess("%s: shifting single %s by %s %p",pref(dataset,sequence),gref(startchar),format,k)
+ local startchar=getchar(start)
+ local format=step.format
+ if format=="single" or type(kerns)=="table" then
+ local dx,dy,w,h=setposition(0,start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s xy (%p,%p) and wh (%p,%p)",pref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
+ end
+ else
+ local k=(format=="move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s %p",pref(dataset,sequence),gref(startchar),format,k)
+ end
end
+ return head,start,true
end
- return head,start,true
end
function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,skiphash,step,injection)
- local snext=getnext(start)
- if not snext then
+ if has_glyph_option(start,no_right_kern_code) then
return head,start,false
else
- local prev=start
- while snext do
- local nextchar=ischar(snext,currentfont)
- if nextchar then
- if skiphash and skiphash[nextchar] then
- prev=snext
- snext=getnext(snext)
- else
- local krn=kerns[nextchar]
- if not krn then
- break
- end
- local format=step.format
- if format=="pair" then
- local a=krn[1]
- local b=krn[2]
- if a==true then
- elseif a then
- local x,y,w,h=setposition(1,start,factor,rlmode,a,injection)
- if trace_kerns then
- local startchar=getchar(start)
- logprocess("%s: shifting first of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
- end
+ local snext=getnext(start)
+ if not snext then
+ return head,start,false
+ else
+ local prev=start
+ while snext do
+ local nextchar=ischar(snext,currentfont)
+ if nextchar then
+ if skiphash and skiphash[nextchar] then
+ prev=snext
+ snext=getnext(snext)
+ else
+ local krn=kerns[nextchar]
+ if not krn then
+ break
end
- if b==true then
- start=snext
- elseif b then
- local x,y,w,h=setposition(2,snext,factor,rlmode,b,injection)
+ local format=step.format
+ if format=="pair" then
+ local a=krn[1]
+ local b=krn[2]
+ if a==true then
+ elseif a then
+ local x,y,w,h=setposition(1,start,factor,rlmode,a,injection)
+ if trace_kerns then
+ local startchar=getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ end
+ if b==true then
+ start=snext
+ elseif b then
+ local x,y,w,h=setposition(2,snext,factor,rlmode,b,injection)
+ if trace_kerns then
+ local startchar=getchar(start)
+ logprocess("%s: shifting second of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ end
+ start=snext
+ elseif forcepairadvance then
+ start=snext
+ end
+ return head,start,true
+ elseif krn~=0 then
+ local k=(format=="move" and setmove or setkern)(snext,factor,rlmode,krn,injection)
if trace_kerns then
- local startchar=getchar(start)
- logprocess("%s: shifting second of pair %s and %s by xy (%p,%p) and wh (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
+ logprocess("%s: inserting %s %p between %s and %s as %s",pref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar),injection or "injections")
end
- start=snext
- elseif forcepairadvance then
- start=snext
- end
- return head,start,true
- elseif krn~=0 then
- local k=(format=="move" and setmove or setkern)(snext,factor,rlmode,krn,injection)
- if trace_kerns then
- logprocess("%s: inserting %s %p between %s and %s as %s",pref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar),injection or "injections")
+ return head,start,true
+ else
+ break
end
- return head,start,true
- else
- break
end
+ else
+ break
end
- else
- break
end
+ return head,start,false
end
- return head,start,false
end
end
function handlers.gpos_mark2base(head,start,dataset,sequence,markanchors,rlmode,skiphash)
@@ -27488,89 +27765,93 @@ function chainprocs.gsub_ligature(head,start,stop,dataset,sequence,currentlookup
return head,start,false,0,false
end
function chainprocs.gpos_single(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
- local mapping=currentlookup.mapping
- if mapping==nil then
- mapping=getmapping(dataset,sequence,currentlookup)
- end
- if mapping then
- local startchar=getchar(start)
- local kerns=mapping[startchar]
- if kerns then
- local format=currentlookup.format
- if format=="single" then
- local dx,dy,w,h=setposition(0,start,factor,rlmode,kerns)
- if trace_kerns then
- logprocess("%s: shifting single %s by %s (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
- end
- else
- local k=(format=="move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
- if trace_kerns then
- logprocess("%s: shifting single %s by %s %p",cref(dataset,sequence),gref(startchar),format,k)
+ if not has_glyph_option(start,no_right_kern_code) then
+ local mapping=currentlookup.mapping
+ if mapping==nil then
+ mapping=getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local startchar=getchar(start)
+ local kerns=mapping[startchar]
+ if kerns then
+ local format=currentlookup.format
+ if format=="single" then
+ local dx,dy,w,h=setposition(0,start,factor,rlmode,kerns)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),format,dx,dy,w,h)
+ end
+ else
+ local k=(format=="move" and setmove or setkern)(start,factor,rlmode,kerns,injection)
+ if trace_kerns then
+ logprocess("%s: shifting single %s by %s %p",cref(dataset,sequence),gref(startchar),format,k)
+ end
end
+ return head,start,true
end
- return head,start,true
end
end
return head,start,false
end
-function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
- local mapping=currentlookup.mapping
- if mapping==nil then
- mapping=getmapping(dataset,sequence,currentlookup)
- end
- if mapping then
- local snext=getnext(start)
- if snext then
- local startchar=getchar(start)
- local kerns=mapping[startchar]
- if kerns then
- local prev=start
- while snext do
- local nextchar=ischar(snext,currentfont)
- if not nextchar then
- break
- end
- if skiphash and skiphash[nextchar] then
- prev=snext
- snext=getnext(snext)
- else
- local krn=kerns[nextchar]
- if not krn then
+function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash,chainindex)
+ if not has_glyph_option(start,no_right_kern_code) then
+ local mapping=currentlookup.mapping
+ if mapping==nil then
+ mapping=getmapping(dataset,sequence,currentlookup)
+ end
+ if mapping then
+ local snext=getnext(start)
+ if snext then
+ local startchar=getchar(start)
+ local kerns=mapping[startchar]
+ if kerns then
+ local prev=start
+ while snext do
+ local nextchar=ischar(snext,currentfont)
+ if not nextchar then
break
end
- local format=currentlookup.format
- if format=="pair" then
- local a=krn[1]
- local b=krn[2]
- if a==true then
- elseif a then
- local x,y,w,h=setposition(1,start,factor,rlmode,a,"injections")
- if trace_kerns then
- local startchar=getchar(start)
- logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
- end
+ if skiphash and skiphash[nextchar] then
+ prev=snext
+ snext=getnext(snext)
+ else
+ local krn=kerns[nextchar]
+ if not krn then
+ break
end
- if b==true then
- start=snext
- elseif b then
- local x,y,w,h=setposition(2,snext,factor,rlmode,b,"injections")
+ local format=currentlookup.format
+ if format=="pair" then
+ local a=krn[1]
+ local b=krn[2]
+ if a==true then
+ elseif a then
+ local x,y,w,h=setposition(1,start,factor,rlmode,a,"injections")
+ if trace_kerns then
+ local startchar=getchar(start)
+ logprocess("%s: shifting first of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ end
+ if b==true then
+ start=snext
+ elseif b then
+ local x,y,w,h=setposition(2,snext,factor,rlmode,b,"injections")
+ if trace_kerns then
+ local startchar=getchar(start)
+ logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ end
+ start=snext
+ elseif forcepairadvance then
+ start=snext
+ end
+ return head,start,true
+ elseif krn~=0 then
+ local k=(format=="move" and setmove or setkern)(snext,factor,rlmode,krn)
if trace_kerns then
- local startchar=getchar(start)
- logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
+ logprocess("%s: inserting %s %p between %s and %s",cref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar))
end
- start=snext
- elseif forcepairadvance then
- start=snext
- end
- return head,start,true
- elseif krn~=0 then
- local k=(format=="move" and setmove or setkern)(snext,factor,rlmode,krn)
- if trace_kerns then
- logprocess("%s: inserting %s %p between %s and %s",cref(dataset,sequence),format,k,gref(getchar(prev)),gref(nextchar))
+ return head,start,true
+ else
+ break
end
- return head,start,true
- else
- break
end
end
end
@@ -27957,6 +28238,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
local sweepnode=sweepnode
local sweeptype=sweeptype
local sweepoverflow=false
+ local checkdisc=getprev(head)
local keepdisc=not sweepnode
local lookaheaddisc=nil
local backtrackdisc=nil
@@ -28080,7 +28362,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
local current=prev
local i=f
local t=sweeptype=="pre" or sweeptype=="replace"
- if not current and t and current==checkdisk then
+ if not current and t and current==checkdisc then
current=getprev(sweepnode)
end
while current and i>1 do
@@ -28108,7 +28390,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
end
end
current=getprev(current)
- if t and current==checkdisk then
+ if t and current==checkdisc then
current=getprev(sweepnode)
end
end
@@ -28293,6 +28575,9 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
local l=ck[5]
local current=start
local last=start
+ if s==1 then
+ goto next
+ end
if l>f then
local discfound
local n=f+1
@@ -28358,6 +28643,9 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
break
end
end
+ if n<=l then
+ notmatchpre[last]=true
+ end
else
notmatchpre[last]=true
end
@@ -29000,6 +29288,7 @@ local nesting=0
local function c_run_single(head,font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
local done=false
local sweep=sweephead[head]
+ local start
if sweep then
start=sweep
sweephead[head]=false
@@ -29144,6 +29433,7 @@ end
local function c_run_multiple(head,font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
local done=false
local sweep=sweephead[head]
+ local start
if sweep then
start=sweep
sweephead[head]=false
@@ -29301,8 +29591,6 @@ local function k_run_multiple(sub,injection,last,font,attr,steps,nofsteps,datase
end
local txtdirstate,pardirstate do
local getdirection=nuts.getdirection
- local lefttoright=0
- local righttoleft=1
txtdirstate=function(start,stack,top,rlparmode)
local dir,pop=getdirection(start)
if pop then
@@ -29310,19 +29598,19 @@ local txtdirstate,pardirstate do
return 0,rlparmode
else
top=top-1
- if stack[top]==righttoleft then
+ if stack[top]==righttoleft_code then
return top,-1
else
return top,1
end
end
- elseif dir==lefttoright then
+ elseif dir==lefttoright_code then
top=top+1
- stack[top]=lefttoright
+ stack[top]=lefttoright_code
return top,1
- elseif dir==righttoleft then
+ elseif dir==righttoleft_code then
top=top+1
- stack[top]=righttoleft
+ stack[top]=righttoleft_code
return top,-1
else
return top,rlparmode
@@ -29330,13 +29618,9 @@ local txtdirstate,pardirstate do
end
pardirstate=function(start)
local dir=getdirection(start)
- if dir==lefttoright then
- return 1,1
- elseif dir==righttoleft then
- return -1,-1
- elseif dir=="TLT" then
+ if dir==lefttoright_code then
return 1,1
- elseif dir=="TRT" then
+ elseif dir==righttoleft_code then
return -1,-1
else
return 0,0
@@ -29389,9 +29673,9 @@ do
checkstep(head)
end
local initialrl=0
- if getid(head)==localpar_code and start_of_par(head) then
+ if getid(head)==par_code and start_of_par(head) then
initialrl=pardirstate(head)
- elseif direction==1 or direction=="TRT" then
+ elseif direction==righttoleft_code then
initialrl=-1
end
local datasets=otfdataset(tfmdata,font,attr)
@@ -29615,7 +29899,7 @@ do
local done=false
local dirstack={ nil }
local start=head
- local initialrl=(direction==1 or direction=="TRT") and -1 or 0
+ local initialrl=(direction==righttoleft_code) and -1 or 0
local rlmode=initialrl
local rlparmode=initialrl
local topstack=0
@@ -29940,6 +30224,765 @@ end -- closure
do -- begin closure to overcome local limits and interference
+if not modules then modules={} end modules ['font-otc']={
+ 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 insert,sortedkeys,sortedhash,tohash=table.insert,table.sortedkeys,table.sortedhash,table.tohash
+local type,next,tonumber=type,next,tonumber
+local lpegmatch=lpeg.match
+local utfbyte,utflen=utf.byte,utf.len
+local sortedhash=table.sortedhash
+local trace_loading=false trackers.register("otf.loading",function(v) trace_loading=v end)
+local report_otf=logs.reporter("fonts","otf loading")
+local fonts=fonts
+local otf=fonts.handlers.otf
+local registerotffeature=otf.features.register
+local setmetatableindex=table.setmetatableindex
+local fonthelpers=fonts.helpers
+local checkmerge=fonthelpers.checkmerge
+local checkflags=fonthelpers.checkflags
+local checksteps=fonthelpers.checksteps
+local normalized={
+ substitution="substitution",
+ single="substitution",
+ ligature="ligature",
+ alternate="alternate",
+ multiple="multiple",
+ kern="kern",
+ pair="pair",
+ single="single",
+ chainsubstitution="chainsubstitution",
+ chainposition="chainposition",
+}
+local types={
+ substitution="gsub_single",
+ ligature="gsub_ligature",
+ alternate="gsub_alternate",
+ multiple="gsub_multiple",
+ kern="gpos_pair",
+ pair="gpos_pair",
+ single="gpos_single",
+ chainsubstitution="gsub_contextchain",
+ chainposition="gpos_contextchain",
+}
+local names={
+ gsub_single="gsub",
+ gsub_multiple="gsub",
+ gsub_alternate="gsub",
+ gsub_ligature="gsub",
+ gsub_context="gsub",
+ gsub_contextchain="gsub",
+ gsub_reversecontextchain="gsub",
+ gpos_single="gpos",
+ gpos_pair="gpos",
+ gpos_cursive="gpos",
+ gpos_mark2base="gpos",
+ gpos_mark2ligature="gpos",
+ gpos_mark2mark="gpos",
+ gpos_context="gpos",
+ gpos_contextchain="gpos",
+}
+setmetatableindex(types,function(t,k) t[k]=k return k end)
+local everywhere={ ["*"]={ ["*"]=true } }
+local noflags={ false,false,false,false }
+local function getrange(sequences,category)
+ local count=#sequences
+ local first=nil
+ local last=nil
+ for i=1,count do
+ local t=sequences[i].type
+ if t and names[t]==category then
+ if not first then
+ first=i
+ end
+ last=i
+ end
+ end
+ return first or 1,last or count
+end
+local function validspecification(specification,name)
+ local dataset=specification.dataset
+ if dataset then
+ elseif specification[1] then
+ dataset=specification
+ specification={ dataset=dataset }
+ else
+ dataset={ { data=specification.data } }
+ specification.data=nil
+ specification.dataset=dataset
+ end
+ local first=dataset[1]
+ if first then
+ first=first.data
+ end
+ if not first then
+ report_otf("invalid feature specification, no dataset")
+ return
+ end
+ if type(name)~="string" then
+ name=specification.name or first.name
+ end
+ if type(name)~="string" then
+ report_otf("invalid feature specification, no name")
+ return
+ end
+ local n=#dataset
+ if n>0 then
+ for i=1,n do
+ setmetatableindex(dataset[i],specification)
+ end
+ return specification,name
+ end
+end
+local function addfeature(data,feature,specifications)
+ if not specifications then
+ report_otf("missing specification")
+ return
+ end
+ local descriptions=data.descriptions
+ local resources=data.resources
+ local features=resources.features
+ local sequences=resources.sequences
+ if not features or not sequences then
+ report_otf("missing specification")
+ return
+ end
+ local alreadydone=resources.alreadydone
+ if not alreadydone then
+ alreadydone={}
+ resources.alreadydone=alreadydone
+ end
+ if alreadydone[specifications] then
+ return
+ else
+ alreadydone[specifications]=true
+ end
+ local fontfeatures=resources.features or everywhere
+ local unicodes=resources.unicodes
+ local splitter=lpeg.splitter(" ",unicodes)
+ local done=0
+ local skip=0
+ local aglunicodes=false
+ local privateslot=fonthelpers.privateslot
+ local specifications=validspecification(specifications,feature)
+ if not specifications then
+ return
+ end
+ local p=lpeg.P("P")*(lpeg.patterns.hexdigit^1/function(s) return tonumber(s,16) end)*lpeg.P(-1)
+ local function tounicode(code)
+ if not code then
+ return
+ end
+ if type(code)=="number" then
+ return code
+ end
+ local u=unicodes[code]
+ if u then
+ return u
+ end
+ if utflen(code)==1 then
+ u=utfbyte(code)
+ if u then
+ return u
+ end
+ end
+ if privateslot then
+ u=privateslot(code)
+ if u then
+ return u
+ end
+ end
+ local u=lpegmatch(p,code)
+ if u then
+ return u
+ end
+ if not aglunicodes then
+ aglunicodes=fonts.encodings.agl.unicodes
+ end
+ local u=aglunicodes[code]
+ if u then
+ return u
+ end
+ end
+ local coverup=otf.coverup
+ local coveractions=coverup.actions
+ local stepkey=coverup.stepkey
+ local register=coverup.register
+ local function prepare_substitution(list,featuretype,nocheck)
+ local coverage={}
+ local cover=coveractions[featuretype]
+ for code,replacement in next,list do
+ local unicode=tounicode(code)
+ local description=descriptions[unicode]
+ if not nocheck and not description then
+ skip=skip+1
+ else
+ if type(replacement)=="table" then
+ replacement=replacement[1]
+ end
+ replacement=tounicode(replacement)
+ if replacement and (nocheck or descriptions[replacement]) then
+ cover(coverage,unicode,replacement)
+ done=done+1
+ else
+ skip=skip+1
+ end
+ end
+ end
+ return coverage
+ end
+ local function prepare_alternate(list,featuretype,nocheck)
+ local coverage={}
+ local cover=coveractions[featuretype]
+ for code,replacement in next,list do
+ local unicode=tounicode(code)
+ local description=descriptions[unicode]
+ if not nocheck and not description then
+ skip=skip+1
+ elseif type(replacement)=="table" then
+ local r={}
+ for i=1,#replacement do
+ local u=tounicode(replacement[i])
+ r[i]=(nocheck or descriptions[u]) and u or unicode
+ end
+ cover(coverage,unicode,r)
+ done=done+1
+ else
+ local u=tounicode(replacement)
+ if u then
+ cover(coverage,unicode,{ u })
+ done=done+1
+ else
+ skip=skip+1
+ end
+ end
+ end
+ return coverage
+ end
+ local function prepare_multiple(list,featuretype,nocheck)
+ local coverage={}
+ local cover=coveractions[featuretype]
+ for code,replacement in next,list do
+ local unicode=tounicode(code)
+ local description=descriptions[unicode]
+ if not nocheck and not description then
+ skip=skip+1
+ elseif type(replacement)=="table" then
+ local r={}
+ local n=0
+ for i=1,#replacement do
+ local u=tounicode(replacement[i])
+ if nocheck or descriptions[u] then
+ n=n+1
+ r[n]=u
+ end
+ end
+ if n>0 then
+ cover(coverage,unicode,r)
+ done=done+1
+ else
+ skip=skip+1
+ end
+ else
+ local u=tounicode(replacement)
+ if u then
+ cover(coverage,unicode,{ u })
+ done=done+1
+ else
+ skip=skip+1
+ end
+ end
+ end
+ return coverage
+ end
+ local function prepare_ligature(list,featuretype,nocheck)
+ local coverage={}
+ local cover=coveractions[featuretype]
+ for code,ligature in next,list do
+ local unicode=tounicode(code)
+ local description=descriptions[unicode]
+ if not nocheck and not description then
+ skip=skip+1
+ else
+ if type(ligature)=="string" then
+ ligature={ lpegmatch(splitter,ligature) }
+ end
+ local present=true
+ for i=1,#ligature do
+ local l=ligature[i]
+ local u=tounicode(l)
+ if nocheck or descriptions[u] then
+ ligature[i]=u
+ else
+ present=false
+ break
+ end
+ end
+ if present then
+ cover(coverage,unicode,ligature)
+ done=done+1
+ else
+ skip=skip+1
+ end
+ end
+ end
+ return coverage
+ end
+ local function resetspacekerns()
+ data.properties.hasspacekerns=true
+ data.resources .spacekerns=nil
+ end
+ local function prepare_kern(list,featuretype)
+ local coverage={}
+ local cover=coveractions[featuretype]
+ local isspace=false
+ for code,replacement in next,list do
+ local unicode=tounicode(code)
+ local description=descriptions[unicode]
+ if description and type(replacement)=="table" then
+ local r={}
+ for k,v in next,replacement do
+ local u=tounicode(k)
+ if u then
+ r[u]=v
+ if u==32 then
+ isspace=true
+ end
+ end
+ end
+ if next(r) then
+ cover(coverage,unicode,r)
+ done=done+1
+ if unicode==32 then
+ isspace=true
+ end
+ else
+ skip=skip+1
+ end
+ else
+ skip=skip+1
+ end
+ end
+ if isspace then
+ resetspacekerns()
+ end
+ return coverage
+ end
+ local function prepare_pair(list,featuretype)
+ local coverage={}
+ local cover=coveractions[featuretype]
+ if cover then
+ for code,replacement in next,list do
+ local unicode=tounicode(code)
+ local description=descriptions[unicode]
+ if description and type(replacement)=="table" then
+ local r={}
+ for k,v in next,replacement do
+ local u=tounicode(k)
+ if u then
+ r[u]=v
+ if u==32 then
+ isspace=true
+ end
+ end
+ end
+ if next(r) then
+ cover(coverage,unicode,r)
+ done=done+1
+ if unicode==32 then
+ isspace=true
+ end
+ else
+ skip=skip+1
+ end
+ else
+ skip=skip+1
+ end
+ end
+ if isspace then
+ resetspacekerns()
+ end
+ else
+ report_otf("unknown cover type %a",featuretype)
+ end
+ return coverage
+ end
+ local prepare_single=prepare_pair
+ local function prepare_chain(list,featuretype,sublookups)
+ local rules=list.rules
+ local coverage={}
+ if rules then
+ local rulehash={}
+ local rulesize=0
+ local lookuptype=types[featuretype]
+ for nofrules=1,#rules do
+ local rule=rules[nofrules]
+ local current=rule.current
+ local before=rule.before
+ local after=rule.after
+ local replacements=rule.replacements or false
+ local sequence={}
+ local nofsequences=0
+ if before then
+ for n=1,#before do
+ nofsequences=nofsequences+1
+ sequence[nofsequences]=before[n]
+ end
+ end
+ local start=nofsequences+1
+ for n=1,#current do
+ nofsequences=nofsequences+1
+ sequence[nofsequences]=current[n]
+ end
+ local stop=nofsequences
+ if after then
+ for n=1,#after do
+ nofsequences=nofsequences+1
+ sequence[nofsequences]=after[n]
+ end
+ end
+ local lookups=rule.lookups or false
+ local subtype=nil
+ if lookups and sublookups then
+ for k,v in sortedhash(lookups) do
+ local t=type(v)
+ if t=="table" then
+ for i=1,#v do
+ local vi=v[i]
+ if type(vi)~="table" then
+ v[i]={ vi }
+ end
+ end
+ elseif t=="number" then
+ local lookup=sublookups[v]
+ if lookup then
+ lookups[k]={ lookup }
+ if not subtype then
+ subtype=lookup.type
+ end
+ elseif v==0 then
+ lookups[k]={ { type="gsub_remove" } }
+ else
+ lookups[k]=false
+ end
+ else
+ lookups[k]=false
+ end
+ end
+ end
+ if nofsequences>0 then
+ local hashed={}
+ for i=1,nofsequences do
+ local t={}
+ local s=sequence[i]
+ for i=1,#s do
+ local u=tounicode(s[i])
+ if u then
+ t[u]=true
+ end
+ end
+ hashed[i]=t
+ end
+ sequence=hashed
+ rulesize=rulesize+1
+ rulehash[rulesize]={
+ nofrules,
+ lookuptype,
+ sequence,
+ start,
+ stop,
+ lookups,
+ replacements,
+ subtype,
+ }
+ for unic in sortedhash(sequence[start]) do
+ local cu=coverage[unic]
+ if not cu then
+ coverage[unic]=rulehash
+ end
+ end
+ sequence.n=nofsequences
+ end
+ end
+ rulehash.n=rulesize
+ end
+ return coverage
+ end
+ local dataset=specifications.dataset
+ local function report(name,category,position,first,last,sequences)
+ report_otf("injecting name %a of category %a at position %i in [%i,%i] of [%i,%i]",
+ name,category,position,first,last,1,#sequences)
+ end
+ local function inject(specification,sequences,sequence,first,last,category,name)
+ local position=specification.position or false
+ if not position then
+ position=specification.prepend
+ if position==true then
+ if trace_loading then
+ report(name,category,first,first,last,sequences)
+ end
+ insert(sequences,first,sequence)
+ return
+ end
+ end
+ if not position then
+ position=specification.append
+ if position==true then
+ if trace_loading then
+ report(name,category,last+1,first,last,sequences)
+ end
+ insert(sequences,last+1,sequence)
+ return
+ end
+ end
+ local kind=type(position)
+ if kind=="string" then
+ local index=false
+ for i=first,last do
+ local s=sequences[i]
+ local f=s.features
+ if f then
+ for k in sortedhash(f) do
+ if k==position then
+ index=i
+ break
+ end
+ end
+ if index then
+ break
+ end
+ end
+ end
+ if index then
+ position=index
+ else
+ position=last+1
+ end
+ elseif kind=="number" then
+ if position<0 then
+ position=last-position+1
+ end
+ if position>last then
+ position=last+1
+ elseif position<first then
+ position=first
+ end
+ else
+ position=last+1
+ end
+ if trace_loading then
+ report(name,category,position,first,last,sequences)
+ end
+ insert(sequences,position,sequence)
+ end
+ for s=1,#dataset do
+ local specification=dataset[s]
+ local valid=specification.valid
+ local feature=specification.name or feature
+ if not feature or feature=="" then
+ report_otf("no valid name given for extra feature")
+ elseif not valid or valid(data,specification,feature) then
+ local initialize=specification.initialize
+ if initialize then
+ specification.initialize=initialize(specification,data) and initialize or nil
+ end
+ local askedfeatures=specification.features or everywhere
+ local askedsteps=specification.steps or specification.subtables or { specification.data } or {}
+ local featuretype=normalized[specification.type or "substitution"] or "substitution"
+ local featureflags=specification.flags or noflags
+ local nocheck=specification.nocheck
+ local featureorder=specification.order or { feature }
+ local featurechain=(featuretype=="chainsubstitution" or featuretype=="chainposition") and 1 or 0
+ local nofsteps=0
+ local steps={}
+ local sublookups=specification.lookups
+ local category=nil
+ checkflags(specification,resources)
+ if sublookups then
+ local s={}
+ for i=1,#sublookups do
+ local specification=sublookups[i]
+ local askedsteps=specification.steps or specification.subtables or { specification.data } or {}
+ local featuretype=normalized[specification.type or "substitution"] or "substitution"
+ local featureflags=specification.flags or noflags
+ local nofsteps=0
+ local steps={}
+ for i=1,#askedsteps do
+ local list=askedsteps[i]
+ local coverage=nil
+ local format=nil
+ if featuretype=="substitution" then
+ coverage=prepare_substitution(list,featuretype,nocheck)
+ elseif featuretype=="ligature" then
+ coverage=prepare_ligature(list,featuretype,nocheck)
+ elseif featuretype=="alternate" then
+ coverage=prepare_alternate(list,featuretype,nocheck)
+ elseif featuretype=="multiple" then
+ coverage=prepare_multiple(list,featuretype,nocheck)
+ elseif featuretype=="kern" or featuretype=="move" then
+ format=featuretype
+ coverage=prepare_kern(list,featuretype)
+ elseif featuretype=="pair" then
+ format="pair"
+ coverage=prepare_pair(list,featuretype)
+ elseif featuretype=="single" then
+ format="single"
+ coverage=prepare_single(list,featuretype)
+ end
+ if coverage and next(coverage) then
+ nofsteps=nofsteps+1
+ steps[nofsteps]=register(coverage,featuretype,format,feature,nofsteps,descriptions,resources)
+ end
+ end
+ checkmerge(specification)
+ checksteps(specification)
+ s[i]={
+ [stepkey]=steps,
+ nofsteps=nofsteps,
+ flags=featureflags,
+ type=types[featuretype],
+ }
+ end
+ sublookups=s
+ end
+ for i=1,#askedsteps do
+ local list=askedsteps[i]
+ local coverage=nil
+ local format=nil
+ if featuretype=="substitution" then
+ category="gsub"
+ coverage=prepare_substitution(list,featuretype,nocheck)
+ elseif featuretype=="ligature" then
+ category="gsub"
+ coverage=prepare_ligature(list,featuretype,nocheck)
+ elseif featuretype=="alternate" then
+ category="gsub"
+ coverage=prepare_alternate(list,featuretype,nocheck)
+ elseif featuretype=="multiple" then
+ category="gsub"
+ coverage=prepare_multiple(list,featuretype,nocheck)
+ elseif featuretype=="kern" or featuretype=="move" then
+ category="gpos"
+ format=featuretype
+ coverage=prepare_kern(list,featuretype)
+ elseif featuretype=="pair" then
+ category="gpos"
+ format="pair"
+ coverage=prepare_pair(list,featuretype)
+ elseif featuretype=="single" then
+ category="gpos"
+ format="single"
+ coverage=prepare_single(list,featuretype)
+ elseif featuretype=="chainsubstitution" then
+ category="gsub"
+ coverage=prepare_chain(list,featuretype,sublookups)
+ elseif featuretype=="chainposition" then
+ category="gpos"
+ coverage=prepare_chain(list,featuretype,sublookups)
+ else
+ report_otf("not registering feature %a, unknown category",feature)
+ return
+ end
+ if coverage and next(coverage) then
+ nofsteps=nofsteps+1
+ steps[nofsteps]=register(coverage,featuretype,format,feature,nofsteps,descriptions,resources)
+ end
+ end
+ if nofsteps>0 then
+ for k,v in next,askedfeatures do
+ if v[1] then
+ askedfeatures[k]=tohash(v)
+ end
+ end
+ if featureflags[1] then featureflags[1]="mark" end
+ if featureflags[2] then featureflags[2]="ligature" end
+ if featureflags[3] then featureflags[3]="base" end
+ local steptype=types[featuretype]
+ local sequence={
+ chain=featurechain,
+ features={ [feature]=askedfeatures },
+ flags=featureflags,
+ name=feature,
+ order=featureorder,
+ [stepkey]=steps,
+ nofsteps=nofsteps,
+ type=steptype,
+ }
+ checkflags(sequence,resources)
+ checkmerge(sequence)
+ checksteps(sequence)
+ local first,last=getrange(sequences,category)
+ inject(specification,sequences,sequence,first,last,category,feature)
+ local features=fontfeatures[category]
+ if not features then
+ features={}
+ fontfeatures[category]=features
+ end
+ local k=features[feature]
+ if not k then
+ k={}
+ features[feature]=k
+ end
+ for script,languages in next,askedfeatures do
+ local kk=k[script]
+ if not kk then
+ kk={}
+ k[script]=kk
+ end
+ for language,value in next,languages do
+ kk[language]=value
+ end
+ end
+ end
+ end
+ end
+ if trace_loading then
+ report_otf("registering feature %a, affected glyphs %a, skipped glyphs %a",feature,done,skip)
+ end
+end
+otf.enhancers.addfeature=addfeature
+local extrafeatures={}
+local knownfeatures={}
+function otf.addfeature(name,specification)
+ if type(name)=="table" then
+ specification=name
+ end
+ if type(specification)~="table" then
+ report_otf("invalid feature specification, no valid table")
+ return
+ end
+ specification,name=validspecification(specification,name)
+ if name and specification then
+ local slot=knownfeatures[name]
+ if not slot then
+ slot=#extrafeatures+1
+ knownfeatures[name]=slot
+ elseif specification.overload==false then
+ slot=#extrafeatures+1
+ knownfeatures[name]=slot
+ else
+ end
+ specification.name=name
+ extrafeatures[slot]=specification
+ end
+end
+local function enhance(data,filename,raw)
+ for slot=1,#extrafeatures do
+ local specification=extrafeatures[slot]
+ addfeature(data,specification.name,specification)
+ end
+end
+otf.enhancers.enhance=enhance
+otf.enhancers.register("check extra features",enhance)
+
+end -- closure
+
+do -- begin closure to overcome local limits and interference
+
if not modules then modules={} end modules ['font-osd']={
version=1.001,
comment="companion to font-ini.mkiv",
@@ -32377,9 +33420,6 @@ if not modules then modules={} end modules ['font-ocl']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
-if CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 then
- return
-end
local tostring,tonumber,next=tostring,tonumber,next
local round,max=math.round,math.round
local gsub,find=string.gsub,string.find
@@ -32447,7 +33487,7 @@ local function convert(t,k)
t[k]=v
return v
end
-local start={ "pdf","mode","font" }
+local mode={ "pdf","mode","font" }
local push={ "pdf","page","q" }
local pop={ "pdf","page","Q" }
local function initializeoverlay(tfmdata,kind,value)
@@ -32492,10 +33532,11 @@ local function initializeoverlay(tfmdata,kind,value)
local s=#colorlist
local goback=w~=0 and leftcommand[w] or nil
local t={
+ mode,
not u and actualb or { "pdf","page",(getactualtext(tounicode(u))) },
push,
}
- local n=2
+ local n=3
local l=nil
for i=1,s do
local entry=colorlist[i]
@@ -32615,20 +33656,15 @@ do
local loaddata=io.loaddata
local savedata=io.savedata
local remove=os.remove
- if context and xml.convert then
- local xmlconvert=xml.convert
- local xmlfirst=xml.first
- function otfsvg.filterglyph(entry,index)
- local svg=xmlconvert(entry.data)
- local root=svg and xmlfirst(svg,"/svg[@id='glyph"..index.."']")
- local data=root and tostring(root)
- return data
- end
- else
+if context then
+
+--removed
+
+else
function otfsvg.filterglyph(entry,index)
return entry.data
end
- end
+end
local runner=sandbox and sandbox.registerrunner {
name="otfsvg",
program="inkscape",
@@ -32641,6 +33677,14 @@ do
return io.popen("inkscape --export-area-drawing --shell > temp-otf-svg-shape.log","w")
end
end
+ local new=nil
+ local function inkscapeformat(suffix)
+ if new==nil then
+ new=os.resultof("inkscape --version") or ""
+ new=new=="" or not find(new,"Inkscape%s*0")
+ end
+ return new and "filename" or suffix
+ end
function otfsvg.topdf(svgshapes,tfmdata)
local pdfshapes={}
local inkscape=runner()
@@ -32649,7 +33693,7 @@ do
local nofshapes=#svgshapes
local f_svgfile=formatters["temp-otf-svg-shape-%i.svg"]
local f_pdffile=formatters["temp-otf-svg-shape-%i.pdf"]
- local f_convert=formatters["%s --export-pdf=%s\n"]
+ local f_convert=formatters["%s --export-%s=%s\n"]
local filterglyph=otfsvg.filterglyph
local nofdone=0
local processed={}
@@ -32663,7 +33707,7 @@ do
local svgfile=f_svgfile(index)
local pdffile=f_pdffile(index)
savedata(svgfile,data)
- inkscape:write(f_convert(svgfile,pdffile))
+ inkscape:write(f_convert(svgfile,inkscapeformat("pdf"),pdffile))
processed[index]=true
nofdone=nofdone+1
if nofdone%25==0 then
@@ -32852,767 +33896,9 @@ end -- closure
do -- begin closure to overcome local limits and interference
-if not modules then modules={} end modules ['font-otc']={
- 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 insert,sortedkeys,sortedhash,tohash=table.insert,table.sortedkeys,table.sortedhash,table.tohash
-local type,next,tonumber=type,next,tonumber
-local lpegmatch=lpeg.match
-local utfbyte,utflen=utf.byte,utf.len
-local sortedhash=table.sortedhash
-local trace_loading=false trackers.register("otf.loading",function(v) trace_loading=v end)
-local report_otf=logs.reporter("fonts","otf loading")
-local fonts=fonts
-local otf=fonts.handlers.otf
-local registerotffeature=otf.features.register
-local setmetatableindex=table.setmetatableindex
-local fonthelpers=fonts.helpers
-local checkmerge=fonthelpers.checkmerge
-local checkflags=fonthelpers.checkflags
-local checksteps=fonthelpers.checksteps
-local normalized={
- substitution="substitution",
- single="substitution",
- ligature="ligature",
- alternate="alternate",
- multiple="multiple",
- kern="kern",
- pair="pair",
- single="single",
- chainsubstitution="chainsubstitution",
- chainposition="chainposition",
-}
-local types={
- substitution="gsub_single",
- ligature="gsub_ligature",
- alternate="gsub_alternate",
- multiple="gsub_multiple",
- kern="gpos_pair",
- pair="gpos_pair",
- single="gpos_single",
- chainsubstitution="gsub_contextchain",
- chainposition="gpos_contextchain",
-}
-local names={
- gsub_single="gsub",
- gsub_multiple="gsub",
- gsub_alternate="gsub",
- gsub_ligature="gsub",
- gsub_context="gsub",
- gsub_contextchain="gsub",
- gsub_reversecontextchain="gsub",
- gpos_single="gpos",
- gpos_pair="gpos",
- gpos_cursive="gpos",
- gpos_mark2base="gpos",
- gpos_mark2ligature="gpos",
- gpos_mark2mark="gpos",
- gpos_context="gpos",
- gpos_contextchain="gpos",
-}
-setmetatableindex(types,function(t,k) t[k]=k return k end)
-local everywhere={ ["*"]={ ["*"]=true } }
-local noflags={ false,false,false,false }
-local function getrange(sequences,category)
- local count=#sequences
- local first=nil
- local last=nil
- for i=1,count do
- local t=sequences[i].type
- if t and names[t]==category then
- if not first then
- first=i
- end
- last=i
- end
- end
- return first or 1,last or count
-end
-local function validspecification(specification,name)
- local dataset=specification.dataset
- if dataset then
- elseif specification[1] then
- dataset=specification
- specification={ dataset=dataset }
- else
- dataset={ { data=specification.data } }
- specification.data=nil
- specification.dataset=dataset
- end
- local first=dataset[1]
- if first then
- first=first.data
- end
- if not first then
- report_otf("invalid feature specification, no dataset")
- return
- end
- if type(name)~="string" then
- name=specification.name or first.name
- end
- if type(name)~="string" then
- report_otf("invalid feature specification, no name")
- return
- end
- local n=#dataset
- if n>0 then
- for i=1,n do
- setmetatableindex(dataset[i],specification)
- end
- return specification,name
- end
-end
-local function addfeature(data,feature,specifications)
- if not specifications then
- report_otf("missing specification")
- return
- end
- local descriptions=data.descriptions
- local resources=data.resources
- local features=resources.features
- local sequences=resources.sequences
- if not features or not sequences then
- report_otf("missing specification")
- return
- end
- local alreadydone=resources.alreadydone
- if not alreadydone then
- alreadydone={}
- resources.alreadydone=alreadydone
- end
- if alreadydone[specifications] then
- return
- else
- alreadydone[specifications]=true
- end
- local fontfeatures=resources.features or everywhere
- local unicodes=resources.unicodes
- local splitter=lpeg.splitter(" ",unicodes)
- local done=0
- local skip=0
- local aglunicodes=false
- local privateslot=fonthelpers.privateslot
- local specifications=validspecification(specifications,feature)
- if not specifications then
- return
- end
- local p=lpeg.P("P")*(lpeg.patterns.hexdigit^1/function(s) return tonumber(s,16) end)*lpeg.P(-1)
- local function tounicode(code)
- if not code then
- return
- end
- if type(code)=="number" then
- return code
- end
- local u=unicodes[code]
- if u then
- return u
- end
- if utflen(code)==1 then
- u=utfbyte(code)
- if u then
- return u
- end
- end
- if privateslot then
- u=privateslot(code)
- if u then
- return u
- end
- end
- local u=lpegmatch(p,code)
- if u then
- return u
- end
- if not aglunicodes then
- aglunicodes=fonts.encodings.agl.unicodes
- end
- local u=aglunicodes[code]
- if u then
- return u
- end
- end
- local coverup=otf.coverup
- local coveractions=coverup.actions
- local stepkey=coverup.stepkey
- local register=coverup.register
- local function prepare_substitution(list,featuretype,nocheck)
- local coverage={}
- local cover=coveractions[featuretype]
- for code,replacement in next,list do
- local unicode=tounicode(code)
- local description=descriptions[unicode]
- if not nocheck and not description then
- skip=skip+1
- else
- if type(replacement)=="table" then
- replacement=replacement[1]
- end
- replacement=tounicode(replacement)
- if replacement and (nocheck or descriptions[replacement]) then
- cover(coverage,unicode,replacement)
- done=done+1
- else
- skip=skip+1
- end
- end
- end
- return coverage
- end
- local function prepare_alternate(list,featuretype,nocheck)
- local coverage={}
- local cover=coveractions[featuretype]
- for code,replacement in next,list do
- local unicode=tounicode(code)
- local description=descriptions[unicode]
- if not nocheck and not description then
- skip=skip+1
- elseif type(replacement)=="table" then
- local r={}
- for i=1,#replacement do
- local u=tounicode(replacement[i])
- r[i]=(nocheck or descriptions[u]) and u or unicode
- end
- cover(coverage,unicode,r)
- done=done+1
- else
- local u=tounicode(replacement)
- if u then
- cover(coverage,unicode,{ u })
- done=done+1
- else
- skip=skip+1
- end
- end
- end
- return coverage
- end
- local function prepare_multiple(list,featuretype,nocheck)
- local coverage={}
- local cover=coveractions[featuretype]
- for code,replacement in next,list do
- local unicode=tounicode(code)
- local description=descriptions[unicode]
- if not nocheck and not description then
- skip=skip+1
- elseif type(replacement)=="table" then
- local r={}
- local n=0
- for i=1,#replacement do
- local u=tounicode(replacement[i])
- if nocheck or descriptions[u] then
- n=n+1
- r[n]=u
- end
- end
- if n>0 then
- cover(coverage,unicode,r)
- done=done+1
- else
- skip=skip+1
- end
- else
- local u=tounicode(replacement)
- if u then
- cover(coverage,unicode,{ u })
- done=done+1
- else
- skip=skip+1
- end
- end
- end
- return coverage
- end
- local function prepare_ligature(list,featuretype,nocheck)
- local coverage={}
- local cover=coveractions[featuretype]
- for code,ligature in next,list do
- local unicode=tounicode(code)
- local description=descriptions[unicode]
- if not nocheck and not description then
- skip=skip+1
- else
- if type(ligature)=="string" then
- ligature={ lpegmatch(splitter,ligature) }
- end
- local present=true
- for i=1,#ligature do
- local l=ligature[i]
- local u=tounicode(l)
- if nocheck or descriptions[u] then
- ligature[i]=u
- else
- present=false
- break
- end
- end
- if present then
- cover(coverage,unicode,ligature)
- done=done+1
- else
- skip=skip+1
- end
- end
- end
- return coverage
- end
- local function resetspacekerns()
- data.properties.hasspacekerns=true
- data.resources .spacekerns=nil
- end
- local function prepare_kern(list,featuretype)
- local coverage={}
- local cover=coveractions[featuretype]
- local isspace=false
- for code,replacement in next,list do
- local unicode=tounicode(code)
- local description=descriptions[unicode]
- if description and type(replacement)=="table" then
- local r={}
- for k,v in next,replacement do
- local u=tounicode(k)
- if u then
- r[u]=v
- if u==32 then
- isspace=true
- end
- end
- end
- if next(r) then
- cover(coverage,unicode,r)
- done=done+1
- if unicode==32 then
- isspace=true
- end
- else
- skip=skip+1
- end
- else
- skip=skip+1
- end
- end
- if isspace then
- resetspacekerns()
- end
- return coverage
- end
- local function prepare_pair(list,featuretype)
- local coverage={}
- local cover=coveractions[featuretype]
- if cover then
- for code,replacement in next,list do
- local unicode=tounicode(code)
- local description=descriptions[unicode]
- if description and type(replacement)=="table" then
- local r={}
- for k,v in next,replacement do
- local u=tounicode(k)
- if u then
- r[u]=v
- if u==32 then
- isspace=true
- end
- end
- end
- if next(r) then
- cover(coverage,unicode,r)
- done=done+1
- if unicode==32 then
- isspace=true
- end
- else
- skip=skip+1
- end
- else
- skip=skip+1
- end
- end
- if isspace then
- resetspacekerns()
- end
- else
- report_otf("unknown cover type %a",featuretype)
- end
- return coverage
- end
- local prepare_single=prepare_pair
- local function prepare_chain(list,featuretype,sublookups)
- local rules=list.rules
- local coverage={}
- if rules then
- local rulehash={}
- local rulesize=0
- local lookuptype=types[featuretype]
- for nofrules=1,#rules do
- local rule=rules[nofrules]
- local current=rule.current
- local before=rule.before
- local after=rule.after
- local replacements=rule.replacements or false
- local sequence={}
- local nofsequences=0
- if before then
- for n=1,#before do
- nofsequences=nofsequences+1
- sequence[nofsequences]=before[n]
- end
- end
- local start=nofsequences+1
- for n=1,#current do
- nofsequences=nofsequences+1
- sequence[nofsequences]=current[n]
- end
- local stop=nofsequences
- if after then
- for n=1,#after do
- nofsequences=nofsequences+1
- sequence[nofsequences]=after[n]
- end
- end
- local lookups=rule.lookups or false
- local subtype=nil
- if lookups and sublookups then
- for k,v in sortedhash(lookups) do
- local t=type(v)
- if t=="table" then
- for i=1,#v do
- local vi=v[i]
- if type(vi)~="table" then
- v[i]={ vi }
- end
- end
- elseif t=="number" then
- local lookup=sublookups[v]
- if lookup then
- lookups[k]={ lookup }
- if not subtype then
- subtype=lookup.type
- end
- elseif v==0 then
- lookups[k]={ { type="gsub_remove" } }
- else
- lookups[k]=false
- end
- else
- lookups[k]=false
- end
- end
- end
- if nofsequences>0 then
- local hashed={}
- for i=1,nofsequences do
- local t={}
- local s=sequence[i]
- for i=1,#s do
- local u=tounicode(s[i])
- if u then
- t[u]=true
- end
- end
- hashed[i]=t
- end
- sequence=hashed
- rulesize=rulesize+1
- rulehash[rulesize]={
- nofrules,
- lookuptype,
- sequence,
- start,
- stop,
- lookups,
- replacements,
- subtype,
- }
- for unic in sortedhash(sequence[start]) do
- local cu=coverage[unic]
- if not cu then
- coverage[unic]=rulehash
- end
- end
- sequence.n=nofsequences
- end
- end
- rulehash.n=rulesize
- end
- return coverage
- end
- local dataset=specifications.dataset
- local function report(name,category,position,first,last,sequences)
- report_otf("injecting name %a of category %a at position %i in [%i,%i] of [%i,%i]",
- name,category,position,first,last,1,#sequences)
- end
- local function inject(specification,sequences,sequence,first,last,category,name)
- local position=specification.position or false
- if not position then
- position=specification.prepend
- if position==true then
- if trace_loading then
- report(name,category,first,first,last,sequences)
- end
- insert(sequences,first,sequence)
- return
- end
- end
- if not position then
- position=specification.append
- if position==true then
- if trace_loading then
- report(name,category,last+1,first,last,sequences)
- end
- insert(sequences,last+1,sequence)
- return
- end
- end
- local kind=type(position)
- if kind=="string" then
- local index=false
- for i=first,last do
- local s=sequences[i]
- local f=s.features
- if f then
- for k in sortedhash(f) do
- if k==position then
- index=i
- break
- end
- end
- if index then
- break
- end
- end
- end
- if index then
- position=index
- else
- position=last+1
- end
- elseif kind=="number" then
- if position<0 then
- position=last-position+1
- end
- if position>last then
- position=last+1
- elseif position<first then
- position=first
- end
- else
- position=last+1
- end
- if trace_loading then
- report(name,category,position,first,last,sequences)
- end
- insert(sequences,position,sequence)
- end
- for s=1,#dataset do
- local specification=dataset[s]
- local valid=specification.valid
- local feature=specification.name or feature
- if not feature or feature=="" then
- report_otf("no valid name given for extra feature")
- elseif not valid or valid(data,specification,feature) then
- local initialize=specification.initialize
- if initialize then
- specification.initialize=initialize(specification,data) and initialize or nil
- end
- local askedfeatures=specification.features or everywhere
- local askedsteps=specification.steps or specification.subtables or { specification.data } or {}
- local featuretype=normalized[specification.type or "substitution"] or "substitution"
- local featureflags=specification.flags or noflags
- local nocheck=specification.nocheck
- local featureorder=specification.order or { feature }
- local featurechain=(featuretype=="chainsubstitution" or featuretype=="chainposition") and 1 or 0
- local nofsteps=0
- local steps={}
- local sublookups=specification.lookups
- local category=nil
- checkflags(specification,resources)
- if sublookups then
- local s={}
- for i=1,#sublookups do
- local specification=sublookups[i]
- local askedsteps=specification.steps or specification.subtables or { specification.data } or {}
- local featuretype=normalized[specification.type or "substitution"] or "substitution"
- local featureflags=specification.flags or noflags
- local nofsteps=0
- local steps={}
- for i=1,#askedsteps do
- local list=askedsteps[i]
- local coverage=nil
- local format=nil
- if featuretype=="substitution" then
- coverage=prepare_substitution(list,featuretype,nocheck)
- elseif featuretype=="ligature" then
- coverage=prepare_ligature(list,featuretype,nocheck)
- elseif featuretype=="alternate" then
- coverage=prepare_alternate(list,featuretype,nocheck)
- elseif featuretype=="multiple" then
- coverage=prepare_multiple(list,featuretype,nocheck)
- elseif featuretype=="kern" or featuretype=="move" then
- format=featuretype
- coverage=prepare_kern(list,featuretype)
- elseif featuretype=="pair" then
- format="pair"
- coverage=prepare_pair(list,featuretype)
- elseif featuretype=="single" then
- format="single"
- coverage=prepare_single(list,featuretype)
- end
- if coverage and next(coverage) then
- nofsteps=nofsteps+1
- steps[nofsteps]=register(coverage,featuretype,format,feature,nofsteps,descriptions,resources)
- end
- end
- checkmerge(specification)
- checksteps(specification)
- s[i]={
- [stepkey]=steps,
- nofsteps=nofsteps,
- flags=featureflags,
- type=types[featuretype],
- }
- end
- sublookups=s
- end
- for i=1,#askedsteps do
- local list=askedsteps[i]
- local coverage=nil
- local format=nil
- if featuretype=="substitution" then
- category="gsub"
- coverage=prepare_substitution(list,featuretype,nocheck)
- elseif featuretype=="ligature" then
- category="gsub"
- coverage=prepare_ligature(list,featuretype,nocheck)
- elseif featuretype=="alternate" then
- category="gsub"
- coverage=prepare_alternate(list,featuretype,nocheck)
- elseif featuretype=="multiple" then
- category="gsub"
- coverage=prepare_multiple(list,featuretype,nocheck)
- elseif featuretype=="kern" or featuretype=="move" then
- category="gpos"
- format=featuretype
- coverage=prepare_kern(list,featuretype)
- elseif featuretype=="pair" then
- category="gpos"
- format="pair"
- coverage=prepare_pair(list,featuretype)
- elseif featuretype=="single" then
- category="gpos"
- format="single"
- coverage=prepare_single(list,featuretype)
- elseif featuretype=="chainsubstitution" then
- category="gsub"
- coverage=prepare_chain(list,featuretype,sublookups)
- elseif featuretype=="chainposition" then
- category="gpos"
- coverage=prepare_chain(list,featuretype,sublookups)
- else
- report_otf("not registering feature %a, unknown category",feature)
- return
- end
- if coverage and next(coverage) then
- nofsteps=nofsteps+1
- steps[nofsteps]=register(coverage,featuretype,format,feature,nofsteps,descriptions,resources)
- end
- end
- if nofsteps>0 then
- for k,v in next,askedfeatures do
- if v[1] then
- askedfeatures[k]=tohash(v)
- end
- end
- if featureflags[1] then featureflags[1]="mark" end
- if featureflags[2] then featureflags[2]="ligature" end
- if featureflags[3] then featureflags[3]="base" end
- local steptype=types[featuretype]
- local sequence={
- chain=featurechain,
- features={ [feature]=askedfeatures },
- flags=featureflags,
- name=feature,
- order=featureorder,
- [stepkey]=steps,
- nofsteps=nofsteps,
- type=steptype,
- }
- checkflags(sequence,resources)
- checkmerge(sequence)
- checksteps(sequence)
- local first,last=getrange(sequences,category)
- inject(specification,sequences,sequence,first,last,category,feature)
- local features=fontfeatures[category]
- if not features then
- features={}
- fontfeatures[category]=features
- end
- local k=features[feature]
- if not k then
- k={}
- features[feature]=k
- end
- for script,languages in next,askedfeatures do
- local kk=k[script]
- if not kk then
- kk={}
- k[script]=kk
- end
- for language,value in next,languages do
- kk[language]=value
- end
- end
- end
- end
- end
- if trace_loading then
- report_otf("registering feature %a, affected glyphs %a, skipped glyphs %a",feature,done,skip)
- end
-end
-otf.enhancers.addfeature=addfeature
-local extrafeatures={}
-local knownfeatures={}
-function otf.addfeature(name,specification)
- if type(name)=="table" then
- specification=name
- end
- if type(specification)~="table" then
- report_otf("invalid feature specification, no valid table")
- return
- end
- specification,name=validspecification(specification,name)
- if name and specification then
- local slot=knownfeatures[name]
- if not slot then
- slot=#extrafeatures+1
- knownfeatures[name]=slot
- elseif specification.overload==false then
- slot=#extrafeatures+1
- knownfeatures[name]=slot
- else
- end
- specification.name=name
- extrafeatures[slot]=specification
- end
-end
-local function enhance(data,filename,raw)
- for slot=1,#extrafeatures do
- local specification=extrafeatures[slot]
- addfeature(data,specification.name,specification)
- end
-end
-otf.enhancers.enhance=enhance
-otf.enhancers.register("check extra features",enhance)
-
-end -- closure
-
-do -- begin closure to overcome local limits and interference
-
if not modules then modules={} end modules ['font-onr']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -33987,6 +34273,7 @@ do -- begin closure to overcome local limits and interference
if not modules then modules={} end modules ['font-one']={
version=1.001,
+ optimize=true,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright="PRAGMA ADE / ConTeXt Development Team",
@@ -34481,7 +34768,6 @@ local function copytotfm(data)
parameters.descender=abs(metadata.descender or 0)
parameters.units=1000
properties.spacer=spacer
- properties.encodingbytes=2
properties.format=fonts.formats[filename] or "type1"
properties.filename=filename
properties.fontname=fontname
@@ -34489,6 +34775,9 @@ local function copytotfm(data)
properties.psname=fullname
properties.name=filename or fullname or fontname
properties.private=properties.private or data.private or privateoffset
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE==0 then
+ properties.encodingbytes=2
+end
if next(characters) then
return {
characters=characters,
@@ -34591,6 +34880,7 @@ local function read_from_afm(specification)
local tfmdata=afmtotfm(specification)
if tfmdata then
tfmdata.properties.name=specification.name
+ tfmdata.properties.id=specification.id
tfmdata=constructors.scale(tfmdata,specification)
local allfeatures=tfmdata.shared.features or specification.features.normal
constructors.applymanipulators("afm",tfmdata,allfeatures,trace_features,report_afm)
@@ -35751,8 +36041,9 @@ function definers.read(specification,size,id)
report_defining("already hashed: %s",hash)
end
else
- tfmdata=definers.loadfont(specification)
+ tfmdata=definers.loadfont(specification)
if tfmdata then
+ tfmdata.original=specification.specification
if trace_defining then
report_defining("loaded and hashed: %s",hash)
end
@@ -35789,6 +36080,373 @@ end -- closure
do -- begin closure to overcome local limits and interference
+if not modules then modules={} end modules ['font-shp']={
+ version=1.001,
+ comment="companion to font-ini.mkiv",
+ author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright="PRAGMA ADE / ConTeXt Development Team",
+ license="see context related readme files"
+}
+local tonumber,next=tonumber,next
+local concat=table.concat
+local formatters,lower=string.formatters,string.lower
+local otf=fonts.handlers.otf
+local afm=fonts.handlers.afm
+local pfb=fonts.handlers.pfb
+local hashes=fonts.hashes
+local identifiers=hashes.identifiers
+local version=0.009
+local shapescache=containers.define("fonts","shapes",version,true)
+local streamscache=containers.define("fonts","streams",version,true)
+local compact_streams=false
+directives.register("fonts.streams.compact",function(v) compact_streams=v end)
+local function packoutlines(data,makesequence)
+ local subfonts=data.subfonts
+ if subfonts then
+ for i=1,#subfonts do
+ packoutlines(subfonts[i],makesequence)
+ end
+ return
+ end
+ local common=data.segments
+ if common then
+ return
+ end
+ local glyphs=data.glyphs
+ if not glyphs then
+ return
+ end
+ if makesequence then
+ for index=0,#glyphs do
+ local glyph=glyphs[index]
+ if glyph then
+ local segments=glyph.segments
+ if segments then
+ local sequence={}
+ local nofsequence=0
+ for i=1,#segments do
+ local segment=segments[i]
+ local nofsegment=#segment
+ nofsequence=nofsequence+1
+ sequence[nofsequence]=segment[nofsegment]
+ for i=1,nofsegment-1 do
+ nofsequence=nofsequence+1
+ sequence[nofsequence]=segment[i]
+ end
+ end
+ glyph.sequence=sequence
+ glyph.segments=nil
+ end
+ end
+ end
+ else
+ local hash={}
+ local common={}
+ local reverse={}
+ local last=0
+ for index=0,#glyphs do
+ local glyph=glyphs[index]
+ if glyph then
+ local segments=glyph.segments
+ if segments then
+ for i=1,#segments do
+ local h=concat(segments[i]," ")
+ hash[h]=(hash[h] or 0)+1
+ end
+ end
+ end
+ end
+ for index=0,#glyphs do
+ local glyph=glyphs[index]
+ if glyph then
+ local segments=glyph.segments
+ if segments then
+ for i=1,#segments do
+ local segment=segments[i]
+ local h=concat(segment," ")
+ if hash[h]>1 then
+ local idx=reverse[h]
+ if not idx then
+ last=last+1
+ reverse[h]=last
+ common[last]=segment
+ idx=last
+ end
+ segments[i]=idx
+ end
+ end
+ end
+ end
+ end
+ if last>0 then
+ data.segments=common
+ end
+ end
+end
+local function unpackoutlines(data)
+ local subfonts=data.subfonts
+ if subfonts then
+ for i=1,#subfonts do
+ unpackoutlines(subfonts[i])
+ end
+ return
+ end
+ local common=data.segments
+ if not common then
+ return
+ end
+ local glyphs=data.glyphs
+ if not glyphs then
+ return
+ end
+ for index=0,#glyphs do
+ local glyph=glyphs[index]
+ if glyph then
+ local segments=glyph.segments
+ if segments then
+ for i=1,#segments do
+ local c=common[segments[i]]
+ if c then
+ segments[i]=c
+ end
+ end
+ end
+ end
+ end
+ data.segments=nil
+end
+local readers=otf.readers
+local cleanname=otf.readers.helpers.cleanname
+local function makehash(filename,sub,instance)
+ local name=cleanname(file.basename(filename))
+ if instance then
+ return formatters["%s-%s-%s"](name,sub or 0,cleanname(instance))
+ else
+ return formatters["%s-%s"] (name,sub or 0)
+ end
+end
+local function loadoutlines(cache,filename,sub,instance)
+ local base=file.basename(filename)
+ local name=file.removesuffix(base)
+ local kind=file.suffix(filename)
+ local attr=lfs.attributes(filename)
+ local size=attr and attr.size or 0
+ local time=attr and attr.modification or 0
+ local sub=tonumber(sub)
+ if size>0 and (kind=="otf" or kind=="ttf" or kind=="tcc") then
+ local hash=makehash(filename,sub,instance)
+ data=containers.read(cache,hash)
+ if not data or data.time~=time or data.size~=size then
+ data=otf.readers.loadshapes(filename,sub,instance)
+ if data then
+ data.size=size
+ data.format=data.format or (kind=="otf" and "opentype") or "truetype"
+ data.time=time
+ packoutlines(data)
+ containers.write(cache,hash,data)
+ data=containers.read(cache,hash)
+ end
+ end
+ unpackoutlines(data)
+ elseif size>0 and (kind=="pfb") then
+ local hash=containers.cleanname(base)
+ data=containers.read(cache,hash)
+ if not data or data.time~=time or data.size~=size then
+ data=afm.readers.loadshapes(filename)
+ if data then
+ data.size=size
+ data.format="type1"
+ data.time=time
+ packoutlines(data)
+ containers.write(cache,hash,data)
+ data=containers.read(cache,hash)
+ end
+ end
+ unpackoutlines(data)
+ else
+ data={
+ filename=filename,
+ size=0,
+ time=time,
+ format="unknown",
+ units=1000,
+ glyphs={}
+ }
+ end
+ return data
+end
+local function cachethem(cache,hash,data)
+ containers.write(cache,hash,data,compact_streams)
+ return containers.read(cache,hash)
+end
+local function loadstreams(cache,filename,sub,instance)
+ local base=file.basename(filename)
+ local name=file.removesuffix(base)
+ local kind=lower(file.suffix(filename))
+ local attr=lfs.attributes(filename)
+ local size=attr and attr.size or 0
+ local time=attr and attr.modification or 0
+ local sub=tonumber(sub)
+ if size>0 and (kind=="otf" or kind=="ttf" or kind=="ttc") then
+ local hash=makehash(filename,sub,instance)
+ data=containers.read(cache,hash)
+ if not data or data.time~=time or data.size~=size then
+ data=otf.readers.loadshapes(filename,sub,instance,true)
+ if data then
+ local glyphs=data.glyphs
+ local streams={}
+ if glyphs then
+ for i=0,#glyphs do
+ local glyph=glyphs[i]
+ if glyph then
+ streams[i]=glyph.stream or ""
+ else
+ streams[i]=""
+ end
+ end
+ end
+ data.streams=streams
+ data.glyphs=nil
+ data.size=size
+ data.format=data.format or (kind=="otf" and "opentype") or "truetype"
+ data.time=time
+ data=cachethem(cache,hash,data)
+ end
+ end
+ elseif size>0 and (kind=="pfb") then
+ local hash=makehash(filename,sub,instance)
+ data=containers.read(cache,hash)
+ if not data or data.time~=time or data.size~=size then
+ local names,encoding,streams,metadata=pfb.loadvector(filename,false,true)
+ if streams then
+ local fontbbox=metadata.fontbbox or { 0,0,0,0 }
+ for i=0,#streams do
+ streams[i]=streams[i].stream or "\14"
+ end
+ data={
+ filename=filename,
+ size=size,
+ time=time,
+ format="type1",
+ streams=streams,
+ fontheader={
+ fontversion=metadata.version,
+ units=1000,
+ xmin=fontbbox[1],
+ ymin=fontbbox[2],
+ xmax=fontbbox[3],
+ ymax=fontbbox[4],
+ },
+ horizontalheader={
+ ascender=0,
+ descender=0,
+ },
+ maximumprofile={
+ nofglyphs=#streams+1,
+ },
+ names={
+ copyright=metadata.copyright,
+ family=metadata.familyname,
+ fullname=metadata.fullname,
+ fontname=metadata.fontname,
+ subfamily=metadata.subfamilyname,
+ trademark=metadata.trademark,
+ notice=metadata.notice,
+ version=metadata.version,
+ },
+ cffinfo={
+ familyname=metadata.familyname,
+ fullname=metadata.fullname,
+ italicangle=metadata.italicangle,
+ monospaced=metadata.isfixedpitch and true or false,
+ underlineposition=metadata.underlineposition,
+ underlinethickness=metadata.underlinethickness,
+ weight=metadata.weight,
+ },
+ }
+ data=cachethem(cache,hash,data)
+ end
+ end
+ else
+ data={
+ filename=filename,
+ size=0,
+ time=time,
+ format="unknown",
+ streams={}
+ }
+ end
+ return data
+end
+local loadedshapes={}
+local loadedstreams={}
+local function loadoutlinedata(fontdata,streams)
+ local properties=fontdata.properties
+ local filename=properties.filename
+ local subindex=fontdata.subindex
+ local instance=properties.instance
+ local hash=makehash(filename,subindex,instance)
+ local loaded=loadedshapes[hash]
+ if not loaded then
+ loaded=loadoutlines(shapescache,filename,subindex,instance)
+ loadedshapes[hash]=loaded
+ end
+ return loaded
+end
+hashes.shapes=table.setmetatableindex(function(t,k)
+ local f=identifiers[k]
+ if f then
+ return loadoutlinedata(f)
+ end
+end)
+local function getstreamhash(fontid)
+ local fontdata=identifiers[fontid]
+ if fontdata then
+ local properties=fontdata.properties
+ return makehash(properties.filename,properties.subfont,properties.instance)
+ end
+end
+local function loadstreamdata(fontdata)
+ local properties=fontdata.properties
+ local shared=fontdata.shared
+ local rawdata=shared and shared.rawdata
+ local metadata=rawdata and rawdata.metadata
+ local filename=properties.filename
+ local subindex=metadata and metadata.subfontindex
+ local instance=properties.instance
+ local hash=makehash(filename,subindex,instance)
+ local loaded=loadedstreams[hash]
+ if not loaded then
+ loaded=loadstreams(streamscache,filename,subindex,instance)
+ loadedstreams[hash]=loaded
+ end
+ return loaded
+end
+hashes.streams=table.setmetatableindex(function(t,k)
+ local f=identifiers[k]
+ if f then
+ return loadstreamdata(f)
+ end
+end)
+otf.loadoutlinedata=loadoutlinedata
+otf.loadstreamdata=loadstreamdata
+otf.loadshapes=loadshapes
+otf.getstreamhash=getstreamhash
+local streams=fonts.hashes.streams
+callback.register("glyph_stream_provider",function(id,index,mode)
+ if id>0 then
+ local streams=streams[id].streams
+ if streams then
+ return streams[index] or ""
+ end
+ end
+ return ""
+end)
+
+end -- closure
+
+do -- begin closure to overcome local limits and interference
+
if not modules then modules={} end modules ['luatex-fonts-def']={
version=1.001,
comment="companion to luatex-*.tex",
@@ -36335,41 +36993,6 @@ if context then
--removed
end
-if context then
- local letter=characters.is_letter
- local always=true
- local function collapseitalics(tfmdata,key,value)
- local threshold=value==true and 100 or tonumber(value)
- if threshold and threshold>0 then
- if threshold>100 then
- threshold=100
- end
- for unicode,data in next,tfmdata.characters do
- if always or letter[unicode] or letter[data.unicode] then
- local italic=data.italic
- if italic and italic~=0 then
- local width=data.width
- if width and width~=0 then
- local delta=threshold*italic/100
- data.width=width+delta
- data.italic=italic-delta
- end
- end
- end
- end
- end
- end
- local dimensions_specification={
- name="collapseitalics",
- description="collapse italics",
- manipulators={
- base=collapseitalics,
- node=collapseitalics,
- }
- }
- registerotffeature(dimensions_specification)
- registerafmfeature(dimensions_specification)
-end
end -- closure
@@ -36557,55 +37180,74 @@ local rules={
"FractionRuleThickness",
"UnderbarRuleThickness",
}
-local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze)
- if delta~=0 then
- for i=1,#rules do
- local name=rules[i]
- local value=mathparameters[name]
- if value then
- mathparameters[name]=(squeeze or 1)*(value+dx)
+local setmathparameters
+local setmathcharacters
+if CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 then
+ setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta~=0 then
+ for i=1,#rules do
+ local name=rules[i]
+ local value=mathparameters[name]
+ if value then
+ mathparameters[name]=(squeeze or 1)*(value+dy)
+ end
end
end
end
-end
-local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
- local function wdpatch(char)
- if wsnap~=0 then
- char.width=char.width+wdelta/2
- end
+ setmathcharacters=function()
end
- local function htpatch(char)
- if hsnap~=0 then
- local height=char.height
- if height then
- char.height=char.height+2*dy
+else
+ setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta~=0 then
+ for i=1,#rules do
+ local name=rules[i]
+ local value=mathparameters[name]
+ if value then
+ mathparameters[name]=(squeeze or 1)*(value+dy)
+ end
end
end
end
- local character=characters[0x221A]
- if character and character.next then
- local char=character
- local next=character.next
- wdpatch(char)
- htpatch(char)
- while next do
- char=characters[next]
+ setmathcharacters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+ local function wdpatch(char)
+ if wsnap~=0 then
+ char.width=char.width+wdelta/2
+ end
+ end
+ local function htpatch(char)
+ if hsnap~=0 then
+ local height=char.height
+ if height then
+ char.height=char.height+2*dy
+ end
+ end
+ end
+ local character=characters[0x221A]
+ if character and character.next then
+ local char=character
+ local next=character.next
wdpatch(char)
htpatch(char)
- next=char.next
- end
- if char then
- local v=char.vert_variants
- if v then
- local top=v[#v]
- if top then
- local char=characters[top.glyph]
- htpatch(char)
+ while next do
+ char=characters[next]
+ wdpatch(char)
+ htpatch(char)
+ next=char.next
+ end
+ if char then
+ local v=char.vert_variants
+ if v then
+ local top=v[#v]
+ if top then
+ local char=characters[top.glyph]
+ htpatch(char)
+ end
end
end
end
end
end
+local shiftmode=CONTEXTLMTXMODE and CONTEXTLMTXMODE>0
local function manipulateeffect(tfmdata)
local effect=tfmdata.properties.effect
if effect then
@@ -36627,38 +37269,45 @@ local function manipulateeffect(tfmdata)
local factor=(1+effect.factor)*factor
local hfactor=(1+effect.hfactor)*hfactor
local vfactor=(1+effect.vfactor)*vfactor
- local vshift=vshift~=0 and upcommand[vshift] or false
+ if shiftmode then
+ parameters.hshift=hshift
+ parameters.vshift=vshift
+ else
+ vshift=vshift~=0 and upcommand[vshift] or false
+ hshift=rightcommand[hshift]
+ end
for unicode,character in next,characters do
local oldwidth=character.width
local oldheight=character.height
local olddepth=character.depth
if oldwidth and oldwidth>0 then
character.width=oldwidth+wdelta
- local commands=character.commands
- local hshift=rightcommand[hshift]
- if vshift then
- if commands then
- prependcommands (commands,
- hshift,
- vshift
- )
- else
- character.commands={
- hshift,
- vshift,
- charcommand[unicode]
- }
- end
- else
- if commands then
- prependcommands (commands,
- hshift
- )
+ if not shiftmode then
+ local commands=character.commands
+ if vshift then
+ if commands then
+ prependcommands (commands,
+ hshift,
+ vshift
+ )
+ else
+ character.commands={
+ hshift,
+ vshift,
+ charcommand[unicode]
+ }
+ end
else
- character.commands={
- hshift,
- charcommand[unicode]
- }
+ if commands then
+ prependcommands (commands,
+ hshift
+ )
+ else
+ character.commands={
+ hshift,
+ charcommand[unicode]
+ }
+ end
end
end
end
@@ -36670,7 +37319,7 @@ local function manipulateeffect(tfmdata)
end
end
if mathparameters then
- setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze)
+ setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
end
parameters.factor=factor
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts.lua
index 9f45408b1b7..d6c03108a21 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts.lua
@@ -44,9 +44,30 @@ if not modules then modules = { } end modules ['luatex-fonts'] = {
-- and interferences between mechanisms between macro packages. We use the rendering in context
-- and luatex-plain as reference for issues.
+-- I might as well remove some code that is not used in generic (or not used by generic users)
+-- like color fonts (emoji etc) and variable fonts thereby making the code base smaller. However
+-- I might keep ity just for the sake of testing the plain loader that comes with context. We'll
+-- see.
+
+-- As a side effect of cleaning up some context code, like code meant for older version of luatex,
+-- as well replacing code for more recent versions (post 1.12) there can be changes in the modules
+-- used here, especially where we check for 'context' being used. Hopefully there are no side
+-- effects. Because we can now assume that the the glyph injection callback is in recent texlive
+-- installations, the variable font code is now enabled in the generic version that comes with
+-- context (as unofficial bonus; when it was demonstrated at bachotex 2017 it worked ok for the
+-- generic loader but was kind of disabled there as no one needs it). I waited with adding the
+-- pending code for type 3 support till texlive 2020 was fozen but it will be in texlive 2021 (it
+-- is already tested in context back in 2019 and I wanted to release it at the canceled BT 2020
+-- meeting, so I consider it stable, read: this is it). To what extend and when I will adapt the
+-- generic code (for color support) to that is yet to be decided because in context we do things
+-- a bit differently. We anyway have to wait a few years till that callback is omnipresent so I'm
+-- not in that much of a hurry. (There will be a TB article about it first and after that I will
+-- add some examples to the manual.)
+
utf = utf or (unicode and unicode.utf8) or { }
--- We have some (global) hooks (for latex):
+-- We have some (global) hooks (for latex). Maybe I'll use this signal to disable some of the
+-- more tricky features like variable fonts and emoji (because afaik latex uses hb for that).
if not non_generic_context then
non_generic_context = { }
@@ -262,20 +283,20 @@ if non_generic_context.luatex_fonts.skip_loading ~= true then
-- outside context so in retrospect there was no need for it being generic.
loadmodule('font-otr.lua')
- loadmodule('font-oti.lua')
- loadmodule('font-ott.lua')
loadmodule('font-cff.lua')
loadmodule('font-ttf.lua')
loadmodule('font-dsp.lua')
- loadmodule('font-oup.lua')
+ loadmodule('font-oti.lua')
+ loadmodule('font-ott.lua')
loadmodule('font-otl.lua')
loadmodule('font-oto.lua')
loadmodule('font-otj.lua')
+ loadmodule('font-oup.lua')
loadmodule('font-ota.lua')
loadmodule('font-ots.lua')
+ loadmodule('font-otc.lua')
loadmodule('font-osd.lua')
loadmodule('font-ocl.lua')
- loadmodule('font-otc.lua')
-- The code for type one fonts.
@@ -291,6 +312,7 @@ if non_generic_context.luatex_fonts.skip_loading ~= true then
loadmodule('font-lua.lua')
loadmodule('font-def.lua')
+ loadmodule('font-shp.lua')
-- We support xetex compatible specifiers (plain/latex only).
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex b/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex
index ec4093d78d5..f85e1c98f6d 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex
@@ -159,6 +159,17 @@ $\sin{x}$
\egroup
+% \bgroup
+%
+% \font\variablea=file:adobevfprototype.otf:+kern;+liga;axis={weight=100,contrast=0};
+% \font\variableb=file:adobevfprototype.otf:+kern;+liga;axis={weight=200,contrast=20};
+% \font\variablec=file:adobevfprototype.otf:+kern;+liga;axis={weight=300,contrast=50};
+% \variablea A simple test.
+% \variableb A simple test.
+% \variablec A simple test.
+%
+% \egroup
+
% \font\amiri=file:amiri-regular.ttf:%
% mode=node;analyze=yes;language=dflt;script=arab;ccmp=yes;%
% init=yes;medi=yes;fina=yes;isol=yes;%